From ee9a30ae13c1b7dc358c49b614651adb81690c02 Mon Sep 17 00:00:00 2001 From: hubicka Date: Sun, 15 Jan 2006 17:29:29 +0000 Subject: [PATCH] * Merge from mainline git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/ipa-branch@109724 138bc75d-0d04-0410-961f-82ee72b054a4 --- ChangeLog | 178 +- MAINTAINERS | 17 +- Makefile.def | 11 +- Makefile.in | 5612 +-- Makefile.tpl | 601 +- config.sub | 12 +- config/ChangeLog | 21 +- config/acx.m4 | 31 + config/mh-ppc-aix | 8 + config/stdint.m4 | 486 + configure | 1438 +- configure.in | 275 +- contrib/ChangeLog | 4 + contrib/newcvsroot | 36 - contrib/regression/ChangeLog | 21 + .../GCC Regression Tester.wdgt/Info.plist | 28 - .../GCC Regression Tester.wdgt/widget.html | 155 - .../Default.png | Bin .../Icon.png | Bin .../GCC_Regression_Tester.wdgt/Info.plist | 32 + .../de.lproj/InfoPlist.strings | Bin 0 -> 126 bytes .../en.lproj/InfoPlist.strings | Bin 0 -> 96 bytes .../ja.lproj/InfoPlist.strings | Bin 0 -> 74 bytes .../GCC_Regression_Tester.wdgt/widget.html | 155 + contrib/regression/README | 4 +- contrib/regression/btest-gcc.sh | 21 +- fastjar/ChangeLog | 8 + fastjar/compress.c | 3 +- fastjar/jartool.c | 2 + fastjar/jartool.h | 6 +- fastjar/shift.c | 6 +- fixincludes/ChangeLog | 5 + fixincludes/fixincl.c | 5 +- fixincludes/fixincl.x | 15 +- gcc/ChangeLog | 13881 +++---- gcc/ChangeLog-2005 | 13177 ++++++- gcc/ChangeLog.ipa | 4 + gcc/ChangeLog.tree-ssa | 6 +- gcc/DATESTAMP | 2 +- gcc/Makefile.in | 146 +- gcc/ada/ChangeLog | 761 + gcc/ada/Make-lang.in | 813 +- gcc/ada/Makefile.in | 96 +- gcc/ada/Makefile.rtl | 11 +- gcc/ada/a-cdlili.adb | 82 +- gcc/ada/a-cdlili.ads | 6 +- gcc/ada/a-cidlli.adb | 83 +- gcc/ada/a-cidlli.ads | 6 +- gcc/ada/a-cihama.adb | 46 + gcc/ada/a-ciorma.adb | 169 +- gcc/ada/a-ciorma.ads | 8 +- gcc/ada/a-cohama.adb | 17 +- gcc/ada/a-cohama.ads | 12 +- gcc/ada/a-coinve.adb | 12 + gcc/ada/a-convec.adb | 10 +- gcc/ada/a-coorma.adb | 125 +- gcc/ada/a-coorma.ads | 8 +- gcc/ada/a-elchha.adb | 13 + gcc/ada/a-exextr.adb | 14 +- gcc/ada/a-tags.adb | 522 +- gcc/ada/a-tags.ads | 144 +- gcc/ada/a-taside.adb | 5 +- gcc/ada/a-taster.adb | 128 + gcc/ada/a-taster.ads | 43 + gcc/ada/adaint.c | 5 + gcc/ada/bindgen.adb | 54 +- gcc/ada/bindusg.adb | 6 + gcc/ada/butil.adb | 12 +- gcc/ada/clean.adb | 16 +- gcc/ada/decl.c | 93 +- gcc/ada/einfo.adb | 37 +- gcc/ada/einfo.ads | 15 +- gcc/ada/exp_aggr.adb | 5 +- gcc/ada/exp_aggr.ads | 9 +- gcc/ada/exp_ch3.adb | 90 +- gcc/ada/exp_ch4.adb | 228 +- gcc/ada/exp_ch5.adb | 35 +- gcc/ada/exp_ch6.adb | 9 +- gcc/ada/exp_ch7.ads | 4 +- gcc/ada/exp_ch9.adb | 849 +- gcc/ada/exp_disp.adb | 682 +- gcc/ada/exp_disp.ads | 13 +- gcc/ada/exp_imgv.adb | 9 +- gcc/ada/exp_sel.adb | 220 + gcc/ada/exp_sel.ads | 113 + gcc/ada/exp_util.adb | 118 +- gcc/ada/exp_util.ads | 7 + gcc/ada/freeze.adb | 340 +- gcc/ada/frontend.adb | 2 - gcc/ada/g-allein.ads | 1356 + gcc/ada/g-alleve.adb | 5035 +++ gcc/ada/g-alleve.ads | 528 + gcc/ada/g-altcon.adb | 486 + gcc/ada/g-altcon.ads | 103 + gcc/ada/g-altive.ads | 455 + gcc/ada/g-alveop.adb | 9704 +++++ gcc/ada/g-alveop.ads | 8105 ++++ gcc/ada/g-alvety.ads | 152 + gcc/ada/g-alvevi.ads | 158 + gcc/ada/g-diopit.adb | 5 +- gcc/ada/g-exctra.ads | 2 +- gcc/ada/g-os_lib.adb | 96 +- gcc/ada/g-os_lib.ads | 38 +- gcc/ada/g-soccon.ads | 9 +- gcc/ada/gigi.h | 8 +- gcc/ada/gnat_rm.texi | 132 +- gcc/ada/gnat_ugn.texi | 256 +- gcc/ada/gnatcmd.adb | 152 +- gcc/ada/gnatlink.adb | 118 +- gcc/ada/gnatvsn.ads | 4 +- gcc/ada/hostparm.ads | 20 +- gcc/ada/i-c.adb | 2 +- gcc/ada/i-cexten.ads | 2 +- gcc/ada/i-cobol.adb | 2 +- gcc/ada/i-cobol.ads | 2 +- gcc/ada/i-cpoint.ads | 2 +- gcc/ada/i-cpp.adb | 2 +- gcc/ada/i-cpp.ads | 2 +- gcc/ada/i-cstrea-vms.adb | 2 +- gcc/ada/i-cstrea.ads | 2 +- gcc/ada/i-cstrin.adb | 2 +- gcc/ada/i-cstrin.ads | 2 +- gcc/ada/i-os2err.ads | 2 +- gcc/ada/i-os2lib.ads | 2 +- gcc/ada/i-os2syn.ads | 2 +- gcc/ada/i-os2thr.ads | 2 +- gcc/ada/impunit.adb | 14 +- gcc/ada/indepsw-gnu.adb | 2 +- gcc/ada/indepsw.ads | 2 +- gcc/ada/inline.adb | 2 +- gcc/ada/interfac-vms.ads | 2 +- gcc/ada/interfac.ads | 2 +- gcc/ada/itypes.adb | 42 +- gcc/ada/itypes.ads | 5 +- gcc/ada/krunch.adb | 3 +- gcc/ada/krunch.ads | 2 +- gcc/ada/layout.adb | 38 +- gcc/ada/lib-list.adb | 2 +- gcc/ada/lib-load.adb | 2 +- gcc/ada/lib-load.ads | 2 +- gcc/ada/lib-sort.adb | 2 +- gcc/ada/lib.adb | 2 +- gcc/ada/lib.ads | 2 +- gcc/ada/live.adb | 2 +- gcc/ada/make.adb | 4 +- gcc/ada/make.ads | 2 +- gcc/ada/makegpr.adb | 2 +- gcc/ada/mlib-prj.adb | 41 +- gcc/ada/mlib-tgt-vms-alpha.adb | 8 +- gcc/ada/mlib-tgt-vms-ia64.adb | 8 +- gcc/ada/mlib-utl.adb | 4 +- gcc/ada/namet.ads | 8 +- gcc/ada/opt.ads | 20 +- gcc/ada/osint-b.adb | 43 +- gcc/ada/osint-c.adb | 2 +- gcc/ada/osint.adb | 14 +- gcc/ada/osint.ads | 4 +- gcc/ada/output.adb | 81 +- gcc/ada/output.ads | 53 +- gcc/ada/par-ch12.adb | 69 +- gcc/ada/par-prag.adb | 48 +- gcc/ada/prj-attr.adb | 6 + gcc/ada/prj-nmsc.adb | 11 +- gcc/ada/rident.ads | 9 +- gcc/ada/rtsfind.ads | 55 +- gcc/ada/s-bitops.adb | 5 +- gcc/ada/s-finimp.adb | 2 +- gcc/ada/s-imgwch.adb | 17 +- gcc/ada/s-imgwch.ads | 8 +- gcc/ada/s-io.adb | 55 +- gcc/ada/s-io.ads | 17 +- gcc/ada/s-osinte-linux-hppa.ads | 2 +- gcc/ada/s-soflin.adb | 39 +- gcc/ada/s-soflin.ads | 22 +- gcc/ada/s-solita.adb | 71 +- gcc/ada/s-stausa.adb | 272 +- gcc/ada/s-stausa.ads | 336 +- gcc/ada/s-tarest.adb | 168 +- gcc/ada/s-tasini.adb | 14 +- gcc/ada/s-taskin.adb | 3 + gcc/ada/s-taskin.ads | 67 +- gcc/ada/s-tassta.adb | 172 +- gcc/ada/s-tasuti.adb | 14 +- gcc/ada/s-vaflop-vms-alpha.adb | 101 +- gcc/ada/s-wchcon.ads | 2 +- gcc/ada/scn.adb | 5 +- gcc/ada/scng.adb | 11 +- gcc/ada/sdefault.ads | 18 +- gcc/ada/sem_aggr.adb | 13 +- gcc/ada/sem_cat.adb | 66 +- gcc/ada/sem_ch10.adb | 2 +- gcc/ada/sem_ch12.adb | 16 +- gcc/ada/sem_ch13.adb | 39 +- gcc/ada/sem_ch3.adb | 413 +- gcc/ada/sem_ch4.adb | 66 +- gcc/ada/sem_ch6.adb | 13 +- gcc/ada/sem_ch8.adb | 8 +- gcc/ada/sem_ch9.adb | 15 +- gcc/ada/sem_eval.adb | 19 +- gcc/ada/sem_eval.ads | 402 +- gcc/ada/sem_prag.adb | 61 +- gcc/ada/sem_res.adb | 92 +- gcc/ada/sem_type.adb | 64 +- gcc/ada/sem_util.adb | 41 +- gcc/ada/sem_util.ads | 3 +- gcc/ada/sinfo.adb | 2 + gcc/ada/sinfo.ads | 1532 +- gcc/ada/snames.adb | 1 + gcc/ada/snames.ads | 1024 +- gcc/ada/snames.h | 183 +- gcc/ada/sprint.adb | 306 +- gcc/ada/sprint.ads | 1 + gcc/ada/stylesw.adb | 114 +- gcc/ada/stylesw.ads | 31 +- gcc/ada/switch-b.adb | 12 + gcc/ada/switch-c.adb | 11 +- gcc/ada/system-mingw.ads | 33 +- gcc/ada/targext.c | 51 + gcc/ada/targparm.adb | 18 +- gcc/ada/targparm.ads | 7 + gcc/ada/trans.c | 37 +- gcc/ada/types.ads | 5 +- gcc/ada/utils.c | 37 +- gcc/ada/utils2.c | 51 +- gcc/ada/vms_conv.adb | 15 +- gcc/ada/vms_conv.ads | 1 + gcc/ada/vms_data.ads | 198 +- gcc/basic-block.h | 209 +- gcc/bb-reorder.c | 10 +- gcc/bitmap.c | 302 +- gcc/bitmap.h | 6 + gcc/bt-load.c | 12 +- gcc/builtin-types.def | 26 + gcc/builtins.c | 953 +- gcc/builtins.def | 211 +- gcc/c-common.c | 433 +- gcc/c-common.h | 8 +- gcc/c-convert.c | 23 +- gcc/c-cppbuiltin.c | 137 +- gcc/c-decl.c | 114 +- gcc/c-format.c | 125 +- gcc/c-format.h | 9 + gcc/c-incpath.c | 4 +- gcc/c-lex.c | 70 +- gcc/c-opts.c | 2 + gcc/c-parser.c | 269 +- gcc/c-pch.c | 16 +- gcc/c-ppoutput.c | 6 +- gcc/c-pragma.c | 100 +- gcc/c-pragma.h | 27 +- gcc/c-pretty-print.c | 10 +- gcc/c-pretty-print.h | 3 + gcc/c-tree.h | 5 +- gcc/c-typeck.c | 232 +- gcc/caller-save.c | 24 +- gcc/cfg.c | 13 +- gcc/cfganal.c | 106 +- gcc/cfgbuild.c | 16 +- gcc/cfgcleanup.c | 160 +- gcc/cfghooks.c | 18 +- gcc/cfglayout.c | 48 +- gcc/cfgloop.c | 14 +- gcc/cfgloop.h | 2 +- gcc/cfgloopmanip.c | 4 +- gcc/cfgrtl.c | 22 +- gcc/cgraph.c | 20 +- gcc/combine.c | 1591 +- gcc/common.opt | 8 + gcc/config.build | 5 - gcc/config.gcc | 28 +- gcc/config.host | 7 - gcc/config.in | 6 + gcc/config/alpha/alpha-protos.h | 2 - gcc/config/alpha/alpha.c | 141 +- gcc/config/alpha/elf.h | 35 +- gcc/config/alpha/unicosmk.h | 45 +- gcc/config/alpha/vms.h | 32 +- gcc/config/arm/aof.h | 46 +- gcc/config/arm/aout.h | 2 +- gcc/config/arm/arm-protos.h | 3 - gcc/config/arm/arm.c | 74 +- gcc/config/arm/arm.h | 2 +- gcc/config/arm/arm.md | 14 +- gcc/config/arm/bpabi.h | 2 +- gcc/config/arm/pe.h | 57 +- gcc/config/arm/predicates.md | 8 + gcc/config/arm/t-arm-elf | 2 +- gcc/config/arm/t-netbsd | 1 + gcc/config/arm/unknown-elf.h | 8 +- gcc/config/avr/avr-protos.h | 1 - gcc/config/avr/avr.c | 28 +- gcc/config/avr/avr.h | 27 +- gcc/config/avr/t-avr | 2 +- gcc/config/bfin/bfin.c | 46 +- gcc/config/bfin/bfin.h | 7 +- gcc/config/c4x/c4x-c.c | 12 +- gcc/config/c4x/c4x.c | 4 +- gcc/config/c4x/c4x.h | 31 - gcc/config/cris/arit.c | 92 +- gcc/config/cris/cris.c | 117 +- gcc/config/cris/cris.md | 53 +- gcc/config/darwin-c.c | 16 +- gcc/config/darwin-protos.h | 66 +- gcc/config/darwin-sections.def | 62 + gcc/config/darwin.c | 310 +- gcc/config/darwin.h | 261 +- gcc/config/floatunsidf.c | 15 + gcc/config/floatunsisf.c | 18 + gcc/config/floatunsitf.c | 15 + gcc/config/floatunsixf.c | 15 + gcc/config/fp-bit.c | 73 +- gcc/config/fp-bit.h | 42 +- gcc/config/freebsd-spec.h | 17 +- gcc/config/frv/frv-protos.h | 5 - gcc/config/frv/frv.c | 8 +- gcc/config/frv/frv.h | 47 +- gcc/config/h8300/h8300.md | 2 +- gcc/config/i386/cygming.h | 45 +- gcc/config/i386/darwin.h | 19 +- gcc/config/i386/i386-protos.h | 2 +- gcc/config/i386/i386.c | 615 +- gcc/config/i386/i386.h | 18 +- gcc/config/i386/i386.md | 122 +- gcc/config/i386/mmintrin.h | 4 + gcc/config/i386/mmx.md | 12 +- gcc/config/i386/netware.h | 2 +- gcc/config/i386/nwld.c | 4 +- gcc/config/i386/nwld.h | 3 +- gcc/config/i386/pmm_malloc.h | 6 +- gcc/config/i386/predicates.md | 6 +- gcc/config/i386/sse.md | 89 +- gcc/config/i386/sync.md | 139 +- gcc/config/i386/t-nwld | 4 +- gcc/config/i386/winnt.c | 2 +- gcc/config/i386/xmmintrin.h | 18 +- gcc/config/ia64/hpux.h | 2 + gcc/config/ia64/ia64-c.c | 6 +- gcc/config/ia64/ia64-protos.h | 8 - gcc/config/ia64/ia64.c | 64 +- gcc/config/ia64/ia64.md | 7 +- gcc/config/ia64/sysv4.h | 35 +- gcc/config/ia64/t-hpux | 2 +- gcc/config/iq2000/iq2000.c | 21 +- gcc/config/iq2000/iq2000.h | 5 - gcc/config/m32c/addsub.md | 10 +- gcc/config/m32c/m32c-pragma.c | 4 +- gcc/config/m32c/m32c.c | 160 +- gcc/config/m32c/m32c.h | 9 + gcc/config/m32c/mov.md | 5 +- gcc/config/m32c/muldiv.md | 19 +- gcc/config/m32c/predicates.md | 11 +- gcc/config/m32c/shift.md | 137 +- gcc/config/m32r/m32r-protos.h | 2 - gcc/config/m32r/m32r.h | 4 +- gcc/config/m68hc11/m68hc11.c | 2 +- gcc/config/m68k/fpgnulib.c | 128 +- gcc/config/m68k/lb1sf68.asm | 115 +- gcc/config/m68k/m68k.c | 1067 +- gcc/config/m68k/m68k.h | 6 + gcc/config/m68k/t-m68kelf | 2 +- gcc/config/m68k/t-uclinux | 2 +- gcc/config/mcore/mcore-elf.h | 31 +- gcc/config/mcore/mcore-pe.h | 32 +- gcc/config/mcore/mcore.h | 30 - gcc/config/mips/mips.c | 149 +- gcc/config/mips/mips.h | 3 +- gcc/config/mips/vxworks.h | 9 - gcc/config/mmix/mmix.c | 6 +- gcc/config/ms1/crti.asm | 71 - gcc/config/ms1/crtn.asm | 56 - gcc/config/ms1/ms1-protos.h | 65 - gcc/config/ms1/ms1.c | 1980 - gcc/config/ms1/ms1.h | 873 - gcc/config/ms1/ms1.md | 1466 - gcc/config/ms1/ms1.opt | 60 - gcc/config/ms1/t-ms1 | 70 - gcc/config/{ms1 => mt}/ABI.txt | 0 gcc/config/mt/crti.asm | 71 + gcc/config/mt/crtn.asm | 56 + gcc/config/{ms1 => mt}/lib2extra-funcs.c | 0 gcc/config/mt/mt-protos.h | 66 + gcc/config/mt/mt.c | 2487 ++ gcc/config/mt/mt.h | 869 + gcc/config/mt/mt.md | 1501 + gcc/config/mt/mt.opt | 56 + gcc/config/mt/t-mt | 73 + gcc/config/pa/pa-64.h | 4 - gcc/config/pa/pa-protos.h | 9 - gcc/config/pa/pa.c | 310 +- gcc/config/pa/pa.h | 93 +- gcc/config/pa/pa.md | 232 +- gcc/config/pa/predicates.md | 3 +- gcc/config/pa/quadlib.c | 31 +- gcc/config/pa/som.h | 26 +- gcc/config/rs6000/darwin.h | 1 - gcc/config/rs6000/host-darwin.c | 4 + gcc/config/rs6000/linux64.h | 6 + gcc/config/rs6000/ppc64-fp.c | 51 + gcc/config/rs6000/predicates.md | 66 +- gcc/config/rs6000/rs6000-c.c | 8 +- gcc/config/rs6000/rs6000-protos.h | 19 +- gcc/config/rs6000/rs6000.c | 656 +- gcc/config/rs6000/rs6000.h | 13 +- gcc/config/rs6000/rs6000.md | 4 +- gcc/config/rs6000/sync.md | 46 + gcc/config/rs6000/sysv4.h | 132 +- gcc/config/rs6000/xcoff.h | 101 +- gcc/config/s390/predicates.md | 73 +- gcc/config/s390/s390-protos.h | 4 + gcc/config/s390/s390.c | 376 +- gcc/config/s390/s390.md | 639 +- gcc/config/sh/predicates.md | 163 +- gcc/config/sh/sh-protos.h | 4 + gcc/config/sh/sh.c | 258 +- gcc/config/sh/sh.h | 41 +- gcc/config/sh/sh.md | 126 +- gcc/config/sol2-c.c | 32 +- gcc/config/sparc/predicates.md | 6 + gcc/config/sparc/sparc-protos.h | 3 +- gcc/config/sparc/sparc.c | 126 +- gcc/config/sparc/sparc.h | 5 + gcc/config/sparc/sparc.md | 72 +- gcc/config/sparc/sync.md | 208 + gcc/config/stormy16/stormy16-protos.h | 1 - gcc/config/stormy16/stormy16.c | 88 +- gcc/config/stormy16/stormy16.h | 23 +- gcc/config/svr3.h | 32 +- gcc/config/t-darwin | 5 +- gcc/config/t-slibgcc-darwin | 2 +- gcc/config/v850/v850-c.c | 22 +- gcc/config/v850/v850-protos.h | 7 - gcc/config/v850/v850.c | 70 +- gcc/config/v850/v850.h | 92 +- gcc/config/vax/vaxv.h | 2 +- gcc/config/vx-common.h | 11 - gcc/config/xtensa/ieee754-df.S | 2365 ++ gcc/config/xtensa/ieee754-sf.S | 1734 + gcc/config/xtensa/lib1funcs.asm | 5 +- gcc/config/xtensa/t-xtensa | 21 +- gcc/config/xtensa/xtensa.c | 84 +- gcc/config/xtensa/xtensa.h | 2 +- gcc/configure | 397 +- gcc/configure.ac | 38 +- gcc/convert.c | 54 +- gcc/coretypes.h | 2 + gcc/cp/ChangeLog | 427 + gcc/cp/Make-lang.in | 13 +- gcc/cp/call.c | 54 +- gcc/cp/class.c | 47 +- gcc/cp/cp-gimplify.c | 8 +- gcc/cp/cp-objcp-common.c | 4 +- gcc/cp/cp-tree.h | 15 +- gcc/cp/cxx-pretty-print.c | 30 +- gcc/cp/decl.c | 202 +- gcc/cp/decl2.c | 19 +- gcc/cp/error.c | 11 +- gcc/cp/expr.c | 2 +- gcc/cp/friend.c | 2 +- gcc/cp/g++spec.c | 2 +- gcc/cp/init.c | 144 +- gcc/cp/lex.c | 10 +- gcc/cp/mangle.c | 28 +- gcc/cp/method.c | 6 +- gcc/cp/name-lookup.c | 30 +- gcc/cp/parser.c | 730 +- gcc/cp/pt.c | 109 +- gcc/cp/ptree.c | 9 +- gcc/cp/repo.c | 8 +- gcc/cp/semantics.c | 11 +- gcc/cp/tree.c | 14 +- gcc/cp/typeck.c | 169 +- gcc/cp/typeck2.c | 15 +- gcc/cse.c | 22 +- gcc/cselib.c | 23 +- gcc/dbxout.c | 12 +- gcc/ddg.c | 37 +- gcc/defaults.h | 28 + gcc/df-core.c | 1164 + gcc/df-problems.c | 3093 ++ gcc/df-scan.c | 1795 + gcc/df.c | 3975 -- gcc/df.h | 949 +- gcc/dfp.c | 725 + gcc/dfp.h | 47 + gcc/doc/c-tree.texi | 17 - gcc/doc/extend.texi | 95 +- gcc/doc/gty.texi | 8 - gcc/doc/hostconfig.texi | 5 - gcc/doc/install.texi | 18 +- gcc/doc/invoke.texi | 68 +- gcc/doc/libgcc.texi | 49 +- gcc/doc/md.texi | 19 +- gcc/doc/objc.texi | 4 + gcc/doc/rtl.texi | 30 +- gcc/doc/sourcebuild.texi | 3 - gcc/doc/tm.texi | 359 +- gcc/dominance.c | 89 +- gcc/dwarf2out.c | 288 +- gcc/emit-rtl.c | 29 +- gcc/except.c | 107 +- gcc/except.h | 4 + gcc/expmed.c | 75 +- gcc/expr.c | 67 +- gcc/final.c | 55 +- gcc/flow.c | 280 +- gcc/fold-const.c | 544 +- gcc/fortran/ChangeLog | 8881 +---- gcc/fortran/ChangeLog-2002 | 333 + gcc/fortran/ChangeLog-2003 | 2339 ++ gcc/fortran/ChangeLog-2004 | 2846 ++ gcc/fortran/ChangeLog-2005 | 3723 ++ gcc/fortran/Make-lang.in | 17 +- gcc/fortran/check.c | 36 +- gcc/fortran/decl.c | 45 +- gcc/fortran/dependency.c | 132 +- gcc/fortran/dependency.h | 4 +- gcc/fortran/dump-parse-tree.c | 10 + gcc/fortran/expr.c | 108 +- gcc/fortran/f95-lang.c | 7 +- gcc/fortran/gfortran.h | 67 +- gcc/fortran/gfortran.texi | 37 + gcc/fortran/interface.c | 53 +- gcc/fortran/invoke.texi | 15 + gcc/fortran/io.c | 374 +- gcc/fortran/ioparm.def | 2 + gcc/fortran/iresolve.c | 62 +- gcc/fortran/lang.opt | 12 +- gcc/fortran/match.c | 90 +- gcc/fortran/match.h | 4 +- gcc/fortran/options.c | 31 +- gcc/fortran/parse.c | 35 +- gcc/fortran/primary.c | 92 +- gcc/fortran/resolve.c | 351 +- gcc/fortran/scanner.c | 34 +- gcc/fortran/simplify.c | 31 +- gcc/fortran/symbol.c | 39 +- gcc/fortran/trans-array.c | 171 +- gcc/fortran/trans-array.h | 11 +- gcc/fortran/trans-decl.c | 38 +- gcc/fortran/trans-expr.c | 152 +- gcc/fortran/trans-intrinsic.c | 98 +- gcc/fortran/trans-io.c | 110 +- gcc/fortran/trans-stmt.c | 133 +- gcc/fortran/trans-types.c | 80 +- gcc/fortran/trans.c | 41 +- gcc/fortran/trans.h | 13 +- gcc/function.c | 64 +- gcc/gcc.c | 709 +- gcc/gcse.c | 56 +- gcc/gengtype.c | 2 +- gcc/genmodes.c | 65 +- gcc/genopinit.c | 4 +- gcc/genpreds.c | 2 +- gcc/gensupport.c | 4 +- gcc/ggc.h | 1 + gcc/gimple-low.c | 83 +- gcc/gimplify.c | 120 +- gcc/ginclude/decfloat.h | 108 + gcc/global.c | 11 +- gcc/gthr-dce.h | 2 +- gcc/gthr-posix.h | 2 +- gcc/gthr-posix95.h | 2 +- gcc/gthr-solaris.h | 2 +- gcc/gthr-tpf.h | 2 +- gcc/ifcvt.c | 316 +- gcc/ipa-inline.c | 36 +- gcc/ipa-reference.c | 12 +- gcc/ipa-type-escape.c | 11 +- gcc/java/ChangeLog | 94 + gcc/java/ChangeLog.tree-ssa | 34 +- gcc/java/Make-lang.in | 13 +- gcc/java/builtins.c | 26 +- gcc/java/class.c | 9 +- gcc/java/decl.c | 15 + gcc/java/expr.c | 32 +- gcc/java/gcj.texi | 66 +- gcc/java/java-gimplify.c | 4 +- gcc/java/java-tree.h | 6 + gcc/java/jcf-parse.c | 8 +- gcc/java/jcf-write.c | 12 +- gcc/java/mangle.c | 8 + gcc/java/parse.y | 22 +- gcc/lambda-code.c | 177 +- gcc/lambda.h | 2 +- gcc/langhooks.h | 2 +- gcc/lcm.c | 20 +- gcc/libgcc2.c | 214 +- gcc/libgcc2.h | 38 + gcc/libgcov.c | 8 +- gcc/longlong.h | 9 +- gcc/loop-doloop.c | 16 +- gcc/loop-invariant.c | 595 +- gcc/loop-unswitch.c | 7 +- gcc/loop.c | 11 + gcc/machmode.def | 9 + gcc/machmode.h | 15 +- gcc/mklibgcc.in | 122 +- gcc/mode-classes.def | 1 + gcc/modulo-sched.c | 15 +- gcc/objc/ChangeLog | 35 +- gcc/objc/Make-lang.in | 10 +- gcc/objc/objc-act.c | 47 +- gcc/objcp/ChangeLog | 12 + gcc/objcp/Make-lang.in | 11 +- gcc/optabs.c | 149 +- gcc/opts.c | 21 +- gcc/output.h | 206 +- gcc/params.def | 11 +- gcc/params.h | 2 + gcc/passes.c | 12 +- gcc/po/ChangeLog | 25 + gcc/po/be.po | 30210 +++++++++------ gcc/po/ca.po | 36216 +++++++++++------- gcc/po/da.po | 36996 ++++++++++-------- gcc/po/de.po | 31338 ++++++++++------ gcc/po/el.po | 31884 +++++++++------- gcc/po/es.po | 30661 +++++++++------ gcc/po/fr.po | 37412 +++++++++++-------- gcc/po/ja.po | 35741 +++++++++++------- gcc/po/nl.po | 33471 ++++++++++------- gcc/po/rw.po | 37093 ++++++++++-------- gcc/po/sv.po | 36409 +++++++++++------- gcc/po/tr.po | 33462 ++++++++++------- gcc/po/zh_CN.po | 34646 ++++++++++------- gcc/postreload-gcse.c | 16 +- gcc/predict.c | 56 +- gcc/prefix.c | 4 +- gcc/print-tree.c | 146 +- gcc/profile.c | 14 +- gcc/real.c | 225 +- gcc/real.h | 37 +- gcc/recog.c | 16 +- gcc/recog.h | 3 +- gcc/regclass.c | 98 +- gcc/regrename.c | 58 +- gcc/reload.c | 261 +- gcc/reload.h | 17 +- gcc/reload1.c | 266 +- gcc/reorg.c | 60 +- gcc/rtl.h | 5 - gcc/rtlanal.c | 7 +- gcc/rtlhooks.c | 7 +- gcc/sched-deps.c | 5 +- gcc/sched-ebb.c | 2 +- gcc/sched-rgn.c | 14 +- gcc/sdbout.c | 2 +- gcc/simplify-rtx.c | 678 +- gcc/stmt.c | 8 +- gcc/stor-layout.c | 17 +- gcc/struct-equiv.c | 1351 + gcc/sync-builtins.def | 253 + gcc/system.h | 5 +- gcc/target-def.h | 35 +- gcc/target.h | 74 +- gcc/targhooks.c | 110 + gcc/targhooks.h | 7 +- gcc/testsuite/ChangeLog | 2347 +- gcc/testsuite/g++.dg/abi/mangle24.C | 3 +- gcc/testsuite/g++.dg/abi/mangle25.C | 3 +- gcc/testsuite/g++.dg/abi/thunk3.C | 21 + gcc/testsuite/g++.dg/abi/thunk4.C | 23 + gcc/testsuite/g++.dg/compat/struct-layout-1.exp | 161 + gcc/testsuite/g++.dg/compat/struct-layout-1.h | 497 + .../g++.dg/compat/struct-layout-1_generate.c | 1620 + gcc/testsuite/g++.dg/compat/struct-layout-1_x1.h | 68 + gcc/testsuite/g++.dg/compat/struct-layout-1_x2.h | 14 + gcc/testsuite/g++.dg/compat/struct-layout-1_y1.h | 76 + gcc/testsuite/g++.dg/compat/struct-layout-1_y2.h | 69 + gcc/testsuite/g++.dg/debug/debug9.C | 26 + gcc/testsuite/g++.dg/debug/dwarf2-1.C | 22 + gcc/testsuite/g++.dg/eh/simd-1.C | 3 +- gcc/testsuite/g++.dg/eh/simd-2.C | 3 +- gcc/testsuite/g++.dg/ext/complit4.C | 10 + gcc/testsuite/g++.dg/ext/complit5.C | 12 + gcc/testsuite/g++.dg/ext/packed3.C | 2 +- gcc/testsuite/g++.dg/ext/packed8.C | 2 +- gcc/testsuite/g++.dg/ext/typeof10.C | 11 + gcc/testsuite/g++.dg/ext/vector2.C | 3 +- gcc/testsuite/g++.dg/inherit/thunk5.C | 22 + gcc/testsuite/g++.dg/init/array0.C | 12 + gcc/testsuite/g++.dg/lookup/friend9.C | 23 + gcc/testsuite/g++.dg/lookup/using12.C | 2 +- gcc/testsuite/g++.dg/opt/complex5.C | 16 + gcc/testsuite/g++.dg/opt/init1.C | 4 + gcc/testsuite/g++.dg/opt/inline10.C | 20 + gcc/testsuite/g++.dg/opt/inline9.C | 2 +- gcc/testsuite/g++.dg/opt/life1.C | 4 +- gcc/testsuite/g++.dg/opt/longbranch2.C | 3 +- gcc/testsuite/g++.dg/opt/mmx1.C | 3 +- gcc/testsuite/g++.dg/opt/pr19317-1.C | 39 + gcc/testsuite/g++.dg/opt/pr19317-2.C | 32 + gcc/testsuite/g++.dg/opt/pr19317-3.C | 37 + gcc/testsuite/g++.dg/opt/pr25005.C | 34 + gcc/testsuite/g++.dg/opt/pr7503-3.C | 8 +- gcc/testsuite/g++.dg/opt/range-test-1.C | 4 + gcc/testsuite/g++.dg/opt/reg-stack4.C | 3 +- gcc/testsuite/g++.dg/other/array2.C | 6 + gcc/testsuite/g++.dg/other/crash-4.C | 2 +- gcc/testsuite/g++.dg/other/default1.C | 22 + gcc/testsuite/g++.dg/other/friend4.C | 8 + gcc/testsuite/g++.dg/other/i386-1.C | 3 +- gcc/testsuite/g++.dg/other/i386-2.C | 12 + gcc/testsuite/g++.dg/other/packed1.C | 6 +- gcc/testsuite/g++.dg/other/pr25632.C | 17 + gcc/testsuite/g++.dg/other/void1.C | 16 + gcc/testsuite/g++.dg/parse/access9.C | 5 + gcc/testsuite/g++.dg/parse/comma2.C | 19 + gcc/testsuite/g++.dg/parse/crash17.C | 2 +- gcc/testsuite/g++.dg/parse/ctor3.C | 8 + gcc/testsuite/g++.dg/parse/dtor6.C | 8 + gcc/testsuite/g++.dg/parse/error25.C | 5 +- gcc/testsuite/g++.dg/parse/error29.C | 12 + gcc/testsuite/g++.dg/parse/operator6.C | 5 + gcc/testsuite/g++.dg/parse/pragma2.C | 4 +- gcc/testsuite/g++.dg/parse/pragma3.C | 26 + gcc/testsuite/g++.dg/rtti/repo1.C | 2 + gcc/testsuite/g++.dg/rtti/tinfo1.C | 2 +- gcc/testsuite/g++.dg/tc1/dr52.C | 4 +- gcc/testsuite/g++.dg/template/call4.C | 21 + gcc/testsuite/g++.dg/template/class3.C | 2 + gcc/testsuite/g++.dg/template/ctor5.C | 8 + gcc/testsuite/g++.dg/template/ctor6.C | 11 + gcc/testsuite/g++.dg/template/defarg7.C | 7 + gcc/testsuite/g++.dg/template/dtor3.C | 2 +- gcc/testsuite/g++.dg/template/error20.C | 4 + gcc/testsuite/g++.dg/template/friend40.C | 16 + gcc/testsuite/g++.dg/template/inherit.C | 2 +- gcc/testsuite/g++.dg/template/overload8.C | 7 + gcc/testsuite/g++.dg/template/ptrmem16.C | 20 + gcc/testsuite/g++.dg/template/repo5.C | 11 + gcc/testsuite/g++.dg/template/sfinae3.C | 17 + gcc/testsuite/g++.dg/template/typedef3.C | 7 + gcc/testsuite/g++.dg/tls/diag-1.C | 3 +- gcc/testsuite/g++.dg/tls/diag-2.C | 1 + gcc/testsuite/g++.dg/tls/diag-3.C | 1 + gcc/testsuite/g++.dg/tls/diag-4.C | 1 + gcc/testsuite/g++.dg/tls/init-1.C | 1 + gcc/testsuite/g++.dg/tls/init-2.C | 1 + gcc/testsuite/g++.dg/tls/static-1.C | 1 + gcc/testsuite/g++.dg/tls/static-1a.cc | 1 + gcc/testsuite/g++.dg/tls/tls.exp | 12 +- gcc/testsuite/g++.dg/tls/trivial.C | 2 + .../g++.dg/tree-ssa/pointer-reference-alias.C | 6 +- gcc/testsuite/g++.dg/tree-ssa/pr14814.C | 2 +- gcc/testsuite/g++.dg/tree-ssa/pr23948.C | 19 + gcc/testsuite/g++.dg/tree-ssa/pr25771.C | 33 + gcc/testsuite/g++.dg/tree-ssa/ssa-cast-1.C | 6 +- gcc/testsuite/g++.dg/tree-ssa/ssa-sra-1.C | 6 +- gcc/testsuite/g++.dg/tree-ssa/ssa-sra-2.C | 6 +- gcc/testsuite/g++.dg/warn/Wchar-subscripts.C | 12 + gcc/testsuite/g++.dg/warn/Wstrict-aliasing-1.C | 9 + gcc/testsuite/g++.dg/warn/Wstrict-aliasing-2.C | 13 + gcc/testsuite/g++.dg/warn/Wstrict-aliasing-3.C | 14 + gcc/testsuite/g++.dg/warn/Wstrict-aliasing-4.C | 13 + gcc/testsuite/g++.dg/warn/Wstrict-aliasing-5.C | 9 + gcc/testsuite/g++.dg/warn/Wstrict-aliasing-6.C | 9 + gcc/testsuite/g++.dg/warn/Wstrict-aliasing-7.C | 20 + .../g++.dg/warn/Wstring-literal-comparison-1.C | 29 + .../g++.dg/warn/Wstring-literal-comparison-2.C | 29 + .../g++.dg/warn/Wstring-literal-comparison-3.C | 29 + .../g++.dg/warn/Wstring-literal-comparison-4.C | 29 + gcc/testsuite/g++.dg/warn/Wunreachable-code-2.C | 23 + gcc/testsuite/g++.old-deja/g++.abi/aggregates.C | 3 +- gcc/testsuite/g++.old-deja/g++.abi/align.C | 3 +- gcc/testsuite/g++.old-deja/g++.abi/bitfields.C | 3 +- gcc/testsuite/g++.old-deja/g++.abi/vtable2.C | 4 +- gcc/testsuite/g++.old-deja/g++.brendan/redecl1.C | 2 +- gcc/testsuite/g++.old-deja/g++.eh/inline1.C | 2 +- gcc/testsuite/g++.old-deja/g++.eh/tmpl2.C | 2 +- gcc/testsuite/g++.old-deja/g++.law/pr25000.C | 24 + gcc/testsuite/g++.old-deja/g++.law/profile1.C | 3 +- gcc/testsuite/g++.old-deja/g++.law/weak.C | 2 +- gcc/testsuite/g++.old-deja/g++.mike/warn8.C | 1 + gcc/testsuite/g++.old-deja/g++.ns/crash2.C | 2 +- gcc/testsuite/g++.old-deja/g++.ns/template7.C | 2 +- gcc/testsuite/g++.old-deja/g++.oliva/ns3.C | 2 +- gcc/testsuite/g++.old-deja/g++.oliva/stkalign.C | 2 +- gcc/testsuite/g++.old-deja/g++.oliva/typeof1.C | 2 +- .../g++.old-deja/g++.other/comdat5-aux.cc | 1 + gcc/testsuite/g++.old-deja/g++.other/comdat5.C | 6 + gcc/testsuite/g++.old-deja/g++.other/crash16.C | 2 +- gcc/testsuite/g++.old-deja/g++.other/crash34.C | 2 +- gcc/testsuite/g++.old-deja/g++.other/lookup5.C | 2 +- gcc/testsuite/g++.old-deja/g++.pt/asm1.C | 2 +- gcc/testsuite/g++.old-deja/g++.pt/asm2.C | 5 +- gcc/testsuite/g++.old-deja/g++.pt/crash65.C | 2 +- gcc/testsuite/g++.old-deja/g++.pt/decl2.C | 2 +- gcc/testsuite/g++.old-deja/g++.pt/explicit76.C | 2 +- gcc/testsuite/g++.old-deja/g++.pt/memtemp85.C | 2 +- gcc/testsuite/g++.old-deja/g++.pt/memtemp86.C | 2 +- gcc/testsuite/g++.old-deja/g++.pt/memtemp87.C | 2 +- gcc/testsuite/g++.old-deja/g++.pt/memtemp88.C | 2 +- gcc/testsuite/g++.old-deja/g++.pt/memtemp91.C | 2 +- gcc/testsuite/g++.old-deja/g++.pt/spec14.C | 2 +- gcc/testsuite/g++.old-deja/g++.pt/static10.C | 2 +- gcc/testsuite/gcc.c-torture/compile/20000804-1.c | 1 + gcc/testsuite/gcc.c-torture/compile/20051207-1.c | 7 + gcc/testsuite/gcc.c-torture/compile/20051216-1.c | 131 + gcc/testsuite/gcc.c-torture/compile/20051228-1.c | 10 + gcc/testsuite/gcc.c-torture/compile/20060109-1.c | 36 + gcc/testsuite/gcc.c-torture/compile/920415-1.c | 3 + gcc/testsuite/gcc.c-torture/compile/pr24930.c | 17 + gcc/testsuite/gcc.c-torture/compile/pr25224.c | 20 + gcc/testsuite/gcc.c-torture/compile/pr25310.c | 22 + gcc/testsuite/gcc.c-torture/compile/pr25311.c | 47 + gcc/testsuite/gcc.c-torture/compile/pr25483.c | 15 + gcc/testsuite/gcc.c-torture/compile/pr25513.c | 9 + gcc/testsuite/gcc.c-torture/execute/20051215-1.c | 28 + gcc/testsuite/gcc.c-torture/execute/20060102-1.c | 16 + gcc/testsuite/gcc.c-torture/execute/20060110-1.c | 16 + gcc/testsuite/gcc.c-torture/execute/20060110-2.c | 19 + gcc/testsuite/gcc.c-torture/execute/990413-2.x | 4 +- .../gcc.c-torture/execute/builtins/fprintf.c | 9 + .../gcc.c-torture/execute/builtins/fputs-lib.c | 6 + .../gcc.c-torture/execute/builtins/fputs.c | 4 + .../gcc.c-torture/execute/builtins/lib/fprintf.c | 16 + .../gcc.c-torture/execute/builtins/lib/printf.c | 16 + .../gcc.c-torture/execute/builtins/printf.c | 11 + .../gcc.c-torture/execute/builtins/strlen-3.c | 6 +- gcc/testsuite/gcc.c-torture/execute/pr19005.c | 38 + gcc/testsuite/gcc.c-torture/execute/pr25125.c | 27 + gcc/testsuite/gcc.dg/20000724-1.c | 3 +- gcc/testsuite/gcc.dg/20020103-1.c | 2 +- gcc/testsuite/gcc.dg/20020108-1.c | 3 +- gcc/testsuite/gcc.dg/20020122-2.c | 3 +- gcc/testsuite/gcc.dg/20020122-3.c | 3 +- gcc/testsuite/gcc.dg/20020206-1.c | 3 +- gcc/testsuite/gcc.dg/20020310-1.c | 3 +- gcc/testsuite/gcc.dg/20020411-1.c | 3 +- gcc/testsuite/gcc.dg/20020418-1.c | 2 +- gcc/testsuite/gcc.dg/20020418-2.c | 3 +- gcc/testsuite/gcc.dg/20020426-2.c | 3 +- gcc/testsuite/gcc.dg/20020517-1.c | 3 +- gcc/testsuite/gcc.dg/20020919-1.c | 8 +- gcc/testsuite/gcc.dg/20021014-1.c | 1 - gcc/testsuite/gcc.dg/20030204-1.c | 3 +- gcc/testsuite/gcc.dg/20030321-1.c | 2 +- gcc/testsuite/gcc.dg/20030826-2.c | 3 +- gcc/testsuite/gcc.dg/20031012-1.c | 1 + gcc/testsuite/gcc.dg/20031102-1.c | 2 +- gcc/testsuite/gcc.dg/20031202-1.c | 3 +- gcc/testsuite/gcc.dg/20040625-1.c | 2 +- gcc/testsuite/gcc.dg/20040813-1.c | 2 +- gcc/testsuite/gcc.dg/20041106-1.c | 2 +- gcc/testsuite/gcc.dg/20050330-2.c | 23 + gcc/testsuite/gcc.dg/20050503-1.c | 1 + gcc/testsuite/gcc.dg/20050922-2.c | 33 + gcc/testsuite/gcc.dg/20051201-1.c | 26 + gcc/testsuite/gcc.dg/20051207-1.c | 5 + gcc/testsuite/gcc.dg/20051207-2.c | 5 + gcc/testsuite/gcc.dg/20051207-3.c | 7 + gcc/testsuite/gcc.dg/20051215-1.c | 36 + gcc/testsuite/gcc.dg/980523-1.c | 2 +- gcc/testsuite/gcc.dg/980526-1.c | 2 +- gcc/testsuite/gcc.dg/Wchar-subscripts.c | 12 + gcc/testsuite/gcc.dg/Wpadded.c | 6 +- .../gcc.dg/Wstring-literal-comparison-1.c | 29 + .../gcc.dg/Wstring-literal-comparison-2.c | 29 + .../gcc.dg/Wstring-literal-comparison-3.c | 29 + .../gcc.dg/Wstring-literal-comparison-4.c | 29 + gcc/testsuite/gcc.dg/alias-9.c | 20 + gcc/testsuite/gcc.dg/asm-b.c | 2 +- gcc/testsuite/gcc.dg/attr-weakref-1-darwin.c | 223 + gcc/testsuite/gcc.dg/attr-weakref-1.c | 105 +- gcc/testsuite/gcc.dg/attr-weakref-1b.c | 20 + gcc/testsuite/gcc.dg/attr-weakref-2.c | 7 + gcc/testsuite/gcc.dg/builtins-20.c | 18 + gcc/testsuite/gcc.dg/c90-const-expr-4.c | 11 + gcc/testsuite/gcc.dg/c90-const-expr-5.c | 39 + gcc/testsuite/gcc.dg/c99-const-expr-4.c | 11 + gcc/testsuite/gcc.dg/c99-const-expr-5.c | 39 + gcc/testsuite/gcc.dg/cast-1.c | 2 +- gcc/testsuite/gcc.dg/cast-2.c | 2 +- gcc/testsuite/gcc.dg/cast-3.c | 2 +- gcc/testsuite/gcc.dg/cast-4.c | 13 + gcc/testsuite/gcc.dg/cast-pretty-print-1.c | 12 + gcc/testsuite/gcc.dg/charset/builtin2.c | 32 + gcc/testsuite/gcc.dg/compat/compat.exp | 51 +- .../gcc.dg/compat/scalar-by-value-dfp_main.c | 15 + .../gcc.dg/compat/scalar-by-value-dfp_x.c | 170 + .../gcc.dg/compat/scalar-by-value-dfp_y.c | 89 + .../gcc.dg/compat/scalar-return-dfp_main.c | 15 + gcc/testsuite/gcc.dg/compat/scalar-return-dfp_x.c | 109 + gcc/testsuite/gcc.dg/compat/scalar-return-dfp_y.c | 67 + gcc/testsuite/gcc.dg/compat/struct-layout-1.exp | 58 +- gcc/testsuite/gcc.dg/compat/struct-layout-1.h | 54 + .../gcc.dg/compat/struct-layout-1_generate.c | 150 +- gcc/testsuite/gcc.dg/darwin-weakimport-3.c | 10 + gcc/testsuite/gcc.dg/darwin-weakref-1.c | 28 + gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-dfp.c | 16 + gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-float.c | 15 + gcc/testsuite/gcc.dg/dfp/Wbad-function-cast-1.c | 44 + gcc/testsuite/gcc.dg/dfp/Wconversion-2.c | 44 + gcc/testsuite/gcc.dg/dfp/altivec-types.c | 9 + gcc/testsuite/gcc.dg/dfp/call-by-value.c | 46 + gcc/testsuite/gcc.dg/dfp/cast-bad.c | 41 + gcc/testsuite/gcc.dg/dfp/cast.c | 78 + gcc/testsuite/gcc.dg/dfp/compare-eq-const.c | 29 + gcc/testsuite/gcc.dg/dfp/compare-eq-d128.c | 14 + gcc/testsuite/gcc.dg/dfp/compare-eq-d32.c | 14 + gcc/testsuite/gcc.dg/dfp/compare-eq-d64.c | 14 + gcc/testsuite/gcc.dg/dfp/compare-eq-dfp.c | 66 + gcc/testsuite/gcc.dg/dfp/compare-eq.h | 96 + gcc/testsuite/gcc.dg/dfp/compare-rel-const.c | 60 + gcc/testsuite/gcc.dg/dfp/compare-rel-d128.c | 15 + gcc/testsuite/gcc.dg/dfp/compare-rel-d32.c | 15 + gcc/testsuite/gcc.dg/dfp/compare-rel-d64.c | 15 + gcc/testsuite/gcc.dg/dfp/compare-rel-dfp.c | 66 + gcc/testsuite/gcc.dg/dfp/compare-rel.h | 136 + gcc/testsuite/gcc.dg/dfp/composite-type.c | 46 + gcc/testsuite/gcc.dg/dfp/constants-c99.c | 12 + gcc/testsuite/gcc.dg/dfp/constants-hex.c | 15 + gcc/testsuite/gcc.dg/dfp/constants-pedantic.c | 12 + gcc/testsuite/gcc.dg/dfp/constants.c | 12 + gcc/testsuite/gcc.dg/dfp/convert-bfp-fold.c | 118 + gcc/testsuite/gcc.dg/dfp/convert-bfp.c | 118 + gcc/testsuite/gcc.dg/dfp/convert-complex.c | 129 + gcc/testsuite/gcc.dg/dfp/convert-dfp-fold.c | 46 + gcc/testsuite/gcc.dg/dfp/convert-dfp-round.c | 137 + gcc/testsuite/gcc.dg/dfp/convert-dfp.c | 92 + gcc/testsuite/gcc.dg/dfp/convert-int-fold.c | 166 + gcc/testsuite/gcc.dg/dfp/convert-int-saturate.c | 64 + gcc/testsuite/gcc.dg/dfp/convert-int.c | 194 + gcc/testsuite/gcc.dg/dfp/ctypes.c | 53 + gcc/testsuite/gcc.dg/dfp/dec-eval-method.c | 13 + gcc/testsuite/gcc.dg/dfp/decfloat-constants.c | 46 + gcc/testsuite/gcc.dg/dfp/dfp-round.h | 14 + gcc/testsuite/gcc.dg/dfp/dfp.exp | 41 + gcc/testsuite/gcc.dg/dfp/func-array.c | 160 + gcc/testsuite/gcc.dg/dfp/func-mixed.c | 175 + gcc/testsuite/gcc.dg/dfp/func-scalar.c | 195 + gcc/testsuite/gcc.dg/dfp/func-struct.c | 96 + gcc/testsuite/gcc.dg/dfp/func-vararg-dfp.c | 99 + gcc/testsuite/gcc.dg/dfp/func-vararg-mixed.c | 106 + gcc/testsuite/gcc.dg/dfp/func-vararg-size0.c | 45 + gcc/testsuite/gcc.dg/dfp/inf-1.c | 64 + gcc/testsuite/gcc.dg/dfp/keywords-c89.c | 8 + gcc/testsuite/gcc.dg/dfp/keywords-c99.c | 8 + gcc/testsuite/gcc.dg/dfp/keywords-ignored-c99.c | 15 + gcc/testsuite/gcc.dg/dfp/keywords-pedantic.c | 8 + gcc/testsuite/gcc.dg/dfp/keywords-reserved.c | 17 + gcc/testsuite/gcc.dg/dfp/loop-index.c | 58 + gcc/testsuite/gcc.dg/dfp/modes.c | 15 + gcc/testsuite/gcc.dg/dfp/nan-1.c | 109 + gcc/testsuite/gcc.dg/dfp/nan-2.c | 56 + gcc/testsuite/gcc.dg/dfp/operator-arith-fold.c | 44 + gcc/testsuite/gcc.dg/dfp/operator-assignment.c | 59 + gcc/testsuite/gcc.dg/dfp/operator-bitwise.c | 66 + gcc/testsuite/gcc.dg/dfp/operator-comma.c | 58 + gcc/testsuite/gcc.dg/dfp/operator-cond.c | 66 + gcc/testsuite/gcc.dg/dfp/operator-logical.c | 66 + gcc/testsuite/gcc.dg/dfp/operator-unary.c | 55 + gcc/testsuite/gcc.dg/dfp/snan.c | 29 + gcc/testsuite/gcc.dg/dfp/struct-layout-1.c | 92 + gcc/testsuite/gcc.dg/dfp/struct-union.c | 62 + gcc/testsuite/gcc.dg/dfp/typespec.c | 303 + gcc/testsuite/gcc.dg/dfp/union-init.c | 61 + gcc/testsuite/gcc.dg/dfp/usual-arith-conv-const.c | 31 + gcc/testsuite/gcc.dg/dfp/usual-arith-conv.c | 128 + gcc/testsuite/gcc.dg/dfp/wtr-conversion-1.c | 75 + gcc/testsuite/gcc.dg/format/cast-1.c | 16 + gcc/testsuite/gcc.dg/format/dfp-printf-1.c | 122 + gcc/testsuite/gcc.dg/format/dfp-scanf-1.c | 99 + gcc/testsuite/gcc.dg/ia64-sync-1.c | 4 +- gcc/testsuite/gcc.dg/ia64-sync-2.c | 4 +- gcc/testsuite/gcc.dg/ia64-sync-3.c | 4 +- gcc/testsuite/gcc.dg/ia64-sync-4.c | 4 +- gcc/testsuite/gcc.dg/ifcvt-fabs-1.c | 2 +- gcc/testsuite/gcc.dg/iftrap-1.c | 2 +- gcc/testsuite/gcc.dg/iftrap-2.c | 2 +- gcc/testsuite/gcc.dg/intmax_t-1.c | 2 +- gcc/testsuite/gcc.dg/ipa/ipa-1.c | 1 + gcc/testsuite/gcc.dg/ipa/ipa-2.c | 1 + gcc/testsuite/gcc.dg/ipa/ipa-3.c | 1 + gcc/testsuite/gcc.dg/ipa/ipa-4.c | 1 + gcc/testsuite/gcc.dg/ipa/ipa-5.c | 1 + gcc/testsuite/gcc.dg/loop-3.c | 2 +- gcc/testsuite/gcc.dg/lvalue-2.c | 12 +- gcc/testsuite/gcc.dg/lvalue1.c | 2 +- gcc/testsuite/gcc.dg/mt-loopi1.c | 13 + gcc/testsuite/gcc.dg/nest.c | 2 - gcc/testsuite/gcc.dg/nested-calls-1.c | 2 +- gcc/testsuite/gcc.dg/nodfp-1.c | 6 + gcc/testsuite/gcc.dg/pr17112-1.c | 2 +- gcc/testsuite/gcc.dg/pr17730-1.c | 2 +- gcc/testsuite/gcc.dg/pr18928-1.c | 2 +- gcc/testsuite/gcc.dg/pr19340.c | 2 +- gcc/testsuite/gcc.dg/pr20017.c | 2 +- gcc/testsuite/gcc.dg/pr21041.c | 42 + gcc/testsuite/gcc.dg/pr23518.c | 21 + gcc/testsuite/gcc.dg/pr23911.c | 2 +- gcc/testsuite/gcc.dg/pr25023.c | 12 + gcc/testsuite/gcc.dg/pr25196.c | 34 + gcc/testsuite/gcc.dg/pr25559.c | 10 + gcc/testsuite/gcc.dg/pragma-align.c | 2 +- gcc/testsuite/gcc.dg/pragma-pack-3.c | 27 + gcc/testsuite/gcc.dg/setjmp-2.c | 5 +- gcc/testsuite/gcc.dg/short-compare-1.c | 3 +- gcc/testsuite/gcc.dg/short-compare-2.c | 3 +- gcc/testsuite/gcc.dg/sibcall-6.c | 1 + gcc/testsuite/gcc.dg/simd-3.c | 2 +- gcc/testsuite/gcc.dg/single-precision-constant.c | 19 + gcc/testsuite/gcc.dg/smod-1.c | 2 +- gcc/testsuite/gcc.dg/switch-1.c | 2 +- gcc/testsuite/gcc.dg/sync-2.c | 4 +- gcc/testsuite/gcc.dg/tls/alias-1.c | 1 + gcc/testsuite/gcc.dg/tls/alpha-1.c | 1 + gcc/testsuite/gcc.dg/tls/asm-1.c | 1 + gcc/testsuite/gcc.dg/tls/debug-1.c | 1 + gcc/testsuite/gcc.dg/tls/diag-1.c | 1 + gcc/testsuite/gcc.dg/tls/diag-2.c | 1 + gcc/testsuite/gcc.dg/tls/diag-3.c | 1 + gcc/testsuite/gcc.dg/tls/diag-4.c | 1 + gcc/testsuite/gcc.dg/tls/diag-5.c | 1 + gcc/testsuite/gcc.dg/tls/init-1.c | 1 + gcc/testsuite/gcc.dg/tls/nonpic-1.c | 1 + gcc/testsuite/gcc.dg/tls/opt-1.c | 5 +- gcc/testsuite/gcc.dg/tls/opt-10.c | 1 + gcc/testsuite/gcc.dg/tls/opt-11.c | 33 + gcc/testsuite/gcc.dg/tls/opt-2.c | 4 +- gcc/testsuite/gcc.dg/tls/opt-3.c | 4 +- gcc/testsuite/gcc.dg/tls/opt-4.c | 1 + gcc/testsuite/gcc.dg/tls/opt-5.c | 1 + gcc/testsuite/gcc.dg/tls/opt-6.c | 1 + gcc/testsuite/gcc.dg/tls/opt-7.c | 1 + gcc/testsuite/gcc.dg/tls/opt-8.c | 1 + gcc/testsuite/gcc.dg/tls/opt-9.c | 1 + gcc/testsuite/gcc.dg/tls/pic-1.c | 1 + gcc/testsuite/gcc.dg/tls/pr24428-2.c | 1 + gcc/testsuite/gcc.dg/tls/pr24428.c | 1 + gcc/testsuite/gcc.dg/tls/section-1.c | 1 + gcc/testsuite/gcc.dg/tls/struct-1.c | 1 + gcc/testsuite/gcc.dg/tls/tls.exp | 12 +- gcc/testsuite/gcc.dg/tls/trivial.c | 2 + gcc/testsuite/gcc.dg/torture/badshift.c | 2 +- .../gcc.dg/torture/fp-int-convert-double.c | 18 + .../gcc.dg/torture/fp-int-convert-float.c | 18 + .../torture/fp-int-convert-float128-timode.c | 18 + .../gcc.dg/torture/fp-int-convert-float128.c | 21 + .../gcc.dg/torture/fp-int-convert-float80-timode.c | 16 + .../gcc.dg/torture/fp-int-convert-float80.c | 20 + .../gcc.dg/torture/fp-int-convert-long-double.c | 18 + .../gcc.dg/torture/fp-int-convert-timode.c | 21 + gcc/testsuite/gcc.dg/torture/fp-int-convert.h | 89 + gcc/testsuite/gcc.dg/torture/pr18582-1.c | 2 +- gcc/testsuite/gcc.dg/torture/pr20314-2.c | 2 +- gcc/testsuite/gcc.dg/torture/pr24257.c | 26 + gcc/testsuite/gcc.dg/torture/pr25183.c | 22 + gcc/testsuite/gcc.dg/torture/pr25481.c | 18 + gcc/testsuite/gcc.dg/torture/pr25706-1.c | 35 + gcc/testsuite/gcc.dg/torture/pr25718-1.c | 27 + gcc/testsuite/gcc.dg/tree-ssa/20031106-6.c | 2 +- gcc/testsuite/gcc.dg/tree-ssa/alias-10.c | 20 + gcc/testsuite/gcc.dg/tree-ssa/alias-11.c | 19 + gcc/testsuite/gcc.dg/tree-ssa/alias-12.c | 18 + gcc/testsuite/gcc.dg/tree-ssa/alias-3.c | 20 + gcc/testsuite/gcc.dg/tree-ssa/alias-4.c | 21 + gcc/testsuite/gcc.dg/tree-ssa/alias-5.c | 23 + gcc/testsuite/gcc.dg/tree-ssa/alias-6.c | 19 + gcc/testsuite/gcc.dg/tree-ssa/alias-7.c | 17 + gcc/testsuite/gcc.dg/tree-ssa/alias-8.c | 15 + gcc/testsuite/gcc.dg/tree-ssa/alias-9.c | 15 + gcc/testsuite/gcc.dg/tree-ssa/bool-1.c | 2 +- gcc/testsuite/gcc.dg/tree-ssa/bool-10.c | 14 + gcc/testsuite/gcc.dg/tree-ssa/bool-11.c | 14 + gcc/testsuite/gcc.dg/tree-ssa/bool-2.c | 2 +- gcc/testsuite/gcc.dg/tree-ssa/bool-4.c | 2 +- gcc/testsuite/gcc.dg/tree-ssa/bool-5.c | 2 +- gcc/testsuite/gcc.dg/tree-ssa/bool-6.c | 2 +- gcc/testsuite/gcc.dg/tree-ssa/bool-7.c | 5 +- gcc/testsuite/gcc.dg/tree-ssa/bool-8.c | 2 +- gcc/testsuite/gcc.dg/tree-ssa/bool-9.c | 2 +- gcc/testsuite/gcc.dg/tree-ssa/divide-1.c | 14 + gcc/testsuite/gcc.dg/tree-ssa/divide-2.c | 14 + gcc/testsuite/gcc.dg/tree-ssa/divide-3.c | 14 + gcc/testsuite/gcc.dg/tree-ssa/divide-4.c | 14 + gcc/testsuite/gcc.dg/tree-ssa/foldstring-1.c | 11 + gcc/testsuite/gcc.dg/tree-ssa/loadpre1.c | 18 + gcc/testsuite/gcc.dg/tree-ssa/loadpre2.c | 18 + gcc/testsuite/gcc.dg/tree-ssa/loadpre3.c | 24 + gcc/testsuite/gcc.dg/tree-ssa/loadpre4.c | 21 + gcc/testsuite/gcc.dg/tree-ssa/loadpre5.c | 22 + gcc/testsuite/gcc.dg/tree-ssa/loadpre6.c | 74 + gcc/testsuite/gcc.dg/tree-ssa/loadpre7.c | 17 + gcc/testsuite/gcc.dg/tree-ssa/loadpre8.c | 97 + gcc/testsuite/gcc.dg/tree-ssa/loop-1.c | 14 +- gcc/testsuite/gcc.dg/tree-ssa/loop-10.c | 8 +- gcc/testsuite/gcc.dg/tree-ssa/loop-11.c | 8 +- gcc/testsuite/gcc.dg/tree-ssa/loop-14.c | 6 +- gcc/testsuite/gcc.dg/tree-ssa/loop-15.c | 27 + gcc/testsuite/gcc.dg/tree-ssa/loop-2.c | 20 +- gcc/testsuite/gcc.dg/tree-ssa/loop-3.c | 10 +- gcc/testsuite/gcc.dg/tree-ssa/loop-4.c | 12 +- gcc/testsuite/gcc.dg/tree-ssa/loop-5.c | 10 +- gcc/testsuite/gcc.dg/tree-ssa/loop-6.c | 6 +- gcc/testsuite/gcc.dg/tree-ssa/loop-8.c | 8 +- gcc/testsuite/gcc.dg/tree-ssa/pr14841.c | 2 +- gcc/testsuite/gcc.dg/tree-ssa/pr19210-1.c | 11 +- gcc/testsuite/gcc.dg/tree-ssa/pr19210-2.c | 10 +- gcc/testsuite/gcc.dg/tree-ssa/pr21171.c | 6 +- gcc/testsuite/gcc.dg/tree-ssa/pr21985.c | 6 +- gcc/testsuite/gcc.dg/tree-ssa/pr23109.c | 34 + gcc/testsuite/gcc.dg/tree-ssa/pr23234.c | 12 +- gcc/testsuite/gcc.dg/tree-ssa/pr23294.c | 12 +- gcc/testsuite/gcc.dg/tree-ssa/pr24990-1.c | 21 + gcc/testsuite/gcc.dg/tree-ssa/pr25382.c | 19 + gcc/testsuite/gcc.dg/tree-ssa/pr25485.c | 17 + gcc/testsuite/gcc.dg/tree-ssa/pr25501.c | 36 + gcc/testsuite/gcc.dg/tree-ssa/pr25734.c | 34 + gcc/testsuite/gcc.dg/tree-ssa/reassoc-1.c | 2 +- gcc/testsuite/gcc.dg/tree-ssa/reassoc-10.c | 11 + gcc/testsuite/gcc.dg/tree-ssa/reassoc-11.c | 11 + gcc/testsuite/gcc.dg/tree-ssa/reassoc-2.c | 35 +- gcc/testsuite/gcc.dg/tree-ssa/reassoc-3.c | 24 +- gcc/testsuite/gcc.dg/tree-ssa/reassoc-4.c | 4 +- gcc/testsuite/gcc.dg/tree-ssa/reassoc-5.c | 17 + gcc/testsuite/gcc.dg/tree-ssa/reassoc-6.c | 13 + gcc/testsuite/gcc.dg/tree-ssa/reassoc-7.c | 12 + gcc/testsuite/gcc.dg/tree-ssa/reassoc-8.c | 13 + gcc/testsuite/gcc.dg/tree-ssa/reassoc-9.c | 14 + gcc/testsuite/gcc.dg/tree-ssa/recip-2.c | 7 +- gcc/testsuite/gcc.dg/tree-ssa/recip-3.c | 27 + gcc/testsuite/gcc.dg/tree-ssa/recip-4.c | 45 + gcc/testsuite/gcc.dg/tree-ssa/recip-5.c | 31 + gcc/testsuite/gcc.dg/tree-ssa/recip-6.c | 26 + gcc/testsuite/gcc.dg/tree-ssa/recip-7.c | 27 + gcc/testsuite/gcc.dg/tree-ssa/ssa-dce-2.c | 4 +- gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-8.c | 26 + gcc/testsuite/gcc.dg/tree-ssa/ssa-eustores.c | 14 - gcc/testsuite/gcc.dg/tree-ssa/ssa-pre-2.c | 5 +- gcc/testsuite/gcc.dg/tree-ssa/stdarg-2.c | 75 +- gcc/testsuite/gcc.dg/tree-ssa/stdarg-3.c | 55 +- gcc/testsuite/gcc.dg/tree-ssa/stdarg-4.c | 20 +- gcc/testsuite/gcc.dg/tree-ssa/stdarg-5.c | 14 +- gcc/testsuite/gcc.dg/unroll-1.c | 3 +- gcc/testsuite/gcc.dg/vect/vect-62.c | 1 - gcc/testsuite/gcc.dg/vect/vect-7.c | 2 +- gcc/testsuite/gcc.dg/vect/vect-76.c | 3 +- gcc/testsuite/gcc.dg/vect/vect-reduc-1char.c | 2 +- gcc/testsuite/gcc.dg/vect/vect-reduc-1short.c | 2 +- gcc/testsuite/gcc.dg/vect/vect-reduc-2char.c | 2 +- gcc/testsuite/gcc.dg/vect/vect-reduc-2short.c | 2 +- gcc/testsuite/gcc.dg/warn-addr-cmp.c | 79 + gcc/testsuite/gcc.dg/weak/typeof-2.c | 2 + gcc/testsuite/gcc.dg/weak/weak-14.c | 1 + gcc/testsuite/gcc.dg/weak/weak-3.c | 2 +- gcc/testsuite/gcc.misc-tests/dectest.exp | 531 + gcc/testsuite/gcc.misc-tests/linkage.exp | 4 +- gcc/testsuite/gcc.target/i386/20020523-1.c | 1 + gcc/testsuite/gcc.target/i386/20030926-1.c | 3 +- gcc/testsuite/gcc.target/i386/387-9.c | 36 + gcc/testsuite/gcc.target/i386/amd64-abi-1.c | 3 +- gcc/testsuite/gcc.target/i386/asm-3.c | 1 + gcc/testsuite/gcc.target/i386/attributes-error.c | 3 +- gcc/testsuite/gcc.target/i386/clobbers.c | 1 + gcc/testsuite/gcc.target/i386/cmov1.c | 14 +- gcc/testsuite/gcc.target/i386/cmov6.c | 22 + gcc/testsuite/gcc.target/i386/local2.c | 1 + gcc/testsuite/gcc.target/i386/movq-2.c | 26 + gcc/testsuite/gcc.target/i386/movq.c | 4 +- gcc/testsuite/gcc.target/i386/mul.c | 4 +- gcc/testsuite/gcc.target/i386/pr23943.c | 2 +- gcc/testsuite/gcc.target/i386/pr24306.c | 32 + gcc/testsuite/gcc.target/i386/pr25254.c | 11 + gcc/testsuite/gcc.target/i386/pr25293.c | 51 + gcc/testsuite/gcc.target/i386/sse-17.c | 30 + gcc/testsuite/gcc.target/i386/sse-7.c | 2 +- gcc/testsuite/gcc.target/i386/ssetype-1.c | 2 +- gcc/testsuite/gcc.target/i386/ssetype-3.c | 2 +- gcc/testsuite/gcc.target/i386/ssetype-5.c | 2 +- gcc/testsuite/gcc.target/i386/tailcall-1.c | 1 + gcc/testsuite/gcc.target/powerpc/20040622-1.c | 2 +- gcc/testsuite/gcc.target/powerpc/20050603-3.c | 2 +- gcc/testsuite/gcc.target/powerpc/20050830-1.c | 2 +- gcc/testsuite/gcc.target/powerpc/980827-1.c | 2 +- gcc/testsuite/gcc.target/powerpc/altivec-14.c | 2 +- gcc/testsuite/gcc.target/powerpc/altivec-22.c | 2 +- gcc/testsuite/gcc.target/powerpc/altivec-6.c | 2 +- gcc/testsuite/gcc.target/powerpc/darwin-abi-10.c | 26 + gcc/testsuite/gcc.target/powerpc/darwin-abi-11.c | 32 + gcc/testsuite/gcc.target/powerpc/darwin-abi-3.c | 11 + gcc/testsuite/gcc.target/powerpc/darwin-abi-4.c | 10 + gcc/testsuite/gcc.target/powerpc/darwin-abi-5.c | 30 + gcc/testsuite/gcc.target/powerpc/darwin-abi-6.c | 20 + gcc/testsuite/gcc.target/powerpc/darwin-abi-7.c | 18 + gcc/testsuite/gcc.target/powerpc/darwin-abi-8.c | 18 + gcc/testsuite/gcc.target/powerpc/darwin-abi-9.c | 25 + gcc/testsuite/gcc.target/powerpc/doloop-1.c | 2 +- gcc/testsuite/gcc.target/powerpc/ppc-and-1.c | 3 +- gcc/testsuite/gcc.target/powerpc/ppc-bitfield1.c | 3 +- gcc/testsuite/gcc.target/powerpc/ppc-compare-1.c | 3 +- gcc/testsuite/gcc.target/powerpc/ppc-mov-1.c | 3 +- gcc/testsuite/gcc.target/powerpc/ppc-sdata-1.c | 2 +- gcc/testsuite/gcc.target/powerpc/ppc-sdata-2.c | 2 +- .../gcc.target/powerpc/ppc-stackalign-1.c | 2 +- gcc/testsuite/gcc.target/powerpc/ppc64-abi-1.c | 3 +- gcc/testsuite/gcc.target/powerpc/ppc64-abi-2.c | 3 +- gcc/testsuite/gcc.target/powerpc/ppc64-abi-3.c | 3 +- gcc/testsuite/gcc.target/powerpc/ppc64-toc.c | 2 +- gcc/testsuite/gcc.target/powerpc/pr18096-1.c | 4 +- gcc/testsuite/gcc.target/powerpc/rotate.c | 6 + .../gcc.target/powerpc/rs6000-ldouble-1.c | 2 +- .../gcc.target/powerpc/rs6000-ldouble-2.c | 2 +- gcc/testsuite/gcc.target/powerpc/rs6000-power2-1.c | 2 +- gcc/testsuite/gcc.target/powerpc/rs6000-power2-2.c | 2 +- .../gcc.test-framework/dg-dot-run-sif-exp-P.c | 8 + .../gcc.test-framework/dg-dot-run-sif-exp-U.c | 8 + .../gcc.test-framework/dg-dot-run-xif-exp-P.c | 8 + .../gcc.test-framework/dg-dot-run-xif-exp-XP.c | 8 + .../gcc.test-framework/test-framework.exp | 6 + gcc/testsuite/gfortran.dg/PR24188.f | 7 + gcc/testsuite/gfortran.dg/advance.f90 | 12 + gcc/testsuite/gfortran.dg/array_alloc_1.f90 | 2 +- gcc/testsuite/gfortran.dg/array_alloc_2.f90 | 2 +- gcc/testsuite/gfortran.dg/arrayio_0.f90 | 0 gcc/testsuite/gfortran.dg/assign_1.f90 | 2 +- gcc/testsuite/gfortran.dg/associated_1.f90 | 23 + gcc/testsuite/gfortran.dg/assumed_shape_nml.f90 | 17 + gcc/testsuite/gfortran.dg/assumed_size_nml.f90 | 17 + gcc/testsuite/gfortran.dg/assumed_size_refs_1.f90 | 64 + gcc/testsuite/gfortran.dg/assumed_size_refs_2.f90 | 44 + .../gfortran.dg/auto_char_dummy_array_1.f90 | 56 + .../gfortran.dg/auto_char_dummy_array_2.f90 | 11 + .../gfortran.dg/auto_internal_assumed.f90 | 0 gcc/testsuite/gfortran.dg/backspace_2.f | 21 + gcc/testsuite/gfortran.dg/backspace_3.f | 20 + gcc/testsuite/gfortran.dg/backspace_4.f | 18 + gcc/testsuite/gfortran.dg/boz_6.f90 | 15 + gcc/testsuite/gfortran.dg/char_result_11.f90 | 113 + gcc/testsuite/gfortran.dg/char_result_8.f90 | 4 +- gcc/testsuite/gfortran.dg/chkbits.f90 | 26 + gcc/testsuite/gfortran.dg/comma.f | 18 + gcc/testsuite/gfortran.dg/common_4.f90 | 8 +- gcc/testsuite/gfortran.dg/der_charlen_1.f90 | 24 + gcc/testsuite/gfortran.dg/direct_io_3.f90 | 2 +- gcc/testsuite/gfortran.dg/dummy_functions_1.f90 | 36 + gcc/testsuite/gfortran.dg/dup_save_1.f90 | 8 +- gcc/testsuite/gfortran.dg/dup_save_2.f90 | 8 +- gcc/testsuite/gfortran.dg/e_d_fmt.f90 | 2 +- .../gfortran.dg/elemental_subroutine_1.f90 | 58 + .../gfortran.dg/elemental_subroutine_2.f90 | 64 + gcc/testsuite/gfortran.dg/endfile.f | 18 + gcc/testsuite/gfortran.dg/entry_4.f90 | 4 +- gcc/testsuite/gfortran.dg/enum_5.f90 | 2 +- gcc/testsuite/gfortran.dg/equiv_5.f90 | 7 + gcc/testsuite/gfortran.dg/equiv_constraint_2.f90 | 28 +- gcc/testsuite/gfortran.dg/f2c_2.f90 | 2 +- gcc/testsuite/gfortran.dg/f2c_6.f90 | 8 +- gcc/testsuite/gfortran.dg/f2c_7.f90 | 8 +- gcc/testsuite/gfortran.dg/fmt_read_bz_bn.f90 | 2 +- gcc/testsuite/gfortran.dg/fmt_white.f | 18 + gcc/testsuite/gfortran.dg/forall_2.f90 | 9 + gcc/testsuite/gfortran.dg/forall_3.f90 | 18 + gcc/testsuite/gfortran.dg/ftell_1.f90 | 7 +- gcc/testsuite/gfortran.dg/ftell_2.f90 | 6 +- gcc/testsuite/gfortran.dg/func_decl_1.f90 | 26 + gcc/testsuite/gfortran.dg/func_result_2.f90 | 2 +- gcc/testsuite/gfortran.dg/g77/19981216-0.f | 6 +- gcc/testsuite/gfortran.dg/g77/19990305-0.f | 2 +- gcc/testsuite/gfortran.dg/g77/19990313-0.f | 4 +- gcc/testsuite/gfortran.dg/g77/19990313-1.f | 2 +- gcc/testsuite/gfortran.dg/g77/19990313-2.f | 2 +- gcc/testsuite/gfortran.dg/g77/19990313-3.f | 4 +- gcc/testsuite/gfortran.dg/g77/19990502-1.f | 2 +- gcc/testsuite/gfortran.dg/g77/19990905-2.f | 4 +- gcc/testsuite/gfortran.dg/g77/20000629-1.f | 2 +- gcc/testsuite/gfortran.dg/g77/20010216-1.f | 2 +- gcc/testsuite/gfortran.dg/g77/20010426.f | 2 +- gcc/testsuite/gfortran.dg/g77/20010519-1.f | 72 +- gcc/testsuite/gfortran.dg/g77/20020307-1.f | 2 +- gcc/testsuite/gfortran.dg/g77/8485.f | 2 +- gcc/testsuite/gfortran.dg/g77/947.f | 4 +- gcc/testsuite/gfortran.dg/g77/970125-0.f | 8 +- gcc/testsuite/gfortran.dg/g77/980616-0.f | 2 +- gcc/testsuite/gfortran.dg/g77/990115-1.f | 2 +- gcc/testsuite/gfortran.dg/g77/alpha1.f | 4 +- gcc/testsuite/gfortran.dg/g77/cabs.f | 4 +- gcc/testsuite/gfortran.dg/g77/dcomplex.f | 2 +- gcc/testsuite/gfortran.dg/g77/erfc.f | 2 +- gcc/testsuite/gfortran.dg/g77/f90-intrinsic-bit.f | 309 +- .../gfortran.dg/g77/f90-intrinsic-mathematical.f | 12 +- .../gfortran.dg/g77/f90-intrinsic-numeric.f | 86 +- gcc/testsuite/gfortran.dg/g77/int8421.f | 14 +- .../gfortran.dg/g77/intrinsic-unix-bessel.f | 30 +- gcc/testsuite/gfortran.dg/g77_intrinsics_funcs.f | 4 +- gcc/testsuite/gfortran.dg/g77_intrinsics_sub.f | 4 +- gcc/testsuite/gfortran.dg/gnu_logical_1.F | 16 +- gcc/testsuite/gfortran.dg/hollerith.f90 | 12 +- gcc/testsuite/gfortran.dg/hollerith2.f90 | 2 +- gcc/testsuite/gfortran.dg/hollerith_f95.f90 | 12 +- gcc/testsuite/gfortran.dg/hollerith_legacy.f90 | 12 +- gcc/testsuite/gfortran.dg/host_used_types_1.f90 | 40 + gcc/testsuite/gfortran.dg/ichar_2.f90 | 16 + gcc/testsuite/gfortran.dg/imag_1.f | 2 +- gcc/testsuite/gfortran.dg/imag_2.f | 2 +- gcc/testsuite/gfortran.dg/initialization_1.f90 | 36 + gcc/testsuite/gfortran.dg/io_constraints_1.f90 | 78 + gcc/testsuite/gfortran.dg/io_constraints_2.f90 | 69 + gcc/testsuite/gfortran.dg/iostat_3.f90 | 8 + gcc/testsuite/gfortran.dg/label_1.f90 | 10 + gcc/testsuite/gfortran.dg/label_2.f90 | 10 + gcc/testsuite/gfortran.dg/label_3.f90 | 5 + gcc/testsuite/gfortran.dg/line_length_1.f | 7 + gcc/testsuite/gfortran.dg/line_length_2.f90 | 8 + gcc/testsuite/gfortran.dg/list_read_2.f90 | 2 +- gcc/testsuite/gfortran.dg/list_read_5.f90 | 38 + .../gfortran.dg/literal_character_constant_1.inc | 20 + .../gfortran.dg/literal_character_constant_1_x.F | 5 + .../gfortran.dg/literal_character_constant_1_y.F | 5 + .../gfortran.dg/literal_character_constant_1_z.F | 5 + gcc/testsuite/gfortran.dg/logint-1.f | 12 +- gcc/testsuite/gfortran.dg/logint-2.f | 12 +- gcc/testsuite/gfortran.dg/logint-3.f | 12 +- gcc/testsuite/gfortran.dg/malloc_free_1.f90 | 2 +- gcc/testsuite/gfortran.dg/modulo_1.f90 | 9 + gcc/testsuite/gfortran.dg/namelist_11.f | 4 +- gcc/testsuite/gfortran.dg/namelist_12.f | 4 +- gcc/testsuite/gfortran.dg/namelist_14.f90 | 4 +- gcc/testsuite/gfortran.dg/namelist_use.f90 | 3 +- gcc/testsuite/gfortran.dg/nested_modules_1.f90 | 6 +- gcc/testsuite/gfortran.dg/nesting_2.f90 | 16 + gcc/testsuite/gfortran.dg/nesting_3.f90 | 15 + gcc/testsuite/gfortran.dg/open_access_1.f90 | 6 + gcc/testsuite/gfortran.dg/open_status_2.f90 | 12 + gcc/testsuite/gfortran.dg/pointer_assign_1.f90 | 0 .../gfortran.dg/pointer_component_type_1.f90 | 29 + gcc/testsuite/gfortran.dg/pr15140.f90 | 2 +- gcc/testsuite/gfortran.dg/pr17143.f90 | 2 +- gcc/testsuite/gfortran.dg/pr23095.f | 4 +- gcc/testsuite/gfortran.dg/pr24489.f90 | 14 - gcc/testsuite/gfortran.dg/pr24584.f90 | 17 - gcc/testsuite/gfortran.dg/pr24823.f | 78 + gcc/testsuite/gfortran.dg/private_type_4.f90 | 17 + gcc/testsuite/gfortran.dg/pure_byref_3.f90 | 33 + gcc/testsuite/gfortran.dg/read_comma.f | 26 + gcc/testsuite/gfortran.dg/read_float_1.f90 | 2 +- .../gfortran.dg/recursive_statement_functions.f90 | 1 - gcc/testsuite/gfortran.dg/scale_1.f90 | 8 +- gcc/testsuite/gfortran.dg/select_5.f90 | 2 +- gcc/testsuite/gfortran.dg/single_char_string.f90 | 36 + gcc/testsuite/gfortran.dg/spread_scalar_source.f90 | 8 +- .../gfortran.dg/substring_equivalence.f90 | 2 +- gcc/testsuite/gfortran.dg/t_editing.f | 8 + gcc/testsuite/gfortran.dg/tl_editing.f90 | 34 +- gcc/testsuite/gfortran.dg/unf_io_convert_1.f90 | 95 + gcc/testsuite/gfortran.dg/unf_io_convert_2.f90 | 39 + gcc/testsuite/gfortran.dg/unf_io_convert_3.f90 | 19 + gcc/testsuite/gfortran.dg/used_dummy_types_1.f90 | 36 + gcc/testsuite/gfortran.dg/used_dummy_types_2.f90 | 32 + gcc/testsuite/gfortran.dg/used_dummy_types_3.f90 | 36 + gcc/testsuite/gfortran.dg/used_dummy_types_4.f90 | 101 + gcc/testsuite/gfortran.dg/used_dummy_types_5.f90 | 85 + gcc/testsuite/gfortran.dg/used_types_1.f90 | 21 + gcc/testsuite/gfortran.dg/userdef_operator_1.f90 | 35 + gcc/testsuite/gfortran.dg/vect/vect-5.f90 | 2 +- gcc/testsuite/gfortran.dg/where_nested_1.f90 | 26 + gcc/testsuite/gfortran.dg/write_padding.f90 | 13 + .../gfortran.fortran-torture/execute/pr23373-2.f90 | 2 +- gcc/testsuite/lib/c-compat.exp | 110 + gcc/testsuite/lib/compat.exp | 9 +- gcc/testsuite/lib/fortran-torture.exp | 22 +- gcc/testsuite/lib/gcc-dg.exp | 4 +- gcc/testsuite/lib/gcov.exp | 4 +- gcc/testsuite/lib/gfortran-dg.exp | 2 +- gcc/testsuite/lib/target-supports-dg.exp | 4 +- gcc/testsuite/lib/target-supports.exp | 113 +- gcc/testsuite/objc.dg/encode-7.m | 18 + gcc/testsuite/objc.dg/encode-8.m | 31 + gcc/testsuite/objc.dg/encode-9.m | 13 + gcc/testsuite/objc.dg/gnu-encoding/compat-common.h | 43 + .../objc.dg/gnu-encoding/generate-random.c | 265 + .../objc.dg/gnu-encoding/generate-random.h | 33 + .../objc.dg/gnu-encoding/generate-random_r.c | 385 + .../objc.dg/gnu-encoding/gnu-encoding.exp | 73 + .../gnu-encoding}/struct-layout-1.h | 0 .../objc.dg/gnu-encoding/struct-layout-1_test.h | 9 + .../struct-layout-encoding-1_generate.c | 1344 + gcc/testsuite/objc.dg/gnu-encoding/vector-defs.h | 72 + gcc/testsuite/objc.dg/gnu-runtime-3.m | 14 + gcc/testsuite/objc.dg/pragma-1.m | 26 +- gcc/testsuite/objc/execute/pr25328.m | 11 + gcc/testsuite/treelang/ChangeLog | 26 +- gcc/testsuite/treelang/compile/exit.tree | 2 +- gcc/testsuite/treelang/compile/extravar.tree | 6 +- gcc/timevar.def | 1 + gcc/tracer.c | 4 +- gcc/tree-cfg.c | 171 +- gcc/tree-cfgcleanup.c | 41 +- gcc/tree-chrec.c | 18 +- gcc/tree-chrec.h | 4 +- gcc/tree-complex.c | 20 +- gcc/tree-data-ref.c | 2 +- gcc/tree-dfa.c | 246 +- gcc/tree-dump.c | 8 +- gcc/tree-eh.c | 130 +- gcc/tree-flow-inline.h | 70 +- gcc/tree-flow.h | 94 +- gcc/tree-gimple.c | 11 +- gcc/tree-if-conv.c | 20 +- gcc/tree-inline.c | 37 +- gcc/tree-into-ssa.c | 22 +- gcc/tree-mudflap.c | 70 +- gcc/tree-nested.c | 64 +- gcc/tree-nrv.c | 2 +- gcc/tree-object-size.c | 11 +- gcc/tree-optimize.c | 6 + gcc/tree-outof-ssa.c | 34 +- gcc/tree-pass.h | 8 +- gcc/tree-pretty-print.c | 9 + gcc/tree-profile.c | 10 +- gcc/tree-scalar-evolution.c | 165 +- gcc/tree-scalar-evolution.h | 14 +- gcc/tree-sra.c | 26 +- gcc/tree-ssa-alias.c | 226 +- gcc/tree-ssa-ccp.c | 72 +- gcc/tree-ssa-copy.c | 6 +- gcc/tree-ssa-dce.c | 8 +- gcc/tree-ssa-dom.c | 574 +- gcc/tree-ssa-dse.c | 11 +- gcc/tree-ssa-forwprop.c | 352 +- gcc/tree-ssa-live.c | 78 +- gcc/tree-ssa-loop-im.c | 8 +- gcc/tree-ssa-loop-ivcanon.c | 2 +- gcc/tree-ssa-loop-ivopts.c | 54 +- gcc/tree-ssa-loop-niter.c | 844 +- gcc/tree-ssa-loop-unswitch.c | 5 +- gcc/tree-ssa-loop.c | 4 +- gcc/tree-ssa-math-opts.c | 481 +- gcc/tree-ssa-operands.c | 291 +- gcc/tree-ssa-phiopt.c | 17 +- gcc/tree-ssa-pre.c | 1282 +- gcc/tree-ssa-propagate.c | 31 +- gcc/tree-ssa-reassoc.c | 2159 +- gcc/tree-ssa-structalias.c | 1727 +- gcc/tree-ssa-threadupdate.c | 78 +- gcc/tree-ssa-uncprop.c | 39 +- gcc/tree-ssa.c | 36 +- gcc/tree-tailcall.c | 31 +- gcc/tree-vect-transform.c | 40 +- gcc/tree-vectorizer.c | 2 +- gcc/tree-vn.c | 227 +- gcc/tree-vrp.c | 123 +- gcc/tree.c | 146 +- gcc/tree.def | 6 + gcc/tree.h | 107 +- gcc/treelang/ChangeLog | 20 +- gcc/treelang/Make-lang.in | 19 +- gcc/treelang/treetree.c | 19 +- gcc/treestruct.def | 1 + gcc/unwind-dw2-fde-glibc.c | 5 +- gcc/var-tracking.c | 8 +- gcc/varasm.c | 920 +- gcc/varray.c | 4 +- gcc/varray.h | 172 +- gcc/vec.h | 31 + gcc/vmsdbgout.c | 4 +- gcc/web.c | 73 +- include/ChangeLog | 14 + include/demangle.h | 2 + include/xtensa-config.h | 8 +- libada/ChangeLog | 4 + libada/Makefile.in | 1 + libcpp/ChangeLog | 61 +- libcpp/Makefile.in | 2 +- libcpp/directives.c | 365 +- libcpp/expr.c | 24 +- libcpp/include/cpplib.h | 17 +- libcpp/internal.h | 14 +- libcpp/lex.c | 24 +- libcpp/macro.c | 23 +- libcpp/po/ChangeLog | 13 + libcpp/po/be.po | 298 +- libcpp/po/ca.po | 13933 +------ libcpp/po/da.po | 301 +- libcpp/po/de.po | 302 +- libcpp/po/el.po | 298 +- libcpp/po/es.po | 303 +- libcpp/po/fr.po | 302 +- libcpp/po/ja.po | 301 +- libcpp/po/nl.po | 302 +- libcpp/po/rw.po | 299 +- libcpp/po/sv.po | 305 +- libcpp/po/tr.po | 310 +- libcpp/po/vi.po | 592 +- libcpp/po/zh_CN.po | 850 + libdecnumber/ChangeLog | 74 + libdecnumber/Makefile.in | 154 + libdecnumber/aclocal.m4 | 15 + libdecnumber/config.in | 93 + libdecnumber/configure | 8830 +++++ libdecnumber/configure.ac | 78 + libdecnumber/decContext.c | 219 + libdecnumber/decContext.h | 178 + libdecnumber/decDPD.h | 525 + libdecnumber/decLibrary.c | 101 + libdecnumber/decNumber.c | 5946 +++ libdecnumber/decNumber.h | 183 + libdecnumber/decNumberLocal.h | 127 + libdecnumber/decRound.c | 93 + libdecnumber/decUtility.c | 350 + libdecnumber/decUtility.h | 28 + libdecnumber/decimal128.c | 338 + libdecnumber/decimal128.h | 113 + libdecnumber/decimal32.c | 328 + libdecnumber/decimal32.h | 103 + libdecnumber/decimal64.c | 328 + libdecnumber/decimal64.h | 107 + libffi/ChangeLog | 21 + libffi/src/mips/ffi.c | 209 +- libffi/src/mips/ffitarget.h | 6 +- libffi/src/mips/o32.S | 121 +- libffi/src/powerpc/ffi.c | 596 +- libgfortran/ChangeLog | 4434 +-- libgfortran/ChangeLog-2002 | 60 + libgfortran/ChangeLog-2003 | 542 + libgfortran/ChangeLog-2004 | 1104 + libgfortran/ChangeLog-2005 | 2915 ++ libgfortran/Makefile.am | 8 +- libgfortran/Makefile.in | 22 +- libgfortran/acinclude.m4 | 15 +- libgfortran/aclocal.m4 | 27 +- libgfortran/config.h.in | 27 +- libgfortran/configure | 3942 +- libgfortran/configure.ac | 6 +- libgfortran/generated/all_l16.c | 13 +- libgfortran/generated/all_l4.c | 13 +- libgfortran/generated/all_l8.c | 13 +- libgfortran/generated/any_l16.c | 13 +- libgfortran/generated/any_l4.c | 13 +- libgfortran/generated/any_l8.c | 13 +- libgfortran/generated/count_16_l16.c | 13 +- libgfortran/generated/count_16_l4.c | 13 +- libgfortran/generated/count_16_l8.c | 13 +- libgfortran/generated/count_4_l16.c | 13 +- libgfortran/generated/count_4_l4.c | 13 +- libgfortran/generated/count_4_l8.c | 13 +- libgfortran/generated/count_8_l16.c | 13 +- libgfortran/generated/count_8_l4.c | 13 +- libgfortran/generated/count_8_l8.c | 13 +- libgfortran/generated/cshift1_16.c | 41 +- libgfortran/generated/cshift1_4.c | 41 +- libgfortran/generated/cshift1_8.c | 41 +- libgfortran/generated/dotprod_c10.c | 9 +- libgfortran/generated/dotprod_c16.c | 9 +- libgfortran/generated/dotprod_c4.c | 9 +- libgfortran/generated/dotprod_c8.c | 9 +- libgfortran/generated/dotprod_i16.c | 9 +- libgfortran/generated/dotprod_i4.c | 9 +- libgfortran/generated/dotprod_i8.c | 9 +- libgfortran/generated/dotprod_l16.c | 10 +- libgfortran/generated/dotprod_l4.c | 10 +- libgfortran/generated/dotprod_l8.c | 10 +- libgfortran/generated/dotprod_r10.c | 9 +- libgfortran/generated/dotprod_r16.c | 9 +- libgfortran/generated/dotprod_r4.c | 9 +- libgfortran/generated/dotprod_r8.c | 9 +- libgfortran/generated/eoshift1_16.c | 49 +- libgfortran/generated/eoshift1_4.c | 49 +- libgfortran/generated/eoshift1_8.c | 49 +- libgfortran/generated/eoshift3_16.c | 54 +- libgfortran/generated/eoshift3_4.c | 54 +- libgfortran/generated/eoshift3_8.c | 54 +- libgfortran/generated/matmul_c10.c | 71 +- libgfortran/generated/matmul_c16.c | 71 +- libgfortran/generated/matmul_c4.c | 71 +- libgfortran/generated/matmul_c8.c | 71 +- libgfortran/generated/matmul_i16.c | 71 +- libgfortran/generated/matmul_i4.c | 71 +- libgfortran/generated/matmul_i8.c | 71 +- libgfortran/generated/matmul_r10.c | 71 +- libgfortran/generated/matmul_r16.c | 71 +- libgfortran/generated/matmul_r4.c | 71 +- libgfortran/generated/matmul_r8.c | 71 +- libgfortran/generated/maxloc0_16_i16.c | 18 +- libgfortran/generated/maxloc0_16_i4.c | 18 +- libgfortran/generated/maxloc0_16_i8.c | 18 +- libgfortran/generated/maxloc0_16_r10.c | 18 +- libgfortran/generated/maxloc0_16_r16.c | 18 +- libgfortran/generated/maxloc0_16_r4.c | 18 +- libgfortran/generated/maxloc0_16_r8.c | 18 +- libgfortran/generated/maxloc0_4_i16.c | 18 +- libgfortran/generated/maxloc0_4_i4.c | 18 +- libgfortran/generated/maxloc0_4_i8.c | 18 +- libgfortran/generated/maxloc0_4_r10.c | 18 +- libgfortran/generated/maxloc0_4_r16.c | 18 +- libgfortran/generated/maxloc0_4_r4.c | 18 +- libgfortran/generated/maxloc0_4_r8.c | 18 +- libgfortran/generated/maxloc0_8_i16.c | 18 +- libgfortran/generated/maxloc0_8_i4.c | 18 +- libgfortran/generated/maxloc0_8_i8.c | 18 +- libgfortran/generated/maxloc0_8_r10.c | 18 +- libgfortran/generated/maxloc0_8_r16.c | 18 +- libgfortran/generated/maxloc0_8_r4.c | 18 +- libgfortran/generated/maxloc0_8_r8.c | 18 +- libgfortran/generated/maxloc1_16_i16.c | 34 +- libgfortran/generated/maxloc1_16_i4.c | 34 +- libgfortran/generated/maxloc1_16_i8.c | 34 +- libgfortran/generated/maxloc1_16_r10.c | 34 +- libgfortran/generated/maxloc1_16_r16.c | 34 +- libgfortran/generated/maxloc1_16_r4.c | 34 +- libgfortran/generated/maxloc1_16_r8.c | 34 +- libgfortran/generated/maxloc1_4_i16.c | 34 +- libgfortran/generated/maxloc1_4_i4.c | 34 +- libgfortran/generated/maxloc1_4_i8.c | 34 +- libgfortran/generated/maxloc1_4_r10.c | 34 +- libgfortran/generated/maxloc1_4_r16.c | 34 +- libgfortran/generated/maxloc1_4_r4.c | 34 +- libgfortran/generated/maxloc1_4_r8.c | 34 +- libgfortran/generated/maxloc1_8_i16.c | 34 +- libgfortran/generated/maxloc1_8_i4.c | 34 +- libgfortran/generated/maxloc1_8_i8.c | 34 +- libgfortran/generated/maxloc1_8_r10.c | 34 +- libgfortran/generated/maxloc1_8_r16.c | 34 +- libgfortran/generated/maxloc1_8_r4.c | 34 +- libgfortran/generated/maxloc1_8_r8.c | 34 +- libgfortran/generated/maxval_i16.c | 34 +- libgfortran/generated/maxval_i4.c | 34 +- libgfortran/generated/maxval_i8.c | 34 +- libgfortran/generated/maxval_r10.c | 34 +- libgfortran/generated/maxval_r16.c | 34 +- libgfortran/generated/maxval_r4.c | 34 +- libgfortran/generated/maxval_r8.c | 34 +- libgfortran/generated/minloc0_16_i16.c | 18 +- libgfortran/generated/minloc0_16_i4.c | 18 +- libgfortran/generated/minloc0_16_i8.c | 18 +- libgfortran/generated/minloc0_16_r10.c | 18 +- libgfortran/generated/minloc0_16_r16.c | 18 +- libgfortran/generated/minloc0_16_r4.c | 18 +- libgfortran/generated/minloc0_16_r8.c | 18 +- libgfortran/generated/minloc0_4_i16.c | 18 +- libgfortran/generated/minloc0_4_i4.c | 18 +- libgfortran/generated/minloc0_4_i8.c | 18 +- libgfortran/generated/minloc0_4_r10.c | 18 +- libgfortran/generated/minloc0_4_r16.c | 18 +- libgfortran/generated/minloc0_4_r4.c | 18 +- libgfortran/generated/minloc0_4_r8.c | 18 +- libgfortran/generated/minloc0_8_i16.c | 18 +- libgfortran/generated/minloc0_8_i4.c | 18 +- libgfortran/generated/minloc0_8_i8.c | 18 +- libgfortran/generated/minloc0_8_r10.c | 18 +- libgfortran/generated/minloc0_8_r16.c | 18 +- libgfortran/generated/minloc0_8_r4.c | 18 +- libgfortran/generated/minloc0_8_r8.c | 18 +- libgfortran/generated/minloc1_16_i16.c | 34 +- libgfortran/generated/minloc1_16_i4.c | 34 +- libgfortran/generated/minloc1_16_i8.c | 34 +- libgfortran/generated/minloc1_16_r10.c | 34 +- libgfortran/generated/minloc1_16_r16.c | 34 +- libgfortran/generated/minloc1_16_r4.c | 34 +- libgfortran/generated/minloc1_16_r8.c | 34 +- libgfortran/generated/minloc1_4_i16.c | 34 +- libgfortran/generated/minloc1_4_i4.c | 34 +- libgfortran/generated/minloc1_4_i8.c | 34 +- libgfortran/generated/minloc1_4_r10.c | 34 +- libgfortran/generated/minloc1_4_r16.c | 34 +- libgfortran/generated/minloc1_4_r4.c | 34 +- libgfortran/generated/minloc1_4_r8.c | 34 +- libgfortran/generated/minloc1_8_i16.c | 34 +- libgfortran/generated/minloc1_8_i4.c | 34 +- libgfortran/generated/minloc1_8_i8.c | 34 +- libgfortran/generated/minloc1_8_r10.c | 34 +- libgfortran/generated/minloc1_8_r16.c | 34 +- libgfortran/generated/minloc1_8_r4.c | 34 +- libgfortran/generated/minloc1_8_r8.c | 34 +- libgfortran/generated/minval_i16.c | 34 +- libgfortran/generated/minval_i4.c | 34 +- libgfortran/generated/minval_i8.c | 34 +- libgfortran/generated/minval_r10.c | 34 +- libgfortran/generated/minval_r16.c | 34 +- libgfortran/generated/minval_r4.c | 34 +- libgfortran/generated/minval_r8.c | 34 +- libgfortran/generated/product_c10.c | 34 +- libgfortran/generated/product_c16.c | 34 +- libgfortran/generated/product_c4.c | 34 +- libgfortran/generated/product_c8.c | 34 +- libgfortran/generated/product_i16.c | 34 +- libgfortran/generated/product_i4.c | 34 +- libgfortran/generated/product_i8.c | 34 +- libgfortran/generated/product_r10.c | 34 +- libgfortran/generated/product_r16.c | 34 +- libgfortran/generated/product_r4.c | 34 +- libgfortran/generated/product_r8.c | 34 +- libgfortran/generated/reshape_c10.c | 14 +- libgfortran/generated/reshape_c16.c | 14 +- libgfortran/generated/reshape_c4.c | 14 +- libgfortran/generated/reshape_c8.c | 14 +- libgfortran/generated/reshape_i16.c | 14 +- libgfortran/generated/reshape_i4.c | 14 +- libgfortran/generated/reshape_i8.c | 14 +- libgfortran/generated/shape_i16.c | 6 +- libgfortran/generated/shape_i4.c | 6 +- libgfortran/generated/shape_i8.c | 6 +- libgfortran/generated/sum_c10.c | 34 +- libgfortran/generated/sum_c16.c | 34 +- libgfortran/generated/sum_c4.c | 34 +- libgfortran/generated/sum_c8.c | 34 +- libgfortran/generated/sum_i16.c | 34 +- libgfortran/generated/sum_i4.c | 34 +- libgfortran/generated/sum_i8.c | 34 +- libgfortran/generated/sum_r10.c | 34 +- libgfortran/generated/sum_r16.c | 34 +- libgfortran/generated/sum_r4.c | 34 +- libgfortran/generated/sum_r8.c | 34 +- libgfortran/generated/transpose_c10.c | 6 +- libgfortran/generated/transpose_c16.c | 6 +- libgfortran/generated/transpose_c4.c | 6 +- libgfortran/generated/transpose_c8.c | 6 +- libgfortran/generated/transpose_i16.c | 6 +- libgfortran/generated/transpose_i4.c | 6 +- libgfortran/generated/transpose_i8.c | 6 +- libgfortran/intrinsics/abort.c | 12 + libgfortran/intrinsics/c99_functions.c | 27 + libgfortran/intrinsics/fget.c | 6 +- libgfortran/intrinsics/ftell.c | 11 +- libgfortran/intrinsics/random.c | 385 +- libgfortran/intrinsics/tty.c | 2 + libgfortran/io/file_pos.c | 13 +- libgfortran/io/format.c | 175 - libgfortran/io/inquire.c | 23 + libgfortran/io/io.h | 72 +- libgfortran/io/list_read.c | 163 +- libgfortran/io/open.c | 43 +- libgfortran/io/read.c | 5 + libgfortran/io/size_from_kind.c | 2 + libgfortran/io/transfer.c | 254 +- libgfortran/io/unit.c | 11 +- libgfortran/io/unix.c | 8 +- libgfortran/io/write.c | 12 + libgfortran/libgfortran.h | 25 +- libgfortran/m4/cshift1.m4 | 41 +- libgfortran/m4/dotprod.m4 | 9 +- libgfortran/m4/dotprodc.m4 | 9 +- libgfortran/m4/dotprodl.m4 | 10 +- libgfortran/m4/eoshift1.m4 | 49 +- libgfortran/m4/eoshift3.m4 | 54 +- libgfortran/m4/iforeach.m4 | 18 +- libgfortran/m4/ifunction.m4 | 34 +- libgfortran/m4/matmul.m4 | 71 +- libgfortran/m4/reshape.m4 | 14 +- libgfortran/m4/shape.m4 | 6 +- libgfortran/m4/transpose.m4 | 6 +- libgfortran/runtime/error.c | 8 + libiberty/ChangeLog | 21 + libiberty/cp-demangle.c | 29 +- libiberty/floatformat.c | 6 +- libiberty/testsuite/demangle-expected | 24 + libiberty/testsuite/test-demangle.c | 8 +- libjava/ChangeLog | 275 + libjava/Makefile.am | 6 +- libjava/Makefile.in | 818 +- libjava/classpath/ChangeLog | 22 + libjava/classpath/ChangeLog.gcj | 14 + libjava/classpath/configure | 285 +- libjava/classpath/configure.ac | 4 +- .../gnu/java/nio/DatagramChannelImpl.java | 2 +- libjava/classpath/gnu/java/nio/SelectorImpl.java | 26 +- .../classpath/gnu/java/nio/SocketChannelImpl.java | 2 +- libjava/classpath/java/net/ServerSocket.java | 10 +- libjava/classpath/java/net/Socket.java | 20 +- libjava/classpath/lib/Makefile.am | 20 +- libjava/classpath/lib/Makefile.in | 64 +- libjava/configure | 179 +- libjava/configure.ac | 30 - libjava/gcj/Makefile.in | 2 - libjava/gij.cc | 1 + libjava/gnu/CORBA/DynAn/RecordAny.java | 416 + libjava/gnu/CORBA/DynAn/gnuDynValue.java | 386 + libjava/gnu/CORBA/ObjectCreator.java | 596 + libjava/gnu/gcj/convert/BytesToCharsetAdaptor.java | 90 + libjava/gnu/gcj/convert/BytesToUnicode.java | 15 +- libjava/gnu/gcj/convert/CharsetToBytesAdaptor.java | 150 + libjava/gnu/gcj/convert/UnicodeToBytes.java | 20 +- libjava/gnu/gcj/runtime/FileDeleter.java | 35 - libjava/gnu/gcj/runtime/SystemClassLoader.java | 21 +- libjava/gnu/java/lang/natMainThread.cc | 16 +- .../java/net/natPlainDatagramSocketImplPosix.cc | 88 +- libjava/gnu/java/net/natPlainSocketImplPosix.cc | 12 +- libjava/gnu/java/net/natPlainSocketImplWin32.cc | 12 +- libjava/gnu/java/nio/DatagramChannelImpl.java | 4 +- libjava/gnu/java/nio/SocketChannelImpl.java | 6 +- libjava/gnu/java/nio/charset/Provider.java | 154 - libjava/gnu/java/rmi/rmic/CompilerProcess.java | 25 +- libjava/gnu/regexp/MessagesBundle.properties | 22 - libjava/gnu/regexp/MessagesBundle_fr.properties | 22 - libjava/include/Makefile.in | 2 - libjava/include/jvm.h | 10 +- libjava/java/io/File.java | 11 +- libjava/java/io/InputStreamReader.java | 21 + libjava/java/io/OutputStreamWriter.java | 28 + libjava/java/lang/Character.java | 284 +- libjava/java/lang/Class.h | 21 +- libjava/java/lang/Class.java | 6 +- libjava/java/lang/Double.java | 43 +- libjava/java/lang/Float.java | 24 +- libjava/java/lang/Object.h | 3 + libjava/java/lang/Object.java | 8 + libjava/java/lang/Runtime.java | 120 +- libjava/java/lang/String.java | 130 +- libjava/java/lang/StringBuffer.java | 261 +- libjava/java/lang/StringBuilder.java | 67 +- libjava/java/lang/VMCompiler.java | 28 +- libjava/java/lang/natClassLoader.cc | 9 +- libjava/java/lang/natDouble.cc | 8 +- libjava/java/lang/natPosixProcess.cc | 9 +- libjava/java/lang/natRuntime.cc | 16 +- libjava/java/lang/natString.cc | 15 +- libjava/java/lang/natThread.cc | 4 +- libjava/java/nio/charset/Charset.java | 94 +- libjava/java/security/classpath.security | 1 - libjava/jni.cc | 13 + libjava/link.cc | 76 +- libjava/mauve-libgcj | 1 - libjava/posix-threads.cc | 31 +- libjava/prims.cc | 8 +- libjava/scripts/makemake.tcl | 4 + libjava/shlibpath.m4 | 20 +- libjava/sources.am | 751 +- libjava/stacktrace.cc | 11 +- libjava/standard.omit.in | 4 - libjava/sysdep/dwarf2-backtrace.cc | 86 - libjava/sysdep/ia64-frame.h | 282 - libjava/sysdep/ia64.c | 81 - libjava/sysdep/pa/locks.h | 62 +- libjava/testsuite/Makefile.in | 2 - libjava/testsuite/libjava.compile/pr25429.java | 13 + libjava/testsuite/libjava.compile/rh174912.java | 17 + libjava/testsuite/libjava.compile/rh175833.java | 13 + libjava/testsuite/libjava.jacks/jacks.xfail | 3 +- libjava/testsuite/libjava.jni/pr18278.c | 10 + libjava/testsuite/libjava.jni/pr18278.java | 13 + libjava/testsuite/libjava.jni/pr18278.out | 2 + libjava/testsuite/libjava.lang/PR25535.java | 5 + libjava/testsuite/libjava.lang/PR25535.out | 1 + libobjc/ChangeLog | 41 + libobjc/README | 25 +- libobjc/encoding.c | 211 +- libobjc/objc/objc-api.h | 2 + libstdc++-v3/ChangeLog | 1179 + libstdc++-v3/Makefile.in | 10 +- libstdc++-v3/acinclude.m4 | 101 +- libstdc++-v3/config.h.in | 11 +- .../alpha-linux-gnu/baseline_symbols.txt | 0 .../{ => post}/hppa-linux-gnu/baseline_symbols.txt | 0 .../{ => post}/i386-linux-gnu/baseline_symbols.txt | 0 .../{ => post}/i486-linux-gnu/baseline_symbols.txt | 0 .../{ => post}/ia64-linux-gnu/baseline_symbols.txt | 0 .../{ => post}/mips-linux-gnu/baseline_symbols.txt | 0 .../powerpc-linux-gnu/baseline_symbols.txt | 0 .../powerpc64-linux-gnu/32/baseline_symbols.txt | 0 .../powerpc64-linux-gnu/baseline_symbols.txt | 0 .../{ => post}/s390-linux-gnu/baseline_symbols.txt | 0 .../s390x-linux-gnu/baseline_symbols.txt | 0 .../sparc-linux-gnu/baseline_symbols.txt | 0 .../x86_64-linux-gnu/32/baseline_symbols.txt | 0 .../x86_64-linux-gnu/baseline_symbols.txt | 0 .../config/abi/pre/gnu-versioned-namespace.ver | 202 + libstdc++-v3/config/abi/pre/gnu.ver | 783 + libstdc++-v3/config/abi/pre/none.ver | 7 + libstdc++-v3/config/cpu/alpha/atomicity.h | 7 +- libstdc++-v3/config/cpu/cris/atomicity.h | 7 +- libstdc++-v3/config/cpu/generic/atomicity.h | 10 +- libstdc++-v3/config/cpu/hppa/atomicity.h | 9 +- libstdc++-v3/config/cpu/i386/atomicity.h | 9 +- libstdc++-v3/config/cpu/i486/atomicity.h | 9 +- libstdc++-v3/config/cpu/ia64/atomicity.h | 7 +- libstdc++-v3/config/cpu/m68k/atomicity.h | 9 +- libstdc++-v3/config/cpu/mips/atomicity.h | 9 +- libstdc++-v3/config/cpu/powerpc/atomicity.h | 7 +- libstdc++-v3/config/cpu/s390/atomicity.h | 9 +- libstdc++-v3/config/cpu/sh/atomicity.h | 9 +- libstdc++-v3/config/cpu/sparc/atomicity.h | 10 +- libstdc++-v3/config/io/basic_file_stdio.cc | 9 +- libstdc++-v3/config/io/basic_file_stdio.h | 10 +- libstdc++-v3/config/io/c_io_stdio.h | 12 +- libstdc++-v3/config/linker-map.dummy | 7 - libstdc++-v3/config/linker-map.gnu | 702 - libstdc++-v3/config/locale/generic/c_locale.cc | 21 +- libstdc++-v3/config/locale/generic/c_locale.h | 9 +- .../config/locale/generic/codecvt_members.cc | 9 +- .../config/locale/generic/collate_members.cc | 9 +- .../config/locale/generic/ctype_members.cc | 9 +- .../config/locale/generic/messages_members.cc | 9 +- .../config/locale/generic/monetary_members.cc | 9 +- .../config/locale/generic/numeric_members.cc | 10 +- libstdc++-v3/config/locale/generic/time_members.cc | 9 +- libstdc++-v3/config/locale/gnu/c_locale.cc | 23 +- libstdc++-v3/config/locale/gnu/c_locale.h | 14 +- libstdc++-v3/config/locale/gnu/codecvt_members.cc | 9 +- libstdc++-v3/config/locale/gnu/collate_members.cc | 9 +- libstdc++-v3/config/locale/gnu/ctype_members.cc | 9 +- libstdc++-v3/config/locale/gnu/messages_members.cc | 9 +- libstdc++-v3/config/locale/gnu/monetary_members.cc | 9 +- libstdc++-v3/config/locale/gnu/numeric_members.cc | 9 +- libstdc++-v3/config/locale/gnu/time_members.cc | 9 +- .../config/locale/ieee_1003.1-2001/c_locale.h | 10 +- libstdc++-v3/config/os/aix/atomicity.h | 9 +- libstdc++-v3/config/os/irix/atomicity.h | 9 +- libstdc++-v3/configure | 822 +- libstdc++-v3/crossconfig.m4 | 3 + libstdc++-v3/docs/html/configopts.html | 22 +- libstdc++-v3/docs/html/debug.html | 38 +- libstdc++-v3/docs/html/debug_mode.html | 82 +- libstdc++-v3/docs/html/ext/howto.html | 13 + libstdc++-v3/docs/html/ext/lwg-active.html | 330 +- libstdc++-v3/docs/html/ext/lwg-defects.html | 57 +- libstdc++-v3/include/Makefile.am | 37 +- libstdc++-v3/include/Makefile.in | 44 +- libstdc++-v3/include/backward/algo.h | 4 - libstdc++-v3/include/backward/algobase.h | 4 - libstdc++-v3/include/backward/bvector.h | 4 - libstdc++-v3/include/backward/complex.h | 4 - libstdc++-v3/include/backward/deque.h | 4 - libstdc++-v3/include/backward/fstream.h | 4 - libstdc++-v3/include/backward/function.h | 4 - libstdc++-v3/include/backward/hash_map.h | 4 - libstdc++-v3/include/backward/hashtable.h | 4 - libstdc++-v3/include/backward/heap.h | 4 - libstdc++-v3/include/backward/iomanip.h | 4 - libstdc++-v3/include/backward/iostream.h | 4 - libstdc++-v3/include/backward/istream.h | 9 - libstdc++-v3/include/backward/iterator.h | 4 - libstdc++-v3/include/backward/list.h | 4 - libstdc++-v3/include/backward/map.h | 4 - libstdc++-v3/include/backward/multimap.h | 4 - libstdc++-v3/include/backward/multiset.h | 4 - libstdc++-v3/include/backward/ostream.h | 4 - libstdc++-v3/include/backward/pair.h | 4 - libstdc++-v3/include/backward/queue.h | 4 - libstdc++-v3/include/backward/rope.h | 4 - libstdc++-v3/include/backward/set.h | 4 - libstdc++-v3/include/backward/slist.h | 4 - libstdc++-v3/include/backward/stack.h | 4 - libstdc++-v3/include/backward/stream.h | 4 - libstdc++-v3/include/backward/streambuf.h | 4 - libstdc++-v3/include/backward/strstream | 10 +- libstdc++-v3/include/backward/tempbuf.h | 4 - libstdc++-v3/include/backward/tree.h | 3 - libstdc++-v3/include/backward/vector.h | 4 - libstdc++-v3/include/bits/allocator.h | 27 +- libstdc++-v3/include/bits/atomicity.h | 12 +- libstdc++-v3/include/bits/basic_ios.h | 9 +- libstdc++-v3/include/bits/basic_ios.tcc | 10 +- libstdc++-v3/include/bits/basic_string.h | 21 +- libstdc++-v3/include/bits/basic_string.tcc | 7 +- libstdc++-v3/include/bits/boost_concept_check.h | 9 +- libstdc++-v3/include/bits/c++config | 88 +- libstdc++-v3/include/bits/char_traits.h | 13 +- libstdc++-v3/include/bits/concurrence.h | 9 +- libstdc++-v3/include/bits/cpp_type_traits.h | 13 +- libstdc++-v3/include/bits/deque.tcc | 122 +- libstdc++-v3/include/bits/fstream.tcc | 7 +- libstdc++-v3/include/bits/functexcept.h | 8 +- libstdc++-v3/include/bits/gslice.h | 12 +- libstdc++-v3/include/bits/gslice_array.h | 12 +- libstdc++-v3/include/bits/indirect_array.h | 12 +- libstdc++-v3/include/bits/ios_base.h | 9 +- libstdc++-v3/include/bits/istream.tcc | 332 +- libstdc++-v3/include/bits/list.tcc | 7 +- libstdc++-v3/include/bits/locale_classes.h | 9 +- libstdc++-v3/include/bits/locale_facets.h | 7 +- libstdc++-v3/include/bits/locale_facets.tcc | 7 +- libstdc++-v3/include/bits/localefwd.h | 9 +- libstdc++-v3/include/bits/mask_array.h | 12 +- libstdc++-v3/include/bits/ostream.tcc | 357 +- libstdc++-v3/include/bits/postypes.h | 9 +- libstdc++-v3/include/bits/slice_array.h | 12 +- libstdc++-v3/include/bits/sstream.tcc | 9 +- libstdc++-v3/include/bits/stl_algo.h | 221 +- libstdc++-v3/include/bits/stl_algobase.h | 67 +- libstdc++-v3/include/bits/stl_bvector.h | 658 +- libstdc++-v3/include/bits/stl_construct.h | 7 +- libstdc++-v3/include/bits/stl_deque.h | 110 +- libstdc++-v3/include/bits/stl_function.h | 10 +- libstdc++-v3/include/bits/stl_heap.h | 12 +- libstdc++-v3/include/bits/stl_iterator.h | 24 +- .../include/bits/stl_iterator_base_funcs.h | 9 +- .../include/bits/stl_iterator_base_types.h | 8 +- libstdc++-v3/include/bits/stl_list.h | 146 +- libstdc++-v3/include/bits/stl_map.h | 19 +- libstdc++-v3/include/bits/stl_multimap.h | 19 +- libstdc++-v3/include/bits/stl_multiset.h | 17 +- libstdc++-v3/include/bits/stl_numeric.h | 7 +- libstdc++-v3/include/bits/stl_pair.h | 9 +- libstdc++-v3/include/bits/stl_queue.h | 10 +- libstdc++-v3/include/bits/stl_raw_storage_iter.h | 13 +- libstdc++-v3/include/bits/stl_relops.h | 9 +- libstdc++-v3/include/bits/stl_set.h | 18 +- libstdc++-v3/include/bits/stl_stack.h | 9 +- libstdc++-v3/include/bits/stl_tempbuf.h | 7 +- libstdc++-v3/include/bits/stl_tree.h | 194 +- libstdc++-v3/include/bits/stl_uninitialized.h | 6 +- libstdc++-v3/include/bits/stl_vector.h | 66 +- libstdc++-v3/include/bits/stream_iterator.h | 12 +- libstdc++-v3/include/bits/streambuf.tcc | 7 +- libstdc++-v3/include/bits/streambuf_iterator.h | 10 +- libstdc++-v3/include/bits/stringfwd.h | 9 +- libstdc++-v3/include/bits/valarray_after.h | 54 +- libstdc++-v3/include/bits/valarray_array.h | 7 +- libstdc++-v3/include/bits/valarray_array.tcc | 9 +- libstdc++-v3/include/bits/valarray_before.h | 12 +- libstdc++-v3/include/bits/vector.tcc | 136 +- libstdc++-v3/include/c_std/std_cctype.h | 7 +- libstdc++-v3/include/c_std/std_clocale.h | 8 +- libstdc++-v3/include/c_std/std_cmath.h | 46 +- libstdc++-v3/include/c_std/std_csetjmp.h | 8 +- libstdc++-v3/include/c_std/std_csignal.h | 8 +- libstdc++-v3/include/c_std/std_cstdarg.h | 8 +- libstdc++-v3/include/c_std/std_cstddef.h | 8 +- libstdc++-v3/include/c_std/std_cstdio.h | 34 +- libstdc++-v3/include/c_std/std_cstdlib.h | 83 +- libstdc++-v3/include/c_std/std_cstring.h | 9 +- libstdc++-v3/include/c_std/std_ctime.h | 8 +- libstdc++-v3/include/c_std/std_cwchar.h | 36 +- libstdc++-v3/include/c_std/std_cwctype.h | 9 +- libstdc++-v3/include/debug/bitset | 15 +- libstdc++-v3/include/debug/debug.h | 22 +- libstdc++-v3/include/debug/deque | 3 + libstdc++-v3/include/debug/formatter.h | 5 +- libstdc++-v3/include/debug/functions.h | 22 +- libstdc++-v3/include/debug/hash_map.h | 5 +- libstdc++-v3/include/debug/hash_multimap.h | 5 +- libstdc++-v3/include/debug/hash_multiset.h | 5 +- libstdc++-v3/include/debug/hash_set.h | 5 +- libstdc++-v3/include/debug/list | 17 +- libstdc++-v3/include/debug/macros.h | 50 +- libstdc++-v3/include/debug/map.h | 3 + libstdc++-v3/include/debug/multimap.h | 3 + libstdc++-v3/include/debug/multiset.h | 3 + libstdc++-v3/include/debug/safe_base.h | 5 +- libstdc++-v3/include/debug/safe_iterator.h | 22 +- libstdc++-v3/include/debug/safe_iterator.tcc | 5 +- libstdc++-v3/include/debug/safe_sequence.h | 3 + libstdc++-v3/include/debug/set.h | 3 + libstdc++-v3/include/debug/string | 9 +- libstdc++-v3/include/debug/vector | 3 + libstdc++-v3/include/ext/algorithm | 9 +- libstdc++-v3/include/ext/array_allocator.h | 7 +- libstdc++-v3/include/ext/bitmap_allocator.h | 7 +- libstdc++-v3/include/ext/codecvt_specializations.h | 15 +- libstdc++-v3/include/ext/debug_allocator.h | 9 +- libstdc++-v3/include/ext/functional | 20 +- libstdc++-v3/include/ext/hash_fun.h | 9 +- libstdc++-v3/include/ext/hash_map | 20 +- libstdc++-v3/include/ext/hash_set | 13 +- libstdc++-v3/include/ext/hashtable.h | 9 +- libstdc++-v3/include/ext/iterator | 9 +- libstdc++-v3/include/ext/malloc_allocator.h | 9 +- libstdc++-v3/include/ext/memory | 9 +- libstdc++-v3/include/ext/mt_allocator.h | 9 +- libstdc++-v3/include/ext/new_allocator.h | 9 +- libstdc++-v3/include/ext/numeric | 9 +- libstdc++-v3/include/ext/pod_char_traits.h | 14 +- libstdc++-v3/include/ext/pool_allocator.h | 9 +- libstdc++-v3/include/ext/rb_tree | 9 +- libstdc++-v3/include/ext/rc_string_base.h | 112 +- libstdc++-v3/include/ext/rope | 6 +- libstdc++-v3/include/ext/ropeimpl.h | 12 +- libstdc++-v3/include/ext/slist | 16 +- libstdc++-v3/include/ext/sso_string_base.h | 167 +- libstdc++-v3/include/ext/stdio_filebuf.h | 9 +- libstdc++-v3/include/ext/stdio_sync_filebuf.h | 9 +- libstdc++-v3/include/ext/typelist.h | 21 +- libstdc++-v3/include/ext/vstring.h | 141 +- libstdc++-v3/include/ext/vstring.tcc | 328 +- libstdc++-v3/include/ext/vstring_fwd.h | 7 +- libstdc++-v3/include/ext/vstring_util.h | 37 +- libstdc++-v3/include/std/std_bitset.h | 68 +- libstdc++-v3/include/std/std_complex.h | 7 +- libstdc++-v3/include/std/std_fstream.h | 7 +- libstdc++-v3/include/std/std_iomanip.h | 9 +- libstdc++-v3/include/std/std_iosfwd.h | 9 +- libstdc++-v3/include/std/std_iostream.h | 10 +- libstdc++-v3/include/std/std_istream.h | 80 +- libstdc++-v3/include/std/std_limits.h | 17 +- libstdc++-v3/include/std/std_memory.h | 9 +- libstdc++-v3/include/std/std_ostream.h | 79 +- libstdc++-v3/include/std/std_sstream.h | 7 +- libstdc++-v3/include/std/std_stdexcept.h | 9 +- libstdc++-v3/include/std/std_streambuf.h | 7 +- libstdc++-v3/include/std/std_valarray.h | 21 +- libstdc++-v3/include/tr1/array | 7 +- libstdc++-v3/include/tr1/boost_shared_ptr.h | 5 +- libstdc++-v3/include/tr1/common.h | 66 + libstdc++-v3/include/tr1/complex | 395 + libstdc++-v3/include/tr1/functional | 11 +- libstdc++-v3/include/tr1/hashtable | 21 +- libstdc++-v3/include/tr1/ref_fwd.h | 6 +- libstdc++-v3/include/tr1/tuple | 7 +- libstdc++-v3/include/tr1/tuple_iterate.h | 4 +- libstdc++-v3/include/tr1/type_traits | 6 +- libstdc++-v3/include/tr1/type_traits_fwd.h | 7 +- libstdc++-v3/include/tr1/unordered_map | 11 +- libstdc++-v3/include/tr1/unordered_set | 8 +- libstdc++-v3/include/tr1/utility | 7 +- libstdc++-v3/libmath/Makefile.in | 10 +- libstdc++-v3/libsupc++/Makefile.am | 4 +- libstdc++-v3/libsupc++/Makefile.in | 13 +- libstdc++-v3/libsupc++/eh_alloc.cc | 4 +- libstdc++-v3/libsupc++/exception | 11 +- libstdc++-v3/libsupc++/vterminate.cc | 11 +- libstdc++-v3/po/Makefile.in | 10 +- libstdc++-v3/scripts/testsuite_flags.in | 7 +- libstdc++-v3/src/Makefile.am | 37 +- libstdc++-v3/src/Makefile.in | 79 +- libstdc++-v3/src/allocator-inst.cc | 10 +- libstdc++-v3/src/bitmap_allocator.cc | 7 +- libstdc++-v3/src/codecvt.cc | 7 +- libstdc++-v3/src/compatibility.cc | 150 +- libstdc++-v3/src/complex_io.cc | 9 +- libstdc++-v3/src/concept-inst.cc | 7 +- libstdc++-v3/src/ctype.cc | 8 +- libstdc++-v3/src/debug.cc | 7 +- libstdc++-v3/src/ext-inst.cc | 7 +- libstdc++-v3/src/fstream-inst.cc | 29 +- libstdc++-v3/src/functexcept.cc | 10 +- libstdc++-v3/src/globals_io.cc | 9 +- libstdc++-v3/src/io-inst.cc | 59 - libstdc++-v3/src/ios-inst.cc | 45 + libstdc++-v3/src/ios.cc | 9 +- libstdc++-v3/src/ios_failure.cc | 9 +- libstdc++-v3/src/ios_init.cc | 9 +- libstdc++-v3/src/ios_locale.cc | 9 +- libstdc++-v3/src/iostream-inst.cc | 50 + libstdc++-v3/src/istream-inst.cc | 38 +- libstdc++-v3/src/istream.cc | 7 +- libstdc++-v3/src/limits.cc | 9 +- libstdc++-v3/src/list.cc | 8 +- libstdc++-v3/src/locale-inst.cc | 9 +- libstdc++-v3/src/locale-misc-inst.cc | 10 +- libstdc++-v3/src/locale.cc | 9 +- libstdc++-v3/src/locale_facets.cc | 9 +- libstdc++-v3/src/locale_init.cc | 7 +- libstdc++-v3/src/localename.cc | 9 +- libstdc++-v3/src/misc-inst.cc | 14 +- libstdc++-v3/src/mt_allocator.cc | 7 +- libstdc++-v3/src/ostream-inst.cc | 31 +- libstdc++-v3/src/pool_allocator.cc | 7 +- libstdc++-v3/src/sstream-inst.cc | 29 +- libstdc++-v3/src/stdexcept.cc | 9 +- libstdc++-v3/src/streambuf-inst.cc | 22 +- libstdc++-v3/src/streambuf.cc | 7 +- libstdc++-v3/src/string-inst.cc | 13 +- libstdc++-v3/src/strstream.cc | 9 +- libstdc++-v3/src/tree.cc | 9 +- libstdc++-v3/src/valarray-inst.cc | 9 +- .../18_support/numeric_limits/specialization.cc | 4 +- .../testsuite/18_support/numeric_limits/traps.cc | 4 +- .../testsuite/20_util/functional/binders/1.cc | 8 +- .../20_util/memory/auto_ptr/assign_neg.cc | 2 +- .../testsuite/21_strings/basic_string/2.cc | 4 +- .../21_strings/basic_string/capacity/1.cc | 8 +- .../testsuite/21_strings/basic_string/types/1.cc | 48 + .../21_strings/c_strings/wchar_t/24559.cc | 6 +- .../testsuite/22_locale/ctype/is/char/9858.cc | 12 +- .../testsuite/22_locale/ctype/narrow/char/19955.cc | 2 +- libstdc++-v3/testsuite/22_locale/facet/25421.cc | 67 + .../22_locale/time_get/get_date/char/1.cc | 4 +- .../22_locale/time_get/get_date/char/12750.cc | 6 +- .../22_locale/time_get/get_date/char/2.cc | 4 +- .../22_locale/time_get/get_date/char/3.cc | 4 +- .../22_locale/time_get/get_date/wchar_t/1.cc | 4 +- .../22_locale/time_get/get_date/wchar_t/12750.cc | 6 +- .../22_locale/time_get/get_date/wchar_t/2.cc | 4 +- .../22_locale/time_get/get_date/wchar_t/3.cc | 4 +- .../22_locale/time_get/get_monthname/char/1.cc | 4 +- .../22_locale/time_get/get_monthname/char/2.cc | 4 +- .../22_locale/time_get/get_monthname/wchar_t/1.cc | 4 +- .../22_locale/time_get/get_monthname/wchar_t/2.cc | 4 +- .../22_locale/time_get/get_time/char/1.cc | 4 +- .../22_locale/time_get/get_time/char/2.cc | 4 +- .../22_locale/time_get/get_time/char/3.cc | 4 +- .../22_locale/time_get/get_time/char/4.cc | 4 +- .../22_locale/time_get/get_time/wchar_t/1.cc | 4 +- .../22_locale/time_get/get_time/wchar_t/2.cc | 4 +- .../22_locale/time_get/get_time/wchar_t/3.cc | 4 +- .../22_locale/time_get/get_time/wchar_t/4.cc | 4 +- .../22_locale/time_get/get_weekday/char/1.cc | 4 +- .../22_locale/time_get/get_weekday/char/2.cc | 4 +- .../22_locale/time_get/get_weekday/char/3.cc | 4 +- .../22_locale/time_get/get_weekday/wchar_t/1.cc | 4 +- .../22_locale/time_get/get_weekday/wchar_t/2.cc | 4 +- .../22_locale/time_get/get_weekday/wchar_t/3.cc | 4 +- .../22_locale/time_get/get_year/char/1.cc | 4 +- .../22_locale/time_get/get_year/char/3.cc | 4 +- .../22_locale/time_get/get_year/wchar_t/1.cc | 4 +- .../22_locale/time_get/get_year/wchar_t/3.cc | 4 +- .../testsuite/22_locale/time_put/put/char/1.cc | 4 +- .../testsuite/22_locale/time_put/put/char/10.cc | 4 +- .../22_locale/time_put/put/char/12439_1.cc | 2 +- .../22_locale/time_put/put/char/12439_3.cc | 4 +- .../testsuite/22_locale/time_put/put/char/17038.cc | 4 +- .../testsuite/22_locale/time_put/put/char/2.cc | 4 +- .../testsuite/22_locale/time_put/put/char/3.cc | 4 +- .../testsuite/22_locale/time_put/put/char/4.cc | 4 +- .../testsuite/22_locale/time_put/put/char/5.cc | 4 +- .../testsuite/22_locale/time_put/put/char/6.cc | 4 +- .../testsuite/22_locale/time_put/put/char/7.cc | 4 +- .../testsuite/22_locale/time_put/put/char/8.cc | 4 +- .../testsuite/22_locale/time_put/put/char/9.cc | 4 +- .../testsuite/22_locale/time_put/put/wchar_t/1.cc | 4 +- .../testsuite/22_locale/time_put/put/wchar_t/10.cc | 4 +- .../22_locale/time_put/put/wchar_t/12439_1.cc | 2 +- .../22_locale/time_put/put/wchar_t/12439_3.cc | 4 +- .../22_locale/time_put/put/wchar_t/17038.cc | 4 +- .../testsuite/22_locale/time_put/put/wchar_t/2.cc | 4 +- .../testsuite/22_locale/time_put/put/wchar_t/3.cc | 4 +- .../testsuite/22_locale/time_put/put/wchar_t/4.cc | 4 +- .../testsuite/22_locale/time_put/put/wchar_t/5.cc | 4 +- .../testsuite/22_locale/time_put/put/wchar_t/6.cc | 4 +- .../testsuite/22_locale/time_put/put/wchar_t/7.cc | 4 +- .../testsuite/22_locale/time_put/put/wchar_t/8.cc | 4 +- .../testsuite/22_locale/time_put/put/wchar_t/9.cc | 4 +- .../testsuite/23_containers/bitset/cons/16020.cc | 2 +- .../23_containers/bitset/invalidation/1.cc | 2 +- .../23_containers/bitset/operations/13838.cc | 2 +- .../testsuite/23_containers/deque/cons/assign/1.cc | 51 + .../23_containers/deque/cons/clear_allocator.cc | 4 +- .../23_containers/deque/invalidation/1.cc | 2 +- .../23_containers/deque/invalidation/2.cc | 2 +- .../23_containers/deque/invalidation/3.cc | 2 +- .../23_containers/deque/invalidation/4.cc | 2 +- .../23_containers/deque/modifiers/erase/1.cc | 136 + .../23_containers/deque/modifiers/erase/2.cc | 115 + .../deque/modifiers/{swap.cc => swap/1.cc} | 0 .../23_containers/deque/modifiers/swap/2.cc | 133 + .../23_containers/deque/modifiers/swap/3.cc | 162 + .../testsuite/23_containers/deque/types/1.cc | 55 + .../23_containers/list/cons/clear_allocator.cc | 4 +- .../testsuite/23_containers/list/invalidation/1.cc | 2 +- .../testsuite/23_containers/list/invalidation/2.cc | 2 +- .../testsuite/23_containers/list/invalidation/3.cc | 2 +- .../testsuite/23_containers/list/invalidation/4.cc | 2 +- .../23_containers/list/modifiers/insert/25288.cc | 92 + .../list/modifiers/{swap.cc => swap/1.cc} | 0 .../23_containers/list/modifiers/swap/2.cc | 133 + .../23_containers/list/modifiers/swap/3.cc | 162 + .../testsuite/23_containers/map/insert/16813.cc | 42 - .../testsuite/23_containers/map/invalidation/1.cc | 2 +- .../testsuite/23_containers/map/invalidation/2.cc | 2 +- .../23_containers/map/{ => modifiers}/insert/1.cc | 0 .../23_containers/map/modifiers/insert/16813.cc | 42 + .../map/modifiers/{swap.cc => swap/1.cc} | 0 .../23_containers/map/modifiers/swap/2.cc | 147 + .../23_containers/map/modifiers/swap/3.cc | 176 + .../testsuite/23_containers/map/operators/1_neg.cc | 7 +- .../23_containers/multimap/invalidation/1.cc | 2 +- .../23_containers/multimap/invalidation/2.cc | 2 +- .../multimap/modifiers/insert/22102.cc | 141 + .../multimap/modifiers/{swap.cc => swap/1.cc} | 0 .../23_containers/multimap/modifiers/swap/2.cc | 147 + .../23_containers/multimap/modifiers/swap/3.cc | 176 + .../23_containers/multiset/invalidation/1.cc | 2 +- .../23_containers/multiset/invalidation/2.cc | 2 +- .../multiset/{ => modifiers}/insert/1.cc | 0 .../multiset/{ => modifiers}/insert/2.cc | 0 .../multiset/modifiers/insert/22102.cc | 141 + .../multiset/modifiers/{swap.cc => swap/1.cc} | 0 .../23_containers/multiset/modifiers/swap/2.cc | 138 + .../23_containers/multiset/modifiers/swap/3.cc | 167 + .../testsuite/23_containers/set/invalidation/1.cc | 2 +- .../testsuite/23_containers/set/invalidation/2.cc | 2 +- .../testsuite/23_containers/set/modifiers/16728.cc | 2 +- .../23_containers/set/{ => modifiers}/insert/1.cc | 0 .../set/modifiers/{swap.cc => swap/1.cc} | 0 .../23_containers/set/modifiers/swap/2.cc | 138 + .../23_containers/set/modifiers/swap/3.cc | 167 + .../testsuite/23_containers/set/operators/1_neg.cc | 7 +- .../23_containers/vector/bool/clear_allocator.cc | 4 +- .../23_containers/vector/bool/modifiers/erase/1.cc | 137 + .../23_containers/vector/bool/modifiers/swap/1.cc | 146 + .../23_containers/vector/bool/modifiers/swap/2.cc | 175 + .../23_containers/vector/cons/clear_allocator.cc | 4 +- .../23_containers/vector/invalidation/1.cc | 2 +- .../23_containers/vector/invalidation/2.cc | 2 +- .../23_containers/vector/invalidation/3.cc | 2 +- .../23_containers/vector/invalidation/4.cc | 2 +- .../23_containers/vector/modifiers/erase/1.cc | 136 + .../vector/modifiers/{swap.cc => swap/1.cc} | 0 .../23_containers/vector/modifiers/swap/2.cc | 133 + .../23_containers/vector/modifiers/swap/3.cc | 162 + .../testsuite/23_containers/vector/types/1.cc | 54 + libstdc++-v3/testsuite/25_algorithms/find/17441.cc | 4 +- libstdc++-v3/testsuite/25_algorithms/heap/heap.cc | 138 +- .../testsuite/25_algorithms/iter_swap/20577.cc | 2 +- .../25_algorithms/replace_copy/check_type.cc | 4 +- .../25_algorithms/replace_copy_if/check_type.cc | 4 +- .../25_algorithms/unique_copy/check_type.cc | 4 +- .../valarray/valarray_subset_assignment.cc | 3 +- .../testsuite/27_io/basic_filebuf/close/char/2.cc | 2 +- .../testsuite/27_io/basic_filebuf/imbue/12206.cc | 24 +- .../testsuite/27_io/basic_ios/cons/char/3.cc | 4 +- .../27_io/basic_istream/getline/char/5.cc | 3 +- .../27_io/basic_istream/getline/wchar_t/5.cc | 3 +- .../testsuite/27_io/basic_istream/ignore/char/2.cc | 3 +- .../27_io/basic_istream/ignore/wchar_t/2.cc | 3 +- .../27_io/basic_istringstream/str/char/1.cc | 8 +- .../27_io/basic_istringstream/str/wchar_t/1.cc | 7 +- .../testsuite/27_io/basic_ostream/endl/char/1.cc | 1 - .../27_io/basic_ostream/endl/wchar_t/1.cc | 1 - .../testsuite/27_io/basic_ostream/ends/char/1.cc | 1 - .../27_io/basic_ostream/ends/wchar_t/1.cc | 1 - .../testsuite/27_io/basic_ostream/flush/char/1.cc | 1 - .../27_io/basic_ostream/flush/wchar_t/1.cc | 1 - .../testsuite/27_io/basic_ostream/write/char/1.cc | 4 +- .../27_io/basic_ostream/write/wchar_t/1.cc | 4 +- .../27_io/basic_streambuf/in_avail/char/1.cc | 2 +- .../27_io/basic_streambuf/in_avail/wchar_t/1.cc | 2 +- .../27_io/basic_stringstream/str/char/1.cc | 5 +- .../27_io/basic_stringstream/str/wchar_t/1.cc | 4 +- .../testsuite/27_io/ios_base/storage/11584.cc | 15 +- libstdc++-v3/testsuite/27_io/types/1.cc | 6 +- libstdc++-v3/testsuite/Makefile.in | 10 +- libstdc++-v3/testsuite/ext/array_allocator/2.cc | 3 +- libstdc++-v3/testsuite/ext/hash_map/1.cc | 20 +- libstdc++-v3/testsuite/ext/hash_map/14648.cc | 7 +- .../ext/malloc_allocator/deallocate_global.cc | 5 +- .../ext/malloc_allocator/deallocate_local.cc | 5 +- .../testsuite/ext/pool_allocator/allocate_chunk.cc | 2 +- libstdc++-v3/testsuite/lib/libstdc++.exp | 11 +- .../libstdc++-dg/{normal.exp => conformance.exp} | 0 libstdc++-v3/testsuite/testsuite_allocator.h | 215 +- libstdc++-v3/testsuite/testsuite_character.h | 13 +- libstdc++-v3/testsuite/testsuite_hooks.cc | 20 +- libstdc++-v3/testsuite/testsuite_hooks.h | 20 +- libstdc++-v3/testsuite/testsuite_io.h | 36 +- libstdc++-v3/testsuite/testsuite_iterators.h | 2 + libstdc++-v3/testsuite/testsuite_tr1.h | 11 +- libstdc++-v3/testsuite/thread/18185.cc | 10 +- .../memory/shared_ptr/assign/assign.cc | 2 +- .../memory/shared_ptr/assign/shared_ptr.cc | 2 +- .../testsuite/tr1/3_function_objects/mem_fn.cc | 5 +- .../type_properties/is_empty/is_empty.cc | 5 +- .../array/cons/aggregate_initialization.cc | 4 +- .../array/requirements/zero_sized_arrays.cc | 3 +- .../unordered/insert/multiset_range.cc | 6 +- .../tr1/6_containers/unordered/insert/set_range.cc | 4 +- .../tr1/6_containers/unordered/instantiate/hash.cc | 45 +- .../tr1/6_containers/unordered/instantiate/map.cc | 19 +- .../6_containers/unordered/instantiate/multimap.cc | 17 +- .../6_containers/unordered/instantiate/multiset.cc | 14 +- .../tr1/6_containers/unordered/instantiate/set.cc | 14 +- .../6_containers/unordered/swap/unordered_map/1.cc | 162 + .../6_containers/unordered/swap/unordered_map/2.cc | 191 + .../unordered/swap/unordered_multimap/1.cc | 175 + .../unordered/swap/unordered_multimap/2.cc | 204 + .../unordered/swap/unordered_multiset/1.cc | 153 + .../unordered/swap/unordered_multiset/2.cc | 182 + .../6_containers/unordered/swap/unordered_set/1.cc | 152 + .../6_containers/unordered/swap/unordered_set/2.cc | 181 + .../tr1/8_c_compatibility/complex/functions.cc | 54 + .../8_c_compatibility/complex/overloads_float.cc | 109 + .../tr1/8_c_compatibility/complex/overloads_int.cc | 93 + libtool-ldflags | 97 + maintainer-scripts/ChangeLog | 12 +- maintainer-scripts/doc_exclude | 2 - maintainer-scripts/update_version_svn | 2 +- maintainer-scripts/update_web_docs | 180 - maintainer-scripts/update_web_docs_libstdcxx | 54 - maintainer-scripts/update_web_docs_svn | 58 +- 2359 files changed, 453906 insertions(+), 259217 deletions(-) create mode 100644 config/mh-ppc-aix create mode 100644 config/stdint.m4 delete mode 100755 contrib/newcvsroot delete mode 100644 contrib/regression/GCC Regression Tester.wdgt/Info.plist delete mode 100644 contrib/regression/GCC Regression Tester.wdgt/widget.html rename contrib/regression/{GCC Regression Tester.wdgt => GCC_Regression_Tester.wdgt}/Default.png (100%) rename contrib/regression/{GCC Regression Tester.wdgt => GCC_Regression_Tester.wdgt}/Icon.png (100%) create mode 100644 contrib/regression/GCC_Regression_Tester.wdgt/Info.plist create mode 100644 contrib/regression/GCC_Regression_Tester.wdgt/de.lproj/InfoPlist.strings create mode 100644 contrib/regression/GCC_Regression_Tester.wdgt/en.lproj/InfoPlist.strings create mode 100644 contrib/regression/GCC_Regression_Tester.wdgt/ja.lproj/InfoPlist.strings create mode 100644 contrib/regression/GCC_Regression_Tester.wdgt/widget.html rewrite gcc/ChangeLog (63%) create mode 100644 gcc/ada/a-taster.adb create mode 100644 gcc/ada/a-taster.ads create mode 100644 gcc/ada/exp_sel.adb create mode 100644 gcc/ada/exp_sel.ads create mode 100644 gcc/ada/g-allein.ads create mode 100644 gcc/ada/g-alleve.adb create mode 100644 gcc/ada/g-alleve.ads create mode 100644 gcc/ada/g-altcon.adb create mode 100644 gcc/ada/g-altcon.ads create mode 100644 gcc/ada/g-altive.ads create mode 100644 gcc/ada/g-alveop.adb create mode 100644 gcc/ada/g-alveop.ads create mode 100644 gcc/ada/g-alvety.ads create mode 100644 gcc/ada/g-alvevi.ads create mode 100644 gcc/ada/targext.c create mode 100644 gcc/config/darwin-sections.def create mode 100644 gcc/config/floatunsidf.c create mode 100644 gcc/config/floatunsisf.c create mode 100644 gcc/config/floatunsitf.c create mode 100644 gcc/config/floatunsixf.c delete mode 100644 gcc/config/ms1/crti.asm delete mode 100644 gcc/config/ms1/crtn.asm delete mode 100644 gcc/config/ms1/ms1-protos.h delete mode 100644 gcc/config/ms1/ms1.c delete mode 100644 gcc/config/ms1/ms1.h delete mode 100644 gcc/config/ms1/ms1.md delete mode 100644 gcc/config/ms1/ms1.opt delete mode 100644 gcc/config/ms1/t-ms1 rename gcc/config/{ms1 => mt}/ABI.txt (100%) create mode 100644 gcc/config/mt/crti.asm create mode 100644 gcc/config/mt/crtn.asm rename gcc/config/{ms1 => mt}/lib2extra-funcs.c (100%) create mode 100644 gcc/config/mt/mt-protos.h create mode 100644 gcc/config/mt/mt.c create mode 100644 gcc/config/mt/mt.h create mode 100644 gcc/config/mt/mt.md create mode 100644 gcc/config/mt/mt.opt create mode 100644 gcc/config/mt/t-mt create mode 100644 gcc/config/sparc/sync.md create mode 100644 gcc/config/xtensa/ieee754-df.S create mode 100644 gcc/config/xtensa/ieee754-sf.S create mode 100644 gcc/df-core.c create mode 100644 gcc/df-problems.c create mode 100644 gcc/df-scan.c rewrite gcc/df.c (100%) rewrite gcc/df.h (64%) create mode 100644 gcc/dfp.c create mode 100644 gcc/dfp.h rewrite gcc/fortran/ChangeLog (99%) create mode 100644 gcc/fortran/ChangeLog-2002 create mode 100644 gcc/fortran/ChangeLog-2003 create mode 100644 gcc/fortran/ChangeLog-2004 create mode 100644 gcc/fortran/ChangeLog-2005 create mode 100644 gcc/ginclude/decfloat.h create mode 100644 gcc/struct-equiv.c create mode 100644 gcc/sync-builtins.def create mode 100644 gcc/testsuite/g++.dg/abi/thunk3.C create mode 100644 gcc/testsuite/g++.dg/abi/thunk4.C create mode 100644 gcc/testsuite/g++.dg/compat/struct-layout-1.exp create mode 100644 gcc/testsuite/g++.dg/compat/struct-layout-1.h create mode 100644 gcc/testsuite/g++.dg/compat/struct-layout-1_generate.c create mode 100644 gcc/testsuite/g++.dg/compat/struct-layout-1_x1.h create mode 100644 gcc/testsuite/g++.dg/compat/struct-layout-1_x2.h create mode 100644 gcc/testsuite/g++.dg/compat/struct-layout-1_y1.h create mode 100644 gcc/testsuite/g++.dg/compat/struct-layout-1_y2.h create mode 100644 gcc/testsuite/g++.dg/debug/debug9.C create mode 100644 gcc/testsuite/g++.dg/debug/dwarf2-1.C create mode 100644 gcc/testsuite/g++.dg/ext/complit4.C create mode 100644 gcc/testsuite/g++.dg/ext/complit5.C create mode 100644 gcc/testsuite/g++.dg/ext/typeof10.C create mode 100644 gcc/testsuite/g++.dg/inherit/thunk5.C create mode 100644 gcc/testsuite/g++.dg/init/array0.C create mode 100644 gcc/testsuite/g++.dg/lookup/friend9.C create mode 100644 gcc/testsuite/g++.dg/opt/complex5.C create mode 100644 gcc/testsuite/g++.dg/opt/init1.C create mode 100644 gcc/testsuite/g++.dg/opt/inline10.C create mode 100644 gcc/testsuite/g++.dg/opt/pr19317-1.C create mode 100644 gcc/testsuite/g++.dg/opt/pr19317-2.C create mode 100644 gcc/testsuite/g++.dg/opt/pr19317-3.C create mode 100644 gcc/testsuite/g++.dg/opt/pr25005.C create mode 100644 gcc/testsuite/g++.dg/other/array2.C create mode 100644 gcc/testsuite/g++.dg/other/default1.C create mode 100644 gcc/testsuite/g++.dg/other/friend4.C create mode 100644 gcc/testsuite/g++.dg/other/i386-2.C create mode 100644 gcc/testsuite/g++.dg/other/pr25632.C create mode 100644 gcc/testsuite/g++.dg/other/void1.C create mode 100644 gcc/testsuite/g++.dg/parse/access9.C create mode 100644 gcc/testsuite/g++.dg/parse/comma2.C create mode 100644 gcc/testsuite/g++.dg/parse/ctor3.C create mode 100644 gcc/testsuite/g++.dg/parse/dtor6.C create mode 100644 gcc/testsuite/g++.dg/parse/error29.C create mode 100644 gcc/testsuite/g++.dg/parse/operator6.C create mode 100644 gcc/testsuite/g++.dg/parse/pragma3.C create mode 100644 gcc/testsuite/g++.dg/template/call4.C create mode 100644 gcc/testsuite/g++.dg/template/class3.C create mode 100644 gcc/testsuite/g++.dg/template/ctor5.C create mode 100644 gcc/testsuite/g++.dg/template/ctor6.C create mode 100644 gcc/testsuite/g++.dg/template/defarg7.C create mode 100644 gcc/testsuite/g++.dg/template/error20.C create mode 100644 gcc/testsuite/g++.dg/template/friend40.C create mode 100644 gcc/testsuite/g++.dg/template/overload8.C create mode 100644 gcc/testsuite/g++.dg/template/ptrmem16.C create mode 100644 gcc/testsuite/g++.dg/template/repo5.C create mode 100644 gcc/testsuite/g++.dg/template/sfinae3.C create mode 100644 gcc/testsuite/g++.dg/template/typedef3.C create mode 100644 gcc/testsuite/g++.dg/tree-ssa/pr23948.C create mode 100644 gcc/testsuite/g++.dg/tree-ssa/pr25771.C create mode 100644 gcc/testsuite/g++.dg/warn/Wchar-subscripts.C create mode 100644 gcc/testsuite/g++.dg/warn/Wstrict-aliasing-1.C create mode 100644 gcc/testsuite/g++.dg/warn/Wstrict-aliasing-2.C create mode 100644 gcc/testsuite/g++.dg/warn/Wstrict-aliasing-3.C create mode 100644 gcc/testsuite/g++.dg/warn/Wstrict-aliasing-4.C create mode 100644 gcc/testsuite/g++.dg/warn/Wstrict-aliasing-5.C create mode 100644 gcc/testsuite/g++.dg/warn/Wstrict-aliasing-6.C create mode 100644 gcc/testsuite/g++.dg/warn/Wstrict-aliasing-7.C create mode 100644 gcc/testsuite/g++.dg/warn/Wstring-literal-comparison-1.C create mode 100644 gcc/testsuite/g++.dg/warn/Wstring-literal-comparison-2.C create mode 100644 gcc/testsuite/g++.dg/warn/Wstring-literal-comparison-3.C create mode 100644 gcc/testsuite/g++.dg/warn/Wstring-literal-comparison-4.C create mode 100644 gcc/testsuite/g++.dg/warn/Wunreachable-code-2.C create mode 100644 gcc/testsuite/g++.old-deja/g++.law/pr25000.C create mode 100644 gcc/testsuite/g++.old-deja/g++.other/comdat5-aux.cc create mode 100644 gcc/testsuite/g++.old-deja/g++.other/comdat5.C create mode 100644 gcc/testsuite/gcc.c-torture/compile/20051207-1.c create mode 100644 gcc/testsuite/gcc.c-torture/compile/20051216-1.c create mode 100644 gcc/testsuite/gcc.c-torture/compile/20051228-1.c create mode 100644 gcc/testsuite/gcc.c-torture/compile/20060109-1.c create mode 100644 gcc/testsuite/gcc.c-torture/compile/pr24930.c create mode 100644 gcc/testsuite/gcc.c-torture/compile/pr25224.c create mode 100644 gcc/testsuite/gcc.c-torture/compile/pr25310.c create mode 100644 gcc/testsuite/gcc.c-torture/compile/pr25311.c create mode 100644 gcc/testsuite/gcc.c-torture/compile/pr25483.c create mode 100644 gcc/testsuite/gcc.c-torture/compile/pr25513.c create mode 100644 gcc/testsuite/gcc.c-torture/execute/20051215-1.c create mode 100644 gcc/testsuite/gcc.c-torture/execute/20060102-1.c create mode 100644 gcc/testsuite/gcc.c-torture/execute/20060110-1.c create mode 100644 gcc/testsuite/gcc.c-torture/execute/20060110-2.c create mode 100644 gcc/testsuite/gcc.c-torture/execute/pr19005.c create mode 100644 gcc/testsuite/gcc.c-torture/execute/pr25125.c create mode 100644 gcc/testsuite/gcc.dg/20050330-2.c create mode 100644 gcc/testsuite/gcc.dg/20050922-2.c create mode 100644 gcc/testsuite/gcc.dg/20051201-1.c create mode 100644 gcc/testsuite/gcc.dg/20051207-1.c create mode 100644 gcc/testsuite/gcc.dg/20051207-2.c create mode 100644 gcc/testsuite/gcc.dg/20051207-3.c create mode 100644 gcc/testsuite/gcc.dg/20051215-1.c create mode 100644 gcc/testsuite/gcc.dg/Wchar-subscripts.c create mode 100644 gcc/testsuite/gcc.dg/Wstring-literal-comparison-1.c create mode 100644 gcc/testsuite/gcc.dg/Wstring-literal-comparison-2.c create mode 100644 gcc/testsuite/gcc.dg/Wstring-literal-comparison-3.c create mode 100644 gcc/testsuite/gcc.dg/Wstring-literal-comparison-4.c create mode 100644 gcc/testsuite/gcc.dg/alias-9.c create mode 100644 gcc/testsuite/gcc.dg/attr-weakref-1-darwin.c create mode 100644 gcc/testsuite/gcc.dg/attr-weakref-1b.c create mode 100644 gcc/testsuite/gcc.dg/attr-weakref-2.c create mode 100644 gcc/testsuite/gcc.dg/c90-const-expr-4.c create mode 100644 gcc/testsuite/gcc.dg/c90-const-expr-5.c create mode 100644 gcc/testsuite/gcc.dg/c99-const-expr-4.c create mode 100644 gcc/testsuite/gcc.dg/c99-const-expr-5.c create mode 100644 gcc/testsuite/gcc.dg/cast-4.c create mode 100644 gcc/testsuite/gcc.dg/cast-pretty-print-1.c create mode 100644 gcc/testsuite/gcc.dg/charset/builtin2.c create mode 100644 gcc/testsuite/gcc.dg/compat/scalar-by-value-dfp_main.c create mode 100644 gcc/testsuite/gcc.dg/compat/scalar-by-value-dfp_x.c create mode 100644 gcc/testsuite/gcc.dg/compat/scalar-by-value-dfp_y.c create mode 100644 gcc/testsuite/gcc.dg/compat/scalar-return-dfp_main.c create mode 100644 gcc/testsuite/gcc.dg/compat/scalar-return-dfp_x.c create mode 100644 gcc/testsuite/gcc.dg/compat/scalar-return-dfp_y.c create mode 100644 gcc/testsuite/gcc.dg/darwin-weakimport-3.c create mode 100644 gcc/testsuite/gcc.dg/darwin-weakref-1.c create mode 100644 gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-dfp.c create mode 100644 gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-float.c create mode 100644 gcc/testsuite/gcc.dg/dfp/Wbad-function-cast-1.c create mode 100644 gcc/testsuite/gcc.dg/dfp/Wconversion-2.c create mode 100644 gcc/testsuite/gcc.dg/dfp/altivec-types.c create mode 100644 gcc/testsuite/gcc.dg/dfp/call-by-value.c create mode 100644 gcc/testsuite/gcc.dg/dfp/cast-bad.c create mode 100644 gcc/testsuite/gcc.dg/dfp/cast.c create mode 100644 gcc/testsuite/gcc.dg/dfp/compare-eq-const.c create mode 100644 gcc/testsuite/gcc.dg/dfp/compare-eq-d128.c create mode 100644 gcc/testsuite/gcc.dg/dfp/compare-eq-d32.c create mode 100644 gcc/testsuite/gcc.dg/dfp/compare-eq-d64.c create mode 100644 gcc/testsuite/gcc.dg/dfp/compare-eq-dfp.c create mode 100644 gcc/testsuite/gcc.dg/dfp/compare-eq.h create mode 100644 gcc/testsuite/gcc.dg/dfp/compare-rel-const.c create mode 100644 gcc/testsuite/gcc.dg/dfp/compare-rel-d128.c create mode 100644 gcc/testsuite/gcc.dg/dfp/compare-rel-d32.c create mode 100644 gcc/testsuite/gcc.dg/dfp/compare-rel-d64.c create mode 100644 gcc/testsuite/gcc.dg/dfp/compare-rel-dfp.c create mode 100644 gcc/testsuite/gcc.dg/dfp/compare-rel.h create mode 100644 gcc/testsuite/gcc.dg/dfp/composite-type.c create mode 100644 gcc/testsuite/gcc.dg/dfp/constants-c99.c create mode 100644 gcc/testsuite/gcc.dg/dfp/constants-hex.c create mode 100644 gcc/testsuite/gcc.dg/dfp/constants-pedantic.c create mode 100644 gcc/testsuite/gcc.dg/dfp/constants.c create mode 100644 gcc/testsuite/gcc.dg/dfp/convert-bfp-fold.c create mode 100644 gcc/testsuite/gcc.dg/dfp/convert-bfp.c create mode 100644 gcc/testsuite/gcc.dg/dfp/convert-complex.c create mode 100644 gcc/testsuite/gcc.dg/dfp/convert-dfp-fold.c create mode 100644 gcc/testsuite/gcc.dg/dfp/convert-dfp-round.c create mode 100644 gcc/testsuite/gcc.dg/dfp/convert-dfp.c create mode 100644 gcc/testsuite/gcc.dg/dfp/convert-int-fold.c create mode 100644 gcc/testsuite/gcc.dg/dfp/convert-int-saturate.c create mode 100644 gcc/testsuite/gcc.dg/dfp/convert-int.c create mode 100644 gcc/testsuite/gcc.dg/dfp/ctypes.c create mode 100644 gcc/testsuite/gcc.dg/dfp/dec-eval-method.c create mode 100644 gcc/testsuite/gcc.dg/dfp/decfloat-constants.c create mode 100644 gcc/testsuite/gcc.dg/dfp/dfp-round.h create mode 100644 gcc/testsuite/gcc.dg/dfp/dfp.exp create mode 100644 gcc/testsuite/gcc.dg/dfp/func-array.c create mode 100644 gcc/testsuite/gcc.dg/dfp/func-mixed.c create mode 100644 gcc/testsuite/gcc.dg/dfp/func-scalar.c create mode 100644 gcc/testsuite/gcc.dg/dfp/func-struct.c create mode 100644 gcc/testsuite/gcc.dg/dfp/func-vararg-dfp.c create mode 100644 gcc/testsuite/gcc.dg/dfp/func-vararg-mixed.c create mode 100644 gcc/testsuite/gcc.dg/dfp/func-vararg-size0.c create mode 100644 gcc/testsuite/gcc.dg/dfp/inf-1.c create mode 100644 gcc/testsuite/gcc.dg/dfp/keywords-c89.c create mode 100644 gcc/testsuite/gcc.dg/dfp/keywords-c99.c create mode 100644 gcc/testsuite/gcc.dg/dfp/keywords-ignored-c99.c create mode 100644 gcc/testsuite/gcc.dg/dfp/keywords-pedantic.c create mode 100644 gcc/testsuite/gcc.dg/dfp/keywords-reserved.c create mode 100644 gcc/testsuite/gcc.dg/dfp/loop-index.c create mode 100644 gcc/testsuite/gcc.dg/dfp/modes.c create mode 100644 gcc/testsuite/gcc.dg/dfp/nan-1.c create mode 100644 gcc/testsuite/gcc.dg/dfp/nan-2.c create mode 100644 gcc/testsuite/gcc.dg/dfp/operator-arith-fold.c create mode 100644 gcc/testsuite/gcc.dg/dfp/operator-assignment.c create mode 100644 gcc/testsuite/gcc.dg/dfp/operator-bitwise.c create mode 100644 gcc/testsuite/gcc.dg/dfp/operator-comma.c create mode 100644 gcc/testsuite/gcc.dg/dfp/operator-cond.c create mode 100644 gcc/testsuite/gcc.dg/dfp/operator-logical.c create mode 100644 gcc/testsuite/gcc.dg/dfp/operator-unary.c create mode 100644 gcc/testsuite/gcc.dg/dfp/snan.c create mode 100644 gcc/testsuite/gcc.dg/dfp/struct-layout-1.c create mode 100644 gcc/testsuite/gcc.dg/dfp/struct-union.c create mode 100644 gcc/testsuite/gcc.dg/dfp/typespec.c create mode 100644 gcc/testsuite/gcc.dg/dfp/union-init.c create mode 100644 gcc/testsuite/gcc.dg/dfp/usual-arith-conv-const.c create mode 100644 gcc/testsuite/gcc.dg/dfp/usual-arith-conv.c create mode 100644 gcc/testsuite/gcc.dg/dfp/wtr-conversion-1.c create mode 100644 gcc/testsuite/gcc.dg/format/cast-1.c create mode 100644 gcc/testsuite/gcc.dg/format/dfp-printf-1.c create mode 100644 gcc/testsuite/gcc.dg/format/dfp-scanf-1.c create mode 100644 gcc/testsuite/gcc.dg/mt-loopi1.c create mode 100644 gcc/testsuite/gcc.dg/nodfp-1.c create mode 100644 gcc/testsuite/gcc.dg/pr21041.c create mode 100644 gcc/testsuite/gcc.dg/pr23518.c create mode 100644 gcc/testsuite/gcc.dg/pr25023.c create mode 100644 gcc/testsuite/gcc.dg/pr25196.c create mode 100644 gcc/testsuite/gcc.dg/pr25559.c create mode 100644 gcc/testsuite/gcc.dg/pragma-pack-3.c create mode 100644 gcc/testsuite/gcc.dg/single-precision-constant.c create mode 100644 gcc/testsuite/gcc.dg/tls/opt-11.c create mode 100644 gcc/testsuite/gcc.dg/torture/fp-int-convert-double.c create mode 100644 gcc/testsuite/gcc.dg/torture/fp-int-convert-float.c create mode 100644 gcc/testsuite/gcc.dg/torture/fp-int-convert-float128-timode.c create mode 100644 gcc/testsuite/gcc.dg/torture/fp-int-convert-float128.c create mode 100644 gcc/testsuite/gcc.dg/torture/fp-int-convert-float80-timode.c create mode 100644 gcc/testsuite/gcc.dg/torture/fp-int-convert-float80.c create mode 100644 gcc/testsuite/gcc.dg/torture/fp-int-convert-long-double.c create mode 100644 gcc/testsuite/gcc.dg/torture/fp-int-convert-timode.c create mode 100644 gcc/testsuite/gcc.dg/torture/fp-int-convert.h create mode 100644 gcc/testsuite/gcc.dg/torture/pr24257.c create mode 100644 gcc/testsuite/gcc.dg/torture/pr25183.c create mode 100644 gcc/testsuite/gcc.dg/torture/pr25481.c create mode 100644 gcc/testsuite/gcc.dg/torture/pr25706-1.c create mode 100644 gcc/testsuite/gcc.dg/torture/pr25718-1.c create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/alias-10.c create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/alias-11.c create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/alias-12.c create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/alias-3.c create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/alias-4.c create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/alias-5.c create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/alias-6.c create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/alias-7.c create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/alias-8.c create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/alias-9.c create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/bool-10.c create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/bool-11.c create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/divide-1.c create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/divide-2.c create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/divide-3.c create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/divide-4.c create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/foldstring-1.c create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/loadpre1.c create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/loadpre2.c create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/loadpre3.c create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/loadpre4.c create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/loadpre5.c create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/loadpre6.c create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/loadpre7.c create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/loadpre8.c create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/loop-15.c create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/pr23109.c create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/pr24990-1.c create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/pr25382.c create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/pr25485.c create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/pr25501.c create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/pr25734.c create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/reassoc-10.c create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/reassoc-11.c rewrite gcc/testsuite/gcc.dg/tree-ssa/reassoc-2.c (60%) rewrite gcc/testsuite/gcc.dg/tree-ssa/reassoc-3.c (99%) create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/reassoc-5.c create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/reassoc-6.c create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/reassoc-7.c create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/reassoc-8.c create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/reassoc-9.c create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/recip-3.c create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/recip-4.c create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/recip-5.c create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/recip-6.c create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/recip-7.c create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-8.c delete mode 100644 gcc/testsuite/gcc.dg/tree-ssa/ssa-eustores.c create mode 100644 gcc/testsuite/gcc.dg/warn-addr-cmp.c create mode 100644 gcc/testsuite/gcc.misc-tests/dectest.exp create mode 100644 gcc/testsuite/gcc.target/i386/387-9.c create mode 100644 gcc/testsuite/gcc.target/i386/cmov6.c create mode 100644 gcc/testsuite/gcc.target/i386/movq-2.c create mode 100644 gcc/testsuite/gcc.target/i386/pr24306.c create mode 100644 gcc/testsuite/gcc.target/i386/pr25254.c create mode 100644 gcc/testsuite/gcc.target/i386/pr25293.c create mode 100644 gcc/testsuite/gcc.target/i386/sse-17.c create mode 100644 gcc/testsuite/gcc.target/powerpc/darwin-abi-10.c create mode 100644 gcc/testsuite/gcc.target/powerpc/darwin-abi-11.c create mode 100644 gcc/testsuite/gcc.target/powerpc/darwin-abi-3.c create mode 100644 gcc/testsuite/gcc.target/powerpc/darwin-abi-4.c create mode 100644 gcc/testsuite/gcc.target/powerpc/darwin-abi-5.c create mode 100644 gcc/testsuite/gcc.target/powerpc/darwin-abi-6.c create mode 100644 gcc/testsuite/gcc.target/powerpc/darwin-abi-7.c create mode 100644 gcc/testsuite/gcc.target/powerpc/darwin-abi-8.c create mode 100644 gcc/testsuite/gcc.target/powerpc/darwin-abi-9.c create mode 100644 gcc/testsuite/gcc.target/powerpc/rotate.c create mode 100644 gcc/testsuite/gcc.test-framework/dg-dot-run-sif-exp-P.c create mode 100644 gcc/testsuite/gcc.test-framework/dg-dot-run-sif-exp-U.c create mode 100644 gcc/testsuite/gcc.test-framework/dg-dot-run-xif-exp-P.c create mode 100644 gcc/testsuite/gcc.test-framework/dg-dot-run-xif-exp-XP.c create mode 100644 gcc/testsuite/gfortran.dg/PR24188.f create mode 100644 gcc/testsuite/gfortran.dg/advance.f90 mode change 100755 => 100644 gcc/testsuite/gfortran.dg/arrayio_0.f90 create mode 100644 gcc/testsuite/gfortran.dg/associated_1.f90 create mode 100644 gcc/testsuite/gfortran.dg/assumed_shape_nml.f90 create mode 100644 gcc/testsuite/gfortran.dg/assumed_size_nml.f90 create mode 100644 gcc/testsuite/gfortran.dg/assumed_size_refs_1.f90 create mode 100644 gcc/testsuite/gfortran.dg/assumed_size_refs_2.f90 create mode 100644 gcc/testsuite/gfortran.dg/auto_char_dummy_array_1.f90 create mode 100644 gcc/testsuite/gfortran.dg/auto_char_dummy_array_2.f90 mode change 100755 => 100644 gcc/testsuite/gfortran.dg/auto_internal_assumed.f90 create mode 100644 gcc/testsuite/gfortran.dg/backspace_2.f create mode 100644 gcc/testsuite/gfortran.dg/backspace_3.f create mode 100644 gcc/testsuite/gfortran.dg/backspace_4.f create mode 100644 gcc/testsuite/gfortran.dg/boz_6.f90 create mode 100644 gcc/testsuite/gfortran.dg/char_result_11.f90 create mode 100644 gcc/testsuite/gfortran.dg/chkbits.f90 create mode 100644 gcc/testsuite/gfortran.dg/comma.f create mode 100644 gcc/testsuite/gfortran.dg/der_charlen_1.f90 create mode 100644 gcc/testsuite/gfortran.dg/dummy_functions_1.f90 create mode 100644 gcc/testsuite/gfortran.dg/elemental_subroutine_1.f90 create mode 100644 gcc/testsuite/gfortran.dg/elemental_subroutine_2.f90 create mode 100644 gcc/testsuite/gfortran.dg/endfile.f create mode 100644 gcc/testsuite/gfortran.dg/equiv_5.f90 create mode 100644 gcc/testsuite/gfortran.dg/fmt_white.f create mode 100644 gcc/testsuite/gfortran.dg/forall_2.f90 create mode 100644 gcc/testsuite/gfortran.dg/forall_3.f90 create mode 100644 gcc/testsuite/gfortran.dg/func_decl_1.f90 create mode 100644 gcc/testsuite/gfortran.dg/host_used_types_1.f90 create mode 100644 gcc/testsuite/gfortran.dg/ichar_2.f90 create mode 100644 gcc/testsuite/gfortran.dg/initialization_1.f90 create mode 100644 gcc/testsuite/gfortran.dg/io_constraints_1.f90 create mode 100644 gcc/testsuite/gfortran.dg/io_constraints_2.f90 create mode 100644 gcc/testsuite/gfortran.dg/iostat_3.f90 create mode 100644 gcc/testsuite/gfortran.dg/label_1.f90 create mode 100644 gcc/testsuite/gfortran.dg/label_2.f90 create mode 100644 gcc/testsuite/gfortran.dg/label_3.f90 create mode 100644 gcc/testsuite/gfortran.dg/line_length_1.f create mode 100644 gcc/testsuite/gfortran.dg/line_length_2.f90 create mode 100644 gcc/testsuite/gfortran.dg/list_read_5.f90 create mode 100644 gcc/testsuite/gfortran.dg/literal_character_constant_1.inc create mode 100644 gcc/testsuite/gfortran.dg/literal_character_constant_1_x.F create mode 100644 gcc/testsuite/gfortran.dg/literal_character_constant_1_y.F create mode 100644 gcc/testsuite/gfortran.dg/literal_character_constant_1_z.F create mode 100644 gcc/testsuite/gfortran.dg/modulo_1.f90 create mode 100644 gcc/testsuite/gfortran.dg/nesting_2.f90 create mode 100644 gcc/testsuite/gfortran.dg/nesting_3.f90 create mode 100644 gcc/testsuite/gfortran.dg/open_access_1.f90 create mode 100644 gcc/testsuite/gfortran.dg/open_status_2.f90 mode change 100755 => 100644 gcc/testsuite/gfortran.dg/pointer_assign_1.f90 create mode 100644 gcc/testsuite/gfortran.dg/pointer_component_type_1.f90 delete mode 100644 gcc/testsuite/gfortran.dg/pr24489.f90 delete mode 100644 gcc/testsuite/gfortran.dg/pr24584.f90 create mode 100644 gcc/testsuite/gfortran.dg/pr24823.f create mode 100644 gcc/testsuite/gfortran.dg/private_type_4.f90 create mode 100644 gcc/testsuite/gfortran.dg/pure_byref_3.f90 create mode 100644 gcc/testsuite/gfortran.dg/read_comma.f create mode 100644 gcc/testsuite/gfortran.dg/single_char_string.f90 mode change 100755 => 100644 gcc/testsuite/gfortran.dg/substring_equivalence.f90 create mode 100644 gcc/testsuite/gfortran.dg/t_editing.f create mode 100644 gcc/testsuite/gfortran.dg/unf_io_convert_1.f90 create mode 100644 gcc/testsuite/gfortran.dg/unf_io_convert_2.f90 create mode 100644 gcc/testsuite/gfortran.dg/unf_io_convert_3.f90 create mode 100644 gcc/testsuite/gfortran.dg/used_dummy_types_1.f90 create mode 100644 gcc/testsuite/gfortran.dg/used_dummy_types_2.f90 create mode 100644 gcc/testsuite/gfortran.dg/used_dummy_types_3.f90 create mode 100644 gcc/testsuite/gfortran.dg/used_dummy_types_4.f90 create mode 100644 gcc/testsuite/gfortran.dg/used_dummy_types_5.f90 create mode 100644 gcc/testsuite/gfortran.dg/used_types_1.f90 create mode 100644 gcc/testsuite/gfortran.dg/userdef_operator_1.f90 create mode 100644 gcc/testsuite/gfortran.dg/where_nested_1.f90 create mode 100644 gcc/testsuite/gfortran.dg/write_padding.f90 create mode 100644 gcc/testsuite/lib/c-compat.exp create mode 100644 gcc/testsuite/objc.dg/encode-7.m create mode 100644 gcc/testsuite/objc.dg/encode-8.m create mode 100644 gcc/testsuite/objc.dg/encode-9.m create mode 100644 gcc/testsuite/objc.dg/gnu-encoding/compat-common.h create mode 100644 gcc/testsuite/objc.dg/gnu-encoding/generate-random.c create mode 100644 gcc/testsuite/objc.dg/gnu-encoding/generate-random.h create mode 100644 gcc/testsuite/objc.dg/gnu-encoding/generate-random_r.c create mode 100644 gcc/testsuite/objc.dg/gnu-encoding/gnu-encoding.exp copy gcc/testsuite/{gcc.dg/compat => objc.dg/gnu-encoding}/struct-layout-1.h (100%) create mode 100644 gcc/testsuite/objc.dg/gnu-encoding/struct-layout-1_test.h create mode 100644 gcc/testsuite/objc.dg/gnu-encoding/struct-layout-encoding-1_generate.c create mode 100644 gcc/testsuite/objc.dg/gnu-encoding/vector-defs.h create mode 100644 gcc/testsuite/objc.dg/gnu-runtime-3.m create mode 100644 gcc/testsuite/objc/execute/pr25328.m rewrite gcc/tree-ssa-reassoc.c (65%) rewrite libcpp/po/ca.po (96%) create mode 100644 libcpp/po/zh_CN.po create mode 100644 libdecnumber/ChangeLog create mode 100644 libdecnumber/Makefile.in create mode 100644 libdecnumber/aclocal.m4 create mode 100644 libdecnumber/config.in create mode 100755 libdecnumber/configure create mode 100644 libdecnumber/configure.ac create mode 100644 libdecnumber/decContext.c create mode 100644 libdecnumber/decContext.h create mode 100644 libdecnumber/decDPD.h create mode 100644 libdecnumber/decLibrary.c create mode 100644 libdecnumber/decNumber.c create mode 100644 libdecnumber/decNumber.h create mode 100644 libdecnumber/decNumberLocal.h create mode 100644 libdecnumber/decRound.c create mode 100644 libdecnumber/decUtility.c create mode 100644 libdecnumber/decUtility.h create mode 100644 libdecnumber/decimal128.c create mode 100644 libdecnumber/decimal128.h create mode 100644 libdecnumber/decimal32.c create mode 100644 libdecnumber/decimal32.h create mode 100644 libdecnumber/decimal64.c create mode 100644 libdecnumber/decimal64.h rewrite libgfortran/ChangeLog (99%) create mode 100644 libgfortran/ChangeLog-2002 create mode 100644 libgfortran/ChangeLog-2003 create mode 100644 libgfortran/ChangeLog-2004 create mode 100644 libgfortran/ChangeLog-2005 create mode 100644 libjava/gnu/CORBA/DynAn/RecordAny.java create mode 100644 libjava/gnu/CORBA/DynAn/gnuDynValue.java create mode 100644 libjava/gnu/CORBA/ObjectCreator.java create mode 100644 libjava/gnu/gcj/convert/BytesToCharsetAdaptor.java create mode 100644 libjava/gnu/gcj/convert/CharsetToBytesAdaptor.java delete mode 100644 libjava/gnu/gcj/runtime/FileDeleter.java delete mode 100644 libjava/gnu/java/nio/charset/Provider.java delete mode 100644 libjava/gnu/regexp/MessagesBundle.properties delete mode 100644 libjava/gnu/regexp/MessagesBundle_fr.properties delete mode 100644 libjava/java/security/classpath.security delete mode 100644 libjava/sysdep/dwarf2-backtrace.cc delete mode 100644 libjava/sysdep/ia64-frame.h delete mode 100644 libjava/sysdep/ia64.c create mode 100644 libjava/testsuite/libjava.compile/pr25429.java create mode 100644 libjava/testsuite/libjava.compile/rh174912.java create mode 100644 libjava/testsuite/libjava.compile/rh175833.java create mode 100644 libjava/testsuite/libjava.jni/pr18278.c create mode 100644 libjava/testsuite/libjava.jni/pr18278.java create mode 100644 libjava/testsuite/libjava.jni/pr18278.out create mode 100644 libjava/testsuite/libjava.lang/PR25535.java create mode 100644 libjava/testsuite/libjava.lang/PR25535.out rename libstdc++-v3/config/abi/{ => post}/alpha-linux-gnu/baseline_symbols.txt (100%) rename libstdc++-v3/config/abi/{ => post}/hppa-linux-gnu/baseline_symbols.txt (100%) rename libstdc++-v3/config/abi/{ => post}/i386-linux-gnu/baseline_symbols.txt (100%) rename libstdc++-v3/config/abi/{ => post}/i486-linux-gnu/baseline_symbols.txt (100%) rename libstdc++-v3/config/abi/{ => post}/ia64-linux-gnu/baseline_symbols.txt (100%) rename libstdc++-v3/config/abi/{ => post}/mips-linux-gnu/baseline_symbols.txt (100%) rename libstdc++-v3/config/abi/{ => post}/powerpc-linux-gnu/baseline_symbols.txt (100%) rename libstdc++-v3/config/abi/{ => post}/powerpc64-linux-gnu/32/baseline_symbols.txt (100%) rename libstdc++-v3/config/abi/{ => post}/powerpc64-linux-gnu/baseline_symbols.txt (100%) rename libstdc++-v3/config/abi/{ => post}/s390-linux-gnu/baseline_symbols.txt (100%) rename libstdc++-v3/config/abi/{ => post}/s390x-linux-gnu/baseline_symbols.txt (100%) rename libstdc++-v3/config/abi/{ => post}/sparc-linux-gnu/baseline_symbols.txt (100%) rename libstdc++-v3/config/abi/{ => post}/x86_64-linux-gnu/32/baseline_symbols.txt (100%) rename libstdc++-v3/config/abi/{ => post}/x86_64-linux-gnu/baseline_symbols.txt (100%) create mode 100644 libstdc++-v3/config/abi/pre/gnu-versioned-namespace.ver create mode 100644 libstdc++-v3/config/abi/pre/gnu.ver create mode 100644 libstdc++-v3/config/abi/pre/none.ver delete mode 100644 libstdc++-v3/config/linker-map.dummy delete mode 100644 libstdc++-v3/config/linker-map.gnu create mode 100644 libstdc++-v3/include/tr1/common.h create mode 100644 libstdc++-v3/include/tr1/complex delete mode 100644 libstdc++-v3/src/io-inst.cc create mode 100644 libstdc++-v3/src/ios-inst.cc create mode 100644 libstdc++-v3/src/iostream-inst.cc create mode 100644 libstdc++-v3/testsuite/21_strings/basic_string/types/1.cc create mode 100644 libstdc++-v3/testsuite/22_locale/facet/25421.cc create mode 100644 libstdc++-v3/testsuite/23_containers/deque/cons/assign/1.cc create mode 100644 libstdc++-v3/testsuite/23_containers/deque/modifiers/erase/1.cc create mode 100644 libstdc++-v3/testsuite/23_containers/deque/modifiers/erase/2.cc rename libstdc++-v3/testsuite/23_containers/deque/modifiers/{swap.cc => swap/1.cc} (100%) create mode 100644 libstdc++-v3/testsuite/23_containers/deque/modifiers/swap/2.cc create mode 100644 libstdc++-v3/testsuite/23_containers/deque/modifiers/swap/3.cc create mode 100644 libstdc++-v3/testsuite/23_containers/deque/types/1.cc create mode 100644 libstdc++-v3/testsuite/23_containers/list/modifiers/insert/25288.cc rename libstdc++-v3/testsuite/23_containers/list/modifiers/{swap.cc => swap/1.cc} (100%) create mode 100644 libstdc++-v3/testsuite/23_containers/list/modifiers/swap/2.cc create mode 100644 libstdc++-v3/testsuite/23_containers/list/modifiers/swap/3.cc delete mode 100644 libstdc++-v3/testsuite/23_containers/map/insert/16813.cc rename libstdc++-v3/testsuite/23_containers/map/{ => modifiers}/insert/1.cc (100%) create mode 100644 libstdc++-v3/testsuite/23_containers/map/modifiers/insert/16813.cc rename libstdc++-v3/testsuite/23_containers/map/modifiers/{swap.cc => swap/1.cc} (100%) create mode 100644 libstdc++-v3/testsuite/23_containers/map/modifiers/swap/2.cc create mode 100644 libstdc++-v3/testsuite/23_containers/map/modifiers/swap/3.cc create mode 100644 libstdc++-v3/testsuite/23_containers/multimap/modifiers/insert/22102.cc rename libstdc++-v3/testsuite/23_containers/multimap/modifiers/{swap.cc => swap/1.cc} (100%) create mode 100644 libstdc++-v3/testsuite/23_containers/multimap/modifiers/swap/2.cc create mode 100644 libstdc++-v3/testsuite/23_containers/multimap/modifiers/swap/3.cc rename libstdc++-v3/testsuite/23_containers/multiset/{ => modifiers}/insert/1.cc (100%) rename libstdc++-v3/testsuite/23_containers/multiset/{ => modifiers}/insert/2.cc (100%) create mode 100644 libstdc++-v3/testsuite/23_containers/multiset/modifiers/insert/22102.cc rename libstdc++-v3/testsuite/23_containers/multiset/modifiers/{swap.cc => swap/1.cc} (100%) create mode 100644 libstdc++-v3/testsuite/23_containers/multiset/modifiers/swap/2.cc create mode 100644 libstdc++-v3/testsuite/23_containers/multiset/modifiers/swap/3.cc rename libstdc++-v3/testsuite/23_containers/set/{ => modifiers}/insert/1.cc (100%) rename libstdc++-v3/testsuite/23_containers/set/modifiers/{swap.cc => swap/1.cc} (100%) create mode 100644 libstdc++-v3/testsuite/23_containers/set/modifiers/swap/2.cc create mode 100644 libstdc++-v3/testsuite/23_containers/set/modifiers/swap/3.cc create mode 100644 libstdc++-v3/testsuite/23_containers/vector/bool/modifiers/erase/1.cc create mode 100644 libstdc++-v3/testsuite/23_containers/vector/bool/modifiers/swap/1.cc create mode 100644 libstdc++-v3/testsuite/23_containers/vector/bool/modifiers/swap/2.cc create mode 100644 libstdc++-v3/testsuite/23_containers/vector/modifiers/erase/1.cc rename libstdc++-v3/testsuite/23_containers/vector/modifiers/{swap.cc => swap/1.cc} (100%) create mode 100644 libstdc++-v3/testsuite/23_containers/vector/modifiers/swap/2.cc create mode 100644 libstdc++-v3/testsuite/23_containers/vector/modifiers/swap/3.cc create mode 100644 libstdc++-v3/testsuite/23_containers/vector/types/1.cc rename libstdc++-v3/testsuite/libstdc++-dg/{normal.exp => conformance.exp} (100%) create mode 100644 libstdc++-v3/testsuite/tr1/6_containers/unordered/swap/unordered_map/1.cc create mode 100644 libstdc++-v3/testsuite/tr1/6_containers/unordered/swap/unordered_map/2.cc create mode 100644 libstdc++-v3/testsuite/tr1/6_containers/unordered/swap/unordered_multimap/1.cc create mode 100644 libstdc++-v3/testsuite/tr1/6_containers/unordered/swap/unordered_multimap/2.cc create mode 100644 libstdc++-v3/testsuite/tr1/6_containers/unordered/swap/unordered_multiset/1.cc create mode 100644 libstdc++-v3/testsuite/tr1/6_containers/unordered/swap/unordered_multiset/2.cc create mode 100644 libstdc++-v3/testsuite/tr1/6_containers/unordered/swap/unordered_set/1.cc create mode 100644 libstdc++-v3/testsuite/tr1/6_containers/unordered/swap/unordered_set/2.cc create mode 100644 libstdc++-v3/testsuite/tr1/8_c_compatibility/complex/functions.cc create mode 100644 libstdc++-v3/testsuite/tr1/8_c_compatibility/complex/overloads_float.cc create mode 100644 libstdc++-v3/testsuite/tr1/8_c_compatibility/complex/overloads_int.cc create mode 100755 libtool-ldflags delete mode 100644 maintainer-scripts/doc_exclude delete mode 100755 maintainer-scripts/update_web_docs delete mode 100755 maintainer-scripts/update_web_docs_libstdcxx diff --git a/ChangeLog b/ChangeLog index c1b28611d7d..6e072d170d1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,179 @@ +2006-01-05 Alexandre Oliva + + * Makefile.tpl (clean-stage[+id+]-[+prefix+][+module+]): Remove + @ from continuation. + * Makefile.in: Rebuilt. + +2006-01-04 Chris Lattner + + * MAINTAINERS (Write After Approval): Add myself. + +2006-01-04 Paolo Bonzini + + PR bootstrap/24252 + + * Makefile.def (flags_to_pass): Add STAGE1_CFLAGS and STAGE1_LANGUAGES. + * Makefile.tpl (OBJDUMP): New. + (EXTRA_HOST_FLAGS): Add it. + (EXTRA_GCC_FLAGS): Remove flags already specified in flags_to_pass. + + * Makefile.tpl (stage[+id+]-start, stage[+id+]-end): Do not try + to use symbolic links between directories. Avoid race conditions + or make them harmless. + * configure.in: Do not try to use symbolic links between directories. + + * Makefile.def (LEAN): Pass. + * Makefile.tpl (LEAN): Define. + (stage[+id+]-start): Accept that the previous directory does not + exist, if the bootstrap is lean. + (stage[+id+]-bubble): Invoke lean bootstrap commands after + stage[+id+]-start. Use a makefile variable and an `if' instead of a + configure substitution. + ([+compare-target+]): Likewise. + ([+bootstrap-target+]-lean): New. + * configure.in: Remove lean bootstrap support from here. + + * Makefile.in: Regenerate. + * configure: Regenerate. + +2006-01-04 Ben Elliston + + * MAINTAINERS (libdecnumber): Add myself. + +2006-01-02 Mark Mitchell + + * libtool-ldflags: New script. + +2006-01-02 Andreas Schwab + + * configure.in: When reconfiguring remove Makefile in + all stage directories. + * configure: Regenerate. + +2005-12-27 Steven Bosscher + + * MAINTAINERS: Update my email address. + +2005-12-20 Paolo Bonzini + + Revert Ada-related part of the previous change. + + * Makefile.def (ADAFLAGS, BOOT_ADAFLAGS, ADAFLAGS_FOR_TARGET): + Do not pass. + * Makefile.tpl (BOOT_ADAFLAGS): Do not define. + * Makefile.in: Regenerate. + * configure.in: Do not include mt-ppc-aix target fragment. + * configure: Regenerate. + +2005-12-19 Paolo Bonzini + + * configure.in: Select appropriate fragments for PowerPC/AIX. + * configure: Regenerate. + + * Makefile.def (flags_to_pass): Add ADAFLAGS, BOOT_ADAFLAGS, + BOOT_CFLAGS, BOOT_LDFLAGS. + * Makefile.tpl (POSTSTAGE1_FLAGS_TO_PASS): Handle BOOT_ADAFLAGS, + BOOT_CFLAGS, BOOT_LDFLAGS. + (TARGET_FLAGS_TO_PASS): Handle ADAFLAGS_FOR_TARGET. + (stage[+id+]-bubble): Pass flags recursively to the comparison target. + (stage): Fail if we cannot complete the work. + * Makefile.in: Regenerate. + +2005-12-16 Nathan Sidwell + + * configure.in: Replace ms1 with mt. + * configure: Rebuilt. + +2005-12-15 Bryce McKinlay + + * MAINTAINERS: Update my email address. + +2005-12-15 Paolo Bonzini + + * Makefile.tpl (all, do-[+make_target+], do-check, install, + install-host-nogcc): Don't invoke $(stage) at the end. + * Makefile.in: Regenerate. + +2005-12-14 Paolo Bonzini + + * configure.in: Flip the top-level bootstrap switch. + * configure: Regenerate. + +2005-12-14 Daniel Jacobowitz + + * Makefile.tpl: Throughout the file, use : $(MAKE) along with + $(stage) and $(unstage). + (EXTRA_TARGET_FLAGS): Correct double-quoting. + (all): Remove stray semicolon. + (local-distclean): Don't handle multilib.tmp and multilib.out. + (install.all): Set $s for consistency. + (configure-[+prefix+][+module+]): Instead of [+deps+], handle + check_multilibs setting. Always make the install directory. + (configure-stage[+id+]-[+prefix+][+module+]): Likewise. + Correct @if/@endif. + (all-stage[+id+]-[+prefix+][+module+]): Correct @if/@endif. + ($(TARGET_SUBDIR)/[+module+]/multilib.out): Remove. + (stage[+id+]-start, stage[+id+]-end): Stage $(TARGET_SUBDIR). + (multilib.out): Remove. + * Makefile.in: Regenerated. + +2005-12-12 Carlos O'Donell + + * MAINTAINERS (Write After Approval): Add myself. + +2005-12-12 Nathan Sidwell + + * MAINTAINERS: Add myself as mt maintainer. + + * config.sub: Replace ms1 with mt. Allow ms1 as an alias. + +2005-12-06 Adam Nemet + + * MAINTAINERS: Change email address. + +2005-12-05 Paolo Bonzini + + * configure.in (CONFIGURED_BISON, CONFIGURED_YACC, CONFIGURED_M4, + CONFIGURED_FLEX, CONFIGURED_LEX, CONFIGURED_MAKEINFO): Remove + "CONFIGURED_" from the AC_CHECK_PROGS invocation. Move below. + Find in-tree tools if available. + (EXPECT, RUNTEST, LIPO, STRIP): Find them and substitute them. + (CONFIGURED_*_FOR_TARGET): Don't set nor substitute. + (*_FOR_TARGET): Set them with GCC_TARGET_TOOL. + (COMPILER_*_FOR_TARGET): New. + * Makefile.tpl (HOST_EXPORTS): Add *_FOR_TARGET symbols that gcc needs. + (BASE_TARGET_EXPORTS): Use COMPILER_*_FOR_TARGET symbols. + (CONFIGURED_*, USUAL_*): Remove. + (BISON, YACC, FLEX, LEX, M4, MAKEINFO, EXPECT, RUNTEST, LIPO, + STRIP): Use autoconf substitutions. + (COMPILER_AS_FOR_TARGET, COMPILER_LD_FOR_TARGET, + COMPILER_NM_FOR_TARGET): New. + (EXTRA_HOST_FLAGS): Pass LIPO and STRIP. + + (all): Make all-host and all-target in parallel. + (do-[+make_target+], do-check, install, [+compare-target+]): Ensure + that $$r and $$s are set before invoking a recursive make. + (stage[+id+]-bubble): Likewise, and invoke the comparison at the end. + ([+bootstrap-target+]): Inline most of the `all' target. + +2005-11-29 Ben Elliston + + * Makefile.tpl (clean-target-libgcc): Invoke clean-target-libgcc + from the gcc build directory. + * Makefile.in: Regenerate. + +2005-11-29 Ben Elliston + + * Makefile.def: Add new libdecnumber host_module. Make all-gcc + depend on all-libdecnumber. + * configure.in (host_libs): Include libdecnumber. + * Makefile.in: Regenerate. + * configure: Likewise. + +2005-11-29 Ben Elliston + + * libdecnumber: Import decNumber sources from the dfp-branch. + 2005-11-21 Kean Johnston * config.sub, config.guess: Sync from upstream sources. @@ -74,7 +250,7 @@ (USUAL_OBJDUMP_FOR_TARGET): New. (EXTRA_TARGET_FLAGS): Add OBJDUMP. * configure.in: Check for $OBJDUMP_FOR_TARGET. - * configure, Makefile: Regenerated. + * configure, Makefile.in: Regenerated. 2005-10-05 Paolo Bonzini diff --git a/MAINTAINERS b/MAINTAINERS index 997aac8b00f..d2fbda5b7d8 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -67,7 +67,8 @@ mips port Richard Sandiford richard@codesourcery.com mmix port Hans-Peter Nilsson hp@bitrange.com mn10300 port Jeff Law law@redhat.com mn10300 port Alexandre Oliva aoliva@redhat.com -ms1 port Aldy Hernandez aldyh@redhat.com +mt port Aldy Hernandez aldyh@redhat.com +mt port Nathan Sidwell nathan@codesourcery.com pdp11 port Paul Koning ni1d@arrl.net rs6000 port Geoff Keating geoffk@geoffk.org rs6000 port David Edelsohn dje@watson.ibm.com @@ -112,7 +113,6 @@ Ada front end Geert Bosch bosch@gnat.com Ada front end Robert Dewar dewar@gnat.com Ada front end Arnaud Charlet charlet@act-europe.fr fortran 95 Paul Brook paul@codesourcery.com -fortran 95 Steven Bosscher stevenb@suse.de fortran 95 Toon Moene toon@moene.indiv.nluug.nl c++ Jason Merrill jason@redhat.com c++ Mark Mitchell mark@codesourcery.com @@ -131,8 +131,9 @@ treelang James A. Morrison phython@gcc.gnu.org Various Maintainers cpplib Per Bothner per@bothner.com +libdecnumber Ben Elliston bje@au.ibm.com libgcj Tom Tromey tromey@redhat.com -libgcj Bryce McKinlay bryce@gcc.gnu.org +libgcj Bryce McKinlay mckinlay@redhat.com libobjc Nicola Pero n.pero@mi.flashnet.it libobjc Andrew Pinski pinskia@physics.uc.edu loop discovery Michael Hayes m.hayes@elec.canterbury.ac.nz @@ -217,6 +218,7 @@ Hans Boehm hboehm@gcc.gnu.org Segher Boessenkool segher@kernel.crashing.org Paolo Bonzini bonzini@gnu.org Neil Booth neil@daikokuya.co.uk +Steven Bosscher stevenb.gcc@gmail.com Robert Bowdidge bowdidge@apple.com Joel Brobecker brobecker@gnat.com Dave Brolley brolley@redhat.com @@ -242,6 +244,7 @@ Mohan Embar gnustuff@thisiscool.com Marc Espie espie@cvs.openbsd.org Ansgar Esztermann ansgar@thphy.uni-duesseldorf.de Doug Evans dje@transmeta.com +Bernhard Fischer rep.nop@aon.at Thomas Fitzsimmons fitzsim@redhat.com Brian Ford ford@vss.fsi.com Kaveh Ghazi ghazi@caip.rutgers.edu @@ -274,6 +277,7 @@ Andreas Krebbel krebbel1@de.ibm.com Scott Robert Ladd scott.ladd@coyotegulch.com Razya Ladelsky razya@gcc.gnu.org Aaron W. LaFramboise aaronavay62@aaronwl.com +Chris Lattner sabre@nondot.org Terry Laurenzo tlaurenzo@gmail.com Marc Lehmann pcg@goof.com Alan Lehotsky apl@alum.mit.edu @@ -293,11 +297,12 @@ Greg McGary gkm@gnu.org Adam Megacz adam@xwt.org Alan Modra amodra@bigpond.net.au Catherine Moore clm@redhat.com -Dorit Naishlos dorit@il.ibm.com -Adam Nemet anemet@lnxw.com +Adam Nemet anemet@caviumnetworks.com Dan Nicolaescu dann@ics.uci.edu +Dorit Nuzman dorit@il.ibm.com David O'Brien obrien@FreeBSD.org Turly O'Connor turly@apple.com +Carlos O'Donell carlos@codesourcery.com Jeffrey D. Oldham oldham@codesourcery.com Rainer Orth ro@TechFak.Uni-Bielefeld.DE Devang Patel dpatel@apple.com @@ -319,12 +324,14 @@ Matthew Sachs msachs@apple.com Alex Samuel samuel@codesourcery.com Tobias Schlüter tobias.schlueter@physik.uni-muenchen.de Svein Seldal svein@dev.seldal.com +Thiemo Seufer ths@networkno.de Franz Sirl franz.sirl-kernel@lauterbach.com Michael Sokolov msokolov@ivan.Harhan.ORG Richard Stallman rms@gnu.org Graham Stott graham.stott@btinternet.com Mike Stump mrs@apple.com Jeff Sturm jsturm@gcc.gnu.org +Paul Thomas pault@gcc.gnu.org Kresten Krab Thorup krab@gcc.gnu.org Caroline Tice ctice@apple.com Michael Tiemann tiemann@redhat.com diff --git a/Makefile.def b/Makefile.def index dc7d61291ab..acc770dc3d6 100644 --- a/Makefile.def +++ b/Makefile.def @@ -4,7 +4,7 @@ AutoGen definitions Makefile.tpl; // Makefile.in is generated from Makefile.tpl by 'autogen Makefile.def'. // This file was originally written by Nathanael Nerode. // -// Copyright 2002, 2003 Free Software Foundation +// Copyright 2002, 2003, 2004, 2005, 2006 Free Software Foundation // // 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 @@ -75,6 +75,7 @@ host_modules= { module= tcl; host_modules= { module= itcl; }; host_modules= { module= ld; bootstrap=true; }; host_modules= { module= libcpp; bootstrap=true; }; +host_modules= { module= libdecnumber; bootstrap=true; }; host_modules= { module= libgui; }; host_modules= { module= libiberty; bootstrap=true; }; host_modules= { module= libtool; }; @@ -205,11 +206,15 @@ flags_to_pass = { flag= YACC ; }; // Host tools flags_to_pass = { flag= AR_FLAGS ; }; +flags_to_pass = { flag= BOOT_CFLAGS ; }; +flags_to_pass = { flag= BOOT_LDFLAGS ; }; flags_to_pass = { flag= CFLAGS ; }; flags_to_pass = { flag= CXXFLAGS ; }; flags_to_pass = { flag= LDFLAGS ; }; flags_to_pass = { flag= LIBCFLAGS ; }; flags_to_pass = { flag= LIBCXXFLAGS ; }; +flags_to_pass = { flag= STAGE1_CFLAGS ; }; +flags_to_pass = { flag= STAGE1_LANGUAGES ; }; // Target tools flags_to_pass = { flag= AR_FOR_TARGET ; }; @@ -233,6 +238,9 @@ flags_to_pass = { flag= RANLIB_FOR_TARGET ; }; flags_to_pass = { flag= STRIP_FOR_TARGET ; }; flags_to_pass = { flag= WINDRES_FOR_TARGET ; }; +// Miscellaneous +flags_to_pass = { flag= LEAN ; }; + // Inter-module dependencies // Build modules @@ -261,6 +269,7 @@ dependencies = { module=all-gcc; on=all-build-libiberty; }; dependencies = { module=all-gcc; on=all-build-fixincludes; }; dependencies = { module=all-gcc; on=all-zlib; }; dependencies = { module=all-gcc; on=all-libcpp; hard=true; }; +dependencies = { module=all-gcc; on=all-libdecnumber; hard=true; }; dependencies = { module=all-gcc; on=all-libiberty; }; dependencies = { module=all-gcc; on=all-fixincludes; }; dependencies = { module=install-gcc ; on=install-fixincludes; }; diff --git a/Makefile.in b/Makefile.in index fe0db6c4572..78972f03b28 100644 --- a/Makefile.in +++ b/Makefile.in @@ -3,7 +3,7 @@ # # Makefile for directory with subdirs to build. # Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, -# 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation +# 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation # # 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 @@ -133,7 +133,8 @@ HOST_CONFIGARGS = @host_configargs@ # with srcdir=.. HOST_SUBDIR = @host_subdir@ # This is the list of variables to export in the environment when -# configuring subdirectories for the host system. +# configuring subdirectories for the host system. We need to pass +# some to the GCC configure because of its hybrid host/target nature. HOST_EXPORTS = \ $(BASE_EXPORTS) \ CC="$(CC)"; export CC; \ @@ -152,6 +153,13 @@ HOST_EXPORTS = \ WINDRES="$(WINDRES)"; export WINDRES; \ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + AR_FOR_TARGET="$(AR_FOR_TARGET)"; export AR_FOR_TARGET; \ + AS_FOR_TARGET="$(AS_FOR_TARGET)"; export AS_FOR_TARGET; \ + GCC_FOR_TARGET="$(GCC_FOR_TARGET)"; export GCC_FOR_TARGET; \ + LD_FOR_TARGET="$(LD_FOR_TARGET)"; export LD_FOR_TARGET; \ + NM_FOR_TARGET="$(NM_FOR_TARGET)"; export NM_FOR_TARGET; \ + OBJDUMP_FOR_TARGET="$(OBJDUMP_FOR_TARGET)"; export OBJDUMP_FOR_TARGET; \ + RANLIB_FOR_TARGET="$(RANLIB_FOR_TARGET)"; export RANLIB_FOR_TARGET; \ TOPLEVEL_CONFIGURE_ARGUMENTS="$(TOPLEVEL_CONFIGURE_ARGUMENTS)"; export TOPLEVEL_CONFIGURE_ARGUMENTS; \ GMPLIBS="$(HOST_GMPLIBS)"; export GMPLIBS; \ GMPINC="$(HOST_GMPINC)"; export GMPINC; \ @@ -183,7 +191,7 @@ TARGET_CONFIGARGS = @target_configargs@ --with-target-subdir="$(TARGET_SUBDIR)" BASE_TARGET_EXPORTS = \ $(BASE_EXPORTS) \ AR="$(AR_FOR_TARGET)"; export AR; \ - AS="$(AS_FOR_TARGET)"; export AS; \ + AS="$(COMPILER_AS_FOR_TARGET)"; export AS; \ CC="$(CC_FOR_TARGET)"; export CC; \ CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ @@ -192,10 +200,10 @@ BASE_TARGET_EXPORTS = \ GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \ GFORTRAN="$(GFORTRAN_FOR_TARGET)"; export GFORTRAN; \ DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \ - LD="$(LD_FOR_TARGET)"; export LD; \ + LD="$(COMPILER_LD_FOR_TARGET)"; export LD; \ LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \ LIPO="$(LIPO_FOR_TARGET)"; export LIPO; \ - NM="$(NM_FOR_TARGET)"; export NM; \ + NM="$(COMPILER_NM_FOR_TARGET)"; export NM; \ OBJDUMP="$(OBJDUMP_FOR_TARGET)"; export OBJDUMP; \ RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \ STRIP="$(STRIP_FOR_TARGET)"; export STRIP; \ @@ -244,48 +252,16 @@ BUILD_PREFIX_1 = @BUILD_PREFIX_1@ # Flags to pass to stage2 and later makes. They are defined # here so that they can be overridden by Makefile fragments. BOOT_CFLAGS= -g -O2 +BOOT_LDFLAGS= -CONFIGURED_BISON = @CONFIGURED_BISON@ -BISON = `if [ -f $$r/$(BUILD_SUBDIR)/bison/tests/bison ] ; then \ - echo $$r/$(BUILD_SUBDIR)/bison/tests/bison ; \ - else \ - echo ${CONFIGURED_BISON} ; \ - fi` - -CONFIGURED_YACC = @CONFIGURED_YACC@ -YACC = `if [ -f $$r/$(BUILD_SUBDIR)/bison/tests/bison ] ; then \ - echo $$r/$(BUILD_SUBDIR)/bison/tests/bison -y ; \ - elif [ -f $$r/$(BUILD_SUBDIR)/byacc/byacc ] ; then \ - echo $$r/$(BUILD_SUBDIR)/byacc/byacc ; \ - else \ - echo ${CONFIGURED_YACC} ; \ - fi` - -CONFIGURED_FLEX = @CONFIGURED_FLEX@ -FLEX = `if [ -f $$r/$(BUILD_SUBDIR)/flex/flex ] ; \ - then echo $$r/$(BUILD_SUBDIR)/flex/flex ; \ - else echo ${CONFIGURED_FLEX} ; fi` - -CONFIGURED_LEX = @CONFIGURED_LEX@ -LEX = `if [ -f $$r/$(BUILD_SUBDIR)/flex/flex ] ; \ - then echo $$r/$(BUILD_SUBDIR)/flex/flex ; \ - else echo ${CONFIGURED_LEX} ; fi` - -CONFIGURED_M4 = @CONFIGURED_M4@ -M4 = `if [ -f $$r/$(BUILD_SUBDIR)/m4/m4 ] ; \ - then echo $$r/$(BUILD_SUBDIR)/m4/m4 ; \ - else echo ${CONFIGURED_M4} ; fi` - -# For an installed makeinfo, we require it to be from texinfo 4.2 or -# higher, else we use the "missing" dummy. We also pass the subdirectory -# makeinfo even if only the Makefile is there, because Texinfo builds its -# manual when made, and it requires its own version. -CONFIGURED_MAKEINFO = @CONFIGURED_MAKEINFO@ -MAKEINFO = `if [ -f $$r/$(BUILD_SUBDIR)/texinfo/makeinfo/Makefile ] ; \ - then echo $$r/$(BUILD_SUBDIR)/texinfo/makeinfo/makeinfo ; \ - else if (${CONFIGURED_MAKEINFO} --version \ - | egrep 'texinfo[^0-9]*([1-3][0-9]|4\.[2-9]|[5-9])') >/dev/null 2>&1; \ - then echo ${CONFIGURED_MAKEINFO}; else echo $$s/missing makeinfo; fi; fi` +BISON = @BISON@ +YACC = @YACC@ +FLEX = @FLEX@ +LEX = @LEX@ +M4 = @M4@ +MAKEINFO = @MAKEINFO@ +EXPECT = @EXPECT@ +RUNTEST = @RUNTEST@ # This just becomes part of the MAKEINFO definition passed down to # sub-makes. It lets flags be given on the command line while still @@ -293,43 +269,29 @@ MAKEINFO = `if [ -f $$r/$(BUILD_SUBDIR)/texinfo/makeinfo/Makefile ] ; \ # (Default to avoid splitting info files by setting the threshold high.) MAKEINFOFLAGS = --split-size=5000000 -# FIXME: expect may become a build tool? -EXPECT = `if [ -f $$r/$(HOST_SUBDIR)/expect/expect ] ; \ - then echo $$r/$(HOST_SUBDIR)/expect/expect ; \ - else echo expect ; fi` - -RUNTEST = `if [ -f $$s/dejagnu/runtest ] ; \ - then echo $$s/dejagnu/runtest ; \ - else echo runtest ; fi` - # --------------------------------------------- # Programs producing files for the HOST machine # --------------------------------------------- AS = @AS@ - AR = @AR@ AR_FLAGS = rc - CC = @CC@ -CFLAGS = @CFLAGS@ -LIBCFLAGS = $(CFLAGS) - CXX = @CXX@ -CXXFLAGS = @CXXFLAGS@ -LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates - DLLTOOL = @DLLTOOL@ - -NM = @NM@ - LD = @LD@ -LDFLAGS = - +LIPO = @LIPO@ +NM = @NM@ +OBJDUMP = @OBJDUMP@ RANLIB = @RANLIB@ - +STRIP = @STRIP@ WINDRES = @WINDRES@ +CFLAGS = @CFLAGS@ +LDFLAGS = +LIBCFLAGS = $(CFLAGS) +CXXFLAGS = @CXXFLAGS@ +LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates PICFLAG = # ----------------------------------------------- @@ -339,242 +301,42 @@ PICFLAG = FLAGS_FOR_TARGET = @FLAGS_FOR_TARGET@ AR_FOR_TARGET=@AR_FOR_TARGET@ -CONFIGURED_AR_FOR_TARGET=@CONFIGURED_AR_FOR_TARGET@ -USUAL_AR_FOR_TARGET = ` \ - if [ -f $$r/$(HOST_SUBDIR)/binutils/ar ] ; then \ - echo $$r/$(HOST_SUBDIR)/binutils/ar ; \ - else \ - if [ '$(host)' = '$(target)' ] ; then \ - echo $(AR); \ - else \ - echo $(CONFIGURED_AR_FOR_TARGET) ; \ - fi; \ - fi` - AS_FOR_TARGET=@AS_FOR_TARGET@ -CONFIGURED_AS_FOR_TARGET=@CONFIGURED_AS_FOR_TARGET@ -USUAL_AS_FOR_TARGET = ` \ - if [ -f $$r/$(HOST_SUBDIR)/gas/as-new ] ; then \ - echo $$r/$(HOST_SUBDIR)/gas/as-new ; \ - elif [ -f $$r/$(HOST_SUBDIR)/gcc/as ]; then \ - echo $$r/$(HOST_SUBDIR)/gcc/as ; \ - else \ - if [ '$(host)' = '$(target)' ] ; then \ - echo $(AS); \ - else \ - echo $(CONFIGURED_AS_FOR_TARGET) ; \ - fi; \ - fi` - CC_FOR_TARGET=$(STAGE_CC_WRAPPER) @CC_FOR_TARGET@ $(FLAGS_FOR_TARGET) -CONFIGURED_CC_FOR_TARGET=@CONFIGURED_CC_FOR_TARGET@ -USUAL_CC_FOR_TARGET = ` \ - if [ -f $$r/$(HOST_SUBDIR)/gcc/xgcc ] ; then \ - echo $$r/$(HOST_SUBDIR)/gcc/xgcc -B$$r/$(HOST_SUBDIR)/gcc/ ; \ - else \ - if [ '$(host)' = '$(target)' ] ; then \ - echo $(CC); \ - else \ - echo $(CONFIGURED_CC_FOR_TARGET) ; \ - fi; \ - fi` - -# During gcc bootstrap, if we use some random cc for stage1 then -# CFLAGS will be just -g. We want to ensure that TARGET libraries -# (which we know are built with gcc) are built with optimizations so -# prepend -O2 when setting CFLAGS_FOR_TARGET. -CFLAGS_FOR_TARGET = -O2 $(CFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET) -SYSROOT_CFLAGS_FOR_TARGET = @SYSROOT_CFLAGS_FOR_TARGET@ # If GCC_FOR_TARGET is not overriden on the command line, then this # variable is passed down to the gcc Makefile, where it is used to # build libgcc2.a. We define it here so that it can itself be # overridden on the command line. -GCC_FOR_TARGET=@GCC_FOR_TARGET@ -CONFIGURED_GCC_FOR_TARGET=@CONFIGURED_GCC_FOR_TARGET@ -USUAL_GCC_FOR_TARGET = $(STAGE_CC_WRAPPER) \ - $$r/$(HOST_SUBDIR)/gcc/xgcc -B$$r/$(HOST_SUBDIR)/gcc/ $(FLAGS_FOR_TARGET) -LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET) - +GCC_FOR_TARGET=$(STAGE_CC_WRAPPER) @GCC_FOR_TARGET@ $(FLAGS_FOR_TARGET) CXX_FOR_TARGET=$(STAGE_CC_WRAPPER) @CXX_FOR_TARGET@ $(FLAGS_FOR_TARGET) -CONFIGURED_CXX_FOR_TARGET=@CONFIGURED_CXX_FOR_TARGET@ -USUAL_CXX_FOR_TARGET = ` \ - if [ -f $$r/$(HOST_SUBDIR)/gcc/g++ ] ; then \ - (echo $$r/$(HOST_SUBDIR)/gcc/g++ -B$$r/$(HOST_SUBDIR)/gcc -nostdinc++; \ - test ! -f $$r/$(TARGET_SUBDIR)/libstdc++-v3/scripts/testsuite_flags || $(SHELL) $$r/$(TARGET_SUBDIR)/libstdc++-v3/scripts/testsuite_flags --build-includes; \ - echo -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs) | tr '\015\012' ' '; \ - else \ - if [ '$(host)' = '$(target)' ] ; then \ - echo $(CXX); \ - else \ - echo $(CONFIGURED_CXX_FOR_TARGET) ; \ - fi; \ - fi` - RAW_CXX_FOR_TARGET=$(STAGE_CC_WRAPPER) @RAW_CXX_FOR_TARGET@ $(FLAGS_FOR_TARGET) -USUAL_RAW_CXX_FOR_TARGET = ` \ - if [ -f $$r/$(HOST_SUBDIR)/gcc/xgcc ] ; then \ - echo $$r/$(HOST_SUBDIR)/gcc/xgcc -shared-libgcc -B$$r/$(HOST_SUBDIR)/gcc -nostdinc++ -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs; \ - else \ - if [ '$(host)' = '$(target)' ] ; then \ - echo $(CXX); \ - else \ - echo $(CONFIGURED_CXX_FOR_TARGET) ; \ - fi; \ - fi` - -CXXFLAGS_FOR_TARGET = $(CXXFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET) -LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates - GCJ_FOR_TARGET=$(STAGE_CC_WRAPPER) @GCJ_FOR_TARGET@ $(FLAGS_FOR_TARGET) -CONFIGURED_GCJ_FOR_TARGET=@CONFIGURED_GCJ_FOR_TARGET@ -USUAL_GCJ_FOR_TARGET = ` \ - if [ -f $$r/$(HOST_SUBDIR)/gcc/gcj ] ; then \ - echo $$r/$(HOST_SUBDIR)/gcc/gcj -B$$r/$(HOST_SUBDIR)/gcc ; \ - else \ - if [ '$(host)' = '$(target)' ] ; then \ - echo $(GCJ); \ - else \ - echo $(CONFIGURED_GCJ_FOR_TARGET) ; \ - fi; \ - fi` - GFORTRAN_FOR_TARGET=$(STAGE_CC_WRAPPER) @GFORTRAN_FOR_TARGET@ $(FLAGS_FOR_TARGET) -CONFIGURED_GFORTRAN_FOR_TARGET=@CONFIGURED_GFORTRAN_FOR_TARGET@ -USUAL_GFORTRAN_FOR_TARGET = ` \ - if [ -f $$r/$(HOST_SUBDIR)/gcc/gfortran ] ; then \ - echo $$r/$(HOST_SUBDIR)/gcc/gfortran -B$$r/$(HOST_SUBDIR)/gcc ; \ - else \ - if [ '$(host)' = '$(target)' ] ; then \ - echo $(GFORTRAN); \ - else \ - echo $(CONFIGURED_GFORTRAN_FOR_TARGET) ; \ - fi; \ - fi` - - DLLTOOL_FOR_TARGET=@DLLTOOL_FOR_TARGET@ -CONFIGURED_DLLTOOL_FOR_TARGET=@CONFIGURED_DLLTOOL_FOR_TARGET@ -USUAL_DLLTOOL_FOR_TARGET = ` \ - if [ -f $$r/$(HOST_SUBDIR)/binutils/dlltool ] ; then \ - echo $$r/$(HOST_SUBDIR)/binutils/dlltool ; \ - else \ - if [ '$(host)' = '$(target)' ] ; then \ - echo $(DLLTOOL); \ - else \ - echo $(CONFIGURED_DLLTOOL_FOR_TARGET) ; \ - fi; \ - fi` - LD_FOR_TARGET=@LD_FOR_TARGET@ -CONFIGURED_LD_FOR_TARGET=@CONFIGURED_LD_FOR_TARGET@ -USUAL_LD_FOR_TARGET = ` \ - if [ -f $$r/$(HOST_SUBDIR)/ld/ld-new ] ; then \ - echo $$r/$(HOST_SUBDIR)/ld/ld-new ; \ - elif [ -f $$r/$(HOST_SUBDIR)/gcc/collect-ld ]; then \ - echo $$r/$(HOST_SUBDIR)/gcc/collect-ld ; \ - else \ - if [ '$(host)' = '$(target)' ] ; then \ - echo $(LD); \ - else \ - echo $(CONFIGURED_LD_FOR_TARGET) ; \ - fi; \ - fi` - -LDFLAGS_FOR_TARGET = LIPO_FOR_TARGET=@LIPO_FOR_TARGET@ -CONFIGURED_LIPO_FOR_TARGET=@CONFIGURED_LIPO_FOR_TARGET@ -USUAL_LIPO_FOR_TARGET = ` \ - if [ '$(host)' = '$(target)' ] ; then \ - if [ x'$(LIPO)' != x ]; then \ - echo $(LIPO); \ - else \ - echo lipo; \ - fi; \ - else \ - echo $(CONFIGURED_LIPO_FOR_TARGET) ; \ - fi` - NM_FOR_TARGET=@NM_FOR_TARGET@ -CONFIGURED_NM_FOR_TARGET=@CONFIGURED_NM_FOR_TARGET@ -USUAL_NM_FOR_TARGET = ` \ - if [ -f $$r/$(HOST_SUBDIR)/binutils/nm-new ] ; then \ - echo $$r/$(HOST_SUBDIR)/binutils/nm-new ; \ - elif [ -f $$r/$(HOST_SUBDIR)/gcc/nm ]; then \ - echo $$r/$(HOST_SUBDIR)/gcc/nm ; \ - else \ - if [ '$(host)' = '$(target)' ] ; then \ - echo $(NM); \ - else \ - echo $(CONFIGURED_NM_FOR_TARGET) ; \ - fi; \ - fi` - OBJDUMP_FOR_TARGET=@OBJDUMP_FOR_TARGET@ -CONFIGURED_OBJDUMP_FOR_TARGET=@CONFIGURED_OBJDUMP_FOR_TARGET@ -USUAL_OBJDUMP_FOR_TARGET = ` \ - if [ -f $$r/$(HOST_SUBDIR)/binutils/objdump ] ; then \ - echo $$r/$(HOST_SUBDIR)/binutils/objdump ; \ - else \ - if [ '$(host)' = '$(target)' ] ; then \ - if [ x'$(OBJDUMP)' != x ]; then \ - echo $(OBJDUMP); \ - else \ - echo objdump; \ - fi; \ - else \ - echo $(CONFIGURED_OBJDUMP_FOR_TARGET) ; \ - fi; \ - fi` - RANLIB_FOR_TARGET=@RANLIB_FOR_TARGET@ -CONFIGURED_RANLIB_FOR_TARGET=@CONFIGURED_RANLIB_FOR_TARGET@ -USUAL_RANLIB_FOR_TARGET = ` \ - if [ -f $$r/$(HOST_SUBDIR)/binutils/ranlib ] ; then \ - echo $$r/$(HOST_SUBDIR)/binutils/ranlib ; \ - else \ - if [ '$(host)' = '$(target)' ] ; then \ - if [ x'$(RANLIB)' != x ]; then \ - echo $(RANLIB); \ - else \ - echo ranlib; \ - fi; \ - else \ - echo $(CONFIGURED_RANLIB_FOR_TARGET) ; \ - fi; \ - fi` - STRIP_FOR_TARGET=@STRIP_FOR_TARGET@ -CONFIGURED_STRIP_FOR_TARGET=@CONFIGURED_STRIP_FOR_TARGET@ -USUAL_STRIP_FOR_TARGET = ` \ - if [ -f $$r/$(HOST_SUBDIR)/binutils/strip ] ; then \ - echo $$r/$(HOST_SUBDIR)/binutils/strip ; \ - else \ - if [ '$(host)' = '$(target)' ] ; then \ - if [ x'$(STRIP)' != x ]; then \ - echo $(STRIP); \ - else \ - echo strip; \ - fi; \ - else \ - echo $(CONFIGURED_STRIP_FOR_TARGET) ; \ - fi; \ - fi` - WINDRES_FOR_TARGET=@WINDRES_FOR_TARGET@ -CONFIGURED_WINDRES_FOR_TARGET=@CONFIGURED_WINDRES_FOR_TARGET@ -USUAL_WINDRES_FOR_TARGET = ` \ - if [ -f $$r/$(HOST_SUBDIR)/binutils/windres ] ; then \ - echo $$r/$(HOST_SUBDIR)/binutils/windres ; \ - else \ - if [ '$(host)' = '$(target)' ] ; then \ - echo $(WINDRES); \ - else \ - echo $(CONFIGURED_WINDRES_FOR_TARGET) ; \ - fi; \ - fi` +COMPILER_AS_FOR_TARGET=@COMPILER_AS_FOR_TARGET@ +COMPILER_LD_FOR_TARGET=@COMPILER_LD_FOR_TARGET@ +COMPILER_NM_FOR_TARGET=@COMPILER_NM_FOR_TARGET@ + +# During gcc bootstrap, if we use some random cc for stage1 then +# CFLAGS will be just -g. We want to ensure that TARGET libraries +# (which we know are built with gcc) are built with optimizations so +# prepend -O2 when setting CFLAGS_FOR_TARGET. +CFLAGS_FOR_TARGET = -O2 $(CFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET) +SYSROOT_CFLAGS_FOR_TARGET = @SYSROOT_CFLAGS_FOR_TARGET@ +CXXFLAGS_FOR_TARGET = $(CXXFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET) +LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET) +LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates +LDFLAGS_FOR_TARGET = PICFLAG_FOR_TARGET = # ------------------------------------ @@ -672,11 +434,15 @@ BASE_FLAGS_TO_PASS = \ "SHELL=$(SHELL)" \ "YACC=$(YACC)" \ "AR_FLAGS=$(AR_FLAGS)" \ + "BOOT_CFLAGS=$(BOOT_CFLAGS)" \ + "BOOT_LDFLAGS=$(BOOT_LDFLAGS)" \ "CFLAGS=$(CFLAGS)" \ "CXXFLAGS=$(CXXFLAGS)" \ "LDFLAGS=$(LDFLAGS)" \ "LIBCFLAGS=$(LIBCFLAGS)" \ "LIBCXXFLAGS=$(LIBCXXFLAGS)" \ + "STAGE1_CFLAGS=$(STAGE1_CFLAGS)" \ + "STAGE1_LANGUAGES=$(STAGE1_LANGUAGES)" \ "AR_FOR_TARGET=$(AR_FOR_TARGET)" \ "AS_FOR_TARGET=$(AS_FOR_TARGET)" \ "CC_FOR_TARGET=$(CC_FOR_TARGET)" \ @@ -697,6 +463,7 @@ BASE_FLAGS_TO_PASS = \ "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \ "STRIP_FOR_TARGET=$(STRIP_FOR_TARGET)" \ "WINDRES_FOR_TARGET=$(WINDRES_FOR_TARGET)" \ + "LEAN=$(LEAN)" \ "CONFIG_SHELL=$(SHELL)" \ "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" @@ -712,8 +479,11 @@ EXTRA_HOST_FLAGS = \ 'CXX=$(CXX)' \ 'DLLTOOL=$(DLLTOOL)' \ 'LD=$(LD)' \ + 'LIPO=$(LIPO)' \ 'NM=$(NM)' \ + 'OBJDUMP=$(OBJDUMP)' \ 'RANLIB=$(RANLIB)' \ + 'STRIP=$(STRIP)' \ 'WINDRES=$(WINDRES)' FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) @@ -731,21 +501,22 @@ X11_FLAGS_TO_PASS = \ 'X11_EXTRA_LIBS=$(X11_EXTRA_LIBS)' # Flags to pass down to makes which are built with the target environment. -# The double $ decreases the length of the command line; the variables -# are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them. +# The double $ decreases the length of the command line; those variables +# are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them. The +# COMPILER_ prefixed variables are not passed down so we expand them here. EXTRA_TARGET_FLAGS = \ 'AR=$$(AR_FOR_TARGET)' \ - 'AS=$$(AS_FOR_TARGET)' \ + 'AS=$(COMPILER_AS_FOR_TARGET)' \ 'CC=$$(CC_FOR_TARGET)' \ 'CFLAGS=$$(CFLAGS_FOR_TARGET)' \ 'CXX=$$(CXX_FOR_TARGET)' \ 'CXXFLAGS=$$(CXXFLAGS_FOR_TARGET)' \ 'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \ - 'LD=$$(LD_FOR_TARGET)' \ + 'LD=$(COMPILER_LD_FOR_TARGET)' \ 'LDFLAGS=$$(LDFLAGS_FOR_TARGET)' \ 'LIBCFLAGS=$$(LIBCFLAGS_FOR_TARGET)' \ 'LIBCXXFLAGS=$$(LIBCXXFLAGS_FOR_TARGET)' \ - 'NM=$$(NM_FOR_TARGET)' \ + 'NM=$(COMPILER_NM_FOR_TARGET)' \ 'OBJDUMP=$$(OBJDUMP_FOR_TARGET)' \ 'RANLIB=$$(RANLIB_FOR_TARGET)' \ 'WINDRES=$$(WINDRES_FOR_TARGET)' @@ -768,8 +539,6 @@ EXTRA_GCC_FLAGS = \ "`echo 'LIBGCC2_CFLAGS=$(LIBGCC2_CFLAGS)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \ "`echo 'LIBGCC2_DEBUG_CFLAGS=$(LIBGCC2_DEBUG_CFLAGS)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \ "`echo 'LIBGCC2_INCLUDES=$(LIBGCC2_INCLUDES)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \ - "`echo 'STAGE1_CFLAGS=$(STAGE1_CFLAGS)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \ - "`echo 'BOOT_CFLAGS=$(BOOT_CFLAGS)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \ "`echo 'BOOT_ADAFLAGS=$(BOOT_ADAFLAGS)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" GCC_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(EXTRA_GCC_FLAGS) @@ -810,6 +579,7 @@ configure-host: \ maybe-configure-itcl \ maybe-configure-ld \ maybe-configure-libcpp \ + maybe-configure-libdecnumber \ maybe-configure-libgui \ maybe-configure-libiberty \ maybe-configure-libtool \ @@ -869,29 +639,19 @@ configure-target: \ .PHONY: all all: @if gcc-bootstrap + [ -f stage_final ] || echo stage3 > stage_final @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - if [ ! -f stage_last ]; then \ - $(MAKE) $(RECURSE_FLAGS_TO_PASS) bootstrap; \ - fi + $(MAKE) $(RECURSE_FLAGS_TO_PASS) `cat stage_final`-bubble @endif gcc-bootstrap - @$(unstage) -@if gcc-no-bootstrap - @r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(MAKE) $(RECURSE_FLAGS_TO_PASS) all-prebootstrap -@endif gcc-no-bootstrap + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ if [ -f stage_last ]; then \ - $(MAKE) $(TARGET_FLAGS_TO_PASS) all-host; \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) all-host all-target; \ else \ - $(MAKE) $(RECURSE_FLAGS_TO_PASS) all-host; \ + $(MAKE) $(RECURSE_FLAGS_TO_PASS) all-host all-target; \ fi - @r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(MAKE) $(RECURSE_FLAGS_TO_PASS) all-target - @$(stage) .PHONY: all-build all-build: \ @@ -938,6 +698,7 @@ all-host: \ maybe-all-itcl \ maybe-all-ld \ maybe-all-libcpp \ + maybe-all-libdecnumber \ maybe-all-libgui \ maybe-all-libiberty \ maybe-all-libtool \ @@ -1000,12 +761,11 @@ all-target: \ .PHONY: do-info do-info: - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(MAKE) $(RECURSE_FLAGS_TO_PASS) info-host \ info-target - @$(stage) .PHONY: info-host @@ -1044,6 +804,7 @@ info-host: \ maybe-info-itcl \ maybe-info-ld \ maybe-info-libcpp \ + maybe-info-libdecnumber \ maybe-info-libgui \ maybe-info-libiberty \ maybe-info-libtool \ @@ -1102,12 +863,11 @@ info-target: \ .PHONY: do-dvi do-dvi: - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(MAKE) $(RECURSE_FLAGS_TO_PASS) dvi-host \ dvi-target - @$(stage) .PHONY: dvi-host @@ -1146,6 +906,7 @@ dvi-host: \ maybe-dvi-itcl \ maybe-dvi-ld \ maybe-dvi-libcpp \ + maybe-dvi-libdecnumber \ maybe-dvi-libgui \ maybe-dvi-libiberty \ maybe-dvi-libtool \ @@ -1204,12 +965,11 @@ dvi-target: \ .PHONY: do-html do-html: - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(MAKE) $(RECURSE_FLAGS_TO_PASS) html-host \ html-target - @$(stage) .PHONY: html-host @@ -1248,6 +1008,7 @@ html-host: \ maybe-html-itcl \ maybe-html-ld \ maybe-html-libcpp \ + maybe-html-libdecnumber \ maybe-html-libgui \ maybe-html-libiberty \ maybe-html-libtool \ @@ -1306,12 +1067,11 @@ html-target: \ .PHONY: do-TAGS do-TAGS: - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(MAKE) $(RECURSE_FLAGS_TO_PASS) TAGS-host \ TAGS-target - @$(stage) .PHONY: TAGS-host @@ -1350,6 +1110,7 @@ TAGS-host: \ maybe-TAGS-itcl \ maybe-TAGS-ld \ maybe-TAGS-libcpp \ + maybe-TAGS-libdecnumber \ maybe-TAGS-libgui \ maybe-TAGS-libiberty \ maybe-TAGS-libtool \ @@ -1408,12 +1169,11 @@ TAGS-target: \ .PHONY: do-install-info do-install-info: - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(MAKE) $(RECURSE_FLAGS_TO_PASS) install-info-host \ install-info-target - @$(stage) .PHONY: install-info-host @@ -1452,6 +1212,7 @@ install-info-host: \ maybe-install-info-itcl \ maybe-install-info-ld \ maybe-install-info-libcpp \ + maybe-install-info-libdecnumber \ maybe-install-info-libgui \ maybe-install-info-libiberty \ maybe-install-info-libtool \ @@ -1510,12 +1271,11 @@ install-info-target: \ .PHONY: do-installcheck do-installcheck: - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(MAKE) $(RECURSE_FLAGS_TO_PASS) installcheck-host \ installcheck-target - @$(stage) .PHONY: installcheck-host @@ -1554,6 +1314,7 @@ installcheck-host: \ maybe-installcheck-itcl \ maybe-installcheck-ld \ maybe-installcheck-libcpp \ + maybe-installcheck-libdecnumber \ maybe-installcheck-libgui \ maybe-installcheck-libiberty \ maybe-installcheck-libtool \ @@ -1612,12 +1373,11 @@ installcheck-target: \ .PHONY: do-mostlyclean do-mostlyclean: - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(MAKE) $(RECURSE_FLAGS_TO_PASS) mostlyclean-host \ mostlyclean-target - @$(stage) .PHONY: mostlyclean-host @@ -1656,6 +1416,7 @@ mostlyclean-host: \ maybe-mostlyclean-itcl \ maybe-mostlyclean-ld \ maybe-mostlyclean-libcpp \ + maybe-mostlyclean-libdecnumber \ maybe-mostlyclean-libgui \ maybe-mostlyclean-libiberty \ maybe-mostlyclean-libtool \ @@ -1714,12 +1475,11 @@ mostlyclean-target: \ .PHONY: do-clean do-clean: - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(MAKE) $(RECURSE_FLAGS_TO_PASS) clean-host \ clean-target - @$(stage) .PHONY: clean-host @@ -1758,6 +1518,7 @@ clean-host: \ maybe-clean-itcl \ maybe-clean-ld \ maybe-clean-libcpp \ + maybe-clean-libdecnumber \ maybe-clean-libgui \ maybe-clean-libiberty \ maybe-clean-libtool \ @@ -1816,12 +1577,11 @@ clean-target: \ .PHONY: do-distclean do-distclean: - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(MAKE) $(RECURSE_FLAGS_TO_PASS) distclean-host \ distclean-target - @$(stage) .PHONY: distclean-host @@ -1860,6 +1620,7 @@ distclean-host: \ maybe-distclean-itcl \ maybe-distclean-ld \ maybe-distclean-libcpp \ + maybe-distclean-libdecnumber \ maybe-distclean-libgui \ maybe-distclean-libiberty \ maybe-distclean-libtool \ @@ -1918,12 +1679,11 @@ distclean-target: \ .PHONY: do-maintainer-clean do-maintainer-clean: - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(MAKE) $(RECURSE_FLAGS_TO_PASS) maintainer-clean-host \ maintainer-clean-target - @$(stage) .PHONY: maintainer-clean-host @@ -1962,6 +1722,7 @@ maintainer-clean-host: \ maybe-maintainer-clean-itcl \ maybe-maintainer-clean-ld \ maybe-maintainer-clean-libcpp \ + maybe-maintainer-clean-libdecnumber \ maybe-maintainer-clean-libgui \ maybe-maintainer-clean-libiberty \ maybe-maintainer-clean-libtool \ @@ -2044,7 +1805,7 @@ local-clean: local-distclean: -rm -f Makefile config.status config.cache mh-frag mt-frag - -rm -f multilib.out multilib.tmp maybedep.tmp serdep.tmp + -rm -f maybedep.tmp serdep.tmp -if [ "$(TARGET_SUBDIR)" != "." ]; then \ rm -rf $(TARGET_SUBDIR); \ else true; fi @@ -2069,14 +1830,10 @@ maintainer-clean: local-maintainer-clean do-maintainer-clean local-clean maintainer-clean: local-distclean realclean: maintainer-clean -# Extra dependency for clean-target, owing to the mixed nature of gcc +# Extra dependency for clean-target, owing to the mixed nature of gcc. clean-target: clean-target-libgcc clean-target-libgcc: - test ! -d gcc/libgcc || \ - (cd gcc/libgcc && find . -type d -print) | \ - while read d; do rm -f gcc/$$d/libgcc.a || : ; done - -rm -rf gcc/libgcc - -rm -f gcc/stmp-dirs + test ! -d gcc || (cd gcc && $(MAKE) $@) # Check target. @@ -2120,6 +1877,7 @@ check-host: \ maybe-check-itcl \ maybe-check-ld \ maybe-check-libcpp \ + maybe-check-libdecnumber \ maybe-check-libgui \ maybe-check-libiberty \ maybe-check-libtool \ @@ -2177,11 +1935,10 @@ check-target: \ maybe-check-target-libada do-check: - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(MAKE) $(RECURSE_FLAGS_TO_PASS) check-host check-target - @$(stage) # Automated reporting of test results. @@ -2208,11 +1965,10 @@ mail-report-with-warnings.log: warning.log .PHONY: install uninstall install: - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(MAKE) $(RECURSE_FLAGS_TO_PASS) installdirs install-host install-target - @$(stage) .PHONY: install-host-nogcc install-host-nogcc: \ @@ -2249,6 +2005,7 @@ install-host-nogcc: \ maybe-install-itcl \ maybe-install-ld \ maybe-install-libcpp \ + maybe-install-libdecnumber \ maybe-install-libgui \ maybe-install-libiberty \ maybe-install-libtool \ @@ -2319,6 +2076,7 @@ install-host: \ maybe-install-itcl \ maybe-install-ld \ maybe-install-libcpp \ + maybe-install-libdecnumber \ maybe-install-libgui \ maybe-install-libiberty \ maybe-install-libtool \ @@ -2382,6 +2140,7 @@ uninstall: install.all: install-no-fixedincludes @if [ -f ./gcc/Makefile ] ; then \ r=`${PWD_COMMAND}` ; export r ; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ (cd ./gcc && \ $(MAKE) $(FLAGS_TO_PASS) install-headers) ; \ @@ -2442,8 +2201,8 @@ TAGS: do-TAGS maybe-configure-build-libiberty: @if build-libiberty maybe-configure-build-libiberty: configure-build-libiberty -configure-build-libiberty: - @$(unstage) +configure-build-libiberty: + @: $(MAKE); $(unstage) @test ! -f $(BUILD_SUBDIR)/libiberty/Makefile || exit 0; \ $(SHELL) $(srcdir)/mkinstalldirs $(BUILD_SUBDIR)/libiberty ; \ r=`${PWD_COMMAND}`; export r; \ @@ -2474,7 +2233,7 @@ maybe-all-build-libiberty: TARGET-build-libiberty=all maybe-all-build-libiberty: all-build-libiberty all-build-libiberty: configure-build-libiberty - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(BUILD_EXPORTS) \ @@ -2490,8 +2249,8 @@ all-build-libiberty: configure-build-libiberty maybe-configure-build-bison: @if build-bison maybe-configure-build-bison: configure-build-bison -configure-build-bison: - @$(unstage) +configure-build-bison: + @: $(MAKE); $(unstage) @test ! -f $(BUILD_SUBDIR)/bison/Makefile || exit 0; \ $(SHELL) $(srcdir)/mkinstalldirs $(BUILD_SUBDIR)/bison ; \ r=`${PWD_COMMAND}`; export r; \ @@ -2522,7 +2281,7 @@ maybe-all-build-bison: TARGET-build-bison=all maybe-all-build-bison: all-build-bison all-build-bison: configure-build-bison - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(BUILD_EXPORTS) \ @@ -2538,8 +2297,8 @@ all-build-bison: configure-build-bison maybe-configure-build-byacc: @if build-byacc maybe-configure-build-byacc: configure-build-byacc -configure-build-byacc: - @$(unstage) +configure-build-byacc: + @: $(MAKE); $(unstage) @test ! -f $(BUILD_SUBDIR)/byacc/Makefile || exit 0; \ $(SHELL) $(srcdir)/mkinstalldirs $(BUILD_SUBDIR)/byacc ; \ r=`${PWD_COMMAND}`; export r; \ @@ -2570,7 +2329,7 @@ maybe-all-build-byacc: TARGET-build-byacc=all maybe-all-build-byacc: all-build-byacc all-build-byacc: configure-build-byacc - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(BUILD_EXPORTS) \ @@ -2586,8 +2345,8 @@ all-build-byacc: configure-build-byacc maybe-configure-build-flex: @if build-flex maybe-configure-build-flex: configure-build-flex -configure-build-flex: - @$(unstage) +configure-build-flex: + @: $(MAKE); $(unstage) @test ! -f $(BUILD_SUBDIR)/flex/Makefile || exit 0; \ $(SHELL) $(srcdir)/mkinstalldirs $(BUILD_SUBDIR)/flex ; \ r=`${PWD_COMMAND}`; export r; \ @@ -2618,7 +2377,7 @@ maybe-all-build-flex: TARGET-build-flex=all maybe-all-build-flex: all-build-flex all-build-flex: configure-build-flex - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(BUILD_EXPORTS) \ @@ -2634,8 +2393,8 @@ all-build-flex: configure-build-flex maybe-configure-build-m4: @if build-m4 maybe-configure-build-m4: configure-build-m4 -configure-build-m4: - @$(unstage) +configure-build-m4: + @: $(MAKE); $(unstage) @test ! -f $(BUILD_SUBDIR)/m4/Makefile || exit 0; \ $(SHELL) $(srcdir)/mkinstalldirs $(BUILD_SUBDIR)/m4 ; \ r=`${PWD_COMMAND}`; export r; \ @@ -2666,7 +2425,7 @@ maybe-all-build-m4: TARGET-build-m4=all maybe-all-build-m4: all-build-m4 all-build-m4: configure-build-m4 - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(BUILD_EXPORTS) \ @@ -2682,8 +2441,8 @@ all-build-m4: configure-build-m4 maybe-configure-build-texinfo: @if build-texinfo maybe-configure-build-texinfo: configure-build-texinfo -configure-build-texinfo: - @$(unstage) +configure-build-texinfo: + @: $(MAKE); $(unstage) @test ! -f $(BUILD_SUBDIR)/texinfo/Makefile || exit 0; \ $(SHELL) $(srcdir)/mkinstalldirs $(BUILD_SUBDIR)/texinfo ; \ r=`${PWD_COMMAND}`; export r; \ @@ -2714,7 +2473,7 @@ maybe-all-build-texinfo: TARGET-build-texinfo=all maybe-all-build-texinfo: all-build-texinfo all-build-texinfo: configure-build-texinfo - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(BUILD_EXPORTS) \ @@ -2730,8 +2489,8 @@ all-build-texinfo: configure-build-texinfo maybe-configure-build-fixincludes: @if build-fixincludes maybe-configure-build-fixincludes: configure-build-fixincludes -configure-build-fixincludes: - @$(unstage) +configure-build-fixincludes: + @: $(MAKE); $(unstage) @test ! -f $(BUILD_SUBDIR)/fixincludes/Makefile || exit 0; \ $(SHELL) $(srcdir)/mkinstalldirs $(BUILD_SUBDIR)/fixincludes ; \ r=`${PWD_COMMAND}`; export r; \ @@ -2762,7 +2521,7 @@ maybe-all-build-fixincludes: TARGET-build-fixincludes=all maybe-all-build-fixincludes: all-build-fixincludes all-build-fixincludes: configure-build-fixincludes - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(BUILD_EXPORTS) \ @@ -2783,8 +2542,8 @@ all-build-fixincludes: configure-build-fixincludes maybe-configure-ash: @if ash maybe-configure-ash: configure-ash -configure-ash: - @$(unstage) +configure-ash: + @: $(MAKE); $(unstage) @test ! -f $(HOST_SUBDIR)/ash/Makefile || exit 0; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/ash ; \ r=`${PWD_COMMAND}`; export r; \ @@ -2814,7 +2573,7 @@ maybe-all-ash: TARGET-ash=all maybe-all-ash: all-ash all-ash: configure-ash - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -2831,7 +2590,7 @@ maybe-check-ash: maybe-check-ash: check-ash check-ash: - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -2846,7 +2605,7 @@ maybe-install-ash: maybe-install-ash: install-ash install-ash: installdirs - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -2864,7 +2623,7 @@ maybe-info-ash: info-ash info-ash: \ configure-ash - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./ash/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -2890,7 +2649,7 @@ maybe-dvi-ash: dvi-ash dvi-ash: \ configure-ash - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./ash/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -2916,7 +2675,7 @@ maybe-html-ash: html-ash html-ash: \ configure-ash - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./ash/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -2942,7 +2701,7 @@ maybe-TAGS-ash: TAGS-ash TAGS-ash: \ configure-ash - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./ash/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -2969,7 +2728,7 @@ maybe-install-info-ash: install-info-ash install-info-ash: \ configure-ash \ info-ash - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./ash/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -2995,7 +2754,7 @@ maybe-installcheck-ash: installcheck-ash installcheck-ash: \ configure-ash - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./ash/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -3020,7 +2779,7 @@ maybe-mostlyclean-ash: maybe-mostlyclean-ash: mostlyclean-ash mostlyclean-ash: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./ash/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -3045,7 +2804,7 @@ maybe-clean-ash: maybe-clean-ash: clean-ash clean-ash: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./ash/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -3070,7 +2829,7 @@ maybe-distclean-ash: maybe-distclean-ash: distclean-ash distclean-ash: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./ash/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -3095,7 +2854,7 @@ maybe-maintainer-clean-ash: maybe-maintainer-clean-ash: maintainer-clean-ash maintainer-clean-ash: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./ash/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -3120,8 +2879,8 @@ maintainer-clean-ash: maybe-configure-autoconf: @if autoconf maybe-configure-autoconf: configure-autoconf -configure-autoconf: - @$(unstage) +configure-autoconf: + @: $(MAKE); $(unstage) @test ! -f $(HOST_SUBDIR)/autoconf/Makefile || exit 0; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/autoconf ; \ r=`${PWD_COMMAND}`; export r; \ @@ -3151,7 +2910,7 @@ maybe-all-autoconf: TARGET-autoconf=all maybe-all-autoconf: all-autoconf all-autoconf: configure-autoconf - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -3168,7 +2927,7 @@ maybe-check-autoconf: maybe-check-autoconf: check-autoconf check-autoconf: - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -3183,7 +2942,7 @@ maybe-install-autoconf: maybe-install-autoconf: install-autoconf install-autoconf: installdirs - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -3201,7 +2960,7 @@ maybe-info-autoconf: info-autoconf info-autoconf: \ configure-autoconf - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./autoconf/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -3227,7 +2986,7 @@ maybe-dvi-autoconf: dvi-autoconf dvi-autoconf: \ configure-autoconf - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./autoconf/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -3253,7 +3012,7 @@ maybe-html-autoconf: html-autoconf html-autoconf: \ configure-autoconf - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./autoconf/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -3279,7 +3038,7 @@ maybe-TAGS-autoconf: TAGS-autoconf TAGS-autoconf: \ configure-autoconf - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./autoconf/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -3306,7 +3065,7 @@ maybe-install-info-autoconf: install-info-autoconf install-info-autoconf: \ configure-autoconf \ info-autoconf - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./autoconf/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -3332,7 +3091,7 @@ maybe-installcheck-autoconf: installcheck-autoconf installcheck-autoconf: \ configure-autoconf - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./autoconf/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -3357,7 +3116,7 @@ maybe-mostlyclean-autoconf: maybe-mostlyclean-autoconf: mostlyclean-autoconf mostlyclean-autoconf: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./autoconf/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -3382,7 +3141,7 @@ maybe-clean-autoconf: maybe-clean-autoconf: clean-autoconf clean-autoconf: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./autoconf/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -3407,7 +3166,7 @@ maybe-distclean-autoconf: maybe-distclean-autoconf: distclean-autoconf distclean-autoconf: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./autoconf/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -3432,7 +3191,7 @@ maybe-maintainer-clean-autoconf: maybe-maintainer-clean-autoconf: maintainer-clean-autoconf maintainer-clean-autoconf: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./autoconf/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -3457,8 +3216,8 @@ maintainer-clean-autoconf: maybe-configure-automake: @if automake maybe-configure-automake: configure-automake -configure-automake: - @$(unstage) +configure-automake: + @: $(MAKE); $(unstage) @test ! -f $(HOST_SUBDIR)/automake/Makefile || exit 0; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/automake ; \ r=`${PWD_COMMAND}`; export r; \ @@ -3488,7 +3247,7 @@ maybe-all-automake: TARGET-automake=all maybe-all-automake: all-automake all-automake: configure-automake - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -3505,7 +3264,7 @@ maybe-check-automake: maybe-check-automake: check-automake check-automake: - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -3520,7 +3279,7 @@ maybe-install-automake: maybe-install-automake: install-automake install-automake: installdirs - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -3538,7 +3297,7 @@ maybe-info-automake: info-automake info-automake: \ configure-automake - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./automake/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -3564,7 +3323,7 @@ maybe-dvi-automake: dvi-automake dvi-automake: \ configure-automake - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./automake/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -3590,7 +3349,7 @@ maybe-html-automake: html-automake html-automake: \ configure-automake - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./automake/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -3616,7 +3375,7 @@ maybe-TAGS-automake: TAGS-automake TAGS-automake: \ configure-automake - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./automake/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -3643,7 +3402,7 @@ maybe-install-info-automake: install-info-automake install-info-automake: \ configure-automake \ info-automake - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./automake/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -3669,7 +3428,7 @@ maybe-installcheck-automake: installcheck-automake installcheck-automake: \ configure-automake - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./automake/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -3694,7 +3453,7 @@ maybe-mostlyclean-automake: maybe-mostlyclean-automake: mostlyclean-automake mostlyclean-automake: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./automake/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -3719,7 +3478,7 @@ maybe-clean-automake: maybe-clean-automake: clean-automake clean-automake: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./automake/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -3744,7 +3503,7 @@ maybe-distclean-automake: maybe-distclean-automake: distclean-automake distclean-automake: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./automake/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -3769,7 +3528,7 @@ maybe-maintainer-clean-automake: maybe-maintainer-clean-automake: maintainer-clean-automake maintainer-clean-automake: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./automake/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -3794,8 +3553,8 @@ maintainer-clean-automake: maybe-configure-bash: @if bash maybe-configure-bash: configure-bash -configure-bash: - @$(unstage) +configure-bash: + @: $(MAKE); $(unstage) @test ! -f $(HOST_SUBDIR)/bash/Makefile || exit 0; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/bash ; \ r=`${PWD_COMMAND}`; export r; \ @@ -3825,7 +3584,7 @@ maybe-all-bash: TARGET-bash=all maybe-all-bash: all-bash all-bash: configure-bash - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -3842,7 +3601,7 @@ maybe-check-bash: maybe-check-bash: check-bash check-bash: - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -3857,7 +3616,7 @@ maybe-install-bash: maybe-install-bash: install-bash install-bash: installdirs - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -3875,7 +3634,7 @@ maybe-info-bash: info-bash info-bash: \ configure-bash - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./bash/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -3901,7 +3660,7 @@ maybe-dvi-bash: dvi-bash dvi-bash: \ configure-bash - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./bash/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -3927,7 +3686,7 @@ maybe-html-bash: html-bash html-bash: \ configure-bash - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./bash/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -3953,7 +3712,7 @@ maybe-TAGS-bash: TAGS-bash TAGS-bash: \ configure-bash - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./bash/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -3980,7 +3739,7 @@ maybe-install-info-bash: install-info-bash install-info-bash: \ configure-bash \ info-bash - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./bash/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -4006,7 +3765,7 @@ maybe-installcheck-bash: installcheck-bash installcheck-bash: \ configure-bash - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./bash/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -4031,7 +3790,7 @@ maybe-mostlyclean-bash: maybe-mostlyclean-bash: mostlyclean-bash mostlyclean-bash: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./bash/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -4056,7 +3815,7 @@ maybe-clean-bash: maybe-clean-bash: clean-bash clean-bash: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./bash/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -4081,7 +3840,7 @@ maybe-distclean-bash: maybe-distclean-bash: distclean-bash distclean-bash: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./bash/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -4106,7 +3865,7 @@ maybe-maintainer-clean-bash: maybe-maintainer-clean-bash: maintainer-clean-bash maintainer-clean-bash: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./bash/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -4131,7 +3890,7 @@ maintainer-clean-bash: maybe-configure-bfd: @if bfd maybe-configure-bfd: configure-bfd -configure-bfd: +configure-bfd: @test -f stage_last && exit 0; \ test ! -f $(HOST_SUBDIR)/bfd/Makefile || exit 0; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/bfd ; \ @@ -4158,13 +3917,13 @@ configure-bfd: maybe-configure-stage1-bfd: @if bfd-bootstrap maybe-configure-stage1-bfd: configure-stage1-bfd -configure-stage1-bfd: +configure-stage1-bfd: @[ `cat stage_current` = stage1 ] || $(MAKE) stage1-start - @[ -f $(HOST_SUBDIR)/bfd/Makefile ] && exit 0 || : ; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/bfd + test ! -f $(HOST_SUBDIR)/bfd/Makefile || exit 0; \ $(HOST_EXPORTS) \ echo Configuring stage 1 in $(HOST_SUBDIR)/bfd ; \ + $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/bfd ; \ cd $(HOST_SUBDIR)/bfd || exit 1; \ case $(srcdir) in \ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ @@ -4182,14 +3941,14 @@ configure-stage1-bfd: maybe-configure-stage2-bfd: @if bfd-bootstrap maybe-configure-stage2-bfd: configure-stage2-bfd -configure-stage2-bfd: +configure-stage2-bfd: @[ `cat stage_current` = stage2 ] || $(MAKE) stage2-start - @[ -f $(HOST_SUBDIR)/bfd/Makefile ] && exit 0 || : ; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/bfd + test ! -f $(HOST_SUBDIR)/bfd/Makefile || exit 0; \ $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ echo Configuring stage 2 in $(HOST_SUBDIR)/bfd ; \ + $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/bfd ; \ cd $(HOST_SUBDIR)/bfd || exit 1; \ case $(srcdir) in \ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ @@ -4207,14 +3966,14 @@ configure-stage2-bfd: maybe-configure-stage3-bfd: @if bfd-bootstrap maybe-configure-stage3-bfd: configure-stage3-bfd -configure-stage3-bfd: +configure-stage3-bfd: @[ `cat stage_current` = stage3 ] || $(MAKE) stage3-start - @[ -f $(HOST_SUBDIR)/bfd/Makefile ] && exit 0 || : ; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/bfd + test ! -f $(HOST_SUBDIR)/bfd/Makefile || exit 0; \ $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ echo Configuring stage 3 in $(HOST_SUBDIR)/bfd ; \ + $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/bfd ; \ cd $(HOST_SUBDIR)/bfd || exit 1; \ case $(srcdir) in \ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ @@ -4232,14 +3991,14 @@ configure-stage3-bfd: maybe-configure-stage4-bfd: @if bfd-bootstrap maybe-configure-stage4-bfd: configure-stage4-bfd -configure-stage4-bfd: +configure-stage4-bfd: @[ `cat stage_current` = stage4 ] || $(MAKE) stage4-start - @[ -f $(HOST_SUBDIR)/bfd/Makefile ] && exit 0 || : ; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/bfd + test ! -f $(HOST_SUBDIR)/bfd/Makefile || exit 0; \ $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ echo Configuring stage 4 in $(HOST_SUBDIR)/bfd ; \ + $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/bfd ; \ cd $(HOST_SUBDIR)/bfd || exit 1; \ case $(srcdir) in \ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ @@ -4257,14 +4016,14 @@ configure-stage4-bfd: maybe-configure-stageprofile-bfd: @if bfd-bootstrap maybe-configure-stageprofile-bfd: configure-stageprofile-bfd -configure-stageprofile-bfd: +configure-stageprofile-bfd: @[ `cat stage_current` = stageprofile ] || $(MAKE) stageprofile-start - @[ -f $(HOST_SUBDIR)/bfd/Makefile ] && exit 0 || : ; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/bfd + test ! -f $(HOST_SUBDIR)/bfd/Makefile || exit 0; \ $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ echo Configuring stage profile in $(HOST_SUBDIR)/bfd ; \ + $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/bfd ; \ cd $(HOST_SUBDIR)/bfd || exit 1; \ case $(srcdir) in \ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ @@ -4282,14 +4041,14 @@ configure-stageprofile-bfd: maybe-configure-stagefeedback-bfd: @if bfd-bootstrap maybe-configure-stagefeedback-bfd: configure-stagefeedback-bfd -configure-stagefeedback-bfd: +configure-stagefeedback-bfd: @[ `cat stage_current` = stagefeedback ] || $(MAKE) stagefeedback-start - @[ -f $(HOST_SUBDIR)/bfd/Makefile ] && exit 0 || : ; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/bfd + test ! -f $(HOST_SUBDIR)/bfd/Makefile || exit 0; \ $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ echo Configuring stage feedback in $(HOST_SUBDIR)/bfd ; \ + $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/bfd ; \ cd $(HOST_SUBDIR)/bfd || exit 1; \ case $(srcdir) in \ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ @@ -4345,7 +4104,7 @@ clean-stage1: clean-stage1-bfd clean-stage1-bfd: @[ -f $(HOST_SUBDIR)/bfd/Makefile ] || [ -f $(HOST_SUBDIR)/stage1-bfd/Makefile ] \ || exit 0 ; \ - @[ `cat stage_current` = stage1 ] || $(MAKE) stage1-start + [ `cat stage_current` = stage1 ] || $(MAKE) stage1-start cd $(HOST_SUBDIR)/bfd && \ $(MAKE) $(FLAGS_TO_PASS) \ CFLAGS="$(STAGE1_CFLAGS)" clean @@ -4375,7 +4134,7 @@ clean-stage2: clean-stage2-bfd clean-stage2-bfd: @[ -f $(HOST_SUBDIR)/bfd/Makefile ] || [ -f $(HOST_SUBDIR)/stage2-bfd/Makefile ] \ || exit 0 ; \ - @[ `cat stage_current` = stage2 ] || $(MAKE) stage2-start + [ `cat stage_current` = stage2 ] || $(MAKE) stage2-start cd $(HOST_SUBDIR)/bfd && \ $(MAKE) $(FLAGS_TO_PASS) \ $(POSTSTAGE1_FLAGS_TO_PASS) \ @@ -4406,7 +4165,7 @@ clean-stage3: clean-stage3-bfd clean-stage3-bfd: @[ -f $(HOST_SUBDIR)/bfd/Makefile ] || [ -f $(HOST_SUBDIR)/stage3-bfd/Makefile ] \ || exit 0 ; \ - @[ `cat stage_current` = stage3 ] || $(MAKE) stage3-start + [ `cat stage_current` = stage3 ] || $(MAKE) stage3-start cd $(HOST_SUBDIR)/bfd && \ $(MAKE) $(FLAGS_TO_PASS) \ $(POSTSTAGE1_FLAGS_TO_PASS) \ @@ -4437,7 +4196,7 @@ clean-stage4: clean-stage4-bfd clean-stage4-bfd: @[ -f $(HOST_SUBDIR)/bfd/Makefile ] || [ -f $(HOST_SUBDIR)/stage4-bfd/Makefile ] \ || exit 0 ; \ - @[ `cat stage_current` = stage4 ] || $(MAKE) stage4-start + [ `cat stage_current` = stage4 ] || $(MAKE) stage4-start cd $(HOST_SUBDIR)/bfd && \ $(MAKE) $(FLAGS_TO_PASS) \ $(POSTSTAGE1_FLAGS_TO_PASS) \ @@ -4468,7 +4227,7 @@ clean-stageprofile: clean-stageprofile-bfd clean-stageprofile-bfd: @[ -f $(HOST_SUBDIR)/bfd/Makefile ] || [ -f $(HOST_SUBDIR)/stageprofile-bfd/Makefile ] \ || exit 0 ; \ - @[ `cat stage_current` = stageprofile ] || $(MAKE) stageprofile-start + [ `cat stage_current` = stageprofile ] || $(MAKE) stageprofile-start cd $(HOST_SUBDIR)/bfd && \ $(MAKE) $(FLAGS_TO_PASS) \ $(POSTSTAGE1_FLAGS_TO_PASS) \ @@ -4499,7 +4258,7 @@ clean-stagefeedback: clean-stagefeedback-bfd clean-stagefeedback-bfd: @[ -f $(HOST_SUBDIR)/bfd/Makefile ] || [ -f $(HOST_SUBDIR)/stagefeedback-bfd/Makefile ] \ || exit 0 ; \ - @[ `cat stage_current` = stagefeedback ] || $(MAKE) stagefeedback-start + [ `cat stage_current` = stagefeedback ] || $(MAKE) stagefeedback-start cd $(HOST_SUBDIR)/bfd && \ $(MAKE) $(FLAGS_TO_PASS) \ $(POSTSTAGE1_FLAGS_TO_PASS) \ @@ -4516,7 +4275,7 @@ maybe-check-bfd: maybe-check-bfd: check-bfd check-bfd: - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -4531,7 +4290,7 @@ maybe-install-bfd: maybe-install-bfd: install-bfd install-bfd: installdirs - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -4795,7 +4554,7 @@ maintainer-clean-bfd: maybe-configure-opcodes: @if opcodes maybe-configure-opcodes: configure-opcodes -configure-opcodes: +configure-opcodes: @test -f stage_last && exit 0; \ test ! -f $(HOST_SUBDIR)/opcodes/Makefile || exit 0; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/opcodes ; \ @@ -4822,13 +4581,13 @@ configure-opcodes: maybe-configure-stage1-opcodes: @if opcodes-bootstrap maybe-configure-stage1-opcodes: configure-stage1-opcodes -configure-stage1-opcodes: +configure-stage1-opcodes: @[ `cat stage_current` = stage1 ] || $(MAKE) stage1-start - @[ -f $(HOST_SUBDIR)/opcodes/Makefile ] && exit 0 || : ; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/opcodes + test ! -f $(HOST_SUBDIR)/opcodes/Makefile || exit 0; \ $(HOST_EXPORTS) \ echo Configuring stage 1 in $(HOST_SUBDIR)/opcodes ; \ + $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/opcodes ; \ cd $(HOST_SUBDIR)/opcodes || exit 1; \ case $(srcdir) in \ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ @@ -4846,14 +4605,14 @@ configure-stage1-opcodes: maybe-configure-stage2-opcodes: @if opcodes-bootstrap maybe-configure-stage2-opcodes: configure-stage2-opcodes -configure-stage2-opcodes: +configure-stage2-opcodes: @[ `cat stage_current` = stage2 ] || $(MAKE) stage2-start - @[ -f $(HOST_SUBDIR)/opcodes/Makefile ] && exit 0 || : ; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/opcodes + test ! -f $(HOST_SUBDIR)/opcodes/Makefile || exit 0; \ $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ echo Configuring stage 2 in $(HOST_SUBDIR)/opcodes ; \ + $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/opcodes ; \ cd $(HOST_SUBDIR)/opcodes || exit 1; \ case $(srcdir) in \ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ @@ -4871,14 +4630,14 @@ configure-stage2-opcodes: maybe-configure-stage3-opcodes: @if opcodes-bootstrap maybe-configure-stage3-opcodes: configure-stage3-opcodes -configure-stage3-opcodes: +configure-stage3-opcodes: @[ `cat stage_current` = stage3 ] || $(MAKE) stage3-start - @[ -f $(HOST_SUBDIR)/opcodes/Makefile ] && exit 0 || : ; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/opcodes + test ! -f $(HOST_SUBDIR)/opcodes/Makefile || exit 0; \ $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ echo Configuring stage 3 in $(HOST_SUBDIR)/opcodes ; \ + $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/opcodes ; \ cd $(HOST_SUBDIR)/opcodes || exit 1; \ case $(srcdir) in \ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ @@ -4896,14 +4655,14 @@ configure-stage3-opcodes: maybe-configure-stage4-opcodes: @if opcodes-bootstrap maybe-configure-stage4-opcodes: configure-stage4-opcodes -configure-stage4-opcodes: +configure-stage4-opcodes: @[ `cat stage_current` = stage4 ] || $(MAKE) stage4-start - @[ -f $(HOST_SUBDIR)/opcodes/Makefile ] && exit 0 || : ; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/opcodes + test ! -f $(HOST_SUBDIR)/opcodes/Makefile || exit 0; \ $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ echo Configuring stage 4 in $(HOST_SUBDIR)/opcodes ; \ + $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/opcodes ; \ cd $(HOST_SUBDIR)/opcodes || exit 1; \ case $(srcdir) in \ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ @@ -4921,14 +4680,14 @@ configure-stage4-opcodes: maybe-configure-stageprofile-opcodes: @if opcodes-bootstrap maybe-configure-stageprofile-opcodes: configure-stageprofile-opcodes -configure-stageprofile-opcodes: +configure-stageprofile-opcodes: @[ `cat stage_current` = stageprofile ] || $(MAKE) stageprofile-start - @[ -f $(HOST_SUBDIR)/opcodes/Makefile ] && exit 0 || : ; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/opcodes + test ! -f $(HOST_SUBDIR)/opcodes/Makefile || exit 0; \ $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ echo Configuring stage profile in $(HOST_SUBDIR)/opcodes ; \ + $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/opcodes ; \ cd $(HOST_SUBDIR)/opcodes || exit 1; \ case $(srcdir) in \ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ @@ -4946,14 +4705,14 @@ configure-stageprofile-opcodes: maybe-configure-stagefeedback-opcodes: @if opcodes-bootstrap maybe-configure-stagefeedback-opcodes: configure-stagefeedback-opcodes -configure-stagefeedback-opcodes: +configure-stagefeedback-opcodes: @[ `cat stage_current` = stagefeedback ] || $(MAKE) stagefeedback-start - @[ -f $(HOST_SUBDIR)/opcodes/Makefile ] && exit 0 || : ; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/opcodes + test ! -f $(HOST_SUBDIR)/opcodes/Makefile || exit 0; \ $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ echo Configuring stage feedback in $(HOST_SUBDIR)/opcodes ; \ + $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/opcodes ; \ cd $(HOST_SUBDIR)/opcodes || exit 1; \ case $(srcdir) in \ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ @@ -5009,7 +4768,7 @@ clean-stage1: clean-stage1-opcodes clean-stage1-opcodes: @[ -f $(HOST_SUBDIR)/opcodes/Makefile ] || [ -f $(HOST_SUBDIR)/stage1-opcodes/Makefile ] \ || exit 0 ; \ - @[ `cat stage_current` = stage1 ] || $(MAKE) stage1-start + [ `cat stage_current` = stage1 ] || $(MAKE) stage1-start cd $(HOST_SUBDIR)/opcodes && \ $(MAKE) $(FLAGS_TO_PASS) \ CFLAGS="$(STAGE1_CFLAGS)" clean @@ -5039,7 +4798,7 @@ clean-stage2: clean-stage2-opcodes clean-stage2-opcodes: @[ -f $(HOST_SUBDIR)/opcodes/Makefile ] || [ -f $(HOST_SUBDIR)/stage2-opcodes/Makefile ] \ || exit 0 ; \ - @[ `cat stage_current` = stage2 ] || $(MAKE) stage2-start + [ `cat stage_current` = stage2 ] || $(MAKE) stage2-start cd $(HOST_SUBDIR)/opcodes && \ $(MAKE) $(FLAGS_TO_PASS) \ $(POSTSTAGE1_FLAGS_TO_PASS) \ @@ -5070,7 +4829,7 @@ clean-stage3: clean-stage3-opcodes clean-stage3-opcodes: @[ -f $(HOST_SUBDIR)/opcodes/Makefile ] || [ -f $(HOST_SUBDIR)/stage3-opcodes/Makefile ] \ || exit 0 ; \ - @[ `cat stage_current` = stage3 ] || $(MAKE) stage3-start + [ `cat stage_current` = stage3 ] || $(MAKE) stage3-start cd $(HOST_SUBDIR)/opcodes && \ $(MAKE) $(FLAGS_TO_PASS) \ $(POSTSTAGE1_FLAGS_TO_PASS) \ @@ -5101,7 +4860,7 @@ clean-stage4: clean-stage4-opcodes clean-stage4-opcodes: @[ -f $(HOST_SUBDIR)/opcodes/Makefile ] || [ -f $(HOST_SUBDIR)/stage4-opcodes/Makefile ] \ || exit 0 ; \ - @[ `cat stage_current` = stage4 ] || $(MAKE) stage4-start + [ `cat stage_current` = stage4 ] || $(MAKE) stage4-start cd $(HOST_SUBDIR)/opcodes && \ $(MAKE) $(FLAGS_TO_PASS) \ $(POSTSTAGE1_FLAGS_TO_PASS) \ @@ -5132,7 +4891,7 @@ clean-stageprofile: clean-stageprofile-opcodes clean-stageprofile-opcodes: @[ -f $(HOST_SUBDIR)/opcodes/Makefile ] || [ -f $(HOST_SUBDIR)/stageprofile-opcodes/Makefile ] \ || exit 0 ; \ - @[ `cat stage_current` = stageprofile ] || $(MAKE) stageprofile-start + [ `cat stage_current` = stageprofile ] || $(MAKE) stageprofile-start cd $(HOST_SUBDIR)/opcodes && \ $(MAKE) $(FLAGS_TO_PASS) \ $(POSTSTAGE1_FLAGS_TO_PASS) \ @@ -5163,7 +4922,7 @@ clean-stagefeedback: clean-stagefeedback-opcodes clean-stagefeedback-opcodes: @[ -f $(HOST_SUBDIR)/opcodes/Makefile ] || [ -f $(HOST_SUBDIR)/stagefeedback-opcodes/Makefile ] \ || exit 0 ; \ - @[ `cat stage_current` = stagefeedback ] || $(MAKE) stagefeedback-start + [ `cat stage_current` = stagefeedback ] || $(MAKE) stagefeedback-start cd $(HOST_SUBDIR)/opcodes && \ $(MAKE) $(FLAGS_TO_PASS) \ $(POSTSTAGE1_FLAGS_TO_PASS) \ @@ -5180,7 +4939,7 @@ maybe-check-opcodes: maybe-check-opcodes: check-opcodes check-opcodes: - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -5195,7 +4954,7 @@ maybe-install-opcodes: maybe-install-opcodes: install-opcodes install-opcodes: installdirs - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -5459,7 +5218,7 @@ maintainer-clean-opcodes: maybe-configure-binutils: @if binutils maybe-configure-binutils: configure-binutils -configure-binutils: +configure-binutils: @test -f stage_last && exit 0; \ test ! -f $(HOST_SUBDIR)/binutils/Makefile || exit 0; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/binutils ; \ @@ -5486,13 +5245,13 @@ configure-binutils: maybe-configure-stage1-binutils: @if binutils-bootstrap maybe-configure-stage1-binutils: configure-stage1-binutils -configure-stage1-binutils: +configure-stage1-binutils: @[ `cat stage_current` = stage1 ] || $(MAKE) stage1-start - @[ -f $(HOST_SUBDIR)/binutils/Makefile ] && exit 0 || : ; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/binutils + test ! -f $(HOST_SUBDIR)/binutils/Makefile || exit 0; \ $(HOST_EXPORTS) \ echo Configuring stage 1 in $(HOST_SUBDIR)/binutils ; \ + $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/binutils ; \ cd $(HOST_SUBDIR)/binutils || exit 1; \ case $(srcdir) in \ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ @@ -5510,14 +5269,14 @@ configure-stage1-binutils: maybe-configure-stage2-binutils: @if binutils-bootstrap maybe-configure-stage2-binutils: configure-stage2-binutils -configure-stage2-binutils: +configure-stage2-binutils: @[ `cat stage_current` = stage2 ] || $(MAKE) stage2-start - @[ -f $(HOST_SUBDIR)/binutils/Makefile ] && exit 0 || : ; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/binutils + test ! -f $(HOST_SUBDIR)/binutils/Makefile || exit 0; \ $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ echo Configuring stage 2 in $(HOST_SUBDIR)/binutils ; \ + $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/binutils ; \ cd $(HOST_SUBDIR)/binutils || exit 1; \ case $(srcdir) in \ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ @@ -5535,14 +5294,14 @@ configure-stage2-binutils: maybe-configure-stage3-binutils: @if binutils-bootstrap maybe-configure-stage3-binutils: configure-stage3-binutils -configure-stage3-binutils: +configure-stage3-binutils: @[ `cat stage_current` = stage3 ] || $(MAKE) stage3-start - @[ -f $(HOST_SUBDIR)/binutils/Makefile ] && exit 0 || : ; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/binutils + test ! -f $(HOST_SUBDIR)/binutils/Makefile || exit 0; \ $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ echo Configuring stage 3 in $(HOST_SUBDIR)/binutils ; \ + $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/binutils ; \ cd $(HOST_SUBDIR)/binutils || exit 1; \ case $(srcdir) in \ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ @@ -5560,14 +5319,14 @@ configure-stage3-binutils: maybe-configure-stage4-binutils: @if binutils-bootstrap maybe-configure-stage4-binutils: configure-stage4-binutils -configure-stage4-binutils: +configure-stage4-binutils: @[ `cat stage_current` = stage4 ] || $(MAKE) stage4-start - @[ -f $(HOST_SUBDIR)/binutils/Makefile ] && exit 0 || : ; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/binutils + test ! -f $(HOST_SUBDIR)/binutils/Makefile || exit 0; \ $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ echo Configuring stage 4 in $(HOST_SUBDIR)/binutils ; \ + $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/binutils ; \ cd $(HOST_SUBDIR)/binutils || exit 1; \ case $(srcdir) in \ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ @@ -5585,14 +5344,14 @@ configure-stage4-binutils: maybe-configure-stageprofile-binutils: @if binutils-bootstrap maybe-configure-stageprofile-binutils: configure-stageprofile-binutils -configure-stageprofile-binutils: +configure-stageprofile-binutils: @[ `cat stage_current` = stageprofile ] || $(MAKE) stageprofile-start - @[ -f $(HOST_SUBDIR)/binutils/Makefile ] && exit 0 || : ; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/binutils + test ! -f $(HOST_SUBDIR)/binutils/Makefile || exit 0; \ $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ echo Configuring stage profile in $(HOST_SUBDIR)/binutils ; \ + $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/binutils ; \ cd $(HOST_SUBDIR)/binutils || exit 1; \ case $(srcdir) in \ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ @@ -5610,14 +5369,14 @@ configure-stageprofile-binutils: maybe-configure-stagefeedback-binutils: @if binutils-bootstrap maybe-configure-stagefeedback-binutils: configure-stagefeedback-binutils -configure-stagefeedback-binutils: +configure-stagefeedback-binutils: @[ `cat stage_current` = stagefeedback ] || $(MAKE) stagefeedback-start - @[ -f $(HOST_SUBDIR)/binutils/Makefile ] && exit 0 || : ; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/binutils + test ! -f $(HOST_SUBDIR)/binutils/Makefile || exit 0; \ $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ echo Configuring stage feedback in $(HOST_SUBDIR)/binutils ; \ + $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/binutils ; \ cd $(HOST_SUBDIR)/binutils || exit 1; \ case $(srcdir) in \ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ @@ -5673,7 +5432,7 @@ clean-stage1: clean-stage1-binutils clean-stage1-binutils: @[ -f $(HOST_SUBDIR)/binutils/Makefile ] || [ -f $(HOST_SUBDIR)/stage1-binutils/Makefile ] \ || exit 0 ; \ - @[ `cat stage_current` = stage1 ] || $(MAKE) stage1-start + [ `cat stage_current` = stage1 ] || $(MAKE) stage1-start cd $(HOST_SUBDIR)/binutils && \ $(MAKE) $(FLAGS_TO_PASS) \ CFLAGS="$(STAGE1_CFLAGS)" clean @@ -5703,7 +5462,7 @@ clean-stage2: clean-stage2-binutils clean-stage2-binutils: @[ -f $(HOST_SUBDIR)/binutils/Makefile ] || [ -f $(HOST_SUBDIR)/stage2-binutils/Makefile ] \ || exit 0 ; \ - @[ `cat stage_current` = stage2 ] || $(MAKE) stage2-start + [ `cat stage_current` = stage2 ] || $(MAKE) stage2-start cd $(HOST_SUBDIR)/binutils && \ $(MAKE) $(FLAGS_TO_PASS) \ $(POSTSTAGE1_FLAGS_TO_PASS) \ @@ -5734,7 +5493,7 @@ clean-stage3: clean-stage3-binutils clean-stage3-binutils: @[ -f $(HOST_SUBDIR)/binutils/Makefile ] || [ -f $(HOST_SUBDIR)/stage3-binutils/Makefile ] \ || exit 0 ; \ - @[ `cat stage_current` = stage3 ] || $(MAKE) stage3-start + [ `cat stage_current` = stage3 ] || $(MAKE) stage3-start cd $(HOST_SUBDIR)/binutils && \ $(MAKE) $(FLAGS_TO_PASS) \ $(POSTSTAGE1_FLAGS_TO_PASS) \ @@ -5765,7 +5524,7 @@ clean-stage4: clean-stage4-binutils clean-stage4-binutils: @[ -f $(HOST_SUBDIR)/binutils/Makefile ] || [ -f $(HOST_SUBDIR)/stage4-binutils/Makefile ] \ || exit 0 ; \ - @[ `cat stage_current` = stage4 ] || $(MAKE) stage4-start + [ `cat stage_current` = stage4 ] || $(MAKE) stage4-start cd $(HOST_SUBDIR)/binutils && \ $(MAKE) $(FLAGS_TO_PASS) \ $(POSTSTAGE1_FLAGS_TO_PASS) \ @@ -5796,7 +5555,7 @@ clean-stageprofile: clean-stageprofile-binutils clean-stageprofile-binutils: @[ -f $(HOST_SUBDIR)/binutils/Makefile ] || [ -f $(HOST_SUBDIR)/stageprofile-binutils/Makefile ] \ || exit 0 ; \ - @[ `cat stage_current` = stageprofile ] || $(MAKE) stageprofile-start + [ `cat stage_current` = stageprofile ] || $(MAKE) stageprofile-start cd $(HOST_SUBDIR)/binutils && \ $(MAKE) $(FLAGS_TO_PASS) \ $(POSTSTAGE1_FLAGS_TO_PASS) \ @@ -5827,7 +5586,7 @@ clean-stagefeedback: clean-stagefeedback-binutils clean-stagefeedback-binutils: @[ -f $(HOST_SUBDIR)/binutils/Makefile ] || [ -f $(HOST_SUBDIR)/stagefeedback-binutils/Makefile ] \ || exit 0 ; \ - @[ `cat stage_current` = stagefeedback ] || $(MAKE) stagefeedback-start + [ `cat stage_current` = stagefeedback ] || $(MAKE) stagefeedback-start cd $(HOST_SUBDIR)/binutils && \ $(MAKE) $(FLAGS_TO_PASS) \ $(POSTSTAGE1_FLAGS_TO_PASS) \ @@ -5844,7 +5603,7 @@ maybe-check-binutils: maybe-check-binutils: check-binutils check-binutils: - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -5859,7 +5618,7 @@ maybe-install-binutils: maybe-install-binutils: install-binutils install-binutils: installdirs - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -6123,8 +5882,8 @@ maintainer-clean-binutils: maybe-configure-bison: @if bison maybe-configure-bison: configure-bison -configure-bison: - @$(unstage) +configure-bison: + @: $(MAKE); $(unstage) @test ! -f $(HOST_SUBDIR)/bison/Makefile || exit 0; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/bison ; \ r=`${PWD_COMMAND}`; export r; \ @@ -6154,7 +5913,7 @@ maybe-all-bison: TARGET-bison=all maybe-all-bison: all-bison all-bison: configure-bison - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -6172,7 +5931,7 @@ maybe-check-bison: check-bison # This module is only tested in a native toolchain. check-bison: - @$(unstage) + @: $(MAKE); $(unstage) @if [ '$(host)' = '$(target)' ] ; then \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -6189,7 +5948,7 @@ maybe-install-bison: maybe-install-bison: install-bison install-bison: installdirs - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -6207,7 +5966,7 @@ maybe-info-bison: info-bison info-bison: \ configure-bison - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./bison/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -6233,7 +5992,7 @@ maybe-dvi-bison: dvi-bison dvi-bison: \ configure-bison - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./bison/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -6259,7 +6018,7 @@ maybe-html-bison: html-bison html-bison: \ configure-bison - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./bison/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -6285,7 +6044,7 @@ maybe-TAGS-bison: TAGS-bison TAGS-bison: \ configure-bison - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./bison/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -6312,7 +6071,7 @@ maybe-install-info-bison: install-info-bison install-info-bison: \ configure-bison \ info-bison - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./bison/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -6338,7 +6097,7 @@ maybe-installcheck-bison: installcheck-bison installcheck-bison: \ configure-bison - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./bison/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -6363,7 +6122,7 @@ maybe-mostlyclean-bison: maybe-mostlyclean-bison: mostlyclean-bison mostlyclean-bison: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./bison/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -6388,7 +6147,7 @@ maybe-clean-bison: maybe-clean-bison: clean-bison clean-bison: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./bison/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -6413,7 +6172,7 @@ maybe-distclean-bison: maybe-distclean-bison: distclean-bison distclean-bison: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./bison/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -6438,7 +6197,7 @@ maybe-maintainer-clean-bison: maybe-maintainer-clean-bison: maintainer-clean-bison maintainer-clean-bison: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./bison/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -6463,8 +6222,8 @@ maintainer-clean-bison: maybe-configure-byacc: @if byacc maybe-configure-byacc: configure-byacc -configure-byacc: - @$(unstage) +configure-byacc: + @: $(MAKE); $(unstage) @test ! -f $(HOST_SUBDIR)/byacc/Makefile || exit 0; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/byacc ; \ r=`${PWD_COMMAND}`; export r; \ @@ -6494,7 +6253,7 @@ maybe-all-byacc: TARGET-byacc=all maybe-all-byacc: all-byacc all-byacc: configure-byacc - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -6512,7 +6271,7 @@ maybe-check-byacc: check-byacc # This module is only tested in a native toolchain. check-byacc: - @$(unstage) + @: $(MAKE); $(unstage) @if [ '$(host)' = '$(target)' ] ; then \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -6529,7 +6288,7 @@ maybe-install-byacc: maybe-install-byacc: install-byacc install-byacc: installdirs - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -6547,7 +6306,7 @@ maybe-info-byacc: info-byacc info-byacc: \ configure-byacc - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./byacc/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -6573,7 +6332,7 @@ maybe-dvi-byacc: dvi-byacc dvi-byacc: \ configure-byacc - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./byacc/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -6599,7 +6358,7 @@ maybe-html-byacc: html-byacc html-byacc: \ configure-byacc - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./byacc/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -6625,7 +6384,7 @@ maybe-TAGS-byacc: TAGS-byacc TAGS-byacc: \ configure-byacc - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./byacc/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -6652,7 +6411,7 @@ maybe-install-info-byacc: install-info-byacc install-info-byacc: \ configure-byacc \ info-byacc - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./byacc/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -6678,7 +6437,7 @@ maybe-installcheck-byacc: installcheck-byacc installcheck-byacc: \ configure-byacc - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./byacc/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -6703,7 +6462,7 @@ maybe-mostlyclean-byacc: maybe-mostlyclean-byacc: mostlyclean-byacc mostlyclean-byacc: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./byacc/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -6728,7 +6487,7 @@ maybe-clean-byacc: maybe-clean-byacc: clean-byacc clean-byacc: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./byacc/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -6753,7 +6512,7 @@ maybe-distclean-byacc: maybe-distclean-byacc: distclean-byacc distclean-byacc: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./byacc/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -6778,7 +6537,7 @@ maybe-maintainer-clean-byacc: maybe-maintainer-clean-byacc: maintainer-clean-byacc maintainer-clean-byacc: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./byacc/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -6803,8 +6562,8 @@ maintainer-clean-byacc: maybe-configure-bzip2: @if bzip2 maybe-configure-bzip2: configure-bzip2 -configure-bzip2: - @$(unstage) +configure-bzip2: + @: $(MAKE); $(unstage) @test ! -f $(HOST_SUBDIR)/bzip2/Makefile || exit 0; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/bzip2 ; \ r=`${PWD_COMMAND}`; export r; \ @@ -6834,7 +6593,7 @@ maybe-all-bzip2: TARGET-bzip2=all maybe-all-bzip2: all-bzip2 all-bzip2: configure-bzip2 - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -6851,7 +6610,7 @@ maybe-check-bzip2: maybe-check-bzip2: check-bzip2 check-bzip2: - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -6866,7 +6625,7 @@ maybe-install-bzip2: maybe-install-bzip2: install-bzip2 install-bzip2: installdirs - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -6884,7 +6643,7 @@ maybe-info-bzip2: info-bzip2 info-bzip2: \ configure-bzip2 - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./bzip2/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -6910,7 +6669,7 @@ maybe-dvi-bzip2: dvi-bzip2 dvi-bzip2: \ configure-bzip2 - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./bzip2/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -6936,7 +6695,7 @@ maybe-html-bzip2: html-bzip2 html-bzip2: \ configure-bzip2 - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./bzip2/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -6962,7 +6721,7 @@ maybe-TAGS-bzip2: TAGS-bzip2 TAGS-bzip2: \ configure-bzip2 - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./bzip2/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -6989,7 +6748,7 @@ maybe-install-info-bzip2: install-info-bzip2 install-info-bzip2: \ configure-bzip2 \ info-bzip2 - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./bzip2/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -7015,7 +6774,7 @@ maybe-installcheck-bzip2: installcheck-bzip2 installcheck-bzip2: \ configure-bzip2 - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./bzip2/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -7040,7 +6799,7 @@ maybe-mostlyclean-bzip2: maybe-mostlyclean-bzip2: mostlyclean-bzip2 mostlyclean-bzip2: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./bzip2/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -7065,7 +6824,7 @@ maybe-clean-bzip2: maybe-clean-bzip2: clean-bzip2 clean-bzip2: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./bzip2/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -7090,7 +6849,7 @@ maybe-distclean-bzip2: maybe-distclean-bzip2: distclean-bzip2 distclean-bzip2: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./bzip2/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -7115,7 +6874,7 @@ maybe-maintainer-clean-bzip2: maybe-maintainer-clean-bzip2: maintainer-clean-bzip2 maintainer-clean-bzip2: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./bzip2/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -7140,8 +6899,8 @@ maintainer-clean-bzip2: maybe-configure-dejagnu: @if dejagnu maybe-configure-dejagnu: configure-dejagnu -configure-dejagnu: - @$(unstage) +configure-dejagnu: + @: $(MAKE); $(unstage) @test ! -f $(HOST_SUBDIR)/dejagnu/Makefile || exit 0; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/dejagnu ; \ r=`${PWD_COMMAND}`; export r; \ @@ -7171,7 +6930,7 @@ maybe-all-dejagnu: TARGET-dejagnu=all maybe-all-dejagnu: all-dejagnu all-dejagnu: configure-dejagnu - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -7188,7 +6947,7 @@ maybe-check-dejagnu: maybe-check-dejagnu: check-dejagnu check-dejagnu: - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -7203,7 +6962,7 @@ maybe-install-dejagnu: maybe-install-dejagnu: install-dejagnu install-dejagnu: installdirs - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -7221,7 +6980,7 @@ maybe-info-dejagnu: info-dejagnu info-dejagnu: \ configure-dejagnu - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./dejagnu/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -7247,7 +7006,7 @@ maybe-dvi-dejagnu: dvi-dejagnu dvi-dejagnu: \ configure-dejagnu - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./dejagnu/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -7273,7 +7032,7 @@ maybe-html-dejagnu: html-dejagnu html-dejagnu: \ configure-dejagnu - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./dejagnu/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -7299,7 +7058,7 @@ maybe-TAGS-dejagnu: TAGS-dejagnu TAGS-dejagnu: \ configure-dejagnu - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./dejagnu/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -7326,7 +7085,7 @@ maybe-install-info-dejagnu: install-info-dejagnu install-info-dejagnu: \ configure-dejagnu \ info-dejagnu - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./dejagnu/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -7352,7 +7111,7 @@ maybe-installcheck-dejagnu: installcheck-dejagnu installcheck-dejagnu: \ configure-dejagnu - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./dejagnu/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -7377,7 +7136,7 @@ maybe-mostlyclean-dejagnu: maybe-mostlyclean-dejagnu: mostlyclean-dejagnu mostlyclean-dejagnu: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./dejagnu/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -7402,7 +7161,7 @@ maybe-clean-dejagnu: maybe-clean-dejagnu: clean-dejagnu clean-dejagnu: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./dejagnu/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -7427,7 +7186,7 @@ maybe-distclean-dejagnu: maybe-distclean-dejagnu: distclean-dejagnu distclean-dejagnu: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./dejagnu/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -7452,7 +7211,7 @@ maybe-maintainer-clean-dejagnu: maybe-maintainer-clean-dejagnu: maintainer-clean-dejagnu maintainer-clean-dejagnu: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./dejagnu/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -7477,8 +7236,8 @@ maintainer-clean-dejagnu: maybe-configure-diff: @if diff maybe-configure-diff: configure-diff -configure-diff: - @$(unstage) +configure-diff: + @: $(MAKE); $(unstage) @test ! -f $(HOST_SUBDIR)/diff/Makefile || exit 0; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/diff ; \ r=`${PWD_COMMAND}`; export r; \ @@ -7508,7 +7267,7 @@ maybe-all-diff: TARGET-diff=all maybe-all-diff: all-diff all-diff: configure-diff - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -7525,7 +7284,7 @@ maybe-check-diff: maybe-check-diff: check-diff check-diff: - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -7540,7 +7299,7 @@ maybe-install-diff: maybe-install-diff: install-diff install-diff: installdirs - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -7558,7 +7317,7 @@ maybe-info-diff: info-diff info-diff: \ configure-diff - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./diff/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -7584,7 +7343,7 @@ maybe-dvi-diff: dvi-diff dvi-diff: \ configure-diff - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./diff/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -7610,7 +7369,7 @@ maybe-html-diff: html-diff html-diff: \ configure-diff - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./diff/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -7636,7 +7395,7 @@ maybe-TAGS-diff: TAGS-diff TAGS-diff: \ configure-diff - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./diff/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -7663,7 +7422,7 @@ maybe-install-info-diff: install-info-diff install-info-diff: \ configure-diff \ info-diff - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./diff/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -7689,7 +7448,7 @@ maybe-installcheck-diff: installcheck-diff installcheck-diff: \ configure-diff - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./diff/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -7714,7 +7473,7 @@ maybe-mostlyclean-diff: maybe-mostlyclean-diff: mostlyclean-diff mostlyclean-diff: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./diff/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -7739,7 +7498,7 @@ maybe-clean-diff: maybe-clean-diff: clean-diff clean-diff: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./diff/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -7764,7 +7523,7 @@ maybe-distclean-diff: maybe-distclean-diff: distclean-diff distclean-diff: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./diff/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -7789,7 +7548,7 @@ maybe-maintainer-clean-diff: maybe-maintainer-clean-diff: maintainer-clean-diff maintainer-clean-diff: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./diff/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -7814,8 +7573,8 @@ maintainer-clean-diff: maybe-configure-dosutils: @if dosutils maybe-configure-dosutils: configure-dosutils -configure-dosutils: - @$(unstage) +configure-dosutils: + @: $(MAKE); $(unstage) @test ! -f $(HOST_SUBDIR)/dosutils/Makefile || exit 0; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/dosutils ; \ r=`${PWD_COMMAND}`; export r; \ @@ -7845,7 +7604,7 @@ maybe-all-dosutils: TARGET-dosutils=all maybe-all-dosutils: all-dosutils all-dosutils: configure-dosutils - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -7871,7 +7630,7 @@ maybe-install-dosutils: maybe-install-dosutils: install-dosutils install-dosutils: installdirs - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -7889,7 +7648,7 @@ maybe-info-dosutils: info-dosutils info-dosutils: \ configure-dosutils - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./dosutils/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -7915,7 +7674,7 @@ maybe-dvi-dosutils: dvi-dosutils dvi-dosutils: \ configure-dosutils - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./dosutils/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -7941,7 +7700,7 @@ maybe-html-dosutils: html-dosutils html-dosutils: \ configure-dosutils - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./dosutils/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -7967,7 +7726,7 @@ maybe-TAGS-dosutils: TAGS-dosutils TAGS-dosutils: \ configure-dosutils - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./dosutils/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -7994,7 +7753,7 @@ maybe-install-info-dosutils: install-info-dosutils install-info-dosutils: \ configure-dosutils \ info-dosutils - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./dosutils/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -8020,7 +7779,7 @@ maybe-installcheck-dosutils: installcheck-dosutils installcheck-dosutils: \ configure-dosutils - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./dosutils/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -8045,7 +7804,7 @@ maybe-mostlyclean-dosutils: maybe-mostlyclean-dosutils: mostlyclean-dosutils mostlyclean-dosutils: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./dosutils/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -8070,7 +7829,7 @@ maybe-clean-dosutils: maybe-clean-dosutils: clean-dosutils clean-dosutils: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./dosutils/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -8095,7 +7854,7 @@ maybe-distclean-dosutils: maybe-distclean-dosutils: distclean-dosutils distclean-dosutils: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./dosutils/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -8120,7 +7879,7 @@ maybe-maintainer-clean-dosutils: maybe-maintainer-clean-dosutils: maintainer-clean-dosutils maintainer-clean-dosutils: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./dosutils/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -8145,8 +7904,8 @@ maintainer-clean-dosutils: maybe-configure-etc: @if etc maybe-configure-etc: configure-etc -configure-etc: - @$(unstage) +configure-etc: + @: $(MAKE); $(unstage) @test ! -f $(HOST_SUBDIR)/etc/Makefile || exit 0; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/etc ; \ r=`${PWD_COMMAND}`; export r; \ @@ -8176,7 +7935,7 @@ maybe-all-etc: TARGET-etc=all maybe-all-etc: all-etc all-etc: configure-etc - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -8193,7 +7952,7 @@ maybe-check-etc: maybe-check-etc: check-etc check-etc: - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -8208,7 +7967,7 @@ maybe-install-etc: maybe-install-etc: install-etc install-etc: installdirs - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -8226,7 +7985,7 @@ maybe-info-etc: info-etc info-etc: \ configure-etc - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./etc/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -8252,7 +8011,7 @@ maybe-dvi-etc: dvi-etc dvi-etc: \ configure-etc - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./etc/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -8278,7 +8037,7 @@ maybe-html-etc: html-etc html-etc: \ configure-etc - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./etc/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -8304,7 +8063,7 @@ maybe-TAGS-etc: TAGS-etc TAGS-etc: \ configure-etc - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./etc/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -8331,7 +8090,7 @@ maybe-install-info-etc: install-info-etc install-info-etc: \ configure-etc \ info-etc - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./etc/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -8357,7 +8116,7 @@ maybe-installcheck-etc: installcheck-etc installcheck-etc: \ configure-etc - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./etc/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -8382,7 +8141,7 @@ maybe-mostlyclean-etc: maybe-mostlyclean-etc: mostlyclean-etc mostlyclean-etc: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./etc/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -8407,7 +8166,7 @@ maybe-clean-etc: maybe-clean-etc: clean-etc clean-etc: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./etc/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -8432,7 +8191,7 @@ maybe-distclean-etc: maybe-distclean-etc: distclean-etc distclean-etc: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./etc/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -8457,7 +8216,7 @@ maybe-maintainer-clean-etc: maybe-maintainer-clean-etc: maintainer-clean-etc maintainer-clean-etc: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./etc/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -8482,8 +8241,8 @@ maintainer-clean-etc: maybe-configure-fastjar: @if fastjar maybe-configure-fastjar: configure-fastjar -configure-fastjar: - @$(unstage) +configure-fastjar: + @: $(MAKE); $(unstage) @test ! -f $(HOST_SUBDIR)/fastjar/Makefile || exit 0; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/fastjar ; \ r=`${PWD_COMMAND}`; export r; \ @@ -8513,7 +8272,7 @@ maybe-all-fastjar: TARGET-fastjar=all maybe-all-fastjar: all-fastjar all-fastjar: configure-fastjar - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -8531,7 +8290,7 @@ maybe-check-fastjar: check-fastjar # This module is only tested in a native toolchain. check-fastjar: - @$(unstage) + @: $(MAKE); $(unstage) @if [ '$(host)' = '$(target)' ] ; then \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -8548,7 +8307,7 @@ maybe-install-fastjar: maybe-install-fastjar: install-fastjar install-fastjar: installdirs - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -8566,7 +8325,7 @@ maybe-info-fastjar: info-fastjar info-fastjar: \ configure-fastjar - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./fastjar/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -8592,7 +8351,7 @@ maybe-dvi-fastjar: dvi-fastjar dvi-fastjar: \ configure-fastjar - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./fastjar/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -8618,7 +8377,7 @@ maybe-html-fastjar: html-fastjar html-fastjar: \ configure-fastjar - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./fastjar/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -8644,7 +8403,7 @@ maybe-TAGS-fastjar: TAGS-fastjar TAGS-fastjar: \ configure-fastjar - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./fastjar/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -8671,7 +8430,7 @@ maybe-install-info-fastjar: install-info-fastjar install-info-fastjar: \ configure-fastjar \ info-fastjar - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./fastjar/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -8697,7 +8456,7 @@ maybe-installcheck-fastjar: installcheck-fastjar installcheck-fastjar: \ configure-fastjar - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./fastjar/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -8722,7 +8481,7 @@ maybe-mostlyclean-fastjar: maybe-mostlyclean-fastjar: mostlyclean-fastjar mostlyclean-fastjar: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./fastjar/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -8747,7 +8506,7 @@ maybe-clean-fastjar: maybe-clean-fastjar: clean-fastjar clean-fastjar: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./fastjar/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -8772,7 +8531,7 @@ maybe-distclean-fastjar: maybe-distclean-fastjar: distclean-fastjar distclean-fastjar: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./fastjar/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -8797,7 +8556,7 @@ maybe-maintainer-clean-fastjar: maybe-maintainer-clean-fastjar: maintainer-clean-fastjar maintainer-clean-fastjar: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./fastjar/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -8822,8 +8581,8 @@ maintainer-clean-fastjar: maybe-configure-fileutils: @if fileutils maybe-configure-fileutils: configure-fileutils -configure-fileutils: - @$(unstage) +configure-fileutils: + @: $(MAKE); $(unstage) @test ! -f $(HOST_SUBDIR)/fileutils/Makefile || exit 0; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/fileutils ; \ r=`${PWD_COMMAND}`; export r; \ @@ -8853,7 +8612,7 @@ maybe-all-fileutils: TARGET-fileutils=all maybe-all-fileutils: all-fileutils all-fileutils: configure-fileutils - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -8870,7 +8629,7 @@ maybe-check-fileutils: maybe-check-fileutils: check-fileutils check-fileutils: - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -8885,7 +8644,7 @@ maybe-install-fileutils: maybe-install-fileutils: install-fileutils install-fileutils: installdirs - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -8903,7 +8662,7 @@ maybe-info-fileutils: info-fileutils info-fileutils: \ configure-fileutils - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./fileutils/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -8929,7 +8688,7 @@ maybe-dvi-fileutils: dvi-fileutils dvi-fileutils: \ configure-fileutils - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./fileutils/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -8955,7 +8714,7 @@ maybe-html-fileutils: html-fileutils html-fileutils: \ configure-fileutils - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./fileutils/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -8981,7 +8740,7 @@ maybe-TAGS-fileutils: TAGS-fileutils TAGS-fileutils: \ configure-fileutils - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./fileutils/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -9008,7 +8767,7 @@ maybe-install-info-fileutils: install-info-fileutils install-info-fileutils: \ configure-fileutils \ info-fileutils - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./fileutils/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -9034,7 +8793,7 @@ maybe-installcheck-fileutils: installcheck-fileutils installcheck-fileutils: \ configure-fileutils - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./fileutils/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -9059,7 +8818,7 @@ maybe-mostlyclean-fileutils: maybe-mostlyclean-fileutils: mostlyclean-fileutils mostlyclean-fileutils: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./fileutils/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -9084,7 +8843,7 @@ maybe-clean-fileutils: maybe-clean-fileutils: clean-fileutils clean-fileutils: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./fileutils/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -9109,7 +8868,7 @@ maybe-distclean-fileutils: maybe-distclean-fileutils: distclean-fileutils distclean-fileutils: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./fileutils/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -9134,7 +8893,7 @@ maybe-maintainer-clean-fileutils: maybe-maintainer-clean-fileutils: maintainer-clean-fileutils maintainer-clean-fileutils: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./fileutils/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -9159,8 +8918,8 @@ maintainer-clean-fileutils: maybe-configure-findutils: @if findutils maybe-configure-findutils: configure-findutils -configure-findutils: - @$(unstage) +configure-findutils: + @: $(MAKE); $(unstage) @test ! -f $(HOST_SUBDIR)/findutils/Makefile || exit 0; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/findutils ; \ r=`${PWD_COMMAND}`; export r; \ @@ -9190,7 +8949,7 @@ maybe-all-findutils: TARGET-findutils=all maybe-all-findutils: all-findutils all-findutils: configure-findutils - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -9207,7 +8966,7 @@ maybe-check-findutils: maybe-check-findutils: check-findutils check-findutils: - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -9222,7 +8981,7 @@ maybe-install-findutils: maybe-install-findutils: install-findutils install-findutils: installdirs - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -9240,7 +8999,7 @@ maybe-info-findutils: info-findutils info-findutils: \ configure-findutils - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./findutils/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -9266,7 +9025,7 @@ maybe-dvi-findutils: dvi-findutils dvi-findutils: \ configure-findutils - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./findutils/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -9292,7 +9051,7 @@ maybe-html-findutils: html-findutils html-findutils: \ configure-findutils - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./findutils/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -9318,7 +9077,7 @@ maybe-TAGS-findutils: TAGS-findutils TAGS-findutils: \ configure-findutils - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./findutils/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -9345,7 +9104,7 @@ maybe-install-info-findutils: install-info-findutils install-info-findutils: \ configure-findutils \ info-findutils - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./findutils/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -9371,7 +9130,7 @@ maybe-installcheck-findutils: installcheck-findutils installcheck-findutils: \ configure-findutils - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./findutils/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -9396,7 +9155,7 @@ maybe-mostlyclean-findutils: maybe-mostlyclean-findutils: mostlyclean-findutils mostlyclean-findutils: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./findutils/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -9421,7 +9180,7 @@ maybe-clean-findutils: maybe-clean-findutils: clean-findutils clean-findutils: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./findutils/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -9446,7 +9205,7 @@ maybe-distclean-findutils: maybe-distclean-findutils: distclean-findutils distclean-findutils: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./findutils/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -9471,7 +9230,7 @@ maybe-maintainer-clean-findutils: maybe-maintainer-clean-findutils: maintainer-clean-findutils maintainer-clean-findutils: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./findutils/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -9496,8 +9255,8 @@ maintainer-clean-findutils: maybe-configure-find: @if find maybe-configure-find: configure-find -configure-find: - @$(unstage) +configure-find: + @: $(MAKE); $(unstage) @test ! -f $(HOST_SUBDIR)/find/Makefile || exit 0; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/find ; \ r=`${PWD_COMMAND}`; export r; \ @@ -9527,7 +9286,7 @@ maybe-all-find: TARGET-find=all maybe-all-find: all-find all-find: configure-find - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -9544,7 +9303,7 @@ maybe-check-find: maybe-check-find: check-find check-find: - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -9559,7 +9318,7 @@ maybe-install-find: maybe-install-find: install-find install-find: installdirs - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -9577,7 +9336,7 @@ maybe-info-find: info-find info-find: \ configure-find - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./find/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -9603,7 +9362,7 @@ maybe-dvi-find: dvi-find dvi-find: \ configure-find - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./find/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -9629,7 +9388,7 @@ maybe-html-find: html-find html-find: \ configure-find - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./find/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -9655,7 +9414,7 @@ maybe-TAGS-find: TAGS-find TAGS-find: \ configure-find - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./find/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -9682,7 +9441,7 @@ maybe-install-info-find: install-info-find install-info-find: \ configure-find \ info-find - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./find/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -9708,7 +9467,7 @@ maybe-installcheck-find: installcheck-find installcheck-find: \ configure-find - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./find/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -9733,7 +9492,7 @@ maybe-mostlyclean-find: maybe-mostlyclean-find: mostlyclean-find mostlyclean-find: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./find/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -9758,7 +9517,7 @@ maybe-clean-find: maybe-clean-find: clean-find clean-find: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./find/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -9783,7 +9542,7 @@ maybe-distclean-find: maybe-distclean-find: distclean-find distclean-find: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./find/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -9808,7 +9567,7 @@ maybe-maintainer-clean-find: maybe-maintainer-clean-find: maintainer-clean-find maintainer-clean-find: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./find/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -9833,8 +9592,8 @@ maintainer-clean-find: maybe-configure-fixincludes: @if fixincludes maybe-configure-fixincludes: configure-fixincludes -configure-fixincludes: - @$(unstage) +configure-fixincludes: + @: $(MAKE); $(unstage) @test ! -f $(HOST_SUBDIR)/fixincludes/Makefile || exit 0; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/fixincludes ; \ r=`${PWD_COMMAND}`; export r; \ @@ -9864,7 +9623,7 @@ maybe-all-fixincludes: TARGET-fixincludes=all maybe-all-fixincludes: all-fixincludes all-fixincludes: configure-fixincludes - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -9881,7 +9640,7 @@ maybe-check-fixincludes: maybe-check-fixincludes: check-fixincludes check-fixincludes: - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -9896,7 +9655,7 @@ maybe-install-fixincludes: maybe-install-fixincludes: install-fixincludes install-fixincludes: installdirs - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -9934,7 +9693,7 @@ maybe-html-fixincludes: html-fixincludes html-fixincludes: \ configure-fixincludes - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./fixincludes/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -9989,7 +9748,7 @@ maybe-mostlyclean-fixincludes: maybe-mostlyclean-fixincludes: mostlyclean-fixincludes mostlyclean-fixincludes: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./fixincludes/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -10014,7 +9773,7 @@ maybe-clean-fixincludes: maybe-clean-fixincludes: clean-fixincludes clean-fixincludes: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./fixincludes/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -10039,7 +9798,7 @@ maybe-distclean-fixincludes: maybe-distclean-fixincludes: distclean-fixincludes distclean-fixincludes: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./fixincludes/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -10064,7 +9823,7 @@ maybe-maintainer-clean-fixincludes: maybe-maintainer-clean-fixincludes: maintainer-clean-fixincludes maintainer-clean-fixincludes: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./fixincludes/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -10089,8 +9848,8 @@ maintainer-clean-fixincludes: maybe-configure-flex: @if flex maybe-configure-flex: configure-flex -configure-flex: - @$(unstage) +configure-flex: + @: $(MAKE); $(unstage) @test ! -f $(HOST_SUBDIR)/flex/Makefile || exit 0; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/flex ; \ r=`${PWD_COMMAND}`; export r; \ @@ -10120,7 +9879,7 @@ maybe-all-flex: TARGET-flex=all maybe-all-flex: all-flex all-flex: configure-flex - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -10138,7 +9897,7 @@ maybe-check-flex: check-flex # This module is only tested in a native toolchain. check-flex: - @$(unstage) + @: $(MAKE); $(unstage) @if [ '$(host)' = '$(target)' ] ; then \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -10155,7 +9914,7 @@ maybe-install-flex: maybe-install-flex: install-flex install-flex: installdirs - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -10173,7 +9932,7 @@ maybe-info-flex: info-flex info-flex: \ configure-flex - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./flex/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -10199,7 +9958,7 @@ maybe-dvi-flex: dvi-flex dvi-flex: \ configure-flex - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./flex/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -10225,7 +9984,7 @@ maybe-html-flex: html-flex html-flex: \ configure-flex - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./flex/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -10251,7 +10010,7 @@ maybe-TAGS-flex: TAGS-flex TAGS-flex: \ configure-flex - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./flex/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -10278,7 +10037,7 @@ maybe-install-info-flex: install-info-flex install-info-flex: \ configure-flex \ info-flex - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./flex/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -10304,7 +10063,7 @@ maybe-installcheck-flex: installcheck-flex installcheck-flex: \ configure-flex - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./flex/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -10329,7 +10088,7 @@ maybe-mostlyclean-flex: maybe-mostlyclean-flex: mostlyclean-flex mostlyclean-flex: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./flex/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -10354,7 +10113,7 @@ maybe-clean-flex: maybe-clean-flex: clean-flex clean-flex: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./flex/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -10379,7 +10138,7 @@ maybe-distclean-flex: maybe-distclean-flex: distclean-flex distclean-flex: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./flex/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -10404,7 +10163,7 @@ maybe-maintainer-clean-flex: maybe-maintainer-clean-flex: maintainer-clean-flex maintainer-clean-flex: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./flex/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -10429,7 +10188,7 @@ maintainer-clean-flex: maybe-configure-gas: @if gas maybe-configure-gas: configure-gas -configure-gas: +configure-gas: @test -f stage_last && exit 0; \ test ! -f $(HOST_SUBDIR)/gas/Makefile || exit 0; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gas ; \ @@ -10456,13 +10215,13 @@ configure-gas: maybe-configure-stage1-gas: @if gas-bootstrap maybe-configure-stage1-gas: configure-stage1-gas -configure-stage1-gas: +configure-stage1-gas: @[ `cat stage_current` = stage1 ] || $(MAKE) stage1-start - @[ -f $(HOST_SUBDIR)/gas/Makefile ] && exit 0 || : ; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gas + test ! -f $(HOST_SUBDIR)/gas/Makefile || exit 0; \ $(HOST_EXPORTS) \ echo Configuring stage 1 in $(HOST_SUBDIR)/gas ; \ + $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gas ; \ cd $(HOST_SUBDIR)/gas || exit 1; \ case $(srcdir) in \ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ @@ -10480,14 +10239,14 @@ configure-stage1-gas: maybe-configure-stage2-gas: @if gas-bootstrap maybe-configure-stage2-gas: configure-stage2-gas -configure-stage2-gas: +configure-stage2-gas: @[ `cat stage_current` = stage2 ] || $(MAKE) stage2-start - @[ -f $(HOST_SUBDIR)/gas/Makefile ] && exit 0 || : ; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gas + test ! -f $(HOST_SUBDIR)/gas/Makefile || exit 0; \ $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ echo Configuring stage 2 in $(HOST_SUBDIR)/gas ; \ + $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gas ; \ cd $(HOST_SUBDIR)/gas || exit 1; \ case $(srcdir) in \ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ @@ -10505,14 +10264,14 @@ configure-stage2-gas: maybe-configure-stage3-gas: @if gas-bootstrap maybe-configure-stage3-gas: configure-stage3-gas -configure-stage3-gas: +configure-stage3-gas: @[ `cat stage_current` = stage3 ] || $(MAKE) stage3-start - @[ -f $(HOST_SUBDIR)/gas/Makefile ] && exit 0 || : ; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gas + test ! -f $(HOST_SUBDIR)/gas/Makefile || exit 0; \ $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ echo Configuring stage 3 in $(HOST_SUBDIR)/gas ; \ + $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gas ; \ cd $(HOST_SUBDIR)/gas || exit 1; \ case $(srcdir) in \ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ @@ -10530,14 +10289,14 @@ configure-stage3-gas: maybe-configure-stage4-gas: @if gas-bootstrap maybe-configure-stage4-gas: configure-stage4-gas -configure-stage4-gas: +configure-stage4-gas: @[ `cat stage_current` = stage4 ] || $(MAKE) stage4-start - @[ -f $(HOST_SUBDIR)/gas/Makefile ] && exit 0 || : ; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gas + test ! -f $(HOST_SUBDIR)/gas/Makefile || exit 0; \ $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ echo Configuring stage 4 in $(HOST_SUBDIR)/gas ; \ + $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gas ; \ cd $(HOST_SUBDIR)/gas || exit 1; \ case $(srcdir) in \ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ @@ -10555,14 +10314,14 @@ configure-stage4-gas: maybe-configure-stageprofile-gas: @if gas-bootstrap maybe-configure-stageprofile-gas: configure-stageprofile-gas -configure-stageprofile-gas: +configure-stageprofile-gas: @[ `cat stage_current` = stageprofile ] || $(MAKE) stageprofile-start - @[ -f $(HOST_SUBDIR)/gas/Makefile ] && exit 0 || : ; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gas + test ! -f $(HOST_SUBDIR)/gas/Makefile || exit 0; \ $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ echo Configuring stage profile in $(HOST_SUBDIR)/gas ; \ + $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gas ; \ cd $(HOST_SUBDIR)/gas || exit 1; \ case $(srcdir) in \ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ @@ -10580,14 +10339,14 @@ configure-stageprofile-gas: maybe-configure-stagefeedback-gas: @if gas-bootstrap maybe-configure-stagefeedback-gas: configure-stagefeedback-gas -configure-stagefeedback-gas: +configure-stagefeedback-gas: @[ `cat stage_current` = stagefeedback ] || $(MAKE) stagefeedback-start - @[ -f $(HOST_SUBDIR)/gas/Makefile ] && exit 0 || : ; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gas + test ! -f $(HOST_SUBDIR)/gas/Makefile || exit 0; \ $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ echo Configuring stage feedback in $(HOST_SUBDIR)/gas ; \ + $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gas ; \ cd $(HOST_SUBDIR)/gas || exit 1; \ case $(srcdir) in \ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ @@ -10643,7 +10402,7 @@ clean-stage1: clean-stage1-gas clean-stage1-gas: @[ -f $(HOST_SUBDIR)/gas/Makefile ] || [ -f $(HOST_SUBDIR)/stage1-gas/Makefile ] \ || exit 0 ; \ - @[ `cat stage_current` = stage1 ] || $(MAKE) stage1-start + [ `cat stage_current` = stage1 ] || $(MAKE) stage1-start cd $(HOST_SUBDIR)/gas && \ $(MAKE) $(FLAGS_TO_PASS) \ CFLAGS="$(STAGE1_CFLAGS)" clean @@ -10673,7 +10432,7 @@ clean-stage2: clean-stage2-gas clean-stage2-gas: @[ -f $(HOST_SUBDIR)/gas/Makefile ] || [ -f $(HOST_SUBDIR)/stage2-gas/Makefile ] \ || exit 0 ; \ - @[ `cat stage_current` = stage2 ] || $(MAKE) stage2-start + [ `cat stage_current` = stage2 ] || $(MAKE) stage2-start cd $(HOST_SUBDIR)/gas && \ $(MAKE) $(FLAGS_TO_PASS) \ $(POSTSTAGE1_FLAGS_TO_PASS) \ @@ -10704,7 +10463,7 @@ clean-stage3: clean-stage3-gas clean-stage3-gas: @[ -f $(HOST_SUBDIR)/gas/Makefile ] || [ -f $(HOST_SUBDIR)/stage3-gas/Makefile ] \ || exit 0 ; \ - @[ `cat stage_current` = stage3 ] || $(MAKE) stage3-start + [ `cat stage_current` = stage3 ] || $(MAKE) stage3-start cd $(HOST_SUBDIR)/gas && \ $(MAKE) $(FLAGS_TO_PASS) \ $(POSTSTAGE1_FLAGS_TO_PASS) \ @@ -10735,7 +10494,7 @@ clean-stage4: clean-stage4-gas clean-stage4-gas: @[ -f $(HOST_SUBDIR)/gas/Makefile ] || [ -f $(HOST_SUBDIR)/stage4-gas/Makefile ] \ || exit 0 ; \ - @[ `cat stage_current` = stage4 ] || $(MAKE) stage4-start + [ `cat stage_current` = stage4 ] || $(MAKE) stage4-start cd $(HOST_SUBDIR)/gas && \ $(MAKE) $(FLAGS_TO_PASS) \ $(POSTSTAGE1_FLAGS_TO_PASS) \ @@ -10766,7 +10525,7 @@ clean-stageprofile: clean-stageprofile-gas clean-stageprofile-gas: @[ -f $(HOST_SUBDIR)/gas/Makefile ] || [ -f $(HOST_SUBDIR)/stageprofile-gas/Makefile ] \ || exit 0 ; \ - @[ `cat stage_current` = stageprofile ] || $(MAKE) stageprofile-start + [ `cat stage_current` = stageprofile ] || $(MAKE) stageprofile-start cd $(HOST_SUBDIR)/gas && \ $(MAKE) $(FLAGS_TO_PASS) \ $(POSTSTAGE1_FLAGS_TO_PASS) \ @@ -10797,7 +10556,7 @@ clean-stagefeedback: clean-stagefeedback-gas clean-stagefeedback-gas: @[ -f $(HOST_SUBDIR)/gas/Makefile ] || [ -f $(HOST_SUBDIR)/stagefeedback-gas/Makefile ] \ || exit 0 ; \ - @[ `cat stage_current` = stagefeedback ] || $(MAKE) stagefeedback-start + [ `cat stage_current` = stagefeedback ] || $(MAKE) stagefeedback-start cd $(HOST_SUBDIR)/gas && \ $(MAKE) $(FLAGS_TO_PASS) \ $(POSTSTAGE1_FLAGS_TO_PASS) \ @@ -10814,7 +10573,7 @@ maybe-check-gas: maybe-check-gas: check-gas check-gas: - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -10829,7 +10588,7 @@ maybe-install-gas: maybe-install-gas: install-gas install-gas: installdirs - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -11093,7 +10852,7 @@ maintainer-clean-gas: maybe-configure-gcc: @if gcc maybe-configure-gcc: configure-gcc -configure-gcc: +configure-gcc: @test -f stage_last && exit 0; \ test ! -f $(HOST_SUBDIR)/gcc/Makefile || exit 0; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gcc ; \ @@ -11120,13 +10879,13 @@ configure-gcc: maybe-configure-stage1-gcc: @if gcc-bootstrap maybe-configure-stage1-gcc: configure-stage1-gcc -configure-stage1-gcc: +configure-stage1-gcc: @[ `cat stage_current` = stage1 ] || $(MAKE) stage1-start - @[ -f $(HOST_SUBDIR)/gcc/Makefile ] && exit 0 || : ; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gcc + test ! -f $(HOST_SUBDIR)/gcc/Makefile || exit 0; \ $(HOST_EXPORTS) \ echo Configuring stage 1 in $(HOST_SUBDIR)/gcc ; \ + $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gcc ; \ cd $(HOST_SUBDIR)/gcc || exit 1; \ case $(srcdir) in \ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ @@ -11144,14 +10903,14 @@ configure-stage1-gcc: maybe-configure-stage2-gcc: @if gcc-bootstrap maybe-configure-stage2-gcc: configure-stage2-gcc -configure-stage2-gcc: +configure-stage2-gcc: @[ `cat stage_current` = stage2 ] || $(MAKE) stage2-start - @[ -f $(HOST_SUBDIR)/gcc/Makefile ] && exit 0 || : ; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gcc + test ! -f $(HOST_SUBDIR)/gcc/Makefile || exit 0; \ $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ echo Configuring stage 2 in $(HOST_SUBDIR)/gcc ; \ + $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gcc ; \ cd $(HOST_SUBDIR)/gcc || exit 1; \ case $(srcdir) in \ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ @@ -11169,14 +10928,14 @@ configure-stage2-gcc: maybe-configure-stage3-gcc: @if gcc-bootstrap maybe-configure-stage3-gcc: configure-stage3-gcc -configure-stage3-gcc: +configure-stage3-gcc: @[ `cat stage_current` = stage3 ] || $(MAKE) stage3-start - @[ -f $(HOST_SUBDIR)/gcc/Makefile ] && exit 0 || : ; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gcc + test ! -f $(HOST_SUBDIR)/gcc/Makefile || exit 0; \ $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ echo Configuring stage 3 in $(HOST_SUBDIR)/gcc ; \ + $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gcc ; \ cd $(HOST_SUBDIR)/gcc || exit 1; \ case $(srcdir) in \ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ @@ -11194,14 +10953,14 @@ configure-stage3-gcc: maybe-configure-stage4-gcc: @if gcc-bootstrap maybe-configure-stage4-gcc: configure-stage4-gcc -configure-stage4-gcc: +configure-stage4-gcc: @[ `cat stage_current` = stage4 ] || $(MAKE) stage4-start - @[ -f $(HOST_SUBDIR)/gcc/Makefile ] && exit 0 || : ; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gcc + test ! -f $(HOST_SUBDIR)/gcc/Makefile || exit 0; \ $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ echo Configuring stage 4 in $(HOST_SUBDIR)/gcc ; \ + $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gcc ; \ cd $(HOST_SUBDIR)/gcc || exit 1; \ case $(srcdir) in \ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ @@ -11219,14 +10978,14 @@ configure-stage4-gcc: maybe-configure-stageprofile-gcc: @if gcc-bootstrap maybe-configure-stageprofile-gcc: configure-stageprofile-gcc -configure-stageprofile-gcc: +configure-stageprofile-gcc: @[ `cat stage_current` = stageprofile ] || $(MAKE) stageprofile-start - @[ -f $(HOST_SUBDIR)/gcc/Makefile ] && exit 0 || : ; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gcc + test ! -f $(HOST_SUBDIR)/gcc/Makefile || exit 0; \ $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ echo Configuring stage profile in $(HOST_SUBDIR)/gcc ; \ + $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gcc ; \ cd $(HOST_SUBDIR)/gcc || exit 1; \ case $(srcdir) in \ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ @@ -11244,14 +11003,14 @@ configure-stageprofile-gcc: maybe-configure-stagefeedback-gcc: @if gcc-bootstrap maybe-configure-stagefeedback-gcc: configure-stagefeedback-gcc -configure-stagefeedback-gcc: +configure-stagefeedback-gcc: @[ `cat stage_current` = stagefeedback ] || $(MAKE) stagefeedback-start - @[ -f $(HOST_SUBDIR)/gcc/Makefile ] && exit 0 || : ; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gcc + test ! -f $(HOST_SUBDIR)/gcc/Makefile || exit 0; \ $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ echo Configuring stage feedback in $(HOST_SUBDIR)/gcc ; \ + $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gcc ; \ cd $(HOST_SUBDIR)/gcc || exit 1; \ case $(srcdir) in \ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ @@ -11307,7 +11066,7 @@ clean-stage1: clean-stage1-gcc clean-stage1-gcc: @[ -f $(HOST_SUBDIR)/gcc/Makefile ] || [ -f $(HOST_SUBDIR)/stage1-gcc/Makefile ] \ || exit 0 ; \ - @[ `cat stage_current` = stage1 ] || $(MAKE) stage1-start + [ `cat stage_current` = stage1 ] || $(MAKE) stage1-start cd $(HOST_SUBDIR)/gcc && \ $(MAKE) $(FLAGS_TO_PASS) \ CFLAGS="$(STAGE1_CFLAGS)" $(EXTRA_GCC_FLAGS) clean @@ -11337,7 +11096,7 @@ clean-stage2: clean-stage2-gcc clean-stage2-gcc: @[ -f $(HOST_SUBDIR)/gcc/Makefile ] || [ -f $(HOST_SUBDIR)/stage2-gcc/Makefile ] \ || exit 0 ; \ - @[ `cat stage_current` = stage2 ] || $(MAKE) stage2-start + [ `cat stage_current` = stage2 ] || $(MAKE) stage2-start cd $(HOST_SUBDIR)/gcc && \ $(MAKE) $(FLAGS_TO_PASS) \ $(POSTSTAGE1_FLAGS_TO_PASS) \ @@ -11368,7 +11127,7 @@ clean-stage3: clean-stage3-gcc clean-stage3-gcc: @[ -f $(HOST_SUBDIR)/gcc/Makefile ] || [ -f $(HOST_SUBDIR)/stage3-gcc/Makefile ] \ || exit 0 ; \ - @[ `cat stage_current` = stage3 ] || $(MAKE) stage3-start + [ `cat stage_current` = stage3 ] || $(MAKE) stage3-start cd $(HOST_SUBDIR)/gcc && \ $(MAKE) $(FLAGS_TO_PASS) \ $(POSTSTAGE1_FLAGS_TO_PASS) \ @@ -11399,7 +11158,7 @@ clean-stage4: clean-stage4-gcc clean-stage4-gcc: @[ -f $(HOST_SUBDIR)/gcc/Makefile ] || [ -f $(HOST_SUBDIR)/stage4-gcc/Makefile ] \ || exit 0 ; \ - @[ `cat stage_current` = stage4 ] || $(MAKE) stage4-start + [ `cat stage_current` = stage4 ] || $(MAKE) stage4-start cd $(HOST_SUBDIR)/gcc && \ $(MAKE) $(FLAGS_TO_PASS) \ $(POSTSTAGE1_FLAGS_TO_PASS) \ @@ -11430,7 +11189,7 @@ clean-stageprofile: clean-stageprofile-gcc clean-stageprofile-gcc: @[ -f $(HOST_SUBDIR)/gcc/Makefile ] || [ -f $(HOST_SUBDIR)/stageprofile-gcc/Makefile ] \ || exit 0 ; \ - @[ `cat stage_current` = stageprofile ] || $(MAKE) stageprofile-start + [ `cat stage_current` = stageprofile ] || $(MAKE) stageprofile-start cd $(HOST_SUBDIR)/gcc && \ $(MAKE) $(FLAGS_TO_PASS) \ $(POSTSTAGE1_FLAGS_TO_PASS) \ @@ -11461,7 +11220,7 @@ clean-stagefeedback: clean-stagefeedback-gcc clean-stagefeedback-gcc: @[ -f $(HOST_SUBDIR)/gcc/Makefile ] || [ -f $(HOST_SUBDIR)/stagefeedback-gcc/Makefile ] \ || exit 0 ; \ - @[ `cat stage_current` = stagefeedback ] || $(MAKE) stagefeedback-start + [ `cat stage_current` = stagefeedback ] || $(MAKE) stagefeedback-start cd $(HOST_SUBDIR)/gcc && \ $(MAKE) $(FLAGS_TO_PASS) \ $(POSTSTAGE1_FLAGS_TO_PASS) \ @@ -11478,7 +11237,7 @@ maybe-check-gcc: maybe-check-gcc: check-gcc check-gcc: - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -11493,7 +11252,7 @@ maybe-install-gcc: maybe-install-gcc: install-gcc install-gcc: installdirs - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -11757,8 +11516,8 @@ maintainer-clean-gcc: maybe-configure-gawk: @if gawk maybe-configure-gawk: configure-gawk -configure-gawk: - @$(unstage) +configure-gawk: + @: $(MAKE); $(unstage) @test ! -f $(HOST_SUBDIR)/gawk/Makefile || exit 0; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gawk ; \ r=`${PWD_COMMAND}`; export r; \ @@ -11788,7 +11547,7 @@ maybe-all-gawk: TARGET-gawk=all maybe-all-gawk: all-gawk all-gawk: configure-gawk - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -11805,7 +11564,7 @@ maybe-check-gawk: maybe-check-gawk: check-gawk check-gawk: - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -11820,7 +11579,7 @@ maybe-install-gawk: maybe-install-gawk: install-gawk install-gawk: installdirs - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -11838,7 +11597,7 @@ maybe-info-gawk: info-gawk info-gawk: \ configure-gawk - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./gawk/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -11864,7 +11623,7 @@ maybe-dvi-gawk: dvi-gawk dvi-gawk: \ configure-gawk - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./gawk/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -11890,7 +11649,7 @@ maybe-html-gawk: html-gawk html-gawk: \ configure-gawk - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./gawk/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -11916,7 +11675,7 @@ maybe-TAGS-gawk: TAGS-gawk TAGS-gawk: \ configure-gawk - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./gawk/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -11943,7 +11702,7 @@ maybe-install-info-gawk: install-info-gawk install-info-gawk: \ configure-gawk \ info-gawk - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./gawk/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -11969,7 +11728,7 @@ maybe-installcheck-gawk: installcheck-gawk installcheck-gawk: \ configure-gawk - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./gawk/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -11994,7 +11753,7 @@ maybe-mostlyclean-gawk: maybe-mostlyclean-gawk: mostlyclean-gawk mostlyclean-gawk: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./gawk/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -12019,7 +11778,7 @@ maybe-clean-gawk: maybe-clean-gawk: clean-gawk clean-gawk: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./gawk/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -12044,7 +11803,7 @@ maybe-distclean-gawk: maybe-distclean-gawk: distclean-gawk distclean-gawk: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./gawk/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -12069,7 +11828,7 @@ maybe-maintainer-clean-gawk: maybe-maintainer-clean-gawk: maintainer-clean-gawk maintainer-clean-gawk: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./gawk/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -12094,8 +11853,8 @@ maintainer-clean-gawk: maybe-configure-gettext: @if gettext maybe-configure-gettext: configure-gettext -configure-gettext: - @$(unstage) +configure-gettext: + @: $(MAKE); $(unstage) @test ! -f $(HOST_SUBDIR)/gettext/Makefile || exit 0; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gettext ; \ r=`${PWD_COMMAND}`; export r; \ @@ -12125,7 +11884,7 @@ maybe-all-gettext: TARGET-gettext=all maybe-all-gettext: all-gettext all-gettext: configure-gettext - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -12142,7 +11901,7 @@ maybe-check-gettext: maybe-check-gettext: check-gettext check-gettext: - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -12157,7 +11916,7 @@ maybe-install-gettext: maybe-install-gettext: install-gettext install-gettext: installdirs - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -12175,7 +11934,7 @@ maybe-info-gettext: info-gettext info-gettext: \ configure-gettext - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./gettext/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -12201,7 +11960,7 @@ maybe-dvi-gettext: dvi-gettext dvi-gettext: \ configure-gettext - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./gettext/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -12227,7 +11986,7 @@ maybe-html-gettext: html-gettext html-gettext: \ configure-gettext - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./gettext/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -12253,7 +12012,7 @@ maybe-TAGS-gettext: TAGS-gettext TAGS-gettext: \ configure-gettext - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./gettext/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -12280,7 +12039,7 @@ maybe-install-info-gettext: install-info-gettext install-info-gettext: \ configure-gettext \ info-gettext - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./gettext/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -12306,7 +12065,7 @@ maybe-installcheck-gettext: installcheck-gettext installcheck-gettext: \ configure-gettext - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./gettext/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -12331,7 +12090,7 @@ maybe-mostlyclean-gettext: maybe-mostlyclean-gettext: mostlyclean-gettext mostlyclean-gettext: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./gettext/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -12356,7 +12115,7 @@ maybe-clean-gettext: maybe-clean-gettext: clean-gettext clean-gettext: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./gettext/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -12381,7 +12140,7 @@ maybe-distclean-gettext: maybe-distclean-gettext: distclean-gettext distclean-gettext: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./gettext/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -12406,7 +12165,7 @@ maybe-maintainer-clean-gettext: maybe-maintainer-clean-gettext: maintainer-clean-gettext maintainer-clean-gettext: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./gettext/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -12431,8 +12190,8 @@ maintainer-clean-gettext: maybe-configure-gnuserv: @if gnuserv maybe-configure-gnuserv: configure-gnuserv -configure-gnuserv: - @$(unstage) +configure-gnuserv: + @: $(MAKE); $(unstage) @test ! -f $(HOST_SUBDIR)/gnuserv/Makefile || exit 0; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gnuserv ; \ r=`${PWD_COMMAND}`; export r; \ @@ -12462,7 +12221,7 @@ maybe-all-gnuserv: TARGET-gnuserv=all maybe-all-gnuserv: all-gnuserv all-gnuserv: configure-gnuserv - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -12479,7 +12238,7 @@ maybe-check-gnuserv: maybe-check-gnuserv: check-gnuserv check-gnuserv: - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -12494,7 +12253,7 @@ maybe-install-gnuserv: maybe-install-gnuserv: install-gnuserv install-gnuserv: installdirs - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -12512,7 +12271,7 @@ maybe-info-gnuserv: info-gnuserv info-gnuserv: \ configure-gnuserv - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./gnuserv/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -12538,7 +12297,7 @@ maybe-dvi-gnuserv: dvi-gnuserv dvi-gnuserv: \ configure-gnuserv - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./gnuserv/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -12564,7 +12323,7 @@ maybe-html-gnuserv: html-gnuserv html-gnuserv: \ configure-gnuserv - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./gnuserv/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -12590,7 +12349,7 @@ maybe-TAGS-gnuserv: TAGS-gnuserv TAGS-gnuserv: \ configure-gnuserv - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./gnuserv/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -12617,7 +12376,7 @@ maybe-install-info-gnuserv: install-info-gnuserv install-info-gnuserv: \ configure-gnuserv \ info-gnuserv - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./gnuserv/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -12643,7 +12402,7 @@ maybe-installcheck-gnuserv: installcheck-gnuserv installcheck-gnuserv: \ configure-gnuserv - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./gnuserv/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -12668,7 +12427,7 @@ maybe-mostlyclean-gnuserv: maybe-mostlyclean-gnuserv: mostlyclean-gnuserv mostlyclean-gnuserv: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./gnuserv/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -12693,7 +12452,7 @@ maybe-clean-gnuserv: maybe-clean-gnuserv: clean-gnuserv clean-gnuserv: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./gnuserv/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -12718,7 +12477,7 @@ maybe-distclean-gnuserv: maybe-distclean-gnuserv: distclean-gnuserv distclean-gnuserv: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./gnuserv/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -12743,7 +12502,7 @@ maybe-maintainer-clean-gnuserv: maybe-maintainer-clean-gnuserv: maintainer-clean-gnuserv maintainer-clean-gnuserv: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./gnuserv/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -12768,8 +12527,8 @@ maintainer-clean-gnuserv: maybe-configure-gprof: @if gprof maybe-configure-gprof: configure-gprof -configure-gprof: - @$(unstage) +configure-gprof: + @: $(MAKE); $(unstage) @test ! -f $(HOST_SUBDIR)/gprof/Makefile || exit 0; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gprof ; \ r=`${PWD_COMMAND}`; export r; \ @@ -12799,7 +12558,7 @@ maybe-all-gprof: TARGET-gprof=all maybe-all-gprof: all-gprof all-gprof: configure-gprof - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -12816,7 +12575,7 @@ maybe-check-gprof: maybe-check-gprof: check-gprof check-gprof: - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -12831,7 +12590,7 @@ maybe-install-gprof: maybe-install-gprof: install-gprof install-gprof: installdirs - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -12849,7 +12608,7 @@ maybe-info-gprof: info-gprof info-gprof: \ configure-gprof - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./gprof/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -12875,7 +12634,7 @@ maybe-dvi-gprof: dvi-gprof dvi-gprof: \ configure-gprof - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./gprof/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -12901,7 +12660,7 @@ maybe-html-gprof: html-gprof html-gprof: \ configure-gprof - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./gprof/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -12927,7 +12686,7 @@ maybe-TAGS-gprof: TAGS-gprof TAGS-gprof: \ configure-gprof - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./gprof/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -12954,7 +12713,7 @@ maybe-install-info-gprof: install-info-gprof install-info-gprof: \ configure-gprof \ info-gprof - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./gprof/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -12980,7 +12739,7 @@ maybe-installcheck-gprof: installcheck-gprof installcheck-gprof: \ configure-gprof - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./gprof/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -13005,7 +12764,7 @@ maybe-mostlyclean-gprof: maybe-mostlyclean-gprof: mostlyclean-gprof mostlyclean-gprof: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./gprof/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -13030,7 +12789,7 @@ maybe-clean-gprof: maybe-clean-gprof: clean-gprof clean-gprof: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./gprof/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -13055,7 +12814,7 @@ maybe-distclean-gprof: maybe-distclean-gprof: distclean-gprof distclean-gprof: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./gprof/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -13080,7 +12839,7 @@ maybe-maintainer-clean-gprof: maybe-maintainer-clean-gprof: maintainer-clean-gprof maintainer-clean-gprof: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./gprof/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -13105,8 +12864,8 @@ maintainer-clean-gprof: maybe-configure-gzip: @if gzip maybe-configure-gzip: configure-gzip -configure-gzip: - @$(unstage) +configure-gzip: + @: $(MAKE); $(unstage) @test ! -f $(HOST_SUBDIR)/gzip/Makefile || exit 0; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gzip ; \ r=`${PWD_COMMAND}`; export r; \ @@ -13136,7 +12895,7 @@ maybe-all-gzip: TARGET-gzip=all maybe-all-gzip: all-gzip all-gzip: configure-gzip - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -13153,7 +12912,7 @@ maybe-check-gzip: maybe-check-gzip: check-gzip check-gzip: - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -13168,7 +12927,7 @@ maybe-install-gzip: maybe-install-gzip: install-gzip install-gzip: installdirs - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -13186,7 +12945,7 @@ maybe-info-gzip: info-gzip info-gzip: \ configure-gzip - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./gzip/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -13212,7 +12971,7 @@ maybe-dvi-gzip: dvi-gzip dvi-gzip: \ configure-gzip - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./gzip/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -13238,7 +12997,7 @@ maybe-html-gzip: html-gzip html-gzip: \ configure-gzip - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./gzip/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -13264,7 +13023,7 @@ maybe-TAGS-gzip: TAGS-gzip TAGS-gzip: \ configure-gzip - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./gzip/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -13291,7 +13050,7 @@ maybe-install-info-gzip: install-info-gzip install-info-gzip: \ configure-gzip \ info-gzip - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./gzip/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -13317,7 +13076,7 @@ maybe-installcheck-gzip: installcheck-gzip installcheck-gzip: \ configure-gzip - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./gzip/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -13342,7 +13101,7 @@ maybe-mostlyclean-gzip: maybe-mostlyclean-gzip: mostlyclean-gzip mostlyclean-gzip: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./gzip/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -13367,7 +13126,7 @@ maybe-clean-gzip: maybe-clean-gzip: clean-gzip clean-gzip: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./gzip/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -13392,7 +13151,7 @@ maybe-distclean-gzip: maybe-distclean-gzip: distclean-gzip distclean-gzip: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./gzip/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -13417,7 +13176,7 @@ maybe-maintainer-clean-gzip: maybe-maintainer-clean-gzip: maintainer-clean-gzip maintainer-clean-gzip: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./gzip/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -13442,8 +13201,8 @@ maintainer-clean-gzip: maybe-configure-hello: @if hello maybe-configure-hello: configure-hello -configure-hello: - @$(unstage) +configure-hello: + @: $(MAKE); $(unstage) @test ! -f $(HOST_SUBDIR)/hello/Makefile || exit 0; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/hello ; \ r=`${PWD_COMMAND}`; export r; \ @@ -13473,7 +13232,7 @@ maybe-all-hello: TARGET-hello=all maybe-all-hello: all-hello all-hello: configure-hello - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -13490,7 +13249,7 @@ maybe-check-hello: maybe-check-hello: check-hello check-hello: - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -13505,7 +13264,7 @@ maybe-install-hello: maybe-install-hello: install-hello install-hello: installdirs - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -13523,7 +13282,7 @@ maybe-info-hello: info-hello info-hello: \ configure-hello - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./hello/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -13549,7 +13308,7 @@ maybe-dvi-hello: dvi-hello dvi-hello: \ configure-hello - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./hello/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -13575,7 +13334,7 @@ maybe-html-hello: html-hello html-hello: \ configure-hello - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./hello/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -13601,7 +13360,7 @@ maybe-TAGS-hello: TAGS-hello TAGS-hello: \ configure-hello - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./hello/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -13628,7 +13387,7 @@ maybe-install-info-hello: install-info-hello install-info-hello: \ configure-hello \ info-hello - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./hello/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -13654,7 +13413,7 @@ maybe-installcheck-hello: installcheck-hello installcheck-hello: \ configure-hello - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./hello/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -13679,7 +13438,7 @@ maybe-mostlyclean-hello: maybe-mostlyclean-hello: mostlyclean-hello mostlyclean-hello: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./hello/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -13704,7 +13463,7 @@ maybe-clean-hello: maybe-clean-hello: clean-hello clean-hello: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./hello/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -13729,7 +13488,7 @@ maybe-distclean-hello: maybe-distclean-hello: distclean-hello distclean-hello: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./hello/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -13754,7 +13513,7 @@ maybe-maintainer-clean-hello: maybe-maintainer-clean-hello: maintainer-clean-hello maintainer-clean-hello: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./hello/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -13779,8 +13538,8 @@ maintainer-clean-hello: maybe-configure-indent: @if indent maybe-configure-indent: configure-indent -configure-indent: - @$(unstage) +configure-indent: + @: $(MAKE); $(unstage) @test ! -f $(HOST_SUBDIR)/indent/Makefile || exit 0; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/indent ; \ r=`${PWD_COMMAND}`; export r; \ @@ -13810,7 +13569,7 @@ maybe-all-indent: TARGET-indent=all maybe-all-indent: all-indent all-indent: configure-indent - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -13827,7 +13586,7 @@ maybe-check-indent: maybe-check-indent: check-indent check-indent: - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -13842,7 +13601,7 @@ maybe-install-indent: maybe-install-indent: install-indent install-indent: installdirs - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -13860,7 +13619,7 @@ maybe-info-indent: info-indent info-indent: \ configure-indent - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./indent/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -13886,7 +13645,7 @@ maybe-dvi-indent: dvi-indent dvi-indent: \ configure-indent - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./indent/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -13912,7 +13671,7 @@ maybe-html-indent: html-indent html-indent: \ configure-indent - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./indent/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -13938,7 +13697,7 @@ maybe-TAGS-indent: TAGS-indent TAGS-indent: \ configure-indent - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./indent/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -13965,7 +13724,7 @@ maybe-install-info-indent: install-info-indent install-info-indent: \ configure-indent \ info-indent - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./indent/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -13991,7 +13750,7 @@ maybe-installcheck-indent: installcheck-indent installcheck-indent: \ configure-indent - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./indent/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -14016,7 +13775,7 @@ maybe-mostlyclean-indent: maybe-mostlyclean-indent: mostlyclean-indent mostlyclean-indent: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./indent/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -14041,7 +13800,7 @@ maybe-clean-indent: maybe-clean-indent: clean-indent clean-indent: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./indent/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -14066,7 +13825,7 @@ maybe-distclean-indent: maybe-distclean-indent: distclean-indent distclean-indent: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./indent/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -14091,7 +13850,7 @@ maybe-maintainer-clean-indent: maybe-maintainer-clean-indent: maintainer-clean-indent maintainer-clean-indent: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./indent/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -14116,7 +13875,7 @@ maintainer-clean-indent: maybe-configure-intl: @if intl maybe-configure-intl: configure-intl -configure-intl: +configure-intl: @test -f stage_last && exit 0; \ test ! -f $(HOST_SUBDIR)/intl/Makefile || exit 0; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/intl ; \ @@ -14143,13 +13902,13 @@ configure-intl: maybe-configure-stage1-intl: @if intl-bootstrap maybe-configure-stage1-intl: configure-stage1-intl -configure-stage1-intl: +configure-stage1-intl: @[ `cat stage_current` = stage1 ] || $(MAKE) stage1-start - @[ -f $(HOST_SUBDIR)/intl/Makefile ] && exit 0 || : ; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/intl + test ! -f $(HOST_SUBDIR)/intl/Makefile || exit 0; \ $(HOST_EXPORTS) \ echo Configuring stage 1 in $(HOST_SUBDIR)/intl ; \ + $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/intl ; \ cd $(HOST_SUBDIR)/intl || exit 1; \ case $(srcdir) in \ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ @@ -14167,14 +13926,14 @@ configure-stage1-intl: maybe-configure-stage2-intl: @if intl-bootstrap maybe-configure-stage2-intl: configure-stage2-intl -configure-stage2-intl: +configure-stage2-intl: @[ `cat stage_current` = stage2 ] || $(MAKE) stage2-start - @[ -f $(HOST_SUBDIR)/intl/Makefile ] && exit 0 || : ; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/intl + test ! -f $(HOST_SUBDIR)/intl/Makefile || exit 0; \ $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ echo Configuring stage 2 in $(HOST_SUBDIR)/intl ; \ + $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/intl ; \ cd $(HOST_SUBDIR)/intl || exit 1; \ case $(srcdir) in \ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ @@ -14192,14 +13951,14 @@ configure-stage2-intl: maybe-configure-stage3-intl: @if intl-bootstrap maybe-configure-stage3-intl: configure-stage3-intl -configure-stage3-intl: +configure-stage3-intl: @[ `cat stage_current` = stage3 ] || $(MAKE) stage3-start - @[ -f $(HOST_SUBDIR)/intl/Makefile ] && exit 0 || : ; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/intl + test ! -f $(HOST_SUBDIR)/intl/Makefile || exit 0; \ $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ echo Configuring stage 3 in $(HOST_SUBDIR)/intl ; \ + $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/intl ; \ cd $(HOST_SUBDIR)/intl || exit 1; \ case $(srcdir) in \ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ @@ -14217,14 +13976,14 @@ configure-stage3-intl: maybe-configure-stage4-intl: @if intl-bootstrap maybe-configure-stage4-intl: configure-stage4-intl -configure-stage4-intl: +configure-stage4-intl: @[ `cat stage_current` = stage4 ] || $(MAKE) stage4-start - @[ -f $(HOST_SUBDIR)/intl/Makefile ] && exit 0 || : ; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/intl + test ! -f $(HOST_SUBDIR)/intl/Makefile || exit 0; \ $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ echo Configuring stage 4 in $(HOST_SUBDIR)/intl ; \ + $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/intl ; \ cd $(HOST_SUBDIR)/intl || exit 1; \ case $(srcdir) in \ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ @@ -14242,14 +14001,14 @@ configure-stage4-intl: maybe-configure-stageprofile-intl: @if intl-bootstrap maybe-configure-stageprofile-intl: configure-stageprofile-intl -configure-stageprofile-intl: +configure-stageprofile-intl: @[ `cat stage_current` = stageprofile ] || $(MAKE) stageprofile-start - @[ -f $(HOST_SUBDIR)/intl/Makefile ] && exit 0 || : ; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/intl + test ! -f $(HOST_SUBDIR)/intl/Makefile || exit 0; \ $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ echo Configuring stage profile in $(HOST_SUBDIR)/intl ; \ + $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/intl ; \ cd $(HOST_SUBDIR)/intl || exit 1; \ case $(srcdir) in \ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ @@ -14267,14 +14026,14 @@ configure-stageprofile-intl: maybe-configure-stagefeedback-intl: @if intl-bootstrap maybe-configure-stagefeedback-intl: configure-stagefeedback-intl -configure-stagefeedback-intl: +configure-stagefeedback-intl: @[ `cat stage_current` = stagefeedback ] || $(MAKE) stagefeedback-start - @[ -f $(HOST_SUBDIR)/intl/Makefile ] && exit 0 || : ; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/intl + test ! -f $(HOST_SUBDIR)/intl/Makefile || exit 0; \ $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ echo Configuring stage feedback in $(HOST_SUBDIR)/intl ; \ + $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/intl ; \ cd $(HOST_SUBDIR)/intl || exit 1; \ case $(srcdir) in \ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ @@ -14330,7 +14089,7 @@ clean-stage1: clean-stage1-intl clean-stage1-intl: @[ -f $(HOST_SUBDIR)/intl/Makefile ] || [ -f $(HOST_SUBDIR)/stage1-intl/Makefile ] \ || exit 0 ; \ - @[ `cat stage_current` = stage1 ] || $(MAKE) stage1-start + [ `cat stage_current` = stage1 ] || $(MAKE) stage1-start cd $(HOST_SUBDIR)/intl && \ $(MAKE) $(FLAGS_TO_PASS) \ CFLAGS="$(STAGE1_CFLAGS)" clean @@ -14360,7 +14119,7 @@ clean-stage2: clean-stage2-intl clean-stage2-intl: @[ -f $(HOST_SUBDIR)/intl/Makefile ] || [ -f $(HOST_SUBDIR)/stage2-intl/Makefile ] \ || exit 0 ; \ - @[ `cat stage_current` = stage2 ] || $(MAKE) stage2-start + [ `cat stage_current` = stage2 ] || $(MAKE) stage2-start cd $(HOST_SUBDIR)/intl && \ $(MAKE) $(FLAGS_TO_PASS) \ $(POSTSTAGE1_FLAGS_TO_PASS) \ @@ -14391,7 +14150,7 @@ clean-stage3: clean-stage3-intl clean-stage3-intl: @[ -f $(HOST_SUBDIR)/intl/Makefile ] || [ -f $(HOST_SUBDIR)/stage3-intl/Makefile ] \ || exit 0 ; \ - @[ `cat stage_current` = stage3 ] || $(MAKE) stage3-start + [ `cat stage_current` = stage3 ] || $(MAKE) stage3-start cd $(HOST_SUBDIR)/intl && \ $(MAKE) $(FLAGS_TO_PASS) \ $(POSTSTAGE1_FLAGS_TO_PASS) \ @@ -14422,7 +14181,7 @@ clean-stage4: clean-stage4-intl clean-stage4-intl: @[ -f $(HOST_SUBDIR)/intl/Makefile ] || [ -f $(HOST_SUBDIR)/stage4-intl/Makefile ] \ || exit 0 ; \ - @[ `cat stage_current` = stage4 ] || $(MAKE) stage4-start + [ `cat stage_current` = stage4 ] || $(MAKE) stage4-start cd $(HOST_SUBDIR)/intl && \ $(MAKE) $(FLAGS_TO_PASS) \ $(POSTSTAGE1_FLAGS_TO_PASS) \ @@ -14453,7 +14212,7 @@ clean-stageprofile: clean-stageprofile-intl clean-stageprofile-intl: @[ -f $(HOST_SUBDIR)/intl/Makefile ] || [ -f $(HOST_SUBDIR)/stageprofile-intl/Makefile ] \ || exit 0 ; \ - @[ `cat stage_current` = stageprofile ] || $(MAKE) stageprofile-start + [ `cat stage_current` = stageprofile ] || $(MAKE) stageprofile-start cd $(HOST_SUBDIR)/intl && \ $(MAKE) $(FLAGS_TO_PASS) \ $(POSTSTAGE1_FLAGS_TO_PASS) \ @@ -14484,7 +14243,7 @@ clean-stagefeedback: clean-stagefeedback-intl clean-stagefeedback-intl: @[ -f $(HOST_SUBDIR)/intl/Makefile ] || [ -f $(HOST_SUBDIR)/stagefeedback-intl/Makefile ] \ || exit 0 ; \ - @[ `cat stage_current` = stagefeedback ] || $(MAKE) stagefeedback-start + [ `cat stage_current` = stagefeedback ] || $(MAKE) stagefeedback-start cd $(HOST_SUBDIR)/intl && \ $(MAKE) $(FLAGS_TO_PASS) \ $(POSTSTAGE1_FLAGS_TO_PASS) \ @@ -14501,7 +14260,7 @@ maybe-check-intl: maybe-check-intl: check-intl check-intl: - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -14516,7 +14275,7 @@ maybe-install-intl: maybe-install-intl: install-intl install-intl: installdirs - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -14780,8 +14539,8 @@ maintainer-clean-intl: maybe-configure-tcl: @if tcl maybe-configure-tcl: configure-tcl -configure-tcl: - @$(unstage) +configure-tcl: + @: $(MAKE); $(unstage) @test ! -f $(HOST_SUBDIR)/tcl/Makefile || exit 0; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/tcl ; \ r=`${PWD_COMMAND}`; export r; \ @@ -14811,7 +14570,7 @@ maybe-all-tcl: TARGET-tcl=all maybe-all-tcl: all-tcl all-tcl: configure-tcl - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -14828,7 +14587,7 @@ maybe-check-tcl: maybe-check-tcl: check-tcl check-tcl: - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -14843,7 +14602,7 @@ maybe-install-tcl: maybe-install-tcl: install-tcl install-tcl: installdirs - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -14861,7 +14620,7 @@ maybe-info-tcl: info-tcl info-tcl: \ configure-tcl - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./tcl/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -14887,7 +14646,7 @@ maybe-dvi-tcl: dvi-tcl dvi-tcl: \ configure-tcl - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./tcl/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -14913,7 +14672,7 @@ maybe-html-tcl: html-tcl html-tcl: \ configure-tcl - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./tcl/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -14939,7 +14698,7 @@ maybe-TAGS-tcl: TAGS-tcl TAGS-tcl: \ configure-tcl - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./tcl/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -14966,7 +14725,7 @@ maybe-install-info-tcl: install-info-tcl install-info-tcl: \ configure-tcl \ info-tcl - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./tcl/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -14992,7 +14751,7 @@ maybe-installcheck-tcl: installcheck-tcl installcheck-tcl: \ configure-tcl - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./tcl/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -15027,7 +14786,7 @@ maybe-clean-tcl: maybe-clean-tcl: clean-tcl clean-tcl: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./tcl/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -15052,7 +14811,7 @@ maybe-distclean-tcl: maybe-distclean-tcl: distclean-tcl distclean-tcl: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./tcl/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -15077,7 +14836,7 @@ maybe-maintainer-clean-tcl: maybe-maintainer-clean-tcl: maintainer-clean-tcl maintainer-clean-tcl: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./tcl/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -15102,8 +14861,8 @@ maintainer-clean-tcl: maybe-configure-itcl: @if itcl maybe-configure-itcl: configure-itcl -configure-itcl: - @$(unstage) +configure-itcl: + @: $(MAKE); $(unstage) @test ! -f $(HOST_SUBDIR)/itcl/Makefile || exit 0; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/itcl ; \ r=`${PWD_COMMAND}`; export r; \ @@ -15133,7 +14892,7 @@ maybe-all-itcl: TARGET-itcl=all maybe-all-itcl: all-itcl all-itcl: configure-itcl - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -15150,7 +14909,7 @@ maybe-check-itcl: maybe-check-itcl: check-itcl check-itcl: - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -15165,7 +14924,7 @@ maybe-install-itcl: maybe-install-itcl: install-itcl install-itcl: installdirs - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -15183,7 +14942,7 @@ maybe-info-itcl: info-itcl info-itcl: \ configure-itcl - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./itcl/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -15209,7 +14968,7 @@ maybe-dvi-itcl: dvi-itcl dvi-itcl: \ configure-itcl - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./itcl/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -15235,7 +14994,7 @@ maybe-html-itcl: html-itcl html-itcl: \ configure-itcl - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./itcl/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -15261,7 +15020,7 @@ maybe-TAGS-itcl: TAGS-itcl TAGS-itcl: \ configure-itcl - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./itcl/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -15288,7 +15047,7 @@ maybe-install-info-itcl: install-info-itcl install-info-itcl: \ configure-itcl \ info-itcl - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./itcl/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -15314,7 +15073,7 @@ maybe-installcheck-itcl: installcheck-itcl installcheck-itcl: \ configure-itcl - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./itcl/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -15339,7 +15098,7 @@ maybe-mostlyclean-itcl: maybe-mostlyclean-itcl: mostlyclean-itcl mostlyclean-itcl: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./itcl/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -15364,7 +15123,7 @@ maybe-clean-itcl: maybe-clean-itcl: clean-itcl clean-itcl: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./itcl/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -15389,7 +15148,7 @@ maybe-distclean-itcl: maybe-distclean-itcl: distclean-itcl distclean-itcl: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./itcl/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -15414,7 +15173,7 @@ maybe-maintainer-clean-itcl: maybe-maintainer-clean-itcl: maintainer-clean-itcl maintainer-clean-itcl: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./itcl/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -15439,7 +15198,7 @@ maintainer-clean-itcl: maybe-configure-ld: @if ld maybe-configure-ld: configure-ld -configure-ld: +configure-ld: @test -f stage_last && exit 0; \ test ! -f $(HOST_SUBDIR)/ld/Makefile || exit 0; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/ld ; \ @@ -15466,13 +15225,13 @@ configure-ld: maybe-configure-stage1-ld: @if ld-bootstrap maybe-configure-stage1-ld: configure-stage1-ld -configure-stage1-ld: +configure-stage1-ld: @[ `cat stage_current` = stage1 ] || $(MAKE) stage1-start - @[ -f $(HOST_SUBDIR)/ld/Makefile ] && exit 0 || : ; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/ld + test ! -f $(HOST_SUBDIR)/ld/Makefile || exit 0; \ $(HOST_EXPORTS) \ echo Configuring stage 1 in $(HOST_SUBDIR)/ld ; \ + $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/ld ; \ cd $(HOST_SUBDIR)/ld || exit 1; \ case $(srcdir) in \ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ @@ -15490,14 +15249,14 @@ configure-stage1-ld: maybe-configure-stage2-ld: @if ld-bootstrap maybe-configure-stage2-ld: configure-stage2-ld -configure-stage2-ld: +configure-stage2-ld: @[ `cat stage_current` = stage2 ] || $(MAKE) stage2-start - @[ -f $(HOST_SUBDIR)/ld/Makefile ] && exit 0 || : ; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/ld + test ! -f $(HOST_SUBDIR)/ld/Makefile || exit 0; \ $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ echo Configuring stage 2 in $(HOST_SUBDIR)/ld ; \ + $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/ld ; \ cd $(HOST_SUBDIR)/ld || exit 1; \ case $(srcdir) in \ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ @@ -15515,14 +15274,14 @@ configure-stage2-ld: maybe-configure-stage3-ld: @if ld-bootstrap maybe-configure-stage3-ld: configure-stage3-ld -configure-stage3-ld: +configure-stage3-ld: @[ `cat stage_current` = stage3 ] || $(MAKE) stage3-start - @[ -f $(HOST_SUBDIR)/ld/Makefile ] && exit 0 || : ; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/ld + test ! -f $(HOST_SUBDIR)/ld/Makefile || exit 0; \ $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ echo Configuring stage 3 in $(HOST_SUBDIR)/ld ; \ + $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/ld ; \ cd $(HOST_SUBDIR)/ld || exit 1; \ case $(srcdir) in \ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ @@ -15540,14 +15299,14 @@ configure-stage3-ld: maybe-configure-stage4-ld: @if ld-bootstrap maybe-configure-stage4-ld: configure-stage4-ld -configure-stage4-ld: +configure-stage4-ld: @[ `cat stage_current` = stage4 ] || $(MAKE) stage4-start - @[ -f $(HOST_SUBDIR)/ld/Makefile ] && exit 0 || : ; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/ld + test ! -f $(HOST_SUBDIR)/ld/Makefile || exit 0; \ $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ echo Configuring stage 4 in $(HOST_SUBDIR)/ld ; \ + $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/ld ; \ cd $(HOST_SUBDIR)/ld || exit 1; \ case $(srcdir) in \ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ @@ -15565,14 +15324,14 @@ configure-stage4-ld: maybe-configure-stageprofile-ld: @if ld-bootstrap maybe-configure-stageprofile-ld: configure-stageprofile-ld -configure-stageprofile-ld: +configure-stageprofile-ld: @[ `cat stage_current` = stageprofile ] || $(MAKE) stageprofile-start - @[ -f $(HOST_SUBDIR)/ld/Makefile ] && exit 0 || : ; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/ld + test ! -f $(HOST_SUBDIR)/ld/Makefile || exit 0; \ $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ echo Configuring stage profile in $(HOST_SUBDIR)/ld ; \ + $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/ld ; \ cd $(HOST_SUBDIR)/ld || exit 1; \ case $(srcdir) in \ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ @@ -15590,14 +15349,14 @@ configure-stageprofile-ld: maybe-configure-stagefeedback-ld: @if ld-bootstrap maybe-configure-stagefeedback-ld: configure-stagefeedback-ld -configure-stagefeedback-ld: +configure-stagefeedback-ld: @[ `cat stage_current` = stagefeedback ] || $(MAKE) stagefeedback-start - @[ -f $(HOST_SUBDIR)/ld/Makefile ] && exit 0 || : ; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/ld + test ! -f $(HOST_SUBDIR)/ld/Makefile || exit 0; \ $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ echo Configuring stage feedback in $(HOST_SUBDIR)/ld ; \ + $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/ld ; \ cd $(HOST_SUBDIR)/ld || exit 1; \ case $(srcdir) in \ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ @@ -15653,7 +15412,7 @@ clean-stage1: clean-stage1-ld clean-stage1-ld: @[ -f $(HOST_SUBDIR)/ld/Makefile ] || [ -f $(HOST_SUBDIR)/stage1-ld/Makefile ] \ || exit 0 ; \ - @[ `cat stage_current` = stage1 ] || $(MAKE) stage1-start + [ `cat stage_current` = stage1 ] || $(MAKE) stage1-start cd $(HOST_SUBDIR)/ld && \ $(MAKE) $(FLAGS_TO_PASS) \ CFLAGS="$(STAGE1_CFLAGS)" clean @@ -15683,7 +15442,7 @@ clean-stage2: clean-stage2-ld clean-stage2-ld: @[ -f $(HOST_SUBDIR)/ld/Makefile ] || [ -f $(HOST_SUBDIR)/stage2-ld/Makefile ] \ || exit 0 ; \ - @[ `cat stage_current` = stage2 ] || $(MAKE) stage2-start + [ `cat stage_current` = stage2 ] || $(MAKE) stage2-start cd $(HOST_SUBDIR)/ld && \ $(MAKE) $(FLAGS_TO_PASS) \ $(POSTSTAGE1_FLAGS_TO_PASS) \ @@ -15714,7 +15473,7 @@ clean-stage3: clean-stage3-ld clean-stage3-ld: @[ -f $(HOST_SUBDIR)/ld/Makefile ] || [ -f $(HOST_SUBDIR)/stage3-ld/Makefile ] \ || exit 0 ; \ - @[ `cat stage_current` = stage3 ] || $(MAKE) stage3-start + [ `cat stage_current` = stage3 ] || $(MAKE) stage3-start cd $(HOST_SUBDIR)/ld && \ $(MAKE) $(FLAGS_TO_PASS) \ $(POSTSTAGE1_FLAGS_TO_PASS) \ @@ -15745,7 +15504,7 @@ clean-stage4: clean-stage4-ld clean-stage4-ld: @[ -f $(HOST_SUBDIR)/ld/Makefile ] || [ -f $(HOST_SUBDIR)/stage4-ld/Makefile ] \ || exit 0 ; \ - @[ `cat stage_current` = stage4 ] || $(MAKE) stage4-start + [ `cat stage_current` = stage4 ] || $(MAKE) stage4-start cd $(HOST_SUBDIR)/ld && \ $(MAKE) $(FLAGS_TO_PASS) \ $(POSTSTAGE1_FLAGS_TO_PASS) \ @@ -15776,7 +15535,7 @@ clean-stageprofile: clean-stageprofile-ld clean-stageprofile-ld: @[ -f $(HOST_SUBDIR)/ld/Makefile ] || [ -f $(HOST_SUBDIR)/stageprofile-ld/Makefile ] \ || exit 0 ; \ - @[ `cat stage_current` = stageprofile ] || $(MAKE) stageprofile-start + [ `cat stage_current` = stageprofile ] || $(MAKE) stageprofile-start cd $(HOST_SUBDIR)/ld && \ $(MAKE) $(FLAGS_TO_PASS) \ $(POSTSTAGE1_FLAGS_TO_PASS) \ @@ -15807,7 +15566,7 @@ clean-stagefeedback: clean-stagefeedback-ld clean-stagefeedback-ld: @[ -f $(HOST_SUBDIR)/ld/Makefile ] || [ -f $(HOST_SUBDIR)/stagefeedback-ld/Makefile ] \ || exit 0 ; \ - @[ `cat stage_current` = stagefeedback ] || $(MAKE) stagefeedback-start + [ `cat stage_current` = stagefeedback ] || $(MAKE) stagefeedback-start cd $(HOST_SUBDIR)/ld && \ $(MAKE) $(FLAGS_TO_PASS) \ $(POSTSTAGE1_FLAGS_TO_PASS) \ @@ -15824,7 +15583,7 @@ maybe-check-ld: maybe-check-ld: check-ld check-ld: - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -15839,7 +15598,7 @@ maybe-install-ld: maybe-install-ld: install-ld install-ld: installdirs - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -16103,7 +15862,7 @@ maintainer-clean-ld: maybe-configure-libcpp: @if libcpp maybe-configure-libcpp: configure-libcpp -configure-libcpp: +configure-libcpp: @test -f stage_last && exit 0; \ test ! -f $(HOST_SUBDIR)/libcpp/Makefile || exit 0; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libcpp ; \ @@ -16130,13 +15889,13 @@ configure-libcpp: maybe-configure-stage1-libcpp: @if libcpp-bootstrap maybe-configure-stage1-libcpp: configure-stage1-libcpp -configure-stage1-libcpp: +configure-stage1-libcpp: @[ `cat stage_current` = stage1 ] || $(MAKE) stage1-start - @[ -f $(HOST_SUBDIR)/libcpp/Makefile ] && exit 0 || : ; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libcpp + test ! -f $(HOST_SUBDIR)/libcpp/Makefile || exit 0; \ $(HOST_EXPORTS) \ echo Configuring stage 1 in $(HOST_SUBDIR)/libcpp ; \ + $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libcpp ; \ cd $(HOST_SUBDIR)/libcpp || exit 1; \ case $(srcdir) in \ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ @@ -16154,14 +15913,14 @@ configure-stage1-libcpp: maybe-configure-stage2-libcpp: @if libcpp-bootstrap maybe-configure-stage2-libcpp: configure-stage2-libcpp -configure-stage2-libcpp: +configure-stage2-libcpp: @[ `cat stage_current` = stage2 ] || $(MAKE) stage2-start - @[ -f $(HOST_SUBDIR)/libcpp/Makefile ] && exit 0 || : ; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libcpp + test ! -f $(HOST_SUBDIR)/libcpp/Makefile || exit 0; \ $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ echo Configuring stage 2 in $(HOST_SUBDIR)/libcpp ; \ + $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libcpp ; \ cd $(HOST_SUBDIR)/libcpp || exit 1; \ case $(srcdir) in \ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ @@ -16179,14 +15938,14 @@ configure-stage2-libcpp: maybe-configure-stage3-libcpp: @if libcpp-bootstrap maybe-configure-stage3-libcpp: configure-stage3-libcpp -configure-stage3-libcpp: +configure-stage3-libcpp: @[ `cat stage_current` = stage3 ] || $(MAKE) stage3-start - @[ -f $(HOST_SUBDIR)/libcpp/Makefile ] && exit 0 || : ; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libcpp + test ! -f $(HOST_SUBDIR)/libcpp/Makefile || exit 0; \ $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ echo Configuring stage 3 in $(HOST_SUBDIR)/libcpp ; \ + $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libcpp ; \ cd $(HOST_SUBDIR)/libcpp || exit 1; \ case $(srcdir) in \ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ @@ -16204,14 +15963,14 @@ configure-stage3-libcpp: maybe-configure-stage4-libcpp: @if libcpp-bootstrap maybe-configure-stage4-libcpp: configure-stage4-libcpp -configure-stage4-libcpp: +configure-stage4-libcpp: @[ `cat stage_current` = stage4 ] || $(MAKE) stage4-start - @[ -f $(HOST_SUBDIR)/libcpp/Makefile ] && exit 0 || : ; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libcpp + test ! -f $(HOST_SUBDIR)/libcpp/Makefile || exit 0; \ $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ echo Configuring stage 4 in $(HOST_SUBDIR)/libcpp ; \ + $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libcpp ; \ cd $(HOST_SUBDIR)/libcpp || exit 1; \ case $(srcdir) in \ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ @@ -16229,14 +15988,14 @@ configure-stage4-libcpp: maybe-configure-stageprofile-libcpp: @if libcpp-bootstrap maybe-configure-stageprofile-libcpp: configure-stageprofile-libcpp -configure-stageprofile-libcpp: +configure-stageprofile-libcpp: @[ `cat stage_current` = stageprofile ] || $(MAKE) stageprofile-start - @[ -f $(HOST_SUBDIR)/libcpp/Makefile ] && exit 0 || : ; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libcpp + test ! -f $(HOST_SUBDIR)/libcpp/Makefile || exit 0; \ $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ echo Configuring stage profile in $(HOST_SUBDIR)/libcpp ; \ + $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libcpp ; \ cd $(HOST_SUBDIR)/libcpp || exit 1; \ case $(srcdir) in \ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ @@ -16254,14 +16013,14 @@ configure-stageprofile-libcpp: maybe-configure-stagefeedback-libcpp: @if libcpp-bootstrap maybe-configure-stagefeedback-libcpp: configure-stagefeedback-libcpp -configure-stagefeedback-libcpp: +configure-stagefeedback-libcpp: @[ `cat stage_current` = stagefeedback ] || $(MAKE) stagefeedback-start - @[ -f $(HOST_SUBDIR)/libcpp/Makefile ] && exit 0 || : ; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libcpp + test ! -f $(HOST_SUBDIR)/libcpp/Makefile || exit 0; \ $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ echo Configuring stage feedback in $(HOST_SUBDIR)/libcpp ; \ + $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libcpp ; \ cd $(HOST_SUBDIR)/libcpp || exit 1; \ case $(srcdir) in \ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ @@ -16317,7 +16076,7 @@ clean-stage1: clean-stage1-libcpp clean-stage1-libcpp: @[ -f $(HOST_SUBDIR)/libcpp/Makefile ] || [ -f $(HOST_SUBDIR)/stage1-libcpp/Makefile ] \ || exit 0 ; \ - @[ `cat stage_current` = stage1 ] || $(MAKE) stage1-start + [ `cat stage_current` = stage1 ] || $(MAKE) stage1-start cd $(HOST_SUBDIR)/libcpp && \ $(MAKE) $(FLAGS_TO_PASS) \ CFLAGS="$(STAGE1_CFLAGS)" clean @@ -16347,7 +16106,7 @@ clean-stage2: clean-stage2-libcpp clean-stage2-libcpp: @[ -f $(HOST_SUBDIR)/libcpp/Makefile ] || [ -f $(HOST_SUBDIR)/stage2-libcpp/Makefile ] \ || exit 0 ; \ - @[ `cat stage_current` = stage2 ] || $(MAKE) stage2-start + [ `cat stage_current` = stage2 ] || $(MAKE) stage2-start cd $(HOST_SUBDIR)/libcpp && \ $(MAKE) $(FLAGS_TO_PASS) \ $(POSTSTAGE1_FLAGS_TO_PASS) \ @@ -16378,7 +16137,7 @@ clean-stage3: clean-stage3-libcpp clean-stage3-libcpp: @[ -f $(HOST_SUBDIR)/libcpp/Makefile ] || [ -f $(HOST_SUBDIR)/stage3-libcpp/Makefile ] \ || exit 0 ; \ - @[ `cat stage_current` = stage3 ] || $(MAKE) stage3-start + [ `cat stage_current` = stage3 ] || $(MAKE) stage3-start cd $(HOST_SUBDIR)/libcpp && \ $(MAKE) $(FLAGS_TO_PASS) \ $(POSTSTAGE1_FLAGS_TO_PASS) \ @@ -16409,7 +16168,7 @@ clean-stage4: clean-stage4-libcpp clean-stage4-libcpp: @[ -f $(HOST_SUBDIR)/libcpp/Makefile ] || [ -f $(HOST_SUBDIR)/stage4-libcpp/Makefile ] \ || exit 0 ; \ - @[ `cat stage_current` = stage4 ] || $(MAKE) stage4-start + [ `cat stage_current` = stage4 ] || $(MAKE) stage4-start cd $(HOST_SUBDIR)/libcpp && \ $(MAKE) $(FLAGS_TO_PASS) \ $(POSTSTAGE1_FLAGS_TO_PASS) \ @@ -16440,7 +16199,7 @@ clean-stageprofile: clean-stageprofile-libcpp clean-stageprofile-libcpp: @[ -f $(HOST_SUBDIR)/libcpp/Makefile ] || [ -f $(HOST_SUBDIR)/stageprofile-libcpp/Makefile ] \ || exit 0 ; \ - @[ `cat stage_current` = stageprofile ] || $(MAKE) stageprofile-start + [ `cat stage_current` = stageprofile ] || $(MAKE) stageprofile-start cd $(HOST_SUBDIR)/libcpp && \ $(MAKE) $(FLAGS_TO_PASS) \ $(POSTSTAGE1_FLAGS_TO_PASS) \ @@ -16471,7 +16230,7 @@ clean-stagefeedback: clean-stagefeedback-libcpp clean-stagefeedback-libcpp: @[ -f $(HOST_SUBDIR)/libcpp/Makefile ] || [ -f $(HOST_SUBDIR)/stagefeedback-libcpp/Makefile ] \ || exit 0 ; \ - @[ `cat stage_current` = stagefeedback ] || $(MAKE) stagefeedback-start + [ `cat stage_current` = stagefeedback ] || $(MAKE) stagefeedback-start cd $(HOST_SUBDIR)/libcpp && \ $(MAKE) $(FLAGS_TO_PASS) \ $(POSTSTAGE1_FLAGS_TO_PASS) \ @@ -16488,7 +16247,7 @@ maybe-check-libcpp: maybe-check-libcpp: check-libcpp check-libcpp: - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -16503,7 +16262,7 @@ maybe-install-libcpp: maybe-install-libcpp: install-libcpp install-libcpp: installdirs - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -16763,12 +16522,676 @@ maintainer-clean-libcpp: +.PHONY: configure-libdecnumber maybe-configure-libdecnumber +maybe-configure-libdecnumber: +@if libdecnumber +maybe-configure-libdecnumber: configure-libdecnumber +configure-libdecnumber: + @test -f stage_last && exit 0; \ + test ! -f $(HOST_SUBDIR)/libdecnumber/Makefile || exit 0; \ + $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libdecnumber ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(HOST_EXPORTS) \ + echo Configuring in $(HOST_SUBDIR)/libdecnumber; \ + cd "$(HOST_SUBDIR)/libdecnumber" || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ + *) topdir=`echo $(HOST_SUBDIR)/libdecnumber/ | \ + sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \ + esac; \ + srcdiroption="--srcdir=$${topdir}/libdecnumber"; \ + libsrcdir="$$s/libdecnumber"; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 +@endif libdecnumber + + + +.PHONY: configure-stage1-libdecnumber maybe-configure-stage1-libdecnumber +maybe-configure-stage1-libdecnumber: +@if libdecnumber-bootstrap +maybe-configure-stage1-libdecnumber: configure-stage1-libdecnumber +configure-stage1-libdecnumber: + @[ `cat stage_current` = stage1 ] || $(MAKE) stage1-start + @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libdecnumber + test ! -f $(HOST_SUBDIR)/libdecnumber/Makefile || exit 0; \ + $(HOST_EXPORTS) \ + echo Configuring stage 1 in $(HOST_SUBDIR)/libdecnumber ; \ + $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libdecnumber ; \ + cd $(HOST_SUBDIR)/libdecnumber || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ + *) topdir=`echo $(HOST_SUBDIR)/libdecnumber/ | \ + sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \ + esac; \ + srcdiroption="--srcdir=$${topdir}/libdecnumber"; \ + libsrcdir="$$s/libdecnumber"; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + --disable-intermodule --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)" +@endif libdecnumber-bootstrap + +.PHONY: configure-stage2-libdecnumber maybe-configure-stage2-libdecnumber +maybe-configure-stage2-libdecnumber: +@if libdecnumber-bootstrap +maybe-configure-stage2-libdecnumber: configure-stage2-libdecnumber +configure-stage2-libdecnumber: + @[ `cat stage_current` = stage2 ] || $(MAKE) stage2-start + @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libdecnumber + test ! -f $(HOST_SUBDIR)/libdecnumber/Makefile || exit 0; \ + $(HOST_EXPORTS) \ + $(POSTSTAGE1_HOST_EXPORTS) \ + echo Configuring stage 2 in $(HOST_SUBDIR)/libdecnumber ; \ + $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libdecnumber ; \ + cd $(HOST_SUBDIR)/libdecnumber || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ + *) topdir=`echo $(HOST_SUBDIR)/libdecnumber/ | \ + sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \ + esac; \ + srcdiroption="--srcdir=$${topdir}/libdecnumber"; \ + libsrcdir="$$s/libdecnumber"; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + @stage2_werror_flag@ +@endif libdecnumber-bootstrap + +.PHONY: configure-stage3-libdecnumber maybe-configure-stage3-libdecnumber +maybe-configure-stage3-libdecnumber: +@if libdecnumber-bootstrap +maybe-configure-stage3-libdecnumber: configure-stage3-libdecnumber +configure-stage3-libdecnumber: + @[ `cat stage_current` = stage3 ] || $(MAKE) stage3-start + @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libdecnumber + test ! -f $(HOST_SUBDIR)/libdecnumber/Makefile || exit 0; \ + $(HOST_EXPORTS) \ + $(POSTSTAGE1_HOST_EXPORTS) \ + echo Configuring stage 3 in $(HOST_SUBDIR)/libdecnumber ; \ + $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libdecnumber ; \ + cd $(HOST_SUBDIR)/libdecnumber || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ + *) topdir=`echo $(HOST_SUBDIR)/libdecnumber/ | \ + sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \ + esac; \ + srcdiroption="--srcdir=$${topdir}/libdecnumber"; \ + libsrcdir="$$s/libdecnumber"; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + @stage2_werror_flag@ +@endif libdecnumber-bootstrap + +.PHONY: configure-stage4-libdecnumber maybe-configure-stage4-libdecnumber +maybe-configure-stage4-libdecnumber: +@if libdecnumber-bootstrap +maybe-configure-stage4-libdecnumber: configure-stage4-libdecnumber +configure-stage4-libdecnumber: + @[ `cat stage_current` = stage4 ] || $(MAKE) stage4-start + @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libdecnumber + test ! -f $(HOST_SUBDIR)/libdecnumber/Makefile || exit 0; \ + $(HOST_EXPORTS) \ + $(POSTSTAGE1_HOST_EXPORTS) \ + echo Configuring stage 4 in $(HOST_SUBDIR)/libdecnumber ; \ + $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libdecnumber ; \ + cd $(HOST_SUBDIR)/libdecnumber || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ + *) topdir=`echo $(HOST_SUBDIR)/libdecnumber/ | \ + sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \ + esac; \ + srcdiroption="--srcdir=$${topdir}/libdecnumber"; \ + libsrcdir="$$s/libdecnumber"; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + @stage2_werror_flag@ +@endif libdecnumber-bootstrap + +.PHONY: configure-stageprofile-libdecnumber maybe-configure-stageprofile-libdecnumber +maybe-configure-stageprofile-libdecnumber: +@if libdecnumber-bootstrap +maybe-configure-stageprofile-libdecnumber: configure-stageprofile-libdecnumber +configure-stageprofile-libdecnumber: + @[ `cat stage_current` = stageprofile ] || $(MAKE) stageprofile-start + @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libdecnumber + test ! -f $(HOST_SUBDIR)/libdecnumber/Makefile || exit 0; \ + $(HOST_EXPORTS) \ + $(POSTSTAGE1_HOST_EXPORTS) \ + echo Configuring stage profile in $(HOST_SUBDIR)/libdecnumber ; \ + $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libdecnumber ; \ + cd $(HOST_SUBDIR)/libdecnumber || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ + *) topdir=`echo $(HOST_SUBDIR)/libdecnumber/ | \ + sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \ + esac; \ + srcdiroption="--srcdir=$${topdir}/libdecnumber"; \ + libsrcdir="$$s/libdecnumber"; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + @stage2_werror_flag@ +@endif libdecnumber-bootstrap + +.PHONY: configure-stagefeedback-libdecnumber maybe-configure-stagefeedback-libdecnumber +maybe-configure-stagefeedback-libdecnumber: +@if libdecnumber-bootstrap +maybe-configure-stagefeedback-libdecnumber: configure-stagefeedback-libdecnumber +configure-stagefeedback-libdecnumber: + @[ `cat stage_current` = stagefeedback ] || $(MAKE) stagefeedback-start + @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libdecnumber + test ! -f $(HOST_SUBDIR)/libdecnumber/Makefile || exit 0; \ + $(HOST_EXPORTS) \ + $(POSTSTAGE1_HOST_EXPORTS) \ + echo Configuring stage feedback in $(HOST_SUBDIR)/libdecnumber ; \ + $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libdecnumber ; \ + cd $(HOST_SUBDIR)/libdecnumber || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ + *) topdir=`echo $(HOST_SUBDIR)/libdecnumber/ | \ + sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \ + esac; \ + srcdiroption="--srcdir=$${topdir}/libdecnumber"; \ + libsrcdir="$$s/libdecnumber"; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + @stage2_werror_flag@ +@endif libdecnumber-bootstrap + + + + + +.PHONY: all-libdecnumber maybe-all-libdecnumber +maybe-all-libdecnumber: +@if libdecnumber +TARGET-libdecnumber=all +maybe-all-libdecnumber: all-libdecnumber +all-libdecnumber: configure-libdecnumber + @test -f stage_last && exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(HOST_EXPORTS) \ + (cd $(HOST_SUBDIR)/libdecnumber && \ + $(MAKE) $(FLAGS_TO_PASS) $(TARGET-libdecnumber)) +@endif libdecnumber + + + +.PHONY: all-stage1-libdecnumber maybe-all-stage1-libdecnumber +.PHONY: clean-stage1-libdecnumber maybe-clean-stage1-libdecnumber +maybe-all-stage1-libdecnumber: +maybe-clean-stage1-libdecnumber: +@if libdecnumber-bootstrap +maybe-all-stage1-libdecnumber: all-stage1-libdecnumber +all-stage1: all-stage1-libdecnumber +TARGET-stage1-libdecnumber = $(TARGET-libdecnumber) +all-stage1-libdecnumber: configure-stage1-libdecnumber + @[ `cat stage_current` = stage1 ] || $(MAKE) stage1-start + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(HOST_EXPORTS) \ + cd $(HOST_SUBDIR)/libdecnumber && \ + $(MAKE) $(FLAGS_TO_PASS) CFLAGS="$(STAGE1_CFLAGS)" \ + $(TARGET-stage1-libdecnumber) + +maybe-clean-stage1-libdecnumber: clean-stage1-libdecnumber +clean-stage1: clean-stage1-libdecnumber +clean-stage1-libdecnumber: + @[ -f $(HOST_SUBDIR)/libdecnumber/Makefile ] || [ -f $(HOST_SUBDIR)/stage1-libdecnumber/Makefile ] \ + || exit 0 ; \ + [ `cat stage_current` = stage1 ] || $(MAKE) stage1-start + cd $(HOST_SUBDIR)/libdecnumber && \ + $(MAKE) $(FLAGS_TO_PASS) \ + CFLAGS="$(STAGE1_CFLAGS)" clean +@endif libdecnumber-bootstrap + + +.PHONY: all-stage2-libdecnumber maybe-all-stage2-libdecnumber +.PHONY: clean-stage2-libdecnumber maybe-clean-stage2-libdecnumber +maybe-all-stage2-libdecnumber: +maybe-clean-stage2-libdecnumber: +@if libdecnumber-bootstrap +maybe-all-stage2-libdecnumber: all-stage2-libdecnumber +all-stage2: all-stage2-libdecnumber +TARGET-stage2-libdecnumber = $(TARGET-libdecnumber) +all-stage2-libdecnumber: configure-stage2-libdecnumber + @[ `cat stage_current` = stage2 ] || $(MAKE) stage2-start + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(HOST_EXPORTS) \ + $(POSTSTAGE1_HOST_EXPORTS) \ + cd $(HOST_SUBDIR)/libdecnumber && \ + $(MAKE) $(FLAGS_TO_PASS) $(POSTSTAGE1_FLAGS_TO_PASS) \ + $(TARGET-stage2-libdecnumber) + +maybe-clean-stage2-libdecnumber: clean-stage2-libdecnumber +clean-stage2: clean-stage2-libdecnumber +clean-stage2-libdecnumber: + @[ -f $(HOST_SUBDIR)/libdecnumber/Makefile ] || [ -f $(HOST_SUBDIR)/stage2-libdecnumber/Makefile ] \ + || exit 0 ; \ + [ `cat stage_current` = stage2 ] || $(MAKE) stage2-start + cd $(HOST_SUBDIR)/libdecnumber && \ + $(MAKE) $(FLAGS_TO_PASS) \ + $(POSTSTAGE1_FLAGS_TO_PASS) \ + clean +@endif libdecnumber-bootstrap + + +.PHONY: all-stage3-libdecnumber maybe-all-stage3-libdecnumber +.PHONY: clean-stage3-libdecnumber maybe-clean-stage3-libdecnumber +maybe-all-stage3-libdecnumber: +maybe-clean-stage3-libdecnumber: +@if libdecnumber-bootstrap +maybe-all-stage3-libdecnumber: all-stage3-libdecnumber +all-stage3: all-stage3-libdecnumber +TARGET-stage3-libdecnumber = $(TARGET-libdecnumber) +all-stage3-libdecnumber: configure-stage3-libdecnumber + @[ `cat stage_current` = stage3 ] || $(MAKE) stage3-start + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(HOST_EXPORTS) \ + $(POSTSTAGE1_HOST_EXPORTS) \ + cd $(HOST_SUBDIR)/libdecnumber && \ + $(MAKE) $(FLAGS_TO_PASS) $(POSTSTAGE1_FLAGS_TO_PASS) \ + $(TARGET-stage3-libdecnumber) + +maybe-clean-stage3-libdecnumber: clean-stage3-libdecnumber +clean-stage3: clean-stage3-libdecnumber +clean-stage3-libdecnumber: + @[ -f $(HOST_SUBDIR)/libdecnumber/Makefile ] || [ -f $(HOST_SUBDIR)/stage3-libdecnumber/Makefile ] \ + || exit 0 ; \ + [ `cat stage_current` = stage3 ] || $(MAKE) stage3-start + cd $(HOST_SUBDIR)/libdecnumber && \ + $(MAKE) $(FLAGS_TO_PASS) \ + $(POSTSTAGE1_FLAGS_TO_PASS) \ + clean +@endif libdecnumber-bootstrap + + +.PHONY: all-stage4-libdecnumber maybe-all-stage4-libdecnumber +.PHONY: clean-stage4-libdecnumber maybe-clean-stage4-libdecnumber +maybe-all-stage4-libdecnumber: +maybe-clean-stage4-libdecnumber: +@if libdecnumber-bootstrap +maybe-all-stage4-libdecnumber: all-stage4-libdecnumber +all-stage4: all-stage4-libdecnumber +TARGET-stage4-libdecnumber = $(TARGET-libdecnumber) +all-stage4-libdecnumber: configure-stage4-libdecnumber + @[ `cat stage_current` = stage4 ] || $(MAKE) stage4-start + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(HOST_EXPORTS) \ + $(POSTSTAGE1_HOST_EXPORTS) \ + cd $(HOST_SUBDIR)/libdecnumber && \ + $(MAKE) $(FLAGS_TO_PASS) $(POSTSTAGE1_FLAGS_TO_PASS) \ + $(TARGET-stage4-libdecnumber) + +maybe-clean-stage4-libdecnumber: clean-stage4-libdecnumber +clean-stage4: clean-stage4-libdecnumber +clean-stage4-libdecnumber: + @[ -f $(HOST_SUBDIR)/libdecnumber/Makefile ] || [ -f $(HOST_SUBDIR)/stage4-libdecnumber/Makefile ] \ + || exit 0 ; \ + [ `cat stage_current` = stage4 ] || $(MAKE) stage4-start + cd $(HOST_SUBDIR)/libdecnumber && \ + $(MAKE) $(FLAGS_TO_PASS) \ + $(POSTSTAGE1_FLAGS_TO_PASS) \ + clean +@endif libdecnumber-bootstrap + + +.PHONY: all-stageprofile-libdecnumber maybe-all-stageprofile-libdecnumber +.PHONY: clean-stageprofile-libdecnumber maybe-clean-stageprofile-libdecnumber +maybe-all-stageprofile-libdecnumber: +maybe-clean-stageprofile-libdecnumber: +@if libdecnumber-bootstrap +maybe-all-stageprofile-libdecnumber: all-stageprofile-libdecnumber +all-stageprofile: all-stageprofile-libdecnumber +TARGET-stageprofile-libdecnumber = $(TARGET-libdecnumber) +all-stageprofile-libdecnumber: configure-stageprofile-libdecnumber + @[ `cat stage_current` = stageprofile ] || $(MAKE) stageprofile-start + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(HOST_EXPORTS) \ + $(POSTSTAGE1_HOST_EXPORTS) \ + cd $(HOST_SUBDIR)/libdecnumber && \ + $(MAKE) $(FLAGS_TO_PASS) $(POSTSTAGE1_FLAGS_TO_PASS) CFLAGS="$(BOOT_CFLAGS) -fprofile-generate" \ + $(TARGET-stageprofile-libdecnumber) + +maybe-clean-stageprofile-libdecnumber: clean-stageprofile-libdecnumber +clean-stageprofile: clean-stageprofile-libdecnumber +clean-stageprofile-libdecnumber: + @[ -f $(HOST_SUBDIR)/libdecnumber/Makefile ] || [ -f $(HOST_SUBDIR)/stageprofile-libdecnumber/Makefile ] \ + || exit 0 ; \ + [ `cat stage_current` = stageprofile ] || $(MAKE) stageprofile-start + cd $(HOST_SUBDIR)/libdecnumber && \ + $(MAKE) $(FLAGS_TO_PASS) \ + $(POSTSTAGE1_FLAGS_TO_PASS) \ + CFLAGS="$(BOOT_CFLAGS) -fprofile-generate" clean +@endif libdecnumber-bootstrap + + +.PHONY: all-stagefeedback-libdecnumber maybe-all-stagefeedback-libdecnumber +.PHONY: clean-stagefeedback-libdecnumber maybe-clean-stagefeedback-libdecnumber +maybe-all-stagefeedback-libdecnumber: +maybe-clean-stagefeedback-libdecnumber: +@if libdecnumber-bootstrap +maybe-all-stagefeedback-libdecnumber: all-stagefeedback-libdecnumber +all-stagefeedback: all-stagefeedback-libdecnumber +TARGET-stagefeedback-libdecnumber = $(TARGET-libdecnumber) +all-stagefeedback-libdecnumber: configure-stagefeedback-libdecnumber + @[ `cat stage_current` = stagefeedback ] || $(MAKE) stagefeedback-start + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(HOST_EXPORTS) \ + $(POSTSTAGE1_HOST_EXPORTS) \ + cd $(HOST_SUBDIR)/libdecnumber && \ + $(MAKE) $(FLAGS_TO_PASS) $(POSTSTAGE1_FLAGS_TO_PASS) CFLAGS="$(BOOT_CFLAGS) -fprofile-use" \ + $(TARGET-stagefeedback-libdecnumber) + +maybe-clean-stagefeedback-libdecnumber: clean-stagefeedback-libdecnumber +clean-stagefeedback: clean-stagefeedback-libdecnumber +clean-stagefeedback-libdecnumber: + @[ -f $(HOST_SUBDIR)/libdecnumber/Makefile ] || [ -f $(HOST_SUBDIR)/stagefeedback-libdecnumber/Makefile ] \ + || exit 0 ; \ + [ `cat stage_current` = stagefeedback ] || $(MAKE) stagefeedback-start + cd $(HOST_SUBDIR)/libdecnumber && \ + $(MAKE) $(FLAGS_TO_PASS) \ + $(POSTSTAGE1_FLAGS_TO_PASS) \ + CFLAGS="$(BOOT_CFLAGS) -fprofile-use" clean +@endif libdecnumber-bootstrap + + + + + +.PHONY: check-libdecnumber maybe-check-libdecnumber +maybe-check-libdecnumber: +@if libdecnumber +maybe-check-libdecnumber: check-libdecnumber + +check-libdecnumber: + @: $(MAKE); $(unstage) + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(HOST_EXPORTS) \ + (cd $(HOST_SUBDIR)/libdecnumber && \ + $(MAKE) $(FLAGS_TO_PASS) check) + +@endif libdecnumber + +.PHONY: install-libdecnumber maybe-install-libdecnumber +maybe-install-libdecnumber: +@if libdecnumber +maybe-install-libdecnumber: install-libdecnumber + +install-libdecnumber: installdirs + @: $(MAKE); $(unstage) + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(HOST_EXPORTS) \ + (cd $(HOST_SUBDIR)/libdecnumber && \ + $(MAKE) $(FLAGS_TO_PASS) install) + +@endif libdecnumber + +# Other targets (info, dvi, etc.) + +.PHONY: maybe-info-libdecnumber info-libdecnumber +maybe-info-libdecnumber: +@if libdecnumber +maybe-info-libdecnumber: info-libdecnumber + +info-libdecnumber: \ + configure-libdecnumber + @[ -f ./libdecnumber/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(HOST_EXPORTS) \ + for flag in $(EXTRA_HOST_FLAGS) ; do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in libdecnumber" ; \ + (cd $(HOST_SUBDIR)/libdecnumber && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + +@endif libdecnumber + +.PHONY: maybe-dvi-libdecnumber dvi-libdecnumber +maybe-dvi-libdecnumber: +@if libdecnumber +maybe-dvi-libdecnumber: dvi-libdecnumber + +dvi-libdecnumber: \ + configure-libdecnumber + @[ -f ./libdecnumber/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(HOST_EXPORTS) \ + for flag in $(EXTRA_HOST_FLAGS) ; do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in libdecnumber" ; \ + (cd $(HOST_SUBDIR)/libdecnumber && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + +@endif libdecnumber + +.PHONY: maybe-html-libdecnumber html-libdecnumber +maybe-html-libdecnumber: +@if libdecnumber +maybe-html-libdecnumber: html-libdecnumber + +html-libdecnumber: \ + configure-libdecnumber + @[ -f ./libdecnumber/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(HOST_EXPORTS) \ + for flag in $(EXTRA_HOST_FLAGS) ; do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing html in libdecnumber" ; \ + (cd $(HOST_SUBDIR)/libdecnumber && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + html) \ + || exit 1 + +@endif libdecnumber + +.PHONY: maybe-TAGS-libdecnumber TAGS-libdecnumber +maybe-TAGS-libdecnumber: +@if libdecnumber +maybe-TAGS-libdecnumber: TAGS-libdecnumber + +TAGS-libdecnumber: \ + configure-libdecnumber + @[ -f ./libdecnumber/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(HOST_EXPORTS) \ + for flag in $(EXTRA_HOST_FLAGS) ; do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in libdecnumber" ; \ + (cd $(HOST_SUBDIR)/libdecnumber && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + +@endif libdecnumber + +.PHONY: maybe-install-info-libdecnumber install-info-libdecnumber +maybe-install-info-libdecnumber: +@if libdecnumber +maybe-install-info-libdecnumber: install-info-libdecnumber + +install-info-libdecnumber: \ + configure-libdecnumber \ + info-libdecnumber + @[ -f ./libdecnumber/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(HOST_EXPORTS) \ + for flag in $(EXTRA_HOST_FLAGS) ; do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in libdecnumber" ; \ + (cd $(HOST_SUBDIR)/libdecnumber && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + +@endif libdecnumber + +.PHONY: maybe-installcheck-libdecnumber installcheck-libdecnumber +maybe-installcheck-libdecnumber: +@if libdecnumber +maybe-installcheck-libdecnumber: installcheck-libdecnumber + +installcheck-libdecnumber: \ + configure-libdecnumber + @[ -f ./libdecnumber/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(HOST_EXPORTS) \ + for flag in $(EXTRA_HOST_FLAGS) ; do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in libdecnumber" ; \ + (cd $(HOST_SUBDIR)/libdecnumber && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + +@endif libdecnumber + +.PHONY: maybe-mostlyclean-libdecnumber mostlyclean-libdecnumber +maybe-mostlyclean-libdecnumber: +@if libdecnumber +maybe-mostlyclean-libdecnumber: mostlyclean-libdecnumber + +mostlyclean-libdecnumber: + @[ -f ./libdecnumber/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(HOST_EXPORTS) \ + for flag in $(EXTRA_HOST_FLAGS) ; do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in libdecnumber" ; \ + (cd $(HOST_SUBDIR)/libdecnumber && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + +@endif libdecnumber + +.PHONY: maybe-clean-libdecnumber clean-libdecnumber +maybe-clean-libdecnumber: +@if libdecnumber +maybe-clean-libdecnumber: clean-libdecnumber + +clean-libdecnumber: + @[ -f ./libdecnumber/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(HOST_EXPORTS) \ + for flag in $(EXTRA_HOST_FLAGS) ; do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in libdecnumber" ; \ + (cd $(HOST_SUBDIR)/libdecnumber && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + +@endif libdecnumber + +.PHONY: maybe-distclean-libdecnumber distclean-libdecnumber +maybe-distclean-libdecnumber: +@if libdecnumber +maybe-distclean-libdecnumber: distclean-libdecnumber + +distclean-libdecnumber: + @[ -f ./libdecnumber/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(HOST_EXPORTS) \ + for flag in $(EXTRA_HOST_FLAGS) ; do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in libdecnumber" ; \ + (cd $(HOST_SUBDIR)/libdecnumber && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + +@endif libdecnumber + +.PHONY: maybe-maintainer-clean-libdecnumber maintainer-clean-libdecnumber +maybe-maintainer-clean-libdecnumber: +@if libdecnumber +maybe-maintainer-clean-libdecnumber: maintainer-clean-libdecnumber + +maintainer-clean-libdecnumber: + @[ -f ./libdecnumber/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(HOST_EXPORTS) \ + for flag in $(EXTRA_HOST_FLAGS) ; do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in libdecnumber" ; \ + (cd $(HOST_SUBDIR)/libdecnumber && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + +@endif libdecnumber + + + .PHONY: configure-libgui maybe-configure-libgui maybe-configure-libgui: @if libgui maybe-configure-libgui: configure-libgui -configure-libgui: - @$(unstage) +configure-libgui: + @: $(MAKE); $(unstage) @test ! -f $(HOST_SUBDIR)/libgui/Makefile || exit 0; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libgui ; \ r=`${PWD_COMMAND}`; export r; \ @@ -16798,7 +17221,7 @@ maybe-all-libgui: TARGET-libgui=all maybe-all-libgui: all-libgui all-libgui: configure-libgui - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -16815,7 +17238,7 @@ maybe-check-libgui: maybe-check-libgui: check-libgui check-libgui: - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -16830,7 +17253,7 @@ maybe-install-libgui: maybe-install-libgui: install-libgui install-libgui: installdirs - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -16848,7 +17271,7 @@ maybe-info-libgui: info-libgui info-libgui: \ configure-libgui - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./libgui/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -16874,7 +17297,7 @@ maybe-dvi-libgui: dvi-libgui dvi-libgui: \ configure-libgui - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./libgui/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -16900,7 +17323,7 @@ maybe-html-libgui: html-libgui html-libgui: \ configure-libgui - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./libgui/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -16926,7 +17349,7 @@ maybe-TAGS-libgui: TAGS-libgui TAGS-libgui: \ configure-libgui - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./libgui/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -16953,7 +17376,7 @@ maybe-install-info-libgui: install-info-libgui install-info-libgui: \ configure-libgui \ info-libgui - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./libgui/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -16979,7 +17402,7 @@ maybe-installcheck-libgui: installcheck-libgui installcheck-libgui: \ configure-libgui - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./libgui/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -17004,7 +17427,7 @@ maybe-mostlyclean-libgui: maybe-mostlyclean-libgui: mostlyclean-libgui mostlyclean-libgui: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./libgui/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -17029,7 +17452,7 @@ maybe-clean-libgui: maybe-clean-libgui: clean-libgui clean-libgui: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./libgui/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -17054,7 +17477,7 @@ maybe-distclean-libgui: maybe-distclean-libgui: distclean-libgui distclean-libgui: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./libgui/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -17079,7 +17502,7 @@ maybe-maintainer-clean-libgui: maybe-maintainer-clean-libgui: maintainer-clean-libgui maintainer-clean-libgui: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./libgui/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -17104,7 +17527,7 @@ maintainer-clean-libgui: maybe-configure-libiberty: @if libiberty maybe-configure-libiberty: configure-libiberty -configure-libiberty: +configure-libiberty: @test -f stage_last && exit 0; \ test ! -f $(HOST_SUBDIR)/libiberty/Makefile || exit 0; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiberty ; \ @@ -17131,13 +17554,13 @@ configure-libiberty: maybe-configure-stage1-libiberty: @if libiberty-bootstrap maybe-configure-stage1-libiberty: configure-stage1-libiberty -configure-stage1-libiberty: +configure-stage1-libiberty: @[ `cat stage_current` = stage1 ] || $(MAKE) stage1-start - @[ -f $(HOST_SUBDIR)/libiberty/Makefile ] && exit 0 || : ; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiberty + test ! -f $(HOST_SUBDIR)/libiberty/Makefile || exit 0; \ $(HOST_EXPORTS) \ echo Configuring stage 1 in $(HOST_SUBDIR)/libiberty ; \ + $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiberty ; \ cd $(HOST_SUBDIR)/libiberty || exit 1; \ case $(srcdir) in \ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ @@ -17155,14 +17578,14 @@ configure-stage1-libiberty: maybe-configure-stage2-libiberty: @if libiberty-bootstrap maybe-configure-stage2-libiberty: configure-stage2-libiberty -configure-stage2-libiberty: +configure-stage2-libiberty: @[ `cat stage_current` = stage2 ] || $(MAKE) stage2-start - @[ -f $(HOST_SUBDIR)/libiberty/Makefile ] && exit 0 || : ; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiberty + test ! -f $(HOST_SUBDIR)/libiberty/Makefile || exit 0; \ $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ echo Configuring stage 2 in $(HOST_SUBDIR)/libiberty ; \ + $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiberty ; \ cd $(HOST_SUBDIR)/libiberty || exit 1; \ case $(srcdir) in \ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ @@ -17180,14 +17603,14 @@ configure-stage2-libiberty: maybe-configure-stage3-libiberty: @if libiberty-bootstrap maybe-configure-stage3-libiberty: configure-stage3-libiberty -configure-stage3-libiberty: +configure-stage3-libiberty: @[ `cat stage_current` = stage3 ] || $(MAKE) stage3-start - @[ -f $(HOST_SUBDIR)/libiberty/Makefile ] && exit 0 || : ; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiberty + test ! -f $(HOST_SUBDIR)/libiberty/Makefile || exit 0; \ $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ echo Configuring stage 3 in $(HOST_SUBDIR)/libiberty ; \ + $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiberty ; \ cd $(HOST_SUBDIR)/libiberty || exit 1; \ case $(srcdir) in \ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ @@ -17205,14 +17628,14 @@ configure-stage3-libiberty: maybe-configure-stage4-libiberty: @if libiberty-bootstrap maybe-configure-stage4-libiberty: configure-stage4-libiberty -configure-stage4-libiberty: +configure-stage4-libiberty: @[ `cat stage_current` = stage4 ] || $(MAKE) stage4-start - @[ -f $(HOST_SUBDIR)/libiberty/Makefile ] && exit 0 || : ; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiberty + test ! -f $(HOST_SUBDIR)/libiberty/Makefile || exit 0; \ $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ echo Configuring stage 4 in $(HOST_SUBDIR)/libiberty ; \ + $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiberty ; \ cd $(HOST_SUBDIR)/libiberty || exit 1; \ case $(srcdir) in \ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ @@ -17230,14 +17653,14 @@ configure-stage4-libiberty: maybe-configure-stageprofile-libiberty: @if libiberty-bootstrap maybe-configure-stageprofile-libiberty: configure-stageprofile-libiberty -configure-stageprofile-libiberty: +configure-stageprofile-libiberty: @[ `cat stage_current` = stageprofile ] || $(MAKE) stageprofile-start - @[ -f $(HOST_SUBDIR)/libiberty/Makefile ] && exit 0 || : ; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiberty + test ! -f $(HOST_SUBDIR)/libiberty/Makefile || exit 0; \ $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ echo Configuring stage profile in $(HOST_SUBDIR)/libiberty ; \ + $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiberty ; \ cd $(HOST_SUBDIR)/libiberty || exit 1; \ case $(srcdir) in \ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ @@ -17255,14 +17678,14 @@ configure-stageprofile-libiberty: maybe-configure-stagefeedback-libiberty: @if libiberty-bootstrap maybe-configure-stagefeedback-libiberty: configure-stagefeedback-libiberty -configure-stagefeedback-libiberty: +configure-stagefeedback-libiberty: @[ `cat stage_current` = stagefeedback ] || $(MAKE) stagefeedback-start - @[ -f $(HOST_SUBDIR)/libiberty/Makefile ] && exit 0 || : ; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiberty + test ! -f $(HOST_SUBDIR)/libiberty/Makefile || exit 0; \ $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ echo Configuring stage feedback in $(HOST_SUBDIR)/libiberty ; \ + $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiberty ; \ cd $(HOST_SUBDIR)/libiberty || exit 1; \ case $(srcdir) in \ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ @@ -17318,7 +17741,7 @@ clean-stage1: clean-stage1-libiberty clean-stage1-libiberty: @[ -f $(HOST_SUBDIR)/libiberty/Makefile ] || [ -f $(HOST_SUBDIR)/stage1-libiberty/Makefile ] \ || exit 0 ; \ - @[ `cat stage_current` = stage1 ] || $(MAKE) stage1-start + [ `cat stage_current` = stage1 ] || $(MAKE) stage1-start cd $(HOST_SUBDIR)/libiberty && \ $(MAKE) $(FLAGS_TO_PASS) \ CFLAGS="$(STAGE1_CFLAGS)" clean @@ -17348,7 +17771,7 @@ clean-stage2: clean-stage2-libiberty clean-stage2-libiberty: @[ -f $(HOST_SUBDIR)/libiberty/Makefile ] || [ -f $(HOST_SUBDIR)/stage2-libiberty/Makefile ] \ || exit 0 ; \ - @[ `cat stage_current` = stage2 ] || $(MAKE) stage2-start + [ `cat stage_current` = stage2 ] || $(MAKE) stage2-start cd $(HOST_SUBDIR)/libiberty && \ $(MAKE) $(FLAGS_TO_PASS) \ $(POSTSTAGE1_FLAGS_TO_PASS) \ @@ -17379,7 +17802,7 @@ clean-stage3: clean-stage3-libiberty clean-stage3-libiberty: @[ -f $(HOST_SUBDIR)/libiberty/Makefile ] || [ -f $(HOST_SUBDIR)/stage3-libiberty/Makefile ] \ || exit 0 ; \ - @[ `cat stage_current` = stage3 ] || $(MAKE) stage3-start + [ `cat stage_current` = stage3 ] || $(MAKE) stage3-start cd $(HOST_SUBDIR)/libiberty && \ $(MAKE) $(FLAGS_TO_PASS) \ $(POSTSTAGE1_FLAGS_TO_PASS) \ @@ -17410,7 +17833,7 @@ clean-stage4: clean-stage4-libiberty clean-stage4-libiberty: @[ -f $(HOST_SUBDIR)/libiberty/Makefile ] || [ -f $(HOST_SUBDIR)/stage4-libiberty/Makefile ] \ || exit 0 ; \ - @[ `cat stage_current` = stage4 ] || $(MAKE) stage4-start + [ `cat stage_current` = stage4 ] || $(MAKE) stage4-start cd $(HOST_SUBDIR)/libiberty && \ $(MAKE) $(FLAGS_TO_PASS) \ $(POSTSTAGE1_FLAGS_TO_PASS) \ @@ -17441,7 +17864,7 @@ clean-stageprofile: clean-stageprofile-libiberty clean-stageprofile-libiberty: @[ -f $(HOST_SUBDIR)/libiberty/Makefile ] || [ -f $(HOST_SUBDIR)/stageprofile-libiberty/Makefile ] \ || exit 0 ; \ - @[ `cat stage_current` = stageprofile ] || $(MAKE) stageprofile-start + [ `cat stage_current` = stageprofile ] || $(MAKE) stageprofile-start cd $(HOST_SUBDIR)/libiberty && \ $(MAKE) $(FLAGS_TO_PASS) \ $(POSTSTAGE1_FLAGS_TO_PASS) \ @@ -17472,7 +17895,7 @@ clean-stagefeedback: clean-stagefeedback-libiberty clean-stagefeedback-libiberty: @[ -f $(HOST_SUBDIR)/libiberty/Makefile ] || [ -f $(HOST_SUBDIR)/stagefeedback-libiberty/Makefile ] \ || exit 0 ; \ - @[ `cat stage_current` = stagefeedback ] || $(MAKE) stagefeedback-start + [ `cat stage_current` = stagefeedback ] || $(MAKE) stagefeedback-start cd $(HOST_SUBDIR)/libiberty && \ $(MAKE) $(FLAGS_TO_PASS) \ $(POSTSTAGE1_FLAGS_TO_PASS) \ @@ -17489,7 +17912,7 @@ maybe-check-libiberty: maybe-check-libiberty: check-libiberty check-libiberty: - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -17504,7 +17927,7 @@ maybe-install-libiberty: maybe-install-libiberty: install-libiberty install-libiberty: installdirs - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -17768,8 +18191,8 @@ maintainer-clean-libiberty: maybe-configure-libtool: @if libtool maybe-configure-libtool: configure-libtool -configure-libtool: - @$(unstage) +configure-libtool: + @: $(MAKE); $(unstage) @test ! -f $(HOST_SUBDIR)/libtool/Makefile || exit 0; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libtool ; \ r=`${PWD_COMMAND}`; export r; \ @@ -17799,7 +18222,7 @@ maybe-all-libtool: TARGET-libtool=all maybe-all-libtool: all-libtool all-libtool: configure-libtool - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -17816,7 +18239,7 @@ maybe-check-libtool: maybe-check-libtool: check-libtool check-libtool: - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -17831,7 +18254,7 @@ maybe-install-libtool: maybe-install-libtool: install-libtool install-libtool: installdirs - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -17849,7 +18272,7 @@ maybe-info-libtool: info-libtool info-libtool: \ configure-libtool - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./libtool/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -17875,7 +18298,7 @@ maybe-dvi-libtool: dvi-libtool dvi-libtool: \ configure-libtool - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./libtool/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -17901,7 +18324,7 @@ maybe-html-libtool: html-libtool html-libtool: \ configure-libtool - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./libtool/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -17927,7 +18350,7 @@ maybe-TAGS-libtool: TAGS-libtool TAGS-libtool: \ configure-libtool - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./libtool/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -17954,7 +18377,7 @@ maybe-install-info-libtool: install-info-libtool install-info-libtool: \ configure-libtool \ info-libtool - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./libtool/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -17980,7 +18403,7 @@ maybe-installcheck-libtool: installcheck-libtool installcheck-libtool: \ configure-libtool - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./libtool/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -18005,7 +18428,7 @@ maybe-mostlyclean-libtool: maybe-mostlyclean-libtool: mostlyclean-libtool mostlyclean-libtool: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./libtool/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -18030,7 +18453,7 @@ maybe-clean-libtool: maybe-clean-libtool: clean-libtool clean-libtool: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./libtool/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -18055,7 +18478,7 @@ maybe-distclean-libtool: maybe-distclean-libtool: distclean-libtool distclean-libtool: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./libtool/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -18080,7 +18503,7 @@ maybe-maintainer-clean-libtool: maybe-maintainer-clean-libtool: maintainer-clean-libtool maintainer-clean-libtool: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./libtool/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -18105,8 +18528,8 @@ maintainer-clean-libtool: maybe-configure-m4: @if m4 maybe-configure-m4: configure-m4 -configure-m4: - @$(unstage) +configure-m4: + @: $(MAKE); $(unstage) @test ! -f $(HOST_SUBDIR)/m4/Makefile || exit 0; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/m4 ; \ r=`${PWD_COMMAND}`; export r; \ @@ -18136,7 +18559,7 @@ maybe-all-m4: TARGET-m4=all maybe-all-m4: all-m4 all-m4: configure-m4 - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -18153,7 +18576,7 @@ maybe-check-m4: maybe-check-m4: check-m4 check-m4: - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -18168,7 +18591,7 @@ maybe-install-m4: maybe-install-m4: install-m4 install-m4: installdirs - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -18186,7 +18609,7 @@ maybe-info-m4: info-m4 info-m4: \ configure-m4 - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./m4/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -18212,7 +18635,7 @@ maybe-dvi-m4: dvi-m4 dvi-m4: \ configure-m4 - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./m4/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -18238,7 +18661,7 @@ maybe-html-m4: html-m4 html-m4: \ configure-m4 - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./m4/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -18264,7 +18687,7 @@ maybe-TAGS-m4: TAGS-m4 TAGS-m4: \ configure-m4 - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./m4/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -18291,7 +18714,7 @@ maybe-install-info-m4: install-info-m4 install-info-m4: \ configure-m4 \ info-m4 - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./m4/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -18317,7 +18740,7 @@ maybe-installcheck-m4: installcheck-m4 installcheck-m4: \ configure-m4 - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./m4/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -18342,7 +18765,7 @@ maybe-mostlyclean-m4: maybe-mostlyclean-m4: mostlyclean-m4 mostlyclean-m4: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./m4/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -18367,7 +18790,7 @@ maybe-clean-m4: maybe-clean-m4: clean-m4 clean-m4: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./m4/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -18392,7 +18815,7 @@ maybe-distclean-m4: maybe-distclean-m4: distclean-m4 distclean-m4: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./m4/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -18417,7 +18840,7 @@ maybe-maintainer-clean-m4: maybe-maintainer-clean-m4: maintainer-clean-m4 maintainer-clean-m4: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./m4/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -18442,8 +18865,8 @@ maintainer-clean-m4: maybe-configure-make: @if make maybe-configure-make: configure-make -configure-make: - @$(unstage) +configure-make: + @: $(MAKE); $(unstage) @test ! -f $(HOST_SUBDIR)/make/Makefile || exit 0; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/make ; \ r=`${PWD_COMMAND}`; export r; \ @@ -18473,7 +18896,7 @@ maybe-all-make: TARGET-make=all maybe-all-make: all-make all-make: configure-make - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -18490,7 +18913,7 @@ maybe-check-make: maybe-check-make: check-make check-make: - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -18505,7 +18928,7 @@ maybe-install-make: maybe-install-make: install-make install-make: installdirs - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -18523,7 +18946,7 @@ maybe-info-make: info-make info-make: \ configure-make - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./make/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -18549,7 +18972,7 @@ maybe-dvi-make: dvi-make dvi-make: \ configure-make - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./make/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -18575,7 +18998,7 @@ maybe-html-make: html-make html-make: \ configure-make - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./make/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -18601,7 +19024,7 @@ maybe-TAGS-make: TAGS-make TAGS-make: \ configure-make - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./make/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -18628,7 +19051,7 @@ maybe-install-info-make: install-info-make install-info-make: \ configure-make \ info-make - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./make/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -18654,7 +19077,7 @@ maybe-installcheck-make: installcheck-make installcheck-make: \ configure-make - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./make/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -18679,7 +19102,7 @@ maybe-mostlyclean-make: maybe-mostlyclean-make: mostlyclean-make mostlyclean-make: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./make/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -18704,7 +19127,7 @@ maybe-clean-make: maybe-clean-make: clean-make clean-make: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./make/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -18729,7 +19152,7 @@ maybe-distclean-make: maybe-distclean-make: distclean-make distclean-make: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./make/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -18754,7 +19177,7 @@ maybe-maintainer-clean-make: maybe-maintainer-clean-make: maintainer-clean-make maintainer-clean-make: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./make/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -18779,8 +19202,8 @@ maintainer-clean-make: maybe-configure-mmalloc: @if mmalloc maybe-configure-mmalloc: configure-mmalloc -configure-mmalloc: - @$(unstage) +configure-mmalloc: + @: $(MAKE); $(unstage) @test ! -f $(HOST_SUBDIR)/mmalloc/Makefile || exit 0; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/mmalloc ; \ r=`${PWD_COMMAND}`; export r; \ @@ -18810,7 +19233,7 @@ maybe-all-mmalloc: TARGET-mmalloc=all maybe-all-mmalloc: all-mmalloc all-mmalloc: configure-mmalloc - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -18836,7 +19259,7 @@ maybe-install-mmalloc: maybe-install-mmalloc: install-mmalloc install-mmalloc: installdirs - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -18854,7 +19277,7 @@ maybe-info-mmalloc: info-mmalloc info-mmalloc: \ configure-mmalloc - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./mmalloc/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -18880,7 +19303,7 @@ maybe-dvi-mmalloc: dvi-mmalloc dvi-mmalloc: \ configure-mmalloc - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./mmalloc/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -18906,7 +19329,7 @@ maybe-html-mmalloc: html-mmalloc html-mmalloc: \ configure-mmalloc - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./mmalloc/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -18932,7 +19355,7 @@ maybe-TAGS-mmalloc: TAGS-mmalloc TAGS-mmalloc: \ configure-mmalloc - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./mmalloc/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -18959,7 +19382,7 @@ maybe-install-info-mmalloc: install-info-mmalloc install-info-mmalloc: \ configure-mmalloc \ info-mmalloc - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./mmalloc/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -18985,7 +19408,7 @@ maybe-installcheck-mmalloc: installcheck-mmalloc installcheck-mmalloc: \ configure-mmalloc - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./mmalloc/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -19010,7 +19433,7 @@ maybe-mostlyclean-mmalloc: maybe-mostlyclean-mmalloc: mostlyclean-mmalloc mostlyclean-mmalloc: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./mmalloc/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -19035,7 +19458,7 @@ maybe-clean-mmalloc: maybe-clean-mmalloc: clean-mmalloc clean-mmalloc: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./mmalloc/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -19060,7 +19483,7 @@ maybe-distclean-mmalloc: maybe-distclean-mmalloc: distclean-mmalloc distclean-mmalloc: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./mmalloc/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -19085,7 +19508,7 @@ maybe-maintainer-clean-mmalloc: maybe-maintainer-clean-mmalloc: maintainer-clean-mmalloc maintainer-clean-mmalloc: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./mmalloc/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -19110,8 +19533,8 @@ maintainer-clean-mmalloc: maybe-configure-patch: @if patch maybe-configure-patch: configure-patch -configure-patch: - @$(unstage) +configure-patch: + @: $(MAKE); $(unstage) @test ! -f $(HOST_SUBDIR)/patch/Makefile || exit 0; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/patch ; \ r=`${PWD_COMMAND}`; export r; \ @@ -19141,7 +19564,7 @@ maybe-all-patch: TARGET-patch=all maybe-all-patch: all-patch all-patch: configure-patch - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -19158,7 +19581,7 @@ maybe-check-patch: maybe-check-patch: check-patch check-patch: - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -19173,7 +19596,7 @@ maybe-install-patch: maybe-install-patch: install-patch install-patch: installdirs - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -19191,7 +19614,7 @@ maybe-info-patch: info-patch info-patch: \ configure-patch - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./patch/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -19217,7 +19640,7 @@ maybe-dvi-patch: dvi-patch dvi-patch: \ configure-patch - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./patch/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -19243,7 +19666,7 @@ maybe-html-patch: html-patch html-patch: \ configure-patch - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./patch/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -19269,7 +19692,7 @@ maybe-TAGS-patch: TAGS-patch TAGS-patch: \ configure-patch - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./patch/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -19296,7 +19719,7 @@ maybe-install-info-patch: install-info-patch install-info-patch: \ configure-patch \ info-patch - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./patch/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -19322,7 +19745,7 @@ maybe-installcheck-patch: installcheck-patch installcheck-patch: \ configure-patch - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./patch/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -19347,7 +19770,7 @@ maybe-mostlyclean-patch: maybe-mostlyclean-patch: mostlyclean-patch mostlyclean-patch: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./patch/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -19372,7 +19795,7 @@ maybe-clean-patch: maybe-clean-patch: clean-patch clean-patch: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./patch/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -19397,7 +19820,7 @@ maybe-distclean-patch: maybe-distclean-patch: distclean-patch distclean-patch: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./patch/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -19422,7 +19845,7 @@ maybe-maintainer-clean-patch: maybe-maintainer-clean-patch: maintainer-clean-patch maintainer-clean-patch: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./patch/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -19447,8 +19870,8 @@ maintainer-clean-patch: maybe-configure-perl: @if perl maybe-configure-perl: configure-perl -configure-perl: - @$(unstage) +configure-perl: + @: $(MAKE); $(unstage) @test ! -f $(HOST_SUBDIR)/perl/Makefile || exit 0; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/perl ; \ r=`${PWD_COMMAND}`; export r; \ @@ -19478,7 +19901,7 @@ maybe-all-perl: TARGET-perl=all maybe-all-perl: all-perl all-perl: configure-perl - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -19495,7 +19918,7 @@ maybe-check-perl: maybe-check-perl: check-perl check-perl: - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -19510,7 +19933,7 @@ maybe-install-perl: maybe-install-perl: install-perl install-perl: installdirs - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -19528,7 +19951,7 @@ maybe-info-perl: info-perl info-perl: \ configure-perl - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./perl/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -19554,7 +19977,7 @@ maybe-dvi-perl: dvi-perl dvi-perl: \ configure-perl - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./perl/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -19580,7 +20003,7 @@ maybe-html-perl: html-perl html-perl: \ configure-perl - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./perl/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -19606,7 +20029,7 @@ maybe-TAGS-perl: TAGS-perl TAGS-perl: \ configure-perl - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./perl/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -19633,7 +20056,7 @@ maybe-install-info-perl: install-info-perl install-info-perl: \ configure-perl \ info-perl - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./perl/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -19659,7 +20082,7 @@ maybe-installcheck-perl: installcheck-perl installcheck-perl: \ configure-perl - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./perl/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -19684,7 +20107,7 @@ maybe-mostlyclean-perl: maybe-mostlyclean-perl: mostlyclean-perl mostlyclean-perl: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./perl/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -19709,7 +20132,7 @@ maybe-clean-perl: maybe-clean-perl: clean-perl clean-perl: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./perl/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -19734,7 +20157,7 @@ maybe-distclean-perl: maybe-distclean-perl: distclean-perl distclean-perl: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./perl/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -19759,7 +20182,7 @@ maybe-maintainer-clean-perl: maybe-maintainer-clean-perl: maintainer-clean-perl maintainer-clean-perl: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./perl/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -19784,8 +20207,8 @@ maintainer-clean-perl: maybe-configure-prms: @if prms maybe-configure-prms: configure-prms -configure-prms: - @$(unstage) +configure-prms: + @: $(MAKE); $(unstage) @test ! -f $(HOST_SUBDIR)/prms/Makefile || exit 0; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/prms ; \ r=`${PWD_COMMAND}`; export r; \ @@ -19815,7 +20238,7 @@ maybe-all-prms: TARGET-prms=all maybe-all-prms: all-prms all-prms: configure-prms - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -19832,7 +20255,7 @@ maybe-check-prms: maybe-check-prms: check-prms check-prms: - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -19847,7 +20270,7 @@ maybe-install-prms: maybe-install-prms: install-prms install-prms: installdirs - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -19865,7 +20288,7 @@ maybe-info-prms: info-prms info-prms: \ configure-prms - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./prms/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -19891,7 +20314,7 @@ maybe-dvi-prms: dvi-prms dvi-prms: \ configure-prms - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./prms/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -19917,7 +20340,7 @@ maybe-html-prms: html-prms html-prms: \ configure-prms - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./prms/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -19943,7 +20366,7 @@ maybe-TAGS-prms: TAGS-prms TAGS-prms: \ configure-prms - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./prms/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -19970,7 +20393,7 @@ maybe-install-info-prms: install-info-prms install-info-prms: \ configure-prms \ info-prms - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./prms/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -19996,7 +20419,7 @@ maybe-installcheck-prms: installcheck-prms installcheck-prms: \ configure-prms - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./prms/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -20021,7 +20444,7 @@ maybe-mostlyclean-prms: maybe-mostlyclean-prms: mostlyclean-prms mostlyclean-prms: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./prms/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -20046,7 +20469,7 @@ maybe-clean-prms: maybe-clean-prms: clean-prms clean-prms: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./prms/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -20071,7 +20494,7 @@ maybe-distclean-prms: maybe-distclean-prms: distclean-prms distclean-prms: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./prms/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -20096,7 +20519,7 @@ maybe-maintainer-clean-prms: maybe-maintainer-clean-prms: maintainer-clean-prms maintainer-clean-prms: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./prms/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -20121,8 +20544,8 @@ maintainer-clean-prms: maybe-configure-rcs: @if rcs maybe-configure-rcs: configure-rcs -configure-rcs: - @$(unstage) +configure-rcs: + @: $(MAKE); $(unstage) @test ! -f $(HOST_SUBDIR)/rcs/Makefile || exit 0; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/rcs ; \ r=`${PWD_COMMAND}`; export r; \ @@ -20152,7 +20575,7 @@ maybe-all-rcs: TARGET-rcs=all maybe-all-rcs: all-rcs all-rcs: configure-rcs - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -20169,7 +20592,7 @@ maybe-check-rcs: maybe-check-rcs: check-rcs check-rcs: - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -20184,7 +20607,7 @@ maybe-install-rcs: maybe-install-rcs: install-rcs install-rcs: installdirs - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -20202,7 +20625,7 @@ maybe-info-rcs: info-rcs info-rcs: \ configure-rcs - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./rcs/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -20228,7 +20651,7 @@ maybe-dvi-rcs: dvi-rcs dvi-rcs: \ configure-rcs - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./rcs/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -20254,7 +20677,7 @@ maybe-html-rcs: html-rcs html-rcs: \ configure-rcs - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./rcs/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -20280,7 +20703,7 @@ maybe-TAGS-rcs: TAGS-rcs TAGS-rcs: \ configure-rcs - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./rcs/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -20307,7 +20730,7 @@ maybe-install-info-rcs: install-info-rcs install-info-rcs: \ configure-rcs \ info-rcs - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./rcs/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -20333,7 +20756,7 @@ maybe-installcheck-rcs: installcheck-rcs installcheck-rcs: \ configure-rcs - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./rcs/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -20358,7 +20781,7 @@ maybe-mostlyclean-rcs: maybe-mostlyclean-rcs: mostlyclean-rcs mostlyclean-rcs: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./rcs/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -20383,7 +20806,7 @@ maybe-clean-rcs: maybe-clean-rcs: clean-rcs clean-rcs: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./rcs/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -20408,7 +20831,7 @@ maybe-distclean-rcs: maybe-distclean-rcs: distclean-rcs distclean-rcs: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./rcs/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -20433,7 +20856,7 @@ maybe-maintainer-clean-rcs: maybe-maintainer-clean-rcs: maintainer-clean-rcs maintainer-clean-rcs: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./rcs/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -20458,8 +20881,8 @@ maintainer-clean-rcs: maybe-configure-readline: @if readline maybe-configure-readline: configure-readline -configure-readline: - @$(unstage) +configure-readline: + @: $(MAKE); $(unstage) @test ! -f $(HOST_SUBDIR)/readline/Makefile || exit 0; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/readline ; \ r=`${PWD_COMMAND}`; export r; \ @@ -20489,7 +20912,7 @@ maybe-all-readline: TARGET-readline=all maybe-all-readline: all-readline all-readline: configure-readline - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -20506,7 +20929,7 @@ maybe-check-readline: maybe-check-readline: check-readline check-readline: - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -20521,7 +20944,7 @@ maybe-install-readline: maybe-install-readline: install-readline install-readline: installdirs - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -20539,7 +20962,7 @@ maybe-info-readline: info-readline info-readline: \ configure-readline - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./readline/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -20565,7 +20988,7 @@ maybe-dvi-readline: dvi-readline dvi-readline: \ configure-readline - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./readline/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -20591,7 +21014,7 @@ maybe-html-readline: html-readline html-readline: \ configure-readline - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./readline/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -20617,7 +21040,7 @@ maybe-TAGS-readline: TAGS-readline TAGS-readline: \ configure-readline - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./readline/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -20644,7 +21067,7 @@ maybe-install-info-readline: install-info-readline install-info-readline: \ configure-readline \ info-readline - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./readline/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -20670,7 +21093,7 @@ maybe-installcheck-readline: installcheck-readline installcheck-readline: \ configure-readline - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./readline/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -20695,7 +21118,7 @@ maybe-mostlyclean-readline: maybe-mostlyclean-readline: mostlyclean-readline mostlyclean-readline: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./readline/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -20720,7 +21143,7 @@ maybe-clean-readline: maybe-clean-readline: clean-readline clean-readline: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./readline/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -20745,7 +21168,7 @@ maybe-distclean-readline: maybe-distclean-readline: distclean-readline distclean-readline: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./readline/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -20770,7 +21193,7 @@ maybe-maintainer-clean-readline: maybe-maintainer-clean-readline: maintainer-clean-readline maintainer-clean-readline: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./readline/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -20795,8 +21218,8 @@ maintainer-clean-readline: maybe-configure-release: @if release maybe-configure-release: configure-release -configure-release: - @$(unstage) +configure-release: + @: $(MAKE); $(unstage) @test ! -f $(HOST_SUBDIR)/release/Makefile || exit 0; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/release ; \ r=`${PWD_COMMAND}`; export r; \ @@ -20826,7 +21249,7 @@ maybe-all-release: TARGET-release=all maybe-all-release: all-release all-release: configure-release - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -20864,7 +21287,7 @@ maybe-info-release: info-release info-release: \ configure-release - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./release/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -20890,7 +21313,7 @@ maybe-dvi-release: dvi-release dvi-release: \ configure-release - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./release/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -20916,7 +21339,7 @@ maybe-html-release: html-release html-release: \ configure-release - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./release/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -20942,7 +21365,7 @@ maybe-TAGS-release: TAGS-release TAGS-release: \ configure-release - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./release/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -20969,7 +21392,7 @@ maybe-install-info-release: install-info-release install-info-release: \ configure-release \ info-release - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./release/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -20995,7 +21418,7 @@ maybe-installcheck-release: installcheck-release installcheck-release: \ configure-release - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./release/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -21020,7 +21443,7 @@ maybe-mostlyclean-release: maybe-mostlyclean-release: mostlyclean-release mostlyclean-release: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./release/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -21045,7 +21468,7 @@ maybe-clean-release: maybe-clean-release: clean-release clean-release: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./release/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -21070,7 +21493,7 @@ maybe-distclean-release: maybe-distclean-release: distclean-release distclean-release: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./release/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -21095,7 +21518,7 @@ maybe-maintainer-clean-release: maybe-maintainer-clean-release: maintainer-clean-release maintainer-clean-release: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./release/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -21120,8 +21543,8 @@ maintainer-clean-release: maybe-configure-recode: @if recode maybe-configure-recode: configure-recode -configure-recode: - @$(unstage) +configure-recode: + @: $(MAKE); $(unstage) @test ! -f $(HOST_SUBDIR)/recode/Makefile || exit 0; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/recode ; \ r=`${PWD_COMMAND}`; export r; \ @@ -21151,7 +21574,7 @@ maybe-all-recode: TARGET-recode=all maybe-all-recode: all-recode all-recode: configure-recode - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -21168,7 +21591,7 @@ maybe-check-recode: maybe-check-recode: check-recode check-recode: - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -21183,7 +21606,7 @@ maybe-install-recode: maybe-install-recode: install-recode install-recode: installdirs - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -21201,7 +21624,7 @@ maybe-info-recode: info-recode info-recode: \ configure-recode - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./recode/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -21227,7 +21650,7 @@ maybe-dvi-recode: dvi-recode dvi-recode: \ configure-recode - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./recode/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -21253,7 +21676,7 @@ maybe-html-recode: html-recode html-recode: \ configure-recode - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./recode/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -21279,7 +21702,7 @@ maybe-TAGS-recode: TAGS-recode TAGS-recode: \ configure-recode - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./recode/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -21306,7 +21729,7 @@ maybe-install-info-recode: install-info-recode install-info-recode: \ configure-recode \ info-recode - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./recode/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -21332,7 +21755,7 @@ maybe-installcheck-recode: installcheck-recode installcheck-recode: \ configure-recode - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./recode/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -21357,7 +21780,7 @@ maybe-mostlyclean-recode: maybe-mostlyclean-recode: mostlyclean-recode mostlyclean-recode: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./recode/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -21382,7 +21805,7 @@ maybe-clean-recode: maybe-clean-recode: clean-recode clean-recode: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./recode/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -21407,7 +21830,7 @@ maybe-distclean-recode: maybe-distclean-recode: distclean-recode distclean-recode: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./recode/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -21432,7 +21855,7 @@ maybe-maintainer-clean-recode: maybe-maintainer-clean-recode: maintainer-clean-recode maintainer-clean-recode: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./recode/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -21457,8 +21880,8 @@ maintainer-clean-recode: maybe-configure-sed: @if sed maybe-configure-sed: configure-sed -configure-sed: - @$(unstage) +configure-sed: + @: $(MAKE); $(unstage) @test ! -f $(HOST_SUBDIR)/sed/Makefile || exit 0; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/sed ; \ r=`${PWD_COMMAND}`; export r; \ @@ -21488,7 +21911,7 @@ maybe-all-sed: TARGET-sed=all maybe-all-sed: all-sed all-sed: configure-sed - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -21505,7 +21928,7 @@ maybe-check-sed: maybe-check-sed: check-sed check-sed: - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -21520,7 +21943,7 @@ maybe-install-sed: maybe-install-sed: install-sed install-sed: installdirs - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -21538,7 +21961,7 @@ maybe-info-sed: info-sed info-sed: \ configure-sed - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./sed/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -21564,7 +21987,7 @@ maybe-dvi-sed: dvi-sed dvi-sed: \ configure-sed - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./sed/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -21590,7 +22013,7 @@ maybe-html-sed: html-sed html-sed: \ configure-sed - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./sed/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -21616,7 +22039,7 @@ maybe-TAGS-sed: TAGS-sed TAGS-sed: \ configure-sed - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./sed/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -21643,7 +22066,7 @@ maybe-install-info-sed: install-info-sed install-info-sed: \ configure-sed \ info-sed - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./sed/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -21669,7 +22092,7 @@ maybe-installcheck-sed: installcheck-sed installcheck-sed: \ configure-sed - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./sed/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -21694,7 +22117,7 @@ maybe-mostlyclean-sed: maybe-mostlyclean-sed: mostlyclean-sed mostlyclean-sed: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./sed/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -21719,7 +22142,7 @@ maybe-clean-sed: maybe-clean-sed: clean-sed clean-sed: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./sed/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -21744,7 +22167,7 @@ maybe-distclean-sed: maybe-distclean-sed: distclean-sed distclean-sed: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./sed/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -21769,7 +22192,7 @@ maybe-maintainer-clean-sed: maybe-maintainer-clean-sed: maintainer-clean-sed maintainer-clean-sed: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./sed/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -21794,8 +22217,8 @@ maintainer-clean-sed: maybe-configure-send-pr: @if send-pr maybe-configure-send-pr: configure-send-pr -configure-send-pr: - @$(unstage) +configure-send-pr: + @: $(MAKE); $(unstage) @test ! -f $(HOST_SUBDIR)/send-pr/Makefile || exit 0; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/send-pr ; \ r=`${PWD_COMMAND}`; export r; \ @@ -21825,7 +22248,7 @@ maybe-all-send-pr: TARGET-send-pr=all maybe-all-send-pr: all-send-pr all-send-pr: configure-send-pr - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -21842,7 +22265,7 @@ maybe-check-send-pr: maybe-check-send-pr: check-send-pr check-send-pr: - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -21857,7 +22280,7 @@ maybe-install-send-pr: maybe-install-send-pr: install-send-pr install-send-pr: installdirs - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -21875,7 +22298,7 @@ maybe-info-send-pr: info-send-pr info-send-pr: \ configure-send-pr - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./send-pr/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -21901,7 +22324,7 @@ maybe-dvi-send-pr: dvi-send-pr dvi-send-pr: \ configure-send-pr - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./send-pr/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -21927,7 +22350,7 @@ maybe-html-send-pr: html-send-pr html-send-pr: \ configure-send-pr - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./send-pr/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -21953,7 +22376,7 @@ maybe-TAGS-send-pr: TAGS-send-pr TAGS-send-pr: \ configure-send-pr - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./send-pr/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -21980,7 +22403,7 @@ maybe-install-info-send-pr: install-info-send-pr install-info-send-pr: \ configure-send-pr \ info-send-pr - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./send-pr/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -22006,7 +22429,7 @@ maybe-installcheck-send-pr: installcheck-send-pr installcheck-send-pr: \ configure-send-pr - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./send-pr/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -22031,7 +22454,7 @@ maybe-mostlyclean-send-pr: maybe-mostlyclean-send-pr: mostlyclean-send-pr mostlyclean-send-pr: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./send-pr/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -22056,7 +22479,7 @@ maybe-clean-send-pr: maybe-clean-send-pr: clean-send-pr clean-send-pr: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./send-pr/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -22081,7 +22504,7 @@ maybe-distclean-send-pr: maybe-distclean-send-pr: distclean-send-pr distclean-send-pr: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./send-pr/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -22106,7 +22529,7 @@ maybe-maintainer-clean-send-pr: maybe-maintainer-clean-send-pr: maintainer-clean-send-pr maintainer-clean-send-pr: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./send-pr/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -22131,8 +22554,8 @@ maintainer-clean-send-pr: maybe-configure-shellutils: @if shellutils maybe-configure-shellutils: configure-shellutils -configure-shellutils: - @$(unstage) +configure-shellutils: + @: $(MAKE); $(unstage) @test ! -f $(HOST_SUBDIR)/shellutils/Makefile || exit 0; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/shellutils ; \ r=`${PWD_COMMAND}`; export r; \ @@ -22162,7 +22585,7 @@ maybe-all-shellutils: TARGET-shellutils=all maybe-all-shellutils: all-shellutils all-shellutils: configure-shellutils - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -22179,7 +22602,7 @@ maybe-check-shellutils: maybe-check-shellutils: check-shellutils check-shellutils: - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -22194,7 +22617,7 @@ maybe-install-shellutils: maybe-install-shellutils: install-shellutils install-shellutils: installdirs - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -22212,7 +22635,7 @@ maybe-info-shellutils: info-shellutils info-shellutils: \ configure-shellutils - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./shellutils/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -22238,7 +22661,7 @@ maybe-dvi-shellutils: dvi-shellutils dvi-shellutils: \ configure-shellutils - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./shellutils/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -22264,7 +22687,7 @@ maybe-html-shellutils: html-shellutils html-shellutils: \ configure-shellutils - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./shellutils/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -22290,7 +22713,7 @@ maybe-TAGS-shellutils: TAGS-shellutils TAGS-shellutils: \ configure-shellutils - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./shellutils/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -22317,7 +22740,7 @@ maybe-install-info-shellutils: install-info-shellutils install-info-shellutils: \ configure-shellutils \ info-shellutils - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./shellutils/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -22343,7 +22766,7 @@ maybe-installcheck-shellutils: installcheck-shellutils installcheck-shellutils: \ configure-shellutils - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./shellutils/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -22368,7 +22791,7 @@ maybe-mostlyclean-shellutils: maybe-mostlyclean-shellutils: mostlyclean-shellutils mostlyclean-shellutils: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./shellutils/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -22393,7 +22816,7 @@ maybe-clean-shellutils: maybe-clean-shellutils: clean-shellutils clean-shellutils: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./shellutils/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -22418,7 +22841,7 @@ maybe-distclean-shellutils: maybe-distclean-shellutils: distclean-shellutils distclean-shellutils: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./shellutils/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -22443,7 +22866,7 @@ maybe-maintainer-clean-shellutils: maybe-maintainer-clean-shellutils: maintainer-clean-shellutils maintainer-clean-shellutils: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./shellutils/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -22468,8 +22891,8 @@ maintainer-clean-shellutils: maybe-configure-sid: @if sid maybe-configure-sid: configure-sid -configure-sid: - @$(unstage) +configure-sid: + @: $(MAKE); $(unstage) @test ! -f $(HOST_SUBDIR)/sid/Makefile || exit 0; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/sid ; \ r=`${PWD_COMMAND}`; export r; \ @@ -22499,7 +22922,7 @@ maybe-all-sid: TARGET-sid=all maybe-all-sid: all-sid all-sid: configure-sid - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -22516,7 +22939,7 @@ maybe-check-sid: maybe-check-sid: check-sid check-sid: - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -22531,7 +22954,7 @@ maybe-install-sid: maybe-install-sid: install-sid install-sid: installdirs - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -22549,7 +22972,7 @@ maybe-info-sid: info-sid info-sid: \ configure-sid - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./sid/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -22575,7 +22998,7 @@ maybe-dvi-sid: dvi-sid dvi-sid: \ configure-sid - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./sid/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -22601,7 +23024,7 @@ maybe-html-sid: html-sid html-sid: \ configure-sid - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./sid/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -22627,7 +23050,7 @@ maybe-TAGS-sid: TAGS-sid TAGS-sid: \ configure-sid - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./sid/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -22654,7 +23077,7 @@ maybe-install-info-sid: install-info-sid install-info-sid: \ configure-sid \ info-sid - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./sid/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -22680,7 +23103,7 @@ maybe-installcheck-sid: installcheck-sid installcheck-sid: \ configure-sid - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./sid/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -22705,7 +23128,7 @@ maybe-mostlyclean-sid: maybe-mostlyclean-sid: mostlyclean-sid mostlyclean-sid: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./sid/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -22730,7 +23153,7 @@ maybe-clean-sid: maybe-clean-sid: clean-sid clean-sid: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./sid/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -22755,7 +23178,7 @@ maybe-distclean-sid: maybe-distclean-sid: distclean-sid distclean-sid: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./sid/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -22780,7 +23203,7 @@ maybe-maintainer-clean-sid: maybe-maintainer-clean-sid: maintainer-clean-sid maintainer-clean-sid: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./sid/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -22805,8 +23228,8 @@ maintainer-clean-sid: maybe-configure-sim: @if sim maybe-configure-sim: configure-sim -configure-sim: - @$(unstage) +configure-sim: + @: $(MAKE); $(unstage) @test ! -f $(HOST_SUBDIR)/sim/Makefile || exit 0; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/sim ; \ r=`${PWD_COMMAND}`; export r; \ @@ -22836,7 +23259,7 @@ maybe-all-sim: TARGET-sim=all maybe-all-sim: all-sim all-sim: configure-sim - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -22853,7 +23276,7 @@ maybe-check-sim: maybe-check-sim: check-sim check-sim: - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -22868,7 +23291,7 @@ maybe-install-sim: maybe-install-sim: install-sim install-sim: installdirs - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -22886,7 +23309,7 @@ maybe-info-sim: info-sim info-sim: \ configure-sim - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./sim/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -22912,7 +23335,7 @@ maybe-dvi-sim: dvi-sim dvi-sim: \ configure-sim - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./sim/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -22938,7 +23361,7 @@ maybe-html-sim: html-sim html-sim: \ configure-sim - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./sim/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -22964,7 +23387,7 @@ maybe-TAGS-sim: TAGS-sim TAGS-sim: \ configure-sim - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./sim/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -22991,7 +23414,7 @@ maybe-install-info-sim: install-info-sim install-info-sim: \ configure-sim \ info-sim - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./sim/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -23017,7 +23440,7 @@ maybe-installcheck-sim: installcheck-sim installcheck-sim: \ configure-sim - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./sim/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -23042,7 +23465,7 @@ maybe-mostlyclean-sim: maybe-mostlyclean-sim: mostlyclean-sim mostlyclean-sim: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./sim/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -23067,7 +23490,7 @@ maybe-clean-sim: maybe-clean-sim: clean-sim clean-sim: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./sim/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -23092,7 +23515,7 @@ maybe-distclean-sim: maybe-distclean-sim: distclean-sim distclean-sim: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./sim/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -23117,7 +23540,7 @@ maybe-maintainer-clean-sim: maybe-maintainer-clean-sim: maintainer-clean-sim maintainer-clean-sim: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./sim/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -23142,8 +23565,8 @@ maintainer-clean-sim: maybe-configure-tar: @if tar maybe-configure-tar: configure-tar -configure-tar: - @$(unstage) +configure-tar: + @: $(MAKE); $(unstage) @test ! -f $(HOST_SUBDIR)/tar/Makefile || exit 0; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/tar ; \ r=`${PWD_COMMAND}`; export r; \ @@ -23173,7 +23596,7 @@ maybe-all-tar: TARGET-tar=all maybe-all-tar: all-tar all-tar: configure-tar - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -23190,7 +23613,7 @@ maybe-check-tar: maybe-check-tar: check-tar check-tar: - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -23205,7 +23628,7 @@ maybe-install-tar: maybe-install-tar: install-tar install-tar: installdirs - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -23223,7 +23646,7 @@ maybe-info-tar: info-tar info-tar: \ configure-tar - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./tar/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -23249,7 +23672,7 @@ maybe-dvi-tar: dvi-tar dvi-tar: \ configure-tar - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./tar/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -23275,7 +23698,7 @@ maybe-html-tar: html-tar html-tar: \ configure-tar - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./tar/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -23301,7 +23724,7 @@ maybe-TAGS-tar: TAGS-tar TAGS-tar: \ configure-tar - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./tar/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -23328,7 +23751,7 @@ maybe-install-info-tar: install-info-tar install-info-tar: \ configure-tar \ info-tar - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./tar/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -23354,7 +23777,7 @@ maybe-installcheck-tar: installcheck-tar installcheck-tar: \ configure-tar - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./tar/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -23379,7 +23802,7 @@ maybe-mostlyclean-tar: maybe-mostlyclean-tar: mostlyclean-tar mostlyclean-tar: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./tar/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -23404,7 +23827,7 @@ maybe-clean-tar: maybe-clean-tar: clean-tar clean-tar: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./tar/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -23429,7 +23852,7 @@ maybe-distclean-tar: maybe-distclean-tar: distclean-tar distclean-tar: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./tar/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -23454,7 +23877,7 @@ maybe-maintainer-clean-tar: maybe-maintainer-clean-tar: maintainer-clean-tar maintainer-clean-tar: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./tar/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -23479,8 +23902,8 @@ maintainer-clean-tar: maybe-configure-texinfo: @if texinfo maybe-configure-texinfo: configure-texinfo -configure-texinfo: - @$(unstage) +configure-texinfo: + @: $(MAKE); $(unstage) @test ! -f $(HOST_SUBDIR)/texinfo/Makefile || exit 0; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/texinfo ; \ r=`${PWD_COMMAND}`; export r; \ @@ -23510,7 +23933,7 @@ maybe-all-texinfo: TARGET-texinfo=all maybe-all-texinfo: all-texinfo all-texinfo: configure-texinfo - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -23527,7 +23950,7 @@ maybe-check-texinfo: maybe-check-texinfo: check-texinfo check-texinfo: - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -23554,7 +23977,7 @@ maybe-info-texinfo: info-texinfo info-texinfo: \ configure-texinfo - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./texinfo/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -23580,7 +24003,7 @@ maybe-dvi-texinfo: dvi-texinfo dvi-texinfo: \ configure-texinfo - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./texinfo/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -23606,7 +24029,7 @@ maybe-html-texinfo: html-texinfo html-texinfo: \ configure-texinfo - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./texinfo/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -23632,7 +24055,7 @@ maybe-TAGS-texinfo: TAGS-texinfo TAGS-texinfo: \ configure-texinfo - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./texinfo/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -23659,7 +24082,7 @@ maybe-install-info-texinfo: install-info-texinfo install-info-texinfo: \ configure-texinfo \ info-texinfo - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./texinfo/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -23685,7 +24108,7 @@ maybe-installcheck-texinfo: installcheck-texinfo installcheck-texinfo: \ configure-texinfo - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./texinfo/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -23710,7 +24133,7 @@ maybe-mostlyclean-texinfo: maybe-mostlyclean-texinfo: mostlyclean-texinfo mostlyclean-texinfo: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./texinfo/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -23735,7 +24158,7 @@ maybe-clean-texinfo: maybe-clean-texinfo: clean-texinfo clean-texinfo: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./texinfo/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -23760,7 +24183,7 @@ maybe-distclean-texinfo: maybe-distclean-texinfo: distclean-texinfo distclean-texinfo: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./texinfo/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -23785,7 +24208,7 @@ maybe-maintainer-clean-texinfo: maybe-maintainer-clean-texinfo: maintainer-clean-texinfo maintainer-clean-texinfo: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./texinfo/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -23810,8 +24233,8 @@ maintainer-clean-texinfo: maybe-configure-textutils: @if textutils maybe-configure-textutils: configure-textutils -configure-textutils: - @$(unstage) +configure-textutils: + @: $(MAKE); $(unstage) @test ! -f $(HOST_SUBDIR)/textutils/Makefile || exit 0; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/textutils ; \ r=`${PWD_COMMAND}`; export r; \ @@ -23841,7 +24264,7 @@ maybe-all-textutils: TARGET-textutils=all maybe-all-textutils: all-textutils all-textutils: configure-textutils - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -23858,7 +24281,7 @@ maybe-check-textutils: maybe-check-textutils: check-textutils check-textutils: - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -23873,7 +24296,7 @@ maybe-install-textutils: maybe-install-textutils: install-textutils install-textutils: installdirs - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -23891,7 +24314,7 @@ maybe-info-textutils: info-textutils info-textutils: \ configure-textutils - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./textutils/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -23917,7 +24340,7 @@ maybe-dvi-textutils: dvi-textutils dvi-textutils: \ configure-textutils - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./textutils/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -23943,7 +24366,7 @@ maybe-html-textutils: html-textutils html-textutils: \ configure-textutils - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./textutils/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -23969,7 +24392,7 @@ maybe-TAGS-textutils: TAGS-textutils TAGS-textutils: \ configure-textutils - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./textutils/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -23996,7 +24419,7 @@ maybe-install-info-textutils: install-info-textutils install-info-textutils: \ configure-textutils \ info-textutils - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./textutils/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -24022,7 +24445,7 @@ maybe-installcheck-textutils: installcheck-textutils installcheck-textutils: \ configure-textutils - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./textutils/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -24047,7 +24470,7 @@ maybe-mostlyclean-textutils: maybe-mostlyclean-textutils: mostlyclean-textutils mostlyclean-textutils: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./textutils/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -24072,7 +24495,7 @@ maybe-clean-textutils: maybe-clean-textutils: clean-textutils clean-textutils: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./textutils/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -24097,7 +24520,7 @@ maybe-distclean-textutils: maybe-distclean-textutils: distclean-textutils distclean-textutils: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./textutils/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -24122,7 +24545,7 @@ maybe-maintainer-clean-textutils: maybe-maintainer-clean-textutils: maintainer-clean-textutils maintainer-clean-textutils: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./textutils/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -24147,8 +24570,8 @@ maintainer-clean-textutils: maybe-configure-time: @if time maybe-configure-time: configure-time -configure-time: - @$(unstage) +configure-time: + @: $(MAKE); $(unstage) @test ! -f $(HOST_SUBDIR)/time/Makefile || exit 0; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/time ; \ r=`${PWD_COMMAND}`; export r; \ @@ -24178,7 +24601,7 @@ maybe-all-time: TARGET-time=all maybe-all-time: all-time all-time: configure-time - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -24195,7 +24618,7 @@ maybe-check-time: maybe-check-time: check-time check-time: - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -24210,7 +24633,7 @@ maybe-install-time: maybe-install-time: install-time install-time: installdirs - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -24228,7 +24651,7 @@ maybe-info-time: info-time info-time: \ configure-time - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./time/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -24254,7 +24677,7 @@ maybe-dvi-time: dvi-time dvi-time: \ configure-time - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./time/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -24280,7 +24703,7 @@ maybe-html-time: html-time html-time: \ configure-time - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./time/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -24306,7 +24729,7 @@ maybe-TAGS-time: TAGS-time TAGS-time: \ configure-time - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./time/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -24333,7 +24756,7 @@ maybe-install-info-time: install-info-time install-info-time: \ configure-time \ info-time - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./time/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -24359,7 +24782,7 @@ maybe-installcheck-time: installcheck-time installcheck-time: \ configure-time - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./time/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -24384,7 +24807,7 @@ maybe-mostlyclean-time: maybe-mostlyclean-time: mostlyclean-time mostlyclean-time: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./time/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -24409,7 +24832,7 @@ maybe-clean-time: maybe-clean-time: clean-time clean-time: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./time/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -24434,7 +24857,7 @@ maybe-distclean-time: maybe-distclean-time: distclean-time distclean-time: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./time/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -24459,7 +24882,7 @@ maybe-maintainer-clean-time: maybe-maintainer-clean-time: maintainer-clean-time maintainer-clean-time: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./time/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -24484,8 +24907,8 @@ maintainer-clean-time: maybe-configure-uudecode: @if uudecode maybe-configure-uudecode: configure-uudecode -configure-uudecode: - @$(unstage) +configure-uudecode: + @: $(MAKE); $(unstage) @test ! -f $(HOST_SUBDIR)/uudecode/Makefile || exit 0; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/uudecode ; \ r=`${PWD_COMMAND}`; export r; \ @@ -24515,7 +24938,7 @@ maybe-all-uudecode: TARGET-uudecode=all maybe-all-uudecode: all-uudecode all-uudecode: configure-uudecode - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -24532,7 +24955,7 @@ maybe-check-uudecode: maybe-check-uudecode: check-uudecode check-uudecode: - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -24547,7 +24970,7 @@ maybe-install-uudecode: maybe-install-uudecode: install-uudecode install-uudecode: installdirs - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -24565,7 +24988,7 @@ maybe-info-uudecode: info-uudecode info-uudecode: \ configure-uudecode - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./uudecode/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -24591,7 +25014,7 @@ maybe-dvi-uudecode: dvi-uudecode dvi-uudecode: \ configure-uudecode - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./uudecode/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -24617,7 +25040,7 @@ maybe-html-uudecode: html-uudecode html-uudecode: \ configure-uudecode - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./uudecode/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -24643,7 +25066,7 @@ maybe-TAGS-uudecode: TAGS-uudecode TAGS-uudecode: \ configure-uudecode - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./uudecode/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -24670,7 +25093,7 @@ maybe-install-info-uudecode: install-info-uudecode install-info-uudecode: \ configure-uudecode \ info-uudecode - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./uudecode/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -24696,7 +25119,7 @@ maybe-installcheck-uudecode: installcheck-uudecode installcheck-uudecode: \ configure-uudecode - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./uudecode/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -24721,7 +25144,7 @@ maybe-mostlyclean-uudecode: maybe-mostlyclean-uudecode: mostlyclean-uudecode mostlyclean-uudecode: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./uudecode/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -24746,7 +25169,7 @@ maybe-clean-uudecode: maybe-clean-uudecode: clean-uudecode clean-uudecode: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./uudecode/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -24771,7 +25194,7 @@ maybe-distclean-uudecode: maybe-distclean-uudecode: distclean-uudecode distclean-uudecode: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./uudecode/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -24796,7 +25219,7 @@ maybe-maintainer-clean-uudecode: maybe-maintainer-clean-uudecode: maintainer-clean-uudecode maintainer-clean-uudecode: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./uudecode/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -24821,8 +25244,8 @@ maintainer-clean-uudecode: maybe-configure-wdiff: @if wdiff maybe-configure-wdiff: configure-wdiff -configure-wdiff: - @$(unstage) +configure-wdiff: + @: $(MAKE); $(unstage) @test ! -f $(HOST_SUBDIR)/wdiff/Makefile || exit 0; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/wdiff ; \ r=`${PWD_COMMAND}`; export r; \ @@ -24852,7 +25275,7 @@ maybe-all-wdiff: TARGET-wdiff=all maybe-all-wdiff: all-wdiff all-wdiff: configure-wdiff - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -24869,7 +25292,7 @@ maybe-check-wdiff: maybe-check-wdiff: check-wdiff check-wdiff: - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -24884,7 +25307,7 @@ maybe-install-wdiff: maybe-install-wdiff: install-wdiff install-wdiff: installdirs - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -24902,7 +25325,7 @@ maybe-info-wdiff: info-wdiff info-wdiff: \ configure-wdiff - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./wdiff/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -24928,7 +25351,7 @@ maybe-dvi-wdiff: dvi-wdiff dvi-wdiff: \ configure-wdiff - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./wdiff/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -24954,7 +25377,7 @@ maybe-html-wdiff: html-wdiff html-wdiff: \ configure-wdiff - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./wdiff/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -24980,7 +25403,7 @@ maybe-TAGS-wdiff: TAGS-wdiff TAGS-wdiff: \ configure-wdiff - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./wdiff/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -25007,7 +25430,7 @@ maybe-install-info-wdiff: install-info-wdiff install-info-wdiff: \ configure-wdiff \ info-wdiff - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./wdiff/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -25033,7 +25456,7 @@ maybe-installcheck-wdiff: installcheck-wdiff installcheck-wdiff: \ configure-wdiff - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./wdiff/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -25058,7 +25481,7 @@ maybe-mostlyclean-wdiff: maybe-mostlyclean-wdiff: mostlyclean-wdiff mostlyclean-wdiff: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./wdiff/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -25083,7 +25506,7 @@ maybe-clean-wdiff: maybe-clean-wdiff: clean-wdiff clean-wdiff: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./wdiff/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -25108,7 +25531,7 @@ maybe-distclean-wdiff: maybe-distclean-wdiff: distclean-wdiff distclean-wdiff: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./wdiff/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -25133,7 +25556,7 @@ maybe-maintainer-clean-wdiff: maybe-maintainer-clean-wdiff: maintainer-clean-wdiff maintainer-clean-wdiff: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./wdiff/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -25158,8 +25581,8 @@ maintainer-clean-wdiff: maybe-configure-zip: @if zip maybe-configure-zip: configure-zip -configure-zip: - @$(unstage) +configure-zip: + @: $(MAKE); $(unstage) @test ! -f $(HOST_SUBDIR)/zip/Makefile || exit 0; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/zip ; \ r=`${PWD_COMMAND}`; export r; \ @@ -25189,7 +25612,7 @@ maybe-all-zip: TARGET-zip=all maybe-all-zip: all-zip all-zip: configure-zip - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -25207,7 +25630,7 @@ maybe-check-zip: check-zip # This module is only tested in a native toolchain. check-zip: - @$(unstage) + @: $(MAKE); $(unstage) @if [ '$(host)' = '$(target)' ] ; then \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -25224,7 +25647,7 @@ maybe-install-zip: maybe-install-zip: install-zip install-zip: installdirs - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -25242,7 +25665,7 @@ maybe-info-zip: info-zip info-zip: \ configure-zip - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./zip/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -25268,7 +25691,7 @@ maybe-dvi-zip: dvi-zip dvi-zip: \ configure-zip - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./zip/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -25294,7 +25717,7 @@ maybe-html-zip: html-zip html-zip: \ configure-zip - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./zip/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -25320,7 +25743,7 @@ maybe-TAGS-zip: TAGS-zip TAGS-zip: \ configure-zip - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./zip/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -25347,7 +25770,7 @@ maybe-install-info-zip: install-info-zip install-info-zip: \ configure-zip \ info-zip - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./zip/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -25373,7 +25796,7 @@ maybe-installcheck-zip: installcheck-zip installcheck-zip: \ configure-zip - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./zip/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -25398,7 +25821,7 @@ maybe-mostlyclean-zip: maybe-mostlyclean-zip: mostlyclean-zip mostlyclean-zip: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./zip/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -25423,7 +25846,7 @@ maybe-clean-zip: maybe-clean-zip: clean-zip clean-zip: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./zip/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -25448,7 +25871,7 @@ maybe-distclean-zip: maybe-distclean-zip: distclean-zip distclean-zip: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./zip/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -25473,7 +25896,7 @@ maybe-maintainer-clean-zip: maybe-maintainer-clean-zip: maintainer-clean-zip maintainer-clean-zip: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./zip/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -25498,7 +25921,7 @@ maintainer-clean-zip: maybe-configure-zlib: @if zlib maybe-configure-zlib: configure-zlib -configure-zlib: +configure-zlib: @test -f stage_last && exit 0; \ test ! -f $(HOST_SUBDIR)/zlib/Makefile || exit 0; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/zlib ; \ @@ -25525,13 +25948,13 @@ configure-zlib: maybe-configure-stage1-zlib: @if zlib-bootstrap maybe-configure-stage1-zlib: configure-stage1-zlib -configure-stage1-zlib: +configure-stage1-zlib: @[ `cat stage_current` = stage1 ] || $(MAKE) stage1-start - @[ -f $(HOST_SUBDIR)/zlib/Makefile ] && exit 0 || : ; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/zlib + test ! -f $(HOST_SUBDIR)/zlib/Makefile || exit 0; \ $(HOST_EXPORTS) \ echo Configuring stage 1 in $(HOST_SUBDIR)/zlib ; \ + $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/zlib ; \ cd $(HOST_SUBDIR)/zlib || exit 1; \ case $(srcdir) in \ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ @@ -25549,14 +25972,14 @@ configure-stage1-zlib: maybe-configure-stage2-zlib: @if zlib-bootstrap maybe-configure-stage2-zlib: configure-stage2-zlib -configure-stage2-zlib: +configure-stage2-zlib: @[ `cat stage_current` = stage2 ] || $(MAKE) stage2-start - @[ -f $(HOST_SUBDIR)/zlib/Makefile ] && exit 0 || : ; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/zlib + test ! -f $(HOST_SUBDIR)/zlib/Makefile || exit 0; \ $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ echo Configuring stage 2 in $(HOST_SUBDIR)/zlib ; \ + $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/zlib ; \ cd $(HOST_SUBDIR)/zlib || exit 1; \ case $(srcdir) in \ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ @@ -25574,14 +25997,14 @@ configure-stage2-zlib: maybe-configure-stage3-zlib: @if zlib-bootstrap maybe-configure-stage3-zlib: configure-stage3-zlib -configure-stage3-zlib: +configure-stage3-zlib: @[ `cat stage_current` = stage3 ] || $(MAKE) stage3-start - @[ -f $(HOST_SUBDIR)/zlib/Makefile ] && exit 0 || : ; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/zlib + test ! -f $(HOST_SUBDIR)/zlib/Makefile || exit 0; \ $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ echo Configuring stage 3 in $(HOST_SUBDIR)/zlib ; \ + $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/zlib ; \ cd $(HOST_SUBDIR)/zlib || exit 1; \ case $(srcdir) in \ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ @@ -25599,14 +26022,14 @@ configure-stage3-zlib: maybe-configure-stage4-zlib: @if zlib-bootstrap maybe-configure-stage4-zlib: configure-stage4-zlib -configure-stage4-zlib: +configure-stage4-zlib: @[ `cat stage_current` = stage4 ] || $(MAKE) stage4-start - @[ -f $(HOST_SUBDIR)/zlib/Makefile ] && exit 0 || : ; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/zlib + test ! -f $(HOST_SUBDIR)/zlib/Makefile || exit 0; \ $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ echo Configuring stage 4 in $(HOST_SUBDIR)/zlib ; \ + $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/zlib ; \ cd $(HOST_SUBDIR)/zlib || exit 1; \ case $(srcdir) in \ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ @@ -25624,14 +26047,14 @@ configure-stage4-zlib: maybe-configure-stageprofile-zlib: @if zlib-bootstrap maybe-configure-stageprofile-zlib: configure-stageprofile-zlib -configure-stageprofile-zlib: +configure-stageprofile-zlib: @[ `cat stage_current` = stageprofile ] || $(MAKE) stageprofile-start - @[ -f $(HOST_SUBDIR)/zlib/Makefile ] && exit 0 || : ; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/zlib + test ! -f $(HOST_SUBDIR)/zlib/Makefile || exit 0; \ $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ echo Configuring stage profile in $(HOST_SUBDIR)/zlib ; \ + $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/zlib ; \ cd $(HOST_SUBDIR)/zlib || exit 1; \ case $(srcdir) in \ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ @@ -25649,14 +26072,14 @@ configure-stageprofile-zlib: maybe-configure-stagefeedback-zlib: @if zlib-bootstrap maybe-configure-stagefeedback-zlib: configure-stagefeedback-zlib -configure-stagefeedback-zlib: +configure-stagefeedback-zlib: @[ `cat stage_current` = stagefeedback ] || $(MAKE) stagefeedback-start - @[ -f $(HOST_SUBDIR)/zlib/Makefile ] && exit 0 || : ; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/zlib + test ! -f $(HOST_SUBDIR)/zlib/Makefile || exit 0; \ $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ echo Configuring stage feedback in $(HOST_SUBDIR)/zlib ; \ + $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/zlib ; \ cd $(HOST_SUBDIR)/zlib || exit 1; \ case $(srcdir) in \ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ @@ -25712,7 +26135,7 @@ clean-stage1: clean-stage1-zlib clean-stage1-zlib: @[ -f $(HOST_SUBDIR)/zlib/Makefile ] || [ -f $(HOST_SUBDIR)/stage1-zlib/Makefile ] \ || exit 0 ; \ - @[ `cat stage_current` = stage1 ] || $(MAKE) stage1-start + [ `cat stage_current` = stage1 ] || $(MAKE) stage1-start cd $(HOST_SUBDIR)/zlib && \ $(MAKE) $(FLAGS_TO_PASS) \ CFLAGS="$(STAGE1_CFLAGS)" clean @@ -25742,7 +26165,7 @@ clean-stage2: clean-stage2-zlib clean-stage2-zlib: @[ -f $(HOST_SUBDIR)/zlib/Makefile ] || [ -f $(HOST_SUBDIR)/stage2-zlib/Makefile ] \ || exit 0 ; \ - @[ `cat stage_current` = stage2 ] || $(MAKE) stage2-start + [ `cat stage_current` = stage2 ] || $(MAKE) stage2-start cd $(HOST_SUBDIR)/zlib && \ $(MAKE) $(FLAGS_TO_PASS) \ $(POSTSTAGE1_FLAGS_TO_PASS) \ @@ -25773,7 +26196,7 @@ clean-stage3: clean-stage3-zlib clean-stage3-zlib: @[ -f $(HOST_SUBDIR)/zlib/Makefile ] || [ -f $(HOST_SUBDIR)/stage3-zlib/Makefile ] \ || exit 0 ; \ - @[ `cat stage_current` = stage3 ] || $(MAKE) stage3-start + [ `cat stage_current` = stage3 ] || $(MAKE) stage3-start cd $(HOST_SUBDIR)/zlib && \ $(MAKE) $(FLAGS_TO_PASS) \ $(POSTSTAGE1_FLAGS_TO_PASS) \ @@ -25804,7 +26227,7 @@ clean-stage4: clean-stage4-zlib clean-stage4-zlib: @[ -f $(HOST_SUBDIR)/zlib/Makefile ] || [ -f $(HOST_SUBDIR)/stage4-zlib/Makefile ] \ || exit 0 ; \ - @[ `cat stage_current` = stage4 ] || $(MAKE) stage4-start + [ `cat stage_current` = stage4 ] || $(MAKE) stage4-start cd $(HOST_SUBDIR)/zlib && \ $(MAKE) $(FLAGS_TO_PASS) \ $(POSTSTAGE1_FLAGS_TO_PASS) \ @@ -25835,7 +26258,7 @@ clean-stageprofile: clean-stageprofile-zlib clean-stageprofile-zlib: @[ -f $(HOST_SUBDIR)/zlib/Makefile ] || [ -f $(HOST_SUBDIR)/stageprofile-zlib/Makefile ] \ || exit 0 ; \ - @[ `cat stage_current` = stageprofile ] || $(MAKE) stageprofile-start + [ `cat stage_current` = stageprofile ] || $(MAKE) stageprofile-start cd $(HOST_SUBDIR)/zlib && \ $(MAKE) $(FLAGS_TO_PASS) \ $(POSTSTAGE1_FLAGS_TO_PASS) \ @@ -25866,7 +26289,7 @@ clean-stagefeedback: clean-stagefeedback-zlib clean-stagefeedback-zlib: @[ -f $(HOST_SUBDIR)/zlib/Makefile ] || [ -f $(HOST_SUBDIR)/stagefeedback-zlib/Makefile ] \ || exit 0 ; \ - @[ `cat stage_current` = stagefeedback ] || $(MAKE) stagefeedback-start + [ `cat stage_current` = stagefeedback ] || $(MAKE) stagefeedback-start cd $(HOST_SUBDIR)/zlib && \ $(MAKE) $(FLAGS_TO_PASS) \ $(POSTSTAGE1_FLAGS_TO_PASS) \ @@ -26150,8 +26573,8 @@ maintainer-clean-zlib: maybe-configure-gdb: @if gdb maybe-configure-gdb: configure-gdb -configure-gdb: - @$(unstage) +configure-gdb: + @: $(MAKE); $(unstage) @test ! -f $(HOST_SUBDIR)/gdb/Makefile || exit 0; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gdb ; \ r=`${PWD_COMMAND}`; export r; \ @@ -26181,7 +26604,7 @@ maybe-all-gdb: TARGET-gdb=all maybe-all-gdb: all-gdb all-gdb: configure-gdb - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -26198,7 +26621,7 @@ maybe-check-gdb: maybe-check-gdb: check-gdb check-gdb: - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -26213,7 +26636,7 @@ maybe-install-gdb: maybe-install-gdb: install-gdb install-gdb: installdirs - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -26231,7 +26654,7 @@ maybe-info-gdb: info-gdb info-gdb: \ configure-gdb - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./gdb/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -26257,7 +26680,7 @@ maybe-dvi-gdb: dvi-gdb dvi-gdb: \ configure-gdb - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./gdb/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -26283,7 +26706,7 @@ maybe-html-gdb: html-gdb html-gdb: \ configure-gdb - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./gdb/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -26309,7 +26732,7 @@ maybe-TAGS-gdb: TAGS-gdb TAGS-gdb: \ configure-gdb - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./gdb/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -26336,7 +26759,7 @@ maybe-install-info-gdb: install-info-gdb install-info-gdb: \ configure-gdb \ info-gdb - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./gdb/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -26362,7 +26785,7 @@ maybe-installcheck-gdb: installcheck-gdb installcheck-gdb: \ configure-gdb - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./gdb/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -26387,7 +26810,7 @@ maybe-mostlyclean-gdb: maybe-mostlyclean-gdb: mostlyclean-gdb mostlyclean-gdb: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./gdb/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -26412,7 +26835,7 @@ maybe-clean-gdb: maybe-clean-gdb: clean-gdb clean-gdb: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./gdb/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -26437,7 +26860,7 @@ maybe-distclean-gdb: maybe-distclean-gdb: distclean-gdb distclean-gdb: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./gdb/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -26462,7 +26885,7 @@ maybe-maintainer-clean-gdb: maybe-maintainer-clean-gdb: maintainer-clean-gdb maintainer-clean-gdb: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./gdb/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -26487,8 +26910,8 @@ maintainer-clean-gdb: maybe-configure-expect: @if expect maybe-configure-expect: configure-expect -configure-expect: - @$(unstage) +configure-expect: + @: $(MAKE); $(unstage) @test ! -f $(HOST_SUBDIR)/expect/Makefile || exit 0; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/expect ; \ r=`${PWD_COMMAND}`; export r; \ @@ -26518,7 +26941,7 @@ maybe-all-expect: TARGET-expect=all maybe-all-expect: all-expect all-expect: configure-expect - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -26535,7 +26958,7 @@ maybe-check-expect: maybe-check-expect: check-expect check-expect: - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -26550,7 +26973,7 @@ maybe-install-expect: maybe-install-expect: install-expect install-expect: installdirs - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -26568,7 +26991,7 @@ maybe-info-expect: info-expect info-expect: \ configure-expect - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./expect/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -26594,7 +27017,7 @@ maybe-dvi-expect: dvi-expect dvi-expect: \ configure-expect - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./expect/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -26620,7 +27043,7 @@ maybe-html-expect: html-expect html-expect: \ configure-expect - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./expect/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -26646,7 +27069,7 @@ maybe-TAGS-expect: TAGS-expect TAGS-expect: \ configure-expect - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./expect/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -26673,7 +27096,7 @@ maybe-install-info-expect: install-info-expect install-info-expect: \ configure-expect \ info-expect - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./expect/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -26699,7 +27122,7 @@ maybe-installcheck-expect: installcheck-expect installcheck-expect: \ configure-expect - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./expect/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -26724,7 +27147,7 @@ maybe-mostlyclean-expect: maybe-mostlyclean-expect: mostlyclean-expect mostlyclean-expect: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./expect/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -26749,7 +27172,7 @@ maybe-clean-expect: maybe-clean-expect: clean-expect clean-expect: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./expect/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -26774,7 +27197,7 @@ maybe-distclean-expect: maybe-distclean-expect: distclean-expect distclean-expect: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./expect/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -26799,7 +27222,7 @@ maybe-maintainer-clean-expect: maybe-maintainer-clean-expect: maintainer-clean-expect maintainer-clean-expect: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./expect/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -26824,8 +27247,8 @@ maintainer-clean-expect: maybe-configure-guile: @if guile maybe-configure-guile: configure-guile -configure-guile: - @$(unstage) +configure-guile: + @: $(MAKE); $(unstage) @test ! -f $(HOST_SUBDIR)/guile/Makefile || exit 0; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/guile ; \ r=`${PWD_COMMAND}`; export r; \ @@ -26855,7 +27278,7 @@ maybe-all-guile: TARGET-guile=all maybe-all-guile: all-guile all-guile: configure-guile - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -26872,7 +27295,7 @@ maybe-check-guile: maybe-check-guile: check-guile check-guile: - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -26887,7 +27310,7 @@ maybe-install-guile: maybe-install-guile: install-guile install-guile: installdirs - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -26905,7 +27328,7 @@ maybe-info-guile: info-guile info-guile: \ configure-guile - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./guile/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -26931,7 +27354,7 @@ maybe-dvi-guile: dvi-guile dvi-guile: \ configure-guile - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./guile/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -26957,7 +27380,7 @@ maybe-html-guile: html-guile html-guile: \ configure-guile - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./guile/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -26983,7 +27406,7 @@ maybe-TAGS-guile: TAGS-guile TAGS-guile: \ configure-guile - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./guile/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -27010,7 +27433,7 @@ maybe-install-info-guile: install-info-guile install-info-guile: \ configure-guile \ info-guile - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./guile/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -27036,7 +27459,7 @@ maybe-installcheck-guile: installcheck-guile installcheck-guile: \ configure-guile - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./guile/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -27061,7 +27484,7 @@ maybe-mostlyclean-guile: maybe-mostlyclean-guile: mostlyclean-guile mostlyclean-guile: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./guile/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -27086,7 +27509,7 @@ maybe-clean-guile: maybe-clean-guile: clean-guile clean-guile: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./guile/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -27111,7 +27534,7 @@ maybe-distclean-guile: maybe-distclean-guile: distclean-guile distclean-guile: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./guile/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -27136,7 +27559,7 @@ maybe-maintainer-clean-guile: maybe-maintainer-clean-guile: maintainer-clean-guile maintainer-clean-guile: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./guile/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -27161,8 +27584,8 @@ maintainer-clean-guile: maybe-configure-tk: @if tk maybe-configure-tk: configure-tk -configure-tk: - @$(unstage) +configure-tk: + @: $(MAKE); $(unstage) @test ! -f $(HOST_SUBDIR)/tk/Makefile || exit 0; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/tk ; \ r=`${PWD_COMMAND}`; export r; \ @@ -27192,7 +27615,7 @@ maybe-all-tk: TARGET-tk=all maybe-all-tk: all-tk all-tk: configure-tk - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -27209,7 +27632,7 @@ maybe-check-tk: maybe-check-tk: check-tk check-tk: - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -27224,7 +27647,7 @@ maybe-install-tk: maybe-install-tk: install-tk install-tk: installdirs - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -27242,7 +27665,7 @@ maybe-info-tk: info-tk info-tk: \ configure-tk - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./tk/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -27268,7 +27691,7 @@ maybe-dvi-tk: dvi-tk dvi-tk: \ configure-tk - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./tk/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -27294,7 +27717,7 @@ maybe-html-tk: html-tk html-tk: \ configure-tk - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./tk/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -27320,7 +27743,7 @@ maybe-TAGS-tk: TAGS-tk TAGS-tk: \ configure-tk - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./tk/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -27347,7 +27770,7 @@ maybe-install-info-tk: install-info-tk install-info-tk: \ configure-tk \ info-tk - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./tk/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -27373,7 +27796,7 @@ maybe-installcheck-tk: installcheck-tk installcheck-tk: \ configure-tk - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./tk/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -27398,7 +27821,7 @@ maybe-mostlyclean-tk: maybe-mostlyclean-tk: mostlyclean-tk mostlyclean-tk: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./tk/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -27423,7 +27846,7 @@ maybe-clean-tk: maybe-clean-tk: clean-tk clean-tk: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./tk/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -27448,7 +27871,7 @@ maybe-distclean-tk: maybe-distclean-tk: distclean-tk distclean-tk: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./tk/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -27473,7 +27896,7 @@ maybe-maintainer-clean-tk: maybe-maintainer-clean-tk: maintainer-clean-tk maintainer-clean-tk: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./tk/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -27498,8 +27921,8 @@ maintainer-clean-tk: maybe-configure-libtermcap: @if libtermcap maybe-configure-libtermcap: configure-libtermcap -configure-libtermcap: - @$(unstage) +configure-libtermcap: + @: $(MAKE); $(unstage) @test ! -f $(HOST_SUBDIR)/libtermcap/Makefile || exit 0; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libtermcap ; \ r=`${PWD_COMMAND}`; export r; \ @@ -27529,7 +27952,7 @@ maybe-all-libtermcap: TARGET-libtermcap=all maybe-all-libtermcap: all-libtermcap all-libtermcap: configure-libtermcap - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -27555,7 +27978,7 @@ maybe-install-libtermcap: maybe-install-libtermcap: install-libtermcap install-libtermcap: installdirs - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -27573,7 +27996,7 @@ maybe-info-libtermcap: info-libtermcap info-libtermcap: \ configure-libtermcap - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./libtermcap/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -27599,7 +28022,7 @@ maybe-dvi-libtermcap: dvi-libtermcap dvi-libtermcap: \ configure-libtermcap - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./libtermcap/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -27625,7 +28048,7 @@ maybe-html-libtermcap: html-libtermcap html-libtermcap: \ configure-libtermcap - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./libtermcap/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -27651,7 +28074,7 @@ maybe-TAGS-libtermcap: TAGS-libtermcap TAGS-libtermcap: \ configure-libtermcap - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./libtermcap/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -27678,7 +28101,7 @@ maybe-install-info-libtermcap: install-info-libtermcap install-info-libtermcap: \ configure-libtermcap \ info-libtermcap - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./libtermcap/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -27704,7 +28127,7 @@ maybe-installcheck-libtermcap: installcheck-libtermcap installcheck-libtermcap: \ configure-libtermcap - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./libtermcap/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -27769,8 +28192,8 @@ maintainer-clean-libtermcap: maybe-configure-utils: @if utils maybe-configure-utils: configure-utils -configure-utils: - @$(unstage) +configure-utils: + @: $(MAKE); $(unstage) @test ! -f $(HOST_SUBDIR)/utils/Makefile || exit 0; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/utils ; \ r=`${PWD_COMMAND}`; export r; \ @@ -27800,7 +28223,7 @@ maybe-all-utils: TARGET-utils=all maybe-all-utils: all-utils all-utils: configure-utils - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -27826,7 +28249,7 @@ maybe-install-utils: maybe-install-utils: install-utils install-utils: installdirs - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -27844,7 +28267,7 @@ maybe-info-utils: info-utils info-utils: \ configure-utils - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./utils/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -27870,7 +28293,7 @@ maybe-dvi-utils: dvi-utils dvi-utils: \ configure-utils - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./utils/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -27896,7 +28319,7 @@ maybe-html-utils: html-utils html-utils: \ configure-utils - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./utils/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -27922,7 +28345,7 @@ maybe-TAGS-utils: TAGS-utils TAGS-utils: \ configure-utils - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./utils/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -27949,7 +28372,7 @@ maybe-install-info-utils: install-info-utils install-info-utils: \ configure-utils \ info-utils - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./utils/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -27975,7 +28398,7 @@ maybe-installcheck-utils: installcheck-utils installcheck-utils: \ configure-utils - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./utils/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -28000,7 +28423,7 @@ maybe-mostlyclean-utils: maybe-mostlyclean-utils: mostlyclean-utils mostlyclean-utils: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./utils/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -28025,7 +28448,7 @@ maybe-clean-utils: maybe-clean-utils: clean-utils clean-utils: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./utils/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -28050,7 +28473,7 @@ maybe-distclean-utils: maybe-distclean-utils: distclean-utils distclean-utils: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./utils/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -28075,7 +28498,7 @@ maybe-maintainer-clean-utils: maybe-maintainer-clean-utils: maintainer-clean-utils maintainer-clean-utils: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./utils/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -28100,8 +28523,8 @@ maintainer-clean-utils: maybe-configure-gnattools: @if gnattools maybe-configure-gnattools: configure-gnattools -configure-gnattools: - @$(unstage) +configure-gnattools: + @: $(MAKE); $(unstage) @test ! -f $(HOST_SUBDIR)/gnattools/Makefile || exit 0; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gnattools ; \ r=`${PWD_COMMAND}`; export r; \ @@ -28131,7 +28554,7 @@ maybe-all-gnattools: TARGET-gnattools=all maybe-all-gnattools: all-gnattools all-gnattools: configure-gnattools - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -28148,7 +28571,7 @@ maybe-check-gnattools: maybe-check-gnattools: check-gnattools check-gnattools: - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -28163,7 +28586,7 @@ maybe-install-gnattools: maybe-install-gnattools: install-gnattools install-gnattools: installdirs - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -28181,7 +28604,7 @@ maybe-info-gnattools: info-gnattools info-gnattools: \ configure-gnattools - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./gnattools/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -28207,7 +28630,7 @@ maybe-dvi-gnattools: dvi-gnattools dvi-gnattools: \ configure-gnattools - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./gnattools/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -28233,7 +28656,7 @@ maybe-html-gnattools: html-gnattools html-gnattools: \ configure-gnattools - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./gnattools/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -28259,7 +28682,7 @@ maybe-TAGS-gnattools: TAGS-gnattools TAGS-gnattools: \ configure-gnattools - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./gnattools/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -28286,7 +28709,7 @@ maybe-install-info-gnattools: install-info-gnattools install-info-gnattools: \ configure-gnattools \ info-gnattools - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./gnattools/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -28312,7 +28735,7 @@ maybe-installcheck-gnattools: installcheck-gnattools installcheck-gnattools: \ configure-gnattools - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./gnattools/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -28337,7 +28760,7 @@ maybe-mostlyclean-gnattools: maybe-mostlyclean-gnattools: mostlyclean-gnattools mostlyclean-gnattools: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./gnattools/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -28362,7 +28785,7 @@ maybe-clean-gnattools: maybe-clean-gnattools: clean-gnattools clean-gnattools: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./gnattools/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -28387,7 +28810,7 @@ maybe-distclean-gnattools: maybe-distclean-gnattools: distclean-gnattools distclean-gnattools: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./gnattools/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -28412,7 +28835,7 @@ maybe-maintainer-clean-gnattools: maybe-maintainer-clean-gnattools: maintainer-clean-gnattools maintainer-clean-gnattools: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f ./gnattools/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -28438,22 +28861,29 @@ maintainer-clean-gnattools: # --------------------------------------- -# There's only one multilib.out. Cleverer subdirs shouldn't need it copied. -@if target-libstdc++-v3 -$(TARGET_SUBDIR)/libstdc++-v3/multilib.out: multilib.out - $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libstdc++-v3 ; \ - rm -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile || : ; \ - cp multilib.out $(TARGET_SUBDIR)/libstdc++-v3/multilib.out -@endif target-libstdc++-v3 - .PHONY: configure-target-libstdc++-v3 maybe-configure-target-libstdc++-v3 maybe-configure-target-libstdc++-v3: @if target-libstdc++-v3 maybe-configure-target-libstdc++-v3: configure-target-libstdc++-v3 -configure-target-libstdc++-v3: $(TARGET_SUBDIR)/libstdc++-v3/multilib.out - @$(unstage) +configure-target-libstdc++-v3: + @: $(MAKE); $(unstage) + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + echo "Checking multilib configuration for libstdc++-v3..."; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libstdc++-v3 ; \ + $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libstdc++-v3/multilib.tmp 2> /dev/null ; \ + if test -r $(TARGET_SUBDIR)/libstdc++-v3/multilib.out; then \ + if cmp -s $(TARGET_SUBDIR)/libstdc++-v3/multilib.tmp $(TARGET_SUBDIR)/libstdc++-v3/multilib.out; then \ + rm -f $(TARGET_SUBDIR)/libstdc++-v3/multilib.tmp; \ + else \ + rm -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile; \ + mv $(TARGET_SUBDIR)/libstdc++-v3/multilib.tmp $(TARGET_SUBDIR)/libstdc++-v3/multilib.out; \ + fi; \ + else \ + mv $(TARGET_SUBDIR)/libstdc++-v3/multilib.tmp $(TARGET_SUBDIR)/libstdc++-v3/multilib.out; \ + fi @test ! -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile || exit 0; \ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libstdc++-v3 ; \ r=`${PWD_COMMAND}`; export r; \ @@ -28484,7 +28914,7 @@ maybe-all-target-libstdc++-v3: TARGET-target-libstdc++-v3=all maybe-all-target-libstdc++-v3: all-target-libstdc++-v3 all-target-libstdc++-v3: configure-target-libstdc++-v3 - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(RAW_CXX_TARGET_EXPORTS) \ @@ -28502,7 +28932,7 @@ maybe-check-target-libstdc++-v3: maybe-check-target-libstdc++-v3: check-target-libstdc++-v3 check-target-libstdc++-v3: - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(RAW_CXX_TARGET_EXPORTS) \ @@ -28517,7 +28947,7 @@ maybe-install-target-libstdc++-v3: maybe-install-target-libstdc++-v3: install-target-libstdc++-v3 install-target-libstdc++-v3: installdirs - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(RAW_CXX_TARGET_EXPORTS) \ @@ -28535,7 +28965,7 @@ maybe-info-target-libstdc++-v3: info-target-libstdc++-v3 info-target-libstdc++-v3: \ configure-target-libstdc++-v3 - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -28561,7 +28991,7 @@ maybe-dvi-target-libstdc++-v3: dvi-target-libstdc++-v3 dvi-target-libstdc++-v3: \ configure-target-libstdc++-v3 - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -28587,7 +29017,7 @@ maybe-html-target-libstdc++-v3: html-target-libstdc++-v3 html-target-libstdc++-v3: \ configure-target-libstdc++-v3 - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -28613,7 +29043,7 @@ maybe-TAGS-target-libstdc++-v3: TAGS-target-libstdc++-v3 TAGS-target-libstdc++-v3: \ configure-target-libstdc++-v3 - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -28640,7 +29070,7 @@ maybe-install-info-target-libstdc++-v3: install-info-target-libstdc++-v3 install-info-target-libstdc++-v3: \ configure-target-libstdc++-v3 \ info-target-libstdc++-v3 - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -28666,7 +29096,7 @@ maybe-installcheck-target-libstdc++-v3: installcheck-target-libstdc++-v3 installcheck-target-libstdc++-v3: \ configure-target-libstdc++-v3 - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -28691,7 +29121,7 @@ maybe-mostlyclean-target-libstdc++-v3: maybe-mostlyclean-target-libstdc++-v3: mostlyclean-target-libstdc++-v3 mostlyclean-target-libstdc++-v3: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -28716,7 +29146,7 @@ maybe-clean-target-libstdc++-v3: maybe-clean-target-libstdc++-v3: clean-target-libstdc++-v3 clean-target-libstdc++-v3: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -28741,7 +29171,7 @@ maybe-distclean-target-libstdc++-v3: maybe-distclean-target-libstdc++-v3: distclean-target-libstdc++-v3 distclean-target-libstdc++-v3: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -28766,7 +29196,7 @@ maybe-maintainer-clean-target-libstdc++-v3: maybe-maintainer-clean-target-libstdc++-v3: maintainer-clean-target-libstdc++-v3 maintainer-clean-target-libstdc++-v3: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -28787,22 +29217,29 @@ maintainer-clean-target-libstdc++-v3: -# There's only one multilib.out. Cleverer subdirs shouldn't need it copied. -@if target-libmudflap -$(TARGET_SUBDIR)/libmudflap/multilib.out: multilib.out - $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libmudflap ; \ - rm -f $(TARGET_SUBDIR)/libmudflap/Makefile || : ; \ - cp multilib.out $(TARGET_SUBDIR)/libmudflap/multilib.out -@endif target-libmudflap - .PHONY: configure-target-libmudflap maybe-configure-target-libmudflap maybe-configure-target-libmudflap: @if target-libmudflap maybe-configure-target-libmudflap: configure-target-libmudflap -configure-target-libmudflap: $(TARGET_SUBDIR)/libmudflap/multilib.out - @$(unstage) +configure-target-libmudflap: + @: $(MAKE); $(unstage) + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + echo "Checking multilib configuration for libmudflap..."; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libmudflap ; \ + $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libmudflap/multilib.tmp 2> /dev/null ; \ + if test -r $(TARGET_SUBDIR)/libmudflap/multilib.out; then \ + if cmp -s $(TARGET_SUBDIR)/libmudflap/multilib.tmp $(TARGET_SUBDIR)/libmudflap/multilib.out; then \ + rm -f $(TARGET_SUBDIR)/libmudflap/multilib.tmp; \ + else \ + rm -f $(TARGET_SUBDIR)/libmudflap/Makefile; \ + mv $(TARGET_SUBDIR)/libmudflap/multilib.tmp $(TARGET_SUBDIR)/libmudflap/multilib.out; \ + fi; \ + else \ + mv $(TARGET_SUBDIR)/libmudflap/multilib.tmp $(TARGET_SUBDIR)/libmudflap/multilib.out; \ + fi @test ! -f $(TARGET_SUBDIR)/libmudflap/Makefile || exit 0; \ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libmudflap ; \ r=`${PWD_COMMAND}`; export r; \ @@ -28833,7 +29270,7 @@ maybe-all-target-libmudflap: TARGET-target-libmudflap=all maybe-all-target-libmudflap: all-target-libmudflap all-target-libmudflap: configure-target-libmudflap - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(NORMAL_TARGET_EXPORTS) \ @@ -28851,7 +29288,7 @@ maybe-check-target-libmudflap: maybe-check-target-libmudflap: check-target-libmudflap check-target-libmudflap: - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(NORMAL_TARGET_EXPORTS) \ @@ -28866,7 +29303,7 @@ maybe-install-target-libmudflap: maybe-install-target-libmudflap: install-target-libmudflap install-target-libmudflap: installdirs - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(NORMAL_TARGET_EXPORTS) \ @@ -28884,7 +29321,7 @@ maybe-info-target-libmudflap: info-target-libmudflap info-target-libmudflap: \ configure-target-libmudflap - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/libmudflap/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -28910,7 +29347,7 @@ maybe-dvi-target-libmudflap: dvi-target-libmudflap dvi-target-libmudflap: \ configure-target-libmudflap - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/libmudflap/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -28936,7 +29373,7 @@ maybe-html-target-libmudflap: html-target-libmudflap html-target-libmudflap: \ configure-target-libmudflap - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/libmudflap/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -28962,7 +29399,7 @@ maybe-TAGS-target-libmudflap: TAGS-target-libmudflap TAGS-target-libmudflap: \ configure-target-libmudflap - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/libmudflap/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -28989,7 +29426,7 @@ maybe-install-info-target-libmudflap: install-info-target-libmudflap install-info-target-libmudflap: \ configure-target-libmudflap \ info-target-libmudflap - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/libmudflap/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -29015,7 +29452,7 @@ maybe-installcheck-target-libmudflap: installcheck-target-libmudflap installcheck-target-libmudflap: \ configure-target-libmudflap - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/libmudflap/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -29040,7 +29477,7 @@ maybe-mostlyclean-target-libmudflap: maybe-mostlyclean-target-libmudflap: mostlyclean-target-libmudflap mostlyclean-target-libmudflap: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/libmudflap/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -29065,7 +29502,7 @@ maybe-clean-target-libmudflap: maybe-clean-target-libmudflap: clean-target-libmudflap clean-target-libmudflap: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/libmudflap/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -29090,7 +29527,7 @@ maybe-distclean-target-libmudflap: maybe-distclean-target-libmudflap: distclean-target-libmudflap distclean-target-libmudflap: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/libmudflap/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -29115,7 +29552,7 @@ maybe-maintainer-clean-target-libmudflap: maybe-maintainer-clean-target-libmudflap: maintainer-clean-target-libmudflap maintainer-clean-target-libmudflap: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/libmudflap/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -29136,22 +29573,29 @@ maintainer-clean-target-libmudflap: -# There's only one multilib.out. Cleverer subdirs shouldn't need it copied. -@if target-libssp -$(TARGET_SUBDIR)/libssp/multilib.out: multilib.out - $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libssp ; \ - rm -f $(TARGET_SUBDIR)/libssp/Makefile || : ; \ - cp multilib.out $(TARGET_SUBDIR)/libssp/multilib.out -@endif target-libssp - .PHONY: configure-target-libssp maybe-configure-target-libssp maybe-configure-target-libssp: @if target-libssp maybe-configure-target-libssp: configure-target-libssp -configure-target-libssp: $(TARGET_SUBDIR)/libssp/multilib.out - @$(unstage) +configure-target-libssp: + @: $(MAKE); $(unstage) + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + echo "Checking multilib configuration for libssp..."; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libssp ; \ + $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libssp/multilib.tmp 2> /dev/null ; \ + if test -r $(TARGET_SUBDIR)/libssp/multilib.out; then \ + if cmp -s $(TARGET_SUBDIR)/libssp/multilib.tmp $(TARGET_SUBDIR)/libssp/multilib.out; then \ + rm -f $(TARGET_SUBDIR)/libssp/multilib.tmp; \ + else \ + rm -f $(TARGET_SUBDIR)/libssp/Makefile; \ + mv $(TARGET_SUBDIR)/libssp/multilib.tmp $(TARGET_SUBDIR)/libssp/multilib.out; \ + fi; \ + else \ + mv $(TARGET_SUBDIR)/libssp/multilib.tmp $(TARGET_SUBDIR)/libssp/multilib.out; \ + fi @test ! -f $(TARGET_SUBDIR)/libssp/Makefile || exit 0; \ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libssp ; \ r=`${PWD_COMMAND}`; export r; \ @@ -29182,7 +29626,7 @@ maybe-all-target-libssp: TARGET-target-libssp=all maybe-all-target-libssp: all-target-libssp all-target-libssp: configure-target-libssp - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(NORMAL_TARGET_EXPORTS) \ @@ -29200,7 +29644,7 @@ maybe-check-target-libssp: maybe-check-target-libssp: check-target-libssp check-target-libssp: - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(NORMAL_TARGET_EXPORTS) \ @@ -29215,7 +29659,7 @@ maybe-install-target-libssp: maybe-install-target-libssp: install-target-libssp install-target-libssp: installdirs - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(NORMAL_TARGET_EXPORTS) \ @@ -29233,7 +29677,7 @@ maybe-info-target-libssp: info-target-libssp info-target-libssp: \ configure-target-libssp - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/libssp/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -29259,7 +29703,7 @@ maybe-dvi-target-libssp: dvi-target-libssp dvi-target-libssp: \ configure-target-libssp - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/libssp/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -29285,7 +29729,7 @@ maybe-html-target-libssp: html-target-libssp html-target-libssp: \ configure-target-libssp - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/libssp/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -29311,7 +29755,7 @@ maybe-TAGS-target-libssp: TAGS-target-libssp TAGS-target-libssp: \ configure-target-libssp - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/libssp/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -29338,7 +29782,7 @@ maybe-install-info-target-libssp: install-info-target-libssp install-info-target-libssp: \ configure-target-libssp \ info-target-libssp - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/libssp/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -29364,7 +29808,7 @@ maybe-installcheck-target-libssp: installcheck-target-libssp installcheck-target-libssp: \ configure-target-libssp - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/libssp/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -29389,7 +29833,7 @@ maybe-mostlyclean-target-libssp: maybe-mostlyclean-target-libssp: mostlyclean-target-libssp mostlyclean-target-libssp: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/libssp/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -29414,7 +29858,7 @@ maybe-clean-target-libssp: maybe-clean-target-libssp: clean-target-libssp clean-target-libssp: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/libssp/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -29439,7 +29883,7 @@ maybe-distclean-target-libssp: maybe-distclean-target-libssp: distclean-target-libssp distclean-target-libssp: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/libssp/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -29464,7 +29908,7 @@ maybe-maintainer-clean-target-libssp: maybe-maintainer-clean-target-libssp: maintainer-clean-target-libssp maintainer-clean-target-libssp: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/libssp/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -29485,22 +29929,29 @@ maintainer-clean-target-libssp: -# There's only one multilib.out. Cleverer subdirs shouldn't need it copied. -@if target-newlib -$(TARGET_SUBDIR)/newlib/multilib.out: multilib.out - $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/newlib ; \ - rm -f $(TARGET_SUBDIR)/newlib/Makefile || : ; \ - cp multilib.out $(TARGET_SUBDIR)/newlib/multilib.out -@endif target-newlib - .PHONY: configure-target-newlib maybe-configure-target-newlib maybe-configure-target-newlib: @if target-newlib maybe-configure-target-newlib: configure-target-newlib -configure-target-newlib: $(TARGET_SUBDIR)/newlib/multilib.out - @$(unstage) +configure-target-newlib: + @: $(MAKE); $(unstage) + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + echo "Checking multilib configuration for newlib..."; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/newlib ; \ + $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/newlib/multilib.tmp 2> /dev/null ; \ + if test -r $(TARGET_SUBDIR)/newlib/multilib.out; then \ + if cmp -s $(TARGET_SUBDIR)/newlib/multilib.tmp $(TARGET_SUBDIR)/newlib/multilib.out; then \ + rm -f $(TARGET_SUBDIR)/newlib/multilib.tmp; \ + else \ + rm -f $(TARGET_SUBDIR)/newlib/Makefile; \ + mv $(TARGET_SUBDIR)/newlib/multilib.tmp $(TARGET_SUBDIR)/newlib/multilib.out; \ + fi; \ + else \ + mv $(TARGET_SUBDIR)/newlib/multilib.tmp $(TARGET_SUBDIR)/newlib/multilib.out; \ + fi @test ! -f $(TARGET_SUBDIR)/newlib/Makefile || exit 0; \ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/newlib ; \ r=`${PWD_COMMAND}`; export r; \ @@ -29531,7 +29982,7 @@ maybe-all-target-newlib: TARGET-target-newlib=all maybe-all-target-newlib: all-target-newlib all-target-newlib: configure-target-newlib - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(NORMAL_TARGET_EXPORTS) \ @@ -29549,7 +30000,7 @@ maybe-check-target-newlib: maybe-check-target-newlib: check-target-newlib check-target-newlib: - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(NORMAL_TARGET_EXPORTS) \ @@ -29564,7 +30015,7 @@ maybe-install-target-newlib: maybe-install-target-newlib: install-target-newlib install-target-newlib: installdirs - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(NORMAL_TARGET_EXPORTS) \ @@ -29582,7 +30033,7 @@ maybe-info-target-newlib: info-target-newlib info-target-newlib: \ configure-target-newlib - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -29608,7 +30059,7 @@ maybe-dvi-target-newlib: dvi-target-newlib dvi-target-newlib: \ configure-target-newlib - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -29634,7 +30085,7 @@ maybe-html-target-newlib: html-target-newlib html-target-newlib: \ configure-target-newlib - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -29660,7 +30111,7 @@ maybe-TAGS-target-newlib: TAGS-target-newlib TAGS-target-newlib: \ configure-target-newlib - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -29687,7 +30138,7 @@ maybe-install-info-target-newlib: install-info-target-newlib install-info-target-newlib: \ configure-target-newlib \ info-target-newlib - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -29713,7 +30164,7 @@ maybe-installcheck-target-newlib: installcheck-target-newlib installcheck-target-newlib: \ configure-target-newlib - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -29738,7 +30189,7 @@ maybe-mostlyclean-target-newlib: maybe-mostlyclean-target-newlib: mostlyclean-target-newlib mostlyclean-target-newlib: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -29763,7 +30214,7 @@ maybe-clean-target-newlib: maybe-clean-target-newlib: clean-target-newlib clean-target-newlib: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -29788,7 +30239,7 @@ maybe-distclean-target-newlib: maybe-distclean-target-newlib: distclean-target-newlib distclean-target-newlib: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -29813,7 +30264,7 @@ maybe-maintainer-clean-target-newlib: maybe-maintainer-clean-target-newlib: maintainer-clean-target-newlib maintainer-clean-target-newlib: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -29834,22 +30285,29 @@ maintainer-clean-target-newlib: -# There's only one multilib.out. Cleverer subdirs shouldn't need it copied. -@if target-libgfortran -$(TARGET_SUBDIR)/libgfortran/multilib.out: multilib.out - $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgfortran ; \ - rm -f $(TARGET_SUBDIR)/libgfortran/Makefile || : ; \ - cp multilib.out $(TARGET_SUBDIR)/libgfortran/multilib.out -@endif target-libgfortran - .PHONY: configure-target-libgfortran maybe-configure-target-libgfortran maybe-configure-target-libgfortran: @if target-libgfortran maybe-configure-target-libgfortran: configure-target-libgfortran -configure-target-libgfortran: $(TARGET_SUBDIR)/libgfortran/multilib.out - @$(unstage) +configure-target-libgfortran: + @: $(MAKE); $(unstage) + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + echo "Checking multilib configuration for libgfortran..."; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgfortran ; \ + $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libgfortran/multilib.tmp 2> /dev/null ; \ + if test -r $(TARGET_SUBDIR)/libgfortran/multilib.out; then \ + if cmp -s $(TARGET_SUBDIR)/libgfortran/multilib.tmp $(TARGET_SUBDIR)/libgfortran/multilib.out; then \ + rm -f $(TARGET_SUBDIR)/libgfortran/multilib.tmp; \ + else \ + rm -f $(TARGET_SUBDIR)/libgfortran/Makefile; \ + mv $(TARGET_SUBDIR)/libgfortran/multilib.tmp $(TARGET_SUBDIR)/libgfortran/multilib.out; \ + fi; \ + else \ + mv $(TARGET_SUBDIR)/libgfortran/multilib.tmp $(TARGET_SUBDIR)/libgfortran/multilib.out; \ + fi @test ! -f $(TARGET_SUBDIR)/libgfortran/Makefile || exit 0; \ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgfortran ; \ r=`${PWD_COMMAND}`; export r; \ @@ -29880,7 +30338,7 @@ maybe-all-target-libgfortran: TARGET-target-libgfortran=all maybe-all-target-libgfortran: all-target-libgfortran all-target-libgfortran: configure-target-libgfortran - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(NORMAL_TARGET_EXPORTS) \ @@ -29898,7 +30356,7 @@ maybe-check-target-libgfortran: maybe-check-target-libgfortran: check-target-libgfortran check-target-libgfortran: - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(NORMAL_TARGET_EXPORTS) \ @@ -29913,7 +30371,7 @@ maybe-install-target-libgfortran: maybe-install-target-libgfortran: install-target-libgfortran install-target-libgfortran: installdirs - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(NORMAL_TARGET_EXPORTS) \ @@ -29931,7 +30389,7 @@ maybe-info-target-libgfortran: info-target-libgfortran info-target-libgfortran: \ configure-target-libgfortran - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/libgfortran/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -29957,7 +30415,7 @@ maybe-dvi-target-libgfortran: dvi-target-libgfortran dvi-target-libgfortran: \ configure-target-libgfortran - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/libgfortran/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -29983,7 +30441,7 @@ maybe-html-target-libgfortran: html-target-libgfortran html-target-libgfortran: \ configure-target-libgfortran - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/libgfortran/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -30009,7 +30467,7 @@ maybe-TAGS-target-libgfortran: TAGS-target-libgfortran TAGS-target-libgfortran: \ configure-target-libgfortran - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/libgfortran/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -30036,7 +30494,7 @@ maybe-install-info-target-libgfortran: install-info-target-libgfortran install-info-target-libgfortran: \ configure-target-libgfortran \ info-target-libgfortran - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/libgfortran/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -30062,7 +30520,7 @@ maybe-installcheck-target-libgfortran: installcheck-target-libgfortran installcheck-target-libgfortran: \ configure-target-libgfortran - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/libgfortran/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -30087,7 +30545,7 @@ maybe-mostlyclean-target-libgfortran: maybe-mostlyclean-target-libgfortran: mostlyclean-target-libgfortran mostlyclean-target-libgfortran: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/libgfortran/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -30112,7 +30570,7 @@ maybe-clean-target-libgfortran: maybe-clean-target-libgfortran: clean-target-libgfortran clean-target-libgfortran: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/libgfortran/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -30137,7 +30595,7 @@ maybe-distclean-target-libgfortran: maybe-distclean-target-libgfortran: distclean-target-libgfortran distclean-target-libgfortran: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/libgfortran/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -30162,7 +30620,7 @@ maybe-maintainer-clean-target-libgfortran: maybe-maintainer-clean-target-libgfortran: maintainer-clean-target-libgfortran maintainer-clean-target-libgfortran: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/libgfortran/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -30183,22 +30641,29 @@ maintainer-clean-target-libgfortran: -# There's only one multilib.out. Cleverer subdirs shouldn't need it copied. -@if target-libobjc -$(TARGET_SUBDIR)/libobjc/multilib.out: multilib.out - $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libobjc ; \ - rm -f $(TARGET_SUBDIR)/libobjc/Makefile || : ; \ - cp multilib.out $(TARGET_SUBDIR)/libobjc/multilib.out -@endif target-libobjc - .PHONY: configure-target-libobjc maybe-configure-target-libobjc maybe-configure-target-libobjc: @if target-libobjc maybe-configure-target-libobjc: configure-target-libobjc -configure-target-libobjc: $(TARGET_SUBDIR)/libobjc/multilib.out - @$(unstage) +configure-target-libobjc: + @: $(MAKE); $(unstage) + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + echo "Checking multilib configuration for libobjc..."; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libobjc ; \ + $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libobjc/multilib.tmp 2> /dev/null ; \ + if test -r $(TARGET_SUBDIR)/libobjc/multilib.out; then \ + if cmp -s $(TARGET_SUBDIR)/libobjc/multilib.tmp $(TARGET_SUBDIR)/libobjc/multilib.out; then \ + rm -f $(TARGET_SUBDIR)/libobjc/multilib.tmp; \ + else \ + rm -f $(TARGET_SUBDIR)/libobjc/Makefile; \ + mv $(TARGET_SUBDIR)/libobjc/multilib.tmp $(TARGET_SUBDIR)/libobjc/multilib.out; \ + fi; \ + else \ + mv $(TARGET_SUBDIR)/libobjc/multilib.tmp $(TARGET_SUBDIR)/libobjc/multilib.out; \ + fi @test ! -f $(TARGET_SUBDIR)/libobjc/Makefile || exit 0; \ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libobjc ; \ r=`${PWD_COMMAND}`; export r; \ @@ -30229,7 +30694,7 @@ maybe-all-target-libobjc: TARGET-target-libobjc=all maybe-all-target-libobjc: all-target-libobjc all-target-libobjc: configure-target-libobjc - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(NORMAL_TARGET_EXPORTS) \ @@ -30247,7 +30712,7 @@ maybe-check-target-libobjc: maybe-check-target-libobjc: check-target-libobjc check-target-libobjc: - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(NORMAL_TARGET_EXPORTS) \ @@ -30262,7 +30727,7 @@ maybe-install-target-libobjc: maybe-install-target-libobjc: install-target-libobjc install-target-libobjc: installdirs - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(NORMAL_TARGET_EXPORTS) \ @@ -30280,7 +30745,7 @@ maybe-info-target-libobjc: info-target-libobjc info-target-libobjc: \ configure-target-libobjc - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -30306,7 +30771,7 @@ maybe-dvi-target-libobjc: dvi-target-libobjc dvi-target-libobjc: \ configure-target-libobjc - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -30332,7 +30797,7 @@ maybe-html-target-libobjc: html-target-libobjc html-target-libobjc: \ configure-target-libobjc - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -30358,7 +30823,7 @@ maybe-TAGS-target-libobjc: TAGS-target-libobjc TAGS-target-libobjc: \ configure-target-libobjc - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -30385,7 +30850,7 @@ maybe-install-info-target-libobjc: install-info-target-libobjc install-info-target-libobjc: \ configure-target-libobjc \ info-target-libobjc - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -30411,7 +30876,7 @@ maybe-installcheck-target-libobjc: installcheck-target-libobjc installcheck-target-libobjc: \ configure-target-libobjc - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -30436,7 +30901,7 @@ maybe-mostlyclean-target-libobjc: maybe-mostlyclean-target-libobjc: mostlyclean-target-libobjc mostlyclean-target-libobjc: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -30461,7 +30926,7 @@ maybe-clean-target-libobjc: maybe-clean-target-libobjc: clean-target-libobjc clean-target-libobjc: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -30486,7 +30951,7 @@ maybe-distclean-target-libobjc: maybe-distclean-target-libobjc: distclean-target-libobjc distclean-target-libobjc: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -30511,7 +30976,7 @@ maybe-maintainer-clean-target-libobjc: maybe-maintainer-clean-target-libobjc: maintainer-clean-target-libobjc maintainer-clean-target-libobjc: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -30532,22 +30997,29 @@ maintainer-clean-target-libobjc: -# There's only one multilib.out. Cleverer subdirs shouldn't need it copied. -@if target-libtermcap -$(TARGET_SUBDIR)/libtermcap/multilib.out: multilib.out - $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libtermcap ; \ - rm -f $(TARGET_SUBDIR)/libtermcap/Makefile || : ; \ - cp multilib.out $(TARGET_SUBDIR)/libtermcap/multilib.out -@endif target-libtermcap - .PHONY: configure-target-libtermcap maybe-configure-target-libtermcap maybe-configure-target-libtermcap: @if target-libtermcap maybe-configure-target-libtermcap: configure-target-libtermcap -configure-target-libtermcap: $(TARGET_SUBDIR)/libtermcap/multilib.out - @$(unstage) +configure-target-libtermcap: + @: $(MAKE); $(unstage) + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + echo "Checking multilib configuration for libtermcap..."; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libtermcap ; \ + $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libtermcap/multilib.tmp 2> /dev/null ; \ + if test -r $(TARGET_SUBDIR)/libtermcap/multilib.out; then \ + if cmp -s $(TARGET_SUBDIR)/libtermcap/multilib.tmp $(TARGET_SUBDIR)/libtermcap/multilib.out; then \ + rm -f $(TARGET_SUBDIR)/libtermcap/multilib.tmp; \ + else \ + rm -f $(TARGET_SUBDIR)/libtermcap/Makefile; \ + mv $(TARGET_SUBDIR)/libtermcap/multilib.tmp $(TARGET_SUBDIR)/libtermcap/multilib.out; \ + fi; \ + else \ + mv $(TARGET_SUBDIR)/libtermcap/multilib.tmp $(TARGET_SUBDIR)/libtermcap/multilib.out; \ + fi @test ! -f $(TARGET_SUBDIR)/libtermcap/Makefile || exit 0; \ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libtermcap ; \ r=`${PWD_COMMAND}`; export r; \ @@ -30578,7 +31050,7 @@ maybe-all-target-libtermcap: TARGET-target-libtermcap=all maybe-all-target-libtermcap: all-target-libtermcap all-target-libtermcap: configure-target-libtermcap - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(NORMAL_TARGET_EXPORTS) \ @@ -30606,7 +31078,7 @@ maybe-install-target-libtermcap: maybe-install-target-libtermcap: install-target-libtermcap install-target-libtermcap: installdirs - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(NORMAL_TARGET_EXPORTS) \ @@ -30624,7 +31096,7 @@ maybe-info-target-libtermcap: info-target-libtermcap info-target-libtermcap: \ configure-target-libtermcap - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/libtermcap/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -30650,7 +31122,7 @@ maybe-dvi-target-libtermcap: dvi-target-libtermcap dvi-target-libtermcap: \ configure-target-libtermcap - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/libtermcap/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -30676,7 +31148,7 @@ maybe-html-target-libtermcap: html-target-libtermcap html-target-libtermcap: \ configure-target-libtermcap - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/libtermcap/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -30702,7 +31174,7 @@ maybe-TAGS-target-libtermcap: TAGS-target-libtermcap TAGS-target-libtermcap: \ configure-target-libtermcap - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/libtermcap/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -30729,7 +31201,7 @@ maybe-install-info-target-libtermcap: install-info-target-libtermcap install-info-target-libtermcap: \ configure-target-libtermcap \ info-target-libtermcap - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/libtermcap/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -30755,7 +31227,7 @@ maybe-installcheck-target-libtermcap: installcheck-target-libtermcap installcheck-target-libtermcap: \ configure-target-libtermcap - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/libtermcap/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -30816,22 +31288,29 @@ maintainer-clean-target-libtermcap: -# There's only one multilib.out. Cleverer subdirs shouldn't need it copied. -@if target-winsup -$(TARGET_SUBDIR)/winsup/multilib.out: multilib.out - $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/winsup ; \ - rm -f $(TARGET_SUBDIR)/winsup/Makefile || : ; \ - cp multilib.out $(TARGET_SUBDIR)/winsup/multilib.out -@endif target-winsup - .PHONY: configure-target-winsup maybe-configure-target-winsup maybe-configure-target-winsup: @if target-winsup maybe-configure-target-winsup: configure-target-winsup -configure-target-winsup: $(TARGET_SUBDIR)/winsup/multilib.out - @$(unstage) +configure-target-winsup: + @: $(MAKE); $(unstage) + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + echo "Checking multilib configuration for winsup..."; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/winsup ; \ + $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/winsup/multilib.tmp 2> /dev/null ; \ + if test -r $(TARGET_SUBDIR)/winsup/multilib.out; then \ + if cmp -s $(TARGET_SUBDIR)/winsup/multilib.tmp $(TARGET_SUBDIR)/winsup/multilib.out; then \ + rm -f $(TARGET_SUBDIR)/winsup/multilib.tmp; \ + else \ + rm -f $(TARGET_SUBDIR)/winsup/Makefile; \ + mv $(TARGET_SUBDIR)/winsup/multilib.tmp $(TARGET_SUBDIR)/winsup/multilib.out; \ + fi; \ + else \ + mv $(TARGET_SUBDIR)/winsup/multilib.tmp $(TARGET_SUBDIR)/winsup/multilib.out; \ + fi @test ! -f $(TARGET_SUBDIR)/winsup/Makefile || exit 0; \ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/winsup ; \ r=`${PWD_COMMAND}`; export r; \ @@ -30862,7 +31341,7 @@ maybe-all-target-winsup: TARGET-target-winsup=all maybe-all-target-winsup: all-target-winsup all-target-winsup: configure-target-winsup - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(NORMAL_TARGET_EXPORTS) \ @@ -30880,7 +31359,7 @@ maybe-check-target-winsup: maybe-check-target-winsup: check-target-winsup check-target-winsup: - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(NORMAL_TARGET_EXPORTS) \ @@ -30895,7 +31374,7 @@ maybe-install-target-winsup: maybe-install-target-winsup: install-target-winsup install-target-winsup: installdirs - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(NORMAL_TARGET_EXPORTS) \ @@ -30913,7 +31392,7 @@ maybe-info-target-winsup: info-target-winsup info-target-winsup: \ configure-target-winsup - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -30939,7 +31418,7 @@ maybe-dvi-target-winsup: dvi-target-winsup dvi-target-winsup: \ configure-target-winsup - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -30965,7 +31444,7 @@ maybe-html-target-winsup: html-target-winsup html-target-winsup: \ configure-target-winsup - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -30991,7 +31470,7 @@ maybe-TAGS-target-winsup: TAGS-target-winsup TAGS-target-winsup: \ configure-target-winsup - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -31018,7 +31497,7 @@ maybe-install-info-target-winsup: install-info-target-winsup install-info-target-winsup: \ configure-target-winsup \ info-target-winsup - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -31044,7 +31523,7 @@ maybe-installcheck-target-winsup: installcheck-target-winsup installcheck-target-winsup: \ configure-target-winsup - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -31069,7 +31548,7 @@ maybe-mostlyclean-target-winsup: maybe-mostlyclean-target-winsup: mostlyclean-target-winsup mostlyclean-target-winsup: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -31094,7 +31573,7 @@ maybe-clean-target-winsup: maybe-clean-target-winsup: clean-target-winsup clean-target-winsup: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -31119,7 +31598,7 @@ maybe-distclean-target-winsup: maybe-distclean-target-winsup: distclean-target-winsup distclean-target-winsup: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -31144,7 +31623,7 @@ maybe-maintainer-clean-target-winsup: maybe-maintainer-clean-target-winsup: maintainer-clean-target-winsup maintainer-clean-target-winsup: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -31165,22 +31644,29 @@ maintainer-clean-target-winsup: -# There's only one multilib.out. Cleverer subdirs shouldn't need it copied. -@if target-libgloss -$(TARGET_SUBDIR)/libgloss/multilib.out: multilib.out - $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgloss ; \ - rm -f $(TARGET_SUBDIR)/libgloss/Makefile || : ; \ - cp multilib.out $(TARGET_SUBDIR)/libgloss/multilib.out -@endif target-libgloss - .PHONY: configure-target-libgloss maybe-configure-target-libgloss maybe-configure-target-libgloss: @if target-libgloss maybe-configure-target-libgloss: configure-target-libgloss -configure-target-libgloss: $(TARGET_SUBDIR)/libgloss/multilib.out - @$(unstage) +configure-target-libgloss: + @: $(MAKE); $(unstage) + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + echo "Checking multilib configuration for libgloss..."; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgloss ; \ + $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libgloss/multilib.tmp 2> /dev/null ; \ + if test -r $(TARGET_SUBDIR)/libgloss/multilib.out; then \ + if cmp -s $(TARGET_SUBDIR)/libgloss/multilib.tmp $(TARGET_SUBDIR)/libgloss/multilib.out; then \ + rm -f $(TARGET_SUBDIR)/libgloss/multilib.tmp; \ + else \ + rm -f $(TARGET_SUBDIR)/libgloss/Makefile; \ + mv $(TARGET_SUBDIR)/libgloss/multilib.tmp $(TARGET_SUBDIR)/libgloss/multilib.out; \ + fi; \ + else \ + mv $(TARGET_SUBDIR)/libgloss/multilib.tmp $(TARGET_SUBDIR)/libgloss/multilib.out; \ + fi @test ! -f $(TARGET_SUBDIR)/libgloss/Makefile || exit 0; \ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgloss ; \ r=`${PWD_COMMAND}`; export r; \ @@ -31211,7 +31697,7 @@ maybe-all-target-libgloss: TARGET-target-libgloss=all maybe-all-target-libgloss: all-target-libgloss all-target-libgloss: configure-target-libgloss - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(NORMAL_TARGET_EXPORTS) \ @@ -31239,7 +31725,7 @@ maybe-install-target-libgloss: maybe-install-target-libgloss: install-target-libgloss install-target-libgloss: installdirs - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(NORMAL_TARGET_EXPORTS) \ @@ -31257,7 +31743,7 @@ maybe-info-target-libgloss: info-target-libgloss info-target-libgloss: \ configure-target-libgloss - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -31283,7 +31769,7 @@ maybe-dvi-target-libgloss: dvi-target-libgloss dvi-target-libgloss: \ configure-target-libgloss - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -31309,7 +31795,7 @@ maybe-html-target-libgloss: html-target-libgloss html-target-libgloss: \ configure-target-libgloss - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -31335,7 +31821,7 @@ maybe-TAGS-target-libgloss: TAGS-target-libgloss TAGS-target-libgloss: \ configure-target-libgloss - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -31362,7 +31848,7 @@ maybe-install-info-target-libgloss: install-info-target-libgloss install-info-target-libgloss: \ configure-target-libgloss \ info-target-libgloss - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -31388,7 +31874,7 @@ maybe-installcheck-target-libgloss: installcheck-target-libgloss installcheck-target-libgloss: \ configure-target-libgloss - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -31413,7 +31899,7 @@ maybe-mostlyclean-target-libgloss: maybe-mostlyclean-target-libgloss: mostlyclean-target-libgloss mostlyclean-target-libgloss: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -31438,7 +31924,7 @@ maybe-clean-target-libgloss: maybe-clean-target-libgloss: clean-target-libgloss clean-target-libgloss: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -31463,7 +31949,7 @@ maybe-distclean-target-libgloss: maybe-distclean-target-libgloss: distclean-target-libgloss distclean-target-libgloss: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -31488,7 +31974,7 @@ maybe-maintainer-clean-target-libgloss: maybe-maintainer-clean-target-libgloss: maintainer-clean-target-libgloss maintainer-clean-target-libgloss: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -31509,22 +31995,29 @@ maintainer-clean-target-libgloss: -# There's only one multilib.out. Cleverer subdirs shouldn't need it copied. -@if target-libiberty -$(TARGET_SUBDIR)/libiberty/multilib.out: multilib.out - $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libiberty ; \ - rm -f $(TARGET_SUBDIR)/libiberty/Makefile || : ; \ - cp multilib.out $(TARGET_SUBDIR)/libiberty/multilib.out -@endif target-libiberty - .PHONY: configure-target-libiberty maybe-configure-target-libiberty maybe-configure-target-libiberty: @if target-libiberty maybe-configure-target-libiberty: configure-target-libiberty -configure-target-libiberty: $(TARGET_SUBDIR)/libiberty/multilib.out - @$(unstage) +configure-target-libiberty: + @: $(MAKE); $(unstage) + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + echo "Checking multilib configuration for libiberty..."; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libiberty ; \ + $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libiberty/multilib.tmp 2> /dev/null ; \ + if test -r $(TARGET_SUBDIR)/libiberty/multilib.out; then \ + if cmp -s $(TARGET_SUBDIR)/libiberty/multilib.tmp $(TARGET_SUBDIR)/libiberty/multilib.out; then \ + rm -f $(TARGET_SUBDIR)/libiberty/multilib.tmp; \ + else \ + rm -f $(TARGET_SUBDIR)/libiberty/Makefile; \ + mv $(TARGET_SUBDIR)/libiberty/multilib.tmp $(TARGET_SUBDIR)/libiberty/multilib.out; \ + fi; \ + else \ + mv $(TARGET_SUBDIR)/libiberty/multilib.tmp $(TARGET_SUBDIR)/libiberty/multilib.out; \ + fi @test ! -f $(TARGET_SUBDIR)/libiberty/Makefile || exit 0; \ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libiberty ; \ r=`${PWD_COMMAND}`; export r; \ @@ -31555,7 +32048,7 @@ maybe-all-target-libiberty: TARGET-target-libiberty=all maybe-all-target-libiberty: all-target-libiberty all-target-libiberty: configure-target-libiberty - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(NORMAL_TARGET_EXPORTS) \ @@ -31573,7 +32066,7 @@ maybe-check-target-libiberty: maybe-check-target-libiberty: check-target-libiberty check-target-libiberty: - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(NORMAL_TARGET_EXPORTS) \ @@ -31588,7 +32081,7 @@ maybe-install-target-libiberty: maybe-install-target-libiberty: install-target-libiberty install-target-libiberty: installdirs - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(NORMAL_TARGET_EXPORTS) \ @@ -31606,7 +32099,7 @@ maybe-info-target-libiberty: info-target-libiberty info-target-libiberty: \ configure-target-libiberty - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -31632,7 +32125,7 @@ maybe-dvi-target-libiberty: dvi-target-libiberty dvi-target-libiberty: \ configure-target-libiberty - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -31658,7 +32151,7 @@ maybe-html-target-libiberty: html-target-libiberty html-target-libiberty: \ configure-target-libiberty - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -31684,7 +32177,7 @@ maybe-TAGS-target-libiberty: TAGS-target-libiberty TAGS-target-libiberty: \ configure-target-libiberty - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -31711,7 +32204,7 @@ maybe-install-info-target-libiberty: install-info-target-libiberty install-info-target-libiberty: \ configure-target-libiberty \ info-target-libiberty - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -31737,7 +32230,7 @@ maybe-installcheck-target-libiberty: installcheck-target-libiberty installcheck-target-libiberty: \ configure-target-libiberty - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -31762,7 +32255,7 @@ maybe-mostlyclean-target-libiberty: maybe-mostlyclean-target-libiberty: mostlyclean-target-libiberty mostlyclean-target-libiberty: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -31787,7 +32280,7 @@ maybe-clean-target-libiberty: maybe-clean-target-libiberty: clean-target-libiberty clean-target-libiberty: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -31812,7 +32305,7 @@ maybe-distclean-target-libiberty: maybe-distclean-target-libiberty: distclean-target-libiberty distclean-target-libiberty: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -31837,7 +32330,7 @@ maybe-maintainer-clean-target-libiberty: maybe-maintainer-clean-target-libiberty: maintainer-clean-target-libiberty maintainer-clean-target-libiberty: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -31858,22 +32351,29 @@ maintainer-clean-target-libiberty: -# There's only one multilib.out. Cleverer subdirs shouldn't need it copied. -@if target-gperf -$(TARGET_SUBDIR)/gperf/multilib.out: multilib.out - $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/gperf ; \ - rm -f $(TARGET_SUBDIR)/gperf/Makefile || : ; \ - cp multilib.out $(TARGET_SUBDIR)/gperf/multilib.out -@endif target-gperf - .PHONY: configure-target-gperf maybe-configure-target-gperf maybe-configure-target-gperf: @if target-gperf maybe-configure-target-gperf: configure-target-gperf -configure-target-gperf: $(TARGET_SUBDIR)/gperf/multilib.out - @$(unstage) +configure-target-gperf: + @: $(MAKE); $(unstage) + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + echo "Checking multilib configuration for gperf..."; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/gperf ; \ + $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/gperf/multilib.tmp 2> /dev/null ; \ + if test -r $(TARGET_SUBDIR)/gperf/multilib.out; then \ + if cmp -s $(TARGET_SUBDIR)/gperf/multilib.tmp $(TARGET_SUBDIR)/gperf/multilib.out; then \ + rm -f $(TARGET_SUBDIR)/gperf/multilib.tmp; \ + else \ + rm -f $(TARGET_SUBDIR)/gperf/Makefile; \ + mv $(TARGET_SUBDIR)/gperf/multilib.tmp $(TARGET_SUBDIR)/gperf/multilib.out; \ + fi; \ + else \ + mv $(TARGET_SUBDIR)/gperf/multilib.tmp $(TARGET_SUBDIR)/gperf/multilib.out; \ + fi @test ! -f $(TARGET_SUBDIR)/gperf/Makefile || exit 0; \ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/gperf ; \ r=`${PWD_COMMAND}`; export r; \ @@ -31904,7 +32404,7 @@ maybe-all-target-gperf: TARGET-target-gperf=all maybe-all-target-gperf: all-target-gperf all-target-gperf: configure-target-gperf - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(NORMAL_TARGET_EXPORTS) \ @@ -31922,7 +32422,7 @@ maybe-check-target-gperf: maybe-check-target-gperf: check-target-gperf check-target-gperf: - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(NORMAL_TARGET_EXPORTS) \ @@ -31937,7 +32437,7 @@ maybe-install-target-gperf: maybe-install-target-gperf: install-target-gperf install-target-gperf: installdirs - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(NORMAL_TARGET_EXPORTS) \ @@ -31955,7 +32455,7 @@ maybe-info-target-gperf: info-target-gperf info-target-gperf: \ configure-target-gperf - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -31981,7 +32481,7 @@ maybe-dvi-target-gperf: dvi-target-gperf dvi-target-gperf: \ configure-target-gperf - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -32007,7 +32507,7 @@ maybe-html-target-gperf: html-target-gperf html-target-gperf: \ configure-target-gperf - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -32033,7 +32533,7 @@ maybe-TAGS-target-gperf: TAGS-target-gperf TAGS-target-gperf: \ configure-target-gperf - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -32060,7 +32560,7 @@ maybe-install-info-target-gperf: install-info-target-gperf install-info-target-gperf: \ configure-target-gperf \ info-target-gperf - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -32086,7 +32586,7 @@ maybe-installcheck-target-gperf: installcheck-target-gperf installcheck-target-gperf: \ configure-target-gperf - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -32111,7 +32611,7 @@ maybe-mostlyclean-target-gperf: maybe-mostlyclean-target-gperf: mostlyclean-target-gperf mostlyclean-target-gperf: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -32136,7 +32636,7 @@ maybe-clean-target-gperf: maybe-clean-target-gperf: clean-target-gperf clean-target-gperf: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -32161,7 +32661,7 @@ maybe-distclean-target-gperf: maybe-distclean-target-gperf: distclean-target-gperf distclean-target-gperf: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -32186,7 +32686,7 @@ maybe-maintainer-clean-target-gperf: maybe-maintainer-clean-target-gperf: maintainer-clean-target-gperf maintainer-clean-target-gperf: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -32207,22 +32707,29 @@ maintainer-clean-target-gperf: -# There's only one multilib.out. Cleverer subdirs shouldn't need it copied. -@if target-examples -$(TARGET_SUBDIR)/examples/multilib.out: multilib.out - $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/examples ; \ - rm -f $(TARGET_SUBDIR)/examples/Makefile || : ; \ - cp multilib.out $(TARGET_SUBDIR)/examples/multilib.out -@endif target-examples - .PHONY: configure-target-examples maybe-configure-target-examples maybe-configure-target-examples: @if target-examples maybe-configure-target-examples: configure-target-examples -configure-target-examples: $(TARGET_SUBDIR)/examples/multilib.out - @$(unstage) +configure-target-examples: + @: $(MAKE); $(unstage) + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + echo "Checking multilib configuration for examples..."; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/examples ; \ + $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/examples/multilib.tmp 2> /dev/null ; \ + if test -r $(TARGET_SUBDIR)/examples/multilib.out; then \ + if cmp -s $(TARGET_SUBDIR)/examples/multilib.tmp $(TARGET_SUBDIR)/examples/multilib.out; then \ + rm -f $(TARGET_SUBDIR)/examples/multilib.tmp; \ + else \ + rm -f $(TARGET_SUBDIR)/examples/Makefile; \ + mv $(TARGET_SUBDIR)/examples/multilib.tmp $(TARGET_SUBDIR)/examples/multilib.out; \ + fi; \ + else \ + mv $(TARGET_SUBDIR)/examples/multilib.tmp $(TARGET_SUBDIR)/examples/multilib.out; \ + fi @test ! -f $(TARGET_SUBDIR)/examples/Makefile || exit 0; \ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/examples ; \ r=`${PWD_COMMAND}`; export r; \ @@ -32253,7 +32760,7 @@ maybe-all-target-examples: TARGET-target-examples=all maybe-all-target-examples: all-target-examples all-target-examples: configure-target-examples - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(NORMAL_TARGET_EXPORTS) \ @@ -32294,7 +32801,7 @@ maybe-info-target-examples: info-target-examples info-target-examples: \ configure-target-examples - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -32320,7 +32827,7 @@ maybe-dvi-target-examples: dvi-target-examples dvi-target-examples: \ configure-target-examples - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -32346,7 +32853,7 @@ maybe-html-target-examples: html-target-examples html-target-examples: \ configure-target-examples - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -32372,7 +32879,7 @@ maybe-TAGS-target-examples: TAGS-target-examples TAGS-target-examples: \ configure-target-examples - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -32399,7 +32906,7 @@ maybe-install-info-target-examples: install-info-target-examples install-info-target-examples: \ configure-target-examples \ info-target-examples - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -32425,7 +32932,7 @@ maybe-installcheck-target-examples: installcheck-target-examples installcheck-target-examples: \ configure-target-examples - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -32450,7 +32957,7 @@ maybe-mostlyclean-target-examples: maybe-mostlyclean-target-examples: mostlyclean-target-examples mostlyclean-target-examples: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -32475,7 +32982,7 @@ maybe-clean-target-examples: maybe-clean-target-examples: clean-target-examples clean-target-examples: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -32500,7 +33007,7 @@ maybe-distclean-target-examples: maybe-distclean-target-examples: distclean-target-examples distclean-target-examples: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -32525,7 +33032,7 @@ maybe-maintainer-clean-target-examples: maybe-maintainer-clean-target-examples: maintainer-clean-target-examples maintainer-clean-target-examples: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -32546,22 +33053,29 @@ maintainer-clean-target-examples: -# There's only one multilib.out. Cleverer subdirs shouldn't need it copied. -@if target-libffi -$(TARGET_SUBDIR)/libffi/multilib.out: multilib.out - $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libffi ; \ - rm -f $(TARGET_SUBDIR)/libffi/Makefile || : ; \ - cp multilib.out $(TARGET_SUBDIR)/libffi/multilib.out -@endif target-libffi - .PHONY: configure-target-libffi maybe-configure-target-libffi maybe-configure-target-libffi: @if target-libffi maybe-configure-target-libffi: configure-target-libffi -configure-target-libffi: $(TARGET_SUBDIR)/libffi/multilib.out - @$(unstage) +configure-target-libffi: + @: $(MAKE); $(unstage) + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + echo "Checking multilib configuration for libffi..."; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libffi ; \ + $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libffi/multilib.tmp 2> /dev/null ; \ + if test -r $(TARGET_SUBDIR)/libffi/multilib.out; then \ + if cmp -s $(TARGET_SUBDIR)/libffi/multilib.tmp $(TARGET_SUBDIR)/libffi/multilib.out; then \ + rm -f $(TARGET_SUBDIR)/libffi/multilib.tmp; \ + else \ + rm -f $(TARGET_SUBDIR)/libffi/Makefile; \ + mv $(TARGET_SUBDIR)/libffi/multilib.tmp $(TARGET_SUBDIR)/libffi/multilib.out; \ + fi; \ + else \ + mv $(TARGET_SUBDIR)/libffi/multilib.tmp $(TARGET_SUBDIR)/libffi/multilib.out; \ + fi @test ! -f $(TARGET_SUBDIR)/libffi/Makefile || exit 0; \ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libffi ; \ r=`${PWD_COMMAND}`; export r; \ @@ -32592,7 +33106,7 @@ maybe-all-target-libffi: TARGET-target-libffi=all maybe-all-target-libffi: all-target-libffi all-target-libffi: configure-target-libffi - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(NORMAL_TARGET_EXPORTS) \ @@ -32610,7 +33124,7 @@ maybe-check-target-libffi: maybe-check-target-libffi: check-target-libffi check-target-libffi: - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(NORMAL_TARGET_EXPORTS) \ @@ -32625,7 +33139,7 @@ maybe-install-target-libffi: maybe-install-target-libffi: install-target-libffi install-target-libffi: installdirs - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(NORMAL_TARGET_EXPORTS) \ @@ -32643,7 +33157,7 @@ maybe-info-target-libffi: info-target-libffi info-target-libffi: \ configure-target-libffi - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -32669,7 +33183,7 @@ maybe-dvi-target-libffi: dvi-target-libffi dvi-target-libffi: \ configure-target-libffi - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -32695,7 +33209,7 @@ maybe-html-target-libffi: html-target-libffi html-target-libffi: \ configure-target-libffi - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -32721,7 +33235,7 @@ maybe-TAGS-target-libffi: TAGS-target-libffi TAGS-target-libffi: \ configure-target-libffi - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -32748,7 +33262,7 @@ maybe-install-info-target-libffi: install-info-target-libffi install-info-target-libffi: \ configure-target-libffi \ info-target-libffi - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -32774,7 +33288,7 @@ maybe-installcheck-target-libffi: installcheck-target-libffi installcheck-target-libffi: \ configure-target-libffi - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -32799,7 +33313,7 @@ maybe-mostlyclean-target-libffi: maybe-mostlyclean-target-libffi: mostlyclean-target-libffi mostlyclean-target-libffi: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -32824,7 +33338,7 @@ maybe-clean-target-libffi: maybe-clean-target-libffi: clean-target-libffi clean-target-libffi: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -32849,7 +33363,7 @@ maybe-distclean-target-libffi: maybe-distclean-target-libffi: distclean-target-libffi distclean-target-libffi: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -32874,7 +33388,7 @@ maybe-maintainer-clean-target-libffi: maybe-maintainer-clean-target-libffi: maintainer-clean-target-libffi maintainer-clean-target-libffi: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -32895,22 +33409,29 @@ maintainer-clean-target-libffi: -# There's only one multilib.out. Cleverer subdirs shouldn't need it copied. -@if target-libjava -$(TARGET_SUBDIR)/libjava/multilib.out: multilib.out - $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libjava ; \ - rm -f $(TARGET_SUBDIR)/libjava/Makefile || : ; \ - cp multilib.out $(TARGET_SUBDIR)/libjava/multilib.out -@endif target-libjava - .PHONY: configure-target-libjava maybe-configure-target-libjava maybe-configure-target-libjava: @if target-libjava maybe-configure-target-libjava: configure-target-libjava -configure-target-libjava: $(TARGET_SUBDIR)/libjava/multilib.out - @$(unstage) +configure-target-libjava: + @: $(MAKE); $(unstage) + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + echo "Checking multilib configuration for libjava..."; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libjava ; \ + $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libjava/multilib.tmp 2> /dev/null ; \ + if test -r $(TARGET_SUBDIR)/libjava/multilib.out; then \ + if cmp -s $(TARGET_SUBDIR)/libjava/multilib.tmp $(TARGET_SUBDIR)/libjava/multilib.out; then \ + rm -f $(TARGET_SUBDIR)/libjava/multilib.tmp; \ + else \ + rm -f $(TARGET_SUBDIR)/libjava/Makefile; \ + mv $(TARGET_SUBDIR)/libjava/multilib.tmp $(TARGET_SUBDIR)/libjava/multilib.out; \ + fi; \ + else \ + mv $(TARGET_SUBDIR)/libjava/multilib.tmp $(TARGET_SUBDIR)/libjava/multilib.out; \ + fi @test ! -f $(TARGET_SUBDIR)/libjava/Makefile || exit 0; \ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libjava ; \ r=`${PWD_COMMAND}`; export r; \ @@ -32941,7 +33462,7 @@ maybe-all-target-libjava: TARGET-target-libjava=all maybe-all-target-libjava: all-target-libjava all-target-libjava: configure-target-libjava - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(RAW_CXX_TARGET_EXPORTS) \ @@ -32959,7 +33480,7 @@ maybe-check-target-libjava: maybe-check-target-libjava: check-target-libjava check-target-libjava: - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(RAW_CXX_TARGET_EXPORTS) \ @@ -32974,7 +33495,7 @@ maybe-install-target-libjava: maybe-install-target-libjava: install-target-libjava install-target-libjava: installdirs - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(RAW_CXX_TARGET_EXPORTS) \ @@ -32992,7 +33513,7 @@ maybe-info-target-libjava: info-target-libjava info-target-libjava: \ configure-target-libjava - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -33018,7 +33539,7 @@ maybe-dvi-target-libjava: dvi-target-libjava dvi-target-libjava: \ configure-target-libjava - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -33044,7 +33565,7 @@ maybe-html-target-libjava: html-target-libjava html-target-libjava: \ configure-target-libjava - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -33070,7 +33591,7 @@ maybe-TAGS-target-libjava: TAGS-target-libjava TAGS-target-libjava: \ configure-target-libjava - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -33097,7 +33618,7 @@ maybe-install-info-target-libjava: install-info-target-libjava install-info-target-libjava: \ configure-target-libjava \ info-target-libjava - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -33123,7 +33644,7 @@ maybe-installcheck-target-libjava: installcheck-target-libjava installcheck-target-libjava: \ configure-target-libjava - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -33148,7 +33669,7 @@ maybe-mostlyclean-target-libjava: maybe-mostlyclean-target-libjava: mostlyclean-target-libjava mostlyclean-target-libjava: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -33173,7 +33694,7 @@ maybe-clean-target-libjava: maybe-clean-target-libjava: clean-target-libjava clean-target-libjava: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -33198,7 +33719,7 @@ maybe-distclean-target-libjava: maybe-distclean-target-libjava: distclean-target-libjava distclean-target-libjava: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -33223,7 +33744,7 @@ maybe-maintainer-clean-target-libjava: maybe-maintainer-clean-target-libjava: maintainer-clean-target-libjava maintainer-clean-target-libjava: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -33244,22 +33765,29 @@ maintainer-clean-target-libjava: -# There's only one multilib.out. Cleverer subdirs shouldn't need it copied. -@if target-zlib -$(TARGET_SUBDIR)/zlib/multilib.out: multilib.out - $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/zlib ; \ - rm -f $(TARGET_SUBDIR)/zlib/Makefile || : ; \ - cp multilib.out $(TARGET_SUBDIR)/zlib/multilib.out -@endif target-zlib - .PHONY: configure-target-zlib maybe-configure-target-zlib maybe-configure-target-zlib: @if target-zlib maybe-configure-target-zlib: configure-target-zlib -configure-target-zlib: $(TARGET_SUBDIR)/zlib/multilib.out - @$(unstage) +configure-target-zlib: + @: $(MAKE); $(unstage) + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + echo "Checking multilib configuration for zlib..."; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/zlib ; \ + $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/zlib/multilib.tmp 2> /dev/null ; \ + if test -r $(TARGET_SUBDIR)/zlib/multilib.out; then \ + if cmp -s $(TARGET_SUBDIR)/zlib/multilib.tmp $(TARGET_SUBDIR)/zlib/multilib.out; then \ + rm -f $(TARGET_SUBDIR)/zlib/multilib.tmp; \ + else \ + rm -f $(TARGET_SUBDIR)/zlib/Makefile; \ + mv $(TARGET_SUBDIR)/zlib/multilib.tmp $(TARGET_SUBDIR)/zlib/multilib.out; \ + fi; \ + else \ + mv $(TARGET_SUBDIR)/zlib/multilib.tmp $(TARGET_SUBDIR)/zlib/multilib.out; \ + fi @test ! -f $(TARGET_SUBDIR)/zlib/Makefile || exit 0; \ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/zlib ; \ r=`${PWD_COMMAND}`; export r; \ @@ -33290,7 +33818,7 @@ maybe-all-target-zlib: TARGET-target-zlib=all maybe-all-target-zlib: all-target-zlib all-target-zlib: configure-target-zlib - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(NORMAL_TARGET_EXPORTS) \ @@ -33308,7 +33836,7 @@ maybe-check-target-zlib: maybe-check-target-zlib: check-target-zlib check-target-zlib: - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(NORMAL_TARGET_EXPORTS) \ @@ -33323,7 +33851,7 @@ maybe-install-target-zlib: maybe-install-target-zlib: install-target-zlib install-target-zlib: installdirs - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(NORMAL_TARGET_EXPORTS) \ @@ -33341,7 +33869,7 @@ maybe-info-target-zlib: info-target-zlib info-target-zlib: \ configure-target-zlib - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -33367,7 +33895,7 @@ maybe-dvi-target-zlib: dvi-target-zlib dvi-target-zlib: \ configure-target-zlib - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -33393,7 +33921,7 @@ maybe-html-target-zlib: html-target-zlib html-target-zlib: \ configure-target-zlib - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -33419,7 +33947,7 @@ maybe-TAGS-target-zlib: TAGS-target-zlib TAGS-target-zlib: \ configure-target-zlib - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -33446,7 +33974,7 @@ maybe-install-info-target-zlib: install-info-target-zlib install-info-target-zlib: \ configure-target-zlib \ info-target-zlib - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -33472,7 +34000,7 @@ maybe-installcheck-target-zlib: installcheck-target-zlib installcheck-target-zlib: \ configure-target-zlib - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -33497,7 +34025,7 @@ maybe-mostlyclean-target-zlib: maybe-mostlyclean-target-zlib: mostlyclean-target-zlib mostlyclean-target-zlib: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -33522,7 +34050,7 @@ maybe-clean-target-zlib: maybe-clean-target-zlib: clean-target-zlib clean-target-zlib: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -33547,7 +34075,7 @@ maybe-distclean-target-zlib: maybe-distclean-target-zlib: distclean-target-zlib distclean-target-zlib: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -33572,7 +34100,7 @@ maybe-maintainer-clean-target-zlib: maybe-maintainer-clean-target-zlib: maintainer-clean-target-zlib maintainer-clean-target-zlib: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -33593,22 +34121,29 @@ maintainer-clean-target-zlib: -# There's only one multilib.out. Cleverer subdirs shouldn't need it copied. -@if target-boehm-gc -$(TARGET_SUBDIR)/boehm-gc/multilib.out: multilib.out - $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/boehm-gc ; \ - rm -f $(TARGET_SUBDIR)/boehm-gc/Makefile || : ; \ - cp multilib.out $(TARGET_SUBDIR)/boehm-gc/multilib.out -@endif target-boehm-gc - .PHONY: configure-target-boehm-gc maybe-configure-target-boehm-gc maybe-configure-target-boehm-gc: @if target-boehm-gc maybe-configure-target-boehm-gc: configure-target-boehm-gc -configure-target-boehm-gc: $(TARGET_SUBDIR)/boehm-gc/multilib.out - @$(unstage) +configure-target-boehm-gc: + @: $(MAKE); $(unstage) + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + echo "Checking multilib configuration for boehm-gc..."; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/boehm-gc ; \ + $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/boehm-gc/multilib.tmp 2> /dev/null ; \ + if test -r $(TARGET_SUBDIR)/boehm-gc/multilib.out; then \ + if cmp -s $(TARGET_SUBDIR)/boehm-gc/multilib.tmp $(TARGET_SUBDIR)/boehm-gc/multilib.out; then \ + rm -f $(TARGET_SUBDIR)/boehm-gc/multilib.tmp; \ + else \ + rm -f $(TARGET_SUBDIR)/boehm-gc/Makefile; \ + mv $(TARGET_SUBDIR)/boehm-gc/multilib.tmp $(TARGET_SUBDIR)/boehm-gc/multilib.out; \ + fi; \ + else \ + mv $(TARGET_SUBDIR)/boehm-gc/multilib.tmp $(TARGET_SUBDIR)/boehm-gc/multilib.out; \ + fi @test ! -f $(TARGET_SUBDIR)/boehm-gc/Makefile || exit 0; \ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/boehm-gc ; \ r=`${PWD_COMMAND}`; export r; \ @@ -33639,7 +34174,7 @@ maybe-all-target-boehm-gc: TARGET-target-boehm-gc=all maybe-all-target-boehm-gc: all-target-boehm-gc all-target-boehm-gc: configure-target-boehm-gc - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(NORMAL_TARGET_EXPORTS) \ @@ -33657,7 +34192,7 @@ maybe-check-target-boehm-gc: maybe-check-target-boehm-gc: check-target-boehm-gc check-target-boehm-gc: - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(NORMAL_TARGET_EXPORTS) \ @@ -33672,7 +34207,7 @@ maybe-install-target-boehm-gc: maybe-install-target-boehm-gc: install-target-boehm-gc install-target-boehm-gc: installdirs - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(NORMAL_TARGET_EXPORTS) \ @@ -33690,7 +34225,7 @@ maybe-info-target-boehm-gc: info-target-boehm-gc info-target-boehm-gc: \ configure-target-boehm-gc - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -33716,7 +34251,7 @@ maybe-dvi-target-boehm-gc: dvi-target-boehm-gc dvi-target-boehm-gc: \ configure-target-boehm-gc - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -33742,7 +34277,7 @@ maybe-html-target-boehm-gc: html-target-boehm-gc html-target-boehm-gc: \ configure-target-boehm-gc - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -33768,7 +34303,7 @@ maybe-TAGS-target-boehm-gc: TAGS-target-boehm-gc TAGS-target-boehm-gc: \ configure-target-boehm-gc - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -33795,7 +34330,7 @@ maybe-install-info-target-boehm-gc: install-info-target-boehm-gc install-info-target-boehm-gc: \ configure-target-boehm-gc \ info-target-boehm-gc - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -33821,7 +34356,7 @@ maybe-installcheck-target-boehm-gc: installcheck-target-boehm-gc installcheck-target-boehm-gc: \ configure-target-boehm-gc - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -33846,7 +34381,7 @@ maybe-mostlyclean-target-boehm-gc: maybe-mostlyclean-target-boehm-gc: mostlyclean-target-boehm-gc mostlyclean-target-boehm-gc: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -33871,7 +34406,7 @@ maybe-clean-target-boehm-gc: maybe-clean-target-boehm-gc: clean-target-boehm-gc clean-target-boehm-gc: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -33896,7 +34431,7 @@ maybe-distclean-target-boehm-gc: maybe-distclean-target-boehm-gc: distclean-target-boehm-gc distclean-target-boehm-gc: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -33921,7 +34456,7 @@ maybe-maintainer-clean-target-boehm-gc: maybe-maintainer-clean-target-boehm-gc: maintainer-clean-target-boehm-gc maintainer-clean-target-boehm-gc: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -33942,22 +34477,29 @@ maintainer-clean-target-boehm-gc: -# There's only one multilib.out. Cleverer subdirs shouldn't need it copied. -@if target-qthreads -$(TARGET_SUBDIR)/qthreads/multilib.out: multilib.out - $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/qthreads ; \ - rm -f $(TARGET_SUBDIR)/qthreads/Makefile || : ; \ - cp multilib.out $(TARGET_SUBDIR)/qthreads/multilib.out -@endif target-qthreads - .PHONY: configure-target-qthreads maybe-configure-target-qthreads maybe-configure-target-qthreads: @if target-qthreads maybe-configure-target-qthreads: configure-target-qthreads -configure-target-qthreads: $(TARGET_SUBDIR)/qthreads/multilib.out - @$(unstage) +configure-target-qthreads: + @: $(MAKE); $(unstage) + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + echo "Checking multilib configuration for qthreads..."; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/qthreads ; \ + $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/qthreads/multilib.tmp 2> /dev/null ; \ + if test -r $(TARGET_SUBDIR)/qthreads/multilib.out; then \ + if cmp -s $(TARGET_SUBDIR)/qthreads/multilib.tmp $(TARGET_SUBDIR)/qthreads/multilib.out; then \ + rm -f $(TARGET_SUBDIR)/qthreads/multilib.tmp; \ + else \ + rm -f $(TARGET_SUBDIR)/qthreads/Makefile; \ + mv $(TARGET_SUBDIR)/qthreads/multilib.tmp $(TARGET_SUBDIR)/qthreads/multilib.out; \ + fi; \ + else \ + mv $(TARGET_SUBDIR)/qthreads/multilib.tmp $(TARGET_SUBDIR)/qthreads/multilib.out; \ + fi @test ! -f $(TARGET_SUBDIR)/qthreads/Makefile || exit 0; \ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/qthreads ; \ r=`${PWD_COMMAND}`; export r; \ @@ -33988,7 +34530,7 @@ maybe-all-target-qthreads: TARGET-target-qthreads=all maybe-all-target-qthreads: all-target-qthreads all-target-qthreads: configure-target-qthreads - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(NORMAL_TARGET_EXPORTS) \ @@ -34006,7 +34548,7 @@ maybe-check-target-qthreads: maybe-check-target-qthreads: check-target-qthreads check-target-qthreads: - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(NORMAL_TARGET_EXPORTS) \ @@ -34021,7 +34563,7 @@ maybe-install-target-qthreads: maybe-install-target-qthreads: install-target-qthreads install-target-qthreads: installdirs - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(NORMAL_TARGET_EXPORTS) \ @@ -34039,7 +34581,7 @@ maybe-info-target-qthreads: info-target-qthreads info-target-qthreads: \ configure-target-qthreads - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -34065,7 +34607,7 @@ maybe-dvi-target-qthreads: dvi-target-qthreads dvi-target-qthreads: \ configure-target-qthreads - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -34091,7 +34633,7 @@ maybe-html-target-qthreads: html-target-qthreads html-target-qthreads: \ configure-target-qthreads - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -34117,7 +34659,7 @@ maybe-TAGS-target-qthreads: TAGS-target-qthreads TAGS-target-qthreads: \ configure-target-qthreads - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -34144,7 +34686,7 @@ maybe-install-info-target-qthreads: install-info-target-qthreads install-info-target-qthreads: \ configure-target-qthreads \ info-target-qthreads - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -34170,7 +34712,7 @@ maybe-installcheck-target-qthreads: installcheck-target-qthreads installcheck-target-qthreads: \ configure-target-qthreads - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -34195,7 +34737,7 @@ maybe-mostlyclean-target-qthreads: maybe-mostlyclean-target-qthreads: mostlyclean-target-qthreads mostlyclean-target-qthreads: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -34220,7 +34762,7 @@ maybe-clean-target-qthreads: maybe-clean-target-qthreads: clean-target-qthreads clean-target-qthreads: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -34245,7 +34787,7 @@ maybe-distclean-target-qthreads: maybe-distclean-target-qthreads: distclean-target-qthreads distclean-target-qthreads: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -34270,7 +34812,7 @@ maybe-maintainer-clean-target-qthreads: maybe-maintainer-clean-target-qthreads: maintainer-clean-target-qthreads maintainer-clean-target-qthreads: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -34291,22 +34833,29 @@ maintainer-clean-target-qthreads: -# There's only one multilib.out. Cleverer subdirs shouldn't need it copied. -@if target-rda -$(TARGET_SUBDIR)/rda/multilib.out: multilib.out - $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/rda ; \ - rm -f $(TARGET_SUBDIR)/rda/Makefile || : ; \ - cp multilib.out $(TARGET_SUBDIR)/rda/multilib.out -@endif target-rda - .PHONY: configure-target-rda maybe-configure-target-rda maybe-configure-target-rda: @if target-rda maybe-configure-target-rda: configure-target-rda -configure-target-rda: $(TARGET_SUBDIR)/rda/multilib.out - @$(unstage) +configure-target-rda: + @: $(MAKE); $(unstage) + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + echo "Checking multilib configuration for rda..."; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/rda ; \ + $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/rda/multilib.tmp 2> /dev/null ; \ + if test -r $(TARGET_SUBDIR)/rda/multilib.out; then \ + if cmp -s $(TARGET_SUBDIR)/rda/multilib.tmp $(TARGET_SUBDIR)/rda/multilib.out; then \ + rm -f $(TARGET_SUBDIR)/rda/multilib.tmp; \ + else \ + rm -f $(TARGET_SUBDIR)/rda/Makefile; \ + mv $(TARGET_SUBDIR)/rda/multilib.tmp $(TARGET_SUBDIR)/rda/multilib.out; \ + fi; \ + else \ + mv $(TARGET_SUBDIR)/rda/multilib.tmp $(TARGET_SUBDIR)/rda/multilib.out; \ + fi @test ! -f $(TARGET_SUBDIR)/rda/Makefile || exit 0; \ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/rda ; \ r=`${PWD_COMMAND}`; export r; \ @@ -34337,7 +34886,7 @@ maybe-all-target-rda: TARGET-target-rda=all maybe-all-target-rda: all-target-rda all-target-rda: configure-target-rda - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(NORMAL_TARGET_EXPORTS) \ @@ -34355,7 +34904,7 @@ maybe-check-target-rda: maybe-check-target-rda: check-target-rda check-target-rda: - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(NORMAL_TARGET_EXPORTS) \ @@ -34370,7 +34919,7 @@ maybe-install-target-rda: maybe-install-target-rda: install-target-rda install-target-rda: installdirs - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(NORMAL_TARGET_EXPORTS) \ @@ -34388,7 +34937,7 @@ maybe-info-target-rda: info-target-rda info-target-rda: \ configure-target-rda - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -34414,7 +34963,7 @@ maybe-dvi-target-rda: dvi-target-rda dvi-target-rda: \ configure-target-rda - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -34440,7 +34989,7 @@ maybe-html-target-rda: html-target-rda html-target-rda: \ configure-target-rda - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -34466,7 +35015,7 @@ maybe-TAGS-target-rda: TAGS-target-rda TAGS-target-rda: \ configure-target-rda - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -34493,7 +35042,7 @@ maybe-install-info-target-rda: install-info-target-rda install-info-target-rda: \ configure-target-rda \ info-target-rda - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -34519,7 +35068,7 @@ maybe-installcheck-target-rda: installcheck-target-rda installcheck-target-rda: \ configure-target-rda - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -34544,7 +35093,7 @@ maybe-mostlyclean-target-rda: maybe-mostlyclean-target-rda: mostlyclean-target-rda mostlyclean-target-rda: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -34569,7 +35118,7 @@ maybe-clean-target-rda: maybe-clean-target-rda: clean-target-rda clean-target-rda: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -34594,7 +35143,7 @@ maybe-distclean-target-rda: maybe-distclean-target-rda: distclean-target-rda distclean-target-rda: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -34619,7 +35168,7 @@ maybe-maintainer-clean-target-rda: maybe-maintainer-clean-target-rda: maintainer-clean-target-rda maintainer-clean-target-rda: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -34640,22 +35189,29 @@ maintainer-clean-target-rda: -# There's only one multilib.out. Cleverer subdirs shouldn't need it copied. -@if target-libada -$(TARGET_SUBDIR)/libada/multilib.out: multilib.out - $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libada ; \ - rm -f $(TARGET_SUBDIR)/libada/Makefile || : ; \ - cp multilib.out $(TARGET_SUBDIR)/libada/multilib.out -@endif target-libada - .PHONY: configure-target-libada maybe-configure-target-libada maybe-configure-target-libada: @if target-libada maybe-configure-target-libada: configure-target-libada -configure-target-libada: $(TARGET_SUBDIR)/libada/multilib.out - @$(unstage) +configure-target-libada: + @: $(MAKE); $(unstage) + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + echo "Checking multilib configuration for libada..."; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libada ; \ + $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libada/multilib.tmp 2> /dev/null ; \ + if test -r $(TARGET_SUBDIR)/libada/multilib.out; then \ + if cmp -s $(TARGET_SUBDIR)/libada/multilib.tmp $(TARGET_SUBDIR)/libada/multilib.out; then \ + rm -f $(TARGET_SUBDIR)/libada/multilib.tmp; \ + else \ + rm -f $(TARGET_SUBDIR)/libada/Makefile; \ + mv $(TARGET_SUBDIR)/libada/multilib.tmp $(TARGET_SUBDIR)/libada/multilib.out; \ + fi; \ + else \ + mv $(TARGET_SUBDIR)/libada/multilib.tmp $(TARGET_SUBDIR)/libada/multilib.out; \ + fi @test ! -f $(TARGET_SUBDIR)/libada/Makefile || exit 0; \ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libada ; \ r=`${PWD_COMMAND}`; export r; \ @@ -34686,7 +35242,7 @@ maybe-all-target-libada: TARGET-target-libada=all maybe-all-target-libada: all-target-libada all-target-libada: configure-target-libada - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(NORMAL_TARGET_EXPORTS) \ @@ -34704,7 +35260,7 @@ maybe-check-target-libada: maybe-check-target-libada: check-target-libada check-target-libada: - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(NORMAL_TARGET_EXPORTS) \ @@ -34719,7 +35275,7 @@ maybe-install-target-libada: maybe-install-target-libada: install-target-libada install-target-libada: installdirs - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(NORMAL_TARGET_EXPORTS) \ @@ -34737,7 +35293,7 @@ maybe-info-target-libada: info-target-libada info-target-libada: \ configure-target-libada - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -34763,7 +35319,7 @@ maybe-dvi-target-libada: dvi-target-libada dvi-target-libada: \ configure-target-libada - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -34789,7 +35345,7 @@ maybe-html-target-libada: html-target-libada html-target-libada: \ configure-target-libada - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -34815,7 +35371,7 @@ maybe-TAGS-target-libada: TAGS-target-libada TAGS-target-libada: \ configure-target-libada - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -34842,7 +35398,7 @@ maybe-install-info-target-libada: install-info-target-libada install-info-target-libada: \ configure-target-libada \ info-target-libada - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -34868,7 +35424,7 @@ maybe-installcheck-target-libada: installcheck-target-libada installcheck-target-libada: \ configure-target-libada - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -34893,7 +35449,7 @@ maybe-mostlyclean-target-libada: maybe-mostlyclean-target-libada: mostlyclean-target-libada mostlyclean-target-libada: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -34918,7 +35474,7 @@ maybe-clean-target-libada: maybe-clean-target-libada: clean-target-libada clean-target-libada: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -34943,7 +35499,7 @@ maybe-distclean-target-libada: maybe-distclean-target-libada: distclean-target-libada distclean-target-libada: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -34968,7 +35524,7 @@ maybe-maintainer-clean-target-libada: maybe-maintainer-clean-target-libada: maintainer-clean-target-libada maintainer-clean-target-libada: - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -35107,29 +35663,34 @@ gcc-no-fixedincludes: # are dummy when toplevel bootstrap is not active. # While making host and target tools, symlinks to the final stage must be -# there, so $(MAKE) $(unstage) should be run at various points. To avoid -# excessive recursive invocations of make, we "inline" them using a variable. +# there, so $(unstage) should be run at various points. To avoid excessive +# recursive invocations of make, we "inline" them using a variable. These +# must be referenced as ": $(MAKE) ; $(unstage)" rather than "$(unstage)" +# to avoid warnings from the GNU Make job server. unstage = : stage = : @if gcc-bootstrap unstage = [ -f stage_current ] || $(MAKE) `cat stage_last`-start -stage = $(MAKE) `cat stage_current`-end +stage = if [ -f stage_current ]; then $(MAKE) `cat stage_current`-end || exit 1; else :; fi @endif gcc-bootstrap .PHONY: unstage stage unstage: - @$(unstage) + @: $(MAKE); $(unstage) stage: - @$(stage) + @: $(MAKE); $(stage) + +# Disable commands for lean bootstrap. +LEAN = false # We name the build directories for the various stages "stage1-gcc", # "stage2-gcc","stage3-gcc", etc. # Since the 'compare' process will fail (on debugging information) if any # directory names are different, we need to link the gcc directory for -# the previous stage to a constant name ('gcc-prev'), and to make the name of +# the previous stage to a constant name ('prev-gcc'), and to make the name of # the build directories constant as well. For the latter, we use naked names # like 'gcc', because the scripts in that directory assume it. We use # mv on platforms where symlinks to directories do not work or are not @@ -35155,6 +35716,7 @@ POSTSTAGE1_FLAGS_TO_PASS = \ CC="$${CC}" CC_FOR_BUILD="$${CC_FOR_BUILD}" \ STAGE_PREFIX=$$r/prev-gcc/ \ CFLAGS="$(BOOT_CFLAGS)" \ + LDFLAGS="$(BOOT_LDFLAGS)" \ ADAC="\$$(CC)" # For stage 1: @@ -35170,117 +35732,133 @@ POSTSTAGE1_FLAGS_TO_PASS = \ .PHONY: stage1-start stage1-end stage1-start:: - @[ -f stage_current ] && $(MAKE) `cat stage_current`-end || : ; \ + @: $(MAKE); $(stage); \ echo stage1 > stage_current ; \ echo stage1 > stage_last; \ - $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR) $(TARGET_SUBDIR) + $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR) @if bfd @cd $(HOST_SUBDIR); [ -d stage1-bfd ] || \ mkdir stage1-bfd; \ - set stage1-bfd bfd ; \ - @CREATE_LINK_TO_DIR@ + mv stage1-bfd bfd @endif bfd @if opcodes @cd $(HOST_SUBDIR); [ -d stage1-opcodes ] || \ mkdir stage1-opcodes; \ - set stage1-opcodes opcodes ; \ - @CREATE_LINK_TO_DIR@ + mv stage1-opcodes opcodes @endif opcodes @if binutils @cd $(HOST_SUBDIR); [ -d stage1-binutils ] || \ mkdir stage1-binutils; \ - set stage1-binutils binutils ; \ - @CREATE_LINK_TO_DIR@ + mv stage1-binutils binutils @endif binutils @if gas @cd $(HOST_SUBDIR); [ -d stage1-gas ] || \ mkdir stage1-gas; \ - set stage1-gas gas ; \ - @CREATE_LINK_TO_DIR@ + mv stage1-gas gas @endif gas @if gcc @cd $(HOST_SUBDIR); [ -d stage1-gcc ] || \ mkdir stage1-gcc; \ - set stage1-gcc gcc ; \ - @CREATE_LINK_TO_DIR@ + mv stage1-gcc gcc @endif gcc @if intl @cd $(HOST_SUBDIR); [ -d stage1-intl ] || \ mkdir stage1-intl; \ - set stage1-intl intl ; \ - @CREATE_LINK_TO_DIR@ + mv stage1-intl intl @endif intl @if ld @cd $(HOST_SUBDIR); [ -d stage1-ld ] || \ mkdir stage1-ld; \ - set stage1-ld ld ; \ - @CREATE_LINK_TO_DIR@ + mv stage1-ld ld @endif ld @if libcpp @cd $(HOST_SUBDIR); [ -d stage1-libcpp ] || \ mkdir stage1-libcpp; \ - set stage1-libcpp libcpp ; \ - @CREATE_LINK_TO_DIR@ + mv stage1-libcpp libcpp @endif libcpp +@if libdecnumber + @cd $(HOST_SUBDIR); [ -d stage1-libdecnumber ] || \ + mkdir stage1-libdecnumber; \ + mv stage1-libdecnumber libdecnumber +@endif libdecnumber @if libiberty @cd $(HOST_SUBDIR); [ -d stage1-libiberty ] || \ mkdir stage1-libiberty; \ - set stage1-libiberty libiberty ; \ - @CREATE_LINK_TO_DIR@ + mv stage1-libiberty libiberty @endif libiberty @if zlib @cd $(HOST_SUBDIR); [ -d stage1-zlib ] || \ mkdir stage1-zlib; \ - set stage1-zlib zlib ; \ - @CREATE_LINK_TO_DIR@ + mv stage1-zlib zlib @endif zlib + @[ -d stage1-$(TARGET_SUBDIR) ] || \ + mkdir stage1-$(TARGET_SUBDIR); \ + mv stage1-$(TARGET_SUBDIR) $(TARGET_SUBDIR) -stage1-end:: - @rm -f stage_current +stage1-end:: @if bfd - @cd $(HOST_SUBDIR); set bfd stage1-bfd ; \ - @UNDO_LINK_TO_DIR@ + @if test -d $(HOST_SUBDIR)/bfd ; then \ + cd $(HOST_SUBDIR); mv bfd stage1-bfd ; \ + fi @endif bfd @if opcodes - @cd $(HOST_SUBDIR); set opcodes stage1-opcodes ; \ - @UNDO_LINK_TO_DIR@ + @if test -d $(HOST_SUBDIR)/opcodes ; then \ + cd $(HOST_SUBDIR); mv opcodes stage1-opcodes ; \ + fi @endif opcodes @if binutils - @cd $(HOST_SUBDIR); set binutils stage1-binutils ; \ - @UNDO_LINK_TO_DIR@ + @if test -d $(HOST_SUBDIR)/binutils ; then \ + cd $(HOST_SUBDIR); mv binutils stage1-binutils ; \ + fi @endif binutils @if gas - @cd $(HOST_SUBDIR); set gas stage1-gas ; \ - @UNDO_LINK_TO_DIR@ + @if test -d $(HOST_SUBDIR)/gas ; then \ + cd $(HOST_SUBDIR); mv gas stage1-gas ; \ + fi @endif gas @if gcc - @cd $(HOST_SUBDIR); set gcc stage1-gcc ; \ - @UNDO_LINK_TO_DIR@ + @if test -d $(HOST_SUBDIR)/gcc ; then \ + cd $(HOST_SUBDIR); mv gcc stage1-gcc ; \ + fi @endif gcc @if intl - @cd $(HOST_SUBDIR); set intl stage1-intl ; \ - @UNDO_LINK_TO_DIR@ + @if test -d $(HOST_SUBDIR)/intl ; then \ + cd $(HOST_SUBDIR); mv intl stage1-intl ; \ + fi @endif intl @if ld - @cd $(HOST_SUBDIR); set ld stage1-ld ; \ - @UNDO_LINK_TO_DIR@ + @if test -d $(HOST_SUBDIR)/ld ; then \ + cd $(HOST_SUBDIR); mv ld stage1-ld ; \ + fi @endif ld @if libcpp - @cd $(HOST_SUBDIR); set libcpp stage1-libcpp ; \ - @UNDO_LINK_TO_DIR@ + @if test -d $(HOST_SUBDIR)/libcpp ; then \ + cd $(HOST_SUBDIR); mv libcpp stage1-libcpp ; \ + fi @endif libcpp +@if libdecnumber + @if test -d $(HOST_SUBDIR)/libdecnumber ; then \ + cd $(HOST_SUBDIR); mv libdecnumber stage1-libdecnumber ; \ + fi +@endif libdecnumber @if libiberty - @cd $(HOST_SUBDIR); set libiberty stage1-libiberty ; \ - @UNDO_LINK_TO_DIR@ + @if test -d $(HOST_SUBDIR)/libiberty ; then \ + cd $(HOST_SUBDIR); mv libiberty stage1-libiberty ; \ + fi @endif libiberty @if zlib - @cd $(HOST_SUBDIR); set zlib stage1-zlib ; \ - @UNDO_LINK_TO_DIR@ + @if test -d $(HOST_SUBDIR)/zlib ; then \ + cd $(HOST_SUBDIR); mv zlib stage1-zlib ; \ + fi @endif zlib + @if test -d $(TARGET_SUBDIR) ; then \ + mv $(TARGET_SUBDIR) stage1-$(TARGET_SUBDIR) ; \ + fi + rm -f stage_current -# Bubble a bugfix through all the stages up to stage 1. They -# are remade, but not reconfigured. The next stage (if any) will not -# be reconfigured as well. +# Bubble a bugfix through all the stages up to stage 1. They are +# remade, but not reconfigured. The next stage (if any) will not be +# reconfigured as well. .PHONY: stage1-bubble stage1-bubble:: @r=`${PWD_COMMAND}`; export r; \ @@ -35306,7 +35884,7 @@ do-clean: clean-stage1 .PHONY: distclean-stage1 distclean-stage1:: - [ -f stage_current ] && $(MAKE) `cat stage_current`-end || : + @: $(MAKE); $(stage) rm -rf stage1-* @@ -35316,157 +35894,157 @@ distclean-stage1:: .PHONY: stage2-start stage2-end stage2-start:: - @[ -f stage_current ] && $(MAKE) `cat stage_current`-end || : ; \ + @: $(MAKE); $(stage); \ echo stage2 > stage_current ; \ echo stage2 > stage_last; \ - $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR) $(TARGET_SUBDIR) + $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR) @if bfd @cd $(HOST_SUBDIR); [ -d stage2-bfd ] || \ mkdir stage2-bfd; \ - set stage2-bfd bfd ; \ - @CREATE_LINK_TO_DIR@ ; \ - set stage1-bfd prev-bfd ; \ - @CREATE_LINK_TO_DIR@ + mv stage2-bfd bfd ; \ + mv stage1-bfd prev-bfd || test -f stage1-lean @endif bfd @if opcodes @cd $(HOST_SUBDIR); [ -d stage2-opcodes ] || \ mkdir stage2-opcodes; \ - set stage2-opcodes opcodes ; \ - @CREATE_LINK_TO_DIR@ ; \ - set stage1-opcodes prev-opcodes ; \ - @CREATE_LINK_TO_DIR@ + mv stage2-opcodes opcodes ; \ + mv stage1-opcodes prev-opcodes || test -f stage1-lean @endif opcodes @if binutils @cd $(HOST_SUBDIR); [ -d stage2-binutils ] || \ mkdir stage2-binutils; \ - set stage2-binutils binutils ; \ - @CREATE_LINK_TO_DIR@ ; \ - set stage1-binutils prev-binutils ; \ - @CREATE_LINK_TO_DIR@ + mv stage2-binutils binutils ; \ + mv stage1-binutils prev-binutils || test -f stage1-lean @endif binutils @if gas @cd $(HOST_SUBDIR); [ -d stage2-gas ] || \ mkdir stage2-gas; \ - set stage2-gas gas ; \ - @CREATE_LINK_TO_DIR@ ; \ - set stage1-gas prev-gas ; \ - @CREATE_LINK_TO_DIR@ + mv stage2-gas gas ; \ + mv stage1-gas prev-gas || test -f stage1-lean @endif gas @if gcc @cd $(HOST_SUBDIR); [ -d stage2-gcc ] || \ mkdir stage2-gcc; \ - set stage2-gcc gcc ; \ - @CREATE_LINK_TO_DIR@ ; \ - set stage1-gcc prev-gcc ; \ - @CREATE_LINK_TO_DIR@ + mv stage2-gcc gcc ; \ + mv stage1-gcc prev-gcc || test -f stage1-lean @endif gcc @if intl @cd $(HOST_SUBDIR); [ -d stage2-intl ] || \ mkdir stage2-intl; \ - set stage2-intl intl ; \ - @CREATE_LINK_TO_DIR@ ; \ - set stage1-intl prev-intl ; \ - @CREATE_LINK_TO_DIR@ + mv stage2-intl intl ; \ + mv stage1-intl prev-intl || test -f stage1-lean @endif intl @if ld @cd $(HOST_SUBDIR); [ -d stage2-ld ] || \ mkdir stage2-ld; \ - set stage2-ld ld ; \ - @CREATE_LINK_TO_DIR@ ; \ - set stage1-ld prev-ld ; \ - @CREATE_LINK_TO_DIR@ + mv stage2-ld ld ; \ + mv stage1-ld prev-ld || test -f stage1-lean @endif ld @if libcpp @cd $(HOST_SUBDIR); [ -d stage2-libcpp ] || \ mkdir stage2-libcpp; \ - set stage2-libcpp libcpp ; \ - @CREATE_LINK_TO_DIR@ ; \ - set stage1-libcpp prev-libcpp ; \ - @CREATE_LINK_TO_DIR@ + mv stage2-libcpp libcpp ; \ + mv stage1-libcpp prev-libcpp || test -f stage1-lean @endif libcpp +@if libdecnumber + @cd $(HOST_SUBDIR); [ -d stage2-libdecnumber ] || \ + mkdir stage2-libdecnumber; \ + mv stage2-libdecnumber libdecnumber ; \ + mv stage1-libdecnumber prev-libdecnumber || test -f stage1-lean +@endif libdecnumber @if libiberty @cd $(HOST_SUBDIR); [ -d stage2-libiberty ] || \ mkdir stage2-libiberty; \ - set stage2-libiberty libiberty ; \ - @CREATE_LINK_TO_DIR@ ; \ - set stage1-libiberty prev-libiberty ; \ - @CREATE_LINK_TO_DIR@ + mv stage2-libiberty libiberty ; \ + mv stage1-libiberty prev-libiberty || test -f stage1-lean @endif libiberty @if zlib @cd $(HOST_SUBDIR); [ -d stage2-zlib ] || \ mkdir stage2-zlib; \ - set stage2-zlib zlib ; \ - @CREATE_LINK_TO_DIR@ ; \ - set stage1-zlib prev-zlib ; \ - @CREATE_LINK_TO_DIR@ + mv stage2-zlib zlib ; \ + mv stage1-zlib prev-zlib || test -f stage1-lean @endif zlib + @[ -d stage2-$(TARGET_SUBDIR) ] || \ + mkdir stage2-$(TARGET_SUBDIR); \ + mv stage2-$(TARGET_SUBDIR) $(TARGET_SUBDIR) ; \ + mv stage1-$(TARGET_SUBDIR) prev-$(TARGET_SUBDIR) || test -f stage1-lean -stage2-end:: - @rm -f stage_current +stage2-end:: @if bfd - @cd $(HOST_SUBDIR); set bfd stage2-bfd ; \ - @UNDO_LINK_TO_DIR@ ; \ - set prev-bfd stage1-bfd ; \ - @UNDO_LINK_TO_DIR@ + @if test -d $(HOST_SUBDIR)/bfd ; then \ + cd $(HOST_SUBDIR); mv bfd stage2-bfd ; \ + mv prev-bfd stage1-bfd ; : ; \ + fi @endif bfd @if opcodes - @cd $(HOST_SUBDIR); set opcodes stage2-opcodes ; \ - @UNDO_LINK_TO_DIR@ ; \ - set prev-opcodes stage1-opcodes ; \ - @UNDO_LINK_TO_DIR@ + @if test -d $(HOST_SUBDIR)/opcodes ; then \ + cd $(HOST_SUBDIR); mv opcodes stage2-opcodes ; \ + mv prev-opcodes stage1-opcodes ; : ; \ + fi @endif opcodes @if binutils - @cd $(HOST_SUBDIR); set binutils stage2-binutils ; \ - @UNDO_LINK_TO_DIR@ ; \ - set prev-binutils stage1-binutils ; \ - @UNDO_LINK_TO_DIR@ + @if test -d $(HOST_SUBDIR)/binutils ; then \ + cd $(HOST_SUBDIR); mv binutils stage2-binutils ; \ + mv prev-binutils stage1-binutils ; : ; \ + fi @endif binutils @if gas - @cd $(HOST_SUBDIR); set gas stage2-gas ; \ - @UNDO_LINK_TO_DIR@ ; \ - set prev-gas stage1-gas ; \ - @UNDO_LINK_TO_DIR@ + @if test -d $(HOST_SUBDIR)/gas ; then \ + cd $(HOST_SUBDIR); mv gas stage2-gas ; \ + mv prev-gas stage1-gas ; : ; \ + fi @endif gas @if gcc - @cd $(HOST_SUBDIR); set gcc stage2-gcc ; \ - @UNDO_LINK_TO_DIR@ ; \ - set prev-gcc stage1-gcc ; \ - @UNDO_LINK_TO_DIR@ + @if test -d $(HOST_SUBDIR)/gcc ; then \ + cd $(HOST_SUBDIR); mv gcc stage2-gcc ; \ + mv prev-gcc stage1-gcc ; : ; \ + fi @endif gcc @if intl - @cd $(HOST_SUBDIR); set intl stage2-intl ; \ - @UNDO_LINK_TO_DIR@ ; \ - set prev-intl stage1-intl ; \ - @UNDO_LINK_TO_DIR@ + @if test -d $(HOST_SUBDIR)/intl ; then \ + cd $(HOST_SUBDIR); mv intl stage2-intl ; \ + mv prev-intl stage1-intl ; : ; \ + fi @endif intl @if ld - @cd $(HOST_SUBDIR); set ld stage2-ld ; \ - @UNDO_LINK_TO_DIR@ ; \ - set prev-ld stage1-ld ; \ - @UNDO_LINK_TO_DIR@ + @if test -d $(HOST_SUBDIR)/ld ; then \ + cd $(HOST_SUBDIR); mv ld stage2-ld ; \ + mv prev-ld stage1-ld ; : ; \ + fi @endif ld @if libcpp - @cd $(HOST_SUBDIR); set libcpp stage2-libcpp ; \ - @UNDO_LINK_TO_DIR@ ; \ - set prev-libcpp stage1-libcpp ; \ - @UNDO_LINK_TO_DIR@ + @if test -d $(HOST_SUBDIR)/libcpp ; then \ + cd $(HOST_SUBDIR); mv libcpp stage2-libcpp ; \ + mv prev-libcpp stage1-libcpp ; : ; \ + fi @endif libcpp +@if libdecnumber + @if test -d $(HOST_SUBDIR)/libdecnumber ; then \ + cd $(HOST_SUBDIR); mv libdecnumber stage2-libdecnumber ; \ + mv prev-libdecnumber stage1-libdecnumber ; : ; \ + fi +@endif libdecnumber @if libiberty - @cd $(HOST_SUBDIR); set libiberty stage2-libiberty ; \ - @UNDO_LINK_TO_DIR@ ; \ - set prev-libiberty stage1-libiberty ; \ - @UNDO_LINK_TO_DIR@ + @if test -d $(HOST_SUBDIR)/libiberty ; then \ + cd $(HOST_SUBDIR); mv libiberty stage2-libiberty ; \ + mv prev-libiberty stage1-libiberty ; : ; \ + fi @endif libiberty @if zlib - @cd $(HOST_SUBDIR); set zlib stage2-zlib ; \ - @UNDO_LINK_TO_DIR@ ; \ - set prev-zlib stage1-zlib ; \ - @UNDO_LINK_TO_DIR@ + @if test -d $(HOST_SUBDIR)/zlib ; then \ + cd $(HOST_SUBDIR); mv zlib stage2-zlib ; \ + mv prev-zlib stage1-zlib ; : ; \ + fi @endif zlib + @if test -d $(TARGET_SUBDIR) ; then \ + mv $(TARGET_SUBDIR) stage2-$(TARGET_SUBDIR) ; \ + mv prev-$(TARGET_SUBDIR) stage1-$(TARGET_SUBDIR) ; : ; \ + fi + rm -f stage_current -# Bubble a bugfix through all the stages up to stage 2. They -# are remade, but not reconfigured. The next stage (if any) will not -# be reconfigured as well. +# Bubble a bugfix through all the stages up to stage 2. They are +# remade, but not reconfigured. The next stage (if any) will not be +# reconfigured as well. .PHONY: stage2-bubble stage2-bubble:: stage1-bubble @r=`${PWD_COMMAND}`; export r; \ @@ -35487,16 +36065,33 @@ do-clean: clean-stage2 -.PHONY: bootstrap2 -bootstrap2: stage2-bubble - $(MAKE) $(RECURSE_FLAGS_TO_PASS) all +.PHONY: bootstrap2 bootstrap2-lean +bootstrap2: + echo stage2 > stage_final + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(MAKE) $(RECURSE_FLAGS_TO_PASS) stage2-bubble + @: $(MAKE); $(unstage) + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) all-host all-target + +bootstrap2-lean: + echo stage2 > stage_final + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(MAKE) $(RECURSE_FLAGS_TO_PASS) LEAN=: stage2-bubble + @: $(MAKE); $(unstage) + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) all-host all-target # Rules to wipe a stage and all the following ones, also used for cleanstrap distclean-stage1:: distclean-stage2 .PHONY: distclean-stage2 distclean-stage2:: - [ -f stage_current ] && $(MAKE) `cat stage_current`-end || : + @: $(MAKE); $(stage) rm -rf stage2-* @@ -35506,168 +36101,172 @@ distclean-stage2:: .PHONY: stage3-start stage3-end stage3-start:: - @[ -f stage_current ] && $(MAKE) `cat stage_current`-end || : ; \ + @: $(MAKE); $(stage); \ echo stage3 > stage_current ; \ echo stage3 > stage_last; \ - $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR) $(TARGET_SUBDIR) + $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR) @if bfd @cd $(HOST_SUBDIR); [ -d stage3-bfd ] || \ mkdir stage3-bfd; \ - set stage3-bfd bfd ; \ - @CREATE_LINK_TO_DIR@ ; \ - set stage2-bfd prev-bfd ; \ - @CREATE_LINK_TO_DIR@ + mv stage3-bfd bfd ; \ + mv stage2-bfd prev-bfd || test -f stage2-lean @endif bfd @if opcodes @cd $(HOST_SUBDIR); [ -d stage3-opcodes ] || \ mkdir stage3-opcodes; \ - set stage3-opcodes opcodes ; \ - @CREATE_LINK_TO_DIR@ ; \ - set stage2-opcodes prev-opcodes ; \ - @CREATE_LINK_TO_DIR@ + mv stage3-opcodes opcodes ; \ + mv stage2-opcodes prev-opcodes || test -f stage2-lean @endif opcodes @if binutils @cd $(HOST_SUBDIR); [ -d stage3-binutils ] || \ mkdir stage3-binutils; \ - set stage3-binutils binutils ; \ - @CREATE_LINK_TO_DIR@ ; \ - set stage2-binutils prev-binutils ; \ - @CREATE_LINK_TO_DIR@ + mv stage3-binutils binutils ; \ + mv stage2-binutils prev-binutils || test -f stage2-lean @endif binutils @if gas @cd $(HOST_SUBDIR); [ -d stage3-gas ] || \ mkdir stage3-gas; \ - set stage3-gas gas ; \ - @CREATE_LINK_TO_DIR@ ; \ - set stage2-gas prev-gas ; \ - @CREATE_LINK_TO_DIR@ + mv stage3-gas gas ; \ + mv stage2-gas prev-gas || test -f stage2-lean @endif gas @if gcc @cd $(HOST_SUBDIR); [ -d stage3-gcc ] || \ mkdir stage3-gcc; \ - set stage3-gcc gcc ; \ - @CREATE_LINK_TO_DIR@ ; \ - set stage2-gcc prev-gcc ; \ - @CREATE_LINK_TO_DIR@ + mv stage3-gcc gcc ; \ + mv stage2-gcc prev-gcc || test -f stage2-lean @endif gcc @if intl @cd $(HOST_SUBDIR); [ -d stage3-intl ] || \ mkdir stage3-intl; \ - set stage3-intl intl ; \ - @CREATE_LINK_TO_DIR@ ; \ - set stage2-intl prev-intl ; \ - @CREATE_LINK_TO_DIR@ + mv stage3-intl intl ; \ + mv stage2-intl prev-intl || test -f stage2-lean @endif intl @if ld @cd $(HOST_SUBDIR); [ -d stage3-ld ] || \ mkdir stage3-ld; \ - set stage3-ld ld ; \ - @CREATE_LINK_TO_DIR@ ; \ - set stage2-ld prev-ld ; \ - @CREATE_LINK_TO_DIR@ + mv stage3-ld ld ; \ + mv stage2-ld prev-ld || test -f stage2-lean @endif ld @if libcpp @cd $(HOST_SUBDIR); [ -d stage3-libcpp ] || \ mkdir stage3-libcpp; \ - set stage3-libcpp libcpp ; \ - @CREATE_LINK_TO_DIR@ ; \ - set stage2-libcpp prev-libcpp ; \ - @CREATE_LINK_TO_DIR@ + mv stage3-libcpp libcpp ; \ + mv stage2-libcpp prev-libcpp || test -f stage2-lean @endif libcpp +@if libdecnumber + @cd $(HOST_SUBDIR); [ -d stage3-libdecnumber ] || \ + mkdir stage3-libdecnumber; \ + mv stage3-libdecnumber libdecnumber ; \ + mv stage2-libdecnumber prev-libdecnumber || test -f stage2-lean +@endif libdecnumber @if libiberty @cd $(HOST_SUBDIR); [ -d stage3-libiberty ] || \ mkdir stage3-libiberty; \ - set stage3-libiberty libiberty ; \ - @CREATE_LINK_TO_DIR@ ; \ - set stage2-libiberty prev-libiberty ; \ - @CREATE_LINK_TO_DIR@ + mv stage3-libiberty libiberty ; \ + mv stage2-libiberty prev-libiberty || test -f stage2-lean @endif libiberty @if zlib @cd $(HOST_SUBDIR); [ -d stage3-zlib ] || \ mkdir stage3-zlib; \ - set stage3-zlib zlib ; \ - @CREATE_LINK_TO_DIR@ ; \ - set stage2-zlib prev-zlib ; \ - @CREATE_LINK_TO_DIR@ + mv stage3-zlib zlib ; \ + mv stage2-zlib prev-zlib || test -f stage2-lean @endif zlib + @[ -d stage3-$(TARGET_SUBDIR) ] || \ + mkdir stage3-$(TARGET_SUBDIR); \ + mv stage3-$(TARGET_SUBDIR) $(TARGET_SUBDIR) ; \ + mv stage2-$(TARGET_SUBDIR) prev-$(TARGET_SUBDIR) || test -f stage2-lean -stage3-end:: - @rm -f stage_current +stage3-end:: @if bfd - @cd $(HOST_SUBDIR); set bfd stage3-bfd ; \ - @UNDO_LINK_TO_DIR@ ; \ - set prev-bfd stage2-bfd ; \ - @UNDO_LINK_TO_DIR@ + @if test -d $(HOST_SUBDIR)/bfd ; then \ + cd $(HOST_SUBDIR); mv bfd stage3-bfd ; \ + mv prev-bfd stage2-bfd ; : ; \ + fi @endif bfd @if opcodes - @cd $(HOST_SUBDIR); set opcodes stage3-opcodes ; \ - @UNDO_LINK_TO_DIR@ ; \ - set prev-opcodes stage2-opcodes ; \ - @UNDO_LINK_TO_DIR@ + @if test -d $(HOST_SUBDIR)/opcodes ; then \ + cd $(HOST_SUBDIR); mv opcodes stage3-opcodes ; \ + mv prev-opcodes stage2-opcodes ; : ; \ + fi @endif opcodes @if binutils - @cd $(HOST_SUBDIR); set binutils stage3-binutils ; \ - @UNDO_LINK_TO_DIR@ ; \ - set prev-binutils stage2-binutils ; \ - @UNDO_LINK_TO_DIR@ + @if test -d $(HOST_SUBDIR)/binutils ; then \ + cd $(HOST_SUBDIR); mv binutils stage3-binutils ; \ + mv prev-binutils stage2-binutils ; : ; \ + fi @endif binutils @if gas - @cd $(HOST_SUBDIR); set gas stage3-gas ; \ - @UNDO_LINK_TO_DIR@ ; \ - set prev-gas stage2-gas ; \ - @UNDO_LINK_TO_DIR@ + @if test -d $(HOST_SUBDIR)/gas ; then \ + cd $(HOST_SUBDIR); mv gas stage3-gas ; \ + mv prev-gas stage2-gas ; : ; \ + fi @endif gas @if gcc - @cd $(HOST_SUBDIR); set gcc stage3-gcc ; \ - @UNDO_LINK_TO_DIR@ ; \ - set prev-gcc stage2-gcc ; \ - @UNDO_LINK_TO_DIR@ + @if test -d $(HOST_SUBDIR)/gcc ; then \ + cd $(HOST_SUBDIR); mv gcc stage3-gcc ; \ + mv prev-gcc stage2-gcc ; : ; \ + fi @endif gcc @if intl - @cd $(HOST_SUBDIR); set intl stage3-intl ; \ - @UNDO_LINK_TO_DIR@ ; \ - set prev-intl stage2-intl ; \ - @UNDO_LINK_TO_DIR@ + @if test -d $(HOST_SUBDIR)/intl ; then \ + cd $(HOST_SUBDIR); mv intl stage3-intl ; \ + mv prev-intl stage2-intl ; : ; \ + fi @endif intl @if ld - @cd $(HOST_SUBDIR); set ld stage3-ld ; \ - @UNDO_LINK_TO_DIR@ ; \ - set prev-ld stage2-ld ; \ - @UNDO_LINK_TO_DIR@ + @if test -d $(HOST_SUBDIR)/ld ; then \ + cd $(HOST_SUBDIR); mv ld stage3-ld ; \ + mv prev-ld stage2-ld ; : ; \ + fi @endif ld @if libcpp - @cd $(HOST_SUBDIR); set libcpp stage3-libcpp ; \ - @UNDO_LINK_TO_DIR@ ; \ - set prev-libcpp stage2-libcpp ; \ - @UNDO_LINK_TO_DIR@ + @if test -d $(HOST_SUBDIR)/libcpp ; then \ + cd $(HOST_SUBDIR); mv libcpp stage3-libcpp ; \ + mv prev-libcpp stage2-libcpp ; : ; \ + fi @endif libcpp +@if libdecnumber + @if test -d $(HOST_SUBDIR)/libdecnumber ; then \ + cd $(HOST_SUBDIR); mv libdecnumber stage3-libdecnumber ; \ + mv prev-libdecnumber stage2-libdecnumber ; : ; \ + fi +@endif libdecnumber @if libiberty - @cd $(HOST_SUBDIR); set libiberty stage3-libiberty ; \ - @UNDO_LINK_TO_DIR@ ; \ - set prev-libiberty stage2-libiberty ; \ - @UNDO_LINK_TO_DIR@ + @if test -d $(HOST_SUBDIR)/libiberty ; then \ + cd $(HOST_SUBDIR); mv libiberty stage3-libiberty ; \ + mv prev-libiberty stage2-libiberty ; : ; \ + fi @endif libiberty @if zlib - @cd $(HOST_SUBDIR); set zlib stage3-zlib ; \ - @UNDO_LINK_TO_DIR@ ; \ - set prev-zlib stage2-zlib ; \ - @UNDO_LINK_TO_DIR@ + @if test -d $(HOST_SUBDIR)/zlib ; then \ + cd $(HOST_SUBDIR); mv zlib stage3-zlib ; \ + mv prev-zlib stage2-zlib ; : ; \ + fi @endif zlib + @if test -d $(TARGET_SUBDIR) ; then \ + mv $(TARGET_SUBDIR) stage3-$(TARGET_SUBDIR) ; \ + mv prev-$(TARGET_SUBDIR) stage2-$(TARGET_SUBDIR) ; : ; \ + fi + rm -f stage_current -# Bubble a bugfix through all the stages up to stage 3. They -# are remade, but not reconfigured. The next stage (if any) will not -# be reconfigured as well. +# Bubble a bugfix through all the stages up to stage 3. They are +# remade, but not reconfigured. The next stage (if any) will not be +# reconfigured as well. .PHONY: stage3-bubble stage3-bubble:: stage2-bubble - @bootstrap_lean@-rm -rf stage1-* ; $(STAMP) stage1-lean @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ if test -f stage3-lean || test -f stage2-lean ; then \ echo Skipping rebuild of stage3 ; \ else \ $(MAKE) stage3-start; \ + if $(LEAN); then \ + rm -rf stage1-* ; \ + $(STAMP) stage1-lean ; \ + fi; \ $(MAKE) $(RECURSE_FLAGS_TO_PASS) all-stage3; \ fi + $(MAKE) $(RECURSE_FLAGS_TO_PASS) compare .PHONY: all-stage3 clean-stage3 do-clean: clean-stage3 @@ -35683,7 +36282,7 @@ compare: echo Cannot compare object files as stage 2 was deleted. ; \ exit 0 ; \ fi; \ - [ -f stage_current ] && $(MAKE) `cat stage_current`-end || : ; \ + : $(MAKE); $(stage); \ rm -f .bad_compare ; \ cd stage3-gcc; \ files=`find . -name "*$(objext)" -print` ; \ @@ -35708,21 +36307,40 @@ compare: true; \ fi ; \ $(STAMP) compare - @bootstrap_lean@-rm -rf stage2-* ; $(STAMP) stage2-lean + if $(LEAN); then \ + rm -rf stage2-*; \ + $(STAMP) stage2-lean; \ + fi -.PHONY: bootstrap -bootstrap: stage3-bubble - $(MAKE) compare - $(MAKE) $(RECURSE_FLAGS_TO_PASS) all +.PHONY: bootstrap bootstrap-lean +bootstrap: + echo stage3 > stage_final + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(MAKE) $(RECURSE_FLAGS_TO_PASS) stage3-bubble + @: $(MAKE); $(unstage) + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) all-host all-target + +bootstrap-lean: + echo stage3 > stage_final + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(MAKE) $(RECURSE_FLAGS_TO_PASS) LEAN=: stage3-bubble + @: $(MAKE); $(unstage) + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) all-host all-target # Rules to wipe a stage and all the following ones, also used for cleanstrap distclean-stage2:: distclean-stage3 .PHONY: distclean-stage3 distclean-stage3:: - [ -f stage_current ] && $(MAKE) `cat stage_current`-end || : + @: $(MAKE); $(stage) rm -rf stage3-* compare @@ -35735,168 +36353,172 @@ cleanstrap: distclean bootstrap .PHONY: stage4-start stage4-end stage4-start:: - @[ -f stage_current ] && $(MAKE) `cat stage_current`-end || : ; \ + @: $(MAKE); $(stage); \ echo stage4 > stage_current ; \ echo stage4 > stage_last; \ - $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR) $(TARGET_SUBDIR) + $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR) @if bfd @cd $(HOST_SUBDIR); [ -d stage4-bfd ] || \ mkdir stage4-bfd; \ - set stage4-bfd bfd ; \ - @CREATE_LINK_TO_DIR@ ; \ - set stage3-bfd prev-bfd ; \ - @CREATE_LINK_TO_DIR@ + mv stage4-bfd bfd ; \ + mv stage3-bfd prev-bfd || test -f stage3-lean @endif bfd @if opcodes @cd $(HOST_SUBDIR); [ -d stage4-opcodes ] || \ mkdir stage4-opcodes; \ - set stage4-opcodes opcodes ; \ - @CREATE_LINK_TO_DIR@ ; \ - set stage3-opcodes prev-opcodes ; \ - @CREATE_LINK_TO_DIR@ + mv stage4-opcodes opcodes ; \ + mv stage3-opcodes prev-opcodes || test -f stage3-lean @endif opcodes @if binutils @cd $(HOST_SUBDIR); [ -d stage4-binutils ] || \ mkdir stage4-binutils; \ - set stage4-binutils binutils ; \ - @CREATE_LINK_TO_DIR@ ; \ - set stage3-binutils prev-binutils ; \ - @CREATE_LINK_TO_DIR@ + mv stage4-binutils binutils ; \ + mv stage3-binutils prev-binutils || test -f stage3-lean @endif binutils @if gas @cd $(HOST_SUBDIR); [ -d stage4-gas ] || \ mkdir stage4-gas; \ - set stage4-gas gas ; \ - @CREATE_LINK_TO_DIR@ ; \ - set stage3-gas prev-gas ; \ - @CREATE_LINK_TO_DIR@ + mv stage4-gas gas ; \ + mv stage3-gas prev-gas || test -f stage3-lean @endif gas @if gcc @cd $(HOST_SUBDIR); [ -d stage4-gcc ] || \ mkdir stage4-gcc; \ - set stage4-gcc gcc ; \ - @CREATE_LINK_TO_DIR@ ; \ - set stage3-gcc prev-gcc ; \ - @CREATE_LINK_TO_DIR@ + mv stage4-gcc gcc ; \ + mv stage3-gcc prev-gcc || test -f stage3-lean @endif gcc @if intl @cd $(HOST_SUBDIR); [ -d stage4-intl ] || \ mkdir stage4-intl; \ - set stage4-intl intl ; \ - @CREATE_LINK_TO_DIR@ ; \ - set stage3-intl prev-intl ; \ - @CREATE_LINK_TO_DIR@ + mv stage4-intl intl ; \ + mv stage3-intl prev-intl || test -f stage3-lean @endif intl @if ld @cd $(HOST_SUBDIR); [ -d stage4-ld ] || \ mkdir stage4-ld; \ - set stage4-ld ld ; \ - @CREATE_LINK_TO_DIR@ ; \ - set stage3-ld prev-ld ; \ - @CREATE_LINK_TO_DIR@ + mv stage4-ld ld ; \ + mv stage3-ld prev-ld || test -f stage3-lean @endif ld @if libcpp @cd $(HOST_SUBDIR); [ -d stage4-libcpp ] || \ mkdir stage4-libcpp; \ - set stage4-libcpp libcpp ; \ - @CREATE_LINK_TO_DIR@ ; \ - set stage3-libcpp prev-libcpp ; \ - @CREATE_LINK_TO_DIR@ + mv stage4-libcpp libcpp ; \ + mv stage3-libcpp prev-libcpp || test -f stage3-lean @endif libcpp +@if libdecnumber + @cd $(HOST_SUBDIR); [ -d stage4-libdecnumber ] || \ + mkdir stage4-libdecnumber; \ + mv stage4-libdecnumber libdecnumber ; \ + mv stage3-libdecnumber prev-libdecnumber || test -f stage3-lean +@endif libdecnumber @if libiberty @cd $(HOST_SUBDIR); [ -d stage4-libiberty ] || \ mkdir stage4-libiberty; \ - set stage4-libiberty libiberty ; \ - @CREATE_LINK_TO_DIR@ ; \ - set stage3-libiberty prev-libiberty ; \ - @CREATE_LINK_TO_DIR@ + mv stage4-libiberty libiberty ; \ + mv stage3-libiberty prev-libiberty || test -f stage3-lean @endif libiberty @if zlib @cd $(HOST_SUBDIR); [ -d stage4-zlib ] || \ mkdir stage4-zlib; \ - set stage4-zlib zlib ; \ - @CREATE_LINK_TO_DIR@ ; \ - set stage3-zlib prev-zlib ; \ - @CREATE_LINK_TO_DIR@ + mv stage4-zlib zlib ; \ + mv stage3-zlib prev-zlib || test -f stage3-lean @endif zlib + @[ -d stage4-$(TARGET_SUBDIR) ] || \ + mkdir stage4-$(TARGET_SUBDIR); \ + mv stage4-$(TARGET_SUBDIR) $(TARGET_SUBDIR) ; \ + mv stage3-$(TARGET_SUBDIR) prev-$(TARGET_SUBDIR) || test -f stage3-lean -stage4-end:: - @rm -f stage_current +stage4-end:: @if bfd - @cd $(HOST_SUBDIR); set bfd stage4-bfd ; \ - @UNDO_LINK_TO_DIR@ ; \ - set prev-bfd stage3-bfd ; \ - @UNDO_LINK_TO_DIR@ + @if test -d $(HOST_SUBDIR)/bfd ; then \ + cd $(HOST_SUBDIR); mv bfd stage4-bfd ; \ + mv prev-bfd stage3-bfd ; : ; \ + fi @endif bfd @if opcodes - @cd $(HOST_SUBDIR); set opcodes stage4-opcodes ; \ - @UNDO_LINK_TO_DIR@ ; \ - set prev-opcodes stage3-opcodes ; \ - @UNDO_LINK_TO_DIR@ + @if test -d $(HOST_SUBDIR)/opcodes ; then \ + cd $(HOST_SUBDIR); mv opcodes stage4-opcodes ; \ + mv prev-opcodes stage3-opcodes ; : ; \ + fi @endif opcodes @if binutils - @cd $(HOST_SUBDIR); set binutils stage4-binutils ; \ - @UNDO_LINK_TO_DIR@ ; \ - set prev-binutils stage3-binutils ; \ - @UNDO_LINK_TO_DIR@ + @if test -d $(HOST_SUBDIR)/binutils ; then \ + cd $(HOST_SUBDIR); mv binutils stage4-binutils ; \ + mv prev-binutils stage3-binutils ; : ; \ + fi @endif binutils @if gas - @cd $(HOST_SUBDIR); set gas stage4-gas ; \ - @UNDO_LINK_TO_DIR@ ; \ - set prev-gas stage3-gas ; \ - @UNDO_LINK_TO_DIR@ + @if test -d $(HOST_SUBDIR)/gas ; then \ + cd $(HOST_SUBDIR); mv gas stage4-gas ; \ + mv prev-gas stage3-gas ; : ; \ + fi @endif gas @if gcc - @cd $(HOST_SUBDIR); set gcc stage4-gcc ; \ - @UNDO_LINK_TO_DIR@ ; \ - set prev-gcc stage3-gcc ; \ - @UNDO_LINK_TO_DIR@ + @if test -d $(HOST_SUBDIR)/gcc ; then \ + cd $(HOST_SUBDIR); mv gcc stage4-gcc ; \ + mv prev-gcc stage3-gcc ; : ; \ + fi @endif gcc @if intl - @cd $(HOST_SUBDIR); set intl stage4-intl ; \ - @UNDO_LINK_TO_DIR@ ; \ - set prev-intl stage3-intl ; \ - @UNDO_LINK_TO_DIR@ + @if test -d $(HOST_SUBDIR)/intl ; then \ + cd $(HOST_SUBDIR); mv intl stage4-intl ; \ + mv prev-intl stage3-intl ; : ; \ + fi @endif intl @if ld - @cd $(HOST_SUBDIR); set ld stage4-ld ; \ - @UNDO_LINK_TO_DIR@ ; \ - set prev-ld stage3-ld ; \ - @UNDO_LINK_TO_DIR@ + @if test -d $(HOST_SUBDIR)/ld ; then \ + cd $(HOST_SUBDIR); mv ld stage4-ld ; \ + mv prev-ld stage3-ld ; : ; \ + fi @endif ld @if libcpp - @cd $(HOST_SUBDIR); set libcpp stage4-libcpp ; \ - @UNDO_LINK_TO_DIR@ ; \ - set prev-libcpp stage3-libcpp ; \ - @UNDO_LINK_TO_DIR@ + @if test -d $(HOST_SUBDIR)/libcpp ; then \ + cd $(HOST_SUBDIR); mv libcpp stage4-libcpp ; \ + mv prev-libcpp stage3-libcpp ; : ; \ + fi @endif libcpp +@if libdecnumber + @if test -d $(HOST_SUBDIR)/libdecnumber ; then \ + cd $(HOST_SUBDIR); mv libdecnumber stage4-libdecnumber ; \ + mv prev-libdecnumber stage3-libdecnumber ; : ; \ + fi +@endif libdecnumber @if libiberty - @cd $(HOST_SUBDIR); set libiberty stage4-libiberty ; \ - @UNDO_LINK_TO_DIR@ ; \ - set prev-libiberty stage3-libiberty ; \ - @UNDO_LINK_TO_DIR@ + @if test -d $(HOST_SUBDIR)/libiberty ; then \ + cd $(HOST_SUBDIR); mv libiberty stage4-libiberty ; \ + mv prev-libiberty stage3-libiberty ; : ; \ + fi @endif libiberty @if zlib - @cd $(HOST_SUBDIR); set zlib stage4-zlib ; \ - @UNDO_LINK_TO_DIR@ ; \ - set prev-zlib stage3-zlib ; \ - @UNDO_LINK_TO_DIR@ + @if test -d $(HOST_SUBDIR)/zlib ; then \ + cd $(HOST_SUBDIR); mv zlib stage4-zlib ; \ + mv prev-zlib stage3-zlib ; : ; \ + fi @endif zlib + @if test -d $(TARGET_SUBDIR) ; then \ + mv $(TARGET_SUBDIR) stage4-$(TARGET_SUBDIR) ; \ + mv prev-$(TARGET_SUBDIR) stage3-$(TARGET_SUBDIR) ; : ; \ + fi + rm -f stage_current -# Bubble a bugfix through all the stages up to stage 4. They -# are remade, but not reconfigured. The next stage (if any) will not -# be reconfigured as well. +# Bubble a bugfix through all the stages up to stage 4. They are +# remade, but not reconfigured. The next stage (if any) will not be +# reconfigured as well. .PHONY: stage4-bubble stage4-bubble:: stage3-bubble - @bootstrap_lean@-rm -rf stage2-* ; $(STAMP) stage2-lean @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ if test -f stage4-lean || test -f stage3-lean ; then \ echo Skipping rebuild of stage4 ; \ else \ $(MAKE) stage4-start; \ + if $(LEAN); then \ + rm -rf stage2-* ; \ + $(STAMP) stage2-lean ; \ + fi; \ $(MAKE) $(RECURSE_FLAGS_TO_PASS) all-stage4; \ fi + $(MAKE) $(RECURSE_FLAGS_TO_PASS) compare3 .PHONY: all-stage4 clean-stage4 do-clean: clean-stage4 @@ -35912,7 +36534,7 @@ compare3: echo Cannot compare object files as stage 3 was deleted. ; \ exit 0 ; \ fi; \ - [ -f stage_current ] && $(MAKE) `cat stage_current`-end || : ; \ + : $(MAKE); $(stage); \ rm -f .bad_compare ; \ cd stage4-gcc; \ files=`find . -name "*$(objext)" -print` ; \ @@ -35937,21 +36559,40 @@ compare3: true; \ fi ; \ $(STAMP) compare3 - @bootstrap_lean@-rm -rf stage3-* ; $(STAMP) stage3-lean + if $(LEAN); then \ + rm -rf stage3-*; \ + $(STAMP) stage3-lean; \ + fi -.PHONY: bootstrap4 -bootstrap4: stage4-bubble - $(MAKE) compare3 - $(MAKE) $(RECURSE_FLAGS_TO_PASS) all +.PHONY: bootstrap4 bootstrap4-lean +bootstrap4: + echo stage4 > stage_final + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(MAKE) $(RECURSE_FLAGS_TO_PASS) stage4-bubble + @: $(MAKE); $(unstage) + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) all-host all-target + +bootstrap4-lean: + echo stage4 > stage_final + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(MAKE) $(RECURSE_FLAGS_TO_PASS) LEAN=: stage4-bubble + @: $(MAKE); $(unstage) + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) all-host all-target # Rules to wipe a stage and all the following ones, also used for cleanstrap distclean-stage3:: distclean-stage4 .PHONY: distclean-stage4 distclean-stage4:: - [ -f stage_current ] && $(MAKE) `cat stage_current`-end || : + @: $(MAKE); $(stage) rm -rf stage4-* compare3 @@ -35961,157 +36602,157 @@ distclean-stage4:: .PHONY: stageprofile-start stageprofile-end stageprofile-start:: - @[ -f stage_current ] && $(MAKE) `cat stage_current`-end || : ; \ + @: $(MAKE); $(stage); \ echo stageprofile > stage_current ; \ echo stageprofile > stage_last; \ - $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR) $(TARGET_SUBDIR) + $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR) @if bfd @cd $(HOST_SUBDIR); [ -d stageprofile-bfd ] || \ mkdir stageprofile-bfd; \ - set stageprofile-bfd bfd ; \ - @CREATE_LINK_TO_DIR@ ; \ - set stage1-bfd prev-bfd ; \ - @CREATE_LINK_TO_DIR@ + mv stageprofile-bfd bfd ; \ + mv stage1-bfd prev-bfd || test -f stage1-lean @endif bfd @if opcodes @cd $(HOST_SUBDIR); [ -d stageprofile-opcodes ] || \ mkdir stageprofile-opcodes; \ - set stageprofile-opcodes opcodes ; \ - @CREATE_LINK_TO_DIR@ ; \ - set stage1-opcodes prev-opcodes ; \ - @CREATE_LINK_TO_DIR@ + mv stageprofile-opcodes opcodes ; \ + mv stage1-opcodes prev-opcodes || test -f stage1-lean @endif opcodes @if binutils @cd $(HOST_SUBDIR); [ -d stageprofile-binutils ] || \ mkdir stageprofile-binutils; \ - set stageprofile-binutils binutils ; \ - @CREATE_LINK_TO_DIR@ ; \ - set stage1-binutils prev-binutils ; \ - @CREATE_LINK_TO_DIR@ + mv stageprofile-binutils binutils ; \ + mv stage1-binutils prev-binutils || test -f stage1-lean @endif binutils @if gas @cd $(HOST_SUBDIR); [ -d stageprofile-gas ] || \ mkdir stageprofile-gas; \ - set stageprofile-gas gas ; \ - @CREATE_LINK_TO_DIR@ ; \ - set stage1-gas prev-gas ; \ - @CREATE_LINK_TO_DIR@ + mv stageprofile-gas gas ; \ + mv stage1-gas prev-gas || test -f stage1-lean @endif gas @if gcc @cd $(HOST_SUBDIR); [ -d stageprofile-gcc ] || \ mkdir stageprofile-gcc; \ - set stageprofile-gcc gcc ; \ - @CREATE_LINK_TO_DIR@ ; \ - set stage1-gcc prev-gcc ; \ - @CREATE_LINK_TO_DIR@ + mv stageprofile-gcc gcc ; \ + mv stage1-gcc prev-gcc || test -f stage1-lean @endif gcc @if intl @cd $(HOST_SUBDIR); [ -d stageprofile-intl ] || \ mkdir stageprofile-intl; \ - set stageprofile-intl intl ; \ - @CREATE_LINK_TO_DIR@ ; \ - set stage1-intl prev-intl ; \ - @CREATE_LINK_TO_DIR@ + mv stageprofile-intl intl ; \ + mv stage1-intl prev-intl || test -f stage1-lean @endif intl @if ld @cd $(HOST_SUBDIR); [ -d stageprofile-ld ] || \ mkdir stageprofile-ld; \ - set stageprofile-ld ld ; \ - @CREATE_LINK_TO_DIR@ ; \ - set stage1-ld prev-ld ; \ - @CREATE_LINK_TO_DIR@ + mv stageprofile-ld ld ; \ + mv stage1-ld prev-ld || test -f stage1-lean @endif ld @if libcpp @cd $(HOST_SUBDIR); [ -d stageprofile-libcpp ] || \ mkdir stageprofile-libcpp; \ - set stageprofile-libcpp libcpp ; \ - @CREATE_LINK_TO_DIR@ ; \ - set stage1-libcpp prev-libcpp ; \ - @CREATE_LINK_TO_DIR@ + mv stageprofile-libcpp libcpp ; \ + mv stage1-libcpp prev-libcpp || test -f stage1-lean @endif libcpp +@if libdecnumber + @cd $(HOST_SUBDIR); [ -d stageprofile-libdecnumber ] || \ + mkdir stageprofile-libdecnumber; \ + mv stageprofile-libdecnumber libdecnumber ; \ + mv stage1-libdecnumber prev-libdecnumber || test -f stage1-lean +@endif libdecnumber @if libiberty @cd $(HOST_SUBDIR); [ -d stageprofile-libiberty ] || \ mkdir stageprofile-libiberty; \ - set stageprofile-libiberty libiberty ; \ - @CREATE_LINK_TO_DIR@ ; \ - set stage1-libiberty prev-libiberty ; \ - @CREATE_LINK_TO_DIR@ + mv stageprofile-libiberty libiberty ; \ + mv stage1-libiberty prev-libiberty || test -f stage1-lean @endif libiberty @if zlib @cd $(HOST_SUBDIR); [ -d stageprofile-zlib ] || \ mkdir stageprofile-zlib; \ - set stageprofile-zlib zlib ; \ - @CREATE_LINK_TO_DIR@ ; \ - set stage1-zlib prev-zlib ; \ - @CREATE_LINK_TO_DIR@ + mv stageprofile-zlib zlib ; \ + mv stage1-zlib prev-zlib || test -f stage1-lean @endif zlib + @[ -d stageprofile-$(TARGET_SUBDIR) ] || \ + mkdir stageprofile-$(TARGET_SUBDIR); \ + mv stageprofile-$(TARGET_SUBDIR) $(TARGET_SUBDIR) ; \ + mv stage1-$(TARGET_SUBDIR) prev-$(TARGET_SUBDIR) || test -f stage1-lean -stageprofile-end:: - @rm -f stage_current +stageprofile-end:: @if bfd - @cd $(HOST_SUBDIR); set bfd stageprofile-bfd ; \ - @UNDO_LINK_TO_DIR@ ; \ - set prev-bfd stage1-bfd ; \ - @UNDO_LINK_TO_DIR@ + @if test -d $(HOST_SUBDIR)/bfd ; then \ + cd $(HOST_SUBDIR); mv bfd stageprofile-bfd ; \ + mv prev-bfd stage1-bfd ; : ; \ + fi @endif bfd @if opcodes - @cd $(HOST_SUBDIR); set opcodes stageprofile-opcodes ; \ - @UNDO_LINK_TO_DIR@ ; \ - set prev-opcodes stage1-opcodes ; \ - @UNDO_LINK_TO_DIR@ + @if test -d $(HOST_SUBDIR)/opcodes ; then \ + cd $(HOST_SUBDIR); mv opcodes stageprofile-opcodes ; \ + mv prev-opcodes stage1-opcodes ; : ; \ + fi @endif opcodes @if binutils - @cd $(HOST_SUBDIR); set binutils stageprofile-binutils ; \ - @UNDO_LINK_TO_DIR@ ; \ - set prev-binutils stage1-binutils ; \ - @UNDO_LINK_TO_DIR@ + @if test -d $(HOST_SUBDIR)/binutils ; then \ + cd $(HOST_SUBDIR); mv binutils stageprofile-binutils ; \ + mv prev-binutils stage1-binutils ; : ; \ + fi @endif binutils @if gas - @cd $(HOST_SUBDIR); set gas stageprofile-gas ; \ - @UNDO_LINK_TO_DIR@ ; \ - set prev-gas stage1-gas ; \ - @UNDO_LINK_TO_DIR@ + @if test -d $(HOST_SUBDIR)/gas ; then \ + cd $(HOST_SUBDIR); mv gas stageprofile-gas ; \ + mv prev-gas stage1-gas ; : ; \ + fi @endif gas @if gcc - @cd $(HOST_SUBDIR); set gcc stageprofile-gcc ; \ - @UNDO_LINK_TO_DIR@ ; \ - set prev-gcc stage1-gcc ; \ - @UNDO_LINK_TO_DIR@ + @if test -d $(HOST_SUBDIR)/gcc ; then \ + cd $(HOST_SUBDIR); mv gcc stageprofile-gcc ; \ + mv prev-gcc stage1-gcc ; : ; \ + fi @endif gcc @if intl - @cd $(HOST_SUBDIR); set intl stageprofile-intl ; \ - @UNDO_LINK_TO_DIR@ ; \ - set prev-intl stage1-intl ; \ - @UNDO_LINK_TO_DIR@ + @if test -d $(HOST_SUBDIR)/intl ; then \ + cd $(HOST_SUBDIR); mv intl stageprofile-intl ; \ + mv prev-intl stage1-intl ; : ; \ + fi @endif intl @if ld - @cd $(HOST_SUBDIR); set ld stageprofile-ld ; \ - @UNDO_LINK_TO_DIR@ ; \ - set prev-ld stage1-ld ; \ - @UNDO_LINK_TO_DIR@ + @if test -d $(HOST_SUBDIR)/ld ; then \ + cd $(HOST_SUBDIR); mv ld stageprofile-ld ; \ + mv prev-ld stage1-ld ; : ; \ + fi @endif ld @if libcpp - @cd $(HOST_SUBDIR); set libcpp stageprofile-libcpp ; \ - @UNDO_LINK_TO_DIR@ ; \ - set prev-libcpp stage1-libcpp ; \ - @UNDO_LINK_TO_DIR@ + @if test -d $(HOST_SUBDIR)/libcpp ; then \ + cd $(HOST_SUBDIR); mv libcpp stageprofile-libcpp ; \ + mv prev-libcpp stage1-libcpp ; : ; \ + fi @endif libcpp +@if libdecnumber + @if test -d $(HOST_SUBDIR)/libdecnumber ; then \ + cd $(HOST_SUBDIR); mv libdecnumber stageprofile-libdecnumber ; \ + mv prev-libdecnumber stage1-libdecnumber ; : ; \ + fi +@endif libdecnumber @if libiberty - @cd $(HOST_SUBDIR); set libiberty stageprofile-libiberty ; \ - @UNDO_LINK_TO_DIR@ ; \ - set prev-libiberty stage1-libiberty ; \ - @UNDO_LINK_TO_DIR@ + @if test -d $(HOST_SUBDIR)/libiberty ; then \ + cd $(HOST_SUBDIR); mv libiberty stageprofile-libiberty ; \ + mv prev-libiberty stage1-libiberty ; : ; \ + fi @endif libiberty @if zlib - @cd $(HOST_SUBDIR); set zlib stageprofile-zlib ; \ - @UNDO_LINK_TO_DIR@ ; \ - set prev-zlib stage1-zlib ; \ - @UNDO_LINK_TO_DIR@ + @if test -d $(HOST_SUBDIR)/zlib ; then \ + cd $(HOST_SUBDIR); mv zlib stageprofile-zlib ; \ + mv prev-zlib stage1-zlib ; : ; \ + fi @endif zlib + @if test -d $(TARGET_SUBDIR) ; then \ + mv $(TARGET_SUBDIR) stageprofile-$(TARGET_SUBDIR) ; \ + mv prev-$(TARGET_SUBDIR) stage1-$(TARGET_SUBDIR) ; : ; \ + fi + rm -f stage_current -# Bubble a bugfix through all the stages up to stage profile. They -# are remade, but not reconfigured. The next stage (if any) will not -# be reconfigured as well. +# Bubble a bugfix through all the stages up to stage profile. They are +# remade, but not reconfigured. The next stage (if any) will not be +# reconfigured as well. .PHONY: stageprofile-bubble stageprofile-bubble:: stage1-bubble @r=`${PWD_COMMAND}`; export r; \ @@ -36137,7 +36778,7 @@ do-clean: clean-stageprofile distclean-stage1:: distclean-stageprofile .PHONY: distclean-stageprofile distclean-stageprofile:: - [ -f stage_current ] && $(MAKE) `cat stage_current`-end || : + @: $(MAKE); $(stage) rm -rf stageprofile-* @@ -36147,157 +36788,157 @@ distclean-stageprofile:: .PHONY: stagefeedback-start stagefeedback-end stagefeedback-start:: - @[ -f stage_current ] && $(MAKE) `cat stage_current`-end || : ; \ + @: $(MAKE); $(stage); \ echo stagefeedback > stage_current ; \ echo stagefeedback > stage_last; \ - $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR) $(TARGET_SUBDIR) + $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR) @if bfd @cd $(HOST_SUBDIR); [ -d stagefeedback-bfd ] || \ mkdir stagefeedback-bfd; \ - set stagefeedback-bfd bfd ; \ - @CREATE_LINK_TO_DIR@ ; \ - set stageprofile-bfd prev-bfd ; \ - @CREATE_LINK_TO_DIR@ + mv stagefeedback-bfd bfd ; \ + mv stageprofile-bfd prev-bfd || test -f stageprofile-lean @endif bfd @if opcodes @cd $(HOST_SUBDIR); [ -d stagefeedback-opcodes ] || \ mkdir stagefeedback-opcodes; \ - set stagefeedback-opcodes opcodes ; \ - @CREATE_LINK_TO_DIR@ ; \ - set stageprofile-opcodes prev-opcodes ; \ - @CREATE_LINK_TO_DIR@ + mv stagefeedback-opcodes opcodes ; \ + mv stageprofile-opcodes prev-opcodes || test -f stageprofile-lean @endif opcodes @if binutils @cd $(HOST_SUBDIR); [ -d stagefeedback-binutils ] || \ mkdir stagefeedback-binutils; \ - set stagefeedback-binutils binutils ; \ - @CREATE_LINK_TO_DIR@ ; \ - set stageprofile-binutils prev-binutils ; \ - @CREATE_LINK_TO_DIR@ + mv stagefeedback-binutils binutils ; \ + mv stageprofile-binutils prev-binutils || test -f stageprofile-lean @endif binutils @if gas @cd $(HOST_SUBDIR); [ -d stagefeedback-gas ] || \ mkdir stagefeedback-gas; \ - set stagefeedback-gas gas ; \ - @CREATE_LINK_TO_DIR@ ; \ - set stageprofile-gas prev-gas ; \ - @CREATE_LINK_TO_DIR@ + mv stagefeedback-gas gas ; \ + mv stageprofile-gas prev-gas || test -f stageprofile-lean @endif gas @if gcc @cd $(HOST_SUBDIR); [ -d stagefeedback-gcc ] || \ mkdir stagefeedback-gcc; \ - set stagefeedback-gcc gcc ; \ - @CREATE_LINK_TO_DIR@ ; \ - set stageprofile-gcc prev-gcc ; \ - @CREATE_LINK_TO_DIR@ + mv stagefeedback-gcc gcc ; \ + mv stageprofile-gcc prev-gcc || test -f stageprofile-lean @endif gcc @if intl @cd $(HOST_SUBDIR); [ -d stagefeedback-intl ] || \ mkdir stagefeedback-intl; \ - set stagefeedback-intl intl ; \ - @CREATE_LINK_TO_DIR@ ; \ - set stageprofile-intl prev-intl ; \ - @CREATE_LINK_TO_DIR@ + mv stagefeedback-intl intl ; \ + mv stageprofile-intl prev-intl || test -f stageprofile-lean @endif intl @if ld @cd $(HOST_SUBDIR); [ -d stagefeedback-ld ] || \ mkdir stagefeedback-ld; \ - set stagefeedback-ld ld ; \ - @CREATE_LINK_TO_DIR@ ; \ - set stageprofile-ld prev-ld ; \ - @CREATE_LINK_TO_DIR@ + mv stagefeedback-ld ld ; \ + mv stageprofile-ld prev-ld || test -f stageprofile-lean @endif ld @if libcpp @cd $(HOST_SUBDIR); [ -d stagefeedback-libcpp ] || \ mkdir stagefeedback-libcpp; \ - set stagefeedback-libcpp libcpp ; \ - @CREATE_LINK_TO_DIR@ ; \ - set stageprofile-libcpp prev-libcpp ; \ - @CREATE_LINK_TO_DIR@ + mv stagefeedback-libcpp libcpp ; \ + mv stageprofile-libcpp prev-libcpp || test -f stageprofile-lean @endif libcpp +@if libdecnumber + @cd $(HOST_SUBDIR); [ -d stagefeedback-libdecnumber ] || \ + mkdir stagefeedback-libdecnumber; \ + mv stagefeedback-libdecnumber libdecnumber ; \ + mv stageprofile-libdecnumber prev-libdecnumber || test -f stageprofile-lean +@endif libdecnumber @if libiberty @cd $(HOST_SUBDIR); [ -d stagefeedback-libiberty ] || \ mkdir stagefeedback-libiberty; \ - set stagefeedback-libiberty libiberty ; \ - @CREATE_LINK_TO_DIR@ ; \ - set stageprofile-libiberty prev-libiberty ; \ - @CREATE_LINK_TO_DIR@ + mv stagefeedback-libiberty libiberty ; \ + mv stageprofile-libiberty prev-libiberty || test -f stageprofile-lean @endif libiberty @if zlib @cd $(HOST_SUBDIR); [ -d stagefeedback-zlib ] || \ mkdir stagefeedback-zlib; \ - set stagefeedback-zlib zlib ; \ - @CREATE_LINK_TO_DIR@ ; \ - set stageprofile-zlib prev-zlib ; \ - @CREATE_LINK_TO_DIR@ + mv stagefeedback-zlib zlib ; \ + mv stageprofile-zlib prev-zlib || test -f stageprofile-lean @endif zlib + @[ -d stagefeedback-$(TARGET_SUBDIR) ] || \ + mkdir stagefeedback-$(TARGET_SUBDIR); \ + mv stagefeedback-$(TARGET_SUBDIR) $(TARGET_SUBDIR) ; \ + mv stageprofile-$(TARGET_SUBDIR) prev-$(TARGET_SUBDIR) || test -f stageprofile-lean -stagefeedback-end:: - @rm -f stage_current +stagefeedback-end:: @if bfd - @cd $(HOST_SUBDIR); set bfd stagefeedback-bfd ; \ - @UNDO_LINK_TO_DIR@ ; \ - set prev-bfd stageprofile-bfd ; \ - @UNDO_LINK_TO_DIR@ + @if test -d $(HOST_SUBDIR)/bfd ; then \ + cd $(HOST_SUBDIR); mv bfd stagefeedback-bfd ; \ + mv prev-bfd stageprofile-bfd ; : ; \ + fi @endif bfd @if opcodes - @cd $(HOST_SUBDIR); set opcodes stagefeedback-opcodes ; \ - @UNDO_LINK_TO_DIR@ ; \ - set prev-opcodes stageprofile-opcodes ; \ - @UNDO_LINK_TO_DIR@ + @if test -d $(HOST_SUBDIR)/opcodes ; then \ + cd $(HOST_SUBDIR); mv opcodes stagefeedback-opcodes ; \ + mv prev-opcodes stageprofile-opcodes ; : ; \ + fi @endif opcodes @if binutils - @cd $(HOST_SUBDIR); set binutils stagefeedback-binutils ; \ - @UNDO_LINK_TO_DIR@ ; \ - set prev-binutils stageprofile-binutils ; \ - @UNDO_LINK_TO_DIR@ + @if test -d $(HOST_SUBDIR)/binutils ; then \ + cd $(HOST_SUBDIR); mv binutils stagefeedback-binutils ; \ + mv prev-binutils stageprofile-binutils ; : ; \ + fi @endif binutils @if gas - @cd $(HOST_SUBDIR); set gas stagefeedback-gas ; \ - @UNDO_LINK_TO_DIR@ ; \ - set prev-gas stageprofile-gas ; \ - @UNDO_LINK_TO_DIR@ + @if test -d $(HOST_SUBDIR)/gas ; then \ + cd $(HOST_SUBDIR); mv gas stagefeedback-gas ; \ + mv prev-gas stageprofile-gas ; : ; \ + fi @endif gas @if gcc - @cd $(HOST_SUBDIR); set gcc stagefeedback-gcc ; \ - @UNDO_LINK_TO_DIR@ ; \ - set prev-gcc stageprofile-gcc ; \ - @UNDO_LINK_TO_DIR@ + @if test -d $(HOST_SUBDIR)/gcc ; then \ + cd $(HOST_SUBDIR); mv gcc stagefeedback-gcc ; \ + mv prev-gcc stageprofile-gcc ; : ; \ + fi @endif gcc @if intl - @cd $(HOST_SUBDIR); set intl stagefeedback-intl ; \ - @UNDO_LINK_TO_DIR@ ; \ - set prev-intl stageprofile-intl ; \ - @UNDO_LINK_TO_DIR@ + @if test -d $(HOST_SUBDIR)/intl ; then \ + cd $(HOST_SUBDIR); mv intl stagefeedback-intl ; \ + mv prev-intl stageprofile-intl ; : ; \ + fi @endif intl @if ld - @cd $(HOST_SUBDIR); set ld stagefeedback-ld ; \ - @UNDO_LINK_TO_DIR@ ; \ - set prev-ld stageprofile-ld ; \ - @UNDO_LINK_TO_DIR@ + @if test -d $(HOST_SUBDIR)/ld ; then \ + cd $(HOST_SUBDIR); mv ld stagefeedback-ld ; \ + mv prev-ld stageprofile-ld ; : ; \ + fi @endif ld @if libcpp - @cd $(HOST_SUBDIR); set libcpp stagefeedback-libcpp ; \ - @UNDO_LINK_TO_DIR@ ; \ - set prev-libcpp stageprofile-libcpp ; \ - @UNDO_LINK_TO_DIR@ + @if test -d $(HOST_SUBDIR)/libcpp ; then \ + cd $(HOST_SUBDIR); mv libcpp stagefeedback-libcpp ; \ + mv prev-libcpp stageprofile-libcpp ; : ; \ + fi @endif libcpp +@if libdecnumber + @if test -d $(HOST_SUBDIR)/libdecnumber ; then \ + cd $(HOST_SUBDIR); mv libdecnumber stagefeedback-libdecnumber ; \ + mv prev-libdecnumber stageprofile-libdecnumber ; : ; \ + fi +@endif libdecnumber @if libiberty - @cd $(HOST_SUBDIR); set libiberty stagefeedback-libiberty ; \ - @UNDO_LINK_TO_DIR@ ; \ - set prev-libiberty stageprofile-libiberty ; \ - @UNDO_LINK_TO_DIR@ + @if test -d $(HOST_SUBDIR)/libiberty ; then \ + cd $(HOST_SUBDIR); mv libiberty stagefeedback-libiberty ; \ + mv prev-libiberty stageprofile-libiberty ; : ; \ + fi @endif libiberty @if zlib - @cd $(HOST_SUBDIR); set zlib stagefeedback-zlib ; \ - @UNDO_LINK_TO_DIR@ ; \ - set prev-zlib stageprofile-zlib ; \ - @UNDO_LINK_TO_DIR@ + @if test -d $(HOST_SUBDIR)/zlib ; then \ + cd $(HOST_SUBDIR); mv zlib stagefeedback-zlib ; \ + mv prev-zlib stageprofile-zlib ; : ; \ + fi @endif zlib + @if test -d $(TARGET_SUBDIR) ; then \ + mv $(TARGET_SUBDIR) stagefeedback-$(TARGET_SUBDIR) ; \ + mv prev-$(TARGET_SUBDIR) stageprofile-$(TARGET_SUBDIR) ; : ; \ + fi + rm -f stage_current -# Bubble a bugfix through all the stages up to stage feedback. They -# are remade, but not reconfigured. The next stage (if any) will not -# be reconfigured as well. +# Bubble a bugfix through all the stages up to stage feedback. They are +# remade, but not reconfigured. The next stage (if any) will not be +# reconfigured as well. .PHONY: stagefeedback-bubble stagefeedback-bubble:: stageprofile-bubble @r=`${PWD_COMMAND}`; export r; \ @@ -36318,16 +36959,33 @@ do-clean: clean-stagefeedback -.PHONY: profiledbootstrap -profiledbootstrap: stagefeedback-bubble - $(MAKE) $(RECURSE_FLAGS_TO_PASS) all +.PHONY: profiledbootstrap profiledbootstrap-lean +profiledbootstrap: + echo stagefeedback > stage_final + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(MAKE) $(RECURSE_FLAGS_TO_PASS) stagefeedback-bubble + @: $(MAKE); $(unstage) + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) all-host all-target + +profiledbootstrap-lean: + echo stagefeedback > stage_final + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(MAKE) $(RECURSE_FLAGS_TO_PASS) LEAN=: stagefeedback-bubble + @: $(MAKE); $(unstage) + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) all-host all-target # Rules to wipe a stage and all the following ones, also used for cleanstrap distclean-stageprofile:: distclean-stagefeedback .PHONY: distclean-stagefeedback distclean-stagefeedback:: - [ -f stage_current ] && $(MAKE) `cat stage_current`-end || : + @: $(MAKE); $(stage) rm -rf stagefeedback-* @@ -36577,6 +37235,14 @@ all-stage3-gcc: all-stage3-libcpp all-stage4-gcc: all-stage4-libcpp all-stageprofile-gcc: all-stageprofile-libcpp all-stagefeedback-gcc: all-stagefeedback-libcpp +all-gcc: all-libdecnumber + +all-stage1-gcc: all-stage1-libdecnumber +all-stage2-gcc: all-stage2-libdecnumber +all-stage3-gcc: all-stage3-libdecnumber +all-stage4-gcc: all-stage4-libdecnumber +all-stageprofile-gcc: all-stageprofile-libdecnumber +all-stagefeedback-gcc: all-stagefeedback-libdecnumber all-gcc: maybe-all-libiberty all-stage1-gcc: maybe-all-stage1-libiberty @@ -36923,6 +37589,7 @@ all-prebootstrap: maybe-all-gas all-prebootstrap: maybe-all-intl all-prebootstrap: maybe-all-ld all-prebootstrap: maybe-all-libcpp +all-prebootstrap: maybe-all-libdecnumber all-prebootstrap: maybe-all-libiberty all-prebootstrap: maybe-all-zlib @endif gcc-no-bootstrap @@ -36943,17 +37610,6 @@ install-gdb: $(INSTALL_GDB_TK) # Regenerating top level configury # -------------------------------- -# Multilib.out tells target dirs what multilibs they should build. -# There is really only one copy. We use the 'timestamp' method to -# work around various timestamp bugs on some systems. -# We use move-if-change so that it's only considered updated when it -# actually changes, because it has to depend on a phony target. -multilib.out: maybe-all-gcc - @r=`${PWD_COMMAND}`; export r; \ - echo "Checking multilib configuration..."; \ - $(CC_FOR_TARGET) --print-multi-lib > multilib.tmp 2> /dev/null ; \ - $(SHELL) $(srcdir)/move-if-change multilib.tmp multilib.out ; \ - # Rebuilding Makefile.in, using autogen. AUTOGEN = autogen $(srcdir)/Makefile.in: @MAINT@ $(srcdir)/Makefile.tpl $(srcdir)/Makefile.def diff --git a/Makefile.tpl b/Makefile.tpl index c99ba5b5494..7893e3481ec 100644 --- a/Makefile.tpl +++ b/Makefile.tpl @@ -6,7 +6,7 @@ in # # Makefile for directory with subdirs to build. # Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, -# 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation +# 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation # # 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 @@ -136,7 +136,8 @@ HOST_CONFIGARGS = @host_configargs@ # with srcdir=.. HOST_SUBDIR = @host_subdir@ # This is the list of variables to export in the environment when -# configuring subdirectories for the host system. +# configuring subdirectories for the host system. We need to pass +# some to the GCC configure because of its hybrid host/target nature. HOST_EXPORTS = \ $(BASE_EXPORTS) \ CC="$(CC)"; export CC; \ @@ -155,6 +156,13 @@ HOST_EXPORTS = \ WINDRES="$(WINDRES)"; export WINDRES; \ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + AR_FOR_TARGET="$(AR_FOR_TARGET)"; export AR_FOR_TARGET; \ + AS_FOR_TARGET="$(AS_FOR_TARGET)"; export AS_FOR_TARGET; \ + GCC_FOR_TARGET="$(GCC_FOR_TARGET)"; export GCC_FOR_TARGET; \ + LD_FOR_TARGET="$(LD_FOR_TARGET)"; export LD_FOR_TARGET; \ + NM_FOR_TARGET="$(NM_FOR_TARGET)"; export NM_FOR_TARGET; \ + OBJDUMP_FOR_TARGET="$(OBJDUMP_FOR_TARGET)"; export OBJDUMP_FOR_TARGET; \ + RANLIB_FOR_TARGET="$(RANLIB_FOR_TARGET)"; export RANLIB_FOR_TARGET; \ TOPLEVEL_CONFIGURE_ARGUMENTS="$(TOPLEVEL_CONFIGURE_ARGUMENTS)"; export TOPLEVEL_CONFIGURE_ARGUMENTS; \ GMPLIBS="$(HOST_GMPLIBS)"; export GMPLIBS; \ GMPINC="$(HOST_GMPINC)"; export GMPINC; \ @@ -186,7 +194,7 @@ TARGET_CONFIGARGS = @target_configargs@ --with-target-subdir="$(TARGET_SUBDIR)" BASE_TARGET_EXPORTS = \ $(BASE_EXPORTS) \ AR="$(AR_FOR_TARGET)"; export AR; \ - AS="$(AS_FOR_TARGET)"; export AS; \ + AS="$(COMPILER_AS_FOR_TARGET)"; export AS; \ CC="$(CC_FOR_TARGET)"; export CC; \ CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ @@ -195,10 +203,10 @@ BASE_TARGET_EXPORTS = \ GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \ GFORTRAN="$(GFORTRAN_FOR_TARGET)"; export GFORTRAN; \ DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \ - LD="$(LD_FOR_TARGET)"; export LD; \ + LD="$(COMPILER_LD_FOR_TARGET)"; export LD; \ LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \ LIPO="$(LIPO_FOR_TARGET)"; export LIPO; \ - NM="$(NM_FOR_TARGET)"; export NM; \ + NM="$(COMPILER_NM_FOR_TARGET)"; export NM; \ OBJDUMP="$(OBJDUMP_FOR_TARGET)"; export OBJDUMP; \ RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \ STRIP="$(STRIP_FOR_TARGET)"; export STRIP; \ @@ -247,48 +255,16 @@ BUILD_PREFIX_1 = @BUILD_PREFIX_1@ # Flags to pass to stage2 and later makes. They are defined # here so that they can be overridden by Makefile fragments. BOOT_CFLAGS= -g -O2 +BOOT_LDFLAGS= -CONFIGURED_BISON = @CONFIGURED_BISON@ -BISON = `if [ -f $$r/$(BUILD_SUBDIR)/bison/tests/bison ] ; then \ - echo $$r/$(BUILD_SUBDIR)/bison/tests/bison ; \ - else \ - echo ${CONFIGURED_BISON} ; \ - fi` - -CONFIGURED_YACC = @CONFIGURED_YACC@ -YACC = `if [ -f $$r/$(BUILD_SUBDIR)/bison/tests/bison ] ; then \ - echo $$r/$(BUILD_SUBDIR)/bison/tests/bison -y ; \ - elif [ -f $$r/$(BUILD_SUBDIR)/byacc/byacc ] ; then \ - echo $$r/$(BUILD_SUBDIR)/byacc/byacc ; \ - else \ - echo ${CONFIGURED_YACC} ; \ - fi` - -CONFIGURED_FLEX = @CONFIGURED_FLEX@ -FLEX = `if [ -f $$r/$(BUILD_SUBDIR)/flex/flex ] ; \ - then echo $$r/$(BUILD_SUBDIR)/flex/flex ; \ - else echo ${CONFIGURED_FLEX} ; fi` - -CONFIGURED_LEX = @CONFIGURED_LEX@ -LEX = `if [ -f $$r/$(BUILD_SUBDIR)/flex/flex ] ; \ - then echo $$r/$(BUILD_SUBDIR)/flex/flex ; \ - else echo ${CONFIGURED_LEX} ; fi` - -CONFIGURED_M4 = @CONFIGURED_M4@ -M4 = `if [ -f $$r/$(BUILD_SUBDIR)/m4/m4 ] ; \ - then echo $$r/$(BUILD_SUBDIR)/m4/m4 ; \ - else echo ${CONFIGURED_M4} ; fi` - -# For an installed makeinfo, we require it to be from texinfo 4.2 or -# higher, else we use the "missing" dummy. We also pass the subdirectory -# makeinfo even if only the Makefile is there, because Texinfo builds its -# manual when made, and it requires its own version. -CONFIGURED_MAKEINFO = @CONFIGURED_MAKEINFO@ -MAKEINFO = `if [ -f $$r/$(BUILD_SUBDIR)/texinfo/makeinfo/Makefile ] ; \ - then echo $$r/$(BUILD_SUBDIR)/texinfo/makeinfo/makeinfo ; \ - else if (${CONFIGURED_MAKEINFO} --version \ - | egrep 'texinfo[^0-9]*([1-3][0-9]|4\.[2-9]|[5-9])') >/dev/null 2>&1; \ - then echo ${CONFIGURED_MAKEINFO}; else echo $$s/missing makeinfo; fi; fi` +BISON = @BISON@ +YACC = @YACC@ +FLEX = @FLEX@ +LEX = @LEX@ +M4 = @M4@ +MAKEINFO = @MAKEINFO@ +EXPECT = @EXPECT@ +RUNTEST = @RUNTEST@ # This just becomes part of the MAKEINFO definition passed down to # sub-makes. It lets flags be given on the command line while still @@ -296,43 +272,29 @@ MAKEINFO = `if [ -f $$r/$(BUILD_SUBDIR)/texinfo/makeinfo/Makefile ] ; \ # (Default to avoid splitting info files by setting the threshold high.) MAKEINFOFLAGS = --split-size=5000000 -# FIXME: expect may become a build tool? -EXPECT = `if [ -f $$r/$(HOST_SUBDIR)/expect/expect ] ; \ - then echo $$r/$(HOST_SUBDIR)/expect/expect ; \ - else echo expect ; fi` - -RUNTEST = `if [ -f $$s/dejagnu/runtest ] ; \ - then echo $$s/dejagnu/runtest ; \ - else echo runtest ; fi` - # --------------------------------------------- # Programs producing files for the HOST machine # --------------------------------------------- AS = @AS@ - AR = @AR@ AR_FLAGS = rc - CC = @CC@ -CFLAGS = @CFLAGS@ -LIBCFLAGS = $(CFLAGS) - CXX = @CXX@ -CXXFLAGS = @CXXFLAGS@ -LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates - DLLTOOL = @DLLTOOL@ - -NM = @NM@ - LD = @LD@ -LDFLAGS = - +LIPO = @LIPO@ +NM = @NM@ +OBJDUMP = @OBJDUMP@ RANLIB = @RANLIB@ - +STRIP = @STRIP@ WINDRES = @WINDRES@ +CFLAGS = @CFLAGS@ +LDFLAGS = +LIBCFLAGS = $(CFLAGS) +CXXFLAGS = @CXXFLAGS@ +LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates PICFLAG = # ----------------------------------------------- @@ -342,242 +304,42 @@ PICFLAG = FLAGS_FOR_TARGET = @FLAGS_FOR_TARGET@ AR_FOR_TARGET=@AR_FOR_TARGET@ -CONFIGURED_AR_FOR_TARGET=@CONFIGURED_AR_FOR_TARGET@ -USUAL_AR_FOR_TARGET = ` \ - if [ -f $$r/$(HOST_SUBDIR)/binutils/ar ] ; then \ - echo $$r/$(HOST_SUBDIR)/binutils/ar ; \ - else \ - if [ '$(host)' = '$(target)' ] ; then \ - echo $(AR); \ - else \ - echo $(CONFIGURED_AR_FOR_TARGET) ; \ - fi; \ - fi` - AS_FOR_TARGET=@AS_FOR_TARGET@ -CONFIGURED_AS_FOR_TARGET=@CONFIGURED_AS_FOR_TARGET@ -USUAL_AS_FOR_TARGET = ` \ - if [ -f $$r/$(HOST_SUBDIR)/gas/as-new ] ; then \ - echo $$r/$(HOST_SUBDIR)/gas/as-new ; \ - elif [ -f $$r/$(HOST_SUBDIR)/gcc/as ]; then \ - echo $$r/$(HOST_SUBDIR)/gcc/as ; \ - else \ - if [ '$(host)' = '$(target)' ] ; then \ - echo $(AS); \ - else \ - echo $(CONFIGURED_AS_FOR_TARGET) ; \ - fi; \ - fi` - CC_FOR_TARGET=$(STAGE_CC_WRAPPER) @CC_FOR_TARGET@ $(FLAGS_FOR_TARGET) -CONFIGURED_CC_FOR_TARGET=@CONFIGURED_CC_FOR_TARGET@ -USUAL_CC_FOR_TARGET = ` \ - if [ -f $$r/$(HOST_SUBDIR)/gcc/xgcc ] ; then \ - echo $$r/$(HOST_SUBDIR)/gcc/xgcc -B$$r/$(HOST_SUBDIR)/gcc/ ; \ - else \ - if [ '$(host)' = '$(target)' ] ; then \ - echo $(CC); \ - else \ - echo $(CONFIGURED_CC_FOR_TARGET) ; \ - fi; \ - fi` - -# During gcc bootstrap, if we use some random cc for stage1 then -# CFLAGS will be just -g. We want to ensure that TARGET libraries -# (which we know are built with gcc) are built with optimizations so -# prepend -O2 when setting CFLAGS_FOR_TARGET. -CFLAGS_FOR_TARGET = -O2 $(CFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET) -SYSROOT_CFLAGS_FOR_TARGET = @SYSROOT_CFLAGS_FOR_TARGET@ # If GCC_FOR_TARGET is not overriden on the command line, then this # variable is passed down to the gcc Makefile, where it is used to # build libgcc2.a. We define it here so that it can itself be # overridden on the command line. -GCC_FOR_TARGET=@GCC_FOR_TARGET@ -CONFIGURED_GCC_FOR_TARGET=@CONFIGURED_GCC_FOR_TARGET@ -USUAL_GCC_FOR_TARGET = $(STAGE_CC_WRAPPER) \ - $$r/$(HOST_SUBDIR)/gcc/xgcc -B$$r/$(HOST_SUBDIR)/gcc/ $(FLAGS_FOR_TARGET) -LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET) - +GCC_FOR_TARGET=$(STAGE_CC_WRAPPER) @GCC_FOR_TARGET@ $(FLAGS_FOR_TARGET) CXX_FOR_TARGET=$(STAGE_CC_WRAPPER) @CXX_FOR_TARGET@ $(FLAGS_FOR_TARGET) -CONFIGURED_CXX_FOR_TARGET=@CONFIGURED_CXX_FOR_TARGET@ -USUAL_CXX_FOR_TARGET = ` \ - if [ -f $$r/$(HOST_SUBDIR)/gcc/g++ ] ; then \ - (echo $$r/$(HOST_SUBDIR)/gcc/g++ -B$$r/$(HOST_SUBDIR)/gcc -nostdinc++; \ - test ! -f $$r/$(TARGET_SUBDIR)/libstdc++-v3/scripts/testsuite_flags || $(SHELL) $$r/$(TARGET_SUBDIR)/libstdc++-v3/scripts/testsuite_flags --build-includes; \ - echo -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs) | tr '\015\012' ' '; \ - else \ - if [ '$(host)' = '$(target)' ] ; then \ - echo $(CXX); \ - else \ - echo $(CONFIGURED_CXX_FOR_TARGET) ; \ - fi; \ - fi` - RAW_CXX_FOR_TARGET=$(STAGE_CC_WRAPPER) @RAW_CXX_FOR_TARGET@ $(FLAGS_FOR_TARGET) -USUAL_RAW_CXX_FOR_TARGET = ` \ - if [ -f $$r/$(HOST_SUBDIR)/gcc/xgcc ] ; then \ - echo $$r/$(HOST_SUBDIR)/gcc/xgcc -shared-libgcc -B$$r/$(HOST_SUBDIR)/gcc -nostdinc++ -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs; \ - else \ - if [ '$(host)' = '$(target)' ] ; then \ - echo $(CXX); \ - else \ - echo $(CONFIGURED_CXX_FOR_TARGET) ; \ - fi; \ - fi` - -CXXFLAGS_FOR_TARGET = $(CXXFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET) -LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates - GCJ_FOR_TARGET=$(STAGE_CC_WRAPPER) @GCJ_FOR_TARGET@ $(FLAGS_FOR_TARGET) -CONFIGURED_GCJ_FOR_TARGET=@CONFIGURED_GCJ_FOR_TARGET@ -USUAL_GCJ_FOR_TARGET = ` \ - if [ -f $$r/$(HOST_SUBDIR)/gcc/gcj ] ; then \ - echo $$r/$(HOST_SUBDIR)/gcc/gcj -B$$r/$(HOST_SUBDIR)/gcc ; \ - else \ - if [ '$(host)' = '$(target)' ] ; then \ - echo $(GCJ); \ - else \ - echo $(CONFIGURED_GCJ_FOR_TARGET) ; \ - fi; \ - fi` - GFORTRAN_FOR_TARGET=$(STAGE_CC_WRAPPER) @GFORTRAN_FOR_TARGET@ $(FLAGS_FOR_TARGET) -CONFIGURED_GFORTRAN_FOR_TARGET=@CONFIGURED_GFORTRAN_FOR_TARGET@ -USUAL_GFORTRAN_FOR_TARGET = ` \ - if [ -f $$r/$(HOST_SUBDIR)/gcc/gfortran ] ; then \ - echo $$r/$(HOST_SUBDIR)/gcc/gfortran -B$$r/$(HOST_SUBDIR)/gcc ; \ - else \ - if [ '$(host)' = '$(target)' ] ; then \ - echo $(GFORTRAN); \ - else \ - echo $(CONFIGURED_GFORTRAN_FOR_TARGET) ; \ - fi; \ - fi` - - DLLTOOL_FOR_TARGET=@DLLTOOL_FOR_TARGET@ -CONFIGURED_DLLTOOL_FOR_TARGET=@CONFIGURED_DLLTOOL_FOR_TARGET@ -USUAL_DLLTOOL_FOR_TARGET = ` \ - if [ -f $$r/$(HOST_SUBDIR)/binutils/dlltool ] ; then \ - echo $$r/$(HOST_SUBDIR)/binutils/dlltool ; \ - else \ - if [ '$(host)' = '$(target)' ] ; then \ - echo $(DLLTOOL); \ - else \ - echo $(CONFIGURED_DLLTOOL_FOR_TARGET) ; \ - fi; \ - fi` - LD_FOR_TARGET=@LD_FOR_TARGET@ -CONFIGURED_LD_FOR_TARGET=@CONFIGURED_LD_FOR_TARGET@ -USUAL_LD_FOR_TARGET = ` \ - if [ -f $$r/$(HOST_SUBDIR)/ld/ld-new ] ; then \ - echo $$r/$(HOST_SUBDIR)/ld/ld-new ; \ - elif [ -f $$r/$(HOST_SUBDIR)/gcc/collect-ld ]; then \ - echo $$r/$(HOST_SUBDIR)/gcc/collect-ld ; \ - else \ - if [ '$(host)' = '$(target)' ] ; then \ - echo $(LD); \ - else \ - echo $(CONFIGURED_LD_FOR_TARGET) ; \ - fi; \ - fi` - -LDFLAGS_FOR_TARGET = LIPO_FOR_TARGET=@LIPO_FOR_TARGET@ -CONFIGURED_LIPO_FOR_TARGET=@CONFIGURED_LIPO_FOR_TARGET@ -USUAL_LIPO_FOR_TARGET = ` \ - if [ '$(host)' = '$(target)' ] ; then \ - if [ x'$(LIPO)' != x ]; then \ - echo $(LIPO); \ - else \ - echo lipo; \ - fi; \ - else \ - echo $(CONFIGURED_LIPO_FOR_TARGET) ; \ - fi` - NM_FOR_TARGET=@NM_FOR_TARGET@ -CONFIGURED_NM_FOR_TARGET=@CONFIGURED_NM_FOR_TARGET@ -USUAL_NM_FOR_TARGET = ` \ - if [ -f $$r/$(HOST_SUBDIR)/binutils/nm-new ] ; then \ - echo $$r/$(HOST_SUBDIR)/binutils/nm-new ; \ - elif [ -f $$r/$(HOST_SUBDIR)/gcc/nm ]; then \ - echo $$r/$(HOST_SUBDIR)/gcc/nm ; \ - else \ - if [ '$(host)' = '$(target)' ] ; then \ - echo $(NM); \ - else \ - echo $(CONFIGURED_NM_FOR_TARGET) ; \ - fi; \ - fi` - OBJDUMP_FOR_TARGET=@OBJDUMP_FOR_TARGET@ -CONFIGURED_OBJDUMP_FOR_TARGET=@CONFIGURED_OBJDUMP_FOR_TARGET@ -USUAL_OBJDUMP_FOR_TARGET = ` \ - if [ -f $$r/$(HOST_SUBDIR)/binutils/objdump ] ; then \ - echo $$r/$(HOST_SUBDIR)/binutils/objdump ; \ - else \ - if [ '$(host)' = '$(target)' ] ; then \ - if [ x'$(OBJDUMP)' != x ]; then \ - echo $(OBJDUMP); \ - else \ - echo objdump; \ - fi; \ - else \ - echo $(CONFIGURED_OBJDUMP_FOR_TARGET) ; \ - fi; \ - fi` - RANLIB_FOR_TARGET=@RANLIB_FOR_TARGET@ -CONFIGURED_RANLIB_FOR_TARGET=@CONFIGURED_RANLIB_FOR_TARGET@ -USUAL_RANLIB_FOR_TARGET = ` \ - if [ -f $$r/$(HOST_SUBDIR)/binutils/ranlib ] ; then \ - echo $$r/$(HOST_SUBDIR)/binutils/ranlib ; \ - else \ - if [ '$(host)' = '$(target)' ] ; then \ - if [ x'$(RANLIB)' != x ]; then \ - echo $(RANLIB); \ - else \ - echo ranlib; \ - fi; \ - else \ - echo $(CONFIGURED_RANLIB_FOR_TARGET) ; \ - fi; \ - fi` - STRIP_FOR_TARGET=@STRIP_FOR_TARGET@ -CONFIGURED_STRIP_FOR_TARGET=@CONFIGURED_STRIP_FOR_TARGET@ -USUAL_STRIP_FOR_TARGET = ` \ - if [ -f $$r/$(HOST_SUBDIR)/binutils/strip ] ; then \ - echo $$r/$(HOST_SUBDIR)/binutils/strip ; \ - else \ - if [ '$(host)' = '$(target)' ] ; then \ - if [ x'$(STRIP)' != x ]; then \ - echo $(STRIP); \ - else \ - echo strip; \ - fi; \ - else \ - echo $(CONFIGURED_STRIP_FOR_TARGET) ; \ - fi; \ - fi` - WINDRES_FOR_TARGET=@WINDRES_FOR_TARGET@ -CONFIGURED_WINDRES_FOR_TARGET=@CONFIGURED_WINDRES_FOR_TARGET@ -USUAL_WINDRES_FOR_TARGET = ` \ - if [ -f $$r/$(HOST_SUBDIR)/binutils/windres ] ; then \ - echo $$r/$(HOST_SUBDIR)/binutils/windres ; \ - else \ - if [ '$(host)' = '$(target)' ] ; then \ - echo $(WINDRES); \ - else \ - echo $(CONFIGURED_WINDRES_FOR_TARGET) ; \ - fi; \ - fi` +COMPILER_AS_FOR_TARGET=@COMPILER_AS_FOR_TARGET@ +COMPILER_LD_FOR_TARGET=@COMPILER_LD_FOR_TARGET@ +COMPILER_NM_FOR_TARGET=@COMPILER_NM_FOR_TARGET@ + +# During gcc bootstrap, if we use some random cc for stage1 then +# CFLAGS will be just -g. We want to ensure that TARGET libraries +# (which we know are built with gcc) are built with optimizations so +# prepend -O2 when setting CFLAGS_FOR_TARGET. +CFLAGS_FOR_TARGET = -O2 $(CFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET) +SYSROOT_CFLAGS_FOR_TARGET = @SYSROOT_CFLAGS_FOR_TARGET@ +CXXFLAGS_FOR_TARGET = $(CXXFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET) +LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET) +LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates +LDFLAGS_FOR_TARGET = PICFLAG_FOR_TARGET = # ------------------------------------ @@ -644,8 +406,11 @@ EXTRA_HOST_FLAGS = \ 'CXX=$(CXX)' \ 'DLLTOOL=$(DLLTOOL)' \ 'LD=$(LD)' \ + 'LIPO=$(LIPO)' \ 'NM=$(NM)' \ + 'OBJDUMP=$(OBJDUMP)' \ 'RANLIB=$(RANLIB)' \ + 'STRIP=$(STRIP)' \ 'WINDRES=$(WINDRES)' FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) @@ -663,21 +428,22 @@ X11_FLAGS_TO_PASS = \ 'X11_EXTRA_LIBS=$(X11_EXTRA_LIBS)' # Flags to pass down to makes which are built with the target environment. -# The double $ decreases the length of the command line; the variables -# are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them. +# The double $ decreases the length of the command line; those variables +# are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them. The +# COMPILER_ prefixed variables are not passed down so we expand them here. EXTRA_TARGET_FLAGS = \ 'AR=$$(AR_FOR_TARGET)' \ - 'AS=$$(AS_FOR_TARGET)' \ + 'AS=$(COMPILER_AS_FOR_TARGET)' \ 'CC=$$(CC_FOR_TARGET)' \ 'CFLAGS=$$(CFLAGS_FOR_TARGET)' \ 'CXX=$$(CXX_FOR_TARGET)' \ 'CXXFLAGS=$$(CXXFLAGS_FOR_TARGET)' \ 'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \ - 'LD=$$(LD_FOR_TARGET)' \ + 'LD=$(COMPILER_LD_FOR_TARGET)' \ 'LDFLAGS=$$(LDFLAGS_FOR_TARGET)' \ 'LIBCFLAGS=$$(LIBCFLAGS_FOR_TARGET)' \ 'LIBCXXFLAGS=$$(LIBCXXFLAGS_FOR_TARGET)' \ - 'NM=$$(NM_FOR_TARGET)' \ + 'NM=$(COMPILER_NM_FOR_TARGET)' \ 'OBJDUMP=$$(OBJDUMP_FOR_TARGET)' \ 'RANLIB=$$(RANLIB_FOR_TARGET)' \ 'WINDRES=$$(WINDRES_FOR_TARGET)' @@ -700,8 +466,6 @@ EXTRA_GCC_FLAGS = \ "`echo 'LIBGCC2_CFLAGS=$(LIBGCC2_CFLAGS)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \ "`echo 'LIBGCC2_DEBUG_CFLAGS=$(LIBGCC2_DEBUG_CFLAGS)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \ "`echo 'LIBGCC2_INCLUDES=$(LIBGCC2_INCLUDES)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \ - "`echo 'STAGE1_CFLAGS=$(STAGE1_CFLAGS)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \ - "`echo 'BOOT_CFLAGS=$(BOOT_CFLAGS)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \ "`echo 'BOOT_ADAFLAGS=$(BOOT_ADAFLAGS)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" GCC_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(EXTRA_GCC_FLAGS) @@ -721,29 +485,19 @@ configure-target: [+ .PHONY: all all: @if gcc-bootstrap + [ -f stage_final ] || echo stage3 > stage_final @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - if [ ! -f stage_last ]; then \ - $(MAKE) $(RECURSE_FLAGS_TO_PASS) bootstrap; \ - fi + $(MAKE) $(RECURSE_FLAGS_TO_PASS) `cat stage_final`-bubble @endif gcc-bootstrap - @$(unstage) -@if gcc-no-bootstrap - @r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(MAKE) $(RECURSE_FLAGS_TO_PASS) all-prebootstrap -@endif gcc-no-bootstrap + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ if [ -f stage_last ]; then \ - $(MAKE) $(TARGET_FLAGS_TO_PASS) all-host; \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) all-host all-target; \ else \ - $(MAKE) $(RECURSE_FLAGS_TO_PASS) all-host; \ + $(MAKE) $(RECURSE_FLAGS_TO_PASS) all-host all-target; \ fi - @r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(MAKE) $(RECURSE_FLAGS_TO_PASS) all-target - @$(stage) .PHONY: all-build all-build: [+ @@ -768,12 +522,11 @@ all-target: [+ [+ FOR recursive_targets +] .PHONY: do-[+make_target+] do-[+make_target+]: - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(MAKE) $(RECURSE_FLAGS_TO_PASS) [+make_target+]-host \ [+make_target+]-target - @$(stage) .PHONY: [+make_target+]-host @@ -814,7 +567,7 @@ local-clean: local-distclean: -rm -f Makefile config.status config.cache mh-frag mt-frag - -rm -f multilib.out multilib.tmp maybedep.tmp serdep.tmp + -rm -f maybedep.tmp serdep.tmp -if [ "$(TARGET_SUBDIR)" != "." ]; then \ rm -rf $(TARGET_SUBDIR); \ else true; fi @@ -839,14 +592,10 @@ maintainer-clean: local-maintainer-clean do-maintainer-clean local-clean maintainer-clean: local-distclean realclean: maintainer-clean -# Extra dependency for clean-target, owing to the mixed nature of gcc +# Extra dependency for clean-target, owing to the mixed nature of gcc. clean-target: clean-target-libgcc clean-target-libgcc: - test ! -d gcc/libgcc || \ - (cd gcc/libgcc && find . -type d -print) | \ - while read d; do rm -f gcc/$$d/libgcc.a || : ; done - -rm -rf gcc/libgcc - -rm -f gcc/stmp-dirs + test ! -d gcc || (cd gcc && $(MAKE) $@) # Check target. @@ -867,11 +616,10 @@ check-target: [+ ENDFOR target_modules +] do-check: - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(MAKE) $(RECURSE_FLAGS_TO_PASS) check-host check-target - @$(stage) # Automated reporting of test results. @@ -898,11 +646,10 @@ mail-report-with-warnings.log: warning.log .PHONY: install uninstall install: - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(MAKE) $(RECURSE_FLAGS_TO_PASS) installdirs install-host install-target - @$(stage) .PHONY: install-host-nogcc install-host-nogcc: [+ @@ -929,6 +676,7 @@ uninstall: install.all: install-no-fixedincludes @if [ -f ./gcc/Makefile ] ; then \ r=`${PWD_COMMAND}` ; export r ; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ (cd ./gcc && \ $(MAKE) $(FLAGS_TO_PASS) install-headers) ; \ @@ -981,10 +729,26 @@ TAGS: do-TAGS maybe-configure-[+prefix+][+module+]: @if [+prefix+][+module+] maybe-configure-[+prefix+][+module+]: configure-[+prefix+][+module+] -configure-[+prefix+][+module+]: [+deps+] +configure-[+prefix+][+module+]: @[+ IF bootstrap +]test -f stage_last && exit 0; \ - [+ ELSE bootstrap +]$(unstage) - @[+ ENDIF bootstrap +]test ! -f [+subdir+]/[+module+]/Makefile || exit 0; \ + [+ ELSE bootstrap +]: $(MAKE); $(unstage) + @[+ ENDIF bootstrap +][+ IF check_multilibs + +]r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + echo "Checking multilib configuration for [+module+]..."; \ + $(SHELL) $(srcdir)/mkinstalldirs [+subdir+]/[+module+] ; \ + $(CC_FOR_TARGET) --print-multi-lib > [+subdir+]/[+module+]/multilib.tmp 2> /dev/null ; \ + if test -r [+subdir+]/[+module+]/multilib.out; then \ + if cmp -s [+subdir+]/[+module+]/multilib.tmp [+subdir+]/[+module+]/multilib.out; then \ + rm -f [+subdir+]/[+module+]/multilib.tmp; \ + else \ + rm -f [+subdir+]/[+module+]/Makefile; \ + mv [+subdir+]/[+module+]/multilib.tmp [+subdir+]/[+module+]/multilib.out; \ + fi; \ + else \ + mv [+subdir+]/[+module+]/multilib.tmp [+subdir+]/[+module+]/multilib.out; \ + fi + @[+ ENDIF check_multilibs +]test ! -f [+subdir+]/[+module+]/Makefile || exit 0; \ $(SHELL) $(srcdir)/mkinstalldirs [+subdir+]/[+module+] ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -1008,16 +772,31 @@ configure-[+prefix+][+module+]: [+deps+] [+ FOR bootstrap_stage +] .PHONY: configure-stage[+id+]-[+prefix+][+module+] maybe-configure-stage[+id+]-[+prefix+][+module+] maybe-configure-stage[+id+]-[+prefix+][+module+]: -@if [+module+]-bootstrap +@if [+prefix+][+module+]-bootstrap maybe-configure-stage[+id+]-[+prefix+][+module+]: configure-stage[+id+]-[+prefix+][+module+] -configure-stage[+id+]-[+prefix+][+module+]: [+deps+] +configure-stage[+id+]-[+prefix+][+module+]: @[ `cat stage_current` = stage[+id+] ] || $(MAKE) stage[+id+]-start - @[ -f [+subdir+]/[+module+]/Makefile ] && exit 0 || : ; \ - r=`${PWD_COMMAND}`; export r; \ + @$(SHELL) $(srcdir)/mkinstalldirs [+subdir+]/[+module+] + [+ IF check_multilibs + +]@r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + echo "Checking multilib configuration for [+module+]..."; \ + $(CC_FOR_TARGET) --print-multi-lib > [+subdir+]/[+module+]/multilib.tmp 2> /dev/null ; \ + if test -r [+subdir+]/[+module+]/multilib.out; then \ + if cmp -s [+subdir+]/[+module+]/multilib.tmp [+subdir+]/[+module+]/multilib.out; then \ + rm -f [+subdir+]/[+module+]/multilib.tmp; \ + else \ + rm -f [+subdir+]/[+module+]/Makefile; \ + mv [+subdir+]/[+module+]/multilib.tmp [+subdir+]/[+module+]/multilib.out; \ + fi; \ + else \ + mv [+subdir+]/[+module+]/multilib.tmp [+subdir+]/[+module+]/multilib.out; \ + fi + @[+ ENDIF check_multilibs +]test ! -f [+subdir+]/[+module+]/Makefile || exit 0; \ [+exports+][+ IF prev +] \ [+poststage1_exports+][+ ENDIF prev +] \ echo Configuring stage [+id+] in [+subdir+]/[+module+] ; \ + $(SHELL) $(srcdir)/mkinstalldirs [+subdir+]/[+module+] ; \ cd [+subdir+]/[+module+] || exit 1; \ case $(srcdir) in \ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ @@ -1029,7 +808,7 @@ configure-stage[+id+]-[+prefix+][+module+]: [+deps+] $(SHELL) $${libsrcdir}/configure \ [+args+] $${srcdiroption} \ [+stage_configure_flags+] [+extra_configure_flags+] -@endif [+module+]-bootstrap +@endif [+prefix+][+module+]-bootstrap [+ ENDFOR bootstrap_stage +] [+ ENDIF bootstrap +] [+ ENDDEF +] @@ -1043,7 +822,7 @@ TARGET-[+prefix+][+module+]=[+ maybe-all-[+prefix+][+module+]: all-[+prefix+][+module+] all-[+prefix+][+module+]: configure-[+prefix+][+module+] @[+ IF bootstrap +]test -f stage_last && exit 0; \ - [+ ELSE bootstrap +]$(unstage) + [+ ELSE bootstrap +]: $(MAKE); $(unstage) @[+ ENDIF bootstrap +]r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ [+exports+] \ @@ -1057,7 +836,7 @@ all-[+prefix+][+module+]: configure-[+prefix+][+module+] .PHONY: clean-stage[+id+]-[+prefix+][+module+] maybe-clean-stage[+id+]-[+prefix+][+module+] maybe-all-stage[+id+]-[+prefix+][+module+]: maybe-clean-stage[+id+]-[+prefix+][+module+]: -@if [+module+]-bootstrap +@if [+prefix+][+module+]-bootstrap maybe-all-stage[+id+]-[+prefix+][+module+]: all-stage[+id+]-[+prefix+][+module+] all-stage[+id+]: all-stage[+id+]-[+prefix+][+module+] TARGET-stage[+id+]-[+prefix+][+module+] = $(TARGET-[+prefix+][+module+]) @@ -1078,12 +857,12 @@ clean-stage[+id+]: clean-stage[+id+]-[+prefix+][+module+] clean-stage[+id+]-[+prefix+][+module+]: @[ -f [+subdir+]/[+module+]/Makefile ] || [ -f [+subdir+]/stage[+id+]-[+module+]/Makefile ] \ || exit 0 ; \ - @[ `cat stage_current` = stage[+id+] ] || $(MAKE) stage[+id+]-start + [ `cat stage_current` = stage[+id+] ] || $(MAKE) stage[+id+]-start cd [+subdir+]/[+module+] && \ $(MAKE) [+args+] [+ IF prev +] \ [+poststage1_args+] [+ ENDIF prev +] \ [+stage_make_flags+] [+extra_make_flags+] clean -@endif [+module+]-bootstrap +@endif [+prefix+][+module+]-bootstrap [+ ENDFOR bootstrap_stage +] [+ ENDIF bootstrap +] @@ -1123,7 +902,7 @@ check-[+module+]: [+ ELIF no_check_cross +] # This module is only tested in a native toolchain. check-[+module+]: - @$(unstage) + @: $(MAKE); $(unstage) @if [ '$(host)' = '$(target)' ] ; then \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -1133,7 +912,7 @@ check-[+module+]: fi [+ ELSE check +] check-[+module+]: - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -1150,7 +929,7 @@ maybe-install-[+module+]: install-[+module+] install-[+module+]: [+ ELSE install +] install-[+module+]: installdirs - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ @@ -1173,7 +952,7 @@ maybe-[+make_target+]-[+module+]: [+make_target+]-[+module+] FOR depend +]\ [+depend+]-[+module+] [+ ENDFOR depend +] - @[+ IF bootstrap +][+ ELSE +]$(unstage) + @[+ IF bootstrap +][+ ELSE +]: $(MAKE); $(unstage) @[+ ENDIF bootstrap +][ -f ./[+module+]/Makefile ] || exit 0; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -1199,17 +978,9 @@ maybe-[+make_target+]-[+module+]: [+make_target+]-[+module+] # --------------------------------------- [+ FOR target_modules +] -# There's only one multilib.out. Cleverer subdirs shouldn't need it copied. -@if target-[+module+] -$(TARGET_SUBDIR)/[+module+]/multilib.out: multilib.out - $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/[+module+] ; \ - rm -f $(TARGET_SUBDIR)/[+module+]/Makefile || : ; \ - cp multilib.out $(TARGET_SUBDIR)/[+module+]/multilib.out -@endif target-[+module+] - [+ IF raw_cxx +] [+ configure prefix="target-" subdir="$(TARGET_SUBDIR)" - deps=(string-append "$(TARGET_SUBDIR)/" (get "module") "/multilib.out") + check_multilibs=true exports="$(RAW_CXX_TARGET_EXPORTS)" args="$(TARGET_CONFIGARGS)" no-config-site=true +] @@ -1218,7 +989,7 @@ $(TARGET_SUBDIR)/[+module+]/multilib.out: multilib.out args="$(TARGET_FLAGS_TO_PASS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)'" +] [+ ELSE +] [+ configure prefix="target-" subdir="$(TARGET_SUBDIR)" - deps=(string-append "$(TARGET_SUBDIR)/" (get "module") "/multilib.out") + check_multilibs=true exports="$(NORMAL_TARGET_EXPORTS)" args="$(TARGET_CONFIGARGS)" no-config-site=true +] @@ -1236,7 +1007,7 @@ maybe-check-target-[+module+]: check-target-[+module+] check-target-[+module+]: [+ ELSE check +] check-target-[+module+]: - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \[+ IF raw_cxx +] @@ -1262,7 +1033,7 @@ maybe-install-target-[+module+]: install-target-[+module+] install-target-[+module+]: [+ ELSE install +] install-target-[+module+]: installdirs - @$(unstage) + @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \[+ IF raw_cxx +] @@ -1289,7 +1060,7 @@ maybe-[+make_target+]-target-[+module+]: [+make_target+]-target-[+module+] FOR depend +]\ [+depend+]-target-[+module+] [+ ENDFOR depend +] - @$(unstage) + @: $(MAKE); $(unstage) @[ -f $(TARGET_SUBDIR)/[+module+]/Makefile ] || exit 0 ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \[+ @@ -1432,29 +1203,34 @@ gcc-no-fixedincludes: # are dummy when toplevel bootstrap is not active. # While making host and target tools, symlinks to the final stage must be -# there, so $(MAKE) $(unstage) should be run at various points. To avoid -# excessive recursive invocations of make, we "inline" them using a variable. +# there, so $(unstage) should be run at various points. To avoid excessive +# recursive invocations of make, we "inline" them using a variable. These +# must be referenced as ": $(MAKE) ; $(unstage)" rather than "$(unstage)" +# to avoid warnings from the GNU Make job server. unstage = : stage = : @if gcc-bootstrap unstage = [ -f stage_current ] || $(MAKE) `cat stage_last`-start -stage = $(MAKE) `cat stage_current`-end +stage = if [ -f stage_current ]; then $(MAKE) `cat stage_current`-end || exit 1; else :; fi @endif gcc-bootstrap .PHONY: unstage stage unstage: - @$(unstage) + @: $(MAKE); $(unstage) stage: - @$(stage) + @: $(MAKE); $(stage) + +# Disable commands for lean bootstrap. +LEAN = false # We name the build directories for the various stages "stage1-gcc", # "stage2-gcc","stage3-gcc", etc. # Since the 'compare' process will fail (on debugging information) if any # directory names are different, we need to link the gcc directory for -# the previous stage to a constant name ('gcc-prev'), and to make the name of +# the previous stage to a constant name ('prev-gcc'), and to make the name of # the build directories constant as well. For the latter, we use naked names # like 'gcc', because the scripts in that directory assume it. We use # mv on platforms where symlinks to directories do not work or are not @@ -1480,6 +1256,7 @@ POSTSTAGE1_FLAGS_TO_PASS = \ CC="$${CC}" CC_FOR_BUILD="$${CC_FOR_BUILD}" \ STAGE_PREFIX=$$r/prev-gcc/ \ CFLAGS="$(BOOT_CFLAGS)" \ + LDFLAGS="$(BOOT_LDFLAGS)" \ ADAC="\$$(CC)" # For stage 1: @@ -1495,60 +1272,54 @@ POSTSTAGE1_FLAGS_TO_PASS = \ .PHONY: stage[+id+]-start stage[+id+]-end stage[+id+]-start:: - @[ -f stage_current ] && $(MAKE) `cat stage_current`-end || : ; \ + @: $(MAKE); $(stage); \ echo stage[+id+] > stage_current ; \ echo stage[+id+] > stage_last; \ - $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR) $(TARGET_SUBDIR)[+ + $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)[+ FOR host_modules +][+ IF bootstrap +] @if [+ module +] @cd $(HOST_SUBDIR); [ -d stage[+id+]-[+module+] ] || \ mkdir stage[+id+]-[+module+]; \ - set stage[+id+]-[+module+] [+module+] ; \ - @CREATE_LINK_TO_DIR@ [+ IF prev +] ; \ - set stage[+prev+]-[+module+] prev-[+module+] ; \ - @CREATE_LINK_TO_DIR@ [+ ENDIF prev +] -@endif [+ module +][+ ENDIF bootstrap +][+ ENDFOR host_modules +][+ - FOR target_modules +][+ IF bootstrap +] -@if target-[+ module +] - @cd $(TARGET_SUBDIR); [ -d stage[+id+]-[+module+] ] || \ - mkdir stage[+id+]-[+module+]; \ - set stage[+id+]-[+module+] [+module+] ; \ - @CREATE_LINK_TO_DIR@ [+ IF prev +] ; \ - set stage[+prev+]-[+module+] prev-[+module+] ; \ - @CREATE_LINK_TO_DIR@ [+ ENDIF prev +] -@endif target-[+ module +][+ ENDIF bootstrap +][+ ENDFOR target_modules +] - -stage[+id+]-end:: - @rm -f stage_current[+ FOR host_modules +][+ IF bootstrap +] + mv stage[+id+]-[+module+] [+module+] [+ IF prev +] ; \ + mv stage[+prev+]-[+module+] prev-[+module+] || test -f stage[+prev+]-lean [+ ENDIF prev +] +@endif [+ module +][+ ENDIF bootstrap +][+ ENDFOR host_modules +] + @[ -d stage[+id+]-$(TARGET_SUBDIR) ] || \ + mkdir stage[+id+]-$(TARGET_SUBDIR); \ + mv stage[+id+]-$(TARGET_SUBDIR) $(TARGET_SUBDIR) [+ IF prev +] ; \ + mv stage[+prev+]-$(TARGET_SUBDIR) prev-$(TARGET_SUBDIR) || test -f stage[+prev+]-lean [+ ENDIF prev +] + +stage[+id+]-end:: [+ FOR host_modules +][+ IF bootstrap +] @if [+ module +] - @cd $(HOST_SUBDIR); set [+module+] stage[+id+]-[+module+] ; \ - @UNDO_LINK_TO_DIR@ [+ IF prev +] ; \ - set prev-[+module+] stage[+prev+]-[+module+] ; \ - @UNDO_LINK_TO_DIR@ [+ ENDIF prev +] -@endif [+ module +][+ ENDIF bootstrap +][+ ENDFOR host_modules +][+ - FOR target_modules +][+ IF bootstrap +] -@if target-[+ module +] - @cd $(HOST_SUBDIR); set [+module+] stage[+id+]-[+module+] ; \ - @UNDO_LINK_TO_DIR@ [+ IF prev +] ; \ - set prev-[+module+] stage[+prev+]-[+module+] ; \ - @UNDO_LINK_TO_DIR@ [+ ENDIF prev +] -@endif [+ module +][+ ENDIF bootstrap +][+ ENDFOR target_modules +] - -# Bubble a bugfix through all the stages up to stage [+id+]. They -# are remade, but not reconfigured. The next stage (if any) will not -# be reconfigured as well. + @if test -d $(HOST_SUBDIR)/[+module+] ; then \ + cd $(HOST_SUBDIR); mv [+module+] stage[+id+]-[+module+] [+ IF prev +]; \ + mv prev-[+module+] stage[+prev+]-[+module+] ; : [+ ENDIF prev +] ; \ + fi +@endif [+ module +][+ ENDIF bootstrap +][+ ENDFOR host_modules +] + @if test -d $(TARGET_SUBDIR) ; then \ + mv $(TARGET_SUBDIR) stage[+id+]-$(TARGET_SUBDIR) [+ IF prev +] ; \ + mv prev-$(TARGET_SUBDIR) stage[+prev+]-$(TARGET_SUBDIR) ; : [+ ENDIF prev +] ; \ + fi + rm -f stage_current + +# Bubble a bugfix through all the stages up to stage [+id+]. They are +# remade, but not reconfigured. The next stage (if any) will not be +# reconfigured as well. .PHONY: stage[+id+]-bubble -stage[+id+]-bubble:: [+ IF prev +]stage[+prev+]-bubble[+ ENDIF +][+IF lean +] - @bootstrap_lean@-rm -rf stage[+lean+]-* ; $(STAMP) stage[+lean+]-lean[+ ENDIF lean +] +stage[+id+]-bubble:: [+ IF prev +]stage[+prev+]-bubble[+ ENDIF +] @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ if test -f stage[+id+]-lean [+ IF prev +]|| test -f stage[+prev+]-lean [+ ENDIF prev +] ; then \ echo Skipping rebuild of stage[+id+] ; \ else \ - $(MAKE) stage[+id+]-start; \ + $(MAKE) stage[+id+]-start; \[+IF lean +] + if $(LEAN); then \ + rm -rf stage[+lean+]-* ; \ + $(STAMP) stage[+lean+]-lean ; \ + fi; \[+ ENDIF lean +] $(MAKE) $(RECURSE_FLAGS_TO_PASS) all-stage[+id+]; \ - fi + fi[+ IF compare-target +] + $(MAKE) $(RECURSE_FLAGS_TO_PASS) [+compare-target+][+ ENDIF compare-target +] .PHONY: all-stage[+id+] clean-stage[+id+] do-clean: clean-stage[+id+] @@ -1564,7 +1335,7 @@ do-clean: clean-stage[+id+] echo Cannot compare object files as stage [+prev+] was deleted. ; \ exit 0 ; \ fi; \ - [ -f stage_current ] && $(MAKE) `cat stage_current`-end || : ; \ + : $(MAKE); $(stage); \ rm -f .bad_compare ; \ cd stage[+id+]-gcc; \ files=`find . -name "*$(objext)" -print` ; \ @@ -1589,21 +1360,40 @@ do-clean: clean-stage[+id+] true; \ fi ; \ $(STAMP) [+compare-target+][+ IF prev +] - @bootstrap_lean@-rm -rf stage[+prev+]-* ; $(STAMP) stage[+prev+]-lean[+ ENDIF prev +] + if $(LEAN); then \ + rm -rf stage[+prev+]-*; \ + $(STAMP) stage[+prev+]-lean; \ + fi[+ ENDIF prev +] [+ ENDIF compare-target +] [+ IF bootstrap-target +] -.PHONY: [+bootstrap-target+] -[+bootstrap-target+]: stage[+id+]-bubble - [+ IF compare-target +]$(MAKE) [+compare-target+] - [+ ENDIF compare-target +]$(MAKE) $(RECURSE_FLAGS_TO_PASS) all +.PHONY: [+bootstrap-target+] [+bootstrap-target+]-lean +[+bootstrap-target+]: + echo stage[+id+] > stage_final + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(MAKE) $(RECURSE_FLAGS_TO_PASS) stage[+id+]-bubble + @: $(MAKE); $(unstage) + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) all-host all-target + +[+bootstrap-target+]-lean: + echo stage[+id+] > stage_final + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(MAKE) $(RECURSE_FLAGS_TO_PASS) LEAN=: stage[+id+]-bubble + @: $(MAKE); $(unstage) + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) all-host all-target [+ ENDIF bootstrap-target +] # Rules to wipe a stage and all the following ones, also used for cleanstrap [+ IF prev +]distclean-stage[+prev+]:: distclean-stage[+id+] [+ ENDIF prev +] .PHONY: distclean-stage[+id+] distclean-stage[+id+]:: - [ -f stage_current ] && $(MAKE) `cat stage_current`-end || : + @: $(MAKE); $(stage) rm -rf stage[+id+]-* [+ IF compare-target +][+compare-target+] [+ ENDIF compare-target +] @@ -1772,17 +1562,6 @@ install-gdb: $(INSTALL_GDB_TK) # Regenerating top level configury # -------------------------------- -# Multilib.out tells target dirs what multilibs they should build. -# There is really only one copy. We use the 'timestamp' method to -# work around various timestamp bugs on some systems. -# We use move-if-change so that it's only considered updated when it -# actually changes, because it has to depend on a phony target. -multilib.out: maybe-all-gcc - @r=`${PWD_COMMAND}`; export r; \ - echo "Checking multilib configuration..."; \ - $(CC_FOR_TARGET) --print-multi-lib > multilib.tmp 2> /dev/null ; \ - $(SHELL) $(srcdir)/move-if-change multilib.tmp multilib.out ; \ - # Rebuilding Makefile.in, using autogen. AUTOGEN = autogen $(srcdir)/Makefile.in: @MAINT@ $(srcdir)/Makefile.tpl $(srcdir)/Makefile.def diff --git a/config.sub b/config.sub index a4aba165da3..eb6b3eb89ce 100755 --- a/config.sub +++ b/config.sub @@ -3,7 +3,7 @@ # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. -timestamp='2005-11-13' +timestamp='2005-12-06' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software @@ -265,7 +265,7 @@ case $basic_machine in | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ - | ms1 \ + | mt \ | msp430 \ | ns16k | ns32k \ | or32 \ @@ -295,6 +295,9 @@ case $basic_machine in m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; + ms1) + basic_machine=mt-unknown + ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. @@ -344,7 +347,7 @@ case $basic_machine in | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ - | ms1-* \ + | mt-* \ | msp430-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | orion-* \ @@ -704,6 +707,9 @@ case $basic_machine in basic_machine=i386-pc os=-msdos ;; + ms1-*) + basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` + ;; mvs) basic_machine=i370-ibm os=-mvs diff --git a/config/ChangeLog b/config/ChangeLog index 800698cf2b8..cf60516185e 100644 --- a/config/ChangeLog +++ b/config/ChangeLog @@ -1,3 +1,22 @@ +2006-02-01 Paolo Bonzini + + PR target/25259 + * stdint.m4: New. + +2005-12-20 Paolo Bonzini + + Revert Ada-related part of the previous change. + + * mt-ppc-aix: Delete. + +2005-12-19 Paolo Bonzini + + * mt-ppc-aix, mh-ppc-aix: New. + +2005-12-05 Paolo Bonzini + + * acx.m4 (GCC_TARGET_TOOL): New. + 2005-09-23 Tom Tromey * enable.m4: New file. @@ -5,7 +24,7 @@ 2005-08-12 Paolo Bonzini - * config/acx.m4 (NCN_CHECK_TARGET_TOOL, NCN_STRICT_CHECK_TOOL, + * acx.m4 (NCN_CHECK_TARGET_TOOL, NCN_STRICT_CHECK_TOOL, NCN_STRICT_CHECK_TARGET_TOOL): Remove. (NCN_STRICT_CHECK_TOOLS, NCN_STRICT_CHECK_TARGET_TOOLS): New, based on the deleted macros. diff --git a/config/acx.m4 b/config/acx.m4 index 94e3216367b..c71f39b44b8 100644 --- a/config/acx.m4 +++ b/config/acx.m4 @@ -296,3 +296,34 @@ fi AC_SUBST(LN)dnl ]) +dnl GCC_TARGET_TOOL(PROGRAM, TARGET-VAR, HOST-VAR, IN-TREE-TOOL, LANGUAGE) +AC_DEFUN([GCC_TARGET_TOOL], +[AC_MSG_CHECKING(where to find the target $1) +if test "x${build}" != "x${host}" ; then + # Canadian cross, just use what we found + AC_MSG_RESULT(pre-installed) +else + ifelse([$4],,, + [ok=yes + case " ${configdirs} " in + *" patsubst([$4], [/.*], []) "*) ;; + *) ok=no ;; + esac + ifelse([$5],,, + [case ,${enable_languages}, in + *,$5,*) ;; + *) ok=no ;; + esac]) + if test $ok = yes; then + # An in-tree tool is available and we can use it + $2='$$r/$(HOST_SUBDIR)/$4' + AC_MSG_RESULT(just compiled) + el])if test "x$target" = "x$host"; then + # We can use an host tool + $2='$($3)' + AC_MSG_RESULT(host tool) + else + # We need a cross tool + AC_MSG_RESULT(pre-installed) + fi +fi]) diff --git a/config/mh-ppc-aix b/config/mh-ppc-aix new file mode 100644 index 00000000000..f2bc76a0c3e --- /dev/null +++ b/config/mh-ppc-aix @@ -0,0 +1,8 @@ + +# Compile Ada files with minimal-toc. The primary focus is gnatlib, so +# that the library does not use nearly the entire TOC of applications +# until gnatlib is built as a shared library on AIX. Compiling the +# compiler with -mminimal-toc does not cause any harm. +BOOT_ADAFLAGS = -mminimal-toc +BOOT_LDFLAGS = -Wl,-bbigtoc +LDFLAGS = `case $(CC) in *gcc*) echo -Wl,-bbigtoc ;; esac;` diff --git a/config/stdint.m4 b/config/stdint.m4 new file mode 100644 index 00000000000..21ef2ec43ac --- /dev/null +++ b/config/stdint.m4 @@ -0,0 +1,486 @@ +dnl @synopsis GCC_HEADER_STDINT [( HEADER-TO-GENERATE [, HEADERS-TO-CHECK])] +dnl +dnl the "ISO C9X: 7.18 Integer types " section requires the +dnl existence of an include file that defines a set of +dnl typedefs, especially uint8_t,int32_t,uintptr_t. +dnl Many older installations will not provide this file, but some will +dnl have the very same definitions in . In other enviroments +dnl we can use the inet-types in which would define the +dnl typedefs int8_t and u_int8_t respectivly. +dnl +dnl This macros will create a local "_stdint.h" or the headerfile given as +dnl an argument. In many cases that file will pick the definition from a +dnl "#include " or "#include " statement, while +dnl in other environments it will provide the set of basic 'stdint's defined: +dnl int8_t,uint8_t,int16_t,uint16_t,int32_t,uint32_t,intptr_t,uintptr_t +dnl int_least32_t.. int_fast32_t.. intmax_t +dnl which may or may not rely on the definitions of other files. +dnl +dnl Sometimes the stdint.h or inttypes.h headers conflict with sys/types.h, +dnl so we test the headers together with sys/types.h and always include it +dnl into the generated header (to match the tests with the generated file). +dnl Hopefully this is not a big annoyance. +dnl +dnl If your installed header files require the stdint-types you will want to +dnl create an installable file mylib-int.h that all your other installable +dnl header may include. So, for a library package named "mylib", just use +dnl GCC_HEADER_STDINT(mylib-int.h) +dnl in configure.in and install that header file in Makefile.am along with +dnl the other headers (mylib.h). The mylib-specific headers can simply +dnl use "#include " to obtain the stdint-types. +dnl +dnl Remember, if the system already had a valid , the generated +dnl file will include it directly. No need for fuzzy HAVE_STDINT_H things... +dnl +dnl @author Guido Draheim , Paolo Bonzini + +AC_DEFUN([GCC_HEADER_STDINT], +[m4_define(_GCC_STDINT_H, m4_ifval($1, $1, _stdint.h)) + +inttype_headers=`echo inttypes.h sys/inttypes.h $2 | sed -e 's/,/ /g'` + +acx_cv_header_stdint=stddef.h +acx_cv_header_stdint_kind="(already complete)" +for i in stdint.h $inttype_headers; do + unset ac_cv_type_uintptr_t + unset ac_cv_type_uintmax_t + unset ac_cv_type_int_least32_t + unset ac_cv_type_int_fast32_t + unset ac_cv_type_uint64_t + _AS_ECHO_N([looking for a compliant stdint.h in $i, ]) + AC_CHECK_TYPE(uintmax_t,[acx_cv_header_stdint=$i],continue,[#include +#include <$i>]) + AC_CHECK_TYPE(uintptr_t,,[acx_cv_header_stdint_kind="(mostly complete)"], [#include +#include <$i>]) + AC_CHECK_TYPE(int_least32_t,,[acx_cv_header_stdint_kind="(mostly complete)"], [#include +#include <$i>]) + AC_CHECK_TYPE(int_fast32_t,,[acx_cv_header_stdint_kind="(mostly complete)"], [#include +#include <$i>]) + AC_CHECK_TYPE(uint64_t,,[acx_cv_header_stdint_kind="(lacks uint64_t)"], [#include +#include <$i>]) + break +done +if test "$acx_cv_header_stdint" = stddef.h; then + acx_cv_header_stdint_kind="(lacks uintptr_t)" + for i in stdint.h $inttype_headers; do + unset ac_cv_type_uint32_t + unset ac_cv_type_uint64_t + _AS_ECHO_N([looking for an incomplete stdint.h in $i, ]) + AC_CHECK_TYPE(uint32_t,[acx_cv_header_stdint=$i],continue,[#include +#include <$i>]) + AC_CHECK_TYPE(uint64_t,,[acx_cv_header_stdint_kind="(lacks uintptr_t and uint64_t)"], [#include +#include <$i>]) + break + done +fi +if test "$acx_cv_header_stdint" = stddef.h; then + acx_cv_header_stdint_kind="(u_intXX_t style)" + for i in sys/types.h $inttype_headers; do + unset ac_cv_type_u_int32_t + unset ac_cv_type_u_int64_t + _AS_ECHO_N([looking for u_intXX_t types in $i, ]) + AC_CHECK_TYPE(u_int32_t,[acx_cv_header_stdint=$i],continue,[#include +#include <$i>]) + AC_CHECK_TYPE(u_int64_t,,[acx_cv_header_stdint_kind="(u_intXX_t style, lacks u_int64_t)"], [#include +#include <$i>]) + break + done +fi +if test "$acx_cv_header_stdint" = stddef.h; then + acx_cv_header_stdint_kind="(using manual detection)" +fi + +test -z "$ac_cv_type_uintptr_t" && ac_cv_type_uintptr_t=no +test -z "$ac_cv_type_uint64_t" && ac_cv_type_uint64_t=no +test -z "$ac_cv_type_u_int64_t" && ac_cv_type_u_int64_t=no +test -z "$ac_cv_type_int_least32_t" && ac_cv_type_int_least32_t=no +test -z "$ac_cv_type_int_fast32_t" && ac_cv_type_int_fast32_t=no + +# ----------------- Summarize what we found so far + +AC_MSG_CHECKING([what to include in _GCC_STDINT_H]) + +case `AS_BASENAME(_GCC_STDINT_H)` in + stdint.h) AC_MSG_WARN([are you sure you want it there?]) ;; + inttypes.h) AC_MSG_WARN([are you sure you want it there?]) ;; + *) ;; +esac + +AC_MSG_RESULT($acx_cv_header_stdint $acx_cv_header_stdint_kind) + +# ----------------- done included file, check C basic types -------- + +# Lacking an uintptr_t? Test size of void * +case "$acx_cv_header_stdint:$ac_cv_type_uintptr_t" in + stddef.h:* | *:no) AC_CHECK_SIZEOF(void *) ;; +esac + +# Lacking an uint64_t? Test size of long +case "$acx_cv_header_stdint:$ac_cv_type_uint64_t:$ac_cv_type_u_int64_t" in + stddef.h:*:* | *:no:no) AC_CHECK_SIZEOF(long) ;; +esac + +if test $acx_cv_header_stdint = stddef.h; then + # Lacking a good header? Test size of everything and deduce all types. + AC_CHECK_SIZEOF(int) + AC_CHECK_SIZEOF(short) + AC_CHECK_SIZEOF(char) + + AC_MSG_CHECKING(for type equivalent to int8_t) + case "$ac_cv_sizeof_char" in + 1) acx_cv_type_int8_t=char ;; + *) AC_MSG_ERROR(no 8-bit type, please report a bug) + esac + AC_MSG_RESULT($acx_cv_type_int8_t) + + AC_MSG_CHECKING(for type equivalent to int16_t) + case "$ac_cv_sizeof_int:$ac_cv_sizeof_short" in + 2:*) acx_cv_type_int16_t=int ;; + *:2) acx_cv_type_int16_t=short ;; + *) AC_MSG_ERROR(no 16-bit type, please report a bug) + esac + AC_MSG_RESULT($acx_cv_type_int16_t) + + AC_MSG_CHECKING(for type equivalent to int32_t) + case "$ac_cv_sizeof_int:$ac_cv_sizeof_long" in + 4:*) acx_cv_type_int32_t=int ;; + *:4) acx_cv_type_int32_t=long ;; + *) AC_MSG_ERROR(no 32-bit type, please report a bug) + esac + AC_MSG_RESULT($acx_cv_type_int32_t) +fi + +# These tests are here to make the output prettier + +if test "$ac_cv_type_uint64_t" != yes && test "$ac_cv_type_u_int64_t" != yes; then + case "$ac_cv_sizeof_long" in + 8) acx_cv_type_int64_t=long ;; + esac + AC_MSG_CHECKING(for type equivalent to int64_t) + AC_MSG_RESULT(${acx_cv_type_int64_t-'using preprocessor symbols'}) +fi + +# Now we can use the above types + +if test "$ac_cv_type_uintptr_t" != yes; then + AC_MSG_CHECKING(for type equivalent to intptr_t) + case $ac_cv_sizeof_void_p in + 2) acx_cv_type_intptr_t=int16_t ;; + 4) acx_cv_type_intptr_t=int32_t ;; + 8) acx_cv_type_intptr_t=int64_t ;; + *) AC_MSG_ERROR(no equivalent for intptr_t, please report a bug) + esac + AC_MSG_RESULT($acx_cv_type_intptr_t) +fi + +# ----------------- done all checks, emit header ------------- +AC_CONFIG_COMMANDS(_GCC_STDINT_H, [ +if test "$GCC" = yes; then + echo "/* generated for " `$CC --version | sed 1q` "*/" > tmp-stdint.h +else + echo "/* generated for $CC */" > tmp-stdint.h +fi + +sed 's/^ *//' >> tmp-stdint.h < +EOF + +if test "$acx_cv_header_stdint" != stdint.h; then + echo "#include " >> tmp-stdint.h +fi +if test "$acx_cv_header_stdint" != stddef.h; then + echo "#include <$acx_cv_header_stdint>" >> tmp-stdint.h +fi + +sed 's/^ *//' >> tmp-stdint.h <> tmp-stdint.h <> tmp-stdint.h <> tmp-stdint.h <> tmp-stdint.h <> tmp-stdint.h <> tmp-stdint.h <> tmp-stdint.h <= 199901L + #ifndef _INT64_T + #define _INT64_T + typedef long long int64_t; + #endif + #ifndef _UINT64_T + #define _UINT64_T + typedef unsigned long long uint64_t; + #endif + + #elif defined __GNUC__ && defined (__STDC__) && __STDC__-0 + /* NextStep 2.0 cc is really gcc 1.93 but it defines __GNUC__ = 2 and + does not implement __extension__. But that compiler doesn't define + __GNUC_MINOR__. */ + # if __GNUC__ < 2 || (__NeXT__ && !__GNUC_MINOR__) + # define __extension__ + # endif + + # ifndef _INT64_T + # define _INT64_T + __extension__ typedef long long int64_t; + # endif + # ifndef _UINT64_T + # define _UINT64_T + __extension__ typedef unsigned long long uint64_t; + # endif + + #elif !defined __STRICT_ANSI__ + # if defined _MSC_VER || defined __WATCOMC__ || defined __BORLANDC__ + + # ifndef _INT64_T + # define _INT64_T + typedef __int64 int64_t; + # endif + # ifndef _UINT64_T + # define _UINT64_T + typedef unsigned __int64 uint64_t; + # endif + # endif /* compiler */ + + #endif /* ANSI version */ +EOF +fi + +# ------------- done int64_t types, emit intptr types ------------ +if test "$ac_cv_type_uintptr_t" != yes; then + sed 's/^ *//' >> tmp-stdint.h <> tmp-stdint.h < 1. + dnl Fix when strange machines are reported. + sed 's/^ *//' >> tmp-stdint.h <> tmp-stdint.h <> tmp-stdint.h <&6 -echo "configure:1825: checking for $ac_word" >&5 +echo "configure:1831: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1851,7 +1857,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1855: checking for $ac_word" >&5 +echo "configure:1861: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1902,7 +1908,7 @@ fi # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1906: checking for $ac_word" >&5 +echo "configure:1912: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1934,7 +1940,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1938: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:1944: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -1945,12 +1951,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 1949 "configure" +#line 1955 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:1954: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -1976,12 +1982,12 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1980: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1986: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:1985: checking whether we are using GNU C" >&5 +echo "configure:1991: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1990,7 +1996,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1994: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2000: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -2009,7 +2015,7 @@ ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:2013: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:2019: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2076,7 +2082,7 @@ fi # Extract the first word of "${ac_tool_prefix}gnatbind", so it can be a program name with args. set dummy ${ac_tool_prefix}gnatbind; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2080: checking for $ac_word" >&5 +echo "configure:2086: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2108,7 +2114,7 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "gnatbind", so it can be a program name with args. set dummy gnatbind; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2112: checking for $ac_word" >&5 +echo "configure:2118: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2141,7 +2147,7 @@ fi fi echo $ac_n "checking whether compiler driver understands Ada""... $ac_c" 1>&6 -echo "configure:2145: checking whether compiler driver understands Ada" >&5 +echo "configure:2151: checking whether compiler driver understands Ada" >&5 if eval "test \"`echo '$''{'acx_cv_cc_gcc_supports_ada'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2173,7 +2179,7 @@ else fi echo $ac_n "checking how to compare bootstrapped objects""... $ac_c" 1>&6 -echo "configure:2177: checking how to compare bootstrapped objects" >&5 +echo "configure:2183: checking how to compare bootstrapped objects" >&5 if eval "test \"`echo '$''{'gcc_cv_prog_cmp_skip'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2271,9 +2277,9 @@ saved_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $gmpinc" # Check GMP actually works echo $ac_n "checking for correct version of gmp.h""... $ac_c" 1>&6 -echo "configure:2275: checking for correct version of gmp.h" >&5 +echo "configure:2281: checking for correct version of gmp.h" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2294: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 else @@ -2297,12 +2303,12 @@ rm -f conftest* if test x"$have_gmp" = xyes; then echo $ac_n "checking for MPFR""... $ac_c" 1>&6 -echo "configure:2301: checking for MPFR" >&5 +echo "configure:2307: checking for MPFR" >&5 saved_LIBS="$LIBS" LIBS="$LIBS $gmplibs" cat > conftest.$ac_ext < #include @@ -2310,7 +2316,7 @@ int main() { mpfr_t n; mpfr_init(n); ; return 0; } EOF -if { (eval echo configure:2314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "$ac_t""yes" 1>&6 else @@ -2816,221 +2822,6 @@ esac tooldir='${exec_prefix}'/${target_alias} build_tooldir=${tooldir} -# Generate default definitions for YACC, M4, LEX and other programs that run -# on the build machine. These are used if the Makefile can't locate these -# programs in objdir. -MISSING=`cd $ac_aux_dir && ${PWDCMD-pwd}`/missing -for ac_prog in bison -do -# Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2829: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_BISON'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$CONFIGURED_BISON"; then - ac_cv_prog_CONFIGURED_BISON="$CONFIGURED_BISON" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_CONFIGURED_BISON="$ac_prog" - break - fi - done - IFS="$ac_save_ifs" -fi -fi -CONFIGURED_BISON="$ac_cv_prog_CONFIGURED_BISON" -if test -n "$CONFIGURED_BISON"; then - echo "$ac_t""$CONFIGURED_BISON" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - -test -n "$CONFIGURED_BISON" && break -done -test -n "$CONFIGURED_BISON" || CONFIGURED_BISON="$MISSING bison" - -for ac_prog in 'bison -y' byacc yacc -do -# Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2864: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_YACC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$CONFIGURED_YACC"; then - ac_cv_prog_CONFIGURED_YACC="$CONFIGURED_YACC" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_CONFIGURED_YACC="$ac_prog" - break - fi - done - IFS="$ac_save_ifs" -fi -fi -CONFIGURED_YACC="$ac_cv_prog_CONFIGURED_YACC" -if test -n "$CONFIGURED_YACC"; then - echo "$ac_t""$CONFIGURED_YACC" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - -test -n "$CONFIGURED_YACC" && break -done -test -n "$CONFIGURED_YACC" || CONFIGURED_YACC="$MISSING bison -y" - -for ac_prog in gm4 gnum4 m4 -do -# Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2899: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_M4'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$CONFIGURED_M4"; then - ac_cv_prog_CONFIGURED_M4="$CONFIGURED_M4" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_CONFIGURED_M4="$ac_prog" - break - fi - done - IFS="$ac_save_ifs" -fi -fi -CONFIGURED_M4="$ac_cv_prog_CONFIGURED_M4" -if test -n "$CONFIGURED_M4"; then - echo "$ac_t""$CONFIGURED_M4" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - -test -n "$CONFIGURED_M4" && break -done -test -n "$CONFIGURED_M4" || CONFIGURED_M4="$MISSING m4" - -for ac_prog in flex -do -# Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2934: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_FLEX'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$CONFIGURED_FLEX"; then - ac_cv_prog_CONFIGURED_FLEX="$CONFIGURED_FLEX" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_CONFIGURED_FLEX="$ac_prog" - break - fi - done - IFS="$ac_save_ifs" -fi -fi -CONFIGURED_FLEX="$ac_cv_prog_CONFIGURED_FLEX" -if test -n "$CONFIGURED_FLEX"; then - echo "$ac_t""$CONFIGURED_FLEX" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - -test -n "$CONFIGURED_FLEX" && break -done -test -n "$CONFIGURED_FLEX" || CONFIGURED_FLEX="$MISSING flex" - -for ac_prog in flex lex -do -# Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2969: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_LEX'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$CONFIGURED_LEX"; then - ac_cv_prog_CONFIGURED_LEX="$CONFIGURED_LEX" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_CONFIGURED_LEX="$ac_prog" - break - fi - done - IFS="$ac_save_ifs" -fi -fi -CONFIGURED_LEX="$ac_cv_prog_CONFIGURED_LEX" -if test -n "$CONFIGURED_LEX"; then - echo "$ac_t""$CONFIGURED_LEX" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - -test -n "$CONFIGURED_LEX" && break -done -test -n "$CONFIGURED_LEX" || CONFIGURED_LEX="$MISSING flex" - -for ac_prog in makeinfo -do -# Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3004: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_MAKEINFO'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$CONFIGURED_MAKEINFO"; then - ac_cv_prog_CONFIGURED_MAKEINFO="$CONFIGURED_MAKEINFO" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_CONFIGURED_MAKEINFO="$ac_prog" - break - fi - done - IFS="$ac_save_ifs" -fi -fi -CONFIGURED_MAKEINFO="$ac_cv_prog_CONFIGURED_MAKEINFO" -if test -n "$CONFIGURED_MAKEINFO"; then - echo "$ac_t""$CONFIGURED_MAKEINFO" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - -test -n "$CONFIGURED_MAKEINFO" && break -done -test -n "$CONFIGURED_MAKEINFO" || CONFIGURED_MAKEINFO="$MISSING makeinfo" - - # Create a .gdbinit file which runs the one in srcdir # and tells GDB to look there for source files. @@ -3167,27 +2958,26 @@ esac case "$have_compiler:$host:$target:$enable_bootstrap" in *:*:*:no) ;; - # Default behavior. (We'll) enable bootstrap if we have a compiler + # Default behavior. Enable bootstrap if we have a compiler # and we are in a native configuration. yes:$build:$build:default) - # This will become 'yes' - enable_bootstrap=no ;; + enable_bootstrap=yes ;; *:*:*:default) enable_bootstrap=no ;; # We have a compiler and we are in a native configuration, bootstrap is ok - yes:$build:$build:yes | yes:$build:$build:lean) + yes:$build:$build:yes) ;; # Other configurations, but we have a compiler. Assume the user knows # what he's doing. - yes:*:*:yes | yes:*:*:lean) + yes:*:*:yes) echo "configure: warning: trying to bootstrap a cross compiler" 1>&2 ;; # No compiler: if they passed --enable-bootstrap explicitly, fail - no:*:*:yes | no:*:*:lean) + no:*:*:yes) { echo "configure: error: cannot bootstrap without a compiler" 1>&2; exit 1; } ;; # Fail if wrong command line @@ -3199,16 +2989,11 @@ esac # Adjust the toplevel makefile according to whether bootstrap was selected. case "$enable_bootstrap" in yes) - bootstrap_lean='#' - bootstrap_suffix=bootstrap ;; - lean) - bootstrap_lean='' bootstrap_suffix=bootstrap ;; no) bootstrap_suffix=no-bootstrap ;; esac - for module in ${build_configdirs} ; do if test -z "${no_recursion}" \ && test -f ${build_subdir}/${module}/Makefile; then @@ -3222,10 +3007,13 @@ for module in ${build_configdirs} ; do /^@endif build-$module-$bootstrap_suffix\$/d" done for module in ${configdirs} ; do - if test -z "${no_recursion}" \ - && test -f ${module}/Makefile; then - echo 1>&2 "*** removing ${module}/Makefile to force reconfigure" - rm -f ${module}/Makefile + if test -z "${no_recursion}"; then + for file in stage*-${module}/Makefile ${module}/Makefile; do + if test -f ${file}; then + echo 1>&2 "*** removing ${file} to force reconfigure" + rm -f ${file} + fi + done fi extrasub="$extrasub /^@if $module\$/d @@ -3506,12 +3294,350 @@ done -# Target module lists & subconfigure args. +# Target module lists & subconfigure args. + + + +# Build tools. + + + +# Generate default definitions for YACC, M4, LEX and other programs that run +# on the build machine. These are used if the Makefile can't locate these +# programs in objdir. +MISSING=`cd $ac_aux_dir && ${PWDCMD-pwd}`/missing + +for ac_prog in 'bison -y' byacc yacc +do +# Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:3316: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$YACC"; then + ac_cv_prog_YACC="$YACC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_YACC="$ac_prog" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +YACC="$ac_cv_prog_YACC" +if test -n "$YACC"; then + echo "$ac_t""$YACC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +test -n "$YACC" && break +done +test -n "$YACC" || YACC="$MISSING bison -y" + +case " $build_configdirs " in + *" bison "*) YACC='$$r/$(BUILD_SUBDIR)/bison/tests/bison -y' ;; + *" byacc "*) YACC='$$r/$(BUILD_SUBDIR)/byacc/byacc' ;; +esac + +for ac_prog in bison +do +# Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:3356: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_BISON'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$BISON"; then + ac_cv_prog_BISON="$BISON" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_BISON="$ac_prog" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +BISON="$ac_cv_prog_BISON" +if test -n "$BISON"; then + echo "$ac_t""$BISON" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +test -n "$BISON" && break +done +test -n "$BISON" || BISON="$MISSING bison" + +case " $build_configdirs " in + *" bison "*) BISON='$$r/$(BUILD_SUBDIR)/bison/tests/bison' ;; +esac + +for ac_prog in gm4 gnum4 m4 +do +# Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:3395: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_M4'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$M4"; then + ac_cv_prog_M4="$M4" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_M4="$ac_prog" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +M4="$ac_cv_prog_M4" +if test -n "$M4"; then + echo "$ac_t""$M4" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +test -n "$M4" && break +done +test -n "$M4" || M4="$MISSING m4" + +case " $build_configdirs " in + *" m4 "*) M4='$$r/$(BUILD_SUBDIR)/m4/m4' ;; +esac + +for ac_prog in flex lex +do +# Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:3434: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$LEX"; then + ac_cv_prog_LEX="$LEX" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_LEX="$ac_prog" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +LEX="$ac_cv_prog_LEX" +if test -n "$LEX"; then + echo "$ac_t""$LEX" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +test -n "$LEX" && break +done +test -n "$LEX" || LEX="$MISSING flex" + +case " $build_configdirs " in + *" flex "*) LEX='$$r/$(BUILD_SUBDIR)/flex/flex' ;; + *" lex "*) LEX='$$r/$(BUILD_SUBDIR)/lex/lex' ;; +esac + +for ac_prog in flex +do +# Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:3474: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_FLEX'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$FLEX"; then + ac_cv_prog_FLEX="$FLEX" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_FLEX="$ac_prog" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +FLEX="$ac_cv_prog_FLEX" +if test -n "$FLEX"; then + echo "$ac_t""$FLEX" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +test -n "$FLEX" && break +done +test -n "$FLEX" || FLEX="$MISSING flex" + +case " $build_configdirs " in + *" flex "*) FLEX='$$r/$(BUILD_SUBDIR)/flex/flex' ;; +esac + +for ac_prog in makeinfo +do +# Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:3513: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_MAKEINFO'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$MAKEINFO"; then + ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_MAKEINFO="$ac_prog" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +MAKEINFO="$ac_cv_prog_MAKEINFO" +if test -n "$MAKEINFO"; then + echo "$ac_t""$MAKEINFO" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +test -n "$MAKEINFO" && break +done +test -n "$MAKEINFO" || MAKEINFO="$MISSING makeinfo" + +case " $build_configdirs " in + *" texinfo "*) MAKEINFO='$$r/$(BUILD_SUBDIR)/texinfo/makeinfo/makeinfo' ;; + *) + + # For an installed makeinfo, we require it to be from texinfo 4.2 or + # higher, else we use the "missing" dummy. + if ${MAKEINFO} --version \ + | egrep 'texinfo[^0-9]*([1-3][0-9]|4\.[2-9]|[5-9])' >/dev/null 2>&1; then + : + else + MAKEINFO="$MISSING makeinfo" + fi + ;; + +esac + +# FIXME: expect and dejagnu may become build tools? + +for ac_prog in expect +do +# Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:3566: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_EXPECT'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$EXPECT"; then + ac_cv_prog_EXPECT="$EXPECT" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_EXPECT="$ac_prog" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +EXPECT="$ac_cv_prog_EXPECT" +if test -n "$EXPECT"; then + echo "$ac_t""$EXPECT" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +test -n "$EXPECT" && break +done +test -n "$EXPECT" || EXPECT="expect" +case " $configdirs " in + *" expect "*) + test $host = $build && EXPECT='$$r/$(HOST_SUBDIR)/expect/expect' + ;; +esac +for ac_prog in runtest +do +# Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:3607: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_RUNTEST'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$RUNTEST"; then + ac_cv_prog_RUNTEST="$RUNTEST" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_RUNTEST="$ac_prog" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +RUNTEST="$ac_cv_prog_RUNTEST" +if test -n "$RUNTEST"; then + echo "$ac_t""$RUNTEST" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi -# Build tools. +test -n "$RUNTEST" && break +done +test -n "$RUNTEST" || RUNTEST="runtest" +case " $configdirs " in + *" dejagnu "*) + test $host = $build && RUNTEST='$$r/$(HOST_SUBDIR)/dejagnu/runtest' + ;; +esac # Host tools. @@ -3525,7 +3651,7 @@ test -n "$target_alias" && ncn_target_tool_prefix=$target_alias- # Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args. set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3529: checking for $ac_word" >&5 +echo "configure:3655: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3556,7 +3682,7 @@ fi # Extract the first word of "${ncn_progname}", so it can be a program name with args. set dummy ${ncn_progname}; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3560: checking for $ac_word" >&5 +echo "configure:3686: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3600,7 +3726,7 @@ fi # Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args. set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3604: checking for $ac_word" >&5 +echo "configure:3730: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3631,7 +3757,7 @@ fi # Extract the first word of "${ncn_progname}", so it can be a program name with args. set dummy ${ncn_progname}; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3635: checking for $ac_word" >&5 +echo "configure:3761: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3675,7 +3801,7 @@ fi # Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args. set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3679: checking for $ac_word" >&5 +echo "configure:3805: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3706,7 +3832,7 @@ fi # Extract the first word of "${ncn_progname}", so it can be a program name with args. set dummy ${ncn_progname}; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3710: checking for $ac_word" >&5 +echo "configure:3836: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3750,7 +3876,7 @@ fi # Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args. set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3754: checking for $ac_word" >&5 +echo "configure:3880: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3781,7 +3907,7 @@ fi # Extract the first word of "${ncn_progname}", so it can be a program name with args. set dummy ${ncn_progname}; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3785: checking for $ac_word" >&5 +echo "configure:3911: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3820,12 +3946,87 @@ if test -z "$ac_cv_prog_LD" ; then fi fi + for ncn_progname in lipo; do + if test -n "$ncn_tool_prefix"; then + # Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args. +set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:3955: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_LIPO'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$LIPO"; then + ac_cv_prog_LIPO="$LIPO" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_LIPO="${ncn_tool_prefix}${ncn_progname}" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +LIPO="$ac_cv_prog_LIPO" +if test -n "$LIPO"; then + echo "$ac_t""$LIPO" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + fi + if test -z "$ac_cv_prog_LIPO" && test $build = $host ; then + # Extract the first word of "${ncn_progname}", so it can be a program name with args. +set dummy ${ncn_progname}; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:3986: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_LIPO'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$LIPO"; then + ac_cv_prog_LIPO="$LIPO" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_LIPO="${ncn_progname}" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +LIPO="$ac_cv_prog_LIPO" +if test -n "$LIPO"; then + echo "$ac_t""$LIPO" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + fi + test -n "$ac_cv_prog_LIPO" && break +done + +if test -z "$ac_cv_prog_LIPO" ; then + set dummy lipo + if test $build = $host ; then + LIPO="$2" + else + LIPO="${ncn_tool_prefix}$2" + fi +fi + for ncn_progname in nm; do if test -n "$ncn_tool_prefix"; then # Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args. set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3829: checking for $ac_word" >&5 +echo "configure:4030: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_NM'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3856,7 +4057,7 @@ fi # Extract the first word of "${ncn_progname}", so it can be a program name with args. set dummy ${ncn_progname}; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3860: checking for $ac_word" >&5 +echo "configure:4061: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_NM'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3900,7 +4101,7 @@ fi # Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args. set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3904: checking for $ac_word" >&5 +echo "configure:4105: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3931,7 +4132,7 @@ fi # Extract the first word of "${ncn_progname}", so it can be a program name with args. set dummy ${ncn_progname}; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3935: checking for $ac_word" >&5 +echo "configure:4136: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3965,12 +4166,82 @@ if test -z "$ac_cv_prog_RANLIB" ; then RANLIB=":" fi + for ncn_progname in strip; do + if test -n "$ncn_tool_prefix"; then + # Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args. +set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:4175: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_STRIP="${ncn_tool_prefix}${ncn_progname}" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +STRIP="$ac_cv_prog_STRIP" +if test -n "$STRIP"; then + echo "$ac_t""$STRIP" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + fi + if test -z "$ac_cv_prog_STRIP" && test $build = $host ; then + # Extract the first word of "${ncn_progname}", so it can be a program name with args. +set dummy ${ncn_progname}; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:4206: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_STRIP="${ncn_progname}" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +STRIP="$ac_cv_prog_STRIP" +if test -n "$STRIP"; then + echo "$ac_t""$STRIP" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + fi + test -n "$ac_cv_prog_STRIP" && break +done + +if test -z "$ac_cv_prog_STRIP" ; then + STRIP=":" +fi + for ncn_progname in windres; do if test -n "$ncn_tool_prefix"; then # Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args. set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3974: checking for $ac_word" >&5 +echo "configure:4245: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4001,7 +4272,7 @@ fi # Extract the first word of "${ncn_progname}", so it can be a program name with args. set dummy ${ncn_progname}; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4005: checking for $ac_word" >&5 +echo "configure:4276: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4045,7 +4316,7 @@ fi # Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args. set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4049: checking for $ac_word" >&5 +echo "configure:4320: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_OBJCOPY'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4076,7 +4347,7 @@ fi # Extract the first word of "${ncn_progname}", so it can be a program name with args. set dummy ${ncn_progname}; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4080: checking for $ac_word" >&5 +echo "configure:4351: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_OBJCOPY'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4120,7 +4391,7 @@ fi # Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args. set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4124: checking for $ac_word" >&5 +echo "configure:4395: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4151,7 +4422,7 @@ fi # Extract the first word of "${ncn_progname}", so it can be a program name with args. set dummy ${ncn_progname}; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4155: checking for $ac_word" >&5 +echo "configure:4426: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4196,14 +4467,13 @@ fi -# Target tools. Do the tests using the names they may have passed in -# the environment, then move it to CONFIGURED_*_FOR_TARGET. +# Target tools. for ncn_progname in ar; do if test -n "$ncn_target_tool_prefix"; then # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args. set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4207: checking for $ac_word" >&5 +echo "configure:4477: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AR_FOR_TARGET'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4234,7 +4504,7 @@ fi # Extract the first word of "${ncn_progname}", so it can be a program name with args. set dummy ${ncn_progname}; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4238: checking for $ac_word" >&5 +echo "configure:4508: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AR_FOR_TARGET'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4278,7 +4548,7 @@ fi # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args. set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4282: checking for $ac_word" >&5 +echo "configure:4552: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AS_FOR_TARGET'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4309,7 +4579,7 @@ fi # Extract the first word of "${ncn_progname}", so it can be a program name with args. set dummy ${ncn_progname}; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4313: checking for $ac_word" >&5 +echo "configure:4583: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AS_FOR_TARGET'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4353,7 +4623,7 @@ fi # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args. set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4357: checking for $ac_word" >&5 +echo "configure:4627: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC_FOR_TARGET'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4384,7 +4654,7 @@ fi # Extract the first word of "${ncn_progname}", so it can be a program name with args. set dummy ${ncn_progname}; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4388: checking for $ac_word" >&5 +echo "configure:4658: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC_FOR_TARGET'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4428,7 +4698,7 @@ fi # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args. set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4432: checking for $ac_word" >&5 +echo "configure:4702: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CXX_FOR_TARGET'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4459,7 +4729,7 @@ fi # Extract the first word of "${ncn_progname}", so it can be a program name with args. set dummy ${ncn_progname}; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4463: checking for $ac_word" >&5 +echo "configure:4733: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CXX_FOR_TARGET'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4503,7 +4773,7 @@ fi # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args. set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4507: checking for $ac_word" >&5 +echo "configure:4777: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL_FOR_TARGET'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4534,7 +4804,7 @@ fi # Extract the first word of "${ncn_progname}", so it can be a program name with args. set dummy ${ncn_progname}; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4538: checking for $ac_word" >&5 +echo "configure:4808: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL_FOR_TARGET'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4578,7 +4848,7 @@ fi # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args. set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4582: checking for $ac_word" >&5 +echo "configure:4852: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_GCC_FOR_TARGET'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4609,7 +4879,7 @@ fi # Extract the first word of "${ncn_progname}", so it can be a program name with args. set dummy ${ncn_progname}; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4613: checking for $ac_word" >&5 +echo "configure:4883: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_GCC_FOR_TARGET'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4648,7 +4918,7 @@ fi # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args. set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4652: checking for $ac_word" >&5 +echo "configure:4922: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_GCJ_FOR_TARGET'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4679,7 +4949,7 @@ fi # Extract the first word of "${ncn_progname}", so it can be a program name with args. set dummy ${ncn_progname}; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4683: checking for $ac_word" >&5 +echo "configure:4953: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_GCJ_FOR_TARGET'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4723,7 +4993,7 @@ fi # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args. set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4727: checking for $ac_word" >&5 +echo "configure:4997: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_GFORTRAN_FOR_TARGET'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4754,7 +5024,7 @@ fi # Extract the first word of "${ncn_progname}", so it can be a program name with args. set dummy ${ncn_progname}; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4758: checking for $ac_word" >&5 +echo "configure:5028: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_GFORTRAN_FOR_TARGET'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4798,7 +5068,7 @@ fi # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args. set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4802: checking for $ac_word" >&5 +echo "configure:5072: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LD_FOR_TARGET'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4829,7 +5099,7 @@ fi # Extract the first word of "${ncn_progname}", so it can be a program name with args. set dummy ${ncn_progname}; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4833: checking for $ac_word" >&5 +echo "configure:5103: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LD_FOR_TARGET'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4873,7 +5143,7 @@ fi # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args. set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4877: checking for $ac_word" >&5 +echo "configure:5147: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LIPO_FOR_TARGET'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4904,7 +5174,7 @@ fi # Extract the first word of "${ncn_progname}", so it can be a program name with args. set dummy ${ncn_progname}; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4908: checking for $ac_word" >&5 +echo "configure:5178: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LIPO_FOR_TARGET'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4948,7 +5218,7 @@ fi # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args. set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4952: checking for $ac_word" >&5 +echo "configure:5222: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_NM_FOR_TARGET'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4979,7 +5249,7 @@ fi # Extract the first word of "${ncn_progname}", so it can be a program name with args. set dummy ${ncn_progname}; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4983: checking for $ac_word" >&5 +echo "configure:5253: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_NM_FOR_TARGET'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5023,7 +5293,7 @@ fi # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args. set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:5027: checking for $ac_word" >&5 +echo "configure:5297: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP_FOR_TARGET'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5054,7 +5324,7 @@ fi # Extract the first word of "${ncn_progname}", so it can be a program name with args. set dummy ${ncn_progname}; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:5058: checking for $ac_word" >&5 +echo "configure:5328: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP_FOR_TARGET'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5098,7 +5368,7 @@ fi # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args. set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:5102: checking for $ac_word" >&5 +echo "configure:5372: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB_FOR_TARGET'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5129,7 +5399,7 @@ fi # Extract the first word of "${ncn_progname}", so it can be a program name with args. set dummy ${ncn_progname}; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:5133: checking for $ac_word" >&5 +echo "configure:5403: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB_FOR_TARGET'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5168,7 +5438,7 @@ fi # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args. set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:5172: checking for $ac_word" >&5 +echo "configure:5442: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_STRIP_FOR_TARGET'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5199,7 +5469,7 @@ fi # Extract the first word of "${ncn_progname}", so it can be a program name with args. set dummy ${ncn_progname}; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:5203: checking for $ac_word" >&5 +echo "configure:5473: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_STRIP_FOR_TARGET'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5243,7 +5513,7 @@ fi # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args. set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:5247: checking for $ac_word" >&5 +echo "configure:5517: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_WINDRES_FOR_TARGET'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5274,7 +5544,7 @@ fi # Extract the first word of "${ncn_progname}", so it can be a program name with args. set dummy ${ncn_progname}; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:5278: checking for $ac_word" >&5 +echo "configure:5548: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_WINDRES_FOR_TARGET'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5314,77 +5584,440 @@ if test -z "$ac_cv_prog_WINDRES_FOR_TARGET" ; then fi -CONFIGURED_AR_FOR_TARGET="$AR_FOR_TARGET" -CONFIGURED_AS_FOR_TARGET="$AS_FOR_TARGET" -CONFIGURED_CC_FOR_TARGET="$CC_FOR_TARGET" -CONFIGURED_CXX_FOR_TARGET="$CXX_FOR_TARGET" -CONFIGURED_DLLTOOL_FOR_TARGET="$DLLTOOL_FOR_TARGET" -CONFIGURED_GCC_FOR_TARGET="$GCC_FOR_TARGET" -CONFIGURED_GCJ_FOR_TARGET="$GCJ_FOR_TARGET" -CONFIGURED_GFORTRAN_FOR_TARGET="$GFORTRAN_FOR_TARGET" -CONFIGURED_LD_FOR_TARGET="$LD_FOR_TARGET" -CONFIGURED_LIPO_FOR_TARGET="$LIPO_FOR_TARGET" -CONFIGURED_NM_FOR_TARGET="$NM_FOR_TARGET" -CONFIGURED_OBJDUMP_FOR_TARGET="$OBJDUMP_FOR_TARGET" -CONFIGURED_RANLIB_FOR_TARGET="$RANLIB_FOR_TARGET" -CONFIGURED_STRIP_FOR_TARGET="$STRIP_FOR_TARGET" -CONFIGURED_WINDRES_FOR_TARGET="$WINDRES_FOR_TARGET" - - - -# Fix up target tools. -if test "x${build}" = "x${host}" ; then - # In this case, the newly built tools can and should be used, - # so we override the results of the autoconf tests. - # This should really only happen when the tools are actually being built, - # but that's a further refinement. The new build scheme, where - # tools are built into a structure paralleling where they're installed, - # should also eliminate all of this cleanly. - AR_FOR_TARGET="\$(USUAL_AR_FOR_TARGET)" - AS_FOR_TARGET="\$(USUAL_AS_FOR_TARGET)" - CC_FOR_TARGET="\$(USUAL_CC_FOR_TARGET)" - CXX_FOR_TARGET="\$(USUAL_CXX_FOR_TARGET)" - RAW_CXX_FOR_TARGET="\$(USUAL_RAW_CXX_FOR_TARGET)" - DLLTOOL_FOR_TARGET="\$(USUAL_DLLTOOL_FOR_TARGET)" - GCC_FOR_TARGET="\$(USUAL_GCC_FOR_TARGET)" - GCJ_FOR_TARGET="\$(USUAL_GCJ_FOR_TARGET)" - GFORTRAN_FOR_TARGET="\$(USUAL_GFORTRAN_FOR_TARGET)" - LD_FOR_TARGET="\$(USUAL_LD_FOR_TARGET)" - LIPO_FOR_TARGET="\$(USUAL_LIPO_FOR_TARGET)" - NM_FOR_TARGET="\$(USUAL_NM_FOR_TARGET)" - OBJDUMP_FOR_TARGET="\$(USUAL_OBJDUMP_FOR_TARGET)" - RANLIB_FOR_TARGET="\$(USUAL_RANLIB_FOR_TARGET)" - STRIP_FOR_TARGET="\$(USUAL_STRIP_FOR_TARGET)" - WINDRES_FOR_TARGET="\$(USUAL_WINDRES_FOR_TARGET)" -else - # Just use the ones we found. - AR_FOR_TARGET="\$(CONFIGURED_AR_FOR_TARGET)" - AS_FOR_TARGET="\$(CONFIGURED_AS_FOR_TARGET)" - CC_FOR_TARGET="\$(CONFIGURED_CC_FOR_TARGET)" - CXX_FOR_TARGET="\$(CONFIGURED_CXX_FOR_TARGET)" - RAW_CXX_FOR_TARGET="\$(CONFIGURED_CXX_FOR_TARGET)" - DLLTOOL_FOR_TARGET="\$(CONFIGURED_DLLTOOL_FOR_TARGET)" - GCC_FOR_TARGET="\$(CONFIGURED_GCC_FOR_TARGET)" - GCJ_FOR_TARGET="\$(CONFIGURED_GCJ_FOR_TARGET)" - GFORTRAN_FOR_TARGET="\$(CONFIGURED_GFORTRAN_FOR_TARGET)" - LD_FOR_TARGET="\$(CONFIGURED_LD_FOR_TARGET)" - LIPO_FOR_TARGET="\$(CONFIGURED_LIPO_FOR_TARGET)" - NM_FOR_TARGET="\$(CONFIGURED_NM_FOR_TARGET)" - OBJDUMP_FOR_TARGET="\$(CONFIGURED_OBJDUMP_FOR_TARGET)" - RANLIB_FOR_TARGET="\$(CONFIGURED_RANLIB_FOR_TARGET)" - STRIP_FOR_TARGET="\$(CONFIGURED_STRIP_FOR_TARGET)" - WINDRES_FOR_TARGET="\$(CONFIGURED_WINDRES_FOR_TARGET)" +RAW_CXX_FOR_TARGET="$CXX_FOR_TARGET" + +echo $ac_n "checking where to find the target ar""... $ac_c" 1>&6 +echo "configure:5591: checking where to find the target ar" >&5 +if test "x${build}" != "x${host}" ; then + # Canadian cross, just use what we found + echo "$ac_t""pre-installed" 1>&6 +else + ok=yes + case " ${configdirs} " in + *" binutils "*) ;; + *) ok=no ;; + esac + + if test $ok = yes; then + # An in-tree tool is available and we can use it + AR_FOR_TARGET='$$r/$(HOST_SUBDIR)/binutils/ar' + echo "$ac_t""just compiled" 1>&6 + elif test "x$target" = "x$host"; then + # We can use an host tool + AR_FOR_TARGET='$(AR)' + echo "$ac_t""host tool" 1>&6 + else + # We need a cross tool + echo "$ac_t""pre-installed" 1>&6 + fi +fi +echo $ac_n "checking where to find the target as""... $ac_c" 1>&6 +echo "configure:5616: checking where to find the target as" >&5 +if test "x${build}" != "x${host}" ; then + # Canadian cross, just use what we found + echo "$ac_t""pre-installed" 1>&6 +else + ok=yes + case " ${configdirs} " in + *" gas "*) ;; + *) ok=no ;; + esac + + if test $ok = yes; then + # An in-tree tool is available and we can use it + AS_FOR_TARGET='$$r/$(HOST_SUBDIR)/gas/as-new' + echo "$ac_t""just compiled" 1>&6 + elif test "x$target" = "x$host"; then + # We can use an host tool + AS_FOR_TARGET='$(AS)' + echo "$ac_t""host tool" 1>&6 + else + # We need a cross tool + echo "$ac_t""pre-installed" 1>&6 + fi +fi +echo $ac_n "checking where to find the target cc""... $ac_c" 1>&6 +echo "configure:5641: checking where to find the target cc" >&5 +if test "x${build}" != "x${host}" ; then + # Canadian cross, just use what we found + echo "$ac_t""pre-installed" 1>&6 +else + ok=yes + case " ${configdirs} " in + *" gcc "*) ;; + *) ok=no ;; + esac + + if test $ok = yes; then + # An in-tree tool is available and we can use it + CC_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/xgcc -B$$r/$(HOST_SUBDIR)/gcc/' + echo "$ac_t""just compiled" 1>&6 + elif test "x$target" = "x$host"; then + # We can use an host tool + CC_FOR_TARGET='$(CC)' + echo "$ac_t""host tool" 1>&6 + else + # We need a cross tool + echo "$ac_t""pre-installed" 1>&6 + fi +fi +echo $ac_n "checking where to find the target c++""... $ac_c" 1>&6 +echo "configure:5666: checking where to find the target c++" >&5 +if test "x${build}" != "x${host}" ; then + # Canadian cross, just use what we found + echo "$ac_t""pre-installed" 1>&6 +else + ok=yes + case " ${configdirs} " in + *" gcc "*) ;; + *) ok=no ;; + esac + case ,${enable_languages}, in + *,c++,*) ;; + *) ok=no ;; + esac + if test $ok = yes; then + # An in-tree tool is available and we can use it + CXX_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/g++ -B$$r/$(HOST_SUBDIR)/gcc/ -nostdinc++ `test ! -f $$r/$(TARGET_SUBDIR)/libstdc++-v3/scripts/testsuite_flags || $(SHELL) $$r/$(TARGET_SUBDIR)/libstdc++-v3/scripts/testsuite_flags --build-includes` -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs' + echo "$ac_t""just compiled" 1>&6 + elif test "x$target" = "x$host"; then + # We can use an host tool + CXX_FOR_TARGET='$(CXX)' + echo "$ac_t""host tool" 1>&6 + else + # We need a cross tool + echo "$ac_t""pre-installed" 1>&6 + fi +fi +echo $ac_n "checking where to find the target c++ for libstdc++""... $ac_c" 1>&6 +echo "configure:5694: checking where to find the target c++ for libstdc++" >&5 +if test "x${build}" != "x${host}" ; then + # Canadian cross, just use what we found + echo "$ac_t""pre-installed" 1>&6 +else + ok=yes + case " ${configdirs} " in + *" gcc "*) ;; + *) ok=no ;; + esac + case ,${enable_languages}, in + *,c++,*) ;; + *) ok=no ;; + esac + if test $ok = yes; then + # An in-tree tool is available and we can use it + RAW_CXX_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/xgcc -shared-libgcc -B$$r/$(HOST_SUBDIR)/gcc -nostdinc++ -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs' + echo "$ac_t""just compiled" 1>&6 + elif test "x$target" = "x$host"; then + # We can use an host tool + RAW_CXX_FOR_TARGET='$(CXX)' + echo "$ac_t""host tool" 1>&6 + else + # We need a cross tool + echo "$ac_t""pre-installed" 1>&6 + fi +fi +echo $ac_n "checking where to find the target dlltool""... $ac_c" 1>&6 +echo "configure:5722: checking where to find the target dlltool" >&5 +if test "x${build}" != "x${host}" ; then + # Canadian cross, just use what we found + echo "$ac_t""pre-installed" 1>&6 +else + ok=yes + case " ${configdirs} " in + *" binutils "*) ;; + *) ok=no ;; + esac + + if test $ok = yes; then + # An in-tree tool is available and we can use it + DLLTOOL_FOR_TARGET='$$r/$(HOST_SUBDIR)/binutils/dlltool' + echo "$ac_t""just compiled" 1>&6 + elif test "x$target" = "x$host"; then + # We can use an host tool + DLLTOOL_FOR_TARGET='$(DLLTOOL)' + echo "$ac_t""host tool" 1>&6 + else + # We need a cross tool + echo "$ac_t""pre-installed" 1>&6 + fi +fi +echo $ac_n "checking where to find the target gcc""... $ac_c" 1>&6 +echo "configure:5747: checking where to find the target gcc" >&5 +if test "x${build}" != "x${host}" ; then + # Canadian cross, just use what we found + echo "$ac_t""pre-installed" 1>&6 +else + ok=yes + case " ${configdirs} " in + *" gcc "*) ;; + *) ok=no ;; + esac + + if test $ok = yes; then + # An in-tree tool is available and we can use it + GCC_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/xgcc -B$$r/$(HOST_SUBDIR)/gcc/' + echo "$ac_t""just compiled" 1>&6 + elif test "x$target" = "x$host"; then + # We can use an host tool + GCC_FOR_TARGET='$()' + echo "$ac_t""host tool" 1>&6 + else + # We need a cross tool + echo "$ac_t""pre-installed" 1>&6 + fi +fi +echo $ac_n "checking where to find the target gcj""... $ac_c" 1>&6 +echo "configure:5772: checking where to find the target gcj" >&5 +if test "x${build}" != "x${host}" ; then + # Canadian cross, just use what we found + echo "$ac_t""pre-installed" 1>&6 +else + ok=yes + case " ${configdirs} " in + *" gcc "*) ;; + *) ok=no ;; + esac + case ,${enable_languages}, in + *,java,*) ;; + *) ok=no ;; + esac + if test $ok = yes; then + # An in-tree tool is available and we can use it + GCJ_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/gcj -B$$r/$(HOST_SUBDIR)/gcc/' + echo "$ac_t""just compiled" 1>&6 + elif test "x$target" = "x$host"; then + # We can use an host tool + GCJ_FOR_TARGET='$(GCJ)' + echo "$ac_t""host tool" 1>&6 + else + # We need a cross tool + echo "$ac_t""pre-installed" 1>&6 + fi +fi +echo $ac_n "checking where to find the target gfortran""... $ac_c" 1>&6 +echo "configure:5800: checking where to find the target gfortran" >&5 +if test "x${build}" != "x${host}" ; then + # Canadian cross, just use what we found + echo "$ac_t""pre-installed" 1>&6 +else + ok=yes + case " ${configdirs} " in + *" gcc "*) ;; + *) ok=no ;; + esac + case ,${enable_languages}, in + *,fortran,*) ;; + *) ok=no ;; + esac + if test $ok = yes; then + # An in-tree tool is available and we can use it + GFORTRAN_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/gfortran -B$$r/$(HOST_SUBDIR)/gcc/' + echo "$ac_t""just compiled" 1>&6 + elif test "x$target" = "x$host"; then + # We can use an host tool + GFORTRAN_FOR_TARGET='$(GFORTRAN)' + echo "$ac_t""host tool" 1>&6 + else + # We need a cross tool + echo "$ac_t""pre-installed" 1>&6 + fi +fi +echo $ac_n "checking where to find the target ld""... $ac_c" 1>&6 +echo "configure:5828: checking where to find the target ld" >&5 +if test "x${build}" != "x${host}" ; then + # Canadian cross, just use what we found + echo "$ac_t""pre-installed" 1>&6 +else + ok=yes + case " ${configdirs} " in + *" ld "*) ;; + *) ok=no ;; + esac + + if test $ok = yes; then + # An in-tree tool is available and we can use it + LD_FOR_TARGET='$$r/$(HOST_SUBDIR)/ld/ld-new' + echo "$ac_t""just compiled" 1>&6 + elif test "x$target" = "x$host"; then + # We can use an host tool + LD_FOR_TARGET='$(LD)' + echo "$ac_t""host tool" 1>&6 + else + # We need a cross tool + echo "$ac_t""pre-installed" 1>&6 + fi +fi +echo $ac_n "checking where to find the target lipo""... $ac_c" 1>&6 +echo "configure:5853: checking where to find the target lipo" >&5 +if test "x${build}" != "x${host}" ; then + # Canadian cross, just use what we found + echo "$ac_t""pre-installed" 1>&6 +else + if test "x$target" = "x$host"; then + # We can use an host tool + LIPO_FOR_TARGET='$(LIPO)' + echo "$ac_t""host tool" 1>&6 + else + # We need a cross tool + echo "$ac_t""pre-installed" 1>&6 + fi +fi +echo $ac_n "checking where to find the target nm""... $ac_c" 1>&6 +echo "configure:5868: checking where to find the target nm" >&5 +if test "x${build}" != "x${host}" ; then + # Canadian cross, just use what we found + echo "$ac_t""pre-installed" 1>&6 +else + ok=yes + case " ${configdirs} " in + *" binutils "*) ;; + *) ok=no ;; + esac + + if test $ok = yes; then + # An in-tree tool is available and we can use it + NM_FOR_TARGET='$$r/$(HOST_SUBDIR)/binutils/nm-new' + echo "$ac_t""just compiled" 1>&6 + elif test "x$target" = "x$host"; then + # We can use an host tool + NM_FOR_TARGET='$(NM)' + echo "$ac_t""host tool" 1>&6 + else + # We need a cross tool + echo "$ac_t""pre-installed" 1>&6 + fi +fi +echo $ac_n "checking where to find the target objdump""... $ac_c" 1>&6 +echo "configure:5893: checking where to find the target objdump" >&5 +if test "x${build}" != "x${host}" ; then + # Canadian cross, just use what we found + echo "$ac_t""pre-installed" 1>&6 +else + ok=yes + case " ${configdirs} " in + *" binutils "*) ;; + *) ok=no ;; + esac + + if test $ok = yes; then + # An in-tree tool is available and we can use it + OBJDUMP_FOR_TARGET='$$r/$(HOST_SUBDIR)/binutils/objdump' + echo "$ac_t""just compiled" 1>&6 + elif test "x$target" = "x$host"; then + # We can use an host tool + OBJDUMP_FOR_TARGET='$(OBJDUMP)' + echo "$ac_t""host tool" 1>&6 + else + # We need a cross tool + echo "$ac_t""pre-installed" 1>&6 + fi +fi +echo $ac_n "checking where to find the target ranlib""... $ac_c" 1>&6 +echo "configure:5918: checking where to find the target ranlib" >&5 +if test "x${build}" != "x${host}" ; then + # Canadian cross, just use what we found + echo "$ac_t""pre-installed" 1>&6 +else + ok=yes + case " ${configdirs} " in + *" binutils "*) ;; + *) ok=no ;; + esac + + if test $ok = yes; then + # An in-tree tool is available and we can use it + RANLIB_FOR_TARGET='$$r/$(HOST_SUBDIR)/binutils/ranlib' + echo "$ac_t""just compiled" 1>&6 + elif test "x$target" = "x$host"; then + # We can use an host tool + RANLIB_FOR_TARGET='$(RANLIB)' + echo "$ac_t""host tool" 1>&6 + else + # We need a cross tool + echo "$ac_t""pre-installed" 1>&6 + fi +fi +echo $ac_n "checking where to find the target strip""... $ac_c" 1>&6 +echo "configure:5943: checking where to find the target strip" >&5 +if test "x${build}" != "x${host}" ; then + # Canadian cross, just use what we found + echo "$ac_t""pre-installed" 1>&6 +else + ok=yes + case " ${configdirs} " in + *" binutils "*) ;; + *) ok=no ;; + esac + + if test $ok = yes; then + # An in-tree tool is available and we can use it + STRIP_FOR_TARGET='$$r/$(HOST_SUBDIR)/binutils/strip' + echo "$ac_t""just compiled" 1>&6 + elif test "x$target" = "x$host"; then + # We can use an host tool + STRIP_FOR_TARGET='$(STRIP)' + echo "$ac_t""host tool" 1>&6 + else + # We need a cross tool + echo "$ac_t""pre-installed" 1>&6 + fi +fi +echo $ac_n "checking where to find the target windres""... $ac_c" 1>&6 +echo "configure:5968: checking where to find the target windres" >&5 +if test "x${build}" != "x${host}" ; then + # Canadian cross, just use what we found + echo "$ac_t""pre-installed" 1>&6 +else + ok=yes + case " ${configdirs} " in + *" binutils "*) ;; + *) ok=no ;; + esac + + if test $ok = yes; then + # An in-tree tool is available and we can use it + WINDRES_FOR_TARGET='$$r/$(HOST_SUBDIR)/binutils/windres' + echo "$ac_t""just compiled" 1>&6 + elif test "x$target" = "x$host"; then + # We can use an host tool + WINDRES_FOR_TARGET='$(WINDRES)' + echo "$ac_t""host tool" 1>&6 + else + # We need a cross tool + echo "$ac_t""pre-installed" 1>&6 + fi fi + # Certain tools may need extra flags. AR_FOR_TARGET=${AR_FOR_TARGET}${extra_arflags_for_target} RANLIB_FOR_TARGET=${RANLIB_FOR_TARGET}${extra_ranlibflags_for_target} NM_FOR_TARGET=${NM_FOR_TARGET}${extra_nmflags_for_target} +# When building target libraries, except in a Canadian cross, we use +# the same toolchain as the compiler we just built. +COMPILER_AS_FOR_TARGET='$(AS_FOR_TARGET)' +COMPILER_LD_FOR_TARGET='$(LD_FOR_TARGET)' +COMPILER_NM_FOR_TARGET='$(NM_FOR_TARGET)' +if test $host = $build; then + case " $configdirs " in + *" gcc "*) + COMPILER_AS_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/as' + COMPILER_LD_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/collect-ld' + COMPILER_NM_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/nm'${extra_nmflags_for_target} + ;; + esac +fi + + + + + echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 -echo "configure:5388: checking whether to enable maintainer-specific portions of Makefiles" >&5 +echo "configure:6021: checking whether to enable maintainer-specific portions of Makefiles" >&5 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then enableval="$enable_maintainer_mode" @@ -5427,42 +6060,6 @@ case $build in esac -# It makes debugging easier if we create as symlinks the stage directories -# gcc for stageN-gcc and stagePREV-gcc for stage(N-1). In case this is not -# possible, however, we can resort to mv. -echo $ac_n "checking if symbolic links between directories work""... $ac_c" 1>&6 -echo "configure:5435: checking if symbolic links between directories work" >&5 -if eval "test \"`echo '$''{'gcc_cv_prog_ln_s_dir'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "${LN_S}" = "ln -s" \ - && mkdir confdir.s1 \ - && ln -s confdir.s1 confdir.s2 \ - && echo timestamp1 > confdir.s1/conftest.1 \ - && cmp confdir.s1/conftest.1 confdir.s2/conftest.1 \ - && echo timestamp2 > confdir.s2/conftest.2 \ - && cmp confdir.s1/conftest.2 confdir.s1/conftest.2 \ - && rm -f confdir.s2; then - gcc_cv_prog_ln_s_dir=yes -else - gcc_cv_prog_ln_s_dir=no -fi -rm -rf confdir.s1 confdir.s2 -fi - -echo "$ac_t""$gcc_cv_prog_ln_s_dir" 1>&6 - -case ${gcc_cv_prog_ln_s_dir} in - yes) - CREATE_LINK_TO_DIR='ln -s $$1 $$2' - UNDO_LINK_TO_DIR='rm -f $$1' ;; - *) - CREATE_LINK_TO_DIR='mv $$1 $$2' - UNDO_LINK_TO_DIR='mv $$1 $$2' ;; -esac - - - # Enable -Werror in bootstrap stage2 and later. # Change the default to "no" on release branches. # Check whether --enable-werror or --disable-werror was given. @@ -5655,13 +6252,6 @@ s%@gmplibs@%$gmplibs%g s%@gmpinc@%$gmpinc%g s%@stage1_languages@%$stage1_languages%g s%@SYSROOT_CFLAGS_FOR_TARGET@%$SYSROOT_CFLAGS_FOR_TARGET%g -s%@CONFIGURED_BISON@%$CONFIGURED_BISON%g -s%@CONFIGURED_YACC@%$CONFIGURED_YACC%g -s%@CONFIGURED_M4@%$CONFIGURED_M4%g -s%@CONFIGURED_FLEX@%$CONFIGURED_FLEX%g -s%@CONFIGURED_LEX@%$CONFIGURED_LEX%g -s%@CONFIGURED_MAKEINFO@%$CONFIGURED_MAKEINFO%g -s%@bootstrap_lean@%$bootstrap_lean%g /@serialization_dependencies@/r $serialization_dependencies s%@serialization_dependencies@%%g /@host_makefile_frag@/r $host_makefile_frag @@ -5688,12 +6278,22 @@ s%@target_configargs@%$target_configargs%g s%@target_configdirs@%$target_configdirs%g s%@CC_FOR_BUILD@%$CC_FOR_BUILD%g s%@config_shell@%$config_shell%g +s%@YACC@%$YACC%g +s%@BISON@%$BISON%g +s%@M4@%$M4%g +s%@LEX@%$LEX%g +s%@FLEX@%$FLEX%g +s%@MAKEINFO@%$MAKEINFO%g +s%@EXPECT@%$EXPECT%g +s%@RUNTEST@%$RUNTEST%g s%@AR@%$AR%g s%@AS@%$AS%g s%@DLLTOOL@%$DLLTOOL%g s%@LD@%$LD%g +s%@LIPO@%$LIPO%g s%@NM@%$NM%g s%@RANLIB@%$RANLIB%g +s%@STRIP@%$STRIP%g s%@WINDRES@%$WINDRES%g s%@OBJCOPY@%$OBJCOPY%g s%@OBJDUMP@%$OBJDUMP%g @@ -5714,29 +6314,15 @@ s%@OBJDUMP_FOR_TARGET@%$OBJDUMP_FOR_TARGET%g s%@RANLIB_FOR_TARGET@%$RANLIB_FOR_TARGET%g s%@STRIP_FOR_TARGET@%$STRIP_FOR_TARGET%g s%@WINDRES_FOR_TARGET@%$WINDRES_FOR_TARGET%g -s%@CONFIGURED_AR_FOR_TARGET@%$CONFIGURED_AR_FOR_TARGET%g -s%@CONFIGURED_AS_FOR_TARGET@%$CONFIGURED_AS_FOR_TARGET%g -s%@CONFIGURED_CC_FOR_TARGET@%$CONFIGURED_CC_FOR_TARGET%g -s%@CONFIGURED_CXX_FOR_TARGET@%$CONFIGURED_CXX_FOR_TARGET%g -s%@CONFIGURED_DLLTOOL_FOR_TARGET@%$CONFIGURED_DLLTOOL_FOR_TARGET%g -s%@CONFIGURED_GCC_FOR_TARGET@%$CONFIGURED_GCC_FOR_TARGET%g -s%@CONFIGURED_GCJ_FOR_TARGET@%$CONFIGURED_GCJ_FOR_TARGET%g -s%@CONFIGURED_GFORTRAN_FOR_TARGET@%$CONFIGURED_GFORTRAN_FOR_TARGET%g -s%@CONFIGURED_LD_FOR_TARGET@%$CONFIGURED_LD_FOR_TARGET%g -s%@CONFIGURED_LIPO_FOR_TARGET@%$CONFIGURED_LIPO_FOR_TARGET%g -s%@CONFIGURED_NM_FOR_TARGET@%$CONFIGURED_NM_FOR_TARGET%g -s%@CONFIGURED_OBJDUMP_FOR_TARGET@%$CONFIGURED_OBJDUMP_FOR_TARGET%g -s%@CONFIGURED_RANLIB_FOR_TARGET@%$CONFIGURED_RANLIB_FOR_TARGET%g -s%@CONFIGURED_STRIP_FOR_TARGET@%$CONFIGURED_STRIP_FOR_TARGET%g -s%@CONFIGURED_WINDRES_FOR_TARGET@%$CONFIGURED_WINDRES_FOR_TARGET%g s%@FLAGS_FOR_TARGET@%$FLAGS_FOR_TARGET%g s%@RAW_CXX_FOR_TARGET@%$RAW_CXX_FOR_TARGET%g +s%@COMPILER_AS_FOR_TARGET@%$COMPILER_AS_FOR_TARGET%g +s%@COMPILER_LD_FOR_TARGET@%$COMPILER_LD_FOR_TARGET%g +s%@COMPILER_NM_FOR_TARGET@%$COMPILER_NM_FOR_TARGET%g s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g s%@MAINT@%$MAINT%g s%@stage1_cflags@%$stage1_cflags%g -s%@CREATE_LINK_TO_DIR@%$CREATE_LINK_TO_DIR%g -s%@UNDO_LINK_TO_DIR@%$UNDO_LINK_TO_DIR%g s%@stage2_werror_flag@%$stage2_werror_flag%g CEOF diff --git a/configure.in b/configure.in index c9169b6bd58..b2e841437be 100644 --- a/configure.in +++ b/configure.in @@ -1,5 +1,5 @@ -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, -# 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +# 2000, 2001, 2002, 2003, 2004, 2005, 2006 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 @@ -123,7 +123,7 @@ build_tools="build-texinfo build-byacc build-flex build-bison build-m4 build-fix # these libraries are used by various programs built for the host environment # -host_libs="intl mmalloc libiberty opcodes bfd readline tcl tk itcl libgui zlib libcpp" +host_libs="intl mmalloc libiberty opcodes bfd readline tcl tk itcl libgui zlib libcpp libdecnumber" # these tools are built for the host environment # Note, the powerpc-eabi build depends on sim occurring before gdb in order to @@ -683,7 +683,7 @@ case "${target}" in mn10300-*-*) noconfigdirs="$noconfigdirs ${libgcj}" ;; - ms1-*-*) + mt-*-*) noconfigdirs="$noconfigdirs sim" ;; powerpc-*-aix*) @@ -967,6 +967,12 @@ case "${host}" in powerpc-*-darwin*) host_makefile_frag="config/mh-ppc-darwin" ;; + powerpc-*-aix*) + host_makefile_frag="config/mh-ppc-aix" + ;; + rs6000-*-aix*) + host_makefile_frag="config/mh-ppc-aix" + ;; *-*-lynxos*) # /bin/cc is less than useful for our purposes. Always use GCC tentative_cc="/bin/gcc" @@ -1611,17 +1617,6 @@ esac tooldir='${exec_prefix}'/${target_alias} build_tooldir=${tooldir} -# Generate default definitions for YACC, M4, LEX and other programs that run -# on the build machine. These are used if the Makefile can't locate these -# programs in objdir. -MISSING=`cd $ac_aux_dir && ${PWDCMD-pwd}`/missing -AC_CHECK_PROGS([CONFIGURED_BISON], [bison], [$MISSING bison]) -AC_CHECK_PROGS([CONFIGURED_YACC], ['bison -y' byacc yacc], [$MISSING bison -y]) -AC_CHECK_PROGS([CONFIGURED_M4], [gm4 gnum4 m4], [$MISSING m4]) -AC_CHECK_PROGS([CONFIGURED_FLEX], [flex], [$MISSING flex]) -AC_CHECK_PROGS([CONFIGURED_LEX], [flex lex], [$MISSING flex]) -AC_CHECK_PROGS([CONFIGURED_MAKEINFO], makeinfo, [$MISSING makeinfo]) - # Create a .gdbinit file which runs the one in srcdir # and tells GDB to look there for source files. @@ -1741,7 +1736,7 @@ INSTALL_GDB_TK=`echo ${GDB_TK} | sed s/-all-/-install-/g` # not to nest @if/@endif pairs, because configure will not warn you at all. AC_ARG_ENABLE([bootstrap], -[ --enable-bootstrap[=lean] Enable bootstrapping [no]],, +[ --enable-bootstrap Enable bootstrapping [yes if native build]],, enable_bootstrap=default) # Issue errors and warnings for invalid/strange bootstrap combinations. @@ -1753,27 +1748,26 @@ esac case "$have_compiler:$host:$target:$enable_bootstrap" in *:*:*:no) ;; - # Default behavior. (We'll) enable bootstrap if we have a compiler + # Default behavior. Enable bootstrap if we have a compiler # and we are in a native configuration. yes:$build:$build:default) - # This will become 'yes' - enable_bootstrap=no ;; + enable_bootstrap=yes ;; *:*:*:default) enable_bootstrap=no ;; # We have a compiler and we are in a native configuration, bootstrap is ok - yes:$build:$build:yes | yes:$build:$build:lean) + yes:$build:$build:yes) ;; # Other configurations, but we have a compiler. Assume the user knows # what he's doing. - yes:*:*:yes | yes:*:*:lean) + yes:*:*:yes) AC_MSG_WARN([trying to bootstrap a cross compiler]) ;; # No compiler: if they passed --enable-bootstrap explicitly, fail - no:*:*:yes | no:*:*:lean) + no:*:*:yes) AC_MSG_ERROR([cannot bootstrap without a compiler]) ;; # Fail if wrong command line @@ -1785,15 +1779,10 @@ esac # Adjust the toplevel makefile according to whether bootstrap was selected. case "$enable_bootstrap" in yes) - bootstrap_lean='#' - bootstrap_suffix=bootstrap ;; - lean) - bootstrap_lean='' bootstrap_suffix=bootstrap ;; no) bootstrap_suffix=no-bootstrap ;; esac -AC_SUBST(bootstrap_lean) for module in ${build_configdirs} ; do if test -z "${no_recursion}" \ @@ -1808,10 +1797,13 @@ for module in ${build_configdirs} ; do /^@endif build-$module-$bootstrap_suffix\$/d" done for module in ${configdirs} ; do - if test -z "${no_recursion}" \ - && test -f ${module}/Makefile; then - echo 1>&2 "*** removing ${module}/Makefile to force reconfigure" - rm -f ${module}/Makefile + if test -z "${no_recursion}"; then + for file in stage*-${module}/Makefile ${module}/Makefile; do + if test -f ${file}; then + echo 1>&2 "*** removing ${file} to force reconfigure" + rm -f ${file} + fi + done fi extrasub="$extrasub /^@if $module\$/d @@ -2099,13 +2091,81 @@ AC_SUBST(target_configdirs) AC_SUBST(CC_FOR_BUILD) AC_SUBST(config_shell) +# Generate default definitions for YACC, M4, LEX and other programs that run +# on the build machine. These are used if the Makefile can't locate these +# programs in objdir. +MISSING=`cd $ac_aux_dir && ${PWDCMD-pwd}`/missing + +AC_CHECK_PROGS([YACC], ['bison -y' byacc yacc], [$MISSING bison -y]) +case " $build_configdirs " in + *" bison "*) YACC='$$r/$(BUILD_SUBDIR)/bison/tests/bison -y' ;; + *" byacc "*) YACC='$$r/$(BUILD_SUBDIR)/byacc/byacc' ;; +esac + +AC_CHECK_PROGS([BISON], [bison], [$MISSING bison]) +case " $build_configdirs " in + *" bison "*) BISON='$$r/$(BUILD_SUBDIR)/bison/tests/bison' ;; +esac + +AC_CHECK_PROGS([M4], [gm4 gnum4 m4], [$MISSING m4]) +case " $build_configdirs " in + *" m4 "*) M4='$$r/$(BUILD_SUBDIR)/m4/m4' ;; +esac + +AC_CHECK_PROGS([LEX], [flex lex], [$MISSING flex]) +case " $build_configdirs " in + *" flex "*) LEX='$$r/$(BUILD_SUBDIR)/flex/flex' ;; + *" lex "*) LEX='$$r/$(BUILD_SUBDIR)/lex/lex' ;; +esac + +AC_CHECK_PROGS([FLEX], [flex], [$MISSING flex]) +case " $build_configdirs " in + *" flex "*) FLEX='$$r/$(BUILD_SUBDIR)/flex/flex' ;; +esac + +AC_CHECK_PROGS([MAKEINFO], makeinfo, [$MISSING makeinfo]) +case " $build_configdirs " in + *" texinfo "*) MAKEINFO='$$r/$(BUILD_SUBDIR)/texinfo/makeinfo/makeinfo' ;; + *) +changequote(,) + # For an installed makeinfo, we require it to be from texinfo 4.2 or + # higher, else we use the "missing" dummy. + if ${MAKEINFO} --version \ + | egrep 'texinfo[^0-9]*([1-3][0-9]|4\.[2-9]|[5-9])' >/dev/null 2>&1; then + : + else + MAKEINFO="$MISSING makeinfo" + fi + ;; +changequote([,]) +esac + +# FIXME: expect and dejagnu may become build tools? + +AC_CHECK_PROGS(EXPECT, expect, expect) +case " $configdirs " in + *" expect "*) + test $host = $build && EXPECT='$$r/$(HOST_SUBDIR)/expect/expect' + ;; +esac + +AC_CHECK_PROGS(RUNTEST, runtest, runtest) +case " $configdirs " in + *" dejagnu "*) + test $host = $build && RUNTEST='$$r/$(HOST_SUBDIR)/dejagnu/runtest' + ;; +esac + + # Host tools. NCN_STRICT_CHECK_TOOLS(AR, ar) NCN_STRICT_CHECK_TOOLS(AS, as) NCN_STRICT_CHECK_TOOLS(DLLTOOL, dlltool) NCN_STRICT_CHECK_TOOLS(LD, ld) +NCN_STRICT_CHECK_TOOLS(LIPO, lipo) NCN_STRICT_CHECK_TOOLS(NM, nm) NCN_STRICT_CHECK_TOOLS(RANLIB, ranlib, :) +NCN_STRICT_CHECK_TOOLS(STRIP, strip, :) NCN_STRICT_CHECK_TOOLS(WINDRES, windres) NCN_STRICT_CHECK_TOOLS(OBJCOPY, objcopy) NCN_STRICT_CHECK_TOOLS(OBJDUMP, objdump) @@ -2115,8 +2175,7 @@ AC_SUBST(CFLAGS) AC_SUBST(CFLAGS_FOR_BUILD) AC_SUBST(CXXFLAGS) -# Target tools. Do the tests using the names they may have passed in -# the environment, then move it to CONFIGURED_*_FOR_TARGET. +# Target tools. NCN_STRICT_CHECK_TARGET_TOOLS(AR_FOR_TARGET, ar) NCN_STRICT_CHECK_TARGET_TOOLS(AS_FOR_TARGET, as) NCN_STRICT_CHECK_TARGET_TOOLS(CC_FOR_TARGET, cc gcc) @@ -2133,83 +2192,32 @@ NCN_STRICT_CHECK_TARGET_TOOLS(RANLIB_FOR_TARGET, ranlib, :) NCN_STRICT_CHECK_TARGET_TOOLS(STRIP_FOR_TARGET, strip) NCN_STRICT_CHECK_TARGET_TOOLS(WINDRES_FOR_TARGET, windres) -CONFIGURED_AR_FOR_TARGET="$AR_FOR_TARGET" -CONFIGURED_AS_FOR_TARGET="$AS_FOR_TARGET" -CONFIGURED_CC_FOR_TARGET="$CC_FOR_TARGET" -CONFIGURED_CXX_FOR_TARGET="$CXX_FOR_TARGET" -CONFIGURED_DLLTOOL_FOR_TARGET="$DLLTOOL_FOR_TARGET" -CONFIGURED_GCC_FOR_TARGET="$GCC_FOR_TARGET" -CONFIGURED_GCJ_FOR_TARGET="$GCJ_FOR_TARGET" -CONFIGURED_GFORTRAN_FOR_TARGET="$GFORTRAN_FOR_TARGET" -CONFIGURED_LD_FOR_TARGET="$LD_FOR_TARGET" -CONFIGURED_LIPO_FOR_TARGET="$LIPO_FOR_TARGET" -CONFIGURED_NM_FOR_TARGET="$NM_FOR_TARGET" -CONFIGURED_OBJDUMP_FOR_TARGET="$OBJDUMP_FOR_TARGET" -CONFIGURED_RANLIB_FOR_TARGET="$RANLIB_FOR_TARGET" -CONFIGURED_STRIP_FOR_TARGET="$STRIP_FOR_TARGET" -CONFIGURED_WINDRES_FOR_TARGET="$WINDRES_FOR_TARGET" - -AC_SUBST(CONFIGURED_AR_FOR_TARGET)dnl -AC_SUBST(CONFIGURED_AS_FOR_TARGET)dnl -AC_SUBST(CONFIGURED_CC_FOR_TARGET)dnl -AC_SUBST(CONFIGURED_CXX_FOR_TARGET)dnl -AC_SUBST(CONFIGURED_DLLTOOL_FOR_TARGET)dnl -AC_SUBST(CONFIGURED_GCC_FOR_TARGET)dnl -AC_SUBST(CONFIGURED_GCJ_FOR_TARGET)dnl -AC_SUBST(CONFIGURED_GFORTRAN_FOR_TARGET)dnl -AC_SUBST(CONFIGURED_LD_FOR_TARGET)dnl -AC_SUBST(CONFIGURED_LIPO_FOR_TARGET)dnl -AC_SUBST(CONFIGURED_NM_FOR_TARGET)dnl -AC_SUBST(CONFIGURED_OBJDUMP_FOR_TARGET)dnl -AC_SUBST(CONFIGURED_RANLIB_FOR_TARGET)dnl -AC_SUBST(CONFIGURED_STRIP_FOR_TARGET)dnl -AC_SUBST(CONFIGURED_WINDRES_FOR_TARGET)dnl -AC_SUBST(FLAGS_FOR_TARGET) - -# Fix up target tools. -if test "x${build}" = "x${host}" ; then - # In this case, the newly built tools can and should be used, - # so we override the results of the autoconf tests. - # This should really only happen when the tools are actually being built, - # but that's a further refinement. The new build scheme, where - # tools are built into a structure paralleling where they're installed, - # should also eliminate all of this cleanly. - AR_FOR_TARGET="\$(USUAL_AR_FOR_TARGET)" - AS_FOR_TARGET="\$(USUAL_AS_FOR_TARGET)" - CC_FOR_TARGET="\$(USUAL_CC_FOR_TARGET)" - CXX_FOR_TARGET="\$(USUAL_CXX_FOR_TARGET)" - RAW_CXX_FOR_TARGET="\$(USUAL_RAW_CXX_FOR_TARGET)" - DLLTOOL_FOR_TARGET="\$(USUAL_DLLTOOL_FOR_TARGET)" - GCC_FOR_TARGET="\$(USUAL_GCC_FOR_TARGET)" - GCJ_FOR_TARGET="\$(USUAL_GCJ_FOR_TARGET)" - GFORTRAN_FOR_TARGET="\$(USUAL_GFORTRAN_FOR_TARGET)" - LD_FOR_TARGET="\$(USUAL_LD_FOR_TARGET)" - LIPO_FOR_TARGET="\$(USUAL_LIPO_FOR_TARGET)" - NM_FOR_TARGET="\$(USUAL_NM_FOR_TARGET)" - OBJDUMP_FOR_TARGET="\$(USUAL_OBJDUMP_FOR_TARGET)" - RANLIB_FOR_TARGET="\$(USUAL_RANLIB_FOR_TARGET)" - STRIP_FOR_TARGET="\$(USUAL_STRIP_FOR_TARGET)" - WINDRES_FOR_TARGET="\$(USUAL_WINDRES_FOR_TARGET)" -else - # Just use the ones we found. - AR_FOR_TARGET="\$(CONFIGURED_AR_FOR_TARGET)" - AS_FOR_TARGET="\$(CONFIGURED_AS_FOR_TARGET)" - CC_FOR_TARGET="\$(CONFIGURED_CC_FOR_TARGET)" - CXX_FOR_TARGET="\$(CONFIGURED_CXX_FOR_TARGET)" - RAW_CXX_FOR_TARGET="\$(CONFIGURED_CXX_FOR_TARGET)" - DLLTOOL_FOR_TARGET="\$(CONFIGURED_DLLTOOL_FOR_TARGET)" - GCC_FOR_TARGET="\$(CONFIGURED_GCC_FOR_TARGET)" - GCJ_FOR_TARGET="\$(CONFIGURED_GCJ_FOR_TARGET)" - GFORTRAN_FOR_TARGET="\$(CONFIGURED_GFORTRAN_FOR_TARGET)" - LD_FOR_TARGET="\$(CONFIGURED_LD_FOR_TARGET)" - LIPO_FOR_TARGET="\$(CONFIGURED_LIPO_FOR_TARGET)" - NM_FOR_TARGET="\$(CONFIGURED_NM_FOR_TARGET)" - OBJDUMP_FOR_TARGET="\$(CONFIGURED_OBJDUMP_FOR_TARGET)" - RANLIB_FOR_TARGET="\$(CONFIGURED_RANLIB_FOR_TARGET)" - STRIP_FOR_TARGET="\$(CONFIGURED_STRIP_FOR_TARGET)" - WINDRES_FOR_TARGET="\$(CONFIGURED_WINDRES_FOR_TARGET)" -fi +RAW_CXX_FOR_TARGET="$CXX_FOR_TARGET" + +GCC_TARGET_TOOL(ar, AR_FOR_TARGET, AR, [binutils/ar]) +GCC_TARGET_TOOL(as, AS_FOR_TARGET, AS, [gas/as-new]) +GCC_TARGET_TOOL(cc, CC_FOR_TARGET, CC, [gcc/xgcc -B$$r/$(HOST_SUBDIR)/gcc/]) +GCC_TARGET_TOOL(c++, CXX_FOR_TARGET, CXX, + [gcc/g++ -B$$r/$(HOST_SUBDIR)/gcc/ -nostdinc++ `test ! -f $$r/$(TARGET_SUBDIR)/libstdc++-v3/scripts/testsuite_flags || $(SHELL) $$r/$(TARGET_SUBDIR)/libstdc++-v3/scripts/testsuite_flags --build-includes` -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs], + c++) +GCC_TARGET_TOOL(c++ for libstdc++, RAW_CXX_FOR_TARGET, CXX, + [gcc/xgcc -shared-libgcc -B$$r/$(HOST_SUBDIR)/gcc -nostdinc++ -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs], + c++) +GCC_TARGET_TOOL(dlltool, DLLTOOL_FOR_TARGET, DLLTOOL, [binutils/dlltool]) +GCC_TARGET_TOOL(gcc, GCC_FOR_TARGET, , [gcc/xgcc -B$$r/$(HOST_SUBDIR)/gcc/]) +GCC_TARGET_TOOL(gcj, GCJ_FOR_TARGET, GCJ, + [gcc/gcj -B$$r/$(HOST_SUBDIR)/gcc/], java) +GCC_TARGET_TOOL(gfortran, GFORTRAN_FOR_TARGET, GFORTRAN, + [gcc/gfortran -B$$r/$(HOST_SUBDIR)/gcc/], fortran) +GCC_TARGET_TOOL(ld, LD_FOR_TARGET, LD, [ld/ld-new]) +GCC_TARGET_TOOL(lipo, LIPO_FOR_TARGET, LIPO) +GCC_TARGET_TOOL(nm, NM_FOR_TARGET, NM, [binutils/nm-new]) +GCC_TARGET_TOOL(objdump, OBJDUMP_FOR_TARGET, OBJDUMP, [binutils/objdump]) +GCC_TARGET_TOOL(ranlib, RANLIB_FOR_TARGET, RANLIB, [binutils/ranlib]) +GCC_TARGET_TOOL(strip, STRIP_FOR_TARGET, STRIP, [binutils/strip]) +GCC_TARGET_TOOL(windres, WINDRES_FOR_TARGET, WINDRES, [binutils/windres]) +AC_SUBST(FLAGS_FOR_TARGET) AC_SUBST(RAW_CXX_FOR_TARGET) # Certain tools may need extra flags. @@ -2217,6 +2225,25 @@ AR_FOR_TARGET=${AR_FOR_TARGET}${extra_arflags_for_target} RANLIB_FOR_TARGET=${RANLIB_FOR_TARGET}${extra_ranlibflags_for_target} NM_FOR_TARGET=${NM_FOR_TARGET}${extra_nmflags_for_target} +# When building target libraries, except in a Canadian cross, we use +# the same toolchain as the compiler we just built. +COMPILER_AS_FOR_TARGET='$(AS_FOR_TARGET)' +COMPILER_LD_FOR_TARGET='$(LD_FOR_TARGET)' +COMPILER_NM_FOR_TARGET='$(NM_FOR_TARGET)' +if test $host = $build; then + case " $configdirs " in + *" gcc "*) + COMPILER_AS_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/as' + COMPILER_LD_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/collect-ld' + COMPILER_NM_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/nm'${extra_nmflags_for_target} + ;; + esac +fi + +AC_SUBST(COMPILER_AS_FOR_TARGET) +AC_SUBST(COMPILER_LD_FOR_TARGET) +AC_SUBST(COMPILER_NM_FOR_TARGET) + AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) AC_ARG_ENABLE(maintainer-mode, [ --enable-maintainer-mode enable make rules and dependencies not useful @@ -2258,36 +2285,6 @@ case $build in esac AC_SUBST(stage1_cflags) -# It makes debugging easier if we create as symlinks the stage directories -# gcc for stageN-gcc and stagePREV-gcc for stage(N-1). In case this is not -# possible, however, we can resort to mv. -AC_CACHE_CHECK([if symbolic links between directories work], -[gcc_cv_prog_ln_s_dir], -[if test "${LN_S}" = "ln -s" \ - && mkdir confdir.s1 \ - && ln -s confdir.s1 confdir.s2 \ - && echo timestamp1 > confdir.s1/conftest.1 \ - && cmp confdir.s1/conftest.1 confdir.s2/conftest.1 \ - && echo timestamp2 > confdir.s2/conftest.2 \ - && cmp confdir.s1/conftest.2 confdir.s1/conftest.2 \ - && rm -f confdir.s2; then - gcc_cv_prog_ln_s_dir=yes -else - gcc_cv_prog_ln_s_dir=no -fi -rm -rf confdir.s1 confdir.s2]) - -case ${gcc_cv_prog_ln_s_dir} in - yes) - CREATE_LINK_TO_DIR='ln -s $$1 $$2' - UNDO_LINK_TO_DIR='rm -f $$1' ;; - *) - CREATE_LINK_TO_DIR='mv $$1 $$2' - UNDO_LINK_TO_DIR='mv $$1 $$2' ;; -esac -AC_SUBST(CREATE_LINK_TO_DIR) -AC_SUBST(UNDO_LINK_TO_DIR) - # Enable -Werror in bootstrap stage2 and later. # Change the default to "no" on release branches. AC_ARG_ENABLE(werror, diff --git a/contrib/ChangeLog b/contrib/ChangeLog index d3417e623fc..dd758fc3bee 100644 --- a/contrib/ChangeLog +++ b/contrib/ChangeLog @@ -1,3 +1,7 @@ +2005-12-06 Ben Elliston + + * newcvsroot: Remove. + 2005-11-03 Steven Bosscher * gcc_build: Fix my previous checking. diff --git a/contrib/newcvsroot b/contrib/newcvsroot deleted file mode 100755 index 29827cc4eea..00000000000 --- a/contrib/newcvsroot +++ /dev/null @@ -1,36 +0,0 @@ -#! /usr/bin/env bash -# Written by Roland McGrath - -# Replaces all CVS/Root and CVS/Repository files in a checked-out CVS -# tree. Requires shell with # and % variable substitution (e.g. bash). - -# Usage: newcvsroot - -if [ $# != 3 ]; then - echo "Note to svn users: use svn switch --relocate instead." - echo - echo "usage: `basename $0` " - exit 1 -fi - -root=$1; shift -module=$1; shift -topdir=$1; shift - -rep=${root##*:} - -case "$topdir" in -/*|./*|../*) echo >&2 "$0 wants relative path from top of checkout"; exit 1;; -esac - -find $topdir \( -name Repository -o -name Root \) -print | while read f; do - -case "$f" in -*/CVS/Root) echo $root > "$f" ;; -*/CVS/Repository) - r=${module}${f#${topdir}} - echo > "$f" $rep/${r%/CVS/Repository} - ;; -esac - -done diff --git a/contrib/regression/ChangeLog b/contrib/regression/ChangeLog index a6ba783ff2b..62aa9ba1766 100644 --- a/contrib/regression/ChangeLog +++ b/contrib/regression/ChangeLog @@ -1,3 +1,24 @@ +2005-12-20 Geoffrey Keating + + * btest-gcc.sh: Support -j option. + +2005-11-28 Geoffrey Keating + + * GCC Regression Tester.wdgt: Rename to GCC_Regression_Tester.wdgt. + * GCC_Regression_Tester.wdgt/Info.plist + (CFBundleDisplayName): Update for rename. + (CFBundleName): Use shorter name. + (CFBundleVersion): Update to 1.0.1. + (CFBundleShortVersionString): Update to 1.0.1. + (LSHasLocalizedDisplayName): New. + (NSHumanReadableCopyright): New. + * GCC_Regression_Tester.wdgt/de.lproj/InfoPlist.strings: New. + * GCC_Regression_Tester.wdgt/en.lproj/InfoPlist.strings: New. + * GCC_Regression_Tester.wdgt/ja.lproj/InfoPlist.strings: New. + + * GCC_Regression_Tester.wdgt/widget.html: Use max-age=30 + to help out intermediate caches. + 2005-11-23 Geoffrey Keating * GCC Regression Tester.wdgt/widget.html: New file. diff --git a/contrib/regression/GCC Regression Tester.wdgt/Info.plist b/contrib/regression/GCC Regression Tester.wdgt/Info.plist deleted file mode 100644 index 0902ff7af7f..00000000000 --- a/contrib/regression/GCC Regression Tester.wdgt/Info.plist +++ /dev/null @@ -1,28 +0,0 @@ - - - - - AllowNetworkAccess - - CFBundleDisplayName - GCC Regression Tester - CFBundleName - GCC Regression Tester - CFBundleIdentifier - org.geoffk.widget.regress - CFBundleShortVersionString - 1.0 - CFBundleVersion - 1.0 - CloseBoxInsetX - 0 - CloseBoxInsetY - 0 - MainHTML - widget.html - Width - 261 - Height - 192 - - diff --git a/contrib/regression/GCC Regression Tester.wdgt/widget.html b/contrib/regression/GCC Regression Tester.wdgt/widget.html deleted file mode 100644 index e2bc6acd231..00000000000 --- a/contrib/regression/GCC Regression Tester.wdgt/widget.html +++ /dev/null @@ -1,155 +0,0 @@ - - - - - - - - - - - - -
Loading...
- - diff --git a/contrib/regression/GCC Regression Tester.wdgt/Default.png b/contrib/regression/GCC_Regression_Tester.wdgt/Default.png similarity index 100% rename from contrib/regression/GCC Regression Tester.wdgt/Default.png rename to contrib/regression/GCC_Regression_Tester.wdgt/Default.png diff --git a/contrib/regression/GCC Regression Tester.wdgt/Icon.png b/contrib/regression/GCC_Regression_Tester.wdgt/Icon.png similarity index 100% rename from contrib/regression/GCC Regression Tester.wdgt/Icon.png rename to contrib/regression/GCC_Regression_Tester.wdgt/Icon.png diff --git a/contrib/regression/GCC_Regression_Tester.wdgt/Info.plist b/contrib/regression/GCC_Regression_Tester.wdgt/Info.plist new file mode 100644 index 00000000000..a00106d1092 --- /dev/null +++ b/contrib/regression/GCC_Regression_Tester.wdgt/Info.plist @@ -0,0 +1,32 @@ + + + + + AllowNetworkAccess + + CFBundleDisplayName + GCC_Regression_Tester + CFBundleIdentifier + org.geoffk.widget.regress + CFBundleName + GCC Regr. Tester + CFBundleShortVersionString + 1.0.1 + CFBundleVersion + 1.0.1 + CloseBoxInsetX + 0 + CloseBoxInsetY + 0 + Height + 192 + LSHasLocalizedDisplayName + + MainHTML + widget.html + NSHumanReadableCopyright + Copyright © 2005 Free Software Foundation, Inc. + Width + 261 + + diff --git a/contrib/regression/GCC_Regression_Tester.wdgt/de.lproj/InfoPlist.strings b/contrib/regression/GCC_Regression_Tester.wdgt/de.lproj/InfoPlist.strings new file mode 100644 index 0000000000000000000000000000000000000000..7692ed523f7eca2843fcf27cc708abc00c8263bd GIT binary patch literal 126 zcwQxpNe)0z5JcZm#5Kgm7j_nIU?#?VL*nj&3X7hqUf2C#hzQu3C>f{-=~!8`XPhMJ tqf`f98E*gp literal 0 HcwPel00001 diff --git a/contrib/regression/GCC_Regression_Tester.wdgt/en.lproj/InfoPlist.strings b/contrib/regression/GCC_Regression_Tester.wdgt/en.lproj/InfoPlist.strings new file mode 100644 index 0000000000000000000000000000000000000000..45628a3efb827fbe0889d9edf0171f535ed5d16c GIT binary patch literal 96 zcwYPWpTU{Ijlqeblp&8Hg&~I_mBED}lcAWQ0LV^csATX1lDR-p1qNFnR$_1ms&@vm hf`DS_3`Ib)7zi^N@`3sl7(&4O5+GRwRBO$^1pvFT5#s;= literal 0 HcwPel00001 diff --git a/contrib/regression/GCC_Regression_Tester.wdgt/ja.lproj/InfoPlist.strings b/contrib/regression/GCC_Regression_Tester.wdgt/ja.lproj/InfoPlist.strings new file mode 100644 index 0000000000000000000000000000000000000000..f3110f3e81a683014aba93ef2788371074318509 GIT binary patch literal 74 zcwYPWpTU{Ijlqeblp&8Hg&~I_mBED}lcAWQ0LV^csATX1lDR-p1qNFnR$_1ms&_WX Wo4^n(W{_ua%wVU%euF + + + + + + + + + + + +
Loading...
+ + diff --git a/contrib/regression/README b/contrib/regression/README index 9eecd0dd909..9e94e5c394c 100644 --- a/contrib/regression/README +++ b/contrib/regression/README @@ -12,10 +12,10 @@ the newly-build tools to check that they will not cause regressions. 'site.exp' is what $DEJAGNU points to when the regression tester runs these scripts. -'GCC Regression Tester.wdgt' is a Dashboard widget that displays the +'GCC_Regression_Tester.wdgt' is a Dashboard widget that displays the current state of the tester using Javascript. You can use it without needing Dashboard by pointing your web browser at -'GCC%20Regression%20Tester.wdgt/widget.html', if your browser supports +'GCC_Regression_Tester.wdgt/widget.html', if your browser supports and permits it. Note that any changes made here need to be approved by the regression diff --git a/contrib/regression/btest-gcc.sh b/contrib/regression/btest-gcc.sh index b03d025107e..bff069ac686 100755 --- a/contrib/regression/btest-gcc.sh +++ b/contrib/regression/btest-gcc.sh @@ -21,15 +21,20 @@ # btest add_passes_despite_regression=0 +dashj='' # can be # --add-passes-despite-regression: # Add new "PASSes" despite there being some regressions. +# -j: +# Pass '-j' to make. case "$1" in --add-passes-despite-regression) add_passes_despite_regression=1; shift;; - --*) echo "Invalid option: $1"; exit 2;; + -j*) + dashj=$1; shift;; + -*) echo "Invalid option: $1"; exit 2;; esac # TARGET is the target triplet. It should be the same one as used in @@ -117,10 +122,10 @@ gcc/testsuite/objc.sum" echo build > $RESULT if [ $H_HOST = $H_TARGET ] ; then $SOURCE/configure --prefix=$PREFIX --target=$H_TARGET || exit 1 - if ! make bootstrap ; then + if ! make $dashj bootstrap ; then [ -s gcc/.bad_compare ] || exit 1 cat gcc/.bad_compare >> $REGRESS || exit 1 - make all || exit 1 + make $dashj all || exit 1 fi else withopt="--with-gnu-ld --with-gnu-as" @@ -129,27 +134,21 @@ else *) withopt="$withopt --with-newlib";; esac $SOURCE/configure --prefix=$PREFIX --target=$H_TARGET $withopt || exit 1 - make || exit 1 + make $dashj || exit 1 fi echo error > $RESULT || exit 1 # Test GCC against its internal testsuite. -make -k check-gcc +make $dashj -k check -# Test libstd++-v3 -make check-target-libstdc++-v3 if [ -f $BUILD/$H_TARGET/libstdc++-v3/testsuite/libstdc++.sum ] ; then TESTLOGS="$TESTLOGS $H_TARGET/libstdc++-v3/testsuite/libstdc++.sum" fi -# Test libffi -make check-target-libffi if [ -f $BUILD/$H_TARGET/libffi/testsuite/libffi.sum ] ; then TESTLOGS="$TESTLOGS $H_TARGET/libffi/testsuite/libffi.sum" fi -# Test libjava -make check-target-libjava if [ -f $BUILD/$H_TARGET/libjava/testsuite/libjava.sum ] ; then TESTLOGS="$TESTLOGS $H_TARGET/libjava/testsuite/libjava.sum" fi diff --git a/fastjar/ChangeLog b/fastjar/ChangeLog index ebd826fbb6f..22dd6a96ec2 100644 --- a/fastjar/ChangeLog +++ b/fastjar/ChangeLog @@ -1,3 +1,11 @@ +2005-11-29 Tom Tromey + + * compress.c (write_data): Mark 'ze' as unused. + * jartool.h (__attribute__): New define. + * shift.c (shift_up): Added cast. + (shift_down): Likewise. + * jartool.c (help): Split string constant. + 2005-06-29 Kelley Cook * all files: Update FSF address. diff --git a/fastjar/compress.c b/fastjar/compress.c index 43d0884dc40..84b3dad1768 100644 --- a/fastjar/compress.c +++ b/fastjar/compress.c @@ -139,7 +139,8 @@ void init_compression(){ } int -write_data (int fd, void *buf, size_t len, struct zipentry *ze) +write_data (int fd, void *buf, size_t len, + struct zipentry *ze __attribute__((unused))) { #ifdef WITH_SHIFT_DOWN struct zipentry *next = NULL; diff --git a/fastjar/jartool.c b/fastjar/jartool.c index c90adecfeb7..0a1694eebb9 100644 --- a/fastjar/jartool.c +++ b/fastjar/jartool.c @@ -2245,6 +2245,8 @@ Store many files together in a single `jar' file.\n\ -E don't include the files found in a directory\n\ -f FILE specify archive file name\n\ --help print this help, then exit\n\ +"); + printf("\ -m FILE include manifest information from specified manifest file\n\ -M Do not create a manifest file for the entries\n\ -v generate verbose output on standard output\n\ diff --git a/fastjar/jartool.h b/fastjar/jartool.h index 76abda1bddc..df166517d25 100644 --- a/fastjar/jartool.h +++ b/fastjar/jartool.h @@ -35,7 +35,7 @@ /* jartool.h - generic defines, struct defs etc. - Copyright (C) 1999 Bryan Burns + Copyright (C) 1999, 2005 Bryan Burns This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License @@ -116,4 +116,8 @@ struct zipentry { typedef struct zipentry zipentry; +#ifndef __GNUC__ +#define __attribute__() +#endif + #endif /* __FASTJAR_JARTOOL_H__ */ diff --git a/fastjar/shift.c b/fastjar/shift.c index 1ea2710da9d..2b08a2efab2 100644 --- a/fastjar/shift.c +++ b/fastjar/shift.c @@ -1,5 +1,5 @@ /* shift.c -- utilities to move regions of data in a file. - Copyright (C) 2004 Free Software Foundation, Inc. + Copyright (C) 2004, 2005 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 @@ -81,7 +81,7 @@ shift_up (int fd, off_t begin, off_t amount, struct zipentry *ze) for (; ze; ze = ze->next_entry) { - if (ze->offset >= begin) + if ((off_t) ze->offset >= begin) { ze->offset -= amount; moved = 1; @@ -150,7 +150,7 @@ shift_down (int fd, off_t begin, off_t amount, struct zipentry *ze) for (; ze; ze = ze->next_entry) { - if (ze->offset >= begin) + if ((off_t) ze->offset >= begin) { ze->offset += amount; moved = 1; diff --git a/fixincludes/ChangeLog b/fixincludes/ChangeLog index eb739434b33..0121729026d 100644 --- a/fixincludes/ChangeLog +++ b/fixincludes/ChangeLog @@ -1,3 +1,8 @@ +2005-11-24 Bruce Korb + + * fixincl.c(write_replacement) "here strings" in AutoGen often/generally + don't have a terminating newline. Check the last byte for '\n'. + 2005-11-13 Andreas Jaeger * check.tpl: Handle CVS additionally. diff --git a/fixincludes/fixincl.c b/fixincludes/fixincl.c index 250f0b01b62..f8941c39c16 100644 --- a/fixincludes/fixincl.c +++ b/fixincludes/fixincl.c @@ -1202,7 +1202,10 @@ write_replacement (tFixDesc* p_fixd) { FILE* out_fp = create_file (); - fputs (pz_text, out_fp); + size_t sz = strlen (pz_text); + fwrite (pz_text, sz, 1, out_fp); + if (pz_text[ sz-1 ] != '\n') + fputc ('\n', out_fp); fclose (out_fp); } } diff --git a/fixincludes/fixincl.x b/fixincludes/fixincl.x index ae1cda2e823..ead2c54cf6d 100644 --- a/fixincludes/fixincl.x +++ b/fixincludes/fixincl.x @@ -2,11 +2,11 @@ * * DO NOT EDIT THIS FILE (fixincl.x) * - * It has been AutoGen-ed Thursday September 15, 2005 at 06:55:23 PM UTC + * It has been AutoGen-ed Thursday November 24, 2005 at 09:46:46 PM PST * From the definitions inclhack.def * and the template file fixincl */ -/* DO NOT CVS-MERGE THIS FILE, EITHER Thu Sep 15 18:55:24 UTC 2005 +/* DO NOT CVS-MERGE THIS FILE, EITHER Thu Nov 24 21:46:46 PST 2005 * * You must regenerate it. Use the ./genfixes script. * @@ -26,7 +26,8 @@ * * You may redistribute it and/or modify it under the terms of the * GNU General Public License, as published by the Free Software - * Foundation; either version 2, or (at your option) any later version. + * Foundation; either version 2 of the License, or (at your option) + * any later version. * * inclhack is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -34,10 +35,10 @@ * See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with inclhack. See the file "COPYING". If not, - * write to: The Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * along with inclhack. If not, write to: + * The Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor + * Boston, MA 02110-1301, USA. */ /* * * * * * * * * * * * * * * * * * * * * * * * * * diff --git a/gcc/ChangeLog b/gcc/ChangeLog dissimilarity index 63% index e96b34eed19..c93c2b362df 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,9584 +1,4297 @@ -2005-11-23 Mark Mitchell - - * doc/invoke.texi: For man pages, include gcc-vers.texi. - List @file in the option summary. Include the libiberty - documentation for @file. - * gcc.c (main): Call expandargv. - * Makefile.in (gcc-vers.texi): Define srcdir. - -2005-11-23 Diego Novillo - - * passes.c (init_optimization_passes): Document - sequencing of passes. - -2005-11-23 Kazu Hirata - - * config/m68k/predicates.md (pcrel_address, extend_operator, - post_inc_operand, pre_dec_operand): Remove redundant - conditionals. - (const_uint32_operand, const_sint32_operand): Use gcc_assert - instead of abort. - (valid_dbcc_comparison_p): Rewrite in the lisp style. - -2005-11-23 Ben Elliston - - * dwarf2.h (enum dwarf_type): Add DW_ATE_decimal_float. - -2005-11-22 J"orn Rennecke - - Preparatory work for PR target/21623: - * alpha.c (secondary_reload_class): Rename to: - (alpha_secondary_reload_class). - * alpha.h, alpha-protos.h: Likewise. - * mn10300.c (secondary_reload_class): Rename to: - (mn10300_secondary_reload_class). - * mn10300.h, mn10300-protos.h: Likewise. - * pa.c (secondary_reload_class): Rename to: - (pa_secondary_reload_class). - * pa.h, pa-protos.h: Likewise. - * rs6000.c (secondary_reload_class): Rename to: - rs6000_secondary_reload_class. - * rs6000.h, rs6000-protos.h: Likewise. - -2005-11-22 Eric Botcazou - - PR middle-end/22561 - * tree-ssa-structalias.c (get_constraint_for): Handle ARRAY_RANGE_REF. - -2005-11-22 Ian Lance Taylor - - * optabs.c (expand_unop): Call SCALAR_FLOAT_MODE_P on a mode, not - a mode_class. - (prepare_cmp_insn): Likewise. - -2005-11-22 Kazu Hirata - - PR target/23435 - * m68k.md (zero_extendsidi2): Force operands[1] to a register - if both operands[0] and operands[1] are memory. - -2005-11-22 Andrew Pinski - - PR middle-end/23606 - * fold-const.c (fold_unary) : For - COMPARISON_CLASS_P and an integral types create create a new - expression with the new type and fold that. - -2005-11-22 Andrew Pinski - - PR target/24988 - * config/rs6000/darwin.h (TARGET_OS_CPP_BUILTINS): Remove call - to SUBTARGET_OS_CPP_BUILTINS. - -2005-11-22 Richard Earnshaw - - * arm.c (emit_set_insn): New function. - (arm_split_constant): Call it. - (arm_gen_compare_reg, arm_reload_in_hi, arm_reload_out_hi): Likewise. - (arm_legitimize_address): Likewise. Use plus_constant. - (arm_expand_prologue): Likewise. Use VOIDmode in SET. - (thumb_expand_prologue): Likewise. - (arm_gen_load_multiple): Use VOIDmode in SET. - (arm_gen_store_multiple): Likewise. - (vfp_emit_fstmx): Likewise. Use plus_constant. - (emit_multi_reg_push): Likewise. - (emit_sfm): Use plus_constant. - -2005-11-23 Alan Modra - - PR target/24954 - * config/rs6000/predicates.md (easy_vector_constant_add_self): Fix - typo last change. - -2005-11-22 Alan Modra - - PR middle-end/24950 - * expmed.c (store_bit_field): Don't attempt to insv a field - larger than the reg. - -2005-11-22 Alan Modra - - PR target/24954 - * config/rs6000/predicated.md (easy_vector_constant_add_self): Use - explicit sign extension, not a (char) cast. - -2005-11-22 Ben Elliston - - * optabs.c: Use SCALAR_FLOAT_MODE_P instead of explicitly testing - GET_MODE_CLASS (x) == MODE_FLOAT. - * config/i386/i386.c: Likewise. - * config/rs6000/xcoff.h: Likewise. - * config/rs6000/linux64.h: Likewise. - * config/rs6000/rs6000.c: Likewise. - * config/rs6000/rs6000.h: Likewise. - * config/rs6000/predicates.md: Likewise. - * config/rs6000/sysv4.h: Likewise. - -2005-11-21 Kaveh R. Ghazi - - * c-cppbuiltin.c (c_cpp_builtins): Define __pic__ and __PIC__ when - flag_pic is set. - - * config/alpha/freebsd.h, config/alpha/linux.h, - config/arm/linux-elf.h, config/bfin/bfin.h, - config/cris/linux.h, config/darwin.h, config/freebsd-spec.h, - config/i386/beos-elf.h, config/i386/gnu.h, - config/i386/linux.h, config/i386/linux64.h, config/i386/nto.h, - config/i386/sco5.h, config/m32r/m32r.h, config/m68k/linux.h, - config/m68k/m68k.h, config/mips/linux.h, config/pa/pa-linux.h, - config/rs6000/linux64.h, config/rs6000/sysv4.h, - config/rs6000/vxworks.h, config/s390/linux.h, config/s390/tpf.h, - config/sh/linux.h, config/sh/sh.h, config/sol2.h, - config/sparc/linux.h, config/sparc/linux64.h, - config/xtensa/xtensa.h: Don't define __pic__ or __PIC__. - - * doc/invoke.texi: Document that the macros __pic__ and __PIC__ - are both defined when either flag -fpic or -fPIC are used. - -2005-11-22 Joseph S. Myers - - * config/fp-bit.c (clzusi): New function. - (si_to_float, usi_to_float): Use it to compute proper shift. - (usi_to_float): Preserve guard bits when shifting right. - * libgcc-std.ver (GCC_4.2.0): New version. - * libgcc2.c (__floatundixf, __floatunditf, __floatundidf, - __floatundisf): New functions. - * libgcc2.h (__floatundixf, __floatunditf, __floatundidf, - __floatundisf): Declare. - * mklibgcc.in (lib2funcs): Add _floatundidf, _floatundisf, - _floatundixf, and _floatunditf. - * optabs.c (expand_float): If target does not define a pattern for - signed or unsigned conversion, use an unsigned libcall instead of - a signed one. - (init_optabs): Initialize ufloat_optab. - -2005-11-22 Joseph S. Myers - - * config/rs6000/rs6000.opt (mmulhw): New option. - * doc/invoke.texi (-mmulhw): Document. - * config/rs6000/rs6000.c (rs6000_override_options): Enable -mmulhw - for 405 and 440. - * config/rs6000/rs6000.md: Add half-word multiply and - multiply-accumulate instructions for 405 and 440. - -2005-11-21 Joel Sherrill - - * config/arm/rtems-elf.h: Added definition of LINK_GCC_C_SEQUENCE_SPEC - which matches behavior of gcc 4.0 and older for RTEMS targets. The - default now includes a linker group which makes the RTEMS one nest. - -2005-11-22 Ben Elliston - - * cse.c (fold_rtx): Typo fix. - (find_comparison_args): Pass the mode of arg1, not arg1 itself. - -2005-11-21 Richard Henderson - - * c-common.c, config/darwin-c.c, c-decl.c, c-tree.h, c-objc-common.h, - langhooks-def.h, langhooks.h: Revert 2005-11-18 lookup_name patch. - - * c-tree.h (lookup_name): Move declaration ... - * c-common.h (lookup_name): ... here. - * config/darwin-c.c: Include c-common.h. - * config/t-darwin: Update dependencies. - -2005-11-22 Ben Elliston - - * optabs.c (expand_abs_nojump): Use SCALAR_FLOAT_MODE_P instead of - explicitly testing GET_MODE_CLASS (x) == MODE_FLOAT. - * genopinit.c (gen_insn): Likewise. - * reload.c (find_equiv_reg): Likewise. - * loop.c (load_mems): Likewise. - * rtlanal.c (may_trap_p_1, canonicalize_condition): Likewise. - * cse.c (find_comparison_args, fold_rtx): Likewise. - * dwarf2out.c (add_const_value_attribute): Likewise. - * expr.c (convert_move): Likewise. - * recog.c (general_operand, register_operand): Likewise. - * reg-stack.c (replace_reg): Likewise. - * tree-vect-generic.c (type_for_widest_vector_mode): Likewise. - * c-common.c (handle_vector_size_attribute): Likewise. - * simplify-rtx.c (simplify_const_unary_operation): Likewise. - (simplify_binary_operation_1): Likewise. - (simplify_const_binary_operation): Likewise. - (simplify_relational_operation): Likewise. - (simplify_const_relational_operation): Likewise. - (simplify_immed_subreg): Likewise. - * emit-rtl.c (gen_lowpart_common): Likewise. - * expmed.c (expand_mult): Likewise. - * stor-layout.c (layout_type): Likewise. - -2005-11-21 Paolo Bonzini - - PR target/24951 - * config/rs6000/rs6000.c (output_vec_const_move): Load cst and - cst2 only for SPE vectors. - -2005-11-21 David Edelsohn - - PR target/24953 - * config/rs6000/predicates.md (vrsave_operation): Check - UNSPEC_VOLATILE value. - -2005-11-21 Jan Hubicka - - PR tree-optimization/24653 - * tree-ssa-ccp.c (ccp_fold): Strip down useless conversions. - -2005-11-21 Uros Bizjak - - * config/i386/predicates.md (ax_reg_operand): New predicate. - (memory_displacement_only_operand): New predicate. - * config/i386/i386.md ("modrm" attribute): Return 0 if one - operand is AX register and the other operand is memory operand - with displacement only. - -2005-11-21 Uros Bizjak - - * fold-const.c (fold_binary) : Optimize A / A to 1.0 - if we don't care about NaNs or Infinities. - -2005-11-20 Ian Lance Taylor - - PR rtl-optimization/24883 - * combine.c (combinable_i3pat): When checking whether the - destination of i3 is used in i3, consider paradoxical subregs. - -2005-11-21 Kazu Hirata - - PR middle-end/20583 - * cse.c (cse_insn): Reject invalid forms of CONST earlier. - -2005-11-20 Joseph S. Myers - - * combine.c (try_combine): Do not run subst on i1src and i2src in - the case of generating a PARALLEL for a comparison. - -2005-11-20 Richard Henderson - - PR 24931 - * tree-sra.c (struct sra_elt): Add all_no_warning. - (struct sra_walk_fns) : Add use_all argument. - (sra_walk_expr): Pass it. - (sra_walk_modify_expr): Likewise. - (scalarize_ldst): Likewise. - (scan_use): Update for new argument. - (mark_no_warning): New. - (scalarize_use): Use it. - -2005-11-20 Bernd Schmidt - - * expr.c (expand_expr_real): Use usmul_optab for widening - signed * unsigned multiplies. - * genopinit.c (optabs): Add usmul_widen_optab. - * optabs.c (init_optabs): Likewise. - * optabs.h (enum optab_index): Add OTI_usmul_widen. - (usmul_widen_optab): Define. - * config/bfin/bfin.md (usmulhisi3): New pattern. - - * doc/md.texi (usmulqihi3, usmulhisi3, usmulsidi3): Document. - -2005-11-20 Graham Stott - - * gensupport.c (std_preds): Fixed extraneous `false` in last change. - -2005-11-20 Andreas Schwab - - PR target/24757 - * config/ia64/ia64.c (ia64_expand_atomic_op): Fix condition of cmp - insn. - -2005-11-19 Richard Henderson - - PR tree-opt/24665 - * tree-gimple.c (is_gimple_id): Export. - * tree-gimple.h (is_gimple_id): Declare. - * tree-ssa-ccp.c (ccp_decl_initial_min_invariant): New. - (get_default_value): Use it. - (maybe_fold_stmt_indirect): Likewise. - -2005-11-19 James A. Morrison - - * tree-vrp.c (compare_ranges): Return false for EQ_EXPR if VR0 is less - than VR1 or vice-versa. - -2005-11-19 Hans-Peter Nilsson - - PR middle-end/24912 - PR middle-end/24750 - * reload.c (find_reloads_address_1): Mention dependency on - gen_reload. - * reload1.c (gen_reload): For IN with an unary operation, try - moving inner expression to OUT if trivial SET is not valid. - Confirm that the result is valid. Move common code block into... - (emit_insn_if_valid_for_reload): New function. - -2005-11-19 Richard Guenther - - * fold-const.c (fold_indirect_ref_1): Make sure we fold - ARRAY_REFs of constant strings. - -2005-11-19 Jakub Jelinek - - * gcc.c (version_compare_spec_function): Use '%s' rather than %qs in - fatal format string. - -2005-11-19 Joseph S. Myers - - * combine.c (make_compound_operation): Swap operands of - commutative operation if necessary before returning. - -2005-11-19 Richard Guenther - - PR middle-end/23294 - * fold-const.c (fold_plusminus_mult_expr): New function. - (fold_binary): Use to canonicalize PLUS_EXPR and MINUS_EXPR - cases, remove now unnecessary code. - -2005-11-19 Paolo Bonzini - - * gensupport.c (old_preds): Rename to std_preds, add special field. - (struct old_pred_table): Rename to struct std_pred_table, add special - field. - (NUM_KNOWN_OLD_PREDS): Rename to NUM_KNOWN_STD_PREDS. - (NUM_OLD_SPECIAL_MODE_PREDS): Remove. - (init_predicate_table): Adjust, and set along the way whether a - predicate is special. - -2005-11-18 Mark Mitchell - - * BASE-VER: Change to 4.2.0. - -2005-11-18 James E Wilson - - * builtins.c (fold_builtin_strstr): Pass s1 through fold_convert before - returning it. - -2005-11-18 Mike Stump - - * c-common.c (handle_cleanup_attribute): Use a lang hook for lookup_name. - * config/darwin-c.c (darwin_pragma_unused): Likewise. - * c-decl.c (lookup_name_two) Remove. - * c-tree.h (lookup_name_two): Remove. - * c-objc-common.h (LANG_HOOKS_LOOKUP_NAME): Add. - * langhooks-def.h (LANG_HOOKS_LOOKUP_NAME): Add. - (LANG_HOOKS_DECLS): Add initializer for LANG_HOOKS_LOOKUP_NAME. - * langhooks.h (lang_hooks_for_decls): Add lookup_name. - -2005-11-18 Richard Earnshaw - - PR target/24914 - * arm.c (arm_hard_regno_mode_ok): Co-processor registers aren't ok - when not generating code to use that co-processor. - -2005-11-18 James A. Morrison - - * tree-flow.h (reserve_phi_args_for_new_edge, create_phi_node, - add_phi_arg, remove_phi_args, remove_phi_node phi_reverse): Mention that - these functions are now in tree-phinodes.c. - -2005-11-18 Jie Zhang - - * config/bfin/bfin.md (trap): New pattern. - -2005-11-18 Richard Kenner - - * tree-ssa-dom.c (extract_range_from_cond): Deal with variable bounds - on types. - - * expr.c (expand_expr_real): Don't call record_block_change unless - ib_boundaries_block is non-null - - * postreload.c (reload_cse_move2add): Don't try to work with BImode. - - * fold-const.c (build_range_check): Use proper type for subtraction - when merging lower bound. - -2005-11-18 Zdenek Dvorak - - PR rtl-optimization/24497 - * loop-unroll.c (apply_opt_in_copies): Do not verify equality of - the copied insn. - -2005-11-18 Zdenek Dvorak - - * tree-scalar-evolution.c (expression_expensive_p): New function. - (scev_const_prop): Use compute_overall_effect_of_inner_loop. - -2005-11-18 Bernd Schmidt - - * config/bfin/crtlibid.s: New file. - -2005-11-17 John David Anglin - - PR target/24348 - * config.gcc (hppa*-*-hpux*): Add pa/t-slibgcc-elf-ver to tmake config - when not using sjlj exceptions. - * config/pa/pa64-hpux.h (LIB_SPEC): Add -lpthread in static links. - * config/pa/pa-hpux11.h (LIB_SPEC): Likewise. - * config/pa/som.h (ASM_PREFERRED_EH_DATA_FORMAT): Delete define. - * config/pa/linux-unwind.h (pa32_fallback_frame_state): Use - DWARF_ALT_FRAME_RETURN_COLUMN instead of column 0 as return column. - * config/pa/pa-hpux.h (MD_UNWIND_SUPPORT): New define. - * config/pa/pa-linux.h (INCOMING_RETURN_ADDR_RTX, - DWARF_FRAME_RETURN_COLUMN, ASM_PREFERRED_EH_DATA_FORMAT, - ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX): Delete defines. - * config/pa/pa.h (ARG_POINTER_CFA_OFFSET): Delete. - (FRAME_POINTER_CFA_OFFSET, INCOMING_RETURN_ADDR_RTX, - DWARF_FRAME_RETURN_COLUMN, DWARF_ALT_FRAME_RETURN_COLUMN, - ASM_PREFERRED_EH_DATA_FORMAT, ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX): New - defines. - * config/pa/hpux-unwind.h: New file. - -2005-11-17 Alexandre Oliva - - * config/rs6000/rs6000.h (ASM_OUTPUT_WEAKREF): Define. - * defaults.h (ASM_OUTPUT_WEAKREF): Add decl argument. - * varasm.c (do_assemble_alias): Adjust call. - (weak_finish): Don't use ASM_WEAKEN_LABEL if ASM_WEAKEN_DECL - is defined. - * doc/tm.texi (ASM_OUTPUT_WEAKREF): Document it. - -2005-11-17 James E Wilson - - * tree.def (FUNCTION_DECL): Correct typo in comment. - -2005-11-17 Richard Henderson - - * dwarf2out.c (dw_cfi_oprnd_struct): Reduce dw_cfi_reg_num to int. - (lookup_cfa_1): Apply data alignment to DW_CFA_def_cfa_offset_sf - and DW_CFA_def_cfa_sf. - (def_cfa_1): Use DW_CFA_def_cfa_offset_sf with negative values. - (dbx_reg_number): Don't assert particular registers here. - (based_loc_descr): ... do it here instead. Fold in ... - (eliminate_reg_to_offset): ... this function. - (compute_frame_pointer_to_cfa_displacement): Fold in the effects - of eliminate_reg_to_offset; use FRAME_POINTER_CFA_OFFSET. - * unwind-dw2.c (execute_cfa_program): Apply data align factor - to DW_CFA_def_cfa_offset_sf and DW_CFA_def_cfa_sf. - * function.c (instantiate_new_reg): Use FRAME_POINTER_CFA_OFFSET. - (instantiate_virtual_regs): Likewise. - * var-tracking.c (adjust_stack_reference): Likewise. - * doc/tm.texi (FRAME_POINTER_CFA_OFFSET): New. - -2005-11-17 Bernd Schmidt - - * config/bfin/elf.h (STARTFILE_SPEC): Add "crtlibid%O%s" - * config/bfin/uclinux.h (STARFILE_SPEC): Likewise. - * config/bfin/t-bfin-elf (EXTRA_PARTS, EXTRA_MULTILIB_PARTS): Add - crtlibid.o. - ($(T)crtlibid.o): New rule. - -2005-11-16 Richard Guenther - - PR middle-end/24851 - * fold-const.c (extract_array_ref): Return byte offset - in all cases. - (fold_binary): Fold &x[a] CMP &x[b] to - a*sizeof(*x) CMP b*sizeof(*x) to get correct overflow - behavior. - -2005-11-16 Richard Henderson - - PR middle-end/23497 - * tree-ssa.c (warn_uninitialized_var): Skip real and imaginary - parts of an SSA_NAME. - -2005-11-16 Richard Earnshaw - - PR target/24861 - * arm.md (split for movsf with immediate): Restrict split to insns - that set a general register. - -2005-11-16 Daniel Jacobowitz - - * config/ia64/unwind-ia64.c (uw_advance_context): New. Call - uw_update_context. - * unwind-dw2.c (uw_advance_context): Likewise. - * unwind-sjlj.c (uw_advance_context): Likewise. Also call - _Unwind_SjLj_Unregister. - * unwind.inc (_Unwind_ForcedUnwind_Phase2): Call uw_advance_context. - -2005-11-16 Daniel Jacobowitz - - * unwind-sjlj.c (_Unwind_GetCFA): Handle the builtin_setjmp case. - -2005-11-16 Eric Botcazou - - * config/alpha/alpha.c (alpha_init_builtins): Use type_for_mode - langhook to get a DImode integer type. - -2005-11-16 Richard Henderson - J"orn Rennecke - Ulrich Weigand - - PR rtl-opt/24160 - PR target/24621 - * reload1.c (reg_equiv_invariant): New. - (reload): Allocate, initialize, and free it. - (calculate_needs_all_insns): Check it when skipping equivalence - setting insns. - (alter_reg): Likewise. - (eliminate_regs_1): Rename from eliminate_regs. Add new - may_use_invariant argument; only use reg_equiv_invariant when true. - (eliminate_regs): New. - (eliminate_regs_in_insn): Use eliminate_regs_1; track when we're in - a context for which may_use_invariant may be true. - -2005-11-16 Eric Botcazou - - * fold-const.c (const_binop): Don't constant fold the operation - if the result has overflowed and flag_trapping_math. - * simplify-rtx.c (simplify_const_binary_operation): Likewise. - -2005-11-16 Daniel Jacobowitz - - * config/arm/unwind-arm.c (abort): Add prototype here. - (UCB_FORCED_STOP_ARG): Correct typo in macro argument. - (struct phase1_vrs): Add prev_sp. - (unwind_phase2_forced): Save the original core registers instead of - modifying entry_vrs. Take a new flag argument for resuming unwinding - and set action flags accordingly. Always set _US_END_OF_STACK when - get_eit_entry fails. Unwind before calling the stop function. - (_Unwind_GetCFA): New function. - (__gnu_Unwind_ForcedUnwind): Update call to unwind_phase2_forced. - (__gnu_Unwind_Resume_or_Rethrow): Likewise. - (__gnu_Unwind_Resume): Do not unwind here for forced unwinding; - just call unwind_phase2_forced. - (_Unwind_GetDataRelBase, _Unwind_GetTextRelBase): Move to here. - * config/arm/unwind-arm.h (abort): Remove prototype. - (_Unwind_GetDataRelBase, _Unwind_GetTextRelBase): Change to - prototypes. - (_Unwind_GetCFA): New prototype. - * config/arm/pr-support.c (abort): Add prototype here. - * unwind-c.c (PERSONALITY_FUNCTION) [__ARM_EABI_UNWINDER__]: Handle - forced unwinding. - * config/arm/arm.c (arm_expand_prologue, thumb_expand_prologue): Do - not schedule the prologue with non-call exceptions and EABI. - -2005-11-16 Nathan Sidwell - - * config/arm/unwind-arm.h: Reorder interface function declarations. - (_URC_END_OF_STACK): New enumeration value. - (_US_UNWIND_ACTION_MASK, _US_FORCE_UNWIND, _US_END_OF_STACK): Likewise. - (struct _Unwind_Control_Block): Document reserved field use. - (_Unwind_Stop_Fn): New typedef. - (_Unwind_ForcedUnwind): Declare. - (_Unwind_Resume_or_Rethrow): Declare. - * gcc/config/arm/libunwind.S (UNWIND_WRAPER): Add nargs - argument. Adjust. - (_Unwind_Resume_or_Rethrow, _Unwind_ForcedUnwind): New. - * config/arm/unwind-arm.c (UCB_FORCED_STOP_FN) - (UCB_FORCED_STOP_ARG): New. - (search_EIT_table): Update boundary condition checks. - (get_eit_entry): Return _URC_END_OF_STACK when cannot unwind. - (unwind_phase2): Replace for with do..while. - (unwind_phase2_forced): New. - (__gnu_Unwind_RaiseException): Replace for with do..while. - (__gnu_Unwind_ForcedUnwind): New. - (__gnu_Unwind_Resume): Set FORCE_UNWIND flag, if forced unwinding. - Use appropriate phase2 unwinder. - (__gnu_Unwind_Resume_or_Rethrow): New. - (__gnu_unwind_pr_common): Cope with forced unwinding. - -2005-11-16 David Edelsohn - - PR target/24772 - * config/rs6000/predicates.md (vrsave_operation): SET_SRC is a VEC. - - * config/rs6000/rs6000.md (btruncsf2, ceilsf2, floorsf2, - roundsf2): Remove "s" from mnemonic. - -2005-11-16 Bernd Schmidt - - * config/bfin/crti.s (__init, __fini): Use appropriate prologue if - __PIC__ is defined. - * config/bfin/crtn.s: Change epilogues to match. - * config/bfin/t-bfin-elf (EXTRA_MULTILIB_PARTS): Define. - * config/bfin/bfin.h (TARGET_CPU_CPP_BUILTINS): If flag_pic, define - __PIC__ and __pic__. - -2005-11-16 Tobias Schl"uter - - PR 24357 - * doc/invoke.texi: Distinguish between free and fixed form instead of - Fortran and Fortran 90/95. Remove ratfor from the list of supported - languages. - * gcc.c (default_compilers): Remove double entries, add entries for - suffixes '.F90' and '.F95'. - -2005-11-16 Eric Botcazou - - * config/alpha/alpha.c (alpha_expand_prologue): Fix off-by-one bug - in the stack probing loop. - -2005-11-15 David Edelsohn - - * configure.ac: Use .machine power5 not power5x. - * configure: Regenerate. - -2005-11-15 Mike Stump - - * c-decl.c (lookup_name_two): Add. - * c-tree.h (lookup_name_two): Likewise. - * c-common.c (handle_cleanup_attribute): Use lookup_name_two instead. - * config/darwin-c.c (darwin_pragma_unused): Likewise. - -2005-11-16 Alan Modra - - PR rtl-optimization/23392 - * regrename.c (enum scan_actions) Add mark_access. - (scan_actions_name): Ditto. - (scan_rtx_reg): Handle mark_access. - (scan_rtx_address): Do nothing for mark_access. - (build_def_use): Mark source registers in REG_FRAME_RELATED_EXPR - and regs in REG_INC notes before closing chains for dead regs. - Mark destination regs in REG_FRAME_RELATED_EXPR notes after - opening chains for new writes. - -2005-11-15 David Edelsohn - - * c.opt (ffixed-line-length-none): New. - -2005-11-15 Steve Ellcey - - * mklibgcc.in: Change contents of eh_dummy.c. - -2005-11-15 Daniel Jacobowitz - - * loop.c (scan_loop): Do not insert temporaries for hard registers. - -2005-11-15 Daniel Jacobowitz - - * config/arm/lib1funcs.asm (div0) [L_dvmd_lnx]: Call raise instead - of making syscalls. - * config/arm/linux-eabi.h (CLEAR_INSN_CACHE): Define. Set r7 also. - -2005-11-15 Jan Hubicka - - * invoke.texi (large-unit-insns): Document. - * ipa-inline.c (cgraph_decide_inlining): Use large-unit-insns param. - * params.def (large-unit-insns): New param. - -2005-11-15 Hans-Peter Nilsson - - PR target/24869 - * config/cris/cris.md ("*mov_sidesisf_mem"): Do not match - special register for operand 3. Reindent constraints to align - them vertically. - -2005-11-14 David Edelsohn - - * doc/invoke.texi (RS/6000 and PowerPC Options): Add -mmfcrf, - -mpopcntb, -mfprnd. Add -mcpu=power5+. - * configure.ac: Add test for FP rounding instructions. - * configure: Regenerate. - * config.in: Regenerate. - * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Define - _ARCH_PPCSQ, _ARCH_PPCGR, _ARCH_PWR4, _ARCH_PWR5, _ARCH_PWR5X if - features enabled. - * config/rs6000/rs6000.opt (mfprnd): New. - * config/rs6000/rs6000.c (processor_target_table): Add power5+. - (POWERPC_MASKS): Add MASK_POPCNTB and MASK_FPRND. - * config/rs6000/aix52.h (ASM_CPU_SPEC): Add -mpower5+. - * config/rs6000/rs6000.h (ASM_CPU_SPEC): Add -mpower5+. - (TARGET_FPRND): New. - * config/rs6000/rs6000.md (UNSPEC_FRIM, UNSPEC_FRIN, UNSPEC_FRIP, - UNSPEC_FRIZ): New. - (btrunc2): New. - (ceil2): New. - (floor2): New. - (round2): New. - -2005-11-14 Geoffrey Keating - - * gcc.c (version_compare_spec_function): Use fatal() rather than - abort(). - - * config/rs6000/darwin.h (DARWIN_CRT2_SPEC): New. - (SUBTARGET_EXTRA_SPECS): Define %(darwin_crt2). - * config/i386/darwin.h (SUBTARGET_EXTRA_SPECS): Define %(darwin_crt2) - as empty. - * config/darwin.h (STARTFILE_SPEC): Use %(darwin_crt2) to possibly - link in crt2.o. - - * config/darwin.h (REAL_LIBGCC_SPEC): Link in shared libgcc depending - on -mmacosx-version-min setting. - -2005-11-14 Diego Novillo - - PR 24840 - * tree-vrp.c (infer_value_range): Return false if STMT is a - block terminator and its basic block has no successors. - -2005-11-14 Mike Stump - - * config/i386/i386.c (override_options): -masm=intel isn't - supported on darwin. - * doc/invoke.texi (i386 and x86-64 Options): Likewise. - -2005-11-15 Joseph S. Myers - - * crtstuff.c: Undefine gid_t, pid_t, rlim_t, ssize_t, uid_t and - vfork after including auto-host.h. - -2005-11-15 Alan Modra - - PR rtl-optimization/22002 - * combine.c (distribute_notes): Detect cases where a reg dies - two or more times in a bb, including on the insn we are combining, - and place the death note on the correct range. - -2005-11-14 Dale Johannesen - - * expmed.c (store_bit_field): Add offset unconditionally for - memory targets. - (extract_bit_field): Don't force extzv or extv operand into - a register if field is too big. - -2005-11-14 Daniel Jacobowitz - - * config/arm/arm.c (pic_labelno): New. - (arm_load_pic_register): Use an UNSPEC_PIC_LABEL instead of a - LABEL_REF. Pass only the labelno to PIC insns. - (arm_call_tls_get_addr, legitimize_tls_address): Likewise. - (arm_output_addr_const_extra): Handle UNSPEC_PIC_LABEL. - * arm.md (UNSPEC_PIC_LABEL): New constant. - (pic_add_dot_plus_four, pic_add_dot_plus_eight) - (tls_load_dot_plus_eight): Expect a labelno instead of a LABEL_REF. - Use the correct label prefix. - -2005-11-14 Daniel Jacobowitz - - * config/arm/arm.c (legitimize_tls_address): Use correct rtx for - REQ_EQUIV note. - -2005-11-14 Richard Earnshaw - - * loop-invariant.c: Include tm_p.h. - * Makefile.in: Updated. - -2005-11-13 John David Anglin - - * pa.c (store_reg): Revise generation of frame notes in large frames. - (set_reg_plus_d): Likewise. - -2005-11-13 Andrew MacLeod - - PR tree-optimization/24709 - * tree-ssa-operands.c (verify_imm_links): Increase limit for infinite - loop check. - -2005-11-13 Eric Botcazou - - * gthr-posix95.h: Remove declaration of pthread_mutexattr_settype - and duplicate declaration of pthread_self. - -2005-11-13 Eric Botcazou - Ian Lance Taylor - - PR middle-end/24003 - * calls.c (expand_call): If TARGET is a MEM and some part of the - argument area has been saved, force TARGET to a register. - -2005-11-13 Razya Ladelsky - - * ipa-prop.c (ipa_callsite_compute_param ): Removed obsolete type - checking. - -2005-11-13 Jason Merrill - - PR c++/22489 - * dwarf2out.c (gen_subprogram_die): Force a declaration die for - lazily declared methods. - (force_decl_die): Stop if forcing out the context already make a - DIE for the decl. - (force_type_die): Likewise. - -2005-11-13 Andrew Pinski - - PR middle-end/24820 - * builtins.c (integer_valued_real_p): Add break in - REAL_CST having TREE_OVERFLOW set. - -2005-11-13 Zdenek Dvorak - - * tree-ssa-loop-ivopts.c (get_address_cost): Prevent splitting - addressing modes during calculation of costs. - -2005-11-12 Eric Botcazou - - * function.c (assign_stack_local_1): Restrict sanity check - on frame size overflow to 32-bit and above platforms. - -2005-11-12 Hans-Peter Nilsson - - * config/cris/cris.h (LEGITIMIZE_RELOAD_ADDRESS): Define. - * config/cris/cris.c: Include reload.h. - (cris_initial_elimination_offset): New function. - * config/cris/cris-protos.h: (cris_initial_elimination_offset): - Prototype. - -2005-11-12 Richard Guenther - - * gcse.c (find_rtx_in_ldst): Handle NULL pre_ldst_table. - -2005-11-12 Jan Hubicka - - * expr.c (expand_expr_real_1): : Canonicalize - to compare against 0 when possible. - -2005-11-12 Jie Zhang - - * config/bfin/bfin.h (REGISTER_NAMES, SHORT_REGISTER_NAMES, - HIGH_REGISTER_NAMES, FIXED_REGISTERS, CALL_USED_REGISTERS, - REG_ALLOC_ORDER, enum reg_class): Rearrange I/B/L registers. - * config/bfin/bfin.md: Redefine REG_ constants for I/B/L registers - in the new order. - -2005-11-12 Hans-Peter Nilsson - - * recog.c (constrain_operands) : For a match, require - that a non-register matches general_operand when strict >= 0. - -2005-11-11 Steven Bosscher - - * loop-invariant.c (move_loop_invariants): Fix a thinko in the - previous checkin. - -2005-11-11 Daniel Jacobowitz - - * tree-ssa-dse.c (struct address_walk_data, memory_ssa_name_same) - (memory_address_same): New. - (dse_optimize_stmt): Call memory_address_same. - -2005-11-12 Hans-Peter Nilsson - - PR middle-end/24750 - * reload.c (find_reloads_address_1) : New cases. - -2005-11-11 Daniel Jacobowitz - - * longlong.h (__clz_tab): Always provide. - -2005-11-11 Steven Bosscher - - PR 24265 - * loop-invariant.c (may_assign_reg_p): Make sure a hard register - can be assigned to. - (find_invariant_insn): Do the cheapest check, may_assign_reg_p, - before check_maybe_invariant. - (move_invariant_reg): Use gen_move_insn instead of replacing - SET_DEST with the temporary for the invariant. - (move_loop_invariants): If checking is enabled, do internal - consistency checks after completing the pass. - -2005-11-11 David Edelsohn - - PR 24644 - * common.opt (Wvolatile-register-var): New. - * varasm.c (make_decl_rtl): Only emit warning when option - specified. Clarify warning message. - * doc/invoke.texi (Wvolatile-register-var): Document new option. - - * doc/md.texi (copysign): Document standard named pattern. - -2005-11-11 Jie Zhang - - * config/bfin/bfin.c (bfin_expand_strmov): Correctly move the trailing - bytes when align is 2. - * config/bfin/bfin.md (rep_movsi, rep_movhi): Make LSETUP be followed - by the first instruction of the loop. - -2005-11-11 Jason Merrill - - PR c++/24686 - * gimplify.c (gimplify_cleanup_point_expr): Also save and restore - the cleanup list. - -2005-11-11 Zdenek Dvorak - - PR rtl-optimization/22509 - * local-alloc.c (memref_used_between_p): Check whether a function call - could not reference the memref. - -2005-11-11 Ulrich Weigand - - * postreload.c (reload_cse_simplify_operands): Fix bug in sorting - algorithm so as to choose the best, not the worst, alternative. - Reset accumulated register class before processing next alternative. - -2005-11-11 Kaz Kojima - - PR target/24445 - * calls.c (expand_call): Copy a return value to a plain register - if needed. - -2005-11-10 Alexandre Oliva - - PR target/24778 - * varasm.c (assemble_name): Recompute name only for transparent - aliases. - -2005-11-10 Hans-Peter Nilsson - - * tree-ssa-structalias.c (heapvar_lookup): Fix typo: stmt to from. - -2005-11-04 Jeff Law - - PR middle-end/23181 - * tree-ssa-dom.c (simplify_rhs_and_lookup_avail_expr): Do not - perform reassociation if the parent statement will not die as - a result of the optimization. - -2005-11-10 Daniel Berlin - - * tree-ssa-alias.c (compute_may_aliases): Remove call to - delete_old_heap_vars. - * tree-dfa.c (referenced_var_remove): Remove function. - * tree-ssa.c (init_tree_ssa): Call init_alias_heapvars. - (delete_tree_ssa): Remove call to delete_old_heapvars. - Add call to delete_alias_heapvars. - * tree-flow.h (referenced_var_remove): Remove prototype - (init_alias_heapvars): New prototype. - (delete_alias_heapvars): Ditto. - * Makefile.in (tree-ssa-structalias.o): Add - gt-tree-ssa-structalias.o - (GTFILES): Add tree-ssa-structalias.h and - tree-ssa-structalias.c. - (s-gtype): Add gt-tree-ssa-structalias.h. - * tree-ssa-structalias.c (heapvars): Remove. - (oldheapvars): Remove. - (heapvar_for_stmt): New variable. - (heapvar_lookup): New function. - (heapvar_insert): Ditto. - (get_constraint_for): See if we have an old heapvar - to reuse. - (init_alias_heapvars): New function. - (delete_alias_heapvars): Ditto. - Add include of gt-tree-ssa-structalias.h. - -2005-11-10 Eric Botcazou - - PR middle-end/22127 - * calls.c (special_function_p): Set ECF_RETURNS_TWICE for getcontext. - -2005-11-10 Eric Botcazou - - * tree.c (int_fits_type_p): Only look at the base type - if it has the same precision as the original type. - -2005-11-10 Jakub Jelinek - - PR other/4372 - * varasm.c (assemble_alias): Use %q+D in the error - message instead of %J and %qD. - -2005-11-10 Richard Guenther - - * gcse.c (free_ldst_entry): Only free hashtable if - it exists. - -2005-11-09 Eric Botcazou - - * function.c (assign_stack_local_1): Issue an error message if - the frame size overflows in the signed target arithmetics. - -2005-11-09 Eric Botcazou - - * tree.c (build_qualified_type): Chain the new type to the original - type's TYPE_NEXT_PTR_TO or TYPE_NEXT_REF_TO linked lists if it is - a POINTER_TYPE or a REFERENCE_TYPE respectively. - (build_pointer_type_for_mode): Only return unqualified types. - (build_reference_type_for_mode): Likewise. - -2005-11-09 Jakub Jelinek - - * Makefile.in (gnucompare): Do comparison of all files using one of - the chosen methods and only afterwards decide if just warning should - be issued or comparison failure raised. - -2005-11-09 Eric Botcazou - - * ifcvt.c (noce_get_alt_condition): Use prev_nonnote_insn. - (noce_try_abs): Negate if the comparison is reversed. - Look only one instruction backwards for a REG_EQUAL note. - -2005-11-09 Alexandre Oliva - - PR other/4372 - * gthr-dce.h, gthr-posix.h, gthr-posix95.h, gthr-solaris.h, - gthr-tpf.h: Define __gthrw. For all identifiers that might - be weak, introduce weakrefs or non-weak aliases with __gthrw, - and prefix all uses with __ghtrw. - -2005-11-09 Alexandre Oliva - - PR other/4372 - * tree.h (IDENTIFIER_TRANSPARENT_ALIAS): New. - (TREE_DEPRECATED): Adjust comment. Check for a DECL. - * c-common.c (handle_weakref_attribute): New. - (c_common_attribute_table): Add weakref. - * configure.ac (HAVE_GAS_WEAKREF): Check for weakref support - in the assembler. - * configure, config.in: Rebuilt. - * defaults.h (ASM_OUTPUT_WEAKREF): Define if HAVE_GAS_WEAKREF. - * doc/extend.texi: Document weakref attribute. - * varasm.c (ultimate_transparent_alias_target): New - (assemble_name): Use it. - (weak_finish_1): Split out of... - (weak_finish): ... and deal with weakrefs in... - (weakref_targets): ... new list. - (globalize_decl): Clean up weakref_targets. - (do_assemble_alias): Handle weakrefs. - (finish_aliases_1): Do not reject weakrefs to external symbols. - (assemble_alias): Handle weakrefs. - -2005-11-09 Richard Guenther - - PR tree-optimization/24716 - * tree-scalar-evolution.c (analyze_evolution_in_loop): Use - t_bool to track results from follow_ssa_edge. - -2005-11-09 Eric Botcazou - - * final.c (force_source_line): New global variable. - (final_scan_insn): Set it to true instead of clearing last_filename. - (notice_source_line): Return true if force_source_line is true, - unless source info is absent. - -2005-11-09 Andrew Pinski - - PR c/24644 - * dwarf2-out.c (add_name_and_src_coords_attributes): Don't add - a linkage name for a variable if it a register variable. - * c-decl.c (grokdeclarator): Global register variables - should be set as PUBLIC. - -2005-11-09 Andreas Krebbel - - PR 24624 - * config/s390/s390.c (struct s390_frame_layout): New fields - first_save_gpr_slot and last_save_gpr_slot. - (cfun_grps_save_area_size, s390_frame_info, s390_emit_prologue, - s390_emit_epilogue, s390_initial_elimination_offset): Replaced - first_save_gpr and last_save_gpr with the _slot variants. - (s390_register_info): Calculate first_save_gpr_slot and - last_save_gpr_slot using regs_ever_live. - -2005-11-09 Andreas Krebbel - - PR 24623 - * config/s390/s390.c (s390_regs_ever_clobbered): Only save live eh regs - for a function containing a landing pad. - -2005-11-09 Andreas Krebbel - - PR 24034 - * flow.c (mark_set_1): Handle CLOBBERs like SETs if the register - is live afterwards. - -2005-11-08 Bernd Schmidt - - * config/bfin/t-bfin-elf (MULTILIB_OPTIONS, MULTILIB_DEFAULTS, - MULTILIB_DIRNAMES, MULTILIB_EXCEPTIONS): New. - -2005-11-09 Nathan Sidwell - - Add ms2 support - * config/ms1/ms1.md (UNSPEC_BLOCKAGE, UNSPEC_EI, UNSPEC_DI): New - constants. - (call,load,store): New insn types. - (mem_access, branch_access): Adjust reservation conditions. - (define_delay): Adjust condition. - (decrement_and_branch_until_zero): Allow for ms2. Set branch - type. - (*decrement_and_rbanch_until_zero_no_clobber): Allow for ms2. - (*movqi_internal,*movsi_internal,*movsf_internal): Use load,store - insn type. - (call_internal, call_value_internal, return_internal, - return_interrupt_internal, eh_return_internal, indirect_jump, - tablejump): Set call insn type. - (blockage, ei, di): Use appropriate unspec const. - * config/ms1/ms1.c (ms1_flag_delayed_branch): New. - (ms1_get_attr_type): Adjust to give load & store types. - (ms1_final_prescan_insn): Adjust for new insn types. Don't look - backwards past a barrier. - (ms1_override_options): Accept ms2 arch. Copy and reset delayed - branch scheduling. - (struct branch_info, struct label_info): New. - (ms1_labels): New. - (ms1_add_branches, ms1_check_delay_slot, ms1_reorg_hazard): New. - (ms1_machine_reorg): New. - (TARGET_MACHINE_DEPENDENT_REORG): Override. - * config/ms1/crtn.asm: Add nop for ms2 JAL hazard. - * config/ms1/ms1.h (processor_type): Add PROCESSOR_MS2. - (ASM_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Add ms2. - (TARGET_MS2): New. - -2005-11-09 Per Bothner - Uros Bizjak - - PR c/24101 - * toplev.c (process_options): Initialize debug_hooks early - in case lang_hooks.post_options ends up calling a debug_hook. - -2005-11-08 Jakub Jelinek - - * dwarf2out.c (multiple_reg_loc_descriptor): Don't assume - DBX_REGISTER_NUMBER being contiguous. - -2005-11-08 James A. Morrison - Diego Novillo - - PR 23046 - * tree-vrp.c (register_edge_assert_for): Do not register - always-false predicates. - -2005-11-08 Devang Patel - - PR tree-optimization/23115 - * tree-if-conv.c (find_phi_replacement_condition): Check domninated_by - relation. - -2005-11-08 Joseph S. Myers - - * config/rs6000/t-fprules (MULTILIB_MATCHES_FLOAT): Include - -mcpu=440. - -2005-11-08 Daniel Berlin - - Fix PR tree-optimization/23382 - - * tree-ssa-alias.c (compute_may_aliases): Call - delete_old_heap_vars. - * tree-dfa.c (referenced_var_remove): New function. - * tree-ssa.c (delete_tree_ssa): Call delete_old_heap_vars. - * tree-flow.h (referenced_var_remove): Add prototype. - (delete_old_heap_vars): Ditto. - * tree-ssa-structalias.c (heapvars): New variable. - (oldheapvars): Ditto. - (get_constraint_for): Put heap vars on heapvars list. - (delete_old_heap_vars): New function. - -2005-11-08 Jason Merrill - - * tree.h (CALL_FROM_THUNK_P): Add CALL_EXPR_CHECK. - -2005-11-08 Uros Bizjak - - PR target/19340 - * reg-stack.c (reg_to_stack): Update register liveness also - for flag_sched2_use_traces. - -2005-11-08 Alan Modra - - PR target/23704 - * config/rs6000/rs6000.c (rs6000_handle_option ): Don't - override prior explicit -mno-powerpc-gfxopt. - -2005-11-07 Eric Botcazou - - * expmed.c (extract_bit_field): Do not use insv/extv/extzv patterns - if the bitsize is zero. - * doc/md.texi (Standard Pattern Names): Document it. - - * config/ia64/ia64.c (ia64_pass_by_reference): Delete. - (TARGET_PASS_BY_REFERENCE): Likewise. - -2005-11-07 Ian Lance Taylor - - PR rtl-optimization/24683 - * config/i386/i386.c (legitimize_pic_address): If constant operand - to PLUS is too large, put it in a register. - -2005-11-07 Jie Zhang - - * configure.ac: Enable checking assembler dwarf2 support for bfin - target. - * configure: Regenerate. - -2005-11-07 Paolo Bonzini - - PR target/24230 - - * config/rs6000/rs6000.c (easy_vector_splat_const, easy_vector_same, - gen_easy_vector_constant_add_self): Delete. - (vspltis_constant, easy_altivec_constant, gen_easy_altivec_constant): - New. - (output_vec_const_move): Use gen_easy_altivec_constant. - (rs6000_expand_vector_init): Do not emit a set of a VEC_DUPLICATE. - * config/rs6000/predicates.md (easy_vector_constant): Reorganize tests. - (easy_vector_constant_add_self): Rewritten. - * config/rs6000/rs6000-protos.h (easy_vector_splat_const, - easy_vector_same, gen_easy_vector_constant_add_self): Remove prototype. - (easy_altivec_constant, gen_easy_altivec_constant): Add prototype. - * config/rs6000/altivec.md (easy_vector_constant_add_self splitters): - Macroize and adjust for the other changes. - -2005-11-07 Paolo Bonzini - - PR c/24599 - - * c-typeck.c (build_c_cast): Try using a shared constant, and see - if TREE_OVERFLOW or TREE_CONSTANT_OVERFLOW really changed. - -2005-11-07 Jakub Jelinek - - PR rtl-optimization/23567 - * ifcvt.c (noce_mem_write_may_trap_or_fault_p): New function. - (noce_process_if_block): Don't do any optimizations except - if (cond) x = x; if !set_b and write into orig_x may trap - or fault. Remove the MEM_READONLY_P check. - -2005-11-06 Diego Novillo - - PR 24670 - * tree-vrp.c (fix_equivalence_set): New. - (extract_range_from_assert): Call it. - -2005-11-05 Ian Lance Taylor - - PR target/22432 - * combine.c (apply_distributive_law): Don't distribute across a - vector mode subreg. - -2005-11-05 Kazu Hirata - - * c-typeck.c, config/i386/netware.h, config/m32c/cond.md, - config/ms1/ms1.h, config/rs6000/predicates.md, - config/s390/s390.c, params.def, postreload-gcse.c, - tree-flow-inline.h, tree-ssa-operands.c, tree-vectorizer.c, - tree-vrp.c, tree.c: Fix comment typos. - * doc/invoke.texi: Fix typos. - -2005-11-05 Sebastian Pop - - * lambda-code.c (lambda_transform_legal_p): Use DDR_NUM_DIST_VECTS - for testing whether the data_dependence_relation contains distance - vectors. Iterate over all distance vectors of the ddr. - * lambda.h: Define a vec of lambda_vector pointers. - * tree-data-ref.c (dump_data_dependence_relation, - dump_data_dependence_direction): Iterate over all distance and - direction vectors of the ddr. - (initialize_data_dependence_relation): Initialize DDR_DIR_VECTS and - DDR_DIST_VECTS. - (build_classic_dist_vector, build_classic_dir_vector): Push a set - of distance/direction vectors instead of a single one. - * tree-data-ref.h (dir_vects, dist_vects): Replace dir/dist - lambda_vectors with a vec of lambda_vectors. - (DDR_DIR_VECT, DDR_DIST_VECT): Redefined as operations on vec. - (DDR_DIR_VECTS, DDR_DIST_VECTS, DDR_NUM_DIR_VECTS, - DDR_NUM_DIST_VECTS): New. - * tree-loop-linear.c (gather_interchange_stats): Test for the - existence of distance vectors only after having checked that there - is a dependence. Iterate over all distance vectors of the ddr. - (linear_transform_loops): Use dump_data_dependence_relation. - * tree-vect-analyze.c (vect_analyze_data_ref_dependence): Test for - distance vectors using DDR_NUM_DIST_VECTS. Iterate over all the - distance vectors of the ddr. - -2005-11-05 Bernd Schmidt - - * config/bfin/bfin.c (n_dregs_to_save, n_pregs_to_save, - expand_prologue_reg_save, expand_epilogue_reg_restore): New argument - IS_INTHANDLER; all callers changed. - (n_regs_saved_by_prologue): Take interrupt handler attributes into - account. - (do_link, do_unlink): New argument ALL; all callers changed. - (expand_interrupt_handler_prologue, expand_interrupt_handler_epilogue): - If function isn't leaf, save and restore all registers. - (bfin_function_ok_for_sibcall): Only true if not an interrupt or - exception handler. - -2005-11-05 Jan Hubicka - - PR rtl-optimization/23490 - * doc/invoke.texi (max-predicted-iterations, max-cse-insns, - max-flow-memory-location): Document. - * flow.c: Include params.h - (MAX_MEM_SET_LIST_LEN): Kill. - (add_to_mem_set_list): Use new param. - * cse.c (cse_basic_block): Replace 1000 by new param. - * params.def (PARAM_MAX_PREDICTED_ITERATIONS, PARAM_MAX_CSE_INSNS, - PARAM_MAX_FLOW_MEMORY_LOCATIONS): New. - * predict.c (predict_loops): Use new param. - * predict.def (MAX_PRED_LOOP_ITERATIONS): Remove. - - * ipa-inline.c (cgraph_decide_inlining_of_small_function, - cgraph_decide_inlining, cgraph_decide_inlining_incrementally): - Do not hold memory returned by cgraph_node_name across other call. - -2005-11-04 Hans-Peter Nilsson - - PR target/23424 - * config/cris/predicates.md ("cris_bdap_sign_extend_operand"): - Disable. - -2005-11-04 Jeff Law - - PR/21883 - * doc/invoke.texi: Document max-jump-thread-duplication-stmts PARAM. - * tree-ssa-dom.c: Include params.h. - (thread_across_edge): If there are too many statements in the - target block, then do not thread through it. - * Makefile.in (tree-ssa-dom.o): Depend on $(PARAMS_H). - * params.def (PARAM_MAX_JUMP_THREAD_DUPLICATION_STMTS): New PARAM. - -2005-11-03 Diego Novillo - - PR 24627 - * tree-ssa-dce.c (pass_dce, pass_dce_loop, pass_cd_dce): Use - TODO_update_ssa instead of TODO_update_ssa_no_phi. - -2005-11-04 Sebastian Pop - - PR/18595 - * tree-scalar-evolution.c (instantiate_parameters_1, - instantiate_parameters, resolve_mixers): Compute the size of an - expression to be instantiated and give up the instantiation if the - size exceeds PARAM_SCEV_MAX_EXPR_SIZE. - -2005-11-04 Richard Guenther - - * tree-flow.h (ref_contains_indirect_ref): Rename to - array_ref_contains_indirect_ref. - * tree-flow-inline.h (ref_contains_indirect_ref): Likewise. - (array_ref_contains_indirect_ref): Make comment match the code - and vice-versa. - (ref_contains_array_ref): Likewise. - * tree-ssa-structalias.c (find_func_aliases): Remove call to - ref_contains_indirect_ref. - * tree-ssa-loop-niter.c (infer_loop_bounds_from_undefined): - Rename calls to ref_contains_indirect_ref. - -2005-11-04 Paul Brook - - * config/arm/arm.c (arm_load_pic_register): Pass extra reg to - gen_pic_add_dot_plus_four and gen_pic_add_dot_plus_eight. - (arm_call_tls_get_addr, legitimize_tls_address): Likewise. - * config/arm/arm.md: Use match_operand in peephole input templates - and match_dup in peephole output templates. - -2005-11-04 Daniel Jacobowitz - - * config/arm/arm.c (arm_init_libfuncs): Use __aeabi_idiv and - __aeabi_uidiv. - -2005-11-04 Mark Mitchell - Daniel Jacobowitz - - * longlong.h (add_ssaaaa): Clobber condition code register - in ARM version. - (sub_ddmmss): Likewise. - (umul_ppmm): Likewise. - -2005-11-04 Daniel Jacobowitz - Paul Brook - Phil Blundell - - * configure.ac: Add test for ARM TLS support. - * configure: Regenerated. - * config/arm/arm-protos.h (legitimize_tls_address) - (arm_tls_referenced_p, tls_mentioned_p) - (arm_output_addr_const_extra): New prototypes. - (thumb_legitimize_pic_address): Delete. - * config/arm/arm.c: Include "gt-arm.h". - (enum tls_reloc): New. - (arm_cannot_copy_insn_p, arm_tls_symbol_p, load_tls_operand) - (pcrel_constant_p, get_tls_get_addr, arm_load_tp) - (arm_call_tls_get_addr, legitimize_tls_address) - (arm_tls_referenced_p, arm_tls_operand_p_1, tls_mentioned_p) - (arm_init_tls_builtins, arm_emit_tls_decoration) - (arm_output_addr_const_extra): New functions. - (TARGET_CANNOT_COPY_INSN_P, TARGET_CANNOT_FORCE_CONST_MEM) - (TARGET_HAVE_TLS): Define. - (target_thread_pointer): New. - (arm_override_options): Handle -mtp=. - (legitimize_pic_address): Ignore UNSPECs. - (arm_legitimate_address_p, thumb_legitimate_address_p): Handle PC - relative symbols. - (arm_legitimize_address, thumb_legitimize_address): Handle TLS. - (tls_get_addr_libfunc): New variable. - (symbol_mentioned_p, label_mentioned_p): Ignore UNSPEC_TLS. - (arm_init_builtins): Call arm_init_tls_builtins. - (arm_expand_builtin): Handle ARM_BUILTIN_THREAD_POINTER. - (arm_encode_section_info): Call default_encode_section_info. - * config/arm/arm.h (TARGET_HARD_TP, TARGET_SOFT_TP): Define. - (enum arm_tp_type): New. - (target_thread_pointer): Add declaration. - (LEGITIMATE_CONSTANT_P): Handle TLS. - (LEGITIMATE_PIC_OPERAND_P): Handle TLS. - (OUTPUT_ADDR_CONST_EXTRA): Call arm_output_addr_const_extra. - (enum arm_builtins): Add ARM_BUILTIN_THREAD_POINTER. - * config/arm/arm.md: Add UNSPEC_TLS. - (movsi): Handle TLS. - (pic_add_dot_plus_four, pic_add_dot_plus_eight): Allow for - non-PIC. - (tls_load_dot_plus_eight): New insn and a peephole to create it. - (load_tp_hard, load_tp_soft): New insns. - * arm.opt: Add -mtp=. - * doc/invoke.texi (ARM Options): Document -mtp. - -2005-11-04 Daniel Jacobowitz - - * config/arm/lib1funcs.asm: Don't include "libunwind.S". - * config/arm/libunwind.S: Include "lib1funcs.asm". - * config/arm/t-bpabi (LIB1ASMFUNCS): Remove _unwind. - (LIB2ADDEH): Add libunwind.S. - (LIB2ADDEHDEP): Add lib1funcs.asm. - * mklibgcc.in: Handle asm files in libgcc_eh.a. - -2005-11-04 Francois-Xavier Coudert - - PR fortran/18452 - * gcc/c.opt: Add a -lang-fortran option. - * gcc/c-opts.c: Add a lang_fortran flag. - (c_common_init_options): Handling the -lang-fortran option. - (c_common_handle_option): Add a case for Fortran options in - preprocessing. Remove cases for -ffixed-form and - -ffixed-line-length. Add a case for -lang-fortran. - -2005-11-03 David Edelsohn - - * config/rs6000/rs6000.c: Include params.h - (optimization_options): Set max-grow-copy-bb-insns default to 16. - (bdesc_2arg): Delete vpkuhss and vpkuwss. - * config/rs6000/altivec.md (UNSPEC_VPKUHSS): Delete. - (UNSPEC_VPKUWSS): Delete. - (altivec_vpkuhss): Delete. - (altivec_vpkuwss): Delete. - * config/rs6000/rs6000.md (plus_eqsi): Remove optimize_size from - final condition. - (neg_eq0): Remove final condition. - (neg_eq): Remove condition and split-condition. - -2005-11-04 Alan Modra - - * config/rs6000/rs6000.c (output_toc): Make "offset" HOST_WIDE_INT. - Use associated print macros. - -2005-11-03 Joseph S. Myers - - PR c++/17964 - * diagnostic.c (diagnostic_set_info_translated): New function. - (diagnostic_set_info): Use it. Add comment. - * diagnostic.h (diagnostic_set_info_translated): Declare. - -2005-11-03 Eric Botcazou - - * dwarf2asm.c (dw2_force_const_mem): Add new parameter 'public'. - On USE_LINKONCE_INDIRECT platforms, build a DECL_ONE_ONLY indirect - reference only if 'public' is true. - (dw2_output_indirect_constant_1): On USE_LINKONCE_INDIRECT platforms, - emit the .hidden directive only if the indirect reference is public. - (dw2_asm_output_encoded_addr_rtx): Add new parameter 'public'. - Pass it to dw2_force_const_mem. - * dwarf2asm.h (dw2_asm_output_encoded_addr_rtx): New param 'public'. - * dwarf2out.c (output_cfi): Adjust calls to above function. - (output_call_frame_info): Likewise. - * except.c (output_ttype): Pass TREE_PUBLIC of the type_info object - as 'public' argument to dw2_asm_output_encoded_addr_rtx. - -2005-11-03 Zdenek Dvorak - - PR tree-optimization/24483 - * tree-ssa-loop-ivopts.c (aff_combination_add_elt): Move rest - field to elts if possible. - -2005-11-03 Andrew Pinski - - PR middle-end/23155 - * gimplifier.c (gimplify_expr): Create a temporary for lvalue - CONSTRUCTOR. - -2005-11-03 Daniel Berlin - - Fix PR tree-optimization/24351 - - * tree-ssa-structalias.c (struct variable_info): Add - collapsed_into. - (get_varinfo_fc): New function to follow collapsing. - (new_var_info): Set collapsed_to to NULL. - (dump_constraint): Follow collapsing. - (build_constraint_graph): Handle collapsing. - (do_simple_structure_copy): Return false if something bad - happened. - (collapse_rest_of_var): New function. - (do_structure_copy): Collapse if do_simple_structure_copy returns - false. - -2005-11-03 Andrew Pinski - - PR middle-end/24589 - * gimplify.c (gimplify_expr) : Add the - expressions to a statement list instead of gimplifying them. - -2005-11-03 Eric Botcazou - - PR rtl-optimization/23585 - * rtlanal.c (rtx_addr_can_trap_p_1) : Return 0 for an address - that can't trap plus a constant integer, if the mode has zero size. - -2005-11-03 Ulrich Weigand - - PR target/24620 - * config/s390/s390.md ("*insv_reg_imm"): Accept any CONST_INT - as operand 2. - ("*insv_reg_extimm"): Likewise. - -2005-11-03 Joseph S. Myers - - PR c/24329 - * c-pretty-print.c (pp_c_type_specifier): Do not recurse if - c_common_type_for_mode returns an unnamed type. - -2005-11-02 Richard Henderson - - PR target/9350 - PR target/24374 - * dwarf2out.c (dwarf2out_reg_save_reg): New. - (dwarf2out_frame_debug_expr): Return after dwarf_handle_frame_unspec. - * function.c (assign_parms): Use calls.internal_arg_pointer. - (expand_main_function): Remove FORCE_PREFERRED_STACK_BOUNDARY_IN_MAIN - code. - * target-def.h (TARGET_INTERNAL_ARG_POINTER): New. - (TARGET_CALLS): Add it. - * target.h (struct gcc_target): Add calls.internal_arg_pointer. - * targhooks.c (default_internal_arg_pointer): New. - * targhooks.h (default_internal_arg_pointer): Declare. - * tree.h (dwarf2out_reg_save_reg): Declare. - * doc/tm.texi (FORCE_PREFERRED_STACK_BOUNDARY_IN_MAIN): Remove. - * config/i386/i386.c (dbx_register_map): Add return column. - (dbx64_register_map, svr4_dbx_register_map): Likewise. - (TARGET_INTERNAL_ARG_POINTER, ix86_internal_arg_pointer): New. - (TARGET_DWARF_HANDLE_FRAME_UNSPEC, ix86_dwarf_handle_frame_unspec): New. - (ix86_function_ok_for_sibcall): Disable if force_align_arg_pointer. - (ix86_save_reg): Save force_align_arg_pointer. - (ix86_emit_save_regs): Make regno unsigned. - (ix86_emit_save_regs_using_mov): Likewise. - (ix86_expand_prologue): Handle force_align_arg_pointer. - (ix86_expand_epilogue): Likewise. - * config/i386/i386.h: (dbx_register_map): Update. - (dbx64_register_map, svr4_dbx_register_map): Update. - (struct machine_function): Add force_align_arg_pointer. - * config/i386/i386.md (UNSPEC_REG_SAVE, UNSPEC_DEF_CFA): New. - (UNSPEC_TP, UNSPEC_TLS_GD, UNSPEC_TLS_LD_BASE): Renumber. - (TARGET_PUSH_MEMORY peepholes): Disable if RTX_FRAME_RELATED_P. - -2005-11-02 Jan Hubicka - - PR target/23303 - * i386.md: Add peep2 for simplyfing array accesses. - -2005-11-02 Ulrich Weigand - - PR target/24615 - * config/s390/s390-protos.h (s390_decompose_shift_count): Declare. - * config/s390/s390.c (s390_decompose_shift_count): New function. - (s390_extra_constraint_str) ['Y']: Use s390_decompose_shift_count. - (print_shift_count_operand): Use s390_decompose_shift_count. - * config/s390/predicates.md ("setmem_operand", "shift_count_operand"): - Use s390_decompose_shift_count. Do not accept any non-base hard regs. - -2005-11-02 Ulrich Weigand - - PR target/24600 - * loop.c (loop_givs_rescan): Use force_operand to expand - complex GIVs. - -2005-11-02 Andrew Pinski - - PR 22429 - * fold-const.c (build_range_check): Use unsigned when signed - overflow is undefined also. If etype is subtype, make sure that - the subtraction is in the supertype. - -2005-11-02 Richard Henderson - - PR target/24178 - * config/alpha/alpha.c (get_aligned_mem): Honor alignment given - by MEM_ALIGN. - -2005-11-01 Richard Henderson - - PR 21518 - * loop.c (scan_loop): Do not propagate computations to a hard - register destination with SMALL_REGISTER_CLASSES. - -2005-11-01 Joseph S. Myers - - * config/rs6000/rs6000.c (rs6000_rtx_costs): Do not add extra - costs for MULT inside PLUS or MINUS. - -2005-11-01 Bob Wilson - - * config/xtensa/xtensa.h (TRAMPOLINE_TEMPLATE): Add a byte of padding. - (TRAMPOLINE_SIZE): Round up to 60. - * config/xtensa/lib2funcs.S (TRAMPOLINE_SIZE): Likewise. - -2005-10-31 James E. Wilson - - PR debug/24444 - * dwarf2out.c (convert_cfa_to_loc_list): Put inside DWARF2_UNWIND_INFO - ifdef. Put ifdefs around call in gen_subprogram_die. - (compute_frame_pointer_to_cfa_displacement): Likewise. - (gen_subprogram_die): Restore old code for when DWARF2_UNWIND_INFO is - not defined. - - PR rtl-optimization/17356 - * cfgrtl.c (purge_dead_edges): Undo last change. In EDGE_EH code, - add check for CALL_INSN if EDGE_ABRNOMAL_CALL true. - -2005-10-31 Jan Hubicka - - PR middle-end/24093 - * cgraph.c (cgraph_clone_edge, cgraph_clone_node): Watch negative - - PR target/20928 - * i386.c (legitimize_pic_address): Deal with large immediates. - - PR profile/20815 - * coverage.c (coverage_checksum_string): Fix code to stip random seeds - from symbol names while computing checkup. - - PR profile/24487 - * predict.c (predict_loops): Do not estimate more than - MAX_PRED_LOOP_ITERATIONS in PRED_LOOP_ITERATIONS heuristic. - * predict.def (MAX_PRED_LOOP_ITERATIONS): Define. - -2005-10-31 Andrew MacLeod - - PR tree-optimization/19097 - * tree-ssa-operands.c (correct_use_link): Don't look for modified stmts. - -2005-10-31 J"orn Rennecke - - * optabs.c (expand_unop): Take TRULY_NOOP_TRUNCATION into account. - -2005-10-31 Andrew Pinski - - PR middle-end/23492 - * tree-inline.c (setup_one_parameter): If the init_stmt - is NULL, don't insert the statement. - -2005-10-30 Jan Hubicka - - PR tree-optimization/24172 - * tree-inline.c (copy_body_r): Unshare the substituted value first. - -2005-10-30 Hans-Peter Nilsson - - * config/mmix/mmix.c (mmix_intval): Correct handling of DFmode - constants for hosts with long != 32 bits. - -2005-10-28 Andreas Krebbel - - PR middle-end/24093 - * ipa-inline.c (craph_decide_recursive_inlining): Fix return value. - -2005-10-28 Aldy Hernandez - - * config/ms1/ms1.h (TARGET_MS1_64_001): New. - (TARGET_MS1_16_002): New. - (TARGET_MS1_16_003): New. - - * config/ms1/ms1.md ("decrement_and_branch_until_zero"): Rewrite. - ("*decrement_and_branch_until_zero_no_clobber"): New. - Add corresponding splitter for decrement_and_branch_until_zero - instruction. - Key all decrement_and_branch_until_zero patterns off of - TARGET_MS1_16_003. - -2005-10-28 Andrew Pinski - - PR middle-end/24362 - * tree-complex.c (extract_component): Treat RESULT_DECL - like the rest of the decls. - -2005-10-25 Eric Botcazou - - * config/ia64/ia64.c (ia64_output_function_profiler): Emit an - indirect call to _mcount if the function needs a static chain. - -2005-10-25 Eric Botcazou - Caroline Tice - - PR rtl-optimization/24460 - * dwarf2out.c (have_switched_text_sections): New boolean variable. - (dwarf2out_switch_text_section): Set it to true instead of - incrementing separate_line_info_table_in_use. - (output_loc_list): Additionally test have_switched_text_sections. - (output_ranges): Likewise. - (dwarf2out_finish): Likewise. - * varasm.c (assemble_start_function): Do not call - insert_section_boundary_note. - (assemble_end_function): If flag_reorder_blocks_and_partition, - switch to the function's section before emitting the .size directive. - * bb-reorder.c (insert_section_boundary_note): Staticify. - (rest_of_handle_reorder_blocks): Call insert_section_boundary_note. - * output.h (insert_section_boundary_note): Delete. - -2005-10-24 Andrew Pinski - - PR c/23103 - * c-format.c (check_format_types): Use lang_hooks.types_compatible_p - instead of pointer equality when comparing types. - -2005-10-24 James E. Wilson - - * sched-deps.c (flush_pending_lists): Pass 1 not 0 in first two - add_dependence_list_and_free calls. - -2005-10-24 Steven Bosscher - - * contrib.texi: Add the names of the LLNL folks who donated - Cray pointer support for gfortran. - -2005-10-24 Steven Bosscher - - PR tree-optimization/24225 - * profile.c (branch_prob): Look from end to start through a - basic block when looking for a locus. - -2005-10-24 Richard Henderson - - * pa.c (store_reg_modify): Set RTX_FRAME_RELATED_P on each set in - parallel. - (hppa_expand_prologue): Likewise. - -2005-10-24 John David Anglin - - * pa-linux.h (NO_PROFILE_COUNTERS): Delete define. - (NO_DEFERRED_PROFILE_COUNTERS): Define. - * pa.h (NO_PROFILE_COUNTERS): Define. - * pa.c (NO_DEFERRED_PROFILE_COUNTERS): Define if not defined. - (funcdef_nos): New vector to hold label numbers of deferred profile - counters. - (output_deferred_profile_counters): New function. - (hppa_profile_hook): Push label number onto funcdef_nos. - (pa_hpux_file_end): Call output_deferred_profile_counters if - NO_DEFERRED_PROFILE_COUNTERS is false. - - * pa-protos.h (get_deferred_plabel): New prototype. - * pa.c (get_plabel): Rename to get_deferred_plabel. Return plabel. - Make global. - (output_call): Adjust calls. - -2005-10-24 Alan Modra - - * config/rs6000/rs6000.c (rs6000_legitimize_tls_address): Explain - peculiarity of GOT/TOC section usage. - -2005-10-23 Andrew Pinski - - PR objc/24435 - * c-common.c (constant_string_class_name): Add documentation. - -2005-10-23 Kaz Kojima - - PR target/23832 - * recog.c (peephole2_optimize): Increment peep2_current_count - only when the slot is empty. - -2005-10-23 John David Anglin - - PR ada/23957 - * except.c (output_function_exception_table): Call - assemble_external_libcall if we need a personality function. - -2005-10-21 Eric Botcazou - - PR rtl-optimization/24460 - * bb-reorder.c (fix_crossing_unconditional_branches): Do not - set the basic block for barriers. - -2005-10-21 Janis Johnson - - * var-tracking.c (vt_initialize): Initialize post. - -2005-10-21 Devang Patel - - PR/24220 - * c-common.c (vector_types_convertible_p): Check vector element type. - -2005-10-21 Kaz Kojima - - * config/sh/sh.c (prepare_move_operands): Handle the address - constant which is a tls symbolic address plus a constant. - -2005-10-21 Andrew Pinski - - PR driver/24473 - * gcc.c (main): Use the correct counter for erroring out - about mulitple files. - -2005-10-21 Alan Modra - - PR target/24465 - * config/rs6000/rs6000.c (rs6000_legitimize_tls_address): Always - use r2 for 64-bit tls .got access. - -2005-10-21 Paolo Bonzini - - * dojump.c (do_jump): Handle side-effecting TRUTH_AND_EXPR and - TRUTH_OR_EXPR. - -2005-10-20 Steven Bosscher - - PR tree-optimization/24307 - * tree-cfg.c (tree_find_edge_insert_loc): Handle naked RETURN_EXPR. - -2005-10-20 Alexandre Oliva - - PR middle-end/24295 - * cgraphunit.c (cgraph_varpool_remove_unreferenced_decls): Mark - alias targets. - * varasm.c (find_decl_and_mark_needed): After cgraph global info - is ready, stop marking functions, but still mark variables. - -2005-10-20 Richard Guenther - - PR c++/24439 - * fold-const.c (invert_truthvalue): Handle COND_EXPR with - void type operands. - -2005-10-20 Eric Botcazou - - PR rtl-optimization/23585 - * rtlanal.c (rtx_addr_can_trap_p_1): New predicate extracted from... - (rtx_addr_can_trap_p): ... here. Invoke rtx_addr_can_trap_p_1. - (may_trap_p_1): New predicate extracted from... - (may_trap_p): ... here. Invoke may_trap_p_1. - (may_trap_or_fault_p): New predicate. - * rtl.h (may_trap_or_fault_p): Declare it. - * reorg.c (steal_delay_list_from_target): Use may_trap_or_fault_p - instead of may_trap_p. - (steal_delay_list_from_fallthrough): Likewise. - (fill_simple_delay_slots): Likewise. - (fill_slots_from_thread): Likewise. - * function.c (pad_to_arg_alignment): Rework comment about - SPARC_STACK_BOUNDARY_HACK. - * config/sparc/sparc.h: Likewise. - -2005-10-19 Adrian Straetling - - * config/s390/s390.c (s390_expand_insv): New. - * config/s390/s390-protos.h (s390_expand_insv): Declare. - * config/s390/s390.md ("UNSPEC_SETHIGH"): Rename to "UNSPEC_ICM". - ("icm_hi"): Remove mode attribute. - ("*sethigh"): Rewrite to "sethighpart". - Adjust all uses. - ("*extracthi", "*extractqi"): Remove. - (extv", "*extzv"): New. - ("insv", "*insv_mem_reg", "*insvdi_mem_reghigh", - "*insv_reg_imm", "*insv_reg_extimm"): New. - -2005-10-19 Ulrich Weigand - - * cfgexpand.c (discover_nonconstant_array_refs_r, - discover_nonconstant_array_refs): Move here from tree-outof-ssa.c - (tree_expand_cfg): Call discover_nonconstant_array_refs. - * tree-outof-ssa.c (rewrite_out_of_ssa): Remove call to - discover_nonconstant_array_refs. - -2005-10-19 Steven Bosscher - - PR c/23228 - * c-decl.c (pop_scope): Don't warn about an unused variable - if it is marked with TREE_NO_WARNING. - (duplicate_decls): Set TREE_NO_WARNING if olddecl and newdecl - somenow mismatch and olddecl is to be replaced. - -2005-10-19 Eric Botcazou - - PR middle-end/23199 - * cfgrtl.c (safe_insert_insn_on_edge): Use can_copy_p to detect - whether registers live on the edge can be saved/restored. - -2005-10-19 Kaz Kojima - - * config/sh/sh.c (fixup_mova): Skip notes. - -2005-10-19 Ulrich Weigand - - * config/s390/s390-protos.h (s390_hard_regno_rename_ok): Add prototype. - * config/s390/s390.c (s390_hard_regno_rename_ok): New function. - (s390_can_eliminate): Handle BASE_REGNUM elimination. - (s390_initial_elimination_offset): Likewise. - (s390_conditional_register_usage): BASE_REGNUM is no longer a fixed - register on TARGET_ZARCH targets. - * config/s390/s390.h (HARD_REGNO_RENAME_OK): Define - (INITIAL_FRAME_POINTER_OFFSET): Remove. - (REG_ALLOC_ORDER): Move BASE_REGNUM lower. - (ELIMINABLE_REGS): Add BASE_REGNUM elimination rule. - -2005-10-19 Andreas Krebbel - - * config/s390/s390.md: Comment describing output modifiers updated. - * config/s390/s390.c (print_operand): Likewise. - -2005-10-19 Andreas Krebbel - - * config/s390/s390.c (override_options): Added check for -mstack-size - 64k limitation. - * doc/invoke.texi: Mention that limit in the documenation. - -2005-10-18 Paolo Bonzini - - PR #19672 - * dojump.c (do_jump): Handle TRUTH_AND_EXPR and TRUTH_OR_EXPR here. - -2005-10-18 Daniel Berlin - - Fix PR tree-optimization/24231 - - * tree-ssa-pre.c (try_look_through_load): Skip abnormal phi names - (compute_avail): Ditto. - -2005-10-18 Richard Henderson - - PR target/24428 - * config/i386/i386.c (legitimate_constant_p): Check - SYMBOL_REF_TLS_MODEL directly. Don't fallthru to SYMBOL_REF - if LABEL_REF. - (legitimate_pic_operand_p): Test SYMBOL_REF_TLS_MODEL directly. - (legitimate_pic_address_disp_p): Reorg CONST checking to make - sure SYMBOL_REF_TLS_MODEL is tested. Test SYMBOL_REF_TLS_MODEL - directly. - (print_operand_address): Likewise. - * config/i386/predicates.md (x86_64_immediate_operand): Test - SYMBOL_REF_TLS_MODEL properly inside CONST. - (x86_64_zext_immediate_operand): Likewise. - (global_dynamic_symbolic_operand, local_dynamic_symbolic_operand, - initial_exec_symbolic_operand, local_exec_symbolic_operand): Remove. - * config/i386/i386-protos.h: Remove predicates.md entries. - -2005-10-18 Danny Smith - - * config/i386/winnt-cxx.c (i386_pe_adjust_class_at_definition): - Check that elements of TYPE_METHODS are FUNCTION_DECLs. - -2005-10-17 Alexey Starovoytov - Ian Lance Taylor - - PR middle-end/23522 - * fold-const.c (fold_widened_comparison): Do not allow range based - constant folding when right operand cannot be unwidened. - -2005-10-17 Richard Henderson - - * builtins.c (expand_builtin_synchronize): Build a new-style asm - with a memory clobber. - -2005-10-17 James E Wilson - - PR rtl-optimization/17356 - * cfgrtl.c (purge_dead_edges): Check for EDGE_ABNORMAL_CALL before - checking for EDGE_EH. - -2005-10-17 Eric Botcazou - - * config/sparc/sparc.c (function_arg_slotno): In 64-bit mode, align - the slot on an even boundary for any type with 16-byte alignment. - -2005-10-17 Hans-Peter Nilsson - - PR target/23424 - * md.texi (Modifiers) <%>: Clarify that % doesn't work - after register allocation. - -2005-10-17 DJ Delorie - - * config/m32c/m32c.c (m32c_pushm_popm): Don't mark epilogue insns - as frame related. - -2005-10-17 Nathan Sidwell - - PR c++/22551 - * c-common.c (c_add_case_label): Revert my 2005-10-14 clearing of - overflow flags. - -2005-10-17 Kaz Kojima - - * config/sh/sh.h (OPTIMIZATION_OPTIONS): Set flag_schedule_insns - to 2 if it's already non-zero. - (OVERRIDE_OPTIONS): Clear flag_schedule_insns if flag_exceptions - is set and warn about it if flag_schedule_insns is 1. - -2005-10-17 Paul Woegerer - - * config/crx/crx.md: Compare-and-branch instructions need to - invalidate CC. - -2005-10-17 Uros Bizjak - - PR target/24315 - * config/i386/i386.md (*pushdi2_rex64 splitter) - (*movdi_1_rex64 splitter, *ashldi3_1 splitter) - (*ashrdi3_1 splitter, *lshrdi3_1 splitter): Delay splitting after - flow2 pass only when (optimize > 0 && flag_peephole2). - -2005-10-16 Andrew Pinski - - PR driver/22544 - * gcc.c (have_c): New static variable. - (have_o): Likewise. - (process_command): Remove declation of have_c. - Set have_o to 1 when handling -o. - (main): Add a fatel error if there are multiple - files specified and -o and -c/-S is passed witout - -combine or multiple languages. - -2005-10-16 Daniel Berlin - - Fix PR tree-optimization/22444 - * tree-ssa-alias.c (compute_flow_insensitive_aliasing): - Assert that we don't hit something with subvars. - (setup_pointers_and_addressables): Don't add things with subvars, - because we'll already process the subvars for aliasing purposes. - -2005-10-16 Hans-Peter Nilsson - - PR target/23424 - * config/cris/cris.md ("*mov_side", "*mov_sidesisf") - ("*mov_side_mem", "*mov_sidesisf_mem", "*clear_side") - ("*ext_sideqihi", "*ext_sidesi", "*op_side") - ("*op_swap_side", "*extopqihi_side", "*extopsi_side") - ("*extopqihi_swap_side", "*extopsi_swap_side"): Have separate, - swapped, alternatives for the R constraint. - - PR middle-end/24341 - * builtins.c (get_builtin_sync_mode): Make unlimited - mode_for_size request. - -2005-10-15 Richard Henderson - - * gimplify.c (gimplify_var_or_parm_decl): Split out from ... - (gimplify_expr): ... here. - (gimplify_compound_lval): Use it in initial scan loop. Allow - fb_lvalue in base expression. - -2005-10-15 Richard Henderson - - PR 23714 - * builtins.c (expand_builtin_trap): Export. - * expr.h (expand_builtin_trap): Declare. - * expr.c (expand_assignment): Emit a trap for integral offsets - from registers that weren't reduced to bitpos. - - * tree-cfg.c (mark_array_ref_addressable_1): Remove. - (mark_array_ref_addressable): Remove. - * tree-flow.h (mark_array_ref_addressable): Remove. - * tree-optimize.c (execute_cleanup_cfg_post_optimizing): Don't call it. - -2005-10-15 James E Wilson - - PR target/24232 - * sched-deps.c (add_dependence_list): New arg UNCOND. Fix all callers. - (add_dependence_list_and_free): Likewise. - (sched_analyze_2, case MEM): Delete sched_insns_conditions_mutex_p - call. - -2005-10-15 Diego Novillo - - PR 23141 - PR 23142 - * tree-vrp.c (vrp_meet): Fix the intersection of equivalence - sets VR0->EQUIV and VR1->EQUIV when meeting a range and an - anti-range. - (vrp_visit_phi_node): Only prevent infinite iterations when - the previous result and the new result are both VR_RANGEs. - -2005-10-15 Ranjit Mathew - - * tree-into-ssa.c (mark_def_sites): Correct minor typo in - function comment. - -2005-10-14 Volker Reichelt - - PR c/23439 - * c-parser.c (c_parser_for_statement): Use location of RID_FOR - to initialize loc. - -2005-10-14 Per Bothner - - PR preprocessor/21250 - * c-ppoutput.c (print_line): Print internal line 0 as 1. - -2005-10-14 Nathan Sidwell - - PR c++/22551 - * c-common.c (c_add_case_label): Clear LOW_VALUE and HIGH_VALUE's - overflow flags. Refactor some conditionals. - -2005-10-13 Andrew Pinski - - PR tree-opt/21304 - * tree-dfa.c (add_referenced_var): Only look at decls which - have TREE_CONSTANT or TREE_READONLY set instead of if - !TREE_PUBLIC or !TREE_CONSTANT. - -2005-10-13 James E Wilson - - * doc/invoke.texi: For -x, add f95-cpp-input. - * doc/install.texi: For --enable-languages doc, change f95 to fortran. - -2005-10-12 Sebastian Pop - - PR tree-optimization/24262 - * tree-data-ref.c (analyze_offset_expr): Check that init is invariant - in loop all the time. - -2005-10-12 Richard Henderson - - PR c/24255 - * tree.h (DECL_TRANSPARENT_UNION): Remove. - * function.c (assign_parm_find_data_types): Don't support it. - * print-tree.c (print_node): Likewise. - * c-common.c (handle_transparent_union_attribute): Likewise. - Use build_duplicate_type. - * tree-inline.c (remap_type_1): Split out of remap_type; - properly remap aggregate fields. - (build_duplicate_type): New. - * doc/extend.texi (Variable Attributes): Remove documentation - for transparent_union. - -2005-10-12 Eric Botcazou - - PR target/24284 - * config/sparc/sparc.c (gen_stack_pointer_inc): Build by hand. - (gen_stack_pointer_dec): Likewise. - -2005-10-12 Danny Smith - - PR middle-end/21275 - PR middle-end/21766 - * target.h (struct gcc_target): Add valid_dllimport_attribute_p - target hook. - (struct cxx): Add adjust_class_at_definition target hook. - * target-def.h: (TARGET_VALID_DLLIMPORT_ATTRIBUTE_P): New define, - defaulting to hook_bool_tree_true. Add to TARGET_INITIALIZER - (TARGET_CXX_ADJUST_CLASS_AT_DEFINITION): New define, defaulting to - hook_void_tree. Add to TARGET_CXX. - * tree.h (struct decl_with_vis): Rename non_addr_const_p field to - dllimport_flag. - (DECL_NON_ADDR_CONSTANT_P): Replace with DECL_DLLIMPORT_P macro. - * tree.c (merge_dllimport_decl_attributes): Check DECL_DLLIMPORT_P - instead of attribute. Check for dllexport override. Warn if - inconsistent dll linkage. Don't lose old dllimport if decl has - had address referenced. Tweak lookup of dllimport atribute. - (handle_dll_attribute): Check targetm.valid_dllimport_attribute_p - for target specific rules. Don't add dllimport attribute if - DECL_DECLARED_INLINE_P. Set DECL_DLLIMPORT_P when adding - dllimport attribute. - (staticp): Replace DECL_NON_ADDR_CONSTANT_P with DECL_DLLIMPORT_P. - * varasm.c (initializer_constant_valid_p): Replace - DECL_NON_ADDR_CONSTANT_P with DECL_DLLIMPORT_P - - PR target/21801 - PR target/23589 - * config.gcc (i[34567]86-*-cygwin*): Add winnt-cxx.o to - 'cxx_target_objs', winnt-stubs,o to 'extra_objs'. - (i[34567]86-*-mingw32*): Likewise. - - * doc/tm.texi (TARGET_CXX_ADJUST_CLASS_AT_DEFINITION): Document. - (TARGET_VALID_DLLIMPORT_ATTRIBUTE_P): Document. - - * config/i386/winnt.c (i386_pe_dllimport_p): Factor out - C++-specific code. Change return value to bool. - (i386_pe_dllimport_p): Likewise. - (associated_type): Simplify and make language-independent - (i386_pe_encode_section_info): Replace override of ambiguous - dllimport symbol refs with a gcc_assert. - (i386_pe_valid_dllimport_attribute_p): Define. - * config/i386/winnt-cxx.c: New file. Define C++ versions of - i386_pe_type_dllimport_p, i386_pe_type_dllexport_p, - i386_pe_adjust_class_at_definition. - * config/i386/winnt-stubs.c: New file. Define stub versions of - lang-specific functions. - * config/i386/i386-protos.h: Declare winnt-[cxx|stubs].c functions - i386_pe_type_dllimport_p, i386_pe_type_dllexport_p, - i386_pe_adjust_class_at_definition. - (i386_pe_valid_dllimport_attribute_p): Declare. - * config/i386/cygming.h (TARGET_VALID_DLLIMPORT_ATTRIBUTE_P): Define. - (TARGET_CXX_ADJUST_CLASS_AT_DEFINITION): Define. - * config/i386/t-cygming: Add rules for winnt-cxx.o, winnt-stubs.o. - - PR target/19704 - * config/i386/i386.c (ix86_function_ok_for_sibcall): Replace test for - dllimport attribute with test of DECL_DLLIMPORT_P. - -2005-10-12 Adrian Straetling - - * combine.c (make_extraction): Correct offset computation. - -2005-10-12 Hans-Peter Nilsson - - * config/cris/t-linux (LIMITS_H_TEST): Define. - -2005-10-12 Richard Henderson - - PR rtl-opt/23324 - * cfgexpand.c (add_alias_set_conflicts): Use objects_must_conflict_p. - -2005-10-12 Richard Guenther - - * Makefile.in (CGRAPH_H): Depend on $(TREE_H). - -2005-10-12 Nathan Sidwell - - PR c++/19964 - * stor-layout.c (place_field): Set DECL_FIELD_OFFSET and - DECL_FIELD_BIT_OFFSET of FIELD_DECLs, even if they have an invalid - type. - -2005-10-12 Richard Guenther - - PR c++/23799 - * varasm.c (output_constant): Correct typo from previous - patch by DJ. - -2005-10-11 Ian Lance Taylor - - PR rtl-optimization/13931 - * combine.c: Revert patch of 2003-05-14, and: - (try_combine): Only set elim_i1 and elim_i2 if the destination is - completely killed in the appropriate insn. - (distribute_notes): Don't skip multiple hard register test for - elim_i1 and elim_i2. - -2005-10-11 Richard Henderson - - PR c/24255 - * c-typeck.c (convert_for_assignment): Use build_constructor_single - to initialize a transparent union instead of a nop_expr. - -2005-10-11 Richard Henderson - - * Makefile.in (tree-ssa-dce.o): Depend on SCEV_H. - * tree-ssa-dce.c: Include tree-scalar-evolution.h. - (tree_ssa_dce_loop): Call scev_reset. - - PR tree-opt/24300 - * Makefile.in (tree-ssa-dce.o): Depend on CFGLOOP_H. - * tree-ssa-dce.c: Include cfgloop.h. - (tree_ssa_dce_loop, pass_dce_loop): New. - * tree-pass.h (pass_dce_loop): Declare it. - * passes.c (init_optimization_passes): Use it. - -2005-10-11 Eric Botcazou - - PR middle-end/24263 - * convert.c (convert_to_real): Revert 2005-10-05 patch. - Only apply the optimization for rounding builtins if the inner - cast is also an extension. - -2005-10-11 Andrew Pinski - - PR tree-opt/23946 - * tree-ssa-ccp.c (execute_fold_all_builtins): Call - mark_new_vars_to_rename instead of update_stmt. - -2005-10-11 Bernd Schmidt - - * config/bfin/crti.s (__init, __fini): Renamed from _init, _fini. - -2005-10-11 Jakub Jelinek - - * config/i386/i386.md (movsi_1, movdi_1_rex64): Use mmxadd type - for setting MMX register to 0 rather than mmx. - -2005-10-10 Steve Ellcey - - PR target/12098 - * configure.ac: Move gas check from mips specific case to common case. - Do check for GNU as for mips*-*-* and *-*-hpux* targets. - * configure: Regenerate - * doc/install.texi: Update. - -2005-10-10 Eric Botcazou - - PR target/24284 - * config/sparc/sparc.c (sparc_expand_prologue): Remove bogus PATTERN. - -2005-10-10 Maciej W. Rozycki - - * gcc.c (do_spec_1): Accept numeric characters in file name - suffixes. - -2005-10-10 Nick Clifton - - * config/arm/arm.c: Remove extraneous whitespace. Remove comment - describing the deleted arm_gen_rotated_half_load function. - -2005-10-09 Kaz Kojima - - * config/sh/sh.c (emit_fpu_switch): Set TREE_PUBLIC for - __fpscr_values. - -2005-10-09 Daniel Jacobowitz - - * config.gcc (arm*-*-linux*): Remove redundant extra_parts and - gnu_ld assignments. - * config/arm/t-linux-eabi (LIB1ASMFUNCS) - (EXTRA_MULTILIB_PARTS): Define. - * config/arm/linux-elf.h (NO_IMPLICIT_EXTERN_C, CPLUSPLUS_CPP_SPEC) - (STARTFILE_SPEC, ENDFILE_SPEC, CC1_SPEC) - (LINK_GCC_C_SEQUENCE_SPEC, USE_LD_AS_NEEDED): Move to... - * config/arm/uclinux-elf.h (NO_IMPLICIT_EXTERN_C, CPLUSPLUS_CPP_SPEC) - (STARTFILE_SPEC, ENDFILE_SPEC, CC1_SPEC) - (LINK_GCC_C_SEQUENCE_SPEC, USE_LD_AS_NEEDED): ... here. - -2005-10-09 Zdenek Dvorak - - PR tree-optimization/24226 - * tree-cfg.c (remove_bb): Clean up unreachable loops. - * tree-flow.h (free_numbers_of_iterations_estimates_loop): Declare. - * tree-ssa-loop-niter.c (free_numbers_of_iterations_estimates_loop): - Export. - -2005-10-09 Eric Botcazou - - * config/sparc/gmon-sol2.c (internal_mcount): Mark as used. - -2005-10-08 Andrew Pinski - - PR target/24136 - * config/rs6000/darwin.md (movdf_low_si): Remove early clobber. - Rewrite for no need for the early clobber. - -2005-10-08 Kazu Hirata - - Merge from csl-arm-branch: - 2005-09-07 Paul Brook - * config/arm/linux-eabi.h (SUBTARGET_EXTRA_LINK_SPEC): Prepend a - space to string. - - 2005-04-30 Paul Brook - * config/arm/bpabi.h (TARGET_DEFAULT): Define. - * config/arm/linux-eabi.h (SUBTARGET_CPU_DEFAULT): Define. - - 2005-03-07 Daniel Jacobowitz - * config/arm/arm.c (arm_all_abis): Add aapcs-linux. - (arm_override_options): Use TARGET_AAPCS_BASED. - * config/arm/arm.h (enum arm_abi_type): Add ARM_ABI_AAPCS_LINUX. - (PTRDIFF_TYPE): Use int for AAPCS. - (DEFAULT_SHORT_ENUMS): Use false for aapcs-linux. - * config/arm/linux-eabi.h (ARM_DEFAULT_ABI, WCHAR_TYPE): Define. - (DEFAULT_SHORT_ENUMS): Delete. - * doc/invoke.texi (ARM Options): Document -mabi=aapcs-linux. - - 2004-12-15 Daniel Jacobowitz - * config/arm/arm.h (DEFAULT_SHORT_ENUMS): Wrap in #ifndef. - * config/arm/linux-eabi.h (DEFAULT_SHORT_ENUMS): Define to 0. - * config/arm/t-linux-eabi (TARGET_LIBGCC2_CFLAGS): Set to -fPIC. - - 2004-12-03 Mark Mitchell - * config/arm/linux-eabi.h (LIBGCC_SPEC): Do not define. - - 2004-11-22 Mark Mitchell - * config.gcc (arm*-*-linux-gnueabi): Use __cxa_atexit. - - 2004-11-19 Mark Mitchell - * config.gcc (arm*-*-linux-gnueabi): Add it. - * config/arm/bpabi.h (FPUTYPE_DEFAULT): Undefine it before - redefining it. - (TARGET_OS_CPP_BUILTINS): Likeiwse. - * config/arm/linux-eabi.h: New file. - * config/arm/linux-elf.h (LINUX_TARGET_INTERPRETER): New macro. - (LINUX_TARET_LINK_SPEC): Likewise. - (LINK_SPEC): Use it. - * config/arm/t-linux-eabi: New file. - -2005-10-08 Steven Bosscher - - PR other/22202 - * params.def (PARAM_MAX_VARIABLE_EXPANSIONS): Remove superfluous - spaces. - (PARAM_SMS_DFA_HISTORY): Likewise. - -2005-10-08 Kazu Hirata - - PR middle-end/23150 - * calls.c (mem_overlaps_already_clobbered_arg_p): New. - (load_register_parameters): Call it. - (check_sibcall_argument_overlap_1): Likewise. - (store_one_arg): Likewise. - -2005-10-07 James E. Wilson - - * config/ia64/vect.md (ashl3, ashr3, lshr3): Use - DImode not VECINT24 for operand 2. - - PR target/23644 - * doc/invoke.texi (IA-64 Options, item -mtune): Renamed from - -mtune-arch. - - PR target/24193 - * config/ia64/ia64.md (movbi, movti_internal, gr_spill_internal, - fr_spill): Use destination_operand for operand 0. - -2005-10-07 DJ Delorie - - * varasm.c (output_constant): Limit error to expanding - conversions. - -2005-10-07 Richard Guenther - - PR middle-end/24227 - * fold-const.c (fold_binary): Fix operand types during folding - of X op (A, Y). Evaluation order of the side-effects of - X and A are frontend-defined, so ensure we honour that even for - tcc_comparison class operands; eased by removing duplicate code. - -2005-10-07 Steve Ellcey - - * stor-layout.c (layout_type): Do not allow alignment of array - elements to be greater than their size. - -2005-10-07 Steve Ellcey - - * config.host (hppa*-*-hpux*): Change out_host_hook_obj and - host_xmake_file. - (hppa*-*-linux*): Ditto. - (ia64-*-hpux*): Add out_host_hook_obj and host_xmake_file. - * config/host-hpux.c: New. - * config/x-hpux: New. - * config/pa/x-hpux: Remove. - * config/pa/x-linux: Remove. - * config/pa/pa-host.c: Remove. - -2005-10-07 Jeff Law - - * tree-ssa-dom.c (dom_opt_finalize_block): Fix conditions to - determine whether or not to try and thread outgoing edges. - -2005-10-07 David Edelsohn - - * config/rs6000/rs6000.md (eqsi_power): New. - (neg_eq0si): Add TARGET_POWER to final condition. - (neg_eqsi): Same. - -2005-10-06 Richard Henderson - - * config/rs6000/rs6000.c: Revert last change. - -2005-10-06 Richard Henderson - - * config/rs6000/rs6000.c (rs6000_cannot_force_const_mem): New. - (TARGET_CANNOT_FORCE_CONST_MEM): Use it. - -2005-10-06 Andrew Pinski - - PR middle-end/22216 - PR middle-end/23651 - * cfgexpand.c (tree_expand_cfg): After expanding the functions, clear - out return_label and naked_return_label. - -2005-10-06 Daniel Berlin - - * tree-ssa-structalias.c (check_for_overlaps): Fix bug in last - change. - -2005-10-06 Richard Henderson - - PR tree-opt/22237 - * tree-inline.c (declare_return_variable): Handle modify_dest not - being a DECL. - -2005-10-06 Daniel Berlin - - Fix PR tree-optimization/22488 - * tree-ssa-structalias.c (check_for_overlaps): New function. - (create_variable_info_for): Use it. - -2005-10-06 Richard Henderson - - PR debug/24070 - * dwarf2out.c (lookup_filename): Return the result of maybe_emit_file. - (dwarf2out_start_source_file): Print it. - -2005-10-06 Geoffrey Keating - - * config/t-slibgcc-darwin (SHLIB_MAPFILES): Use '+='. - -2005-10-06 Richard Henderson - - PR 23706 - * mode-switching.c (optimize_mode_switching): Clear transp bit - for block with incomming abnormal edges. - - * config/sh/sh.c (fpscr_values, emit_fpu_switch): New. - (fpscr_set_from_mem): Use them. - * config/sh/sh.md (fpu_switch0, fpu_switch1): Remove. - (fpscr postinc splitters): Rewrite as peephole2+split. - -2005-10-06 David Edelsohn - - * config/rs6000/rs6000.md (eq): Add !TARGET_POWER. - (eq_compare): Same. - -2005-10-06 Richard Guenther - - PR tree-optimization/24238 - * tree-ssa-alias.c (find_used_portions): Handle RESULT_DECL. - -2005-10-06 Daniel Jacobowitz - - * acinclude.m4 (gcc_AC_CHECK_TOOL): Handle environment variables - here. Use AC_PATH_PROG for environment variables instead of - test -x. - * configure.ac: Update calls to gcc_AC_CHECK_TOOL. Use it for - objdump also. - * configure: Regenerated. - -2005-10-06 Richard Earnshaw - - PR target/23783 - * arm.md (call): If the address isn't a SYMBOL_REF or a register, - then force it into a register. - (call_value): Likewise. - -2005-10-06 Richard Henderson - - PR 24049 - * passes.c (init_optimization_passes): Move pass_lower_vector_ssa - under pass_vectorize. Clear TODO_ggc_collect from the dce pass - under pass_vectorize. - -2005-10-05 Devang Patel - - PR Debug/23205 - * dbxout.c (dbxout_symbol): Check DECL_RTL_SET_P, after - handling constants. Check NAMESPACE_DECL context for constants. - -2005-10-05 Eric Christopher - - * doc/md.texi (Standard Names): Fix name of pushm1 pattern. - -2005-10-05 Richard Henderson - - PR 23714 - * tree-cfg.c (mark_array_ref_addressable_1): New. - (mark_array_ref_addressable): New. - * tree-flow.h (mark_array_ref_addressable): Declare. - * tree-optimize.c (execute_cleanup_cfg_post_optimizing): Use it. - -2005-10-05 Andrew Pinski - - PR middle-end/20606 - PR middle-end/24069 - * reload.c (subst_reloads): When adding a REG_LABEL to a - jump instruction, also update JUMP_LABEL. - -2005-10-05 David Edelsohn - - * params.def (PARAM_MAX_GROW_COPY_BB_INSNS): New. - * bb-reorder.c (copy_bb_p): Use it. - * doc/invoke.texi (param table): Add max-grow-copy-bb-insn. - -2005-10-05 Richard Henderson - - PR target/23602 - * toplev.c (process_options): Warn about unsupported combinations - of unwind tables and omit-frame-pointer. - * config/i386/i386.c (override_options): Similarly. Enable - accumulate-outgoing-args if not explicitly disabled. - -2005-10-05 Steve Ellcey - - * vect.md (vec_initv2si): Fix typo of V2SF to V2SI. - Handle big endian vs. small endian. - (vec_initv2sf): Handle big endian vs. small endian. - (*vec_extractv2sf_1): Ditto. - -2005-10-05 Dale Johannesen - - * convert.c (convert_to_real): Don't convert - (float)floor(double d) to floorf((float)d). - -2005-10-05 Daniel Jacobowitz - - * config/arm/arm.md (insv): Use gen_int_mode in more places. - -2005-10-05 Andrew MacLeod - - PR tree-optimization/18587 - * tree-ssa-operands.c (struct opbuild_list_d, OPBUILD_LAST): Delete. - (build_defs, build_uses, build_v_may_defs, build_v_must_defs, - build_vuses): Change to VEC type. - (opbuild_initialize_virtual, opbuild_initialize_real, opbuild_free, - opbuild_num_elems, opbuild_append_real, opbuild_append_virtual, - opbuild_first, opbuild_next, opbuild_elem_real, opbuild_elem_virtual, - opbuild_elem_uid, opbuild_clear, opbuild_remove_elem): Delete. - (get_name_decl): New. Return DECL_UID of base variable. - (operand_build_cmp): New. qsort comparison routine. - (operand_build_sort_virtual): New. Sort virtual build vector. - (init_ssa_operands, fini_ssa_operands): Use VEC routines. - (FINALIZE_OPBUILD_BASE, FINALIZE_OPBUILD_ELEM): Use VEC_Index. - (FINALIZE_BASE): Use get_name_decl. - (finalize_ssa_defs, finalize_ssa_uses, cleanup_v_may_defs, - finalize_ssa_v_may_defs, finalize_ssa_vuses, finalize_ssa_v_must_defs, - (start_ssa_stmt_operands, append_def, append_use, append_vuse, - append_v_may_def, append_v_must_def): Replace opbuild_* routines with - direct VEC_* manipulations. - (build_ssa_operands): Call operand_build_sort_virtual. - (copy_virtual_operand, create_ssa_artficial_load_stmt, - add_call_clobber_ops, add_call_read_ops): Replace opbuild_* routines - with direct VEC_* manipulations. - * tree-ssa-opfinalize.h (FINALIZE_FUNC): Replace opbuild_* routines - with direct VEC manipulations. - -2005-10-05 Paolo Bonzini - - PR tree-optimization/21419 - PR tree-optimization/24146 - PR tree-optimization/24151 - - * c-typeck.c (readonly_error): Handle USE being lv_asm. - (build_asm_expr): Call it if outputs are read-only. - * gimplify.c (gimplify_asm_expr): Remove former fix to PR 21419. - -2005-10-05 Billy Biggs - Paolo Bonzini - - PR target/23809 - - * doc/extend.texi (x86 Built-ins): Document that -msse and friends - enable the instructions and not just the built-ins. - * doc/invoke.texi (x86 Options): Likewise. - -2005-10-04 Geoffrey Keating - - * config/i386/t-darwin (SHLIB_VERPFX): Fix typo. - - * doc/invoke.texi (Option Summary): Correct spelling - of -mmacosx-version-min. - -2005-10-04 Devang Patel - - * c-common.c (vector_types_convertible_p): Check TYPE_PRECISION for - real types. - -2005-10-04 Steve Ellcey - - * tree-vect-transform.c (vect_create_epilog_for_reduction): - Use BYTES_BIG_ENDIAN instead of BITS_BIG_ENDIAN. - -2005-10-04 Adrian Straetling - - * config/s390/s390.md ("TDSI","DP"): New mode macros. - ("TE","tg"): New mode attributes. - ("sync_compare_and_swap"): Replace with a define_expand. - ("sync_compare_and_swap_cc"): Replace GPR with TDSI. - ("*sync_compare_and_swap_cc"): Replace with one pattern for - dword_mode and one for GPRmode. - -2005-10-04 Ian Lance Taylor - - PR preprocessor/13726 - * c-ppoutput.c (cb_include): Add comments parameter, and print out - any comments passed in. - -2005-10-04 Andrew Pinski - - * tree.c (annotate_with_file_line): Fix typo. - -2005-10-04 Ulrich Weigand - - PR ada/19382 - * builtins.c (fold_builtin_memcmp): When constructing the pointer - type used to access data in the inlined length == 1 case, use - build_pointer_type_for_mode with CAN_ALIAS_ALL set to true. - (fold_builtin_strcmp, fold_builtin_strncmp): Likewise. - -2005-10-04 Uros Bizjak - - * config/i386/i386.h (TARGET_FISTTP): Enable also for - TARGET_SSE3 and only for TARGET_80387. - * config/i386/i386.md (fix_trunc_fisttp_i387_1, - (fix_trunc_i387_fisttp, fix_trunc_i387_fisttp_with_temp): - Do not depend on TARGET_80387. - -2005-10-04 Andrew Pinski - - * tree.c (last_annotated_node): Change type to location_t*. - (annotate_with_file_line): Reflect the change of - last_annotated_node type. - -2005-10-04 Richard Guenther - - PR c/23576 - * c-decl.c (grokdeclarator): Don't write to fields - of error_mark_node. - -2005-10-04 Andrew Pinski - - PR middle-end/23125 - * c-decl.c (finish_decl): Use set_user_assembler_name even for - register variables. - * varasm.c (make_decl_rtl): If a register variable does not - have a set user assmbler name, error out. - Decode the asmspec is now name+1 bypassing '*'. - -2005-10-04 Steven Bosscher - - PR tree-optimization/23049 - * tree-ssa-dom.c (thread_across_edge): Make sure that the condition - of a COND_EXPR is folded before calling fold on the whole rhs of a - conditional assignment. - * doc/tree-ssa.texi: Update the GIMPLE grammar for a valid rhs to - document that a COND_EXPR may appear there. - -2005-10-03 Diego Novillo - - PR 23445 - * tree-vrp.c (extract_range_from_assert): If the new numeric - range created out of the assertion contradicts the existing - numeric range of the ASSERT_EXPR variable, make the new range - varying. - -2005-10-03 Kaz Kojima - - * config/sh/sh.c (sh_register_move_cost): Add case for moving - from T_REGS to FP register class. - -2005-10-03 Richard Henderson - - PR 24135 - * tree-nested.c (convert_nl_goto_reference): Lookup a translation - before creating a new one. - -2005-10-03 David Edelsohn - - * config/rs6000/t-aix43 (LDFLAGS): New. - * config/rs6000/t-aix52 (LDFLAGS): New. - -2005-10-03 Ian Lance Taylor - - * gimplify.c (find_single_pointer_decl_1): New static function. - (find_single_pointer_decl): New static function. - (internal_get_tmp_var): For a formal variable, set restrict base - information if appropriate. - * alias.c (find_base_decl): If a VAR_DECL has a restrict base, - return it. - * tree.h (DECL_BASED_ON_RESTRICT_P): Define. - (DECL_GET_RESTRICT_BASE): Define. - (SET_DECL_RESTRICT_BASE): Define. - (decl_restrict_base_lookup): Declare. - (decl_restrict_base_insert): Declare. - (struct tree_decl_with_vis): Add based_on_restrict_p field. - * tree.c (restrict_base_for_decl): New static variable. - (init_ttree): Initialize restrict_base_for_decl. - (copy_node_stat): Copy restrict base information. - (decl_restrict_base_lookup): New function. - (decl_restrict_base_insert): New function. - (print_restrict_base_statistics): New static function. - (dump_tree_statistics): Call print_restrict_base_statistics. - -2005-10-02 Diego Novillo - - PR 24142 - * tree-vrp.c (vrp_meet): Fix call to range_includes_zero_p in - case of anti-ranges. - -2005-10-02 Andrew Pinski - - PR c/18851 - * c-typeck.c (tagged_tu_seen): Rename to ... - (tagged_tu_seen_cache): this and add val field. - (comptypes): Move functional to comptypes_internal - and free tagged_tu_seen. - (comptypes_internal): New function and call comptypes_internal - instead of comptypes. Speed up by sibcalling - tagged_types_tu_compatible_p. - (alloc_tagged_tu_seen): New function - (free_all_tagged_tu_seen_up_to): New function. - (tagged_types_tu_compatible_p): Return the val of the seen two - types. - Add that the two types are the same to tagged_tu_seen_base - if they are and call comptypes_internal instead of comptypes. - : Speed up common type where the fields are - in the same order. - (function_types_compatible_p): Call comptypes_internal instead of - comptypes. - (type_lists_compatible_p): Likewise. - (all functions): s/tagged_tu_seen/tagged_tu_seen_cache/. - -2005-10-02 Matthias Klose - - * doc/invoke.texi: Fix typo and speling error. - -2005-10-01 Richard Henderson - - * tree-stdarg.c (execute_optimize_stdarg): Process PHI nodes too. - -2005-10-01 Mark Mitchell - - * config/arm/unknown-elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define - using --start-group and --end-group. - -2005-10-01 Diego Novillo - - * tree-vrp.c (value_inside_range, range_includes_zero_p): Add - FIXME note regarding quirky semantics. - -2005-10-01 Diego Novillo - - PR 24141 - * tree-vrp.c (vrp_meet): Clear VR0->EQUIV when building a - non-null range as a last resort. - -2005-10-01 James A. Morrison - Diego Novillo - - PR 23604 - * tree-vrp.c (extract_range_from_assert): For != - assertions, only build an anti-range if LIMIT is a - single-valued range. - -2005-09-30 Richard Earnshaw - - * arm.md (movqi): On thumb when optimizing, handle loading from - memory by describing this as taking a subreg of a zero-extended load - into an SImode register. - (movhi): Likewise. - -2005-09-30 Daniel Jacobowitz - - * reload1.c (merge_assigned_reloads): Do not change any - RELOAD_FOR_OUTPUT_ADDRESS reloads. - -2005-09-30 Geoffrey Keating - - * Makefile.in (LIPO_FOR_TARGET): Define. - (STRIP_FOR_TARGET): Define. - - * config/t-slibgcc-darwin (libgcc_s_%.dylib): Remove old symlinks - before creating new ones. Do symlinks before creating the actual - targets. - - * config/t-slibgcc-darwin (libgcc_s_%.dylib): Use --print-multi-lib - to work out which multilibs are actually being built. - -2005-09-30 Kazu Hirata - - * tree-vect-transform.c, config/ms1/ms1.md, - config/s390/s390.c, config/v850/v850.md: Fix comment typos. - Follow spelling conventions. - * doc/invoke.texi, doc/md.texi: Fix typos. - -2005-09-30 Andrew Macleod - - PR tree-optimization/21430 - * tree-ssa-operands.c (set_virtual_use_link): New. Link new virtual - use operands, and set stmt pointer if need be. - (FINALIZE_CORRECT_USE: New. Macro to call appropriate use fixup routine. - tree-ssa-opfinalize.h (FINALIZE_FUNC): Call FINALIZE_CORRECT_USE if - present. - -2005-09-29 Richard Kenner - - PR middle-end/24053 - * stor-layout.c (set_sizetype): Set TYPE_MAIN_VARIANT of bitsizetype. - -2005-09-29 Mark Mitchell - - * optabs.c (expand_binop): Initialize first_pass_p. - -2005-09-29 Jakub Jelinek - - PR middle-end/24109 - * c-decl.c (c_write_global_declarations_1): If any - wrapup_global_declaration_2 call returned true, restart the loop. - -2005-09-29 Daniel Berlin - - Fix PR tree-optimization/24117 - * tree-ssa-structalias.c (find_func_aliases): Strip nops - before considering whether to use anyoffset. - -2005-09-29 Paolo Bonzini - - Revert this patch: - - 2005-09-15 Paolo Bonzini - - * optabs.c (expand_binop): Use swap_commutative_operands_with_target - to order operands. - (swap_commutative_operands_with_target): New. - -2005-09-29 Paolo Bonzini - - PR c/21419 - * gimplify.c (gimplify_asm_expr): Raise an error if an output is - read-only. - -2005-09-29 Steven Bosscher - - PR tree-optimization/23911 - * tree-ssa-ccp.c (fold_const_aggregate_ref): Handle REALPART_EXPR - and IMAGPART_EXPR too. - -2005-09-28 Mark Mitchell - - PR 17886 - * expmed.c (expand_shift): Move logic to reverse rotation - direction when rotating by constants ... - * optabs.c (expand_binop): ... here. - * config/i386/i386.md (rotrdi3): Handle 32-bit mode. - (ix86_rotrdi3): New pattern. - (rotldi3): Handle 32-bit mode. - (ix86_rotldi3): New pattern. - -2005-09-29 Alan Modra - - PR target/24102 - * config/rs6000/rs6000.md (floatdisf2_internal2): Correct range - check for numbers that need no bit twiddle. - -2005-09-28 Geoffrey Keating - - * config/rs6000/t-darwin8: Uncomment contents, allow -m64 - multilib to be built. - - * Makefile.in: Export LIPO_FOR_TARGET, STRIP_FOR_TARGET. - (stage1-start): Delete old libgcc and libunwind before moving - anything into the stage directory. - (stage2-start): Likewise. - (stage3-start): Likewise. - (stage4-start): Likewise. - (stageprofile-start): Likewise. - (stagefeedback-start): Likewise. - * config.gcc (*-*-darwin*): Automatically use CPU-specific darwin.h - header in tm_file and CPU-specific t-darwin in tmake_file. - (i[34567]86-*-darwin*): Don't change tm_file. - (powerpc-*-darwin*): Don't change tm_file or tmake_file. - * config/darwin.h (REAL_LIBGCC_SPEC): Rewrite to use proper libgcc - shared library stub for target OS version. - * config/t-slibgcc-darwin (SHLIB_SOLINK): Delete. - (SHLIB_LINK): Don't make SHLIB_SOLINK. - (SHLIB_INSTALL): Don't install SHLIB_SOLINK. - (libgcc_s.%.dylib): New. - (LIBGCC): Define. - (install-darwin-libgcc-stubs): New. - (INSTALL_LIBGCC): New append. - * config/i386/darwin-libgcc.10.4.ver: New. - * config/i386/darwin-libgcc.10.5.ver: New. - * config/i386/t-darwin: New. - * config/rs6000/darwin-libgcc.10.4.ver: New. - * config/rs6000/darwin-libgcc.10.5.ver: New. - * config/rs6000/darwin.h (REAL_LIBGCC_SPEC): Delete. - * config/rs6000/t-darwin (SHLIB_VERPFX): Define. - -2005-09-28 Paul Brook - - * config/m68k/fpgnulib.c (__extendsfdf2, __truncdfsf2): Handle - denormals. - -2005-09-28 Richard Guenther - - PR tree-optimization/23853 - * tree-vect-analyze.c (vect_compute_data_ref_alignment): Use - host_integerp to verify misalignment value. - -2005-09-28 Richard Henderson - - * builtins.c (get_builtin_sync_mode): New. - (expand_builtin_sync_operation): Pass in mode argument. - (expand_builtin_compare_and_swap): Likewise. - (expand_builtin_lock_test_and_set): Likewise. - (expand_builtin_lock_release): Likewise. - (expand_builtin): Update to match. - -2005-09-28 Nick Clifton - - * config/v850/v850.h (GO_IF_LEGITIMATE_ADDRESS): Tidy up - formatting. Add check to PLUS case to ensure that the offset is - within an acceptable range. - - * config/v850/v850.md (casesi): Disable the generation of the - switch pattern as it is not being handled properly at the moment. - - * config/v850/lib1funcs.asm (___ucmpdi2): Correct jump instruction - for when the high words are identical. - -2005-09-27 Richard Henderson - - * pretty-print.c (pp_base_format): Fix typo for %>. - -2005-09-27 Daniel Berlin - Devang Patel - - PR tree-optimization/23625 - * tree-flow-inline.h (bsi_after_labels): Remove, first statement is - LABEL_EXPR, assertion check. - -2005-09-27 J"orn Rennecke - - * optabs.c (no_conflict_move_test): Check if a result of a - to-be-moved insn would be clobbered by an originally - preceding insn. - -2005-09-27 Jeff Law - - * passes.c (init_optimization_passes): Replace copy propagation - passes immediately after DOM with phi-only copy propagation - pases. Add phi-only copy propagation pass after first DOM pass. - * tree-pass.h (pass_phi_only_copy_prop): Declare. - * tree-ssa-copy.c (init_copy_prop): Accept new PHI_ONLY argument. - If true, then mark all non-control statements with DONT_SIMULATE_AGAIN. - (execute_copy_prop): Accept new PHI_ONLY argument. Pass it along - to init_copy_prop. Callers updated. - (do_phi_only_copy_prop): New function. - (pass_phi_only_copy_prop): New pass descriptor. - -2005-09-27 Nick Clifton - - * libgcc2.c (__popcount_tab): Remove redundant prototype. - -2005-09-26 Jason Merrill - - PR c++/13764 - * c-common.c (finish_fname_decls): Use append_to_statement_list_force. - - * doc/invoke.texi: Clarify documentation of -fno-enforce-eh-specs. - -2005-09-26 James E Wilson - - * config/ia64/crtbegin.asm, config/ia64/crtend.asm: Remove glibc - copyright. Add gcc copyright plus libgcc exception. - * config/ia64/crtfastmath.asm: Remove glibc copyright. Add gcc - copyright. - * config/ia64/lib1funcs.asm: Add gcc copyright plus libgcc exception. - -2005-09-26 Jeff Law - - * tree-ssa-dom.c (tree_ssa_dominator_optimize): Be more selective - about when to iterate. - -2005-09-23 Fariborz Jahanian - - PR target/23847 - * config/rs6000/rs6000.c (rs6000_function_value): Parallel pattern - for __complex__ double in -mcpu=G5 mode. - -2005-09-26 Sebastian Pop - - PR tree-optimization/23942 - * Makefile.in (SCEV_H): Depends on PARAMS_H. - * tree-scalar-evolution.c: Include params.h. - (t_bool): New enum. - (follow_ssa_edge, follow_ssa_edge_in_rhs, - follow_ssa_edge_in_condition_phi_branch, - follow_ssa_edge_in_condition_phi, follow_ssa_edge_inner_loop_phi): - Change return type to t_bool. Use a parameter to limit the size of - trees that are walked before stopping - (analyze_evolution_in_loop): Initialize the limit to 0. - (follow_ssa_edge): Give up by returning t_dont_know if the limit - exceeds PARAM_SCEV_MAX_EXPR_SIZE. - -2005-09-26 Uros Bizjak - - PR middle-end/23831 - * simplify-rtx.c (simplify_immed_subreg) [MODE_INT]: Skip - simplification if elem_bitsize > 2 * HOST_BITS_PER_WIDE_INT. - -2005-09-26 Fariborz Jahanian - - * combine.c (make_extraction): Check for valid use of subreg. - -2005-09-26 Uros Bizjak - - PR target/24055 - * config/i386/i386.md ("*fistdi2_1"): New pattern. - ("*fist2_1"): Use only HImode and SImode register operands. - ("fist2_with_temp"): Use only register operands. - -2005-09-26 J"orn Rennecke - - * rtlanal.c (reg_used_between_p): Don't check for CLOBBERs in - CALL_INSN_FUNCTION_USAGE. - -2005-09-26 Richard Guenther - - PR middle-end/15855 - * gcse.c: Include hashtab.h, define ldst entry hashtable. - (pre_ldst_expr_hash, pre_ldst_expr_eq): New functions. - (ldst_entry): Use the hashtable instead of list-walking. - (find_rtx_in_ldst): Likewise. - (free_ldst_entry): Free the hashtable. - (compute_ld_motion_mems): Create the hashtable. - (trim_ld_motion_mems): Remove entry from hashtable if - removing it from list. - (compute_store_table): Likewise^2. - (store_motion): Free hashtable in case we did not see - any stores. - -2005-09-25 Kazu Hirata - - * fold-const.c (fold_binary): Use op0 and op1 instead of arg0 - and arg1 if we are passing them to fold_build2. - -2005-09-25 Dan Nicolaescu - - PR 23828 - * config/i386/i386.c (ix86_function_regparm): Fix the test for - a nested function. - -2005-09-25 Richard Henderson - - * config/alpha/alpha.c (tls_symbolic_operand_1): Trust - SYMBOL_REF_TLS_MODEL to be correct. - -2005-09-24 Richard Henderson - - * ipa-type-escape.c (discover_unique_type): Remove dead code at - end of function. Reindent. - -2005-09-24 Ian Lance Taylor - - * convert.c (convert_to_integer): Don't test for ENUMERAL_TYPE in - NEGATE_EXPR/BIT_NOT_EXPR case. - -2005-09-24 Richard Henderson - - * c-common.c (handle_mode_attribute): When not modifying in place, - create subtypes for enumerations. - (sync_resolve_return): Use TYPE_MAIN_VARIANT. - * gimplify.c (create_tmp_from_val): Likewise. - -2005-09-24 Alexandre Oliva - - * config/i386/i386.md (*tls_global_dynamic_64, - *tls_local_dynamic_base_64): Add missing mode to call. - (tls_global_dynamic_64, tls_local_dynamic_base_64): Likewise. - -2005-09-24 Jan Hubicka - - * cgraph.c (cgraph_clone_edge): Make the scale gcov_type. - (cgraph_clone_node): Likewise. - * cgraph.h (cgraph_clone_edge): Update prototype. - (cgraph_mark_inline_edge, cgraph_clone_inlined_nodes): Remove - duplicated prototypes; add updating argument. - * cgraphunit.c (verify_cgraph_node): Verify that counts are non-negative. - * ipa-inline.c (cgraph_clone_inlined_nodes): Allow clonning without - updating profile. - (cgraph_mark_inline_edge): Likewise. - (cgraph_mark_inline): Update use of cgraph_mark_inline_edge. - (cgraph_flatten_node): Likewise. - (cgraph_decide_recursive_inlining): Likewise. - (cgraph_decide_inlining_of_small_function): Likewise. - * tree-optimize.c (tree_rest_of_compilation): Likewise. - -2005-09-23 David Edelsohn - Pete Steinmetz - - * config/rs6000/rs6000.md (neg-minus-mult): Set type to dmul. - (rldic.): Set type to "compare". - (rldicr.): Same. - (movsf_hardfloat): Set type to mtjmpr for MTCTR/MTLR. Set type to - mfjmpr for MFCTR/MFLR. - (movdf_hardfloat64): Same. - (movdf_softfloat64): Same. Correct order of store and move types. - (movti_string): Set type to store_ux/load_ux. - (load_multiple): Set type to load_ux. - (store_multiple): Set type to store_ux. - (movmemsi): Set type to store_ux. - (output_cbranch direct_return): Set type to jmpreg. - (stmw): Set type to store_ux. - (lmw): Set type to load_ux. - * config/rs6000/40x.md (ppc403-store): Increase latency to 2. - * config/rs6000/440.md (ppc440-store): Increase latency to 6. - * config/rs6000/603.md (ppc603-store): Occupy LSU for 2 cycles. - * config/rs6000/6xx.md (ppc604-store): Increase latency to 3. - * config/rs6000/mpc.md (mpccore-store): Increase latency to 2. - * config/rs6000/rios1.md (rios1-store): Increase latency to 2. - (rios1-fpstore): Increase latency to 3. - * config/rs6000/rios2.md (rios2-store): Increase latency to 2. - * config/rs6000/rs64.md (rs64a-store): Increase latency to 2. - -2005-09-23 David Edelsohn - Andrew Pinski - - * config/rs6000/sync.md (sync_si_internal): Change - operand2 constraint to "b". - (sync_di_internal): Same. - (sync_old_si_internal): Change operand3 constraint - to "b". - (sync_old_di_internal): Same. - (sync_new_si_internal): Same. - (sync_new_di_internal): Same. - -2005-09-23 J"orn Rennecke - - PR middle-end/23991 - * final.c (insn_default_length, insn_min_length): In !HAVE_ATTR_length - case, define as macros. - - PR rtl-optimization/23837 - * optabs.c (no_conflict_move_test): Don't set must_stay for a - clobber / clobber match between dest and p->first. - - * optabs.c (emit_libcall_block): Use no_conflict_move_test. - (no_conflict_move_test): Update comments. - -2005-09-22 Ranjit Mathew - - * doc/install.texi: Update URL for Jacks. - * doc/sourcebuild.texi: Likewise. - -2005-09-22 David Edelsohn - - PR target/24007 - * config/rs6000/rs6000.md (movsf_hardfloat): Ignore special - registers when choosing register preferences. - (movdf_hardfloat64): Same. - -2005-09-22 Andreas Krebbel - - * expmed.c (expand_shift): Don't use the target of the rotate as - target for the first expanded shift insn. - * testsuite/gcc.dg/20050922-1.c: Testcase added. - -2005-09-21 Zdenek Dvorak - - PR tree-optimization/22438 - * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Handle all - preserved iv rhs rewriting specially. - -2005-09-21 Daniel Berlin - - * tree-data-ref.c (analyze_array_indexes): Only estimate when - estimate_only is true. - * tree-flow.h (ref_contains_indirect_ref): New prototype. - * tree-flow-inline.h (ref_contains_indirect_ref): Moved from - tree-ssa-structalias.c - * tree-ssa-loop-niter.c (infer_loop_bounds_from_undefined): Use - ref_contains_indirect_ref. - * tree-ssa-structalias.c (ref_contains_indirect_ref): Moved. - -2005-09-21 DJ Delorie - - * config/mn10300/mn10300.c (TARGET_DEFAULT_TARGET_FLAGS): Add - MASK_PTR_A0D0. - (mn10300_return_in_memory): Support variable size types also. - (mn10300_pass_by_reference): Likewise. - (mn10300_function_value): New. - * config/mn10300/mn10300.h (FUNCTION_VALUE): Call the above. - (FUNCTION_OUTGOING_VALUE): Likewise. - * config/mn10300/mn10300.opt: Add -mreturn-pointer-on-d0. - * doc/invoke.texi: Document it. - -2005-09-21 Uros Bizjak - - PR target/22585 - * config/i386/i386.c (ix86_prepare_fp_compare_args): Do not - force integer op1 into register for XFmode compares. - -2005-09-21 Kazu Hirata - - PR middle-end/23971 - * expmed.c (alg_code): Add alg_impossible. - (alg_hash_entry): Add cost. - (synth_mult): Record alg_impossible in the hash table if - multiplication by a given integer is impossble within the - limit. Speed up using alg_impossible. - -2005-09-20 Daniel Berlin - - * tree-ssa-structalias.c (get_constraint_for_component_ref): Add - argument. Allow and set any offset if needs_anyoffset is passed - in. - (get_constraint_for): Add argument here too. - Pass it down. - (do_structure_copy): Pass NULL to get_constraint_for. - (handle_ptr_arith): Ditto. - (find_func_aliases): Ditto. - -2005-09-20 J"orn Rennecke - - PR rtl-optimization/23898 - * output.h (get_attr_min_length): Declare. - * final.c (get_attr_length_1): New function, broken out of: - (get_attr_length). - (get_attr_min_length): New function. - * bb-reorder.c (copy_bb_p, get_uncond_jump_length): Use it. - (duplicate_computed_gotos): Likewise. - * genattr.c (insn_min_length): Generate declaration. - * genattrtab.c (min_fn, min_attr_value): New functions. - (make_length_attrs): Generate insn_min_length. - -2005-09-20 Steve Ellcey - - * config/pa/pa.c (output_cbranch): Check for zero in operands[2]. - -2005-09-20 Richard Henderson - - PR tree-optimization/24059 - * expr.c (expand_expr_real_1) : Allow modifier - EXPAND_STACK_PARM. - -2005-09-20 Joseph S. Myers - - * c.opt (fextended-identifiers): New. - * c-opts.c (c_common_handle_option): Handle - -fextended-identifiers. - * doc/cpp.texi: Update documentation of extended identifiers. - * doc/cppopts.texi (-fextended-identifiers): Document. - -2005-09-20 Jakub Jelinek - - PR tree-optimization/23929 - * tree-ssa-loop-niter.c (expand_simple_operations): Return immediately - if expr is NULL. - - PR tree-optimization/23818 - * tree-stdarg.c (execute_optimize_stdarg): Call - calculate_dominance_info. - -2005-09-20 Daniel Berlin - - * tree-data-ref.c (get_number_of_iters_for_loop): New function. - (analyze_siv_subscript_cst_affine): Add weak SIV test. - (compute_overlap_steps_for_affine_1_2): Use - get_number_of_iters_for_loop. - (analyze_subscript_affine_affine): Check whether difference is - zero first. - Use get_number_of_iters_for_loop. - Check whether overlap occurs outside of bounds. - (analyze_miv_subscript): Use get_number_of_iters_for_loop. - -2005-09-20 Andreas Krebbel - - * tree-ssa-address.c (create_mem_ref): Put the symbol reference into the - base register if possible. - -2005-09-20 Zdenek Dvorak - - PR tree-optimization/18463 - * tree-chrec.c (chrec_convert): Return fold_converted chrec if - converting it directly is not possible. - (chrec_convert_aggressive): New function. - * tree-chrec.h (chrec_convert_aggressive): Declare. - * tree-scalar-evolution.c (instantiate_parameters_1, resolve_mixers): - Fold chrec conversions aggressively if asked to. - (instantiate_parameters): Modified because of changes in - instantiate_parameters_1. - -2005-09-19 Richard Henderson - - * config/i386/sse.md (reduc_splus_v4sf): Rename from reduc_plus_v4sf. - (reduc_splus_v2df): New. - -2005-09-19 Richard Sandiford - - * config/arm/aof.h (REGISTER_NAMES): Add missing backslash. - (ADDITIONAL_REGISTER_NAMES): Add missing comma. Remove final comma. - -2005-09-19 Richard Henderson - - * config/i386/sse.md (vcondu): Rename from - vcondu. - -2005-09-19 Richard Henderson - - * config/ia64/ia64.c (ia64_expand_widen_sum): New. - (ia64_expand_dot_prod_v8qi): New. - * config/ia64/ia64-protos.h: Update. - * config/ia64/vect.md (pmpy2_r, pmpy2_l, widen_usumv8qi3, - widen_usumv4hi3, widen_ssumv8qi3, widen_ssumv4hi3, udot_prodv8qi, - sdot_prodv8qi, sdot_prodv4hi): New. - (reduc_splus_v2sf): Rename from reduc_plus_v2sf. - -2005-09-19 Richard Henderson - - PR 23941 - * real.c (exact_real_truncate): Return false if the format cannot - represent the number as a normal. - - * config/alpha/alpha.c (alpha_rtx_costs) : Cost 0 - for a memory source. - -2005-09-19 Dorit Nuzman - - * tree-ssa-operands.c (swap_tree_operands): Export. - * tree.h (swap_tree_operands): Declare. - * tree-vectorizer.c (vect_is_simple_reduction): Remove ATTRIBUTE_UNUSED. - Call swap_tree_operands. - -2005-09-19 Richard Henderson - - * tree-flow.h (merge_alias_info): Declare. - * tree-ssa-copy.c (merge_alias_info): Export. - * tree-vect-transform.c (vect_create_index_for_vector_ref): Remove. - (vect_create_data_ref_ptr): Use create_iv directly. - (vectorizable_load): Use correct types for integer constants. - (vect_generate_tmps_on_preheader): Likewise. - (vect_gen_niters_for_prolog_loop): Likewise. - -2005-09-19 Steven Bosscher - - PR rtl-optimization/23943 - * cse.c (find_best_addr): Never propagate an EXPR_LIST rtx. - -2005-09-18 Jan Hubicka - - * calls.c (flags_from_decl_or_type): Do not set ECF_LIBCALL_BLOCK. - -2005-09-18 Eric Botcazou - - * varasm.c (output_constant): Do not abort on conversions to union - types between different sizes. - -2005-09-18 Richard Guenther - - PR middle-end/23944 - * gimplify.c (fold_indirect_ref_rhs): Fix thinko in - fallback. - -2005-09-18 Paul Brook - - * config/m68k/fpgnuib.c (__floatsidf): Don't rely on signed overflow. - -2005-09-17 Richard Henderson - - * tree-pass.h, tree-flow.h, tree-ssa-dce.c: Revert last change. - * tree-ssa-loop.c (pass_vect_dce): Remove. - * passes.c (init_optimization_passes): Add pass_dce as a sub-pass - of pass_vectorize. - -2005-09-17 Richard Henderson - - * tree-pass.h (pass_vect_dce): Declare. - * passes.c (init_optimization_passes): Add it. - * tree-flow.h (tree_ssa_dce): Declare. - * tree-ssa-dce.c (tree_ssa_dce): Export. - * tree-ssa-loop.c (tree_vectorize): Move current_loops check ... - (gate_tree_vectorize): ... here. - (pass_vect_dce): New. - -2005-09-17 Jan Hubicka - - * except.c (struct eh_status): Turn region_array into vec. - (expand_resx_expr, collect_eh_region_array, remove_unreachable_regions, - convert_from_eh_region_ranges, find_exception_handler_labels, - current_function_has_exception_handlers, assign_filter_values, - build_post_landing_pads, dw2_build_landing_pads, - sjlj_find_directly_reachable_regions, sjlj_mark_call_sites, - sjlj_emit_dispatch_table, remove_eh_handler, for_each_eh_region, - foreach_reachable_handler, can_throw_internal_1, - convert_to_eh_region_ranges, verify_eh_tree): Update uses of - region_array. - (duplicate_eh_region_1): Update region_array. - (duplicate_eh_regions): Resize region_array and avoid recomputing. - -2005-09-17 David Edelsohn - - PR middle-end/22067 - * expmed.c (expand_mult): Substitute simple register for op0 when - computing max_cost. - -2005-09-17 Richard Henderson - - * expr.c (emit_move_via_integer): Add force argument, pass it on - to emit_move_change_mode. Update callers. - (emit_move_complex): Pass true to new force argument. - * function.c (expand_function_end): Move expand_eh_return call - earlier. Merge sub-word complex values into a pseudo before - copying to the return hard register. - -2005-09-17 Eric Botcazou - - * varasm.c (output_constant): Do not abort on VIEW_CONVERT_EXPRs - between different sizes. - -2005-09-16 Paolo Bonzini - - PR 23903 - - * passes.c (init_optimization_passes): Register dump files for - IPA passes first. - -2005-09-16 Andreas Krebbel - - * config/s390/s390-protos.h (s390_overlap_p): Prototype added. - * config/s390/s390.c (s390_overlap_p): New function. - * config/s390/s390.md ("*mvc" peephole2, "*nc" peephole2, "*oc" - peephole2, "*xc" peephole2): Added overlap check to the peephole2 - condition. - -2005-09-16 Richard Guenther - - * ipa-pure-const.c (static_execute): Free auxiliar information. - * ipa-type-escape.c (discover_unique_type): Free temporary key. - * tree-vrp.c (remove_range_assertions): Free blocks_visited sbitmap. - -2005-09-15 DJ Delorie - - * config/m32c/m32c-lib1.S (__m32c_eh_return): Fix typo. - -2005-09-15 Paolo Bonzini - - * optabs.c (expand_binop): Use swap_commutative_operands_with_target - to order operands. - (swap_commutative_operands_with_target): New. - -2005-09-15 Daniel Berlin - - * tree-data-ref.c (analyze_array_indexes): Add estimate_only - parameter. - Update callers. - (estimate_iters_using_array): New function. - * tree-data-ref.h (estimate_iters_using_array): Prototype - * tree-ssa-loop-niter.c (infer_loop_bounds_from_undefined): - Use estimate_iters_using_array instead of analyze_array. - -2005-09-15 Eric Botcazou - - * tree-nested.c (get_frame_type): Mark the "non-local frame structure" - as addressable. - -2005-09-15 Michael Matz - - * tree-vrp.c (vrp_int_const_binop ): Handle 0 - -INF. - -2005-09-14 Daniel Berlin - - PR tree-optimization/23835 - * tree-ssa-alias.c (sort_pointers_by_pt_vars): New function. - (create_name_tags): Rewrite to be not O(num_ssa_names^2). - -2005-09-14 Richard Henderson - - * config/ia64/vect.md (addv2sf3, subv2sf3): Rewrite as expand. - (addv2sf3_1, addv2sf3_2, subv2sf3_1, subv2sf3_2): New. - -2005-09-14 Andrew Pinski - - * config/i386/i386.c (contains_128bit_aligned_vector_p): Add break - in the ARRAY_TYPE case. - -2005-09-14 Eric Botcazou - - * tree.c (substitute_in_expr, case 4): New case, for ARRAY_REF. - -2005-09-14 Uros Bizjak - - PR middle-end/22480 - * tree-vect-transform.c (vectorizable_operation): Return false for - scalar shift operations and for vector shift operations with - non-invariant shift arguments. Use scalar tree operand op1 as - a shift operand when vector shift insn pattern uses scalar shift - operand. - * Makefile.in (tree-vect-transform.o): Depend on recog.h. - -2005-09-14 Olivier Hainque - - * gimplify.c (gimplify_init_ctor_eval): Don't discard a zero-sized - value if it has side-effects. - -2005-09-14 David Edelsohn - - PR target/22068 - * config/rs6000/rs6000.md (muldi3): Add mulli alternative. - -2005-09-14 Alan Modra - - * config/rs6000/linux64.h (DBX_OUTPUT_BRAC): Treat function name - passed as NAME as if it were label at start of function code. - -2005-09-13 Kaz Kojima - - * config/sh/sh.md (*movv4sf_i): Add general register cases to - the constraints. - -2005-09-13 Andrew Pinski - - * config/rs6000/darwin.md (movdf_low_si): Mark the outgoing r constraint - as early clobber. Rewrite so the PIC register is not implicitly used. - -2005-09-13 Volker Reichelt - - * tree.c (annotate_with_file_line): Compare line numbers before - file names. - -2005-09-13 Uros Bizjak - - PR target/23816 - * config/i386/sse.md (*ieee_sminv4sf3, *ieee_smaxv4sf3) - (*ieee_sminv2df3, *ieee_smaxv2df3): New insn patterns. - -2005-09-13 Ian Lance Taylor - - * loop-doloop.c (doloop_modify): Use GEN_INT to pass an rtx rather - than a HOST_WIDEST_INT to gen_doloop_begin. - -2005-09-13 Diego Novillo - - * tree-dfa.c (dump_variable): Guard against NULL annotations. - -2005-09-13 Zdenek Dvorak - - PR tree-optimize/23817 - * tree-cfg.c (tree_merge_blocks): Preserve loop closed ssa. - -2005-09-13 Alan Modra - - PR target/23774 - * config/rs6000/rs6000.md (restore_stack_block): Write the backchain - word before changing the stack pointer. Use gen_frame_mem for MEMs. - Use UNSPEC_TIE to prevent insn scheduling reordering the insns. - (restore_stack_nonlocal): Likewise. - (save_stack_nonlocal): Use template to emit insns, and gen_frame_mem. - -2005-09-12 Ian Lance Taylor - - PR g++/7874 - * c.opt (ffriend-injection): New C++ option. - * doc/invoke.texi (Option Summary): Mention -ffriend-injection. - (C++ Dialect Options): Document -ffriend-injection. - -2005-09-12 Josh Conner - - PR middle-end/23237 - * ipa-reference.c (static_execute): Don't mark variables in - named sections TREE_READONLY. - -2005-09-12 Alan Modra - - * config/rs6000/rs6000.c (get_next_active_insn): Simplify test for - stack_tie. - -2005-09-12 Andrew Pinski - - * tree-ssa-dse.c (dse_optimize_stmt): Fix up all of V_MAY_DEF and - V_MUST_DEF instead of just the first_use_p. - Don't mark the virtual variables for renaming on the statement which - is being removed. - (pass_dse): Remove TODO_update_ssa. - -2005-09-12 J"orn Rennecke - - PR middle-end/23290 - * stor-layout.c (compute_record_mode): For records with a single - field, actually check the field's mode size against the type size. - - * sh.h (HARD_REGNO_MODE_OK): Allow V4SFmode in general purpose - registers for TARGET_SHMEDIA. - (enum reg_class, REG_CLASS_NAMES, REG_CLASS_CONTENTS): Rename - GENERAL_FP_REGS to GENERAL_DF_REGS. Add GENERAL_FP_REGS as union - of GENERAL_REGS and FP_REGS. - -2005-09-12 Bernd Schmidt - - * config/bfin/bfin.c (legimitize_pic_address): Use gen_const_mem. - -2005-09-12 Alan Modra - - * config/rs6000/rs6000.c (get_next_active_insn): Rewrite using - CALL_P, JUMP_P and NONJUMP_INSN_P, so that barriers and labels - are omitted. Exclude stack_tie insn too. - -2005-09-11 David Edelsohn - - PR rtl-optimization/23098 - * config/rs6000/predicates.md (easy_fp_constant): SFmode constant - 0.0f is easy. - * config/rs6000/rs6000.md (movdf splitter): Use - const_double_operand predicate for TARGET_POWERPC64. - * config/rs6000/rs6000.c (rs6000_legitimize_reload_address): Expand - SYMBOL_REF method to ABI_V4. - - * config/rs6000/altivec.md (build_vector_mask_for_load): Use - replace_equiv_address. - * config/rs6000/rs6000.c (rs6000_emit_eh_reg_restore): Mark MEM as - rs6000_sr_alias_set and MEM_NOTRAP. - (rs6000_aix_emit_builtin_unwind_init): Use gen_frame_mem(). - -2005-09-11 Eric Botcazou - - * tree.c (contains_placeholder_p) : Properly - handle CALL_EXPR again. - -2005-09-11 Richard Earnshaw - - * arm/predicates.md (alignable_memory_operand): Delete. - -2005-09-10 Richard Henderson - - PR debug/23806 - * dbxout.c (dbxout_expand_expr): New. - (dbxout_symbol): Use it. - -2005-09-10 Richard Earnshaw - - * arm.c (arm_gen_rotated_half_load): Delete. - (vfp_emit_fstmx, arm_set_return_address): Use gen_frame_mem. - (emit_multi_reg_push, emit_sfm, arm_expand_prologue) - (thumb_set_return_address): Likewise. - (thumb_load_double_from_address): Use adjust_address. - * arm.md (splits calling arm_gen_rotated_half_load): Delete. - (extendhsisi2_mem, movhi_bytes): Use change_address. - (movhi): Use widen_memory_access. - (reload_out_df): Use replace_equiv_address. - * arm-protos.h (arm_gen_rotated_half_load): Delete prototype. - -2005-09-09 Richard Henderson - - PR debug/20998 - * dbxout.c: Include expr.h. - (dbxout_global_decl): Don't suppress for DECL_RTL unset. - (dbxout_symbol): Handle DECL_VALUE_EXPR. - * Makefile.in (dbxout.o): Add EXPR_H. - -2005-09-09 Zdenek Dvorak - - PR tree-optimization/23509 - * tree-cfg.c (replace_uses_by): Use replace_exp. - * tree-ssa-loop-ivopts.c (get_ref_tag): Assert that dereferenced - pointers have name_mem_tag or type_mem_tag set. - -2005-09-09 Sebastian Pop - - * tree-chrec.c (evolution_function_is_invariant_rec_p): Use - CHREC_LEFT and CHREC_RIGHT for accessing chrec components instead - of wrongly accessing operands. - -2005-09-09 Sebastian Pop - - * Makefile.in (tree-chrec.o): Depends on SCEV_H. - * tree-chrec.c: Include tree-scalar-evolution.h. - (chrec_convert): Instantiate the base and step before calling - scev_probably_wraps_p that would fail on parametric evolutions. - Collect all the fails into a single section failed_to_convert, - print a diagnostic, and return chrec_dont_know instead of calling - fold_convert. - * tree-scalar-evolution.c (loop_closed_phi_def): New. - (instantiate_parameters_1): Avoid instantiation of loop closed ssa - phi nodes. - (scev_const_prop): Don't replace the definition of a loop closed ssa - phi node by itself, or by another loop closed ssa phi node. - * tree-ssa-loop-niter.c (scev_probably_wraps_p, convert_step): Check - that base and step are defined. - -2005-09-09 Richard Guenther - - PR c++/23624 - * fold-const.c (fold_ternary): Check truth_value_p before - calling invert_truthvalue. - -2005-09-09 Nick Clifton - - * Makefile.in (LIBGCC_DEPS): Add libgcc2.h. - * libgcc2.c (__clz_tab[], __popcount_tab[]): Set the fixed - dimension of these arrays. - * libgcc2.h (__clz_tab[], __popcount_tab[]): Add exports of - these arrays. - * longlong.h: Only provide a prototype for the __clz_tab[] array - if this header has not been included from libgcc2.h. - * config/stormy16/stormy16-lib2.c: Include libgcc2.h rather than - defining own types. - Provide prototypes for exported functions. - Use the __clz_tab[] and __popcount_tab[] arrays provided by - libgcc2.c. - -2005-09-08 Josh Conner - - PR c++/21135 - PR c++/23180 - * expr.c (expand_expr_addr_expr_1): Don't invoke - expand_simple_binop for EXPAND_INITIALIZER. - -2005-09-08 Richard Henderson - - PR debug/23190 - * toplev.c (wrapup_global_declaration_1): Split out ... - (wrapup_global_declaration_2): ... from ... - (wrapup_global_declarations): ... here. Return bool. - (check_global_declaration_1): Split out ... - (check_global_declarations): from here. - (emit_debug_global_declarations): New. - * toplev.h (wrapup_global_declaration_1, wrapup_global_declaration_2, - check_global_declaration_1, emit_debug_global_declarations): Declare. - * c-decl.c (c_write_global_declarations_1): Don't create a vector - of decls. Call wrapup_global_declaration_1, - wrapup_global_declaration_2, check_global_declaration_1 directly. - (c_write_global_declarations_2): New. - (ext_block): New. - (c_write_global_declarations): Call c_write_global_declarations_2. - * langhooks.c (write_global_declarations): Call - emit_debug_global_declarations. - - * cgraphunit.c (cgraph_varpool_remove_unreferenced_decls): Don't - remove decls that have DECL_RTL_SET_P. - * passes.c (rest_of_decl_compilation): Invoke - cgraph_varpool_finalize_decl for all but functions. - -2005-09-08 Eric Botcazou - - * tree-vrp.c (extract_range_from_unary_expr): Do not set the range for - the result of a conversion if the new min and max cannot be compared. - -2005-09-08 Andreas Krebbel - - * config/s390/s390.c (s390_sr_alias_set): Variable removed. - (override_options): Setting s390_sr_alias_set removed. - (save_fpr, save_gprs): Set alias set to vararg or frame. - (restore_fpr, restore_gprs, s390_emit_prologue): Replace - s390_sr_alias_set with get_frame_alias_set (). - (s390_gimplify_va_arg): Replace s390_sr_alias_set with - get_varargs_alias_set (). - -2005-09-08 Andrew Pinski - - PR objc/20574 - PR objc/19324 - * c-parser.c (c_parser_objc_method_definition): If the next - token is not "{", error out and don't start the function. - -2005-09-08 Andrew Pinski - - * tree-vrp.c (extract_range_from_expr): Move the check for non - nullness after the check for gimple invariant. - -2005-09-08 Richard Kenner - - * tree.c (host_integerp, tree_low_cst): Correct function comment. - -2005-09-08 Kazuhiro Inaoka - - PR target/23747 - * config/m32r.md (movmemsi_internal): Canonicalize order of - operands in PLUS component of template. - -2005-09-07 Andreas Krebbel - - * reload1.c (fixup_eh_region_note): Remove assertion. - (fixup_abnormal_edges): Reverted removal of call to - find_many_sub_basic_blocks made on 2005-08-31. - -2005-09-07 Richard Henderson - - * function.c (ARG_POINTER_CFA_OFFSET): Move ... - * defaults.h (ARG_POINTER_CFA_OFFSET): ... here. - (INCOMING_FRAME_SP_OFFSET): Move from dwarf2out.c. - * dwarf2out.c (struct cfa_loc): Change reg to unsigned int, - rearrange for better packing. - (INCOMING_FRAME_SP_OFFSET): Move to defaults.h. - (lookup_cfa_1): Remove inline marker. - (cfa_equal_p): Split out of ... - (def_cfa_1): ... here. Use INVALID_REGNUM. - (build_cfa_loc): Handle !cfa->indirect. - (frame_pointer_cfa_offset): New. - (dbx_reg_number): Assert register elimination performed; do - leaf register remapping. - (reg_loc_descriptor): Avoid calling dbx_reg_number when unused. - (eliminate_reg_to_offset): New. - (based_loc_descr): Remove can_use_fbreg argument. Use fbreg only - for verifiably local stack frame addresses; re-base to CFA. - (mem_loc_descriptor): Remove can_use_fbreg argument. - (concat_loc_descriptor, loc_descriptor): Likewise. - (containing_function_has_frame_base): Remove. - (rtl_for_decl_location): Don't do register elimination or - leaf register remapping here. - (secname_for_decl): Split out from .. - (add_location_or_const_value_attribute): ... here. - (convert_cfa_to_loc_list): New. - (compute_frame_pointer_to_cfa_displacement): New. - (gen_subprogram_die): Use them. - * tree.h (frame_base_decl): Remove. - * var-tracking.c (frame_base_decl, frame_stack_adjust): Remove. - (prologue_stack_adjust): Remove. - (vt_stack_adjustments): Use INCOMING_FRAME_SP_OFFSET. - (adjust_stack_reference): Re-base memories to arg_pointer_rtx. - (set_frame_base_location): Remove. - (compute_bb_dataflow, emit_notes_in_bb): Don't call it. - (dump_attrs_list, dump_dataflow_set): Use string concatenation. - (vt_add_function_parameters): Don't eliminate_regs. - (vt_initialize): Don't create frame_base_decl. - -2005-09-07 Eric Botcazou - - * doc/install.texi (*-*-solaris2*): Clarify wording on the recommended - version of GNU binutils for 4.x and later. - -2005-09-06 Mark Mitchell - - * ggc-page.c (ggc_push_context): Remove. - (ggc_pop_context): Likewise. - * ggc.h (ggc_push_context): Remove. - (ggc_pop_context): Likewise. - -2005-09-06 Saurabh Verma - - PR target/8973 - * config/arc/arc.c (arc_output_function_epilogue): Update flags while - returning from an interrupt handler. - -2005-09-06 Saurabh Verma - - PR target/8972 - * config/arc/arc.c (output_shift): Add check for loop count when - optimizing. - -2005-09-06 Steven Bosscher - - * tree-ssa-phiopt.c (conditional_replacement): Construct proper SSA - form manually. - (abs_replacement): Likewise. - (pass_phiopt): Remove TODO_update_ssa. - -2005-09-06 Jakub Jelinek - - PR c/23075 - * c-typeck.c (c_finish_return): Set TREE_NO_WARNING on RETURN_EXPR - if "return with no value, in function returning non-void" warning - has been issued. - * tree-cfg.c (execute_warn_function_return): Don't look at - RETURN_EXPRs with TREE_NO_WARNING set. - - PR target/22362 - * config/i386/i386.c (ix86_function_regparm): Make sure automatic regparm - for internal functions doesn't use registers used by global registers - variables. Use fewer register parameters if there are global register - variables. - -2005-09-06 Olivier Hainque - Eric Botcazou - - PR middle-end/14997 - * expr.c (expand_expr_real) : Force op0 to mem - when we would be extracting outside its bit span (bitpos+bitsize - larger than its mode), possible with some VIEW_CONVERT_EXPRs from - Ada unchecked conversions. - -2005-09-06 Steven Bosscher - - * tree-ssa-pre.c (try_look_through_load): New function. - (compute_avail): Use it to try to look through loads for some - more useful expressions. - -2005-09-06 Saurabh Verma - - * simplify-rtx.c (simplify_binary_operation_1): Correct the - condition for detecting cases like (a&a) and (a^a). - -2005-09-06 Keith Besaw - - * common.opt: Add option ftree-vect-loop-version. - * params.def: Add --param vect-max-version-checks. - * doc/invoke.texi: Document ftree-vect-loop-version and - --param vect-max-version-checks. - * tree-vectorizer.h (_loop_vec_info): Add ptr_mask and - may_misalign_stmts and defines for accessors. - * tree-vectorizer.c : (new_loop_vec_info): VEC_alloc for - LOOP_VINFO_MAY_MISALIGN_STMTS. - (destroy_loop_vec_info): VEC_free for - LOOP_VINFO_MAY_MISALIGN_STMTS. - * tree-vect-analyze.c (vect_compute_data_ref_alignment): - Update documentation. - (vect_update_misalignment_for_peel): New. - (vect_enhance_data_refs_alignment): Update to choose loop - peeling or loop versioning if appropriate for the (potentially) - unaligned data references in the loop. - (vect_analyze_data_refs_alignment): Remove call to - vect_enhance_data_refs_alignment so the checks can be done - earlier. - (vect_analyze_loop): Add call to vect_enhance_data_refs_alignment - and move up call to vect_analyze_data_refs_alignment. - * tree-vect-transform.c (vect_create_cond_for_align_checks): New. - (vect_transform_loop): Add call to loop_version. - -2005-09-06 Jakub Jelinek - - PR rtl-optimization/23098 - * cse.c (fold_rtx_mem): Call delegitimize_address target hook. - * simplify-rtx.c (constant_pool_reference_p): New function. - * rtl.h (constant_pool_reference_p): New prototype. - * config/i386/i386.md (pushf split, mov[sdx]f split): Use - constant_pool_reference_p in condition and - avoid_constant_pool_reference in preparation statements. - -2005-09-06 Andreas Krebbel - - * gcse.c (try_replace_reg): Disallow REG_EQUAL notes for - STRICT_LOW_PART SETs. - -2005-09-06 Alan Modra - - PR middle-end/21460 - * except.c (sjlj_emit_function_enter): Find the function begin - note even when it's not in first basic block. - -2005-09-06 Kelley Cook - - * acinclude.m4: Renamed from aclocal.m4. Delete AM_LANGINFO_CODESET, - AM_PROG_CC_C_O, and AM_AUX_DIR_EXPAND. - * aclocal.m4: Regenerate. - -2005-09-05 DJ Delorie - - * config/m32c/m32c.h (TRAMPOLINE_ALIGNMENT): Correct misspelling - of macro. - -2005-09-06 Kazu Hirata - - * gimplify.c, ipa-prop.h, varasm.c, config/vxlib.c, - config/vxworks.h, config/crx/crx.c, config/ms1/ms1.c, - config/ms1/ms1.md, config/rs6000/rs6000.c: Fix comment typos. - Follow spelling conventions. - * doc/invoke.texi: Follow spelling conventions. - -2005-09-05 J"orn Rennecke - - * rtl.h (gen_frame_mem, gen_tmp_stack_mem): Declare. - * emit-rtl.c (gen_frame_mem, gen_tmp_stack_mem): New functions. - * builtins.c (expand_builtin_return_addr): Use gen_frame_mem. - -2005-09-05 J"orn Rennecke - - PR target/23683 - * sh.c (sh_reorg, emit_load_ptr): Use gen_const_mem. - (output_stack_adjust): Use gen_tmp_stack_mem. - (sh_expand_prologue, sh_expand_epilogue): Use gen_frame_mem. - (sh_set_return_address, sh_allocate_initial_value): Likewise. - (sh_get_pr_initial_val): Likewise. - (sh_builtin_saveregs): Use gen_frame_mem and change_address. - (sh_initialize_trampoline): Likewise. Also use adjust_address. - * sh.md (divsi_inv_m0): Use gen_const_mem. - (push_fpscr, pop_fpscr, load_ra): Use gen_frame_mem. - (movdf_i4+1): Use gen_tmp_stack_mem. - (reload_outdf+3, reload_outdf+4, fpu_switch+1): Use change_address. - (fpu_switch+2): Likewise. - (movv4sf_i, movv16sf_i): Use adjust_address. - (symGOT_load): Set MEM_NOTRAP_P bit. - -2005-09-04 John David Anglin - - PR target/23721 - * pa.c (emit_move_sequence): Fix typo in last change. - -2005-09-03 Jakub Jelinek - - PR rtl-optimization/23454 - * reorg.c (relax_delay_slots): Only call invert_jump if any_condjump_p - is true. - -2005-09-03 Richard Henderson - John David Anglin - - PR middle-end/23671 - * pa.c (emit_move_sequence): Use replace_equiv_address instead of - gen_rtx_MEM. - -2005-09-02 Nicolas Pitre - - * config/arm/arm.c (arm_legitimize_address): Limit the value passed - to bit_count to 32 bits. - -2005-08-31 Mark Mitchell - - PR c++/23167 - * gimplify.c (gimplify_expr): Handle TREE_ADDRESSABLE types when - generating synthetic loads from volatile lvalues. - -005-09-02 Nick Clifton - - * config/stormy16/stormy16-lib2.c (__popcounthi2, __parityhi2, - __ctzhi2, __clzhi2): New functions. - -2005-09-02 Andrew Pinski - - PR middle-end/23547 - * tree-nested.c (struct var_map_elt): Mark with GTY. - (struct nesting_info): Mark with GTY. Mark var_map's param is struct - var_map_elt. - (lookup_field_for_decl): Allocate new element in GC memory. - (lookup_tramp_for_decl): Likewise. - (convert_nl_goto_reference): Likewise - (create_nesting_tree): Allocate info in GC memory. Likewise for - info->var_map. - (free_nesting_tree): Free with ggc_free instead of free. - (root): New static variable. - (lower_nested_functions): Remove root as local variable. And zero out - root at the end of the function. - -2005-09-02 J"orn Rennecke - - PR rtl-optimization/20365 - * simplify-rtx.c (simplify_plus_minus_op_data): Change type of neg - to short. New member ix. - (simplify_plus_minus_op_data_cmp): Break ties using ix member. - (simplify_plus_minus): Initialize ix members before calling qsort. - -2005-09-02 Zdenek Dvorak - - PR tree-optimization/23626 - * tree-cfg.c (replace_uses_by): Clean up eh info. - -2005-09-01 DJ Delorie - - * config/m32c/m32c.c (m32c_valid_pointer_mode): Remove stray debug - fprintf. - -2005-09-01 David Edelsohn - - * config/rs6000/rs6000.c (setup_incoming_varargs): Set MEM_NOTRAP_P. - (rs6000_split_multireg_move): Use replace_equiv_address instead of - gen_rtx_MEM. - -2005-09-01 Craig Rodrigues - - * c-decl.c (diagnose_mismatched_decls): With -Wredundant-decls, - do not issue warning for a variable definition following - a declaration. - -2005-09-01 Richard Henderson - - PR 23668 - * config/i386/i386.c (ix86_expand_vector_init_one_var): Restore - conversion to CONST_VECTOR. - -2005-09-01 Richard Henderson - - PR 23676 - * reload1.c (reload_as_needed): Check !CALL_P before calling - fixup_eh_region_note. - * rtlanal.c (may_trap_p): SUBREG by itself cannot trap. - -2005-09-01 DJ Delorie - - * varasm.c (output_constant): Let the target resolve - conversions of addresses to non-default pointer sizes. - -2005-09-01 Nicolas Pitre - - * config/arm/arm.c (arm_legitimize_address): Split absolute addresses - to alow matching ARM pre-indexed addressing mode. - (arm_override_options): Remove now irrelevant comment. - -2005-09-01 Phil Edwards - - * config.gcc (i*86-wrs-vxworks): Update. Split out vxworksae target. - * config/i386/t-vxworks: Update multilibs for VxWorks 6 and RTP mode. - * config/i386/vxworks.h: Likewise. - * config/i386/t-vxworksae: New file, for VxWorks AE. - * config/i386/vxworksae.h: Likewise. - -2005-09-01 Sebastian Pop - - PR tree-optimization/23410 - * tree-ssa-loop-niter.c (scev_probably_wraps_p): Check that the - sequence is not wrapping during the first step. - -2005-09-01 Jakub Jelinek - - PR debug/7241 - * dwarf2out.c (base_type_die): Compare char_type_node with - TYPE_MAIN_VARIANT (type), not type. - -2005-09-01 Richard Guenther - - PR tree-optimization/15366 - * common.opt: Add -finline-functions-called-once. - Put -fearly-inlining in alphabetically ordered place. - * doc/invoke.texi: Document new option. - * ipa-inline.c (cgraph_decide_inlining): Honour - flag_inline_functions_called_once. - -2005-09-01 Jakub Jelinek - - PR rtl-optimization/23478 - * local-alloc.c (struct qty): Add n_throwing_calls_crossed field. - (alloc_qty): Initialize it. - (update_equiv_regs): Clear REG_N_THROWING_CALLS_CROSSED. - (combine_regs): Combine also n_throwing_calls_crossed fields. - (find_free_reg): Don't attempt to caller-save pseudos crossing - calls that might throw. - * global.c (struct allocno): Add throwing_calls_crossed field. - (global_alloc): Revert 2005-08-22 change. Initialize - throwing_calls_crossed. - (find_reg): Don't attempt to caller-save pseudos crossing calls that - might throw. - -2005-09-01 Alan Modra - - PR target/23649 - * config/rs6000/predicates.md (mask_operand): Only handle rlwinm masks. - (mask64_operand): Reinstate code prior to 2005-06-11 change. - (mask64_2_operand): Reinstate code prior to 2004-11-11 change. - (and64_2_operand): Tweak to use predicate. - (and_operand): Adjust for mask_operand changes. - * config/rs6000/rs6000.c (num_insns_constant): Revert 2005-06-11. - (print_operand): Likewise. - (rs6000_rtx_costs): Pass mode to mask_operand and use mask64_operand. - (mask64_1or2_operand): Delete. - * rs6000/rs6000-protos.h (mask64_1or2_operand): Delete. - * config/rs6000/rs6000.h (EXTRA_CONSTRAINT ): Revert 2005-06-11. - (EXTRA_CONSTRAINT ): Pass operand mode to predicate. - (EXTRA_CONSTRAINT ): Disallow mask64_operand matches. - * config/rs6000/rs6000.md (andsi3_internal3 split): Revert 2005-06-11. - (rotldi3_internal4): Likewise. - (rotldi3_internal5, rotldi3_internal5 split): Likewise. - (rotldi3_internal6, rotldi3_internal6 split): Likewise. - (ashldi3_internal7): Likewise. - (ashldi3_internal8, ashldi3_internal8 split): Likewise. - (ashldi3_internal, ashldi3_internal9 split): Likewise. - (anddi3 split): Don't match mask64_operand. - (anddi3_internal2): Add rlwinm. Modify 't' splitter predicate. - (anddi3_internal3): Add rlwinm. Use and64_2_operand in non-cr0 - splitter and match TARGET_64BIT not TARGET_POWERPC64. Modify - 't' splitter predicate. - (movdi_internal64 + 2): Revert 2005-06-11 change. - -2005-08-31 DJ Delorie - - * config/m32c/m32c.c (m32c_valid_pointer_mode): New. - (m32c_asm_integer): Add support for 32 bit pointers. - -2005-08-31 Richard Henderson - - * emit-rtl.c (set_mem_attributes_minus_bitpos): Look through - component-like references for setting MEM_NOTRAP_P. - - * config/i386/i386.c (ix86_setup_incoming_varargs): Set MEM_NOTRAP_P. - * config/alpha/alpha.c (alpha_setup_incoming_varargs): Likewise. - -2005-08-31 Richard Henderson - - * expr.c (expand_expr_real_1) : Force subregs - into a pseudo before applying gen_lowpart. - -2005-08-31 Geoffrey Keating - - * doc/install.texi (Specific): Update cctools version required - for full functionality. - * config/darwin.h (LINK_SPEC): Pass -mmacosx-version-min to the - linkers as -macosx_version_min. - -2005-08-31 J"orn Rennecke - - PR target/21255 - * sh.c (print_operand, %R and %S): Add handling of floating point - registers, memory, constants and invalid operands. - -2005-08-31 Daniel Berlin - - * ipa-pure-const.c: Change dump name. - -2005-08-31 Uros Bizjak - - PR target/23570 - * config/i386/sse.md (*sse_concatv2sf): Change operand 2 constraint - to "reg_or_0_operand". - (sse2_loadld): Change operand 1 constraint to "reg_or_0_operand". - -2005-08-31 Dale Johannesen - - * loop-iv.c (iv_number_of_iterations): Fix overflow check for - loops that count down. - -2005-08-31 Richard Henderson - - PR rtl-opt/23601 - * reload1.c (reload): Set MEM_NOTRAP_P in spill slots. - (fixup_eh_region_note): New. - (reload_as_needed): Call it. - (fixup_abnormal_edges): Allow all throwing insns to be deleted; - don't call find_many_sub_basic_blocks; call verify_flow_info. - * function.c (assign_stack_local_1): Set MEM_NOTRAP_P. - (keep_stack_depressed): Likewise. - (assign_stack_temp_for_type): Likewise; use adjust_address_nv. - -2005-08-31 Richard Henderson - - * config/i386/i386.c (ix86_function_ok_for_sibcall): Fix test for - fp return matching. - -2005-08-31 Fariborz Jahanian - - * expr.c (expand_expr_real_1): Compare size of address - mode to target's address mode size in deciding expansion of - the constant address. - -2005-08-31 Richard Guenther - - PR middle-end/23477 - * expr.c (all_zeros_p): New function. - (expand_expr_real_1): Handle the case of an all-zero - non-addressable constructor separately. - -2005-08-31 Adrian Straetling - - * builtins.c: (expand_builtin_strcpy, expand_builtin_strcat): Change - arguments, adjust all callers. - (expand_builtin_strcat): Rewrite to call strcpy instead of mempcpy. - -2005-08-30 Richard Henderson - - PR target/23630 - * expr.c (expand_expr_real_1) : Use gen_lowpart - whenever the mode sizes match. - -2005-08-31 Alan Modra - - * calls.c (load_register_parameters): Fix comment typo. - * expr.c (emit_push_insn): Comment formatting. - -2005-08-30 Ian Lance Taylor - - * config/i386/x-cygwin (host-cygwin): Change dependency from - hosthooks-def.h to $(HOSTHOOKS_DEF_H). - -2005-08-29 Geoffrey Keating - - * config/i386/i386.c (ix86_expand_vector_init_one_var): Don't modify - parts of 'vals'. - -2005-08-29 Andrew Pinski - - PR middle-end/23408 - * ipa-inline.c (cgraph_decide_inlining_incrementally): Remove the - call to ggc_collect. - -2005-08-29 Paolo Bonzini - - PR bootstrap/21268 - * Makefile.in (ALL_CPPFLAGS): Include $(INCLUDES) at the - beginning. Remove $(INCLUDES) from all the rules, if following - $(ALL_CPPFLAGS) or $(BUILD_CPPFLAGS). - -2005-08-29 Jakub Jelinek - - PR middle-end/23484 - * builtins.c (fold_builtin_memory_chk, fold_builtin_stxcpy_chk, - fold_builtin_strncpy_chk, fold_builtin_snprintf_chk): If len is - not constant, but maxlen is, don't set len to maxlen, rather - set maxlen to len if len is a constant. - -2005-08-29 Zdenek Dvorak - - PR tree-optimization/23475 - * tree-ssa-loop-ivcanon.c (remove_empty_loop): Update frequencies - and counts. - -2005-08-28 Daniel Berlin - - Fix PR middle-end/22455 - - * fold-const.c (fold_checksum_tree): Adjust for now-largest tree size. - Checksum only the parts of the tree that exist for the tree code. - -2005-08-28 Dale Johannesen - - * config/i386/i386.c (nocona_cost): Increase MOVE_RATIO. - -2005-08-28 Andrew Pinski - - * tree-vrp.c: Remove obsolete comment in front of vrp_initialize. - -2005-08-28 Richard Henderson - - * stor-layout.c (finalize_type_size): Revert workaround from 08-26. - * tree.c (make_node_stat): Use BITS_PER_UNIT instead of alignment - of char_type_node. - -2005-08-28 Jakub Jelinek - - PR ada/23593 - * builtins.c (get_memory_rtx): Don't strip nops - in between COMPONENT_REFs. - -2005-08-27 Andrew Pinski - - PR middle-end/23463 - * gimplify.c (gimplify_modify_expr_rhs): Remove check for zero sized - types. - (gimplify_modify_expr): Check for zero sized types and gimplify the - rhs and lhs as statements. - -2005-08-27 John David Anglin - - PR libgcj/23508 - * pa/linux-unwind.h (pa32_fallback_frame_state): Use r0 slot in frame - state for return address column of signal frames. - -2005-08-27 David Edelsohn - - PR target/23539 - * config/rs6000/rs6000.c (expand_block_clear): Use HImode when - bytes >= 2 not bytes == 2. - (expand_block_move): Same. - -2005-08-27 Richard Guenther - - PR target/23575 - * config/i386/sse.md (sse2_movsd): Add missing closing - braces. - -2005-08-27 Paul Brook - - * genrecog.c (enum decision_type): Add DT_num_insns. - (struct decision_test): Add u.num_insns. - (add_to_sequence): Add DT_num_insns test. - (maybe_both_true_2, nodes_identical_1): Handle DT_num_insns. - (write_cond, debug_decision_2): Ditto. - (change_state): Assume peep2_next_insn never fails. - Remove "afterward" argument. - (write afterward, write_tree): Update to match. - * recog.c (peep2_current_count): New variable. - (peep2_next_insn): Check it. - (peephole2_optimize): Set peep2_current_count. - * recog.h (peep2_current_count): Declare. - -2005-08-26 Josh Conner - - PR middle-end/23584 - * ipa-pure-const.c (check_tree): Check for volatile-ness - when considering a dereference. - -2005-08-27 Jakub Jelinek - - * rtl.h (MEM_IN_STRUCT_P): Fix comment typo. - -2005-08-26 Jakub Jelinek - - PR rtl-optimization/23561 - * builtins.c (get_memory_rtx): Add LEN argument. If MEM_EXPR is - a COMPONENT_REF, remove all COMPONENT_REF from MEM_EXPR unless - at most LEN bytes long memory fits into the field. - (expand_builtin_memcpy, expand_builtin_mempcpy, expand_movstr, - expand_builtin_strncpy, expand_builtin_memset, expand_builtin_memcmp, - expand_builtin_strcmp, expand_builtin_strncmp): Adjust callers. - -2005-08-26 Richard Henderson - - PR rtl-opt/23560 - * loop.c (biased_biv_may_wrap_p): New. - (maybe_eliminate_biv_1): Use it to suppress non-equality - comparison transformations. Delete disabled code. - -2005-08-26 Ian Lance Taylor - - * combine.c (make_extraction): Avoid reference outside object. - -2005-08-26 J"orn Rennecke - - * stor-layout.c (finalize_type_size): Restore behaviour for - non-aggregate types to the status quo ante of the patch for - pr 23467. Document why it matters. - -2005-08-26 Jakub Jelinek - - PR c/23506 - * c-common.c (c_common_nodes_and_builtins): Increase builtin_types - array by one element, initialize the BT_LAST element with NULL. - -2005-08-26 David Edelsohn - - * config/rs6000/rs6000.md (eq_compare): Only enable when - optimizing for size. - (plus_eqsi): Same. - (compare_plus_eqsi): Same. - (plus_eqsi_compare): Same. - (neg_eq0): Same. - (neg_eq): Same. - - * config/rs6000/aix52.h (PROCESSOR_DEFAULT): Change to - PROCESSOR_POWER4. - -2005-08-26 Nick Clifton - - * config/v850/v850.c (ep_memory_operand): Return FALSE if - TARGET_EP is not defined. - * config/v850/c850.h (TARGET_CPU_CPP_BUILTINS): Define __EP__ if - TARGET_EP is enabled. - (OPTIMIZATION_OPTIONS): Do not define MASK_EP when optimizing. - * config/v850/v850.md (save_all_interrupt): Only use the EP - register if TARGET_EP is defined. - (restore_all_interrupt): Likewise. - * config/v850/lib1funcs.asm: Update functions so that the EP - register is only used if __EP__ is defined. - -2005-08-26 David Ung - - * config/mips/mips.c (mips_expand_prologue): Handle case when - generating for MIPS16 and the outgoing argument area is more than - SMALL_OPERAND. Use the frame pointer as temporary to generate the - add instruction. - -2005-08-26 Paul Woegerer - - * config/crx/crx.md: Make doloop_end pattern usage controllable - via mloop-nesting= command line switch. Make sure - the combiner cannot use doloop_end_ in an illegal way. - * config/crx/crx.c: Use regs up to r6 for argument passing. - Refine crx_address_cost (non cst4 displacements are expensive). - * config/crx/crx.opt: Add switch for mloop-nesting=. - -2005-08-26 Adrian Straetling - - * config/s390/s390.md: ("movstr", "*movstr"): Add patterns. - (UNSPEC_MVST): New constant. - -2005-08-26 Andreas Krebbel - - * config/s390/predicates.md ("shift_count_operand", "setmem_operand"): - Reject operands containing eliminable registers. - * testsuite/gcc.dg/20050825-1.c: New testcase. - -2005-08-24 Paolo Bonzini - Jan Hubicka - - * regmove.c (reg_is_remote_constant_p): Reorganize to not use log links. - -2005-08-24 Paolo Bonzini - - PR tree-optimization/23546 - * tree-ssa-loop-im.c (for_each_index): Handle INTEGER_CST - and REAL_CST nodes. - -2005-08-24 Pete Steinmetz - - * params.def (PARAM_MIN_SPEC_PROB): New. - * sched-rgn.c (MIN_PROBABILITY): Delete. - (compute_trg_info): Convert to PARAM_VALUE. - * doc/invoke.texi (param): Document min-spec-prob. - -2005-08-24 Fariborz Jahanian - - * config/darwin.h: define __PIC__ - * config/rs6000/darwin.h: Add SUBTARGET_OS_CPP_BUILTINS to - TARGET_OS_CPP_BUILTINS macro. - -2005-08-24 Paolo Bonzini - - * config/rs6000/rs6000.md: Fix thinko in the peephole2 I added - yesterday. - -2005-08-24 Zdenek Dvorak - - * bb-reorder.c (copy_bb, duplicate_computed_gotos): Add argument - to duplicate_block. - * cfghooks.c (duplicate_block): Added position where to place - new block as argument. - * cfghooks.h (duplicate_block): Declaration changed. - * cfglayout.c (copy_bbs): Add argument after. Pass it to - duplicate_block. - * cfglayout.h (copy_bbs): Declaration changed. - * cfgloop.h (loop_version): Declaration changed. - * cfgloopmanip.c (duplicate_loop_to_header_edge): Pass - position to copy_bbs. - (loop_version): Pass position to duplicate_loop_to_header_edge. - Add place_after argument and position new blocks according to - it. - * modulo-sched.c (sms_schedule): Pass place_after argument - to loop_version. - * tracer.c (tail_duplicate): Pass argument to duplicate_block. - * tree-cfg.c (split_edge_bb_loc): New function. - (tree_split_edge, tree_duplicate_sese_region): Use split_edge_bb_loc - to determine position of new blocks. - * tree-ssa-loop-unswitch.c (tree_unswitch_loop): Pass argument - to loop_version. - * tree-ssa-threadupdate.c (create_block_for_threading): Pass - argument to duplicate_block. - * tree-vectorizer.c (slpeel_tree_duplicate_loop_to_edge_cfg): - Pass position to copy_bbs. - -2005-08-24 Zdenek Dvorak - - * fold-const.c (ptr_difference_const): Use - cst_and_fits_in_hwi instead of host_integerp. - -2005-08-24 Paolo Bonzini - - * config/darwin.c (gen_pic_offset): New. - (machopic_indirect_data_reference, machopic_legitimize_pic_address): - Use it. - -2005-08-23 Zdenek Dvorak - - PR tree-optimization/23486 - * tree-ssa-loop.c (pass_scev_cprop): Add TODO_update_ssa_only_virtuals. - -2005-08-23 Phil Edwards - - * config.gcc (*-*-vxworks*): Update tm_file, add extra_options, - remove use_collect2. - (powerpc-wrs-vxworks): Update, split out *-*-vxworksae target. - - * target-def.h (TARGET_HAVE_CTORS_DTORS): Allow target - configuration files to override the default value. - - * config/t-vxworks: Remove INSTALL_ASSERT_H. Define STMP_FIXPROTO, - EXTRA_HEADERS, and EXTRA_MULTILIB_PARTS. - * config/vx-common.h: New file, split out from... - * config/vxworks.h: here. Update for VxWorks 6.x and RTP mode. - * config/vxworksae.h: New file, for VxWorks AE. - * config/vxworks.opt: New file. - * config/vxlib.c: Update for VxWorks 6. - - * config/rs6000/t-vxworks (MULTILIB_OPTIONS): New list. Adjust - other MULTILIB_* variables appropriately. - (LIB2FUNCS_EXTRA, EXTRA_MULTILIB_PARTS): Correct from t-ppccomm. - * config/rs6000/t-vxworksae: New file, adjust multilibs for AE. - * config/rs6000/vxworks.h: Update for VxWorks 6. - * config/rs6000/vxworksae.h: New file, mostly placeholder for now. - -2005-08-23 Andrew Pinski - - PR target/20799 - * config/darwin.c (machopic_select_section): Remove the hack to - mark "::operator new" and "::operator delete" for coalescing - even though they are not weak. - -2005-08-24 Alan Modra - - * configure.ac (HAVE_LD_NO_DOT_SYMS): Set for powerpc-linux biarch. - * configure: Regenerate. - -2005-08-23 Paolo Bonzini - - PR middle-end/23517 - * fold-const.c (fold_convert): Use VIEW_CONVERT_EXPR to convert - between vectors. - * convert.c (convert_to_integer, convert_to_vector): Likewise. - * tree-vect-generic.c (tree_vec_extract, expand_vector_operations_1): - Likewise. - -2005-08-23 Paolo Bonzini - - * config/rs6000/predicates.md (equality_operator): New. - * config/rs6000/rs6000.md: Rewrite as a peephole2 the split for - comparison with a large constant. - -2005-08-23 Mark Mitchell - - * hwint.h (HOST_WIDE_INT_PRINT): Use HOST_LONG_LONG_FORMAT. - -2005-08-23 J"orn Rennecke - - * sh.c (sh_builtin_saveregs): If the number of to-be-saved fp - registers is even, and we have a hardware double precision fp, - align the buffer. - (sh_gimplify_va_arg_expr): For floating point arguments, consider - size of current argument when checking if argument was passed in - registers. - - * sh.c (sh_attr_renesas_p): Handle error_mark_node. - - PR middle-end/23467 - * stor-layout.c (finalize_type_size): Dont override - existing alignment with a smaller alignment from the mode. - -2005-08-23 Sebastian Pop - - * lambda-code.c (lambda_vector_lexico_pos): Moved... - * lambda.h (lambda_vector_lexico_pos): ... here. - * tree-data-ref.c (build_classic_dist_vector): Return false when - the distance vector is lexicographically negative. - -2005-08-23 Sebastian Pop - - PR tree-optimization/23511 - * tree-ssa-loop-niter.c (infer_loop_bounds_from_undefined): Don't - handle cases where TYPE_MIN_VALUE or TYPE_MAX_VALUE are NULL_TREE. - -2005-08-23 Jakub Jelinek - - PR tree-optimization/22043 - * tree.h (count_type_elements): Add ALLOW_FLEXARR argument. - * expr.c (count_type_elements): Add ALLOW_FLEXARR argument. - If ALLOW_FLEXARR, handle types ending with flexible array member. - Pass false as second argument to recursive count_type_elements calls. - (categorize_ctor_elements_1, mostly_zeros_p): Pass false as second - argument to count_type_elements call. - * tree-sra.c (decide_block_copy): Likewise. - * gimplify.c (gimplify_init_constructor): If num_type_elements < 0 - for a constant-sized object, set cleared as well. Pass true as - second argument to count_type_elements call. - -2005-08-23 Alan Modra - - PR target/21571 - * config/rs6000/rs6000.c (rs6000_legitimate_small_data_p): Rename - from legitimate_small_data_p, and make global. Update use. - Remove forward declaration. - * config/rs6000/rs6000-protos.h (rs6000_legitimate_small_data_p): - Declare. - * config/rs6000/rs6000.md (movdf_hardfloat32): Allow small data mems. - -2005-08-23 David Edelsohn - - * config/rs6000/rs6000.md (eq): Use output operand instead - of scratch intermediates. - (eq_compare): Same. - (neg_eq0): New. - (neg_eq): Convert to define_insn_and_split. - -2005-08-23 Alan Modra - - PR target/23070 - * config/rs6000/rs6000.c (function_arg): For ABI_V4 calls to - stdarg functions, set/clear the fp marker even when no variable - args are passed. - * config/rs6000/sysv4.opt (mprototype): Describe. - -2005-08-22 Jakub Jelinek - - PR rtl-optimization/23478 - * regs.h (reg_info): Add throw_calls_crossed. - (REG_N_THROWING_CALLS_CROSSED): Define. - * flow.c (allocate_reg_life_data): Initialize - REG_N_THROWING_CALLS_CROSSED. - (propagate_one_insn, attempt_auto_inc): Update - REG_N_THROWING_CALLS_CROSSED. - * global.c (global_alloc): Don't allocate pseudos across - calls that may throw. - -2005-08-22 Andrew Pinski - - PR c/18715 - * c-common.c (c_do_switch_warnings): Look for a node where the enum's - value is inbetween the range if we did not find an exact match. - -2005-08-22 Aldy Hernandez - - * doc/invoke.texi (Option Summary): Add ms1 options. - * doc/extend.texi: Document interrupt handler attribute for ms1. - * doc/md.texi: Document ms1 constraints. - * config.gcc: Add ms1-*-elf. - * config/ms1/ms1.h: New. - * config/ms1/ms1.c: New. - * config/ms1/ms1.md: New. - * config/ms1/ms1-protos.h: New. - * config/ms1/ABI.txt: New. - * config/ms1/crti.asm: New. - * config/ms1/crtn.asm: New. - * config/ms1/lib2extra-funcs.c: New. - * config/ms1/t-ms1: New. - * config/ms1/ms1.opt: New. - -2005-08-22 Ira Rosen - - * config/rs6000/altivec.md (xorv4sf3): New. - (negv4sf2, neg2): Likewise. - -2005-08-21 H.J. Lu - - PR target/23485 - * config/ia64/ia64.md (divsi3): Check divide by zero. - (udivsi3): Likewise. - (divdi3): Likewise. - (udivdi3): Likewise. - -2005-08-21 Jakub Jelinek - - * simplify-rtx.c (simplify_immed_subreg) : Only clear - up to elem_bitsize bits, not max_bitsize. - -2005-08-21 Sebastian Pop - - PR tree-optimization/23433 - * tree-chrec.c (chrec_apply): Translate INTEGER_CST to a - REAL_CST when the type is SCALAR_FLOAT_TYPE_P. - -2005-08-21 Sebastian Pop - - PR tree-optimization/23434 - * tree-ssa-loop-niter.c (proved_non_wrapping_p): Give up when - the iteration bound is not an INTEGER_CST. - -2005-08-21 Dorit Nuzman - - * tree-vect-transform.c (get_initial_def_for_reduction): Set - need_epilog_adjust back to false for MIN/MAX case. Set *scalar_def to - NULL if need_epilog_adjust is false. - (vect_create_epilog_for_reduction): Variable adjust_in_epilog removed. - Case 3 always peels first itration, not just for PLUS case, and no need - to use scalar_initial_def here. Create an epilog adjustment only if - scalar_initial_def is not NULL. - - (vectorizable_reduction): Remove assert. - -2005-08-20 H.J. Lu - - PR target/23485 - * config/ia64/lib1funcs.asm (__divdi3): Check divide by zero. - (__moddi3): Likewise. - (__udivdi3): Likewise. - (__umoddi3): Likewise. - (__divsi3): Likewise. - (__modsi3): Likewise. - (__udivsi3): Likewise. - (__umodsi3): Likewise. - -2005-08-20 Jakub Jelinek - - * tree-pass.h (TDF_GRAPH): Define. - * tree-dump.c (dump_options): Don't set TDF_GRAPH in "all". - * passes.c (finish_optimization_passes): Only call - finish_graph_dump_file if TDF_GRAPH is set. - (execute_one_pass): Only call clean_graph_dump_file if dump_file != - NULL. Set TDF_GRAPH bit. - (execute_todo): Call print_rtl_graph_with_bb if TDF_GRAPH is set. - -2005-08-20 Richard Earnshaw - - * arm.h (arm_stack_offsets): Add locals_base field. - * arm.c (arm_get_frame_offsets): Compute it. - (thumb_compute_initial_elimination offset): Make the Thumb frame - pointer point to the base of the local variables. - (thumb_expand_prologue): Update accordingly. - (thumb_expand_epilogue): Likewise. - - * arm.md (thumb_movhi_clobber): Make this insn a define_expand. Change - mode of clobbered scratch to DImode. Handle a case that's known to - need this. - -2005-08-19 David Edelsohn - - * config/rs6000/rs6000.md (gt0): Delete. - (gt0_compare): Delete. - (neg_gt0): Delete. - -2005-08-19 Eric Christopher - - * optabs.h: Change CTI_ to COI_. - * optabs.c: Ditto. - -2005-08-19 James E Wilson - - * builtins.c (expand_builtin_return_addr): Set - current_function_accesses_prior_frames when count != 0. Use - frame_pointer_rtx when count == 0. - * function.h (struct function): Add accesses_prior_frames field. - (current_function_accesses_prior_frames): Define. - * reload1.c (init_elim_table): Check - current_function_accesses_prior_frames. - * doc/tm.texi (INITIAL_FRAME_ADDRESS_RTX): Update docs. - -2005-08-19 Diego Novillo - - * tree-cfgcleanup.c (cleanup_tree_cfg): Fix flowgraph change - indicator. Return true if the flowgraph changed during - cleanup. - -2005-08-19 Diego Novillo - - PR 23476 - * tree-cfgcleanup.c (cleanup_control_expr_graph): Fold the - conditional expression before testing its value. - -2005-08-19 Diego Novillo - - * doc/invoke.texi: Fix documentation for -ftree-dominator-opts. - -2005-08-19 Devang Patel - - PR tree-optimization/23048 - * tree-if-conv.c (if_convertible_bb_p): Supply basic_block as - third parameter. Check whether latch is dominated by exit - block or not. - (if_convertible_loop_p): Supply exit block itself to - if_convertible_bb_p. - -2005-08-19 Richard Earnshaw - - PR target/23473 - * arm.md (arm_load_pic_register): Change argument to the mask of - saved registers. Call thumb_find_work_register if we need a - scratch register on Thumb. - (arm_expand_prologue): Pass empty register set to - arm_load_pic_register. - (thumb_expand_prologue): Pass live_regs_mask directly to - arm_load_pic_register. - * arm-protos.h (arm_load_pic_register): Update prototype. - -2005-08-19 J"orn Rennecke - - * sh.c (find_sole_member): New function. - (sh_gimplify_va_arg_expr): Use it. Allow RECORD_TYPE mode mismatch - if the record's alignment is larger than the size of its only member. - -2005-08-19 Richard Earnshaw - - PR target/23436 - * arm.c (thumb_legitimize_reload_address): New function. - * arm-protos.h (thumb_legitimize_reload_address): Add prototype. - * arm.h (THUMB_LEGITIMIZE_RELOAD_ADDRESS): Call it. - -2005-08-19 Paul Woegerer - - * config/crx/crx.c: Implement crx_decompose_address. Reject - symbolic displacements since CRX register relative adressing - mode can't handle unsigned 32-bit values as displacements. - * config/crx/crx.h: Simplify definitions, remove redundant - parenthesis and obsolete macros. - * config/crx/crx.opt: Add new switch for debugging addresses. - * config/crx/crx-protos.h: Add new declarations for above. - -2005-08-19 Andrew Pinski - - PR middle-end/20624 - * gimple-low.c (block_may_fallthru): Handle CLEANUP_POINT_EXPR by - looking past it. - -2005-08-18 Kaveh R. Ghazi - - * collect2.c (dup2): Delete. - * configure.ac: Don't check for dup2. - - * config.in, configure: Regenerate. - -2005-08-18 J"orn Rennecke - - * sh.c (sh_gimplify_va_arg_expr): Loop to substitute a RECORD_TYPE - record with the type of its only member. - -2005-08-18 David Edelsohn - - * config/rs6000/rs6000.md (ltu_compare): Convert to - define_insn_and_split. - (plus_ltu_compare): Same. - (gtu_compare): Same. - (plus_gtu_compare): Same. - -2005-08-18 Dorit Nuzman - - PR tree-optimization/22228 - * tree-ssa-loop (pass_vectorize): Add TODO_verify_loops to - todo_flags_start. - * tree-vect-transform.c (vect_transform_loop): Mark the variables that - are recorded in vect_vnames_to_rename for renaming. - * tree-vectorizer.c (vect_vnames_to_rename): New global bitmap. - (slpeel_update_phi_nodes_for_guard1): Record virtual vars for renaming - in vect_vnames_to_rename. - (vectorize_loops): Allocate and free the vect_vnames_to_rename bitmap. - * tree-vectorizer.h (vect_vnames_to_rename): New extern variable. - -2005-08-18 Jan Hubicka - - PR c++/22034 - * cgraphunit.c (cgraph_varpool_assemble_pending_decls): Emit debug - info only for local statics, not for member variables. - -2005-08-18 Volker Reichelt - - * tree-data-ref.c (analyze_siv_subscript_cst_affine): Fix comment typo. - -2005-08-18 Volker Reichelt - - * c-typeck.c (designator_errorneous): Rename to designator_erroneous. - -2005-08-18 Andrew Pinski - - PR middle-end/16045 - * builtins.c (fold_builtin): Create a new NOP_EXPR all the time. - -2005-08-17 James E Wilson - - * c-decl.c (grokdeclarator): Use TYPE_SIZE_UNIT not TYPE_SIZE in - array size check. - -2005-08-17 David Edelsohn - - * config/rs6000/rs6000.md (leu): Convert to mode macro. - (leu_compare): Same. - (plus_leu): Same. - (neg_leu): Same. - (and_neg_leu_compare): Same. - (plus_ltu): Same. - (geu): Same. - (geu_compare): Same. - (plus_geu): Same. - (neg_geu): Same. - (and_neg_geu): Same. - (plus_gt): Same. - (gtu_compare): Same. - (plus_gtu): Same. - -2005-08-17 Erik Christiansen - - * config/v850/lib1funcs.asm (callt_save_interrupt): Fix comment typos. - Move call_table_data to end. Delete spurious .text. - (callt_save_all_interrupt): Fix comment typo. - -2005-08-17 James E Wilson - Kevin Winchester - - PR target/21684 - * config/mcore/mcore.h (SHIFT_COUNT_TRUNCATED): Define to 0. - -2005-08-17 Uros Bizjak - - PR target/23268 - * config/i386/i386.md ("*fist2_1"): New pattern. - ("lrint2"): Change expander to use "*fist2_1" pattern. - -2005-08-17 J"orn Rennecke - - * sh.c (sh_gimplify_va_arg_expr): Don't substitute a RECORD_TYPE - record with the type of its only member if the modes don't match. - - * varasm.c (decode_reg_name): Skip empty additional register names. - -2005-08-16 Zdenek Dvorak - - * tree-ssa-loop-im.c (MAX_LSM_NAME_LENGTH, lsm_tmp_name, - lsm_tmp_name_length): New. - (lsm_tmp_name_add, gen_lsm_tmp_name, get_lsm_tmp_name): New functions. - (schedule_sm): Use get_lsm_tmp_name instead of "lsm_tmp". - -2005-08-16 Ulrich Weigand - Andreas Krebbel - - * config.gcc: Added z9-109 switch. - * config/s390/2084.md ("x_int", "x_agen", "x_lr", "x_la", "x_larl", - "x_load", "x_store", "x_branch", "x_call", "x_mul_hi", "x_mul_sidi", - "x_div", "x_sem", "x_cs", "x_vs", "x_stm", "x_lm", "x_other", - "x_fsimpdf", "x_fsimpsf", "x_fdivdf", "x_fdivsf", "x_floaddf", - "x_floadsf", "x_fstore_df", "x_fstoresf", "x_ftoi", "x_itof"): Enable - for "z9_109" cpu attribute. - * config/s390/s390.c (z9_109_cost): New processor cost structure. - (CONST_OK_FOR_Os, CONST_OK_FOR_Op, CONST_OK_FOR_On): New macros. - (s390_handle_arch_option): Added z9-109 switch. - (override_options): Set respective cost function for z9-109. - (s390_const_ok_for_constraint_p): New constraints Os, Op, On. - (legitimate_reload_constant_p): Accept extended immediates. - (print_operand): Three new output modifiers added: k, m and o. - (s390_adjust_priority, s390_issue_rate): Handle Z9_109 like Z990. - (s390_output_mi_thunk): Use extended immediate when possible. - * config/s390/s390.h (processor_flags): Added PF_EXTIMM. - (TARGET_CPU_EXTIMM, TARGET_EXTIMM): New macros. - (CONSTRAINT_LEN): Added length of O constraint. - (CLZ_DEFINED_VALUE_AT_ZERO): Definition added. - * config/s390/s390.md ("cpu"): New value z9_109 added. - ("*tstdi_extimm", "*tstdi_ccconly_extimm", "*tstsi_extimm", - "*tstsi_cconly_extimm", "*movdi_64extimm", "*extendhidi2_extimm", - "*extendqidi2_extimm", "*extendhisi2_extimm", "*extendqisi2_extimm", - "*zero_extendsi2_extimm", "*anddi3_extimm", "*iordi3_extimm", - "*xordi3_extimm", "clzdi2", "clztidi2"): New patterns. - ("*tstdi", "*tstsi", "*movdi_64", "*extendhisi2", "*extendqisi2", - "*zero_extendsi2_64", "zero_extendqihi2", "*zero_extendqihi2_64", - "*anddi3", "*iordi3", "*xordi3"): Disable for TARGET_EXTIMM. - ("*cmpdi_cct", "*cmpsi_cct", "*cmpdi_ccs", "*cmpsi_ccs", "*cmpdi_ccu", - "*cmpsi_ccu", "*movsi_zarch", "*adddi3_imm_cc", "*adddi3_carry1_cc", - "*adddi3_carry2_cc", "*adddi3_cc", "*adddi3_64", "*addsi3_imm_cc", - "*addsi3_carry1_cc", "*addsi3_carry2_cc", "*addsi3_cc", "addsi3", - "*andsi3_cc", "*andsi3_cconly", "*andsi3_zarch", "*iorsi3_cc", - "*iorsi3_cconly", "*iorsi3_zarch", "*xorsi3_cc", "*xorsi3_cconly", - "*xorsi3", "*xorhi3", "*xorqi3"): Added instruction using extended - immediates. - ("extenddi2", "extendsi2", "zero_extenddi2", - "zero_extendsi2"): Allow memory operands and don't manually emit - insns for TARGET_EXTIMM. - -2005-08-17 Andreas Krebbel - - * testsuite/gcc.dg/20020926-1.c: Added "-mesa" to dg-options. - -2005-08-17 Nick Clifton - - * config/stormy16/stormy16.c (xstormy16_encode_section_info): - Call default_encode_section_info. - -2005-08-17 Steven Bosscher - - PR tree-optimization/21574 - * tree-ssa-ccp.c (likely_value): If the right hand side is a - constant, return CONSTANT. - (ccp_lattice_meet): Use operand_equal_p instead of simple_cst_equal. - (ccp_fold, visit_assignment): Likewise. - (evaluate_stmt): Handle UNDEFINED and UNKNOWN_VAL the same way. - -2005-08-16 James A. Morrison - - * c-typeck.c (build_function_call): Call fold_buildN_initializer or - fold_buildN instead of buildN then fold_initializer or fold. - (build_unary_op): Likewise. - (build_binary_op): Likewise. - * fold-const.c (fold_initializer): Remove. - (fold_build1_initializer): New function. - (fold_build2_initializer): New function. - (fold_build3_initializer): New function. - * tree.h (fold_initializer): Remove. - (fold_build1_initializer): New function. - (fold_build2_initializer): New function. - (fold_build3_initializer): New function. - -2005-08-16 James A. Morrison - - * fold-const.c (optimize_bit_field_compare): Remove extra fold call. - (try_move_mult_to_index): Call fold_build2 instead of build2. - (fold_binary): Don't call fold after calls to try_move_mult_to_index. - * tree-ssa-loop-niter.c (inverse): Call int_const_binop instead of - fold_binary_to_constant. - (infer_loop_bounds_from_undefined): Call fold_build2 instead of - fold (build. - * tree-data-ref.c (tree_fold_divides_p): Use tree_int_cst_equal to - check if A == gcd (A, B). Remove TYPE argument. - (analyze_offset) Use fold_build2 instead of fold (build. - (create_data_ref): Likewise. - (analyze_siv_subscript_cst_affine): Update calls to tree_fold_divides_p. - * tree-ssa-ccp.c (widen_bitfield): Call fold_build2 instead of build2 - then fold. - -2005-08-17 Kelley Cook - - * config/arm/unaligned-funcs.c,config/i386/crtfastmath.c, - ipa-cp.c,ipa-prop.c,ipa-prop.h: Update FSF address. - -2005-08-16 Andrew Pinski - - PR tree-opt/23402 - * gimplify.c (zero_sized_type): New function. - (gimplify_modify_expr_rhs): If we have a zero sized type, - replace the statement with an empty statement. - -2005-08-16 H.J. Lu - - * config/i386/crtfastmath.c (set_fast_math): Add "=m" for - fxsave. - -2005-08-16 Ian Lance Taylor - - * doc/tm.texi (Label Output): Correct typo. - -2005-08-16 Steven Bosscher - - PR target/23376 - * loop-unroll.c (analyze_insn_to_expand_var): Make sure that - force_operand will work later on using have_insn_for. - -2005-08-16 Volker Reichelt - - * fold-const.c (tree_expr_nonnegative_p): Regroup cases. - -2005-08-16 Ian Lance Taylor - - PR c++/23337 - * gimplify.c (gimplify_init_ctor_eval): If we see an element of - vector type, don't try to construct it element by element. Add an - assertion that we use a FIELD_DECL when building a COMPONENT_REF. - -2005-08-16 Volker Reichelt - - * fold-const.c (fold_ternary): Simplify folding of a CALL_EXPR. - -2005-08-16 Geoffrey Keating - - * doc/invoke.texi (Precompiled Headers): Document some more options - which are known to be safe. - -2005-08-16 James E Wilson - - PR tree-optimization/21105 - * c-decl.c (grokdeclarator): Use TYPE_SIZE_UNIT not TYPE_SIZE in - TREE_OVERFLOW check. - -2005-08-16 David Edelsohn - - * config/rs6000/rs6000.md (ltu): Convert to mode macro. - (neg_ltu): Same. - (gtu): Same. - (neg_gtu): Same. - -2005-08-16 Volker Reichelt - - * builtins.c (expand_builtin_strcat): Remove superfluous call to fold. - (fold_builtin_isdigit): Use fold_buildN. - (build_function_call_expr): Likewise. - * c-typeck.c (c_finish_loop): Likewise. - -2005-08-16 J"orn Rennecke - Richard Shann - - PR middle-end/20396: - * optabs.c (expand_binop): Take TRULY_NOOP_TRUNCATION into account. - -2005-08-16 Sebastian Pop - - * tree-ssa-loop-niter.c (scev_probably_wraps_p): Reword a comment. - -2005-08-15 Richard Earnshaw - - PR target/23355 - * arm.c (thumb_compute_save_reg_mask): Use similar logic to - arm_compure_save_reg0_reg12_mask to determine when the PIC register - must be saved. - -2005-08-15 John David Anglin - - PR middle-end/23369 - * fold-const.c (build_range_check): Disable optimization for function - pointer expressions on targets that require function pointer - canonicalization. - -2005-08-15 Ulrich Weigand - - * simplify-rtx.c (simplify_const_relational_operation): When - extracting arguments of a COMPARE, recompute the mode as well. - -2005-08-15 Ian Lance Taylor - - * tree.c (build_string): Mark tree CONSTANT and INVARIANT. - -2005-08-15 DJ Delorie - - * config/m32c/mov.md (movqi_op): Immediates can't be moved to - the stack. - (movsi_splittable): Allow, but split, moves to the stack. - * config/m32c/m32c.c (m32c_split_move): Always split moves to the - stack. - -2005-08-15 Kaveh R. Ghazi - - * aclocal.m4 (gcc_AC_FUNC_PRINTF_PTR): Delete. - * configure.ac: Don't call gcc_AC_FUNC_PRINTF_PTR. - * system.h (HOST_PTR_PRINTF): Don't define, poison it. - - * bitmap.c, c-decl.c, config/i386/i386-interix.h, - config/iq2000/iq2000.c, mips-tfile.c, print-rtl.c, print-tree.c: - Delete HOST_PTR_PRINTF. - - * configure, config.in: Regenerate. - -2005-08-15 David Edelsohn - - * config/rs6000/rs6000.md (QHSI): New mode macro. - (wd): Extend mode attr for QImode and HImode - (dbits): New mode attr. - (zero_extenddi2): Convert to mode macro. - -2005-08-15 Steve Ellcey - - PR target/21841 - * doc/invoke.texi (-mgnu-ld): Update description. - (-mhp-ld): Ditto. - -2005-08-15 Sebastian Pop - - PR 23391 - * Makefile.in (tree-chrec.o): Depends on real.h. - * tree-chrec.c: Include real.h. - (chrec_fold_plus_poly_poly, chrec_fold_multiply_poly_poly, - chrec_fold_plus_1): Use build_real for SCALAR_FLOAT_TYPE_P. - * tree-scalar-evolution.c (add_to_evolution_1, - interpret_rhs_modify_expr): Ditto. - -2005-08-15 Sebastian Pop - - PR 23386 - * tree-data-ref.c (estimate_niter_from_size_of_data): When - step is negative compute the estimation from init downwards to zero. - -2005-08-14 James A. Morrison - - * fold-const (fold_binary): Call fold_build2 instead of fold (build. - -2005-08-14 Ulrich Weigand - - * config/s390/s390.c (s390_const_ok_for_constraint_p): Add 'P' - constraint. - (legitimate_reload_constant_p): Fix handling of lliXX operands. - Accept double-word constants that can be split. - * config/s390/s390.md ("movti"): Use 'P' constraint. - ("*movdi_31", "*movdf_31"): Likewise. - -2005-08-14 Daniel Berlin - - Fix PR tree-optimization/22615 - - * tree-ssa-structalias.c (solution_set_add): Handle - first_vi_for_offset returning NULL. - (do_da_constraint): Ditto. - (do_sd_constraint): Ditto. - (do_ds_constraint): Ditto - (find_func_aliases): Ditto. - (build_constraint_graph): RHS is allowed be ANYTHING. - (first_vi_for_offset): Return NULL if we couldn't find anything at - the offset. - -2005-08-14 Ulrich Weigand - - * config/s390/s390.c (s390_canonicalize_comparison): Prefer register - over memory as first operand. - -2005-08-14 H.J. Lu - - PR target/23360 - * config/i386/crtfastmath.c (set_fast_math): Check if DAZ is - available for setting it. - -2005-08-14 Ira Rosen - - PR tree-optimization/23320 - * tree-data-ref.c (base_addr_differ_p): Add comment. Check - data-refs' types instead of base object nullness. Add check for - pointer type data-refs before first location comparison. Remove - assert. - -2005-08-14 Andreas Schwab - - * doc/md.texi (Machine Constraints): Fix misplaced @end table. - -2005-08-13 James E Wilson - - * doc/cpp.texi (__SSP__, __SSP_ALL__): Document. - * doc/invoke.texi (-Wstack-protector, -fstack-protector, - -fstack-protector-all, --param ssp-buffer-size): Document. - (-Wvariadic-macros): Alphabetize. - (-fsched-stalled-insns-dep): Add missing 'f'. - - * c-cppbuiltin.c (c_cpp_builtins): Add comment for flag_stack_protect - macros. - -2005-08-13 David Edelsohn - - * config/rs6000/rs6000.h (EXTRA_CONSTRAINT): Add 'a' for indexed - or indirect address operand. - (EXTRA_ADDRESS_CONSTRAINT): New. - * config/rs6000/rs6000.md (prefetch): Change constraint "p" to "a". - -2005-08-13 Sebastian Pop - - PR tree-optimization/22236 - * tree-cfg.c (print_pred_bbs, print_succ_bbs): Correctly print - successors and predecessors. - * tree-chrec.c (chrec_convert): Before converting, check that - sequences don't wrap. - * tree-data-ref.c (compute_estimated_nb_iterations): Moved ... - (analyze_array): Extern. - (find_data_references_in_loop): Remove call to - compute_estimated_nb_iterations. - * tree-data-ref.h (analyze_array): Declared. - * tree-flow-inline.h (single_ssa_tree_operand, single_ssa_use_operand, - single_ssa_def_operand, zero_ssa_operands): Fix documentation. - * tree-flow.h (scev_probably_wraps_p): Declare with an extra parameter. - * tree-scalar-evolution.c (instantiate_parameters_1): Factor entry - condition. - * tree-ssa-loop-ivcanon.c: Fix documentation. - * tree-ssa-loop-ivopts.c (idx_find_step): Add a fixme note. - * tree-ssa-loop-niter.c (compute_estimated_nb_iterations): ... here. - (infer_loop_bounds_from_undefined): New. - (estimate_numbers_of_iterations_loop): Use - infer_loop_bounds_from_undefined. - (used_in_pointer_arithmetic_p): New. - (scev_probably_wraps_p): Pass an extra parameter. Call - used_in_pointer_arithmetic_p. Check that AT_STMT is not null. - (convert_step): Fix documentation. - * tree-vrp.c (adjust_range_with_scev): Call instantiate_parameters. - Use initial_condition_in_loop_num and evolution_part_in_loop_num - instead of CHREC_LEFT and CHREC_RIGHT. Adjust the call to - scev_probably_wraps_p. - -2005-08-13 Ulrich Weigand - - * config/s390/s390.c (s390_split_branches): Revert 2005-08-12 change. - (s390_register_info): Ignore clobbered_regs information for fixed - registers, and only fixed registers. - (s390_init_frame_layout): Remove redundant call. - -2005-08-12 Gerald Pfeifer - - * doc/invoke.texi (C++ Dialect Options): Add dynamic_cast to - description of -Wold-style-casts. - -2005-08-12 Andreas Krebbel - Jakub Jelinek - - * config/s390/linux.h (TARGET_THREAD_SSP_OFFSET): Define. - * config/s390/s390-protos.h (s390_get_thread_pointer): Prototype added. - * config/s390/s390.c (print_operand): New output modifier 'G' added. - (get_thread_pointer): Renamed to s390_get_thread_pointer. - * config/s390/s390.md (stack_protect_set, stack_protect_test): If - TARGET_THREAD_SSP_OFFSET is defined, change operands[1] to - (MEM:P (PLUS:P (tp, TARGET_THREAD_SSP_OFFSET))). - (UNSPEC_SP_SET, UNSPEC_SP_TEST): New constants. - ("stack_protect_set", "stack_protect_test"): New expanders. - ("stack_protect_setsi", "stack_protect_setdi", "stack_protect_testsi", - "stack_protect_testdi"): New insn definitions. - -2005-08-12 Andreas Krebbel - - * config/s390/s390.md ("*movdf_31"): Changed constraint from P to K. - -2005-08-12 Paul Brook - - * config/arm/lib1funcs.asm: Error if __ARM_ARCH__ not set. - -2005-08-12 Andreas Krebbel - - * config/s390/predicates.md (setmem_operand): New predicate. - (shift_count_operand): Accept ANDs with special constants as - operand. - * config/s390/s390.c (print_shift_count_operand): Skip ANDs - with special constants. - * config/s390/s390.md ("setmem_long", "*setmem_long"): Replaced - shift_count_operand with setmem_operand. - -2005-08-12 Andreas Krebbel - - * config/s390/s390.c (s390_extract_part, s390_single_part): - Type cast added. - (s390_const_ok_for_constraint_p): Added SImode to the N constraint. - (s390_output_mi_thunk): Don't use lg on 31 bit. - * config/s390/s390.md ("*movdi_31", "*movdf_31"): Added lmy and stmy. - ("*llgt_sisi" and splitter): Replaced TARGET_64BIT with TARGET_ZARCH. - -2005-08-12 Andreas Krebbel - - * config/s390/s390.c (CONST_OK_FOR_J, CONST_OK_FOR_K): New macros. - (s390_select_ccmode, s390_rtx_costs, legitimate_reload_constant_p, - s390_init_frame_layout, s390_emit_prologue, s390_emit_epilogue, - s390_output_mi_thunk): Replaced uses of CONST_OK_FOR_CONSTRAINT_P - with one of the new macros. - -2005-08-12 Andreas Krebbel - - * config/s390/s390.c (s390_split_branches, s390_init_frame_layout): - Don't set save_return_addr_p. - (s390_register_info): Make clobbered_regs not depending on - save_return_addr_p. - -2005-08-12 Kaz Kojima - - * gcc.c (LINK_SSP_SPEC): Remove space before a trailing }. - (LINK_COMMAND_SPEC): Add space after %(link_ssp). - -2005-08-11 James E. Wilson - - * config/ia64/ia64.h (EXTRA_MEMORY_CONSTRAINT): New. - -2005-08-11 Jakub Jelinek - - * dwarf2out.c (add_location_or_const_value_attribute): Prefer - locations gathered by var-tracking in single entry loc_list - over loc_descriptor_from_tree. - - * dwarf2out.c (concat_loc_descriptor): Add can_use_fbreg argument, - pass it down to loc_descriptor. - (loc_descriptor): Pass can_use_fbreg to concat_loc_descriptor. - (containing_function_has_frame_base): Move earlier in the file. - (loc_descriptor_from_tree_1): Use containing_function_has_frame_base - instead of always assuming fbreg can't be used. - -2005-08-11 David Edelsohn - - * config/rs6000/altivec.md: Change constraint "m" to "Z". - * config/rs6000/predicates.md (indexed_or_indirect_operand): - Accept address wrapped in AND for Altivec. - * config/rs6000/rs6000.c (rs6000_legitimize_reload_address): - Strip AND wrapping offset address for Altivec. - -2005-08-11 Richard Henderson - - PR middle-end/23312 - * gimplify.c (gimplify_one_sizepos): Check for INTEGER_TYPE - before using TYPE_IS_SIZETYPE. - -2005-08-11 Richard Henderson - - PR target/22225 - * config/alpha/alpha.c (alphaev4_insn_pipe): Add take pipes for - insn types not present on ev4. - (alphaev5_insn_pipe): Similarly. - -2005-08-11 Richard Earnshaw - - PR target/23250 - * arm.c (arm_override_options): If the user has selected callee-super- - interworking, then enable normal interworking. - -2005-08-11 Rainer Orth - - * config/i386/x86-64.h (ASM_OUTPUT_ALIGNED_BSS): Undef before - redefinition. - -2005-08-11 Wu Zhou - - * doc/rtl.texi: Fix two typos. - -2005-08-11 Richard Guenther - - PR target/23289 - * config/i386/i386.c (ix86_function_ok_for_sibcall): Handle - cases where we call to/from functions returning void. - -2005-08-10 James A. Morrison - - PR c++/23225 - * tree.c (build_pointer_type_for_mode): Robustify. - -2005-08-10 James E Wilson - - * defaults.h, config/alpha/alpha.h, config/ia64/ia64.h - (ASM_OUTPUT_ADDR_VEC_ELT): Delete. - - * config/alpha/alpha.c (alpha_arg_partial_bytes): Change "(CUM)." to - "cum->". - -2005-08-10 Eric Christopher - - * config/rs6000/rs6000.c (mems_ok_for_quad_peep): Rewrite. - * config/rs6000/rs6000.md (*lfq_power2, *stfq_power2): Use - V2DFmode. - -2005-08-10 Andrew Pinski - - PR target/21887 - * config/darwin.c (machopic_indirect_data_reference): Use a new register - for the high part when generating dynamic-no-pic code. - -2005-08-10 H.J. Lu - - * config.gcc (i[34567]86-*-linux*): Add i386/t-crtfm to tm-file. - (x86_64-*-linux*): Likewise. - - * config/i386/crtfastmath.c: New file. - * config/i386/t-crtfm: Likewise. - - * config/i386/linux.h (ENDFILE_SPEC): New. - * config/i386/linux64.h (ENDFILE_SPEC): Likewise. - - * config/i386/t-linux64 (EXTRA_MULTILIB_PARTS): Add - crtfastmath.o. - -2005-08-10 Dorit Nuzman - - * doc/md.texi: (reduc_smin, reduc_umin, reduc_splus, reduc_uplus): - (vec_shl, vec_shr): Document new operations. - * tree.def (VEC_RSHIFT_EXPR, VEC_LSHIFT_EXPR): Fix comment. - -2005-08-10 David Edelsohn - - * config/rs6000/predicates.md (indexed_or_indirect_address): New. - * config/rs6000/rs6000.md (prefetch): Remove operand 0 mode and - change predicate to indexed_or_indirect_address. - -2005-08-10 Richard Sandiford - - * config/arm/lib1funcs.asm (__aeabi_uidiv, __aeabi_idiv): New aliases. - * config/arm/libgcc-bpabi.ver (GCC_3.5): Add __aeabi_idiv, - __aeabi_uidiv, __aeabi_uread4, __aeabi_uread8, __aeabi_uwrite4 - and __aeabi_uwrite8. - * config/arm/unaligned-funcs.c: New file. - * config/arm/t-bpabi (LIB2FUNCS_EXTRA): Add unaligned-funcs.c. - -2005-08-09 Paolo Bonzini - - * bb-reorder.c (pass_duplicate_computed_gotos, pass_partition_blocks): - Add dump. - * cfglayout.c (pass_insn_locators_initialize): Add dump. - * emit-rtl.c (pass_unshare_all_rtl, pass_remove_unnecessary_notes): - Add dump. - * except.c (pass_convert_to_eh_region_ranges): Add dump. - * final.c (pass_shorten_branches): Add dump. - * flow.c (pass_recompute_reg_usage, pass_remove_death_notes): Add dump. - (pass_life): Rename dump. - (rest_of_handle_flow2): Remove initial verify_flow_info. - * function.c (pass_instantiate_virtual_regs): Add dump. - * integrate.c (pass_initial_value_sets): Add dump. - * jump.c (pass_cleanup_barriers, pass_purge_lineno_notes): Add dump. - * loop-init.c (pass_rtl_loop_init, pass_rtl_loop_done): Rename dump. - (pass_rtl_move_loop_invariants, pass_rtl_unswitch, pass_rtl_doloop, - pass_rtl_unroll_and_peel_loops): Rename dump and add gate. - (gate_rtl_move_loop_invariants, gate_rtl_unswitch, gate_rtl_doloop, - gate_rtl_unrool_and_peel_loops): New. - (rtl_move_loop_invariants, rtl_unswitch, rtl_unrool_and_peel_loops, - rtl_doloop): Do not look at flags. - * mode-switching.c (pass_mode_switching): Add dump. - * recog.c (pass_split_all_insns, pass_split_for_shorten_branches, - pass_split_before_regstack): Add dump. - * regmove.c (pass_stack_adjustments): Add dump. - * tree-optimize.c (pass_fixup_cfg): Add dump. - -2005-08-10 Kazuhiro Inaoka - - PR 23309 - * config/m32r/m32r.c (m32r_reload_lr): Fix off by one error when - deciding which instruction sequence to use. - -2005-08-09 Dorit Nuzman - - * tree-vect-transform.c (vect_create_epilog_for_reduction): Set - BIT_FIELD_REF_UNSIGNED for newly created BIT_FIELD_REFs. - -2005-08-09 Richard Guenther - - * c-common.c (builtin_function_2): Remove. - (def_builtin_1): New function. - (c_common_nodes_and_builtins): Use def_builtin_1 to - build builtin functions. - -2005-08-09 Jie Zhang - - * config/bfin/uclinux.h (NO_IMPLICIT_EXTERN_C): Define. - * config/bfin/elf.h (NO_IMPLICIT_EXTERN_C): Define. - * config/bfin/bfin.c (bfin_return_in_memory): Update to really match - Visual DSP. - -2005-08-09 James A. Morrison - - * tree-ssa-loop-niter.c (tree_simplify_using_condition_1): Use - fold_binary instead of fold_build2 since we don't care about the - resulting tree. - (loop_niter_by_eval): Likewise. - (compare_trees): Likewise. - (proved_non_wrapping_p): Likewise. - -2005-08-09 James A. Morrison - - PR c/23161 - PR c/23165 - * c-typeck.c (c_finish_if_stmt): Look into STATEMENT_LISTs to see - if the if is really empty. - -2005-08-09 Steven Bosscher - - PR tree-optimization/23234 - * tree-ssa-math-opts.c (place_reciprocal): New enum. - (execute_cse_reciprocals_1): Replace the 'phi' argument with an - argument of the new enum. - (execute_cse_reciprocals): Add reciprocals for function arguments - on the unique successor edge of the entry block. Update other calls - to execute_cse_reciprocals_1. - -2005-08-08 Richard Henderson - - PR 22439 - * gimplify.c (gimplify_one_sizepos): Preserve the original type. - -2005-08-08 Bob Wilson - - * expr.c (write_complex_part): Return after handling MEM. - -2005-08-08 Josh Conner - - PR rtl-optimization/23241 - * combine.c (simplify_comparison): Fix error in determining - whether to lift a subreg from comparison. - -2005-08-08 David Edelsohn - - PR target/18506 - * config/rs6000/altivec.md (vec_init): New. - (vec_set): New. - (vec_extract): New. - * config/rs6000/rs6000.c (rs6000_expand_vector_init): New. - (rs6000_expand_vector_set): New. - (rs6000_expand_vector_extract): New. - (rs6000_legitimate_offset_address_p): Offset addresses are valid - for Altivec modes before reload. - (altivec_expand_vec_init_builtin): New. - (get_element_number): New. - (altivec_expand_vec_set_builtin): New. - (altivec_expand_vec_ext_builtin): New. - (altivec_expand_builtin): Expand vec_init, vec_set, and vec_ext - builtins. - (altivec_init_builtins): Init vec_init, vec_set, and vec_ext - builtins. - * config/rs6000/rs6000.h (rs6000_builtins): Add - ALTIVEC_BUILTIN_VEC_INIT_, ALTIVEC_BUILTIN_VEC_SET_, - ALTIVEC_BUILTIN_VEC_EXT_. - * config/rs6000/rs6000-protos.h: Declare new functions. - -2005-08-08 Jan Hubicka - - * i386.c (legitimate_pic_address_disp_p): Refuse GOTOFF in 64bit mode. - (legitimate_address_p): Refuse GOT and GOTOFF in 64bit mode. - * i386.md (movdi*): Use pic_32bit_operand. - * predicates.md (pic_32bit_operand): New. - -2005-08-08 Nathan Sidwell - - PR c++/21166 - * stor-layout.c (finalize_type_size): Undo DECL_PACKED when possible. - -2005-08-07 James A. Morrison - - * tree-vrp.c (simplify_div_or_mod_using_range): Use build2. - (test_for_singularity): Use fold_build2. - -2005-08-07 John David Anglin - - * pa64-regs.h (CONDITIONAL_REGISTER_USAGE): Fix loop upper bound. - -2005-08-07 Danny Smith - - * config/i386/cygming.h (SUBTARGET_ENCODE_SECTION_INFO): Define. - (COMMON_ASM_OP) Define. - * config/i386/i386.c (ix86_in_large_data_p): Add ATTRIBUTE_UNUSED - (ix86_encode_section_info): Likewise. - (TARGET_ENCODE_SECTION_INFO): Conditionally define as - SUBTARGET_ENCODE_SECTION_INFO. - -2005-08-06 Richard Henderson - - PR 21894 - * tree-nested.c (convert_local_reference): Save and restore val_only - around component_ref and friends. Clear walk_subtrees by default. - -2005-08-06 Peter O'Gorman - - PR 21366 - * gcc.c (process_command): Check the argument to -b has a dash. - * doc/invoke.texi: Update -b and -V docs. - -2005-08-06 James E Wilson - - * config/mips/cross64.h, config/mips/t-cross64: Delete. - -2005-08-06 Michael Matz - - * genattrtab.c (write_attr_get, write_attr_case): Use insn_code - member only if only one insn is associated with the value. - -2005-08-06 Nick Clifton - - * config/stormy16/stormy16.h (SYMBOL_FLAG_XSTORMY16_BELOW100): - New define. - (ASM_OUTPUT_LABELREF): Delete - it is no longer needed. - * config/stormy16/stormy16.c (xstormy16_below100_symbol): - Check symbol flags instead of symbol name mangling. - (xstormy16_asm_output_aligned_common): Likewise. Also - simplify code since the bss100_section cass is the only case - where the below100 code will be triggered. - (xstormy16_encode_section_info): Encode below100 attribute - using the SYMBOL_FLAG_XSTORMY16_BELOW100 instead of mangling - the name. - (xstormy16_strip_name_encoding): Delete - this function is no - longer needed. - (TARGET_STRIP_NAME_ENCODING): Undefine. - * config/stormy16/stormy16-protos.h: Delete prototype for - xstormy16_strip_name_encoding. - -2005-08-06 Kazu Hirata - - * Makefile.in, cfgexpand.c, cfgloop.h, cfgloopmanip.c, - config.gcc, ipa-cp.c, ipa-prop.c, ipa-prop.h, reg-stack.c, - tree-ssa-structalias.c, tree-vrp.c, value-prof.c, vec.h, - config/linux.h, config/alpha/alpha.h, config/alpha/linux.h, - config/alpha/predicates.md, config/arc/arc.h, - config/arm/arm.h, config/arm/ieee754-df.S, - config/arm/ieee754-sf.S, config/bfin/bfin.c, - config/bfin/bfin.h, config/c4x/c4x.h, config/crx/crx.c, - config/fr30/fr30.h, config/frv/frv.h, config/h8300/h8300.h, - config/i386/i386.h, config/ia64/ia64.c, config/ia64/ia64.h, - config/m68hc11/m68hc11.h, config/mips/mips.c, - config/mips/mips.h, config/mips/openbsd.h, - config/mn10300/mn10300.h, config/pa/pa.c, config/pa/pa.h, - config/pdp11/pdp11.h, config/rs6000/linux-unwind.h, - config/rs6000/rs6000.c, config/rs6000/rs6000.h, - config/s390/s390.c, config/sh/sh.c, config/sh/sh.h, - config/sparc/linux.h, config/sparc/linux64.h, - config/sparc/sparc.h, config/v850/v850.h, config/vax/vax.h, - doc/extend.texi, doc/gcov.texi, doc/install.texi, - doc/invoke.texi, doc/rtl.texi, doc/tm.texi: Fix comment/doc - typos. Follow spelling conventions. - -2005-08-06 Joseph S. Myers - - PR c/23113 - * stmt.c (warn_if_unused_value): Check TREE_NO_WARNING at start. - Don't handle NOP_EXPR, CONVERT_EXPR and NON_LVALUE_EXPR - specially. Check for side effects only for COND_EXPR. - * c-typeck.c (c_finish_stmt_expr): Mark statement expression - return with TREE_NO_WARNING. - -2005-08-06 Richard Sandiford - - PR rtl-optimization/23233 - * loop.c (combine_movables): Require the modes to be the same. - (move_movables): Remove handling of cases where the replacement - had a different mode to the original. - -2005-08-05 James A. Morrison - - PR tree-optimization/23128 - * tree-vrp.c (vrp_int_const_binop): Check if unsigned addition or - subtraction wrap, and set TREE_OVERFLOW if they do. - -2005-08-05 Richard Henderson - - PR 21728 - * tree-cfg.c (remove_bb): Transmute DECL_NONLOCAL labels into - FORCED_LABEL labels. - -2005-08-05 J"orn Rennecke - - PR middle-end/23135 - * reload.c (find_reloads_subreg_address): Pass down TYPE - unchanged. Change all callers except find_reloads_toplev. - -2005-08-05 Michael Matz - - * genattrtab.c (current_alternative_string): Remove. - (SIMPLIFY_ALTERNATIVE): Ditto. - (attr_alt_bit_p): Ditto. - (alternative_name): Make const char *. - (evaluate_eq_attr): Remove use of above things. - (simplify_test_exp): Ditto. - (simplify_test_exp ): Guard for insn_code < 0 . - (simplify_test_exp ): Correct typo (test 'right' not 'left'). - -2005-08-04 James E Wilson - - * config/ptx4.h, config/sol2.h, config/arm/freebsd.h, - config/arm/linux-elf.h, config/frv/frv.h, config/i386/freebsd.h, - config/i386/freebsd64.h, config/i386/netware.h, config/i386/sco5.h, - config/ia64/freebsd.h, config/rs6000/sysv4.h, config/sparc/freebsd.h - (LINK_SPEC): Delete useless %{Wl,*:%*} item. - -2005-08-04 Richard Henderson - - PR 21529 - * params.def (PARAM_SRA_MAX_STRUCTURE_COUNT): New. - * params.h (SRA_MAX_STRUCTURE_COUNT): New. - * tree-sra.c (decide_block_copy): Use it. Disable element copy - if we'd have to instantiate too many members. - -2005-08-04 Richard Henderson - - PR 21291 - * tree-outof-ssa.c (coalesce_asm_operands): New. - (coalesce_ssa_name): Use it. Split out ... - (coalesce_phi_operands, coalesce_result_decls): ... these. - -2005-08-04 Paul Brook - - * read-rtl.c (read_quoted_string): Break if EOF. - -2005-08-04 Andrew Pinski - - * tree.h (fold_build1): Change to macro and call fold_build1_stat. - (fold_build2): Likewise. - (fold_build3): Likewise. - (fold_build1_stat): New function prototype. - (fold_build2_stat): Likewise. - (fold_build3_stat): Likewise. - * fold-const.c (fold_build1): Rename to .. - (fold_build1_stat): this. Add MEM_STAT_DECL. Pass the mem stats - through to build1_stat. - (fold_build2): Rename to .. - (fold_build2_stat): this. Add MEM_STAT_DECL. Pass the mem stats - through to build2_stat. - (fold_build3): Rename to .. - (fold_build3_stat): this. Add MEM_STAT_DECL. Pass the mem stats - through to build3_stat. - -2005-08-04 David Edelsohn - Ian Lance Taylor - - * function.c (assign_stack_local_1): Do not correct stack slot - address if allocation size is smaller than mode size. - -2005-08-04 Diego Novillo - - PR 22037 - * tree-cfg.c (replace_uses_by): Call mark_new_vars_to_rename. - (tree_merge_blocks): Propagate anything allowed by - may_propagate_copy. - Clarify documentation. - * passes.c (execute_todo): If cleanup_tree_cfg invalidated the - SSA form, schedule an update if necessary. - -2005-08-04 Gerald Pfeifer - - * doc/install.texi (Binaries): Remove broken link to - Sinix/Reliant Unix binaries. - -2005-08-03 Richard Henderson - - PR 23221 - * function.c (stack_protect_epilogue): Export. - * tree.h (stack_protect_epilogue): Declare. - * calls.c (expand_call): Call it. - -2005-08-03 Eric Christopher - - * gcc.c (LINK_SSP_SPEC): Add fstack-protector-all. - * config/darwin.h (LINK_COMMAND_SPEC): Add link_ssp - spec. - -2005-08-04 Jan Hubicka - - * profile.c (branch_prob): Split edges with goto locus on them - to get proper line counts. - * tree-cfg.c (make_cond_expr_edges): Record user goto locuses, if any. - -2005-08-03 Paul Brook - - * function.c (assign_parms): Round current_function_args_size - to PARM_BOUNDARY, not STACK_BOUNDARY. - -2005-08-03 Geoffrey Keating - - * config/i386/i386.c (x86_elf_aligned_common) - (x86_output_aligned_bss): Don't try to use symbols that aren't defined. - -2005-08-03 Zdenek Dvorak - - PR tree-optimization/23157 - * tree-scalar-evolution.c (scev_const_prop): Unshare trees - before emitting them. - -2005-08-03 Volker Reichelt - - PR tree-optimization/19899 - * Makefile.in (tree-scalar-evolution.o): Add real.h. - * tree-scalar-evolution.c: Include real.h. - (add_to_evolution): Build constant -1 of correct type. - -2005-08-03 Jan Hubicka - - * cfgloop.h (DLTHE_FLAG_COMPLETTE_PEEL): New flag. - * cfgloopmanip.c (duplicate_loop_to_header_edge): Special case - profile updating for complette unrolling. - * loop-unroll.c (peel_loop_completely): Use it. - * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Likewise. - (tree_unroll_loops_completely): Disable code growing unrolling of cold - loops. - -2005-08-03 Paul Brook - - * combine.c (can_change_dest_mode): New function. - (try_combine, simplify_set): Use it. - -2005-08-03 Eric Botcazou - - * config/ia64/hpux.h (MEMBER_TYPE_FORCES_BLK): Only force - TFmode to BLKmode. - -2005-08-03 Gerald Pfeifer - - * doc/install.texi (Specific): Adjust link to openavr.org. - (Specific): Remove broken reference to GCC 2.8.1 for OS/2. - (Binaries): Adjust HP-UX Porting Center link. - (Binaries): Adjust Free Software Foundation ordering link. - -2005-08-03 Andrew Pinski - - * convert.c (convert_to_integer): Use fold_build1 instead of - build1 when converting an integer to an integer. - -2005-08-02 Richard Henderson - - * combine.c (combine_instructions): Don't use reg_equal/equiv - results if the mode doesn't match. - -2005-08-02 Mark Mitchell - - * config/i386/t-mingw32 (NATIVE_SYSTEM_HEADER_DIR): Set it. - * doc/fragments.texi (NATIVE_SYSTEM_HEADER_DIR): Document it. - -2005-08-02 Richard Henderson - - PR 23196 - * explow.c (memory_address): Remove special-case for - virtual_stack_vars_rtx and virtual_incoming_args_rtx. - -2005-08-02 Diego Novillo - - PR 23164 - * tree-cfgcleanup.c (cleanup_tree_cfg): Do not limit the - number of calls to cleanup_tree_cfg_1. - -2005-08-02 Martin Reinecke - - * doc/invoke.texi: document file extensions .F90 and .F95 - -2005-08-02 Richard Guenther - - * fold-const.c (tree_expr_nonnegative_p): frexp(x, &e) is - positive if its first argument is positive. - -2005-08-02 Richard Guenther - - PR tree-optimization/23177 - * tree-ssa-operands.c (get_tmr_operands): Use get_expr_operands - on TMR_TAG. - -2005-08-02 James A. Morrison - - PR tree-optimization/23129 - * tree-vrp.c (extract_range_from_binary_expr): Set value range to - varying for divisions with anti-ranges. - -2005-08-02 Jan Hubicka - - * tree-ssa-dom.c (thread_across_edge): Remove updating here. - * tree-ssa-threadupdate.c (thread_block): Add it here. - -2005-08-01 James E Wilson - - * config/mips/mips.c (mips_encode_section_info, mips_attribute_table, - TARGET_ENCODE_SECTION_INFO, TARGET_ATTRIBUTE_TABLE): New. - * config/mips/mips.h (SYMBOL_FLAG_LONG_CALL, SYMBOL_REF_LONG_CALL_P): - New. - * config/mips/predicates.md (const_call_insn_operand): Add check for - SYMBOL_REF_LONG_CALL_P. - * doc/extend.texi (long_call): Document the new attribute. - -2005-08-01 Ian Lance Taylor - Richard Henderson - - * Makefile.in (RTL_BASE_H): Add real.h. - * real.h (REAL_VALUE_FROM_CONST_DOUBLE): Use structure copy - instead of memcpy. - * emit-rtl.c (const_double_from_real_value): Likewise; use rtx.u.rv - directly. - * rtl.c (rtl_check_failed_code_mode): New. - * rtl.h (struct rtx_def): Add u.rv. - (XCMWINT, XCNMPRV): New. - (CONST_DOUBLE_LOW, CONST_DOUBLE_HIGH): Use XCMWINT. - (CONST_DOUBLE_REAL_VALUE): Use XCNMPRV; constify. - -2005-08-01 Richard Henderson - - * dwarf2out.c (mem_loc_descriptor): Use XEXP, not SUBREG_REG, - with auto-inc codes. - - * config/alpha/predicates.md (and_operand): Test mode of CONST_DOUBLE. - -2005-08-01 Jan Hubicka - - * i386-protos.h (asm_preferred_eh_data_format): Declare. - * i386.c: Include dwarf2.h - (asm_preferred_eh_data_format): New. - * i386.h (ASM_PREFERRED_EH_DATA_FORMAT): Move offline. - -2005-08-01 Ian Lance Taylor - - * config/host-linux.c (linux_gt_pch_get_address): Add new name - randomize_va_space for virtual address randomization control. - -2005-08-01 Steven Bosscher - - * common.opt (flag_ipa_cp): Put in right place to maintain - alphabetic sort. - -2005-08-01 Jan Hubicka - - * profile.c (compute_value_histograms): Fix thinko. - * value-prof.c: Include toplev.h - (check_counter): New function. - (tree_divmod_fixed_value_transform, tree_mod_pow2_value_transform, - tree_mod_subtract_transform): Add sanity check. - -2005-08-01 Richard Guenther - - PR tree-optimization/23133 - * tree-ssa-math-opts.c (execute_cse_reciprocals): Walk - current functions parameter decls to find defs to cse - reciprocals of. - -2005-08-01 Richard Guenther - - PR tree-optimization/23109 - * tree-ssa-math-opts.c (execute_cse_reciprocals_1): - If trapping math is in effect, use post-dominator information - to check if we'd in any case reach a trapping point before - doing the reciprocal insertion. - (execute_cse_reciprocals): Compute post-dominators, if necessary. - * tree-ssa-loop-im.c (determine_invariantness_stmt): RDIV - expressions are invariant only if trapping math is not in effect. - -2005-08-01 Razya Ladelsky - - * cgraph.h (update_call_expr, cgraph_copy_node_for_versioning, - cgraph_function_versioning): New declarations. - * cgraphunit.c: Add include to ipa-prop.h. - (update_call_expr, cgraph_copy_node_for_versioning, - cgraph_function_versioning): New functions. - * integrate.c (copy_decl_for_inlining): Remove. - * ipa-prop.h (ipa_replace_map): New struct. - (struct ipa_node): Add ipcp_orig_node, count_scale, new fields. - * ipa-cp.c (ipcp_method_orig_node, ipcp_method_is_cloned, - ipcp_method_set_orig_node, ipcp_cloned_create, ipcp_method_get_scale, - ipcp_method_set_scale, ipcp_method_compute_scale, ipcp_after_propagate, - ipcp_iterate_stage, ipcp_method_scale_print, - ipcp_profile_mt_count_print, ipcp_profile_cs_count_print, - ipcp_profile_edge_print, ipcp_profile_bb_print , ipcp_profile_print, - ipcp_replace_map_create, ipcp_redirect, ipcp_update_callgraph, - ipcp_update_bb_counts, ipcp_update_profiling, - ipcp_update_edges_counts): New functions. - (ipcp_method_cval_init): Remove restriction regarding local methods. - (ipcp_init_stage): Add ipcp_method_compute_scale. - (ipcp_insert_stage): Add versioning. - (ipcp_structures_print): Add ipcp_method_scale_print. - (ipcp_driver): Dump profiling info. - * Makefile.in: Remove integrate.h dependency from tree-inline.o. - Add ipa-prop.h dependency to tree-inline.o and cgraphunit.o. - * tree-inline.c: Remove include to integrate.h, Add include ipa-prop.h. - (struct inline_data): Add versioning_p, ipa_info, new fields. - (remap_decl, mark_local_for_remap_r, setup_one_parameter, - declare_return_variable): Replace calls to copy_decl_for_inlining with - copy_decl_for_dup. - (copy_body_r, copy_bb, copy_cfg_body, copy_tree_r, inlining_p): Add - versioning support. - (copy_decl_for_dup): Rename from copy_decl_for_inlining. - Add argument VERSIONING. - (copy_arguments_for_versioning, copy_static_chain, - function_versionable_p, tree_versionable_function_p, - tree_function_versioning, replace_ref_tree): New functions. - * tree-inline.h: Include varray.h. - (tree_versionable_function_p, tree_function_versioning, - tree copy_decl_for_dup): New declarations. - -2005-08-01 Razya Ladelsky - - * ipa-cp.c: New file. Contains IPCP specific functionality. - * ipa-prop.h: New file. Contains structures/definitions that can be - used by several interprocedural data flow optimizations (and also IPCP). - * ipa-prop.c: New file. - * Makefile.in: Add ipa-cp.c, ipa-prop.h, ipa-prop.c. - * common.opt: Add ipa-cp flag. - * timevar.def: Add IPCP optimization. - * tree-optimize.c (init_tree_optimization_passes): Schedule - pass_ipa_cp. - * tree-pass.h (pass_ipa_cp): Declare. - -2005-08-01 Kazu Hirata - - * dwarf2out.c, fold-const.c, ipa-type-escape.c, - loop-invariant.c, predict.c, predict.def, reload1.c, reorg.c, - tree-sra.c, config/arm/arm.c, config/crx/crx.c, - config/i386/i386.c, config/mips/mips.h, - config/rs6000/rs6000.h, config/sh/sh.c, - config/stormy16/stormy16.c: Fix comment typos. - -2005-08-01 Joseph S. Myers - - PR c/22311 - * c-typeck.c (build_binary_op): Use common_type wrapper on - shortened types. - (common_type): Update comment. - -2005-07-31 Steven Bosscher - - PR target/23095 - * common.opt (flag_gcse_after_reload): Don't initialize to 2. - (flag_rerun_cse_after_loop): Initialize this to 2 instead. - * postreload-gcse.c (hash_scan_set): Do not consider stack regs. - -2005-07-31 Jan Hubicka - - * pretty-print.h (pp_widest_integer): New macro. - * tree-pretty-print.c (dump_bb_header): Print BB frequencies and - counts. - -2005-07-31 Jan Hubicka - - * output.h (enum section_category): Export from varasm.c - (categorize_decl_for_section): Likewise. - * varasm.c (enum section_category): Kill. - (categorize_decl_for_section): Make global. - * i386-protos.h (x86_output_aligned_bss, x86_elf_aligned_common): - Declare. - * i386.c (ix86_section_threshold): New static variable. - (ix86_in_large_data_p, ix86_encode_section_info, - x86_64_elf_unique_section, - x86_64_elf_select_section): New functions. - (TARGET_ENCODE_SECTION_INFO): Define - (override_options): Enable medium model for PIC. - (ix86_expand_prologue): Expand gen_set_got_rex64. - (legitimate_constant_p): Handle new UNSPECs. - (legitimate_pic_address_disp_p): Likewise. - (legitimize_pic_address): Lower MEDIUM model addressing. - * i386.h (PIC_OFFSET_TABLE_REGNUM): Set for medium model PIC. - (enum cmodel): Add MEDIUM_PIC. - (SYMBOL_REF_FAR_ADDR_P): New macro. - (SYMBOL_FLAG_FAR_ADDR): New flag. - * i386.md (movdi): Support medium model. - (set_got_rex64): New pattern. - * i386.opt (mlarge-data-threshold): New flag. - * predicates.md (zext_operand/sext_operand): Deal with medium model. - * x86-64.h (ASM_OUTPUT_ALIGNED_BSS): Use x86_output_aligned_bss. - (ASM_OUTPUT_ALIGNED_COMMON, TARGET_ASM_SELECT_SECTION, - TARGET_ASM_UNIQUE_SECTION): New. - - * invoke.texi (-mlarge_data_threshold): Document - -2005-07-31 Jan Hubicka - - * tree-outof-ssa.c (coalesce_ssa_name): Use coalesce_cost. - (coalesce_vars): Likewise. - * tree-ssa-live.c (coalesce_cost): New. - (build_tree_conflict_graph): Use coalesce_cost. - * tree-ssa-live.h (coalesce_cost): Declare. - -2005-07-30 Richard Earnshaw - - * arm.md (all peepholes for post-increment operations): Delete. - (strqi_preinc, strqi_predec, loadqi_preinc, loadqi_predec) - (loadqisi_preinc, loadqisi_predec, strsi_preinc, strsi_predec) - (loadsi_preinc, loadsi_predec, strqi_shiftpreinc, strqi_shiftpredec) - (loadqi_shiftpreinc, loadqi_shiftpredec, strsi_shiftpreinc) - (strsishift_predec, loadsi_shiftpreinc, loadsi_shiftpredec): Delete. - -2005-07-30 James A. Morrison - - * fold-const.c (tree_expr_nonnegative_p): Always return true for - non-integral types. - -2005-07-29 Wolfgang Bangerth - - PR target/22582 - * doc/invoke.texi: Document -rdynamic. - -2005-07-30 Joseph S. Myers - - PR c/23143 - * c-parser.c (c_parser_parms_list_declarator): Call - mark_forward_parm_decls. - * c-decl.c (merge_decls): Only check DECL_IN_SYSTEM_HEADER for - decls with visibility structure. - -2005-07-30 Paul Brook - - * config/arm/arm.c (arm_coproc_mem_operand): Fix inaccurate comment. - -2005-07-30 Paul Brook - - * config/arm/arm-protos.h (arm_canonicalize_comparison): Update - prototype. - * config/arm/arm.c (arm_canonicalize_comparison): Use correct limit - value for mode. - * config/arm/arm.h (CANONICALIZE_COMPARISON): Pass mode argument. - -2005-07-29 Joseph S. Myers - - PR c/529 - * c-decl.c (warn_if_shadowing): Don't check for PARM_DECL in - nested function declarators. - (pushdecl): Don't call warn_if_shadowing for PARM_DECL. - (grokparms): Call warn_if_shadowing for parameters used within the - parameter list. - (store_parm_decls_newstyle): Call warn_if_shadowing for parameters - not used within the parameter list. - (store_parm_decls_oldstyle): Call warn_if_shadowing for parameters. - -2005-07-30 Jan Hubicka - - * expr.c (expand_expr_real_1): Do not load mem targets into register. - * i386.c (ix86_fixup_binary_operands): Likewise. - (ix86_expand_unary_operator): Likewise. - (ix86_expand_fp_absneg_operator): Likewise. - * optabs.c (expand_vec_cond_expr): Validate dest. - -2005-07-29 Joseph S. Myers - - PR c/21720 - * real.c (real_from_string): Also set last bit if there is a - nonzero hex digit beyond GCC's internal precision after ".". - -2005-07-29 David Edelsohn - - * config/rs6000/altivec.md: Convert UNSPEC numerical values to - define_constants. Change duplicate values to unassigned numbers. - Change UNSPEC_SUBS to UNSPEC_VSUBS. - (*altivec_vspltsf): New. - (altivec_vperm_v4sf): Delete. - (altivec_vperm_): Use mode macro V. - (altivec_vsldoi_): Convert to mode macro pattern. - (altivec_predicate_v4sf): Delete. - (altivec_predicate_): Use mode macro V. - (*altivec_lvesfx): New. - (*altivec_stvesfx): New. - (vec_realign_load_v4sf): Delete. - (vec_realign_load_): Use mode macro V. - * config/rs6000/rs6000.c (generate_set_vrsave): Use - UNSPECV_SET_VRSAVE. - -2005-07-29 Mark Mitchell - - PR bootstrap/23131 - * configure.ac (SYSTEM_HEADER_DIR): Avoid setting to empty - string. - * configure: Regenerated. - -2005-07-29 Paul Brook - - * doc/install.texi: Add link to GFortran binaries wiki page. - -2005-07-29 David Ung - - * config/mips/mips.c (mips_cpu_info_table): Add 5kf to the table. - (mips_rtx_cost_data): Add costs for 5kc and 5kf. - * config/mips/mips.h (processor_type): Add PROCESSOR_5KF. - * config/mips/mips.md (cpu): Add 5kf name. - (includes): Includes 5k.md. - * config/mips/5k.md: New DFA pipeline for the 5kc/5kf. - * doc/invoke.texi (MIPS Options): Updated cpu name supported with - -march flag. - -2005-07-29 Diego Novillo - - PR 22550 - * tree-cfgcleanup.c (cleanup_tree_cfg_1): Extract from ... - (cleanup_tree_cfg): ... here. - Call cleanup_tree_cfg_1 until there are no more cleanups to - do. - -2005-07-29 James A. Morrison - - * tree-vrp.c (compare_range_with_value): Return true or false - for ~[VAL_1, VAL_2] OP VAL if VAL_1 <= VAL <= VAL_2 for NE_EXPR and - EQ_EXPR respectively. - -2005-07-29 Kazu Hirata - - * cfg.c, tree-complex.c, config/frv/frv.c, config/i386/i386.c: - Fix comment typos. - -2005-07-29 Diego Novillo - - * tree-ssa-dom.c (struct opt_stats_d): Add field num_iterations. - (tree_ssa_dominator_optimize): Increment it. - (dump_dominator_optimization_stats): Print it. - -2005-07-29 Richard Earnshaw - Steven Bosscher - - PR rtl-optimization/23117 - * sched-rgn.c (add_branch_dependences): Handle COND_EXEC correctly - when head == tail. Tidy comment. - -2005-07-28 Richard Henderson - - * cse.c (exp_equiv_p): Special case CONST_DOUBLE. - * cselib.c (rtx_equal_for_cselib_p): Likewise. - * jump.c (rtx_renumbered_equal_p): Likewise. - * loop.c (rtx_equal_for_loop_p): Tidy and special case PC, CC0, - CONST_INT and CONST_DOUBLE. - (rtx_equal_for_prefetch_p): Likewise, plus LABEL_REF. - * reload.c (operands_match_p): Special case CONST_INT and - CONST_DOUBLE; check mode earlier. - -2005-07-29 Joseph S. Myers - - PR c/22240 - * c-typeck.c (convert_for_assignment): Do not check - DECL_IN_SYSTEM_HEADER on NULL fundecl. - -2005-07-29 Joseph S. Myers - - PR c/22192 - * c-typeck.c (composite_type): Prefer constant size arrays to - VLAs. - -2005-07-29 Joseph S. Myers - - PR c/21720 - * real.c (real_from_string): Set last bit if there is a nonzero - hex digit beyond GCC's internal precision. - -2005-07-28 Richard Henderson - - PR rtl-opt/22619 - * cfgcleanup.c (try_forward_edges): Watch out for end of - insn chain. - -2005-07-28 James E Wilson - - PR c/23106 - * doc/invoke.texi (Wstrict-aliasing=2): Fix misleading wording. - -2005-07-28 Jan Hubicka - - * Makefile.in (rtl-profile.o): Kill all traces of it. - * common.opt (fspeculative-prefetching, ftree-based-profiling): Kill. - * coverage.h (rtl_coverage_counter_ref): Kill. - * opts.c (flag_speculative_prefetching_set): Kill. - (flag_loop_optimize_set): New. - (common_handle_option): Disable loop optimizer when profiling; - do not handle speculative prefetching. - * passes.c (init_optimization_passes): Replace pass_profiling combo - by branch_prob pass. - * profile.c (compute_value_histograms): Update for simplified value - profiles. - (rtl_register_profile_hooks): Kill. - (pass_profiling): Kill. - (rest_of_handle_branch_prob): Do not profile. - * toplev.c (process_options): Remove speculative prefetching. - * toplev.h (flag_tree_based_profiling): Kill. - * tree-profile.c (prepare_instrumented_value, - tree_gen_interval_profiler, tree_gen_pow2_profiler, - tree_gen_one_value_profiler, do_tree_profiling): Update for - simplified datastructures. - * value-prof.c: Add comment that speculative prefetching was dropped; - update rest of file for simplified datastructures. - (NOPREFETCH_RANGE_MIN, NOPREFETCH_RANGE_MAX, - rtl_divmod_values_to_profile, insn_prefetch_values_to_profile, - find_mem_reference_1, find_mem_reference_2, find_mem_reference, - rtl_values_to_profile, rtl_divmod_fixed_value, rtl_mod_pow2, - rtl_mod_subtract, gen_speculative_prefetch, - rtl_divmod_fixed_value_transform, rtl_mod_pow2_value_transform, - rtl_mod_subtract_transform, speculative_prefetching_transform): Kill. - (gate_handle_value_profile_transformations, - rest_of_handle_value_profile_transformations, - pass_value_profile_transformations): Kill. - * value-prof.h (histogram_value_t): Remove IL based unions. - (rtl_register_value_prof_hooks, rtl_register_profile_hooks, - rtl_profile_hooks): Remove hooks. - - * invoke.texi (-ftree-based-profiling, -fspeculative-prefetching): Kill. - - * cgraph.c (cgraph_clone_edge): New UPDATE_ORIGINAL argument. - (cgraph_clone_node): Likewise. - * cgraph.h (cgraph_clone_edge): Update prototype. - (cgraph_clone_node): Likewise. - * ipa-inline.c (cgraph_clone_inlined_nodes): Update call of - cgraph_clone_node. - (lookup_recursive_calls): Consider profile. - (cgraph_decide_recursive_inlining): Fix updating; use new - probability argument; use profile. - * params.def (PARAM_MIN_INLINE_RECURSIVE_PROBABILITY): New. - * tree-inline.c (copy_bb): Update clal of clone_edge. - * tree-optimize.c (tree_rest_of_compilation): UPdate cal of clone_node. - - * invoke.texi (min-inline-recursive-probability): Document. - -2005-07-28 Gerald Pfeifer - - * doc/install.texi (Configuration): Update Valgrind homepage. - -2005-07-28 Richard Henderson - - PR middle-end/21362 - * cfgrtl.c (rtl_merge_blocks): Call maybe_remove_eh_handler on - labels we want to delete. - (cfg_layout_merge_blocks): Likewise. - -2005-07-28 Richard Henderson - - PR target/17692 - * config/i386/i386.c (ix86_split_sse_movcc): Emit DELETED note - when expanding to nothing. - -2005-07-28 Josh Conner - - * ipa-inline.c (update_caller_keys): Fix estimated_growth caching. - (cgraph_decide_inlining_of_small_functions): Likewise. - -2005-07-28 Josh Conner - - * ipa-inline.c (cgraph_edge_badness): Update comments. Invert shift - direction of badness if negative. - (cgraph_default_inline_p): Add reason to parameters, and assign it - a value. - (cgraph_decide_inlining_of_small_functions): New parameter in call - to cgraph_default_inline_p. - (cgraph_decide_inlining_incrementally): Likewise. - * cgraphunit.c (decide_is_function_needed): Likewise. - * cgraph.h (cgraph_default_inline_p): Likewise. - -2005-07-28 Volker Reichelt - - * builtins.c: Fix comment typo(s). - * genautomata.c: Likewise. - * gimplify.c: Likewise. - * tree-dfa.c: Likewise. - * tree-flow-inline.h: Likewise. - * tree-into-ssa.c: Likewise. - * tree-ssa-alias.c: Likewise. - * tree-ssa-ccp.c: Likewise. - * tree-ssa-copy.c: Likewise. - * tree-ssa-dce.c: Likewise. - * tree-ssa-dom.c: Likewise. - * tree-ssa-operands.c: Likewise. - * tree-tailcall.c: Likewise. - * tree-vectorizer.c: Likewise. - * tree-vrp.c: Likewise. - * tree.c: Likewise. - -2005-07-28 Jeff Law - - * tree-vrp.c (test_for_singularity): Extracted from ... - (simplify_cond_using_ranges): Attempt to simplify a relational - test to NE_EXPR. Dump information when a COND_EXPR is simplified. - -2005-07-28 Dorit Nuzman - - PR tree-optimization/22506 - * tree-vectorizer.c (update_phi_nodes_for_guard2): Skip loop-closed - phis whose argument is constant. - -2005-07-28 J"orn Rennecke - - PR rtl-optimization/18992 - Back out this patch: - 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. - - Replace it with this: - * cse.c (count_reg_usage): In INSN, JUMP_INSN and CALL_INSN cases, - if flag_non_call_exceptions is set and the insn may trap, pass - pc_rtx as dest for recursion. - In SET_SRC part of SET case, if dest is already set, pass it down - unchanged. - -2005-07-28 Jan Hubicka - - * cfg.c (update_bb_profile_for_threading): Use RDIV. - (scale_bbs_frequencies_int): Likewise, assert for possible overflow. - (scale_bbs_frequencies_gcov_type): Be more curefull about overflows and - roundoff errors. - * tree-cfg.c (tree_duplicate_sese_region): Use counts for updating - profile when available. - -2005-07-28 Jan Beulich - - * config/ia64/ia64.c (ia64_load_pair_ok): New. - (ia64_print_operand): Describe and handle 'X'. - (ia64_register_move_cost): Also handle FP_REGS. - (ia64_preferred_reload_class): Likewise. - (ia64_secondary_reload_class): Likewise. - (ia64_dependencies_evaluation_hook): New local variable c. Initialize - it. Also check for ITANIUM_CLASS_FLDP. - * config/ia64/ia64.h (FP_REGNO_P): New. - (HARD_REGNO_MODE_OK): Remove explusion of TImode. - (reg_class): Add FP_REGS. - (REG_CLASS_NAMES): Adjust for it. - (REG_CLASS_CONTENTS): Likewise. - (REGNO_REG_CLASS): Use FP_REGS where appropriate. - (REG_CLASS_FROM_LETTER): Handle 'x'. - (CLASS_MAX_NREGS): Handle FP_REGS. - (MEMORY_MOVE_COST): Likewise. - * config/ia64/ia64.md (itanium_class): Add fldp. - (type): Handle fldp. - (movti_internal): More allowable operand combinations. Use ldfp8 when - splitting unnecessary. Remove predicable attribute. Adjust - itanium_class attribute. - (smuldi3_highpart): Remove outdated comment. - (mulditi3, umulditi3, rotlti3): New expanders. - (addti3, subti3, mulditi3_internal, umulditi3_internal, negti2, rotlti3_internal): New insns. - (absti2): Disabled new insn for future reference. - Respective new splitters. - * config/ia64/itanium1.md (1_fldp, 1b_fldp): New insn reservations. - * config/ia64/itanium2.md (2_fldp, 2b_fldp): Likewise. - * config/ia64/ia64-protos.h (ia64_load_pair_ok): New. - -2005-07-25 James A. Morrison - - PR rtl-optimization/23047 - * simplify-rtx.c (simplify_const_relational_operation): Respect - flag_wrapv for comparisons with ABS. - -2005-07-27 James A. Morrison - - PR tree-optimization/22493 - * tree-vrp.c (extract_range_from_unary_expr): Deal with -fwrapv and - VR_ANTI_RANGEs properly for NEGATE_EXPRs and ABS_EXPRs. - -2005-07-27 Aldy Hernandez - - * config/frv/frv.opt (moptimize-membar): New. - - * doc/invoke.texi: Document -moptimize-membar and its inverse. - - * config/frv/frv.h: Remove machine_function definition. - - * config/frv/frv.c (struct frv_io): New. - (struct machine_function): Moved from frv.h. Add has_membar_p. - (frv_same_doubleword_p, frv_io_fixed_order_p, frv_io_union) - (frv_extract_membar, frv_io_check_address, frv_io_handle_set) - (frv_io_handle_use_1, frv_io_handle_use, frv_optimize_membar_local) - (frv_optimize_membar_global, frv_optimize_membar): New functions. - (frv_reorg): Call frv_optimize_membar when appropriate. - (bdesc_loads, bdesc_stores): Use the membar code as the icode field. - (frv_expand_builtin): Adjust calls accordingly. - (frv_io_address_cookie): New function. - (frv_expand_load_builtin, frv_expand_store_builtin): Emit a normal - load or store rather than a special insn. Add ccnstant address and - io-type operands to the membar. - (frv_ifcvt_modify_tests): Unsign regno. - (frv_ifcvt_modify_tests): Same. - - * config/frv/frv.md: Remove UNSPEC_BUILTIN_{LOAD,STORE}. Change - UNSPEC_OPTIONAL_MEMBAR constant. - (builtin_read_): Delete. - (builtin_write_): Delete. - ("optional_membar_"): Add operand. - - * testsuite/gcc.target/frv/all-builtin-read8.c: Delete. - * testsuite/gcc.target/frv/all-builtin-read16.c: Delete. - * testsuite/gcc.target/frv/all-builtin-read32.c: Delete. - * testsuite/gcc.target/frv/all-builtin-read64.c: Delete. - * testsuite/gcc.target/frv/all-builtin-write8.c: Delete. - * testsuite/gcc.target/frv/all-builtin-write16.c: Delete. - * testsuite/gcc.target/frv/all-builtin-write32.c: Delete. - * testsuite/gcc.target/frv/all-builtin-write64.c: Delete. - * testsuite/gcc.target/frv/all-read-write-1.c: New. - -2005-07-28 Kaz Kojima - - * df.c (df_uses_record): Handle SCRATCH. - -2005-07-28 Steven Bosscher - - PR debug/20161 - * passes.c (rest_of_decl_compilation): If decl is a type and - we have encountered errors, don't emit debug information. - -2005-07-27 Kenneth Zadeck - - * params.def: Fixed comment. - -2005-07-27 Bjoern Haase - - PR target/19885 - * config/avr/avr.c (TARGET_ASM_ALIGNED_SI_OP): Add. - (TARGET_ASM_UNALIGNED_HI_OP): Add. - (TARGET_ASM_UNALIGNED_SI_OP): Add. - -2005-07-27 Steven Bosscher - - PR c++/22003 - * varasm.c (assemble_start_function): Don't do anything that may - require a CFG if the current function is a thunk. - -2005-07-25 Geoffrey Keating - - * doc/install.texi (Prerequisites): Mention that perl is needed - to do export control in libstdc++ targetting Darwin. - -2005-07-27 Steven Bosscher - - PR rtl-optimization/17808 - * sched-deps.c (sched_get_condition): Enable #if 0'ed code. - (sched_insns_conditions_mutex_p): Split out from... - (add_dependence): ...here. But don't call it from here. - (add_dependence_list): Check sched_insns_conditions_mutex_p - before calling add_dependence. - (add_dependence_list_and_free): Likewise. - (fixup_sched_groups): Likewise. - (sched_analyze_1): Likewise. - (sched_analyze_2): Likewise (and replace a "0" with REG_DEP_TRUE). - (sched_analyze): Likewise. - (sched_analyze_insn): Likewise. - * sched-ebb.c (add_deps_for_risky_insns): Likewise. - * sched-rgn.c (add_branch_dependences): Likewise. Also, add - dependencies on all COND_EXEC insns to jumps ending basic blocks - when doing intrablock scheduling. - * sched-int.h (sched_insns_conditions_mutex_p): Add prototype. - -2005-07-27 Jeff Law - - * tree-vrp.c (vrp_meet): Intersect the equivalency sets when - meeting a VR_ANTI_RANGE with a VR_RANGE. When intersecting - equivalency sets, correctly handle the case were vr0 has an - equivalency set, but vr1 does not. - -2005-07-27 Dorit Nuzman - - PR tree-optimization/23073 - * tree-vect-analyze.c (vect_analyze_data_refs_alignment): Call - vect_print_dump_info before fprintf. - -2005-07-27 Zdenek Dvorak - - PR tree-optimize/22348 - * tree-ssa-loop-niter.c (number_of_iterations_cond): - Fold the partial computation. - -2005-07-27 Zdenek Dvorak - - PR tree-optimization/22325 - * tree-flow.h (compute_phi_arg_on_exit, force_expr_to_var_cost): - Declare. - * tree-scalar-evolution.c (scev_const_prop): Add generic final - value replacement. - * tree-ssa-loop-ivopts.c (force_expr_to_var_cost): Split from ... - (force_var_cost): ... this function. - (compute_phi_arg_on_exit): Export. - -2005-07-27 Zdenek Dvorak - - PR tree-optimization/20773 - * tree-ssa-loop-ch.c (copy_loop_headers): Select the correct latch - edge. - -2005-07-27 Richard Guenther - - * tree-ssa-structalias.c (push_fields_onto_fieldstack): - Avoid pushing again if current struct contains only - fields we decomposed. - -2005-07-27 Jan Hubicka - - PR tree-optimization/22574 - * cgraph.c (cgraph_function_body_availability): Unanalyzed bodies are - not available. - - * tree-tailcall.c (decrease_profile): New function. - (eliminate_tail_call): Use it. - - * cgraphunit.c (cgraph_function_and_variable_visibility): Set - visibility flags correctly in whole program mode. - -2005-07-26 Steve Ellcey - - PR rtl-optimization/22472 - * config/pa/pa.h (HARD_REGNO_RENAME_OK): Define. - -2005-07-26 Steven Bosscher - - PR tree-optimization/22504 - * tree-complex.c (expand_complex_addition): Use 'code' instead - of MINUS_EXPR for (VARYING, ONLY_IMAG) and (ONLY_IMAG, VARYING). - -2005-07-26 Aldy Hernandez - - * config.gcc (cpu_type): Add frv case. - (with_cpu): Add frv400-*-*linux* and frv550-*-*linux* cases. - (supported_defaults): Add fr550 case. - -2005-07-26 Diego Novillo - - PR 22591 - * tree-ssa-alias.c (may_alias_p): Remove shortcut that tests - whether a pointer of type T * may point to objects of type T *. - -2005-07-26 DJ Delorie - - * configure: Regenerate. - -2005-07-26 Dale Johannesen - - * postreload-gcse.c (alloc_mem): Start CUID numbering at 1. - -2005-07-26 Mark Mitchell - - * doc/install.texi (--with-build-sysroot): Fix grammatical error. - Clarify use of "build" in name. - -2005-07-26 Aldy Hernandez - - * doc/extend.texi (Raw read/write Functions): New section. - * testsuite/gcc.target/frv/all-builtin-read8.c: New. - * testsuite/gcc.target/frv/all-builtin-read16.c: New. - * testsuite/gcc.target/frv/all-builtin-read32.c: New. - * testsuite/gcc.target/frv/all-builtin-read64.c: New. - * testsuite/gcc.target/frv/all-builtin-write8.c: New. - * testsuite/gcc.target/frv/all-builtin-write16.c: New. - * testsuite/gcc.target/frv/all-builtin-write32.c: New. - * testsuite/gcc.target/frv/all-builtin-write64.c: New. - * config/frv/frv.c: Add bdesc_loads global. - Add bdesc_stores global. - (frv_init_builtins): Add support for __builtin_{read/write}*. - (frv_volatile_memref): New. - (frv_expand_load_builtin): New. - (frv_expand_store_builtin): New. - * config/frv/frv.h (frv_builtins): Add FRV_BUILTIN_SCAN, - FRV_BUILTIN_READ8, FRV_BUILTIN_READ16, FRV_BUILTIN_READ32, - FRV_BUILTIN_READ64, FRV_BUILTIN_WRITE8, FRV_BUILTIN_WRITE16, - FRV_BUILTIN_WRITE32, FRV_BUILTIN_WRITE64. - * config/frv/frv.md (unspecs): Add UNSPEC_BUILTIN_LOAD, - UNSPEC_BUILTIN_STORE, UNSPEC_OPTIONAL_MEMBAR. - (builtin_read_): New. - (builtin_write_): New. - (builtin_write64): New. - (optional_membar_): New. - -2005-07-26 J"orn Rennecke - - * emit-rtl.c (gen_lowpart_common): Compare size of MODE in bits - (rather than units) against HOST_BITS_PER_WIDE_INT. - -2005-07-26 Kazu Hirata - - * ipa-pure-const.c, ipa-reference.c, ipa-reference.h, - ipa-type-escape.c, ipa-type-escape.h, ipa-utils.c, - ipa-utils.h, treestruct.def, config/crx/crx-protos.h, - config/crx/crx.c, config/crx/crx.h, config/crx/crx.md: Update - FSF address. - - * calls.c, fold-const.c, ipa-reference.c, ipa-type-escape.c, - tree-ssa-reassoc.c, tree-ssa-structalias.c, vec.h, - config/crx/crx.c, config/m32c/m32c.c, config/m32c/m32c.h: Fix - comment typos. - * doc/c-tree.texi, doc/tree-ssa.texi: Fix typos. - -2005-07-26 Richard Guenther - - PR tree-optimization/22486 - * fold-const.c (fold_unary): Fold away useless component - references of the form (T *)&T.x, if the address - doesn't change. - -2005-07-25 James E Wilson - - * dwarf2out.c (add_call_src_coords_attributes): New. - (gen_inlined_subroutine_die): Call it. - (maybe_emit_file, init_file_table): Add comments. - (prune_unused_types_walk_attribs): Pass DW_AT_call_file through - maybe_emit_file. - * tree-inline.c (remap_block): Copy BLOCK_SOURCE_LOCATION. - (expand_call_inline): Set BLOCK_SOURCE_LOCATION. - * tree.h (BLOCK_SOURCE_LOCATION): New. - (struct tree_block): New field locus. - -2005-07-26 Andreas Schwab - - PR rtl-optimization/23043 - * postreload-gcse.c (eliminate_partially_redundant_load): Fix typo - when allocating a struct unoccr. - -2005-07-25 Richard Henderson - - PR 22626 - * tree-complex.c (gate_no_optimization): True if errors. - * Makefile.in (tree-complex.o): Update dependencies. - -2005-07-25 Aldy Hernandez - - * config/frv/predicates.md (integer_register_operand): Use - GPR_AP_OR_PSEUDO_P. - -2005-07-25 Andrew Pinski - - PR tree-opt/22484 - * tree-ssa-ccp.c (fold_stmt_inplace): Strip useless type conversions - after fold. - * tree-ssa-propagate.c (set_rhs): Reject invalid conditional operands. - -2005-07-25 Andrew Pinski - - * tree-ssa-reassoc.c (reassociate_expr): Allow scaler floating point - types when flag_unsafe_math_optimizations is true. - -2005-07-25 Mark Mitchell - - * gcc.c (option_map): Add --sysroot. - (process_command): Handle --sysroot. - (display_help): Document it. - * doc/cppopts.tex (-isysroot): Document. - * doc/invoke.texi (--sysroot): Document. - * doc/install.texi (--with-build-sysroot): Document. - - * Makefile.in (inhibit_libc): New variable. - (INHIBIT_LIBC_CFLAGS): Likewise. - (LIBGCC2_CFLAGS): Include - $(INHIBIT_LIBC_CFLAGS). - (CRTSTUFF_CFLAGS): Include $(INHIBIT_LIBC_CFLAGS). - ($(T)crtbegin.o): Do not use @inhibit_libc@. - ($(T)crtend.o): Likewise. - ($(T)crtbeginS.o): Do not use @inhibit_libc@. - ($(T)crtendS.o): Likewise. - ($(T)crtbeginT.o): Do not use @inhibit_libc@. - ($(T)crtendT.o): Likewise. - (stmp-fixinc): Do not complain about missing headers if - inhibit_libc. - * configure.ac (inhibit_libc): Set it to true/false. - (--with-build-sysroot): New option. Use it to set - SYSTEM_HEADER_DIR. - * configure: Regenerated. - -2005-07-25 Manfred Hollstein - - * calls.c (store_one_arg): Fix unsigned comparison warning. - -2005-07-25 Serge Belyshev - - PR other/22337 - * ggc-zone.c (ggc_alloc_zone_stat): Do not use CHUNK_OVERHEAD. - (ggc_print_statistics): Initialize variable before use. - -2005-07-25 Richard Guenther - - * tree-dfa.c (mark_new_vars_to_rename): Protect against - calling with a PHI_NODE argument. - - * tree-flow-inline.h (overlap_subvar): Protect against - possible overflow. - -2005-07-25 Paolo Bonzini - - * aclocal.m4 (gcc_AC_CHECK_TOOL): Add /bin to default directory. - * configure: Regenerate. - -2005-07-25 Ira Rosen - - * expr.c (highest_pow2_factor): Make extern. - * tree-data-ref.c (ptr_decl_may_alias_p): New function. - (ptr_ptr_may_alias_p, may_alias_p, record_ptr_differ_p, - record_array_differ_p, array_ptr_differ_p): Likewise. - (base_object_differ_p): Rename (from array_base_name_differ_p). Support - additional cases. Call the above functions. - (base_addr_differ_p): Moved from tree-vect-analyze.c. Call - base_object_differ_p when there are two base objects. Otherwise, compare - base address and offset. Call may_alias_p. - (dump_data_reference): Use a correct field name. - (analyze_array): Make static. Initialize new data-ref fields. - (analyze_indirect_ref): New function. - (init_data_ref): Initialize new data-ref fields. - (strip_conversion): Moved from tree-vect-analyze.c. - (analyze_offset_expr, get_ptr_offset, address_analysis, - object_analysis): Likewise. - (analyze_offset): New function. - (create_data_ref): Likewise. - (initialize_data_dependence_relation): Call base_addr_differ_p. Compare - dimensions for ARRAY_REFs only. - (build_classic_dist_vector): Make static. - (access_functions_are_affine_or_constant_p): Call macro to get the - address of access functions. - (compute_all_dependences): Add new parameter - compute_self_and_read_read_dependences. Compute self and read-read - dependences if it is true. - (find_data_references_in_loop): Call create_data_ref. Initialize new - data-ref fields. - (compute_data_dependences_for_loop): Add new parameter - compute_self_and_read_read_dependences. Remove parameter nb_loops, - compute nb_loops. Call compute_all_dependences, - build_classic_dist_vector and build_classic_dir_vector with correct - parameters. - (analyze_all_data_dependences): Call compute_data_dependences_for_loop - with correct parameters. Compare dimensions for ARRAY_REFs only. - (free_data_refs): Call macro to free access functions. - * tree-data-ref.h (struct first_location_in_loop): New structure. Move - fields from stmt_vinfo. - (struct base_object_info): New structure. - (struct data_reference): Move fields to base_object_info. Add fields - first_location and object_info for above structures. Move fields from - stmt_info: memtag, ptr_info, subvars, misalignment. Add new field - aligned_to. Add macros to access the new fields. - Update functions declarations. - * tree-flow.h (is_aliased_with): Declare. - * tree-loop-linear.c (linear_transform_loops): Call - compute_data_dependences_for_loop with correct parameters. - * tree-ssa-alias.c (is_aliased_with): New function. - * tree-vect-analyze.c (vect_get_ptr_offset): Remove. - (vect_analyze_offset_expr, vect_base_addr_differ_p): Likewise. - (vect_analyze_data_ref_dependence): Get ddr. Remove call to - vect_base_addr_differ_p, compute_subscript_distance and - build_classic_dist_vector. Add printings. Check absolute value of - distance. - (vect_analyze_data_ref_dependences): Go through ddrs instead of - data-refs. - (vect_compute_data_ref_alignment): Get the fields of data-ref instead of - stmt. Check aligned_to. Check if the base is aligned. Remove conversion - to bytes. Add printing. - (vect_compute_data_refs_alignment): Go through loads and stores in one - loop. - (vect_enhance_data_refs_alignment, vect_analyze_data_refs_alignment, - vect_analyze_data_ref_access): Likewise. - (vect_analyze_pointer_ref_access): Remove. - (vect_address_analysis, vect_object_analysis): Likewise. - (vect_analyze_data_refs): Call compute_data_dependences_for_loop to find - and analyze data-refs in the loop. - * tree-vect-transform.c (vect_create_addr_base_for_vector_ref): Get the - fields of data-ref instead of stmt. Add init to the offset from the - base. - (vect_create_data_ref_ptr): Get the fields of data-ref instead of stmt. - (vect_update_init_of_dr): Likewise. - (vect_update_inits_of_drs): Go through loads and stores in one loop. - * tree-vectorizer.c (new_stmt_vec_info): Remove initialization of - removed fields. - (new_loop_vec_info): Initialize new fields. - (destroy_loop_vec_info): Free new fields. - (vect_strip_conversion): Remove. - * tree-vectorizer.h (enum verbosity_levels): Add new verbosity level. - (struct _loop_vec_info): Unify data_ref_writes and data_ref_reads into - datarefs. Add new field ddrs. - Add macros for the new fields access. - (struct _stmt_vec_info): Remove: base_address, initial_offset, step, - base_aligned_p, misalignment, memtag, ptr_info and subvars. - Remove their macros. - * tree.h (highest_pow2_factor): Declare. - -2005-07-25 Jakub Jelinek - - * calls.c (store_one_arg): Check for sibling call MEM arguments - from already clobbered incoming argument area. - -2005-07-24 Kaveh R. Ghazi - - * c-common.c (check_missing_format_attribute): New. - * c-common.h (check_missing_format_attribute): Likewise. - * c-typeck.c (convert_for_assignment): Use it. - -2005-07-24 Andreas Schwab - - * config/m68k/m68k.md ("extendqidi2"): When source is an address - register use a word move. Correct operand of ext.w in 68000 code. - -2005-07-23 Mark Mitchell - - * dwarf2out.c (gen_variable_die): Treat un-emitted COMDAT - variables as declarations, rather than definitions. - -2005-07-24 Ira Rosen - - PR tree-optimization/22526 - * tree-vectorizer.c (slpeel_tree_peel_loop_to_edge): Match the type - of the zero node. - -2005-07-24 Francois-Xavier Coudert - - * builtins.def: Add DEF_EXT_C99RES_BUILTIN to define builtins - that C99 reserve for future use. Use it to define clog10, - clog10f and clog10l. - -2005-07-23 Kaveh R. Ghazi - - * Makefile.in (STRICT2_WARN): Add -Wmissing-format-attribute. - * configure.ac: Check for -Wmissing-format-attribute. - - * configure: Regenerate. - -2005-07-23 Richard Henderson - - PR tree-optimization/22623 - * tree-complex.c (set_component_ssa_name): Use replace_ssa_name_symbol. - -2005-07-23 Giovanni Bajo - - PR target/22577 - * config/pa/pa.c (reloc_needed): Updated for VECs inside CONSTRUCTOR. - -2005-07-23 Kaveh R. Ghazi - - * Makefile.in (C_TREE_H): Update dependencies. - * c-tree.h: Include toplev.h. - * diagnostic.h (diagnostic_set_info): Add format attribute. - * rtl-error.c (diagnostic_for_asm): Likewise. - -2005-07-23 Chao-ying Fu - - * config/mips/mips-dsp.md: New file. - * config/mips/mips-modes.def (V4QI, V2HI, CCDSP): New modes. - * config/mips/mips.c (mips_function_type): Add types for DSP builtin - functions. - (mips_builtin_type): Add MIPS_BUILTIN_DIRECT_NO_TARGET and - MIPS_BUILTIN_BPOSGE32. - (mips_expand_builtin_direct): Add one parameter to indicate that - builtin functions need to return a value. - (mips_expand_builtin_bposge): New for expanding "bposge" builtin - functions. - (mips_regno_to_class): Add classes for 12 new DSP registers. - (mips_subword): Change to check four HI registers. - (mips_output_move): Output move to and from 6 new DSP accumulators. - (override_options): Make sure -mdsp and -mips16 are not used together. - Map 'A' to DSP_ACC_REGS and 'a' to ACC_REGS. Enable DSP accumulators - for machine modes. - (mips_conditional_register_usage): Disable 6 new DSP accumulators - when !TARGET_DSP. - (print_operand): Add 'q' for printing DSP accumulators. - (mips_cannot_change_mode_class): Check ACC_REGS. - (mips_secondary_reload_class): Check ACC_REGS. - (mips_vector_mode_supported_p): Enable V2HI and V4QI when TARGET_DSP. - (mips_register_move_cost): Check ACC_REGS. - (CODE_FOR_mips_addq_ph, CODE_FOR_mips_addu_qb, CODE_FOR_mips_subq_ph) - (CODE_FOR_mips_subu_qb): New code-aliasing macros. - (DIRECT_NO_TARGET_BUILTIN, BPOSGE_BUILTIN): New macros. - (dsp_bdesc): New array. - (bdesc_arrays): Add DSP builtin function table. - (mips_prepare_builtin_arg): Check predicate again after - copy_to_mode_reg. - (mips_expand_builtin): Add one more parameter to - mips_expand_builtin_direct. Expand MIPS_BUILTIN_DIRECT_NO_TARGET and - MIPS_BUILTIN_BPOSGE32. - (mips_init_builtins): Initialize new function types. - (mips_expand_builtin_direct): Check if builtin functions need to - return a value and pass operands properly. - (mips_expand_builtin_bposge): New function. - * config/mips/mips.h (TARGET_CPU_CPP_BUILTINS): Add __mips_dsp. - (ASM_SPEC): Map -mdsp to -mdsp in GAS. - (FIRST_PSEUDO_REGISTER): Increase to 188. - (FIXED_REGISTERS, CALL_USED_REGISTERS, CALL_REALLY_USED_REGISTERS): - Update for 12 new DSP registers. - (DSP_ACC_REG_FIRST, DSP_ACC_REG_LAST, DSP_ACC_REG_NUM, AC1HI_REGNUM) - (AC1LO_REGNUM, AC2HI_REGNUM, AC2LO_REGNUM, AC3HI_REGNUM, AC3LO_REGNUM): - (DSP_ACC_REG_P, ACC_REG_P, ACC_HI_REG_P): New macros. - (reg_class): Add DSP_ACC_REGS and ACC_REGS. - (REG_CLASS_NAMES): Add names for DSP_ACC_REGS and ACC_REGS. - (REG_CLASS_CONTENTS): Update for DSP_ACC_REGS, ACC_REGS and ALL_REGS. - (REG_ALLOC_ORDER): Update for 12 new DSP registers. - (mips_char_to_class): Add 'A' for DSP_ACC_REGS and 'a' for ACC_REGS. - (UIMM6_OPERAND, IMM10_OPERAND): New macros. - (EXTRA_CONSTRAINT_Y): Add YA and YB extra constraints. - (REGISTER_NAMES): Add names for 12 new DSP registers. - * config/mips/mips.md: Include mips-dsp.md. - (UNSPEC_ADDQ, UNSPEC_ADDQ_S, UNSPEC_SUBQ, UNSPEC_SUBQ_S, UNSPEC_ADDSC) - (UNSPEC_ADDWC, UNSPEC_MODSUB, UNSPEC_RADDU_W_QB, UNSPEC_ABSQ_S) - (UNSPEC_PRECRQ_QB_PH, UNSPEC_PRECRQ_PH_W, UNSPEC_PRECRQ_RS_PH_W) - (UNSPEC_PRECRQU_S_QB_PH, UNSPEC_PRECEQ_W_PHL, UNSPEC_PRECEQ_W_PHR) - (UNSPEC_PRECEQU_PH_QBL, UNSPEC_PRECEQU_PH_QBR, UNSPEC_PRECEQU_PH_QBLA) - (UNSPEC_PRECEQU_PH_QBRA, UNSPEC_PRECEU_PH_QBL, UNSPEC_PRECEU_PH_QBR) - (UNSPEC_PRECEU_PH_QBLA, UNSPEC_PRECEU_PH_QBRA, UNSPEC_SHLL) - (UNSPEC_SHLL_S, UNSPEC_SHRL_QB, UNSPEC_SHRA_PH, UNSPEC_SHRA_R) - (UNSPEC_MULEU_S_PH_QBL, UNSPEC_MULEU_S_PH_QBR, UNSPEC_MULQ_RS_PH) - (UNSPEC_MULEQ_S_W_PHL, UNSPEC_MULEQ_S_W_PHR, UNSPEC_DPAU_H_QBL) - (UNSPEC_DPAU_H_QBR, UNSPEC_DPSU_H_QBL, UNSPEC_DPSU_H_QBR) - (UNSPEC_DPAQ_S_W_PH, UNSPEC_DPSQ_S_W_PH, UNSPEC_MULSAQ_S_W_PH) - (UNSPEC_DPAQ_SA_L_W, UNSPEC_DPSQ_SA_L_W, UNSPEC_MAQ_S_W_PHL) - (UNSPEC_MAQ_S_W_PHR, UNSPEC_MAQ_SA_W_PHL, UNSPEC_MAQ_SA_W_PHR) - (UNSPEC_BITREV, UNSPEC_INSV, UNSPEC_REPL_QB, UNSPEC_REPL_PH) - (UNSPEC_CMP_EQ, UNSPEC_CMP_LT, UNSPEC_CMP_LE, UNSPEC_CMPGU_EQ_QB) - (UNSPEC_CMPGU_LT_QB, UNSPEC_CMPGU_LE_QB, UNSPEC_PICK, UNSPEC_PACKRL_PH) - (UNSPEC_EXTR_W, UNSPEC_EXTR_R_W, UNSPEC_EXTR_RS_W, UNSPEC_EXTR_S_H) - (UNSPEC_EXTP, UNSPEC_EXTPDP, UNSPEC_SHILO, UNSPEC_MTHLIP, UNSPEC_WRDSP) - (UNSPEC_RDDSP): New constants. - (*movdi_32bit): Change 'x' to 'a' for ACC_REGS. - (*movsi_internal): Change 'x' to 'a' for ACC_REGS. Add an - A<-d alternative. - * config/mips/mips.opt (-mdsp): New option. - * config/mips/predicates.md (const_uimm6_operand, const_imm10_operand) - (reg_imm10_operand): New predicates. - * doc/extend.texi (MIPS DSP Built-in Functions): New section. - * doc/invoke.texi (-mdsp): Document new option. - -2005-07-22 DJ Delorie - - * c-objc-common.c (c_cannot_inline_tree_fn): Add warning control - to warning calls. - * tree-inline.c (inlinable_function_p): Likewise. - -2005-07-22 Mark Mitchell - - PR debug/21828 - * toplev.c (check_global_declarations): Do not mark undefined - variables as DECL_IGNORED_P. - * varasm.c (first_global_object_name): GTY it. - (weak_global_object_name): Likewise. - (notice_global_symbol): Use ggc_strdup, not xstrdup, when creating - a string to go into {weak,first}_global_object_name. - -2005-07-22 DJ Delorie - - * c-format.c (check_function_format): Change warning control - option from OPT_Wattribute to OPT_Wmissing_format_attribute. - -2005-07-22 Diego Novillo - - * tree-ssa-alias.c (count_ptr_derefs): Do not consider - &PTR->FLD a dereference of PTR. - * tree-ssa-structalias.c (update_alias_info): Consider &PTR->FLD - a potential dereference of PTR. - -2005-07-22 J"orn Rennecke - - PR rtl-optimization/20370 - * ifcvt.c (dead_or_predicable): Before calling propagate_block, - call allocate_reg_info if necessary. - - PR rtl-optimization/21848 - * calls.c (emit_library_call_value_1): For const functions, add - USEs of the stack slots to CALL_INSN_FUNCTION_USAGE. - - PR rtl-optimization/22445 - * cselib.c (target.h): Include. - (rtx_equal_for_cselib_p): Allow commutative matches. - (cselib_hash_rtx): Don't use MODE for CONST_INT hashing. - Remove MODE parameter. Changed all callers. - - PR rtl-optimization/22258 - * combine.c (likely_spilled_retval_1, likely_spilled_retval_p): - New functions. - (try_combine): Use likely_spilled_retval_p. - -2005-07-22 Paul Woegerer - - * config.gcc: Add crx-elf support. - - * doc/contrib.texi: Mention crx. - * doc/extend.texi: Document crx extensions. - * doc/install.texi: Document crx install. - * doc/invoke.texi: Document crx options. - * doc/md.texi: Document crx constraints. - - * config/crx/crx-protos.h: New file. - * config/crx/crx.c: New file. - * config/crx/crx.h: New file. - * config/crx/crx.md: New file. - * config/crx/crx.opt: New file. - * config/crx/t-crx: New file. - -2005-07-22 Manfred Hollstein - - * tree-ssa-structalias.c (merge_graph_nodes): Fix uninitialised - warnings. - (int_add_graph_edge): Likewise. - (collapse_nodes): Likewise. - (process_unification_queue): Likewise. - -2005-07-22 Richard Kenner - Laurent GUERBY - - PR tree-optimization/22336 - * function.c (record_block_change): Check for - cfun->ib_boundaries_block. - -2005-07-21 James A. Morrison - - * fold-const.c (fold_unary): Don't strip signed nops from ABS_EXPRs. - (tree_expr_nonnegative_p): Return try for TYPE_UNSIGNED. - -2005-07-21 DJ Delorie - - * toplev.c (warn_deprecated_use): Add warning control to warning - call. - * c-typeck.c (parser_build_binary_op): Likewise. - (c_finish_if_stmt): Likewise. - * c-common.c (check_function_sentinel): Likewise. - (check_nonnull_arg): Likewise. - -2005-07-21 Richard Henderson - - PR tree-opt/22504 - * tree-complex.c (complex_ssa_name_components): New. - (cvc_lookup): Allow entry not found. - (create_components): Remove. - (create_one_component_var, get_component_var): New. - (get_component_ssa_name, set_component_ssa_name): New. - (extract_component): Use get_component_ssa_name. - (update_complex_components): Use set_component_ssa_name. - (update_complex_components_on_edge): Likewise. - (update_phi_components): Create new PHI nodes directly, instead - of adding insns to edges. - (tree_lower_complex): Allocate and free complex_variable_components - and complex_ssa_name_components here. - -2005-07-20 Daniel Berlin - - * alias.c (nonoverlapping_component_refs_p): Use TYPE_MAIN_VARIANT, - revert to returning false. - -2005-07-21 Uros Bizjak - - PR target/21149 - * config/i386/i386.md (sse_movhlps): Fix vec_select values. - -2005-07-21 Uros Bizjak - - PR target/22576 - * config/i386/i386.md (cmpxf): Change operand constraints - to "nonmemory_operand". - -2005-07-21 Andrew Pinski - - * config/i386/i386.md (trap): Use "".word/t0x0b0f" instead of ud2. - -2005-07-21 Andrew Pinski - - PR middle-end/21180 - * fold-const.c (fold_build1): Add checksum for the operands. - (fold_build2): Likewise. - (fold_build3): Likewise. - -2005-07-21 Andrew Pinski - - PR middle-end/19055 - * fold-const.c (fold_binary): Transform "(X | Y) ^ X" to "Y & ~ X". - -2005-07-21 Paolo Bonzini - - * common.opt (-fforward-propagate): Committed by mistake, - removed. - -2005-07-21 Volker Reichelt - - * reg-stack.c: Fix comment typo(s). - * tree-ssa-operands.c: Likewise. - * tree-vectorizer: Likewise. - -2005-07-21 Nick Clifton - - * config/sh/symbian.c: Replace C++ style line comments with C - style line comments. - (symbian_add_attribute): Do not use a ? operator on the LHS of - an assignment. - (sh_symbian_handle_dll_attribute): Change the type of the - method vector to "VEC(tree,gc)*" and use vector accessor - macros to walk over the elements. - (symbian_export_vtable_and_rtti_p): Likewise. - (symbian_class_needs_attribute_p): Likewise. - -2005-07-21 Paolo Bonzini - - PR target/22085 - * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not - initialize targetm.resolve_overloaded_builtin here. - (altivec_expand_overloaded_builtin): Make it non-static. - * config/rs6000/rs6000-protos.h - (altivec_expand_overloaded_builtin): New prototype. - * config/rs6000/rs6000.h (REGISTER_TARGET_PRAGMAS): Initialize - targetm.resolve_overloaded_builtin here. - * config/rs6000/darwin.h (REGISTER_TARGET_PRAGMAS): Likewise. - -2005-07-21 Paolo Bonzini - Zdenek Dvorak - - PR tree-optimization/19210 - * common.opt (Wunsafe-loop-optimizations, funsafe-loop-optimizations): - New. - * Makefile.in (tree-ssa-loop-niter.o): Depend intl.o. - * loop-iv.c (get_simple_loop_desc): If -funsafe-loop-optimizations, - rely on unproven assumptions. - * predict.c (predict_loops): Adjust call to number_of_iterations_exit. - * tree-flow.h (number_of_iterations_exit): Add final parameter. - * tree-scalar-evolution.c (number_of_iterations_in_loop): Adjust call - to number_of_iterations_exit. - * tree-ssa-loop-ivcanon.c (empty_loop_p): Likewise. - * tree-ssa-loop-ivopts.c (niter_for_exit): Likewise. - * tree-ssa-loop-niter.c (find_loop_niter, - estimate_numbers_of_iterations_loop): Likewise. - (number_of_iterations_exit): Honor the new options. - * doc/invoke.texi (Wunsafe-loop-optimizations, - funsafe-loop-optimizations): Document them. - -2005-07-21 Richard Sandiford - - PR rtl-optimization/22167 - * gcse.c (hoist_code): Fix hoist_exprs[] check. - -2005-07-20 Adam Nemet - - * config/rs6000/lynx.h: Mark __do_global_ctors_aux and - __do_global_dtors_aux longcall. - -2005-07-20 Kazu Hirata - - * gensupport.c (old_preds): Don't reference PREDICATE_CODES. - (old_special_pred_table): Don't reference - SPECIAL_MODE_PREDICATES. - * system.h (PREDICATE_CODES, SPECIAL_MODE_PREDICATES): Poison. - * config/arc/arc.h: Don't mention PREDICATE_CODES. - * config/sh/predicates.h: Don't mention - SPECIAL_MODE_PREDICATES. - * doc/tm.texi (PREDICATE_CODES, SPECIAL_MODE_PREDICATES): - Remove. - -2005-07-20 DJ Delorie - - * config.gcc: Add m32c-elf support. - - * doc/contrib.texi: Mention m32c. - * doc/extend.texi: Document m32c extensions. - * doc/install.texi: Mention m32c. - * doc/invoke.texi: Document m32c options. - * doc/md.texi: Document m32c constraints. - - * config/m32c/addsub.md: New file. - * config/m32c/bitops.md: New file. - * config/m32c/cond.md: New file. - * config/m32c/jump.md: New file. - * config/m32c/m32c-lib1.S: New file. - * config/m32c/m32c-lib2.c: New file. - * config/m32c/m32c-modes.def: New file. - * config/m32c/m32c-pragma.c: New file. - * config/m32c/m32c-protos.h: New file. - * config/m32c/m32c.abi: New file. - * config/m32c/m32c.c: New file. - * config/m32c/m32c.h: New file. - * config/m32c/m32c.md: New file. - * config/m32c/m32c.opt: New file. - * config/m32c/minmax.md: New file. - * config/m32c/mov.md: New file. - * config/m32c/muldiv.md: New file. - * config/m32c/predicates.md: New file. - * config/m32c/prologue.md: New file. - * config/m32c/shift.md: New file. - * config/m32c/t-m32c: New file. - -2005-07-20 Kaz Kojima - - * config/sh/sh.md (UNSPEC_SP_SET, UNSPEC_SP_TEST): New constants. - (stack_protect_set, stack_protect_test): New expanders. - (stack_protect_set_si, stack_protect_set_si_media, - stack_protect_set_di_media, stack_protect_test_si, - stack_protect_test_si_media, stack_protect_test_di_media): - New insns. - -2005-07-20 Andrew Pinski - - * c-typeck.c (output_init_element): Don't copy the INTEGER_CST. - -2005-07-20 James A. Morrison - - * tree.h (tree_expr_nonzero_p): Export. - * fold-const.c (tree_expr_nonzero_p): Likewise. - Return true for CALL_EXPRs that are alloca calls. - (fold_binary): Use omit_one_operand when checking EQ_EXPRs or NE_EXPRs - against zero. - * tree-flow.h (expr_computes_nonzero): Remove. - * tree-vrp.c (expr_computes_nonzero): Remove. - (vrp_expr_computes_nonzero): Use tree_expr_nonzero_p. - (extract_range_from_unary_expr): Likewise. - * tree-ssa-dom.c (record_equivalences_from_stmt): Use - tree_expr_nonzero_p. - -2005-07-20 Bernd Schmidt - - * config/bfin/bfin-protos.h (legitimize_pic_address): Don't declare. - * config/bfin/bfin.c (legitimize_pic_address): Now static. Take - extra arg "picreg" and use it instead of pic_offset_table_rtx. - All callers changed. - (frame_related_constant_load): New arg "related" which controls - setting of RTX_FRAME_RELATED_P. All callers changed. - (bfin_load_pic_reg): New function, broken out of bfin_expand_prologue. - (bfin_expand_prologue): Add stack limit checking. - * config/bfin/bfin.md (trapifcc): New pattern. - - * config/bfin/bfin.c: Include "langhooks.h". - (def_builtin): Go through lang_hooks to call builtin_function. - - * config/bfin/bfin-protos.h (bfin_longcall_p): Declare. - * config/bfin/predicates.md (symbol_ref_operand): New. - (call_insn_operand): Delete. All callers changed to use - register_no_elim_operand. - * config/bfin/bfin.c (init_cumulative_args): Initialize the new - call_cookie field. - (function_arg): Use it to generate the call's operand 2. - (bfin_longcall_p): New function. - (bfin_expand_call): Extra arg "cookie". All callers and declaration - changed. Emit extra USE in the pattern. Use bfin_longcall_p to - determine if the address needs to be in a REG. - (bfin_handle_longcall_attribute): New function. - (bfin_attribute_table): Add "longcall" and "shortcall". - * config/bfin/bfin.h (CALL_NORMAL, CALL_LONG, CALL_SHORT): New macros. - (CUMULATIVE_ARGS): New member call_cookie. - (PREDICATE_CODES): Add symbol_ref_operand. - * config/bfin/bfin.md (call, call_value, sibcall, sibcall_value): Add - extra USE to the pattern. - (call_symbol, sibcall_symbol, call_value_symbol, sibcall_value_symbol): - New patterns, split off call_insn, sibcall_insn, call_value_insn and - sibcall_value_insn; now the new patterns handle direct calls and the - old ones indirect calls. - * doc/extend.texi: Mention Blackfin in longcall/shortcall docs. - -2005-07-20 Zdenek Dvorak - - * doc/trouble.texi: Update section on handling of empty loops. - -2005-07-20 Kazu Hirata - - * config.gcc: Remove support for sparc-*-openbsd*, - i860-*-sysv4*, ip2k-*-elf, ns32k-*-netbsdelf*, - ns32k-*-netbsd*. - * config.host: Remove support for i860-*-sysv4* as a host. - * config/i860/*, config/ip2k/*, config/ns32k/*, - config/sparc/openbsd.h, config/sparc/t-openbsd: Remove. - * doc/install.texi, doc/invoke.texi, doc/md.texi: Don't - mention obsolete ports. - -2005-07-20 Kaz Kojima - - * config/sh/sh.c (regno_reg_class): Add GENERAL_REGS for - soft frame pointer. - (sh_expand_prologue): Use hard_frame_pointer_rtx instead - of frame_pointer_rtx. - (sh_expand_epilogue): Likewise. - (sh_set_return_address): Likewise. - (initial_elimination_offset): Use HARD_FRAME_POINTER_REGNUM - instead of FRAME_POINTER_REGNUM if needed. Add elimination - offsets from FRAME_POINTER_REGNUM. - * config/sh/sh.h (SH_REGISTER_NAMES_INITIALIZER): Add sfp. - (sh_register_names): Add initializer for sfp. - (GENERAL_OR_AP_REGISTER_P): Permit FRAME_POINTER_REGNUM. - (VALID_REGISTER_P): Likewise. - (FIRST_PSEUDO_REGISTER): Update. - (DWARF_FRAME_REGISTERS): Define. - (FIXED_REGISTERS, CALL_USED_REGISTERS): Add sfp. - (HARD_FRAME_POINTER_REGNUM): Define. - (FRAME_POINTER_REGNUM): Redefine. - (ELIMINABLE_REGS): Never eliminate to FRAME_POINTER_REGNUM, - but HARD_FRAME_POINTER_REGNUM instead. Add eliminations - from FRAME_POINTER_REGNUM. - (CAN_ELIMINATE): Use HARD_FRAME_POINTER_REGNUM instead of - FRAME_POINTER_REGNUM. - (REG_CLASS_CONTENTS): Add sfp. - (REG_ALLOC_ORDER): Likewise. - (FRAME_GROWS_DOWNWARD): Set to 1. Update comment. - (GO_IF_LEGITIMATE_ADDRESS): Use hard_frame_pointer_rtx instead - of frame_pointer_rtx. - (LEGITIMIZE_RELOAD_ADDRESS): Likewise. - -2005-07-19 James A. Morrison - - * fold-const.c (tree_expr_nonnegative_p): Only return true for - ABS_EXPR when flag_wrapv is false because of INT_MIN. - (tree_expr_nonzero_p): Always call tree_expr_nonzero_p on the argument - of an ABS_EXPR. - (fold_unary): Always fold ABS_EXPR> into - ABS_EXPR. - -2005-07-20 Giovanni Bajo - - Make CONSTRUCTOR use VEC to store initializers. - * c-common.c (complete_array_type): Update to cope with VEC in - CONSTRUCTOR_ELTS. - * c-pretty-print.c (pp_c_initializer_list): Use pp_c_constructor_elts. - (pp_c_constructor_elts): New function. - * c-pretty-print.h (pp_c_constructor_elts): Declare. - * c-typeck.c (build_function_call, build_c_cast, digest_init, - struct constructor_stack, struct initializer_stack, - constructor_elements, push_init_level, pop_init_level, - add_pending_init, find_init_member, output_init_element): Update to - cope with VEC in CONSTRUCTOR_ELTS. - * coverage.c (build_fn_info_value, build_ctr_info_value, - build_gcov_info): Likewise. - * expr.c (categorize_ctor_elements_1, store_constructor, - expand_expr_real_1): Likewise. - * fold-const.c (fold_ternary): Likewise. - * gimplify.c (gimplify_init_ctor_preeval, zero_sized_field_decl, - gimplify_init_constructor, gimplify_expr): Likewise. - * tree-dump.c (dequeue_and_dump): Likewise. - * tree-inline.c (copy_tree_r): Add code to duplicate a CONSTRUCTOR - node. - * tree-pretty-print.c (dump_generic_node): Update to cope with VEC in - CONSTRUCTOR_ELTS. - * tree-sra.c (generate_element_init_1): Likewise. - * tree-ssa-ccp.c (fold_const_aggregate_ref): Likewise. - * tree-ssa-operands.c (get_expr_operands): Likewise. - * tree-vect-generic.c (expand_vector_piecewise): Likewise. - * tree-vect-transform.c (vect_get_vec_def_for_operand): - (get_initial_def_for_reduction): Likewise. - * tree-vn.c (set_value_handle, get_value_handle): CONSTURCTOR uses - value handle in annotations. - * tree.c (tree_node_kind, tree_code_size, make_node_stat, - tree_node_structure): Add support for constr_kind. - (build_vector_from_ctor, build_constructor_single, - build_constructor_from_list): New functions. - (build_constructor): Update to take a VEC instead of a TREE_LIST. - (simple_cst_equal, iterative_hash_expr, initializer_zerop, walk_tree): - Update to cope with VEC in CONSTRUCTOR_ELTS. - * tree.def (CONSTRUCTOR): Make it a tcc_exceptional node. - * tree.h (FOR_EACH_CONSTRUCTOR_VALUE, FOR_EACH_CONSTRUCTOR_ELT, - CONSTRUCTOR_APPEND_ELT): New macros. - (struct constructor_elt, struct tree_constructor): New data types. - (union tree_node): Add tree_constructor field. - * treestruct.def: Define TS_CONSTRUCTOR. - * varasm.c (const_hash_1, compare_constant, copy_constant, - compute_reloc_for_constant, output_addressed_constants, - initializer_constant_valid_p, output_constant, - array_size_for_constructor, output_constructor): Update to cope with - VEC in CONSTRUCTOR_ELTS. - * vec.h (VEC_empty, VEC_copy): New macros. - -2005-07-19 Devang Patel - - * dbxout.c (dbxout_type): Check Objective-C++ lang. - -2005-07-19 Richard Henderson - - PR tree-opt/22278 - * gimplify.c (gimplify_expr): Use main variant type for the temp - destination for a discarded volatile read. - * tree-ssa.c (tree_ssa_useless_type_conversion_1): Don't elide - casts between non-void types that change volatility. - -2005-07-15 DJ Delorie - - * toplev.h: Add comment about the first parameter for warning(). - * errors.h: Likewise. - - * c.opt (Wpragmas): New. - * doc/invoke.texi: Document it. - - * function.c (do_warn_unused_parameter): Add warning control to - warning call. - * c-decl.c (warn_if_shadowing): Likewise. - * c-lex.c (cb_def_pragma): Likewise. - * c-pragma.c (GCC_BAD, GCC_BAD2): Likewise. - (pop_alignment): Likewise. - (handle_pragma_pack): Likewise. - (apply_pragma_weak): Likewise. - (handle_pragma_weak): Likewise. - (handle_pragma_redefine_extname): Likewise. - (add_to_renaming_pragma_list): Likewise. - (handle_pragma_extern_prefix): Likewise. - (maybe_apply_renaming_pragma): Likewise. - (handle_pragma_visibility): Likewise. - - * config/c4x/c4x-c.c (BAD): Likewise. - (c4x_parse_pragma): Likewise. - * config/ia64/ia64-c.c (ia64_hpux_handle_builtin_pragma): Likewise. - * config/rs6000/rs6000-c.c (SYNTAX_ERROR): Likewise. - (rs6000_pragma_longcall): Likewise. - * config/v850/v850-c.c (pop_data_area): Likewise. - (ghs_pragma_section): Likewise. - (ghs_pragma_section): Likewise. - (ghs_pragma_interrupt): Likewise. - (ghs_pragma_starttda): Likewise. - (ghs_pragma_startsda): Likewise. - (ghs_pragma_startzda): Likewise. - (ghs_pragma_endtda): Likewise. - (ghs_pragma_endsda): Likewise. - (ghs_pragma_endzda): Likewise. - -2005-07-19 Danny Berlin - Kenneth Zadeck - - * Makefile.in: Removed tree-promote-statics.c - * tree-promote-statics.c: Removed. - * common.opt: Removed flag-promote-statics. - * opts.c: Ditto. - * passes.c: Removed tree-promote-statics pass. - * tree-pass.h: Ditto. - * timevar.def: Removed TV_PROMOTE_STATICS. - - -2005-07-19 Gerald Pfeifer - - * config.gcc: Add support for *-*-freebsd7, *-*-freebsd8, - and *-*-freebsd9. - * config/freebsd-spec.h (FBSD_TARGET_OS_CPP_BUILTINS): Ditto. - -2005-07-19 Kaveh R. Ghazi - - PR c/22476 - * c-common.c (check_function_arguments): Call - 'check_function_format' if either -Wformat or - -Wmissing-format-attribute are specified. - * c-format.c (check_function_format): Check -Wformat before - calling 'check_format_info'. - * c-opts.c (c_common_post_options): Don't warn for - -Wmissing-format-attribute without -Wformat. - * c-typeck.c (convert_for_assignment): Detect additional cases for - -Wmissing-format-attribute. - * doc/invoke.texi (-Wmissing-format-attribute): Document new - behavior. - -2005-07-19 Richard Guenther - - * config/i386/i386.md (lrint2): Use temporary - instead of clobbering non-existent memory. - -2005-07-19 Nick Clifton - - * config/avr/avr.c (legitimate_address_p): Fix debugging print - statement to avoid displaying ASCII control characters. - -2005-07-19 Ben Elliston - - * bt-load.c (link_btr_uses): Fix uninitialised warnings. - * cfganal.c (find_edge_index): Ditto. - * combine.c (combine_instructions): Ditto. - * ddg.c (create_scc): Ditto. - (find_successors): Ditto. - (find_predecessors): Ditto. - (find_nodes_on_paths): Ditto. - (longest_simple_path): Ditto. - * flow.c (update_life_info): Ditto. - (count_or_remove_death_notes): Ditto. - (clear_log_links): Ditto. - * modulo-sched.c (generate_reg_moves): Ditto. - (find_max_asap): Ditto. - (find_max_hv_min_mob): Ditto. - (find_max_dv_min_mob): Ditto. - * sbitmap.c (sbitmap_first_set_bit): Ditto. - * sched-rgn.c (extract_edgelst): Ditto. - * tree-into-ssa.c (prepare_names_to_update): Ditto. - (dump_update_ssa): Ditto. - (ssa_names_to_replace) Ditto. - (switch_virtuals_to_full_rewrite): Ditto. - (update_ssa): Ditto. - * tree-vect-transform.c (vect_create_epilog_for_reduction): Ditto. - -2005-07-18 Daniel Berlin - - Fix PR tree-optimization/22483 - - * tree-complex.c (create_components): Use - safe_referenced_var_iterator and FOR_EACH_REFERENCED_VAR_SAFE. - * tree-flow-inline.h (fill_referenced_var_vec): New function. - * tree-flow.h (safe_referenced_var_iterator): New structure. - (FOR_EACH_REFERENCED_VAR_SAFE): New macro. - * tree-ssa-alias.c (setup_pointers_and_addressables): Use - safe_referenced_var iterator. - (add_type_alias): Ditto. - -2005-07-19 Steven Bosscher - - * loop-init.c (rest_of_handle_loop2): Remove. - (rtl_loop_init, rtl_loop_done, rtl_move_loop_invariants, - rtl_unswitch, rtl_unroll_and_peel_loops, rtl_doloop): New functions. - (pass_rtl_loop_init, pass_rtl_loop_done, - pass_rtl_move_loop_invariants, pass_rtl_unswitch, - pass_rtl_unroll_and_peel_loops, pass_rtl_doloop): New passes. - * tree-ssa-loop.c (pass_loop, pass_loop_init, pass_loop_done, - pass_unswitch): Rename to pass_tree_loop, pass_tree_loop_init, - pass_tree_loop_done, and pass_tree_unswitch. - (gate_loop): Rename to gate_tree_loop. - * passes.c (init_optimization_passes): Update for renamed tree - loop passes. Add the new loop2 passes as subpasses of loop2. - * tree-pass.h: Add extern declarations for the new loop2 subpasses. - Update for the renamed tree loop passes. - -2005-07-18 Ian Lance Taylor - - PR middle-end/22057 - * tree-cfgcleanup.c (cleanup_tree_cfg): Only remove forwarder - blocks when optimizing. - -2005-07-18 Steve Ellcey - - * common.opt (frename-registers): Initialize to 2. - (fweb): Ditto. - (fgcse-after-reload): Ditto. - * toplev.c (AUTODETECT_FLAG_VAR_TRACKING): Rename to AUTODETECT_VALUE. - (process_options): Only change flag_web, flag_rename_registers, - and flag_rerun_cse_after_loop if not explicitly set by user. - -2005-07-18 Jan Beulich - - * config/i386/i386.c (ix86_expand_branch, ix86_expand_setcc, - ix86_expand_carry_flag_compare, ix86_expand_int_movcc): Handle TImode - in 64-bit mode the same as DImode in 32-bit mode. - (ix86_expand_ashl_const, ix86_split_ashl, ix86_split_ashr, - ix86_split_lshr): Likewise. Rename to no longer refer to a specific - mode. Add new mode parameter. - * config/i386/i386.h (CONST_OK_FOR_LETTER_P): Describe and handle 'O'. - * config/i386/i386.md (cmpti, addti3, subti3, negti2, ashlti3, ashrti3, - x86_64_shift_adj): New expanders. - (*addti3_1, *subti3_1, *negti2_1, ashlti3_1, *ashlti3_2, ashrti3_1, - *ashrti3_2, lshrti3_1, *lshrti3_2, x86_64_shld, x86_64_shrd): New - insns. - Respective new splitters. Use renamed shift splitter helpers in 32-bit - DImode shift splitters. - * config/i386/i386-protos.h (ix86_split_ashl, ix86_split_ashr, - ix86_split_lshr): Renamed from ix86_split_[al]sh[rl]di. Added new - mode parameter. - -2005-07-18 Jan Beulich - - * i386.md (movdi_extzv_1): New. - (zero_extendhidi2): Combine alternatives and never force use of - REX64 prefix. - (zero_extendqidi2): Likewise. Don't restrict input selection. - -2005-07-17 Daniel Berlin - - Fix PR tree-optimization/22531 - * tree-ssa-pre.c (do_eustores): Make sure LHS is a decl for the - moment. - -2005-07-17 Daniel Berlin - - * tree-promote-statics.c (pass_promote_statics): Change dump file - name. - -2005-07-17 Daniel Berlin - - * tree-optimize.c (init_tree_optimization_passes): Add - pass_eliminate_useless_stores pass. - * tree-pass.h (pass_eliminate_useless_stores): New pass structure. - * tree-ssa-pre.c (is_copy_stmt): New function. - (follow_copies_till_vuse): Ditto. - (do_eustores): Ditto. - (gate_eustores): Ditto. - -2005-07-16 Richard Henderson - - * gcc.c (MFWRAP_SPEC): Don't wrap pthread_join or pthread_exit. - -2005-07-16 Danny Berlin - Kenneth Zadeck - - * Makefile.in: Added rules for ipa-pure-const.c, ipa-reference.c, - ipa-reference.h, ipa-utils.c, ipa-utils.h, ipa-type-escape.c, - ipa-type-escape.h, tree-promote-statics.c - * ipa-pure-const.c, ipa-reference.c, ipa-reference.h, ipa-utils.c, - ipa-utils.h, ipa-type-escape.c, ipa-type-escape.h, - tree-promote-statics.c: new files. - * alias.c: (nonlocal_mentioned_p_1, nonlocal_mentioned_p, - nonlocal_referenced_p_1, nonlocal_referenced_p, nonlocal_set_p_1, - int nonlocal_set_p, mark_constant_function): Deleted. - (rest_of_handle_cfg): Removed call to mark_constant_function. - (nonoverlapping_component_refs_p): Added calls to support - type based aliasing. - * tree-ssa-alias.c (may_alias_p, - compute_flow_insensitive_aliasing): Ditto. - * calls.c (flags_from_decl_or_type): Removed reference to - cgraph_rtl_info. - * c-typeck.c (convert_arguments): Make builtins tolerant of having - too many arguments. This is necessary for Spec 2000. - * cgraph.h (const_function, pure_function): Removed. - * common.opt: Added "fipa-pure-const", "fipa-reference", - "fipa-type-escape", and "ftree-promote-static". - * opts.c: Ditto. - * passes.c: Added ipa and tree-promote-statics passes. - * timevar.def: Added TV_IPA_PURE_CONST, TV_IPA_REFERENCE, - TV_IPA_TYPE_ESCAPE, and TV_PROMOTE_STATICS. - * tree-dfa.c (referenced_var_lookup_if_exists): New function. - * tree-flow.h: Added exposed sra calls and addition of - reference_vars_info field for FUNCTION_DECLS. - * tree-pass.h: Added passes. - * tree-sra.c: (sra_init_cache): New function. - (sra_insert_before, sra_insert_after) Made public. - (type_can_be_decomposed_p): Renamed from type_can_be_decomposed_p - and made public. - * tree-ssa-alias.c (dump_alias_stats): Added stats for type based - aliasing. (may_alias_p): Added code to use type escape analysis to - improve alias sets. - * tree-ssa-operands.c (add_call_clobber_ops): Added parameter and - code to prune clobbers of static variables based on information - produced in ipa-reference pass. Changed call clobbering so that - statics are not marked as clobbered if the call does not clobber - them. - -2005-07-16 Daniel Berlin - - * tree-ssa-structalias.c (need_to_solve): Need to check for preds, - too. - -2005-07-16 Eric Botcazou - - * doc/install.texi (*-*-solaris2*): Document recommended version - of GNU binutils and mention GNU linker problem on Solaris 10. - -2005-07-16 Joseph S. Myers - - PR c/22421 - * c-decl.c (c_build_bitfield_integer_type): New function. - (finish_struct): Call it. - * c-pretty-print.c (pp_c_type_specifier): Handle bit-field types. - -2005-07-16 Kaveh R. Ghazi - - * c-typeck.c (digest_init): Call 'convert_for_assignment' - before returning. - -2005-07-16 Jan Hubicka - - * cfg.c (update_bb_profile_for_threading): Fix profile updating. - (scale_bbs_frequencies_int): Watch roundoff errors. - * predict.c (return_prediction): Initialize return_stmt. - -2005-07-16 Jan Hubicka - - * profile.c (rest_of_handle_branch_prob): Fix handling of estimation - after RTL profiling. - -2005-07-11 Andrew Pinski - - PR middle-end/22398 - * fold-const.c (build_range_check): Convert high/low to etype - if we are only comparing against exp. - -2005-07-13 Daniel Berlin - - Fix PR tree-optimization/22376 - * tree-ssa-structalias.c (build_constraint_graph): We really meant - special var here. - (need_to_solve): New function. - (compute_points_to_sets): Use it. - -2005-07-15 Jan Hubicka - - * cfg.c (update_bb_profile_for_threading): More diagnostic. - * tree-ssa-threadupdate.c (redirect_edges): Update profile of dup_block. - -2005-07-15 Richard Guenther - - * c-common.c (handle_flatten_attribute): New function. - Add flatten function attribute. - * doc/extend.texi: Document flatten function attribute. - * Makefile.in (ipa-inline.o): Depend on hashtab.h. - * ipa-inline.c (cgraph_find_cycles, cgraph_flatten_node): - New functions. - (cgraph_decide_inlining): Handle functions with flatten - attribute. - -2005-07-14 David Edelsohn - - * config/rs6000/rs6000.md (UNSPEC_SYNC, UNSPEC_LWSYNC, - UNSPEC_ISYNC, UNSPEC_SYNC_OP, UNSPEC_ATOMIC, UNSPEC_CMPXCHG, - UNSPEC_XCHG, UNSPEC_AND): New. - (UNSPECV_ATOMIC, UNSPECV_SYNC, UNSPECV_SYNC_OP, UNSPECV_CMPXCHG, - UNSPECV_LWSYNC, UNSPECV_ISYNC): Delete. - * config/rs6000/sync.md (FETCHOP): New code macro. - (fetchop_name, fetchop_pred, fetchopsi_constr, fetchopdi_constr): - New code attrs. - (memory_barrier, sync_internal): Use unspec instead of unspec_volatile. - (sync_compare_and_swap): Same. - (sync_lock_test_and_set): Same. - (sync_, sync_nand): Only use rs6000_emit_sync - for QImode and HImode, and not PPC405. - (sync_old_, sync_old_nand): Same. - (sync_new_, sync_new_nand): Same. - (sync_{si,di}_internal): New. - (sync_nand{si,di}_internal): New. - (sync_old_{si,di}_internal): New. - (sync_old_nand{si,di}_internal): New - (sync_new_{si,di}_internal): New. - (sync_new_nand{si,di}_internal): New. - (atomic_and{si,di}): New. - (sync_new_nand{si,di}_internal): New. - (atomic_and{si,di}): New. - (sync_add_internal): Delete. - (sync_addshort_internal): Use unspec instead of unspec_volatile. - (sync_sub_internal): Delte. - (sync_subshort_internal): New. - (sync_andsi_internal): Use unspec instead of unspec_volatile. - (sync_anddi_internal): Delete. - (sync_boolsi_internal): Use unspec instead of unspec_volatile. - (sync_booldi_internal): Delete. - (sync_boolc_internal): Delete. - (sync_boolcshort_internal): Use unspec instead of unspec_volatile. - (sync_boolc_internal2): Delete. - (sync_boolcc_internal): Delete. - (isync, lwsync): Use unspec instead of unspec_volatile. - * config/rs6000/rs6000.c (rs6000_emit_sync): Implement MINUS. - Revert UNSPEC_VOLATILE. - (rs6000_split_atomic_op): New. - * config/rs6000/rs6000-protos.h (rs6000_split_atomic_op): Declare. - -2005-07-14 Eric Christopher - - * config/mips/mips.c (mips_canonicalize_comparison): Cast - argument of trunc_int_for_mode to unsigned HOST_WIDE_INT. - -2005-07-14 Eric Christopher - - * config/s390/t-tpf (SHLIB_MAPFILES): Remove. - -2005-07-14 Steven Bosscher - - PR tree-optimization/22230 - * tree-vrp.c (extract_range_from_binary_expr): Fix logics thinko in - the computation of the four cross productions for "range op range". - -2005-07-14 Alexandre Oliva - Ulrich Weigand - - PR target/20126 - * loop.c (loop_givs_rescan): Do not ICE if unable to reduce an IV - in some insn. - -2005-07-14 Ulrich Weigand - - * config/s390/s390.h (TARGET_TPF_PROFILING): Add default definition. - -2005-07-14 Steve Ellcey - - * config/ia64/ia64.c (ia64_output_dwarf_dtprel): Support ILP32 mode. - -2005-07-14 Richard Guenther - - PR middle-end/22347 - * config/i386/i386-protos.h (ix86_function_value): Change - prototype to match new target hook. - * config/i386/i386.c (ix86_value_regno): Change prototype - to take extra type argument. - (TARGET_FUNCTION_VALUE): Define. - (ix86_function_ok_for_sibcall): Pass extra argument to - ix86_value_regno, check return slot rtx for exact match. - (ix86_function_value): Take extra parameter. Dispatch to - ix86_value_regno with fndecl/fntype as provided. - (ix86_value_regno): Handle extra type argument. - * config/i386/i386.h (FUNCTION_VALUE): No longer define. - - * testsuite/gcc.target/i386/sseregparm-3.c: New testcase. - * testsuite/gcc.target/i386/sseregparm-4.c: New testcase. - * testsuite/gcc.target/i386/sseregparm-5.c: New testcase. - * testsuite/gcc.target/i386/sseregparm-6.c: New testcase. - * testsuite/gcc.target/i386/sseregparm-7.c: New testcase. - -2005-07-14 Richard Guenther - - * Makefile.in (explow.o, reg-stack.o): Depend on target.h. - * calls.c (expand_call): Pass fntype to hard_function_value. - (emit_library_call_value_1): Likewise. - * explow.c: Include target.h. - (hard_function_value): Take extra argument, the fntype. - Use new target hook for function_value. - * expr.h (hard_function_value): Change prototype. - * function.c (aggregate_value_p): Pass 0 as fntype to - hard_function_value. - (assign_parms): Use new target hook for function_value. - Pass 0 as fntype to hard_function_value. - (expand_function_end): Likewise. - * reg-stack.c: Include target.h. - (stack_result): Use new target hook for function_value. - * target-def.h: New target hook function_value. - * target.h: Likewise. - * targhooks.c (default_function_value): New function. - * targhooks.h (default_function_value): Declare. - -2005-07-13 Ian Lance Taylor - - * config/mips/mips.h (CLZ_DEFINED_VALUE_AT_ZERO): Define. - -2005-07-14 Jan Hubicka - - * tree-dfa.c (dump_variable): Use default_def function. - * tree-ssa-alias.c (dump_points_to_info): Likewise. - * tree-ssa.c (verify_use): Likewise. - * tree-ssanames.c (release_ssa_name): Likewise. - * tree-tailcall.c (eliminate_tail_call): Likewise. - (tree_optimize_tail_calls_1): Likewise. - * tree-vrp.c (get_value_range): Likewise. - -2005-07-14 Ben Elliston - - * gcc.c (main): Compare language[0] with '*' when iterating over - the infiles. - -2005-07-13 Adrian Strae½tling - - * config/s390/s390.c: (s390_cc_modes_compatible): Move before - "s390_emit_compare". Add handling of CCZ1mode. - (s390_canonicalize_comparison): Simplify cascaded EQ, NE. - (390_emit_compare): Use "s390_cc_modes_compatible" for mode - checking. - (s390_branch_condition_mask): Add CCZ1mode handling. - * config/s390/s390.md: ("seq", "*seq"): New pattern. - ("sync_compare_and_swap_cc", "*sync_compare_and_swap_cc"): - Use CCZ1mode instead of CCZmode. - * config/s390/s390-modes.def: Add CCZ1mode. Comment new mode. - -2006-07-13 Adrian Strae½tling - - * config/s390/s390.md: ("cmpstrsi", "*cmpstr"): New - pattern. - ("strlen", "*strlen"): Use hard reg 0 in SImode. - -2005-07-13 Eric Christopher - - * config/mips/mips.c (mips_canonicalize_comparison): New. - (mips_emit_int_relational): Use. - -2005-07-13 Eric Christopher - - * config.gcc (s390x-ibm-tpf*): Add extra_options. Remove - static extra parts. - * config/s390/s390.md: Include tpf.md. Move tpf specific - patterns... - * config/s390/tpf.md: To here. - * config/s390/s390.opt: Move tpf specific options... - * config/s390/tpf.opt: to here. Add mmain option. - * config/s390/tpf-unwind.h: Remove unnecessary defines. - * config/s390/tpf.h: Rewrite. - -2005-07-13 H.J. Lu - - * doc/tm.texi: Remove @xref{Cross-profiling}. - -2005-07-13 Jeff Law - - * fold-const.c (fold_binary): When comparing two simple ADDR_EXPR - expressions, test their _DECL operands for pointer equality rather - than using operand_equal_p. - -2005-07-13 H.J. Lu - - * config/alpha/linux.h (TARGET_HAS_F_SETLKW): Renamed to ... - (TARGET_POSIX_IO): This. - * config/darwin.h: Likewise. - * config/freebsd.h: Likewise. - * config/linux.h: Likewise. - * config/lynx.h: Likewise. - * config/netbsd.h: Likewise. - * config/rs6000/linux64.h: Likewise. - * config/rs6000/linux.h: Likewise. - * config/s390/tpf.h: Likewise. - * config/sh/embed-elf.h: Likewise. - * config/sparc/linux64.h: Likewise. - * config/sparc/linux.h: Likewise. - * config/svr4.h: Likewise. - * gcov-io.h: Likewise. - - * doc/tm.texi: Updated. - - * libgcov.c (create_file_directory): Defined only if - TARGET_POSIX_IO is defined. - (gcov_exit): Call create_file_directory only if TARGET_POSIX_IO - is defined. - -2005-07-13 Jan Hubicka - - * tree-ssa-operands.c (get_expr_operands): Fix typo in previous patch. - -2005-07-13 David Edelsohn - - * tree-ssa-dom.c (lookup_avail_expr): Do not pass member in freed - structure as argument. - -2005-07-13 Paolo Bonzini - - PR tree-optimization/21921 - * tree-iterator.c (tsi_link_before): Support the case when - tsi_end_p (tsi) == true. - -2005-07-12 Zdenek Dvorak - - PR tree-optimization/22442 - * tree-chrec.c (chrec_fold_multiply_poly_poly): Associate chrecs - correctly. - -2005-07-12 Zdenek Dvorak - - PR rtl-optimization/20376 - * toplev.c (process_options): Enable -fweb and -frename-registers when - unrolling. - * doc/invoke.texi: Update the information about when -fweb and - -frename-registers are enabled. - -2005-07-12 Andrew Pinski - - PR tree-opt/21840 - * tree-ssa-pre.c (eliminate): Convert the sprime to the correct type - if *rhs_p is not a SSA_NAME. - -2005-07-12 Daniel Berlin - - Fix PR tree-optimization/22422 - * tree-ssa-structalias.c (struct variable_info): Add flag for - special vars. - (get_varinfo): Now a static function. - (new_varinfo): init has_union and is_special_var to false. - (solution_set_add): Check has_union. - (do_da_constraint): Move temporary variable so it gets reset - properly. - Also check for special variable. - (do_ds_constraint): Ditto. - (do_sd_constraint): Ditto. - (do_structure_copy): Check for special variable. - (find_func_aliases): Ditto. - (init_base_vars): Set special vars properly. - -2005-07-13 Jan Hubicka - - * cfgexpand.c (expand_one_stack_var): Do not expand variables when we - do unit-at-a-time. - - * tree-ssa-operands.c (parse_ssa_operands): Fix formatting. - (get_expr_operands): Fix thinko wrt flags and subvars. - - PR tree-optimize/22379 - * tree-inline.c (expand_call_inline): Do not output sorry in early - inlining. - -2005-07-12 Dale Johannesen - - * config/rs6000.c (rs6000_rtx_cost): Move FLOAT_EXTEND. - -2005-07-12 Andrew Pinski - - PR bootstrap/21704 - * host-linux.h: Include limits.h. - -2005-07-12 Dale Johannesen - - * expr.c (compress_float_constant): Add cost check. - * config/rs6000.c (rs6000_rtx_cost): Adjust FLOAT_EXTEND cost. - -2005-07-12 Dale Johannesen - - * gcc.target/i386/compress-float-sse.c: New. - * gcc.target/i386/compress-float-sse-pic.c: New. - * gcc.target/i386/compress-float-387.c: New. - * gcc.target/i386/compress-float-387-pic.c: New. - * gcc.dg/compress-float-ppc.c: New. - * gcc.dg/compress-float-ppc-pic.c: New. - -2005-07-12 Eric Christopher - - * config.gcc (s390x-ibm-tpf*): Add extra_options. Remove - static extra parts. - * config/s390/s390.md: Include tpf.md. Move tpf specific - patterns... - * config/s390/tpf.md: To here. - * config/s390/s390.opt: Move tpf specific options... - * config/s390/tpf.opt: to here. Add mmain option. - * config/s390/tpf-unwind.h: Remove unnecessary defines. - * config/s390/tpf.h: Rewrite. - -2005-07-12 Eric Christopher - - * gcc.c (struct infile): Update comment for language. - (main): Rewrite input file resetting code. - -2005-07-12 Andrew Pinski - - PR tree-opt/22335 - * tree-ssa-dom.c (eliminate_redundant_computations): Reject the prop if - requiring a cast in a non RHS of modify_expr. Add a cast when required. - (lookup_avail_expr): Use constant_boolean_node instead - of boolean_false_node/boolean_true_node. - -2005-07-12 Ben Elliston - - * tree-cfg.c (dump_cfg_stats): Add a new fmt_str_2 format string - and use it when printing num_edges. - -2005-07-12 Bernd Schmidt - - * doc/extend.texi (Blackfin Built-in Functions): New section. - * doc/invoke.texi (mcsync-anomaly, mno-csync-anomaly): Fix the - @opindex. - -2005-07-12 Adrian Straetling - - * builtins.c: (expand_builtin_memcmp, expand_builtin_strncmp): - s/cmpstrsi/cmpstrnsi - (expand_builtin_strcmp): Rewrite to support both 'cmpstrsi' and - 'cmpstrnsi'. - * optabs.c: (prepare_cmp_insn): Add availability of 'cmpstrn'. - (init_optabs): Initialize cmpstrn_optab. - * optabs.h: (enum insn_code cmpstrn_optab): Declare. - * genopinit.c: (optabs[]): Add 'cmpstrn' to initialisation. - * expr.c: (enum insn_code cmpstrn_optab): Declare. - * config/i386/i386.md: s/cmpstr/cmpstrn - * config/c4x/c4x.md: s/cmpstr/cmpstrn - * doc/md.texi: Update documentation. - -2005-07-11 Richard Henderson - - * config/alpha/alpha.c (alpha_gimplify_va_arg_1): Use - build_va_arg_indirect_ref. - (alpha_gimplify_va_arg): Likewise. - * config/c4x/c4x.c (c4x_gimplify_va_arg_expr): Likewise. - * config/i860/i860.c (i860_gimplify_va_arg_expr): Likewise. - * config/mips/mips.c (mips_gimplify_va_arg_expr): Likewise. - * config/pa/pa.c (hppa_gimplify_va_arg_expr): Likewise. - * config/sh/sh.c (sh_gimplify_va_arg_expr): Likewise. - * config/stormy16/stormy16.c (xstormy16_expand_builtin_va_arg): - Likewise. - * config/xtensa/xtensa.c (xtensa_gimplify_va_arg_expr): Likewise. - -2005-07-12 Zdenek Dvorak - - * tree-flow.h (remove_empty_loops, single_dom_exit): Declare. - * passes.c (init_optimization_passes): Add pass_empty_loop. - * tree-pass.h (pass_empty_loop): Declare. - * tree-ssa-loop-ivcanon.c (empty_loop_p, remove_empty_loop, - try_remove_empty_loop, remove_empty_loops): New functions. - * tree-ssa-loop-ivopts.c (single_dom_exit): Export. - * tree-ssa-loop.c (tree_ssa_empty_loop, pass_empty_loop): New. - -2005-07-12 Peter Barada - - PR middle-end/16719 - PR middle-end/18421 - * config/m68k/m68k.h (HARD_REGNO_MODE_OK): Disallow bytes - in address registers. - * config/m68k/m68k.c (hard_regno_mode_ok): Likewise. - * config/m68k/m68k.md: Replace 's' with 'i' in 4th - alternative of addsi3_5200. - -2005-07-11 Ian Lance Taylor - - * config/mips/mips.md (ffs2): Remove. - -2005-07-11 Ian Lance Taylor - - * doc/tree-ssa.texi (Cleanups): Improve description of - TRY_FINALLY_EXPR. - (GIMPLE Exception Handling): Clarify TRY_CATCH_EXPR cases. - -2005-07-11 Daniel Berlin - - * print-tree.c (print_node): Use DECL_ARGUMENT_FLD. - * tree.h (DECL_ARGUMENT_FLD): New macro. - -2005-07-11 Daniel Berlin - - Fix PR tree-optimization/22404 - - * tree-ssa-structalias.c (create_variable_info_for): Use - correct offset. - -2005-07-11 Bernd Schmidt - - * config/bfin/bfin.md (cmpsi, compare_eq, compare_ne, compare_lt, - compare_le, compare_leu, compare_ltu): Use reg_or_const_int_operand - for second comparison operand. - * config/bfin/predicates.md (reg_or_const_int_operand): New. - - * config/bfin/bfin.md (define_attr "type"): Add "sync". - (define_insn_reservation "alu"): Likewise. - (csync, ssync): Now of type sync. - * config/bfin/bfin.h (TARGET_DEFAULT): Defaults to - -mcsync-anomaly -mspecld-anomaly. - * config/bfin/bfin.opt (mcsync): Remove. - (mcsync-anomaly, mspecld-anomaly): Add. - * config/bfin/bfin.c: Include "insn-codes.h". - (bfin_reorg): Extend to handle the CSYNC anomaly as well. - (TARGET_DEFAULT_TARGET_FLAGS): New. - * doc/invoke.texi: Document -mcsync-anomaly, -mspecld-anomaly. - -2005-07-11 Steven Bosscher - - * basic-block.h: Give the BB flags enum a name, bb_flags. - Add new flags BB_FORWARDER_BLOCK, and BB_NONTHREADABLE_BLOCK. - * cfgcleanup.c (enum bb_flags): Remove here. - (BB_FLAGS, BB_SET_FLAG, BB_CLEAR_FLAG): Remove. - (notice_new_block): Set/test bb->flags instead of aux via BB_FLAGS. - (update_forwarder_flag): Likewise. - (thread_jump): Likewise. - (try_forward_edges): Likewise. - (try_optimize_cfg): Likewise. Clear bb->flags before updating the - forwarder flags. Don't clear bb->aux for all basic blocks. Only - reset the BB_FORWARDER_BLOCK and BB_NONTHREADABLE_BLOCK flags. - -2005-07-11 Richard Guenther - - * config/i386/i386.opt: New target option -msseregparm. - * config/i386/i386.c (override_options): Error out for - -msseregparm but no SSE support. - (ix86_function_sseregparm): Check for global sseregparm. - * doc/invoke.texi: Document -msseregparm. - -2005-07-11 Kazuhiro Inaoka - - * config.gcc (m32r-*-linux*): Use the default extra_parts. - (m32rle-*-linux*): Ditto. - -2005-07-11 Jakub Jelinek - - * cfgexpand.c (stack_protect_classify_type): Use TYPE_SIZE_UNIT (type) - instead of TYPE_MAX_VALUE (TYPE_DOMAIN (type)) to get array size in - bytes. - -2005-07-10 John David Anglin - - PR middle-end/22239 - PR target/20126 - * loop.c (loop_givs_rescan): Use expand_simple_binop instead of - gen_rtx_MINUS to handle non-replaceable (plus ((x) (const)). - -2005-07-07 Daniel Berlin - - * tree-ssa-structalias.c (struct variable_info): Heapify complex. - (varmap): Heapify varmap. - (constraints): Heapify constraints. - (struct constraint_graph): Heapify succs and preds. - (constraint_vec_find): Update for heapification. - (constraint_set_union): Ditto. - (insert_into_complex): Ditto. - (constraint_edge_vec_find): Ditto. - (erase_graph_self_edge): Ditto. - (add_graph_edge): Ditto. - (get_graph_weights): Ditto. - (merge_graph_nodes): Ditto. - (build_constraint_graph): Ditto. - (topo_visit): Ditto. - (solve_graph): Ditto. - (create_variable_info_for): Ditto. - (init_base_vars): Ditto. - (delete_points_to_sets): Free graph, varmap, and complex constraints. - (condese_varmap_nodes): Free complex vector. - (clear_edges_for_node): Clear succs and preds vector. - -2005-07-10 Daniel Berlin - - * tree-ssa-structalias.c (update_alias_info): Change counting of - references to not include vdefs. - -2005-07-10 Daniel Berlin - - * tree-ssa-alias.c (free_used_part_map): Add missing free. - (up_insert): Ditto. - -2005-07-10 John David Anglin - - * pa.c (pa_commutative_p): Make PLUS commutative when - TARGET_NO_SPACE_REGS is true. - -2005-07-09 Diego Novillo - - * Makefile.in (tree-ssa-alias.o): Depend on tree-ssa-structalias.h - * tree-cfg.c (CHECK_OP): Only test for is_gimple_val. - * tree-dfa.c (dump_subvars_for): New. - (debug_subvars_for): New. - (dump_variable): Show subvariables if VAR has them. - * tree-flow-inline.h (get_subvar_at): New. - (overlap_subvar): Change offset and size to unsigned HOST_WIDE_INT. - * tree-flow.h (struct ptr_info_def): Remove field pt_malloc. - Update all users. - (struct subvar): Change fields offset and size to unsigned - HOST_WIDE_INT. - (dump_subvars_for): Declare. - (debug_subvars_for): Declare. - (get_subvar_at): Declare. - (okay_component_ref_for_subvars): Change 2nd and 3rd argument - to unsigned HOST_WIDE_INT *. - (overlap_subvar): Likewise. - * tree-gimple.c (is_gimple_reg): Always return false for - SFTs and memory tags. - * tree-pass.h (pass_build_pta, pass_del_pta): Remove. - Update all callers. - * tree-ssa-alias.c: Include tree-ssa-structalias.h. - (compute_may_aliases): Call compute_points_to_sets. - (collect_points_to_info_for): Remove. - (compute_points_to_and_addr_escape): Remove. - (delete_alias_info): Call delete_points_to_sets. - (compute_flow_sensitive_aliasing): If the call to - find_what_p_points_to returns false, call set_pt_anything. - (add_may_alias): Set TREE_ADDRESSABLE when adding a new alias. - (set_pt_anything): Clear pi->pt_vars. - (set_pt_malloc): Remove. - (merge_pointed_to_info): Remove. - (add_pointed_to_expr): Remove. - (add_pointed_to_var): Remove. - (collect_points_to_info_r): Remove. - (is_escape_site): Make extern. - (create_sft): New. - (create_overlap_variables_for): Call it. - * tree-ssa-copy.c (merge_alias_info): Never merge - flow-sensitive alias information. - * tree-ssa-operands.c (get_expr_operands): Adjust variables - offset and size to be unsigned HOST_WIDE_INT. - (add_to_addressable_set): Rename from note_addressable. - Set TREE_ADDRESSABLE as the variables are added to the set. - Update all users. - (add_stmt_operand): Do not try to micro-optimize unmodifiable - operands into VUSEs when adding V_MAY_DEFs for members in an - alias set. - * tree-ssa-operands.h (add_to_addressable_set): Declare. - * tree-ssa-structalias.c: Include tree-ssa-structalias.h last. - (struct variable_info): Add bitfield is_heap_var. - (var_anyoffset, anyoffset_tree, anyoffset_id): Declare. - (new_var_info): Initialize is_heap_var. - (get_constraint_for): Add HEAP variables to the symbol table. - Mark them with is_heap_var. - (update_alias_info): New. Taken mostly from the old - compute_points_to_and_addr_escape. - (handle_ptr_arith): New. - (find_func_aliases): Call update_alias_info. - Call handle_ptr_info for tcc_binary expressions. - Call mark_stmt_modified. - (create_variable_info_for): If DECL has subvars, do not create - variables for its subvars. Always add all the fields. - (set_uids_in_ptset): If the solution includes ANYOFFSET and - SFTs, then add all the SFTs of the structure. - If VI->DECL is an aggregate with subvariables, add the SFT at - VI->OFFSET. - (find_what_p_points_to): If VI is an artificial variable, - translate to bitfields in SSA_NAME_PTR_INFO. - If the solution is empty, set pi->pt_vars to NULL - (init_base_vars): Create ANYOFFSET. - (compute_points_to_sets): Rename from create_alias_vars. - Make extern. - (pass_build_pta): Remove. - (delete_points_to_sets): Rename from delete_alias_vars. - (pass_del_pta): Remove. - * tree-ssa-structalias.h (struct alias_info): Move from - tree-ssa-alias.h. - (NUM_REFERENCES, NUM_REFERENCES_CLEAR, NUM_REFERENCES_INC, - NUM_REFERENCES_SET): Likewise. - (compute_points_to_sets, delete_points_to_sets): Declare. - -2005-07-09 Richard Henderson - - * config/alpha/alpha.c (emit_insxl, alpha_expand_compare_and_swap_12, - alpha_split_compare_and_swap_12, alpha_expand_lock_test_and_set_12, - alpha_split_lock_test_and_set_12): New functions. - * config/alpha/alpha-protos.h: Update. - * config/alpha/alpha.md (UNSPEC_MB, UNSPEC_ATOMIC, - UNSPEC_CMPXCHG, UNSPEC_XCHG): Rename from UNSPECV_FOO. - * config/alpha/sync.md (I12MODE): New. - (memory_barrier, mb_internal): Use unspec instead of unspec_volatile. - (sync_): Likewise. - (sync_nand): Likewise. - (sync_old_): Likewise. - (sync_new_): Likewise. - (sync_old_nand, sync_new_nand): Likewise. - (sync_compare_and_swap): Likewise. - (sync_lock_test_and_set): Likewise. - (sync_compare_and_swap): New. - (sync_compare_and_swap_1): New. - (sync_lock_test_and_set): New. - (sync_lock_test_and_set_1): New. - -2005-07-09 Diego Novillo - - PR 21356 - PR 22332 - * passes.c (execute_todo): Cleanup the CFG before updating SSA. - -2005-07-09 Jakub Jelinek - - * config/i386/i386.c (output_set_got): Don't omit OFFSET FLAT: - in Intel syntax add %reg, OFFSET FLAT:_GLOBAL_OFFSET_TABLE_+(.-.Lx). - -2005-07-09 Richard SAndiford - - PR target/21656 - * config/mips/elf.h (NO_IMPLICIT_EXTERN_C): Define. - -2005-07-08 David Edelsohn - - * config/rs6000/sync.md (load_locked_): Use Z for - memory_operand constraint. - (store_conditional_): Same. - (sync_compare_and_swap): Same. - (sync_lock_test_and_set): Same. - -2005-07-08 Hans-Peter Nilsson - - Rewrite PIC support to more closely model actual instructions. - * config/cris/cris-protos.h (cris_gotless_symbol, cris_got_symbol) - (cris_symbol): Remove prototypes for removed functions. - (cris_pic_symbol_type_of, cris_valid_pic_const) - (cris_expand_pic_call_address): Prototypes for new functions. - * config/cris/cris/cris.c (cris_pic_sympart_only): Remove unused - variable. - (cris_print_operand) : Remove cases for unused - modifiers. - : Add case for new punctuation character. - : Temporarily set flag_pic = 2 instead of incorrectly - emitting (extra) PIC modifier. - : Do not assert for PLT. - (cris_initial_frame_pointer_offset, cris_simple_epilogue) - (cris_expand_prologue, cris_expand_epilogue): Check - for pic_offset_table_rtx usage instead of taking - current_function_uses_pic_offset_table as the final word. - (cris_rtx_costs, cris_address_cost, cris_side_effect_mode_ok): - Remove flag_pic difference. - (cris_valid_pic_const, cris_pic_symbol_type_of): New functions, - the moral equivalents of... - (cris_symbol, cris_gotless_symbol, cris_got_symbol): Remove - functions. - (cris_legitimate_pic_operand): Just call cris_valid_pic_const. - (cris_handle_option): Mark ARG as unused. - (cris_expand_pic_call_address): New worker function for "call", - "call_value". - (cris_asm_output_symbol_ref, cris_asm_output_label_ref): Do not - output PIC constructs here. - (cris_output_addr_const_extra): Changes for emitting PIC modifiers - as symbol-specific modifers, not whole or part of operands. - * config/cris/cris/cris.h (EXTRA_CONSTRAINT): Remove 'U' case. - (EXTRA_CONSTRAINT_S): Changed semantics: allow only CONST-wrapped - constants and flag_pic. - (CONSTANT_INDEX_P): Adjust for new functions. - (enum cris_pic_symbol_type): New helper type. - (PRINT_OPERAND_PUNCT_VALID_P): Add ':'. - * config/cris/cris/cris.md (CRIS_UNSPEC_GOTREL) - (CRIS_UNSPEC_GOTREAD, CRIS_UNSPEC_PLTGOTREAD): New - define_constants. - ("movsi"): Emit actual instructions for GOT and relative access. - ("*movsi_got_load"): New pattern to set up the register holding - the GOT pointer. - ("*movsi_internal"): Operand 1 is not a plain general_operand. - Adjust FIXME for 'S'. - : Sanity-check UNSPEC types for PIC. - Use "movs" for -fpic cases. - ("addsi3"): Add alternative for 'S'; use adds.w when possible. - ("uminsi3","*expanded_call_value"): Remove 'S' alternative. - ("call", "call_value"): Just call cris_expand_pic_call_address for - PIC addresses. - ("*expanded_call_no_gotplt", "*expanded_call_value_no_gotplt"): - Remove special pattern. - ("*expanded_call_side", "*expanded_call_value_side"): New - patterns. - (gotplt-to-plt, gotplt-to-plt-side-call) - (gotplt-to-plt-side-call-value, gotplt-to-plt-side): New - peephole2:s. - * config/cris/cris/predicates.md - ("cris_general_operand_or_gotless_symbol"): Remove unused - predicate. - ("cris_general_operand_or_symbol"): Adjust for new functions. - -2005-07-08 Andrew Pinski - - * config/darwin.h (TARGET_C99_FUNCTIONS): Define to 1. - -2005-07-08 Daniel Berlin - - * Makefile.in (TREE_H): Add treestruct.def. - (c-decl.o): Add pointer-set.h - * c-decl.c (diagnose_mismatched_decls): Don't attempt to look at - visibility on regular DECL's. - (merge_decls): Fix the copying of decl nodes of various types for - the new structures. Don't update RTL, section name, weak status, - etc, on DECL's without RTL. - (grokdeclarator): DECL_ARG_TYPE_AS_WRITTEN is gone. - Don't check volatile on non-variable types. - (store_parm_decls_oldstyle): Use pointer_set instead of DECL_WEAK - to check whether we have seen arguments. - * c-objc-common.c (c_tree_printer): Reverse order of tests so that - flag is checked before field (flag is common, field is not). - * dwarf2out.c (decl_ultimate_origin): Only DECL's with - TS_DECL_COMMON could have an origin. - (add_location_or_const_value_attribute): Don't check section name - on non-var/function decls. - (dwarf2out_var_location): Reverse order of tests. - * emit-rtl.c (set_reg_attrs_for_parm): DECL_CHECK is dead, replace - with DECL_WRTL_CHECK. - * expmed.c (make_tree): rtl is now in decl_with_rtl. - * fold-const.c (fold_binary): Don't check weakness on - non-var/function decls. - (tree_expr_nonzero_p): Ditto. - (fold_checksum_tree): Use tree_decl_extra as sizeof - buffer. - * ggc-page.c (extra_order_size_table): Add sizes for - tree_decl_non_common, tree_parm_decl, tree_var_decl, and - tree_field_decl. - * gimplify.c (gimplify_bind_expr): Only set - DECL_SEEN_IN_BIND_EXPR_P on VAR_DECL. - * integrate.c (copy_decl_for_inlining): Don't set RTL on decl's - without RTL. - * langhooks-def.h (LANG_HOOK_INIT_TS): New. - * langhooks.h (init_ts). New langhook. - * passes.c (rest_of_decl_compilation): Reverse order of tests. - * print-tree.c (print_node): Update to only print fields that - exist in the structures the passed decl has. - * toplev.c (wrapup_global_declarations): Don't reset - DECL_DEFER_OUTPUT on DECL's that don't contain it. - * tree-browser.c (browse_tree): DECL_ARG_TYPE_AS_WRITTEN removed. - * tree-inline.c (remap_decl): Ditto. - * tree-outof-ssa.c (create_temp): Reverse order of tests. - * tree-pretty-print.c (print_declaration): Don't print - DECL_REGISTER on things that don't contain it. - * tree-vrp.c (expr_computes_nonzero): Don't check weakness on - non-var/function decls. - * tree.c (tree_contains_struct): New structure. - (init_priority_for_decl): New hashtable. - (tree_int_map): New structure. - (tree_int_map_eq): New function. - (tree_int_map_marked_p): Ditto. - (tree_int_map_hash): Ditto. - (tree_map): Move to tree.h. - (tree_map_eq): Externalize. - (tree_map_hash): Ditto. - (tree_map_marked_p): Ditto. - (init_ttree): Set up tree_contains_struct and call langhook. - (decl_assembler_name): Use DECL_NON_COMMON_CHECK.. - (tree_code_size): Update for new structures. - (tree_node_structure): Update for new structures. - (make_node_stat): Don't try to set DECL_IN_SYSTEM_HEADER on decls - without the field. - (copy_node_stat): Copy init priority. - (build_decl_stat): Ditto for visibility. - (ts_enum_names): New. - (tree_contains_struct_check_failed): New function. - (decl_init_priority_lookup): Ditto. - (decl_init_priority_insert): Ditto. - * treestruct.def: New file. - * tree.h (CODE_CONTAINS_STRUCT): New macro. - (CONTAINS_STRUCT_CHECK): Ditto. - (tree_contains_struct_check_failed): New prototype. - (DECL_CHECK): Removed. - (DECL_MINIMAL_CHECK): New. - (DECL_COMMON_CHECK): Ditto. - (DECL_WRTL_CHECK): Ditto. - (DECL_NON_COMMON_CHECK): Ditto. - (DECL_WITH_VIS_CHECK): Ditto. - (VAR_OR_FUNCTION_DECL_P): Ditto - (struct tree_decl_minimal): New structure. - (struct tree_decl_common): Ditto. - (struct tree_decl_with_rtl): Ditto. - (struct tree_decl_with_vis): Ditto. - (struct tree_decl_non_common): Ditto. - (struct tree_field_decl): Ditto. - (struct tree_parm_decl): Ditto. - (struct tree_var_decl): Ditto. - (struct tree_function_decl): Ditto. - (struct tree_const_decl): Ditto. - (struct tree_result_decl): Ditto. - (union tree_node): Add new structures. - * var-tracking.c (track_expr_p): Reverse order of tests. - - * doc/c-tree.texi: Add documentation on DECL node internal structure. - -2005-07-08 Kazu Hirata - - * cfgexpand.c (tree_expand_cfg): Don't use FINALIZE_PIC. - * system.h: Poison FINALIZE_PIC. - * doc/tm.texi (FINALIZE_PIC): Remove. - -2005-07-08 Andrew Pinski - - PR tree-opt/22329 - * tree-ssa-propagate.c (fold_predicate_in): Convert the value - to the correct type if we have a MODIFY_EXPR. - -2005-07-08 Kazu Hirata - - PR tree-optimization/22360 - * tree.c (upper_bound_in_type): Fix calculations for casting - to a non-wider signed type and casting a signed value to a - wider unsigned type. - (lower_bound_in_type): Fix calculations for casting to a - non-wider signed type. - - PR tree-optimization/20139 - * tree-cfg.c (remove_bb): Check in_ssa_p before calling - release_defs. - * tree-optimize.c (execute_cleanup_cfg_post_optimizing): Call - fold_cond_expr_cond. - * tree-ssanames.c (release_defs): Assert in_ssa_p. - * tree.c (upper_bound_in_type, lower_bound_in_type): Rewrite. - -2005-07-08 Andrew Pinski - - PR tree-opt/22356 - * tree-complex.c (expand_complex_libcall): Produce - REALPART_EXPR/IMAGPART_EXPR with the correct type. - -2005-07-08 Kenneth Zadeck - - * bitmap.c (bitmap_and, bitmap_and_into, bitmap_and_compl, - bitmap_and_compl_into, bitmap_xor, bitmap_xor_into): Removed "a != - b" assert and inserted fastpath code for this case. - (bitmap_ior): Removed "a != b" assert. - -2005-07-08 Kazuhiro Inaoka - - * config/m32r/linux.h (STARTFILE_SPEC): Support PIE. - (ENDFILE_SPEC): Likewise. - * config/m32r/m32r.h (ASM_SPEC): Likewise. - - * config/m32r/m32r.c (m32r_output_function_epilogue): Care for - a large stack frame at epilogue. - -2005-07-08 David Billinghurst - - * final.c: Include sdbout.h when required. - -2005-07-07 Geoffrey Keating - - * config.gcc (*-*-darwin*): Only one target-specific header file - for generic darwin. - (powerpc-*-darwin*): Add version-specific header files. - * configure.in (gcc_AC_CHECK_DECLS): Add strverscmp. - * config.in: Regenerate. - * configure: Regenerate. - * gcc.c: Include xregex.h. - (version_compare_spec_function): New. - (spec_function): Add version-compare. - (replace_outfile_spec_function): Reformat comment. - (compare_version_strings): New. - * config/darwin-c.c (version_as_macro): New. - (builtin_define): New. - (darwin_cpp_builtins): New. - * config/darwin-protos.h (darwin_cpp_builtins): New. - * config/darwin.h (CPP_SPEC): Don't define APPLE_CC here. - (LIB_SPEC): Make unconditional, update comment. - (TARGET_C99_FUNCTIONS): Define. - * config/darwin.opt: Sort. - (mmacosx-version-min=): New. - * config/darwin7.h: Delete. - * config/darwin8.h: Delete. - * config/i386/darwin.h (): Call darwin_cpp_builtins. - * config/rs6000/darwin.h (): Call darwin_cpp_builtins. - (TARGET_C99_FUNCTIONS): Define. - * config/rs6000/darwin7.h: New. - * config/rs6000/darwin8.h: New. - * doc/invoke.texi (Darwin Options): Add -mmacosx-version-min= - (-mmacosx-version-min): Document. - -2005-07-07 Ian Lance Taylor - - * config/mips/mips.md (abs2) [GPR]: Remove. - -2005-07-07 John David Anglin - - PR middle-end/22239 - * loop.c (loop_givs_rescan): Check that v->new_reg is a REG. - -2005-07-07 Khem Raj - - * config/arm/arm.c (thumb_output_function_prologue): Calculate offset - in bytes, not words. - -2005-07-07 Paul Brook - - * config/arm/arm.c (arm_pad_arg_upward): Compare return value of - DEFAULT_FUNCTION_ARG_PADDING to upward. - -2005-07-07 Richard Henderson - - * function.c (locate_and_pad_parm): Record parameter alignment in - stack_alignment_needed. - -2005-07-07 David Edelsohn - - * config/rs6000/rs6000.md (UNSPEC_SYNC, UNSPEC_SYNC_OP, - UNSPEC_SYNC_SWAP, UNSPEC_LWSYNC, UNSPEC_ISYNC): Delete. - (UNSPECV_LL, UNSPECV_SC, UNSPECV_ATOMIC, UNSPECV_SYNC, - UNSPECV_SYNC_OP, UNSPECV_CMPXCHG, UNSPECV_LWSYNC, UNSPECV_ISYNC): New. - (define_attr "type"): Add isync, sync, load_l, store_c. - * config/rs6000/sync.md (memory_barrier): Change to define_expand. - Create scratch volatile MEM. - (sync_internal): New. POWER mnemonic is dcs, not ics. Attribute - sync. - (load_locked_): New. - (store_conditional_): New. - (sync_compare_and_swap): Replace with splitter. - (sync_lock_test_and_set): Replace with splitter. - (sync_): Change to unspec_volatile UNSPECV_SYNC_OP - and UNSPECV_ISYNC. - (isync): Change to unspec_volatile UNSPECV_ISYNC. POWER mnemonic - is ics. Attribute isync. - (lwsync): Change to unspec_volatile UNSPECV_LWSYNC. Attribute - lwsync. - * config/rs6000/rs6000.c (rs6000_emit_sync): Use UNSPEC_VOLATILE - and UNSPECV_SYNC_OP. - (emit_unlikely_jump): New. - (emit_load_locked): New. - (emit_store_conditional): New. - (rs6000_split_compare_and_swap): New. - (rs6000_split_lock_test_and_set): New. - (is_dispatch_slot_restricted): Return 4 for TYPE_LOAD_L, - TYPE_STORE_C, TYPE_ISYNC, TYPE_SYNC. - * config/rs6000/rs6000-protos.h (rs6000_split_compare_and_swap, - rs6000_split_lock_test_and_set): Declare. - * config/rs6000/{40x.md,440.md,603.md,6xx.md,7450.md,7xx.md,8540.md, - mpc.md,power4.md,power5.md,rios1.md,rios2.md,rs64.md): Add load_l, - store_c, isync, sync. - -2005-07-07 Kelley Cook - - * Makefile.in (echo_quoted_to_gtyp): New template for outputing - filenames to gtyp-gen.h. - (s-typ-gen): Use it in place of for loops. - -2005-07-07 J"orn Rennecke - - * hooks.c (hook_bool_rtx_int_false): New function. - * hooks.h (hook_bool_rtx_int_false): Declare. - * target-def.h (TARGET_COMMUTATIVE_P): Define. - (TARGET_INITIALIZER): Add TARGET_COMMUTATIVE_P. - * target.h (struct gcc_target): Add commutative_p member. - * targhooks.c (hook_bool_rtx_commutative_p): New function. - * targhooks.h (hook_bool_rtx_commutative_p): Declare. - * pa.c (TARGET_COMMUTATIVE_P): Redefine. - (pa_commutative_p): New function. - * jump.c (target.h): Include. - (rtx_renumbered_equal_p): Use targetm.commutative_p. - * doc/tm.texi: Document TARGET_COMMUTATIVE_P. - -2005-07-07 Adrian Straetling - - * config/s390/s390-protos.h (s390_expand_clrmem): Delete. - (s390_expand_setmem): New. - * config/s390/s390.c: Likewise. - (print_shift_count_operand): Truncate to 12 bits instead of 6. - Adapt comments. - * config/s390/s390.md: ("setmem"): Accept character as - general_operand. Call new function "s390_expand_setmem". - ("clrmem_long", "*clrmem_long"): Rewrite to ... - ("setmem_long", "*setmem_long"): ... this. - -2005-07-07 Adrian Straetling - - * config/s390/s390.c: (optimization_options): Enable - TARGET_MVCLE at -Os. - * doc/invoke.texi: Document changes in default behaviour. - * config/s390/s390.opt: ("mvcle"): Fix typo: is "mmvcle". - -2005-07-07 Adrian Straetling - - * expr.c: (set_storage_via_setmem): Convert opchar to mode - defined by back-end. - -2005-07-07 Jakub Jelinek - - * config/sparc/sparc.md (stack_protect_testsi): Put clobbers after - all sets in the pattern. - * config/rs6000/rs6000.md (stack_protect_testsi, - stack_protect_testdi): Likewise. - -2005-07-06 Jeff Law - - * tree-vrp.c (simplify_using_ranges): Kill. - (vrp_finalize): Remove call to simplify_using_ranges. - (simplify_stmt_using_ranges): New function extracted from - simplify_using_ranges. - (simplify_div_or_mod_using_ranges): Likewise. - (simplify_abs_using_ranges): Likewise. - (simplify_cond_using_ranges): New function. - * tree-flow.h (simplify_stmt_using_ranges): Prototype. - * tree-ssa-propagate.c (substitute_and_fold): Call - simplify_stmt_using_ranges if we have range information. - -2005-07-06 James E. Wilson - - * config/ia64/ia64.c (ia64_reorg): Check optimize before - ia64_flag_schedule_isns2. - - * config/ia64/ia64.c (ia64_expand_movxf_movrf): Don't word swap when - reading/writing general registers. - (ia64_function_arg): Revert 2005-06-18 change. - -2005-07-06 John David Anglin - - * pa.c (legitimize_pic_address): Use gcc_assert instead of abort. - (legitimize_tls_address): Use gcc_unreachable instead of abort. - -2005-07-06 Kaz Kojima - - * function.c (expand_function_end): Revert part of 2005-06-27 - patch. Do sjlj_emit_function_exit_after after return_label. - -2005-07-06 Kazu Hirata - - * doc/install.texi (--disable-libssp): New. - -2005-07-06 Fariborz Jahanian - - * doc/invoke.texi: Update -fforce-mem documentation. - * dojump.c (compare_from_rtx,do_compare_rtx_and_jump): Remove - code for -fforce-mem. - * expmed.c: (store_bit_field,store_fixed_bit_field, - extract_bit_field): Ditto. - * expr.c: (convert_move): Ditto. - * optabs.c: (expand_binop,expand_twoval_unop,expand_twoval_binop, - expand_unop,emit_unop_insn,prepare_cmp_insn,emit_conditional_move, - emit_conditional_add,expand_float,expand_fix): Ditto. - * opts.c: (decode_options): Remove setting of flag_force_mem flag. - (common_handle_option): Issue warning when -fforce-mem specified. - -2005-07-06 Paul Brook - - * aclocal.m4: Work around a bug in AC_PATH_PROGS when its last - argument is empty. - * configure: Regenerate. - -2005-07-06 J"orn Rennecke - - * sh.c (final_prescan_insn): Undo bogus change from 2005-05-09. - -2005-07-06 Daniel Berlin - - Fix PR tree-optimization/22319 - Fix PR tree-optimization/22140 - Fix PR tree-optimization/22310 - - * tree-ssa-structalias.c (do_structure_copy): Give up earlier on - variable sized types. - Use correct type for intermediate structure on *a = *b structure - copies. - -2005-07-06 Jakub Jelinek - - * config/rs6000/rs6000.h (RS6000_VARARGS_AREA, RS6000_VARARGS_SIZE): - Remove. - (STARTING_FRAME_OFFSET): Don't add RS6000_VARARGS_AREA. - (machine_function): Move typedef to... - * config/rs6000/rs6000.c (machine_function): ... here. Add - varargs_save_offset field. - (rs6000_stack_t): Remove varargs_size field. - (setup_incoming_varargs): Allocate varargs save area using - assign_stack_local, try to make it as small as possible. - Save offset from virtual_stack_vars_rtx to the save area - in cfun->machine->varargs_save_offset. Use UNITS_PER_FP_WORD - instead of magic 8 when fp word byte size is used. - (rs6000_va_start): Use cfun->machine->varargs_save_offset - instead of -RS6000_VARARGS_SIZE. - (rs6000_stack_info, debug_stack_info, - rs6000_initial_elimination_offset): Remove all traces of - varargs_size. - * config/rs6000/sysv4.h (RS6000_VARARGS_AREA): Remove. - * config/rs6000/darwin.h (STARTING_FRAME_OFFSET): Don't add - RS6000_VARARGS_AREA. - -2005-07-06 Zdenek Dvorak - - PR tree-optimization/21963 - * tree-ssa-loop-ivopts.c (get_computation_aff): Use - constant_multiple_of in the same way get_computation_cost_at does. - -2005-07-06 Jakub Jelinek - - * config/sparc/sparc.h (sparc_compare_emitted): New extern. - * config/sparc/sparc.c (sparc_compare_emitted): New variable. - (gen_compare_reg): If sparc_compare_emitted is set, clear it - and return its previous value. - (emit_v9_brxx_insn): Assert sparc_compare_emitted is NULL. - * config/sparc/sparc.md (UNSPEC_SP_SET, UNSPEC_SP_TEST): New - constants. - (stack_protect_set, stack_protect_test): New expanders. - (stack_protect_setsi, stack_protect_setdi, stack_protect_testsi, - stack_protect_testdi): New insns. - * config/sparc/linux.h (TARGET_THREAD_SSP_OFFSET): Define. - * config/sparc/linux64.h (TARGET_THREAD_SSP_OFFSET): Define. - -2005-07-06 Jeff Law - - * tree-ssa-dce.c (cfg_altered): New global. - (tree_dce_init): Initialize cfg_altered. - (remove_dead_stmt): If we remove an edge in the CFG, then set - CFG_ALTERED. - (perform_tree_ssa_dce): If we altered the CFG, then invalidate - the dominators. - -2005-07-06 Kazu Hirata - - * Makefile.in (stamp-collect-ld): Use - $(ORIGINAL_LD_FOR_TARGET) instead of $<. Don't remove - ./collect-ld if it already exists. - (stamp-nm): Use $(ORIGINAL_NM_FOR_TARGET) instead of $<. - Don't remove ./nm if it already exists. - -2005-07-05 Devang Patel - - * tree-vectorizer.h (struct _loop_vec_info): Remove loop_line_number. - (LOOP_VINFO_LOC, LOOP_LOC): Remove. - * tree-vectorizer.c (vect_loop_location): New. - (vect_print_dump_info): Use vect_loop_location. - (new_loop_vec_info): Do not set LOOP_VINFO_LOC. - (vectorize_loops): Set vect_loop_location. - * tree-vect-analyze.c (vect_analyze_offset_expr, - vect_determin_vectorization_factor, vect_analyze_operations, - vect_analyze_scalar_cycles, vect_analyze_data_ref_dependence, - vect_analyze_data_ref_dependences, vect_compute_data_ref_alignment, - vect_analyze_data_refs_alignment, vect_analyze_data_ref_access, - vect_analyze_data_ref_accesses, vect_analyze_pointer_ref_access, - vect_object_analysis, vect_analyze_data_refs, vect_mark_relevant, - vect_stmt_relevant_p, vect_mark_stmts_to_be_vectorized, - vect_can_advance_ivs_p, vect_get_loop_niters, vect_analyze_loop_form, - vect_analyze_loop): Adjust vect_print_dump_info API. - * tree-vect-transform.c (vect_create_addr_base_for_vector_ref, - vect_create_data_ref_ptr, vect_init_vector, vect_get_vec_def_for_operand, - vect_finish_stmt_generation, vectorizable_assignment, - vectorizable_operation, vectorizable_store, vectorizable_load, - vectorizable_live_operation, vectorizable_condition, vect_transform_stmt, - vect_update_ivs_after_vectorizer, vect_do_peeling_for_loop_bound, - vect_gen_ninters_for_prolog_loop, vect_do_peeling_for_alignment, - vect_transform_loop): Same. - * tree-vectorizer.c (get_vectype_for_scalar_type, vect_is_simple_use, - vect_is_simple_reduction, vect_is_simple_iv_evolution, vectorize_loops): - Same. - -2005-07-05 Randolph Chung - - * configure.ac (hppa*-*-linux*: Check for a TLS capable gas. - * configure: Regenerate. - * config/pa/pa-protos.h (tls_symbolic_operand): Declare. - (pa_tls_referenced_p): Declare. - * config/pa/pa.c (legitimize_pic_address): Reject TLS operands. - (gen_tls_tga, gen_tls_get_addr, hppa_tls_call): New. - (legitimize_tls_address): New. - (hppa_legitimize_address): Handle TLS addresses. - (pa_tls_symbol_ref_1, pa_tls_referenced_p): New. - (TARGET_CANNOT_FORCE_CONST_MEM): Define. - (emit_move_sequence): Handle TLS addresses. - (pa_encode_section_info): Call default handler to handle common - sections. - * config/pa/pa.h (PA_SYMBOL_REF_TLS_P): New. - (CONSTANT_ADDRESS_P): Reject TLS operands. - (TARGET_HAVE_TLS) [HAVE_AS_TLS]: Define. - * config/pa/pa.md (UNSPEC_TP, UNSPEC_TLSGD, UNSPEC_TLSLDM) - (UNSPEC_TLSLDO, UNSPEC_TLSLDBASE, UNSPEC_TLSIE) - (UNSPEC_TLSLE): Define new constants. - (tgd_load, tld_load, tld_offset_load, tp_load, tie_load, tle_load): New. - * config/pa/predicates.md (symbolic_operand): Reject TLS operands. - (tls_symbolic_operand, tgd_symbolic_operand, tld_symbolic_operand) - (tie_symbolic_operand, tle_symbolic_operand): New - -2005-07-06 Kelley Cook - - * aclocal.m4: Update macros for autoconf 2.59 style. - * configure.ac: Likewise. - -2005-07-05 John David Anglin - - * pa.c (function_value): Handle small aggregates on 32-bit targets. - (function_arg): Pass small aggregates in general registers on 32-bit - targets. - * som.h (MEMBER_TYPE_FORCES_BLK): Delete define. - -2005-07-05 Andrew Pinski - - * Makefile.in (final.o): Fix dependencies. - -2005-07-05 Joseph S. Myers - - PR c/22013 - PR c/22098 - * langhooks.h (struct lang_hooks): Add expr_to_decl. - * langhooks.c (lhd_expr_to_decl): New. - * langhooks-def.h (lhd_expr_to_decl, LANG_HOOKS_EXPR_TO_DECL): - New. - (LANG_HOOKS_INITIALIZER): Update. - * tree.c (recompute_tree_invarant_for_addr_expr): Call - expr_to_decl langhook. - * c-tree.h (c_expr_to_decl): Declare. - * c-typeck.c (c_expr_to_decl): New. - (build_unary_op): Do not handle ADDR_EXPR of COMPOUND_LITERAL_EXPR - specially. - * c-objc-common.h (LANG_HOOKS_EXPR_TO_DECL): Define. - -2005-07-05 Joseph S. Myers - - PR c/22308 - * c-decl.c (finish_struct): Also copy C_TYPE_FIELDS_READONLY, - C_TYPE_FIELDS_VOLATILE and C_TYPE_VARIABLE_SIZE to type variants. - -2005-07-05 Paolo Bonzini - - * Makefile.in: Adjust dependencies. - * tree-pass.h: Add new passes and passes formerly in tree-optimize.c. - * basic-block.h (duplicate_computed_gotos): Remove, it is now static. - * alias.c (rest_of_handle_cfg, pass_cfg): New. - * bb-reorder.c (duplicate_computed_gotos): Make it static. - * cfgexpand.c (tree_expand_cfg): Add code formerly at the beginning of - rest_of_compilation. - - * bb-reorder.c (gate_duplicate_computed_gotos, - pass_duplicate_computed_gotos, gate_handle_reorder_blocks, - rest_of_handle_reorder_blocks, pass_reorder_blocks, - gate_handle_partition_blocks, rest_of_handle_partition_blocks, - pass_partition_blocks): New. - * bt-load.c (gate_handle_branch_target_load_optimize, - rest_of_handle_branch_target_load_optimize, - pass_branch_target_load_optimize): New. - * cfgcleanup.c (rest_of_handle_jump, pass_jump, rest_of_handle_jump2, - pass_jump2): New. - * cfglayout.c (pass_insn_locators_initialize): New. - * cfgrtl.c (pass_free_cfg): New. - * combine.c (gate_handle_combine, rest_of_handle_combine, - pass_combine): New. - * cse.c (gate_handle_cse, rest_of_handle_cse, pass_cse, - gate_handle_cse2, rest_of_handle_cse2, pass_cse2): New. - * emit-rtl.c (pass_unshare_all_rtl, pass_remove_unnecessary_notes): New. - * except.c (pass_set_nothrow_function_flags, - pass_convert_to_eh_region_ranges, gate_handle_eh, rest_of_handle_eh, - pass_rtl_eh): New. - * final.c (pass_compute_alignments, rest_of_handle_final, pass_final, - rest_of_handle_shorten_branches, pass_shorten_branches, - rest_of_clean_state, pass_clean_state): New. - * flow.c (pass_recompute_reg_usage, gate_remove_death_notes, - rest_of_handle_remove_death_notes, pass_remove_death_notes, - rest_of_handle_life, pass_life, rest_of_handle_flow2, - pass_flow2): New. - * function.c (pass_instantiate_virtual_regs, pass_init_function, - rest_of_handle_check_leaf_regs, pass_leaf_regs): New. - * gcse.c (gate_handle_jump_bypass, rest_of_handle_jump_bypass, - pass_jump_bypass, gate_handle_gcse, rest_of_handle_gcse, - pass_gcse): New. - * global.c (rest_of_handle_global_alloc, pass_global_alloc): New. - * ifcvt.c (gate_handle_if_conversion, rest_of_handle_if_conversion, - pass_rtl_ifcvt, gate_handle_if_after_combine, - rest_of_handle_if_after_combine, pass_if_after_combine, - gate_handle_if_after_reload, rest_of_handle_if_after_reload, - pass_if_after_reload): New. - * integrate.c (pass_initial_value_sets): New. - * jump.c (pass_cleanup_barriers, purge_line_number_notes, - pass_purge_lineno_notes): New. - * mode-switching.c (rest_of_handle_mode_switching, - pass_mode_switching): New. - * local-alloc.c (rest_of_handle_local_alloc, pass_local_alloc): New. - * loop-init.c (gate_handle_loop2, rest_of_handle_loop2, - pass_loop2): New. - * loop.c (gate_handle_loop_optimize, rest_of_handle_loop_optimize, - pass_loop_optimize): New. - * modulo-sched.c (gate_handle_sms, rest_of_handle_sms, - pass_sms): New. - * postreload-gcse.c (gate_handle_gcse2, rest_of_handle_gcse2, - pass_gcse2): New. - * postreload.c (gate_handle_postreload, rest_of_handle_postreload, - pass_postreload_cse): New. - * profile.c (gate_handle_profiling, pass_profiling, - rest_of_handle_branch_prob, pass_branch_prob): New. - * recog.c (pass pass_split_for_shorten_branches, gate_do_final_split, - pass_split_before_regstack, gate_handle_split_before_regstack, - gate_handle_peephole2, rest_of_handle_peephole2, pass_peephole2, - rest_of_handle_split_all_insns, pass_split_all_insns): New. - * reg-stack.c (gate_handle_stack_regs, rest_of_handle_stack_regs, - pass_stack_regs): New. - * regmove.c (gate_handle_regmove, rest_of_handle_regmove, pass_regmove, - gate_handle_stack_adjustments, rest_of_handle_stack_adjustments, - pass_stack_adjustments): New. - * regrename.c (gate_handle_regrename, rest_of_handle_regrename, - pass_regrename): New. - * reorg.c (gate_handle_delay_slots, rest_of_handle_delay_slots, - pass_delay_slots, gate_handle_machine_reorg, - rest_of_handle_machine_reorg, pass_machine_reorg): New. - * rtl.h (extern void purge_line_number_notes): New. - * sched-rgn.c (gate_handle_sched, rest_of_handle_sched, - gate_handle_sched2, rest_of_handle_sched2, pass_sched, - pass_sched2): New. - * tracer.c (gate_handle_tracer, rest_of_handle_tracer, - pass_tracer): New. - * value-prof.c (gate_handle_value_profile_transformations, - rest_of_handle_value_profile_transformations, - pass_value_profile_transformations): New. - * var-tracking.c (gate_handle_var_tracking, - pass_variable_tracking): New. - * web.c (gate_handle_web, rest_of_handle_web, pass_web): New. - - * passes.c (open_dump_file, close_dump_file, rest_of_handle_final, - rest_of_handle_delay_slots, rest_of_handle_stack_regs, - rest_of_handle_variable_tracking, rest_of_handle_machine_reorg, - rest_of_handle_old_regalloc, rest_of_handle_regrename, - rest_of_handle_reorder_blocks, rest_of_handle_partition_blocks, - rest_of_handle_sms, rest_of_handle_sched, rest_of_handle_sched2, - rest_of_handle_gcse2, rest_of_handle_regmove, - rest_of_handle_tracer, rest_of_handle_if_conversion, - rest_of_handle_if_after_combine, rest_of_handle_if_after_reload, - rest_of_handle_web, rest_of_handle_branch_prob, - rest_of_handle_value_profile_transformations, rest_of_handle_cfg, - rest_of_handle_jump_bypass, rest_of_handle_combine, - rest_of_handle_life, rest_of_handle_cse, rest_of_handle_cse2, - rest_of_handle_gcse, rest_of_handle_loop_optimize, - rest_of_handle_loop2, rest_of_handle_branch_target_load_optimize, - rest_of_handle_mode_switching, rest_of_handle_jump, - rest_of_handle_eh, rest_of_handle_stack_adjustments, - rest_of_handle_flow2, rest_of_handle_jump2, - rest_of_handle_peephole2, rest_of_handle_postreload, - rest_of_handle_shorten_branches, rest_of_clean_state, - rest_of_compilation): Remove. - - * cgraphunit.c (ipa_passes): Moved from tree-optimize.c. - * passes.c (dump_flags, in_gimple_form, all_passes, - all_ipa_passes, all_lowering_passes, register_one_dump_file, - register_dump_files, next_pass_1, last_verified, execute_todo, - execute_one_pass, execute_pass_list, execute_ipa_pass_list): Moved - from tree-optimize.c. - (init_optimization_passes): Moved from tree-optimize.c, - adding the RTL optimizations. - * tree-dump.h (dump_info_p, dump_flag): Moved from tree.h. - * tree-optimize.c (dump_flags, in_gimple_form, all_passes, - all_ipa_passes, all_lowering_passes, register_one_dump_file, - register_dump_files, next_pass_1, last_verified, execute_todo, - execute_one_pass, execute_pass_list, execute_ipa_pass_list, - init_tree_optimization_passes, ipa_passes): Delete. - * tree-pass.h (enum tree_dump_index): Moved from tree.h, removing - the RTL dumps. - (TDF_*, get_dump_file_name, dump_enabled_p, dump_initialized_p, - dump_begin, dump_end, dump_node, dump_switch_p, dump_flag_name): Moved - from tree.h. - (ipa_passes): Remove. - (all_passes, all_ipa_passes, all_lowering_passes): Now extern. - * tree.h (enum tree_dump_index, TDF_*, get_dump_file_name, - dump_enabled_p, dump_initialized_p, dump_begin, dump_end, dump_node, - dump_switch_p, dump_flag_name): Moved to tree-pass.h. - (dump_info_p, dump_flag): Moved to tree-dump.h. - - * Makefile.in: Adjust dependencies for tree-pretty-print.c, - cgraph.c, opts.c. - * passes.c (finish_optimization_passes): Use dump_begin - and dump_end, TDI_end. - (gate_rest_of_compilation): New. - (pass_rest_of_compilation): Use it. - (gate_postreload, pass_postreload): New. - * toplev.c (general_init): Rename init_tree_optimization_passes. - * toplev.h (init_tree_optimization_passes): Rename to - init_optimizations_passes. - * tree-dump.c (dump_flag): Make static. - (dump_files): Remove RTL dumps. - * tree-optimize.c (pass_all_optimizations, pass_early_local_passes, - pass_cleanup_cfg, pass_free_cfg_annotations, - pass_cleanup_cfg_post_optimizing, pass_free_datastructures, - pass_init_datastructures, pass_fixup_cfg): Make non-static. - * tree-pretty-print.c: Include tree-pass.h. - * cgraph.c: Include tree-dump.h. - -2005-07-04 Daniel Berlin - - * tree-ssa-structalias.c (get_constraint_exp_from_ssa_var): - Only fall back to saying it points to readonly memory if - we can't do better. - -2005-07-05 Kazuhiro Inaoka - - * config/m32r/m32r-protos.h: Remove m32r_finalize_pic. - * config/m32r/m32r.c (m32r_compute_frame_size, - m32r_expand_prologue): Take current_function_profile into - account whenever we reference - current_function_uses_pic_offset_table. - (m32r_finalize_pic): Remove. - * config/m32r/m32r.h (FINALIZE_PIC): Likewise. - -2005-07-05 Kazu Hirata - - * Makefile.in (stamp-as): Use $(ORIGINAL_AS_FOR_TARGET) - instead of $<. Don't remove ./as if it already exists. - -2005-07-04 John David Anglin - - PR target/21723 - * pa.md: Remove fcpy alternative from movhi and movqi patterns. - * pa32-regs.h (HARD_REGNO_NREGS): Return two floating point registers - for complex modes when generating code for PA 1.0. - (VALID_FP_MODE_P): New macro. - (HARD_REGNO_MODE_OK): Use VALID_FP_MODE_P. Use non-overlapping register - sets for all general and floating point modes. Align wide floating - point modes to even register boundaries to comply with architectural - requirements. - (CLASS_MAX_NREGS): Update to align with change to HARD_REGNO_NREGS. - * pa64-regs.h (HARD_REGNO_NREGS): Update comment and formatting. - (VALID_FP_MODE_P): New macro. - (HARD_REGNO_MODE_OK): Use VALID_FP_MODE_P. Use non-overlapping register - sets for all general and floating point modes. Align wide floating - point modes to even register boundaries to comply with architectural - requirements. - -2005-07-04 Diego Novillo - - * tree-dump.c (dump_files): Initialize dump number for .cgraph - to 0. - -2005-07-04 Diego Novillo - - * tree-ssa-structalias.c: Don't include expr.h. - -2005-07-04 Diego Novillo - - * tree-iterator.h (TSI_NEW_STMT, TSI_SAME_STMT): Fix - comments. - -2005-07-04 Daniel Berlin - - Fix PR tree-optimization/22279 - - * tree-ssa-structalias.c (offset_overlaps_with_access): Use - correct operator. - -2005-07-04 J"orn Rennecke - - * sh.c (output_ieee_ccmpeq): Replace "\\;" with "\n\t". - -2005-07-03 Joseph S. Myers - - * bb-reorder.c, c-pch.c, c-pragma.c, c.opt, cfghooks.c, cfgloop.c, - cfgrtl.c, cgraphunit.c, config/c4x/c4x.c, config/cris/cris.c, - config/frv/frv.c, config/host-darwin.c, config/iq2000/iq2000.c, - config/lynx.h, config/m68k/m68k.c, config/pa/pa.c, config/sh/sh.h, - config/stormy16/stormy16.c, config/v850/v850.c, - config/vax/netbsd-elf.h, coverage.c, dwarf2out.c, emit-rtl.c, - except.c, gcc.c, tree-cfg.c, tree-eh.c, tree-ssa.c, xcoffout.c: - Avoid "." or "\n" at end of diagnostics and capital letters at - start of diagnostics. - * combine.c, cse.c: Don't translate dump file output. - * toplev.c (print_version): Only translate output if going to - stderr. - -2005-07-03 Kazu Hirata - - * c-decl.c, tree-object-size.c, tree-vectorizer.c, - config/arm/unwind-arm.c, config/arm/unwind-arm.h: Fix comment - typos. - -2005-07-03 John David Anglin - - * pa.c (fix_range): Fix typo in comment. - -2005-07-03 Kazu Hirata - - * tree-vrp.c (extract_range_from_assert): Replace - fold (build (...)) with fold_build2. - -2005-07-03 Kaveh R. Ghazi - - * c-format.c (gcc_gfc_format_type, gcc_gfc_flag_pairs, - gcc_gfc_char_table, init_dynamic_gfc_info): New. - (format_types_orig, handle_format_attribute): Add support for - format "gcc_gfc". - -2005-07-03 Gabriel Dos Reis - - * varasm.c (assemble_variable): Fix format specifier thinko. - -2005-07-03 Ira Rosen - - PR tree-optimization/22029 (and 22135) - * tree-pretty-print.c (dump_generic_node): Check that the node is not - a phi node before calling dump_vops. - -2005-07-02 Gabriel Dos Reis - - * tree-dump.h (dump_string_field): Declare. - * tree-dump.c: Use it instead of dump_string. - (dump_string_field): Make non-static. - -2005-07-03 Kaz Kojima - - * config/sh/sh.c (sh_output_mi_thunk): Initialize and clean - up the minimal CFG stuff always when optimize > 0. Call - split_all_insns_noflow in PIC case if needed. - -2005-07-02 Gabriel Dos Reis - Christian Ehrhardt - - PR c++/18279 - * c-decl.c (c_write_global_declarations): Dump contents of - external scope to. - * tree-dump.c (dequeue_and_dump): Dump abstract origin of a decl. - , , , , - , : Add. - (dump_enabled_p): Return TRUE if PHASE is TDI_all and any dump - is enabled. - -2005-07-03 Joseph S. Myers - - * c-common.h (GCC_DIAG_STYLE): Define. - * c-tree.h (GCC_DIAG_STYLE): Do not define. Change minimum GCC - version for format checking to 4.1. - * c-format.c: Include toplev.h after c-common.h. - (enum format_type): Add gcc_tdiag_format_type. - (gcc_tdiag_length_specs, gcc_tdiag_flag_pairs, - gcc_tdiag_flag_specs, gcc_tdiag_char_table): New. - (format_types_orig): Add gcc_tdiag. - (init_dynamic_diag_info): Support gcc_tdiag formats. - (handle_format_attribute): Likewise. - * toplev.h (NO_FRONT_END_DIAG, ATTRIBUTE_GCC_FE_DIAG): Remove. - (GCC_DIAG_STYLE): Default to __gcc_tdiag__. Change minimum GCC - version for format checking to 4.1. - (warning0, warning, error, pedwarn, sorry): Use - ATTRIBUTE_GCC_DIAG. - * config/rs6000/rs6000.c (altivec_expand_builtin), varasm.c - (finish_aliases_1): Do not use %qE. - * config/arm/arm.c, config/i386/i386.c, config/mmix/mmix.c, - config/pdp11/pdp11.c, stor-layout.c, tree-eh.c, tree-ssa.c: - Correct format bugs. - * config/v850/v850-protos.h (v850_output_aligned_bss): Change size - parameter to unsigned HOST_WIDE_INT. - * config/v850/v850.c (v850_output_aligned_bss): Likewise. - -2005-07-02 David Edelsohn - - PR middle-end/21742 - * expr.c (write_complex_part): Use adjust_address for MEM. - (read_complex_part): Same. - -2005-07-02 Daniel Berlin - - Fix PR tree-optimization/22280 - - * tree-sra.c (generate_element_init): Remove useless loop. - -2005-07-02 Richard Henderson - - * config/alpha/alpha.c (alpha_legitimize_address): Check for - TLS_MODEL_NONE. - (alpha_stdarg_optimize_hook): Use DECL_UID with va_list_vars. - -2005-07-02 Andrew Pinski - - PR middle-end/14490 - * fold-const.c (fold_binary): Handle the return value of - fold_to_nonsharp_ineq_using_bound if we get back the same operand back. - Implement "X +- C1 CMP C2" folding to "X CMP C2 -+ C1". - -2005-07-02 Jeff Law - - * tree-ssa-dom.c (find_equivalent_equality_comparison): Do not - a eliminate type conversion which feeds an equality comparison - if the original type or either operand in the comparison is a - function pointer. - -2005-07-02 Joseph S. Myers - - * c.opt, common.opt, config/bfin/bfin.opt, config/pa/pa.opt, - config/rs6000/rs6000.opt, params.def: Remove "." from end of help - texts. - * config/avr/avr.c: Do not use '`' as left quote. - * config/rs6000/rs6000.c, config/s390/s390.c, opts.c, tree.c: - Remove "." from end of diagnostics. Make diagnostics start with - lowercase letter. - -2005-07-02 Zack Weinberg - Joseph S. Myers - - * toplev.c (default_tree_printer): Handle setting location with - '+' flag. - * c-objc.common.c (c_tree_printer): Likewise. - * c-format.c (gcc_diag_flag_specs): Add '+'. - (gcc_cdiag_char_table): Allow '+' flag for tree formats. - (format_types_orig): Allow '+' flag for gcc_diag and gcc_cdiag - formats. - * c-common.c, c-decl.c, c-objc-common.c, c-pragma.c, - config/arm/pe.c, config/i386/winnt.c, config/ia64/ia64.c, - config/mcore/mcore.c, config/sh/symbian.c, config/sol2.c, - config/v850/v850.c, function.c, stor-layout.c, toplev.c, - tree-inline.c, tree-optimize.c, tree.c, varasm.c: Use '+' flag - instead of %J or %H. Use 'q' flag for quoting. Avoid '.' at end - of diagnostics. Use %q+D not %s for a decl. Do not pass excess - format arguments where %J is used without %D. - -2005-07-02 Jakub Jelinek - - * gcc.c (LINK_SSP_SPEC): Define. - (link_ssp_spec): New variable. - (LINK_COMMAND_SPEC): Add %(link_ssp). - (static_specs): Add link_ssp_spec. - * configure.ac (TARGET_LIBC_PROVIDES_SSP): New test. - * configure: Rebuilt. - * config.in: Rebuilt. - - * config/rs6000/linux.h (TARGET_THREAD_SSP_OFFSET): Define. - * config/rs6000/linux64.h (TARGET_THREAD_SSP_OFFSET): Likewise. - * config/i386/linux.h (TARGET_THREAD_SSP_OFFSET): Likewise. - * config/i386/linux64.h (TARGET_THREAD_SSP_OFFSET): Likewise. - * config/rs6000/rs6000.md (stack_protect_set, stack_protect_test): - If TARGET_THREAD_SSP_OFFSET is defined, use -0x7010(13) resp. - -0x7008(2) instead of reading __stack_chk_guard variable. - * config/i386/i386.md (UNSPEC_SP_SET, UNSPEC_SP_TEST): Change - number. - (UNSPEC_SP_TLS_SET, UNSPEC_SP_TLS_TEST): New constants. - (stack_protect_set, stack_protect_test): Use *_tls* patterns - if TARGET_THREAD_SSP_OFFSET is defined. - (stack_tls_protect_set_si, stack_tls_protect_set_di, - stack_tls_protect_test_si, stack_tls_protect_test_di): New insns. - - Revert: - 2005-06-27 Richard Henderson - * libgcc-std.ver (GCC_4.1.0): New. - * libgcc.h (__stack_chk_guard): Declare. - (__stack_chk_fail, __stack_chk_fail_local): Declare. - * libgcc2.c (L_stack_chk, L_stack_chk_local): New. - * mklibgcc.in (lib2funcs): Add them. - -2005-07-01 Richard Henderson - - * config/i386/linux-unwind.h (x86_64_fallback_frame_state): Cast to - void * before struct sigcontext *. - (x86_fallback_frame_state): Likewise. - -2005-07-01 James E. Wilson - - * doc/invoke.texi (-funit-at-a-time): Correct grammar in second bullet. - -2005-07-01 Andrew Pinski - - PR tree-opt/22269 - * tree-ssa-reassoc.c (should_transpose): Fix which operand - we check for SSA_NAME for. - -2005-07-01 Daniel Berlin - - Fix PR tree-optimization/22071 - - * tree-ssa-structalias.c (offset_overlaps_with_access): New - function. - (get_constraint_for_component_ref): Use it. - -2005-07-01 Andrew Pinski - - PR other/22264 - * diagnostic.c (diagnostic_report_current_module): Use pp_newline to - print out the last new line. - -2005-07-01 Hans-Peter Nilsson - - * config/cris/cris.md (CRIS_CC0_REGNUM): New constant. - Swap numbers for CRIS_AP_REGNUM and CRIS_MOF_REGNUM. - * config/cris/cris.c (cris_conditional_register_usage): Adjust - reg_names[CRIS_CC0_REGNUM] for early CRIS versions. - (cris_print_operand) : Handle CRIS_CC0_REGNUM. - (cris_md_asm_clobbers): Clobber CRIS_CC0_REGNUM for all asms. - * config/cris/cris.h (CRIS_CANONICAL_CC0_REGNUM): New macro. - (enum reg_class): New member CC0_REGS. - (REG_CLASS_FROM_LETTER): Add 'c' for CC0_REGS. - (FIRST_PSEUDO_REGISTER, CALL_USED_REGISTERS, REG_ALLOC_ORDER) - (HARD_REGNO_MODE_OK, MODES_TIEABLE_P, REG_CLASS_NAMES) - (CRIS_SPECIAL_REGS_CONTENTS, REG_CLASS_CONTENTS, REGNO_REG_CLASS) - (PREFERRED_RELOAD_CLASS, REGISTER_NAMES, DBX_REGISTER_NUMBER): - Adjust for register now described. - -2005-07-01 Jakub Jelinek - - PR target/22262 - * config/i386/i386.md (stack_protect_test_si, - stack_protect_test_di): Add earlyclobber for scratch 3. - * config/rs6000/rs6000.md (stack_protect_testsi, - stack_protect_testdi): Add earlyclobber for scratch 3, - remove earlyclobber from scratch 4. - -Older entries for 2005 can be found in ChangeLog-2005. +2006-01-14 Ian Lance Taylor + + * ifcvt.c (noce_init_if_info): New static function, broken out of + noce_process_if_block. + (noce_process_if_block): Call noce_init_if_info. + (check_cond_move_block): New static function. + (cond_move_process_if_block): New static function. + (process_if_block): Call cond_move_process_if_block. + +2006-01-15 Kazu Hirata + + * cselib.c (hash_table): Rename to cselib_hash_table. + (cselib_clear_table, discard_useless_values, + remove_useless_values, cselib_lookup_mem, cselib_lookup, + cselib_init, cselib_finish): Adjust uses of hash_table. + +2006-01-14 Kazu Hirata + + PR tree-optimization/25485 + * tree-vrp.c (extract_range_from_binary_expr): Handle cases + where one of the operands of TRUTH_AND_EXPR and TRUTH_OR_EXPR + is known to be false and true, respectively. + +2006-01-14 Richard Guenther + + PR tree-optimization/22548 + PR tree-optimization/22555 + PR tree-optimization/22501 + * Makefile.in (tree-ssa-structalias.o): Depend on $(PARAMS_H). + * params.def (salias-max-array-elements): New parameter. + * params.h (SALIAS_MAX_ARRAY_ELEMENTS): Define. + * doc/invoke.texi (salias-max-array-elements): Document. + * tree-flow-inline.h (var_can_have_subvars): We also handle + arrays now. + * tree-ssa-alias.c (find_used_portions): Handle ARRAY_REF like + COMPONENT_REF. + * tree-ssa-structalias.c (params.h): Include. + (push_fields_onto_fieldstack): Handle ARRAY_TYPE. + (find_func_aliases): Handle multiple constraints from ARRAY_REF. + (get_constraint_for): For ADDR_EXPR operating on something + containing an ARRAY_REF, add all subvars to the solution. + (handle_ptr_arith): Handle ARRAY_TYPE like RECORD_TYPE types. + * tree-ssa-operands.c (parse_ssa_operands): Handle ARRAY_REF + for creating MUST_DEFs. + (get_expr_operands): Treat ARRAY_REF like COMPONENT_REF wrt subvars. + +2006-01-14 Zdenek Dvorak + + * tree-ssa-loop-niter.c (number_of_iterations_cond): Split into several + functions. + (number_of_iterations_ne, number_of_iterations_lt_to_ne, + assert_no_overflow_lt, assert_loop_rolls_lt, number_of_iterations_lt, + number_of_iterations_le): New functions. + (number_of_iterations_special): Removed. + (number_of_iterations_exit): Do not use number_of_iterations_special. + * tree.c (unsigned_type_for): Always return integer type. + +2006-01-14 Steven Bosscher + Richard Guenther + + PR rtl-optimization/24257 + * gcse.c (find_moveable_store): Only consider a store movable + when the SET_SRC of the insn can be assigned to a register. + +2006-01-14 Ian Lance Taylor + + * tree.c (tree_not_class_check_failed): New function. + * tree.h (NON_TYPE_CHECK): Call tree_not_class_check_failed. + (tree_not_class_check_failed): Declare. + +2006-01-13 Ian Lance Taylor + + * reload1.c (do_output_reload): Add assertion rejecting a + CALL_INSN. + +2006-01-13 Adam Nemet + + * combine.c (struct reg_stat): Add new fields truncation_label and + truncated_to_mode. + (record_value_for_reg): Reset truncated_to_mode. + (record_truncated_value): New function. + (check_promoted_subreg): Call it. Rename to check_conversions. + (combine_instructions): Rename check_promoted_subreg to + check_conversions. + (reg_truncated_to_mode): New function. + (make_extraction): Use it. Check TRULY_NOOP_TRUNCATION. + (gen_lowpart_or_truncate): New function. + (force_to_mode): Use it instead of gen_lowpart. + +2006-01-13 Diego Novillo + + * tree-ssa-alias.c (add_type_alias): Fix typo. Test whether + VAR is a tag, not its type tag. + +2006-01-13 Alexandre Oliva + + * config/i386/sse.md (*vec_extractv2di_1_sse2): Reorder + alternatives to match style of other entries. + (*vec_extractv2di_1_sse): Likewise. Fix mode attr. + +2006-01-13 Daniel Berlin + + PR tree-optimization/25771 + * tree-ssa-pre.c (insert_extra_phis): Don't insert merges of abnormal + SSA_NAMES. + +2006-01-13 Andrew Pinski + + PR tree-opt/24365 + * tree-inline.c (declare_return_variable): If the return variable + was marked as a non gimple complex, set the return slot variable + to be a non gimple comple variable. + +2006-01-13 Richard Guenther + + * builtins.c (expand_builtin_sincos): New function. + (expand_builtin_mathfn_3): Remove dead code, sin and cos + do not set errno. + (expand_builtin): Expand sincos using expand_builtin_sincos. + +2006-01-12 DJ Delorie + + * config/m32c/shift.md: Rewrite: Allow arbitrary operands for + shift counts, separate SI shifts for m32c vs m16c, pass shift type + so that constant shifts can be split. + * config/m32c/m32c.c (m32c_const_ok_for_constraint_p): Add In6. + (m32c_valid_pointer_mode): Make static. + (shift_gen_func_for): New. + (m32c_prepare_shift): Use it. Split large const shifts into + multiple shifts. + * config/m32c/predicates.md (shiftcount_operand): Allow more + general operands. + (longshiftcount_operand): New. + * doc/md.texi (Machine Constraints): Document In6. + +2006-01-13 Ben Elliston + + * doc/tm.texi (Data Output): Add REAL_VALUE_TO_TARGET_DECIMAL32, + REAL_VALUE_TO_TARGET_DECIMAL64 and REAL_VALUE_TO_TARGET_DECIMAL128 + documentation. + +2006-01-12 Daniel Berlin + + * tree-ssa-operands.c (add_call_clobber_ops): Use SFT_PARENT_VAR + to try to avoid clobbering pieces of structures when we know + something about the whole structure. + * tree-ssa-alias.c (create_sft): Set SFT_PARENT_VAR + +2006-01-13 Ben Elliston + + * doc/rtl.texi (Insns): Remove statement that libcalls cannot + return in memory, as this is no limitation is no longer present. + +2006-01-12 DJ Delorie + + * config/m32c/addsub.md (addhi3): Add two more alternatives, for + mova with fb, and for fb+0 -> An. + + * config/m32c/mov.md (peephole2): Fix enabling logic. + + * config/m32c/m32c.h (CTOR_LIST_BEGIN, CTOR_LIST_END, + DTOR_LIST_BEGIN, DTOR_LIST_END, CTORS_SECTION_ASM_OP, + DTORS_SECTION_ASM_OP, INIT_ARRAY_SECTION_ASM_OP, + FINI_ARRAY_SECTION_ASM_OP): Define. + + * config/m32c/m32c.c (m32c_legitimize_address): Remove temporary + variable. + (m32c_legitimize_reload_address): New logic to reload FB to An. + (m32c_output_reg_push): Add newline. + (m32c_output_reg_pop): Likewise. + +2006-01-12 Ulrich Weigand + + * struct-equiv.c (find_dying_inputs): Fix off-by-one bug. + +2006-01-11 Andrew Pinski + + * config/i386/darwin.h (SUBTARGET_ENCODE_SECTION_INFO): Define. + +2006-01-11 Kazu Hirata + + * config/sh/predicates.md (sh_rep_vec): Add parallel to + match_code. + +2006-01-11 Ben Elliston + + * rtlanal.c (find_reg_note): Assert insn is not null. + +2005-01-11 Kenneth Zadeck + + * df-scan.c (df_hard_reg_init): Move declaration of i outside + ifdef. + +2006-01-11 Jeff Law + + * tree-ssa-threadupdate.c (threaded_edges): New VEC to + hold edge pairs. + (mark_threaded_blocks, register_jump_thread): New functions. + (thread_through_all_blocks): Remove unwanted argument. No + longer rely on e->aux to communicate thread target info. + Call mark_threaded_blocks. Release the threaded_blocks + bitmap and threaded_edges vector when complete. + * tree-ssa-dom.c (struct edge_info): Remove redirection_target field. + (threaded_blocks): Remove. + (tree_ssa_dominator_optimize): Remove initialization and + finalization of threaded_blocks. Simplify call to + thread_through_all_blocks. + (thread_across_edge): Call register_jump_thread rather than + storing thread information into e->aux. + (free_all_edge_infos): Simplify now that e->aux is no longer + used to communicate with thread_through_all_blocks. + * tree-flow.h (thread_through_all_blocks): Update prototype. + (register_jump_thread): Prototype. + +2006-01-11 Kazu Hirata + + * df-core.c (df_compact_blocks, df_bb_replace): Use + SET_BASIC_BLOCK instead of BASIC_BLOCK. + +2006-01-11 Richard Guenther + + PR tree-optimization/25734 + * tree-ssa-forwprop.c (forward_propagate_addr_expr_1): Do not + stop propagation after successful propagation to the LHS. + +2006-01-11 Kazu Hirata + + * basic-block.h (control_flow_graph): Change the type of + x_basic_block_info to VEC(basic_block,gc) *. + (BASIC_BLOCK_FOR_FUNCTION, BASIC_BLOCK): Adjust the uses of + basic_block_info. + (SET_BASIC_BLOCK): New. + * cfg.c (compact_blocks, expunge_block): Use SET_BASIC_BLOCK + instead of BASIC_BLOCK when assigning to BASIC_BLOCK. + * cfgbuild.c (find_basic_blocks): Likewise. + * cfglayout.c (fixup_reorder_chain): Likewise. + * cfgrtl.c (create_basic_block_structure, + rtl_create_basic_block): Likewise. + * ifcvt.c (find_if_case_1): Likewise. + * tree-cfg.c (init_empty_tree_cfg, build_tree_cfg, create_bb): + Likewise. + +2005-01-11 Kenneth Zadeck + + * Makefile.in: Removed rotted odf.c entry. + +2006-01-11 Hans-Peter Nilsson + + PR target/25706 + * config/cris/cris.md ("*extopqihi_side", "*extopsi_side") + ("*extopsi_swap_side_biap", "*extopsi_swap_side", + ("*extopqihi", "*extopsi", "*extopsi_swap"): Use %E + output pattern modifier, not %e. + * config/cris/cris.c (cris_op_str): Update comment about pattern + modifier. + (cris_print_operand) : Clear cris_output_insn_is_bound + before falling through into... + : Redefined from old 'e' case. + +2006-01-11 Jan Hubicka + + PR target/25042 + * i386.c (ix86_init_mmx_sse_builtins): Do not delcare float128 + +2006-01-11 Jan Hubicka + + * i386.h (TARGET_DECOMPOSE_LEA): Kill. + * i386.c (x86_decompose_lea): Kill. + (ix86_rtx_costs): Kill. + +2006-01-11 Jan Hubicka + + * cgraph.c (cgraph_insert_node_to_hashtable): New function. + * cgraph.h (cgraph_node): Add inline_decl. + (cgraph_insert_node_to_hashtable): Declare. + (save_inline_function_body): Declare. + * cgraphunit.c (verify_cgraph_node): Inline edges might point to inline + clones. + (cgraph_preserve_function_body_p): Do not presrve when dump is enabled. + (cgraph_function_versioning): Update call of tree_function_versioning. + (save_inline_function_body): New function. + * function.h (struct function): Kill saved_eh, saved_cfg, saved_args, + saved_static_chain_decl, saved_blocks and saved-unexpanded_var_list. + * ipa-inline.c (cgraph_mark_inline_edge): Look for inline clones. + (cgraph_default_inline_p): Likewise. + (cgraph_decide_inlining_incrementally): Likewise. + * tree-inline.c (inline_data): Kill saving_p add update_clones_p. + (copy_bb): Kill saving; do updating of clones. + (copy_cfg_body): Kill saving. + (initialize_inlined-parameters): Likewise. + (expand_call_inline): Likewise. + (save_body): Kill. + (tree_function_versioning): New parameter "update_clones". + (inlining_p): Kill saving. + * tree-inline.h (tree_function_versioning): Update prototype. + * tree-optimize.c (tree_rest_of_compilation): Use clonning instead of + saving. + +2006-01-11 Ian Lance Taylor + + * combine.c (struct undo): Remove is_int. Enumify types of undos. + Allow undoing set of machine mode. + (do_SUBST): Use enums instead of is_int. + (do_SUBST_MODE): New function. + (SUBST_MODE): New macro. + (try_combine): Use SUBST_MODE/PUT_MODE instead of generating a new + reg and trying to replace reg_regno_rtx with a new register. + (undo_all): Use new enums, handle undoing a PUT_MODE change. + (simplify_set): Use SUBST_MODE. + (distribute_notes): Remove code that tried to update reg notes + for regno_reg_rtx changes. + +2006-01-11 Paolo Bonzini + + PR tree-optimization/23109 + PR tree-optimization/23948 + PR tree-optimization/24123 + + * Makefile.in (tree-ssa-math-opts.o): Adjust dependencies. + * tree-cfg.c (single_noncomplex_succ): New. + * tree-flow.h (single_noncomplex_succ): Declare it. + * tree-ssa-math-opts.c (enum place_reciprocal): Remove. + * tree-ssa-math-opts.c (enum place_reciprocal): Remove. + (struct occurrence, occ_head, occ_pool, is_divide_by, compute_merit, + insert_bb, register_division_in, insert_reciprocals, + replace_reciprocal, free_bb): New. + (execute_cse_reciprocals_1): Rewritten. + (execute_cse_reciprocals): Adjust calls to execute_cse_reciprocals_1. + Do not commit any edge insertion. Always compute dominators and + create the allocation pool. + * target-def.h (TARGET_MIN_DIVISIONS_FOR_RECIP_MUL): New. + * target.h (struct gcc_target): Add min_divistions_for_recip_mul. + * targhooks.c (default_min_divistions_for_recip_mul): New. + * targhooks.h (default_min_divistions_for_recip_mul): New prototype. + * passes.c (init_optimization_passes): Run recip after tree loop + optimizations. + * doc/tm.texi (Misc): Document TARGET_MIN_DIVISIONS_FOR_RECIP_MUL. + +2005-01-11 Danny Berlin + Kenneth Zadeck + + * df.h (DF_SCAN, DF_RU, DF_RD, DF_LR, DF_UR, DF_UREC, DF_CHAIN, + DF_RI, DF_LAST_PROBLEM_PLUS1, DF_DU_CHAIN, DF_UD_CHAIN, + DF_REF_TYPE_NAMES, DF_HARD_REGS, DF_EQUIV_NOTES, DF_SUBREGS, + DF_SCAN_BB_INFO, DF_RU_BB_INFO, DF_RD_BB_INFO, DF_LR_BB_INFO, + DF_UR_BB_INFO, DF_UREC_BB_INFO, DF_LIVE_IN, DF_LIVE_OUT, + DF_RA_LIVE_IN, DF_RA_LIVE_OUT, DF_UPWARD_LIVE_IN, + DF_UPWARD_LIVE_OUT, DF_REF_REAL_REG, DF_REF_REGNO, + DF_REF_REAL_LOC, DF_REF_REG, DF_REF_LOC, DF_REF_BB, DF_REF_BBNO, + DF_REF_INSN, DF_REF_INSN_UID, DF_REF_TYPE, DF_REF_CHAIN, + DF_REF_ID, DF_REF_FLAGS, DF_REF_NEXT_REG, DF_REF_PREV_REG, + DF_REF_NEXT_REF, DF_REF_DATA, DF_REF_REG_DEF_P, DF_REF_REG_USE_P, + DF_REF_REG_MEM_STORE_P, DF_REF_REG_MEM_LOAD_P, DF_REF_REG_MEM_P, + DF_DEFS_SIZE, DF_DEFS_GET, DF_DEFS_SET, DF_USES_SIZE, DF_USES_GET, + DF_USES_SET, DF_REG_SIZE, DF_REG_DEF_GET, DF_REG_DEF_SET, + DF_REG_USE_GET, DF_REG_USE_SET, DF_REGNO_FIRST_DEF, + DF_REGNO_LAST_USE, DF_INSN_SIZE, DF_INSN_GET, DF_INSN_SET, + DF_INSN_CONTAINS_ASM, DF_INSN_LUID, DF_INSN_DEFS, DF_INSN_USES, + DF_INSN_UID_GET, DF_INSN_UID_LUID, DF_INSN_UID_DEFS, + DF_INSN_UID_USES, DF_SCAN_INITIAL, DF_SCAN_GLOBAL, + DF_SCAN_POST_ALLOC): New macros. + (df_flow_dir, df_ref_type, df_ref_flags, df_alloc_function, + df_free_bb_function, df_local_compute_function, df_init_function, + df_dataflow_function, df_confluence_function_0, + df_confluence_function_n, df_transfer_function, + df_finalizer_function, df_free_function, df_dump_problem_function, + df_problem, dataflow, df_insn_info, df_reg_info, df_ref, df_link, + df_ref_info, df, df_map, df_scan_bb_info, df_ru_bb_info, + df_ru_bb_info, df_rd_bb_info, df_lr_bb_info, df_ur_bb_info, + df_urec_bb_info, ) New types. + (df_invalidated_by_call, df_all_hard_regs, df_state) New public + variables. + (df_init, df_add_problem, df_set_blocks, df_finish, df_analyze, + df_analyze_simple_change_some_blocks, + df_analyze_simple_change_one_block, df_compact_blocks, + df_bb_replace, df_bb_regno_last_use_find, + df_bb_regno_first_def_find, df_bb_regno_last_def_find, + df_insn_regno_def_p, df_find_def, df_find_use, + df_iterative_dataflow, df_dump, df_chain_dump, df_refs_chain_dump, + df_regs_chain_dump, df_insn_debug, df_insn_debug_regno, + df_regno_debug, df_ref_debug, debug_df_insn, debug_df_regno, + debug_df_reg, debug_df_defno, debug_df_useno, debug_df_ref, + debug_df_chain, df_get_dependent_problem, df_chain_create, + df_chain_unlink, df_chain_copy, df_get_live_in, df_get_live_out, + df_grow_bb_info, df_chain_dump, df_print_bb_index, + df_ru_add_problem, df_ru_get_bb_info, df_rd_add_problem, + df_rd_get_bb_info, df_lr_add_problem, df_lr_get_bb_info, + df_ur_add_problem, df_ur_get_bb_info, df_urec_add_problem, + df_urec_get_bb_info, df_chain_add_problem, df_ri_add_problem, + df_reg_lifetime, df_scan_get_bb_info, df_scan_add_problem, + df_rescan_blocks, df_ref_create, df_get_artificial_defs, + df_get_artificial_uses, df_reg_chain_create, df_reg_chain_unlink, + df_ref_remove, df_insn_refs_delete, df_refs_delete, + df_reorganize_refs, df_set_state, df_hard_reg_init, + df_read_modify_subreg_p) New public functions. + * df-core.c: The core dataflow solver and glue routines for rtl + dataflow. + (df_init, df_add_problem, df_set_blocks, df_finish, + df_hybrid_search_forward, df_hybrid_search_backward, + df_iterative_dataflow, df_prune_to_subcfg, df_analyze_problem, + df_analyze, df_get_bb_info, df_set_bb_info, df_bb_replace, + df_bb_regno_last_use_find, df_bb_regno_first_def_find, + df_bb_regno_last_def_find, df_insn_regno_def_p, df_find_def, + df_reg_defined, df_find_use, df_reg_used, df_dump, + df_refs_chain_dump, df_regs_chain_dump, df_insn_debug, + df_insn_debug_regno, df_regno_debug, df_ref_debug, debug_df_insn, + debug_df_reg, debug_df_regno, debug_df_ref debug_df_defno, + debug_df_useno, reset_df_after_reload): New functions. + * df-scan.c: The scanning fuctions, once in df.c, completely + rewritten so that they now fully model the functionality of + register usage at the backend. + (df_scan_free_internal, df_scan_get_bb_info, df_scan_set_bb_info, + df_scan_free_bb_info, df_scan_alloc, df_scan_free, df_scan_dump, + df_scan_add_problem, df_grow_reg_info, df_grow_ref_info, + df_grow_insn_info, df_rescan_blocks, df_ref_create, + df_get_artificial_defs, df_get_artificial_uses, + df_reg_chain_create, df_ref_unlink, df_reg_chain_unlink, + df_ref_remove, df_insn_create_insn_record, df_insn_refs_delete, + df_refs_delete, df_reorganize_refs, df_set_state, + df_ref_create_structure, df_ref_record, df_read_modify_subreg_p, + df_def_record_1, df_defs_record, df_uses_record, + df_insn_contains_asm_1, df_insn_contains_asm, df_insn_refs_record, + df_has_eh_preds, df_bb_refs_record, df_refs_record, df_mark_reg, + df_record_exit_block_uses, df_hard_reg_init): New functions. + + * df-problems.c: Seven concrete dataflow problems that use the + scanning in df-scan.c and are solved by the engine in df-core.c. + (df_get_dependent_problem, df_chain_create, df_chain_unlink, + df_chain_copy, df_get_live_in, df_get_live_out, df_grow_bb_info, + df_chain_dump, df_print_bb_index, df_ref_bitmap, df_set_seen, + df_unset_seen, df_ru_get_bb_info, df_ru_set_bb_info, + df_ru_free_bb_info, df_ru_alloc, + df_ru_bb_local_compute_process_def, + df_ru_bb_local_compute_process_use, df_ru_bb_local_compute, + df_ru_local_compute, df_ru_init_solution, df_ru_confluence_n, + df_ru_transfer_function, df_ru_free, df_ru_dump, + df_ru_add_problem, df_rd_get_bb_info, df_rd_set_bb_info, + df_rd_free_bb_info, df_rd_alloc, + df_rd_bb_local_compute_process_def, df_rd_bb_local_compute, + df_rd_local_compute, df_rd_init_solution, df_rd_confluence_n, + df_rd_transfer_function, df_rd_free, df_rd_dump, + df_rd_add_problem, df_lr_get_bb_info, df_lr_set_bb_info, + df_lr_free_bb_info, df_lr_alloc, df_lr_bb_local_compute, + df_lr_local_compute, df_lr_init, df_lr_confluence_0, + df_lr_confluence_n, df_lr_transfer_function, df_lr_free, + df_lr_dump, df_lr_add_problem, df_ur_get_bb_info, + df_ur_set_bb_info, df_ur_free_bb_info, df_ur_alloc, + df_ur_bb_local_compute, df_ur_local_compute, df_ur_init, + df_ur_local_finalize, df_ur_confluence_n, df_ur_transfer_function, + df_ur_free, df_ur_dump, df_ur_add_problem, df_urec_get_bb_info, + df_urec_set_bb_info, df_urec_free_bb_info, df_urec_alloc, + df_urec_mark_reg_change, df_urec_check_earlyclobber, + df_urec_mark_reg_use_for_earlyclobber, + df_urec_mark_reg_use_for_earlyclobber_1, df_urec_bb_local_compute, + df_urec_local_compute, df_urec_init, df_urec_local_finalize, + df_urec_confluence_n, df_urec_transfer_function, df_urec_free, + df_urec_dump, df_urec_add_problem, df_chain_alloc, + df_chain_create_bb_process_use, df_chain_create_bb, + df_chain_finalize, df_chain_free, df_chains_dump, + df_chain_add_problem, df_ri_alloc, df_ri_bb_compute, + df_ri_compute, df_ri_free, df_ri_dump, df_ri_add_problem, + df_reg_lifetime): New functions. + * df.c: Deleted file. + * ddg.c (create_ddg_dep_no_link, build_inter_loop_deps): Made code + consistent with new df api. + * modulo-sched.c (sms_schedule, rest_of_handle_sms, + rest_of_handle_sms): Ditto. + * web.c (unionfind_union, union_defs, entry_register, web_main): + Ditto. + * loop_invariant.c (invariant_for_use, hash_invariant_expr_1, + invariant_expr_equal_p, find_defs, check_dependencies, + find_invariant_insn, find_invariants_to_move, move_invariant_reg, + free_inv_motion_data, move_loop_invariants): Ditto. + * Makefile.in (df.c, df-scan.c df-problems.c df-core.c): + Update dependencies. + (odf.c): Added defective entry that was deleted later in day. + * sched-deps.c (sched_analyze_1): Ditto. + +2006-01-11 Zdenek Dvorak + + * tree-ssa-operands.c (get_expr_operands): Record addressable + variables directly. Do not call add_stmt_operands for CONST_DECLs + and ARRAY_DECLs. + (get_indirect_ref_operands): Remove handling of *(&a + offset) case. + (add_stmt_operands): Handle only objects satisfying SSA_VAR_P. + +2006-01-11 Ben Elliston + + * config/i386/i386.c (ix86_return_in_memory): Fix comment: this + function returns true in the positive case. + +2006-01-10 John David Anglin + + PR target/20754 + * config/pa/pa.md: Create separate 32 and 64-bit move patterns + for SI, DI, SF and DF modes. Add alternatives to copy between + general and floating point registers to the 32-bit patterns. + * config/pa/pa-64.h (SECONDARY_MEMORY_NEEDED_RTX): Delete undefine. + * config/pa/pa.h (SECONDARY_MEMORY_NEEDED_RTX): Delete define. + (SECONDARY_MEMORY_NEEDED): Secondary memory is only needed when + generating 64-bit code. + * config/pa/pa.c (output_move_double): Handle copies between general + and floating registers. + +2006-01-10 Stuart Hastings + + * config/i386/i386.md (set_got): Update. + (set_got_labelled): New. (UNSPEC_LD_MPIC): New. + (builtin_setjmp_receiver): Mach-O support. + * config/i386/darwin.h (TARGET_ASM_FILE_END) Define. + (GOT_SYMBOL_NAME): Define. + (FORCE_PREFERRED_STACK_BOUNDARY_IN_MAIN): New. + (TARGET_DEEP_BRANCH_PREDICTION): Remove. + * config/i386/i386.c (override_options): Revise for Darwin. + (USE_HIDDEN_LINKONCE): Enable for Mach-O. (ix86_file_end): Mach-O + support. (darwin_x86_file_end): New. (output_set_got): Add label + parameter, revise for Mach-O. (x86_output_mi_thunk): Likewise. + * config/i386/i386-protos.h (output_set_got): Likewise. + * config/darwin.c (machopic_legitimize_pic_address): Update + regs_ever_live[]. + +2006-01-10 Kaz Kojima + + * config/sh/sh.h (SH5_WOULD_BE_PARTIAL_NREGS): Use GET_MODE_SIZE + when MODE isn't BLKmode. + +2006-01-10 Eric Botcazou + + PR rtl-optimization/25367 + * config/sparc/sparc.h (HARD_REGNO_RENAME_OK): New macro. + +2006-01-10 Hans-Peter Nilsson + + PR target/25718 + * config/cris/cris.md ("uminsi3"): Don't use 8- or 16-bit sizes + for a negative bound. + +2006-01-10 Richard Guenther + + * tree-ssa-structalias.c (get_constraint_for_component_ref): + Never override with anything constraint. + +2006-01-10 Jan Beulich + + * config/i386/i386.c (ix86_data_alignment): Don't force alignment to + 256 bits when optimize_size. + +2006-01-10 Jan Beulich + + * config/i386/netware.h (TARGET_SUBTARGET_DEFAULT): Include + MASK_ALIGN_DOUBLE. + * config/i386/nwld.h (LINK_SPEC): Add --extensions:GNU option. + * config/i386/t-nwld (SHLIB_LINK): Insert spaces between expr + arguments. + +2006-01-10 Ben Elliston + + * config/rs6000/predicates.md (easy_fp_constant): Discount decimal + float modes. + * config/rs6000/rs6000.c (rs6000_scalar_mode_supported_p): New. + (TARGET_SCALAR_MODE_SUPPORTED_P): Define. + (USE_FP_FOR_ARG): Reject decimal float modes. + (function_arg_advance): Likewise. + (output_toc): Handle emitting TDmode, DDmode and SDmode constants. + (rs6000_handle_altivec_attribute): Do not permit decimal floating + point types in AltiVec vectors. + (rs6000_function_value): Use GP_ARG_RETURN for decimal floats. + (rs6000_libcall_value): Likewise. + +2006-01-09 Bob Wilson + + * config/xtensa/ieee754-df.S: New file. + * config/xtensa/ieee754-sf.S: New file. + * config/xtensa/t-xtensa (LIB2FUNCS_EXTRA): Remove fp-bit.c & dp-bit.c. + (LIB1ASMFUNCS): Add SFmode and DFmode floating-point functions. + * config/xtensa/lib1funcs.asm: Include ieee754-df.S and ieee754-sf.S. + +2006-01-09 Kazu Hirata + + * config/sh/predicates.md (binary_float_operator, + binary_logical_operator, commutative_float_operator, + equality_comparison_operator, greater_comparison_operator, + less_comparison_operator, logical_operator, + noncommutative_float_operator, shift_operator, + symbol_ref_operand, unary_float_operator): Remove redundant + conditionals. + +2006-01-09 Jeff Law + + * tree-ssa-dom.c (simplify_cond_and_lookup_avail_expr): Remove + code to propagate the RHS of a cast into COND_EXPR_COND. Remove + now unused arguments. Callers updated. + (eliminate_redundant_computations): Remove now unused arguments, + callers updated. + (local_fold): Remove, no longer used. + (find_equivalent_equality_comparison): Removed from tree-ssa-dom.c + and moved to... + * tree-ssa-forwprop.c (find_equivalent_equality_comparison): Here. + (simplify_cond): New function. + (forward_propagate_into_cond): Call simplify_cond. + +2006-01-09 Alexandre Oliva + + * config/i386/sse.md (*vec_extractv2di_1_sse2): New. + (*vec_extractv2di_1_sse): New. + +2006-01-09 Ben Elliston + + * config/rs6000/rs6000.h (GO_IF_LEGITIMATE_ADDRESS): Typo fix. + +2006-01-08 Richard Guenther + + * tree-ssa-structalias.c (get_constraint_for): Remove + anyoffset argument. + (get_constraint_for_component_ref): Likewise. + (do_deref): Likewise. + (get_constraint_for): Likewise. + (do_structure_copy): Likewise. + (handle_ptr_arith): Likewise. + (find_func_aliases): Likewise. Remove unused need_anyoffset + variable. + +2006-01-08 J"orn Rennecke + Kaz Kojima + + * config/sh/sh.h (CONST_OK_FOR_K16): Define. + (CONST_OK_FOR_K): Add CONST_OK_FOR_K16 case. + (EXTRA_CONSTRAINT_C16): Remove. + (EXTRA_CONSTRAINT_Css, EXTRA_CONSTRAINT_Csu): Define. + (EXTRA_CONSTRAINT_C): Remove EXTRA_CONSTRAINT_C16 case and add + EXTRA_CONSTRAINT_Css and EXTRA_CONSTRAINT_Csu cases. + * config/sh/sh.c (print_operand): Handle unsigned 16-bit symbolic + constants of SHmedia. Handle nested constant expressions of + SHmedia correctly. + (andcosts): Fix the costs for SHmedia constants. + (sh_rtx_costs): Take account of outer_code for SHmedia constants. + * config/sh/sh.md (*movsi_media): Use Css constraint instead of C16. + (*movsi_media_nofpu, *movqi_media, *movhi_media): Likewise. + (*movdi_media, *movdi_media_nofpu, movv8qi_i, movv2hi_i): Likewise. + (movv4hi_i, movv2si_i): Likewise. + (movsi_const): Adjust the second operand of ior so to match with + the Csu constraint. + (movdi_const, movdi_const_32bit): Likewise. + (movdi_const_16bit+1): Don't sign-extend LOW. + (movdi_const_16bit+2): Likewise. Remove the zero_extend and truncate + step. + (*double_shori): Fix the split condition. Use GEN_INT instead + of get_int_mode calls. Mask lower 16-bit of the argument of + the last GEN_INT. + (sym2GOTPLT): Remove. + (symGOTPLT2reg): Replace gen_sym2GOTPLT with gen_rtx_CONST and + gen_rtx_UNSPEC. + * config/sh/predicates.md (arith_operand): Use EXTRA_CONSTRAINT_Css + instead of EXTRA_CONSTRAINT_C16. + +2006-01-07 Ian Lance Taylor + David Edelsohn + + PR rtl-optimization/25662 + * optabs.c (simplify_expand_binop): Use simplify_binary_operation + for constant operands instead of simplify_gen_binary. + * simplify-rtx.c (simplify_gen_binary): Swap commutative operands + after trying simplify_binary_operation + +2006-01-06 Daniel Berlin + + * tree.c (iterative_hash_expr): Hash decls based on UID. + +2006-01-06 Eric Christopher + + * doc/tm.texi (TARGET_ASM_EMIT_EXCEPT_TABLE_LABEL): Document. + (TARGET_UNWIND_EMIT): Fix spelling. + * target.h (gcc_target): Add except_table_label. + * except.c (output_function_exception_table): Use. + * varasm.c (default_emit_except_table_label): New. + * target-def.h (TARGET_ASM_EMIT_EXCEPT_TABLE_LABEL): New default + define. + (asm_out): Add here. + * output.h (default_emit_except_table_label): Prototype. + * config/darwin-protos.h (darwin_emit_except_table_label): Ditto. + * config/darwin.c (darwin_emit_except_table_label): Define. + * config/darwin.h (TARGET_ASM_EMIT_EXCEPT_TABLE): Ditto. + +2006-01-06 Zdenek Dvorak + + PR tree-optimization/18527 + * tree-ssa-loop-niter.c (number_of_iterations_cond, + number_of_iterations_special, number_of_iterations_exit): + Move base and step of an iv to a single structure. Add + no_overflow flag, and use it in # of iterations analysis. + * tree-scalar-evolution.c (analyze_scalar_evolution_in_loop): Add + folded_casts argument. + (simple_iv): Pass base and step in a structure. Set no_overflow + flag. + (scev_const_prop): Add argument to analyze_scalar_evolution_in_loop. + Evaluate expensiveness of computing # of iterations instead of + the final expression. + * tree-scalar-evolution.h (affine_iv): New structure. + (simple_iv): Declaration changed. + * tree-chrec.c (chrec_apply): Handle chrecs containing symbols. + * tree-ssa-loop-ivopts.c (determine_biv_step, find_givs_in_stmt_scev, + find_givs_in_stmt): Changed due to simple_iv change. + +2006-01-06 Jeff Law + + PR ada/24994 + * tree-cfg.c (bsi_replace): Rename final argument from + PRESERVE_EH_INFO to UPDATE_EH_INFO. Fix typo in last + change (stmt -> orig_stmt). + * tree-eh.c (verify_eh_throw_stmt_node): New function. + (bsi_remove): Add new argument. Remove EH information + if requested. + (verify_eh_throw_table_statements): New function. + (bsi_remove): Add new argument REMOVE_EH_INFO. All callers + updated. + * tree-optimize.c (execute_free_cfg_annotations): Verify + the EH throw statement table after removing annotations. + * except.h (verify_eh_throw_table_statements): Prototype. + * tree-flow.h (bsi_remove): Update prototype. + * tree-vrp.c (remove_range_assertions): Add new argument to + bsi_remove call. + * tree-ssa-loop-im.c (move_computations_stmt): Likewise. + * tree-complex.c (expand_complex_div_wide): Likewise. + * tree-ssa-threadupdate.c (remove_ctrl_stmt_and_useless_edges): Likewise + * tree-tailcall.c (eliminate_tailcall): Likewise. + * tree-ssa-dse.c (dse_optimize_stmt): Likewise. + * tree-ssa-loop-ivopts.c (remove_statement): Likewise. + * tree-nrv.c (tree_nrv): Likewise. + * tree-vectorizer.c (slpeel_make_loop_iterate_ntimes): Likewise. + * tree-if-conv.c (tree_if_convert_cond_expr): Likewise. + (combine_blocks): Likewise. + * tree-ssa-phiopt.c (replace_phi_edge_with_variable): Likewise. + * tree-cfgcleanup.c (cleanup_ctrl_expr_graph): Likewise. + (cleanup_control_flow): Likewise. + (remove_forwarder_block): Likewise. + * tree-ssa-pre.c (remove_dead_inserted_code): Likewise. + * tree-sra.c (sra_replace): Likewise. + * tree-ssa-forwprop.c (forward_propagate_into_cond): Likewise. + (forward_propagate_single_use_vars): Likewise. + * tree-ssa-dce.c (remove_dead_stmt): Likewise. + * tree-inline.c (expand_call_inline): Likewise. + * tree-vect-transform.c (vect_transform_loop): Likewise. + * tree-outof-ssa.c (rewrite_trees): Likewise. + * tree-cfg.c (make_goto_expr_edges): Likewise. + (cleanup_dead_labels): Likewise. + (tree_merge_blocks, remove_bb, disband_implicit_edges): Likewise. + (bsi_move_before, bsi_move_after): Likewise. + (bsi_move_to_bb_end, try_redirect_by_replacing_jump): Likewise + (tree_redirect_edge_and_branch, tree_split_block): Likewise. + +2006-01-06 Andrew Pinski + + PR tree-opt/25528 + * tree-ssa-alias.c (find_used_portions): Handle REALPART_EXPR + and IMAGPART_EXPR. + * tree-flow-inline.h (var_can_have_subvars): Handle complex types + on non gimple variables. Also add checks at the top for decls and + mtags. + * tree-ssa-structalias.c (push_fields_onto_fieldstack): Handle + complex types. + * tree-ssa-operands.c (parse_ssa_operands): Handle REALPART_EXPR + and IMAGPART_EXPR for creating MUST_DEFs. + (get_expr_operands): Handle SSA_NAME, STRUCT_FIELD_TAG, TYPE_MEMORY_TAG, + and NAME_MEMORY_TAG separately from the DECLs. + +2006-01-06 Richard Guenther + + * tree-dfa.c (mark_new_vars_to_rename): Create stmt + annotation, if necessary. + * tree-ssa-pre.c (create_expression_by_pieces): Remove + redundant calls to update_stmt. + * tree-ssa-forwprop.c (tidy_after_forward_propagate_addr): + Likewise. + +2006-01-05 Richard Henderson + + * c-parser.c (c_parser_objc_methodprotolist): Handle CPP_PRAGMA. + +2006-01-05 Carlos O'Donell + + * c-typeck.c: Update copyright date. + +2006-01-05 Carlos O'Donell + + * c-typeck.c (build_c_cast): Always warn when casting + from a pointer to an integer of different size, even if + the node was constant. + +2006-01-05 Richard Guenther + + PR tree-optimization/22555 + * tree-ssa-alias.c (create_overlap_variables_for): Do not give up, + if one structure field is an array. + * tree-ssa-operands.c (get_expr_operands): Continue scanning + operands even if we found a subvar, but ignore VOPs in this + case. + * tree-ssa-loop-ivopts.c (rewrite_use): Mark new vars in stmt + for renaming. + * tree-ssa-loop.c (pass_iv_optimize): Schedule TODO_update_ssa. + +2006-01-05 Richard Earnshaw + + PR middle-end/24998 + * arm/t-netbsd (LIB2FUNCS_EXTRA): Define. + +2006-01-05 Richard Guenther + Diego Novillo + + * tree-pass.h (TODO_remove_unused_locals): Define. + * gimple-low.c (expand_var_p, remove_useless_vars, + pass_remove_useless_vars): Remove. Update all users. + * tree-ssa-live.c (mark_all_vars_used_1): Handle SSA names. + (remove_unused_locals): New function. + * tree-flow.h (remove_unused_locals): Declare. + * passes.c (execute_todo): Call remove_unused_locals if + TODO_remove_unused_locals is set. + * tree-into-ssa.c (pass_build_ssa): Add TODO_remove_unused_locals. + * tree-ssa-dce.c (pass_dce): Likewise. + * tree-outof-ssa.c (pass_del_ssa): Likewise. + +2006-01-05 Richard Guenther + + * tree-flow.h (struct fieldoff): Decompose field to + type, size and decl. + * tree-ssa-alias.c (create_sft): Take type as parameter. + (create_overlap_variables_for): Store type, size and decl + in the fieldoff structure. + * tree-ssa-structalias.c (fieldoff_compare): Adjust users + of struct fieldoff. + (push_fields_onto_fieldstack): Likewise. + (create_variable_info_for): Likewise. Use offset for the + SFT name if the decl is not available. + +2006-01-04 Paul Brook + + * config/m68k/m68k.c (m68k_output_mi_thunk): Use jmp, not jsr. + +2006-01-04 Daniel Berlin + + * lambda-code.c (can_put_in_inner_loop): Relax + restrictions. + (can_put_after_inner_loop): New function. + (can_convert_to_perfect_nest): Use can_put_after_inner_loop as well. + (perfect_nestify): Change to make copies and modify uses. + +2006-01-04 Richard Henderson + + Merge from gomp branch: + * c-lex.c (c_lex_with_flags) : Smuggle pragma id + via integer constant. + (pragma_lex): Remove. + * c-pch.c (c_common_pch_pragma): Accept the name as an argument, + rather than parsing it. + * c-pragma.c (handle_pragma_weak, handle_pragma_redefine_extname, + handle_pragma_extern_prefix): Add %< %> quotes. + (registered_pragmas): New. + (c_register_pragma_1): New. + (c_register_pragma): Use it. + (c_register_pragma_with_expansion): Likewise. + (c_invoke_pragma_handler): New. + (init_pragma): Use cpp_register_deferred_pragma directly for + pch_preprocess. + * c-pragma.h (enum pragma_kind): New. + (pragma_handler): New. + (c_invoke_pragma_handler): Declare. + * c-common.c (c_parse_error): Pretty print CPP_PRAGMA and + CPP_PRAGMA_EOL. + * c-common.h (c_common_pch_pragma): Update decl. + * Makefile.in (c-parser.o): Update dependencies. + (GTFILES): Add c-pragma.h. + * c-parser.c (struct c_token): Add pragma_kind. + (struct c_parser): Add in_pragma. + (c_lex_one_token): Always initialize keyword and pragma_kind. + Extract data for CPP_PRAGMA. + (c_parser_peek_2nd_token): Deny CPP_PRAGMA_EOL. + (c_parser_consume_token): Don't allow CPP_PRAGMA unless errors. + Don't allow CPP_PRAGMA_EOL if in_pragma. + (c_parser_consume_pragma): New. + (c_parser_skip_until_found): Stop on CPP_PRAGMA_EOL. + (c_parser_skip_to_end_of_parameter): Likewise. + (c_parser_skip_to_end_of_block_or_statement): Likewise. + (c_parser_skip_to_pragma_eol): New. + (c_parser_external_declaration): Handle CPP_PRAGMA. + (c_parser_compound_statement_nostart): Likewise. + (c_parser_statement_after_labels): Likewise. + (c_parser_pragma): New. + (pragma_lex): Likewise. + (c_parser_pragma_pch_preprocess): New. + (c_parser_new): Merge into ... + (c_parse_file): ... here. Call c_parser_pragma_pch_preprocess. + +2006-01-04 Jeff Law + + PR ada/24994 + * tree-cfg.c (bsi_replace): Remove the original statement + from the EH throw statement table. + +2006-01-04 Jakub Jelinek + + * config/i386/pmm_malloc.h (posix_memalign): If __cplusplus, + make the prototype extern "C" and add throw (). + + PR target/25554 + * config/i386/i386.md (testqi_ext_3): Ensure len is positive + and pos non-negative and pos + len <= 32. + (testqi_ext_3_rex64): Ensure len is positive and pos non-negative, + drop pos + len < HOST_BITS_PER_WIDE_INT test. + (testqi_ext_3* splitter): Handle pos + len == HOST_BITS_PER_WIDE_INT. + + PR c/25559 + * c-common.c (handle_vector_size_attribute): Reject zero vector size + as well as sizes not multiple of component size. + + PR debug/25562 + * function.c (instantiate_expr): New function. + (instantiate_decls_1, instantiate_decls): If DECL_HAS_VALUE_EXPR_P, + walk its DECL_VALUE_EXPR with instantiate_expr. + + * dwarf2out.c (loc_descriptor_from_tree_1): Don't add + DW_OP_deref{,_size} if address isn't going to be added. + +2006-01-04 Ben Elliston + + * config/fp-bit.h: Use top-of-file comment from libgcc2.c. + * config/fp-bit.c: Likewise. + +2006-01-03 Daniel Berlin + + * dominance.c: Add comment about why we use DFS numbering + of dominance tree. + +2006-01-03 Jakub Jelinek + Richard Henderson + + Merge from gomp-branch: + * varasm.c (assemble_variable): Handle thread-local COMMON data. + * defaults.h (ASM_OUTPUT_TLS_COMMON): Define. + +2006-01-03 Paolo Bonzini + + PR rtl-optimization/25578 + * combine.c (combine_simplify_rtx, force_to_mode): Don't + pass a parameter to simplify_shift_const if changing ASHIFTRT + to LSHIFTRT. + +2006-01-03 Adrian Straetling + + * builtins.c (get_builtin_sync_mem): New function. + (expand_builtin_sync_operation, expand_builtin_compare_and_swap, + expand_builtin_lock_test_and_set, expand_builtin_lock_release): + Call get_builtin_sync_mem to generate mem rtx. + +2006-01-03 Richard Guenther + + PR c/25183 + * stmt.c (add_case_node): Make sure to clear overflow flags + from ranges. + +2006-01-03 Jakub Jelinek + + Merge from gomp-branch. + * config/sparc/sync.md: New file. + * config/sparc/sparc.md (UNSPECV_MEMBAR, UNSPECV_CAS, UNSPECV_SWAP, + UNSPECV_LDSTUB): New constants. + * config/sparc/sparc.c (sparc_expand_compare_and_swap_12): New function. + * config/sparc/predicates.md (memory_reg_operand): New predicate. + * config/sparc/sparc-protos.h (sparc_expand_compare_and_swap_12): New + prototype. + +2006-01-03 Roger Sayle + + * combine.c (reg_subword_p): New predicate to test whether the + destination of a set refers to a subword/piece of a register. + (try_combine): Generalize the code to merge the setting of a + pseudo to a constant followed by a set of a subword of that + register to a constant. + +2006-01-03 Kazu Hirata + + * basic-block.h (control_flow_graph): Change the type of + x_label_to_block_map to VEC(basic_block,gc) *. + * tree-cfg.c (init_empty_tree_cfg, label_to_block_fn, + set_bb_for_stmt): Adjust the uses of x_label_to_block_map. + + * tree-ssa-propagate.c (cfg_blocks): Change the type to + VEC(basic_block,heap) *. + (cfg_blocks_add, cfg_blocks_get, ssa_prop_init, + ssa_prop_fini): Adjust the uses of cfg_blocks. + +2006-01-03 Steven Bosscher + + * fold-const.c (operand_equal_p): Accept a NULL operand 0 for + COMPONENT_REFs. + * emit-rtl.c (mem_attrs_htab_eq): Use iterative_hash_expr for + hashing trees instead of a pointer hash. + (mem_attrs_htab_eq): Do a deep compare instead of a pointer + compare for MEM_EXPR. + + PR rtl-optimization/25130 + * cse.c (exp_equiv_p): Compare MEM_ATTRS instead of MEM_ALIAS_SET + when comparing MEMs for GCSE + +2006-01-03 Ben Elliston + + * targhooks.h (default_decimal_float_supported_p): Declare. + * targhooks.c (default_decimal_float_supported_p): Define. + * target-def.h (TARGET_DECIMAL_FLOAT_SUPPORTED_P): Redefine to + `default_decimal_float_supported_p'. + * doc/tm.texi (TARGET_DECIMAL_FLOAT_SUPPORTED_P): Update. + +2006-01-02 Adam Nemet + + * combine.c (apply_distributive_law ): Check + TRULY_NOOP_TRUNCATION. + +2006-01-02 Geoffrey Keating + + * dwarf2out.c (have_switched_text_section): Delete. + (have_multiple_function_sections): New. + (have_location_lists): Make 'bool'. + (add_AT_loc_list): Use 'true' not '1'. + (dwarf2out_switch_text_section): Set have_multiple_function_sections. + (output_loc_list): Use have_multiple_function_sections. + (output_ranges): Likewise. + (dwarf2out_begin_function): Set have_multiple_function_sections if + necessary. + (dwarf2out_source_line): Don't fake separate_line_info_table_in_use. + Check function_section rather than DECL_SECTION_NAME. + (dwarf2out_finish): Use have_multiple_function_sections. + Don't clear have_location_lists. + +2006-01-02 Eric Botcazou + Jan Hubicka + + * cfglayout.c (fixup_reorder_chain): Remove kludge for the + case of conditional jump jumping to the next instruction. + * cfgrtl.c (force_nonfallthru_and_redirect): Accept all + cases of conditional jump jumping to the next instruction. + +2006-01-02 Jan Hubicka + + * i386.c (*_cost): Add COSTS_N_INSNS. + (ix86_rtx_costs): Do not use COSTS_N_INSNS. + +2006-01-02 Paolo Bonzini + + PR target/25259 + * Makefile.in (DECNUMINC): Include libdecnumber's build directory. + +2006-01-02 Volker Reichelt + + * config/arm/arm.c (all_fpus): Fix comment typo. + * config/darwin.c: Likewise. + * config/frv/frv.h (FRV_STRUCT_VALUE_REGNUM): Likewise. + * config/h8300/h8300.md (extendqisi2_h8300hs): Likewise. + * config/m68hc11/m68hc11.c (m68hc11_reload_operands): Likewise. + +2006-01-01 David Edelsohn + +<<<<<<< .working + PR rtl-optimization/23117 + * sched-rgn.c (add_branch_dependences): Handle COND_EXEC correctly + when head == tail. Tidy comment. + +2005-07-28 Richard Henderson + + * cse.c (exp_equiv_p): Special case CONST_DOUBLE. + * cselib.c (rtx_equal_for_cselib_p): Likewise. + * jump.c (rtx_renumbered_equal_p): Likewise. + * loop.c (rtx_equal_for_loop_p): Tidy and special case PC, CC0, + CONST_INT and CONST_DOUBLE. + (rtx_equal_for_prefetch_p): Likewise, plus LABEL_REF. + * reload.c (operands_match_p): Special case CONST_INT and + CONST_DOUBLE; check mode earlier. + +2005-07-29 Joseph S. Myers + + PR c/22240 + * c-typeck.c (convert_for_assignment): Do not check + DECL_IN_SYSTEM_HEADER on NULL fundecl. + +2005-07-29 Joseph S. Myers + + PR c/22192 + * c-typeck.c (composite_type): Prefer constant size arrays to + VLAs. + +2005-07-29 Joseph S. Myers + + PR c/21720 + * real.c (real_from_string): Set last bit if there is a nonzero + hex digit beyond GCC's internal precision. + +2005-07-28 Richard Henderson + + PR rtl-opt/22619 + * cfgcleanup.c (try_forward_edges): Watch out for end of + insn chain. + +2005-07-28 James E Wilson + + PR c/23106 + * doc/invoke.texi (Wstrict-aliasing=2): Fix misleading wording. + +2005-07-28 Jan Hubicka + + * Makefile.in (rtl-profile.o): Kill all traces of it. + * common.opt (fspeculative-prefetching, ftree-based-profiling): Kill. + * coverage.h (rtl_coverage_counter_ref): Kill. + * opts.c (flag_speculative_prefetching_set): Kill. + (flag_loop_optimize_set): New. + (common_handle_option): Disable loop optimizer when profiling; + do not handle speculative prefetching. + * passes.c (init_optimization_passes): Replace pass_profiling combo + by branch_prob pass. + * profile.c (compute_value_histograms): Update for simplified value + profiles. + (rtl_register_profile_hooks): Kill. + (pass_profiling): Kill. + (rest_of_handle_branch_prob): Do not profile. + * toplev.c (process_options): Remove speculative prefetching. + * toplev.h (flag_tree_based_profiling): Kill. + * tree-profile.c (prepare_instrumented_value, + tree_gen_interval_profiler, tree_gen_pow2_profiler, + tree_gen_one_value_profiler, do_tree_profiling): Update for + simplified datastructures. + * value-prof.c: Add comment that speculative prefetching was dropped; + update rest of file for simplified datastructures. + (NOPREFETCH_RANGE_MIN, NOPREFETCH_RANGE_MAX, + rtl_divmod_values_to_profile, insn_prefetch_values_to_profile, + find_mem_reference_1, find_mem_reference_2, find_mem_reference, + rtl_values_to_profile, rtl_divmod_fixed_value, rtl_mod_pow2, + rtl_mod_subtract, gen_speculative_prefetch, + rtl_divmod_fixed_value_transform, rtl_mod_pow2_value_transform, + rtl_mod_subtract_transform, speculative_prefetching_transform): Kill. + (gate_handle_value_profile_transformations, + rest_of_handle_value_profile_transformations, + pass_value_profile_transformations): Kill. + * value-prof.h (histogram_value_t): Remove IL based unions. + (rtl_register_value_prof_hooks, rtl_register_profile_hooks, + rtl_profile_hooks): Remove hooks. + + * invoke.texi (-ftree-based-profiling, -fspeculative-prefetching): Kill. + + * cgraph.c (cgraph_clone_edge): New UPDATE_ORIGINAL argument. + (cgraph_clone_node): Likewise. + * cgraph.h (cgraph_clone_edge): Update prototype. + (cgraph_clone_node): Likewise. + * ipa-inline.c (cgraph_clone_inlined_nodes): Update call of + cgraph_clone_node. + (lookup_recursive_calls): Consider profile. + (cgraph_decide_recursive_inlining): Fix updating; use new + probability argument; use profile. + * params.def (PARAM_MIN_INLINE_RECURSIVE_PROBABILITY): New. + * tree-inline.c (copy_bb): Update clal of clone_edge. + * tree-optimize.c (tree_rest_of_compilation): UPdate cal of clone_node. + + * invoke.texi (min-inline-recursive-probability): Document. + +2005-07-28 Gerald Pfeifer + + * doc/install.texi (Configuration): Update Valgrind homepage. + +2005-07-28 Richard Henderson + + PR middle-end/21362 + * cfgrtl.c (rtl_merge_blocks): Call maybe_remove_eh_handler on + labels we want to delete. + (cfg_layout_merge_blocks): Likewise. + +2005-07-28 Richard Henderson + + PR target/17692 + * config/i386/i386.c (ix86_split_sse_movcc): Emit DELETED note + when expanding to nothing. + +2005-07-28 Josh Conner + + * ipa-inline.c (update_caller_keys): Fix estimated_growth caching. + (cgraph_decide_inlining_of_small_functions): Likewise. + +2005-07-28 Josh Conner + + * ipa-inline.c (cgraph_edge_badness): Update comments. Invert shift + direction of badness if negative. + (cgraph_default_inline_p): Add reason to parameters, and assign it + a value. + (cgraph_decide_inlining_of_small_functions): New parameter in call + to cgraph_default_inline_p. + (cgraph_decide_inlining_incrementally): Likewise. + * cgraphunit.c (decide_is_function_needed): Likewise. + * cgraph.h (cgraph_default_inline_p): Likewise. + +2005-07-28 Volker Reichelt + + * builtins.c: Fix comment typo(s). + * genautomata.c: Likewise. + * gimplify.c: Likewise. + * tree-dfa.c: Likewise. + * tree-flow-inline.h: Likewise. + * tree-into-ssa.c: Likewise. + * tree-ssa-alias.c: Likewise. + * tree-ssa-ccp.c: Likewise. + * tree-ssa-copy.c: Likewise. + * tree-ssa-dce.c: Likewise. + * tree-ssa-dom.c: Likewise. + * tree-ssa-operands.c: Likewise. + * tree-tailcall.c: Likewise. + * tree-vectorizer.c: Likewise. + * tree-vrp.c: Likewise. + * tree.c: Likewise. + +2005-07-28 Jeff Law + + * tree-vrp.c (test_for_singularity): Extracted from ... + (simplify_cond_using_ranges): Attempt to simplify a relational + test to NE_EXPR. Dump information when a COND_EXPR is simplified. + +2005-07-28 Dorit Nuzman + + PR tree-optimization/22506 + * tree-vectorizer.c (update_phi_nodes_for_guard2): Skip loop-closed + phis whose argument is constant. + +2005-07-28 J"orn Rennecke + + PR rtl-optimization/18992 + Back out this patch: + 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. + + Replace it with this: + * cse.c (count_reg_usage): In INSN, JUMP_INSN and CALL_INSN cases, + if flag_non_call_exceptions is set and the insn may trap, pass + pc_rtx as dest for recursion. + In SET_SRC part of SET case, if dest is already set, pass it down + unchanged. + +2005-07-28 Jan Hubicka + + * cfg.c (update_bb_profile_for_threading): Use RDIV. + (scale_bbs_frequencies_int): Likewise, assert for possible overflow. + (scale_bbs_frequencies_gcov_type): Be more curefull about overflows and + roundoff errors. + * tree-cfg.c (tree_duplicate_sese_region): Use counts for updating + profile when available. + +2005-07-28 Jan Beulich + + * config/ia64/ia64.c (ia64_load_pair_ok): New. + (ia64_print_operand): Describe and handle 'X'. + (ia64_register_move_cost): Also handle FP_REGS. + (ia64_preferred_reload_class): Likewise. + (ia64_secondary_reload_class): Likewise. + (ia64_dependencies_evaluation_hook): New local variable c. Initialize + it. Also check for ITANIUM_CLASS_FLDP. + * config/ia64/ia64.h (FP_REGNO_P): New. + (HARD_REGNO_MODE_OK): Remove explusion of TImode. + (reg_class): Add FP_REGS. + (REG_CLASS_NAMES): Adjust for it. + (REG_CLASS_CONTENTS): Likewise. + (REGNO_REG_CLASS): Use FP_REGS where appropriate. + (REG_CLASS_FROM_LETTER): Handle 'x'. + (CLASS_MAX_NREGS): Handle FP_REGS. + (MEMORY_MOVE_COST): Likewise. + * config/ia64/ia64.md (itanium_class): Add fldp. + (type): Handle fldp. + (movti_internal): More allowable operand combinations. Use ldfp8 when + splitting unnecessary. Remove predicable attribute. Adjust + itanium_class attribute. + (smuldi3_highpart): Remove outdated comment. + (mulditi3, umulditi3, rotlti3): New expanders. + (addti3, subti3, mulditi3_internal, umulditi3_internal, negti2, rotlti3_internal): New insns. + (absti2): Disabled new insn for future reference. + Respective new splitters. + * config/ia64/itanium1.md (1_fldp, 1b_fldp): New insn reservations. + * config/ia64/itanium2.md (2_fldp, 2b_fldp): Likewise. + * config/ia64/ia64-protos.h (ia64_load_pair_ok): New. + +2005-07-25 James A. Morrison + + PR rtl-optimization/23047 + * simplify-rtx.c (simplify_const_relational_operation): Respect + flag_wrapv for comparisons with ABS. + +2005-07-27 James A. Morrison + + PR tree-optimization/22493 + * tree-vrp.c (extract_range_from_unary_expr): Deal with -fwrapv and + VR_ANTI_RANGEs properly for NEGATE_EXPRs and ABS_EXPRs. + +2005-07-27 Aldy Hernandez + + * config/frv/frv.opt (moptimize-membar): New. + + * doc/invoke.texi: Document -moptimize-membar and its inverse. + + * config/frv/frv.h: Remove machine_function definition. + + * config/frv/frv.c (struct frv_io): New. + (struct machine_function): Moved from frv.h. Add has_membar_p. + (frv_same_doubleword_p, frv_io_fixed_order_p, frv_io_union) + (frv_extract_membar, frv_io_check_address, frv_io_handle_set) + (frv_io_handle_use_1, frv_io_handle_use, frv_optimize_membar_local) + (frv_optimize_membar_global, frv_optimize_membar): New functions. + (frv_reorg): Call frv_optimize_membar when appropriate. + (bdesc_loads, bdesc_stores): Use the membar code as the icode field. + (frv_expand_builtin): Adjust calls accordingly. + (frv_io_address_cookie): New function. + (frv_expand_load_builtin, frv_expand_store_builtin): Emit a normal + load or store rather than a special insn. Add ccnstant address and + io-type operands to the membar. + (frv_ifcvt_modify_tests): Unsign regno. + (frv_ifcvt_modify_tests): Same. + + * config/frv/frv.md: Remove UNSPEC_BUILTIN_{LOAD,STORE}. Change + UNSPEC_OPTIONAL_MEMBAR constant. + (builtin_read_): Delete. + (builtin_write_): Delete. + ("optional_membar_"): Add operand. + + * testsuite/gcc.target/frv/all-builtin-read8.c: Delete. + * testsuite/gcc.target/frv/all-builtin-read16.c: Delete. + * testsuite/gcc.target/frv/all-builtin-read32.c: Delete. + * testsuite/gcc.target/frv/all-builtin-read64.c: Delete. + * testsuite/gcc.target/frv/all-builtin-write8.c: Delete. + * testsuite/gcc.target/frv/all-builtin-write16.c: Delete. + * testsuite/gcc.target/frv/all-builtin-write32.c: Delete. + * testsuite/gcc.target/frv/all-builtin-write64.c: Delete. + * testsuite/gcc.target/frv/all-read-write-1.c: New. + +2005-07-28 Kaz Kojima + + * df.c (df_uses_record): Handle SCRATCH. + +2005-07-28 Steven Bosscher + + PR debug/20161 + * passes.c (rest_of_decl_compilation): If decl is a type and + we have encountered errors, don't emit debug information. + +2005-07-27 Kenneth Zadeck + + * params.def: Fixed comment. + +2005-07-27 Bjoern Haase + + PR target/19885 + * config/avr/avr.c (TARGET_ASM_ALIGNED_SI_OP): Add. + (TARGET_ASM_UNALIGNED_HI_OP): Add. + (TARGET_ASM_UNALIGNED_SI_OP): Add. + +2005-07-27 Steven Bosscher + + PR c++/22003 + * varasm.c (assemble_start_function): Don't do anything that may + require a CFG if the current function is a thunk. + +2005-07-25 Geoffrey Keating + + * doc/install.texi (Prerequisites): Mention that perl is needed + to do export control in libstdc++ targetting Darwin. + +2005-07-27 Steven Bosscher + + PR rtl-optimization/17808 + * sched-deps.c (sched_get_condition): Enable #if 0'ed code. + (sched_insns_conditions_mutex_p): Split out from... + (add_dependence): ...here. But don't call it from here. + (add_dependence_list): Check sched_insns_conditions_mutex_p + before calling add_dependence. + (add_dependence_list_and_free): Likewise. + (fixup_sched_groups): Likewise. + (sched_analyze_1): Likewise. + (sched_analyze_2): Likewise (and replace a "0" with REG_DEP_TRUE). + (sched_analyze): Likewise. + (sched_analyze_insn): Likewise. + * sched-ebb.c (add_deps_for_risky_insns): Likewise. + * sched-rgn.c (add_branch_dependences): Likewise. Also, add + dependencies on all COND_EXEC insns to jumps ending basic blocks + when doing intrablock scheduling. + * sched-int.h (sched_insns_conditions_mutex_p): Add prototype. + +2005-07-27 Jeff Law + + * tree-vrp.c (vrp_meet): Intersect the equivalency sets when + meeting a VR_ANTI_RANGE with a VR_RANGE. When intersecting + equivalency sets, correctly handle the case were vr0 has an + equivalency set, but vr1 does not. + +2005-07-27 Dorit Nuzman + + PR tree-optimization/23073 + * tree-vect-analyze.c (vect_analyze_data_refs_alignment): Call + vect_print_dump_info before fprintf. + +2005-07-27 Zdenek Dvorak + + PR tree-optimize/22348 + * tree-ssa-loop-niter.c (number_of_iterations_cond): + Fold the partial computation. + +2005-07-27 Zdenek Dvorak + + PR tree-optimization/22325 + * tree-flow.h (compute_phi_arg_on_exit, force_expr_to_var_cost): + Declare. + * tree-scalar-evolution.c (scev_const_prop): Add generic final + value replacement. + * tree-ssa-loop-ivopts.c (force_expr_to_var_cost): Split from ... + (force_var_cost): ... this function. + (compute_phi_arg_on_exit): Export. + +2005-07-27 Zdenek Dvorak + + PR tree-optimization/20773 + * tree-ssa-loop-ch.c (copy_loop_headers): Select the correct latch + edge. + +2005-07-27 Richard Guenther + + * tree-ssa-structalias.c (push_fields_onto_fieldstack): + Avoid pushing again if current struct contains only + fields we decomposed. + +2005-07-27 Jan Hubicka + + PR tree-optimization/22574 + * cgraph.c (cgraph_function_body_availability): Unanalyzed bodies are + not available. + + * tree-tailcall.c (decrease_profile): New function. + (eliminate_tail_call): Use it. + + * cgraphunit.c (cgraph_function_and_variable_visibility): Set + visibility flags correctly in whole program mode. + +2005-07-26 Steve Ellcey + + PR rtl-optimization/22472 + * config/pa/pa.h (HARD_REGNO_RENAME_OK): Define. + +2005-07-26 Steven Bosscher + + PR tree-optimization/22504 + * tree-complex.c (expand_complex_addition): Use 'code' instead + of MINUS_EXPR for (VARYING, ONLY_IMAG) and (ONLY_IMAG, VARYING). + +2005-07-26 Aldy Hernandez + + * config.gcc (cpu_type): Add frv case. + (with_cpu): Add frv400-*-*linux* and frv550-*-*linux* cases. + (supported_defaults): Add fr550 case. + +2005-07-26 Diego Novillo + + PR 22591 + * tree-ssa-alias.c (may_alias_p): Remove shortcut that tests + whether a pointer of type T * may point to objects of type T *. + +2005-07-26 DJ Delorie + + * configure: Regenerate. + +2005-07-26 Dale Johannesen + + * postreload-gcse.c (alloc_mem): Start CUID numbering at 1. + +2005-07-26 Mark Mitchell + + * doc/install.texi (--with-build-sysroot): Fix grammatical error. + Clarify use of "build" in name. + +2005-07-26 Aldy Hernandez + + * doc/extend.texi (Raw read/write Functions): New section. + * testsuite/gcc.target/frv/all-builtin-read8.c: New. + * testsuite/gcc.target/frv/all-builtin-read16.c: New. + * testsuite/gcc.target/frv/all-builtin-read32.c: New. + * testsuite/gcc.target/frv/all-builtin-read64.c: New. + * testsuite/gcc.target/frv/all-builtin-write8.c: New. + * testsuite/gcc.target/frv/all-builtin-write16.c: New. + * testsuite/gcc.target/frv/all-builtin-write32.c: New. + * testsuite/gcc.target/frv/all-builtin-write64.c: New. + * config/frv/frv.c: Add bdesc_loads global. + Add bdesc_stores global. + (frv_init_builtins): Add support for __builtin_{read/write}*. + (frv_volatile_memref): New. + (frv_expand_load_builtin): New. + (frv_expand_store_builtin): New. + * config/frv/frv.h (frv_builtins): Add FRV_BUILTIN_SCAN, + FRV_BUILTIN_READ8, FRV_BUILTIN_READ16, FRV_BUILTIN_READ32, + FRV_BUILTIN_READ64, FRV_BUILTIN_WRITE8, FRV_BUILTIN_WRITE16, + FRV_BUILTIN_WRITE32, FRV_BUILTIN_WRITE64. + * config/frv/frv.md (unspecs): Add UNSPEC_BUILTIN_LOAD, + UNSPEC_BUILTIN_STORE, UNSPEC_OPTIONAL_MEMBAR. + (builtin_read_): New. + (builtin_write_): New. + (builtin_write64): New. + (optional_membar_): New. + +2005-07-26 J"orn Rennecke + + * emit-rtl.c (gen_lowpart_common): Compare size of MODE in bits + (rather than units) against HOST_BITS_PER_WIDE_INT. + +2005-07-26 Kazu Hirata + + * ipa-pure-const.c, ipa-reference.c, ipa-reference.h, + ipa-type-escape.c, ipa-type-escape.h, ipa-utils.c, + ipa-utils.h, treestruct.def, config/crx/crx-protos.h, + config/crx/crx.c, config/crx/crx.h, config/crx/crx.md: Update + FSF address. + + * calls.c, fold-const.c, ipa-reference.c, ipa-type-escape.c, + tree-ssa-reassoc.c, tree-ssa-structalias.c, vec.h, + config/crx/crx.c, config/m32c/m32c.c, config/m32c/m32c.h: Fix + comment typos. + * doc/c-tree.texi, doc/tree-ssa.texi: Fix typos. + +2005-07-26 Richard Guenther + + PR tree-optimization/22486 + * fold-const.c (fold_unary): Fold away useless component + references of the form (T *)&T.x, if the address + doesn't change. + +2005-07-25 James E Wilson + + * dwarf2out.c (add_call_src_coords_attributes): New. + (gen_inlined_subroutine_die): Call it. + (maybe_emit_file, init_file_table): Add comments. + (prune_unused_types_walk_attribs): Pass DW_AT_call_file through + maybe_emit_file. + * tree-inline.c (remap_block): Copy BLOCK_SOURCE_LOCATION. + (expand_call_inline): Set BLOCK_SOURCE_LOCATION. + * tree.h (BLOCK_SOURCE_LOCATION): New. + (struct tree_block): New field locus. + +2005-07-26 Andreas Schwab + + PR rtl-optimization/23043 + * postreload-gcse.c (eliminate_partially_redundant_load): Fix typo + when allocating a struct unoccr. + +2005-07-25 Richard Henderson + + PR 22626 + * tree-complex.c (gate_no_optimization): True if errors. + * Makefile.in (tree-complex.o): Update dependencies. + +2005-07-25 Aldy Hernandez + + * config/frv/predicates.md (integer_register_operand): Use + GPR_AP_OR_PSEUDO_P. + +2005-07-25 Andrew Pinski + + PR tree-opt/22484 + * tree-ssa-ccp.c (fold_stmt_inplace): Strip useless type conversions + after fold. + * tree-ssa-propagate.c (set_rhs): Reject invalid conditional operands. + +2005-07-25 Andrew Pinski + + * tree-ssa-reassoc.c (reassociate_expr): Allow scaler floating point + types when flag_unsafe_math_optimizations is true. + +2005-07-25 Mark Mitchell + + * gcc.c (option_map): Add --sysroot. + (process_command): Handle --sysroot. + (display_help): Document it. + * doc/cppopts.tex (-isysroot): Document. + * doc/invoke.texi (--sysroot): Document. + * doc/install.texi (--with-build-sysroot): Document. + + * Makefile.in (inhibit_libc): New variable. + (INHIBIT_LIBC_CFLAGS): Likewise. + (LIBGCC2_CFLAGS): Include + $(INHIBIT_LIBC_CFLAGS). + (CRTSTUFF_CFLAGS): Include $(INHIBIT_LIBC_CFLAGS). + ($(T)crtbegin.o): Do not use @inhibit_libc@. + ($(T)crtend.o): Likewise. + ($(T)crtbeginS.o): Do not use @inhibit_libc@. + ($(T)crtendS.o): Likewise. + ($(T)crtbeginT.o): Do not use @inhibit_libc@. + ($(T)crtendT.o): Likewise. + (stmp-fixinc): Do not complain about missing headers if + inhibit_libc. + * configure.ac (inhibit_libc): Set it to true/false. + (--with-build-sysroot): New option. Use it to set + SYSTEM_HEADER_DIR. + * configure: Regenerated. + +2005-07-25 Manfred Hollstein + + * calls.c (store_one_arg): Fix unsigned comparison warning. + +2005-07-25 Serge Belyshev + + PR other/22337 + * ggc-zone.c (ggc_alloc_zone_stat): Do not use CHUNK_OVERHEAD. + (ggc_print_statistics): Initialize variable before use. + +2005-07-25 Richard Guenther + + * tree-dfa.c (mark_new_vars_to_rename): Protect against + calling with a PHI_NODE argument. + + * tree-flow-inline.h (overlap_subvar): Protect against + possible overflow. + +2005-07-25 Paolo Bonzini + + * aclocal.m4 (gcc_AC_CHECK_TOOL): Add /bin to default directory. + * configure: Regenerate. + +2005-07-25 Ira Rosen + + * expr.c (highest_pow2_factor): Make extern. + * tree-data-ref.c (ptr_decl_may_alias_p): New function. + (ptr_ptr_may_alias_p, may_alias_p, record_ptr_differ_p, + record_array_differ_p, array_ptr_differ_p): Likewise. + (base_object_differ_p): Rename (from array_base_name_differ_p). Support + additional cases. Call the above functions. + (base_addr_differ_p): Moved from tree-vect-analyze.c. Call + base_object_differ_p when there are two base objects. Otherwise, compare + base address and offset. Call may_alias_p. + (dump_data_reference): Use a correct field name. + (analyze_array): Make static. Initialize new data-ref fields. + (analyze_indirect_ref): New function. + (init_data_ref): Initialize new data-ref fields. + (strip_conversion): Moved from tree-vect-analyze.c. + (analyze_offset_expr, get_ptr_offset, address_analysis, + object_analysis): Likewise. + (analyze_offset): New function. + (create_data_ref): Likewise. + (initialize_data_dependence_relation): Call base_addr_differ_p. Compare + dimensions for ARRAY_REFs only. + (build_classic_dist_vector): Make static. + (access_functions_are_affine_or_constant_p): Call macro to get the + address of access functions. + (compute_all_dependences): Add new parameter + compute_self_and_read_read_dependences. Compute self and read-read + dependences if it is true. + (find_data_references_in_loop): Call create_data_ref. Initialize new + data-ref fields. + (compute_data_dependences_for_loop): Add new parameter + compute_self_and_read_read_dependences. Remove parameter nb_loops, + compute nb_loops. Call compute_all_dependences, + build_classic_dist_vector and build_classic_dir_vector with correct + parameters. + (analyze_all_data_dependences): Call compute_data_dependences_for_loop + with correct parameters. Compare dimensions for ARRAY_REFs only. + (free_data_refs): Call macro to free access functions. + * tree-data-ref.h (struct first_location_in_loop): New structure. Move + fields from stmt_vinfo. + (struct base_object_info): New structure. + (struct data_reference): Move fields to base_object_info. Add fields + first_location and object_info for above structures. Move fields from + stmt_info: memtag, ptr_info, subvars, misalignment. Add new field + aligned_to. Add macros to access the new fields. + Update functions declarations. + * tree-flow.h (is_aliased_with): Declare. + * tree-loop-linear.c (linear_transform_loops): Call + compute_data_dependences_for_loop with correct parameters. + * tree-ssa-alias.c (is_aliased_with): New function. + * tree-vect-analyze.c (vect_get_ptr_offset): Remove. + (vect_analyze_offset_expr, vect_base_addr_differ_p): Likewise. + (vect_analyze_data_ref_dependence): Get ddr. Remove call to + vect_base_addr_differ_p, compute_subscript_distance and + build_classic_dist_vector. Add printings. Check absolute value of + distance. + (vect_analyze_data_ref_dependences): Go through ddrs instead of + data-refs. + (vect_compute_data_ref_alignment): Get the fields of data-ref instead of + stmt. Check aligned_to. Check if the base is aligned. Remove conversion + to bytes. Add printing. + (vect_compute_data_refs_alignment): Go through loads and stores in one + loop. + (vect_enhance_data_refs_alignment, vect_analyze_data_refs_alignment, + vect_analyze_data_ref_access): Likewise. + (vect_analyze_pointer_ref_access): Remove. + (vect_address_analysis, vect_object_analysis): Likewise. + (vect_analyze_data_refs): Call compute_data_dependences_for_loop to find + and analyze data-refs in the loop. + * tree-vect-transform.c (vect_create_addr_base_for_vector_ref): Get the + fields of data-ref instead of stmt. Add init to the offset from the + base. + (vect_create_data_ref_ptr): Get the fields of data-ref instead of stmt. + (vect_update_init_of_dr): Likewise. + (vect_update_inits_of_drs): Go through loads and stores in one loop. + * tree-vectorizer.c (new_stmt_vec_info): Remove initialization of + removed fields. + (new_loop_vec_info): Initialize new fields. + (destroy_loop_vec_info): Free new fields. + (vect_strip_conversion): Remove. + * tree-vectorizer.h (enum verbosity_levels): Add new verbosity level. + (struct _loop_vec_info): Unify data_ref_writes and data_ref_reads into + datarefs. Add new field ddrs. + Add macros for the new fields access. + (struct _stmt_vec_info): Remove: base_address, initial_offset, step, + base_aligned_p, misalignment, memtag, ptr_info and subvars. + Remove their macros. + * tree.h (highest_pow2_factor): Declare. + +2005-07-25 Jakub Jelinek + + * calls.c (store_one_arg): Check for sibling call MEM arguments + from already clobbered incoming argument area. + +2005-07-24 Kaveh R. Ghazi + + * c-common.c (check_missing_format_attribute): New. + * c-common.h (check_missing_format_attribute): Likewise. + * c-typeck.c (convert_for_assignment): Use it. + +2005-07-24 Andreas Schwab + + * config/m68k/m68k.md ("extendqidi2"): When source is an address + register use a word move. Correct operand of ext.w in 68000 code. + +2005-07-23 Mark Mitchell + + * dwarf2out.c (gen_variable_die): Treat un-emitted COMDAT + variables as declarations, rather than definitions. + +2005-07-24 Ira Rosen + + PR tree-optimization/22526 + * tree-vectorizer.c (slpeel_tree_peel_loop_to_edge): Match the type + of the zero node. + +2005-07-24 Francois-Xavier Coudert + + * builtins.def: Add DEF_EXT_C99RES_BUILTIN to define builtins + that C99 reserve for future use. Use it to define clog10, + clog10f and clog10l. + +2005-07-23 Kaveh R. Ghazi + + * Makefile.in (STRICT2_WARN): Add -Wmissing-format-attribute. + * configure.ac: Check for -Wmissing-format-attribute. + + * configure: Regenerate. + +2005-07-23 Richard Henderson + + PR tree-optimization/22623 + * tree-complex.c (set_component_ssa_name): Use replace_ssa_name_symbol. + +2005-07-23 Giovanni Bajo + + PR target/22577 + * config/pa/pa.c (reloc_needed): Updated for VECs inside CONSTRUCTOR. + +2005-07-23 Kaveh R. Ghazi + + * Makefile.in (C_TREE_H): Update dependencies. + * c-tree.h: Include toplev.h. + * diagnostic.h (diagnostic_set_info): Add format attribute. + * rtl-error.c (diagnostic_for_asm): Likewise. + +2005-07-23 Chao-ying Fu + + * config/mips/mips-dsp.md: New file. + * config/mips/mips-modes.def (V4QI, V2HI, CCDSP): New modes. + * config/mips/mips.c (mips_function_type): Add types for DSP builtin + functions. + (mips_builtin_type): Add MIPS_BUILTIN_DIRECT_NO_TARGET and + MIPS_BUILTIN_BPOSGE32. + (mips_expand_builtin_direct): Add one parameter to indicate that + builtin functions need to return a value. + (mips_expand_builtin_bposge): New for expanding "bposge" builtin + functions. + (mips_regno_to_class): Add classes for 12 new DSP registers. + (mips_subword): Change to check four HI registers. + (mips_output_move): Output move to and from 6 new DSP accumulators. + (override_options): Make sure -mdsp and -mips16 are not used together. + Map 'A' to DSP_ACC_REGS and 'a' to ACC_REGS. Enable DSP accumulators + for machine modes. + (mips_conditional_register_usage): Disable 6 new DSP accumulators + when !TARGET_DSP. + (print_operand): Add 'q' for printing DSP accumulators. + (mips_cannot_change_mode_class): Check ACC_REGS. + (mips_secondary_reload_class): Check ACC_REGS. + (mips_vector_mode_supported_p): Enable V2HI and V4QI when TARGET_DSP. + (mips_register_move_cost): Check ACC_REGS. + (CODE_FOR_mips_addq_ph, CODE_FOR_mips_addu_qb, CODE_FOR_mips_subq_ph) + (CODE_FOR_mips_subu_qb): New code-aliasing macros. + (DIRECT_NO_TARGET_BUILTIN, BPOSGE_BUILTIN): New macros. + (dsp_bdesc): New array. + (bdesc_arrays): Add DSP builtin function table. + (mips_prepare_builtin_arg): Check predicate again after + copy_to_mode_reg. + (mips_expand_builtin): Add one more parameter to + mips_expand_builtin_direct. Expand MIPS_BUILTIN_DIRECT_NO_TARGET and + MIPS_BUILTIN_BPOSGE32. + (mips_init_builtins): Initialize new function types. + (mips_expand_builtin_direct): Check if builtin functions need to + return a value and pass operands properly. + (mips_expand_builtin_bposge): New function. + * config/mips/mips.h (TARGET_CPU_CPP_BUILTINS): Add __mips_dsp. + (ASM_SPEC): Map -mdsp to -mdsp in GAS. + (FIRST_PSEUDO_REGISTER): Increase to 188. + (FIXED_REGISTERS, CALL_USED_REGISTERS, CALL_REALLY_USED_REGISTERS): + Update for 12 new DSP registers. + (DSP_ACC_REG_FIRST, DSP_ACC_REG_LAST, DSP_ACC_REG_NUM, AC1HI_REGNUM) + (AC1LO_REGNUM, AC2HI_REGNUM, AC2LO_REGNUM, AC3HI_REGNUM, AC3LO_REGNUM): + (DSP_ACC_REG_P, ACC_REG_P, ACC_HI_REG_P): New macros. + (reg_class): Add DSP_ACC_REGS and ACC_REGS. + (REG_CLASS_NAMES): Add names for DSP_ACC_REGS and ACC_REGS. + (REG_CLASS_CONTENTS): Update for DSP_ACC_REGS, ACC_REGS and ALL_REGS. + (REG_ALLOC_ORDER): Update for 12 new DSP registers. + (mips_char_to_class): Add 'A' for DSP_ACC_REGS and 'a' for ACC_REGS. + (UIMM6_OPERAND, IMM10_OPERAND): New macros. + (EXTRA_CONSTRAINT_Y): Add YA and YB extra constraints. + (REGISTER_NAMES): Add names for 12 new DSP registers. + * config/mips/mips.md: Include mips-dsp.md. + (UNSPEC_ADDQ, UNSPEC_ADDQ_S, UNSPEC_SUBQ, UNSPEC_SUBQ_S, UNSPEC_ADDSC) + (UNSPEC_ADDWC, UNSPEC_MODSUB, UNSPEC_RADDU_W_QB, UNSPEC_ABSQ_S) + (UNSPEC_PRECRQ_QB_PH, UNSPEC_PRECRQ_PH_W, UNSPEC_PRECRQ_RS_PH_W) + (UNSPEC_PRECRQU_S_QB_PH, UNSPEC_PRECEQ_W_PHL, UNSPEC_PRECEQ_W_PHR) + (UNSPEC_PRECEQU_PH_QBL, UNSPEC_PRECEQU_PH_QBR, UNSPEC_PRECEQU_PH_QBLA) + (UNSPEC_PRECEQU_PH_QBRA, UNSPEC_PRECEU_PH_QBL, UNSPEC_PRECEU_PH_QBR) + (UNSPEC_PRECEU_PH_QBLA, UNSPEC_PRECEU_PH_QBRA, UNSPEC_SHLL) + (UNSPEC_SHLL_S, UNSPEC_SHRL_QB, UNSPEC_SHRA_PH, UNSPEC_SHRA_R) + (UNSPEC_MULEU_S_PH_QBL, UNSPEC_MULEU_S_PH_QBR, UNSPEC_MULQ_RS_PH) + (UNSPEC_MULEQ_S_W_PHL, UNSPEC_MULEQ_S_W_PHR, UNSPEC_DPAU_H_QBL) + (UNSPEC_DPAU_H_QBR, UNSPEC_DPSU_H_QBL, UNSPEC_DPSU_H_QBR) + (UNSPEC_DPAQ_S_W_PH, UNSPEC_DPSQ_S_W_PH, UNSPEC_MULSAQ_S_W_PH) + (UNSPEC_DPAQ_SA_L_W, UNSPEC_DPSQ_SA_L_W, UNSPEC_MAQ_S_W_PHL) + (UNSPEC_MAQ_S_W_PHR, UNSPEC_MAQ_SA_W_PHL, UNSPEC_MAQ_SA_W_PHR) + (UNSPEC_BITREV, UNSPEC_INSV, UNSPEC_REPL_QB, UNSPEC_REPL_PH) + (UNSPEC_CMP_EQ, UNSPEC_CMP_LT, UNSPEC_CMP_LE, UNSPEC_CMPGU_EQ_QB) + (UNSPEC_CMPGU_LT_QB, UNSPEC_CMPGU_LE_QB, UNSPEC_PICK, UNSPEC_PACKRL_PH) + (UNSPEC_EXTR_W, UNSPEC_EXTR_R_W, UNSPEC_EXTR_RS_W, UNSPEC_EXTR_S_H) + (UNSPEC_EXTP, UNSPEC_EXTPDP, UNSPEC_SHILO, UNSPEC_MTHLIP, UNSPEC_WRDSP) + (UNSPEC_RDDSP): New constants. + (*movdi_32bit): Change 'x' to 'a' for ACC_REGS. + (*movsi_internal): Change 'x' to 'a' for ACC_REGS. Add an + A<-d alternative. + * config/mips/mips.opt (-mdsp): New option. + * config/mips/predicates.md (const_uimm6_operand, const_imm10_operand) + (reg_imm10_operand): New predicates. + * doc/extend.texi (MIPS DSP Built-in Functions): New section. + * doc/invoke.texi (-mdsp): Document new option. + +2005-07-22 DJ Delorie + + * c-objc-common.c (c_cannot_inline_tree_fn): Add warning control + to warning calls. + * tree-inline.c (inlinable_function_p): Likewise. + +2005-07-22 Mark Mitchell + + PR debug/21828 + * toplev.c (check_global_declarations): Do not mark undefined + variables as DECL_IGNORED_P. + * varasm.c (first_global_object_name): GTY it. + (weak_global_object_name): Likewise. + (notice_global_symbol): Use ggc_strdup, not xstrdup, when creating + a string to go into {weak,first}_global_object_name. + +2005-07-22 DJ Delorie + + * c-format.c (check_function_format): Change warning control + option from OPT_Wattribute to OPT_Wmissing_format_attribute. + +2005-07-22 Diego Novillo + + * tree-ssa-alias.c (count_ptr_derefs): Do not consider + &PTR->FLD a dereference of PTR. + * tree-ssa-structalias.c (update_alias_info): Consider &PTR->FLD + a potential dereference of PTR. + +2005-07-22 J"orn Rennecke + + PR rtl-optimization/20370 + * ifcvt.c (dead_or_predicable): Before calling propagate_block, + call allocate_reg_info if necessary. + + PR rtl-optimization/21848 + * calls.c (emit_library_call_value_1): For const functions, add + USEs of the stack slots to CALL_INSN_FUNCTION_USAGE. + + PR rtl-optimization/22445 + * cselib.c (target.h): Include. + (rtx_equal_for_cselib_p): Allow commutative matches. + (cselib_hash_rtx): Don't use MODE for CONST_INT hashing. + Remove MODE parameter. Changed all callers. + + PR rtl-optimization/22258 + * combine.c (likely_spilled_retval_1, likely_spilled_retval_p): + New functions. + (try_combine): Use likely_spilled_retval_p. + +2005-07-22 Paul Woegerer + + * config.gcc: Add crx-elf support. + + * doc/contrib.texi: Mention crx. + * doc/extend.texi: Document crx extensions. + * doc/install.texi: Document crx install. + * doc/invoke.texi: Document crx options. + * doc/md.texi: Document crx constraints. + + * config/crx/crx-protos.h: New file. + * config/crx/crx.c: New file. + * config/crx/crx.h: New file. + * config/crx/crx.md: New file. + * config/crx/crx.opt: New file. + * config/crx/t-crx: New file. + +2005-07-22 Manfred Hollstein + + * tree-ssa-structalias.c (merge_graph_nodes): Fix uninitialised + warnings. + (int_add_graph_edge): Likewise. + (collapse_nodes): Likewise. + (process_unification_queue): Likewise. + +2005-07-22 Richard Kenner + Laurent GUERBY + + PR tree-optimization/22336 + * function.c (record_block_change): Check for + cfun->ib_boundaries_block. + +2005-07-21 James A. Morrison + + * fold-const.c (fold_unary): Don't strip signed nops from ABS_EXPRs. + (tree_expr_nonnegative_p): Return try for TYPE_UNSIGNED. + +2005-07-21 DJ Delorie + + * toplev.c (warn_deprecated_use): Add warning control to warning + call. + * c-typeck.c (parser_build_binary_op): Likewise. + (c_finish_if_stmt): Likewise. + * c-common.c (check_function_sentinel): Likewise. + (check_nonnull_arg): Likewise. + +2005-07-21 Richard Henderson + + PR tree-opt/22504 + * tree-complex.c (complex_ssa_name_components): New. + (cvc_lookup): Allow entry not found. + (create_components): Remove. + (create_one_component_var, get_component_var): New. + (get_component_ssa_name, set_component_ssa_name): New. + (extract_component): Use get_component_ssa_name. + (update_complex_components): Use set_component_ssa_name. + (update_complex_components_on_edge): Likewise. + (update_phi_components): Create new PHI nodes directly, instead + of adding insns to edges. + (tree_lower_complex): Allocate and free complex_variable_components + and complex_ssa_name_components here. + +2005-07-20 Daniel Berlin + + * alias.c (nonoverlapping_component_refs_p): Use TYPE_MAIN_VARIANT, + revert to returning false. + +2005-07-21 Uros Bizjak + + PR target/21149 + * config/i386/i386.md (sse_movhlps): Fix vec_select values. + +2005-07-21 Uros Bizjak + + PR target/22576 + * config/i386/i386.md (cmpxf): Change operand constraints + to "nonmemory_operand". + +2005-07-21 Andrew Pinski + + * config/i386/i386.md (trap): Use "".word/t0x0b0f" instead of ud2. + +2005-07-21 Andrew Pinski + + PR middle-end/21180 + * fold-const.c (fold_build1): Add checksum for the operands. + (fold_build2): Likewise. + (fold_build3): Likewise. + +2005-07-21 Andrew Pinski + + PR middle-end/19055 + * fold-const.c (fold_binary): Transform "(X | Y) ^ X" to "Y & ~ X". + +2005-07-21 Paolo Bonzini + + * common.opt (-fforward-propagate): Committed by mistake, + removed. + +2005-07-21 Volker Reichelt + + * reg-stack.c: Fix comment typo(s). + * tree-ssa-operands.c: Likewise. + * tree-vectorizer: Likewise. + +2005-07-21 Nick Clifton + + * config/sh/symbian.c: Replace C++ style line comments with C + style line comments. + (symbian_add_attribute): Do not use a ? operator on the LHS of + an assignment. + (sh_symbian_handle_dll_attribute): Change the type of the + method vector to "VEC(tree,gc)*" and use vector accessor + macros to walk over the elements. + (symbian_export_vtable_and_rtti_p): Likewise. + (symbian_class_needs_attribute_p): Likewise. + +2005-07-21 Paolo Bonzini + + PR target/22085 + * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not + initialize targetm.resolve_overloaded_builtin here. + (altivec_expand_overloaded_builtin): Make it non-static. + * config/rs6000/rs6000-protos.h + (altivec_expand_overloaded_builtin): New prototype. + * config/rs6000/rs6000.h (REGISTER_TARGET_PRAGMAS): Initialize + targetm.resolve_overloaded_builtin here. + * config/rs6000/darwin.h (REGISTER_TARGET_PRAGMAS): Likewise. + +2005-07-21 Paolo Bonzini + Zdenek Dvorak + + PR tree-optimization/19210 + * common.opt (Wunsafe-loop-optimizations, funsafe-loop-optimizations): + New. + * Makefile.in (tree-ssa-loop-niter.o): Depend intl.o. + * loop-iv.c (get_simple_loop_desc): If -funsafe-loop-optimizations, + rely on unproven assumptions. + * predict.c (predict_loops): Adjust call to number_of_iterations_exit. + * tree-flow.h (number_of_iterations_exit): Add final parameter. + * tree-scalar-evolution.c (number_of_iterations_in_loop): Adjust call + to number_of_iterations_exit. + * tree-ssa-loop-ivcanon.c (empty_loop_p): Likewise. + * tree-ssa-loop-ivopts.c (niter_for_exit): Likewise. + * tree-ssa-loop-niter.c (find_loop_niter, + estimate_numbers_of_iterations_loop): Likewise. + (number_of_iterations_exit): Honor the new options. + * doc/invoke.texi (Wunsafe-loop-optimizations, + funsafe-loop-optimizations): Document them. + +2005-07-21 Richard Sandiford + + PR rtl-optimization/22167 + * gcse.c (hoist_code): Fix hoist_exprs[] check. + +2005-07-20 Adam Nemet + + * config/rs6000/lynx.h: Mark __do_global_ctors_aux and + __do_global_dtors_aux longcall. + +2005-07-20 Kazu Hirata + + * gensupport.c (old_preds): Don't reference PREDICATE_CODES. + (old_special_pred_table): Don't reference + SPECIAL_MODE_PREDICATES. + * system.h (PREDICATE_CODES, SPECIAL_MODE_PREDICATES): Poison. + * config/arc/arc.h: Don't mention PREDICATE_CODES. + * config/sh/predicates.h: Don't mention + SPECIAL_MODE_PREDICATES. + * doc/tm.texi (PREDICATE_CODES, SPECIAL_MODE_PREDICATES): + Remove. + +2005-07-20 DJ Delorie + + * config.gcc: Add m32c-elf support. + + * doc/contrib.texi: Mention m32c. + * doc/extend.texi: Document m32c extensions. + * doc/install.texi: Mention m32c. + * doc/invoke.texi: Document m32c options. + * doc/md.texi: Document m32c constraints. + + * config/m32c/addsub.md: New file. + * config/m32c/bitops.md: New file. + * config/m32c/cond.md: New file. + * config/m32c/jump.md: New file. + * config/m32c/m32c-lib1.S: New file. + * config/m32c/m32c-lib2.c: New file. + * config/m32c/m32c-modes.def: New file. + * config/m32c/m32c-pragma.c: New file. + * config/m32c/m32c-protos.h: New file. + * config/m32c/m32c.abi: New file. + * config/m32c/m32c.c: New file. + * config/m32c/m32c.h: New file. + * config/m32c/m32c.md: New file. + * config/m32c/m32c.opt: New file. + * config/m32c/minmax.md: New file. + * config/m32c/mov.md: New file. + * config/m32c/muldiv.md: New file. + * config/m32c/predicates.md: New file. + * config/m32c/prologue.md: New file. + * config/m32c/shift.md: New file. + * config/m32c/t-m32c: New file. + +2005-07-20 Kaz Kojima + + * config/sh/sh.md (UNSPEC_SP_SET, UNSPEC_SP_TEST): New constants. + (stack_protect_set, stack_protect_test): New expanders. + (stack_protect_set_si, stack_protect_set_si_media, + stack_protect_set_di_media, stack_protect_test_si, + stack_protect_test_si_media, stack_protect_test_di_media): + New insns. + +2005-07-20 Andrew Pinski + + * c-typeck.c (output_init_element): Don't copy the INTEGER_CST. + +2005-07-20 James A. Morrison + + * tree.h (tree_expr_nonzero_p): Export. + * fold-const.c (tree_expr_nonzero_p): Likewise. + Return true for CALL_EXPRs that are alloca calls. + (fold_binary): Use omit_one_operand when checking EQ_EXPRs or NE_EXPRs + against zero. + * tree-flow.h (expr_computes_nonzero): Remove. + * tree-vrp.c (expr_computes_nonzero): Remove. + (vrp_expr_computes_nonzero): Use tree_expr_nonzero_p. + (extract_range_from_unary_expr): Likewise. + * tree-ssa-dom.c (record_equivalences_from_stmt): Use + tree_expr_nonzero_p. + +2005-07-20 Bernd Schmidt + + * config/bfin/bfin-protos.h (legitimize_pic_address): Don't declare. + * config/bfin/bfin.c (legitimize_pic_address): Now static. Take + extra arg "picreg" and use it instead of pic_offset_table_rtx. + All callers changed. + (frame_related_constant_load): New arg "related" which controls + setting of RTX_FRAME_RELATED_P. All callers changed. + (bfin_load_pic_reg): New function, broken out of bfin_expand_prologue. + (bfin_expand_prologue): Add stack limit checking. + * config/bfin/bfin.md (trapifcc): New pattern. + + * config/bfin/bfin.c: Include "langhooks.h". + (def_builtin): Go through lang_hooks to call builtin_function. + + * config/bfin/bfin-protos.h (bfin_longcall_p): Declare. + * config/bfin/predicates.md (symbol_ref_operand): New. + (call_insn_operand): Delete. All callers changed to use + register_no_elim_operand. + * config/bfin/bfin.c (init_cumulative_args): Initialize the new + call_cookie field. + (function_arg): Use it to generate the call's operand 2. + (bfin_longcall_p): New function. + (bfin_expand_call): Extra arg "cookie". All callers and declaration + changed. Emit extra USE in the pattern. Use bfin_longcall_p to + determine if the address needs to be in a REG. + (bfin_handle_longcall_attribute): New function. + (bfin_attribute_table): Add "longcall" and "shortcall". + * config/bfin/bfin.h (CALL_NORMAL, CALL_LONG, CALL_SHORT): New macros. + (CUMULATIVE_ARGS): New member call_cookie. + (PREDICATE_CODES): Add symbol_ref_operand. + * config/bfin/bfin.md (call, call_value, sibcall, sibcall_value): Add + extra USE to the pattern. + (call_symbol, sibcall_symbol, call_value_symbol, sibcall_value_symbol): + New patterns, split off call_insn, sibcall_insn, call_value_insn and + sibcall_value_insn; now the new patterns handle direct calls and the + old ones indirect calls. + * doc/extend.texi: Mention Blackfin in longcall/shortcall docs. + +2005-07-20 Zdenek Dvorak + + * doc/trouble.texi: Update section on handling of empty loops. + +2005-07-20 Kazu Hirata + + * config.gcc: Remove support for sparc-*-openbsd*, + i860-*-sysv4*, ip2k-*-elf, ns32k-*-netbsdelf*, + ns32k-*-netbsd*. + * config.host: Remove support for i860-*-sysv4* as a host. + * config/i860/*, config/ip2k/*, config/ns32k/*, + config/sparc/openbsd.h, config/sparc/t-openbsd: Remove. + * doc/install.texi, doc/invoke.texi, doc/md.texi: Don't + mention obsolete ports. + +2005-07-20 Kaz Kojima + + * config/sh/sh.c (regno_reg_class): Add GENERAL_REGS for + soft frame pointer. + (sh_expand_prologue): Use hard_frame_pointer_rtx instead + of frame_pointer_rtx. + (sh_expand_epilogue): Likewise. + (sh_set_return_address): Likewise. + (initial_elimination_offset): Use HARD_FRAME_POINTER_REGNUM + instead of FRAME_POINTER_REGNUM if needed. Add elimination + offsets from FRAME_POINTER_REGNUM. + * config/sh/sh.h (SH_REGISTER_NAMES_INITIALIZER): Add sfp. + (sh_register_names): Add initializer for sfp. + (GENERAL_OR_AP_REGISTER_P): Permit FRAME_POINTER_REGNUM. + (VALID_REGISTER_P): Likewise. + (FIRST_PSEUDO_REGISTER): Update. + (DWARF_FRAME_REGISTERS): Define. + (FIXED_REGISTERS, CALL_USED_REGISTERS): Add sfp. + (HARD_FRAME_POINTER_REGNUM): Define. + (FRAME_POINTER_REGNUM): Redefine. + (ELIMINABLE_REGS): Never eliminate to FRAME_POINTER_REGNUM, + but HARD_FRAME_POINTER_REGNUM instead. Add eliminations + from FRAME_POINTER_REGNUM. + (CAN_ELIMINATE): Use HARD_FRAME_POINTER_REGNUM instead of + FRAME_POINTER_REGNUM. + (REG_CLASS_CONTENTS): Add sfp. + (REG_ALLOC_ORDER): Likewise. + (FRAME_GROWS_DOWNWARD): Set to 1. Update comment. + (GO_IF_LEGITIMATE_ADDRESS): Use hard_frame_pointer_rtx instead + of frame_pointer_rtx. + (LEGITIMIZE_RELOAD_ADDRESS): Likewise. + +2005-07-19 James A. Morrison + + * fold-const.c (tree_expr_nonnegative_p): Only return true for + ABS_EXPR when flag_wrapv is false because of INT_MIN. + (tree_expr_nonzero_p): Always call tree_expr_nonzero_p on the argument + of an ABS_EXPR. + (fold_unary): Always fold ABS_EXPR> into + ABS_EXPR. + +2005-07-20 Giovanni Bajo + + Make CONSTRUCTOR use VEC to store initializers. + * c-common.c (complete_array_type): Update to cope with VEC in + CONSTRUCTOR_ELTS. + * c-pretty-print.c (pp_c_initializer_list): Use pp_c_constructor_elts. + (pp_c_constructor_elts): New function. + * c-pretty-print.h (pp_c_constructor_elts): Declare. + * c-typeck.c (build_function_call, build_c_cast, digest_init, + struct constructor_stack, struct initializer_stack, + constructor_elements, push_init_level, pop_init_level, + add_pending_init, find_init_member, output_init_element): Update to + cope with VEC in CONSTRUCTOR_ELTS. + * coverage.c (build_fn_info_value, build_ctr_info_value, + build_gcov_info): Likewise. + * expr.c (categorize_ctor_elements_1, store_constructor, + expand_expr_real_1): Likewise. + * fold-const.c (fold_ternary): Likewise. + * gimplify.c (gimplify_init_ctor_preeval, zero_sized_field_decl, + gimplify_init_constructor, gimplify_expr): Likewise. + * tree-dump.c (dequeue_and_dump): Likewise. + * tree-inline.c (copy_tree_r): Add code to duplicate a CONSTRUCTOR + node. + * tree-pretty-print.c (dump_generic_node): Update to cope with VEC in + CONSTRUCTOR_ELTS. + * tree-sra.c (generate_element_init_1): Likewise. + * tree-ssa-ccp.c (fold_const_aggregate_ref): Likewise. + * tree-ssa-operands.c (get_expr_operands): Likewise. + * tree-vect-generic.c (expand_vector_piecewise): Likewise. + * tree-vect-transform.c (vect_get_vec_def_for_operand): + (get_initial_def_for_reduction): Likewise. + * tree-vn.c (set_value_handle, get_value_handle): CONSTURCTOR uses + value handle in annotations. + * tree.c (tree_node_kind, tree_code_size, make_node_stat, + tree_node_structure): Add support for constr_kind. + (build_vector_from_ctor, build_constructor_single, + build_constructor_from_list): New functions. + (build_constructor): Update to take a VEC instead of a TREE_LIST. + (simple_cst_equal, iterative_hash_expr, initializer_zerop, walk_tree): + Update to cope with VEC in CONSTRUCTOR_ELTS. + * tree.def (CONSTRUCTOR): Make it a tcc_exceptional node. + * tree.h (FOR_EACH_CONSTRUCTOR_VALUE, FOR_EACH_CONSTRUCTOR_ELT, + CONSTRUCTOR_APPEND_ELT): New macros. + (struct constructor_elt, struct tree_constructor): New data types. + (union tree_node): Add tree_constructor field. + * treestruct.def: Define TS_CONSTRUCTOR. + * varasm.c (const_hash_1, compare_constant, copy_constant, + compute_reloc_for_constant, output_addressed_constants, + initializer_constant_valid_p, output_constant, + array_size_for_constructor, output_constructor): Update to cope with + VEC in CONSTRUCTOR_ELTS. + * vec.h (VEC_empty, VEC_copy): New macros. + +2005-07-19 Devang Patel + + * dbxout.c (dbxout_type): Check Objective-C++ lang. + +2005-07-19 Richard Henderson + + PR tree-opt/22278 + * gimplify.c (gimplify_expr): Use main variant type for the temp + destination for a discarded volatile read. + * tree-ssa.c (tree_ssa_useless_type_conversion_1): Don't elide + casts between non-void types that change volatility. + +2005-07-15 DJ Delorie + + * toplev.h: Add comment about the first parameter for warning(). + * errors.h: Likewise. + + * c.opt (Wpragmas): New. + * doc/invoke.texi: Document it. + + * function.c (do_warn_unused_parameter): Add warning control to + warning call. + * c-decl.c (warn_if_shadowing): Likewise. + * c-lex.c (cb_def_pragma): Likewise. + * c-pragma.c (GCC_BAD, GCC_BAD2): Likewise. + (pop_alignment): Likewise. + (handle_pragma_pack): Likewise. + (apply_pragma_weak): Likewise. + (handle_pragma_weak): Likewise. + (handle_pragma_redefine_extname): Likewise. + (add_to_renaming_pragma_list): Likewise. + (handle_pragma_extern_prefix): Likewise. + (maybe_apply_renaming_pragma): Likewise. + (handle_pragma_visibility): Likewise. + + * config/c4x/c4x-c.c (BAD): Likewise. + (c4x_parse_pragma): Likewise. + * config/ia64/ia64-c.c (ia64_hpux_handle_builtin_pragma): Likewise. + * config/rs6000/rs6000-c.c (SYNTAX_ERROR): Likewise. + (rs6000_pragma_longcall): Likewise. + * config/v850/v850-c.c (pop_data_area): Likewise. + (ghs_pragma_section): Likewise. + (ghs_pragma_section): Likewise. + (ghs_pragma_interrupt): Likewise. + (ghs_pragma_starttda): Likewise. + (ghs_pragma_startsda): Likewise. + (ghs_pragma_startzda): Likewise. + (ghs_pragma_endtda): Likewise. + (ghs_pragma_endsda): Likewise. + (ghs_pragma_endzda): Likewise. + +2005-07-19 Danny Berlin + Kenneth Zadeck + + * Makefile.in: Removed tree-promote-statics.c + * tree-promote-statics.c: Removed. + * common.opt: Removed flag-promote-statics. + * opts.c: Ditto. + * passes.c: Removed tree-promote-statics pass. + * tree-pass.h: Ditto. + * timevar.def: Removed TV_PROMOTE_STATICS. + + +2005-07-19 Gerald Pfeifer + + * config.gcc: Add support for *-*-freebsd7, *-*-freebsd8, + and *-*-freebsd9. + * config/freebsd-spec.h (FBSD_TARGET_OS_CPP_BUILTINS): Ditto. + +2005-07-19 Kaveh R. Ghazi + + PR c/22476 + * c-common.c (check_function_arguments): Call + 'check_function_format' if either -Wformat or + -Wmissing-format-attribute are specified. + * c-format.c (check_function_format): Check -Wformat before + calling 'check_format_info'. + * c-opts.c (c_common_post_options): Don't warn for + -Wmissing-format-attribute without -Wformat. + * c-typeck.c (convert_for_assignment): Detect additional cases for + -Wmissing-format-attribute. + * doc/invoke.texi (-Wmissing-format-attribute): Document new + behavior. + +2005-07-19 Richard Guenther + + * config/i386/i386.md (lrint2): Use temporary + instead of clobbering non-existent memory. + +2005-07-19 Nick Clifton + + * config/avr/avr.c (legitimate_address_p): Fix debugging print + statement to avoid displaying ASCII control characters. + +2005-07-19 Ben Elliston + + * bt-load.c (link_btr_uses): Fix uninitialised warnings. + * cfganal.c (find_edge_index): Ditto. + * combine.c (combine_instructions): Ditto. + * ddg.c (create_scc): Ditto. + (find_successors): Ditto. + (find_predecessors): Ditto. + (find_nodes_on_paths): Ditto. + (longest_simple_path): Ditto. + * flow.c (update_life_info): Ditto. + (count_or_remove_death_notes): Ditto. + (clear_log_links): Ditto. + * modulo-sched.c (generate_reg_moves): Ditto. + (find_max_asap): Ditto. + (find_max_hv_min_mob): Ditto. + (find_max_dv_min_mob): Ditto. + * sbitmap.c (sbitmap_first_set_bit): Ditto. + * sched-rgn.c (extract_edgelst): Ditto. + * tree-into-ssa.c (prepare_names_to_update): Ditto. + (dump_update_ssa): Ditto. + (ssa_names_to_replace) Ditto. + (switch_virtuals_to_full_rewrite): Ditto. + (update_ssa): Ditto. + * tree-vect-transform.c (vect_create_epilog_for_reduction): Ditto. + +2005-07-18 Daniel Berlin + + Fix PR tree-optimization/22483 + + * tree-complex.c (create_components): Use + safe_referenced_var_iterator and FOR_EACH_REFERENCED_VAR_SAFE. + * tree-flow-inline.h (fill_referenced_var_vec): New function. + * tree-flow.h (safe_referenced_var_iterator): New structure. + (FOR_EACH_REFERENCED_VAR_SAFE): New macro. + * tree-ssa-alias.c (setup_pointers_and_addressables): Use + safe_referenced_var iterator. + (add_type_alias): Ditto. + +2005-07-19 Steven Bosscher + + * loop-init.c (rest_of_handle_loop2): Remove. + (rtl_loop_init, rtl_loop_done, rtl_move_loop_invariants, + rtl_unswitch, rtl_unroll_and_peel_loops, rtl_doloop): New functions. + (pass_rtl_loop_init, pass_rtl_loop_done, + pass_rtl_move_loop_invariants, pass_rtl_unswitch, + pass_rtl_unroll_and_peel_loops, pass_rtl_doloop): New passes. + * tree-ssa-loop.c (pass_loop, pass_loop_init, pass_loop_done, + pass_unswitch): Rename to pass_tree_loop, pass_tree_loop_init, + pass_tree_loop_done, and pass_tree_unswitch. + (gate_loop): Rename to gate_tree_loop. + * passes.c (init_optimization_passes): Update for renamed tree + loop passes. Add the new loop2 passes as subpasses of loop2. + * tree-pass.h: Add extern declarations for the new loop2 subpasses. + Update for the renamed tree loop passes. + +2005-07-18 Ian Lance Taylor + + PR middle-end/22057 + * tree-cfgcleanup.c (cleanup_tree_cfg): Only remove forwarder + blocks when optimizing. + +2005-07-18 Steve Ellcey + + * common.opt (frename-registers): Initialize to 2. + (fweb): Ditto. + (fgcse-after-reload): Ditto. + * toplev.c (AUTODETECT_FLAG_VAR_TRACKING): Rename to AUTODETECT_VALUE. + (process_options): Only change flag_web, flag_rename_registers, + and flag_rerun_cse_after_loop if not explicitly set by user. + +2005-07-18 Jan Beulich + + * config/i386/i386.c (ix86_expand_branch, ix86_expand_setcc, + ix86_expand_carry_flag_compare, ix86_expand_int_movcc): Handle TImode + in 64-bit mode the same as DImode in 32-bit mode. + (ix86_expand_ashl_const, ix86_split_ashl, ix86_split_ashr, + ix86_split_lshr): Likewise. Rename to no longer refer to a specific + mode. Add new mode parameter. + * config/i386/i386.h (CONST_OK_FOR_LETTER_P): Describe and handle 'O'. + * config/i386/i386.md (cmpti, addti3, subti3, negti2, ashlti3, ashrti3, + x86_64_shift_adj): New expanders. + (*addti3_1, *subti3_1, *negti2_1, ashlti3_1, *ashlti3_2, ashrti3_1, + *ashrti3_2, lshrti3_1, *lshrti3_2, x86_64_shld, x86_64_shrd): New + insns. + Respective new splitters. Use renamed shift splitter helpers in 32-bit + DImode shift splitters. + * config/i386/i386-protos.h (ix86_split_ashl, ix86_split_ashr, + ix86_split_lshr): Renamed from ix86_split_[al]sh[rl]di. Added new + mode parameter. + +2005-07-18 Jan Beulich + + * i386.md (movdi_extzv_1): New. + (zero_extendhidi2): Combine alternatives and never force use of + REX64 prefix. + (zero_extendqidi2): Likewise. Don't restrict input selection. + +2005-07-17 Daniel Berlin + + Fix PR tree-optimization/22531 + * tree-ssa-pre.c (do_eustores): Make sure LHS is a decl for the + moment. + +2005-07-17 Daniel Berlin + + * tree-promote-statics.c (pass_promote_statics): Change dump file + name. + +2005-07-17 Daniel Berlin + + * tree-optimize.c (init_tree_optimization_passes): Add + pass_eliminate_useless_stores pass. + * tree-pass.h (pass_eliminate_useless_stores): New pass structure. + * tree-ssa-pre.c (is_copy_stmt): New function. + (follow_copies_till_vuse): Ditto. + (do_eustores): Ditto. + (gate_eustores): Ditto. + +2005-07-16 Richard Henderson + + * gcc.c (MFWRAP_SPEC): Don't wrap pthread_join or pthread_exit. + +2005-07-16 Danny Berlin + Kenneth Zadeck + + * Makefile.in: Added rules for ipa-pure-const.c, ipa-reference.c, + ipa-reference.h, ipa-utils.c, ipa-utils.h, ipa-type-escape.c, + ipa-type-escape.h, tree-promote-statics.c + * ipa-pure-const.c, ipa-reference.c, ipa-reference.h, ipa-utils.c, + ipa-utils.h, ipa-type-escape.c, ipa-type-escape.h, + tree-promote-statics.c: new files. + * alias.c: (nonlocal_mentioned_p_1, nonlocal_mentioned_p, + nonlocal_referenced_p_1, nonlocal_referenced_p, nonlocal_set_p_1, + int nonlocal_set_p, mark_constant_function): Deleted. + (rest_of_handle_cfg): Removed call to mark_constant_function. + (nonoverlapping_component_refs_p): Added calls to support + type based aliasing. + * tree-ssa-alias.c (may_alias_p, + compute_flow_insensitive_aliasing): Ditto. + * calls.c (flags_from_decl_or_type): Removed reference to + cgraph_rtl_info. + * c-typeck.c (convert_arguments): Make builtins tolerant of having + too many arguments. This is necessary for Spec 2000. + * cgraph.h (const_function, pure_function): Removed. + * common.opt: Added "fipa-pure-const", "fipa-reference", + "fipa-type-escape", and "ftree-promote-static". + * opts.c: Ditto. + * passes.c: Added ipa and tree-promote-statics passes. + * timevar.def: Added TV_IPA_PURE_CONST, TV_IPA_REFERENCE, + TV_IPA_TYPE_ESCAPE, and TV_PROMOTE_STATICS. + * tree-dfa.c (referenced_var_lookup_if_exists): New function. + * tree-flow.h: Added exposed sra calls and addition of + reference_vars_info field for FUNCTION_DECLS. + * tree-pass.h: Added passes. + * tree-sra.c: (sra_init_cache): New function. + (sra_insert_before, sra_insert_after) Made public. + (type_can_be_decomposed_p): Renamed from type_can_be_decomposed_p + and made public. + * tree-ssa-alias.c (dump_alias_stats): Added stats for type based + aliasing. (may_alias_p): Added code to use type escape analysis to + improve alias sets. + * tree-ssa-operands.c (add_call_clobber_ops): Added parameter and + code to prune clobbers of static variables based on information + produced in ipa-reference pass. Changed call clobbering so that + statics are not marked as clobbered if the call does not clobber + them. + +2005-07-16 Daniel Berlin + + * tree-ssa-structalias.c (need_to_solve): Need to check for preds, + too. + +2005-07-16 Eric Botcazou + + * doc/install.texi (*-*-solaris2*): Document recommended version + of GNU binutils and mention GNU linker problem on Solaris 10. + +2005-07-16 Joseph S. Myers + + PR c/22421 + * c-decl.c (c_build_bitfield_integer_type): New function. + (finish_struct): Call it. + * c-pretty-print.c (pp_c_type_specifier): Handle bit-field types. + +2005-07-16 Kaveh R. Ghazi + + * c-typeck.c (digest_init): Call 'convert_for_assignment' + before returning. + +2005-07-16 Jan Hubicka + + * cfg.c (update_bb_profile_for_threading): Fix profile updating. + (scale_bbs_frequencies_int): Watch roundoff errors. + * predict.c (return_prediction): Initialize return_stmt. + +2005-07-16 Jan Hubicka + + * profile.c (rest_of_handle_branch_prob): Fix handling of estimation + after RTL profiling. + +2005-07-11 Andrew Pinski + + PR middle-end/22398 + * fold-const.c (build_range_check): Convert high/low to etype + if we are only comparing against exp. + +2005-07-13 Daniel Berlin + + Fix PR tree-optimization/22376 + * tree-ssa-structalias.c (build_constraint_graph): We really meant + special var here. + (need_to_solve): New function. + (compute_points_to_sets): Use it. + +2005-07-15 Jan Hubicka + + * cfg.c (update_bb_profile_for_threading): More diagnostic. + * tree-ssa-threadupdate.c (redirect_edges): Update profile of dup_block. + +2005-07-15 Richard Guenther + + * c-common.c (handle_flatten_attribute): New function. + Add flatten function attribute. + * doc/extend.texi: Document flatten function attribute. + * Makefile.in (ipa-inline.o): Depend on hashtab.h. + * ipa-inline.c (cgraph_find_cycles, cgraph_flatten_node): + New functions. + (cgraph_decide_inlining): Handle functions with flatten + attribute. + +2005-07-14 David Edelsohn + + * config/rs6000/rs6000.md (UNSPEC_SYNC, UNSPEC_LWSYNC, + UNSPEC_ISYNC, UNSPEC_SYNC_OP, UNSPEC_ATOMIC, UNSPEC_CMPXCHG, + UNSPEC_XCHG, UNSPEC_AND): New. + (UNSPECV_ATOMIC, UNSPECV_SYNC, UNSPECV_SYNC_OP, UNSPECV_CMPXCHG, + UNSPECV_LWSYNC, UNSPECV_ISYNC): Delete. + * config/rs6000/sync.md (FETCHOP): New code macro. + (fetchop_name, fetchop_pred, fetchopsi_constr, fetchopdi_constr): + New code attrs. + (memory_barrier, sync_internal): Use unspec instead of unspec_volatile. + (sync_compare_and_swap): Same. + (sync_lock_test_and_set): Same. + (sync_, sync_nand): Only use rs6000_emit_sync + for QImode and HImode, and not PPC405. + (sync_old_, sync_old_nand): Same. + (sync_new_, sync_new_nand): Same. + (sync_{si,di}_internal): New. + (sync_nand{si,di}_internal): New. + (sync_old_{si,di}_internal): New. + (sync_old_nand{si,di}_internal): New + (sync_new_{si,di}_internal): New. + (sync_new_nand{si,di}_internal): New. + (atomic_and{si,di}): New. + (sync_new_nand{si,di}_internal): New. + (atomic_and{si,di}): New. + (sync_add_internal): Delete. + (sync_addshort_internal): Use unspec instead of unspec_volatile. + (sync_sub_internal): Delte. + (sync_subshort_internal): New. + (sync_andsi_internal): Use unspec instead of unspec_volatile. + (sync_anddi_internal): Delete. + (sync_boolsi_internal): Use unspec instead of unspec_volatile. + (sync_booldi_internal): Delete. + (sync_boolc_internal): Delete. + (sync_boolcshort_internal): Use unspec instead of unspec_volatile. + (sync_boolc_internal2): Delete. + (sync_boolcc_internal): Delete. + (isync, lwsync): Use unspec instead of unspec_volatile. + * config/rs6000/rs6000.c (rs6000_emit_sync): Implement MINUS. + Revert UNSPEC_VOLATILE. + (rs6000_split_atomic_op): New. + * config/rs6000/rs6000-protos.h (rs6000_split_atomic_op): Declare. + +2005-07-14 Eric Christopher + + * config/mips/mips.c (mips_canonicalize_comparison): Cast + argument of trunc_int_for_mode to unsigned HOST_WIDE_INT. + +2005-07-14 Eric Christopher + + * config/s390/t-tpf (SHLIB_MAPFILES): Remove. + +2005-07-14 Steven Bosscher + + PR tree-optimization/22230 + * tree-vrp.c (extract_range_from_binary_expr): Fix logics thinko in + the computation of the four cross productions for "range op range". + +2005-07-14 Alexandre Oliva + Ulrich Weigand + + PR target/20126 + * loop.c (loop_givs_rescan): Do not ICE if unable to reduce an IV + in some insn. + +2005-07-14 Ulrich Weigand + + * config/s390/s390.h (TARGET_TPF_PROFILING): Add default definition. + +2005-07-14 Steve Ellcey + + * config/ia64/ia64.c (ia64_output_dwarf_dtprel): Support ILP32 mode. + +2005-07-14 Richard Guenther + + PR middle-end/22347 + * config/i386/i386-protos.h (ix86_function_value): Change + prototype to match new target hook. + * config/i386/i386.c (ix86_value_regno): Change prototype + to take extra type argument. + (TARGET_FUNCTION_VALUE): Define. + (ix86_function_ok_for_sibcall): Pass extra argument to + ix86_value_regno, check return slot rtx for exact match. + (ix86_function_value): Take extra parameter. Dispatch to + ix86_value_regno with fndecl/fntype as provided. + (ix86_value_regno): Handle extra type argument. + * config/i386/i386.h (FUNCTION_VALUE): No longer define. + + * testsuite/gcc.target/i386/sseregparm-3.c: New testcase. + * testsuite/gcc.target/i386/sseregparm-4.c: New testcase. + * testsuite/gcc.target/i386/sseregparm-5.c: New testcase. + * testsuite/gcc.target/i386/sseregparm-6.c: New testcase. + * testsuite/gcc.target/i386/sseregparm-7.c: New testcase. + +2005-07-14 Richard Guenther + + * Makefile.in (explow.o, reg-stack.o): Depend on target.h. + * calls.c (expand_call): Pass fntype to hard_function_value. + (emit_library_call_value_1): Likewise. + * explow.c: Include target.h. + (hard_function_value): Take extra argument, the fntype. + Use new target hook for function_value. + * expr.h (hard_function_value): Change prototype. + * function.c (aggregate_value_p): Pass 0 as fntype to + hard_function_value. + (assign_parms): Use new target hook for function_value. + Pass 0 as fntype to hard_function_value. + (expand_function_end): Likewise. + * reg-stack.c: Include target.h. + (stack_result): Use new target hook for function_value. + * target-def.h: New target hook function_value. + * target.h: Likewise. + * targhooks.c (default_function_value): New function. + * targhooks.h (default_function_value): Declare. + +2005-07-13 Ian Lance Taylor + + * config/mips/mips.h (CLZ_DEFINED_VALUE_AT_ZERO): Define. + +2005-07-14 Jan Hubicka + + * tree-dfa.c (dump_variable): Use default_def function. + * tree-ssa-alias.c (dump_points_to_info): Likewise. + * tree-ssa.c (verify_use): Likewise. + * tree-ssanames.c (release_ssa_name): Likewise. + * tree-tailcall.c (eliminate_tail_call): Likewise. + (tree_optimize_tail_calls_1): Likewise. + * tree-vrp.c (get_value_range): Likewise. + +2005-07-14 Ben Elliston + + * gcc.c (main): Compare language[0] with '*' when iterating over + the infiles. + +2005-07-13 Adrian Strae½tling + + * config/s390/s390.c: (s390_cc_modes_compatible): Move before + "s390_emit_compare". Add handling of CCZ1mode. + (s390_canonicalize_comparison): Simplify cascaded EQ, NE. + (390_emit_compare): Use "s390_cc_modes_compatible" for mode + checking. + (s390_branch_condition_mask): Add CCZ1mode handling. + * config/s390/s390.md: ("seq", "*seq"): New pattern. + ("sync_compare_and_swap_cc", "*sync_compare_and_swap_cc"): + Use CCZ1mode instead of CCZmode. + * config/s390/s390-modes.def: Add CCZ1mode. Comment new mode. + +2006-07-13 Adrian Strae½tling + + * config/s390/s390.md: ("cmpstrsi", "*cmpstr"): New + pattern. + ("strlen", "*strlen"): Use hard reg 0 in SImode. + +2005-07-13 Eric Christopher + + * config/mips/mips.c (mips_canonicalize_comparison): New. + (mips_emit_int_relational): Use. + +2005-07-13 Eric Christopher + + * config.gcc (s390x-ibm-tpf*): Add extra_options. Remove + static extra parts. + * config/s390/s390.md: Include tpf.md. Move tpf specific + patterns... + * config/s390/tpf.md: To here. + * config/s390/s390.opt: Move tpf specific options... + * config/s390/tpf.opt: to here. Add mmain option. + * config/s390/tpf-unwind.h: Remove unnecessary defines. + * config/s390/tpf.h: Rewrite. + +2005-07-13 H.J. Lu + + * doc/tm.texi: Remove @xref{Cross-profiling}. + +2005-07-13 Jeff Law + + * fold-const.c (fold_binary): When comparing two simple ADDR_EXPR + expressions, test their _DECL operands for pointer equality rather + than using operand_equal_p. + +2005-07-13 H.J. Lu + + * config/alpha/linux.h (TARGET_HAS_F_SETLKW): Renamed to ... + (TARGET_POSIX_IO): This. + * config/darwin.h: Likewise. + * config/freebsd.h: Likewise. + * config/linux.h: Likewise. + * config/lynx.h: Likewise. + * config/netbsd.h: Likewise. + * config/rs6000/linux64.h: Likewise. + * config/rs6000/linux.h: Likewise. + * config/s390/tpf.h: Likewise. + * config/sh/embed-elf.h: Likewise. + * config/sparc/linux64.h: Likewise. + * config/sparc/linux.h: Likewise. + * config/svr4.h: Likewise. + * gcov-io.h: Likewise. + + * doc/tm.texi: Updated. + + * libgcov.c (create_file_directory): Defined only if + TARGET_POSIX_IO is defined. + (gcov_exit): Call create_file_directory only if TARGET_POSIX_IO + is defined. + +2005-07-13 Jan Hubicka + + * tree-ssa-operands.c (get_expr_operands): Fix typo in previous patch. + +2005-07-13 David Edelsohn + + * tree-ssa-dom.c (lookup_avail_expr): Do not pass member in freed + structure as argument. + +2005-07-13 Paolo Bonzini + + PR tree-optimization/21921 + * tree-iterator.c (tsi_link_before): Support the case when + tsi_end_p (tsi) == true. + +2005-07-12 Zdenek Dvorak + + PR tree-optimization/22442 + * tree-chrec.c (chrec_fold_multiply_poly_poly): Associate chrecs + correctly. + +2005-07-12 Zdenek Dvorak + + PR rtl-optimization/20376 + * toplev.c (process_options): Enable -fweb and -frename-registers when + unrolling. + * doc/invoke.texi: Update the information about when -fweb and + -frename-registers are enabled. + +2005-07-12 Andrew Pinski + + PR tree-opt/21840 + * tree-ssa-pre.c (eliminate): Convert the sprime to the correct type + if *rhs_p is not a SSA_NAME. + +2005-07-12 Daniel Berlin + + Fix PR tree-optimization/22422 + * tree-ssa-structalias.c (struct variable_info): Add flag for + special vars. + (get_varinfo): Now a static function. + (new_varinfo): init has_union and is_special_var to false. + (solution_set_add): Check has_union. + (do_da_constraint): Move temporary variable so it gets reset + properly. + Also check for special variable. + (do_ds_constraint): Ditto. + (do_sd_constraint): Ditto. + (do_structure_copy): Check for special variable. + (find_func_aliases): Ditto. + (init_base_vars): Set special vars properly. + +2005-07-13 Jan Hubicka + + * cfgexpand.c (expand_one_stack_var): Do not expand variables when we + do unit-at-a-time. + + * tree-ssa-operands.c (parse_ssa_operands): Fix formatting. + (get_expr_operands): Fix thinko wrt flags and subvars. + + PR tree-optimize/22379 + * tree-inline.c (expand_call_inline): Do not output sorry in early + inlining. + +2005-07-12 Dale Johannesen + + * config/rs6000.c (rs6000_rtx_cost): Move FLOAT_EXTEND. + +2005-07-12 Andrew Pinski + + PR bootstrap/21704 + * host-linux.h: Include limits.h. + +2005-07-12 Dale Johannesen + + * expr.c (compress_float_constant): Add cost check. + * config/rs6000.c (rs6000_rtx_cost): Adjust FLOAT_EXTEND cost. + +2005-07-12 Dale Johannesen + + * gcc.target/i386/compress-float-sse.c: New. + * gcc.target/i386/compress-float-sse-pic.c: New. + * gcc.target/i386/compress-float-387.c: New. + * gcc.target/i386/compress-float-387-pic.c: New. + * gcc.dg/compress-float-ppc.c: New. + * gcc.dg/compress-float-ppc-pic.c: New. + +2005-07-12 Eric Christopher + + * config.gcc (s390x-ibm-tpf*): Add extra_options. Remove + static extra parts. + * config/s390/s390.md: Include tpf.md. Move tpf specific + patterns... + * config/s390/tpf.md: To here. + * config/s390/s390.opt: Move tpf specific options... + * config/s390/tpf.opt: to here. Add mmain option. + * config/s390/tpf-unwind.h: Remove unnecessary defines. + * config/s390/tpf.h: Rewrite. + +2005-07-12 Eric Christopher + + * gcc.c (struct infile): Update comment for language. + (main): Rewrite input file resetting code. + +2005-07-12 Andrew Pinski + + PR tree-opt/22335 + * tree-ssa-dom.c (eliminate_redundant_computations): Reject the prop if + requiring a cast in a non RHS of modify_expr. Add a cast when required. + (lookup_avail_expr): Use constant_boolean_node instead + of boolean_false_node/boolean_true_node. + +2005-07-12 Ben Elliston + + * tree-cfg.c (dump_cfg_stats): Add a new fmt_str_2 format string + and use it when printing num_edges. + +2005-07-12 Bernd Schmidt + + * doc/extend.texi (Blackfin Built-in Functions): New section. + * doc/invoke.texi (mcsync-anomaly, mno-csync-anomaly): Fix the + @opindex. + +2005-07-12 Adrian Straetling + + * builtins.c: (expand_builtin_memcmp, expand_builtin_strncmp): + s/cmpstrsi/cmpstrnsi + (expand_builtin_strcmp): Rewrite to support both 'cmpstrsi' and + 'cmpstrnsi'. + * optabs.c: (prepare_cmp_insn): Add availability of 'cmpstrn'. + (init_optabs): Initialize cmpstrn_optab. + * optabs.h: (enum insn_code cmpstrn_optab): Declare. + * genopinit.c: (optabs[]): Add 'cmpstrn' to initialisation. + * expr.c: (enum insn_code cmpstrn_optab): Declare. + * config/i386/i386.md: s/cmpstr/cmpstrn + * config/c4x/c4x.md: s/cmpstr/cmpstrn + * doc/md.texi: Update documentation. + +2005-07-11 Richard Henderson + + * config/alpha/alpha.c (alpha_gimplify_va_arg_1): Use + build_va_arg_indirect_ref. + (alpha_gimplify_va_arg): Likewise. + * config/c4x/c4x.c (c4x_gimplify_va_arg_expr): Likewise. + * config/i860/i860.c (i860_gimplify_va_arg_expr): Likewise. + * config/mips/mips.c (mips_gimplify_va_arg_expr): Likewise. + * config/pa/pa.c (hppa_gimplify_va_arg_expr): Likewise. + * config/sh/sh.c (sh_gimplify_va_arg_expr): Likewise. + * config/stormy16/stormy16.c (xstormy16_expand_builtin_va_arg): + Likewise. + * config/xtensa/xtensa.c (xtensa_gimplify_va_arg_expr): Likewise. + +2005-07-12 Zdenek Dvorak + + * tree-flow.h (remove_empty_loops, single_dom_exit): Declare. + * passes.c (init_optimization_passes): Add pass_empty_loop. + * tree-pass.h (pass_empty_loop): Declare. + * tree-ssa-loop-ivcanon.c (empty_loop_p, remove_empty_loop, + try_remove_empty_loop, remove_empty_loops): New functions. + * tree-ssa-loop-ivopts.c (single_dom_exit): Export. + * tree-ssa-loop.c (tree_ssa_empty_loop, pass_empty_loop): New. + +2005-07-12 Peter Barada + + PR middle-end/16719 + PR middle-end/18421 + * config/m68k/m68k.h (HARD_REGNO_MODE_OK): Disallow bytes + in address registers. + * config/m68k/m68k.c (hard_regno_mode_ok): Likewise. + * config/m68k/m68k.md: Replace 's' with 'i' in 4th + alternative of addsi3_5200. + +2005-07-11 Ian Lance Taylor + + * config/mips/mips.md (ffs2): Remove. + +2005-07-11 Ian Lance Taylor + + * doc/tree-ssa.texi (Cleanups): Improve description of + TRY_FINALLY_EXPR. + (GIMPLE Exception Handling): Clarify TRY_CATCH_EXPR cases. + +2005-07-11 Daniel Berlin + + * print-tree.c (print_node): Use DECL_ARGUMENT_FLD. + * tree.h (DECL_ARGUMENT_FLD): New macro. + +2005-07-11 Daniel Berlin + + Fix PR tree-optimization/22404 + + * tree-ssa-structalias.c (create_variable_info_for): Use + correct offset. + +2005-07-11 Bernd Schmidt + + * config/bfin/bfin.md (cmpsi, compare_eq, compare_ne, compare_lt, + compare_le, compare_leu, compare_ltu): Use reg_or_const_int_operand + for second comparison operand. + * config/bfin/predicates.md (reg_or_const_int_operand): New. + + * config/bfin/bfin.md (define_attr "type"): Add "sync". + (define_insn_reservation "alu"): Likewise. + (csync, ssync): Now of type sync. + * config/bfin/bfin.h (TARGET_DEFAULT): Defaults to + -mcsync-anomaly -mspecld-anomaly. + * config/bfin/bfin.opt (mcsync): Remove. + (mcsync-anomaly, mspecld-anomaly): Add. + * config/bfin/bfin.c: Include "insn-codes.h". + (bfin_reorg): Extend to handle the CSYNC anomaly as well. + (TARGET_DEFAULT_TARGET_FLAGS): New. + * doc/invoke.texi: Document -mcsync-anomaly, -mspecld-anomaly. + +2005-07-11 Steven Bosscher + + * basic-block.h: Give the BB flags enum a name, bb_flags. + Add new flags BB_FORWARDER_BLOCK, and BB_NONTHREADABLE_BLOCK. + * cfgcleanup.c (enum bb_flags): Remove here. + (BB_FLAGS, BB_SET_FLAG, BB_CLEAR_FLAG): Remove. + (notice_new_block): Set/test bb->flags instead of aux via BB_FLAGS. + (update_forwarder_flag): Likewise. + (thread_jump): Likewise. + (try_forward_edges): Likewise. + (try_optimize_cfg): Likewise. Clear bb->flags before updating the + forwarder flags. Don't clear bb->aux for all basic blocks. Only + reset the BB_FORWARDER_BLOCK and BB_NONTHREADABLE_BLOCK flags. + +2005-07-11 Richard Guenther + + * config/i386/i386.opt: New target option -msseregparm. + * config/i386/i386.c (override_options): Error out for + -msseregparm but no SSE support. + (ix86_function_sseregparm): Check for global sseregparm. + * doc/invoke.texi: Document -msseregparm. + +2005-07-11 Kazuhiro Inaoka + + * config.gcc (m32r-*-linux*): Use the default extra_parts. + (m32rle-*-linux*): Ditto. + +2005-07-11 Jakub Jelinek + + * cfgexpand.c (stack_protect_classify_type): Use TYPE_SIZE_UNIT (type) + instead of TYPE_MAX_VALUE (TYPE_DOMAIN (type)) to get array size in + bytes. + +2005-07-10 John David Anglin + + PR middle-end/22239 + PR target/20126 + * loop.c (loop_givs_rescan): Use expand_simple_binop instead of + gen_rtx_MINUS to handle non-replaceable (plus ((x) (const)). + +2005-07-07 Daniel Berlin + + * tree-ssa-structalias.c (struct variable_info): Heapify complex. + (varmap): Heapify varmap. + (constraints): Heapify constraints. + (struct constraint_graph): Heapify succs and preds. + (constraint_vec_find): Update for heapification. + (constraint_set_union): Ditto. + (insert_into_complex): Ditto. + (constraint_edge_vec_find): Ditto. + (erase_graph_self_edge): Ditto. + (add_graph_edge): Ditto. + (get_graph_weights): Ditto. + (merge_graph_nodes): Ditto. + (build_constraint_graph): Ditto. + (topo_visit): Ditto. + (solve_graph): Ditto. + (create_variable_info_for): Ditto. + (init_base_vars): Ditto. + (delete_points_to_sets): Free graph, varmap, and complex constraints. + (condese_varmap_nodes): Free complex vector. + (clear_edges_for_node): Clear succs and preds vector. + +2005-07-10 Daniel Berlin + + * tree-ssa-structalias.c (update_alias_info): Change counting of + references to not include vdefs. + +2005-07-10 Daniel Berlin + + * tree-ssa-alias.c (free_used_part_map): Add missing free. + (up_insert): Ditto. + +2005-07-10 John David Anglin + + * pa.c (pa_commutative_p): Make PLUS commutative when + TARGET_NO_SPACE_REGS is true. + +2005-07-09 Diego Novillo + + * Makefile.in (tree-ssa-alias.o): Depend on tree-ssa-structalias.h + * tree-cfg.c (CHECK_OP): Only test for is_gimple_val. + * tree-dfa.c (dump_subvars_for): New. + (debug_subvars_for): New. + (dump_variable): Show subvariables if VAR has them. + * tree-flow-inline.h (get_subvar_at): New. + (overlap_subvar): Change offset and size to unsigned HOST_WIDE_INT. + * tree-flow.h (struct ptr_info_def): Remove field pt_malloc. + Update all users. + (struct subvar): Change fields offset and size to unsigned + HOST_WIDE_INT. + (dump_subvars_for): Declare. + (debug_subvars_for): Declare. + (get_subvar_at): Declare. + (okay_component_ref_for_subvars): Change 2nd and 3rd argument + to unsigned HOST_WIDE_INT *. + (overlap_subvar): Likewise. + * tree-gimple.c (is_gimple_reg): Always return false for + SFTs and memory tags. + * tree-pass.h (pass_build_pta, pass_del_pta): Remove. + Update all callers. + * tree-ssa-alias.c: Include tree-ssa-structalias.h. + (compute_may_aliases): Call compute_points_to_sets. + (collect_points_to_info_for): Remove. + (compute_points_to_and_addr_escape): Remove. + (delete_alias_info): Call delete_points_to_sets. + (compute_flow_sensitive_aliasing): If the call to + find_what_p_points_to returns false, call set_pt_anything. + (add_may_alias): Set TREE_ADDRESSABLE when adding a new alias. + (set_pt_anything): Clear pi->pt_vars. + (set_pt_malloc): Remove. + (merge_pointed_to_info): Remove. + (add_pointed_to_expr): Remove. + (add_pointed_to_var): Remove. + (collect_points_to_info_r): Remove. + (is_escape_site): Make extern. + (create_sft): New. + (create_overlap_variables_for): Call it. + * tree-ssa-copy.c (merge_alias_info): Never merge + flow-sensitive alias information. + * tree-ssa-operands.c (get_expr_operands): Adjust variables + offset and size to be unsigned HOST_WIDE_INT. + (add_to_addressable_set): Rename from note_addressable. + Set TREE_ADDRESSABLE as the variables are added to the set. + Update all users. + (add_stmt_operand): Do not try to micro-optimize unmodifiable + operands into VUSEs when adding V_MAY_DEFs for members in an + alias set. + * tree-ssa-operands.h (add_to_addressable_set): Declare. + * tree-ssa-structalias.c: Include tree-ssa-structalias.h last. + (struct variable_info): Add bitfield is_heap_var. + (var_anyoffset, anyoffset_tree, anyoffset_id): Declare. + (new_var_info): Initialize is_heap_var. + (get_constraint_for): Add HEAP variables to the symbol table. + Mark them with is_heap_var. + (update_alias_info): New. Taken mostly from the old + compute_points_to_and_addr_escape. + (handle_ptr_arith): New. + (find_func_aliases): Call update_alias_info. + Call handle_ptr_info for tcc_binary expressions. + Call mark_stmt_modified. + (create_variable_info_for): If DECL has subvars, do not create + variables for its subvars. Always add all the fields. + (set_uids_in_ptset): If the solution includes ANYOFFSET and + SFTs, then add all the SFTs of the structure. + If VI->DECL is an aggregate with subvariables, add the SFT at + VI->OFFSET. + (find_what_p_points_to): If VI is an artificial variable, + translate to bitfields in SSA_NAME_PTR_INFO. + If the solution is empty, set pi->pt_vars to NULL + (init_base_vars): Create ANYOFFSET. + (compute_points_to_sets): Rename from create_alias_vars. + Make extern. + (pass_build_pta): Remove. + (delete_points_to_sets): Rename from delete_alias_vars. + (pass_del_pta): Remove. + * tree-ssa-structalias.h (struct alias_info): Move from + tree-ssa-alias.h. + (NUM_REFERENCES, NUM_REFERENCES_CLEAR, NUM_REFERENCES_INC, + NUM_REFERENCES_SET): Likewise. + (compute_points_to_sets, delete_points_to_sets): Declare. + +2005-07-09 Richard Henderson + + * config/alpha/alpha.c (emit_insxl, alpha_expand_compare_and_swap_12, + alpha_split_compare_and_swap_12, alpha_expand_lock_test_and_set_12, + alpha_split_lock_test_and_set_12): New functions. + * config/alpha/alpha-protos.h: Update. + * config/alpha/alpha.md (UNSPEC_MB, UNSPEC_ATOMIC, + UNSPEC_CMPXCHG, UNSPEC_XCHG): Rename from UNSPECV_FOO. + * config/alpha/sync.md (I12MODE): New. + (memory_barrier, mb_internal): Use unspec instead of unspec_volatile. + (sync_): Likewise. + (sync_nand): Likewise. + (sync_old_): Likewise. + (sync_new_): Likewise. + (sync_old_nand, sync_new_nand): Likewise. + (sync_compare_and_swap): Likewise. + (sync_lock_test_and_set): Likewise. + (sync_compare_and_swap): New. + (sync_compare_and_swap_1): New. + (sync_lock_test_and_set): New. + (sync_lock_test_and_set_1): New. + +2005-07-09 Diego Novillo + + PR 21356 + PR 22332 + * passes.c (execute_todo): Cleanup the CFG before updating SSA. + +2005-07-09 Jakub Jelinek + + * config/i386/i386.c (output_set_got): Don't omit OFFSET FLAT: + in Intel syntax add %reg, OFFSET FLAT:_GLOBAL_OFFSET_TABLE_+(.-.Lx). + +2005-07-09 Richard SAndiford + + PR target/21656 + * config/mips/elf.h (NO_IMPLICIT_EXTERN_C): Define. + +2005-07-08 David Edelsohn + + * config/rs6000/sync.md (load_locked_): Use Z for + memory_operand constraint. + (store_conditional_): Same. + (sync_compare_and_swap): Same. + (sync_lock_test_and_set): Same. + +2005-07-08 Hans-Peter Nilsson + + Rewrite PIC support to more closely model actual instructions. + * config/cris/cris-protos.h (cris_gotless_symbol, cris_got_symbol) + (cris_symbol): Remove prototypes for removed functions. + (cris_pic_symbol_type_of, cris_valid_pic_const) + (cris_expand_pic_call_address): Prototypes for new functions. + * config/cris/cris/cris.c (cris_pic_sympart_only): Remove unused + variable. + (cris_print_operand) : Remove cases for unused + modifiers. + : Add case for new punctuation character. + : Temporarily set flag_pic = 2 instead of incorrectly + emitting (extra) PIC modifier. + : Do not assert for PLT. + (cris_initial_frame_pointer_offset, cris_simple_epilogue) + (cris_expand_prologue, cris_expand_epilogue): Check + for pic_offset_table_rtx usage instead of taking + current_function_uses_pic_offset_table as the final word. + (cris_rtx_costs, cris_address_cost, cris_side_effect_mode_ok): + Remove flag_pic difference. + (cris_valid_pic_const, cris_pic_symbol_type_of): New functions, + the moral equivalents of... + (cris_symbol, cris_gotless_symbol, cris_got_symbol): Remove + functions. + (cris_legitimate_pic_operand): Just call cris_valid_pic_const. + (cris_handle_option): Mark ARG as unused. + (cris_expand_pic_call_address): New worker function for "call", + "call_value". + (cris_asm_output_symbol_ref, cris_asm_output_label_ref): Do not + output PIC constructs here. + (cris_output_addr_const_extra): Changes for emitting PIC modifiers + as symbol-specific modifers, not whole or part of operands. + * config/cris/cris/cris.h (EXTRA_CONSTRAINT): Remove 'U' case. + (EXTRA_CONSTRAINT_S): Changed semantics: allow only CONST-wrapped + constants and flag_pic. + (CONSTANT_INDEX_P): Adjust for new functions. + (enum cris_pic_symbol_type): New helper type. + (PRINT_OPERAND_PUNCT_VALID_P): Add ':'. + * config/cris/cris/cris.md (CRIS_UNSPEC_GOTREL) + (CRIS_UNSPEC_GOTREAD, CRIS_UNSPEC_PLTGOTREAD): New + define_constants. + ("movsi"): Emit actual instructions for GOT and relative access. + ("*movsi_got_load"): New pattern to set up the register holding + the GOT pointer. + ("*movsi_internal"): Operand 1 is not a plain general_operand. + Adjust FIXME for 'S'. + : Sanity-check UNSPEC types for PIC. + Use "movs" for -fpic cases. + ("addsi3"): Add alternative for 'S'; use adds.w when possible. + ("uminsi3","*expanded_call_value"): Remove 'S' alternative. + ("call", "call_value"): Just call cris_expand_pic_call_address for + PIC addresses. + ("*expanded_call_no_gotplt", "*expanded_call_value_no_gotplt"): + Remove special pattern. + ("*expanded_call_side", "*expanded_call_value_side"): New + patterns. + (gotplt-to-plt, gotplt-to-plt-side-call) + (gotplt-to-plt-side-call-value, gotplt-to-plt-side): New + peephole2:s. + * config/cris/cris/predicates.md + ("cris_general_operand_or_gotless_symbol"): Remove unused + predicate. + ("cris_general_operand_or_symbol"): Adjust for new functions. + +2005-07-08 Andrew Pinski + + * config/darwin.h (TARGET_C99_FUNCTIONS): Define to 1. + +2005-07-08 Daniel Berlin + + * Makefile.in (TREE_H): Add treestruct.def. + (c-decl.o): Add pointer-set.h + * c-decl.c (diagnose_mismatched_decls): Don't attempt to look at + visibility on regular DECL's. + (merge_decls): Fix the copying of decl nodes of various types for + the new structures. Don't update RTL, section name, weak status, + etc, on DECL's without RTL. + (grokdeclarator): DECL_ARG_TYPE_AS_WRITTEN is gone. + Don't check volatile on non-variable types. + (store_parm_decls_oldstyle): Use pointer_set instead of DECL_WEAK + to check whether we have seen arguments. + * c-objc-common.c (c_tree_printer): Reverse order of tests so that + flag is checked before field (flag is common, field is not). + * dwarf2out.c (decl_ultimate_origin): Only DECL's with + TS_DECL_COMMON could have an origin. + (add_location_or_const_value_attribute): Don't check section name + on non-var/function decls. + (dwarf2out_var_location): Reverse order of tests. + * emit-rtl.c (set_reg_attrs_for_parm): DECL_CHECK is dead, replace + with DECL_WRTL_CHECK. + * expmed.c (make_tree): rtl is now in decl_with_rtl. + * fold-const.c (fold_binary): Don't check weakness on + non-var/function decls. + (tree_expr_nonzero_p): Ditto. + (fold_checksum_tree): Use tree_decl_extra as sizeof + buffer. + * ggc-page.c (extra_order_size_table): Add sizes for + tree_decl_non_common, tree_parm_decl, tree_var_decl, and + tree_field_decl. + * gimplify.c (gimplify_bind_expr): Only set + DECL_SEEN_IN_BIND_EXPR_P on VAR_DECL. + * integrate.c (copy_decl_for_inlining): Don't set RTL on decl's + without RTL. + * langhooks-def.h (LANG_HOOK_INIT_TS): New. + * langhooks.h (init_ts). New langhook. + * passes.c (rest_of_decl_compilation): Reverse order of tests. + * print-tree.c (print_node): Update to only print fields that + exist in the structures the passed decl has. + * toplev.c (wrapup_global_declarations): Don't reset + DECL_DEFER_OUTPUT on DECL's that don't contain it. + * tree-browser.c (browse_tree): DECL_ARG_TYPE_AS_WRITTEN removed. + * tree-inline.c (remap_decl): Ditto. + * tree-outof-ssa.c (create_temp): Reverse order of tests. + * tree-pretty-print.c (print_declaration): Don't print + DECL_REGISTER on things that don't contain it. + * tree-vrp.c (expr_computes_nonzero): Don't check weakness on + non-var/function decls. + * tree.c (tree_contains_struct): New structure. + (init_priority_for_decl): New hashtable. + (tree_int_map): New structure. + (tree_int_map_eq): New function. + (tree_int_map_marked_p): Ditto. + (tree_int_map_hash): Ditto. + (tree_map): Move to tree.h. + (tree_map_eq): Externalize. + (tree_map_hash): Ditto. + (tree_map_marked_p): Ditto. + (init_ttree): Set up tree_contains_struct and call langhook. + (decl_assembler_name): Use DECL_NON_COMMON_CHECK.. + (tree_code_size): Update for new structures. + (tree_node_structure): Update for new structures. + (make_node_stat): Don't try to set DECL_IN_SYSTEM_HEADER on decls + without the field. + (copy_node_stat): Copy init priority. + (build_decl_stat): Ditto for visibility. + (ts_enum_names): New. + (tree_contains_struct_check_failed): New function. + (decl_init_priority_lookup): Ditto. + (decl_init_priority_insert): Ditto. + * treestruct.def: New file. + * tree.h (CODE_CONTAINS_STRUCT): New macro. + (CONTAINS_STRUCT_CHECK): Ditto. + (tree_contains_struct_check_failed): New prototype. + (DECL_CHECK): Removed. + (DECL_MINIMAL_CHECK): New. + (DECL_COMMON_CHECK): Ditto. + (DECL_WRTL_CHECK): Ditto. + (DECL_NON_COMMON_CHECK): Ditto. + (DECL_WITH_VIS_CHECK): Ditto. + (VAR_OR_FUNCTION_DECL_P): Ditto + (struct tree_decl_minimal): New structure. + (struct tree_decl_common): Ditto. + (struct tree_decl_with_rtl): Ditto. + (struct tree_decl_with_vis): Ditto. + (struct tree_decl_non_common): Ditto. + (struct tree_field_decl): Ditto. + (struct tree_parm_decl): Ditto. + (struct tree_var_decl): Ditto. + (struct tree_function_decl): Ditto. + (struct tree_const_decl): Ditto. + (struct tree_result_decl): Ditto. + (union tree_node): Add new structures. + * var-tracking.c (track_expr_p): Reverse order of tests. + + * doc/c-tree.texi: Add documentation on DECL node internal structure. + +2005-07-08 Kazu Hirata + + * cfgexpand.c (tree_expand_cfg): Don't use FINALIZE_PIC. + * system.h: Poison FINALIZE_PIC. + * doc/tm.texi (FINALIZE_PIC): Remove. + +2005-07-08 Andrew Pinski + + PR tree-opt/22329 + * tree-ssa-propagate.c (fold_predicate_in): Convert the value + to the correct type if we have a MODIFY_EXPR. + +2005-07-08 Kazu Hirata + + PR tree-optimization/22360 + * tree.c (upper_bound_in_type): Fix calculations for casting + to a non-wider signed type and casting a signed value to a + wider unsigned type. + (lower_bound_in_type): Fix calculations for casting to a + non-wider signed type. + + PR tree-optimization/20139 + * tree-cfg.c (remove_bb): Check in_ssa_p before calling + release_defs. + * tree-optimize.c (execute_cleanup_cfg_post_optimizing): Call + fold_cond_expr_cond. + * tree-ssanames.c (release_defs): Assert in_ssa_p. + * tree.c (upper_bound_in_type, lower_bound_in_type): Rewrite. + +2005-07-08 Andrew Pinski + + PR tree-opt/22356 + * tree-complex.c (expand_complex_libcall): Produce + REALPART_EXPR/IMAGPART_EXPR with the correct type. + +2005-07-08 Kenneth Zadeck + + * bitmap.c (bitmap_and, bitmap_and_into, bitmap_and_compl, + bitmap_and_compl_into, bitmap_xor, bitmap_xor_into): Removed "a != + b" assert and inserted fastpath code for this case. + (bitmap_ior): Removed "a != b" assert. + +2005-07-08 Kazuhiro Inaoka + + * config/m32r/linux.h (STARTFILE_SPEC): Support PIE. + (ENDFILE_SPEC): Likewise. + * config/m32r/m32r.h (ASM_SPEC): Likewise. + + * config/m32r/m32r.c (m32r_output_function_epilogue): Care for + a large stack frame at epilogue. + +2005-07-08 David Billinghurst + + * final.c: Include sdbout.h when required. + +2005-07-07 Geoffrey Keating + + * config.gcc (*-*-darwin*): Only one target-specific header file + for generic darwin. + (powerpc-*-darwin*): Add version-specific header files. + * configure.in (gcc_AC_CHECK_DECLS): Add strverscmp. + * config.in: Regenerate. + * configure: Regenerate. + * gcc.c: Include xregex.h. + (version_compare_spec_function): New. + (spec_function): Add version-compare. + (replace_outfile_spec_function): Reformat comment. + (compare_version_strings): New. + * config/darwin-c.c (version_as_macro): New. + (builtin_define): New. + (darwin_cpp_builtins): New. + * config/darwin-protos.h (darwin_cpp_builtins): New. + * config/darwin.h (CPP_SPEC): Don't define APPLE_CC here. + (LIB_SPEC): Make unconditional, update comment. + (TARGET_C99_FUNCTIONS): Define. + * config/darwin.opt: Sort. + (mmacosx-version-min=): New. + * config/darwin7.h: Delete. + * config/darwin8.h: Delete. + * config/i386/darwin.h (): Call darwin_cpp_builtins. + * config/rs6000/darwin.h (): Call darwin_cpp_builtins. + (TARGET_C99_FUNCTIONS): Define. + * config/rs6000/darwin7.h: New. + * config/rs6000/darwin8.h: New. + * doc/invoke.texi (Darwin Options): Add -mmacosx-version-min= + (-mmacosx-version-min): Document. + +2005-07-07 Ian Lance Taylor + + * config/mips/mips.md (abs2) [GPR]: Remove. + +2005-07-07 John David Anglin + + PR middle-end/22239 + * loop.c (loop_givs_rescan): Check that v->new_reg is a REG. + +2005-07-07 Khem Raj + + * config/arm/arm.c (thumb_output_function_prologue): Calculate offset + in bytes, not words. + +2005-07-07 Paul Brook + + * config/arm/arm.c (arm_pad_arg_upward): Compare return value of + DEFAULT_FUNCTION_ARG_PADDING to upward. + +2005-07-07 Richard Henderson + + * function.c (locate_and_pad_parm): Record parameter alignment in + stack_alignment_needed. + +2005-07-07 David Edelsohn + + * config/rs6000/rs6000.md (UNSPEC_SYNC, UNSPEC_SYNC_OP, + UNSPEC_SYNC_SWAP, UNSPEC_LWSYNC, UNSPEC_ISYNC): Delete. + (UNSPECV_LL, UNSPECV_SC, UNSPECV_ATOMIC, UNSPECV_SYNC, + UNSPECV_SYNC_OP, UNSPECV_CMPXCHG, UNSPECV_LWSYNC, UNSPECV_ISYNC): New. + (define_attr "type"): Add isync, sync, load_l, store_c. + * config/rs6000/sync.md (memory_barrier): Change to define_expand. + Create scratch volatile MEM. + (sync_internal): New. POWER mnemonic is dcs, not ics. Attribute + sync. + (load_locked_): New. + (store_conditional_): New. + (sync_compare_and_swap): Replace with splitter. + (sync_lock_test_and_set): Replace with splitter. + (sync_): Change to unspec_volatile UNSPECV_SYNC_OP + and UNSPECV_ISYNC. + (isync): Change to unspec_volatile UNSPECV_ISYNC. POWER mnemonic + is ics. Attribute isync. + (lwsync): Change to unspec_volatile UNSPECV_LWSYNC. Attribute + lwsync. + * config/rs6000/rs6000.c (rs6000_emit_sync): Use UNSPEC_VOLATILE + and UNSPECV_SYNC_OP. + (emit_unlikely_jump): New. + (emit_load_locked): New. + (emit_store_conditional): New. + (rs6000_split_compare_and_swap): New. + (rs6000_split_lock_test_and_set): New. + (is_dispatch_slot_restricted): Return 4 for TYPE_LOAD_L, + TYPE_STORE_C, TYPE_ISYNC, TYPE_SYNC. + * config/rs6000/rs6000-protos.h (rs6000_split_compare_and_swap, + rs6000_split_lock_test_and_set): Declare. + * config/rs6000/{40x.md,440.md,603.md,6xx.md,7450.md,7xx.md,8540.md, + mpc.md,power4.md,power5.md,rios1.md,rios2.md,rs64.md): Add load_l, + store_c, isync, sync. + +2005-07-07 Kelley Cook + + * Makefile.in (echo_quoted_to_gtyp): New template for outputing + filenames to gtyp-gen.h. + (s-typ-gen): Use it in place of for loops. + +2005-07-07 J"orn Rennecke + + * hooks.c (hook_bool_rtx_int_false): New function. + * hooks.h (hook_bool_rtx_int_false): Declare. + * target-def.h (TARGET_COMMUTATIVE_P): Define. + (TARGET_INITIALIZER): Add TARGET_COMMUTATIVE_P. + * target.h (struct gcc_target): Add commutative_p member. + * targhooks.c (hook_bool_rtx_commutative_p): New function. + * targhooks.h (hook_bool_rtx_commutative_p): Declare. + * pa.c (TARGET_COMMUTATIVE_P): Redefine. + (pa_commutative_p): New function. + * jump.c (target.h): Include. + (rtx_renumbered_equal_p): Use targetm.commutative_p. + * doc/tm.texi: Document TARGET_COMMUTATIVE_P. + +2005-07-07 Adrian Straetling + + * config/s390/s390-protos.h (s390_expand_clrmem): Delete. + (s390_expand_setmem): New. + * config/s390/s390.c: Likewise. + (print_shift_count_operand): Truncate to 12 bits instead of 6. + Adapt comments. + * config/s390/s390.md: ("setmem"): Accept character as + general_operand. Call new function "s390_expand_setmem". + ("clrmem_long", "*clrmem_long"): Rewrite to ... + ("setmem_long", "*setmem_long"): ... this. + +2005-07-07 Adrian Straetling + + * config/s390/s390.c: (optimization_options): Enable + TARGET_MVCLE at -Os. + * doc/invoke.texi: Document changes in default behaviour. + * config/s390/s390.opt: ("mvcle"): Fix typo: is "mmvcle". + +2005-07-07 Adrian Straetling + + * expr.c: (set_storage_via_setmem): Convert opchar to mode + defined by back-end. + +2005-07-07 Jakub Jelinek + + * config/sparc/sparc.md (stack_protect_testsi): Put clobbers after + all sets in the pattern. + * config/rs6000/rs6000.md (stack_protect_testsi, + stack_protect_testdi): Likewise. + +2005-07-06 Jeff Law + + * tree-vrp.c (simplify_using_ranges): Kill. + (vrp_finalize): Remove call to simplify_using_ranges. + (simplify_stmt_using_ranges): New function extracted from + simplify_using_ranges. + (simplify_div_or_mod_using_ranges): Likewise. + (simplify_abs_using_ranges): Likewise. + (simplify_cond_using_ranges): New function. + * tree-flow.h (simplify_stmt_using_ranges): Prototype. + * tree-ssa-propagate.c (substitute_and_fold): Call + simplify_stmt_using_ranges if we have range information. + +2005-07-06 James E. Wilson + + * config/ia64/ia64.c (ia64_reorg): Check optimize before + ia64_flag_schedule_isns2. + + * config/ia64/ia64.c (ia64_expand_movxf_movrf): Don't word swap when + reading/writing general registers. + (ia64_function_arg): Revert 2005-06-18 change. + +2005-07-06 John David Anglin + + * pa.c (legitimize_pic_address): Use gcc_assert instead of abort. + (legitimize_tls_address): Use gcc_unreachable instead of abort. + +2005-07-06 Kaz Kojima + + * function.c (expand_function_end): Revert part of 2005-06-27 + patch. Do sjlj_emit_function_exit_after after return_label. + +2005-07-06 Kazu Hirata + + * doc/install.texi (--disable-libssp): New. + +2005-07-06 Fariborz Jahanian + + * doc/invoke.texi: Update -fforce-mem documentation. + * dojump.c (compare_from_rtx,do_compare_rtx_and_jump): Remove + code for -fforce-mem. + * expmed.c: (store_bit_field,store_fixed_bit_field, + extract_bit_field): Ditto. + * expr.c: (convert_move): Ditto. + * optabs.c: (expand_binop,expand_twoval_unop,expand_twoval_binop, + expand_unop,emit_unop_insn,prepare_cmp_insn,emit_conditional_move, + emit_conditional_add,expand_float,expand_fix): Ditto. + * opts.c: (decode_options): Remove setting of flag_force_mem flag. + (common_handle_option): Issue warning when -fforce-mem specified. + +2005-07-06 Paul Brook + + * aclocal.m4: Work around a bug in AC_PATH_PROGS when its last + argument is empty. + * configure: Regenerate. + +2005-07-06 J"orn Rennecke + + * sh.c (final_prescan_insn): Undo bogus change from 2005-05-09. + +2005-07-06 Daniel Berlin + + Fix PR tree-optimization/22319 + Fix PR tree-optimization/22140 + Fix PR tree-optimization/22310 + + * tree-ssa-structalias.c (do_structure_copy): Give up earlier on + variable sized types. + Use correct type for intermediate structure on *a = *b structure + copies. + +2005-07-06 Jakub Jelinek + + * config/rs6000/rs6000.h (RS6000_VARARGS_AREA, RS6000_VARARGS_SIZE): + Remove. + (STARTING_FRAME_OFFSET): Don't add RS6000_VARARGS_AREA. + (machine_function): Move typedef to... + * config/rs6000/rs6000.c (machine_function): ... here. Add + varargs_save_offset field. + (rs6000_stack_t): Remove varargs_size field. + (setup_incoming_varargs): Allocate varargs save area using + assign_stack_local, try to make it as small as possible. + Save offset from virtual_stack_vars_rtx to the save area + in cfun->machine->varargs_save_offset. Use UNITS_PER_FP_WORD + instead of magic 8 when fp word byte size is used. + (rs6000_va_start): Use cfun->machine->varargs_save_offset + instead of -RS6000_VARARGS_SIZE. + (rs6000_stack_info, debug_stack_info, + rs6000_initial_elimination_offset): Remove all traces of + varargs_size. + * config/rs6000/sysv4.h (RS6000_VARARGS_AREA): Remove. + * config/rs6000/darwin.h (STARTING_FRAME_OFFSET): Don't add + RS6000_VARARGS_AREA. + +2005-07-06 Zdenek Dvorak + + PR tree-optimization/21963 + * tree-ssa-loop-ivopts.c (get_computation_aff): Use + constant_multiple_of in the same way get_computation_cost_at does. + +2005-07-06 Jakub Jelinek + + * config/sparc/sparc.h (sparc_compare_emitted): New extern. + * config/sparc/sparc.c (sparc_compare_emitted): New variable. + (gen_compare_reg): If sparc_compare_emitted is set, clear it + and return its previous value. + (emit_v9_brxx_insn): Assert sparc_compare_emitted is NULL. + * config/sparc/sparc.md (UNSPEC_SP_SET, UNSPEC_SP_TEST): New + constants. + (stack_protect_set, stack_protect_test): New expanders. + (stack_protect_setsi, stack_protect_setdi, stack_protect_testsi, + stack_protect_testdi): New insns. + * config/sparc/linux.h (TARGET_THREAD_SSP_OFFSET): Define. + * config/sparc/linux64.h (TARGET_THREAD_SSP_OFFSET): Define. + +2005-07-06 Jeff Law + + * tree-ssa-dce.c (cfg_altered): New global. + (tree_dce_init): Initialize cfg_altered. + (remove_dead_stmt): If we remove an edge in the CFG, then set + CFG_ALTERED. + (perform_tree_ssa_dce): If we altered the CFG, then invalidate + the dominators. + +2005-07-06 Kazu Hirata + + * Makefile.in (stamp-collect-ld): Use + $(ORIGINAL_LD_FOR_TARGET) instead of $<. Don't remove + ./collect-ld if it already exists. + (stamp-nm): Use $(ORIGINAL_NM_FOR_TARGET) instead of $<. + Don't remove ./nm if it already exists. + +2005-07-05 Devang Patel + + * tree-vectorizer.h (struct _loop_vec_info): Remove loop_line_number. + (LOOP_VINFO_LOC, LOOP_LOC): Remove. + * tree-vectorizer.c (vect_loop_location): New. + (vect_print_dump_info): Use vect_loop_location. + (new_loop_vec_info): Do not set LOOP_VINFO_LOC. + (vectorize_loops): Set vect_loop_location. + * tree-vect-analyze.c (vect_analyze_offset_expr, + vect_determin_vectorization_factor, vect_analyze_operations, + vect_analyze_scalar_cycles, vect_analyze_data_ref_dependence, + vect_analyze_data_ref_dependences, vect_compute_data_ref_alignment, + vect_analyze_data_refs_alignment, vect_analyze_data_ref_access, + vect_analyze_data_ref_accesses, vect_analyze_pointer_ref_access, + vect_object_analysis, vect_analyze_data_refs, vect_mark_relevant, + vect_stmt_relevant_p, vect_mark_stmts_to_be_vectorized, + vect_can_advance_ivs_p, vect_get_loop_niters, vect_analyze_loop_form, + vect_analyze_loop): Adjust vect_print_dump_info API. + * tree-vect-transform.c (vect_create_addr_base_for_vector_ref, + vect_create_data_ref_ptr, vect_init_vector, vect_get_vec_def_for_operand, + vect_finish_stmt_generation, vectorizable_assignment, + vectorizable_operation, vectorizable_store, vectorizable_load, + vectorizable_live_operation, vectorizable_condition, vect_transform_stmt, + vect_update_ivs_after_vectorizer, vect_do_peeling_for_loop_bound, + vect_gen_ninters_for_prolog_loop, vect_do_peeling_for_alignment, + vect_transform_loop): Same. + * tree-vectorizer.c (get_vectype_for_scalar_type, vect_is_simple_use, + vect_is_simple_reduction, vect_is_simple_iv_evolution, vectorize_loops): + Same. + +2005-07-05 Randolph Chung + + * configure.ac (hppa*-*-linux*: Check for a TLS capable gas. + * configure: Regenerate. + * config/pa/pa-protos.h (tls_symbolic_operand): Declare. + (pa_tls_referenced_p): Declare. + * config/pa/pa.c (legitimize_pic_address): Reject TLS operands. + (gen_tls_tga, gen_tls_get_addr, hppa_tls_call): New. + (legitimize_tls_address): New. + (hppa_legitimize_address): Handle TLS addresses. + (pa_tls_symbol_ref_1, pa_tls_referenced_p): New. + (TARGET_CANNOT_FORCE_CONST_MEM): Define. + (emit_move_sequence): Handle TLS addresses. + (pa_encode_section_info): Call default handler to handle common + sections. + * config/pa/pa.h (PA_SYMBOL_REF_TLS_P): New. + (CONSTANT_ADDRESS_P): Reject TLS operands. + (TARGET_HAVE_TLS) [HAVE_AS_TLS]: Define. + * config/pa/pa.md (UNSPEC_TP, UNSPEC_TLSGD, UNSPEC_TLSLDM) + (UNSPEC_TLSLDO, UNSPEC_TLSLDBASE, UNSPEC_TLSIE) + (UNSPEC_TLSLE): Define new constants. + (tgd_load, tld_load, tld_offset_load, tp_load, tie_load, tle_load): New. + * config/pa/predicates.md (symbolic_operand): Reject TLS operands. + (tls_symbolic_operand, tgd_symbolic_operand, tld_symbolic_operand) + (tie_symbolic_operand, tle_symbolic_operand): New + +2005-07-06 Kelley Cook + + * aclocal.m4: Update macros for autoconf 2.59 style. + * configure.ac: Likewise. + +2005-07-05 John David Anglin + + * pa.c (function_value): Handle small aggregates on 32-bit targets. + (function_arg): Pass small aggregates in general registers on 32-bit + targets. + * som.h (MEMBER_TYPE_FORCES_BLK): Delete define. + +2005-07-05 Andrew Pinski + + * Makefile.in (final.o): Fix dependencies. + +2005-07-05 Joseph S. Myers + + PR c/22013 + PR c/22098 + * langhooks.h (struct lang_hooks): Add expr_to_decl. + * langhooks.c (lhd_expr_to_decl): New. + * langhooks-def.h (lhd_expr_to_decl, LANG_HOOKS_EXPR_TO_DECL): + New. + (LANG_HOOKS_INITIALIZER): Update. + * tree.c (recompute_tree_invarant_for_addr_expr): Call + expr_to_decl langhook. + * c-tree.h (c_expr_to_decl): Declare. + * c-typeck.c (c_expr_to_decl): New. + (build_unary_op): Do not handle ADDR_EXPR of COMPOUND_LITERAL_EXPR + specially. + * c-objc-common.h (LANG_HOOKS_EXPR_TO_DECL): Define. + +2005-07-05 Joseph S. Myers + + PR c/22308 + * c-decl.c (finish_struct): Also copy C_TYPE_FIELDS_READONLY, + C_TYPE_FIELDS_VOLATILE and C_TYPE_VARIABLE_SIZE to type variants. + +2005-07-05 Paolo Bonzini + + * Makefile.in: Adjust dependencies. + * tree-pass.h: Add new passes and passes formerly in tree-optimize.c. + * basic-block.h (duplicate_computed_gotos): Remove, it is now static. + * alias.c (rest_of_handle_cfg, pass_cfg): New. + * bb-reorder.c (duplicate_computed_gotos): Make it static. + * cfgexpand.c (tree_expand_cfg): Add code formerly at the beginning of + rest_of_compilation. + + * bb-reorder.c (gate_duplicate_computed_gotos, + pass_duplicate_computed_gotos, gate_handle_reorder_blocks, + rest_of_handle_reorder_blocks, pass_reorder_blocks, + gate_handle_partition_blocks, rest_of_handle_partition_blocks, + pass_partition_blocks): New. + * bt-load.c (gate_handle_branch_target_load_optimize, + rest_of_handle_branch_target_load_optimize, + pass_branch_target_load_optimize): New. + * cfgcleanup.c (rest_of_handle_jump, pass_jump, rest_of_handle_jump2, + pass_jump2): New. + * cfglayout.c (pass_insn_locators_initialize): New. + * cfgrtl.c (pass_free_cfg): New. + * combine.c (gate_handle_combine, rest_of_handle_combine, + pass_combine): New. + * cse.c (gate_handle_cse, rest_of_handle_cse, pass_cse, + gate_handle_cse2, rest_of_handle_cse2, pass_cse2): New. + * emit-rtl.c (pass_unshare_all_rtl, pass_remove_unnecessary_notes): New. + * except.c (pass_set_nothrow_function_flags, + pass_convert_to_eh_region_ranges, gate_handle_eh, rest_of_handle_eh, + pass_rtl_eh): New. + * final.c (pass_compute_alignments, rest_of_handle_final, pass_final, + rest_of_handle_shorten_branches, pass_shorten_branches, + rest_of_clean_state, pass_clean_state): New. + * flow.c (pass_recompute_reg_usage, gate_remove_death_notes, + rest_of_handle_remove_death_notes, pass_remove_death_notes, + rest_of_handle_life, pass_life, rest_of_handle_flow2, + pass_flow2): New. + * function.c (pass_instantiate_virtual_regs, pass_init_function, + rest_of_handle_check_leaf_regs, pass_leaf_regs): New. + * gcse.c (gate_handle_jump_bypass, rest_of_handle_jump_bypass, + pass_jump_bypass, gate_handle_gcse, rest_of_handle_gcse, + pass_gcse): New. + * global.c (rest_of_handle_global_alloc, pass_global_alloc): New. + * ifcvt.c (gate_handle_if_conversion, rest_of_handle_if_conversion, + pass_rtl_ifcvt, gate_handle_if_after_combine, + rest_of_handle_if_after_combine, pass_if_after_combine, + gate_handle_if_after_reload, rest_of_handle_if_after_reload, + pass_if_after_reload): New. + * integrate.c (pass_initial_value_sets): New. + * jump.c (pass_cleanup_barriers, purge_line_number_notes, + pass_purge_lineno_notes): New. + * mode-switching.c (rest_of_handle_mode_switching, + pass_mode_switching): New. + * local-alloc.c (rest_of_handle_local_alloc, pass_local_alloc): New. + * loop-init.c (gate_handle_loop2, rest_of_handle_loop2, + pass_loop2): New. + * loop.c (gate_handle_loop_optimize, rest_of_handle_loop_optimize, + pass_loop_optimize): New. + * modulo-sched.c (gate_handle_sms, rest_of_handle_sms, + pass_sms): New. + * postreload-gcse.c (gate_handle_gcse2, rest_of_handle_gcse2, + pass_gcse2): New. + * postreload.c (gate_handle_postreload, rest_of_handle_postreload, + pass_postreload_cse): New. + * profile.c (gate_handle_profiling, pass_profiling, + rest_of_handle_branch_prob, pass_branch_prob): New. + * recog.c (pass pass_split_for_shorten_branches, gate_do_final_split, + pass_split_before_regstack, gate_handle_split_before_regstack, + gate_handle_peephole2, rest_of_handle_peephole2, pass_peephole2, + rest_of_handle_split_all_insns, pass_split_all_insns): New. + * reg-stack.c (gate_handle_stack_regs, rest_of_handle_stack_regs, + pass_stack_regs): New. + * regmove.c (gate_handle_regmove, rest_of_handle_regmove, pass_regmove, + gate_handle_stack_adjustments, rest_of_handle_stack_adjustments, + pass_stack_adjustments): New. + * regrename.c (gate_handle_regrename, rest_of_handle_regrename, + pass_regrename): New. + * reorg.c (gate_handle_delay_slots, rest_of_handle_delay_slots, + pass_delay_slots, gate_handle_machine_reorg, + rest_of_handle_machine_reorg, pass_machine_reorg): New. + * rtl.h (extern void purge_line_number_notes): New. + * sched-rgn.c (gate_handle_sched, rest_of_handle_sched, + gate_handle_sched2, rest_of_handle_sched2, pass_sched, + pass_sched2): New. + * tracer.c (gate_handle_tracer, rest_of_handle_tracer, + pass_tracer): New. + * value-prof.c (gate_handle_value_profile_transformations, + rest_of_handle_value_profile_transformations, + pass_value_profile_transformations): New. + * var-tracking.c (gate_handle_var_tracking, + pass_variable_tracking): New. + * web.c (gate_handle_web, rest_of_handle_web, pass_web): New. + + * passes.c (open_dump_file, close_dump_file, rest_of_handle_final, + rest_of_handle_delay_slots, rest_of_handle_stack_regs, + rest_of_handle_variable_tracking, rest_of_handle_machine_reorg, + rest_of_handle_old_regalloc, rest_of_handle_regrename, + rest_of_handle_reorder_blocks, rest_of_handle_partition_blocks, + rest_of_handle_sms, rest_of_handle_sched, rest_of_handle_sched2, + rest_of_handle_gcse2, rest_of_handle_regmove, + rest_of_handle_tracer, rest_of_handle_if_conversion, + rest_of_handle_if_after_combine, rest_of_handle_if_after_reload, + rest_of_handle_web, rest_of_handle_branch_prob, + rest_of_handle_value_profile_transformations, rest_of_handle_cfg, + rest_of_handle_jump_bypass, rest_of_handle_combine, + rest_of_handle_life, rest_of_handle_cse, rest_of_handle_cse2, + rest_of_handle_gcse, rest_of_handle_loop_optimize, + rest_of_handle_loop2, rest_of_handle_branch_target_load_optimize, + rest_of_handle_mode_switching, rest_of_handle_jump, + rest_of_handle_eh, rest_of_handle_stack_adjustments, + rest_of_handle_flow2, rest_of_handle_jump2, + rest_of_handle_peephole2, rest_of_handle_postreload, + rest_of_handle_shorten_branches, rest_of_clean_state, + rest_of_compilation): Remove. + + * cgraphunit.c (ipa_passes): Moved from tree-optimize.c. + * passes.c (dump_flags, in_gimple_form, all_passes, + all_ipa_passes, all_lowering_passes, register_one_dump_file, + register_dump_files, next_pass_1, last_verified, execute_todo, + execute_one_pass, execute_pass_list, execute_ipa_pass_list): Moved + from tree-optimize.c. + (init_optimization_passes): Moved from tree-optimize.c, + adding the RTL optimizations. + * tree-dump.h (dump_info_p, dump_flag): Moved from tree.h. + * tree-optimize.c (dump_flags, in_gimple_form, all_passes, + all_ipa_passes, all_lowering_passes, register_one_dump_file, + register_dump_files, next_pass_1, last_verified, execute_todo, + execute_one_pass, execute_pass_list, execute_ipa_pass_list, + init_tree_optimization_passes, ipa_passes): Delete. + * tree-pass.h (enum tree_dump_index): Moved from tree.h, removing + the RTL dumps. + (TDF_*, get_dump_file_name, dump_enabled_p, dump_initialized_p, + dump_begin, dump_end, dump_node, dump_switch_p, dump_flag_name): Moved + from tree.h. + (ipa_passes): Remove. + (all_passes, all_ipa_passes, all_lowering_passes): Now extern. + * tree.h (enum tree_dump_index, TDF_*, get_dump_file_name, + dump_enabled_p, dump_initialized_p, dump_begin, dump_end, dump_node, + dump_switch_p, dump_flag_name): Moved to tree-pass.h. + (dump_info_p, dump_flag): Moved to tree-dump.h. + + * Makefile.in: Adjust dependencies for tree-pretty-print.c, + cgraph.c, opts.c. + * passes.c (finish_optimization_passes): Use dump_begin + and dump_end, TDI_end. + (gate_rest_of_compilation): New. + (pass_rest_of_compilation): Use it. + (gate_postreload, pass_postreload): New. + * toplev.c (general_init): Rename init_tree_optimization_passes. + * toplev.h (init_tree_optimization_passes): Rename to + init_optimizations_passes. + * tree-dump.c (dump_flag): Make static. + (dump_files): Remove RTL dumps. + * tree-optimize.c (pass_all_optimizations, pass_early_local_passes, + pass_cleanup_cfg, pass_free_cfg_annotations, + pass_cleanup_cfg_post_optimizing, pass_free_datastructures, + pass_init_datastructures, pass_fixup_cfg): Make non-static. + * tree-pretty-print.c: Include tree-pass.h. + * cgraph.c: Include tree-dump.h. + +2005-07-04 Daniel Berlin + + * tree-ssa-structalias.c (get_constraint_exp_from_ssa_var): + Only fall back to saying it points to readonly memory if + we can't do better. + +2005-07-05 Kazuhiro Inaoka + + * config/m32r/m32r-protos.h: Remove m32r_finalize_pic. + * config/m32r/m32r.c (m32r_compute_frame_size, + m32r_expand_prologue): Take current_function_profile into + account whenever we reference + current_function_uses_pic_offset_table. + (m32r_finalize_pic): Remove. + * config/m32r/m32r.h (FINALIZE_PIC): Likewise. + +2005-07-05 Kazu Hirata + + * Makefile.in (stamp-as): Use $(ORIGINAL_AS_FOR_TARGET) + instead of $<. Don't remove ./as if it already exists. + +2005-07-04 John David Anglin + + PR target/21723 + * pa.md: Remove fcpy alternative from movhi and movqi patterns. + * pa32-regs.h (HARD_REGNO_NREGS): Return two floating point registers + for complex modes when generating code for PA 1.0. + (VALID_FP_MODE_P): New macro. + (HARD_REGNO_MODE_OK): Use VALID_FP_MODE_P. Use non-overlapping register + sets for all general and floating point modes. Align wide floating + point modes to even register boundaries to comply with architectural + requirements. + (CLASS_MAX_NREGS): Update to align with change to HARD_REGNO_NREGS. + * pa64-regs.h (HARD_REGNO_NREGS): Update comment and formatting. + (VALID_FP_MODE_P): New macro. + (HARD_REGNO_MODE_OK): Use VALID_FP_MODE_P. Use non-overlapping register + sets for all general and floating point modes. Align wide floating + point modes to even register boundaries to comply with architectural + requirements. + +2005-07-04 Diego Novillo + + * tree-dump.c (dump_files): Initialize dump number for .cgraph + to 0. + +2005-07-04 Diego Novillo + + * tree-ssa-structalias.c: Don't include expr.h. + +2005-07-04 Diego Novillo + + * tree-iterator.h (TSI_NEW_STMT, TSI_SAME_STMT): Fix + comments. + +2005-07-04 Daniel Berlin + + Fix PR tree-optimization/22279 + + * tree-ssa-structalias.c (offset_overlaps_with_access): Use + correct operator. + +2005-07-04 J"orn Rennecke + + * sh.c (output_ieee_ccmpeq): Replace "\\;" with "\n\t". + +2005-07-03 Joseph S. Myers + + * bb-reorder.c, c-pch.c, c-pragma.c, c.opt, cfghooks.c, cfgloop.c, + cfgrtl.c, cgraphunit.c, config/c4x/c4x.c, config/cris/cris.c, + config/frv/frv.c, config/host-darwin.c, config/iq2000/iq2000.c, + config/lynx.h, config/m68k/m68k.c, config/pa/pa.c, config/sh/sh.h, + config/stormy16/stormy16.c, config/v850/v850.c, + config/vax/netbsd-elf.h, coverage.c, dwarf2out.c, emit-rtl.c, + except.c, gcc.c, tree-cfg.c, tree-eh.c, tree-ssa.c, xcoffout.c: + Avoid "." or "\n" at end of diagnostics and capital letters at + start of diagnostics. + * combine.c, cse.c: Don't translate dump file output. + * toplev.c (print_version): Only translate output if going to + stderr. + +2005-07-03 Kazu Hirata + + * c-decl.c, tree-object-size.c, tree-vectorizer.c, + config/arm/unwind-arm.c, config/arm/unwind-arm.h: Fix comment + typos. + +2005-07-03 John David Anglin + + * pa.c (fix_range): Fix typo in comment. + +2005-07-03 Kazu Hirata + + * tree-vrp.c (extract_range_from_assert): Replace + fold (build (...)) with fold_build2. + +2005-07-03 Kaveh R. Ghazi + + * c-format.c (gcc_gfc_format_type, gcc_gfc_flag_pairs, + gcc_gfc_char_table, init_dynamic_gfc_info): New. + (format_types_orig, handle_format_attribute): Add support for + format "gcc_gfc". + +2005-07-03 Gabriel Dos Reis + + * varasm.c (assemble_variable): Fix format specifier thinko. + +2005-07-03 Ira Rosen + + PR tree-optimization/22029 (and 22135) + * tree-pretty-print.c (dump_generic_node): Check that the node is not + a phi node before calling dump_vops. + +2005-07-02 Gabriel Dos Reis + + * tree-dump.h (dump_string_field): Declare. + * tree-dump.c: Use it instead of dump_string. + (dump_string_field): Make non-static. + +2005-07-03 Kaz Kojima + + * config/sh/sh.c (sh_output_mi_thunk): Initialize and clean + up the minimal CFG stuff always when optimize > 0. Call + split_all_insns_noflow in PIC case if needed. + +2005-07-02 Gabriel Dos Reis + Christian Ehrhardt + + PR c++/18279 + * c-decl.c (c_write_global_declarations): Dump contents of + external scope to. + * tree-dump.c (dequeue_and_dump): Dump abstract origin of a decl. + , , , , + , : Add. + (dump_enabled_p): Return TRUE if PHASE is TDI_all and any dump + is enabled. + +2005-07-03 Joseph S. Myers + + * c-common.h (GCC_DIAG_STYLE): Define. + * c-tree.h (GCC_DIAG_STYLE): Do not define. Change minimum GCC + version for format checking to 4.1. + * c-format.c: Include toplev.h after c-common.h. + (enum format_type): Add gcc_tdiag_format_type. + (gcc_tdiag_length_specs, gcc_tdiag_flag_pairs, + gcc_tdiag_flag_specs, gcc_tdiag_char_table): New. + (format_types_orig): Add gcc_tdiag. + (init_dynamic_diag_info): Support gcc_tdiag formats. + (handle_format_attribute): Likewise. + * toplev.h (NO_FRONT_END_DIAG, ATTRIBUTE_GCC_FE_DIAG): Remove. + (GCC_DIAG_STYLE): Default to __gcc_tdiag__. Change minimum GCC + version for format checking to 4.1. + (warning0, warning, error, pedwarn, sorry): Use + ATTRIBUTE_GCC_DIAG. + * config/rs6000/rs6000.c (altivec_expand_builtin), varasm.c + (finish_aliases_1): Do not use %qE. + * config/arm/arm.c, config/i386/i386.c, config/mmix/mmix.c, + config/pdp11/pdp11.c, stor-layout.c, tree-eh.c, tree-ssa.c: + Correct format bugs. + * config/v850/v850-protos.h (v850_output_aligned_bss): Change size + parameter to unsigned HOST_WIDE_INT. + * config/v850/v850.c (v850_output_aligned_bss): Likewise. + +2005-07-02 David Edelsohn + + PR middle-end/21742 + * expr.c (write_complex_part): Use adjust_address for MEM. + (read_complex_part): Same. + +2005-07-02 Daniel Berlin + + Fix PR tree-optimization/22280 + + * tree-sra.c (generate_element_init): Remove useless loop. + +2005-07-02 Richard Henderson + + * config/alpha/alpha.c (alpha_legitimize_address): Check for + TLS_MODEL_NONE. + (alpha_stdarg_optimize_hook): Use DECL_UID with va_list_vars. + +2005-07-02 Andrew Pinski + + PR middle-end/14490 + * fold-const.c (fold_binary): Handle the return value of + fold_to_nonsharp_ineq_using_bound if we get back the same operand back. + Implement "X +- C1 CMP C2" folding to "X CMP C2 -+ C1". + +2005-07-02 Jeff Law + + * tree-ssa-dom.c (find_equivalent_equality_comparison): Do not + a eliminate type conversion which feeds an equality comparison + if the original type or either operand in the comparison is a + function pointer. + +2005-07-02 Joseph S. Myers + + * c.opt, common.opt, config/bfin/bfin.opt, config/pa/pa.opt, + config/rs6000/rs6000.opt, params.def: Remove "." from end of help + texts. + * config/avr/avr.c: Do not use '`' as left quote. + * config/rs6000/rs6000.c, config/s390/s390.c, opts.c, tree.c: + Remove "." from end of diagnostics. Make diagnostics start with + lowercase letter. + +2005-07-02 Zack Weinberg + Joseph S. Myers + + * toplev.c (default_tree_printer): Handle setting location with + '+' flag. + * c-objc.common.c (c_tree_printer): Likewise. + * c-format.c (gcc_diag_flag_specs): Add '+'. + (gcc_cdiag_char_table): Allow '+' flag for tree formats. + (format_types_orig): Allow '+' flag for gcc_diag and gcc_cdiag + formats. + * c-common.c, c-decl.c, c-objc-common.c, c-pragma.c, + config/arm/pe.c, config/i386/winnt.c, config/ia64/ia64.c, + config/mcore/mcore.c, config/sh/symbian.c, config/sol2.c, + config/v850/v850.c, function.c, stor-layout.c, toplev.c, + tree-inline.c, tree-optimize.c, tree.c, varasm.c: Use '+' flag + instead of %J or %H. Use 'q' flag for quoting. Avoid '.' at end + of diagnostics. Use %q+D not %s for a decl. Do not pass excess + format arguments where %J is used without %D. + +2005-07-02 Jakub Jelinek + + * gcc.c (LINK_SSP_SPEC): Define. + (link_ssp_spec): New variable. + (LINK_COMMAND_SPEC): Add %(link_ssp). + (static_specs): Add link_ssp_spec. + * configure.ac (TARGET_LIBC_PROVIDES_SSP): New test. + * configure: Rebuilt. + * config.in: Rebuilt. + + * config/rs6000/linux.h (TARGET_THREAD_SSP_OFFSET): Define. + * config/rs6000/linux64.h (TARGET_THREAD_SSP_OFFSET): Likewise. + * config/i386/linux.h (TARGET_THREAD_SSP_OFFSET): Likewise. + * config/i386/linux64.h (TARGET_THREAD_SSP_OFFSET): Likewise. + * config/rs6000/rs6000.md (stack_protect_set, stack_protect_test): + If TARGET_THREAD_SSP_OFFSET is defined, use -0x7010(13) resp. + -0x7008(2) instead of reading __stack_chk_guard variable. + * config/i386/i386.md (UNSPEC_SP_SET, UNSPEC_SP_TEST): Change + number. + (UNSPEC_SP_TLS_SET, UNSPEC_SP_TLS_TEST): New constants. + (stack_protect_set, stack_protect_test): Use *_tls* patterns + if TARGET_THREAD_SSP_OFFSET is defined. + (stack_tls_protect_set_si, stack_tls_protect_set_di, + stack_tls_protect_test_si, stack_tls_protect_test_di): New insns. + + Revert: + 2005-06-27 Richard Henderson + * libgcc-std.ver (GCC_4.1.0): New. + * libgcc.h (__stack_chk_guard): Declare. + (__stack_chk_fail, __stack_chk_fail_local): Declare. + * libgcc2.c (L_stack_chk, L_stack_chk_local): New. + * mklibgcc.in (lib2funcs): Add them. + +2005-07-01 Richard Henderson + + * config/i386/linux-unwind.h (x86_64_fallback_frame_state): Cast to + void * before struct sigcontext *. + (x86_fallback_frame_state): Likewise. + +2005-07-01 James E. Wilson + + * doc/invoke.texi (-funit-at-a-time): Correct grammar in second bullet. + +2005-07-01 Andrew Pinski + + PR tree-opt/22269 + * tree-ssa-reassoc.c (should_transpose): Fix which operand + we check for SSA_NAME for. + +2005-07-01 Daniel Berlin + + Fix PR tree-optimization/22071 + + * tree-ssa-structalias.c (offset_overlaps_with_access): New + function. + (get_constraint_for_component_ref): Use it. + +2005-07-01 Andrew Pinski + + PR other/22264 + * diagnostic.c (diagnostic_report_current_module): Use pp_newline to + print out the last new line. + +2005-07-01 Hans-Peter Nilsson + + * config/cris/cris.md (CRIS_CC0_REGNUM): New constant. + Swap numbers for CRIS_AP_REGNUM and CRIS_MOF_REGNUM. + * config/cris/cris.c (cris_conditional_register_usage): Adjust + reg_names[CRIS_CC0_REGNUM] for early CRIS versions. + (cris_print_operand) : Handle CRIS_CC0_REGNUM. + (cris_md_asm_clobbers): Clobber CRIS_CC0_REGNUM for all asms. + * config/cris/cris.h (CRIS_CANONICAL_CC0_REGNUM): New macro. + (enum reg_class): New member CC0_REGS. + (REG_CLASS_FROM_LETTER): Add 'c' for CC0_REGS. + (FIRST_PSEUDO_REGISTER, CALL_USED_REGISTERS, REG_ALLOC_ORDER) + (HARD_REGNO_MODE_OK, MODES_TIEABLE_P, REG_CLASS_NAMES) + (CRIS_SPECIAL_REGS_CONTENTS, REG_CLASS_CONTENTS, REGNO_REG_CLASS) + (PREFERRED_RELOAD_CLASS, REGISTER_NAMES, DBX_REGISTER_NUMBER): + Adjust for register now described. + +2005-07-01 Jakub Jelinek + + PR target/22262 + * config/i386/i386.md (stack_protect_test_si, + stack_protect_test_di): Add earlyclobber for scratch 3. + * config/rs6000/rs6000.md (stack_protect_testsi, + stack_protect_testdi): Add earlyclobber for scratch 3, + remove earlyclobber from scratch 4. + +Older entries for 2005 can be found in ChangeLog-2005. diff --git a/gcc/ChangeLog-2005 b/gcc/ChangeLog-2005 index 89f189c7042..78c97092827 100644 --- a/gcc/ChangeLog-2005 +++ b/gcc/ChangeLog-2005 @@ -1,3 +1,13176 @@ +2005-12-31 Andrew Pinski + + PR tree-opt/25612 + * tree-ssa-pre.c (compute_avail): Treat the static chain decl as a + parameter and pretend that it is defined in the entry basic block. + +2005-12-30 Kazu Hirata + + * tree-outof-ssa.c (_elim_graph): Change the type of STACK to + VEC(int,heap). + (new_elim_graph, delete_elim_graph, elim_forward, + eliminate_phi): Use the VEC API on STACK. + +2005-12-29 Daniel Berlin + + * tree.h (VALUE_HANDLE_VUSES): New. + (struct tree_value_handle): Add vuses. + + * tree-vn.c (struct val_expr_pair_d): Remove stmt, add vuses. + (vn_compute): Remove stmt argument. + Don't use vuses in hash value computation. + (val_expr_pair_eq): Compare vuse lists. + (copy_vuses_from_stmt): New function. + (shared_vuses_from_stmt): Ditto. + (vn_add): Rewrite in terms of vn_add_with_vuses. + (vn_add_with_vuses): New function. + (vn_lookup): Rewrite in terms of vn_lookup_with_vuses. + (vn_lookup_with_vuses): New function. + (vuses_compare): New function. + (print_creation_to_file): Ditto. + (vn_lookup_or_add): Rewrite to handle vuses. + (sort_vuses): New function. + (vn_lookup_or_add_with_vuses): Ditto. + (vn_init): Initialize shared_lookup_vuses. + (vn_delete): Free shared_lookup_vuses. + + * tree-ssa-pre.c: Update todo list. + (bb_value_sets_t): Add rvuse_in, rvuse_out, rvuse_gen, and + rvuse_kill. + (RVUSE_IN): New macro. + (RVUSE_GEN): Ditto. + (RVUSE_KILL): Ditto. + (RVUSE_OUT): Ditto. + (modify_expr_node_pool): New function. + (pretemp): New. + (storetemp): Ditto. + (mergephitemp): Ditto. + (prephitemp): Ditto. + (struct expr_pred_trans_d): Add vuses member. + (expr_pred_trans_eq): Compare vuses. + (phi_trans_lookup): Add vuses argument. + (phi_trans_add): Ditto. + (translate_vuses_through_block): New function. + (phi_translate): Use vuses to ask about those expressions that can + have vuses. + Properly translate virtual uses through phis, and use + vn_lookup_or_add_with vuses. Handle tcc_reference. + (phi_translate_set): Don't add pointless translations to the + cache. + (get_representative): New function. + (vuses_dies_in_block_x): Ditto. + (valid_in_set): Add block argument. Check virtual use validity. + (clean): Add block argument. Update call to valid_in_set + (compute_antic_aux): Update call to clean. + (dump_bitmap_of_names): New function. + (compute_vuse_representatives): Ditto. + (compute_rvuse): Ditto. + (can_value_number_call): Modified to accept calls with vuses. + (can_value_number_operation): New function. + (can_PRE_operation): Ditto. + (need_creation): New vector of stores that may need creation. + (find_or_generate_expression): use can_PRE_operation. + (create_expression_by_pieces): Handle INDIRECT_REF. + Only create one temp until we have to change types. + Mark new vars for renaming. + (insert_into_preds_of_block): Ignore loopiness of loads. + Use can_PRE_operation. + Only create one temp until we have to chnge types. + (insert_aux): Use can_PRE_operation. + Don't pass name to insert_into_preds_of_block. + (insert_extra_phis): Only use one temp until we have to change + types. + (poolify_tree): New function. + (modify_expr_template): New var. + (poolify_modify_expr): New function. + (insert_fake_stores): Ditto. + (realify_fake_stores): Ditto. + (compute_avail): Use can_value_number_operation. + (mark_operand_necessary): Return NULL for non-SSA names. + (remove_dead_inserted_code): Update comment. + (init_pre): Initialize pretemp, need_creation, storetemp, + mergephitemp, prephitemp. + Create modify_expr_node_pool. + (fini_pre): Free modify_expr_node_pool and need_creation array. + (execute_pre): Call insert_fake_stores, compute_rvuse, and + realify_fake_stores. + * tree-flow.h (vn_compute): Fix prototype. + (vn_add): Ditto. + (vn_lookup): Ditto. + (sort_vuses): New. + (vn_lookup_or_add_with_vuses): Ditto. + (vn_add_with_vuses): Ditto. + (vn_lookup_with_vuses): Ditto. + * passes.c (pass_may_alias): Add. + +2005-12-30 Gabriel Dos Reis + + * c-pretty-print.h (struct c_pretty_print_info): Add new member + "constant". + (pp_constant): New macro. + * c-pretty-print.c (pp_c_pretty_printer_init): Set pp->constant. + +2005-12-30 John David Anglin + + PR fortran/25586 + * pa.md: Remove REG_POINTER check from REG+REG peephole2 floating-point + store patterns. + +2005-12-29 Kenneth Zadeck + + * bitmap.c (bitmap_element_free, bitmap_element_link, + bitmap_elt_insert_after, bitmap_and, bitmap_and_compl, + bitmap_and_compl, bitmap_ior, bitmap_ior_into, bitmap_xor, + bitmap_xor_into): Added code to properly maintain the variants + associated with the CURRENT and HEAD fields. + (bitmap_popcount, bitmap_clear_range, bitmap_compl_and_into): New + functions. + * bitmap.h: Added defs for bitmap_popcount, bitmap_clear_range, + and bitmap_compl_and_into. + + +2005-12-29 Mike Stump + + * doc/invoke.texi (Objective-C and Objective-C++ Dialect Options + -fobjc-exceptions): Don't imply this doesn't work with the GNU + runtime. + +2005-12-29 Nathan Sidwell + + * varasm.c (get_section): Use gcc_assert. + +2005-12-29 Paul Brook + + * config/m68k/m68k.h (RETURN_ADDR_RTX): Define. + * config/m68k/m68k.c (m68k_initial_elimination_offset): Remove FIXME. + Include offset due to FIRST_PARM_OFFSET. + +2005-12-29 Paul Brook + + * config/m68k/lb1sf68.asm (__cmpdf2): Fix typo in immediate mask. + Create wrapper and rename body... + (__cmpdf2_internal): ... to this. Return correct value for unordered + result. + (__cmpsf2): Create wrapper and rename body... + (__cmpsf2_internal): ... to this. Return corerct value for unordered + result. + (__eqdf2, __nedf2, __gtdf2, __gedf2, __ltdf2, __ledf2): Use + __cmpdf2_internal. + (__eqsf2, __nesf2, __gtsf2, __gesf2, __ltsf2, __lesf2): Use + __cmpsf2_internal. + +2005-12-29 Paul Brook + + * config/m68k/fpgnulib.c (__extendsfdf2): Handle negative zero. + (__truncdfsf2): Ditto. + (__extenddfxf2): Ditto. + (__truncxfdf2): Ditto. + * config/m68k/lb1sf68.asm (__addsf3): Return -0.0 for -0.0 + -0.0. + (__adddf3): Ditto. + +2005-12-29 Daniel Jacobowitz + Paul Brook + + * config/m68k/m68k.c (m68k_output_pic_call): Don't use bsr.l for + !TARGET_68020. + * config/m68k/t-m68kelf (EXTRA_PARTS): Remove. + (EXTRA_MULTILIB_PARTS): Set. + * config/m68k/t-uclinux (EXTRA_PARTS): Remove. + (EXTRA_MULTILIB_PARTS): Set. + +2005-12-29 Alan Modra + + PR target/25572 + * config/rs6000/rs6000.c (create_TOC_reference): Set regs_ever_live. + +2005-12-28 Nathan Sidwell + + * config.gcc (mt-*-*): Add --with-arch support. + (--with): Print accepted options on error. + * config/mt/mt.h (OPTION_DEFAULT_SPECS): Define. + + * config/mt/mt.c (DEF_VEC_P(basic_block), + DEF_VEC_ALLOC_P(basic_bloc,heap)): Remove from here. + +2005-12-28 Daniel Berlin + + Fix PR tree-optimization/25394 + * fold-const.c (fold_checksum_tree): Guard + portions of checksumming with correct structure checks. + +2005-12-27 Kazu Hirata + + * global.c, tree-ssa-pre.c: Move DEF_VEC_P(basic_block) and + DEF_VEC_ALLOC_P(basic_block,{gc,heap}) to ... + * basic-block.h: ... here. + +2005-12-27 Roger Sayle + + * fold-const.c (int_const_binop): Return NULL_TREE when an expression + can't be evaluated at compile-time (instead of calling abort). + Return NULL_TREE for division (and modulus) by zero. + (const_binop): Return NULL_TREE for floating point operators that + aren't handled by real_arithmetic. + (fold_binary): Eliminate "wins" variable, and "binary" label, by + folding operators with constant operands early. Assert that + operands are non-NULL. + +2005-12-27 Kazu Hirata + + * tree-vrp.c (extract_range_from_binary_expr): Use + build_int_cst instead of fold_convert. + +2005-12-26 Mark Mitchell + + PR c++/23171, c++/23172, c++/25417. + * c-decl.c (compound_literal_number): Remove. + (build_compound_literal): Use set_compound_literal_name. + * c-common.c (compound_literal_number): New variable. + (set_compound_literal_name): New function. + * c-common.h (set_compound_literal_name): Declare. + +2005-12-26 Kazu Hirata + + PR tree-optimization/25125 + * convert.c (convert_to_integer): Don't narrow the type of a + PLUX_EXPR or MINUS_EXPR if !flag_wrapv and the unwidened type + is signed. + +2005-12-26 Graham Stott + + PR middle-end/25568 + * combine.c (simplify_shift_const_1 ):Fix enable-checking + rtl bootstrap failure. + +2005-12-25 Kazu Hirata + + * final.c (compute_alignments): Make it static. + * gcse.c (gcse_main, bypass_jumps): Likewise. + * web.c (web_main): Likewise. + * output.h: Remove the prototype for compute_alignments. + * rtl.h: Remove the prototypes for web_main, gcse_main, and + bypass_jumps. + +2005-12-24 Roger Sayle + + * expr.c (force_operand): Use expand_fix and expand_float to + implement integer <-> FP conversions instead of convert_to_mode. + +2005-12-24 Mark Mitchell + + PR c++/23171 + * varasm.c (initializer_constant_valid_p): An ADDR_EXPR of a + CONSTRUCTOR is invalid. + +2005-12-23 Daniel Berlin + + * tree-pass.h (pass_eliminate_useless_stores): Remove. + * tree-ssa-pre.c (is_copy_stmt): Ditto. + (follow_copies_till_vuse): Ditto. + (do_eustore): Ditto. + (gate_eustores): Ditto. + (pass_eliminate_useless_stores): Ditto. + * passes.c (init_optimization_passes): Ditto. + +2005-12-23 Paolo Bonzini + + * combine.c (simplify_shift_const): Fix typo. Use, whenever + applicable, simplify_const_binary_operation. + + (simplify_shift_const): Leave only the fallback + case when no simplification is possible. Extract to... + (simplify_shift_const_1): ... here. Always create a new + RTX instead of substituting. Remove the signed_count variable. + Return NULL_RTX if no substitution is possible. + + (simplify_and_const_int): Leave only the fallback + case when no simplification is possible. Extract to... + (simplify_and_const_int_1): ... here. Always create a new + RTX instead of substituting. Return NULL_RTX if no substitution + is possible. + + (force_to_mode, simplify_comparison): Don't pass a non-NULL first + parameter to simplify_and_const_int and simplify_shift_const, + unless it is equal to the expected non-simplified result. + +2005-12-23 Jakub Jelinek + + PR target/25005 + * regrename.c (replace_oldest_value_reg): Use validate_change with + IN_GROUP set to 1 instead of doing direct modifications. + (copyprop_hardreg_forward_1): Likewise. If any replace_oldest_* + replacements have been performed on an instruction, use + apply_change_group (). + +2005-12-23 Hans-Peter Nilsson + + * config/cris/arit.c (do_31div): Clarify what "31" refers to. + [L_divsi3] (__Udiv): Don't use as inline function. + [L_modsi3] (__Umod): Ditto. + (__Div): Rearrange to call do_31div directly instead of __Udiv. + (__Mod): Similarly regarding __Umod. + + PR target/24342 + * config/cris/cris.c (cris_split_movdx): Add REG_INC notes for + emitted insns with post-increments. + (cris_expand_epilogue): Ditto. + +2005-12-22 Jakub Jelinek + Richard Henderson + + Merge from gomp-branch. + * builtins.def: Move all DEF_SYNC_BUILTIN to ... + * sync-builtins.def: ... new file. + (BUILT_IN_FETCH_AND_ADD_16, + BUILT_IN_FETCH_AND_SUB_16, BUILT_IN_FETCH_AND_OR_16, + BUILT_IN_FETCH_AND_AND_16, BUILT_IN_FETCH_AND_XOR_16, + BUILT_IN_FETCH_AND_NAND_16, BUILT_IN_ADD_AND_FETCH_16, + BUILT_IN_SUB_AND_FETCH_16, BUILT_IN_OR_AND_FETCH_16, + BUILT_IN_AND_AND_FETCH_16, BUILT_IN_XOR_AND_FETCH_16, + BUILT_IN_NAND_AND_FETCH_16, BUILT_IN_BOOL_COMPARE_AND_SWAP_16, + BUILT_IN_VAL_COMPARE_AND_SWAP_16, BUILT_IN_LOCK_TEST_AND_SET_16, + BUILT_IN_LOCK_RELEASE_16): New builtins. + * builtin-types.def (BT_I16, BT_FN_I16_VPTR_I16, + BT_FN_BOOL_VPTR_I16_I16, BT_FN_I16_VPTR_I16_I16): Add. + * builtins.c (expand_builtin): Handle sync BUILT_IN_*_16 builtins. + * c-common.c (enum c_builtin_type): Move to top-level from + c_common_nodes_and_builtins enum builtin_type. + (builtin_types): Move from c_common_nodes_and_builtins. + (def_fn_type): New. + (c_common_nodes_and_builtins): Use it. + (def_builtin_1): Check for error_mark_node. + (sync_resolve_size): Handle also 128 bit sync builtins. + * Makefile.in (BUILTINS_DEF): New. Use it instead of builtins.def. + + * config/i386/i386.h (x86_cmpxchg8b, x86_cmpxchg16b): New decls. + (TARGET_CMPXCHG8B, TARGET_CMPXCHG16B): Define. + * config/i386/i386.c (x86_cmpxchg8b, x86_cmpxchg16b): New variables. + * config/i386/sync.md (CASMODE, DCASMODE): New mode macros. + (doublemodesuffix, DCASHMODE): New mode attrs. + (sync_compare_and_swap): Change into expand, use CASMODE + instead of IMODE, if mode is wider than a word, expand into + sync_double_compare_and_swap*. + (*sync_compare_and_swap): New insn. + (sync_double_compare_and_swap): Likewise. + (*sync_double_compare_and_swapdi_pic): Likewise. + (sync_compare_and_swap_cc): Use CASMODE instead of IMODE, if + mode is wider than a word, expand into + sync_double_compare_and_swap_cc*. + (sync_double_compare_and_swap_cc): New insn. + (*sync_double_compare_and_swap_ccdi_pic): Likewise. + +2005-12-22 Richard Henderson + + * config/i386/mmintrin.h (_mm_add_si64): Only define for SSE2. + (_mm_sub_si64): Likewise. + * config/i386/xmmintrin.h (_mm_shuffle_pi16, _m_pshufw): Likewise. + +2005-12-23 Alan Modra + + PR rtl-optimization/25432 + * reload1.c (eliminate_regs_in_insn): Update insn code on + successfully re-recognizing modified insn. + +2005-12-22 Richard Guenther + + * tree.c (tree_fold_gcd): Use build_int_cst where appropriate. + * tree-ssa-loop-ivcanon.c (create_canonical_iv): Likewise. + * varasm.c (array_size_for_constructor): Likewise. + * fold-const.c (size_diffop, invert_truthvalue, + optimize_bit_field_compare, make_range, build_range_check, + fold_cond_expr_with_comparison, fold_truthop, + fold_single_bit_test_into_sign_test, fold_binary): Likewise. + +2005-12-22 Dale Johannesen + + * config/i386/sse.md (sse_movhlps): Reverse operands for + 2nd and 3rd alternatives. + +2005-12-22 Andrew Pinski + + PR tree-opt/25513 + * tree-dfa.c (make_rename_temp): Set DECL_COMPLEX_GIMPLE_REG_P complex + variables. + +2005-12-22 Zdenek Dvorak + Steven Bosscher + + * df.c (df_bitmaps_free): Only work for bbs for that structures are + allocated. + (df_bb_modify): Realloc tables to the new index. + (df_find_use): New function. + (df_find_def, df_reg_used): Handle subregs. + * df.h (df_find_use): Declare. + + * loop-invariant.c: Include hashtab.h. + (struct invariant): Remove processed field, add eqto and reg fields. + (struct invariant_expr_entry): New. + (invariant_for_use, hash_invariant_expr_1, invariant_expr_equal_p, + hash_invariant_expr, eq_invariant_expr, find_or_insert_inv, + find_identical_invariants, merge_identical_invariants): New functions. + (create_new_invariant): Return the new invariant. Initialize new + fields. + (find_invariants): Call merge_identical_invariants. + (get_inv_cost, best_gain_for_invariant, set_move_mark, + move_invariant_reg): Handle equivalent invariants. + * Makefile.in (loop-invariant.o): Add HASHTAB_H dependency. + +2005-12-22 Volker Reichelt + + PR c++/23333 + * c-lex.c (c_lex_with_flags): Add PURE_ZERO to cpp_flags if + number is a single digit '0'. + +2005-12-22 Kazu Hirata + + PR tree-optimization/23518 + * fold-const.c (make_range): Don't move a constant to the + other side of the comparison if the type is signed and -fwrapv + is given. + +2005-12-22 Kazu Hirata + + * tree-vrp.c (extract_range_from_binary_expr): Clean up uses + of vr0.type. + +2005-12-21 Joseph S. Myers + + PR middle-end/24998 + * config/arm/t-arm-elf (LIB1ASMFUNCS): Add _floatundidf and + _floatundisf. + +2005-12-21 Andrew Haley + + PR middle-end/25121 + * recog.c (peephole2_optimize): Don't peephole any + RTX_FRAME_RELATED_P insns. + +2005-12-21 Kazu Hirata + + * tree-data-ref.c (estimate_niter_from_size_of_data): Replace + fold_build2 with fold_binary. + * tree-ssa-ccp.c (visit_assignment, maybe_fold_stmt_addition): + Replace fold_build1 with fold_unary. + * tree-ssa-reassoc.c (optimize_ops_list): Replace fold_build2 + with fold_binary. + +2005-12-21 Steven Bosscher + + PR rtl-optimization/25196 + * postreload-gcse.c (record_last_set_info): Notice stack pointer + changes in push insns without REG_INC notes. + +2005-12-21 Kazu Hirata + + PR tree-optimization/25382. + * tree-vrp.c (extract_range_from_binary_expr): Extract a range + from BIT_AND_EXPR. + +2005-12-21 Janis Johnson + Ben Elliston + + * configure.ac: Enable C extension for decimal float if invoked + with --enable-decimal-float. + * doc/install.texi (Configuration): Document it. + * configure, config.in: Regenerate. + +2005-12-20 Mike Stump + + * config/darwin.h (TARGET_OPTION_TRANSLATE_TABLE): Handle the + ambiguity between -seg_addr_table and -seg_addr_table_filename. + (WORD_SWITCH_TAKES_ARG): Likewise. + (LINK_SPEC): Likewise. + +2005-12-20 Kenneth Zadeck + + * cfganal.c (flow_reverse_top_sort_order_compute): + Renamed to post_order_compute and additional parameter added which + allows the inclusion of entry and exit blocks into list. + (mark_dfs_back_edges): Fixed comment. + (flow_depth_first_order_compute): Renamed to + pre_and_rev_post_order_compute additional parameter added which + allows the inclusion of entry and exit blocks into list. + * global.c (set_up_bb_rts_numbers): Call to + flow_reverse_top_sort_order_compute renamed to + post_order_compute. + * var-tracking.c (vt_stack_adjustments): Fixed comment. + (vt_find_locations): Call to + flow_depth_first_order_compute renamed to + pre_and_rev_post_order_compute. + * cfgloop.c (flow_find_loops): Ditto. + * tree-ssa-reassoc.c (init_reassoc): Ditto. + * df.c (df_analyze_1, df_analyze_subcfg): Calls to + flow_reverse_top_sort_order_compute renamed to post_order_compute + and calls to flow_reverse_top_sort_order_compute renamed to + post_order_compute. + * basic_block.h: Ditto. + + +2005-12-20 Roger Sayle + Paolo Bonzini + + PR rtl-optimization/25115 + * gcse.c (pre_insert_copy_insn): Fall back to the sole + SET in the insn if there is no SET for an + expression that is equivalent to EXPR. + +2005-12-20 Richard Guenther + + PR middle-end/24306 + * builtins.c (std_gimplify_va_arg_expr): Do not align + va frame for zero sized types. + * config/i386/i386.c (ix86_gimplify_va_arg): Likewise. + +2005-12-20 Kazu Hirata + + PR tree-optimization/25501 + * tree-cfgcleanup.c (merge_phi_nodes): Check that RESULT is + used in the PHI argument corresponding to the edge from BB to + DEST. + +2005-12-20 Richard Guenther + + Revert + 2005-12-02 Richard Guenther + + * tree-cfg.c (mark_used_vars): New function. + (dump_function_to_file): Dump only used VAR_DECLs. + +2005-12-19 Roger Sayle + + * combine.c (try_combine): Improve splitting of binary operators + by taking advantage of reassociative transformations. + +2005-12-19 Jeff Law + + * tree-ssa-dom.c (thread_across_edge): Do not use local_fold. + Strip away all type conversions after simplifying the + condition. + + * tree-cfgcleanup.c (merge_phi_nodes): Allow merging in some + cases the forwarder block dominates the destination. + +2005-12-19 DJ Delorie + + * reload1.c (spill_failure): Dump reload data to dump file. + (find_reload_regs): Likewise. + +2005-12-19 Zdenek Dvorak + + PR tree-optimization/24793 + * tree-ssa-loop-ivopts.c (get_ref_tag): Remember the + original reference if there are subvars. + * tree-ssa-operands.c (get_tmr_operands): Handle subvars. + +2005-12-19 Kenneth Zadeck + + * df.c (df_analyze_1, df_analyze_subcfg, iterative_dataflow): + Corrected basic block number calculations for changes in entry and + exit numbering. + +2005-12-19 Zdenek Dvorak + + * tree-flow.h (struct var_ann_d): Change type of + may_aliases field to VEC(tree, gc) *. + (may_aliases): Declaration changed. + * tree-ssa-alias.c (group_aliases, add_may_alias, + replace_may_alias, dump_may_aliases_for, + is_aliased_with, add_type_alias, new_type_alias): + Work with VEC(tree, gc) * instead of varray. + * tree-flow-inline.h (may_aliases): Ditto. + * tree-ssa.c (verify_flow_insensitive_alias_info, + verify_name_tags): Ditto. + * tree-ssa-operands.c (add_stmt_operand): Ditto. + +2005-12-19 J"orn Rennecke + + * cfgcleanup.c: Temporarily revert patches for PR 20070 till Bernd + comes back. + +2005-12-19 J"orn Rennecke + + * struct-equiv.c (struct_equiv_improve_checkpoint): Fix sets_cc0_p + check. + +2005-12-19 Ben Elliston + + * doc/install.texi (Configuration): Typo in Fortran subheading. + +2005-12-19 Nathan Sidwell + + * config/mt/mt.md (decrement_and_branch_until_zero): Add another + scratch. Correct its reload split. Adjust its peephole. + (doloop_end): Add additional scratch. + (nop): Use 'nop'. + * config/mt/mt.c (MT_INT_ARG_FIRST): Remove. + (mt_asm_output_opcode, mt_print_operand): Use 'nop'. + (mt_function_arg_slotno): Use FIRST_ARG_REGNUM. + (mt_builtin_saveregs): Replace with ... + (mt_setup_incoming_varargs): ... here. Save just the varadic + args. + (mt_va_start): Remove. + (mt_reorg_hazard): Ignore USE insns. Don't call set_noop_p. + (mt_machine_reorg): Split all insns here. + (TARGET_SETUP_INCOMING_VARARGS): Override. + * config/mt/mt.h (TARGET_CPU_CPP_BUILTINS): Define __mt__ only. + Set to CPU type. + (EXPAND_BUILTIN_VA_START): Remove. + +2005-12-17 Kenneth Zadeck + + * flow.c (update_life_info, count_or_remove_death_notes): Fixed + latent bug that could happen if update_life_info was called with a + blocks parameter and the call to cleanup_cfg actually deleted one + of those blocks. + +2005-12-19 Zdenek Dvorak + + * tree-ssa-structalias.c (update_alias_info): Remove handling + of may_be_aliased (SSA_NAME_VAR (op)) case. + +2005-12-19 Zdenek Dvorak + + * tree-flow.h (struct stmt_ann_d): Remove + makes_aliased_loads and makes_aliased_stores fields. + * tree-ssa-ccp.c (likely_value): Do not use makes_aliased_stores + and makes_aliased_loads fields. + * tree-ssa-dom.c (eliminate_redundant_computations): Do not + use makes_aliased_stores. + * tree-ssa-operands.c (clobbered_aliased_loads, + clobbered_aliased_stores, ro_call_aliased_loads): Removed. + (build_ssa_operands, add_stmt_operand, add_call_clobber_ops, + add_call_read_ops): Do not set makes_aliased_stores and + makes_aliased_loads fields. + * tree-ssa.c (verify_ssa): Do not verify makes_aliased_stores + field. + +2005-12-18 Geoffrey Keating + + * config/darwin.h: Don't include darwin-sections.def to declare + global variables; instead create darwin_section_enum. + (darwin_section_enum): New. + (darwin_sections): New. + * config/darwin.c: Don't include darwin-sections.def to define + global variables. + (darwin_sections): New. + (output_objc_section_asm_op): Rewrite to take advantage of + darwin_sections. + (darwin_init_sections): Rewrite to use darwin_sections. + (machopic_output_indirection): Update for darwin_sections array. + (machopic_select_section): Likewise. + (machopic_select_rtx_section): Likewise. + (machopic_asm_out_constructor): Likewise. + (machopic_asm_out_destructor): Likewise. + (darwin_file_end): Likewise. + * config/rs6000/rs6000.c (machopic_output_stub): Likewise. + * config/i386/i386.c (machopic_output_stub): Likewise. + +2005-12-18 Richard Guenther + + PR tree-optimization/25481 + * tree-ssa-structalias.c (handle_ptr_arith): Handle accesses we + don't have a varinfo for. + +2005-12-18 Jon Grimm + Janis Johnson + Ben Elliston + + * optabs.c (init_floating_libfuncs): Handle decimal float modes. + (init_optabs): Handle libfuncs for decimal float. + * genopinit.c (gen_insn): Handle MODE_DECIMAL_FLOAT. + * stor-layout.c (int_mode_for_mode): Likewise. + * simplify-rtx.c (simplify_immed_subreg): Likewise. + (simplify_unary_operation_1): Skip optimisations for decimal float + modes. + * varasm.c (output_constant_pool_2): Handle MODE_DECIMAL_FLOAT. + * emit-rtl.c (gen_const_vector): Add assertion check. + (init_emit_once): Populate const_tiny_rtx with constants in each + decimal float mode. + * expmed.c (extract_high_half, expand_mult_highpart_optab, + expand_mult_highpart): Assert that mode is not a scalar float + mode. + * expr.c (convert_move): Handle conversion between decimal and + binary floats of the same size. + * convert.c (convert_to_real): Consider decimal float types when + folding. + * dwarf2out.c (base_type_die): Use DW_ATE_decimal_float to + describe decimal floating point types. + +2005-12-18 Ulrich Weigand + + PR rtl-optimization/21041 + * reload.c (find_reloads_subreg_address): Replace paradoxical + subreg of MEM by widened access only if the resulting memory + is properly aligned, even on !STRICT_ALIGNMENT targets. + +2005-12-18 Andreas Krebbel + + * tree-cfg.c (tree_flow_call_edges_add): Check for empty basic blocks. + +2005-12-18 Steven Bosscher + + * gcse.c (gcse_main, bypass_jumps): Fix non-GNU-isms from + the 2005-12-17 patch to renumber the entry and exit blocks. + +2005-12-18 Gabriel Dos Reis + + * doc/objc.texi (Type encoding): Fix typo. + +2005-12-17 Gabriel Dos Reis + + * tree-tailcall.c (find_tail_calls): Use XNEW. + * tree-ssa-dom.c (allocate_edge_info): Use XCNEW. + (free_all_edge_infos): Use explicit cast to convert from void *. + (vrp_free): Likewise. + (dom_opt_finalize_block): Likewise. + (record_equivalences_from_incoming_edge): Likewise. + (thread_across_edge): Likewise. Use XCNEWVEC. + (record_cond): Use XCNEW. + (record_conditions): Use XNEWVEC. + (record_edge_info): Use XCNEWVEC. + (lookup_avail_expr): Use XNEW. + (record_range): Likewise. Use GGC_NEW. + * tree-nested.c (var_map_hash): Use explicit cast to convert from + void *. + (var_map_eq): Likewise. + (lookup_field_for_decl): Likewise. + (convert_nonlocal_reference): Likewise. + (convert_local_reference): Likewise. + (convert_nl_goto_reference): Likewise. + (convert_nl_goto_receiver): Likewise. + (convert_call_expr): Likewise. + (convert_tramp_reference): Likewise. + (lookup_tramp_for_decl): Likewise.Use GGC_NEW. + (convert_nl_goto_reference): Likewise. + (lookup_field_for_decl): Use GGC_NEW. + (create_nesting_tree): Use GGC_CNEW. + * tree-ssa-phiopt.c (blocks_in_phiopt_order): Use XNEWVEC. + * tree-ssa-alias.c (init_alias_info): Use XCNEW. + (create_alias_map_for): Likewise. + (setup_pointers_and_addressables): Use XCNEWVEC. + (get_ptr_info): Use GGC_NEW. + (used_part_map_eq): Use explicit cast to convert from void *. + (up_lookup): Likewise. + (up_insert): Use XNEW. + (get_or_create_used_part_for): Use XCNEW. + (get_tmt_for): Likewise. + * tree-ssa-operands.c (ssa_operand_alloc): Use GGC_NEW. + * tree-ssa-pre.c (phi_trans_add): Use XNEW. + (bitmap_set_new): Use explicit cast to convert from void *. + (set_new): Likewise. + (insert_into_set): Likewise. + (pool_copy_list): Likewise. + (phi_translate): Likewise. + (create_value_expr_from): Likewise. + (insert_aux): Use XCNEWVEC. + (compute_avail): Use XNEWVEC. + * tree-ssa-live.c (calculate_live_on_entry): Likewise. + (sort_coalesce_list): Likewise. + (build_tree_conflict_graph): Use XCNEWVEC. + * tree-ssa-dce.c (tree_dce_init): Use XNEWVEC. + * tree-ssa-copy.c (init_copy_prop): Likewise. + (fini_copy_prop): Likewise. + * tree-ssa-uncprop.c (associate_equivalences_with_edges): Use XNEW + and XCNEWVEC. + (record_equiv): Use XNEW. + (uncprop_into_successor_phis): Use explicit cast to convert from + void *. + (uncprop_initialize_block): Likewise. + +2005-12-18 Dorit Nuzman + + PR tree-optimization/24378 + * tree-vect-transform.c (vect_transform_loop): Create single-predecessor + basic-block after loop-versioning. + +2005-12-18 Jeff Law + + * tree-ssa-dom.c (simplify_switch_and_lookup_avail_expr): Code + to simplify SWITCH_EXPR_CODE moved from here to ... + * tree-ssa-forwprop.c (simplify_switch_expr): Here. + (tree-ssa-forward_propagate_single_use_vars): Call + simplify_switch_expr when appropriate. + +2005-12-17 Andrew Pinski + + * doc/objc.texi (Type encoding): Add documentation about encoding + complex types and _Bool. + +2005-12-17 Paul Brook + + * config/m68k/m68k.md (m68k_output_function_prologue): Always call + dwarf2out_def_cfa. Only add space for frame pointer to cfa_offset + when frame_pointer_needed. + +2005-12-17 Gabriel Dos Reis + + * tree-vn.c (vn_add): Use XNEW. + * tree-ssa-ccp.c (ccp_initialize): Use XNEWVEC. + (ccp_fold): Likewise. + (fold_stmt_r): Use explicit cast to convert from void *. + * tree-outof-ssa.c (new_temp_expr_table): Use XCNEWVEC. + (new_temp_expr_table): Likewise. + * gimplify.c (lookup_tmp_var): Use XNEW. + (gimplify_asm_expr): Use explcit cast to convert from void *. + * tree-into-ssa.c (get_ssa_name_ann): Likewise. + (get_def_blocks_for): Use XNEW. + (add_to_repl_tbl): Likewise. + (mark_def_sites): Use explicit cast to convert from void *. + (def_blocks_free): Likewise. + (mark_def_sites_initialize_block): Likewise. + (update_ssa): Use XNEWVEC. + * tree-dfa.c (create_var_ann): Use GGC_NEW. + (create_stmt_ann): Likewise. + (create_tree_ann): Likewise. + (referenced_var_insert): Likewise. + (set_default_def): Likewise. + (referenced_var_lookup_if_exists): Use explicit cast to convert + from void *. + (referenced_var_lookup): Likewise. + (default_def): Likewise. + (set_default_def): Likewise. + * tree-cfg.c (create_bb): Likewise. + (edge_to_cases_cleanup): Likewise. + (verify_node_sharing): Likewise. + (record_switch_edge): Use XNEW. + (cleanup_dead_labels): Use XCNEWVEC. + (tree_duplicate_sese_region): Use XNEWVEC. + * tree-scalar-evolution.c (get_instantiated_value): Likewise. + * tree-ssa.c (verify_ssa): Use XCNEWVEC. + (int_tree_map_eq): Use explicit cast to convert from void *. + * libgcov.c (gcov_exit): Use explicit cast to convert from void *. + (__gcov_execl): Likewise. + (__gcov_execlp): Likewise. + (__gcov_execle): Likewise. + * tree-eh.c (struct_ptr_eq): Likewise. + (struct_ptr_hash): Likewise. + (lookup_stmt_eh_region_fn): Likewise. + (outside_finally_tree): Likewise. + (find_goto_replacement): Likewise. + (make_eh_edge): Likewise. + (mark_eh_edge): Likewise. + (add_stmt_to_eh_region_fn): Use GGC_NEW. + (record_in_finally_tree): Use XNEW. + (maybe_record_in_goto_queue): Use XRESIZEVEC. + (lower_try_finally_copy): Use XCNEWVEC. + +2005-12-17 Gabriel Dos Reis + + * tree-inline.c (copy_body_r): Use explicit cast when converting + from void *. + (copy_bb): Likewise. + (copy_edges_for_bb): Likewise. + (remap_decl_1): Likewise. + (estimate_num_insns_1): Likewise. + * cgraph.c (hash_node): Use explicit cast when converting from + void *. + (eq_node): Likewise. + (cgraph_create_node): Use GGC_CNEW. + (cgraph_create_edge): Use GGC_NEW. + (cgraph_remove_node): Use explicit cast when converting from void *. + (hash_varpool_node): Likewise. + (eq_varpool_node): Likewise. + (cgraph_varpool_node): Use GGC_CNEW. + * lambda.h (lambda_vector_new): Use GGC_CNEWVEC. + * tree-scalar-evolution.c (new_scev_info_str): Use XNEW. + (eq_scev_info): Use explicit cast when converting from void *. + (find_var_scev_info): Likewise. + (set_instantiated_value): Likewise. + (gather_stats_on_scev_database_1): Likewise. + * cfgloop.h (simple_loop_desc): Use explicit cast when converting + from void *. + * c-pch.c (c_common_write_pch): Use XNEWVEC. + (c_common_read_pch): Likewise. + * prefix.c (save_string): Use XNEWVEC. + (translate_name): Use explicit cast when converting from void *. + * c-ppoutput.c (print_line): Use explicit cast when converting + from void *. + (pp_dir_change): Likewise. + * c-cppbuiltin.c (builtin_define_std): Likewise. + (builtin_define_with_value): Likewise. + (builtin_define_with_value_n): Likewise. + (builtin_define_with_int_value): Likewise. + (builtin_define_type_max): Likewise. + * c-incpath.c (add_env_var_paths): Use XNEWVEC. + (add_path): Use XNEW. + * c-format.c (check_format_info_main): Use GGC_NEW. + (format_type_warning): Use explicit cast when converting from void *. + * c-typeck.c (alloc_tagged_tu_seen_cache): Use XNEW instead of + xmalloc. + (start_init): Likewise. + * tree-flow-inline.h (first_referenced_var): Use explicit cast + when converting from void *. + (next_referenced_var): Likewise. + * c-pragma.c (push_alignment): Use GGC_NEW instead of ggc_alloc. + * gensupport.c (lookup_predicate): Use explicit cast to convert + from void *. + (init_predicate_table): Use XCNEW instead of xcalloc. + * genpreds.c (process_define_predicate): Likewise. + +2005-12-17 Danny Berlin + Kenneth Zadeck + + * basic-block.h: Changed basic block numbering so that the entry + block is 0 and the exit block is 1. Changed insn iterators so + that they are tolerant of blocks with no insns. + * regrename.c (copyprop_hardreg_forward): Changed basic block + numbering so that the entry block is 0 and the exit block is 1. + * sched-ebb.c (sehedule_ebbs): Ditto. + * tracer.c (branch_ratio_cutoff): Ditto. + * cfgloopmanip.c (fix_loop_structure): Ditto. + * cfghooks.c (verify_flow_info): Ditto. + * cfg.c (compact_blocks): Ditto. + * reorg.c (dbr_schedule): Ditto. + * flow.c (calculate_global_regs_live, libcall_dead_p): Ditto. + * dominance.c (calc_dfs_tree_nonrec, calc_dfs_tree, + calculate_dominance_info): Ditto. + * cfganal.c (create_edge_list, print_edge_list, + flow_depth_first_order_compute, flow_dfs_compute_reverse_init, + flow_dfs_compute_reverse_add_bb, flow_dfs_compute_reverse_execute, + dfs_enumerate_from): Ditto. + * global.c (global_alloc, set_up_bb_rts_numbers): Ditto. + * ifcvt.c (find_if_case_2): Ditto. + * cfgbuild.c (control_flow_insn_p, count_basic_blocks, + find_basic_blocks): Ditto. + * predict.c (predict_loops, tree_bb_level_predictions, + predict_paths_leading_to, propagate_freq): Ditto. + * lcm.c (compute_antinout_edge, compute_laterin, + compute_available): Ditto. + * function.c (thread_prologue_and_epilogue_insns): Ditto. + * gcse.c (gcse_main, bypass_jumps): Ditto. + * profile.c (compute_branch_probabilities, + compute_value_histograms, branch_prob): Ditto. + * tree-flow-inline.h (bsi_start, bsi_after_labels, + bsi_last): Ditto. + * tree-ssa-phiopt.c (tree_ssa_phiopt, + blocks_in_phiopt_order): Ditto. + * bt-load.c (compute_defs_uses_and_gen, compute_kill, + compute_out, link_btr_uses, migrate_btr_defs): Ditto. + * tree-dfa.c (collect_dfa_stats): Ditto. + * cfgcleanup.c (try_forward_edges, try_optimize_cfg): Ditto. + * cfglayout.c (fixup_reorder_chain): Ditto. + * bb-reorder.c (reorder_basic_blocks, duplicate_computed_gotos, + partition_hot_cold_basic_blocks): Ditto. + * var-tracking.c (vt_find_locations): Ditto. + * cfgloop.c (flow_loops_cfg_dump, flow_loops_find, get_loop_body): Ditto. + * sched-rgn.c (compute_trg_info, init_regions, schedule_insns): Ditto. + * tree-cfg.c (init_empty_tree_cfg, build_tree_cfg, make_edges + label_to_block_fn, print_loop_ir, tree_flow_call_edges_add): Ditto. + * tree-ssa-reassoc.c (init_reassoc): Ditto. + * cfgrtl.c (entry_of_function, rtl_verify_flow_info, + rtl_flow_call_edges_add, rtl_flow_call_edges_add): Ditto. + * df.c (df_analyze_1, hybrid_search, iterative_dataflow): Ditto + and removed unused reverse orders. + * df.h (): Ditto. + * combine.c: Fix document typo. + +2005-12-17 Jan Hubicka + + * tree-flow-inline.h (set_default_def, default_def): Kill. + * tree-dfa.c (default_defs): New global variable. + (default_def, set_default_def): New functions. + * tree-ssa.c (init_tree_ssa, delete_tree_ssa): Add default_def hash. + * tree-flow.h (struct var_ann_d): Kill default_def field. + (set_default_def, default_def): Update prototype. + (default_defs): Declare. + +2005-12-16 Jeff Law + + * tree-ssa-dom.c (update_rhs_and_lookup_avail_expr): Kill. + (simplify_rhs_and_lookup_avail_expr): Kill. Remnants moved + into tree-ssa-forwprop.c. + (eliminate_redundant_computations): Do not call + simplify_rhs_and_lookup_avail_expr anymore. + * tree-ssa-forwprop.c (simplify_not_neg_expr): New function + extracted from remnants of simplify_rhs_and_lookup_avail_expr. + (tree_ssa_forward_propagate_single_use_vars): Call + simplify_not_neg_expr appropriately. + +2005-12-16 Bernd Trog + + PR target/20016 + * config/avr/t-avr: Add -Os to TARGET_LIBGCC2_CFLAGS. + +2005-12-17 Kazu Hirata + + PR rtl-optimization/25456 + * struct-equiv.c (struct_equiv_improve_checkpoint): Replace + info->x_start with p->x_start. + +2005-12-17 Alan Modra + + * simplify-rtx.c (simplify_binary_operation_1 ): Correct bug + introduced 2005-12-16. + +2005-12-16 Steven Bosscher + + PR rtl-optimization/23837 + * optabs.c (expand_binop): For a multi-word rotate, never emit + a REG_NO_CONFLICT block. + +2005-12-16 John David Anglin + + PR middle-end/25457 + * reorg.c (mostly_true_jump): Remove unused variable 'insn'. + + PR target/25447 + * config/pa/pa.c (pa_scalar_mode_supported_p): Handle + MODE_DECIMAL_FLOAT. + +2005-12-16 Steven Bosscher + + * loop-invariant.c (move_loop_invariants): Add missing hunk from + the previous patch, to nullify df. + +2005-12-16 Steven Bosscher + + * reorg.c (mostly_true_jump): Clean up code depending on + LABEL_OUTSIDE_LOOP_P and loop notes. Remove code doing + poor man's branch prediction, instead rely on REG_BR_PROB + notes to be available. + +2005-12-16 Jakub Jelinek + + PR rtl-optimization/24899 + * loop.c (strength_reduce): Don't reduce giv that is not always + computable and where add_val or mult_val can trap. + + * doc/invoke.texi (-fdump-tree-*): Remove note about C/C++ only. + +2005-12-16 Nathan Sidwell + + * config/mt/mt.h (LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Correct + names of ms1-16-002 files. + +2005-12-16 Alan Modra + + PR driver/20425 + * gcc.c (for_each_path): New function. + (add_to_obstack, file_at_path): New functions. + (struct file_at_path_info, struct add_to_obstack_info): New. + (build_search_list): Rewrite using for_each_path. Constify struct + path_prefix pointer. Add do_multi param. Adjust all callers. + (find_a_file): Similarly, but just change existing param to bool. + (putenv_from_prefixes): Add do_multi param, make "paths" const. + (do_spec_path): Delete. + (struct spec_path_info): New. + (spec_path): New function. + (do_spec_1): Use for_each_path for %D and %I. + (find_file): Adjust for find_a_file changes. + (main): Search multilibs for specs. Print multilib lib path for + -print-search-dirs. Likewise add multilibs to LIBRARY_PATH_ENV. + (read_specs): Search multilibs for %include and %include_noerr. + (is_directory): Remove second string param. Change last param + to a bool. Don't use concat. Remove SMALL_ARG_MAX test, always + check path is a dir. Update all callers. + * doc/hostconfig.texi (SMALL_ARG_MAX): Remove mention. + * system.h (SMALL_ARG_MAX): Poison. + * config.gcc: Don't define SMALL_ARG_MAX. + * config.host: Likewise. + * config.build: Likewise. + +2005-12-16 Paolo Bonzini + + * combine.c (combine_simplify_rtx , + simplify_logical): Move simplifications that do not require + additional infrastructure... + * simplify-rtx.c (simplify_unary_operation_1, + simplify_binary_operation_1): ... here. + +2005-12-16 Andreas Krebbel + + PR 24823 + * flow.c (mark_used_dest_regs): New function. + (mark_used_regs): Call mark_used_dest_regs. + +2005-12-16 Jeff Law + + * tree-ssa-dse.c (dse_optimize_stmt): Correctly handle PHI nodes which + represent a use and definition of the same SSA_NAME. + +2005-12-16 Jon Grimm + Janis Johnson + Ben Elliston + + * target-def.h (TARGET_DECIMAL_FLOAT_SUPPORTED_P): New. + (TARGET_INITIALIZER): Add TARGET_DECIMAL_FLOAT_P. + * target.h (struct gcc_target): Add decimal_float_supported_p. + * targhooks.c (default_scalar_mode_supported_p): Handle + MODE_DECIMAL_FLOAT. + * builtins.def: Add new builtins for 32, 64 and 128 bit variants + of inf, nan, finite, isinf and isnan. + * builtin-types.def (BT_DFLOAT32, BT_DFLOAT64, BT_DFLOAT128, + BT_DFLOAT32_PTR, BT_DFLOAT64_PTR, BT_DFLOAT128_PTR, + BT_FN_DFLOAT32, BT_FN_DFLOAT64, BT_FN_DFLOAT128, + BT_FN_INT_DFLOAT32, BT_FN_INT_DFLOAT64, BT_FN_INT_DFLOAT128, + BT_FN_DFLOAT32_CONST_STRING, BT_FN_DFLOAT64_CONST_STRING, + BT_FN_DFLOAT32_CONST_STRING, BT_FN_DFLOAT32_DFLOAT32, + BT_FN_DFLOAT64_DFLOAT64, BT_FN_DFLOAT128_DFLOAT128): New. + * c-decl.c (declspecs_add_type): Verify combos on type qualifiers. + Pedwarn if decimal floating point types are used. Error if + decimal floating point is not supported by the target. + (finish_declspecs): Return type from DFP typespec_word. + * c-typeck.c (c_common_type): Choose the decimal floating point + type with the greater precision when determining a common type. + (convert_arguments): Warn if there is a mismatch between argument + and prototype for decimal float types. Warn of conversions with + binary float types and of precision narrowing due to prototype. + * c-parser.c (reswords): Add _Decimal32, _Decimal64, _Decimal128. + (c_token_starts_typename): Handle RID_DFLOAT32/64/128. + (c_token_starts_declspecs): Likewise. + (c_parser_attributes): Likewise. + * c-common.h (enum rid): Add new enumeration values RID_DFLOAT32, + RID_DFLOAT64, RID_DFLOAT128. + (T_D32, TEX_D32, T_D64, TEX_D64, T_D128, TEX_D128): New macros. + * c-common.c (c_common_type_for_mode): Handle decimal float modes. + (shorten_compare): Convert DFP/BFP operands to a common type. + (c_common_modes_and_builtins): Register built-in decimal float + types if the target supports them. + (handle_mode_addtribute): Handle MODE_DECIMAL_FLOAT. + * builtins.c (fold_builtin_1): Handle 32, 64 and 128 bit cases of + inf, nan, finite, isinf and isnan builtins. + * c-cppbuiltin.c (builtin_define_decimal_float_constants): New. + (builtin_define_float_constants): Assert non-decimal radix. + (c_cpp_builtins): Register built-in __DEC_EVAL_METHOD__ define. + Call builtin_define_decimal_float_constants for each type. + * c-lex.c (interpret_float): Decode decimal float types from CPP_N + flags. Use real_from_string3, which can handle binary or decimal + floats. + * c-tree.h (enum c_typespec_keyword): Add cts_dfloat32, + cts_dfloat64, cts_dfloat128. + * tree.c (build_common_tree_nodes_2): Add decimal float types. + * tree.h (enum tree_index): Add new enumeration values + TI_DFLOAT32_TYPE, TI_DFLOAT64_TYPE, TI_DFLOAT128_TYPE, + TI_DFLOAT32_PTR_TYPE, TI_DFLOAT64_PTR_TYPE, TI_DFLOAT128_PTR_TYPE. + (dfloat32_type_node): New macro. + (dfloat64_type_node, dfloat128_type_node): Likewise. + (dfloat32_ptr_type_node, dfloat64_ptr_type_node): Likewise. + (dfloat128_ptr_type_node): Likewise. + * c-pretty-print.c (pp_c_floating_constant): Append 32, 64 and 128 + bit decimal floating point types with "df", "dd" and "dl". + * c-format.h (enum format_lengths): Add new enumeration values + FMT_LEN_H, FMT_LEN_D and FMT_LEN_DD. + * c-format.c (printf_length_specs, scanf_length_specs): Add + entries for H, D, DD. + (print_char_table, scan_char_table): Use new entries. + (asm_fprintf_char_table, gcc_diag_char_table, + gcc_cdiag_char_table, gcc_cxxdiag_char_table): Adjust for longer + length arrays. + * defaults.h (DECIMAL32_TYPE_SIZE): Define. + (DECIMAL64_TYPE_SIZE): Likewise. + (DECIMAL128_TYPE_SIZE): Likewise. + (TARGET_DEC_EVAL_METHOD): Likewise. + * doc/extend.texi (Decimal Float): New node. + (Constructing Calls): Document decimal float built-ins. + * doc/tm.texi: Document TARGET_DECIMAL_FLOAT_SUPPORTED_P hook. + * Makefile.in (USER_H): Add $(srcdir)/ginclude/decfloat.h. + * ginclude/decfloat.h: New file. + +2005-12-16 Alan Modra + + * reload.c (find_reloads): Fix comment typo. + * recog.h (recog_memoized): Correct comment. + +2005-12-16 Kazu Hirata + + * basic-block.h, config/i386/winnt.c, config/pa/pa.c, + config/s390/s390.c, dfp.c, expr.c, fold-const.c, params.def, + reload.c, struct-equiv.c, tree-ssa-ccp.c, tree-ssa-pre.c, + tree-ssa-reassoc.c, tree-ssa-structalias.c: Fix comment typos. + * doc/invoke.texi, doc/tm.texi: Fix typos. + +2005-12-16 Ben Elliston + + * real.c (decimal_quad_format): Correct values for emin, emax. + +2005-12-15 DJ Delorie + + * config/m32c/predicates.md (m32c_psi_scale): New. + * config/m32c/m32c.c (m32c_expand_neg_mulpsi3): New. + * config/m32c/muldiv.md (mulpsi3): Support negative constants. + +2005-12-16 Jan Hubicka + + PR rtl-optimization/25224 + * tree-ssa-loop-unswitch.c (tree_unswitch_single_loop): Free copy + tables. + +2005-12-15 Zdenek Dvorak + Steven Bosscher + + * loop-invariant.c (df): New global variable. + (find_defs, check_dependencies, find_invariant_insn, record_uses, + find_invariants_bb, find_invariants_body, find_invariants, + find_invariants_to_move, move_invariants, free_inv_motion_data, + move_single_loop_invariants, move_loop_invariants): Do not pass df in + arguments. + +2005-12-15 Jakub Jelinek + + * varasm.c (default_unique_section_1): Use special section + names for SECCAT_DATA_REL{,_RO}{,_LOCAL}. + +2005-12-16 Ben Elliston + + * doc/invoke.texi (Warning Options): Document -Walways-true being + enabled by -Wall. + +2005-12-15 Joseph S. Myers + + PR other/25028 + * libgcc2.h (SF_SIZE, DF_SIZE, XF_SIZE, TF_SIZE): Define. + * libgcc2.c (__floatdixf, __floatundixf, __floatditf, + __floatunditf): Use #error if type sizes don't match requirements + of implementation. + (__floatdisf, __floatdidf): Unify. Possibly use XFmode or TFmode + as wider floating-point type. Use #error if type sizes don't + match requirements of implementation. Avoid overflow in computing + Wtype_MAXp1_F * Wtype_MAXp1_F. When special casing conversion, + shift one more bit. Cast 1 to DWtype or UDWtype for shifting. + (__floatundisf, __floatundidf): Likewise. + * config/ia64/hpux.h (XF_SIZE, TF_SIZE): Define. + * config/ia64/ia64.c (ia64_init_libfuncs): Use + _U_Qfcnvfxt_quad_to_quad and _U_Qfcnvxf_quad_to_quad for + TFmode-TImode conversions. + * doc/tm.texi (SF_SIZE, DF_SIZE, XF_SIZE, TF_SIZE): Document. + +2005-12-14 Craig Rodrigues + + * freebsd-spec.h (FBSD_TARGET_OS_CPP_BUILTINS): + Use builtin_define_with_int_value() instead of + adding a new check for every new major FreeBSD version. + +2005-12-14 Andrew Pinski + + * config/t-darwin (darwin-c.o): Depend on $(TREE_H) instead of tree.h. + +2005-12-15 Richard Sandiford + + * config/arm/predicates.md (call_memory_operand): New. + * config/arm/arm.md (*call_mem, *call_value_mem): Use it. + +2005-12-15 Andrew Haley + + * unwind-dw2-fde-glibc.c (_Unwind_IteratePhdrCallback): Guard + against prev_cache_entry == NULL when moving a cache entry to the + head of the list. + +2005-12-15 Nathan Sidwell + + * config/mt/mt.c (mt_override_options): Require lower case + architectures. Revert accidental default to ms2. + * config/mt/mt.h (ASM_SPEC, LIBSPEC, STARTFILE_SPEC, + ENDFILE_SPEC): Require lower case architectures. Revert default + to ms2. + + * doc/invoke.texi (MT Options): Rename and update. + * doc/md.texi (MorphoTech family): Rename and update. + +2005-12-15 Olivier Hainque + + * stor-layout.c (layout_type): Don't complain about a too small + an array element type size compared to its alignment when the + size overflows. + +2005-12-15 Jan Hubicka + + PR target/24969 + * i386.c (classify_argument): Properly adjust offset of bitfield for + substructures. + +2005-12-15 Richard Sandiford + + * final.c (final_scan_insn): Flip in_cold_section_p when changing + between the hot and cold sections. Use current_function_section + to get the new section. + * dwarf2out.c (output_line_info): Use in_cold_section_p to + determine whether we are assembling hot or cold code. + (secname_for_decl, dwarf2out_var_location): Likewise. + (dwarf2out_init, dwarf2out_finish): Use switch_to_section. + * varasm.c (last_text_section): Delete. + (in_cold_section_p): New variable. + (hot_function_section): New function. + (current_function_section): Pass in_cold_section_p as the + reloc argument to select_section. Use it to decide between + unlikely_function_section and hot_function_section. + (assemble_start_function): Use switch_to_section. Set + in_cold_section_p instead of last_text_section. + (assemble_end_function): Use switch_to_section. + (switch_to_section): Don't set last_text_section. + * config/darwin/darwin.c (machopic_select_section): Trust the reloc + argument to make the right choice between hot and cold sections. + +2005-12-15 Nathan Sidwell + + Second part of MS1->MT renaming + * config/mt/mt.md (doloop_end): Call mt_add_loop. + (movqi, movhi): Call mt_set_memflags. + (*movdf_internal): Call mt_split_words. + (reload_inqi, reload_outqi, reload_inhi, reload_outhi): Call + mt_set_memflags. + (cmpsi): Store to mt_compare_op[01]. + (beq, bne, bge, bgt, ble, blt, bgeu, bgtu, bleu, bltu, bunge, + bungt, bunle, bunlt): Call mt_emit_cbranch. + (prologue): Call mt_expand_prologue. + (epilogu): Call mt_expend_epilogue. + (eh_return): Call mt_expand_eh_return. + (eh_epilogue): Call me_emit_eh_epilogue. + (conditional_trap): Store to mt_compare_op[01]. + * config/mt/crti.asm: Adjust comment. + * config/mt/crtn.asm: Adjust comment. + * config/mt/mt.c (MT_INT_ARG_FIRST): Renamed. + (mt_compare_op0, mt_compare_op1): Renamed. + (current_frame_info, zero_frame_info): Adjust type. + (mt_ucmpsi3_libcall): Renamed. + (mt_flag_delayed_branch): Renamed. + (mt_struct_value_rtx, mt_return_addr_rtx): Renamed. + (mt_nops_required, mt_nop_reasons): Renamed. + (mt_asm_output_opcode, mt_get_attr_type, mt_final_prescan_insn, + mt_debug_stack, mt_print_operand_simple_address, + mt_print_operand_address, mt_print_operand): Renamed, adjusted. + (mt_init_cumulative_args, mt_function_arg_slotno, mt_function_arg, + mt_function_arg_advance, mt_arg_partial_bytes, + mt_pass_by_reference, mt_function_arg_boundary, + mt_reg_ok_for_base_p, mt_legitimate_simple_address_p, + mt_legitimate_address_p): Renamed, adjusted. + (mt_cpu): Renamed. + (mt_init_machine_status, mt_override_options, mt_builtin_saveregs, + mt_va_start, mt_compute_frame_size, mt_emit_save_restore, + mt_emit_save_fp, mt_emit_save_regs, mt_interrupt_function_p, + mt_expand_prologue, mt_epilogue_uses, mt_expand_epilogue, + mt_expand_eh_return, mt_emit_eh_prologue, + mt_handl_interrupt_attribute): Renamed, adjusted. + (mt_attribute_table): Renamed, adjusted. + (mt_initial_elimination_offset, mt_generate_compare, + mt_emit_cbranch, mt_set_memflags_1, mt_set_memflags, + mt_secondary_reload_class, mt_function_value, mt_split_words, + mt_pass_in_stack, mt_add_loop, mt_loop_nesting, mt_block_length, + mt_scan_loop, mt_reorg_loops): Renamed, adjusted. + (mt_labels): Renamed. + (mt_add_branches, mt_check_delay_slot, mt_reorg_hazard, + mt_machine_reorg): Renamed, adjusted. + (mt_attribute_table: Renamed. + (TARGET_ATTRIBUTE_TABLE, TARGET_STRUCT_VALUE_RTX, + TARGET_PASS_BY_REFERENCE, TARGET_MUST_PASS_IN_STACK, + TARGET_ARG_PARTIAL_BYTES, TARGET_MACHINE_DEPENDENT_REORG): Adjust. + * config/mt/mt.opt (march): Set mt_cpu_string. + * config/mt/mt.h (mt_ucmpsi3_libcall, mt_cpu): Renamed. + (TARGET_CPU_CPP_BUILTINS): Adjust. + (TARGET_MS1_64_001, TARGET_MS1_16_002, TARGET_MS1_16_003, + TARGET_MS2): Adjust. + (TARGET_VERSION, OVERRIDE_OPTIONS, SECONDARY_RELOAD_CLASS): Adjust. + (MT_MIN_INT): Renamed. + (RETURN_ADDR_RTX): Adjust. + (struct mt_frame_info): Renamed. + (current_frame_info): Adjust type. + (INITIAL_ELIMINATION_OFFSET): Adjust. + (MT_NUM_ARG_REGS): Renamed. + (REG_PARM_STACK_SPACE, FUNCTION_ARG, INIT_CUMULATVE_ARGS, + FUNCTION_ARG_ADVANCE, FUNCTION_ARG_BOUNDARY, FUNCTION_VALUE, + LIBCALL_VALUE, EPILOGUE_USES, EXPAND_BUILTIN_VA_START, + GO_IF_LEGITIMATE_ADDRESS, REG_OK_FOR_BASE_P, ASM_OUTPUT_OPCODE, + FINAL_REPSCAN_INSN, PRINT_OPERAND, PRINT_OPERAND_ADDRESS): Adjust. + (mt_compare_op0, mt_compare_op1): Renamed. + * config/mt/mt-protos.h: Rename prototypes. + +2005-12-15 Richard Guenther + + * tree-flow.h (okay_component_ref_for_subvars): Remove. + (get_ref_base_and_extent): Declare. + * tree-dfa.c (okay_component_ref_for_subvars): Remove. + (get_ref_base_and_extent): New function. + * tree-ssa-alias.c (find_used_portions): Use it. + * tree-ssa-structalias.c (get_constraint_for_component_ref): + Likewise. + * tree-ssa-operands.c (get_expr_operands): Likewise. + +2005-12-15 Paolo Bonzini + + * combine.c: Remove force_to_mode's fourth parameter. + (force_to_mode): Do not handle REG. + (canon_reg_for_combine): New. + (make_field_assignment): Use it where the removed argument was non-NULL. + +2005-12-15 Alan Modra + + PR target/25406 + * config/rs6000/rs6000.c (rs6000_special_round_type_align): Handle + error_mark_node. Make alignment params unsigned. + * config/rs6000/rs6000-protos.h + (rs6000_special_round_type_align): Update prototype. + (rs6000_machopic_legitimize_pic_address): Remove arg names. + +2005-12-14 Ulrich Weigand + + PR rtl-optimization/25310 + * reload1.c (eliminate_regs_in_insn): Handle lowpart SUBREGs + of the eliminable register when substituting into a PLUS. + +2005-12-14 Jakub Jelinek + + PR debug/25023 + * config/i386/i386.c (ix86_force_to_memory): Always use + SImode push for HImode in -m32. + (ix86_free_from_memory): Likewise. + +2005-12-14 Richard Sandiford + + * gcc/config/arm/arm.md: Provide a big-endian version of the + (zero_extend:SI (subreg:QI ...)) splitter. + +2005-12-14 J"orn Rennecke + + * struct-equiv.c (note_local_live): Handle hard regs with different + hard_regno_nregs. + +2005-12-14 Jeff Law + + * tree-ssa-ccp.c (fold_stmt_r): DATA argument is now a pointer + to a structure containing state rather than a pointer to bool. + (case ARRAY_REF): New code to handle folding some array references. + (case ADDR_EXPR): Note when we are processing expressions found + within an ADDRE_EXPR. + (fold_stmt, fold_stmt_inplace): Pass in a structure to fold_stmt_r + for state variables rather than just a pointer to a boolean. + * tree-ssa-dom.c (simplify_rhs_and_lookup_avail_expr): Remove + handling of constant string references. + +2005-12-14 Adrian Straetling + + * config/s390/s390.md ("*tstdi_extimm", "*tstsi_extimm"): Merge. + ("*tstdi_cconly_extimm", "*tstsi_cconly_extimm"): Merge. + ("*tstdi_cconly2", "*tstsi_cconly2"): Merge. + Move other tst* patterns to retain partial order. + +2005-12-14 Adrian Straetling + + * config/s390/s390.md ("d0", "1"): New mode attributes. + ("di3", "si3"): Merge. + ("*di3_and", "*si3_and"): Merge. + ("ashrdi3", "ashrsi3"): Merge. + ("*ashrdi3_cc", "*ashrsi3_cc"): Merge. + ("*ashrdi3_cc_and", "*ashrsi3_cc_and"): Merge. + ("*ashrdi3_cconly", "*ashrsi3_cconly"): Merge. + ("*ashrdi3_cconly_and", "*ashrsi3_cconly_and"): Merge. + ("*ashrdi3", "*ashrsi3"): Merge. + ("*ashrdi3_and", "*ashrsi3_and"): Merge. + +2005-12-14 Adrian Straetling + + * config/s390/s390.md ("extenddi2", "extendsi2"): Merge. + ("*extendqidi2_extimm", "*extendqisi2_extimm"): Merge. + ("*extendqidi2", "*extendqisi2") Merge. + ("*extendqidi2_short_displ", "*extendqisi2_short_displ"): Merge. + ("zero_extendhidi2", "zero_extendqidi2"): Merge. + ("*zero_extenddi2_extimm", "*zero_extendsi2_extimm"): Merge. + Move some patterns to retain partial ordering. + +2005-12-14 Adrian Straetling + + * config/s390/s390.md ("atype", "length"): Rewrite. + ("*insv_reg_imm", "*insv_reg_extimm"): Add mode. + +2005-12-14 Sebastian Pop + + * tree-ssa-operands.c (build_ssa_operands): Update leading comment. + +2005-12-14 J"orn Rennecke + + * struct-equiv.c (rtx_equiv_p): Allow arbitrary RVALUE values for + PARALLELs with a mode. + +2005-12-14 Sebastian Pop + + * cfgloopmanip.c (lv_adjust_loop_entry_edge): Adjust the type of + cond_expr parameter. + +2005-12-14 Sebastian Pop + + * loop-unswitch.c (unswitch_loop): Free zero_bitmap before returning. + +2005-12-14 J"orn Rennecke + + PR bootstrap/25397: + + * struct-equiv.c (struct_equiv_init): Fix off-by-one error in clearing + of STACK_REGS bits. + + * struct-euiv.c (rtx_equiv_p): Remove SUBREG case. + +2005-12-14 Jakub Jelinek + + PR target/25254 + PR target/24188 + * config/i386/i386.c (x86_64_elf_select_section): If DECL is not + DECL_P, call get_section rather than get_named_section. Supply + section flags to it. + +2005-12-14 Ben Elliston + + * c-common.c (c_common_truthvalue_conversion): Generalise warning + for addresses converted to booleans; not just function addresses. + * c-typeck.c (build_binary_op): Warn for address comparisons which + can never be NULL (eg. func == NULL or &var == NULL). + * common.opt (Walways-true): New option. + * c-opts.c (c_common_handle_option): Set it with -Wall. + * doc/invoke.texi: Document it. + +2005-12-13 Paul Brook + + * config/m68k/fpgnulib.c (__unordsf2, __unorddf2, __unordxf2, + __floatunsidf, __floatunsisf, __floatunsixf): New functions. + +2005-12-13 Nathan Sidwell + + * config/mt/t-mt (crti.o, crtn.o): Add multilib options. + (EXTRA_MULTILIB_PARTS): Define. + +2005-12-13 J"orn Rennecke + + PR rtl-optimization/20070 / part1 + * flow.c (update_life_info): If PROP_POST_REGSTACK is set, call + count_or_remove_death_notes with kill == -1. + (mark_set_1): Don't add REG_DEAD / REG_UNUSED notes for stack + registers if PROP_POST_REGSTACK is set. + (mark_used_reg): Likewise. + (count_or_remove_death_notes): If kill is -1, don't remove REG_DEAD / + REG_UNUSED notes for stack regs. + * cfgcleanup.c (condjump_equiv_p): Change parameters and processing + to match rtx_equiv_p machinery. Change caller. + (outgoing_edges_match): Likewise. + (try_crossjump_to_edge): Use struct_equiv_block_eq + instead of flow_find_cross_jump. + * basic-block.h (PROP_POST_REGSTACK, STRUCT_EQUIV_START): Define. + (STRUCT_EQUIV_RERUN, STRUCT_EQUIV_FINAL): Likewise. + (STRUCT_EQUIV_NEED_FULL_BLOCK, STRUCT_EQUIV_MATCH_JUMPS): Likewise. + (STRUCT_EQUIV_MAX_LOCAL): Likewise. + (struct struct_equiv_checkpoint, struct equiv_info): Likewise. + (insns_match_p): Update prototype. + (flow_find_cross_jump): Remove prototype. + (struct_equiv_block_eq, struct_equiv_init): Declare. + (rtx_equiv_p, condjump_equiv_p): Likewise. + * struct-equiv.c: Include reload.h. + (IMPOSSIBLE_MOVE_FACTOR): Define. + (assign_reg_reg_set, struct_equiv_make_checkpoint): New functions. + (struct_equiv_improve_checkpoint): Likewise. + (struct_equiv_restore_checkpoint, rtx_equiv_p): Likewise. + (set_dest_equiv_p, set_dest_addr_equiv_p, struct_equiv_init): Likewise. + (struct_equiv_merge, find_dying_input): Likewise. + (resolve_input_conflict, note_local_live): Likewise. + (death_notes_match_p): Change parameters and processing + to match rtx_equiv_p machinery. Change caller. + (insns_match_p): Likewise. + (flow_find_cross_jump): Replace with: + (struct_equiv_block_eq). + + Back out this change: + 2005-03-07 Kazu Hirata + * recog.c (verify_changes): Make it static. + * recog.h: Remove the corresponding prototype. + +2005-12-13 J"orn Rennecke + + * rtlhooks.c (gen_lowpart_general): Handle SUBREGs of floating point + values. + +2005-12-13 Nathan Sidwell + + * config/mt/t-mt (MULTILIB_OPTIONS): Add ms2 + (MULTILIB_DIRNAMES): Add ms2. Prefix ms1 dirs with 'ms1'. + * config/mt/mt.c (ms1_final_prescan): Use TARGET_MS2, + TARGET_MS1_64_001 appropriately. + (ms1_machine_reorg): Use TARGET_MS2. + +2005-12-13 Jakub Jelinek + + PR debug/25023 + PR target/25293 + * expr.c (emit_move_resolve_push): Handle PRE_MODIFY + and POST_MODIFY with CONST_INT adjustment equal to PUSH_ROUNDING. + Fix POST_INC/POST_DEC handling if PUSH_ROUNDING is not identity. + * config/i386/i386.md (pushhi2, pushqi2): Use pushl instead of pushw. + Set mode to SI, adjust constraints. + (pushhi2_rex64, pushqi2_rex64): Set mode to DI. + * config/i386/i386.h (PUSH_ROUNDING): Round up to 4 instead of 2 for + 32-bit code. + +2005-12-13 Carlos O'Donell + + * c-cppbuiltin.c (builtin_define_float_constants): Add + fp_cast parameter, pass to builtin_define_with_hex_fp_value. + Define __FLT_HAS_DENORM__, __DBL_HAS_DENORM__, __LDBL_HAS_DENORM__. + (builtin_define_with_hex_fp_value): Use fp_cast when building macro. + (c_cpp_builtins): If flag_single_precision_constant then set fp_cast + to "((double)%sL)" otherwise "%s". + +2005-12-13 Paul Brook + + * config/arm/bpabi.h (SUBTARGET_EXTRA_ASM_SPEC): Pass -meabi=gnu for + apcs/atpcs. + +2005-12-11 Rafael vila de Espndola + + * tree-flow.h: Allow compilation with a C++ compiler. + (struct edge_prediction): Prefix all field names with "ep_". + * predict.c (tree_predicted_by_p): Likewise for struct edge_prediction. + (tree_predict_edge, combine_predictions_for_bb): Likewise. + (remove_predictions_associated_with_edge): Likewise. + +2005-12-12 Jeff Law + + * tree-ssa-dom.c (simplify_rhs_and_lookup_avail_expr): Remove + reassociation code. + * passes.c (init_optimization_passes): Run reassociation again + after loop optimizations. + +2005-12-12 Daniel Berlin + + * tree-ssa-dom.c (thread_across_edge): Canonicalize condition + if necessary. + (optimize_stmt): Ditto. + (canonicalize_comparison): New function. + * tree-ssa-operands.c (swap_tree_operands): Make external. + (get_expr_operands): Stop auto-canonicalization. + * tree-ssa-reassoc.c: Rewrite. + (init_optimization_passes): + * tree-flow.h (swap_tree_operands): Prototype. + * Makefile.in (tree-ssa-reassoc.o): Update dependencies. + +2005-12-12 John David Anglin + + * pa.c (pa_output_function_epilogue): Set cfun->machine->in_nsubspa to + indicate function epilogue has been output. + (pa_asm_output_mi_thunk): Likewise. + (output_deferred_plabels): Put plabels in readonly data section when + not generating PIC code. + (som_output_text_section_asm_op): Use .NSUBSPA to output debug + information. Add assert. + (som_output_comdat_data_section_asm_op): New function. + (pa_som_asm_init_sections): Use som_output_comdat_data_section_asm_op + instead of output_section_asm_op for COMDAT sections. + +2005-12-12 J"orn Rennecke + + * cfgcleanup.c (condjump_equiv_p, try_crossjump_to_edge): + Fix whitespace in vincinity of to-be-installed changes. + * struct-equiv.c (merge_memattrs, death_notes_match_p): Fix whitespace. + (insns_match_p): Likewise. + +2005-12-12 Nathan Sidwell + + * config.gcc (ms1): Replace with ... + (mt): ... this. + * config/ms1: Rename to ... + * config/mt: ... here. Rename ms1 files to mt. + * config/mt/mt.c: Adjust gt-mt.h #include. + * config/mt/t-mt (LIB1ASMSRCS, LIB2FUNCS_EXTRA): Adjust. + (crti.o, crtn.o): Adjust file names. + +2005-12-12 Gabriel Dos Reis + + * varray.h: Allow compilation with a C++ compiler. + (union varray_data_tag): Prefix all field names with "vdt_". + (VARRAY_CHAR, VARRAY_UCHAR, VARRAY_SHORT, VARRAY_USHORT, + VARRAY_INT, VARRAY_UINT, VARRAY_LONG, VARRAY_ULONG, + VARRAY_WIDE_INT, VARRAY_UWIDE_INT, VARRAY_GENERIC_PTR, + VARRAY_GENERIC_PTR_NOGC, VARRAY_CHAR_PTR, VARRAY_RTX, + VARRAY_RTVEC, VARRAY_TREE, VARRAY_BITMAP, VARRAY_REG, VARRAY_BB, + VARRAY_ELT_LIST, VARRAY_EDGE, VARRAY_TREE_PTR): Adjust definition. + (VARRAY_PUSH_CHAR, VARRAY_PUSH_UCHAR, VARRAY_PUSH_SHORT, + VARRAY_PUSH_USHORT, VARRAY_PUSH_INT, VARRAY_PUSH_UINT, + VARRAY_PUSH_LONG, VARRAY_PUSH_ULONG, VARRAY_PUSH_WIDE_INT, + VARRAY_PUSH_UWIDE_INT, VARRAY_PUSH_GENERIC_PTR, + VARRAY_PUSH_GENERIC_PTR_NOGC, VARRAY_PUSH_CHAR_PTR, + VARRAY_PUSH_RTX, VARRAY_PUSH_RTVEC, VARRAY_PUSH_TREE, + VARRAY_PUSH_BITMAP, VARRAY_PUSH_REG, VARRAY_PUSH_BB, + VARRAY_PUSH_EDGE, VARRAY_PUSH_TREE_PTR): Likewise. + (VARRAY_TOP_CHAR, VARRAY_TOP_UCHAR, VARRAY_TOP_SHORT, + VARRAY_TOP_USHORT, VARRAY_TOP_INT, VARRAY_TOP_UINT, + VARRAY_TOP_LONG, VARRAY_TOP_ULONG, VARRAY_TOP_WIDE_INT, + VARRAY_TOP_UWIDE_INT, VARRAY_TOP_GENERIC_PTR, + VARRAY_TOP_GENERIC_PTR_NOGC, VARRAY_TOP_CHAR_PTR, VARRAY_TOP_RTX, + VARRAY_TOP_RTVEC, VARRAY_TOP_TREE, VARRAY_TOP_BITMAP, + VARRAY_TOP_REG, VARRAY_TOP_BB, VARRAY_TOP_EDGE, + VARRAY_TOP_TREE_PTR): Likewise. + * varray.c (varray_grow): Likewise. + (varray_clear): Likewise. + +2005-12-12 Alan Modra + + PR target/25299 + * config/rs6000/rs6000.c (rs6000_special_round_type_align): Increase + alignment to doubleword if the first field is a double array. + * config/rs6000/linux64.h (TARGET_ALIGN_NATURAL): Define. + +2005-12-11 Daniel Berlin + + * tree-ssa-structalias.c (process_constraint): Remove code to + transform addressofs into scalar. + (create_variable_info_for): In whole-program IPA, globals don't + point to ANYTHING by default. + +2005-12-11 Daniel Berlin + + * timevar.def (TV_IPA_PTA): New. + * tree-pass.h (pass_ipa_pta): New + * tree-ssa-structalias.c: Include cgraph.h + (in_ipa_mode): New. + (predbitmap_obstack): New. + (EXECUTE_IF_IN_NONNULL_BITMAP): New. + (struct constraint_stats): Add num_edges. + (new_var_info): Don't call bitmap_clear. + (struct constraint_edge): Update docs. + (new_constraint_edge): Remove src param. + (struct constraint_graph): Add zero_weight_succs, + zero_weight_preds. Update docs. + (constraint_expr_equal): Reformat. + (constraint_edge_equal): Update for removal of src. + (constraint_edge_less): Ditto. + (constraint_edge_vec_find): Ditto. + (erase_graph_self_edge): Update for removal of src and and zero + weight bitmap. + (clear_edges_for_node): Ditto. + (add_graph_edge): Ditto. + (get_graph_weights): Ditto. + (allocate_graph_weights): Ditto. + (merge_graph_nodes): Ditto. + (int_add_graph_edge): Ditto. + (valid_graph_edge): Ditto. + (valid_weighted_graph_edge): Ditto. + (build_constraint_graph): Ditto. + (scc_visit): Ditto. + (collapse_nodes): Ditto. + (process_unification_queue): Ditto. + (topo_visit): Ditto. + (solve_graph): Ditto. + (do_structure_copy): Ditto. + (perform_var_substitution): Ditto. + Init and release obstack. + (handle_ptr_arith): Try to resolve directly. + (find_func_aliases): Don't call update_alias_info here + Handle RETURN_EXPR, and CALL_EXPR's in IPA mode. + (do_sd_constraint): Add code for propagating faster. + Update. + (do_ds_constraint): Ditto. + (count_num_arguments): New function. + (create_function_info_for): Ditto. + (create_variable_info_for): Handle FUNCTION_DECL. + (intra_create_variable_infos): Use make_constraint_to_anything. + (init_alias_vars): Init obstacks here. + (need_to_solve): Handle zero weight graph changes. + (compute_points_to_sets): Call update_alias_info here. + (delete_points_to_sets): Free zero weight preds/succs here. + (gate_ipa_pta): New. + (ipa_pta_execute): New + +2005-12-11 Daniel Berlin + + * tree-ssa-structalias.c (var_anyoffset): Removed. + (anyoffset_tree): Ditto. + (anyoffset_id): Ditto. + (do_deref): Take vector of constraints, no return value. + Update to work on vector. + (get_constraint_for): Ditto. + (get_constraint_for_component_ref): Ditto. + (do_structure_copy): Ditto. + (handle_ptr_arith): Ditto. + (find_func_aliases): Ditto. + (set_uids_in_ptset): Remove anyoffset handling. + (init_base_vars): Ditto. + +2005-12-10 Mark Mitchell + + PR c++/25010 + * ipa-inline.c (cgraph_clone_inlined_nodes): Do not assume that + DECL_EXTERNAL functions have no bodies. Tidy. + +2005-12-10 Andreas Schwab + + * except.c (switch_to_exception_section): Only define if + TARGET_UNWIND_INFO is not defined. + +2005-12-10 Richard Sandiford + + * config/darwin.h (HAS_INIT_SECTION): Remove definition. + (INIT_SECTION_ASM_OP): Restore empty definition from before 2005-12-07. + +2005-12-10 Richard Sandiford + + * output.h (init_section, fini_section): Delete. + * varasm.c (init_section, fini_section): Delete. + (init_varasm_once): Don't initialize them. + * doc/tm.texi (INIT_SECTION_ASM_OP, FINI_SECTION_ASM_OP): Say that + there are no corresponding varasm.c variables. + +2005-12-10 Richard Sandiford + + * dwarf2out.c (default_eh_frame_section): Delete, moving handling + of EH_FRAME_SECTION_NAME into... + (switch_to_eh_frame_section): ...here. Try to set eh_frame_section + if it is still null. + * except.c (default_exception_section): Delete, moving most + of the code to... + (switch_to_exception_section): ...this new function. Set + exception_section if it is still null, then switch to it. + (output_function_exception_table): Use switch_to_exception_section. + * varasm.c (exception_section, eh_frame_section): Update comments. + (get_section): Hoist use of SECTION_NAMED. + (init_varasm_once): Don't set exception_section and eh_frame_section. + * output.h (default_exception_section): Delete. + (default_eh_frame_section): Delete. + +2005-12-09 Bernd Schmidt + + * config/bfin/bfin.c: Include "cgraph.h". + (bfin_load_pic_reg): Omit loading pic reg if in a local function. + Return the reg that holds the pointer to the GOT. + (bfin_expand_prologue): Use return value of bfin_load_pic_reg when + doing stack checking. + +2005-12-09 Diego Novillo + + * tree.c (recompute_tree_invariant_for_addr_expr): Rename from + recompute_tree_invarant_for_addr_expr. + Update uses everywhere. + +2005-12-09 Aldy Hernandez + + * config/ms1/t-ms1 (MULTILIB_OPTIONS): Define. + (MULTILIB_DIRNAMES): Define. + +2005-12-09 Ulrich Weigand + + PR target/25311 + * config/s390/s390.c (struct s390_address): New field literal_pool. + (s390_decompose_address): Compute literal_pool field. Do not + assume register %r13 is always (and solely) used as pool base. + (s390_extra_constraint_str): Use literal_pool field. + +2005-12-09 Thiemo Seufer + + * config/mips/mips.c (override_options): Don't allow too small + integers in FP registers. + +2005-12-09 Ulrich Weigand + + * config/s390/s390.c (s390_function_ok_for_sibcall): Use + targetm.binds_local_p to check for local function calls. + +2005-12-09 Alan Modra + + PR debug/24908 + * dwarf2out.c (dwarf2out_frame_debug_expr): Don't assert that + call_used_regs can't be used to save reg in another reg. + +2005-12-08 Volker Reichelt + Christophe Jaillet + + * ipa-type-escape.c (analyze_variable): Use gcc_assert instead of + abort. + * except.c (output_ttype): Likewise. + * tree-object-size.c (collect_object_sizes_for): Likewise. + (check_for_plus_in_loops_1): Likewise. + (check_for_plus_in_loops): Likewise. + (compute_object_sizes): Use gcc_unreachable instead of abort. + +2005-12-08 Nathan Sidwell + + * config/ms1/ms1.md (UNSPEC_LOOP): New constant. + (loop_end, loop_init, doloop_end): New insns. + * config/ms1/ms1.h (LOOP_FIRST, LOOP_LAST): New. + (SPECIAL_REG_FIRST, FIRST_PSEUDO_REGISTER): Adjust. + (FIXED_REGISTERS, CALL_USED_REGISTERS): Adjust. + (REG_CLASS_CONTENTS, REGISTER_NAMES): Adjust. + * config/ms1/ms1.c: #include basic-block.h + (struct machine_function): Add has_loops field. + (ms1_add_loop): New. + (MAX_LOOP_DEPTH, MAX_LOO_LENGTH): New. + (struct loop_info, struct loop_work): New. + (ms1_loop_nesting, ms1_block_length, ms1_scan_loop): New workers. + (ms1_reorg_loops): New loop optimization. + (ms1_machine_reorg): Call it. + * config/ms1/ms1-protos.h (ms1_add_loop): Declare. + +2005-12-08 Zdenek Dvorak + + PR tree-optimization/25248 + * tree-scalar-evolution.c (follow_ssa_edge_in_rhs): Do not use + evolution_of_loop from the failed attempt. Remove handling + of MULT_EXPR. + +2005-12-08 Gabriel Dos Reis + + * tree.h (DECL_EXTERNAL): Clarify documentation. + +2005-12-08 Andreas Krebbel + Jakub Jelinek + + PR target/25268 + * config/s390/s390.c (s390_decompose_shift_count): Remove BITS + argument. Don't drop outer ANDs. + (s390_extra_constraint_str, print_shift_count_operand): Adjust callers. + * config/s390/s390-protos.h (s390_decompose_shift_count): Adjust + prototype. + * config/s390/predicates.md (setmem_operand): Remove. + (shift_count_operand): Rename to... + (shift_count_or_setmem_operand): ... this. Adjust + s390_decompose_shift_count caller. + * config/s390/s390.md (di3_31_and, di3_64_and, + ashrdi3_cc_31_and, ashrdi3_cconly_31_and, ashrdi3_31_and, + ashrdi3_cc_64_and, ashrdi3_cconly_64_and, ashrdi3_64_and, + si3_and, ashrsi3_cc_and, ashrsi3_cconly_and, ashrsi3_and, + rotl3_and, setmem_long_and): New insns. + (di3_31, di3_64, ashrdi3_cc_31, ashrdi3_cconly_31, + ashrdi3_31, ashrdi3_cc_64, ashrdi3_cconly_64, ashrdi3_64, + si3, ashrsi3_cc, ashrsi3_cconly, ashrsi3, rotl3, + di3, ashrdi3): Use shift_count_or_setmem_operand instead + of shift_count_operand. + (setmem_long): Use shift_count_or_setmem_operand instead of + setmem_operand. + +2005-12-08 Daniel Jacobowitz + Andreas Tobler + + * Makefile.in (ALL_GTFILES_H): Replace sed statement with more portable + tr expression. + +2005-12-07 J"orn Rennecke + + * expr.c (force_operand): Use convert_to_mode for conversions. + +2005-12-07 J"orn Rennecke + + * reload.h (reg_equiv_invariant): Declare. + * reload.c (refers_to_regno_for_reload_p): Allow R to be a pseudo + register also when reg_equiv_invariant[R] is set. + +2005-12-07 Richard Sandiford + Andreas Tobler + + * config/darwin.h: Guard section variables with #ifndef USED_FOR_TARGET. + +2005-12-07 Daniel Berlin + + * tree-ssa-pre.c (bitmap_set_and): New function. + (bitmap_set_and_compl): New function. + (bitmap_set_empty_p): New function. + (insert_extra_phis): New function. + (compute_avail): Use insert_extra_phis. + +2005-12-07 Adrian Straetling + + * config/s390/s390.c (s390_expand_atomic): New function. + Adjust comment of helper functions. + * config/s390/s390-protos.h (s390_expand_atomic): Declare. + * config/s390/s390.md ("ATOMIC"): New code macro. + ("atomic"): Corresponding new code attribute. + ("sync_lock_test_and_set[hq]i", + "sync_{new_,old_,}{and,ior,xor,add,sub,nand}[hq]i"): New pattern. + +2005-12-07 Adrian Straetling + + * config/s390/s390.c (s390_expand_mask_and_shift, + struct alignment_context, init_alignment_context, + s390_expand_cs_hqi): New. + * config/s390/s390-protos.h (s390_expand_cs_hqi): Declare. + * config/s390/s390.md ("sync_compare_and_swaphi", + "sync_compare_and_swapqi"): New pattern. + +2005-12-07 Daniel Berlin + + Fix PR tree-optimization/25291 + * tree-ssa-operands.c (add_call_clobber_ops): Remove + redundant and crashing check. + +2005-12-08 Alan Modra + + PR target/25212 + * config/rs6000/rs6000.c (legitimate_indexed_address_p): Relax + tests further when !strict && reload_in_progress. + (print_operand): Check that both operands of indexed address are regs. + (print_operand_address): Likewise. + * config/rs6000/rs6000.h (INT_REG_OK_FOR_INDEX_P): Simplify. + (INT_REG_OK_FOR_BASE_P): Correct. + +2005-12-07 J"orn Rennecke + + Preparation for PR rtl-optimization/20070 / part1 + * basic-block.h (insns_match_p, flow_find_cross_jump): Declare. + * cfgcleanup.c (condjump_equiv_p): New function, broken out of + outgoing_edges_match. + (outgoing_edges_match): Use condjump_equiv_p. + (merge_memattrs, insns_match_p, flow_find_cross_jump): Move from here + into.. + * struct-equiv.c: New file. + (death_notes_match_p) New function, broken out of insns_match_p. + * Makefile.in (OBJS-common): Add struct-equiv.o. + (struct-equiv.o): New target. + +2005-12-07 Richard Sandiford + + * coretypes.h: Revert previous change. + * config/darwin.h: Revert previous reversion. + * config/avr/avr.h (progmem_section): Guard with #ifndef IN_LIBGCC2. + +2005-12-07 Richard Sandiford + + * coretypes.h (section): Provide dummy definition for target files. + * config/darwin.h: Revert previous change. + +2005-12-07 Rafael vila de Espndola + + * doc/sourcebuild.texi (all.build, install-normal): Remove. + * configure.ac: Remove all.build and install-normal from target_list + * configure: Regenerate. + * Makefile.in (install): Don't depend on install-normal. + +2005-12-07 Rafael vila de Espndola + + * Makefile.in: Document the use of stamps. + +2005-12-07 Rafael vila de Espndola + + * doc/gty.texi: Remove instructions for adding a dependency on s-gtype. + * Makefile.in: Add code to compute some dependencies on s-gtype + automatically. Remove the declaration of those dependencies. + +2005-12-07 Richard Sandiford + + * gcc/reload.c (push_secondary_reload): Fix typo: + s/insn_constraint/scratch_constraint/. + +2005-12-07 Richard Sandiford + + * config/darwin.h: Guard section variables with #ifndef IN_LIBGCC2. + +2005-12-07 Richard Sandiford + + * config/alpha/alpha.c (alpha_start_function): Use switch_to_section. + (alpha_elf_select_rtx_section): Return the selected section rather + than emitting assembly code. + (alpha_write_linkage): Emit a ".link" directive directly and then + set in_section to NULL. + (vms_asm_out_constructor): Use switch_to_section. + (vms_asm_out_destructor): Likewise. + (unicosmk_output_common): Set in_section to NULL instead of calling + the dummy common_section function. + (unicosmk_text_section): Delete in favor of... + (unicosmk_output_text_section_asm_op): ...this new function. + (unicosmk_data_section): Delete in favor of... + (unicosmk_output_data_section_asm_op): ...this new function. + (unicosmk_init_sections): New function. + (unicosmk_output_deferred_case_vectors): Use switch_to_section. + (unicosmk_output_ssib): Set in_section to NULL instead of calling + the dummy ssib_section function. + (unicosmk_section_buf): Delete. + * config/alpha/alpha-protos.h (unicosmk_text_section): Delete. + (unicosmk_data_section): Delete. + * config/alpha/elf.h (ASM_OUTPUT_ALIGNED_LOCAL): Use switch_to_section. + (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS, sbss_section, sdata_section) + (SECTION_FUNCTION_TEMPLATE): Delete. + * config/alpha/unicosmk.h (TEXT_SECTION_ASM_OP, DATA_SECTION_ASM_OP) + (READONLY_DATA_SECTION, EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS) + (common_section, COMMON_SECTION, ssib_section, SSIB_SECTION): Delete. + (ASM_OUTPUT_ALIGNED_LOCAL): Use switch_to_section. + (TARGET_ASM_INIT_SECTIONS): Define. + * config/alpha/vms.h (LINK_SECTION_ASM_OP, LITERALS_SECTION_ASM_OP) + (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Delete. + (link_section, literals_section): Delete. + (ASM_OUTPUT_DEF): Emit the ".literal" directive directly and then + set in_section to NULL. + + * config/arm/aof.h (TEXT_SECTION_ASM_OP, DATA_SECTION_ASM_OP): Delete. + (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS, ZERO_INIT_SECTION): Delete. + (COMMON_SECTION): Delete. + (TARGET_ASM_INIT_SECTIONS): Define. + (ASM_OUTPUT_COMMON): Set in_section to NULL rather than calling + the dummy common_section function. + * config/arm/aout.h (ASM_OUTPUT_ALIGNED_LOCAL): Use switch_to_section. + * config/arm/arm.c (get_jump_table_size): Use pointer comparison + between readonly_data_section and text_section to check whether + read-only data is being put in the text section. + (arm_output_function_epilogue): Use switch_to_section. + (arm_elf_asm_constructor): Likewise. + (thumb_call_via_reg): Replace call to in_text_section with + a comparison between in_section and text_section. + (arm_file_end): Use switch_to_section. + (aof_text_section): Delete in favor of... + (aof_output_text_section_asm_op): ...this new function. + (aof_data_section): Delete in favor of... + (aof_output_data_section_asm_op): ...this new function. + (aof_asm_init_sections): New function. + (zero_init_section): Moved from config/arm/aof.h. + (aof_dump_imports, aof_file_start): Use switch_to_section. + * config/arm/arm.h (thumb_call_via_label): Update comment. + * config/arm/arm-protos.h (aof_text_section, aof_data_section): Delete. + (common_section): Delete. + * config/arm/pe.h (ASM_DECLARE_FUNCTION_NAME): Use switch_to_section. + (ASM_DECLARE_OBJECT_NAME): Update the type of save_section. Use the + global switch_to_section function instead of the old port-local one. + (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS, DRECTVE_SECTION_FUNCTION) + (SWITCH_TO_SECTION_FUNCTION): Delete. + (drectve_section): Redefine as a macro. + * config/arm/unknown-elf.h (ASM_OUTPUT_ALIGNED_BSS): + (ASM_OUTPUT_ALIGNED_DECL_LOCAL): Use get_named_section and + switch_to_section. + + * config/avr/avr.c (progmem_section): New variable. + (avr_output_progmem_section_asm_op): New function. + (avr_asm_init_sections): New function. + (avr_output_addr_vec_elt): Use switch_to_section. + * config/avr/avr.h (progmem_section): Declare. + (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Delete. + (READONLY_DATA_SECTION): Delete. + (TARGET_ASM_INIT_SECTIONS): Define. + (ASM_OUTPUT_CASE_LABEL): Use switch_to_section. + * config/avr/avr-protos.h (progmem_section): Delete. + + * config/bfin/bfin.h (ASM_OUTPUT_LOCAL): Use switch_to_section. + + * config/c4x/c4x.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS) + (INIT_SECTION_FUNCTION, FINI_SECTION_FUNCTION): Delete. + + * config/darwin-sections.def: New file. + * config/darwin.c: Define all sections in darwin-sections.def. + (output_objc_section_asm_op, darwin_init_sections): New functions. + (machopic_output_indirection): Use switch_to_section. + (machopic_select_section): Return the selected section rather than + emitting assembly code. Replace the static function table with + inline conditional expressions. Update the tests of last_text_section + and move them into the FUNCTION_DECL block. + (machopic_select_rtx_section): Return the selected section rather than + emitting assembly code. + (machopic_asm_out_constructor, machopic_asm_out_destructor) + (darwin_file_end): Use switch_to_section. + * config/darwin.h: Use darwin-sections.def to declare sections. + (INIT_SECTION_ASM_OP): Remove empty definition. + (HAS_INIT_SECTION): Define this instead. + (SECTION_FUNCTION, EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Delete. + (READONLY_DATA_SECTION, TARGET_ASM_EXCEPTION_SECTION): Delete. + (TARGET_ASM_EH_FRAME_SECTION): Delete. + (TARGET_ASM_INIT_SECTIONS): Define. + * config/darwin-protos.h (darwin_init_sections): Declare. + (machopic_picsymbol_stub_section, machopic_picsymbol_stub1_section) + (machopic_symbol_stub_section, machopic_symbol_stub1_section): Delete. + (machopic_lazy_symbol_ptr_section, machopic_nl_symbol_ptr_section) + (constructor_section, destructor_section, mod_init_section): Delete. + (mod_term_section): Delete. + (darwin_exception_section, darwin_eh_frame_section): Delete. + (machopic_select_section): Return a section. + (machopic_select_rtx_section): Likewise. + (text_coal_section, text_unlikely_section, text_unlikely_coal_section) + (const_section, const_coal_section, const_data_section): Delete. + (const_data_coal_section, data_coal_section, cstring_section): Delete. + (literal4_section, literal8_section, constructor_section): Delete. + (mod_init_section, mod_term_section, destructor_section): Delete. + (objc_class_section, objc_meta_class_section, objc_category_section) + (objc_class_vars_section, objc_instance_vars_section): Delete. + (objc_cls_meth_section, objc_inst_meth_section): Delete. + (objc_cat_cls_meth_section, objc_cat_inst_meth_section): Delete. + (objc_selector_refs_section, objc_selector_fixup_section): Delete. + (objc_symbols_section, objc_module_info_section): Delete. + (objc_image_info_section, objc_protocol_section): Delete. + (objc_string_object_section, objc_constant_string_object_section) + (objc_class_names_section, objc_meth_var_names_section): Delete. + (objc_meth_var_types_section, objc_cls_refs_section): Delete. + (machopic_lazy_symbol_ptr_section, machopic_nl_symbol_ptr_section) + (machopic_symbol_stub_section, machopic_picsymbol_stub_section) + (darwin_exception_section, darwin_eh_frame_section): Delete. + * config/t-darwin (darwin.o): Depend on config/darwin-sections.def. + + * config/frv/frv.c (frv_asm_out_constructor): Use switch_to_section. + (frv_asm_out_destructor): Likewise. + * config/frv/frv.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Delete. + (SDATA_SECTION_FUNCTION, FIXUP_SECTION_FUNCTION): Delete. + (ASM_OUTPUT_ALIGNED_DECL_LOCAL): Use switch_to_section and + get_named_section. + (ASM_OUTPUT_CASE_LABEL): Use switch_to_section. + * config/frv/frv-protos.h (fixup_section, sdata_section, sbss_section) + (data_section): Delete. + + * config/i386/cygming.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS) + (DRECTVE_SECTION_FUNCTION): Delete. + (drectve_section): Redefine as a macro that sets in_section after + emitting the directive. + (SWITCH_TO_SECTION_FUNCTION): Delete. + * config/i386/darwin.h (ASM_OUTPUT_ALIGN): Replace call to + in_text_section with comparison between in_section and text_section. + * config/i386/i386.c (x86_64_elf_select_section): Return the section + rather than emitting assembly code. Use get_named_section. + (x86_output_aligned_bss, ix86_file_end): Use switch_to_section and + get_named_section. + (machopic_output_stub): Use switch_to_section. + * config/i386/nwld.c (nwld_named_section_asm_out_constructor) + (nwld_named_section_asm_out_destructor): Use get_section and + switch_to_section. + + * config/ia64/ia64.c (ia64_select_rtx_section): Return the section + rather than emitting assembly code. + (ia64_rwreloc_select_section): Likewise. + (ia64_rwreloc_select_rtx_section): Likewise. + * config/ia64/ia64-protos.h (sdata_section, sbss_section): Delete. + * config/ia64/sysv4.h (ASM_OUTPUT_ALIGNED_DECL_LOCAL): Use + switch_to_section. + (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Delete. + (SDATA_SECTION_FUNCTION, SBSS_SECTION_FUNCTION): Delete. + + * config/iq2000/iq2000.c (iq2000_select_rtx_section): Return the + section rather than emitting assembly code. + (iq2000_select_section): Likewise. + * config/iq2000/iq2000.h (rdata_section, sdata_section): Delete. + (sbss_section): Delete. + + * config/m32r/m32r.h (ASM_OUTPUT_ALIGNED_BSS): Use switch_to_section + and get_named_section. + * config/m32r/m32r-protos.h (sbss_section, sdata_section): Delete. + + * config/mcore/mcore-elf.h (EXPORTS_SECTION_ASM_OP): Delete. + (SUBTARGET_EXTRA_SECTIONS, SUBTARGET_EXTRA_SECTION_FUNCTIONS): Delete. + (EXPORT_SECTION_FUNCTION, SUBTARGET_SWITCH_SECTIONS): Delete. + (MCORE_EXPORT_NAME): Emit the exports directive directly, then set + in_section to NULL. + (ASM_DECLARE_FUNCTION_NAME): Use switch_to_section. + (ASM_DECLARE_OBJECT_NAME): Update the type of save_section. Use the + global switch_to_section function instead of the old port-local one. + * config/mcore/mcore.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS) + (SWITCH_SECTION_FUNCTION): Delete. + * config/mcore/mcore-pe.h (SUBTARGET_SWITCH_SECTIONS): Delete. + (DRECTVE_SECTION_ASM_OP, SUBTARGET_EXTRA_SECTIONS): Delete. + (SUBTARGET_EXTRA_SECTION_FUNCTIONS, DRECTVE_SECTION_FUNCTION): Delete. + (MCORE_EXPORT_NAME): Emit ".section .drectve" directly, then set + in_section to NULL. + (ASM_DECLARE_OBJECT_NAME): Update the type of save_section. Use the + global switch_to_section function instead of the old port-local one. + (ASM_DECLARE_FUNCTION_NAME): Use switch_to_section. + + * config/mips/mips.c (mips_file_start): Update comment. + (mips_output_aligned_bss): Use switch_to_section and get_named_section. + (mips_output_aligned_decl_common): Use switch_to_section. + (mips_select_rtx_section): Return the section rather than emitting + assembly code. Use get_named_section. + (mips_function_rodata_section: Likewise get_section. + (build_mips16_function_stub): Use switch_to_section. + * config/mips/mips.h (ASM_OUTPUT_IDENT): Use switch_to_section. + (SDATA_SECTION_ASM_OP): Delete. + * config/mips/vxworks.h (EXTRA_SECTIONS): Delete. + (EXTRA_SECTION_FUNCTIONS): Delete. + + * config/mmix/mmix.c (mmix_file_start, mmix_file_end) + (mmix_asm_output_aligned_local): Use switch_to_section. + + * config/pa/pa.c (som_readonly_data_section, som_one_only_data_section) + (som_one_only_readonly_data_section): New variables. + (pa_output_function_epilogue): Set in_section to NULL instead of + calling forget_section. + (output_deferred_plabels): Use select_section. + (pa_asm_output_mi_thunk): Likewise. Set in_section to NULL instead + of calling forget_section. + (pa_asm_output_aligned_bss, pa_asm_output_aligned_common) + (pa_asm_output_aligned_local): Use select_section. + (som_text_section_asm_op): Delete in favor of... + (som_output_text_section_asm_op): ...this new function. + (pa_som_asm_init_sections): New function. + (pa_select_section): Return the section rather than emitting + assembly code. + * config/pa/pa.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Delete. + (SOM_READONLY_DATA_SECTION_FUNCTION): Delete. + (SOM_ONE_ONLY_READONLY_DATA_SECTION_FUNCTION): Delete. + (SOM_ONE_ONLY_DATA_SECTION_FUNCTION, FORGET_SECTION_FUNCTION): Delete. + * config/pa/pa-protos.h (som_text_section_asm_op): Delete. + (som_readonly_data_section, som_one_only_readonly_data_section) + (som_one_only_data_section, forget_section): Delete. + * config/pa/som.h (TEXT_SECTION_ASM_OP): Delete. + (TARGET_ASM_INIT_SECTIONS): Define. + (READONLY_DATA_SECTION, TARGET_ASM_EXCEPTION_SECTION): Delete. + + * config/rs6000/rs6000.c (read_only_data_section): New variable. + (private_data_section, read_only_private_data_section): New variables. + (sdata2_section, toc_section): New variables. + (rs6000_file_start): Use switch_to_section. + (rs6000_assemble_integer): Use comparisons against in_section + instead of calling in_toc_section and in_text_section. Use + unlikely_text_section_p. + (rs6000_elf_output_toc_section_asm_op): New function, derived + from the old rs6000/sysv4.h toc_section function. + (rs6000_elf_asm_init_sections): New function. + (rs6000_elf_select_rtx_section, rs6000_elf_select_section): Return + the section rather than emitting assembly code. + (machopic_output_stub): Use switch_to_section. + (toc_section): Delete dummy function. + (rs6000_elf_asm_out_constructor, rs6000_elf_asm_out_destructor): Use + switch_to_section and get_section. + (rs6000_xcoff_output_readonly_section_asm_op): New function. + (rs6000_xcoff_output_readwrite_section_asm_op): New function. + (rs6000_xcoff_output_toc_section_asm_op): New function, derived from + the old rs6000/xcoff.h toc_section function. + (rs6000_xcoff_asm_init_sections): New function. + (rs6000_xcoff_select_section, rs6000_xcoff_select_rtx_section): Return + the section rather than emitting assembly code. + (rs6000_xcoff_file_start): Use switch_to_section. + (rs6000_xcoff_file_end): Likewise. + * config/rs6000/rs6000-protos.h (toc_section, sdata_section): Delete. + (sdata2_section, sbss_section, private_data_section): Delete. + (read_only_data_section, read_only_private_data_section): Delete. + * config/rs6000/sysv4.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS) + (TOC_SECTION_FUNCTION, SDATA_SECTION_FUNCTION, SDATA2_SECTION_FUNCTION) + (SBSS_SECTION_FUNCTION, INIT_SECTION_FUNCTION): Delete. + (FINI_SECTION_FUNCTION): Delete. + (TARGET_ASM_INIT_SECTIONS): Define. + (ASM_OUTPUT_ALIGNED_LOCAL): Use switch_to_section. + * config/rs6000/xcoff.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS) + (READ_ONLY_DATA_SECTION_FUNCTION, PRIVATE_DATA_SECTION_FUNCTION) + (READ_ONLY_PRIVATE_DATA_SECTION_FUNCTION, TOC_SECTION_FUNCTION) + (READONLY_DATA_SECTION): Delete. + (TARGET_ASM_INIT_SECTIONS): Define. + (ASM_DECLARE_FUNCTION_NAME): Use switch_to_section. Set in_section + to NULL rather than no_section. + (TARGET_ASM_EXCEPTION_SECTION): Delete. + + * config/sh/sh.c (sh_file_start): Use switch_to_section. + + * config/sparc/sparc.c (emit_pic_helper): Use switch_to_section. + (sparc_output_deferred_case_vectors): Likewise. Remove argument + from call to current_function_section. + + * config/stormy16/stormy16.c: Include ggc.h and gt-storm16.h. + (bss100_section): New variable. + (xstormy16_asm_output_aligned_common): Use switch_to_section. + (xstormy16_asm_init_sections): New function. + (xstormy16_asm_out_destructor, xstormy16_asm_out_constructor): Use + switch_to_section and get_section. + (xstormy16_output_addr_vec): Use switch_to_section. Remove argument + from calls to current_function_section. + * config/stormy16/stormy16.h (EXTRA_SECTIONS): Delete. + (XSTORMY16_SECTION_FUNCTION, EXTRA_SECTION_FUNCTIONS): Delete. + (TARGET_ASM_INIT_SECTIONS): Define. + * config/stormy16/stormy16-protos.h (bss100_section): Delete. + + * config/svr3.h (ASM_OUTPUT_LOCAL): Use switch_to_section. + (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS, INIT_SECTION_FUNCTION) + (FINI_SECTION_FUNCTION): Delete. + + * config/v850/v850.c: Include gt-v850.h. + (rosdata_section, rozdata_section, tdata_section, zdata_section) + (zbss_section): New variables. + (v850_output_aligned_bss): Use switch_to_section. + (v850_asm_init_sections): New function. + (v850_select_section): Return the section rather than emitting + assembly code. + * config/v850/v850.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS) + (ZDATA_SECTION_ASM_OP, ZBSS_SECTION_ASM_OP, TDATA_SECTION_ASM_OP) + (ROSDATA_SECTION_ASM_OP, ROZDATA_SECTION_ASM_OP): Delete. + (TARGET_ASM_INIT_SECTIONS): Define. + * config/v850/v850-protos.h (sdata_section, rosdata_section): Delete. + (sbss_section, tdata_section, zdata_section, rozdata_section): Delete. + (zbss_section): Delete. + + * config/vax/vaxv.h (ASM_OUTPUT_LOCAL): Use switch_to_section. + + * config/vx-common.h (vxworks_exception_section): Delete. + (TARGET_ASM_EXCEPTION_SECTION): Delete. + + * config/xtensa/xtensa.c (xtensa_select_rtx_section): Return the + section rather than emitting assembly code. + * config/xtensa/xtensa.h (ASM_OUTPUT_POOL_PROLOGUE): Use + switch_to_section. + + * Makefile.in (GTFILES): Add $(srcdir)/output.h. + * coretypes.h (section): New union and typedef. + * dbxout.c (FORCE_TEXT): Use switch_to_section. Remove argument + from call to current_function_section. + (dbxout_function_end, dbxout_init, dbxout_source_file, dbxout_finish) + (dbxout_symbol_location): Use switch_to_section. + * dwarf2out.c (named_section_eh_frame_section): Delete, moving + most of the code into... + (default_eh_frame_section): ...here. Return a section. + (collect2_eh_frame_section): Delete, moving most of the code into.. + (switch_to_eh_frame_section): ...this new function. + (debug_info_section, debug_abbrev_section, debug_aranges_section) + (debug_macinfo_section, debug_line_section, debug_loc_section) + (debug_pubnames_section, debug_str_section, debug_ranges_section): New + variables. + (output_call_frame_info): Call switch_to_eh_frame_section instead of + eh_frame_section. Use switch_to_section and get_section. + (dwarf2out_begin_prologue): Use switch_to_section. + (AT_string_form): Check the flags in debug_str_section instead of + DEBUG_STR_SECTION_FLAGS. + (output_comp_unit): Use switch_to_section, get_section, and + debug_info_section. + (output_line_info, secname_for_decl): Use unlikely_text_section_p. + (dwarf2out_begin_block): Use switch_to_section. Remove argument + from call to current_function_section. + (dwarf2out_var_location): Use unlikely_text_section_p. + (dwarf2out_source_line): Use switch_to_section. Remove argument + from call to current_function_section. + (dwarf2out_start_source_file, dwarf2out_end_source_file) + (dwarf2out_define, dwarf2out_undef: Use switch_to_section and + debug_macinfo_section. + (dwarf2out_init): Initialize the new section variables. Use them + instead of calls to named_section_flags. Use switch_to_section. + (output_indirect_string): Use switch_to_section and debug_str_section. + (dwarf2out_finish): Use switch_to_section and the new section + variables. + * except.c (default_exception_section): Return the section instead + of emitting assembly code. + (output_function_exception_table): Use the global exception_section + variable instead of the target hook. Use switch_to_section. Remove + argument from call to current_function_section. + * final.c (HAVE_READONLY_DATA_SECTION): Delete. + (shorten_branches): Use pointer comparisons to detect whether the + text section is the same as readonly_data_section. + (profile_function): Use switch_to_section. Remove argument from + call to current_function_section. + (final_scan_insn): Likewise. Update use of last_text_section. + * gengtype.c (open_base_files): Add an include of output.h. + * output.h (text_section, data_section, readonly_data_section) + (ctors_section, dtors_section, bss_section, init_section) + (fini_section, sdata_section): Turn into section pointers. + (in_text_section, in_unlikely_text_section, exports_section) + (drectve_section, named_section, mergeable_string_section) + (last_text_section_name): Delete. + (default_exception_section, default_eh_frame_section): Return sections. + (SECTION_DECLARED, SECTION_NAMED): New macros. + (SECTION_MACH_DEP): Bump value. + (section_common, named_section, unnamed_section): New structures. + (unnamed_section_callback): New typedef. + (section): New union. + (sbss_section, exception_section, eh_frame_section): New variables. + (in_section, last_text_section): Turn into section pointers. + (get_unnamed_section, get_section, get_named_section): New functions. + (mergeable_constant_section, function_section): Return a section. + (unlikely_text_section): Likewise. + (current_function_section): Likewise. Remove the decl argument. + (unlikely_text_section_p, switch_to_section): New functions. + (output_section_asm_op): New function. + (set_named_section_flags, named_section_flags, named_section_real) + (named_section_first_declaration): Delete. + (default_select_section, default_elf_select_section): Return a section. + (default_elf_select_section_1, default_function_rodata_section) + (default_no_function_rodata_section, default_select_rtx_section) + (default_elf_select_rtx_section): Likewise. + * rtl.h (in_data_section): Delete. + * sdbout.c (sdbout_one_type): Use switch_to_section. + * system.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Poison. + (READONLY_DATA_SECTION, TARGET_ASM_EXCEPTION_SECTION): Poison. + (TARGET_ASM_EH_FRAME_SECTION): Poison. + * target-def.h (TARGET_ASM_INIT_SECTIONS): New macro. + (TARGET_ASM_EXCEPTION_SECTION, TARGET_ASM_EH_FRAME_SECTION): Delete. + (TARGET_ASM_OUT): Update after above changes. + * target.h (init_sections): New hook. + (exception_section, eh_frame_section): Delete. + (select_section, select_rtx_section, function_rodata_section): Return + a section rather than emitting assembly code. + * varasm.c (text_section, data_section, readonly_data_section) + (ctors_section, dtors_section, bss_section, init_section) + (fini_section): Turn into section pointers. + (sdata_section, sbss_section, exception_section): New variables. + (eh_frame_section): New variable. + (in_section): Make global and turn into a section pointer. + (last_text_section): Turn into a section pointer. + (unnamed_sections): New variable. + (in_named_name, last_text_section_name): Delete. + (EXTRA_SECTION_FUNCTIONS): Delete. + (in_named_entry): Delete. + (section_htab): New variable, replacing... + (in_named_htab): ...this deleted variable. + (section_entry_eq, section_entry_hash): New functions, based on... + (in_named_entry_eq, in_named_entry_hash): ...these deleted functions. + (get_unnamed_section, get_section): New functions. + (unlikely_text_section): Return a section instead of emitting + assembly code. + (in_text_section, in_unlikely_text_section, in_data_section): Delete. + (get_named_section_flags, named_section_first_declaration): Delete. + (unlikely_text_section_p): New function. + (named_section_real, named_section): Delete. + (get_named_section): New function. + (asm_output_bss, asm_output_aligned_bss): Use switch_to_section. + (function_section): Return a section rather than emitting + assembly code. + (current_function_section): Likewise. Remove argument. Use + last_text_section if nonnull, otherwise use function_section. + (default_function_rodata_section): Return a section rather than + emitting assembly code. Use get_section. + (default_no_function_rodata_section): Return a section rather than + emitting assembly code. + (variable_section): Use switch_to_section and get_named_section. + (mergeable_string_section): Return a section rather than emitting + assembly code. Use get_section. Make static. Don't take special + countermeasures for empty strings. + (mergeable_constant_section): Return a section rather than emitting + assembly code. Use get_section. + (default_named_section_asm_out_destructor): Use switch_to_section + and get_section. + (default_dtor_section_asm_out_destructor): Use switch_to_section. + (default_named_section_asm_out_constructor): Use switch_to_section + and get_section. + (default_ctor_section_asm_out_constructor): Use switch_to_section. + (assemble_start_function): Likewise. Set last_text_section to + NULL rather than no_section. Change the type of save_section. + (assemble_zeros, assemble_variable): Use the section flags to detect + whether or not a section is text. + (assemble_static_space): Use switch_to_section. + (assemble_trampoline_template): Likewise. + (output_constant_def_contents): Use switch_to_section and + get_named_section. + (output_constant_pool_1): Use switch_to_section. Use the section + flags to see whether sections contain mergeable data. + (init_varasm_once): Initialize section_htab instead of in_named_htab. + Initialize new section variables. Call TARGET_ASM_INIT_SECTIONS. + (default_elf_asm_named_section): Use SECTION_DECLARED to detect + whether a section has already been declared. + (default_select_section, default_elf_select_section): Return a + section rather than emitting assembly code. + (default_elf_select_section_1): Likewise. Use bss_section for + SECCAT_BSS if nonnull. Use get_named_section. + (default_select_rtx_section): Return a section rather than + emitting assembly code. + (default_elf_select_rtx_section): Likewise. Use get_named_section. + (file_end_indicate_exec_stack): Use switch_to_section and get_section. + (output_section_asm_op, switch_to_section): New functions. + * vmsdbgout.c (vmsdbgout_finish): Use switch_to_section and + get_named_section. + + * doc/tm.texi: Expand the introduction to the sections documentation. + (TRAMPOLINE_SECTION): Document new interface. + (SDATA_SECTION_ASM_OP): Document new macro. + (READONLY_DATA_SECTION): Delete. + (SDATA_SECTION_ASM_OP): Document new macro. + (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Delete. + (TARGET_ASM_INIT_SECTIONS): Document new hook. + (TARGET_ASM_SELECT_SECTION, TARGET_ASM_FUNCTION_RODATA_SECTION) + (TARGET_ASM_SELECT_RTX_SECTION): Adjust for new interface. + (TARGET_EXCEPTION_SECTION, TARGET_EH_FRAME_SECTION): Delete. + +2005-12-07 Alan Modra + + * gcc.c (init_gcc_specs): Match braces inside conditionally + compiled strings. + +2005-12-06 Geoffrey Keating + + * config/darwin.h (TARGET_CXX_CLASS_DATA_ALWAYS_COMDAT): New. + +2005-12-06 Aldy Hernandez + + PR C++/24138 + * tree.c (integer_all_onesp): Always return true if all bits on. + + * testsuite/g++.dg/init/array0.C: New. + +2005-12-06 Adrian Straetling + + * doc/md.texi: Adapt to implementation. + +2005-12-06 Andreas Schwab + + * opts.c (decode_options): Fix typo in message. + +2005-12-06 Alan Modra + + PR other/13873 + * longlong.h: Merge PPC tests from upstream. + +2005-12-06 Richard Guenther + + * fold-const.c (fold_convert): Do not build and fold + CONVERT_EXPR, but always use NOP_EXPR. + +2005-12-06 Jan Beulich + + * config/i386/i386.c (builtin_description): Use MASK_SSE2 for + __builtin_ia32_paddq and __builtin_ia32_psubq. + (ix86_init_mmx_sse_builtins): Use MASK_SSE|MASK_3DNOW_A for + __builtin_ia32_pshufw. + * config/i386/i386.md (mmx_adddi3, mmx_subdi3): Depend on TARGET_SSE2. + +2005-12-05 James E Wilson + + PR target/24934 + * opts.c (decode_options): Turn off partitioning if flag_unwind_tables + is set. + +2005-12-05 Daniel Berlin + + * print-tree.c (print_node): Ditto. + * tree-dfa.c (add_referenced_var): Tag's don't have DECL_INITIAL. + * tree-dump.c (dequeue_and_dump): Check for decl_common structure + before accessing DECL_ARTIFICIAL. + Handle new tag tree codes. + * tree-flow-inline.h (clear_call_clobbered): Update for tag + changes. + (unmodifiable_var_p): Ditto. + * tree-flow.h (mem_tag_kind): Remove. + (struct var_ann_d): Remove mem_tag_kind member. + * tree-gimple.c (is_gimple_reg): Tags are not gimple registers. + * tree-pretty-print.c (dump_generic_node): Handle memory tags. + * tree-ssa-alias.c (init_alias_info): Update for memory tag changes. + (group_aliases): Ditto. + (setup_pointers_and_addressables): Ditto. + (is_escape_site): Ditto. + (may_alias_p): Ditto. + (create_tag_raw): New function. + (create_memory_tag): Use it. + (dump_alias_info): Update for tags. + (may_be_aliased): Ditto. + (add_type_alias): Ditto. + (new_type_alias): Ditto. + (create_sft): Ditto. + (create_structure_vars): Ditto. + * tree-ssa-ccp.c (get_default_value): Ditto. + * tree-ssa-operands.c (get_expr_operands): Ditto. + (add_stmt_operand): Ditto. + (add_call_clobber_ops): Remove duplicated condition. + * tree-ssa.c (verify_flow_insensitive_alias_info): Update for + tags. + * tree-tailcall.c (suitable_for_tail_opt_p): Ditto. + * tree-vect-transform.c (vect_create_data_ref_ptr): Ditto. + * tree.c (init_ttree): Update structures for new tree codes. + (tree_code_size): Update sizes for new tree codes. + (make_node_stat): Don't try to set common things on minimal + structures. + (tree_node_structure): Update for tags. + (is_global_var): Ditto. + * tree.def: Add new tree codes. + * tree.h (MTAG_P): New macro. + (TREE_MEMORY_TAG_CHECK): Ditto. + (SSA_VAR_P): Update for tags. + (struct tree_memory_tag): New structure. + (MTAG_GLOBAL): New macro. + (union tree_node): Add memory tag member. + * treestruct.def (TS_MEMORY_TAG): New. + +2005-12-05 Dale Johannesen + + * config/i386/xmmintrin.h (_MM_TRANSPOSE4_PS): Fix to match + what was approved (PR 24323). + +2005-12-05 Gabriel Dos Reis + + * doc/c-tree.texi (Function Bodies): Remove description of + RETURN_INIT. + +2005-12-05 Joseph S. Myers + + * doc/libgcc.texi (__floatunsisf, __floatunsidf, __floatunsitf, + __floatunsixf, __floatundisf, __floatundidf, __floatunditf, + __floatundixf, __floatuntisf, __floatuntidf, __floatuntitf, + __floatuntixf, __powisf2, __powidf2, __powixf2, __mulsc3, + __muldc3, __multc3, __mulxc3, __divsc3, __divdc3, __divtc3, + __divxc3): Document. + +2005-12-05 Geoffrey Keating + + * config/arm/arm.c (arm_cxx_determine_class_data_visibility): Preserve + previous behaviour. + * config/darwin.h (TARGET_CXX_CLASS_DATA_ALWAYS_COMDAT): Define to + hook_bool_void_false. + (TARGET_CXX_DETERMINE_CLASS_DATA_VISIBILITY): Define. + * config/darwin.c (darwin_cxx_determine_class_data_visibility): New. + + * config/darwin.c (machopic_select_section): It's not defined + as weak if it's only marked as weak_import. + + * config/darwin-protos.h (darwin_cxx_determine_class_data_visibility): + Prototype. + + * varasm.c (default_binds_local_p_1): Weakrefs don't bind locally. + A hidden weak object does bind locally. Strong linkonce data + counts like any other strong symbol for binding. + (weak_finish_1): Don't specially handle weakrefs, they no longer + arrive here. + (assemble_alias): Weakrefs can't be TREE_PUBLIC yet. + * c-common.c (handle_alias_attribute): Allow static aliases + of variables. + (handle_weakref_attribute): Don't call declare_weak on weakrefs. + * gthr-dce.h: Make weakrefs static. + * gthr-tpf.h: Likewise. + * gthr-solaris.h: Likewise. + * gthr-posix.h: Likewise. + * gthr-posix95.h: Likewise. + * config/darwin.c (darwin_encode_section_info): static weakref + variables are not necessarily defined in this translation unit. + * doc/extend.texi (Function Attributes): Mention that an alias + attribute creates a definition for the thing it's attached to. + Change the documentation for weakref to say that the thing + it's attached to must be static. + + * config/rs6000/host-darwin.c (segv_handler): Unblock SEGV so + we don't go into an infinite loop. + +2005-12-05 Paolo Bonzini + + * config/rs6000/predicates.md (logical_const_operand): Split + out of logical_operand. + (logical_operand): Use it. + * config/rs6000/rs6000.md (cmp -> xor peephole2): Use + logical_const_operand. + +2005-12-05 Jan Beulich + + * config/i386/i386.c (enum ix86_builtins): Remove IX86_BUILTIN_CMPNEPS + and IX86_BUILTIN_CMPNESS. + (ix86_init_mmx_sse_builtins): Remove ti_ftype_ti_ti. + * config/i386/i386.h (ALIGN_MODE_128): Don't check TFmode explicitly. + * config/i386/i386.md (movti_internal): Correct type attribute. + Simplify mode attribute. + (movti_rex64, movsf_1, movdf_nointeger, movdf_integer, movtf_internal): + Correct type attribute. + (absxf2): Correct operator. + * config/i386/mmx.md (mov_internal_rex64, mov_internal, + movv2sf_internal_rex64, movv2sf_internal): Correct type attribute. + * config/i386/sse.md (mov_internal, movv2df_internal): Simplify + mode attribute. + (sse2_vmsqrtv2df2): Correct mode attribute. + +2005-12-05 Jan Beulich + + * config/ia64/ia64.md (rotlsi3_internal): Don't split if rotating by + 16 bits. Provide insn pattern for this case. + +2005-12-05 Jan Beulich + + * libgcc2.c (__popcountSI2): Don't use wide type for iterator and + result. + (__popcountDI2): Likewise. + +2005-12-04 John David Anglin + + PR target/25166 + * pa/pa.c (pa_hpux_init_libfuncs): Add _U_Qfcnvxf_usgl_to_quad and + _U_Qfcnvxf_udbl_to_quad to set of initialized libfuncs. + * pa/quadlib.c (_U_Qfcnvxf_usgl_to_quad, _U_Qfcnvxf_udbl_to_quad): New + functions. + +2005-12-04 Joseph S. Myers + + * c-typeck.c (null_pointer_constant_p): New function. + (build_conditional_expr, build_c_cast, convert_for_assignment, + build_binary_op): Use it. + +2005-12-04 Joseph S. Myers + + * c-common.c (binary_op_error): Do not allow NOP_EXPR. + (c_common_truthvalue_conversion): Handle NOP_EXPR the same as + CONVERT_EXPR. + (check_function_arguments_recurse): Allow both NOP_EXPR and + CONVERT_EXPR but check conversions preserve precision. + * c-typeck.c (pointer_diff): Allow both NOP_EXPR and CONVERT_EXPR + but check conversions preserve precision. + (build_unary_op): Don't allow NOP_EXPR. Use gcc_unreachable () in + default case. + +2005-12-04 Roger Sayle + + PR c/7776 + * common.opt (Wstring-literal-comparison): New command line option. + * c-opts.c (c_common_handle_option): Set it with -Wall. + * c-typeck.c (parser_build_binary_op): Issue warning if either + operand of a comparison operator is a string literal, except for + testing equality or inequality against NULL. + + * doc/invoke.texi: Document new -Wstring-literal-comparison option. + +2005-12-03 Joseph S. Myers + + * c-common.c (c_sizeof_or_alignof_type): Use fold_convert instead + of building a NOP_EXPR. + (c_alignof_expr): Likewise. Handle CONVERT_EXPR the same as + NOP_EXPR. + * c-convert.c (convert): Use fold_convert instead of building + NOP_EXPRs and CONVERT_EXPRs directly. Don't special case + c_objc_common_truthvalue_conversion returning a NOP_EXPR. Remove + #if 0 code. + * c-pretty-print.c (pp_c_cast_expression, pp_c_expression): Handle + NOP_EXPR the same as CONVERT_EXPR. + * c-typeck.c (build_function_call): Use fold_convert instead of + building a NOP_EXPR directly. + (build_compound_expr): Handle NOP_EXPR the same as CONVERT_EXPR. + +2005-12-03 Alan Modra + + PR rtl-optimization/25197 + * dwarf2out.c (dwarf2out_frame_debug_expr ): Assert we + have a reg. + +2005-12-02 Stuart Hastings + + * config/rs6000/darwin.h (SUBTARGET_OVERRIDE_OPTIONS): Remove -fpic + warning. + +2005-12-03 Joseph S. Myers + + * c-typeck.c (default_function_array_conversion, + build_function_call): Allow for CONVERT_EXPR as well as NOP_EXPR. + (build_conditional_expr): Apply integer_zerop to orig_op1 and + orig_op2. Don't check them for NOP_EXPR. + (build_c_cast, convert_for_assignment): Don't check for NOP_EXPR + around integer zero. + +2005-12-03 Alan Modra + + * config/rs6000/rs6000.c (rs6000_stack_t): Remove toc_save_p, + toc_save_offset, toc_size, lr_size. + (rs6000_stack_info): Use memset rather than bss struct copy to init. + Test rs6000_ra_ever_killed last in condition setting lr_save_p. + Adjust for removal of unused rs6000_stack_t fields. + (debug_stack_info): Adjust. + (rs6000_ra_ever_killed): Expand FIND_REG_INC_NOTE. Test for calls + first, and don't bother checking for set/inc of lr on sibcalls. + (rs6000_emit_epilogue): Tidy code restoring stack pointer. + +2005-12-02 Jakub Jelinek + + PR target/25199 + * config/i386/i386.md (movqi_1): Only force imovx for alternative + 5 if operand 1 is not aligned. Undo previous constraint change. + * config/i386/predicates.md (aligned_operand): Use MEM_ALIGN. + +2005-12-02 Richard Guenther + + * tree.h (build): Remove prototype. + (build, _buildN1, _buildN2, _buildC1, _buildC2): Remove macros. + * tree.c (build): Remove. + (build0_stat): Update comment. + +2005-12-02 Richard Guenther + + * tree-ssa-loop-im.c (schedule_sm): Use buildN instead of build. + * tree-complex.c (update_complex_assignment, expand_complex_div_wide): + Likewise. + * tree-ssa-ccp.c (maybe_fold_offset_to_array_ref, + maybe_fold_offset_to_component_ref): Likewise. + * tree-ssa-dom.c (thread_across_edge, + simplify_rhs_and_lookup_avail_expr, + find_equivalent_equality_comparison, record_equivalences_from_stmt): + Likewise. + * gimple-low.c (lower_function_body, lower_return_expr): Likewise. + * tree-eh.c (do_return_redirection, honor_protect_cleanup_actions, + lower_try_finally_switch): Likewise. + * tree-if-conv.c (add_to_dst_predicate_list, + replace_phi_with_cond_modify_expr, ifc_temp_var): Likewise. + * gimplify.c (internal_get_tmp_var, gimple_build_eh_filter, + voidify_wrapper_expr, build_stack_save_restore, gimplify_bind_expr, + gimplify_return_expr, gimplify_decl_expr, gimplify_switch_expr, + gimplify_case_label_expr, gimplify_exit_expr, gimplify_self_mod_expr, + shortcut_cond_r, shortcut_cond_expr, gimplify_cond_expr, + gimplify_init_ctor_eval, gimplify_init_constructor, + gimplify_variable_sized_compare, gimplify_boolean_expr, + gimplify_cleanup_point_expr, gimple_push_cleanup, gimplify_target_expr, + gimplify_expr, gimplify_body, gimplify_function_tree, + force_gimple_operand): Likewise. + * tree-ssa-pre.c (create_expression_by_pieces): Likewise. + * tree-mudflap.c (mf_decl_cache_locals, mf_build_check_statement_for, + mx_register_decls): Likewise. + * tree-nested.c (init_tmp_var, save_tmp_var, get_static_chain, + get_frame_field, finalize_nesting_tree_1): Likewise. + * tree-inline.c (setup_one_parameter): Likewise. + * tree-vect-transform.c (vectorizable_condition): Likewise. + * tree-outof-ssa.c (insert_copy_on_edge, insert_backedge_copies): + Likewise. + * tree-profile.c (tree_gen_edge_profiler): Likewise. + * tree-cfg.c (factor_computed_gotos, gimplify_val): Likewise. + * c-parser.c (c_parser_if_body, c_parser_switch_statement): Likewise. + * tree-chrec.h (build_polynomial_chrec): Likewise. + +2005-12-02 Richard Guenther + + * config/alpha/alpha.c (alpha_va_start, alpha_gimplify_va_arg_1i, + alpha_gimplify_va_arg): Use buildN and fold_buildN where applicable. + * config/frv/frv.c (frv_expand_builtin_va_start): Likewise. + * config/s390/s390.c (s390_va_start, s390_gimplify_va_arg): Likewise. + * config/ia64/ia64.c (ia64_gimplify_va_arg): Likewise. + * config/i386/i386.c (ix86_va_start, ix86_gimplify_va_arg): Likewise. + * config/rs6000/rs6000.c (rs6000_va_start, rs6000_gimplify_va_arg): + Likewise. + * config/sh/sh.c (sh_va_start, sh_gimplify_va_arg_expr, + sh_adjust_unroll_max): Likewise. + * config/c4x/c4x.c (c4x_gimplify_va_arg_expr): Likewise. + * config/pa/pa.c (hppa_gimplify_va_arg_expr): Likewise. + * config/xtensa/xtensa.c (xtensa_va_start, xtensa_gimplify_va_arg_expr): + Likewise. + * config/stormy16/stormy16.c (xstormy16_expand_builtin_va_start): + Likewise. + * config/mips/mips.c (mips_va_start, mips_gimplify_va_arg_expr): + Likewise. + +2005-12-02 Richard Guenther + + * tree-vrp.c (build_assert_expr_for, process_assert_insertions_for, + simplify_cond_using_ranges): Use buildN instead of build. + * tree-tailcall.c (adjust_accumulator_values, + adjust_return_value): Likewise. + * tree-sra.c (generate_one_element_ref, generate_copy_inout, + generate_element_copy, generate_element_zero, + generate_one_element_init): Likewise. + * tree-ssa-forwprop.c (forward_propagate_into_cond_1): Likewise. + * lambda-code.c (gcc_loop_to_lambda_loop, lbv_to_gcc_expression, + lle_to_gcc_expression, lambda_loopnest_to_gcc_loopnest, + perfect_nestify): Likewise. + +2005-12-02 John David Anglin + + * pa.c (pa_secondary_reload): Revise initialization of variable regno. + +2005-12-02 Gabriel Dos Reis + + * ggc.h (GGC_RESIZEVEC): New. + +2005-12-02 Volker Reichelt + + * gcc.c (execute): Improve readability. + +2005-12-02 Richard Guenther + + * tree-cfg.c (mark_used_vars): New function. + (dump_function_to_file): Dump only used VAR_DECLs. + +2005-12-02 Richard Guenther + + * convert.c (convert_to_integer): Fix compare for nonpositive + constant to use tree_int_cst_sgn <= 0. + +2005-12-02 Richard Guenther + + * convert.c (convert_to_integer): Use fold_convert instead + of fold_build1 (NOP_EXPR, ...). Use tree_int_cst_sgn < 0 + instead of comparing against 0. Use build_int_cst instead + of converting integer_zero_node. + +2005-12-02 Richard Guenther + + * tree-pretty-print.c (op_symbol): Handle LROTATE_EXPR + and RROTATE_EXPR. + +2005-12-02 Alan Modra + + PR target/21017 + * combine.c (simplify_logical ): Simplify more patterns to + rotates. + +2005-12-02 Alan Modra + + PR middle-end/25176 + * function.c (expand_function_end): Emit blockage for unwinder + after return label. + +2005-12-01 Roger Sayle + + * tree.h (TREE_OVERFLOW): Make this flag/predicate specific to + constant nodes, i.e. INTEGER_CST, REAL_CST, etc... + * tree-vrp.c (compare_values): Only check TREE_OVERFLOW for + integer constant comparisons. + +2005-12-02 Jon Grimm + Janis Johnson + David Edelsohn + Ben Elliston + + * dfp.h, dfp.c: New files. + * Makefile.in (DECNUM, DECNUMINC, LIBDECNUMBER): New variables. + (DECNUM_H): Likewise. + (LIBDEPS, LIBS, BACKEND): Append $(LIBDECNUMBER). + (INCLUDES): Append $(DECNUMINC). + (OBJS-common): Add dfp.o. + (dfp.o): New rule. + * real.h (EXP_BITS): Pinch one bit to .. + (struct real_value): Add decimal field. + (real_format): Change table size, update documentation. + (REAL_MODE_FORMAT): Update for to handle float, decimal float. + (real_from_string3): Declare. + (decimal_single_format): Declare. + (decimal_double_format): Declare. + (decimal_quad_format): Declare. + (REAL_VALUE_TO_TARGET_DECIMAL32): New. + (REAL_VALUE_TO_TARGET_DECIMAL64): New. + (REAL_VALUE_TO_TARGET_DECIMAL128): New. + * real.c: Include dfp.h. + (normalize): Early return for decimal floats. + (do_add): Zero decimal field. + (do_compare): Call do_decimal_compare for decimal floats. + (do_fix_trunc): Likewise, call decimal_do_fix_trunc. + (real_arithmetic): Call decimal_real_arithmetic for decimal + floating point operands. + (real_identical): If a and b are of differing radix, return false. + (real_to_integer): Call decimal_real_to_integer if the value is a + decimal float. + (real_to_integer2): Likewise, call decimal_real_to_integer2. + (real_to_decimal): Likewise, call decimal_real_to_decimal. + (real_to_hexadecimal): Place "N/A" in the return string for + decimal float. + (real_from_string3): New variant, given a mode. + (real_maxval): Use decimal_real_maxval for decimal floats. + (round_for_format): Use decimal_round_for_format for decimals. + (real_convert): Use decimal_real_convert where appropriate. + (significand_size): Handle base 10. + (encode_decimal_single, decode_decimal_single, + encode_decimal_double, decode_decimal_double, encode_decimal_quad, + decode_decimal_quad): New functions. + (decimal_single_format): New. + (decimal_double_format): New. + (decimal_quad_format): New. + * machmode.def: Add SD, DD and TD decimal floating point modes. + * machmode.h (FLOAT_MODE_P, SCALAR_FLOAT_MODE_P, MODES_WIDEN_P): + Include MODE_DECIMAL_FLOAT. + (DECIMAL_FLOAT_MODE_P): New. + * mode-classes.def (MODE_DECIMAL_FLOAT): New mode class. + * genmodes.c (struct mode_data): Add counter field. + (struct mode_data): Update comment for format. + (blank_mode): Initialise counter field. + (new_mode): Increment counter field for each mode defined. + (complete_mode): Handle MODE_DECIMAL_FLOAT, update check for mode + using a format. + (make_complex_modes): Handle modes containing `D'. + (DECIMAL_FLOAT_MODE, FRACTIONAL_DECIMAL_FLOAT_MODE): New. + (make_decimal_float_mode): New. + (reset_float_format): Handle MODE_DECIMAL_FLOAT. + (cmp_modes): Compare counter field if other characteristics + similar. + (emit_real_format_for_mode): Support formats for decimal floats. + * doc/rtl.texi (Machine Modes): Document SD, DD and TDmodes. + Document MODE_DECIMAL_FLOAT. + +2005-12-02 Alan Modra + + * simplify-rtx.c (simplify_plus_minus): Do simplify constants. + Delete dead code. + +2005-12-01 Richard Henderson + + * optabs.c (expand_vec_cond_expr): Use EXPAND_NORMAL. + +2005-12-01 Kaveh R. Ghazi + + * builtins.def (BUILT_IN_PUTC, BUILT_IN_PUTC_UNLOCKED): New. + + * config/pa/pa.c (pa_init_builtins): If we detect + DONT_HAVE_FPUTC_UNLOCKED, set builtin fputc_unlocked to + putc_unlocked. + +2005-12-01 Richard Guenther + + * fold-const.c (fold_binary): Use fold_build2, not + fold (build (...)). + +2005-12-01 Nathan Sidwell + + * config/ms1/ms1.c (ms1_reorg_hazard): Don't count noop moves. + + * vec.h (VEC_block_remove): New. + +2005-12-01 Gabriel Dos Reis + + PR c/13384 + * c-common.c (lvalue_error): Fix wording. + +2005-12-01 Richard Guenther + + * tree-ssa-forwprop.c (forward_propagate_addr_expr): Fix + thinko in last patch. + +2005-12-01 Geoffrey Keating + + * config/t-slibgcc-darwin (SHLIB_LINK): Use -single_module rather + than -flat_namespace. + +2005-12-01 Ben Elliston + + * mklibgcc.in: Parameterise the script to build soft float + functions by iterating over each type, rather than cloning the + code for each type. + +2005-11-30 Kaveh R. Ghazi + + PR middle-end/25158 + * builtins.c (fold_builtin_fputs): Defer check for missing + replacement functions. + +2005-11-30 Kean Johnston + + * config/i386/i386.c: Check the value of SUPPORTS_ONE_ONLY, not + simply its presense in case targets #define SUPPORTS_ONE_ONLY 0. + +2005-11-30 Richard Guenther + + PR tree-optimization/22501 + * tree-ssa-forwprop.c (forward_propagate_addr_expr_1): New + function split out from ... + (forward_propagate_addr_expr): ... here. Use it to propagate + ADDR_EXPRs to all uses. + +2005-11-30 Volker Reichelt + + * tree.h (CASE_FLT_FN, CASE_INT_FN): New macros. + * builtins.c (expand_builtin_mathfn): Use them. + (expand_builtin_mathfn_2): Likewise. + (expand_builtin_mathfn_3): Likewise. + (expand_builtin_int_roundingfn): Likewise. + (expand_builtin): Likewise. + (integer_valued_real_p): Likewise. + (fold_builtin_int_roundingfn): Likewise. + (fold_builtin_bitop): Likewise. + (fold_builtin_logarithm): Likewise. + (fold_builtin_1): Likewise. + * convert.c (convert_to_integer): Likewise. + * fold-const.c (negate_mathfn_p): Likewise. + (tree_expr_nonnegative_p): Likewise. + +2005-11-30 Dale Johannesen + Andrew Pinski + + * combine.c (find_split_point): Sign extend bitmask + when changing bitfield assignment to IOR of AND. + +2005-11-30 Nathan Sidwell + + * config/ms1/ms1.md (decrement_and_branch_until_zero): Add early + clobber to scratch reg. + (*decrement_and_branch_until_zero_no_clobber): Remove. + (decrement_and_branch peephole): Add dummy scratch reg to pattern. + (mulhish3): Use TARGET_MS1_16_003, TARGET_MS2. + * config/ms1/ms1.opt (mmul): Remove. + * config/ms1/ms1.h (ASM_SPEC): Cope with uppercase arch names. + (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Default to 16-002. + +2005-11-30 John David Anglin + Bernd Schmidt + + * pa/predicates.md (symbolic_operand): Add comment. + * pa/pa.md (reload_insi_r1, reload_indi_r1): New reload expanders. + * pa/pa-protos.h (pa_secondary_reload_class): Delete. + * pa/pa.c (TARGET_SECONDARY_RELOAD): Define. + (pa_secondary_reload_class): Delete. + (pa_secondary_reload): New function derived from SECONDARY_RELOAD_CLASS + and pa_secondary_reload_class. Reorder some checks. Update inline + copy of symbolic operand. + * pa/pa.h (SECONDARY_RELOAD_CLASS): Delete. + +2005-11-30 Nathan Sidwell + + * loop-doloop.c (add_test): Only add jump notes if we did emit a + jump. + +2005-11-30 Jeff Law + + * tree-ssa-uncprop.c (associate_equivalences_with_edges): Properly + handle SSA_NAME_OCCURS_IN_ABNORMAL_PHI. + +2005-11-30 Jakub Jelinek + + * config/ia64/ia64.c (ia64_expand_tls_address): Add ORIG_OP1 argument. + Move ADDEND_{HI,LO} computation into TLS_MODEL_INITIAL_EXEC case. + (ia64_expand_move): Adjust caller. + + * config/ia64/ia64.c (ia64_expand_atomic_op): Only use + fetchadd{4,8}.acq instruction if CODE is PLUS or MINUS, for MINUS + negate VAL. + +2005-11-30 Paolo Bonzini + + * simplify-rtx.c (simplify_plus_minus): Remove final parameter. + Always produce an output if we can remove NEGs or canonicalize + (minus (minus ...)) expressions. Provide a fast path for the + two-operand case. + (simplify_gen_binary): Do not call simplify_plus_minus. + (simplify_binary_operation_1): Reassociate at the end of the + function. + +2005-11-29 Evan Cheng + + * config/i386/xmmintrin.h (_MM_TRANSPOSE4_PS): Rewrite using high/low + moves and unpack to speed up. + +2005-11-29 David S. Miller + + * config/sparc/sparc.c (gen_compare_reg): Kill 2nd and 3rd + argument, they are always sparc_compare_op0 and sparc_compare_op1. + (gen_v9_scc): Update callers. + * config/sparc/sparc.md: Likewise. + * config/sparc/sparc-protos.h: Update extern declaration. + + * tree-into-ssa.c (rewrite_into_ssa): Fix comment typo. + +2005-11-29 Andrew Pinski + + * fold-const.c (negate_expr) : Add break after + the if. + +2005-11-29 Andrew Pinski + + * fold-const.c (negate_expr_p): Return true for BIT_NOT_EXPR. + (fold_unary) : Move -(~a) transformation to ... + (negate_expr): Here. + +2005-11-29 Ben Elliston + + * config/i386/i386.h (FORCE_PREFERRED_STACK_BOUNDARY_IN_MAIN): + Fix typo in comment. + +2005-11-29 Ben Elliston + + * Makefile.in (clean-target): Depend on clean-target-libgcc. + (clean-target-libgcc): Import rule from the top-level Makefile.in. + +2005-11-29 Kaveh R. Ghazi + + PR middle-end/20109 + PR middle-end/25120 + * builtins.c (init_target_chars): New. + (expand_builtin_printf, expand_builtin_fprintf, + expand_builtin_sprintf, fold_builtin_sprintf, + maybe_emit_sprintf_chk_warning, fold_builtin_sprintf_chk, + fold_builtin_snprintf_chk, fold_builtin_printf, + fold_builtin_fprintf): Check for matching format strings using + the target charset. + +2005-11-29 Paul Brook + + * config.gcc: Do not use fixproto on m68k-elf. + +2005-11-28 Roger Sayle + + * expmed.c (div_cost): Replace with... + (sdiv_cost, udiv_cost): New. + (init_expmed): Initialize sdiv_cost and udiv_cost, not div_cost. + Rename the div and mod fields, used to initialize sdiv_pow2_cheap + and smod_pow2_cheap, to sdiv_32 and smod_32 to avoid confusion. + (expand_divmod): Replace use of div_cost with either sdiv_cost + or udiv_cost depending upon the signedness of the operation. + +2005-11-28 Alexandre Oliva + + PR libfortran/24991 + * config/darwin.c (machopic_indirection_name, + machopic_output_indirection): Follow transparent alias chain. + +2005-11-28 Alexandre Oliva + + * varasm.c (ultimate_transparent_alias_target): Add comment. + +2005-11-28 Kazu Hirata + + * config/m68k/m68k.c (notice_update_cc): Use SET_DEST and + SET_SRC instead of XEXP where appropriate. + +2005-11-28 Joseph S. Myers + + * config/fp-bit.c (isnan, isinf, pack_d, unpack_d): Use + __builtin_expect. + +2005-11-28 Joseph S. Myers + + * config/fp-bit.h (LSHIFT): Take shift count parameter. + * config/fp-bit.c (_fpadd_parts): Shift in one go instead of one + bit at a time. + +2005-11-28 Bernd Schmidt + + * config/bfin/bfin.c (bfin_secondary_reload): Renamed from + secondary_input_reload_class, made static. Adapt to new + infrastructure. + (secondary_output_reload_class): Delete. + (TARGET_SECONDARY_RELOAD): New macro. + * config/bfin/bfin.h (SECONDARY_INPUT_RELOAD_CLASS, + SECONDARY_OUTPUT_RELOAD_CLASS): Delete. + +2005-11-28 Nathan Sidwell + + PR c++/21166 + * c-decl.c (finish_struct): Only set DECL_PACKED on a field + when its natural alignment is > BITS_PER_UNIT. + * stor-layout.c (finalize_type_size): Revert my patch of 2005-08-08. + * c-common.c (handle_packed_attribute): Ignore packing on a field + whose type is naturally char aligned. + +2005-11-28 Richard Guenther + + * c-common.c (strict_aliasing_warning): Handle all + component-ref like accesses. + +2005-11-28 Roger Sayle + Uros Bizjak + + PR middle-end/20219 + * fold-const.c (fold binary) : Optimize + sin(x)/tan(x) as cos(x) and tan(x)/sin(x) as 1.0/cos(x) + when flag_unsafe_math_optimizations is set and + we don't care about NaNs or Infinities. + + Move x/expN(y) and x/pow(y,z) transformation into common + flag_unsafe_math_optimizations section. + +2005-11-27 Mark Mitchell + + * gcc.c (main): Change type of argv to "char **". + +2005-11-28 Alan Modra + + * doc/invoke.texi (powerpc msdata-data): Static data doesn't go in + small data sections. + * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Make global. + * config/rs6000/rs6000-protos.h: (rs6000_elf_in_small_data_p): Declare. + * config/rs6000/sysv4.h (ASM_OUTPUT_ALIGNED_LOCAL): Rename to.. + (ASM_OUTPUT_ALIGNED_DECL_LOCAL): ..this, adding extra parm. Don't + output locals to sbss if !rs6000_elf_in_small_data_p. + (ASM_OUTPUT_ALIGNED_BSS): Adjust for above. + +2005-11-28 Alan Modra + + PR target/24997 + * config/rs6000/rs6000.c (legitimate_indexed_address_p): Allow pattern + generated by reload. + * config/rs6000/predicates.md (indexed_or_indirect_operand): Use + indexed_or_indirect_address. + (indexed_or_indirect_address): Don't test for base reg. Call + address_operand last. Make it a special predicate. + +2005-11-27 Kazu Hirata + + * config/m68k/m68k.c (notice_update_cc): Remove useless code. + +2005-11-27 Andrew Pinski + + PR middle-end/24575 + * fold-const.c (negate_expr_p): Add case for signed divides if overflow + is undefined. + (negate_expr): Likewise. + +2005-11-27 Andreas Schwab + + * config/m68k/m68k.c: Reindent and fix whitespace, remove + redundant parens. + +2005-11-27 Steven Bosscher + + * cfgcleanup.c (try_crossjump_to_edge): Always split SRC2 if it + has EH predecessor edges. + +2005-11-26 Eric Christopher + + * config/i386/i386.md (*zero_extendqihi2_movzbw): Avoid partial + register stalls by zero extending to the full register. + +2005-11-27 Joseph S. Myers + + * config/floatunsisf.c, config/floatunsidf.c, + config/floatunsixf.c, config/floatunsitf.c: New files. + * config/ia64/t-hpux: Add floatunsitf.c. + * config/ia64/ia64.c (ia64_init_libfuncs): Use + _U_Qfcnvxuf_dbl_to_quad for unsigned DImode-to-TFmode conversion. + +2005-11-26 Richard Henderson + + * c-lex.c (pragma_lex): Rename from c_lex. + * c-pch.c: Update for pragma_lex rename. + * c-pragma.c, c-pragma.h, config/ia64/ia64-c.c: Likewise. + * config/m32c/m32c-pragma.c, config/darwin-c.c: Likewise. + * config/rs6000/rs6000-c.c, config/c4x/c4x-c.c: Likewise. + * config/sol2-c.c, config/v850/v850-c.c: Likewise. + * doc/tm.texi: Likewise. + +2005-11-26 Andrew Pinski + + PR middle-end/23669 + * fold-const.c (fold_binary): Convert -A/-B to A/B for signed types + when overflow is undefined. + +2005-11-26 Hans-Peter Nilsson + + * doc/md.texi (Insn Canonicalizations): Refer to the + function commutative_operand_precedence for further rules. + +2005-11-25 Roger Sayle + + PR middle-end/21309 + * expmed.c (choose_mult_variant): Return immediately when mult_cost + is less than zero. Limit mult_cost to a reasonable upper bound for + the synthetic multiplication sequence. + +2005-11-25 Kaveh R. Ghazi + + PR middle-end/25022 + * builtins.c (expand_builtin_printf, expand_builtin_fprintf, + fold_builtin_fputs, fold_builtin_printf, fold_builtin_fprintf): + Lookup the explicit replacement functions for any unlocked + stdio builtin transformations. + +2005-11-25 Hans-Peter Nilsson + + * config/cris/cris.md ("reload_out"): Mark operand 2 as + earlyclobber. + * targhooks.c (default_secondary_reload): Don't require operand 2 + for an input reload to be earlyclobber. + +2005-11-25 Volker Reichelt + + * fold-const.c (negate_mathfn_p): Fix comment and add support + for BUILT_IN_CBRT, BUILT_IN_SINH, BUILT_IN_TANH, BUILT_IN_ASINH, + BUILT_IN_ATANH. + +2005-11-25 Joseph S. Myers + + PR middle-end/24998 + * config/sparc/sparc.c (sparc_init_libfuncs): Use _Q_utoq and + _Q_ulltoq for unsigned conversions from SImode and DImode to + TFmode. + +2005-11-25 Alan Modra + + * config/rs6000/ppc64-fp.c (__floatunditf): New function. + (__floatundidf, __floatundisf): Likewise. + +2005-11-25 David Edelsohn + + * config/rs6000/rs6000.c (rs6000_sr_alias_set): Delete. + (rs6000_override_options): Remove initialization of + rs6000_sr_alias_set. + (rs6000_emit_eh_reg_restore): Use gen_frame_mem. + (rs6000_emit_stack_tie): Same. + (emit_frame_save): Same. + (gen_frame_mem_offset): Same. + (rs6000_emit_prologue): Same. + (rs6000_emit_epilogue): Same. + +2005-11-25 Andrew Pinski + + PR middle-end/24989 + * fold-const.c (fold_build): Convert bool_var != 1 and + bool_var == 0 to !bool_var. + +2005-11-25 Andrew Pinski + + PR middle-end/24990 + * fold-const.c (fold_binary): Fold (~a) == C to a == ~C + for C being INTEGER_CST. Likewise for !=. + +2005-11-25 Joseph S. Myers + + PR middle-end/24998 + * config/rs6000/rs6000.c (rs6000_init_libfuncs): Use _q_utoq for + unsigned conversions from SImode to TFmode. + +2005-11-24 Bernd Schmidt + + * expr.c (expand_expr_real_1): Fix error in last change. + +2005-11-24 J"orn Rennecke + + * caller-save.c: (this_insn_sets): Move into: + (save_call_clobbered_regs). + (mark_set_regs): Get this_insn_sets from data. + + (save_call_clobbered_regs): Take sets of the return value by + sibcalls into account. + +2005-11-24 J"orn Rennecke + PR target/21623: + + * regclass.c (FORBIDDEN_INC_DEC_CLASSES): Remove + SECONDARY_INPUT_RELOAD_CLASS and SECONDARY_OUTPUT_RELOAD_CLASS tests. + (init_fake_stack_mems): Remove HAVE_SECONDARY_RELOADS test. + (memory_move_secondary_cost, init_reg_autoinc): Remove + SECONDARY_INPUT_RELOAD_CLASS / SECONDARY_OUTPUT_RELOAD_CLASS tests. + Replace SECONDARY_{IN,OUT}PUT_RELOAD_CLASS use with + secondary_reload_class call. + (copy_cost): Likewise. Add new parameter prev_sri. Changed all + callers. + * reload.c (entire file): Remove HAVE_SECONDARY_RELOADS checks. + (push_secondary_reload): Use secondary_reload target hook. + (secondary_reload_class, scratch_reload_class): New functions. + (push_reload): Remove SECONDARY_INPUT_RELOAD_CLASS and + SECONDARY_OUTPUT_RELOAD_CLASS tests. Replace + SECONDARY_{IN,OUT}PUT_RELOAD_CLASS use with secondary_reload_class call. + * reload.h (HAVE_SECONDARY_RELOADS): Don't define nor test. + (secondary_reload_class, scratch_reload_class): Declare. + * reload1.c: Include target.h. + (reload_adjust_reg_for_temp): New function. + (reload_adjust_reg_for_icode): Likewise. + (choose_reload_regs): Remove SECONDARY_INPUT_RELOAD_CLASS test. + Replace SECONDARY_INPUT_RELOAD_CLASS use with secondary_reload_class + call. + (emit_input_reload_insns): Likewise. Rewrite secondary reload checks + for inheritance. Support case when both secondary & tertiary reloads + are for intermediate registers. + (emit_output_reload_insns): Replace SECONDARY_OUTPUT_RELOAD_CLASS use + with secondary_reload_class call. Support case when both secondary + & tertiary reloads are for intermediate registers. + * target-def.h (TARGET_SECONDARY_RELOAD): Provide default definition. + (TARGET_INITIALIZER) Add TARGET_SECONDARY_RELOAD. + * target.h (secondary_reload_info): New struct / typedef. + (struct gcc_target): New member secondary_reload. + * targhooks.c Include reload.h, optabs.h and recog.h. + (default_secondary_reload): New function. + * targhooks.h (default_secondary_reload): Declare. + * doc/tm.texi: Document secondary_reload target hook. Update + description of SECONDARY_*RELOAD_CLASS and reload_{in,out}. + * doc/md.texi: Likewise. + + * sh-protos.h (sh_secondary_reload): Declare. + * sh.c (TARGET_SECONDARY_RELOAD): Override. + (sh_secondary_reload): New function. + * sh.h (SECONDARY_INOUT_RELOAD_CLASS): Don't define. + (SECONDARY_OUTPUT_RELOAD_CLASS): Likewise. + (SECONDARY_INPUT_RELOAD_CLASS): Likewise. + (HAVE_SECONDARY_RELOADS): Define. + * sh.md (reload_indf): Rename to: + (reload_indf__frn). + (reload_outdf): Rename to: + (reload_outdf__RnFRm). + (reload_insf): Rename to: + (reload_insf__frn). + (reload_insi): Rename to: + (reload_insi__i_fpul). + +2005-11-24 Uros Bizjak + + * configure.ac: Require at least texinfo 4.4. + * configure: Regenerate. + + * doc/install.texi (Tools/packages necessary for building GCC): + Update required version of texinfo to at least 4.4. + (Installing GCC: Building): Update required version of texinfo + to at least 4.4. + (Installing GCC: Final installation): Update required version + of texi2dvi to at least 4.4. + (Host/target specific installation notes for GCC): Update required + version of texinfo to at least 4.4. + +2005-11-24 Richard Guenther + Dirk Mueller + + PR c++/14024 + * c-common.h (strict_aliasing_warning): Declare. + * c-common.c (strict_aliasing_warning): New function, + split out from ... + * c-typeck.c (build_c_cast): ... here. + +2005-11-24 Paolo Bonzini + + * optabs.c (expand_binop): Use swap_commutative_operands_with_target + to order operands. + (swap_commutative_operands_with_target): New. + +2005-11-24 Paolo Bonzini + + * gcse.c (hash_scan_set): Look through REG_EQUAL or REG_EQUIV notes + also when doing PRE, rather than only for global CPROP. + +2005-11-24 Ben Elliston + + * machmode.h (CLASS_HAS_WIDER_MODES_P): New macro. + * optabs.c (expand_binop): Use CLASS_HAS_WIDER_MODES_P, improve + formatting. + (expand_twoval_unop): Likewise. + (widen_clz): Likewise. + (expand_parity): Likewise. + (expand_unop): Likewise. + (emit_cmp_and_jmp_insn_1): Likewise. + (prepare_float_lib_cmp): Likewise. + +2005-11-24 Ben Elliston + + * optabs.c (prepare_cmp_insn): Use SCALAR_FLOAT_MODE_P. + Remove unused `class' variable. + +2005-11-23 Gabriel Dos Reis + + PR c++/21667 + * c-typeck.c (build_array_ref): Avoid code duplicate. Use common + C/C++ diagnostic function warn_array_subscript_with_type_char. + * c-common.h (warn_array_subscript_with_type_char): Declare. + * c-common.c (warn_array_subscript_with_type_char): Define. + +2005-11-23 Gabriel Dos Reis + + PR c/21668 + * c-decl.c (grokdeclarator): Don't warn for 'extern const' when + compiling at the intersection of C and C++. + +2005-11-23 Mark Mitchell + + * doc/invoke.texi: For man pages, include gcc-vers.texi. + List @file in the option summary. Include the libiberty + documentation for @file. + * gcc.c (main): Call expandargv. + * Makefile.in (gcc-vers.texi): Define srcdir. + +2005-11-23 Diego Novillo + + * passes.c (init_optimization_passes): Document + sequencing of passes. + +2005-11-23 Kazu Hirata + + * config/m68k/predicates.md (pcrel_address, extend_operator, + post_inc_operand, pre_dec_operand): Remove redundant + conditionals. + (const_uint32_operand, const_sint32_operand): Use gcc_assert + instead of abort. + (valid_dbcc_comparison_p): Rewrite in the lisp style. + +2005-11-23 Ben Elliston + + * dwarf2.h (enum dwarf_type): Add DW_ATE_decimal_float. + +2005-11-22 J"orn Rennecke + + Preparatory work for PR target/21623: + * alpha.c (secondary_reload_class): Rename to: + (alpha_secondary_reload_class). + * alpha.h, alpha-protos.h: Likewise. + * mn10300.c (secondary_reload_class): Rename to: + (mn10300_secondary_reload_class). + * mn10300.h, mn10300-protos.h: Likewise. + * pa.c (secondary_reload_class): Rename to: + (pa_secondary_reload_class). + * pa.h, pa-protos.h: Likewise. + * rs6000.c (secondary_reload_class): Rename to: + rs6000_secondary_reload_class. + * rs6000.h, rs6000-protos.h: Likewise. + +2005-11-22 Eric Botcazou + + PR middle-end/22561 + * tree-ssa-structalias.c (get_constraint_for): Handle ARRAY_RANGE_REF. + +2005-11-22 Ian Lance Taylor + + * optabs.c (expand_unop): Call SCALAR_FLOAT_MODE_P on a mode, not + a mode_class. + (prepare_cmp_insn): Likewise. + +2005-11-22 Kazu Hirata + + PR target/23435 + * m68k.md (zero_extendsidi2): Force operands[1] to a register + if both operands[0] and operands[1] are memory. + +2005-11-22 Andrew Pinski + + PR middle-end/23606 + * fold-const.c (fold_unary) : For + COMPARISON_CLASS_P and an integral types create create a new + expression with the new type and fold that. + +2005-11-22 Andrew Pinski + + PR target/24988 + * config/rs6000/darwin.h (TARGET_OS_CPP_BUILTINS): Remove call + to SUBTARGET_OS_CPP_BUILTINS. + +2005-11-22 Richard Earnshaw + + * arm.c (emit_set_insn): New function. + (arm_split_constant): Call it. + (arm_gen_compare_reg, arm_reload_in_hi, arm_reload_out_hi): Likewise. + (arm_legitimize_address): Likewise. Use plus_constant. + (arm_expand_prologue): Likewise. Use VOIDmode in SET. + (thumb_expand_prologue): Likewise. + (arm_gen_load_multiple): Use VOIDmode in SET. + (arm_gen_store_multiple): Likewise. + (vfp_emit_fstmx): Likewise. Use plus_constant. + (emit_multi_reg_push): Likewise. + (emit_sfm): Use plus_constant. + +2005-11-23 Alan Modra + + PR target/24954 + * config/rs6000/predicates.md (easy_vector_constant_add_self): Fix + typo last change. + +2005-11-22 Alan Modra + + PR middle-end/24950 + * expmed.c (store_bit_field): Don't attempt to insv a field + larger than the reg. + +2005-11-22 Alan Modra + + PR target/24954 + * config/rs6000/predicated.md (easy_vector_constant_add_self): Use + explicit sign extension, not a (char) cast. + +2005-11-22 Ben Elliston + + * optabs.c: Use SCALAR_FLOAT_MODE_P instead of explicitly testing + GET_MODE_CLASS (x) == MODE_FLOAT. + * config/i386/i386.c: Likewise. + * config/rs6000/xcoff.h: Likewise. + * config/rs6000/linux64.h: Likewise. + * config/rs6000/rs6000.c: Likewise. + * config/rs6000/rs6000.h: Likewise. + * config/rs6000/predicates.md: Likewise. + * config/rs6000/sysv4.h: Likewise. + +2005-11-21 Kaveh R. Ghazi + + * c-cppbuiltin.c (c_cpp_builtins): Define __pic__ and __PIC__ when + flag_pic is set. + + * config/alpha/freebsd.h, config/alpha/linux.h, + config/arm/linux-elf.h, config/bfin/bfin.h, + config/cris/linux.h, config/darwin.h, config/freebsd-spec.h, + config/i386/beos-elf.h, config/i386/gnu.h, + config/i386/linux.h, config/i386/linux64.h, config/i386/nto.h, + config/i386/sco5.h, config/m32r/m32r.h, config/m68k/linux.h, + config/m68k/m68k.h, config/mips/linux.h, config/pa/pa-linux.h, + config/rs6000/linux64.h, config/rs6000/sysv4.h, + config/rs6000/vxworks.h, config/s390/linux.h, config/s390/tpf.h, + config/sh/linux.h, config/sh/sh.h, config/sol2.h, + config/sparc/linux.h, config/sparc/linux64.h, + config/xtensa/xtensa.h: Don't define __pic__ or __PIC__. + + * doc/invoke.texi: Document that the macros __pic__ and __PIC__ + are both defined when either flag -fpic or -fPIC are used. + +2005-11-22 Joseph S. Myers + + * config/fp-bit.c (clzusi): New function. + (si_to_float, usi_to_float): Use it to compute proper shift. + (usi_to_float): Preserve guard bits when shifting right. + * libgcc-std.ver (GCC_4.2.0): New version. + * libgcc2.c (__floatundixf, __floatunditf, __floatundidf, + __floatundisf): New functions. + * libgcc2.h (__floatundixf, __floatunditf, __floatundidf, + __floatundisf): Declare. + * mklibgcc.in (lib2funcs): Add _floatundidf, _floatundisf, + _floatundixf, and _floatunditf. + * optabs.c (expand_float): If target does not define a pattern for + signed or unsigned conversion, use an unsigned libcall instead of + a signed one. + (init_optabs): Initialize ufloat_optab. + +2005-11-22 Joseph S. Myers + + * config/rs6000/rs6000.opt (mmulhw): New option. + * doc/invoke.texi (-mmulhw): Document. + * config/rs6000/rs6000.c (rs6000_override_options): Enable -mmulhw + for 405 and 440. + * config/rs6000/rs6000.md: Add half-word multiply and + multiply-accumulate instructions for 405 and 440. + +2005-11-21 Joel Sherrill + + * config/arm/rtems-elf.h: Added definition of LINK_GCC_C_SEQUENCE_SPEC + which matches behavior of gcc 4.0 and older for RTEMS targets. The + default now includes a linker group which makes the RTEMS one nest. + +2005-11-22 Ben Elliston + + * cse.c (fold_rtx): Typo fix. + (find_comparison_args): Pass the mode of arg1, not arg1 itself. + +2005-11-21 Richard Henderson + + * c-common.c, config/darwin-c.c, c-decl.c, c-tree.h, c-objc-common.h, + langhooks-def.h, langhooks.h: Revert 2005-11-18 lookup_name patch. + + * c-tree.h (lookup_name): Move declaration ... + * c-common.h (lookup_name): ... here. + * config/darwin-c.c: Include c-common.h. + * config/t-darwin: Update dependencies. + +2005-11-22 Ben Elliston + + * optabs.c (expand_abs_nojump): Use SCALAR_FLOAT_MODE_P instead of + explicitly testing GET_MODE_CLASS (x) == MODE_FLOAT. + * genopinit.c (gen_insn): Likewise. + * reload.c (find_equiv_reg): Likewise. + * loop.c (load_mems): Likewise. + * rtlanal.c (may_trap_p_1, canonicalize_condition): Likewise. + * cse.c (find_comparison_args, fold_rtx): Likewise. + * dwarf2out.c (add_const_value_attribute): Likewise. + * expr.c (convert_move): Likewise. + * recog.c (general_operand, register_operand): Likewise. + * reg-stack.c (replace_reg): Likewise. + * tree-vect-generic.c (type_for_widest_vector_mode): Likewise. + * c-common.c (handle_vector_size_attribute): Likewise. + * simplify-rtx.c (simplify_const_unary_operation): Likewise. + (simplify_binary_operation_1): Likewise. + (simplify_const_binary_operation): Likewise. + (simplify_relational_operation): Likewise. + (simplify_const_relational_operation): Likewise. + (simplify_immed_subreg): Likewise. + * emit-rtl.c (gen_lowpart_common): Likewise. + * expmed.c (expand_mult): Likewise. + * stor-layout.c (layout_type): Likewise. + +2005-11-21 Paolo Bonzini + + PR target/24951 + * config/rs6000/rs6000.c (output_vec_const_move): Load cst and + cst2 only for SPE vectors. + +2005-11-21 David Edelsohn + + PR target/24953 + * config/rs6000/predicates.md (vrsave_operation): Check + UNSPEC_VOLATILE value. + +2005-11-21 Jan Hubicka + + PR tree-optimization/24653 + * tree-ssa-ccp.c (ccp_fold): Strip down useless conversions. + +2005-11-21 Uros Bizjak + + * config/i386/predicates.md (ax_reg_operand): New predicate. + (memory_displacement_only_operand): New predicate. + * config/i386/i386.md ("modrm" attribute): Return 0 if one + operand is AX register and the other operand is memory operand + with displacement only. + +2005-11-21 Uros Bizjak + + * fold-const.c (fold_binary) : Optimize A / A to 1.0 + if we don't care about NaNs or Infinities. + +2005-11-20 Ian Lance Taylor + + PR rtl-optimization/24883 + * combine.c (combinable_i3pat): When checking whether the + destination of i3 is used in i3, consider paradoxical subregs. + +2005-11-21 Kazu Hirata + + PR middle-end/20583 + * cse.c (cse_insn): Reject invalid forms of CONST earlier. + +2005-11-20 Joseph S. Myers + + * combine.c (try_combine): Do not run subst on i1src and i2src in + the case of generating a PARALLEL for a comparison. + +2005-11-20 Richard Henderson + + PR 24931 + * tree-sra.c (struct sra_elt): Add all_no_warning. + (struct sra_walk_fns) : Add use_all argument. + (sra_walk_expr): Pass it. + (sra_walk_modify_expr): Likewise. + (scalarize_ldst): Likewise. + (scan_use): Update for new argument. + (mark_no_warning): New. + (scalarize_use): Use it. + +2005-11-20 Bernd Schmidt + + * expr.c (expand_expr_real): Use usmul_optab for widening + signed * unsigned multiplies. + * genopinit.c (optabs): Add usmul_widen_optab. + * optabs.c (init_optabs): Likewise. + * optabs.h (enum optab_index): Add OTI_usmul_widen. + (usmul_widen_optab): Define. + * config/bfin/bfin.md (usmulhisi3): New pattern. + + * doc/md.texi (usmulqihi3, usmulhisi3, usmulsidi3): Document. + +2005-11-20 Graham Stott + + * gensupport.c (std_preds): Fixed extraneous `false` in last change. + +2005-11-20 Andreas Schwab + + PR target/24757 + * config/ia64/ia64.c (ia64_expand_atomic_op): Fix condition of cmp + insn. + +2005-11-19 Richard Henderson + + PR tree-opt/24665 + * tree-gimple.c (is_gimple_id): Export. + * tree-gimple.h (is_gimple_id): Declare. + * tree-ssa-ccp.c (ccp_decl_initial_min_invariant): New. + (get_default_value): Use it. + (maybe_fold_stmt_indirect): Likewise. + +2005-11-19 James A. Morrison + + * tree-vrp.c (compare_ranges): Return false for EQ_EXPR if VR0 is less + than VR1 or vice-versa. + +2005-11-19 Hans-Peter Nilsson + + PR middle-end/24912 + PR middle-end/24750 + * reload.c (find_reloads_address_1): Mention dependency on + gen_reload. + * reload1.c (gen_reload): For IN with an unary operation, try + moving inner expression to OUT if trivial SET is not valid. + Confirm that the result is valid. Move common code block into... + (emit_insn_if_valid_for_reload): New function. + +2005-11-19 Richard Guenther + + * fold-const.c (fold_indirect_ref_1): Make sure we fold + ARRAY_REFs of constant strings. + +2005-11-19 Jakub Jelinek + + * gcc.c (version_compare_spec_function): Use '%s' rather than %qs in + fatal format string. + +2005-11-19 Joseph S. Myers + + * combine.c (make_compound_operation): Swap operands of + commutative operation if necessary before returning. + +2005-11-19 Richard Guenther + + PR middle-end/23294 + * fold-const.c (fold_plusminus_mult_expr): New function. + (fold_binary): Use to canonicalize PLUS_EXPR and MINUS_EXPR + cases, remove now unnecessary code. + +2005-11-19 Paolo Bonzini + + * gensupport.c (old_preds): Rename to std_preds, add special field. + (struct old_pred_table): Rename to struct std_pred_table, add special + field. + (NUM_KNOWN_OLD_PREDS): Rename to NUM_KNOWN_STD_PREDS. + (NUM_OLD_SPECIAL_MODE_PREDS): Remove. + (init_predicate_table): Adjust, and set along the way whether a + predicate is special. + +2005-11-18 Mark Mitchell + + * BASE-VER: Change to 4.2.0. + +2005-11-18 James E Wilson + + * builtins.c (fold_builtin_strstr): Pass s1 through fold_convert before + returning it. + +2005-11-18 Mike Stump + + * c-common.c (handle_cleanup_attribute): Use a lang hook for lookup_name. + * config/darwin-c.c (darwin_pragma_unused): Likewise. + * c-decl.c (lookup_name_two) Remove. + * c-tree.h (lookup_name_two): Remove. + * c-objc-common.h (LANG_HOOKS_LOOKUP_NAME): Add. + * langhooks-def.h (LANG_HOOKS_LOOKUP_NAME): Add. + (LANG_HOOKS_DECLS): Add initializer for LANG_HOOKS_LOOKUP_NAME. + * langhooks.h (lang_hooks_for_decls): Add lookup_name. + +2005-11-18 Richard Earnshaw + + PR target/24914 + * arm.c (arm_hard_regno_mode_ok): Co-processor registers aren't ok + when not generating code to use that co-processor. + +2005-11-18 James A. Morrison + + * tree-flow.h (reserve_phi_args_for_new_edge, create_phi_node, + add_phi_arg, remove_phi_args, remove_phi_node phi_reverse): Mention that + these functions are now in tree-phinodes.c. + +2005-11-18 Jie Zhang + + * config/bfin/bfin.md (trap): New pattern. + +2005-11-18 Richard Kenner + + * tree-ssa-dom.c (extract_range_from_cond): Deal with variable bounds + on types. + + * expr.c (expand_expr_real): Don't call record_block_change unless + ib_boundaries_block is non-null + + * postreload.c (reload_cse_move2add): Don't try to work with BImode. + + * fold-const.c (build_range_check): Use proper type for subtraction + when merging lower bound. + +2005-11-18 Zdenek Dvorak + + PR rtl-optimization/24497 + * loop-unroll.c (apply_opt_in_copies): Do not verify equality of + the copied insn. + +2005-11-18 Zdenek Dvorak + + * tree-scalar-evolution.c (expression_expensive_p): New function. + (scev_const_prop): Use compute_overall_effect_of_inner_loop. + +2005-11-18 Bernd Schmidt + + * config/bfin/crtlibid.s: New file. + +2005-11-17 John David Anglin + + PR target/24348 + * config.gcc (hppa*-*-hpux*): Add pa/t-slibgcc-elf-ver to tmake config + when not using sjlj exceptions. + * config/pa/pa64-hpux.h (LIB_SPEC): Add -lpthread in static links. + * config/pa/pa-hpux11.h (LIB_SPEC): Likewise. + * config/pa/som.h (ASM_PREFERRED_EH_DATA_FORMAT): Delete define. + * config/pa/linux-unwind.h (pa32_fallback_frame_state): Use + DWARF_ALT_FRAME_RETURN_COLUMN instead of column 0 as return column. + * config/pa/pa-hpux.h (MD_UNWIND_SUPPORT): New define. + * config/pa/pa-linux.h (INCOMING_RETURN_ADDR_RTX, + DWARF_FRAME_RETURN_COLUMN, ASM_PREFERRED_EH_DATA_FORMAT, + ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX): Delete defines. + * config/pa/pa.h (ARG_POINTER_CFA_OFFSET): Delete. + (FRAME_POINTER_CFA_OFFSET, INCOMING_RETURN_ADDR_RTX, + DWARF_FRAME_RETURN_COLUMN, DWARF_ALT_FRAME_RETURN_COLUMN, + ASM_PREFERRED_EH_DATA_FORMAT, ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX): New + defines. + * config/pa/hpux-unwind.h: New file. + +2005-11-17 Alexandre Oliva + + * config/rs6000/rs6000.h (ASM_OUTPUT_WEAKREF): Define. + * defaults.h (ASM_OUTPUT_WEAKREF): Add decl argument. + * varasm.c (do_assemble_alias): Adjust call. + (weak_finish): Don't use ASM_WEAKEN_LABEL if ASM_WEAKEN_DECL + is defined. + * doc/tm.texi (ASM_OUTPUT_WEAKREF): Document it. + +2005-11-17 James E Wilson + + * tree.def (FUNCTION_DECL): Correct typo in comment. + +2005-11-17 Richard Henderson + + * dwarf2out.c (dw_cfi_oprnd_struct): Reduce dw_cfi_reg_num to int. + (lookup_cfa_1): Apply data alignment to DW_CFA_def_cfa_offset_sf + and DW_CFA_def_cfa_sf. + (def_cfa_1): Use DW_CFA_def_cfa_offset_sf with negative values. + (dbx_reg_number): Don't assert particular registers here. + (based_loc_descr): ... do it here instead. Fold in ... + (eliminate_reg_to_offset): ... this function. + (compute_frame_pointer_to_cfa_displacement): Fold in the effects + of eliminate_reg_to_offset; use FRAME_POINTER_CFA_OFFSET. + * unwind-dw2.c (execute_cfa_program): Apply data align factor + to DW_CFA_def_cfa_offset_sf and DW_CFA_def_cfa_sf. + * function.c (instantiate_new_reg): Use FRAME_POINTER_CFA_OFFSET. + (instantiate_virtual_regs): Likewise. + * var-tracking.c (adjust_stack_reference): Likewise. + * doc/tm.texi (FRAME_POINTER_CFA_OFFSET): New. + +2005-11-17 Bernd Schmidt + + * config/bfin/elf.h (STARTFILE_SPEC): Add "crtlibid%O%s" + * config/bfin/uclinux.h (STARFILE_SPEC): Likewise. + * config/bfin/t-bfin-elf (EXTRA_PARTS, EXTRA_MULTILIB_PARTS): Add + crtlibid.o. + ($(T)crtlibid.o): New rule. + +2005-11-16 Richard Guenther + + PR middle-end/24851 + * fold-const.c (extract_array_ref): Return byte offset + in all cases. + (fold_binary): Fold &x[a] CMP &x[b] to + a*sizeof(*x) CMP b*sizeof(*x) to get correct overflow + behavior. + +2005-11-16 Richard Henderson + + PR middle-end/23497 + * tree-ssa.c (warn_uninitialized_var): Skip real and imaginary + parts of an SSA_NAME. + +2005-11-16 Richard Earnshaw + + PR target/24861 + * arm.md (split for movsf with immediate): Restrict split to insns + that set a general register. + +2005-11-16 Daniel Jacobowitz + + * config/ia64/unwind-ia64.c (uw_advance_context): New. Call + uw_update_context. + * unwind-dw2.c (uw_advance_context): Likewise. + * unwind-sjlj.c (uw_advance_context): Likewise. Also call + _Unwind_SjLj_Unregister. + * unwind.inc (_Unwind_ForcedUnwind_Phase2): Call uw_advance_context. + +2005-11-16 Daniel Jacobowitz + + * unwind-sjlj.c (_Unwind_GetCFA): Handle the builtin_setjmp case. + +2005-11-16 Eric Botcazou + + * config/alpha/alpha.c (alpha_init_builtins): Use type_for_mode + langhook to get a DImode integer type. + +2005-11-16 Richard Henderson + J"orn Rennecke + Ulrich Weigand + + PR rtl-opt/24160 + PR target/24621 + * reload1.c (reg_equiv_invariant): New. + (reload): Allocate, initialize, and free it. + (calculate_needs_all_insns): Check it when skipping equivalence + setting insns. + (alter_reg): Likewise. + (eliminate_regs_1): Rename from eliminate_regs. Add new + may_use_invariant argument; only use reg_equiv_invariant when true. + (eliminate_regs): New. + (eliminate_regs_in_insn): Use eliminate_regs_1; track when we're in + a context for which may_use_invariant may be true. + +2005-11-16 Eric Botcazou + + * fold-const.c (const_binop): Don't constant fold the operation + if the result has overflowed and flag_trapping_math. + * simplify-rtx.c (simplify_const_binary_operation): Likewise. + +2005-11-16 Daniel Jacobowitz + + * config/arm/unwind-arm.c (abort): Add prototype here. + (UCB_FORCED_STOP_ARG): Correct typo in macro argument. + (struct phase1_vrs): Add prev_sp. + (unwind_phase2_forced): Save the original core registers instead of + modifying entry_vrs. Take a new flag argument for resuming unwinding + and set action flags accordingly. Always set _US_END_OF_STACK when + get_eit_entry fails. Unwind before calling the stop function. + (_Unwind_GetCFA): New function. + (__gnu_Unwind_ForcedUnwind): Update call to unwind_phase2_forced. + (__gnu_Unwind_Resume_or_Rethrow): Likewise. + (__gnu_Unwind_Resume): Do not unwind here for forced unwinding; + just call unwind_phase2_forced. + (_Unwind_GetDataRelBase, _Unwind_GetTextRelBase): Move to here. + * config/arm/unwind-arm.h (abort): Remove prototype. + (_Unwind_GetDataRelBase, _Unwind_GetTextRelBase): Change to + prototypes. + (_Unwind_GetCFA): New prototype. + * config/arm/pr-support.c (abort): Add prototype here. + * unwind-c.c (PERSONALITY_FUNCTION) [__ARM_EABI_UNWINDER__]: Handle + forced unwinding. + * config/arm/arm.c (arm_expand_prologue, thumb_expand_prologue): Do + not schedule the prologue with non-call exceptions and EABI. + +2005-11-16 Nathan Sidwell + + * config/arm/unwind-arm.h: Reorder interface function declarations. + (_URC_END_OF_STACK): New enumeration value. + (_US_UNWIND_ACTION_MASK, _US_FORCE_UNWIND, _US_END_OF_STACK): Likewise. + (struct _Unwind_Control_Block): Document reserved field use. + (_Unwind_Stop_Fn): New typedef. + (_Unwind_ForcedUnwind): Declare. + (_Unwind_Resume_or_Rethrow): Declare. + * gcc/config/arm/libunwind.S (UNWIND_WRAPER): Add nargs + argument. Adjust. + (_Unwind_Resume_or_Rethrow, _Unwind_ForcedUnwind): New. + * config/arm/unwind-arm.c (UCB_FORCED_STOP_FN) + (UCB_FORCED_STOP_ARG): New. + (search_EIT_table): Update boundary condition checks. + (get_eit_entry): Return _URC_END_OF_STACK when cannot unwind. + (unwind_phase2): Replace for with do..while. + (unwind_phase2_forced): New. + (__gnu_Unwind_RaiseException): Replace for with do..while. + (__gnu_Unwind_ForcedUnwind): New. + (__gnu_Unwind_Resume): Set FORCE_UNWIND flag, if forced unwinding. + Use appropriate phase2 unwinder. + (__gnu_Unwind_Resume_or_Rethrow): New. + (__gnu_unwind_pr_common): Cope with forced unwinding. + +2005-11-16 David Edelsohn + + PR target/24772 + * config/rs6000/predicates.md (vrsave_operation): SET_SRC is a VEC. + + * config/rs6000/rs6000.md (btruncsf2, ceilsf2, floorsf2, + roundsf2): Remove "s" from mnemonic. + +2005-11-16 Bernd Schmidt + + * config/bfin/crti.s (__init, __fini): Use appropriate prologue if + __PIC__ is defined. + * config/bfin/crtn.s: Change epilogues to match. + * config/bfin/t-bfin-elf (EXTRA_MULTILIB_PARTS): Define. + * config/bfin/bfin.h (TARGET_CPU_CPP_BUILTINS): If flag_pic, define + __PIC__ and __pic__. + +2005-11-16 Tobias Schl"uter + + PR 24357 + * doc/invoke.texi: Distinguish between free and fixed form instead of + Fortran and Fortran 90/95. Remove ratfor from the list of supported + languages. + * gcc.c (default_compilers): Remove double entries, add entries for + suffixes '.F90' and '.F95'. + +2005-11-16 Eric Botcazou + + * config/alpha/alpha.c (alpha_expand_prologue): Fix off-by-one bug + in the stack probing loop. + +2005-11-15 David Edelsohn + + * configure.ac: Use .machine power5 not power5x. + * configure: Regenerate. + +2005-11-15 Mike Stump + + * c-decl.c (lookup_name_two): Add. + * c-tree.h (lookup_name_two): Likewise. + * c-common.c (handle_cleanup_attribute): Use lookup_name_two instead. + * config/darwin-c.c (darwin_pragma_unused): Likewise. + +2005-11-16 Alan Modra + + PR rtl-optimization/23392 + * regrename.c (enum scan_actions) Add mark_access. + (scan_actions_name): Ditto. + (scan_rtx_reg): Handle mark_access. + (scan_rtx_address): Do nothing for mark_access. + (build_def_use): Mark source registers in REG_FRAME_RELATED_EXPR + and regs in REG_INC notes before closing chains for dead regs. + Mark destination regs in REG_FRAME_RELATED_EXPR notes after + opening chains for new writes. + +2005-11-15 David Edelsohn + + * c.opt (ffixed-line-length-none): New. + +2005-11-15 Steve Ellcey + + * mklibgcc.in: Change contents of eh_dummy.c. + +2005-11-15 Daniel Jacobowitz + + * loop.c (scan_loop): Do not insert temporaries for hard registers. + +2005-11-15 Daniel Jacobowitz + + * config/arm/lib1funcs.asm (div0) [L_dvmd_lnx]: Call raise instead + of making syscalls. + * config/arm/linux-eabi.h (CLEAR_INSN_CACHE): Define. Set r7 also. + +2005-11-15 Jan Hubicka + + * invoke.texi (large-unit-insns): Document. + * ipa-inline.c (cgraph_decide_inlining): Use large-unit-insns param. + * params.def (large-unit-insns): New param. + +2005-11-15 Hans-Peter Nilsson + + PR target/24869 + * config/cris/cris.md ("*mov_sidesisf_mem"): Do not match + special register for operand 3. Reindent constraints to align + them vertically. + +2005-11-14 David Edelsohn + + * doc/invoke.texi (RS/6000 and PowerPC Options): Add -mmfcrf, + -mpopcntb, -mfprnd. Add -mcpu=power5+. + * configure.ac: Add test for FP rounding instructions. + * configure: Regenerate. + * config.in: Regenerate. + * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Define + _ARCH_PPCSQ, _ARCH_PPCGR, _ARCH_PWR4, _ARCH_PWR5, _ARCH_PWR5X if + features enabled. + * config/rs6000/rs6000.opt (mfprnd): New. + * config/rs6000/rs6000.c (processor_target_table): Add power5+. + (POWERPC_MASKS): Add MASK_POPCNTB and MASK_FPRND. + * config/rs6000/aix52.h (ASM_CPU_SPEC): Add -mpower5+. + * config/rs6000/rs6000.h (ASM_CPU_SPEC): Add -mpower5+. + (TARGET_FPRND): New. + * config/rs6000/rs6000.md (UNSPEC_FRIM, UNSPEC_FRIN, UNSPEC_FRIP, + UNSPEC_FRIZ): New. + (btrunc2): New. + (ceil2): New. + (floor2): New. + (round2): New. + +2005-11-14 Geoffrey Keating + + * gcc.c (version_compare_spec_function): Use fatal() rather than + abort(). + + * config/rs6000/darwin.h (DARWIN_CRT2_SPEC): New. + (SUBTARGET_EXTRA_SPECS): Define %(darwin_crt2). + * config/i386/darwin.h (SUBTARGET_EXTRA_SPECS): Define %(darwin_crt2) + as empty. + * config/darwin.h (STARTFILE_SPEC): Use %(darwin_crt2) to possibly + link in crt2.o. + + * config/darwin.h (REAL_LIBGCC_SPEC): Link in shared libgcc depending + on -mmacosx-version-min setting. + +2005-11-14 Diego Novillo + + PR 24840 + * tree-vrp.c (infer_value_range): Return false if STMT is a + block terminator and its basic block has no successors. + +2005-11-14 Mike Stump + + * config/i386/i386.c (override_options): -masm=intel isn't + supported on darwin. + * doc/invoke.texi (i386 and x86-64 Options): Likewise. + +2005-11-15 Joseph S. Myers + + * crtstuff.c: Undefine gid_t, pid_t, rlim_t, ssize_t, uid_t and + vfork after including auto-host.h. + +2005-11-15 Alan Modra + + PR rtl-optimization/22002 + * combine.c (distribute_notes): Detect cases where a reg dies + two or more times in a bb, including on the insn we are combining, + and place the death note on the correct range. + +2005-11-14 Dale Johannesen + + * expmed.c (store_bit_field): Add offset unconditionally for + memory targets. + (extract_bit_field): Don't force extzv or extv operand into + a register if field is too big. + +2005-11-14 Daniel Jacobowitz + + * config/arm/arm.c (pic_labelno): New. + (arm_load_pic_register): Use an UNSPEC_PIC_LABEL instead of a + LABEL_REF. Pass only the labelno to PIC insns. + (arm_call_tls_get_addr, legitimize_tls_address): Likewise. + (arm_output_addr_const_extra): Handle UNSPEC_PIC_LABEL. + * arm.md (UNSPEC_PIC_LABEL): New constant. + (pic_add_dot_plus_four, pic_add_dot_plus_eight) + (tls_load_dot_plus_eight): Expect a labelno instead of a LABEL_REF. + Use the correct label prefix. + +2005-11-14 Daniel Jacobowitz + + * config/arm/arm.c (legitimize_tls_address): Use correct rtx for + REQ_EQUIV note. + +2005-11-14 Richard Earnshaw + + * loop-invariant.c: Include tm_p.h. + * Makefile.in: Updated. + +2005-11-13 John David Anglin + + * pa.c (store_reg): Revise generation of frame notes in large frames. + (set_reg_plus_d): Likewise. + +2005-11-13 Andrew MacLeod + + PR tree-optimization/24709 + * tree-ssa-operands.c (verify_imm_links): Increase limit for infinite + loop check. + +2005-11-13 Eric Botcazou + + * gthr-posix95.h: Remove declaration of pthread_mutexattr_settype + and duplicate declaration of pthread_self. + +2005-11-13 Eric Botcazou + Ian Lance Taylor + + PR middle-end/24003 + * calls.c (expand_call): If TARGET is a MEM and some part of the + argument area has been saved, force TARGET to a register. + +2005-11-13 Razya Ladelsky + + * ipa-prop.c (ipa_callsite_compute_param ): Removed obsolete type + checking. + +2005-11-13 Jason Merrill + + PR c++/22489 + * dwarf2out.c (gen_subprogram_die): Force a declaration die for + lazily declared methods. + (force_decl_die): Stop if forcing out the context already make a + DIE for the decl. + (force_type_die): Likewise. + +2005-11-13 Andrew Pinski + + PR middle-end/24820 + * builtins.c (integer_valued_real_p): Add break in + REAL_CST having TREE_OVERFLOW set. + +2005-11-13 Zdenek Dvorak + + * tree-ssa-loop-ivopts.c (get_address_cost): Prevent splitting + addressing modes during calculation of costs. + +2005-11-12 Eric Botcazou + + * function.c (assign_stack_local_1): Restrict sanity check + on frame size overflow to 32-bit and above platforms. + +2005-11-12 Hans-Peter Nilsson + + * config/cris/cris.h (LEGITIMIZE_RELOAD_ADDRESS): Define. + * config/cris/cris.c: Include reload.h. + (cris_initial_elimination_offset): New function. + * config/cris/cris-protos.h: (cris_initial_elimination_offset): + Prototype. + +2005-11-12 Richard Guenther + + * gcse.c (find_rtx_in_ldst): Handle NULL pre_ldst_table. + +2005-11-12 Jan Hubicka + + * expr.c (expand_expr_real_1): : Canonicalize + to compare against 0 when possible. + +2005-11-12 Jie Zhang + + * config/bfin/bfin.h (REGISTER_NAMES, SHORT_REGISTER_NAMES, + HIGH_REGISTER_NAMES, FIXED_REGISTERS, CALL_USED_REGISTERS, + REG_ALLOC_ORDER, enum reg_class): Rearrange I/B/L registers. + * config/bfin/bfin.md: Redefine REG_ constants for I/B/L registers + in the new order. + +2005-11-12 Hans-Peter Nilsson + + * recog.c (constrain_operands) : For a match, require + that a non-register matches general_operand when strict >= 0. + +2005-11-11 Steven Bosscher + + * loop-invariant.c (move_loop_invariants): Fix a thinko in the + previous checkin. + +2005-11-11 Daniel Jacobowitz + + * tree-ssa-dse.c (struct address_walk_data, memory_ssa_name_same) + (memory_address_same): New. + (dse_optimize_stmt): Call memory_address_same. + +2005-11-12 Hans-Peter Nilsson + + PR middle-end/24750 + * reload.c (find_reloads_address_1) : New cases. + +2005-11-11 Daniel Jacobowitz + + * longlong.h (__clz_tab): Always provide. + +2005-11-11 Steven Bosscher + + PR 24265 + * loop-invariant.c (may_assign_reg_p): Make sure a hard register + can be assigned to. + (find_invariant_insn): Do the cheapest check, may_assign_reg_p, + before check_maybe_invariant. + (move_invariant_reg): Use gen_move_insn instead of replacing + SET_DEST with the temporary for the invariant. + (move_loop_invariants): If checking is enabled, do internal + consistency checks after completing the pass. + +2005-11-11 David Edelsohn + + PR 24644 + * common.opt (Wvolatile-register-var): New. + * varasm.c (make_decl_rtl): Only emit warning when option + specified. Clarify warning message. + * doc/invoke.texi (Wvolatile-register-var): Document new option. + + * doc/md.texi (copysign): Document standard named pattern. + +2005-11-11 Jie Zhang + + * config/bfin/bfin.c (bfin_expand_strmov): Correctly move the trailing + bytes when align is 2. + * config/bfin/bfin.md (rep_movsi, rep_movhi): Make LSETUP be followed + by the first instruction of the loop. + +2005-11-11 Jason Merrill + + PR c++/24686 + * gimplify.c (gimplify_cleanup_point_expr): Also save and restore + the cleanup list. + +2005-11-11 Zdenek Dvorak + + PR rtl-optimization/22509 + * local-alloc.c (memref_used_between_p): Check whether a function call + could not reference the memref. + +2005-11-11 Ulrich Weigand + + * postreload.c (reload_cse_simplify_operands): Fix bug in sorting + algorithm so as to choose the best, not the worst, alternative. + Reset accumulated register class before processing next alternative. + +2005-11-11 Kaz Kojima + + PR target/24445 + * calls.c (expand_call): Copy a return value to a plain register + if needed. + +2005-11-10 Alexandre Oliva + + PR target/24778 + * varasm.c (assemble_name): Recompute name only for transparent + aliases. + +2005-11-10 Hans-Peter Nilsson + + * tree-ssa-structalias.c (heapvar_lookup): Fix typo: stmt to from. + +2005-11-04 Jeff Law + + PR middle-end/23181 + * tree-ssa-dom.c (simplify_rhs_and_lookup_avail_expr): Do not + perform reassociation if the parent statement will not die as + a result of the optimization. + +2005-11-10 Daniel Berlin + + * tree-ssa-alias.c (compute_may_aliases): Remove call to + delete_old_heap_vars. + * tree-dfa.c (referenced_var_remove): Remove function. + * tree-ssa.c (init_tree_ssa): Call init_alias_heapvars. + (delete_tree_ssa): Remove call to delete_old_heapvars. + Add call to delete_alias_heapvars. + * tree-flow.h (referenced_var_remove): Remove prototype + (init_alias_heapvars): New prototype. + (delete_alias_heapvars): Ditto. + * Makefile.in (tree-ssa-structalias.o): Add + gt-tree-ssa-structalias.o + (GTFILES): Add tree-ssa-structalias.h and + tree-ssa-structalias.c. + (s-gtype): Add gt-tree-ssa-structalias.h. + * tree-ssa-structalias.c (heapvars): Remove. + (oldheapvars): Remove. + (heapvar_for_stmt): New variable. + (heapvar_lookup): New function. + (heapvar_insert): Ditto. + (get_constraint_for): See if we have an old heapvar + to reuse. + (init_alias_heapvars): New function. + (delete_alias_heapvars): Ditto. + Add include of gt-tree-ssa-structalias.h. + +2005-11-10 Eric Botcazou + + PR middle-end/22127 + * calls.c (special_function_p): Set ECF_RETURNS_TWICE for getcontext. + +2005-11-10 Eric Botcazou + + * tree.c (int_fits_type_p): Only look at the base type + if it has the same precision as the original type. + +2005-11-10 Jakub Jelinek + + PR other/4372 + * varasm.c (assemble_alias): Use %q+D in the error + message instead of %J and %qD. + +2005-11-10 Richard Guenther + + * gcse.c (free_ldst_entry): Only free hashtable if + it exists. + +2005-11-09 Eric Botcazou + + * function.c (assign_stack_local_1): Issue an error message if + the frame size overflows in the signed target arithmetics. + +2005-11-09 Eric Botcazou + + * tree.c (build_qualified_type): Chain the new type to the original + type's TYPE_NEXT_PTR_TO or TYPE_NEXT_REF_TO linked lists if it is + a POINTER_TYPE or a REFERENCE_TYPE respectively. + (build_pointer_type_for_mode): Only return unqualified types. + (build_reference_type_for_mode): Likewise. + +2005-11-09 Jakub Jelinek + + * Makefile.in (gnucompare): Do comparison of all files using one of + the chosen methods and only afterwards decide if just warning should + be issued or comparison failure raised. + +2005-11-09 Eric Botcazou + + * ifcvt.c (noce_get_alt_condition): Use prev_nonnote_insn. + (noce_try_abs): Negate if the comparison is reversed. + Look only one instruction backwards for a REG_EQUAL note. + +2005-11-09 Alexandre Oliva + + PR other/4372 + * gthr-dce.h, gthr-posix.h, gthr-posix95.h, gthr-solaris.h, + gthr-tpf.h: Define __gthrw. For all identifiers that might + be weak, introduce weakrefs or non-weak aliases with __gthrw, + and prefix all uses with __ghtrw. + +2005-11-09 Alexandre Oliva + + PR other/4372 + * tree.h (IDENTIFIER_TRANSPARENT_ALIAS): New. + (TREE_DEPRECATED): Adjust comment. Check for a DECL. + * c-common.c (handle_weakref_attribute): New. + (c_common_attribute_table): Add weakref. + * configure.ac (HAVE_GAS_WEAKREF): Check for weakref support + in the assembler. + * configure, config.in: Rebuilt. + * defaults.h (ASM_OUTPUT_WEAKREF): Define if HAVE_GAS_WEAKREF. + * doc/extend.texi: Document weakref attribute. + * varasm.c (ultimate_transparent_alias_target): New + (assemble_name): Use it. + (weak_finish_1): Split out of... + (weak_finish): ... and deal with weakrefs in... + (weakref_targets): ... new list. + (globalize_decl): Clean up weakref_targets. + (do_assemble_alias): Handle weakrefs. + (finish_aliases_1): Do not reject weakrefs to external symbols. + (assemble_alias): Handle weakrefs. + +2005-11-09 Richard Guenther + + PR tree-optimization/24716 + * tree-scalar-evolution.c (analyze_evolution_in_loop): Use + t_bool to track results from follow_ssa_edge. + +2005-11-09 Eric Botcazou + + * final.c (force_source_line): New global variable. + (final_scan_insn): Set it to true instead of clearing last_filename. + (notice_source_line): Return true if force_source_line is true, + unless source info is absent. + +2005-11-09 Andrew Pinski + + PR c/24644 + * dwarf2-out.c (add_name_and_src_coords_attributes): Don't add + a linkage name for a variable if it a register variable. + * c-decl.c (grokdeclarator): Global register variables + should be set as PUBLIC. + +2005-11-09 Andreas Krebbel + + PR 24624 + * config/s390/s390.c (struct s390_frame_layout): New fields + first_save_gpr_slot and last_save_gpr_slot. + (cfun_grps_save_area_size, s390_frame_info, s390_emit_prologue, + s390_emit_epilogue, s390_initial_elimination_offset): Replaced + first_save_gpr and last_save_gpr with the _slot variants. + (s390_register_info): Calculate first_save_gpr_slot and + last_save_gpr_slot using regs_ever_live. + +2005-11-09 Andreas Krebbel + + PR 24623 + * config/s390/s390.c (s390_regs_ever_clobbered): Only save live eh regs + for a function containing a landing pad. + +2005-11-09 Andreas Krebbel + + PR 24034 + * flow.c (mark_set_1): Handle CLOBBERs like SETs if the register + is live afterwards. + +2005-11-08 Bernd Schmidt + + * config/bfin/t-bfin-elf (MULTILIB_OPTIONS, MULTILIB_DEFAULTS, + MULTILIB_DIRNAMES, MULTILIB_EXCEPTIONS): New. + +2005-11-09 Nathan Sidwell + + Add ms2 support + * config/ms1/ms1.md (UNSPEC_BLOCKAGE, UNSPEC_EI, UNSPEC_DI): New + constants. + (call,load,store): New insn types. + (mem_access, branch_access): Adjust reservation conditions. + (define_delay): Adjust condition. + (decrement_and_branch_until_zero): Allow for ms2. Set branch + type. + (*decrement_and_rbanch_until_zero_no_clobber): Allow for ms2. + (*movqi_internal,*movsi_internal,*movsf_internal): Use load,store + insn type. + (call_internal, call_value_internal, return_internal, + return_interrupt_internal, eh_return_internal, indirect_jump, + tablejump): Set call insn type. + (blockage, ei, di): Use appropriate unspec const. + * config/ms1/ms1.c (ms1_flag_delayed_branch): New. + (ms1_get_attr_type): Adjust to give load & store types. + (ms1_final_prescan_insn): Adjust for new insn types. Don't look + backwards past a barrier. + (ms1_override_options): Accept ms2 arch. Copy and reset delayed + branch scheduling. + (struct branch_info, struct label_info): New. + (ms1_labels): New. + (ms1_add_branches, ms1_check_delay_slot, ms1_reorg_hazard): New. + (ms1_machine_reorg): New. + (TARGET_MACHINE_DEPENDENT_REORG): Override. + * config/ms1/crtn.asm: Add nop for ms2 JAL hazard. + * config/ms1/ms1.h (processor_type): Add PROCESSOR_MS2. + (ASM_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Add ms2. + (TARGET_MS2): New. + +2005-11-09 Per Bothner + Uros Bizjak + + PR c/24101 + * toplev.c (process_options): Initialize debug_hooks early + in case lang_hooks.post_options ends up calling a debug_hook. + +2005-11-08 Jakub Jelinek + + * dwarf2out.c (multiple_reg_loc_descriptor): Don't assume + DBX_REGISTER_NUMBER being contiguous. + +2005-11-08 James A. Morrison + Diego Novillo + + PR 23046 + * tree-vrp.c (register_edge_assert_for): Do not register + always-false predicates. + +2005-11-08 Devang Patel + + PR tree-optimization/23115 + * tree-if-conv.c (find_phi_replacement_condition): Check domninated_by + relation. + +2005-11-08 Joseph S. Myers + + * config/rs6000/t-fprules (MULTILIB_MATCHES_FLOAT): Include + -mcpu=440. + +2005-11-08 Daniel Berlin + + Fix PR tree-optimization/23382 + + * tree-ssa-alias.c (compute_may_aliases): Call + delete_old_heap_vars. + * tree-dfa.c (referenced_var_remove): New function. + * tree-ssa.c (delete_tree_ssa): Call delete_old_heap_vars. + * tree-flow.h (referenced_var_remove): Add prototype. + (delete_old_heap_vars): Ditto. + * tree-ssa-structalias.c (heapvars): New variable. + (oldheapvars): Ditto. + (get_constraint_for): Put heap vars on heapvars list. + (delete_old_heap_vars): New function. + +2005-11-08 Jason Merrill + + * tree.h (CALL_FROM_THUNK_P): Add CALL_EXPR_CHECK. + +2005-11-08 Uros Bizjak + + PR target/19340 + * reg-stack.c (reg_to_stack): Update register liveness also + for flag_sched2_use_traces. + +2005-11-08 Alan Modra + + PR target/23704 + * config/rs6000/rs6000.c (rs6000_handle_option ): Don't + override prior explicit -mno-powerpc-gfxopt. + +2005-11-07 Eric Botcazou + + * expmed.c (extract_bit_field): Do not use insv/extv/extzv patterns + if the bitsize is zero. + * doc/md.texi (Standard Pattern Names): Document it. + + * config/ia64/ia64.c (ia64_pass_by_reference): Delete. + (TARGET_PASS_BY_REFERENCE): Likewise. + +2005-11-07 Ian Lance Taylor + + PR rtl-optimization/24683 + * config/i386/i386.c (legitimize_pic_address): If constant operand + to PLUS is too large, put it in a register. + +2005-11-07 Jie Zhang + + * configure.ac: Enable checking assembler dwarf2 support for bfin + target. + * configure: Regenerate. + +2005-11-07 Paolo Bonzini + + PR target/24230 + + * config/rs6000/rs6000.c (easy_vector_splat_const, easy_vector_same, + gen_easy_vector_constant_add_self): Delete. + (vspltis_constant, easy_altivec_constant, gen_easy_altivec_constant): + New. + (output_vec_const_move): Use gen_easy_altivec_constant. + (rs6000_expand_vector_init): Do not emit a set of a VEC_DUPLICATE. + * config/rs6000/predicates.md (easy_vector_constant): Reorganize tests. + (easy_vector_constant_add_self): Rewritten. + * config/rs6000/rs6000-protos.h (easy_vector_splat_const, + easy_vector_same, gen_easy_vector_constant_add_self): Remove prototype. + (easy_altivec_constant, gen_easy_altivec_constant): Add prototype. + * config/rs6000/altivec.md (easy_vector_constant_add_self splitters): + Macroize and adjust for the other changes. + +2005-11-07 Paolo Bonzini + + PR c/24599 + + * c-typeck.c (build_c_cast): Try using a shared constant, and see + if TREE_OVERFLOW or TREE_CONSTANT_OVERFLOW really changed. + +2005-11-07 Jakub Jelinek + + PR rtl-optimization/23567 + * ifcvt.c (noce_mem_write_may_trap_or_fault_p): New function. + (noce_process_if_block): Don't do any optimizations except + if (cond) x = x; if !set_b and write into orig_x may trap + or fault. Remove the MEM_READONLY_P check. + +2005-11-06 Diego Novillo + + PR 24670 + * tree-vrp.c (fix_equivalence_set): New. + (extract_range_from_assert): Call it. + +2005-11-05 Ian Lance Taylor + + PR target/22432 + * combine.c (apply_distributive_law): Don't distribute across a + vector mode subreg. + +2005-11-05 Kazu Hirata + + * c-typeck.c, config/i386/netware.h, config/m32c/cond.md, + config/ms1/ms1.h, config/rs6000/predicates.md, + config/s390/s390.c, params.def, postreload-gcse.c, + tree-flow-inline.h, tree-ssa-operands.c, tree-vectorizer.c, + tree-vrp.c, tree.c: Fix comment typos. + * doc/invoke.texi: Fix typos. + +2005-11-05 Sebastian Pop + + * lambda-code.c (lambda_transform_legal_p): Use DDR_NUM_DIST_VECTS + for testing whether the data_dependence_relation contains distance + vectors. Iterate over all distance vectors of the ddr. + * lambda.h: Define a vec of lambda_vector pointers. + * tree-data-ref.c (dump_data_dependence_relation, + dump_data_dependence_direction): Iterate over all distance and + direction vectors of the ddr. + (initialize_data_dependence_relation): Initialize DDR_DIR_VECTS and + DDR_DIST_VECTS. + (build_classic_dist_vector, build_classic_dir_vector): Push a set + of distance/direction vectors instead of a single one. + * tree-data-ref.h (dir_vects, dist_vects): Replace dir/dist + lambda_vectors with a vec of lambda_vectors. + (DDR_DIR_VECT, DDR_DIST_VECT): Redefined as operations on vec. + (DDR_DIR_VECTS, DDR_DIST_VECTS, DDR_NUM_DIR_VECTS, + DDR_NUM_DIST_VECTS): New. + * tree-loop-linear.c (gather_interchange_stats): Test for the + existence of distance vectors only after having checked that there + is a dependence. Iterate over all distance vectors of the ddr. + (linear_transform_loops): Use dump_data_dependence_relation. + * tree-vect-analyze.c (vect_analyze_data_ref_dependence): Test for + distance vectors using DDR_NUM_DIST_VECTS. Iterate over all the + distance vectors of the ddr. + +2005-11-05 Bernd Schmidt + + * config/bfin/bfin.c (n_dregs_to_save, n_pregs_to_save, + expand_prologue_reg_save, expand_epilogue_reg_restore): New argument + IS_INTHANDLER; all callers changed. + (n_regs_saved_by_prologue): Take interrupt handler attributes into + account. + (do_link, do_unlink): New argument ALL; all callers changed. + (expand_interrupt_handler_prologue, expand_interrupt_handler_epilogue): + If function isn't leaf, save and restore all registers. + (bfin_function_ok_for_sibcall): Only true if not an interrupt or + exception handler. + +2005-11-05 Jan Hubicka + + PR rtl-optimization/23490 + * doc/invoke.texi (max-predicted-iterations, max-cse-insns, + max-flow-memory-location): Document. + * flow.c: Include params.h + (MAX_MEM_SET_LIST_LEN): Kill. + (add_to_mem_set_list): Use new param. + * cse.c (cse_basic_block): Replace 1000 by new param. + * params.def (PARAM_MAX_PREDICTED_ITERATIONS, PARAM_MAX_CSE_INSNS, + PARAM_MAX_FLOW_MEMORY_LOCATIONS): New. + * predict.c (predict_loops): Use new param. + * predict.def (MAX_PRED_LOOP_ITERATIONS): Remove. + + * ipa-inline.c (cgraph_decide_inlining_of_small_function, + cgraph_decide_inlining, cgraph_decide_inlining_incrementally): + Do not hold memory returned by cgraph_node_name across other call. + +2005-11-04 Hans-Peter Nilsson + + PR target/23424 + * config/cris/predicates.md ("cris_bdap_sign_extend_operand"): + Disable. + +2005-11-04 Jeff Law + + PR/21883 + * doc/invoke.texi: Document max-jump-thread-duplication-stmts PARAM. + * tree-ssa-dom.c: Include params.h. + (thread_across_edge): If there are too many statements in the + target block, then do not thread through it. + * Makefile.in (tree-ssa-dom.o): Depend on $(PARAMS_H). + * params.def (PARAM_MAX_JUMP_THREAD_DUPLICATION_STMTS): New PARAM. + +2005-11-03 Diego Novillo + + PR 24627 + * tree-ssa-dce.c (pass_dce, pass_dce_loop, pass_cd_dce): Use + TODO_update_ssa instead of TODO_update_ssa_no_phi. + +2005-11-04 Sebastian Pop + + PR/18595 + * tree-scalar-evolution.c (instantiate_parameters_1, + instantiate_parameters, resolve_mixers): Compute the size of an + expression to be instantiated and give up the instantiation if the + size exceeds PARAM_SCEV_MAX_EXPR_SIZE. + +2005-11-04 Richard Guenther + + * tree-flow.h (ref_contains_indirect_ref): Rename to + array_ref_contains_indirect_ref. + * tree-flow-inline.h (ref_contains_indirect_ref): Likewise. + (array_ref_contains_indirect_ref): Make comment match the code + and vice-versa. + (ref_contains_array_ref): Likewise. + * tree-ssa-structalias.c (find_func_aliases): Remove call to + ref_contains_indirect_ref. + * tree-ssa-loop-niter.c (infer_loop_bounds_from_undefined): + Rename calls to ref_contains_indirect_ref. + +2005-11-04 Paul Brook + + * config/arm/arm.c (arm_load_pic_register): Pass extra reg to + gen_pic_add_dot_plus_four and gen_pic_add_dot_plus_eight. + (arm_call_tls_get_addr, legitimize_tls_address): Likewise. + * config/arm/arm.md: Use match_operand in peephole input templates + and match_dup in peephole output templates. + +2005-11-04 Daniel Jacobowitz + + * config/arm/arm.c (arm_init_libfuncs): Use __aeabi_idiv and + __aeabi_uidiv. + +2005-11-04 Mark Mitchell + Daniel Jacobowitz + + * longlong.h (add_ssaaaa): Clobber condition code register + in ARM version. + (sub_ddmmss): Likewise. + (umul_ppmm): Likewise. + +2005-11-04 Daniel Jacobowitz + Paul Brook + Phil Blundell + + * configure.ac: Add test for ARM TLS support. + * configure: Regenerated. + * config/arm/arm-protos.h (legitimize_tls_address) + (arm_tls_referenced_p, tls_mentioned_p) + (arm_output_addr_const_extra): New prototypes. + (thumb_legitimize_pic_address): Delete. + * config/arm/arm.c: Include "gt-arm.h". + (enum tls_reloc): New. + (arm_cannot_copy_insn_p, arm_tls_symbol_p, load_tls_operand) + (pcrel_constant_p, get_tls_get_addr, arm_load_tp) + (arm_call_tls_get_addr, legitimize_tls_address) + (arm_tls_referenced_p, arm_tls_operand_p_1, tls_mentioned_p) + (arm_init_tls_builtins, arm_emit_tls_decoration) + (arm_output_addr_const_extra): New functions. + (TARGET_CANNOT_COPY_INSN_P, TARGET_CANNOT_FORCE_CONST_MEM) + (TARGET_HAVE_TLS): Define. + (target_thread_pointer): New. + (arm_override_options): Handle -mtp=. + (legitimize_pic_address): Ignore UNSPECs. + (arm_legitimate_address_p, thumb_legitimate_address_p): Handle PC + relative symbols. + (arm_legitimize_address, thumb_legitimize_address): Handle TLS. + (tls_get_addr_libfunc): New variable. + (symbol_mentioned_p, label_mentioned_p): Ignore UNSPEC_TLS. + (arm_init_builtins): Call arm_init_tls_builtins. + (arm_expand_builtin): Handle ARM_BUILTIN_THREAD_POINTER. + (arm_encode_section_info): Call default_encode_section_info. + * config/arm/arm.h (TARGET_HARD_TP, TARGET_SOFT_TP): Define. + (enum arm_tp_type): New. + (target_thread_pointer): Add declaration. + (LEGITIMATE_CONSTANT_P): Handle TLS. + (LEGITIMATE_PIC_OPERAND_P): Handle TLS. + (OUTPUT_ADDR_CONST_EXTRA): Call arm_output_addr_const_extra. + (enum arm_builtins): Add ARM_BUILTIN_THREAD_POINTER. + * config/arm/arm.md: Add UNSPEC_TLS. + (movsi): Handle TLS. + (pic_add_dot_plus_four, pic_add_dot_plus_eight): Allow for + non-PIC. + (tls_load_dot_plus_eight): New insn and a peephole to create it. + (load_tp_hard, load_tp_soft): New insns. + * arm.opt: Add -mtp=. + * doc/invoke.texi (ARM Options): Document -mtp. + +2005-11-04 Daniel Jacobowitz + + * config/arm/lib1funcs.asm: Don't include "libunwind.S". + * config/arm/libunwind.S: Include "lib1funcs.asm". + * config/arm/t-bpabi (LIB1ASMFUNCS): Remove _unwind. + (LIB2ADDEH): Add libunwind.S. + (LIB2ADDEHDEP): Add lib1funcs.asm. + * mklibgcc.in: Handle asm files in libgcc_eh.a. + +2005-11-04 Francois-Xavier Coudert + + PR fortran/18452 + * gcc/c.opt: Add a -lang-fortran option. + * gcc/c-opts.c: Add a lang_fortran flag. + (c_common_init_options): Handling the -lang-fortran option. + (c_common_handle_option): Add a case for Fortran options in + preprocessing. Remove cases for -ffixed-form and + -ffixed-line-length. Add a case for -lang-fortran. + +2005-11-03 David Edelsohn + + * config/rs6000/rs6000.c: Include params.h + (optimization_options): Set max-grow-copy-bb-insns default to 16. + (bdesc_2arg): Delete vpkuhss and vpkuwss. + * config/rs6000/altivec.md (UNSPEC_VPKUHSS): Delete. + (UNSPEC_VPKUWSS): Delete. + (altivec_vpkuhss): Delete. + (altivec_vpkuwss): Delete. + * config/rs6000/rs6000.md (plus_eqsi): Remove optimize_size from + final condition. + (neg_eq0): Remove final condition. + (neg_eq): Remove condition and split-condition. + +2005-11-04 Alan Modra + + * config/rs6000/rs6000.c (output_toc): Make "offset" HOST_WIDE_INT. + Use associated print macros. + +2005-11-03 Joseph S. Myers + + PR c++/17964 + * diagnostic.c (diagnostic_set_info_translated): New function. + (diagnostic_set_info): Use it. Add comment. + * diagnostic.h (diagnostic_set_info_translated): Declare. + +2005-11-03 Eric Botcazou + + * dwarf2asm.c (dw2_force_const_mem): Add new parameter 'public'. + On USE_LINKONCE_INDIRECT platforms, build a DECL_ONE_ONLY indirect + reference only if 'public' is true. + (dw2_output_indirect_constant_1): On USE_LINKONCE_INDIRECT platforms, + emit the .hidden directive only if the indirect reference is public. + (dw2_asm_output_encoded_addr_rtx): Add new parameter 'public'. + Pass it to dw2_force_const_mem. + * dwarf2asm.h (dw2_asm_output_encoded_addr_rtx): New param 'public'. + * dwarf2out.c (output_cfi): Adjust calls to above function. + (output_call_frame_info): Likewise. + * except.c (output_ttype): Pass TREE_PUBLIC of the type_info object + as 'public' argument to dw2_asm_output_encoded_addr_rtx. + +2005-11-03 Zdenek Dvorak + + PR tree-optimization/24483 + * tree-ssa-loop-ivopts.c (aff_combination_add_elt): Move rest + field to elts if possible. + +2005-11-03 Andrew Pinski + + PR middle-end/23155 + * gimplifier.c (gimplify_expr): Create a temporary for lvalue + CONSTRUCTOR. + +2005-11-03 Daniel Berlin + + Fix PR tree-optimization/24351 + + * tree-ssa-structalias.c (struct variable_info): Add + collapsed_into. + (get_varinfo_fc): New function to follow collapsing. + (new_var_info): Set collapsed_to to NULL. + (dump_constraint): Follow collapsing. + (build_constraint_graph): Handle collapsing. + (do_simple_structure_copy): Return false if something bad + happened. + (collapse_rest_of_var): New function. + (do_structure_copy): Collapse if do_simple_structure_copy returns + false. + +2005-11-03 Andrew Pinski + + PR middle-end/24589 + * gimplify.c (gimplify_expr) : Add the + expressions to a statement list instead of gimplifying them. + +2005-11-03 Eric Botcazou + + PR rtl-optimization/23585 + * rtlanal.c (rtx_addr_can_trap_p_1) : Return 0 for an address + that can't trap plus a constant integer, if the mode has zero size. + +2005-11-03 Ulrich Weigand + + PR target/24620 + * config/s390/s390.md ("*insv_reg_imm"): Accept any CONST_INT + as operand 2. + ("*insv_reg_extimm"): Likewise. + +2005-11-03 Joseph S. Myers + + PR c/24329 + * c-pretty-print.c (pp_c_type_specifier): Do not recurse if + c_common_type_for_mode returns an unnamed type. + +2005-11-02 Richard Henderson + + PR target/9350 + PR target/24374 + * dwarf2out.c (dwarf2out_reg_save_reg): New. + (dwarf2out_frame_debug_expr): Return after dwarf_handle_frame_unspec. + * function.c (assign_parms): Use calls.internal_arg_pointer. + (expand_main_function): Remove FORCE_PREFERRED_STACK_BOUNDARY_IN_MAIN + code. + * target-def.h (TARGET_INTERNAL_ARG_POINTER): New. + (TARGET_CALLS): Add it. + * target.h (struct gcc_target): Add calls.internal_arg_pointer. + * targhooks.c (default_internal_arg_pointer): New. + * targhooks.h (default_internal_arg_pointer): Declare. + * tree.h (dwarf2out_reg_save_reg): Declare. + * doc/tm.texi (FORCE_PREFERRED_STACK_BOUNDARY_IN_MAIN): Remove. + * config/i386/i386.c (dbx_register_map): Add return column. + (dbx64_register_map, svr4_dbx_register_map): Likewise. + (TARGET_INTERNAL_ARG_POINTER, ix86_internal_arg_pointer): New. + (TARGET_DWARF_HANDLE_FRAME_UNSPEC, ix86_dwarf_handle_frame_unspec): New. + (ix86_function_ok_for_sibcall): Disable if force_align_arg_pointer. + (ix86_save_reg): Save force_align_arg_pointer. + (ix86_emit_save_regs): Make regno unsigned. + (ix86_emit_save_regs_using_mov): Likewise. + (ix86_expand_prologue): Handle force_align_arg_pointer. + (ix86_expand_epilogue): Likewise. + * config/i386/i386.h: (dbx_register_map): Update. + (dbx64_register_map, svr4_dbx_register_map): Update. + (struct machine_function): Add force_align_arg_pointer. + * config/i386/i386.md (UNSPEC_REG_SAVE, UNSPEC_DEF_CFA): New. + (UNSPEC_TP, UNSPEC_TLS_GD, UNSPEC_TLS_LD_BASE): Renumber. + (TARGET_PUSH_MEMORY peepholes): Disable if RTX_FRAME_RELATED_P. + +2005-11-02 Jan Hubicka + + PR target/23303 + * i386.md: Add peep2 for simplyfing array accesses. + +2005-11-02 Ulrich Weigand + + PR target/24615 + * config/s390/s390-protos.h (s390_decompose_shift_count): Declare. + * config/s390/s390.c (s390_decompose_shift_count): New function. + (s390_extra_constraint_str) ['Y']: Use s390_decompose_shift_count. + (print_shift_count_operand): Use s390_decompose_shift_count. + * config/s390/predicates.md ("setmem_operand", "shift_count_operand"): + Use s390_decompose_shift_count. Do not accept any non-base hard regs. + +2005-11-02 Ulrich Weigand + + PR target/24600 + * loop.c (loop_givs_rescan): Use force_operand to expand + complex GIVs. + +2005-11-02 Andrew Pinski + + PR 22429 + * fold-const.c (build_range_check): Use unsigned when signed + overflow is undefined also. If etype is subtype, make sure that + the subtraction is in the supertype. + +2005-11-02 Richard Henderson + + PR target/24178 + * config/alpha/alpha.c (get_aligned_mem): Honor alignment given + by MEM_ALIGN. + +2005-11-01 Richard Henderson + + PR 21518 + * loop.c (scan_loop): Do not propagate computations to a hard + register destination with SMALL_REGISTER_CLASSES. + +2005-11-01 Joseph S. Myers + + * config/rs6000/rs6000.c (rs6000_rtx_costs): Do not add extra + costs for MULT inside PLUS or MINUS. + +2005-11-01 Bob Wilson + + * config/xtensa/xtensa.h (TRAMPOLINE_TEMPLATE): Add a byte of padding. + (TRAMPOLINE_SIZE): Round up to 60. + * config/xtensa/lib2funcs.S (TRAMPOLINE_SIZE): Likewise. + +2005-10-31 James E. Wilson + + PR debug/24444 + * dwarf2out.c (convert_cfa_to_loc_list): Put inside DWARF2_UNWIND_INFO + ifdef. Put ifdefs around call in gen_subprogram_die. + (compute_frame_pointer_to_cfa_displacement): Likewise. + (gen_subprogram_die): Restore old code for when DWARF2_UNWIND_INFO is + not defined. + + PR rtl-optimization/17356 + * cfgrtl.c (purge_dead_edges): Undo last change. In EDGE_EH code, + add check for CALL_INSN if EDGE_ABRNOMAL_CALL true. + +2005-10-31 Jan Hubicka + + PR middle-end/24093 + * cgraph.c (cgraph_clone_edge, cgraph_clone_node): Watch negative + + PR target/20928 + * i386.c (legitimize_pic_address): Deal with large immediates. + + PR profile/20815 + * coverage.c (coverage_checksum_string): Fix code to stip random seeds + from symbol names while computing checkup. + + PR profile/24487 + * predict.c (predict_loops): Do not estimate more than + MAX_PRED_LOOP_ITERATIONS in PRED_LOOP_ITERATIONS heuristic. + * predict.def (MAX_PRED_LOOP_ITERATIONS): Define. + +2005-10-31 Andrew MacLeod + + PR tree-optimization/19097 + * tree-ssa-operands.c (correct_use_link): Don't look for modified stmts. + +2005-10-31 J"orn Rennecke + + * optabs.c (expand_unop): Take TRULY_NOOP_TRUNCATION into account. + +2005-10-31 Andrew Pinski + + PR middle-end/23492 + * tree-inline.c (setup_one_parameter): If the init_stmt + is NULL, don't insert the statement. + +2005-10-30 Jan Hubicka + + PR tree-optimization/24172 + * tree-inline.c (copy_body_r): Unshare the substituted value first. + +2005-10-30 Hans-Peter Nilsson + + * config/mmix/mmix.c (mmix_intval): Correct handling of DFmode + constants for hosts with long != 32 bits. + +2005-10-28 Andreas Krebbel + + PR middle-end/24093 + * ipa-inline.c (craph_decide_recursive_inlining): Fix return value. + +2005-10-28 Aldy Hernandez + + * config/ms1/ms1.h (TARGET_MS1_64_001): New. + (TARGET_MS1_16_002): New. + (TARGET_MS1_16_003): New. + + * config/ms1/ms1.md ("decrement_and_branch_until_zero"): Rewrite. + ("*decrement_and_branch_until_zero_no_clobber"): New. + Add corresponding splitter for decrement_and_branch_until_zero + instruction. + Key all decrement_and_branch_until_zero patterns off of + TARGET_MS1_16_003. + +2005-10-28 Andrew Pinski + + PR middle-end/24362 + * tree-complex.c (extract_component): Treat RESULT_DECL + like the rest of the decls. + +2005-10-25 Eric Botcazou + + * config/ia64/ia64.c (ia64_output_function_profiler): Emit an + indirect call to _mcount if the function needs a static chain. + +2005-10-25 Eric Botcazou + Caroline Tice + + PR rtl-optimization/24460 + * dwarf2out.c (have_switched_text_sections): New boolean variable. + (dwarf2out_switch_text_section): Set it to true instead of + incrementing separate_line_info_table_in_use. + (output_loc_list): Additionally test have_switched_text_sections. + (output_ranges): Likewise. + (dwarf2out_finish): Likewise. + * varasm.c (assemble_start_function): Do not call + insert_section_boundary_note. + (assemble_end_function): If flag_reorder_blocks_and_partition, + switch to the function's section before emitting the .size directive. + * bb-reorder.c (insert_section_boundary_note): Staticify. + (rest_of_handle_reorder_blocks): Call insert_section_boundary_note. + * output.h (insert_section_boundary_note): Delete. + +2005-10-24 Andrew Pinski + + PR c/23103 + * c-format.c (check_format_types): Use lang_hooks.types_compatible_p + instead of pointer equality when comparing types. + +2005-10-24 James E. Wilson + + * sched-deps.c (flush_pending_lists): Pass 1 not 0 in first two + add_dependence_list_and_free calls. + +2005-10-24 Steven Bosscher + + * contrib.texi: Add the names of the LLNL folks who donated + Cray pointer support for gfortran. + +2005-10-24 Steven Bosscher + + PR tree-optimization/24225 + * profile.c (branch_prob): Look from end to start through a + basic block when looking for a locus. + +2005-10-24 Richard Henderson + + * pa.c (store_reg_modify): Set RTX_FRAME_RELATED_P on each set in + parallel. + (hppa_expand_prologue): Likewise. + +2005-10-24 John David Anglin + + * pa-linux.h (NO_PROFILE_COUNTERS): Delete define. + (NO_DEFERRED_PROFILE_COUNTERS): Define. + * pa.h (NO_PROFILE_COUNTERS): Define. + * pa.c (NO_DEFERRED_PROFILE_COUNTERS): Define if not defined. + (funcdef_nos): New vector to hold label numbers of deferred profile + counters. + (output_deferred_profile_counters): New function. + (hppa_profile_hook): Push label number onto funcdef_nos. + (pa_hpux_file_end): Call output_deferred_profile_counters if + NO_DEFERRED_PROFILE_COUNTERS is false. + + * pa-protos.h (get_deferred_plabel): New prototype. + * pa.c (get_plabel): Rename to get_deferred_plabel. Return plabel. + Make global. + (output_call): Adjust calls. + +2005-10-24 Alan Modra + + * config/rs6000/rs6000.c (rs6000_legitimize_tls_address): Explain + peculiarity of GOT/TOC section usage. + +2005-10-23 Andrew Pinski + + PR objc/24435 + * c-common.c (constant_string_class_name): Add documentation. + +2005-10-23 Kaz Kojima + + PR target/23832 + * recog.c (peephole2_optimize): Increment peep2_current_count + only when the slot is empty. + +2005-10-23 John David Anglin + + PR ada/23957 + * except.c (output_function_exception_table): Call + assemble_external_libcall if we need a personality function. + +2005-10-21 Eric Botcazou + + PR rtl-optimization/24460 + * bb-reorder.c (fix_crossing_unconditional_branches): Do not + set the basic block for barriers. + +2005-10-21 Janis Johnson + + * var-tracking.c (vt_initialize): Initialize post. + +2005-10-21 Devang Patel + + PR/24220 + * c-common.c (vector_types_convertible_p): Check vector element type. + +2005-10-21 Kaz Kojima + + * config/sh/sh.c (prepare_move_operands): Handle the address + constant which is a tls symbolic address plus a constant. + +2005-10-21 Andrew Pinski + + PR driver/24473 + * gcc.c (main): Use the correct counter for erroring out + about mulitple files. + +2005-10-21 Alan Modra + + PR target/24465 + * config/rs6000/rs6000.c (rs6000_legitimize_tls_address): Always + use r2 for 64-bit tls .got access. + +2005-10-21 Paolo Bonzini + + * dojump.c (do_jump): Handle side-effecting TRUTH_AND_EXPR and + TRUTH_OR_EXPR. + +2005-10-20 Steven Bosscher + + PR tree-optimization/24307 + * tree-cfg.c (tree_find_edge_insert_loc): Handle naked RETURN_EXPR. + +2005-10-20 Alexandre Oliva + + PR middle-end/24295 + * cgraphunit.c (cgraph_varpool_remove_unreferenced_decls): Mark + alias targets. + * varasm.c (find_decl_and_mark_needed): After cgraph global info + is ready, stop marking functions, but still mark variables. + +2005-10-20 Richard Guenther + + PR c++/24439 + * fold-const.c (invert_truthvalue): Handle COND_EXPR with + void type operands. + +2005-10-20 Eric Botcazou + + PR rtl-optimization/23585 + * rtlanal.c (rtx_addr_can_trap_p_1): New predicate extracted from... + (rtx_addr_can_trap_p): ... here. Invoke rtx_addr_can_trap_p_1. + (may_trap_p_1): New predicate extracted from... + (may_trap_p): ... here. Invoke may_trap_p_1. + (may_trap_or_fault_p): New predicate. + * rtl.h (may_trap_or_fault_p): Declare it. + * reorg.c (steal_delay_list_from_target): Use may_trap_or_fault_p + instead of may_trap_p. + (steal_delay_list_from_fallthrough): Likewise. + (fill_simple_delay_slots): Likewise. + (fill_slots_from_thread): Likewise. + * function.c (pad_to_arg_alignment): Rework comment about + SPARC_STACK_BOUNDARY_HACK. + * config/sparc/sparc.h: Likewise. + +2005-10-19 Adrian Straetling + + * config/s390/s390.c (s390_expand_insv): New. + * config/s390/s390-protos.h (s390_expand_insv): Declare. + * config/s390/s390.md ("UNSPEC_SETHIGH"): Rename to "UNSPEC_ICM". + ("icm_hi"): Remove mode attribute. + ("*sethigh"): Rewrite to "sethighpart". + Adjust all uses. + ("*extracthi", "*extractqi"): Remove. + (extv", "*extzv"): New. + ("insv", "*insv_mem_reg", "*insvdi_mem_reghigh", + "*insv_reg_imm", "*insv_reg_extimm"): New. + +2005-10-19 Ulrich Weigand + + * cfgexpand.c (discover_nonconstant_array_refs_r, + discover_nonconstant_array_refs): Move here from tree-outof-ssa.c + (tree_expand_cfg): Call discover_nonconstant_array_refs. + * tree-outof-ssa.c (rewrite_out_of_ssa): Remove call to + discover_nonconstant_array_refs. + +2005-10-19 Steven Bosscher + + PR c/23228 + * c-decl.c (pop_scope): Don't warn about an unused variable + if it is marked with TREE_NO_WARNING. + (duplicate_decls): Set TREE_NO_WARNING if olddecl and newdecl + somenow mismatch and olddecl is to be replaced. + +2005-10-19 Eric Botcazou + + PR middle-end/23199 + * cfgrtl.c (safe_insert_insn_on_edge): Use can_copy_p to detect + whether registers live on the edge can be saved/restored. + +2005-10-19 Kaz Kojima + + * config/sh/sh.c (fixup_mova): Skip notes. + +2005-10-19 Ulrich Weigand + + * config/s390/s390-protos.h (s390_hard_regno_rename_ok): Add prototype. + * config/s390/s390.c (s390_hard_regno_rename_ok): New function. + (s390_can_eliminate): Handle BASE_REGNUM elimination. + (s390_initial_elimination_offset): Likewise. + (s390_conditional_register_usage): BASE_REGNUM is no longer a fixed + register on TARGET_ZARCH targets. + * config/s390/s390.h (HARD_REGNO_RENAME_OK): Define + (INITIAL_FRAME_POINTER_OFFSET): Remove. + (REG_ALLOC_ORDER): Move BASE_REGNUM lower. + (ELIMINABLE_REGS): Add BASE_REGNUM elimination rule. + +2005-10-19 Andreas Krebbel + + * config/s390/s390.md: Comment describing output modifiers updated. + * config/s390/s390.c (print_operand): Likewise. + +2005-10-19 Andreas Krebbel + + * config/s390/s390.c (override_options): Added check for -mstack-size + 64k limitation. + * doc/invoke.texi: Mention that limit in the documenation. + +2005-10-18 Paolo Bonzini + + PR #19672 + * dojump.c (do_jump): Handle TRUTH_AND_EXPR and TRUTH_OR_EXPR here. + +2005-10-18 Daniel Berlin + + Fix PR tree-optimization/24231 + + * tree-ssa-pre.c (try_look_through_load): Skip abnormal phi names + (compute_avail): Ditto. + +2005-10-18 Richard Henderson + + PR target/24428 + * config/i386/i386.c (legitimate_constant_p): Check + SYMBOL_REF_TLS_MODEL directly. Don't fallthru to SYMBOL_REF + if LABEL_REF. + (legitimate_pic_operand_p): Test SYMBOL_REF_TLS_MODEL directly. + (legitimate_pic_address_disp_p): Reorg CONST checking to make + sure SYMBOL_REF_TLS_MODEL is tested. Test SYMBOL_REF_TLS_MODEL + directly. + (print_operand_address): Likewise. + * config/i386/predicates.md (x86_64_immediate_operand): Test + SYMBOL_REF_TLS_MODEL properly inside CONST. + (x86_64_zext_immediate_operand): Likewise. + (global_dynamic_symbolic_operand, local_dynamic_symbolic_operand, + initial_exec_symbolic_operand, local_exec_symbolic_operand): Remove. + * config/i386/i386-protos.h: Remove predicates.md entries. + +2005-10-18 Danny Smith + + * config/i386/winnt-cxx.c (i386_pe_adjust_class_at_definition): + Check that elements of TYPE_METHODS are FUNCTION_DECLs. + +2005-10-17 Alexey Starovoytov + Ian Lance Taylor + + PR middle-end/23522 + * fold-const.c (fold_widened_comparison): Do not allow range based + constant folding when right operand cannot be unwidened. + +2005-10-17 Richard Henderson + + * builtins.c (expand_builtin_synchronize): Build a new-style asm + with a memory clobber. + +2005-10-17 James E Wilson + + PR rtl-optimization/17356 + * cfgrtl.c (purge_dead_edges): Check for EDGE_ABNORMAL_CALL before + checking for EDGE_EH. + +2005-10-17 Eric Botcazou + + * config/sparc/sparc.c (function_arg_slotno): In 64-bit mode, align + the slot on an even boundary for any type with 16-byte alignment. + +2005-10-17 Hans-Peter Nilsson + + PR target/23424 + * md.texi (Modifiers) <%>: Clarify that % doesn't work + after register allocation. + +2005-10-17 DJ Delorie + + * config/m32c/m32c.c (m32c_pushm_popm): Don't mark epilogue insns + as frame related. + +2005-10-17 Nathan Sidwell + + PR c++/22551 + * c-common.c (c_add_case_label): Revert my 2005-10-14 clearing of + overflow flags. + +2005-10-17 Kaz Kojima + + * config/sh/sh.h (OPTIMIZATION_OPTIONS): Set flag_schedule_insns + to 2 if it's already non-zero. + (OVERRIDE_OPTIONS): Clear flag_schedule_insns if flag_exceptions + is set and warn about it if flag_schedule_insns is 1. + +2005-10-17 Paul Woegerer + + * config/crx/crx.md: Compare-and-branch instructions need to + invalidate CC. + +2005-10-17 Uros Bizjak + + PR target/24315 + * config/i386/i386.md (*pushdi2_rex64 splitter) + (*movdi_1_rex64 splitter, *ashldi3_1 splitter) + (*ashrdi3_1 splitter, *lshrdi3_1 splitter): Delay splitting after + flow2 pass only when (optimize > 0 && flag_peephole2). + +2005-10-16 Andrew Pinski + + PR driver/22544 + * gcc.c (have_c): New static variable. + (have_o): Likewise. + (process_command): Remove declation of have_c. + Set have_o to 1 when handling -o. + (main): Add a fatel error if there are multiple + files specified and -o and -c/-S is passed witout + -combine or multiple languages. + +2005-10-16 Daniel Berlin + + Fix PR tree-optimization/22444 + * tree-ssa-alias.c (compute_flow_insensitive_aliasing): + Assert that we don't hit something with subvars. + (setup_pointers_and_addressables): Don't add things with subvars, + because we'll already process the subvars for aliasing purposes. + +2005-10-16 Hans-Peter Nilsson + + PR target/23424 + * config/cris/cris.md ("*mov_side", "*mov_sidesisf") + ("*mov_side_mem", "*mov_sidesisf_mem", "*clear_side") + ("*ext_sideqihi", "*ext_sidesi", "*op_side") + ("*op_swap_side", "*extopqihi_side", "*extopsi_side") + ("*extopqihi_swap_side", "*extopsi_swap_side"): Have separate, + swapped, alternatives for the R constraint. + + PR middle-end/24341 + * builtins.c (get_builtin_sync_mode): Make unlimited + mode_for_size request. + +2005-10-15 Richard Henderson + + * gimplify.c (gimplify_var_or_parm_decl): Split out from ... + (gimplify_expr): ... here. + (gimplify_compound_lval): Use it in initial scan loop. Allow + fb_lvalue in base expression. + +2005-10-15 Richard Henderson + + PR 23714 + * builtins.c (expand_builtin_trap): Export. + * expr.h (expand_builtin_trap): Declare. + * expr.c (expand_assignment): Emit a trap for integral offsets + from registers that weren't reduced to bitpos. + + * tree-cfg.c (mark_array_ref_addressable_1): Remove. + (mark_array_ref_addressable): Remove. + * tree-flow.h (mark_array_ref_addressable): Remove. + * tree-optimize.c (execute_cleanup_cfg_post_optimizing): Don't call it. + +2005-10-15 James E Wilson + + PR target/24232 + * sched-deps.c (add_dependence_list): New arg UNCOND. Fix all callers. + (add_dependence_list_and_free): Likewise. + (sched_analyze_2, case MEM): Delete sched_insns_conditions_mutex_p + call. + +2005-10-15 Diego Novillo + + PR 23141 + PR 23142 + * tree-vrp.c (vrp_meet): Fix the intersection of equivalence + sets VR0->EQUIV and VR1->EQUIV when meeting a range and an + anti-range. + (vrp_visit_phi_node): Only prevent infinite iterations when + the previous result and the new result are both VR_RANGEs. + +2005-10-15 Ranjit Mathew + + * tree-into-ssa.c (mark_def_sites): Correct minor typo in + function comment. + +2005-10-14 Volker Reichelt + + PR c/23439 + * c-parser.c (c_parser_for_statement): Use location of RID_FOR + to initialize loc. + +2005-10-14 Per Bothner + + PR preprocessor/21250 + * c-ppoutput.c (print_line): Print internal line 0 as 1. + +2005-10-14 Nathan Sidwell + + PR c++/22551 + * c-common.c (c_add_case_label): Clear LOW_VALUE and HIGH_VALUE's + overflow flags. Refactor some conditionals. + +2005-10-13 Andrew Pinski + + PR tree-opt/21304 + * tree-dfa.c (add_referenced_var): Only look at decls which + have TREE_CONSTANT or TREE_READONLY set instead of if + !TREE_PUBLIC or !TREE_CONSTANT. + +2005-10-13 James E Wilson + + * doc/invoke.texi: For -x, add f95-cpp-input. + * doc/install.texi: For --enable-languages doc, change f95 to fortran. + +2005-10-12 Sebastian Pop + + PR tree-optimization/24262 + * tree-data-ref.c (analyze_offset_expr): Check that init is invariant + in loop all the time. + +2005-10-12 Richard Henderson + + PR c/24255 + * tree.h (DECL_TRANSPARENT_UNION): Remove. + * function.c (assign_parm_find_data_types): Don't support it. + * print-tree.c (print_node): Likewise. + * c-common.c (handle_transparent_union_attribute): Likewise. + Use build_duplicate_type. + * tree-inline.c (remap_type_1): Split out of remap_type; + properly remap aggregate fields. + (build_duplicate_type): New. + * doc/extend.texi (Variable Attributes): Remove documentation + for transparent_union. + +2005-10-12 Eric Botcazou + + PR target/24284 + * config/sparc/sparc.c (gen_stack_pointer_inc): Build by hand. + (gen_stack_pointer_dec): Likewise. + +2005-10-12 Danny Smith + + PR middle-end/21275 + PR middle-end/21766 + * target.h (struct gcc_target): Add valid_dllimport_attribute_p + target hook. + (struct cxx): Add adjust_class_at_definition target hook. + * target-def.h: (TARGET_VALID_DLLIMPORT_ATTRIBUTE_P): New define, + defaulting to hook_bool_tree_true. Add to TARGET_INITIALIZER + (TARGET_CXX_ADJUST_CLASS_AT_DEFINITION): New define, defaulting to + hook_void_tree. Add to TARGET_CXX. + * tree.h (struct decl_with_vis): Rename non_addr_const_p field to + dllimport_flag. + (DECL_NON_ADDR_CONSTANT_P): Replace with DECL_DLLIMPORT_P macro. + * tree.c (merge_dllimport_decl_attributes): Check DECL_DLLIMPORT_P + instead of attribute. Check for dllexport override. Warn if + inconsistent dll linkage. Don't lose old dllimport if decl has + had address referenced. Tweak lookup of dllimport atribute. + (handle_dll_attribute): Check targetm.valid_dllimport_attribute_p + for target specific rules. Don't add dllimport attribute if + DECL_DECLARED_INLINE_P. Set DECL_DLLIMPORT_P when adding + dllimport attribute. + (staticp): Replace DECL_NON_ADDR_CONSTANT_P with DECL_DLLIMPORT_P. + * varasm.c (initializer_constant_valid_p): Replace + DECL_NON_ADDR_CONSTANT_P with DECL_DLLIMPORT_P + + PR target/21801 + PR target/23589 + * config.gcc (i[34567]86-*-cygwin*): Add winnt-cxx.o to + 'cxx_target_objs', winnt-stubs,o to 'extra_objs'. + (i[34567]86-*-mingw32*): Likewise. + + * doc/tm.texi (TARGET_CXX_ADJUST_CLASS_AT_DEFINITION): Document. + (TARGET_VALID_DLLIMPORT_ATTRIBUTE_P): Document. + + * config/i386/winnt.c (i386_pe_dllimport_p): Factor out + C++-specific code. Change return value to bool. + (i386_pe_dllimport_p): Likewise. + (associated_type): Simplify and make language-independent + (i386_pe_encode_section_info): Replace override of ambiguous + dllimport symbol refs with a gcc_assert. + (i386_pe_valid_dllimport_attribute_p): Define. + * config/i386/winnt-cxx.c: New file. Define C++ versions of + i386_pe_type_dllimport_p, i386_pe_type_dllexport_p, + i386_pe_adjust_class_at_definition. + * config/i386/winnt-stubs.c: New file. Define stub versions of + lang-specific functions. + * config/i386/i386-protos.h: Declare winnt-[cxx|stubs].c functions + i386_pe_type_dllimport_p, i386_pe_type_dllexport_p, + i386_pe_adjust_class_at_definition. + (i386_pe_valid_dllimport_attribute_p): Declare. + * config/i386/cygming.h (TARGET_VALID_DLLIMPORT_ATTRIBUTE_P): Define. + (TARGET_CXX_ADJUST_CLASS_AT_DEFINITION): Define. + * config/i386/t-cygming: Add rules for winnt-cxx.o, winnt-stubs.o. + + PR target/19704 + * config/i386/i386.c (ix86_function_ok_for_sibcall): Replace test for + dllimport attribute with test of DECL_DLLIMPORT_P. + +2005-10-12 Adrian Straetling + + * combine.c (make_extraction): Correct offset computation. + +2005-10-12 Hans-Peter Nilsson + + * config/cris/t-linux (LIMITS_H_TEST): Define. + +2005-10-12 Richard Henderson + + PR rtl-opt/23324 + * cfgexpand.c (add_alias_set_conflicts): Use objects_must_conflict_p. + +2005-10-12 Richard Guenther + + * Makefile.in (CGRAPH_H): Depend on $(TREE_H). + +2005-10-12 Nathan Sidwell + + PR c++/19964 + * stor-layout.c (place_field): Set DECL_FIELD_OFFSET and + DECL_FIELD_BIT_OFFSET of FIELD_DECLs, even if they have an invalid + type. + +2005-10-12 Richard Guenther + + PR c++/23799 + * varasm.c (output_constant): Correct typo from previous + patch by DJ. + +2005-10-11 Ian Lance Taylor + + PR rtl-optimization/13931 + * combine.c: Revert patch of 2003-05-14, and: + (try_combine): Only set elim_i1 and elim_i2 if the destination is + completely killed in the appropriate insn. + (distribute_notes): Don't skip multiple hard register test for + elim_i1 and elim_i2. + +2005-10-11 Richard Henderson + + PR c/24255 + * c-typeck.c (convert_for_assignment): Use build_constructor_single + to initialize a transparent union instead of a nop_expr. + +2005-10-11 Richard Henderson + + * Makefile.in (tree-ssa-dce.o): Depend on SCEV_H. + * tree-ssa-dce.c: Include tree-scalar-evolution.h. + (tree_ssa_dce_loop): Call scev_reset. + + PR tree-opt/24300 + * Makefile.in (tree-ssa-dce.o): Depend on CFGLOOP_H. + * tree-ssa-dce.c: Include cfgloop.h. + (tree_ssa_dce_loop, pass_dce_loop): New. + * tree-pass.h (pass_dce_loop): Declare it. + * passes.c (init_optimization_passes): Use it. + +2005-10-11 Eric Botcazou + + PR middle-end/24263 + * convert.c (convert_to_real): Revert 2005-10-05 patch. + Only apply the optimization for rounding builtins if the inner + cast is also an extension. + +2005-10-11 Andrew Pinski + + PR tree-opt/23946 + * tree-ssa-ccp.c (execute_fold_all_builtins): Call + mark_new_vars_to_rename instead of update_stmt. + +2005-10-11 Bernd Schmidt + + * config/bfin/crti.s (__init, __fini): Renamed from _init, _fini. + +2005-10-11 Jakub Jelinek + + * config/i386/i386.md (movsi_1, movdi_1_rex64): Use mmxadd type + for setting MMX register to 0 rather than mmx. + +2005-10-10 Steve Ellcey + + PR target/12098 + * configure.ac: Move gas check from mips specific case to common case. + Do check for GNU as for mips*-*-* and *-*-hpux* targets. + * configure: Regenerate + * doc/install.texi: Update. + +2005-10-10 Eric Botcazou + + PR target/24284 + * config/sparc/sparc.c (sparc_expand_prologue): Remove bogus PATTERN. + +2005-10-10 Maciej W. Rozycki + + * gcc.c (do_spec_1): Accept numeric characters in file name + suffixes. + +2005-10-10 Nick Clifton + + * config/arm/arm.c: Remove extraneous whitespace. Remove comment + describing the deleted arm_gen_rotated_half_load function. + +2005-10-09 Kaz Kojima + + * config/sh/sh.c (emit_fpu_switch): Set TREE_PUBLIC for + __fpscr_values. + +2005-10-09 Daniel Jacobowitz + + * config.gcc (arm*-*-linux*): Remove redundant extra_parts and + gnu_ld assignments. + * config/arm/t-linux-eabi (LIB1ASMFUNCS) + (EXTRA_MULTILIB_PARTS): Define. + * config/arm/linux-elf.h (NO_IMPLICIT_EXTERN_C, CPLUSPLUS_CPP_SPEC) + (STARTFILE_SPEC, ENDFILE_SPEC, CC1_SPEC) + (LINK_GCC_C_SEQUENCE_SPEC, USE_LD_AS_NEEDED): Move to... + * config/arm/uclinux-elf.h (NO_IMPLICIT_EXTERN_C, CPLUSPLUS_CPP_SPEC) + (STARTFILE_SPEC, ENDFILE_SPEC, CC1_SPEC) + (LINK_GCC_C_SEQUENCE_SPEC, USE_LD_AS_NEEDED): ... here. + +2005-10-09 Zdenek Dvorak + + PR tree-optimization/24226 + * tree-cfg.c (remove_bb): Clean up unreachable loops. + * tree-flow.h (free_numbers_of_iterations_estimates_loop): Declare. + * tree-ssa-loop-niter.c (free_numbers_of_iterations_estimates_loop): + Export. + +2005-10-09 Eric Botcazou + + * config/sparc/gmon-sol2.c (internal_mcount): Mark as used. + +2005-10-08 Andrew Pinski + + PR target/24136 + * config/rs6000/darwin.md (movdf_low_si): Remove early clobber. + Rewrite for no need for the early clobber. + +2005-10-08 Kazu Hirata + + Merge from csl-arm-branch: + 2005-09-07 Paul Brook + * config/arm/linux-eabi.h (SUBTARGET_EXTRA_LINK_SPEC): Prepend a + space to string. + + 2005-04-30 Paul Brook + * config/arm/bpabi.h (TARGET_DEFAULT): Define. + * config/arm/linux-eabi.h (SUBTARGET_CPU_DEFAULT): Define. + + 2005-03-07 Daniel Jacobowitz + * config/arm/arm.c (arm_all_abis): Add aapcs-linux. + (arm_override_options): Use TARGET_AAPCS_BASED. + * config/arm/arm.h (enum arm_abi_type): Add ARM_ABI_AAPCS_LINUX. + (PTRDIFF_TYPE): Use int for AAPCS. + (DEFAULT_SHORT_ENUMS): Use false for aapcs-linux. + * config/arm/linux-eabi.h (ARM_DEFAULT_ABI, WCHAR_TYPE): Define. + (DEFAULT_SHORT_ENUMS): Delete. + * doc/invoke.texi (ARM Options): Document -mabi=aapcs-linux. + + 2004-12-15 Daniel Jacobowitz + * config/arm/arm.h (DEFAULT_SHORT_ENUMS): Wrap in #ifndef. + * config/arm/linux-eabi.h (DEFAULT_SHORT_ENUMS): Define to 0. + * config/arm/t-linux-eabi (TARGET_LIBGCC2_CFLAGS): Set to -fPIC. + + 2004-12-03 Mark Mitchell + * config/arm/linux-eabi.h (LIBGCC_SPEC): Do not define. + + 2004-11-22 Mark Mitchell + * config.gcc (arm*-*-linux-gnueabi): Use __cxa_atexit. + + 2004-11-19 Mark Mitchell + * config.gcc (arm*-*-linux-gnueabi): Add it. + * config/arm/bpabi.h (FPUTYPE_DEFAULT): Undefine it before + redefining it. + (TARGET_OS_CPP_BUILTINS): Likeiwse. + * config/arm/linux-eabi.h: New file. + * config/arm/linux-elf.h (LINUX_TARGET_INTERPRETER): New macro. + (LINUX_TARET_LINK_SPEC): Likewise. + (LINK_SPEC): Use it. + * config/arm/t-linux-eabi: New file. + +2005-10-08 Steven Bosscher + + PR other/22202 + * params.def (PARAM_MAX_VARIABLE_EXPANSIONS): Remove superfluous + spaces. + (PARAM_SMS_DFA_HISTORY): Likewise. + +2005-10-08 Kazu Hirata + + PR middle-end/23150 + * calls.c (mem_overlaps_already_clobbered_arg_p): New. + (load_register_parameters): Call it. + (check_sibcall_argument_overlap_1): Likewise. + (store_one_arg): Likewise. + +2005-10-07 James E. Wilson + + * config/ia64/vect.md (ashl3, ashr3, lshr3): Use + DImode not VECINT24 for operand 2. + + PR target/23644 + * doc/invoke.texi (IA-64 Options, item -mtune): Renamed from + -mtune-arch. + + PR target/24193 + * config/ia64/ia64.md (movbi, movti_internal, gr_spill_internal, + fr_spill): Use destination_operand for operand 0. + +2005-10-07 DJ Delorie + + * varasm.c (output_constant): Limit error to expanding + conversions. + +2005-10-07 Richard Guenther + + PR middle-end/24227 + * fold-const.c (fold_binary): Fix operand types during folding + of X op (A, Y). Evaluation order of the side-effects of + X and A are frontend-defined, so ensure we honour that even for + tcc_comparison class operands; eased by removing duplicate code. + +2005-10-07 Steve Ellcey + + * stor-layout.c (layout_type): Do not allow alignment of array + elements to be greater than their size. + +2005-10-07 Steve Ellcey + + * config.host (hppa*-*-hpux*): Change out_host_hook_obj and + host_xmake_file. + (hppa*-*-linux*): Ditto. + (ia64-*-hpux*): Add out_host_hook_obj and host_xmake_file. + * config/host-hpux.c: New. + * config/x-hpux: New. + * config/pa/x-hpux: Remove. + * config/pa/x-linux: Remove. + * config/pa/pa-host.c: Remove. + +2005-10-07 Jeff Law + + * tree-ssa-dom.c (dom_opt_finalize_block): Fix conditions to + determine whether or not to try and thread outgoing edges. + +2005-10-07 David Edelsohn + + * config/rs6000/rs6000.md (eqsi_power): New. + (neg_eq0si): Add TARGET_POWER to final condition. + (neg_eqsi): Same. + +2005-10-06 Richard Henderson + + * config/rs6000/rs6000.c: Revert last change. + +2005-10-06 Richard Henderson + + * config/rs6000/rs6000.c (rs6000_cannot_force_const_mem): New. + (TARGET_CANNOT_FORCE_CONST_MEM): Use it. + +2005-10-06 Andrew Pinski + + PR middle-end/22216 + PR middle-end/23651 + * cfgexpand.c (tree_expand_cfg): After expanding the functions, clear + out return_label and naked_return_label. + +2005-10-06 Daniel Berlin + + * tree-ssa-structalias.c (check_for_overlaps): Fix bug in last + change. + +2005-10-06 Richard Henderson + + PR tree-opt/22237 + * tree-inline.c (declare_return_variable): Handle modify_dest not + being a DECL. + +2005-10-06 Daniel Berlin + + Fix PR tree-optimization/22488 + * tree-ssa-structalias.c (check_for_overlaps): New function. + (create_variable_info_for): Use it. + +2005-10-06 Richard Henderson + + PR debug/24070 + * dwarf2out.c (lookup_filename): Return the result of maybe_emit_file. + (dwarf2out_start_source_file): Print it. + +2005-10-06 Geoffrey Keating + + * config/t-slibgcc-darwin (SHLIB_MAPFILES): Use '+='. + +2005-10-06 Richard Henderson + + PR 23706 + * mode-switching.c (optimize_mode_switching): Clear transp bit + for block with incomming abnormal edges. + + * config/sh/sh.c (fpscr_values, emit_fpu_switch): New. + (fpscr_set_from_mem): Use them. + * config/sh/sh.md (fpu_switch0, fpu_switch1): Remove. + (fpscr postinc splitters): Rewrite as peephole2+split. + +2005-10-06 David Edelsohn + + * config/rs6000/rs6000.md (eq): Add !TARGET_POWER. + (eq_compare): Same. + +2005-10-06 Richard Guenther + + PR tree-optimization/24238 + * tree-ssa-alias.c (find_used_portions): Handle RESULT_DECL. + +2005-10-06 Daniel Jacobowitz + + * acinclude.m4 (gcc_AC_CHECK_TOOL): Handle environment variables + here. Use AC_PATH_PROG for environment variables instead of + test -x. + * configure.ac: Update calls to gcc_AC_CHECK_TOOL. Use it for + objdump also. + * configure: Regenerated. + +2005-10-06 Richard Earnshaw + + PR target/23783 + * arm.md (call): If the address isn't a SYMBOL_REF or a register, + then force it into a register. + (call_value): Likewise. + +2005-10-06 Richard Henderson + + PR 24049 + * passes.c (init_optimization_passes): Move pass_lower_vector_ssa + under pass_vectorize. Clear TODO_ggc_collect from the dce pass + under pass_vectorize. + +2005-10-05 Devang Patel + + PR Debug/23205 + * dbxout.c (dbxout_symbol): Check DECL_RTL_SET_P, after + handling constants. Check NAMESPACE_DECL context for constants. + +2005-10-05 Eric Christopher + + * doc/md.texi (Standard Names): Fix name of pushm1 pattern. + +2005-10-05 Richard Henderson + + PR 23714 + * tree-cfg.c (mark_array_ref_addressable_1): New. + (mark_array_ref_addressable): New. + * tree-flow.h (mark_array_ref_addressable): Declare. + * tree-optimize.c (execute_cleanup_cfg_post_optimizing): Use it. + +2005-10-05 Andrew Pinski + + PR middle-end/20606 + PR middle-end/24069 + * reload.c (subst_reloads): When adding a REG_LABEL to a + jump instruction, also update JUMP_LABEL. + +2005-10-05 David Edelsohn + + * params.def (PARAM_MAX_GROW_COPY_BB_INSNS): New. + * bb-reorder.c (copy_bb_p): Use it. + * doc/invoke.texi (param table): Add max-grow-copy-bb-insn. + +2005-10-05 Richard Henderson + + PR target/23602 + * toplev.c (process_options): Warn about unsupported combinations + of unwind tables and omit-frame-pointer. + * config/i386/i386.c (override_options): Similarly. Enable + accumulate-outgoing-args if not explicitly disabled. + +2005-10-05 Steve Ellcey + + * vect.md (vec_initv2si): Fix typo of V2SF to V2SI. + Handle big endian vs. small endian. + (vec_initv2sf): Handle big endian vs. small endian. + (*vec_extractv2sf_1): Ditto. + +2005-10-05 Dale Johannesen + + * convert.c (convert_to_real): Don't convert + (float)floor(double d) to floorf((float)d). + +2005-10-05 Daniel Jacobowitz + + * config/arm/arm.md (insv): Use gen_int_mode in more places. + +2005-10-05 Andrew MacLeod + + PR tree-optimization/18587 + * tree-ssa-operands.c (struct opbuild_list_d, OPBUILD_LAST): Delete. + (build_defs, build_uses, build_v_may_defs, build_v_must_defs, + build_vuses): Change to VEC type. + (opbuild_initialize_virtual, opbuild_initialize_real, opbuild_free, + opbuild_num_elems, opbuild_append_real, opbuild_append_virtual, + opbuild_first, opbuild_next, opbuild_elem_real, opbuild_elem_virtual, + opbuild_elem_uid, opbuild_clear, opbuild_remove_elem): Delete. + (get_name_decl): New. Return DECL_UID of base variable. + (operand_build_cmp): New. qsort comparison routine. + (operand_build_sort_virtual): New. Sort virtual build vector. + (init_ssa_operands, fini_ssa_operands): Use VEC routines. + (FINALIZE_OPBUILD_BASE, FINALIZE_OPBUILD_ELEM): Use VEC_Index. + (FINALIZE_BASE): Use get_name_decl. + (finalize_ssa_defs, finalize_ssa_uses, cleanup_v_may_defs, + finalize_ssa_v_may_defs, finalize_ssa_vuses, finalize_ssa_v_must_defs, + (start_ssa_stmt_operands, append_def, append_use, append_vuse, + append_v_may_def, append_v_must_def): Replace opbuild_* routines with + direct VEC_* manipulations. + (build_ssa_operands): Call operand_build_sort_virtual. + (copy_virtual_operand, create_ssa_artficial_load_stmt, + add_call_clobber_ops, add_call_read_ops): Replace opbuild_* routines + with direct VEC_* manipulations. + * tree-ssa-opfinalize.h (FINALIZE_FUNC): Replace opbuild_* routines + with direct VEC manipulations. + +2005-10-05 Paolo Bonzini + + PR tree-optimization/21419 + PR tree-optimization/24146 + PR tree-optimization/24151 + + * c-typeck.c (readonly_error): Handle USE being lv_asm. + (build_asm_expr): Call it if outputs are read-only. + * gimplify.c (gimplify_asm_expr): Remove former fix to PR 21419. + +2005-10-05 Billy Biggs + Paolo Bonzini + + PR target/23809 + + * doc/extend.texi (x86 Built-ins): Document that -msse and friends + enable the instructions and not just the built-ins. + * doc/invoke.texi (x86 Options): Likewise. + +2005-10-04 Geoffrey Keating + + * config/i386/t-darwin (SHLIB_VERPFX): Fix typo. + + * doc/invoke.texi (Option Summary): Correct spelling + of -mmacosx-version-min. + +2005-10-04 Devang Patel + + * c-common.c (vector_types_convertible_p): Check TYPE_PRECISION for + real types. + +2005-10-04 Steve Ellcey + + * tree-vect-transform.c (vect_create_epilog_for_reduction): + Use BYTES_BIG_ENDIAN instead of BITS_BIG_ENDIAN. + +2005-10-04 Adrian Straetling + + * config/s390/s390.md ("TDSI","DP"): New mode macros. + ("TE","tg"): New mode attributes. + ("sync_compare_and_swap"): Replace with a define_expand. + ("sync_compare_and_swap_cc"): Replace GPR with TDSI. + ("*sync_compare_and_swap_cc"): Replace with one pattern for + dword_mode and one for GPRmode. + +2005-10-04 Ian Lance Taylor + + PR preprocessor/13726 + * c-ppoutput.c (cb_include): Add comments parameter, and print out + any comments passed in. + +2005-10-04 Andrew Pinski + + * tree.c (annotate_with_file_line): Fix typo. + +2005-10-04 Ulrich Weigand + + PR ada/19382 + * builtins.c (fold_builtin_memcmp): When constructing the pointer + type used to access data in the inlined length == 1 case, use + build_pointer_type_for_mode with CAN_ALIAS_ALL set to true. + (fold_builtin_strcmp, fold_builtin_strncmp): Likewise. + +2005-10-04 Uros Bizjak + + * config/i386/i386.h (TARGET_FISTTP): Enable also for + TARGET_SSE3 and only for TARGET_80387. + * config/i386/i386.md (fix_trunc_fisttp_i387_1, + (fix_trunc_i387_fisttp, fix_trunc_i387_fisttp_with_temp): + Do not depend on TARGET_80387. + +2005-10-04 Andrew Pinski + + * tree.c (last_annotated_node): Change type to location_t*. + (annotate_with_file_line): Reflect the change of + last_annotated_node type. + +2005-10-04 Richard Guenther + + PR c/23576 + * c-decl.c (grokdeclarator): Don't write to fields + of error_mark_node. + +2005-10-04 Andrew Pinski + + PR middle-end/23125 + * c-decl.c (finish_decl): Use set_user_assembler_name even for + register variables. + * varasm.c (make_decl_rtl): If a register variable does not + have a set user assmbler name, error out. + Decode the asmspec is now name+1 bypassing '*'. + +2005-10-04 Steven Bosscher + + PR tree-optimization/23049 + * tree-ssa-dom.c (thread_across_edge): Make sure that the condition + of a COND_EXPR is folded before calling fold on the whole rhs of a + conditional assignment. + * doc/tree-ssa.texi: Update the GIMPLE grammar for a valid rhs to + document that a COND_EXPR may appear there. + +2005-10-03 Diego Novillo + + PR 23445 + * tree-vrp.c (extract_range_from_assert): If the new numeric + range created out of the assertion contradicts the existing + numeric range of the ASSERT_EXPR variable, make the new range + varying. + +2005-10-03 Kaz Kojima + + * config/sh/sh.c (sh_register_move_cost): Add case for moving + from T_REGS to FP register class. + +2005-10-03 Richard Henderson + + PR 24135 + * tree-nested.c (convert_nl_goto_reference): Lookup a translation + before creating a new one. + +2005-10-03 David Edelsohn + + * config/rs6000/t-aix43 (LDFLAGS): New. + * config/rs6000/t-aix52 (LDFLAGS): New. + +2005-10-03 Ian Lance Taylor + + * gimplify.c (find_single_pointer_decl_1): New static function. + (find_single_pointer_decl): New static function. + (internal_get_tmp_var): For a formal variable, set restrict base + information if appropriate. + * alias.c (find_base_decl): If a VAR_DECL has a restrict base, + return it. + * tree.h (DECL_BASED_ON_RESTRICT_P): Define. + (DECL_GET_RESTRICT_BASE): Define. + (SET_DECL_RESTRICT_BASE): Define. + (decl_restrict_base_lookup): Declare. + (decl_restrict_base_insert): Declare. + (struct tree_decl_with_vis): Add based_on_restrict_p field. + * tree.c (restrict_base_for_decl): New static variable. + (init_ttree): Initialize restrict_base_for_decl. + (copy_node_stat): Copy restrict base information. + (decl_restrict_base_lookup): New function. + (decl_restrict_base_insert): New function. + (print_restrict_base_statistics): New static function. + (dump_tree_statistics): Call print_restrict_base_statistics. + +2005-10-02 Diego Novillo + + PR 24142 + * tree-vrp.c (vrp_meet): Fix call to range_includes_zero_p in + case of anti-ranges. + +2005-10-02 Andrew Pinski + + PR c/18851 + * c-typeck.c (tagged_tu_seen): Rename to ... + (tagged_tu_seen_cache): this and add val field. + (comptypes): Move functional to comptypes_internal + and free tagged_tu_seen. + (comptypes_internal): New function and call comptypes_internal + instead of comptypes. Speed up by sibcalling + tagged_types_tu_compatible_p. + (alloc_tagged_tu_seen): New function + (free_all_tagged_tu_seen_up_to): New function. + (tagged_types_tu_compatible_p): Return the val of the seen two + types. + Add that the two types are the same to tagged_tu_seen_base + if they are and call comptypes_internal instead of comptypes. + : Speed up common type where the fields are + in the same order. + (function_types_compatible_p): Call comptypes_internal instead of + comptypes. + (type_lists_compatible_p): Likewise. + (all functions): s/tagged_tu_seen/tagged_tu_seen_cache/. + +2005-10-02 Matthias Klose + + * doc/invoke.texi: Fix typo and speling error. + +2005-10-01 Richard Henderson + + * tree-stdarg.c (execute_optimize_stdarg): Process PHI nodes too. + +2005-10-01 Mark Mitchell + + * config/arm/unknown-elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define + using --start-group and --end-group. + +2005-10-01 Diego Novillo + + * tree-vrp.c (value_inside_range, range_includes_zero_p): Add + FIXME note regarding quirky semantics. + +2005-10-01 Diego Novillo + + PR 24141 + * tree-vrp.c (vrp_meet): Clear VR0->EQUIV when building a + non-null range as a last resort. + +2005-10-01 James A. Morrison + Diego Novillo + + PR 23604 + * tree-vrp.c (extract_range_from_assert): For != + assertions, only build an anti-range if LIMIT is a + single-valued range. + +2005-09-30 Richard Earnshaw + + * arm.md (movqi): On thumb when optimizing, handle loading from + memory by describing this as taking a subreg of a zero-extended load + into an SImode register. + (movhi): Likewise. + +2005-09-30 Daniel Jacobowitz + + * reload1.c (merge_assigned_reloads): Do not change any + RELOAD_FOR_OUTPUT_ADDRESS reloads. + +2005-09-30 Geoffrey Keating + + * Makefile.in (LIPO_FOR_TARGET): Define. + (STRIP_FOR_TARGET): Define. + + * config/t-slibgcc-darwin (libgcc_s_%.dylib): Remove old symlinks + before creating new ones. Do symlinks before creating the actual + targets. + + * config/t-slibgcc-darwin (libgcc_s_%.dylib): Use --print-multi-lib + to work out which multilibs are actually being built. + +2005-09-30 Kazu Hirata + + * tree-vect-transform.c, config/ms1/ms1.md, + config/s390/s390.c, config/v850/v850.md: Fix comment typos. + Follow spelling conventions. + * doc/invoke.texi, doc/md.texi: Fix typos. + +2005-09-30 Andrew Macleod + + PR tree-optimization/21430 + * tree-ssa-operands.c (set_virtual_use_link): New. Link new virtual + use operands, and set stmt pointer if need be. + (FINALIZE_CORRECT_USE: New. Macro to call appropriate use fixup routine. + tree-ssa-opfinalize.h (FINALIZE_FUNC): Call FINALIZE_CORRECT_USE if + present. + +2005-09-29 Richard Kenner + + PR middle-end/24053 + * stor-layout.c (set_sizetype): Set TYPE_MAIN_VARIANT of bitsizetype. + +2005-09-29 Mark Mitchell + + * optabs.c (expand_binop): Initialize first_pass_p. + +2005-09-29 Jakub Jelinek + + PR middle-end/24109 + * c-decl.c (c_write_global_declarations_1): If any + wrapup_global_declaration_2 call returned true, restart the loop. + +2005-09-29 Daniel Berlin + + Fix PR tree-optimization/24117 + * tree-ssa-structalias.c (find_func_aliases): Strip nops + before considering whether to use anyoffset. + +2005-09-29 Paolo Bonzini + + Revert this patch: + + 2005-09-15 Paolo Bonzini + + * optabs.c (expand_binop): Use swap_commutative_operands_with_target + to order operands. + (swap_commutative_operands_with_target): New. + +2005-09-29 Paolo Bonzini + + PR c/21419 + * gimplify.c (gimplify_asm_expr): Raise an error if an output is + read-only. + +2005-09-29 Steven Bosscher + + PR tree-optimization/23911 + * tree-ssa-ccp.c (fold_const_aggregate_ref): Handle REALPART_EXPR + and IMAGPART_EXPR too. + +2005-09-28 Mark Mitchell + + PR 17886 + * expmed.c (expand_shift): Move logic to reverse rotation + direction when rotating by constants ... + * optabs.c (expand_binop): ... here. + * config/i386/i386.md (rotrdi3): Handle 32-bit mode. + (ix86_rotrdi3): New pattern. + (rotldi3): Handle 32-bit mode. + (ix86_rotldi3): New pattern. + +2005-09-29 Alan Modra + + PR target/24102 + * config/rs6000/rs6000.md (floatdisf2_internal2): Correct range + check for numbers that need no bit twiddle. + +2005-09-28 Geoffrey Keating + + * config/rs6000/t-darwin8: Uncomment contents, allow -m64 + multilib to be built. + + * Makefile.in: Export LIPO_FOR_TARGET, STRIP_FOR_TARGET. + (stage1-start): Delete old libgcc and libunwind before moving + anything into the stage directory. + (stage2-start): Likewise. + (stage3-start): Likewise. + (stage4-start): Likewise. + (stageprofile-start): Likewise. + (stagefeedback-start): Likewise. + * config.gcc (*-*-darwin*): Automatically use CPU-specific darwin.h + header in tm_file and CPU-specific t-darwin in tmake_file. + (i[34567]86-*-darwin*): Don't change tm_file. + (powerpc-*-darwin*): Don't change tm_file or tmake_file. + * config/darwin.h (REAL_LIBGCC_SPEC): Rewrite to use proper libgcc + shared library stub for target OS version. + * config/t-slibgcc-darwin (SHLIB_SOLINK): Delete. + (SHLIB_LINK): Don't make SHLIB_SOLINK. + (SHLIB_INSTALL): Don't install SHLIB_SOLINK. + (libgcc_s.%.dylib): New. + (LIBGCC): Define. + (install-darwin-libgcc-stubs): New. + (INSTALL_LIBGCC): New append. + * config/i386/darwin-libgcc.10.4.ver: New. + * config/i386/darwin-libgcc.10.5.ver: New. + * config/i386/t-darwin: New. + * config/rs6000/darwin-libgcc.10.4.ver: New. + * config/rs6000/darwin-libgcc.10.5.ver: New. + * config/rs6000/darwin.h (REAL_LIBGCC_SPEC): Delete. + * config/rs6000/t-darwin (SHLIB_VERPFX): Define. + +2005-09-28 Paul Brook + + * config/m68k/fpgnulib.c (__extendsfdf2, __truncdfsf2): Handle + denormals. + +2005-09-28 Richard Guenther + + PR tree-optimization/23853 + * tree-vect-analyze.c (vect_compute_data_ref_alignment): Use + host_integerp to verify misalignment value. + +2005-09-28 Richard Henderson + + * builtins.c (get_builtin_sync_mode): New. + (expand_builtin_sync_operation): Pass in mode argument. + (expand_builtin_compare_and_swap): Likewise. + (expand_builtin_lock_test_and_set): Likewise. + (expand_builtin_lock_release): Likewise. + (expand_builtin): Update to match. + +2005-09-28 Nick Clifton + + * config/v850/v850.h (GO_IF_LEGITIMATE_ADDRESS): Tidy up + formatting. Add check to PLUS case to ensure that the offset is + within an acceptable range. + + * config/v850/v850.md (casesi): Disable the generation of the + switch pattern as it is not being handled properly at the moment. + + * config/v850/lib1funcs.asm (___ucmpdi2): Correct jump instruction + for when the high words are identical. + +2005-09-27 Richard Henderson + + * pretty-print.c (pp_base_format): Fix typo for %>. + +2005-09-27 Daniel Berlin + Devang Patel + + PR tree-optimization/23625 + * tree-flow-inline.h (bsi_after_labels): Remove, first statement is + LABEL_EXPR, assertion check. + +2005-09-27 J"orn Rennecke + + * optabs.c (no_conflict_move_test): Check if a result of a + to-be-moved insn would be clobbered by an originally + preceding insn. + +2005-09-27 Jeff Law + + * passes.c (init_optimization_passes): Replace copy propagation + passes immediately after DOM with phi-only copy propagation + pases. Add phi-only copy propagation pass after first DOM pass. + * tree-pass.h (pass_phi_only_copy_prop): Declare. + * tree-ssa-copy.c (init_copy_prop): Accept new PHI_ONLY argument. + If true, then mark all non-control statements with DONT_SIMULATE_AGAIN. + (execute_copy_prop): Accept new PHI_ONLY argument. Pass it along + to init_copy_prop. Callers updated. + (do_phi_only_copy_prop): New function. + (pass_phi_only_copy_prop): New pass descriptor. + +2005-09-27 Nick Clifton + + * libgcc2.c (__popcount_tab): Remove redundant prototype. + +2005-09-26 Jason Merrill + + PR c++/13764 + * c-common.c (finish_fname_decls): Use append_to_statement_list_force. + + * doc/invoke.texi: Clarify documentation of -fno-enforce-eh-specs. + +2005-09-26 James E Wilson + + * config/ia64/crtbegin.asm, config/ia64/crtend.asm: Remove glibc + copyright. Add gcc copyright plus libgcc exception. + * config/ia64/crtfastmath.asm: Remove glibc copyright. Add gcc + copyright. + * config/ia64/lib1funcs.asm: Add gcc copyright plus libgcc exception. + +2005-09-26 Jeff Law + + * tree-ssa-dom.c (tree_ssa_dominator_optimize): Be more selective + about when to iterate. + +2005-09-23 Fariborz Jahanian + + PR target/23847 + * config/rs6000/rs6000.c (rs6000_function_value): Parallel pattern + for __complex__ double in -mcpu=G5 mode. + +2005-09-26 Sebastian Pop + + PR tree-optimization/23942 + * Makefile.in (SCEV_H): Depends on PARAMS_H. + * tree-scalar-evolution.c: Include params.h. + (t_bool): New enum. + (follow_ssa_edge, follow_ssa_edge_in_rhs, + follow_ssa_edge_in_condition_phi_branch, + follow_ssa_edge_in_condition_phi, follow_ssa_edge_inner_loop_phi): + Change return type to t_bool. Use a parameter to limit the size of + trees that are walked before stopping + (analyze_evolution_in_loop): Initialize the limit to 0. + (follow_ssa_edge): Give up by returning t_dont_know if the limit + exceeds PARAM_SCEV_MAX_EXPR_SIZE. + +2005-09-26 Uros Bizjak + + PR middle-end/23831 + * simplify-rtx.c (simplify_immed_subreg) [MODE_INT]: Skip + simplification if elem_bitsize > 2 * HOST_BITS_PER_WIDE_INT. + +2005-09-26 Fariborz Jahanian + + * combine.c (make_extraction): Check for valid use of subreg. + +2005-09-26 Uros Bizjak + + PR target/24055 + * config/i386/i386.md ("*fistdi2_1"): New pattern. + ("*fist2_1"): Use only HImode and SImode register operands. + ("fist2_with_temp"): Use only register operands. + +2005-09-26 J"orn Rennecke + + * rtlanal.c (reg_used_between_p): Don't check for CLOBBERs in + CALL_INSN_FUNCTION_USAGE. + +2005-09-26 Richard Guenther + + PR middle-end/15855 + * gcse.c: Include hashtab.h, define ldst entry hashtable. + (pre_ldst_expr_hash, pre_ldst_expr_eq): New functions. + (ldst_entry): Use the hashtable instead of list-walking. + (find_rtx_in_ldst): Likewise. + (free_ldst_entry): Free the hashtable. + (compute_ld_motion_mems): Create the hashtable. + (trim_ld_motion_mems): Remove entry from hashtable if + removing it from list. + (compute_store_table): Likewise^2. + (store_motion): Free hashtable in case we did not see + any stores. + +2005-09-25 Kazu Hirata + + * fold-const.c (fold_binary): Use op0 and op1 instead of arg0 + and arg1 if we are passing them to fold_build2. + +2005-09-25 Dan Nicolaescu + + PR 23828 + * config/i386/i386.c (ix86_function_regparm): Fix the test for + a nested function. + +2005-09-25 Richard Henderson + + * config/alpha/alpha.c (tls_symbolic_operand_1): Trust + SYMBOL_REF_TLS_MODEL to be correct. + +2005-09-24 Richard Henderson + + * ipa-type-escape.c (discover_unique_type): Remove dead code at + end of function. Reindent. + +2005-09-24 Ian Lance Taylor + + * convert.c (convert_to_integer): Don't test for ENUMERAL_TYPE in + NEGATE_EXPR/BIT_NOT_EXPR case. + +2005-09-24 Richard Henderson + + * c-common.c (handle_mode_attribute): When not modifying in place, + create subtypes for enumerations. + (sync_resolve_return): Use TYPE_MAIN_VARIANT. + * gimplify.c (create_tmp_from_val): Likewise. + +2005-09-24 Alexandre Oliva + + * config/i386/i386.md (*tls_global_dynamic_64, + *tls_local_dynamic_base_64): Add missing mode to call. + (tls_global_dynamic_64, tls_local_dynamic_base_64): Likewise. + +2005-09-24 Jan Hubicka + + * cgraph.c (cgraph_clone_edge): Make the scale gcov_type. + (cgraph_clone_node): Likewise. + * cgraph.h (cgraph_clone_edge): Update prototype. + (cgraph_mark_inline_edge, cgraph_clone_inlined_nodes): Remove + duplicated prototypes; add updating argument. + * cgraphunit.c (verify_cgraph_node): Verify that counts are non-negative. + * ipa-inline.c (cgraph_clone_inlined_nodes): Allow clonning without + updating profile. + (cgraph_mark_inline_edge): Likewise. + (cgraph_mark_inline): Update use of cgraph_mark_inline_edge. + (cgraph_flatten_node): Likewise. + (cgraph_decide_recursive_inlining): Likewise. + (cgraph_decide_inlining_of_small_function): Likewise. + * tree-optimize.c (tree_rest_of_compilation): Likewise. + +2005-09-23 David Edelsohn + Pete Steinmetz + + * config/rs6000/rs6000.md (neg-minus-mult): Set type to dmul. + (rldic.): Set type to "compare". + (rldicr.): Same. + (movsf_hardfloat): Set type to mtjmpr for MTCTR/MTLR. Set type to + mfjmpr for MFCTR/MFLR. + (movdf_hardfloat64): Same. + (movdf_softfloat64): Same. Correct order of store and move types. + (movti_string): Set type to store_ux/load_ux. + (load_multiple): Set type to load_ux. + (store_multiple): Set type to store_ux. + (movmemsi): Set type to store_ux. + (output_cbranch direct_return): Set type to jmpreg. + (stmw): Set type to store_ux. + (lmw): Set type to load_ux. + * config/rs6000/40x.md (ppc403-store): Increase latency to 2. + * config/rs6000/440.md (ppc440-store): Increase latency to 6. + * config/rs6000/603.md (ppc603-store): Occupy LSU for 2 cycles. + * config/rs6000/6xx.md (ppc604-store): Increase latency to 3. + * config/rs6000/mpc.md (mpccore-store): Increase latency to 2. + * config/rs6000/rios1.md (rios1-store): Increase latency to 2. + (rios1-fpstore): Increase latency to 3. + * config/rs6000/rios2.md (rios2-store): Increase latency to 2. + * config/rs6000/rs64.md (rs64a-store): Increase latency to 2. + +2005-09-23 David Edelsohn + Andrew Pinski + + * config/rs6000/sync.md (sync_si_internal): Change + operand2 constraint to "b". + (sync_di_internal): Same. + (sync_old_si_internal): Change operand3 constraint + to "b". + (sync_old_di_internal): Same. + (sync_new_si_internal): Same. + (sync_new_di_internal): Same. + +2005-09-23 J"orn Rennecke + + PR middle-end/23991 + * final.c (insn_default_length, insn_min_length): In !HAVE_ATTR_length + case, define as macros. + + PR rtl-optimization/23837 + * optabs.c (no_conflict_move_test): Don't set must_stay for a + clobber / clobber match between dest and p->first. + + * optabs.c (emit_libcall_block): Use no_conflict_move_test. + (no_conflict_move_test): Update comments. + +2005-09-22 Ranjit Mathew + + * doc/install.texi: Update URL for Jacks. + * doc/sourcebuild.texi: Likewise. + +2005-09-22 David Edelsohn + + PR target/24007 + * config/rs6000/rs6000.md (movsf_hardfloat): Ignore special + registers when choosing register preferences. + (movdf_hardfloat64): Same. + +2005-09-22 Andreas Krebbel + + * expmed.c (expand_shift): Don't use the target of the rotate as + target for the first expanded shift insn. + * testsuite/gcc.dg/20050922-1.c: Testcase added. + +2005-09-21 Zdenek Dvorak + + PR tree-optimization/22438 + * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Handle all + preserved iv rhs rewriting specially. + +2005-09-21 Daniel Berlin + + * tree-data-ref.c (analyze_array_indexes): Only estimate when + estimate_only is true. + * tree-flow.h (ref_contains_indirect_ref): New prototype. + * tree-flow-inline.h (ref_contains_indirect_ref): Moved from + tree-ssa-structalias.c + * tree-ssa-loop-niter.c (infer_loop_bounds_from_undefined): Use + ref_contains_indirect_ref. + * tree-ssa-structalias.c (ref_contains_indirect_ref): Moved. + +2005-09-21 DJ Delorie + + * config/mn10300/mn10300.c (TARGET_DEFAULT_TARGET_FLAGS): Add + MASK_PTR_A0D0. + (mn10300_return_in_memory): Support variable size types also. + (mn10300_pass_by_reference): Likewise. + (mn10300_function_value): New. + * config/mn10300/mn10300.h (FUNCTION_VALUE): Call the above. + (FUNCTION_OUTGOING_VALUE): Likewise. + * config/mn10300/mn10300.opt: Add -mreturn-pointer-on-d0. + * doc/invoke.texi: Document it. + +2005-09-21 Uros Bizjak + + PR target/22585 + * config/i386/i386.c (ix86_prepare_fp_compare_args): Do not + force integer op1 into register for XFmode compares. + +2005-09-21 Kazu Hirata + + PR middle-end/23971 + * expmed.c (alg_code): Add alg_impossible. + (alg_hash_entry): Add cost. + (synth_mult): Record alg_impossible in the hash table if + multiplication by a given integer is impossble within the + limit. Speed up using alg_impossible. + +2005-09-20 Daniel Berlin + + * tree-ssa-structalias.c (get_constraint_for_component_ref): Add + argument. Allow and set any offset if needs_anyoffset is passed + in. + (get_constraint_for): Add argument here too. + Pass it down. + (do_structure_copy): Pass NULL to get_constraint_for. + (handle_ptr_arith): Ditto. + (find_func_aliases): Ditto. + +2005-09-20 J"orn Rennecke + + PR rtl-optimization/23898 + * output.h (get_attr_min_length): Declare. + * final.c (get_attr_length_1): New function, broken out of: + (get_attr_length). + (get_attr_min_length): New function. + * bb-reorder.c (copy_bb_p, get_uncond_jump_length): Use it. + (duplicate_computed_gotos): Likewise. + * genattr.c (insn_min_length): Generate declaration. + * genattrtab.c (min_fn, min_attr_value): New functions. + (make_length_attrs): Generate insn_min_length. + +2005-09-20 Steve Ellcey + + * config/pa/pa.c (output_cbranch): Check for zero in operands[2]. + +2005-09-20 Richard Henderson + + PR tree-optimization/24059 + * expr.c (expand_expr_real_1) : Allow modifier + EXPAND_STACK_PARM. + +2005-09-20 Joseph S. Myers + + * c.opt (fextended-identifiers): New. + * c-opts.c (c_common_handle_option): Handle + -fextended-identifiers. + * doc/cpp.texi: Update documentation of extended identifiers. + * doc/cppopts.texi (-fextended-identifiers): Document. + +2005-09-20 Jakub Jelinek + + PR tree-optimization/23929 + * tree-ssa-loop-niter.c (expand_simple_operations): Return immediately + if expr is NULL. + + PR tree-optimization/23818 + * tree-stdarg.c (execute_optimize_stdarg): Call + calculate_dominance_info. + +2005-09-20 Daniel Berlin + + * tree-data-ref.c (get_number_of_iters_for_loop): New function. + (analyze_siv_subscript_cst_affine): Add weak SIV test. + (compute_overlap_steps_for_affine_1_2): Use + get_number_of_iters_for_loop. + (analyze_subscript_affine_affine): Check whether difference is + zero first. + Use get_number_of_iters_for_loop. + Check whether overlap occurs outside of bounds. + (analyze_miv_subscript): Use get_number_of_iters_for_loop. + +2005-09-20 Andreas Krebbel + + * tree-ssa-address.c (create_mem_ref): Put the symbol reference into the + base register if possible. + +2005-09-20 Zdenek Dvorak + + PR tree-optimization/18463 + * tree-chrec.c (chrec_convert): Return fold_converted chrec if + converting it directly is not possible. + (chrec_convert_aggressive): New function. + * tree-chrec.h (chrec_convert_aggressive): Declare. + * tree-scalar-evolution.c (instantiate_parameters_1, resolve_mixers): + Fold chrec conversions aggressively if asked to. + (instantiate_parameters): Modified because of changes in + instantiate_parameters_1. + +2005-09-19 Richard Henderson + + * config/i386/sse.md (reduc_splus_v4sf): Rename from reduc_plus_v4sf. + (reduc_splus_v2df): New. + +2005-09-19 Richard Sandiford + + * config/arm/aof.h (REGISTER_NAMES): Add missing backslash. + (ADDITIONAL_REGISTER_NAMES): Add missing comma. Remove final comma. + +2005-09-19 Richard Henderson + + * config/i386/sse.md (vcondu): Rename from + vcondu. + +2005-09-19 Richard Henderson + + * config/ia64/ia64.c (ia64_expand_widen_sum): New. + (ia64_expand_dot_prod_v8qi): New. + * config/ia64/ia64-protos.h: Update. + * config/ia64/vect.md (pmpy2_r, pmpy2_l, widen_usumv8qi3, + widen_usumv4hi3, widen_ssumv8qi3, widen_ssumv4hi3, udot_prodv8qi, + sdot_prodv8qi, sdot_prodv4hi): New. + (reduc_splus_v2sf): Rename from reduc_plus_v2sf. + +2005-09-19 Richard Henderson + + PR 23941 + * real.c (exact_real_truncate): Return false if the format cannot + represent the number as a normal. + + * config/alpha/alpha.c (alpha_rtx_costs) : Cost 0 + for a memory source. + +2005-09-19 Dorit Nuzman + + * tree-ssa-operands.c (swap_tree_operands): Export. + * tree.h (swap_tree_operands): Declare. + * tree-vectorizer.c (vect_is_simple_reduction): Remove ATTRIBUTE_UNUSED. + Call swap_tree_operands. + +2005-09-19 Richard Henderson + + * tree-flow.h (merge_alias_info): Declare. + * tree-ssa-copy.c (merge_alias_info): Export. + * tree-vect-transform.c (vect_create_index_for_vector_ref): Remove. + (vect_create_data_ref_ptr): Use create_iv directly. + (vectorizable_load): Use correct types for integer constants. + (vect_generate_tmps_on_preheader): Likewise. + (vect_gen_niters_for_prolog_loop): Likewise. + +2005-09-19 Steven Bosscher + + PR rtl-optimization/23943 + * cse.c (find_best_addr): Never propagate an EXPR_LIST rtx. + +2005-09-18 Jan Hubicka + + * calls.c (flags_from_decl_or_type): Do not set ECF_LIBCALL_BLOCK. + +2005-09-18 Eric Botcazou + + * varasm.c (output_constant): Do not abort on conversions to union + types between different sizes. + +2005-09-18 Richard Guenther + + PR middle-end/23944 + * gimplify.c (fold_indirect_ref_rhs): Fix thinko in + fallback. + +2005-09-18 Paul Brook + + * config/m68k/fpgnuib.c (__floatsidf): Don't rely on signed overflow. + +2005-09-17 Richard Henderson + + * tree-pass.h, tree-flow.h, tree-ssa-dce.c: Revert last change. + * tree-ssa-loop.c (pass_vect_dce): Remove. + * passes.c (init_optimization_passes): Add pass_dce as a sub-pass + of pass_vectorize. + +2005-09-17 Richard Henderson + + * tree-pass.h (pass_vect_dce): Declare. + * passes.c (init_optimization_passes): Add it. + * tree-flow.h (tree_ssa_dce): Declare. + * tree-ssa-dce.c (tree_ssa_dce): Export. + * tree-ssa-loop.c (tree_vectorize): Move current_loops check ... + (gate_tree_vectorize): ... here. + (pass_vect_dce): New. + +2005-09-17 Jan Hubicka + + * except.c (struct eh_status): Turn region_array into vec. + (expand_resx_expr, collect_eh_region_array, remove_unreachable_regions, + convert_from_eh_region_ranges, find_exception_handler_labels, + current_function_has_exception_handlers, assign_filter_values, + build_post_landing_pads, dw2_build_landing_pads, + sjlj_find_directly_reachable_regions, sjlj_mark_call_sites, + sjlj_emit_dispatch_table, remove_eh_handler, for_each_eh_region, + foreach_reachable_handler, can_throw_internal_1, + convert_to_eh_region_ranges, verify_eh_tree): Update uses of + region_array. + (duplicate_eh_region_1): Update region_array. + (duplicate_eh_regions): Resize region_array and avoid recomputing. + +2005-09-17 David Edelsohn + + PR middle-end/22067 + * expmed.c (expand_mult): Substitute simple register for op0 when + computing max_cost. + +2005-09-17 Richard Henderson + + * expr.c (emit_move_via_integer): Add force argument, pass it on + to emit_move_change_mode. Update callers. + (emit_move_complex): Pass true to new force argument. + * function.c (expand_function_end): Move expand_eh_return call + earlier. Merge sub-word complex values into a pseudo before + copying to the return hard register. + +2005-09-17 Eric Botcazou + + * varasm.c (output_constant): Do not abort on VIEW_CONVERT_EXPRs + between different sizes. + +2005-09-16 Paolo Bonzini + + PR 23903 + + * passes.c (init_optimization_passes): Register dump files for + IPA passes first. + +2005-09-16 Andreas Krebbel + + * config/s390/s390-protos.h (s390_overlap_p): Prototype added. + * config/s390/s390.c (s390_overlap_p): New function. + * config/s390/s390.md ("*mvc" peephole2, "*nc" peephole2, "*oc" + peephole2, "*xc" peephole2): Added overlap check to the peephole2 + condition. + +2005-09-16 Richard Guenther + + * ipa-pure-const.c (static_execute): Free auxiliar information. + * ipa-type-escape.c (discover_unique_type): Free temporary key. + * tree-vrp.c (remove_range_assertions): Free blocks_visited sbitmap. + +2005-09-15 DJ Delorie + + * config/m32c/m32c-lib1.S (__m32c_eh_return): Fix typo. + +2005-09-15 Paolo Bonzini + + * optabs.c (expand_binop): Use swap_commutative_operands_with_target + to order operands. + (swap_commutative_operands_with_target): New. + +2005-09-15 Daniel Berlin + + * tree-data-ref.c (analyze_array_indexes): Add estimate_only + parameter. + Update callers. + (estimate_iters_using_array): New function. + * tree-data-ref.h (estimate_iters_using_array): Prototype + * tree-ssa-loop-niter.c (infer_loop_bounds_from_undefined): + Use estimate_iters_using_array instead of analyze_array. + +2005-09-15 Eric Botcazou + + * tree-nested.c (get_frame_type): Mark the "non-local frame structure" + as addressable. + +2005-09-15 Michael Matz + + * tree-vrp.c (vrp_int_const_binop ): Handle 0 - -INF. + +2005-09-14 Daniel Berlin + + PR tree-optimization/23835 + * tree-ssa-alias.c (sort_pointers_by_pt_vars): New function. + (create_name_tags): Rewrite to be not O(num_ssa_names^2). + +2005-09-14 Richard Henderson + + * config/ia64/vect.md (addv2sf3, subv2sf3): Rewrite as expand. + (addv2sf3_1, addv2sf3_2, subv2sf3_1, subv2sf3_2): New. + +2005-09-14 Andrew Pinski + + * config/i386/i386.c (contains_128bit_aligned_vector_p): Add break + in the ARRAY_TYPE case. + +2005-09-14 Eric Botcazou + + * tree.c (substitute_in_expr, case 4): New case, for ARRAY_REF. + +2005-09-14 Uros Bizjak + + PR middle-end/22480 + * tree-vect-transform.c (vectorizable_operation): Return false for + scalar shift operations and for vector shift operations with + non-invariant shift arguments. Use scalar tree operand op1 as + a shift operand when vector shift insn pattern uses scalar shift + operand. + * Makefile.in (tree-vect-transform.o): Depend on recog.h. + +2005-09-14 Olivier Hainque + + * gimplify.c (gimplify_init_ctor_eval): Don't discard a zero-sized + value if it has side-effects. + +2005-09-14 David Edelsohn + + PR target/22068 + * config/rs6000/rs6000.md (muldi3): Add mulli alternative. + +2005-09-14 Alan Modra + + * config/rs6000/linux64.h (DBX_OUTPUT_BRAC): Treat function name + passed as NAME as if it were label at start of function code. + +2005-09-13 Kaz Kojima + + * config/sh/sh.md (*movv4sf_i): Add general register cases to + the constraints. + +2005-09-13 Andrew Pinski + + * config/rs6000/darwin.md (movdf_low_si): Mark the outgoing r constraint + as early clobber. Rewrite so the PIC register is not implicitly used. + +2005-09-13 Volker Reichelt + + * tree.c (annotate_with_file_line): Compare line numbers before + file names. + +2005-09-13 Uros Bizjak + + PR target/23816 + * config/i386/sse.md (*ieee_sminv4sf3, *ieee_smaxv4sf3) + (*ieee_sminv2df3, *ieee_smaxv2df3): New insn patterns. + +2005-09-13 Ian Lance Taylor + + * loop-doloop.c (doloop_modify): Use GEN_INT to pass an rtx rather + than a HOST_WIDEST_INT to gen_doloop_begin. + +2005-09-13 Diego Novillo + + * tree-dfa.c (dump_variable): Guard against NULL annotations. + +2005-09-13 Zdenek Dvorak + + PR tree-optimize/23817 + * tree-cfg.c (tree_merge_blocks): Preserve loop closed ssa. + +2005-09-13 Alan Modra + + PR target/23774 + * config/rs6000/rs6000.md (restore_stack_block): Write the backchain + word before changing the stack pointer. Use gen_frame_mem for MEMs. + Use UNSPEC_TIE to prevent insn scheduling reordering the insns. + (restore_stack_nonlocal): Likewise. + (save_stack_nonlocal): Use template to emit insns, and gen_frame_mem. + +2005-09-12 Ian Lance Taylor + + PR g++/7874 + * c.opt (ffriend-injection): New C++ option. + * doc/invoke.texi (Option Summary): Mention -ffriend-injection. + (C++ Dialect Options): Document -ffriend-injection. + +2005-09-12 Josh Conner + + PR middle-end/23237 + * ipa-reference.c (static_execute): Don't mark variables in + named sections TREE_READONLY. + +2005-09-12 Alan Modra + + * config/rs6000/rs6000.c (get_next_active_insn): Simplify test for + stack_tie. + +2005-09-12 Andrew Pinski + + * tree-ssa-dse.c (dse_optimize_stmt): Fix up all of V_MAY_DEF and + V_MUST_DEF instead of just the first_use_p. + Don't mark the virtual variables for renaming on the statement which + is being removed. + (pass_dse): Remove TODO_update_ssa. + +2005-09-12 J"orn Rennecke + + PR middle-end/23290 + * stor-layout.c (compute_record_mode): For records with a single + field, actually check the field's mode size against the type size. + + * sh.h (HARD_REGNO_MODE_OK): Allow V4SFmode in general purpose + registers for TARGET_SHMEDIA. + (enum reg_class, REG_CLASS_NAMES, REG_CLASS_CONTENTS): Rename + GENERAL_FP_REGS to GENERAL_DF_REGS. Add GENERAL_FP_REGS as union + of GENERAL_REGS and FP_REGS. + +2005-09-12 Bernd Schmidt + + * config/bfin/bfin.c (legimitize_pic_address): Use gen_const_mem. + +2005-09-12 Alan Modra + + * config/rs6000/rs6000.c (get_next_active_insn): Rewrite using + CALL_P, JUMP_P and NONJUMP_INSN_P, so that barriers and labels + are omitted. Exclude stack_tie insn too. + +2005-09-11 David Edelsohn + + PR rtl-optimization/23098 + * config/rs6000/predicates.md (easy_fp_constant): SFmode constant + 0.0f is easy. + * config/rs6000/rs6000.md (movdf splitter): Use + const_double_operand predicate for TARGET_POWERPC64. + * config/rs6000/rs6000.c (rs6000_legitimize_reload_address): Expand + SYMBOL_REF method to ABI_V4. + + * config/rs6000/altivec.md (build_vector_mask_for_load): Use + replace_equiv_address. + * config/rs6000/rs6000.c (rs6000_emit_eh_reg_restore): Mark MEM as + rs6000_sr_alias_set and MEM_NOTRAP. + (rs6000_aix_emit_builtin_unwind_init): Use gen_frame_mem(). + +2005-09-11 Eric Botcazou + + * tree.c (contains_placeholder_p) : Properly + handle CALL_EXPR again. + +2005-09-11 Richard Earnshaw + + * arm/predicates.md (alignable_memory_operand): Delete. + +2005-09-10 Richard Henderson + + PR debug/23806 + * dbxout.c (dbxout_expand_expr): New. + (dbxout_symbol): Use it. + +2005-09-10 Richard Earnshaw + + * arm.c (arm_gen_rotated_half_load): Delete. + (vfp_emit_fstmx, arm_set_return_address): Use gen_frame_mem. + (emit_multi_reg_push, emit_sfm, arm_expand_prologue) + (thumb_set_return_address): Likewise. + (thumb_load_double_from_address): Use adjust_address. + * arm.md (splits calling arm_gen_rotated_half_load): Delete. + (extendhsisi2_mem, movhi_bytes): Use change_address. + (movhi): Use widen_memory_access. + (reload_out_df): Use replace_equiv_address. + * arm-protos.h (arm_gen_rotated_half_load): Delete prototype. + +2005-09-09 Richard Henderson + + PR debug/20998 + * dbxout.c: Include expr.h. + (dbxout_global_decl): Don't suppress for DECL_RTL unset. + (dbxout_symbol): Handle DECL_VALUE_EXPR. + * Makefile.in (dbxout.o): Add EXPR_H. + +2005-09-09 Zdenek Dvorak + + PR tree-optimization/23509 + * tree-cfg.c (replace_uses_by): Use replace_exp. + * tree-ssa-loop-ivopts.c (get_ref_tag): Assert that dereferenced + pointers have name_mem_tag or type_mem_tag set. + +2005-09-09 Sebastian Pop + + * tree-chrec.c (evolution_function_is_invariant_rec_p): Use + CHREC_LEFT and CHREC_RIGHT for accessing chrec components instead + of wrongly accessing operands. + +2005-09-09 Sebastian Pop + + * Makefile.in (tree-chrec.o): Depends on SCEV_H. + * tree-chrec.c: Include tree-scalar-evolution.h. + (chrec_convert): Instantiate the base and step before calling + scev_probably_wraps_p that would fail on parametric evolutions. + Collect all the fails into a single section failed_to_convert, + print a diagnostic, and return chrec_dont_know instead of calling + fold_convert. + * tree-scalar-evolution.c (loop_closed_phi_def): New. + (instantiate_parameters_1): Avoid instantiation of loop closed ssa + phi nodes. + (scev_const_prop): Don't replace the definition of a loop closed ssa + phi node by itself, or by another loop closed ssa phi node. + * tree-ssa-loop-niter.c (scev_probably_wraps_p, convert_step): Check + that base and step are defined. + +2005-09-09 Richard Guenther + + PR c++/23624 + * fold-const.c (fold_ternary): Check truth_value_p before + calling invert_truthvalue. + +2005-09-09 Nick Clifton + + * Makefile.in (LIBGCC_DEPS): Add libgcc2.h. + * libgcc2.c (__clz_tab[], __popcount_tab[]): Set the fixed + dimension of these arrays. + * libgcc2.h (__clz_tab[], __popcount_tab[]): Add exports of + these arrays. + * longlong.h: Only provide a prototype for the __clz_tab[] array + if this header has not been included from libgcc2.h. + * config/stormy16/stormy16-lib2.c: Include libgcc2.h rather than + defining own types. + Provide prototypes for exported functions. + Use the __clz_tab[] and __popcount_tab[] arrays provided by + libgcc2.c. + +2005-09-08 Josh Conner + + PR c++/21135 + PR c++/23180 + * expr.c (expand_expr_addr_expr_1): Don't invoke + expand_simple_binop for EXPAND_INITIALIZER. + +2005-09-08 Richard Henderson + + PR debug/23190 + * toplev.c (wrapup_global_declaration_1): Split out ... + (wrapup_global_declaration_2): ... from ... + (wrapup_global_declarations): ... here. Return bool. + (check_global_declaration_1): Split out ... + (check_global_declarations): from here. + (emit_debug_global_declarations): New. + * toplev.h (wrapup_global_declaration_1, wrapup_global_declaration_2, + check_global_declaration_1, emit_debug_global_declarations): Declare. + * c-decl.c (c_write_global_declarations_1): Don't create a vector + of decls. Call wrapup_global_declaration_1, + wrapup_global_declaration_2, check_global_declaration_1 directly. + (c_write_global_declarations_2): New. + (ext_block): New. + (c_write_global_declarations): Call c_write_global_declarations_2. + * langhooks.c (write_global_declarations): Call + emit_debug_global_declarations. + + * cgraphunit.c (cgraph_varpool_remove_unreferenced_decls): Don't + remove decls that have DECL_RTL_SET_P. + * passes.c (rest_of_decl_compilation): Invoke + cgraph_varpool_finalize_decl for all but functions. + +2005-09-08 Eric Botcazou + + * tree-vrp.c (extract_range_from_unary_expr): Do not set the range for + the result of a conversion if the new min and max cannot be compared. + +2005-09-08 Andreas Krebbel + + * config/s390/s390.c (s390_sr_alias_set): Variable removed. + (override_options): Setting s390_sr_alias_set removed. + (save_fpr, save_gprs): Set alias set to vararg or frame. + (restore_fpr, restore_gprs, s390_emit_prologue): Replace + s390_sr_alias_set with get_frame_alias_set (). + (s390_gimplify_va_arg): Replace s390_sr_alias_set with + get_varargs_alias_set (). + +2005-09-08 Andrew Pinski + + PR objc/20574 + PR objc/19324 + * c-parser.c (c_parser_objc_method_definition): If the next + token is not "{", error out and don't start the function. + +2005-09-08 Andrew Pinski + + * tree-vrp.c (extract_range_from_expr): Move the check for non + nullness after the check for gimple invariant. + +2005-09-08 Richard Kenner + + * tree.c (host_integerp, tree_low_cst): Correct function comment. + +2005-09-08 Kazuhiro Inaoka + + PR target/23747 + * config/m32r.md (movmemsi_internal): Canonicalize order of + operands in PLUS component of template. + +2005-09-07 Andreas Krebbel + + * reload1.c (fixup_eh_region_note): Remove assertion. + (fixup_abnormal_edges): Reverted removal of call to + find_many_sub_basic_blocks made on 2005-08-31. + +2005-09-07 Richard Henderson + + * function.c (ARG_POINTER_CFA_OFFSET): Move ... + * defaults.h (ARG_POINTER_CFA_OFFSET): ... here. + (INCOMING_FRAME_SP_OFFSET): Move from dwarf2out.c. + * dwarf2out.c (struct cfa_loc): Change reg to unsigned int, + rearrange for better packing. + (INCOMING_FRAME_SP_OFFSET): Move to defaults.h. + (lookup_cfa_1): Remove inline marker. + (cfa_equal_p): Split out of ... + (def_cfa_1): ... here. Use INVALID_REGNUM. + (build_cfa_loc): Handle !cfa->indirect. + (frame_pointer_cfa_offset): New. + (dbx_reg_number): Assert register elimination performed; do + leaf register remapping. + (reg_loc_descriptor): Avoid calling dbx_reg_number when unused. + (eliminate_reg_to_offset): New. + (based_loc_descr): Remove can_use_fbreg argument. Use fbreg only + for verifiably local stack frame addresses; re-base to CFA. + (mem_loc_descriptor): Remove can_use_fbreg argument. + (concat_loc_descriptor, loc_descriptor): Likewise. + (containing_function_has_frame_base): Remove. + (rtl_for_decl_location): Don't do register elimination or + leaf register remapping here. + (secname_for_decl): Split out from .. + (add_location_or_const_value_attribute): ... here. + (convert_cfa_to_loc_list): New. + (compute_frame_pointer_to_cfa_displacement): New. + (gen_subprogram_die): Use them. + * tree.h (frame_base_decl): Remove. + * var-tracking.c (frame_base_decl, frame_stack_adjust): Remove. + (prologue_stack_adjust): Remove. + (vt_stack_adjustments): Use INCOMING_FRAME_SP_OFFSET. + (adjust_stack_reference): Re-base memories to arg_pointer_rtx. + (set_frame_base_location): Remove. + (compute_bb_dataflow, emit_notes_in_bb): Don't call it. + (dump_attrs_list, dump_dataflow_set): Use string concatenation. + (vt_add_function_parameters): Don't eliminate_regs. + (vt_initialize): Don't create frame_base_decl. + +2005-09-07 Eric Botcazou + + * doc/install.texi (*-*-solaris2*): Clarify wording on the recommended + version of GNU binutils for 4.x and later. + +2005-09-06 Mark Mitchell + + * ggc-page.c (ggc_push_context): Remove. + (ggc_pop_context): Likewise. + * ggc.h (ggc_push_context): Remove. + (ggc_pop_context): Likewise. + +2005-09-06 Saurabh Verma + + PR target/8973 + * config/arc/arc.c (arc_output_function_epilogue): Update flags while + returning from an interrupt handler. + +2005-09-06 Saurabh Verma + + PR target/8972 + * config/arc/arc.c (output_shift): Add check for loop count when + optimizing. + +2005-09-06 Steven Bosscher + + * tree-ssa-phiopt.c (conditional_replacement): Construct proper SSA + form manually. + (abs_replacement): Likewise. + (pass_phiopt): Remove TODO_update_ssa. + +2005-09-06 Jakub Jelinek + + PR c/23075 + * c-typeck.c (c_finish_return): Set TREE_NO_WARNING on RETURN_EXPR + if "return with no value, in function returning non-void" warning + has been issued. + * tree-cfg.c (execute_warn_function_return): Don't look at + RETURN_EXPRs with TREE_NO_WARNING set. + + PR target/22362 + * config/i386/i386.c (ix86_function_regparm): Make sure automatic regparm + for internal functions doesn't use registers used by global registers + variables. Use fewer register parameters if there are global register + variables. + +2005-09-06 Olivier Hainque + Eric Botcazou + + PR middle-end/14997 + * expr.c (expand_expr_real) : Force op0 to mem + when we would be extracting outside its bit span (bitpos+bitsize + larger than its mode), possible with some VIEW_CONVERT_EXPRs from + Ada unchecked conversions. + +2005-09-06 Steven Bosscher + + * tree-ssa-pre.c (try_look_through_load): New function. + (compute_avail): Use it to try to look through loads for some + more useful expressions. + +2005-09-06 Saurabh Verma + + * simplify-rtx.c (simplify_binary_operation_1): Correct the + condition for detecting cases like (a&a) and (a^a). + +2005-09-06 Keith Besaw + + * common.opt: Add option ftree-vect-loop-version. + * params.def: Add --param vect-max-version-checks. + * doc/invoke.texi: Document ftree-vect-loop-version and + --param vect-max-version-checks. + * tree-vectorizer.h (_loop_vec_info): Add ptr_mask and + may_misalign_stmts and defines for accessors. + * tree-vectorizer.c : (new_loop_vec_info): VEC_alloc for + LOOP_VINFO_MAY_MISALIGN_STMTS. + (destroy_loop_vec_info): VEC_free for + LOOP_VINFO_MAY_MISALIGN_STMTS. + * tree-vect-analyze.c (vect_compute_data_ref_alignment): + Update documentation. + (vect_update_misalignment_for_peel): New. + (vect_enhance_data_refs_alignment): Update to choose loop + peeling or loop versioning if appropriate for the (potentially) + unaligned data references in the loop. + (vect_analyze_data_refs_alignment): Remove call to + vect_enhance_data_refs_alignment so the checks can be done + earlier. + (vect_analyze_loop): Add call to vect_enhance_data_refs_alignment + and move up call to vect_analyze_data_refs_alignment. + * tree-vect-transform.c (vect_create_cond_for_align_checks): New. + (vect_transform_loop): Add call to loop_version. + +2005-09-06 Jakub Jelinek + + PR rtl-optimization/23098 + * cse.c (fold_rtx_mem): Call delegitimize_address target hook. + * simplify-rtx.c (constant_pool_reference_p): New function. + * rtl.h (constant_pool_reference_p): New prototype. + * config/i386/i386.md (pushf split, mov[sdx]f split): Use + constant_pool_reference_p in condition and + avoid_constant_pool_reference in preparation statements. + +2005-09-06 Andreas Krebbel + + * gcse.c (try_replace_reg): Disallow REG_EQUAL notes for + STRICT_LOW_PART SETs. + +2005-09-06 Alan Modra + + PR middle-end/21460 + * except.c (sjlj_emit_function_enter): Find the function begin + note even when it's not in first basic block. + +2005-09-06 Kelley Cook + + * acinclude.m4: Renamed from aclocal.m4. Delete AM_LANGINFO_CODESET, + AM_PROG_CC_C_O, and AM_AUX_DIR_EXPAND. + * aclocal.m4: Regenerate. + +2005-09-05 DJ Delorie + + * config/m32c/m32c.h (TRAMPOLINE_ALIGNMENT): Correct misspelling + of macro. + +2005-09-06 Kazu Hirata + + * gimplify.c, ipa-prop.h, varasm.c, config/vxlib.c, + config/vxworks.h, config/crx/crx.c, config/ms1/ms1.c, + config/ms1/ms1.md, config/rs6000/rs6000.c: Fix comment typos. + Follow spelling conventions. + * doc/invoke.texi: Follow spelling conventions. + +2005-09-05 J"orn Rennecke + + * rtl.h (gen_frame_mem, gen_tmp_stack_mem): Declare. + * emit-rtl.c (gen_frame_mem, gen_tmp_stack_mem): New functions. + * builtins.c (expand_builtin_return_addr): Use gen_frame_mem. + +2005-09-05 J"orn Rennecke + + PR target/23683 + * sh.c (sh_reorg, emit_load_ptr): Use gen_const_mem. + (output_stack_adjust): Use gen_tmp_stack_mem. + (sh_expand_prologue, sh_expand_epilogue): Use gen_frame_mem. + (sh_set_return_address, sh_allocate_initial_value): Likewise. + (sh_get_pr_initial_val): Likewise. + (sh_builtin_saveregs): Use gen_frame_mem and change_address. + (sh_initialize_trampoline): Likewise. Also use adjust_address. + * sh.md (divsi_inv_m0): Use gen_const_mem. + (push_fpscr, pop_fpscr, load_ra): Use gen_frame_mem. + (movdf_i4+1): Use gen_tmp_stack_mem. + (reload_outdf+3, reload_outdf+4, fpu_switch+1): Use change_address. + (fpu_switch+2): Likewise. + (movv4sf_i, movv16sf_i): Use adjust_address. + (symGOT_load): Set MEM_NOTRAP_P bit. + +2005-09-04 John David Anglin + + PR target/23721 + * pa.c (emit_move_sequence): Fix typo in last change. + +2005-09-03 Jakub Jelinek + + PR rtl-optimization/23454 + * reorg.c (relax_delay_slots): Only call invert_jump if any_condjump_p + is true. + +2005-09-03 Richard Henderson + John David Anglin + + PR middle-end/23671 + * pa.c (emit_move_sequence): Use replace_equiv_address instead of + gen_rtx_MEM. + +2005-09-02 Nicolas Pitre + + * config/arm/arm.c (arm_legitimize_address): Limit the value passed + to bit_count to 32 bits. + +2005-08-31 Mark Mitchell + + PR c++/23167 + * gimplify.c (gimplify_expr): Handle TREE_ADDRESSABLE types when + generating synthetic loads from volatile lvalues. + +005-09-02 Nick Clifton + + * config/stormy16/stormy16-lib2.c (__popcounthi2, __parityhi2, + __ctzhi2, __clzhi2): New functions. + +2005-09-02 Andrew Pinski + + PR middle-end/23547 + * tree-nested.c (struct var_map_elt): Mark with GTY. + (struct nesting_info): Mark with GTY. Mark var_map's param is struct + var_map_elt. + (lookup_field_for_decl): Allocate new element in GC memory. + (lookup_tramp_for_decl): Likewise. + (convert_nl_goto_reference): Likewise + (create_nesting_tree): Allocate info in GC memory. Likewise for + info->var_map. + (free_nesting_tree): Free with ggc_free instead of free. + (root): New static variable. + (lower_nested_functions): Remove root as local variable. And zero out + root at the end of the function. + +2005-09-02 J"orn Rennecke + + PR rtl-optimization/20365 + * simplify-rtx.c (simplify_plus_minus_op_data): Change type of neg + to short. New member ix. + (simplify_plus_minus_op_data_cmp): Break ties using ix member. + (simplify_plus_minus): Initialize ix members before calling qsort. + +2005-09-02 Zdenek Dvorak + + PR tree-optimization/23626 + * tree-cfg.c (replace_uses_by): Clean up eh info. + +2005-09-01 DJ Delorie + + * config/m32c/m32c.c (m32c_valid_pointer_mode): Remove stray debug + fprintf. + +2005-09-01 David Edelsohn + + * config/rs6000/rs6000.c (setup_incoming_varargs): Set MEM_NOTRAP_P. + (rs6000_split_multireg_move): Use replace_equiv_address instead of + gen_rtx_MEM. + +2005-09-01 Craig Rodrigues + + * c-decl.c (diagnose_mismatched_decls): With -Wredundant-decls, + do not issue warning for a variable definition following + a declaration. + +2005-09-01 Richard Henderson + + PR 23668 + * config/i386/i386.c (ix86_expand_vector_init_one_var): Restore + conversion to CONST_VECTOR. + +2005-09-01 Richard Henderson + + PR 23676 + * reload1.c (reload_as_needed): Check !CALL_P before calling + fixup_eh_region_note. + * rtlanal.c (may_trap_p): SUBREG by itself cannot trap. + +2005-09-01 DJ Delorie + + * varasm.c (output_constant): Let the target resolve + conversions of addresses to non-default pointer sizes. + +2005-09-01 Nicolas Pitre + + * config/arm/arm.c (arm_legitimize_address): Split absolute addresses + to alow matching ARM pre-indexed addressing mode. + (arm_override_options): Remove now irrelevant comment. + +2005-09-01 Phil Edwards + + * config.gcc (i*86-wrs-vxworks): Update. Split out vxworksae target. + * config/i386/t-vxworks: Update multilibs for VxWorks 6 and RTP mode. + * config/i386/vxworks.h: Likewise. + * config/i386/t-vxworksae: New file, for VxWorks AE. + * config/i386/vxworksae.h: Likewise. + +2005-09-01 Sebastian Pop + + PR tree-optimization/23410 + * tree-ssa-loop-niter.c (scev_probably_wraps_p): Check that the + sequence is not wrapping during the first step. + +2005-09-01 Jakub Jelinek + + PR debug/7241 + * dwarf2out.c (base_type_die): Compare char_type_node with + TYPE_MAIN_VARIANT (type), not type. + +2005-09-01 Richard Guenther + + PR tree-optimization/15366 + * common.opt: Add -finline-functions-called-once. + Put -fearly-inlining in alphabetically ordered place. + * doc/invoke.texi: Document new option. + * ipa-inline.c (cgraph_decide_inlining): Honour + flag_inline_functions_called_once. + +2005-09-01 Jakub Jelinek + + PR rtl-optimization/23478 + * local-alloc.c (struct qty): Add n_throwing_calls_crossed field. + (alloc_qty): Initialize it. + (update_equiv_regs): Clear REG_N_THROWING_CALLS_CROSSED. + (combine_regs): Combine also n_throwing_calls_crossed fields. + (find_free_reg): Don't attempt to caller-save pseudos crossing + calls that might throw. + * global.c (struct allocno): Add throwing_calls_crossed field. + (global_alloc): Revert 2005-08-22 change. Initialize + throwing_calls_crossed. + (find_reg): Don't attempt to caller-save pseudos crossing calls that + might throw. + +2005-09-01 Alan Modra + + PR target/23649 + * config/rs6000/predicates.md (mask_operand): Only handle rlwinm masks. + (mask64_operand): Reinstate code prior to 2005-06-11 change. + (mask64_2_operand): Reinstate code prior to 2004-11-11 change. + (and64_2_operand): Tweak to use predicate. + (and_operand): Adjust for mask_operand changes. + * config/rs6000/rs6000.c (num_insns_constant): Revert 2005-06-11. + (print_operand): Likewise. + (rs6000_rtx_costs): Pass mode to mask_operand and use mask64_operand. + (mask64_1or2_operand): Delete. + * rs6000/rs6000-protos.h (mask64_1or2_operand): Delete. + * config/rs6000/rs6000.h (EXTRA_CONSTRAINT ): Revert 2005-06-11. + (EXTRA_CONSTRAINT ): Pass operand mode to predicate. + (EXTRA_CONSTRAINT ): Disallow mask64_operand matches. + * config/rs6000/rs6000.md (andsi3_internal3 split): Revert 2005-06-11. + (rotldi3_internal4): Likewise. + (rotldi3_internal5, rotldi3_internal5 split): Likewise. + (rotldi3_internal6, rotldi3_internal6 split): Likewise. + (ashldi3_internal7): Likewise. + (ashldi3_internal8, ashldi3_internal8 split): Likewise. + (ashldi3_internal, ashldi3_internal9 split): Likewise. + (anddi3 split): Don't match mask64_operand. + (anddi3_internal2): Add rlwinm. Modify 't' splitter predicate. + (anddi3_internal3): Add rlwinm. Use and64_2_operand in non-cr0 + splitter and match TARGET_64BIT not TARGET_POWERPC64. Modify + 't' splitter predicate. + (movdi_internal64 + 2): Revert 2005-06-11 change. + +2005-08-31 DJ Delorie + + * config/m32c/m32c.c (m32c_valid_pointer_mode): New. + (m32c_asm_integer): Add support for 32 bit pointers. + +2005-08-31 Richard Henderson + + * emit-rtl.c (set_mem_attributes_minus_bitpos): Look through + component-like references for setting MEM_NOTRAP_P. + + * config/i386/i386.c (ix86_setup_incoming_varargs): Set MEM_NOTRAP_P. + * config/alpha/alpha.c (alpha_setup_incoming_varargs): Likewise. + +2005-08-31 Richard Henderson + + * expr.c (expand_expr_real_1) : Force subregs + into a pseudo before applying gen_lowpart. + +2005-08-31 Geoffrey Keating + + * doc/install.texi (Specific): Update cctools version required + for full functionality. + * config/darwin.h (LINK_SPEC): Pass -mmacosx-version-min to the + linkers as -macosx_version_min. + +2005-08-31 J"orn Rennecke + + PR target/21255 + * sh.c (print_operand, %R and %S): Add handling of floating point + registers, memory, constants and invalid operands. + +2005-08-31 Daniel Berlin + + * ipa-pure-const.c: Change dump name. + +2005-08-31 Uros Bizjak + + PR target/23570 + * config/i386/sse.md (*sse_concatv2sf): Change operand 2 constraint + to "reg_or_0_operand". + (sse2_loadld): Change operand 1 constraint to "reg_or_0_operand". + +2005-08-31 Dale Johannesen + + * loop-iv.c (iv_number_of_iterations): Fix overflow check for + loops that count down. + +2005-08-31 Richard Henderson + + PR rtl-opt/23601 + * reload1.c (reload): Set MEM_NOTRAP_P in spill slots. + (fixup_eh_region_note): New. + (reload_as_needed): Call it. + (fixup_abnormal_edges): Allow all throwing insns to be deleted; + don't call find_many_sub_basic_blocks; call verify_flow_info. + * function.c (assign_stack_local_1): Set MEM_NOTRAP_P. + (keep_stack_depressed): Likewise. + (assign_stack_temp_for_type): Likewise; use adjust_address_nv. + +2005-08-31 Richard Henderson + + * config/i386/i386.c (ix86_function_ok_for_sibcall): Fix test for + fp return matching. + +2005-08-31 Fariborz Jahanian + + * expr.c (expand_expr_real_1): Compare size of address + mode to target's address mode size in deciding expansion of + the constant address. + +2005-08-31 Richard Guenther + + PR middle-end/23477 + * expr.c (all_zeros_p): New function. + (expand_expr_real_1): Handle the case of an all-zero + non-addressable constructor separately. + +2005-08-31 Adrian Straetling + + * builtins.c: (expand_builtin_strcpy, expand_builtin_strcat): Change + arguments, adjust all callers. + (expand_builtin_strcat): Rewrite to call strcpy instead of mempcpy. + +2005-08-30 Richard Henderson + + PR target/23630 + * expr.c (expand_expr_real_1) : Use gen_lowpart + whenever the mode sizes match. + +2005-08-31 Alan Modra + + * calls.c (load_register_parameters): Fix comment typo. + * expr.c (emit_push_insn): Comment formatting. + +2005-08-30 Ian Lance Taylor + + * config/i386/x-cygwin (host-cygwin): Change dependency from + hosthooks-def.h to $(HOSTHOOKS_DEF_H). + +2005-08-29 Geoffrey Keating + + * config/i386/i386.c (ix86_expand_vector_init_one_var): Don't modify + parts of 'vals'. + +2005-08-29 Andrew Pinski + + PR middle-end/23408 + * ipa-inline.c (cgraph_decide_inlining_incrementally): Remove the + call to ggc_collect. + +2005-08-29 Paolo Bonzini + + PR bootstrap/21268 + * Makefile.in (ALL_CPPFLAGS): Include $(INCLUDES) at the + beginning. Remove $(INCLUDES) from all the rules, if following + $(ALL_CPPFLAGS) or $(BUILD_CPPFLAGS). + +2005-08-29 Jakub Jelinek + + PR middle-end/23484 + * builtins.c (fold_builtin_memory_chk, fold_builtin_stxcpy_chk, + fold_builtin_strncpy_chk, fold_builtin_snprintf_chk): If len is + not constant, but maxlen is, don't set len to maxlen, rather + set maxlen to len if len is a constant. + +2005-08-29 Zdenek Dvorak + + PR tree-optimization/23475 + * tree-ssa-loop-ivcanon.c (remove_empty_loop): Update frequencies + and counts. + +2005-08-28 Daniel Berlin + + Fix PR middle-end/22455 + + * fold-const.c (fold_checksum_tree): Adjust for now-largest tree size. + Checksum only the parts of the tree that exist for the tree code. + +2005-08-28 Dale Johannesen + + * config/i386/i386.c (nocona_cost): Increase MOVE_RATIO. + +2005-08-28 Andrew Pinski + + * tree-vrp.c: Remove obsolete comment in front of vrp_initialize. + +2005-08-28 Richard Henderson + + * stor-layout.c (finalize_type_size): Revert workaround from 08-26. + * tree.c (make_node_stat): Use BITS_PER_UNIT instead of alignment + of char_type_node. + +2005-08-28 Jakub Jelinek + + PR ada/23593 + * builtins.c (get_memory_rtx): Don't strip nops + in between COMPONENT_REFs. + +2005-08-27 Andrew Pinski + + PR middle-end/23463 + * gimplify.c (gimplify_modify_expr_rhs): Remove check for zero sized + types. + (gimplify_modify_expr): Check for zero sized types and gimplify the + rhs and lhs as statements. + +2005-08-27 John David Anglin + + PR libgcj/23508 + * pa/linux-unwind.h (pa32_fallback_frame_state): Use r0 slot in frame + state for return address column of signal frames. + +2005-08-27 David Edelsohn + + PR target/23539 + * config/rs6000/rs6000.c (expand_block_clear): Use HImode when + bytes >= 2 not bytes == 2. + (expand_block_move): Same. + +2005-08-27 Richard Guenther + + PR target/23575 + * config/i386/sse.md (sse2_movsd): Add missing closing + braces. + +2005-08-27 Paul Brook + + * genrecog.c (enum decision_type): Add DT_num_insns. + (struct decision_test): Add u.num_insns. + (add_to_sequence): Add DT_num_insns test. + (maybe_both_true_2, nodes_identical_1): Handle DT_num_insns. + (write_cond, debug_decision_2): Ditto. + (change_state): Assume peep2_next_insn never fails. + Remove "afterward" argument. + (write afterward, write_tree): Update to match. + * recog.c (peep2_current_count): New variable. + (peep2_next_insn): Check it. + (peephole2_optimize): Set peep2_current_count. + * recog.h (peep2_current_count): Declare. + +2005-08-26 Josh Conner + + PR middle-end/23584 + * ipa-pure-const.c (check_tree): Check for volatile-ness + when considering a dereference. + +2005-08-27 Jakub Jelinek + + * rtl.h (MEM_IN_STRUCT_P): Fix comment typo. + +2005-08-26 Jakub Jelinek + + PR rtl-optimization/23561 + * builtins.c (get_memory_rtx): Add LEN argument. If MEM_EXPR is + a COMPONENT_REF, remove all COMPONENT_REF from MEM_EXPR unless + at most LEN bytes long memory fits into the field. + (expand_builtin_memcpy, expand_builtin_mempcpy, expand_movstr, + expand_builtin_strncpy, expand_builtin_memset, expand_builtin_memcmp, + expand_builtin_strcmp, expand_builtin_strncmp): Adjust callers. + +2005-08-26 Richard Henderson + + PR rtl-opt/23560 + * loop.c (biased_biv_may_wrap_p): New. + (maybe_eliminate_biv_1): Use it to suppress non-equality + comparison transformations. Delete disabled code. + +2005-08-26 Ian Lance Taylor + + * combine.c (make_extraction): Avoid reference outside object. + +2005-08-26 J"orn Rennecke + + * stor-layout.c (finalize_type_size): Restore behaviour for + non-aggregate types to the status quo ante of the patch for + pr 23467. Document why it matters. + +2005-08-26 Jakub Jelinek + + PR c/23506 + * c-common.c (c_common_nodes_and_builtins): Increase builtin_types + array by one element, initialize the BT_LAST element with NULL. + +2005-08-26 David Edelsohn + + * config/rs6000/rs6000.md (eq_compare): Only enable when + optimizing for size. + (plus_eqsi): Same. + (compare_plus_eqsi): Same. + (plus_eqsi_compare): Same. + (neg_eq0): Same. + (neg_eq): Same. + + * config/rs6000/aix52.h (PROCESSOR_DEFAULT): Change to + PROCESSOR_POWER4. + +2005-08-26 Nick Clifton + + * config/v850/v850.c (ep_memory_operand): Return FALSE if + TARGET_EP is not defined. + * config/v850/c850.h (TARGET_CPU_CPP_BUILTINS): Define __EP__ if + TARGET_EP is enabled. + (OPTIMIZATION_OPTIONS): Do not define MASK_EP when optimizing. + * config/v850/v850.md (save_all_interrupt): Only use the EP + register if TARGET_EP is defined. + (restore_all_interrupt): Likewise. + * config/v850/lib1funcs.asm: Update functions so that the EP + register is only used if __EP__ is defined. + +2005-08-26 David Ung + + * config/mips/mips.c (mips_expand_prologue): Handle case when + generating for MIPS16 and the outgoing argument area is more than + SMALL_OPERAND. Use the frame pointer as temporary to generate the + add instruction. + +2005-08-26 Paul Woegerer + + * config/crx/crx.md: Make doloop_end pattern usage controllable + via mloop-nesting= command line switch. Make sure + the combiner cannot use doloop_end_ in an illegal way. + * config/crx/crx.c: Use regs up to r6 for argument passing. + Refine crx_address_cost (non cst4 displacements are expensive). + * config/crx/crx.opt: Add switch for mloop-nesting=. + +2005-08-26 Adrian Straetling + + * config/s390/s390.md: ("movstr", "*movstr"): Add patterns. + (UNSPEC_MVST): New constant. + +2005-08-26 Andreas Krebbel + + * config/s390/predicates.md ("shift_count_operand", "setmem_operand"): + Reject operands containing eliminable registers. + * testsuite/gcc.dg/20050825-1.c: New testcase. + +2005-08-24 Paolo Bonzini + Jan Hubicka + + * regmove.c (reg_is_remote_constant_p): Reorganize to not use log links. + +2005-08-24 Paolo Bonzini + + PR tree-optimization/23546 + * tree-ssa-loop-im.c (for_each_index): Handle INTEGER_CST + and REAL_CST nodes. + +2005-08-24 Pete Steinmetz + + * params.def (PARAM_MIN_SPEC_PROB): New. + * sched-rgn.c (MIN_PROBABILITY): Delete. + (compute_trg_info): Convert to PARAM_VALUE. + * doc/invoke.texi (param): Document min-spec-prob. + +2005-08-24 Fariborz Jahanian + + * config/darwin.h: define __PIC__ + * config/rs6000/darwin.h: Add SUBTARGET_OS_CPP_BUILTINS to + TARGET_OS_CPP_BUILTINS macro. + +2005-08-24 Paolo Bonzini + + * config/rs6000/rs6000.md: Fix thinko in the peephole2 I added + yesterday. + +2005-08-24 Zdenek Dvorak + + * bb-reorder.c (copy_bb, duplicate_computed_gotos): Add argument + to duplicate_block. + * cfghooks.c (duplicate_block): Added position where to place + new block as argument. + * cfghooks.h (duplicate_block): Declaration changed. + * cfglayout.c (copy_bbs): Add argument after. Pass it to + duplicate_block. + * cfglayout.h (copy_bbs): Declaration changed. + * cfgloop.h (loop_version): Declaration changed. + * cfgloopmanip.c (duplicate_loop_to_header_edge): Pass + position to copy_bbs. + (loop_version): Pass position to duplicate_loop_to_header_edge. + Add place_after argument and position new blocks according to + it. + * modulo-sched.c (sms_schedule): Pass place_after argument + to loop_version. + * tracer.c (tail_duplicate): Pass argument to duplicate_block. + * tree-cfg.c (split_edge_bb_loc): New function. + (tree_split_edge, tree_duplicate_sese_region): Use split_edge_bb_loc + to determine position of new blocks. + * tree-ssa-loop-unswitch.c (tree_unswitch_loop): Pass argument + to loop_version. + * tree-ssa-threadupdate.c (create_block_for_threading): Pass + argument to duplicate_block. + * tree-vectorizer.c (slpeel_tree_duplicate_loop_to_edge_cfg): + Pass position to copy_bbs. + +2005-08-24 Zdenek Dvorak + + * fold-const.c (ptr_difference_const): Use + cst_and_fits_in_hwi instead of host_integerp. + +2005-08-24 Paolo Bonzini + + * config/darwin.c (gen_pic_offset): New. + (machopic_indirect_data_reference, machopic_legitimize_pic_address): + Use it. + +2005-08-23 Zdenek Dvorak + + PR tree-optimization/23486 + * tree-ssa-loop.c (pass_scev_cprop): Add TODO_update_ssa_only_virtuals. + +2005-08-23 Phil Edwards + + * config.gcc (*-*-vxworks*): Update tm_file, add extra_options, + remove use_collect2. + (powerpc-wrs-vxworks): Update, split out *-*-vxworksae target. + + * target-def.h (TARGET_HAVE_CTORS_DTORS): Allow target + configuration files to override the default value. + + * config/t-vxworks: Remove INSTALL_ASSERT_H. Define STMP_FIXPROTO, + EXTRA_HEADERS, and EXTRA_MULTILIB_PARTS. + * config/vx-common.h: New file, split out from... + * config/vxworks.h: here. Update for VxWorks 6.x and RTP mode. + * config/vxworksae.h: New file, for VxWorks AE. + * config/vxworks.opt: New file. + * config/vxlib.c: Update for VxWorks 6. + + * config/rs6000/t-vxworks (MULTILIB_OPTIONS): New list. Adjust + other MULTILIB_* variables appropriately. + (LIB2FUNCS_EXTRA, EXTRA_MULTILIB_PARTS): Correct from t-ppccomm. + * config/rs6000/t-vxworksae: New file, adjust multilibs for AE. + * config/rs6000/vxworks.h: Update for VxWorks 6. + * config/rs6000/vxworksae.h: New file, mostly placeholder for now. + +2005-08-23 Andrew Pinski + + PR target/20799 + * config/darwin.c (machopic_select_section): Remove the hack to + mark "::operator new" and "::operator delete" for coalescing + even though they are not weak. + +2005-08-24 Alan Modra + + * configure.ac (HAVE_LD_NO_DOT_SYMS): Set for powerpc-linux biarch. + * configure: Regenerate. + +2005-08-23 Paolo Bonzini + + PR middle-end/23517 + * fold-const.c (fold_convert): Use VIEW_CONVERT_EXPR to convert + between vectors. + * convert.c (convert_to_integer, convert_to_vector): Likewise. + * tree-vect-generic.c (tree_vec_extract, expand_vector_operations_1): + Likewise. + +2005-08-23 Paolo Bonzini + + * config/rs6000/predicates.md (equality_operator): New. + * config/rs6000/rs6000.md: Rewrite as a peephole2 the split for + comparison with a large constant. + +2005-08-23 Mark Mitchell + + * hwint.h (HOST_WIDE_INT_PRINT): Use HOST_LONG_LONG_FORMAT. + +2005-08-23 J"orn Rennecke + + * sh.c (sh_builtin_saveregs): If the number of to-be-saved fp + registers is even, and we have a hardware double precision fp, + align the buffer. + (sh_gimplify_va_arg_expr): For floating point arguments, consider + size of current argument when checking if argument was passed in + registers. + + * sh.c (sh_attr_renesas_p): Handle error_mark_node. + + PR middle-end/23467 + * stor-layout.c (finalize_type_size): Dont override + existing alignment with a smaller alignment from the mode. + +2005-08-23 Sebastian Pop + + * lambda-code.c (lambda_vector_lexico_pos): Moved... + * lambda.h (lambda_vector_lexico_pos): ... here. + * tree-data-ref.c (build_classic_dist_vector): Return false when + the distance vector is lexicographically negative. + +2005-08-23 Sebastian Pop + + PR tree-optimization/23511 + * tree-ssa-loop-niter.c (infer_loop_bounds_from_undefined): Don't + handle cases where TYPE_MIN_VALUE or TYPE_MAX_VALUE are NULL_TREE. + +2005-08-23 Jakub Jelinek + + PR tree-optimization/22043 + * tree.h (count_type_elements): Add ALLOW_FLEXARR argument. + * expr.c (count_type_elements): Add ALLOW_FLEXARR argument. + If ALLOW_FLEXARR, handle types ending with flexible array member. + Pass false as second argument to recursive count_type_elements calls. + (categorize_ctor_elements_1, mostly_zeros_p): Pass false as second + argument to count_type_elements call. + * tree-sra.c (decide_block_copy): Likewise. + * gimplify.c (gimplify_init_constructor): If num_type_elements < 0 + for a constant-sized object, set cleared as well. Pass true as + second argument to count_type_elements call. + +2005-08-23 Alan Modra + + PR target/21571 + * config/rs6000/rs6000.c (rs6000_legitimate_small_data_p): Rename + from legitimate_small_data_p, and make global. Update use. + Remove forward declaration. + * config/rs6000/rs6000-protos.h (rs6000_legitimate_small_data_p): + Declare. + * config/rs6000/rs6000.md (movdf_hardfloat32): Allow small data mems. + +2005-08-23 David Edelsohn + + * config/rs6000/rs6000.md (eq): Use output operand instead + of scratch intermediates. + (eq_compare): Same. + (neg_eq0): New. + (neg_eq): Convert to define_insn_and_split. + +2005-08-23 Alan Modra + + PR target/23070 + * config/rs6000/rs6000.c (function_arg): For ABI_V4 calls to + stdarg functions, set/clear the fp marker even when no variable + args are passed. + * config/rs6000/sysv4.opt (mprototype): Describe. + +2005-08-22 Jakub Jelinek + + PR rtl-optimization/23478 + * regs.h (reg_info): Add throw_calls_crossed. + (REG_N_THROWING_CALLS_CROSSED): Define. + * flow.c (allocate_reg_life_data): Initialize + REG_N_THROWING_CALLS_CROSSED. + (propagate_one_insn, attempt_auto_inc): Update + REG_N_THROWING_CALLS_CROSSED. + * global.c (global_alloc): Don't allocate pseudos across + calls that may throw. + +2005-08-22 Andrew Pinski + + PR c/18715 + * c-common.c (c_do_switch_warnings): Look for a node where the enum's + value is inbetween the range if we did not find an exact match. + +2005-08-22 Aldy Hernandez + + * doc/invoke.texi (Option Summary): Add ms1 options. + * doc/extend.texi: Document interrupt handler attribute for ms1. + * doc/md.texi: Document ms1 constraints. + * config.gcc: Add ms1-*-elf. + * config/ms1/ms1.h: New. + * config/ms1/ms1.c: New. + * config/ms1/ms1.md: New. + * config/ms1/ms1-protos.h: New. + * config/ms1/ABI.txt: New. + * config/ms1/crti.asm: New. + * config/ms1/crtn.asm: New. + * config/ms1/lib2extra-funcs.c: New. + * config/ms1/t-ms1: New. + * config/ms1/ms1.opt: New. + +2005-08-22 Ira Rosen + + * config/rs6000/altivec.md (xorv4sf3): New. + (negv4sf2, neg2): Likewise. + +2005-08-21 H.J. Lu + + PR target/23485 + * config/ia64/ia64.md (divsi3): Check divide by zero. + (udivsi3): Likewise. + (divdi3): Likewise. + (udivdi3): Likewise. + +2005-08-21 Jakub Jelinek + + * simplify-rtx.c (simplify_immed_subreg) : Only clear + up to elem_bitsize bits, not max_bitsize. + +2005-08-21 Sebastian Pop + + PR tree-optimization/23433 + * tree-chrec.c (chrec_apply): Translate INTEGER_CST to a + REAL_CST when the type is SCALAR_FLOAT_TYPE_P. + +2005-08-21 Sebastian Pop + + PR tree-optimization/23434 + * tree-ssa-loop-niter.c (proved_non_wrapping_p): Give up when + the iteration bound is not an INTEGER_CST. + +2005-08-21 Dorit Nuzman + + * tree-vect-transform.c (get_initial_def_for_reduction): Set + need_epilog_adjust back to false for MIN/MAX case. Set *scalar_def to + NULL if need_epilog_adjust is false. + (vect_create_epilog_for_reduction): Variable adjust_in_epilog removed. + Case 3 always peels first itration, not just for PLUS case, and no need + to use scalar_initial_def here. Create an epilog adjustment only if + scalar_initial_def is not NULL. + + (vectorizable_reduction): Remove assert. + +2005-08-20 H.J. Lu + + PR target/23485 + * config/ia64/lib1funcs.asm (__divdi3): Check divide by zero. + (__moddi3): Likewise. + (__udivdi3): Likewise. + (__umoddi3): Likewise. + (__divsi3): Likewise. + (__modsi3): Likewise. + (__udivsi3): Likewise. + (__umodsi3): Likewise. + +2005-08-20 Jakub Jelinek + + * tree-pass.h (TDF_GRAPH): Define. + * tree-dump.c (dump_options): Don't set TDF_GRAPH in "all". + * passes.c (finish_optimization_passes): Only call + finish_graph_dump_file if TDF_GRAPH is set. + (execute_one_pass): Only call clean_graph_dump_file if dump_file != + NULL. Set TDF_GRAPH bit. + (execute_todo): Call print_rtl_graph_with_bb if TDF_GRAPH is set. + +2005-08-20 Richard Earnshaw + + * arm.h (arm_stack_offsets): Add locals_base field. + * arm.c (arm_get_frame_offsets): Compute it. + (thumb_compute_initial_elimination offset): Make the Thumb frame + pointer point to the base of the local variables. + (thumb_expand_prologue): Update accordingly. + (thumb_expand_epilogue): Likewise. + + * arm.md (thumb_movhi_clobber): Make this insn a define_expand. Change + mode of clobbered scratch to DImode. Handle a case that's known to + need this. + +2005-08-19 David Edelsohn + + * config/rs6000/rs6000.md (gt0): Delete. + (gt0_compare): Delete. + (neg_gt0): Delete. + +2005-08-19 Eric Christopher + + * optabs.h: Change CTI_ to COI_. + * optabs.c: Ditto. + +2005-08-19 James E Wilson + + * builtins.c (expand_builtin_return_addr): Set + current_function_accesses_prior_frames when count != 0. Use + frame_pointer_rtx when count == 0. + * function.h (struct function): Add accesses_prior_frames field. + (current_function_accesses_prior_frames): Define. + * reload1.c (init_elim_table): Check + current_function_accesses_prior_frames. + * doc/tm.texi (INITIAL_FRAME_ADDRESS_RTX): Update docs. + +2005-08-19 Diego Novillo + + * tree-cfgcleanup.c (cleanup_tree_cfg): Fix flowgraph change + indicator. Return true if the flowgraph changed during + cleanup. + +2005-08-19 Diego Novillo + + PR 23476 + * tree-cfgcleanup.c (cleanup_control_expr_graph): Fold the + conditional expression before testing its value. + +2005-08-19 Diego Novillo + + * doc/invoke.texi: Fix documentation for -ftree-dominator-opts. + +2005-08-19 Devang Patel + + PR tree-optimization/23048 + * tree-if-conv.c (if_convertible_bb_p): Supply basic_block as + third parameter. Check whether latch is dominated by exit + block or not. + (if_convertible_loop_p): Supply exit block itself to + if_convertible_bb_p. + +2005-08-19 Richard Earnshaw + + PR target/23473 + * arm.md (arm_load_pic_register): Change argument to the mask of + saved registers. Call thumb_find_work_register if we need a + scratch register on Thumb. + (arm_expand_prologue): Pass empty register set to + arm_load_pic_register. + (thumb_expand_prologue): Pass live_regs_mask directly to + arm_load_pic_register. + * arm-protos.h (arm_load_pic_register): Update prototype. + +2005-08-19 J"orn Rennecke + + * sh.c (find_sole_member): New function. + (sh_gimplify_va_arg_expr): Use it. Allow RECORD_TYPE mode mismatch + if the record's alignment is larger than the size of its only member. + +2005-08-19 Richard Earnshaw + + PR target/23436 + * arm.c (thumb_legitimize_reload_address): New function. + * arm-protos.h (thumb_legitimize_reload_address): Add prototype. + * arm.h (THUMB_LEGITIMIZE_RELOAD_ADDRESS): Call it. + +2005-08-19 Paul Woegerer + + * config/crx/crx.c: Implement crx_decompose_address. Reject + symbolic displacements since CRX register relative adressing + mode can't handle unsigned 32-bit values as displacements. + * config/crx/crx.h: Simplify definitions, remove redundant + parenthesis and obsolete macros. + * config/crx/crx.opt: Add new switch for debugging addresses. + * config/crx/crx-protos.h: Add new declarations for above. + +2005-08-19 Andrew Pinski + + PR middle-end/20624 + * gimple-low.c (block_may_fallthru): Handle CLEANUP_POINT_EXPR by + looking past it. + +2005-08-18 Kaveh R. Ghazi + + * collect2.c (dup2): Delete. + * configure.ac: Don't check for dup2. + + * config.in, configure: Regenerate. + +2005-08-18 J"orn Rennecke + + * sh.c (sh_gimplify_va_arg_expr): Loop to substitute a RECORD_TYPE + record with the type of its only member. + +2005-08-18 David Edelsohn + + * config/rs6000/rs6000.md (ltu_compare): Convert to + define_insn_and_split. + (plus_ltu_compare): Same. + (gtu_compare): Same. + (plus_gtu_compare): Same. + +2005-08-18 Dorit Nuzman + + PR tree-optimization/22228 + * tree-ssa-loop (pass_vectorize): Add TODO_verify_loops to + todo_flags_start. + * tree-vect-transform.c (vect_transform_loop): Mark the variables that + are recorded in vect_vnames_to_rename for renaming. + * tree-vectorizer.c (vect_vnames_to_rename): New global bitmap. + (slpeel_update_phi_nodes_for_guard1): Record virtual vars for renaming + in vect_vnames_to_rename. + (vectorize_loops): Allocate and free the vect_vnames_to_rename bitmap. + * tree-vectorizer.h (vect_vnames_to_rename): New extern variable. + +2005-08-18 Jan Hubicka + + PR c++/22034 + * cgraphunit.c (cgraph_varpool_assemble_pending_decls): Emit debug + info only for local statics, not for member variables. + +2005-08-18 Volker Reichelt + + * tree-data-ref.c (analyze_siv_subscript_cst_affine): Fix comment typo. + +2005-08-18 Volker Reichelt + + * c-typeck.c (designator_errorneous): Rename to designator_erroneous. + +2005-08-18 Andrew Pinski + + PR middle-end/16045 + * builtins.c (fold_builtin): Create a new NOP_EXPR all the time. + +2005-08-17 James E Wilson + + * c-decl.c (grokdeclarator): Use TYPE_SIZE_UNIT not TYPE_SIZE in + array size check. + +2005-08-17 David Edelsohn + + * config/rs6000/rs6000.md (leu): Convert to mode macro. + (leu_compare): Same. + (plus_leu): Same. + (neg_leu): Same. + (and_neg_leu_compare): Same. + (plus_ltu): Same. + (geu): Same. + (geu_compare): Same. + (plus_geu): Same. + (neg_geu): Same. + (and_neg_geu): Same. + (plus_gt): Same. + (gtu_compare): Same. + (plus_gtu): Same. + +2005-08-17 Erik Christiansen + + * config/v850/lib1funcs.asm (callt_save_interrupt): Fix comment typos. + Move call_table_data to end. Delete spurious .text. + (callt_save_all_interrupt): Fix comment typo. + +2005-08-17 James E Wilson + Kevin Winchester + + PR target/21684 + * config/mcore/mcore.h (SHIFT_COUNT_TRUNCATED): Define to 0. + +2005-08-17 Uros Bizjak + + PR target/23268 + * config/i386/i386.md ("*fist2_1"): New pattern. + ("lrint2"): Change expander to use "*fist2_1" pattern. + +2005-08-17 J"orn Rennecke + + * sh.c (sh_gimplify_va_arg_expr): Don't substitute a RECORD_TYPE + record with the type of its only member if the modes don't match. + + * varasm.c (decode_reg_name): Skip empty additional register names. + +2005-08-16 Zdenek Dvorak + + * tree-ssa-loop-im.c (MAX_LSM_NAME_LENGTH, lsm_tmp_name, + lsm_tmp_name_length): New. + (lsm_tmp_name_add, gen_lsm_tmp_name, get_lsm_tmp_name): New functions. + (schedule_sm): Use get_lsm_tmp_name instead of "lsm_tmp". + +2005-08-16 Ulrich Weigand + Andreas Krebbel + + * config.gcc: Added z9-109 switch. + * config/s390/2084.md ("x_int", "x_agen", "x_lr", "x_la", "x_larl", + "x_load", "x_store", "x_branch", "x_call", "x_mul_hi", "x_mul_sidi", + "x_div", "x_sem", "x_cs", "x_vs", "x_stm", "x_lm", "x_other", + "x_fsimpdf", "x_fsimpsf", "x_fdivdf", "x_fdivsf", "x_floaddf", + "x_floadsf", "x_fstore_df", "x_fstoresf", "x_ftoi", "x_itof"): Enable + for "z9_109" cpu attribute. + * config/s390/s390.c (z9_109_cost): New processor cost structure. + (CONST_OK_FOR_Os, CONST_OK_FOR_Op, CONST_OK_FOR_On): New macros. + (s390_handle_arch_option): Added z9-109 switch. + (override_options): Set respective cost function for z9-109. + (s390_const_ok_for_constraint_p): New constraints Os, Op, On. + (legitimate_reload_constant_p): Accept extended immediates. + (print_operand): Three new output modifiers added: k, m and o. + (s390_adjust_priority, s390_issue_rate): Handle Z9_109 like Z990. + (s390_output_mi_thunk): Use extended immediate when possible. + * config/s390/s390.h (processor_flags): Added PF_EXTIMM. + (TARGET_CPU_EXTIMM, TARGET_EXTIMM): New macros. + (CONSTRAINT_LEN): Added length of O constraint. + (CLZ_DEFINED_VALUE_AT_ZERO): Definition added. + * config/s390/s390.md ("cpu"): New value z9_109 added. + ("*tstdi_extimm", "*tstdi_ccconly_extimm", "*tstsi_extimm", + "*tstsi_cconly_extimm", "*movdi_64extimm", "*extendhidi2_extimm", + "*extendqidi2_extimm", "*extendhisi2_extimm", "*extendqisi2_extimm", + "*zero_extendsi2_extimm", "*anddi3_extimm", "*iordi3_extimm", + "*xordi3_extimm", "clzdi2", "clztidi2"): New patterns. + ("*tstdi", "*tstsi", "*movdi_64", "*extendhisi2", "*extendqisi2", + "*zero_extendsi2_64", "zero_extendqihi2", "*zero_extendqihi2_64", + "*anddi3", "*iordi3", "*xordi3"): Disable for TARGET_EXTIMM. + ("*cmpdi_cct", "*cmpsi_cct", "*cmpdi_ccs", "*cmpsi_ccs", "*cmpdi_ccu", + "*cmpsi_ccu", "*movsi_zarch", "*adddi3_imm_cc", "*adddi3_carry1_cc", + "*adddi3_carry2_cc", "*adddi3_cc", "*adddi3_64", "*addsi3_imm_cc", + "*addsi3_carry1_cc", "*addsi3_carry2_cc", "*addsi3_cc", "addsi3", + "*andsi3_cc", "*andsi3_cconly", "*andsi3_zarch", "*iorsi3_cc", + "*iorsi3_cconly", "*iorsi3_zarch", "*xorsi3_cc", "*xorsi3_cconly", + "*xorsi3", "*xorhi3", "*xorqi3"): Added instruction using extended + immediates. + ("extenddi2", "extendsi2", "zero_extenddi2", + "zero_extendsi2"): Allow memory operands and don't manually emit + insns for TARGET_EXTIMM. + +2005-08-17 Andreas Krebbel + + * testsuite/gcc.dg/20020926-1.c: Added "-mesa" to dg-options. + +2005-08-17 Nick Clifton + + * config/stormy16/stormy16.c (xstormy16_encode_section_info): + Call default_encode_section_info. + +2005-08-17 Steven Bosscher + + PR tree-optimization/21574 + * tree-ssa-ccp.c (likely_value): If the right hand side is a + constant, return CONSTANT. + (ccp_lattice_meet): Use operand_equal_p instead of simple_cst_equal. + (ccp_fold, visit_assignment): Likewise. + (evaluate_stmt): Handle UNDEFINED and UNKNOWN_VAL the same way. + +2005-08-16 James A. Morrison + + * c-typeck.c (build_function_call): Call fold_buildN_initializer or + fold_buildN instead of buildN then fold_initializer or fold. + (build_unary_op): Likewise. + (build_binary_op): Likewise. + * fold-const.c (fold_initializer): Remove. + (fold_build1_initializer): New function. + (fold_build2_initializer): New function. + (fold_build3_initializer): New function. + * tree.h (fold_initializer): Remove. + (fold_build1_initializer): New function. + (fold_build2_initializer): New function. + (fold_build3_initializer): New function. + +2005-08-16 James A. Morrison + + * fold-const.c (optimize_bit_field_compare): Remove extra fold call. + (try_move_mult_to_index): Call fold_build2 instead of build2. + (fold_binary): Don't call fold after calls to try_move_mult_to_index. + * tree-ssa-loop-niter.c (inverse): Call int_const_binop instead of + fold_binary_to_constant. + (infer_loop_bounds_from_undefined): Call fold_build2 instead of + fold (build. + * tree-data-ref.c (tree_fold_divides_p): Use tree_int_cst_equal to + check if A == gcd (A, B). Remove TYPE argument. + (analyze_offset) Use fold_build2 instead of fold (build. + (create_data_ref): Likewise. + (analyze_siv_subscript_cst_affine): Update calls to tree_fold_divides_p. + * tree-ssa-ccp.c (widen_bitfield): Call fold_build2 instead of build2 + then fold. + +2005-08-17 Kelley Cook + + * config/arm/unaligned-funcs.c,config/i386/crtfastmath.c, + ipa-cp.c,ipa-prop.c,ipa-prop.h: Update FSF address. + +2005-08-16 Andrew Pinski + + PR tree-opt/23402 + * gimplify.c (zero_sized_type): New function. + (gimplify_modify_expr_rhs): If we have a zero sized type, + replace the statement with an empty statement. + +2005-08-16 H.J. Lu + + * config/i386/crtfastmath.c (set_fast_math): Add "=m" for + fxsave. + +2005-08-16 Ian Lance Taylor + + * doc/tm.texi (Label Output): Correct typo. + +2005-08-16 Steven Bosscher + + PR target/23376 + * loop-unroll.c (analyze_insn_to_expand_var): Make sure that + force_operand will work later on using have_insn_for. + +2005-08-16 Volker Reichelt + + * fold-const.c (tree_expr_nonnegative_p): Regroup cases. + +2005-08-16 Ian Lance Taylor + + PR c++/23337 + * gimplify.c (gimplify_init_ctor_eval): If we see an element of + vector type, don't try to construct it element by element. Add an + assertion that we use a FIELD_DECL when building a COMPONENT_REF. + +2005-08-16 Volker Reichelt + + * fold-const.c (fold_ternary): Simplify folding of a CALL_EXPR. + +2005-08-16 Geoffrey Keating + + * doc/invoke.texi (Precompiled Headers): Document some more options + which are known to be safe. + +2005-08-16 James E Wilson + + PR tree-optimization/21105 + * c-decl.c (grokdeclarator): Use TYPE_SIZE_UNIT not TYPE_SIZE in + TREE_OVERFLOW check. + +2005-08-16 David Edelsohn + + * config/rs6000/rs6000.md (ltu): Convert to mode macro. + (neg_ltu): Same. + (gtu): Same. + (neg_gtu): Same. + +2005-08-16 Volker Reichelt + + * builtins.c (expand_builtin_strcat): Remove superfluous call to fold. + (fold_builtin_isdigit): Use fold_buildN. + (build_function_call_expr): Likewise. + * c-typeck.c (c_finish_loop): Likewise. + +2005-08-16 J"orn Rennecke + Richard Shann + + PR middle-end/20396: + * optabs.c (expand_binop): Take TRULY_NOOP_TRUNCATION into account. + +2005-08-16 Sebastian Pop + + * tree-ssa-loop-niter.c (scev_probably_wraps_p): Reword a comment. + +2005-08-15 Richard Earnshaw + + PR target/23355 + * arm.c (thumb_compute_save_reg_mask): Use similar logic to + arm_compure_save_reg0_reg12_mask to determine when the PIC register + must be saved. + +2005-08-15 John David Anglin + + PR middle-end/23369 + * fold-const.c (build_range_check): Disable optimization for function + pointer expressions on targets that require function pointer + canonicalization. + +2005-08-15 Ulrich Weigand + + * simplify-rtx.c (simplify_const_relational_operation): When + extracting arguments of a COMPARE, recompute the mode as well. + +2005-08-15 Ian Lance Taylor + + * tree.c (build_string): Mark tree CONSTANT and INVARIANT. + +2005-08-15 DJ Delorie + + * config/m32c/mov.md (movqi_op): Immediates can't be moved to + the stack. + (movsi_splittable): Allow, but split, moves to the stack. + * config/m32c/m32c.c (m32c_split_move): Always split moves to the + stack. + +2005-08-15 Kaveh R. Ghazi + + * aclocal.m4 (gcc_AC_FUNC_PRINTF_PTR): Delete. + * configure.ac: Don't call gcc_AC_FUNC_PRINTF_PTR. + * system.h (HOST_PTR_PRINTF): Don't define, poison it. + + * bitmap.c, c-decl.c, config/i386/i386-interix.h, + config/iq2000/iq2000.c, mips-tfile.c, print-rtl.c, print-tree.c: + Delete HOST_PTR_PRINTF. + + * configure, config.in: Regenerate. + +2005-08-15 David Edelsohn + + * config/rs6000/rs6000.md (QHSI): New mode macro. + (wd): Extend mode attr for QImode and HImode + (dbits): New mode attr. + (zero_extenddi2): Convert to mode macro. + +2005-08-15 Steve Ellcey + + PR target/21841 + * doc/invoke.texi (-mgnu-ld): Update description. + (-mhp-ld): Ditto. + +2005-08-15 Sebastian Pop + + PR 23391 + * Makefile.in (tree-chrec.o): Depends on real.h. + * tree-chrec.c: Include real.h. + (chrec_fold_plus_poly_poly, chrec_fold_multiply_poly_poly, + chrec_fold_plus_1): Use build_real for SCALAR_FLOAT_TYPE_P. + * tree-scalar-evolution.c (add_to_evolution_1, + interpret_rhs_modify_expr): Ditto. + +2005-08-15 Sebastian Pop + + PR 23386 + * tree-data-ref.c (estimate_niter_from_size_of_data): When + step is negative compute the estimation from init downwards to zero. + +2005-08-14 James A. Morrison + + * fold-const (fold_binary): Call fold_build2 instead of fold (build. + +2005-08-14 Ulrich Weigand + + * config/s390/s390.c (s390_const_ok_for_constraint_p): Add 'P' + constraint. + (legitimate_reload_constant_p): Fix handling of lliXX operands. + Accept double-word constants that can be split. + * config/s390/s390.md ("movti"): Use 'P' constraint. + ("*movdi_31", "*movdf_31"): Likewise. + +2005-08-14 Daniel Berlin + + Fix PR tree-optimization/22615 + + * tree-ssa-structalias.c (solution_set_add): Handle + first_vi_for_offset returning NULL. + (do_da_constraint): Ditto. + (do_sd_constraint): Ditto. + (do_ds_constraint): Ditto + (find_func_aliases): Ditto. + (build_constraint_graph): RHS is allowed be ANYTHING. + (first_vi_for_offset): Return NULL if we couldn't find anything at + the offset. + +2005-08-14 Ulrich Weigand + + * config/s390/s390.c (s390_canonicalize_comparison): Prefer register + over memory as first operand. + +2005-08-14 H.J. Lu + + PR target/23360 + * config/i386/crtfastmath.c (set_fast_math): Check if DAZ is + available for setting it. + +2005-08-14 Ira Rosen + + PR tree-optimization/23320 + * tree-data-ref.c (base_addr_differ_p): Add comment. Check + data-refs' types instead of base object nullness. Add check for + pointer type data-refs before first location comparison. Remove + assert. + +2005-08-14 Andreas Schwab + + * doc/md.texi (Machine Constraints): Fix misplaced @end table. + +2005-08-13 James E Wilson + + * doc/cpp.texi (__SSP__, __SSP_ALL__): Document. + * doc/invoke.texi (-Wstack-protector, -fstack-protector, + -fstack-protector-all, --param ssp-buffer-size): Document. + (-Wvariadic-macros): Alphabetize. + (-fsched-stalled-insns-dep): Add missing 'f'. + + * c-cppbuiltin.c (c_cpp_builtins): Add comment for flag_stack_protect + macros. + +2005-08-13 David Edelsohn + + * config/rs6000/rs6000.h (EXTRA_CONSTRAINT): Add 'a' for indexed + or indirect address operand. + (EXTRA_ADDRESS_CONSTRAINT): New. + * config/rs6000/rs6000.md (prefetch): Change constraint "p" to "a". + +2005-08-13 Sebastian Pop + + PR tree-optimization/22236 + * tree-cfg.c (print_pred_bbs, print_succ_bbs): Correctly print + successors and predecessors. + * tree-chrec.c (chrec_convert): Before converting, check that + sequences don't wrap. + * tree-data-ref.c (compute_estimated_nb_iterations): Moved ... + (analyze_array): Extern. + (find_data_references_in_loop): Remove call to + compute_estimated_nb_iterations. + * tree-data-ref.h (analyze_array): Declared. + * tree-flow-inline.h (single_ssa_tree_operand, single_ssa_use_operand, + single_ssa_def_operand, zero_ssa_operands): Fix documentation. + * tree-flow.h (scev_probably_wraps_p): Declare with an extra parameter. + * tree-scalar-evolution.c (instantiate_parameters_1): Factor entry + condition. + * tree-ssa-loop-ivcanon.c: Fix documentation. + * tree-ssa-loop-ivopts.c (idx_find_step): Add a fixme note. + * tree-ssa-loop-niter.c (compute_estimated_nb_iterations): ... here. + (infer_loop_bounds_from_undefined): New. + (estimate_numbers_of_iterations_loop): Use + infer_loop_bounds_from_undefined. + (used_in_pointer_arithmetic_p): New. + (scev_probably_wraps_p): Pass an extra parameter. Call + used_in_pointer_arithmetic_p. Check that AT_STMT is not null. + (convert_step): Fix documentation. + * tree-vrp.c (adjust_range_with_scev): Call instantiate_parameters. + Use initial_condition_in_loop_num and evolution_part_in_loop_num + instead of CHREC_LEFT and CHREC_RIGHT. Adjust the call to + scev_probably_wraps_p. + +2005-08-13 Ulrich Weigand + + * config/s390/s390.c (s390_split_branches): Revert 2005-08-12 change. + (s390_register_info): Ignore clobbered_regs information for fixed + registers, and only fixed registers. + (s390_init_frame_layout): Remove redundant call. + +2005-08-12 Gerald Pfeifer + + * doc/invoke.texi (C++ Dialect Options): Add dynamic_cast to + description of -Wold-style-casts. + +2005-08-12 Andreas Krebbel + Jakub Jelinek + + * config/s390/linux.h (TARGET_THREAD_SSP_OFFSET): Define. + * config/s390/s390-protos.h (s390_get_thread_pointer): Prototype added. + * config/s390/s390.c (print_operand): New output modifier 'G' added. + (get_thread_pointer): Renamed to s390_get_thread_pointer. + * config/s390/s390.md (stack_protect_set, stack_protect_test): If + TARGET_THREAD_SSP_OFFSET is defined, change operands[1] to + (MEM:P (PLUS:P (tp, TARGET_THREAD_SSP_OFFSET))). + (UNSPEC_SP_SET, UNSPEC_SP_TEST): New constants. + ("stack_protect_set", "stack_protect_test"): New expanders. + ("stack_protect_setsi", "stack_protect_setdi", "stack_protect_testsi", + "stack_protect_testdi"): New insn definitions. + +2005-08-12 Andreas Krebbel + + * config/s390/s390.md ("*movdf_31"): Changed constraint from P to K. + +2005-08-12 Paul Brook + + * config/arm/lib1funcs.asm: Error if __ARM_ARCH__ not set. + +2005-08-12 Andreas Krebbel + + * config/s390/predicates.md (setmem_operand): New predicate. + (shift_count_operand): Accept ANDs with special constants as + operand. + * config/s390/s390.c (print_shift_count_operand): Skip ANDs + with special constants. + * config/s390/s390.md ("setmem_long", "*setmem_long"): Replaced + shift_count_operand with setmem_operand. + +2005-08-12 Andreas Krebbel + + * config/s390/s390.c (s390_extract_part, s390_single_part): + Type cast added. + (s390_const_ok_for_constraint_p): Added SImode to the N constraint. + (s390_output_mi_thunk): Don't use lg on 31 bit. + * config/s390/s390.md ("*movdi_31", "*movdf_31"): Added lmy and stmy. + ("*llgt_sisi" and splitter): Replaced TARGET_64BIT with TARGET_ZARCH. + +2005-08-12 Andreas Krebbel + + * config/s390/s390.c (CONST_OK_FOR_J, CONST_OK_FOR_K): New macros. + (s390_select_ccmode, s390_rtx_costs, legitimate_reload_constant_p, + s390_init_frame_layout, s390_emit_prologue, s390_emit_epilogue, + s390_output_mi_thunk): Replaced uses of CONST_OK_FOR_CONSTRAINT_P + with one of the new macros. + +2005-08-12 Andreas Krebbel + + * config/s390/s390.c (s390_split_branches, s390_init_frame_layout): + Don't set save_return_addr_p. + (s390_register_info): Make clobbered_regs not depending on + save_return_addr_p. + +2005-08-12 Kaz Kojima + + * gcc.c (LINK_SSP_SPEC): Remove space before a trailing }. + (LINK_COMMAND_SPEC): Add space after %(link_ssp). + +2005-08-11 James E. Wilson + + * config/ia64/ia64.h (EXTRA_MEMORY_CONSTRAINT): New. + +2005-08-11 Jakub Jelinek + + * dwarf2out.c (add_location_or_const_value_attribute): Prefer + locations gathered by var-tracking in single entry loc_list + over loc_descriptor_from_tree. + + * dwarf2out.c (concat_loc_descriptor): Add can_use_fbreg argument, + pass it down to loc_descriptor. + (loc_descriptor): Pass can_use_fbreg to concat_loc_descriptor. + (containing_function_has_frame_base): Move earlier in the file. + (loc_descriptor_from_tree_1): Use containing_function_has_frame_base + instead of always assuming fbreg can't be used. + +2005-08-11 David Edelsohn + + * config/rs6000/altivec.md: Change constraint "m" to "Z". + * config/rs6000/predicates.md (indexed_or_indirect_operand): + Accept address wrapped in AND for Altivec. + * config/rs6000/rs6000.c (rs6000_legitimize_reload_address): + Strip AND wrapping offset address for Altivec. + +2005-08-11 Richard Henderson + + PR middle-end/23312 + * gimplify.c (gimplify_one_sizepos): Check for INTEGER_TYPE + before using TYPE_IS_SIZETYPE. + +2005-08-11 Richard Henderson + + PR target/22225 + * config/alpha/alpha.c (alphaev4_insn_pipe): Add take pipes for + insn types not present on ev4. + (alphaev5_insn_pipe): Similarly. + +2005-08-11 Richard Earnshaw + + PR target/23250 + * arm.c (arm_override_options): If the user has selected callee-super- + interworking, then enable normal interworking. + +2005-08-11 Rainer Orth + + * config/i386/x86-64.h (ASM_OUTPUT_ALIGNED_BSS): Undef before + redefinition. + +2005-08-11 Wu Zhou + + * doc/rtl.texi: Fix two typos. + +2005-08-11 Richard Guenther + + PR target/23289 + * config/i386/i386.c (ix86_function_ok_for_sibcall): Handle + cases where we call to/from functions returning void. + +2005-08-10 James A. Morrison + + PR c++/23225 + * tree.c (build_pointer_type_for_mode): Robustify. + +2005-08-10 James E Wilson + + * defaults.h, config/alpha/alpha.h, config/ia64/ia64.h + (ASM_OUTPUT_ADDR_VEC_ELT): Delete. + + * config/alpha/alpha.c (alpha_arg_partial_bytes): Change "(CUM)." to + "cum->". + +2005-08-10 Eric Christopher + + * config/rs6000/rs6000.c (mems_ok_for_quad_peep): Rewrite. + * config/rs6000/rs6000.md (*lfq_power2, *stfq_power2): Use + V2DFmode. + +2005-08-10 Andrew Pinski + + PR target/21887 + * config/darwin.c (machopic_indirect_data_reference): Use a new register + for the high part when generating dynamic-no-pic code. + +2005-08-10 H.J. Lu + + * config.gcc (i[34567]86-*-linux*): Add i386/t-crtfm to tm-file. + (x86_64-*-linux*): Likewise. + + * config/i386/crtfastmath.c: New file. + * config/i386/t-crtfm: Likewise. + + * config/i386/linux.h (ENDFILE_SPEC): New. + * config/i386/linux64.h (ENDFILE_SPEC): Likewise. + + * config/i386/t-linux64 (EXTRA_MULTILIB_PARTS): Add + crtfastmath.o. + +2005-08-10 Dorit Nuzman + + * doc/md.texi: (reduc_smin, reduc_umin, reduc_splus, reduc_uplus): + (vec_shl, vec_shr): Document new operations. + * tree.def (VEC_RSHIFT_EXPR, VEC_LSHIFT_EXPR): Fix comment. + +2005-08-10 David Edelsohn + + * config/rs6000/predicates.md (indexed_or_indirect_address): New. + * config/rs6000/rs6000.md (prefetch): Remove operand 0 mode and + change predicate to indexed_or_indirect_address. + +2005-08-10 Richard Sandiford + + * config/arm/lib1funcs.asm (__aeabi_uidiv, __aeabi_idiv): New aliases. + * config/arm/libgcc-bpabi.ver (GCC_3.5): Add __aeabi_idiv, + __aeabi_uidiv, __aeabi_uread4, __aeabi_uread8, __aeabi_uwrite4 + and __aeabi_uwrite8. + * config/arm/unaligned-funcs.c: New file. + * config/arm/t-bpabi (LIB2FUNCS_EXTRA): Add unaligned-funcs.c. + +2005-08-09 Paolo Bonzini + + * bb-reorder.c (pass_duplicate_computed_gotos, pass_partition_blocks): + Add dump. + * cfglayout.c (pass_insn_locators_initialize): Add dump. + * emit-rtl.c (pass_unshare_all_rtl, pass_remove_unnecessary_notes): + Add dump. + * except.c (pass_convert_to_eh_region_ranges): Add dump. + * final.c (pass_shorten_branches): Add dump. + * flow.c (pass_recompute_reg_usage, pass_remove_death_notes): Add dump. + (pass_life): Rename dump. + (rest_of_handle_flow2): Remove initial verify_flow_info. + * function.c (pass_instantiate_virtual_regs): Add dump. + * integrate.c (pass_initial_value_sets): Add dump. + * jump.c (pass_cleanup_barriers, pass_purge_lineno_notes): Add dump. + * loop-init.c (pass_rtl_loop_init, pass_rtl_loop_done): Rename dump. + (pass_rtl_move_loop_invariants, pass_rtl_unswitch, pass_rtl_doloop, + pass_rtl_unroll_and_peel_loops): Rename dump and add gate. + (gate_rtl_move_loop_invariants, gate_rtl_unswitch, gate_rtl_doloop, + gate_rtl_unrool_and_peel_loops): New. + (rtl_move_loop_invariants, rtl_unswitch, rtl_unrool_and_peel_loops, + rtl_doloop): Do not look at flags. + * mode-switching.c (pass_mode_switching): Add dump. + * recog.c (pass_split_all_insns, pass_split_for_shorten_branches, + pass_split_before_regstack): Add dump. + * regmove.c (pass_stack_adjustments): Add dump. + * tree-optimize.c (pass_fixup_cfg): Add dump. + +2005-08-10 Kazuhiro Inaoka + + PR 23309 + * config/m32r/m32r.c (m32r_reload_lr): Fix off by one error when + deciding which instruction sequence to use. + +2005-08-09 Dorit Nuzman + + * tree-vect-transform.c (vect_create_epilog_for_reduction): Set + BIT_FIELD_REF_UNSIGNED for newly created BIT_FIELD_REFs. + +2005-08-09 Richard Guenther + + * c-common.c (builtin_function_2): Remove. + (def_builtin_1): New function. + (c_common_nodes_and_builtins): Use def_builtin_1 to + build builtin functions. + +2005-08-09 Jie Zhang + + * config/bfin/uclinux.h (NO_IMPLICIT_EXTERN_C): Define. + * config/bfin/elf.h (NO_IMPLICIT_EXTERN_C): Define. + * config/bfin/bfin.c (bfin_return_in_memory): Update to really match + Visual DSP. + +2005-08-09 James A. Morrison + + * tree-ssa-loop-niter.c (tree_simplify_using_condition_1): Use + fold_binary instead of fold_build2 since we don't care about the + resulting tree. + (loop_niter_by_eval): Likewise. + (compare_trees): Likewise. + (proved_non_wrapping_p): Likewise. + +2005-08-09 James A. Morrison + + PR c/23161 + PR c/23165 + * c-typeck.c (c_finish_if_stmt): Look into STATEMENT_LISTs to see + if the if is really empty. + +2005-08-09 Steven Bosscher + + PR tree-optimization/23234 + * tree-ssa-math-opts.c (place_reciprocal): New enum. + (execute_cse_reciprocals_1): Replace the 'phi' argument with an + argument of the new enum. + (execute_cse_reciprocals): Add reciprocals for function arguments + on the unique successor edge of the entry block. Update other calls + to execute_cse_reciprocals_1. + +2005-08-08 Richard Henderson + + PR 22439 + * gimplify.c (gimplify_one_sizepos): Preserve the original type. + +2005-08-08 Bob Wilson + + * expr.c (write_complex_part): Return after handling MEM. + +2005-08-08 Josh Conner + + PR rtl-optimization/23241 + * combine.c (simplify_comparison): Fix error in determining + whether to lift a subreg from comparison. + +2005-08-08 David Edelsohn + + PR target/18506 + * config/rs6000/altivec.md (vec_init): New. + (vec_set): New. + (vec_extract): New. + * config/rs6000/rs6000.c (rs6000_expand_vector_init): New. + (rs6000_expand_vector_set): New. + (rs6000_expand_vector_extract): New. + (rs6000_legitimate_offset_address_p): Offset addresses are valid + for Altivec modes before reload. + (altivec_expand_vec_init_builtin): New. + (get_element_number): New. + (altivec_expand_vec_set_builtin): New. + (altivec_expand_vec_ext_builtin): New. + (altivec_expand_builtin): Expand vec_init, vec_set, and vec_ext + builtins. + (altivec_init_builtins): Init vec_init, vec_set, and vec_ext + builtins. + * config/rs6000/rs6000.h (rs6000_builtins): Add + ALTIVEC_BUILTIN_VEC_INIT_, ALTIVEC_BUILTIN_VEC_SET_, + ALTIVEC_BUILTIN_VEC_EXT_. + * config/rs6000/rs6000-protos.h: Declare new functions. + +2005-08-08 Jan Hubicka + + * i386.c (legitimate_pic_address_disp_p): Refuse GOTOFF in 64bit mode. + (legitimate_address_p): Refuse GOT and GOTOFF in 64bit mode. + * i386.md (movdi*): Use pic_32bit_operand. + * predicates.md (pic_32bit_operand): New. + +2005-08-08 Nathan Sidwell + + PR c++/21166 + * stor-layout.c (finalize_type_size): Undo DECL_PACKED when possible. + +2005-08-07 James A. Morrison + + * tree-vrp.c (simplify_div_or_mod_using_range): Use build2. + (test_for_singularity): Use fold_build2. + +2005-08-07 John David Anglin + + * pa64-regs.h (CONDITIONAL_REGISTER_USAGE): Fix loop upper bound. + +2005-08-07 Danny Smith + + * config/i386/cygming.h (SUBTARGET_ENCODE_SECTION_INFO): Define. + (COMMON_ASM_OP) Define. + * config/i386/i386.c (ix86_in_large_data_p): Add ATTRIBUTE_UNUSED + (ix86_encode_section_info): Likewise. + (TARGET_ENCODE_SECTION_INFO): Conditionally define as + SUBTARGET_ENCODE_SECTION_INFO. + +2005-08-06 Richard Henderson + + PR 21894 + * tree-nested.c (convert_local_reference): Save and restore val_only + around component_ref and friends. Clear walk_subtrees by default. + +2005-08-06 Peter O'Gorman + + PR 21366 + * gcc.c (process_command): Check the argument to -b has a dash. + * doc/invoke.texi: Update -b and -V docs. + +2005-08-06 James E Wilson + + * config/mips/cross64.h, config/mips/t-cross64: Delete. + +2005-08-06 Michael Matz + + * genattrtab.c (write_attr_get, write_attr_case): Use insn_code + member only if only one insn is associated with the value. + +2005-08-06 Nick Clifton + + * config/stormy16/stormy16.h (SYMBOL_FLAG_XSTORMY16_BELOW100): + New define. + (ASM_OUTPUT_LABELREF): Delete - it is no longer needed. + * config/stormy16/stormy16.c (xstormy16_below100_symbol): + Check symbol flags instead of symbol name mangling. + (xstormy16_asm_output_aligned_common): Likewise. Also + simplify code since the bss100_section cass is the only case + where the below100 code will be triggered. + (xstormy16_encode_section_info): Encode below100 attribute + using the SYMBOL_FLAG_XSTORMY16_BELOW100 instead of mangling + the name. + (xstormy16_strip_name_encoding): Delete - this function is no + longer needed. + (TARGET_STRIP_NAME_ENCODING): Undefine. + * config/stormy16/stormy16-protos.h: Delete prototype for + xstormy16_strip_name_encoding. + +2005-08-06 Kazu Hirata + + * Makefile.in, cfgexpand.c, cfgloop.h, cfgloopmanip.c, + config.gcc, ipa-cp.c, ipa-prop.c, ipa-prop.h, reg-stack.c, + tree-ssa-structalias.c, tree-vrp.c, value-prof.c, vec.h, + config/linux.h, config/alpha/alpha.h, config/alpha/linux.h, + config/alpha/predicates.md, config/arc/arc.h, + config/arm/arm.h, config/arm/ieee754-df.S, + config/arm/ieee754-sf.S, config/bfin/bfin.c, + config/bfin/bfin.h, config/c4x/c4x.h, config/crx/crx.c, + config/fr30/fr30.h, config/frv/frv.h, config/h8300/h8300.h, + config/i386/i386.h, config/ia64/ia64.c, config/ia64/ia64.h, + config/m68hc11/m68hc11.h, config/mips/mips.c, + config/mips/mips.h, config/mips/openbsd.h, + config/mn10300/mn10300.h, config/pa/pa.c, config/pa/pa.h, + config/pdp11/pdp11.h, config/rs6000/linux-unwind.h, + config/rs6000/rs6000.c, config/rs6000/rs6000.h, + config/s390/s390.c, config/sh/sh.c, config/sh/sh.h, + config/sparc/linux.h, config/sparc/linux64.h, + config/sparc/sparc.h, config/v850/v850.h, config/vax/vax.h, + doc/extend.texi, doc/gcov.texi, doc/install.texi, + doc/invoke.texi, doc/rtl.texi, doc/tm.texi: Fix comment/doc + typos. Follow spelling conventions. + +2005-08-06 Joseph S. Myers + + PR c/23113 + * stmt.c (warn_if_unused_value): Check TREE_NO_WARNING at start. + Don't handle NOP_EXPR, CONVERT_EXPR and NON_LVALUE_EXPR + specially. Check for side effects only for COND_EXPR. + * c-typeck.c (c_finish_stmt_expr): Mark statement expression + return with TREE_NO_WARNING. + +2005-08-06 Richard Sandiford + + PR rtl-optimization/23233 + * loop.c (combine_movables): Require the modes to be the same. + (move_movables): Remove handling of cases where the replacement + had a different mode to the original. + +2005-08-05 James A. Morrison + + PR tree-optimization/23128 + * tree-vrp.c (vrp_int_const_binop): Check if unsigned addition or + subtraction wrap, and set TREE_OVERFLOW if they do. + +2005-08-05 Richard Henderson + + PR 21728 + * tree-cfg.c (remove_bb): Transmute DECL_NONLOCAL labels into + FORCED_LABEL labels. + +2005-08-05 J"orn Rennecke + + PR middle-end/23135 + * reload.c (find_reloads_subreg_address): Pass down TYPE + unchanged. Change all callers except find_reloads_toplev. + +2005-08-05 Michael Matz + + * genattrtab.c (current_alternative_string): Remove. + (SIMPLIFY_ALTERNATIVE): Ditto. + (attr_alt_bit_p): Ditto. + (alternative_name): Make const char *. + (evaluate_eq_attr): Remove use of above things. + (simplify_test_exp): Ditto. + (simplify_test_exp ): Guard for insn_code < 0 . + (simplify_test_exp ): Correct typo (test 'right' not 'left'). + +2005-08-04 James E Wilson + + * config/ptx4.h, config/sol2.h, config/arm/freebsd.h, + config/arm/linux-elf.h, config/frv/frv.h, config/i386/freebsd.h, + config/i386/freebsd64.h, config/i386/netware.h, config/i386/sco5.h, + config/ia64/freebsd.h, config/rs6000/sysv4.h, config/sparc/freebsd.h + (LINK_SPEC): Delete useless %{Wl,*:%*} item. + +2005-08-04 Richard Henderson + + PR 21529 + * params.def (PARAM_SRA_MAX_STRUCTURE_COUNT): New. + * params.h (SRA_MAX_STRUCTURE_COUNT): New. + * tree-sra.c (decide_block_copy): Use it. Disable element copy + if we'd have to instantiate too many members. + +2005-08-04 Richard Henderson + + PR 21291 + * tree-outof-ssa.c (coalesce_asm_operands): New. + (coalesce_ssa_name): Use it. Split out ... + (coalesce_phi_operands, coalesce_result_decls): ... these. + +2005-08-04 Paul Brook + + * read-rtl.c (read_quoted_string): Break if EOF. + +2005-08-04 Andrew Pinski + + * tree.h (fold_build1): Change to macro and call fold_build1_stat. + (fold_build2): Likewise. + (fold_build3): Likewise. + (fold_build1_stat): New function prototype. + (fold_build2_stat): Likewise. + (fold_build3_stat): Likewise. + * fold-const.c (fold_build1): Rename to .. + (fold_build1_stat): this. Add MEM_STAT_DECL. Pass the mem stats + through to build1_stat. + (fold_build2): Rename to .. + (fold_build2_stat): this. Add MEM_STAT_DECL. Pass the mem stats + through to build2_stat. + (fold_build3): Rename to .. + (fold_build3_stat): this. Add MEM_STAT_DECL. Pass the mem stats + through to build3_stat. + +2005-08-04 David Edelsohn + Ian Lance Taylor + + * function.c (assign_stack_local_1): Do not correct stack slot + address if allocation size is smaller than mode size. + +2005-08-04 Diego Novillo + + PR 22037 + * tree-cfg.c (replace_uses_by): Call mark_new_vars_to_rename. + (tree_merge_blocks): Propagate anything allowed by + may_propagate_copy. + Clarify documentation. + * passes.c (execute_todo): If cleanup_tree_cfg invalidated the + SSA form, schedule an update if necessary. + +2005-08-04 Gerald Pfeifer + + * doc/install.texi (Binaries): Remove broken link to + Sinix/Reliant Unix binaries. + +2005-08-03 Richard Henderson + + PR 23221 + * function.c (stack_protect_epilogue): Export. + * tree.h (stack_protect_epilogue): Declare. + * calls.c (expand_call): Call it. + +2005-08-03 Eric Christopher + + * gcc.c (LINK_SSP_SPEC): Add fstack-protector-all. + * config/darwin.h (LINK_COMMAND_SPEC): Add link_ssp + spec. + +2005-08-04 Jan Hubicka + + * profile.c (branch_prob): Split edges with goto locus on them + to get proper line counts. + * tree-cfg.c (make_cond_expr_edges): Record user goto locuses, if any. + +2005-08-03 Paul Brook + + * function.c (assign_parms): Round current_function_args_size + to PARM_BOUNDARY, not STACK_BOUNDARY. + +2005-08-03 Geoffrey Keating + + * config/i386/i386.c (x86_elf_aligned_common) + (x86_output_aligned_bss): Don't try to use symbols that aren't defined. + +2005-08-03 Zdenek Dvorak + + PR tree-optimization/23157 + * tree-scalar-evolution.c (scev_const_prop): Unshare trees + before emitting them. + +2005-08-03 Volker Reichelt + + PR tree-optimization/19899 + * Makefile.in (tree-scalar-evolution.o): Add real.h. + * tree-scalar-evolution.c: Include real.h. + (add_to_evolution): Build constant -1 of correct type. + +2005-08-03 Jan Hubicka + + * cfgloop.h (DLTHE_FLAG_COMPLETTE_PEEL): New flag. + * cfgloopmanip.c (duplicate_loop_to_header_edge): Special case + profile updating for complette unrolling. + * loop-unroll.c (peel_loop_completely): Use it. + * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Likewise. + (tree_unroll_loops_completely): Disable code growing unrolling of cold + loops. + +2005-08-03 Paul Brook + + * combine.c (can_change_dest_mode): New function. + (try_combine, simplify_set): Use it. + +2005-08-03 Eric Botcazou + + * config/ia64/hpux.h (MEMBER_TYPE_FORCES_BLK): Only force + TFmode to BLKmode. + +2005-08-03 Gerald Pfeifer + + * doc/install.texi (Specific): Adjust link to openavr.org. + (Specific): Remove broken reference to GCC 2.8.1 for OS/2. + (Binaries): Adjust HP-UX Porting Center link. + (Binaries): Adjust Free Software Foundation ordering link. + +2005-08-03 Andrew Pinski + + * convert.c (convert_to_integer): Use fold_build1 instead of + build1 when converting an integer to an integer. + +2005-08-02 Richard Henderson + + * combine.c (combine_instructions): Don't use reg_equal/equiv + results if the mode doesn't match. + +2005-08-02 Mark Mitchell + + * config/i386/t-mingw32 (NATIVE_SYSTEM_HEADER_DIR): Set it. + * doc/fragments.texi (NATIVE_SYSTEM_HEADER_DIR): Document it. + +2005-08-02 Richard Henderson + + PR 23196 + * explow.c (memory_address): Remove special-case for + virtual_stack_vars_rtx and virtual_incoming_args_rtx. + +2005-08-02 Diego Novillo + + PR 23164 + * tree-cfgcleanup.c (cleanup_tree_cfg): Do not limit the + number of calls to cleanup_tree_cfg_1. + +2005-08-02 Martin Reinecke + + * doc/invoke.texi: document file extensions .F90 and .F95 + +2005-08-02 Richard Guenther + + * fold-const.c (tree_expr_nonnegative_p): frexp(x, &e) is + positive if its first argument is positive. + +2005-08-02 Richard Guenther + + PR tree-optimization/23177 + * tree-ssa-operands.c (get_tmr_operands): Use get_expr_operands + on TMR_TAG. + +2005-08-02 James A. Morrison + + PR tree-optimization/23129 + * tree-vrp.c (extract_range_from_binary_expr): Set value range to + varying for divisions with anti-ranges. + +2005-08-02 Jan Hubicka + + * tree-ssa-dom.c (thread_across_edge): Remove updating here. + * tree-ssa-threadupdate.c (thread_block): Add it here. + +2005-08-01 James E Wilson + + * config/mips/mips.c (mips_encode_section_info, mips_attribute_table, + TARGET_ENCODE_SECTION_INFO, TARGET_ATTRIBUTE_TABLE): New. + * config/mips/mips.h (SYMBOL_FLAG_LONG_CALL, SYMBOL_REF_LONG_CALL_P): + New. + * config/mips/predicates.md (const_call_insn_operand): Add check for + SYMBOL_REF_LONG_CALL_P. + * doc/extend.texi (long_call): Document the new attribute. + +2005-08-01 Ian Lance Taylor + Richard Henderson + + * Makefile.in (RTL_BASE_H): Add real.h. + * real.h (REAL_VALUE_FROM_CONST_DOUBLE): Use structure copy + instead of memcpy. + * emit-rtl.c (const_double_from_real_value): Likewise; use rtx.u.rv + directly. + * rtl.c (rtl_check_failed_code_mode): New. + * rtl.h (struct rtx_def): Add u.rv. + (XCMWINT, XCNMPRV): New. + (CONST_DOUBLE_LOW, CONST_DOUBLE_HIGH): Use XCMWINT. + (CONST_DOUBLE_REAL_VALUE): Use XCNMPRV; constify. + +2005-08-01 Richard Henderson + + * dwarf2out.c (mem_loc_descriptor): Use XEXP, not SUBREG_REG, + with auto-inc codes. + + * config/alpha/predicates.md (and_operand): Test mode of CONST_DOUBLE. + +2005-08-01 Jan Hubicka + + * i386-protos.h (asm_preferred_eh_data_format): Declare. + * i386.c: Include dwarf2.h + (asm_preferred_eh_data_format): New. + * i386.h (ASM_PREFERRED_EH_DATA_FORMAT): Move offline. + +2005-08-01 Ian Lance Taylor + + * config/host-linux.c (linux_gt_pch_get_address): Add new name + randomize_va_space for virtual address randomization control. + +2005-08-01 Steven Bosscher + + * common.opt (flag_ipa_cp): Put in right place to maintain + alphabetic sort. + +2005-08-01 Jan Hubicka + + * profile.c (compute_value_histograms): Fix thinko. + * value-prof.c: Include toplev.h + (check_counter): New function. + (tree_divmod_fixed_value_transform, tree_mod_pow2_value_transform, + tree_mod_subtract_transform): Add sanity check. + +2005-08-01 Richard Guenther + + PR tree-optimization/23133 + * tree-ssa-math-opts.c (execute_cse_reciprocals): Walk + current functions parameter decls to find defs to cse + reciprocals of. + +2005-08-01 Richard Guenther + + PR tree-optimization/23109 + * tree-ssa-math-opts.c (execute_cse_reciprocals_1): + If trapping math is in effect, use post-dominator information + to check if we'd in any case reach a trapping point before + doing the reciprocal insertion. + (execute_cse_reciprocals): Compute post-dominators, if necessary. + * tree-ssa-loop-im.c (determine_invariantness_stmt): RDIV + expressions are invariant only if trapping math is not in effect. + +2005-08-01 Razya Ladelsky + + * cgraph.h (update_call_expr, cgraph_copy_node_for_versioning, + cgraph_function_versioning): New declarations. + * cgraphunit.c: Add include to ipa-prop.h. + (update_call_expr, cgraph_copy_node_for_versioning, + cgraph_function_versioning): New functions. + * integrate.c (copy_decl_for_inlining): Remove. + * ipa-prop.h (ipa_replace_map): New struct. + (struct ipa_node): Add ipcp_orig_node, count_scale, new fields. + * ipa-cp.c (ipcp_method_orig_node, ipcp_method_is_cloned, + ipcp_method_set_orig_node, ipcp_cloned_create, ipcp_method_get_scale, + ipcp_method_set_scale, ipcp_method_compute_scale, ipcp_after_propagate, + ipcp_iterate_stage, ipcp_method_scale_print, + ipcp_profile_mt_count_print, ipcp_profile_cs_count_print, + ipcp_profile_edge_print, ipcp_profile_bb_print , ipcp_profile_print, + ipcp_replace_map_create, ipcp_redirect, ipcp_update_callgraph, + ipcp_update_bb_counts, ipcp_update_profiling, + ipcp_update_edges_counts): New functions. + (ipcp_method_cval_init): Remove restriction regarding local methods. + (ipcp_init_stage): Add ipcp_method_compute_scale. + (ipcp_insert_stage): Add versioning. + (ipcp_structures_print): Add ipcp_method_scale_print. + (ipcp_driver): Dump profiling info. + * Makefile.in: Remove integrate.h dependency from tree-inline.o. + Add ipa-prop.h dependency to tree-inline.o and cgraphunit.o. + * tree-inline.c: Remove include to integrate.h, Add include ipa-prop.h. + (struct inline_data): Add versioning_p, ipa_info, new fields. + (remap_decl, mark_local_for_remap_r, setup_one_parameter, + declare_return_variable): Replace calls to copy_decl_for_inlining with + copy_decl_for_dup. + (copy_body_r, copy_bb, copy_cfg_body, copy_tree_r, inlining_p): Add + versioning support. + (copy_decl_for_dup): Rename from copy_decl_for_inlining. + Add argument VERSIONING. + (copy_arguments_for_versioning, copy_static_chain, + function_versionable_p, tree_versionable_function_p, + tree_function_versioning, replace_ref_tree): New functions. + * tree-inline.h: Include varray.h. + (tree_versionable_function_p, tree_function_versioning, + tree copy_decl_for_dup): New declarations. + +2005-08-01 Razya Ladelsky + + * ipa-cp.c: New file. Contains IPCP specific functionality. + * ipa-prop.h: New file. Contains structures/definitions that can be + used by several interprocedural data flow optimizations (and also IPCP). + * ipa-prop.c: New file. + * Makefile.in: Add ipa-cp.c, ipa-prop.h, ipa-prop.c. + * common.opt: Add ipa-cp flag. + * timevar.def: Add IPCP optimization. + * tree-optimize.c (init_tree_optimization_passes): Schedule + pass_ipa_cp. + * tree-pass.h (pass_ipa_cp): Declare. + +2005-08-01 Kazu Hirata + + * dwarf2out.c, fold-const.c, ipa-type-escape.c, + loop-invariant.c, predict.c, predict.def, reload1.c, reorg.c, + tree-sra.c, config/arm/arm.c, config/crx/crx.c, + config/i386/i386.c, config/mips/mips.h, + config/rs6000/rs6000.h, config/sh/sh.c, + config/stormy16/stormy16.c: Fix comment typos. + +2005-08-01 Joseph S. Myers + + PR c/22311 + * c-typeck.c (build_binary_op): Use common_type wrapper on + shortened types. + (common_type): Update comment. + +2005-07-31 Steven Bosscher + + PR target/23095 + * common.opt (flag_gcse_after_reload): Don't initialize to 2. + (flag_rerun_cse_after_loop): Initialize this to 2 instead. + * postreload-gcse.c (hash_scan_set): Do not consider stack regs. + +2005-07-31 Jan Hubicka + + * pretty-print.h (pp_widest_integer): New macro. + * tree-pretty-print.c (dump_bb_header): Print BB frequencies and + counts. + +2005-07-31 Jan Hubicka + + * output.h (enum section_category): Export from varasm.c + (categorize_decl_for_section): Likewise. + * varasm.c (enum section_category): Kill. + (categorize_decl_for_section): Make global. + * i386-protos.h (x86_output_aligned_bss, x86_elf_aligned_common): + Declare. + * i386.c (ix86_section_threshold): New static variable. + (ix86_in_large_data_p, ix86_encode_section_info, + x86_64_elf_unique_section, + x86_64_elf_select_section): New functions. + (TARGET_ENCODE_SECTION_INFO): Define + (override_options): Enable medium model for PIC. + (ix86_expand_prologue): Expand gen_set_got_rex64. + (legitimate_constant_p): Handle new UNSPECs. + (legitimate_pic_address_disp_p): Likewise. + (legitimize_pic_address): Lower MEDIUM model addressing. + * i386.h (PIC_OFFSET_TABLE_REGNUM): Set for medium model PIC. + (enum cmodel): Add MEDIUM_PIC. + (SYMBOL_REF_FAR_ADDR_P): New macro. + (SYMBOL_FLAG_FAR_ADDR): New flag. + * i386.md (movdi): Support medium model. + (set_got_rex64): New pattern. + * i386.opt (mlarge-data-threshold): New flag. + * predicates.md (zext_operand/sext_operand): Deal with medium model. + * x86-64.h (ASM_OUTPUT_ALIGNED_BSS): Use x86_output_aligned_bss. + (ASM_OUTPUT_ALIGNED_COMMON, TARGET_ASM_SELECT_SECTION, + TARGET_ASM_UNIQUE_SECTION): New. + + * invoke.texi (-mlarge_data_threshold): Document + +2005-07-31 Jan Hubicka + + * tree-outof-ssa.c (coalesce_ssa_name): Use coalesce_cost. + (coalesce_vars): Likewise. + * tree-ssa-live.c (coalesce_cost): New. + (build_tree_conflict_graph): Use coalesce_cost. + * tree-ssa-live.h (coalesce_cost): Declare. + +2005-07-30 Richard Earnshaw + + * arm.md (all peepholes for post-increment operations): Delete. + (strqi_preinc, strqi_predec, loadqi_preinc, loadqi_predec) + (loadqisi_preinc, loadqisi_predec, strsi_preinc, strsi_predec) + (loadsi_preinc, loadsi_predec, strqi_shiftpreinc, strqi_shiftpredec) + (loadqi_shiftpreinc, loadqi_shiftpredec, strsi_shiftpreinc) + (strsishift_predec, loadsi_shiftpreinc, loadsi_shiftpredec): Delete. + +2005-07-30 James A. Morrison + + * fold-const.c (tree_expr_nonnegative_p): Always return true for + non-integral types. + +2005-07-29 Wolfgang Bangerth + + PR target/22582 + * doc/invoke.texi: Document -rdynamic. + +2005-07-30 Joseph S. Myers + + PR c/23143 + * c-parser.c (c_parser_parms_list_declarator): Call + mark_forward_parm_decls. + * c-decl.c (merge_decls): Only check DECL_IN_SYSTEM_HEADER for + decls with visibility structure. + +2005-07-30 Paul Brook + + * config/arm/arm.c (arm_coproc_mem_operand): Fix inaccurate comment. + +2005-07-30 Paul Brook + + * config/arm/arm-protos.h (arm_canonicalize_comparison): Update + prototype. + * config/arm/arm.c (arm_canonicalize_comparison): Use correct limit + value for mode. + * config/arm/arm.h (CANONICALIZE_COMPARISON): Pass mode argument. + +2005-07-29 Joseph S. Myers + + PR c/529 + * c-decl.c (warn_if_shadowing): Don't check for PARM_DECL in + nested function declarators. + (pushdecl): Don't call warn_if_shadowing for PARM_DECL. + (grokparms): Call warn_if_shadowing for parameters used within the + parameter list. + (store_parm_decls_newstyle): Call warn_if_shadowing for parameters + not used within the parameter list. + (store_parm_decls_oldstyle): Call warn_if_shadowing for parameters. + +2005-07-30 Jan Hubicka + + * expr.c (expand_expr_real_1): Do not load mem targets into register. + * i386.c (ix86_fixup_binary_operands): Likewise. + (ix86_expand_unary_operator): Likewise. + (ix86_expand_fp_absneg_operator): Likewise. + * optabs.c (expand_vec_cond_expr): Validate dest. + +2005-07-29 Joseph S. Myers + + PR c/21720 + * real.c (real_from_string): Also set last bit if there is a + nonzero hex digit beyond GCC's internal precision after ".". + +2005-07-29 David Edelsohn + + * config/rs6000/altivec.md: Convert UNSPEC numerical values to + define_constants. Change duplicate values to unassigned numbers. + Change UNSPEC_SUBS to UNSPEC_VSUBS. + (*altivec_vspltsf): New. + (altivec_vperm_v4sf): Delete. + (altivec_vperm_): Use mode macro V. + (altivec_vsldoi_): Convert to mode macro pattern. + (altivec_predicate_v4sf): Delete. + (altivec_predicate_): Use mode macro V. + (*altivec_lvesfx): New. + (*altivec_stvesfx): New. + (vec_realign_load_v4sf): Delete. + (vec_realign_load_): Use mode macro V. + * config/rs6000/rs6000.c (generate_set_vrsave): Use + UNSPECV_SET_VRSAVE. + +2005-07-29 Mark Mitchell + + PR bootstrap/23131 + * configure.ac (SYSTEM_HEADER_DIR): Avoid setting to empty + string. + * configure: Regenerated. + +2005-07-29 Paul Brook + + * doc/install.texi: Add link to GFortran binaries wiki page. + +2005-07-29 David Ung + + * config/mips/mips.c (mips_cpu_info_table): Add 5kf to the table. + (mips_rtx_cost_data): Add costs for 5kc and 5kf. + * config/mips/mips.h (processor_type): Add PROCESSOR_5KF. + * config/mips/mips.md (cpu): Add 5kf name. + (includes): Includes 5k.md. + * config/mips/5k.md: New DFA pipeline for the 5kc/5kf. + * doc/invoke.texi (MIPS Options): Updated cpu name supported with + -march flag. + +2005-07-29 Diego Novillo + + PR 22550 + * tree-cfgcleanup.c (cleanup_tree_cfg_1): Extract from ... + (cleanup_tree_cfg): ... here. + Call cleanup_tree_cfg_1 until there are no more cleanups to + do. + +2005-07-29 James A. Morrison + + * tree-vrp.c (compare_range_with_value): Return true or false + for ~[VAL_1, VAL_2] OP VAL if VAL_1 <= VAL <= VAL_2 for NE_EXPR and + EQ_EXPR respectively. + +2005-07-29 Kazu Hirata + + * cfg.c, tree-complex.c, config/frv/frv.c, config/i386/i386.c: + Fix comment typos. + +2005-07-29 Diego Novillo + + * tree-ssa-dom.c (struct opt_stats_d): Add field num_iterations. + (tree_ssa_dominator_optimize): Increment it. + (dump_dominator_optimization_stats): Print it. + +2005-07-29 Richard Earnshaw + Steven Bosscher + + PR rtl-optimization/23117 + * sched-rgn.c (add_branch_dependences): Handle COND_EXEC correctly + when head == tail. Tidy comment. + +2005-07-28 Richard Henderson + + * cse.c (exp_equiv_p): Special case CONST_DOUBLE. + * cselib.c (rtx_equal_for_cselib_p): Likewise. + * jump.c (rtx_renumbered_equal_p): Likewise. + * loop.c (rtx_equal_for_loop_p): Tidy and special case PC, CC0, + CONST_INT and CONST_DOUBLE. + (rtx_equal_for_prefetch_p): Likewise, plus LABEL_REF. + * reload.c (operands_match_p): Special case CONST_INT and + CONST_DOUBLE; check mode earlier. + +2005-07-29 Joseph S. Myers + + PR c/22240 + * c-typeck.c (convert_for_assignment): Do not check + DECL_IN_SYSTEM_HEADER on NULL fundecl. + +2005-07-29 Joseph S. Myers + + PR c/22192 + * c-typeck.c (composite_type): Prefer constant size arrays to + VLAs. + +2005-07-29 Joseph S. Myers + + PR c/21720 + * real.c (real_from_string): Set last bit if there is a nonzero + hex digit beyond GCC's internal precision. + +2005-07-28 Richard Henderson + + PR rtl-opt/22619 + * cfgcleanup.c (try_forward_edges): Watch out for end of + insn chain. + +2005-07-28 James E Wilson + + PR c/23106 + * doc/invoke.texi (Wstrict-aliasing=2): Fix misleading wording. + +2005-07-28 Jan Hubicka + + * Makefile.in (rtl-profile.o): Kill all traces of it. + * common.opt (fspeculative-prefetching, ftree-based-profiling): Kill. + * coverage.h (rtl_coverage_counter_ref): Kill. + * opts.c (flag_speculative_prefetching_set): Kill. + (flag_loop_optimize_set): New. + (common_handle_option): Disable loop optimizer when profiling; + do not handle speculative prefetching. + * passes.c (init_optimization_passes): Replace pass_profiling combo + by branch_prob pass. + * profile.c (compute_value_histograms): Update for simplified value + profiles. + (rtl_register_profile_hooks): Kill. + (pass_profiling): Kill. + (rest_of_handle_branch_prob): Do not profile. + * toplev.c (process_options): Remove speculative prefetching. + * toplev.h (flag_tree_based_profiling): Kill. + * tree-profile.c (prepare_instrumented_value, + tree_gen_interval_profiler, tree_gen_pow2_profiler, + tree_gen_one_value_profiler, do_tree_profiling): Update for + simplified datastructures. + * value-prof.c: Add comment that speculative prefetching was dropped; + update rest of file for simplified datastructures. + (NOPREFETCH_RANGE_MIN, NOPREFETCH_RANGE_MAX, + rtl_divmod_values_to_profile, insn_prefetch_values_to_profile, + find_mem_reference_1, find_mem_reference_2, find_mem_reference, + rtl_values_to_profile, rtl_divmod_fixed_value, rtl_mod_pow2, + rtl_mod_subtract, gen_speculative_prefetch, + rtl_divmod_fixed_value_transform, rtl_mod_pow2_value_transform, + rtl_mod_subtract_transform, speculative_prefetching_transform): Kill. + (gate_handle_value_profile_transformations, + rest_of_handle_value_profile_transformations, + pass_value_profile_transformations): Kill. + * value-prof.h (histogram_value_t): Remove IL based unions. + (rtl_register_value_prof_hooks, rtl_register_profile_hooks, + rtl_profile_hooks): Remove hooks. + + * invoke.texi (-ftree-based-profiling, -fspeculative-prefetching): Kill. + + * cgraph.c (cgraph_clone_edge): New UPDATE_ORIGINAL argument. + (cgraph_clone_node): Likewise. + * cgraph.h (cgraph_clone_edge): Update prototype. + (cgraph_clone_node): Likewise. + * ipa-inline.c (cgraph_clone_inlined_nodes): Update call of + cgraph_clone_node. + (lookup_recursive_calls): Consider profile. + (cgraph_decide_recursive_inlining): Fix updating; use new + probability argument; use profile. + * params.def (PARAM_MIN_INLINE_RECURSIVE_PROBABILITY): New. + * tree-inline.c (copy_bb): Update clal of clone_edge. + * tree-optimize.c (tree_rest_of_compilation): UPdate cal of clone_node. + + * invoke.texi (min-inline-recursive-probability): Document. + +2005-07-28 Gerald Pfeifer + + * doc/install.texi (Configuration): Update Valgrind homepage. + +2005-07-28 Richard Henderson + + PR middle-end/21362 + * cfgrtl.c (rtl_merge_blocks): Call maybe_remove_eh_handler on + labels we want to delete. + (cfg_layout_merge_blocks): Likewise. + +2005-07-28 Richard Henderson + + PR target/17692 + * config/i386/i386.c (ix86_split_sse_movcc): Emit DELETED note + when expanding to nothing. + +2005-07-28 Josh Conner + + * ipa-inline.c (update_caller_keys): Fix estimated_growth caching. + (cgraph_decide_inlining_of_small_functions): Likewise. + +2005-07-28 Josh Conner + + * ipa-inline.c (cgraph_edge_badness): Update comments. Invert shift + direction of badness if negative. + (cgraph_default_inline_p): Add reason to parameters, and assign it + a value. + (cgraph_decide_inlining_of_small_functions): New parameter in call + to cgraph_default_inline_p. + (cgraph_decide_inlining_incrementally): Likewise. + * cgraphunit.c (decide_is_function_needed): Likewise. + * cgraph.h (cgraph_default_inline_p): Likewise. + +2005-07-28 Volker Reichelt + + * builtins.c: Fix comment typo(s). + * genautomata.c: Likewise. + * gimplify.c: Likewise. + * tree-dfa.c: Likewise. + * tree-flow-inline.h: Likewise. + * tree-into-ssa.c: Likewise. + * tree-ssa-alias.c: Likewise. + * tree-ssa-ccp.c: Likewise. + * tree-ssa-copy.c: Likewise. + * tree-ssa-dce.c: Likewise. + * tree-ssa-dom.c: Likewise. + * tree-ssa-operands.c: Likewise. + * tree-tailcall.c: Likewise. + * tree-vectorizer.c: Likewise. + * tree-vrp.c: Likewise. + * tree.c: Likewise. + +2005-07-28 Jeff Law + + * tree-vrp.c (test_for_singularity): Extracted from ... + (simplify_cond_using_ranges): Attempt to simplify a relational + test to NE_EXPR. Dump information when a COND_EXPR is simplified. + +2005-07-28 Dorit Nuzman + + PR tree-optimization/22506 + * tree-vectorizer.c (update_phi_nodes_for_guard2): Skip loop-closed + phis whose argument is constant. + +2005-07-28 J"orn Rennecke + + PR rtl-optimization/18992 + Back out this patch: + 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. + + Replace it with this: + * cse.c (count_reg_usage): In INSN, JUMP_INSN and CALL_INSN cases, + if flag_non_call_exceptions is set and the insn may trap, pass + pc_rtx as dest for recursion. + In SET_SRC part of SET case, if dest is already set, pass it down + unchanged. + +2005-07-28 Jan Hubicka + + * cfg.c (update_bb_profile_for_threading): Use RDIV. + (scale_bbs_frequencies_int): Likewise, assert for possible overflow. + (scale_bbs_frequencies_gcov_type): Be more curefull about overflows and + roundoff errors. + * tree-cfg.c (tree_duplicate_sese_region): Use counts for updating + profile when available. + +2005-07-28 Jan Beulich + + * config/ia64/ia64.c (ia64_load_pair_ok): New. + (ia64_print_operand): Describe and handle 'X'. + (ia64_register_move_cost): Also handle FP_REGS. + (ia64_preferred_reload_class): Likewise. + (ia64_secondary_reload_class): Likewise. + (ia64_dependencies_evaluation_hook): New local variable c. Initialize + it. Also check for ITANIUM_CLASS_FLDP. + * config/ia64/ia64.h (FP_REGNO_P): New. + (HARD_REGNO_MODE_OK): Remove explusion of TImode. + (reg_class): Add FP_REGS. + (REG_CLASS_NAMES): Adjust for it. + (REG_CLASS_CONTENTS): Likewise. + (REGNO_REG_CLASS): Use FP_REGS where appropriate. + (REG_CLASS_FROM_LETTER): Handle 'x'. + (CLASS_MAX_NREGS): Handle FP_REGS. + (MEMORY_MOVE_COST): Likewise. + * config/ia64/ia64.md (itanium_class): Add fldp. + (type): Handle fldp. + (movti_internal): More allowable operand combinations. Use ldfp8 when + splitting unnecessary. Remove predicable attribute. Adjust + itanium_class attribute. + (smuldi3_highpart): Remove outdated comment. + (mulditi3, umulditi3, rotlti3): New expanders. + (addti3, subti3, mulditi3_internal, umulditi3_internal, negti2, rotlti3_internal): New insns. + (absti2): Disabled new insn for future reference. + Respective new splitters. + * config/ia64/itanium1.md (1_fldp, 1b_fldp): New insn reservations. + * config/ia64/itanium2.md (2_fldp, 2b_fldp): Likewise. + * config/ia64/ia64-protos.h (ia64_load_pair_ok): New. + +2005-07-25 James A. Morrison + + PR rtl-optimization/23047 + * simplify-rtx.c (simplify_const_relational_operation): Respect + flag_wrapv for comparisons with ABS. + +2005-07-27 James A. Morrison + + PR tree-optimization/22493 + * tree-vrp.c (extract_range_from_unary_expr): Deal with -fwrapv and + VR_ANTI_RANGEs properly for NEGATE_EXPRs and ABS_EXPRs. + +2005-07-27 Aldy Hernandez + + * config/frv/frv.opt (moptimize-membar): New. + + * doc/invoke.texi: Document -moptimize-membar and its inverse. + + * config/frv/frv.h: Remove machine_function definition. + + * config/frv/frv.c (struct frv_io): New. + (struct machine_function): Moved from frv.h. Add has_membar_p. + (frv_same_doubleword_p, frv_io_fixed_order_p, frv_io_union) + (frv_extract_membar, frv_io_check_address, frv_io_handle_set) + (frv_io_handle_use_1, frv_io_handle_use, frv_optimize_membar_local) + (frv_optimize_membar_global, frv_optimize_membar): New functions. + (frv_reorg): Call frv_optimize_membar when appropriate. + (bdesc_loads, bdesc_stores): Use the membar code as the icode field. + (frv_expand_builtin): Adjust calls accordingly. + (frv_io_address_cookie): New function. + (frv_expand_load_builtin, frv_expand_store_builtin): Emit a normal + load or store rather than a special insn. Add ccnstant address and + io-type operands to the membar. + (frv_ifcvt_modify_tests): Unsign regno. + (frv_ifcvt_modify_tests): Same. + + * config/frv/frv.md: Remove UNSPEC_BUILTIN_{LOAD,STORE}. Change + UNSPEC_OPTIONAL_MEMBAR constant. + (builtin_read_): Delete. + (builtin_write_): Delete. + ("optional_membar_"): Add operand. + + * testsuite/gcc.target/frv/all-builtin-read8.c: Delete. + * testsuite/gcc.target/frv/all-builtin-read16.c: Delete. + * testsuite/gcc.target/frv/all-builtin-read32.c: Delete. + * testsuite/gcc.target/frv/all-builtin-read64.c: Delete. + * testsuite/gcc.target/frv/all-builtin-write8.c: Delete. + * testsuite/gcc.target/frv/all-builtin-write16.c: Delete. + * testsuite/gcc.target/frv/all-builtin-write32.c: Delete. + * testsuite/gcc.target/frv/all-builtin-write64.c: Delete. + * testsuite/gcc.target/frv/all-read-write-1.c: New. + +2005-07-28 Kaz Kojima + + * df.c (df_uses_record): Handle SCRATCH. + +2005-07-28 Steven Bosscher + + PR debug/20161 + * passes.c (rest_of_decl_compilation): If decl is a type and + we have encountered errors, don't emit debug information. + +2005-07-27 Kenneth Zadeck + + * params.def: Fixed comment. + +2005-07-27 Bjoern Haase + + PR target/19885 + * config/avr/avr.c (TARGET_ASM_ALIGNED_SI_OP): Add. + (TARGET_ASM_UNALIGNED_HI_OP): Add. + (TARGET_ASM_UNALIGNED_SI_OP): Add. + +2005-07-27 Steven Bosscher + + PR c++/22003 + * varasm.c (assemble_start_function): Don't do anything that may + require a CFG if the current function is a thunk. + +2005-07-25 Geoffrey Keating + + * doc/install.texi (Prerequisites): Mention that perl is needed + to do export control in libstdc++ targetting Darwin. + +2005-07-27 Steven Bosscher + + PR rtl-optimization/17808 + * sched-deps.c (sched_get_condition): Enable #if 0'ed code. + (sched_insns_conditions_mutex_p): Split out from... + (add_dependence): ...here. But don't call it from here. + (add_dependence_list): Check sched_insns_conditions_mutex_p + before calling add_dependence. + (add_dependence_list_and_free): Likewise. + (fixup_sched_groups): Likewise. + (sched_analyze_1): Likewise. + (sched_analyze_2): Likewise (and replace a "0" with REG_DEP_TRUE). + (sched_analyze): Likewise. + (sched_analyze_insn): Likewise. + * sched-ebb.c (add_deps_for_risky_insns): Likewise. + * sched-rgn.c (add_branch_dependences): Likewise. Also, add + dependencies on all COND_EXEC insns to jumps ending basic blocks + when doing intrablock scheduling. + * sched-int.h (sched_insns_conditions_mutex_p): Add prototype. + +2005-07-27 Jeff Law + + * tree-vrp.c (vrp_meet): Intersect the equivalency sets when + meeting a VR_ANTI_RANGE with a VR_RANGE. When intersecting + equivalency sets, correctly handle the case were vr0 has an + equivalency set, but vr1 does not. + +2005-07-27 Dorit Nuzman + + PR tree-optimization/23073 + * tree-vect-analyze.c (vect_analyze_data_refs_alignment): Call + vect_print_dump_info before fprintf. + +2005-07-27 Zdenek Dvorak + + PR tree-optimize/22348 + * tree-ssa-loop-niter.c (number_of_iterations_cond): + Fold the partial computation. + +2005-07-27 Zdenek Dvorak + + PR tree-optimization/22325 + * tree-flow.h (compute_phi_arg_on_exit, force_expr_to_var_cost): + Declare. + * tree-scalar-evolution.c (scev_const_prop): Add generic final + value replacement. + * tree-ssa-loop-ivopts.c (force_expr_to_var_cost): Split from ... + (force_var_cost): ... this function. + (compute_phi_arg_on_exit): Export. + +2005-07-27 Zdenek Dvorak + + PR tree-optimization/20773 + * tree-ssa-loop-ch.c (copy_loop_headers): Select the correct latch + edge. + +2005-07-27 Richard Guenther + + * tree-ssa-structalias.c (push_fields_onto_fieldstack): + Avoid pushing again if current struct contains only + fields we decomposed. + +2005-07-27 Jan Hubicka + + PR tree-optimization/22574 + * cgraph.c (cgraph_function_body_availability): Unanalyzed bodies are + not available. + + * tree-tailcall.c (decrease_profile): New function. + (eliminate_tail_call): Use it. + + * cgraphunit.c (cgraph_function_and_variable_visibility): Set + visibility flags correctly in whole program mode. + +2005-07-26 Steve Ellcey + + PR rtl-optimization/22472 + * config/pa/pa.h (HARD_REGNO_RENAME_OK): Define. + +2005-07-26 Steven Bosscher + + PR tree-optimization/22504 + * tree-complex.c (expand_complex_addition): Use 'code' instead + of MINUS_EXPR for (VARYING, ONLY_IMAG) and (ONLY_IMAG, VARYING). + +2005-07-26 Aldy Hernandez + + * config.gcc (cpu_type): Add frv case. + (with_cpu): Add frv400-*-*linux* and frv550-*-*linux* cases. + (supported_defaults): Add fr550 case. + +2005-07-26 Diego Novillo + + PR 22591 + * tree-ssa-alias.c (may_alias_p): Remove shortcut that tests + whether a pointer of type T * may point to objects of type T *. + +2005-07-26 DJ Delorie + + * configure: Regenerate. + +2005-07-26 Dale Johannesen + + * postreload-gcse.c (alloc_mem): Start CUID numbering at 1. + +2005-07-26 Mark Mitchell + + * doc/install.texi (--with-build-sysroot): Fix grammatical error. + Clarify use of "build" in name. + +2005-07-26 Aldy Hernandez + + * doc/extend.texi (Raw read/write Functions): New section. + * testsuite/gcc.target/frv/all-builtin-read8.c: New. + * testsuite/gcc.target/frv/all-builtin-read16.c: New. + * testsuite/gcc.target/frv/all-builtin-read32.c: New. + * testsuite/gcc.target/frv/all-builtin-read64.c: New. + * testsuite/gcc.target/frv/all-builtin-write8.c: New. + * testsuite/gcc.target/frv/all-builtin-write16.c: New. + * testsuite/gcc.target/frv/all-builtin-write32.c: New. + * testsuite/gcc.target/frv/all-builtin-write64.c: New. + * config/frv/frv.c: Add bdesc_loads global. + Add bdesc_stores global. + (frv_init_builtins): Add support for __builtin_{read/write}*. + (frv_volatile_memref): New. + (frv_expand_load_builtin): New. + (frv_expand_store_builtin): New. + * config/frv/frv.h (frv_builtins): Add FRV_BUILTIN_SCAN, + FRV_BUILTIN_READ8, FRV_BUILTIN_READ16, FRV_BUILTIN_READ32, + FRV_BUILTIN_READ64, FRV_BUILTIN_WRITE8, FRV_BUILTIN_WRITE16, + FRV_BUILTIN_WRITE32, FRV_BUILTIN_WRITE64. + * config/frv/frv.md (unspecs): Add UNSPEC_BUILTIN_LOAD, + UNSPEC_BUILTIN_STORE, UNSPEC_OPTIONAL_MEMBAR. + (builtin_read_): New. + (builtin_write_): New. + (builtin_write64): New. + (optional_membar_): New. + +2005-07-26 J"orn Rennecke + + * emit-rtl.c (gen_lowpart_common): Compare size of MODE in bits + (rather than units) against HOST_BITS_PER_WIDE_INT. + +2005-07-26 Kazu Hirata + + * ipa-pure-const.c, ipa-reference.c, ipa-reference.h, + ipa-type-escape.c, ipa-type-escape.h, ipa-utils.c, + ipa-utils.h, treestruct.def, config/crx/crx-protos.h, + config/crx/crx.c, config/crx/crx.h, config/crx/crx.md: Update + FSF address. + + * calls.c, fold-const.c, ipa-reference.c, ipa-type-escape.c, + tree-ssa-reassoc.c, tree-ssa-structalias.c, vec.h, + config/crx/crx.c, config/m32c/m32c.c, config/m32c/m32c.h: Fix + comment typos. + * doc/c-tree.texi, doc/tree-ssa.texi: Fix typos. + +2005-07-26 Richard Guenther + + PR tree-optimization/22486 + * fold-const.c (fold_unary): Fold away useless component + references of the form (T *)&T.x, if the address + doesn't change. + +2005-07-25 James E Wilson + + * dwarf2out.c (add_call_src_coords_attributes): New. + (gen_inlined_subroutine_die): Call it. + (maybe_emit_file, init_file_table): Add comments. + (prune_unused_types_walk_attribs): Pass DW_AT_call_file through + maybe_emit_file. + * tree-inline.c (remap_block): Copy BLOCK_SOURCE_LOCATION. + (expand_call_inline): Set BLOCK_SOURCE_LOCATION. + * tree.h (BLOCK_SOURCE_LOCATION): New. + (struct tree_block): New field locus. + +2005-07-26 Andreas Schwab + + PR rtl-optimization/23043 + * postreload-gcse.c (eliminate_partially_redundant_load): Fix typo + when allocating a struct unoccr. + +2005-07-25 Richard Henderson + + PR 22626 + * tree-complex.c (gate_no_optimization): True if errors. + * Makefile.in (tree-complex.o): Update dependencies. + +2005-07-25 Aldy Hernandez + + * config/frv/predicates.md (integer_register_operand): Use + GPR_AP_OR_PSEUDO_P. + +2005-07-25 Andrew Pinski + + PR tree-opt/22484 + * tree-ssa-ccp.c (fold_stmt_inplace): Strip useless type conversions + after fold. + * tree-ssa-propagate.c (set_rhs): Reject invalid conditional operands. + +2005-07-25 Andrew Pinski + + * tree-ssa-reassoc.c (reassociate_expr): Allow scaler floating point + types when flag_unsafe_math_optimizations is true. + +2005-07-25 Mark Mitchell + + * gcc.c (option_map): Add --sysroot. + (process_command): Handle --sysroot. + (display_help): Document it. + * doc/cppopts.tex (-isysroot): Document. + * doc/invoke.texi (--sysroot): Document. + * doc/install.texi (--with-build-sysroot): Document. + + * Makefile.in (inhibit_libc): New variable. + (INHIBIT_LIBC_CFLAGS): Likewise. + (LIBGCC2_CFLAGS): Include + $(INHIBIT_LIBC_CFLAGS). + (CRTSTUFF_CFLAGS): Include $(INHIBIT_LIBC_CFLAGS). + ($(T)crtbegin.o): Do not use @inhibit_libc@. + ($(T)crtend.o): Likewise. + ($(T)crtbeginS.o): Do not use @inhibit_libc@. + ($(T)crtendS.o): Likewise. + ($(T)crtbeginT.o): Do not use @inhibit_libc@. + ($(T)crtendT.o): Likewise. + (stmp-fixinc): Do not complain about missing headers if + inhibit_libc. + * configure.ac (inhibit_libc): Set it to true/false. + (--with-build-sysroot): New option. Use it to set + SYSTEM_HEADER_DIR. + * configure: Regenerated. + +2005-07-25 Manfred Hollstein + + * calls.c (store_one_arg): Fix unsigned comparison warning. + +2005-07-25 Serge Belyshev + + PR other/22337 + * ggc-zone.c (ggc_alloc_zone_stat): Do not use CHUNK_OVERHEAD. + (ggc_print_statistics): Initialize variable before use. + +2005-07-25 Richard Guenther + + * tree-dfa.c (mark_new_vars_to_rename): Protect against + calling with a PHI_NODE argument. + + * tree-flow-inline.h (overlap_subvar): Protect against + possible overflow. + +2005-07-25 Paolo Bonzini + + * aclocal.m4 (gcc_AC_CHECK_TOOL): Add /bin to default directory. + * configure: Regenerate. + +2005-07-25 Ira Rosen + + * expr.c (highest_pow2_factor): Make extern. + * tree-data-ref.c (ptr_decl_may_alias_p): New function. + (ptr_ptr_may_alias_p, may_alias_p, record_ptr_differ_p, + record_array_differ_p, array_ptr_differ_p): Likewise. + (base_object_differ_p): Rename (from array_base_name_differ_p). Support + additional cases. Call the above functions. + (base_addr_differ_p): Moved from tree-vect-analyze.c. Call + base_object_differ_p when there are two base objects. Otherwise, compare + base address and offset. Call may_alias_p. + (dump_data_reference): Use a correct field name. + (analyze_array): Make static. Initialize new data-ref fields. + (analyze_indirect_ref): New function. + (init_data_ref): Initialize new data-ref fields. + (strip_conversion): Moved from tree-vect-analyze.c. + (analyze_offset_expr, get_ptr_offset, address_analysis, + object_analysis): Likewise. + (analyze_offset): New function. + (create_data_ref): Likewise. + (initialize_data_dependence_relation): Call base_addr_differ_p. Compare + dimensions for ARRAY_REFs only. + (build_classic_dist_vector): Make static. + (access_functions_are_affine_or_constant_p): Call macro to get the + address of access functions. + (compute_all_dependences): Add new parameter + compute_self_and_read_read_dependences. Compute self and read-read + dependences if it is true. + (find_data_references_in_loop): Call create_data_ref. Initialize new + data-ref fields. + (compute_data_dependences_for_loop): Add new parameter + compute_self_and_read_read_dependences. Remove parameter nb_loops, + compute nb_loops. Call compute_all_dependences, + build_classic_dist_vector and build_classic_dir_vector with correct + parameters. + (analyze_all_data_dependences): Call compute_data_dependences_for_loop + with correct parameters. Compare dimensions for ARRAY_REFs only. + (free_data_refs): Call macro to free access functions. + * tree-data-ref.h (struct first_location_in_loop): New structure. Move + fields from stmt_vinfo. + (struct base_object_info): New structure. + (struct data_reference): Move fields to base_object_info. Add fields + first_location and object_info for above structures. Move fields from + stmt_info: memtag, ptr_info, subvars, misalignment. Add new field + aligned_to. Add macros to access the new fields. + Update functions declarations. + * tree-flow.h (is_aliased_with): Declare. + * tree-loop-linear.c (linear_transform_loops): Call + compute_data_dependences_for_loop with correct parameters. + * tree-ssa-alias.c (is_aliased_with): New function. + * tree-vect-analyze.c (vect_get_ptr_offset): Remove. + (vect_analyze_offset_expr, vect_base_addr_differ_p): Likewise. + (vect_analyze_data_ref_dependence): Get ddr. Remove call to + vect_base_addr_differ_p, compute_subscript_distance and + build_classic_dist_vector. Add printings. Check absolute value of + distance. + (vect_analyze_data_ref_dependences): Go through ddrs instead of + data-refs. + (vect_compute_data_ref_alignment): Get the fields of data-ref instead of + stmt. Check aligned_to. Check if the base is aligned. Remove conversion + to bytes. Add printing. + (vect_compute_data_refs_alignment): Go through loads and stores in one + loop. + (vect_enhance_data_refs_alignment, vect_analyze_data_refs_alignment, + vect_analyze_data_ref_access): Likewise. + (vect_analyze_pointer_ref_access): Remove. + (vect_address_analysis, vect_object_analysis): Likewise. + (vect_analyze_data_refs): Call compute_data_dependences_for_loop to find + and analyze data-refs in the loop. + * tree-vect-transform.c (vect_create_addr_base_for_vector_ref): Get the + fields of data-ref instead of stmt. Add init to the offset from the + base. + (vect_create_data_ref_ptr): Get the fields of data-ref instead of stmt. + (vect_update_init_of_dr): Likewise. + (vect_update_inits_of_drs): Go through loads and stores in one loop. + * tree-vectorizer.c (new_stmt_vec_info): Remove initialization of + removed fields. + (new_loop_vec_info): Initialize new fields. + (destroy_loop_vec_info): Free new fields. + (vect_strip_conversion): Remove. + * tree-vectorizer.h (enum verbosity_levels): Add new verbosity level. + (struct _loop_vec_info): Unify data_ref_writes and data_ref_reads into + datarefs. Add new field ddrs. + Add macros for the new fields access. + (struct _stmt_vec_info): Remove: base_address, initial_offset, step, + base_aligned_p, misalignment, memtag, ptr_info and subvars. + Remove their macros. + * tree.h (highest_pow2_factor): Declare. + +2005-07-25 Jakub Jelinek + + * calls.c (store_one_arg): Check for sibling call MEM arguments + from already clobbered incoming argument area. + +2005-07-24 Kaveh R. Ghazi + + * c-common.c (check_missing_format_attribute): New. + * c-common.h (check_missing_format_attribute): Likewise. + * c-typeck.c (convert_for_assignment): Use it. + +2005-07-24 Andreas Schwab + + * config/m68k/m68k.md ("extendqidi2"): When source is an address + register use a word move. Correct operand of ext.w in 68000 code. + +2005-07-23 Mark Mitchell + + * dwarf2out.c (gen_variable_die): Treat un-emitted COMDAT + variables as declarations, rather than definitions. + +2005-07-24 Ira Rosen + + PR tree-optimization/22526 + * tree-vectorizer.c (slpeel_tree_peel_loop_to_edge): Match the type + of the zero node. + +2005-07-24 Francois-Xavier Coudert + + * builtins.def: Add DEF_EXT_C99RES_BUILTIN to define builtins + that C99 reserve for future use. Use it to define clog10, + clog10f and clog10l. + +2005-07-23 Kaveh R. Ghazi + + * Makefile.in (STRICT2_WARN): Add -Wmissing-format-attribute. + * configure.ac: Check for -Wmissing-format-attribute. + + * configure: Regenerate. + +2005-07-23 Richard Henderson + + PR tree-optimization/22623 + * tree-complex.c (set_component_ssa_name): Use replace_ssa_name_symbol. + +2005-07-23 Giovanni Bajo + + PR target/22577 + * config/pa/pa.c (reloc_needed): Updated for VECs inside CONSTRUCTOR. + +2005-07-23 Kaveh R. Ghazi + + * Makefile.in (C_TREE_H): Update dependencies. + * c-tree.h: Include toplev.h. + * diagnostic.h (diagnostic_set_info): Add format attribute. + * rtl-error.c (diagnostic_for_asm): Likewise. + +2005-07-23 Chao-ying Fu + + * config/mips/mips-dsp.md: New file. + * config/mips/mips-modes.def (V4QI, V2HI, CCDSP): New modes. + * config/mips/mips.c (mips_function_type): Add types for DSP builtin + functions. + (mips_builtin_type): Add MIPS_BUILTIN_DIRECT_NO_TARGET and + MIPS_BUILTIN_BPOSGE32. + (mips_expand_builtin_direct): Add one parameter to indicate that + builtin functions need to return a value. + (mips_expand_builtin_bposge): New for expanding "bposge" builtin + functions. + (mips_regno_to_class): Add classes for 12 new DSP registers. + (mips_subword): Change to check four HI registers. + (mips_output_move): Output move to and from 6 new DSP accumulators. + (override_options): Make sure -mdsp and -mips16 are not used together. + Map 'A' to DSP_ACC_REGS and 'a' to ACC_REGS. Enable DSP accumulators + for machine modes. + (mips_conditional_register_usage): Disable 6 new DSP accumulators + when !TARGET_DSP. + (print_operand): Add 'q' for printing DSP accumulators. + (mips_cannot_change_mode_class): Check ACC_REGS. + (mips_secondary_reload_class): Check ACC_REGS. + (mips_vector_mode_supported_p): Enable V2HI and V4QI when TARGET_DSP. + (mips_register_move_cost): Check ACC_REGS. + (CODE_FOR_mips_addq_ph, CODE_FOR_mips_addu_qb, CODE_FOR_mips_subq_ph) + (CODE_FOR_mips_subu_qb): New code-aliasing macros. + (DIRECT_NO_TARGET_BUILTIN, BPOSGE_BUILTIN): New macros. + (dsp_bdesc): New array. + (bdesc_arrays): Add DSP builtin function table. + (mips_prepare_builtin_arg): Check predicate again after + copy_to_mode_reg. + (mips_expand_builtin): Add one more parameter to + mips_expand_builtin_direct. Expand MIPS_BUILTIN_DIRECT_NO_TARGET and + MIPS_BUILTIN_BPOSGE32. + (mips_init_builtins): Initialize new function types. + (mips_expand_builtin_direct): Check if builtin functions need to + return a value and pass operands properly. + (mips_expand_builtin_bposge): New function. + * config/mips/mips.h (TARGET_CPU_CPP_BUILTINS): Add __mips_dsp. + (ASM_SPEC): Map -mdsp to -mdsp in GAS. + (FIRST_PSEUDO_REGISTER): Increase to 188. + (FIXED_REGISTERS, CALL_USED_REGISTERS, CALL_REALLY_USED_REGISTERS): + Update for 12 new DSP registers. + (DSP_ACC_REG_FIRST, DSP_ACC_REG_LAST, DSP_ACC_REG_NUM, AC1HI_REGNUM) + (AC1LO_REGNUM, AC2HI_REGNUM, AC2LO_REGNUM, AC3HI_REGNUM, AC3LO_REGNUM): + (DSP_ACC_REG_P, ACC_REG_P, ACC_HI_REG_P): New macros. + (reg_class): Add DSP_ACC_REGS and ACC_REGS. + (REG_CLASS_NAMES): Add names for DSP_ACC_REGS and ACC_REGS. + (REG_CLASS_CONTENTS): Update for DSP_ACC_REGS, ACC_REGS and ALL_REGS. + (REG_ALLOC_ORDER): Update for 12 new DSP registers. + (mips_char_to_class): Add 'A' for DSP_ACC_REGS and 'a' for ACC_REGS. + (UIMM6_OPERAND, IMM10_OPERAND): New macros. + (EXTRA_CONSTRAINT_Y): Add YA and YB extra constraints. + (REGISTER_NAMES): Add names for 12 new DSP registers. + * config/mips/mips.md: Include mips-dsp.md. + (UNSPEC_ADDQ, UNSPEC_ADDQ_S, UNSPEC_SUBQ, UNSPEC_SUBQ_S, UNSPEC_ADDSC) + (UNSPEC_ADDWC, UNSPEC_MODSUB, UNSPEC_RADDU_W_QB, UNSPEC_ABSQ_S) + (UNSPEC_PRECRQ_QB_PH, UNSPEC_PRECRQ_PH_W, UNSPEC_PRECRQ_RS_PH_W) + (UNSPEC_PRECRQU_S_QB_PH, UNSPEC_PRECEQ_W_PHL, UNSPEC_PRECEQ_W_PHR) + (UNSPEC_PRECEQU_PH_QBL, UNSPEC_PRECEQU_PH_QBR, UNSPEC_PRECEQU_PH_QBLA) + (UNSPEC_PRECEQU_PH_QBRA, UNSPEC_PRECEU_PH_QBL, UNSPEC_PRECEU_PH_QBR) + (UNSPEC_PRECEU_PH_QBLA, UNSPEC_PRECEU_PH_QBRA, UNSPEC_SHLL) + (UNSPEC_SHLL_S, UNSPEC_SHRL_QB, UNSPEC_SHRA_PH, UNSPEC_SHRA_R) + (UNSPEC_MULEU_S_PH_QBL, UNSPEC_MULEU_S_PH_QBR, UNSPEC_MULQ_RS_PH) + (UNSPEC_MULEQ_S_W_PHL, UNSPEC_MULEQ_S_W_PHR, UNSPEC_DPAU_H_QBL) + (UNSPEC_DPAU_H_QBR, UNSPEC_DPSU_H_QBL, UNSPEC_DPSU_H_QBR) + (UNSPEC_DPAQ_S_W_PH, UNSPEC_DPSQ_S_W_PH, UNSPEC_MULSAQ_S_W_PH) + (UNSPEC_DPAQ_SA_L_W, UNSPEC_DPSQ_SA_L_W, UNSPEC_MAQ_S_W_PHL) + (UNSPEC_MAQ_S_W_PHR, UNSPEC_MAQ_SA_W_PHL, UNSPEC_MAQ_SA_W_PHR) + (UNSPEC_BITREV, UNSPEC_INSV, UNSPEC_REPL_QB, UNSPEC_REPL_PH) + (UNSPEC_CMP_EQ, UNSPEC_CMP_LT, UNSPEC_CMP_LE, UNSPEC_CMPGU_EQ_QB) + (UNSPEC_CMPGU_LT_QB, UNSPEC_CMPGU_LE_QB, UNSPEC_PICK, UNSPEC_PACKRL_PH) + (UNSPEC_EXTR_W, UNSPEC_EXTR_R_W, UNSPEC_EXTR_RS_W, UNSPEC_EXTR_S_H) + (UNSPEC_EXTP, UNSPEC_EXTPDP, UNSPEC_SHILO, UNSPEC_MTHLIP, UNSPEC_WRDSP) + (UNSPEC_RDDSP): New constants. + (*movdi_32bit): Change 'x' to 'a' for ACC_REGS. + (*movsi_internal): Change 'x' to 'a' for ACC_REGS. Add an + A<-d alternative. + * config/mips/mips.opt (-mdsp): New option. + * config/mips/predicates.md (const_uimm6_operand, const_imm10_operand) + (reg_imm10_operand): New predicates. + * doc/extend.texi (MIPS DSP Built-in Functions): New section. + * doc/invoke.texi (-mdsp): Document new option. + +2005-07-22 DJ Delorie + + * c-objc-common.c (c_cannot_inline_tree_fn): Add warning control + to warning calls. + * tree-inline.c (inlinable_function_p): Likewise. + +2005-07-22 Mark Mitchell + + PR debug/21828 + * toplev.c (check_global_declarations): Do not mark undefined + variables as DECL_IGNORED_P. + * varasm.c (first_global_object_name): GTY it. + (weak_global_object_name): Likewise. + (notice_global_symbol): Use ggc_strdup, not xstrdup, when creating + a string to go into {weak,first}_global_object_name. + +2005-07-22 DJ Delorie + + * c-format.c (check_function_format): Change warning control + option from OPT_Wattribute to OPT_Wmissing_format_attribute. + +2005-07-22 Diego Novillo + + * tree-ssa-alias.c (count_ptr_derefs): Do not consider + &PTR->FLD a dereference of PTR. + * tree-ssa-structalias.c (update_alias_info): Consider &PTR->FLD + a potential dereference of PTR. + +2005-07-22 J"orn Rennecke + + PR rtl-optimization/20370 + * ifcvt.c (dead_or_predicable): Before calling propagate_block, + call allocate_reg_info if necessary. + + PR rtl-optimization/21848 + * calls.c (emit_library_call_value_1): For const functions, add + USEs of the stack slots to CALL_INSN_FUNCTION_USAGE. + + PR rtl-optimization/22445 + * cselib.c (target.h): Include. + (rtx_equal_for_cselib_p): Allow commutative matches. + (cselib_hash_rtx): Don't use MODE for CONST_INT hashing. + Remove MODE parameter. Changed all callers. + + PR rtl-optimization/22258 + * combine.c (likely_spilled_retval_1, likely_spilled_retval_p): + New functions. + (try_combine): Use likely_spilled_retval_p. + +2005-07-22 Paul Woegerer + + * config.gcc: Add crx-elf support. + + * doc/contrib.texi: Mention crx. + * doc/extend.texi: Document crx extensions. + * doc/install.texi: Document crx install. + * doc/invoke.texi: Document crx options. + * doc/md.texi: Document crx constraints. + + * config/crx/crx-protos.h: New file. + * config/crx/crx.c: New file. + * config/crx/crx.h: New file. + * config/crx/crx.md: New file. + * config/crx/crx.opt: New file. + * config/crx/t-crx: New file. + +2005-07-22 Manfred Hollstein + + * tree-ssa-structalias.c (merge_graph_nodes): Fix uninitialised + warnings. + (int_add_graph_edge): Likewise. + (collapse_nodes): Likewise. + (process_unification_queue): Likewise. + +2005-07-22 Richard Kenner + Laurent GUERBY + + PR tree-optimization/22336 + * function.c (record_block_change): Check for + cfun->ib_boundaries_block. + +2005-07-21 James A. Morrison + + * fold-const.c (fold_unary): Don't strip signed nops from ABS_EXPRs. + (tree_expr_nonnegative_p): Return try for TYPE_UNSIGNED. + +2005-07-21 DJ Delorie + + * toplev.c (warn_deprecated_use): Add warning control to warning + call. + * c-typeck.c (parser_build_binary_op): Likewise. + (c_finish_if_stmt): Likewise. + * c-common.c (check_function_sentinel): Likewise. + (check_nonnull_arg): Likewise. + +2005-07-21 Richard Henderson + + PR tree-opt/22504 + * tree-complex.c (complex_ssa_name_components): New. + (cvc_lookup): Allow entry not found. + (create_components): Remove. + (create_one_component_var, get_component_var): New. + (get_component_ssa_name, set_component_ssa_name): New. + (extract_component): Use get_component_ssa_name. + (update_complex_components): Use set_component_ssa_name. + (update_complex_components_on_edge): Likewise. + (update_phi_components): Create new PHI nodes directly, instead + of adding insns to edges. + (tree_lower_complex): Allocate and free complex_variable_components + and complex_ssa_name_components here. + +2005-07-20 Daniel Berlin + + * alias.c (nonoverlapping_component_refs_p): Use TYPE_MAIN_VARIANT, + revert to returning false. + +2005-07-21 Uros Bizjak + + PR target/21149 + * config/i386/i386.md (sse_movhlps): Fix vec_select values. + +2005-07-21 Uros Bizjak + + PR target/22576 + * config/i386/i386.md (cmpxf): Change operand constraints + to "nonmemory_operand". + +2005-07-21 Andrew Pinski + + * config/i386/i386.md (trap): Use "".word/t0x0b0f" instead of ud2. + +2005-07-21 Andrew Pinski + + PR middle-end/21180 + * fold-const.c (fold_build1): Add checksum for the operands. + (fold_build2): Likewise. + (fold_build3): Likewise. + +2005-07-21 Andrew Pinski + + PR middle-end/19055 + * fold-const.c (fold_binary): Transform "(X | Y) ^ X" to "Y & ~ X". + +2005-07-21 Paolo Bonzini + + * common.opt (-fforward-propagate): Committed by mistake, + removed. + +2005-07-21 Volker Reichelt + + * reg-stack.c: Fix comment typo(s). + * tree-ssa-operands.c: Likewise. + * tree-vectorizer: Likewise. + +2005-07-21 Nick Clifton + + * config/sh/symbian.c: Replace C++ style line comments with C + style line comments. + (symbian_add_attribute): Do not use a ? operator on the LHS of + an assignment. + (sh_symbian_handle_dll_attribute): Change the type of the + method vector to "VEC(tree,gc)*" and use vector accessor + macros to walk over the elements. + (symbian_export_vtable_and_rtti_p): Likewise. + (symbian_class_needs_attribute_p): Likewise. + +2005-07-21 Paolo Bonzini + + PR target/22085 + * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not + initialize targetm.resolve_overloaded_builtin here. + (altivec_expand_overloaded_builtin): Make it non-static. + * config/rs6000/rs6000-protos.h + (altivec_expand_overloaded_builtin): New prototype. + * config/rs6000/rs6000.h (REGISTER_TARGET_PRAGMAS): Initialize + targetm.resolve_overloaded_builtin here. + * config/rs6000/darwin.h (REGISTER_TARGET_PRAGMAS): Likewise. + +2005-07-21 Paolo Bonzini + Zdenek Dvorak + + PR tree-optimization/19210 + * common.opt (Wunsafe-loop-optimizations, funsafe-loop-optimizations): + New. + * Makefile.in (tree-ssa-loop-niter.o): Depend intl.o. + * loop-iv.c (get_simple_loop_desc): If -funsafe-loop-optimizations, + rely on unproven assumptions. + * predict.c (predict_loops): Adjust call to number_of_iterations_exit. + * tree-flow.h (number_of_iterations_exit): Add final parameter. + * tree-scalar-evolution.c (number_of_iterations_in_loop): Adjust call + to number_of_iterations_exit. + * tree-ssa-loop-ivcanon.c (empty_loop_p): Likewise. + * tree-ssa-loop-ivopts.c (niter_for_exit): Likewise. + * tree-ssa-loop-niter.c (find_loop_niter, + estimate_numbers_of_iterations_loop): Likewise. + (number_of_iterations_exit): Honor the new options. + * doc/invoke.texi (Wunsafe-loop-optimizations, + funsafe-loop-optimizations): Document them. + +2005-07-21 Richard Sandiford + + PR rtl-optimization/22167 + * gcse.c (hoist_code): Fix hoist_exprs[] check. + +2005-07-20 Adam Nemet + + * config/rs6000/lynx.h: Mark __do_global_ctors_aux and + __do_global_dtors_aux longcall. + +2005-07-20 Kazu Hirata + + * gensupport.c (old_preds): Don't reference PREDICATE_CODES. + (old_special_pred_table): Don't reference + SPECIAL_MODE_PREDICATES. + * system.h (PREDICATE_CODES, SPECIAL_MODE_PREDICATES): Poison. + * config/arc/arc.h: Don't mention PREDICATE_CODES. + * config/sh/predicates.h: Don't mention + SPECIAL_MODE_PREDICATES. + * doc/tm.texi (PREDICATE_CODES, SPECIAL_MODE_PREDICATES): + Remove. + +2005-07-20 DJ Delorie + + * config.gcc: Add m32c-elf support. + + * doc/contrib.texi: Mention m32c. + * doc/extend.texi: Document m32c extensions. + * doc/install.texi: Mention m32c. + * doc/invoke.texi: Document m32c options. + * doc/md.texi: Document m32c constraints. + + * config/m32c/addsub.md: New file. + * config/m32c/bitops.md: New file. + * config/m32c/cond.md: New file. + * config/m32c/jump.md: New file. + * config/m32c/m32c-lib1.S: New file. + * config/m32c/m32c-lib2.c: New file. + * config/m32c/m32c-modes.def: New file. + * config/m32c/m32c-pragma.c: New file. + * config/m32c/m32c-protos.h: New file. + * config/m32c/m32c.abi: New file. + * config/m32c/m32c.c: New file. + * config/m32c/m32c.h: New file. + * config/m32c/m32c.md: New file. + * config/m32c/m32c.opt: New file. + * config/m32c/minmax.md: New file. + * config/m32c/mov.md: New file. + * config/m32c/muldiv.md: New file. + * config/m32c/predicates.md: New file. + * config/m32c/prologue.md: New file. + * config/m32c/shift.md: New file. + * config/m32c/t-m32c: New file. + +2005-07-20 Kaz Kojima + + * config/sh/sh.md (UNSPEC_SP_SET, UNSPEC_SP_TEST): New constants. + (stack_protect_set, stack_protect_test): New expanders. + (stack_protect_set_si, stack_protect_set_si_media, + stack_protect_set_di_media, stack_protect_test_si, + stack_protect_test_si_media, stack_protect_test_di_media): + New insns. + +2005-07-20 Andrew Pinski + + * c-typeck.c (output_init_element): Don't copy the INTEGER_CST. + +2005-07-20 James A. Morrison + + * tree.h (tree_expr_nonzero_p): Export. + * fold-const.c (tree_expr_nonzero_p): Likewise. + Return true for CALL_EXPRs that are alloca calls. + (fold_binary): Use omit_one_operand when checking EQ_EXPRs or NE_EXPRs + against zero. + * tree-flow.h (expr_computes_nonzero): Remove. + * tree-vrp.c (expr_computes_nonzero): Remove. + (vrp_expr_computes_nonzero): Use tree_expr_nonzero_p. + (extract_range_from_unary_expr): Likewise. + * tree-ssa-dom.c (record_equivalences_from_stmt): Use + tree_expr_nonzero_p. + +2005-07-20 Bernd Schmidt + + * config/bfin/bfin-protos.h (legitimize_pic_address): Don't declare. + * config/bfin/bfin.c (legitimize_pic_address): Now static. Take + extra arg "picreg" and use it instead of pic_offset_table_rtx. + All callers changed. + (frame_related_constant_load): New arg "related" which controls + setting of RTX_FRAME_RELATED_P. All callers changed. + (bfin_load_pic_reg): New function, broken out of bfin_expand_prologue. + (bfin_expand_prologue): Add stack limit checking. + * config/bfin/bfin.md (trapifcc): New pattern. + + * config/bfin/bfin.c: Include "langhooks.h". + (def_builtin): Go through lang_hooks to call builtin_function. + + * config/bfin/bfin-protos.h (bfin_longcall_p): Declare. + * config/bfin/predicates.md (symbol_ref_operand): New. + (call_insn_operand): Delete. All callers changed to use + register_no_elim_operand. + * config/bfin/bfin.c (init_cumulative_args): Initialize the new + call_cookie field. + (function_arg): Use it to generate the call's operand 2. + (bfin_longcall_p): New function. + (bfin_expand_call): Extra arg "cookie". All callers and declaration + changed. Emit extra USE in the pattern. Use bfin_longcall_p to + determine if the address needs to be in a REG. + (bfin_handle_longcall_attribute): New function. + (bfin_attribute_table): Add "longcall" and "shortcall". + * config/bfin/bfin.h (CALL_NORMAL, CALL_LONG, CALL_SHORT): New macros. + (CUMULATIVE_ARGS): New member call_cookie. + (PREDICATE_CODES): Add symbol_ref_operand. + * config/bfin/bfin.md (call, call_value, sibcall, sibcall_value): Add + extra USE to the pattern. + (call_symbol, sibcall_symbol, call_value_symbol, sibcall_value_symbol): + New patterns, split off call_insn, sibcall_insn, call_value_insn and + sibcall_value_insn; now the new patterns handle direct calls and the + old ones indirect calls. + * doc/extend.texi: Mention Blackfin in longcall/shortcall docs. + +2005-07-20 Zdenek Dvorak + + * doc/trouble.texi: Update section on handling of empty loops. + +2005-07-20 Kazu Hirata + + * config.gcc: Remove support for sparc-*-openbsd*, + i860-*-sysv4*, ip2k-*-elf, ns32k-*-netbsdelf*, + ns32k-*-netbsd*. + * config.host: Remove support for i860-*-sysv4* as a host. + * config/i860/*, config/ip2k/*, config/ns32k/*, + config/sparc/openbsd.h, config/sparc/t-openbsd: Remove. + * doc/install.texi, doc/invoke.texi, doc/md.texi: Don't + mention obsolete ports. + +2005-07-20 Kaz Kojima + + * config/sh/sh.c (regno_reg_class): Add GENERAL_REGS for + soft frame pointer. + (sh_expand_prologue): Use hard_frame_pointer_rtx instead + of frame_pointer_rtx. + (sh_expand_epilogue): Likewise. + (sh_set_return_address): Likewise. + (initial_elimination_offset): Use HARD_FRAME_POINTER_REGNUM + instead of FRAME_POINTER_REGNUM if needed. Add elimination + offsets from FRAME_POINTER_REGNUM. + * config/sh/sh.h (SH_REGISTER_NAMES_INITIALIZER): Add sfp. + (sh_register_names): Add initializer for sfp. + (GENERAL_OR_AP_REGISTER_P): Permit FRAME_POINTER_REGNUM. + (VALID_REGISTER_P): Likewise. + (FIRST_PSEUDO_REGISTER): Update. + (DWARF_FRAME_REGISTERS): Define. + (FIXED_REGISTERS, CALL_USED_REGISTERS): Add sfp. + (HARD_FRAME_POINTER_REGNUM): Define. + (FRAME_POINTER_REGNUM): Redefine. + (ELIMINABLE_REGS): Never eliminate to FRAME_POINTER_REGNUM, + but HARD_FRAME_POINTER_REGNUM instead. Add eliminations + from FRAME_POINTER_REGNUM. + (CAN_ELIMINATE): Use HARD_FRAME_POINTER_REGNUM instead of + FRAME_POINTER_REGNUM. + (REG_CLASS_CONTENTS): Add sfp. + (REG_ALLOC_ORDER): Likewise. + (FRAME_GROWS_DOWNWARD): Set to 1. Update comment. + (GO_IF_LEGITIMATE_ADDRESS): Use hard_frame_pointer_rtx instead + of frame_pointer_rtx. + (LEGITIMIZE_RELOAD_ADDRESS): Likewise. + +2005-07-19 James A. Morrison + + * fold-const.c (tree_expr_nonnegative_p): Only return true for + ABS_EXPR when flag_wrapv is false because of INT_MIN. + (tree_expr_nonzero_p): Always call tree_expr_nonzero_p on the argument + of an ABS_EXPR. + (fold_unary): Always fold ABS_EXPR> into + ABS_EXPR. + +2005-07-20 Giovanni Bajo + + Make CONSTRUCTOR use VEC to store initializers. + * c-common.c (complete_array_type): Update to cope with VEC in + CONSTRUCTOR_ELTS. + * c-pretty-print.c (pp_c_initializer_list): Use pp_c_constructor_elts. + (pp_c_constructor_elts): New function. + * c-pretty-print.h (pp_c_constructor_elts): Declare. + * c-typeck.c (build_function_call, build_c_cast, digest_init, + struct constructor_stack, struct initializer_stack, + constructor_elements, push_init_level, pop_init_level, + add_pending_init, find_init_member, output_init_element): Update to + cope with VEC in CONSTRUCTOR_ELTS. + * coverage.c (build_fn_info_value, build_ctr_info_value, + build_gcov_info): Likewise. + * expr.c (categorize_ctor_elements_1, store_constructor, + expand_expr_real_1): Likewise. + * fold-const.c (fold_ternary): Likewise. + * gimplify.c (gimplify_init_ctor_preeval, zero_sized_field_decl, + gimplify_init_constructor, gimplify_expr): Likewise. + * tree-dump.c (dequeue_and_dump): Likewise. + * tree-inline.c (copy_tree_r): Add code to duplicate a CONSTRUCTOR + node. + * tree-pretty-print.c (dump_generic_node): Update to cope with VEC in + CONSTRUCTOR_ELTS. + * tree-sra.c (generate_element_init_1): Likewise. + * tree-ssa-ccp.c (fold_const_aggregate_ref): Likewise. + * tree-ssa-operands.c (get_expr_operands): Likewise. + * tree-vect-generic.c (expand_vector_piecewise): Likewise. + * tree-vect-transform.c (vect_get_vec_def_for_operand): + (get_initial_def_for_reduction): Likewise. + * tree-vn.c (set_value_handle, get_value_handle): CONSTURCTOR uses + value handle in annotations. + * tree.c (tree_node_kind, tree_code_size, make_node_stat, + tree_node_structure): Add support for constr_kind. + (build_vector_from_ctor, build_constructor_single, + build_constructor_from_list): New functions. + (build_constructor): Update to take a VEC instead of a TREE_LIST. + (simple_cst_equal, iterative_hash_expr, initializer_zerop, walk_tree): + Update to cope with VEC in CONSTRUCTOR_ELTS. + * tree.def (CONSTRUCTOR): Make it a tcc_exceptional node. + * tree.h (FOR_EACH_CONSTRUCTOR_VALUE, FOR_EACH_CONSTRUCTOR_ELT, + CONSTRUCTOR_APPEND_ELT): New macros. + (struct constructor_elt, struct tree_constructor): New data types. + (union tree_node): Add tree_constructor field. + * treestruct.def: Define TS_CONSTRUCTOR. + * varasm.c (const_hash_1, compare_constant, copy_constant, + compute_reloc_for_constant, output_addressed_constants, + initializer_constant_valid_p, output_constant, + array_size_for_constructor, output_constructor): Update to cope with + VEC in CONSTRUCTOR_ELTS. + * vec.h (VEC_empty, VEC_copy): New macros. + +2005-07-19 Devang Patel + + * dbxout.c (dbxout_type): Check Objective-C++ lang. + +2005-07-19 Richard Henderson + + PR tree-opt/22278 + * gimplify.c (gimplify_expr): Use main variant type for the temp + destination for a discarded volatile read. + * tree-ssa.c (tree_ssa_useless_type_conversion_1): Don't elide + casts between non-void types that change volatility. + +2005-07-15 DJ Delorie + + * toplev.h: Add comment about the first parameter for warning(). + * errors.h: Likewise. + + * c.opt (Wpragmas): New. + * doc/invoke.texi: Document it. + + * function.c (do_warn_unused_parameter): Add warning control to + warning call. + * c-decl.c (warn_if_shadowing): Likewise. + * c-lex.c (cb_def_pragma): Likewise. + * c-pragma.c (GCC_BAD, GCC_BAD2): Likewise. + (pop_alignment): Likewise. + (handle_pragma_pack): Likewise. + (apply_pragma_weak): Likewise. + (handle_pragma_weak): Likewise. + (handle_pragma_redefine_extname): Likewise. + (add_to_renaming_pragma_list): Likewise. + (handle_pragma_extern_prefix): Likewise. + (maybe_apply_renaming_pragma): Likewise. + (handle_pragma_visibility): Likewise. + + * config/c4x/c4x-c.c (BAD): Likewise. + (c4x_parse_pragma): Likewise. + * config/ia64/ia64-c.c (ia64_hpux_handle_builtin_pragma): Likewise. + * config/rs6000/rs6000-c.c (SYNTAX_ERROR): Likewise. + (rs6000_pragma_longcall): Likewise. + * config/v850/v850-c.c (pop_data_area): Likewise. + (ghs_pragma_section): Likewise. + (ghs_pragma_section): Likewise. + (ghs_pragma_interrupt): Likewise. + (ghs_pragma_starttda): Likewise. + (ghs_pragma_startsda): Likewise. + (ghs_pragma_startzda): Likewise. + (ghs_pragma_endtda): Likewise. + (ghs_pragma_endsda): Likewise. + (ghs_pragma_endzda): Likewise. + +2005-07-19 Danny Berlin + Kenneth Zadeck + + * Makefile.in: Removed tree-promote-statics.c + * tree-promote-statics.c: Removed. + * common.opt: Removed flag-promote-statics. + * opts.c: Ditto. + * passes.c: Removed tree-promote-statics pass. + * tree-pass.h: Ditto. + * timevar.def: Removed TV_PROMOTE_STATICS. + + +2005-07-19 Gerald Pfeifer + + * config.gcc: Add support for *-*-freebsd7, *-*-freebsd8, + and *-*-freebsd9. + * config/freebsd-spec.h (FBSD_TARGET_OS_CPP_BUILTINS): Ditto. + +2005-07-19 Kaveh R. Ghazi + + PR c/22476 + * c-common.c (check_function_arguments): Call + 'check_function_format' if either -Wformat or + -Wmissing-format-attribute are specified. + * c-format.c (check_function_format): Check -Wformat before + calling 'check_format_info'. + * c-opts.c (c_common_post_options): Don't warn for + -Wmissing-format-attribute without -Wformat. + * c-typeck.c (convert_for_assignment): Detect additional cases for + -Wmissing-format-attribute. + * doc/invoke.texi (-Wmissing-format-attribute): Document new + behavior. + +2005-07-19 Richard Guenther + + * config/i386/i386.md (lrint2): Use temporary + instead of clobbering non-existent memory. + +2005-07-19 Nick Clifton + + * config/avr/avr.c (legitimate_address_p): Fix debugging print + statement to avoid displaying ASCII control characters. + +2005-07-19 Ben Elliston + + * bt-load.c (link_btr_uses): Fix uninitialised warnings. + * cfganal.c (find_edge_index): Ditto. + * combine.c (combine_instructions): Ditto. + * ddg.c (create_scc): Ditto. + (find_successors): Ditto. + (find_predecessors): Ditto. + (find_nodes_on_paths): Ditto. + (longest_simple_path): Ditto. + * flow.c (update_life_info): Ditto. + (count_or_remove_death_notes): Ditto. + (clear_log_links): Ditto. + * modulo-sched.c (generate_reg_moves): Ditto. + (find_max_asap): Ditto. + (find_max_hv_min_mob): Ditto. + (find_max_dv_min_mob): Ditto. + * sbitmap.c (sbitmap_first_set_bit): Ditto. + * sched-rgn.c (extract_edgelst): Ditto. + * tree-into-ssa.c (prepare_names_to_update): Ditto. + (dump_update_ssa): Ditto. + (ssa_names_to_replace) Ditto. + (switch_virtuals_to_full_rewrite): Ditto. + (update_ssa): Ditto. + * tree-vect-transform.c (vect_create_epilog_for_reduction): Ditto. + +2005-07-18 Daniel Berlin + + Fix PR tree-optimization/22483 + + * tree-complex.c (create_components): Use + safe_referenced_var_iterator and FOR_EACH_REFERENCED_VAR_SAFE. + * tree-flow-inline.h (fill_referenced_var_vec): New function. + * tree-flow.h (safe_referenced_var_iterator): New structure. + (FOR_EACH_REFERENCED_VAR_SAFE): New macro. + * tree-ssa-alias.c (setup_pointers_and_addressables): Use + safe_referenced_var iterator. + (add_type_alias): Ditto. + +2005-07-19 Steven Bosscher + + * loop-init.c (rest_of_handle_loop2): Remove. + (rtl_loop_init, rtl_loop_done, rtl_move_loop_invariants, + rtl_unswitch, rtl_unroll_and_peel_loops, rtl_doloop): New functions. + (pass_rtl_loop_init, pass_rtl_loop_done, + pass_rtl_move_loop_invariants, pass_rtl_unswitch, + pass_rtl_unroll_and_peel_loops, pass_rtl_doloop): New passes. + * tree-ssa-loop.c (pass_loop, pass_loop_init, pass_loop_done, + pass_unswitch): Rename to pass_tree_loop, pass_tree_loop_init, + pass_tree_loop_done, and pass_tree_unswitch. + (gate_loop): Rename to gate_tree_loop. + * passes.c (init_optimization_passes): Update for renamed tree + loop passes. Add the new loop2 passes as subpasses of loop2. + * tree-pass.h: Add extern declarations for the new loop2 subpasses. + Update for the renamed tree loop passes. + +2005-07-18 Ian Lance Taylor + + PR middle-end/22057 + * tree-cfgcleanup.c (cleanup_tree_cfg): Only remove forwarder + blocks when optimizing. + +2005-07-18 Steve Ellcey + + * common.opt (frename-registers): Initialize to 2. + (fweb): Ditto. + (fgcse-after-reload): Ditto. + * toplev.c (AUTODETECT_FLAG_VAR_TRACKING): Rename to AUTODETECT_VALUE. + (process_options): Only change flag_web, flag_rename_registers, + and flag_rerun_cse_after_loop if not explicitly set by user. + +2005-07-18 Jan Beulich + + * config/i386/i386.c (ix86_expand_branch, ix86_expand_setcc, + ix86_expand_carry_flag_compare, ix86_expand_int_movcc): Handle TImode + in 64-bit mode the same as DImode in 32-bit mode. + (ix86_expand_ashl_const, ix86_split_ashl, ix86_split_ashr, + ix86_split_lshr): Likewise. Rename to no longer refer to a specific + mode. Add new mode parameter. + * config/i386/i386.h (CONST_OK_FOR_LETTER_P): Describe and handle 'O'. + * config/i386/i386.md (cmpti, addti3, subti3, negti2, ashlti3, ashrti3, + x86_64_shift_adj): New expanders. + (*addti3_1, *subti3_1, *negti2_1, ashlti3_1, *ashlti3_2, ashrti3_1, + *ashrti3_2, lshrti3_1, *lshrti3_2, x86_64_shld, x86_64_shrd): New + insns. + Respective new splitters. Use renamed shift splitter helpers in 32-bit + DImode shift splitters. + * config/i386/i386-protos.h (ix86_split_ashl, ix86_split_ashr, + ix86_split_lshr): Renamed from ix86_split_[al]sh[rl]di. Added new + mode parameter. + +2005-07-18 Jan Beulich + + * i386.md (movdi_extzv_1): New. + (zero_extendhidi2): Combine alternatives and never force use of + REX64 prefix. + (zero_extendqidi2): Likewise. Don't restrict input selection. + +2005-07-17 Daniel Berlin + + Fix PR tree-optimization/22531 + * tree-ssa-pre.c (do_eustores): Make sure LHS is a decl for the + moment. + +2005-07-17 Daniel Berlin + + * tree-promote-statics.c (pass_promote_statics): Change dump file + name. + +2005-07-17 Daniel Berlin + + * tree-optimize.c (init_tree_optimization_passes): Add + pass_eliminate_useless_stores pass. + * tree-pass.h (pass_eliminate_useless_stores): New pass structure. + * tree-ssa-pre.c (is_copy_stmt): New function. + (follow_copies_till_vuse): Ditto. + (do_eustores): Ditto. + (gate_eustores): Ditto. + +2005-07-16 Richard Henderson + + * gcc.c (MFWRAP_SPEC): Don't wrap pthread_join or pthread_exit. + +2005-07-16 Danny Berlin + Kenneth Zadeck + + * Makefile.in: Added rules for ipa-pure-const.c, ipa-reference.c, + ipa-reference.h, ipa-utils.c, ipa-utils.h, ipa-type-escape.c, + ipa-type-escape.h, tree-promote-statics.c + * ipa-pure-const.c, ipa-reference.c, ipa-reference.h, ipa-utils.c, + ipa-utils.h, ipa-type-escape.c, ipa-type-escape.h, + tree-promote-statics.c: new files. + * alias.c: (nonlocal_mentioned_p_1, nonlocal_mentioned_p, + nonlocal_referenced_p_1, nonlocal_referenced_p, nonlocal_set_p_1, + int nonlocal_set_p, mark_constant_function): Deleted. + (rest_of_handle_cfg): Removed call to mark_constant_function. + (nonoverlapping_component_refs_p): Added calls to support + type based aliasing. + * tree-ssa-alias.c (may_alias_p, + compute_flow_insensitive_aliasing): Ditto. + * calls.c (flags_from_decl_or_type): Removed reference to + cgraph_rtl_info. + * c-typeck.c (convert_arguments): Make builtins tolerant of having + too many arguments. This is necessary for Spec 2000. + * cgraph.h (const_function, pure_function): Removed. + * common.opt: Added "fipa-pure-const", "fipa-reference", + "fipa-type-escape", and "ftree-promote-static". + * opts.c: Ditto. + * passes.c: Added ipa and tree-promote-statics passes. + * timevar.def: Added TV_IPA_PURE_CONST, TV_IPA_REFERENCE, + TV_IPA_TYPE_ESCAPE, and TV_PROMOTE_STATICS. + * tree-dfa.c (referenced_var_lookup_if_exists): New function. + * tree-flow.h: Added exposed sra calls and addition of + reference_vars_info field for FUNCTION_DECLS. + * tree-pass.h: Added passes. + * tree-sra.c: (sra_init_cache): New function. + (sra_insert_before, sra_insert_after) Made public. + (type_can_be_decomposed_p): Renamed from type_can_be_decomposed_p + and made public. + * tree-ssa-alias.c (dump_alias_stats): Added stats for type based + aliasing. (may_alias_p): Added code to use type escape analysis to + improve alias sets. + * tree-ssa-operands.c (add_call_clobber_ops): Added parameter and + code to prune clobbers of static variables based on information + produced in ipa-reference pass. Changed call clobbering so that + statics are not marked as clobbered if the call does not clobber + them. + +2005-07-16 Daniel Berlin + + * tree-ssa-structalias.c (need_to_solve): Need to check for preds, + too. + +2005-07-16 Eric Botcazou + + * doc/install.texi (*-*-solaris2*): Document recommended version + of GNU binutils and mention GNU linker problem on Solaris 10. + +2005-07-16 Joseph S. Myers + + PR c/22421 + * c-decl.c (c_build_bitfield_integer_type): New function. + (finish_struct): Call it. + * c-pretty-print.c (pp_c_type_specifier): Handle bit-field types. + +2005-07-16 Kaveh R. Ghazi + + * c-typeck.c (digest_init): Call 'convert_for_assignment' + before returning. + +2005-07-16 Jan Hubicka + + * cfg.c (update_bb_profile_for_threading): Fix profile updating. + (scale_bbs_frequencies_int): Watch roundoff errors. + * predict.c (return_prediction): Initialize return_stmt. + +2005-07-16 Jan Hubicka + + * profile.c (rest_of_handle_branch_prob): Fix handling of estimation + after RTL profiling. + +2005-07-11 Andrew Pinski + + PR middle-end/22398 + * fold-const.c (build_range_check): Convert high/low to etype + if we are only comparing against exp. + +2005-07-13 Daniel Berlin + + Fix PR tree-optimization/22376 + * tree-ssa-structalias.c (build_constraint_graph): We really meant + special var here. + (need_to_solve): New function. + (compute_points_to_sets): Use it. + +2005-07-15 Jan Hubicka + + * cfg.c (update_bb_profile_for_threading): More diagnostic. + * tree-ssa-threadupdate.c (redirect_edges): Update profile of dup_block. + +2005-07-15 Richard Guenther + + * c-common.c (handle_flatten_attribute): New function. + Add flatten function attribute. + * doc/extend.texi: Document flatten function attribute. + * Makefile.in (ipa-inline.o): Depend on hashtab.h. + * ipa-inline.c (cgraph_find_cycles, cgraph_flatten_node): + New functions. + (cgraph_decide_inlining): Handle functions with flatten + attribute. + +2005-07-14 David Edelsohn + + * config/rs6000/rs6000.md (UNSPEC_SYNC, UNSPEC_LWSYNC, + UNSPEC_ISYNC, UNSPEC_SYNC_OP, UNSPEC_ATOMIC, UNSPEC_CMPXCHG, + UNSPEC_XCHG, UNSPEC_AND): New. + (UNSPECV_ATOMIC, UNSPECV_SYNC, UNSPECV_SYNC_OP, UNSPECV_CMPXCHG, + UNSPECV_LWSYNC, UNSPECV_ISYNC): Delete. + * config/rs6000/sync.md (FETCHOP): New code macro. + (fetchop_name, fetchop_pred, fetchopsi_constr, fetchopdi_constr): + New code attrs. + (memory_barrier, sync_internal): Use unspec instead of unspec_volatile. + (sync_compare_and_swap): Same. + (sync_lock_test_and_set): Same. + (sync_, sync_nand): Only use rs6000_emit_sync + for QImode and HImode, and not PPC405. + (sync_old_, sync_old_nand): Same. + (sync_new_, sync_new_nand): Same. + (sync_{si,di}_internal): New. + (sync_nand{si,di}_internal): New. + (sync_old_{si,di}_internal): New. + (sync_old_nand{si,di}_internal): New + (sync_new_{si,di}_internal): New. + (sync_new_nand{si,di}_internal): New. + (atomic_and{si,di}): New. + (sync_new_nand{si,di}_internal): New. + (atomic_and{si,di}): New. + (sync_add_internal): Delete. + (sync_addshort_internal): Use unspec instead of unspec_volatile. + (sync_sub_internal): Delte. + (sync_subshort_internal): New. + (sync_andsi_internal): Use unspec instead of unspec_volatile. + (sync_anddi_internal): Delete. + (sync_boolsi_internal): Use unspec instead of unspec_volatile. + (sync_booldi_internal): Delete. + (sync_boolc_internal): Delete. + (sync_boolcshort_internal): Use unspec instead of unspec_volatile. + (sync_boolc_internal2): Delete. + (sync_boolcc_internal): Delete. + (isync, lwsync): Use unspec instead of unspec_volatile. + * config/rs6000/rs6000.c (rs6000_emit_sync): Implement MINUS. + Revert UNSPEC_VOLATILE. + (rs6000_split_atomic_op): New. + * config/rs6000/rs6000-protos.h (rs6000_split_atomic_op): Declare. + +2005-07-14 Eric Christopher + + * config/mips/mips.c (mips_canonicalize_comparison): Cast + argument of trunc_int_for_mode to unsigned HOST_WIDE_INT. + +2005-07-14 Eric Christopher + + * config/s390/t-tpf (SHLIB_MAPFILES): Remove. + +2005-07-14 Steven Bosscher + + PR tree-optimization/22230 + * tree-vrp.c (extract_range_from_binary_expr): Fix logics thinko in + the computation of the four cross productions for "range op range". + +2005-07-14 Alexandre Oliva + Ulrich Weigand + + PR target/20126 + * loop.c (loop_givs_rescan): Do not ICE if unable to reduce an IV + in some insn. + +2005-07-14 Ulrich Weigand + + * config/s390/s390.h (TARGET_TPF_PROFILING): Add default definition. + +2005-07-14 Steve Ellcey + + * config/ia64/ia64.c (ia64_output_dwarf_dtprel): Support ILP32 mode. + +2005-07-14 Richard Guenther + + PR middle-end/22347 + * config/i386/i386-protos.h (ix86_function_value): Change + prototype to match new target hook. + * config/i386/i386.c (ix86_value_regno): Change prototype + to take extra type argument. + (TARGET_FUNCTION_VALUE): Define. + (ix86_function_ok_for_sibcall): Pass extra argument to + ix86_value_regno, check return slot rtx for exact match. + (ix86_function_value): Take extra parameter. Dispatch to + ix86_value_regno with fndecl/fntype as provided. + (ix86_value_regno): Handle extra type argument. + * config/i386/i386.h (FUNCTION_VALUE): No longer define. + + * testsuite/gcc.target/i386/sseregparm-3.c: New testcase. + * testsuite/gcc.target/i386/sseregparm-4.c: New testcase. + * testsuite/gcc.target/i386/sseregparm-5.c: New testcase. + * testsuite/gcc.target/i386/sseregparm-6.c: New testcase. + * testsuite/gcc.target/i386/sseregparm-7.c: New testcase. + +2005-07-14 Richard Guenther + + * Makefile.in (explow.o, reg-stack.o): Depend on target.h. + * calls.c (expand_call): Pass fntype to hard_function_value. + (emit_library_call_value_1): Likewise. + * explow.c: Include target.h. + (hard_function_value): Take extra argument, the fntype. + Use new target hook for function_value. + * expr.h (hard_function_value): Change prototype. + * function.c (aggregate_value_p): Pass 0 as fntype to + hard_function_value. + (assign_parms): Use new target hook for function_value. + Pass 0 as fntype to hard_function_value. + (expand_function_end): Likewise. + * reg-stack.c: Include target.h. + (stack_result): Use new target hook for function_value. + * target-def.h: New target hook function_value. + * target.h: Likewise. + * targhooks.c (default_function_value): New function. + * targhooks.h (default_function_value): Declare. + +2005-07-13 Ian Lance Taylor + + * config/mips/mips.h (CLZ_DEFINED_VALUE_AT_ZERO): Define. + +2005-07-14 Jan Hubicka + + * tree-dfa.c (dump_variable): Use default_def function. + * tree-ssa-alias.c (dump_points_to_info): Likewise. + * tree-ssa.c (verify_use): Likewise. + * tree-ssanames.c (release_ssa_name): Likewise. + * tree-tailcall.c (eliminate_tail_call): Likewise. + (tree_optimize_tail_calls_1): Likewise. + * tree-vrp.c (get_value_range): Likewise. + +2005-07-14 Ben Elliston + + * gcc.c (main): Compare language[0] with '*' when iterating over + the infiles. + +2005-07-13 Adrian Straetling + + * config/s390/s390.c: (s390_cc_modes_compatible): Move before + "s390_emit_compare". Add handling of CCZ1mode. + (s390_canonicalize_comparison): Simplify cascaded EQ, NE. + (390_emit_compare): Use "s390_cc_modes_compatible" for mode + checking. + (s390_branch_condition_mask): Add CCZ1mode handling. + * config/s390/s390.md: ("seq", "*seq"): New pattern. + ("sync_compare_and_swap_cc", "*sync_compare_and_swap_cc"): + Use CCZ1mode instead of CCZmode. + * config/s390/s390-modes.def: Add CCZ1mode. Comment new mode. + +2005-07-13 Adrian Straetling + + * config/s390/s390.md: ("cmpstrsi", "*cmpstr"): New + pattern. + ("strlen", "*strlen"): Use hard reg 0 in SImode. + +2005-07-13 Eric Christopher + + * config/mips/mips.c (mips_canonicalize_comparison): New. + (mips_emit_int_relational): Use. + +2005-07-13 Eric Christopher + + * config.gcc (s390x-ibm-tpf*): Add extra_options. Remove + static extra parts. + * config/s390/s390.md: Include tpf.md. Move tpf specific + patterns... + * config/s390/tpf.md: To here. + * config/s390/s390.opt: Move tpf specific options... + * config/s390/tpf.opt: to here. Add mmain option. + * config/s390/tpf-unwind.h: Remove unnecessary defines. + * config/s390/tpf.h: Rewrite. + +2005-07-13 H.J. Lu + + * doc/tm.texi: Remove @xref{Cross-profiling}. + +2005-07-13 Jeff Law + + * fold-const.c (fold_binary): When comparing two simple ADDR_EXPR + expressions, test their _DECL operands for pointer equality rather + than using operand_equal_p. + +2005-07-13 H.J. Lu + + * config/alpha/linux.h (TARGET_HAS_F_SETLKW): Renamed to ... + (TARGET_POSIX_IO): This. + * config/darwin.h: Likewise. + * config/freebsd.h: Likewise. + * config/linux.h: Likewise. + * config/lynx.h: Likewise. + * config/netbsd.h: Likewise. + * config/rs6000/linux64.h: Likewise. + * config/rs6000/linux.h: Likewise. + * config/s390/tpf.h: Likewise. + * config/sh/embed-elf.h: Likewise. + * config/sparc/linux64.h: Likewise. + * config/sparc/linux.h: Likewise. + * config/svr4.h: Likewise. + * gcov-io.h: Likewise. + + * doc/tm.texi: Updated. + + * libgcov.c (create_file_directory): Defined only if + TARGET_POSIX_IO is defined. + (gcov_exit): Call create_file_directory only if TARGET_POSIX_IO + is defined. + +2005-07-13 Jan Hubicka + + * tree-ssa-operands.c (get_expr_operands): Fix typo in previous patch. + +2005-07-13 David Edelsohn + + * tree-ssa-dom.c (lookup_avail_expr): Do not pass member in freed + structure as argument. + +2005-07-13 Paolo Bonzini + + PR tree-optimization/21921 + * tree-iterator.c (tsi_link_before): Support the case when + tsi_end_p (tsi) == true. + +2005-07-12 Zdenek Dvorak + + PR tree-optimization/22442 + * tree-chrec.c (chrec_fold_multiply_poly_poly): Associate chrecs + correctly. + +2005-07-12 Zdenek Dvorak + + PR rtl-optimization/20376 + * toplev.c (process_options): Enable -fweb and -frename-registers when + unrolling. + * doc/invoke.texi: Update the information about when -fweb and + -frename-registers are enabled. + +2005-07-12 Andrew Pinski + + PR tree-opt/21840 + * tree-ssa-pre.c (eliminate): Convert the sprime to the correct type + if *rhs_p is not a SSA_NAME. + +2005-07-12 Daniel Berlin + + Fix PR tree-optimization/22422 + * tree-ssa-structalias.c (struct variable_info): Add flag for + special vars. + (get_varinfo): Now a static function. + (new_varinfo): init has_union and is_special_var to false. + (solution_set_add): Check has_union. + (do_da_constraint): Move temporary variable so it gets reset + properly. + Also check for special variable. + (do_ds_constraint): Ditto. + (do_sd_constraint): Ditto. + (do_structure_copy): Check for special variable. + (find_func_aliases): Ditto. + (init_base_vars): Set special vars properly. + +2005-07-13 Jan Hubicka + + * cfgexpand.c (expand_one_stack_var): Do not expand variables when we + do unit-at-a-time. + + * tree-ssa-operands.c (parse_ssa_operands): Fix formatting. + (get_expr_operands): Fix thinko wrt flags and subvars. + + PR tree-optimize/22379 + * tree-inline.c (expand_call_inline): Do not output sorry in early + inlining. + +2005-07-12 Dale Johannesen + + * config/rs6000.c (rs6000_rtx_cost): Move FLOAT_EXTEND. + +2005-07-12 Andrew Pinski + + PR bootstrap/21704 + * host-linux.h: Include limits.h. + +2005-07-12 Dale Johannesen + + * expr.c (compress_float_constant): Add cost check. + * config/rs6000.c (rs6000_rtx_cost): Adjust FLOAT_EXTEND cost. + +2005-07-12 Dale Johannesen + + * gcc.target/i386/compress-float-sse.c: New. + * gcc.target/i386/compress-float-sse-pic.c: New. + * gcc.target/i386/compress-float-387.c: New. + * gcc.target/i386/compress-float-387-pic.c: New. + * gcc.dg/compress-float-ppc.c: New. + * gcc.dg/compress-float-ppc-pic.c: New. + +2005-07-12 Eric Christopher + + * config.gcc (s390x-ibm-tpf*): Add extra_options. Remove + static extra parts. + * config/s390/s390.md: Include tpf.md. Move tpf specific + patterns... + * config/s390/tpf.md: To here. + * config/s390/s390.opt: Move tpf specific options... + * config/s390/tpf.opt: to here. Add mmain option. + * config/s390/tpf-unwind.h: Remove unnecessary defines. + * config/s390/tpf.h: Rewrite. + +2005-07-12 Eric Christopher + + * gcc.c (struct infile): Update comment for language. + (main): Rewrite input file resetting code. + +2005-07-12 Andrew Pinski + + PR tree-opt/22335 + * tree-ssa-dom.c (eliminate_redundant_computations): Reject the prop if + requiring a cast in a non RHS of modify_expr. Add a cast when required. + (lookup_avail_expr): Use constant_boolean_node instead + of boolean_false_node/boolean_true_node. + +2005-07-12 Ben Elliston + + * tree-cfg.c (dump_cfg_stats): Add a new fmt_str_2 format string + and use it when printing num_edges. + +2005-07-12 Bernd Schmidt + + * doc/extend.texi (Blackfin Built-in Functions): New section. + * doc/invoke.texi (mcsync-anomaly, mno-csync-anomaly): Fix the + @opindex. + +2005-07-12 Adrian Straetling + + * builtins.c: (expand_builtin_memcmp, expand_builtin_strncmp): + s/cmpstrsi/cmpstrnsi + (expand_builtin_strcmp): Rewrite to support both 'cmpstrsi' and + 'cmpstrnsi'. + * optabs.c: (prepare_cmp_insn): Add availability of 'cmpstrn'. + (init_optabs): Initialize cmpstrn_optab. + * optabs.h: (enum insn_code cmpstrn_optab): Declare. + * genopinit.c: (optabs[]): Add 'cmpstrn' to initialisation. + * expr.c: (enum insn_code cmpstrn_optab): Declare. + * config/i386/i386.md: s/cmpstr/cmpstrn + * config/c4x/c4x.md: s/cmpstr/cmpstrn + * doc/md.texi: Update documentation. + +2005-07-11 Richard Henderson + + * config/alpha/alpha.c (alpha_gimplify_va_arg_1): Use + build_va_arg_indirect_ref. + (alpha_gimplify_va_arg): Likewise. + * config/c4x/c4x.c (c4x_gimplify_va_arg_expr): Likewise. + * config/i860/i860.c (i860_gimplify_va_arg_expr): Likewise. + * config/mips/mips.c (mips_gimplify_va_arg_expr): Likewise. + * config/pa/pa.c (hppa_gimplify_va_arg_expr): Likewise. + * config/sh/sh.c (sh_gimplify_va_arg_expr): Likewise. + * config/stormy16/stormy16.c (xstormy16_expand_builtin_va_arg): + Likewise. + * config/xtensa/xtensa.c (xtensa_gimplify_va_arg_expr): Likewise. + +2005-07-12 Zdenek Dvorak + + * tree-flow.h (remove_empty_loops, single_dom_exit): Declare. + * passes.c (init_optimization_passes): Add pass_empty_loop. + * tree-pass.h (pass_empty_loop): Declare. + * tree-ssa-loop-ivcanon.c (empty_loop_p, remove_empty_loop, + try_remove_empty_loop, remove_empty_loops): New functions. + * tree-ssa-loop-ivopts.c (single_dom_exit): Export. + * tree-ssa-loop.c (tree_ssa_empty_loop, pass_empty_loop): New. + +2005-07-12 Peter Barada + + PR middle-end/16719 + PR middle-end/18421 + * config/m68k/m68k.h (HARD_REGNO_MODE_OK): Disallow bytes + in address registers. + * config/m68k/m68k.c (hard_regno_mode_ok): Likewise. + * config/m68k/m68k.md: Replace 's' with 'i' in 4th + alternative of addsi3_5200. + +2005-07-11 Ian Lance Taylor + + * config/mips/mips.md (ffs2): Remove. + +2005-07-11 Ian Lance Taylor + + * doc/tree-ssa.texi (Cleanups): Improve description of + TRY_FINALLY_EXPR. + (GIMPLE Exception Handling): Clarify TRY_CATCH_EXPR cases. + +2005-07-11 Daniel Berlin + + * print-tree.c (print_node): Use DECL_ARGUMENT_FLD. + * tree.h (DECL_ARGUMENT_FLD): New macro. + +2005-07-11 Daniel Berlin + + Fix PR tree-optimization/22404 + + * tree-ssa-structalias.c (create_variable_info_for): Use + correct offset. + +2005-07-11 Bernd Schmidt + + * config/bfin/bfin.md (cmpsi, compare_eq, compare_ne, compare_lt, + compare_le, compare_leu, compare_ltu): Use reg_or_const_int_operand + for second comparison operand. + * config/bfin/predicates.md (reg_or_const_int_operand): New. + + * config/bfin/bfin.md (define_attr "type"): Add "sync". + (define_insn_reservation "alu"): Likewise. + (csync, ssync): Now of type sync. + * config/bfin/bfin.h (TARGET_DEFAULT): Defaults to + -mcsync-anomaly -mspecld-anomaly. + * config/bfin/bfin.opt (mcsync): Remove. + (mcsync-anomaly, mspecld-anomaly): Add. + * config/bfin/bfin.c: Include "insn-codes.h". + (bfin_reorg): Extend to handle the CSYNC anomaly as well. + (TARGET_DEFAULT_TARGET_FLAGS): New. + * doc/invoke.texi: Document -mcsync-anomaly, -mspecld-anomaly. + +2005-07-11 Steven Bosscher + + * basic-block.h: Give the BB flags enum a name, bb_flags. + Add new flags BB_FORWARDER_BLOCK, and BB_NONTHREADABLE_BLOCK. + * cfgcleanup.c (enum bb_flags): Remove here. + (BB_FLAGS, BB_SET_FLAG, BB_CLEAR_FLAG): Remove. + (notice_new_block): Set/test bb->flags instead of aux via BB_FLAGS. + (update_forwarder_flag): Likewise. + (thread_jump): Likewise. + (try_forward_edges): Likewise. + (try_optimize_cfg): Likewise. Clear bb->flags before updating the + forwarder flags. Don't clear bb->aux for all basic blocks. Only + reset the BB_FORWARDER_BLOCK and BB_NONTHREADABLE_BLOCK flags. + +2005-07-11 Richard Guenther + + * config/i386/i386.opt: New target option -msseregparm. + * config/i386/i386.c (override_options): Error out for + -msseregparm but no SSE support. + (ix86_function_sseregparm): Check for global sseregparm. + * doc/invoke.texi: Document -msseregparm. + +2005-07-11 Kazuhiro Inaoka + + * config.gcc (m32r-*-linux*): Use the default extra_parts. + (m32rle-*-linux*): Ditto. + +2005-07-11 Jakub Jelinek + + * cfgexpand.c (stack_protect_classify_type): Use TYPE_SIZE_UNIT (type) + instead of TYPE_MAX_VALUE (TYPE_DOMAIN (type)) to get array size in + bytes. + +2005-07-10 John David Anglin + + PR middle-end/22239 + PR target/20126 + * loop.c (loop_givs_rescan): Use expand_simple_binop instead of + gen_rtx_MINUS to handle non-replaceable (plus ((x) (const)). + +2005-07-07 Daniel Berlin + + * tree-ssa-structalias.c (struct variable_info): Heapify complex. + (varmap): Heapify varmap. + (constraints): Heapify constraints. + (struct constraint_graph): Heapify succs and preds. + (constraint_vec_find): Update for heapification. + (constraint_set_union): Ditto. + (insert_into_complex): Ditto. + (constraint_edge_vec_find): Ditto. + (erase_graph_self_edge): Ditto. + (add_graph_edge): Ditto. + (get_graph_weights): Ditto. + (merge_graph_nodes): Ditto. + (build_constraint_graph): Ditto. + (topo_visit): Ditto. + (solve_graph): Ditto. + (create_variable_info_for): Ditto. + (init_base_vars): Ditto. + (delete_points_to_sets): Free graph, varmap, and complex constraints. + (condese_varmap_nodes): Free complex vector. + (clear_edges_for_node): Clear succs and preds vector. + +2005-07-10 Daniel Berlin + + * tree-ssa-structalias.c (update_alias_info): Change counting of + references to not include vdefs. + +2005-07-10 Daniel Berlin + + * tree-ssa-alias.c (free_used_part_map): Add missing free. + (up_insert): Ditto. + +2005-07-10 John David Anglin + + * pa.c (pa_commutative_p): Make PLUS commutative when + TARGET_NO_SPACE_REGS is true. + +2005-07-09 Diego Novillo + + * Makefile.in (tree-ssa-alias.o): Depend on tree-ssa-structalias.h + * tree-cfg.c (CHECK_OP): Only test for is_gimple_val. + * tree-dfa.c (dump_subvars_for): New. + (debug_subvars_for): New. + (dump_variable): Show subvariables if VAR has them. + * tree-flow-inline.h (get_subvar_at): New. + (overlap_subvar): Change offset and size to unsigned HOST_WIDE_INT. + * tree-flow.h (struct ptr_info_def): Remove field pt_malloc. + Update all users. + (struct subvar): Change fields offset and size to unsigned + HOST_WIDE_INT. + (dump_subvars_for): Declare. + (debug_subvars_for): Declare. + (get_subvar_at): Declare. + (okay_component_ref_for_subvars): Change 2nd and 3rd argument + to unsigned HOST_WIDE_INT *. + (overlap_subvar): Likewise. + * tree-gimple.c (is_gimple_reg): Always return false for + SFTs and memory tags. + * tree-pass.h (pass_build_pta, pass_del_pta): Remove. + Update all callers. + * tree-ssa-alias.c: Include tree-ssa-structalias.h. + (compute_may_aliases): Call compute_points_to_sets. + (collect_points_to_info_for): Remove. + (compute_points_to_and_addr_escape): Remove. + (delete_alias_info): Call delete_points_to_sets. + (compute_flow_sensitive_aliasing): If the call to + find_what_p_points_to returns false, call set_pt_anything. + (add_may_alias): Set TREE_ADDRESSABLE when adding a new alias. + (set_pt_anything): Clear pi->pt_vars. + (set_pt_malloc): Remove. + (merge_pointed_to_info): Remove. + (add_pointed_to_expr): Remove. + (add_pointed_to_var): Remove. + (collect_points_to_info_r): Remove. + (is_escape_site): Make extern. + (create_sft): New. + (create_overlap_variables_for): Call it. + * tree-ssa-copy.c (merge_alias_info): Never merge + flow-sensitive alias information. + * tree-ssa-operands.c (get_expr_operands): Adjust variables + offset and size to be unsigned HOST_WIDE_INT. + (add_to_addressable_set): Rename from note_addressable. + Set TREE_ADDRESSABLE as the variables are added to the set. + Update all users. + (add_stmt_operand): Do not try to micro-optimize unmodifiable + operands into VUSEs when adding V_MAY_DEFs for members in an + alias set. + * tree-ssa-operands.h (add_to_addressable_set): Declare. + * tree-ssa-structalias.c: Include tree-ssa-structalias.h last. + (struct variable_info): Add bitfield is_heap_var. + (var_anyoffset, anyoffset_tree, anyoffset_id): Declare. + (new_var_info): Initialize is_heap_var. + (get_constraint_for): Add HEAP variables to the symbol table. + Mark them with is_heap_var. + (update_alias_info): New. Taken mostly from the old + compute_points_to_and_addr_escape. + (handle_ptr_arith): New. + (find_func_aliases): Call update_alias_info. + Call handle_ptr_info for tcc_binary expressions. + Call mark_stmt_modified. + (create_variable_info_for): If DECL has subvars, do not create + variables for its subvars. Always add all the fields. + (set_uids_in_ptset): If the solution includes ANYOFFSET and + SFTs, then add all the SFTs of the structure. + If VI->DECL is an aggregate with subvariables, add the SFT at + VI->OFFSET. + (find_what_p_points_to): If VI is an artificial variable, + translate to bitfields in SSA_NAME_PTR_INFO. + If the solution is empty, set pi->pt_vars to NULL + (init_base_vars): Create ANYOFFSET. + (compute_points_to_sets): Rename from create_alias_vars. + Make extern. + (pass_build_pta): Remove. + (delete_points_to_sets): Rename from delete_alias_vars. + (pass_del_pta): Remove. + * tree-ssa-structalias.h (struct alias_info): Move from + tree-ssa-alias.h. + (NUM_REFERENCES, NUM_REFERENCES_CLEAR, NUM_REFERENCES_INC, + NUM_REFERENCES_SET): Likewise. + (compute_points_to_sets, delete_points_to_sets): Declare. + +2005-07-09 Richard Henderson + + * config/alpha/alpha.c (emit_insxl, alpha_expand_compare_and_swap_12, + alpha_split_compare_and_swap_12, alpha_expand_lock_test_and_set_12, + alpha_split_lock_test_and_set_12): New functions. + * config/alpha/alpha-protos.h: Update. + * config/alpha/alpha.md (UNSPEC_MB, UNSPEC_ATOMIC, + UNSPEC_CMPXCHG, UNSPEC_XCHG): Rename from UNSPECV_FOO. + * config/alpha/sync.md (I12MODE): New. + (memory_barrier, mb_internal): Use unspec instead of unspec_volatile. + (sync_): Likewise. + (sync_nand): Likewise. + (sync_old_): Likewise. + (sync_new_): Likewise. + (sync_old_nand, sync_new_nand): Likewise. + (sync_compare_and_swap): Likewise. + (sync_lock_test_and_set): Likewise. + (sync_compare_and_swap): New. + (sync_compare_and_swap_1): New. + (sync_lock_test_and_set): New. + (sync_lock_test_and_set_1): New. + +2005-07-09 Diego Novillo + + PR 21356 + PR 22332 + * passes.c (execute_todo): Cleanup the CFG before updating SSA. + +2005-07-09 Jakub Jelinek + + * config/i386/i386.c (output_set_got): Don't omit OFFSET FLAT: + in Intel syntax add %reg, OFFSET FLAT:_GLOBAL_OFFSET_TABLE_+(.-.Lx). + +2005-07-09 Richard SAndiford + + PR target/21656 + * config/mips/elf.h (NO_IMPLICIT_EXTERN_C): Define. + +2005-07-08 David Edelsohn + + * config/rs6000/sync.md (load_locked_): Use Z for + memory_operand constraint. + (store_conditional_): Same. + (sync_compare_and_swap): Same. + (sync_lock_test_and_set): Same. + +2005-07-08 Hans-Peter Nilsson + + Rewrite PIC support to more closely model actual instructions. + * config/cris/cris-protos.h (cris_gotless_symbol, cris_got_symbol) + (cris_symbol): Remove prototypes for removed functions. + (cris_pic_symbol_type_of, cris_valid_pic_const) + (cris_expand_pic_call_address): Prototypes for new functions. + * config/cris/cris/cris.c (cris_pic_sympart_only): Remove unused + variable. + (cris_print_operand) : Remove cases for unused + modifiers. + : Add case for new punctuation character. + : Temporarily set flag_pic = 2 instead of incorrectly + emitting (extra) PIC modifier. + : Do not assert for PLT. + (cris_initial_frame_pointer_offset, cris_simple_epilogue) + (cris_expand_prologue, cris_expand_epilogue): Check + for pic_offset_table_rtx usage instead of taking + current_function_uses_pic_offset_table as the final word. + (cris_rtx_costs, cris_address_cost, cris_side_effect_mode_ok): + Remove flag_pic difference. + (cris_valid_pic_const, cris_pic_symbol_type_of): New functions, + the moral equivalents of... + (cris_symbol, cris_gotless_symbol, cris_got_symbol): Remove + functions. + (cris_legitimate_pic_operand): Just call cris_valid_pic_const. + (cris_handle_option): Mark ARG as unused. + (cris_expand_pic_call_address): New worker function for "call", + "call_value". + (cris_asm_output_symbol_ref, cris_asm_output_label_ref): Do not + output PIC constructs here. + (cris_output_addr_const_extra): Changes for emitting PIC modifiers + as symbol-specific modifers, not whole or part of operands. + * config/cris/cris/cris.h (EXTRA_CONSTRAINT): Remove 'U' case. + (EXTRA_CONSTRAINT_S): Changed semantics: allow only CONST-wrapped + constants and flag_pic. + (CONSTANT_INDEX_P): Adjust for new functions. + (enum cris_pic_symbol_type): New helper type. + (PRINT_OPERAND_PUNCT_VALID_P): Add ':'. + * config/cris/cris/cris.md (CRIS_UNSPEC_GOTREL) + (CRIS_UNSPEC_GOTREAD, CRIS_UNSPEC_PLTGOTREAD): New + define_constants. + ("movsi"): Emit actual instructions for GOT and relative access. + ("*movsi_got_load"): New pattern to set up the register holding + the GOT pointer. + ("*movsi_internal"): Operand 1 is not a plain general_operand. + Adjust FIXME for 'S'. + : Sanity-check UNSPEC types for PIC. + Use "movs" for -fpic cases. + ("addsi3"): Add alternative for 'S'; use adds.w when possible. + ("uminsi3","*expanded_call_value"): Remove 'S' alternative. + ("call", "call_value"): Just call cris_expand_pic_call_address for + PIC addresses. + ("*expanded_call_no_gotplt", "*expanded_call_value_no_gotplt"): + Remove special pattern. + ("*expanded_call_side", "*expanded_call_value_side"): New + patterns. + (gotplt-to-plt, gotplt-to-plt-side-call) + (gotplt-to-plt-side-call-value, gotplt-to-plt-side): New + peephole2:s. + * config/cris/cris/predicates.md + ("cris_general_operand_or_gotless_symbol"): Remove unused + predicate. + ("cris_general_operand_or_symbol"): Adjust for new functions. + +2005-07-08 Andrew Pinski + + * config/darwin.h (TARGET_C99_FUNCTIONS): Define to 1. + +2005-07-08 Daniel Berlin + + * Makefile.in (TREE_H): Add treestruct.def. + (c-decl.o): Add pointer-set.h + * c-decl.c (diagnose_mismatched_decls): Don't attempt to look at + visibility on regular DECL's. + (merge_decls): Fix the copying of decl nodes of various types for + the new structures. Don't update RTL, section name, weak status, + etc, on DECL's without RTL. + (grokdeclarator): DECL_ARG_TYPE_AS_WRITTEN is gone. + Don't check volatile on non-variable types. + (store_parm_decls_oldstyle): Use pointer_set instead of DECL_WEAK + to check whether we have seen arguments. + * c-objc-common.c (c_tree_printer): Reverse order of tests so that + flag is checked before field (flag is common, field is not). + * dwarf2out.c (decl_ultimate_origin): Only DECL's with + TS_DECL_COMMON could have an origin. + (add_location_or_const_value_attribute): Don't check section name + on non-var/function decls. + (dwarf2out_var_location): Reverse order of tests. + * emit-rtl.c (set_reg_attrs_for_parm): DECL_CHECK is dead, replace + with DECL_WRTL_CHECK. + * expmed.c (make_tree): rtl is now in decl_with_rtl. + * fold-const.c (fold_binary): Don't check weakness on + non-var/function decls. + (tree_expr_nonzero_p): Ditto. + (fold_checksum_tree): Use tree_decl_extra as sizeof + buffer. + * ggc-page.c (extra_order_size_table): Add sizes for + tree_decl_non_common, tree_parm_decl, tree_var_decl, and + tree_field_decl. + * gimplify.c (gimplify_bind_expr): Only set + DECL_SEEN_IN_BIND_EXPR_P on VAR_DECL. + * integrate.c (copy_decl_for_inlining): Don't set RTL on decl's + without RTL. + * langhooks-def.h (LANG_HOOK_INIT_TS): New. + * langhooks.h (init_ts). New langhook. + * passes.c (rest_of_decl_compilation): Reverse order of tests. + * print-tree.c (print_node): Update to only print fields that + exist in the structures the passed decl has. + * toplev.c (wrapup_global_declarations): Don't reset + DECL_DEFER_OUTPUT on DECL's that don't contain it. + * tree-browser.c (browse_tree): DECL_ARG_TYPE_AS_WRITTEN removed. + * tree-inline.c (remap_decl): Ditto. + * tree-outof-ssa.c (create_temp): Reverse order of tests. + * tree-pretty-print.c (print_declaration): Don't print + DECL_REGISTER on things that don't contain it. + * tree-vrp.c (expr_computes_nonzero): Don't check weakness on + non-var/function decls. + * tree.c (tree_contains_struct): New structure. + (init_priority_for_decl): New hashtable. + (tree_int_map): New structure. + (tree_int_map_eq): New function. + (tree_int_map_marked_p): Ditto. + (tree_int_map_hash): Ditto. + (tree_map): Move to tree.h. + (tree_map_eq): Externalize. + (tree_map_hash): Ditto. + (tree_map_marked_p): Ditto. + (init_ttree): Set up tree_contains_struct and call langhook. + (decl_assembler_name): Use DECL_NON_COMMON_CHECK.. + (tree_code_size): Update for new structures. + (tree_node_structure): Update for new structures. + (make_node_stat): Don't try to set DECL_IN_SYSTEM_HEADER on decls + without the field. + (copy_node_stat): Copy init priority. + (build_decl_stat): Ditto for visibility. + (ts_enum_names): New. + (tree_contains_struct_check_failed): New function. + (decl_init_priority_lookup): Ditto. + (decl_init_priority_insert): Ditto. + * treestruct.def: New file. + * tree.h (CODE_CONTAINS_STRUCT): New macro. + (CONTAINS_STRUCT_CHECK): Ditto. + (tree_contains_struct_check_failed): New prototype. + (DECL_CHECK): Removed. + (DECL_MINIMAL_CHECK): New. + (DECL_COMMON_CHECK): Ditto. + (DECL_WRTL_CHECK): Ditto. + (DECL_NON_COMMON_CHECK): Ditto. + (DECL_WITH_VIS_CHECK): Ditto. + (VAR_OR_FUNCTION_DECL_P): Ditto + (struct tree_decl_minimal): New structure. + (struct tree_decl_common): Ditto. + (struct tree_decl_with_rtl): Ditto. + (struct tree_decl_with_vis): Ditto. + (struct tree_decl_non_common): Ditto. + (struct tree_field_decl): Ditto. + (struct tree_parm_decl): Ditto. + (struct tree_var_decl): Ditto. + (struct tree_function_decl): Ditto. + (struct tree_const_decl): Ditto. + (struct tree_result_decl): Ditto. + (union tree_node): Add new structures. + * var-tracking.c (track_expr_p): Reverse order of tests. + + * doc/c-tree.texi: Add documentation on DECL node internal structure. + +2005-07-08 Kazu Hirata + + * cfgexpand.c (tree_expand_cfg): Don't use FINALIZE_PIC. + * system.h: Poison FINALIZE_PIC. + * doc/tm.texi (FINALIZE_PIC): Remove. + +2005-07-08 Andrew Pinski + + PR tree-opt/22329 + * tree-ssa-propagate.c (fold_predicate_in): Convert the value + to the correct type if we have a MODIFY_EXPR. + +2005-07-08 Kazu Hirata + + PR tree-optimization/22360 + * tree.c (upper_bound_in_type): Fix calculations for casting + to a non-wider signed type and casting a signed value to a + wider unsigned type. + (lower_bound_in_type): Fix calculations for casting to a + non-wider signed type. + + PR tree-optimization/20139 + * tree-cfg.c (remove_bb): Check in_ssa_p before calling + release_defs. + * tree-optimize.c (execute_cleanup_cfg_post_optimizing): Call + fold_cond_expr_cond. + * tree-ssanames.c (release_defs): Assert in_ssa_p. + * tree.c (upper_bound_in_type, lower_bound_in_type): Rewrite. + +2005-07-08 Andrew Pinski + + PR tree-opt/22356 + * tree-complex.c (expand_complex_libcall): Produce + REALPART_EXPR/IMAGPART_EXPR with the correct type. + +2005-07-08 Kenneth Zadeck + + * bitmap.c (bitmap_and, bitmap_and_into, bitmap_and_compl, + bitmap_and_compl_into, bitmap_xor, bitmap_xor_into): Removed "a != + b" assert and inserted fastpath code for this case. + (bitmap_ior): Removed "a != b" assert. + +2005-07-08 Kazuhiro Inaoka + + * config/m32r/linux.h (STARTFILE_SPEC): Support PIE. + (ENDFILE_SPEC): Likewise. + * config/m32r/m32r.h (ASM_SPEC): Likewise. + + * config/m32r/m32r.c (m32r_output_function_epilogue): Care for + a large stack frame at epilogue. + +2005-07-08 David Billinghurst + + * final.c: Include sdbout.h when required. + +2005-07-07 Geoffrey Keating + + * config.gcc (*-*-darwin*): Only one target-specific header file + for generic darwin. + (powerpc-*-darwin*): Add version-specific header files. + * configure.in (gcc_AC_CHECK_DECLS): Add strverscmp. + * config.in: Regenerate. + * configure: Regenerate. + * gcc.c: Include xregex.h. + (version_compare_spec_function): New. + (spec_function): Add version-compare. + (replace_outfile_spec_function): Reformat comment. + (compare_version_strings): New. + * config/darwin-c.c (version_as_macro): New. + (builtin_define): New. + (darwin_cpp_builtins): New. + * config/darwin-protos.h (darwin_cpp_builtins): New. + * config/darwin.h (CPP_SPEC): Don't define APPLE_CC here. + (LIB_SPEC): Make unconditional, update comment. + (TARGET_C99_FUNCTIONS): Define. + * config/darwin.opt: Sort. + (mmacosx-version-min=): New. + * config/darwin7.h: Delete. + * config/darwin8.h: Delete. + * config/i386/darwin.h (): Call darwin_cpp_builtins. + * config/rs6000/darwin.h (): Call darwin_cpp_builtins. + (TARGET_C99_FUNCTIONS): Define. + * config/rs6000/darwin7.h: New. + * config/rs6000/darwin8.h: New. + * doc/invoke.texi (Darwin Options): Add -mmacosx-version-min= + (-mmacosx-version-min): Document. + +2005-07-07 Ian Lance Taylor + + * config/mips/mips.md (abs2) [GPR]: Remove. + +2005-07-07 John David Anglin + + PR middle-end/22239 + * loop.c (loop_givs_rescan): Check that v->new_reg is a REG. + +2005-07-07 Khem Raj + + * config/arm/arm.c (thumb_output_function_prologue): Calculate offset + in bytes, not words. + +2005-07-07 Paul Brook + + * config/arm/arm.c (arm_pad_arg_upward): Compare return value of + DEFAULT_FUNCTION_ARG_PADDING to upward. + +2005-07-07 Richard Henderson + + * function.c (locate_and_pad_parm): Record parameter alignment in + stack_alignment_needed. + +2005-07-07 David Edelsohn + + * config/rs6000/rs6000.md (UNSPEC_SYNC, UNSPEC_SYNC_OP, + UNSPEC_SYNC_SWAP, UNSPEC_LWSYNC, UNSPEC_ISYNC): Delete. + (UNSPECV_LL, UNSPECV_SC, UNSPECV_ATOMIC, UNSPECV_SYNC, + UNSPECV_SYNC_OP, UNSPECV_CMPXCHG, UNSPECV_LWSYNC, UNSPECV_ISYNC): New. + (define_attr "type"): Add isync, sync, load_l, store_c. + * config/rs6000/sync.md (memory_barrier): Change to define_expand. + Create scratch volatile MEM. + (sync_internal): New. POWER mnemonic is dcs, not ics. Attribute + sync. + (load_locked_): New. + (store_conditional_): New. + (sync_compare_and_swap): Replace with splitter. + (sync_lock_test_and_set): Replace with splitter. + (sync_): Change to unspec_volatile UNSPECV_SYNC_OP + and UNSPECV_ISYNC. + (isync): Change to unspec_volatile UNSPECV_ISYNC. POWER mnemonic + is ics. Attribute isync. + (lwsync): Change to unspec_volatile UNSPECV_LWSYNC. Attribute + lwsync. + * config/rs6000/rs6000.c (rs6000_emit_sync): Use UNSPEC_VOLATILE + and UNSPECV_SYNC_OP. + (emit_unlikely_jump): New. + (emit_load_locked): New. + (emit_store_conditional): New. + (rs6000_split_compare_and_swap): New. + (rs6000_split_lock_test_and_set): New. + (is_dispatch_slot_restricted): Return 4 for TYPE_LOAD_L, + TYPE_STORE_C, TYPE_ISYNC, TYPE_SYNC. + * config/rs6000/rs6000-protos.h (rs6000_split_compare_and_swap, + rs6000_split_lock_test_and_set): Declare. + * config/rs6000/{40x.md,440.md,603.md,6xx.md,7450.md,7xx.md,8540.md, + mpc.md,power4.md,power5.md,rios1.md,rios2.md,rs64.md): Add load_l, + store_c, isync, sync. + +2005-07-07 Kelley Cook + + * Makefile.in (echo_quoted_to_gtyp): New template for outputing + filenames to gtyp-gen.h. + (s-typ-gen): Use it in place of for loops. + +2005-07-07 J"orn Rennecke + + * hooks.c (hook_bool_rtx_int_false): New function. + * hooks.h (hook_bool_rtx_int_false): Declare. + * target-def.h (TARGET_COMMUTATIVE_P): Define. + (TARGET_INITIALIZER): Add TARGET_COMMUTATIVE_P. + * target.h (struct gcc_target): Add commutative_p member. + * targhooks.c (hook_bool_rtx_commutative_p): New function. + * targhooks.h (hook_bool_rtx_commutative_p): Declare. + * pa.c (TARGET_COMMUTATIVE_P): Redefine. + (pa_commutative_p): New function. + * jump.c (target.h): Include. + (rtx_renumbered_equal_p): Use targetm.commutative_p. + * doc/tm.texi: Document TARGET_COMMUTATIVE_P. + +2005-07-07 Adrian Straetling + + * config/s390/s390-protos.h (s390_expand_clrmem): Delete. + (s390_expand_setmem): New. + * config/s390/s390.c: Likewise. + (print_shift_count_operand): Truncate to 12 bits instead of 6. + Adapt comments. + * config/s390/s390.md: ("setmem"): Accept character as + general_operand. Call new function "s390_expand_setmem". + ("clrmem_long", "*clrmem_long"): Rewrite to ... + ("setmem_long", "*setmem_long"): ... this. + +2005-07-07 Adrian Straetling + + * config/s390/s390.c: (optimization_options): Enable + TARGET_MVCLE at -Os. + * doc/invoke.texi: Document changes in default behaviour. + * config/s390/s390.opt: ("mvcle"): Fix typo: is "mmvcle". + +2005-07-07 Adrian Straetling + + * expr.c: (set_storage_via_setmem): Convert opchar to mode + defined by back-end. + +2005-07-07 Jakub Jelinek + + * config/sparc/sparc.md (stack_protect_testsi): Put clobbers after + all sets in the pattern. + * config/rs6000/rs6000.md (stack_protect_testsi, + stack_protect_testdi): Likewise. + +2005-07-06 Jeff Law + + * tree-vrp.c (simplify_using_ranges): Kill. + (vrp_finalize): Remove call to simplify_using_ranges. + (simplify_stmt_using_ranges): New function extracted from + simplify_using_ranges. + (simplify_div_or_mod_using_ranges): Likewise. + (simplify_abs_using_ranges): Likewise. + (simplify_cond_using_ranges): New function. + * tree-flow.h (simplify_stmt_using_ranges): Prototype. + * tree-ssa-propagate.c (substitute_and_fold): Call + simplify_stmt_using_ranges if we have range information. + +2005-07-06 James E. Wilson + + * config/ia64/ia64.c (ia64_reorg): Check optimize before + ia64_flag_schedule_isns2. + + * config/ia64/ia64.c (ia64_expand_movxf_movrf): Don't word swap when + reading/writing general registers. + (ia64_function_arg): Revert 2005-06-18 change. + +2005-07-06 John David Anglin + + * pa.c (legitimize_pic_address): Use gcc_assert instead of abort. + (legitimize_tls_address): Use gcc_unreachable instead of abort. + +2005-07-06 Kaz Kojima + + * function.c (expand_function_end): Revert part of 2005-06-27 + patch. Do sjlj_emit_function_exit_after after return_label. + +2005-07-06 Kazu Hirata + + * doc/install.texi (--disable-libssp): New. + +2005-07-06 Fariborz Jahanian + + * doc/invoke.texi: Update -fforce-mem documentation. + * dojump.c (compare_from_rtx,do_compare_rtx_and_jump): Remove + code for -fforce-mem. + * expmed.c: (store_bit_field,store_fixed_bit_field, + extract_bit_field): Ditto. + * expr.c: (convert_move): Ditto. + * optabs.c: (expand_binop,expand_twoval_unop,expand_twoval_binop, + expand_unop,emit_unop_insn,prepare_cmp_insn,emit_conditional_move, + emit_conditional_add,expand_float,expand_fix): Ditto. + * opts.c: (decode_options): Remove setting of flag_force_mem flag. + (common_handle_option): Issue warning when -fforce-mem specified. + +2005-07-06 Paul Brook + + * aclocal.m4: Work around a bug in AC_PATH_PROGS when its last + argument is empty. + * configure: Regenerate. + +2005-07-06 J"orn Rennecke + + * sh.c (final_prescan_insn): Undo bogus change from 2005-05-09. + +2005-07-06 Daniel Berlin + + Fix PR tree-optimization/22319 + Fix PR tree-optimization/22140 + Fix PR tree-optimization/22310 + + * tree-ssa-structalias.c (do_structure_copy): Give up earlier on + variable sized types. + Use correct type for intermediate structure on *a = *b structure + copies. + +2005-07-06 Jakub Jelinek + + * config/rs6000/rs6000.h (RS6000_VARARGS_AREA, RS6000_VARARGS_SIZE): + Remove. + (STARTING_FRAME_OFFSET): Don't add RS6000_VARARGS_AREA. + (machine_function): Move typedef to... + * config/rs6000/rs6000.c (machine_function): ... here. Add + varargs_save_offset field. + (rs6000_stack_t): Remove varargs_size field. + (setup_incoming_varargs): Allocate varargs save area using + assign_stack_local, try to make it as small as possible. + Save offset from virtual_stack_vars_rtx to the save area + in cfun->machine->varargs_save_offset. Use UNITS_PER_FP_WORD + instead of magic 8 when fp word byte size is used. + (rs6000_va_start): Use cfun->machine->varargs_save_offset + instead of -RS6000_VARARGS_SIZE. + (rs6000_stack_info, debug_stack_info, + rs6000_initial_elimination_offset): Remove all traces of + varargs_size. + * config/rs6000/sysv4.h (RS6000_VARARGS_AREA): Remove. + * config/rs6000/darwin.h (STARTING_FRAME_OFFSET): Don't add + RS6000_VARARGS_AREA. + +2005-07-06 Zdenek Dvorak + + PR tree-optimization/21963 + * tree-ssa-loop-ivopts.c (get_computation_aff): Use + constant_multiple_of in the same way get_computation_cost_at does. + +2005-07-06 Jakub Jelinek + + * config/sparc/sparc.h (sparc_compare_emitted): New extern. + * config/sparc/sparc.c (sparc_compare_emitted): New variable. + (gen_compare_reg): If sparc_compare_emitted is set, clear it + and return its previous value. + (emit_v9_brxx_insn): Assert sparc_compare_emitted is NULL. + * config/sparc/sparc.md (UNSPEC_SP_SET, UNSPEC_SP_TEST): New + constants. + (stack_protect_set, stack_protect_test): New expanders. + (stack_protect_setsi, stack_protect_setdi, stack_protect_testsi, + stack_protect_testdi): New insns. + * config/sparc/linux.h (TARGET_THREAD_SSP_OFFSET): Define. + * config/sparc/linux64.h (TARGET_THREAD_SSP_OFFSET): Define. + +2005-07-06 Jeff Law + + * tree-ssa-dce.c (cfg_altered): New global. + (tree_dce_init): Initialize cfg_altered. + (remove_dead_stmt): If we remove an edge in the CFG, then set + CFG_ALTERED. + (perform_tree_ssa_dce): If we altered the CFG, then invalidate + the dominators. + +2005-07-06 Kazu Hirata + + * Makefile.in (stamp-collect-ld): Use + $(ORIGINAL_LD_FOR_TARGET) instead of $<. Don't remove + ./collect-ld if it already exists. + (stamp-nm): Use $(ORIGINAL_NM_FOR_TARGET) instead of $<. + Don't remove ./nm if it already exists. + +2005-07-05 Devang Patel + + * tree-vectorizer.h (struct _loop_vec_info): Remove loop_line_number. + (LOOP_VINFO_LOC, LOOP_LOC): Remove. + * tree-vectorizer.c (vect_loop_location): New. + (vect_print_dump_info): Use vect_loop_location. + (new_loop_vec_info): Do not set LOOP_VINFO_LOC. + (vectorize_loops): Set vect_loop_location. + * tree-vect-analyze.c (vect_analyze_offset_expr, + vect_determin_vectorization_factor, vect_analyze_operations, + vect_analyze_scalar_cycles, vect_analyze_data_ref_dependence, + vect_analyze_data_ref_dependences, vect_compute_data_ref_alignment, + vect_analyze_data_refs_alignment, vect_analyze_data_ref_access, + vect_analyze_data_ref_accesses, vect_analyze_pointer_ref_access, + vect_object_analysis, vect_analyze_data_refs, vect_mark_relevant, + vect_stmt_relevant_p, vect_mark_stmts_to_be_vectorized, + vect_can_advance_ivs_p, vect_get_loop_niters, vect_analyze_loop_form, + vect_analyze_loop): Adjust vect_print_dump_info API. + * tree-vect-transform.c (vect_create_addr_base_for_vector_ref, + vect_create_data_ref_ptr, vect_init_vector, vect_get_vec_def_for_operand, + vect_finish_stmt_generation, vectorizable_assignment, + vectorizable_operation, vectorizable_store, vectorizable_load, + vectorizable_live_operation, vectorizable_condition, vect_transform_stmt, + vect_update_ivs_after_vectorizer, vect_do_peeling_for_loop_bound, + vect_gen_ninters_for_prolog_loop, vect_do_peeling_for_alignment, + vect_transform_loop): Same. + * tree-vectorizer.c (get_vectype_for_scalar_type, vect_is_simple_use, + vect_is_simple_reduction, vect_is_simple_iv_evolution, vectorize_loops): + Same. + +2005-07-05 Randolph Chung + + * configure.ac (hppa*-*-linux*: Check for a TLS capable gas. + * configure: Regenerate. + * config/pa/pa-protos.h (tls_symbolic_operand): Declare. + (pa_tls_referenced_p): Declare. + * config/pa/pa.c (legitimize_pic_address): Reject TLS operands. + (gen_tls_tga, gen_tls_get_addr, hppa_tls_call): New. + (legitimize_tls_address): New. + (hppa_legitimize_address): Handle TLS addresses. + (pa_tls_symbol_ref_1, pa_tls_referenced_p): New. + (TARGET_CANNOT_FORCE_CONST_MEM): Define. + (emit_move_sequence): Handle TLS addresses. + (pa_encode_section_info): Call default handler to handle common + sections. + * config/pa/pa.h (PA_SYMBOL_REF_TLS_P): New. + (CONSTANT_ADDRESS_P): Reject TLS operands. + (TARGET_HAVE_TLS) [HAVE_AS_TLS]: Define. + * config/pa/pa.md (UNSPEC_TP, UNSPEC_TLSGD, UNSPEC_TLSLDM) + (UNSPEC_TLSLDO, UNSPEC_TLSLDBASE, UNSPEC_TLSIE) + (UNSPEC_TLSLE): Define new constants. + (tgd_load, tld_load, tld_offset_load, tp_load, tie_load, tle_load): New. + * config/pa/predicates.md (symbolic_operand): Reject TLS operands. + (tls_symbolic_operand, tgd_symbolic_operand, tld_symbolic_operand) + (tie_symbolic_operand, tle_symbolic_operand): New + +2005-07-06 Kelley Cook + + * aclocal.m4: Update macros for autoconf 2.59 style. + * configure.ac: Likewise. + +2005-07-05 John David Anglin + + * pa.c (function_value): Handle small aggregates on 32-bit targets. + (function_arg): Pass small aggregates in general registers on 32-bit + targets. + * som.h (MEMBER_TYPE_FORCES_BLK): Delete define. + +2005-07-05 Andrew Pinski + + * Makefile.in (final.o): Fix dependencies. + +2005-07-05 Joseph S. Myers + + PR c/22013 + PR c/22098 + * langhooks.h (struct lang_hooks): Add expr_to_decl. + * langhooks.c (lhd_expr_to_decl): New. + * langhooks-def.h (lhd_expr_to_decl, LANG_HOOKS_EXPR_TO_DECL): + New. + (LANG_HOOKS_INITIALIZER): Update. + * tree.c (recompute_tree_invarant_for_addr_expr): Call + expr_to_decl langhook. + * c-tree.h (c_expr_to_decl): Declare. + * c-typeck.c (c_expr_to_decl): New. + (build_unary_op): Do not handle ADDR_EXPR of COMPOUND_LITERAL_EXPR + specially. + * c-objc-common.h (LANG_HOOKS_EXPR_TO_DECL): Define. + +2005-07-05 Joseph S. Myers + + PR c/22308 + * c-decl.c (finish_struct): Also copy C_TYPE_FIELDS_READONLY, + C_TYPE_FIELDS_VOLATILE and C_TYPE_VARIABLE_SIZE to type variants. + +2005-07-05 Paolo Bonzini + + * Makefile.in: Adjust dependencies. + * tree-pass.h: Add new passes and passes formerly in tree-optimize.c. + * basic-block.h (duplicate_computed_gotos): Remove, it is now static. + * alias.c (rest_of_handle_cfg, pass_cfg): New. + * bb-reorder.c (duplicate_computed_gotos): Make it static. + * cfgexpand.c (tree_expand_cfg): Add code formerly at the beginning of + rest_of_compilation. + + * bb-reorder.c (gate_duplicate_computed_gotos, + pass_duplicate_computed_gotos, gate_handle_reorder_blocks, + rest_of_handle_reorder_blocks, pass_reorder_blocks, + gate_handle_partition_blocks, rest_of_handle_partition_blocks, + pass_partition_blocks): New. + * bt-load.c (gate_handle_branch_target_load_optimize, + rest_of_handle_branch_target_load_optimize, + pass_branch_target_load_optimize): New. + * cfgcleanup.c (rest_of_handle_jump, pass_jump, rest_of_handle_jump2, + pass_jump2): New. + * cfglayout.c (pass_insn_locators_initialize): New. + * cfgrtl.c (pass_free_cfg): New. + * combine.c (gate_handle_combine, rest_of_handle_combine, + pass_combine): New. + * cse.c (gate_handle_cse, rest_of_handle_cse, pass_cse, + gate_handle_cse2, rest_of_handle_cse2, pass_cse2): New. + * emit-rtl.c (pass_unshare_all_rtl, pass_remove_unnecessary_notes): New. + * except.c (pass_set_nothrow_function_flags, + pass_convert_to_eh_region_ranges, gate_handle_eh, rest_of_handle_eh, + pass_rtl_eh): New. + * final.c (pass_compute_alignments, rest_of_handle_final, pass_final, + rest_of_handle_shorten_branches, pass_shorten_branches, + rest_of_clean_state, pass_clean_state): New. + * flow.c (pass_recompute_reg_usage, gate_remove_death_notes, + rest_of_handle_remove_death_notes, pass_remove_death_notes, + rest_of_handle_life, pass_life, rest_of_handle_flow2, + pass_flow2): New. + * function.c (pass_instantiate_virtual_regs, pass_init_function, + rest_of_handle_check_leaf_regs, pass_leaf_regs): New. + * gcse.c (gate_handle_jump_bypass, rest_of_handle_jump_bypass, + pass_jump_bypass, gate_handle_gcse, rest_of_handle_gcse, + pass_gcse): New. + * global.c (rest_of_handle_global_alloc, pass_global_alloc): New. + * ifcvt.c (gate_handle_if_conversion, rest_of_handle_if_conversion, + pass_rtl_ifcvt, gate_handle_if_after_combine, + rest_of_handle_if_after_combine, pass_if_after_combine, + gate_handle_if_after_reload, rest_of_handle_if_after_reload, + pass_if_after_reload): New. + * integrate.c (pass_initial_value_sets): New. + * jump.c (pass_cleanup_barriers, purge_line_number_notes, + pass_purge_lineno_notes): New. + * mode-switching.c (rest_of_handle_mode_switching, + pass_mode_switching): New. + * local-alloc.c (rest_of_handle_local_alloc, pass_local_alloc): New. + * loop-init.c (gate_handle_loop2, rest_of_handle_loop2, + pass_loop2): New. + * loop.c (gate_handle_loop_optimize, rest_of_handle_loop_optimize, + pass_loop_optimize): New. + * modulo-sched.c (gate_handle_sms, rest_of_handle_sms, + pass_sms): New. + * postreload-gcse.c (gate_handle_gcse2, rest_of_handle_gcse2, + pass_gcse2): New. + * postreload.c (gate_handle_postreload, rest_of_handle_postreload, + pass_postreload_cse): New. + * profile.c (gate_handle_profiling, pass_profiling, + rest_of_handle_branch_prob, pass_branch_prob): New. + * recog.c (pass pass_split_for_shorten_branches, gate_do_final_split, + pass_split_before_regstack, gate_handle_split_before_regstack, + gate_handle_peephole2, rest_of_handle_peephole2, pass_peephole2, + rest_of_handle_split_all_insns, pass_split_all_insns): New. + * reg-stack.c (gate_handle_stack_regs, rest_of_handle_stack_regs, + pass_stack_regs): New. + * regmove.c (gate_handle_regmove, rest_of_handle_regmove, pass_regmove, + gate_handle_stack_adjustments, rest_of_handle_stack_adjustments, + pass_stack_adjustments): New. + * regrename.c (gate_handle_regrename, rest_of_handle_regrename, + pass_regrename): New. + * reorg.c (gate_handle_delay_slots, rest_of_handle_delay_slots, + pass_delay_slots, gate_handle_machine_reorg, + rest_of_handle_machine_reorg, pass_machine_reorg): New. + * rtl.h (extern void purge_line_number_notes): New. + * sched-rgn.c (gate_handle_sched, rest_of_handle_sched, + gate_handle_sched2, rest_of_handle_sched2, pass_sched, + pass_sched2): New. + * tracer.c (gate_handle_tracer, rest_of_handle_tracer, + pass_tracer): New. + * value-prof.c (gate_handle_value_profile_transformations, + rest_of_handle_value_profile_transformations, + pass_value_profile_transformations): New. + * var-tracking.c (gate_handle_var_tracking, + pass_variable_tracking): New. + * web.c (gate_handle_web, rest_of_handle_web, pass_web): New. + + * passes.c (open_dump_file, close_dump_file, rest_of_handle_final, + rest_of_handle_delay_slots, rest_of_handle_stack_regs, + rest_of_handle_variable_tracking, rest_of_handle_machine_reorg, + rest_of_handle_old_regalloc, rest_of_handle_regrename, + rest_of_handle_reorder_blocks, rest_of_handle_partition_blocks, + rest_of_handle_sms, rest_of_handle_sched, rest_of_handle_sched2, + rest_of_handle_gcse2, rest_of_handle_regmove, + rest_of_handle_tracer, rest_of_handle_if_conversion, + rest_of_handle_if_after_combine, rest_of_handle_if_after_reload, + rest_of_handle_web, rest_of_handle_branch_prob, + rest_of_handle_value_profile_transformations, rest_of_handle_cfg, + rest_of_handle_jump_bypass, rest_of_handle_combine, + rest_of_handle_life, rest_of_handle_cse, rest_of_handle_cse2, + rest_of_handle_gcse, rest_of_handle_loop_optimize, + rest_of_handle_loop2, rest_of_handle_branch_target_load_optimize, + rest_of_handle_mode_switching, rest_of_handle_jump, + rest_of_handle_eh, rest_of_handle_stack_adjustments, + rest_of_handle_flow2, rest_of_handle_jump2, + rest_of_handle_peephole2, rest_of_handle_postreload, + rest_of_handle_shorten_branches, rest_of_clean_state, + rest_of_compilation): Remove. + + * cgraphunit.c (ipa_passes): Moved from tree-optimize.c. + * passes.c (dump_flags, in_gimple_form, all_passes, + all_ipa_passes, all_lowering_passes, register_one_dump_file, + register_dump_files, next_pass_1, last_verified, execute_todo, + execute_one_pass, execute_pass_list, execute_ipa_pass_list): Moved + from tree-optimize.c. + (init_optimization_passes): Moved from tree-optimize.c, + adding the RTL optimizations. + * tree-dump.h (dump_info_p, dump_flag): Moved from tree.h. + * tree-optimize.c (dump_flags, in_gimple_form, all_passes, + all_ipa_passes, all_lowering_passes, register_one_dump_file, + register_dump_files, next_pass_1, last_verified, execute_todo, + execute_one_pass, execute_pass_list, execute_ipa_pass_list, + init_tree_optimization_passes, ipa_passes): Delete. + * tree-pass.h (enum tree_dump_index): Moved from tree.h, removing + the RTL dumps. + (TDF_*, get_dump_file_name, dump_enabled_p, dump_initialized_p, + dump_begin, dump_end, dump_node, dump_switch_p, dump_flag_name): Moved + from tree.h. + (ipa_passes): Remove. + (all_passes, all_ipa_passes, all_lowering_passes): Now extern. + * tree.h (enum tree_dump_index, TDF_*, get_dump_file_name, + dump_enabled_p, dump_initialized_p, dump_begin, dump_end, dump_node, + dump_switch_p, dump_flag_name): Moved to tree-pass.h. + (dump_info_p, dump_flag): Moved to tree-dump.h. + + * Makefile.in: Adjust dependencies for tree-pretty-print.c, + cgraph.c, opts.c. + * passes.c (finish_optimization_passes): Use dump_begin + and dump_end, TDI_end. + (gate_rest_of_compilation): New. + (pass_rest_of_compilation): Use it. + (gate_postreload, pass_postreload): New. + * toplev.c (general_init): Rename init_tree_optimization_passes. + * toplev.h (init_tree_optimization_passes): Rename to + init_optimizations_passes. + * tree-dump.c (dump_flag): Make static. + (dump_files): Remove RTL dumps. + * tree-optimize.c (pass_all_optimizations, pass_early_local_passes, + pass_cleanup_cfg, pass_free_cfg_annotations, + pass_cleanup_cfg_post_optimizing, pass_free_datastructures, + pass_init_datastructures, pass_fixup_cfg): Make non-static. + * tree-pretty-print.c: Include tree-pass.h. + * cgraph.c: Include tree-dump.h. + +2005-07-04 Daniel Berlin + + * tree-ssa-structalias.c (get_constraint_exp_from_ssa_var): + Only fall back to saying it points to readonly memory if + we can't do better. + +2005-07-05 Kazuhiro Inaoka + + * config/m32r/m32r-protos.h: Remove m32r_finalize_pic. + * config/m32r/m32r.c (m32r_compute_frame_size, + m32r_expand_prologue): Take current_function_profile into + account whenever we reference + current_function_uses_pic_offset_table. + (m32r_finalize_pic): Remove. + * config/m32r/m32r.h (FINALIZE_PIC): Likewise. + +2005-07-05 Kazu Hirata + + * Makefile.in (stamp-as): Use $(ORIGINAL_AS_FOR_TARGET) + instead of $<. Don't remove ./as if it already exists. + +2005-07-04 John David Anglin + + PR target/21723 + * pa.md: Remove fcpy alternative from movhi and movqi patterns. + * pa32-regs.h (HARD_REGNO_NREGS): Return two floating point registers + for complex modes when generating code for PA 1.0. + (VALID_FP_MODE_P): New macro. + (HARD_REGNO_MODE_OK): Use VALID_FP_MODE_P. Use non-overlapping register + sets for all general and floating point modes. Align wide floating + point modes to even register boundaries to comply with architectural + requirements. + (CLASS_MAX_NREGS): Update to align with change to HARD_REGNO_NREGS. + * pa64-regs.h (HARD_REGNO_NREGS): Update comment and formatting. + (VALID_FP_MODE_P): New macro. + (HARD_REGNO_MODE_OK): Use VALID_FP_MODE_P. Use non-overlapping register + sets for all general and floating point modes. Align wide floating + point modes to even register boundaries to comply with architectural + requirements. + +2005-07-04 Diego Novillo + + * tree-dump.c (dump_files): Initialize dump number for .cgraph + to 0. + +2005-07-04 Diego Novillo + + * tree-ssa-structalias.c: Don't include expr.h. + +2005-07-04 Diego Novillo + + * tree-iterator.h (TSI_NEW_STMT, TSI_SAME_STMT): Fix + comments. + +2005-07-04 Daniel Berlin + + Fix PR tree-optimization/22279 + + * tree-ssa-structalias.c (offset_overlaps_with_access): Use + correct operator. + +2005-07-04 J"orn Rennecke + + * sh.c (output_ieee_ccmpeq): Replace "\\;" with "\n\t". + +2005-07-03 Joseph S. Myers + + * bb-reorder.c, c-pch.c, c-pragma.c, c.opt, cfghooks.c, cfgloop.c, + cfgrtl.c, cgraphunit.c, config/c4x/c4x.c, config/cris/cris.c, + config/frv/frv.c, config/host-darwin.c, config/iq2000/iq2000.c, + config/lynx.h, config/m68k/m68k.c, config/pa/pa.c, config/sh/sh.h, + config/stormy16/stormy16.c, config/v850/v850.c, + config/vax/netbsd-elf.h, coverage.c, dwarf2out.c, emit-rtl.c, + except.c, gcc.c, tree-cfg.c, tree-eh.c, tree-ssa.c, xcoffout.c: + Avoid "." or "\n" at end of diagnostics and capital letters at + start of diagnostics. + * combine.c, cse.c: Don't translate dump file output. + * toplev.c (print_version): Only translate output if going to + stderr. + +2005-07-03 Kazu Hirata + + * c-decl.c, tree-object-size.c, tree-vectorizer.c, + config/arm/unwind-arm.c, config/arm/unwind-arm.h: Fix comment + typos. + +2005-07-03 John David Anglin + + * pa.c (fix_range): Fix typo in comment. + +2005-07-03 Kazu Hirata + + * tree-vrp.c (extract_range_from_assert): Replace + fold (build (...)) with fold_build2. + +2005-07-03 Kaveh R. Ghazi + + * c-format.c (gcc_gfc_format_type, gcc_gfc_flag_pairs, + gcc_gfc_char_table, init_dynamic_gfc_info): New. + (format_types_orig, handle_format_attribute): Add support for + format "gcc_gfc". + +2005-07-03 Gabriel Dos Reis + + * varasm.c (assemble_variable): Fix format specifier thinko. + +2005-07-03 Ira Rosen + + PR tree-optimization/22029 (and 22135) + * tree-pretty-print.c (dump_generic_node): Check that the node is not + a phi node before calling dump_vops. + +2005-07-02 Gabriel Dos Reis + + * tree-dump.h (dump_string_field): Declare. + * tree-dump.c: Use it instead of dump_string. + (dump_string_field): Make non-static. + +2005-07-03 Kaz Kojima + + * config/sh/sh.c (sh_output_mi_thunk): Initialize and clean + up the minimal CFG stuff always when optimize > 0. Call + split_all_insns_noflow in PIC case if needed. + +2005-07-02 Gabriel Dos Reis + Christian Ehrhardt + + PR c++/18279 + * c-decl.c (c_write_global_declarations): Dump contents of + external scope to. + * tree-dump.c (dequeue_and_dump): Dump abstract origin of a decl. + , , , , + , : Add. + (dump_enabled_p): Return TRUE if PHASE is TDI_all and any dump + is enabled. + +2005-07-03 Joseph S. Myers + + * c-common.h (GCC_DIAG_STYLE): Define. + * c-tree.h (GCC_DIAG_STYLE): Do not define. Change minimum GCC + version for format checking to 4.1. + * c-format.c: Include toplev.h after c-common.h. + (enum format_type): Add gcc_tdiag_format_type. + (gcc_tdiag_length_specs, gcc_tdiag_flag_pairs, + gcc_tdiag_flag_specs, gcc_tdiag_char_table): New. + (format_types_orig): Add gcc_tdiag. + (init_dynamic_diag_info): Support gcc_tdiag formats. + (handle_format_attribute): Likewise. + * toplev.h (NO_FRONT_END_DIAG, ATTRIBUTE_GCC_FE_DIAG): Remove. + (GCC_DIAG_STYLE): Default to __gcc_tdiag__. Change minimum GCC + version for format checking to 4.1. + (warning0, warning, error, pedwarn, sorry): Use + ATTRIBUTE_GCC_DIAG. + * config/rs6000/rs6000.c (altivec_expand_builtin), varasm.c + (finish_aliases_1): Do not use %qE. + * config/arm/arm.c, config/i386/i386.c, config/mmix/mmix.c, + config/pdp11/pdp11.c, stor-layout.c, tree-eh.c, tree-ssa.c: + Correct format bugs. + * config/v850/v850-protos.h (v850_output_aligned_bss): Change size + parameter to unsigned HOST_WIDE_INT. + * config/v850/v850.c (v850_output_aligned_bss): Likewise. + +2005-07-02 David Edelsohn + + PR middle-end/21742 + * expr.c (write_complex_part): Use adjust_address for MEM. + (read_complex_part): Same. + +2005-07-02 Daniel Berlin + + Fix PR tree-optimization/22280 + + * tree-sra.c (generate_element_init): Remove useless loop. + +2005-07-02 Richard Henderson + + * config/alpha/alpha.c (alpha_legitimize_address): Check for + TLS_MODEL_NONE. + (alpha_stdarg_optimize_hook): Use DECL_UID with va_list_vars. + +2005-07-02 Andrew Pinski + + PR middle-end/14490 + * fold-const.c (fold_binary): Handle the return value of + fold_to_nonsharp_ineq_using_bound if we get back the same operand back. + Implement "X +- C1 CMP C2" folding to "X CMP C2 -+ C1". + +2005-07-02 Jeff Law + + * tree-ssa-dom.c (find_equivalent_equality_comparison): Do not + a eliminate type conversion which feeds an equality comparison + if the original type or either operand in the comparison is a + function pointer. + +2005-07-02 Joseph S. Myers + + * c.opt, common.opt, config/bfin/bfin.opt, config/pa/pa.opt, + config/rs6000/rs6000.opt, params.def: Remove "." from end of help + texts. + * config/avr/avr.c: Do not use '`' as left quote. + * config/rs6000/rs6000.c, config/s390/s390.c, opts.c, tree.c: + Remove "." from end of diagnostics. Make diagnostics start with + lowercase letter. + +2005-07-02 Zack Weinberg + Joseph S. Myers + + * toplev.c (default_tree_printer): Handle setting location with + '+' flag. + * c-objc.common.c (c_tree_printer): Likewise. + * c-format.c (gcc_diag_flag_specs): Add '+'. + (gcc_cdiag_char_table): Allow '+' flag for tree formats. + (format_types_orig): Allow '+' flag for gcc_diag and gcc_cdiag + formats. + * c-common.c, c-decl.c, c-objc-common.c, c-pragma.c, + config/arm/pe.c, config/i386/winnt.c, config/ia64/ia64.c, + config/mcore/mcore.c, config/sh/symbian.c, config/sol2.c, + config/v850/v850.c, function.c, stor-layout.c, toplev.c, + tree-inline.c, tree-optimize.c, tree.c, varasm.c: Use '+' flag + instead of %J or %H. Use 'q' flag for quoting. Avoid '.' at end + of diagnostics. Use %q+D not %s for a decl. Do not pass excess + format arguments where %J is used without %D. + +2005-07-02 Jakub Jelinek + + * gcc.c (LINK_SSP_SPEC): Define. + (link_ssp_spec): New variable. + (LINK_COMMAND_SPEC): Add %(link_ssp). + (static_specs): Add link_ssp_spec. + * configure.ac (TARGET_LIBC_PROVIDES_SSP): New test. + * configure: Rebuilt. + * config.in: Rebuilt. + + * config/rs6000/linux.h (TARGET_THREAD_SSP_OFFSET): Define. + * config/rs6000/linux64.h (TARGET_THREAD_SSP_OFFSET): Likewise. + * config/i386/linux.h (TARGET_THREAD_SSP_OFFSET): Likewise. + * config/i386/linux64.h (TARGET_THREAD_SSP_OFFSET): Likewise. + * config/rs6000/rs6000.md (stack_protect_set, stack_protect_test): + If TARGET_THREAD_SSP_OFFSET is defined, use -0x7010(13) resp. + -0x7008(2) instead of reading __stack_chk_guard variable. + * config/i386/i386.md (UNSPEC_SP_SET, UNSPEC_SP_TEST): Change + number. + (UNSPEC_SP_TLS_SET, UNSPEC_SP_TLS_TEST): New constants. + (stack_protect_set, stack_protect_test): Use *_tls* patterns + if TARGET_THREAD_SSP_OFFSET is defined. + (stack_tls_protect_set_si, stack_tls_protect_set_di, + stack_tls_protect_test_si, stack_tls_protect_test_di): New insns. + + Revert: + 2005-06-27 Richard Henderson + * libgcc-std.ver (GCC_4.1.0): New. + * libgcc.h (__stack_chk_guard): Declare. + (__stack_chk_fail, __stack_chk_fail_local): Declare. + * libgcc2.c (L_stack_chk, L_stack_chk_local): New. + * mklibgcc.in (lib2funcs): Add them. + +2005-07-01 Richard Henderson + + * config/i386/linux-unwind.h (x86_64_fallback_frame_state): Cast to + void * before struct sigcontext *. + (x86_fallback_frame_state): Likewise. + +2005-07-01 James E. Wilson + + * doc/invoke.texi (-funit-at-a-time): Correct grammar in second bullet. + +2005-07-01 Andrew Pinski + + PR tree-opt/22269 + * tree-ssa-reassoc.c (should_transpose): Fix which operand + we check for SSA_NAME for. + +2005-07-01 Daniel Berlin + + Fix PR tree-optimization/22071 + + * tree-ssa-structalias.c (offset_overlaps_with_access): New + function. + (get_constraint_for_component_ref): Use it. + +2005-07-01 Andrew Pinski + + PR other/22264 + * diagnostic.c (diagnostic_report_current_module): Use pp_newline to + print out the last new line. + +2005-07-01 Hans-Peter Nilsson + + * config/cris/cris.md (CRIS_CC0_REGNUM): New constant. + Swap numbers for CRIS_AP_REGNUM and CRIS_MOF_REGNUM. + * config/cris/cris.c (cris_conditional_register_usage): Adjust + reg_names[CRIS_CC0_REGNUM] for early CRIS versions. + (cris_print_operand) : Handle CRIS_CC0_REGNUM. + (cris_md_asm_clobbers): Clobber CRIS_CC0_REGNUM for all asms. + * config/cris/cris.h (CRIS_CANONICAL_CC0_REGNUM): New macro. + (enum reg_class): New member CC0_REGS. + (REG_CLASS_FROM_LETTER): Add 'c' for CC0_REGS. + (FIRST_PSEUDO_REGISTER, CALL_USED_REGISTERS, REG_ALLOC_ORDER) + (HARD_REGNO_MODE_OK, MODES_TIEABLE_P, REG_CLASS_NAMES) + (CRIS_SPECIAL_REGS_CONTENTS, REG_CLASS_CONTENTS, REGNO_REG_CLASS) + (PREFERRED_RELOAD_CLASS, REGISTER_NAMES, DBX_REGISTER_NUMBER): + Adjust for register now described. + +2005-07-01 Jakub Jelinek + + PR target/22262 + * config/i386/i386.md (stack_protect_test_si, + stack_protect_test_di): Add earlyclobber for scratch 3. + * config/rs6000/rs6000.md (stack_protect_testsi, + stack_protect_testdi): Add earlyclobber for scratch 3, + remove earlyclobber from scratch 4. + +Older entries for 2005 can be found in ChangeLog-2005. 2005-06-30 Diego Novillo PR 21584 @@ -419,7 +13592,7 @@ * config/s390/s390.h (FRAME_GROWS_DOWNWARD): Defined as 1. (STARTING_FRAME_OFFSET, STACK_DYNAMIC_OFFSET): Definitions changed. -2006-06-28 Ziemowit Laski +2005-06-28 Ziemowit Laski * c-common.c (flag_next_runtime): Move... * toplev.c (flag_next_runtime): ... here. @@ -532,7 +13705,7 @@ (ia64_init_builtins): Set up __fpreg as RFmode. (ia64_mangle_fundamental_type): Mangle __fpreg as u7__fpreg. -2006-06-28 Adrian Straetling +2005-06-28 Adrian Straetling * builtins.c: (expand_builtin_memset): Rewrite to support 'set_storage_via_setmem'. diff --git a/gcc/ChangeLog.ipa b/gcc/ChangeLog.ipa index 2c562165283..cf64ea73b2e 100644 --- a/gcc/ChangeLog.ipa +++ b/gcc/ChangeLog.ipa @@ -1,3 +1,7 @@ +2006-01-15 Jan Hubicka + + * Merge from mainline + 2005-11-29 Jan Hubicka * ipa-type-escape.c (look_for_casts): Use get_base_var. diff --git a/gcc/ChangeLog.tree-ssa b/gcc/ChangeLog.tree-ssa index 4f22a6e77c8..ddb8979f23b 100644 --- a/gcc/ChangeLog.tree-ssa +++ b/gcc/ChangeLog.tree-ssa @@ -24,7 +24,7 @@ 2004-05-06 Richard Henderson * stmt.c (parse_output_constraint): Don't warn for read-write - memory operand. + memory operand. * gimplify.c (gimplify_asm_expr): Force in-out memory operands to minimal lvalues, then expand to non-matching constraints. @@ -184,7 +184,7 @@ 2004-04-21 Jeff Law - * tree-ssa-copy.c (cprop_operand): Break out of cprop_into_stmt. + * tree-ssa-copy.c (cprop_operand): Break out of cprop_into_stmt. (cprop_into_stmt): Use cprop_operand. Rearrange slightly to avoid switch statement inside a loop. @@ -2723,7 +2723,7 @@ * tree-alias-common.c (get_alias_var): Handle BIT_FIELD_REF. (find_func_aliases): Ditto. - Update for fact that basic component_refs are no longer + Update for fact that basic component_refs are no longer is_gimple_variable. (create_fun_alias_var): Set DECL_CONTEXT on our faked declarations. (pass_del_pta): PTA dumps info on delete, so it needs a name. diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 9b731fb7edb..34ba75589cb 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20051123 +20060115 diff --git a/gcc/Makefile.in b/gcc/Makefile.in index d805beeecdf..287da111b99 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -1,8 +1,9 @@ # Makefile for GNU Compiler Collection # Run 'configure' to generate Makefile from Makefile.in -# Copyright (C) 1987, 1988, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, -# 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. +# Copyright (C) 1987, 1988, 1990, 1991, 1992, 1993, 1994, 1995, 1996, +# 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 +# Free Software Foundation, Inc. #This file is part of GCC. @@ -298,6 +299,11 @@ GMPINC = @GMPINC@ CPPLIB = ../libcpp/libcpp.a CPPINC = -I$(srcdir)/../libcpp/include +# Where to find decNumber +DECNUM = $(srcdir)/../libdecnumber +DECNUMINC = -I$(DECNUM) -I../libdecnumber +LIBDECNUMBER = ../libdecnumber/libdecnumber.a + # Substitution type for target's getgroups 2nd arg. TARGET_GETGROUPS_T = @TARGET_GETGROUPS_T@ @@ -307,7 +313,8 @@ INSTALL_HEADERS_DIR = @build_install_headers_dir@ # Header files that are made available under the same name # to programs compiled with GCC. -USER_H = $(srcdir)/ginclude/float.h \ +USER_H = $(srcdir)/ginclude/decfloat.h \ + $(srcdir)/ginclude/float.h \ $(srcdir)/ginclude/iso646.h \ $(srcdir)/ginclude/stdarg.h \ $(srcdir)/ginclude/stdbool.h \ @@ -730,7 +737,8 @@ RTL_BASE_H = rtl.h rtl.def $(MACHMODE_H) reg-notes.def insn-notes.def \ input.h real.h statistics.h RTL_H = $(RTL_BASE_H) genrtl.h PARAMS_H = params.h params.def -TREE_H = tree.h tree.def $(MACHMODE_H) tree-check.h builtins.def \ +BUILTINS_DEF = builtins.def sync-builtins.def +TREE_H = tree.h tree.def $(MACHMODE_H) tree-check.h $(BUILTINS_DEF) \ input.h statistics.h vec.h treestruct.def BASIC_BLOCK_H = basic-block.h bitmap.h sbitmap.h varray.h $(PARTITION_H) \ hard-reg-set.h cfghooks.h $(OBSTACK_H) @@ -754,7 +762,7 @@ IPA_REFERENCE_H = ipa-reference.h bitmap.h $(TREE_H) IPA_TYPE_ESCAPE_H = ipa-type-escape.h $(TREE_H) CGRAPH_H = cgraph.h $(TREE_H) IPA_PROP_H = ipa-prop.h $(CGRAPH_H) $(TREE_H) -DF_H = df.h bitmap.h sbitmap.h $(BASIC_BLOCK_H) +DF_H = df.h bitmap.h $(BASIC_BLOCK_H) alloc-pool.h DDG_H = ddg.h sbitmap.h $(DF_H) GCC_H = gcc.h version.h GGC_H = ggc.h gtype-desc.h @@ -767,6 +775,8 @@ SYSTEM_H = system.h hwint.h $(srcdir)/../include/libiberty.h PREDICT_H = predict.h predict.def CPPLIB_H = $(srcdir)/../libcpp/include/line-map.h \ $(srcdir)/../libcpp/include/cpplib.h +DECNUM_H = $(DECNUM)/decContext.h $(DECNUM)/decDPD.h $(DECNUM)/decNumber.h \ + $(DECNUM)/decimal32.h $(DECNUM)/decimal64.h $(DECNUM)/decimal128.h MKDEPS_H = $(srcdir)/../libcpp/include/mkdeps.h SYMTAB_H = $(srcdir)/../libcpp/include/symtab.h CPP_ID_DATA_H = $(CPPLIB_H) $(srcdir)/../libcpp/include/cpp-id-data.h @@ -807,7 +817,7 @@ LIBIBERTY = ../libiberty/libiberty.a BUILD_LIBIBERTY = $(build_objdir)/libiberty/libiberty.a # Dependencies on the intl and portability libraries. -LIBDEPS= $(CPPLIB) $(LIBIBERTY) $(LIBINTL_DEP) $(LIBICONV_DEP) +LIBDEPS= $(CPPLIB) $(LIBIBERTY) $(LIBINTL_DEP) $(LIBICONV_DEP) $(LIBDECNUMBER) # Likewise, for use in the tools that must run on this machine # even if we are cross-building GCC. @@ -815,7 +825,7 @@ BUILD_LIBDEPS= $(BUILD_LIBIBERTY) # How to link with both our special library facilities # and the system's installed libraries. -LIBS = @LIBS@ $(CPPLIB) $(LIBINTL) $(LIBICONV) $(LIBIBERTY) +LIBS = @LIBS@ $(CPPLIB) $(LIBINTL) $(LIBICONV) $(LIBIBERTY) $(LIBDECNUMBER) # Any system libraries needed just for GNAT. SYSLIBS = @GNAT_LIBEXC@ @@ -845,7 +855,7 @@ BUILD_VARRAY = build/varray.o # libintl.h will be found in ../intl if we are using the included libintl. INCLUDES = -I. -I$(@D) -I$(srcdir) -I$(srcdir)/$(@D) \ -I$(srcdir)/../include @INCINTL@ \ - $(CPPINC) $(GMPINC) + $(CPPINC) $(GMPINC) $(DECNUMINC) .c.o: $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $< $(OUTPUT_OPTION) @@ -964,7 +974,8 @@ OBJS-common = \ cfgloopanal.o cfgloopmanip.o loop-init.o loop-unswitch.o loop-unroll.o \ cfgrtl.o combine.o conflict.o convert.o coverage.o cse.o cselib.o \ dbxout.o ddg.o tree-ssa-loop-ch.o loop-invariant.o tree-ssa-loop-im.o \ - debug.o df.o diagnostic.o dojump.o dominance.o loop-doloop.o \ + debug.o df-core.o df-problems.o df-scan.o dfp.o diagnostic.o dojump.o \ + dominance.o loop-doloop.o \ dwarf2asm.o dwarf2out.o emit-rtl.o except.o explow.o loop-iv.o \ expmed.o expr.o final.o flow.o fold-const.o function.o gcse.o \ genrtl.o ggc-common.o global.o graph.o gtype-desc.o \ @@ -979,7 +990,7 @@ OBJS-common = \ reload.o reload1.o reorg.o resource.o rtl.o rtlanal.o rtl-error.o \ sbitmap.o sched-deps.o sched-ebb.o sched-rgn.o sched-vis.o sdbout.o \ simplify-rtx.o sreal.o stmt.o stor-layout.o stringpool.o \ - targhooks.o timevar.o toplev.o tracer.o tree.o tree-dump.o \ + struct-equiv.o targhooks.o timevar.o toplev.o tracer.o tree.o tree-dump.o \ varasm.o varray.o vec.o version.o vmsdbgout.o xcoffout.o alloc-pool.o \ et-forest.o cfghooks.o bt-load.o pretty-print.o $(GGC) web.o passes.o \ tree-profile.o rtlhooks.o cfgexpand.o lambda-mat.o \ @@ -998,7 +1009,7 @@ OBJS = $(OBJS-common) $(out_object_file) $(OBJS-archive) OBJS-onestep = libbackend.o $(OBJS-archive) -BACKEND = main.o @TREEBROWSER@ libbackend.a $(CPPLIB) +BACKEND = main.o @TREEBROWSER@ libbackend.a $(CPPLIB) $(LIBDECNUMBER) # Files to be copied after each stage in building. STAGECOPYSTUFF = insn-flags.h insn-config.h insn-codes.h \ @@ -1052,7 +1063,7 @@ LIB2_DIVMOD_FUNCS = _divdi3 _moddi3 _udivdi3 _umoddi3 _udiv_w_sdiv _udivmoddi4 # The following targets define the interface between us and the languages. # # all.cross, start.encap, rest.encap, -# install-normal, install-common, install-info, install-man, +# install-common, install-info, install-man, # uninstall, # mostlyclean, clean, distclean, maintainer-clean, # stage1, stage2, stage3, stage4 @@ -1089,6 +1100,42 @@ endif # Rebuilding this configuration # ----------------------------- +# On the use of stamps: +# Consider the example of tree-check.h. It is constructed with build/gencheck. +# A simple rule to build tree-check.h would be +# tree-check.h: build/gencheck$(build_exeext) +# $(RUN_GEN) build/gencheck$(build_exeext) > tree-check.h +# +# but tree-check.h doesn't change every time gencheck changes. It would the +# nice if targets that depend on tree-check.h wouldn't be rebuild +# unnecessarily when tree-check.h is unchanged. To make this, tree-check.h +# must not be overwritten with a identical copy. One solution is to use a +# temporary file +# tree-check.h: build/gencheck$(build_exeext) +# $(RUN_GEN) build/gencheck$(build_exeext) > tree-check.h +# $(SHELL) $(srcdir)/../move-if-change tmp-check.h tree-check.h +# +# This solution has a different problem. Since the time stamp of tree-check.h +# is unchanged, make will try to update tree-check.h every time it runs. +# To prevent this, one can add a stamp +# tree-check.h: s-check +# s-check : build/gencheck$(build_exeext) +# $(RUN_GEN) build/gencheck$(build_exeext) > tree-check.h +# $(SHELL) $(srcdir)/../move-if-change tmp-check.h tree-check.h +# $(STAMP) s-check +# +# The problem with this solution is that make thinks that tree-check.h is +# always unchanged. Make must be deceived into thinking that tree-check.h is +# rebuild by the "a: s-a" rule. To do this, add a dummy command: +# tree-check.h: s-check; @true +# s-check : build/gencheck$(build_exeext) +# $(RUN_GEN) build/gencheck$(build_exeext) > tree-check.h +# $(SHELL) $(srcdir)/../move-if-change tmp-check.h tree-check.h +# $(STAMP) s-check +# +# This is what is done in this makefile. Note that mkconfig.sh has a +# move-if-change built-in + Makefile: config.status $(srcdir)/Makefile.in $(LANG_MAKEFRAGS) LANGUAGES="$(CONFIG_LANGUAGES)" \ CONFIG_HEADERS= \ @@ -1471,7 +1518,8 @@ c-errors.o: c-errors.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \ $(C_TREE_H) $(FLAGS_H) $(DIAGNOSTIC_H) $(TM_P_H) c-parser.o : c-parser.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \ $(GGC_H) $(TIMEVAR_H) $(C_TREE_H) input.h $(FLAGS_H) toplev.h output.h \ - $(CPPLIB_H) gt-c-parser.h langhooks.h $(C_COMMON_H) $(C_PRAGMA_H) + $(CPPLIB_H) gt-c-parser.h langhooks.h $(C_COMMON_H) $(C_PRAGMA_H) \ + vec.h $(TARGET_H) srcextra: gcc.srcextra lang.srcextra @@ -1549,7 +1597,7 @@ c-common.o : c-common.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \ $(DIAGNOSTIC_H) gt-c-common.h langhooks.h $(VARRAY_H) $(RTL_H) \ $(TARGET_H) $(C_TREE_H) tree-iterator.h langhooks.h tree-mudflap.h \ intl.h opts.h real.h $(CPPLIB_H) tree-inline.h $(HASHTAB_H) \ - builtins.def + $(BUILTINS_DEF) c-pretty-print.o : c-pretty-print.c $(C_PRETTY_PRINT_H) \ $(C_TREE_H) $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) real.h \ @@ -1745,7 +1793,7 @@ stor-layout.o : stor-layout.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ tree-ssa-structalias.o: tree-ssa-structalias.c tree-ssa-structalias.h \ $(SYSTEM_H) $(CONFIG_H) $(GGC_H) $(TREE_H) $(TREE_FLOW_H) \ $(TM_H) coretypes.h cgraph.h tree-pass.h $(TIMEVAR_H) \ - gt-tree-ssa-structalias.h + gt-tree-ssa-structalias.h $(PARAMS_H) tree-ssa.o : tree-ssa.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \ $(RTL_H) $(TREE_H) $(TM_P_H) $(EXPR_H) output.h $(DIAGNOSTIC_H) \ toplev.h function.h $(TIMEVAR_H) $(TM_H) coretypes.h \ @@ -1923,7 +1971,8 @@ tree-ssa-loop-im.o : tree-ssa-loop-im.c $(TREE_FLOW_H) $(CONFIG_H) \ $(TREE_DUMP_H) tree-pass.h $(FLAGS_H) real.h $(BASIC_BLOCK_H) \ hard-reg-set.h tree-ssa-math-opts.o : tree-ssa-math-opts.c $(TREE_FLOW_H) $(CONFIG_H) \ - $(SYSTEM_H) $(TREE_H) $(TIMEVAR_H) tree-pass.h $(TM_H) $(FLAGS_H) + $(SYSTEM_H) $(TREE_H) $(TIMEVAR_H) tree-pass.h $(TM_H) $(FLAGS_H) \ + alloc-pool.h $(BASIC_BLOCK_H) $(TARGET_H) tree-ssa-alias.o : tree-ssa-alias.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \ $(RTL_H) $(TREE_H) $(TM_P_H) $(EXPR_H) $(GGC_H) tree-inline.h $(FLAGS_H) \ function.h $(TIMEVAR_H) convert.h $(TM_H) coretypes.h langhooks.h \ @@ -1933,7 +1982,8 @@ tree-ssa-alias.o : tree-ssa-alias.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \ tree-ssa-reassoc.o : tree-ssa-reassoc.c $(TREE_FLOW_H) $(CONFIG_H) \ $(SYSTEM_H) $(TREE_H) $(GGC_H) $(DIAGNOSTIC_H) errors.h $(TIMEVAR_H) \ $(TM_H) coretypes.h $(TREE_DUMP_H) tree-pass.h $(FLAGS_H) tree-iterator.h\ - $(BASIC_BLOCK_H) $(HASHTAB_H) $(TREE_GIMPLE_H) tree-inline.h + $(BASIC_BLOCK_H) $(TREE_GIMPLE_H) tree-inline.h vec.h \ + alloc-pool.h tree-optimize.o : tree-optimize.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \ $(RTL_H) $(TREE_H) $(TM_P_H) $(EXPR_H) $(GGC_H) output.h $(DIAGNOSTIC_H) \ $(FLAGS_H) $(TIMEVAR_H) $(TM_H) coretypes.h $(TREE_DUMP_H) toplev.h \ @@ -2103,7 +2153,7 @@ builtins.o : builtins.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ $(EXPR_H) $(OPTABS_H) insn-config.h $(RECOG_H) output.h typeclass.h \ hard-reg-set.h toplev.h hard-reg-set.h except.h $(TM_P_H) $(PREDICT_H) \ libfuncs.h real.h langhooks.h $(BASIC_BLOCK_H) tree-mudflap.h \ - builtins.def $(MACHMODE_H) + $(BUILTINS_DEF) $(MACHMODE_H) calls.o : calls.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ $(TREE_H) $(FLAGS_H) $(EXPR_H) $(OPTABS_H) langhooks.h $(TARGET_H) \ libfuncs.h $(REGS_H) toplev.h output.h function.h $(TIMEVAR_H) $(TM_P_H) \ @@ -2147,6 +2197,8 @@ emit-rtl.o : emit-rtl.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ $(HASHTAB_H) $(TM_P_H) debug.h langhooks.h tree-pass.h gt-emit-rtl.h real.o : real.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \ toplev.h $(TM_P_H) real.h +dfp.o : dfp.c dfp.h $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \ + toplev.h $(TM_P_H) real.h $(DECNUM_H) integrate.o : integrate.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ $(RTL_H) $(TREE_H) $(FLAGS_H) debug.h $(INTEGRATE_H) insn-config.h \ $(EXPR_H) real.h $(REGS_H) intl.h function.h output.h $(RECOG_H) \ @@ -2255,9 +2307,18 @@ tree-vect-generic.o : tree-vect-generic.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) \ $(FLAGS_H) $(OPTABS_H) $(RTL_H) $(MACHMODE_H) $(EXPR_H) \ langhooks.h $(FLAGS_H) $(DIAGNOSTIC_H) gt-tree-vect-generic.h $(GGC_H) \ coretypes.h insn-codes.h -df.o : df.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ - insn-config.h $(RECOG_H) function.h $(REGS_H) alloc-pool.h hard-reg-set.h \ - $(BASIC_BLOCK_H) $(DF_H) bitmap.h sbitmap.h $(TM_P_H) +df-core.o : df-core.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ + insn-config.h $(RECOG_H) $(FUNCTION_H) $(REGS_H) alloc-pool.h \ + hard-reg-set.h $(BASIC_BLOCK_H) $(DF_H) bitmap.h sbitmap.h \ + $(TM_P_H) $(FLAGS_H) output.h tree-pass.h +df-problems.o : df-problems.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ + $(RTL_H) insn-config.h $(RECOG_H) $(FUNCTION_H) $(REGS_H) alloc-pool.h \ + hard-reg-set.h $(BASIC_BLOCK_H) $(DF_H) bitmap.h sbitmap.h $(TM_P_H) \ + $(FLAGS_H) output.h +df-scan.o : df-scan.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ + insn-config.h $(RECOG_H) $(FUNCTION_H) $(REGS_H) alloc-pool.h hard-reg-set.h \ + $(BASIC_BLOCK_H) $(DF_H) bitmap.h sbitmap.h $(TM_P_H) $(FLAGS_H) \ + output.h var-tracking.o : var-tracking.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ $(RTL_H) $(TREE_H) hard-reg-set.h insn-config.h reload.h $(FLAGS_H) \ $(BASIC_BLOCK_H) output.h sbitmap.h alloc-pool.h $(FIBHEAP_H) $(HASHTAB_H) \ @@ -2320,12 +2381,17 @@ cfgloop.o : cfgloop.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) coretypes.h $(TM_H) \ cfgloopanal.o : cfgloopanal.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) \ $(BASIC_BLOCK_H) hard-reg-set.h $(CFGLOOP_H) $(EXPR_H) coretypes.h $(TM_H) \ $(OBSTACK_H) output.h +struct-equiv.o : struct-equiv.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ + $(RTL_H) hard-reg-set.h output.h $(FLAGS_H) $(RECOG_H) \ + insn-config.h $(TARGET_H) $(TM_P_H) $(PARAMS_H) \ + $(REGS_H) $(EMIT_RTL_H) loop-iv.o : loop-iv.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(BASIC_BLOCK_H) \ hard-reg-set.h $(CFGLOOP_H) $(EXPR_H) coretypes.h $(TM_H) $(OBSTACK_H) \ output.h intl.h loop-invariant.o : loop-invariant.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) \ $(BASIC_BLOCK_H) hard-reg-set.h $(CFGLOOP_H) $(EXPR_H) coretypes.h \ - $(TM_H) $(TM_P_H) function.h $(FLAGS_H) $(DF_H) $(OBSTACK_H) output.h + $(TM_H) $(TM_P_H) function.h $(FLAGS_H) $(DF_H) $(OBSTACK_H) output.h \ + $(HASHTAB_H) cfgloopmanip.o : cfgloopmanip.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) \ $(BASIC_BLOCK_H) hard-reg-set.h $(CFGLOOP_H) $(CFGLAYOUT_H) output.h \ coretypes.h $(TM_H) cfghooks.h $(OBSTACK_H) @@ -2695,9 +2761,7 @@ s-output : $(MD_DEPS) build/genoutput$(build_exeext) genrtl.o : genrtl.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ $(GGC_H) -genrtl.c genrtl.h : s-genrtl - @true # force gnu make to recheck modification times. - +genrtl.c genrtl.h : s-genrtl; @true s-genrtl: build/gengenrtl$(build_exeext) $(RUN_GEN) build/gengenrtl$(build_exeext) -h > tmp-genrtl.h $(SHELL) $(srcdir)/../move-if-change tmp-genrtl.h genrtl.h @@ -2738,7 +2802,7 @@ GTFILES = $(srcdir)/input.h $(srcdir)/coretypes.h \ $(srcdir)/coverage.c $(srcdir)/function.h $(srcdir)/rtl.h \ $(srcdir)/optabs.h $(srcdir)/tree.h $(srcdir)/libfuncs.h $(SYMTAB_H) \ $(srcdir)/real.h $(srcdir)/varray.h $(srcdir)/insn-addr.h $(srcdir)/hwint.h \ - $(srcdir)/ipa-reference.h $(srcdir)/ipa-prop.h \ + $(srcdir)/ipa-reference.h $(srcdir)/ipa-prop.h $(srcdir)/output.h \ $(srcdir)/cselib.h $(srcdir)/basic-block.h $(srcdir)/cgraph.h \ $(srcdir)/c-common.h $(srcdir)/c-tree.h $(srcdir)/reload.h \ $(srcdir)/alias.c $(srcdir)/bitmap.c $(srcdir)/cselib.c $(srcdir)/cgraph.c \ @@ -2763,6 +2827,7 @@ GTFILES = $(srcdir)/input.h $(srcdir)/coretypes.h \ $(srcdir)/tree-profile.c $(srcdir)/tree-nested.c \ $(srcdir)/ipa-reference.c $(srcdir)/tree-ssa-structalias.h \ $(srcdir)/tree-ssa-structalias.c \ + $(srcdir)/c-pragma.h \ $(srcdir)/targhooks.c $(out_file) \ @all_gtfiles@ @@ -2771,14 +2836,25 @@ GTFILES_FILES_FILES = @all_gtfiles_files_files@ GTFILES_LANG_DIR_NAMES = @subdirs@ GTFILES_SRCDIR = @srcdir@ +GTFILES_FILES_FILES_C = $(subst $(srcdir)/,, \ + $(filter %.c, $(GTFILES_FILES_FILES))) +GTFILES_FILES_FILES_H = $(addprefix gt-, \ + $(subst /,-,$(GTFILES_FILES_FILES_C:.c=.h))) +GTFILES_LANG_DIR_NAMES_H = $(foreach d,$(GTFILES_LANG_DIR_NAMES), gtype-$(d).h) +ALL_GTFILES_H := $(shell echo $(GTFILES_FILES_FILES_H) \ + $(GTFILES_LANG_DIR_NAMES_H) | tr ' ' '\n' | sort -u) + +$(ALL_GTFILES_H) : s-gtype ; @true + + gt-cgraph.h gt-coverage.h gtype-desc.h gtype-desc.c gt-except.h \ gt-function.h gt-integrate.h gt-tree.h gt-varasm.h \ gt-emit-rtl.h gt-explow.h gt-stor-layout.h gt-regclass.h \ gt-lists.h gt-alias.h gt-cselib.h gt-gcse.h \ gt-expr.h gt-sdbout.h gt-optabs.h gt-bitmap.h gt-dojump.h \ gt-dwarf2out.h gt-reg-stack.h gt-dwarf2asm.h \ -gt-dbxout.h gt-c-common.h gt-c-decl.h gt-c-parser.h \ -gt-c-pragma.h gtype-c.h gt-cfglayout.h \ +gt-dbxout.h \ +gtype-c.h gt-cfglayout.h \ gt-tree-mudflap.h gt-tree-vect-generic.h \ gt-tree-profile.h gt-tree-ssa-address.h \ gt-tree-iterator.h gt-gimplify.h \ @@ -3427,6 +3503,18 @@ fsf-funding.pod: funding.texi -$(TEXI2POD) $< > $@ # +# clean-target removes all files made by compilation. +# This can be added to over time. + +clean-target: clean-target-libgcc + +clean-target-libgcc: + test ! -d libgcc || \ + (cd libgcc && find . -type d -print) | \ + while read d; do rm -f $$d/libgcc.a || : ; done + test ! -d libgcc || rm -r libgcc + test ! -f stmp-dirs || rm stmp-dirs + # Deletion of files made during compilation. # There are four levels of this: # `mostlyclean', `clean', `distclean' and `maintainer-clean'. @@ -3546,7 +3634,7 @@ maintainer-clean: # broken is small. install: install-common $(INSTALL_HEADERS) $(INSTALL_LIBGCC) \ install-cpp install-man install-info install-@POSUB@ \ - lang.install-normal install-driver + install-driver # Handle cpp installation. install-cpp: installdirs cpp$(exeext) diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 9ce822311f9..8257e4265f2 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,764 @@ +2005-12-28 John David Anglin + + * s-osinte-linux-hppa.ads: Correct alignment of atomic_lock_t. + +2005-12-12 Arnaud Charlet + + * Makefile.in: Remove dummy setting of GCC_FOR_TARGET, no longer + needed. + +2005-12-12 Arnaud Charlet + + * Make-lang.in: Update dependencies + +2005-12-12 Arnaud Charlet + + * Make-lang.in: Add rule for ada/exp_sel.o + +2005-12-12 Arnaud Charlet + + * Makefile.in (mingw section): Remove EH_MECHANISM setting. + +2005-12-09 Arnaud Charlet + + * gnatvsn.ads (Library_Version): Bump to version 4.2 + (ASIS_Version_Number): Bumped. + +2005-12-09 Doug Rupp + + * mlib-tgt-vms-ia64.adb, mlib-tgt-vms-alpha.adb (Is_Interface): Change + Ada bind file prefix on VMS from b$ to b__. + (Build_Dynamic_Library): Change Init file suffix on VMS from $init to + __init. + + * prj-nmsc.adb: Change some Hostparm.OpenVMS checks to + Targparm.OpenVMS_On_Target. + (Object_Suffix): Initialize with target object suffix. + (Get_Unit): Change Ada bind file prefix on VMS from b$ to b__. + + * butil.adb: Change some Hostparm.OpenVMS checks to + Targparm.OpenVMS_On_Target. + + * clean.adb: Change some Hostparm.OpenVMS checks to + Targparm.OpenVMS_On_Target. + (Object_Suffix): Initialize with call to Get_Target_Object_Suffix. + ({declaraction},Delete_Binder_Generated_Files,{initialization}): Change + Ada bind file prefix on VMS from b$ to b__. + + * gnatlink.adb (Process_Args): Call Add_Src_Search_Dir for -I in + --GCC so that Get_Target_Parameters can find system.ads. + (Gnatlink): Call Get_Target_Parameters in mainline. + Initialize standard packages for Targparm. + Change some Hostparm.OpenVMS checks to Targparm.OpenVMS_On_Target. + (Process_Args): Also Check for object files with target object + extension. + (Make_Binder_File_Names): Create with target object extension. + (Make_Binder_File_Names): Change Ada bind file prefix on VMS from b$ + to b__. + + * mlib-prj.adb: Change some Hostparm.OpenVMS checks to + Targparm.OpenVMS_On_Target. + ({declaration},Build_Library,Check_Library): Change Ada bind file + prefix on VMS from b$ to b__. + + * osint-b.adb: Change some Hostparm.OpenVMS checks to + Targparm.OpenVMS_On_Target. + (Create_Binder_Output): Change Ada bind file prefix on VMS from b$ to + b__. + + * targext.c: New file. + + * Makefile.in: add support for vxworks653 builds + (../../vxaddr2line): gnatlink with targext.o. + (TOOLS_LIBS): Move targext.o to precede libgnat. + (init.o, initialize.o): Minor clean up in dependencies. + (GNATLINK_OBJS): Add targparm.o, snames.o + Add rules fo building targext.o and linking it explicitly with all + tools. + Also add targext.o to gnatlib. + + * Make-lang.in: Add rules for building targext.o and linking it in + with gnat1 and gnatbind. + Add entry for exp_sel.o. + + * osint.adb Change some Hostparm.OpenVMS checks to + Targparm.OpenVMS_On_Target. + (Object_File_Name): Use target object suffix. + + * osint.ads (Object_Suffix): Remove, no longer used. + (Target_Object_Suffix): Initialize with target object suffix. + + * rident.ads: Add special exception to license. + + * targparm.adb (Get_Target_Parameters): Set the value of + Multi_Unit_Index_Character after OpenVMS_On_Target gets its definitive + value. + (Get_Target_Parameters): Set OpenVMS_On_Target if openvms. + + * targparm.ads: Add special exception to license. + + * g-os_lib.ads, g-os_lib.adb (Get_Target_Debuggable_Suffix): New + function. + (Copy_File): Make sure from file is closed if error on to file + (Get_Target_Executable_Suffix, Get_Target_Object_Suffix): New functions. + + * make.adb (Object_Suffix): Intialize with Get_Target_Object_Suffix. + (Executable_Suffix): Intialize with Get_Target_Executable_Suffix. + + * osint-c.adb (Set_Output_Object_File_Name): Initialize extension with + target object suffix. + +2005-12-09 Jose Ruiz + Quentin Ochem + Florian Villoing + + * a-taster.ads, a-taster.adb: New files. + + * a-elchha.adb (Last_Chance_Handler): Change the task termination soft + link to the version that does nothing. This way the task termination + routine is not executed twice for the environment task when finishing + because of an unhandled exception. + + * a-exextr.adb (Notify_Unhandled_Exception): Call the task termination + handler because of an unhandled exception. + + * a-taside.adb (Abort_Tasks): Call the Abort_Tasks procedure from + System.Tasking.Utilities instead of that in System.Tasking.Stages. + + * s-finimp.adb (initialization code): Modify the soft link for the + finalization of the global list instead of Adafinal. + + * s-soflin.ads, s-soflin.adb (Task_Termination_NT): Add this + non-tasking version of the soft link for task termination. We do + nothing since if we are using the non-tasking version it + means that the task termination functionality is not used. + (Null_Finalize_Global_List): Add this null version for the procedure + in charge of finalizing the global list for controlled objects. + (Null_Adafinal): Remove this procedure. Adafinal_NT has been created + instead for handling run-time termination in a more flexible way. + (Adafinal_NT): This new procedure will take care of finalizing the + global list for controlled objects if needed, but no tasking + finalization. + + * s-tarest.adb (Task_Lock): Do not try to lock again the + Global_Task_Lock if we already own it. Otherwise, we get blocked in + some run-time operations. + (Task_Unlock): Do not try to actually unlock the Global_Task_Lock + until all nested locks have been released. + (Task_Wrapper): Call the fall-back task termination handler. It + applies to all tasks but the environment task. + (Finalize_Global_Tasks): Add the call for the task termination + procedure for the environment task. + (Task_Wrapper): suppress warnings around declaration of + Secondary_Stack_Address. + + * s-tasini.adb (Final_Task_Unlock): Global_Task_Lock_Nesting has been + moved to the Common_ATCB record. + (Task_Lock): Global_Task_Lock_Nesting has been moved to the + Common_ATCB record. + (Task_Unlock): Global_Task_Lock_Nesting has been moved to the + Common_ATCB record. + + * s-taskin.adb (Initialize_ATCB): Initialize Global_Task_Lock_Nesting, + Fall_Back_Handler, and Specific_Handler. + + * s-taskin.ads (Cause_Of_Termination): Redefine this type here, already + defined in Ada.Task_Termination, to avoid circular dependencies. + (Termination_Handler): Redefine this type here, alredy defined in + Ada.Task_Termination, for avoiding circular dependencies. + (Common_ATCB): Add the Fall_Back_Handler and Specific_Handler required + for storing task termination handlers. In addition, + Global_Task_Lock_Nesting has been moved from Ada_Task_Control_Block to + Common_ATCB because it is used by both the regular and the restricted + run times. + (Ada_Task_Control_Block): Move Global_Task_Lock_Nesting from here to + Common_ATCB because it is used by both the regular and the restricted + run times. + (Common_ATCB): Added a dynamic task analyzer field. + + * s-tassta.adb (Abort_Tasks): Move the code in charge of checking + potentially blocking operations to System.Tasking.Utilities.Abort_Tasks. + (Task_Wrapper): Call the task termination handler. It applies to all + tasks but the environment task. + (Finalize_Global_Tasks): Call the task termination procedure for the + environment task. The call to Finalize_Global_List is now performed + using the soft links mechanism. + (Task_Wrapper): added dynamic stack analysis. + + * s-tasuti.adb (Abort_Tasks): The code in charge of checking + potentially blocking operations has been moved from + System.Tasking.Stages.Abort_Tasks to this procedure. There can be + direct calls to System.Tasking.Utilities.Abort_Tasks that do not pass + through System.Tasking.Stages.Abort_Tasks, and we do not want to miss + this run-time check. + + * s-solita.adb (Task_Termination_Handler_T): Add this task-safe version + of task termination procedure. + (Init_Tasking_Soft_Links): Install the task-safe version of the soft + link for the task termination procedure. + + * bindusg.adb: (Bindusg): Added documentation for -u option. + + * bindgen.adb (Get_Main_Ada) Added handling of dynamic stack analysis. + (Get_Main_C): Add handling of dynamic stack analysis. + (Gen_Output_File_C): Add external functions for dynamic stack analysis. + + * Makefile.rtl: Add entry for a-taster (Ada.Task_Termination). + (GNATRTL_NONTASKING_OBJS) Added entries for dynamic stack analysis + (GNATRTL_NONTASKING_OBJS): Add AltiVec files. + + * opt.ads: Added flags used by dynamic stack measurement. + (Max_Line_Length): Remove (not used anymore) + + * s-io.ads, s-io.adb (Standard_Error): new subprogram + (Standart_Output): new subprogram + (Set_Output): new subprogram + (Put): now uses the value of Current_Out to know if the output has to be + send to stderr or stdout. + + * s-stausa.ads: Complete implementation. + + * switch-b.adb: Added handling of -u switch for dynamic stack analysis. + + * impunit.adb (Non_Imp_File_Names_05): Add Ada.Task_Termination to the + list of Ada 05 files. + (GNAT Library Units): Add AltiVec files. + + * g-allein.ads, g-alleve.adb, g-alleve.ads, g-altcon.adb, + g-altcon.ads, g-altive.ads, g-alveop.adb, g-alveop.ads + g-alvety.ads, g-alvevi.ads: New files providing altivec API. + +2005-12-09 Nicolas Setton + + * adaint.c (__gnat_locate_regular_file): Return immediately if + file_name is empty. + +2005-12-09 Javier Miranda + Hristian Kirtchev + + * a-tags.ads, a-tags.adb (Offset_To_Top): Moved from the package body + to the specification because the frontend generates code that uses this + subprogram. + (Set_Interface_Table): Add missing assertion. + Update documentation describing the run-time structure. + (Displace): New subprogram that displaces the pointer to the object + to reference one of its secondary dispatch tables. + (IW_Membership): Modified to use the new table of interfaces. + (Inherit_TSD): Modified to use the new table of interfaces. + (Register_Interface_Tag): Use the additional formal to fill the + contents of the new table of interfaces. + (Set_Interface_Table): New subprogram that stores in the TSD the + pointer to the table of interfaces. + (Set_Offset_To_Top): Use the additional formal to save copy of + the offset value in the table of interfaces. + Update structure of GNAT Primary and Secondary dispatch table diagram. + Add comment section on GNAT dispatch table prologue. + (Offset_To_Signature): Update the constant value of the Signature field. + (Dispatch_Table): Update comment on hidden fields in the prologue. + (Get_Entry_Index, Get_Prim_Op_Kind, Get_Offset_Index, OSD, + Set_Entry_Index, Set_Offset_Index, Set_Prim_Op_Kind, SSD, TSD): Change + the type of formal parameter T to Tag, introduce additional assertions. + (Get_Num_Prim_Ops, Set_Num_Prim_Ops): Remove an unnecessary type + conversion. + (Get_Tagged_Kind, Set_Tagged_Kind): New bodies. + + * exp_ch6.adb (Register_Interface_DT_Entry): Remove the Thunk_Id actual + in all the calls to Expand_Interface_Thunk. Instead of referencing the + record component containing the tag of the secondary dispatch table we + have to use the Offset_To_Top run-time function to get this information; + otherwise if the pointer to the base of the object has been displace + we get a wrong value if we use the 'position attribute. + + * exp_disp.adb (Expand_Interface_Thunk): Remove the Thunk_Id actual in + all the calls to Expand_Interface_Thunk. + (Make_Secondary_DT): Secondary dispatch tables do not have a table of + interfaces; hence the call to Set_Interface_Table was clearly wrong. + (Collect_All_Interfaces): Modify the internal subprogram Collect to + ensure that the interfaces implemented by the ancestors are placed + at the header of the generated list. + (Expand_Interface_Conversion): Handle the case in which the displacement + associated with the interface conversion is not statically known. In + this case we generate a call to the new run-time subprogram Displace. + (Make_DT): Generate and fill the new table of interfaces. + (Ada_Actions, Action_Is_Proc, Action_Nb_Arg): Add entries for + Get_Tagged_Kind and Set_Tagged_Kind. + (Tagged_Kind): New function that determines the tagged kind of a type + with respect to limitedness and concurrency and returns a reference to + RE_Tagged_Kind. + (Make_Disp_Asynchronous_Select_Body, Make_Disp_Conditional_Select_Body, + Make_Disp_Timed_Select_Body): Correctly retrieve the pointer to the + primary dispatch table for a type. + (Make_DT, Make_Secondary_DT): Set the tagged kind in the primary and + secondary dispatch table respectively of a tagged type. + + * exp_disp.ads (Expand_Interface_Thunk): Remove Thunk_Id formal. + (Expand_Interface_Conversion): New subprogram to indicate if the + displacement of the type conversion is statically known. + (DT_Access_Action): Add values Get_Tagged_Kind and Set_Tagged_Kind. + + * rtsfind.ads (RE_Offset_To_Top): New entity + (RTU_Id): Add Ada_Task_Termination to the list so that it is made + accessible to users. + (Re_Displace): New entity + (RE_Interface_Data): New entity + (RE_Set_Interface_Data): New_Entity + (RE_Id, RE_Unit_Table): Add entry for RE_Get_Tagged_Kind, + Set_Tagged_Kind, RE_Tagged_Kind, RE_TK_Abstract_Limited_Tagged, + RE_TK_Abstract_Tagged, RE_TK_Limited_Tagged, RE_TK_Protected, + RE_TK_Tagged, RE_TK_Task. + + * exp_ch3.adb (Init_Secondary_Tags): Modify the subprogram + Init_Secondary_Tags_Internal to allow its use with interface types and + also to generate the code for the new additional actual required + by Set_Offset_To_Top. + (Build_Init_Statements): In case of components associated with abstract + interface types there is no need to generate a call to its IP. + (Freeze_Record_Type): Generate Select Specific Data tables only for + concurrent types. + (Make_Predefined_Primitive_Specs, Predefined_Primitive_Bodies): Generate + the bodies and specifications of the predefined primitive operations + dealing with dispatching selects and abort, 'Callable, 'Terminated only + for concurrent types. + + * exp_sel.ads, exp_sel.adb: New files. + + * exp_ch9.adb (Build_Protected_Entry, Expand_N_Protected_Body, + Expand_N_Protected_Type_Declaration, Make_Initialize_Protection): Handle + properly protected objects and attach handler in the case of the + restricted profile. + Move embeded package Select_Expansion_Utilities into a separate external + package. + (Expand_N_Asynchronous_Select, Expand_N_Conditional_Select, + Expand_N_Timed_Entry_Call): Correct calls external package Exp_Sel. + (Build_K, Build_S_Assignment): New subprograms, part of the select + expansion utilities. + (Expand_N_Asynchronous_Select, Expand_N_Conditional_Entry_Call, + Expand_N_Timed_Entry_Call): Optimize expansion of select statements + where the trigger is a dispatching procedure of a limited tagged type. + +2005-12-09 Olivier Hainque + + * decl.c (gnat_to_gnu_entity, renaming object case): Don't early expand + pointer initialization values. Make a SAVE_EXPR instead. Add comments + about the use and expansion of SAVE_EXPRs in the various possible + renaming handling cases. + (components_to_record, compare_field_bitpos): Sort by DECL_UID, not by + abusing DECL_FCONTEXT. + +2005-12-09 Matthew Heaney + + * a-convec.adb (Merge): Added assertions to check whether vector params + are sorted. + + * a-coinve.adb (Merge): Added assertions to check whether vector params + are sorted. + + * a-cohama.ads (Cursor'Write): raises Program_Error per latest AI-302 + draft. + (Cursor'Read): raises PE + + * a-cohama.adb (Insert.New_Node): Uses box-style syntax to init elem + to its default value. + + * a-cihama.adb: Manually check whether cursor's key and elem are + non-null + + * a-cidlli.ads, a-cidlli.adb (Splice): Changed param name and param mode + (Merge): Assert that target and source lists are in order + (Swap): Declare non-const temporaries, to pass to Splice + + * a-cdlili.ads: (Splice): Changed param name and param mode + + * a-cdlili.adb: (Splice): Changed param name and param mode + (Merge): Assert that target and source lists are in order + (Swap): Declare non-const temporaries, to pass to Splice + + * a-ciorma.ads, a-coorma.ads: (Read): declare Stream param as not null + (Write): declare Stream param as not null + + * a-ciorma.adb, a-coorma.adb: All explicit raise statements now include + an exception message. + +2005-12-09 Thomas Quinot + Robert Dewar + + * hostparm.ads (Max_Line_Length): Set to Types.Column_Number'Last - 1, + which is the absolute maximum length we can support. + + * frontend.adb: For the processing of configuration pragma files, + remove references to Opt.Max_Line_Length, which is not checked anymore. + + * namet.ads (Name_Buffer): Adjust size to reflect increase on max line + length. + + * scn.adb, scng.adb: + Always check line length against the absolute supported maximum, + Hostparm.Max_Line_Length. + + * stylesw.adb (Set_Style_Check_Options, case M): The maximum supported + value for the maximum line length is Max_Line_Length (not + Column_Number'Last). + Minor error msg update + (Set_Style_Check_Options): New interface returning error msg + Minor code reorganization (processing for 'M' was out of alpha order) + + * switch-c.adb: New interface for Set_Style_Check_Options + + * stylesw.ads (Set_Style_Check_Options): New interface returning error + msg. + +2005-12-09 Javier Miranda + + * exp_aggr.adb (Build_Record_Aggr_Code): Default-initialialized records + with IP subprogram were only supported if there were limited types. + + * sem_aggr.adb (Resolve_Record_Aggregate): Default-initialialized + records with IP subprogram were only supported if there were limited + types. + +2005-12-09 Olivier Hainque + Eric Botcazou + + * trans.c (tree_transform, emit_check): Adjust calls to + build_call_raise, passing the now expected GNAT_NODE argument. + + * gigi.h (build_call_raise): Add a GNAT_NODE argument to convey better + source line information than what the current global locus indicates + when appropriate. + + * utils2.c (build_simple_component_ref): Return 0 if the offset of the + field has overflowed. + (build_call_raise): Add a GNAT_NODE argument to convey better source + line information than what the current global locus indicates when + appropriate. + (build_component_ref): Adjust call to build_call_raise. + +2005-12-09 Pascal Obry + + * g-diopit.adb (Find): Fix test to exit the iterator and make sure that + the iterator is quitting iteration on parent directory. + +2005-12-09 Javier Miranda + + * exp_ch5.adb (Expand_N_Assignment_Statement): In case of tagged types + and the assignment to a class-wide object, before the assignment we + generate a run-time check to ensure that the tag of the Target is + covered by the tag of the source. + +2005-12-09 Robert Dewar + + * exp_imgv.adb (Expand_Image_Attribute): Generate extra boolean + parameter in call to Image_Wide_Character. + + * s-imgwch.ads, s-imgwch.adb (Image_Wide_Character): Add boolean + parameter Ada_2005 to deal with annoying FFFE/FFFF inconsistency. + (Image_Wide_Character): Add boolean parameter Ada_2005 to deal with + annoying FFFE/FFFF inconsistency. + +2005-12-09 Robert Dewar + Javier Miranda + Ed Schonberg + + * exp_util.ads, exp_util.adb (Is_Ref_To_Bit_Packed_Slice): Handle case + of type conversion. + (Find_Interface): New subprogram that given a tagged type and one of its + component associated with the secondary table of an abstract interface + type, return the entity associated with such abstract interface type. + (Make_Subtype_From_Expr): If type has unknown discriminants, always use + base type to create anonymous subtype, because entity may be a locally + declared subtype or generic actual. + (Find_Interface): New subprogram that given a tagged type and one of its + component associated with the secondary table of an abstract interface + type, return the entity associated with such abstract interface type. + + * sem_res.adb (Resolve_Type_Conversion): Handle the case in which the + conversion cannot be handled at compile time. In this case we pass this + information to the expander to generate the appropriate code. + +2005-12-09 Robert Dewar + Ed Schonberg + Gary Dismukes + Javier Miranda + Hristian Kirtchev + + * einfo.adb (Itype_Printed): New flag + (Is_Limited_Type): Derived types do not inherit limitedness from + interface progenitors. + (Is_Return_By_Reference_Type): Predicate does not apply to limited + interfaces. + + * einfo.ads (Itype_Printed): New flag + Move Is_Wrapper_Package to proper section + Add missing Inline for Is_Volatile + + * output.ads, output.adb (Write_Erase_Char): New procedure + (Save/Restore_Output_Buffer): New procedures + (Save/Restore_Output_Buffer): New procedures + + * sprint.ads, sprint.adb (Write_Itype): Handle case of record itypes + Add missing support for anonymous access type + (Write_Id): Insert calls to Write_Itype + (Write_Itype): New procedure to output itypes + + * par-ch12.adb (P_Formal_Derived_Type_Definition): In Ada 2005, handle + use of "limited" in declaration. + + * sinfo.ads, sinfo.adb: + Formal derived types can carry an explicit "limited" indication. + + * sem_ch3.adb: Add with and use of Targparm. + (Create_Component): If Frontend_Layout_On_Target is True and the + copied component does not have a known static Esize, then reset + the size and positional fields of the new component. + (Analyze_Component_Declaration): A limited component is + legal within a protected type that implements an interface. + (Collect_Interfaces): Do not add to the list the interfaces that + are implemented by the ancestors. + (Derived_Type_Declaration): If the parent of the full-view is an + interface perform a transformation of the tree to ensure that it has + the same parent than the partial-view. This simplifies the job of the + expander in order to generate the correct object layout, and it is + needed because the list of interfaces of the full-view can be given in + any order. + (Process_Full_View): The parent of the full-view does not need to be + a descendant of the parent of the partial view if both parents are + interfaces. + (Analyze_Private_Extension_Declaration): If declaration has an explicit + "limited" the parent must be a limited type. + (Build_Derived_Record_Type): A derived type that is explicitly limited + must have limited ancestor and progenitors. + (Build_Derived_Type): Ditto. + (Process_Full_View): Verify that explicit uses of "limited" in partial + and full declarations are consistent. + (Find_Ancestor_Interface): Remove function. + (Collect_Implemented_Interfaces): New procedure used to gather all + implemented interfaces by a type. + (Contain_Interface): New function used to check whether an interface is + present in a list. + (Find_Hidden_Interface): New function used to determine whether two + lists of interfaces constitute a set equality. If not, the first + differing interface is returned. + (Process_Full_View): Improve the check for the "no hidden interface" + rule as defined by AI-396. + +2005-12-09 Robert Dewar + + * freeze.adb (Freeze_Record_Type): Only test for useless pack on record + types, not on record subtypes. + (Freeze_Entity): Code cleanup. Add barrier to the loop + that generates the references for primitive operations. This allows to + remove an unnecessary exception handler. + Code reformatting and comment clean ups. + +2005-12-09 Vincent Celier + + * gnatcmd.adb (GNATCmd): GNAT CHECK accepts switch -U + If GNAT CHECK is called with a project file, but with no + source on the command line, call gnatcheck with all the compilable + sources of the project. + Take into account the new command Check, for gnatcheck. Treat as for + other ASIS tools: take into account project, specific package Check and + Compiler switches. + For ASIS tools, add the switches in package Compiler for + the invocation of the compiler. + + * prj-attr.adb: Add package Check and its attributes + + * vms_conv.ads (Command_Type): New command Check, for gnatcheck + + * vms_conv.adb (Initialize): Change Params of command Check to + unlimited files. + Change some Hostparm.OpenVMS checks to Targparm.OpenVMS_On_Target. + Add data for new command Check + + * vms_data.ads: Add project related qualifiers for GNAT CHECK and GNAT + ELIM. + Add qualifiers for Check command options + (Command_Type): New command Check + +2005-12-09 Thomas Quinot + + * mlib-utl.adb (Ar): Use Output.Buffer_Max to determine whether a + command line switch overruns the output buffer. + +2005-12-09 Robert Dewar + + * sem_prag.adb: Processing for new pragma Complete_Representation + (Analyze_Pragma, case Debug): Implement two argument form. + + * par-prag.adb: Entry for new pragma Complete_Representation + (Prag, case Debug): Recognize two argument form of pragma Debug + New interface for Set_Style_Check_Options. + + * sem_ch13.adb: Implement new pragma Complete_Representation. + + * snames.adb, snames.ads, snames.h: Entry for new pragma + Complete_Representation. + +2005-12-09 Gary Dismukes + + * sem_cat.adb (Validate_RCI_Subprogram_Declaration): Revise test for + available user-specified stream attributes on limited parameters to + also test the type directly rather than only its underlying type (for + Ada 95) and, in the case of Ada 2005, to check that the user-specified + attributes are visible at the point of the subprogram declaration. + For Ada 2005, the error message is modified to indicate that the + type's stream attributes must be visible (again, only for -gnat05). + +2005-12-09 Ed Schonberg + + * sem_ch12.adb (Subtypes_Match): Handle properly Ada05 arrays of + anonymous access types. + + * sem_eval.adb (Subtypes_Statically_Match): Implement new rules for + matching of anonymous access types and anonymous access to subprogram + types. 'R'M 4.9.1 (2/2). + +2005-12-09 Ed Schonberg + + * sem_ch4.adb (Remove_Abstract_Operations): Do not apply preference + rule prematurely when operands are universal, remaining ambiguities + will be removed during resolution. + Code cleanup. + + * sem_type.adb (Disambiguate): In Ada95 mode, discard interpretations + that are Ada 2005 functions. + (Has_Abstract_Interpretation): Subsidiary to + Remove_Conversions, to remove ambiguities caused by abstract operations + on numeric types when operands are universal. + +2005-12-09 Robert Dewar + + * sem_ch6.adb (Analyze_Subprogram_Body): Properly check categorization + for case where spec is categorized. + +2005-12-09 Javier Miranda + + * sem_ch8.adb (Find_Type): In case of tagged types that are concurrent + types use the corresponding record type. This was not needed before + the implementation of Ada 2005 synchronized types because + concurrent types were never tagged types in Ada 95. + +2005-12-09 Ed Schonberg + + * sem_ch9.adb (Analyze_Delay_Alternative, Analyze_Delay_Until): Use the + first subtype of the type of the expression to verify that it is a + legal Time type. + +2005-12-09 Robert Dewar + + * sem_util.ads, sem_util.adb (Full_Qualified_Name): Now provides + decoded names. + +2005-12-09 Quentin Ochem + Robert Dewar + Ed Falis + Florian Villoing + Thomas Quinot + Arnaud Charlet + + * gnat_ugn.texi: Created section "Stack Related Tools" + Moved "Stack Overflow Checking" subsection from "Switches for gcc" to + "Stack Related Tools" + Added subsection "Static Stack Usage Analysis" + Added subsection "Dynamic Stack Usage Analysis" + Include documentation of itypes in sprint listing (-gnatG) + Documented gnatbind -D switch (default sec stack size for fixed sec + stacks). + Added Interrupt_State and Persistent_BSS to list of configuration + pragmas. + Add missing doc for maximum value of nnn in -gnatyMnnn + + * gnat_rm.texi: Document the AltiVec binding. + Add documentation for pragma Complete_Representation + Shortened an overly long line (> 79 chars) + Clarify documentation of unchecked conversion in implementation + defined cases. + Document two argument form of pragma Debug + + * types.ads (Column_Number): Update documentation. + + * exp_ch7.ads (Make_Adjust_Call): Document the special processing for + library level Finalize_Storage_Only objects (these are not attached to + any finalization list). + + * system-mingw.ads: (Underlying_Priorities): Update comment. + +2005-12-09 Robert Dewar + + * i-c.adb, i-cexten.ads, i-cobol.adb, i-cobol.ads, i-cpoint.ads, + i-cpp.adb, i-cpp.ads, i-cstrea.ads, i-cstrin.adb, i-cstrin.ads, + inline.adb, interfac.ads, i-os2err.ads, i-os2lib.ads, i-os2syn.ads, + i-os2thr.ads, itypes.adb, itypes.adb, itypes.ads, krunch.ads, + krunch.adb, lib.adb, lib.ads, lib-list.adb, lib-load.adb, + lib-load.ads, lib-sort.adb, live.adb, make.ads, i-cstrea-vms.adb, + interfac-vms.ads, makegpr.adb, indepsw-gnu.adb, indepsw.ads, + s-wchcon.ads, sdefault.ads, sem_ch10.adb, sem_eval.ads: Minor + reformatting. + +2005-12-09 Robert Dewar + + * s-vaflop-vms-alpha.adb: (Ne_F): New function + (Ne_G): New function + + * exp_ch4.adb (Expand_Allocator_Expression): Factor duplicated code + for tag assignment. + (Rewrite_Comparison): Handle case where operation is not a comparison + and ignore, and also handle type conversion case. + +2005-12-09 Thomas Quinot + + * exp_aggr.ads: Fix typo in comment. + ???-mark Convert_Aggr_In_Assignment as needing documentation. + +2005-12-09 Gary Dismukes + + * layout.adb: Replace various uses of byte by storage unit throughout. + (Get_Max_SU_Size): Name changed from Get_Max_Size. In the case of a + static size, convert to storage units before returning, to conform to + spec. + +2005-12-09 Matthew Gingell + + * g-exctra.ads: Fix typo in comment. + +2005-12-09 Richard Kenner + + * utils.c: Minor reformatting. + +2005-12-09 Robert Dewar + + * g-soccon.ads: + Further comment fixes to make the status of the default file clear + + * s-bitops.adb: Clarify comment for Bits_Array + +2005-12-07 Rafael Ávila de Espíndola + + * Make-lang.in (ada.install-normal): Remove. + +2005-12-07 Rafael Ávila de Espíndola + + * Make-lang.in: Remove all dependencies on s-gtype. + +2005-12-05 Richard Guenther + + * utils.c (convert): Use fold_convert where appropriate. + +2005-12-05 Paolo Bonzini + + * Makefile.in (gnatlib): Fix regex, using \. instead of . when + a period is meant. + +2005-12-02 Richard Guenther + + * trans.c (gnat_gimplify_expr): Use buildN instead of build. + +2005-12-01 Roger Sayle + + * utils.c (max_size): Only test for TREE_OVERFLOW on INTEGER_CST + nodes. + 2005-11-23 Laurent GUERBY * mlib-prj.adb (Build_Library): Initialize Delete. diff --git a/gcc/ada/Make-lang.in b/gcc/ada/Make-lang.in index d6f78bdf501..c6e4ad5e876 100644 --- a/gcc/ada/Make-lang.in +++ b/gcc/ada/Make-lang.in @@ -23,7 +23,7 @@ # Each language makefile fragment must provide the following targets: # # foo.all.cross, foo.start.encap, foo.rest.encap, -# foo.install-normal, foo.install-common, foo.install-man, +# 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 # @@ -121,10 +121,10 @@ GNAT_ADA_OBJS = ada/ada.o ada/a-charac.o ada/a-chlat1.o ada/a-except.o \ ada/exp_ch4.o ada/exp_ch5.o ada/exp_ch6.o ada/exp_ch7.o ada/exp_ch8.o \ ada/exp_ch9.o ada/exp_code.o ada/exp_dbug.o ada/exp_disp.o ada/exp_dist.o \ ada/exp_fixd.o ada/exp_aggr.o ada/exp_imgv.o ada/exp_intr.o ada/exp_pakd.o \ - ada/exp_prag.o ada/exp_smem.o ada/exp_strm.o ada/exp_tss.o ada/exp_util.o \ - ada/exp_vfpt.o ada/expander.o ada/fname.o ada/fname-uf.o ada/fmap.o \ - ada/freeze.o ada/frontend.o ada/gnat.o ada/g-hesora.o ada/g-htable.o \ - ada/g-os_lib.o ada/g-speche.o ada/g-string.o ada/g-utf_32.o \ + ada/exp_prag.o ada/exp_sel.o ada/exp_smem.o ada/exp_strm.o ada/exp_tss.o \ + ada/exp_util.o ada/exp_vfpt.o ada/expander.o ada/fname.o ada/fname-uf.o \ + ada/fmap.o ada/freeze.o ada/frontend.o ada/gnat.o ada/g-hesora.o \ + ada/g-htable.o ada/g-os_lib.o ada/g-speche.o ada/g-string.o ada/g-utf_32.o \ ada/s-crc32.o ada/get_targ.o \ ada/gnatvsn.o ada/hlo.o ada/hostparm.o ada/impunit.o ada/interfac.o \ ada/itypes.o ada/inline.o ada/krunch.o ada/lib.o ada/layout.o ada/lib-load.o \ @@ -148,7 +148,7 @@ GNAT_ADA_OBJS = ada/ada.o ada/a-charac.o ada/a-chlat1.o ada/a-except.o \ ada/stylesw.o ada/validsw.o ada/system.o ada/table.o ada/targparm.o \ ada/tbuild.o ada/tree_gen.o ada/tree_io.o ada/treepr.o ada/treeprs.o \ ada/ttypef.o ada/ttypes.o ada/types.o ada/uintp.o ada/uname.o ada/urealp.o \ - ada/usage.o ada/widechar.o ada/s-crtl.o ada/seh_init.o + ada/usage.o ada/widechar.o ada/s-crtl.o ada/seh_init.o ada/targext.o # Object files for gnat executables GNAT1_ADA_OBJS = $(GNAT_ADA_OBJS) ada/back_end.o ada/gnat1drv.o @@ -166,6 +166,7 @@ GNATBIND_OBJS = \ ada/initialize.o \ ada/seh_init.o \ ada/link.o \ + ada/targext.o \ ada/raise.o \ ada/tracebak.o \ ada/a-except.o \ @@ -298,7 +299,6 @@ gen-soccon: force LIBGNAT_OBJS=gen-soccon \ gnatlib -gt-ada-decl.h gt-ada-trans.h gt-ada-utils.h gtype-ada.h : s-gtype ; @true # Build hooks: @@ -445,8 +445,6 @@ doc/gnat-style.dvi: ada/gnat-style.texi $(docdir)/include/fdl.texi # Install hooks: # gnat1 is installed elsewhere as part of $(COMPILERS). -ada.install-normal: - # Install the binder program as $(target_noncanonical)-gnatbind # and also as either gnatbind (if native) or $(tooldir)/bin/gnatbind # likewise for gnatf, gnatchop, and gnatlink, gnatkr, gnatmake, gnat, @@ -493,7 +491,7 @@ ada.install-common: if [ -d $(DESTDIR)$(tooldir)/bin/. ] ; then \ rm -f $(DESTDIR)$(tooldir)/bin/gnatchop$(exeext); \ $(INSTALL_PROGRAM) gnatchop-cross$(exeext) $(DESTDIR)$(tooldir)/bin/gnatchop$(exeext); \ - fi; \ + fi ; \ else \ $(RM) $(DESTDIR)$(bindir)/gnatchop$(exeext); \ $(INSTALL_PROGRAM) gnatchop$(exeext) $(DESTDIR)$(bindir)/gnatchop$(exeext); \ @@ -1019,6 +1017,11 @@ ada/exit.o : ada/exit.c $(CONFIG_H) $(SYSTEM_H) ada/adaint.h ada/final.o : ada/final.c $(CONFIG_H) $(SYSTEM_H) ada/raise.h ada/link.o : ada/link.c + +ada/targext.o : ada/targext.c $(SYSTEM_H) coretypes.h $(TM_H) + $(CC) -c $(ALL_CFLAGS) $(ADA_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \ + $< $(OUTPUT_OPTION) + ada/cio.o : ada/cio.c $(CONFIG_H) $(SYSTEM_H) ada/adaint.h $(CC) -c $(ALL_CFLAGS) $(ALL_ADA_CFLAGS) \ $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION) @@ -1052,7 +1055,7 @@ ada/decl.o : ada/decl.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \ gt-ada-decl.h $(EXPR_H) ada/misc.o : ada/misc.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \ - $(RTL_H) $(EXPR_H) insn-codes.h insn-flags.h recog.h flags.h \ + $(RTL_H) $(EXPR_H) insn-codes.h insn-flags.h insn-config.h recog.h flags.h \ diagnostic.h output.h except.h $(TM_P_H) langhooks.h debug.h \ $(LANGHOOKS_DEF_H) libfuncs.h $(OPTABS_H) ada/ada.h ada/types.h \ ada/atree.h ada/nlists.h ada/elists.h ada/sinfo.h ada/einfo.h ada/namet.h \ @@ -1092,16 +1095,16 @@ ada/a-chlat1.o : ada/ada.ads ada/a-charac.ads ada/a-chlat1.ads \ ada/system.ads ada/a-elchha.o : ada/ada.ads ada/a-except.ads ada/a-elchha.ads \ - ada/a-elchha.adb ada/system.ads ada/s-parame.ads ada/s-stalib.ads \ + ada/a-elchha.adb ada/system.ads ada/s-parame.ads ada/s-soflin.ads \ + ada/s-stache.ads ada/s-stalib.ads ada/s-stoele.ads ada/s-stoele.adb \ ada/s-traent.ads ada/unchconv.ads ada/a-except.o : ada/ada.ads ada/a-except.ads ada/a-except.adb \ ada/a-excach.adb ada/a-exexda.adb ada/a-exexpr.adb ada/a-exextr.adb \ - ada/a-elchha.ads ada/a-excpol.adb ada/a-exstat.adb ada/a-unccon.ads \ - ada/a-uncdea.ads ada/interfac.ads ada/system.ads ada/s-exctab.ads \ - ada/s-parame.ads ada/s-secsta.ads ada/s-soflin.ads ada/s-stache.ads \ - ada/s-stalib.ads ada/s-stoele.ads ada/s-stoele.adb ada/s-traceb.ads \ - ada/s-traent.ads ada/s-traent.adb ada/s-unstyp.ads ada/unchconv.ads + ada/a-elchha.ads ada/a-excpol.adb ada/a-exstat.adb ada/system.ads \ + ada/s-exctab.ads ada/s-parame.ads ada/s-secsta.ads ada/s-soflin.ads \ + ada/s-stache.ads ada/s-stalib.ads ada/s-stoele.ads ada/s-stoele.adb \ + ada/s-traceb.ads ada/s-traent.ads ada/s-traent.adb ada/unchconv.ads ada/a-ioexce.o : ada/ada.ads ada/a-except.ads ada/a-ioexce.ads \ ada/system.ads ada/s-exctab.ads ada/s-exctab.adb ada/s-htable.ads \ @@ -1227,17 +1230,18 @@ ada/bindgen.o : ada/ada.ads ada/a-except.ads ada/ali.ads ada/alloc.ads \ ada/unchdeal.ads ada/bindusg.o : ada/bindusg.ads ada/bindusg.adb ada/gnat.ads \ - ada/g-os_lib.ads ada/g-string.ads ada/osint.ads ada/output.ads \ - ada/system.ads ada/s-exctab.ads ada/s-stalib.ads ada/s-unstyp.ads \ - ada/types.ads ada/unchconv.ads ada/unchdeal.ads + ada/g-os_lib.ads ada/g-string.ads ada/hostparm.ads ada/osint.ads \ + ada/output.ads ada/system.ads ada/s-exctab.ads ada/s-stalib.ads \ + ada/s-unstyp.ads ada/types.ads ada/unchconv.ads ada/unchdeal.ads ada/butil.o : ada/ada.ads ada/a-except.ads ada/alloc.ads ada/butil.ads \ ada/butil.adb ada/debug.ads ada/gnat.ads ada/g-os_lib.ads \ ada/g-string.ads ada/gnatvsn.ads ada/hostparm.ads ada/namet.ads \ - ada/opt.ads ada/output.ads ada/system.ads ada/s-exctab.ads \ - ada/s-memory.ads ada/s-parame.ads ada/s-stalib.ads ada/s-traent.ads \ - ada/s-unstyp.ads ada/s-wchcon.ads ada/table.ads ada/table.adb \ - ada/tree_io.ads ada/types.ads ada/unchconv.ads ada/unchdeal.ads + ada/opt.ads ada/output.ads ada/rident.ads ada/system.ads \ + ada/s-exctab.ads ada/s-memory.ads ada/s-parame.ads ada/s-rident.ads \ + ada/s-stalib.ads ada/s-traent.ads ada/s-unstyp.ads ada/s-wchcon.ads \ + ada/table.ads ada/table.adb ada/targparm.ads ada/tree_io.ads \ + ada/types.ads ada/unchconv.ads ada/unchdeal.ads ada/casing.o : ada/ada.ads ada/a-except.ads ada/alloc.ads ada/casing.ads \ ada/casing.adb ada/csets.ads ada/csets.adb ada/debug.ads ada/gnat.ads \ @@ -1262,17 +1266,17 @@ ada/checks.o : ada/ada.ads ada/a-except.ads ada/alloc.ads ada/atree.ads \ ada/nlists.adb ada/nmake.ads ada/nmake.adb ada/opt.ads ada/output.ads \ ada/restrict.ads ada/restrict.adb ada/rident.ads ada/rtsfind.ads \ ada/rtsfind.adb ada/sem.ads ada/sem_cat.ads ada/sem_ch3.ads \ - ada/sem_ch7.ads ada/sem_ch8.ads ada/sem_dist.ads ada/sem_eval.ads \ - ada/sem_eval.adb ada/sem_res.ads ada/sem_type.ads ada/sem_util.ads \ - ada/sem_warn.ads ada/sinfo.ads ada/sinfo.adb ada/sinput.ads \ - ada/snames.ads ada/sprint.ads ada/stand.ads ada/stringt.ads \ - ada/stringt.adb ada/system.ads ada/s-exctab.ads ada/s-htable.ads \ - ada/s-imgenu.ads ada/s-memory.ads ada/s-parame.ads ada/s-rident.ads \ - ada/s-secsta.ads ada/s-soflin.ads ada/s-stache.ads ada/s-stalib.ads \ - ada/s-stoele.ads ada/s-stoele.adb ada/s-traent.ads ada/s-unstyp.ads \ - ada/s-wchcon.ads ada/table.ads ada/table.adb ada/targparm.ads \ - ada/tbuild.ads ada/tbuild.adb ada/tree_io.ads ada/ttypes.ads \ - ada/types.ads ada/uintp.ads ada/uintp.adb ada/uname.ads \ + ada/sem_ch6.ads ada/sem_ch7.ads ada/sem_ch8.ads ada/sem_dist.ads \ + ada/sem_eval.ads ada/sem_eval.adb ada/sem_res.ads ada/sem_type.ads \ + ada/sem_util.ads ada/sem_warn.ads ada/sinfo.ads ada/sinfo.adb \ + ada/sinput.ads ada/snames.ads ada/sprint.ads ada/stand.ads \ + ada/stringt.ads ada/stringt.adb ada/system.ads ada/s-exctab.ads \ + ada/s-htable.ads ada/s-imgenu.ads ada/s-memory.ads ada/s-parame.ads \ + ada/s-rident.ads ada/s-secsta.ads ada/s-soflin.ads ada/s-stache.ads \ + ada/s-stalib.ads ada/s-stoele.ads ada/s-stoele.adb ada/s-traent.ads \ + ada/s-unstyp.ads ada/s-wchcon.ads ada/table.ads ada/table.adb \ + ada/targparm.ads ada/tbuild.ads ada/tbuild.adb ada/tree_io.ads \ + ada/ttypes.ads ada/types.ads ada/uintp.ads ada/uintp.adb ada/uname.ads \ ada/unchconv.ads ada/unchdeal.ads ada/urealp.ads ada/urealp.adb \ ada/validsw.ads @@ -1308,22 +1312,22 @@ ada/cstand.o : ada/ada.ads ada/a-except.ads ada/alloc.ads ada/atree.ads \ ada/g-string.ads ada/g-utf_32.ads ada/gnatvsn.ads ada/hostparm.ads \ ada/interfac.ads ada/layout.ads ada/lib.ads ada/lib-xref.ads \ ada/namet.ads ada/namet.adb ada/nlists.ads ada/nlists.adb ada/nmake.ads \ - ada/nmake.adb ada/opt.ads ada/output.ads ada/rident.ads ada/rtsfind.ads \ - ada/scans.ads ada/scn.ads ada/scng.ads ada/scng.adb ada/sem.ads \ - ada/sem_ch8.ads ada/sem_eval.ads ada/sem_mech.ads ada/sem_res.ads \ - ada/sem_type.ads ada/sem_util.ads ada/sem_util.adb ada/sinfo.ads \ - ada/sinfo.adb ada/sinput.ads ada/sinput.adb ada/snames.ads \ - ada/stand.ads ada/stringt.ads ada/style.ads ada/styleg.ads \ - ada/styleg.adb ada/styleg-c.ads ada/stylesw.ads ada/system.ads \ - ada/s-crc32.ads ada/s-crc32.adb ada/s-exctab.ads ada/s-htable.ads \ - ada/s-imgenu.ads ada/s-memory.ads ada/s-parame.ads ada/s-rident.ads \ - ada/s-secsta.ads ada/s-soflin.ads ada/s-stache.ads ada/s-stalib.ads \ - ada/s-stoele.ads ada/s-stoele.adb ada/s-traent.ads ada/s-unstyp.ads \ - ada/s-wchcon.ads ada/table.ads ada/table.adb ada/targparm.ads \ - ada/tbuild.ads ada/tree_io.ads ada/ttypef.ads ada/ttypes.ads \ - ada/types.ads ada/uintp.ads ada/uintp.adb ada/uname.ads \ - ada/unchconv.ads ada/unchdeal.ads ada/urealp.ads ada/urealp.adb \ - ada/widechar.ads + ada/nmake.adb ada/opt.ads ada/output.ads ada/restrict.ads \ + ada/rident.ads ada/rtsfind.ads ada/scans.ads ada/scn.ads ada/scng.ads \ + ada/scng.adb ada/sem.ads ada/sem_ch8.ads ada/sem_eval.ads \ + ada/sem_mech.ads ada/sem_res.ads ada/sem_type.ads ada/sem_util.ads \ + ada/sem_util.adb ada/sinfo.ads ada/sinfo.adb ada/sinput.ads \ + ada/sinput.adb ada/snames.ads ada/stand.ads ada/stringt.ads \ + ada/style.ads ada/styleg.ads ada/styleg.adb ada/styleg-c.ads \ + ada/stylesw.ads ada/system.ads ada/s-crc32.ads ada/s-crc32.adb \ + ada/s-exctab.ads ada/s-htable.ads ada/s-imgenu.ads ada/s-memory.ads \ + ada/s-parame.ads ada/s-rident.ads ada/s-secsta.ads ada/s-soflin.ads \ + ada/s-stache.ads ada/s-stalib.ads ada/s-stoele.ads ada/s-stoele.adb \ + ada/s-traent.ads ada/s-unstyp.ads ada/s-wchcon.ads ada/table.ads \ + ada/table.adb ada/targparm.ads ada/tbuild.ads ada/tree_io.ads \ + ada/ttypef.ads ada/ttypes.ads ada/types.ads ada/uintp.ads ada/uintp.adb \ + ada/uname.ads ada/unchconv.ads ada/unchdeal.ads ada/urealp.ads \ + ada/urealp.adb ada/widechar.ads ada/debug.o : ada/debug.ads ada/debug.adb ada/system.ads @@ -1430,18 +1434,18 @@ ada/exp_aggr.o : ada/ada.ads ada/a-except.ads ada/alloc.ads ada/atree.ads \ ada/nlists.ads ada/nlists.adb ada/nmake.ads ada/nmake.adb ada/opt.ads \ ada/output.ads ada/restrict.ads ada/restrict.adb ada/rident.ads \ ada/rtsfind.ads ada/sem.ads ada/sem_cat.ads ada/sem_ch3.ads \ - ada/sem_ch8.ads ada/sem_eval.ads ada/sem_eval.adb ada/sem_res.ads \ - ada/sem_type.ads ada/sem_util.ads ada/sem_warn.ads ada/sinfo.ads \ - ada/sinfo.adb ada/sinput.ads ada/snames.ads ada/sprint.ads \ - ada/stand.ads ada/stringt.ads ada/stringt.adb ada/system.ads \ - ada/s-exctab.ads ada/s-exctab.adb ada/s-htable.ads ada/s-imgenu.ads \ - ada/s-memory.ads ada/s-parame.ads ada/s-rident.ads ada/s-secsta.ads \ - ada/s-soflin.ads ada/s-stache.ads ada/s-stalib.ads ada/s-stoele.ads \ - ada/s-stoele.adb ada/s-traent.ads ada/s-unstyp.ads ada/s-wchcon.ads \ - ada/table.ads ada/table.adb ada/targparm.ads ada/tbuild.ads \ - ada/tbuild.adb ada/tree_io.ads ada/ttypes.ads ada/types.ads \ - ada/uintp.ads ada/uintp.adb ada/uname.ads ada/unchconv.ads \ - ada/unchdeal.ads ada/urealp.ads ada/validsw.ads + ada/sem_ch6.ads ada/sem_ch8.ads ada/sem_eval.ads ada/sem_eval.adb \ + ada/sem_res.ads ada/sem_type.ads ada/sem_util.ads ada/sem_warn.ads \ + ada/sinfo.ads ada/sinfo.adb ada/sinput.ads ada/snames.ads \ + ada/sprint.ads ada/stand.ads ada/stringt.ads ada/stringt.adb \ + ada/system.ads ada/s-exctab.ads ada/s-exctab.adb ada/s-htable.ads \ + ada/s-imgenu.ads ada/s-memory.ads ada/s-parame.ads ada/s-rident.ads \ + ada/s-secsta.ads ada/s-soflin.ads ada/s-stache.ads ada/s-stalib.ads \ + ada/s-stoele.ads ada/s-stoele.adb ada/s-traent.ads ada/s-unstyp.ads \ + ada/s-wchcon.ads ada/table.ads ada/table.adb ada/targparm.ads \ + ada/tbuild.ads ada/tbuild.adb ada/tree_io.ads ada/ttypes.ads \ + ada/types.ads ada/uintp.ads ada/uintp.adb ada/uname.ads \ + ada/unchconv.ads ada/unchdeal.ads ada/urealp.ads ada/validsw.ads ada/exp_attr.o : ada/ada.ads ada/a-except.ads ada/alloc.ads ada/atree.ads \ ada/atree.adb ada/casing.ads ada/checks.ads ada/csets.ads ada/debug.ads \ @@ -1591,18 +1595,18 @@ ada/exp_ch4.o : ada/ada.ads ada/a-except.ads ada/alloc.ads ada/atree.ads \ ada/namet.ads ada/nlists.ads ada/nlists.adb ada/nmake.ads ada/nmake.adb \ ada/opt.ads ada/output.ads ada/restrict.ads ada/rident.ads \ ada/rtsfind.ads ada/sem.ads ada/sem_cat.ads ada/sem_ch13.ads \ - ada/sem_ch3.ads ada/sem_ch8.ads ada/sem_eval.ads ada/sem_eval.adb \ - ada/sem_res.ads ada/sem_type.ads ada/sem_util.ads ada/sem_warn.ads \ - ada/sinfo.ads ada/sinfo.adb ada/sinput.ads ada/snames.ads \ - ada/sprint.ads ada/stand.ads ada/stringt.ads ada/stringt.adb \ - ada/system.ads ada/s-exctab.ads ada/s-htable.ads ada/s-imgenu.ads \ - ada/s-memory.ads ada/s-parame.ads ada/s-rident.ads ada/s-secsta.ads \ - ada/s-soflin.ads ada/s-stache.ads ada/s-stalib.ads ada/s-stoele.ads \ - ada/s-stoele.adb ada/s-traent.ads ada/s-unstyp.ads ada/s-wchcon.ads \ - ada/table.ads ada/table.adb ada/targparm.ads ada/tbuild.ads \ - ada/tbuild.adb ada/tree_io.ads ada/ttypes.ads ada/types.ads \ - ada/uintp.ads ada/uintp.adb ada/unchconv.ads ada/unchdeal.ads \ - ada/urealp.ads ada/urealp.adb ada/validsw.ads + ada/sem_ch3.ads ada/sem_ch6.ads ada/sem_ch8.ads ada/sem_eval.ads \ + ada/sem_eval.adb ada/sem_res.ads ada/sem_type.ads ada/sem_util.ads \ + ada/sem_warn.ads ada/sinfo.ads ada/sinfo.adb ada/sinput.ads \ + ada/snames.ads ada/sprint.ads ada/stand.ads ada/stringt.ads \ + ada/stringt.adb ada/system.ads ada/s-exctab.ads ada/s-htable.ads \ + ada/s-imgenu.ads ada/s-memory.ads ada/s-parame.ads ada/s-rident.ads \ + ada/s-secsta.ads ada/s-soflin.ads ada/s-stache.ads ada/s-stalib.ads \ + ada/s-stoele.ads ada/s-stoele.adb ada/s-traent.ads ada/s-unstyp.ads \ + ada/s-wchcon.ads ada/table.ads ada/table.adb ada/targparm.ads \ + ada/tbuild.ads ada/tbuild.adb ada/tree_io.ads ada/ttypes.ads \ + ada/types.ads ada/uintp.ads ada/uintp.adb ada/unchconv.ads \ + ada/unchdeal.ads ada/urealp.ads ada/urealp.adb ada/validsw.ads ada/exp_ch5.o : ada/ada.ads ada/a-except.ads ada/alloc.ads ada/atree.ads \ ada/atree.adb ada/casing.ads ada/checks.ads ada/checks.adb \ @@ -1619,20 +1623,20 @@ ada/exp_ch5.o : ada/ada.ads ada/a-except.ads ada/alloc.ads ada/atree.ads \ ada/nmake.adb ada/opt.ads ada/output.ads ada/restrict.ads \ ada/restrict.adb ada/rident.ads ada/rtsfind.ads ada/scans.ads \ ada/scn.ads ada/scng.ads ada/scng.adb ada/sem.ads ada/sem_ch13.ads \ - ada/sem_ch3.ads ada/sem_ch8.ads ada/sem_eval.ads ada/sem_res.ads \ - ada/sem_type.ads ada/sem_util.ads ada/sem_util.adb ada/sem_warn.ads \ - ada/sinfo.ads ada/sinfo.adb ada/sinput.ads ada/snames.ads \ - ada/sprint.ads ada/stand.ads ada/stringt.ads ada/stringt.adb \ - ada/style.ads ada/styleg.ads ada/styleg.adb ada/styleg-c.ads \ - ada/stylesw.ads ada/system.ads ada/s-crc32.ads ada/s-exctab.ads \ - ada/s-htable.ads ada/s-imgenu.ads ada/s-memory.ads ada/s-parame.ads \ - ada/s-rident.ads ada/s-secsta.ads ada/s-soflin.ads ada/s-stache.ads \ - ada/s-stalib.ads ada/s-stoele.ads ada/s-stoele.adb ada/s-traent.ads \ - ada/s-unstyp.ads ada/s-wchcon.ads ada/table.ads ada/table.adb \ - ada/targparm.ads ada/tbuild.ads ada/tbuild.adb ada/tree_io.ads \ - ada/ttypes.ads ada/types.ads ada/uintp.ads ada/uintp.adb ada/uname.ads \ - ada/unchconv.ads ada/unchdeal.ads ada/urealp.ads ada/validsw.ads \ - ada/widechar.ads + ada/sem_ch3.ads ada/sem_ch5.ads ada/sem_ch8.ads ada/sem_eval.ads \ + ada/sem_res.ads ada/sem_type.ads ada/sem_util.ads ada/sem_util.adb \ + ada/sem_warn.ads ada/sinfo.ads ada/sinfo.adb ada/sinput.ads \ + ada/snames.ads ada/sprint.ads ada/stand.ads ada/stringt.ads \ + ada/stringt.adb ada/style.ads ada/styleg.ads ada/styleg.adb \ + ada/styleg-c.ads ada/stylesw.ads ada/system.ads ada/s-crc32.ads \ + ada/s-exctab.ads ada/s-htable.ads ada/s-imgenu.ads ada/s-memory.ads \ + ada/s-parame.ads ada/s-rident.ads ada/s-secsta.ads ada/s-soflin.ads \ + ada/s-stache.ads ada/s-stalib.ads ada/s-stoele.ads ada/s-stoele.adb \ + ada/s-traent.ads ada/s-unstyp.ads ada/s-wchcon.ads ada/table.ads \ + ada/table.adb ada/targparm.ads ada/tbuild.ads ada/tbuild.adb \ + ada/tree_io.ads ada/ttypes.ads ada/types.ads ada/uintp.ads \ + ada/uintp.adb ada/uname.ads ada/unchconv.ads ada/unchdeal.ads \ + ada/urealp.ads ada/validsw.ads ada/widechar.ads ada/exp_ch6.o : ada/ada.ads ada/a-except.ads ada/alloc.ads ada/atree.ads \ ada/atree.adb ada/casing.ads ada/checks.ads ada/checks.adb \ @@ -1717,29 +1721,29 @@ ada/exp_ch9.o : ada/ada.ads ada/a-except.ads ada/alloc.ads ada/atree.ads \ ada/einfo.ads ada/einfo.adb ada/elists.ads ada/elists.adb \ ada/err_vars.ads ada/errout.ads ada/erroutc.ads ada/exp_aggr.ads \ ada/exp_ch11.ads ada/exp_ch3.ads ada/exp_ch6.ads ada/exp_ch7.ads \ - ada/exp_ch9.ads ada/exp_ch9.adb ada/exp_dbug.ads ada/exp_smem.ads \ - ada/exp_tss.ads ada/exp_util.ads ada/exp_util.adb ada/fname.ads \ - ada/fname-uf.ads ada/freeze.ads ada/get_targ.ads ada/gnat.ads \ - ada/g-htable.ads ada/g-os_lib.ads ada/g-string.ads ada/g-utf_32.ads \ - ada/gnatvsn.ads ada/hostparm.ads ada/inline.ads ada/interfac.ads \ - ada/itypes.ads ada/lib.ads ada/lib-xref.ads ada/namet.ads ada/namet.adb \ - ada/nlists.ads ada/nlists.adb ada/nmake.ads ada/nmake.adb ada/opt.ads \ - ada/output.ads ada/restrict.ads ada/restrict.adb ada/rident.ads \ - ada/rtsfind.ads ada/scans.ads ada/scn.ads ada/scng.ads ada/scng.adb \ - ada/sem.ads ada/sem_ch11.ads ada/sem_ch6.ads ada/sem_ch8.ads \ - ada/sem_elab.ads ada/sem_eval.ads ada/sem_res.ads ada/sem_type.ads \ - ada/sem_util.ads ada/sem_util.adb ada/sinfo.ads ada/sinfo.adb \ - ada/sinput.ads ada/snames.ads ada/stand.ads ada/stringt.ads \ - ada/style.ads ada/styleg.ads ada/styleg.adb ada/styleg-c.ads \ - ada/stylesw.ads ada/system.ads ada/s-crc32.ads ada/s-exctab.ads \ - ada/s-htable.ads ada/s-imgenu.ads ada/s-memory.ads ada/s-parame.ads \ - ada/s-rident.ads ada/s-secsta.ads ada/s-soflin.ads ada/s-stache.ads \ - ada/s-stalib.ads ada/s-stoele.ads ada/s-stoele.adb ada/s-traent.ads \ - ada/s-unstyp.ads ada/s-wchcon.ads ada/table.ads ada/table.adb \ - ada/targparm.ads ada/tbuild.ads ada/tbuild.adb ada/tree_io.ads \ - ada/ttypes.ads ada/types.ads ada/uintp.ads ada/uintp.adb ada/uname.ads \ - ada/unchconv.ads ada/unchdeal.ads ada/urealp.ads ada/validsw.ads \ - ada/widechar.ads + ada/exp_ch9.ads ada/exp_ch9.adb ada/exp_dbug.ads ada/exp_sel.ads \ + ada/exp_smem.ads ada/exp_tss.ads ada/exp_util.ads ada/exp_util.adb \ + ada/fname.ads ada/fname-uf.ads ada/freeze.ads ada/get_targ.ads \ + ada/gnat.ads ada/g-htable.ads ada/g-os_lib.ads ada/g-string.ads \ + ada/g-utf_32.ads ada/gnatvsn.ads ada/hostparm.ads ada/inline.ads \ + ada/interfac.ads ada/itypes.ads ada/lib.ads ada/lib-xref.ads \ + ada/namet.ads ada/namet.adb ada/nlists.ads ada/nlists.adb ada/nmake.ads \ + ada/nmake.adb ada/opt.ads ada/output.ads ada/restrict.ads \ + ada/restrict.adb ada/rident.ads ada/rtsfind.ads ada/scans.ads \ + ada/scn.ads ada/scng.ads ada/scng.adb ada/sem.ads ada/sem_ch11.ads \ + ada/sem_ch6.ads ada/sem_ch8.ads ada/sem_elab.ads ada/sem_eval.ads \ + ada/sem_res.ads ada/sem_type.ads ada/sem_util.ads ada/sem_util.adb \ + ada/sinfo.ads ada/sinfo.adb ada/sinput.ads ada/snames.ads ada/stand.ads \ + ada/stringt.ads ada/style.ads ada/styleg.ads ada/styleg.adb \ + ada/styleg-c.ads ada/stylesw.ads ada/system.ads ada/s-crc32.ads \ + ada/s-exctab.ads ada/s-htable.ads ada/s-imgenu.ads ada/s-memory.ads \ + ada/s-parame.ads ada/s-rident.ads ada/s-secsta.ads ada/s-soflin.ads \ + ada/s-stache.ads ada/s-stalib.ads ada/s-stoele.ads ada/s-stoele.adb \ + ada/s-traent.ads ada/s-unstyp.ads ada/s-wchcon.ads ada/table.ads \ + ada/table.adb ada/targparm.ads ada/tbuild.ads ada/tbuild.adb \ + ada/tree_io.ads ada/ttypes.ads ada/types.ads ada/uintp.ads \ + ada/uintp.adb ada/uname.ads ada/unchconv.ads ada/unchdeal.ads \ + ada/urealp.ads ada/validsw.ads ada/widechar.ads ada/exp_code.o : ada/ada.ads ada/a-except.ads ada/alloc.ads ada/atree.ads \ ada/atree.adb ada/casing.ads ada/checks.ads ada/csets.ads ada/debug.ads \ @@ -1751,22 +1755,22 @@ ada/exp_code.o : ada/ada.ads ada/a-except.ads ada/alloc.ads ada/atree.ads \ ada/gnatvsn.ads ada/hostparm.ads ada/interfac.ads ada/lib.ads \ ada/lib.adb ada/lib-list.adb ada/lib-sort.adb ada/lib-xref.ads \ ada/namet.ads ada/namet.adb ada/nlists.ads ada/nlists.adb ada/nmake.ads \ - ada/nmake.adb ada/opt.ads ada/output.ads ada/rident.ads ada/rtsfind.ads \ - ada/scans.ads ada/scn.ads ada/scng.ads ada/scng.adb ada/sem.ads \ - ada/sem_cat.ads ada/sem_ch8.ads ada/sem_eval.ads ada/sem_eval.adb \ - ada/sem_res.ads ada/sem_type.ads ada/sem_util.ads ada/sem_util.adb \ - ada/sem_warn.ads ada/sinfo.ads ada/sinfo.adb ada/sinput.ads \ - ada/snames.ads ada/stand.ads ada/stringt.ads ada/stringt.adb \ - ada/style.ads ada/styleg.ads ada/styleg.adb ada/styleg-c.ads \ - ada/stylesw.ads ada/system.ads ada/s-carun8.ads ada/s-crc32.ads \ - ada/s-exctab.ads ada/s-htable.ads ada/s-imgenu.ads ada/s-memory.ads \ - ada/s-parame.ads ada/s-rident.ads ada/s-secsta.ads ada/s-soflin.ads \ - ada/s-stache.ads ada/s-stalib.ads ada/s-stoele.ads ada/s-stoele.adb \ - ada/s-traent.ads ada/s-unstyp.ads ada/s-wchcon.ads ada/table.ads \ - ada/table.adb ada/targparm.ads ada/tbuild.ads ada/tree_io.ads \ - ada/ttypes.ads ada/types.ads ada/types.adb ada/uintp.ads ada/uintp.adb \ - ada/uname.ads ada/unchconv.ads ada/unchdeal.ads ada/urealp.ads \ - ada/widechar.ads + ada/nmake.adb ada/opt.ads ada/output.ads ada/restrict.ads \ + ada/rident.ads ada/rtsfind.ads ada/scans.ads ada/scn.ads ada/scng.ads \ + ada/scng.adb ada/sem.ads ada/sem_cat.ads ada/sem_ch6.ads \ + ada/sem_ch8.ads ada/sem_eval.ads ada/sem_eval.adb ada/sem_res.ads \ + ada/sem_type.ads ada/sem_util.ads ada/sem_util.adb ada/sem_warn.ads \ + ada/sinfo.ads ada/sinfo.adb ada/sinput.ads ada/snames.ads ada/stand.ads \ + ada/stringt.ads ada/stringt.adb ada/style.ads ada/styleg.ads \ + ada/styleg.adb ada/styleg-c.ads ada/stylesw.ads ada/system.ads \ + ada/s-carun8.ads ada/s-crc32.ads ada/s-exctab.ads ada/s-htable.ads \ + ada/s-imgenu.ads ada/s-memory.ads ada/s-parame.ads ada/s-rident.ads \ + ada/s-secsta.ads ada/s-soflin.ads ada/s-stache.ads ada/s-stalib.ads \ + ada/s-stoele.ads ada/s-stoele.adb ada/s-traent.ads ada/s-unstyp.ads \ + ada/s-wchcon.ads ada/table.ads ada/table.adb ada/targparm.ads \ + ada/tbuild.ads ada/tree_io.ads ada/ttypes.ads ada/types.ads \ + ada/types.adb ada/uintp.ads ada/uintp.adb ada/uname.ads \ + ada/unchconv.ads ada/unchdeal.ads ada/urealp.ads ada/widechar.ads ada/exp_dbug.o : ada/ada.ads ada/a-except.ads ada/alloc.ads ada/atree.ads \ ada/atree.adb ada/casing.ads ada/debug.ads ada/einfo.ads ada/einfo.adb \ @@ -1788,28 +1792,28 @@ ada/exp_disp.o : ada/ada.ads ada/a-except.ads ada/alloc.ads ada/atree.ads \ ada/atree.adb ada/casing.ads ada/checks.ads ada/csets.ads ada/debug.ads \ ada/einfo.ads ada/einfo.adb ada/elists.ads ada/elists.adb \ ada/err_vars.ads ada/errout.ads ada/erroutc.ads ada/exp_aggr.ads \ - ada/exp_ch7.ads ada/exp_disp.ads ada/exp_disp.adb ada/exp_tss.ads \ - ada/exp_tss.adb ada/exp_util.ads ada/exp_util.adb ada/fname.ads \ - ada/freeze.ads ada/get_targ.ads ada/gnat.ads ada/g-htable.ads \ - ada/g-os_lib.ads ada/g-string.ads ada/g-utf_32.ads ada/gnatvsn.ads \ - ada/hostparm.ads ada/inline.ads ada/interfac.ads ada/itypes.ads \ - ada/lib.ads ada/lib-xref.ads ada/namet.ads ada/namet.adb ada/nlists.ads \ - ada/nlists.adb ada/nmake.ads ada/nmake.adb ada/opt.ads ada/output.ads \ - ada/restrict.ads ada/rident.ads ada/rtsfind.ads ada/scans.ads \ - ada/scn.ads ada/scng.ads ada/scng.adb ada/sem.ads ada/sem_ch8.ads \ - ada/sem_disp.ads ada/sem_eval.ads ada/sem_res.ads ada/sem_type.ads \ - ada/sem_util.ads ada/sem_util.adb ada/sinfo.ads ada/sinfo.adb \ - ada/sinput.ads ada/snames.ads ada/stand.ads ada/stringt.ads \ - ada/style.ads ada/styleg.ads ada/styleg.adb ada/styleg-c.ads \ - ada/stylesw.ads ada/system.ads ada/s-crc32.ads ada/s-exctab.ads \ - ada/s-htable.ads ada/s-imgenu.ads ada/s-memory.ads ada/s-parame.ads \ - ada/s-rident.ads ada/s-secsta.ads ada/s-soflin.ads ada/s-stache.ads \ - ada/s-stalib.ads ada/s-stoele.ads ada/s-stoele.adb ada/s-traent.ads \ - ada/s-unstyp.ads ada/s-wchcon.ads ada/table.ads ada/table.adb \ - ada/targparm.ads ada/tbuild.ads ada/tbuild.adb ada/tree_io.ads \ - ada/ttypes.ads ada/types.ads ada/uintp.ads ada/uintp.adb ada/uname.ads \ - ada/unchconv.ads ada/unchdeal.ads ada/urealp.ads ada/validsw.ads \ - ada/widechar.ads + ada/exp_ch7.ads ada/exp_dbug.ads ada/exp_disp.ads ada/exp_disp.adb \ + ada/exp_tss.ads ada/exp_tss.adb ada/exp_util.ads ada/exp_util.adb \ + ada/fname.ads ada/freeze.ads ada/get_targ.ads ada/gnat.ads \ + ada/g-htable.ads ada/g-os_lib.ads ada/g-string.ads ada/g-utf_32.ads \ + ada/gnatvsn.ads ada/hostparm.ads ada/inline.ads ada/interfac.ads \ + ada/itypes.ads ada/lib.ads ada/lib-xref.ads ada/namet.ads ada/namet.adb \ + ada/nlists.ads ada/nlists.adb ada/nmake.ads ada/nmake.adb ada/opt.ads \ + ada/output.ads ada/restrict.ads ada/rident.ads ada/rtsfind.ads \ + ada/scans.ads ada/scn.ads ada/scng.ads ada/scng.adb ada/sem.ads \ + ada/sem_ch8.ads ada/sem_disp.ads ada/sem_eval.ads ada/sem_res.ads \ + ada/sem_type.ads ada/sem_util.ads ada/sem_util.adb ada/sinfo.ads \ + ada/sinfo.adb ada/sinput.ads ada/snames.ads ada/stand.ads \ + ada/stringt.ads ada/style.ads ada/styleg.ads ada/styleg.adb \ + ada/styleg-c.ads ada/stylesw.ads ada/system.ads ada/s-crc32.ads \ + ada/s-exctab.ads ada/s-htable.ads ada/s-imgenu.ads ada/s-memory.ads \ + ada/s-parame.ads ada/s-rident.ads ada/s-secsta.ads ada/s-soflin.ads \ + ada/s-stache.ads ada/s-stalib.ads ada/s-stoele.ads ada/s-stoele.adb \ + ada/s-traent.ads ada/s-unstyp.ads ada/s-wchcon.ads ada/table.ads \ + ada/table.adb ada/targparm.ads ada/tbuild.ads ada/tbuild.adb \ + ada/tree_io.ads ada/ttypes.ads ada/types.ads ada/uintp.ads \ + ada/uintp.adb ada/uname.ads ada/unchconv.ads ada/unchdeal.ads \ + ada/urealp.ads ada/validsw.ads ada/widechar.ads ada/exp_dist.o : ada/ada.ads ada/a-except.ads ada/a-uncdea.ads \ ada/alloc.ads ada/atree.ads ada/atree.adb ada/casing.ads ada/debug.ads \ @@ -1839,18 +1843,19 @@ ada/exp_fixd.o : ada/ada.ads ada/a-except.ads ada/alloc.ads ada/atree.ads \ ada/erroutc.ads ada/eval_fat.ads ada/exp_fixd.ads ada/exp_fixd.adb \ ada/exp_tss.ads ada/exp_util.ads ada/gnat.ads ada/g-htable.ads \ ada/g-os_lib.ads ada/g-string.ads ada/gnatvsn.ads ada/hostparm.ads \ - ada/namet.ads ada/nlists.ads ada/nlists.adb ada/nmake.ads ada/nmake.adb \ - ada/opt.ads ada/output.ads ada/rtsfind.ads ada/sem.ads ada/sem_cat.ads \ - ada/sem_ch8.ads ada/sem_eval.ads ada/sem_eval.adb ada/sem_res.ads \ - ada/sem_type.ads ada/sem_util.ads ada/sem_warn.ads ada/sinfo.ads \ - ada/sinfo.adb ada/sinput.ads ada/snames.ads ada/stand.ads \ - ada/stringt.ads ada/stringt.adb ada/system.ads ada/s-exctab.ads \ - ada/s-htable.ads ada/s-imgenu.ads ada/s-memory.ads ada/s-parame.ads \ - ada/s-secsta.ads ada/s-soflin.ads ada/s-stache.ads ada/s-stalib.ads \ - ada/s-stoele.ads ada/s-stoele.adb ada/s-traent.ads ada/s-unstyp.ads \ - ada/s-wchcon.ads ada/table.ads ada/table.adb ada/tbuild.ads \ - ada/tree_io.ads ada/types.ads ada/uintp.ads ada/uintp.adb \ - ada/unchconv.ads ada/unchdeal.ads ada/urealp.ads ada/urealp.adb + ada/lib.ads ada/namet.ads ada/nlists.ads ada/nlists.adb ada/nmake.ads \ + ada/nmake.adb ada/opt.ads ada/output.ads ada/rtsfind.ads ada/sem.ads \ + ada/sem_cat.ads ada/sem_ch6.ads ada/sem_ch8.ads ada/sem_eval.ads \ + ada/sem_eval.adb ada/sem_res.ads ada/sem_type.ads ada/sem_util.ads \ + ada/sem_warn.ads ada/sinfo.ads ada/sinfo.adb ada/sinput.ads \ + ada/snames.ads ada/stand.ads ada/stringt.ads ada/stringt.adb \ + ada/system.ads ada/s-exctab.ads ada/s-htable.ads ada/s-imgenu.ads \ + ada/s-memory.ads ada/s-parame.ads ada/s-secsta.ads ada/s-soflin.ads \ + ada/s-stache.ads ada/s-stalib.ads ada/s-stoele.ads ada/s-stoele.adb \ + ada/s-traent.ads ada/s-unstyp.ads ada/s-wchcon.ads ada/table.ads \ + ada/table.adb ada/tbuild.ads ada/tree_io.ads ada/types.ads \ + ada/uintp.ads ada/uintp.adb ada/unchconv.ads ada/unchdeal.ads \ + ada/urealp.ads ada/urealp.adb ada/exp_imgv.o : ada/ada.ads ada/a-except.ads ada/alloc.ads ada/atree.ads \ ada/atree.adb ada/casing.ads ada/checks.ads ada/debug.ads ada/einfo.ads \ @@ -1871,33 +1876,29 @@ ada/exp_imgv.o : ada/ada.ads ada/a-except.ads ada/alloc.ads ada/atree.ads \ ada/unchdeal.ads ada/urealp.ads ada/exp_intr.o : ada/ada.ads ada/a-except.ads ada/alloc.ads ada/atree.ads \ - ada/atree.adb ada/casing.ads ada/checks.ads ada/csets.ads ada/debug.ads \ - ada/einfo.ads ada/einfo.adb ada/elists.ads ada/elists.adb \ - ada/err_vars.ads ada/errout.ads ada/erroutc.ads ada/exp_aggr.ads \ - ada/exp_ch11.ads ada/exp_ch4.ads ada/exp_ch7.ads ada/exp_code.ads \ - ada/exp_disp.ads ada/exp_fixd.ads ada/exp_intr.ads ada/exp_intr.adb \ - ada/exp_tss.ads ada/exp_util.ads ada/exp_util.adb ada/fname.ads \ - ada/fname-uf.ads ada/freeze.ads ada/get_targ.ads ada/gnat.ads \ - ada/g-htable.ads ada/g-os_lib.ads ada/g-string.ads ada/g-utf_32.ads \ - ada/gnatvsn.ads ada/hostparm.ads ada/inline.ads ada/interfac.ads \ - ada/itypes.ads ada/lib.ads ada/lib-xref.ads ada/namet.ads ada/namet.adb \ + ada/atree.adb ada/casing.ads ada/checks.ads ada/debug.ads ada/einfo.ads \ + ada/einfo.adb ada/elists.ads ada/elists.adb ada/err_vars.ads \ + ada/errout.ads ada/erroutc.ads ada/exp_aggr.ads ada/exp_ch11.ads \ + ada/exp_ch4.ads ada/exp_ch7.ads ada/exp_code.ads ada/exp_disp.ads \ + ada/exp_fixd.ads ada/exp_intr.ads ada/exp_intr.adb ada/exp_tss.ads \ + ada/exp_util.ads ada/exp_util.adb ada/fname.ads ada/fname-uf.ads \ + ada/freeze.ads ada/get_targ.ads ada/gnat.ads ada/g-htable.ads \ + ada/g-os_lib.ads ada/g-string.ads ada/gnatvsn.ads ada/hostparm.ads \ + ada/inline.ads ada/itypes.ads ada/lib.ads ada/namet.ads ada/namet.adb \ ada/nlists.ads ada/nlists.adb ada/nmake.ads ada/nmake.adb ada/opt.ads \ ada/output.ads ada/restrict.ads ada/restrict.adb ada/rident.ads \ - ada/rtsfind.ads ada/scans.ads ada/scn.ads ada/scng.ads ada/scng.adb \ - ada/sem.ads ada/sem_ch8.ads ada/sem_eval.ads ada/sem_res.ads \ - ada/sem_type.ads ada/sem_util.ads ada/sem_util.adb ada/sinfo.ads \ + ada/rtsfind.ads ada/sem.ads ada/sem_ch8.ads ada/sem_eval.ads \ + ada/sem_res.ads ada/sem_type.ads ada/sem_util.ads ada/sinfo.ads \ ada/sinfo.adb ada/sinput.ads ada/sinput.adb ada/snames.ads \ - ada/stand.ads ada/stringt.ads ada/style.ads ada/styleg.ads \ - ada/styleg.adb ada/styleg-c.ads ada/stylesw.ads ada/system.ads \ - ada/s-crc32.ads ada/s-exctab.ads ada/s-htable.ads ada/s-imgenu.ads \ - ada/s-memory.ads ada/s-parame.ads ada/s-rident.ads ada/s-secsta.ads \ - ada/s-soflin.ads ada/s-stache.ads ada/s-stalib.ads ada/s-stoele.ads \ - ada/s-stoele.adb ada/s-traent.ads ada/s-unstyp.ads ada/s-wchcon.ads \ - ada/table.ads ada/table.adb ada/targparm.ads ada/tbuild.ads \ - ada/tbuild.adb ada/tree_io.ads ada/ttypes.ads ada/types.ads \ - ada/uintp.ads ada/uintp.adb ada/uname.ads ada/unchconv.ads \ - ada/unchdeal.ads ada/urealp.ads ada/urealp.adb ada/validsw.ads \ - ada/widechar.ads + ada/stand.ads ada/stringt.ads ada/system.ads ada/s-exctab.ads \ + ada/s-htable.ads ada/s-imgenu.ads ada/s-memory.ads ada/s-parame.ads \ + ada/s-rident.ads ada/s-secsta.ads ada/s-soflin.ads ada/s-stache.ads \ + ada/s-stalib.ads ada/s-stoele.ads ada/s-stoele.adb ada/s-traent.ads \ + ada/s-unstyp.ads ada/s-wchcon.ads ada/table.ads ada/table.adb \ + ada/targparm.ads ada/tbuild.ads ada/tbuild.adb ada/tree_io.ads \ + ada/ttypes.ads ada/types.ads ada/uintp.ads ada/uintp.adb ada/uname.ads \ + ada/unchconv.ads ada/unchdeal.ads ada/urealp.ads ada/urealp.adb \ + ada/validsw.ads ada/widechar.ads ada/exp_pakd.o : ada/ada.ads ada/a-except.ads ada/alloc.ads ada/atree.ads \ ada/atree.adb ada/casing.ads ada/checks.ads ada/checks.adb \ @@ -1943,6 +1944,21 @@ ada/exp_prag.o : ada/ada.ads ada/a-except.ads ada/alloc.ads ada/atree.ads \ ada/uintp.ads ada/uintp.adb ada/unchconv.ads ada/unchdeal.ads \ ada/urealp.ads ada/widechar.ads +ada/exp_sel.o : ada/ada.ads ada/a-except.ads ada/alloc.ads ada/atree.ads \ + ada/atree.adb ada/casing.ads ada/debug.ads ada/einfo.ads ada/einfo.adb \ + ada/elists.ads ada/exp_sel.ads ada/exp_sel.adb ada/gnat.ads \ + ada/g-htable.ads ada/g-os_lib.ads ada/g-string.ads ada/gnatvsn.ads \ + ada/hostparm.ads ada/namet.ads ada/nlists.ads ada/nlists.adb \ + ada/nmake.ads ada/nmake.adb ada/opt.ads ada/output.ads ada/rtsfind.ads \ + ada/sinfo.ads ada/sinfo.adb ada/sinput.ads ada/snames.ads ada/stand.ads \ + ada/system.ads ada/s-exctab.ads ada/s-htable.ads ada/s-imgenu.ads \ + ada/s-memory.ads ada/s-parame.ads ada/s-secsta.ads ada/s-soflin.ads \ + ada/s-stache.ads ada/s-stalib.ads ada/s-stoele.ads ada/s-stoele.adb \ + ada/s-traent.ads ada/s-unstyp.ads ada/s-wchcon.ads ada/table.ads \ + ada/table.adb ada/tbuild.ads ada/tree_io.ads ada/types.ads \ + ada/uintp.ads ada/uintp.adb ada/unchconv.ads ada/unchdeal.ads \ + ada/urealp.ads + ada/exp_smem.o : ada/ada.ads ada/a-except.ads ada/alloc.ads ada/atree.ads \ ada/atree.adb ada/casing.ads ada/debug.ads ada/einfo.ads ada/einfo.adb \ ada/elists.ads ada/exp_smem.ads ada/exp_smem.adb ada/exp_tss.ads \ @@ -2006,17 +2022,17 @@ ada/exp_util.o : ada/ada.ads ada/a-except.ads ada/alloc.ads ada/atree.ads \ ada/lib.ads ada/lib.adb ada/lib-list.adb ada/lib-sort.adb ada/namet.ads \ ada/nlists.ads ada/nlists.adb ada/nmake.ads ada/nmake.adb ada/opt.ads \ ada/output.ads ada/restrict.ads ada/restrict.adb ada/rident.ads \ - ada/rtsfind.ads ada/sem.ads ada/sem_cat.ads ada/sem_ch8.ads \ - ada/sem_eval.ads ada/sem_eval.adb ada/sem_res.ads ada/sem_type.ads \ - ada/sem_util.ads ada/sem_warn.ads ada/sinfo.ads ada/sinfo.adb \ - ada/sinput.ads ada/snames.ads ada/stand.ads ada/stringt.ads \ - ada/stringt.adb ada/system.ads ada/s-exctab.ads ada/s-htable.ads \ - ada/s-imgenu.ads ada/s-memory.ads ada/s-parame.ads ada/s-rident.ads \ - ada/s-secsta.ads ada/s-soflin.ads ada/s-stache.ads ada/s-stalib.ads \ - ada/s-stoele.ads ada/s-stoele.adb ada/s-traent.ads ada/s-unstyp.ads \ - ada/s-wchcon.ads ada/table.ads ada/table.adb ada/targparm.ads \ - ada/tbuild.ads ada/tbuild.adb ada/tree_io.ads ada/ttypes.ads \ - ada/types.ads ada/uintp.ads ada/uintp.adb ada/uname.ads \ + ada/rtsfind.ads ada/sem.ads ada/sem_cat.ads ada/sem_ch6.ads \ + ada/sem_ch8.ads ada/sem_eval.ads ada/sem_eval.adb ada/sem_res.ads \ + ada/sem_type.ads ada/sem_util.ads ada/sem_warn.ads ada/sinfo.ads \ + ada/sinfo.adb ada/sinput.ads ada/snames.ads ada/stand.ads \ + ada/stringt.ads ada/stringt.adb ada/system.ads ada/s-exctab.ads \ + ada/s-htable.ads ada/s-imgenu.ads ada/s-memory.ads ada/s-parame.ads \ + ada/s-rident.ads ada/s-secsta.ads ada/s-soflin.ads ada/s-stache.ads \ + ada/s-stalib.ads ada/s-stoele.ads ada/s-stoele.adb ada/s-traent.ads \ + ada/s-unstyp.ads ada/s-wchcon.ads ada/table.ads ada/table.adb \ + ada/targparm.ads ada/tbuild.ads ada/tbuild.adb ada/tree_io.ads \ + ada/ttypes.ads ada/types.ads ada/uintp.ads ada/uintp.adb ada/uname.ads \ ada/unchconv.ads ada/unchdeal.ads ada/urealp.ads ada/urealp.adb \ ada/validsw.ads @@ -2213,11 +2229,13 @@ ada/gnatbind.o : ada/ada.ads ada/a-except.ads ada/ali.ads ada/ali-util.ads \ ada/gnatvsn.o : ada/gnatvsn.ads ada/gnatvsn.adb ada/system.ads \ ada/s-secsta.ads ada/s-stoele.ads ada/s-stoele.adb ada/unchconv.ads -ada/hlo.o : ada/hlo.ads ada/hlo.adb ada/output.ads ada/system.ads \ - ada/s-exctab.ads ada/s-stalib.ads ada/s-unstyp.ads ada/types.ads \ - ada/unchconv.ads ada/unchdeal.ads +ada/hlo.o : ada/hlo.ads ada/hlo.adb ada/hostparm.ads ada/output.ads \ + ada/system.ads ada/s-exctab.ads ada/s-stalib.ads ada/s-unstyp.ads \ + ada/types.ads ada/unchconv.ads ada/unchdeal.ads -ada/hostparm.o : ada/hostparm.ads ada/system.ads +ada/hostparm.o : ada/hostparm.ads ada/system.ads ada/s-exctab.ads \ + ada/s-stalib.ads ada/s-unstyp.ads ada/types.ads ada/unchconv.ads \ + ada/unchdeal.ads ada/impunit.o : ada/ada.ads ada/a-except.ads ada/alloc.ads ada/atree.ads \ ada/atree.adb ada/casing.ads ada/debug.ads ada/einfo.ads ada/einfo.adb \ @@ -2271,23 +2289,25 @@ ada/itypes.o : ada/ada.ads ada/a-except.ads ada/alloc.ads ada/atree.ads \ ada/unchconv.ads ada/unchdeal.ads ada/urealp.ads ada/krunch.o : ada/hostparm.ads ada/krunch.ads ada/krunch.adb \ - ada/system.ads ada/s-stoele.ads ada/s-stoele.adb ada/unchconv.ads + ada/system.ads ada/s-exctab.ads ada/s-stalib.ads ada/s-stoele.ads \ + ada/s-stoele.adb ada/s-unstyp.ads ada/types.ads ada/unchconv.ads \ + ada/unchdeal.ads -ada/layout.o : ada/ada.ads ada/a-except.ads ada/alloc.ads ada/atree.ads \ - ada/atree.adb ada/casing.ads ada/checks.ads ada/csets.ads ada/debug.ads \ - ada/einfo.ads ada/einfo.adb ada/elists.ads ada/err_vars.ads \ - ada/errout.ads ada/erroutc.ads ada/exp_ch3.ads ada/exp_tss.ads \ - ada/exp_util.ads ada/fname.ads ada/freeze.ads ada/get_targ.ads \ - ada/gnat.ads ada/g-htable.ads ada/g-os_lib.ads ada/g-string.ads \ - ada/g-utf_32.ads ada/gnatvsn.ads ada/hostparm.ads ada/interfac.ads \ - ada/layout.ads ada/layout.adb ada/lib.ads ada/lib-xref.ads \ - ada/namet.ads ada/namet.adb ada/nlists.ads ada/nlists.adb ada/nmake.ads \ - ada/nmake.adb ada/opt.ads ada/output.ads ada/repinfo.ads \ - ada/repinfo.adb ada/restrict.ads ada/rident.ads ada/rtsfind.ads \ - ada/scans.ads ada/scn.ads ada/scng.ads ada/scng.adb ada/sem.ads \ - ada/sem_ch13.ads ada/sem_ch8.ads ada/sem_eval.ads ada/sem_res.ads \ - ada/sem_type.ads ada/sem_util.ads ada/sem_util.adb ada/sinfo.ads \ - ada/sinfo.adb ada/sinput.ads ada/snames.ads ada/stand.ads \ +ada/layout.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads ada/alloc.ads \ + ada/atree.ads ada/atree.adb ada/casing.ads ada/checks.ads ada/csets.ads \ + ada/debug.ads ada/einfo.ads ada/einfo.adb ada/elists.ads \ + ada/err_vars.ads ada/errout.ads ada/erroutc.ads ada/exp_ch3.ads \ + ada/exp_tss.ads ada/exp_util.ads ada/fname.ads ada/freeze.ads \ + ada/get_targ.ads ada/gnat.ads ada/g-htable.ads ada/g-os_lib.ads \ + ada/g-string.ads ada/g-utf_32.ads ada/gnatvsn.ads ada/hostparm.ads \ + ada/interfac.ads ada/layout.ads ada/layout.adb ada/lib.ads \ + ada/lib-xref.ads ada/namet.ads ada/namet.adb ada/nlists.ads \ + ada/nlists.adb ada/nmake.ads ada/nmake.adb ada/opt.ads ada/output.ads \ + ada/repinfo.ads ada/repinfo.adb ada/restrict.ads ada/rident.ads \ + ada/rtsfind.ads ada/scans.ads ada/scn.ads ada/scng.ads ada/scng.adb \ + ada/sem.ads ada/sem_ch13.ads ada/sem_ch8.ads ada/sem_eval.ads \ + ada/sem_res.ads ada/sem_type.ads ada/sem_util.ads ada/sem_util.adb \ + ada/sinfo.ads ada/sinfo.adb ada/sinput.ads ada/snames.ads ada/stand.ads \ ada/stringt.ads ada/style.ads ada/styleg.ads ada/styleg.adb \ ada/styleg-c.ads ada/stylesw.ads ada/system.ads ada/s-crc32.ads \ ada/s-exctab.ads ada/s-htable.ads ada/s-imgenu.ads ada/s-memory.ads \ @@ -2456,12 +2476,13 @@ ada/opt.o : ada/ada.ads ada/a-except.ads ada/gnat.ads ada/g-os_lib.ads \ ada/osint-b.o : ada/ada.ads ada/a-except.ads ada/alloc.ads ada/debug.ads \ ada/gnat.ads ada/g-os_lib.ads ada/g-string.ads ada/gnatvsn.ads \ ada/hostparm.ads ada/namet.ads ada/opt.ads ada/osint.ads \ - ada/osint-b.ads ada/osint-b.adb ada/output.ads ada/system.ads \ - ada/s-exctab.ads ada/s-memory.ads ada/s-parame.ads ada/s-secsta.ads \ - ada/s-soflin.ads ada/s-stache.ads ada/s-stalib.ads ada/s-stoele.ads \ - ada/s-stoele.adb ada/s-traent.ads ada/s-unstyp.ads ada/s-wchcon.ads \ - ada/table.ads ada/table.adb ada/tree_io.ads ada/types.ads \ - ada/unchconv.ads ada/unchdeal.ads + ada/osint-b.ads ada/osint-b.adb ada/output.ads ada/rident.ads \ + ada/system.ads ada/s-exctab.ads ada/s-memory.ads ada/s-parame.ads \ + ada/s-rident.ads ada/s-secsta.ads ada/s-soflin.ads ada/s-stache.ads \ + ada/s-stalib.ads ada/s-stoele.ads ada/s-stoele.adb ada/s-traent.ads \ + ada/s-unstyp.ads ada/s-wchcon.ads ada/table.ads ada/table.adb \ + ada/targparm.ads ada/tree_io.ads ada/types.ads ada/unchconv.ads \ + ada/unchdeal.ads ada/osint-c.o : ada/ada.ads ada/a-except.ads ada/alloc.ads ada/debug.ads \ ada/gnat.ads ada/g-os_lib.ads ada/g-string.ads ada/gnatvsn.ads \ @@ -2477,19 +2498,19 @@ ada/osint.o : ada/ada.ads ada/a-except.ads ada/a-uncdea.ads ada/alloc.ads \ ada/debug.ads ada/fmap.ads ada/gnat.ads ada/g-htable.ads \ ada/g-os_lib.ads ada/g-string.ads ada/gnatvsn.ads ada/hostparm.ads \ ada/namet.ads ada/namet.adb ada/opt.ads ada/osint.ads ada/osint.adb \ - ada/output.ads ada/sdefault.ads ada/system.ads ada/s-casuti.ads \ - ada/s-exctab.ads ada/s-htable.ads ada/s-htable.adb ada/s-memory.ads \ - ada/s-parame.ads ada/s-secsta.ads ada/s-soflin.ads ada/s-stache.ads \ - ada/s-stalib.ads ada/s-stoele.ads ada/s-stoele.adb ada/s-strops.ads \ - ada/s-sopco3.ads ada/s-sopco4.ads ada/s-sopco5.ads ada/s-traent.ads \ - ada/s-unstyp.ads ada/s-wchcon.ads ada/table.ads ada/table.adb \ - ada/tree_io.ads ada/types.ads ada/unchconv.ads ada/unchdeal.ads \ - ada/widechar.ads + ada/output.ads ada/rident.ads ada/sdefault.ads ada/system.ads \ + ada/s-casuti.ads ada/s-exctab.ads ada/s-htable.ads ada/s-htable.adb \ + ada/s-memory.ads ada/s-parame.ads ada/s-rident.ads ada/s-secsta.ads \ + ada/s-soflin.ads ada/s-stache.ads ada/s-stalib.ads ada/s-stoele.ads \ + ada/s-stoele.adb ada/s-strops.ads ada/s-sopco3.ads ada/s-sopco4.ads \ + ada/s-sopco5.ads ada/s-traent.ads ada/s-unstyp.ads ada/s-wchcon.ads \ + ada/table.ads ada/table.adb ada/targparm.ads ada/tree_io.ads \ + ada/types.ads ada/unchconv.ads ada/unchdeal.ads ada/widechar.ads ada/output.o : ada/gnat.ads ada/g-os_lib.ads ada/g-string.ads \ - ada/output.ads ada/output.adb ada/system.ads ada/s-exctab.ads \ - ada/s-stalib.ads ada/s-unstyp.ads ada/types.ads ada/unchconv.ads \ - ada/unchdeal.ads + ada/hostparm.ads ada/output.ads ada/output.adb ada/system.ads \ + ada/s-exctab.ads ada/s-stalib.ads ada/s-unstyp.ads ada/types.ads \ + ada/unchconv.ads ada/unchdeal.ads ada/par.o : ada/ada.ads ada/a-except.ads ada/alloc.ads ada/atree.ads \ ada/atree.adb ada/casing.ads ada/csets.ads ada/debug.ads ada/einfo.ads \ @@ -2552,22 +2573,22 @@ ada/prepcomp.o : ada/ada.ads ada/a-except.ads ada/a-uncdea.ads \ ada/table.ads ada/table.adb ada/tree_io.ads ada/types.ads ada/uintp.ads \ ada/unchconv.ads ada/unchdeal.ads ada/urealp.ads ada/widechar.ads -ada/repinfo.o : ada/ada.ads ada/a-except.ads ada/alloc.ads ada/atree.ads \ - ada/atree.adb ada/casing.ads ada/debug.ads ada/einfo.ads ada/einfo.adb \ - ada/elists.ads ada/fname.ads ada/gnat.ads ada/g-hesora.ads \ - ada/g-htable.ads ada/g-os_lib.ads ada/g-string.ads ada/gnatvsn.ads \ - ada/hostparm.ads ada/lib.ads ada/lib.adb ada/lib-list.adb \ - ada/lib-sort.adb ada/namet.ads ada/nlists.ads ada/nlists.adb \ - ada/opt.ads ada/output.ads ada/output.adb ada/repinfo.ads \ - ada/repinfo.adb ada/sinfo.ads ada/sinfo.adb ada/sinput.ads \ - ada/sinput.adb ada/snames.ads ada/stand.ads ada/stringt.ads \ - ada/system.ads ada/s-exctab.ads ada/s-htable.ads ada/s-imgenu.ads \ - ada/s-memory.ads ada/s-parame.ads ada/s-secsta.ads ada/s-soflin.ads \ - ada/s-stache.ads ada/s-stalib.ads ada/s-stoele.ads ada/s-stoele.adb \ - ada/s-traent.ads ada/s-unstyp.ads ada/s-wchcon.ads ada/table.ads \ - ada/table.adb ada/tree_io.ads ada/types.ads ada/uintp.ads ada/uintp.adb \ - ada/uname.ads ada/unchconv.ads ada/unchdeal.ads ada/urealp.ads \ - ada/widechar.ads +ada/repinfo.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \ + ada/alloc.ads ada/atree.ads ada/atree.adb ada/casing.ads ada/debug.ads \ + ada/einfo.ads ada/einfo.adb ada/elists.ads ada/fname.ads ada/gnat.ads \ + ada/g-hesora.ads ada/g-htable.ads ada/g-os_lib.ads ada/g-string.ads \ + ada/gnatvsn.ads ada/hostparm.ads ada/lib.ads ada/lib.adb \ + ada/lib-list.adb ada/lib-sort.adb ada/namet.ads ada/nlists.ads \ + ada/nlists.adb ada/opt.ads ada/output.ads ada/output.adb \ + ada/repinfo.ads ada/repinfo.adb ada/sinfo.ads ada/sinfo.adb \ + ada/sinput.ads ada/sinput.adb ada/snames.ads ada/stand.ads \ + ada/stringt.ads ada/system.ads ada/s-exctab.ads ada/s-htable.ads \ + ada/s-imgenu.ads ada/s-memory.ads ada/s-parame.ads ada/s-secsta.ads \ + ada/s-soflin.ads ada/s-stache.ads ada/s-stalib.ads ada/s-stoele.ads \ + ada/s-stoele.adb ada/s-traent.ads ada/s-unstyp.ads ada/s-wchcon.ads \ + ada/table.ads ada/table.adb ada/tree_io.ads ada/types.ads ada/uintp.ads \ + ada/uintp.adb ada/uname.ads ada/unchconv.ads ada/unchdeal.ads \ + ada/urealp.ads ada/widechar.ads ada/restrict.o : ada/ada.ads ada/a-except.ads ada/alloc.ads ada/atree.ads \ ada/atree.adb ada/casing.ads ada/debug.ads ada/einfo.ads ada/einfo.adb \ @@ -2702,7 +2723,7 @@ ada/s-unstyp.o : ada/system.ads ada/s-unstyp.ads ada/s-wchcnv.o : ada/interfac.ads ada/system.ads ada/s-wchcnv.ads \ ada/s-wchcnv.adb ada/s-wchcon.ads ada/s-wchjis.ads -ada/s-wchcon.o : ada/system.ads ada/s-wchcon.ads +ada/s-wchcon.o : ada/system.ads ada/s-wchcon.ads ada/s-wchjis.o : ada/system.ads ada/s-wchjis.ads ada/s-wchjis.adb @@ -2783,19 +2804,19 @@ ada/sem_aggr.o : ada/ada.ads ada/a-except.ads ada/alloc.ads ada/atree.ads \ ada/nmake.adb ada/opt.ads ada/output.ads ada/restrict.ads \ ada/rident.ads ada/rtsfind.ads ada/scans.ads ada/scn.ads ada/scng.ads \ ada/scng.adb ada/sem.ads ada/sem_aggr.ads ada/sem_aggr.adb \ - ada/sem_cat.ads ada/sem_ch13.ads ada/sem_ch3.ads ada/sem_ch8.ads \ - ada/sem_eval.ads ada/sem_eval.adb ada/sem_res.ads ada/sem_type.ads \ - ada/sem_util.ads ada/sem_util.adb ada/sem_warn.ads ada/sinfo.ads \ - ada/sinfo.adb ada/sinput.ads ada/snames.ads ada/sprint.ads \ - ada/stand.ads ada/stringt.ads ada/stringt.adb ada/style.ads \ - ada/styleg.ads ada/styleg.adb ada/styleg-c.ads ada/stylesw.ads \ - ada/system.ads ada/s-crc32.ads ada/s-exctab.ads ada/s-htable.ads \ - ada/s-imgenu.ads ada/s-memory.ads ada/s-parame.ads ada/s-rident.ads \ - ada/s-secsta.ads ada/s-soflin.ads ada/s-stache.ads ada/s-stalib.ads \ - ada/s-stoele.ads ada/s-stoele.adb ada/s-traent.ads ada/s-unstyp.ads \ - ada/s-wchcon.ads ada/table.ads ada/table.adb ada/targparm.ads \ - ada/tbuild.ads ada/tbuild.adb ada/tree_io.ads ada/ttypes.ads \ - ada/types.ads ada/uintp.ads ada/uintp.adb ada/uname.ads \ + ada/sem_cat.ads ada/sem_ch13.ads ada/sem_ch3.ads ada/sem_ch6.ads \ + ada/sem_ch8.ads ada/sem_eval.ads ada/sem_eval.adb ada/sem_res.ads \ + ada/sem_type.ads ada/sem_util.ads ada/sem_util.adb ada/sem_warn.ads \ + ada/sinfo.ads ada/sinfo.adb ada/sinput.ads ada/snames.ads \ + ada/sprint.ads ada/stand.ads ada/stringt.ads ada/stringt.adb \ + ada/style.ads ada/styleg.ads ada/styleg.adb ada/styleg-c.ads \ + ada/stylesw.ads ada/system.ads ada/s-crc32.ads ada/s-exctab.ads \ + ada/s-htable.ads ada/s-imgenu.ads ada/s-memory.ads ada/s-parame.ads \ + ada/s-rident.ads ada/s-secsta.ads ada/s-soflin.ads ada/s-stache.ads \ + ada/s-stalib.ads ada/s-stoele.ads ada/s-stoele.adb ada/s-traent.ads \ + ada/s-unstyp.ads ada/s-wchcon.ads ada/table.ads ada/table.adb \ + ada/targparm.ads ada/tbuild.ads ada/tbuild.adb ada/tree_io.ads \ + ada/ttypes.ads ada/types.ads ada/uintp.ads ada/uintp.adb ada/uname.ads \ ada/unchconv.ads ada/unchdeal.ads ada/urealp.ads ada/validsw.ads \ ada/widechar.ads @@ -2923,24 +2944,25 @@ ada/sem_ch12.o : ada/ada.ads ada/a-except.ads ada/a-uncdea.ads \ ada/lib-load.ads ada/lib-sort.adb ada/lib-xref.ads ada/namet.ads \ ada/namet.adb ada/nlists.ads ada/nlists.adb ada/nmake.ads ada/nmake.adb \ ada/opt.ads ada/output.ads ada/restrict.ads ada/rident.ads \ - ada/rtsfind.ads ada/scans.ads ada/scn.ads ada/scng.ads ada/scng.adb \ - ada/sem.ads ada/sem_cat.ads ada/sem_ch10.ads ada/sem_ch12.ads \ - ada/sem_ch12.adb ada/sem_ch13.ads ada/sem_ch3.ads ada/sem_ch6.ads \ - ada/sem_ch7.ads ada/sem_ch8.ads ada/sem_disp.ads ada/sem_elab.ads \ - ada/sem_elim.ads ada/sem_eval.ads ada/sem_res.ads ada/sem_type.ads \ - ada/sem_util.ads ada/sem_util.adb ada/sem_warn.ads ada/sinfo.ads \ - ada/sinfo.adb ada/sinfo-cn.ads ada/sinput.ads ada/sinput-l.ads \ - ada/snames.ads ada/stand.ads ada/stringt.ads ada/style.ads \ - ada/styleg.ads ada/styleg.adb ada/styleg-c.ads ada/stylesw.ads \ - ada/system.ads ada/s-crc32.ads ada/s-exctab.ads ada/s-exctab.adb \ - ada/s-htable.ads ada/s-htable.adb ada/s-imgenu.ads ada/s-memory.ads \ - ada/s-parame.ads ada/s-rident.ads ada/s-secsta.ads ada/s-soflin.ads \ - ada/s-stache.ads ada/s-stalib.ads ada/s-stoele.ads ada/s-stoele.adb \ - ada/s-traent.ads ada/s-unstyp.ads ada/s-wchcon.ads ada/table.ads \ - ada/table.adb ada/targparm.ads ada/tbuild.ads ada/tbuild.adb \ - ada/tree_io.ads ada/ttypes.ads ada/types.ads ada/uintp.ads \ - ada/uintp.adb ada/uname.ads ada/unchconv.ads ada/unchdeal.ads \ - ada/urealp.ads ada/urealp.adb ada/widechar.ads + ada/rtsfind.ads ada/rtsfind.adb ada/scans.ads ada/scn.ads ada/scng.ads \ + ada/scng.adb ada/sem.ads ada/sem_cat.ads ada/sem_ch10.ads \ + ada/sem_ch12.ads ada/sem_ch12.adb ada/sem_ch13.ads ada/sem_ch3.ads \ + ada/sem_ch6.ads ada/sem_ch7.ads ada/sem_ch8.ads ada/sem_disp.ads \ + ada/sem_dist.ads ada/sem_elab.ads ada/sem_elim.ads ada/sem_eval.ads \ + ada/sem_res.ads ada/sem_type.ads ada/sem_util.ads ada/sem_util.adb \ + ada/sem_warn.ads ada/sinfo.ads ada/sinfo.adb ada/sinfo-cn.ads \ + ada/sinput.ads ada/sinput-l.ads ada/snames.ads ada/stand.ads \ + ada/stringt.ads ada/style.ads ada/styleg.ads ada/styleg.adb \ + ada/styleg-c.ads ada/stylesw.ads ada/system.ads ada/s-crc32.ads \ + ada/s-exctab.ads ada/s-exctab.adb ada/s-htable.ads ada/s-htable.adb \ + ada/s-imgenu.ads ada/s-memory.ads ada/s-parame.ads ada/s-rident.ads \ + ada/s-secsta.ads ada/s-soflin.ads ada/s-stache.ads ada/s-stalib.ads \ + ada/s-stoele.ads ada/s-stoele.adb ada/s-traent.ads ada/s-unstyp.ads \ + ada/s-wchcon.ads ada/table.ads ada/table.adb ada/targparm.ads \ + ada/tbuild.ads ada/tbuild.adb ada/tree_io.ads ada/ttypes.ads \ + ada/types.ads ada/uintp.ads ada/uintp.adb ada/uname.ads \ + ada/unchconv.ads ada/unchdeal.ads ada/urealp.ads ada/urealp.adb \ + ada/widechar.ads ada/sem_ch13.o : ada/ada.ads ada/a-except.ads ada/alloc.ads ada/atree.ads \ ada/atree.adb ada/casing.ads ada/checks.ads ada/debug.ads ada/einfo.ads \ @@ -3058,19 +3080,19 @@ ada/sem_ch5.o : ada/ada.ads ada/a-except.ads ada/alloc.ads ada/atree.ads \ ada/opt.ads ada/output.ads ada/restrict.ads ada/rident.ads \ ada/rtsfind.ads ada/scans.ads ada/scn.ads ada/scng.ads ada/scng.adb \ ada/sem.ads ada/sem_case.ads ada/sem_case.adb ada/sem_cat.ads \ - ada/sem_ch3.ads ada/sem_ch5.ads ada/sem_ch5.adb ada/sem_ch8.ads \ - ada/sem_disp.ads ada/sem_eval.ads ada/sem_eval.adb ada/sem_res.ads \ - ada/sem_type.ads ada/sem_util.ads ada/sem_util.adb ada/sem_warn.ads \ - ada/sinfo.ads ada/sinfo.adb ada/sinput.ads ada/snames.ads \ - ada/sprint.ads ada/stand.ads ada/stringt.ads ada/stringt.adb \ - ada/style.ads ada/styleg.ads ada/styleg.adb ada/styleg-c.ads \ - ada/stylesw.ads ada/system.ads ada/s-crc32.ads ada/s-exctab.ads \ - ada/s-htable.ads ada/s-imgenu.ads ada/s-memory.ads ada/s-parame.ads \ - ada/s-rident.ads ada/s-secsta.ads ada/s-soflin.ads ada/s-stache.ads \ - ada/s-stalib.ads ada/s-stoele.ads ada/s-stoele.adb ada/s-traent.ads \ - ada/s-unstyp.ads ada/s-wchcon.ads ada/table.ads ada/table.adb \ - ada/targparm.ads ada/tbuild.ads ada/tree_io.ads ada/ttypes.ads \ - ada/types.ads ada/uintp.ads ada/uintp.adb ada/uname.ads \ + ada/sem_ch3.ads ada/sem_ch5.ads ada/sem_ch5.adb ada/sem_ch6.ads \ + ada/sem_ch8.ads ada/sem_disp.ads ada/sem_eval.ads ada/sem_eval.adb \ + ada/sem_res.ads ada/sem_type.ads ada/sem_util.ads ada/sem_util.adb \ + ada/sem_warn.ads ada/sinfo.ads ada/sinfo.adb ada/sinput.ads \ + ada/snames.ads ada/sprint.ads ada/stand.ads ada/stringt.ads \ + ada/stringt.adb ada/style.ads ada/styleg.ads ada/styleg.adb \ + ada/styleg-c.ads ada/stylesw.ads ada/system.ads ada/s-crc32.ads \ + ada/s-exctab.ads ada/s-htable.ads ada/s-imgenu.ads ada/s-memory.ads \ + ada/s-parame.ads ada/s-rident.ads ada/s-secsta.ads ada/s-soflin.ads \ + ada/s-stache.ads ada/s-stalib.ads ada/s-stoele.ads ada/s-stoele.adb \ + ada/s-traent.ads ada/s-unstyp.ads ada/s-wchcon.ads ada/table.ads \ + ada/table.adb ada/targparm.ads ada/tbuild.ads ada/tree_io.ads \ + ada/ttypes.ads ada/types.ads ada/uintp.ads ada/uintp.adb ada/uname.ads \ ada/unchconv.ads ada/unchdeal.ads ada/urealp.ads ada/validsw.ads \ ada/widechar.ads @@ -3116,21 +3138,21 @@ ada/sem_ch7.o : ada/ada.ads ada/a-except.ads ada/alloc.ads ada/atree.ads \ ada/lib.ads ada/lib.adb ada/lib-list.adb ada/lib-sort.adb \ ada/lib-xref.ads ada/namet.ads ada/namet.adb ada/nlists.ads \ ada/nlists.adb ada/nmake.ads ada/nmake.adb ada/opt.ads ada/output.ads \ - ada/rident.ads ada/rtsfind.ads ada/scans.ads ada/scn.ads ada/scng.ads \ - ada/scng.adb ada/sem.ads ada/sem_cat.ads ada/sem_ch10.ads \ - ada/sem_ch12.ads ada/sem_ch3.ads ada/sem_ch6.ads ada/sem_ch7.ads \ - ada/sem_ch7.adb ada/sem_ch8.ads ada/sem_eval.ads ada/sem_res.ads \ - ada/sem_type.ads ada/sem_util.ads ada/sem_util.adb ada/sem_warn.ads \ - ada/sinfo.ads ada/sinfo.adb ada/sinput.ads ada/sinput.adb \ - ada/snames.ads ada/snames.adb ada/stand.ads ada/stringt.ads \ - ada/style.ads ada/styleg.ads ada/styleg.adb ada/styleg-c.ads \ - ada/stylesw.ads ada/system.ads ada/s-crc32.ads ada/s-exctab.ads \ - ada/s-htable.ads ada/s-imgenu.ads ada/s-memory.ads ada/s-parame.ads \ - ada/s-rident.ads ada/s-secsta.ads ada/s-soflin.ads ada/s-stache.ads \ - ada/s-stalib.ads ada/s-stoele.ads ada/s-stoele.adb ada/s-traent.ads \ - ada/s-unstyp.ads ada/s-wchcon.ads ada/table.ads ada/table.adb \ - ada/targparm.ads ada/tbuild.ads ada/tree_io.ads ada/ttypes.ads \ - ada/types.ads ada/uintp.ads ada/uintp.adb ada/uname.ads \ + ada/restrict.ads ada/rident.ads ada/rtsfind.ads ada/scans.ads \ + ada/scn.ads ada/scng.ads ada/scng.adb ada/sem.ads ada/sem_cat.ads \ + ada/sem_ch10.ads ada/sem_ch12.ads ada/sem_ch3.ads ada/sem_ch6.ads \ + ada/sem_ch7.ads ada/sem_ch7.adb ada/sem_ch8.ads ada/sem_eval.ads \ + ada/sem_res.ads ada/sem_type.ads ada/sem_util.ads ada/sem_util.adb \ + ada/sem_warn.ads ada/sinfo.ads ada/sinfo.adb ada/sinput.ads \ + ada/sinput.adb ada/snames.ads ada/snames.adb ada/stand.ads \ + ada/stringt.ads ada/style.ads ada/styleg.ads ada/styleg.adb \ + ada/styleg-c.ads ada/stylesw.ads ada/system.ads ada/s-crc32.ads \ + ada/s-exctab.ads ada/s-htable.ads ada/s-imgenu.ads ada/s-memory.ads \ + ada/s-parame.ads ada/s-rident.ads ada/s-secsta.ads ada/s-soflin.ads \ + ada/s-stache.ads ada/s-stalib.ads ada/s-stoele.ads ada/s-stoele.adb \ + ada/s-traent.ads ada/s-unstyp.ads ada/s-wchcon.ads ada/table.ads \ + ada/table.adb ada/targparm.ads ada/tbuild.ads ada/tree_io.ads \ + ada/ttypes.ads ada/types.ads ada/uintp.ads ada/uintp.adb ada/uname.ads \ ada/unchconv.ads ada/unchdeal.ads ada/urealp.ads ada/widechar.ads ada/sem_ch8.o : ada/ada.ads ada/a-except.ads ada/alloc.ads ada/atree.ads \ @@ -3205,21 +3227,21 @@ ada/sem_disp.o : ada/ada.ads ada/a-except.ads ada/alloc.ads ada/atree.ads \ ada/g-os_lib.ads ada/g-string.ads ada/g-utf_32.ads ada/gnatvsn.ads \ ada/hostparm.ads ada/interfac.ads ada/lib.ads ada/lib-xref.ads \ ada/namet.ads ada/namet.adb ada/nlists.ads ada/nlists.adb ada/nmake.ads \ - ada/nmake.adb ada/opt.ads ada/output.ads ada/rident.ads ada/rtsfind.ads \ - ada/scans.ads ada/scn.ads ada/scng.ads ada/scng.adb ada/sem.ads \ - ada/sem_ch6.ads ada/sem_ch8.ads ada/sem_disp.ads ada/sem_disp.adb \ - ada/sem_eval.ads ada/sem_res.ads ada/sem_type.ads ada/sem_util.ads \ - ada/sem_util.adb ada/sinfo.ads ada/sinfo.adb ada/sinput.ads \ - ada/snames.ads ada/stand.ads ada/stringt.ads ada/style.ads \ - ada/styleg.ads ada/styleg.adb ada/styleg-c.ads ada/stylesw.ads \ - ada/system.ads ada/s-crc32.ads ada/s-exctab.ads ada/s-htable.ads \ - ada/s-imgenu.ads ada/s-memory.ads ada/s-parame.ads ada/s-rident.ads \ - ada/s-secsta.ads ada/s-soflin.ads ada/s-stache.ads ada/s-stalib.ads \ - ada/s-stoele.ads ada/s-stoele.adb ada/s-traent.ads ada/s-unstyp.ads \ - ada/s-wchcon.ads ada/table.ads ada/table.adb ada/targparm.ads \ - ada/tbuild.ads ada/tree_io.ads ada/ttypes.ads ada/types.ads \ - ada/uintp.ads ada/uintp.adb ada/uname.ads ada/unchconv.ads \ - ada/unchdeal.ads ada/urealp.ads ada/widechar.ads + ada/nmake.adb ada/opt.ads ada/output.ads ada/restrict.ads \ + ada/rident.ads ada/rtsfind.ads ada/scans.ads ada/scn.ads ada/scng.ads \ + ada/scng.adb ada/sem.ads ada/sem_ch6.ads ada/sem_ch8.ads \ + ada/sem_disp.ads ada/sem_disp.adb ada/sem_eval.ads ada/sem_res.ads \ + ada/sem_type.ads ada/sem_util.ads ada/sem_util.adb ada/sinfo.ads \ + ada/sinfo.adb ada/sinput.ads ada/snames.ads ada/stand.ads \ + ada/stringt.ads ada/style.ads ada/styleg.ads ada/styleg.adb \ + ada/styleg-c.ads ada/stylesw.ads ada/system.ads ada/s-crc32.ads \ + ada/s-exctab.ads ada/s-htable.ads ada/s-imgenu.ads ada/s-memory.ads \ + ada/s-parame.ads ada/s-rident.ads ada/s-secsta.ads ada/s-soflin.ads \ + ada/s-stache.ads ada/s-stalib.ads ada/s-stoele.ads ada/s-stoele.adb \ + ada/s-traent.ads ada/s-unstyp.ads ada/s-wchcon.ads ada/table.ads \ + ada/table.adb ada/targparm.ads ada/tbuild.ads ada/tree_io.ads \ + ada/ttypes.ads ada/types.ads ada/uintp.ads ada/uintp.adb ada/uname.ads \ + ada/unchconv.ads ada/unchdeal.ads ada/urealp.ads ada/widechar.ads ada/sem_dist.o : ada/ada.ads ada/a-except.ads ada/alloc.ads ada/atree.ads \ ada/atree.adb ada/casing.ads ada/debug.ads ada/einfo.ads ada/einfo.adb \ @@ -3454,19 +3476,19 @@ ada/sem_type.o : ada/ada.ads ada/a-except.ads ada/alloc.ads ada/atree.ads \ ada/interfac.ads ada/lib.ads ada/lib.adb ada/lib-list.adb \ ada/lib-sort.adb ada/lib-xref.ads ada/namet.ads ada/namet.adb \ ada/nlists.ads ada/nlists.adb ada/nmake.ads ada/opt.ads ada/output.ads \ - ada/rident.ads ada/rtsfind.ads ada/scans.ads ada/scn.ads ada/scng.ads \ - ada/scng.adb ada/sem.ads ada/sem_ch6.ads ada/sem_ch8.ads \ - ada/sem_eval.ads ada/sem_res.ads ada/sem_type.ads ada/sem_type.adb \ - ada/sem_util.ads ada/sem_util.adb ada/sinfo.ads ada/sinfo.adb \ - ada/sinput.ads ada/snames.ads ada/stand.ads ada/stringt.ads \ - ada/style.ads ada/styleg.ads ada/styleg.adb ada/styleg-c.ads \ - ada/stylesw.ads ada/system.ads ada/s-crc32.ads ada/s-exctab.ads \ - ada/s-htable.ads ada/s-imgenu.ads ada/s-memory.ads ada/s-parame.ads \ - ada/s-rident.ads ada/s-secsta.ads ada/s-soflin.ads ada/s-stache.ads \ - ada/s-stalib.ads ada/s-stoele.ads ada/s-stoele.adb ada/s-traent.ads \ - ada/s-unstyp.ads ada/s-wchcon.ads ada/table.ads ada/table.adb \ - ada/targparm.ads ada/tbuild.ads ada/tree_io.ads ada/ttypes.ads \ - ada/types.ads ada/uintp.ads ada/uintp.adb ada/uname.ads \ + ada/restrict.ads ada/rident.ads ada/rtsfind.ads ada/scans.ads \ + ada/scn.ads ada/scng.ads ada/scng.adb ada/sem.ads ada/sem_ch6.ads \ + ada/sem_ch8.ads ada/sem_eval.ads ada/sem_res.ads ada/sem_type.ads \ + ada/sem_type.adb ada/sem_util.ads ada/sem_util.adb ada/sinfo.ads \ + ada/sinfo.adb ada/sinput.ads ada/snames.ads ada/stand.ads \ + ada/stringt.ads ada/style.ads ada/styleg.ads ada/styleg.adb \ + ada/styleg-c.ads ada/stylesw.ads ada/system.ads ada/s-crc32.ads \ + ada/s-exctab.ads ada/s-htable.ads ada/s-imgenu.ads ada/s-memory.ads \ + ada/s-parame.ads ada/s-rident.ads ada/s-secsta.ads ada/s-soflin.ads \ + ada/s-stache.ads ada/s-stalib.ads ada/s-stoele.ads ada/s-stoele.adb \ + ada/s-traent.ads ada/s-unstyp.ads ada/s-wchcon.ads ada/table.ads \ + ada/table.adb ada/targparm.ads ada/tbuild.ads ada/tree_io.ads \ + ada/ttypes.ads ada/types.ads ada/uintp.ads ada/uintp.adb ada/uname.ads \ ada/unchconv.ads ada/unchdeal.ads ada/urealp.ads ada/widechar.ads ada/sem_util.o : ada/ada.ads ada/a-except.ads ada/alloc.ads ada/atree.ads \ @@ -3482,20 +3504,20 @@ ada/sem_util.o : ada/ada.ads ada/a-except.ads ada/alloc.ads ada/atree.ads \ ada/nlists.ads ada/nlists.adb ada/nmake.ads ada/nmake.adb ada/opt.ads \ ada/output.ads ada/restrict.ads ada/rident.ads ada/rtsfind.ads \ ada/rtsfind.adb ada/scans.ads ada/scn.ads ada/scng.ads ada/scng.adb \ - ada/sem.ads ada/sem_cat.ads ada/sem_ch7.ads ada/sem_ch8.ads \ - ada/sem_dist.ads ada/sem_eval.ads ada/sem_eval.adb ada/sem_res.ads \ - ada/sem_type.ads ada/sem_util.ads ada/sem_util.adb ada/sem_warn.ads \ - ada/sinfo.ads ada/sinfo.adb ada/sinput.ads ada/sinput.adb \ - ada/snames.ads ada/stand.ads ada/stringt.ads ada/stringt.adb \ - ada/style.ads ada/styleg.ads ada/styleg.adb ada/styleg-c.ads \ - ada/stylesw.ads ada/system.ads ada/s-carun8.ads ada/s-crc32.ads \ - ada/s-crc32.adb ada/s-exctab.ads ada/s-htable.ads ada/s-imgenu.ads \ - ada/s-memory.ads ada/s-parame.ads ada/s-rident.ads ada/s-secsta.ads \ - ada/s-soflin.ads ada/s-stache.ads ada/s-stalib.ads ada/s-stoele.ads \ - ada/s-stoele.adb ada/s-traent.ads ada/s-unstyp.ads ada/s-wchcon.ads \ - ada/table.ads ada/table.adb ada/targparm.ads ada/tbuild.ads \ - ada/tbuild.adb ada/tree_io.ads ada/ttypes.ads ada/types.ads \ - ada/types.adb ada/uintp.ads ada/uintp.adb ada/uname.ads \ + ada/sem.ads ada/sem_cat.ads ada/sem_ch6.ads ada/sem_ch7.ads \ + ada/sem_ch8.ads ada/sem_dist.ads ada/sem_eval.ads ada/sem_eval.adb \ + ada/sem_res.ads ada/sem_type.ads ada/sem_util.ads ada/sem_util.adb \ + ada/sem_warn.ads ada/sinfo.ads ada/sinfo.adb ada/sinput.ads \ + ada/sinput.adb ada/snames.ads ada/stand.ads ada/stringt.ads \ + ada/stringt.adb ada/style.ads ada/styleg.ads ada/styleg.adb \ + ada/styleg-c.ads ada/stylesw.ads ada/system.ads ada/s-carun8.ads \ + ada/s-crc32.ads ada/s-crc32.adb ada/s-exctab.ads ada/s-htable.ads \ + ada/s-imgenu.ads ada/s-memory.ads ada/s-parame.ads ada/s-rident.ads \ + ada/s-secsta.ads ada/s-soflin.ads ada/s-stache.ads ada/s-stalib.ads \ + ada/s-stoele.ads ada/s-stoele.adb ada/s-traent.ads ada/s-unstyp.ads \ + ada/s-wchcon.ads ada/table.ads ada/table.adb ada/targparm.ads \ + ada/tbuild.ads ada/tbuild.adb ada/tree_io.ads ada/ttypes.ads \ + ada/types.ads ada/types.adb ada/uintp.ads ada/uintp.adb ada/uname.ads \ ada/unchconv.ads ada/unchdeal.ads ada/urealp.ads ada/urealp.adb \ ada/widechar.ads @@ -3523,21 +3545,22 @@ ada/sem_warn.o : ada/ada.ads ada/a-except.ads ada/alloc.ads ada/atree.ads \ ada/g-utf_32.ads ada/gnatvsn.ads ada/hostparm.ads ada/interfac.ads \ ada/lib.ads ada/lib.adb ada/lib-list.adb ada/lib-sort.adb \ ada/lib-xref.ads ada/namet.ads ada/namet.adb ada/nlists.ads \ - ada/nlists.adb ada/nmake.ads ada/opt.ads ada/output.ads ada/rident.ads \ - ada/rtsfind.ads ada/scans.ads ada/scn.ads ada/scng.ads ada/scng.adb \ - ada/sem.ads ada/sem_ch8.ads ada/sem_eval.ads ada/sem_res.ads \ - ada/sem_type.ads ada/sem_util.ads ada/sem_util.adb ada/sem_warn.ads \ - ada/sem_warn.adb ada/sinfo.ads ada/sinfo.adb ada/sinput.ads \ - ada/sinput.adb ada/snames.ads ada/stand.ads ada/stringt.ads \ - ada/style.ads ada/styleg.ads ada/styleg.adb ada/styleg-c.ads \ - ada/stylesw.ads ada/system.ads ada/s-crc32.ads ada/s-exctab.ads \ - ada/s-htable.ads ada/s-imgenu.ads ada/s-memory.ads ada/s-parame.ads \ - ada/s-rident.ads ada/s-secsta.ads ada/s-soflin.ads ada/s-stache.ads \ - ada/s-stalib.ads ada/s-stoele.ads ada/s-stoele.adb ada/s-traent.ads \ - ada/s-unstyp.ads ada/s-wchcon.ads ada/table.ads ada/table.adb \ - ada/targparm.ads ada/tbuild.ads ada/tree_io.ads ada/ttypes.ads \ - ada/types.ads ada/uintp.ads ada/uintp.adb ada/uname.ads \ - ada/unchconv.ads ada/unchdeal.ads ada/urealp.ads ada/widechar.ads + ada/nlists.adb ada/nmake.ads ada/opt.ads ada/output.ads \ + ada/restrict.ads ada/rident.ads ada/rtsfind.ads ada/scans.ads \ + ada/scn.ads ada/scng.ads ada/scng.adb ada/sem.ads ada/sem_ch8.ads \ + ada/sem_eval.ads ada/sem_res.ads ada/sem_type.ads ada/sem_util.ads \ + ada/sem_util.adb ada/sem_warn.ads ada/sem_warn.adb ada/sinfo.ads \ + ada/sinfo.adb ada/sinput.ads ada/sinput.adb ada/snames.ads \ + ada/stand.ads ada/stringt.ads ada/style.ads ada/styleg.ads \ + ada/styleg.adb ada/styleg-c.ads ada/stylesw.ads ada/system.ads \ + ada/s-crc32.ads ada/s-exctab.ads ada/s-htable.ads ada/s-imgenu.ads \ + ada/s-memory.ads ada/s-parame.ads ada/s-rident.ads ada/s-secsta.ads \ + ada/s-soflin.ads ada/s-stache.ads ada/s-stalib.ads ada/s-stoele.ads \ + ada/s-stoele.adb ada/s-traent.ads ada/s-unstyp.ads ada/s-wchcon.ads \ + ada/table.ads ada/table.adb ada/targparm.ads ada/tbuild.ads \ + ada/tree_io.ads ada/ttypes.ads ada/types.ads ada/uintp.ads \ + ada/uintp.adb ada/uname.ads ada/unchconv.ads ada/unchdeal.ads \ + ada/urealp.ads ada/widechar.ads ada/sinfo-cn.o : ada/ada.ads ada/a-except.ads ada/alloc.ads ada/atree.ads \ ada/atree.adb ada/casing.ads ada/debug.ads ada/einfo.ads ada/elists.ads \ @@ -3615,11 +3638,12 @@ ada/sinput.o : ada/ada.ads ada/a-except.ads ada/alloc.ads ada/casing.ads \ ada/snames.o : ada/ada.ads ada/a-except.ads ada/alloc.ads ada/debug.ads \ ada/gnat.ads ada/g-os_lib.ads ada/g-string.ads ada/gnatvsn.ads \ - ada/hostparm.ads ada/namet.ads ada/opt.ads ada/output.ads \ + ada/hostparm.ads ada/namet.ads ada/namet.adb ada/opt.ads ada/output.ads \ ada/snames.ads ada/snames.adb ada/system.ads ada/s-exctab.ads \ - ada/s-memory.ads ada/s-parame.ads ada/s-stalib.ads ada/s-traent.ads \ - ada/s-unstyp.ads ada/s-wchcon.ads ada/table.ads ada/table.adb \ - ada/tree_io.ads ada/types.ads ada/unchconv.ads ada/unchdeal.ads + ada/s-memory.ads ada/s-parame.ads ada/s-secsta.ads ada/s-stalib.ads \ + ada/s-stoele.ads ada/s-stoele.adb ada/s-traent.ads ada/s-unstyp.ads \ + ada/s-wchcon.ads ada/table.ads ada/table.adb ada/tree_io.ads \ + ada/types.ads ada/unchconv.ads ada/unchdeal.ads ada/widechar.ads ada/sprint.o : ada/ada.ads ada/a-except.ads ada/alloc.ads ada/atree.ads \ ada/atree.adb ada/casing.ads ada/csets.ads ada/debug.ads ada/einfo.ads \ @@ -3695,32 +3719,30 @@ ada/styleg.o : ada/ada.ads ada/a-except.ads ada/alloc.ads ada/casing.ads \ ada/stylesw.o : ada/gnat.ads ada/g-string.ads ada/gnatvsn.ads \ ada/hostparm.ads ada/opt.ads ada/stylesw.ads ada/stylesw.adb \ + ada/system.ads ada/s-exctab.ads ada/s-stalib.ads ada/s-stoele.ads \ + ada/s-stoele.adb ada/s-unstyp.ads ada/s-wchcon.ads ada/types.ads \ + ada/unchconv.ads ada/unchdeal.ads + +ada/switch-b.o : ada/debug.ads ada/gnat.ads ada/g-os_lib.ads \ + ada/g-string.ads ada/gnatvsn.ads ada/hostparm.ads ada/opt.ads \ + ada/osint.ads ada/switch.ads ada/switch-b.ads ada/switch-b.adb \ ada/system.ads ada/s-exctab.ads ada/s-stalib.ads ada/s-unstyp.ads \ ada/s-wchcon.ads ada/types.ads ada/unchconv.ads ada/unchdeal.ads -ada/switch-b.o : ada/ada.ads ada/a-except.ads ada/debug.ads ada/gnat.ads \ - ada/g-os_lib.ads ada/g-string.ads ada/gnatvsn.ads ada/hostparm.ads \ - ada/opt.ads ada/osint.ads ada/switch.ads ada/switch-b.ads \ - ada/switch-b.adb ada/system.ads ada/s-exctab.ads ada/s-parame.ads \ - ada/s-soflin.ads ada/s-stache.ads ada/s-stalib.ads ada/s-stoele.ads \ - ada/s-stoele.adb ada/s-traent.ads ada/s-unstyp.ads ada/s-wchcon.ads \ - ada/types.ads ada/unchconv.ads ada/unchdeal.ads - ada/switch-c.o : ada/ada.ads ada/a-except.ads ada/alloc.ads ada/debug.ads \ ada/gnat.ads ada/g-os_lib.ads ada/g-string.ads ada/gnatvsn.ads \ ada/hostparm.ads ada/lib.ads ada/opt.ads ada/osint.ads ada/output.ads \ - ada/prepcomp.ads ada/stylesw.ads ada/switch.ads ada/switch-c.ads \ - ada/switch-c.adb ada/system.ads ada/s-exctab.ads ada/s-memory.ads \ - ada/s-parame.ads ada/s-soflin.ads ada/s-stache.ads ada/s-stalib.ads \ - ada/s-stoele.ads ada/s-stoele.adb ada/s-traent.ads ada/s-unstyp.ads \ - ada/s-wchcon.ads ada/table.ads ada/table.adb ada/tree_io.ads \ - ada/types.ads ada/unchconv.ads ada/unchdeal.ads ada/validsw.ads + ada/prepcomp.ads ada/sem_warn.ads ada/stylesw.ads ada/switch.ads \ + ada/switch-c.ads ada/switch-c.adb ada/system.ads ada/s-exctab.ads \ + ada/s-memory.ads ada/s-parame.ads ada/s-stalib.ads ada/s-stoele.ads \ + ada/s-stoele.adb ada/s-traent.ads ada/s-unstyp.ads ada/s-wchcon.ads \ + ada/table.ads ada/table.adb ada/tree_io.ads ada/types.ads \ + ada/unchconv.ads ada/unchdeal.ads ada/validsw.ads -ada/switch.o : ada/ada.ads ada/a-except.ads ada/switch.ads ada/switch.adb \ - ada/system.ads ada/s-exctab.ads ada/s-exctab.adb ada/s-htable.ads \ - ada/s-parame.ads ada/s-soflin.ads ada/s-stache.ads ada/s-stalib.ads \ - ada/s-stoele.ads ada/s-stoele.adb ada/s-traent.ads ada/s-unstyp.ads \ - ada/types.ads ada/unchconv.ads ada/unchdeal.ads +ada/switch.o : ada/gnat.ads ada/g-os_lib.ads ada/g-string.ads \ + ada/osint.ads ada/switch.ads ada/switch.adb ada/system.ads \ + ada/s-exctab.ads ada/s-stalib.ads ada/s-unstyp.ads ada/types.ads \ + ada/unchconv.ads ada/unchdeal.ads ada/system.o : ada/system.ads @@ -3772,11 +3794,12 @@ ada/tree_gen.o : ada/ada.ads ada/a-except.ads ada/alloc.ads ada/atree.ads \ ada/unchconv.ads ada/unchdeal.ads ada/urealp.ads ada/tree_io.o : ada/ada.ads ada/a-except.ads ada/debug.ads ada/gnat.ads \ - ada/g-os_lib.ads ada/g-string.ads ada/output.ads ada/system.ads \ - ada/s-exctab.ads ada/s-exctab.adb ada/s-htable.ads ada/s-parame.ads \ - ada/s-soflin.ads ada/s-stache.ads ada/s-stalib.ads ada/s-stoele.ads \ - ada/s-stoele.adb ada/s-traent.ads ada/s-unstyp.ads ada/tree_io.ads \ - ada/tree_io.adb ada/types.ads ada/unchconv.ads ada/unchdeal.ads + ada/g-os_lib.ads ada/g-string.ads ada/hostparm.ads ada/output.ads \ + ada/system.ads ada/s-exctab.ads ada/s-exctab.adb ada/s-htable.ads \ + ada/s-parame.ads ada/s-soflin.ads ada/s-stache.ads ada/s-stalib.ads \ + ada/s-stoele.ads ada/s-stoele.adb ada/s-traent.ads ada/s-unstyp.ads \ + ada/tree_io.ads ada/tree_io.adb ada/types.ads ada/unchconv.ads \ + ada/unchdeal.ads ada/treepr.o : ada/ada.ads ada/a-except.ads ada/alloc.ads ada/atree.ads \ ada/atree.adb ada/casing.ads ada/csets.ads ada/debug.ads ada/einfo.ads \ diff --git a/gcc/ada/Makefile.in b/gcc/ada/Makefile.in index 2d7224056fe..771e94989c0 100644 --- a/gcc/ada/Makefile.in +++ b/gcc/ada/Makefile.in @@ -247,7 +247,7 @@ LIBS = $(LIBINTL) $(LIBIBERTY) $(SYSLIBS) LIBDEPS = $(LIBINTL_DEP) $(LIBIBERTY) # Default is no TGT_LIB; one might be passed down or something TGT_LIB = -TOOLS_LIBS = $(LIBGNAT) $(EXTRA_GNATTOOLS_OBJS) link.o ../../../libiberty/libiberty.a $(SYSLIBS) $(TGT_LIB) +TOOLS_LIBS = $(EXTRA_GNATTOOLS_OBJS) targext.o link.o $(LIBGNAT) ../../../libiberty/libiberty.a $(SYSLIBS) $(TGT_LIB) # Specify the directories to be searched for header files. # Both . and srcdir are used, in that order, @@ -296,10 +296,11 @@ Makefile: ../config.status $(srcdir)/Makefile.in $(srcdir)/../version.c # Lists of files for various purposes. GNATLINK_OBJS = gnatlink.o \ - a-except.o ali.o alloc.o butil.o casing.o csets.o debug.o fmap.o fname.o gnatvsn.o \ - hostparm.o indepsw.o interfac.o i-c.o i-cstrin.o namet.o opt.o osint.o output.o rident.o \ - s-exctab.o s-secsta.o s-stalib.o s-stoele.o sdefault.o stylesw.o switch.o system.o \ - table.o tree_io.o types.o validsw.o widechar.o + a-except.o ali.o alloc.o butil.o casing.o csets.o debug.o fmap.o fname.o \ + gnatvsn.o hostparm.o indepsw.o interfac.o i-c.o i-cstrin.o namet.o opt.o \ + osint.o output.o rident.o s-exctab.o s-secsta.o s-stalib.o s-stoele.o \ + sdefault.o snames.o stylesw.o switch.o system.o table.o targparm.o tree_io.o \ + types.o validsw.o widechar.o GNATMAKE_OBJS = a-except.o ctrl_c.o ali.o ali-util.o s-casuti.o \ alloc.o atree.o binderr.o butil.o casing.o csets.o debug.o elists.o einfo.o\ @@ -595,6 +596,56 @@ ifeq ($(strip $(filter-out mips% wrs vx%,$(targ))),) EXTRA_GNATRTL_TASKING_OBJS=s-vxwork.o endif +# vxworksae / vxworks 653 +ifeq ($(strip $(filter-out powerpc% wrs vxworksae,$(targ))),) + # target pairs for kernel + vthreads runtime + LIBGNAT_TARGET_PAIRS = \ + a-elchha.adb= 2); + pragma Assert (Container.Length >= 2); - if Target.Busy > 0 then + if Container.Busy > 0 then raise Program_Error; end if; if Before.Node = null then - pragma Assert (Position.Node /= Target.Last); + pragma Assert (Position.Node /= Container.Last); - if Position.Node = Target.First then - Target.First := Position.Node.Next; - Target.First.Prev := null; + if Position.Node = Container.First then + Container.First := Position.Node.Next; + Container.First.Prev := null; else Position.Node.Prev.Next := Position.Node.Next; Position.Node.Next.Prev := Position.Node.Prev; end if; - Target.Last.Next := Position.Node; - Position.Node.Prev := Target.Last; + Container.Last.Next := Position.Node; + Position.Node.Prev := Container.Last; - Target.Last := Position.Node; - Target.Last.Next := null; + Container.Last := Position.Node; + Container.Last.Next := null; return; end if; - if Before.Node = Target.First then - pragma Assert (Position.Node /= Target.First); + if Before.Node = Container.First then + pragma Assert (Position.Node /= Container.First); - if Position.Node = Target.Last then - Target.Last := Position.Node.Prev; - Target.Last.Next := null; + if Position.Node = Container.Last then + Container.Last := Position.Node.Prev; + Container.Last.Next := null; else Position.Node.Prev.Next := Position.Node.Next; Position.Node.Next.Prev := Position.Node.Prev; end if; - Target.First.Prev := Position.Node; - Position.Node.Next := Target.First; + Container.First.Prev := Position.Node; + Position.Node.Next := Container.First; - Target.First := Position.Node; - Target.First.Prev := null; + Container.First := Position.Node; + Container.First.Prev := null; return; end if; - if Position.Node = Target.First then - Target.First := Position.Node.Next; - Target.First.Prev := null; + if Position.Node = Container.First then + Container.First := Position.Node.Next; + Container.First.Prev := null; - elsif Position.Node = Target.Last then - Target.Last := Position.Node.Prev; - Target.Last.Next := null; + elsif Position.Node = Container.Last then + Container.Last := Position.Node.Prev; + Container.Last.Next := null; else Position.Node.Prev.Next := Position.Node.Next; @@ -1383,8 +1391,8 @@ package body Ada.Containers.Doubly_Linked_Lists is Before.Node.Prev := Position.Node; Position.Node.Next := Before.Node; - pragma Assert (Target.First.Prev = null); - pragma Assert (Target.Last.Next = null); + pragma Assert (Container.First.Prev = null); + pragma Assert (Container.Last.Next = null); end Splice; procedure Splice @@ -1570,24 +1578,26 @@ package body Ada.Containers.Doubly_Linked_Lists is declare I_Next : constant Cursor := Next (I); + J_Copy : Cursor := J; begin if I_Next = J then - Splice (Container, Before => I, Position => J); + Splice (Container, Before => I, Position => J_Copy); else declare J_Next : constant Cursor := Next (J); + I_Copy : Cursor := I; begin if J_Next = I then - Splice (Container, Before => J, Position => I); + Splice (Container, Before => J, Position => I_Copy); else pragma Assert (Container.Length >= 3); - Splice (Container, Before => I_Next, Position => J); - Splice (Container, Before => J_Next, Position => I); + Splice (Container, Before => I_Next, Position => J_Copy); + Splice (Container, Before => J_Next, Position => I_Copy); end if; end; end if; diff --git a/gcc/ada/a-cdlili.ads b/gcc/ada/a-cdlili.ads index 3682104cba9..41f8606079b 100644 --- a/gcc/ada/a-cdlili.ads +++ b/gcc/ada/a-cdlili.ads @@ -145,9 +145,9 @@ package Ada.Containers.Doubly_Linked_Lists is Position : in out Cursor); procedure Splice - (Target : in out List; - Before : Cursor; - Position : Cursor); + (Container : in out List; + Before : Cursor; + Position : in out Cursor); function First (Container : List) return Cursor; diff --git a/gcc/ada/a-cidlli.adb b/gcc/ada/a-cidlli.adb index 46d94449b03..0752f9fa09c 100644 --- a/gcc/ada/a-cidlli.adb +++ b/gcc/ada/a-cidlli.adb @@ -514,11 +514,19 @@ package body Ada.Containers.Indefinite_Doubly_Linked_Lists is LI := First (Target); RI := First (Source); while RI.Node /= null loop + pragma Assert (RI.Node.Next = null + or else not (RI.Node.Next.Element.all < + RI.Node.Element.all)); + if LI.Node = null then Splice (Target, No_Element, Source); return; end if; + pragma Assert (LI.Node.Next = null + or else not (LI.Node.Next.Element.all < + LI.Node.Element.all)); + if RI.Node.Element.all < LI.Node.Element.all then declare RJ : Cursor := RI; @@ -1333,13 +1341,13 @@ package body Ada.Containers.Indefinite_Doubly_Linked_Lists is end Splice; procedure Splice - (Target : in out List; - Before : Cursor; - Position : Cursor) + (Container : in out List; + Before : Cursor; + Position : in out Cursor) is begin if Before.Container /= null then - if Before.Container /= Target'Unchecked_Access then + if Before.Container /= Container'Unchecked_Access then raise Program_Error; end if; @@ -1360,7 +1368,7 @@ package body Ada.Containers.Indefinite_Doubly_Linked_Lists is raise Program_Error; end if; - if Position.Container /= Target'Unrestricted_Access then + if Position.Container /= Container'Unrestricted_Access then raise Program_Error; end if; @@ -1372,59 +1380,59 @@ package body Ada.Containers.Indefinite_Doubly_Linked_Lists is return; end if; - pragma Assert (Target.Length >= 2); + pragma Assert (Container.Length >= 2); - if Target.Busy > 0 then + if Container.Busy > 0 then raise Program_Error; end if; if Before.Node = null then - pragma Assert (Position.Node /= Target.Last); + pragma Assert (Position.Node /= Container.Last); - if Position.Node = Target.First then - Target.First := Position.Node.Next; - Target.First.Prev := null; + if Position.Node = Container.First then + Container.First := Position.Node.Next; + Container.First.Prev := null; else Position.Node.Prev.Next := Position.Node.Next; Position.Node.Next.Prev := Position.Node.Prev; end if; - Target.Last.Next := Position.Node; - Position.Node.Prev := Target.Last; + Container.Last.Next := Position.Node; + Position.Node.Prev := Container.Last; - Target.Last := Position.Node; - Target.Last.Next := null; + Container.Last := Position.Node; + Container.Last.Next := null; return; end if; - if Before.Node = Target.First then - pragma Assert (Position.Node /= Target.First); + if Before.Node = Container.First then + pragma Assert (Position.Node /= Container.First); - if Position.Node = Target.Last then - Target.Last := Position.Node.Prev; - Target.Last.Next := null; + if Position.Node = Container.Last then + Container.Last := Position.Node.Prev; + Container.Last.Next := null; else Position.Node.Prev.Next := Position.Node.Next; Position.Node.Next.Prev := Position.Node.Prev; end if; - Target.First.Prev := Position.Node; - Position.Node.Next := Target.First; + Container.First.Prev := Position.Node; + Position.Node.Next := Container.First; - Target.First := Position.Node; - Target.First.Prev := null; + Container.First := Position.Node; + Container.First.Prev := null; return; end if; - if Position.Node = Target.First then - Target.First := Position.Node.Next; - Target.First.Prev := null; + if Position.Node = Container.First then + Container.First := Position.Node.Next; + Container.First.Prev := null; - elsif Position.Node = Target.Last then - Target.Last := Position.Node.Prev; - Target.Last.Next := null; + elsif Position.Node = Container.Last then + Container.Last := Position.Node.Prev; + Container.Last.Next := null; else Position.Node.Prev.Next := Position.Node.Next; @@ -1437,8 +1445,8 @@ package body Ada.Containers.Indefinite_Doubly_Linked_Lists is Before.Node.Prev := Position.Node; Position.Node.Next := Before.Node; - pragma Assert (Target.First.Prev = null); - pragma Assert (Target.Last.Next = null); + pragma Assert (Container.First.Prev = null); + pragma Assert (Container.Last.Next = null); end Splice; procedure Splice @@ -1631,23 +1639,26 @@ package body Ada.Containers.Indefinite_Doubly_Linked_Lists is declare I_Next : constant Cursor := Next (I); + J_Copy : Cursor := J; begin if I_Next = J then - Splice (Container, Before => I, Position => J); + Splice (Container, Before => I, Position => J_Copy); else declare J_Next : constant Cursor := Next (J); + I_Copy : Cursor := I; + begin if J_Next = I then - Splice (Container, Before => J, Position => I); + Splice (Container, Before => J, Position => I_Copy); else pragma Assert (Container.Length >= 3); - Splice (Container, Before => I_Next, Position => J); - Splice (Container, Before => J_Next, Position => I); + Splice (Container, Before => I_Next, Position => J_Copy); + Splice (Container, Before => J_Next, Position => I_Copy); end if; end; end if; diff --git a/gcc/ada/a-cidlli.ads b/gcc/ada/a-cidlli.ads index 9e2d2351268..e6fbf7694cf 100644 --- a/gcc/ada/a-cidlli.ads +++ b/gcc/ada/a-cidlli.ads @@ -136,9 +136,9 @@ package Ada.Containers.Indefinite_Doubly_Linked_Lists is Position : in out Cursor); procedure Splice - (Target : in out List; - Before : Cursor; - Position : Cursor); + (Container : in out List; + Before : Cursor; + Position : in out Cursor); function First (Container : List) return Cursor; diff --git a/gcc/ada/a-cihama.adb b/gcc/ada/a-cihama.adb index 3836f7eb035..3a78e8eab0d 100644 --- a/gcc/ada/a-cihama.adb +++ b/gcc/ada/a-cihama.adb @@ -237,6 +237,10 @@ package body Ada.Containers.Indefinite_Hashed_Maps is raise Constraint_Error; end if; + if Position.Node.Element = null then + raise Program_Error; + end if; + return Position.Node.Element.all; end Element; @@ -267,6 +271,12 @@ package body Ada.Containers.Indefinite_Hashed_Maps is raise Constraint_Error; end if; + if Left.Node.Key = null + or else Right.Node.Key = null + then + raise Program_Error; + end if; + return Equivalent_Keys (Left.Node.Key.all, Right.Node.Key.all); end Equivalent_Keys; @@ -281,6 +291,10 @@ package body Ada.Containers.Indefinite_Hashed_Maps is raise Constraint_Error; end if; + if Left.Node.Key = null then + raise Program_Error; + end if; + return Equivalent_Keys (Left.Node.Key.all, Right); end Equivalent_Keys; @@ -295,6 +309,10 @@ package body Ada.Containers.Indefinite_Hashed_Maps is raise Constraint_Error; end if; + if Right.Node.Key = null then + raise Program_Error; + end if; + return Equivalent_Keys (Left, Right.Node.Key.all); end Equivalent_Keys; @@ -595,6 +613,10 @@ package body Ada.Containers.Indefinite_Hashed_Maps is raise Constraint_Error; end if; + if Position.Node.Key = null then + raise Program_Error; + end if; + return Position.Node.Key.all; end Key; @@ -641,6 +663,12 @@ package body Ada.Containers.Indefinite_Hashed_Maps is return No_Element; end if; + if Position.Node.Key = null + or else Position.Node.Element = null + then + raise Program_Error; + end if; + declare HT : Hash_Table_Type renames Position.Container.HT; Node : constant Node_Access := HT_Ops.Next (HT, Position.Node); @@ -670,6 +698,12 @@ package body Ada.Containers.Indefinite_Hashed_Maps is raise Constraint_Error; end if; + if Position.Node.Key = null + or else Position.Node.Element = null + then + raise Program_Error; + end if; + declare M : Map renames Position.Container.all; HT : Hash_Table_Type renames M.HT'Unrestricted_Access.all; @@ -807,6 +841,12 @@ package body Ada.Containers.Indefinite_Hashed_Maps is raise Constraint_Error; end if; + if Position.Node.Key = null + or else Position.Node.Element = null + then + raise Program_Error; + end if; + if Position.Container /= Container'Unrestricted_Access then raise Program_Error; end if; @@ -862,6 +902,12 @@ package body Ada.Containers.Indefinite_Hashed_Maps is raise Constraint_Error; end if; + if Position.Node.Key = null + or else Position.Node.Element = null + then + raise Program_Error; + end if; + if Position.Container /= Container'Unrestricted_Access then raise Program_Error; end if; diff --git a/gcc/ada/a-ciorma.adb b/gcc/ada/a-ciorma.adb index 256304281a8..fda5c3971de 100644 --- a/gcc/ada/a-ciorma.adb +++ b/gcc/ada/a-ciorma.adb @@ -135,23 +135,27 @@ package body Ada.Containers.Indefinite_Ordered_Maps is function "<" (Left, Right : Cursor) return Boolean is begin - if Left.Node = null - or else Right.Node = null - then - raise Constraint_Error; + if Left.Node = null then + raise Constraint_Error with "Left cursor of ""<"" equals No_Element"; end if; - if Left.Node.Key = null - or else Right.Node.Key = null - then - raise Program_Error; + if Right.Node = null then + raise Constraint_Error with "Right cursor of ""<"" equals No_Element"; + end if; + + if Left.Node.Key = null then + raise Program_Error with "Left cursor in ""<"" is bad"; + end if; + + if Right.Node.Key = null then + raise Program_Error with "Right cursor in ""<"" is bad"; end if; pragma Assert (Vet (Left.Container.Tree, Left.Node), - "bad Left cursor in ""<"""); + "Left cursor in ""<"" is bad"); pragma Assert (Vet (Right.Container.Tree, Right.Node), - "bad Right cursor in ""<"""); + "Right cursor in ""<"" is bad"); return Left.Node.Key.all < Right.Node.Key.all; end "<"; @@ -159,15 +163,15 @@ package body Ada.Containers.Indefinite_Ordered_Maps is function "<" (Left : Cursor; Right : Key_Type) return Boolean is begin if Left.Node = null then - raise Constraint_Error; + raise Constraint_Error with "Left cursor of ""<"" equals No_Element"; end if; if Left.Node.Key = null then - raise Program_Error; + raise Program_Error with "Left cursor in ""<"" is bad"; end if; pragma Assert (Vet (Left.Container.Tree, Left.Node), - "bad Left cursor in ""<"""); + "Left cursor in ""<"" is bad"); return Left.Node.Key.all < Right; end "<"; @@ -175,15 +179,15 @@ package body Ada.Containers.Indefinite_Ordered_Maps is function "<" (Left : Key_Type; Right : Cursor) return Boolean is begin if Right.Node = null then - raise Constraint_Error; + raise Constraint_Error with "Right cursor of ""<"" equals No_Element"; end if; if Right.Node.Key = null then - raise Program_Error; + raise Program_Error with "Right cursor in ""<"" is bad"; end if; pragma Assert (Vet (Right.Container.Tree, Right.Node), - "bad Right cursor in ""<"""); + "Right cursor in ""<"" is bad"); return Left < Right.Node.Key.all; end "<"; @@ -203,23 +207,27 @@ package body Ada.Containers.Indefinite_Ordered_Maps is function ">" (Left, Right : Cursor) return Boolean is begin - if Left.Node = null - or else Right.Node = null - then - raise Constraint_Error; + if Left.Node = null then + raise Constraint_Error with "Left cursor of "">"" equals No_Element"; end if; - if Left.Node.Key = null - or else Right.Node.Key = null - then - raise Program_Error; + if Right.Node = null then + raise Constraint_Error with "Right cursor of "">"" equals No_Element"; + end if; + + if Left.Node.Key = null then + raise Program_Error with "Left cursor in ""<"" is bad"; + end if; + + if Right.Node.Key = null then + raise Program_Error with "Right cursor in ""<"" is bad"; end if; pragma Assert (Vet (Left.Container.Tree, Left.Node), - "bad Left cursor in "">"""); + "Left cursor in "">"" is bad"); pragma Assert (Vet (Right.Container.Tree, Right.Node), - "bad Right cursor in "">"""); + "Right cursor in "">"" is bad"); return Right.Node.Key.all < Left.Node.Key.all; end ">"; @@ -227,15 +235,15 @@ package body Ada.Containers.Indefinite_Ordered_Maps is function ">" (Left : Cursor; Right : Key_Type) return Boolean is begin if Left.Node = null then - raise Constraint_Error; + raise Constraint_Error with "Left cursor of "">"" equals No_Element"; end if; if Left.Node.Key = null then - raise Program_Error; + raise Program_Error with "Left cursor in ""<"" is bad"; end if; pragma Assert (Vet (Left.Container.Tree, Left.Node), - "bad Left cursor in "">"""); + "Left cursor in "">"" is bad"); return Right < Left.Node.Key.all; end ">"; @@ -243,15 +251,15 @@ package body Ada.Containers.Indefinite_Ordered_Maps is function ">" (Left : Key_Type; Right : Cursor) return Boolean is begin if Right.Node = null then - raise Constraint_Error; + raise Constraint_Error with "Right cursor of "">"" equals No_Element"; end if; if Right.Node.Key = null then - raise Program_Error; + raise Program_Error with "Right cursor in ""<"" is bad"; end if; pragma Assert (Vet (Right.Container.Tree, Right.Node), - "bad Right cursor in "">"""); + "Right cursor in "">"" is bad"); return Right.Node.Key.all < Left; end ">"; @@ -346,21 +354,23 @@ package body Ada.Containers.Indefinite_Ordered_Maps is is begin if Position.Node = null then - raise Constraint_Error; + raise Constraint_Error with + "Position cursor of Delete equals No_Element"; end if; if Position.Node.Key = null or else Position.Node.Element = null then - raise Program_Error; + raise Program_Error with "Position cursor of Delete is bad"; end if; if Position.Container /= Container'Unrestricted_Access then - raise Program_Error; + raise Program_Error with + "Position cursor of Delete designates wrong map"; end if; pragma Assert (Vet (Container.Tree, Position.Node), - "bad cursor in Delete"); + "Position cursor of Delete is bad"); Tree_Operations.Delete_Node_Sans_Free (Container.Tree, Position.Node); Free (Position.Node); @@ -373,7 +383,7 @@ package body Ada.Containers.Indefinite_Ordered_Maps is begin if X = null then - raise Constraint_Error; + raise Constraint_Error with "key not in map"; end if; Delete_Node_Sans_Free (Container.Tree, X); @@ -415,15 +425,17 @@ package body Ada.Containers.Indefinite_Ordered_Maps is function Element (Position : Cursor) return Element_Type is begin if Position.Node = null then - raise Constraint_Error; + raise Constraint_Error with + "Position cursor of function Element equals No_Element"; end if; if Position.Node.Element = null then - raise Program_Error; + raise Program_Error with + "Position cursor of function Element is bad"; end if; pragma Assert (Vet (Position.Container.Tree, Position.Node), - "bad cursor in Element"); + "Position cursor of function Element is bad"); return Position.Node.Element.all; end Element; @@ -433,7 +445,7 @@ package body Ada.Containers.Indefinite_Ordered_Maps is begin if Node = null then - raise Constraint_Error; + raise Constraint_Error with "key not in map"; end if; return Node.Element.all; @@ -507,7 +519,7 @@ package body Ada.Containers.Indefinite_Ordered_Maps is begin if T.First = null then - raise Constraint_Error; + raise Constraint_Error with "map is empty"; end if; return T.First.Element.all; @@ -522,7 +534,7 @@ package body Ada.Containers.Indefinite_Ordered_Maps is begin if T.First = null then - raise Constraint_Error; + raise Constraint_Error with "map is empty"; end if; return T.First.Key.all; @@ -619,7 +631,8 @@ package body Ada.Containers.Indefinite_Ordered_Maps is if not Inserted then if Container.Tree.Lock > 0 then - raise Program_Error; + raise Program_Error with + "attempt to tamper with cursors (map is locked)"; end if; K := Position.Node.Key; @@ -706,7 +719,7 @@ package body Ada.Containers.Indefinite_Ordered_Maps is Insert (Container, Key, New_Item, Position, Inserted); if not Inserted then - raise Constraint_Error; + raise Constraint_Error with "key already in map"; end if; end Insert; @@ -810,15 +823,17 @@ package body Ada.Containers.Indefinite_Ordered_Maps is function Key (Position : Cursor) return Key_Type is begin if Position.Node = null then - raise Constraint_Error; + raise Constraint_Error with + "Position cursor of function Key equals No_Element"; end if; if Position.Node.Key = null then - raise Program_Error; + raise Program_Error with + "Position cursor of function Key is bad"; end if; pragma Assert (Vet (Position.Container.Tree, Position.Node), - "bad cursor in Key"); + "Position cursor of function Key is bad"); return Position.Node.Key.all; end Key; @@ -847,7 +862,7 @@ package body Ada.Containers.Indefinite_Ordered_Maps is begin if T.Last = null then - raise Constraint_Error; + raise Constraint_Error with "map is empty"; end if; return T.Last.Element.all; @@ -862,7 +877,7 @@ package body Ada.Containers.Indefinite_Ordered_Maps is begin if T.Last = null then - raise Constraint_Error; + raise Constraint_Error with "map is empty"; end if; return T.Last.Key.all; @@ -912,7 +927,7 @@ package body Ada.Containers.Indefinite_Ordered_Maps is pragma Assert (Position.Node.Key /= null); pragma Assert (Position.Node.Element /= null); pragma Assert (Vet (Position.Container.Tree, Position.Node), - "bad cursor in Next"); + "Position cursor of Next is bad"); declare Node : constant Node_Access := @@ -955,7 +970,7 @@ package body Ada.Containers.Indefinite_Ordered_Maps is pragma Assert (Position.Node.Key /= null); pragma Assert (Position.Node.Element /= null); pragma Assert (Vet (Position.Container.Tree, Position.Node), - "bad cursor in Previous"); + "Position cursor of Previous is bad"); declare Node : constant Node_Access := @@ -986,17 +1001,19 @@ package body Ada.Containers.Indefinite_Ordered_Maps is is begin if Position.Node = null then - raise Constraint_Error; + raise Constraint_Error with + "Position cursor of Query_Element equals No_Element"; end if; if Position.Node.Key = null or else Position.Node.Element = null then - raise Program_Error; + raise Program_Error with + "Position cursor of Query_Element is bad"; end if; pragma Assert (Vet (Position.Container.Tree, Position.Node), - "bad cursor in Query_Element"); + "Position cursor of Query_Element is bad"); declare T : Tree_Type renames Position.Container.Tree; @@ -1031,7 +1048,7 @@ package body Ada.Containers.Indefinite_Ordered_Maps is ---------- procedure Read - (Stream : access Root_Stream_Type'Class; + (Stream : not null access Root_Stream_Type'Class; Container : out Map) is function Read_Node @@ -1066,11 +1083,11 @@ package body Ada.Containers.Indefinite_Ordered_Maps is end Read; procedure Read - (Stream : access Root_Stream_Type'Class; + (Stream : not null access Root_Stream_Type'Class; Item : out Cursor) is begin - raise Program_Error; + raise Program_Error with "attempt to stream map cursor"; end Read; ------------- @@ -1090,11 +1107,12 @@ package body Ada.Containers.Indefinite_Ordered_Maps is begin if Node = null then - raise Constraint_Error; + raise Constraint_Error with "key not in map"; end if; if Container.Tree.Lock > 0 then - raise Program_Error; + raise Program_Error with + "attempt to tamper with cursors (map is locked)"; end if; K := Node.Key; @@ -1125,25 +1143,29 @@ package body Ada.Containers.Indefinite_Ordered_Maps is is begin if Position.Node = null then - raise Constraint_Error; + raise Constraint_Error with + "Position cursor of Replace_Element equals No_Element"; end if; if Position.Node.Key = null or else Position.Node.Element = null then - raise Program_Error; + raise Program_Error with + "Position cursor of Replace_Element is bad"; end if; if Position.Container /= Container'Unrestricted_Access then - raise Program_Error; + raise Program_Error with + "Position cursor of Replace_Element designates wrong map"; end if; if Container.Tree.Lock > 0 then - raise Program_Error; + raise Program_Error with + "attempt to tamper with cursors (map is locked)"; end if; pragma Assert (Vet (Container.Tree, Position.Node), - "bad cursor in Replace_Element"); + "Position cursor of Replace_Element is bad"); declare X : Element_Access := Position.Node.Element; @@ -1252,21 +1274,24 @@ package body Ada.Containers.Indefinite_Ordered_Maps is is begin if Position.Node = null then - raise Constraint_Error; + raise Constraint_Error with + "Position cursor of Update_Element equals No_Element"; end if; if Position.Node.Key = null or else Position.Node.Element = null then - raise Program_Error; + raise Program_Error with + "Position cursor of Update_Element is bad"; end if; if Position.Container /= Container'Unrestricted_Access then - raise Program_Error; + raise Program_Error with + "Position cursor of Update_Element designates wrong map"; end if; pragma Assert (Vet (Container.Tree, Position.Node), - "bad cursor in Update_Element"); + "Position cursor of Update_Element is bad"); declare T : Tree_Type renames Position.Container.Tree; @@ -1301,7 +1326,7 @@ package body Ada.Containers.Indefinite_Ordered_Maps is ----------- procedure Write - (Stream : access Root_Stream_Type'Class; + (Stream : not null access Root_Stream_Type'Class; Container : Map) is procedure Write_Node @@ -1332,11 +1357,11 @@ package body Ada.Containers.Indefinite_Ordered_Maps is end Write; procedure Write - (Stream : access Root_Stream_Type'Class; + (Stream : not null access Root_Stream_Type'Class; Item : Cursor) is begin - raise Program_Error; + raise Program_Error with "attempt to stream map cursor"; end Write; end Ada.Containers.Indefinite_Ordered_Maps; diff --git a/gcc/ada/a-ciorma.ads b/gcc/ada/a-ciorma.ads index 8837e048e00..7d16b2b4c1a 100644 --- a/gcc/ada/a-ciorma.ads +++ b/gcc/ada/a-ciorma.ads @@ -215,13 +215,13 @@ private end record; procedure Write - (Stream : access Root_Stream_Type'Class; + (Stream : not null access Root_Stream_Type'Class; Item : Cursor); for Cursor'Write use Write; procedure Read - (Stream : access Root_Stream_Type'Class; + (Stream : not null access Root_Stream_Type'Class; Item : out Cursor); for Cursor'Read use Read; @@ -229,13 +229,13 @@ private No_Element : constant Cursor := Cursor'(null, null); procedure Write - (Stream : access Root_Stream_Type'Class; + (Stream : not null access Root_Stream_Type'Class; Container : Map); for Map'Write use Write; procedure Read - (Stream : access Root_Stream_Type'Class; + (Stream : not null access Root_Stream_Type'Class; Container : out Map); for Map'Read use Read; diff --git a/gcc/ada/a-cohama.adb b/gcc/ada/a-cohama.adb index d235d0b0c79..a29784bdb45 100644 --- a/gcc/ada/a-cohama.adb +++ b/gcc/ada/a-cohama.adb @@ -438,18 +438,10 @@ package body Ada.Containers.Hashed_Maps is -------------- function New_Node (Next : Node_Access) return Node_Access is - Node : Node_Access := new Node_Type; -- Ada 2005 aggregate possible? - begin - Node.Key := Key; - Node.Next := Next; - - return Node; - - exception - when others => - Free (Node); - raise; + return new Node_Type'(Key => Key, + Element => <>, + Next => Next); end New_Node; HT : Hash_Table_Type renames Container.HT; @@ -490,9 +482,8 @@ package body Ada.Containers.Hashed_Maps is -------------- function New_Node (Next : Node_Access) return Node_Access is - Node : constant Node_Access := new Node_Type'(Key, New_Item, Next); begin - return Node; + return new Node_Type'(Key, New_Item, Next); end New_Node; HT : Hash_Table_Type renames Container.HT; diff --git a/gcc/ada/a-cohama.ads b/gcc/ada/a-cohama.ads index 42b1cada502..d65401f01eb 100644 --- a/gcc/ada/a-cohama.ads +++ b/gcc/ada/a-cohama.ads @@ -212,18 +212,18 @@ private Node : Node_Access; end record; - procedure Write - (Stream : access Root_Stream_Type'Class; - Item : Cursor); - - for Cursor'Write use Write; - procedure Read (Stream : access Root_Stream_Type'Class; Item : out Cursor); for Cursor'Read use Read; + procedure Write + (Stream : access Root_Stream_Type'Class; + Item : Cursor); + + for Cursor'Write use Write; + No_Element : constant Cursor := (Container => null, Node => null); end Ada.Containers.Hashed_Maps; diff --git a/gcc/ada/a-coinve.adb b/gcc/ada/a-coinve.adb index b3c7cd8e910..6aee444e1b0 100644 --- a/gcc/ada/a-coinve.adb +++ b/gcc/ada/a-coinve.adb @@ -895,6 +895,12 @@ package body Ada.Containers.Indefinite_Vectors is J := Target.Last; while Source.Last >= Index_Type'First loop + pragma Assert + (Source.Last <= Index_Type'First + or else not (Is_Less + (Source.Elements (Source.Last), + Source.Elements (Source.Last - 1)))); + if I < Index_Type'First then declare Src : Elements_Type renames @@ -909,6 +915,12 @@ package body Ada.Containers.Indefinite_Vectors is return; end if; + pragma Assert + (I <= Index_Type'First + or else not (Is_Less + (Target.Elements (I), + Target.Elements (I - 1)))); + declare Src : Element_Access renames Source.Elements (Source.Last); Tgt : Element_Access renames Target.Elements (I); diff --git a/gcc/ada/a-convec.adb b/gcc/ada/a-convec.adb index b298fd6a736..2a603034749 100644 --- a/gcc/ada/a-convec.adb +++ b/gcc/ada/a-convec.adb @@ -660,6 +660,10 @@ package body Ada.Containers.Vectors is J := Target.Last; while Source.Last >= Index_Type'First loop + pragma Assert (Source.Last <= Index_Type'First + or else not (Source.Elements (Source.Last) < + Source.Elements (Source.Last - 1))); + if I < Index_Type'First then Target.Elements (Index_Type'First .. J) := Source.Elements (Index_Type'First .. Source.Last); @@ -668,6 +672,10 @@ package body Ada.Containers.Vectors is return; end if; + pragma Assert (I <= Index_Type'First + or else not (Target.Elements (I) < + Target.Elements (I - 1))); + if Source.Elements (Source.Last) < Target.Elements (I) then Target.Elements (J) := Target.Elements (I); I := I - 1; @@ -1923,7 +1931,6 @@ package body Ada.Containers.Vectors is B : Natural renames V.Busy; begin - B := B + 1; begin @@ -1937,7 +1944,6 @@ package body Ada.Containers.Vectors is end; B := B - 1; - end Reverse_Iterate; ---------------- diff --git a/gcc/ada/a-coorma.adb b/gcc/ada/a-coorma.adb index fad63d4e498..95b8796c8d4 100644 --- a/gcc/ada/a-coorma.adb +++ b/gcc/ada/a-coorma.adb @@ -127,17 +127,19 @@ package body Ada.Containers.Ordered_Maps is function "<" (Left, Right : Cursor) return Boolean is begin - if Left.Node = null - or else Right.Node = null - then - raise Constraint_Error; + if Left.Node = null then + raise Constraint_Error with "Left cursor of ""<"" equals No_Element"; + end if; + + if Right.Node = null then + raise Constraint_Error with "Right cursor of ""<"" equals No_Element"; end if; pragma Assert (Vet (Left.Container.Tree, Left.Node), - "bad Left cursor in ""<"""); + "Left cursor of ""<"" is bad"); pragma Assert (Vet (Right.Container.Tree, Right.Node), - "bad Right cursor in ""<"""); + "Right cursor of ""<"" is bad"); return Left.Node.Key < Right.Node.Key; end "<"; @@ -145,11 +147,11 @@ package body Ada.Containers.Ordered_Maps is function "<" (Left : Cursor; Right : Key_Type) return Boolean is begin if Left.Node = null then - raise Constraint_Error; + raise Constraint_Error with "Left cursor of ""<"" equals No_Element"; end if; pragma Assert (Vet (Left.Container.Tree, Left.Node), - "bad Left cursor in ""<"""); + "Left cursor of ""<"" is bad"); return Left.Node.Key < Right; end "<"; @@ -157,11 +159,11 @@ package body Ada.Containers.Ordered_Maps is function "<" (Left : Key_Type; Right : Cursor) return Boolean is begin if Right.Node = null then - raise Constraint_Error; + raise Constraint_Error with "Right cursor of ""<"" equals No_Element"; end if; pragma Assert (Vet (Right.Container.Tree, Right.Node), - "bad Right cursor in ""<"""); + "Right cursor of ""<"" is bad"); return Left < Right.Node.Key; end "<"; @@ -181,17 +183,19 @@ package body Ada.Containers.Ordered_Maps is function ">" (Left, Right : Cursor) return Boolean is begin - if Left.Node = null - or else Right.Node = null - then - raise Constraint_Error; + if Left.Node = null then + raise Constraint_Error with "Left cursor of "">"" equals No_Element"; + end if; + + if Right.Node = null then + raise Constraint_Error with "Right cursor of "">"" equals No_Element"; end if; pragma Assert (Vet (Left.Container.Tree, Left.Node), - "bad Left cursor in "">"""); + "Left cursor of "">"" is bad"); pragma Assert (Vet (Right.Container.Tree, Right.Node), - "bad Right cursor in "">"""); + "Right cursor of "">"" is bad"); return Right.Node.Key < Left.Node.Key; end ">"; @@ -199,11 +203,11 @@ package body Ada.Containers.Ordered_Maps is function ">" (Left : Cursor; Right : Key_Type) return Boolean is begin if Left.Node = null then - raise Constraint_Error; + raise Constraint_Error with "Left cursor of "">"" equals No_Element"; end if; pragma Assert (Vet (Left.Container.Tree, Left.Node), - "bad Left cursor in "">"""); + "Left cursor of "">"" is bad"); return Right < Left.Node.Key; end ">"; @@ -211,11 +215,11 @@ package body Ada.Containers.Ordered_Maps is function ">" (Left : Key_Type; Right : Cursor) return Boolean is begin if Right.Node = null then - raise Constraint_Error; + raise Constraint_Error with "Right cursor of "">"" equals No_Element"; end if; pragma Assert (Vet (Right.Container.Tree, Right.Node), - "bad Right cursor in "">"""); + "Right cursor of "">"" is bad"); return Right.Node.Key < Left; end ">"; @@ -302,14 +306,17 @@ package body Ada.Containers.Ordered_Maps is begin if Position.Node = null then - raise Constraint_Error; + raise Constraint_Error with + "Position cursor of Delete equals No_Element"; end if; if Position.Container /= Container'Unrestricted_Access then - raise Program_Error; + raise Program_Error with + "Position cursor of Delete designates wrong map"; end if; - pragma Assert (Vet (Tree, Position.Node), "bad cursor in Delete"); + pragma Assert (Vet (Tree, Position.Node), + "Position cursor of Delete is bad"); Tree_Operations.Delete_Node_Sans_Free (Tree, Position.Node); Free (Position.Node); @@ -322,7 +329,7 @@ package body Ada.Containers.Ordered_Maps is begin if X = null then - raise Constraint_Error; + raise Constraint_Error with "key not in map"; end if; Tree_Operations.Delete_Node_Sans_Free (Container.Tree, X); @@ -364,11 +371,12 @@ package body Ada.Containers.Ordered_Maps is function Element (Position : Cursor) return Element_Type is begin if Position.Node = null then - raise Constraint_Error; + raise Constraint_Error with + "Position cursor of function Element equals No_Element"; end if; pragma Assert (Vet (Position.Container.Tree, Position.Node), - "bad cursor in Element"); + "Position cursor of function Element is bad"); return Position.Node.Element; end Element; @@ -378,7 +386,7 @@ package body Ada.Containers.Ordered_Maps is begin if Node = null then - raise Constraint_Error; + raise Constraint_Error with "key not in map"; end if; return Node.Element; @@ -452,7 +460,7 @@ package body Ada.Containers.Ordered_Maps is begin if T.First = null then - raise Constraint_Error; + raise Constraint_Error with "map is empty"; end if; return T.First.Element; @@ -467,7 +475,7 @@ package body Ada.Containers.Ordered_Maps is begin if T.First = null then - raise Constraint_Error; + raise Constraint_Error with "map is empty"; end if; return T.First.Key; @@ -534,7 +542,8 @@ package body Ada.Containers.Ordered_Maps is if not Inserted then if Container.Tree.Lock > 0 then - raise Program_Error; + raise Program_Error with + "attempt to tamper with cursors (map is locked)"; end if; Position.Node.Key := Key; @@ -596,7 +605,7 @@ package body Ada.Containers.Ordered_Maps is Insert (Container, Key, New_Item, Position, Inserted); if not Inserted then - raise Constraint_Error; + raise Constraint_Error with "key already in map"; end if; end Insert; @@ -746,11 +755,12 @@ package body Ada.Containers.Ordered_Maps is function Key (Position : Cursor) return Key_Type is begin if Position.Node = null then - raise Constraint_Error; + raise Constraint_Error with + "Position cursor of function Key equals No_Element"; end if; pragma Assert (Vet (Position.Container.Tree, Position.Node), - "bad cursor in Key"); + "Position cursor of function Key is bad"); return Position.Node.Key; end Key; @@ -779,7 +789,7 @@ package body Ada.Containers.Ordered_Maps is begin if T.Last = null then - raise Constraint_Error; + raise Constraint_Error with "map is empty"; end if; return T.Last.Element; @@ -794,7 +804,7 @@ package body Ada.Containers.Ordered_Maps is begin if T.Last = null then - raise Constraint_Error; + raise Constraint_Error with "map is empty"; end if; return T.Last.Key; @@ -846,7 +856,7 @@ package body Ada.Containers.Ordered_Maps is end if; pragma Assert (Vet (Position.Container.Tree, Position.Node), - "bad cursor in Next"); + "Position cursor of Next is bad"); declare Node : constant Node_Access := @@ -886,7 +896,7 @@ package body Ada.Containers.Ordered_Maps is end if; pragma Assert (Vet (Position.Container.Tree, Position.Node), - "bad cursor in Previous"); + "Position cursor of Previous is bad"); declare Node : constant Node_Access := @@ -912,11 +922,12 @@ package body Ada.Containers.Ordered_Maps is is begin if Position.Node = null then - raise Constraint_Error; + raise Constraint_Error with + "Position cursor of Query_Element equals No_Element"; end if; pragma Assert (Vet (Position.Container.Tree, Position.Node), - "bad cursor in Query_Element"); + "Position cursor of Query_Element is bad"); declare T : Tree_Type renames Position.Container.Tree; @@ -951,7 +962,7 @@ package body Ada.Containers.Ordered_Maps is ---------- procedure Read - (Stream : access Root_Stream_Type'Class; + (Stream : not null access Root_Stream_Type'Class; Container : out Map) is function Read_Node @@ -986,11 +997,11 @@ package body Ada.Containers.Ordered_Maps is end Read; procedure Read - (Stream : access Root_Stream_Type'Class; + (Stream : not null access Root_Stream_Type'Class; Item : out Cursor) is begin - raise Program_Error; + raise Program_Error with "attempt to stream map cursor"; end Read; ------------- @@ -1006,11 +1017,12 @@ package body Ada.Containers.Ordered_Maps is begin if Node = null then - raise Constraint_Error; + raise Constraint_Error with "key not in map"; end if; if Container.Tree.Lock > 0 then - raise Program_Error; + raise Program_Error with + "attempt to tamper with cursors (map is locked)"; end if; Node.Key := Key; @@ -1028,19 +1040,22 @@ package body Ada.Containers.Ordered_Maps is is begin if Position.Node = null then - raise Constraint_Error; + raise Constraint_Error with + "Position cursor of Replace_Element equals No_Element"; end if; if Position.Container /= Container'Unrestricted_Access then - raise Program_Error; + raise Program_Error with + "Position cursor of Replace_Element designates wrong map"; end if; if Container.Tree.Lock > 0 then - raise Program_Error; + raise Program_Error with + "attempt to tamper with cursors (map is locked)"; end if; pragma Assert (Vet (Container.Tree, Position.Node), - "bad cursor in Replace_Element"); + "Position cursor of Replace_Element is bad"); Position.Node.Element := New_Item; end Replace_Element; @@ -1146,15 +1161,17 @@ package body Ada.Containers.Ordered_Maps is is begin if Position.Node = null then - raise Constraint_Error; + raise Constraint_Error with + "Position cursor of Update_Element equals No_Element"; end if; if Position.Container /= Container'Unrestricted_Access then - raise Program_Error; + raise Program_Error with + "Position cursor of Update_Element designates wrong map"; end if; pragma Assert (Vet (Container.Tree, Position.Node), - "bad cursor in Update_Element"); + "Position cursor of Update_Element is bad"); declare T : Tree_Type renames Container.Tree; @@ -1189,7 +1206,7 @@ package body Ada.Containers.Ordered_Maps is ----------- procedure Write - (Stream : access Root_Stream_Type'Class; + (Stream : not null access Root_Stream_Type'Class; Container : Map) is procedure Write_Node @@ -1220,11 +1237,11 @@ package body Ada.Containers.Ordered_Maps is end Write; procedure Write - (Stream : access Root_Stream_Type'Class; + (Stream : not null access Root_Stream_Type'Class; Item : Cursor) is begin - raise Program_Error; + raise Program_Error with "attempt to stream map cursor"; end Write; end Ada.Containers.Ordered_Maps; diff --git a/gcc/ada/a-coorma.ads b/gcc/ada/a-coorma.ads index 7f8386b4b13..f07b07373d0 100644 --- a/gcc/ada/a-coorma.ads +++ b/gcc/ada/a-coorma.ads @@ -217,13 +217,13 @@ private end record; procedure Write - (Stream : access Root_Stream_Type'Class; + (Stream : not null access Root_Stream_Type'Class; Item : Cursor); for Cursor'Write use Write; procedure Read - (Stream : access Root_Stream_Type'Class; + (Stream : not null access Root_Stream_Type'Class; Item : out Cursor); for Cursor'Read use Read; @@ -231,13 +231,13 @@ private No_Element : constant Cursor := Cursor'(null, null); procedure Write - (Stream : access Root_Stream_Type'Class; + (Stream : not null access Root_Stream_Type'Class; Container : Map); for Map'Write use Write; procedure Read - (Stream : access Root_Stream_Type'Class; + (Stream : not null access Root_Stream_Type'Class; Container : out Map); for Map'Read use Read; diff --git a/gcc/ada/a-elchha.adb b/gcc/ada/a-elchha.adb index c2b38e4e9f2..135daf50f7f 100644 --- a/gcc/ada/a-elchha.adb +++ b/gcc/ada/a-elchha.adb @@ -38,6 +38,11 @@ -- Default version for most targets with System.Standard_Library; use System.Standard_Library; +-- Used for Adafinal + +with System.Soft_Links; +-- Used for Task_Termination_Handler +-- Task_Termination_NT procedure Ada.Exceptions.Last_Chance_Handler (Except : Exception_Occurrence) @@ -72,6 +77,14 @@ is -- Convenient shortcut begin + -- Do not execute any task termination code when shutting down the system. + -- The Adafinal procedure would execute the task termination routine for + -- normal termination, but we have already executed the task termination + -- procedure because of an unhandled exception. + + System.Soft_Links.Task_Termination_Handler := + System.Soft_Links.Task_Termination_NT'Access; + -- Let's shutdown the runtime now. The rest of the procedure needs to be -- careful not to use anything that would require runtime support. In -- particular, functions returning strings are banned since the sec stack diff --git a/gcc/ada/a-exextr.adb b/gcc/ada/a-exextr.adb index b50dbc9b492..bb7e5ad616c 100644 --- a/gcc/ada/a-exextr.adb +++ b/gcc/ada/a-exextr.adb @@ -88,7 +88,7 @@ package body Exception_Traces is -- Hook for GDB to support "break exception unhandled" -- For "break exception", GDB uses __gnat_raise_nodefer_with_msg, which - -- is not in this section because it fullfills other purposes than a mere + -- is not in this section because it functions as more than simply a -- debugger interface. -------------------------------- @@ -161,8 +161,18 @@ package body Exception_Traces is -------------------------------- procedure Notify_Unhandled_Exception is + Excep : constant EOA := Get_Current_Excep.all; + begin - Notify_Exception (Get_Current_Excep.all, Is_Unhandled => True); + -- Check whether there is any termination handler to be executed for + -- the environment task, and execute it if needed. Here we handle both + -- the Abnormal and Unhandled_Exception task termination. Normal + -- task termination routine is executed elsewhere (either in the + -- Task_Wrapper or in the Adafinal routine for the environment task). + + Task_Termination_Handler.all (Excep.all); + + Notify_Exception (Excep, Is_Unhandled => True); Unhandled_Exception; end Notify_Unhandled_Exception; diff --git a/gcc/ada/a-tags.adb b/gcc/ada/a-tags.adb index 8c9312e205c..a8d6cd00109 100644 --- a/gcc/ada/a-tags.adb +++ b/gcc/ada/a-tags.adb @@ -41,47 +41,53 @@ package body Ada.Tags is -- Structure of the GNAT Primary Dispatch Table --- +-----------------------+ --- | Signature | --- +-----------------------+ --- | Offset_To_Top | --- +-----------------------+ --- | Typeinfo_Ptr/TSD_Ptr | ---> Type Specific Data --- Tag ---> +-----------------------+ +-------------------+ --- | table of | | inheritance depth | --- : primitive ops : +-------------------+ --- | pointers | | access level | --- +-----------------------+ +-------------------+ --- | expanded name | --- +-------------------+ --- | external tag | --- +-------------------+ --- | hash table link | --- +-------------------+ --- | remotely callable | --- +-------------------+ --- | rec ctrler offset | --- +-------------------+ --- | num prim ops | --- +-------------------+ --- | num interfaces | --- +-------------------+ --- Select Specific Data <--- | SSD_Ptr | --- +-----------------------+ +-------------------+ --- | table of primitive | | table of | --- : operation : : ancestor : --- | kinds | | tags | --- +-----------------------+ +-------------------+ --- | table of | | table of | --- : entry : : interface : --- | indices | | tags | --- +-----------------------+ +-------------------+ +-- +----------------------+ +-- | Signature | +-- +----------------------+ +-- | Tagged_Kind | +-- +----------------------+ +-- | Offset_To_Top | +-- +----------------------+ +-- | Typeinfo_Ptr/TSD_Ptr ---> Type Specific Data +-- Tag ---> +----------------------+ +-------------------+ +-- | table of | | inheritance depth | +-- : primitive ops : +-------------------+ +-- | pointers | | access level | +-- +----------------------+ +-------------------+ +-- | expanded name | +-- +-------------------+ +-- | external tag | +-- +-------------------+ +-- | hash table link | +-- +-------------------+ +-- | remotely callable | +-- +-------------------+ +-- | rec ctrler offset | +-- +-------------------+ +-- | num prim ops | +-- +-------------------+ +-- | num interfaces | +-- +-------------------+ +-- | Ifaces_Table_Ptr --> Interface Data +-- +-------------------+ +------------+ +-- Select Specific Data <---- SSD_Ptr | | table | +-- +--------------------+ +-------------------+ : of : +-- | table of primitive | | table of | | interfaces | +-- : operation : : ancestor : +------------+ +-- | kinds | | tags | +-- +--------------------+ +-------------------+ +-- | table of | +-- : entry : +-- | indices | +-- +--------------------+ -- Structure of the GNAT Secondary Dispatch Table -- +-----------------------+ -- | Signature | -- +-----------------------+ +-- | Tagged_Kind | +-- +-----------------------+ -- | Offset_To_Top | -- +-----------------------+ -- | OSD_Ptr |---> Object Specific Data @@ -93,10 +99,77 @@ package body Ada.Tags is -- | op offsets | -- +---------------+ - Offset_To_Signature : constant SSE.Storage_Count := - DT_Typeinfo_Ptr_Size - + DT_Offset_To_Top_Size - + DT_Signature_Size; + ---------------------------------- + -- GNAT Dispatch Table Prologue -- + ---------------------------------- + + -- GNAT's Dispatch Table prologue contains several fields which are hidden + -- in order to preserve compatibility with C++. These fields are accessed + -- by address calculations performed in the following manner: + + -- Field : Field_Type := + -- (To_Address (Tag) - Sum_Of_Preceding_Field_Sizes).all; + + -- The bracketed subtraction shifts the pointer (Tag) from the table of + -- primitive operations (or thunks) to the field in question. Since the + -- result of the subtraction is an address, dereferencing it will obtain + -- the actual value of the field. + + -- Guidelines for addition of new hidden fields + + -- Define a Field_Type and Field_Type_Ptr (access to Field_Type) in + -- A-Tags.ads for the newly introduced field. + + -- Defined the size of the new field as a constant Field_Name_Size + + -- Introduce an Unchecked_Conversion from System.Address to + -- Field_Type_Ptr in A-Tags.ads. + + -- Define the specifications of Get_ and Set_ + -- in A-Tags.ads. + + -- Update the GNAT Dispatch Table structure in A-Tags.adb + + -- Provide bodies to the Get_ and Set_ routines. + -- The profile of a Get_ routine should resemble: + + -- function Get_ (T : Tag; ...) return Field_Type is + -- Field : constant System.Address := + -- To_Address (T) - ; + -- begin + -- pragma Assert (Check_Signature (T, )); + -- + + -- return To_Field_Type_Ptr (Field).all; + -- end Get_; + + -- The profile of a Set_ routine should resemble: + + -- procedure Set_ (T : Tag; ..., Value : Field_Type) is + -- Field : constant System.Address := + -- To_Address (T) - ; + -- begin + -- pragma Assert (Check_Signature (T, )); + -- + + -- To_Field_Type_Ptr (Field).all := Value; + -- end Set_; + + -- NOTE: For each field in the prologue which precedes the newly added + -- one, find and update its respective Sum_Of_Previous_Field_Sizes by + -- subtractind Field_Name_Size from it. Falure to do so will clobber the + -- previous prologue field. + + K_Typeinfo : constant SSE.Storage_Count := DT_Typeinfo_Ptr_Size; + + K_Offset_To_Top : constant SSE.Storage_Count := + K_Typeinfo + DT_Offset_To_Top_Size; + + K_Tagged_Kind : constant SSE.Storage_Count := + K_Offset_To_Top + DT_Tagged_Kind_Size; + + K_Signature : constant SSE.Storage_Count := + K_Tagged_Kind + DT_Signature_Size; subtype Cstring is String (Positive); type Cstring_Ptr is access all Cstring; @@ -108,6 +181,20 @@ package body Ada.Tags is pragma Suppress_Initialization (Tag_Table); pragma Suppress (Index_Check, On => Tag_Table); + -- Declarations for the table of interfaces + + type Interface_Data_Element is record + Iface_Tag : Tag; + Offset : System.Storage_Elements.Storage_Offset; + end record; + + type Interfaces_Array is + array (Natural range <>) of Interface_Data_Element; + + type Interface_Data (Nb_Ifaces : Positive) is record + Table : Interfaces_Array (1 .. Nb_Ifaces); + end record; + -- Object specific data types type Object_Specific_Data_Array is array (Positive range <>) of Positive; @@ -171,17 +258,16 @@ package body Ada.Tags is -- Controller Offset: Used to give support to tagged controlled objects -- (see Get_Deep_Controller at s-finimp) + Ifaces_Table_Ptr : System.Address; + -- Pointer to the table of interface tags. It is used to implement the + -- membership test associated with interfaces and also for backward + -- abstract interface type conversions (Ada 2005:AI-251) + Num_Prim_Ops : Natural; -- Number of primitive operations of the dispatch table. This field is -- used for additional run-time checks when the run-time is compiled -- with assertions enabled. - Num_Interfaces : Natural; - -- Number of abstract interface types implemented by the tagged type. - -- The value Idepth+Num_Interfaces indicates the end of the second table - -- stored in the Tags_Table component. It is used to implement the - -- membership test associated with interfaces (Ada 2005:AI-251). - SSD_Ptr : System.Address; -- Pointer to a table of records used in dispatching selects. This -- field has a meaningful value for all tagged types that implement @@ -210,6 +296,8 @@ package body Ada.Tags is -- enough space for these additional components, and generates code that -- displaces the _Tag to point after these components. + -- Signature : Signature_Kind; + -- Tagged_Kind : Tagged_Kind; -- Offset_To_Top : Natural; -- Typeinfo_Ptr : System.Address; @@ -305,11 +393,6 @@ package body Ada.Tags is -- Length of string represented by the given pointer (treating the string -- as a C-style string, which is Nul terminated). - function Offset_To_Top - (T : Tag) return System.Storage_Elements.Storage_Offset; - -- Returns the current value of the offset_to_top component available in - -- the prologue of the dispatch table. - function Typeinfo_Ptr (T : Tag) return System.Address; -- Returns the current value of the typeinfo_ptr component available in -- the prologue of the dispatch table. @@ -425,21 +508,20 @@ package body Ada.Tags is --------------------- function Check_Signature (T : Tag; Kind : Signature_Type) return Boolean is - Offset_To_Top_Ptr : constant Storage_Offset_Ptr := - To_Storage_Offset_Ptr (To_Address (T) - - Offset_To_Signature); + Signature : constant Storage_Offset_Ptr := + To_Storage_Offset_Ptr (To_Address (T) - K_Signature); - Signature : constant Signature_Values := - To_Signature_Values (Offset_To_Top_Ptr.all); + Sig_Values : constant Signature_Values := + To_Signature_Values (Signature.all); Signature_Id : Signature_Kind; begin - if Signature (1) /= Valid_Signature then + if Sig_Values (1) /= Valid_Signature then Signature_Id := Unknown; - elsif Signature (2) in Primary_DT .. Abstract_Interface then - Signature_Id := Signature (2); + elsif Sig_Values (2) in Primary_DT .. Abstract_Interface then + Signature_Id := Sig_Values (2); else Signature_Id := Unknown; @@ -522,6 +604,54 @@ package body Ada.Tags is return Pos >= 0 and then TSD (Obj_Tag).Tags_Table (Pos) = Typ_Tag; end CW_Membership; + -------------- + -- Displace -- + -------------- + + function Displace + (This : System.Address; + T : Tag) return System.Address + is + Curr_DT : constant Tag := To_Tag_Ptr (This).all; + Iface_Table : Interface_Data_Ptr; + Obj_Base : System.Address; + Obj_DT : Tag; + Obj_TSD : Type_Specific_Data_Ptr; + + begin + pragma Assert + (Check_Signature (Curr_DT, Must_Be_Primary_Or_Secondary_DT)); + pragma Assert + (Check_Signature (T, Must_Be_Interface)); + + Obj_Base := This - Offset_To_Top (Curr_DT); + Obj_DT := To_Tag_Ptr (Obj_Base).all; + + pragma Assert + (Check_Signature (Obj_DT, Must_Be_Primary_DT)); + + Obj_TSD := TSD (Obj_DT); + Iface_Table := To_Interface_Data_Ptr (Obj_TSD.Ifaces_Table_Ptr); + + if Iface_Table /= null then + for Id in 1 .. Iface_Table.Nb_Ifaces loop + if Iface_Table.Table (Id).Iface_Tag = T then + Obj_Base := Obj_Base + Iface_Table.Table (Id).Offset; + Obj_DT := To_Tag_Ptr (Obj_Base).all; + + pragma Assert + (Check_Signature (Obj_DT, Must_Be_Secondary_DT)); + + return Obj_Base; + end if; + end loop; + end if; + + -- If the object does not implement the interface we must raise CE + + raise Constraint_Error; + end Displace; + ------------------- -- IW_Membership -- ------------------- @@ -537,12 +667,12 @@ package body Ada.Tags is -- that are contained in the dispatch table referenced by Obj'Tag. function IW_Membership (This : System.Address; T : Tag) return Boolean is - Curr_DT : constant Tag := To_Tag_Ptr (This).all; - Id : Natural; - Last_Id : Natural; - Obj_Base : System.Address; - Obj_DT : Tag; - Obj_TSD : Type_Specific_Data_Ptr; + Curr_DT : constant Tag := To_Tag_Ptr (This).all; + Iface_Table : Interface_Data_Ptr; + Last_Id : Natural; + Obj_Base : System.Address; + Obj_DT : Tag; + Obj_TSD : Type_Specific_Data_Ptr; begin pragma Assert @@ -554,29 +684,32 @@ package body Ada.Tags is Obj_DT := To_Tag_Ptr (Obj_Base).all; pragma Assert - (Check_Signature (Curr_DT, Must_Be_Primary_DT)); + (Check_Signature (Obj_DT, Must_Be_Primary_DT)); Obj_TSD := TSD (Obj_DT); - Last_Id := Obj_TSD.Idepth + Obj_TSD.Num_Interfaces; - - if Obj_TSD.Num_Interfaces > 0 then + Last_Id := Obj_TSD.Idepth; - -- Traverse the ancestor tags table plus the interface tags table. - -- The former part is required for: + -- Look for the tag in the table of interfaces - -- Iface_CW in Typ'Class + Iface_Table := To_Interface_Data_Ptr (Obj_TSD.Ifaces_Table_Ptr); - Id := 0; - loop - if Obj_TSD.Tags_Table (Id) = T then + if Iface_Table /= null then + for Id in 1 .. Iface_Table.Nb_Ifaces loop + if Iface_Table.Table (Id).Iface_Tag = T then return True; end if; - - Id := Id + 1; - exit when Id > Last_Id; end loop; end if; + -- Look for the tag in the ancestor tags table. This is required for: + -- Iface_CW in Typ'Class + + for Id in 0 .. Last_Id loop + if Obj_TSD.Tags_Table (Id) = T then + return True; + end if; + end loop; + return False; end IW_Membership; @@ -652,6 +785,7 @@ package body Ada.Tags is Index : constant Integer := Position - Default_Prim_Op_Count; begin pragma Assert (Check_Signature (T, Must_Be_Primary_DT)); + pragma Assert (Check_Index (T, Position)); pragma Assert (Index > 0); return SSD (T).SSD_Table (Index).Index; end Get_Entry_Index; @@ -677,7 +811,7 @@ package body Ada.Tags is if Is_Primary_DT (T) then return TSD (T).Num_Prim_Ops; else - return OSD (Interface_Tag (T)).Num_Prim_Ops; + return OSD (T).Num_Prim_Ops; end if; end Get_Num_Prim_Ops; @@ -706,6 +840,7 @@ package body Ada.Tags is Index : constant Integer := Position - Default_Prim_Op_Count; begin pragma Assert (Check_Signature (T, Must_Be_Primary_DT)); + pragma Assert (Check_Index (T, Position)); pragma Assert (Index > 0); return SSD (T).SSD_Table (Index).Kind; end Get_Prim_Op_Kind; @@ -715,12 +850,13 @@ package body Ada.Tags is ---------------------- function Get_Offset_Index - (T : Interface_Tag; + (T : Tag; Position : Positive) return Positive is Index : constant Integer := Position - Default_Prim_Op_Count; begin - pragma Assert (Check_Signature (Tag (T), Must_Be_Secondary_DT)); + pragma Assert (Check_Signature (T, Must_Be_Secondary_DT)); + pragma Assert (Check_Index (T, Position)); pragma Assert (Index > 0); return OSD (T).OSD_Table (Index); end Get_Offset_Index; @@ -745,6 +881,18 @@ package body Ada.Tags is return TSD (T).Remotely_Callable; end Get_Remotely_Callable; + --------------------- + -- Get_Tagged_Kind -- + --------------------- + + function Get_Tagged_Kind (T : Tag) return Tagged_Kind is + Tagged_Kind_Ptr : constant System.Address := + To_Address (T) - K_Tagged_Kind; + begin + pragma Assert (Check_Signature (T, Must_Be_Primary_Or_Secondary_DT)); + return To_Tagged_Kind_Ptr (Tagged_Kind_Ptr).all; + end Get_Tagged_Kind; + ---------------- -- Inherit_DT -- ---------------- @@ -766,8 +914,10 @@ package body Ada.Tags is ----------------- procedure Inherit_TSD (Old_Tag : Tag; New_Tag : Tag) is - New_TSD_Ptr : Type_Specific_Data_Ptr; - Old_TSD_Ptr : Type_Specific_Data_Ptr; + New_TSD_Ptr : Type_Specific_Data_Ptr; + New_Iface_Table_Ptr : Interface_Data_Ptr; + Old_TSD_Ptr : Type_Specific_Data_Ptr; + Old_Iface_Table_Ptr : Interface_Data_Ptr; begin pragma Assert (Check_Signature (New_Tag, Must_Be_Primary_Or_Interface)); @@ -778,18 +928,29 @@ package body Ada.Tags is (Check_Signature (Old_Tag, Must_Be_Primary_Or_Interface)); Old_TSD_Ptr := TSD (Old_Tag); New_TSD_Ptr.Idepth := Old_TSD_Ptr.Idepth + 1; - New_TSD_Ptr.Num_Interfaces := Old_TSD_Ptr.Num_Interfaces; -- Copy the "table of ancestor tags" plus the "table of interfaces" -- of the parent. - New_TSD_Ptr.Tags_Table - (1 .. New_TSD_Ptr.Idepth + New_TSD_Ptr.Num_Interfaces) := - Old_TSD_Ptr.Tags_Table - (0 .. Old_TSD_Ptr.Idepth + Old_TSD_Ptr.Num_Interfaces); + New_TSD_Ptr.Tags_Table (1 .. New_TSD_Ptr.Idepth) := + Old_TSD_Ptr.Tags_Table (0 .. Old_TSD_Ptr.Idepth); + + -- Copy the table of interfaces of the parent + + if not System."=" (Old_TSD_Ptr.Ifaces_Table_Ptr, + System.Null_Address) + then + Old_Iface_Table_Ptr := + To_Interface_Data_Ptr (Old_TSD_Ptr.Ifaces_Table_Ptr); + New_Iface_Table_Ptr := + To_Interface_Data_Ptr (New_TSD_Ptr.Ifaces_Table_Ptr); + + New_Iface_Table_Ptr.Table (1 .. Old_Iface_Table_Ptr.Nb_Ifaces) := + Old_Iface_Table_Ptr.Table (1 .. Old_Iface_Table_Ptr.Nb_Ifaces); + end if; + else - New_TSD_Ptr.Idepth := 0; - New_TSD_Ptr.Num_Interfaces := 0; + New_TSD_Ptr.Idepth := 0; end if; New_TSD_Ptr.Tags_Table (0) := New_Tag; @@ -845,13 +1006,12 @@ package body Ada.Tags is ------------------- function Is_Primary_DT (T : Tag) return Boolean is - Offset_To_Top_Ptr : constant Storage_Offset_Ptr := - To_Storage_Offset_Ptr (To_Address (T) - - Offset_To_Signature); - Signature : constant Signature_Values := - To_Signature_Values (Offset_To_Top_Ptr.all); + Signature : constant Storage_Offset_Ptr := + To_Storage_Offset_Ptr (To_Address (T) - K_Signature); + Sig_Values : constant Signature_Values := + To_Signature_Values (Signature.all); begin - return Signature (2) = Primary_DT; + return Sig_Values (2) = Primary_DT; end Is_Primary_DT; ------------ @@ -876,26 +1036,22 @@ package body Ada.Tags is function Offset_To_Top (T : Tag) return System.Storage_Elements.Storage_Offset is - Offset_To_Top_Ptr : constant Storage_Offset_Ptr := - To_Storage_Offset_Ptr (To_Address (T) - - DT_Typeinfo_Ptr_Size - - DT_Offset_To_Top_Size); - + Offset_To_Top : constant Storage_Offset_Ptr := + To_Storage_Offset_Ptr + (To_Address (T) - K_Offset_To_Top); begin - return Offset_To_Top_Ptr.all; + return Offset_To_Top.all; end Offset_To_Top; --------- -- OSD -- --------- - function OSD - (T : Interface_Tag) return Object_Specific_Data_Ptr - is - OSD_Ptr : Addr_Ptr; - + function OSD (T : Tag) return Object_Specific_Data_Ptr is + OSD_Ptr : constant Addr_Ptr := + To_Addr_Ptr (To_Address (T) - K_Typeinfo); begin - OSD_Ptr := To_Addr_Ptr (To_Address (T) - DT_Typeinfo_Ptr_Size); + pragma Assert (Check_Signature (T, Must_Be_Secondary_DT)); return To_Object_Specific_Data_Ptr (OSD_Ptr.all); end OSD; @@ -952,39 +1108,24 @@ package body Ada.Tags is -- Register_Interface_Tag -- ---------------------------- - procedure Register_Interface_Tag (T : Tag; Interface_T : Tag) is - New_T_TSD : Type_Specific_Data_Ptr; - Index : Natural; + procedure Register_Interface_Tag + (T : Tag; + Interface_T : Tag; + Position : Positive) + is + New_T_TSD : Type_Specific_Data_Ptr; + Iface_Table : Interface_Data_Ptr; begin pragma Assert (Check_Signature (T, Must_Be_Primary_DT)); pragma Assert (Check_Signature (Interface_T, Must_Be_Interface)); - New_T_TSD := TSD (T); - - -- Check if the interface is already registered - - if New_T_TSD.Num_Interfaces > 0 then - declare - Id : Natural := New_T_TSD.Idepth + 1; - Last_Id : constant Natural := New_T_TSD.Idepth - + New_T_TSD.Num_Interfaces; + New_T_TSD := TSD (T); + Iface_Table := To_Interface_Data_Ptr (New_T_TSD.Ifaces_Table_Ptr); - begin - loop - if New_T_TSD.Tags_Table (Id) = Interface_T then - return; - end if; - - Id := Id + 1; - exit when Id > Last_Id; - end loop; - end; - end if; + pragma Assert (Position <= Iface_Table.Nb_Ifaces); - New_T_TSD.Num_Interfaces := New_T_TSD.Num_Interfaces + 1; - Index := New_T_TSD.Idepth + New_T_TSD.Num_Interfaces; - New_T_TSD.Tags_Table (Index) := Interface_T; + Iface_Table.Table (Position).Iface_Tag := Interface_T; end Register_Interface_Tag; ------------------ @@ -1016,9 +1157,9 @@ package body Ada.Tags is Value : Positive) is Index : constant Integer := Position - Default_Prim_Op_Count; - begin pragma Assert (Check_Signature (T, Must_Be_Primary_DT)); + pragma Assert (Check_Index (T, Position)); pragma Assert (Index > 0); SSD (T).SSD_Table (Index).Index := Value; end Set_Entry_Index; @@ -1044,6 +1185,16 @@ package body Ada.Tags is TSD (T).External_Tag := To_Cstring_Ptr (Value); end Set_External_Tag; + ------------------------- + -- Set_Interface_Table -- + ------------------------- + + procedure Set_Interface_Table (T : Tag; Value : System.Address) is + begin + pragma Assert (Check_Signature (T, Must_Be_Primary_DT)); + TSD (T).Ifaces_Table_Ptr := Value; + end Set_Interface_Table; + ---------------------- -- Set_Num_Prim_Ops -- ---------------------- @@ -1055,7 +1206,7 @@ package body Ada.Tags is if Is_Primary_DT (T) then TSD (T).Num_Prim_Ops := Value; else - OSD (Interface_Tag (T)).Num_Prim_Ops := Value; + OSD (T).Num_Prim_Ops := Value; end if; end Set_Num_Prim_Ops; @@ -1064,13 +1215,14 @@ package body Ada.Tags is ---------------------- procedure Set_Offset_Index - (T : Interface_Tag; + (T : Tag; Position : Positive; Value : Positive) is Index : constant Integer := Position - Default_Prim_Op_Count; begin - pragma Assert (Check_Signature (Tag (T), Must_Be_Secondary_DT)); + pragma Assert (Check_Signature (T, Must_Be_Secondary_DT)); + pragma Assert (Check_Index (T, Position)); pragma Assert (Index > 0); OSD (T).OSD_Table (Index) := Value; end Set_Offset_Index; @@ -1080,27 +1232,78 @@ package body Ada.Tags is ----------------------- procedure Set_Offset_To_Top - (T : Tag; - Value : System.Storage_Elements.Storage_Offset) + (This : System.Address; + Interface_T : Tag; + Offset_Value : System.Storage_Elements.Storage_Offset) is - Offset_To_Top_Ptr : constant Storage_Offset_Ptr := - To_Storage_Offset_Ptr (To_Address (T) - - DT_Typeinfo_Ptr_Size - - DT_Offset_To_Top_Size); + Prim_DT : Tag; + Sec_Base : System.Address; + Sec_DT : Tag; + Offset_To_Top : Storage_Offset_Ptr; + Iface_Table : Interface_Data_Ptr; + Obj_TSD : Type_Specific_Data_Ptr; begin - pragma Assert (Check_Signature (T, Must_Be_Primary_Or_Secondary_DT)); - Offset_To_Top_Ptr.all := Value; + if System."=" (This, System.Null_Address) then + pragma Assert + (Check_Signature (Interface_T, Must_Be_Primary_DT)); + pragma Assert (Offset_Value = 0); + + Offset_To_Top := + To_Storage_Offset_Ptr (To_Address (Interface_T) - K_Offset_To_Top); + Offset_To_Top.all := Offset_Value; + return; + end if; + + -- "This" points to the primary DT and we must save Offset_Value in the + -- Offset_To_Top field of the corresponding secondary dispatch table. + + Prim_DT := To_Tag_Ptr (This).all; + + pragma Assert + (Check_Signature (Prim_DT, Must_Be_Primary_DT)); + + Sec_Base := This + Offset_Value; + Sec_DT := To_Tag_Ptr (Sec_Base).all; + Offset_To_Top := + To_Storage_Offset_Ptr (To_Address (Sec_DT) - K_Offset_To_Top); + + pragma Assert + (Check_Signature (Sec_DT, Must_Be_Primary_Or_Secondary_DT)); + + Offset_To_Top.all := Offset_Value; + + -- Save Offset_Value in the table of interfaces of the primary DT. This + -- data will be used by the subprogram "Displace" to give support to + -- backward abstract interface type conversions. + + Obj_TSD := TSD (Prim_DT); + Iface_Table := To_Interface_Data_Ptr (Obj_TSD.Ifaces_Table_Ptr); + + -- Register the offset in the table of interfaces + + if Iface_Table /= null then + for Id in 1 .. Iface_Table.Nb_Ifaces loop + if Iface_Table.Table (Id).Iface_Tag = Interface_T then + Iface_Table.Table (Id).Offset := Offset_Value; + return; + end if; + end loop; + end if; + + -- If we arrive here there is some error in the run-time data structure + + raise Program_Error; end Set_Offset_To_Top; ------------- -- Set_OSD -- ------------- - procedure Set_OSD (T : Interface_Tag; Value : System.Address) is - OSD_Ptr : Addr_Ptr; + procedure Set_OSD (T : Tag; Value : System.Address) is + OSD_Ptr : constant Addr_Ptr := + To_Addr_Ptr (To_Address (T) - K_Typeinfo); begin - pragma Assert (Check_Signature (Tag (T), Must_Be_Secondary_DT)); - OSD_Ptr := To_Addr_Ptr (To_Address (T) - DT_Typeinfo_Ptr_Size); + pragma Assert (Check_Signature (T, Must_Be_Secondary_DT)); OSD_Ptr.all := Value; end Set_OSD; @@ -1131,6 +1334,7 @@ package body Ada.Tags is Index : constant Integer := Position - Default_Prim_Op_Count; begin pragma Assert (Check_Signature (T, Must_Be_Primary_DT)); + pragma Assert (Check_Index (T, Position)); pragma Assert (Index > 0); SSD (T).SSD_Table (Index).Kind := Value; end Set_Prim_Op_Kind; @@ -1165,6 +1369,18 @@ package body Ada.Tags is TSD (T).SSD_Ptr := Value; end Set_SSD; + --------------------- + -- Set_Tagged_Kind -- + --------------------- + + procedure Set_Tagged_Kind (T : Tag; Value : Tagged_Kind) is + Tagged_Kind_Ptr : constant System.Address := + To_Address (T) - K_Tagged_Kind; + begin + pragma Assert (Check_Signature (T, Must_Be_Primary_Or_Secondary_DT)); + To_Tagged_Kind_Ptr (Tagged_Kind_Ptr).all := Value; + end Set_Tagged_Kind; + ------------- -- Set_TSD -- ------------- @@ -1173,7 +1389,7 @@ package body Ada.Tags is TSD_Ptr : Addr_Ptr; begin pragma Assert (Check_Signature (T, Must_Be_Primary_Or_Interface)); - TSD_Ptr := To_Addr_Ptr (To_Address (T) - DT_Typeinfo_Ptr_Size); + TSD_Ptr := To_Addr_Ptr (To_Address (T) - K_Typeinfo); TSD_Ptr.all := Value; end Set_TSD; @@ -1183,6 +1399,7 @@ package body Ada.Tags is function SSD (T : Tag) return Select_Specific_Data_Ptr is begin + pragma Assert (Check_Signature (T, Must_Be_Primary_DT)); return To_Select_Specific_Data_Ptr (TSD (T).SSD_Ptr); end SSD; @@ -1192,7 +1409,7 @@ package body Ada.Tags is function Typeinfo_Ptr (T : Tag) return System.Address is TSD_Ptr : constant Addr_Ptr := - To_Addr_Ptr (To_Address (T) - DT_Typeinfo_Ptr_Size); + To_Addr_Ptr (To_Address (T) - K_Typeinfo); begin return TSD_Ptr.all; end Typeinfo_Ptr; @@ -1203,8 +1420,9 @@ package body Ada.Tags is function TSD (T : Tag) return Type_Specific_Data_Ptr is TSD_Ptr : constant Addr_Ptr := - To_Addr_Ptr (To_Address (T) - DT_Typeinfo_Ptr_Size); + To_Addr_Ptr (To_Address (T) - K_Typeinfo); begin + pragma Assert (Check_Signature (T, Must_Be_Primary_Or_Interface)); return To_Type_Specific_Data_Ptr (TSD_Ptr.all); end TSD; diff --git a/gcc/ada/a-tags.ads b/gcc/ada/a-tags.ads index 46e6c204167..25fed4f1dcb 100644 --- a/gcc/ada/a-tags.ads +++ b/gcc/ada/a-tags.ads @@ -102,6 +102,11 @@ private No_Tag : constant Tag := null; + type Interface_Data (Nb_Ifaces : Positive); + type Interface_Data_Ptr is access all Interface_Data; + -- Table of abstract interfaces used to give support to backward interface + -- conversions and also to IW_Membership. + type Object_Specific_Data (Nb_Prim : Positive); type Object_Specific_Data_Ptr is access all Object_Specific_Data; -- Information associated with the secondary dispatch table of tagged-type @@ -132,6 +137,18 @@ private POK_Task_Function, POK_Task_Procedure); + -- Tagged type kinds with respect to concurrency and limitedness + + type Tagged_Kind is + (TK_Abstract_Limited_Tagged, + TK_Abstract_Tagged, + TK_Limited_Tagged, + TK_Protected, + TK_Tagged, + TK_Task); + + type Tagged_Kind_Ptr is access all Tagged_Kind; + Default_Prim_Op_Count : constant Positive := 15; -- Number of predefined primitive operations added by the Expander for a -- tagged type. It is utilized for indexing in the two auxiliary tables @@ -160,6 +177,10 @@ private -- return O in T'Class. -- end Test; + function Displace (This : System.Address; T : Tag) return System.Address; + -- (Ada 2005 (AI-251): Displace "This" to point to the secondary dispatch + -- table of T. + function Get_Access_Level (T : Tag) return Natural; -- Given the tag associated with a type, returns the accessibility level -- of the type. @@ -173,7 +194,7 @@ private -- the external name. function Get_Offset_Index - (T : Interface_Tag; + (T : Tag; Position : Positive) return Positive; -- Given a pointer to a secondary dispatch table (T) and a position of an -- operation in the DT, retrieve the corresponding operation's position in @@ -204,6 +225,11 @@ private function Get_Remotely_Callable (T : Tag) return Boolean; -- Return the value previously set by Set_Remotely_Callable + function Get_Tagged_Kind (T : Tag) return Tagged_Kind; + -- Given a pointer to either a primary or a secondary dispatch table, + -- return the tagged kind of a type in the context of concurrency and + -- limitedness. + procedure Inherit_DT (Old_T : Tag; New_T : Tag; Entry_Count : Natural); -- Entry point used to initialize the DT of a type knowing the tag -- of the direct ancestor and the number of primitive ops that are @@ -212,7 +238,12 @@ private procedure Inherit_TSD (Old_Tag : Tag; New_Tag : Tag); -- Initialize the TSD of a type knowing the tag of the direct ancestor - function OSD (T : Interface_Tag) return Object_Specific_Data_Ptr; + function Offset_To_Top + (T : Tag) return System.Storage_Elements.Storage_Offset; + -- Returns the current value of the offset_to_top component available in + -- the prologue of the dispatch table. + + function OSD (T : Tag) return Object_Specific_Data_Ptr; -- Ada 2005 (AI-251): Given a pointer T to a secondary dispatch table, -- retrieve the address of the record containing the Objet Specific -- Data table. @@ -228,38 +259,63 @@ private pragma Export (Ada, Parent_Size, "ada__tags__parent_size"); -- This procedure is used in s-finimp and is thus exported manually - procedure Register_Interface_Tag (T : Tag; Interface_T : Tag); + procedure Register_Interface_Tag + (T : Tag; + Interface_T : Tag; + Position : Positive); -- Ada 2005 (AI-251): Used to initialize the table of interfaces - -- implemented by a type. Required to give support to IW_Membership. + -- implemented by a type. Required to give support to backward interface + -- conversions and also to IW_Membership. procedure Register_Tag (T : Tag); -- Insert the Tag and its associated external_tag in a table for the -- sake of Internal_Tag + procedure Set_Access_Level (T : Tag; Value : Natural); + -- Sets the accessibility level of the tagged type associated with T + -- in its TSD. + procedure Set_Entry_Index (T : Tag; Position : Positive; Value : Positive); -- Set the entry index of a primitive operation in T's TSD table indexed -- by Position. + procedure Set_Expanded_Name (T : Tag; Value : System.Address); + -- Set the address of the string containing the expanded name + -- in the Dispatch table. + + procedure Set_External_Tag (T : Tag; Value : System.Address); + -- Set the address of the string containing the external tag + -- in the Dispatch table. + + procedure Set_Interface_Table (T : Tag; Value : System.Address); + -- Ada 2005 (AI-251): Given a pointer T to a dispatch Table, stores the + -- pointer to the table of interfaces. + procedure Set_Num_Prim_Ops (T : Tag; Value : Natural); -- Set the number of primitive operations in the dispatch table of T. This -- is used for debugging purposes. procedure Set_Offset_Index - (T : Interface_Tag; + (T : Tag; Position : Positive; Value : Positive); -- Set the offset value of a primitive operation in a secondary dispatch -- table denoted by T, indexed by Position. procedure Set_Offset_To_Top - (T : Tag; - Value : System.Storage_Elements.Storage_Offset); + (This : System.Address; + Interface_T : Tag; + Offset_Value : System.Storage_Elements.Storage_Offset); -- Ada 2005 (AI-251): Initialize the Offset_To_Top field in the prologue of - -- the dispatch table. In primary dispatch tables the value of this field - -- is always 0; in secondary dispatch tables this is the offset to the base - -- of the enclosing type. - - procedure Set_OSD (T : Interface_Tag; Value : System.Address); + -- the dispatch table. In primary dispatch tables the value of "This" is + -- not required (and the compiler passes always the Null_Address value) and + -- the Offset_Value is always cero; in secondary dispatch tables "This" + -- points to the object, Interface_T is the interface for which the + -- secondary dispatch table is being initialized, and Offset_Value is the + -- distance from "This" to the object component containing the tag of the + -- secondary dispatch table. + + procedure Set_OSD (T : Tag; Value : System.Address); -- Given a pointer T to a secondary dispatch table, store the pointer to -- the record containing the Object Specific Data generated by GNAT. @@ -278,26 +334,6 @@ private -- Set the kind of a primitive operation in T's TSD table indexed by -- Position. - procedure Set_SSD (T : Tag; Value : System.Address); - -- Given a pointer T to a dispatch Table, stores the pointer to the record - -- containing the Select Specific Data generated by GNAT. - - procedure Set_TSD (T : Tag; Value : System.Address); - -- Given a pointer T to a dispatch Table, stores the address of the record - -- containing the Type Specific Data generated by GNAT. - - procedure Set_Access_Level (T : Tag; Value : Natural); - -- Sets the accessibility level of the tagged type associated with T - -- in its TSD. - - procedure Set_Expanded_Name (T : Tag; Value : System.Address); - -- Set the address of the string containing the expanded name - -- in the Dispatch table. - - procedure Set_External_Tag (T : Tag; Value : System.Address); - -- Set the address of the string containing the external tag - -- in the Dispatch table. - procedure Set_RC_Offset (T : Tag; Value : SSE.Storage_Offset); -- Sets the Offset of the implicit record controller when the object -- has controlled components. Set to O otherwise. @@ -306,6 +342,18 @@ private -- Set to true if the type has been declared in a context described -- in E.4 (18). + procedure Set_SSD (T : Tag; Value : System.Address); + -- Given a pointer T to a dispatch Table, stores the pointer to the record + -- containing the Select Specific Data generated by GNAT. + + procedure Set_Tagged_Kind (T : Tag; Value : Tagged_Kind); + -- Set the tagged kind of a type in either a primary or a secondary + -- dispatch table denoted by T. + + procedure Set_TSD (T : Tag; Value : System.Address); + -- Given a pointer T to a dispatch Table, stores the address of the record + -- containing the Type Specific Data generated by GNAT. + function SSD (T : Tag) return Select_Specific_Data_Ptr; -- Given a pointer T to a dispatch Table, retrieves the address of the -- record containing the Select Specific Data in T's TSD. @@ -315,33 +363,31 @@ private -- record containing the Type Specific Data generated by GNAT. DT_Prologue_Size : constant SSE.Storage_Count := - SSE.Storage_Count - (3 * (Standard'Address_Size / System.Storage_Unit)); + SSE.Storage_Count (4 * (Standard'Address_Size / System.Storage_Unit)); -- Size of the first part of the dispatch table DT_Signature_Size : constant SSE.Storage_Count := - SSE.Storage_Count - (Standard'Address_Size / System.Storage_Unit); + SSE.Storage_Count (1 * (Standard'Address_Size / System.Storage_Unit)); -- Size of the Signature field of the dispatch table + DT_Tagged_Kind_Size : constant SSE.Storage_Count := + SSE.Storage_Count (1 * (Standard'Address_Size / System.Storage_Unit)); + -- Size of the Tagged_Type_Kind field of the dispatch table + DT_Offset_To_Top_Size : constant SSE.Storage_Count := - SSE.Storage_Count - (Standard'Address_Size / System.Storage_Unit); + SSE.Storage_Count (1 * (Standard'Address_Size / System.Storage_Unit)); -- Size of the Offset_To_Top field of the Dispatch Table DT_Typeinfo_Ptr_Size : constant SSE.Storage_Count := - SSE.Storage_Count - (Standard'Address_Size / System.Storage_Unit); + SSE.Storage_Count (1 * (Standard'Address_Size / System.Storage_Unit)); -- Size of the Typeinfo_Ptr field of the Dispatch Table DT_Entry_Size : constant SSE.Storage_Count := - SSE.Storage_Count - (1 * (Standard'Address_Size / System.Storage_Unit)); + SSE.Storage_Count (1 * (Standard'Address_Size / System.Storage_Unit)); -- Size of each primitive operation entry in the Dispatch Table TSD_Prologue_Size : constant SSE.Storage_Count := - SSE.Storage_Count - (10 * (Standard'Address_Size / System.Storage_Unit)); + SSE.Storage_Count (10 * (Standard'Address_Size / System.Storage_Unit)); -- Size of the first part of the type specific data TSD_Entry_Size : constant SSE.Storage_Count := @@ -396,6 +442,9 @@ private function To_Address is new Unchecked_Conversion (Type_Specific_Data_Ptr, System.Address); + function To_Interface_Data_Ptr is + new Unchecked_Conversion (System.Address, Interface_Data_Ptr); + function To_Object_Specific_Data_Ptr is new Unchecked_Conversion (System.Address, Object_Specific_Data_Ptr); @@ -409,10 +458,14 @@ private function To_Tag_Ptr is new Unchecked_Conversion (System.Address, Tag_Ptr); + function To_Tagged_Kind_Ptr is + new Unchecked_Conversion (System.Address, Tagged_Kind_Ptr); + -- Primitive dispatching operations are always inlined, to facilitate -- use in a minimal/no run-time environment for high integrity use. pragma Inline_Always (CW_Membership); + pragma Inline_Always (Displace); pragma Inline_Always (IW_Membership); pragma Inline_Always (Get_Access_Level); pragma Inline_Always (Get_Entry_Index); @@ -421,6 +474,7 @@ private pragma Inline_Always (Get_Prim_Op_Kind); pragma Inline_Always (Get_RC_Offset); pragma Inline_Always (Get_Remotely_Callable); + pragma Inline_Always (Get_Tagged_Kind); pragma Inline_Always (Inherit_DT); pragma Inline_Always (Inherit_TSD); pragma Inline_Always (OSD); @@ -430,6 +484,7 @@ private pragma Inline_Always (Set_Entry_Index); pragma Inline_Always (Set_Expanded_Name); pragma Inline_Always (Set_External_Tag); + pragma Inline_Always (Set_Interface_Table); pragma Inline_Always (Set_Num_Prim_Ops); pragma Inline_Always (Set_Offset_Index); pragma Inline_Always (Set_Offset_To_Top); @@ -440,6 +495,7 @@ private pragma Inline_Always (Set_OSD); pragma Inline_Always (Set_SSD); pragma Inline_Always (Set_TSD); + pragma Inline_Always (Set_Tagged_Kind); pragma Inline_Always (SSD); pragma Inline_Always (TSD); diff --git a/gcc/ada/a-taside.adb b/gcc/ada/a-taside.adb index 88722ac9603..8599af7fbe3 100644 --- a/gcc/ada/a-taside.adb +++ b/gcc/ada/a-taside.adb @@ -44,7 +44,8 @@ pragma Warnings (Off); -- package will be categorized as Preelaborate. See AI-362 for details. -- It is safe in the context of the run-time to violate the rules! -with System.Tasking.Stages; +with System.Tasking.Utilities; +-- Used for Abort_Tasks pragma Warnings (On); @@ -81,7 +82,7 @@ package body Ada.Task_Identification is if T = Null_Task_Id then raise Program_Error; else - System.Tasking.Stages.Abort_Tasks + System.Tasking.Utilities.Abort_Tasks (System.Tasking.Task_List'(1 => Convert_Ids (T))); end if; end Abort_Task; diff --git a/gcc/ada/a-taster.adb b/gcc/ada/a-taster.adb new file mode 100644 index 00000000000..93374b269a3 --- /dev/null +++ b/gcc/ada/a-taster.adb @@ -0,0 +1,128 @@ +------------------------------------------------------------------------------ +-- -- +-- GNAT RUN-TIME COMPONENTS -- +-- -- +-- A D A . T A S K _ T E R M I N A T I O N -- +-- -- +-- B o d y -- +-- -- +-- Copyright (C) 2005, Free Software Foundation, Inc. -- +-- -- +-- This specification is derived from the Ada Reference Manual for use with -- +-- GNAT. The copyright notice above, and the license provisions that follow -- +-- apply solely to the contents of the part following the private keyword. -- +-- -- +-- GNAT is free software; you can redistribute it and/or modify it under -- +-- terms of the GNU General Public License as published by the Free Soft- -- +-- ware Foundation; either version 2, or (at your option) any later ver- -- +-- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- +-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- +-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- +-- for more details. You should have received a copy of the GNU General -- +-- Public License distributed with GNAT; see file COPYING. If not, write -- +-- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, -- +-- Boston, MA 02110-1301, USA. -- +-- -- +-- As a special exception, if other files instantiate generics from this -- +-- unit, or you link this unit with other files to produce an executable, -- +-- this unit 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 Public License. -- +-- -- +-- GNAT was originally developed by the GNAT team at New York University. -- +-- Extensive contributions were provided by Ada Core Technologies Inc. -- +-- -- +------------------------------------------------------------------------------ + +with System.Tasking; +-- used for Task_Id + +with System.Task_Primitives.Operations; +-- used for Self + +with Unchecked_Conversion; + +package body Ada.Task_Termination is + + use type Ada.Task_Identification.Task_Id; + + package STPO renames System.Task_Primitives.Operations; + + ----------------------- + -- Local subprograms -- + ----------------------- + + function To_TT is new Unchecked_Conversion + (System.Tasking.Termination_Handler, Termination_Handler); + + function To_ST is new Unchecked_Conversion + (Termination_Handler, System.Tasking.Termination_Handler); + + function To_Task_Id is new Unchecked_Conversion + (Ada.Task_Identification.Task_Id, System.Tasking.Task_Id); + + ----------------------------------- + -- Current_Task_Fallback_Handler -- + ----------------------------------- + + function Current_Task_Fallback_Handler return Termination_Handler is + begin + return To_TT (System.Tasking.Self.Common.Fall_Back_Handler); + end Current_Task_Fallback_Handler; + + ------------------------------------- + -- Set_Dependents_Fallback_Handler -- + ------------------------------------- + + procedure Set_Dependents_Fallback_Handler + (Handler : Termination_Handler) + is + begin + STPO.Self.Common.Fall_Back_Handler := To_ST (Handler); + end Set_Dependents_Fallback_Handler; + + -------------------------- + -- Set_Specific_Handler -- + -------------------------- + + procedure Set_Specific_Handler + (T : Ada.Task_Identification.Task_Id; + Handler : Termination_Handler) + is + begin + -- Tasking_Error is raised if the task identified by T has already + -- terminated. Program_Error is raised if the value of T is + -- Null_Task_Id. + + if T = Ada.Task_Identification.Null_Task_Id then + raise Program_Error; + elsif Ada.Task_Identification.Is_Terminated (T) then + raise Tasking_Error; + else + To_Task_Id (T).Common.Specific_Handler := To_ST (Handler); + end if; + end Set_Specific_Handler; + + ---------------------- + -- Specific_Handler -- + ---------------------- + + function Specific_Handler + (T : Ada.Task_Identification.Task_Id) return Termination_Handler + is + begin + -- Tasking_Error is raised if the task identified by T has already + -- terminated. Program_Error is raised if the value of T is + -- Null_Task_Id. + + if T = Ada.Task_Identification.Null_Task_Id then + raise Program_Error; + elsif Ada.Task_Identification.Is_Terminated (T) then + raise Tasking_Error; + else + return To_TT (To_Task_Id (T).Common.Specific_Handler); + end if; + end Specific_Handler; + +end Ada.Task_Termination; diff --git a/gcc/ada/a-taster.ads b/gcc/ada/a-taster.ads new file mode 100644 index 00000000000..5a496a83e5b --- /dev/null +++ b/gcc/ada/a-taster.ads @@ -0,0 +1,43 @@ +------------------------------------------------------------------------------ +-- -- +-- GNAT RUN-TIME COMPONENTS -- +-- -- +-- A D A . T A S K _ T E R M I N A T I O N -- +-- -- +-- S p e c -- +-- -- +-- Copyright (C) 2005, Free Software Foundation, Inc. -- +-- -- +-- This specification is derived from the Ada Reference Manual for use with -- +-- GNAT. The copyright notice above, and the license provisions that follow -- +-- apply solely to the contents of the part following the private keyword. -- +-- -- +-- GNAT was originally developed by the GNAT team at New York University. -- +-- Extensive contributions were provided by Ada Core Technologies Inc. -- +-- -- +------------------------------------------------------------------------------ + +with Ada.Task_Identification; +with Ada.Exceptions; + +package Ada.Task_Termination is + pragma Preelaborate (Task_Termination); + + type Cause_Of_Termination is (Normal, Abnormal, Unhandled_Exception); + + type Termination_Handler is access protected procedure + (Cause : Cause_Of_Termination; + T : Ada.Task_Identification.Task_Id; + X : Ada.Exceptions.Exception_Occurrence); + + procedure Set_Dependents_Fallback_Handler + (Handler : Termination_Handler); + function Current_Task_Fallback_Handler return Termination_Handler; + + procedure Set_Specific_Handler + (T : Ada.Task_Identification.Task_Id; + Handler : Termination_Handler); + function Specific_Handler + (T : Ada.Task_Identification.Task_Id) return Termination_Handler; + +end Ada.Task_Termination; diff --git a/gcc/ada/adaint.c b/gcc/ada/adaint.c index d73665be1da..7594e7ba4f8 100644 --- a/gcc/ada/adaint.c +++ b/gcc/ada/adaint.c @@ -1960,6 +1960,11 @@ __gnat_locate_regular_file (char *file_name, char *path_val) char *file_path = alloca (strlen (file_name) + 1); int absolute; + /* Return immediately if file_name is empty */ + + if (*file_name == '\0') + return 0; + /* Remove quotes around file_name if present */ ptr = file_name; diff --git a/gcc/ada/bindgen.adb b/gcc/ada/bindgen.adb index 99625301d48..b64798f486a 100644 --- a/gcc/ada/bindgen.adb +++ b/gcc/ada/bindgen.adb @@ -1268,6 +1268,22 @@ package body Bindgen is WBI (" pragma Import (C, finalize, ""__gnat_finalize"");"); end if; + -- If we want to analyze the stack, we have to import corresponding + -- symbols + + if Dynamic_Stack_Measurement then + WBI (""); + WBI (" procedure Output_Results;"); + WBI (" pragma Import (C, Output_Results, " & + """__gnat_stack_usage_output_results"");"); + + WBI (""); + WBI (" " & + "procedure Initialize_Stack_Analysis (Buffer_Size : Natural);"); + WBI (" pragma Import (C, Initialize_Stack_Analysis, " & + """__gnat_stack_usage_initialize"");"); + end if; + -- Deal with declarations for main program case if not No_Main_Subprogram then @@ -1360,6 +1376,13 @@ package body Bindgen is Write_Statement_Buffer; end if; + if Dynamic_Stack_Measurement then + Set_String (" Initialize_Stack_Analysis ("); + Set_Int (Dynamic_Stack_Measurement_Array_Size); + Set_String (");"); + Write_Statement_Buffer; + end if; + if not Cumulative_Restrictions.Set (No_Finalization) then if not No_Main_Subprogram @@ -1398,6 +1421,12 @@ package body Bindgen is end if; end if; + -- Prints the result of static stack analysis + + if Dynamic_Stack_Measurement then + WBI (" Output_Results;"); + end if; + -- Finalize is only called if we have a run time if not Cumulative_Restrictions.Set (No_Finalization) then @@ -1506,6 +1535,15 @@ package body Bindgen is Write_Statement_Buffer; end if; + -- Initializes dynamic stack measurement if needed + + if Dynamic_Stack_Measurement then + Set_String (" __gnat_stack_usage_initialize ("); + Set_Int (Dynamic_Stack_Measurement_Array_Size); + Set_String (");"); + Write_Statement_Buffer; + end if; + -- The __gnat_initialize routine is used only if we have a run-time if not Suppress_Standard_Library_On_Target then @@ -1552,6 +1590,12 @@ package body Bindgen is WBI (" system__standard_library__adafinal ();"); end if; + -- Outputs the dynamic stack measurement if needed + + if Dynamic_Stack_Measurement then + WBI (" __gnat_stack_usage_output_results ();"); + end if; + -- The finalize routine is used only if we have a run-time if not Suppress_Standard_Library_On_Target then @@ -1681,7 +1725,7 @@ package body Bindgen is -- filename object is seen. Multiply defined symbols will -- result. - if Hostparm.OpenVMS + if OpenVMS_On_Target and then Is_Internal_File_Name (ALIs.Table (Units.Table (Elab_Order.Table (E)).My_ALI).Sfile) @@ -2244,6 +2288,12 @@ package body Bindgen is WBI ("extern void __gnat_install_handler (void);"); end if; + if Dynamic_Stack_Measurement then + WBI (""); + WBI ("extern void __gnat_stack_usage_output_results (void);"); + WBI ("extern void __gnat_stack_usage_initialize (int size);"); + end if; + WBI (""); Gen_Elab_Defs_C; @@ -2780,7 +2830,7 @@ package body Bindgen is With_GNARL := True; end if; - if Hostparm.OpenVMS and then Name_Buffer (1 .. 5) = "dec%s" then + if OpenVMS_On_Target and then Name_Buffer (1 .. 5) = "dec%s" then With_DECGNAT := True; end if; end loop; diff --git a/gcc/ada/bindusg.adb b/gcc/ada/bindusg.adb index 667c982efb9..046b6aa142b 100644 --- a/gcc/ada/bindusg.adb +++ b/gcc/ada/bindusg.adb @@ -214,6 +214,12 @@ begin Write_Str (" -Tn Set time slice value to n milliseconds (n >= 0)"); Write_Eol; + -- Line for -u switch + + Write_Str (" -un Enable dynamic stack analysis, with n results "); + Write_Str ("stored"); + Write_Eol; + -- Line for -v switch Write_Str (" -v Verbose mode. Error messages, "); diff --git a/gcc/ada/butil.adb b/gcc/ada/butil.adb index 1366313c4e6..fe630890494 100644 --- a/gcc/ada/butil.adb +++ b/gcc/ada/butil.adb @@ -24,9 +24,9 @@ -- -- ------------------------------------------------------------------------------ -with Hostparm; use Hostparm; with Namet; use Namet; with Output; use Output; +with Targparm; use Targparm; package body Butil is @@ -45,11 +45,11 @@ package body Butil is or else Name_Buffer (1 .. 5) = "gnat.")) or else - (OpenVMS - and then Name_Len > 3 - and then (Name_Buffer (1 .. 4) = "dec%" - or else - Name_Buffer (1 .. 4) = "dec.")); + (OpenVMS_On_Target + and then Name_Len > 3 + and then (Name_Buffer (1 .. 4) = "dec%" + or else + Name_Buffer (1 .. 4) = "dec.")); end Is_Internal_Unit; diff --git a/gcc/ada/clean.adb b/gcc/ada/clean.adb index e5682d08b30..5d8fc0d273d 100644 --- a/gcc/ada/clean.adb +++ b/gcc/ada/clean.adb @@ -27,7 +27,6 @@ with ALI; use ALI; with Csets; with Gnatvsn; -with Hostparm; with Makeutl; with MLib.Tgt; use MLib.Tgt; with Namet; use Namet; @@ -41,6 +40,7 @@ with Prj.Pars; with Prj.Util; use Prj.Util; with Snames; with Table; +with Targparm; use Targparm; with Types; use Types; with Ada.Command_Line; use Ada.Command_Line; @@ -60,16 +60,16 @@ package body Clean is Assembly_Suffix : constant String := ".s"; ALI_Suffix : constant String := ".ali"; Tree_Suffix : constant String := ".adt"; - Object_Suffix : constant String := Get_Object_Suffix.all; + Object_Suffix : constant String := Get_Target_Object_Suffix.all; Debug_Suffix : String := ".dg"; -- Changed to "_dg" for VMS in the body of the package Repinfo_Suffix : String := ".rep"; -- Changed to "_rep" for VMS in the body of the package - B_Start : String := "b~"; - -- Prefix of binder generated file. - -- Changed to "b$" for VMS in the body of the package. + B_Start : String_Ptr := new String'("b~"); + -- Prefix of binder generated file, and number of actual characters used. + -- Changed to "b__" for VMS in the body of the package. Object_Directory_Path : String_Access := null; -- The path name of the object directory, set with switch -D @@ -1240,7 +1240,7 @@ package body Clean is -- Build the file name (before the extension) - File_Name (1 .. B_Start'Length) := B_Start; + File_Name (1 .. B_Start'Length) := B_Start.all; File_Name (B_Start'Length + 1 .. Last) := Source_Name; -- Spec @@ -1899,9 +1899,9 @@ package body Clean is end Usage; begin - if Hostparm.OpenVMS then + if OpenVMS_On_Target then Debug_Suffix (Debug_Suffix'First) := '_'; Repinfo_Suffix (Repinfo_Suffix'First) := '_'; - B_Start (B_Start'Last) := '$'; + B_Start := new String'("b__"); end if; end Clean; diff --git a/gcc/ada/decl.c b/gcc/ada/decl.c index bbbb471a3ae..b64463a53b6 100644 --- a/gcc/ada/decl.c +++ b/gcc/ada/decl.c @@ -765,14 +765,16 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition) the renamed entity or if we need to make a pointer. */ else { - bool stabilized; + bool stabilized = false; tree maybe_stable_expr = NULL_TREE; /* Case 2: If the renaming entity need not be materialized and the renamed expression is something we can stabilize, use - that for the renaming after forcing the evaluation of any - SAVE_EXPR. At the global level, we can only do this if we - know no SAVE_EXPRs will be made. */ + that for the renaming. At the global level, we can only do + this if we know no SAVE_EXPRs need be made, because the + expression we return might be used in arbitrary conditional + branches so we must force the SAVE_EXPRs evaluation + immediately and this requires a function context. */ if (!Materialize_Entity (gnat_entity) && (!global_bindings_p () || (staticp (gnu_expr) @@ -812,21 +814,35 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition) object, we just make a "bare" pointer, and the renamed entity is always accessed indirectly through it. */ { - bool has_side_effects = TREE_SIDE_EFFECTS (gnu_expr); + bool expr_has_side_effects = TREE_SIDE_EFFECTS (gnu_expr); + inner_const_flag = TREE_READONLY (gnu_expr); const_flag = true; gnu_type = build_reference_type (gnu_type); - /* If a previous attempt at unrestricted - stabilization failed, there is no point trying - again and we can reuse the result without - attaching it to the pointer. */ + /* If a previous attempt at unrestricted stabilization + failed, there is no point trying again and we can reuse + the result without attaching it to the pointer. */ if (maybe_stable_expr) ; /* Otherwise, try to stabilize now, restricting to lvalues only, and attach the expression to the pointer - if the stabilization succeeds. */ + if the stabilization succeeds. + + Note that this might introduce SAVE_EXPRs and we don't + check whether we're at the global level or not. This is + fine since we are building a pointer initializer and + neither the pointer nor the initializing expression can + be accessed before the pointer elaboration has taken + place in a correct program. + + SAVE_EXPRs will be evaluated at the right spots by either + create_var_decl->expand_decl_init for the non-global case + or build_unit_elab for the global case, and will be + attached to the elaboration procedure by the RTL expander + in the latter case. We have no need to force an early + evaluation here. */ else { maybe_stable_expr @@ -842,15 +858,13 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition) gnu_expr = build_unary_op (ADDR_EXPR, gnu_type, maybe_stable_expr); - if (!global_bindings_p ()) - { - /* If the original expression had side effects, put a - SAVE_EXPR around this whole thing. */ - if (has_side_effects) - gnu_expr = save_expr (gnu_expr); - - add_stmt (gnu_expr); - } + /* If the initial expression has side effects, we might + still have an unstabilized version at this point (for + instance if it involves a function call). Wrap the + result into a SAVE_EXPR now, in case it happens to be + referenced several times. */ + if (expr_has_side_effects && ! stabilized) + gnu_expr = save_expr (gnu_expr); gnu_size = NULL_TREE; used_by_ref = true; @@ -1001,16 +1015,16 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition) gnu_alloc_type = TREE_TYPE (TREE_CHAIN (TYPE_FIELDS (gnu_alloc_type))); - if (TREE_CODE (gnu_expr) == CONSTRUCTOR - && VEC_length (constructor_elt, - CONSTRUCTOR_ELTS (gnu_expr)) == 1) - gnu_expr = 0; - else - gnu_expr - = build_component_ref - (gnu_expr, NULL_TREE, - TREE_CHAIN (TYPE_FIELDS (TREE_TYPE (gnu_expr))), - false); + if (TREE_CODE (gnu_expr) == CONSTRUCTOR + && 1 == VEC_length (constructor_elt, + CONSTRUCTOR_ELTS (gnu_expr))) + gnu_expr = 0; + else + gnu_expr + = build_component_ref + (gnu_expr, NULL_TREE, + TREE_CHAIN (TYPE_FIELDS (TREE_TYPE (gnu_expr))), + false); } if (TREE_CODE (TYPE_SIZE_UNIT (gnu_alloc_type)) == INTEGER_CST @@ -5676,27 +5690,22 @@ components_to_record (tree gnu_record_type, Node_Id component_list, /* If we have any items in our rep'ed field list, it is not the case that all the fields in the record have rep clauses, and P_REP_LIST is nonzero, - set it and ignore the items. Otherwise, sort the fields by bit position - and put them into their own record if we have any fields without - rep clauses. */ + set it and ignore the items. */ if (gnu_our_rep_list && p_gnu_rep_list && !all_rep) *p_gnu_rep_list = chainon (*p_gnu_rep_list, gnu_our_rep_list); else if (gnu_our_rep_list) { + /* Otherwise, sort the fields by bit position and put them into their + own record if we have any fields without rep clauses. */ tree gnu_rep_type = (gnu_field_list ? make_node (RECORD_TYPE) : gnu_record_type); int len = list_length (gnu_our_rep_list); tree *gnu_arr = (tree *) alloca (sizeof (tree) * len); int i; - /* Set/abuse DECL_FCONTEXT to increasing integers so we have a - stable sort. */ for (i = 0, gnu_field = gnu_our_rep_list; gnu_field; gnu_field = TREE_CHAIN (gnu_field), i++) - { - gnu_arr[i] = gnu_field; - DECL_FCONTEXT (gnu_field) = size_int (i); - } + gnu_arr[i] = gnu_field; qsort (gnu_arr, len, sizeof (tree), compare_field_bitpos); @@ -5708,7 +5717,6 @@ components_to_record (tree gnu_record_type, Node_Id component_list, TREE_CHAIN (gnu_arr[i]) = gnu_our_rep_list; gnu_our_rep_list = gnu_arr[i]; DECL_CONTEXT (gnu_arr[i]) = gnu_rep_type; - DECL_FCONTEXT (gnu_arr[i]) = NULL_TREE; } if (gnu_field_list) @@ -5734,7 +5742,8 @@ components_to_record (tree gnu_record_type, Node_Id component_list, } /* Called via qsort from the above. Returns -1, 1, depending on the - bit positions and ordinals of the two fields. */ + bit positions and ordinals of the two fields. Use DECL_UID to ensure + a stable sort. */ static int compare_field_bitpos (const PTR rt1, const PTR rt2) @@ -5743,9 +5752,7 @@ compare_field_bitpos (const PTR rt1, const PTR rt2) tree *t2 = (tree *) rt2; if (tree_int_cst_equal (bit_position (*t1), bit_position (*t2))) - return - (tree_int_cst_lt (DECL_FCONTEXT (*t1), DECL_FCONTEXT (*t2)) - ? -1 : 1); + return DECL_UID (*t1) < DECL_UID (*t2) ? -1 : 1; else if (tree_int_cst_lt (bit_position (*t1), bit_position (*t2))) return -1; else diff --git a/gcc/ada/einfo.adb b/gcc/ada/einfo.adb index c126bd88e33..4a9eb8b8881 100644 --- a/gcc/ada/einfo.adb +++ b/gcc/ada/einfo.adb @@ -452,8 +452,8 @@ package body Einfo is -- Is_Task_Interface Flag200 -- Has_Anon_Block_Suffix Flag201 + -- Itype_Printed Flag202 - -- (unused) Flag202 -- (unused) Flag203 -- (unused) Flag204 -- (unused) Flag205 @@ -1877,6 +1877,7 @@ package body Einfo is function Is_Volatile (Id : E) return B is begin pragma Assert (Nkind (Id) in N_Entity); + if Is_Type (Id) then return Flag16 (Base_Type (Id)); else @@ -1884,6 +1885,12 @@ package body Einfo is end if; end Is_Volatile; + function Itype_Printed (Id : E) return B is + begin + pragma Assert (Is_Itype (Id)); + return Flag202 (Id); + end Itype_Printed; + function Kill_Elaboration_Checks (Id : E) return B is begin return Flag32 (Id); @@ -4016,6 +4023,12 @@ package body Einfo is Set_Flag16 (Id, V); end Set_Is_Volatile; + procedure Set_Itype_Printed (Id : E; V : B := True) is + begin + pragma Assert (Is_Itype (Id)); + Set_Flag202 (Id, V); + end Set_Itype_Printed; + procedure Set_Kill_Elaboration_Checks (Id : E; V : B := True) is begin Set_Flag32 (Id, V); @@ -5722,6 +5735,7 @@ package body Einfo is function Is_Limited_Type (Id : E) return B is Btype : constant E := Base_Type (Id); + Rtype : constant E := Root_Type (Btype); begin if not Is_Type (Id) then @@ -5744,11 +5758,17 @@ package body Einfo is return False; elsif Is_Record_Type (Btype) then - if Is_Limited_Record (Root_Type (Btype)) then - return True; + + -- AI-419: limitedness is not inherited from a limited interface + + if Is_Limited_Record (Rtype) then + return not Is_Interface (Rtype) + or else Is_Protected_Interface (Rtype) + or else Is_Synchronized_Interface (Rtype) + or else Is_Task_Interface (Rtype); elsif Is_Class_Wide_Type (Btype) then - return Is_Limited_Type (Root_Type (Btype)); + return Is_Limited_Type (Rtype); else declare @@ -5813,6 +5833,8 @@ package body Einfo is -- Is_Return_By_Reference_Type -- --------------------------------- + -- Note: this predicate has disappeared from Ada 2005: see AI-318-2 + function Is_Return_By_Reference_Type (Id : E) return B is Btype : constant Entity_Id := Base_Type (Id); @@ -5820,7 +5842,6 @@ package body Einfo is if Is_Private_Type (Btype) then declare Utyp : constant Entity_Id := Underlying_Type (Btype); - begin if No (Utyp) then return False; @@ -5834,7 +5855,10 @@ package body Einfo is elsif Is_Record_Type (Btype) then if Is_Limited_Record (Btype) then - return True; + return not Is_Interface (Btype) + or else Is_Protected_Interface (Btype) + or else Is_Synchronized_Interface (Btype) + or else Is_Task_Interface (Btype); elsif Is_Class_Wide_Type (Btype) then return Is_Return_By_Reference_Type (Root_Type (Btype)); @@ -6700,6 +6724,7 @@ package body Einfo is W ("Is_Valued_Procedure", Flag127 (Id)); W ("Is_Visible_Child_Unit", Flag116 (Id)); W ("Is_Volatile", Flag16 (Id)); + W ("Itype_Printed", Flag202 (Id)); W ("Kill_Elaboration_Checks", Flag32 (Id)); W ("Kill_Range_Checks", Flag33 (Id)); W ("Kill_Tag_Checks", Flag34 (Id)); diff --git a/gcc/ada/einfo.ads b/gcc/ada/einfo.ads index fa1e5841674..290fd44c15d 100644 --- a/gcc/ada/einfo.ads +++ b/gcc/ada/einfo.ads @@ -2469,6 +2469,10 @@ package Einfo is -- Present in package entities. Indicates that the package has been -- created as a wrapper for a subprogram instantiation. +-- Itype_Printed (Flag202) +-- Set in Itypes if the Itype has been printed by Sprint. This is used to +-- avoid printing an Itype more than once. + -- Kill_Elaboration_Checks (Flag32) -- Present in all entities. Set by the expander to kill elaboration -- checks which are known not to be needed. Equivalent in effect to @@ -4166,6 +4170,7 @@ package Einfo is -- Is_Tagged_Type (Flag55) -- Is_Unsigned_Type (Flag144) -- Is_Volatile (Flag16) + -- Itype_Printed (Flag202) (itypes only) -- Must_Be_On_Byte_Boundary (Flag183) -- Size_Depends_On_Discriminant (Flag177) -- Size_Known_At_Compile_Time (Flag92) @@ -5363,7 +5368,6 @@ package Einfo is function Is_Potentially_Use_Visible (Id : E) return B; function Is_Preelaborated (Id : E) return B; function Is_Primitive_Wrapper (Id : E) return B; - function Is_Private_Composite (Id : E) return B; function Is_Private_Descendant (Id : E) return B; function Is_Protected_Interface (Id : E) return B; @@ -5387,7 +5391,7 @@ package Einfo is function Is_Valued_Procedure (Id : E) return B; function Is_Visible_Child_Unit (Id : E) return B; function Is_Volatile (Id : E) return B; - function Is_Wrapper_Package (Id : E) return B; + function Itype_Printed (Id : E) return B; function Kill_Elaboration_Checks (Id : E) return B; function Kill_Range_Checks (Id : E) return B; function Kill_Tag_Checks (Id : E) return B; @@ -5567,6 +5571,7 @@ package Einfo is function Is_Return_By_Reference_Type (Id : E) return B; function Is_String_Type (Id : E) return B; function Is_Task_Record_Type (Id : E) return B; + function Is_Wrapper_Package (Id : E) return B; function Next_Component (Id : E) return E; function Next_Discriminant (Id : E) return E; function Next_Formal (Id : E) return E; @@ -5890,6 +5895,7 @@ package Einfo is procedure Set_Is_Valued_Procedure (Id : E; V : B := True); procedure Set_Is_Visible_Child_Unit (Id : E; V : B := True); procedure Set_Is_Volatile (Id : E; V : B := True); + procedure Set_Itype_Printed (Id : E; V : B := True); procedure Set_Kill_Elaboration_Checks (Id : E; V : B := True); procedure Set_Kill_Range_Checks (Id : E; V : B := True); procedure Set_Kill_Tag_Checks (Id : E; V : B := True); @@ -6445,7 +6451,6 @@ package Einfo is pragma Inline (Is_Potentially_Use_Visible); pragma Inline (Is_Preelaborated); pragma Inline (Is_Primitive_Wrapper); - pragma Inline (Is_Private_Composite); pragma Inline (Is_Private_Descendant); pragma Inline (Is_Private_Type); @@ -6477,6 +6482,7 @@ package Einfo is pragma Inline (Is_VMS_Exception); pragma Inline (Is_Valued_Procedure); pragma Inline (Is_Visible_Child_Unit); + pragma Inline (Itype_Printed); pragma Inline (Kill_Elaboration_Checks); pragma Inline (Kill_Range_Checks); pragma Inline (Kill_Tag_Checks); @@ -6788,7 +6794,6 @@ package Einfo is pragma Inline (Set_Is_Potentially_Use_Visible); pragma Inline (Set_Is_Preelaborated); pragma Inline (Set_Is_Primitive_Wrapper); - pragma Inline (Set_Is_Private_Composite); pragma Inline (Set_Is_Private_Descendant); pragma Inline (Set_Is_Protected_Interface); @@ -6812,6 +6817,7 @@ package Einfo is pragma Inline (Set_Is_Valued_Procedure); pragma Inline (Set_Is_Visible_Child_Unit); pragma Inline (Set_Is_Volatile); + pragma Inline (Set_Itype_Printed); pragma Inline (Set_Kill_Elaboration_Checks); pragma Inline (Set_Kill_Range_Checks); pragma Inline (Set_Kill_Tag_Checks); @@ -6909,6 +6915,7 @@ package Einfo is -- access/set format that can be handled by xeinfo. pragma Inline (Is_Package_Or_Generic_Package); + pragma Inline (Is_Volatile); pragma Inline (Is_Wrapper_Package); pragma Inline (Known_RM_Size); pragma Inline (Known_Static_Component_Bit_Offset); diff --git a/gcc/ada/exp_aggr.adb b/gcc/ada/exp_aggr.adb index 6699b422c24..9c9508fa5cc 100644 --- a/gcc/ada/exp_aggr.adb +++ b/gcc/ada/exp_aggr.adb @@ -2358,10 +2358,11 @@ package body Exp_Aggr is while Present (Comp) loop Selector := Entity (First (Choices (Comp))); - -- Ada 2005 (AI-287): Default initialization of a limited component + -- Ada 2005 (AI-287): For each default-initialized component genarate + -- a call to the corresponding IP subprogram if available. if Box_Present (Comp) - and then Is_Limited_Type (Etype (Selector)) + and then Has_Non_Null_Base_Init_Proc (Etype (Selector)) then -- Ada 2005 (AI-287): If the component type has tasks then -- generate the activation chain and master entities (except diff --git a/gcc/ada/exp_aggr.ads b/gcc/ada/exp_aggr.ads index 6c0ad947cae..664e654a999 100644 --- a/gcc/ada/exp_aggr.ads +++ b/gcc/ada/exp_aggr.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2003 Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2005, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -43,12 +43,9 @@ package Exp_Aggr is -- Decl is an access N_Object_Declaration (produced during -- allocator expansion), Aggr is the initial expression aggregate -- of an allocator. This procedure perform in-place aggregate - -- assignent in the newly allocated object. + -- assignment in the newly allocated object. procedure Convert_Aggr_In_Assignment (N : Node_Id); - -- Decl is an access N_Object_Declaration (produced during - -- allocator expansion), Aggr is the initial expression aggregate - -- of an allocator. This procedure perform in-place aggregate - -- assignent in the newly allocated object. + -- ??? documentation needed end Exp_Aggr; diff --git a/gcc/ada/exp_ch3.adb b/gcc/ada/exp_ch3.adb index 3feb7d33aaa..6a975e6d68a 100644 --- a/gcc/ada/exp_ch3.adb +++ b/gcc/ada/exp_ch3.adb @@ -1760,20 +1760,18 @@ package body Exp_Ch3 is procedure Init_Secondary_Tags_Internal (Typ : Entity_Id) is E : Entity_Id; Aux_N : Node_Id; + Iface : Entity_Id; begin - if not Is_Interface (Typ) then + -- Climb to the ancestor (if any) handling private types - -- Climb to the ancestor (if any) handling private types - - if Present (Full_View (Etype (Typ))) then - if Full_View (Etype (Typ)) /= Typ then - Init_Secondary_Tags_Internal (Full_View (Etype (Typ))); - end if; - - elsif Etype (Typ) /= Typ then - Init_Secondary_Tags_Internal (Etype (Typ)); + if Present (Full_View (Etype (Typ))) then + if Full_View (Etype (Typ)) /= Typ then + Init_Secondary_Tags_Internal (Full_View (Etype (Typ))); end if; + + elsif Etype (Typ) /= Typ then + Init_Secondary_Tags_Internal (Etype (Typ)); end if; if Present (Abstract_Interfaces (Typ)) @@ -1787,6 +1785,8 @@ package body Exp_Ch3 is Aux_N := Node (ADT); pragma Assert (Present (Aux_N)); + Iface := Find_Interface (Typ, E); + -- Initialize the pointer to the secondary DT -- associated with the interface @@ -1801,15 +1801,23 @@ package body Exp_Ch3 is New_Reference_To (Aux_N, Loc))); -- Generate: - -- Set_Offset_To_Top (DT_Ptr, n); + -- Set_Offset_To_Top (Init, Iface'Tag, n); Append_To (Body_Stmts, Make_Procedure_Call_Statement (Loc, Name => New_Reference_To (RTE (RE_Set_Offset_To_Top), Loc), Parameter_Associations => New_List ( + Make_Attribute_Reference (Loc, + Prefix => Make_Identifier (Loc, Name_uInit), + Attribute_Name => Name_Address), + Unchecked_Convert_To (RTE (RE_Tag), - New_Reference_To (Aux_N, Loc)), + New_Reference_To + (Node (First_Elmt + (Access_Disp_Table (Iface))), + Loc)), + Unchecked_Convert_To (RTE (RE_Storage_Offset), Make_Attribute_Reference (Loc, Prefix => @@ -2118,7 +2126,9 @@ package body Exp_Ch3 is -- Case of composite component with its own Init_Proc - elsif Has_Non_Null_Base_Init_Proc (Typ) then + elsif not Is_Interface (Typ) + and then Has_Non_Null_Base_Init_Proc (Typ) + then Stmts := Build_Initialization_Call (Loc, @@ -4743,18 +4753,15 @@ package body Exp_Ch3 is Append_Freeze_Actions (Def_Id, Predef_List); -- Populate the two auxiliary tables used for dispatching - -- asynchronous, conditional and timed selects for tagged + -- asynchronous, conditional and timed selects for synchronized -- types that implement a limited interface. if Ada_Version >= Ada_05 - and then not Is_Interface (Def_Id) - and then not Is_Abstract (Def_Id) - and then not Is_Controlled (Def_Id) - and then - Implements_Interface - (Typ => Def_Id, - Kind => Any_Limited_Interface, - Check_Parent => True) + and then Is_Concurrent_Record_Type (Def_Id) + and then Implements_Interface ( + Typ => Def_Id, + Kind => Any_Limited_Interface, + Check_Parent => True) then Append_Freeze_Actions (Def_Id, Make_Select_Specific_Data_Table (Def_Id)); @@ -5950,26 +5957,25 @@ package body Exp_Ch3 is end if; -- Generate the declarations for the following primitive operations: + -- disp_asynchronous_select -- disp_conditional_select -- disp_get_prim_op_kind -- disp_get_task_id -- disp_timed_select - -- for limited interfaces and tagged types that implement a limited - -- interface. + + -- for limited interfaces and synchronized types that implement a + -- limited interface. if Ada_Version >= Ada_05 and then - ((Is_Interface (Tag_Typ) - and then Is_Limited_Record (Tag_Typ)) - or else - (not Is_Abstract (Tag_Typ) - and then not Is_Controlled (Tag_Typ) - and then - Implements_Interface - (Typ => Tag_Typ, - Kind => Any_Limited_Interface, - Check_Parent => True))) + ((Is_Interface (Tag_Typ) and then Is_Limited_Record (Tag_Typ)) + or else + (Is_Concurrent_Record_Type (Tag_Typ) + and then Implements_Interface ( + Typ => Tag_Typ, + Kind => Any_Limited_Interface, + Check_Parent => True))) then Append_To (Res, Make_Subprogram_Declaration (Loc, @@ -6360,20 +6366,18 @@ package body Exp_Ch3 is -- disp_get_task_id -- disp_timed_select - -- for limited interfaces and tagged types that implement a limited - -- interface. The interface versions will have null bodies. + -- for limited interfaces and synchronized types that implement a + -- limited interface. The interface versions will have null bodies. if Ada_Version >= Ada_05 and then ((Is_Interface (Tag_Typ) and then Is_Limited_Record (Tag_Typ)) or else - (not Is_Abstract (Tag_Typ) - and then not Is_Controlled (Tag_Typ) - and then - Implements_Interface - (Typ => Tag_Typ, - Kind => Any_Limited_Interface, - Check_Parent => True))) + (Is_Concurrent_Record_Type (Tag_Typ) + and then Implements_Interface ( + Typ => Tag_Typ, + Kind => Any_Limited_Interface, + Check_Parent => True))) then Append_To (Res, Make_Disp_Asynchronous_Select_Body (Tag_Typ)); Append_To (Res, Make_Disp_Conditional_Select_Body (Tag_Typ)); diff --git a/gcc/ada/exp_ch4.adb b/gcc/ada/exp_ch4.adb index 2e1f38f88e4..e1da11baedf 100644 --- a/gcc/ada/exp_ch4.adb +++ b/gcc/ada/exp_ch4.adb @@ -192,10 +192,12 @@ package body Exp_Ch4 is -- this by using Convert_To_Actual_Subtype if necessary). procedure Rewrite_Comparison (N : Node_Id); - -- N is the node for a compile time comparison. If this outcome of this - -- comparison can be determined at compile time, then the node N can be - -- rewritten with True or False. If the outcome cannot be determined at - -- compile time, the call has no effect. + -- if N is the node for a comparison whose outcome can be determined at + -- compile time, then the node N can be rewritten with True or False. If + -- the outcome cannot be determined at compile time, the call has no + -- effect. If N is a type conversion, then this processing is applied to + -- its expression. If N is neither comparison nor a type conversion, the + -- call has no effect. function Tagged_Membership (N : Node_Id) return Node_Id; -- Construct the expression corresponding to the tagged membership test. @@ -372,6 +374,12 @@ package body Exp_Ch4 is Node : Node_Id; Temp : Entity_Id; + TagT : Entity_Id := Empty; + -- Type used as source for tag assignment + + TagR : Node_Id := Empty; + -- Target reference for tag assignment + Aggr_In_Place : constant Boolean := Is_Delayed_Aggregate (Exp); Tag_Assign : Node_Id; @@ -484,61 +492,46 @@ package body Exp_Ch4 is Reason => PE_Accessibility_Check_Failed)); end if; - -- Suppress the tag assignment when Java_VM because JVM tags - -- are represented implicitly in objects. + if Java_VM then - if Is_Tagged_Type (T) - and then not Is_Class_Wide_Type (T) - and then not Java_VM + -- Suppress the tag assignment when Java_VM because JVM tags + -- are represented implicitly in objects. + + null; + + elsif Is_Tagged_Type (T) and then not Is_Class_Wide_Type (T) then + TagT := T; + TagR := New_Reference_To (Temp, Loc); + + elsif Is_Private_Type (T) + and then Is_Tagged_Type (Underlying_Type (T)) then + TagT := Underlying_Type (T); + TagR := Unchecked_Convert_To (Underlying_Type (T), + Make_Explicit_Dereference (Loc, + New_Reference_To (Temp, Loc))); + + end if; + + if Present (TagT) then Tag_Assign := Make_Assignment_Statement (Loc, Name => Make_Selected_Component (Loc, - Prefix => New_Reference_To (Temp, Loc), + Prefix => TagR, Selector_Name => - New_Reference_To (First_Tag_Component (T), Loc)), + New_Reference_To (First_Tag_Component (TagT), Loc)), Expression => Unchecked_Convert_To (RTE (RE_Tag), New_Reference_To - (Elists.Node (First_Elmt (Access_Disp_Table (T))), + (Elists.Node (First_Elmt (Access_Disp_Table (TagT))), Loc))); -- The previous assignment has to be done in any case Set_Assignment_OK (Name (Tag_Assign)); Insert_Action (N, Tag_Assign); - - elsif Is_Private_Type (T) - and then Is_Tagged_Type (Underlying_Type (T)) - and then not Java_VM - then - declare - Utyp : constant Entity_Id := Underlying_Type (T); - Ref : constant Node_Id := - Unchecked_Convert_To (Utyp, - Make_Explicit_Dereference (Loc, - New_Reference_To (Temp, Loc))); - - begin - Tag_Assign := - Make_Assignment_Statement (Loc, - Name => - Make_Selected_Component (Loc, - Prefix => Ref, - Selector_Name => - New_Reference_To (First_Tag_Component (Utyp), Loc)), - - Expression => - Unchecked_Convert_To (RTE (RE_Tag), - New_Reference_To ( - Elists.Node (First_Elmt (Access_Disp_Table (Utyp))), - Loc))); - - Set_Assignment_OK (Name (Tag_Assign)); - Insert_Action (N, Tag_Assign); - end; end if; if Controlled_Type (DesigT) @@ -3530,7 +3523,6 @@ package body Exp_Ch4 is Parnt := Parent (Child); end loop; end; - end Expand_N_Indexed_Component; --------------------- @@ -4570,12 +4562,9 @@ package body Exp_Ch4 is end if; end if; - -- If we still have an equality comparison (i.e. it was not rewritten - -- in some way), then we can test if result is known at compile time). + -- Test if result is known at compile time - if Nkind (N) = N_Op_Eq then - Rewrite_Comparison (N); - end if; + Rewrite_Comparison (N); -- If we still have comparison for Vax_Float, process it @@ -8010,78 +7999,91 @@ package body Exp_Ch4 is ------------------------ procedure Rewrite_Comparison (N : Node_Id) is - Typ : constant Entity_Id := Etype (N); - Op1 : constant Node_Id := Left_Opnd (N); - Op2 : constant Node_Id := Right_Opnd (N); + begin + if Nkind (N) = N_Type_Conversion then + Rewrite_Comparison (Expression (N)); - Res : constant Compare_Result := Compile_Time_Compare (Op1, Op2); - -- Res indicates if compare outcome can be determined at compile time + elsif Nkind (N) not in N_Op_Compare then + null; - True_Result : Boolean; - False_Result : Boolean; + else + declare + Typ : constant Entity_Id := Etype (N); + Op1 : constant Node_Id := Left_Opnd (N); + Op2 : constant Node_Id := Right_Opnd (N); - begin - case N_Op_Compare (Nkind (N)) is - when N_Op_Eq => - True_Result := Res = EQ; - False_Result := Res = LT or else Res = GT or else Res = NE; - - when N_Op_Ge => - True_Result := Res in Compare_GE; - False_Result := Res = LT; - - if Res = LE - and then Constant_Condition_Warnings - and then Comes_From_Source (Original_Node (N)) - and then Nkind (Original_Node (N)) = N_Op_Ge - and then not In_Instance - and then not Warnings_Off (Etype (Left_Opnd (N))) - and then Is_Integer_Type (Etype (Left_Opnd (N))) - then - Error_Msg_N - ("can never be greater than, could replace by ""'=""?", N); - end if; + Res : constant Compare_Result := Compile_Time_Compare (Op1, Op2); + -- Res indicates if compare outcome can be compile time determined - when N_Op_Gt => - True_Result := Res = GT; - False_Result := Res in Compare_LE; - - when N_Op_Lt => - True_Result := Res = LT; - False_Result := Res in Compare_GE; - - when N_Op_Le => - True_Result := Res in Compare_LE; - False_Result := Res = GT; - - if Res = GE - and then Constant_Condition_Warnings - and then Comes_From_Source (Original_Node (N)) - and then Nkind (Original_Node (N)) = N_Op_Le - and then not In_Instance - and then not Warnings_Off (Etype (Left_Opnd (N))) - and then Is_Integer_Type (Etype (Left_Opnd (N))) - then - Error_Msg_N - ("can never be less than, could replace by ""'=""?", N); - end if; + True_Result : Boolean; + False_Result : Boolean; - when N_Op_Ne => - True_Result := Res = NE or else Res = GT or else Res = LT; - False_Result := Res = EQ; - end case; + begin + case N_Op_Compare (Nkind (N)) is + when N_Op_Eq => + True_Result := Res = EQ; + False_Result := Res = LT or else Res = GT or else Res = NE; + + when N_Op_Ge => + True_Result := Res in Compare_GE; + False_Result := Res = LT; + + if Res = LE + and then Constant_Condition_Warnings + and then Comes_From_Source (Original_Node (N)) + and then Nkind (Original_Node (N)) = N_Op_Ge + and then not In_Instance + and then not Warnings_Off (Etype (Left_Opnd (N))) + and then Is_Integer_Type (Etype (Left_Opnd (N))) + then + Error_Msg_N + ("can never be greater than, could replace by ""'=""?", N); + end if; - if True_Result then - Rewrite (N, - Convert_To (Typ, New_Occurrence_Of (Standard_True, Sloc (N)))); - Analyze_And_Resolve (N, Typ); - Warn_On_Known_Condition (N); + when N_Op_Gt => + True_Result := Res = GT; + False_Result := Res in Compare_LE; + + when N_Op_Lt => + True_Result := Res = LT; + False_Result := Res in Compare_GE; + + when N_Op_Le => + True_Result := Res in Compare_LE; + False_Result := Res = GT; + + if Res = GE + and then Constant_Condition_Warnings + and then Comes_From_Source (Original_Node (N)) + and then Nkind (Original_Node (N)) = N_Op_Le + and then not In_Instance + and then not Warnings_Off (Etype (Left_Opnd (N))) + and then Is_Integer_Type (Etype (Left_Opnd (N))) + then + Error_Msg_N + ("can never be less than, could replace by ""'=""?", N); + end if; - elsif False_Result then - Rewrite (N, - Convert_To (Typ, New_Occurrence_Of (Standard_False, Sloc (N)))); - Analyze_And_Resolve (N, Typ); - Warn_On_Known_Condition (N); + when N_Op_Ne => + True_Result := Res = NE or else Res = GT or else Res = LT; + False_Result := Res = EQ; + end case; + + if True_Result then + Rewrite (N, + Convert_To (Typ, + New_Occurrence_Of (Standard_True, Sloc (N)))); + Analyze_And_Resolve (N, Typ); + Warn_On_Known_Condition (N); + + elsif False_Result then + Rewrite (N, + Convert_To (Typ, + New_Occurrence_Of (Standard_False, Sloc (N)))); + Analyze_And_Resolve (N, Typ); + Warn_On_Known_Condition (N); + end if; + end; end if; end Rewrite_Comparison; diff --git a/gcc/ada/exp_ch5.adb b/gcc/ada/exp_ch5.adb index af7cd2426f7..f28d87d33d5 100644 --- a/gcc/ada/exp_ch5.adb +++ b/gcc/ada/exp_ch5.adb @@ -1705,13 +1705,44 @@ package body Exp_Ch5 is begin -- If the assignment is dispatching, make sure to use the - -- ??? where is rest of this comment ??? + -- proper type. if Is_Class_Wide_Type (Typ) then F_Typ := Class_Wide_Type (F_Typ); end if; - L := New_List ( + L := New_List; + + -- In case of assignment to a class-wide tagged type, before + -- the assignment we generate run-time check to ensure that + -- the tag of the Target is covered by the tag of the source + + if Is_Class_Wide_Type (Typ) + and then Is_Tagged_Type (Typ) + and then Is_Tagged_Type (Underlying_Type (Etype (Rhs))) + then + Append_To (L, + Make_Raise_Constraint_Error (Loc, + Condition => + Make_Op_Not (Loc, + Make_Function_Call (Loc, + Name => New_Reference_To + (RTE (RE_CW_Membership), Loc), + Parameter_Associations => New_List ( + Make_Selected_Component (Loc, + Prefix => + Duplicate_Subexpr (Lhs), + Selector_Name => + Make_Identifier (Loc, Name_uTag)), + Make_Selected_Component (Loc, + Prefix => + Duplicate_Subexpr (Rhs), + Selector_Name => + Make_Identifier (Loc, Name_uTag))))), + Reason => CE_Tag_Check_Failed)); + end if; + + Append_To (L, Make_Procedure_Call_Statement (Loc, Name => New_Reference_To (Op, Loc), Parameter_Associations => New_List ( diff --git a/gcc/ada/exp_ch6.adb b/gcc/ada/exp_ch6.adb index 76dde0e73cb..bb9407c7ffb 100644 --- a/gcc/ada/exp_ch6.adb +++ b/gcc/ada/exp_ch6.adb @@ -4289,8 +4289,7 @@ package body Exp_Ch6 is Expand_Interface_Thunk (N => Prim, Thunk_Alias => Alias (Prim), - Thunk_Id => Thunk_Id, - Thunk_Tag => Iface_Tag); + Thunk_Id => Thunk_Id); Insert_After (N, New_Thunk); @@ -4341,8 +4340,7 @@ package body Exp_Ch6 is Expand_Interface_Thunk (N => Ancestor_Iface_Prim, Thunk_Alias => Prim_Op, - Thunk_Id => Thunk_Id, - Thunk_Tag => Iface_Tag); + Thunk_Id => Thunk_Id); Insert_After (N, New_Thunk); @@ -4401,8 +4399,7 @@ package body Exp_Ch6 is Expand_Interface_Thunk (N => Prim, Thunk_Alias => Prim, - Thunk_Id => Thunk_Id, - Thunk_Tag => Iface_Tag); + Thunk_Id => Thunk_Id); Insert_After (N, New_Thunk); Insert_After (New_Thunk, diff --git a/gcc/ada/exp_ch7.ads b/gcc/ada/exp_ch7.ads index eb17fe09bf9..125d9ea9143 100644 --- a/gcc/ada/exp_ch7.ads +++ b/gcc/ada/exp_ch7.ads @@ -115,7 +115,9 @@ package Exp_Ch7 is -- type (Is_Controlled) or a type with controlled components -- (Has_Controlled). With_Attach is an integer expression representing -- the level of attachment, see Attach_To_Final_List's Nb_Link param - -- documentation in s-finimp.ads. + -- documentation in s-finimp.ads. Note: if Typ is Finalize_Storage_Only + -- and the object is at library level, then With_Attach will be ignored, + -- and a zero link level will be passed to Attach_To_Final_List. -- -- This function will generate the appropriate calls to make -- sure that the objects referenced by Ref are adjusted. The generated diff --git a/gcc/ada/exp_ch9.adb b/gcc/ada/exp_ch9.adb index 3943dc4dbc0..310278d62e0 100644 --- a/gcc/ada/exp_ch9.adb +++ b/gcc/ada/exp_ch9.adb @@ -33,6 +33,7 @@ with Exp_Ch3; use Exp_Ch3; with Exp_Ch11; use Exp_Ch11; with Exp_Ch6; use Exp_Ch6; with Exp_Dbug; use Exp_Dbug; +with Exp_Sel; use Exp_Sel; with Exp_Smem; use Exp_Smem; with Exp_Tss; use Exp_Tss; with Exp_Util; use Exp_Util; @@ -61,10 +62,6 @@ with Uintp; use Uintp; package body Exp_Ch9 is - -------------------------------- - -- Select_Expansion_Utilities -- - -------------------------------- - -- The following constant establishes the upper bound for the index of -- an entry family. It is used to limit the allocated size of protected -- types with defaulted discriminant of an integer type, when the bound @@ -75,232 +72,6 @@ package body Exp_Ch9 is Entry_Family_Bound : constant Int := 2**16; - -- The following package contains helper routines used in the expansion of - -- dispatching asynchronous, conditional and timed selects. - - package Select_Expansion_Utilities is - function Build_Abort_Block - (Loc : Source_Ptr; - Abr_Blk_Ent : Entity_Id; - Cln_Blk_Ent : Entity_Id; - Blk : Node_Id) return Node_Id; - -- Generate: - -- begin - -- Blk - -- exception - -- when Abort_Signal => Abort_Undefer; - -- end; - -- Abr_Blk_Ent is the name of the generated block, Cln_Blk_Ent is - -- the name of the encapsulated cleanup block, Blk is the actual - -- block node. - - function Build_B - (Loc : Source_Ptr; - Decls : List_Id) return Entity_Id; - -- Generate: - -- B : Boolean := False; - -- Append the object declaration to the list and return the name of - -- the object. - - function Build_C - (Loc : Source_Ptr; - Decls : List_Id) return Entity_Id; - -- Generate: - -- C : Ada.Tags.Prim_Op_Kind; - -- Append the object declaration to the list and return the name of - -- the object. - - function Build_Cleanup_Block - (Loc : Source_Ptr; - Blk_Ent : Entity_Id; - Stmts : List_Id; - Clean_Ent : Entity_Id) return Node_Id; - -- Generate: - -- declare - -- procedure _clean is - -- begin - -- ... - -- end _clean; - -- begin - -- Stmts - -- at end - -- _clean; - -- end; - -- Blk_Ent is the name of the generated block, Stmts is the list - -- of encapsulated statements and Clean_Ent is the parameter to - -- the _clean procedure. - - function Build_S - (Loc : Source_Ptr; - Decls : List_Id; - Obj : Entity_Id; - Call_Ent : Entity_Id) return Entity_Id; - -- Generate: - -- S : constant Integer := - -- Ada.Tags.Get_Offset_Index ( - -- Unchecked_Convert_To (Ada.Tags.Interface_Tag, Obj), - -- DT_Position (Call_Ent)); - -- where Obj is the pointer to a secondary table, Call_Ent is the - -- entity of the dispatching call name. Append the object declaration - -- to the list and return its defining identifier. - - end Select_Expansion_Utilities; - - ----------------------------------------- - -- Body for Select_Expansion_Utilities -- - ----------------------------------------- - - package body Select_Expansion_Utilities is - - ----------------------- - -- Build_Abort_Block -- - ----------------------- - - function Build_Abort_Block - (Loc : Source_Ptr; - Abr_Blk_Ent : Entity_Id; - Cln_Blk_Ent : Entity_Id; - Blk : Node_Id) return Node_Id - is - begin - return - Make_Block_Statement (Loc, - Identifier => New_Reference_To (Abr_Blk_Ent, Loc), - - Declarations => No_List, - - Handled_Statement_Sequence => - Make_Handled_Sequence_Of_Statements (Loc, - Statements => - New_List ( - Make_Implicit_Label_Declaration (Loc, - Defining_Identifier => - Cln_Blk_Ent, - Label_Construct => - Blk), - Blk), - - Exception_Handlers => - New_List ( - Make_Exception_Handler (Loc, - Exception_Choices => - New_List ( - New_Reference_To (Stand.Abort_Signal, Loc)), - Statements => - New_List ( - Make_Procedure_Call_Statement (Loc, - Name => - New_Reference_To (RTE ( - RE_Abort_Undefer), Loc), - Parameter_Associations => No_List)))))); - end Build_Abort_Block; - - ------------- - -- Build_B -- - ------------- - - function Build_B - (Loc : Source_Ptr; - Decls : List_Id) return Entity_Id - is - B : constant Entity_Id := Make_Defining_Identifier (Loc, - Chars => New_Internal_Name ('B')); - - begin - Append_To (Decls, - Make_Object_Declaration (Loc, - Defining_Identifier => - B, - Object_Definition => - New_Reference_To (Standard_Boolean, Loc), - Expression => - New_Reference_To (Standard_False, Loc))); - - return B; - end Build_B; - - ------------- - -- Build_C -- - ------------- - - function Build_C - (Loc : Source_Ptr; - Decls : List_Id) return Entity_Id - is - C : constant Entity_Id := Make_Defining_Identifier (Loc, - Chars => New_Internal_Name ('C')); - - begin - Append_To (Decls, - Make_Object_Declaration (Loc, - Defining_Identifier => - C, - Object_Definition => - New_Reference_To (RTE (RE_Prim_Op_Kind), Loc))); - - return C; - end Build_C; - - ------------------------- - -- Build_Cleanup_Block -- - ------------------------- - - function Build_Cleanup_Block - (Loc : Source_Ptr; - Blk_Ent : Entity_Id; - Stmts : List_Id; - Clean_Ent : Entity_Id) return Node_Id - is - Cleanup_Block : constant Node_Id := - Make_Block_Statement (Loc, - Identifier => New_Reference_To (Blk_Ent, Loc), - Declarations => No_List, - Handled_Statement_Sequence => - Make_Handled_Sequence_Of_Statements (Loc, - Statements => Stmts), - Is_Asynchronous_Call_Block => True); - - begin - Set_Entry_Cancel_Parameter (Blk_Ent, Clean_Ent); - - return Cleanup_Block; - end Build_Cleanup_Block; - - ------------- - -- Build_S -- - ------------- - - function Build_S - (Loc : Source_Ptr; - Decls : List_Id; - Obj : Entity_Id; - Call_Ent : Entity_Id) return Entity_Id - is - S : constant Entity_Id := Make_Defining_Identifier (Loc, - Chars => New_Internal_Name ('S')); - - begin - Append_To (Decls, - Make_Object_Declaration (Loc, - Defining_Identifier => S, - Constant_Present => True, - - Object_Definition => - New_Reference_To (Standard_Integer, Loc), - - Expression => - Make_Function_Call (Loc, - Name => New_Reference_To (RTE (RE_Get_Offset_Index), Loc), - Parameter_Associations => New_List ( - Unchecked_Convert_To (RTE (RE_Interface_Tag), Obj), - Make_Integer_Literal (Loc, DT_Position (Call_Ent)))))); - - return S; - end Build_S; - end Select_Expansion_Utilities; - - package SEU renames Select_Expansion_Utilities; - ----------------------- -- Local Subprograms -- ----------------------- @@ -2210,6 +1981,7 @@ package body Exp_Ch9 is if Abort_Allowed or else Restriction_Active (No_Entry_Queue) = False or else Number_Entries (Pid) > 1 + or else (Has_Attach_Handler (Pid) and then not Restricted_Profile) then Complete := New_Reference_To (RTE (RE_Complete_Entry_Body), Loc); else @@ -2251,6 +2023,7 @@ package body Exp_Ch9 is if Abort_Allowed or else Restriction_Active (No_Entry_Queue) = False or else Number_Entries (Pid) > 1 + or else (Has_Attach_Handler (Pid) and then not Restricted_Profile) then Complete := New_Reference_To (RTE (RE_Exceptional_Complete_Entry_Body), Loc); @@ -2660,6 +2433,7 @@ package body Exp_Ch9 is if Abort_Allowed or else Restriction_Active (No_Entry_Queue) = False or else Number_Entries (Pid) > 1 + or else (Has_Attach_Handler (Pid) and then not Restricted_Profile) then Lock_Name := New_Reference_To (RTE (RE_Lock_Entries), Loc); Service_Name := New_Reference_To (RTE (RE_Service_Entries), Loc); @@ -2994,6 +2768,8 @@ package body Exp_Ch9 is or else Restriction_Active (No_Entry_Queue) = False or else not Is_Protected_Type (Conctyp) or else Number_Entries (Conctyp) > 1 + or else (Has_Attach_Handler (Conctyp) + and then not Restricted_Profile) then X := Make_Defining_Identifier (Loc, Name_uX); @@ -3133,6 +2909,8 @@ package body Exp_Ch9 is if Abort_Allowed or else Restriction_Active (No_Entry_Queue) = False or else Number_Entries (Conctyp) > 1 + or else (Has_Attach_Handler (Conctyp) + and then not Restricted_Profile) then -- Change the type of the index declaration @@ -4898,86 +4676,98 @@ package body Exp_Ch9 is -- Ada 2005 (AI-345): If the trigger is a dispatching call, the select is -- expanded into: - -- declare - -- B : Boolean := False; - -- Bnn : Communication_Block; - -- C : Ada.Tags.Prim_Op_Kind; - -- P : Parameters := (Param1 .. ParamN) - -- S : constant Integer := DT_Position (); - -- U : Boolean; - - -- begin - -- disp_get_prim_op_kind (, S, C); - - -- if C = POK_Protected_Entry then - -- declare - -- procedure _clean is - -- begin - -- if Enqueued (Bnn) then - -- Cancel_Protected_Entry_Call (Bnn); - -- end if; - -- end _clean; - - -- begin - -- begin - -- disp_asynchronous_select - -- (Obj, S, P'address, Bnn, B); - - -- Param1 := P.Param1; - -- ... - -- ParamN := P.ParamN; - - -- if Enqueued (Bnn) then - -- - -- end if; - -- at end - -- _clean; - -- end; - -- exception - -- when Abort_Signal => Abort_Undefer; - -- end; - - -- if not Cancelled (Bnn) then - -- - -- end if; - - -- elsif C = POK_Task_Entry then - -- declare - -- procedure _clean is - -- begin - -- Cancel_Task_Entry_Call (U); - -- end _clean; - - -- begin - -- Abort_Defer; - - -- disp_asynchronous_select - -- (, S, P'address, Bnn, B); + -- declare + -- B : Boolean := False; + -- Bnn : Communication_Block; + -- C : Ada.Tags.Prim_Op_Kind; + -- K : Ada.Tags.Tagged_Kind := + -- Ada.Tags.Get_Tagged_Kind (Ada.Tags.Tag ()); + -- P : Parameters := (Param1 .. ParamN); + -- S : Integer; + -- U : Boolean; - -- Param1 := P.Param1; - -- ... - -- ParamN := P.ParamN; - - -- begin - -- begin - -- Abort_Undefer; - -- - -- at end - -- _clean; - -- end; - -- exception - -- when Abort_Signal => Abort_Undefer; - -- end; - - -- if not U then - -- - -- end if; - -- end; + -- begin + -- if K = Ada.Tags.TK_Limited_Tagged then + -- ; + -- ; - -- else - -- ; - -- - -- end if; + -- else + -- S := Ada.Tags.Get_Offset_Index (Ada.Tags.Tag (), + -- DT_Position ()); + + -- _Disp_Get_Prim_Op_Kind (, S, C); + + -- if C = POK_Protected_Entry then + -- declare + -- procedure _clean is + -- begin + -- if Enqueued (Bnn) then + -- Cancel_Protected_Entry_Call (Bnn); + -- end if; + -- end _clean; + + -- begin + -- begin + -- _Disp_Asynchronous_Select + -- (, S, P'address, Bnn, B); + + -- Param1 := P.Param1; + -- ... + -- ParamN := P.ParamN; + + -- if Enqueued (Bnn) then + -- + -- end if; + -- at end + -- _clean; + -- end; + -- exception + -- when Abort_Signal => Abort_Undefer; + -- end; + + -- if not Cancelled (Bnn) then + -- + -- end if; + + -- elsif C = POK_Task_Entry then + -- declare + -- procedure _clean is + -- begin + -- Cancel_Task_Entry_Call (U); + -- end _clean; + + -- begin + -- Abort_Defer; + + -- _Disp_Asynchronous_Select + -- (, S, P'address, Bnn, B); + + -- Param1 := P.Param1; + -- ... + -- ParamN := P.ParamN; + + -- begin + -- begin + -- Abort_Undefer; + -- + -- at end + -- _clean; + -- end; + -- exception + -- when Abort_Signal => Abort_Undefer; + -- end; + + -- if not U then + -- + -- end if; + -- end; + + -- else + -- ; + -- + -- end if; + -- end if; + -- end; -- The job is to convert this to the asynchronous form @@ -5011,6 +4801,7 @@ package body Exp_Ch9 is Cleanup_Block : Node_Id; Cleanup_Block_Ent : Entity_Id; Cleanup_Stmts : List_Id; + Conc_Typ_Stmts : List_Id; Concval : Node_Id; Dblock_Ent : Entity_Id; Decl : Node_Id; @@ -5021,6 +4812,7 @@ package body Exp_Ch9 is Formals : List_Id; Hdle : List_Id; Index : Node_Id; + Lim_Typ_Stmts : List_Id; N_Orig : Node_Id; Obj : Entity_Id; Param : Node_Id; @@ -5037,6 +4829,7 @@ package body Exp_Ch9 is B : Entity_Id; -- Call status flag Bnn : Entity_Id; -- Communication block C : Entity_Id; -- Call kind + K : Entity_Id; -- Tagged kind P : Entity_Id; -- Parameter block S : Entity_Id; -- Primitive operation slot T : Entity_Id; -- Additional status flag @@ -5077,7 +4870,7 @@ package body Exp_Ch9 is -- Call status flag processing, generate: -- B : Boolean := False; - B := SEU.Build_B (Loc, Decls); + B := Build_B (Loc, Decls); -- Communication block processing, generate: -- Bnn : Communication_Block; @@ -5094,7 +4887,13 @@ package body Exp_Ch9 is -- Call kind processing, generate: -- C : Ada.Tags.Prim_Op_Kind; - C := SEU.Build_C (Loc, Decls); + C := Build_C (Loc, Decls); + + -- Tagged kind processing, generate: + -- K : Ada.Tags.Tagged_Kind := + -- Ada.Tags.Get_Tagged_Kind (Ada.Tags.Tag ()); + + K := Build_K (Loc, Decls, Obj); -- Parameter block processing @@ -5104,12 +4903,9 @@ package body Exp_Ch9 is (Loc, Blk_Typ, Actuals, Formals, Decls, Stmts); -- Dispatch table slot processing, generate: - -- S : constant Integer := - -- Ada.Tags.Get_Offset_Index ( - -- Unchecked_Convert_To (Ada.Tags.Interface_Tag, Obj), - -- DT_Position ()); + -- S : Integer; - S := SEU.Build_S (Loc, Decls, Obj, Call_Ent); + S := Build_S (Loc, Decls); -- Additional status flag processing, generate: @@ -5122,19 +4918,6 @@ package body Exp_Ch9 is Object_Definition => New_Reference_To (Standard_Boolean, Loc))); - Append_To (Stmts, - Make_Procedure_Call_Statement (Loc, - Name => - New_Reference_To ( - Find_Prim_Op (Etype (Etype (Obj)), - Name_uDisp_Get_Prim_Op_Kind), - Loc), - Parameter_Associations => - New_List ( - New_Copy_Tree (Obj), - New_Reference_To (S, Loc), - New_Reference_To (C, Loc)))); - -- --------------------------------------------------------------- -- Protected entry handling @@ -5146,8 +4929,7 @@ package body Exp_Ch9 is Cleanup_Stmts := Parameter_Block_Unpack (Loc, P, Actuals, Formals); -- Generate: - -- _dispatching_asynchronous_select - -- (, S, P'address, Bnn, B); + -- _Disp_Asynchronous_Select (, S, P'address, Bnn, B); Prepend_To (Cleanup_Stmts, Make_Procedure_Call_Statement (Loc, @@ -5155,7 +4937,7 @@ package body Exp_Ch9 is New_Reference_To ( Find_Prim_Op (Etype (Etype (Obj)), Name_uDisp_Asynchronous_Select), - Loc), + Loc), Parameter_Associations => New_List ( New_Copy_Tree (Obj), @@ -5204,8 +4986,8 @@ package body Exp_Ch9 is Cleanup_Block_Ent := Make_Defining_Identifier (Loc, New_Internal_Name ('C')); - Cleanup_Block := SEU.Build_Cleanup_Block (Loc, - Cleanup_Block_Ent, Cleanup_Stmts, Bnn); + Cleanup_Block := + Build_Cleanup_Block (Loc, Cleanup_Block_Ent, Cleanup_Stmts, Bnn); -- Wrap the cleanup block in an exception handling block @@ -5224,8 +5006,8 @@ package body Exp_Ch9 is Make_Implicit_Label_Declaration (Loc, Defining_Identifier => Abort_Block_Ent), - SEU.Build_Abort_Block (Loc, - Abort_Block_Ent, Cleanup_Block_Ent, Cleanup_Block)); + Build_Abort_Block + (Loc, Abort_Block_Ent, Cleanup_Block_Ent, Cleanup_Block)); -- Generate: -- if not Cancelled (Bnn) then @@ -5258,8 +5040,7 @@ package body Exp_Ch9 is TaskE_Stmts := Parameter_Block_Unpack (Loc, P, Actuals, Formals); -- Generate: - -- _dispatching_asynchronous_select - -- (, S, P'address, Bnn, B); + -- _Disp_Asynchronous_Select (, S, P'address, Bnn, B); Prepend_To (TaskE_Stmts, Make_Procedure_Call_Statement (Loc, @@ -5267,7 +5048,7 @@ package body Exp_Ch9 is New_Reference_To ( Find_Prim_Op (Etype (Etype (Obj)), Name_uDisp_Asynchronous_Select), - Loc), + Loc), Parameter_Associations => New_List ( New_Copy_Tree (Obj), @@ -5319,8 +5100,8 @@ package body Exp_Ch9 is Cleanup_Block_Ent := Make_Defining_Identifier (Loc, New_Internal_Name ('C')); - Cleanup_Block := SEU.Build_Cleanup_Block (Loc, - Cleanup_Block_Ent, Cleanup_Stmts, T); + Cleanup_Block := + Build_Cleanup_Block (Loc, Cleanup_Block_Ent, Cleanup_Stmts, T); -- Wrap the cleanup block in an exception handling block @@ -5339,8 +5120,8 @@ package body Exp_Ch9 is Defining_Identifier => Abort_Block_Ent)); Append_To (TaskE_Stmts, - SEU.Build_Abort_Block (Loc, - Abort_Block_Ent, Cleanup_Block_Ent, Cleanup_Block)); + Build_Abort_Block + (Loc, Abort_Block_Ent, Cleanup_Block_Ent, Cleanup_Block)); -- Generate: -- if not T then @@ -5368,6 +5149,29 @@ package body Exp_Ch9 is Prepend_To (ProtP_Stmts, New_Copy_Tree (Ecall)); -- Generate: + -- S := Ada.Tags.Get_Offset_Index ( + -- Ada.Tags.Tag (), DT_Position (Call_Ent)); + + Conc_Typ_Stmts := New_List ( + Build_S_Assignment (Loc, S, Obj, Call_Ent)); + + -- Generate: + -- _Disp_Get_Prim_Op_Kind (, S, C); + + Append_To (Conc_Typ_Stmts, + Make_Procedure_Call_Statement (Loc, + Name => + New_Reference_To ( + Find_Prim_Op (Etype (Etype (Obj)), + Name_uDisp_Get_Prim_Op_Kind), + Loc), + Parameter_Associations => + New_List ( + New_Copy_Tree (Obj), + New_Reference_To (S, Loc), + New_Reference_To (C, Loc)))); + + -- Generate: -- if C = POK_Procedure_Entry then -- ProtE_Stmts -- elsif C = POK_Task_Entry then @@ -5376,7 +5180,7 @@ package body Exp_Ch9 is -- ProtP_Stmts -- end if; - Append_To (Stmts, + Append_To (Conc_Typ_Stmts, Make_If_Statement (Loc, Condition => Make_Op_Eq (Loc, @@ -5404,6 +5208,35 @@ package body Exp_Ch9 is Else_Statements => ProtP_Stmts)); + -- Generate: + -- ; + -- + + Lim_Typ_Stmts := New_Copy_List_Tree (Tstats); + Prepend_To (Lim_Typ_Stmts, New_Copy_Tree (Ecall)); + + -- Generate: + -- if K = Ada.Tags.TK_Limited_Tagged then + -- Lim_Typ_Stmts + -- else + -- Conc_Typ_Stmts + -- end if; + + Append_To (Stmts, + Make_If_Statement (Loc, + Condition => + Make_Op_Eq (Loc, + Left_Opnd => + New_Reference_To (K, Loc), + Right_Opnd => + New_Reference_To (RTE (RE_TK_Limited_Tagged), Loc)), + + Then_Statements => + Lim_Typ_Stmts, + + Else_Statements => + Conc_Typ_Stmts)); + Rewrite (N, Make_Block_Statement (Loc, Declarations => @@ -5866,30 +5699,42 @@ package body Exp_Ch9 is -- declare -- B : Boolean := False; -- C : Ada.Tags.Prim_Op_Kind; + -- K : Ada.Tags.Tagged_Kind := + -- Ada.Tags.Get_Tagged_Kind (Ada.Tags.Tag ()); -- P : Parameters := (Param1 .. ParamN); - -- S : constant Integer := DT_Position (); + -- S : Integer; -- begin - -- disp_conditional_select (, S, P'address, C, B); + -- if K = Ada.Tags.TK_Limited_Tagged then + -- ; + -- - -- if C = POK_Protected_Entry - -- or else C = POK_Task_Entry - -- then - -- Param1 := P.Param1; - -- ... - -- ParamN := P.ParamN; - -- end if; + -- else + -- S := Ada.Tags.Get_Offset_Index (Ada.Tags.Tag (), + -- DT_Position ()); - -- if B then - -- if C = POK_Procedure - -- or else C = POK_Protected_Procedure - -- or else C = POK_Task_Procedure + -- _Disp_Conditional_Select (, S, P'address, C, B); + + -- if C = POK_Protected_Entry + -- or else C = POK_Task_Entry -- then - -- (, Param1 .. ParamN); + -- Param1 := P.Param1; + -- ... + -- ParamN := P.ParamN; + -- end if; + + -- if B then + -- if C = POK_Procedure + -- or else C = POK_Protected_Procedure + -- or else C = POK_Task_Procedure + -- then + -- ; + -- end if; + + -- + -- else + -- -- end if; - -- - -- else - -- -- end if; -- end; @@ -5899,25 +5744,28 @@ package body Exp_Ch9 is Blk : Node_Id := Entry_Call_Statement (Alt); Transient_Blk : Node_Id; - Actuals : List_Id; - Blk_Typ : Entity_Id; - Call : Node_Id; - Call_Ent : Entity_Id; - Decl : Node_Id; - Decls : List_Id; - Formals : List_Id; - N_Stats : List_Id; - Obj : Entity_Id; - Param : Node_Id; - Params : List_Id; - Stmt : Node_Id; - Stmts : List_Id; - Unpack : List_Id; - - B : Entity_Id; -- Call status flag - C : Entity_Id; -- Call kind - P : Entity_Id; -- Parameter block - S : Entity_Id; -- Primitive operation slot + Actuals : List_Id; + Blk_Typ : Entity_Id; + Call : Node_Id; + Call_Ent : Entity_Id; + Conc_Typ_Stmts : List_Id; + Decl : Node_Id; + Decls : List_Id; + Formals : List_Id; + Lim_Typ_Stmts : List_Id; + N_Stats : List_Id; + Obj : Entity_Id; + Param : Node_Id; + Params : List_Id; + Stmt : Node_Id; + Stmts : List_Id; + Unpack : List_Id; + + B : Entity_Id; -- Call status flag + C : Entity_Id; -- Call kind + K : Entity_Id; -- Tagged kind + P : Entity_Id; -- Parameter block + S : Entity_Id; -- Primitive operation slot begin if Ada_Version >= Ada_05 @@ -5931,31 +5779,41 @@ package body Exp_Ch9 is -- Call status flag processing, generate: -- B : Boolean := False; - B := SEU.Build_B (Loc, Decls); + B := Build_B (Loc, Decls); -- Call kind processing, generate: -- C : Ada.Tags.Prim_Op_Kind; - C := SEU.Build_C (Loc, Decls); + C := Build_C (Loc, Decls); + + -- Tagged kind processing, generate: + -- K : Ada.Tags.Tagged_Kind := + -- Ada.Tags.Get_Tagged_Kind (Ada.Tags.Tag ()); + + K := Build_K (Loc, Decls, Obj); -- Parameter block processing Blk_Typ := Build_Parameter_Block (Loc, Actuals, Formals, Decls); - P := Parameter_Block_Pack (Loc, Blk_Typ, Actuals, Formals, - Decls, Stmts); + P := Parameter_Block_Pack + (Loc, Blk_Typ, Actuals, Formals, Decls, Stmts); -- Dispatch table slot processing, generate: - -- S : constant Integer := - -- Ada.Tags.Get_Offset_Index ( - -- Unchecked_Convert_To (Ada.Tags.Interface_Tag, Obj), - -- DT_Position ()); + -- S : Integer; - S := SEU.Build_S (Loc, Decls, Obj, Call_Ent); + S := Build_S (Loc, Decls); -- Generate: - -- _dispatching_conditional_select (, S, P'address, C, B); + -- S := Ada.Tags.Get_Offset_Index ( + -- Ada.Tags.Tag (), DT_Position (Call_Ent)); - Append_To (Stmts, + Conc_Typ_Stmts := New_List ( + Build_S_Assignment (Loc, S, Obj, Call_Ent)); + + -- Generate: + -- _Disp_Conditional_Select (, S, P'address, C, B); + + Append_To (Conc_Typ_Stmts, Make_Procedure_Call_Statement (Loc, Name => New_Reference_To ( @@ -5987,7 +5845,7 @@ package body Exp_Ch9 is -- explicit assignments to their corresponding actuals. if Present (Unpack) then - Append_To (Stmts, + Append_To (Conc_Typ_Stmts, Make_If_Statement (Loc, Condition => @@ -6006,7 +5864,8 @@ package body Exp_Ch9 is Right_Opnd => New_Reference_To (RTE (RE_POK_Task_Entry), Loc))), - Then_Statements => Unpack)); + Then_Statements => + Unpack)); end if; -- Generate: @@ -6015,7 +5874,7 @@ package body Exp_Ch9 is -- or else C = POK_Protected_Procedure -- or else C = POK_Task_Procedure -- then - -- + -- -- end if; -- -- else @@ -6056,12 +5915,41 @@ package body Exp_Ch9 is Then_Statements => New_List (Blk))); - Append_To (Stmts, + Append_To (Conc_Typ_Stmts, Make_If_Statement (Loc, Condition => New_Reference_To (B, Loc), Then_Statements => N_Stats, Else_Statements => Else_Statements (N))); + -- Generate: + -- ; + -- + + Lim_Typ_Stmts := New_Copy_List_Tree (Statements (Alt)); + Prepend_To (Lim_Typ_Stmts, New_Copy_Tree (Blk)); + + -- Generate: + -- if K = Ada.Tags.TK_Limited_Tagged then + -- Lim_Typ_Stmts + -- else + -- Conc_Typ_Stmts + -- end if; + + Append_To (Stmts, + Make_If_Statement (Loc, + Condition => + Make_Op_Eq (Loc, + Left_Opnd => + New_Reference_To (K, Loc), + Right_Opnd => + New_Reference_To (RTE (RE_TK_Limited_Tagged), Loc)), + + Then_Statements => + Lim_Typ_Stmts, + + Else_Statements => + Conc_Typ_Stmts)); + Rewrite (N, Make_Block_Statement (Loc, Declarations => Decls, @@ -6771,8 +6659,10 @@ package body Exp_Ch9 is if Has_Entries and then (Abort_Allowed - or else Restriction_Active (No_Entry_Queue) = False - or else Num_Entries > 1) + or else Restriction_Active (No_Entry_Queue) = False + or else Num_Entries > 1 + or else (Has_Attach_Handler (Pid) + and then not Restricted_Profile)) then New_Op_Body := Build_Find_Body_Index (Pid); Insert_After (Current_Node, New_Op_Body); @@ -7494,6 +7384,8 @@ package body Exp_Ch9 is if Abort_Allowed or else Restriction_Active (No_Entry_Queue) = False or else E_Count > 1 + or else (Has_Attach_Handler (Prottyp) + and then not Restricted_Profile) then Body_Arr := Make_Object_Declaration (Loc, Defining_Identifier => Body_Id, @@ -7543,6 +7435,8 @@ package body Exp_Ch9 is if Abort_Allowed or else Restriction_Active (No_Entry_Queue) = False or else E_Count > 1 + or else (Has_Attach_Handler (Prottyp) + and then not Restricted_Profile) then Sub := Make_Subprogram_Declaration (Loc, @@ -9538,31 +9432,43 @@ package body Exp_Ch9 is -- B : Boolean := False; -- C : Ada.Tags.Prim_Op_Kind; -- DX : Duration := To_Duration (D) + -- K : Ada.Tags.Tagged_Kind := + -- Ada.Tags.Get_Tagged_Kind (Ada.Tags.Tag ()); -- M : Integer :=...; -- P : Parameters := (Param1 .. ParamN); - -- S : constant Iteger := DT_Position (); + -- S : Iteger; -- begin - -- disp_timed_select (, S, P'Address, DX, M, C, B); + -- if K = Ada.Tags.TK_Limited_Tagged then + -- ; + -- - -- if C = POK_Protected_Entry - -- or else C = POK_Task_Entry - -- then - -- Param1 := P.Param1; - -- ... - -- ParamN := P.ParamN; - -- end if; + -- else + -- S := Ada.Tags.Get_Offset_Index (Ada.Tags.Tag (), + -- DT_Position ()); - -- if B then - -- if C = POK_Procedure - -- or else C = POK_Protected_Procedure - -- or else C = POK_Task_Procedure + -- _Disp_Timed_Select (, S, P'Address, DX, M, C, B); + + -- if C = POK_Protected_Entry + -- or else C = POK_Task_Entry -- then - -- T.E; + -- Param1 := P.Param1; + -- ... + -- ParamN := P.ParamN; + -- end if; + + -- if B then + -- if C = POK_Procedure + -- or else C = POK_Protected_Procedure + -- or else C = POK_Task_Procedure + -- then + -- ; + -- end if; + + -- + -- else + -- -- end if; - -- S1; - -- else - -- S2; -- end if; -- end; @@ -9578,30 +9484,33 @@ package body Exp_Ch9 is D_Stats : constant List_Id := Statements (Delay_Alternative (N)); - Actuals : List_Id; - Blk_Typ : Entity_Id; - Call : Node_Id; - Call_Ent : Entity_Id; - Concval : Node_Id; - D_Conv : Node_Id; - D_Disc : Node_Id; - D_Type : Entity_Id; - Decls : List_Id; - Dummy : Node_Id; - Ename : Node_Id; - Formals : List_Id; - Index : Node_Id; - N_Stats : List_Id; - Obj : Entity_Id; - Param : Node_Id; - Params : List_Id; - Stmt : Node_Id; - Stmts : List_Id; - Unpack : List_Id; + Actuals : List_Id; + Blk_Typ : Entity_Id; + Call : Node_Id; + Call_Ent : Entity_Id; + Conc_Typ_Stmts : List_Id; + Concval : Node_Id; + D_Conv : Node_Id; + D_Disc : Node_Id; + D_Type : Entity_Id; + Decls : List_Id; + Dummy : Node_Id; + Ename : Node_Id; + Formals : List_Id; + Index : Node_Id; + Lim_Typ_Stmts : List_Id; + N_Stats : List_Id; + Obj : Entity_Id; + Param : Node_Id; + Params : List_Id; + Stmt : Node_Id; + Stmts : List_Id; + Unpack : List_Id; B : Entity_Id; -- Call status flag C : Entity_Id; -- Call kind D : Entity_Id; -- Delay + K : Entity_Id; -- Tagged kind M : Entity_Id; -- Delay mode P : Entity_Id; -- Parameter block S : Entity_Id; -- Primitive operation slot @@ -9651,7 +9560,7 @@ package body Exp_Ch9 is -- Generate: -- B : Boolean := False; - B := SEU.Build_B (Loc, Decls); + B := Build_B (Loc, Decls); else -- Generate: @@ -9675,7 +9584,7 @@ package body Exp_Ch9 is -- Generate: -- C : Ada.Tags.Prim_Op_Kind; - C := SEU.Build_C (Loc, Decls); + C := Build_C (Loc, Decls); end if; -- Duration and mode processing @@ -9747,20 +9656,30 @@ package body Exp_Ch9 is if Ada_Version >= Ada_05 and then Nkind (E_Call) = N_Procedure_Call_Statement then + -- Tagged kind processing, generate: + -- K : Ada.Tags.Tagged_Kind := + -- Ada.Tags.Get_Tagged_Kind (Ada.Tags.Tag )); + + K := Build_K (Loc, Decls, Obj); + Blk_Typ := Build_Parameter_Block (Loc, Actuals, Formals, Decls); P := Parameter_Block_Pack (Loc, Blk_Typ, Actuals, Formals, Decls, Stmts); -- Dispatch table slot processing, generate: - -- S : constant Integer := - -- Ada.Tags.Get_Offset_Index ( - -- Unchecked_Convert_To (Ada.Tags.Interface_Tag, Obj), - -- DT_Position ()); + -- S : Integer; - S := SEU.Build_S (Loc, Decls, Obj, Call_Ent); + S := Build_S (Loc, Decls); -- Generate: - -- _dispatching_timed_select (Obj, S, P'address, D, M, C, B); + -- S := Ada.Tags.Get_Offset_Index ( + -- Ada.Tags.Tag (), DT_Position (Call_Ent)); + + Conc_Typ_Stmts := New_List ( + Build_S_Assignment (Loc, S, Obj, Call_Ent)); + + -- Generate: + -- _Disp_Timed_Select (, S, P'address, D, M, C, B); -- where Obj is the controlling formal parameter, S is the dispatch -- table slot number of the dispatching operation, P is the wrapped @@ -9779,7 +9698,7 @@ package body Exp_Ch9 is Append_To (Params, New_Reference_To (C, Loc)); Append_To (Params, New_Reference_To (B, Loc)); - Append_To (Stmts, + Append_To (Conc_Typ_Stmts, Make_Procedure_Call_Statement (Loc, Name => New_Reference_To ( @@ -9804,7 +9723,7 @@ package body Exp_Ch9 is -- explicit assignments to their corresponding actuals. if Present (Unpack) then - Append_To (Stmts, + Append_To (Conc_Typ_Stmts, Make_If_Statement (Loc, Condition => @@ -9823,7 +9742,8 @@ package body Exp_Ch9 is Right_Opnd => New_Reference_To (RTE (RE_POK_Task_Entry), Loc))), - Then_Statements => Unpack)); + Then_Statements => + Unpack)); end if; -- Generate: @@ -9833,11 +9753,11 @@ package body Exp_Ch9 is -- or else C = POK_Protected_Procedure -- or else C = POK_Task_Procedure -- then - -- + -- -- end if; - -- + -- -- else - -- + -- -- end if; N_Stats := New_Copy_List_Tree (E_Stats); @@ -9873,11 +9793,41 @@ package body Exp_Ch9 is Then_Statements => New_List (E_Call))); - Append_To (Stmts, + Append_To (Conc_Typ_Stmts, Make_If_Statement (Loc, Condition => New_Reference_To (B, Loc), Then_Statements => N_Stats, Else_Statements => D_Stats)); + + -- Generate: + -- ; + -- + + Lim_Typ_Stmts := New_Copy_List_Tree (E_Stats); + Prepend_To (Lim_Typ_Stmts, New_Copy_Tree (E_Call)); + + -- Generate: + -- if K = Ada.Tags.TK_Limited_Tagged then + -- Lim_Typ_Stmts + -- else + -- Conc_Typ_Stmts + -- end if; + + Append_To (Stmts, + Make_If_Statement (Loc, + Condition => + Make_Op_Eq (Loc, + Left_Opnd => + New_Reference_To (K, Loc), + Right_Opnd => + New_Reference_To (RTE (RE_TK_Limited_Tagged), Loc)), + + Then_Statements => + Lim_Typ_Stmts, + + Else_Statements => + Conc_Typ_Stmts)); + else -- Skip assignments to temporaries created for in-out parameters. -- This makes unwarranted assumptions about the shape of the expanded @@ -10579,6 +10529,7 @@ package body Exp_Ch9 is if Abort_Allowed or else Restriction_Active (No_Entry_Queue) = False or else Number_Entries (Ptyp) > 1 + or else (Has_Attach_Handler (Ptyp) and then not Restricted) then -- Find index mapping function (clumsy but ok for now) @@ -10601,6 +10552,8 @@ package body Exp_Ch9 is if Abort_Allowed or else Restriction_Active (No_Entry_Queue) = False or else Number_Entries (Ptyp) > 1 + or else (Has_Attach_Handler (Ptyp) + and then not Restricted) then Append_To (L, Make_Procedure_Call_Statement (Loc, diff --git a/gcc/ada/exp_disp.adb b/gcc/ada/exp_disp.adb index 20e769e1804..e3daf07bfc4 100644 --- a/gcc/ada/exp_disp.adb +++ b/gcc/ada/exp_disp.adb @@ -309,11 +309,11 @@ package body Exp_Disp is Get_Access_Level => RE_Get_Access_Level, Get_Entry_Index => RE_Get_Entry_Index, Get_External_Tag => RE_Get_External_Tag, - Get_Offset_Index => RE_Get_Offset_Index, Get_Prim_Op_Address => RE_Get_Prim_Op_Address, Get_Prim_Op_Kind => RE_Get_Prim_Op_Kind, Get_RC_Offset => RE_Get_RC_Offset, Get_Remotely_Callable => RE_Get_Remotely_Callable, + Get_Tagged_Kind => RE_Get_Tagged_Kind, Inherit_DT => RE_Inherit_DT, Inherit_TSD => RE_Inherit_TSD, Register_Interface_Tag => RE_Register_Interface_Tag, @@ -322,6 +322,7 @@ package body Exp_Disp is Set_Entry_Index => RE_Set_Entry_Index, Set_Expanded_Name => RE_Set_Expanded_Name, Set_External_Tag => RE_Set_External_Tag, + Set_Interface_Table => RE_Set_Interface_Table, Set_Offset_Index => RE_Set_Offset_Index, Set_OSD => RE_Set_OSD, Set_Prim_Op_Address => RE_Set_Prim_Op_Address, @@ -330,6 +331,7 @@ package body Exp_Disp is Set_Remotely_Callable => RE_Set_Remotely_Callable, Set_SSD => RE_Set_SSD, Set_TSD => RE_Set_TSD, + Set_Tagged_Kind => RE_Set_Tagged_Kind, TSD_Entry_Size => RE_TSD_Entry_Size, TSD_Prologue_Size => RE_TSD_Prologue_Size); @@ -341,11 +343,11 @@ package body Exp_Disp is Get_Access_Level => False, Get_Entry_Index => False, Get_External_Tag => False, - Get_Offset_Index => False, Get_Prim_Op_Address => False, Get_Prim_Op_Kind => False, - Get_Remotely_Callable => False, Get_RC_Offset => False, + Get_Remotely_Callable => False, + Get_Tagged_Kind => False, Inherit_DT => True, Inherit_TSD => True, Register_Interface_Tag => True, @@ -354,6 +356,7 @@ package body Exp_Disp is Set_Entry_Index => True, Set_Expanded_Name => True, Set_External_Tag => True, + Set_Interface_Table => True, Set_Offset_Index => True, Set_OSD => True, Set_Prim_Op_Address => True, @@ -362,6 +365,7 @@ package body Exp_Disp is Set_Remotely_Callable => True, Set_SSD => True, Set_TSD => True, + Set_Tagged_Kind => True, TSD_Entry_Size => False, TSD_Prologue_Size => False); @@ -373,19 +377,20 @@ package body Exp_Disp is Get_Access_Level => 1, Get_Entry_Index => 2, Get_External_Tag => 1, - Get_Offset_Index => 2, Get_Prim_Op_Address => 2, Get_Prim_Op_Kind => 2, Get_RC_Offset => 1, Get_Remotely_Callable => 1, + Get_Tagged_Kind => 1, Inherit_DT => 3, Inherit_TSD => 2, - Register_Interface_Tag => 2, + Register_Interface_Tag => 3, Register_Tag => 1, Set_Access_Level => 2, Set_Entry_Index => 3, Set_Expanded_Name => 2, Set_External_Tag => 2, + Set_Interface_Table => 2, Set_Offset_Index => 3, Set_OSD => 2, Set_Prim_Op_Address => 3, @@ -394,6 +399,7 @@ package body Exp_Disp is Set_Remotely_Callable => 2, Set_SSD => 2, Set_TSD => 2, + Set_Tagged_Kind => 2, TSD_Entry_Size => 0, TSD_Prologue_Size => 0); @@ -414,9 +420,13 @@ package body Exp_Disp is (Prim : Entity_Id; Typ : Entity_Id) return Node_Id; -- Ada 2005 (AI-345): Determine the primitive operation kind of Prim - -- according to its type Typ. Return a reference to an RTE Prim_Op_Kind + -- according to its type Typ. Return a reference to an RE_Prim_Op_Kind -- enumeration value. + function Tagged_Kind (T : Entity_Id) return Node_Id; + -- Ada 2005 (AI-345): Determine the tagged kind of T and return a reference + -- to an RE_Tagged_Kind enumeration value. + ---------------------------- -- Collect_All_Interfaces -- ---------------------------- @@ -426,7 +436,7 @@ package body Exp_Disp is procedure Add_Interface (Iface : Entity_Id); -- Add the interface it if is not already in the list - procedure Collect (Typ : Entity_Id); + procedure Collect (Typ : Entity_Id); -- Subsidiary subprogram used to traverse the whole list -- of directly and indirectly implemented interfaces @@ -453,34 +463,34 @@ package body Exp_Disp is ------------- procedure Collect (Typ : Entity_Id) is - Nod : constant Node_Id := Type_Definition (Parent (Typ)); + Ancestor : Entity_Id; Id : Node_Id; Iface : Entity_Id; - Ancestor : Entity_Id; + Nod : Node_Id; begin + if Ekind (Typ) = E_Record_Type_With_Private then + Nod := Type_Definition (Parent (Full_View (Typ))); + else + Nod := Type_Definition (Parent (Typ)); + end if; + pragma Assert (False or else Nkind (Nod) = N_Derived_Type_Definition or else Nkind (Nod) = N_Record_Definition); - if Nkind (Nod) = N_Record_Definition then - return; - end if; - -- Include the ancestor if we are generating the whole list -- of interfaces. This is used to know the size of the table -- that stores the tag of all the ancestor interfaces. Ancestor := Etype (Typ); - if Is_Interface (Ancestor) then - Add_Interface (Ancestor); + if Ancestor /= Typ then + Collect (Ancestor); end if; - if Ancestor /= Typ - and then Ekind (Ancestor) /= E_Record_Type_With_Private - then - Collect (Ancestor); + if Is_Interface (Ancestor) then + Add_Interface (Ancestor); end if; -- Traverse the graph of ancestor interfaces @@ -1008,7 +1018,10 @@ package body Exp_Disp is -- Expand_Interface_Conversion -- --------------------------------- - procedure Expand_Interface_Conversion (N : Node_Id) is + procedure Expand_Interface_Conversion + (N : Node_Id; + Is_Static : Boolean := True) + is Loc : constant Source_Ptr := Sloc (N); Operand : constant Node_Id := Expression (N); Operand_Typ : Entity_Id := Etype (Operand); @@ -1046,6 +1059,40 @@ package body Exp_Disp is pragma Assert (not Is_Class_Wide_Type (Iface_Typ) and then Is_Interface (Iface_Typ)); + if not Is_Static then + Rewrite (N, + Make_Function_Call (Loc, + Name => New_Reference_To (RTE (RE_Displace), Loc), + Parameter_Associations => New_List ( + Make_Attribute_Reference (Loc, + Prefix => Relocate_Node (Expression (N)), + Attribute_Name => Name_Address), + New_Occurrence_Of + (Node (First_Elmt (Access_Disp_Table (Iface_Typ))), + Loc)))); + + Analyze (N); + + -- Change the type of the data returned by IW_Convert to + -- indicate that this is a dispatching call. + + declare + New_Itype : Entity_Id; + + begin + New_Itype := Create_Itype (E_Anonymous_Access_Type, N); + Set_Etype (New_Itype, New_Itype); + Init_Size_Align (New_Itype); + Set_Directly_Designated_Type (New_Itype, + Class_Wide_Type (Iface_Typ)); + + Rewrite (N, Unchecked_Convert_To (New_Itype, + Relocate_Node (N))); + end; + + return; + end if; + Iface_Tag := Find_Interface_Tag (Operand_Typ, Iface_Typ); pragma Assert (Iface_Tag /= Empty); @@ -1359,8 +1406,7 @@ package body Exp_Disp is function Expand_Interface_Thunk (N : Node_Id; Thunk_Alias : Entity_Id; - Thunk_Id : Entity_Id; - Thunk_Tag : Entity_Id) return Node_Id + Thunk_Id : Entity_Id) return Node_Id is Loc : constant Source_Ptr := Sloc (N); Actuals : constant List_Id := New_List; @@ -1417,7 +1463,7 @@ package body Exp_Disp is -- type T is access all <> -- S1 := Storage_Offset!(First_formal) - -- - Storage_Offset!(First_Formal.Thunk_Tag'Position) + -- - Offset_To_Top (First_Formal.Tag) -- ... and the first actual of the call is generated as T!(S1) @@ -1452,17 +1498,15 @@ package body Exp_Disp is New_Reference_To (Defining_Identifier (First (Formals)), Loc)), Right_Opnd => - Unchecked_Convert_To - (RTE (RE_Storage_Offset), - Make_Attribute_Reference (Loc, - Prefix => - Make_Selected_Component (Loc, - Prefix => - New_Reference_To - (Defining_Identifier (First (Formals)), Loc), - Selector_Name => - New_Occurrence_Of (Thunk_Tag, Loc)), - Attribute_Name => Name_Position)))); + Make_Function_Call (Loc, + Name => New_Reference_To (RTE (RE_Offset_To_Top), Loc), + Parameter_Associations => New_List ( + Make_Selected_Component (Loc, + Prefix => New_Reference_To + (Defining_Identifier (First (Formals)), + Loc), + Selector_Name => Make_Identifier (Loc, + Name_uTag)))))); Append_To (Decl, Decl_2); Append_To (Decl, Decl_1); @@ -1474,14 +1518,11 @@ package body Exp_Disp is (Defining_Identifier (Decl_2), New_Reference_To (Defining_Identifier (Decl_1), Loc))); - -- Side note: The reverse order of declarations is just to ensure - -- that the call to RE_Print is correct. - else -- Generate: - -- + -- S1 := Storage_Offset!(First_formal'Address) - -- - Storage_Offset!(First_Formal.Thunk_Tag'Position) + -- - Offset_To_Top (First_Formal.Tag) -- S2 := Tag_Ptr!(S3) Decl_1 := @@ -1502,17 +1543,15 @@ package body Exp_Disp is (Defining_Identifier (First (Formals)), Loc), Attribute_Name => Name_Address)), Right_Opnd => - Unchecked_Convert_To - (RTE (RE_Storage_Offset), - Make_Attribute_Reference (Loc, - Prefix => - Make_Selected_Component (Loc, - Prefix => - New_Reference_To - (Defining_Identifier (First (Formals)), Loc), - Selector_Name => - New_Occurrence_Of (Thunk_Tag, Loc)), - Attribute_Name => Name_Position)))); + Make_Function_Call (Loc, + Name => New_Reference_To (RTE (RE_Offset_To_Top), Loc), + Parameter_Associations => New_List ( + Make_Selected_Component (Loc, + Prefix => New_Reference_To + (Defining_Identifier (First (Formals)), + Loc), + Selector_Name => Make_Identifier (Loc, + Name_uTag)))))); Decl_2 := Make_Object_Declaration (Loc, @@ -1726,6 +1765,8 @@ package body Exp_Disp is Stmts : constant List_Id := New_List; begin + -- Null body is generated for interface types + if Is_Interface (Typ) then return Make_Subprogram_Body (Loc, @@ -1738,16 +1779,13 @@ package body Exp_Disp is New_List (Make_Null_Statement (Loc)))); end if; - if Is_Concurrent_Record_Type (Typ) then - Conc_Typ := Corresponding_Concurrent_Type (Typ); - end if; - DT_Ptr := Node (First_Elmt (Access_Disp_Table (Typ))); - if Present (Conc_Typ) then + if Is_Concurrent_Record_Type (Typ) then + Conc_Typ := Corresponding_Concurrent_Type (Typ); -- Generate: - -- I : Integer := get_entry_index (tag! (VP), S); + -- I : Integer := Get_Entry_Index (tag! (VP), S); -- where I will be used to capture the entry index of the primitive -- wrapper at position S. @@ -1847,12 +1885,6 @@ package body Exp_Disp is RTE (RE_Asynchronous_Call), Loc), Make_Identifier (Loc, Name_uF)))); -- status flag end if; - - -- Implementation for limited tagged types - - else - Append_To (Stmts, - Make_Raise_Program_Error (Loc, Reason => PE_Explicit_Raise)); end if; return @@ -1914,6 +1946,8 @@ package body Exp_Disp is Stmts : constant List_Id := New_List; begin + -- Null body is generated for interface types + if Is_Interface (Typ) then return Make_Subprogram_Body (Loc, @@ -1926,13 +1960,10 @@ package body Exp_Disp is New_List (Make_Null_Statement (Loc)))); end if; - if Is_Concurrent_Record_Type (Typ) then - Conc_Typ := Corresponding_Concurrent_Type (Typ); - end if; - DT_Ptr := Node (First_Elmt (Access_Disp_Table (Typ))); - if Present (Conc_Typ) then + if Is_Concurrent_Record_Type (Typ) then + Conc_Typ := Corresponding_Concurrent_Type (Typ); -- Generate: -- I : Integer; @@ -1946,22 +1977,20 @@ package body Exp_Disp is Make_Defining_Identifier (Loc, Name_uI), Object_Definition => New_Reference_To (Standard_Integer, Loc))); - end if; - -- Generate: - -- C := get_prim_op_kind (tag! (VP), S); - - -- if C = POK_Procedure - -- or else C = POK_Protected_Procedure - -- or else C = POK_Task_Procedure; - -- then - -- F := True; - -- return; - -- end if; + -- Generate: + -- C := Get_Prim_Op_Kind (tag! (VP), S); - SEU.Build_Common_Dispatching_Select_Statements (Loc, Typ, DT_Ptr, Stmts); + -- if C = POK_Procedure + -- or else C = POK_Protected_Procedure + -- or else C = POK_Task_Procedure; + -- then + -- F := True; + -- return; + -- end if; - if Present (Conc_Typ) then + SEU.Build_Common_Dispatching_Select_Statements + (Loc, Typ, DT_Ptr, Stmts); -- Generate: -- Bnn : Communication_Block; @@ -1979,7 +2008,7 @@ package body Exp_Disp is New_Reference_To (RTE (RE_Communication_Block), Loc))); -- Generate: - -- I := get_entry_index (tag! (VP), S); + -- I := Get_Entry_Index (tag! (VP), S); -- I is the entry index and S is the dispatch table slot @@ -2097,12 +2126,6 @@ package body Exp_Disp is RTE (RE_Conditional_Call), Loc), Make_Identifier (Loc, Name_uF)))); -- status flag end if; - - -- Implementation for limited tagged types - - else - Append_To (Stmts, - Make_Raise_Program_Error (Loc, Reason => PE_Explicit_Raise)); end if; return @@ -2318,6 +2341,8 @@ package body Exp_Disp is Stmts : constant List_Id := New_List; begin + -- Null body is generated for interface types + if Is_Interface (Typ) then return Make_Subprogram_Body (Loc, @@ -2330,13 +2355,10 @@ package body Exp_Disp is New_List (Make_Null_Statement (Loc)))); end if; - if Is_Concurrent_Record_Type (Typ) then - Conc_Typ := Corresponding_Concurrent_Type (Typ); - end if; - DT_Ptr := Node (First_Elmt (Access_Disp_Table (Typ))); - if Present (Conc_Typ) then + if Is_Concurrent_Record_Type (Typ) then + Conc_Typ := Corresponding_Concurrent_Type (Typ); -- Generate: -- I : Integer; @@ -2350,25 +2372,23 @@ package body Exp_Disp is Make_Defining_Identifier (Loc, Name_uI), Object_Definition => New_Reference_To (Standard_Integer, Loc))); - end if; - - -- Generate: - -- C := get_prim_op_kind (tag! (VP), S); - -- if C = POK_Procedure - -- or else C = POK_Protected_Procedure - -- or else C = POK_Task_Procedure; - -- then - -- F := True; - -- return; - -- end if; + -- Generate: + -- C := Get_Prim_Op_Kind (tag! (VP), S); - SEU.Build_Common_Dispatching_Select_Statements (Loc, Typ, DT_Ptr, Stmts); + -- if C = POK_Procedure + -- or else C = POK_Protected_Procedure + -- or else C = POK_Task_Procedure; + -- then + -- F := True; + -- return; + -- end if; - if Present (Conc_Typ) then + SEU.Build_Common_Dispatching_Select_Statements + (Loc, Typ, DT_Ptr, Stmts); -- Generate: - -- I := get_entry_index (tag! (VP), S); + -- I := Get_Entry_Index (tag! (VP), S); -- I is the entry index and S is the dispatch table slot @@ -2469,12 +2489,6 @@ package body Exp_Disp is Make_Identifier (Loc, Name_uM), -- delay mode Make_Identifier (Loc, Name_uF)))); -- status flag end if; - - -- Implementation for limited tagged types - - else - Append_To (Stmts, - Make_Raise_Program_Error (Loc, Reason => PE_Explicit_Raise)); end if; return @@ -2554,6 +2568,7 @@ package body Exp_Disp is Name_TSD : constant Name_Id := New_External_Name (Tname, 'B'); Name_Exname : constant Name_Id := New_External_Name (Tname, 'E'); Name_No_Reg : constant Name_Id := New_External_Name (Tname, 'F'); + Name_ITable : Name_Id; DT : constant Node_Id := Make_Defining_Identifier (Loc, Name_DT); DT_Ptr : constant Node_Id := Make_Defining_Identifier (Loc, Name_DT_Ptr); @@ -2561,17 +2576,21 @@ package body Exp_Disp is TSD : constant Node_Id := Make_Defining_Identifier (Loc, Name_TSD); Exname : constant Node_Id := Make_Defining_Identifier (Loc, Name_Exname); No_Reg : constant Node_Id := Make_Defining_Identifier (Loc, Name_No_Reg); - - Generalized_Tag : constant Entity_Id := RTE (RE_Tag); - I_Depth : Int; - Size_Expr_Node : Node_Id; - Old_Tag1 : Node_Id; - Old_Tag2 : Node_Id; - Num_Ifaces : Int; - Nb_Prim : Int; - TSD_Num_Entries : Int; - Typ_Copy : constant Entity_Id := New_Copy (Typ); - AI : Elmt_Id; + ITable : Node_Id; + + Generalized_Tag : constant Entity_Id := RTE (RE_Tag); + AI : Elmt_Id; + I_Depth : Int; + Nb_Prim : Int; + Num_Ifaces : Int; + Old_Tag1 : Node_Id; + Old_Tag2 : Node_Id; + Parent_Num_Ifaces : Int; + Size_Expr_Node : Node_Id; + TSD_Num_Entries : Int; + + Ancestor_Copy : Entity_Id; + Typ_Copy : Entity_Id; begin if not RTE_Available (RE_Tag) then @@ -2579,27 +2598,44 @@ package body Exp_Disp is return New_List; end if; - -- Collect full list of directly and indirectly implemented interfaces - - Set_Parent (Typ_Copy, Parent (Typ)); - Set_Abstract_Interfaces (Typ_Copy, New_Elmt_List); - Collect_All_Interfaces (Typ_Copy); - -- Calculate the size of the DT and the TSD if Is_Interface (Typ) then -- Abstract interfaces need neither the DT nor the ancestors table. -- We reserve a single entry for its DT because at run-time the - -- pointer to this dummy DT is the tag of this abstract interface - -- type. + -- pointer to this dummy DT will be used as the tag of this abstract + -- interface type. Nb_Prim := 1; TSD_Num_Entries := 0; + Num_Ifaces := 0; else - -- Calculate the number of entries for the table of interfaces + -- Count the number of interfaces implemented by the ancestors + + Parent_Num_Ifaces := 0; + Num_Ifaces := 0; + + if Typ /= Etype (Typ) then + Ancestor_Copy := New_Copy (Etype (Typ)); + Set_Parent (Ancestor_Copy, Parent (Etype (Typ))); + Set_Abstract_Interfaces (Ancestor_Copy, New_Elmt_List); + Collect_All_Interfaces (Ancestor_Copy); + + AI := First_Elmt (Abstract_Interfaces (Ancestor_Copy)); + while Present (AI) loop + Parent_Num_Ifaces := Parent_Num_Ifaces + 1; + Next_Elmt (AI); + end loop; + end if; + + -- Count the number of additional interfaces implemented by Typ + + Typ_Copy := New_Copy (Typ); + Set_Parent (Typ_Copy, Parent (Typ)); + Set_Abstract_Interfaces (Typ_Copy, New_Elmt_List); + Collect_All_Interfaces (Typ_Copy); - Num_Ifaces := 0; AI := First_Elmt (Abstract_Interfaces (Typ_Copy)); while Present (AI) loop Num_Ifaces := Num_Ifaces + 1; @@ -2630,7 +2666,7 @@ package body Exp_Disp is end loop; end; - TSD_Num_Entries := I_Depth + Num_Ifaces + 1; + TSD_Num_Entries := I_Depth + 1; Nb_Prim := UI_To_Int (DT_Entry_Count (First_Tag_Component (Typ))); -- If the number of primitives of Typ is less that the number of @@ -2650,6 +2686,16 @@ package body Exp_Disp is Set_Ekind (DT_Ptr, E_Variable); Set_Is_Statically_Allocated (DT_Ptr); + if not Is_Interface (Typ) + and then Num_Ifaces > 0 + then + Name_ITable := New_External_Name (Tname, 'I'); + ITable := Make_Defining_Identifier (Loc, Name_ITable); + + Set_Ekind (ITable, E_Variable); + Set_Is_Statically_Allocated (ITable); + end if; + Set_Ekind (SSD, E_Variable); Set_Is_Statically_Allocated (SSD); @@ -2842,6 +2888,47 @@ package body Exp_Disp is Prefix => New_Reference_To (TSD, Loc), Attribute_Name => Name_Address)))); + -- Set the pointer to the Interfaces_Table (if any). Otherwise the + -- corresponding access component is set to null. + + if Is_Interface (Typ) then + null; + + elsif Num_Ifaces = 0 then + Append_To (Elab_Code, + Make_DT_Access_Action (Typ, + Action => Set_Interface_Table, + Args => New_List ( + New_Reference_To (DT_Ptr, Loc), -- DTptr + New_Reference_To (RTE (RE_Null_Address), Loc)))); -- null + + -- Generate the Interface_Table object and set the access + -- component if the TSD to it. + + else + Append_To (Result, + Make_Object_Declaration (Loc, + Defining_Identifier => ITable, + Aliased_Present => True, + Object_Definition => + Make_Subtype_Indication (Loc, + Subtype_Mark => New_Reference_To + (RTE (RE_Interface_Data), Loc), + Constraint => Make_Index_Or_Discriminant_Constraint (Loc, + Constraints => New_List ( + Make_Integer_Literal (Loc, + Num_Ifaces)))))); + + Append_To (Elab_Code, + Make_DT_Access_Action (Typ, + Action => Set_Interface_Table, + Args => New_List ( + New_Reference_To (DT_Ptr, Loc), -- DTptr + Make_Attribute_Reference (Loc, -- Value + Prefix => New_Reference_To (ITable, Loc), + Attribute_Name => Name_Address)))); + end if; + -- Generate: -- Set_Num_Prim_Ops (T'Tag, Nb_Prim) @@ -2858,39 +2945,53 @@ package body Exp_Disp is and then not Is_Interface (Typ) and then not Is_Abstract (Typ) and then not Is_Controlled (Typ) - and then Implements_Interface ( - Typ => Typ, - Kind => Any_Limited_Interface, - Check_Parent => True) - and then (Nb_Prim - Default_Prim_Op_Count) > 0 then - -- Generate the Select Specific Data table for tagged types that - -- implement a synchronized interface. The size of the table is - -- constrained by the number of non-predefined primitive operations. - - Append_To (Result, - Make_Object_Declaration (Loc, - Defining_Identifier => SSD, - Aliased_Present => True, - Object_Definition => - Make_Subtype_Indication (Loc, - Subtype_Mark => New_Reference_To ( - RTE (RE_Select_Specific_Data), Loc), - Constraint => Make_Index_Or_Discriminant_Constraint (Loc, - Constraints => New_List ( - Make_Integer_Literal (Loc, - Nb_Prim - Default_Prim_Op_Count)))))); - - -- Set the pointer to the Select Specific Data table in the TSD + -- Generate: + -- Set_Type_Kind (T'Tag, Type_Kind (Typ)); Append_To (Elab_Code, Make_DT_Access_Action (Typ, - Action => Set_SSD, + Action => Set_Tagged_Kind, Args => New_List ( New_Reference_To (DT_Ptr, Loc), -- DTptr - Make_Attribute_Reference (Loc, -- Value - Prefix => New_Reference_To (SSD, Loc), - Attribute_Name => Name_Address)))); + Tagged_Kind (Typ)))); -- Value + + -- Generate the Select Specific Data table for synchronized + -- types that implement a synchronized interface. The size + -- of the table is constrained by the number of non-predefined + -- primitive operations. + + if Is_Concurrent_Record_Type (Typ) + and then Implements_Interface ( + Typ => Typ, + Kind => Any_Limited_Interface, + Check_Parent => True) + and then (Nb_Prim - Default_Prim_Op_Count) > 0 + then + Append_To (Result, + Make_Object_Declaration (Loc, + Defining_Identifier => SSD, + Aliased_Present => True, + Object_Definition => + Make_Subtype_Indication (Loc, + Subtype_Mark => New_Reference_To ( + RTE (RE_Select_Specific_Data), Loc), + Constraint => Make_Index_Or_Discriminant_Constraint (Loc, + Constraints => New_List ( + Make_Integer_Literal (Loc, + Nb_Prim - Default_Prim_Op_Count)))))); + + -- Set the pointer to the Select Specific Data table in the TSD + + Append_To (Elab_Code, + Make_DT_Access_Action (Typ, + Action => Set_SSD, + Args => New_List ( + New_Reference_To (DT_Ptr, Loc), -- DTptr + Make_Attribute_Reference (Loc, -- Value + Prefix => New_Reference_To (SSD, Loc), + Attribute_Name => Name_Address)))); + end if; end if; -- Generate: Exname : constant String := full_qualified_name (typ); @@ -3158,12 +3259,13 @@ package body Exp_Disp is end; -- Generate: - -- Set_Offset_To_Top (DT_Ptr, 0); + -- Set_Offset_To_Top (0, DT_Ptr, 0); Append_To (Elab_Code, Make_Procedure_Call_Statement (Loc, Name => New_Reference_To (RTE (RE_Set_Offset_To_Top), Loc), Parameter_Associations => New_List ( + New_Reference_To (RTE (RE_Null_Address), Loc), New_Reference_To (DT_Ptr, Loc), Make_Integer_Literal (Loc, Uint_0)))); end if; @@ -3222,31 +3324,82 @@ package body Exp_Disp is Then_Statements => Elab_Code)); -- Ada 2005 (AI-251): Register the tag of the interfaces into - -- the table of implemented interfaces and ... + -- the table of implemented interfaces. if not Is_Interface (Typ) - and then Present (Abstract_Interfaces (Typ_Copy)) - and then not Is_Empty_Elmt_List (Abstract_Interfaces (Typ_Copy)) + and then Num_Ifaces > 0 then - AI := First_Elmt (Abstract_Interfaces (Typ_Copy)); - while Present (AI) loop + declare + Position : Int; - -- Generate: - -- Register_Interface (DT_Ptr, Interface'Tag); + begin + -- If the parent is an interface we must generate code to register + -- all its interfaces; otherwise this code is not needed because + -- Inherit_TSD has already inherited such interfaces. - Append_To (Result, - Make_DT_Access_Action (Typ, - Action => Register_Interface_Tag, - Args => New_List ( - Node1 => New_Reference_To (DT_Ptr, Loc), - Node2 => New_Reference_To - (Node - (First_Elmt - (Access_Disp_Table (Node (AI)))), - Loc)))); + if Is_Interface (Etype (Typ)) then + Position := 1; - Next_Elmt (AI); - end loop; + AI := First_Elmt (Abstract_Interfaces (Ancestor_Copy)); + while Present (AI) loop + -- Generate: + -- Register_Interface (DT_Ptr, Interface'Tag); + + Append_To (Result, + Make_DT_Access_Action (Typ, + Action => Register_Interface_Tag, + Args => New_List ( + Node1 => New_Reference_To (DT_Ptr, Loc), + Node2 => New_Reference_To + (Node + (First_Elmt + (Access_Disp_Table (Node (AI)))), + Loc), + Node3 => Make_Integer_Literal (Loc, Position)))); + + Position := Position + 1; + Next_Elmt (AI); + end loop; + end if; + + -- Register the interfaces that are not implemented by the + -- ancestor + + if Present (Abstract_Interfaces (Typ_Copy)) then + AI := First_Elmt (Abstract_Interfaces (Typ_Copy)); + + -- Skip the interfaces implemented by the ancestor + + for Count in 1 .. Parent_Num_Ifaces loop + Next_Elmt (AI); + end loop; + + -- Register the additional interfaces + + Position := Parent_Num_Ifaces + 1; + while Present (AI) loop + -- Generate: + -- Register_Interface (DT_Ptr, Interface'Tag); + + Append_To (Result, + Make_DT_Access_Action (Typ, + Action => Register_Interface_Tag, + Args => New_List ( + Node1 => New_Reference_To (DT_Ptr, Loc), + Node2 => New_Reference_To + (Node + (First_Elmt + (Access_Disp_Table (Node (AI)))), + Loc), + Node3 => Make_Integer_Literal (Loc, Position)))); + + Position := Position + 1; + Next_Elmt (AI); + end loop; + end if; + + pragma Assert (Position = Num_Ifaces + 1); + end; end if; return Result; @@ -3471,7 +3624,7 @@ package body Exp_Disp is Make_Index_Or_Discriminant_Constraint (Loc, Constraints => New_List ( Make_Integer_Literal (Loc, - Nb_Prim - Default_Prim_Op_Count)))))); + Nb_Prim - Default_Prim_Op_Count + 1)))))); -- Generate: -- Ada.Tags.Set_OSD (Iface_DT_Ptr, OSD); @@ -3480,63 +3633,12 @@ package body Exp_Disp is Make_DT_Access_Action (Typ, Action => Set_OSD, Args => New_List ( - New_Reference_To (Iface_DT_Ptr, Loc), + Unchecked_Convert_To (RTE (RE_Tag), + New_Reference_To (Iface_DT_Ptr, Loc)), Make_Attribute_Reference (Loc, Prefix => New_Reference_To (OSD, Loc), Attribute_Name => Name_Address)))); - -- Offset table creation - - if not Is_Interface (Typ) - and then not Is_Abstract (Typ) - and then not Is_Controlled (Typ) - and then Implements_Interface - (Typ => Typ, - Kind => Any_Limited_Interface, - Check_Parent => True) - and then (Nb_Prim - Default_Prim_Op_Count) > 0 - then - declare - Prim : Entity_Id; - Prim_Alias : Entity_Id; - Prim_Elmt : Elmt_Id; - - begin - -- Step 2: Populate the OSD table - - Prim_Alias := Empty; - Prim_Elmt := First_Elmt (Primitive_Operations (Typ)); - while Present (Prim_Elmt) loop - Prim := Node (Prim_Elmt); - - if Present (Abstract_Interface_Alias (Prim)) then - Prim_Alias := Abstract_Interface_Alias (Prim); - end if; - - if Present (Prim_Alias) - and then Present (First_Entity (Prim_Alias)) - and then Etype (First_Entity (Prim_Alias)) = Iface - then - -- Generate: - -- Ada.Tags.Set_Offset_Index ( - -- Iface_DT_Ptr, secondary_DT_Pos, primary_DT_pos); - - Append_To (Result, - Make_DT_Access_Action (Iface, - Action => Set_Offset_Index, - Args => New_List ( - New_Reference_To (Iface_DT_Ptr, Loc), - Make_Integer_Literal (Loc, DT_Position (Prim_Alias)), - Make_Integer_Literal (Loc, DT_Position (Prim))))); - - Prim_Alias := Empty; - end if; - - Next_Elmt (Prim_Elmt); - end loop; - end; - end if; - -- Generate: -- Set_Num_Prim_Ops (T'Tag, Nb_Prim) @@ -3548,6 +3650,73 @@ package body Exp_Disp is New_Reference_To (Iface_DT_Ptr, Loc)), Make_Integer_Literal (Loc, Nb_Prim)))); + if Ada_Version >= Ada_05 + and then not Is_Interface (Typ) + and then not Is_Abstract (Typ) + and then not Is_Controlled (Typ) + then + -- Generate: + -- Set_Tagged_Kind (Iface'Tag, Tagged_Kind (Iface)); + + Append_To (Result, + Make_DT_Access_Action (Typ, + Action => Set_Tagged_Kind, + Args => New_List ( + Unchecked_Convert_To (RTE (RE_Tag), -- DTptr + New_Reference_To (Iface_DT_Ptr, Loc)), + Tagged_Kind (Typ)))); -- Value + + if Is_Concurrent_Record_Type (Typ) + and then Implements_Interface ( + Typ => Typ, + Kind => Any_Limited_Interface, + Check_Parent => True) + and then (Nb_Prim - Default_Prim_Op_Count) > 0 + then + declare + Prim : Entity_Id; + Prim_Alias : Entity_Id; + Prim_Elmt : Elmt_Id; + + begin + -- Step 2: Populate the OSD table + + Prim_Alias := Empty; + Prim_Elmt := First_Elmt (Primitive_Operations (Typ)); + while Present (Prim_Elmt) loop + Prim := Node (Prim_Elmt); + + if Present (Abstract_Interface_Alias (Prim)) then + Prim_Alias := Abstract_Interface_Alias (Prim); + end if; + + if Present (Prim_Alias) + and then Present (First_Entity (Prim_Alias)) + and then Etype (First_Entity (Prim_Alias)) = Iface + then + -- Generate: + -- Ada.Tags.Set_Offset_Index (Tag (Iface_DT_Ptr), + -- Secondary_DT_Pos, Primary_DT_pos); + + Append_To (Result, + Make_DT_Access_Action (Iface, + Action => Set_Offset_Index, + Args => New_List ( + Unchecked_Convert_To (RTE (RE_Tag), + New_Reference_To (Iface_DT_Ptr, Loc)), + Make_Integer_Literal (Loc, + DT_Position (Prim_Alias)), + Make_Integer_Literal (Loc, + DT_Position (Prim))))); + + Prim_Alias := Empty; + end if; + + Next_Elmt (Prim_Elmt); + end loop; + end; + end if; + end if; end Make_Secondary_DT; ------------------------------------- @@ -4413,6 +4582,49 @@ package body Exp_Disp is end if; end Set_Default_Constructor; + ----------------- + -- Tagged_Kind -- + ----------------- + + function Tagged_Kind (T : Entity_Id) return Node_Id is + Conc_Typ : Entity_Id; + Loc : constant Source_Ptr := Sloc (T); + + begin + pragma Assert (Is_Tagged_Type (T)); + + -- Abstract kinds + + if Is_Abstract (T) then + if Is_Limited_Record (T) then + return New_Reference_To (RTE (RE_TK_Abstract_Limited_Tagged), Loc); + else + return New_Reference_To (RTE (RE_TK_Abstract_Tagged), Loc); + end if; + + -- Concurrent kinds + + elsif Is_Concurrent_Record_Type (T) then + Conc_Typ := Corresponding_Concurrent_Type (T); + + if Ekind (Conc_Typ) = E_Protected_Type then + return New_Reference_To (RTE (RE_TK_Protected), Loc); + else + pragma Assert (Ekind (Conc_Typ) = E_Task_Type); + return New_Reference_To (RTE (RE_TK_Task), Loc); + end if; + + -- Regular tagged kinds + + else + if Is_Limited_Record (T) then + return New_Reference_To (RTE (RE_TK_Limited_Tagged), Loc); + else + return New_Reference_To (RTE (RE_TK_Tagged), Loc); + end if; + end if; + end Tagged_Kind; + -------------- -- Write_DT -- -------------- diff --git a/gcc/ada/exp_disp.ads b/gcc/ada/exp_disp.ads index bdc1417d4c4..a0f6b18672d 100644 --- a/gcc/ada/exp_disp.ads +++ b/gcc/ada/exp_disp.ads @@ -184,11 +184,11 @@ package Exp_Disp is Get_Access_Level, Get_Entry_Index, Get_External_Tag, - Get_Offset_Index, Get_Prim_Op_Address, Get_Prim_Op_Kind, Get_RC_Offset, Get_Remotely_Callable, + Get_Tagged_Kind, Inherit_DT, Inherit_TSD, Register_Interface_Tag, @@ -197,6 +197,7 @@ package Exp_Disp is Set_Entry_Index, Set_Expanded_Name, Set_External_Tag, + Set_Interface_Table, Set_Offset_Index, Set_OSD, Set_Prim_Op_Address, @@ -205,6 +206,7 @@ package Exp_Disp is Set_Remotely_Callable, Set_SSD, Set_TSD, + Set_Tagged_Kind, TSD_Entry_Size, TSD_Prologue_Size); @@ -217,16 +219,17 @@ package Exp_Disp is -- Ada 2005 (AI-251): Displace all the actuals corresponding to class-wide -- interfaces to reference the interface tag of the actual object - procedure Expand_Interface_Conversion (N : Node_Id); + procedure Expand_Interface_Conversion + (N : Node_Id; + Is_Static : Boolean := True); -- Ada 2005 (AI-251): N is a type-conversion node. Reference the base of -- the object to give access to the interface tag associated with the - -- secondary dispatch table + -- secondary dispatch table. function Expand_Interface_Thunk (N : Node_Id; Thunk_Alias : Node_Id; - Thunk_Id : Entity_Id; - Thunk_Tag : Entity_Id) return Node_Id; + Thunk_Id : Entity_Id) return Node_Id; -- Ada 2005 (AI-251): When a tagged type implements abstract interfaces we -- generate additional subprograms (thunks) to have a layout compatible -- with the C++ ABI. The thunk modifies the value of the first actual of diff --git a/gcc/ada/exp_imgv.adb b/gcc/ada/exp_imgv.adb index 1fdbced6814..2f76d639b7c 100644 --- a/gcc/ada/exp_imgv.adb +++ b/gcc/ada/exp_imgv.adb @@ -32,6 +32,7 @@ with Exp_Util; use Exp_Util; with Namet; use Namet; with Nmake; use Nmake; with Nlists; use Nlists; +with Opt; use Opt; with Rtsfind; use Rtsfind; with Sem_Res; use Sem_Res; with Sinfo; use Sinfo; @@ -148,7 +149,6 @@ package body Exp_Imgv is Make_Aggregate (Loc, Expressions => Ind))), Suppress => All_Checks); - end Build_Enumeration_Image_Tables; ---------------------------- @@ -191,6 +191,7 @@ package body Exp_Imgv is -- For types whose root type is Wide_Character -- xx = Wide_Character -- tv = Wide_Character (Expr) + -- pm = Boolean, true if Ada 2005 mode, False otherwise -- For types whose root type is Wide_Wide_Character -- xx = Wide_Wide_haracter @@ -398,6 +399,12 @@ package body Exp_Imgv is Set_Conversion_OK (First (Arglist)); Set_Etype (First (Arglist), Tent); + + -- For Wide_Character, append Ada 2005 indication + + elsif Rtyp = Standard_Wide_Character then + Append_To (Arglist, + New_Reference_To (Boolean_Literals (Ada_Version >= Ada_05), Loc)); end if; Rewrite (N, diff --git a/gcc/ada/exp_sel.adb b/gcc/ada/exp_sel.adb new file mode 100644 index 00000000000..dbb7fb29086 --- /dev/null +++ b/gcc/ada/exp_sel.adb @@ -0,0 +1,220 @@ +------------------------------------------------------------------------------ +-- -- +-- GNAT COMPILER COMPONENTS -- +-- -- +-- E X P _ S E L -- +-- -- +-- B o d y -- +-- -- +-- Copyright (C) 1992-2005, Free Software Foundation, Inc. -- +-- -- +-- GNAT is free software; you can redistribute it and/or modify it under -- +-- terms of the GNU General Public License as published by the Free Soft- -- +-- ware Foundation; either version 2, or (at your option) any later ver- -- +-- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- +-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- +-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- +-- for more details. You should have received a copy of the GNU General -- +-- Public License distributed with GNAT; see file COPYING. If not, write -- +-- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, -- +-- Boston, MA 02110-1301, USA. -- +-- -- +-- GNAT was originally developed by the GNAT team at New York University. -- +-- Extensive contributions were provided by Ada Core Technologies Inc. -- +-- -- +------------------------------------------------------------------------------ + +with Einfo; use Einfo; +with Nlists; use Nlists; +with Nmake; use Nmake; +with Rtsfind; use Rtsfind; +with Stand; use Stand; +with Tbuild; use Tbuild; + +package body Exp_Sel is + + ----------------------- + -- Build_Abort_Block -- + ----------------------- + + function Build_Abort_Block + (Loc : Source_Ptr; + Abr_Blk_Ent : Entity_Id; + Cln_Blk_Ent : Entity_Id; + Blk : Node_Id) return Node_Id + is + begin + return + Make_Block_Statement (Loc, + Identifier => New_Reference_To (Abr_Blk_Ent, Loc), + + Declarations => No_List, + + Handled_Statement_Sequence => + Make_Handled_Sequence_Of_Statements (Loc, + Statements => + New_List ( + Make_Implicit_Label_Declaration (Loc, + Defining_Identifier => + Cln_Blk_Ent, + Label_Construct => + Blk), + Blk), + + Exception_Handlers => + New_List ( + Make_Exception_Handler (Loc, + Exception_Choices => + New_List ( + New_Reference_To (Stand.Abort_Signal, Loc)), + Statements => + New_List ( + Make_Procedure_Call_Statement (Loc, + Name => + New_Reference_To (RTE ( + RE_Abort_Undefer), Loc), + Parameter_Associations => No_List)))))); + end Build_Abort_Block; + + ------------- + -- Build_B -- + ------------- + + function Build_B + (Loc : Source_Ptr; + Decls : List_Id) return Entity_Id + is + B : constant Entity_Id := Make_Defining_Identifier (Loc, + Chars => New_Internal_Name ('B')); + + begin + Append_To (Decls, + Make_Object_Declaration (Loc, + Defining_Identifier => + B, + Object_Definition => + New_Reference_To (Standard_Boolean, Loc), + Expression => + New_Reference_To (Standard_False, Loc))); + + return B; + end Build_B; + + ------------- + -- Build_C -- + ------------- + + function Build_C + (Loc : Source_Ptr; + Decls : List_Id) return Entity_Id + is + C : constant Entity_Id := Make_Defining_Identifier (Loc, + Chars => New_Internal_Name ('C')); + + begin + Append_To (Decls, + Make_Object_Declaration (Loc, + Defining_Identifier => + C, + Object_Definition => + New_Reference_To (RTE (RE_Prim_Op_Kind), Loc))); + + return C; + end Build_C; + + ------------------------- + -- Build_Cleanup_Block -- + ------------------------- + + function Build_Cleanup_Block + (Loc : Source_Ptr; + Blk_Ent : Entity_Id; + Stmts : List_Id; + Clean_Ent : Entity_Id) return Node_Id + is + Cleanup_Block : constant Node_Id := + Make_Block_Statement (Loc, + Identifier => New_Reference_To (Blk_Ent, Loc), + Declarations => No_List, + Handled_Statement_Sequence => + Make_Handled_Sequence_Of_Statements (Loc, + Statements => Stmts), + Is_Asynchronous_Call_Block => True); + + begin + Set_Entry_Cancel_Parameter (Blk_Ent, Clean_Ent); + + return Cleanup_Block; + end Build_Cleanup_Block; + + ------------- + -- Build_K -- + ------------- + + function Build_K + (Loc : Source_Ptr; + Decls : List_Id; + Obj : Entity_Id) return Entity_Id + is + K : constant Entity_Id := Make_Defining_Identifier (Loc, + Chars => New_Internal_Name ('K')); + + begin + Append_To (Decls, + Make_Object_Declaration (Loc, + Defining_Identifier => K, + Object_Definition => + New_Reference_To (RTE (RE_Tagged_Kind), Loc), + Expression => + Make_Function_Call (Loc, + Name => New_Reference_To (RTE (RE_Get_Tagged_Kind), Loc), + Parameter_Associations => New_List ( + Unchecked_Convert_To (RTE (RE_Tag), Obj))))); + + return K; + end Build_K; + + ------------- + -- Build_S -- + ------------- + + function Build_S + (Loc : Source_Ptr; + Decls : List_Id) return Entity_Id + is + S : constant Entity_Id := Make_Defining_Identifier (Loc, + Chars => New_Internal_Name ('S')); + + begin + Append_To (Decls, + Make_Object_Declaration (Loc, + Defining_Identifier => S, + Object_Definition => + New_Reference_To (Standard_Integer, Loc))); + + return S; + end Build_S; + + ------------------------ + -- Build_S_Assignment -- + ------------------------ + + function Build_S_Assignment + (Loc : Source_Ptr; + S : Entity_Id; + Obj : Entity_Id; + Call_Ent : Entity_Id) return Node_Id + is + begin + return + Make_Assignment_Statement (Loc, + Name => New_Reference_To (S, Loc), + Expression => + Make_Function_Call (Loc, + Name => New_Reference_To (RTE (RE_Get_Offset_Index), Loc), + Parameter_Associations => New_List ( + Unchecked_Convert_To (RTE (RE_Tag), Obj), + Make_Integer_Literal (Loc, DT_Position (Call_Ent))))); + end Build_S_Assignment; + +end Exp_Sel; diff --git a/gcc/ada/exp_sel.ads b/gcc/ada/exp_sel.ads new file mode 100644 index 00000000000..fd8caceeee6 --- /dev/null +++ b/gcc/ada/exp_sel.ads @@ -0,0 +1,113 @@ +------------------------------------------------------------------------------ +-- -- +-- GNAT COMPILER COMPONENTS -- +-- -- +-- E X P _ S E L -- +-- -- +-- S p e c -- +-- -- +-- Copyright (C) 1992-2005, Free Software Foundation, Inc. -- +-- -- +-- GNAT is free software; you can redistribute it and/or modify it under -- +-- terms of the GNU General Public License as published by the Free Soft- -- +-- ware Foundation; either version 2, or (at your option) any later ver- -- +-- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- +-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- +-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- +-- for more details. You should have received a copy of the GNU General -- +-- Public License distributed with GNAT; see file COPYING. If not, write -- +-- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, -- +-- Boston, MA 02110-1301, USA. -- +-- -- +-- GNAT was originally developed by the GNAT team at New York University. -- +-- Extensive contributions were provided by Ada Core Technologies Inc. -- +-- -- +------------------------------------------------------------------------------ + +-- Routines used in Chapter 9 for the expansion of dispatching triggers in +-- select statements (Ada 2005: AI-345) + +with Types; use Types; + +package Exp_Sel is + + function Build_Abort_Block + (Loc : Source_Ptr; + Abr_Blk_Ent : Entity_Id; + Cln_Blk_Ent : Entity_Id; + Blk : Node_Id) return Node_Id; + -- Generate: + -- begin + -- Blk + -- exception + -- when Abort_Signal => Abort_Undefer; + -- end; + -- Abr_Blk_Ent is the name of the generated block, Cln_Blk_Ent is the name + -- of the encapsulated cleanup block, Blk is the actual block name. + + function Build_B + (Loc : Source_Ptr; + Decls : List_Id) return Entity_Id; + -- Generate: + -- B : Boolean := False; + -- Append the object declaration to the list and return its defining + -- identifier. + + function Build_C + (Loc : Source_Ptr; + Decls : List_Id) return Entity_Id; + -- Generate: + -- C : Ada.Tags.Prim_Op_Kind; + -- Append the object declaration to the list and return its defining + -- identifier. + + function Build_Cleanup_Block + (Loc : Source_Ptr; + Blk_Ent : Entity_Id; + Stmts : List_Id; + Clean_Ent : Entity_Id) return Node_Id; + -- Generate: + -- declare + -- procedure _clean is + -- begin + -- ... + -- end _clean; + -- begin + -- Stmts + -- at end + -- _clean; + -- end; + -- Blk_Ent is the name of the generated block, Stmts is the list of + -- encapsulated statements and Clean_Ent is the parameter to the + -- _clean procedure. + + function Build_K + (Loc : Source_Ptr; + Decls : List_Id; + Obj : Entity_Id) return Entity_Id; + -- Generate + -- K : Ada.Tags.Tagged_Kind := + -- Ada.Tags.Get_Tagged_Kind (Ada.Tags.Tag (Obj)); + -- where Obj is the pointer to a secondary table. Append the object + -- declaration to the list and return its defining identifier. + + function Build_S + (Loc : Source_Ptr; + Decls : List_Id) return Entity_Id; + -- Generate: + -- S : Integer; + -- Append the object declaration to the list and return its defining + -- identifier. + + function Build_S_Assignment + (Loc : Source_Ptr; + S : Entity_Id; + Obj : Entity_Id; + Call_Ent : Entity_Id) return Node_Id; + -- Generate: + -- S := Ada.Tags.Get_Offset_Index ( + -- Ada.Tags.Tag (Obj), DT_Position (Call_Ent)); + -- where Obj is the pointer to a secondary table, Call_Ent is the entity + -- of the dispatching call name. Return the generated assignment. + +end Exp_Sel; diff --git a/gcc/ada/exp_util.adb b/gcc/ada/exp_util.adb index c6924e97cb6..997fc7b7b90 100644 --- a/gcc/ada/exp_util.adb +++ b/gcc/ada/exp_util.adb @@ -1447,7 +1447,7 @@ package body Exp_Util is Iface : Entity_Id) return Entity_Id is ADT : Elmt_Id; - Found : Boolean := False; + Found : Boolean := False; Typ : Entity_Id := T; procedure Find_Secondary_Table (Typ : Entity_Id); @@ -1544,9 +1544,9 @@ package body Exp_Util is procedure Find_Tag (Typ : in Entity_Id); -- Internal subprogram used to recursively climb to the ancestors - ----------------- - -- Find_AI_Tag -- - ----------------- + -------------- + -- Find_Tag -- + -------------- procedure Find_Tag (Typ : in Entity_Id) is AI_Elmt : Elmt_Id; @@ -1642,6 +1642,101 @@ package body Exp_Util is return AI_Tag; end Find_Interface_Tag; + -------------------- + -- Find_Interface -- + -------------------- + + function Find_Interface + (T : Entity_Id; + Comp : Entity_Id) return Entity_Id + is + AI_Tag : Entity_Id; + Found : Boolean := False; + Iface : Entity_Id; + Typ : Entity_Id := T; + + procedure Find_Iface (Typ : in Entity_Id); + -- Internal subprogram used to recursively climb to the ancestors + + ---------------- + -- Find_Iface -- + ---------------- + + procedure Find_Iface (Typ : in Entity_Id) is + AI_Elmt : Elmt_Id; + + begin + -- Climb to the root type + + if Etype (Typ) /= Typ then + Find_Iface (Etype (Typ)); + end if; + + -- Traverse the list of interfaces implemented by the type + + if not Found + and then Present (Abstract_Interfaces (Typ)) + and then not (Is_Empty_Elmt_List (Abstract_Interfaces (Typ))) + then + -- Skip the tag associated with the primary table + + pragma Assert (Etype (First_Tag_Component (Typ)) = RTE (RE_Tag)); + AI_Tag := Next_Tag_Component (First_Tag_Component (Typ)); + pragma Assert (Present (AI_Tag)); + + AI_Elmt := First_Elmt (Abstract_Interfaces (Typ)); + while Present (AI_Elmt) loop + if AI_Tag = Comp then + Iface := Node (AI_Elmt); + Found := True; + return; + end if; + + AI_Tag := Next_Tag_Component (AI_Tag); + Next_Elmt (AI_Elmt); + end loop; + end if; + end Find_Iface; + + -- Start of processing for Find_Interface + + begin + -- Handle private types + + if Has_Private_Declaration (Typ) + and then Present (Full_View (Typ)) + then + Typ := Full_View (Typ); + end if; + + -- Handle access types + + if Is_Access_Type (Typ) then + Typ := Directly_Designated_Type (Typ); + end if; + + -- Handle task and protected types implementing interfaces + + if Is_Concurrent_Type (Typ) then + Typ := Corresponding_Record_Type (Typ); + end if; + + if Is_Class_Wide_Type (Typ) then + Typ := Etype (Typ); + end if; + + -- Handle entities from the limited view + + if Ekind (Typ) = E_Incomplete_Type then + pragma Assert (Present (Non_Limited_View (Typ))); + Typ := Non_Limited_View (Typ); + end if; + + Find_Iface (Typ); + pragma Assert (Found); + return Iface; + end Find_Interface; + ------------------ -- Find_Prim_Op -- ------------------ @@ -3050,14 +3145,16 @@ package body Exp_Util is function Is_Ref_To_Bit_Packed_Slice (N : Node_Id) return Boolean is begin - if Is_Entity_Name (N) + if Nkind (N) = N_Type_Conversion then + return Is_Ref_To_Bit_Packed_Slice (Expression (N)); + + elsif Is_Entity_Name (N) and then Is_Object (Entity (N)) and then Present (Renamed_Object (Entity (N))) then return Is_Ref_To_Bit_Packed_Slice (Renamed_Object (Entity (N))); - end if; - if Nkind (N) = N_Slice + elsif Nkind (N) = N_Slice and then Is_Bit_Packed_Array (Etype (Prefix (N))) then return True; @@ -3500,7 +3597,8 @@ package body Exp_Util is and then Has_Unknown_Discriminants (Unc_Typ) then -- Prepare the subtype completion, Go to base type to - -- find underlying type. + -- find underlying type, because the type may be a generic + -- actual or an explicit subtype. Utyp := Underlying_Type (Base_Type (Unc_Typ)); Full_Subtyp := Make_Defining_Identifier (Loc, @@ -3521,7 +3619,7 @@ package body Exp_Util is -- Define the dummy private subtype Set_Ekind (Priv_Subtyp, Subtype_Kind (Ekind (Unc_Typ))); - Set_Etype (Priv_Subtyp, Unc_Typ); + Set_Etype (Priv_Subtyp, Base_Type (Unc_Typ)); Set_Scope (Priv_Subtyp, Full_Subtyp); Set_Is_Constrained (Priv_Subtyp); Set_Is_Tagged_Type (Priv_Subtyp, Is_Tagged_Type (Unc_Typ)); @@ -3585,7 +3683,7 @@ package body Exp_Util is return New_Occurrence_Of (CW_Subtype, Loc); end; - -- Indefinite record type with discriminants. + -- Indefinite record type with discriminants else D := First_Discriminant (Unc_Typ); diff --git a/gcc/ada/exp_util.ads b/gcc/ada/exp_util.ads index 2afb88f8ca6..fad07ccafe5 100644 --- a/gcc/ada/exp_util.ads +++ b/gcc/ada/exp_util.ads @@ -339,6 +339,13 @@ package Exp_Util is -- declarations and/or allocations when the type is indefinite (including -- class-wide). + function Find_Interface + (T : Entity_Id; + Comp : Entity_Id) return Entity_Id; + -- Ada 2005 (AI-251): Given a tagged type and one of its components + -- associated with the secondary dispatch table of an abstract interface + -- type, return the associated abstract interface type. + function Find_Interface_ADT (T : Entity_Id; Iface : Entity_Id) return Entity_Id; diff --git a/gcc/ada/freeze.adb b/gcc/ada/freeze.adb index 6252fe887f4..1a12c4fb991 100644 --- a/gcc/ada/freeze.adb +++ b/gcc/ada/freeze.adb @@ -207,7 +207,6 @@ package body Freeze is After : in out Node_Id) is Body_Node : constant Node_Id := Build_Renamed_Body (Decl, New_S); - begin Insert_After (After, Body_Node); Mark_Rewrite_Insertion (Body_Node); @@ -1554,7 +1553,6 @@ package body Freeze is Comp := First_Entity (Rec); Prev := Empty; - while Present (Comp) loop -- First handle the (real) component case @@ -1883,26 +1881,37 @@ package body Freeze is Error_Msg_N ("\?since no component clauses were specified", ADC); end if; - -- Check for useless pragma Pack when all components placed + -- Check for useless pragma Pack when all components placed. We only + -- do this check for record types, not subtypes, since a subtype may + -- have all its components placed, and it still makes perfectly good + -- sense to pack other subtypes or the parent type. - if Is_Packed (Rec) + if Ekind (Rec) = E_Record_Type + and then Is_Packed (Rec) and then not Unplaced_Component - and then Warn_On_Redundant_Constructs then - Error_Msg_N - ("?pragma Pack has no effect, no unplaced components", - Get_Rep_Pragma (Rec, Name_Pack)); + -- Reset packed status. Probably not necessary, but we do it + -- so that there is no chance of the back end doing something + -- strange with this redundant indication of packing. + Set_Is_Packed (Rec, False); + + -- Give warning if redundant constructs warnings on + + if Warn_On_Redundant_Constructs then + Error_Msg_N + ("?pragma Pack has no effect, no unplaced components", + Get_Rep_Pragma (Rec, Name_Pack)); + end if; end if; - -- If this is the record corresponding to a remote type, - -- freeze the remote type here since that is what we are - -- semantically freezing. This prevents having the freeze - -- node for that type in an inner scope. + -- If this is the record corresponding to a remote type, freeze the + -- remote type here since that is what we are semantically freezing. + -- This prevents the freeze node for that type in an inner scope. -- Also, Check for controlled components and unchecked unions. - -- Finally, enforce the restriction that access attributes with - -- a current instance prefix can only apply to limited types. + -- Finally, enforce the restriction that access attributes with a + -- current instance prefix can only apply to limited types. if Ekind (Rec) = E_Record_Type then if Present (Corresponding_Remote_Type (Rec)) then @@ -1932,9 +1941,8 @@ package body Freeze is if Has_Per_Object_Constraint (Comp) and then not Is_Limited_Type (Rec) then - -- Scan component declaration for likely misuses of - -- current instance, either in a constraint or in a - -- default expression. + -- Scan component declaration for likely misuses of current + -- instance, either in a constraint or a default expression. Check_Current_Instance (Parent (Comp)); end if; @@ -1945,11 +1953,11 @@ package body Freeze is Set_Component_Alignment_If_Not_Set (Rec); - -- For first subtypes, check if there are any fixed-point - -- fields with component clauses, where we must check the size. - -- This is not done till the freeze point, since for fixed-point - -- types, we do not know the size until the type is frozen. - -- Similar processing applies to bit packed arrays. + -- For first subtypes, check if there are any fixed-point fields with + -- component clauses, where we must check the size. This is not done + -- till the freeze point, since for fixed-point types, we do not know + -- the size until the type is frozen. Similar processing applies to + -- bit packed arrays. if Is_First_Subtype (Rec) then Comp := First_Component (Rec); @@ -2103,12 +2111,12 @@ package body Freeze is if Nkind (Expr) = N_Aggregate then Expand_Atomic_Aggregate (Expr, Etype (E)); - -- If the expression is a reference to a record or array - -- object entity, then reset Is_True_Constant to False so - -- that the compiler will not optimize away the intermediate - -- object, which we need in this case for the same reason - -- (to ensure that the actual assignment is atomic, rather - -- than component-wise). + -- If the expression is a reference to a record or array object + -- entity, then reset Is_True_Constant to False so that the + -- compiler will not optimize away the intermediate object, + -- which we need in this case for the same reason (to ensure + -- that the actual assignment is atomic, rather than + -- component-wise). elsif Is_Entity_Name (Expr) and then (Is_Record_Type (Etype (Expr)) @@ -2854,23 +2862,21 @@ package body Freeze is Next_Entity (Comp); end loop; - -- Private types are required to point to the same freeze node - -- as their corresponding full views. The freeze node itself - -- has to point to the partial view of the entity (because - -- from the partial view, we can retrieve the full view, but - -- not the reverse). However, in order to freeze correctly, - -- we need to freeze the full view. If we are freezing at the - -- end of a scope (or within the scope of the private type), - -- the partial and full views will have been swapped, the - -- full view appears first in the entity chain and the swapping - -- mechanism ensures that the pointers are properly set (on - -- scope exit). - - -- If we encounter the partial view before the full view - -- (e.g. when freezing from another scope), we freeze the - -- full view, and then set the pointers appropriately since - -- we cannot rely on swapping to fix things up (subtypes in an - -- outer scope might not get swapped). + -- Private types are required to point to the same freeze node as + -- their corresponding full views. The freeze node itself has to + -- point to the partial view of the entity (because from the partial + -- view, we can retrieve the full view, but not the reverse). + -- However, in order to freeze correctly, we need to freeze the full + -- view. If we are freezing at the end of a scope (or within the + -- scope of the private type), the partial and full views will have + -- been swapped, the full view appears first in the entity chain and + -- the swapping mechanism ensures that the pointers are properly set + -- (on scope exit). + + -- If we encounter the partial view before the full view (e.g. when + -- freezing from another scope), we freeze the full view, and then + -- set the pointers appropriately since we cannot rely on swapping to + -- fix things up (subtypes in an outer scope might not get swapped). elsif Is_Incomplete_Or_Private_Type (E) and then not Is_Generic_Type (E) @@ -2879,8 +2885,8 @@ package body Freeze is if Present (Full_View (E)) then - -- If full view has already been frozen, then no - -- further processing is required + -- If full view has already been frozen, then no further + -- processing is required if Is_Frozen (Full_View (E)) then @@ -2888,9 +2894,8 @@ package body Freeze is Set_Freeze_Node (E, Empty); Check_Debug_Info_Needed (E); - -- Otherwise freeze full view and patch the pointers - -- so that the freeze node will elaborate both views - -- in the back-end. + -- Otherwise freeze full view and patch the pointers so that + -- the freeze node will elaborate both views in the back-end. else declare @@ -2926,11 +2931,11 @@ package body Freeze is Check_Debug_Info_Needed (E); end if; - -- AI-117 requires that the convention of a partial view - -- be the same as the convention of the full view. Note - -- that this is a recognized breach of privacy, but it's - -- essential for logical consistency of representation, - -- and the lack of a rule in RM95 was an oversight. + -- AI-117 requires that the convention of a partial view be the + -- same as the convention of the full view. Note that this is a + -- recognized breach of privacy, but it's essential for logical + -- consistency of representation, and the lack of a rule in + -- RM95 was an oversight. Set_Convention (E, Convention (Full_View (E))); @@ -2940,10 +2945,10 @@ package body Freeze is -- Size information is copied from the full view to the -- incomplete or private view for consistency - -- We skip this is the full view is not a type. This is - -- very strange of course, and can only happen as a result - -- of certain illegalities, such as a premature attempt to - -- derive from an incomplete type. + -- We skip this is the full view is not a type. This is very + -- strange of course, and can only happen as a result of + -- certain illegalities, such as a premature attempt to derive + -- from an incomplete type. if Is_Type (Full_View (E)) then Set_Size_Info (E, Full_View (E)); @@ -3003,9 +3008,9 @@ package body Freeze is ("(Ada 2005): invalid use of tagged incomplete type", E); end if; - -- For access to a protected subprogram, freeze the equivalent - -- type (however this is not set if we are not generating code - -- or if this is an anonymous type used just for resolution). + -- For access to a protected subprogram, freeze the equivalent type + -- (however this is not set if we are not generating code or if this + -- is an anonymous type used just for resolution). elsif Ekind (E) = E_Access_Protected_Subprogram_Type then @@ -3053,9 +3058,9 @@ package body Freeze is if Is_Fixed_Point_Type (E) then Freeze_Fixed_Point_Type (E); - -- Some error checks required for ordinary fixed-point type. - -- Defer these till the freeze-point since we need the small - -- and range values. We only do these checks for base types + -- Some error checks required for ordinary fixed-point type. Defer + -- these till the freeze-point since we need the small and range + -- values. We only do these checks for base types if Is_Ordinary_Fixed_Point_Type (E) and then E = Base_Type (E) @@ -3117,13 +3122,13 @@ package body Freeze is -- inherit the convention of the full view of the type. Inherited -- and overriding operations are defined to inherit the convention -- of their parent or overridden subprogram (also specified in - -- AI-117), and that will have occurred earlier (in - -- Derive_Subprogram and New_Overloaded_Entity). Here we set the - -- convention of primitives that are still convention Ada, which - -- will ensure that any new primitives inherit the type's - -- convention. Class-wide types can have a foreign convention - -- inherited from their specific type, but are excluded from this - -- since they don't have any associated primitives. + -- AI-117), which will have occurred earlier (in Derive_Subprogram + -- and New_Overloaded_Entity). Here we set the convention of + -- primitives that are still convention Ada, which will ensure + -- that any new primitives inherit the type's convention. + -- Class-wide types can have a foreign convention inherited from + -- their specific type, but are excluded from this since they + -- don't have any associated primitives. if Is_Tagged_Type (E) and then not Is_Class_Wide_Type (E) @@ -3178,35 +3183,30 @@ package body Freeze is -- Loop to generate references for primitive operations - Prim := First_Elmt (Prim_List); - while Present (Prim) loop - Ent := Node (Prim); - - -- If the operation is derived, get the original for cross- - -- reference purposes (it is the original for which we want - -- the xref, and for which the comes from source test needs - -- to be performed). - - while Present (Alias (Ent)) loop - Ent := Alias (Ent); - end loop; + if Present (Prim_List) then + Prim := First_Elmt (Prim_List); + while Present (Prim) loop - Generate_Reference (E, Ent, 'p', Set_Ref => False); - Next_Elmt (Prim); - end loop; + -- If the operation is derived, get the original for + -- cross-reference purposes (it is the original for + -- which we want the xref, and for which the comes + -- from source test needs to be performed). - -- If we get an exception, then something peculiar has happened - -- probably as a result of a previous error. Since this is only - -- for non-critical cross-references, ignore the error. + Ent := Node (Prim); + while Present (Alias (Ent)) loop + Ent := Alias (Ent); + end loop; - exception - when others => null; + Generate_Reference (E, Ent, 'p', Set_Ref => False); + Next_Elmt (Prim); + end loop; + end if; end; end if; - -- Now that all types from which E may depend are frozen, see - -- if the size is known at compile time, if it must be unsigned, - -- or if strict alignent is required + -- Now that all types from which E may depend are frozen, see if the + -- size is known at compile time, if it must be unsigned, or if + -- strict alignent is required Check_Compile_Time_Size (E); Check_Unsigned_Type (E); @@ -3509,11 +3509,11 @@ package body Freeze is -- For an allocator freeze designated type if not frozen already - -- For an aggregate whose component type is an access type, freeze - -- the designated type now, so that its freeze does not appear within - -- the loop that might be created in the expansion of the aggregate. - -- If the designated type is a private type without full view, the - -- expression cannot contain an allocator, so the type is not frozen. + -- For an aggregate whose component type is an access type, freeze the + -- designated type now, so that its freeze does not appear within the + -- loop that might be created in the expansion of the aggregate. If the + -- designated type is a private type without full view, the expression + -- cannot contain an allocator, so the type is not frozen. Desig_Typ := Empty; @@ -3567,11 +3567,11 @@ package body Freeze is loop Parent_P := Parent (P); - -- If we don't have a parent, then we are not in a well-formed - -- tree. This is an unusual case, but there are some legitimate - -- situations in which this occurs, notably when the expressions - -- in the range of a type declaration are resolved. We simply - -- ignore the freeze request in this case. Is this right ??? + -- If we don't have a parent, then we are not in a well-formed tree. + -- This is an unusual case, but there are some legitimate situations + -- in which this occurs, notably when the expressions in the range of + -- a type declaration are resolved. We simply ignore the freeze + -- request in this case. Is this right ??? if No (Parent_P) then return; @@ -3636,9 +3636,9 @@ package body Freeze is then return; - -- If enumeration literal appears as the name of a - -- function which is the choice, then also do not freeze. - -- This happens in the overloaded literal case, where the + -- If enumeration literal appears as the name of function + -- which is the choice, then also do not freeze. This + -- happens in the overloaded literal case, where the -- enumeration literal is temporarily changed to a function -- call for overloading analysis purposes. @@ -3710,9 +3710,9 @@ package body Freeze is exit; end if; - -- If parent is a body or a spec or a block, then the current - -- node is a statement or declaration and we can insert the - -- freeze node before it. + -- If parent is a body or a spec or a block, then the current node + -- is a statement or declaration and we can insert the freeze node + -- before it. when N_Package_Specification | N_Package_Body | @@ -3746,9 +3746,9 @@ package body Freeze is -- appears in the source can never be frozen in a loop (this -- occurs only because of a loop expanded by the expander), so we -- keep on going. Otherwise we terminate the search. Same is true - -- of any entity which comes from source. (if they have a - -- predefined type, that type does not appear to come from source, - -- but the entity should not be frozen here). + -- of any entity which comes from source. (if they have predefined + -- type, that type does not appear to come from source, but the + -- entity should not be frozen here). when N_Loop_Statement => exit when not Comes_From_Source (Etype (N)) @@ -3779,14 +3779,14 @@ package body Freeze is -- the outer record type so they can eventually be placed in the -- enclosing declaration list. - -- The other case requiring this special handling is if we are in - -- a default expression, since in that case we are about to freeze - -- a static type, and the freeze scope needs to be the outer scope, - -- not the scope of the subprogram with the default parameter. + -- The other case requiring this special handling is if we are in a + -- default expression, since in that case we are about to freeze a + -- static type, and the freeze scope needs to be the outer scope, not + -- the scope of the subprogram with the default parameter. -- For default expressions in generic units, the Move_Freeze_Nodes - -- mechanism (see sem_ch12.adb) takes care of placing them at the - -- proper place, after the generic unit. + -- mechanism (see sem_ch12.adb) takes care of placing them at the proper + -- place, after the generic unit. if (In_Def_Exp and not Inside_A_Generic) or else Freeze_Outside @@ -3837,13 +3837,12 @@ package body Freeze is -- Now we have the right place to do the freezing. First, a special -- adjustment, if we are in default expression analysis mode, these - -- freeze actions must not be thrown away (normally all inserted - -- actions are thrown away in this mode. However, the freeze actions - -- are from static expressions and one of the important reasons we - -- are doing this special analysis is to get these freeze actions. - -- Therefore we turn off the In_Default_Expression mode to propagate - -- these freeze actions. This also means they get properly analyzed - -- and expanded. + -- freeze actions must not be thrown away (normally all inserted actions + -- are thrown away in this mode. However, the freeze actions are from + -- static expressions and one of the important reasons we are doing this + -- special analysis is to get these freeze actions. Therefore we turn + -- off the In_Default_Expression mode to propagate these freeze actions. + -- This also means they get properly analyzed and expanded. In_Default_Expression := False; @@ -3928,9 +3927,9 @@ package body Freeze is end if; end if; - -- Immediate return if the range is already analyzed. This means - -- that the range is already set, and does not need to be computed - -- by this routine. + -- Immediate return if the range is already analyzed. This means that + -- the range is already set, and does not need to be computed by this + -- routine. if Analyzed (Rng) then return; @@ -3952,16 +3951,16 @@ package body Freeze is if Is_Ordinary_Fixed_Point_Type (Typ) then -- For the ordinary fixed-point case, we are allowed to fudge the - -- end-points up or down by small. Generally we prefer to fudge - -- up, i.e. widen the bounds for non-model numbers so that the - -- end points are included. However there are cases in which this - -- cannot be done, and indeed cases in which we may need to narrow - -- the bounds. The following circuit makes the decision. + -- end-points up or down by small. Generally we prefer to fudge up, + -- i.e. widen the bounds for non-model numbers so that the end points + -- are included. However there are cases in which this cannot be + -- done, and indeed cases in which we may need to narrow the bounds. + -- The following circuit makes the decision. - -- Note: our terminology here is that Incl_EP means that the - -- bounds are widened by Small if necessary to include the end - -- points, and Excl_EP means that the bounds are narrowed by - -- Small to exclude the end-points if this reduces the size. + -- Note: our terminology here is that Incl_EP means that the bounds + -- are widened by Small if necessary to include the end points, and + -- Excl_EP means that the bounds are narrowed by Small to exclude the + -- end-points if this reduces the size. -- Note that in the Incl case, all we care about is including the -- end-points. In the Excl case, we want to narrow the bounds as @@ -4045,11 +4044,11 @@ package body Freeze is Hival_Excl_EP := Hival_Incl_EP; end if; - -- One further adjustment is needed. In the case of subtypes, - -- we cannot go outside the range of the base type, or we get + -- One further adjustment is needed. In the case of subtypes, we + -- cannot go outside the range of the base type, or we get -- peculiarities, and the base type range is already set. This - -- only applies to the Incl values, since clearly the Excl - -- values are already as restricted as they are allowed to be. + -- only applies to the Incl values, since clearly the Excl values + -- are already as restricted as they are allowed to be. if Typ /= Btyp then Loval_Incl_EP := UR_Max (Loval_Incl_EP, Realval (BLo)); @@ -4334,10 +4333,10 @@ package body Freeze is -- static. This happens if the type depends on non-global objects. procedure Ensure_Expression_Is_SA (N : Node_Id); - -- Called to ensure that an expression used as part of a type - -- definition is statically allocatable, which means that the type - -- of the expression is statically allocatable, and the expression - -- is either static, or a reference to a library level constant. + -- Called to ensure that an expression used as part of a type definition + -- is statically allocatable, which means that the expression type is + -- statically allocatable, and the expression is either static, or a + -- reference to a library level constant. procedure Ensure_Type_Is_SA (Typ : Entity_Id); -- Called to mark a type as static, checking that it is possible @@ -4386,8 +4385,8 @@ package body Freeze is return; end if; - -- We are also OK if the type is already marked as statically - -- allocated, which means we processed it before. + -- We are also OK if the type already marked as statically allocated, + -- which means we processed it before. if Is_Statically_Allocated (Typ) then return; @@ -4521,10 +4520,10 @@ package body Freeze is -- Reset the Pure indication on an imported subprogram unless an -- explicit Pure_Function pragma was present. We do this because - -- otherwise it is an insidious error to call a non-pure function - -- from pure unit and have calls mysteriously optimized away. What - -- happens here is that the Import can bypass the normal check to - -- ensure that pure units call only pure subprograms. + -- otherwise it is an insidious error to call a non-pure function from + -- pure unit and have calls mysteriously optimized away. What happens + -- here is that the Import can bypass the normal check to ensure that + -- pure units call only pure subprograms. if Is_Imported (E) and then Is_Pure (E) @@ -4659,8 +4658,8 @@ package body Freeze is elsif Is_Record_Type (T) and not Is_Private_Type (T) then - -- Verify that the record type has no components with - -- private types without completion. + -- Verify that the record type has no components with private types + -- without completion. declare Comp : Entity_Id; @@ -4700,10 +4699,10 @@ package body Freeze is begin Set_Default_Expressions_Processed (E); - -- A subprogram instance and its associated anonymous subprogram - -- share their signature. The default expression functions are defined - -- in the wrapper packages for the anonymous subprogram, and should - -- not be generated again for the instance. + -- A subprogram instance and its associated anonymous subprogram share + -- their signature. The default expression functions are defined in the + -- wrapper packages for the anonymous subprogram, and should not be + -- generated again for the instance. if Is_Generic_Instance (E) and then Present (Alias (E)) @@ -4743,11 +4742,10 @@ package body Freeze is then -- If there is no default function, we must still do a full - -- analyze call on the default value, to ensure that all - -- error checks are performed, e.g. those associated with - -- static evaluation. Note that this branch will always be - -- taken if the analyzer is turned off (but we still need the - -- error checks). + -- analyze call on the default value, to ensure that all error + -- checks are performed, e.g. those associated with static + -- evaluation. Note: this branch will always be taken if the + -- analyzer is turned off (but we still need the error checks). -- Note: the setting of parent here is to meet the requirement -- that we can only analyze the expression while attached to @@ -4927,13 +4925,13 @@ package body Freeze is -- Full_View or Corresponding_Record_Type to have one either. -- ??? Fundamentally, this whole handling is a kludge. What we really - -- want is to be sure that for an Itype that's part of record R and is - -- a subtype of type T, that it's frozen after the later of the freeze + -- want is to be sure that for an Itype that's part of record R and is a + -- subtype of type T, that it's frozen after the later of the freeze -- points of R and T. We have no way of doing that directly, so what we -- do is force most such Itypes to be frozen as part of freezing R via -- this procedure and only delay the ones that need to be delayed - -- (mostly the designated types of access types that are defined as - -- part of the record). + -- (mostly the designated types of access types that are defined as part + -- of the record). if Is_Private_Type (T) and then Present (Full_View (T)) @@ -5013,9 +5011,9 @@ package body Freeze is return; end if; - -- A function call (most likely to To_Address) is probably not - -- an overlay, so skip warning. Ditto if the function call was - -- inlined and transformed into an entity. + -- A function call (most likely to To_Address) is probably not an + -- overlay, so skip warning. Ditto if the function call was inlined + -- and transformed into an entity. elsif Nkind (Original_Node (Expr)) = N_Function_Call then return; diff --git a/gcc/ada/frontend.adb b/gcc/ada/frontend.adb index 49b8dd729ac..2cb90d81d3f 100644 --- a/gcc/ada/frontend.adb +++ b/gcc/ada/frontend.adb @@ -127,7 +127,6 @@ begin Opt.Style_Check := False; Style_Check := False; - Opt.Max_Line_Length := Int (Column_Number'Last); -- Capture current suppress options, which may get modified @@ -191,7 +190,6 @@ begin -- Restore style check, but if config file turned on checks, leave on! Opt.Style_Check := Save_Style_Check or Style_Check; - Opt.Max_Line_Length := Hostparm.Max_Line_Length; -- Capture any modifications to suppress options from config pragmas diff --git a/gcc/ada/g-allein.ads b/gcc/ada/g-allein.ads new file mode 100644 index 00000000000..6721fedd58b --- /dev/null +++ b/gcc/ada/g-allein.ads @@ -0,0 +1,1356 @@ +------------------------------------------------------------------------------ +-- -- +-- GNAT COMPILER COMPONENTS -- +-- -- +-- G N A T . A L T I V E C . L O W _ L E V E L _ I N T E R F A C E -- +-- -- +-- S p e c -- +-- -- +-- Copyright (C) 2004-2005, Free Software Foundation, Inc. -- +-- -- +-- GNAT is free software; you can redistribute it and/or modify it under -- +-- terms of the GNU General Public License as published by the Free Soft- -- +-- ware Foundation; either version 2, or (at your option) any later ver- -- +-- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- +-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- +-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- +-- for more details. You should have received a copy of the GNU General -- +-- Public License distributed with GNAT; see 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 other files instantiate generics from this -- +-- unit, or you link this unit with other files to produce an executable, -- +-- this unit 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 Public License. -- +-- -- +-- GNAT was originally developed by the GNAT team at New York University. -- +-- Extensive contributions were provided by Ada Core Technologies Inc. -- +-- -- +------------------------------------------------------------------------------ + +-- This unit provides entities to be used internally by the units common to +-- both bindings (Hard or Soft), and relevant to the interfacing with the +-- underlying Low Level support. + +-- The set of "services" includes: +-- +-- o Imports to the low level routines for which a direct binding is +-- mandatory (or just possible when analyzed as such). +-- +-- o Conversion routines (unchecked) between low level types, or between +-- various pointer representations. + +with GNAT.Altivec.Vector_Types; +with GNAT.Altivec.Low_Level_Vectors; + +with Ada.Unchecked_Conversion; + +package GNAT.Altivec.Low_Level_Interface is + + ---------------------------------------------------------------------------- + -- Imports for "argument must be literal" constraints in the Hard binding -- + ---------------------------------------------------------------------------- + + use GNAT.Altivec.Vector_Types; + + -- vec_ctf -- + + function vec_ctf_vui_cint_r_vf + (A : vector_unsigned_int; + B : c_int) return vector_float; + + pragma Import + (LL_Altivec, vec_ctf_vui_cint_r_vf, "__builtin_altivec_vcfux"); + + function vec_ctf_vsi_cint_r_vf + (A : vector_signed_int; + B : c_int) return vector_float; + + pragma Import + (LL_Altivec, vec_ctf_vsi_cint_r_vf, "__builtin_altivec_vcfsx"); + + -- vec_vcfsx -- + + function vec_vcfsx_vsi_cint_r_vf + (A : vector_signed_int; + B : c_int) return vector_float; + + pragma Import + (LL_Altivec, vec_vcfsx_vsi_cint_r_vf, "__builtin_altivec_vcfsx"); + + -- vec_vcfux -- + + function vec_vcfux_vui_cint_r_vf + (A : vector_unsigned_int; + B : c_int) return vector_float; + + pragma Import + (LL_Altivec, vec_vcfux_vui_cint_r_vf, "__builtin_altivec_vcfux"); + + -- vec_cts -- + + function vec_cts_vf_cint_r_vsi + (A : vector_float; + B : c_int) return vector_signed_int; + + pragma Import + (LL_Altivec, vec_cts_vf_cint_r_vsi, "__builtin_altivec_vctsxs"); + + -- vec_ctu -- + + function vec_ctu_vf_cint_r_vui + (A : vector_float; + B : c_int) return vector_unsigned_int; + + pragma Import + (LL_Altivec, vec_ctu_vf_cint_r_vui, "__builtin_altivec_vctuxs"); + + -- vec_dss -- + + procedure vec_dss_cint + (A : c_int); + + pragma Import + (LL_Altivec, vec_dss_cint, "__builtin_altivec_dss"); + + -- vec_dst -- + + procedure vec_dst_kvucp_cint_cint + (A : const_vector_unsigned_char_ptr; + B : c_int; + C : c_int); + + pragma Import + (LL_Altivec, vec_dst_kvucp_cint_cint, "__builtin_altivec_dst"); + + procedure vec_dst_kvscp_cint_cint + (A : const_vector_signed_char_ptr; + B : c_int; + C : c_int); + + pragma Import + (LL_Altivec, vec_dst_kvscp_cint_cint, "__builtin_altivec_dst"); + + procedure vec_dst_kvbcp_cint_cint + (A : const_vector_bool_char_ptr; + B : c_int; + C : c_int); + + pragma Import + (LL_Altivec, vec_dst_kvbcp_cint_cint, "__builtin_altivec_dst"); + + procedure vec_dst_kvusp_cint_cint + (A : const_vector_unsigned_short_ptr; + B : c_int; + C : c_int); + + pragma Import + (LL_Altivec, vec_dst_kvusp_cint_cint, "__builtin_altivec_dst"); + + procedure vec_dst_kvssp_cint_cint + (A : const_vector_signed_short_ptr; + B : c_int; + C : c_int); + + pragma Import + (LL_Altivec, vec_dst_kvssp_cint_cint, "__builtin_altivec_dst"); + + procedure vec_dst_kvbsp_cint_cint + (A : const_vector_bool_short_ptr; + B : c_int; + C : c_int); + + pragma Import + (LL_Altivec, vec_dst_kvbsp_cint_cint, "__builtin_altivec_dst"); + + procedure vec_dst_kvxp_cint_cint + (A : const_vector_pixel_ptr; + B : c_int; + C : c_int); + + pragma Import + (LL_Altivec, vec_dst_kvxp_cint_cint, "__builtin_altivec_dst"); + + procedure vec_dst_kvuip_cint_cint + (A : const_vector_unsigned_int_ptr; + B : c_int; + C : c_int); + + pragma Import + (LL_Altivec, vec_dst_kvuip_cint_cint, "__builtin_altivec_dst"); + + procedure vec_dst_kvsip_cint_cint + (A : const_vector_signed_int_ptr; + B : c_int; + C : c_int); + + pragma Import + (LL_Altivec, vec_dst_kvsip_cint_cint, "__builtin_altivec_dst"); + + procedure vec_dst_kvbip_cint_cint + (A : const_vector_bool_int_ptr; + B : c_int; + C : c_int); + + pragma Import + (LL_Altivec, vec_dst_kvbip_cint_cint, "__builtin_altivec_dst"); + + procedure vec_dst_kvfp_cint_cint + (A : const_vector_float_ptr; + B : c_int; + C : c_int); + + pragma Import + (LL_Altivec, vec_dst_kvfp_cint_cint, "__builtin_altivec_dst"); + + procedure vec_dst_kucp_cint_cint + (A : const_unsigned_char_ptr; + B : c_int; + C : c_int); + + pragma Import + (LL_Altivec, vec_dst_kucp_cint_cint, "__builtin_altivec_dst"); + + procedure vec_dst_kscp_cint_cint + (A : const_signed_char_ptr; + B : c_int; + C : c_int); + + pragma Import + (LL_Altivec, vec_dst_kscp_cint_cint, "__builtin_altivec_dst"); + + procedure vec_dst_kusp_cint_cint + (A : const_unsigned_short_ptr; + B : c_int; + C : c_int); + + pragma Import + (LL_Altivec, vec_dst_kusp_cint_cint, "__builtin_altivec_dst"); + + procedure vec_dst_ksp_cint_cint + (A : const_short_ptr; + B : c_int; + C : c_int); + + pragma Import + (LL_Altivec, vec_dst_ksp_cint_cint, "__builtin_altivec_dst"); + + procedure vec_dst_kuip_cint_cint + (A : const_unsigned_int_ptr; + B : c_int; + C : c_int); + + pragma Import + (LL_Altivec, vec_dst_kuip_cint_cint, "__builtin_altivec_dst"); + + procedure vec_dst_kip_cint_cint + (A : const_int_ptr; + B : c_int; + C : c_int); + + pragma Import + (LL_Altivec, vec_dst_kip_cint_cint, "__builtin_altivec_dst"); + + procedure vec_dst_kulongp_cint_cint + (A : const_unsigned_long_ptr; + B : c_int; + C : c_int); + + pragma Import + (LL_Altivec, vec_dst_kulongp_cint_cint, "__builtin_altivec_dst"); + + procedure vec_dst_klongp_cint_cint + (A : const_long_ptr; + B : c_int; + C : c_int); + + pragma Import + (LL_Altivec, vec_dst_klongp_cint_cint, "__builtin_altivec_dst"); + + procedure vec_dst_kfp_cint_cint + (A : const_float_ptr; + B : c_int; + C : c_int); + + pragma Import + (LL_Altivec, vec_dst_kfp_cint_cint, "__builtin_altivec_dst"); + + -- vec_dstst -- + + procedure vec_dstst_kvucp_cint_cint + (A : const_vector_unsigned_char_ptr; + B : c_int; + C : c_int); + + pragma Import + (LL_Altivec, vec_dstst_kvucp_cint_cint, "__builtin_altivec_dstst"); + + procedure vec_dstst_kvscp_cint_cint + (A : const_vector_signed_char_ptr; + B : c_int; + C : c_int); + + pragma Import + (LL_Altivec, vec_dstst_kvscp_cint_cint, "__builtin_altivec_dstst"); + + procedure vec_dstst_kvbcp_cint_cint + (A : const_vector_bool_char_ptr; + B : c_int; + C : c_int); + + pragma Import + (LL_Altivec, vec_dstst_kvbcp_cint_cint, "__builtin_altivec_dstst"); + + procedure vec_dstst_kvusp_cint_cint + (A : const_vector_unsigned_short_ptr; + B : c_int; + C : c_int); + + pragma Import + (LL_Altivec, vec_dstst_kvusp_cint_cint, "__builtin_altivec_dstst"); + + procedure vec_dstst_kvssp_cint_cint + (A : const_vector_signed_short_ptr; + B : c_int; + C : c_int); + + pragma Import + (LL_Altivec, vec_dstst_kvssp_cint_cint, "__builtin_altivec_dstst"); + + procedure vec_dstst_kvbsp_cint_cint + (A : const_vector_bool_short_ptr; + B : c_int; + C : c_int); + + pragma Import + (LL_Altivec, vec_dstst_kvbsp_cint_cint, "__builtin_altivec_dstst"); + + procedure vec_dstst_kvxp_cint_cint + (A : const_vector_pixel_ptr; + B : c_int; + C : c_int); + + pragma Import + (LL_Altivec, vec_dstst_kvxp_cint_cint, "__builtin_altivec_dstst"); + + procedure vec_dstst_kvuip_cint_cint + (A : const_vector_unsigned_int_ptr; + B : c_int; + C : c_int); + + pragma Import + (LL_Altivec, vec_dstst_kvuip_cint_cint, "__builtin_altivec_dstst"); + + procedure vec_dstst_kvsip_cint_cint + (A : const_vector_signed_int_ptr; + B : c_int; + C : c_int); + + pragma Import + (LL_Altivec, vec_dstst_kvsip_cint_cint, "__builtin_altivec_dstst"); + + procedure vec_dstst_kvbip_cint_cint + (A : const_vector_bool_int_ptr; + B : c_int; + C : c_int); + + pragma Import + (LL_Altivec, vec_dstst_kvbip_cint_cint, "__builtin_altivec_dstst"); + + procedure vec_dstst_kvfp_cint_cint + (A : const_vector_float_ptr; + B : c_int; + C : c_int); + + pragma Import + (LL_Altivec, vec_dstst_kvfp_cint_cint, "__builtin_altivec_dstst"); + + procedure vec_dstst_kucp_cint_cint + (A : const_unsigned_char_ptr; + B : c_int; + C : c_int); + + pragma Import + (LL_Altivec, vec_dstst_kucp_cint_cint, "__builtin_altivec_dstst"); + + procedure vec_dstst_kscp_cint_cint + (A : const_signed_char_ptr; + B : c_int; + C : c_int); + + pragma Import + (LL_Altivec, vec_dstst_kscp_cint_cint, "__builtin_altivec_dstst"); + + procedure vec_dstst_kusp_cint_cint + (A : const_unsigned_short_ptr; + B : c_int; + C : c_int); + + pragma Import + (LL_Altivec, vec_dstst_kusp_cint_cint, "__builtin_altivec_dstst"); + + procedure vec_dstst_ksp_cint_cint + (A : const_short_ptr; + B : c_int; + C : c_int); + + pragma Import + (LL_Altivec, vec_dstst_ksp_cint_cint, "__builtin_altivec_dstst"); + + procedure vec_dstst_kuip_cint_cint + (A : const_unsigned_int_ptr; + B : c_int; + C : c_int); + + pragma Import + (LL_Altivec, vec_dstst_kuip_cint_cint, "__builtin_altivec_dstst"); + + procedure vec_dstst_kip_cint_cint + (A : const_int_ptr; + B : c_int; + C : c_int); + + pragma Import + (LL_Altivec, vec_dstst_kip_cint_cint, "__builtin_altivec_dstst"); + + procedure vec_dstst_kulongp_cint_cint + (A : const_unsigned_long_ptr; + B : c_int; + C : c_int); + + pragma Import + (LL_Altivec, vec_dstst_kulongp_cint_cint, "__builtin_altivec_dstst"); + + procedure vec_dstst_klongp_cint_cint + (A : const_long_ptr; + B : c_int; + C : c_int); + + pragma Import + (LL_Altivec, vec_dstst_klongp_cint_cint, "__builtin_altivec_dstst"); + + procedure vec_dstst_kfp_cint_cint + (A : const_float_ptr; + B : c_int; + C : c_int); + + pragma Import + (LL_Altivec, vec_dstst_kfp_cint_cint, "__builtin_altivec_dstst"); + + -- vec_dststt -- + + procedure vec_dststt_kvucp_cint_cint + (A : const_vector_unsigned_char_ptr; + B : c_int; + C : c_int); + + pragma Import + (LL_Altivec, vec_dststt_kvucp_cint_cint, "__builtin_altivec_dststt"); + + procedure vec_dststt_kvscp_cint_cint + (A : const_vector_signed_char_ptr; + B : c_int; + C : c_int); + + pragma Import + (LL_Altivec, vec_dststt_kvscp_cint_cint, "__builtin_altivec_dststt"); + + procedure vec_dststt_kvbcp_cint_cint + (A : const_vector_bool_char_ptr; + B : c_int; + C : c_int); + + pragma Import + (LL_Altivec, vec_dststt_kvbcp_cint_cint, "__builtin_altivec_dststt"); + + procedure vec_dststt_kvusp_cint_cint + (A : const_vector_unsigned_short_ptr; + B : c_int; + C : c_int); + + pragma Import + (LL_Altivec, vec_dststt_kvusp_cint_cint, "__builtin_altivec_dststt"); + + procedure vec_dststt_kvssp_cint_cint + (A : const_vector_signed_short_ptr; + B : c_int; + C : c_int); + + pragma Import + (LL_Altivec, vec_dststt_kvssp_cint_cint, "__builtin_altivec_dststt"); + + procedure vec_dststt_kvbsp_cint_cint + (A : const_vector_bool_short_ptr; + B : c_int; + C : c_int); + + pragma Import + (LL_Altivec, vec_dststt_kvbsp_cint_cint, "__builtin_altivec_dststt"); + + procedure vec_dststt_kvxp_cint_cint + (A : const_vector_pixel_ptr; + B : c_int; + C : c_int); + + pragma Import + (LL_Altivec, vec_dststt_kvxp_cint_cint, "__builtin_altivec_dststt"); + + procedure vec_dststt_kvuip_cint_cint + (A : const_vector_unsigned_int_ptr; + B : c_int; + C : c_int); + + pragma Import + (LL_Altivec, vec_dststt_kvuip_cint_cint, "__builtin_altivec_dststt"); + + procedure vec_dststt_kvsip_cint_cint + (A : const_vector_signed_int_ptr; + B : c_int; + C : c_int); + + pragma Import + (LL_Altivec, vec_dststt_kvsip_cint_cint, "__builtin_altivec_dststt"); + + procedure vec_dststt_kvbip_cint_cint + (A : const_vector_bool_int_ptr; + B : c_int; + C : c_int); + + pragma Import + (LL_Altivec, vec_dststt_kvbip_cint_cint, "__builtin_altivec_dststt"); + + procedure vec_dststt_kvfp_cint_cint + (A : const_vector_float_ptr; + B : c_int; + C : c_int); + + pragma Import + (LL_Altivec, vec_dststt_kvfp_cint_cint, "__builtin_altivec_dststt"); + + procedure vec_dststt_kucp_cint_cint + (A : const_unsigned_char_ptr; + B : c_int; + C : c_int); + + pragma Import + (LL_Altivec, vec_dststt_kucp_cint_cint, "__builtin_altivec_dststt"); + + procedure vec_dststt_kscp_cint_cint + (A : const_signed_char_ptr; + B : c_int; + C : c_int); + + pragma Import + (LL_Altivec, vec_dststt_kscp_cint_cint, "__builtin_altivec_dststt"); + + procedure vec_dststt_kusp_cint_cint + (A : const_unsigned_short_ptr; + B : c_int; + C : c_int); + + pragma Import + (LL_Altivec, vec_dststt_kusp_cint_cint, "__builtin_altivec_dststt"); + + procedure vec_dststt_ksp_cint_cint + (A : const_short_ptr; + B : c_int; + C : c_int); + + pragma Import + (LL_Altivec, vec_dststt_ksp_cint_cint, "__builtin_altivec_dststt"); + + procedure vec_dststt_kuip_cint_cint + (A : const_unsigned_int_ptr; + B : c_int; + C : c_int); + + pragma Import + (LL_Altivec, vec_dststt_kuip_cint_cint, "__builtin_altivec_dststt"); + + procedure vec_dststt_kip_cint_cint + (A : const_int_ptr; + B : c_int; + C : c_int); + + pragma Import + (LL_Altivec, vec_dststt_kip_cint_cint, "__builtin_altivec_dststt"); + + procedure vec_dststt_kulongp_cint_cint + (A : const_unsigned_long_ptr; + B : c_int; + C : c_int); + + pragma Import + (LL_Altivec, vec_dststt_kulongp_cint_cint, "__builtin_altivec_dststt"); + + procedure vec_dststt_klongp_cint_cint + (A : const_long_ptr; + B : c_int; + C : c_int); + + pragma Import + (LL_Altivec, vec_dststt_klongp_cint_cint, "__builtin_altivec_dststt"); + + procedure vec_dststt_kfp_cint_cint + (A : const_float_ptr; + B : c_int; + C : c_int); + + pragma Import + (LL_Altivec, vec_dststt_kfp_cint_cint, "__builtin_altivec_dststt"); + + -- vec_dstt -- + + procedure vec_dstt_kvucp_cint_cint + (A : const_vector_unsigned_char_ptr; + B : c_int; + C : c_int); + + pragma Import + (LL_Altivec, vec_dstt_kvucp_cint_cint, "__builtin_altivec_dstt"); + + procedure vec_dstt_kvscp_cint_cint + (A : const_vector_signed_char_ptr; + B : c_int; + C : c_int); + + pragma Import + (LL_Altivec, vec_dstt_kvscp_cint_cint, "__builtin_altivec_dstt"); + + procedure vec_dstt_kvbcp_cint_cint + (A : const_vector_bool_char_ptr; + B : c_int; + C : c_int); + + pragma Import + (LL_Altivec, vec_dstt_kvbcp_cint_cint, "__builtin_altivec_dstt"); + + procedure vec_dstt_kvusp_cint_cint + (A : const_vector_unsigned_short_ptr; + B : c_int; + C : c_int); + + pragma Import + (LL_Altivec, vec_dstt_kvusp_cint_cint, "__builtin_altivec_dstt"); + + procedure vec_dstt_kvssp_cint_cint + (A : const_vector_signed_short_ptr; + B : c_int; + C : c_int); + + pragma Import + (LL_Altivec, vec_dstt_kvssp_cint_cint, "__builtin_altivec_dstt"); + + procedure vec_dstt_kvbsp_cint_cint + (A : const_vector_bool_short_ptr; + B : c_int; + C : c_int); + + pragma Import + (LL_Altivec, vec_dstt_kvbsp_cint_cint, "__builtin_altivec_dstt"); + + procedure vec_dstt_kvxp_cint_cint + (A : const_vector_pixel_ptr; + B : c_int; + C : c_int); + + pragma Import + (LL_Altivec, vec_dstt_kvxp_cint_cint, "__builtin_altivec_dstt"); + + procedure vec_dstt_kvuip_cint_cint + (A : const_vector_unsigned_int_ptr; + B : c_int; + C : c_int); + + pragma Import + (LL_Altivec, vec_dstt_kvuip_cint_cint, "__builtin_altivec_dstt"); + + procedure vec_dstt_kvsip_cint_cint + (A : const_vector_signed_int_ptr; + B : c_int; + C : c_int); + + pragma Import + (LL_Altivec, vec_dstt_kvsip_cint_cint, "__builtin_altivec_dstt"); + + procedure vec_dstt_kvbip_cint_cint + (A : const_vector_bool_int_ptr; + B : c_int; + C : c_int); + + pragma Import + (LL_Altivec, vec_dstt_kvbip_cint_cint, "__builtin_altivec_dstt"); + + procedure vec_dstt_kvfp_cint_cint + (A : const_vector_float_ptr; + B : c_int; + C : c_int); + + pragma Import + (LL_Altivec, vec_dstt_kvfp_cint_cint, "__builtin_altivec_dstt"); + + procedure vec_dstt_kucp_cint_cint + (A : const_unsigned_char_ptr; + B : c_int; + C : c_int); + + pragma Import + (LL_Altivec, vec_dstt_kucp_cint_cint, "__builtin_altivec_dstt"); + + procedure vec_dstt_kscp_cint_cint + (A : const_signed_char_ptr; + B : c_int; + C : c_int); + + pragma Import + (LL_Altivec, vec_dstt_kscp_cint_cint, "__builtin_altivec_dstt"); + + procedure vec_dstt_kusp_cint_cint + (A : const_unsigned_short_ptr; + B : c_int; + C : c_int); + + pragma Import + (LL_Altivec, vec_dstt_kusp_cint_cint, "__builtin_altivec_dstt"); + + procedure vec_dstt_ksp_cint_cint + (A : const_short_ptr; + B : c_int; + C : c_int); + + pragma Import + (LL_Altivec, vec_dstt_ksp_cint_cint, "__builtin_altivec_dstt"); + + procedure vec_dstt_kuip_cint_cint + (A : const_unsigned_int_ptr; + B : c_int; + C : c_int); + + pragma Import + (LL_Altivec, vec_dstt_kuip_cint_cint, "__builtin_altivec_dstt"); + + procedure vec_dstt_kip_cint_cint + (A : const_int_ptr; + B : c_int; + C : c_int); + + pragma Import + (LL_Altivec, vec_dstt_kip_cint_cint, "__builtin_altivec_dstt"); + + procedure vec_dstt_kulongp_cint_cint + (A : const_unsigned_long_ptr; + B : c_int; + C : c_int); + + pragma Import + (LL_Altivec, vec_dstt_kulongp_cint_cint, "__builtin_altivec_dstt"); + + procedure vec_dstt_klongp_cint_cint + (A : const_long_ptr; + B : c_int; + C : c_int); + + pragma Import + (LL_Altivec, vec_dstt_klongp_cint_cint, "__builtin_altivec_dstt"); + + procedure vec_dstt_kfp_cint_cint + (A : const_float_ptr; + B : c_int; + C : c_int); + + pragma Import + (LL_Altivec, vec_dstt_kfp_cint_cint, "__builtin_altivec_dstt"); + + -- vec_sld -- + + -- ??? The base GCC implementation maps everything to vsldoi_4si, while + -- it defines builtin variants for all the modes. Adjust here, to avoid + -- the infamous argument mode mismatch. + + function vec_sld_vf_vf_cint_r_vf + (A : vector_float; + B : vector_float; + C : c_int) return vector_float; + + pragma Import + (LL_Altivec, vec_sld_vf_vf_cint_r_vf, "__builtin_altivec_vsldoi_4sf"); + + function vec_sld_vsi_vsi_cint_r_vsi + (A : vector_signed_int; + B : vector_signed_int; + C : c_int) return vector_signed_int; + + pragma Import + (LL_Altivec, vec_sld_vsi_vsi_cint_r_vsi, "__builtin_altivec_vsldoi_4si"); + + function vec_sld_vui_vui_cint_r_vui + (A : vector_unsigned_int; + B : vector_unsigned_int; + C : c_int) return vector_unsigned_int; + + pragma Import + (LL_Altivec, vec_sld_vui_vui_cint_r_vui, "__builtin_altivec_vsldoi_4si"); + + function vec_sld_vbi_vbi_cint_r_vbi + (A : vector_bool_int; + B : vector_bool_int; + C : c_int) return vector_bool_int; + + pragma Import + (LL_Altivec, vec_sld_vbi_vbi_cint_r_vbi, "__builtin_altivec_vsldoi_4si"); + + function vec_sld_vss_vss_cint_r_vss + (A : vector_signed_short; + B : vector_signed_short; + C : c_int) return vector_signed_short; + + pragma Import + (LL_Altivec, vec_sld_vss_vss_cint_r_vss, "__builtin_altivec_vsldoi_8hi"); + + function vec_sld_vus_vus_cint_r_vus + (A : vector_unsigned_short; + B : vector_unsigned_short; + C : c_int) return vector_unsigned_short; + + pragma Import + (LL_Altivec, vec_sld_vus_vus_cint_r_vus, "__builtin_altivec_vsldoi_8hi"); + + function vec_sld_vbs_vbs_cint_r_vbs + (A : vector_bool_short; + B : vector_bool_short; + C : c_int) return vector_bool_short; + + pragma Import + (LL_Altivec, vec_sld_vbs_vbs_cint_r_vbs, "__builtin_altivec_vsldoi_8hi"); + + function vec_sld_vx_vx_cint_r_vx + (A : vector_pixel; + B : vector_pixel; + C : c_int) return vector_pixel; + + pragma Import + (LL_Altivec, vec_sld_vx_vx_cint_r_vx, "__builtin_altivec_vsldoi_4si"); + + function vec_sld_vsc_vsc_cint_r_vsc + (A : vector_signed_char; + B : vector_signed_char; + C : c_int) return vector_signed_char; + + pragma Import + (LL_Altivec, vec_sld_vsc_vsc_cint_r_vsc, "__builtin_altivec_vsldoi_16qi"); + + function vec_sld_vuc_vuc_cint_r_vuc + (A : vector_unsigned_char; + B : vector_unsigned_char; + C : c_int) return vector_unsigned_char; + + pragma Import + (LL_Altivec, vec_sld_vuc_vuc_cint_r_vuc, "__builtin_altivec_vsldoi_16qi"); + + function vec_sld_vbc_vbc_cint_r_vbc + (A : vector_bool_char; + B : vector_bool_char; + C : c_int) return vector_bool_char; + + pragma Import + (LL_Altivec, vec_sld_vbc_vbc_cint_r_vbc, "__builtin_altivec_vsldoi_16qi"); + + -- vec_splat -- + + function vec_splat_vsc_cint_r_vsc + (A : vector_signed_char; + B : c_int) return vector_signed_char; + + pragma Import + (LL_Altivec, vec_splat_vsc_cint_r_vsc, "__builtin_altivec_vspltb"); + + function vec_splat_vuc_cint_r_vuc + (A : vector_unsigned_char; + B : c_int) return vector_unsigned_char; + + pragma Import + (LL_Altivec, vec_splat_vuc_cint_r_vuc, "__builtin_altivec_vspltb"); + + function vec_splat_vbc_cint_r_vbc + (A : vector_bool_char; + B : c_int) return vector_bool_char; + + pragma Import + (LL_Altivec, vec_splat_vbc_cint_r_vbc, "__builtin_altivec_vspltb"); + + function vec_splat_vss_cint_r_vss + (A : vector_signed_short; + B : c_int) return vector_signed_short; + + pragma Import + (LL_Altivec, vec_splat_vss_cint_r_vss, "__builtin_altivec_vsplth"); + + function vec_splat_vus_cint_r_vus + (A : vector_unsigned_short; + B : c_int) return vector_unsigned_short; + + pragma Import + (LL_Altivec, vec_splat_vus_cint_r_vus, "__builtin_altivec_vsplth"); + + function vec_splat_vbs_cint_r_vbs + (A : vector_bool_short; + B : c_int) return vector_bool_short; + + pragma Import + (LL_Altivec, vec_splat_vbs_cint_r_vbs, "__builtin_altivec_vsplth"); + + function vec_splat_vx_cint_r_vx + (A : vector_pixel; + B : c_int) return vector_pixel; + + pragma Import + (LL_Altivec, vec_splat_vx_cint_r_vx, "__builtin_altivec_vsplth"); + + function vec_splat_vf_cint_r_vf + (A : vector_float; + B : c_int) return vector_float; + + pragma Import + (LL_Altivec, vec_splat_vf_cint_r_vf, "__builtin_altivec_vspltw"); + + function vec_splat_vsi_cint_r_vsi + (A : vector_signed_int; + B : c_int) return vector_signed_int; + + pragma Import + (LL_Altivec, vec_splat_vsi_cint_r_vsi, "__builtin_altivec_vspltw"); + + function vec_splat_vui_cint_r_vui + (A : vector_unsigned_int; + B : c_int) return vector_unsigned_int; + + pragma Import + (LL_Altivec, vec_splat_vui_cint_r_vui, "__builtin_altivec_vspltw"); + + function vec_splat_vbi_cint_r_vbi + (A : vector_bool_int; + B : c_int) return vector_bool_int; + + pragma Import + (LL_Altivec, vec_splat_vbi_cint_r_vbi, "__builtin_altivec_vspltw"); + + -- vec_vspltw -- + + function vec_vspltw_vf_cint_r_vf + (A : vector_float; + B : c_int) return vector_float; + + pragma Import + (LL_Altivec, vec_vspltw_vf_cint_r_vf, "__builtin_altivec_vspltw"); + + function vec_vspltw_vsi_cint_r_vsi + (A : vector_signed_int; + B : c_int) return vector_signed_int; + + pragma Import + (LL_Altivec, vec_vspltw_vsi_cint_r_vsi, "__builtin_altivec_vspltw"); + + function vec_vspltw_vui_cint_r_vui + (A : vector_unsigned_int; + B : c_int) return vector_unsigned_int; + + pragma Import + (LL_Altivec, vec_vspltw_vui_cint_r_vui, "__builtin_altivec_vspltw"); + + function vec_vspltw_vbi_cint_r_vbi + (A : vector_bool_int; + B : c_int) return vector_bool_int; + + pragma Import + (LL_Altivec, vec_vspltw_vbi_cint_r_vbi, "__builtin_altivec_vspltw"); + + -- vec_vsplth -- + + function vec_vsplth_vbs_cint_r_vbs + (A : vector_bool_short; + B : c_int) return vector_bool_short; + + pragma Import + (LL_Altivec, vec_vsplth_vbs_cint_r_vbs, "__builtin_altivec_vsplth"); + + function vec_vsplth_vss_cint_r_vss + (A : vector_signed_short; + B : c_int) return vector_signed_short; + + pragma Import + (LL_Altivec, vec_vsplth_vss_cint_r_vss, "__builtin_altivec_vsplth"); + + function vec_vsplth_vus_cint_r_vus + (A : vector_unsigned_short; + B : c_int) return vector_unsigned_short; + + pragma Import + (LL_Altivec, vec_vsplth_vus_cint_r_vus, "__builtin_altivec_vsplth"); + + function vec_vsplth_vx_cint_r_vx + (A : vector_pixel; + B : c_int) return vector_pixel; + + pragma Import + (LL_Altivec, vec_vsplth_vx_cint_r_vx, "__builtin_altivec_vsplth"); + + -- vec_vspltb -- + + function vec_vspltb_vsc_cint_r_vsc + (A : vector_signed_char; + B : c_int) return vector_signed_char; + + pragma Import + (LL_Altivec, vec_vspltb_vsc_cint_r_vsc, "__builtin_altivec_vspltb"); + + function vec_vspltb_vuc_cint_r_vuc + (A : vector_unsigned_char; + B : c_int) return vector_unsigned_char; + + pragma Import + (LL_Altivec, vec_vspltb_vuc_cint_r_vuc, "__builtin_altivec_vspltb"); + + function vec_vspltb_vbc_cint_r_vbc + (A : vector_bool_char; + B : c_int) return vector_bool_char; + + pragma Import + (LL_Altivec, vec_vspltb_vbc_cint_r_vbc, "__builtin_altivec_vspltb"); + + -- vec_splat_s8 -- + + function vec_splat_s8_cint_r_vsc + (A : c_int) return vector_signed_char; + + pragma Import + (LL_Altivec, vec_splat_s8_cint_r_vsc, "__builtin_altivec_vspltisb"); + + -- vec_splat_s16 -- + + function vec_splat_s16_cint_r_vss + (A : c_int) return vector_signed_short; + + pragma Import + (LL_Altivec, vec_splat_s16_cint_r_vss, "__builtin_altivec_vspltish"); + + -- vec_splat_s32 -- + + function vec_splat_s32_cint_r_vsi + (A : c_int) return vector_signed_int; + + pragma Import + (LL_Altivec, vec_splat_s32_cint_r_vsi, "__builtin_altivec_vspltisw"); + + -- vec_splat_u8 -- + + function vec_splat_u8_cint_r_vuc + (A : c_int) return vector_unsigned_char; + + pragma Import + (LL_Altivec, vec_splat_u8_cint_r_vuc, "__builtin_altivec_vspltisb"); + + -- vec_splat_u16 -- + + function vec_splat_u16_cint_r_vus + (A : c_int) return vector_unsigned_short; + + pragma Import + (LL_Altivec, vec_splat_u16_cint_r_vus, "__builtin_altivec_vspltish"); + + -- vec_splat_u32 -- + + function vec_splat_u32_cint_r_vui + (A : c_int) return vector_unsigned_int; + + pragma Import + (LL_Altivec, vec_splat_u32_cint_r_vui, "__builtin_altivec_vspltisw"); + + ------------------------------------------------------------ + -- Imports for low-level signature consistent subprograms -- + ------------------------------------------------------------ + + -- vec_dssall -- + + procedure vec_dssall; + + pragma Import + (LL_Altivec, vec_dssall, "__builtin_altivec_dssall"); + + ----------------------------------------- + -- Conversions between low level types -- + ----------------------------------------- + + use GNAT.Altivec.Low_Level_Vectors; + + -- Something like... + -- + -- TYPES="LL_VBC LL_VUC LL_VSC LL_VBS LL_VUS LL_VSS \ + -- LL_VBI LL_VUI LL_VSI LL_VF LL_VP" + -- for TT in `echo $TYPES`; do + -- for ST in `echo $TYPES`; do + -- echo "function To_$TT is new Ada.Unchecked_Conversion ($ST, $TT);" + -- done + -- echo "" + -- done + + function To_LL_VBC is new Ada.Unchecked_Conversion (LL_VBC, LL_VBC); + function To_LL_VBC is new Ada.Unchecked_Conversion (LL_VUC, LL_VBC); + function To_LL_VBC is new Ada.Unchecked_Conversion (LL_VSC, LL_VBC); + function To_LL_VBC is new Ada.Unchecked_Conversion (LL_VBS, LL_VBC); + function To_LL_VBC is new Ada.Unchecked_Conversion (LL_VUS, LL_VBC); + function To_LL_VBC is new Ada.Unchecked_Conversion (LL_VSS, LL_VBC); + function To_LL_VBC is new Ada.Unchecked_Conversion (LL_VBI, LL_VBC); + function To_LL_VBC is new Ada.Unchecked_Conversion (LL_VUI, LL_VBC); + function To_LL_VBC is new Ada.Unchecked_Conversion (LL_VSI, LL_VBC); + function To_LL_VBC is new Ada.Unchecked_Conversion (LL_VF, LL_VBC); + function To_LL_VBC is new Ada.Unchecked_Conversion (LL_VP, LL_VBC); + + function To_LL_VUC is new Ada.Unchecked_Conversion (LL_VBC, LL_VUC); + function To_LL_VUC is new Ada.Unchecked_Conversion (LL_VUC, LL_VUC); + function To_LL_VUC is new Ada.Unchecked_Conversion (LL_VSC, LL_VUC); + function To_LL_VUC is new Ada.Unchecked_Conversion (LL_VBS, LL_VUC); + function To_LL_VUC is new Ada.Unchecked_Conversion (LL_VUS, LL_VUC); + function To_LL_VUC is new Ada.Unchecked_Conversion (LL_VSS, LL_VUC); + function To_LL_VUC is new Ada.Unchecked_Conversion (LL_VBI, LL_VUC); + function To_LL_VUC is new Ada.Unchecked_Conversion (LL_VUI, LL_VUC); + function To_LL_VUC is new Ada.Unchecked_Conversion (LL_VSI, LL_VUC); + function To_LL_VUC is new Ada.Unchecked_Conversion (LL_VF, LL_VUC); + function To_LL_VUC is new Ada.Unchecked_Conversion (LL_VP, LL_VUC); + + function To_LL_VSC is new Ada.Unchecked_Conversion (LL_VBC, LL_VSC); + function To_LL_VSC is new Ada.Unchecked_Conversion (LL_VUC, LL_VSC); + function To_LL_VSC is new Ada.Unchecked_Conversion (LL_VSC, LL_VSC); + function To_LL_VSC is new Ada.Unchecked_Conversion (LL_VBS, LL_VSC); + function To_LL_VSC is new Ada.Unchecked_Conversion (LL_VUS, LL_VSC); + function To_LL_VSC is new Ada.Unchecked_Conversion (LL_VSS, LL_VSC); + function To_LL_VSC is new Ada.Unchecked_Conversion (LL_VBI, LL_VSC); + function To_LL_VSC is new Ada.Unchecked_Conversion (LL_VUI, LL_VSC); + function To_LL_VSC is new Ada.Unchecked_Conversion (LL_VSI, LL_VSC); + function To_LL_VSC is new Ada.Unchecked_Conversion (LL_VF, LL_VSC); + function To_LL_VSC is new Ada.Unchecked_Conversion (LL_VP, LL_VSC); + + function To_LL_VBS is new Ada.Unchecked_Conversion (LL_VBC, LL_VBS); + function To_LL_VBS is new Ada.Unchecked_Conversion (LL_VUC, LL_VBS); + function To_LL_VBS is new Ada.Unchecked_Conversion (LL_VSC, LL_VBS); + function To_LL_VBS is new Ada.Unchecked_Conversion (LL_VBS, LL_VBS); + function To_LL_VBS is new Ada.Unchecked_Conversion (LL_VUS, LL_VBS); + function To_LL_VBS is new Ada.Unchecked_Conversion (LL_VSS, LL_VBS); + function To_LL_VBS is new Ada.Unchecked_Conversion (LL_VBI, LL_VBS); + function To_LL_VBS is new Ada.Unchecked_Conversion (LL_VUI, LL_VBS); + function To_LL_VBS is new Ada.Unchecked_Conversion (LL_VSI, LL_VBS); + function To_LL_VBS is new Ada.Unchecked_Conversion (LL_VF, LL_VBS); + function To_LL_VBS is new Ada.Unchecked_Conversion (LL_VP, LL_VBS); + + function To_LL_VUS is new Ada.Unchecked_Conversion (LL_VBC, LL_VUS); + function To_LL_VUS is new Ada.Unchecked_Conversion (LL_VUC, LL_VUS); + function To_LL_VUS is new Ada.Unchecked_Conversion (LL_VSC, LL_VUS); + function To_LL_VUS is new Ada.Unchecked_Conversion (LL_VBS, LL_VUS); + function To_LL_VUS is new Ada.Unchecked_Conversion (LL_VUS, LL_VUS); + function To_LL_VUS is new Ada.Unchecked_Conversion (LL_VSS, LL_VUS); + function To_LL_VUS is new Ada.Unchecked_Conversion (LL_VBI, LL_VUS); + function To_LL_VUS is new Ada.Unchecked_Conversion (LL_VUI, LL_VUS); + function To_LL_VUS is new Ada.Unchecked_Conversion (LL_VSI, LL_VUS); + function To_LL_VUS is new Ada.Unchecked_Conversion (LL_VF, LL_VUS); + function To_LL_VUS is new Ada.Unchecked_Conversion (LL_VP, LL_VUS); + + function To_LL_VSS is new Ada.Unchecked_Conversion (LL_VBC, LL_VSS); + function To_LL_VSS is new Ada.Unchecked_Conversion (LL_VUC, LL_VSS); + function To_LL_VSS is new Ada.Unchecked_Conversion (LL_VSC, LL_VSS); + function To_LL_VSS is new Ada.Unchecked_Conversion (LL_VBS, LL_VSS); + function To_LL_VSS is new Ada.Unchecked_Conversion (LL_VUS, LL_VSS); + function To_LL_VSS is new Ada.Unchecked_Conversion (LL_VSS, LL_VSS); + function To_LL_VSS is new Ada.Unchecked_Conversion (LL_VBI, LL_VSS); + function To_LL_VSS is new Ada.Unchecked_Conversion (LL_VUI, LL_VSS); + function To_LL_VSS is new Ada.Unchecked_Conversion (LL_VSI, LL_VSS); + function To_LL_VSS is new Ada.Unchecked_Conversion (LL_VF, LL_VSS); + function To_LL_VSS is new Ada.Unchecked_Conversion (LL_VP, LL_VSS); + + function To_LL_VBI is new Ada.Unchecked_Conversion (LL_VBC, LL_VBI); + function To_LL_VBI is new Ada.Unchecked_Conversion (LL_VUC, LL_VBI); + function To_LL_VBI is new Ada.Unchecked_Conversion (LL_VSC, LL_VBI); + function To_LL_VBI is new Ada.Unchecked_Conversion (LL_VBS, LL_VBI); + function To_LL_VBI is new Ada.Unchecked_Conversion (LL_VUS, LL_VBI); + function To_LL_VBI is new Ada.Unchecked_Conversion (LL_VSS, LL_VBI); + function To_LL_VBI is new Ada.Unchecked_Conversion (LL_VBI, LL_VBI); + function To_LL_VBI is new Ada.Unchecked_Conversion (LL_VUI, LL_VBI); + function To_LL_VBI is new Ada.Unchecked_Conversion (LL_VSI, LL_VBI); + function To_LL_VBI is new Ada.Unchecked_Conversion (LL_VF, LL_VBI); + function To_LL_VBI is new Ada.Unchecked_Conversion (LL_VP, LL_VBI); + + function To_LL_VUI is new Ada.Unchecked_Conversion (LL_VBC, LL_VUI); + function To_LL_VUI is new Ada.Unchecked_Conversion (LL_VUC, LL_VUI); + function To_LL_VUI is new Ada.Unchecked_Conversion (LL_VSC, LL_VUI); + function To_LL_VUI is new Ada.Unchecked_Conversion (LL_VBS, LL_VUI); + function To_LL_VUI is new Ada.Unchecked_Conversion (LL_VUS, LL_VUI); + function To_LL_VUI is new Ada.Unchecked_Conversion (LL_VSS, LL_VUI); + function To_LL_VUI is new Ada.Unchecked_Conversion (LL_VBI, LL_VUI); + function To_LL_VUI is new Ada.Unchecked_Conversion (LL_VUI, LL_VUI); + function To_LL_VUI is new Ada.Unchecked_Conversion (LL_VSI, LL_VUI); + function To_LL_VUI is new Ada.Unchecked_Conversion (LL_VF, LL_VUI); + function To_LL_VUI is new Ada.Unchecked_Conversion (LL_VP, LL_VUI); + + function To_LL_VSI is new Ada.Unchecked_Conversion (LL_VBC, LL_VSI); + function To_LL_VSI is new Ada.Unchecked_Conversion (LL_VUC, LL_VSI); + function To_LL_VSI is new Ada.Unchecked_Conversion (LL_VSC, LL_VSI); + function To_LL_VSI is new Ada.Unchecked_Conversion (LL_VBS, LL_VSI); + function To_LL_VSI is new Ada.Unchecked_Conversion (LL_VUS, LL_VSI); + function To_LL_VSI is new Ada.Unchecked_Conversion (LL_VSS, LL_VSI); + function To_LL_VSI is new Ada.Unchecked_Conversion (LL_VBI, LL_VSI); + function To_LL_VSI is new Ada.Unchecked_Conversion (LL_VUI, LL_VSI); + function To_LL_VSI is new Ada.Unchecked_Conversion (LL_VSI, LL_VSI); + function To_LL_VSI is new Ada.Unchecked_Conversion (LL_VF, LL_VSI); + function To_LL_VSI is new Ada.Unchecked_Conversion (LL_VP, LL_VSI); + + function To_LL_VF is new Ada.Unchecked_Conversion (LL_VBC, LL_VF); + function To_LL_VF is new Ada.Unchecked_Conversion (LL_VUC, LL_VF); + function To_LL_VF is new Ada.Unchecked_Conversion (LL_VSC, LL_VF); + function To_LL_VF is new Ada.Unchecked_Conversion (LL_VBS, LL_VF); + function To_LL_VF is new Ada.Unchecked_Conversion (LL_VUS, LL_VF); + function To_LL_VF is new Ada.Unchecked_Conversion (LL_VSS, LL_VF); + function To_LL_VF is new Ada.Unchecked_Conversion (LL_VBI, LL_VF); + function To_LL_VF is new Ada.Unchecked_Conversion (LL_VUI, LL_VF); + function To_LL_VF is new Ada.Unchecked_Conversion (LL_VSI, LL_VF); + function To_LL_VF is new Ada.Unchecked_Conversion (LL_VF, LL_VF); + function To_LL_VF is new Ada.Unchecked_Conversion (LL_VP, LL_VF); + + function To_LL_VP is new Ada.Unchecked_Conversion (LL_VBC, LL_VP); + function To_LL_VP is new Ada.Unchecked_Conversion (LL_VUC, LL_VP); + function To_LL_VP is new Ada.Unchecked_Conversion (LL_VSC, LL_VP); + function To_LL_VP is new Ada.Unchecked_Conversion (LL_VBS, LL_VP); + function To_LL_VP is new Ada.Unchecked_Conversion (LL_VUS, LL_VP); + function To_LL_VP is new Ada.Unchecked_Conversion (LL_VSS, LL_VP); + function To_LL_VP is new Ada.Unchecked_Conversion (LL_VBI, LL_VP); + function To_LL_VP is new Ada.Unchecked_Conversion (LL_VUI, LL_VP); + function To_LL_VP is new Ada.Unchecked_Conversion (LL_VSI, LL_VP); + function To_LL_VP is new Ada.Unchecked_Conversion (LL_VF, LL_VP); + function To_LL_VP is new Ada.Unchecked_Conversion (LL_VP, LL_VP); + + ---------------------------------------------- + -- Conversions between pointer/access types -- + ---------------------------------------------- + + function To_PTR is + new Ada.Unchecked_Conversion (vector_unsigned_char_ptr, c_ptr); + function To_PTR is + new Ada.Unchecked_Conversion (vector_signed_char_ptr, c_ptr); + function To_PTR is + new Ada.Unchecked_Conversion (vector_bool_char_ptr, c_ptr); + function To_PTR is + new Ada.Unchecked_Conversion (vector_unsigned_short_ptr, c_ptr); + function To_PTR is + new Ada.Unchecked_Conversion (vector_signed_short_ptr, c_ptr); + function To_PTR is + new Ada.Unchecked_Conversion (vector_bool_short_ptr, c_ptr); + function To_PTR is + new Ada.Unchecked_Conversion (vector_unsigned_int_ptr, c_ptr); + function To_PTR is + new Ada.Unchecked_Conversion (vector_signed_int_ptr, c_ptr); + function To_PTR is + new Ada.Unchecked_Conversion (vector_bool_int_ptr, c_ptr); + function To_PTR is + new Ada.Unchecked_Conversion (vector_float_ptr, c_ptr); + function To_PTR is + new Ada.Unchecked_Conversion (vector_pixel_ptr, c_ptr); + function To_PTR is + new Ada.Unchecked_Conversion (const_vector_bool_char_ptr, c_ptr); + function To_PTR is + new Ada.Unchecked_Conversion (const_vector_signed_char_ptr, c_ptr); + function To_PTR is + new Ada.Unchecked_Conversion (const_vector_unsigned_char_ptr, c_ptr); + function To_PTR is + new Ada.Unchecked_Conversion (const_vector_bool_short_ptr, c_ptr); + function To_PTR is + new Ada.Unchecked_Conversion (const_vector_signed_short_ptr, c_ptr); + function To_PTR is + new Ada.Unchecked_Conversion (const_vector_unsigned_short_ptr, c_ptr); + function To_PTR is + new Ada.Unchecked_Conversion (const_vector_bool_int_ptr, c_ptr); + function To_PTR is + new Ada.Unchecked_Conversion (const_vector_signed_int_ptr, c_ptr); + function To_PTR is + new Ada.Unchecked_Conversion (const_vector_unsigned_int_ptr, c_ptr); + function To_PTR is + new Ada.Unchecked_Conversion (const_vector_float_ptr, c_ptr); + function To_PTR is + new Ada.Unchecked_Conversion (const_vector_pixel_ptr, c_ptr); + function To_PTR is + new Ada.Unchecked_Conversion (c_ptr, c_ptr); + function To_PTR is + new Ada.Unchecked_Conversion (signed_char_ptr, c_ptr); + function To_PTR is + new Ada.Unchecked_Conversion (unsigned_char_ptr, c_ptr); + function To_PTR is + new Ada.Unchecked_Conversion (short_ptr, c_ptr); + function To_PTR is + new Ada.Unchecked_Conversion (signed_short_ptr, c_ptr); + function To_PTR is + new Ada.Unchecked_Conversion (unsigned_short_ptr, c_ptr); + function To_PTR is + new Ada.Unchecked_Conversion (int_ptr, c_ptr); + function To_PTR is + new Ada.Unchecked_Conversion (signed_int_ptr, c_ptr); + function To_PTR is + new Ada.Unchecked_Conversion (unsigned_int_ptr, c_ptr); + function To_PTR is + new Ada.Unchecked_Conversion (long_ptr, c_ptr); + function To_PTR is + new Ada.Unchecked_Conversion (signed_long_ptr, c_ptr); + function To_PTR is + new Ada.Unchecked_Conversion (unsigned_long_ptr, c_ptr); + function To_PTR is + new Ada.Unchecked_Conversion (float_ptr, c_ptr); + function To_PTR is + new Ada.Unchecked_Conversion (const_signed_char_ptr, c_ptr); + function To_PTR is + new Ada.Unchecked_Conversion (const_unsigned_char_ptr, c_ptr); + function To_PTR is + new Ada.Unchecked_Conversion (const_short_ptr, c_ptr); + function To_PTR is + new Ada.Unchecked_Conversion (const_signed_short_ptr, c_ptr); + function To_PTR is + new Ada.Unchecked_Conversion (const_unsigned_short_ptr, c_ptr); + function To_PTR is + new Ada.Unchecked_Conversion (const_int_ptr, c_ptr); + function To_PTR is + new Ada.Unchecked_Conversion (const_signed_int_ptr, c_ptr); + function To_PTR is + new Ada.Unchecked_Conversion (const_unsigned_int_ptr, c_ptr); + function To_PTR is + new Ada.Unchecked_Conversion (const_long_ptr, c_ptr); + function To_PTR is + new Ada.Unchecked_Conversion (const_signed_long_ptr, c_ptr); + function To_PTR is + new Ada.Unchecked_Conversion (const_unsigned_long_ptr, c_ptr); + function To_PTR is + new Ada.Unchecked_Conversion (const_float_ptr, c_ptr); + function To_PTR is + new Ada.Unchecked_Conversion (constv_char_ptr, c_ptr); + function To_PTR is + new Ada.Unchecked_Conversion (constv_signed_char_ptr, c_ptr); + function To_PTR is + new Ada.Unchecked_Conversion (constv_unsigned_char_ptr, c_ptr); + function To_PTR is + new Ada.Unchecked_Conversion (constv_short_ptr, c_ptr); + function To_PTR is + new Ada.Unchecked_Conversion (constv_signed_short_ptr, c_ptr); + function To_PTR is + new Ada.Unchecked_Conversion (constv_unsigned_short_ptr, c_ptr); + function To_PTR is + new Ada.Unchecked_Conversion (constv_int_ptr, c_ptr); + function To_PTR is + new Ada.Unchecked_Conversion (constv_signed_int_ptr, c_ptr); + function To_PTR is + new Ada.Unchecked_Conversion (constv_unsigned_int_ptr, c_ptr); + function To_PTR is + new Ada.Unchecked_Conversion (constv_long_ptr, c_ptr); + function To_PTR is + new Ada.Unchecked_Conversion (constv_signed_long_ptr, c_ptr); + function To_PTR is + new Ada.Unchecked_Conversion (constv_unsigned_long_ptr, c_ptr); + function To_PTR is + new Ada.Unchecked_Conversion (constv_float_ptr, c_ptr); + +end GNAT.Altivec.Low_Level_Interface; diff --git a/gcc/ada/g-alleve.adb b/gcc/ada/g-alleve.adb new file mode 100644 index 00000000000..2da86977c3f --- /dev/null +++ b/gcc/ada/g-alleve.adb @@ -0,0 +1,5035 @@ +------------------------------------------------------------------------------ +-- -- +-- GNAT COMPILER COMPONENTS -- +-- -- +-- G N A T . A L T I V E C . L O W _ L E V E L _ V E C T O R S -- +-- -- +-- B o d y -- +-- (Soft Binding Version) -- +-- -- +-- Copyright (C) 2004-2005, Free Software Foundation, Inc. -- +-- -- +-- GNAT is free software; you can redistribute it and/or modify it under -- +-- terms of the GNU General Public License as published by the Free Soft- -- +-- ware Foundation; either version 2, or (at your option) any later ver- -- +-- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- +-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- +-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- +-- for more details. You should have received a copy of the GNU General -- +-- Public License distributed with GNAT; see 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 other files instantiate generics from this -- +-- unit, or you link this unit with other files to produce an executable, -- +-- this unit 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 Public License. -- +-- -- +-- GNAT was originally developed by the GNAT team at New York University. -- +-- Extensive contributions were provided by Ada Core Technologies Inc. -- +-- -- +------------------------------------------------------------------------------ + +-- ??? What is exactly needed for the soft case is still a bit unclear on +-- some accounts. The expected functional equivalence with the Hard binding +-- might require tricky things to be done on some targets. + +-- Examples that come to mind are endianness variations or differences in the +-- base FP model while we need the operation results to be the same as what +-- the real AltiVec instructions would do on a PowerPC. + +with Ada.Numerics.Generic_Elementary_Functions; +with Interfaces; use Interfaces; +with System.Storage_Elements; use System.Storage_Elements; + +with GNAT.Altivec.Conversions; use GNAT.Altivec.Conversions; +with GNAT.Altivec.Low_Level_Interface; use GNAT.Altivec.Low_Level_Interface; + +package body GNAT.Altivec.Low_Level_Vectors is + + -- This package assumes C_float is an IEEE single-precision float type + + pragma Assert (C_float'Machine_Radix = 2); + pragma Assert (C_float'Machine_Mantissa = 24); + pragma Assert (C_float'Machine_Emin = -125); + pragma Assert (C_float'Machine_Emax = 128); + pragma Assert (C_float'Machine_Rounds); + pragma Assert (not C_float'Machine_Overflows); + pragma Assert (C_float'Signed_Zeros); + pragma Assert (C_float'Denorm); + + -- Pixel types. As defined in [PIM-2.1 Data types]: + -- A 16-bit pixel is 1/5/5/5; + -- A 32-bit pixel is 8/8/8/8. + -- We use the following records as an intermediate representation, to + -- ease computation. + + type Unsigned_1 is mod 2 ** 1; + type Unsigned_5 is mod 2 ** 5; + + type Pixel_16 is record + T : Unsigned_1; + R : Unsigned_5; + G : Unsigned_5; + B : Unsigned_5; + end record; + + type Pixel_32 is record + T : unsigned_char; + R : unsigned_char; + G : unsigned_char; + B : unsigned_char; + end record; + + -- Conversions to/from the pixel records to the integer types that are + -- actually stored into the pixel vectors: + + function To_Pixel (Source : unsigned_short) return Pixel_16; + function To_unsigned_short (Source : Pixel_16) return unsigned_short; + function To_Pixel (Source : unsigned_int) return Pixel_32; + function To_unsigned_int (Source : Pixel_32) return unsigned_int; + + package C_float_Operations is + new Ada.Numerics.Generic_Elementary_Functions (C_float); + + -- Model of the Vector Status and Control Register (VSCR), as + -- defined in [PIM-4.1 Vector Status and Control Register]: + + VSCR : unsigned_int; + + -- Positions of the flags in VSCR(0 .. 31): + + NJ_POS : constant := 15; + SAT_POS : constant := 31; + + -- To control overflows, integer operations are done on 64-bit types: + + SINT64_MIN : constant := -2 ** 63; + SINT64_MAX : constant := 2 ** 63 - 1; + UINT64_MAX : constant := 2 ** 64 - 1; + + type SI64 is range SINT64_MIN .. SINT64_MAX; + type UI64 is mod UINT64_MAX + 1; + + type F64 is digits 15 + range -16#0.FFFF_FFFF_FFFF_F8#E+256 .. 16#0.FFFF_FFFF_FFFF_F8#E+256; + + function Bits + (X : unsigned_int; + Low : Natural; + High : Natural) return unsigned_int; + + function Bits + (X : unsigned_short; + Low : Natural; + High : Natural) return unsigned_short; + + function Bits + (X : unsigned_char; + Low : Natural; + High : Natural) return unsigned_char; + + function Write_Bit + (X : unsigned_int; + Where : Natural; + Value : Unsigned_1) return unsigned_int; + + function Write_Bit + (X : unsigned_short; + Where : Natural; + Value : Unsigned_1) return unsigned_short; + + function Write_Bit + (X : unsigned_char; + Where : Natural; + Value : Unsigned_1) return unsigned_char; + + function NJ_Truncate (X : C_float) return C_float; + -- If NJ and A is a denormalized number, return zero + + function Bound_Align + (X : Integer_Address; + Y : Integer_Address) return Integer_Address; + -- [PIM-4.3 Notations and Conventions] + -- Align X in a y-byte boundary and return the result + + function Rnd_To_FP_Nearest (X : F64) return C_float; + -- [PIM-4.3 Notations and Conventions] + + function Rnd_To_FPI_Near (X : F64) return F64; + + function Rnd_To_FPI_Trunc (X : F64) return F64; + + function FP_Recip_Est (X : C_float) return C_float; + -- [PIM-4.3 Notations and Conventions] + -- 12-bit accurate floating-point estimate of 1/x + + function ROTL + (Value : unsigned_char; + Amount : Natural) return unsigned_char; + -- [PIM-4.3 Notations and Conventions] + -- Rotate left + + function ROTL + (Value : unsigned_short; + Amount : Natural) return unsigned_short; + + function ROTL + (Value : unsigned_int; + Amount : Natural) return unsigned_int; + + function Recip_SQRT_Est (X : C_float) return C_float; + + function Shift_Left + (Value : unsigned_char; + Amount : Natural) return unsigned_char; + -- [PIM-4.3 Notations and Conventions] + -- Shift left + + function Shift_Left + (Value : unsigned_short; + Amount : Natural) return unsigned_short; + + function Shift_Left + (Value : unsigned_int; + Amount : Natural) return unsigned_int; + + function Shift_Right + (Value : unsigned_char; + Amount : Natural) return unsigned_char; + -- [PIM-4.3 Notations and Conventions] + -- Shift Right + + function Shift_Right + (Value : unsigned_short; + Amount : Natural) return unsigned_short; + + function Shift_Right + (Value : unsigned_int; + Amount : Natural) return unsigned_int; + + Signed_Bool_False : constant := 0; + Signed_Bool_True : constant := -1; + + ------------------------------ + -- Signed_Operations (spec) -- + ------------------------------ + + generic + type Component_Type is range <>; + type Index_Type is range <>; + type Varray_Type is array (Index_Type) of Component_Type; + + package Signed_Operations is + + function Modular_Result (X : SI64) return Component_Type; + + function Saturate (X : SI64) return Component_Type; + + function Saturate (X : F64) return Component_Type; + + function Sign_Extend (X : c_int) return Component_Type; + -- [PIM-4.3 Notations and Conventions] + -- Sign-extend X + + function abs_vxi (A : Varray_Type) return Varray_Type; + pragma Convention (LL_Altivec, abs_vxi); + + function abss_vxi (A : Varray_Type) return Varray_Type; + pragma Convention (LL_Altivec, abss_vxi); + + function vaddsxs (A : Varray_Type; B : Varray_Type) return Varray_Type; + pragma Convention (LL_Altivec, vaddsxs); + + function vavgsx (A : Varray_Type; B : Varray_Type) return Varray_Type; + pragma Convention (LL_Altivec, vavgsx); + + function vcmpgtsx (A : Varray_Type; B : Varray_Type) return Varray_Type; + pragma Convention (LL_Altivec, vcmpgtsx); + + function lvexx (A : c_long; B : c_ptr) return Varray_Type; + pragma Convention (LL_Altivec, lvexx); + + function vmaxsx (A : Varray_Type; B : Varray_Type) return Varray_Type; + pragma Convention (LL_Altivec, vmaxsx); + + function vmrghx (A : Varray_Type; B : Varray_Type) return Varray_Type; + pragma Convention (LL_Altivec, vmrghx); + + function vmrglx (A : Varray_Type; B : Varray_Type) return Varray_Type; + pragma Convention (LL_Altivec, vmrglx); + + function vminsx (A : Varray_Type; B : Varray_Type) return Varray_Type; + pragma Convention (LL_Altivec, vminsx); + + function vspltx (A : Varray_Type; B : c_int) return Varray_Type; + pragma Convention (LL_Altivec, vspltx); + + function vspltisx (A : c_int) return Varray_Type; + pragma Convention (LL_Altivec, vspltisx); + + type Bit_Operation is + access function + (Value : Component_Type; + Amount : Natural) return Component_Type; + + function vsrax + (A : Varray_Type; + B : Varray_Type; + Shift_Func : Bit_Operation) return Varray_Type; + + procedure stvexx (A : Varray_Type; B : c_int; C : c_ptr); + pragma Convention (LL_Altivec, stvexx); + + function vsubsxs (A : Varray_Type; B : Varray_Type) return Varray_Type; + pragma Convention (LL_Altivec, vsubsxs); + + function Check_CR6 (A : c_int; D : Varray_Type) return c_int; + -- If D is the result of a vcmp operation and A the flag for + -- the kind of operation (e.g CR6_LT), check the predicate + -- that corresponds to this flag. + + end Signed_Operations; + + ------------------------------ + -- Signed_Operations (body) -- + ------------------------------ + + package body Signed_Operations is + + Bool_True : constant Component_Type := Signed_Bool_True; + Bool_False : constant Component_Type := Signed_Bool_False; + + Number_Of_Elements : constant Integer := + VECTOR_BIT / Component_Type'Size; + + -------------------- + -- Modular_Result -- + -------------------- + + function Modular_Result (X : SI64) return Component_Type is + D : Component_Type; + + begin + if X > 0 then + D := Component_Type (UI64 (X) + mod (UI64 (Component_Type'Last) + 1)); + else + D := Component_Type ((-(UI64 (-X) + mod (UI64 (Component_Type'Last) + 1)))); + end if; + + return D; + end Modular_Result; + + -------------- + -- Saturate -- + -------------- + + function Saturate (X : SI64) return Component_Type is + D : Component_Type; + + begin + -- Saturation, as defined in + -- [PIM-4.1 Vector Status and Control Register] + + D := Component_Type (SI64'Max + (SI64 (Component_Type'First), + SI64'Min + (SI64 (Component_Type'Last), + X))); + + if SI64 (D) /= X then + VSCR := Write_Bit (VSCR, SAT_POS, 1); + end if; + + return D; + end Saturate; + + function Saturate (X : F64) return Component_Type is + D : Component_Type; + + begin + -- Saturation, as defined in + -- [PIM-4.1 Vector Status and Control Register] + + D := Component_Type (F64'Max + (F64 (Component_Type'First), + F64'Min + (F64 (Component_Type'Last), + X))); + + if F64 (D) /= X then + VSCR := Write_Bit (VSCR, SAT_POS, 1); + end if; + + return D; + end Saturate; + + ----------------- + -- Sign_Extend -- + ----------------- + + function Sign_Extend (X : c_int) return Component_Type is + begin + -- X is usually a 5-bits literal. In the case of the simulator, + -- it is an integral parameter, so sign extension is straightforward. + + return Component_Type (X); + end Sign_Extend; + + ------------- + -- abs_vxi -- + ------------- + + function abs_vxi (A : Varray_Type) return Varray_Type is + D : Varray_Type; + + begin + for K in Varray_Type'Range loop + if A (K) /= Component_Type'First then + D (K) := abs (A (K)); + else + D (K) := Component_Type'First; + end if; + end loop; + + return D; + end abs_vxi; + + -------------- + -- abss_vxi -- + -------------- + + function abss_vxi (A : Varray_Type) return Varray_Type is + D : Varray_Type; + + begin + for K in Varray_Type'Range loop + D (K) := Saturate (abs (SI64 (A (K)))); + end loop; + + return D; + end abss_vxi; + + ------------- + -- vaddsxs -- + ------------- + + function vaddsxs (A : Varray_Type; B : Varray_Type) return Varray_Type is + D : Varray_Type; + + begin + for J in Varray_Type'Range loop + D (J) := Saturate (SI64 (A (J)) + SI64 (B (J))); + end loop; + + return D; + end vaddsxs; + + ------------ + -- vavgsx -- + ------------ + + function vavgsx (A : Varray_Type; B : Varray_Type) return Varray_Type is + D : Varray_Type; + + begin + for J in Varray_Type'Range loop + D (J) := Component_Type ((SI64 (A (J)) + SI64 (B (J)) + 1) / 2); + end loop; + + return D; + end vavgsx; + + -------------- + -- vcmpgtsx -- + -------------- + + function vcmpgtsx + (A : Varray_Type; + B : Varray_Type) return Varray_Type + is + D : Varray_Type; + + begin + for J in Varray_Type'Range loop + if A (J) > B (J) then + D (J) := Bool_True; + else + D (J) := Bool_False; + end if; + end loop; + + return D; + end vcmpgtsx; + + ----------- + -- lvexx -- + ----------- + + function lvexx (A : c_long; B : c_ptr) return Varray_Type is + D : Varray_Type; + S : Integer; + EA : Integer_Address; + J : Index_Type; + + begin + S := 16 / Number_Of_Elements; + EA := Bound_Align (Integer_Address (A) + To_Integer (B), + Integer_Address (S)); + J := Index_Type (((EA mod 16) / Integer_Address (S)) + + Integer_Address (Index_Type'First)); + + declare + Component : Component_Type; + for Component'Address use To_Address (EA); + begin + D (J) := Component; + end; + + return D; + end lvexx; + + ------------ + -- vmaxsx -- + ------------ + + function vmaxsx (A : Varray_Type; B : Varray_Type) return Varray_Type is + D : Varray_Type; + + begin + for J in Varray_Type'Range loop + if A (J) > B (J) then + D (J) := A (J); + else + D (J) := B (J); + end if; + end loop; + + return D; + end vmaxsx; + + ------------ + -- vmrghx -- + ------------ + + function vmrghx (A : Varray_Type; B : Varray_Type) return Varray_Type is + D : Varray_Type; + Offset : constant Integer := Integer (Index_Type'First); + M : constant Integer := Number_Of_Elements / 2; + + begin + for J in 0 .. M - 1 loop + D (Index_Type (2 * J + Offset)) := A (Index_Type (J + Offset)); + D (Index_Type (2 * J + Offset + 1)) := B (Index_Type (J + Offset)); + end loop; + + return D; + end vmrghx; + + ------------ + -- vmrglx -- + ------------ + + function vmrglx (A : Varray_Type; B : Varray_Type) return Varray_Type is + D : Varray_Type; + Offset : constant Integer := Integer (Index_Type'First); + M : constant Integer := Number_Of_Elements / 2; + + begin + for J in 0 .. M - 1 loop + D (Index_Type (2 * J + Offset)) := A (Index_Type (J + Offset + M)); + D (Index_Type (2 * J + Offset + 1)) := + B (Index_Type (J + Offset + M)); + end loop; + + return D; + end vmrglx; + + ------------ + -- vminsx -- + ------------ + + function vminsx (A : Varray_Type; B : Varray_Type) return Varray_Type is + D : Varray_Type; + + begin + for J in Varray_Type'Range loop + if A (J) < B (J) then + D (J) := A (J); + else + D (J) := B (J); + end if; + end loop; + + return D; + end vminsx; + + ------------ + -- vspltx -- + ------------ + + function vspltx (A : Varray_Type; B : c_int) return Varray_Type is + J : constant Integer := + Integer (B) mod Number_Of_Elements + + Integer (Varray_Type'First); + D : Varray_Type; + + begin + for K in Varray_Type'Range loop + D (K) := A (Index_Type (J)); + end loop; + + return D; + end vspltx; + + -------------- + -- vspltisx -- + -------------- + + function vspltisx (A : c_int) return Varray_Type is + D : Varray_Type; + + begin + for J in Varray_Type'Range loop + D (J) := Sign_Extend (A); + end loop; + + return D; + end vspltisx; + + ----------- + -- vsrax -- + ----------- + + function vsrax + (A : Varray_Type; + B : Varray_Type; + Shift_Func : Bit_Operation) return Varray_Type + is + D : Varray_Type; + S : constant Component_Type := + Component_Type (128 / Number_Of_Elements); + + begin + for J in Varray_Type'Range loop + D (J) := Shift_Func (A (J), Natural (B (J) mod S)); + end loop; + + return D; + end vsrax; + + ------------ + -- stvexx -- + ------------ + + procedure stvexx (A : Varray_Type; B : c_int; C : c_ptr) is + S : Integer; + EA : Integer_Address; + J : Index_Type; + + begin + S := 16 / Number_Of_Elements; + EA := Bound_Align (Integer_Address (B) + To_Integer (C), + Integer_Address (S)); + J := Index_Type ((EA mod 16) / Integer_Address (S) + + Integer_Address (Index_Type'First)); + + declare + Component : Component_Type; + for Component'Address use To_Address (EA); + begin + Component := A (J); + end; + end stvexx; + + ------------- + -- vsubsxs -- + ------------- + + function vsubsxs (A : Varray_Type; B : Varray_Type) return Varray_Type is + D : Varray_Type; + + begin + for J in Varray_Type'Range loop + D (J) := Saturate (SI64 (A (J)) - SI64 (B (J))); + end loop; + + return D; + end vsubsxs; + + --------------- + -- Check_CR6 -- + --------------- + + function Check_CR6 (A : c_int; D : Varray_Type) return c_int is + All_Element : Boolean := True; + Any_Element : Boolean := False; + + begin + for J in Varray_Type'Range loop + All_Element := All_Element and (D (J) = Bool_True); + Any_Element := Any_Element or (D (J) = Bool_True); + end loop; + + if A = CR6_LT then + if All_Element then + return 1; + else + return 0; + end if; + + elsif A = CR6_EQ then + if not Any_Element then + return 1; + else + return 0; + end if; + + elsif A = CR6_EQ_REV then + if Any_Element then + return 1; + else + return 0; + end if; + + elsif A = CR6_LT_REV then + if not All_Element then + return 1; + else + return 0; + end if; + end if; + + return 0; + end Check_CR6; + + end Signed_Operations; + + -------------------------------- + -- Unsigned_Operations (spec) -- + -------------------------------- + + generic + type Component_Type is mod <>; + type Index_Type is range <>; + type Varray_Type is array (Index_Type) of Component_Type; + + package Unsigned_Operations is + + function Bits + (X : Component_Type; + Low : Natural; + High : Natural) return Component_Type; + -- Return X [Low:High] as defined in [PIM-4.3 Notations and Conventions] + -- using big endian bit ordering. + + function Write_Bit + (X : Component_Type; + Where : Natural; + Value : Unsigned_1) return Component_Type; + -- Write Value into X[Where:Where] (if it fits in) and return the result + -- (big endian bit ordering). + + function Modular_Result (X : UI64) return Component_Type; + + function Saturate (X : UI64) return Component_Type; + + function Saturate (X : F64) return Component_Type; + + function Saturate (X : SI64) return Component_Type; + + function vadduxm (A : Varray_Type; B : Varray_Type) return Varray_Type; + + function vadduxs (A : Varray_Type; B : Varray_Type) return Varray_Type; + + function vavgux (A : Varray_Type; B : Varray_Type) return Varray_Type; + + function vcmpequx (A : Varray_Type; B : Varray_Type) return Varray_Type; + + function vcmpgtux (A : Varray_Type; B : Varray_Type) return Varray_Type; + + function vmaxux (A : Varray_Type; B : Varray_Type) return Varray_Type; + + function vminux (A : Varray_Type; B : Varray_Type) return Varray_Type; + + type Bit_Operation is + access function + (Value : Component_Type; + Amount : Natural) return Component_Type; + + function vrlx + (A : Varray_Type; + B : Varray_Type; + ROTL : Bit_Operation) return Varray_Type; + + function vsxx + (A : Varray_Type; + B : Varray_Type; + Shift_Func : Bit_Operation) return Varray_Type; + -- Vector shift (left or right, depending on Shift_Func) + + function vsubuxm (A : Varray_Type; B : Varray_Type) return Varray_Type; + + function vsubuxs (A : Varray_Type; B : Varray_Type) return Varray_Type; + + function Check_CR6 (A : c_int; D : Varray_Type) return c_int; + -- If D is the result of a vcmp operation and A the flag for + -- the kind of operation (e.g CR6_LT), check the predicate + -- that corresponds to this flag. + + end Unsigned_Operations; + + -------------------------------- + -- Unsigned_Operations (body) -- + -------------------------------- + + package body Unsigned_Operations is + + Number_Of_Elements : constant Integer := + VECTOR_BIT / Component_Type'Size; + + Bool_True : constant Component_Type := Component_Type'Last; + Bool_False : constant Component_Type := 0; + + -------------------- + -- Modular_Result -- + -------------------- + + function Modular_Result (X : UI64) return Component_Type is + D : Component_Type; + begin + D := Component_Type (X mod (UI64 (Component_Type'Last) + 1)); + return D; + end Modular_Result; + + -------------- + -- Saturate -- + -------------- + + function Saturate (X : UI64) return Component_Type is + D : Component_Type; + + begin + -- Saturation, as defined in + -- [PIM-4.1 Vector Status and Control Register] + + D := Component_Type (UI64'Max + (UI64 (Component_Type'First), + UI64'Min + (UI64 (Component_Type'Last), + X))); + + if UI64 (D) /= X then + VSCR := Write_Bit (VSCR, SAT_POS, 1); + end if; + + return D; + end Saturate; + + function Saturate (X : SI64) return Component_Type is + D : Component_Type; + + begin + -- Saturation, as defined in + -- [PIM-4.1 Vector Status and Control Register] + + D := Component_Type (SI64'Max + (SI64 (Component_Type'First), + SI64'Min + (SI64 (Component_Type'Last), + X))); + + if SI64 (D) /= X then + VSCR := Write_Bit (VSCR, SAT_POS, 1); + end if; + + return D; + end Saturate; + + function Saturate (X : F64) return Component_Type is + D : Component_Type; + + begin + -- Saturation, as defined in + -- [PIM-4.1 Vector Status and Control Register] + + D := Component_Type (F64'Max + (F64 (Component_Type'First), + F64'Min + (F64 (Component_Type'Last), + X))); + + if F64 (D) /= X then + VSCR := Write_Bit (VSCR, SAT_POS, 1); + end if; + + return D; + end Saturate; + + ---------- + -- Bits -- + ---------- + + function Bits + (X : Component_Type; + Low : Natural; + High : Natural) return Component_Type + is + Mask : Component_Type := 0; + + -- The Altivec ABI uses a big endian bit ordering, and we are + -- using little endian bit ordering for extracting bits: + + Low_LE : constant Natural := Component_Type'Size - 1 - High; + High_LE : constant Natural := Component_Type'Size - 1 - Low; + + begin + pragma Assert (Low <= Component_Type'Size); + pragma Assert (High <= Component_Type'Size); + + for J in Low_LE .. High_LE loop + Mask := Mask or 2 ** J; + end loop; + + return (X and Mask) / 2 ** Low_LE; + end Bits; + + --------------- + -- Write_Bit -- + --------------- + + function Write_Bit + (X : Component_Type; + Where : Natural; + Value : Unsigned_1) return Component_Type + is + Result : Component_Type := 0; + + -- The Altivec ABI uses a big endian bit ordering, and we are + -- using little endian bit ordering for extracting bits: + + Where_LE : constant Natural := Component_Type'Size - 1 - Where; + + begin + pragma Assert (Where < Component_Type'Size); + + case Value is + when 1 => + Result := X or 2 ** Where_LE; + when 0 => + Result := X and not (2 ** Where_LE); + end case; + + return Result; + end Write_Bit; + + ------------- + -- vadduxm -- + ------------- + + function vadduxm (A : Varray_Type; B : Varray_Type) return Varray_Type is + D : Varray_Type; + + begin + for J in Varray_Type'Range loop + D (J) := A (J) + B (J); + end loop; + + return D; + end vadduxm; + + ------------- + -- vadduxs -- + ------------- + + function vadduxs (A : Varray_Type; B : Varray_Type) return Varray_Type is + D : Varray_Type; + + begin + for J in Varray_Type'Range loop + D (J) := Saturate (UI64 (A (J)) + UI64 (B (J))); + end loop; + + return D; + end vadduxs; + + ------------ + -- vavgux -- + ------------ + + function vavgux (A : Varray_Type; B : Varray_Type) return Varray_Type is + D : Varray_Type; + + begin + for J in Varray_Type'Range loop + D (J) := Component_Type ((UI64 (A (J)) + UI64 (B (J)) + 1) / 2); + end loop; + + return D; + end vavgux; + + -------------- + -- vcmpequx -- + -------------- + + function vcmpequx + (A : Varray_Type; + B : Varray_Type) return Varray_Type + is + D : Varray_Type; + + begin + for J in Varray_Type'Range loop + if A (J) = B (J) then + D (J) := Bool_True; + else + D (J) := Bool_False; + end if; + end loop; + + return D; + end vcmpequx; + + -------------- + -- vcmpgtux -- + -------------- + + function vcmpgtux + (A : Varray_Type; + B : Varray_Type) return Varray_Type + is + D : Varray_Type; + begin + for J in Varray_Type'Range loop + if A (J) > B (J) then + D (J) := Bool_True; + else + D (J) := Bool_False; + end if; + end loop; + + return D; + end vcmpgtux; + + ------------ + -- vmaxux -- + ------------ + + function vmaxux (A : Varray_Type; B : Varray_Type) return Varray_Type is + D : Varray_Type; + + begin + for J in Varray_Type'Range loop + if A (J) > B (J) then + D (J) := A (J); + else + D (J) := B (J); + end if; + end loop; + + return D; + end vmaxux; + + ------------ + -- vminux -- + ------------ + + function vminux (A : Varray_Type; B : Varray_Type) return Varray_Type is + D : Varray_Type; + + begin + for J in Varray_Type'Range loop + if A (J) < B (J) then + D (J) := A (J); + else + D (J) := B (J); + end if; + end loop; + + return D; + end vminux; + + ---------- + -- vrlx -- + ---------- + + function vrlx + (A : Varray_Type; + B : Varray_Type; + ROTL : Bit_Operation) return Varray_Type + is + D : Varray_Type; + + begin + for J in Varray_Type'Range loop + D (J) := ROTL (A (J), Natural (B (J))); + end loop; + + return D; + end vrlx; + + ---------- + -- vsxx -- + ---------- + + function vsxx + (A : Varray_Type; + B : Varray_Type; + Shift_Func : Bit_Operation) return Varray_Type + is + D : Varray_Type; + S : constant Component_Type := + Component_Type (128 / Number_Of_Elements); + + begin + for J in Varray_Type'Range loop + D (J) := Shift_Func (A (J), Natural (B (J) mod S)); + end loop; + + return D; + end vsxx; + + ------------- + -- vsubuxm -- + ------------- + + function vsubuxm (A : Varray_Type; B : Varray_Type) return Varray_Type is + D : Varray_Type; + + begin + for J in Varray_Type'Range loop + D (J) := A (J) - B (J); + end loop; + + return D; + end vsubuxm; + + ------------- + -- vsubuxs -- + ------------- + + function vsubuxs (A : Varray_Type; B : Varray_Type) return Varray_Type is + D : Varray_Type; + + begin + for J in Varray_Type'Range loop + D (J) := Saturate (SI64 (A (J)) - SI64 (B (J))); + end loop; + + return D; + end vsubuxs; + + --------------- + -- Check_CR6 -- + --------------- + + function Check_CR6 (A : c_int; D : Varray_Type) return c_int is + All_Element : Boolean := True; + Any_Element : Boolean := False; + + begin + for J in Varray_Type'Range loop + All_Element := All_Element and (D (J) = Bool_True); + Any_Element := Any_Element or (D (J) = Bool_True); + end loop; + + if A = CR6_LT then + if All_Element then + return 1; + else + return 0; + end if; + + elsif A = CR6_EQ then + if not Any_Element then + return 1; + else + return 0; + end if; + + elsif A = CR6_EQ_REV then + if Any_Element then + return 1; + else + return 0; + end if; + + elsif A = CR6_LT_REV then + if not All_Element then + return 1; + else + return 0; + end if; + end if; + + return 0; + end Check_CR6; + + end Unsigned_Operations; + + -------------------------------------- + -- Signed_Merging_Operations (spec) -- + -------------------------------------- + + generic + type Component_Type is range <>; + type Index_Type is range <>; + type Varray_Type is array (Index_Type) of Component_Type; + type Double_Component_Type is range <>; + type Double_Index_Type is range <>; + type Double_Varray_Type is array (Double_Index_Type) + of Double_Component_Type; + + package Signed_Merging_Operations is + + pragma Assert (Integer (Varray_Type'First) + = Integer (Double_Varray_Type'First)); + pragma Assert (Varray_Type'Length = 2 * Double_Varray_Type'Length); + pragma Assert (2 * Component_Type'Size = Double_Component_Type'Size); + + function Saturate + (X : Double_Component_Type) return Component_Type; + + function vmulxsx + (Use_Even_Components : Boolean; + A : Varray_Type; + B : Varray_Type) return Double_Varray_Type; + + function vpksxss + (A : Double_Varray_Type; + B : Double_Varray_Type) return Varray_Type; + pragma Convention (LL_Altivec, vpksxss); + + function vupkxsx + (A : Varray_Type; + Offset : Natural) return Double_Varray_Type; + + end Signed_Merging_Operations; + + -------------------------------------- + -- Signed_Merging_Operations (body) -- + -------------------------------------- + + package body Signed_Merging_Operations is + + -------------- + -- Saturate -- + -------------- + + function Saturate + (X : Double_Component_Type) return Component_Type + is + D : Component_Type; + + begin + -- Saturation, as defined in + -- [PIM-4.1 Vector Status and Control Register] + + D := Component_Type (Double_Component_Type'Max + (Double_Component_Type (Component_Type'First), + Double_Component_Type'Min + (Double_Component_Type (Component_Type'Last), + X))); + + if Double_Component_Type (D) /= X then + VSCR := Write_Bit (VSCR, SAT_POS, 1); + end if; + + return D; + end Saturate; + + ------------- + -- vmulsxs -- + ------------- + + function vmulxsx + (Use_Even_Components : Boolean; + A : Varray_Type; + B : Varray_Type) return Double_Varray_Type + is + Double_Offset : Double_Index_Type; + Offset : Index_Type; + D : Double_Varray_Type; + N : constant Integer := + Integer (Double_Index_Type'Last) + - Integer (Double_Index_Type'First) + 1; + + begin + + for J in 0 .. N - 1 loop + if Use_Even_Components then + Offset := Index_Type (2 * J + Integer (Index_Type'First)); + else + Offset := Index_Type (2 * J + 1 + Integer (Index_Type'First)); + end if; + + Double_Offset := + Double_Index_Type (J + Integer (Double_Index_Type'First)); + D (Double_Offset) := + Double_Component_Type (A (Offset)) + * Double_Component_Type (B (Offset)); + end loop; + + return D; + end vmulxsx; + + ------------- + -- vpksxss -- + ------------- + + function vpksxss + (A : Double_Varray_Type; + B : Double_Varray_Type) return Varray_Type + is + N : constant Index_Type := + Index_Type (Double_Index_Type'Last); + D : Varray_Type; + Offset : Index_Type; + Double_Offset : Double_Index_Type; + + begin + for J in 0 .. N - 1 loop + Offset := Index_Type (Integer (J) + Integer (Index_Type'First)); + Double_Offset := + Double_Index_Type (Integer (J) + + Integer (Double_Index_Type'First)); + D (Offset) := Saturate (A (Double_Offset)); + D (Offset + N) := Saturate (B (Double_Offset)); + end loop; + + return D; + end vpksxss; + + ------------- + -- vupkxsx -- + ------------- + + function vupkxsx + (A : Varray_Type; + Offset : Natural) return Double_Varray_Type + is + K : Index_Type; + D : Double_Varray_Type; + + begin + for J in Double_Varray_Type'Range loop + K := Index_Type (Integer (J) + - Integer (Double_Index_Type'First) + + Integer (Index_Type'First) + + Offset); + D (J) := Double_Component_Type (A (K)); + end loop; + + return D; + end vupkxsx; + + end Signed_Merging_Operations; + + ---------------------------------------- + -- Unsigned_Merging_Operations (spec) -- + ---------------------------------------- + + generic + type Component_Type is mod <>; + type Index_Type is range <>; + type Varray_Type is array (Index_Type) of Component_Type; + type Double_Component_Type is mod <>; + type Double_Index_Type is range <>; + type Double_Varray_Type is array (Double_Index_Type) + of Double_Component_Type; + + package Unsigned_Merging_Operations is + + pragma Assert (Integer (Varray_Type'First) + = Integer (Double_Varray_Type'First)); + pragma Assert (Varray_Type'Length = 2 * Double_Varray_Type'Length); + pragma Assert (2 * Component_Type'Size = Double_Component_Type'Size); + + function UI_To_UI_Mod + (X : Double_Component_Type; + Y : Natural) return Component_Type; + + function Saturate (X : Double_Component_Type) return Component_Type; + + function vmulxux + (Use_Even_Components : Boolean; + A : Varray_Type; + B : Varray_Type) return Double_Varray_Type; + + function vpkuxum + (A : Double_Varray_Type; + B : Double_Varray_Type) return Varray_Type; + + function vpkuxus + (A : Double_Varray_Type; + B : Double_Varray_Type) return Varray_Type; + + end Unsigned_Merging_Operations; + + ---------------------------------------- + -- Unsigned_Merging_Operations (body) -- + ---------------------------------------- + + package body Unsigned_Merging_Operations is + + ------------------ + -- UI_To_UI_Mod -- + ------------------ + + function UI_To_UI_Mod + (X : Double_Component_Type; + Y : Natural) return Component_Type is + Z : Component_Type; + begin + Z := Component_Type (X mod 2 ** Y); + return Z; + end UI_To_UI_Mod; + + -------------- + -- Saturate -- + -------------- + + function Saturate (X : Double_Component_Type) return Component_Type is + D : Component_Type; + + begin + -- Saturation, as defined in + -- [PIM-4.1 Vector Status and Control Register] + + D := Component_Type (Double_Component_Type'Max + (Double_Component_Type (Component_Type'First), + Double_Component_Type'Min + (Double_Component_Type (Component_Type'Last), + X))); + + if Double_Component_Type (D) /= X then + VSCR := Write_Bit (VSCR, SAT_POS, 1); + end if; + + return D; + end Saturate; + + ------------- + -- vmulxux -- + ------------- + + function vmulxux + (Use_Even_Components : Boolean; + A : Varray_Type; + B : Varray_Type) return Double_Varray_Type + is + Double_Offset : Double_Index_Type; + Offset : Index_Type; + D : Double_Varray_Type; + N : constant Integer := + Integer (Double_Index_Type'Last) + - Integer (Double_Index_Type'First) + 1; + + begin + for J in 0 .. N - 1 loop + if Use_Even_Components then + Offset := Index_Type (2 * J + Integer (Index_Type'First)); + else + Offset := Index_Type (2 * J + 1 + Integer (Index_Type'First)); + end if; + + Double_Offset := + Double_Index_Type (J + Integer (Double_Index_Type'First)); + D (Double_Offset) := + Double_Component_Type (A (Offset)) + * Double_Component_Type (B (Offset)); + end loop; + + return D; + end vmulxux; + + ------------- + -- vpkuxum -- + ------------- + + function vpkuxum + (A : Double_Varray_Type; + B : Double_Varray_Type) return Varray_Type + is + S : constant Natural := + Double_Component_Type'Size / 2; + N : constant Index_Type := + Index_Type (Double_Index_Type'Last); + D : Varray_Type; + Offset : Index_Type; + Double_Offset : Double_Index_Type; + + begin + for J in 0 .. N - 1 loop + Offset := Index_Type (Integer (J) + Integer (Index_Type'First)); + Double_Offset := + Double_Index_Type (Integer (J) + + Integer (Double_Index_Type'First)); + D (Offset) := UI_To_UI_Mod (A (Double_Offset), S); + D (Offset + N) := UI_To_UI_Mod (B (Double_Offset), S); + end loop; + + return D; + end vpkuxum; + + ------------- + -- vpkuxus -- + ------------- + + function vpkuxus + (A : Double_Varray_Type; + B : Double_Varray_Type) return Varray_Type + is + N : constant Index_Type := + Index_Type (Double_Index_Type'Last); + D : Varray_Type; + Offset : Index_Type; + Double_Offset : Double_Index_Type; + + begin + for J in 0 .. N - 1 loop + Offset := Index_Type (Integer (J) + Integer (Index_Type'First)); + Double_Offset := + Double_Index_Type (Integer (J) + + Integer (Double_Index_Type'First)); + D (Offset) := Saturate (A (Double_Offset)); + D (Offset + N) := Saturate (B (Double_Offset)); + end loop; + + return D; + end vpkuxus; + + end Unsigned_Merging_Operations; + + package LL_VSC_Operations is + new Signed_Operations (signed_char, + Vchar_Range, + Varray_signed_char); + + package LL_VSS_Operations is + new Signed_Operations (signed_short, + Vshort_Range, + Varray_signed_short); + + package LL_VSI_Operations is + new Signed_Operations (signed_int, + Vint_Range, + Varray_signed_int); + + package LL_VUC_Operations is + new Unsigned_Operations (unsigned_char, + Vchar_Range, + Varray_unsigned_char); + + package LL_VUS_Operations is + new Unsigned_Operations (unsigned_short, + Vshort_Range, + Varray_unsigned_short); + + package LL_VUI_Operations is + new Unsigned_Operations (unsigned_int, + Vint_Range, + Varray_unsigned_int); + + package LL_VSC_LL_VSS_Operations is + new Signed_Merging_Operations (signed_char, + Vchar_Range, + Varray_signed_char, + signed_short, + Vshort_Range, + Varray_signed_short); + + package LL_VSS_LL_VSI_Operations is + new Signed_Merging_Operations (signed_short, + Vshort_Range, + Varray_signed_short, + signed_int, + Vint_Range, + Varray_signed_int); + + package LL_VUC_LL_VUS_Operations is + new Unsigned_Merging_Operations (unsigned_char, + Vchar_Range, + Varray_unsigned_char, + unsigned_short, + Vshort_Range, + Varray_unsigned_short); + + package LL_VUS_LL_VUI_Operations is + new Unsigned_Merging_Operations (unsigned_short, + Vshort_Range, + Varray_unsigned_short, + unsigned_int, + Vint_Range, + Varray_unsigned_int); + + ---------- + -- Bits -- + ---------- + + function Bits + (X : unsigned_int; + Low : Natural; + High : Natural) return unsigned_int renames LL_VUI_Operations.Bits; + + function Bits + (X : unsigned_short; + Low : Natural; + High : Natural) return unsigned_short renames LL_VUS_Operations.Bits; + + function Bits + (X : unsigned_char; + Low : Natural; + High : Natural) return unsigned_char renames LL_VUC_Operations.Bits; + + --------------- + -- Write_Bit -- + --------------- + + function Write_Bit + (X : unsigned_int; + Where : Natural; + Value : Unsigned_1) return unsigned_int + renames LL_VUI_Operations.Write_Bit; + + function Write_Bit + (X : unsigned_short; + Where : Natural; + Value : Unsigned_1) return unsigned_short + renames LL_VUS_Operations.Write_Bit; + + function Write_Bit + (X : unsigned_char; + Where : Natural; + Value : Unsigned_1) return unsigned_char + renames LL_VUC_Operations.Write_Bit; + + ----------------- + -- Bound_Align -- + ----------------- + + function Bound_Align + (X : Integer_Address; + Y : Integer_Address) return Integer_Address + is + D : Integer_Address; + begin + D := X - X mod Y; + return D; + end Bound_Align; + + ----------------- + -- NJ_Truncate -- + ----------------- + + function NJ_Truncate (X : C_float) return C_float is + D : C_float; + + begin + if (Bits (VSCR, NJ_POS, NJ_POS) = 1) + and then abs (X) < 2.0 ** (-126) + then + if X < 0.0 then + D := -0.0; + else + D := 0.0; + end if; + else + D := X; + end if; + + return D; + end NJ_Truncate; + + ----------------------- + -- Rnd_To_FP_Nearest -- + ----------------------- + + function Rnd_To_FP_Nearest (X : F64) return C_float is + begin + return C_float (X); + end Rnd_To_FP_Nearest; + + --------------------- + -- Rnd_To_FPI_Near -- + --------------------- + + function Rnd_To_FPI_Near (X : F64) return F64 is + Result : F64; + Ceiling : F64; + begin + Result := F64 (SI64 (X)); + + if (F64'Ceiling (X) - X) = (X + 1.0 - F64'Ceiling (X)) then + -- Round to even + Ceiling := F64'Ceiling (X); + if Rnd_To_FPI_Trunc (Ceiling / 2.0) * 2.0 = Ceiling then + Result := Ceiling; + else + Result := Ceiling - 1.0; + end if; + end if; + + return Result; + end Rnd_To_FPI_Near; + + ---------------------- + -- Rnd_To_FPI_Trunc -- + ---------------------- + + function Rnd_To_FPI_Trunc (X : F64) return F64 is + Result : F64; + + begin + Result := F64'Ceiling (X); + + -- Rnd_To_FPI_Trunc rounds toward 0, 'Ceiling rounds toward + -- +Infinity + + if X > 0.0 + and then Result /= X + then + Result := Result - 1.0; + end if; + + return Result; + end Rnd_To_FPI_Trunc; + + ------------------ + -- FP_Recip_Est -- + ------------------ + + function FP_Recip_Est (X : C_float) return C_float is + begin + -- ??? [PIM-4.4 vec_re] "For result that are not +0, -0, +Inf, + -- -Inf, or QNaN, the estimate has a relative error no greater + -- than one part in 4096, that is: + -- Abs ((estimate - 1 / x) / (1 / x)) < = 1/4096" + + return NJ_Truncate (1.0 / NJ_Truncate (X)); + end FP_Recip_Est; + + ---------- + -- ROTL -- + ---------- + + function ROTL + (Value : unsigned_char; + Amount : Natural) return unsigned_char + is + Result : Unsigned_8; + begin + Result := Rotate_Left (Unsigned_8 (Value), Amount); + return unsigned_char (Result); + end ROTL; + + function ROTL + (Value : unsigned_short; + Amount : Natural) return unsigned_short + is + Result : Unsigned_16; + begin + Result := Rotate_Left (Unsigned_16 (Value), Amount); + return unsigned_short (Result); + end ROTL; + + function ROTL + (Value : unsigned_int; + Amount : Natural) return unsigned_int + is + Result : Unsigned_32; + begin + Result := Rotate_Left (Unsigned_32 (Value), Amount); + return unsigned_int (Result); + end ROTL; + + -------------------- + -- Recip_SQRT_Est -- + -------------------- + + function Recip_SQRT_Est (X : C_float) return C_float is + Result : C_float; + + begin + -- ??? + -- [PIM-4.4 vec_rsqrte] the estimate has a relative error in precision + -- no greater than one part in 4096, that is: + -- abs ((estimate - 1 / sqrt (x)) / (1 / sqrt (x)) <= 1 / 4096" + + Result := 1.0 / NJ_Truncate (C_float_Operations.Sqrt (NJ_Truncate (X))); + return NJ_Truncate (Result); + end Recip_SQRT_Est; + + ---------------- + -- Shift_Left -- + ---------------- + + function Shift_Left + (Value : unsigned_char; + Amount : Natural) return unsigned_char + is + Result : Unsigned_8; + begin + Result := Shift_Left (Unsigned_8 (Value), Amount); + return unsigned_char (Result); + end Shift_Left; + + function Shift_Left + (Value : unsigned_short; + Amount : Natural) return unsigned_short + is + Result : Unsigned_16; + begin + Result := Shift_Left (Unsigned_16 (Value), Amount); + return unsigned_short (Result); + end Shift_Left; + + function Shift_Left + (Value : unsigned_int; + Amount : Natural) return unsigned_int + is + Result : Unsigned_32; + begin + Result := Shift_Left (Unsigned_32 (Value), Amount); + return unsigned_int (Result); + end Shift_Left; + + ----------------- + -- Shift_Right -- + ----------------- + + function Shift_Right + (Value : unsigned_char; + Amount : Natural) return unsigned_char + is + Result : Unsigned_8; + begin + Result := Shift_Right (Unsigned_8 (Value), Amount); + return unsigned_char (Result); + end Shift_Right; + + function Shift_Right + (Value : unsigned_short; + Amount : Natural) return unsigned_short + is + Result : Unsigned_16; + begin + Result := Shift_Right (Unsigned_16 (Value), Amount); + return unsigned_short (Result); + end Shift_Right; + + function Shift_Right + (Value : unsigned_int; + Amount : Natural) return unsigned_int + is + Result : Unsigned_32; + begin + Result := Shift_Right (Unsigned_32 (Value), Amount); + return unsigned_int (Result); + end Shift_Right; + + ------------------- + -- Shift_Right_A -- + ------------------- + + generic + type Signed_Type is range <>; + type Unsigned_Type is mod <>; + with function Shift_Right (Value : Unsigned_Type; Amount : Natural) + return Unsigned_Type; + function Shift_Right_Arithmetic + (Value : Signed_Type; + Amount : Natural) return Signed_Type; + + function Shift_Right_Arithmetic + (Value : Signed_Type; + Amount : Natural) return Signed_Type + is + begin + if Value > 0 then + return Signed_Type (Shift_Right (Unsigned_Type (Value), Amount)); + else + return -Signed_Type (Shift_Right (Unsigned_Type (-Value - 1), Amount) + + 1); + end if; + end Shift_Right_Arithmetic; + + function Shift_Right_A is new Shift_Right_Arithmetic (signed_int, + Unsigned_32, + Shift_Right); + + function Shift_Right_A is new Shift_Right_Arithmetic (signed_short, + Unsigned_16, + Shift_Right); + + function Shift_Right_A is new Shift_Right_Arithmetic (signed_char, + Unsigned_8, + Shift_Right); + -------------- + -- To_Pixel -- + -------------- + + function To_Pixel (Source : unsigned_short) return Pixel_16 is + + -- This conversion should not depend on the host endianess; + -- therefore, we cannot use an unchecked conversion. + + Target : Pixel_16; + + begin + Target.T := Unsigned_1 (Bits (Source, 0, 0) mod 2 ** 1); + Target.R := Unsigned_5 (Bits (Source, 1, 5) mod 2 ** 5); + Target.G := Unsigned_5 (Bits (Source, 6, 10) mod 2 ** 5); + Target.B := Unsigned_5 (Bits (Source, 11, 15) mod 2 ** 5); + return Target; + end To_Pixel; + + function To_Pixel (Source : unsigned_int) return Pixel_32 is + + -- This conversion should not depend on the host endianess; + -- therefore, we cannot use an unchecked conversion. + + Target : Pixel_32; + + begin + Target.T := unsigned_char (Bits (Source, 0, 7)); + Target.R := unsigned_char (Bits (Source, 8, 15)); + Target.G := unsigned_char (Bits (Source, 16, 23)); + Target.B := unsigned_char (Bits (Source, 24, 31)); + return Target; + end To_Pixel; + + --------------------- + -- To_unsigned_int -- + --------------------- + + function To_unsigned_int (Source : Pixel_32) return unsigned_int is + + -- This conversion should not depend on the host endianess; + -- therefore, we cannot use an unchecked conversion. + -- It should also be the same result, value-wise, on two hosts + -- with the same endianess. + + Target : unsigned_int := 0; + + begin + -- In big endian bit ordering, Pixel_32 looks like: + -- ------------------------------------- + -- | T | R | G | B | + -- ------------------------------------- + -- 0 (MSB) 7 15 23 32 + -- + -- Sizes of the components: (8/8/8/8) + -- + Target := Target or unsigned_int (Source.T); + Target := Shift_Left (Target, 8); + Target := Target or unsigned_int (Source.R); + Target := Shift_Left (Target, 8); + Target := Target or unsigned_int (Source.G); + Target := Shift_Left (Target, 8); + Target := Target or unsigned_int (Source.B); + return Target; + end To_unsigned_int; + + ----------------------- + -- To_unsigned_short -- + ----------------------- + + function To_unsigned_short (Source : Pixel_16) return unsigned_short is + + -- This conversion should not depend on the host endianess; + -- therefore, we cannot use an unchecked conversion. + -- It should also be the same result, value-wise, on two hosts + -- with the same endianess. + + Target : unsigned_short := 0; + + begin + -- In big endian bit ordering, Pixel_16 looks like: + -- ------------------------------------- + -- | T | R | G | B | + -- ------------------------------------- + -- 0 (MSB) 1 5 11 15 + -- + -- Sizes of the components: (1/5/5/5) + -- + Target := Target or unsigned_short (Source.T); + Target := Shift_Left (Target, 5); + Target := Target or unsigned_short (Source.R); + Target := Shift_Left (Target, 5); + Target := Target or unsigned_short (Source.G); + Target := Shift_Left (Target, 5); + Target := Target or unsigned_short (Source.B); + return Target; + end To_unsigned_short; + + --------------- + -- abs_v16qi -- + --------------- + + function abs_v16qi (A : LL_VSC) return LL_VSC is + VA : constant VSC_View := To_View (A); + begin + return To_Vector ((Values => + LL_VSC_Operations.abs_vxi (VA.Values))); + end abs_v16qi; + + -------------- + -- abs_v8hi -- + -------------- + + function abs_v8hi (A : LL_VSS) return LL_VSS is + VA : constant VSS_View := To_View (A); + begin + return To_Vector ((Values => + LL_VSS_Operations.abs_vxi (VA.Values))); + end abs_v8hi; + + -------------- + -- abs_v4si -- + -------------- + + function abs_v4si (A : LL_VSI) return LL_VSI is + VA : constant VSI_View := To_View (A); + begin + return To_Vector ((Values => + LL_VSI_Operations.abs_vxi (VA.Values))); + end abs_v4si; + + -------------- + -- abs_v4sf -- + -------------- + + function abs_v4sf (A : LL_VF) return LL_VF is + D : Varray_float; + VA : constant VF_View := To_View (A); + + begin + for J in Varray_float'Range loop + D (J) := abs (VA.Values (J)); + end loop; + + return To_Vector ((Values => D)); + end abs_v4sf; + + ---------------- + -- abss_v16qi -- + ---------------- + + function abss_v16qi (A : LL_VSC) return LL_VSC is + VA : constant VSC_View := To_View (A); + begin + return To_Vector ((Values => + LL_VSC_Operations.abss_vxi (VA.Values))); + end abss_v16qi; + + --------------- + -- abss_v8hi -- + --------------- + + function abss_v8hi (A : LL_VSS) return LL_VSS is + VA : constant VSS_View := To_View (A); + begin + return To_Vector ((Values => + LL_VSS_Operations.abss_vxi (VA.Values))); + end abss_v8hi; + + --------------- + -- abss_v4si -- + --------------- + + function abss_v4si (A : LL_VSI) return LL_VSI is + VA : constant VSI_View := To_View (A); + begin + return To_Vector ((Values => + LL_VSI_Operations.abss_vxi (VA.Values))); + end abss_v4si; + + ------------- + -- vaddubm -- + ------------- + + function vaddubm (A : LL_VSC; B : LL_VSC) return LL_VSC is + UC : constant GNAT.Altivec.Low_Level_Vectors.LL_VUC := + To_LL_VUC (A); + VA : constant VUC_View := + To_View (UC); + VB : constant VUC_View := To_View (To_LL_VUC (B)); + D : Varray_unsigned_char; + + begin + D := LL_VUC_Operations.vadduxm (VA.Values, VB.Values); + return To_LL_VSC (To_Vector (VUC_View'(Values => D))); + end vaddubm; + + ------------- + -- vadduhm -- + ------------- + + function vadduhm (A : LL_VSS; B : LL_VSS) return LL_VSS is + VA : constant VUS_View := To_View (To_LL_VUS (A)); + VB : constant VUS_View := To_View (To_LL_VUS (B)); + D : Varray_unsigned_short; + + begin + D := LL_VUS_Operations.vadduxm (VA.Values, VB.Values); + return To_LL_VSS (To_Vector (VUS_View'(Values => D))); + end vadduhm; + + ------------- + -- vadduwm -- + ------------- + + function vadduwm (A : LL_VSI; B : LL_VSI) return LL_VSI is + VA : constant VUI_View := To_View (To_LL_VUI (A)); + VB : constant VUI_View := To_View (To_LL_VUI (B)); + D : Varray_unsigned_int; + + begin + D := LL_VUI_Operations.vadduxm (VA.Values, VB.Values); + return To_LL_VSI (To_Vector (VUI_View'(Values => D))); + end vadduwm; + + ------------ + -- vaddfp -- + ------------ + + function vaddfp (A : LL_VF; B : LL_VF) return LL_VF is + VA : constant VF_View := To_View (A); + VB : constant VF_View := To_View (B); + D : Varray_float; + + begin + for J in Varray_float'Range loop + D (J) := NJ_Truncate (NJ_Truncate (VA.Values (J)) + + NJ_Truncate (VB.Values (J))); + end loop; + + return To_Vector (VF_View'(Values => D)); + end vaddfp; + + ------------- + -- vaddcuw -- + ------------- + + function vaddcuw (A : LL_VSI; B : LL_VSI) return LL_VSI is + Addition_Result : UI64; + D : VUI_View; + VA : constant VUI_View := To_View (To_LL_VUI (A)); + VB : constant VUI_View := To_View (To_LL_VUI (B)); + + begin + for J in Varray_unsigned_int'Range loop + Addition_Result := + UI64 (VA.Values (J)) + UI64 (VB.Values (J)); + + if Addition_Result > UI64 (unsigned_int'Last) then + D.Values (J) := 1; + else + D.Values (J) := 0; + end if; + end loop; + + return To_LL_VSI (To_Vector (D)); + end vaddcuw; + + ------------- + -- vaddubs -- + ------------- + + function vaddubs (A : LL_VSC; B : LL_VSC) return LL_VSC is + VA : constant VUC_View := To_View (To_LL_VUC (A)); + VB : constant VUC_View := To_View (To_LL_VUC (B)); + + begin + return To_LL_VSC (To_Vector + (VUC_View'(Values => + (LL_VUC_Operations.vadduxs + (VA.Values, + VB.Values))))); + end vaddubs; + + ------------- + -- vaddsbs -- + ------------- + + function vaddsbs (A : LL_VSC; B : LL_VSC) return LL_VSC is + VA : constant VSC_View := To_View (A); + VB : constant VSC_View := To_View (B); + D : VSC_View; + + begin + D.Values := LL_VSC_Operations.vaddsxs (VA.Values, VB.Values); + return To_Vector (D); + end vaddsbs; + + ------------- + -- vadduhs -- + ------------- + + function vadduhs (A : LL_VSS; B : LL_VSS) return LL_VSS is + VA : constant VUS_View := To_View (To_LL_VUS (A)); + VB : constant VUS_View := To_View (To_LL_VUS (B)); + D : VUS_View; + + begin + D.Values := LL_VUS_Operations.vadduxs (VA.Values, VB.Values); + return To_LL_VSS (To_Vector (D)); + end vadduhs; + + ------------- + -- vaddshs -- + ------------- + + function vaddshs (A : LL_VSS; B : LL_VSS) return LL_VSS is + VA : constant VSS_View := To_View (A); + VB : constant VSS_View := To_View (B); + D : VSS_View; + + begin + D.Values := LL_VSS_Operations.vaddsxs (VA.Values, VB.Values); + return To_Vector (D); + end vaddshs; + + ------------- + -- vadduws -- + ------------- + + function vadduws (A : LL_VSI; B : LL_VSI) return LL_VSI is + VA : constant VUI_View := To_View (To_LL_VUI (A)); + VB : constant VUI_View := To_View (To_LL_VUI (B)); + D : VUI_View; + + begin + D.Values := LL_VUI_Operations.vadduxs (VA.Values, VB.Values); + return To_LL_VSI (To_Vector (D)); + end vadduws; + + ------------- + -- vaddsws -- + ------------- + + function vaddsws (A : LL_VSI; B : LL_VSI) return LL_VSI is + VA : constant VSI_View := To_View (A); + VB : constant VSI_View := To_View (B); + D : VSI_View; + + begin + D.Values := LL_VSI_Operations.vaddsxs (VA.Values, VB.Values); + return To_Vector (D); + end vaddsws; + + ---------- + -- vand -- + ---------- + + function vand (A : LL_VSI; B : LL_VSI) return LL_VSI is + VA : constant VUI_View := To_View (To_LL_VUI (A)); + VB : constant VUI_View := To_View (To_LL_VUI (B)); + D : VUI_View; + + begin + for J in Varray_unsigned_int'Range loop + D.Values (J) := VA.Values (J) and VB.Values (J); + end loop; + + return To_LL_VSI (To_Vector (D)); + end vand; + + ----------- + -- vandc -- + ----------- + + function vandc (A : LL_VSI; B : LL_VSI) return LL_VSI is + VA : constant VUI_View := To_View (To_LL_VUI (A)); + VB : constant VUI_View := To_View (To_LL_VUI (B)); + D : VUI_View; + + begin + for J in Varray_unsigned_int'Range loop + D.Values (J) := VA.Values (J) and not VB.Values (J); + end loop; + + return To_LL_VSI (To_Vector (D)); + end vandc; + + ------------ + -- vavgub -- + ------------ + + function vavgub (A : LL_VSC; B : LL_VSC) return LL_VSC is + VA : constant VUC_View := To_View (To_LL_VUC (A)); + VB : constant VUC_View := To_View (To_LL_VUC (B)); + D : VUC_View; + + begin + D.Values := LL_VUC_Operations.vavgux (VA.Values, VB.Values); + return To_LL_VSC (To_Vector (D)); + end vavgub; + + ------------ + -- vavgsb -- + ------------ + + function vavgsb (A : LL_VSC; B : LL_VSC) return LL_VSC is + VA : constant VSC_View := To_View (A); + VB : constant VSC_View := To_View (B); + D : VSC_View; + + begin + D.Values := LL_VSC_Operations.vavgsx (VA.Values, VB.Values); + return To_Vector (D); + end vavgsb; + + ------------ + -- vavguh -- + ------------ + + function vavguh (A : LL_VSS; B : LL_VSS) return LL_VSS is + VA : constant VUS_View := To_View (To_LL_VUS (A)); + VB : constant VUS_View := To_View (To_LL_VUS (B)); + D : VUS_View; + + begin + D.Values := LL_VUS_Operations.vavgux (VA.Values, VB.Values); + return To_LL_VSS (To_Vector (D)); + end vavguh; + + ------------ + -- vavgsh -- + ------------ + + function vavgsh (A : LL_VSS; B : LL_VSS) return LL_VSS is + VA : constant VSS_View := To_View (A); + VB : constant VSS_View := To_View (B); + D : VSS_View; + + begin + D.Values := LL_VSS_Operations.vavgsx (VA.Values, VB.Values); + return To_Vector (D); + end vavgsh; + + ------------ + -- vavguw -- + ------------ + + function vavguw (A : LL_VSI; B : LL_VSI) return LL_VSI is + VA : constant VUI_View := To_View (To_LL_VUI (A)); + VB : constant VUI_View := To_View (To_LL_VUI (B)); + D : VUI_View; + + begin + D.Values := LL_VUI_Operations.vavgux (VA.Values, VB.Values); + return To_LL_VSI (To_Vector (D)); + end vavguw; + + ------------ + -- vavgsw -- + ------------ + + function vavgsw (A : LL_VSI; B : LL_VSI) return LL_VSI is + VA : constant VSI_View := To_View (A); + VB : constant VSI_View := To_View (B); + D : VSI_View; + + begin + D.Values := LL_VSI_Operations.vavgsx (VA.Values, VB.Values); + return To_Vector (D); + end vavgsw; + + ----------- + -- vrfip -- + ----------- + + function vrfip (A : LL_VF) return LL_VF is + VA : constant VF_View := To_View (A); + D : VF_View; + + begin + for J in Varray_float'Range loop + + -- If A (J) is infinite, D (J) should be infinite; With + -- IEEE floating points, we can use 'Ceiling for that purpose. + + D.Values (J) := C_float'Ceiling (NJ_Truncate (VA.Values (J))); + + end loop; + + return To_Vector (D); + end vrfip; + + ------------- + -- vcmpbfp -- + ------------- + + function vcmpbfp (A : LL_VF; B : LL_VF) return LL_VSI is + VA : constant VF_View := To_View (A); + VB : constant VF_View := To_View (B); + D : VUI_View; + K : Vint_Range; + + begin + for J in Varray_float'Range loop + K := Vint_Range (J); + D.Values (K) := 0; + + if NJ_Truncate (VB.Values (J)) < 0.0 then + + -- [PIM-4.4 vec_cmpb] "If any single-precision floating-point + -- word element in B is negative; the corresponding element in A + -- is out of bounds. + + D.Values (K) := Write_Bit (D.Values (K), 0, 1); + D.Values (K) := Write_Bit (D.Values (K), 1, 1); + + else + if NJ_Truncate (VA.Values (J)) + <= NJ_Truncate (VB.Values (J)) then + D.Values (K) := Write_Bit (D.Values (K), 0, 0); + else + D.Values (K) := Write_Bit (D.Values (K), 0, 1); + end if; + + if NJ_Truncate (VA.Values (J)) + >= -NJ_Truncate (VB.Values (J)) then + D.Values (K) := Write_Bit (D.Values (K), 1, 0); + else + D.Values (K) := Write_Bit (D.Values (K), 1, 1); + end if; + end if; + end loop; + + return To_LL_VSI (To_Vector (D)); + end vcmpbfp; + + -------------- + -- vcmpequb -- + -------------- + + function vcmpequb (A : LL_VSC; B : LL_VSC) return LL_VSC is + VA : constant VUC_View := To_View (To_LL_VUC (A)); + VB : constant VUC_View := To_View (To_LL_VUC (B)); + D : VUC_View; + + begin + D.Values := LL_VUC_Operations.vcmpequx (VA.Values, VB.Values); + return To_LL_VSC (To_Vector (D)); + end vcmpequb; + + -------------- + -- vcmpequh -- + -------------- + + function vcmpequh (A : LL_VSS; B : LL_VSS) return LL_VSS is + VA : constant VUS_View := To_View (To_LL_VUS (A)); + VB : constant VUS_View := To_View (To_LL_VUS (B)); + D : VUS_View; + begin + D.Values := LL_VUS_Operations.vcmpequx (VA.Values, VB.Values); + return To_LL_VSS (To_Vector (D)); + end vcmpequh; + + -------------- + -- vcmpequw -- + -------------- + + function vcmpequw (A : LL_VSI; B : LL_VSI) return LL_VSI is + VA : constant VUI_View := To_View (To_LL_VUI (A)); + VB : constant VUI_View := To_View (To_LL_VUI (B)); + D : VUI_View; + begin + D.Values := LL_VUI_Operations.vcmpequx (VA.Values, VB.Values); + return To_LL_VSI (To_Vector (D)); + end vcmpequw; + + -------------- + -- vcmpeqfp -- + -------------- + + function vcmpeqfp (A : LL_VF; B : LL_VF) return LL_VSI is + VA : constant VF_View := To_View (A); + VB : constant VF_View := To_View (B); + D : VUI_View; + K : Vint_Range; + + begin + for J in Varray_float'Range loop + K := Vint_Range (J); + + if VA.Values (J) = VB.Values (J) then + D.Values (K) := unsigned_int'Last; + else + D.Values (K) := 0; + end if; + end loop; + + return To_LL_VSI (To_Vector (D)); + end vcmpeqfp; + + -------------- + -- vcmpgefp -- + -------------- + + function vcmpgefp (A : LL_VF; B : LL_VF) return LL_VSI is + VA : constant VF_View := To_View (A); + VB : constant VF_View := To_View (B); + D : VSI_View; + K : Vint_Range; + + begin + for J in Varray_float'Range loop + K := Vint_Range (J); + + if VA.Values (J) >= VB.Values (J) then + D.Values (K) := Signed_Bool_True; + else + D.Values (K) := Signed_Bool_False; + end if; + end loop; + + return To_Vector (D); + end vcmpgefp; + + -------------- + -- vcmpgtub -- + -------------- + + function vcmpgtub (A : LL_VSC; B : LL_VSC) return LL_VSC is + VA : constant VUC_View := To_View (To_LL_VUC (A)); + VB : constant VUC_View := To_View (To_LL_VUC (B)); + D : VUC_View; + begin + D.Values := LL_VUC_Operations.vcmpgtux (VA.Values, VB.Values); + return To_LL_VSC (To_Vector (D)); + end vcmpgtub; + + -------------- + -- vcmpgtsb -- + -------------- + + function vcmpgtsb (A : LL_VSC; B : LL_VSC) return LL_VSC is + VA : constant VSC_View := To_View (A); + VB : constant VSC_View := To_View (B); + D : VSC_View; + begin + D.Values := LL_VSC_Operations.vcmpgtsx (VA.Values, VB.Values); + return To_Vector (D); + end vcmpgtsb; + + -------------- + -- vcmpgtuh -- + -------------- + + function vcmpgtuh (A : LL_VSS; B : LL_VSS) return LL_VSS is + VA : constant VUS_View := To_View (To_LL_VUS (A)); + VB : constant VUS_View := To_View (To_LL_VUS (B)); + D : VUS_View; + begin + D.Values := LL_VUS_Operations.vcmpgtux (VA.Values, VB.Values); + return To_LL_VSS (To_Vector (D)); + end vcmpgtuh; + + -------------- + -- vcmpgtsh -- + -------------- + + function vcmpgtsh (A : LL_VSS; B : LL_VSS) return LL_VSS is + VA : constant VSS_View := To_View (A); + VB : constant VSS_View := To_View (B); + D : VSS_View; + begin + D.Values := LL_VSS_Operations.vcmpgtsx (VA.Values, VB.Values); + return To_Vector (D); + end vcmpgtsh; + + -------------- + -- vcmpgtuw -- + -------------- + + function vcmpgtuw (A : LL_VSI; B : LL_VSI) return LL_VSI is + VA : constant VUI_View := To_View (To_LL_VUI (A)); + VB : constant VUI_View := To_View (To_LL_VUI (B)); + D : VUI_View; + begin + D.Values := LL_VUI_Operations.vcmpgtux (VA.Values, VB.Values); + return To_LL_VSI (To_Vector (D)); + end vcmpgtuw; + + -------------- + -- vcmpgtsw -- + -------------- + + function vcmpgtsw (A : LL_VSI; B : LL_VSI) return LL_VSI is + VA : constant VSI_View := To_View (A); + VB : constant VSI_View := To_View (B); + D : VSI_View; + begin + D.Values := LL_VSI_Operations.vcmpgtsx (VA.Values, VB.Values); + return To_Vector (D); + end vcmpgtsw; + + -------------- + -- vcmpgtfp -- + -------------- + + function vcmpgtfp (A : LL_VF; B : LL_VF) return LL_VSI is + VA : constant VF_View := To_View (A); + VB : constant VF_View := To_View (B); + D : VSI_View; + K : Vint_Range; + + begin + for J in Varray_float'Range loop + K := Vint_Range (J); + + if NJ_Truncate (VA.Values (J)) + > NJ_Truncate (VB.Values (J)) then + D.Values (K) := Signed_Bool_True; + else + D.Values (K) := Signed_Bool_False; + end if; + end loop; + + return To_Vector (D); + end vcmpgtfp; + + ----------- + -- vcfux -- + ----------- + + function vcfux (A : LL_VSI; B : c_int) return LL_VF is + D : VF_View; + VA : constant VUI_View := To_View (To_LL_VUI (A)); + K : Vfloat_Range; + + begin + for J in Varray_signed_int'Range loop + K := Vfloat_Range (J); + + -- Note: The conversion to Integer is safe, as Integers are required + -- to include the range -2 ** 15 + 1 .. 2 ** 15 + 1 and therefore + -- include the range of B (should be 0 .. 255). + + D.Values (K) := + C_float (VA.Values (J)) / (2.0 ** Integer (B)); + end loop; + + return To_Vector (D); + end vcfux; + + ----------- + -- vcfsx -- + ----------- + + function vcfsx (A : LL_VSI; B : c_int) return LL_VF is + VA : constant VSI_View := To_View (A); + D : VF_View; + K : Vfloat_Range; + + begin + for J in Varray_signed_int'Range loop + K := Vfloat_Range (J); + D.Values (K) := C_float (VA.Values (J)) + / (2.0 ** Integer (B)); + end loop; + + return To_Vector (D); + end vcfsx; + + ------------ + -- vctsxs -- + ------------ + + function vctsxs (A : LL_VF; B : c_int) return LL_VSI is + VA : constant VF_View := To_View (A); + D : VSI_View; + K : Vfloat_Range; + + begin + for J in Varray_signed_int'Range loop + K := Vfloat_Range (J); + D.Values (J) := + LL_VSI_Operations.Saturate + (F64 (NJ_Truncate (VA.Values (K))) + * F64 (2.0 ** Integer (B))); + end loop; + + return To_Vector (D); + end vctsxs; + + ------------ + -- vctuxs -- + ------------ + + function vctuxs (A : LL_VF; B : c_int) return LL_VSI is + VA : constant VF_View := To_View (A); + D : VUI_View; + K : Vfloat_Range; + + begin + for J in Varray_unsigned_int'Range loop + K := Vfloat_Range (J); + D.Values (J) := + LL_VUI_Operations.Saturate + (F64 (NJ_Truncate (VA.Values (K))) + * F64 (2.0 ** Integer (B))); + end loop; + + return To_LL_VSI (To_Vector (D)); + end vctuxs; + + --------- + -- dss -- + --------- + + -- No-ops, as allowed by [PEM-5.2.1.1 Data Stream Touch (dst)]: + + procedure dss (A : c_int) is + pragma Unreferenced (A); + begin + null; + end dss; + + ------------ + -- dssall -- + ------------ + + -- No-ops, as allowed by [PEM-5.2.1.1 Data Stream Touch (dst)]: + + procedure dssall is + begin + null; + end dssall; + + --------- + -- dst -- + --------- + + -- No-ops, as allowed by [PEM-5.2.1.1 Data Stream Touch (dst)]: + + procedure dst (A : c_ptr; B : c_int; C : c_int) is + pragma Unreferenced (A); + pragma Unreferenced (B); + pragma Unreferenced (C); + begin + null; + end dst; + + ----------- + -- dstst -- + ----------- + + -- No-ops, as allowed by [PEM-5.2.1.1 Data Stream Touch (dst)]: + + procedure dstst (A : c_ptr; B : c_int; C : c_int) is + pragma Unreferenced (A); + pragma Unreferenced (B); + pragma Unreferenced (C); + begin + null; + end dstst; + + ------------ + -- dststt -- + ------------ + + -- No-ops, as allowed by [PEM-5.2.1.1 Data Stream Touch (dst)]: + + procedure dststt (A : c_ptr; B : c_int; C : c_int) is + pragma Unreferenced (A); + pragma Unreferenced (B); + pragma Unreferenced (C); + begin + null; + end dststt; + + ---------- + -- dstt -- + ---------- + + -- No-ops, as allowed by [PEM-5.2.1.1 Data Stream Touch (dst)]: + + procedure dstt (A : c_ptr; B : c_int; C : c_int) is + pragma Unreferenced (A); + pragma Unreferenced (B); + pragma Unreferenced (C); + begin + null; + end dstt; + + -------------- + -- vexptefp -- + -------------- + + function vexptefp (A : LL_VF) return LL_VF is + use C_float_Operations; + + VA : constant VF_View := To_View (A); + D : VF_View; + + begin + for J in Varray_float'Range loop + + -- ??? Check the precision of the operation. + -- As described in [PEM-6 vexptefp]: + -- If theorical_result is equal to 2 at the power of A (J) with + -- infinite precision, we should have: + -- abs ((D (J) - theorical_result) / theorical_result) <= 1/16 + + D.Values (J) := 2.0 ** NJ_Truncate (VA.Values (J)); + end loop; + + return To_Vector (D); + end vexptefp; + + ----------- + -- vrfim -- + ----------- + + function vrfim (A : LL_VF) return LL_VF is + VA : constant VF_View := To_View (A); + D : VF_View; + + begin + for J in Varray_float'Range loop + + -- If A (J) is infinite, D (J) should be infinite; With + -- IEEE floating point, we can use 'Ceiling for that purpose. + + D.Values (J) := C_float'Ceiling (NJ_Truncate (VA.Values (J))); + + -- Vrfim rounds toward -Infinity, whereas 'Ceiling rounds toward + -- +Infinity: + + if D.Values (J) /= VA.Values (J) then + D.Values (J) := D.Values (J) - 1.0; + end if; + end loop; + + return To_Vector (D); + end vrfim; + + --------- + -- lvx -- + --------- + + function lvx (A : c_long; B : c_ptr) return LL_VSI is + EA : Integer_Address; + + begin + EA := Bound_Align (Integer_Address (A) + To_Integer (B), 16); + + declare + D : LL_VSI; + for D'Address use To_Address (EA); + begin + return D; + end; + end lvx; + + ----------- + -- lvebx -- + ----------- + + function lvebx (A : c_long; B : c_ptr) return LL_VSC is + D : VSC_View; + begin + D.Values := LL_VSC_Operations.lvexx (A, B); + return To_Vector (D); + end lvebx; + + ----------- + -- lvehx -- + ----------- + + function lvehx (A : c_long; B : c_ptr) return LL_VSS is + D : VSS_View; + begin + D.Values := LL_VSS_Operations.lvexx (A, B); + return To_Vector (D); + end lvehx; + + ----------- + -- lvewx -- + ----------- + + function lvewx (A : c_long; B : c_ptr) return LL_VSI is + D : VSI_View; + begin + D.Values := LL_VSI_Operations.lvexx (A, B); + return To_Vector (D); + end lvewx; + + ---------- + -- lvxl -- + ---------- + + function lvxl (A : c_long; B : c_ptr) return LL_VSI renames + lvx; + + ------------- + -- vlogefp -- + ------------- + + function vlogefp (A : LL_VF) return LL_VF is + VA : constant VF_View := To_View (A); + D : VF_View; + + begin + for J in Varray_float'Range loop + + -- ??? Check the precision of the operation. + -- As described in [PEM-6 vlogefp]: + -- If theorical_result is equal to the log2 of A (J) with + -- infinite precision, we should have: + -- abs (D (J) - theorical_result) <= 1/32, + -- unless abs(D(J) - 1) <= 1/8. + + D.Values (J) := + C_float_Operations.Log (NJ_Truncate (VA.Values (J)), 2.0); + end loop; + + return To_Vector (D); + end vlogefp; + + ---------- + -- lvsl -- + ---------- + + function lvsl (A : c_long; B : c_ptr) return LL_VSC is + type bit4_type is mod 16#F# + 1; + for bit4_type'Alignment use 1; + EA : Integer_Address; + D : VUC_View; + SH : bit4_type; + + begin + EA := Integer_Address (A) + To_Integer (B); + SH := bit4_type (EA mod 2 ** 4); + + for J in D.Values'Range loop + D.Values (J) := unsigned_char (SH) + unsigned_char (J) + - unsigned_char (D.Values'First); + end loop; + + return To_LL_VSC (To_Vector (D)); + end lvsl; + + ---------- + -- lvsr -- + ---------- + + function lvsr (A : c_long; B : c_ptr) return LL_VSC is + type bit4_type is mod 16#F# + 1; + for bit4_type'Alignment use 1; + EA : Integer_Address; + D : VUC_View; + SH : bit4_type; + + begin + EA := Integer_Address (A) + To_Integer (B); + SH := bit4_type (EA mod 2 ** 4); + + for J in D.Values'Range loop + D.Values (J) := (16#F# - unsigned_char (SH)) + unsigned_char (J); + end loop; + + return To_LL_VSC (To_Vector (D)); + end lvsr; + + ------------- + -- vmaddfp -- + ------------- + + function vmaddfp (A : LL_VF; B : LL_VF; C : LL_VF) return LL_VF is + VA : constant VF_View := To_View (A); + VB : constant VF_View := To_View (B); + VC : constant VF_View := To_View (C); + D : VF_View; + + begin + for J in Varray_float'Range loop + D.Values (J) := + Rnd_To_FP_Nearest (F64 (VA.Values (J)) + * F64 (VB.Values (J)) + + F64 (VC.Values (J))); + end loop; + + return To_Vector (D); + end vmaddfp; + + --------------- + -- vmhaddshs -- + --------------- + + function vmhaddshs (A : LL_VSS; B : LL_VSS; C : LL_VSS) return LL_VSS is + VA : constant VSS_View := To_View (A); + VB : constant VSS_View := To_View (B); + VC : constant VSS_View := To_View (C); + D : VSS_View; + + begin + for J in Varray_signed_short'Range loop + D.Values (J) := LL_VSS_Operations.Saturate + ((SI64 (VA.Values (J)) * SI64 (VB.Values (J))) + / SI64 (2 ** 15) + SI64 (VC.Values (J))); + end loop; + + return To_Vector (D); + end vmhaddshs; + + ------------ + -- vmaxub -- + ------------ + + function vmaxub (A : LL_VSC; B : LL_VSC) return LL_VSC is + VA : constant VUC_View := To_View (To_LL_VUC (A)); + VB : constant VUC_View := To_View (To_LL_VUC (B)); + D : VUC_View; + begin + D.Values := LL_VUC_Operations.vmaxux (VA.Values, VB.Values); + return To_LL_VSC (To_Vector (D)); + end vmaxub; + + ------------ + -- vmaxsb -- + ------------ + + function vmaxsb (A : LL_VSC; B : LL_VSC) return LL_VSC is + VA : constant VSC_View := To_View (A); + VB : constant VSC_View := To_View (B); + D : VSC_View; + begin + D.Values := LL_VSC_Operations.vmaxsx (VA.Values, VB.Values); + return To_Vector (D); + end vmaxsb; + + ------------ + -- vmaxuh -- + ------------ + + function vmaxuh (A : LL_VSS; B : LL_VSS) return LL_VSS is + VA : constant VUS_View := To_View (To_LL_VUS (A)); + VB : constant VUS_View := To_View (To_LL_VUS (B)); + D : VUS_View; + begin + D.Values := LL_VUS_Operations.vmaxux (VA.Values, VB.Values); + return To_LL_VSS (To_Vector (D)); + end vmaxuh; + + ------------ + -- vmaxsh -- + ------------ + + function vmaxsh (A : LL_VSS; B : LL_VSS) return LL_VSS is + VA : constant VSS_View := To_View (A); + VB : constant VSS_View := To_View (B); + D : VSS_View; + begin + D.Values := LL_VSS_Operations.vmaxsx (VA.Values, VB.Values); + return To_Vector (D); + end vmaxsh; + + ------------ + -- vmaxuw -- + ------------ + + function vmaxuw (A : LL_VSI; B : LL_VSI) return LL_VSI is + VA : constant VUI_View := To_View (To_LL_VUI (A)); + VB : constant VUI_View := To_View (To_LL_VUI (B)); + D : VUI_View; + begin + D.Values := LL_VUI_Operations.vmaxux (VA.Values, VB.Values); + return To_LL_VSI (To_Vector (D)); + end vmaxuw; + + ------------ + -- vmaxsw -- + ------------ + + function vmaxsw (A : LL_VSI; B : LL_VSI) return LL_VSI is + VA : constant VSI_View := To_View (A); + VB : constant VSI_View := To_View (B); + D : VSI_View; + begin + D.Values := LL_VSI_Operations.vmaxsx (VA.Values, VB.Values); + return To_Vector (D); + end vmaxsw; + + -------------- + -- vmaxsxfp -- + -------------- + + function vmaxfp (A : LL_VF; B : LL_VF) return LL_VF is + VA : constant VF_View := To_View (A); + VB : constant VF_View := To_View (B); + D : VF_View; + + begin + for J in Varray_float'Range loop + if VA.Values (J) > VB.Values (J) then + D.Values (J) := VA.Values (J); + else + D.Values (J) := VB.Values (J); + end if; + end loop; + + return To_Vector (D); + end vmaxfp; + + ------------ + -- vmrghb -- + ------------ + + function vmrghb (A : LL_VSC; B : LL_VSC) return LL_VSC is + VA : constant VSC_View := To_View (A); + VB : constant VSC_View := To_View (B); + D : VSC_View; + begin + D.Values := LL_VSC_Operations.vmrghx (VA.Values, VB.Values); + return To_Vector (D); + end vmrghb; + + ------------ + -- vmrghh -- + ------------ + + function vmrghh (A : LL_VSS; B : LL_VSS) return LL_VSS is + VA : constant VSS_View := To_View (A); + VB : constant VSS_View := To_View (B); + D : VSS_View; + begin + D.Values := LL_VSS_Operations.vmrghx (VA.Values, VB.Values); + return To_Vector (D); + end vmrghh; + + ------------ + -- vmrghw -- + ------------ + + function vmrghw (A : LL_VSI; B : LL_VSI) return LL_VSI is + VA : constant VSI_View := To_View (A); + VB : constant VSI_View := To_View (B); + D : VSI_View; + begin + D.Values := LL_VSI_Operations.vmrghx (VA.Values, VB.Values); + return To_Vector (D); + end vmrghw; + + ------------ + -- vmrglb -- + ------------ + + function vmrglb (A : LL_VSC; B : LL_VSC) return LL_VSC is + VA : constant VSC_View := To_View (A); + VB : constant VSC_View := To_View (B); + D : VSC_View; + begin + D.Values := LL_VSC_Operations.vmrglx (VA.Values, VB.Values); + return To_Vector (D); + end vmrglb; + + ------------ + -- vmrglh -- + ------------ + + function vmrglh (A : LL_VSS; B : LL_VSS) return LL_VSS is + VA : constant VSS_View := To_View (A); + VB : constant VSS_View := To_View (B); + D : VSS_View; + begin + D.Values := LL_VSS_Operations.vmrglx (VA.Values, VB.Values); + return To_Vector (D); + end vmrglh; + + ------------ + -- vmrglw -- + ------------ + + function vmrglw (A : LL_VSI; B : LL_VSI) return LL_VSI is + VA : constant VSI_View := To_View (A); + VB : constant VSI_View := To_View (B); + D : VSI_View; + begin + D.Values := LL_VSI_Operations.vmrglx (VA.Values, VB.Values); + return To_Vector (D); + end vmrglw; + + ------------ + -- mfvscr -- + ------------ + + function mfvscr return LL_VSS is + D : VUS_View; + begin + for J in Varray_unsigned_short'Range loop + D.Values (J) := 0; + end loop; + + D.Values (Varray_unsigned_short'Last) := + unsigned_short (VSCR mod 2 ** unsigned_short'Size); + D.Values (Varray_unsigned_short'Last - 1) := + unsigned_short (VSCR / 2 ** unsigned_short'Size); + return To_LL_VSS (To_Vector (D)); + end mfvscr; + + ------------ + -- vminfp -- + ------------ + + function vminfp (A : LL_VF; B : LL_VF) return LL_VF is + VA : constant VF_View := To_View (A); + VB : constant VF_View := To_View (B); + D : VF_View; + + begin + for J in Varray_float'Range loop + if VA.Values (J) < VB.Values (J) then + D.Values (J) := VA.Values (J); + else + D.Values (J) := VB.Values (J); + end if; + end loop; + + return To_Vector (D); + end vminfp; + + ------------ + -- vminsb -- + ------------ + + function vminsb (A : LL_VSC; B : LL_VSC) return LL_VSC is + VA : constant VSC_View := To_View (A); + VB : constant VSC_View := To_View (B); + D : VSC_View; + begin + D.Values := LL_VSC_Operations.vminsx (VA.Values, VB.Values); + return To_Vector (D); + end vminsb; + + ------------ + -- vminub -- + ------------ + + function vminub (A : LL_VSC; B : LL_VSC) return LL_VSC is + VA : constant VUC_View := To_View (To_LL_VUC (A)); + VB : constant VUC_View := To_View (To_LL_VUC (B)); + D : VUC_View; + begin + D.Values := LL_VUC_Operations.vminux (VA.Values, VB.Values); + return To_LL_VSC (To_Vector (D)); + end vminub; + + ------------ + -- vminsh -- + ------------ + + function vminsh (A : LL_VSS; B : LL_VSS) return LL_VSS is + VA : constant VSS_View := To_View (A); + VB : constant VSS_View := To_View (B); + D : VSS_View; + begin + D.Values := LL_VSS_Operations.vminsx (VA.Values, VB.Values); + return To_Vector (D); + end vminsh; + + ------------ + -- vminuh -- + ------------ + + function vminuh (A : LL_VSS; B : LL_VSS) return LL_VSS is + VA : constant VUS_View := To_View (To_LL_VUS (A)); + VB : constant VUS_View := To_View (To_LL_VUS (B)); + D : VUS_View; + begin + D.Values := LL_VUS_Operations.vminux (VA.Values, VB.Values); + return To_LL_VSS (To_Vector (D)); + end vminuh; + + ------------ + -- vminsw -- + ------------ + + function vminsw (A : LL_VSI; B : LL_VSI) return LL_VSI is + VA : constant VSI_View := To_View (A); + VB : constant VSI_View := To_View (B); + D : VSI_View; + begin + D.Values := LL_VSI_Operations.vminsx (VA.Values, VB.Values); + return To_Vector (D); + end vminsw; + + ------------ + -- vminuw -- + ------------ + + function vminuw (A : LL_VSI; B : LL_VSI) return LL_VSI is + VA : constant VUI_View := To_View (To_LL_VUI (A)); + VB : constant VUI_View := To_View (To_LL_VUI (B)); + D : VUI_View; + begin + D.Values := LL_VUI_Operations.vminux (VA.Values, + VB.Values); + return To_LL_VSI (To_Vector (D)); + end vminuw; + + --------------- + -- vmladduhm -- + --------------- + + function vmladduhm (A : LL_VSS; B : LL_VSS; C : LL_VSS) return LL_VSS is + VA : constant VUS_View := To_View (To_LL_VUS (A)); + VB : constant VUS_View := To_View (To_LL_VUS (B)); + VC : constant VUS_View := To_View (To_LL_VUS (C)); + D : VUS_View; + + begin + for J in Varray_unsigned_short'Range loop + D.Values (J) := VA.Values (J) * VB.Values (J) + + VC.Values (J); + end loop; + + return To_LL_VSS (To_Vector (D)); + end vmladduhm; + + ---------------- + -- vmhraddshs -- + ---------------- + + function vmhraddshs (A : LL_VSS; B : LL_VSS; C : LL_VSS) return LL_VSS is + VA : constant VSS_View := To_View (A); + VB : constant VSS_View := To_View (B); + VC : constant VSS_View := To_View (C); + D : VSS_View; + + begin + for J in Varray_signed_short'Range loop + D.Values (J) := + LL_VSS_Operations.Saturate (((SI64 (VA.Values (J)) + * SI64 (VB.Values (J)) + + 2 ** 14) + / 2 ** 15 + + SI64 (VC.Values (J)))); + end loop; + + return To_Vector (D); + end vmhraddshs; + + -------------- + -- vmsumubm -- + -------------- + + function vmsumubm (A : LL_VSC; B : LL_VSC; C : LL_VSI) return LL_VSI is + Offset : Vchar_Range; + VA : constant VUC_View := To_View (To_LL_VUC (A)); + VB : constant VUC_View := To_View (To_LL_VUC (B)); + VC : constant VUI_View := To_View (To_LL_VUI (C)); + D : VUI_View; + + begin + for J in 0 .. 3 loop + Offset := Vchar_Range (4 * J + Integer (Vchar_Range'First)); + D.Values (Vint_Range + (J + Integer (Vint_Range'First))) := + (unsigned_int (VA.Values (Offset)) + * unsigned_int (VB.Values (Offset))) + + (unsigned_int (VA.Values (Offset + 1)) + * unsigned_int (VB.Values (1 + Offset))) + + (unsigned_int (VA.Values (2 + Offset)) + * unsigned_int (VB.Values (2 + Offset))) + + (unsigned_int (VA.Values (3 + Offset)) + * unsigned_int (VB.Values (3 + Offset))) + + VC.Values (Vint_Range + (J + Integer (Varray_unsigned_int'First))); + end loop; + + return To_LL_VSI (To_Vector (D)); + end vmsumubm; + + -------------- + -- vmsumumbm -- + -------------- + + function vmsummbm (A : LL_VSC; B : LL_VSC; C : LL_VSI) return LL_VSI is + Offset : Vchar_Range; + VA : constant VSC_View := To_View (A); + VB : constant VUC_View := To_View (To_LL_VUC (B)); + VC : constant VSI_View := To_View (C); + D : VSI_View; + + begin + for J in 0 .. 3 loop + Offset := Vchar_Range (4 * J + Integer (Vchar_Range'First)); + D.Values (Vint_Range + (J + Integer (Varray_unsigned_int'First))) := 0 + + LL_VSI_Operations.Modular_Result (SI64 (VA.Values (Offset)) + * SI64 (VB.Values (Offset))) + + LL_VSI_Operations.Modular_Result (SI64 (VA.Values (Offset + 1)) + * SI64 (VB.Values + (1 + Offset))) + + LL_VSI_Operations.Modular_Result (SI64 (VA.Values (2 + Offset)) + * SI64 (VB.Values + (2 + Offset))) + + LL_VSI_Operations.Modular_Result (SI64 (VA.Values (3 + Offset)) + * SI64 (VB.Values + (3 + Offset))) + + VC.Values (Vint_Range + (J + Integer (Varray_unsigned_int'First))); + end loop; + + return To_Vector (D); + end vmsummbm; + + -------------- + -- vmsumuhm -- + -------------- + + function vmsumuhm (A : LL_VSS; B : LL_VSS; C : LL_VSI) return LL_VSI is + Offset : Vshort_Range; + VA : constant VUS_View := To_View (To_LL_VUS (A)); + VB : constant VUS_View := To_View (To_LL_VUS (B)); + VC : constant VUI_View := To_View (To_LL_VUI (C)); + D : VUI_View; + + begin + for J in 0 .. 3 loop + Offset := + Vshort_Range (2 * J + Integer (Vshort_Range'First)); + D.Values (Vint_Range + (J + Integer (Varray_unsigned_int'First))) := + (unsigned_int (VA.Values (Offset)) + * unsigned_int (VB.Values (Offset))) + + (unsigned_int (VA.Values (Offset + 1)) + * unsigned_int (VB.Values (1 + Offset))) + + VC.Values (Vint_Range + (J + Integer (Vint_Range'First))); + end loop; + + return To_LL_VSI (To_Vector (D)); + end vmsumuhm; + + -------------- + -- vmsumshm -- + -------------- + + function vmsumshm (A : LL_VSS; B : LL_VSS; C : LL_VSI) return LL_VSI is + VA : constant VSS_View := To_View (A); + VB : constant VSS_View := To_View (B); + VC : constant VSI_View := To_View (C); + Offset : Vshort_Range; + D : VSI_View; + + begin + for J in 0 .. 3 loop + Offset := + Vshort_Range (2 * J + Integer (Varray_signed_char'First)); + D.Values (Vint_Range + (J + Integer (Varray_unsigned_int'First))) := 0 + + LL_VSI_Operations.Modular_Result (SI64 (VA.Values (Offset)) + * SI64 (VB.Values (Offset))) + + LL_VSI_Operations.Modular_Result (SI64 (VA.Values (Offset + 1)) + * SI64 (VB.Values + (1 + Offset))) + + VC.Values (Vint_Range + (J + Integer (Varray_unsigned_int'First))); + end loop; + + return To_Vector (D); + end vmsumshm; + + -------------- + -- vmsumuhs -- + -------------- + + function vmsumuhs (A : LL_VSS; B : LL_VSS; C : LL_VSI) return LL_VSI is + Offset : Vshort_Range; + VA : constant VUS_View := To_View (To_LL_VUS (A)); + VB : constant VUS_View := To_View (To_LL_VUS (B)); + VC : constant VUI_View := To_View (To_LL_VUI (C)); + D : VUI_View; + + begin + for J in 0 .. 3 loop + Offset := + Vshort_Range (2 * J + Integer (Varray_signed_short'First)); + D.Values (Vint_Range + (J + Integer (Varray_unsigned_int'First))) := + LL_VUI_Operations.Saturate + (UI64 (VA.Values (Offset)) + * UI64 (VB.Values (Offset)) + + UI64 (VA.Values (Offset + 1)) + * UI64 (VB.Values (1 + Offset)) + + UI64 (VC.Values + (Vint_Range + (J + Integer (Varray_unsigned_int'First))))); + end loop; + + return To_LL_VSI (To_Vector (D)); + end vmsumuhs; + + -------------- + -- vmsumshs -- + -------------- + + function vmsumshs (A : LL_VSS; B : LL_VSS; C : LL_VSI) return LL_VSI is + VA : constant VSS_View := To_View (A); + VB : constant VSS_View := To_View (B); + VC : constant VSI_View := To_View (C); + Offset : Vshort_Range; + D : VSI_View; + + begin + for J in 0 .. 3 loop + Offset := + Vshort_Range (2 * J + Integer (Varray_signed_short'First)); + D.Values (Vint_Range + (J + Integer (Varray_signed_int'First))) := + LL_VSI_Operations.Saturate + (SI64 (VA.Values (Offset)) + * SI64 (VB.Values (Offset)) + + SI64 (VA.Values (Offset + 1)) + * SI64 (VB.Values (1 + Offset)) + + SI64 (VC.Values + (Vint_Range + (J + Integer (Varray_signed_int'First))))); + end loop; + + return To_Vector (D); + end vmsumshs; + + ------------ + -- mtvscr -- + ------------ + + procedure mtvscr (A : LL_VSI) is + VA : constant VUI_View := To_View (To_LL_VUI (A)); + begin + VSCR := VA.Values (Varray_unsigned_int'Last); + end mtvscr; + + ------------- + -- vmuleub -- + ------------- + + function vmuleub (A : LL_VSC; B : LL_VSC) return LL_VSS is + VA : constant VUC_View := To_View (To_LL_VUC (A)); + VB : constant VUC_View := To_View (To_LL_VUC (B)); + D : VUS_View; + begin + D.Values := LL_VUC_LL_VUS_Operations.vmulxux (True, + VA.Values, + VB.Values); + return To_LL_VSS (To_Vector (D)); + end vmuleub; + + ------------- + -- vmuleuh -- + ------------- + + function vmuleuh (A : LL_VSS; B : LL_VSS) return LL_VSI is + VA : constant VUS_View := To_View (To_LL_VUS (A)); + VB : constant VUS_View := To_View (To_LL_VUS (B)); + D : VUI_View; + begin + D.Values := LL_VUS_LL_VUI_Operations.vmulxux (True, + VA.Values, + VB.Values); + return To_LL_VSI (To_Vector (D)); + end vmuleuh; + + ------------- + -- vmulesb -- + ------------- + + function vmulesb (A : LL_VSC; B : LL_VSC) return LL_VSS is + VA : constant VSC_View := To_View (A); + VB : constant VSC_View := To_View (B); + D : VSS_View; + begin + D.Values := LL_VSC_LL_VSS_Operations.vmulxsx (True, + VA.Values, + VB.Values); + return To_Vector (D); + end vmulesb; + + ------------- + -- vmulesh -- + ------------- + + function vmulesh (A : LL_VSS; B : LL_VSS) return LL_VSI is + VA : constant VSS_View := To_View (A); + VB : constant VSS_View := To_View (B); + D : VSI_View; + begin + D.Values := LL_VSS_LL_VSI_Operations.vmulxsx (True, + VA.Values, + VB.Values); + return To_Vector (D); + end vmulesh; + + ------------- + -- vmuloub -- + ------------- + + function vmuloub (A : LL_VSC; B : LL_VSC) return LL_VSS is + VA : constant VUC_View := To_View (To_LL_VUC (A)); + VB : constant VUC_View := To_View (To_LL_VUC (B)); + D : VUS_View; + begin + D.Values := LL_VUC_LL_VUS_Operations.vmulxux (False, + VA.Values, + VB.Values); + return To_LL_VSS (To_Vector (D)); + end vmuloub; + + ------------- + -- vmulouh -- + ------------- + + function vmulouh (A : LL_VSS; B : LL_VSS) return LL_VSI is + VA : constant VUS_View := To_View (To_LL_VUS (A)); + VB : constant VUS_View := To_View (To_LL_VUS (B)); + D : VUI_View; + begin + D.Values := + LL_VUS_LL_VUI_Operations.vmulxux (False, VA.Values, VB.Values); + return To_LL_VSI (To_Vector (D)); + end vmulouh; + + ------------- + -- vmulosb -- + ------------- + + function vmulosb (A : LL_VSC; B : LL_VSC) return LL_VSS is + VA : constant VSC_View := To_View (A); + VB : constant VSC_View := To_View (B); + D : VSS_View; + begin + D.Values := LL_VSC_LL_VSS_Operations.vmulxsx (False, + VA.Values, + VB.Values); + return To_Vector (D); + end vmulosb; + + ------------- + -- vmulosh -- + ------------- + + function vmulosh (A : LL_VSS; B : LL_VSS) return LL_VSI is + VA : constant VSS_View := To_View (A); + VB : constant VSS_View := To_View (B); + D : VSI_View; + begin + D.Values := LL_VSS_LL_VSI_Operations.vmulxsx (False, + VA.Values, + VB.Values); + return To_Vector (D); + end vmulosh; + + -------------- + -- vnmsubfp -- + -------------- + + function vnmsubfp (A : LL_VF; B : LL_VF; C : LL_VF) return LL_VF is + VA : constant VF_View := To_View (A); + VB : constant VF_View := To_View (B); + VC : constant VF_View := To_View (C); + D : VF_View; + + begin + for J in Vfloat_Range'Range loop + D.Values (J) := + -Rnd_To_FP_Nearest (F64 (VA.Values (J)) + * F64 (VB.Values (J)) + - F64 (VC.Values (J))); + end loop; + + return To_Vector (D); + end vnmsubfp; + + ---------- + -- vnor -- + ---------- + + function vnor (A : LL_VSI; B : LL_VSI) return LL_VSI is + VA : constant VUI_View := To_View (To_LL_VUI (A)); + VB : constant VUI_View := To_View (To_LL_VUI (B)); + D : VUI_View; + + begin + for J in Vint_Range'Range loop + D.Values (J) := not (VA.Values (J) or VB.Values (J)); + end loop; + + return To_LL_VSI (To_Vector (D)); + end vnor; + + ---------- + -- vor -- + ---------- + + function vor (A : LL_VSI; B : LL_VSI) return LL_VSI is + VA : constant VUI_View := To_View (To_LL_VUI (A)); + VB : constant VUI_View := To_View (To_LL_VUI (B)); + D : VUI_View; + + begin + for J in Vint_Range'Range loop + D.Values (J) := VA.Values (J) or VB.Values (J); + end loop; + + return To_LL_VSI (To_Vector (D)); + end vor; + + ------------- + -- vpkuhum -- + ------------- + + function vpkuhum (A : LL_VSS; B : LL_VSS) return LL_VSC is + VA : constant VUS_View := To_View (To_LL_VUS (A)); + VB : constant VUS_View := To_View (To_LL_VUS (B)); + D : VUC_View; + begin + D.Values := LL_VUC_LL_VUS_Operations.vpkuxum (VA.Values, VB.Values); + return To_LL_VSC (To_Vector (D)); + end vpkuhum; + + ------------- + -- vpkuwum -- + ------------- + + function vpkuwum (A : LL_VSI; B : LL_VSI) return LL_VSS is + VA : constant VUI_View := To_View (To_LL_VUI (A)); + VB : constant VUI_View := To_View (To_LL_VUI (B)); + D : VUS_View; + begin + D.Values := LL_VUS_LL_VUI_Operations.vpkuxum (VA.Values, VB.Values); + return To_LL_VSS (To_Vector (D)); + end vpkuwum; + + ----------- + -- vpkpx -- + ----------- + + function vpkpx (A : LL_VSI; B : LL_VSI) return LL_VSS is + VA : constant VUI_View := To_View (To_LL_VUI (A)); + VB : constant VUI_View := To_View (To_LL_VUI (B)); + D : VUS_View; + Offset : Vint_Range; + P16 : Pixel_16; + P32 : Pixel_32; + + begin + for J in 0 .. 3 loop + Offset := Vint_Range (J + Integer (Vshort_Range'First)); + P32 := To_Pixel (VA.Values (Offset)); + P16.T := Unsigned_1 (P32.T mod 2 ** 1); + P16.R := Unsigned_5 (Shift_Right (P32.R, 3) mod 2 ** 5); + P16.G := Unsigned_5 (Shift_Right (P32.G, 3) mod 2 ** 5); + P16.B := Unsigned_5 (Shift_Right (P32.B, 3) mod 2 ** 5); + D.Values (Vshort_Range (Offset)) := To_unsigned_short (P16); + P32 := To_Pixel (VB.Values (Offset)); + P16.T := Unsigned_1 (P32.T mod 2 ** 1); + P16.R := Unsigned_5 (Shift_Right (P32.R, 3) mod 2 ** 5); + P16.G := Unsigned_5 (Shift_Right (P32.G, 3) mod 2 ** 5); + P16.B := Unsigned_5 (Shift_Right (P32.B, 3) mod 2 ** 5); + D.Values (Vshort_Range (Offset) + 4) := To_unsigned_short (P16); + end loop; + + return To_LL_VSS (To_Vector (D)); + end vpkpx; + + ------------- + -- vpkuhus -- + ------------- + + function vpkuhus (A : LL_VSS; B : LL_VSS) return LL_VSC is + VA : constant VUS_View := To_View (To_LL_VUS (A)); + VB : constant VUS_View := To_View (To_LL_VUS (B)); + D : VUC_View; + begin + D.Values := LL_VUC_LL_VUS_Operations.vpkuxus (VA.Values, VB.Values); + return To_LL_VSC (To_Vector (D)); + end vpkuhus; + + ------------- + -- vpkuwus -- + ------------- + + function vpkuwus (A : LL_VSI; B : LL_VSI) return LL_VSS is + VA : constant VUI_View := To_View (To_LL_VUI (A)); + VB : constant VUI_View := To_View (To_LL_VUI (B)); + D : VUS_View; + begin + D.Values := LL_VUS_LL_VUI_Operations.vpkuxus (VA.Values, VB.Values); + return To_LL_VSS (To_Vector (D)); + end vpkuwus; + + ------------- + -- vpkshss -- + ------------- + + function vpkshss (A : LL_VSS; B : LL_VSS) return LL_VSC is + VA : constant VSS_View := To_View (A); + VB : constant VSS_View := To_View (B); + D : VSC_View; + begin + D.Values := LL_VSC_LL_VSS_Operations.vpksxss (VA.Values, VB.Values); + return To_Vector (D); + end vpkshss; + + ------------- + -- vpkswss -- + ------------- + + function vpkswss (A : LL_VSI; B : LL_VSI) return LL_VSS is + VA : constant VSI_View := To_View (A); + VB : constant VSI_View := To_View (B); + D : VSS_View; + begin + D.Values := LL_VSS_LL_VSI_Operations.vpksxss (VA.Values, VB.Values); + return To_Vector (D); + end vpkswss; + + ------------- + -- vpksxus -- + ------------- + + generic + type Signed_Component_Type is range <>; + type Signed_Index_Type is range <>; + type Signed_Varray_Type is + array (Signed_Index_Type) of Signed_Component_Type; + type Unsigned_Component_Type is mod <>; + type Unsigned_Index_Type is range <>; + type Unsigned_Varray_Type is + array (Unsigned_Index_Type) of Unsigned_Component_Type; + + function vpksxus + (A : Signed_Varray_Type; + B : Signed_Varray_Type) return Unsigned_Varray_Type; + + function vpksxus + (A : Signed_Varray_Type; + B : Signed_Varray_Type) return Unsigned_Varray_Type + is + N : constant Unsigned_Index_Type := + Unsigned_Index_Type (Signed_Index_Type'Last); + Offset : Unsigned_Index_Type; + Signed_Offset : Signed_Index_Type; + D : Unsigned_Varray_Type; + + function Saturate + (X : Signed_Component_Type) return Unsigned_Component_Type; + -- Saturation, as defined in + -- [PIM-4.1 Vector Status and Control Register] + + -------------- + -- Saturate -- + -------------- + + function Saturate + (X : Signed_Component_Type) return Unsigned_Component_Type + is + D : Unsigned_Component_Type; + + begin + D := Unsigned_Component_Type + (Signed_Component_Type'Max + (Signed_Component_Type (Unsigned_Component_Type'First), + Signed_Component_Type'Min + (Signed_Component_Type (Unsigned_Component_Type'Last), + X))); + if Signed_Component_Type (D) /= X then + VSCR := Write_Bit (VSCR, SAT_POS, 1); + end if; + + return D; + end Saturate; + + -- Start of processing for vpksxus + + begin + for J in 0 .. N - 1 loop + Offset := + Unsigned_Index_Type (Integer (J) + + Integer (Unsigned_Index_Type'First)); + Signed_Offset := + Signed_Index_Type (Integer (J) + + Integer (Signed_Index_Type'First)); + D (Offset) := Saturate (A (Signed_Offset)); + D (Offset + N) := Saturate (B (Signed_Offset)); + end loop; + + return D; + end vpksxus; + + ------------- + -- vpkshus -- + ------------- + + function vpkshus (A : LL_VSS; B : LL_VSS) return LL_VSC is + function vpkshus_Instance is + new vpksxus (signed_short, + Vshort_Range, + Varray_signed_short, + unsigned_char, + Vchar_Range, + Varray_unsigned_char); + + VA : constant VSS_View := To_View (A); + VB : constant VSS_View := To_View (B); + D : VUC_View; + + begin + D.Values := vpkshus_Instance (VA.Values, VB.Values); + return To_LL_VSC (To_Vector (D)); + end vpkshus; + + ------------- + -- vpkswus -- + ------------- + + function vpkswus (A : LL_VSI; B : LL_VSI) return LL_VSS is + function vpkswus_Instance is + new vpksxus (signed_int, + Vint_Range, + Varray_signed_int, + unsigned_short, + Vshort_Range, + Varray_unsigned_short); + + VA : constant VSI_View := To_View (A); + VB : constant VSI_View := To_View (B); + D : VUS_View; + begin + D.Values := vpkswus_Instance (VA.Values, VB.Values); + return To_LL_VSS (To_Vector (D)); + end vpkswus; + + --------------- + -- vperm_4si -- + --------------- + + function vperm_4si (A : LL_VSI; B : LL_VSI; C : LL_VSC) return LL_VSI is + VA : constant VUC_View := To_View (To_LL_VUC (A)); + VB : constant VUC_View := To_View (To_LL_VUC (B)); + VC : constant VUC_View := To_View (To_LL_VUC (C)); + J : Vchar_Range; + D : VUC_View; + + begin + for N in Vchar_Range'Range loop + J := Vchar_Range (Integer (Bits (VC.Values (N), 4, 7)) + + Integer (Vchar_Range'First)); + + if Bits (VC.Values (N), 3, 3) = 0 then + D.Values (N) := VA.Values (J); + else + D.Values (N) := VB.Values (J); + end if; + end loop; + + return To_LL_VSI (To_Vector (D)); + end vperm_4si; + + ----------- + -- vrefp -- + ----------- + + function vrefp (A : LL_VF) return LL_VF is + VA : constant VF_View := To_View (A); + D : VF_View; + + begin + for J in Vfloat_Range'Range loop + D.Values (J) := FP_Recip_Est (VA.Values (J)); + end loop; + + return To_Vector (D); + end vrefp; + + ---------- + -- vrlb -- + ---------- + + function vrlb (A : LL_VSC; B : LL_VSC) return LL_VSC is + VA : constant VUC_View := To_View (To_LL_VUC (A)); + VB : constant VUC_View := To_View (To_LL_VUC (B)); + D : VUC_View; + begin + D.Values := LL_VUC_Operations.vrlx (VA.Values, VB.Values, ROTL'Access); + return To_LL_VSC (To_Vector (D)); + end vrlb; + + ---------- + -- vrlh -- + ---------- + + function vrlh (A : LL_VSS; B : LL_VSS) return LL_VSS is + VA : constant VUS_View := To_View (To_LL_VUS (A)); + VB : constant VUS_View := To_View (To_LL_VUS (B)); + D : VUS_View; + begin + D.Values := LL_VUS_Operations.vrlx (VA.Values, VB.Values, ROTL'Access); + return To_LL_VSS (To_Vector (D)); + end vrlh; + + ---------- + -- vrlw -- + ---------- + + function vrlw (A : LL_VSI; B : LL_VSI) return LL_VSI is + VA : constant VUI_View := To_View (To_LL_VUI (A)); + VB : constant VUI_View := To_View (To_LL_VUI (B)); + D : VUI_View; + begin + D.Values := LL_VUI_Operations.vrlx (VA.Values, VB.Values, ROTL'Access); + return To_LL_VSI (To_Vector (D)); + end vrlw; + + ----------- + -- vrfin -- + ----------- + + function vrfin (A : LL_VF) return LL_VF is + VA : constant VF_View := To_View (A); + D : VF_View; + + begin + for J in Vfloat_Range'Range loop + D.Values (J) := C_float (Rnd_To_FPI_Near (F64 (VA.Values (J)))); + end loop; + + return To_Vector (D); + end vrfin; + + --------------- + -- vrsqrtefp -- + --------------- + + function vrsqrtefp (A : LL_VF) return LL_VF is + VA : constant VF_View := To_View (A); + D : VF_View; + + begin + for J in Vfloat_Range'Range loop + D.Values (J) := Recip_SQRT_Est (VA.Values (J)); + end loop; + + return To_Vector (D); + end vrsqrtefp; + + -------------- + -- vsel_4si -- + -------------- + + function vsel_4si (A : LL_VSI; B : LL_VSI; C : LL_VSI) return LL_VSI is + VA : constant VUI_View := To_View (To_LL_VUI (A)); + VB : constant VUI_View := To_View (To_LL_VUI (B)); + VC : constant VUI_View := To_View (To_LL_VUI (C)); + D : VUI_View; + + begin + for J in Vint_Range'Range loop + D.Values (J) := ((not VC.Values (J)) and VA.Values (J)) + or (VC.Values (J) and VB.Values (J)); + end loop; + + return To_LL_VSI (To_Vector (D)); + end vsel_4si; + + ---------- + -- vslb -- + ---------- + + function vslb (A : LL_VSC; B : LL_VSC) return LL_VSC is + VA : constant VUC_View := To_View (To_LL_VUC (A)); + VB : constant VUC_View := To_View (To_LL_VUC (B)); + D : VUC_View; + begin + D.Values := + LL_VUC_Operations.vsxx (VA.Values, VB.Values, Shift_Left'Access); + return To_LL_VSC (To_Vector (D)); + end vslb; + + ---------- + -- vslh -- + ---------- + + function vslh (A : LL_VSS; B : LL_VSS) return LL_VSS is + VA : constant VUS_View := To_View (To_LL_VUS (A)); + VB : constant VUS_View := To_View (To_LL_VUS (B)); + D : VUS_View; + begin + D.Values := + LL_VUS_Operations.vsxx (VA.Values, VB.Values, Shift_Left'Access); + return To_LL_VSS (To_Vector (D)); + end vslh; + + ---------- + -- vslw -- + ---------- + + function vslw (A : LL_VSI; B : LL_VSI) return LL_VSI is + VA : constant VUI_View := To_View (To_LL_VUI (A)); + VB : constant VUI_View := To_View (To_LL_VUI (B)); + D : VUI_View; + begin + D.Values := + LL_VUI_Operations.vsxx (VA.Values, VB.Values, Shift_Left'Access); + return To_LL_VSI (To_Vector (D)); + end vslw; + + ---------------- + -- vsldoi_4si -- + ---------------- + + function vsldoi_4si (A : LL_VSI; B : LL_VSI; C : c_int) return LL_VSI is + VA : constant VUC_View := To_View (To_LL_VUC (A)); + VB : constant VUC_View := To_View (To_LL_VUC (B)); + Offset : c_int; + Bound : c_int; + D : VUC_View; + + begin + for J in Vchar_Range'Range loop + Offset := c_int (J) + C; + Bound := c_int (Vchar_Range'First) + + c_int (Varray_unsigned_char'Length); + + if Offset < Bound then + D.Values (J) := VA.Values (Vchar_Range (Offset)); + else + D.Values (J) := + VB.Values (Vchar_Range (Offset - Bound + + c_int (Vchar_Range'First))); + end if; + end loop; + + return To_LL_VSI (To_Vector (D)); + end vsldoi_4si; + + ---------------- + -- vsldoi_8hi -- + ---------------- + + function vsldoi_8hi (A : LL_VSS; B : LL_VSS; C : c_int) return LL_VSS is + begin + return To_LL_VSS (vsldoi_4si (To_LL_VSI (A), To_LL_VSI (B), C)); + end vsldoi_8hi; + + ----------------- + -- vsldoi_16qi -- + ----------------- + + function vsldoi_16qi (A : LL_VSC; B : LL_VSC; C : c_int) return LL_VSC is + begin + return To_LL_VSC (vsldoi_4si (To_LL_VSI (A), To_LL_VSI (B), C)); + end vsldoi_16qi; + + ---------------- + -- vsldoi_4sf -- + ---------------- + + function vsldoi_4sf (A : LL_VF; B : LL_VF; C : c_int) return LL_VF is + begin + return To_LL_VF (vsldoi_4si (To_LL_VSI (A), To_LL_VSI (B), C)); + end vsldoi_4sf; + + --------- + -- vsl -- + --------- + + function vsl (A : LL_VSI; B : LL_VSI) return LL_VSI is + VA : constant VUI_View := To_View (To_LL_VUI (A)); + VB : constant VUI_View := To_View (To_LL_VUI (B)); + D : VUI_View; + M : constant Natural := + Natural (Bits (VB.Values (Vint_Range'Last), 29, 31)); + + -- [PIM-4.4 vec_sll] "Note that the three low-order byte elements in B + -- must be the same. Otherwise the value placed into D is undefined." + -- ??? Shall we add a optional check for B? + + begin + for J in Vint_Range'Range loop + D.Values (J) := 0; + D.Values (J) := D.Values (J) + Shift_Left (VA.Values (J), M); + + if J /= Vint_Range'Last then + D.Values (J) := + D.Values (J) + Shift_Right (VA.Values (J + 1), + signed_int'Size - M); + end if; + end loop; + + return To_LL_VSI (To_Vector (D)); + end vsl; + + ---------- + -- vslo -- + ---------- + + function vslo (A : LL_VSI; B : LL_VSI) return LL_VSI is + VA : constant VUC_View := To_View (To_LL_VUC (A)); + VB : constant VUC_View := To_View (To_LL_VUC (B)); + D : VUC_View; + M : constant Natural := + Natural (Bits (VB.Values (Vchar_Range'Last), 1, 4)); + J : Natural; + + begin + for N in Vchar_Range'Range loop + J := Natural (N) + M; + + if J <= Natural (Vchar_Range'Last) then + D.Values (N) := VA.Values (Vchar_Range (J)); + else + D.Values (N) := 0; + end if; + end loop; + + return To_LL_VSI (To_Vector (D)); + end vslo; + + ------------ + -- vspltb -- + ------------ + + function vspltb (A : LL_VSC; B : c_int) return LL_VSC is + VA : constant VSC_View := To_View (A); + D : VSC_View; + begin + D.Values := LL_VSC_Operations.vspltx (VA.Values, B); + return To_Vector (D); + end vspltb; + + ------------ + -- vsplth -- + ------------ + + function vsplth (A : LL_VSS; B : c_int) return LL_VSS is + VA : constant VSS_View := To_View (A); + D : VSS_View; + begin + D.Values := LL_VSS_Operations.vspltx (VA.Values, B); + return To_Vector (D); + end vsplth; + + ------------ + -- vspltw -- + ------------ + + function vspltw (A : LL_VSI; B : c_int) return LL_VSI is + VA : constant VSI_View := To_View (A); + D : VSI_View; + begin + D.Values := LL_VSI_Operations.vspltx (VA.Values, B); + return To_Vector (D); + end vspltw; + + -------------- + -- vspltisb -- + -------------- + + function vspltisb (A : c_int) return LL_VSC is + D : VSC_View; + begin + D.Values := LL_VSC_Operations.vspltisx (A); + return To_Vector (D); + end vspltisb; + + -------------- + -- vspltish -- + -------------- + + function vspltish (A : c_int) return LL_VSS is + D : VSS_View; + begin + D.Values := LL_VSS_Operations.vspltisx (A); + return To_Vector (D); + end vspltish; + + -------------- + -- vspltisw -- + -------------- + + function vspltisw (A : c_int) return LL_VSI is + D : VSI_View; + begin + D.Values := LL_VSI_Operations.vspltisx (A); + return To_Vector (D); + end vspltisw; + + ---------- + -- vsrb -- + ---------- + + function vsrb (A : LL_VSC; B : LL_VSC) return LL_VSC is + VA : constant VUC_View := To_View (To_LL_VUC (A)); + VB : constant VUC_View := To_View (To_LL_VUC (B)); + D : VUC_View; + begin + D.Values := + LL_VUC_Operations.vsxx (VA.Values, VB.Values, Shift_Right'Access); + return To_LL_VSC (To_Vector (D)); + end vsrb; + + ---------- + -- vsrh -- + ---------- + + function vsrh (A : LL_VSS; B : LL_VSS) return LL_VSS is + VA : constant VUS_View := To_View (To_LL_VUS (A)); + VB : constant VUS_View := To_View (To_LL_VUS (B)); + D : VUS_View; + begin + D.Values := + LL_VUS_Operations.vsxx (VA.Values, VB.Values, Shift_Right'Access); + return To_LL_VSS (To_Vector (D)); + end vsrh; + + ---------- + -- vsrw -- + ---------- + + function vsrw (A : LL_VSI; B : LL_VSI) return LL_VSI is + VA : constant VUI_View := To_View (To_LL_VUI (A)); + VB : constant VUI_View := To_View (To_LL_VUI (B)); + D : VUI_View; + begin + D.Values := + LL_VUI_Operations.vsxx (VA.Values, VB.Values, Shift_Right'Access); + return To_LL_VSI (To_Vector (D)); + end vsrw; + + ----------- + -- vsrab -- + ----------- + + function vsrab (A : LL_VSC; B : LL_VSC) return LL_VSC is + VA : constant VSC_View := To_View (A); + VB : constant VSC_View := To_View (B); + D : VSC_View; + begin + D.Values := + LL_VSC_Operations.vsrax (VA.Values, VB.Values, Shift_Right_A'Access); + return To_Vector (D); + end vsrab; + + ----------- + -- vsrah -- + ----------- + + function vsrah (A : LL_VSS; B : LL_VSS) return LL_VSS is + VA : constant VSS_View := To_View (A); + VB : constant VSS_View := To_View (B); + D : VSS_View; + begin + D.Values := + LL_VSS_Operations.vsrax (VA.Values, VB.Values, Shift_Right_A'Access); + return To_Vector (D); + end vsrah; + + ----------- + -- vsraw -- + ----------- + + function vsraw (A : LL_VSI; B : LL_VSI) return LL_VSI is + VA : constant VSI_View := To_View (A); + VB : constant VSI_View := To_View (B); + D : VSI_View; + begin + D.Values := + LL_VSI_Operations.vsrax (VA.Values, VB.Values, Shift_Right_A'Access); + return To_Vector (D); + end vsraw; + + --------- + -- vsr -- + --------- + + function vsr (A : LL_VSI; B : LL_VSI) return LL_VSI is + VA : constant VUI_View := To_View (To_LL_VUI (A)); + VB : constant VUI_View := To_View (To_LL_VUI (B)); + M : constant Natural := + Natural (Bits (VB.Values (Vint_Range'Last), 29, 31)); + D : VUI_View; + + begin + for J in Vint_Range'Range loop + D.Values (J) := 0; + D.Values (J) := D.Values (J) + Shift_Right (VA.Values (J), M); + + if J /= Vint_Range'First then + D.Values (J) := + D.Values (J) + + Shift_Left (VA.Values (J - 1), signed_int'Size - M); + end if; + end loop; + + return To_LL_VSI (To_Vector (D)); + end vsr; + + ---------- + -- vsro -- + ---------- + + function vsro (A : LL_VSI; B : LL_VSI) return LL_VSI is + VA : constant VUC_View := To_View (To_LL_VUC (A)); + VB : constant VUC_View := To_View (To_LL_VUC (B)); + M : constant Natural := + Natural (Bits (VB.Values (Vchar_Range'Last), 1, 4)); + J : Natural; + D : VUC_View; + + begin + for N in Vchar_Range'Range loop + J := Natural (N) - M; + + if J >= Natural (Vchar_Range'First) then + D.Values (N) := VA.Values (Vchar_Range (J)); + else + D.Values (N) := 0; + end if; + end loop; + + return To_LL_VSI (To_Vector (D)); + end vsro; + + ---------- + -- stvx -- + ---------- + + procedure stvx (A : LL_VSI; B : c_int; C : c_ptr) is + EA : Integer_Address; + + begin + EA := Bound_Align (Integer_Address (B) + To_Integer (C), 16); + + declare + D : LL_VSI; + for D'Address use To_Address (EA); + begin + D := A; + end; + end stvx; + + ------------ + -- stvewx -- + ------------ + + procedure stvebx (A : LL_VSC; B : c_int; C : c_ptr) is + VA : constant VSC_View := To_View (A); + begin + LL_VSC_Operations.stvexx (VA.Values, B, C); + end stvebx; + + ------------ + -- stvehx -- + ------------ + + procedure stvehx (A : LL_VSS; B : c_int; C : c_ptr) is + VA : constant VSS_View := To_View (A); + begin + LL_VSS_Operations.stvexx (VA.Values, B, C); + end stvehx; + + ------------ + -- stvewx -- + ------------ + + procedure stvewx (A : LL_VSI; B : c_int; C : c_ptr) is + VA : constant VSI_View := To_View (A); + begin + LL_VSI_Operations.stvexx (VA.Values, B, C); + end stvewx; + + ----------- + -- stvxl -- + ----------- + + procedure stvxl (A : LL_VSI; B : c_int; C : c_ptr) renames stvx; + + ------------- + -- vsububm -- + ------------- + + function vsububm (A : LL_VSC; B : LL_VSC) return LL_VSC is + VA : constant VUC_View := To_View (To_LL_VUC (A)); + VB : constant VUC_View := To_View (To_LL_VUC (B)); + D : VUC_View; + begin + D.Values := LL_VUC_Operations.vsubuxm (VA.Values, VB.Values); + return To_LL_VSC (To_Vector (D)); + end vsububm; + + ------------- + -- vsubuhm -- + ------------- + + function vsubuhm (A : LL_VSS; B : LL_VSS) return LL_VSS is + VA : constant VUS_View := To_View (To_LL_VUS (A)); + VB : constant VUS_View := To_View (To_LL_VUS (B)); + D : VUS_View; + begin + D.Values := LL_VUS_Operations.vsubuxm (VA.Values, VB.Values); + return To_LL_VSS (To_Vector (D)); + end vsubuhm; + + ------------- + -- vsubuwm -- + ------------- + + function vsubuwm (A : LL_VSI; B : LL_VSI) return LL_VSI is + VA : constant VUI_View := To_View (To_LL_VUI (A)); + VB : constant VUI_View := To_View (To_LL_VUI (B)); + D : VUI_View; + begin + D.Values := LL_VUI_Operations.vsubuxm (VA.Values, VB.Values); + return To_LL_VSI (To_Vector (D)); + end vsubuwm; + + ------------ + -- vsubfp -- + ------------ + + function vsubfp (A : LL_VF; B : LL_VF) return LL_VF is + VA : constant VF_View := To_View (A); + VB : constant VF_View := To_View (B); + D : VF_View; + + begin + for J in Vfloat_Range'Range loop + D.Values (J) := + NJ_Truncate (NJ_Truncate (VA.Values (J)) + - NJ_Truncate (VB.Values (J))); + end loop; + + return To_Vector (D); + end vsubfp; + + ------------- + -- vsubcuw -- + ------------- + + function vsubcuw (A : LL_VSI; B : LL_VSI) return LL_VSI is + Subst_Result : SI64; + + VA : constant VUI_View := To_View (To_LL_VUI (A)); + VB : constant VUI_View := To_View (To_LL_VUI (B)); + D : VUI_View; + + begin + for J in Vint_Range'Range loop + Subst_Result := SI64 (VA.Values (J)) - SI64 (VB.Values (J)); + + if Subst_Result < SI64 (unsigned_int'First) then + D.Values (J) := 0; + else + D.Values (J) := 1; + end if; + end loop; + + return To_LL_VSI (To_Vector (D)); + end vsubcuw; + + ------------- + -- vsububs -- + ------------- + + function vsububs (A : LL_VSC; B : LL_VSC) return LL_VSC is + VA : constant VUC_View := To_View (To_LL_VUC (A)); + VB : constant VUC_View := To_View (To_LL_VUC (B)); + D : VUC_View; + begin + D.Values := LL_VUC_Operations.vsubuxs (VA.Values, VB.Values); + return To_LL_VSC (To_Vector (D)); + end vsububs; + + ------------- + -- vsubsbs -- + ------------- + + function vsubsbs (A : LL_VSC; B : LL_VSC) return LL_VSC is + VA : constant VSC_View := To_View (A); + VB : constant VSC_View := To_View (B); + D : VSC_View; + begin + D.Values := LL_VSC_Operations.vsubsxs (VA.Values, VB.Values); + return To_Vector (D); + end vsubsbs; + + ------------- + -- vsubuhs -- + ------------- + + function vsubuhs (A : LL_VSS; B : LL_VSS) return LL_VSS is + VA : constant VUS_View := To_View (To_LL_VUS (A)); + VB : constant VUS_View := To_View (To_LL_VUS (B)); + D : VUS_View; + begin + D.Values := LL_VUS_Operations.vsubuxs (VA.Values, VB.Values); + return To_LL_VSS (To_Vector (D)); + end vsubuhs; + + ------------- + -- vsubshs -- + ------------- + + function vsubshs (A : LL_VSS; B : LL_VSS) return LL_VSS is + VA : constant VSS_View := To_View (A); + VB : constant VSS_View := To_View (B); + D : VSS_View; + begin + D.Values := LL_VSS_Operations.vsubsxs (VA.Values, VB.Values); + return To_Vector (D); + end vsubshs; + + ------------- + -- vsubuws -- + ------------- + + function vsubuws (A : LL_VSI; B : LL_VSI) return LL_VSI is + VA : constant VUI_View := To_View (To_LL_VUI (A)); + VB : constant VUI_View := To_View (To_LL_VUI (B)); + D : VUI_View; + begin + D.Values := LL_VUI_Operations.vsubuxs (VA.Values, VB.Values); + return To_LL_VSI (To_Vector (D)); + end vsubuws; + + ------------- + -- vsubsws -- + ------------- + + function vsubsws (A : LL_VSI; B : LL_VSI) return LL_VSI is + VA : constant VSI_View := To_View (A); + VB : constant VSI_View := To_View (B); + D : VSI_View; + begin + D.Values := LL_VSI_Operations.vsubsxs (VA.Values, VB.Values); + return To_Vector (D); + end vsubsws; + + -------------- + -- vsum4ubs -- + -------------- + + function vsum4ubs (A : LL_VSC; B : LL_VSI) return LL_VSI is + VA : constant VUC_View := To_View (To_LL_VUC (A)); + VB : constant VUI_View := To_View (To_LL_VUI (B)); + Offset : Vchar_Range; + D : VUI_View; + + begin + for J in 0 .. 3 loop + Offset := Vchar_Range (4 * J + Integer (Vchar_Range'First)); + D.Values (Vint_Range (J + Integer (Vint_Range'First))) := + LL_VUI_Operations.Saturate + (UI64 (VA.Values (Offset)) + + UI64 (VA.Values (Offset + 1)) + + UI64 (VA.Values (Offset + 2)) + + UI64 (VA.Values (Offset + 3)) + + UI64 (VB.Values (Vint_Range (J + Integer (Vint_Range'First))))); + end loop; + + return To_LL_VSI (To_Vector (D)); + end vsum4ubs; + + -------------- + -- vsum4sbs -- + -------------- + + function vsum4sbs (A : LL_VSC; B : LL_VSI) return LL_VSI is + VA : constant VSC_View := To_View (A); + VB : constant VSI_View := To_View (B); + Offset : Vchar_Range; + D : VSI_View; + + begin + for J in 0 .. 3 loop + Offset := Vchar_Range (4 * J + Integer (Vchar_Range'First)); + D.Values (Vint_Range (J + Integer (Vint_Range'First))) := + LL_VSI_Operations.Saturate + (SI64 (VA.Values (Offset)) + + SI64 (VA.Values (Offset + 1)) + + SI64 (VA.Values (Offset + 2)) + + SI64 (VA.Values (Offset + 3)) + + SI64 (VB.Values (Vint_Range (J + Integer (Vint_Range'First))))); + end loop; + + return To_Vector (D); + end vsum4sbs; + + -------------- + -- vsum4shs -- + -------------- + + function vsum4shs (A : LL_VSS; B : LL_VSI) return LL_VSI is + VA : constant VSS_View := To_View (A); + VB : constant VSI_View := To_View (B); + Offset : Vshort_Range; + D : VSI_View; + + begin + for J in 0 .. 3 loop + Offset := Vshort_Range (2 * J + Integer (Vchar_Range'First)); + D.Values (Vint_Range (J + Integer (Vint_Range'First))) := + LL_VSI_Operations.Saturate + (SI64 (VA.Values (Offset)) + + SI64 (VA.Values (Offset + 1)) + + SI64 (VB.Values (Vint_Range (J + Integer (Vint_Range'First))))); + end loop; + + return To_Vector (D); + end vsum4shs; + + -------------- + -- vsum2sws -- + -------------- + + function vsum2sws (A : LL_VSI; B : LL_VSI) return LL_VSI is + VA : constant VSI_View := To_View (A); + VB : constant VSI_View := To_View (B); + Offset : Vint_Range; + D : VSI_View; + + begin + for J in 0 .. 1 loop + Offset := Vint_Range (2 * J + Integer (Vchar_Range'First)); + D.Values (Offset) := 0; + D.Values (Offset + 1) := + LL_VSI_Operations.Saturate + (SI64 (VA.Values (Offset)) + + SI64 (VA.Values (Offset + 1)) + + SI64 (VB.Values (Vint_Range (Offset + 1)))); + end loop; + + return To_Vector (D); + end vsum2sws; + + ------------- + -- vsumsws -- + ------------- + + function vsumsws (A : LL_VSI; B : LL_VSI) return LL_VSI is + VA : constant VSI_View := To_View (A); + VB : constant VSI_View := To_View (B); + D : VSI_View; + Sum_Buffer : SI64 := 0; + + begin + for J in Vint_Range'Range loop + D.Values (J) := 0; + Sum_Buffer := Sum_Buffer + SI64 (VA.Values (J)); + end loop; + + Sum_Buffer := Sum_Buffer + SI64 (VB.Values (Vint_Range'Last)); + D.Values (Vint_Range'Last) := LL_VSI_Operations.Saturate (Sum_Buffer); + return To_Vector (D); + end vsumsws; + + ----------- + -- vrfiz -- + ----------- + + function vrfiz (A : LL_VF) return LL_VF is + VA : constant VF_View := To_View (A); + D : VF_View; + begin + for J in Vfloat_Range'Range loop + D.Values (J) := C_float (Rnd_To_FPI_Trunc (F64 (VA.Values (J)))); + end loop; + + return To_Vector (D); + end vrfiz; + + ------------- + -- vupkhsb -- + ------------- + + function vupkhsb (A : LL_VSC) return LL_VSS is + VA : constant VSC_View := To_View (A); + D : VSS_View; + begin + D.Values := LL_VSC_LL_VSS_Operations.vupkxsx (VA.Values, 0); + return To_Vector (D); + end vupkhsb; + + ------------- + -- vupkhsh -- + ------------- + + function vupkhsh (A : LL_VSS) return LL_VSI is + VA : constant VSS_View := To_View (A); + D : VSI_View; + begin + D.Values := LL_VSS_LL_VSI_Operations.vupkxsx (VA.Values, 0); + return To_Vector (D); + end vupkhsh; + + ------------- + -- vupkxpx -- + ------------- + + function vupkxpx (A : LL_VSS; Offset : Natural) return LL_VSI; + -- For vupkhpx and vupklpx (depending on Offset) + + function vupkxpx (A : LL_VSS; Offset : Natural) return LL_VSI is + VA : constant VUS_View := To_View (To_LL_VUS (A)); + K : Vshort_Range; + D : VUI_View; + P16 : Pixel_16; + P32 : Pixel_32; + + function Sign_Extend (X : Unsigned_1) return unsigned_char; + + function Sign_Extend (X : Unsigned_1) return unsigned_char is + begin + if X = 1 then + return 16#FF#; + else + return 16#00#; + end if; + end Sign_Extend; + + begin + for J in Vint_Range'Range loop + K := Vshort_Range (Integer (J) + - Integer (Vint_Range'First) + + Integer (Vshort_Range'First) + + Offset); + P16 := To_Pixel (VA.Values (K)); + P32.T := Sign_Extend (P16.T); + P32.R := unsigned_char (P16.R); + P32.G := unsigned_char (P16.G); + P32.B := unsigned_char (P16.B); + D.Values (J) := To_unsigned_int (P32); + end loop; + + return To_LL_VSI (To_Vector (D)); + end vupkxpx; + + ------------- + -- vupkhpx -- + ------------- + + function vupkhpx (A : LL_VSS) return LL_VSI is + begin + return vupkxpx (A, 0); + end vupkhpx; + + ------------- + -- vupklsb -- + ------------- + + function vupklsb (A : LL_VSC) return LL_VSS is + VA : constant VSC_View := To_View (A); + D : VSS_View; + begin + D.Values := + LL_VSC_LL_VSS_Operations.vupkxsx (VA.Values, + Varray_signed_short'Length); + return To_Vector (D); + end vupklsb; + + ------------- + -- vupklsh -- + ------------- + + function vupklsh (A : LL_VSS) return LL_VSI is + VA : constant VSS_View := To_View (A); + D : VSI_View; + begin + D.Values := + LL_VSS_LL_VSI_Operations.vupkxsx (VA.Values, + Varray_signed_int'Length); + return To_Vector (D); + end vupklsh; + + ------------- + -- vupklpx -- + ------------- + + function vupklpx (A : LL_VSS) return LL_VSI is + begin + return vupkxpx (A, Varray_signed_int'Length); + end vupklpx; + + ---------- + -- vxor -- + ---------- + + function vxor (A : LL_VSI; B : LL_VSI) return LL_VSI is + VA : constant VUI_View := To_View (To_LL_VUI (A)); + VB : constant VUI_View := To_View (To_LL_VUI (B)); + D : VUI_View; + + begin + for J in Vint_Range'Range loop + D.Values (J) := VA.Values (J) xor VB.Values (J); + end loop; + + return To_LL_VSI (To_Vector (D)); + end vxor; + + ---------------- + -- vcmpequb_p -- + ---------------- + + function vcmpequb_p (A : c_int; B : LL_VSC; C : LL_VSC) return c_int is + D : LL_VSC; + begin + D := vcmpequb (B, C); + return LL_VSC_Operations.Check_CR6 (A, To_View (D).Values); + end vcmpequb_p; + + ---------------- + -- vcmpequh_p -- + ---------------- + + function vcmpequh_p (A : c_int; B : LL_VSS; C : LL_VSS) return c_int is + D : LL_VSS; + begin + D := vcmpequh (B, C); + return LL_VSS_Operations.Check_CR6 (A, To_View (D).Values); + end vcmpequh_p; + + ---------------- + -- vcmpequw_p -- + ---------------- + + function vcmpequw_p (A : c_int; B : LL_VSI; C : LL_VSI) return c_int is + D : LL_VSI; + begin + D := vcmpequw (B, C); + return LL_VSI_Operations.Check_CR6 (A, To_View (D).Values); + end vcmpequw_p; + + ---------------- + -- vcmpeqfp_p -- + ---------------- + + function vcmpeqfp_p (A : c_int; B : LL_VF; C : LL_VF) return c_int is + D : LL_VSI; + begin + D := vcmpeqfp (B, C); + return LL_VSI_Operations.Check_CR6 (A, To_View (D).Values); + end vcmpeqfp_p; + + ---------------- + -- vcmpgtub_p -- + ---------------- + + function vcmpgtub_p (A : c_int; B : LL_VSC; C : LL_VSC) return c_int is + D : LL_VSC; + begin + D := vcmpgtub (B, C); + return LL_VSC_Operations.Check_CR6 (A, To_View (D).Values); + end vcmpgtub_p; + + ---------------- + -- vcmpgtuh_p -- + ---------------- + + function vcmpgtuh_p (A : c_int; B : LL_VSS; C : LL_VSS) return c_int is + D : LL_VSS; + begin + D := vcmpgtuh (B, C); + return LL_VSS_Operations.Check_CR6 (A, To_View (D).Values); + end vcmpgtuh_p; + + ---------------- + -- vcmpgtuw_p -- + ---------------- + + function vcmpgtuw_p (A : c_int; B : LL_VSI; C : LL_VSI) return c_int is + D : LL_VSI; + begin + D := vcmpgtuw (B, C); + return LL_VSI_Operations.Check_CR6 (A, To_View (D).Values); + end vcmpgtuw_p; + + ---------------- + -- vcmpgtsb_p -- + ---------------- + + function vcmpgtsb_p (A : c_int; B : LL_VSC; C : LL_VSC) return c_int is + D : LL_VSC; + begin + D := vcmpgtsb (B, C); + return LL_VSC_Operations.Check_CR6 (A, To_View (D).Values); + end vcmpgtsb_p; + + ---------------- + -- vcmpgtsh_p -- + ---------------- + + function vcmpgtsh_p (A : c_int; B : LL_VSS; C : LL_VSS) return c_int is + D : LL_VSS; + begin + D := vcmpgtsh (B, C); + return LL_VSS_Operations.Check_CR6 (A, To_View (D).Values); + end vcmpgtsh_p; + + ---------------- + -- vcmpgtsw_p -- + ---------------- + + function vcmpgtsw_p (A : c_int; B : LL_VSI; C : LL_VSI) return c_int is + D : LL_VSI; + begin + D := vcmpgtsw (B, C); + return LL_VSI_Operations.Check_CR6 (A, To_View (D).Values); + end vcmpgtsw_p; + + ---------------- + -- vcmpgefp_p -- + ---------------- + + function vcmpgefp_p (A : c_int; B : LL_VF; C : LL_VF) return c_int is + D : LL_VSI; + begin + D := vcmpgefp (B, C); + return LL_VSI_Operations.Check_CR6 (A, To_View (D).Values); + end vcmpgefp_p; + + ---------------- + -- vcmpgtfp_p -- + ---------------- + + function vcmpgtfp_p (A : c_int; B : LL_VF; C : LL_VF) return c_int is + D : LL_VSI; + begin + D := vcmpgtfp (B, C); + return LL_VSI_Operations.Check_CR6 (A, To_View (D).Values); + end vcmpgtfp_p; + + ---------------- + -- vcmpbfp_p -- + ---------------- + + function vcmpbfp_p (A : c_int; B : LL_VF; C : LL_VF) return c_int is + D : VSI_View; + begin + D := To_View (vcmpbfp (B, C)); + + for J in Vint_Range'Range loop + -- vcmpbfp is not returning the usual bool vector; do the conversion + if D.Values (J) = 0 then + D.Values (J) := Signed_Bool_False; + else + D.Values (J) := Signed_Bool_True; + end if; + end loop; + + return LL_VSI_Operations.Check_CR6 (A, D.Values); + end vcmpbfp_p; + +end GNAT.Altivec.Low_Level_Vectors; diff --git a/gcc/ada/g-alleve.ads b/gcc/ada/g-alleve.ads new file mode 100644 index 00000000000..8094b80ff73 --- /dev/null +++ b/gcc/ada/g-alleve.ads @@ -0,0 +1,528 @@ +------------------------------------------------------------------------------ +-- -- +-- GNAT COMPILER COMPONENTS -- +-- -- +-- G N A T . A L T I V E C . L O W _ L E V E L _ V E C T O R S -- +-- -- +-- S p e c -- +-- (Soft Binding Version) -- +-- -- +-- Copyright (C) 2004-2005, Free Software Foundation, Inc. -- +-- -- +-- GNAT is free software; you can redistribute it and/or modify it under -- +-- terms of the GNU General Public License as published by the Free Soft- -- +-- ware Foundation; either version 2, or (at your option) any later ver- -- +-- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- +-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- +-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- +-- for more details. You should have received a copy of the GNU General -- +-- Public License distributed with GNAT; see 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 other files instantiate generics from this -- +-- unit, or you link this unit with other files to produce an executable, -- +-- this unit 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 Public License. -- +-- -- +-- GNAT was originally developed by the GNAT team at New York University. -- +-- Extensive contributions were provided by Ada Core Technologies Inc. -- +-- -- +------------------------------------------------------------------------------ + +-- This unit exposes the low level vector support for the Soft binding, +-- intended for non AltiVec capable targets. See Altivec.Design for a +-- description of what is expected to be exposed. + +with GNAT.Altivec.Vector_Views; use GNAT.Altivec.Vector_Views; + +package GNAT.Altivec.Low_Level_Vectors is + + ---------------------------------------- + -- Low level vector type declarations -- + ---------------------------------------- + + type LL_VUC is private; + type LL_VSC is private; + type LL_VBC is private; + + type LL_VUS is private; + type LL_VSS is private; + type LL_VBS is private; + + type LL_VUI is private; + type LL_VSI is private; + type LL_VBI is private; + + type LL_VF is private; + type LL_VP is private; + + ------------------------------------ + -- Low level functional interface -- + ------------------------------------ + + function abs_v16qi (A : LL_VSC) return LL_VSC; + function abs_v8hi (A : LL_VSS) return LL_VSS; + function abs_v4si (A : LL_VSI) return LL_VSI; + function abs_v4sf (A : LL_VF) return LL_VF; + + function abss_v16qi (A : LL_VSC) return LL_VSC; + function abss_v8hi (A : LL_VSS) return LL_VSS; + function abss_v4si (A : LL_VSI) return LL_VSI; + + function vaddubm (A : LL_VSC; B : LL_VSC) return LL_VSC; + function vadduhm (A : LL_VSS; B : LL_VSS) return LL_VSS; + function vadduwm (A : LL_VSI; B : LL_VSI) return LL_VSI; + function vaddfp (A : LL_VF; B : LL_VF) return LL_VF; + + function vaddcuw (A : LL_VSI; B : LL_VSI) return LL_VSI; + + function vaddubs (A : LL_VSC; B : LL_VSC) return LL_VSC; + function vaddsbs (A : LL_VSC; B : LL_VSC) return LL_VSC; + function vadduhs (A : LL_VSS; B : LL_VSS) return LL_VSS; + function vaddshs (A : LL_VSS; B : LL_VSS) return LL_VSS; + function vadduws (A : LL_VSI; B : LL_VSI) return LL_VSI; + function vaddsws (A : LL_VSI; B : LL_VSI) return LL_VSI; + + function vand (A : LL_VSI; B : LL_VSI) return LL_VSI; + function vandc (A : LL_VSI; B : LL_VSI) return LL_VSI; + + function vavgub (A : LL_VSC; B : LL_VSC) return LL_VSC; + function vavgsb (A : LL_VSC; B : LL_VSC) return LL_VSC; + function vavguh (A : LL_VSS; B : LL_VSS) return LL_VSS; + function vavgsh (A : LL_VSS; B : LL_VSS) return LL_VSS; + function vavguw (A : LL_VSI; B : LL_VSI) return LL_VSI; + function vavgsw (A : LL_VSI; B : LL_VSI) return LL_VSI; + + function vcmpbfp (A : LL_VF; B : LL_VF) return LL_VSI; + + function vcmpequb (A : LL_VSC; B : LL_VSC) return LL_VSC; + function vcmpequh (A : LL_VSS; B : LL_VSS) return LL_VSS; + function vcmpequw (A : LL_VSI; B : LL_VSI) return LL_VSI; + function vcmpeqfp (A : LL_VF; B : LL_VF) return LL_VSI; + + function vcmpgefp (A : LL_VF; B : LL_VF) return LL_VSI; + + function vcmpgtub (A : LL_VSC; B : LL_VSC) return LL_VSC; + function vcmpgtsb (A : LL_VSC; B : LL_VSC) return LL_VSC; + function vcmpgtuh (A : LL_VSS; B : LL_VSS) return LL_VSS; + function vcmpgtsh (A : LL_VSS; B : LL_VSS) return LL_VSS; + function vcmpgtuw (A : LL_VSI; B : LL_VSI) return LL_VSI; + function vcmpgtsw (A : LL_VSI; B : LL_VSI) return LL_VSI; + function vcmpgtfp (A : LL_VF; B : LL_VF) return LL_VSI; + + function vcfux (A : LL_VSI; B : c_int) return LL_VF; + function vcfsx (A : LL_VSI; B : c_int) return LL_VF; + + function vctsxs (A : LL_VF; B : c_int) return LL_VSI; + function vctuxs (A : LL_VF; B : c_int) return LL_VSI; + + procedure dss (A : c_int); + procedure dssall; + + procedure dst (A : c_ptr; B : c_int; C : c_int); + procedure dstst (A : c_ptr; B : c_int; C : c_int); + procedure dststt (A : c_ptr; B : c_int; C : c_int); + procedure dstt (A : c_ptr; B : c_int; C : c_int); + + function vexptefp (A : LL_VF) return LL_VF; + + function vrfim (A : LL_VF) return LL_VF; + + function lvx (A : c_long; B : c_ptr) return LL_VSI; + function lvebx (A : c_long; B : c_ptr) return LL_VSC; + function lvehx (A : c_long; B : c_ptr) return LL_VSS; + function lvewx (A : c_long; B : c_ptr) return LL_VSI; + function lvxl (A : c_long; B : c_ptr) return LL_VSI; + + function vlogefp (A : LL_VF) return LL_VF; + + function lvsl (A : c_long; B : c_ptr) return LL_VSC; + function lvsr (A : c_long; B : c_ptr) return LL_VSC; + + function vmaddfp (A : LL_VF; B : LL_VF; C : LL_VF) return LL_VF; + + function vmhaddshs (A : LL_VSS; B : LL_VSS; C : LL_VSS) return LL_VSS; + + function vmaxub (A : LL_VSC; B : LL_VSC) return LL_VSC; + function vmaxsb (A : LL_VSC; B : LL_VSC) return LL_VSC; + function vmaxuh (A : LL_VSS; B : LL_VSS) return LL_VSS; + function vmaxsh (A : LL_VSS; B : LL_VSS) return LL_VSS; + function vmaxuw (A : LL_VSI; B : LL_VSI) return LL_VSI; + function vmaxsw (A : LL_VSI; B : LL_VSI) return LL_VSI; + function vmaxfp (A : LL_VF; B : LL_VF) return LL_VF; + + function vmrghb (A : LL_VSC; B : LL_VSC) return LL_VSC; + function vmrghh (A : LL_VSS; B : LL_VSS) return LL_VSS; + function vmrghw (A : LL_VSI; B : LL_VSI) return LL_VSI; + function vmrglb (A : LL_VSC; B : LL_VSC) return LL_VSC; + function vmrglh (A : LL_VSS; B : LL_VSS) return LL_VSS; + function vmrglw (A : LL_VSI; B : LL_VSI) return LL_VSI; + + function mfvscr return LL_VSS; + + function vminfp (A : LL_VF; B : LL_VF) return LL_VF; + function vminsb (A : LL_VSC; B : LL_VSC) return LL_VSC; + function vminsh (A : LL_VSS; B : LL_VSS) return LL_VSS; + function vminsw (A : LL_VSI; B : LL_VSI) return LL_VSI; + function vminub (A : LL_VSC; B : LL_VSC) return LL_VSC; + function vminuh (A : LL_VSS; B : LL_VSS) return LL_VSS; + function vminuw (A : LL_VSI; B : LL_VSI) return LL_VSI; + + function vmladduhm (A : LL_VSS; B : LL_VSS; C : LL_VSS) return LL_VSS; + + function vmhraddshs (A : LL_VSS; B : LL_VSS; C : LL_VSS) return LL_VSS; + + function vmsumubm (A : LL_VSC; B : LL_VSC; C : LL_VSI) return LL_VSI; + function vmsummbm (A : LL_VSC; B : LL_VSC; C : LL_VSI) return LL_VSI; + function vmsumuhm (A : LL_VSS; B : LL_VSS; C : LL_VSI) return LL_VSI; + function vmsumshm (A : LL_VSS; B : LL_VSS; C : LL_VSI) return LL_VSI; + function vmsumuhs (A : LL_VSS; B : LL_VSS; C : LL_VSI) return LL_VSI; + function vmsumshs (A : LL_VSS; B : LL_VSS; C : LL_VSI) return LL_VSI; + + procedure mtvscr (A : LL_VSI); + + function vmuleub (A : LL_VSC; B : LL_VSC) return LL_VSS; + function vmuleuh (A : LL_VSS; B : LL_VSS) return LL_VSI; + function vmulesb (A : LL_VSC; B : LL_VSC) return LL_VSS; + function vmulesh (A : LL_VSS; B : LL_VSS) return LL_VSI; + + function vmulosb (A : LL_VSC; B : LL_VSC) return LL_VSS; + function vmulosh (A : LL_VSS; B : LL_VSS) return LL_VSI; + function vmuloub (A : LL_VSC; B : LL_VSC) return LL_VSS; + function vmulouh (A : LL_VSS; B : LL_VSS) return LL_VSI; + + function vnmsubfp (A : LL_VF; B : LL_VF; C : LL_VF) return LL_VF; + + function vxor (A : LL_VSI; B : LL_VSI) return LL_VSI; + function vnor (A : LL_VSI; B : LL_VSI) return LL_VSI; + function vor (A : LL_VSI; B : LL_VSI) return LL_VSI; + + function vpkuhum (A : LL_VSS; B : LL_VSS) return LL_VSC; + function vpkuwum (A : LL_VSI; B : LL_VSI) return LL_VSS; + function vpkpx (A : LL_VSI; B : LL_VSI) return LL_VSS; + function vpkuhus (A : LL_VSS; B : LL_VSS) return LL_VSC; + function vpkuwus (A : LL_VSI; B : LL_VSI) return LL_VSS; + function vpkshss (A : LL_VSS; B : LL_VSS) return LL_VSC; + function vpkswss (A : LL_VSI; B : LL_VSI) return LL_VSS; + function vpkshus (A : LL_VSS; B : LL_VSS) return LL_VSC; + function vpkswus (A : LL_VSI; B : LL_VSI) return LL_VSS; + + function vperm_4si (A : LL_VSI; B : LL_VSI; C : LL_VSC) return LL_VSI; + + function vrefp (A : LL_VF) return LL_VF; + + function vrlb (A : LL_VSC; B : LL_VSC) return LL_VSC; + function vrlh (A : LL_VSS; B : LL_VSS) return LL_VSS; + function vrlw (A : LL_VSI; B : LL_VSI) return LL_VSI; + + function vrfin (A : LL_VF) return LL_VF; + function vrfip (A : LL_VF) return LL_VF; + function vrfiz (A : LL_VF) return LL_VF; + + function vrsqrtefp (A : LL_VF) return LL_VF; + + function vsel_4si (A : LL_VSI; B : LL_VSI; C : LL_VSI) return LL_VSI; + + function vslb (A : LL_VSC; B : LL_VSC) return LL_VSC; + function vslh (A : LL_VSS; B : LL_VSS) return LL_VSS; + function vslw (A : LL_VSI; B : LL_VSI) return LL_VSI; + + function vsldoi_4si (A : LL_VSI; B : LL_VSI; C : c_int) return LL_VSI; + function vsldoi_8hi (A : LL_VSS; B : LL_VSS; C : c_int) return LL_VSS; + function vsldoi_16qi (A : LL_VSC; B : LL_VSC; C : c_int) return LL_VSC; + function vsldoi_4sf (A : LL_VF; B : LL_VF; C : c_int) return LL_VF; + + function vsl (A : LL_VSI; B : LL_VSI) return LL_VSI; + function vslo (A : LL_VSI; B : LL_VSI) return LL_VSI; + + function vspltb (A : LL_VSC; B : c_int) return LL_VSC; + function vsplth (A : LL_VSS; B : c_int) return LL_VSS; + function vspltw (A : LL_VSI; B : c_int) return LL_VSI; + + function vspltisb (A : c_int) return LL_VSC; + function vspltish (A : c_int) return LL_VSS; + function vspltisw (A : c_int) return LL_VSI; + + function vsrb (A : LL_VSC; B : LL_VSC) return LL_VSC; + function vsrh (A : LL_VSS; B : LL_VSS) return LL_VSS; + function vsrw (A : LL_VSI; B : LL_VSI) return LL_VSI; + + function vsrab (A : LL_VSC; B : LL_VSC) return LL_VSC; + function vsrah (A : LL_VSS; B : LL_VSS) return LL_VSS; + function vsraw (A : LL_VSI; B : LL_VSI) return LL_VSI; + + function vsr (A : LL_VSI; B : LL_VSI) return LL_VSI; + function vsro (A : LL_VSI; B : LL_VSI) return LL_VSI; + + procedure stvx (A : LL_VSI; B : c_int; C : c_ptr); + procedure stvebx (A : LL_VSC; B : c_int; C : c_ptr); + procedure stvehx (A : LL_VSS; B : c_int; C : c_ptr); + procedure stvewx (A : LL_VSI; B : c_int; C : c_ptr); + procedure stvxl (A : LL_VSI; B : c_int; C : c_ptr); + + function vsububm (A : LL_VSC; B : LL_VSC) return LL_VSC; + function vsubuhm (A : LL_VSS; B : LL_VSS) return LL_VSS; + function vsubuwm (A : LL_VSI; B : LL_VSI) return LL_VSI; + function vsubfp (A : LL_VF; B : LL_VF) return LL_VF; + + function vsubcuw (A : LL_VSI; B : LL_VSI) return LL_VSI; + + function vsububs (A : LL_VSC; B : LL_VSC) return LL_VSC; + function vsubsbs (A : LL_VSC; B : LL_VSC) return LL_VSC; + function vsubuhs (A : LL_VSS; B : LL_VSS) return LL_VSS; + function vsubshs (A : LL_VSS; B : LL_VSS) return LL_VSS; + function vsubuws (A : LL_VSI; B : LL_VSI) return LL_VSI; + function vsubsws (A : LL_VSI; B : LL_VSI) return LL_VSI; + + function vsum4ubs (A : LL_VSC; B : LL_VSI) return LL_VSI; + function vsum4sbs (A : LL_VSC; B : LL_VSI) return LL_VSI; + function vsum4shs (A : LL_VSS; B : LL_VSI) return LL_VSI; + + function vsum2sws (A : LL_VSI; B : LL_VSI) return LL_VSI; + function vsumsws (A : LL_VSI; B : LL_VSI) return LL_VSI; + + function vupkhsb (A : LL_VSC) return LL_VSS; + function vupkhsh (A : LL_VSS) return LL_VSI; + function vupkhpx (A : LL_VSS) return LL_VSI; + + function vupklsb (A : LL_VSC) return LL_VSS; + function vupklsh (A : LL_VSS) return LL_VSI; + function vupklpx (A : LL_VSS) return LL_VSI; + + function vcmpequb_p (A : c_int; B : LL_VSC; C : LL_VSC) return c_int; + function vcmpequh_p (A : c_int; B : LL_VSS; C : LL_VSS) return c_int; + function vcmpequw_p (A : c_int; B : LL_VSI; C : LL_VSI) return c_int; + function vcmpeqfp_p (A : c_int; B : LL_VF; C : LL_VF) return c_int; + + function vcmpgtub_p (A : c_int; B : LL_VSC; C : LL_VSC) return c_int; + function vcmpgtuh_p (A : c_int; B : LL_VSS; C : LL_VSS) return c_int; + function vcmpgtuw_p (A : c_int; B : LL_VSI; C : LL_VSI) return c_int; + function vcmpgtsb_p (A : c_int; B : LL_VSC; C : LL_VSC) return c_int; + function vcmpgtsh_p (A : c_int; B : LL_VSS; C : LL_VSS) return c_int; + function vcmpgtsw_p (A : c_int; B : LL_VSI; C : LL_VSI) return c_int; + function vcmpgtfp_p (A : c_int; B : LL_VF; C : LL_VF) return c_int; + + function vcmpgefp_p (A : c_int; B : LL_VF; C : LL_VF) return c_int; + function vcmpbfp_p (A : c_int; B : LL_VF; C : LL_VF) return c_int; + +private + + --------------------------------------- + -- Low level vector type definitions -- + --------------------------------------- + + -- We simply use the natural array definitions corresponding to each + -- user-level vector type. + + type LL_VUI is new VUC_View; + type LL_VSI is new VUC_View; + + type LL_VUS is new VUC_View; + type LL_VSS is new VUC_View; + + type LL_VUC is new VUC_View; + type LL_VSC is new VUC_View; + + type LL_VF is new VUC_View; + + type LL_VBC is new VUC_View; + type LL_VBS is new VUC_View; + type LL_VBI is new VUC_View; + type LL_VP is new VUC_View; + + ------------------------------------ + -- Low level functional interface -- + ------------------------------------ + + pragma Convention_Identifier (LL_Altivec, C); + + pragma Export (LL_Altivec, dss, "__builtin_altivec_dss"); + pragma Export (LL_Altivec, dssall, "__builtin_altivec_dssall"); + pragma Export (LL_Altivec, dst, "__builtin_altivec_dst"); + pragma Export (LL_Altivec, dstst, "__builtin_altivec_dstst"); + pragma Export (LL_Altivec, dststt, "__builtin_altivec_dststt"); + pragma Export (LL_Altivec, dstt, "__builtin_altivec_dstt"); + pragma Export (LL_Altivec, mtvscr, "__builtin_altivec_mtvscr"); + pragma Export (LL_Altivec, mfvscr, "__builtin_altivec_mfvscr"); + pragma Export (LL_Altivec, stvebx, "__builtin_altivec_stvebx"); + pragma Export (LL_Altivec, stvehx, "__builtin_altivec_stvehx"); + pragma Export (LL_Altivec, stvewx, "__builtin_altivec_stvewx"); + pragma Export (LL_Altivec, stvx, "__builtin_altivec_stvx"); + pragma Export (LL_Altivec, stvxl, "__builtin_altivec_stvxl"); + pragma Export (LL_Altivec, lvebx, "__builtin_altivec_lvebx"); + pragma Export (LL_Altivec, lvehx, "__builtin_altivec_lvehx"); + pragma Export (LL_Altivec, lvewx, "__builtin_altivec_lvewx"); + pragma Export (LL_Altivec, lvx, "__builtin_altivec_lvx"); + pragma Export (LL_Altivec, lvxl, "__builtin_altivec_lvxl"); + pragma Export (LL_Altivec, lvsl, "__builtin_altivec_lvsl"); + pragma Export (LL_Altivec, lvsr, "__builtin_altivec_lvsr"); + pragma Export (LL_Altivec, abs_v16qi, "__builtin_altivec_abs_v16qi"); + pragma Export (LL_Altivec, abs_v8hi, "__builtin_altivec_abs_v8hi"); + pragma Export (LL_Altivec, abs_v4si, "__builtin_altivec_abs_v4si"); + pragma Export (LL_Altivec, abs_v4sf, "__builtin_altivec_abs_v4sf"); + pragma Export (LL_Altivec, abss_v16qi, "__builtin_altivec_abss_v16qi"); + pragma Export (LL_Altivec, abss_v8hi, "__builtin_altivec_abss_v8hi"); + pragma Export (LL_Altivec, abss_v4si, "__builtin_altivec_abss_v4si"); + pragma Export (LL_Altivec, vaddcuw, "__builtin_altivec_vaddcuw"); + pragma Export (LL_Altivec, vaddfp, "__builtin_altivec_vaddfp"); + pragma Export (LL_Altivec, vaddsbs, "__builtin_altivec_vaddsbs"); + pragma Export (LL_Altivec, vaddshs, "__builtin_altivec_vaddshs"); + pragma Export (LL_Altivec, vaddsws, "__builtin_altivec_vaddsws"); + pragma Export (LL_Altivec, vaddubm, "__builtin_altivec_vaddubm"); + pragma Export (LL_Altivec, vaddubs, "__builtin_altivec_vaddubs"); + pragma Export (LL_Altivec, vadduhm, "__builtin_altivec_vadduhm"); + pragma Export (LL_Altivec, vadduhs, "__builtin_altivec_vadduhs"); + pragma Export (LL_Altivec, vadduwm, "__builtin_altivec_vadduwm"); + pragma Export (LL_Altivec, vadduws, "__builtin_altivec_vadduws"); + pragma Export (LL_Altivec, vand, "__builtin_altivec_vand"); + pragma Export (LL_Altivec, vandc, "__builtin_altivec_vandc"); + pragma Export (LL_Altivec, vavgsb, "__builtin_altivec_vavgsb"); + pragma Export (LL_Altivec, vavgsh, "__builtin_altivec_vavgsh"); + pragma Export (LL_Altivec, vavgsw, "__builtin_altivec_vavgsw"); + pragma Export (LL_Altivec, vavgub, "__builtin_altivec_vavgub"); + pragma Export (LL_Altivec, vavguh, "__builtin_altivec_vavguh"); + pragma Export (LL_Altivec, vavguw, "__builtin_altivec_vavguw"); + pragma Export (LL_Altivec, vcfsx, "__builtin_altivec_vcfsx"); + pragma Export (LL_Altivec, vcfux, "__builtin_altivec_vcfux"); + pragma Export (LL_Altivec, vcmpbfp, "__builtin_altivec_vcmpbfp"); + pragma Export (LL_Altivec, vcmpeqfp, "__builtin_altivec_vcmpeqfp"); + pragma Export (LL_Altivec, vcmpequb, "__builtin_altivec_vcmpequb"); + pragma Export (LL_Altivec, vcmpequh, "__builtin_altivec_vcmpequh"); + pragma Export (LL_Altivec, vcmpequw, "__builtin_altivec_vcmpequw"); + pragma Export (LL_Altivec, vcmpgefp, "__builtin_altivec_vcmpgefp"); + pragma Export (LL_Altivec, vcmpgtfp, "__builtin_altivec_vcmpgtfp"); + pragma Export (LL_Altivec, vcmpgtsb, "__builtin_altivec_vcmpgtsb"); + pragma Export (LL_Altivec, vcmpgtsh, "__builtin_altivec_vcmpgtsh"); + pragma Export (LL_Altivec, vcmpgtsw, "__builtin_altivec_vcmpgtsw"); + pragma Export (LL_Altivec, vcmpgtub, "__builtin_altivec_vcmpgtub"); + pragma Export (LL_Altivec, vcmpgtuh, "__builtin_altivec_vcmpgtuh"); + pragma Export (LL_Altivec, vcmpgtuw, "__builtin_altivec_vcmpgtuw"); + pragma Export (LL_Altivec, vctsxs, "__builtin_altivec_vctsxs"); + pragma Export (LL_Altivec, vctuxs, "__builtin_altivec_vctuxs"); + pragma Export (LL_Altivec, vexptefp, "__builtin_altivec_vexptefp"); + pragma Export (LL_Altivec, vlogefp, "__builtin_altivec_vlogefp"); + pragma Export (LL_Altivec, vmaddfp, "__builtin_altivec_vmaddfp"); + pragma Export (LL_Altivec, vmaxfp, "__builtin_altivec_vmaxfp"); + pragma Export (LL_Altivec, vmaxsb, "__builtin_altivec_vmaxsb"); + pragma Export (LL_Altivec, vmaxsh, "__builtin_altivec_vmaxsh"); + pragma Export (LL_Altivec, vmaxsw, "__builtin_altivec_vmaxsw"); + pragma Export (LL_Altivec, vmaxub, "__builtin_altivec_vmaxub"); + pragma Export (LL_Altivec, vmaxuh, "__builtin_altivec_vmaxuh"); + pragma Export (LL_Altivec, vmaxuw, "__builtin_altivec_vmaxuw"); + pragma Export (LL_Altivec, vmhaddshs, "__builtin_altivec_vmhaddshs"); + pragma Export (LL_Altivec, vmhraddshs, "__builtin_altivec_vmhraddshs"); + pragma Export (LL_Altivec, vminfp, "__builtin_altivec_vminfp"); + pragma Export (LL_Altivec, vminsb, "__builtin_altivec_vminsb"); + pragma Export (LL_Altivec, vminsh, "__builtin_altivec_vminsh"); + pragma Export (LL_Altivec, vminsw, "__builtin_altivec_vminsw"); + pragma Export (LL_Altivec, vminub, "__builtin_altivec_vminub"); + pragma Export (LL_Altivec, vminuh, "__builtin_altivec_vminuh"); + pragma Export (LL_Altivec, vminuw, "__builtin_altivec_vminuw"); + pragma Export (LL_Altivec, vmladduhm, "__builtin_altivec_vmladduhm"); + pragma Export (LL_Altivec, vmrghb, "__builtin_altivec_vmrghb"); + pragma Export (LL_Altivec, vmrghh, "__builtin_altivec_vmrghh"); + pragma Export (LL_Altivec, vmrghw, "__builtin_altivec_vmrghw"); + pragma Export (LL_Altivec, vmrglb, "__builtin_altivec_vmrglb"); + pragma Export (LL_Altivec, vmrglh, "__builtin_altivec_vmrglh"); + pragma Export (LL_Altivec, vmrglw, "__builtin_altivec_vmrglw"); + pragma Export (LL_Altivec, vmsummbm, "__builtin_altivec_vmsummbm"); + pragma Export (LL_Altivec, vmsumshm, "__builtin_altivec_vmsumshm"); + pragma Export (LL_Altivec, vmsumshs, "__builtin_altivec_vmsumshs"); + pragma Export (LL_Altivec, vmsumubm, "__builtin_altivec_vmsumubm"); + pragma Export (LL_Altivec, vmsumuhm, "__builtin_altivec_vmsumuhm"); + pragma Export (LL_Altivec, vmsumuhs, "__builtin_altivec_vmsumuhs"); + pragma Export (LL_Altivec, vmulesb, "__builtin_altivec_vmulesb"); + pragma Export (LL_Altivec, vmulesh, "__builtin_altivec_vmulesh"); + pragma Export (LL_Altivec, vmuleub, "__builtin_altivec_vmuleub"); + pragma Export (LL_Altivec, vmuleuh, "__builtin_altivec_vmuleuh"); + pragma Export (LL_Altivec, vmulosb, "__builtin_altivec_vmulosb"); + pragma Export (LL_Altivec, vmulosh, "__builtin_altivec_vmulosh"); + pragma Export (LL_Altivec, vmuloub, "__builtin_altivec_vmuloub"); + pragma Export (LL_Altivec, vmulouh, "__builtin_altivec_vmulouh"); + pragma Export (LL_Altivec, vnmsubfp, "__builtin_altivec_vnmsubfp"); + pragma Export (LL_Altivec, vnor, "__builtin_altivec_vnor"); + pragma Export (LL_Altivec, vxor, "__builtin_altivec_vxor"); + pragma Export (LL_Altivec, vor, "__builtin_altivec_vor"); + pragma Export (LL_Altivec, vperm_4si, "__builtin_altivec_vperm_4si"); + pragma Export (LL_Altivec, vpkpx, "__builtin_altivec_vpkpx"); + pragma Export (LL_Altivec, vpkshss, "__builtin_altivec_vpkshss"); + pragma Export (LL_Altivec, vpkshus, "__builtin_altivec_vpkshus"); + pragma Export (LL_Altivec, vpkswss, "__builtin_altivec_vpkswss"); + pragma Export (LL_Altivec, vpkswus, "__builtin_altivec_vpkswus"); + pragma Export (LL_Altivec, vpkuhum, "__builtin_altivec_vpkuhum"); + pragma Export (LL_Altivec, vpkuhus, "__builtin_altivec_vpkuhus"); + pragma Export (LL_Altivec, vpkuwum, "__builtin_altivec_vpkuwum"); + pragma Export (LL_Altivec, vpkuwus, "__builtin_altivec_vpkuwus"); + pragma Export (LL_Altivec, vrefp, "__builtin_altivec_vrefp"); + pragma Export (LL_Altivec, vrfim, "__builtin_altivec_vrfim"); + pragma Export (LL_Altivec, vrfin, "__builtin_altivec_vrfin"); + pragma Export (LL_Altivec, vrfip, "__builtin_altivec_vrfip"); + pragma Export (LL_Altivec, vrfiz, "__builtin_altivec_vrfiz"); + pragma Export (LL_Altivec, vrlb, "__builtin_altivec_vrlb"); + pragma Export (LL_Altivec, vrlh, "__builtin_altivec_vrlh"); + pragma Export (LL_Altivec, vrlw, "__builtin_altivec_vrlw"); + pragma Export (LL_Altivec, vrsqrtefp, "__builtin_altivec_vrsqrtefp"); + pragma Export (LL_Altivec, vsel_4si, "__builtin_altivec_vsel_4si"); + pragma Export (LL_Altivec, vsldoi_4si, "__builtin_altivec_vsldoi_4si"); + pragma Export (LL_Altivec, vsldoi_8hi, "__builtin_altivec_vsldoi_8hi"); + pragma Export (LL_Altivec, vsldoi_16qi, "__builtin_altivec_vsldoi_16qi"); + pragma Export (LL_Altivec, vsldoi_4sf, "__builtin_altivec_vsldoi_4sf"); + pragma Export (LL_Altivec, vsl, "__builtin_altivec_vsl"); + pragma Export (LL_Altivec, vslb, "__builtin_altivec_vslb"); + pragma Export (LL_Altivec, vslh, "__builtin_altivec_vslh"); + pragma Export (LL_Altivec, vslo, "__builtin_altivec_vslo"); + pragma Export (LL_Altivec, vslw, "__builtin_altivec_vslw"); + pragma Export (LL_Altivec, vspltb, "__builtin_altivec_vspltb"); + pragma Export (LL_Altivec, vsplth, "__builtin_altivec_vsplth"); + pragma Export (LL_Altivec, vspltisb, "__builtin_altivec_vspltisb"); + pragma Export (LL_Altivec, vspltish, "__builtin_altivec_vspltish"); + pragma Export (LL_Altivec, vspltisw, "__builtin_altivec_vspltisw"); + pragma Export (LL_Altivec, vspltw, "__builtin_altivec_vspltw"); + pragma Export (LL_Altivec, vsr, "__builtin_altivec_vsr"); + pragma Export (LL_Altivec, vsrab, "__builtin_altivec_vsrab"); + pragma Export (LL_Altivec, vsrah, "__builtin_altivec_vsrah"); + pragma Export (LL_Altivec, vsraw, "__builtin_altivec_vsraw"); + pragma Export (LL_Altivec, vsrb, "__builtin_altivec_vsrb"); + pragma Export (LL_Altivec, vsrh, "__builtin_altivec_vsrh"); + pragma Export (LL_Altivec, vsro, "__builtin_altivec_vsro"); + pragma Export (LL_Altivec, vsrw, "__builtin_altivec_vsrw"); + pragma Export (LL_Altivec, vsubcuw, "__builtin_altivec_vsubcuw"); + pragma Export (LL_Altivec, vsubfp, "__builtin_altivec_vsubfp"); + pragma Export (LL_Altivec, vsubsbs, "__builtin_altivec_vsubsbs"); + pragma Export (LL_Altivec, vsubshs, "__builtin_altivec_vsubshs"); + pragma Export (LL_Altivec, vsubsws, "__builtin_altivec_vsubsws"); + pragma Export (LL_Altivec, vsububm, "__builtin_altivec_vsububm"); + pragma Export (LL_Altivec, vsububs, "__builtin_altivec_vsububs"); + pragma Export (LL_Altivec, vsubuhm, "__builtin_altivec_vsubuhm"); + pragma Export (LL_Altivec, vsubuhs, "__builtin_altivec_vsubuhs"); + pragma Export (LL_Altivec, vsubuwm, "__builtin_altivec_vsubuwm"); + pragma Export (LL_Altivec, vsubuws, "__builtin_altivec_vsubuws"); + pragma Export (LL_Altivec, vsum2sws, "__builtin_altivec_vsum2sws"); + pragma Export (LL_Altivec, vsum4sbs, "__builtin_altivec_vsum4sbs"); + pragma Export (LL_Altivec, vsum4shs, "__builtin_altivec_vsum4shs"); + pragma Export (LL_Altivec, vsum4ubs, "__builtin_altivec_vsum4ubs"); + pragma Export (LL_Altivec, vsumsws, "__builtin_altivec_vsumsws"); + pragma Export (LL_Altivec, vupkhpx, "__builtin_altivec_vupkhpx"); + pragma Export (LL_Altivec, vupkhsb, "__builtin_altivec_vupkhsb"); + pragma Export (LL_Altivec, vupkhsh, "__builtin_altivec_vupkhsh"); + pragma Export (LL_Altivec, vupklpx, "__builtin_altivec_vupklpx"); + pragma Export (LL_Altivec, vupklsb, "__builtin_altivec_vupklsb"); + pragma Export (LL_Altivec, vupklsh, "__builtin_altivec_vupklsh"); + pragma Export (LL_Altivec, vcmpbfp_p, "__builtin_altivec_vcmpbfp_p"); + pragma Export (LL_Altivec, vcmpeqfp_p, "__builtin_altivec_vcmpeqfp_p"); + pragma Export (LL_Altivec, vcmpgefp_p, "__builtin_altivec_vcmpgefp_p"); + pragma Export (LL_Altivec, vcmpgtfp_p, "__builtin_altivec_vcmpgtfp_p"); + pragma Export (LL_Altivec, vcmpequw_p, "__builtin_altivec_vcmpequw_p"); + pragma Export (LL_Altivec, vcmpgtsw_p, "__builtin_altivec_vcmpgtsw_p"); + pragma Export (LL_Altivec, vcmpgtuw_p, "__builtin_altivec_vcmpgtuw_p"); + pragma Export (LL_Altivec, vcmpgtuh_p, "__builtin_altivec_vcmpgtuh_p"); + pragma Export (LL_Altivec, vcmpgtsh_p, "__builtin_altivec_vcmpgtsh_p"); + pragma Export (LL_Altivec, vcmpequh_p, "__builtin_altivec_vcmpequh_p"); + pragma Export (LL_Altivec, vcmpequb_p, "__builtin_altivec_vcmpequb_p"); + pragma Export (LL_Altivec, vcmpgtsb_p, "__builtin_altivec_vcmpgtsb_p"); + pragma Export (LL_Altivec, vcmpgtub_p, "__builtin_altivec_vcmpgtub_p"); + +end GNAT.Altivec.Low_Level_Vectors; diff --git a/gcc/ada/g-altcon.adb b/gcc/ada/g-altcon.adb new file mode 100644 index 00000000000..2969ba24755 --- /dev/null +++ b/gcc/ada/g-altcon.adb @@ -0,0 +1,486 @@ +------------------------------------------------------------------------------ +-- -- +-- GNAT COMPILER COMPONENTS -- +-- -- +-- G N A T . A L T I V E C . C O N V E R S I O N S -- +-- -- +-- B o d y -- +-- -- +-- Copyright (C) 2005, Free Software Foundation, Inc. -- +-- -- +-- GNAT is free software; you can redistribute it and/or modify it under -- +-- terms of the GNU General Public License as published by the Free Soft- -- +-- ware Foundation; either version 2, or (at your option) any later ver- -- +-- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- +-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- +-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- +-- for more details. You should have received a copy of the GNU General -- +-- Public License distributed with GNAT; see 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 other files instantiate generics from this -- +-- unit, or you link this unit with other files to produce an executable, -- +-- this unit 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 Public License. -- +-- -- +-- GNAT was originally developed by the GNAT team at New York University. -- +-- Extensive contributions were provided by Ada Core Technologies Inc. -- +-- -- +------------------------------------------------------------------------------ + +with Ada.Unchecked_Conversion; + +with System; use System; + +with GNAT.Altivec.Low_Level_Interface; use GNAT.Altivec.Low_Level_Interface; +with GNAT.Altivec.Low_Level_Vectors; use GNAT.Altivec.Low_Level_Vectors; + +package body GNAT.Altivec.Conversions is + + function To_Varray_unsigned_char is + new Ada.Unchecked_Conversion (Varray_signed_char, + Varray_unsigned_char); + + function To_Varray_unsigned_char is + new Ada.Unchecked_Conversion (Varray_bool_char, + Varray_unsigned_char); + + function To_Varray_unsigned_short is + new Ada.Unchecked_Conversion (Varray_signed_short, + Varray_unsigned_short); + + function To_Varray_unsigned_short is + new Ada.Unchecked_Conversion (Varray_bool_short, + Varray_unsigned_short); + + function To_Varray_unsigned_short is + new Ada.Unchecked_Conversion (Varray_pixel, + Varray_unsigned_short); + + function To_Varray_unsigned_int is + new Ada.Unchecked_Conversion (Varray_signed_int, + Varray_unsigned_int); + + function To_Varray_unsigned_int is + new Ada.Unchecked_Conversion (Varray_bool_int, + Varray_unsigned_int); + + function To_Varray_unsigned_int is + new Ada.Unchecked_Conversion (Varray_float, + Varray_unsigned_int); + + function To_Varray_signed_char is + new Ada.Unchecked_Conversion (Varray_unsigned_char, + Varray_signed_char); + + function To_Varray_bool_char is + new Ada.Unchecked_Conversion (Varray_unsigned_char, + Varray_bool_char); + + function To_Varray_signed_short is + new Ada.Unchecked_Conversion (Varray_unsigned_short, + Varray_signed_short); + + function To_Varray_bool_short is + new Ada.Unchecked_Conversion (Varray_unsigned_short, + Varray_bool_short); + + function To_Varray_pixel is + new Ada.Unchecked_Conversion (Varray_unsigned_short, + Varray_pixel); + + function To_Varray_signed_int is + new Ada.Unchecked_Conversion (Varray_unsigned_int, + Varray_signed_int); + + function To_Varray_bool_int is + new Ada.Unchecked_Conversion (Varray_unsigned_int, + Varray_bool_int); + + function To_Varray_float is + new Ada.Unchecked_Conversion (Varray_unsigned_int, + Varray_float); + + function To_VUC is new Ada.Unchecked_Conversion (VUC_View, VUC); + function To_VSC is new Ada.Unchecked_Conversion (VSC_View, VSC); + function To_VBC is new Ada.Unchecked_Conversion (VBC_View, VBC); + function To_VUS is new Ada.Unchecked_Conversion (VUS_View, VUS); + function To_VSS is new Ada.Unchecked_Conversion (VSS_View, VSS); + function To_VBS is new Ada.Unchecked_Conversion (VBS_View, VBS); + function To_VUI is new Ada.Unchecked_Conversion (VUI_View, VUI); + function To_VSI is new Ada.Unchecked_Conversion (VSI_View, VSI); + function To_VBI is new Ada.Unchecked_Conversion (VBI_View, VBI); + function To_VF is new Ada.Unchecked_Conversion (VF_View, VF); + function To_VP is new Ada.Unchecked_Conversion (VP_View, VP); + + function To_VUC_View is new Ada.Unchecked_Conversion (VUC, VUC_View); + function To_VSC_View is new Ada.Unchecked_Conversion (VSC, VSC_View); + function To_VBC_View is new Ada.Unchecked_Conversion (VBC, VBC_View); + function To_VUS_View is new Ada.Unchecked_Conversion (VUS, VUS_View); + function To_VSS_View is new Ada.Unchecked_Conversion (VSS, VSS_View); + function To_VBS_View is new Ada.Unchecked_Conversion (VBS, VBS_View); + function To_VUI_View is new Ada.Unchecked_Conversion (VUI, VUI_View); + function To_VSI_View is new Ada.Unchecked_Conversion (VSI, VSI_View); + function To_VBI_View is new Ada.Unchecked_Conversion (VBI, VBI_View); + function To_VF_View is new Ada.Unchecked_Conversion (VF, VF_View); + function To_VP_View is new Ada.Unchecked_Conversion (VP, VP_View); + + pragma Warnings (Off, Default_Bit_Order); + + --------------- + -- To_Vector -- + --------------- + + function To_Vector (S : VSC_View) return VSC is + begin + if Default_Bit_Order = High_Order_First then + return To_VSC (S); + else + declare + Result : LL_VUC; + VS : constant VUC_View := + (Values => To_Varray_unsigned_char (S.Values)); + begin + Result := To_Vector (VS); + return To_LL_VSC (Result); + end; + end if; + end To_Vector; + + function To_Vector (S : VBC_View) return VBC is + begin + if Default_Bit_Order = High_Order_First then + return To_VBC (S); + else + declare + Result : LL_VUC; + VS : constant VUC_View := + (Values => To_Varray_unsigned_char (S.Values)); + begin + Result := To_Vector (VS); + return To_LL_VBC (Result); + end; + end if; + end To_Vector; + + function To_Vector (S : VSS_View) return VSS is + begin + if Default_Bit_Order = High_Order_First then + return To_VSS (S); + else + declare + Result : LL_VUS; + VS : constant VUS_View := + (Values => To_Varray_unsigned_short (S.Values)); + begin + Result := To_Vector (VS); + return VSS (To_LL_VSS (Result)); + end; + end if; + end To_Vector; + + function To_Vector (S : VBS_View) return VBS is + begin + if Default_Bit_Order = High_Order_First then + return To_VBS (S); + else + declare + Result : LL_VUS; + VS : constant VUS_View := + (Values => To_Varray_unsigned_short (S.Values)); + begin + Result := To_Vector (VS); + return To_LL_VBS (Result); + end; + end if; + end To_Vector; + + function To_Vector (S : VP_View) return VP is + begin + if Default_Bit_Order = High_Order_First then + return To_VP (S); + else + declare + Result : LL_VUS; + VS : constant VUS_View := + (Values => To_Varray_unsigned_short (S.Values)); + begin + Result := To_Vector (VS); + return To_LL_VP (Result); + end; + end if; + end To_Vector; + + function To_Vector (S : VSI_View) return VSI is + begin + if Default_Bit_Order = High_Order_First then + return To_VSI (S); + else + declare + Result : LL_VUI; + VS : constant VUI_View := + (Values => To_Varray_unsigned_int (S.Values)); + begin + Result := To_Vector (VS); + return To_LL_VSI (Result); + end; + end if; + end To_Vector; + + function To_Vector (S : VBI_View) return VBI is + begin + if Default_Bit_Order = High_Order_First then + return To_VBI (S); + else + declare + Result : LL_VUI; + VS : constant VUI_View := + (Values => To_Varray_unsigned_int (S.Values)); + begin + Result := To_Vector (VS); + return To_LL_VBI (Result); + end; + end if; + end To_Vector; + + function To_Vector (S : VF_View) return VF is + begin + if Default_Bit_Order = High_Order_First then + return To_VF (S); + else + declare + Result : LL_VUI; + VS : constant VUI_View := + (Values => To_Varray_unsigned_int (S.Values)); + begin + Result := To_Vector (VS); + return To_LL_VF (Result); + end; + end if; + end To_Vector; + + function To_Vector (S : VUC_View) return VUC is + begin + if Default_Bit_Order = High_Order_First then + return To_VUC (S); + else + declare + Result : VUC_View; + begin + for J in Vchar_Range'Range loop + Result.Values (J) := + S.Values (Vchar_Range'Last - J + Vchar_Range'First); + end loop; + return To_VUC (Result); + end; + end if; + end To_Vector; + + function To_Vector (S : VUS_View) return VUS is + begin + if Default_Bit_Order = High_Order_First then + return To_VUS (S); + else + declare + Result : VUS_View; + begin + for J in Vshort_Range'Range loop + Result.Values (J) := + S.Values (Vshort_Range'Last - J + Vshort_Range'First); + end loop; + return To_VUS (Result); + end; + end if; + end To_Vector; + + function To_Vector (S : VUI_View) return VUI is + begin + if Default_Bit_Order = High_Order_First then + return To_VUI (S); + else + declare + Result : VUI_View; + begin + for J in Vint_Range'Range loop + Result.Values (J) := + S.Values (Vint_Range'Last - J + Vint_Range'First); + end loop; + return To_VUI (Result); + end; + end if; + end To_Vector; + + -------------- + -- To_View -- + -------------- + + function To_View (S : VSC) return VSC_View is + begin + if Default_Bit_Order = High_Order_First then + return To_VSC_View (S); + else + declare + Result : VUC_View; + begin + Result := To_View (To_LL_VUC (S)); + return (Values => To_Varray_signed_char (Result.Values)); + end; + end if; + end To_View; + + function To_View (S : VBC) return VBC_View is + begin + if Default_Bit_Order = High_Order_First then + return To_VBC_View (S); + else + declare + Result : VUC_View; + begin + Result := To_View (To_LL_VUC (S)); + return (Values => To_Varray_bool_char (Result.Values)); + end; + end if; + end To_View; + + function To_View (S : VSS) return VSS_View is + begin + if Default_Bit_Order = High_Order_First then + return To_VSS_View (S); + else + declare + Result : VUS_View; + begin + Result := To_View (To_LL_VUS (S)); + return (Values => To_Varray_signed_short (Result.Values)); + end; + end if; + end To_View; + + function To_View (S : VBS) return VBS_View is + begin + if Default_Bit_Order = High_Order_First then + return To_VBS_View (S); + else + declare + Result : VUS_View; + begin + Result := To_View (To_LL_VUS (S)); + return (Values => To_Varray_bool_short (Result.Values)); + end; + end if; + end To_View; + + function To_View (S : VP) return VP_View is + begin + if Default_Bit_Order = High_Order_First then + return To_VP_View (S); + else + declare + Result : VUS_View; + begin + Result := To_View (To_LL_VUS (S)); + return (Values => To_Varray_pixel (Result.Values)); + end; + end if; + end To_View; + + function To_View (S : VSI) return VSI_View is + begin + if Default_Bit_Order = High_Order_First then + return To_VSI_View (S); + else + declare + Result : VUI_View; + begin + Result := To_View (To_LL_VUI (S)); + return (Values => To_Varray_signed_int (Result.Values)); + end; + end if; + end To_View; + + function To_View (S : VBI) return VBI_View is + begin + if Default_Bit_Order = High_Order_First then + return To_VBI_View (S); + else + declare + Result : VUI_View; + begin + Result := To_View (To_LL_VUI (S)); + return (Values => To_Varray_bool_int (Result.Values)); + end; + end if; + end To_View; + + function To_View (S : VF) return VF_View is + begin + if Default_Bit_Order = High_Order_First then + return To_VF_View (S); + else + declare + Result : VUI_View; + begin + Result := To_View (To_LL_VUI (S)); + return (Values => To_Varray_float (Result.Values)); + end; + end if; + end To_View; + + function To_View (S : VUC) return VUC_View is + begin + if Default_Bit_Order = High_Order_First then + return To_VUC_View (S); + else + declare + VS : constant VUC_View := To_VUC_View (S); + Result : VUC_View; + begin + for J in Vchar_Range'Range loop + Result.Values (J) := + VS.Values (Vchar_Range'Last - J + Vchar_Range'First); + end loop; + return Result; + end; + end if; + end To_View; + + function To_View (S : VUS) return VUS_View is + begin + if Default_Bit_Order = High_Order_First then + return To_VUS_View (S); + else + declare + VS : constant VUS_View := To_VUS_View (S); + Result : VUS_View; + begin + for J in Vshort_Range'Range loop + Result.Values (J) := + VS.Values (Vshort_Range'Last - J + Vshort_Range'First); + end loop; + return Result; + end; + end if; + end To_View; + + function To_View (S : VUI) return VUI_View is + begin + if Default_Bit_Order = High_Order_First then + return To_VUI_View (S); + else + declare + VS : constant VUI_View := To_VUI_View (S); + Result : VUI_View; + begin + for J in Vint_Range'Range loop + Result.Values (J) := + VS.Values (Vint_Range'Last - J + Vint_Range'First); + end loop; + return Result; + end; + end if; + end To_View; + +end GNAT.Altivec.Conversions; diff --git a/gcc/ada/g-altcon.ads b/gcc/ada/g-altcon.ads new file mode 100644 index 00000000000..d32ac8a904b --- /dev/null +++ b/gcc/ada/g-altcon.ads @@ -0,0 +1,103 @@ +------------------------------------------------------------------------------ +-- -- +-- GNAT COMPILER COMPONENTS -- +-- -- +-- G N A T . A L T I V E C . C O N V E R S I O N S -- +-- -- +-- S p e c -- +-- -- +-- Copyright (C) 2005, Free Software Foundation, Inc. -- +-- -- +-- GNAT is free software; you can redistribute it and/or modify it under -- +-- terms of the GNU General Public License as published by the Free Soft- -- +-- ware Foundation; either version 2, or (at your option) any later ver- -- +-- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- +-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- +-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- +-- for more details. You should have received a copy of the GNU General -- +-- Public License distributed with GNAT; see 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 other files instantiate generics from this -- +-- unit, or you link this unit with other files to produce an executable, -- +-- this unit 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 Public License. -- +-- -- +-- GNAT was originally developed by the GNAT team at New York University. -- +-- Extensive contributions were provided by Ada Core Technologies Inc. -- +-- -- +------------------------------------------------------------------------------ + +-- This unit provides the Vector/Views conversions + +with GNAT.Altivec.Vector_Types; use GNAT.Altivec.Vector_Types; +with GNAT.Altivec.Vector_Views; use GNAT.Altivec.Vector_Views; + +package GNAT.Altivec.Conversions is + + --------------------- + -- char components -- + --------------------- + + function To_Vector (S : VUC_View) return VUC; + function To_Vector (S : VSC_View) return VSC; + function To_Vector (S : VBC_View) return VBC; + + function To_View (S : VUC) return VUC_View; + function To_View (S : VSC) return VSC_View; + function To_View (S : VBC) return VBC_View; + + ---------------------- + -- short components -- + ---------------------- + + function To_Vector (S : VUS_View) return VUS; + function To_Vector (S : VSS_View) return VSS; + function To_Vector (S : VBS_View) return VBS; + + function To_View (S : VUS) return VUS_View; + function To_View (S : VSS) return VSS_View; + function To_View (S : VBS) return VBS_View; + + -------------------- + -- int components -- + -------------------- + + function To_Vector (S : VUI_View) return VUI; + function To_Vector (S : VSI_View) return VSI; + function To_Vector (S : VBI_View) return VBI; + + function To_View (S : VUI) return VUI_View; + function To_View (S : VSI) return VSI_View; + function To_View (S : VBI) return VBI_View; + + ---------------------- + -- float components -- + ---------------------- + + function To_Vector (S : VF_View) return VF; + + function To_View (S : VF) return VF_View; + + ---------------------- + -- pixel components -- + ---------------------- + + function To_Vector (S : VP_View) return VP; + + function To_View (S : VP) return VP_View; + +private + + -- We want the above subprograms to always be inlined in the case of the + -- hard PowerPC AltiVec support in order to avoid the unnecessary function + -- call. On the other hand there is no problem with inlining these + -- subprograms on little-endian targets. + + pragma Inline_Always (To_Vector); + pragma Inline_Always (To_View); + +end GNAT.Altivec.Conversions; diff --git a/gcc/ada/g-altive.ads b/gcc/ada/g-altive.ads new file mode 100644 index 00000000000..4cb82edc3df --- /dev/null +++ b/gcc/ada/g-altive.ads @@ -0,0 +1,455 @@ +------------------------------------------------------------------------------ +-- -- +-- GNAT COMPILER COMPONENTS -- +-- -- +-- G N A T . A L T I V E C -- +-- -- +-- S p e c -- +-- -- +-- Copyright (C) 2004-2005, Free Software Foundation, Inc. -- +-- -- +-- GNAT is free software; you can redistribute it and/or modify it under -- +-- terms of the GNU General Public License as published by the Free Soft- -- +-- ware Foundation; either version 2, or (at your option) any later ver- -- +-- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- +-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- +-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- +-- for more details. You should have received a copy of the GNU General -- +-- Public License distributed with GNAT; see 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 other files instantiate generics from this -- +-- unit, or you link this unit with other files to produce an executable, -- +-- this unit 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 Public License. -- +-- -- +-- GNAT was originally developed by the GNAT team at New York University. -- +-- Extensive contributions were provided by Ada Core Technologies Inc. -- +-- -- +------------------------------------------------------------------------------ + +------------------------- +-- General description -- +------------------------- + +-- This is the root of a package hierarchy offering an Ada binding to the +-- PowerPC AltiVec extensions. These extensions basically consist in a set of +-- 128bit vector types together with a set of subprograms operating on such +-- vectors. On a real Altivec capable target, vector objects map to hardware +-- vector registers and the subprograms map to a set of specific hardware +-- instructions. + +-- Relevant documents are: + +-- o AltiVec Technology, Programming Interface Manual (1999-06) +-- to which we will refer as [PIM], describes the data types, the +-- functional interface and the ABI conventions. + +-- o AltiVec Technology, Programming Environments Manual (2002-02) +-- to which we will refer as [PEM], describes the hardware architecture +-- and instruction set. + +-- These documents, as well as a number of others of general interest on the +-- AltiVec technology, are available from the Motorola/AltiVec Web site at + +-- http://www.motorola.com/altivec + +-- We offer two versions of this binding: one for real AltiVec capable +-- targets, and one for other targets. In the latter case, everything is +-- emulated in software. We will refer to the two bindings as: + +-- o The Hard binding for AltiVec capable targets (with the appropriate +-- hardware support and corresponding instruction set) + +-- o The Soft binding for other targets (with the low level primitives +-- emulated in software). + +-- The two versions of the binding are expected to be equivalent from the +-- functional standpoint. The same client application code should observe no +-- difference in operation results, even if the Soft version is used on a +-- non-powerpc target. The Hard binding is naturally expected to run faster +-- than the Soft version on the same target. + +-- We also offer interfaces not strictly part of the base AltiVec API, such +-- as vector conversions to/from array representations, which are of interest +-- for client applications (e.g. for vector initialization purposes) and may +-- also be used as implementation facilities. + +----------------------------------------- +-- General package architecture survey -- +----------------------------------------- + +-- The various vector representations are all "containers" of elementary +-- values, the possible types of which are declared in this root package to +-- be generally accessible. + +-- From the user standpoint, the two versions of the binding are available +-- through a consistent hierarchy of units providing identical services: + +-- GNAT.Altivec +-- (component types) +-- | +-- o----------------o----------------o-------------o +-- | | | | +-- Vector_Types Vector_Operations Vector_Views Conversions + +-- The user can manipulate vectors through two families of types: Vector +-- types and View types. + +-- Vector types are defined in the GNAT.Altivec.Vector_Types package + +-- On these types, the user can apply the Altivec operations defined in +-- GNAT.Altivec.Vector_Operations. Their layout is opaque and may vary across +-- configurations, for it is typically target-endianness dependant. + +-- Vector_Types and Vector_Operations implement the core binding to the +-- AltiVec API, as described in [PIM-2.1 data types] and [PIM-4 AltiVec +-- operations and predicates]. + +-- View types are defined in the GNAT.Altivec.Vector_Views package + +-- These types do not represent Altivec vectors per se, in the sense that the +-- Altivec_Operations are not available for them. They are intended to allow +-- Vector initializations as well as access to the Vector component values. + +-- The GNAT.Altivec.Conversions package is provided to convert a View to the +-- corresponding Vector and vice-versa. + +-- The two versions of the binding rely on a low level internal interface, +-- and switching from one version to the other amounts to select one low +-- level implementation instead of the other. + +-- The bindings are provided as a set of sources together with a project file +-- (altivec.gpr). The hard/soft binding selection is controlled by a project +-- variable on targets where switching makes sense. See the example usage +-- section below. + +--------------------------- +-- Underlying principles -- +--------------------------- + +-- The general organization sketched above has been devised from a number +-- of driving ideas: + +-- o From the clients standpoint, the two versions of the binding should be +-- as easily exchangable as possible, + +-- o From the maintenance standpoint, we want to avoid as much code +-- duplication as possible. + +-- o From both standpoints above, we want to maintain a clear interface +-- separation between the base bindings to the Motorola API and the +-- additional facilities. + +-- The identification of the low level interface is directly inspired by the +-- the base API organization, basically consisting of a rich set of functions +-- around a core of low level primitives mapping to AltiVec instructions. + +-- See for instance "vec_add" in [PIM-4.4 Generic and Specific AltiVec +-- operations]: no less than six result/arguments combinations of byte vector +-- types map to "vaddubm". + +-- The "hard" version of the low level primitives map to real AltiVec +-- instructions via the corresponding GCC builtins. The "soft" version is +-- a software emulation of those. + +------------------- +-- Example usage -- +------------------- + +-- Here is a sample program declaring and initializing two vectors, 'add'ing +-- them and displaying the result components: + +-- with GNAT.Altivec.Vector_Types; use GNAT.Altivec.Vector_Types; +-- with GNAT.Altivec.Vector_Operations; use GNAT.Altivec.Vector_Operations; +-- with GNAT.Altivec.Vector_Views; use GNAT.Altivec.Vector_Views; +-- with GNAT.Altivec.Conversions; use GNAT.Altivec.Conversions; + +-- use GNAT.Altivec; + +-- procedure Sample is +-- Va : Vector_Unsigned_Int := To_Vector ((Values => (1, 2, 3, 4))); +-- Vb : Vector_Unsigned_Int := To_Vector ((Values => (1, 2, 3, 4))); + +-- Vs : Vector_Unsigned_Int; +-- Vs_View : VUI_View; +-- begin +-- Vs := Vec_Add (Va, Vb); +-- Vs_View := To_View (Vs); + +-- for I in Vs_View.Values'Range loop +-- Put_Line (Unsigned_Int'Image (Vs_View.Values (I))); +-- end loop; +-- end; + +-- This currently requires the GNAT project management facilities to compile, +-- to automatically retrieve the set of necessary sources and switches +-- depending on your configuration. For the example above, customizing the +-- switches to include -g also, this would be something like: + +-- sample.gpr +-- +-- with "altivec.gpr"; +-- +-- project Sample is + +-- for Source_Dirs use ("."); +-- for Main use ("sample"); + +-- package Compiler is +-- for Default_Switches ("Ada") use +-- Altivec.Compiler'Default_Switches ("Ada") & "-g"; +-- end Compiler; + +-- end Sample; + +-- $ gnatmake -Psample +-- [...] +-- $ ./sample +-- 2 +-- 4 +-- 6 +-- 8 + +------------------------------------------------------------------------------ + +with System; + +package GNAT.Altivec is + + -- Definitions of constants and vector/array component types common to all + -- the versions of the binding. + + -- All the vector types are 128bits + + VECTOR_BIT : constant := 128; + + ------------------------------------------- + -- [PIM-2.3.1 Alignment of vector types] -- + ------------------------------------------- + + -- "A defined data item of any vector data type in memory is always + -- aligned on a 16-byte boundary. A pointer to any vector data type always + -- points to a 16-byte boundary. The compiler is responsible for aligning + -- vector data types on 16-byte boundaries." + + VECTOR_ALIGNMENT : constant := 16; + + ------------------------------------------------------- + -- [PIM-2.1] Data Types - Interpretation of contents -- + ------------------------------------------------------- + + --------------------- + -- char components -- + --------------------- + + CHAR_BIT : constant := 8; + SCHAR_MIN : constant := -2 ** (CHAR_BIT - 1); + SCHAR_MAX : constant := 2 ** (CHAR_BIT - 1) - 1; + UCHAR_MAX : constant := 2 ** CHAR_BIT - 1; + + type unsigned_char is mod UCHAR_MAX + 1; + for unsigned_char'Size use CHAR_BIT; + + type signed_char is range SCHAR_MIN .. SCHAR_MAX; + for signed_char'Size use CHAR_BIT; + + subtype bool_char is unsigned_char; + -- ??? There is a difference here between what the Altivec Technology + -- Programming Interface Manual says and what GCC says. In the manual, + -- vector_bool_char is a vector_unsigned_char, while in altivec.h it + -- is a vector_signed_char. + + bool_char_True : constant bool_char := bool_char'Last; + bool_char_False : constant bool_char := 0; + + ---------------------- + -- short components -- + ---------------------- + + SHORT_BIT : constant := 16; + SSHORT_MIN : constant := -2 ** (SHORT_BIT - 1); + SSHORT_MAX : constant := 2 ** (SHORT_BIT - 1) - 1; + USHORT_MAX : constant := 2 ** SHORT_BIT - 1; + + type unsigned_short is mod USHORT_MAX + 1; + for unsigned_short'Size use SHORT_BIT; + + subtype unsigned_short_int is unsigned_short; + + type signed_short is range SSHORT_MIN .. SSHORT_MAX; + for signed_short'Size use SHORT_BIT; + + subtype signed_short_int is signed_short; + + subtype bool_short is unsigned_short; + -- ??? See bool_char + + bool_short_True : constant bool_short := bool_short'Last; + bool_short_False : constant bool_short := 0; + + subtype bool_short_int is bool_short; + + -------------------- + -- int components -- + -------------------- + + INT_BIT : constant := 32; + SINT_MIN : constant := -2 ** (INT_BIT - 1); + SINT_MAX : constant := 2 ** (INT_BIT - 1) - 1; + UINT_MAX : constant := 2 ** INT_BIT - 1; + + type unsigned_int is mod UINT_MAX + 1; + for unsigned_int'Size use INT_BIT; + + type signed_int is range SINT_MIN .. SINT_MAX; + for signed_int'Size use INT_BIT; + + subtype bool_int is unsigned_int; + -- ??? See bool_char + + bool_int_True : constant bool_int := bool_int'Last; + bool_int_False : constant bool_int := 0; + + ---------------------- + -- float components -- + ---------------------- + + FLOAT_BIT : constant := 32; + FLOAT_DIGIT : constant := 6; + FLOAT_MIN : constant := -16#0.FFFF_FF#E+32; + FLOAT_MAX : constant := 16#0.FFFF_FF#E+32; + + type C_float is digits FLOAT_DIGIT range FLOAT_MIN .. FLOAT_MAX; + for C_float'Size use FLOAT_BIT; + + ---------------------- + -- pixel components -- + ---------------------- + + subtype pixel is unsigned_short; + + ----------------------------------------------------------- + -- Subtypes for variants found in the GCC implementation -- + ----------------------------------------------------------- + + subtype c_int is signed_int; + subtype c_short is c_int; + + LONG_BIT : constant := 32; + -- Some of the GCC builtins are built with "long" arguments and + -- expect SImode to come in. + + SLONG_MIN : constant := -2 ** (LONG_BIT - 1); + SLONG_MAX : constant := 2 ** (LONG_BIT - 1) - 1; + ULONG_MAX : constant := 2 ** LONG_BIT - 1; + + type signed_long is range SLONG_MIN .. SLONG_MAX; + type unsigned_long is mod ULONG_MAX + 1; + + subtype c_long is signed_long; + + subtype c_ptr is System.Address; + + --------------------------------------------------------- + -- Access types, for the sake of some argument passing -- + --------------------------------------------------------- + + type signed_char_ptr is access all signed_char; + type unsigned_char_ptr is access all unsigned_char; + + type short_ptr is access all c_short; + type signed_short_ptr is access all signed_short; + type unsigned_short_ptr is access all unsigned_short; + + type int_ptr is access all c_int; + type signed_int_ptr is access all signed_int; + type unsigned_int_ptr is access all unsigned_int; + + type long_ptr is access all c_long; + type signed_long_ptr is access all signed_long; + type unsigned_long_ptr is access all unsigned_long; + + type float_ptr is access all Float; + + -- + + type const_signed_char_ptr is access constant signed_char; + type const_unsigned_char_ptr is access constant unsigned_char; + + type const_short_ptr is access constant c_short; + type const_signed_short_ptr is access constant signed_short; + type const_unsigned_short_ptr is access constant unsigned_short; + + type const_int_ptr is access constant c_int; + type const_signed_int_ptr is access constant signed_int; + type const_unsigned_int_ptr is access constant unsigned_int; + + type const_long_ptr is access constant c_long; + type const_signed_long_ptr is access constant signed_long; + type const_unsigned_long_ptr is access constant unsigned_long; + + type const_float_ptr is access constant Float; + + -- Access to const volatile arguments need specialized types + + type volatile_float is new Float; + pragma Volatile (volatile_float); + + type volatile_signed_char is new signed_char; + pragma Volatile (volatile_signed_char); + + type volatile_unsigned_char is new unsigned_char; + pragma Volatile (volatile_unsigned_char); + + type volatile_signed_short is new signed_short; + pragma Volatile (volatile_signed_short); + + type volatile_unsigned_short is new unsigned_short; + pragma Volatile (volatile_unsigned_short); + + type volatile_signed_int is new signed_int; + pragma Volatile (volatile_signed_int); + + type volatile_unsigned_int is new unsigned_int; + pragma Volatile (volatile_unsigned_int); + + type volatile_signed_long is new signed_long; + pragma Volatile (volatile_signed_long); + + type volatile_unsigned_long is new unsigned_long; + pragma Volatile (volatile_unsigned_long); + + type constv_char_ptr is access constant volatile_signed_char; + type constv_signed_char_ptr is access constant volatile_signed_char; + type constv_unsigned_char_ptr is access constant volatile_unsigned_char; + + type constv_short_ptr is access constant volatile_signed_short; + type constv_signed_short_ptr is access constant volatile_signed_short; + type constv_unsigned_short_ptr is access constant volatile_unsigned_short; + + type constv_int_ptr is access constant volatile_signed_int; + type constv_signed_int_ptr is access constant volatile_signed_int; + type constv_unsigned_int_ptr is access constant volatile_unsigned_int; + + type constv_long_ptr is access constant volatile_signed_long; + type constv_signed_long_ptr is access constant volatile_signed_long; + type constv_unsigned_long_ptr is access constant volatile_unsigned_long; + + type constv_float_ptr is access constant volatile_float; + +private + + ----------------------- + -- Various constants -- + ----------------------- + + CR6_EQ : constant := 0; + CR6_EQ_REV : constant := 1; + CR6_LT : constant := 2; + CR6_LT_REV : constant := 3; + +end GNAT.Altivec; diff --git a/gcc/ada/g-alveop.adb b/gcc/ada/g-alveop.adb new file mode 100644 index 00000000000..62e0b1712a6 --- /dev/null +++ b/gcc/ada/g-alveop.adb @@ -0,0 +1,9704 @@ +------------------------------------------------------------------------------ +-- -- +-- GNAT COMPILER COMPONENTS -- +-- -- +-- G N A T . A L T I V E C . V E C T O R _ O P E R A T I O N S -- +-- -- +-- B o d y -- +-- -- +-- Copyright (C) 2004-2005, Free Software Foundation, Inc. -- +-- -- +-- GNAT is free software; you can redistribute it and/or modify it under -- +-- terms of the GNU General Public License as published by the Free Soft- -- +-- ware Foundation; either version 2, or (at your option) any later ver- -- +-- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- +-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- +-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- +-- for more details. You should have received a copy of the GNU General -- +-- Public License distributed with GNAT; see 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 other files instantiate generics from this -- +-- unit, or you link this unit with other files to produce an executable, -- +-- this unit 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 Public License. -- +-- -- +-- GNAT was originally developed by the GNAT team at New York University. -- +-- Extensive contributions were provided by Ada Core Technologies Inc. -- +-- -- +------------------------------------------------------------------------------ + +with GNAT.Altivec.Low_Level_Vectors; use GNAT.Altivec.Low_Level_Vectors; + +package body GNAT.Altivec.Vector_Operations is + + -------------------------------------------------------- + -- Bodies for generic and specific Altivec operations -- + -------------------------------------------------------- + + -- vec_abs -- + + function vec_abs + (A : vector_signed_char) return vector_signed_char + is + begin + return To_LL_VSC (abs_v16qi (A)); + end vec_abs; + + function vec_abs + (A : vector_signed_short) return vector_signed_short + is + begin + return To_LL_VSS (abs_v8hi (A)); + end vec_abs; + + function vec_abs + (A : vector_signed_int) return vector_signed_int + is + begin + return To_LL_VSI (abs_v4si (A)); + end vec_abs; + + function vec_abs + (A : vector_float) return vector_float + is + begin + return To_LL_VF (abs_v4sf (A)); + end vec_abs; + + -- vec_abss -- + + function vec_abss + (A : vector_signed_char) return vector_signed_char + is + begin + return To_LL_VSC (abss_v16qi (A)); + end vec_abss; + + function vec_abss + (A : vector_signed_short) return vector_signed_short + is + begin + return To_LL_VSS (abss_v8hi (A)); + end vec_abss; + + function vec_abss + (A : vector_signed_int) return vector_signed_int + is + begin + return To_LL_VSI (abss_v4si (A)); + end vec_abss; + + -- vec_add -- + + function vec_add + (A : vector_bool_char; + B : vector_signed_char) return vector_signed_char + is + begin + return To_LL_VSC (vaddubm (To_LL_VSC (A), To_LL_VSC (B))); + end vec_add; + + function vec_add + (A : vector_signed_char; + B : vector_bool_char) return vector_signed_char + is + begin + return To_LL_VSC (vaddubm (To_LL_VSC (A), To_LL_VSC (B))); + end vec_add; + + function vec_add + (A : vector_signed_char; + B : vector_signed_char) return vector_signed_char + is + begin + return To_LL_VSC (vaddubm (To_LL_VSC (A), To_LL_VSC (B))); + end vec_add; + + function vec_add + (A : vector_bool_char; + B : vector_unsigned_char) return vector_unsigned_char + is + begin + return To_LL_VUC (vaddubm (To_LL_VSC (A), To_LL_VSC (B))); + end vec_add; + + function vec_add + (A : vector_unsigned_char; + B : vector_bool_char) return vector_unsigned_char + is + begin + return To_LL_VUC (vaddubm (To_LL_VSC (A), To_LL_VSC (B))); + end vec_add; + + function vec_add + (A : vector_unsigned_char; + B : vector_unsigned_char) return vector_unsigned_char + is + begin + return To_LL_VUC (vaddubm (To_LL_VSC (A), To_LL_VSC (B))); + end vec_add; + + function vec_add + (A : vector_bool_short; + B : vector_signed_short) return vector_signed_short + is + begin + return To_LL_VSS (vadduhm (To_LL_VSS (A), To_LL_VSS (B))); + end vec_add; + + function vec_add + (A : vector_signed_short; + B : vector_bool_short) return vector_signed_short + is + begin + return To_LL_VSS (vadduhm (To_LL_VSS (A), To_LL_VSS (B))); + end vec_add; + + function vec_add + (A : vector_signed_short; + B : vector_signed_short) return vector_signed_short + is + begin + return To_LL_VSS (vadduhm (To_LL_VSS (A), To_LL_VSS (B))); + end vec_add; + + function vec_add + (A : vector_bool_short; + B : vector_unsigned_short) return vector_unsigned_short + is + begin + return To_LL_VUS (vadduhm (To_LL_VSS (A), To_LL_VSS (B))); + end vec_add; + + function vec_add + (A : vector_unsigned_short; + B : vector_bool_short) return vector_unsigned_short + is + begin + return To_LL_VUS (vadduhm (To_LL_VSS (A), To_LL_VSS (B))); + end vec_add; + + function vec_add + (A : vector_unsigned_short; + B : vector_unsigned_short) return vector_unsigned_short + is + begin + return To_LL_VUS (vadduhm (To_LL_VSS (A), To_LL_VSS (B))); + end vec_add; + + function vec_add + (A : vector_bool_int; + B : vector_signed_int) return vector_signed_int + is + begin + return To_LL_VSI (vadduwm (To_LL_VSI (A), To_LL_VSI (B))); + end vec_add; + + function vec_add + (A : vector_signed_int; + B : vector_bool_int) return vector_signed_int + is + begin + return To_LL_VSI (vadduwm (To_LL_VSI (A), To_LL_VSI (B))); + end vec_add; + + function vec_add + (A : vector_signed_int; + B : vector_signed_int) return vector_signed_int + is + begin + return To_LL_VSI (vadduwm (To_LL_VSI (A), To_LL_VSI (B))); + end vec_add; + + function vec_add + (A : vector_bool_int; + B : vector_unsigned_int) return vector_unsigned_int + is + begin + return To_LL_VUI (vadduwm (To_LL_VSI (A), To_LL_VSI (B))); + end vec_add; + + function vec_add + (A : vector_unsigned_int; + B : vector_bool_int) return vector_unsigned_int + is + begin + return To_LL_VUI (vadduwm (To_LL_VSI (A), To_LL_VSI (B))); + end vec_add; + + function vec_add + (A : vector_unsigned_int; + B : vector_unsigned_int) return vector_unsigned_int + is + begin + return To_LL_VUI (vadduwm (To_LL_VSI (A), To_LL_VSI (B))); + end vec_add; + + function vec_add + (A : vector_float; + B : vector_float) return vector_float + is + begin + return To_LL_VF (vaddfp (To_LL_VF (A), To_LL_VF (B))); + end vec_add; + + -- vec_vaddfp -- + + function vec_vaddfp + (A : vector_float; + B : vector_float) return vector_float + is + begin + return To_LL_VF (vaddfp (To_LL_VF (A), To_LL_VF (B))); + end vec_vaddfp; + + -- vec_vadduwm -- + + function vec_vadduwm + (A : vector_bool_int; + B : vector_signed_int) return vector_signed_int + is + begin + return To_LL_VSI (vadduwm (To_LL_VSI (A), To_LL_VSI (B))); + end vec_vadduwm; + + function vec_vadduwm + (A : vector_signed_int; + B : vector_bool_int) return vector_signed_int + is + begin + return To_LL_VSI (vadduwm (To_LL_VSI (A), To_LL_VSI (B))); + end vec_vadduwm; + + function vec_vadduwm + (A : vector_signed_int; + B : vector_signed_int) return vector_signed_int + is + begin + return To_LL_VSI (vadduwm (To_LL_VSI (A), To_LL_VSI (B))); + end vec_vadduwm; + + function vec_vadduwm + (A : vector_bool_int; + B : vector_unsigned_int) return vector_unsigned_int + is + begin + return To_LL_VUI (vadduwm (To_LL_VSI (A), To_LL_VSI (B))); + end vec_vadduwm; + + function vec_vadduwm + (A : vector_unsigned_int; + B : vector_bool_int) return vector_unsigned_int + is + begin + return To_LL_VUI (vadduwm (To_LL_VSI (A), To_LL_VSI (B))); + end vec_vadduwm; + + function vec_vadduwm + (A : vector_unsigned_int; + B : vector_unsigned_int) return vector_unsigned_int + is + begin + return To_LL_VUI (vadduwm (To_LL_VSI (A), To_LL_VSI (B))); + end vec_vadduwm; + + -- vec_vadduhm -- + + function vec_vadduhm + (A : vector_bool_short; + B : vector_signed_short) return vector_signed_short + is + begin + return To_LL_VSS (vadduhm (To_LL_VSS (A), To_LL_VSS (B))); + end vec_vadduhm; + + function vec_vadduhm + (A : vector_signed_short; + B : vector_bool_short) return vector_signed_short + is + begin + return To_LL_VSS (vadduhm (To_LL_VSS (A), To_LL_VSS (B))); + end vec_vadduhm; + + function vec_vadduhm + (A : vector_signed_short; + B : vector_signed_short) return vector_signed_short + is + begin + return To_LL_VSS (vadduhm (To_LL_VSS (A), To_LL_VSS (B))); + end vec_vadduhm; + + function vec_vadduhm + (A : vector_bool_short; + B : vector_unsigned_short) return vector_unsigned_short + is + begin + return To_LL_VUS (vadduhm (To_LL_VSS (A), To_LL_VSS (B))); + end vec_vadduhm; + + function vec_vadduhm + (A : vector_unsigned_short; + B : vector_bool_short) return vector_unsigned_short + is + begin + return To_LL_VUS (vadduhm (To_LL_VSS (A), To_LL_VSS (B))); + end vec_vadduhm; + + function vec_vadduhm + (A : vector_unsigned_short; + B : vector_unsigned_short) return vector_unsigned_short + is + begin + return To_LL_VUS (vadduhm (To_LL_VSS (A), To_LL_VSS (B))); + end vec_vadduhm; + + -- vec_vaddubm -- + + function vec_vaddubm + (A : vector_bool_char; + B : vector_signed_char) return vector_signed_char + is + begin + return To_LL_VSC (vaddubm (To_LL_VSC (A), To_LL_VSC (B))); + end vec_vaddubm; + + function vec_vaddubm + (A : vector_signed_char; + B : vector_bool_char) return vector_signed_char + is + begin + return To_LL_VSC (vaddubm (To_LL_VSC (A), To_LL_VSC (B))); + end vec_vaddubm; + + function vec_vaddubm + (A : vector_signed_char; + B : vector_signed_char) return vector_signed_char + is + begin + return To_LL_VSC (vaddubm (To_LL_VSC (A), To_LL_VSC (B))); + end vec_vaddubm; + + function vec_vaddubm + (A : vector_bool_char; + B : vector_unsigned_char) return vector_unsigned_char + is + begin + return To_LL_VUC (vaddubm (To_LL_VSC (A), To_LL_VSC (B))); + end vec_vaddubm; + + function vec_vaddubm + (A : vector_unsigned_char; + B : vector_bool_char) return vector_unsigned_char + is + begin + return To_LL_VUC (vaddubm (To_LL_VSC (A), To_LL_VSC (B))); + end vec_vaddubm; + + function vec_vaddubm + (A : vector_unsigned_char; + B : vector_unsigned_char) return vector_unsigned_char + is + begin + return To_LL_VUC (vaddubm (To_LL_VSC (A), To_LL_VSC (B))); + end vec_vaddubm; + + -- vec_addc -- + + function vec_addc + (A : vector_unsigned_int; + B : vector_unsigned_int) return vector_unsigned_int + is + begin + return To_LL_VUI (vaddcuw (To_LL_VSI (A), To_LL_VSI (B))); + end vec_addc; + + -- vec_adds -- + + function vec_adds + (A : vector_bool_char; + B : vector_unsigned_char) return vector_unsigned_char + is + begin + return To_LL_VUC (vaddubs (To_LL_VSC (A), To_LL_VSC (B))); + end vec_adds; + + function vec_adds + (A : vector_unsigned_char; + B : vector_bool_char) return vector_unsigned_char + is + begin + return To_LL_VUC (vaddubs (To_LL_VSC (A), To_LL_VSC (B))); + end vec_adds; + + function vec_adds + (A : vector_unsigned_char; + B : vector_unsigned_char) return vector_unsigned_char + is + begin + return To_LL_VUC (vaddubs (To_LL_VSC (A), To_LL_VSC (B))); + end vec_adds; + + function vec_adds + (A : vector_bool_char; + B : vector_signed_char) return vector_signed_char + is + begin + return To_LL_VSC (vaddsbs (To_LL_VSC (A), To_LL_VSC (B))); + end vec_adds; + + function vec_adds + (A : vector_signed_char; + B : vector_bool_char) return vector_signed_char + is + begin + return To_LL_VSC (vaddsbs (To_LL_VSC (A), To_LL_VSC (B))); + end vec_adds; + + function vec_adds + (A : vector_signed_char; + B : vector_signed_char) return vector_signed_char + is + begin + return To_LL_VSC (vaddsbs (To_LL_VSC (A), To_LL_VSC (B))); + end vec_adds; + + function vec_adds + (A : vector_bool_short; + B : vector_unsigned_short) return vector_unsigned_short + is + begin + return To_LL_VUS (vadduhs (To_LL_VSS (A), To_LL_VSS (B))); + end vec_adds; + + function vec_adds + (A : vector_unsigned_short; + B : vector_bool_short) return vector_unsigned_short + is + begin + return To_LL_VUS (vadduhs (To_LL_VSS (A), To_LL_VSS (B))); + end vec_adds; + + function vec_adds + (A : vector_unsigned_short; + B : vector_unsigned_short) return vector_unsigned_short + is + begin + return To_LL_VUS (vadduhs (To_LL_VSS (A), To_LL_VSS (B))); + end vec_adds; + + function vec_adds + (A : vector_bool_short; + B : vector_signed_short) return vector_signed_short + is + begin + return To_LL_VSS (vaddshs (To_LL_VSS (A), To_LL_VSS (B))); + end vec_adds; + + function vec_adds + (A : vector_signed_short; + B : vector_bool_short) return vector_signed_short + is + begin + return To_LL_VSS (vaddshs (To_LL_VSS (A), To_LL_VSS (B))); + end vec_adds; + + function vec_adds + (A : vector_signed_short; + B : vector_signed_short) return vector_signed_short + is + begin + return To_LL_VSS (vaddshs (To_LL_VSS (A), To_LL_VSS (B))); + end vec_adds; + + function vec_adds + (A : vector_bool_int; + B : vector_unsigned_int) return vector_unsigned_int + is + begin + return To_LL_VUI (vadduws (To_LL_VSI (A), To_LL_VSI (B))); + end vec_adds; + + function vec_adds + (A : vector_unsigned_int; + B : vector_bool_int) return vector_unsigned_int + is + begin + return To_LL_VUI (vadduws (To_LL_VSI (A), To_LL_VSI (B))); + end vec_adds; + + function vec_adds + (A : vector_unsigned_int; + B : vector_unsigned_int) return vector_unsigned_int + is + begin + return To_LL_VUI (vadduws (To_LL_VSI (A), To_LL_VSI (B))); + end vec_adds; + + function vec_adds + (A : vector_bool_int; + B : vector_signed_int) return vector_signed_int + is + begin + return To_LL_VSI (vaddsws (To_LL_VSI (A), To_LL_VSI (B))); + end vec_adds; + + function vec_adds + (A : vector_signed_int; + B : vector_bool_int) return vector_signed_int + is + begin + return To_LL_VSI (vaddsws (To_LL_VSI (A), To_LL_VSI (B))); + end vec_adds; + + function vec_adds + (A : vector_signed_int; + B : vector_signed_int) return vector_signed_int + is + begin + return To_LL_VSI (vaddsws (To_LL_VSI (A), To_LL_VSI (B))); + end vec_adds; + + -- vec_vaddsws -- + + function vec_vaddsws + (A : vector_bool_int; + B : vector_signed_int) return vector_signed_int + is + begin + return To_LL_VSI (vaddsws (To_LL_VSI (A), To_LL_VSI (B))); + end vec_vaddsws; + + function vec_vaddsws + (A : vector_signed_int; + B : vector_bool_int) return vector_signed_int + is + begin + return To_LL_VSI (vaddsws (To_LL_VSI (A), To_LL_VSI (B))); + end vec_vaddsws; + + function vec_vaddsws + (A : vector_signed_int; + B : vector_signed_int) return vector_signed_int + is + begin + return To_LL_VSI (vaddsws (To_LL_VSI (A), To_LL_VSI (B))); + end vec_vaddsws; + + -- vec_vadduws -- + + function vec_vadduws + (A : vector_bool_int; + B : vector_unsigned_int) return vector_unsigned_int + is + begin + return To_LL_VUI (vadduws (To_LL_VSI (A), To_LL_VSI (B))); + end vec_vadduws; + + function vec_vadduws + (A : vector_unsigned_int; + B : vector_bool_int) return vector_unsigned_int + is + begin + return To_LL_VUI (vadduws (To_LL_VSI (A), To_LL_VSI (B))); + end vec_vadduws; + + function vec_vadduws + (A : vector_unsigned_int; + B : vector_unsigned_int) return vector_unsigned_int + is + begin + return To_LL_VUI (vadduws (To_LL_VSI (A), To_LL_VSI (B))); + end vec_vadduws; + + -- vec_vaddshs -- + + function vec_vaddshs + (A : vector_bool_short; + B : vector_signed_short) return vector_signed_short + is + begin + return To_LL_VSS (vaddshs (To_LL_VSS (A), To_LL_VSS (B))); + end vec_vaddshs; + + function vec_vaddshs + (A : vector_signed_short; + B : vector_bool_short) return vector_signed_short + is + begin + return To_LL_VSS (vaddshs (To_LL_VSS (A), To_LL_VSS (B))); + end vec_vaddshs; + + function vec_vaddshs + (A : vector_signed_short; + B : vector_signed_short) return vector_signed_short + is + begin + return To_LL_VSS (vaddshs (To_LL_VSS (A), To_LL_VSS (B))); + end vec_vaddshs; + + -- vec_vadduhs -- + + function vec_vadduhs + (A : vector_bool_short; + B : vector_unsigned_short) return vector_unsigned_short + is + begin + return To_LL_VUS (vadduhs (To_LL_VSS (A), To_LL_VSS (B))); + end vec_vadduhs; + + function vec_vadduhs + (A : vector_unsigned_short; + B : vector_bool_short) return vector_unsigned_short + is + begin + return To_LL_VUS (vadduhs (To_LL_VSS (A), To_LL_VSS (B))); + end vec_vadduhs; + + function vec_vadduhs + (A : vector_unsigned_short; + B : vector_unsigned_short) return vector_unsigned_short + is + begin + return To_LL_VUS (vadduhs (To_LL_VSS (A), To_LL_VSS (B))); + end vec_vadduhs; + + -- vec_vaddsbs -- + + function vec_vaddsbs + (A : vector_bool_char; + B : vector_signed_char) return vector_signed_char + is + begin + return To_LL_VSC (vaddsbs (To_LL_VSC (A), To_LL_VSC (B))); + end vec_vaddsbs; + + function vec_vaddsbs + (A : vector_signed_char; + B : vector_bool_char) return vector_signed_char + is + begin + return To_LL_VSC (vaddsbs (To_LL_VSC (A), To_LL_VSC (B))); + end vec_vaddsbs; + + function vec_vaddsbs + (A : vector_signed_char; + B : vector_signed_char) return vector_signed_char + is + begin + return To_LL_VSC (vaddsbs (To_LL_VSC (A), To_LL_VSC (B))); + end vec_vaddsbs; + + -- vec_vaddubs -- + + function vec_vaddubs + (A : vector_bool_char; + B : vector_unsigned_char) return vector_unsigned_char + is + begin + return To_LL_VUC (vaddubs (To_LL_VSC (A), To_LL_VSC (B))); + end vec_vaddubs; + + function vec_vaddubs + (A : vector_unsigned_char; + B : vector_bool_char) return vector_unsigned_char + is + begin + return To_LL_VUC (vaddubs (To_LL_VSC (A), To_LL_VSC (B))); + end vec_vaddubs; + + function vec_vaddubs + (A : vector_unsigned_char; + B : vector_unsigned_char) return vector_unsigned_char + is + begin + return To_LL_VUC (vaddubs (To_LL_VSC (A), To_LL_VSC (B))); + end vec_vaddubs; + + -- vec_and -- + + function vec_and + (A : vector_float; + B : vector_float) return vector_float + is + begin + return To_LL_VF (vand (To_LL_VSI (A), To_LL_VSI (B))); + end vec_and; + + function vec_and + (A : vector_float; + B : vector_bool_int) return vector_float + is + begin + return To_LL_VF (vand (To_LL_VSI (A), To_LL_VSI (B))); + end vec_and; + + function vec_and + (A : vector_bool_int; + B : vector_float) return vector_float + is + begin + return To_LL_VF (vand (To_LL_VSI (A), To_LL_VSI (B))); + end vec_and; + + function vec_and + (A : vector_bool_int; + B : vector_bool_int) return vector_bool_int + is + begin + return To_LL_VBI (vand (To_LL_VSI (A), To_LL_VSI (B))); + end vec_and; + + function vec_and + (A : vector_bool_int; + B : vector_signed_int) return vector_signed_int + is + begin + return To_LL_VSI (vand (To_LL_VSI (A), To_LL_VSI (B))); + end vec_and; + + function vec_and + (A : vector_signed_int; + B : vector_bool_int) return vector_signed_int + is + begin + return To_LL_VSI (vand (To_LL_VSI (A), To_LL_VSI (B))); + end vec_and; + + function vec_and + (A : vector_signed_int; + B : vector_signed_int) return vector_signed_int + is + begin + return To_LL_VSI (vand (To_LL_VSI (A), To_LL_VSI (B))); + end vec_and; + + function vec_and + (A : vector_bool_int; + B : vector_unsigned_int) return vector_unsigned_int + is + begin + return To_LL_VUI (vand (To_LL_VSI (A), To_LL_VSI (B))); + end vec_and; + + function vec_and + (A : vector_unsigned_int; + B : vector_bool_int) return vector_unsigned_int + is + begin + return To_LL_VUI (vand (To_LL_VSI (A), To_LL_VSI (B))); + end vec_and; + + function vec_and + (A : vector_unsigned_int; + B : vector_unsigned_int) return vector_unsigned_int + is + begin + return To_LL_VUI (vand (To_LL_VSI (A), To_LL_VSI (B))); + end vec_and; + + function vec_and + (A : vector_bool_short; + B : vector_bool_short) return vector_bool_short + is + begin + return To_LL_VBS (vand (To_LL_VSI (A), To_LL_VSI (B))); + end vec_and; + + function vec_and + (A : vector_bool_short; + B : vector_signed_short) return vector_signed_short + is + begin + return To_LL_VSS (vand (To_LL_VSI (A), To_LL_VSI (B))); + end vec_and; + + function vec_and + (A : vector_signed_short; + B : vector_bool_short) return vector_signed_short + is + begin + return To_LL_VSS (vand (To_LL_VSI (A), To_LL_VSI (B))); + end vec_and; + + function vec_and + (A : vector_signed_short; + B : vector_signed_short) return vector_signed_short + is + begin + return To_LL_VSS (vand (To_LL_VSI (A), To_LL_VSI (B))); + end vec_and; + + function vec_and + (A : vector_bool_short; + B : vector_unsigned_short) return vector_unsigned_short + is + begin + return To_LL_VUS (vand (To_LL_VSI (A), To_LL_VSI (B))); + end vec_and; + + function vec_and + (A : vector_unsigned_short; + B : vector_bool_short) return vector_unsigned_short + is + begin + return To_LL_VUS (vand (To_LL_VSI (A), To_LL_VSI (B))); + end vec_and; + + function vec_and + (A : vector_unsigned_short; + B : vector_unsigned_short) return vector_unsigned_short + is + begin + return To_LL_VUS (vand (To_LL_VSI (A), To_LL_VSI (B))); + end vec_and; + + function vec_and + (A : vector_bool_char; + B : vector_signed_char) return vector_signed_char + is + begin + return To_LL_VSC (vand (To_LL_VSI (A), To_LL_VSI (B))); + end vec_and; + + function vec_and + (A : vector_bool_char; + B : vector_bool_char) return vector_bool_char + is + begin + return To_LL_VBC (vand (To_LL_VSI (A), To_LL_VSI (B))); + end vec_and; + + function vec_and + (A : vector_signed_char; + B : vector_bool_char) return vector_signed_char + is + begin + return To_LL_VSC (vand (To_LL_VSI (A), To_LL_VSI (B))); + end vec_and; + + function vec_and + (A : vector_signed_char; + B : vector_signed_char) return vector_signed_char + is + begin + return To_LL_VSC (vand (To_LL_VSI (A), To_LL_VSI (B))); + end vec_and; + + function vec_and + (A : vector_bool_char; + B : vector_unsigned_char) return vector_unsigned_char + is + begin + return To_LL_VUC (vand (To_LL_VSI (A), To_LL_VSI (B))); + end vec_and; + + function vec_and + (A : vector_unsigned_char; + B : vector_bool_char) return vector_unsigned_char + is + begin + return To_LL_VUC (vand (To_LL_VSI (A), To_LL_VSI (B))); + end vec_and; + + function vec_and + (A : vector_unsigned_char; + B : vector_unsigned_char) return vector_unsigned_char + is + begin + return To_LL_VUC (vand (To_LL_VSI (A), To_LL_VSI (B))); + end vec_and; + + -- vec_andc -- + + function vec_andc + (A : vector_float; + B : vector_float) return vector_float + is + begin + return To_LL_VF (vandc (To_LL_VSI (A), To_LL_VSI (B))); + end vec_andc; + + function vec_andc + (A : vector_float; + B : vector_bool_int) return vector_float + is + begin + return To_LL_VF (vandc (To_LL_VSI (A), To_LL_VSI (B))); + end vec_andc; + + function vec_andc + (A : vector_bool_int; + B : vector_float) return vector_float + is + begin + return To_LL_VF (vandc (To_LL_VSI (A), To_LL_VSI (B))); + end vec_andc; + + function vec_andc + (A : vector_bool_int; + B : vector_bool_int) return vector_bool_int + is + begin + return To_LL_VBI (vandc (To_LL_VSI (A), To_LL_VSI (B))); + end vec_andc; + + function vec_andc + (A : vector_bool_int; + B : vector_signed_int) return vector_signed_int + is + begin + return To_LL_VSI (vandc (To_LL_VSI (A), To_LL_VSI (B))); + end vec_andc; + + function vec_andc + (A : vector_signed_int; + B : vector_bool_int) return vector_signed_int + is + begin + return To_LL_VSI (vandc (To_LL_VSI (A), To_LL_VSI (B))); + end vec_andc; + + function vec_andc + (A : vector_signed_int; + B : vector_signed_int) return vector_signed_int + is + begin + return To_LL_VSI (vandc (To_LL_VSI (A), To_LL_VSI (B))); + end vec_andc; + + function vec_andc + (A : vector_bool_int; + B : vector_unsigned_int) return vector_unsigned_int + is + begin + return To_LL_VUI (vandc (To_LL_VSI (A), To_LL_VSI (B))); + end vec_andc; + + function vec_andc + (A : vector_unsigned_int; + B : vector_bool_int) return vector_unsigned_int + is + begin + return To_LL_VUI (vandc (To_LL_VSI (A), To_LL_VSI (B))); + end vec_andc; + + function vec_andc + (A : vector_unsigned_int; + B : vector_unsigned_int) return vector_unsigned_int + is + begin + return To_LL_VUI (vandc (To_LL_VSI (A), To_LL_VSI (B))); + end vec_andc; + + function vec_andc + (A : vector_bool_short; + B : vector_bool_short) return vector_bool_short + is + begin + return To_LL_VBS (vandc (To_LL_VSI (A), To_LL_VSI (B))); + end vec_andc; + + function vec_andc + (A : vector_bool_short; + B : vector_signed_short) return vector_signed_short + is + begin + return To_LL_VSS (vandc (To_LL_VSI (A), To_LL_VSI (B))); + end vec_andc; + + function vec_andc + (A : vector_signed_short; + B : vector_bool_short) return vector_signed_short + is + begin + return To_LL_VSS (vandc (To_LL_VSI (A), To_LL_VSI (B))); + end vec_andc; + + function vec_andc + (A : vector_signed_short; + B : vector_signed_short) return vector_signed_short + is + begin + return To_LL_VSS (vandc (To_LL_VSI (A), To_LL_VSI (B))); + end vec_andc; + + function vec_andc + (A : vector_bool_short; + B : vector_unsigned_short) return vector_unsigned_short + is + begin + return To_LL_VUS (vandc (To_LL_VSI (A), To_LL_VSI (B))); + end vec_andc; + + function vec_andc + (A : vector_unsigned_short; + B : vector_bool_short) return vector_unsigned_short + is + begin + return To_LL_VUS (vandc (To_LL_VSI (A), To_LL_VSI (B))); + end vec_andc; + + function vec_andc + (A : vector_unsigned_short; + B : vector_unsigned_short) return vector_unsigned_short + is + begin + return To_LL_VUS (vandc (To_LL_VSI (A), To_LL_VSI (B))); + end vec_andc; + + function vec_andc + (A : vector_bool_char; + B : vector_signed_char) return vector_signed_char + is + begin + return To_LL_VSC (vandc (To_LL_VSI (A), To_LL_VSI (B))); + end vec_andc; + + function vec_andc + (A : vector_bool_char; + B : vector_bool_char) return vector_bool_char + is + begin + return To_LL_VBC (vandc (To_LL_VSI (A), To_LL_VSI (B))); + end vec_andc; + + function vec_andc + (A : vector_signed_char; + B : vector_bool_char) return vector_signed_char + is + begin + return To_LL_VSC (vandc (To_LL_VSI (A), To_LL_VSI (B))); + end vec_andc; + + function vec_andc + (A : vector_signed_char; + B : vector_signed_char) return vector_signed_char + is + begin + return To_LL_VSC (vandc (To_LL_VSI (A), To_LL_VSI (B))); + end vec_andc; + + function vec_andc + (A : vector_bool_char; + B : vector_unsigned_char) return vector_unsigned_char + is + begin + return To_LL_VUC (vandc (To_LL_VSI (A), To_LL_VSI (B))); + end vec_andc; + + function vec_andc + (A : vector_unsigned_char; + B : vector_bool_char) return vector_unsigned_char + is + begin + return To_LL_VUC (vandc (To_LL_VSI (A), To_LL_VSI (B))); + end vec_andc; + + function vec_andc + (A : vector_unsigned_char; + B : vector_unsigned_char) return vector_unsigned_char + is + begin + return To_LL_VUC (vandc (To_LL_VSI (A), To_LL_VSI (B))); + end vec_andc; + + -- vec_avg -- + + function vec_avg + (A : vector_unsigned_char; + B : vector_unsigned_char) return vector_unsigned_char + is + begin + return To_LL_VUC (vavgub (To_LL_VSC (A), To_LL_VSC (B))); + end vec_avg; + + function vec_avg + (A : vector_signed_char; + B : vector_signed_char) return vector_signed_char + is + begin + return To_LL_VSC (vavgsb (To_LL_VSC (A), To_LL_VSC (B))); + end vec_avg; + + function vec_avg + (A : vector_unsigned_short; + B : vector_unsigned_short) return vector_unsigned_short + is + begin + return To_LL_VUS (vavguh (To_LL_VSS (A), To_LL_VSS (B))); + end vec_avg; + + function vec_avg + (A : vector_signed_short; + B : vector_signed_short) return vector_signed_short + is + begin + return To_LL_VSS (vavgsh (To_LL_VSS (A), To_LL_VSS (B))); + end vec_avg; + + function vec_avg + (A : vector_unsigned_int; + B : vector_unsigned_int) return vector_unsigned_int + is + begin + return To_LL_VUI (vavguw (To_LL_VSI (A), To_LL_VSI (B))); + end vec_avg; + + function vec_avg + (A : vector_signed_int; + B : vector_signed_int) return vector_signed_int + is + begin + return To_LL_VSI (vavgsw (To_LL_VSI (A), To_LL_VSI (B))); + end vec_avg; + + -- vec_vavgsw -- + + function vec_vavgsw + (A : vector_signed_int; + B : vector_signed_int) return vector_signed_int + is + begin + return To_LL_VSI (vavgsw (To_LL_VSI (A), To_LL_VSI (B))); + end vec_vavgsw; + + -- vec_vavguw -- + + function vec_vavguw + (A : vector_unsigned_int; + B : vector_unsigned_int) return vector_unsigned_int + is + begin + return To_LL_VUI (vavguw (To_LL_VSI (A), To_LL_VSI (B))); + end vec_vavguw; + + -- vec_vavgsh -- + + function vec_vavgsh + (A : vector_signed_short; + B : vector_signed_short) return vector_signed_short + is + begin + return To_LL_VSS (vavgsh (To_LL_VSS (A), To_LL_VSS (B))); + end vec_vavgsh; + + -- vec_vavguh -- + + function vec_vavguh + (A : vector_unsigned_short; + B : vector_unsigned_short) return vector_unsigned_short + is + begin + return To_LL_VUS (vavguh (To_LL_VSS (A), To_LL_VSS (B))); + end vec_vavguh; + + -- vec_vavgsb -- + + function vec_vavgsb + (A : vector_signed_char; + B : vector_signed_char) return vector_signed_char + is + begin + return To_LL_VSC (vavgsb (To_LL_VSC (A), To_LL_VSC (B))); + end vec_vavgsb; + + -- vec_vavgub -- + + function vec_vavgub + (A : vector_unsigned_char; + B : vector_unsigned_char) return vector_unsigned_char + is + begin + return To_LL_VUC (vavgub (To_LL_VSC (A), To_LL_VSC (B))); + end vec_vavgub; + + -- vec_ceil -- + + function vec_ceil + (A : vector_float) return vector_float + is + begin + return To_LL_VF (vrfip (To_LL_VF (A))); + end vec_ceil; + + -- vec_cmpb -- + + function vec_cmpb + (A : vector_float; + B : vector_float) return vector_signed_int + is + begin + return To_LL_VSI (vcmpbfp (To_LL_VF (A), To_LL_VF (B))); + end vec_cmpb; + + -- vec_cmpeq -- + + function vec_cmpeq + (A : vector_signed_char; + B : vector_signed_char) return vector_bool_char + is + begin + return To_LL_VBC (vcmpequb (To_LL_VSC (A), To_LL_VSC (B))); + end vec_cmpeq; + + function vec_cmpeq + (A : vector_unsigned_char; + B : vector_unsigned_char) return vector_bool_char + is + begin + return To_LL_VBC (vcmpequb (To_LL_VSC (A), To_LL_VSC (B))); + end vec_cmpeq; + + function vec_cmpeq + (A : vector_signed_short; + B : vector_signed_short) return vector_bool_short + is + begin + return To_LL_VBS (vcmpequh (To_LL_VSS (A), To_LL_VSS (B))); + end vec_cmpeq; + + function vec_cmpeq + (A : vector_unsigned_short; + B : vector_unsigned_short) return vector_bool_short + is + begin + return To_LL_VBS (vcmpequh (To_LL_VSS (A), To_LL_VSS (B))); + end vec_cmpeq; + + function vec_cmpeq + (A : vector_signed_int; + B : vector_signed_int) return vector_bool_int + is + begin + return To_LL_VBI (vcmpequw (To_LL_VSI (A), To_LL_VSI (B))); + end vec_cmpeq; + + function vec_cmpeq + (A : vector_unsigned_int; + B : vector_unsigned_int) return vector_bool_int + is + begin + return To_LL_VBI (vcmpequw (To_LL_VSI (A), To_LL_VSI (B))); + end vec_cmpeq; + + function vec_cmpeq + (A : vector_float; + B : vector_float) return vector_bool_int + is + begin + return To_LL_VBI (vcmpeqfp (To_LL_VF (A), To_LL_VF (B))); + end vec_cmpeq; + + -- vec_vcmpeqfp -- + + function vec_vcmpeqfp + (A : vector_float; + B : vector_float) return vector_bool_int + is + begin + return To_LL_VBI (vcmpeqfp (To_LL_VF (A), To_LL_VF (B))); + end vec_vcmpeqfp; + + -- vec_vcmpequw -- + + function vec_vcmpequw + (A : vector_signed_int; + B : vector_signed_int) return vector_bool_int + is + begin + return To_LL_VBI (vcmpequw (To_LL_VSI (A), To_LL_VSI (B))); + end vec_vcmpequw; + + function vec_vcmpequw + (A : vector_unsigned_int; + B : vector_unsigned_int) return vector_bool_int + is + begin + return To_LL_VBI (vcmpequw (To_LL_VSI (A), To_LL_VSI (B))); + end vec_vcmpequw; + + -- vec_vcmpequh -- + + function vec_vcmpequh + (A : vector_signed_short; + B : vector_signed_short) return vector_bool_short + is + begin + return To_LL_VBS (vcmpequh (To_LL_VSS (A), To_LL_VSS (B))); + end vec_vcmpequh; + + function vec_vcmpequh + (A : vector_unsigned_short; + B : vector_unsigned_short) return vector_bool_short + is + begin + return To_LL_VBS (vcmpequh (To_LL_VSS (A), To_LL_VSS (B))); + end vec_vcmpequh; + + -- vec_vcmpequb -- + + function vec_vcmpequb + (A : vector_signed_char; + B : vector_signed_char) return vector_bool_char + is + begin + return To_LL_VBC (vcmpequb (To_LL_VSC (A), To_LL_VSC (B))); + end vec_vcmpequb; + + function vec_vcmpequb + (A : vector_unsigned_char; + B : vector_unsigned_char) return vector_bool_char + is + begin + return To_LL_VBC (vcmpequb (To_LL_VSC (A), To_LL_VSC (B))); + end vec_vcmpequb; + + -- vec_cmpge -- + + function vec_cmpge + (A : vector_float; + B : vector_float) return vector_bool_int + is + begin + return To_LL_VBI (vcmpgefp (To_LL_VF (A), To_LL_VF (B))); + end vec_cmpge; + + -- vec_cmpgt -- + + function vec_cmpgt + (A : vector_unsigned_char; + B : vector_unsigned_char) return vector_bool_char + is + begin + return To_LL_VBC (vcmpgtub (To_LL_VSC (A), To_LL_VSC (B))); + end vec_cmpgt; + + function vec_cmpgt + (A : vector_signed_char; + B : vector_signed_char) return vector_bool_char + is + begin + return To_LL_VBC (vcmpgtsb (To_LL_VSC (A), To_LL_VSC (B))); + end vec_cmpgt; + + function vec_cmpgt + (A : vector_unsigned_short; + B : vector_unsigned_short) return vector_bool_short + is + begin + return To_LL_VBS (vcmpgtuh (To_LL_VSS (A), To_LL_VSS (B))); + end vec_cmpgt; + + function vec_cmpgt + (A : vector_signed_short; + B : vector_signed_short) return vector_bool_short + is + begin + return To_LL_VBS (vcmpgtsh (To_LL_VSS (A), To_LL_VSS (B))); + end vec_cmpgt; + + function vec_cmpgt + (A : vector_unsigned_int; + B : vector_unsigned_int) return vector_bool_int + is + begin + return To_LL_VBI (vcmpgtuw (To_LL_VSI (A), To_LL_VSI (B))); + end vec_cmpgt; + + function vec_cmpgt + (A : vector_signed_int; + B : vector_signed_int) return vector_bool_int + is + begin + return To_LL_VBI (vcmpgtsw (To_LL_VSI (A), To_LL_VSI (B))); + end vec_cmpgt; + + function vec_cmpgt + (A : vector_float; + B : vector_float) return vector_bool_int + is + begin + return To_LL_VBI (vcmpgtfp (To_LL_VF (A), To_LL_VF (B))); + end vec_cmpgt; + + -- vec_vcmpgtfp -- + + function vec_vcmpgtfp + (A : vector_float; + B : vector_float) return vector_bool_int + is + begin + return To_LL_VBI (vcmpgtfp (To_LL_VF (A), To_LL_VF (B))); + end vec_vcmpgtfp; + + -- vec_vcmpgtsw -- + + function vec_vcmpgtsw + (A : vector_signed_int; + B : vector_signed_int) return vector_bool_int + is + begin + return To_LL_VBI (vcmpgtsw (To_LL_VSI (A), To_LL_VSI (B))); + end vec_vcmpgtsw; + + -- vec_vcmpgtuw -- + + function vec_vcmpgtuw + (A : vector_unsigned_int; + B : vector_unsigned_int) return vector_bool_int + is + begin + return To_LL_VBI (vcmpgtuw (To_LL_VSI (A), To_LL_VSI (B))); + end vec_vcmpgtuw; + + -- vec_vcmpgtsh -- + + function vec_vcmpgtsh + (A : vector_signed_short; + B : vector_signed_short) return vector_bool_short + is + begin + return To_LL_VBS (vcmpgtsh (To_LL_VSS (A), To_LL_VSS (B))); + end vec_vcmpgtsh; + + -- vec_vcmpgtuh -- + + function vec_vcmpgtuh + (A : vector_unsigned_short; + B : vector_unsigned_short) return vector_bool_short + is + begin + return To_LL_VBS (vcmpgtuh (To_LL_VSS (A), To_LL_VSS (B))); + end vec_vcmpgtuh; + + -- vec_vcmpgtsb -- + + function vec_vcmpgtsb + (A : vector_signed_char; + B : vector_signed_char) return vector_bool_char + is + begin + return To_LL_VBC (vcmpgtsb (To_LL_VSC (A), To_LL_VSC (B))); + end vec_vcmpgtsb; + + -- vec_vcmpgtub -- + + function vec_vcmpgtub + (A : vector_unsigned_char; + B : vector_unsigned_char) return vector_bool_char + is + begin + return To_LL_VBC (vcmpgtub (To_LL_VSC (A), To_LL_VSC (B))); + end vec_vcmpgtub; + + -- vec_cmple -- + + function vec_cmple + (A : vector_float; + B : vector_float) return vector_bool_int + is + begin + return To_LL_VBI (vcmpgefp (To_LL_VF (B), To_LL_VF (A))); + end vec_cmple; + + -- vec_cmplt -- + + function vec_cmplt + (A : vector_unsigned_char; + B : vector_unsigned_char) return vector_bool_char + is + begin + return To_LL_VBC (vcmpgtub (To_LL_VSC (B), To_LL_VSC (A))); + end vec_cmplt; + + function vec_cmplt + (A : vector_signed_char; + B : vector_signed_char) return vector_bool_char + is + begin + return To_LL_VBC (vcmpgtsb (To_LL_VSC (B), To_LL_VSC (A))); + end vec_cmplt; + + function vec_cmplt + (A : vector_unsigned_short; + B : vector_unsigned_short) return vector_bool_short + is + begin + return To_LL_VBS (vcmpgtuh (To_LL_VSS (B), To_LL_VSS (A))); + end vec_cmplt; + + function vec_cmplt + (A : vector_signed_short; + B : vector_signed_short) return vector_bool_short + is + begin + return To_LL_VBS (vcmpgtsh (To_LL_VSS (B), To_LL_VSS (A))); + end vec_cmplt; + + function vec_cmplt + (A : vector_unsigned_int; + B : vector_unsigned_int) return vector_bool_int + is + begin + return To_LL_VBI (vcmpgtuw (To_LL_VSI (B), To_LL_VSI (A))); + end vec_cmplt; + + function vec_cmplt + (A : vector_signed_int; + B : vector_signed_int) return vector_bool_int + is + begin + return To_LL_VBI (vcmpgtsw (To_LL_VSI (B), To_LL_VSI (A))); + end vec_cmplt; + + function vec_cmplt + (A : vector_float; + B : vector_float) return vector_bool_int + is + begin + return To_LL_VBI (vcmpgtfp (To_LL_VF (B), To_LL_VF (A))); + end vec_cmplt; + + -- vec_expte -- + + function vec_expte + (A : vector_float) return vector_float + is + begin + return To_LL_VF (vexptefp (To_LL_VF (A))); + end vec_expte; + + -- vec_floor -- + + function vec_floor + (A : vector_float) return vector_float + is + begin + return To_LL_VF (vrfim (To_LL_VF (A))); + end vec_floor; + + -- vec_ld -- + + function vec_ld + (A : c_long; + B : const_vector_float_ptr) return vector_float + is + begin + return To_LL_VF (lvx (A, To_PTR (B))); + end vec_ld; + + function vec_ld + (A : c_long; + B : const_float_ptr) return vector_float + is + begin + return To_LL_VF (lvx (A, To_PTR (B))); + end vec_ld; + + function vec_ld + (A : c_long; + B : const_vector_bool_int_ptr) return vector_bool_int + is + begin + return To_LL_VBI (lvx (A, To_PTR (B))); + end vec_ld; + + function vec_ld + (A : c_long; + B : const_vector_signed_int_ptr) return vector_signed_int + is + begin + return To_LL_VSI (lvx (A, To_PTR (B))); + end vec_ld; + + function vec_ld + (A : c_long; + B : const_int_ptr) return vector_signed_int + is + begin + return To_LL_VSI (lvx (A, To_PTR (B))); + end vec_ld; + + function vec_ld + (A : c_long; + B : const_long_ptr) return vector_signed_int + is + begin + return To_LL_VSI (lvx (A, To_PTR (B))); + end vec_ld; + + function vec_ld + (A : c_long; + B : const_vector_unsigned_int_ptr) return vector_unsigned_int + is + begin + return To_LL_VUI (lvx (A, To_PTR (B))); + end vec_ld; + + function vec_ld + (A : c_long; + B : const_unsigned_int_ptr) return vector_unsigned_int + is + begin + return To_LL_VUI (lvx (A, To_PTR (B))); + end vec_ld; + + function vec_ld + (A : c_long; + B : const_unsigned_long_ptr) return vector_unsigned_int + is + begin + return To_LL_VUI (lvx (A, To_PTR (B))); + end vec_ld; + + function vec_ld + (A : c_long; + B : const_vector_bool_short_ptr) return vector_bool_short + is + begin + return To_LL_VBS (lvx (A, To_PTR (B))); + end vec_ld; + + function vec_ld + (A : c_long; + B : const_vector_pixel_ptr) return vector_pixel + is + begin + return To_LL_VP (lvx (A, To_PTR (B))); + end vec_ld; + + function vec_ld + (A : c_long; + B : const_vector_signed_short_ptr) return vector_signed_short + is + begin + return To_LL_VSS (lvx (A, To_PTR (B))); + end vec_ld; + + function vec_ld + (A : c_long; + B : const_short_ptr) return vector_signed_short + is + begin + return To_LL_VSS (lvx (A, To_PTR (B))); + end vec_ld; + + function vec_ld + (A : c_long; + B : const_vector_unsigned_short_ptr) return vector_unsigned_short + is + begin + return To_LL_VUS (lvx (A, To_PTR (B))); + end vec_ld; + + function vec_ld + (A : c_long; + B : const_unsigned_short_ptr) return vector_unsigned_short + is + begin + return To_LL_VUS (lvx (A, To_PTR (B))); + end vec_ld; + + function vec_ld + (A : c_long; + B : const_vector_bool_char_ptr) return vector_bool_char + is + begin + return To_LL_VBC (lvx (A, To_PTR (B))); + end vec_ld; + + function vec_ld + (A : c_long; + B : const_vector_signed_char_ptr) return vector_signed_char + is + begin + return To_LL_VSC (lvx (A, To_PTR (B))); + end vec_ld; + + function vec_ld + (A : c_long; + B : const_signed_char_ptr) return vector_signed_char + is + begin + return To_LL_VSC (lvx (A, To_PTR (B))); + end vec_ld; + + function vec_ld + (A : c_long; + B : const_vector_unsigned_char_ptr) return vector_unsigned_char + is + begin + return To_LL_VUC (lvx (A, To_PTR (B))); + end vec_ld; + + function vec_ld + (A : c_long; + B : const_unsigned_char_ptr) return vector_unsigned_char + is + begin + return To_LL_VUC (lvx (A, To_PTR (B))); + end vec_ld; + + -- vec_lde -- + + function vec_lde + (A : c_long; + B : const_signed_char_ptr) return vector_signed_char + is + begin + return To_LL_VSC (lvebx (A, To_PTR (B))); + end vec_lde; + + function vec_lde + (A : c_long; + B : const_unsigned_char_ptr) return vector_unsigned_char + is + begin + return To_LL_VUC (lvebx (A, To_PTR (B))); + end vec_lde; + + function vec_lde + (A : c_long; + B : const_short_ptr) return vector_signed_short + is + begin + return To_LL_VSS (lvehx (A, To_PTR (B))); + end vec_lde; + + function vec_lde + (A : c_long; + B : const_unsigned_short_ptr) return vector_unsigned_short + is + begin + return To_LL_VUS (lvehx (A, To_PTR (B))); + end vec_lde; + + function vec_lde + (A : c_long; + B : const_float_ptr) return vector_float + is + begin + return To_LL_VF (lvewx (A, To_PTR (B))); + end vec_lde; + + function vec_lde + (A : c_long; + B : const_int_ptr) return vector_signed_int + is + begin + return To_LL_VSI (lvewx (A, To_PTR (B))); + end vec_lde; + + function vec_lde + (A : c_long; + B : const_unsigned_int_ptr) return vector_unsigned_int + is + begin + return To_LL_VUI (lvewx (A, To_PTR (B))); + end vec_lde; + + function vec_lde + (A : c_long; + B : const_long_ptr) return vector_signed_int + is + begin + return To_LL_VSI (lvewx (A, To_PTR (B))); + end vec_lde; + + function vec_lde + (A : c_long; + B : const_unsigned_long_ptr) return vector_unsigned_int + is + begin + return To_LL_VUI (lvewx (A, To_PTR (B))); + end vec_lde; + + -- vec_lvewx -- + + function vec_lvewx + (A : c_long; + B : float_ptr) return vector_float + is + begin + return To_LL_VF (lvewx (A, To_PTR (B))); + end vec_lvewx; + + function vec_lvewx + (A : c_long; + B : int_ptr) return vector_signed_int + is + begin + return To_LL_VSI (lvewx (A, To_PTR (B))); + end vec_lvewx; + + function vec_lvewx + (A : c_long; + B : unsigned_int_ptr) return vector_unsigned_int + is + begin + return To_LL_VUI (lvewx (A, To_PTR (B))); + end vec_lvewx; + + function vec_lvewx + (A : c_long; + B : long_ptr) return vector_signed_int + is + begin + return To_LL_VSI (lvewx (A, To_PTR (B))); + end vec_lvewx; + + function vec_lvewx + (A : c_long; + B : unsigned_long_ptr) return vector_unsigned_int + is + begin + return To_LL_VUI (lvewx (A, To_PTR (B))); + end vec_lvewx; + + -- vec_lvehx -- + + function vec_lvehx + (A : c_long; + B : short_ptr) return vector_signed_short + is + begin + return To_LL_VSS (lvehx (A, To_PTR (B))); + end vec_lvehx; + + function vec_lvehx + (A : c_long; + B : unsigned_short_ptr) return vector_unsigned_short + is + begin + return To_LL_VUS (lvehx (A, To_PTR (B))); + end vec_lvehx; + + -- vec_lvebx -- + + function vec_lvebx + (A : c_long; + B : signed_char_ptr) return vector_signed_char + is + begin + return To_LL_VSC (lvebx (A, To_PTR (B))); + end vec_lvebx; + + function vec_lvebx + (A : c_long; + B : unsigned_char_ptr) return vector_unsigned_char + is + begin + return To_LL_VUC (lvebx (A, To_PTR (B))); + end vec_lvebx; + + -- vec_ldl -- + + function vec_ldl + (A : c_long; + B : const_vector_float_ptr) return vector_float + is + begin + return To_LL_VF (lvxl (A, To_PTR (B))); + end vec_ldl; + + function vec_ldl + (A : c_long; + B : const_float_ptr) return vector_float + is + begin + return To_LL_VF (lvxl (A, To_PTR (B))); + end vec_ldl; + + function vec_ldl + (A : c_long; + B : const_vector_bool_int_ptr) return vector_bool_int + is + begin + return To_LL_VBI (lvxl (A, To_PTR (B))); + end vec_ldl; + + function vec_ldl + (A : c_long; + B : const_vector_signed_int_ptr) return vector_signed_int + is + begin + return To_LL_VSI (lvxl (A, To_PTR (B))); + end vec_ldl; + + function vec_ldl + (A : c_long; + B : const_int_ptr) return vector_signed_int + is + begin + return To_LL_VSI (lvxl (A, To_PTR (B))); + end vec_ldl; + + function vec_ldl + (A : c_long; + B : const_long_ptr) return vector_signed_int + is + begin + return To_LL_VSI (lvxl (A, To_PTR (B))); + end vec_ldl; + + function vec_ldl + (A : c_long; + B : const_vector_unsigned_int_ptr) return vector_unsigned_int + is + begin + return To_LL_VUI (lvxl (A, To_PTR (B))); + end vec_ldl; + + function vec_ldl + (A : c_long; + B : const_unsigned_int_ptr) return vector_unsigned_int + is + begin + return To_LL_VUI (lvxl (A, To_PTR (B))); + end vec_ldl; + + function vec_ldl + (A : c_long; + B : const_unsigned_long_ptr) return vector_unsigned_int + is + begin + return To_LL_VUI (lvxl (A, To_PTR (B))); + end vec_ldl; + + function vec_ldl + (A : c_long; + B : const_vector_bool_short_ptr) return vector_bool_short + is + begin + return To_LL_VBS (lvxl (A, To_PTR (B))); + end vec_ldl; + + function vec_ldl + (A : c_long; + B : const_vector_pixel_ptr) return vector_pixel + is + begin + return To_LL_VP (lvxl (A, To_PTR (B))); + end vec_ldl; + + function vec_ldl + (A : c_long; + B : const_vector_signed_short_ptr) return vector_signed_short + is + begin + return To_LL_VSS (lvxl (A, To_PTR (B))); + end vec_ldl; + + function vec_ldl + (A : c_long; + B : const_short_ptr) return vector_signed_short + is + begin + return To_LL_VSS (lvxl (A, To_PTR (B))); + end vec_ldl; + + function vec_ldl + (A : c_long; + B : const_vector_unsigned_short_ptr) return vector_unsigned_short + is + begin + return To_LL_VUS (lvxl (A, To_PTR (B))); + end vec_ldl; + + function vec_ldl + (A : c_long; + B : const_unsigned_short_ptr) return vector_unsigned_short + is + begin + return To_LL_VUS (lvxl (A, To_PTR (B))); + end vec_ldl; + + function vec_ldl + (A : c_long; + B : const_vector_bool_char_ptr) return vector_bool_char + is + begin + return To_LL_VBC (lvxl (A, To_PTR (B))); + end vec_ldl; + + function vec_ldl + (A : c_long; + B : const_vector_signed_char_ptr) return vector_signed_char + is + begin + return To_LL_VSC (lvxl (A, To_PTR (B))); + end vec_ldl; + + function vec_ldl + (A : c_long; + B : const_signed_char_ptr) return vector_signed_char + is + begin + return To_LL_VSC (lvxl (A, To_PTR (B))); + end vec_ldl; + + function vec_ldl + (A : c_long; + B : const_vector_unsigned_char_ptr) return vector_unsigned_char + is + begin + return To_LL_VUC (lvxl (A, To_PTR (B))); + end vec_ldl; + + function vec_ldl + (A : c_long; + B : const_unsigned_char_ptr) return vector_unsigned_char + is + begin + return To_LL_VUC (lvxl (A, To_PTR (B))); + end vec_ldl; + + -- vec_loge -- + + function vec_loge + (A : vector_float) return vector_float + is + begin + return To_LL_VF (vlogefp (To_LL_VF (A))); + end vec_loge; + + -- vec_lvsl -- + + function vec_lvsl + (A : c_long; + B : constv_unsigned_char_ptr) return vector_unsigned_char + is + begin + return To_LL_VUC (lvsl (A, To_PTR (B))); + end vec_lvsl; + + function vec_lvsl + (A : c_long; + B : constv_signed_char_ptr) return vector_unsigned_char + is + begin + return To_LL_VUC (lvsl (A, To_PTR (B))); + end vec_lvsl; + + function vec_lvsl + (A : c_long; + B : constv_unsigned_short_ptr) return vector_unsigned_char + is + begin + return To_LL_VUC (lvsl (A, To_PTR (B))); + end vec_lvsl; + + function vec_lvsl + (A : c_long; + B : constv_short_ptr) return vector_unsigned_char + is + begin + return To_LL_VUC (lvsl (A, To_PTR (B))); + end vec_lvsl; + + function vec_lvsl + (A : c_long; + B : constv_unsigned_int_ptr) return vector_unsigned_char + is + begin + return To_LL_VUC (lvsl (A, To_PTR (B))); + end vec_lvsl; + + function vec_lvsl + (A : c_long; + B : constv_int_ptr) return vector_unsigned_char + is + begin + return To_LL_VUC (lvsl (A, To_PTR (B))); + end vec_lvsl; + + function vec_lvsl + (A : c_long; + B : constv_unsigned_long_ptr) return vector_unsigned_char + is + begin + return To_LL_VUC (lvsl (A, To_PTR (B))); + end vec_lvsl; + + function vec_lvsl + (A : c_long; + B : constv_long_ptr) return vector_unsigned_char + is + begin + return To_LL_VUC (lvsl (A, To_PTR (B))); + end vec_lvsl; + + function vec_lvsl + (A : c_long; + B : constv_float_ptr) return vector_unsigned_char + is + begin + return To_LL_VUC (lvsl (A, To_PTR (B))); + end vec_lvsl; + + -- vec_lvsr -- + + function vec_lvsr + (A : c_long; + B : constv_unsigned_char_ptr) return vector_unsigned_char + is + begin + return To_LL_VUC (lvsr (A, To_PTR (B))); + end vec_lvsr; + + function vec_lvsr + (A : c_long; + B : constv_signed_char_ptr) return vector_unsigned_char + is + begin + return To_LL_VUC (lvsr (A, To_PTR (B))); + end vec_lvsr; + + function vec_lvsr + (A : c_long; + B : constv_unsigned_short_ptr) return vector_unsigned_char + is + begin + return To_LL_VUC (lvsr (A, To_PTR (B))); + end vec_lvsr; + + function vec_lvsr + (A : c_long; + B : constv_short_ptr) return vector_unsigned_char + is + begin + return To_LL_VUC (lvsr (A, To_PTR (B))); + end vec_lvsr; + + function vec_lvsr + (A : c_long; + B : constv_unsigned_int_ptr) return vector_unsigned_char + is + begin + return To_LL_VUC (lvsr (A, To_PTR (B))); + end vec_lvsr; + + function vec_lvsr + (A : c_long; + B : constv_int_ptr) return vector_unsigned_char + is + begin + return To_LL_VUC (lvsr (A, To_PTR (B))); + end vec_lvsr; + + function vec_lvsr + (A : c_long; + B : constv_unsigned_long_ptr) return vector_unsigned_char + is + begin + return To_LL_VUC (lvsr (A, To_PTR (B))); + end vec_lvsr; + + function vec_lvsr + (A : c_long; + B : constv_long_ptr) return vector_unsigned_char + is + begin + return To_LL_VUC (lvsr (A, To_PTR (B))); + end vec_lvsr; + + function vec_lvsr + (A : c_long; + B : constv_float_ptr) return vector_unsigned_char + is + begin + return To_LL_VUC (lvsr (A, To_PTR (B))); + end vec_lvsr; + + -- vec_madd -- + + function vec_madd + (A : vector_float; + B : vector_float; + C : vector_float) return vector_float + is + begin + return vmaddfp (A, B, C); + end vec_madd; + + -- vec_madds -- + + function vec_madds + (A : vector_signed_short; + B : vector_signed_short; + C : vector_signed_short) return vector_signed_short + is + begin + return vmhaddshs (A, B, C); + end vec_madds; + + -- vec_max -- + + function vec_max + (A : vector_bool_char; + B : vector_unsigned_char) return vector_unsigned_char + is + begin + return To_LL_VUC (vmaxub (To_LL_VSC (A), To_LL_VSC (B))); + end vec_max; + + function vec_max + (A : vector_unsigned_char; + B : vector_bool_char) return vector_unsigned_char + is + begin + return To_LL_VUC (vmaxub (To_LL_VSC (A), To_LL_VSC (B))); + end vec_max; + + function vec_max + (A : vector_unsigned_char; + B : vector_unsigned_char) return vector_unsigned_char + is + begin + return To_LL_VUC (vmaxub (To_LL_VSC (A), To_LL_VSC (B))); + end vec_max; + + function vec_max + (A : vector_bool_char; + B : vector_signed_char) return vector_signed_char + is + begin + return To_LL_VSC (vmaxsb (To_LL_VSC (A), To_LL_VSC (B))); + end vec_max; + + function vec_max + (A : vector_signed_char; + B : vector_bool_char) return vector_signed_char + is + begin + return To_LL_VSC (vmaxsb (To_LL_VSC (A), To_LL_VSC (B))); + end vec_max; + + function vec_max + (A : vector_signed_char; + B : vector_signed_char) return vector_signed_char + is + begin + return To_LL_VSC (vmaxsb (To_LL_VSC (A), To_LL_VSC (B))); + end vec_max; + + function vec_max + (A : vector_bool_short; + B : vector_unsigned_short) return vector_unsigned_short + is + begin + return To_LL_VUS (vmaxuh (To_LL_VSS (A), To_LL_VSS (B))); + end vec_max; + + function vec_max + (A : vector_unsigned_short; + B : vector_bool_short) return vector_unsigned_short + is + begin + return To_LL_VUS (vmaxuh (To_LL_VSS (A), To_LL_VSS (B))); + end vec_max; + + function vec_max + (A : vector_unsigned_short; + B : vector_unsigned_short) return vector_unsigned_short + is + begin + return To_LL_VUS (vmaxuh (To_LL_VSS (A), To_LL_VSS (B))); + end vec_max; + + function vec_max + (A : vector_bool_short; + B : vector_signed_short) return vector_signed_short + is + begin + return To_LL_VSS (vmaxsh (To_LL_VSS (A), To_LL_VSS (B))); + end vec_max; + + function vec_max + (A : vector_signed_short; + B : vector_bool_short) return vector_signed_short + is + begin + return To_LL_VSS (vmaxsh (To_LL_VSS (A), To_LL_VSS (B))); + end vec_max; + + function vec_max + (A : vector_signed_short; + B : vector_signed_short) return vector_signed_short + is + begin + return To_LL_VSS (vmaxsh (To_LL_VSS (A), To_LL_VSS (B))); + end vec_max; + + function vec_max + (A : vector_bool_int; + B : vector_unsigned_int) return vector_unsigned_int + is + begin + return To_LL_VUI (vmaxuw (To_LL_VSI (A), To_LL_VSI (B))); + end vec_max; + + function vec_max + (A : vector_unsigned_int; + B : vector_bool_int) return vector_unsigned_int + is + begin + return To_LL_VUI (vmaxuw (To_LL_VSI (A), To_LL_VSI (B))); + end vec_max; + + function vec_max + (A : vector_unsigned_int; + B : vector_unsigned_int) return vector_unsigned_int + is + begin + return To_LL_VUI (vmaxuw (To_LL_VSI (A), To_LL_VSI (B))); + end vec_max; + + function vec_max + (A : vector_bool_int; + B : vector_signed_int) return vector_signed_int + is + begin + return To_LL_VSI (vmaxsw (To_LL_VSI (A), To_LL_VSI (B))); + end vec_max; + + function vec_max + (A : vector_signed_int; + B : vector_bool_int) return vector_signed_int + is + begin + return To_LL_VSI (vmaxsw (To_LL_VSI (A), To_LL_VSI (B))); + end vec_max; + + function vec_max + (A : vector_signed_int; + B : vector_signed_int) return vector_signed_int + is + begin + return To_LL_VSI (vmaxsw (To_LL_VSI (A), To_LL_VSI (B))); + end vec_max; + + function vec_max + (A : vector_float; + B : vector_float) return vector_float + is + begin + return To_LL_VF (vmaxfp (To_LL_VF (A), To_LL_VF (B))); + end vec_max; + + -- vec_vmaxfp -- + + function vec_vmaxfp + (A : vector_float; + B : vector_float) return vector_float + is + begin + return To_LL_VF (vmaxfp (To_LL_VF (A), To_LL_VF (B))); + end vec_vmaxfp; + + -- vec_vmaxsw -- + + function vec_vmaxsw + (A : vector_bool_int; + B : vector_signed_int) return vector_signed_int + is + begin + return To_LL_VSI (vmaxsw (To_LL_VSI (A), To_LL_VSI (B))); + end vec_vmaxsw; + + function vec_vmaxsw + (A : vector_signed_int; + B : vector_bool_int) return vector_signed_int + is + begin + return To_LL_VSI (vmaxsw (To_LL_VSI (A), To_LL_VSI (B))); + end vec_vmaxsw; + + function vec_vmaxsw + (A : vector_signed_int; + B : vector_signed_int) return vector_signed_int + is + begin + return To_LL_VSI (vmaxsw (To_LL_VSI (A), To_LL_VSI (B))); + end vec_vmaxsw; + + -- vec_vmaxuw -- + + function vec_vmaxuw + (A : vector_bool_int; + B : vector_unsigned_int) return vector_unsigned_int + is + begin + return To_LL_VUI (vmaxuw (To_LL_VSI (A), To_LL_VSI (B))); + end vec_vmaxuw; + + function vec_vmaxuw + (A : vector_unsigned_int; + B : vector_bool_int) return vector_unsigned_int + is + begin + return To_LL_VUI (vmaxuw (To_LL_VSI (A), To_LL_VSI (B))); + end vec_vmaxuw; + + function vec_vmaxuw + (A : vector_unsigned_int; + B : vector_unsigned_int) return vector_unsigned_int + is + begin + return To_LL_VUI (vmaxuw (To_LL_VSI (A), To_LL_VSI (B))); + end vec_vmaxuw; + + -- vec_vmaxsh -- + + function vec_vmaxsh + (A : vector_bool_short; + B : vector_signed_short) return vector_signed_short + is + begin + return To_LL_VSS (vmaxsh (To_LL_VSS (A), To_LL_VSS (B))); + end vec_vmaxsh; + + function vec_vmaxsh + (A : vector_signed_short; + B : vector_bool_short) return vector_signed_short + is + begin + return To_LL_VSS (vmaxsh (To_LL_VSS (A), To_LL_VSS (B))); + end vec_vmaxsh; + + function vec_vmaxsh + (A : vector_signed_short; + B : vector_signed_short) return vector_signed_short + is + begin + return To_LL_VSS (vmaxsh (To_LL_VSS (A), To_LL_VSS (B))); + end vec_vmaxsh; + + -- vec_vmaxuh -- + + function vec_vmaxuh + (A : vector_bool_short; + B : vector_unsigned_short) return vector_unsigned_short + is + begin + return To_LL_VUS (vmaxuh (To_LL_VSS (A), To_LL_VSS (B))); + end vec_vmaxuh; + + function vec_vmaxuh + (A : vector_unsigned_short; + B : vector_bool_short) return vector_unsigned_short + is + begin + return To_LL_VUS (vmaxuh (To_LL_VSS (A), To_LL_VSS (B))); + end vec_vmaxuh; + + function vec_vmaxuh + (A : vector_unsigned_short; + B : vector_unsigned_short) return vector_unsigned_short + is + begin + return To_LL_VUS (vmaxuh (To_LL_VSS (A), To_LL_VSS (B))); + end vec_vmaxuh; + + -- vec_vmaxsb -- + + function vec_vmaxsb + (A : vector_bool_char; + B : vector_signed_char) return vector_signed_char + is + begin + return To_LL_VSC (vmaxsb (To_LL_VSC (A), To_LL_VSC (B))); + end vec_vmaxsb; + + function vec_vmaxsb + (A : vector_signed_char; + B : vector_bool_char) return vector_signed_char + is + begin + return To_LL_VSC (vmaxsb (To_LL_VSC (A), To_LL_VSC (B))); + end vec_vmaxsb; + + function vec_vmaxsb + (A : vector_signed_char; + B : vector_signed_char) return vector_signed_char + is + begin + return To_LL_VSC (vmaxsb (To_LL_VSC (A), To_LL_VSC (B))); + end vec_vmaxsb; + + -- vec_vmaxub -- + + function vec_vmaxub + (A : vector_bool_char; + B : vector_unsigned_char) return vector_unsigned_char + is + begin + return To_LL_VUC (vmaxub (To_LL_VSC (A), To_LL_VSC (B))); + end vec_vmaxub; + + function vec_vmaxub + (A : vector_unsigned_char; + B : vector_bool_char) return vector_unsigned_char + is + begin + return To_LL_VUC (vmaxub (To_LL_VSC (A), To_LL_VSC (B))); + end vec_vmaxub; + + function vec_vmaxub + (A : vector_unsigned_char; + B : vector_unsigned_char) return vector_unsigned_char + is + begin + return To_LL_VUC (vmaxub (To_LL_VSC (A), To_LL_VSC (B))); + end vec_vmaxub; + + -- vec_mergeh -- + + function vec_mergeh + (A : vector_bool_char; + B : vector_bool_char) return vector_bool_char + is + begin + return To_LL_VBC (vmrghb (To_LL_VSC (A), To_LL_VSC (B))); + end vec_mergeh; + + function vec_mergeh + (A : vector_signed_char; + B : vector_signed_char) return vector_signed_char + is + begin + return To_LL_VSC (vmrghb (To_LL_VSC (A), To_LL_VSC (B))); + end vec_mergeh; + + function vec_mergeh + (A : vector_unsigned_char; + B : vector_unsigned_char) return vector_unsigned_char + is + begin + return To_LL_VUC (vmrghb (To_LL_VSC (A), To_LL_VSC (B))); + end vec_mergeh; + + function vec_mergeh + (A : vector_bool_short; + B : vector_bool_short) return vector_bool_short + is + begin + return To_LL_VBS (vmrghh (To_LL_VSS (A), To_LL_VSS (B))); + end vec_mergeh; + + function vec_mergeh + (A : vector_pixel; + B : vector_pixel) return vector_pixel + is + begin + return To_LL_VP (vmrghh (To_LL_VSS (A), To_LL_VSS (B))); + end vec_mergeh; + + function vec_mergeh + (A : vector_signed_short; + B : vector_signed_short) return vector_signed_short + is + begin + return To_LL_VSS (vmrghh (To_LL_VSS (A), To_LL_VSS (B))); + end vec_mergeh; + + function vec_mergeh + (A : vector_unsigned_short; + B : vector_unsigned_short) return vector_unsigned_short + is + begin + return To_LL_VUS (vmrghh (To_LL_VSS (A), To_LL_VSS (B))); + end vec_mergeh; + + function vec_mergeh + (A : vector_float; + B : vector_float) return vector_float + is + begin + return To_LL_VF (vmrghw (To_LL_VSI (A), To_LL_VSI (B))); + end vec_mergeh; + + function vec_mergeh + (A : vector_bool_int; + B : vector_bool_int) return vector_bool_int + is + begin + return To_LL_VBI (vmrghw (To_LL_VSI (A), To_LL_VSI (B))); + end vec_mergeh; + + function vec_mergeh + (A : vector_signed_int; + B : vector_signed_int) return vector_signed_int + is + begin + return To_LL_VSI (vmrghw (To_LL_VSI (A), To_LL_VSI (B))); + end vec_mergeh; + + function vec_mergeh + (A : vector_unsigned_int; + B : vector_unsigned_int) return vector_unsigned_int + is + begin + return To_LL_VUI (vmrghw (To_LL_VSI (A), To_LL_VSI (B))); + end vec_mergeh; + + -- vec_vmrghw -- + + function vec_vmrghw + (A : vector_float; + B : vector_float) return vector_float + is + begin + return To_LL_VF (vmrghw (To_LL_VSI (A), To_LL_VSI (B))); + end vec_vmrghw; + + function vec_vmrghw + (A : vector_bool_int; + B : vector_bool_int) return vector_bool_int + is + begin + return To_LL_VBI (vmrghw (To_LL_VSI (A), To_LL_VSI (B))); + end vec_vmrghw; + + function vec_vmrghw + (A : vector_signed_int; + B : vector_signed_int) return vector_signed_int + is + begin + return To_LL_VSI (vmrghw (To_LL_VSI (A), To_LL_VSI (B))); + end vec_vmrghw; + + function vec_vmrghw + (A : vector_unsigned_int; + B : vector_unsigned_int) return vector_unsigned_int + is + begin + return To_LL_VUI (vmrghw (To_LL_VSI (A), To_LL_VSI (B))); + end vec_vmrghw; + + -- vec_vmrghh -- + + function vec_vmrghh + (A : vector_bool_short; + B : vector_bool_short) return vector_bool_short + is + begin + return To_LL_VBS (vmrghh (To_LL_VSS (A), To_LL_VSS (B))); + end vec_vmrghh; + + function vec_vmrghh + (A : vector_signed_short; + B : vector_signed_short) return vector_signed_short + is + begin + return To_LL_VSS (vmrghh (To_LL_VSS (A), To_LL_VSS (B))); + end vec_vmrghh; + + function vec_vmrghh + (A : vector_unsigned_short; + B : vector_unsigned_short) return vector_unsigned_short + is + begin + return To_LL_VUS (vmrghh (To_LL_VSS (A), To_LL_VSS (B))); + end vec_vmrghh; + + function vec_vmrghh + (A : vector_pixel; + B : vector_pixel) return vector_pixel + is + begin + return To_LL_VP (vmrghh (To_LL_VSS (A), To_LL_VSS (B))); + end vec_vmrghh; + + -- vec_vmrghb -- + + function vec_vmrghb + (A : vector_bool_char; + B : vector_bool_char) return vector_bool_char + is + begin + return To_LL_VBC (vmrghb (To_LL_VSC (A), To_LL_VSC (B))); + end vec_vmrghb; + + function vec_vmrghb + (A : vector_signed_char; + B : vector_signed_char) return vector_signed_char + is + begin + return To_LL_VSC (vmrghb (To_LL_VSC (A), To_LL_VSC (B))); + end vec_vmrghb; + + function vec_vmrghb + (A : vector_unsigned_char; + B : vector_unsigned_char) return vector_unsigned_char + is + begin + return To_LL_VUC (vmrghb (To_LL_VSC (A), To_LL_VSC (B))); + end vec_vmrghb; + + -- vec_mergel -- + + function vec_mergel + (A : vector_bool_char; + B : vector_bool_char) return vector_bool_char + is + begin + return To_LL_VBC (vmrglb (To_LL_VSC (A), To_LL_VSC (B))); + end vec_mergel; + + function vec_mergel + (A : vector_signed_char; + B : vector_signed_char) return vector_signed_char + is + begin + return To_LL_VSC (vmrglb (To_LL_VSC (A), To_LL_VSC (B))); + end vec_mergel; + + function vec_mergel + (A : vector_unsigned_char; + B : vector_unsigned_char) return vector_unsigned_char + is + begin + return To_LL_VUC (vmrglb (To_LL_VSC (A), To_LL_VSC (B))); + end vec_mergel; + + function vec_mergel + (A : vector_bool_short; + B : vector_bool_short) return vector_bool_short + is + begin + return To_LL_VBS (vmrglh (To_LL_VSS (A), To_LL_VSS (B))); + end vec_mergel; + + function vec_mergel + (A : vector_pixel; + B : vector_pixel) return vector_pixel + is + begin + return To_LL_VP (vmrglh (To_LL_VSS (A), To_LL_VSS (B))); + end vec_mergel; + + function vec_mergel + (A : vector_signed_short; + B : vector_signed_short) return vector_signed_short + is + begin + return To_LL_VSS (vmrglh (To_LL_VSS (A), To_LL_VSS (B))); + end vec_mergel; + + function vec_mergel + (A : vector_unsigned_short; + B : vector_unsigned_short) return vector_unsigned_short + is + begin + return To_LL_VUS (vmrglh (To_LL_VSS (A), To_LL_VSS (B))); + end vec_mergel; + + function vec_mergel + (A : vector_float; + B : vector_float) return vector_float + is + begin + return To_LL_VF (vmrglw (To_LL_VSI (A), To_LL_VSI (B))); + end vec_mergel; + + function vec_mergel + (A : vector_bool_int; + B : vector_bool_int) return vector_bool_int + is + begin + return To_LL_VBI (vmrglw (To_LL_VSI (A), To_LL_VSI (B))); + end vec_mergel; + + function vec_mergel + (A : vector_signed_int; + B : vector_signed_int) return vector_signed_int + is + begin + return To_LL_VSI (vmrglw (To_LL_VSI (A), To_LL_VSI (B))); + end vec_mergel; + + function vec_mergel + (A : vector_unsigned_int; + B : vector_unsigned_int) return vector_unsigned_int + is + begin + return To_LL_VUI (vmrglw (To_LL_VSI (A), To_LL_VSI (B))); + end vec_mergel; + + -- vec_vmrglw -- + + function vec_vmrglw + (A : vector_float; + B : vector_float) return vector_float + is + begin + return To_LL_VF (vmrglw (To_LL_VSI (A), To_LL_VSI (B))); + end vec_vmrglw; + + function vec_vmrglw + (A : vector_signed_int; + B : vector_signed_int) return vector_signed_int + is + begin + return To_LL_VSI (vmrglw (To_LL_VSI (A), To_LL_VSI (B))); + end vec_vmrglw; + + function vec_vmrglw + (A : vector_unsigned_int; + B : vector_unsigned_int) return vector_unsigned_int + is + begin + return To_LL_VUI (vmrglw (To_LL_VSI (A), To_LL_VSI (B))); + end vec_vmrglw; + + function vec_vmrglw + (A : vector_bool_int; + B : vector_bool_int) return vector_bool_int + is + begin + return To_LL_VBI (vmrglw (To_LL_VSI (A), To_LL_VSI (B))); + end vec_vmrglw; + + -- vec_vmrglh -- + + function vec_vmrglh + (A : vector_bool_short; + B : vector_bool_short) return vector_bool_short + is + begin + return To_LL_VBS (vmrglh (To_LL_VSS (A), To_LL_VSS (B))); + end vec_vmrglh; + + function vec_vmrglh + (A : vector_signed_short; + B : vector_signed_short) return vector_signed_short + is + begin + return To_LL_VSS (vmrglh (To_LL_VSS (A), To_LL_VSS (B))); + end vec_vmrglh; + + function vec_vmrglh + (A : vector_unsigned_short; + B : vector_unsigned_short) return vector_unsigned_short + is + begin + return To_LL_VUS (vmrglh (To_LL_VSS (A), To_LL_VSS (B))); + end vec_vmrglh; + + function vec_vmrglh + (A : vector_pixel; + B : vector_pixel) return vector_pixel + is + begin + return To_LL_VP (vmrglh (To_LL_VSS (A), To_LL_VSS (B))); + end vec_vmrglh; + + -- vec_vmrglb -- + + function vec_vmrglb + (A : vector_bool_char; + B : vector_bool_char) return vector_bool_char + is + begin + return To_LL_VBC (vmrglb (To_LL_VSC (A), To_LL_VSC (B))); + end vec_vmrglb; + + function vec_vmrglb + (A : vector_signed_char; + B : vector_signed_char) return vector_signed_char + is + begin + return To_LL_VSC (vmrglb (To_LL_VSC (A), To_LL_VSC (B))); + end vec_vmrglb; + + function vec_vmrglb + (A : vector_unsigned_char; + B : vector_unsigned_char) return vector_unsigned_char + is + begin + return To_LL_VUC (vmrglb (To_LL_VSC (A), To_LL_VSC (B))); + end vec_vmrglb; + + -- vec_mfvscr -- + + function vec_mfvscr return vector_unsigned_short + is + begin + return To_LL_VUS (mfvscr); + end vec_mfvscr; + + -- vec_min -- + + function vec_min + (A : vector_bool_char; + B : vector_unsigned_char) return vector_unsigned_char + is + begin + return To_LL_VUC (vminub (To_LL_VSC (A), To_LL_VSC (B))); + end vec_min; + + function vec_min + (A : vector_unsigned_char; + B : vector_bool_char) return vector_unsigned_char + is + begin + return To_LL_VUC (vminub (To_LL_VSC (A), To_LL_VSC (B))); + end vec_min; + + function vec_min + (A : vector_unsigned_char; + B : vector_unsigned_char) return vector_unsigned_char + is + begin + return To_LL_VUC (vminub (To_LL_VSC (A), To_LL_VSC (B))); + end vec_min; + + function vec_min + (A : vector_bool_char; + B : vector_signed_char) return vector_signed_char + is + begin + return To_LL_VSC (vminsb (To_LL_VSC (A), To_LL_VSC (B))); + end vec_min; + + function vec_min + (A : vector_signed_char; + B : vector_bool_char) return vector_signed_char + is + begin + return To_LL_VSC (vminsb (To_LL_VSC (A), To_LL_VSC (B))); + end vec_min; + + function vec_min + (A : vector_signed_char; + B : vector_signed_char) return vector_signed_char + is + begin + return To_LL_VSC (vminsb (To_LL_VSC (A), To_LL_VSC (B))); + end vec_min; + + function vec_min + (A : vector_bool_short; + B : vector_unsigned_short) return vector_unsigned_short + is + begin + return To_LL_VUS (vminuh (To_LL_VSS (A), To_LL_VSS (B))); + end vec_min; + + function vec_min + (A : vector_unsigned_short; + B : vector_bool_short) return vector_unsigned_short + is + begin + return To_LL_VUS (vminuh (To_LL_VSS (A), To_LL_VSS (B))); + end vec_min; + + function vec_min + (A : vector_unsigned_short; + B : vector_unsigned_short) return vector_unsigned_short + is + begin + return To_LL_VUS (vminuh (To_LL_VSS (A), To_LL_VSS (B))); + end vec_min; + + function vec_min + (A : vector_bool_short; + B : vector_signed_short) return vector_signed_short + is + begin + return To_LL_VSS (vminsh (To_LL_VSS (A), To_LL_VSS (B))); + end vec_min; + + function vec_min + (A : vector_signed_short; + B : vector_bool_short) return vector_signed_short + is + begin + return To_LL_VSS (vminsh (To_LL_VSS (A), To_LL_VSS (B))); + end vec_min; + + function vec_min + (A : vector_signed_short; + B : vector_signed_short) return vector_signed_short + is + begin + return To_LL_VSS (vminsh (To_LL_VSS (A), To_LL_VSS (B))); + end vec_min; + + function vec_min + (A : vector_bool_int; + B : vector_unsigned_int) return vector_unsigned_int + is + begin + return To_LL_VUI (vminuw (To_LL_VSI (A), To_LL_VSI (B))); + end vec_min; + + function vec_min + (A : vector_unsigned_int; + B : vector_bool_int) return vector_unsigned_int + is + begin + return To_LL_VUI (vminuw (To_LL_VSI (A), To_LL_VSI (B))); + end vec_min; + + function vec_min + (A : vector_unsigned_int; + B : vector_unsigned_int) return vector_unsigned_int + is + begin + return To_LL_VUI (vminuw (To_LL_VSI (A), To_LL_VSI (B))); + end vec_min; + + function vec_min + (A : vector_bool_int; + B : vector_signed_int) return vector_signed_int + is + begin + return To_LL_VSI (vminsw (To_LL_VSI (A), To_LL_VSI (B))); + end vec_min; + + function vec_min + (A : vector_signed_int; + B : vector_bool_int) return vector_signed_int + is + begin + return To_LL_VSI (vminsw (To_LL_VSI (A), To_LL_VSI (B))); + end vec_min; + + function vec_min + (A : vector_signed_int; + B : vector_signed_int) return vector_signed_int + is + begin + return To_LL_VSI (vminsw (To_LL_VSI (A), To_LL_VSI (B))); + end vec_min; + + function vec_min + (A : vector_float; + B : vector_float) return vector_float + is + begin + return To_LL_VF (vminfp (To_LL_VF (A), To_LL_VF (B))); + end vec_min; + + -- vec_vminfp -- + + function vec_vminfp + (A : vector_float; + B : vector_float) return vector_float + is + begin + return To_LL_VF (vminfp (To_LL_VF (A), To_LL_VF (B))); + end vec_vminfp; + + -- vec_vminsw -- + + function vec_vminsw + (A : vector_bool_int; + B : vector_signed_int) return vector_signed_int + is + begin + return To_LL_VSI (vminsw (To_LL_VSI (A), To_LL_VSI (B))); + end vec_vminsw; + + function vec_vminsw + (A : vector_signed_int; + B : vector_bool_int) return vector_signed_int + is + begin + return To_LL_VSI (vminsw (To_LL_VSI (A), To_LL_VSI (B))); + end vec_vminsw; + + function vec_vminsw + (A : vector_signed_int; + B : vector_signed_int) return vector_signed_int + is + begin + return To_LL_VSI (vminsw (To_LL_VSI (A), To_LL_VSI (B))); + end vec_vminsw; + + -- vec_vminuw -- + + function vec_vminuw + (A : vector_bool_int; + B : vector_unsigned_int) return vector_unsigned_int + is + begin + return To_LL_VUI (vminuw (To_LL_VSI (A), To_LL_VSI (B))); + end vec_vminuw; + + function vec_vminuw + (A : vector_unsigned_int; + B : vector_bool_int) return vector_unsigned_int + is + begin + return To_LL_VUI (vminuw (To_LL_VSI (A), To_LL_VSI (B))); + end vec_vminuw; + + function vec_vminuw + (A : vector_unsigned_int; + B : vector_unsigned_int) return vector_unsigned_int + is + begin + return To_LL_VUI (vminuw (To_LL_VSI (A), To_LL_VSI (B))); + end vec_vminuw; + + -- vec_vminsh -- + + function vec_vminsh + (A : vector_bool_short; + B : vector_signed_short) return vector_signed_short + is + begin + return To_LL_VSS (vminsh (To_LL_VSS (A), To_LL_VSS (B))); + end vec_vminsh; + + function vec_vminsh + (A : vector_signed_short; + B : vector_bool_short) return vector_signed_short + is + begin + return To_LL_VSS (vminsh (To_LL_VSS (A), To_LL_VSS (B))); + end vec_vminsh; + + function vec_vminsh + (A : vector_signed_short; + B : vector_signed_short) return vector_signed_short + is + begin + return To_LL_VSS (vminsh (To_LL_VSS (A), To_LL_VSS (B))); + end vec_vminsh; + + -- vec_vminuh -- + + function vec_vminuh + (A : vector_bool_short; + B : vector_unsigned_short) return vector_unsigned_short + is + begin + return To_LL_VUS (vminuh (To_LL_VSS (A), To_LL_VSS (B))); + end vec_vminuh; + + function vec_vminuh + (A : vector_unsigned_short; + B : vector_bool_short) return vector_unsigned_short + is + begin + return To_LL_VUS (vminuh (To_LL_VSS (A), To_LL_VSS (B))); + end vec_vminuh; + + function vec_vminuh + (A : vector_unsigned_short; + B : vector_unsigned_short) return vector_unsigned_short + is + begin + return To_LL_VUS (vminuh (To_LL_VSS (A), To_LL_VSS (B))); + end vec_vminuh; + + -- vec_vminsb -- + + function vec_vminsb + (A : vector_bool_char; + B : vector_signed_char) return vector_signed_char + is + begin + return To_LL_VSC (vminsb (To_LL_VSC (A), To_LL_VSC (B))); + end vec_vminsb; + + function vec_vminsb + (A : vector_signed_char; + B : vector_bool_char) return vector_signed_char + is + begin + return To_LL_VSC (vminsb (To_LL_VSC (A), To_LL_VSC (B))); + end vec_vminsb; + + function vec_vminsb + (A : vector_signed_char; + B : vector_signed_char) return vector_signed_char + is + begin + return To_LL_VSC (vminsb (To_LL_VSC (A), To_LL_VSC (B))); + end vec_vminsb; + + -- vec_vminub -- + + function vec_vminub + (A : vector_bool_char; + B : vector_unsigned_char) return vector_unsigned_char + is + begin + return To_LL_VUC (vminub (To_LL_VSC (A), To_LL_VSC (B))); + end vec_vminub; + + function vec_vminub + (A : vector_unsigned_char; + B : vector_bool_char) return vector_unsigned_char + is + begin + return To_LL_VUC (vminub (To_LL_VSC (A), To_LL_VSC (B))); + end vec_vminub; + + function vec_vminub + (A : vector_unsigned_char; + B : vector_unsigned_char) return vector_unsigned_char + is + begin + return To_LL_VUC (vminub (To_LL_VSC (A), To_LL_VSC (B))); + end vec_vminub; + + -- vec_mladd -- + + function vec_mladd + (A : vector_signed_short; + B : vector_signed_short; + C : vector_signed_short) return vector_signed_short + is + begin + return vmladduhm (A, B, C); + end vec_mladd; + + function vec_mladd + (A : vector_signed_short; + B : vector_unsigned_short; + C : vector_unsigned_short) return vector_signed_short + is + begin + return vmladduhm (A, To_LL_VSS (B), To_LL_VSS (C)); + end vec_mladd; + + function vec_mladd + (A : vector_unsigned_short; + B : vector_signed_short; + C : vector_signed_short) return vector_signed_short + is + begin + return vmladduhm (To_LL_VSS (A), B, C); + end vec_mladd; + + function vec_mladd + (A : vector_unsigned_short; + B : vector_unsigned_short; + C : vector_unsigned_short) return vector_unsigned_short + is + begin + return + To_LL_VUS (vmladduhm (To_LL_VSS (A), To_LL_VSS (B), To_LL_VSS (C))); + end vec_mladd; + + -- vec_mradds -- + + function vec_mradds + (A : vector_signed_short; + B : vector_signed_short; + C : vector_signed_short) return vector_signed_short + is + begin + return vmhraddshs (A, B, C); + end vec_mradds; + + -- vec_msum -- + + function vec_msum + (A : vector_unsigned_char; + B : vector_unsigned_char; + C : vector_unsigned_int) return vector_unsigned_int + is + begin + return + To_LL_VUI (vmsumubm (To_LL_VSC (A), To_LL_VSC (B), To_LL_VSI (C))); + end vec_msum; + + function vec_msum + (A : vector_signed_char; + B : vector_unsigned_char; + C : vector_signed_int) return vector_signed_int + is + begin + return + To_LL_VSI (vmsummbm (To_LL_VSC (A), To_LL_VSC (B), To_LL_VSI (C))); + end vec_msum; + + function vec_msum + (A : vector_unsigned_short; + B : vector_unsigned_short; + C : vector_unsigned_int) return vector_unsigned_int + is + begin + return + To_LL_VUI (vmsumuhm (To_LL_VSS (A), To_LL_VSS (B), To_LL_VSI (C))); + end vec_msum; + + function vec_msum + (A : vector_signed_short; + B : vector_signed_short; + C : vector_signed_int) return vector_signed_int + is + begin + return + To_LL_VSI (vmsumshm (To_LL_VSS (A), To_LL_VSS (B), To_LL_VSI (C))); + end vec_msum; + + -- vec_vmsumshm -- + + function vec_vmsumshm + (A : vector_signed_short; + B : vector_signed_short; + C : vector_signed_int) return vector_signed_int + is + begin + return + To_LL_VSI (vmsumshm (To_LL_VSS (A), To_LL_VSS (B), To_LL_VSI (C))); + end vec_vmsumshm; + + -- vec_vmsumuhm -- + + function vec_vmsumuhm + (A : vector_unsigned_short; + B : vector_unsigned_short; + C : vector_unsigned_int) return vector_unsigned_int + is + begin + return + To_LL_VUI (vmsumuhm (To_LL_VSS (A), To_LL_VSS (B), To_LL_VSI (C))); + end vec_vmsumuhm; + + -- vec_vmsummbm -- + + function vec_vmsummbm + (A : vector_signed_char; + B : vector_unsigned_char; + C : vector_signed_int) return vector_signed_int + is + begin + return + To_LL_VSI (vmsummbm (To_LL_VSC (A), To_LL_VSC (B), To_LL_VSI (C))); + end vec_vmsummbm; + + -- vec_vmsumubm -- + + function vec_vmsumubm + (A : vector_unsigned_char; + B : vector_unsigned_char; + C : vector_unsigned_int) return vector_unsigned_int + is + begin + return + To_LL_VUI (vmsumubm (To_LL_VSC (A), To_LL_VSC (B), To_LL_VSI (C))); + end vec_vmsumubm; + + -- vec_msums -- + + function vec_msums + (A : vector_unsigned_short; + B : vector_unsigned_short; + C : vector_unsigned_int) return vector_unsigned_int + is + begin + return + To_LL_VUI (vmsumuhs (To_LL_VSS (A), To_LL_VSS (B), To_LL_VSI (C))); + end vec_msums; + + function vec_msums + (A : vector_signed_short; + B : vector_signed_short; + C : vector_signed_int) return vector_signed_int + is + begin + return + To_LL_VSI (vmsumshs (To_LL_VSS (A), To_LL_VSS (B), To_LL_VSI (C))); + end vec_msums; + + -- vec_vmsumshs -- + + function vec_vmsumshs + (A : vector_signed_short; + B : vector_signed_short; + C : vector_signed_int) return vector_signed_int + is + begin + return + To_LL_VSI (vmsumshs (To_LL_VSS (A), To_LL_VSS (B), To_LL_VSI (C))); + end vec_vmsumshs; + + -- vec_vmsumuhs -- + + function vec_vmsumuhs + (A : vector_unsigned_short; + B : vector_unsigned_short; + C : vector_unsigned_int) return vector_unsigned_int + is + begin + return + To_LL_VUI (vmsumuhs (To_LL_VSS (A), To_LL_VSS (B), To_LL_VSI (C))); + end vec_vmsumuhs; + + -- vec_mtvscr -- + + procedure vec_mtvscr + (A : vector_signed_int) + is + begin + mtvscr (To_LL_VSI (A)); + end vec_mtvscr; + + procedure vec_mtvscr + (A : vector_unsigned_int) + is + begin + mtvscr (To_LL_VSI (A)); + end vec_mtvscr; + + procedure vec_mtvscr + (A : vector_bool_int) + is + begin + mtvscr (To_LL_VSI (A)); + end vec_mtvscr; + + procedure vec_mtvscr + (A : vector_signed_short) + is + begin + mtvscr (To_LL_VSI (A)); + end vec_mtvscr; + + procedure vec_mtvscr + (A : vector_unsigned_short) + is + begin + mtvscr (To_LL_VSI (A)); + end vec_mtvscr; + + procedure vec_mtvscr + (A : vector_bool_short) + is + begin + mtvscr (To_LL_VSI (A)); + end vec_mtvscr; + + procedure vec_mtvscr + (A : vector_pixel) + is + begin + mtvscr (To_LL_VSI (A)); + end vec_mtvscr; + + procedure vec_mtvscr + (A : vector_signed_char) + is + begin + mtvscr (To_LL_VSI (A)); + end vec_mtvscr; + + procedure vec_mtvscr + (A : vector_unsigned_char) + is + begin + mtvscr (To_LL_VSI (A)); + end vec_mtvscr; + + procedure vec_mtvscr + (A : vector_bool_char) + is + begin + mtvscr (To_LL_VSI (A)); + end vec_mtvscr; + + -- vec_mule -- + + function vec_mule + (A : vector_unsigned_char; + B : vector_unsigned_char) return vector_unsigned_short + is + begin + return To_LL_VUS (vmuleub (To_LL_VSC (A), To_LL_VSC (B))); + end vec_mule; + + function vec_mule + (A : vector_signed_char; + B : vector_signed_char) return vector_signed_short + is + begin + return To_LL_VSS (vmulesb (To_LL_VSC (A), To_LL_VSC (B))); + end vec_mule; + + function vec_mule + (A : vector_unsigned_short; + B : vector_unsigned_short) return vector_unsigned_int + is + begin + return To_LL_VUI (vmuleuh (To_LL_VSS (A), To_LL_VSS (B))); + end vec_mule; + + function vec_mule + (A : vector_signed_short; + B : vector_signed_short) return vector_signed_int + is + begin + return To_LL_VSI (vmulesh (To_LL_VSS (A), To_LL_VSS (B))); + end vec_mule; + + -- vec_vmulesh -- + + function vec_vmulesh + (A : vector_signed_short; + B : vector_signed_short) return vector_signed_int + is + begin + return To_LL_VSI (vmulesh (To_LL_VSS (A), To_LL_VSS (B))); + end vec_vmulesh; + + -- vec_vmuleuh -- + + function vec_vmuleuh + (A : vector_unsigned_short; + B : vector_unsigned_short) return vector_unsigned_int + is + begin + return To_LL_VUI (vmuleuh (To_LL_VSS (A), To_LL_VSS (B))); + end vec_vmuleuh; + + -- vec_vmulesb -- + + function vec_vmulesb + (A : vector_signed_char; + B : vector_signed_char) return vector_signed_short + is + begin + return To_LL_VSS (vmuleub (To_LL_VSC (A), To_LL_VSC (B))); + end vec_vmulesb; + + -- vec_vmuleub -- + + function vec_vmuleub + (A : vector_unsigned_char; + B : vector_unsigned_char) return vector_unsigned_short + is + begin + return To_LL_VUS (vmuleub (To_LL_VSC (A), To_LL_VSC (B))); + end vec_vmuleub; + + -- vec_mulo -- + + function vec_mulo + (A : vector_unsigned_char; + B : vector_unsigned_char) return vector_unsigned_short + is + begin + return To_LL_VUS (vmuloub (To_LL_VSC (A), To_LL_VSC (B))); + end vec_mulo; + + function vec_mulo + (A : vector_signed_char; + B : vector_signed_char) return vector_signed_short + is + begin + return To_LL_VSS (vmulosb (To_LL_VSC (A), To_LL_VSC (B))); + end vec_mulo; + + function vec_mulo + (A : vector_unsigned_short; + B : vector_unsigned_short) return vector_unsigned_int + is + begin + return To_LL_VUI (vmulouh (To_LL_VSS (A), To_LL_VSS (B))); + end vec_mulo; + + function vec_mulo + (A : vector_signed_short; + B : vector_signed_short) return vector_signed_int + is + begin + return To_LL_VSI (vmulosh (To_LL_VSS (A), To_LL_VSS (B))); + end vec_mulo; + + -- vec_vmulosh -- + + function vec_vmulosh + (A : vector_signed_short; + B : vector_signed_short) return vector_signed_int + is + begin + return To_LL_VSI (vmulosh (To_LL_VSS (A), To_LL_VSS (B))); + end vec_vmulosh; + + -- vec_vmulouh -- + + function vec_vmulouh + (A : vector_unsigned_short; + B : vector_unsigned_short) return vector_unsigned_int + is + begin + return To_LL_VUI (vmulouh (To_LL_VSS (A), To_LL_VSS (B))); + end vec_vmulouh; + + -- vec_vmulosb -- + + function vec_vmulosb + (A : vector_signed_char; + B : vector_signed_char) return vector_signed_short + is + begin + return To_LL_VSS (vmulosb (To_LL_VSC (A), To_LL_VSC (B))); + end vec_vmulosb; + + -- vec_vmuloub -- + + function vec_vmuloub + (A : vector_unsigned_char; + B : vector_unsigned_char) return vector_unsigned_short + is + begin + return To_LL_VUS (vmuloub (To_LL_VSC (A), To_LL_VSC (B))); + end vec_vmuloub; + + -- vec_nmsub -- + + function vec_nmsub + (A : vector_float; + B : vector_float; + C : vector_float) return vector_float + is + begin + return To_LL_VF (vnmsubfp (To_LL_VF (A), To_LL_VF (B), To_LL_VF (C))); + end vec_nmsub; + + -- vec_nor -- + + function vec_nor + (A : vector_float; + B : vector_float) return vector_float + is + begin + return To_LL_VF (vnor (To_LL_VSI (A), To_LL_VSI (B))); + end vec_nor; + + function vec_nor + (A : vector_signed_int; + B : vector_signed_int) return vector_signed_int + is + begin + return To_LL_VSI (vnor (To_LL_VSI (A), To_LL_VSI (B))); + end vec_nor; + + function vec_nor + (A : vector_unsigned_int; + B : vector_unsigned_int) return vector_unsigned_int + is + begin + return To_LL_VUI (vnor (To_LL_VSI (A), To_LL_VSI (B))); + end vec_nor; + + function vec_nor + (A : vector_bool_int; + B : vector_bool_int) return vector_bool_int + is + begin + return To_LL_VBI (vnor (To_LL_VSI (A), To_LL_VSI (B))); + end vec_nor; + + function vec_nor + (A : vector_signed_short; + B : vector_signed_short) return vector_signed_short + is + begin + return To_LL_VSS (vnor (To_LL_VSI (A), To_LL_VSI (B))); + end vec_nor; + + function vec_nor + (A : vector_unsigned_short; + B : vector_unsigned_short) return vector_unsigned_short + is + begin + return To_LL_VUS (vnor (To_LL_VSI (A), To_LL_VSI (B))); + end vec_nor; + + function vec_nor + (A : vector_bool_short; + B : vector_bool_short) return vector_bool_short + is + begin + return To_LL_VBS (vnor (To_LL_VSI (A), To_LL_VSI (B))); + end vec_nor; + + function vec_nor + (A : vector_signed_char; + B : vector_signed_char) return vector_signed_char + is + begin + return To_LL_VSC (vnor (To_LL_VSI (A), To_LL_VSI (B))); + end vec_nor; + + function vec_nor + (A : vector_unsigned_char; + B : vector_unsigned_char) return vector_unsigned_char + is + begin + return To_LL_VUC (vnor (To_LL_VSI (A), To_LL_VSI (B))); + end vec_nor; + + function vec_nor + (A : vector_bool_char; + B : vector_bool_char) return vector_bool_char + is + begin + return To_LL_VBC (vnor (To_LL_VSI (A), To_LL_VSI (B))); + end vec_nor; + + -- vec_or -- + + function vec_or + (A : vector_float; + B : vector_float) return vector_float + is + begin + return To_LL_VF (vor (To_LL_VSI (A), To_LL_VSI (B))); + end vec_or; + + function vec_or + (A : vector_float; + B : vector_bool_int) return vector_float + is + begin + return To_LL_VF (vor (To_LL_VSI (A), To_LL_VSI (B))); + end vec_or; + + function vec_or + (A : vector_bool_int; + B : vector_float) return vector_float + is + begin + return To_LL_VF (vor (To_LL_VSI (A), To_LL_VSI (B))); + end vec_or; + + function vec_or + (A : vector_bool_int; + B : vector_bool_int) return vector_bool_int + is + begin + return To_LL_VBI (vor (To_LL_VSI (A), To_LL_VSI (B))); + end vec_or; + + function vec_or + (A : vector_bool_int; + B : vector_signed_int) return vector_signed_int + is + begin + return To_LL_VSI (vor (To_LL_VSI (A), To_LL_VSI (B))); + end vec_or; + + function vec_or + (A : vector_signed_int; + B : vector_bool_int) return vector_signed_int + is + begin + return To_LL_VSI (vor (To_LL_VSI (A), To_LL_VSI (B))); + end vec_or; + + function vec_or + (A : vector_signed_int; + B : vector_signed_int) return vector_signed_int + is + begin + return To_LL_VSI (vor (To_LL_VSI (A), To_LL_VSI (B))); + end vec_or; + + function vec_or + (A : vector_bool_int; + B : vector_unsigned_int) return vector_unsigned_int + is + begin + return To_LL_VUI (vor (To_LL_VSI (A), To_LL_VSI (B))); + end vec_or; + + function vec_or + (A : vector_unsigned_int; + B : vector_bool_int) return vector_unsigned_int + is + begin + return To_LL_VUI (vor (To_LL_VSI (A), To_LL_VSI (B))); + end vec_or; + + function vec_or + (A : vector_unsigned_int; + B : vector_unsigned_int) return vector_unsigned_int + is + begin + return To_LL_VUI (vor (To_LL_VSI (A), To_LL_VSI (B))); + end vec_or; + + function vec_or + (A : vector_bool_short; + B : vector_bool_short) return vector_bool_short + is + begin + return To_LL_VBS (vor (To_LL_VSI (A), To_LL_VSI (B))); + end vec_or; + + function vec_or + (A : vector_bool_short; + B : vector_signed_short) return vector_signed_short + is + begin + return To_LL_VSS (vor (To_LL_VSI (A), To_LL_VSI (B))); + end vec_or; + + function vec_or + (A : vector_signed_short; + B : vector_bool_short) return vector_signed_short + is + begin + return To_LL_VSS (vor (To_LL_VSI (A), To_LL_VSI (B))); + end vec_or; + + function vec_or + (A : vector_signed_short; + B : vector_signed_short) return vector_signed_short + is + begin + return To_LL_VSS (vor (To_LL_VSI (A), To_LL_VSI (B))); + end vec_or; + + function vec_or + (A : vector_bool_short; + B : vector_unsigned_short) return vector_unsigned_short + is + begin + return To_LL_VUS (vor (To_LL_VSI (A), To_LL_VSI (B))); + end vec_or; + + function vec_or + (A : vector_unsigned_short; + B : vector_bool_short) return vector_unsigned_short + is + begin + return To_LL_VUS (vor (To_LL_VSI (A), To_LL_VSI (B))); + end vec_or; + + function vec_or + (A : vector_unsigned_short; + B : vector_unsigned_short) return vector_unsigned_short + is + begin + return To_LL_VUS (vor (To_LL_VSI (A), To_LL_VSI (B))); + end vec_or; + + function vec_or + (A : vector_bool_char; + B : vector_signed_char) return vector_signed_char + is + begin + return To_LL_VSC (vor (To_LL_VSI (A), To_LL_VSI (B))); + end vec_or; + + function vec_or + (A : vector_bool_char; + B : vector_bool_char) return vector_bool_char + is + begin + return To_LL_VBC (vor (To_LL_VSI (A), To_LL_VSI (B))); + end vec_or; + + function vec_or + (A : vector_signed_char; + B : vector_bool_char) return vector_signed_char + is + begin + return To_LL_VSC (vor (To_LL_VSI (A), To_LL_VSI (B))); + end vec_or; + + function vec_or + (A : vector_signed_char; + B : vector_signed_char) return vector_signed_char + is + begin + return To_LL_VSC (vor (To_LL_VSI (A), To_LL_VSI (B))); + end vec_or; + + function vec_or + (A : vector_bool_char; + B : vector_unsigned_char) return vector_unsigned_char + is + begin + return To_LL_VUC (vor (To_LL_VSI (A), To_LL_VSI (B))); + end vec_or; + + function vec_or + (A : vector_unsigned_char; + B : vector_bool_char) return vector_unsigned_char + is + begin + return To_LL_VUC (vor (To_LL_VSI (A), To_LL_VSI (B))); + end vec_or; + + function vec_or + (A : vector_unsigned_char; + B : vector_unsigned_char) return vector_unsigned_char + is + begin + return To_LL_VUC (vor (To_LL_VSI (A), To_LL_VSI (B))); + end vec_or; + + -- vec_pack -- + + function vec_pack + (A : vector_signed_short; + B : vector_signed_short) return vector_signed_char + is + begin + return To_LL_VSC (vpkuhum (To_LL_VSS (A), To_LL_VSS (B))); + end vec_pack; + + function vec_pack + (A : vector_unsigned_short; + B : vector_unsigned_short) return vector_unsigned_char + is + begin + return To_LL_VUC (vpkuhum (To_LL_VSS (A), To_LL_VSS (B))); + end vec_pack; + + function vec_pack + (A : vector_bool_short; + B : vector_bool_short) return vector_bool_char + is + begin + return To_LL_VBC (vpkuhum (To_LL_VSS (A), To_LL_VSS (B))); + end vec_pack; + + function vec_pack + (A : vector_signed_int; + B : vector_signed_int) return vector_signed_short + is + begin + return To_LL_VSS (vpkuwum (To_LL_VSI (A), To_LL_VSI (B))); + end vec_pack; + + function vec_pack + (A : vector_unsigned_int; + B : vector_unsigned_int) return vector_unsigned_short + is + begin + return To_LL_VUS (vpkuwum (To_LL_VSI (A), To_LL_VSI (B))); + end vec_pack; + + function vec_pack + (A : vector_bool_int; + B : vector_bool_int) return vector_bool_short + is + begin + return To_LL_VBS (vpkuwum (To_LL_VSI (A), To_LL_VSI (B))); + end vec_pack; + + -- vec_vpkuwum -- + + function vec_vpkuwum + (A : vector_bool_int; + B : vector_bool_int) return vector_bool_short + is + begin + return To_LL_VBS (vpkuwum (To_LL_VSI (A), To_LL_VSI (B))); + end vec_vpkuwum; + + function vec_vpkuwum + (A : vector_signed_int; + B : vector_signed_int) return vector_signed_short + is + begin + return To_LL_VSS (vpkuwum (To_LL_VSI (A), To_LL_VSI (B))); + end vec_vpkuwum; + + function vec_vpkuwum + (A : vector_unsigned_int; + B : vector_unsigned_int) return vector_unsigned_short + is + begin + return To_LL_VUS (vpkuwum (To_LL_VSI (A), To_LL_VSI (B))); + end vec_vpkuwum; + + -- vec_vpkuhum -- + + function vec_vpkuhum + (A : vector_bool_short; + B : vector_bool_short) return vector_bool_char + is + begin + return To_LL_VBC (vpkuhum (To_LL_VSS (A), To_LL_VSS (B))); + end vec_vpkuhum; + + function vec_vpkuhum + (A : vector_signed_short; + B : vector_signed_short) return vector_signed_char + is + begin + return To_LL_VSC (vpkuhum (To_LL_VSS (A), To_LL_VSS (B))); + end vec_vpkuhum; + + function vec_vpkuhum + (A : vector_unsigned_short; + B : vector_unsigned_short) return vector_unsigned_char + is + begin + return To_LL_VUC (vpkuhum (To_LL_VSS (A), To_LL_VSS (B))); + end vec_vpkuhum; + + -- vec_packpx -- + + function vec_packpx + (A : vector_unsigned_int; + B : vector_unsigned_int) return vector_pixel + is + begin + return To_LL_VP (vpkpx (To_LL_VSI (A), To_LL_VSI (B))); + end vec_packpx; + + -- vec_packs -- + + function vec_packs + (A : vector_unsigned_short; + B : vector_unsigned_short) return vector_unsigned_char + is + begin + return To_LL_VUC (vpkuhus (To_LL_VSS (A), To_LL_VSS (B))); + end vec_packs; + + function vec_packs + (A : vector_signed_short; + B : vector_signed_short) return vector_signed_char + is + begin + return To_LL_VSC (vpkshss (To_LL_VSS (A), To_LL_VSS (B))); + end vec_packs; + + function vec_packs + (A : vector_unsigned_int; + B : vector_unsigned_int) return vector_unsigned_short + is + begin + return To_LL_VUS (vpkuwus (To_LL_VSI (A), To_LL_VSI (B))); + end vec_packs; + + function vec_packs + (A : vector_signed_int; + B : vector_signed_int) return vector_signed_short + is + begin + return To_LL_VSS (vpkswss (To_LL_VSI (A), To_LL_VSI (B))); + end vec_packs; + + -- vec_vpkswss -- + + function vec_vpkswss + (A : vector_signed_int; + B : vector_signed_int) return vector_signed_short + is + begin + return To_LL_VSS (vpkswss (To_LL_VSI (A), To_LL_VSI (B))); + end vec_vpkswss; + + -- vec_vpkuwus -- + + function vec_vpkuwus + (A : vector_unsigned_int; + B : vector_unsigned_int) return vector_unsigned_short + is + begin + return To_LL_VUS (vpkuwus (To_LL_VSI (A), To_LL_VSI (B))); + end vec_vpkuwus; + + -- vec_vpkshss -- + + function vec_vpkshss + (A : vector_signed_short; + B : vector_signed_short) return vector_signed_char + is + begin + return To_LL_VSC (vpkshss (To_LL_VSS (A), To_LL_VSS (B))); + end vec_vpkshss; + + -- vec_vpkuhus -- + + function vec_vpkuhus + (A : vector_unsigned_short; + B : vector_unsigned_short) return vector_unsigned_char + is + begin + return To_LL_VUC (vpkuhus (To_LL_VSS (A), To_LL_VSS (B))); + end vec_vpkuhus; + + -- vec_packsu -- + + function vec_packsu + (A : vector_unsigned_short; + B : vector_unsigned_short) return vector_unsigned_char + is + begin + return To_LL_VUC (vpkuhus (To_LL_VSS (A), To_LL_VSS (B))); + end vec_packsu; + + function vec_packsu + (A : vector_signed_short; + B : vector_signed_short) return vector_unsigned_char + is + begin + return To_LL_VUC (vpkshus (To_LL_VSS (A), To_LL_VSS (B))); + end vec_packsu; + + function vec_packsu + (A : vector_unsigned_int; + B : vector_unsigned_int) return vector_unsigned_short + is + begin + return To_LL_VUS (vpkuwus (To_LL_VSI (A), To_LL_VSI (B))); + end vec_packsu; + + function vec_packsu + (A : vector_signed_int; + B : vector_signed_int) return vector_unsigned_short + is + begin + return To_LL_VUS (vpkswus (To_LL_VSI (A), To_LL_VSI (B))); + end vec_packsu; + + -- vec_vpkswus -- + + function vec_vpkswus + (A : vector_signed_int; + B : vector_signed_int) return vector_unsigned_short + is + begin + return To_LL_VUS (vpkswus (To_LL_VSI (A), To_LL_VSI (B))); + end vec_vpkswus; + + -- vec_vpkshus -- + + function vec_vpkshus + (A : vector_signed_short; + B : vector_signed_short) return vector_unsigned_char + is + begin + return To_LL_VUC (vpkshus (To_LL_VSS (A), To_LL_VSS (B))); + end vec_vpkshus; + + -- vec_perm -- + + function vec_perm + (A : vector_float; + B : vector_float; + C : vector_unsigned_char) return vector_float + is + begin + return + To_LL_VF (vperm_4si (To_LL_VSI (A), To_LL_VSI (B), To_LL_VSC (C))); + end vec_perm; + + function vec_perm + (A : vector_signed_int; + B : vector_signed_int; + C : vector_unsigned_char) return vector_signed_int + is + begin + return + To_LL_VSI (vperm_4si (To_LL_VSI (A), To_LL_VSI (B), To_LL_VSC (C))); + end vec_perm; + + function vec_perm + (A : vector_unsigned_int; + B : vector_unsigned_int; + C : vector_unsigned_char) return vector_unsigned_int + is + begin + return + To_LL_VUI (vperm_4si (To_LL_VSI (A), To_LL_VSI (B), To_LL_VSC (C))); + end vec_perm; + + function vec_perm + (A : vector_bool_int; + B : vector_bool_int; + C : vector_unsigned_char) return vector_bool_int + is + begin + return + To_LL_VBI (vperm_4si (To_LL_VSI (A), To_LL_VSI (B), To_LL_VSC (C))); + end vec_perm; + + function vec_perm + (A : vector_signed_short; + B : vector_signed_short; + C : vector_unsigned_char) return vector_signed_short + is + begin + return + To_LL_VSS (vperm_4si (To_LL_VSI (A), To_LL_VSI (B), To_LL_VSC (C))); + end vec_perm; + + function vec_perm + (A : vector_unsigned_short; + B : vector_unsigned_short; + C : vector_unsigned_char) return vector_unsigned_short + is + begin + return + To_LL_VUS (vperm_4si (To_LL_VSI (A), To_LL_VSI (B), To_LL_VSC (C))); + end vec_perm; + + function vec_perm + (A : vector_bool_short; + B : vector_bool_short; + C : vector_unsigned_char) return vector_bool_short + is + begin + return + To_LL_VBS (vperm_4si (To_LL_VSI (A), To_LL_VSI (B), To_LL_VSC (C))); + end vec_perm; + + function vec_perm + (A : vector_pixel; + B : vector_pixel; + C : vector_unsigned_char) return vector_pixel + is + begin + return To_LL_VP + (vperm_4si (To_LL_VSI (A), To_LL_VSI (B), To_LL_VSC (C))); + end vec_perm; + + function vec_perm + (A : vector_signed_char; + B : vector_signed_char; + C : vector_unsigned_char) return vector_signed_char + is + begin + return To_LL_VSC + (vperm_4si (To_LL_VSI (A), To_LL_VSI (B), To_LL_VSC (C))); + end vec_perm; + + function vec_perm + (A : vector_unsigned_char; + B : vector_unsigned_char; + C : vector_unsigned_char) return vector_unsigned_char + is + begin + return + To_LL_VUC (vperm_4si (To_LL_VSI (A), To_LL_VSI (B), To_LL_VSC (C))); + end vec_perm; + + function vec_perm + (A : vector_bool_char; + B : vector_bool_char; + C : vector_unsigned_char) return vector_bool_char + is + begin + return + To_LL_VBC (vperm_4si (To_LL_VSI (A), To_LL_VSI (B), To_LL_VSC (C))); + end vec_perm; + + -- vec_re -- + + function vec_re + (A : vector_float) return vector_float + is + begin + return To_LL_VF (vrefp (To_LL_VF (A))); + end vec_re; + + -- vec_rl -- + + function vec_rl + (A : vector_signed_char; + B : vector_unsigned_char) return vector_signed_char + is + begin + return To_LL_VSC (vrlb (To_LL_VSC (A), To_LL_VSC (B))); + end vec_rl; + + function vec_rl + (A : vector_unsigned_char; + B : vector_unsigned_char) return vector_unsigned_char + is + begin + return To_LL_VUC (vrlb (To_LL_VSC (A), To_LL_VSC (B))); + end vec_rl; + + function vec_rl + (A : vector_signed_short; + B : vector_unsigned_short) return vector_signed_short + is + begin + return To_LL_VSS (vrlh (To_LL_VSS (A), To_LL_VSS (B))); + end vec_rl; + + function vec_rl + (A : vector_unsigned_short; + B : vector_unsigned_short) return vector_unsigned_short + is + begin + return To_LL_VUS (vrlh (To_LL_VSS (A), To_LL_VSS (B))); + end vec_rl; + + function vec_rl + (A : vector_signed_int; + B : vector_unsigned_int) return vector_signed_int + is + begin + return To_LL_VSI (vrlw (To_LL_VSI (A), To_LL_VSI (B))); + end vec_rl; + + function vec_rl + (A : vector_unsigned_int; + B : vector_unsigned_int) return vector_unsigned_int + is + begin + return To_LL_VUI (vrlw (To_LL_VSI (A), To_LL_VSI (B))); + end vec_rl; + + -- vec_vrlw -- + + function vec_vrlw + (A : vector_signed_int; + B : vector_unsigned_int) return vector_signed_int + is + begin + return To_LL_VSI (vrlw (To_LL_VSI (A), To_LL_VSI (B))); + end vec_vrlw; + + function vec_vrlw + (A : vector_unsigned_int; + B : vector_unsigned_int) return vector_unsigned_int + is + begin + return To_LL_VUI (vrlw (To_LL_VSI (A), To_LL_VSI (B))); + end vec_vrlw; + + -- vec_vrlh -- + + function vec_vrlh + (A : vector_signed_short; + B : vector_unsigned_short) return vector_signed_short + is + begin + return To_LL_VSS (vrlh (To_LL_VSS (A), To_LL_VSS (B))); + end vec_vrlh; + + function vec_vrlh + (A : vector_unsigned_short; + B : vector_unsigned_short) return vector_unsigned_short + is + begin + return To_LL_VUS (vrlh (To_LL_VSS (A), To_LL_VSS (B))); + end vec_vrlh; + + -- vec_vrlb -- + + function vec_vrlb + (A : vector_signed_char; + B : vector_unsigned_char) return vector_signed_char + is + begin + return To_LL_VSC (vrlb (To_LL_VSC (A), To_LL_VSC (B))); + end vec_vrlb; + + function vec_vrlb + (A : vector_unsigned_char; + B : vector_unsigned_char) return vector_unsigned_char + is + begin + return To_LL_VUC (vrlb (To_LL_VSC (A), To_LL_VSC (B))); + end vec_vrlb; + + -- vec_round -- + + function vec_round + (A : vector_float) return vector_float + is + begin + return To_LL_VF (vrfin (To_LL_VF (A))); + end vec_round; + + -- vec_rsqrte -- + + function vec_rsqrte + (A : vector_float) return vector_float + is + begin + return To_LL_VF (vrsqrtefp (To_LL_VF (A))); + end vec_rsqrte; + + -- vec_sel -- + + function vec_sel + (A : vector_float; + B : vector_float; + C : vector_bool_int) return vector_float + is + begin + return To_LL_VF (vsel_4si (To_LL_VSI (A), To_LL_VSI (B), To_LL_VSI (C))); + end vec_sel; + + function vec_sel + (A : vector_float; + B : vector_float; + C : vector_unsigned_int) return vector_float + is + begin + return To_LL_VF (vsel_4si (To_LL_VSI (A), To_LL_VSI (B), To_LL_VSI (C))); + end vec_sel; + + function vec_sel + (A : vector_signed_int; + B : vector_signed_int; + C : vector_bool_int) return vector_signed_int + is + begin + return + To_LL_VSI (vsel_4si (To_LL_VSI (A), To_LL_VSI (B), To_LL_VSI (C))); + end vec_sel; + + function vec_sel + (A : vector_signed_int; + B : vector_signed_int; + C : vector_unsigned_int) return vector_signed_int + is + begin + return + To_LL_VSI (vsel_4si (To_LL_VSI (A), To_LL_VSI (B), To_LL_VSI (C))); + end vec_sel; + + function vec_sel + (A : vector_unsigned_int; + B : vector_unsigned_int; + C : vector_bool_int) return vector_unsigned_int + is + begin + return + To_LL_VUI (vsel_4si (To_LL_VSI (A), To_LL_VSI (B), To_LL_VSI (C))); + end vec_sel; + + function vec_sel + (A : vector_unsigned_int; + B : vector_unsigned_int; + C : vector_unsigned_int) return vector_unsigned_int + is + begin + return + To_LL_VUI (vsel_4si (To_LL_VSI (A), To_LL_VSI (B), To_LL_VSI (C))); + end vec_sel; + + function vec_sel + (A : vector_bool_int; + B : vector_bool_int; + C : vector_bool_int) return vector_bool_int + is + begin + return + To_LL_VBI (vsel_4si (To_LL_VSI (A), To_LL_VSI (B), To_LL_VSI (C))); + end vec_sel; + + function vec_sel + (A : vector_bool_int; + B : vector_bool_int; + C : vector_unsigned_int) return vector_bool_int + is + begin + return + To_LL_VBI (vsel_4si (To_LL_VSI (A), To_LL_VSI (B), To_LL_VSI (C))); + end vec_sel; + + function vec_sel + (A : vector_signed_short; + B : vector_signed_short; + C : vector_bool_short) return vector_signed_short + is + begin + return + To_LL_VSS (vsel_4si (To_LL_VSI (A), To_LL_VSI (B), To_LL_VSI (C))); + end vec_sel; + + function vec_sel + (A : vector_signed_short; + B : vector_signed_short; + C : vector_unsigned_short) return vector_signed_short + is + begin + return + To_LL_VSS (vsel_4si (To_LL_VSI (A), To_LL_VSI (B), To_LL_VSI (C))); + end vec_sel; + + function vec_sel + (A : vector_unsigned_short; + B : vector_unsigned_short; + C : vector_bool_short) return vector_unsigned_short + is + begin + return + To_LL_VUS (vsel_4si (To_LL_VSI (A), To_LL_VSI (B), To_LL_VSI (C))); + end vec_sel; + + function vec_sel + (A : vector_unsigned_short; + B : vector_unsigned_short; + C : vector_unsigned_short) return vector_unsigned_short + is + begin + return + To_LL_VUS (vsel_4si (To_LL_VSI (A), To_LL_VSI (B), To_LL_VSI (C))); + end vec_sel; + + function vec_sel + (A : vector_bool_short; + B : vector_bool_short; + C : vector_bool_short) return vector_bool_short + is + begin + return + To_LL_VBS (vsel_4si (To_LL_VSI (A), To_LL_VSI (B), To_LL_VSI (C))); + end vec_sel; + + function vec_sel + (A : vector_bool_short; + B : vector_bool_short; + C : vector_unsigned_short) return vector_bool_short + is + begin + return + To_LL_VBS (vsel_4si (To_LL_VSI (A), To_LL_VSI (B), To_LL_VSI (C))); + end vec_sel; + + function vec_sel + (A : vector_signed_char; + B : vector_signed_char; + C : vector_bool_char) return vector_signed_char + is + begin + return + To_LL_VSC (vsel_4si (To_LL_VSI (A), To_LL_VSI (B), To_LL_VSI (C))); + end vec_sel; + + function vec_sel + (A : vector_signed_char; + B : vector_signed_char; + C : vector_unsigned_char) return vector_signed_char + is + begin + return + To_LL_VSC (vsel_4si (To_LL_VSI (A), To_LL_VSI (B), To_LL_VSI (C))); + end vec_sel; + + function vec_sel + (A : vector_unsigned_char; + B : vector_unsigned_char; + C : vector_bool_char) return vector_unsigned_char + is + begin + return + To_LL_VUC (vsel_4si (To_LL_VSI (A), To_LL_VSI (B), To_LL_VSI (C))); + end vec_sel; + + function vec_sel + (A : vector_unsigned_char; + B : vector_unsigned_char; + C : vector_unsigned_char) return vector_unsigned_char + is + begin + return + To_LL_VUC (vsel_4si (To_LL_VSI (A), To_LL_VSI (B), To_LL_VSI (C))); + end vec_sel; + + function vec_sel + (A : vector_bool_char; + B : vector_bool_char; + C : vector_bool_char) return vector_bool_char + is + begin + return + To_LL_VBC (vsel_4si (To_LL_VSI (A), To_LL_VSI (B), To_LL_VSI (C))); + end vec_sel; + + function vec_sel + (A : vector_bool_char; + B : vector_bool_char; + C : vector_unsigned_char) return vector_bool_char + is + begin + return + To_LL_VBC (vsel_4si (To_LL_VSI (A), To_LL_VSI (B), To_LL_VSI (C))); + end vec_sel; + + -- vec_sl -- + + function vec_sl + (A : vector_signed_char; + B : vector_unsigned_char) return vector_signed_char + is + begin + return To_LL_VSC (vslb (To_LL_VSC (A), To_LL_VSC (B))); + end vec_sl; + + function vec_sl + (A : vector_unsigned_char; + B : vector_unsigned_char) return vector_unsigned_char + is + begin + return To_LL_VUC (vslb (To_LL_VSC (A), To_LL_VSC (B))); + end vec_sl; + + function vec_sl + (A : vector_signed_short; + B : vector_unsigned_short) return vector_signed_short + is + begin + return To_LL_VSS (vslh (To_LL_VSS (A), To_LL_VSS (B))); + end vec_sl; + + function vec_sl + (A : vector_unsigned_short; + B : vector_unsigned_short) return vector_unsigned_short + is + begin + return To_LL_VUS (vslh (To_LL_VSS (A), To_LL_VSS (B))); + end vec_sl; + + function vec_sl + (A : vector_signed_int; + B : vector_unsigned_int) return vector_signed_int + is + begin + return To_LL_VSI (vslw (To_LL_VSI (A), To_LL_VSI (B))); + end vec_sl; + + function vec_sl + (A : vector_unsigned_int; + B : vector_unsigned_int) return vector_unsigned_int + is + begin + return To_LL_VUI (vslw (To_LL_VSI (A), To_LL_VSI (B))); + end vec_sl; + + -- vec_vslw -- + + function vec_vslw + (A : vector_signed_int; + B : vector_unsigned_int) return vector_signed_int + is + begin + return To_LL_VSI (vslw (To_LL_VSI (A), To_LL_VSI (B))); + end vec_vslw; + + function vec_vslw + (A : vector_unsigned_int; + B : vector_unsigned_int) return vector_unsigned_int + is + begin + return To_LL_VUI (vslw (To_LL_VSI (A), To_LL_VSI (B))); + end vec_vslw; + + -- vec_vslh -- + + function vec_vslh + (A : vector_signed_short; + B : vector_unsigned_short) return vector_signed_short + is + begin + return To_LL_VSS (vslh (To_LL_VSS (A), To_LL_VSS (B))); + end vec_vslh; + + function vec_vslh + (A : vector_unsigned_short; + B : vector_unsigned_short) return vector_unsigned_short + is + begin + return To_LL_VUS (vslh (To_LL_VSS (A), To_LL_VSS (B))); + end vec_vslh; + + -- vec_vslb -- + + function vec_vslb + (A : vector_signed_char; + B : vector_unsigned_char) return vector_signed_char + is + begin + return To_LL_VSC (vslb (To_LL_VSC (A), To_LL_VSC (B))); + end vec_vslb; + + function vec_vslb + (A : vector_unsigned_char; + B : vector_unsigned_char) return vector_unsigned_char + is + begin + return To_LL_VUC (vslb (To_LL_VSC (A), To_LL_VSC (B))); + end vec_vslb; + + -- vec_sll -- + + function vec_sll + (A : vector_signed_int; + B : vector_unsigned_int) return vector_signed_int + is + begin + return To_LL_VSI (vsl (To_LL_VSI (A), To_LL_VSI (B))); + end vec_sll; + + function vec_sll + (A : vector_signed_int; + B : vector_unsigned_short) return vector_signed_int + is + begin + return To_LL_VSI (vsl (To_LL_VSI (A), To_LL_VSI (B))); + end vec_sll; + + function vec_sll + (A : vector_signed_int; + B : vector_unsigned_char) return vector_signed_int + is + begin + return To_LL_VSI (vsl (To_LL_VSI (A), To_LL_VSI (B))); + end vec_sll; + + function vec_sll + (A : vector_unsigned_int; + B : vector_unsigned_int) return vector_unsigned_int + is + begin + return To_LL_VUI (vsl (To_LL_VSI (A), To_LL_VSI (B))); + end vec_sll; + + function vec_sll + (A : vector_unsigned_int; + B : vector_unsigned_short) return vector_unsigned_int + is + begin + return To_LL_VUI (vsl (To_LL_VSI (A), To_LL_VSI (B))); + end vec_sll; + + function vec_sll + (A : vector_unsigned_int; + B : vector_unsigned_char) return vector_unsigned_int + is + begin + return To_LL_VUI (vsl (To_LL_VSI (A), To_LL_VSI (B))); + end vec_sll; + + function vec_sll + (A : vector_bool_int; + B : vector_unsigned_int) return vector_bool_int + is + begin + return To_LL_VBI (vsl (To_LL_VSI (A), To_LL_VSI (B))); + end vec_sll; + + function vec_sll + (A : vector_bool_int; + B : vector_unsigned_short) return vector_bool_int + is + begin + return To_LL_VBI (vsl (To_LL_VSI (A), To_LL_VSI (B))); + end vec_sll; + + function vec_sll + (A : vector_bool_int; + B : vector_unsigned_char) return vector_bool_int + is + begin + return To_LL_VBI (vsl (To_LL_VSI (A), To_LL_VSI (B))); + end vec_sll; + + function vec_sll + (A : vector_signed_short; + B : vector_unsigned_int) return vector_signed_short + is + begin + return To_LL_VSS (vsl (To_LL_VSI (A), To_LL_VSI (B))); + end vec_sll; + + function vec_sll + (A : vector_signed_short; + B : vector_unsigned_short) return vector_signed_short + is + begin + return To_LL_VSS (vsl (To_LL_VSI (A), To_LL_VSI (B))); + end vec_sll; + + function vec_sll + (A : vector_signed_short; + B : vector_unsigned_char) return vector_signed_short + is + begin + return To_LL_VSS (vsl (To_LL_VSI (A), To_LL_VSI (B))); + end vec_sll; + + function vec_sll + (A : vector_unsigned_short; + B : vector_unsigned_int) return vector_unsigned_short + is + begin + return To_LL_VUS (vsl (To_LL_VSI (A), To_LL_VSI (B))); + end vec_sll; + + function vec_sll + (A : vector_unsigned_short; + B : vector_unsigned_short) return vector_unsigned_short + is + begin + return To_LL_VUS (vsl (To_LL_VSI (A), To_LL_VSI (B))); + end vec_sll; + + function vec_sll + (A : vector_unsigned_short; + B : vector_unsigned_char) return vector_unsigned_short + is + begin + return To_LL_VUS (vsl (To_LL_VSI (A), To_LL_VSI (B))); + end vec_sll; + + function vec_sll + (A : vector_bool_short; + B : vector_unsigned_int) return vector_bool_short + is + begin + return To_LL_VBS (vsl (To_LL_VSI (A), To_LL_VSI (B))); + end vec_sll; + + function vec_sll + (A : vector_bool_short; + B : vector_unsigned_short) return vector_bool_short + is + begin + return To_LL_VBS (vsl (To_LL_VSI (A), To_LL_VSI (B))); + end vec_sll; + + function vec_sll + (A : vector_bool_short; + B : vector_unsigned_char) return vector_bool_short + is + begin + return To_LL_VBS (vsl (To_LL_VSI (A), To_LL_VSI (B))); + end vec_sll; + + function vec_sll + (A : vector_pixel; + B : vector_unsigned_int) return vector_pixel + is + begin + return To_LL_VP (vsl (To_LL_VSI (A), To_LL_VSI (B))); + end vec_sll; + + function vec_sll + (A : vector_pixel; + B : vector_unsigned_short) return vector_pixel + is + begin + return To_LL_VP (vsl (To_LL_VSI (A), To_LL_VSI (B))); + end vec_sll; + + function vec_sll + (A : vector_pixel; + B : vector_unsigned_char) return vector_pixel + is + begin + return To_LL_VP (vsl (To_LL_VSI (A), To_LL_VSI (B))); + end vec_sll; + + function vec_sll + (A : vector_signed_char; + B : vector_unsigned_int) return vector_signed_char + is + begin + return To_LL_VSC (vsl (To_LL_VSI (A), To_LL_VSI (B))); + end vec_sll; + + function vec_sll + (A : vector_signed_char; + B : vector_unsigned_short) return vector_signed_char + is + begin + return To_LL_VSC (vsl (To_LL_VSI (A), To_LL_VSI (B))); + end vec_sll; + + function vec_sll + (A : vector_signed_char; + B : vector_unsigned_char) return vector_signed_char + is + begin + return To_LL_VSC (vsl (To_LL_VSI (A), To_LL_VSI (B))); + end vec_sll; + + function vec_sll + (A : vector_unsigned_char; + B : vector_unsigned_int) return vector_unsigned_char + is + begin + return To_LL_VUC (vsl (To_LL_VSI (A), To_LL_VSI (B))); + end vec_sll; + + function vec_sll + (A : vector_unsigned_char; + B : vector_unsigned_short) return vector_unsigned_char + is + begin + return To_LL_VUC (vsl (To_LL_VSI (A), To_LL_VSI (B))); + end vec_sll; + + function vec_sll + (A : vector_unsigned_char; + B : vector_unsigned_char) return vector_unsigned_char + is + begin + return To_LL_VUC (vsl (To_LL_VSI (A), To_LL_VSI (B))); + end vec_sll; + + function vec_sll + (A : vector_bool_char; + B : vector_unsigned_int) return vector_bool_char + is + begin + return To_LL_VBC (vsl (To_LL_VSI (A), To_LL_VSI (B))); + end vec_sll; + + function vec_sll + (A : vector_bool_char; + B : vector_unsigned_short) return vector_bool_char + is + begin + return To_LL_VBC (vsl (To_LL_VSI (A), To_LL_VSI (B))); + end vec_sll; + + function vec_sll + (A : vector_bool_char; + B : vector_unsigned_char) return vector_bool_char + is + begin + return To_LL_VBC (vsl (To_LL_VSI (A), To_LL_VSI (B))); + end vec_sll; + + -- vec_slo -- + + function vec_slo + (A : vector_float; + B : vector_signed_char) return vector_float + is + begin + return To_LL_VF (vslo (To_LL_VSI (A), To_LL_VSI (B))); + end vec_slo; + + function vec_slo + (A : vector_float; + B : vector_unsigned_char) return vector_float + is + begin + return To_LL_VF (vslo (To_LL_VSI (A), To_LL_VSI (B))); + end vec_slo; + + function vec_slo + (A : vector_signed_int; + B : vector_signed_char) return vector_signed_int + is + begin + return To_LL_VSI (vslo (To_LL_VSI (A), To_LL_VSI (B))); + end vec_slo; + + function vec_slo + (A : vector_signed_int; + B : vector_unsigned_char) return vector_signed_int + is + begin + return To_LL_VSI (vslo (To_LL_VSI (A), To_LL_VSI (B))); + end vec_slo; + + function vec_slo + (A : vector_unsigned_int; + B : vector_signed_char) return vector_unsigned_int + is + begin + return To_LL_VUI (vslo (To_LL_VSI (A), To_LL_VSI (B))); + end vec_slo; + + function vec_slo + (A : vector_unsigned_int; + B : vector_unsigned_char) return vector_unsigned_int + is + begin + return To_LL_VUI (vslo (To_LL_VSI (A), To_LL_VSI (B))); + end vec_slo; + + function vec_slo + (A : vector_signed_short; + B : vector_signed_char) return vector_signed_short + is + begin + return To_LL_VSS (vslo (To_LL_VSI (A), To_LL_VSI (B))); + end vec_slo; + + function vec_slo + (A : vector_signed_short; + B : vector_unsigned_char) return vector_signed_short + is + begin + return To_LL_VSS (vslo (To_LL_VSI (A), To_LL_VSI (B))); + end vec_slo; + + function vec_slo + (A : vector_unsigned_short; + B : vector_signed_char) return vector_unsigned_short + is + begin + return To_LL_VUS (vslo (To_LL_VSI (A), To_LL_VSI (B))); + end vec_slo; + + function vec_slo + (A : vector_unsigned_short; + B : vector_unsigned_char) return vector_unsigned_short + is + begin + return To_LL_VUS (vslo (To_LL_VSI (A), To_LL_VSI (B))); + end vec_slo; + + function vec_slo + (A : vector_pixel; + B : vector_signed_char) return vector_pixel + is + begin + return To_LL_VP (vslo (To_LL_VSI (A), To_LL_VSI (B))); + end vec_slo; + + function vec_slo + (A : vector_pixel; + B : vector_unsigned_char) return vector_pixel + is + begin + return To_LL_VP (vslo (To_LL_VSI (A), To_LL_VSI (B))); + end vec_slo; + + function vec_slo + (A : vector_signed_char; + B : vector_signed_char) return vector_signed_char + is + begin + return To_LL_VSC (vslo (To_LL_VSI (A), To_LL_VSI (B))); + end vec_slo; + + function vec_slo + (A : vector_signed_char; + B : vector_unsigned_char) return vector_signed_char + is + begin + return To_LL_VSC (vslo (To_LL_VSI (A), To_LL_VSI (B))); + end vec_slo; + + function vec_slo + (A : vector_unsigned_char; + B : vector_signed_char) return vector_unsigned_char + is + begin + return To_LL_VUC (vslo (To_LL_VSI (A), To_LL_VSI (B))); + end vec_slo; + + function vec_slo + (A : vector_unsigned_char; + B : vector_unsigned_char) return vector_unsigned_char + is + begin + return To_LL_VUC (vslo (To_LL_VSI (A), To_LL_VSI (B))); + end vec_slo; + + -- vec_sr -- + + function vec_sr + (A : vector_signed_char; + B : vector_unsigned_char) return vector_signed_char + is + begin + return To_LL_VSC (vsrb (To_LL_VSC (A), To_LL_VSC (B))); + end vec_sr; + + function vec_sr + (A : vector_unsigned_char; + B : vector_unsigned_char) return vector_unsigned_char + is + begin + return To_LL_VUC (vsrb (To_LL_VSC (A), To_LL_VSC (B))); + end vec_sr; + + function vec_sr + (A : vector_signed_short; + B : vector_unsigned_short) return vector_signed_short + is + begin + return To_LL_VSS (vsrh (To_LL_VSS (A), To_LL_VSS (B))); + end vec_sr; + + function vec_sr + (A : vector_unsigned_short; + B : vector_unsigned_short) return vector_unsigned_short + is + begin + return To_LL_VUS (vsrh (To_LL_VSS (A), To_LL_VSS (B))); + end vec_sr; + + function vec_sr + (A : vector_signed_int; + B : vector_unsigned_int) return vector_signed_int + is + begin + return To_LL_VSI (vsrw (To_LL_VSI (A), To_LL_VSI (B))); + end vec_sr; + + function vec_sr + (A : vector_unsigned_int; + B : vector_unsigned_int) return vector_unsigned_int + is + begin + return To_LL_VUI (vsrw (To_LL_VSI (A), To_LL_VSI (B))); + end vec_sr; + + -- vec_vsrw -- + + function vec_vsrw + (A : vector_signed_int; + B : vector_unsigned_int) return vector_signed_int + is + begin + return To_LL_VSI (vsrw (To_LL_VSI (A), To_LL_VSI (B))); + end vec_vsrw; + + function vec_vsrw + (A : vector_unsigned_int; + B : vector_unsigned_int) return vector_unsigned_int + is + begin + return To_LL_VUI (vsrw (To_LL_VSI (A), To_LL_VSI (B))); + end vec_vsrw; + + -- vec_vsrh -- + + function vec_vsrh + (A : vector_signed_short; + B : vector_unsigned_short) return vector_signed_short + is + begin + return To_LL_VSS (vsrh (To_LL_VSS (A), To_LL_VSS (B))); + end vec_vsrh; + + function vec_vsrh + (A : vector_unsigned_short; + B : vector_unsigned_short) return vector_unsigned_short + is + begin + return To_LL_VUS (vsrh (To_LL_VSS (A), To_LL_VSS (B))); + end vec_vsrh; + + -- vec_vsrb -- + + function vec_vsrb + (A : vector_signed_char; + B : vector_unsigned_char) return vector_signed_char + is + begin + return To_LL_VSC (vsrb (To_LL_VSC (A), To_LL_VSC (B))); + end vec_vsrb; + + function vec_vsrb + (A : vector_unsigned_char; + B : vector_unsigned_char) return vector_unsigned_char + is + begin + return To_LL_VUC (vsrb (To_LL_VSC (A), To_LL_VSC (B))); + end vec_vsrb; + + -- vec_sra -- + + function vec_sra + (A : vector_signed_char; + B : vector_unsigned_char) return vector_signed_char + is + begin + return To_LL_VSC (vsrab (To_LL_VSC (A), To_LL_VSC (B))); + end vec_sra; + + function vec_sra + (A : vector_unsigned_char; + B : vector_unsigned_char) return vector_unsigned_char + is + begin + return To_LL_VUC (vsrab (To_LL_VSC (A), To_LL_VSC (B))); + end vec_sra; + + function vec_sra + (A : vector_signed_short; + B : vector_unsigned_short) return vector_signed_short + is + begin + return To_LL_VSS (vsrah (To_LL_VSS (A), To_LL_VSS (B))); + end vec_sra; + + function vec_sra + (A : vector_unsigned_short; + B : vector_unsigned_short) return vector_unsigned_short + is + begin + return To_LL_VUS (vsrah (To_LL_VSS (A), To_LL_VSS (B))); + end vec_sra; + + function vec_sra + (A : vector_signed_int; + B : vector_unsigned_int) return vector_signed_int + is + begin + return To_LL_VSI (vsraw (To_LL_VSI (A), To_LL_VSI (B))); + end vec_sra; + + function vec_sra + (A : vector_unsigned_int; + B : vector_unsigned_int) return vector_unsigned_int + is + begin + return To_LL_VUI (vsraw (To_LL_VSI (A), To_LL_VSI (B))); + end vec_sra; + + -- vec_vsraw -- + + function vec_vsraw + (A : vector_signed_int; + B : vector_unsigned_int) return vector_signed_int + is + begin + return To_LL_VSI (vsraw (To_LL_VSI (A), To_LL_VSI (B))); + end vec_vsraw; + + function vec_vsraw + (A : vector_unsigned_int; + B : vector_unsigned_int) return vector_unsigned_int + is + begin + return To_LL_VUI (vsraw (To_LL_VSI (A), To_LL_VSI (B))); + end vec_vsraw; + + -- vec_vsrah -- + + function vec_vsrah + (A : vector_signed_short; + B : vector_unsigned_short) return vector_signed_short + is + begin + return To_LL_VSS (vsrah (To_LL_VSS (A), To_LL_VSS (B))); + end vec_vsrah; + + function vec_vsrah + (A : vector_unsigned_short; + B : vector_unsigned_short) return vector_unsigned_short + is + begin + return To_LL_VUS (vsrah (To_LL_VSS (A), To_LL_VSS (B))); + end vec_vsrah; + + -- vec_vsrab -- + + function vec_vsrab + (A : vector_signed_char; + B : vector_unsigned_char) return vector_signed_char + is + begin + return To_LL_VSC (vsrab (To_LL_VSC (A), To_LL_VSC (B))); + end vec_vsrab; + + function vec_vsrab + (A : vector_unsigned_char; + B : vector_unsigned_char) return vector_unsigned_char + is + begin + return To_LL_VUC (vsrab (To_LL_VSC (A), To_LL_VSC (B))); + end vec_vsrab; + + -- vec_srl -- + + function vec_srl + (A : vector_signed_int; + B : vector_unsigned_int) return vector_signed_int + is + begin + return To_LL_VSI (vsr (To_LL_VSI (A), To_LL_VSI (B))); + end vec_srl; + + function vec_srl + (A : vector_signed_int; + B : vector_unsigned_short) return vector_signed_int + is + begin + return To_LL_VSI (vsr (To_LL_VSI (A), To_LL_VSI (B))); + end vec_srl; + + function vec_srl + (A : vector_signed_int; + B : vector_unsigned_char) return vector_signed_int + is + begin + return To_LL_VSI (vsr (To_LL_VSI (A), To_LL_VSI (B))); + end vec_srl; + + function vec_srl + (A : vector_unsigned_int; + B : vector_unsigned_int) return vector_unsigned_int + is + begin + return To_LL_VUI (vsr (To_LL_VSI (A), To_LL_VSI (B))); + end vec_srl; + + function vec_srl + (A : vector_unsigned_int; + B : vector_unsigned_short) return vector_unsigned_int + is + begin + return To_LL_VUI (vsr (To_LL_VSI (A), To_LL_VSI (B))); + end vec_srl; + + function vec_srl + (A : vector_unsigned_int; + B : vector_unsigned_char) return vector_unsigned_int + is + begin + return To_LL_VUI (vsr (To_LL_VSI (A), To_LL_VSI (B))); + end vec_srl; + + function vec_srl + (A : vector_bool_int; + B : vector_unsigned_int) return vector_bool_int + is + begin + return To_LL_VBI (vsr (To_LL_VSI (A), To_LL_VSI (B))); + end vec_srl; + + function vec_srl + (A : vector_bool_int; + B : vector_unsigned_short) return vector_bool_int + is + begin + return To_LL_VBI (vsr (To_LL_VSI (A), To_LL_VSI (B))); + end vec_srl; + + function vec_srl + (A : vector_bool_int; + B : vector_unsigned_char) return vector_bool_int + is + begin + return To_LL_VBI (vsr (To_LL_VSI (A), To_LL_VSI (B))); + end vec_srl; + + function vec_srl + (A : vector_signed_short; + B : vector_unsigned_int) return vector_signed_short + is + begin + return To_LL_VSS (vsr (To_LL_VSI (A), To_LL_VSI (B))); + end vec_srl; + + function vec_srl + (A : vector_signed_short; + B : vector_unsigned_short) return vector_signed_short + is + begin + return To_LL_VSS (vsr (To_LL_VSI (A), To_LL_VSI (B))); + end vec_srl; + + function vec_srl + (A : vector_signed_short; + B : vector_unsigned_char) return vector_signed_short + is + begin + return To_LL_VSS (vsr (To_LL_VSI (A), To_LL_VSI (B))); + end vec_srl; + + function vec_srl + (A : vector_unsigned_short; + B : vector_unsigned_int) return vector_unsigned_short + is + begin + return To_LL_VUS (vsr (To_LL_VSI (A), To_LL_VSI (B))); + end vec_srl; + + function vec_srl + (A : vector_unsigned_short; + B : vector_unsigned_short) return vector_unsigned_short + is + begin + return To_LL_VUS (vsr (To_LL_VSI (A), To_LL_VSI (B))); + end vec_srl; + + function vec_srl + (A : vector_unsigned_short; + B : vector_unsigned_char) return vector_unsigned_short + is + begin + return To_LL_VUS (vsr (To_LL_VSI (A), To_LL_VSI (B))); + end vec_srl; + + function vec_srl + (A : vector_bool_short; + B : vector_unsigned_int) return vector_bool_short + is + begin + return To_LL_VBS (vsr (To_LL_VSI (A), To_LL_VSI (B))); + end vec_srl; + + function vec_srl + (A : vector_bool_short; + B : vector_unsigned_short) return vector_bool_short + is + begin + return To_LL_VBS (vsr (To_LL_VSI (A), To_LL_VSI (B))); + end vec_srl; + + function vec_srl + (A : vector_bool_short; + B : vector_unsigned_char) return vector_bool_short + is + begin + return To_LL_VBS (vsr (To_LL_VSI (A), To_LL_VSI (B))); + end vec_srl; + + function vec_srl + (A : vector_pixel; + B : vector_unsigned_int) return vector_pixel + is + begin + return To_LL_VP (vsr (To_LL_VSI (A), To_LL_VSI (B))); + end vec_srl; + + function vec_srl + (A : vector_pixel; + B : vector_unsigned_short) return vector_pixel + is + begin + return To_LL_VP (vsr (To_LL_VSI (A), To_LL_VSI (B))); + end vec_srl; + + function vec_srl + (A : vector_pixel; + B : vector_unsigned_char) return vector_pixel + is + begin + return To_LL_VP (vsr (To_LL_VSI (A), To_LL_VSI (B))); + end vec_srl; + + function vec_srl + (A : vector_signed_char; + B : vector_unsigned_int) return vector_signed_char + is + begin + return To_LL_VSC (vsr (To_LL_VSI (A), To_LL_VSI (B))); + end vec_srl; + + function vec_srl + (A : vector_signed_char; + B : vector_unsigned_short) return vector_signed_char + is + begin + return To_LL_VSC (vsr (To_LL_VSI (A), To_LL_VSI (B))); + end vec_srl; + + function vec_srl + (A : vector_signed_char; + B : vector_unsigned_char) return vector_signed_char + is + begin + return To_LL_VSC (vsr (To_LL_VSI (A), To_LL_VSI (B))); + end vec_srl; + + function vec_srl + (A : vector_unsigned_char; + B : vector_unsigned_int) return vector_unsigned_char + is + begin + return To_LL_VUC (vsr (To_LL_VSI (A), To_LL_VSI (B))); + end vec_srl; + + function vec_srl + (A : vector_unsigned_char; + B : vector_unsigned_short) return vector_unsigned_char + is + begin + return To_LL_VUC (vsr (To_LL_VSI (A), To_LL_VSI (B))); + end vec_srl; + + function vec_srl + (A : vector_unsigned_char; + B : vector_unsigned_char) return vector_unsigned_char + is + begin + return To_LL_VUC (vsr (To_LL_VSI (A), To_LL_VSI (B))); + end vec_srl; + + function vec_srl + (A : vector_bool_char; + B : vector_unsigned_int) return vector_bool_char + is + begin + return To_LL_VBC (vsr (To_LL_VSI (A), To_LL_VSI (B))); + end vec_srl; + + function vec_srl + (A : vector_bool_char; + B : vector_unsigned_short) return vector_bool_char + is + begin + return To_LL_VBC (vsr (To_LL_VSI (A), To_LL_VSI (B))); + end vec_srl; + + function vec_srl + (A : vector_bool_char; + B : vector_unsigned_char) return vector_bool_char + is + begin + return To_LL_VBC (vsr (To_LL_VSI (A), To_LL_VSI (B))); + end vec_srl; + + -- vec_sro -- + + function vec_sro + (A : vector_float; + B : vector_signed_char) return vector_float + is + begin + return To_LL_VF (vsro (To_LL_VSI (A), To_LL_VSI (B))); + end vec_sro; + + function vec_sro + (A : vector_float; + B : vector_unsigned_char) return vector_float + is + begin + return To_LL_VF (vsro (To_LL_VSI (A), To_LL_VSI (B))); + end vec_sro; + + function vec_sro + (A : vector_signed_int; + B : vector_signed_char) return vector_signed_int + is + begin + return To_LL_VSI (vsro (To_LL_VSI (A), To_LL_VSI (B))); + end vec_sro; + + function vec_sro + (A : vector_signed_int; + B : vector_unsigned_char) return vector_signed_int + is + begin + return To_LL_VSI (vsro (To_LL_VSI (A), To_LL_VSI (B))); + end vec_sro; + + function vec_sro + (A : vector_unsigned_int; + B : vector_signed_char) return vector_unsigned_int + is + begin + return To_LL_VUI (vsro (To_LL_VSI (A), To_LL_VSI (B))); + end vec_sro; + + function vec_sro + (A : vector_unsigned_int; + B : vector_unsigned_char) return vector_unsigned_int + is + begin + return To_LL_VUI (vsro (To_LL_VSI (A), To_LL_VSI (B))); + end vec_sro; + + function vec_sro + (A : vector_signed_short; + B : vector_signed_char) return vector_signed_short + is + begin + return To_LL_VSS (vsro (To_LL_VSI (A), To_LL_VSI (B))); + end vec_sro; + + function vec_sro + (A : vector_signed_short; + B : vector_unsigned_char) return vector_signed_short + is + begin + return To_LL_VSS (vsro (To_LL_VSI (A), To_LL_VSI (B))); + end vec_sro; + + function vec_sro + (A : vector_unsigned_short; + B : vector_signed_char) return vector_unsigned_short + is + begin + return To_LL_VUS (vsro (To_LL_VSI (A), To_LL_VSI (B))); + end vec_sro; + + function vec_sro + (A : vector_unsigned_short; + B : vector_unsigned_char) return vector_unsigned_short + is + begin + return To_LL_VUS (vsro (To_LL_VSI (A), To_LL_VSI (B))); + end vec_sro; + + function vec_sro + (A : vector_pixel; + B : vector_signed_char) return vector_pixel + is + begin + return To_LL_VP (vsro (To_LL_VSI (A), To_LL_VSI (B))); + end vec_sro; + + function vec_sro + (A : vector_pixel; + B : vector_unsigned_char) return vector_pixel + is + begin + return To_LL_VP (vsro (To_LL_VSI (A), To_LL_VSI (B))); + end vec_sro; + + function vec_sro + (A : vector_signed_char; + B : vector_signed_char) return vector_signed_char + is + begin + return To_LL_VSC (vsro (To_LL_VSI (A), To_LL_VSI (B))); + end vec_sro; + + function vec_sro + (A : vector_signed_char; + B : vector_unsigned_char) return vector_signed_char + is + begin + return To_LL_VSC (vsro (To_LL_VSI (A), To_LL_VSI (B))); + end vec_sro; + + function vec_sro + (A : vector_unsigned_char; + B : vector_signed_char) return vector_unsigned_char + is + begin + return To_LL_VUC (vsro (To_LL_VSI (A), To_LL_VSI (B))); + end vec_sro; + + function vec_sro + (A : vector_unsigned_char; + B : vector_unsigned_char) return vector_unsigned_char + is + begin + return To_LL_VUC (vsro (To_LL_VSI (A), To_LL_VSI (B))); + end vec_sro; + + -- vec_st -- + + procedure vec_st + (A : vector_float; + B : c_int; + C : vector_float_ptr) + is + begin + stvx (To_LL_VSI (A), B, To_PTR (C)); + end vec_st; + + procedure vec_st + (A : vector_float; + B : c_int; + C : float_ptr) + is + begin + stvx (To_LL_VSI (A), B, To_PTR (C)); + end vec_st; + + procedure vec_st + (A : vector_signed_int; + B : c_int; + C : vector_signed_int_ptr) + is + begin + stvx (To_LL_VSI (A), B, To_PTR (C)); + end vec_st; + + procedure vec_st + (A : vector_signed_int; + B : c_int; + C : int_ptr) + is + begin + stvx (To_LL_VSI (A), B, To_PTR (C)); + end vec_st; + + procedure vec_st + (A : vector_unsigned_int; + B : c_int; + C : vector_unsigned_int_ptr) + is + begin + stvx (To_LL_VSI (A), B, To_PTR (C)); + end vec_st; + + procedure vec_st + (A : vector_unsigned_int; + B : c_int; + C : unsigned_int_ptr) + is + begin + stvx (To_LL_VSI (A), B, To_PTR (C)); + end vec_st; + + procedure vec_st + (A : vector_bool_int; + B : c_int; + C : vector_bool_int_ptr) + is + begin + stvx (To_LL_VSI (A), B, To_PTR (C)); + end vec_st; + + procedure vec_st + (A : vector_bool_int; + B : c_int; + C : unsigned_int_ptr) + is + begin + stvx (To_LL_VSI (A), B, To_PTR (C)); + end vec_st; + + procedure vec_st + (A : vector_bool_int; + B : c_int; + C : int_ptr) + is + begin + stvx (To_LL_VSI (A), B, To_PTR (C)); + end vec_st; + + procedure vec_st + (A : vector_signed_short; + B : c_int; + C : vector_signed_short_ptr) + is + begin + stvx (To_LL_VSI (A), B, To_PTR (C)); + end vec_st; + + procedure vec_st + (A : vector_signed_short; + B : c_int; + C : short_ptr) + is + begin + stvx (To_LL_VSI (A), B, To_PTR (C)); + end vec_st; + + procedure vec_st + (A : vector_unsigned_short; + B : c_int; + C : vector_unsigned_short_ptr) + is + begin + stvx (To_LL_VSI (A), B, To_PTR (C)); + end vec_st; + + procedure vec_st + (A : vector_unsigned_short; + B : c_int; + C : unsigned_short_ptr) + is + begin + stvx (To_LL_VSI (A), B, To_PTR (C)); + end vec_st; + + procedure vec_st + (A : vector_bool_short; + B : c_int; + C : vector_bool_short_ptr) + is + begin + stvx (To_LL_VSI (A), B, To_PTR (C)); + end vec_st; + + procedure vec_st + (A : vector_bool_short; + B : c_int; + C : unsigned_short_ptr) + is + begin + stvx (To_LL_VSI (A), B, To_PTR (C)); + end vec_st; + + procedure vec_st + (A : vector_pixel; + B : c_int; + C : vector_pixel_ptr) + is + begin + stvx (To_LL_VSI (A), B, To_PTR (C)); + end vec_st; + + procedure vec_st + (A : vector_pixel; + B : c_int; + C : unsigned_short_ptr) + is + begin + stvx (To_LL_VSI (A), B, To_PTR (C)); + end vec_st; + + procedure vec_st + (A : vector_pixel; + B : c_int; + C : short_ptr) + is + begin + stvx (To_LL_VSI (A), B, To_PTR (C)); + end vec_st; + + procedure vec_st + (A : vector_bool_short; + B : c_int; + C : short_ptr) + is + begin + stvx (To_LL_VSI (A), B, To_PTR (C)); + end vec_st; + + procedure vec_st + (A : vector_signed_char; + B : c_int; + C : vector_signed_char_ptr) + is + begin + stvx (To_LL_VSI (A), B, To_PTR (C)); + end vec_st; + + procedure vec_st + (A : vector_signed_char; + B : c_int; + C : signed_char_ptr) + is + begin + stvx (To_LL_VSI (A), B, To_PTR (C)); + end vec_st; + + procedure vec_st + (A : vector_unsigned_char; + B : c_int; + C : vector_unsigned_char_ptr) + is + begin + stvx (To_LL_VSI (A), B, To_PTR (C)); + end vec_st; + + procedure vec_st + (A : vector_unsigned_char; + B : c_int; + C : unsigned_char_ptr) + is + begin + stvx (To_LL_VSI (A), B, To_PTR (C)); + end vec_st; + + procedure vec_st + (A : vector_bool_char; + B : c_int; + C : vector_bool_char_ptr) + is + begin + stvx (To_LL_VSI (A), B, To_PTR (C)); + end vec_st; + + procedure vec_st + (A : vector_bool_char; + B : c_int; + C : unsigned_char_ptr) + is + begin + stvx (To_LL_VSI (A), B, To_PTR (C)); + end vec_st; + + procedure vec_st + (A : vector_bool_char; + B : c_int; + C : signed_char_ptr) + is + begin + stvx (To_LL_VSI (A), B, To_PTR (C)); + end vec_st; + + -- vec_ste -- + + procedure vec_ste + (A : vector_signed_char; + B : c_int; + C : signed_char_ptr) + is + begin + stvebx (To_LL_VSC (A), B, To_PTR (C)); + end vec_ste; + + procedure vec_ste + (A : vector_unsigned_char; + B : c_int; + C : unsigned_char_ptr) + is + begin + stvebx (To_LL_VSC (A), B, To_PTR (C)); + end vec_ste; + + procedure vec_ste + (A : vector_bool_char; + B : c_int; + C : signed_char_ptr) + is + begin + stvebx (To_LL_VSC (A), B, To_PTR (C)); + end vec_ste; + + procedure vec_ste + (A : vector_bool_char; + B : c_int; + C : unsigned_char_ptr) + is + begin + stvebx (To_LL_VSC (A), B, To_PTR (C)); + end vec_ste; + + procedure vec_ste + (A : vector_signed_short; + B : c_int; + C : short_ptr) + is + begin + stvehx (To_LL_VSS (A), B, To_PTR (C)); + end vec_ste; + + procedure vec_ste + (A : vector_unsigned_short; + B : c_int; + C : unsigned_short_ptr) + is + begin + stvehx (To_LL_VSS (A), B, To_PTR (C)); + end vec_ste; + + procedure vec_ste + (A : vector_bool_short; + B : c_int; + C : short_ptr) + is + begin + stvehx (To_LL_VSS (A), B, To_PTR (C)); + end vec_ste; + + procedure vec_ste + (A : vector_bool_short; + B : c_int; + C : unsigned_short_ptr) + is + begin + stvehx (To_LL_VSS (A), B, To_PTR (C)); + end vec_ste; + + procedure vec_ste + (A : vector_pixel; + B : c_int; + C : short_ptr) + is + begin + stvehx (To_LL_VSS (A), B, To_PTR (C)); + end vec_ste; + + procedure vec_ste + (A : vector_pixel; + B : c_int; + C : unsigned_short_ptr) + is + begin + stvehx (To_LL_VSS (A), B, To_PTR (C)); + end vec_ste; + + procedure vec_ste + (A : vector_float; + B : c_int; + C : float_ptr) + is + begin + stvewx (To_LL_VSI (A), B, To_PTR (C)); + end vec_ste; + + procedure vec_ste + (A : vector_signed_int; + B : c_int; + C : int_ptr) + is + begin + stvewx (To_LL_VSI (A), B, To_PTR (C)); + end vec_ste; + + procedure vec_ste + (A : vector_unsigned_int; + B : c_int; + C : unsigned_int_ptr) + is + begin + stvewx (To_LL_VSI (A), B, To_PTR (C)); + end vec_ste; + + procedure vec_ste + (A : vector_bool_int; + B : c_int; + C : int_ptr) + is + begin + stvewx (To_LL_VSI (A), B, To_PTR (C)); + end vec_ste; + + procedure vec_ste + (A : vector_bool_int; + B : c_int; + C : unsigned_int_ptr) + is + begin + stvewx (To_LL_VSI (A), B, To_PTR (C)); + end vec_ste; + + -- vec_stvewx -- + + procedure vec_stvewx + (A : vector_float; + B : c_int; + C : float_ptr) + is + begin + stvewx (To_LL_VSI (A), B, To_PTR (C)); + end vec_stvewx; + + procedure vec_stvewx + (A : vector_signed_int; + B : c_int; + C : int_ptr) + is + begin + stvewx (To_LL_VSI (A), B, To_PTR (C)); + end vec_stvewx; + + procedure vec_stvewx + (A : vector_unsigned_int; + B : c_int; + C : unsigned_int_ptr) + is + begin + stvewx (To_LL_VSI (A), B, To_PTR (C)); + end vec_stvewx; + + procedure vec_stvewx + (A : vector_bool_int; + B : c_int; + C : int_ptr) + is + begin + stvewx (To_LL_VSI (A), B, To_PTR (C)); + end vec_stvewx; + + procedure vec_stvewx + (A : vector_bool_int; + B : c_int; + C : unsigned_int_ptr) + is + begin + stvewx (To_LL_VSI (A), B, To_PTR (C)); + end vec_stvewx; + + -- vec_stvehx -- + + procedure vec_stvehx + (A : vector_signed_short; + B : c_int; + C : short_ptr) + is + begin + stvehx (To_LL_VSS (A), B, To_PTR (C)); + end vec_stvehx; + + procedure vec_stvehx + (A : vector_unsigned_short; + B : c_int; + C : unsigned_short_ptr) + is + begin + stvehx (To_LL_VSS (A), B, To_PTR (C)); + end vec_stvehx; + + procedure vec_stvehx + (A : vector_bool_short; + B : c_int; + C : short_ptr) + is + begin + stvehx (To_LL_VSS (A), B, To_PTR (C)); + end vec_stvehx; + + procedure vec_stvehx + (A : vector_bool_short; + B : c_int; + C : unsigned_short_ptr) + is + begin + stvehx (To_LL_VSS (A), B, To_PTR (C)); + end vec_stvehx; + + procedure vec_stvehx + (A : vector_pixel; + B : c_int; + C : short_ptr) + is + begin + stvehx (To_LL_VSS (A), B, To_PTR (C)); + end vec_stvehx; + + procedure vec_stvehx + (A : vector_pixel; + B : c_int; + C : unsigned_short_ptr) + is + begin + stvehx (To_LL_VSS (A), B, To_PTR (C)); + end vec_stvehx; + + -- vec_stvebx -- + + procedure vec_stvebx + (A : vector_signed_char; + B : c_int; + C : signed_char_ptr) + is + begin + stvebx (To_LL_VSC (A), B, To_PTR (C)); + end vec_stvebx; + + procedure vec_stvebx + (A : vector_unsigned_char; + B : c_int; + C : unsigned_char_ptr) + is + begin + stvebx (To_LL_VSC (A), B, To_PTR (C)); + end vec_stvebx; + + procedure vec_stvebx + (A : vector_bool_char; + B : c_int; + C : signed_char_ptr) + is + begin + stvebx (To_LL_VSC (A), B, To_PTR (C)); + end vec_stvebx; + + procedure vec_stvebx + (A : vector_bool_char; + B : c_int; + C : unsigned_char_ptr) + is + begin + stvebx (To_LL_VSC (A), B, To_PTR (C)); + end vec_stvebx; + + -- vec_stl -- + + procedure vec_stl + (A : vector_float; + B : c_int; + C : vector_float_ptr) + is + begin + stvxl (To_LL_VSI (A), B, To_PTR (C)); + end vec_stl; + + procedure vec_stl + (A : vector_float; + B : c_int; + C : float_ptr) + is + begin + stvxl (To_LL_VSI (A), B, To_PTR (C)); + end vec_stl; + + procedure vec_stl + (A : vector_signed_int; + B : c_int; + C : vector_signed_int_ptr) + is + begin + stvxl (To_LL_VSI (A), B, To_PTR (C)); + end vec_stl; + + procedure vec_stl + (A : vector_signed_int; + B : c_int; + C : int_ptr) + is + begin + stvxl (To_LL_VSI (A), B, To_PTR (C)); + end vec_stl; + + procedure vec_stl + (A : vector_unsigned_int; + B : c_int; + C : vector_unsigned_int_ptr) + is + begin + stvxl (To_LL_VSI (A), B, To_PTR (C)); + end vec_stl; + + procedure vec_stl + (A : vector_unsigned_int; + B : c_int; + C : unsigned_int_ptr) + is + begin + stvxl (To_LL_VSI (A), B, To_PTR (C)); + end vec_stl; + + procedure vec_stl + (A : vector_bool_int; + B : c_int; + C : vector_bool_int_ptr) + is + begin + stvxl (To_LL_VSI (A), B, To_PTR (C)); + end vec_stl; + + procedure vec_stl + (A : vector_bool_int; + B : c_int; + C : unsigned_int_ptr) + is + begin + stvxl (To_LL_VSI (A), B, To_PTR (C)); + end vec_stl; + + procedure vec_stl + (A : vector_bool_int; + B : c_int; + C : int_ptr) + is + begin + stvxl (To_LL_VSI (A), B, To_PTR (C)); + end vec_stl; + + procedure vec_stl + (A : vector_signed_short; + B : c_int; + C : vector_signed_short_ptr) + is + begin + stvxl (To_LL_VSI (A), B, To_PTR (C)); + end vec_stl; + + procedure vec_stl + (A : vector_signed_short; + B : c_int; + C : short_ptr) + is + begin + stvxl (To_LL_VSI (A), B, To_PTR (C)); + end vec_stl; + + procedure vec_stl + (A : vector_unsigned_short; + B : c_int; + C : vector_unsigned_short_ptr) + is + begin + stvxl (To_LL_VSI (A), B, To_PTR (C)); + end vec_stl; + + procedure vec_stl + (A : vector_unsigned_short; + B : c_int; + C : unsigned_short_ptr) + is + begin + stvxl (To_LL_VSI (A), B, To_PTR (C)); + end vec_stl; + + procedure vec_stl + (A : vector_bool_short; + B : c_int; + C : vector_bool_short_ptr) + is + begin + stvxl (To_LL_VSI (A), B, To_PTR (C)); + end vec_stl; + + procedure vec_stl + (A : vector_bool_short; + B : c_int; + C : unsigned_short_ptr) + is + begin + stvxl (To_LL_VSI (A), B, To_PTR (C)); + end vec_stl; + + procedure vec_stl + (A : vector_bool_short; + B : c_int; + C : short_ptr) + is + begin + stvxl (To_LL_VSI (A), B, To_PTR (C)); + end vec_stl; + + procedure vec_stl + (A : vector_pixel; + B : c_int; + C : vector_pixel_ptr) + is + begin + stvxl (To_LL_VSI (A), B, To_PTR (C)); + end vec_stl; + + procedure vec_stl + (A : vector_pixel; + B : c_int; + C : unsigned_short_ptr) + is + begin + stvxl (To_LL_VSI (A), B, To_PTR (C)); + end vec_stl; + + procedure vec_stl + (A : vector_pixel; + B : c_int; + C : short_ptr) + is + begin + stvxl (To_LL_VSI (A), B, To_PTR (C)); + end vec_stl; + + procedure vec_stl + (A : vector_signed_char; + B : c_int; + C : vector_signed_char_ptr) + is + begin + stvxl (To_LL_VSI (A), B, To_PTR (C)); + end vec_stl; + + procedure vec_stl + (A : vector_signed_char; + B : c_int; + C : signed_char_ptr) + is + begin + stvxl (To_LL_VSI (A), B, To_PTR (C)); + end vec_stl; + + procedure vec_stl + (A : vector_unsigned_char; + B : c_int; + C : vector_unsigned_char_ptr) + is + begin + stvxl (To_LL_VSI (A), B, To_PTR (C)); + end vec_stl; + + procedure vec_stl + (A : vector_unsigned_char; + B : c_int; + C : unsigned_char_ptr) + is + begin + stvxl (To_LL_VSI (A), B, To_PTR (C)); + end vec_stl; + + procedure vec_stl + (A : vector_bool_char; + B : c_int; + C : vector_bool_char_ptr) + is + begin + stvxl (To_LL_VSI (A), B, To_PTR (C)); + end vec_stl; + + procedure vec_stl + (A : vector_bool_char; + B : c_int; + C : unsigned_char_ptr) + is + begin + stvxl (To_LL_VSI (A), B, To_PTR (C)); + end vec_stl; + + procedure vec_stl + (A : vector_bool_char; + B : c_int; + C : signed_char_ptr) + is + begin + stvxl (To_LL_VSI (A), B, To_PTR (C)); + end vec_stl; + + -- vec_sub -- + + function vec_sub + (A : vector_bool_char; + B : vector_signed_char) return vector_signed_char + is + begin + return To_LL_VSC (vsububm (To_LL_VSC (A), To_LL_VSC (B))); + end vec_sub; + + function vec_sub + (A : vector_signed_char; + B : vector_bool_char) return vector_signed_char + is + begin + return To_LL_VSC (vsububm (To_LL_VSC (A), To_LL_VSC (B))); + end vec_sub; + + function vec_sub + (A : vector_signed_char; + B : vector_signed_char) return vector_signed_char + is + begin + return To_LL_VSC (vsububm (To_LL_VSC (A), To_LL_VSC (B))); + end vec_sub; + + function vec_sub + (A : vector_bool_char; + B : vector_unsigned_char) return vector_unsigned_char + is + begin + return To_LL_VUC (vsububm (To_LL_VSC (A), To_LL_VSC (B))); + end vec_sub; + + function vec_sub + (A : vector_unsigned_char; + B : vector_bool_char) return vector_unsigned_char + is + begin + return To_LL_VUC (vsububm (To_LL_VSC (A), To_LL_VSC (B))); + end vec_sub; + + function vec_sub + (A : vector_unsigned_char; + B : vector_unsigned_char) return vector_unsigned_char + is + begin + return To_LL_VUC (vsububm (To_LL_VSC (A), To_LL_VSC (B))); + end vec_sub; + + function vec_sub + (A : vector_bool_short; + B : vector_signed_short) return vector_signed_short + is + begin + return To_LL_VSS (vsubuhm (To_LL_VSS (A), To_LL_VSS (B))); + end vec_sub; + + function vec_sub + (A : vector_signed_short; + B : vector_bool_short) return vector_signed_short + is + begin + return To_LL_VSS (vsubuhm (To_LL_VSS (A), To_LL_VSS (B))); + end vec_sub; + + function vec_sub + (A : vector_signed_short; + B : vector_signed_short) return vector_signed_short + is + begin + return To_LL_VSS (vsubuhm (To_LL_VSS (A), To_LL_VSS (B))); + end vec_sub; + + function vec_sub + (A : vector_bool_short; + B : vector_unsigned_short) return vector_unsigned_short + is + begin + return To_LL_VUS (vsubuhm (To_LL_VSS (A), To_LL_VSS (B))); + end vec_sub; + + function vec_sub + (A : vector_unsigned_short; + B : vector_bool_short) return vector_unsigned_short + is + begin + return To_LL_VUS (vsubuhm (To_LL_VSS (A), To_LL_VSS (B))); + end vec_sub; + + function vec_sub + (A : vector_unsigned_short; + B : vector_unsigned_short) return vector_unsigned_short + is + begin + return To_LL_VUS (vsubuhm (To_LL_VSS (A), To_LL_VSS (B))); + end vec_sub; + + function vec_sub + (A : vector_bool_int; + B : vector_signed_int) return vector_signed_int + is + begin + return To_LL_VSI (vsubuwm (To_LL_VSI (A), To_LL_VSI (B))); + end vec_sub; + + function vec_sub + (A : vector_signed_int; + B : vector_bool_int) return vector_signed_int + is + begin + return To_LL_VSI (vsubuwm (To_LL_VSI (A), To_LL_VSI (B))); + end vec_sub; + + function vec_sub + (A : vector_signed_int; + B : vector_signed_int) return vector_signed_int + is + begin + return To_LL_VSI (vsubuwm (To_LL_VSI (A), To_LL_VSI (B))); + end vec_sub; + + function vec_sub + (A : vector_bool_int; + B : vector_unsigned_int) return vector_unsigned_int + is + begin + return To_LL_VUI (vsubuwm (To_LL_VSI (A), To_LL_VSI (B))); + end vec_sub; + + function vec_sub + (A : vector_unsigned_int; + B : vector_bool_int) return vector_unsigned_int + is + begin + return To_LL_VUI (vsubuwm (To_LL_VSI (A), To_LL_VSI (B))); + end vec_sub; + + function vec_sub + (A : vector_unsigned_int; + B : vector_unsigned_int) return vector_unsigned_int + is + begin + return To_LL_VUI (vsubuwm (To_LL_VSI (A), To_LL_VSI (B))); + end vec_sub; + + function vec_sub + (A : vector_float; + B : vector_float) return vector_float + is + begin + return To_LL_VF (vsubfp (To_LL_VF (A), To_LL_VF (B))); + end vec_sub; + + -- vec_vsubfp -- + + function vec_vsubfp + (A : vector_float; + B : vector_float) return vector_float + is + begin + return To_LL_VF (vsubfp (To_LL_VF (A), To_LL_VF (B))); + end vec_vsubfp; + + -- vec_vsubuwm -- + + function vec_vsubuwm + (A : vector_bool_int; + B : vector_signed_int) return vector_signed_int + is + begin + return To_LL_VSI (vsubuwm (To_LL_VSI (A), To_LL_VSI (B))); + end vec_vsubuwm; + + function vec_vsubuwm + (A : vector_signed_int; + B : vector_bool_int) return vector_signed_int + is + begin + return To_LL_VSI (vsubuwm (To_LL_VSI (A), To_LL_VSI (B))); + end vec_vsubuwm; + + function vec_vsubuwm + (A : vector_signed_int; + B : vector_signed_int) return vector_signed_int + is + begin + return To_LL_VSI (vsubuwm (To_LL_VSI (A), To_LL_VSI (B))); + end vec_vsubuwm; + + function vec_vsubuwm + (A : vector_bool_int; + B : vector_unsigned_int) return vector_unsigned_int + is + begin + return To_LL_VUI (vsubuwm (To_LL_VSI (A), To_LL_VSI (B))); + end vec_vsubuwm; + + function vec_vsubuwm + (A : vector_unsigned_int; + B : vector_bool_int) return vector_unsigned_int + is + begin + return To_LL_VUI (vsubuwm (To_LL_VSI (A), To_LL_VSI (B))); + end vec_vsubuwm; + + function vec_vsubuwm + (A : vector_unsigned_int; + B : vector_unsigned_int) return vector_unsigned_int + is + begin + return To_LL_VUI (vsubuwm (To_LL_VSI (A), To_LL_VSI (B))); + end vec_vsubuwm; + + -- vec_vsubuhm -- + + function vec_vsubuhm + (A : vector_bool_short; + B : vector_signed_short) return vector_signed_short + is + begin + return To_LL_VSS (vsubuhm (To_LL_VSS (A), To_LL_VSS (B))); + end vec_vsubuhm; + + function vec_vsubuhm + (A : vector_signed_short; + B : vector_bool_short) return vector_signed_short + is + begin + return To_LL_VSS (vsubuhm (To_LL_VSS (A), To_LL_VSS (B))); + end vec_vsubuhm; + + function vec_vsubuhm + (A : vector_signed_short; + B : vector_signed_short) return vector_signed_short + is + begin + return To_LL_VSS (vsubuhm (To_LL_VSS (A), To_LL_VSS (B))); + end vec_vsubuhm; + + function vec_vsubuhm + (A : vector_bool_short; + B : vector_unsigned_short) return vector_unsigned_short + is + begin + return To_LL_VUS (vsubuhm (To_LL_VSS (A), To_LL_VSS (B))); + end vec_vsubuhm; + + function vec_vsubuhm + (A : vector_unsigned_short; + B : vector_bool_short) return vector_unsigned_short + is + begin + return To_LL_VUS (vsubuhm (To_LL_VSS (A), To_LL_VSS (B))); + end vec_vsubuhm; + + function vec_vsubuhm + (A : vector_unsigned_short; + B : vector_unsigned_short) return vector_unsigned_short + is + begin + return To_LL_VUS (vsubuhm (To_LL_VSS (A), To_LL_VSS (B))); + end vec_vsubuhm; + + -- vec_vsububm -- + + function vec_vsububm + (A : vector_bool_char; + B : vector_signed_char) return vector_signed_char + is + begin + return To_LL_VSC (vsububm (To_LL_VSC (A), To_LL_VSC (B))); + end vec_vsububm; + + function vec_vsububm + (A : vector_signed_char; + B : vector_bool_char) return vector_signed_char + is + begin + return To_LL_VSC (vsububm (To_LL_VSC (A), To_LL_VSC (B))); + end vec_vsububm; + + function vec_vsububm + (A : vector_signed_char; + B : vector_signed_char) return vector_signed_char + is + begin + return To_LL_VSC (vsububm (To_LL_VSC (A), To_LL_VSC (B))); + end vec_vsububm; + + function vec_vsububm + (A : vector_bool_char; + B : vector_unsigned_char) return vector_unsigned_char + is + begin + return To_LL_VUC (vsububm (To_LL_VSC (A), To_LL_VSC (B))); + end vec_vsububm; + + function vec_vsububm + (A : vector_unsigned_char; + B : vector_bool_char) return vector_unsigned_char + is + begin + return To_LL_VUC (vsububm (To_LL_VSC (A), To_LL_VSC (B))); + end vec_vsububm; + + function vec_vsububm + (A : vector_unsigned_char; + B : vector_unsigned_char) return vector_unsigned_char + is + begin + return To_LL_VUC (vsububm (To_LL_VSC (A), To_LL_VSC (B))); + end vec_vsububm; + + -- vec_subc -- + + function vec_subc + (A : vector_unsigned_int; + B : vector_unsigned_int) return vector_unsigned_int + is + begin + return To_LL_VUI (vsubcuw (To_LL_VSI (A), To_LL_VSI (B))); + end vec_subc; + + -- vec_subs -- + + function vec_subs + (A : vector_bool_char; + B : vector_unsigned_char) return vector_unsigned_char + is + begin + return To_LL_VUC (vsububs (To_LL_VSC (A), To_LL_VSC (B))); + end vec_subs; + + function vec_subs + (A : vector_unsigned_char; + B : vector_bool_char) return vector_unsigned_char + is + begin + return To_LL_VUC (vsububs (To_LL_VSC (A), To_LL_VSC (B))); + end vec_subs; + + function vec_subs + (A : vector_unsigned_char; + B : vector_unsigned_char) return vector_unsigned_char + is + begin + return To_LL_VUC (vsububs (To_LL_VSC (A), To_LL_VSC (B))); + end vec_subs; + + function vec_subs + (A : vector_bool_char; + B : vector_signed_char) return vector_signed_char + is + begin + return To_LL_VSC (vsubsbs (To_LL_VSC (A), To_LL_VSC (B))); + end vec_subs; + + function vec_subs + (A : vector_signed_char; + B : vector_bool_char) return vector_signed_char + is + begin + return To_LL_VSC (vsubsbs (To_LL_VSC (A), To_LL_VSC (B))); + end vec_subs; + + function vec_subs + (A : vector_signed_char; + B : vector_signed_char) return vector_signed_char + is + begin + return To_LL_VSC (vsubsbs (To_LL_VSC (A), To_LL_VSC (B))); + end vec_subs; + + function vec_subs + (A : vector_bool_short; + B : vector_unsigned_short) return vector_unsigned_short + is + begin + return To_LL_VUS (vsubuhs (To_LL_VSS (A), To_LL_VSS (B))); + end vec_subs; + + function vec_subs + (A : vector_unsigned_short; + B : vector_bool_short) return vector_unsigned_short + is + begin + return To_LL_VUS (vsubuhs (To_LL_VSS (A), To_LL_VSS (B))); + end vec_subs; + + function vec_subs + (A : vector_unsigned_short; + B : vector_unsigned_short) return vector_unsigned_short + is + begin + return To_LL_VUS (vsubuhs (To_LL_VSS (A), To_LL_VSS (B))); + end vec_subs; + + function vec_subs + (A : vector_bool_short; + B : vector_signed_short) return vector_signed_short + is + begin + return To_LL_VSS (vsubshs (To_LL_VSS (A), To_LL_VSS (B))); + end vec_subs; + + function vec_subs + (A : vector_signed_short; + B : vector_bool_short) return vector_signed_short + is + begin + return To_LL_VSS (vsubshs (To_LL_VSS (A), To_LL_VSS (B))); + end vec_subs; + + function vec_subs + (A : vector_signed_short; + B : vector_signed_short) return vector_signed_short + is + begin + return To_LL_VSS (vsubshs (To_LL_VSS (A), To_LL_VSS (B))); + end vec_subs; + + function vec_subs + (A : vector_bool_int; + B : vector_unsigned_int) return vector_unsigned_int + is + begin + return To_LL_VUI (vsubuws (To_LL_VSI (A), To_LL_VSI (B))); + end vec_subs; + + function vec_subs + (A : vector_unsigned_int; + B : vector_bool_int) return vector_unsigned_int + is + begin + return To_LL_VUI (vsubuws (To_LL_VSI (A), To_LL_VSI (B))); + end vec_subs; + + function vec_subs + (A : vector_unsigned_int; + B : vector_unsigned_int) return vector_unsigned_int + is + begin + return To_LL_VUI (vsubuws (To_LL_VSI (A), To_LL_VSI (B))); + end vec_subs; + + function vec_subs + (A : vector_bool_int; + B : vector_signed_int) return vector_signed_int + is + begin + return To_LL_VSI (vsubsws (To_LL_VSI (A), To_LL_VSI (B))); + end vec_subs; + + function vec_subs + (A : vector_signed_int; + B : vector_bool_int) return vector_signed_int + is + begin + return To_LL_VSI (vsubsws (To_LL_VSI (A), To_LL_VSI (B))); + end vec_subs; + + function vec_subs + (A : vector_signed_int; + B : vector_signed_int) return vector_signed_int + is + begin + return To_LL_VSI (vsubsws (To_LL_VSI (A), To_LL_VSI (B))); + end vec_subs; + + -- vec_vsubsws -- + + function vec_vsubsws + (A : vector_bool_int; + B : vector_signed_int) return vector_signed_int + is + begin + return To_LL_VSI (vsubsws (To_LL_VSI (A), To_LL_VSI (B))); + end vec_vsubsws; + + function vec_vsubsws + (A : vector_signed_int; + B : vector_bool_int) return vector_signed_int + is + begin + return To_LL_VSI (vsubsws (To_LL_VSI (A), To_LL_VSI (B))); + end vec_vsubsws; + + function vec_vsubsws + (A : vector_signed_int; + B : vector_signed_int) return vector_signed_int + is + begin + return To_LL_VSI (vsubsws (To_LL_VSI (A), To_LL_VSI (B))); + end vec_vsubsws; + + -- vec_vsubuws -- + + function vec_vsubuws + (A : vector_bool_int; + B : vector_unsigned_int) return vector_unsigned_int + is + begin + return To_LL_VUI (vsubuws (To_LL_VSI (A), To_LL_VSI (B))); + end vec_vsubuws; + + function vec_vsubuws + (A : vector_unsigned_int; + B : vector_bool_int) return vector_unsigned_int + is + begin + return To_LL_VUI (vsubuws (To_LL_VSI (A), To_LL_VSI (B))); + end vec_vsubuws; + + function vec_vsubuws + (A : vector_unsigned_int; + B : vector_unsigned_int) return vector_unsigned_int + is + begin + return To_LL_VUI (vsubuws (To_LL_VSI (A), To_LL_VSI (B))); + end vec_vsubuws; + + -- vec_vsubshs -- + + function vec_vsubshs + (A : vector_bool_short; + B : vector_signed_short) return vector_signed_short + is + begin + return To_LL_VSS (vsubshs (To_LL_VSS (A), To_LL_VSS (B))); + end vec_vsubshs; + + function vec_vsubshs + (A : vector_signed_short; + B : vector_bool_short) return vector_signed_short + is + begin + return To_LL_VSS (vsubshs (To_LL_VSS (A), To_LL_VSS (B))); + end vec_vsubshs; + + function vec_vsubshs + (A : vector_signed_short; + B : vector_signed_short) return vector_signed_short + is + begin + return To_LL_VSS (vsubshs (To_LL_VSS (A), To_LL_VSS (B))); + end vec_vsubshs; + + -- vec_vsubuhs -- + + function vec_vsubuhs + (A : vector_bool_short; + B : vector_unsigned_short) return vector_unsigned_short + is + begin + return To_LL_VUS (vsubuhs (To_LL_VSS (A), To_LL_VSS (B))); + end vec_vsubuhs; + + function vec_vsubuhs + (A : vector_unsigned_short; + B : vector_bool_short) return vector_unsigned_short + is + begin + return To_LL_VUS (vsubuhs (To_LL_VSS (A), To_LL_VSS (B))); + end vec_vsubuhs; + + function vec_vsubuhs + (A : vector_unsigned_short; + B : vector_unsigned_short) return vector_unsigned_short + is + begin + return To_LL_VUS (vsubuhs (To_LL_VSS (A), To_LL_VSS (B))); + end vec_vsubuhs; + + -- vec_vsubsbs -- + + function vec_vsubsbs + (A : vector_bool_char; + B : vector_signed_char) return vector_signed_char + is + begin + return To_LL_VSC (vsubsbs (To_LL_VSC (A), To_LL_VSC (B))); + end vec_vsubsbs; + + function vec_vsubsbs + (A : vector_signed_char; + B : vector_bool_char) return vector_signed_char + is + begin + return To_LL_VSC (vsubsbs (To_LL_VSC (A), To_LL_VSC (B))); + end vec_vsubsbs; + + function vec_vsubsbs + (A : vector_signed_char; + B : vector_signed_char) return vector_signed_char + is + begin + return To_LL_VSC (vsubsbs (To_LL_VSC (A), To_LL_VSC (B))); + end vec_vsubsbs; + + -- vec_vsububs -- + + function vec_vsububs + (A : vector_bool_char; + B : vector_unsigned_char) return vector_unsigned_char + is + begin + return To_LL_VUC (vsububs (To_LL_VSC (A), To_LL_VSC (B))); + end vec_vsububs; + + function vec_vsububs + (A : vector_unsigned_char; + B : vector_bool_char) return vector_unsigned_char + is + begin + return To_LL_VUC (vsububs (To_LL_VSC (A), To_LL_VSC (B))); + end vec_vsububs; + + function vec_vsububs + (A : vector_unsigned_char; + B : vector_unsigned_char) return vector_unsigned_char + is + begin + return To_LL_VUC (vsububs (To_LL_VSC (A), To_LL_VSC (B))); + end vec_vsububs; + + -- vec_sum4s -- + + function vec_sum4s + (A : vector_unsigned_char; + B : vector_unsigned_int) return vector_unsigned_int + is + begin + return To_LL_VUI (vsum4ubs (To_LL_VSC (A), To_LL_VSI (B))); + end vec_sum4s; + + function vec_sum4s + (A : vector_signed_char; + B : vector_signed_int) return vector_signed_int + is + begin + return To_LL_VSI (vsum4sbs (To_LL_VSC (A), To_LL_VSI (B))); + end vec_sum4s; + + function vec_sum4s + (A : vector_signed_short; + B : vector_signed_int) return vector_signed_int + is + begin + return To_LL_VSI (vsum4shs (To_LL_VSS (A), To_LL_VSI (B))); + end vec_sum4s; + + -- vec_vsum4shs -- + + function vec_vsum4shs + (A : vector_signed_short; + B : vector_signed_int) return vector_signed_int + is + begin + return To_LL_VSI (vsum4shs (To_LL_VSS (A), To_LL_VSI (B))); + end vec_vsum4shs; + + -- vec_vsum4sbs -- + + function vec_vsum4sbs + (A : vector_signed_char; + B : vector_signed_int) return vector_signed_int + is + begin + return To_LL_VSI (vsum4sbs (To_LL_VSC (A), To_LL_VSI (B))); + end vec_vsum4sbs; + + -- vec_vsum4ubs -- + + function vec_vsum4ubs + (A : vector_unsigned_char; + B : vector_unsigned_int) return vector_unsigned_int + is + begin + return To_LL_VUI (vsum4ubs (To_LL_VSC (A), To_LL_VSI (B))); + end vec_vsum4ubs; + + -- vec_sum2s -- + + function vec_sum2s + (A : vector_signed_int; + B : vector_signed_int) return vector_signed_int + is + begin + return To_LL_VSI (vsum2sws (To_LL_VSI (A), To_LL_VSI (B))); + end vec_sum2s; + + -- vec_sums -- + + function vec_sums + (A : vector_signed_int; + B : vector_signed_int) return vector_signed_int + is + begin + return To_LL_VSI (vsumsws (To_LL_VSI (A), To_LL_VSI (B))); + end vec_sums; + + -- vec_trunc -- + + function vec_trunc + (A : vector_float) return vector_float + is + begin + return To_LL_VF (vrfiz (To_LL_VF (A))); + end vec_trunc; + + -- vec_unpackh -- + + function vec_unpackh + (A : vector_signed_char) return vector_signed_short + is + begin + return To_LL_VSS (vupkhsb (To_LL_VSC (A))); + end vec_unpackh; + + function vec_unpackh + (A : vector_bool_char) return vector_bool_short + is + begin + return To_LL_VBS (vupkhsb (To_LL_VSC (A))); + end vec_unpackh; + + function vec_unpackh + (A : vector_signed_short) return vector_signed_int + is + begin + return To_LL_VSI (vupkhsh (To_LL_VSS (A))); + end vec_unpackh; + + function vec_unpackh + (A : vector_bool_short) return vector_bool_int + is + begin + return To_LL_VBI (vupkhsh (To_LL_VSS (A))); + end vec_unpackh; + + function vec_unpackh + (A : vector_pixel) return vector_unsigned_int + is + begin + return To_LL_VUI (vupkhpx (To_LL_VSS (A))); + end vec_unpackh; + + -- vec_vupkhsh -- + + function vec_vupkhsh + (A : vector_bool_short) return vector_bool_int + is + begin + return To_LL_VBI (vupkhsh (To_LL_VSS (A))); + end vec_vupkhsh; + + function vec_vupkhsh + (A : vector_signed_short) return vector_signed_int + is + begin + return To_LL_VSI (vupkhsh (To_LL_VSS (A))); + end vec_vupkhsh; + + -- vec_vupkhpx -- + + function vec_vupkhpx + (A : vector_pixel) return vector_unsigned_int + is + begin + return To_LL_VUI (vupkhpx (To_LL_VSS (A))); + end vec_vupkhpx; + + -- vec_vupkhsb -- + + function vec_vupkhsb + (A : vector_bool_char) return vector_bool_short + is + begin + return To_LL_VBS (vupkhsb (To_LL_VSC (A))); + end vec_vupkhsb; + + function vec_vupkhsb + (A : vector_signed_char) return vector_signed_short + is + begin + return To_LL_VSS (vupkhsb (To_LL_VSC (A))); + end vec_vupkhsb; + + -- vec_unpackl -- + + function vec_unpackl + (A : vector_signed_char) return vector_signed_short + is + begin + return To_LL_VSS (vupklsb (To_LL_VSC (A))); + end vec_unpackl; + + function vec_unpackl + (A : vector_bool_char) return vector_bool_short + is + begin + return To_LL_VBS (vupklsb (To_LL_VSC (A))); + end vec_unpackl; + + function vec_unpackl + (A : vector_pixel) return vector_unsigned_int + is + begin + return To_LL_VUI (vupklpx (To_LL_VSS (A))); + end vec_unpackl; + + function vec_unpackl + (A : vector_signed_short) return vector_signed_int + is + begin + return To_LL_VSI (vupklsh (To_LL_VSS (A))); + end vec_unpackl; + + function vec_unpackl + (A : vector_bool_short) return vector_bool_int + is + begin + return To_LL_VBI (vupklsh (To_LL_VSS (A))); + end vec_unpackl; + + -- vec_vupklpx -- + + function vec_vupklpx + (A : vector_pixel) return vector_unsigned_int + is + begin + return To_LL_VUI (vupklpx (To_LL_VSS (A))); + end vec_vupklpx; + + -- vec_upklsh -- + + function vec_vupklsh + (A : vector_bool_short) return vector_bool_int + is + begin + return To_LL_VBI (vupklsh (To_LL_VSS (A))); + end vec_vupklsh; + + function vec_vupklsh + (A : vector_signed_short) return vector_signed_int + is + begin + return To_LL_VSI (vupklsh (To_LL_VSS (A))); + end vec_vupklsh; + + -- vec_vupklsb -- + + function vec_vupklsb + (A : vector_bool_char) return vector_bool_short + is + begin + return To_LL_VBS (vupklsb (To_LL_VSC (A))); + end vec_vupklsb; + + function vec_vupklsb + (A : vector_signed_char) return vector_signed_short + is + begin + return To_LL_VSS (vupklsb (To_LL_VSC (A))); + end vec_vupklsb; + + -- vec_xor -- + + function vec_xor + (A : vector_float; + B : vector_float) return vector_float + is + begin + return To_LL_VF (vxor (To_LL_VSI (A), To_LL_VSI (B))); + end vec_xor; + + function vec_xor + (A : vector_float; + B : vector_bool_int) return vector_float + is + begin + return To_LL_VF (vxor (To_LL_VSI (A), To_LL_VSI (B))); + end vec_xor; + + function vec_xor + (A : vector_bool_int; + B : vector_float) return vector_float + is + begin + return To_LL_VF (vxor (To_LL_VSI (A), To_LL_VSI (B))); + end vec_xor; + + function vec_xor + (A : vector_bool_int; + B : vector_bool_int) return vector_bool_int + is + begin + return To_LL_VBI (vxor (To_LL_VSI (A), To_LL_VSI (B))); + end vec_xor; + + function vec_xor + (A : vector_bool_int; + B : vector_signed_int) return vector_signed_int + is + begin + return To_LL_VSI (vxor (To_LL_VSI (A), To_LL_VSI (B))); + end vec_xor; + + function vec_xor + (A : vector_signed_int; + B : vector_bool_int) return vector_signed_int + is + begin + return To_LL_VSI (vxor (To_LL_VSI (A), To_LL_VSI (B))); + end vec_xor; + + function vec_xor + (A : vector_signed_int; + B : vector_signed_int) return vector_signed_int + is + begin + return To_LL_VSI (vxor (To_LL_VSI (A), To_LL_VSI (B))); + end vec_xor; + + function vec_xor + (A : vector_bool_int; + B : vector_unsigned_int) return vector_unsigned_int + is + begin + return To_LL_VUI (vxor (To_LL_VSI (A), To_LL_VSI (B))); + end vec_xor; + + function vec_xor + (A : vector_unsigned_int; + B : vector_bool_int) return vector_unsigned_int + is + begin + return To_LL_VUI (vxor (To_LL_VSI (A), To_LL_VSI (B))); + end vec_xor; + + function vec_xor + (A : vector_unsigned_int; + B : vector_unsigned_int) return vector_unsigned_int + is + begin + return To_LL_VUI (vxor (To_LL_VSI (A), To_LL_VSI (B))); + end vec_xor; + + function vec_xor + (A : vector_bool_short; + B : vector_bool_short) return vector_bool_short + is + begin + return To_LL_VBS (vxor (To_LL_VSI (A), To_LL_VSI (B))); + end vec_xor; + + function vec_xor + (A : vector_bool_short; + B : vector_signed_short) return vector_signed_short + is + begin + return To_LL_VSS (vxor (To_LL_VSI (A), To_LL_VSI (B))); + end vec_xor; + + function vec_xor + (A : vector_signed_short; + B : vector_bool_short) return vector_signed_short + is + begin + return To_LL_VSS (vxor (To_LL_VSI (A), To_LL_VSI (B))); + end vec_xor; + + function vec_xor + (A : vector_signed_short; + B : vector_signed_short) return vector_signed_short + is + begin + return To_LL_VSS (vxor (To_LL_VSI (A), To_LL_VSI (B))); + end vec_xor; + + function vec_xor + (A : vector_bool_short; + B : vector_unsigned_short) return vector_unsigned_short + is + begin + return To_LL_VUS (vxor (To_LL_VSI (A), To_LL_VSI (B))); + end vec_xor; + + function vec_xor + (A : vector_unsigned_short; + B : vector_bool_short) return vector_unsigned_short + is + begin + return To_LL_VUS (vxor (To_LL_VSI (A), To_LL_VSI (B))); + end vec_xor; + + function vec_xor + (A : vector_unsigned_short; + B : vector_unsigned_short) return vector_unsigned_short + is + begin + return To_LL_VUS (vxor (To_LL_VSI (A), To_LL_VSI (B))); + end vec_xor; + + function vec_xor + (A : vector_bool_char; + B : vector_signed_char) return vector_signed_char + is + begin + return To_LL_VSC (vxor (To_LL_VSI (A), To_LL_VSI (B))); + end vec_xor; + + function vec_xor + (A : vector_bool_char; + B : vector_bool_char) return vector_bool_char + is + begin + return To_LL_VBC (vxor (To_LL_VSI (A), To_LL_VSI (B))); + end vec_xor; + + function vec_xor + (A : vector_signed_char; + B : vector_bool_char) return vector_signed_char + is + begin + return To_LL_VSC (vxor (To_LL_VSI (A), To_LL_VSI (B))); + end vec_xor; + + function vec_xor + (A : vector_signed_char; + B : vector_signed_char) return vector_signed_char + is + begin + return To_LL_VSC (vxor (To_LL_VSI (A), To_LL_VSI (B))); + end vec_xor; + + function vec_xor + (A : vector_bool_char; + B : vector_unsigned_char) return vector_unsigned_char + is + begin + return To_LL_VUC (vxor (To_LL_VSI (A), To_LL_VSI (B))); + end vec_xor; + + function vec_xor + (A : vector_unsigned_char; + B : vector_bool_char) return vector_unsigned_char + is + begin + return To_LL_VUC (vxor (To_LL_VSI (A), To_LL_VSI (B))); + end vec_xor; + + function vec_xor + (A : vector_unsigned_char; + B : vector_unsigned_char) return vector_unsigned_char + is + begin + return To_LL_VUC (vxor (To_LL_VSI (A), To_LL_VSI (B))); + end vec_xor; + + ----------------------------------- + -- Bodies for Altivec predicates -- + ----------------------------------- + + -- vec_all_eq -- + + function vec_all_eq + (A : vector_signed_char; + B : vector_bool_char) return c_int + is + begin + return vcmpequb_p (CR6_LT, To_LL_VSC (A), To_LL_VSC (B)); + end vec_all_eq; + + function vec_all_eq + (A : vector_signed_char; + B : vector_signed_char) return c_int + is + begin + return vcmpequb_p (CR6_LT, To_LL_VSC (A), To_LL_VSC (B)); + end vec_all_eq; + + function vec_all_eq + (A : vector_unsigned_char; + B : vector_bool_char) return c_int + is + begin + return vcmpequb_p (CR6_LT, To_LL_VSC (A), To_LL_VSC (B)); + end vec_all_eq; + + function vec_all_eq + (A : vector_unsigned_char; + B : vector_unsigned_char) return c_int + is + begin + return vcmpequb_p (CR6_LT, To_LL_VSC (A), To_LL_VSC (B)); + end vec_all_eq; + + function vec_all_eq + (A : vector_bool_char; + B : vector_bool_char) return c_int + is + begin + return vcmpequb_p (CR6_LT, To_LL_VSC (A), To_LL_VSC (B)); + end vec_all_eq; + + function vec_all_eq + (A : vector_bool_char; + B : vector_unsigned_char) return c_int + is + begin + return vcmpequb_p (CR6_LT, To_LL_VSC (A), To_LL_VSC (B)); + end vec_all_eq; + + function vec_all_eq + (A : vector_bool_char; + B : vector_signed_char) return c_int + is + begin + return vcmpequb_p (CR6_LT, To_LL_VSC (A), To_LL_VSC (B)); + end vec_all_eq; + + function vec_all_eq + (A : vector_signed_short; + B : vector_bool_short) return c_int + is + begin + return vcmpequh_p (CR6_LT, To_LL_VSS (A), To_LL_VSS (B)); + end vec_all_eq; + + function vec_all_eq + (A : vector_signed_short; + B : vector_signed_short) return c_int + is + begin + return vcmpequh_p (CR6_LT, To_LL_VSS (A), To_LL_VSS (B)); + end vec_all_eq; + + function vec_all_eq + (A : vector_unsigned_short; + B : vector_bool_short) return c_int + is + begin + return vcmpequh_p (CR6_LT, To_LL_VSS (A), To_LL_VSS (B)); + end vec_all_eq; + + function vec_all_eq + (A : vector_unsigned_short; + B : vector_unsigned_short) return c_int + is + begin + return vcmpequh_p (CR6_LT, To_LL_VSS (A), To_LL_VSS (B)); + end vec_all_eq; + + function vec_all_eq + (A : vector_bool_short; + B : vector_bool_short) return c_int + is + begin + return vcmpequh_p (CR6_LT, To_LL_VSS (A), To_LL_VSS (B)); + end vec_all_eq; + + function vec_all_eq + (A : vector_bool_short; + B : vector_unsigned_short) return c_int + is + begin + return vcmpequh_p (CR6_LT, To_LL_VSS (A), To_LL_VSS (B)); + end vec_all_eq; + + function vec_all_eq + (A : vector_bool_short; + B : vector_signed_short) return c_int + is + begin + return vcmpequh_p (CR6_LT, To_LL_VSS (A), To_LL_VSS (B)); + end vec_all_eq; + + function vec_all_eq + (A : vector_pixel; + B : vector_pixel) return c_int + is + begin + return vcmpequh_p (CR6_LT, To_LL_VSS (A), To_LL_VSS (B)); + end vec_all_eq; + + function vec_all_eq + (A : vector_signed_int; + B : vector_bool_int) return c_int + is + begin + return vcmpequw_p (CR6_LT, To_LL_VSI (A), To_LL_VSI (B)); + end vec_all_eq; + + function vec_all_eq + (A : vector_signed_int; + B : vector_signed_int) return c_int + is + begin + return vcmpequw_p (CR6_LT, To_LL_VSI (A), To_LL_VSI (B)); + end vec_all_eq; + + function vec_all_eq + (A : vector_unsigned_int; + B : vector_bool_int) return c_int + is + begin + return vcmpequw_p (CR6_LT, To_LL_VSI (A), To_LL_VSI (B)); + end vec_all_eq; + + function vec_all_eq + (A : vector_unsigned_int; + B : vector_unsigned_int) return c_int + is + begin + return vcmpequw_p (CR6_LT, To_LL_VSI (A), To_LL_VSI (B)); + end vec_all_eq; + + function vec_all_eq + (A : vector_bool_int; + B : vector_bool_int) return c_int + is + begin + return vcmpequw_p (CR6_LT, To_LL_VSI (A), To_LL_VSI (B)); + end vec_all_eq; + + function vec_all_eq + (A : vector_bool_int; + B : vector_unsigned_int) return c_int + is + begin + return vcmpequw_p (CR6_LT, To_LL_VSI (A), To_LL_VSI (B)); + end vec_all_eq; + + function vec_all_eq + (A : vector_bool_int; + B : vector_signed_int) return c_int + is + begin + return vcmpequw_p (CR6_LT, To_LL_VSI (A), To_LL_VSI (B)); + end vec_all_eq; + + function vec_all_eq + (A : vector_float; + B : vector_float) return c_int + is + begin + return vcmpeqfp_p (CR6_LT, To_LL_VF (A), To_LL_VF (B)); + end vec_all_eq; + + -- vec_all_ge -- + + function vec_all_ge + (A : vector_bool_char; + B : vector_unsigned_char) return c_int + is + begin + return vcmpgtub_p (CR6_EQ, To_LL_VSC (B), To_LL_VSC (A)); + end vec_all_ge; + + function vec_all_ge + (A : vector_unsigned_char; + B : vector_bool_char) return c_int + is + begin + return vcmpgtub_p (CR6_EQ, To_LL_VSC (B), To_LL_VSC (A)); + end vec_all_ge; + + function vec_all_ge + (A : vector_unsigned_char; + B : vector_unsigned_char) return c_int + is + begin + return vcmpgtub_p (CR6_EQ, To_LL_VSC (B), To_LL_VSC (A)); + end vec_all_ge; + + function vec_all_ge + (A : vector_bool_char; + B : vector_signed_char) return c_int + is + begin + return vcmpgtsb_p (CR6_EQ, To_LL_VSC (B), To_LL_VSC (A)); + end vec_all_ge; + + function vec_all_ge + (A : vector_signed_char; + B : vector_bool_char) return c_int + is + begin + return vcmpgtsb_p (CR6_EQ, To_LL_VSC (B), To_LL_VSC (A)); + end vec_all_ge; + + function vec_all_ge + (A : vector_signed_char; + B : vector_signed_char) return c_int + is + begin + return vcmpgtsb_p (CR6_EQ, To_LL_VSC (B), To_LL_VSC (A)); + end vec_all_ge; + + function vec_all_ge + (A : vector_bool_short; + B : vector_unsigned_short) return c_int + is + begin + return vcmpgtuh_p (CR6_EQ, To_LL_VSS (B), To_LL_VSS (A)); + end vec_all_ge; + + function vec_all_ge + (A : vector_unsigned_short; + B : vector_bool_short) return c_int + is + begin + return vcmpgtuh_p (CR6_EQ, To_LL_VSS (B), To_LL_VSS (A)); + end vec_all_ge; + + function vec_all_ge + (A : vector_unsigned_short; + B : vector_unsigned_short) return c_int + is + begin + return vcmpgtuh_p (CR6_EQ, To_LL_VSS (B), To_LL_VSS (A)); + end vec_all_ge; + + function vec_all_ge + (A : vector_signed_short; + B : vector_signed_short) return c_int + is + begin + return vcmpgtsh_p (CR6_EQ, To_LL_VSS (B), To_LL_VSS (A)); + end vec_all_ge; + + function vec_all_ge + (A : vector_bool_short; + B : vector_signed_short) return c_int + is + begin + return vcmpgtsh_p (CR6_EQ, To_LL_VSS (B), To_LL_VSS (A)); + end vec_all_ge; + + function vec_all_ge + (A : vector_signed_short; + B : vector_bool_short) return c_int + is + begin + return vcmpgtsh_p (CR6_EQ, To_LL_VSS (B), To_LL_VSS (A)); + end vec_all_ge; + + function vec_all_ge + (A : vector_bool_int; + B : vector_unsigned_int) return c_int + is + begin + return vcmpgtuw_p (CR6_EQ, To_LL_VSI (B), To_LL_VSI (A)); + end vec_all_ge; + + function vec_all_ge + (A : vector_unsigned_int; + B : vector_bool_int) return c_int + is + begin + return vcmpgtuw_p (CR6_EQ, To_LL_VSI (B), To_LL_VSI (A)); + end vec_all_ge; + + function vec_all_ge + (A : vector_unsigned_int; + B : vector_unsigned_int) return c_int + is + begin + return vcmpgtuw_p (CR6_EQ, To_LL_VSI (B), To_LL_VSI (A)); + end vec_all_ge; + + function vec_all_ge + (A : vector_bool_int; + B : vector_signed_int) return c_int + is + begin + return vcmpgtsw_p (CR6_EQ, To_LL_VSI (B), To_LL_VSI (A)); + end vec_all_ge; + + function vec_all_ge + (A : vector_signed_int; + B : vector_bool_int) return c_int + is + begin + return vcmpgtsw_p (CR6_EQ, To_LL_VSI (B), To_LL_VSI (A)); + end vec_all_ge; + + function vec_all_ge + (A : vector_signed_int; + B : vector_signed_int) return c_int + is + begin + return vcmpgtsw_p (CR6_EQ, To_LL_VSI (B), To_LL_VSI (A)); + end vec_all_ge; + + function vec_all_ge + (A : vector_float; + B : vector_float) return c_int + is + begin + return vcmpgefp_p (CR6_LT, To_LL_VF (A), To_LL_VF (B)); + end vec_all_ge; + + -- vec_all_gt -- + + function vec_all_gt + (A : vector_bool_char; + B : vector_unsigned_char) return c_int + is + begin + return vcmpgtub_p (CR6_LT, To_LL_VSC (A), To_LL_VSC (B)); + end vec_all_gt; + + function vec_all_gt + (A : vector_unsigned_char; + B : vector_bool_char) return c_int + is + begin + return vcmpgtub_p (CR6_LT, To_LL_VSC (A), To_LL_VSC (B)); + end vec_all_gt; + + function vec_all_gt + (A : vector_unsigned_char; + B : vector_unsigned_char) return c_int + is + begin + return vcmpgtub_p (CR6_LT, To_LL_VSC (A), To_LL_VSC (B)); + end vec_all_gt; + + function vec_all_gt + (A : vector_bool_char; + B : vector_signed_char) return c_int + is + begin + return vcmpgtsb_p (CR6_LT, To_LL_VSC (A), To_LL_VSC (B)); + end vec_all_gt; + + function vec_all_gt + (A : vector_signed_char; + B : vector_bool_char) return c_int + is + begin + return vcmpgtsb_p (CR6_LT, To_LL_VSC (A), To_LL_VSC (B)); + end vec_all_gt; + + function vec_all_gt + (A : vector_signed_char; + B : vector_signed_char) return c_int + is + begin + return vcmpgtsb_p (CR6_LT, To_LL_VSC (A), To_LL_VSC (B)); + end vec_all_gt; + + function vec_all_gt + (A : vector_bool_short; + B : vector_unsigned_short) return c_int + is + begin + return vcmpgtuh_p (CR6_LT, To_LL_VSS (A), To_LL_VSS (B)); + end vec_all_gt; + + function vec_all_gt + (A : vector_unsigned_short; + B : vector_bool_short) return c_int + is + begin + return vcmpgtuh_p (CR6_LT, To_LL_VSS (A), To_LL_VSS (B)); + end vec_all_gt; + + function vec_all_gt + (A : vector_unsigned_short; + B : vector_unsigned_short) return c_int + is + begin + return vcmpgtuh_p (CR6_LT, To_LL_VSS (A), To_LL_VSS (B)); + end vec_all_gt; + + function vec_all_gt + (A : vector_bool_short; + B : vector_signed_short) return c_int + is + begin + return vcmpgtsh_p (CR6_LT, To_LL_VSS (A), To_LL_VSS (B)); + end vec_all_gt; + + function vec_all_gt + (A : vector_signed_short; + B : vector_bool_short) return c_int + is + begin + return vcmpgtsh_p (CR6_LT, To_LL_VSS (A), To_LL_VSS (B)); + end vec_all_gt; + + function vec_all_gt + (A : vector_signed_short; + B : vector_signed_short) return c_int + is + begin + return vcmpgtsh_p (CR6_LT, To_LL_VSS (A), To_LL_VSS (B)); + end vec_all_gt; + + function vec_all_gt + (A : vector_bool_int; + B : vector_unsigned_int) return c_int + is + begin + return vcmpgtuw_p (CR6_LT, To_LL_VSI (A), To_LL_VSI (B)); + end vec_all_gt; + + function vec_all_gt + (A : vector_unsigned_int; + B : vector_bool_int) return c_int + is + begin + return vcmpgtuw_p (CR6_LT, To_LL_VSI (A), To_LL_VSI (B)); + end vec_all_gt; + + function vec_all_gt + (A : vector_unsigned_int; + B : vector_unsigned_int) return c_int + is + begin + return vcmpgtuw_p (CR6_LT, To_LL_VSI (A), To_LL_VSI (B)); + end vec_all_gt; + + function vec_all_gt + (A : vector_bool_int; + B : vector_signed_int) return c_int + is + begin + return vcmpgtsw_p (CR6_LT, To_LL_VSI (A), To_LL_VSI (B)); + end vec_all_gt; + + function vec_all_gt + (A : vector_signed_int; + B : vector_bool_int) return c_int + is + begin + return vcmpgtsw_p (CR6_LT, To_LL_VSI (A), To_LL_VSI (B)); + end vec_all_gt; + + function vec_all_gt + (A : vector_signed_int; + B : vector_signed_int) return c_int + is + begin + return vcmpgtsw_p (CR6_LT, To_LL_VSI (A), To_LL_VSI (B)); + end vec_all_gt; + + function vec_all_gt + (A : vector_float; + B : vector_float) return c_int + is + begin + return vcmpgtfp_p (CR6_LT, To_LL_VF (A), To_LL_VF (B)); + end vec_all_gt; + + -- vec_all_in -- + + function vec_all_in + (A : vector_float; + B : vector_float) return c_int + is + begin + return vcmpbfp_p (CR6_EQ, To_LL_VF (A), To_LL_VF (B)); + end vec_all_in; + + -- vec_all_le -- + + function vec_all_le + (A : vector_bool_char; + B : vector_unsigned_char) return c_int + is + begin + return vcmpgtub_p (CR6_EQ, To_LL_VSC (A), To_LL_VSC (B)); + end vec_all_le; + + function vec_all_le + (A : vector_unsigned_char; + B : vector_bool_char) return c_int + is + begin + return vcmpgtub_p (CR6_EQ, To_LL_VSC (A), To_LL_VSC (B)); + end vec_all_le; + + function vec_all_le + (A : vector_unsigned_char; + B : vector_unsigned_char) return c_int + is + begin + return vcmpgtub_p (CR6_EQ, To_LL_VSC (A), To_LL_VSC (B)); + end vec_all_le; + + function vec_all_le + (A : vector_bool_char; + B : vector_signed_char) return c_int + is + begin + return vcmpgtsb_p (CR6_EQ, To_LL_VSC (A), To_LL_VSC (B)); + end vec_all_le; + + function vec_all_le + (A : vector_signed_char; + B : vector_bool_char) return c_int + is + begin + return vcmpgtsb_p (CR6_EQ, To_LL_VSC (A), To_LL_VSC (B)); + end vec_all_le; + + function vec_all_le + (A : vector_signed_char; + B : vector_signed_char) return c_int + is + begin + return vcmpgtsb_p (CR6_EQ, To_LL_VSC (A), To_LL_VSC (B)); + end vec_all_le; + + function vec_all_le + (A : vector_bool_short; + B : vector_unsigned_short) return c_int + is + begin + return vcmpgtuh_p (CR6_EQ, To_LL_VSS (A), To_LL_VSS (B)); + end vec_all_le; + + function vec_all_le + (A : vector_unsigned_short; + B : vector_bool_short) return c_int + is + begin + return vcmpgtuh_p (CR6_EQ, To_LL_VSS (A), To_LL_VSS (B)); + end vec_all_le; + + function vec_all_le + (A : vector_unsigned_short; + B : vector_unsigned_short) return c_int + is + begin + return vcmpgtuh_p (CR6_EQ, To_LL_VSS (A), To_LL_VSS (B)); + end vec_all_le; + + function vec_all_le + (A : vector_bool_short; + B : vector_signed_short) return c_int + is + begin + return vcmpgtsh_p (CR6_EQ, To_LL_VSS (A), To_LL_VSS (B)); + end vec_all_le; + + function vec_all_le + (A : vector_signed_short; + B : vector_bool_short) return c_int + is + begin + return vcmpgtsh_p (CR6_EQ, To_LL_VSS (A), To_LL_VSS (B)); + end vec_all_le; + + function vec_all_le + (A : vector_signed_short; + B : vector_signed_short) return c_int + is + begin + return vcmpgtsh_p (CR6_EQ, To_LL_VSS (A), To_LL_VSS (B)); + end vec_all_le; + + function vec_all_le + (A : vector_bool_int; + B : vector_unsigned_int) return c_int + is + begin + return vcmpgtuw_p (CR6_EQ, To_LL_VSI (A), To_LL_VSI (B)); + end vec_all_le; + + function vec_all_le + (A : vector_unsigned_int; + B : vector_bool_int) return c_int + is + begin + return vcmpgtuw_p (CR6_EQ, To_LL_VSI (A), To_LL_VSI (B)); + end vec_all_le; + + function vec_all_le + (A : vector_unsigned_int; + B : vector_unsigned_int) return c_int + is + begin + return vcmpgtuw_p (CR6_EQ, To_LL_VSI (A), To_LL_VSI (B)); + end vec_all_le; + + function vec_all_le + (A : vector_bool_int; + B : vector_signed_int) return c_int + is + begin + return vcmpgtsw_p (CR6_EQ, To_LL_VSI (A), To_LL_VSI (B)); + end vec_all_le; + + function vec_all_le + (A : vector_signed_int; + B : vector_bool_int) return c_int + is + begin + return vcmpgtsw_p (CR6_EQ, To_LL_VSI (A), To_LL_VSI (B)); + end vec_all_le; + + function vec_all_le + (A : vector_signed_int; + B : vector_signed_int) return c_int + is + begin + return vcmpgtsw_p (CR6_EQ, To_LL_VSI (A), To_LL_VSI (B)); + end vec_all_le; + + function vec_all_le + (A : vector_float; + B : vector_float) return c_int + is + begin + return vcmpgefp_p (CR6_LT, To_LL_VF (B), To_LL_VF (A)); + end vec_all_le; + + -- vec_all_lt -- + + function vec_all_lt + (A : vector_bool_char; + B : vector_unsigned_char) return c_int + is + begin + return vcmpgtub_p (CR6_LT, To_LL_VSC (B), To_LL_VSC (A)); + end vec_all_lt; + + function vec_all_lt + (A : vector_unsigned_char; + B : vector_bool_char) return c_int + is + begin + return vcmpgtub_p (CR6_LT, To_LL_VSC (B), To_LL_VSC (A)); + end vec_all_lt; + + function vec_all_lt + (A : vector_unsigned_char; + B : vector_unsigned_char) return c_int + is + begin + return vcmpgtub_p (CR6_LT, To_LL_VSC (B), To_LL_VSC (A)); + end vec_all_lt; + + function vec_all_lt + (A : vector_bool_char; + B : vector_signed_char) return c_int + is + begin + return vcmpgtsb_p (CR6_LT, To_LL_VSC (B), To_LL_VSC (A)); + end vec_all_lt; + + function vec_all_lt + (A : vector_signed_char; + B : vector_bool_char) return c_int + is + begin + return vcmpgtsb_p (CR6_LT, To_LL_VSC (B), To_LL_VSC (A)); + end vec_all_lt; + + function vec_all_lt + (A : vector_signed_char; + B : vector_signed_char) return c_int + is + begin + return vcmpgtsb_p (CR6_LT, To_LL_VSC (B), To_LL_VSC (A)); + end vec_all_lt; + + function vec_all_lt + (A : vector_bool_short; + B : vector_unsigned_short) return c_int + is + begin + return vcmpgtuh_p (CR6_LT, To_LL_VSS (B), To_LL_VSS (A)); + end vec_all_lt; + + function vec_all_lt + (A : vector_unsigned_short; + B : vector_bool_short) return c_int + is + begin + return vcmpgtuh_p (CR6_LT, To_LL_VSS (B), To_LL_VSS (A)); + end vec_all_lt; + + function vec_all_lt + (A : vector_unsigned_short; + B : vector_unsigned_short) return c_int + is + begin + return vcmpgtuh_p (CR6_LT, To_LL_VSS (B), To_LL_VSS (A)); + end vec_all_lt; + + function vec_all_lt + (A : vector_bool_short; + B : vector_signed_short) return c_int + is + begin + return vcmpgtsh_p (CR6_LT, To_LL_VSS (B), To_LL_VSS (A)); + end vec_all_lt; + + function vec_all_lt + (A : vector_signed_short; + B : vector_bool_short) return c_int + is + begin + return vcmpgtsh_p (CR6_LT, To_LL_VSS (B), To_LL_VSS (A)); + end vec_all_lt; + + function vec_all_lt + (A : vector_signed_short; + B : vector_signed_short) return c_int + is + begin + return vcmpgtsh_p (CR6_LT, To_LL_VSS (B), To_LL_VSS (A)); + end vec_all_lt; + + function vec_all_lt + (A : vector_bool_int; + B : vector_unsigned_int) return c_int + is + begin + return vcmpgtuw_p (CR6_LT, To_LL_VSI (B), To_LL_VSI (A)); + end vec_all_lt; + + function vec_all_lt + (A : vector_unsigned_int; + B : vector_bool_int) return c_int + is + begin + return vcmpgtuw_p (CR6_LT, To_LL_VSI (B), To_LL_VSI (A)); + end vec_all_lt; + + function vec_all_lt + (A : vector_unsigned_int; + B : vector_unsigned_int) return c_int + is + begin + return vcmpgtuw_p (CR6_LT, To_LL_VSI (B), To_LL_VSI (A)); + end vec_all_lt; + + function vec_all_lt + (A : vector_bool_int; + B : vector_signed_int) return c_int + is + begin + return vcmpgtsw_p (CR6_LT, To_LL_VSI (B), To_LL_VSI (A)); + end vec_all_lt; + + function vec_all_lt + (A : vector_signed_int; + B : vector_bool_int) return c_int + is + begin + return vcmpgtsw_p (CR6_LT, To_LL_VSI (B), To_LL_VSI (A)); + end vec_all_lt; + + function vec_all_lt + (A : vector_signed_int; + B : vector_signed_int) return c_int + is + begin + return vcmpgtsw_p (CR6_LT, To_LL_VSI (B), To_LL_VSI (A)); + end vec_all_lt; + + function vec_all_lt + (A : vector_float; + B : vector_float) return c_int + is + begin + return vcmpgtfp_p (CR6_LT, To_LL_VF (B), To_LL_VF (A)); + end vec_all_lt; + + -- vec_all_nan -- + + function vec_all_nan + (A : vector_float) return c_int + is + begin + return vcmpeqfp_p (CR6_EQ, To_LL_VF (A), To_LL_VF (A)); + end vec_all_nan; + + -- vec_all_ne -- + + function vec_all_ne + (A : vector_signed_char; + B : vector_bool_char) return c_int + is + begin + return vcmpequb_p (CR6_EQ, To_LL_VSC (A), To_LL_VSC (B)); + end vec_all_ne; + + function vec_all_ne + (A : vector_signed_char; + B : vector_signed_char) return c_int + is + begin + return vcmpequb_p (CR6_EQ, To_LL_VSC (A), To_LL_VSC (B)); + end vec_all_ne; + + function vec_all_ne + (A : vector_unsigned_char; + B : vector_bool_char) return c_int + is + begin + return vcmpequb_p (CR6_EQ, To_LL_VSC (A), To_LL_VSC (B)); + end vec_all_ne; + + function vec_all_ne + (A : vector_unsigned_char; + B : vector_unsigned_char) return c_int + is + begin + return vcmpequb_p (CR6_EQ, To_LL_VSC (A), To_LL_VSC (B)); + end vec_all_ne; + + function vec_all_ne + (A : vector_bool_char; + B : vector_bool_char) return c_int + is + begin + return vcmpequb_p (CR6_EQ, To_LL_VSC (A), To_LL_VSC (B)); + end vec_all_ne; + + function vec_all_ne + (A : vector_bool_char; + B : vector_unsigned_char) return c_int + is + begin + return vcmpequb_p (CR6_EQ, To_LL_VSC (A), To_LL_VSC (B)); + end vec_all_ne; + + function vec_all_ne + (A : vector_bool_char; + B : vector_signed_char) return c_int + is + begin + return vcmpequb_p (CR6_EQ, To_LL_VSC (A), To_LL_VSC (B)); + end vec_all_ne; + + function vec_all_ne + (A : vector_signed_short; + B : vector_bool_short) return c_int + is + begin + return vcmpequh_p (CR6_EQ, To_LL_VSS (A), To_LL_VSS (B)); + end vec_all_ne; + + function vec_all_ne + (A : vector_signed_short; + B : vector_signed_short) return c_int + is + begin + return vcmpequh_p (CR6_EQ, To_LL_VSS (A), To_LL_VSS (B)); + end vec_all_ne; + + function vec_all_ne + (A : vector_unsigned_short; + B : vector_bool_short) return c_int + is + begin + return vcmpequh_p (CR6_EQ, To_LL_VSS (A), To_LL_VSS (B)); + end vec_all_ne; + + function vec_all_ne + (A : vector_unsigned_short; + B : vector_unsigned_short) return c_int + is + begin + return vcmpequh_p (CR6_EQ, To_LL_VSS (A), To_LL_VSS (B)); + end vec_all_ne; + + function vec_all_ne + (A : vector_bool_short; + B : vector_bool_short) return c_int + is + begin + return vcmpequh_p (CR6_EQ, To_LL_VSS (A), To_LL_VSS (B)); + end vec_all_ne; + + function vec_all_ne + (A : vector_bool_short; + B : vector_unsigned_short) return c_int + is + begin + return vcmpequh_p (CR6_EQ, To_LL_VSS (A), To_LL_VSS (B)); + end vec_all_ne; + + function vec_all_ne + (A : vector_bool_short; + B : vector_signed_short) return c_int + is + begin + return vcmpequh_p (CR6_EQ, To_LL_VSS (A), To_LL_VSS (B)); + end vec_all_ne; + + function vec_all_ne + (A : vector_pixel; + B : vector_pixel) return c_int + is + begin + return vcmpequh_p (CR6_EQ, To_LL_VSS (A), To_LL_VSS (B)); + end vec_all_ne; + + function vec_all_ne + (A : vector_signed_int; + B : vector_bool_int) return c_int + is + begin + return vcmpequw_p (CR6_EQ, To_LL_VSI (A), To_LL_VSI (B)); + end vec_all_ne; + + function vec_all_ne + (A : vector_signed_int; + B : vector_signed_int) return c_int + is + begin + return vcmpequw_p (CR6_EQ, To_LL_VSI (A), To_LL_VSI (B)); + end vec_all_ne; + + function vec_all_ne + (A : vector_unsigned_int; + B : vector_bool_int) return c_int + is + begin + return vcmpequw_p (CR6_EQ, To_LL_VSI (A), To_LL_VSI (B)); + end vec_all_ne; + + function vec_all_ne + (A : vector_unsigned_int; + B : vector_unsigned_int) return c_int + is + begin + return vcmpequw_p (CR6_EQ, To_LL_VSI (A), To_LL_VSI (B)); + end vec_all_ne; + + function vec_all_ne + (A : vector_bool_int; + B : vector_bool_int) return c_int + is + begin + return vcmpequw_p (CR6_EQ, To_LL_VSI (A), To_LL_VSI (B)); + end vec_all_ne; + + function vec_all_ne + (A : vector_bool_int; + B : vector_unsigned_int) return c_int + is + begin + return vcmpequw_p (CR6_EQ, To_LL_VSI (A), To_LL_VSI (B)); + end vec_all_ne; + + function vec_all_ne + (A : vector_bool_int; + B : vector_signed_int) return c_int + is + begin + return vcmpequw_p (CR6_EQ, To_LL_VSI (A), To_LL_VSI (B)); + end vec_all_ne; + + function vec_all_ne + (A : vector_float; + B : vector_float) return c_int + is + begin + return vcmpeqfp_p (CR6_EQ, To_LL_VF (A), To_LL_VF (B)); + end vec_all_ne; + + -- vec_all_nge -- + + function vec_all_nge + (A : vector_float; + B : vector_float) return c_int + is + begin + return vcmpgefp_p (CR6_EQ, To_LL_VF (A), To_LL_VF (B)); + end vec_all_nge; + + -- vec_all_ngt -- + + function vec_all_ngt + (A : vector_float; + B : vector_float) return c_int + is + begin + return vcmpgtfp_p (CR6_EQ, To_LL_VF (A), To_LL_VF (B)); + end vec_all_ngt; + + -- vec_all_nle -- + + function vec_all_nle + (A : vector_float; + B : vector_float) return c_int + is + begin + return vcmpgefp_p (CR6_EQ, To_LL_VF (B), To_LL_VF (A)); + end vec_all_nle; + + -- vec_all_nlt -- + + function vec_all_nlt + (A : vector_float; + B : vector_float) return c_int + is + begin + return vcmpgtfp_p (CR6_EQ, To_LL_VF (B), To_LL_VF (A)); + end vec_all_nlt; + + -- vec_all_numeric -- + + function vec_all_numeric + (A : vector_float) return c_int + is + begin + return vcmpeqfp_p (CR6_LT, To_LL_VF (A), To_LL_VF (A)); + end vec_all_numeric; + + -- vec_any_eq -- + + function vec_any_eq + (A : vector_signed_char; + B : vector_bool_char) return c_int + is + begin + return vcmpequb_p (CR6_EQ_REV, To_LL_VSC (A), To_LL_VSC (B)); + end vec_any_eq; + + function vec_any_eq + (A : vector_signed_char; + B : vector_signed_char) return c_int + is + begin + return vcmpequb_p (CR6_EQ_REV, To_LL_VSC (A), To_LL_VSC (B)); + end vec_any_eq; + + function vec_any_eq + (A : vector_unsigned_char; + B : vector_bool_char) return c_int + is + begin + return vcmpequb_p (CR6_EQ_REV, To_LL_VSC (A), To_LL_VSC (B)); + end vec_any_eq; + + function vec_any_eq + (A : vector_unsigned_char; + B : vector_unsigned_char) return c_int + is + begin + return vcmpequb_p (CR6_EQ_REV, To_LL_VSC (A), To_LL_VSC (B)); + end vec_any_eq; + + function vec_any_eq + (A : vector_bool_char; + B : vector_bool_char) return c_int + is + begin + return vcmpequb_p (CR6_EQ_REV, To_LL_VSC (A), To_LL_VSC (B)); + end vec_any_eq; + + function vec_any_eq + (A : vector_bool_char; + B : vector_unsigned_char) return c_int + is + begin + return vcmpequb_p (CR6_EQ_REV, To_LL_VSC (A), To_LL_VSC (B)); + end vec_any_eq; + + function vec_any_eq + (A : vector_bool_char; + B : vector_signed_char) return c_int + is + begin + return vcmpequb_p (CR6_EQ_REV, To_LL_VSC (A), To_LL_VSC (B)); + end vec_any_eq; + + function vec_any_eq + (A : vector_signed_short; + B : vector_bool_short) return c_int + is + begin + return vcmpequh_p (CR6_EQ_REV, To_LL_VSS (A), To_LL_VSS (B)); + end vec_any_eq; + + function vec_any_eq + (A : vector_signed_short; + B : vector_signed_short) return c_int + is + begin + return vcmpequh_p (CR6_EQ_REV, To_LL_VSS (A), To_LL_VSS (B)); + end vec_any_eq; + + function vec_any_eq + (A : vector_unsigned_short; + B : vector_bool_short) return c_int + is + begin + return vcmpequh_p (CR6_EQ_REV, To_LL_VSS (A), To_LL_VSS (B)); + end vec_any_eq; + + function vec_any_eq + (A : vector_unsigned_short; + B : vector_unsigned_short) return c_int + is + begin + return vcmpequh_p (CR6_EQ_REV, To_LL_VSS (A), To_LL_VSS (B)); + end vec_any_eq; + + function vec_any_eq + (A : vector_bool_short; + B : vector_bool_short) return c_int + is + begin + return vcmpequh_p (CR6_EQ_REV, To_LL_VSS (A), To_LL_VSS (B)); + end vec_any_eq; + + function vec_any_eq + (A : vector_bool_short; + B : vector_unsigned_short) return c_int + is + begin + return vcmpequh_p (CR6_EQ_REV, To_LL_VSS (A), To_LL_VSS (B)); + end vec_any_eq; + + function vec_any_eq + (A : vector_bool_short; + B : vector_signed_short) return c_int + is + begin + return vcmpequh_p (CR6_EQ_REV, To_LL_VSS (A), To_LL_VSS (B)); + end vec_any_eq; + + function vec_any_eq + (A : vector_pixel; + B : vector_pixel) return c_int + is + begin + return vcmpequh_p (CR6_EQ_REV, To_LL_VSS (A), To_LL_VSS (B)); + end vec_any_eq; + + function vec_any_eq + (A : vector_signed_int; + B : vector_bool_int) return c_int + is + begin + return vcmpequw_p (CR6_EQ_REV, To_LL_VSI (A), To_LL_VSI (B)); + end vec_any_eq; + + function vec_any_eq + (A : vector_signed_int; + B : vector_signed_int) return c_int + is + begin + return vcmpequw_p (CR6_EQ_REV, To_LL_VSI (A), To_LL_VSI (B)); + end vec_any_eq; + + function vec_any_eq + (A : vector_unsigned_int; + B : vector_bool_int) return c_int + is + begin + return vcmpequw_p (CR6_EQ_REV, To_LL_VSI (A), To_LL_VSI (B)); + end vec_any_eq; + + function vec_any_eq + (A : vector_unsigned_int; + B : vector_unsigned_int) return c_int + is + begin + return vcmpequw_p (CR6_EQ_REV, To_LL_VSI (A), To_LL_VSI (B)); + end vec_any_eq; + + function vec_any_eq + (A : vector_bool_int; + B : vector_bool_int) return c_int + is + begin + return vcmpequw_p (CR6_EQ_REV, To_LL_VSI (A), To_LL_VSI (B)); + end vec_any_eq; + + function vec_any_eq + (A : vector_bool_int; + B : vector_unsigned_int) return c_int + is + begin + return vcmpequw_p (CR6_EQ_REV, To_LL_VSI (A), To_LL_VSI (B)); + end vec_any_eq; + + function vec_any_eq + (A : vector_bool_int; + B : vector_signed_int) return c_int + is + begin + return vcmpequw_p (CR6_EQ_REV, To_LL_VSI (A), To_LL_VSI (B)); + end vec_any_eq; + + function vec_any_eq + (A : vector_float; + B : vector_float) return c_int + is + begin + return vcmpeqfp_p (CR6_EQ_REV, To_LL_VF (A), To_LL_VF (B)); + end vec_any_eq; + + -- vec_any_ge -- + + function vec_any_ge + (A : vector_signed_char; + B : vector_bool_char) return c_int + is + begin + return vcmpgtub_p (CR6_LT_REV, To_LL_VSC (B), To_LL_VSC (A)); + end vec_any_ge; + + function vec_any_ge + (A : vector_unsigned_char; + B : vector_bool_char) return c_int + is + begin + return vcmpgtub_p (CR6_LT_REV, To_LL_VSC (B), To_LL_VSC (A)); + end vec_any_ge; + + function vec_any_ge + (A : vector_unsigned_char; + B : vector_unsigned_char) return c_int + is + begin + return vcmpgtub_p (CR6_LT_REV, To_LL_VSC (B), To_LL_VSC (A)); + end vec_any_ge; + + function vec_any_ge + (A : vector_signed_char; + B : vector_signed_char) return c_int + is + begin + return vcmpgtsb_p (CR6_LT_REV, To_LL_VSC (B), To_LL_VSC (A)); + end vec_any_ge; + + function vec_any_ge + (A : vector_bool_char; + B : vector_unsigned_char) return c_int + is + begin + return vcmpgtub_p (CR6_LT_REV, To_LL_VSC (B), To_LL_VSC (A)); + end vec_any_ge; + + function vec_any_ge + (A : vector_bool_char; + B : vector_signed_char) return c_int + is + begin + return vcmpgtub_p (CR6_LT_REV, To_LL_VSC (B), To_LL_VSC (A)); + end vec_any_ge; + + function vec_any_ge + (A : vector_unsigned_short; + B : vector_bool_short) return c_int + is + begin + return vcmpgtuh_p (CR6_LT_REV, To_LL_VSS (B), To_LL_VSS (A)); + end vec_any_ge; + + function vec_any_ge + (A : vector_unsigned_short; + B : vector_unsigned_short) return c_int + is + begin + return vcmpgtuh_p (CR6_LT_REV, To_LL_VSS (B), To_LL_VSS (A)); + end vec_any_ge; + + function vec_any_ge + (A : vector_signed_short; + B : vector_signed_short) return c_int + is + begin + return vcmpgtsh_p (CR6_LT_REV, To_LL_VSS (B), To_LL_VSS (A)); + end vec_any_ge; + + function vec_any_ge + (A : vector_signed_short; + B : vector_bool_short) return c_int + is + begin + return vcmpgtsh_p (CR6_LT_REV, To_LL_VSS (B), To_LL_VSS (A)); + end vec_any_ge; + + function vec_any_ge + (A : vector_bool_short; + B : vector_unsigned_short) return c_int + is + begin + return vcmpgtuh_p (CR6_LT_REV, To_LL_VSS (B), To_LL_VSS (A)); + end vec_any_ge; + + function vec_any_ge + (A : vector_bool_short; + B : vector_signed_short) return c_int + is + begin + return vcmpgtuh_p (CR6_LT_REV, To_LL_VSS (B), To_LL_VSS (A)); + end vec_any_ge; + + function vec_any_ge + (A : vector_signed_int; + B : vector_bool_int) return c_int + is + begin + return vcmpgtuw_p (CR6_LT_REV, To_LL_VSI (B), To_LL_VSI (A)); + end vec_any_ge; + + function vec_any_ge + (A : vector_unsigned_int; + B : vector_bool_int) return c_int + is + begin + return vcmpgtuw_p (CR6_LT_REV, To_LL_VSI (B), To_LL_VSI (A)); + end vec_any_ge; + + function vec_any_ge + (A : vector_unsigned_int; + B : vector_unsigned_int) return c_int + is + begin + return vcmpgtuw_p (CR6_LT_REV, To_LL_VSI (B), To_LL_VSI (A)); + end vec_any_ge; + + function vec_any_ge + (A : vector_signed_int; + B : vector_signed_int) return c_int + is + begin + return vcmpgtsw_p (CR6_LT_REV, To_LL_VSI (B), To_LL_VSI (A)); + end vec_any_ge; + + function vec_any_ge + (A : vector_bool_int; + B : vector_unsigned_int) return c_int + is + begin + return vcmpgtuw_p (CR6_LT_REV, To_LL_VSI (B), To_LL_VSI (A)); + end vec_any_ge; + + function vec_any_ge + (A : vector_bool_int; + B : vector_signed_int) return c_int + is + begin + return vcmpgtuw_p (CR6_LT_REV, To_LL_VSI (B), To_LL_VSI (A)); + end vec_any_ge; + + function vec_any_ge + (A : vector_float; + B : vector_float) return c_int + is + begin + return vcmpgefp_p (CR6_EQ_REV, To_LL_VF (A), To_LL_VF (B)); + end vec_any_ge; + + -- vec_any_gt -- + + function vec_any_gt + (A : vector_bool_char; + B : vector_unsigned_char) return c_int + is + begin + return vcmpgtub_p (CR6_EQ_REV, To_LL_VSC (A), To_LL_VSC (B)); + end vec_any_gt; + + function vec_any_gt + (A : vector_unsigned_char; + B : vector_bool_char) return c_int + is + begin + return vcmpgtub_p (CR6_EQ_REV, To_LL_VSC (A), To_LL_VSC (B)); + end vec_any_gt; + + function vec_any_gt + (A : vector_unsigned_char; + B : vector_unsigned_char) return c_int + is + begin + return vcmpgtub_p (CR6_EQ_REV, To_LL_VSC (A), To_LL_VSC (B)); + end vec_any_gt; + + function vec_any_gt + (A : vector_bool_char; + B : vector_signed_char) return c_int + is + begin + return vcmpgtsb_p (CR6_EQ_REV, To_LL_VSC (A), To_LL_VSC (B)); + end vec_any_gt; + + function vec_any_gt + (A : vector_signed_char; + B : vector_bool_char) return c_int + is + begin + return vcmpgtsb_p (CR6_EQ_REV, To_LL_VSC (A), To_LL_VSC (B)); + end vec_any_gt; + + function vec_any_gt + (A : vector_signed_char; + B : vector_signed_char) return c_int + is + begin + return vcmpgtsb_p (CR6_EQ_REV, To_LL_VSC (A), To_LL_VSC (B)); + end vec_any_gt; + + function vec_any_gt + (A : vector_bool_short; + B : vector_unsigned_short) return c_int + is + begin + return vcmpgtuh_p (CR6_EQ_REV, To_LL_VSS (A), To_LL_VSS (B)); + end vec_any_gt; + + function vec_any_gt + (A : vector_unsigned_short; + B : vector_bool_short) return c_int + is + begin + return vcmpgtuh_p (CR6_EQ_REV, To_LL_VSS (A), To_LL_VSS (B)); + end vec_any_gt; + + function vec_any_gt + (A : vector_unsigned_short; + B : vector_unsigned_short) return c_int + is + begin + return vcmpgtuh_p (CR6_EQ_REV, To_LL_VSS (A), To_LL_VSS (B)); + end vec_any_gt; + + function vec_any_gt + (A : vector_bool_short; + B : vector_signed_short) return c_int + is + begin + return vcmpgtsh_p (CR6_EQ_REV, To_LL_VSS (A), To_LL_VSS (B)); + end vec_any_gt; + + function vec_any_gt + (A : vector_signed_short; + B : vector_bool_short) return c_int + is + begin + return vcmpgtsh_p (CR6_EQ_REV, To_LL_VSS (A), To_LL_VSS (B)); + end vec_any_gt; + + function vec_any_gt + (A : vector_signed_short; + B : vector_signed_short) return c_int + is + begin + return vcmpgtsh_p (CR6_EQ_REV, To_LL_VSS (A), To_LL_VSS (B)); + end vec_any_gt; + + function vec_any_gt + (A : vector_bool_int; + B : vector_unsigned_int) return c_int + is + begin + return vcmpgtuw_p (CR6_EQ_REV, To_LL_VSI (A), To_LL_VSI (B)); + end vec_any_gt; + + function vec_any_gt + (A : vector_unsigned_int; + B : vector_bool_int) return c_int + is + begin + return vcmpgtuw_p (CR6_EQ_REV, To_LL_VSI (A), To_LL_VSI (B)); + end vec_any_gt; + + function vec_any_gt + (A : vector_unsigned_int; + B : vector_unsigned_int) return c_int + is + begin + return vcmpgtuw_p (CR6_EQ_REV, To_LL_VSI (A), To_LL_VSI (B)); + end vec_any_gt; + + function vec_any_gt + (A : vector_bool_int; + B : vector_signed_int) return c_int + is + begin + return vcmpgtsw_p (CR6_EQ_REV, To_LL_VSI (A), To_LL_VSI (B)); + end vec_any_gt; + + function vec_any_gt + (A : vector_signed_int; + B : vector_bool_int) return c_int + is + begin + return vcmpgtsw_p (CR6_EQ_REV, To_LL_VSI (A), To_LL_VSI (B)); + end vec_any_gt; + + function vec_any_gt + (A : vector_signed_int; + B : vector_signed_int) return c_int + is + begin + return vcmpgtsw_p (CR6_EQ_REV, To_LL_VSI (A), To_LL_VSI (B)); + end vec_any_gt; + + function vec_any_gt + (A : vector_float; + B : vector_float) return c_int + is + begin + return vcmpgtfp_p (CR6_EQ_REV, To_LL_VF (A), To_LL_VF (B)); + end vec_any_gt; + + -- vec_any_le -- + + function vec_any_le + (A : vector_bool_char; + B : vector_unsigned_char) return c_int + is + begin + return vcmpgtub_p (CR6_LT_REV, To_LL_VSC (A), To_LL_VSC (B)); + end vec_any_le; + + function vec_any_le + (A : vector_unsigned_char; + B : vector_bool_char) return c_int + is + begin + return vcmpgtub_p (CR6_LT_REV, To_LL_VSC (A), To_LL_VSC (B)); + end vec_any_le; + + function vec_any_le + (A : vector_unsigned_char; + B : vector_unsigned_char) return c_int + is + begin + return vcmpgtub_p (CR6_LT_REV, To_LL_VSC (A), To_LL_VSC (B)); + end vec_any_le; + + function vec_any_le + (A : vector_bool_char; + B : vector_signed_char) return c_int + is + begin + return vcmpgtsb_p (CR6_LT_REV, To_LL_VSC (A), To_LL_VSC (B)); + end vec_any_le; + + function vec_any_le + (A : vector_signed_char; + B : vector_bool_char) return c_int + is + begin + return vcmpgtsb_p (CR6_LT_REV, To_LL_VSC (A), To_LL_VSC (B)); + end vec_any_le; + + function vec_any_le + (A : vector_signed_char; + B : vector_signed_char) return c_int + is + begin + return vcmpgtsb_p (CR6_LT_REV, To_LL_VSC (A), To_LL_VSC (B)); + end vec_any_le; + + function vec_any_le + (A : vector_bool_short; + B : vector_unsigned_short) return c_int + is + begin + return vcmpgtuh_p (CR6_LT_REV, To_LL_VSS (A), To_LL_VSS (B)); + end vec_any_le; + + function vec_any_le + (A : vector_unsigned_short; + B : vector_bool_short) return c_int + is + begin + return vcmpgtuh_p (CR6_LT_REV, To_LL_VSS (A), To_LL_VSS (B)); + end vec_any_le; + + function vec_any_le + (A : vector_unsigned_short; + B : vector_unsigned_short) return c_int + is + begin + return vcmpgtuh_p (CR6_LT_REV, To_LL_VSS (A), To_LL_VSS (B)); + end vec_any_le; + + function vec_any_le + (A : vector_bool_short; + B : vector_signed_short) return c_int + is + begin + return vcmpgtsh_p (CR6_LT_REV, To_LL_VSS (A), To_LL_VSS (B)); + end vec_any_le; + + function vec_any_le + (A : vector_signed_short; + B : vector_bool_short) return c_int + is + begin + return vcmpgtsh_p (CR6_LT_REV, To_LL_VSS (A), To_LL_VSS (B)); + end vec_any_le; + + function vec_any_le + (A : vector_signed_short; + B : vector_signed_short) return c_int + is + begin + return vcmpgtsh_p (CR6_LT_REV, To_LL_VSS (A), To_LL_VSS (B)); + end vec_any_le; + + function vec_any_le + (A : vector_bool_int; + B : vector_unsigned_int) return c_int + is + begin + return vcmpgtuw_p (CR6_LT_REV, To_LL_VSI (A), To_LL_VSI (B)); + end vec_any_le; + + function vec_any_le + (A : vector_unsigned_int; + B : vector_bool_int) return c_int + is + begin + return vcmpgtuw_p (CR6_LT_REV, To_LL_VSI (A), To_LL_VSI (B)); + end vec_any_le; + + function vec_any_le + (A : vector_unsigned_int; + B : vector_unsigned_int) return c_int + is + begin + return vcmpgtuw_p (CR6_LT_REV, To_LL_VSI (A), To_LL_VSI (B)); + end vec_any_le; + + function vec_any_le + (A : vector_bool_int; + B : vector_signed_int) return c_int + is + begin + return vcmpgtsw_p (CR6_LT_REV, To_LL_VSI (A), To_LL_VSI (B)); + end vec_any_le; + + function vec_any_le + (A : vector_signed_int; + B : vector_bool_int) return c_int + is + begin + return vcmpgtsw_p (CR6_LT_REV, To_LL_VSI (A), To_LL_VSI (B)); + end vec_any_le; + + function vec_any_le + (A : vector_signed_int; + B : vector_signed_int) return c_int + is + begin + return vcmpgtsw_p (CR6_LT_REV, To_LL_VSI (A), To_LL_VSI (B)); + end vec_any_le; + + function vec_any_le + (A : vector_float; + B : vector_float) return c_int + is + begin + return vcmpgefp_p (CR6_EQ_REV, To_LL_VF (B), To_LL_VF (A)); + end vec_any_le; + + -- vec_any_lt -- + + function vec_any_lt + (A : vector_bool_char; + B : vector_unsigned_char) return c_int + is + begin + return vcmpgtub_p (CR6_EQ_REV, To_LL_VSC (B), To_LL_VSC (A)); + end vec_any_lt; + + function vec_any_lt + (A : vector_unsigned_char; + B : vector_bool_char) return c_int + is + begin + return vcmpgtub_p (CR6_EQ_REV, To_LL_VSC (B), To_LL_VSC (A)); + end vec_any_lt; + + function vec_any_lt + (A : vector_unsigned_char; + B : vector_unsigned_char) return c_int + is + begin + return vcmpgtub_p (CR6_EQ_REV, To_LL_VSC (B), To_LL_VSC (A)); + end vec_any_lt; + + function vec_any_lt + (A : vector_bool_char; + B : vector_signed_char) return c_int + is + begin + return vcmpgtsb_p (CR6_EQ_REV, To_LL_VSC (B), To_LL_VSC (A)); + end vec_any_lt; + + function vec_any_lt + (A : vector_signed_char; + B : vector_bool_char) return c_int + is + begin + return vcmpgtsb_p (CR6_EQ_REV, To_LL_VSC (B), To_LL_VSC (A)); + end vec_any_lt; + + function vec_any_lt + (A : vector_signed_char; + B : vector_signed_char) return c_int + is + begin + return vcmpgtsb_p (CR6_EQ_REV, To_LL_VSC (B), To_LL_VSC (A)); + end vec_any_lt; + + function vec_any_lt + (A : vector_bool_short; + B : vector_unsigned_short) return c_int + is + begin + return vcmpgtuh_p (CR6_EQ_REV, To_LL_VSS (B), To_LL_VSS (A)); + end vec_any_lt; + + function vec_any_lt + (A : vector_unsigned_short; + B : vector_bool_short) return c_int + is + begin + return vcmpgtuh_p (CR6_EQ_REV, To_LL_VSS (B), To_LL_VSS (A)); + end vec_any_lt; + + function vec_any_lt + (A : vector_unsigned_short; + B : vector_unsigned_short) return c_int + is + begin + return vcmpgtuh_p (CR6_EQ_REV, To_LL_VSS (B), To_LL_VSS (A)); + end vec_any_lt; + + function vec_any_lt + (A : vector_bool_short; + B : vector_signed_short) return c_int + is + begin + return vcmpgtsh_p (CR6_EQ_REV, To_LL_VSS (B), To_LL_VSS (A)); + end vec_any_lt; + + function vec_any_lt + (A : vector_signed_short; + B : vector_bool_short) return c_int + is + begin + return vcmpgtsh_p (CR6_EQ_REV, To_LL_VSS (B), To_LL_VSS (A)); + end vec_any_lt; + + function vec_any_lt + (A : vector_signed_short; + B : vector_signed_short) return c_int + is + begin + return vcmpgtsh_p (CR6_EQ_REV, To_LL_VSS (B), To_LL_VSS (A)); + end vec_any_lt; + + function vec_any_lt + (A : vector_bool_int; + B : vector_unsigned_int) return c_int + is + begin + return vcmpgtuw_p (CR6_EQ_REV, To_LL_VSI (B), To_LL_VSI (A)); + end vec_any_lt; + + function vec_any_lt + (A : vector_unsigned_int; + B : vector_bool_int) return c_int + is + begin + return vcmpgtuw_p (CR6_EQ_REV, To_LL_VSI (B), To_LL_VSI (A)); + end vec_any_lt; + + function vec_any_lt + (A : vector_unsigned_int; + B : vector_unsigned_int) return c_int + is + begin + return vcmpgtuw_p (CR6_EQ_REV, To_LL_VSI (B), To_LL_VSI (A)); + end vec_any_lt; + + function vec_any_lt + (A : vector_bool_int; + B : vector_signed_int) return c_int + is + begin + return vcmpgtsw_p (CR6_EQ_REV, To_LL_VSI (B), To_LL_VSI (A)); + end vec_any_lt; + + function vec_any_lt + (A : vector_signed_int; + B : vector_bool_int) return c_int + is + begin + return vcmpgtsw_p (CR6_EQ_REV, To_LL_VSI (B), To_LL_VSI (A)); + end vec_any_lt; + + function vec_any_lt + (A : vector_signed_int; + B : vector_signed_int) return c_int + is + begin + return vcmpgtsw_p (CR6_EQ_REV, To_LL_VSI (B), To_LL_VSI (A)); + end vec_any_lt; + + function vec_any_lt + (A : vector_float; + B : vector_float) return c_int + is + begin + return vcmpgtfp_p (CR6_EQ_REV, To_LL_VF (B), To_LL_VF (A)); + end vec_any_lt; + + -- vec_any_nan -- + + function vec_any_nan + (A : vector_float) return c_int + is + begin + return vcmpeqfp_p (CR6_LT_REV, To_LL_VF (A), To_LL_VF (A)); + end vec_any_nan; + + -- vec_any_ne -- + + function vec_any_ne + (A : vector_signed_char; + B : vector_bool_char) return c_int + is + begin + return vcmpequb_p (CR6_LT_REV, To_LL_VSC (A), To_LL_VSC (B)); + end vec_any_ne; + + function vec_any_ne + (A : vector_signed_char; + B : vector_signed_char) return c_int + is + begin + return vcmpequb_p (CR6_LT_REV, To_LL_VSC (A), To_LL_VSC (B)); + end vec_any_ne; + + function vec_any_ne + (A : vector_unsigned_char; + B : vector_bool_char) return c_int + is + begin + return vcmpequb_p (CR6_LT_REV, To_LL_VSC (A), To_LL_VSC (B)); + end vec_any_ne; + + function vec_any_ne + (A : vector_unsigned_char; + B : vector_unsigned_char) return c_int + is + begin + return vcmpequb_p (CR6_LT_REV, To_LL_VSC (A), To_LL_VSC (B)); + end vec_any_ne; + + function vec_any_ne + (A : vector_bool_char; + B : vector_bool_char) return c_int + is + begin + return vcmpequb_p (CR6_LT_REV, To_LL_VSC (A), To_LL_VSC (B)); + end vec_any_ne; + + function vec_any_ne + (A : vector_bool_char; + B : vector_unsigned_char) return c_int + is + begin + return vcmpequb_p (CR6_LT_REV, To_LL_VSC (A), To_LL_VSC (B)); + end vec_any_ne; + + function vec_any_ne + (A : vector_bool_char; + B : vector_signed_char) return c_int + is + begin + return vcmpequb_p (CR6_LT_REV, To_LL_VSC (A), To_LL_VSC (B)); + end vec_any_ne; + + function vec_any_ne + (A : vector_signed_short; + B : vector_bool_short) return c_int + is + begin + return vcmpequh_p (CR6_LT_REV, To_LL_VSS (A), To_LL_VSS (B)); + end vec_any_ne; + + function vec_any_ne + (A : vector_signed_short; + B : vector_signed_short) return c_int + is + begin + return vcmpequh_p (CR6_LT_REV, To_LL_VSS (A), To_LL_VSS (B)); + end vec_any_ne; + + function vec_any_ne + (A : vector_unsigned_short; + B : vector_bool_short) return c_int + is + begin + return vcmpequh_p (CR6_LT_REV, To_LL_VSS (A), To_LL_VSS (B)); + end vec_any_ne; + + function vec_any_ne + (A : vector_unsigned_short; + B : vector_unsigned_short) return c_int + is + begin + return vcmpequh_p (CR6_LT_REV, To_LL_VSS (A), To_LL_VSS (B)); + end vec_any_ne; + + function vec_any_ne + (A : vector_bool_short; + B : vector_bool_short) return c_int + is + begin + return vcmpequh_p (CR6_LT_REV, To_LL_VSS (A), To_LL_VSS (B)); + end vec_any_ne; + + function vec_any_ne + (A : vector_bool_short; + B : vector_unsigned_short) return c_int + is + begin + return vcmpequh_p (CR6_LT_REV, To_LL_VSS (A), To_LL_VSS (B)); + end vec_any_ne; + + function vec_any_ne + (A : vector_bool_short; + B : vector_signed_short) return c_int + is + begin + return vcmpequh_p (CR6_LT_REV, To_LL_VSS (A), To_LL_VSS (B)); + end vec_any_ne; + + function vec_any_ne + (A : vector_pixel; + B : vector_pixel) return c_int + is + begin + return vcmpequh_p (CR6_LT_REV, To_LL_VSS (A), To_LL_VSS (B)); + end vec_any_ne; + + function vec_any_ne + (A : vector_signed_int; + B : vector_bool_int) return c_int + is + begin + return vcmpequw_p (CR6_LT_REV, To_LL_VSI (A), To_LL_VSI (B)); + end vec_any_ne; + + function vec_any_ne + (A : vector_signed_int; + B : vector_signed_int) return c_int + is + begin + return vcmpequw_p (CR6_LT_REV, To_LL_VSI (A), To_LL_VSI (B)); + end vec_any_ne; + + function vec_any_ne + (A : vector_unsigned_int; + B : vector_bool_int) return c_int + is + begin + return vcmpequw_p (CR6_LT_REV, To_LL_VSI (A), To_LL_VSI (B)); + end vec_any_ne; + + function vec_any_ne + (A : vector_unsigned_int; + B : vector_unsigned_int) return c_int + is + begin + return vcmpequw_p (CR6_LT_REV, To_LL_VSI (A), To_LL_VSI (B)); + end vec_any_ne; + + function vec_any_ne + (A : vector_bool_int; + B : vector_bool_int) return c_int + is + begin + return vcmpequw_p (CR6_LT_REV, To_LL_VSI (A), To_LL_VSI (B)); + end vec_any_ne; + + function vec_any_ne + (A : vector_bool_int; + B : vector_unsigned_int) return c_int + is + begin + return vcmpequw_p (CR6_LT_REV, To_LL_VSI (A), To_LL_VSI (B)); + end vec_any_ne; + + function vec_any_ne + (A : vector_bool_int; + B : vector_signed_int) return c_int + is + begin + return vcmpequw_p (CR6_LT_REV, To_LL_VSI (A), To_LL_VSI (B)); + end vec_any_ne; + + function vec_any_ne + (A : vector_float; + B : vector_float) return c_int + is + begin + return vcmpeqfp_p (CR6_LT_REV, To_LL_VF (A), To_LL_VF (B)); + end vec_any_ne; + + -- vec_any_nge -- + + function vec_any_nge + (A : vector_float; + B : vector_float) return c_int + is + begin + return vcmpgefp_p (CR6_LT_REV, To_LL_VF (A), To_LL_VF (B)); + end vec_any_nge; + + -- vec_any_ngt -- + + function vec_any_ngt + (A : vector_float; + B : vector_float) return c_int + is + begin + return vcmpgtfp_p (CR6_LT_REV, To_LL_VF (A), To_LL_VF (B)); + end vec_any_ngt; + + -- vec_any_nle -- + + function vec_any_nle + (A : vector_float; + B : vector_float) return c_int + is + begin + return vcmpgefp_p (CR6_LT_REV, To_LL_VF (B), To_LL_VF (A)); + end vec_any_nle; + + -- vec_any_nlt -- + + function vec_any_nlt + (A : vector_float; + B : vector_float) return c_int + is + begin + return vcmpgtfp_p (CR6_LT_REV, To_LL_VF (B), To_LL_VF (A)); + end vec_any_nlt; + + -- vec_any_numeric -- + + function vec_any_numeric + (A : vector_float) return c_int + is + begin + return vcmpeqfp_p (CR6_EQ_REV, To_LL_VF (A), To_LL_VF (A)); + end vec_any_numeric; + + -- vec_any_out -- + + function vec_any_out + (A : vector_float; + B : vector_float) return c_int + is + begin + return vcmpbfp_p (CR6_EQ_REV, To_LL_VF (A), To_LL_VF (B)); + end vec_any_out; + + -- vec_step -- + + function vec_step + (V : vector_unsigned_char) return Integer + is + pragma Unreferenced (V); + begin + return 16; + end vec_step; + + function vec_step + (V : vector_signed_char) return Integer + is + pragma Unreferenced (V); + begin + return 16; + end vec_step; + + function vec_step + (V : vector_bool_char) return Integer + is + pragma Unreferenced (V); + begin + return 16; + end vec_step; + + function vec_step + (V : vector_unsigned_short) return Integer + is + pragma Unreferenced (V); + begin + return 8; + end vec_step; + + function vec_step + (V : vector_signed_short) return Integer + is + pragma Unreferenced (V); + begin + return 8; + end vec_step; + + function vec_step + (V : vector_bool_short) return Integer + is + pragma Unreferenced (V); + begin + return 8; + end vec_step; + + function vec_step + (V : vector_unsigned_int) return Integer + is + pragma Unreferenced (V); + begin + return 4; + end vec_step; + + function vec_step + (V : vector_signed_int) return Integer + is + pragma Unreferenced (V); + begin + return 4; + end vec_step; + + function vec_step + (V : vector_bool_int) return Integer + is + pragma Unreferenced (V); + begin + return 4; + end vec_step; + + function vec_step + (V : vector_float) return Integer + is + pragma Unreferenced (V); + begin + return 4; + end vec_step; + + function vec_step + (V : vector_pixel) return Integer + is + pragma Unreferenced (V); + begin + return 4; + end vec_step; + +end GNAT.Altivec.Vector_Operations; diff --git a/gcc/ada/g-alveop.ads b/gcc/ada/g-alveop.ads new file mode 100644 index 00000000000..7e77d7f48f1 --- /dev/null +++ b/gcc/ada/g-alveop.ads @@ -0,0 +1,8105 @@ +------------------------------------------------------------------------------ +-- -- +-- GNAT COMPILER COMPONENTS -- +-- -- +-- G N A T . A L T I V E C . V E C T O R _ O P E R A T I O N S -- +-- -- +-- S p e c -- +-- -- +-- Copyright (C) 2004-2005, Free Software Foundation, Inc. -- +-- -- +-- GNAT is free software; you can redistribute it and/or modify it under -- +-- terms of the GNU General Public License as published by the Free Soft- -- +-- ware Foundation; either version 2, or (at your option) any later ver- -- +-- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- +-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- +-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- +-- for more details. You should have received a copy of the GNU General -- +-- Public License distributed with GNAT; see 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 other files instantiate generics from this -- +-- unit, or you link this unit with other files to produce an executable, -- +-- this unit 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 Public License. -- +-- -- +-- GNAT was originally developed by the GNAT team at New York University. -- +-- Extensive contributions were provided by Ada Core Technologies Inc. -- +-- -- +------------------------------------------------------------------------------ + +-- This unit is the user-level Ada interface to AltiVec operations on vector +-- objects. It is common to both the Soft and the Hard bindings. + +with GNAT.Altivec.Vector_Types; use GNAT.Altivec.Vector_Types; +with GNAT.Altivec.Low_Level_Interface; use GNAT.Altivec.Low_Level_Interface; + +package GNAT.Altivec.Vector_Operations is + + -- The vast majority of the operations exposed here are overloads over a + -- much smaller set of low level primitives with type conversions around. + -- + -- In some cases, a direct binding without any intermediate body is + -- possible or even even mandatory for technical reasons. What we provide + -- here for such cases are renamings of straight imports exposed by + -- Altivec.Low_Level_Interface. See the comments in the private part for + -- additional details. + + ------------------------------------------------------- + -- [PIM-4.4 Generic and Specific AltiVec operations] -- + ------------------------------------------------------- + + -- vec_abs -- + + function vec_abs + (A : vector_signed_char) return vector_signed_char; + + function vec_abs + (A : vector_signed_short) return vector_signed_short; + + function vec_abs + (A : vector_signed_int) return vector_signed_int; + + function vec_abs + (A : vector_float) return vector_float; + + -- vec_abss -- + + function vec_abss + (A : vector_signed_char) return vector_signed_char; + + function vec_abss + (A : vector_signed_short) return vector_signed_short; + + function vec_abss + (A : vector_signed_int) return vector_signed_int; + + -- vec_add -- + + function vec_add + (A : vector_bool_char; + B : vector_signed_char) return vector_signed_char; + + function vec_add + (A : vector_signed_char; + B : vector_bool_char) return vector_signed_char; + + function vec_add + (A : vector_signed_char; + B : vector_signed_char) return vector_signed_char; + + function vec_add + (A : vector_bool_char; + B : vector_unsigned_char) return vector_unsigned_char; + + function vec_add + (A : vector_unsigned_char; + B : vector_bool_char) return vector_unsigned_char; + + function vec_add + (A : vector_unsigned_char; + B : vector_unsigned_char) return vector_unsigned_char; + + function vec_add + (A : vector_bool_short; + B : vector_signed_short) return vector_signed_short; + + function vec_add + (A : vector_signed_short; + B : vector_bool_short) return vector_signed_short; + + function vec_add + (A : vector_signed_short; + B : vector_signed_short) return vector_signed_short; + + function vec_add + (A : vector_bool_short; + B : vector_unsigned_short) return vector_unsigned_short; + + function vec_add + (A : vector_unsigned_short; + B : vector_bool_short) return vector_unsigned_short; + + function vec_add + (A : vector_unsigned_short; + B : vector_unsigned_short) return vector_unsigned_short; + + function vec_add + (A : vector_bool_int; + B : vector_signed_int) return vector_signed_int; + + function vec_add + (A : vector_signed_int; + B : vector_bool_int) return vector_signed_int; + + function vec_add + (A : vector_signed_int; + B : vector_signed_int) return vector_signed_int; + + function vec_add + (A : vector_bool_int; + B : vector_unsigned_int) return vector_unsigned_int; + + function vec_add + (A : vector_unsigned_int; + B : vector_bool_int) return vector_unsigned_int; + + function vec_add + (A : vector_unsigned_int; + B : vector_unsigned_int) return vector_unsigned_int; + + function vec_add + (A : vector_float; + B : vector_float) return vector_float; + + -- vec_vaddfp -- + + function vec_vaddfp + (A : vector_float; + B : vector_float) return vector_float; + + -- vec_vadduwm -- + + function vec_vadduwm + (A : vector_bool_int; + B : vector_signed_int) return vector_signed_int; + + function vec_vadduwm + (A : vector_signed_int; + B : vector_bool_int) return vector_signed_int; + + function vec_vadduwm + (A : vector_signed_int; + B : vector_signed_int) return vector_signed_int; + + function vec_vadduwm + (A : vector_bool_int; + B : vector_unsigned_int) return vector_unsigned_int; + + function vec_vadduwm + (A : vector_unsigned_int; + B : vector_bool_int) return vector_unsigned_int; + + function vec_vadduwm + (A : vector_unsigned_int; + B : vector_unsigned_int) return vector_unsigned_int; + + -- vec_vadduhm -- + + function vec_vadduhm + (A : vector_bool_short; + B : vector_signed_short) return vector_signed_short; + + function vec_vadduhm + (A : vector_signed_short; + B : vector_bool_short) return vector_signed_short; + + function vec_vadduhm + (A : vector_signed_short; + B : vector_signed_short) return vector_signed_short; + + function vec_vadduhm + (A : vector_bool_short; + B : vector_unsigned_short) return vector_unsigned_short; + + function vec_vadduhm + (A : vector_unsigned_short; + B : vector_bool_short) return vector_unsigned_short; + + function vec_vadduhm + (A : vector_unsigned_short; + B : vector_unsigned_short) return vector_unsigned_short; + + -- vec_vaddubm -- + + function vec_vaddubm + (A : vector_bool_char; + B : vector_signed_char) return vector_signed_char; + + function vec_vaddubm + (A : vector_signed_char; + B : vector_bool_char) return vector_signed_char; + + function vec_vaddubm + (A : vector_signed_char; + B : vector_signed_char) return vector_signed_char; + + function vec_vaddubm + (A : vector_bool_char; + B : vector_unsigned_char) return vector_unsigned_char; + + function vec_vaddubm + (A : vector_unsigned_char; + B : vector_bool_char) return vector_unsigned_char; + + function vec_vaddubm + (A : vector_unsigned_char; + B : vector_unsigned_char) return vector_unsigned_char; + + -- vec_addc -- + + function vec_addc + (A : vector_unsigned_int; + B : vector_unsigned_int) return vector_unsigned_int; + + -- vec_adds -- + + function vec_adds + (A : vector_bool_char; + B : vector_unsigned_char) return vector_unsigned_char; + + function vec_adds + (A : vector_unsigned_char; + B : vector_bool_char) return vector_unsigned_char; + + function vec_adds + (A : vector_unsigned_char; + B : vector_unsigned_char) return vector_unsigned_char; + + function vec_adds + (A : vector_bool_char; + B : vector_signed_char) return vector_signed_char; + + function vec_adds + (A : vector_signed_char; + B : vector_bool_char) return vector_signed_char; + + function vec_adds + (A : vector_signed_char; + B : vector_signed_char) return vector_signed_char; + + function vec_adds + (A : vector_bool_short; + B : vector_unsigned_short) return vector_unsigned_short; + + function vec_adds + (A : vector_unsigned_short; + B : vector_bool_short) return vector_unsigned_short; + + function vec_adds + (A : vector_unsigned_short; + B : vector_unsigned_short) return vector_unsigned_short; + + function vec_adds + (A : vector_bool_short; + B : vector_signed_short) return vector_signed_short; + + function vec_adds + (A : vector_signed_short; + B : vector_bool_short) return vector_signed_short; + + function vec_adds + (A : vector_signed_short; + B : vector_signed_short) return vector_signed_short; + + function vec_adds + (A : vector_bool_int; + B : vector_unsigned_int) return vector_unsigned_int; + + function vec_adds + (A : vector_unsigned_int; + B : vector_bool_int) return vector_unsigned_int; + + function vec_adds + (A : vector_unsigned_int; + B : vector_unsigned_int) return vector_unsigned_int; + + function vec_adds + (A : vector_bool_int; + B : vector_signed_int) return vector_signed_int; + + function vec_adds + (A : vector_signed_int; + B : vector_bool_int) return vector_signed_int; + + function vec_adds + (A : vector_signed_int; + B : vector_signed_int) return vector_signed_int; + + -- vec_vaddsws -- + + function vec_vaddsws + (A : vector_bool_int; + B : vector_signed_int) return vector_signed_int; + + function vec_vaddsws + (A : vector_signed_int; + B : vector_bool_int) return vector_signed_int; + + function vec_vaddsws + (A : vector_signed_int; + B : vector_signed_int) return vector_signed_int; + + -- vec_vadduws -- + + function vec_vadduws + (A : vector_bool_int; + B : vector_unsigned_int) return vector_unsigned_int; + + function vec_vadduws + (A : vector_unsigned_int; + B : vector_bool_int) return vector_unsigned_int; + + function vec_vadduws + (A : vector_unsigned_int; + B : vector_unsigned_int) return vector_unsigned_int; + + -- vec_vaddshs -- + + function vec_vaddshs + (A : vector_bool_short; + B : vector_signed_short) return vector_signed_short; + + function vec_vaddshs + (A : vector_signed_short; + B : vector_bool_short) return vector_signed_short; + + function vec_vaddshs + (A : vector_signed_short; + B : vector_signed_short) return vector_signed_short; + + -- vec_vadduhs -- + + function vec_vadduhs + (A : vector_bool_short; + B : vector_unsigned_short) return vector_unsigned_short; + + function vec_vadduhs + (A : vector_unsigned_short; + B : vector_bool_short) return vector_unsigned_short; + + function vec_vadduhs + (A : vector_unsigned_short; + B : vector_unsigned_short) return vector_unsigned_short; + + -- vec_vaddsbs -- + + function vec_vaddsbs + (A : vector_bool_char; + B : vector_signed_char) return vector_signed_char; + + function vec_vaddsbs + (A : vector_signed_char; + B : vector_bool_char) return vector_signed_char; + + function vec_vaddsbs + (A : vector_signed_char; + B : vector_signed_char) return vector_signed_char; + + -- vec_vaddubs -- + + function vec_vaddubs + (A : vector_bool_char; + B : vector_unsigned_char) return vector_unsigned_char; + + function vec_vaddubs + (A : vector_unsigned_char; + B : vector_bool_char) return vector_unsigned_char; + + function vec_vaddubs + (A : vector_unsigned_char; + B : vector_unsigned_char) return vector_unsigned_char; + + -- vec_and -- + + function vec_and + (A : vector_float; + B : vector_float) return vector_float; + + function vec_and + (A : vector_float; + B : vector_bool_int) return vector_float; + + function vec_and + (A : vector_bool_int; + B : vector_float) return vector_float; + + function vec_and + (A : vector_bool_int; + B : vector_bool_int) return vector_bool_int; + + function vec_and + (A : vector_bool_int; + B : vector_signed_int) return vector_signed_int; + + function vec_and + (A : vector_signed_int; + B : vector_bool_int) return vector_signed_int; + + function vec_and + (A : vector_signed_int; + B : vector_signed_int) return vector_signed_int; + + function vec_and + (A : vector_bool_int; + B : vector_unsigned_int) return vector_unsigned_int; + + function vec_and + (A : vector_unsigned_int; + B : vector_bool_int) return vector_unsigned_int; + + function vec_and + (A : vector_unsigned_int; + B : vector_unsigned_int) return vector_unsigned_int; + + function vec_and + (A : vector_bool_short; + B : vector_bool_short) return vector_bool_short; + + function vec_and + (A : vector_bool_short; + B : vector_signed_short) return vector_signed_short; + + function vec_and + (A : vector_signed_short; + B : vector_bool_short) return vector_signed_short; + + function vec_and + (A : vector_signed_short; + B : vector_signed_short) return vector_signed_short; + + function vec_and + (A : vector_bool_short; + B : vector_unsigned_short) return vector_unsigned_short; + + function vec_and + (A : vector_unsigned_short; + B : vector_bool_short) return vector_unsigned_short; + + function vec_and + (A : vector_unsigned_short; + B : vector_unsigned_short) return vector_unsigned_short; + + function vec_and + (A : vector_bool_char; + B : vector_signed_char) return vector_signed_char; + + function vec_and + (A : vector_bool_char; + B : vector_bool_char) return vector_bool_char; + + function vec_and + (A : vector_signed_char; + B : vector_bool_char) return vector_signed_char; + + function vec_and + (A : vector_signed_char; + B : vector_signed_char) return vector_signed_char; + + function vec_and + (A : vector_bool_char; + B : vector_unsigned_char) return vector_unsigned_char; + + function vec_and + (A : vector_unsigned_char; + B : vector_bool_char) return vector_unsigned_char; + + function vec_and + (A : vector_unsigned_char; + B : vector_unsigned_char) return vector_unsigned_char; + + -- vec_andc -- + + function vec_andc + (A : vector_float; + B : vector_float) return vector_float; + + function vec_andc + (A : vector_float; + B : vector_bool_int) return vector_float; + + function vec_andc + (A : vector_bool_int; + B : vector_float) return vector_float; + + function vec_andc + (A : vector_bool_int; + B : vector_bool_int) return vector_bool_int; + + function vec_andc + (A : vector_bool_int; + B : vector_signed_int) return vector_signed_int; + + function vec_andc + (A : vector_signed_int; + B : vector_bool_int) return vector_signed_int; + + function vec_andc + (A : vector_signed_int; + B : vector_signed_int) return vector_signed_int; + + function vec_andc + (A : vector_bool_int; + B : vector_unsigned_int) return vector_unsigned_int; + + function vec_andc + (A : vector_unsigned_int; + B : vector_bool_int) return vector_unsigned_int; + + function vec_andc + (A : vector_unsigned_int; + B : vector_unsigned_int) return vector_unsigned_int; + + function vec_andc + (A : vector_bool_short; + B : vector_bool_short) return vector_bool_short; + + function vec_andc + (A : vector_bool_short; + B : vector_signed_short) return vector_signed_short; + + function vec_andc + (A : vector_signed_short; + B : vector_bool_short) return vector_signed_short; + + function vec_andc + (A : vector_signed_short; + B : vector_signed_short) return vector_signed_short; + + function vec_andc + (A : vector_bool_short; + B : vector_unsigned_short) return vector_unsigned_short; + + function vec_andc + (A : vector_unsigned_short; + B : vector_bool_short) return vector_unsigned_short; + + function vec_andc + (A : vector_unsigned_short; + B : vector_unsigned_short) return vector_unsigned_short; + + function vec_andc + (A : vector_bool_char; + B : vector_signed_char) return vector_signed_char; + + function vec_andc + (A : vector_bool_char; + B : vector_bool_char) return vector_bool_char; + + function vec_andc + (A : vector_signed_char; + B : vector_bool_char) return vector_signed_char; + + function vec_andc + (A : vector_signed_char; + B : vector_signed_char) return vector_signed_char; + + function vec_andc + (A : vector_bool_char; + B : vector_unsigned_char) return vector_unsigned_char; + + function vec_andc + (A : vector_unsigned_char; + B : vector_bool_char) return vector_unsigned_char; + + function vec_andc + (A : vector_unsigned_char; + B : vector_unsigned_char) return vector_unsigned_char; + + -- vec_avg -- + + function vec_avg + (A : vector_unsigned_char; + B : vector_unsigned_char) return vector_unsigned_char; + + function vec_avg + (A : vector_signed_char; + B : vector_signed_char) return vector_signed_char; + + function vec_avg + (A : vector_unsigned_short; + B : vector_unsigned_short) return vector_unsigned_short; + + function vec_avg + (A : vector_signed_short; + B : vector_signed_short) return vector_signed_short; + + function vec_avg + (A : vector_unsigned_int; + B : vector_unsigned_int) return vector_unsigned_int; + + function vec_avg + (A : vector_signed_int; + B : vector_signed_int) return vector_signed_int; + + -- vec_vavgsw -- + + function vec_vavgsw + (A : vector_signed_int; + B : vector_signed_int) return vector_signed_int; + + -- vec_vavguw -- + + function vec_vavguw + (A : vector_unsigned_int; + B : vector_unsigned_int) return vector_unsigned_int; + + -- vec_vavgsh -- + + function vec_vavgsh + (A : vector_signed_short; + B : vector_signed_short) return vector_signed_short; + + -- vec_vavguh -- + + function vec_vavguh + (A : vector_unsigned_short; + B : vector_unsigned_short) return vector_unsigned_short; + + -- vec_vavgsb -- + + function vec_vavgsb + (A : vector_signed_char; + B : vector_signed_char) return vector_signed_char; + + -- vec_vavgub -- + + function vec_vavgub + (A : vector_unsigned_char; + B : vector_unsigned_char) return vector_unsigned_char; + + -- vec_ceil -- + + function vec_ceil + (A : vector_float) return vector_float; + + -- vec_cmpb -- + + function vec_cmpb + (A : vector_float; + B : vector_float) return vector_signed_int; + + -- vec_cmpeq -- + + function vec_cmpeq + (A : vector_signed_char; + B : vector_signed_char) return vector_bool_char; + + function vec_cmpeq + (A : vector_unsigned_char; + B : vector_unsigned_char) return vector_bool_char; + + function vec_cmpeq + (A : vector_signed_short; + B : vector_signed_short) return vector_bool_short; + + function vec_cmpeq + (A : vector_unsigned_short; + B : vector_unsigned_short) return vector_bool_short; + + function vec_cmpeq + (A : vector_signed_int; + B : vector_signed_int) return vector_bool_int; + + function vec_cmpeq + (A : vector_unsigned_int; + B : vector_unsigned_int) return vector_bool_int; + + function vec_cmpeq + (A : vector_float; + B : vector_float) return vector_bool_int; + + -- vec_vcmpeqfp -- + + function vec_vcmpeqfp + (A : vector_float; + B : vector_float) return vector_bool_int; + + -- vec_vcmpequw -- + + function vec_vcmpequw + (A : vector_signed_int; + B : vector_signed_int) return vector_bool_int; + + function vec_vcmpequw + (A : vector_unsigned_int; + B : vector_unsigned_int) return vector_bool_int; + + -- vec_vcmpequh -- + + function vec_vcmpequh + (A : vector_signed_short; + B : vector_signed_short) return vector_bool_short; + + function vec_vcmpequh + (A : vector_unsigned_short; + B : vector_unsigned_short) return vector_bool_short; + + -- vec_vcmpequb -- + + function vec_vcmpequb + (A : vector_signed_char; + B : vector_signed_char) return vector_bool_char; + + function vec_vcmpequb + (A : vector_unsigned_char; + B : vector_unsigned_char) return vector_bool_char; + + -- vec_cmpge -- + + function vec_cmpge + (A : vector_float; + B : vector_float) return vector_bool_int; + + -- vec_cmpgt -- + + function vec_cmpgt + (A : vector_unsigned_char; + B : vector_unsigned_char) return vector_bool_char; + + function vec_cmpgt + (A : vector_signed_char; + B : vector_signed_char) return vector_bool_char; + + function vec_cmpgt + (A : vector_unsigned_short; + B : vector_unsigned_short) return vector_bool_short; + + function vec_cmpgt + (A : vector_signed_short; + B : vector_signed_short) return vector_bool_short; + + function vec_cmpgt + (A : vector_unsigned_int; + B : vector_unsigned_int) return vector_bool_int; + + function vec_cmpgt + (A : vector_signed_int; + B : vector_signed_int) return vector_bool_int; + + function vec_cmpgt + (A : vector_float; + B : vector_float) return vector_bool_int; + + -- vec_vcmpgtfp -- + + function vec_vcmpgtfp + (A : vector_float; + B : vector_float) return vector_bool_int; + + -- vec_vcmpgtsw -- + + function vec_vcmpgtsw + (A : vector_signed_int; + B : vector_signed_int) return vector_bool_int; + + -- vec_vcmpgtuw -- + + function vec_vcmpgtuw + (A : vector_unsigned_int; + B : vector_unsigned_int) return vector_bool_int; + + -- vec_vcmpgtsh -- + + function vec_vcmpgtsh + (A : vector_signed_short; + B : vector_signed_short) return vector_bool_short; + + -- vec_vcmpgtuh -- + + function vec_vcmpgtuh + (A : vector_unsigned_short; + B : vector_unsigned_short) return vector_bool_short; + + -- vec_vcmpgtsb -- + + function vec_vcmpgtsb + (A : vector_signed_char; + B : vector_signed_char) return vector_bool_char; + + -- vec_vcmpgtub -- + + function vec_vcmpgtub + (A : vector_unsigned_char; + B : vector_unsigned_char) return vector_bool_char; + + -- vec_cmple -- + + function vec_cmple + (A : vector_float; + B : vector_float) return vector_bool_int; + + -- vec_cmplt -- + + function vec_cmplt + (A : vector_unsigned_char; + B : vector_unsigned_char) return vector_bool_char; + + function vec_cmplt + (A : vector_signed_char; + B : vector_signed_char) return vector_bool_char; + + function vec_cmplt + (A : vector_unsigned_short; + B : vector_unsigned_short) return vector_bool_short; + + function vec_cmplt + (A : vector_signed_short; + B : vector_signed_short) return vector_bool_short; + + function vec_cmplt + (A : vector_unsigned_int; + B : vector_unsigned_int) return vector_bool_int; + + function vec_cmplt + (A : vector_signed_int; + B : vector_signed_int) return vector_bool_int; + + function vec_cmplt + (A : vector_float; + B : vector_float) return vector_bool_int; + + -- vec_ctf -- + + function vec_ctf + (A : vector_unsigned_int; + B : c_int) return vector_float + renames Low_Level_Interface.vec_ctf_vui_cint_r_vf; + + function vec_ctf + (A : vector_signed_int; + B : c_int) return vector_float + renames Low_Level_Interface.vec_ctf_vsi_cint_r_vf; + + -- vec_vcfsx -- + + function vec_vcfsx + (A : vector_signed_int; + B : c_int) return vector_float + renames Low_Level_Interface.vec_vcfsx_vsi_cint_r_vf; + + -- vec_vcfux -- + + function vec_vcfux + (A : vector_unsigned_int; + B : c_int) return vector_float + renames Low_Level_Interface.vec_vcfux_vui_cint_r_vf; + + -- vec_cts -- + + function vec_cts + (A : vector_float; + B : c_int) return vector_signed_int + renames Low_Level_Interface.vec_cts_vf_cint_r_vsi; + + -- vec_ctu -- + + function vec_ctu + (A : vector_float; + B : c_int) return vector_unsigned_int + renames Low_Level_Interface.vec_ctu_vf_cint_r_vui; + + -- vec_dss -- + + procedure vec_dss + (A : c_int) + renames Low_Level_Interface.vec_dss_cint; + + -- vec_dssall -- + + procedure vec_dssall + renames Low_Level_Interface.vec_dssall; + + -- vec_dst -- + + procedure vec_dst + (A : const_vector_unsigned_char_ptr; + B : c_int; + C : c_int) + renames Low_Level_Interface.vec_dst_kvucp_cint_cint; + + procedure vec_dst + (A : const_vector_signed_char_ptr; + B : c_int; + C : c_int) + renames Low_Level_Interface.vec_dst_kvscp_cint_cint; + + procedure vec_dst + (A : const_vector_bool_char_ptr; + B : c_int; + C : c_int) + renames Low_Level_Interface.vec_dst_kvbcp_cint_cint; + + procedure vec_dst + (A : const_vector_unsigned_short_ptr; + B : c_int; + C : c_int) + renames Low_Level_Interface.vec_dst_kvusp_cint_cint; + + procedure vec_dst + (A : const_vector_signed_short_ptr; + B : c_int; + C : c_int) + renames Low_Level_Interface.vec_dst_kvssp_cint_cint; + + procedure vec_dst + (A : const_vector_bool_short_ptr; + B : c_int; + C : c_int) + renames Low_Level_Interface.vec_dst_kvbsp_cint_cint; + + procedure vec_dst + (A : const_vector_pixel_ptr; + B : c_int; + C : c_int) + renames Low_Level_Interface.vec_dst_kvxp_cint_cint; + + procedure vec_dst + (A : const_vector_unsigned_int_ptr; + B : c_int; + C : c_int) + renames Low_Level_Interface.vec_dst_kvuip_cint_cint; + + procedure vec_dst + (A : const_vector_signed_int_ptr; + B : c_int; + C : c_int) + renames Low_Level_Interface.vec_dst_kvsip_cint_cint; + + procedure vec_dst + (A : const_vector_bool_int_ptr; + B : c_int; + C : c_int) + renames Low_Level_Interface.vec_dst_kvbip_cint_cint; + + procedure vec_dst + (A : const_vector_float_ptr; + B : c_int; + C : c_int) + renames Low_Level_Interface.vec_dst_kvfp_cint_cint; + + procedure vec_dst + (A : const_unsigned_char_ptr; + B : c_int; + C : c_int) + renames Low_Level_Interface.vec_dst_kucp_cint_cint; + + procedure vec_dst + (A : const_signed_char_ptr; + B : c_int; + C : c_int) + renames Low_Level_Interface.vec_dst_kscp_cint_cint; + + procedure vec_dst + (A : const_unsigned_short_ptr; + B : c_int; + C : c_int) + renames Low_Level_Interface.vec_dst_kusp_cint_cint; + + procedure vec_dst + (A : const_short_ptr; + B : c_int; + C : c_int) + renames Low_Level_Interface.vec_dst_ksp_cint_cint; + + procedure vec_dst + (A : const_unsigned_int_ptr; + B : c_int; + C : c_int) + renames Low_Level_Interface.vec_dst_kuip_cint_cint; + + procedure vec_dst + (A : const_int_ptr; + B : c_int; + C : c_int) + renames Low_Level_Interface.vec_dst_kip_cint_cint; + + procedure vec_dst + (A : const_unsigned_long_ptr; + B : c_int; + C : c_int) + renames Low_Level_Interface.vec_dst_kulongp_cint_cint; + + procedure vec_dst + (A : const_long_ptr; + B : c_int; + C : c_int) + renames Low_Level_Interface.vec_dst_klongp_cint_cint; + + procedure vec_dst + (A : const_float_ptr; + B : c_int; + C : c_int) + renames Low_Level_Interface.vec_dst_kfp_cint_cint; + + -- vec_dstst -- + + procedure vec_dstst + (A : const_vector_unsigned_char_ptr; + B : c_int; + C : c_int) + renames Low_Level_Interface.vec_dstst_kvucp_cint_cint; + + procedure vec_dstst + (A : const_vector_signed_char_ptr; + B : c_int; + C : c_int) + renames Low_Level_Interface.vec_dstst_kvscp_cint_cint; + + procedure vec_dstst + (A : const_vector_bool_char_ptr; + B : c_int; + C : c_int) + renames Low_Level_Interface.vec_dstst_kvbcp_cint_cint; + + procedure vec_dstst + (A : const_vector_unsigned_short_ptr; + B : c_int; + C : c_int) + renames Low_Level_Interface.vec_dstst_kvusp_cint_cint; + + procedure vec_dstst + (A : const_vector_signed_short_ptr; + B : c_int; + C : c_int) + renames Low_Level_Interface.vec_dstst_kvssp_cint_cint; + + procedure vec_dstst + (A : const_vector_bool_short_ptr; + B : c_int; + C : c_int) + renames Low_Level_Interface.vec_dstst_kvbsp_cint_cint; + + procedure vec_dstst + (A : const_vector_pixel_ptr; + B : c_int; + C : c_int) + renames Low_Level_Interface.vec_dstst_kvxp_cint_cint; + + procedure vec_dstst + (A : const_vector_unsigned_int_ptr; + B : c_int; + C : c_int) + renames Low_Level_Interface.vec_dstst_kvuip_cint_cint; + + procedure vec_dstst + (A : const_vector_signed_int_ptr; + B : c_int; + C : c_int) + renames Low_Level_Interface.vec_dstst_kvsip_cint_cint; + + procedure vec_dstst + (A : const_vector_bool_int_ptr; + B : c_int; + C : c_int) + renames Low_Level_Interface.vec_dstst_kvbip_cint_cint; + + procedure vec_dstst + (A : const_vector_float_ptr; + B : c_int; + C : c_int) + renames Low_Level_Interface.vec_dstst_kvfp_cint_cint; + + procedure vec_dstst + (A : const_unsigned_char_ptr; + B : c_int; + C : c_int) + renames Low_Level_Interface.vec_dstst_kucp_cint_cint; + + procedure vec_dstst + (A : const_signed_char_ptr; + B : c_int; + C : c_int) + renames Low_Level_Interface.vec_dstst_kscp_cint_cint; + + procedure vec_dstst + (A : const_unsigned_short_ptr; + B : c_int; + C : c_int) + renames Low_Level_Interface.vec_dstst_kusp_cint_cint; + + procedure vec_dstst + (A : const_short_ptr; + B : c_int; + C : c_int) + renames Low_Level_Interface.vec_dstst_ksp_cint_cint; + + procedure vec_dstst + (A : const_unsigned_int_ptr; + B : c_int; + C : c_int) + renames Low_Level_Interface.vec_dstst_kuip_cint_cint; + + procedure vec_dstst + (A : const_int_ptr; + B : c_int; + C : c_int) + renames Low_Level_Interface.vec_dstst_kip_cint_cint; + + procedure vec_dstst + (A : const_unsigned_long_ptr; + B : c_int; + C : c_int) + renames Low_Level_Interface.vec_dstst_kulongp_cint_cint; + + procedure vec_dstst + (A : const_long_ptr; + B : c_int; + C : c_int) + renames Low_Level_Interface.vec_dstst_klongp_cint_cint; + + procedure vec_dstst + (A : const_float_ptr; + B : c_int; + C : c_int) + renames Low_Level_Interface.vec_dstst_kfp_cint_cint; + + -- vec_dststt -- + + procedure vec_dststt + (A : const_vector_unsigned_char_ptr; + B : c_int; + C : c_int) + renames Low_Level_Interface.vec_dststt_kvucp_cint_cint; + + procedure vec_dststt + (A : const_vector_signed_char_ptr; + B : c_int; + C : c_int) + renames Low_Level_Interface.vec_dststt_kvscp_cint_cint; + + procedure vec_dststt + (A : const_vector_bool_char_ptr; + B : c_int; + C : c_int) + renames Low_Level_Interface.vec_dststt_kvbcp_cint_cint; + + procedure vec_dststt + (A : const_vector_unsigned_short_ptr; + B : c_int; + C : c_int) + renames Low_Level_Interface.vec_dststt_kvusp_cint_cint; + + procedure vec_dststt + (A : const_vector_signed_short_ptr; + B : c_int; + C : c_int) + renames Low_Level_Interface.vec_dststt_kvssp_cint_cint; + + procedure vec_dststt + (A : const_vector_bool_short_ptr; + B : c_int; + C : c_int) + renames Low_Level_Interface.vec_dststt_kvbsp_cint_cint; + + procedure vec_dststt + (A : const_vector_pixel_ptr; + B : c_int; + C : c_int) + renames Low_Level_Interface.vec_dststt_kvxp_cint_cint; + + procedure vec_dststt + (A : const_vector_unsigned_int_ptr; + B : c_int; + C : c_int) + renames Low_Level_Interface.vec_dststt_kvuip_cint_cint; + + procedure vec_dststt + (A : const_vector_signed_int_ptr; + B : c_int; + C : c_int) + renames Low_Level_Interface.vec_dststt_kvsip_cint_cint; + + procedure vec_dststt + (A : const_vector_bool_int_ptr; + B : c_int; + C : c_int) + renames Low_Level_Interface.vec_dststt_kvbip_cint_cint; + + procedure vec_dststt + (A : const_vector_float_ptr; + B : c_int; + C : c_int) + renames Low_Level_Interface.vec_dststt_kvfp_cint_cint; + + procedure vec_dststt + (A : const_unsigned_char_ptr; + B : c_int; + C : c_int) + renames Low_Level_Interface.vec_dststt_kucp_cint_cint; + + procedure vec_dststt + (A : const_signed_char_ptr; + B : c_int; + C : c_int) + renames Low_Level_Interface.vec_dststt_kscp_cint_cint; + + procedure vec_dststt + (A : const_unsigned_short_ptr; + B : c_int; + C : c_int) + renames Low_Level_Interface.vec_dststt_kusp_cint_cint; + + procedure vec_dststt + (A : const_short_ptr; + B : c_int; + C : c_int) + renames Low_Level_Interface.vec_dststt_ksp_cint_cint; + + procedure vec_dststt + (A : const_unsigned_int_ptr; + B : c_int; + C : c_int) + renames Low_Level_Interface.vec_dststt_kuip_cint_cint; + + procedure vec_dststt + (A : const_int_ptr; + B : c_int; + C : c_int) + renames Low_Level_Interface.vec_dststt_kip_cint_cint; + + procedure vec_dststt + (A : const_unsigned_long_ptr; + B : c_int; + C : c_int) + renames Low_Level_Interface.vec_dststt_kulongp_cint_cint; + + procedure vec_dststt + (A : const_long_ptr; + B : c_int; + C : c_int) + renames Low_Level_Interface.vec_dststt_klongp_cint_cint; + + procedure vec_dststt + (A : const_float_ptr; + B : c_int; + C : c_int) + renames Low_Level_Interface.vec_dststt_kfp_cint_cint; + + -- vec_dstt -- + + procedure vec_dstt + (A : const_vector_unsigned_char_ptr; + B : c_int; + C : c_int) + renames Low_Level_Interface.vec_dstt_kvucp_cint_cint; + + procedure vec_dstt + (A : const_vector_signed_char_ptr; + B : c_int; + C : c_int) + renames Low_Level_Interface.vec_dstt_kvscp_cint_cint; + + procedure vec_dstt + (A : const_vector_bool_char_ptr; + B : c_int; + C : c_int) + renames Low_Level_Interface.vec_dstt_kvbcp_cint_cint; + + procedure vec_dstt + (A : const_vector_unsigned_short_ptr; + B : c_int; + C : c_int) + renames Low_Level_Interface.vec_dstt_kvusp_cint_cint; + + procedure vec_dstt + (A : const_vector_signed_short_ptr; + B : c_int; + C : c_int) + renames Low_Level_Interface.vec_dstt_kvssp_cint_cint; + + procedure vec_dstt + (A : const_vector_bool_short_ptr; + B : c_int; + C : c_int) + renames Low_Level_Interface.vec_dstt_kvbsp_cint_cint; + + procedure vec_dstt + (A : const_vector_pixel_ptr; + B : c_int; + C : c_int) + renames Low_Level_Interface.vec_dstt_kvxp_cint_cint; + + procedure vec_dstt + (A : const_vector_unsigned_int_ptr; + B : c_int; + C : c_int) + renames Low_Level_Interface.vec_dstt_kvuip_cint_cint; + + procedure vec_dstt + (A : const_vector_signed_int_ptr; + B : c_int; + C : c_int) + renames Low_Level_Interface.vec_dstt_kvsip_cint_cint; + + procedure vec_dstt + (A : const_vector_bool_int_ptr; + B : c_int; + C : c_int) + renames Low_Level_Interface.vec_dstt_kvbip_cint_cint; + + procedure vec_dstt + (A : const_vector_float_ptr; + B : c_int; + C : c_int) + renames Low_Level_Interface.vec_dstt_kvfp_cint_cint; + + procedure vec_dstt + (A : const_unsigned_char_ptr; + B : c_int; + C : c_int) + renames Low_Level_Interface.vec_dstt_kucp_cint_cint; + + procedure vec_dstt + (A : const_signed_char_ptr; + B : c_int; + C : c_int) + renames Low_Level_Interface.vec_dstt_kscp_cint_cint; + + procedure vec_dstt + (A : const_unsigned_short_ptr; + B : c_int; + C : c_int) + renames Low_Level_Interface.vec_dstt_kusp_cint_cint; + + procedure vec_dstt + (A : const_short_ptr; + B : c_int; + C : c_int) + renames Low_Level_Interface.vec_dstt_ksp_cint_cint; + + procedure vec_dstt + (A : const_unsigned_int_ptr; + B : c_int; + C : c_int) + renames Low_Level_Interface.vec_dstt_kuip_cint_cint; + + procedure vec_dstt + (A : const_int_ptr; + B : c_int; + C : c_int) + renames Low_Level_Interface.vec_dstt_kip_cint_cint; + + procedure vec_dstt + (A : const_unsigned_long_ptr; + B : c_int; + C : c_int) + renames Low_Level_Interface.vec_dstt_kulongp_cint_cint; + + procedure vec_dstt + (A : const_long_ptr; + B : c_int; + C : c_int) + renames Low_Level_Interface.vec_dstt_klongp_cint_cint; + + procedure vec_dstt + (A : const_float_ptr; + B : c_int; + C : c_int) + renames Low_Level_Interface.vec_dstt_kfp_cint_cint; + + -- vec_expte -- + + function vec_expte + (A : vector_float) return vector_float; + + -- vec_floor -- + + function vec_floor + (A : vector_float) return vector_float; + + -- vec_ld -- + + function vec_ld + (A : c_long; + B : const_vector_float_ptr) return vector_float; + + function vec_ld + (A : c_long; + B : const_float_ptr) return vector_float; + + function vec_ld + (A : c_long; + B : const_vector_bool_int_ptr) return vector_bool_int; + + function vec_ld + (A : c_long; + B : const_vector_signed_int_ptr) return vector_signed_int; + + function vec_ld + (A : c_long; + B : const_int_ptr) return vector_signed_int; + + function vec_ld + (A : c_long; + B : const_long_ptr) return vector_signed_int; + + function vec_ld + (A : c_long; + B : const_vector_unsigned_int_ptr) return vector_unsigned_int; + + function vec_ld + (A : c_long; + B : const_unsigned_int_ptr) return vector_unsigned_int; + + function vec_ld + (A : c_long; + B : const_unsigned_long_ptr) return vector_unsigned_int; + + function vec_ld + (A : c_long; + B : const_vector_bool_short_ptr) return vector_bool_short; + + function vec_ld + (A : c_long; + B : const_vector_pixel_ptr) return vector_pixel; + + function vec_ld + (A : c_long; + B : const_vector_signed_short_ptr) return vector_signed_short; + + function vec_ld + (A : c_long; + B : const_short_ptr) return vector_signed_short; + + function vec_ld + (A : c_long; + B : const_vector_unsigned_short_ptr) return vector_unsigned_short; + + function vec_ld + (A : c_long; + B : const_unsigned_short_ptr) return vector_unsigned_short; + + function vec_ld + (A : c_long; + B : const_vector_bool_char_ptr) return vector_bool_char; + + function vec_ld + (A : c_long; + B : const_vector_signed_char_ptr) return vector_signed_char; + + function vec_ld + (A : c_long; + B : const_signed_char_ptr) return vector_signed_char; + + function vec_ld + (A : c_long; + B : const_vector_unsigned_char_ptr) return vector_unsigned_char; + + function vec_ld + (A : c_long; + B : const_unsigned_char_ptr) return vector_unsigned_char; + + -- vec_lde -- + + function vec_lde + (A : c_long; + B : const_signed_char_ptr) return vector_signed_char; + + function vec_lde + (A : c_long; + B : const_unsigned_char_ptr) return vector_unsigned_char; + + function vec_lde + (A : c_long; + B : const_short_ptr) return vector_signed_short; + + function vec_lde + (A : c_long; + B : const_unsigned_short_ptr) return vector_unsigned_short; + + function vec_lde + (A : c_long; + B : const_float_ptr) return vector_float; + + function vec_lde + (A : c_long; + B : const_int_ptr) return vector_signed_int; + + function vec_lde + (A : c_long; + B : const_unsigned_int_ptr) return vector_unsigned_int; + + function vec_lde + (A : c_long; + B : const_long_ptr) return vector_signed_int; + + function vec_lde + (A : c_long; + B : const_unsigned_long_ptr) return vector_unsigned_int; + + -- vec_lvewx -- + + function vec_lvewx + (A : c_long; + B : float_ptr) return vector_float; + + function vec_lvewx + (A : c_long; + B : int_ptr) return vector_signed_int; + + function vec_lvewx + (A : c_long; + B : unsigned_int_ptr) return vector_unsigned_int; + + function vec_lvewx + (A : c_long; + B : long_ptr) return vector_signed_int; + + function vec_lvewx + (A : c_long; + B : unsigned_long_ptr) return vector_unsigned_int; + + -- vec_lvehx -- + + function vec_lvehx + (A : c_long; + B : short_ptr) return vector_signed_short; + + function vec_lvehx + (A : c_long; + B : unsigned_short_ptr) return vector_unsigned_short; + + -- vec_lvebx -- + + function vec_lvebx + (A : c_long; + B : signed_char_ptr) return vector_signed_char; + + function vec_lvebx + (A : c_long; + B : unsigned_char_ptr) return vector_unsigned_char; + + -- vec_ldl -- + + function vec_ldl + (A : c_long; + B : const_vector_float_ptr) return vector_float; + + function vec_ldl + (A : c_long; + B : const_float_ptr) return vector_float; + + function vec_ldl + (A : c_long; + B : const_vector_bool_int_ptr) return vector_bool_int; + + function vec_ldl + (A : c_long; + B : const_vector_signed_int_ptr) return vector_signed_int; + + function vec_ldl + (A : c_long; + B : const_int_ptr) return vector_signed_int; + + function vec_ldl + (A : c_long; + B : const_long_ptr) return vector_signed_int; + + function vec_ldl + (A : c_long; + B : const_vector_unsigned_int_ptr) return vector_unsigned_int; + + function vec_ldl + (A : c_long; + B : const_unsigned_int_ptr) return vector_unsigned_int; + + function vec_ldl + (A : c_long; + B : const_unsigned_long_ptr) return vector_unsigned_int; + + function vec_ldl + (A : c_long; + B : const_vector_bool_short_ptr) return vector_bool_short; + + function vec_ldl + (A : c_long; + B : const_vector_pixel_ptr) return vector_pixel; + + function vec_ldl + (A : c_long; + B : const_vector_signed_short_ptr) return vector_signed_short; + + function vec_ldl + (A : c_long; + B : const_short_ptr) return vector_signed_short; + + function vec_ldl + (A : c_long; + B : const_vector_unsigned_short_ptr) return vector_unsigned_short; + + function vec_ldl + (A : c_long; + B : const_unsigned_short_ptr) return vector_unsigned_short; + + function vec_ldl + (A : c_long; + B : const_vector_bool_char_ptr) return vector_bool_char; + + function vec_ldl + (A : c_long; + B : const_vector_signed_char_ptr) return vector_signed_char; + + function vec_ldl + (A : c_long; + B : const_signed_char_ptr) return vector_signed_char; + + function vec_ldl + (A : c_long; + B : const_vector_unsigned_char_ptr) return vector_unsigned_char; + + function vec_ldl + (A : c_long; + B : const_unsigned_char_ptr) return vector_unsigned_char; + + -- vec_loge -- + + function vec_loge + (A : vector_float) return vector_float; + + -- vec_lvsl -- + + function vec_lvsl + (A : c_long; + B : constv_unsigned_char_ptr) return vector_unsigned_char; + + function vec_lvsl + (A : c_long; + B : constv_signed_char_ptr) return vector_unsigned_char; + + function vec_lvsl + (A : c_long; + B : constv_unsigned_short_ptr) return vector_unsigned_char; + + function vec_lvsl + (A : c_long; + B : constv_short_ptr) return vector_unsigned_char; + + function vec_lvsl + (A : c_long; + B : constv_unsigned_int_ptr) return vector_unsigned_char; + + function vec_lvsl + (A : c_long; + B : constv_int_ptr) return vector_unsigned_char; + + function vec_lvsl + (A : c_long; + B : constv_unsigned_long_ptr) return vector_unsigned_char; + + function vec_lvsl + (A : c_long; + B : constv_long_ptr) return vector_unsigned_char; + + function vec_lvsl + (A : c_long; + B : constv_float_ptr) return vector_unsigned_char; + + -- vec_lvsr -- + + function vec_lvsr + (A : c_long; + B : constv_unsigned_char_ptr) return vector_unsigned_char; + + function vec_lvsr + (A : c_long; + B : constv_signed_char_ptr) return vector_unsigned_char; + + function vec_lvsr + (A : c_long; + B : constv_unsigned_short_ptr) return vector_unsigned_char; + + function vec_lvsr + (A : c_long; + B : constv_short_ptr) return vector_unsigned_char; + + function vec_lvsr + (A : c_long; + B : constv_unsigned_int_ptr) return vector_unsigned_char; + + function vec_lvsr + (A : c_long; + B : constv_int_ptr) return vector_unsigned_char; + + function vec_lvsr + (A : c_long; + B : constv_unsigned_long_ptr) return vector_unsigned_char; + + function vec_lvsr + (A : c_long; + B : constv_long_ptr) return vector_unsigned_char; + + function vec_lvsr + (A : c_long; + B : constv_float_ptr) return vector_unsigned_char; + + -- vec_madd -- + + function vec_madd + (A : vector_float; + B : vector_float; + C : vector_float) return vector_float; + + -- vec_madds -- + + function vec_madds + (A : vector_signed_short; + B : vector_signed_short; + C : vector_signed_short) return vector_signed_short; + + -- vec_max -- + + function vec_max + (A : vector_bool_char; + B : vector_unsigned_char) return vector_unsigned_char; + + function vec_max + (A : vector_unsigned_char; + B : vector_bool_char) return vector_unsigned_char; + + function vec_max + (A : vector_unsigned_char; + B : vector_unsigned_char) return vector_unsigned_char; + + function vec_max + (A : vector_bool_char; + B : vector_signed_char) return vector_signed_char; + + function vec_max + (A : vector_signed_char; + B : vector_bool_char) return vector_signed_char; + + function vec_max + (A : vector_signed_char; + B : vector_signed_char) return vector_signed_char; + + function vec_max + (A : vector_bool_short; + B : vector_unsigned_short) return vector_unsigned_short; + + function vec_max + (A : vector_unsigned_short; + B : vector_bool_short) return vector_unsigned_short; + + function vec_max + (A : vector_unsigned_short; + B : vector_unsigned_short) return vector_unsigned_short; + + function vec_max + (A : vector_bool_short; + B : vector_signed_short) return vector_signed_short; + + function vec_max + (A : vector_signed_short; + B : vector_bool_short) return vector_signed_short; + + function vec_max + (A : vector_signed_short; + B : vector_signed_short) return vector_signed_short; + + function vec_max + (A : vector_bool_int; + B : vector_unsigned_int) return vector_unsigned_int; + + function vec_max + (A : vector_unsigned_int; + B : vector_bool_int) return vector_unsigned_int; + + function vec_max + (A : vector_unsigned_int; + B : vector_unsigned_int) return vector_unsigned_int; + + function vec_max + (A : vector_bool_int; + B : vector_signed_int) return vector_signed_int; + + function vec_max + (A : vector_signed_int; + B : vector_bool_int) return vector_signed_int; + + function vec_max + (A : vector_signed_int; + B : vector_signed_int) return vector_signed_int; + + function vec_max + (A : vector_float; + B : vector_float) return vector_float; + + -- vec_vmaxfp -- + + function vec_vmaxfp + (A : vector_float; + B : vector_float) return vector_float; + + -- vec_vmaxsw -- + + function vec_vmaxsw + (A : vector_bool_int; + B : vector_signed_int) return vector_signed_int; + + function vec_vmaxsw + (A : vector_signed_int; + B : vector_bool_int) return vector_signed_int; + + function vec_vmaxsw + (A : vector_signed_int; + B : vector_signed_int) return vector_signed_int; + + -- vec_vmaxuw -- + + function vec_vmaxuw + (A : vector_bool_int; + B : vector_unsigned_int) return vector_unsigned_int; + + function vec_vmaxuw + (A : vector_unsigned_int; + B : vector_bool_int) return vector_unsigned_int; + + function vec_vmaxuw + (A : vector_unsigned_int; + B : vector_unsigned_int) return vector_unsigned_int; + + -- vec_vmaxsh -- + + function vec_vmaxsh + (A : vector_bool_short; + B : vector_signed_short) return vector_signed_short; + + function vec_vmaxsh + (A : vector_signed_short; + B : vector_bool_short) return vector_signed_short; + + function vec_vmaxsh + (A : vector_signed_short; + B : vector_signed_short) return vector_signed_short; + + -- vec_vmaxuh -- + + function vec_vmaxuh + (A : vector_bool_short; + B : vector_unsigned_short) return vector_unsigned_short; + + function vec_vmaxuh + (A : vector_unsigned_short; + B : vector_bool_short) return vector_unsigned_short; + + function vec_vmaxuh + (A : vector_unsigned_short; + B : vector_unsigned_short) return vector_unsigned_short; + + -- vec_vmaxsb -- + + function vec_vmaxsb + (A : vector_bool_char; + B : vector_signed_char) return vector_signed_char; + + function vec_vmaxsb + (A : vector_signed_char; + B : vector_bool_char) return vector_signed_char; + + function vec_vmaxsb + (A : vector_signed_char; + B : vector_signed_char) return vector_signed_char; + + -- vec_vmaxub -- + + function vec_vmaxub + (A : vector_bool_char; + B : vector_unsigned_char) return vector_unsigned_char; + + function vec_vmaxub + (A : vector_unsigned_char; + B : vector_bool_char) return vector_unsigned_char; + + function vec_vmaxub + (A : vector_unsigned_char; + B : vector_unsigned_char) return vector_unsigned_char; + + -- vec_mergeh -- + + function vec_mergeh + (A : vector_bool_char; + B : vector_bool_char) return vector_bool_char; + + function vec_mergeh + (A : vector_signed_char; + B : vector_signed_char) return vector_signed_char; + + function vec_mergeh + (A : vector_unsigned_char; + B : vector_unsigned_char) return vector_unsigned_char; + + function vec_mergeh + (A : vector_bool_short; + B : vector_bool_short) return vector_bool_short; + + function vec_mergeh + (A : vector_pixel; + B : vector_pixel) return vector_pixel; + + function vec_mergeh + (A : vector_signed_short; + B : vector_signed_short) return vector_signed_short; + + function vec_mergeh + (A : vector_unsigned_short; + B : vector_unsigned_short) return vector_unsigned_short; + + function vec_mergeh + (A : vector_float; + B : vector_float) return vector_float; + + function vec_mergeh + (A : vector_bool_int; + B : vector_bool_int) return vector_bool_int; + + function vec_mergeh + (A : vector_signed_int; + B : vector_signed_int) return vector_signed_int; + + function vec_mergeh + (A : vector_unsigned_int; + B : vector_unsigned_int) return vector_unsigned_int; + + -- vec_vmrghw -- + + function vec_vmrghw + (A : vector_float; + B : vector_float) return vector_float; + + function vec_vmrghw + (A : vector_bool_int; + B : vector_bool_int) return vector_bool_int; + + function vec_vmrghw + (A : vector_signed_int; + B : vector_signed_int) return vector_signed_int; + + function vec_vmrghw + (A : vector_unsigned_int; + B : vector_unsigned_int) return vector_unsigned_int; + + -- vec_vmrghh -- + + function vec_vmrghh + (A : vector_bool_short; + B : vector_bool_short) return vector_bool_short; + + function vec_vmrghh + (A : vector_signed_short; + B : vector_signed_short) return vector_signed_short; + + function vec_vmrghh + (A : vector_unsigned_short; + B : vector_unsigned_short) return vector_unsigned_short; + + function vec_vmrghh + (A : vector_pixel; + B : vector_pixel) return vector_pixel; + + -- vec_vmrghb -- + + function vec_vmrghb + (A : vector_bool_char; + B : vector_bool_char) return vector_bool_char; + + function vec_vmrghb + (A : vector_signed_char; + B : vector_signed_char) return vector_signed_char; + + function vec_vmrghb + (A : vector_unsigned_char; + B : vector_unsigned_char) return vector_unsigned_char; + + -- vec_mergel -- + + function vec_mergel + (A : vector_bool_char; + B : vector_bool_char) return vector_bool_char; + + function vec_mergel + (A : vector_signed_char; + B : vector_signed_char) return vector_signed_char; + + function vec_mergel + (A : vector_unsigned_char; + B : vector_unsigned_char) return vector_unsigned_char; + + function vec_mergel + (A : vector_bool_short; + B : vector_bool_short) return vector_bool_short; + + function vec_mergel + (A : vector_pixel; + B : vector_pixel) return vector_pixel; + + function vec_mergel + (A : vector_signed_short; + B : vector_signed_short) return vector_signed_short; + + function vec_mergel + (A : vector_unsigned_short; + B : vector_unsigned_short) return vector_unsigned_short; + + function vec_mergel + (A : vector_float; + B : vector_float) return vector_float; + + function vec_mergel + (A : vector_bool_int; + B : vector_bool_int) return vector_bool_int; + + function vec_mergel + (A : vector_signed_int; + B : vector_signed_int) return vector_signed_int; + + function vec_mergel + (A : vector_unsigned_int; + B : vector_unsigned_int) return vector_unsigned_int; + + -- vec_vmrglw -- + + function vec_vmrglw + (A : vector_float; + B : vector_float) return vector_float; + + function vec_vmrglw + (A : vector_signed_int; + B : vector_signed_int) return vector_signed_int; + + function vec_vmrglw + (A : vector_unsigned_int; + B : vector_unsigned_int) return vector_unsigned_int; + + function vec_vmrglw + (A : vector_bool_int; + B : vector_bool_int) return vector_bool_int; + + -- vec_vmrglh -- + + function vec_vmrglh + (A : vector_bool_short; + B : vector_bool_short) return vector_bool_short; + + function vec_vmrglh + (A : vector_signed_short; + B : vector_signed_short) return vector_signed_short; + + function vec_vmrglh + (A : vector_unsigned_short; + B : vector_unsigned_short) return vector_unsigned_short; + + function vec_vmrglh + (A : vector_pixel; + B : vector_pixel) return vector_pixel; + + -- vec_vmrglb -- + + function vec_vmrglb + (A : vector_bool_char; + B : vector_bool_char) return vector_bool_char; + + function vec_vmrglb + (A : vector_signed_char; + B : vector_signed_char) return vector_signed_char; + + function vec_vmrglb + (A : vector_unsigned_char; + B : vector_unsigned_char) return vector_unsigned_char; + + -- vec_mfvscr -- + + function vec_mfvscr return vector_unsigned_short; + + -- vec_min -- + + function vec_min + (A : vector_bool_char; + B : vector_unsigned_char) return vector_unsigned_char; + + function vec_min + (A : vector_unsigned_char; + B : vector_bool_char) return vector_unsigned_char; + + function vec_min + (A : vector_unsigned_char; + B : vector_unsigned_char) return vector_unsigned_char; + + function vec_min + (A : vector_bool_char; + B : vector_signed_char) return vector_signed_char; + + function vec_min + (A : vector_signed_char; + B : vector_bool_char) return vector_signed_char; + + function vec_min + (A : vector_signed_char; + B : vector_signed_char) return vector_signed_char; + + function vec_min + (A : vector_bool_short; + B : vector_unsigned_short) return vector_unsigned_short; + + function vec_min + (A : vector_unsigned_short; + B : vector_bool_short) return vector_unsigned_short; + + function vec_min + (A : vector_unsigned_short; + B : vector_unsigned_short) return vector_unsigned_short; + + function vec_min + (A : vector_bool_short; + B : vector_signed_short) return vector_signed_short; + + function vec_min + (A : vector_signed_short; + B : vector_bool_short) return vector_signed_short; + + function vec_min + (A : vector_signed_short; + B : vector_signed_short) return vector_signed_short; + + function vec_min + (A : vector_bool_int; + B : vector_unsigned_int) return vector_unsigned_int; + + function vec_min + (A : vector_unsigned_int; + B : vector_bool_int) return vector_unsigned_int; + + function vec_min + (A : vector_unsigned_int; + B : vector_unsigned_int) return vector_unsigned_int; + + function vec_min + (A : vector_bool_int; + B : vector_signed_int) return vector_signed_int; + + function vec_min + (A : vector_signed_int; + B : vector_bool_int) return vector_signed_int; + + function vec_min + (A : vector_signed_int; + B : vector_signed_int) return vector_signed_int; + + function vec_min + (A : vector_float; + B : vector_float) return vector_float; + + -- vec_vminfp -- + + function vec_vminfp + (A : vector_float; + B : vector_float) return vector_float; + + -- vec_vminsw -- + + function vec_vminsw + (A : vector_bool_int; + B : vector_signed_int) return vector_signed_int; + + function vec_vminsw + (A : vector_signed_int; + B : vector_bool_int) return vector_signed_int; + + function vec_vminsw + (A : vector_signed_int; + B : vector_signed_int) return vector_signed_int; + + -- vec_vminuw -- + + function vec_vminuw + (A : vector_bool_int; + B : vector_unsigned_int) return vector_unsigned_int; + + function vec_vminuw + (A : vector_unsigned_int; + B : vector_bool_int) return vector_unsigned_int; + + function vec_vminuw + (A : vector_unsigned_int; + B : vector_unsigned_int) return vector_unsigned_int; + + -- vec_vminsh -- + + function vec_vminsh + (A : vector_bool_short; + B : vector_signed_short) return vector_signed_short; + + function vec_vminsh + (A : vector_signed_short; + B : vector_bool_short) return vector_signed_short; + + function vec_vminsh + (A : vector_signed_short; + B : vector_signed_short) return vector_signed_short; + + -- vec_vminuh -- + + function vec_vminuh + (A : vector_bool_short; + B : vector_unsigned_short) return vector_unsigned_short; + + function vec_vminuh + (A : vector_unsigned_short; + B : vector_bool_short) return vector_unsigned_short; + + function vec_vminuh + (A : vector_unsigned_short; + B : vector_unsigned_short) return vector_unsigned_short; + + -- vec_vminsb -- + + function vec_vminsb + (A : vector_bool_char; + B : vector_signed_char) return vector_signed_char; + + function vec_vminsb + (A : vector_signed_char; + B : vector_bool_char) return vector_signed_char; + + function vec_vminsb + (A : vector_signed_char; + B : vector_signed_char) return vector_signed_char; + + -- vec_vminub -- + + function vec_vminub + (A : vector_bool_char; + B : vector_unsigned_char) return vector_unsigned_char; + + function vec_vminub + (A : vector_unsigned_char; + B : vector_bool_char) return vector_unsigned_char; + + function vec_vminub + (A : vector_unsigned_char; + B : vector_unsigned_char) return vector_unsigned_char; + + -- vec_mladd -- + + function vec_mladd + (A : vector_signed_short; + B : vector_signed_short; + C : vector_signed_short) return vector_signed_short; + + function vec_mladd + (A : vector_signed_short; + B : vector_unsigned_short; + C : vector_unsigned_short) return vector_signed_short; + + function vec_mladd + (A : vector_unsigned_short; + B : vector_signed_short; + C : vector_signed_short) return vector_signed_short; + + function vec_mladd + (A : vector_unsigned_short; + B : vector_unsigned_short; + C : vector_unsigned_short) return vector_unsigned_short; + + -- vec_mradds -- + + function vec_mradds + (A : vector_signed_short; + B : vector_signed_short; + C : vector_signed_short) return vector_signed_short; + + -- vec_msum -- + + function vec_msum + (A : vector_unsigned_char; + B : vector_unsigned_char; + C : vector_unsigned_int) return vector_unsigned_int; + + function vec_msum + (A : vector_signed_char; + B : vector_unsigned_char; + C : vector_signed_int) return vector_signed_int; + + function vec_msum + (A : vector_unsigned_short; + B : vector_unsigned_short; + C : vector_unsigned_int) return vector_unsigned_int; + + function vec_msum + (A : vector_signed_short; + B : vector_signed_short; + C : vector_signed_int) return vector_signed_int; + + -- vec_vmsumshm -- + + function vec_vmsumshm + (A : vector_signed_short; + B : vector_signed_short; + C : vector_signed_int) return vector_signed_int; + + -- vec_vmsumuhm -- + + function vec_vmsumuhm + (A : vector_unsigned_short; + B : vector_unsigned_short; + C : vector_unsigned_int) return vector_unsigned_int; + + -- vec_vmsummbm -- + + function vec_vmsummbm + (A : vector_signed_char; + B : vector_unsigned_char; + C : vector_signed_int) return vector_signed_int; + + -- vec_vmsumubm -- + + function vec_vmsumubm + (A : vector_unsigned_char; + B : vector_unsigned_char; + C : vector_unsigned_int) return vector_unsigned_int; + + -- vec_msums -- + + function vec_msums + (A : vector_unsigned_short; + B : vector_unsigned_short; + C : vector_unsigned_int) return vector_unsigned_int; + + function vec_msums + (A : vector_signed_short; + B : vector_signed_short; + C : vector_signed_int) return vector_signed_int; + + -- vec_vmsumshs -- + + function vec_vmsumshs + (A : vector_signed_short; + B : vector_signed_short; + C : vector_signed_int) return vector_signed_int; + + -- vec_vmsumuhs -- + + function vec_vmsumuhs + (A : vector_unsigned_short; + B : vector_unsigned_short; + C : vector_unsigned_int) return vector_unsigned_int; + + -- vec_mtvscr -- + + procedure vec_mtvscr + (A : vector_signed_int); + + procedure vec_mtvscr + (A : vector_unsigned_int); + + procedure vec_mtvscr + (A : vector_bool_int); + + procedure vec_mtvscr + (A : vector_signed_short); + + procedure vec_mtvscr + (A : vector_unsigned_short); + + procedure vec_mtvscr + (A : vector_bool_short); + + procedure vec_mtvscr + (A : vector_pixel); + + procedure vec_mtvscr + (A : vector_signed_char); + + procedure vec_mtvscr + (A : vector_unsigned_char); + + procedure vec_mtvscr + (A : vector_bool_char); + + -- vec_mule -- + + function vec_mule + (A : vector_unsigned_char; + B : vector_unsigned_char) return vector_unsigned_short; + + function vec_mule + (A : vector_signed_char; + B : vector_signed_char) return vector_signed_short; + + function vec_mule + (A : vector_unsigned_short; + B : vector_unsigned_short) return vector_unsigned_int; + + function vec_mule + (A : vector_signed_short; + B : vector_signed_short) return vector_signed_int; + + -- vec_vmulesh -- + + function vec_vmulesh + (A : vector_signed_short; + B : vector_signed_short) return vector_signed_int; + + -- vec_vmuleuh -- + + function vec_vmuleuh + (A : vector_unsigned_short; + B : vector_unsigned_short) return vector_unsigned_int; + + -- vec_vmulesb -- + + function vec_vmulesb + (A : vector_signed_char; + B : vector_signed_char) return vector_signed_short; + + -- vec_vmuleub -- + + function vec_vmuleub + (A : vector_unsigned_char; + B : vector_unsigned_char) return vector_unsigned_short; + + -- vec_mulo -- + + function vec_mulo + (A : vector_unsigned_char; + B : vector_unsigned_char) return vector_unsigned_short; + + function vec_mulo + (A : vector_signed_char; + B : vector_signed_char) return vector_signed_short; + + function vec_mulo + (A : vector_unsigned_short; + B : vector_unsigned_short) return vector_unsigned_int; + + function vec_mulo + (A : vector_signed_short; + B : vector_signed_short) return vector_signed_int; + + -- vec_vmulosh -- + + function vec_vmulosh + (A : vector_signed_short; + B : vector_signed_short) return vector_signed_int; + + -- vec_vmulouh -- + + function vec_vmulouh + (A : vector_unsigned_short; + B : vector_unsigned_short) return vector_unsigned_int; + + -- vec_vmulosb -- + + function vec_vmulosb + (A : vector_signed_char; + B : vector_signed_char) return vector_signed_short; + + -- vec_vmuloub -- + + function vec_vmuloub + (A : vector_unsigned_char; + B : vector_unsigned_char) return vector_unsigned_short; + + -- vec_nmsub -- + + function vec_nmsub + (A : vector_float; + B : vector_float; + C : vector_float) return vector_float; + + -- vec_nor -- + + function vec_nor + (A : vector_float; + B : vector_float) return vector_float; + + function vec_nor + (A : vector_signed_int; + B : vector_signed_int) return vector_signed_int; + + function vec_nor + (A : vector_unsigned_int; + B : vector_unsigned_int) return vector_unsigned_int; + + function vec_nor + (A : vector_bool_int; + B : vector_bool_int) return vector_bool_int; + + function vec_nor + (A : vector_signed_short; + B : vector_signed_short) return vector_signed_short; + + function vec_nor + (A : vector_unsigned_short; + B : vector_unsigned_short) return vector_unsigned_short; + + function vec_nor + (A : vector_bool_short; + B : vector_bool_short) return vector_bool_short; + + function vec_nor + (A : vector_signed_char; + B : vector_signed_char) return vector_signed_char; + + function vec_nor + (A : vector_unsigned_char; + B : vector_unsigned_char) return vector_unsigned_char; + + function vec_nor + (A : vector_bool_char; + B : vector_bool_char) return vector_bool_char; + + -- vec_or -- + + function vec_or + (A : vector_float; + B : vector_float) return vector_float; + + function vec_or + (A : vector_float; + B : vector_bool_int) return vector_float; + + function vec_or + (A : vector_bool_int; + B : vector_float) return vector_float; + + function vec_or + (A : vector_bool_int; + B : vector_bool_int) return vector_bool_int; + + function vec_or + (A : vector_bool_int; + B : vector_signed_int) return vector_signed_int; + + function vec_or + (A : vector_signed_int; + B : vector_bool_int) return vector_signed_int; + + function vec_or + (A : vector_signed_int; + B : vector_signed_int) return vector_signed_int; + + function vec_or + (A : vector_bool_int; + B : vector_unsigned_int) return vector_unsigned_int; + + function vec_or + (A : vector_unsigned_int; + B : vector_bool_int) return vector_unsigned_int; + + function vec_or + (A : vector_unsigned_int; + B : vector_unsigned_int) return vector_unsigned_int; + + function vec_or + (A : vector_bool_short; + B : vector_bool_short) return vector_bool_short; + + function vec_or + (A : vector_bool_short; + B : vector_signed_short) return vector_signed_short; + + function vec_or + (A : vector_signed_short; + B : vector_bool_short) return vector_signed_short; + + function vec_or + (A : vector_signed_short; + B : vector_signed_short) return vector_signed_short; + + function vec_or + (A : vector_bool_short; + B : vector_unsigned_short) return vector_unsigned_short; + + function vec_or + (A : vector_unsigned_short; + B : vector_bool_short) return vector_unsigned_short; + + function vec_or + (A : vector_unsigned_short; + B : vector_unsigned_short) return vector_unsigned_short; + + function vec_or + (A : vector_bool_char; + B : vector_signed_char) return vector_signed_char; + + function vec_or + (A : vector_bool_char; + B : vector_bool_char) return vector_bool_char; + + function vec_or + (A : vector_signed_char; + B : vector_bool_char) return vector_signed_char; + + function vec_or + (A : vector_signed_char; + B : vector_signed_char) return vector_signed_char; + + function vec_or + (A : vector_bool_char; + B : vector_unsigned_char) return vector_unsigned_char; + + function vec_or + (A : vector_unsigned_char; + B : vector_bool_char) return vector_unsigned_char; + + function vec_or + (A : vector_unsigned_char; + B : vector_unsigned_char) return vector_unsigned_char; + + -- vec_pack -- + + function vec_pack + (A : vector_signed_short; + B : vector_signed_short) return vector_signed_char; + + function vec_pack + (A : vector_unsigned_short; + B : vector_unsigned_short) return vector_unsigned_char; + + function vec_pack + (A : vector_bool_short; + B : vector_bool_short) return vector_bool_char; + + function vec_pack + (A : vector_signed_int; + B : vector_signed_int) return vector_signed_short; + + function vec_pack + (A : vector_unsigned_int; + B : vector_unsigned_int) return vector_unsigned_short; + + function vec_pack + (A : vector_bool_int; + B : vector_bool_int) return vector_bool_short; + + -- vec_vpkuwum -- + + function vec_vpkuwum + (A : vector_bool_int; + B : vector_bool_int) return vector_bool_short; + + function vec_vpkuwum + (A : vector_signed_int; + B : vector_signed_int) return vector_signed_short; + + function vec_vpkuwum + (A : vector_unsigned_int; + B : vector_unsigned_int) return vector_unsigned_short; + + -- vec_vpkuhum -- + + function vec_vpkuhum + (A : vector_bool_short; + B : vector_bool_short) return vector_bool_char; + + function vec_vpkuhum + (A : vector_signed_short; + B : vector_signed_short) return vector_signed_char; + + function vec_vpkuhum + (A : vector_unsigned_short; + B : vector_unsigned_short) return vector_unsigned_char; + + -- vec_packpx -- + + function vec_packpx + (A : vector_unsigned_int; + B : vector_unsigned_int) return vector_pixel; + + -- vec_packs -- + + function vec_packs + (A : vector_unsigned_short; + B : vector_unsigned_short) return vector_unsigned_char; + + function vec_packs + (A : vector_signed_short; + B : vector_signed_short) return vector_signed_char; + + function vec_packs + (A : vector_unsigned_int; + B : vector_unsigned_int) return vector_unsigned_short; + + function vec_packs + (A : vector_signed_int; + B : vector_signed_int) return vector_signed_short; + + -- vec_vpkswss -- + + function vec_vpkswss + (A : vector_signed_int; + B : vector_signed_int) return vector_signed_short; + + -- vec_vpkuwus -- + + function vec_vpkuwus + (A : vector_unsigned_int; + B : vector_unsigned_int) return vector_unsigned_short; + + -- vec_vpkshss -- + + function vec_vpkshss + (A : vector_signed_short; + B : vector_signed_short) return vector_signed_char; + + -- vec_vpkuhus -- + + function vec_vpkuhus + (A : vector_unsigned_short; + B : vector_unsigned_short) return vector_unsigned_char; + + -- vec_packsu -- + + function vec_packsu + (A : vector_unsigned_short; + B : vector_unsigned_short) return vector_unsigned_char; + + function vec_packsu + (A : vector_signed_short; + B : vector_signed_short) return vector_unsigned_char; + + function vec_packsu + (A : vector_unsigned_int; + B : vector_unsigned_int) return vector_unsigned_short; + + function vec_packsu + (A : vector_signed_int; + B : vector_signed_int) return vector_unsigned_short; + + -- vec_vpkswus -- + + function vec_vpkswus + (A : vector_signed_int; + B : vector_signed_int) return vector_unsigned_short; + + -- vec_vpkshus -- + + function vec_vpkshus + (A : vector_signed_short; + B : vector_signed_short) return vector_unsigned_char; + + -- vec_perm -- + + function vec_perm + (A : vector_float; + B : vector_float; + C : vector_unsigned_char) return vector_float; + + function vec_perm + (A : vector_signed_int; + B : vector_signed_int; + C : vector_unsigned_char) return vector_signed_int; + + function vec_perm + (A : vector_unsigned_int; + B : vector_unsigned_int; + C : vector_unsigned_char) return vector_unsigned_int; + + function vec_perm + (A : vector_bool_int; + B : vector_bool_int; + C : vector_unsigned_char) return vector_bool_int; + + function vec_perm + (A : vector_signed_short; + B : vector_signed_short; + C : vector_unsigned_char) return vector_signed_short; + + function vec_perm + (A : vector_unsigned_short; + B : vector_unsigned_short; + C : vector_unsigned_char) return vector_unsigned_short; + + function vec_perm + (A : vector_bool_short; + B : vector_bool_short; + C : vector_unsigned_char) return vector_bool_short; + + function vec_perm + (A : vector_pixel; + B : vector_pixel; + C : vector_unsigned_char) return vector_pixel; + + function vec_perm + (A : vector_signed_char; + B : vector_signed_char; + C : vector_unsigned_char) return vector_signed_char; + + function vec_perm + (A : vector_unsigned_char; + B : vector_unsigned_char; + C : vector_unsigned_char) return vector_unsigned_char; + + function vec_perm + (A : vector_bool_char; + B : vector_bool_char; + C : vector_unsigned_char) return vector_bool_char; + + -- vec_re -- + + function vec_re + (A : vector_float) return vector_float; + + -- vec_rl -- + + function vec_rl + (A : vector_signed_char; + B : vector_unsigned_char) return vector_signed_char; + + function vec_rl + (A : vector_unsigned_char; + B : vector_unsigned_char) return vector_unsigned_char; + + function vec_rl + (A : vector_signed_short; + B : vector_unsigned_short) return vector_signed_short; + + function vec_rl + (A : vector_unsigned_short; + B : vector_unsigned_short) return vector_unsigned_short; + + function vec_rl + (A : vector_signed_int; + B : vector_unsigned_int) return vector_signed_int; + + function vec_rl + (A : vector_unsigned_int; + B : vector_unsigned_int) return vector_unsigned_int; + + -- vec_vrlw -- + + function vec_vrlw + (A : vector_signed_int; + B : vector_unsigned_int) return vector_signed_int; + + function vec_vrlw + (A : vector_unsigned_int; + B : vector_unsigned_int) return vector_unsigned_int; + + -- vec_vrlh -- + + function vec_vrlh + (A : vector_signed_short; + B : vector_unsigned_short) return vector_signed_short; + + function vec_vrlh + (A : vector_unsigned_short; + B : vector_unsigned_short) return vector_unsigned_short; + + -- vec_vrlb -- + + function vec_vrlb + (A : vector_signed_char; + B : vector_unsigned_char) return vector_signed_char; + + function vec_vrlb + (A : vector_unsigned_char; + B : vector_unsigned_char) return vector_unsigned_char; + + -- vec_round -- + + function vec_round + (A : vector_float) return vector_float; + + -- vec_rsqrte -- + + function vec_rsqrte + (A : vector_float) return vector_float; + + -- vec_sel -- + + function vec_sel + (A : vector_float; + B : vector_float; + C : vector_bool_int) return vector_float; + + function vec_sel + (A : vector_float; + B : vector_float; + C : vector_unsigned_int) return vector_float; + + function vec_sel + (A : vector_signed_int; + B : vector_signed_int; + C : vector_bool_int) return vector_signed_int; + + function vec_sel + (A : vector_signed_int; + B : vector_signed_int; + C : vector_unsigned_int) return vector_signed_int; + + function vec_sel + (A : vector_unsigned_int; + B : vector_unsigned_int; + C : vector_bool_int) return vector_unsigned_int; + + function vec_sel + (A : vector_unsigned_int; + B : vector_unsigned_int; + C : vector_unsigned_int) return vector_unsigned_int; + + function vec_sel + (A : vector_bool_int; + B : vector_bool_int; + C : vector_bool_int) return vector_bool_int; + + function vec_sel + (A : vector_bool_int; + B : vector_bool_int; + C : vector_unsigned_int) return vector_bool_int; + + function vec_sel + (A : vector_signed_short; + B : vector_signed_short; + C : vector_bool_short) return vector_signed_short; + + function vec_sel + (A : vector_signed_short; + B : vector_signed_short; + C : vector_unsigned_short) return vector_signed_short; + + function vec_sel + (A : vector_unsigned_short; + B : vector_unsigned_short; + C : vector_bool_short) return vector_unsigned_short; + + function vec_sel + (A : vector_unsigned_short; + B : vector_unsigned_short; + C : vector_unsigned_short) return vector_unsigned_short; + + function vec_sel + (A : vector_bool_short; + B : vector_bool_short; + C : vector_bool_short) return vector_bool_short; + + function vec_sel + (A : vector_bool_short; + B : vector_bool_short; + C : vector_unsigned_short) return vector_bool_short; + + function vec_sel + (A : vector_signed_char; + B : vector_signed_char; + C : vector_bool_char) return vector_signed_char; + + function vec_sel + (A : vector_signed_char; + B : vector_signed_char; + C : vector_unsigned_char) return vector_signed_char; + + function vec_sel + (A : vector_unsigned_char; + B : vector_unsigned_char; + C : vector_bool_char) return vector_unsigned_char; + + function vec_sel + (A : vector_unsigned_char; + B : vector_unsigned_char; + C : vector_unsigned_char) return vector_unsigned_char; + + function vec_sel + (A : vector_bool_char; + B : vector_bool_char; + C : vector_bool_char) return vector_bool_char; + + function vec_sel + (A : vector_bool_char; + B : vector_bool_char; + C : vector_unsigned_char) return vector_bool_char; + + -- vec_sl -- + + function vec_sl + (A : vector_signed_char; + B : vector_unsigned_char) return vector_signed_char; + + function vec_sl + (A : vector_unsigned_char; + B : vector_unsigned_char) return vector_unsigned_char; + + function vec_sl + (A : vector_signed_short; + B : vector_unsigned_short) return vector_signed_short; + + function vec_sl + (A : vector_unsigned_short; + B : vector_unsigned_short) return vector_unsigned_short; + + function vec_sl + (A : vector_signed_int; + B : vector_unsigned_int) return vector_signed_int; + + function vec_sl + (A : vector_unsigned_int; + B : vector_unsigned_int) return vector_unsigned_int; + + -- vec_vslw -- + + function vec_vslw + (A : vector_signed_int; + B : vector_unsigned_int) return vector_signed_int; + + function vec_vslw + (A : vector_unsigned_int; + B : vector_unsigned_int) return vector_unsigned_int; + + -- vec_vslh -- + + function vec_vslh + (A : vector_signed_short; + B : vector_unsigned_short) return vector_signed_short; + + function vec_vslh + (A : vector_unsigned_short; + B : vector_unsigned_short) return vector_unsigned_short; + + -- vec_vslb -- + + function vec_vslb + (A : vector_signed_char; + B : vector_unsigned_char) return vector_signed_char; + + function vec_vslb + (A : vector_unsigned_char; + B : vector_unsigned_char) return vector_unsigned_char; + + -- vec_sld -- + + function vec_sld + (A : vector_float; + B : vector_float; + C : c_int) return vector_float + renames Low_Level_Interface.vec_sld_vf_vf_cint_r_vf; + + function vec_sld + (A : vector_signed_int; + B : vector_signed_int; + C : c_int) return vector_signed_int + renames Low_Level_Interface.vec_sld_vsi_vsi_cint_r_vsi; + + function vec_sld + (A : vector_unsigned_int; + B : vector_unsigned_int; + C : c_int) return vector_unsigned_int + renames Low_Level_Interface.vec_sld_vui_vui_cint_r_vui; + + function vec_sld + (A : vector_bool_int; + B : vector_bool_int; + C : c_int) return vector_bool_int + renames Low_Level_Interface.vec_sld_vbi_vbi_cint_r_vbi; + + function vec_sld + (A : vector_signed_short; + B : vector_signed_short; + C : c_int) return vector_signed_short + renames Low_Level_Interface.vec_sld_vss_vss_cint_r_vss; + + function vec_sld + (A : vector_unsigned_short; + B : vector_unsigned_short; + C : c_int) return vector_unsigned_short + renames Low_Level_Interface.vec_sld_vus_vus_cint_r_vus; + + function vec_sld + (A : vector_bool_short; + B : vector_bool_short; + C : c_int) return vector_bool_short + renames Low_Level_Interface.vec_sld_vbs_vbs_cint_r_vbs; + + function vec_sld + (A : vector_pixel; + B : vector_pixel; + C : c_int) return vector_pixel + renames Low_Level_Interface.vec_sld_vx_vx_cint_r_vx; + + function vec_sld + (A : vector_signed_char; + B : vector_signed_char; + C : c_int) return vector_signed_char + renames Low_Level_Interface.vec_sld_vsc_vsc_cint_r_vsc; + + function vec_sld + (A : vector_unsigned_char; + B : vector_unsigned_char; + C : c_int) return vector_unsigned_char + renames Low_Level_Interface.vec_sld_vuc_vuc_cint_r_vuc; + + function vec_sld + (A : vector_bool_char; + B : vector_bool_char; + C : c_int) return vector_bool_char + renames Low_Level_Interface.vec_sld_vbc_vbc_cint_r_vbc; + + -- vec_sll -- + + function vec_sll + (A : vector_signed_int; + B : vector_unsigned_int) return vector_signed_int; + + function vec_sll + (A : vector_signed_int; + B : vector_unsigned_short) return vector_signed_int; + + function vec_sll + (A : vector_signed_int; + B : vector_unsigned_char) return vector_signed_int; + + function vec_sll + (A : vector_unsigned_int; + B : vector_unsigned_int) return vector_unsigned_int; + + function vec_sll + (A : vector_unsigned_int; + B : vector_unsigned_short) return vector_unsigned_int; + + function vec_sll + (A : vector_unsigned_int; + B : vector_unsigned_char) return vector_unsigned_int; + + function vec_sll + (A : vector_bool_int; + B : vector_unsigned_int) return vector_bool_int; + + function vec_sll + (A : vector_bool_int; + B : vector_unsigned_short) return vector_bool_int; + + function vec_sll + (A : vector_bool_int; + B : vector_unsigned_char) return vector_bool_int; + + function vec_sll + (A : vector_signed_short; + B : vector_unsigned_int) return vector_signed_short; + + function vec_sll + (A : vector_signed_short; + B : vector_unsigned_short) return vector_signed_short; + + function vec_sll + (A : vector_signed_short; + B : vector_unsigned_char) return vector_signed_short; + + function vec_sll + (A : vector_unsigned_short; + B : vector_unsigned_int) return vector_unsigned_short; + + function vec_sll + (A : vector_unsigned_short; + B : vector_unsigned_short) return vector_unsigned_short; + + function vec_sll + (A : vector_unsigned_short; + B : vector_unsigned_char) return vector_unsigned_short; + + function vec_sll + (A : vector_bool_short; + B : vector_unsigned_int) return vector_bool_short; + + function vec_sll + (A : vector_bool_short; + B : vector_unsigned_short) return vector_bool_short; + + function vec_sll + (A : vector_bool_short; + B : vector_unsigned_char) return vector_bool_short; + + function vec_sll + (A : vector_pixel; + B : vector_unsigned_int) return vector_pixel; + + function vec_sll + (A : vector_pixel; + B : vector_unsigned_short) return vector_pixel; + + function vec_sll + (A : vector_pixel; + B : vector_unsigned_char) return vector_pixel; + + function vec_sll + (A : vector_signed_char; + B : vector_unsigned_int) return vector_signed_char; + + function vec_sll + (A : vector_signed_char; + B : vector_unsigned_short) return vector_signed_char; + + function vec_sll + (A : vector_signed_char; + B : vector_unsigned_char) return vector_signed_char; + + function vec_sll + (A : vector_unsigned_char; + B : vector_unsigned_int) return vector_unsigned_char; + + function vec_sll + (A : vector_unsigned_char; + B : vector_unsigned_short) return vector_unsigned_char; + + function vec_sll + (A : vector_unsigned_char; + B : vector_unsigned_char) return vector_unsigned_char; + + function vec_sll + (A : vector_bool_char; + B : vector_unsigned_int) return vector_bool_char; + + function vec_sll + (A : vector_bool_char; + B : vector_unsigned_short) return vector_bool_char; + + function vec_sll + (A : vector_bool_char; + B : vector_unsigned_char) return vector_bool_char; + + -- vec_slo -- + + function vec_slo + (A : vector_float; + B : vector_signed_char) return vector_float; + + function vec_slo + (A : vector_float; + B : vector_unsigned_char) return vector_float; + + function vec_slo + (A : vector_signed_int; + B : vector_signed_char) return vector_signed_int; + + function vec_slo + (A : vector_signed_int; + B : vector_unsigned_char) return vector_signed_int; + + function vec_slo + (A : vector_unsigned_int; + B : vector_signed_char) return vector_unsigned_int; + + function vec_slo + (A : vector_unsigned_int; + B : vector_unsigned_char) return vector_unsigned_int; + + function vec_slo + (A : vector_signed_short; + B : vector_signed_char) return vector_signed_short; + + function vec_slo + (A : vector_signed_short; + B : vector_unsigned_char) return vector_signed_short; + + function vec_slo + (A : vector_unsigned_short; + B : vector_signed_char) return vector_unsigned_short; + + function vec_slo + (A : vector_unsigned_short; + B : vector_unsigned_char) return vector_unsigned_short; + + function vec_slo + (A : vector_pixel; + B : vector_signed_char) return vector_pixel; + + function vec_slo + (A : vector_pixel; + B : vector_unsigned_char) return vector_pixel; + + function vec_slo + (A : vector_signed_char; + B : vector_signed_char) return vector_signed_char; + + function vec_slo + (A : vector_signed_char; + B : vector_unsigned_char) return vector_signed_char; + + function vec_slo + (A : vector_unsigned_char; + B : vector_signed_char) return vector_unsigned_char; + + function vec_slo + (A : vector_unsigned_char; + B : vector_unsigned_char) return vector_unsigned_char; + + -- vec_splat -- + + function vec_splat + (A : vector_signed_char; + B : c_int) return vector_signed_char + renames Low_Level_Interface.vec_splat_vsc_cint_r_vsc; + + function vec_splat + (A : vector_unsigned_char; + B : c_int) return vector_unsigned_char + renames Low_Level_Interface.vec_splat_vuc_cint_r_vuc; + + function vec_splat + (A : vector_bool_char; + B : c_int) return vector_bool_char + renames Low_Level_Interface.vec_splat_vbc_cint_r_vbc; + + function vec_splat + (A : vector_signed_short; + B : c_int) return vector_signed_short + renames Low_Level_Interface.vec_splat_vss_cint_r_vss; + + function vec_splat + (A : vector_unsigned_short; + B : c_int) return vector_unsigned_short + renames Low_Level_Interface.vec_splat_vus_cint_r_vus; + + function vec_splat + (A : vector_bool_short; + B : c_int) return vector_bool_short + renames Low_Level_Interface.vec_splat_vbs_cint_r_vbs; + + function vec_splat + (A : vector_pixel; + B : c_int) return vector_pixel + renames Low_Level_Interface.vec_splat_vx_cint_r_vx; + + function vec_splat + (A : vector_float; + B : c_int) return vector_float + renames Low_Level_Interface.vec_splat_vf_cint_r_vf; + + function vec_splat + (A : vector_signed_int; + B : c_int) return vector_signed_int + renames Low_Level_Interface.vec_splat_vsi_cint_r_vsi; + + function vec_splat + (A : vector_unsigned_int; + B : c_int) return vector_unsigned_int + renames Low_Level_Interface.vec_splat_vui_cint_r_vui; + + function vec_splat + (A : vector_bool_int; + B : c_int) return vector_bool_int + renames Low_Level_Interface.vec_splat_vbi_cint_r_vbi; + + -- vec_vspltw -- + + function vec_vspltw + (A : vector_float; + B : c_int) return vector_float + renames Low_Level_Interface.vec_vspltw_vf_cint_r_vf; + + function vec_vspltw + (A : vector_signed_int; + B : c_int) return vector_signed_int + renames Low_Level_Interface.vec_vspltw_vsi_cint_r_vsi; + + function vec_vspltw + (A : vector_unsigned_int; + B : c_int) return vector_unsigned_int + renames Low_Level_Interface.vec_vspltw_vui_cint_r_vui; + + function vec_vspltw + (A : vector_bool_int; + B : c_int) return vector_bool_int + renames Low_Level_Interface.vec_vspltw_vbi_cint_r_vbi; + + -- vec_vsplth -- + + function vec_vsplth + (A : vector_bool_short; + B : c_int) return vector_bool_short + renames Low_Level_Interface.vec_vsplth_vbs_cint_r_vbs; + + function vec_vsplth + (A : vector_signed_short; + B : c_int) return vector_signed_short + renames Low_Level_Interface.vec_vsplth_vss_cint_r_vss; + + function vec_vsplth + (A : vector_unsigned_short; + B : c_int) return vector_unsigned_short + renames Low_Level_Interface.vec_vsplth_vus_cint_r_vus; + + function vec_vsplth + (A : vector_pixel; + B : c_int) return vector_pixel + renames Low_Level_Interface.vec_vsplth_vx_cint_r_vx; + + -- vec_vspltb -- + + function vec_vspltb + (A : vector_signed_char; + B : c_int) return vector_signed_char + renames Low_Level_Interface.vec_vspltb_vsc_cint_r_vsc; + + function vec_vspltb + (A : vector_unsigned_char; + B : c_int) return vector_unsigned_char + renames Low_Level_Interface.vec_vspltb_vuc_cint_r_vuc; + + function vec_vspltb + (A : vector_bool_char; + B : c_int) return vector_bool_char + renames Low_Level_Interface.vec_vspltb_vbc_cint_r_vbc; + + -- vec_splat_s8 -- + + function vec_splat_s8 + (A : c_int) return vector_signed_char + renames Low_Level_Interface.vec_splat_s8_cint_r_vsc; + + -- vec_splat_s16 -- + + function vec_splat_s16 + (A : c_int) return vector_signed_short + renames Low_Level_Interface.vec_splat_s16_cint_r_vss; + + -- vec_splat_s32 -- + + function vec_splat_s32 + (A : c_int) return vector_signed_int + renames Low_Level_Interface.vec_splat_s32_cint_r_vsi; + + -- vec_splat_u8 -- + + function vec_splat_u8 + (A : c_int) return vector_unsigned_char + renames Low_Level_Interface.vec_splat_u8_cint_r_vuc; + + -- vec_splat_u16 -- + + function vec_splat_u16 + (A : c_int) return vector_unsigned_short + renames Low_Level_Interface.vec_splat_u16_cint_r_vus; + + -- vec_splat_u32 -- + + function vec_splat_u32 + (A : c_int) return vector_unsigned_int + renames Low_Level_Interface.vec_splat_u32_cint_r_vui; + + -- vec_sr -- + + function vec_sr + (A : vector_signed_char; + B : vector_unsigned_char) return vector_signed_char; + + function vec_sr + (A : vector_unsigned_char; + B : vector_unsigned_char) return vector_unsigned_char; + + function vec_sr + (A : vector_signed_short; + B : vector_unsigned_short) return vector_signed_short; + + function vec_sr + (A : vector_unsigned_short; + B : vector_unsigned_short) return vector_unsigned_short; + + function vec_sr + (A : vector_signed_int; + B : vector_unsigned_int) return vector_signed_int; + + function vec_sr + (A : vector_unsigned_int; + B : vector_unsigned_int) return vector_unsigned_int; + + -- vec_vsrw -- + + function vec_vsrw + (A : vector_signed_int; + B : vector_unsigned_int) return vector_signed_int; + + function vec_vsrw + (A : vector_unsigned_int; + B : vector_unsigned_int) return vector_unsigned_int; + + -- vec_vsrh -- + + function vec_vsrh + (A : vector_signed_short; + B : vector_unsigned_short) return vector_signed_short; + + function vec_vsrh + (A : vector_unsigned_short; + B : vector_unsigned_short) return vector_unsigned_short; + + -- vec_vsrb -- + + function vec_vsrb + (A : vector_signed_char; + B : vector_unsigned_char) return vector_signed_char; + + function vec_vsrb + (A : vector_unsigned_char; + B : vector_unsigned_char) return vector_unsigned_char; + + -- vec_sra -- + + function vec_sra + (A : vector_signed_char; + B : vector_unsigned_char) return vector_signed_char; + + function vec_sra + (A : vector_unsigned_char; + B : vector_unsigned_char) return vector_unsigned_char; + + function vec_sra + (A : vector_signed_short; + B : vector_unsigned_short) return vector_signed_short; + + function vec_sra + (A : vector_unsigned_short; + B : vector_unsigned_short) return vector_unsigned_short; + + function vec_sra + (A : vector_signed_int; + B : vector_unsigned_int) return vector_signed_int; + + function vec_sra + (A : vector_unsigned_int; + B : vector_unsigned_int) return vector_unsigned_int; + + -- vec_vsraw -- + + function vec_vsraw + (A : vector_signed_int; + B : vector_unsigned_int) return vector_signed_int; + + function vec_vsraw + (A : vector_unsigned_int; + B : vector_unsigned_int) return vector_unsigned_int; + + -- vec_vsrah -- + + function vec_vsrah + (A : vector_signed_short; + B : vector_unsigned_short) return vector_signed_short; + + function vec_vsrah + (A : vector_unsigned_short; + B : vector_unsigned_short) return vector_unsigned_short; + + -- vec_vsrab -- + + function vec_vsrab + (A : vector_signed_char; + B : vector_unsigned_char) return vector_signed_char; + + function vec_vsrab + (A : vector_unsigned_char; + B : vector_unsigned_char) return vector_unsigned_char; + + -- vec_srl -- + + function vec_srl + (A : vector_signed_int; + B : vector_unsigned_int) return vector_signed_int; + + function vec_srl + (A : vector_signed_int; + B : vector_unsigned_short) return vector_signed_int; + + function vec_srl + (A : vector_signed_int; + B : vector_unsigned_char) return vector_signed_int; + + function vec_srl + (A : vector_unsigned_int; + B : vector_unsigned_int) return vector_unsigned_int; + + function vec_srl + (A : vector_unsigned_int; + B : vector_unsigned_short) return vector_unsigned_int; + + function vec_srl + (A : vector_unsigned_int; + B : vector_unsigned_char) return vector_unsigned_int; + + function vec_srl + (A : vector_bool_int; + B : vector_unsigned_int) return vector_bool_int; + + function vec_srl + (A : vector_bool_int; + B : vector_unsigned_short) return vector_bool_int; + + function vec_srl + (A : vector_bool_int; + B : vector_unsigned_char) return vector_bool_int; + + function vec_srl + (A : vector_signed_short; + B : vector_unsigned_int) return vector_signed_short; + + function vec_srl + (A : vector_signed_short; + B : vector_unsigned_short) return vector_signed_short; + + function vec_srl + (A : vector_signed_short; + B : vector_unsigned_char) return vector_signed_short; + + function vec_srl + (A : vector_unsigned_short; + B : vector_unsigned_int) return vector_unsigned_short; + + function vec_srl + (A : vector_unsigned_short; + B : vector_unsigned_short) return vector_unsigned_short; + + function vec_srl + (A : vector_unsigned_short; + B : vector_unsigned_char) return vector_unsigned_short; + + function vec_srl + (A : vector_bool_short; + B : vector_unsigned_int) return vector_bool_short; + + function vec_srl + (A : vector_bool_short; + B : vector_unsigned_short) return vector_bool_short; + + function vec_srl + (A : vector_bool_short; + B : vector_unsigned_char) return vector_bool_short; + + function vec_srl + (A : vector_pixel; + B : vector_unsigned_int) return vector_pixel; + + function vec_srl + (A : vector_pixel; + B : vector_unsigned_short) return vector_pixel; + + function vec_srl + (A : vector_pixel; + B : vector_unsigned_char) return vector_pixel; + + function vec_srl + (A : vector_signed_char; + B : vector_unsigned_int) return vector_signed_char; + + function vec_srl + (A : vector_signed_char; + B : vector_unsigned_short) return vector_signed_char; + + function vec_srl + (A : vector_signed_char; + B : vector_unsigned_char) return vector_signed_char; + + function vec_srl + (A : vector_unsigned_char; + B : vector_unsigned_int) return vector_unsigned_char; + + function vec_srl + (A : vector_unsigned_char; + B : vector_unsigned_short) return vector_unsigned_char; + + function vec_srl + (A : vector_unsigned_char; + B : vector_unsigned_char) return vector_unsigned_char; + + function vec_srl + (A : vector_bool_char; + B : vector_unsigned_int) return vector_bool_char; + + function vec_srl + (A : vector_bool_char; + B : vector_unsigned_short) return vector_bool_char; + + function vec_srl + (A : vector_bool_char; + B : vector_unsigned_char) return vector_bool_char; + + -- vec_sro -- + + function vec_sro + (A : vector_float; + B : vector_signed_char) return vector_float; + + function vec_sro + (A : vector_float; + B : vector_unsigned_char) return vector_float; + + function vec_sro + (A : vector_signed_int; + B : vector_signed_char) return vector_signed_int; + + function vec_sro + (A : vector_signed_int; + B : vector_unsigned_char) return vector_signed_int; + + function vec_sro + (A : vector_unsigned_int; + B : vector_signed_char) return vector_unsigned_int; + + function vec_sro + (A : vector_unsigned_int; + B : vector_unsigned_char) return vector_unsigned_int; + + function vec_sro + (A : vector_signed_short; + B : vector_signed_char) return vector_signed_short; + + function vec_sro + (A : vector_signed_short; + B : vector_unsigned_char) return vector_signed_short; + + function vec_sro + (A : vector_unsigned_short; + B : vector_signed_char) return vector_unsigned_short; + + function vec_sro + (A : vector_unsigned_short; + B : vector_unsigned_char) return vector_unsigned_short; + + function vec_sro + (A : vector_pixel; + B : vector_signed_char) return vector_pixel; + + function vec_sro + (A : vector_pixel; + B : vector_unsigned_char) return vector_pixel; + + function vec_sro + (A : vector_signed_char; + B : vector_signed_char) return vector_signed_char; + + function vec_sro + (A : vector_signed_char; + B : vector_unsigned_char) return vector_signed_char; + + function vec_sro + (A : vector_unsigned_char; + B : vector_signed_char) return vector_unsigned_char; + + function vec_sro + (A : vector_unsigned_char; + B : vector_unsigned_char) return vector_unsigned_char; + + -- vec_st -- + + procedure vec_st + (A : vector_float; + B : c_int; + C : vector_float_ptr); + + procedure vec_st + (A : vector_float; + B : c_int; + C : float_ptr); + + procedure vec_st + (A : vector_signed_int; + B : c_int; + C : vector_signed_int_ptr); + + procedure vec_st + (A : vector_signed_int; + B : c_int; + C : int_ptr); + + procedure vec_st + (A : vector_unsigned_int; + B : c_int; + C : vector_unsigned_int_ptr); + + procedure vec_st + (A : vector_unsigned_int; + B : c_int; + C : unsigned_int_ptr); + + procedure vec_st + (A : vector_bool_int; + B : c_int; + C : vector_bool_int_ptr); + + procedure vec_st + (A : vector_bool_int; + B : c_int; + C : unsigned_int_ptr); + + procedure vec_st + (A : vector_bool_int; + B : c_int; + C : int_ptr); + + procedure vec_st + (A : vector_signed_short; + B : c_int; + C : vector_signed_short_ptr); + + procedure vec_st + (A : vector_signed_short; + B : c_int; + C : short_ptr); + + procedure vec_st + (A : vector_unsigned_short; + B : c_int; + C : vector_unsigned_short_ptr); + + procedure vec_st + (A : vector_unsigned_short; + B : c_int; + C : unsigned_short_ptr); + + procedure vec_st + (A : vector_bool_short; + B : c_int; + C : vector_bool_short_ptr); + + procedure vec_st + (A : vector_bool_short; + B : c_int; + C : unsigned_short_ptr); + + procedure vec_st + (A : vector_pixel; + B : c_int; + C : vector_pixel_ptr); + + procedure vec_st + (A : vector_pixel; + B : c_int; + C : unsigned_short_ptr); + + procedure vec_st + (A : vector_pixel; + B : c_int; + C : short_ptr); + + procedure vec_st + (A : vector_bool_short; + B : c_int; + C : short_ptr); + + procedure vec_st + (A : vector_signed_char; + B : c_int; + C : vector_signed_char_ptr); + + procedure vec_st + (A : vector_signed_char; + B : c_int; + C : signed_char_ptr); + + procedure vec_st + (A : vector_unsigned_char; + B : c_int; + C : vector_unsigned_char_ptr); + + procedure vec_st + (A : vector_unsigned_char; + B : c_int; + C : unsigned_char_ptr); + + procedure vec_st + (A : vector_bool_char; + B : c_int; + C : vector_bool_char_ptr); + + procedure vec_st + (A : vector_bool_char; + B : c_int; + C : unsigned_char_ptr); + + procedure vec_st + (A : vector_bool_char; + B : c_int; + C : signed_char_ptr); + + -- vec_ste -- + + procedure vec_ste + (A : vector_signed_char; + B : c_int; + C : signed_char_ptr); + + procedure vec_ste + (A : vector_unsigned_char; + B : c_int; + C : unsigned_char_ptr); + + procedure vec_ste + (A : vector_bool_char; + B : c_int; + C : signed_char_ptr); + + procedure vec_ste + (A : vector_bool_char; + B : c_int; + C : unsigned_char_ptr); + + procedure vec_ste + (A : vector_signed_short; + B : c_int; + C : short_ptr); + + procedure vec_ste + (A : vector_unsigned_short; + B : c_int; + C : unsigned_short_ptr); + + procedure vec_ste + (A : vector_bool_short; + B : c_int; + C : short_ptr); + + procedure vec_ste + (A : vector_bool_short; + B : c_int; + C : unsigned_short_ptr); + + procedure vec_ste + (A : vector_pixel; + B : c_int; + C : short_ptr); + + procedure vec_ste + (A : vector_pixel; + B : c_int; + C : unsigned_short_ptr); + + procedure vec_ste + (A : vector_float; + B : c_int; + C : float_ptr); + + procedure vec_ste + (A : vector_signed_int; + B : c_int; + C : int_ptr); + + procedure vec_ste + (A : vector_unsigned_int; + B : c_int; + C : unsigned_int_ptr); + + procedure vec_ste + (A : vector_bool_int; + B : c_int; + C : int_ptr); + + procedure vec_ste + (A : vector_bool_int; + B : c_int; + C : unsigned_int_ptr); + + -- vec_stvewx -- + + procedure vec_stvewx + (A : vector_float; + B : c_int; + C : float_ptr); + + procedure vec_stvewx + (A : vector_signed_int; + B : c_int; + C : int_ptr); + + procedure vec_stvewx + (A : vector_unsigned_int; + B : c_int; + C : unsigned_int_ptr); + + procedure vec_stvewx + (A : vector_bool_int; + B : c_int; + C : int_ptr); + + procedure vec_stvewx + (A : vector_bool_int; + B : c_int; + C : unsigned_int_ptr); + + -- vec_stvehx -- + + procedure vec_stvehx + (A : vector_signed_short; + B : c_int; + C : short_ptr); + + procedure vec_stvehx + (A : vector_unsigned_short; + B : c_int; + C : unsigned_short_ptr); + + procedure vec_stvehx + (A : vector_bool_short; + B : c_int; + C : short_ptr); + + procedure vec_stvehx + (A : vector_bool_short; + B : c_int; + C : unsigned_short_ptr); + + procedure vec_stvehx + (A : vector_pixel; + B : c_int; + C : short_ptr); + + procedure vec_stvehx + (A : vector_pixel; + B : c_int; + C : unsigned_short_ptr); + + -- vec_stvebx -- + + procedure vec_stvebx + (A : vector_signed_char; + B : c_int; + C : signed_char_ptr); + + procedure vec_stvebx + (A : vector_unsigned_char; + B : c_int; + C : unsigned_char_ptr); + + procedure vec_stvebx + (A : vector_bool_char; + B : c_int; + C : signed_char_ptr); + + procedure vec_stvebx + (A : vector_bool_char; + B : c_int; + C : unsigned_char_ptr); + + -- vec_stl -- + + procedure vec_stl + (A : vector_float; + B : c_int; + C : vector_float_ptr); + + procedure vec_stl + (A : vector_float; + B : c_int; + C : float_ptr); + + procedure vec_stl + (A : vector_signed_int; + B : c_int; + C : vector_signed_int_ptr); + + procedure vec_stl + (A : vector_signed_int; + B : c_int; + C : int_ptr); + + procedure vec_stl + (A : vector_unsigned_int; + B : c_int; + C : vector_unsigned_int_ptr); + + procedure vec_stl + (A : vector_unsigned_int; + B : c_int; + C : unsigned_int_ptr); + + procedure vec_stl + (A : vector_bool_int; + B : c_int; + C : vector_bool_int_ptr); + + procedure vec_stl + (A : vector_bool_int; + B : c_int; + C : unsigned_int_ptr); + + procedure vec_stl + (A : vector_bool_int; + B : c_int; + C : int_ptr); + + procedure vec_stl + (A : vector_signed_short; + B : c_int; + C : vector_signed_short_ptr); + + procedure vec_stl + (A : vector_signed_short; + B : c_int; + C : short_ptr); + + procedure vec_stl + (A : vector_unsigned_short; + B : c_int; + C : vector_unsigned_short_ptr); + + procedure vec_stl + (A : vector_unsigned_short; + B : c_int; + C : unsigned_short_ptr); + + procedure vec_stl + (A : vector_bool_short; + B : c_int; + C : vector_bool_short_ptr); + + procedure vec_stl + (A : vector_bool_short; + B : c_int; + C : unsigned_short_ptr); + + procedure vec_stl + (A : vector_bool_short; + B : c_int; + C : short_ptr); + + procedure vec_stl + (A : vector_pixel; + B : c_int; + C : vector_pixel_ptr); + + procedure vec_stl + (A : vector_pixel; + B : c_int; + C : unsigned_short_ptr); + + procedure vec_stl + (A : vector_pixel; + B : c_int; + C : short_ptr); + + procedure vec_stl + (A : vector_signed_char; + B : c_int; + C : vector_signed_char_ptr); + + procedure vec_stl + (A : vector_signed_char; + B : c_int; + C : signed_char_ptr); + + procedure vec_stl + (A : vector_unsigned_char; + B : c_int; + C : vector_unsigned_char_ptr); + + procedure vec_stl + (A : vector_unsigned_char; + B : c_int; + C : unsigned_char_ptr); + + procedure vec_stl + (A : vector_bool_char; + B : c_int; + C : vector_bool_char_ptr); + + procedure vec_stl + (A : vector_bool_char; + B : c_int; + C : unsigned_char_ptr); + + procedure vec_stl + (A : vector_bool_char; + B : c_int; + C : signed_char_ptr); + + -- vec_sub -- + + function vec_sub + (A : vector_bool_char; + B : vector_signed_char) return vector_signed_char; + + function vec_sub + (A : vector_signed_char; + B : vector_bool_char) return vector_signed_char; + + function vec_sub + (A : vector_signed_char; + B : vector_signed_char) return vector_signed_char; + + function vec_sub + (A : vector_bool_char; + B : vector_unsigned_char) return vector_unsigned_char; + + function vec_sub + (A : vector_unsigned_char; + B : vector_bool_char) return vector_unsigned_char; + + function vec_sub + (A : vector_unsigned_char; + B : vector_unsigned_char) return vector_unsigned_char; + + function vec_sub + (A : vector_bool_short; + B : vector_signed_short) return vector_signed_short; + + function vec_sub + (A : vector_signed_short; + B : vector_bool_short) return vector_signed_short; + + function vec_sub + (A : vector_signed_short; + B : vector_signed_short) return vector_signed_short; + + function vec_sub + (A : vector_bool_short; + B : vector_unsigned_short) return vector_unsigned_short; + + function vec_sub + (A : vector_unsigned_short; + B : vector_bool_short) return vector_unsigned_short; + + function vec_sub + (A : vector_unsigned_short; + B : vector_unsigned_short) return vector_unsigned_short; + + function vec_sub + (A : vector_bool_int; + B : vector_signed_int) return vector_signed_int; + + function vec_sub + (A : vector_signed_int; + B : vector_bool_int) return vector_signed_int; + + function vec_sub + (A : vector_signed_int; + B : vector_signed_int) return vector_signed_int; + + function vec_sub + (A : vector_bool_int; + B : vector_unsigned_int) return vector_unsigned_int; + + function vec_sub + (A : vector_unsigned_int; + B : vector_bool_int) return vector_unsigned_int; + + function vec_sub + (A : vector_unsigned_int; + B : vector_unsigned_int) return vector_unsigned_int; + + function vec_sub + (A : vector_float; + B : vector_float) return vector_float; + + -- vec_vsubfp -- + + function vec_vsubfp + (A : vector_float; + B : vector_float) return vector_float; + + -- vec_vsubuwm -- + + function vec_vsubuwm + (A : vector_bool_int; + B : vector_signed_int) return vector_signed_int; + + function vec_vsubuwm + (A : vector_signed_int; + B : vector_bool_int) return vector_signed_int; + + function vec_vsubuwm + (A : vector_signed_int; + B : vector_signed_int) return vector_signed_int; + + function vec_vsubuwm + (A : vector_bool_int; + B : vector_unsigned_int) return vector_unsigned_int; + + function vec_vsubuwm + (A : vector_unsigned_int; + B : vector_bool_int) return vector_unsigned_int; + + function vec_vsubuwm + (A : vector_unsigned_int; + B : vector_unsigned_int) return vector_unsigned_int; + + -- vec_vsubuhm -- + + function vec_vsubuhm + (A : vector_bool_short; + B : vector_signed_short) return vector_signed_short; + + function vec_vsubuhm + (A : vector_signed_short; + B : vector_bool_short) return vector_signed_short; + + function vec_vsubuhm + (A : vector_signed_short; + B : vector_signed_short) return vector_signed_short; + + function vec_vsubuhm + (A : vector_bool_short; + B : vector_unsigned_short) return vector_unsigned_short; + + function vec_vsubuhm + (A : vector_unsigned_short; + B : vector_bool_short) return vector_unsigned_short; + + function vec_vsubuhm + (A : vector_unsigned_short; + B : vector_unsigned_short) return vector_unsigned_short; + + -- vec_vsububm -- + + function vec_vsububm + (A : vector_bool_char; + B : vector_signed_char) return vector_signed_char; + + function vec_vsububm + (A : vector_signed_char; + B : vector_bool_char) return vector_signed_char; + + function vec_vsububm + (A : vector_signed_char; + B : vector_signed_char) return vector_signed_char; + + function vec_vsububm + (A : vector_bool_char; + B : vector_unsigned_char) return vector_unsigned_char; + + function vec_vsububm + (A : vector_unsigned_char; + B : vector_bool_char) return vector_unsigned_char; + + function vec_vsububm + (A : vector_unsigned_char; + B : vector_unsigned_char) return vector_unsigned_char; + + -- vec_subc -- + + function vec_subc + (A : vector_unsigned_int; + B : vector_unsigned_int) return vector_unsigned_int; + + -- vec_subs -- + + function vec_subs + (A : vector_bool_char; + B : vector_unsigned_char) return vector_unsigned_char; + + function vec_subs + (A : vector_unsigned_char; + B : vector_bool_char) return vector_unsigned_char; + + function vec_subs + (A : vector_unsigned_char; + B : vector_unsigned_char) return vector_unsigned_char; + + function vec_subs + (A : vector_bool_char; + B : vector_signed_char) return vector_signed_char; + + function vec_subs + (A : vector_signed_char; + B : vector_bool_char) return vector_signed_char; + + function vec_subs + (A : vector_signed_char; + B : vector_signed_char) return vector_signed_char; + + function vec_subs + (A : vector_bool_short; + B : vector_unsigned_short) return vector_unsigned_short; + + function vec_subs + (A : vector_unsigned_short; + B : vector_bool_short) return vector_unsigned_short; + + function vec_subs + (A : vector_unsigned_short; + B : vector_unsigned_short) return vector_unsigned_short; + + function vec_subs + (A : vector_bool_short; + B : vector_signed_short) return vector_signed_short; + + function vec_subs + (A : vector_signed_short; + B : vector_bool_short) return vector_signed_short; + + function vec_subs + (A : vector_signed_short; + B : vector_signed_short) return vector_signed_short; + + function vec_subs + (A : vector_bool_int; + B : vector_unsigned_int) return vector_unsigned_int; + + function vec_subs + (A : vector_unsigned_int; + B : vector_bool_int) return vector_unsigned_int; + + function vec_subs + (A : vector_unsigned_int; + B : vector_unsigned_int) return vector_unsigned_int; + + function vec_subs + (A : vector_bool_int; + B : vector_signed_int) return vector_signed_int; + + function vec_subs + (A : vector_signed_int; + B : vector_bool_int) return vector_signed_int; + + function vec_subs + (A : vector_signed_int; + B : vector_signed_int) return vector_signed_int; + + -- vec_vsubsws -- + + function vec_vsubsws + (A : vector_bool_int; + B : vector_signed_int) return vector_signed_int; + + function vec_vsubsws + (A : vector_signed_int; + B : vector_bool_int) return vector_signed_int; + + function vec_vsubsws + (A : vector_signed_int; + B : vector_signed_int) return vector_signed_int; + + -- vec_vsubuws -- + + function vec_vsubuws + (A : vector_bool_int; + B : vector_unsigned_int) return vector_unsigned_int; + + function vec_vsubuws + (A : vector_unsigned_int; + B : vector_bool_int) return vector_unsigned_int; + + function vec_vsubuws + (A : vector_unsigned_int; + B : vector_unsigned_int) return vector_unsigned_int; + + -- vec_vsubshs -- + + function vec_vsubshs + (A : vector_bool_short; + B : vector_signed_short) return vector_signed_short; + + function vec_vsubshs + (A : vector_signed_short; + B : vector_bool_short) return vector_signed_short; + + function vec_vsubshs + (A : vector_signed_short; + B : vector_signed_short) return vector_signed_short; + + -- vec_vsubuhs -- + + function vec_vsubuhs + (A : vector_bool_short; + B : vector_unsigned_short) return vector_unsigned_short; + + function vec_vsubuhs + (A : vector_unsigned_short; + B : vector_bool_short) return vector_unsigned_short; + + function vec_vsubuhs + (A : vector_unsigned_short; + B : vector_unsigned_short) return vector_unsigned_short; + + -- vec_vsubsbs -- + + function vec_vsubsbs + (A : vector_bool_char; + B : vector_signed_char) return vector_signed_char; + + function vec_vsubsbs + (A : vector_signed_char; + B : vector_bool_char) return vector_signed_char; + + function vec_vsubsbs + (A : vector_signed_char; + B : vector_signed_char) return vector_signed_char; + + -- vec_vsububs -- + + function vec_vsububs + (A : vector_bool_char; + B : vector_unsigned_char) return vector_unsigned_char; + + function vec_vsububs + (A : vector_unsigned_char; + B : vector_bool_char) return vector_unsigned_char; + + function vec_vsububs + (A : vector_unsigned_char; + B : vector_unsigned_char) return vector_unsigned_char; + + -- vec_sum4s -- + + function vec_sum4s + (A : vector_unsigned_char; + B : vector_unsigned_int) return vector_unsigned_int; + + function vec_sum4s + (A : vector_signed_char; + B : vector_signed_int) return vector_signed_int; + + function vec_sum4s + (A : vector_signed_short; + B : vector_signed_int) return vector_signed_int; + + -- vec_vsum4shs -- + + function vec_vsum4shs + (A : vector_signed_short; + B : vector_signed_int) return vector_signed_int; + + -- vec_vsum4sbs -- + + function vec_vsum4sbs + (A : vector_signed_char; + B : vector_signed_int) return vector_signed_int; + + -- vec_vsum4ubs -- + + function vec_vsum4ubs + (A : vector_unsigned_char; + B : vector_unsigned_int) return vector_unsigned_int; + + -- vec_sum2s -- + + function vec_sum2s + (A : vector_signed_int; + B : vector_signed_int) return vector_signed_int; + + -- vec_sums -- + + function vec_sums + (A : vector_signed_int; + B : vector_signed_int) return vector_signed_int; + + -- vec_trunc -- + + function vec_trunc + (A : vector_float) return vector_float; + + -- vec_unpackh -- + + function vec_unpackh + (A : vector_signed_char) return vector_signed_short; + + function vec_unpackh + (A : vector_bool_char) return vector_bool_short; + + function vec_unpackh + (A : vector_signed_short) return vector_signed_int; + + function vec_unpackh + (A : vector_bool_short) return vector_bool_int; + + function vec_unpackh + (A : vector_pixel) return vector_unsigned_int; + + -- vec_vupkhsh -- + + function vec_vupkhsh + (A : vector_bool_short) return vector_bool_int; + + function vec_vupkhsh + (A : vector_signed_short) return vector_signed_int; + + -- vec_vupkhpx -- + + function vec_vupkhpx + (A : vector_pixel) return vector_unsigned_int; + + -- vec_vupkhsb -- + + function vec_vupkhsb + (A : vector_bool_char) return vector_bool_short; + + function vec_vupkhsb + (A : vector_signed_char) return vector_signed_short; + + -- vec_unpackl -- + + function vec_unpackl + (A : vector_signed_char) return vector_signed_short; + + function vec_unpackl + (A : vector_bool_char) return vector_bool_short; + + function vec_unpackl + (A : vector_pixel) return vector_unsigned_int; + + function vec_unpackl + (A : vector_signed_short) return vector_signed_int; + + function vec_unpackl + (A : vector_bool_short) return vector_bool_int; + + -- vec_vupklpx -- + + function vec_vupklpx + (A : vector_pixel) return vector_unsigned_int; + + -- vec_upklsh -- + + function vec_vupklsh + (A : vector_bool_short) return vector_bool_int; + + function vec_vupklsh + (A : vector_signed_short) return vector_signed_int; + + -- vec_vupklsb -- + + function vec_vupklsb + (A : vector_bool_char) return vector_bool_short; + + function vec_vupklsb + (A : vector_signed_char) return vector_signed_short; + + -- vec_xor -- + + function vec_xor + (A : vector_float; + B : vector_float) return vector_float; + + function vec_xor + (A : vector_float; + B : vector_bool_int) return vector_float; + + function vec_xor + (A : vector_bool_int; + B : vector_float) return vector_float; + + function vec_xor + (A : vector_bool_int; + B : vector_bool_int) return vector_bool_int; + + function vec_xor + (A : vector_bool_int; + B : vector_signed_int) return vector_signed_int; + + function vec_xor + (A : vector_signed_int; + B : vector_bool_int) return vector_signed_int; + + function vec_xor + (A : vector_signed_int; + B : vector_signed_int) return vector_signed_int; + + function vec_xor + (A : vector_bool_int; + B : vector_unsigned_int) return vector_unsigned_int; + + function vec_xor + (A : vector_unsigned_int; + B : vector_bool_int) return vector_unsigned_int; + + function vec_xor + (A : vector_unsigned_int; + B : vector_unsigned_int) return vector_unsigned_int; + + function vec_xor + (A : vector_bool_short; + B : vector_bool_short) return vector_bool_short; + + function vec_xor + (A : vector_bool_short; + B : vector_signed_short) return vector_signed_short; + + function vec_xor + (A : vector_signed_short; + B : vector_bool_short) return vector_signed_short; + + function vec_xor + (A : vector_signed_short; + B : vector_signed_short) return vector_signed_short; + + function vec_xor + (A : vector_bool_short; + B : vector_unsigned_short) return vector_unsigned_short; + + function vec_xor + (A : vector_unsigned_short; + B : vector_bool_short) return vector_unsigned_short; + + function vec_xor + (A : vector_unsigned_short; + B : vector_unsigned_short) return vector_unsigned_short; + + function vec_xor + (A : vector_bool_char; + B : vector_signed_char) return vector_signed_char; + + function vec_xor + (A : vector_bool_char; + B : vector_bool_char) return vector_bool_char; + + function vec_xor + (A : vector_signed_char; + B : vector_bool_char) return vector_signed_char; + + function vec_xor + (A : vector_signed_char; + B : vector_signed_char) return vector_signed_char; + + function vec_xor + (A : vector_bool_char; + B : vector_unsigned_char) return vector_unsigned_char; + + function vec_xor + (A : vector_unsigned_char; + B : vector_bool_char) return vector_unsigned_char; + + function vec_xor + (A : vector_unsigned_char; + B : vector_unsigned_char) return vector_unsigned_char; + + ---------------------------------- + -- [PIM-4.5 AltiVec predicates] -- + ---------------------------------- + + -- vec_all_eq -- + + function vec_all_eq + (A : vector_signed_char; + B : vector_bool_char) return c_int; + + function vec_all_eq + (A : vector_signed_char; + B : vector_signed_char) return c_int; + + function vec_all_eq + (A : vector_unsigned_char; + B : vector_bool_char) return c_int; + + function vec_all_eq + (A : vector_unsigned_char; + B : vector_unsigned_char) return c_int; + + function vec_all_eq + (A : vector_bool_char; + B : vector_bool_char) return c_int; + + function vec_all_eq + (A : vector_bool_char; + B : vector_unsigned_char) return c_int; + + function vec_all_eq + (A : vector_bool_char; + B : vector_signed_char) return c_int; + + function vec_all_eq + (A : vector_signed_short; + B : vector_bool_short) return c_int; + + function vec_all_eq + (A : vector_signed_short; + B : vector_signed_short) return c_int; + + function vec_all_eq + (A : vector_unsigned_short; + B : vector_bool_short) return c_int; + + function vec_all_eq + (A : vector_unsigned_short; + B : vector_unsigned_short) return c_int; + + function vec_all_eq + (A : vector_bool_short; + B : vector_bool_short) return c_int; + + function vec_all_eq + (A : vector_bool_short; + B : vector_unsigned_short) return c_int; + + function vec_all_eq + (A : vector_bool_short; + B : vector_signed_short) return c_int; + + function vec_all_eq + (A : vector_pixel; + B : vector_pixel) return c_int; + + function vec_all_eq + (A : vector_signed_int; + B : vector_bool_int) return c_int; + + function vec_all_eq + (A : vector_signed_int; + B : vector_signed_int) return c_int; + + function vec_all_eq + (A : vector_unsigned_int; + B : vector_bool_int) return c_int; + + function vec_all_eq + (A : vector_unsigned_int; + B : vector_unsigned_int) return c_int; + + function vec_all_eq + (A : vector_bool_int; + B : vector_bool_int) return c_int; + + function vec_all_eq + (A : vector_bool_int; + B : vector_unsigned_int) return c_int; + + function vec_all_eq + (A : vector_bool_int; + B : vector_signed_int) return c_int; + + function vec_all_eq + (A : vector_float; + B : vector_float) return c_int; + + -- vec_all_ge -- + + function vec_all_ge + (A : vector_bool_char; + B : vector_unsigned_char) return c_int; + + function vec_all_ge + (A : vector_unsigned_char; + B : vector_bool_char) return c_int; + + function vec_all_ge + (A : vector_unsigned_char; + B : vector_unsigned_char) return c_int; + + function vec_all_ge + (A : vector_bool_char; + B : vector_signed_char) return c_int; + + function vec_all_ge + (A : vector_signed_char; + B : vector_bool_char) return c_int; + + function vec_all_ge + (A : vector_signed_char; + B : vector_signed_char) return c_int; + + function vec_all_ge + (A : vector_bool_short; + B : vector_unsigned_short) return c_int; + + function vec_all_ge + (A : vector_unsigned_short; + B : vector_bool_short) return c_int; + + function vec_all_ge + (A : vector_unsigned_short; + B : vector_unsigned_short) return c_int; + + function vec_all_ge + (A : vector_signed_short; + B : vector_signed_short) return c_int; + + function vec_all_ge + (A : vector_bool_short; + B : vector_signed_short) return c_int; + + function vec_all_ge + (A : vector_signed_short; + B : vector_bool_short) return c_int; + + function vec_all_ge + (A : vector_bool_int; + B : vector_unsigned_int) return c_int; + + function vec_all_ge + (A : vector_unsigned_int; + B : vector_bool_int) return c_int; + + function vec_all_ge + (A : vector_unsigned_int; + B : vector_unsigned_int) return c_int; + + function vec_all_ge + (A : vector_bool_int; + B : vector_signed_int) return c_int; + + function vec_all_ge + (A : vector_signed_int; + B : vector_bool_int) return c_int; + + function vec_all_ge + (A : vector_signed_int; + B : vector_signed_int) return c_int; + + function vec_all_ge + (A : vector_float; + B : vector_float) return c_int; + + -- vec_all_gt -- + + function vec_all_gt + (A : vector_bool_char; + B : vector_unsigned_char) return c_int; + + function vec_all_gt + (A : vector_unsigned_char; + B : vector_bool_char) return c_int; + + function vec_all_gt + (A : vector_unsigned_char; + B : vector_unsigned_char) return c_int; + + function vec_all_gt + (A : vector_bool_char; + B : vector_signed_char) return c_int; + + function vec_all_gt + (A : vector_signed_char; + B : vector_bool_char) return c_int; + + function vec_all_gt + (A : vector_signed_char; + B : vector_signed_char) return c_int; + + function vec_all_gt + (A : vector_bool_short; + B : vector_unsigned_short) return c_int; + + function vec_all_gt + (A : vector_unsigned_short; + B : vector_bool_short) return c_int; + + function vec_all_gt + (A : vector_unsigned_short; + B : vector_unsigned_short) return c_int; + + function vec_all_gt + (A : vector_bool_short; + B : vector_signed_short) return c_int; + + function vec_all_gt + (A : vector_signed_short; + B : vector_bool_short) return c_int; + + function vec_all_gt + (A : vector_signed_short; + B : vector_signed_short) return c_int; + + function vec_all_gt + (A : vector_bool_int; + B : vector_unsigned_int) return c_int; + + function vec_all_gt + (A : vector_unsigned_int; + B : vector_bool_int) return c_int; + + function vec_all_gt + (A : vector_unsigned_int; + B : vector_unsigned_int) return c_int; + + function vec_all_gt + (A : vector_bool_int; + B : vector_signed_int) return c_int; + + function vec_all_gt + (A : vector_signed_int; + B : vector_bool_int) return c_int; + + function vec_all_gt + (A : vector_signed_int; + B : vector_signed_int) return c_int; + + function vec_all_gt + (A : vector_float; + B : vector_float) return c_int; + + -- vec_all_in -- + + function vec_all_in + (A : vector_float; + B : vector_float) return c_int; + + -- vec_all_le -- + + function vec_all_le + (A : vector_bool_char; + B : vector_unsigned_char) return c_int; + + function vec_all_le + (A : vector_unsigned_char; + B : vector_bool_char) return c_int; + + function vec_all_le + (A : vector_unsigned_char; + B : vector_unsigned_char) return c_int; + + function vec_all_le + (A : vector_bool_char; + B : vector_signed_char) return c_int; + + function vec_all_le + (A : vector_signed_char; + B : vector_bool_char) return c_int; + + function vec_all_le + (A : vector_signed_char; + B : vector_signed_char) return c_int; + + function vec_all_le + (A : vector_bool_short; + B : vector_unsigned_short) return c_int; + + function vec_all_le + (A : vector_unsigned_short; + B : vector_bool_short) return c_int; + + function vec_all_le + (A : vector_unsigned_short; + B : vector_unsigned_short) return c_int; + + function vec_all_le + (A : vector_bool_short; + B : vector_signed_short) return c_int; + + function vec_all_le + (A : vector_signed_short; + B : vector_bool_short) return c_int; + + function vec_all_le + (A : vector_signed_short; + B : vector_signed_short) return c_int; + + function vec_all_le + (A : vector_bool_int; + B : vector_unsigned_int) return c_int; + + function vec_all_le + (A : vector_unsigned_int; + B : vector_bool_int) return c_int; + + function vec_all_le + (A : vector_unsigned_int; + B : vector_unsigned_int) return c_int; + + function vec_all_le + (A : vector_bool_int; + B : vector_signed_int) return c_int; + + function vec_all_le + (A : vector_signed_int; + B : vector_bool_int) return c_int; + + function vec_all_le + (A : vector_signed_int; + B : vector_signed_int) return c_int; + + function vec_all_le + (A : vector_float; + B : vector_float) return c_int; + + -- vec_all_lt -- + + function vec_all_lt + (A : vector_bool_char; + B : vector_unsigned_char) return c_int; + + function vec_all_lt + (A : vector_unsigned_char; + B : vector_bool_char) return c_int; + + function vec_all_lt + (A : vector_unsigned_char; + B : vector_unsigned_char) return c_int; + + function vec_all_lt + (A : vector_bool_char; + B : vector_signed_char) return c_int; + + function vec_all_lt + (A : vector_signed_char; + B : vector_bool_char) return c_int; + + function vec_all_lt + (A : vector_signed_char; + B : vector_signed_char) return c_int; + + function vec_all_lt + (A : vector_bool_short; + B : vector_unsigned_short) return c_int; + + function vec_all_lt + (A : vector_unsigned_short; + B : vector_bool_short) return c_int; + + function vec_all_lt + (A : vector_unsigned_short; + B : vector_unsigned_short) return c_int; + + function vec_all_lt + (A : vector_bool_short; + B : vector_signed_short) return c_int; + + function vec_all_lt + (A : vector_signed_short; + B : vector_bool_short) return c_int; + + function vec_all_lt + (A : vector_signed_short; + B : vector_signed_short) return c_int; + + function vec_all_lt + (A : vector_bool_int; + B : vector_unsigned_int) return c_int; + + function vec_all_lt + (A : vector_unsigned_int; + B : vector_bool_int) return c_int; + + function vec_all_lt + (A : vector_unsigned_int; + B : vector_unsigned_int) return c_int; + + function vec_all_lt + (A : vector_bool_int; + B : vector_signed_int) return c_int; + + function vec_all_lt + (A : vector_signed_int; + B : vector_bool_int) return c_int; + + function vec_all_lt + (A : vector_signed_int; + B : vector_signed_int) return c_int; + + function vec_all_lt + (A : vector_float; + B : vector_float) return c_int; + + -- vec_all_nan -- + + function vec_all_nan + (A : vector_float) return c_int; + + -- vec_all_ne -- + + function vec_all_ne + (A : vector_signed_char; + B : vector_bool_char) return c_int; + + function vec_all_ne + (A : vector_signed_char; + B : vector_signed_char) return c_int; + + function vec_all_ne + (A : vector_unsigned_char; + B : vector_bool_char) return c_int; + + function vec_all_ne + (A : vector_unsigned_char; + B : vector_unsigned_char) return c_int; + + function vec_all_ne + (A : vector_bool_char; + B : vector_bool_char) return c_int; + + function vec_all_ne + (A : vector_bool_char; + B : vector_unsigned_char) return c_int; + + function vec_all_ne + (A : vector_bool_char; + B : vector_signed_char) return c_int; + + function vec_all_ne + (A : vector_signed_short; + B : vector_bool_short) return c_int; + + function vec_all_ne + (A : vector_signed_short; + B : vector_signed_short) return c_int; + + function vec_all_ne + (A : vector_unsigned_short; + B : vector_bool_short) return c_int; + + function vec_all_ne + (A : vector_unsigned_short; + B : vector_unsigned_short) return c_int; + + function vec_all_ne + (A : vector_bool_short; + B : vector_bool_short) return c_int; + + function vec_all_ne + (A : vector_bool_short; + B : vector_unsigned_short) return c_int; + + function vec_all_ne + (A : vector_bool_short; + B : vector_signed_short) return c_int; + + function vec_all_ne + (A : vector_pixel; + B : vector_pixel) return c_int; + + function vec_all_ne + (A : vector_signed_int; + B : vector_bool_int) return c_int; + + function vec_all_ne + (A : vector_signed_int; + B : vector_signed_int) return c_int; + + function vec_all_ne + (A : vector_unsigned_int; + B : vector_bool_int) return c_int; + + function vec_all_ne + (A : vector_unsigned_int; + B : vector_unsigned_int) return c_int; + + function vec_all_ne + (A : vector_bool_int; + B : vector_bool_int) return c_int; + + function vec_all_ne + (A : vector_bool_int; + B : vector_unsigned_int) return c_int; + + function vec_all_ne + (A : vector_bool_int; + B : vector_signed_int) return c_int; + + function vec_all_ne + (A : vector_float; + B : vector_float) return c_int; + + -- vec_all_nge -- + + function vec_all_nge + (A : vector_float; + B : vector_float) return c_int; + + -- vec_all_ngt -- + + function vec_all_ngt + (A : vector_float; + B : vector_float) return c_int; + + -- vec_all_nle -- + + function vec_all_nle + (A : vector_float; + B : vector_float) return c_int; + + -- vec_all_nlt -- + + function vec_all_nlt + (A : vector_float; + B : vector_float) return c_int; + + -- vec_all_numeric -- + + function vec_all_numeric + (A : vector_float) return c_int; + + -- vec_any_eq -- + + function vec_any_eq + (A : vector_signed_char; + B : vector_bool_char) return c_int; + + function vec_any_eq + (A : vector_signed_char; + B : vector_signed_char) return c_int; + + function vec_any_eq + (A : vector_unsigned_char; + B : vector_bool_char) return c_int; + + function vec_any_eq + (A : vector_unsigned_char; + B : vector_unsigned_char) return c_int; + + function vec_any_eq + (A : vector_bool_char; + B : vector_bool_char) return c_int; + + function vec_any_eq + (A : vector_bool_char; + B : vector_unsigned_char) return c_int; + + function vec_any_eq + (A : vector_bool_char; + B : vector_signed_char) return c_int; + + function vec_any_eq + (A : vector_signed_short; + B : vector_bool_short) return c_int; + + function vec_any_eq + (A : vector_signed_short; + B : vector_signed_short) return c_int; + + function vec_any_eq + (A : vector_unsigned_short; + B : vector_bool_short) return c_int; + + function vec_any_eq + (A : vector_unsigned_short; + B : vector_unsigned_short) return c_int; + + function vec_any_eq + (A : vector_bool_short; + B : vector_bool_short) return c_int; + + function vec_any_eq + (A : vector_bool_short; + B : vector_unsigned_short) return c_int; + + function vec_any_eq + (A : vector_bool_short; + B : vector_signed_short) return c_int; + + function vec_any_eq + (A : vector_pixel; + B : vector_pixel) return c_int; + + function vec_any_eq + (A : vector_signed_int; + B : vector_bool_int) return c_int; + + function vec_any_eq + (A : vector_signed_int; + B : vector_signed_int) return c_int; + + function vec_any_eq + (A : vector_unsigned_int; + B : vector_bool_int) return c_int; + + function vec_any_eq + (A : vector_unsigned_int; + B : vector_unsigned_int) return c_int; + + function vec_any_eq + (A : vector_bool_int; + B : vector_bool_int) return c_int; + + function vec_any_eq + (A : vector_bool_int; + B : vector_unsigned_int) return c_int; + + function vec_any_eq + (A : vector_bool_int; + B : vector_signed_int) return c_int; + + function vec_any_eq + (A : vector_float; + B : vector_float) return c_int; + + -- vec_any_ge -- + + function vec_any_ge + (A : vector_signed_char; + B : vector_bool_char) return c_int; + + function vec_any_ge + (A : vector_unsigned_char; + B : vector_bool_char) return c_int; + + function vec_any_ge + (A : vector_unsigned_char; + B : vector_unsigned_char) return c_int; + + function vec_any_ge + (A : vector_signed_char; + B : vector_signed_char) return c_int; + + function vec_any_ge + (A : vector_bool_char; + B : vector_unsigned_char) return c_int; + + function vec_any_ge + (A : vector_bool_char; + B : vector_signed_char) return c_int; + + function vec_any_ge + (A : vector_unsigned_short; + B : vector_bool_short) return c_int; + + function vec_any_ge + (A : vector_unsigned_short; + B : vector_unsigned_short) return c_int; + + function vec_any_ge + (A : vector_signed_short; + B : vector_signed_short) return c_int; + + function vec_any_ge + (A : vector_signed_short; + B : vector_bool_short) return c_int; + + function vec_any_ge + (A : vector_bool_short; + B : vector_unsigned_short) return c_int; + + function vec_any_ge + (A : vector_bool_short; + B : vector_signed_short) return c_int; + + function vec_any_ge + (A : vector_signed_int; + B : vector_bool_int) return c_int; + + function vec_any_ge + (A : vector_unsigned_int; + B : vector_bool_int) return c_int; + + function vec_any_ge + (A : vector_unsigned_int; + B : vector_unsigned_int) return c_int; + + function vec_any_ge + (A : vector_signed_int; + B : vector_signed_int) return c_int; + + function vec_any_ge + (A : vector_bool_int; + B : vector_unsigned_int) return c_int; + + function vec_any_ge + (A : vector_bool_int; + B : vector_signed_int) return c_int; + + function vec_any_ge + (A : vector_float; + B : vector_float) return c_int; + + -- vec_any_gt -- + + function vec_any_gt + (A : vector_bool_char; + B : vector_unsigned_char) return c_int; + + function vec_any_gt + (A : vector_unsigned_char; + B : vector_bool_char) return c_int; + + function vec_any_gt + (A : vector_unsigned_char; + B : vector_unsigned_char) return c_int; + + function vec_any_gt + (A : vector_bool_char; + B : vector_signed_char) return c_int; + + function vec_any_gt + (A : vector_signed_char; + B : vector_bool_char) return c_int; + + function vec_any_gt + (A : vector_signed_char; + B : vector_signed_char) return c_int; + + function vec_any_gt + (A : vector_bool_short; + B : vector_unsigned_short) return c_int; + + function vec_any_gt + (A : vector_unsigned_short; + B : vector_bool_short) return c_int; + + function vec_any_gt + (A : vector_unsigned_short; + B : vector_unsigned_short) return c_int; + + function vec_any_gt + (A : vector_bool_short; + B : vector_signed_short) return c_int; + + function vec_any_gt + (A : vector_signed_short; + B : vector_bool_short) return c_int; + + function vec_any_gt + (A : vector_signed_short; + B : vector_signed_short) return c_int; + + function vec_any_gt + (A : vector_bool_int; + B : vector_unsigned_int) return c_int; + + function vec_any_gt + (A : vector_unsigned_int; + B : vector_bool_int) return c_int; + + function vec_any_gt + (A : vector_unsigned_int; + B : vector_unsigned_int) return c_int; + + function vec_any_gt + (A : vector_bool_int; + B : vector_signed_int) return c_int; + + function vec_any_gt + (A : vector_signed_int; + B : vector_bool_int) return c_int; + + function vec_any_gt + (A : vector_signed_int; + B : vector_signed_int) return c_int; + + function vec_any_gt + (A : vector_float; + B : vector_float) return c_int; + + -- vec_any_le -- + + function vec_any_le + (A : vector_bool_char; + B : vector_unsigned_char) return c_int; + + function vec_any_le + (A : vector_unsigned_char; + B : vector_bool_char) return c_int; + + function vec_any_le + (A : vector_unsigned_char; + B : vector_unsigned_char) return c_int; + + function vec_any_le + (A : vector_bool_char; + B : vector_signed_char) return c_int; + + function vec_any_le + (A : vector_signed_char; + B : vector_bool_char) return c_int; + + function vec_any_le + (A : vector_signed_char; + B : vector_signed_char) return c_int; + + function vec_any_le + (A : vector_bool_short; + B : vector_unsigned_short) return c_int; + + function vec_any_le + (A : vector_unsigned_short; + B : vector_bool_short) return c_int; + + function vec_any_le + (A : vector_unsigned_short; + B : vector_unsigned_short) return c_int; + + function vec_any_le + (A : vector_bool_short; + B : vector_signed_short) return c_int; + + function vec_any_le + (A : vector_signed_short; + B : vector_bool_short) return c_int; + + function vec_any_le + (A : vector_signed_short; + B : vector_signed_short) return c_int; + + function vec_any_le + (A : vector_bool_int; + B : vector_unsigned_int) return c_int; + + function vec_any_le + (A : vector_unsigned_int; + B : vector_bool_int) return c_int; + + function vec_any_le + (A : vector_unsigned_int; + B : vector_unsigned_int) return c_int; + + function vec_any_le + (A : vector_bool_int; + B : vector_signed_int) return c_int; + + function vec_any_le + (A : vector_signed_int; + B : vector_bool_int) return c_int; + + function vec_any_le + (A : vector_signed_int; + B : vector_signed_int) return c_int; + + function vec_any_le + (A : vector_float; + B : vector_float) return c_int; + + -- vec_any_lt -- + + function vec_any_lt + (A : vector_bool_char; + B : vector_unsigned_char) return c_int; + + function vec_any_lt + (A : vector_unsigned_char; + B : vector_bool_char) return c_int; + + function vec_any_lt + (A : vector_unsigned_char; + B : vector_unsigned_char) return c_int; + + function vec_any_lt + (A : vector_bool_char; + B : vector_signed_char) return c_int; + + function vec_any_lt + (A : vector_signed_char; + B : vector_bool_char) return c_int; + + function vec_any_lt + (A : vector_signed_char; + B : vector_signed_char) return c_int; + + function vec_any_lt + (A : vector_bool_short; + B : vector_unsigned_short) return c_int; + + function vec_any_lt + (A : vector_unsigned_short; + B : vector_bool_short) return c_int; + + function vec_any_lt + (A : vector_unsigned_short; + B : vector_unsigned_short) return c_int; + + function vec_any_lt + (A : vector_bool_short; + B : vector_signed_short) return c_int; + + function vec_any_lt + (A : vector_signed_short; + B : vector_bool_short) return c_int; + + function vec_any_lt + (A : vector_signed_short; + B : vector_signed_short) return c_int; + + function vec_any_lt + (A : vector_bool_int; + B : vector_unsigned_int) return c_int; + + function vec_any_lt + (A : vector_unsigned_int; + B : vector_bool_int) return c_int; + + function vec_any_lt + (A : vector_unsigned_int; + B : vector_unsigned_int) return c_int; + + function vec_any_lt + (A : vector_bool_int; + B : vector_signed_int) return c_int; + + function vec_any_lt + (A : vector_signed_int; + B : vector_bool_int) return c_int; + + function vec_any_lt + (A : vector_signed_int; + B : vector_signed_int) return c_int; + + function vec_any_lt + (A : vector_float; + B : vector_float) return c_int; + + -- vec_any_nan -- + + function vec_any_nan + (A : vector_float) return c_int; + + -- vec_any_ne -- + + function vec_any_ne + (A : vector_signed_char; + B : vector_bool_char) return c_int; + + function vec_any_ne + (A : vector_signed_char; + B : vector_signed_char) return c_int; + + function vec_any_ne + (A : vector_unsigned_char; + B : vector_bool_char) return c_int; + + function vec_any_ne + (A : vector_unsigned_char; + B : vector_unsigned_char) return c_int; + + function vec_any_ne + (A : vector_bool_char; + B : vector_bool_char) return c_int; + + function vec_any_ne + (A : vector_bool_char; + B : vector_unsigned_char) return c_int; + + function vec_any_ne + (A : vector_bool_char; + B : vector_signed_char) return c_int; + + function vec_any_ne + (A : vector_signed_short; + B : vector_bool_short) return c_int; + + function vec_any_ne + (A : vector_signed_short; + B : vector_signed_short) return c_int; + + function vec_any_ne + (A : vector_unsigned_short; + B : vector_bool_short) return c_int; + + function vec_any_ne + (A : vector_unsigned_short; + B : vector_unsigned_short) return c_int; + + function vec_any_ne + (A : vector_bool_short; + B : vector_bool_short) return c_int; + + function vec_any_ne + (A : vector_bool_short; + B : vector_unsigned_short) return c_int; + + function vec_any_ne + (A : vector_bool_short; + B : vector_signed_short) return c_int; + + function vec_any_ne + (A : vector_pixel; + B : vector_pixel) return c_int; + + function vec_any_ne + (A : vector_signed_int; + B : vector_bool_int) return c_int; + + function vec_any_ne + (A : vector_signed_int; + B : vector_signed_int) return c_int; + + function vec_any_ne + (A : vector_unsigned_int; + B : vector_bool_int) return c_int; + + function vec_any_ne + (A : vector_unsigned_int; + B : vector_unsigned_int) return c_int; + + function vec_any_ne + (A : vector_bool_int; + B : vector_bool_int) return c_int; + + function vec_any_ne + (A : vector_bool_int; + B : vector_unsigned_int) return c_int; + + function vec_any_ne + (A : vector_bool_int; + B : vector_signed_int) return c_int; + + function vec_any_ne + (A : vector_float; + B : vector_float) return c_int; + + -- vec_any_nge -- + + function vec_any_nge + (A : vector_float; + B : vector_float) return c_int; + + -- vec_any_ngt -- + + function vec_any_ngt + (A : vector_float; + B : vector_float) return c_int; + + -- vec_any_nle -- + + function vec_any_nle + (A : vector_float; + B : vector_float) return c_int; + + -- vec_any_nlt -- + + function vec_any_nlt + (A : vector_float; + B : vector_float) return c_int; + + -- vec_any_numeric -- + + function vec_any_numeric + (A : vector_float) return c_int; + + -- vec_any_out -- + + function vec_any_out + (A : vector_float; + B : vector_float) return c_int; + + ------------------------------------------- + -- Straight overloads of routines aboves -- + ------------------------------------------- + + -- vec_vaddcuw -- + + function vec_vaddcuw + (A : vector_unsigned_int; + B : vector_unsigned_int) return vector_unsigned_int + renames vec_addc; + + -- vec_vand -- + + function vec_vand + (A : vector_float; + B : vector_float) return vector_float + renames vec_and; + + function vec_vand + (A : vector_float; + B : vector_bool_int) return vector_float + renames vec_and; + + function vec_vand + (A : vector_bool_int; + B : vector_float) return vector_float + renames vec_and; + + function vec_vand + (A : vector_bool_int; + B : vector_bool_int) return vector_bool_int + renames vec_and; + + function vec_vand + (A : vector_bool_int; + B : vector_signed_int) return vector_signed_int + renames vec_and; + + function vec_vand + (A : vector_signed_int; + B : vector_bool_int) return vector_signed_int + renames vec_and; + + function vec_vand + (A : vector_signed_int; + B : vector_signed_int) return vector_signed_int + renames vec_and; + + function vec_vand + (A : vector_bool_int; + B : vector_unsigned_int) return vector_unsigned_int + renames vec_and; + + function vec_vand + (A : vector_unsigned_int; + B : vector_bool_int) return vector_unsigned_int + renames vec_and; + + function vec_vand + (A : vector_unsigned_int; + B : vector_unsigned_int) return vector_unsigned_int + renames vec_and; + + function vec_vand + (A : vector_bool_short; + B : vector_bool_short) return vector_bool_short + renames vec_and; + + function vec_vand + (A : vector_bool_short; + B : vector_signed_short) return vector_signed_short + renames vec_and; + + function vec_vand + (A : vector_signed_short; + B : vector_bool_short) return vector_signed_short + renames vec_and; + + function vec_vand + (A : vector_signed_short; + B : vector_signed_short) return vector_signed_short + renames vec_and; + + function vec_vand + (A : vector_bool_short; + B : vector_unsigned_short) return vector_unsigned_short + renames vec_and; + + function vec_vand + (A : vector_unsigned_short; + B : vector_bool_short) return vector_unsigned_short + renames vec_and; + + function vec_vand + (A : vector_unsigned_short; + B : vector_unsigned_short) return vector_unsigned_short + renames vec_and; + + function vec_vand + (A : vector_bool_char; + B : vector_signed_char) return vector_signed_char + renames vec_and; + + function vec_vand + (A : vector_bool_char; + B : vector_bool_char) return vector_bool_char + renames vec_and; + + function vec_vand + (A : vector_signed_char; + B : vector_bool_char) return vector_signed_char + renames vec_and; + + function vec_vand + (A : vector_signed_char; + B : vector_signed_char) return vector_signed_char + renames vec_and; + + function vec_vand + (A : vector_bool_char; + B : vector_unsigned_char) return vector_unsigned_char + renames vec_and; + + function vec_vand + (A : vector_unsigned_char; + B : vector_bool_char) return vector_unsigned_char + renames vec_and; + + function vec_vand + (A : vector_unsigned_char; + B : vector_unsigned_char) return vector_unsigned_char + renames vec_and; + + -- vec_vandc -- + + function vec_vandc + (A : vector_float; + B : vector_float) return vector_float + renames vec_andc; + + function vec_vandc + (A : vector_float; + B : vector_bool_int) return vector_float + renames vec_andc; + + function vec_vandc + (A : vector_bool_int; + B : vector_float) return vector_float + renames vec_andc; + + function vec_vandc + (A : vector_bool_int; + B : vector_bool_int) return vector_bool_int + renames vec_andc; + + function vec_vandc + (A : vector_bool_int; + B : vector_signed_int) return vector_signed_int + renames vec_andc; + + function vec_vandc + (A : vector_signed_int; + B : vector_bool_int) return vector_signed_int + renames vec_andc; + + function vec_vandc + (A : vector_signed_int; + B : vector_signed_int) return vector_signed_int + renames vec_andc; + + function vec_vandc + (A : vector_bool_int; + B : vector_unsigned_int) return vector_unsigned_int + renames vec_andc; + + function vec_vandc + (A : vector_unsigned_int; + B : vector_bool_int) return vector_unsigned_int + renames vec_andc; + + function vec_vandc + (A : vector_unsigned_int; + B : vector_unsigned_int) return vector_unsigned_int + renames vec_andc; + + function vec_vandc + (A : vector_bool_short; + B : vector_bool_short) return vector_bool_short + renames vec_andc; + + function vec_vandc + (A : vector_bool_short; + B : vector_signed_short) return vector_signed_short + renames vec_andc; + + function vec_vandc + (A : vector_signed_short; + B : vector_bool_short) return vector_signed_short + renames vec_andc; + + function vec_vandc + (A : vector_signed_short; + B : vector_signed_short) return vector_signed_short + renames vec_andc; + + function vec_vandc + (A : vector_bool_short; + B : vector_unsigned_short) return vector_unsigned_short + renames vec_andc; + + function vec_vandc + (A : vector_unsigned_short; + B : vector_bool_short) return vector_unsigned_short + renames vec_andc; + + function vec_vandc + (A : vector_unsigned_short; + B : vector_unsigned_short) return vector_unsigned_short + renames vec_andc; + + function vec_vandc + (A : vector_bool_char; + B : vector_signed_char) return vector_signed_char + renames vec_andc; + + function vec_vandc + (A : vector_bool_char; + B : vector_bool_char) return vector_bool_char + renames vec_andc; + + function vec_vandc + (A : vector_signed_char; + B : vector_bool_char) return vector_signed_char + renames vec_andc; + + function vec_vandc + (A : vector_signed_char; + B : vector_signed_char) return vector_signed_char + renames vec_andc; + + function vec_vandc + (A : vector_bool_char; + B : vector_unsigned_char) return vector_unsigned_char + renames vec_andc; + + function vec_vandc + (A : vector_unsigned_char; + B : vector_bool_char) return vector_unsigned_char + renames vec_andc; + + function vec_vandc + (A : vector_unsigned_char; + B : vector_unsigned_char) return vector_unsigned_char + renames vec_andc; + + -- vec_vrfip -- + + function vec_vrfip + (A : vector_float) return vector_float + renames vec_ceil; + + -- vec_vcmpbfp -- + + function vec_vcmpbfp + (A : vector_float; + B : vector_float) return vector_signed_int + renames vec_cmpb; + + -- vec_vcmpgefp -- + + function vec_vcmpgefp + (A : vector_float; + B : vector_float) return vector_bool_int + renames vec_cmpge; + + -- vec_vctsxs -- + + function vec_vctsxs + (A : vector_float; + B : c_int) return vector_signed_int + renames vec_cts; + + -- vec_vctuxs -- + + function vec_vctuxs + (A : vector_float; + B : c_int) return vector_unsigned_int + renames vec_ctu; + + -- vec_vexptefp -- + + function vec_vexptefp + (A : vector_float) return vector_float + renames vec_expte; + + -- vec_vrfim -- + + function vec_vrfim + (A : vector_float) return vector_float + renames vec_floor; + + -- vec_lvx -- + + function vec_lvx + (A : c_long; + B : const_vector_float_ptr) return vector_float + renames vec_ld; + + function vec_lvx + (A : c_long; + B : const_float_ptr) return vector_float + renames vec_ld; + + function vec_lvx + (A : c_long; + B : const_vector_bool_int_ptr) return vector_bool_int + renames vec_ld; + + function vec_lvx + (A : c_long; + B : const_vector_signed_int_ptr) return vector_signed_int + renames vec_ld; + + function vec_lvx + (A : c_long; + B : const_int_ptr) return vector_signed_int + renames vec_ld; + + function vec_lvx + (A : c_long; + B : const_long_ptr) return vector_signed_int + renames vec_ld; + + function vec_lvx + (A : c_long; + B : const_vector_unsigned_int_ptr) return vector_unsigned_int + renames vec_ld; + + function vec_lvx + (A : c_long; + B : const_unsigned_int_ptr) return vector_unsigned_int + renames vec_ld; + + function vec_lvx + (A : c_long; + B : const_unsigned_long_ptr) return vector_unsigned_int + renames vec_ld; + + function vec_lvx + (A : c_long; + B : const_vector_bool_short_ptr) return vector_bool_short + renames vec_ld; + + function vec_lvx + (A : c_long; + B : const_vector_pixel_ptr) return vector_pixel + renames vec_ld; + + function vec_lvx + (A : c_long; + B : const_vector_signed_short_ptr) return vector_signed_short + renames vec_ld; + + function vec_lvx + (A : c_long; + B : const_short_ptr) return vector_signed_short + renames vec_ld; + + function vec_lvx + (A : c_long; + B : const_vector_unsigned_short_ptr) return vector_unsigned_short + renames vec_ld; + + function vec_lvx + (A : c_long; + B : const_unsigned_short_ptr) return vector_unsigned_short + renames vec_ld; + + function vec_lvx + (A : c_long; + B : const_vector_bool_char_ptr) return vector_bool_char + renames vec_ld; + + function vec_lvx + (A : c_long; + B : const_vector_signed_char_ptr) return vector_signed_char + renames vec_ld; + + function vec_lvx + (A : c_long; + B : const_signed_char_ptr) return vector_signed_char + renames vec_ld; + + function vec_lvx + (A : c_long; + B : const_vector_unsigned_char_ptr) return vector_unsigned_char + renames vec_ld; + + function vec_lvx + (A : c_long; + B : const_unsigned_char_ptr) return vector_unsigned_char + renames vec_ld; + + -- vec_lvxl -- + + function vec_lvxl + (A : c_long; + B : const_vector_float_ptr) return vector_float + renames vec_ldl; + + function vec_lvxl + (A : c_long; + B : const_float_ptr) return vector_float + renames vec_ldl; + + function vec_lvxl + (A : c_long; + B : const_vector_bool_int_ptr) return vector_bool_int + renames vec_ldl; + + function vec_lvxl + (A : c_long; + B : const_vector_signed_int_ptr) return vector_signed_int + renames vec_ldl; + + function vec_lvxl + (A : c_long; + B : const_int_ptr) return vector_signed_int + renames vec_ldl; + + function vec_lvxl + (A : c_long; + B : const_long_ptr) return vector_signed_int + renames vec_ldl; + + function vec_lvxl + (A : c_long; + B : const_vector_unsigned_int_ptr) return vector_unsigned_int + renames vec_ldl; + + function vec_lvxl + (A : c_long; + B : const_unsigned_int_ptr) return vector_unsigned_int + renames vec_ldl; + + function vec_lvxl + (A : c_long; + B : const_unsigned_long_ptr) return vector_unsigned_int + renames vec_ldl; + + function vec_lvxl + (A : c_long; + B : const_vector_bool_short_ptr) return vector_bool_short + renames vec_ldl; + + function vec_lvxl + (A : c_long; + B : const_vector_pixel_ptr) return vector_pixel + renames vec_ldl; + + function vec_lvxl + (A : c_long; + B : const_vector_signed_short_ptr) return vector_signed_short + renames vec_ldl; + + function vec_lvxl + (A : c_long; + B : const_short_ptr) return vector_signed_short + renames vec_ldl; + + function vec_lvxl + (A : c_long; + B : const_vector_unsigned_short_ptr) return vector_unsigned_short + renames vec_ldl; + + function vec_lvxl + (A : c_long; + B : const_unsigned_short_ptr) return vector_unsigned_short + renames vec_ldl; + + function vec_lvxl + (A : c_long; + B : const_vector_bool_char_ptr) return vector_bool_char + renames vec_ldl; + + function vec_lvxl + (A : c_long; + B : const_vector_signed_char_ptr) return vector_signed_char + renames vec_ldl; + + function vec_lvxl + (A : c_long; + B : const_signed_char_ptr) return vector_signed_char + renames vec_ldl; + + function vec_lvxl + (A : c_long; + B : const_vector_unsigned_char_ptr) return vector_unsigned_char + renames vec_ldl; + + function vec_lvxl + (A : c_long; + B : const_unsigned_char_ptr) return vector_unsigned_char + renames vec_ldl; + + -- vec_vlogefp -- + + function vec_vlogefp + (A : vector_float) return vector_float + renames vec_loge; + + -- vec_vmaddfp -- + + function vec_vmaddfp + (A : vector_float; + B : vector_float; + C : vector_float) return vector_float + renames vec_madd; + + -- vec_vmhaddshs -- + + function vec_vmhaddshs + (A : vector_signed_short; + B : vector_signed_short; + C : vector_signed_short) return vector_signed_short + renames vec_madds; + + -- vec_vmladduhm -- + + function vec_vmladduhm + (A : vector_signed_short; + B : vector_signed_short; + C : vector_signed_short) return vector_signed_short + renames vec_mladd; + + function vec_vmladduhm + (A : vector_signed_short; + B : vector_unsigned_short; + C : vector_unsigned_short) return vector_signed_short + renames vec_mladd; + + function vec_vmladduhm + (A : vector_unsigned_short; + B : vector_signed_short; + C : vector_signed_short) return vector_signed_short + renames vec_mladd; + + function vec_vmladduhm + (A : vector_unsigned_short; + B : vector_unsigned_short; + C : vector_unsigned_short) return vector_unsigned_short + renames vec_mladd; + + -- vec_vmhraddshs -- + + function vec_vmhraddshs + (A : vector_signed_short; + B : vector_signed_short; + C : vector_signed_short) return vector_signed_short + renames vec_mradds; + + -- vec_vnmsubfp -- + + function vec_vnmsubfp + (A : vector_float; + B : vector_float; + C : vector_float) return vector_float + renames vec_nmsub; + + -- vec_vnor -- + + function vec_vnor + (A : vector_float; + B : vector_float) return vector_float + renames vec_nor; + + function vec_vnor + (A : vector_signed_int; + B : vector_signed_int) return vector_signed_int + renames vec_nor; + + function vec_vnor + (A : vector_unsigned_int; + B : vector_unsigned_int) return vector_unsigned_int + renames vec_nor; + + function vec_vnor + (A : vector_bool_int; + B : vector_bool_int) return vector_bool_int + renames vec_nor; + + function vec_vnor + (A : vector_signed_short; + B : vector_signed_short) return vector_signed_short + renames vec_nor; + + function vec_vnor + (A : vector_unsigned_short; + B : vector_unsigned_short) return vector_unsigned_short + renames vec_nor; + + function vec_vnor + (A : vector_bool_short; + B : vector_bool_short) return vector_bool_short + renames vec_nor; + + function vec_vnor + (A : vector_signed_char; + B : vector_signed_char) return vector_signed_char + renames vec_nor; + + function vec_vnor + (A : vector_unsigned_char; + B : vector_unsigned_char) return vector_unsigned_char + renames vec_nor; + + function vec_vnor + (A : vector_bool_char; + B : vector_bool_char) return vector_bool_char + renames vec_nor; + + -- vec_vor -- + + function vec_vor + (A : vector_float; + B : vector_float) return vector_float + renames vec_or; + + function vec_vor + (A : vector_float; + B : vector_bool_int) return vector_float + renames vec_or; + + function vec_vor + (A : vector_bool_int; + B : vector_float) return vector_float + renames vec_or; + + function vec_vor + (A : vector_bool_int; + B : vector_bool_int) return vector_bool_int + renames vec_or; + + function vec_vor + (A : vector_bool_int; + B : vector_signed_int) return vector_signed_int + renames vec_or; + + function vec_vor + (A : vector_signed_int; + B : vector_bool_int) return vector_signed_int + renames vec_or; + + function vec_vor + (A : vector_signed_int; + B : vector_signed_int) return vector_signed_int + renames vec_or; + + function vec_vor + (A : vector_bool_int; + B : vector_unsigned_int) return vector_unsigned_int + renames vec_or; + + function vec_vor + (A : vector_unsigned_int; + B : vector_bool_int) return vector_unsigned_int + renames vec_or; + + function vec_vor + (A : vector_unsigned_int; + B : vector_unsigned_int) return vector_unsigned_int + renames vec_or; + + function vec_vor + (A : vector_bool_short; + B : vector_bool_short) return vector_bool_short + renames vec_or; + + function vec_vor + (A : vector_bool_short; + B : vector_signed_short) return vector_signed_short + renames vec_or; + + function vec_vor + (A : vector_signed_short; + B : vector_bool_short) return vector_signed_short + renames vec_or; + + function vec_vor + (A : vector_signed_short; + B : vector_signed_short) return vector_signed_short + renames vec_or; + + function vec_vor + (A : vector_bool_short; + B : vector_unsigned_short) return vector_unsigned_short + renames vec_or; + + function vec_vor + (A : vector_unsigned_short; + B : vector_bool_short) return vector_unsigned_short + renames vec_or; + + function vec_vor + (A : vector_unsigned_short; + B : vector_unsigned_short) return vector_unsigned_short + renames vec_or; + + function vec_vor + (A : vector_bool_char; + B : vector_signed_char) return vector_signed_char + renames vec_or; + + function vec_vor + (A : vector_bool_char; + B : vector_bool_char) return vector_bool_char + renames vec_or; + + function vec_vor + (A : vector_signed_char; + B : vector_bool_char) return vector_signed_char + renames vec_or; + + function vec_vor + (A : vector_signed_char; + B : vector_signed_char) return vector_signed_char + renames vec_or; + + function vec_vor + (A : vector_bool_char; + B : vector_unsigned_char) return vector_unsigned_char + renames vec_or; + + function vec_vor + (A : vector_unsigned_char; + B : vector_bool_char) return vector_unsigned_char + renames vec_or; + + function vec_vor + (A : vector_unsigned_char; + B : vector_unsigned_char) return vector_unsigned_char + renames vec_or; + + -- vec_vpkpx -- + + function vec_vpkpx + (A : vector_unsigned_int; + B : vector_unsigned_int) return vector_pixel + renames vec_packpx; + + -- vec_vperm -- + + function vec_vperm + (A : vector_float; + B : vector_float; + C : vector_unsigned_char) return vector_float + renames vec_perm; + + function vec_vperm + (A : vector_signed_int; + B : vector_signed_int; + C : vector_unsigned_char) return vector_signed_int + renames vec_perm; + + function vec_vperm + (A : vector_unsigned_int; + B : vector_unsigned_int; + C : vector_unsigned_char) return vector_unsigned_int + renames vec_perm; + + function vec_vperm + (A : vector_bool_int; + B : vector_bool_int; + C : vector_unsigned_char) return vector_bool_int + renames vec_perm; + + function vec_vperm + (A : vector_signed_short; + B : vector_signed_short; + C : vector_unsigned_char) return vector_signed_short + renames vec_perm; + + function vec_vperm + (A : vector_unsigned_short; + B : vector_unsigned_short; + C : vector_unsigned_char) return vector_unsigned_short + renames vec_perm; + + function vec_vperm + (A : vector_bool_short; + B : vector_bool_short; + C : vector_unsigned_char) return vector_bool_short + renames vec_perm; + + function vec_vperm + (A : vector_pixel; + B : vector_pixel; + C : vector_unsigned_char) return vector_pixel + renames vec_perm; + + function vec_vperm + (A : vector_signed_char; + B : vector_signed_char; + C : vector_unsigned_char) return vector_signed_char + renames vec_perm; + + function vec_vperm + (A : vector_unsigned_char; + B : vector_unsigned_char; + C : vector_unsigned_char) return vector_unsigned_char + renames vec_perm; + + function vec_vperm + (A : vector_bool_char; + B : vector_bool_char; + C : vector_unsigned_char) return vector_bool_char + renames vec_perm; + + -- vec_vrefp -- + + function vec_vrefp + (A : vector_float) return vector_float + renames vec_re; + + -- vec_vrfin -- + + function vec_vrfin + (A : vector_float) return vector_float + renames vec_round; + + -- vec_vrsqrtefp -- + + function vec_vrsqrtefp + (A : vector_float) return vector_float + renames vec_rsqrte; + + -- vec_vsel -- + + function vec_vsel + (A : vector_float; + B : vector_float; + C : vector_bool_int) return vector_float + renames vec_sel; + + function vec_vsel + (A : vector_float; + B : vector_float; + C : vector_unsigned_int) return vector_float + renames vec_sel; + + function vec_vsel + (A : vector_signed_int; + B : vector_signed_int; + C : vector_bool_int) return vector_signed_int + renames vec_sel; + + function vec_vsel + (A : vector_signed_int; + B : vector_signed_int; + C : vector_unsigned_int) return vector_signed_int + renames vec_sel; + + function vec_vsel + (A : vector_unsigned_int; + B : vector_unsigned_int; + C : vector_bool_int) return vector_unsigned_int + renames vec_sel; + + function vec_vsel + (A : vector_unsigned_int; + B : vector_unsigned_int; + C : vector_unsigned_int) return vector_unsigned_int + renames vec_sel; + + function vec_vsel + (A : vector_bool_int; + B : vector_bool_int; + C : vector_bool_int) return vector_bool_int + renames vec_sel; + + function vec_vsel + (A : vector_bool_int; + B : vector_bool_int; + C : vector_unsigned_int) return vector_bool_int + renames vec_sel; + + function vec_vsel + (A : vector_signed_short; + B : vector_signed_short; + C : vector_bool_short) return vector_signed_short + renames vec_sel; + + function vec_vsel + (A : vector_signed_short; + B : vector_signed_short; + C : vector_unsigned_short) return vector_signed_short + renames vec_sel; + + function vec_vsel + (A : vector_unsigned_short; + B : vector_unsigned_short; + C : vector_bool_short) return vector_unsigned_short + renames vec_sel; + + function vec_vsel + (A : vector_unsigned_short; + B : vector_unsigned_short; + C : vector_unsigned_short) return vector_unsigned_short + renames vec_sel; + + function vec_vsel + (A : vector_bool_short; + B : vector_bool_short; + C : vector_bool_short) return vector_bool_short + renames vec_sel; + + function vec_vsel + (A : vector_bool_short; + B : vector_bool_short; + C : vector_unsigned_short) return vector_bool_short + renames vec_sel; + + function vec_vsel + (A : vector_signed_char; + B : vector_signed_char; + C : vector_bool_char) return vector_signed_char + renames vec_sel; + + function vec_vsel + (A : vector_signed_char; + B : vector_signed_char; + C : vector_unsigned_char) return vector_signed_char + renames vec_sel; + + function vec_vsel + (A : vector_unsigned_char; + B : vector_unsigned_char; + C : vector_bool_char) return vector_unsigned_char + renames vec_sel; + + function vec_vsel + (A : vector_unsigned_char; + B : vector_unsigned_char; + C : vector_unsigned_char) return vector_unsigned_char + renames vec_sel; + + function vec_vsel + (A : vector_bool_char; + B : vector_bool_char; + C : vector_bool_char) return vector_bool_char + renames vec_sel; + + function vec_vsel + (A : vector_bool_char; + B : vector_bool_char; + C : vector_unsigned_char) return vector_bool_char + renames vec_sel; + + -- vec_vsldoi -- + + function vec_vsldoi + (A : vector_float; + B : vector_float; + C : c_int) return vector_float + renames vec_sld; + + function vec_vsldoi + (A : vector_signed_int; + B : vector_signed_int; + C : c_int) return vector_signed_int + renames vec_sld; + + function vec_vsldoi + (A : vector_unsigned_int; + B : vector_unsigned_int; + C : c_int) return vector_unsigned_int + renames vec_sld; + + function vec_vsldoi + (A : vector_bool_int; + B : vector_bool_int; + C : c_int) return vector_bool_int + renames vec_sld; + + function vec_vsldoi + (A : vector_signed_short; + B : vector_signed_short; + C : c_int) return vector_signed_short + renames vec_sld; + + function vec_vsldoi + (A : vector_unsigned_short; + B : vector_unsigned_short; + C : c_int) return vector_unsigned_short + renames vec_sld; + + function vec_vsldoi + (A : vector_bool_short; + B : vector_bool_short; + C : c_int) return vector_bool_short + renames vec_sld; + + function vec_vsldoi + (A : vector_pixel; + B : vector_pixel; + C : c_int) return vector_pixel + renames vec_sld; + + function vec_vsldoi + (A : vector_signed_char; + B : vector_signed_char; + C : c_int) return vector_signed_char + renames vec_sld; + + function vec_vsldoi + (A : vector_unsigned_char; + B : vector_unsigned_char; + C : c_int) return vector_unsigned_char + renames vec_sld; + + function vec_vsldoi + (A : vector_bool_char; + B : vector_bool_char; + C : c_int) return vector_bool_char + renames vec_sld; + + -- vec_vsl -- + + function vec_vsl + (A : vector_signed_int; + B : vector_unsigned_int) return vector_signed_int + renames vec_sll; + + function vec_vsl + (A : vector_signed_int; + B : vector_unsigned_short) return vector_signed_int + renames vec_sll; + + function vec_vsl + (A : vector_signed_int; + B : vector_unsigned_char) return vector_signed_int + renames vec_sll; + + function vec_vsl + (A : vector_unsigned_int; + B : vector_unsigned_int) return vector_unsigned_int + renames vec_sll; + + function vec_vsl + (A : vector_unsigned_int; + B : vector_unsigned_short) return vector_unsigned_int + renames vec_sll; + + function vec_vsl + (A : vector_unsigned_int; + B : vector_unsigned_char) return vector_unsigned_int + renames vec_sll; + + function vec_vsl + (A : vector_bool_int; + B : vector_unsigned_int) return vector_bool_int + renames vec_sll; + + function vec_vsl + (A : vector_bool_int; + B : vector_unsigned_short) return vector_bool_int + renames vec_sll; + + function vec_vsl + (A : vector_bool_int; + B : vector_unsigned_char) return vector_bool_int + renames vec_sll; + + function vec_vsl + (A : vector_signed_short; + B : vector_unsigned_int) return vector_signed_short + renames vec_sll; + + function vec_vsl + (A : vector_signed_short; + B : vector_unsigned_short) return vector_signed_short + renames vec_sll; + + function vec_vsl + (A : vector_signed_short; + B : vector_unsigned_char) return vector_signed_short + renames vec_sll; + + function vec_vsl + (A : vector_unsigned_short; + B : vector_unsigned_int) return vector_unsigned_short + renames vec_sll; + + function vec_vsl + (A : vector_unsigned_short; + B : vector_unsigned_short) return vector_unsigned_short + renames vec_sll; + + function vec_vsl + (A : vector_unsigned_short; + B : vector_unsigned_char) return vector_unsigned_short + renames vec_sll; + + function vec_vsl + (A : vector_bool_short; + B : vector_unsigned_int) return vector_bool_short + renames vec_sll; + + function vec_vsl + (A : vector_bool_short; + B : vector_unsigned_short) return vector_bool_short + renames vec_sll; + + function vec_vsl + (A : vector_bool_short; + B : vector_unsigned_char) return vector_bool_short + renames vec_sll; + + function vec_vsl + (A : vector_pixel; + B : vector_unsigned_int) return vector_pixel + renames vec_sll; + + function vec_vsl + (A : vector_pixel; + B : vector_unsigned_short) return vector_pixel + renames vec_sll; + + function vec_vsl + (A : vector_pixel; + B : vector_unsigned_char) return vector_pixel + renames vec_sll; + + function vec_vsl + (A : vector_signed_char; + B : vector_unsigned_int) return vector_signed_char + renames vec_sll; + + function vec_vsl + (A : vector_signed_char; + B : vector_unsigned_short) return vector_signed_char + renames vec_sll; + + function vec_vsl + (A : vector_signed_char; + B : vector_unsigned_char) return vector_signed_char + renames vec_sll; + + function vec_vsl + (A : vector_unsigned_char; + B : vector_unsigned_int) return vector_unsigned_char + renames vec_sll; + + function vec_vsl + (A : vector_unsigned_char; + B : vector_unsigned_short) return vector_unsigned_char + renames vec_sll; + + function vec_vsl + (A : vector_unsigned_char; + B : vector_unsigned_char) return vector_unsigned_char + renames vec_sll; + + function vec_vsl + (A : vector_bool_char; + B : vector_unsigned_int) return vector_bool_char + renames vec_sll; + + function vec_vsl + (A : vector_bool_char; + B : vector_unsigned_short) return vector_bool_char + renames vec_sll; + + function vec_vsl + (A : vector_bool_char; + B : vector_unsigned_char) return vector_bool_char + renames vec_sll; + + -- vec_vslo -- + + function vec_vslo + (A : vector_float; + B : vector_signed_char) return vector_float + renames vec_slo; + + function vec_vslo + (A : vector_float; + B : vector_unsigned_char) return vector_float + renames vec_slo; + + function vec_vslo + (A : vector_signed_int; + B : vector_signed_char) return vector_signed_int + renames vec_slo; + + function vec_vslo + (A : vector_signed_int; + B : vector_unsigned_char) return vector_signed_int + renames vec_slo; + + function vec_vslo + (A : vector_unsigned_int; + B : vector_signed_char) return vector_unsigned_int + renames vec_slo; + + function vec_vslo + (A : vector_unsigned_int; + B : vector_unsigned_char) return vector_unsigned_int + renames vec_slo; + + function vec_vslo + (A : vector_signed_short; + B : vector_signed_char) return vector_signed_short + renames vec_slo; + + function vec_vslo + (A : vector_signed_short; + B : vector_unsigned_char) return vector_signed_short + renames vec_slo; + + function vec_vslo + (A : vector_unsigned_short; + B : vector_signed_char) return vector_unsigned_short + renames vec_slo; + + function vec_vslo + (A : vector_unsigned_short; + B : vector_unsigned_char) return vector_unsigned_short + renames vec_slo; + + function vec_vslo + (A : vector_pixel; + B : vector_signed_char) return vector_pixel + renames vec_slo; + + function vec_vslo + (A : vector_pixel; + B : vector_unsigned_char) return vector_pixel + renames vec_slo; + + function vec_vslo + (A : vector_signed_char; + B : vector_signed_char) return vector_signed_char + renames vec_slo; + + function vec_vslo + (A : vector_signed_char; + B : vector_unsigned_char) return vector_signed_char + renames vec_slo; + + function vec_vslo + (A : vector_unsigned_char; + B : vector_signed_char) return vector_unsigned_char + renames vec_slo; + + function vec_vslo + (A : vector_unsigned_char; + B : vector_unsigned_char) return vector_unsigned_char + renames vec_slo; + + -- vec_vspltisb -- + + function vec_vspltisb + (A : c_int) return vector_signed_char + renames vec_splat_s8; + + -- vec_vspltish -- + + function vec_vspltish + (A : c_int) return vector_signed_short + renames vec_splat_s16; + + -- vec_vspltisw -- + + function vec_vspltisw + (A : c_int) return vector_signed_int + renames vec_splat_s32; + + -- vec_vsr -- + + function vec_vsr + (A : vector_signed_int; + B : vector_unsigned_int) return vector_signed_int + renames vec_srl; + + function vec_vsr + (A : vector_signed_int; + B : vector_unsigned_short) return vector_signed_int + renames vec_srl; + + function vec_vsr + (A : vector_signed_int; + B : vector_unsigned_char) return vector_signed_int + renames vec_srl; + + function vec_vsr + (A : vector_unsigned_int; + B : vector_unsigned_int) return vector_unsigned_int + renames vec_srl; + + function vec_vsr + (A : vector_unsigned_int; + B : vector_unsigned_short) return vector_unsigned_int + renames vec_srl; + + function vec_vsr + (A : vector_unsigned_int; + B : vector_unsigned_char) return vector_unsigned_int + renames vec_srl; + + function vec_vsr + (A : vector_bool_int; + B : vector_unsigned_int) return vector_bool_int + renames vec_srl; + + function vec_vsr + (A : vector_bool_int; + B : vector_unsigned_short) return vector_bool_int + renames vec_srl; + + function vec_vsr + (A : vector_bool_int; + B : vector_unsigned_char) return vector_bool_int + renames vec_srl; + + function vec_vsr + (A : vector_signed_short; + B : vector_unsigned_int) return vector_signed_short + renames vec_srl; + + function vec_vsr + (A : vector_signed_short; + B : vector_unsigned_short) return vector_signed_short + renames vec_srl; + + function vec_vsr + (A : vector_signed_short; + B : vector_unsigned_char) return vector_signed_short + renames vec_srl; + + function vec_vsr + (A : vector_unsigned_short; + B : vector_unsigned_int) return vector_unsigned_short + renames vec_srl; + + function vec_vsr + (A : vector_unsigned_short; + B : vector_unsigned_short) return vector_unsigned_short + renames vec_srl; + + function vec_vsr + (A : vector_unsigned_short; + B : vector_unsigned_char) return vector_unsigned_short + renames vec_srl; + + function vec_vsr + (A : vector_bool_short; + B : vector_unsigned_int) return vector_bool_short + renames vec_srl; + + function vec_vsr + (A : vector_bool_short; + B : vector_unsigned_short) return vector_bool_short + renames vec_srl; + + function vec_vsr + (A : vector_bool_short; + B : vector_unsigned_char) return vector_bool_short + renames vec_srl; + + function vec_vsr + (A : vector_pixel; + B : vector_unsigned_int) return vector_pixel + renames vec_srl; + + function vec_vsr + (A : vector_pixel; + B : vector_unsigned_short) return vector_pixel + renames vec_srl; + + function vec_vsr + (A : vector_pixel; + B : vector_unsigned_char) return vector_pixel + renames vec_srl; + + function vec_vsr + (A : vector_signed_char; + B : vector_unsigned_int) return vector_signed_char + renames vec_srl; + + function vec_vsr + (A : vector_signed_char; + B : vector_unsigned_short) return vector_signed_char + renames vec_srl; + + function vec_vsr + (A : vector_signed_char; + B : vector_unsigned_char) return vector_signed_char + renames vec_srl; + + function vec_vsr + (A : vector_unsigned_char; + B : vector_unsigned_int) return vector_unsigned_char + renames vec_srl; + + function vec_vsr + (A : vector_unsigned_char; + B : vector_unsigned_short) return vector_unsigned_char + renames vec_srl; + + function vec_vsr + (A : vector_unsigned_char; + B : vector_unsigned_char) return vector_unsigned_char + renames vec_srl; + + function vec_vsr + (A : vector_bool_char; + B : vector_unsigned_int) return vector_bool_char + renames vec_srl; + + function vec_vsr + (A : vector_bool_char; + B : vector_unsigned_short) return vector_bool_char + renames vec_srl; + + function vec_vsr + (A : vector_bool_char; + B : vector_unsigned_char) return vector_bool_char + renames vec_srl; + + -- vec_vsro -- + + function vec_vsro + (A : vector_float; + B : vector_signed_char) return vector_float + renames vec_sro; + + function vec_vsro + (A : vector_float; + B : vector_unsigned_char) return vector_float + renames vec_sro; + + function vec_vsro + (A : vector_signed_int; + B : vector_signed_char) return vector_signed_int + renames vec_sro; + + function vec_vsro + (A : vector_signed_int; + B : vector_unsigned_char) return vector_signed_int + renames vec_sro; + + function vec_vsro + (A : vector_unsigned_int; + B : vector_signed_char) return vector_unsigned_int + renames vec_sro; + + function vec_vsro + (A : vector_unsigned_int; + B : vector_unsigned_char) return vector_unsigned_int + renames vec_sro; + + function vec_vsro + (A : vector_signed_short; + B : vector_signed_char) return vector_signed_short + renames vec_sro; + + function vec_vsro + (A : vector_signed_short; + B : vector_unsigned_char) return vector_signed_short + renames vec_sro; + + function vec_vsro + (A : vector_unsigned_short; + B : vector_signed_char) return vector_unsigned_short + renames vec_sro; + + function vec_vsro + (A : vector_unsigned_short; + B : vector_unsigned_char) return vector_unsigned_short + renames vec_sro; + + function vec_vsro + (A : vector_pixel; + B : vector_signed_char) return vector_pixel + renames vec_sro; + + function vec_vsro + (A : vector_pixel; + B : vector_unsigned_char) return vector_pixel + renames vec_sro; + + function vec_vsro + (A : vector_signed_char; + B : vector_signed_char) return vector_signed_char + renames vec_sro; + + function vec_vsro + (A : vector_signed_char; + B : vector_unsigned_char) return vector_signed_char + renames vec_sro; + + function vec_vsro + (A : vector_unsigned_char; + B : vector_signed_char) return vector_unsigned_char + renames vec_sro; + + function vec_vsro + (A : vector_unsigned_char; + B : vector_unsigned_char) return vector_unsigned_char + renames vec_sro; + + -- vec_stvx -- + + procedure vec_stvx + (A : vector_float; + B : c_int; + C : vector_float_ptr) + renames vec_st; + + procedure vec_stvx + (A : vector_float; + B : c_int; + C : float_ptr) + renames vec_st; + + procedure vec_stvx + (A : vector_signed_int; + B : c_int; + C : vector_signed_int_ptr) + renames vec_st; + + procedure vec_stvx + (A : vector_signed_int; + B : c_int; + C : int_ptr) + renames vec_st; + + procedure vec_stvx + (A : vector_unsigned_int; + B : c_int; + C : vector_unsigned_int_ptr) + renames vec_st; + + procedure vec_stvx + (A : vector_unsigned_int; + B : c_int; + C : unsigned_int_ptr) + renames vec_st; + + procedure vec_stvx + (A : vector_bool_int; + B : c_int; + C : vector_bool_int_ptr) + renames vec_st; + + procedure vec_stvx + (A : vector_bool_int; + B : c_int; + C : unsigned_int_ptr) + renames vec_st; + + procedure vec_stvx + (A : vector_bool_int; + B : c_int; + C : int_ptr) + renames vec_st; + + procedure vec_stvx + (A : vector_signed_short; + B : c_int; + C : vector_signed_short_ptr) + renames vec_st; + + procedure vec_stvx + (A : vector_signed_short; + B : c_int; + C : short_ptr) + renames vec_st; + + procedure vec_stvx + (A : vector_unsigned_short; + B : c_int; + C : vector_unsigned_short_ptr) + renames vec_st; + + procedure vec_stvx + (A : vector_unsigned_short; + B : c_int; + C : unsigned_short_ptr) + renames vec_st; + + procedure vec_stvx + (A : vector_bool_short; + B : c_int; + C : vector_bool_short_ptr) + renames vec_st; + + procedure vec_stvx + (A : vector_bool_short; + B : c_int; + C : unsigned_short_ptr) + renames vec_st; + + procedure vec_stvx + (A : vector_pixel; + B : c_int; + C : vector_pixel_ptr) + renames vec_st; + + procedure vec_stvx + (A : vector_pixel; + B : c_int; + C : unsigned_short_ptr) + renames vec_st; + + procedure vec_stvx + (A : vector_pixel; + B : c_int; + C : short_ptr) + renames vec_st; + + procedure vec_stvx + (A : vector_bool_short; + B : c_int; + C : short_ptr) + renames vec_st; + + procedure vec_stvx + (A : vector_signed_char; + B : c_int; + C : vector_signed_char_ptr) + renames vec_st; + + procedure vec_stvx + (A : vector_signed_char; + B : c_int; + C : signed_char_ptr) + renames vec_st; + + procedure vec_stvx + (A : vector_unsigned_char; + B : c_int; + C : vector_unsigned_char_ptr) + renames vec_st; + + procedure vec_stvx + (A : vector_unsigned_char; + B : c_int; + C : unsigned_char_ptr) + renames vec_st; + + procedure vec_stvx + (A : vector_bool_char; + B : c_int; + C : vector_bool_char_ptr) + renames vec_st; + + procedure vec_stvx + (A : vector_bool_char; + B : c_int; + C : unsigned_char_ptr) + renames vec_st; + + procedure vec_stvx + (A : vector_bool_char; + B : c_int; + C : signed_char_ptr) + renames vec_st; + + -- vec_stvxl -- + + procedure vec_stvxl + (A : vector_float; + B : c_int; + C : vector_float_ptr) + renames vec_stl; + + procedure vec_stvxl + (A : vector_float; + B : c_int; + C : float_ptr) + renames vec_stl; + + procedure vec_stvxl + (A : vector_signed_int; + B : c_int; + C : vector_signed_int_ptr) + renames vec_stl; + + procedure vec_stvxl + (A : vector_signed_int; + B : c_int; + C : int_ptr) + renames vec_stl; + + procedure vec_stvxl + (A : vector_unsigned_int; + B : c_int; + C : vector_unsigned_int_ptr) + renames vec_stl; + + procedure vec_stvxl + (A : vector_unsigned_int; + B : c_int; + C : unsigned_int_ptr) + renames vec_stl; + + procedure vec_stvxl + (A : vector_bool_int; + B : c_int; + C : vector_bool_int_ptr) + renames vec_stl; + + procedure vec_stvxl + (A : vector_bool_int; + B : c_int; + C : unsigned_int_ptr) + renames vec_stl; + + procedure vec_stvxl + (A : vector_bool_int; + B : c_int; + C : int_ptr) + renames vec_stl; + + procedure vec_stvxl + (A : vector_signed_short; + B : c_int; + C : vector_signed_short_ptr) + renames vec_stl; + + procedure vec_stvxl + (A : vector_signed_short; + B : c_int; + C : short_ptr) + renames vec_stl; + + procedure vec_stvxl + (A : vector_unsigned_short; + B : c_int; + C : vector_unsigned_short_ptr) + renames vec_stl; + + procedure vec_stvxl + (A : vector_unsigned_short; + B : c_int; + C : unsigned_short_ptr) + renames vec_stl; + + procedure vec_stvxl + (A : vector_bool_short; + B : c_int; + C : vector_bool_short_ptr) + renames vec_stl; + + procedure vec_stvxl + (A : vector_bool_short; + B : c_int; + C : unsigned_short_ptr) + renames vec_stl; + + procedure vec_stvxl + (A : vector_bool_short; + B : c_int; + C : short_ptr) + renames vec_stl; + + procedure vec_stvxl + (A : vector_pixel; + B : c_int; + C : vector_pixel_ptr) + renames vec_stl; + + procedure vec_stvxl + (A : vector_pixel; + B : c_int; + C : unsigned_short_ptr) + renames vec_stl; + + procedure vec_stvxl + (A : vector_pixel; + B : c_int; + C : short_ptr) + renames vec_stl; + + procedure vec_stvxl + (A : vector_signed_char; + B : c_int; + C : vector_signed_char_ptr) + renames vec_stl; + + procedure vec_stvxl + (A : vector_signed_char; + B : c_int; + C : signed_char_ptr) + renames vec_stl; + + procedure vec_stvxl + (A : vector_unsigned_char; + B : c_int; + C : vector_unsigned_char_ptr) + renames vec_stl; + + procedure vec_stvxl + (A : vector_unsigned_char; + B : c_int; + C : unsigned_char_ptr) + renames vec_stl; + + procedure vec_stvxl + (A : vector_bool_char; + B : c_int; + C : vector_bool_char_ptr) + renames vec_stl; + + procedure vec_stvxl + (A : vector_bool_char; + B : c_int; + C : unsigned_char_ptr) + renames vec_stl; + + procedure vec_stvxl + (A : vector_bool_char; + B : c_int; + C : signed_char_ptr) + renames vec_stl; + + -- vec_vsubcuw -- + + function vec_vsubcuw + (A : vector_unsigned_int; + B : vector_unsigned_int) return vector_unsigned_int + renames vec_subc; + + -- vec_vsum2sws -- + + function vec_vsum2sws + (A : vector_signed_int; + B : vector_signed_int) return vector_signed_int + renames vec_sum2s; + + -- vec_vsumsws -- + + function vec_vsumsws + (A : vector_signed_int; + B : vector_signed_int) return vector_signed_int + renames vec_sums; + + -- vec_vrfiz -- + + function vec_vrfiz + (A : vector_float) return vector_float + renames vec_trunc; + + -- vec_vxor -- + + function vec_vxor + (A : vector_float; + B : vector_float) return vector_float + renames vec_xor; + + function vec_vxor + (A : vector_float; + B : vector_bool_int) return vector_float + renames vec_xor; + + function vec_vxor + (A : vector_bool_int; + B : vector_float) return vector_float + renames vec_xor; + + function vec_vxor + (A : vector_bool_int; + B : vector_bool_int) return vector_bool_int + renames vec_xor; + + function vec_vxor + (A : vector_bool_int; + B : vector_signed_int) return vector_signed_int + renames vec_xor; + + function vec_vxor + (A : vector_signed_int; + B : vector_bool_int) return vector_signed_int + renames vec_xor; + + function vec_vxor + (A : vector_signed_int; + B : vector_signed_int) return vector_signed_int + renames vec_xor; + + function vec_vxor + (A : vector_bool_int; + B : vector_unsigned_int) return vector_unsigned_int + renames vec_xor; + + function vec_vxor + (A : vector_unsigned_int; + B : vector_bool_int) return vector_unsigned_int + renames vec_xor; + + function vec_vxor + (A : vector_unsigned_int; + B : vector_unsigned_int) return vector_unsigned_int + renames vec_xor; + + function vec_vxor + (A : vector_bool_short; + B : vector_bool_short) return vector_bool_short + renames vec_xor; + + function vec_vxor + (A : vector_bool_short; + B : vector_signed_short) return vector_signed_short + renames vec_xor; + + function vec_vxor + (A : vector_signed_short; + B : vector_bool_short) return vector_signed_short + renames vec_xor; + + function vec_vxor + (A : vector_signed_short; + B : vector_signed_short) return vector_signed_short + renames vec_xor; + + function vec_vxor + (A : vector_bool_short; + B : vector_unsigned_short) return vector_unsigned_short + renames vec_xor; + + function vec_vxor + (A : vector_unsigned_short; + B : vector_bool_short) return vector_unsigned_short + renames vec_xor; + + function vec_vxor + (A : vector_unsigned_short; + B : vector_unsigned_short) return vector_unsigned_short + renames vec_xor; + + function vec_vxor + (A : vector_bool_char; + B : vector_signed_char) return vector_signed_char + renames vec_xor; + + function vec_vxor + (A : vector_bool_char; + B : vector_bool_char) return vector_bool_char + renames vec_xor; + + function vec_vxor + (A : vector_signed_char; + B : vector_bool_char) return vector_signed_char + renames vec_xor; + + function vec_vxor + (A : vector_signed_char; + B : vector_signed_char) return vector_signed_char + renames vec_xor; + + function vec_vxor + (A : vector_bool_char; + B : vector_unsigned_char) return vector_unsigned_char + renames vec_xor; + + function vec_vxor + (A : vector_unsigned_char; + B : vector_bool_char) return vector_unsigned_char + renames vec_xor; + + function vec_vxor + (A : vector_unsigned_char; + B : vector_unsigned_char) return vector_unsigned_char + renames vec_xor; + + ---------------------------------------------- + -- [PIM 2.5.3 Value for adjusting pointers] -- + ---------------------------------------------- + + -- "At compile time, vec_step (vec_data) produces the integer value + -- representing the amount by which a pointer to a component of an AltiVec + -- data type should increment to cause a pointer increment to increment by + -- 16 bytes". + + function vec_step (V : vector_unsigned_char) return Integer; + function vec_step (V : vector_signed_char) return Integer; + function vec_step (V : vector_bool_char) return Integer; + + function vec_step (V : vector_unsigned_short) return Integer; + function vec_step (V : vector_signed_short) return Integer; + function vec_step (V : vector_bool_short) return Integer; + + function vec_step (V : vector_unsigned_int) return Integer; + function vec_step (V : vector_signed_int) return Integer; + function vec_step (V : vector_bool_int) return Integer; + + function vec_step (V : vector_float) return Integer; + function vec_step (V : vector_pixel) return Integer; + +private + + ------------------------------------- + -- Different flavors of interfaces -- + ------------------------------------- + + -- The vast majority of the user visible functions are just neutral type + -- conversion wrappers around calls to low level primitives. For instance: + -- + -- function vec_sll + -- (A : vector_signed_int; + -- B : vector_unsigned_char) return vector_signed_int is + -- begin + -- return To_VSI (vsl (To_VSI (A), To_VSI (B))); + -- end vec_sll; + -- + -- We actually don't always need an explicit wrapper and can bind directly + -- with a straight Import of the low level routine, or a renaming of such + -- instead. + -- + -- A direct binding is not possible (that is, a wrapper is mandatory) in + -- a number of cases: + -- + -- o When the high-level/low-level types don't match, in which case a + -- straight import would risk wrong code generation or compiler blowups in + -- the Hard binding case. This is the case for 'B' in the example above. + -- + -- o When the high-level/low-level argument lists differ, as is the case + -- for most of the AltiVec predicates, relying on a low-level primitive + -- which expects a control code argument, like: + -- + -- function vec_any_ne + -- (A : vector_signed_int; + -- B : vector_signed_int) return c_int is + -- begin + -- return vcmpequw_p (CR6_LT_REV, To_VSI (A), To_VSI (B)); + -- end vec_any_ne; + -- + -- o When the high-level/low-level arguments order don't match, as in: + -- + -- function vec_cmplt + -- (A : vector_unsigned_char; + -- B : vector_unsigned_char) return vector_bool_char is + -- begin + -- return To_VBC (vcmpgtub (To_VSC (B), To_VSC (A))); + -- end vec_cmplt; + -- + -- Conversely, a direct (without wrapper) binding is sometimes mandatory + -- in the Hard binding case, because the corresponding low level code + -- accept only literal values for some arguments. Inlined calls to the + -- wrapper with proper arguments would be fine, but the wrapper body + -- itself would not be compilable. These can of course also be used in the + -- Soft binding, and so are naturally in this common unit. + -- + -- Fortunately, the sets of operations for which a wrapper is required + -- and the set of operations for which a wrapper would not be compilable + -- do not intersect. + + ----------------------------- + -- Inlining considerations -- + ----------------------------- + + -- The intent in the Hard binding case is to eventually map operations + -- to hardware instructions. Needless to say, intermediate function calls + -- do not fit this purpose, so all the user visible subprograms shall be + -- inlined. In the soft case, the bulk of the work is performed by the + -- low level routines, and those exported by this unit are short enough + -- for the inlining to make sense and even be beneficial, so... + + pragma Inline_Always (vec_abs); + pragma Inline_Always (vec_abss); + pragma Inline_Always (vec_add); + pragma Inline_Always (vec_vaddfp); + pragma Inline_Always (vec_vadduwm); + pragma Inline_Always (vec_vadduhm); + pragma Inline_Always (vec_vaddubm); + pragma Inline_Always (vec_addc); + pragma Inline_Always (vec_adds); + pragma Inline_Always (vec_vaddsws); + pragma Inline_Always (vec_vadduws); + pragma Inline_Always (vec_vaddshs); + pragma Inline_Always (vec_vadduhs); + pragma Inline_Always (vec_vaddsbs); + pragma Inline_Always (vec_vaddubs); + pragma Inline_Always (vec_and); + pragma Inline_Always (vec_andc); + pragma Inline_Always (vec_avg); + pragma Inline_Always (vec_vavgsw); + pragma Inline_Always (vec_vavguw); + pragma Inline_Always (vec_vavgsh); + pragma Inline_Always (vec_vavguh); + pragma Inline_Always (vec_vavgsb); + pragma Inline_Always (vec_vavgub); + pragma Inline_Always (vec_ceil); + pragma Inline_Always (vec_cmpb); + pragma Inline_Always (vec_cmpeq); + pragma Inline_Always (vec_vcmpeqfp); + pragma Inline_Always (vec_vcmpequw); + pragma Inline_Always (vec_vcmpequh); + pragma Inline_Always (vec_vcmpequb); + pragma Inline_Always (vec_cmpge); + pragma Inline_Always (vec_cmpgt); + pragma Inline_Always (vec_vcmpgtfp); + pragma Inline_Always (vec_vcmpgtsw); + pragma Inline_Always (vec_vcmpgtuw); + pragma Inline_Always (vec_vcmpgtsh); + pragma Inline_Always (vec_vcmpgtuh); + pragma Inline_Always (vec_vcmpgtsb); + pragma Inline_Always (vec_vcmpgtub); + pragma Inline_Always (vec_cmple); + pragma Inline_Always (vec_cmplt); + pragma Inline_Always (vec_expte); + pragma Inline_Always (vec_floor); + pragma Inline_Always (vec_ld); + pragma Inline_Always (vec_lde); + pragma Inline_Always (vec_lvewx); + pragma Inline_Always (vec_lvehx); + pragma Inline_Always (vec_lvebx); + pragma Inline_Always (vec_ldl); + pragma Inline_Always (vec_loge); + pragma Inline_Always (vec_lvsl); + pragma Inline_Always (vec_lvsr); + pragma Inline_Always (vec_madd); + pragma Inline_Always (vec_madds); + pragma Inline_Always (vec_max); + pragma Inline_Always (vec_vmaxfp); + pragma Inline_Always (vec_vmaxsw); + pragma Inline_Always (vec_vmaxuw); + pragma Inline_Always (vec_vmaxsh); + pragma Inline_Always (vec_vmaxuh); + pragma Inline_Always (vec_vmaxsb); + pragma Inline_Always (vec_vmaxub); + pragma Inline_Always (vec_mergeh); + pragma Inline_Always (vec_vmrghw); + pragma Inline_Always (vec_vmrghh); + pragma Inline_Always (vec_vmrghb); + pragma Inline_Always (vec_mergel); + pragma Inline_Always (vec_vmrglw); + pragma Inline_Always (vec_vmrglh); + pragma Inline_Always (vec_vmrglb); + pragma Inline_Always (vec_mfvscr); + pragma Inline_Always (vec_min); + pragma Inline_Always (vec_vminfp); + pragma Inline_Always (vec_vminsw); + pragma Inline_Always (vec_vminuw); + pragma Inline_Always (vec_vminsh); + pragma Inline_Always (vec_vminuh); + pragma Inline_Always (vec_vminsb); + pragma Inline_Always (vec_vminub); + pragma Inline_Always (vec_mladd); + pragma Inline_Always (vec_mradds); + pragma Inline_Always (vec_msum); + pragma Inline_Always (vec_vmsumshm); + pragma Inline_Always (vec_vmsumuhm); + pragma Inline_Always (vec_vmsummbm); + pragma Inline_Always (vec_vmsumubm); + pragma Inline_Always (vec_msums); + pragma Inline_Always (vec_vmsumshs); + pragma Inline_Always (vec_vmsumuhs); + pragma Inline_Always (vec_mtvscr); + pragma Inline_Always (vec_mule); + pragma Inline_Always (vec_vmulesh); + pragma Inline_Always (vec_vmuleuh); + pragma Inline_Always (vec_vmulesb); + pragma Inline_Always (vec_vmuleub); + pragma Inline_Always (vec_mulo); + pragma Inline_Always (vec_vmulosh); + pragma Inline_Always (vec_vmulouh); + pragma Inline_Always (vec_vmulosb); + pragma Inline_Always (vec_vmuloub); + pragma Inline_Always (vec_nmsub); + pragma Inline_Always (vec_nor); + pragma Inline_Always (vec_or); + pragma Inline_Always (vec_pack); + pragma Inline_Always (vec_vpkuwum); + pragma Inline_Always (vec_vpkuhum); + pragma Inline_Always (vec_packpx); + pragma Inline_Always (vec_packs); + pragma Inline_Always (vec_vpkswss); + pragma Inline_Always (vec_vpkuwus); + pragma Inline_Always (vec_vpkshss); + pragma Inline_Always (vec_vpkuhus); + pragma Inline_Always (vec_packsu); + pragma Inline_Always (vec_vpkswus); + pragma Inline_Always (vec_vpkshus); + pragma Inline_Always (vec_perm); + pragma Inline_Always (vec_re); + pragma Inline_Always (vec_rl); + pragma Inline_Always (vec_vrlw); + pragma Inline_Always (vec_vrlh); + pragma Inline_Always (vec_vrlb); + pragma Inline_Always (vec_round); + pragma Inline_Always (vec_rsqrte); + pragma Inline_Always (vec_sel); + pragma Inline_Always (vec_sl); + pragma Inline_Always (vec_vslw); + pragma Inline_Always (vec_vslh); + pragma Inline_Always (vec_vslb); + pragma Inline_Always (vec_sll); + pragma Inline_Always (vec_slo); + pragma Inline_Always (vec_sr); + pragma Inline_Always (vec_vsrw); + pragma Inline_Always (vec_vsrh); + pragma Inline_Always (vec_vsrb); + pragma Inline_Always (vec_sra); + pragma Inline_Always (vec_vsraw); + pragma Inline_Always (vec_vsrah); + pragma Inline_Always (vec_vsrab); + pragma Inline_Always (vec_srl); + pragma Inline_Always (vec_sro); + pragma Inline_Always (vec_st); + pragma Inline_Always (vec_ste); + pragma Inline_Always (vec_stvewx); + pragma Inline_Always (vec_stvehx); + pragma Inline_Always (vec_stvebx); + pragma Inline_Always (vec_stl); + pragma Inline_Always (vec_sub); + pragma Inline_Always (vec_vsubfp); + pragma Inline_Always (vec_vsubuwm); + pragma Inline_Always (vec_vsubuhm); + pragma Inline_Always (vec_vsububm); + pragma Inline_Always (vec_subc); + pragma Inline_Always (vec_subs); + pragma Inline_Always (vec_vsubsws); + pragma Inline_Always (vec_vsubuws); + pragma Inline_Always (vec_vsubshs); + pragma Inline_Always (vec_vsubuhs); + pragma Inline_Always (vec_vsubsbs); + pragma Inline_Always (vec_vsububs); + pragma Inline_Always (vec_sum4s); + pragma Inline_Always (vec_vsum4shs); + pragma Inline_Always (vec_vsum4sbs); + pragma Inline_Always (vec_vsum4ubs); + pragma Inline_Always (vec_sum2s); + pragma Inline_Always (vec_sums); + pragma Inline_Always (vec_trunc); + pragma Inline_Always (vec_unpackh); + pragma Inline_Always (vec_vupkhsh); + pragma Inline_Always (vec_vupkhpx); + pragma Inline_Always (vec_vupkhsb); + pragma Inline_Always (vec_unpackl); + pragma Inline_Always (vec_vupklpx); + pragma Inline_Always (vec_vupklsh); + pragma Inline_Always (vec_vupklsb); + pragma Inline_Always (vec_xor); + + pragma Inline_Always (vec_all_eq); + pragma Inline_Always (vec_all_ge); + pragma Inline_Always (vec_all_gt); + pragma Inline_Always (vec_all_in); + pragma Inline_Always (vec_all_le); + pragma Inline_Always (vec_all_lt); + pragma Inline_Always (vec_all_nan); + pragma Inline_Always (vec_all_ne); + pragma Inline_Always (vec_all_nge); + pragma Inline_Always (vec_all_ngt); + pragma Inline_Always (vec_all_nle); + pragma Inline_Always (vec_all_nlt); + pragma Inline_Always (vec_all_numeric); + pragma Inline_Always (vec_any_eq); + pragma Inline_Always (vec_any_ge); + pragma Inline_Always (vec_any_gt); + pragma Inline_Always (vec_any_le); + pragma Inline_Always (vec_any_lt); + pragma Inline_Always (vec_any_nan); + pragma Inline_Always (vec_any_ne); + pragma Inline_Always (vec_any_nge); + pragma Inline_Always (vec_any_ngt); + pragma Inline_Always (vec_any_nle); + pragma Inline_Always (vec_any_nlt); + pragma Inline_Always (vec_any_numeric); + pragma Inline_Always (vec_any_out); + + -- Similarily, vec_step is expected to be turned into a compile time + -- constant, so ... + + pragma Inline_Always (vec_step); + +end GNAT.Altivec.Vector_Operations; diff --git a/gcc/ada/g-alvety.ads b/gcc/ada/g-alvety.ads new file mode 100644 index 00000000000..03b637e0da2 --- /dev/null +++ b/gcc/ada/g-alvety.ads @@ -0,0 +1,152 @@ +------------------------------------------------------------------------------ +-- -- +-- GNAT COMPILER COMPONENTS -- +-- -- +-- G N A T . A L T I V E C . V E C T O R _ T Y P E S -- +-- -- +-- S p e c -- +-- -- +-- Copyright (C) 2004-2005, Free Software Foundation, Inc. -- +-- -- +-- GNAT is free software; you can redistribute it and/or modify it under -- +-- terms of the GNU General Public License as published by the Free Soft- -- +-- ware Foundation; either version 2, or (at your option) any later ver- -- +-- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- +-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- +-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- +-- for more details. You should have received a copy of the GNU General -- +-- Public License distributed with GNAT; see 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 other files instantiate generics from this -- +-- unit, or you link this unit with other files to produce an executable, -- +-- this unit 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 Public License. -- +-- -- +-- GNAT was originally developed by the GNAT team at New York University. -- +-- Extensive contributions were provided by Ada Core Technologies Inc. -- +-- -- +------------------------------------------------------------------------------ + +-- This unit exposes the various vector types part of the Ada binding to +-- Altivec facilities. + +with GNAT.Altivec.Low_Level_Vectors; + +package GNAT.Altivec.Vector_Types is + + use GNAT.Altivec.Low_Level_Vectors; + + --------------------------------------------------- + -- Vector type declarations [PIM-2.1 Data Types] -- + --------------------------------------------------- + + -- Except for assignments and pointer creation/dereference, operations + -- on vectors are only performed via subprograms. The vector types are + -- then private, and non-limited since assignments are allowed. + + -- The Hard/Soft binding type-structure differentiation is achieved in + -- Low_Level_Vectors. Each version only exposes private vector types, that + -- we just sub-type here. This is fine from the design standpoint and + -- reduces the amount of explicit conversion required in various places + -- internally. + + subtype vector_unsigned_char is Low_Level_Vectors.LL_VUC; + subtype vector_signed_char is Low_Level_Vectors.LL_VSC; + subtype vector_bool_char is Low_Level_Vectors.LL_VBC; + + subtype vector_unsigned_short is Low_Level_Vectors.LL_VUS; + subtype vector_signed_short is Low_Level_Vectors.LL_VSS; + subtype vector_bool_short is Low_Level_Vectors.LL_VBS; + + subtype vector_unsigned_int is Low_Level_Vectors.LL_VUI; + subtype vector_signed_int is Low_Level_Vectors.LL_VSI; + subtype vector_bool_int is Low_Level_Vectors.LL_VBI; + + subtype vector_float is Low_Level_Vectors.LL_VF; + subtype vector_pixel is Low_Level_Vectors.LL_VP; + + -- [PIM-2.1] shows groups of declarations with exact same component types, + -- e.g. vector unsigned short together with vector unsigned short int. It + -- so appears tempting to define subtypes for those matches here. + -- + -- [PIM-2.1] does not qualify items in those groups as "the same types", + -- though, and [PIM-2.4.2 Assignments] reads: "if either the left hand + -- side or the right hand side of an expression has a vector type, then + -- both sides of the expression must be of the same vector type". + -- + -- Not so clear what is exactly right, then. We go with subtypes for now + -- and can adjust later if need be. + + subtype vector_unsigned_short_int is vector_unsigned_short; + subtype vector_signed_short_int is vector_signed_short; + + subtype vector_char is vector_signed_char; + subtype vector_short is vector_signed_short; + subtype vector_int is vector_signed_int; + + -------------------------------- + -- Corresponding access types -- + -------------------------------- + + type vector_unsigned_char_ptr is access all vector_unsigned_char; + type vector_signed_char_ptr is access all vector_signed_char; + type vector_bool_char_ptr is access all vector_bool_char; + + type vector_unsigned_short_ptr is access all vector_unsigned_short; + type vector_signed_short_ptr is access all vector_signed_short; + type vector_bool_short_ptr is access all vector_bool_short; + + type vector_unsigned_int_ptr is access all vector_unsigned_int; + type vector_signed_int_ptr is access all vector_signed_int; + type vector_bool_int_ptr is access all vector_bool_int; + + type vector_float_ptr is access all vector_float; + type vector_pixel_ptr is access all vector_pixel; + + -------------------------------------------------------------------- + -- Additional access types, for the sake of some argument passing -- + -------------------------------------------------------------------- + + -- ... because some of the operations expect pointers to possibly + -- constant objects. + + type const_vector_bool_char_ptr is access constant vector_bool_char; + type const_vector_signed_char_ptr is access constant vector_signed_char; + type const_vector_unsigned_char_ptr is access constant vector_unsigned_char; + + type const_vector_bool_short_ptr is access constant vector_bool_short; + type const_vector_signed_short_ptr is access constant vector_signed_short; + type const_vector_unsigned_short_ptr is access + constant vector_unsigned_short; + + type const_vector_bool_int_ptr is access constant vector_bool_int; + type const_vector_signed_int_ptr is access constant vector_signed_int; + type const_vector_unsigned_int_ptr is access constant vector_unsigned_int; + + type const_vector_float_ptr is access constant vector_float; + type const_vector_pixel_ptr is access constant vector_pixel; + + ---------------------- + -- Useful shortcuts -- + ---------------------- + + subtype VUC is vector_unsigned_char; + subtype VSC is vector_signed_char; + subtype VBC is vector_bool_char; + + subtype VUS is vector_unsigned_short; + subtype VSS is vector_signed_short; + subtype VBS is vector_bool_short; + + subtype VUI is vector_unsigned_int; + subtype VSI is vector_signed_int; + subtype VBI is vector_bool_int; + + subtype VP is vector_pixel; + subtype VF is vector_float; + +end GNAT.Altivec.Vector_Types; diff --git a/gcc/ada/g-alvevi.ads b/gcc/ada/g-alvevi.ads new file mode 100644 index 00000000000..bd3a299e2f9 --- /dev/null +++ b/gcc/ada/g-alvevi.ads @@ -0,0 +1,158 @@ +------------------------------------------------------------------------------ +-- -- +-- GNAT COMPILER COMPONENTS -- +-- -- +-- G N A T . A L T I V E C . V E C T O R _ V I E W S -- +-- -- +-- S p e c -- +-- -- +-- Copyright (C) 2005, Free Software Foundation, Inc. -- +-- -- +-- GNAT is free software; you can redistribute it and/or modify it under -- +-- terms of the GNU General Public License as published by the Free Soft- -- +-- ware Foundation; either version 2, or (at your option) any later ver- -- +-- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- +-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- +-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- +-- for more details. You should have received a copy of the GNU General -- +-- Public License distributed with GNAT; see 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 other files instantiate generics from this -- +-- unit, or you link this unit with other files to produce an executable, -- +-- this unit 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 Public License. -- +-- -- +-- GNAT was originally developed by the GNAT team at New York University. -- +-- Extensive contributions were provided by Ada Core Technologies Inc. -- +-- -- +------------------------------------------------------------------------------ + +-- This unit provides public 'View' data types from/to which private vector +-- representations can be converted via Altivec.Conversions. This allows +-- convenient access to individual vector elements and provides a simple way +-- to initialize vector objects. + +-- Accessing vector contents with direct memory overlays should be avoided +-- because actual vector representations may vary across configurations, for +-- instance to accomodate different target endianness. + +-- The natural representation of a vector is an array indexed by vector +-- component number, which is materialized by the Varray type definitions +-- below. The 16byte alignment constraint is unfortunately sometimes not +-- properly honored for constant array aggregates, so the View types are +-- actually records enclosing such arrays. + +package GNAT.Altivec.Vector_Views is + + --------------------- + -- char components -- + --------------------- + + type Vchar_Range is range 1 .. 16; + + type Varray_unsigned_char is array (Vchar_Range) of unsigned_char; + for Varray_unsigned_char'Alignment use VECTOR_ALIGNMENT; + + type VUC_View is record + Values : Varray_unsigned_char; + end record; + + type Varray_signed_char is array (Vchar_Range) of signed_char; + for Varray_signed_char'Alignment use VECTOR_ALIGNMENT; + + type VSC_View is record + Values : Varray_signed_char; + end record; + + type Varray_bool_char is array (Vchar_Range) of bool_char; + for Varray_bool_char'Alignment use VECTOR_ALIGNMENT; + + type VBC_View is record + Values : Varray_bool_char; + end record; + + ---------------------- + -- short components -- + ---------------------- + + type Vshort_Range is range 1 .. 8; + + type Varray_unsigned_short is array (Vshort_Range) of unsigned_short; + for Varray_unsigned_short'Alignment use VECTOR_ALIGNMENT; + + type VUS_View is record + Values : Varray_unsigned_short; + end record; + + type Varray_signed_short is array (Vshort_Range) of signed_short; + for Varray_signed_short'Alignment use VECTOR_ALIGNMENT; + + type VSS_View is record + Values : Varray_signed_short; + end record; + + type Varray_bool_short is array (Vshort_Range) of bool_short; + for Varray_bool_short'Alignment use VECTOR_ALIGNMENT; + + type VBS_View is record + Values : Varray_bool_short; + end record; + + -------------------- + -- int components -- + -------------------- + + type Vint_Range is range 1 .. 4; + + type Varray_unsigned_int is array (Vint_Range) of unsigned_int; + for Varray_unsigned_int'Alignment use VECTOR_ALIGNMENT; + + type VUI_View is record + Values : Varray_unsigned_int; + end record; + + type Varray_signed_int is array (Vint_Range) of signed_int; + for Varray_signed_int'Alignment use VECTOR_ALIGNMENT; + + type VSI_View is record + Values : Varray_signed_int; + end record; + + type Varray_bool_int is array (Vint_Range) of bool_int; + for Varray_bool_int'Alignment use VECTOR_ALIGNMENT; + + type VBI_View is record + Values : Varray_bool_int; + end record; + + ---------------------- + -- float components -- + ---------------------- + + type Vfloat_Range is range 1 .. 4; + + type Varray_float is array (Vfloat_Range) of C_float; + for Varray_float'Alignment use VECTOR_ALIGNMENT; + + type VF_View is record + Values : Varray_float; + end record; + + ---------------------- + -- pixel components -- + ---------------------- + + type Vpixel_Range is range 1 .. 8; + + type Varray_pixel is array (Vpixel_Range) of pixel; + for Varray_pixel'Alignment use VECTOR_ALIGNMENT; + + type VP_View is record + Values : Varray_pixel; + end record; + +end GNAT.Altivec.Vector_Views; diff --git a/gcc/ada/g-diopit.adb b/gcc/ada/g-diopit.adb index 92c7be128be..d57ca385832 100644 --- a/gcc/ada/g-diopit.adb +++ b/gcc/ada/g-diopit.adb @@ -51,6 +51,7 @@ package body GNAT.Directory_Operations.Iteration is is File_Regexp : constant Regexp.Regexp := Regexp.Compile (File_Pattern); Index : Natural := 0; + Quit : Boolean; procedure Read_Directory (Directory : Dir_Name_Str); -- Open Directory and read all entries. This routine is called @@ -80,7 +81,6 @@ package body GNAT.Directory_Operations.Iteration is Dir : Dir_Type; Buffer : String (1 .. 2_048); Last : Natural; - Quit : Boolean; begin Open (Dir, Directory); @@ -96,7 +96,6 @@ package body GNAT.Directory_Operations.Iteration is begin if Regexp.Match (Dir_Entry, File_Regexp) then - Quit := False; Index := Index + 1; begin @@ -116,6 +115,7 @@ package body GNAT.Directory_Operations.Iteration is and then OS_Lib.Is_Directory (Pathname) then Read_Directory (Pathname); + exit when Quit; end if; end; end loop; @@ -124,6 +124,7 @@ package body GNAT.Directory_Operations.Iteration is end Read_Directory; begin + Quit := False; Read_Directory (Root_Directory); end Find; diff --git a/gcc/ada/g-exctra.ads b/gcc/ada/g-exctra.ads index b11a23e2e91..eb0d5a6c428 100644 --- a/gcc/ada/g-exctra.ads +++ b/gcc/ada/g-exctra.ads @@ -44,7 +44,7 @@ -- The default backtrace is in the form of absolute code locations which may -- be converted to corresponding source locations using the addr2line utility -- or from within GDB. Please refer to GNAT.Traceback for information about --- what is necessary to be able to exploit thisg possibility. +-- what is necessary to be able to exploit this possibility. -- The backtrace output can also be customized by way of a "decorator" which -- may return any string output in association with a provided call chain. diff --git a/gcc/ada/g-os_lib.adb b/gcc/ada/g-os_lib.adb index 80db696b517..46a21fdf750 100644 --- a/gcc/ada/g-os_lib.adb +++ b/gcc/ada/g-os_lib.adb @@ -384,7 +384,11 @@ package body GNAT.OS_Lib is procedure Free is new Unchecked_Deallocation (Buf, Buf_Ptr); begin - if From = Invalid_FD or else To = Invalid_FD then + if From = Invalid_FD then + raise Copy_Error; + + elsif To = Invalid_FD then + Close (From, Status_From); raise Copy_Error; end if; @@ -903,6 +907,36 @@ package body GNAT.OS_Lib is return Result; end Get_Debuggable_Suffix; + ---------------------------------- + -- Get_Target_Debuggable_Suffix -- + ---------------------------------- + + function Get_Target_Debuggable_Suffix return String_Access is + Target_Exec_Ext_Ptr : Address; + pragma Import + (C, Target_Exec_Ext_Ptr, "__gnat_target_debuggable_extension"); + + procedure Strncpy (Astring_Addr, Cstring : Address; N : Integer); + pragma Import (C, Strncpy, "strncpy"); + + function Strlen (Cstring : Address) return Integer; + pragma Import (C, Strlen, "strlen"); + + Suffix_Length : Integer; + Result : String_Access; + + begin + Suffix_Length := Strlen (Target_Exec_Ext_Ptr); + + Result := new String (1 .. Suffix_Length); + + if Suffix_Length > 0 then + Strncpy (Result.all'Address, Target_Exec_Ext_Ptr, Suffix_Length); + end if; + + return Result; + end Get_Target_Debuggable_Suffix; + --------------------------- -- Get_Executable_Suffix -- --------------------------- @@ -930,6 +964,36 @@ package body GNAT.OS_Lib is return Result; end Get_Executable_Suffix; + ---------------------------------- + -- Get_Target_Executable_Suffix -- + ---------------------------------- + + function Get_Target_Executable_Suffix return String_Access is + Target_Exec_Ext_Ptr : Address; + pragma Import + (C, Target_Exec_Ext_Ptr, "__gnat_target_executable_extension"); + + procedure Strncpy (Astring_Addr, Cstring : Address; N : Integer); + pragma Import (C, Strncpy, "strncpy"); + + function Strlen (Cstring : Address) return Integer; + pragma Import (C, Strlen, "strlen"); + + Suffix_Length : Integer; + Result : String_Access; + + begin + Suffix_Length := Strlen (Target_Exec_Ext_Ptr); + + Result := new String (1 .. Suffix_Length); + + if Suffix_Length > 0 then + Strncpy (Result.all'Address, Target_Exec_Ext_Ptr, Suffix_Length); + end if; + + return Result; + end Get_Target_Executable_Suffix; + ----------------------- -- Get_Object_Suffix -- ----------------------- @@ -957,6 +1021,36 @@ package body GNAT.OS_Lib is return Result; end Get_Object_Suffix; + ------------------------------ + -- Get_Target_Object_Suffix -- + ------------------------------ + + function Get_Target_Object_Suffix return String_Access is + Target_Object_Ext_Ptr : Address; + pragma Import + (C, Target_Object_Ext_Ptr, "__gnat_target_object_extension"); + + procedure Strncpy (Astring_Addr, Cstring : Address; N : Integer); + pragma Import (C, Strncpy, "strncpy"); + + function Strlen (Cstring : Address) return Integer; + pragma Import (C, Strlen, "strlen"); + + Suffix_Length : Integer; + Result : String_Access; + + begin + Suffix_Length := Strlen (Target_Object_Ext_Ptr); + + Result := new String (1 .. Suffix_Length); + + if Suffix_Length > 0 then + Strncpy (Result.all'Address, Target_Object_Ext_Ptr, Suffix_Length); + end if; + + return Result; + end Get_Target_Object_Suffix; + ------------ -- Getenv -- ------------ diff --git a/gcc/ada/g-os_lib.ads b/gcc/ada/g-os_lib.ads index 6c09b607252..8360d35e5e6 100644 --- a/gcc/ada/g-os_lib.ads +++ b/gcc/ada/g-os_lib.ads @@ -520,17 +520,29 @@ package GNAT.OS_Lib is function Get_Debuggable_Suffix return String_Access; -- Return the debuggable suffix convention. Usually this is the same as -- the convention for Get_Executable_Suffix. The result is allocated on - -- the heap and should be freed when no longer needed to avoid storage + -- the heap and should be freed after use to avoid storage leaks. + + function Get_Target_Debuggable_Suffix return String_Access; + -- Return the target debuggable suffix convention. Usually this is the + -- same as the convention for Get_Executable_Suffix. The result is + -- allocated on the heap and should be freed after use to avoid storage -- leaks. function Get_Executable_Suffix return String_Access; - -- Return the executable suffix convention. The result is allocated on - -- the heap and should be freed when no longer needed to avoid storage - -- leaks. + -- Return the executable suffix convention. The result is allocated on the + -- heap and should be freed after use to avoid storage leaks. function Get_Object_Suffix return String_Access; - -- Return the object suffix convention. The result is allocated on the - -- heap and should be freed when no longer needed to avoid storage leaks. + -- Return the object suffix convention. The result is allocated on the heap + -- and should be freed after use to avoid storage leaks. + + function Get_Target_Executable_Suffix return String_Access; + -- Return the target executable suffix convention. The result is allocated + -- on the heap and should be freed after use to avoid storage leaks. + + function Get_Target_Object_Suffix return String_Access; + -- Return the target object suffix convention. The result is allocated on + -- the heap and should be freed after use to avoid storage leaks. -- The following section contains low-level routines using addresses to -- pass file name and executable name. In each routine the name must be @@ -706,12 +718,12 @@ package GNAT.OS_Lib is Args : Argument_List) return Process_Id; -- This is a non blocking call. The Process_Id of the spawned process is - -- returned. Parameters are to be used as in Spawn. If Invalid_Id is + -- returned. Parameters are to be used as in Spawn. If Invalid_Pid is -- returned the program could not be spawned. -- -- "Non_Blocking_Spawn" should not be used in tasking applications. -- - -- This function will always return Invalid_Id under VxWorks, since there + -- This function will always return Invalid_Pid under VxWorks, since there -- is no notion of executables under this OS. function Non_Blocking_Spawn @@ -721,12 +733,12 @@ package GNAT.OS_Lib is Err_To_Out : Boolean := True) return Process_Id; -- Similar to the procedure above, but redirects the output to the file -- designated by Output_File_Descriptor. If Err_To_Out is True, then the - -- Standard Error output is also redirected. Invalid_Id is returned + -- Standard Error output is also redirected. Invalid_Pid is returned -- if the program could not be spawned successfully. -- -- "Non_Blocking_Spawn" should not be used in tasking applications. -- - -- This function will always return Invalid_Id under VxWorks, since there + -- This function will always return Invalid_Pid under VxWorks, since there -- is no notion of executables under this OS. function Non_Blocking_Spawn @@ -739,13 +751,13 @@ package GNAT.OS_Lib is -- a file with the name Output_File. -- -- Success is set to True if the command is executed and its output - -- successfully written to the file. Invalid_Id is returned if the output + -- successfully written to the file. Invalid_Pid is returned if the output -- file could not be created or if the program could not be spawned -- successfully. -- -- "Non_Blocking_Spawn" should not be used in tasking applications. -- - -- This function will always return Invalid_Id under VxWorks, since there + -- This function will always return Invalid_Pid under VxWorks, since there -- is no notion of executables under this OS. procedure Wait_Process (Pid : out Process_Id; Success : out Boolean); @@ -757,7 +769,7 @@ package GNAT.OS_Lib is -- Wait_Process is immediate. Pid identifies the process that has -- terminated (matching the value returned from Non_Blocking_Spawn). -- Success is set to True if this sub-process terminated successfully. If - -- Pid = Invalid_Id, there were no subprocesses left to wait on. + -- Pid = Invalid_Pid, there were no subprocesses left to wait on. -- -- This function will always set success to False under VxWorks, since -- there is no notion of executables under this OS. diff --git a/gcc/ada/g-soccon.ads b/gcc/ada/g-soccon.ads index f2f00554efd..679a98613a8 100644 --- a/gcc/ada/g-soccon.ads +++ b/gcc/ada/g-soccon.ads @@ -36,11 +36,12 @@ -- directly with'ed by an applications program. -- WARNING! This file is a default version that must be replaced for --- each platform. --- The values below were computed from a i686-pc-linux-gnu environment. +-- each platform by running gen-soccon.c which automatically generates +-- the appropriate target specific values. --- This file is generated automatically, do not modify it by hand! Instead, --- make changes to gen-soccon.c and re-run it on each target. +-- The values below were computed from a i686-pc-linux-gnu environment, +-- but are for illustration purposes only. As noted above, part of a port +-- to a new target is to replace this file appropriately. package GNAT.Sockets.Constants is diff --git a/gcc/ada/gigi.h b/gcc/ada/gigi.h index 6dd10ff8210..2552e568356 100644 --- a/gcc/ada/gigi.h +++ b/gcc/ada/gigi.h @@ -710,8 +710,12 @@ extern tree build_call_2_expr (tree fundecl, tree arg1, tree arg2); extern tree build_call_0_expr (tree fundecl); /* Call a function that raises an exception and pass the line number and file - name, if requested. MSG says which exception function to call. */ -extern tree build_call_raise (int msg); + name, if requested. MSG says which exception function to call. + + GNAT_NODE is the gnat node conveying the source location for which the + error should be signaled, or Empty in which case the error is signaled on + the current ref_file_name/input_line. */ +extern tree build_call_raise (int msg, Node_Id gnat_node); /* Return a CONSTRUCTOR of TYPE whose list is LIST. This is not the same as build_constructor in the language-independent tree.c. */ diff --git a/gcc/ada/gnat_rm.texi b/gcc/ada/gnat_rm.texi index 9baa081a703..8a2ad45b058 100644 --- a/gcc/ada/gnat_rm.texi +++ b/gcc/ada/gnat_rm.texi @@ -110,6 +110,7 @@ Implementation Defined Pragmas * Pragma Comment:: * Pragma Common_Object:: * Pragma Compile_Time_Warning:: +* Pragma Complete_Representation:: * Pragma Complex_Representation:: * Pragma Component_Alignment:: * Pragma Convention_Identifier:: @@ -281,6 +282,11 @@ The GNAT Library * Ada.Text_IO.C_Streams (a-tiocst.ads):: * Ada.Wide_Text_IO.C_Streams (a-wtcstr.ads):: * Ada.Wide_Wide_Text_IO.C_Streams (a-ztcstr.ads):: +* GNAT.Altivec (g-altive.ads):: +* GNAT.Altivec.Conversions (g-altcon.ads):: +* GNAT.Altivec.Vector_Operations (g-alveop.ads):: +* GNAT.Altivec.Vector_Types (g-alvety.ads):: +* GNAT.Altivec.Vector_Views (g-alvevi.ads):: * GNAT.Array_Split (g-arrspl.ads):: * GNAT.AWK (g-awk.ads):: * GNAT.Bounded_Buffers (g-boubuf.ads):: @@ -644,6 +650,7 @@ consideration, the use of these pragmas should be minimized. * Pragma Comment:: * Pragma Common_Object:: * Pragma Compile_Time_Warning:: +* Pragma Complete_Representation:: * Pragma Complex_Representation:: * Pragma Component_Alignment:: * Pragma Convention_Identifier:: @@ -1039,6 +1046,25 @@ If these conditions are met, a warning message is generated using the value given as the second argument. This string value may contain embedded ASCII.LF characters to break the message into multiple lines. +@node Pragma Complete_Representation +@unnumberedsec Pragma Complete_Representation +@findex Complete_Representation +@noindent +Syntax: + +@smallexample @c ada +pragma Complete_Representation; +@end smallexample + +@noindent +This pragma must appear immediately within a record representation +clause. Typical placements are before the first component clause +or after the last component clause. The effect is to give an error +message if any component is missing a component clause. This pragma +may be used to ensure that a record representation clause is +complete, and that this invariant is maintained if fields are +added to the record in the future. + @node Pragma Complex_Representation @unnumberedsec Pragma Complex_Representation @findex Complex_Representation @@ -1356,7 +1382,7 @@ See @ref{Interfacing to C++} for related information. Syntax: @smallexample @c ada -pragma Debug (PROCEDURE_CALL_WITHOUT_SEMICOLON); +pragma Debug ([CONDITION, ]PROCEDURE_CALL_WITHOUT_SEMICOLON); PROCEDURE_CALL_WITHOUT_SEMICOLON ::= PROCEDURE_NAME @@ -1364,18 +1390,17 @@ PROCEDURE_CALL_WITHOUT_SEMICOLON ::= @end smallexample @noindent -The argument has the syntactic form of an expression, meeting the -syntactic requirements for pragmas. - -If debug pragmas are not enabled, this pragma has no -effect. If debug pragmas are enabled, the semantics of the pragma is exactly -equivalent to the procedure call statement corresponding to the argument -with a terminating semicolon. Pragmas are permitted in sequences of -declarations, so you can use pragma @code{Debug} to intersperse calls to -debug procedures in the middle of declarations. Debug pragmas can be -enabled either by use of the command line switch @code{-gnata} or by use -of the configuration pragma @code{Debug_Policy}. +The procedure call argument has the syntactic form of an expression, meeting +the syntactic requirements for pragmas. +If debug pragmas are not enabled or if the condition is present and evaluates +to False, this pragma has no effect. If debug pragmas are enabled, the +semantics of the pragma is exactly equivalent to the procedure call statement +corresponding to the argument with a terminating semicolon. Pragmas are +permitted in sequences of declarations, so you can use pragma @code{Debug} to +intersperse calls to debug procedures in the middle of declarations. Debug +pragmas can be enabled either by use of the command line switch @code{-gnata} +or by use of the configuration pragma @code{Debug_Policy}. @node Pragma Debug_Policy @unnumberedsec Pragma Debug_Policy @@ -1393,20 +1418,6 @@ If the argument is @code{IGNORE}, then pragma @code{DEBUG} is ignored. This pragma overrides the effect of the @code{-gnata} switch on the command line. -If debug pragmas are not enabled, this pragma has no -effect. If debug pragmas are enabled, the semantics of the pragma is exactly -equivalent to the procedure call statement corresponding to the argument -with a terminating semicolon. Pragmas are permitted in sequences of -declarations, so you can use pragma @code{Debug} to intersperse calls to -debug procedures in the middle of declarations. Debug pragmas can be -enabled either by use of the command line switch @code{-gnata} or by use -of the configuration pragma @code{Debug_Policy}. - - - - - - @node Pragma Detect_Blocking @unnumberedsec Pragma Detect_Blocking @findex Detect_Blocking @@ -7257,7 +7268,7 @@ See the definition and documentation in file @file{s-maccod.ads}. @end cartouche @noindent Unchecked conversion between types of the same size -and results in an uninterpreted transmission of the bits from one type +results in an uninterpreted transmission of the bits from one type to the other. If the types are of unequal sizes, then in the case of discrete types, a shorter source is first zero or sign extended as necessary, and a shorter target is simply truncated on the left. @@ -7265,7 +7276,10 @@ For all non-discrete types, the source is first copied if necessary to ensure that the alignment requirements of the target are met, then a pointer is constructed to the source value, and the result is obtained by dereferencing this pointer after converting it to be a pointer to the -target type. +target type. Unchecked conversions where the target subtype is an +unconstrained array are not permitted. If the target alignment is +greater than the source alignment, then a copy of the result is +made with appropriate alignment @sp 1 @cartouche @@ -8079,7 +8093,7 @@ of delay expirations for lower priority tasks. @noindent @c SGI info: @ignore -Tasks map to IRIX threads, and the dispatching policy is as defied by +Tasks map to IRIX threads, and the dispatching policy is as defined by the IRIX implementation of threads. @end ignore The policy is the same as that of the underlying threads implementation. @@ -11078,9 +11092,9 @@ streams by mixed language programs. Note though that system level buffering is explictly enabled at elaboration of the standard I/O packages and that can have an impact on mixed language programs, in particular those using I/O before calling the Ada elaboration routine (e.g. adainit). It is recommended to call -the Ada elaboration routine before performing any I/O or when impractical, flush -the common I/O streams and in particular Standard_Output before elaborating the -Ada code. +the Ada elaboration routine before performing any I/O or when impractical, +flush the common I/O streams and in particular Standard_Output before +elaborating the Ada code. @node FORM Strings @section FORM Strings @@ -12154,6 +12168,11 @@ of GNAT, and will generate a warning message. * Ada.Text_IO.C_Streams (a-tiocst.ads):: * Ada.Wide_Text_IO.C_Streams (a-wtcstr.ads):: * Ada.Wide_Wide_Text_IO.C_Streams (a-ztcstr.ads):: +* GNAT.Altivec (g-altive.ads):: +* GNAT.Altivec.Conversions (g-altcon.ads):: +* GNAT.Altivec.Vector_Operations (g-alveop.ads):: +* GNAT.Altivec.Vector_Types (g-alvety.ads):: +* GNAT.Altivec.Vector_Views (g-alvevi.ads):: * GNAT.Array_Split (g-arrspl.ads):: * GNAT.AWK (g-awk.ads):: * GNAT.Bounded_Buffers (g-boubuf.ads):: @@ -12451,6 +12470,55 @@ C streams and @code{Wide_Wide_Text_IO}. The stream identifier can be extracted from a file opened on the Ada side, and an Ada file can be constructed from a stream opened on the C side. +@node GNAT.Altivec (g-altive.ads) +@section @code{GNAT.Altivec} (@file{g-altive.ads}) +@cindex @code{GNAT.Altivec} (@file{g-altive.ads}) +@cindex AltiVec + +@noindent +This is the root package of the GNAT AltiVec binding. It provides +definitions of constants and types common to all the versions of the +binding. + +@node GNAT.Altivec.Conversions (g-altcon.ads) +@section @code{GNAT.Altivec.Conversions} (@file{g-altcon.ads}) +@cindex @code{GNAT.Altivec.Conversions} (@file{g-altcon.ads}) +@cindex AltiVec + +@noindent +This package provides the Vector/View conversion routines. + +@node GNAT.Altivec.Vector_Operations (g-alveop.ads) +@section @code{GNAT.Altivec.Vector_Operations} (@file{g-alveop.ads}) +@cindex @code{GNAT.Altivec.Vector_Operations} (@file{g-alveop.ads}) +@cindex AltiVec + +@noindent +This package exposes the Ada interface to the AltiVec operations on +vector objects. A soft emulation is included by default in the GNAT +library. The hard binding is provided as a separate package. This unit +is common to both bindings. + +@node GNAT.Altivec.Vector_Types (g-alvety.ads) +@section @code{GNAT.Altivec.Vector_Types} (@file{g-alvety.ads}) +@cindex @code{GNAT.Altivec.Vector_Types} (@file{g-alvety.ads}) +@cindex AltiVec + +@noindent +This package exposes the various vector types part of the Ada binding +to AltiVec facilities. + +@node GNAT.Altivec.Vector_Views (g-alvevi.ads) +@section @code{GNAT.Altivec.Vector_Views} (@file{g-alvevi.ads}) +@cindex @code{GNAT.Altivec.Vector_Views} (@file{g-alvevi.ads}) +@cindex AltiVec + +@noindent +This package provides public 'View' data types from/to which private +vector representations can be converted via +GNAT.Altivec.Conversions. This allows convenient access to individual +vector elements and provides a simple way to initialize vector +objects. @node GNAT.Array_Split (g-arrspl.ads) @section @code{GNAT.Array_Split} (@file{g-arrspl.ads}) diff --git a/gcc/ada/gnat_ugn.texi b/gcc/ada/gnat_ugn.texi index 4f4e5852b30..c49473b2cdb 100644 --- a/gcc/ada/gnat_ugn.texi +++ b/gcc/ada/gnat_ugn.texi @@ -191,6 +191,7 @@ AdaCore@* * Using the GNU make Utility:: @end ifclear * Memory Management Issues:: +* Stack Related Tools:: * Creating Sample Bodies Using gnatstub:: * Other Utility Programs:: * Running and Debugging Ada Programs:: @@ -272,7 +273,6 @@ Switches for gcc * Validity Checking:: * Style Checking:: * Run-Time Checks:: -* Stack Overflow Checking:: * Using gcc for Syntax Checking:: * Using gcc for Semantic Checking:: * Compiling Different Versions of Ada:: @@ -461,6 +461,12 @@ Memory Management Issues * The gnatmem Tool:: @end ifclear +Stack Related Tools + +* Stack Overflow Checking:: +* Static Stack Usage Analysis:: +* Dynamic Stack Usage Analysis:: + Some Useful Memory Pools The GNAT Debug Pool Facility @@ -784,6 +790,10 @@ allocation and deallocation and helps detect ``memory leaks''. @end ifclear @item +@ref{Stack Related Tools}, describes some useful tools associated to stack. +In particular, dynamic and statick usage measurements. + +@item @ref{Creating Sample Bodies Using gnatstub}, discusses @code{gnatstub}, a utility that generates empty but compilable bodies for library units. @@ -3653,7 +3663,6 @@ compilation units. * Validity Checking:: * Style Checking:: * Run-Time Checks:: -* Stack Overflow Checking:: * Using gcc for Syntax Checking:: * Using gcc for Semantic Checking:: * Compiling Different Versions of Ada:: @@ -5552,7 +5561,7 @@ a single character (however many bytes are needed in the encoding). @emph{Set maximum line length.} If the sequence ^M^MAX_LENGTH=^nnn, where nnn is a decimal number, appears in the string after @option{-gnaty} then the length of lines must not exceed the -given value. +given value. The maximum value that can be specified is 32767. @item ^n^STANDARD_CASING^ @emph{Check casing of entities in Standard.} @@ -5841,62 +5850,6 @@ checks. You may modify them using either @code{Suppress} (to remove checks) or @code{Unsuppress} (to add back suppressed checks) pragmas in the program source. -@node Stack Overflow Checking -@subsection Stack Overflow Checking -@cindex Stack Overflow Checking -@cindex -fstack-check - -@noindent -For most operating systems, @command{gcc} does not perform stack overflow -checking by default. This means that if the main environment task or -some other task exceeds the available stack space, then unpredictable -behavior will occur. - -To activate stack checking, compile all units with the gcc option -@option{-fstack-check}. For example: - -@smallexample -gcc -c -fstack-check package1.adb -@end smallexample - -@noindent -Units compiled with this option will generate extra instructions to check -that any use of the stack (for procedure calls or for declaring local -variables in declare blocks) do not exceed the available stack space. -If the space is exceeded, then a @code{Storage_Error} exception is raised. - -For declared tasks, the stack size is always controlled by the size -given in an applicable @code{Storage_Size} pragma (or is set to -the default size if no pragma is used. - -For the environment task, the stack size depends on -system defaults and is unknown to the compiler. The stack -may even dynamically grow on some systems, precluding the -normal Ada semantics for stack overflow. In the worst case, -unbounded stack usage, causes unbounded stack expansion -resulting in the system running out of virtual memory. - -The stack checking may still work correctly if a fixed -size stack is allocated, but this cannot be guaranteed. -To ensure that a clean exception is signalled for stack -overflow, set the environment variable -@code{GNAT_STACK_LIMIT} to indicate the maximum -stack area that can be used, as in: -@cindex GNAT_STACK_LIMIT - -@smallexample -SET GNAT_STACK_LIMIT 1600 -@end smallexample - -@noindent -The limit is given in kilobytes, so the above declaration would -set the stack limit of the environment task to 1.6 megabytes. -Note that the only purpose of this usage is to limit the amount -of stack used by the environment task. If it is necessary to -increase the amount of stack for the environment task, then this -is an operating systems issue, and must be addressed with the -appropriate operating systems commands. - @node Using gcc for Syntax Checking @subsection Using @command{gcc} for Syntax Checking @table @option @@ -6339,6 +6292,10 @@ integers without any kind of scaling. @item free @var{expr} [storage_pool = @var{xxx}] Shows the storage pool associated with a @code{free} statement. +@item [subtype or type declaration] +Used to list an equivalent declaration for an internally generated +type that is referenced elsewhere in the listing. + @item freeze @var{typename} [@var{actions}] Shows the point at which @var{typename} is frozen, with possible associated actions to be performed at the freeze point. @@ -7124,6 +7081,27 @@ Check only, no generation of binder output file. @cindex @option{^-C^/BIND_FILE=C^} (@command{gnatbind}) Generate binder program in C +@item ^-D^/DEFAULT_SECONDARY_STACK_SIZE=nnnnn^ +@cindex @option{^-D^/DEFAULT_SECONDARY_STACK_SIZE=nnnnn^} (@command{gnatbind}) +This switch can be used to change the default secondary stack size value +to a specified size, where nnnnn is the size in bytes. + +The secondary stack is used to deal with functions that return a variable +sized result, for example a function returning an unconstrained +String. There are two ways in which this secondary stack is allocated. + +For most targets, the secondary stack is allocated as a chain of blocks +in the heap, and in this case the size of the chunk allocated is the minimum +of the default secondary stack size value, +and the actual size needed for the current allocation request. + +For certain targets, notably bare board targets and the VxWorks 653 target, +the secondary stack is allocated by carving off a fixed ratio chunk of the +primary task stack. For such targets, the environment task is special, and +in this case the default value is used to carve out a section of the +environment task stack. + + @item ^-e^/ELABORATION_DEPENDENCIES^ @cindex @option{^-e^/ELABORATION_DEPENDENCIES^} (@command{gnatbind}) Output complete list of elaboration-order dependencies. @@ -10182,10 +10160,12 @@ recognized by @code{GNAT}: External_Name_Casing Float_Representation Initialize_Scalars + Interrupt_State License Locking_Policy Long_Float Normalize_Scalars + Persistent_BSS Polling Profile Profile_Warnings @@ -18657,6 +18637,164 @@ and #3 thanks to the more precise associated backtrace. @end ifclear +@node Stack Related Tools +@chapter Stack Related Tools + +@noindent +This chapter describes some useful tools associated to stack. In +particular, dynamic and static usage measurements. + +@menu +* Stack Overflow Checking:: +* Static Stack Usage Analysis:: +* Dynamic Stack Usage Analysis:: +@end menu + +@node Stack Overflow Checking +@section Stack Overflow Checking +@cindex Stack Overflow Checking +@cindex -fstack-check + +@noindent +For most operating systems, @command{gcc} does not perform stack overflow +checking by default. This means that if the main environment task or +some other task exceeds the available stack space, then unpredictable +behavior will occur. + +To activate stack checking, compile all units with the gcc option +@option{-fstack-check}. For example: + +@smallexample +gcc -c -fstack-check package1.adb +@end smallexample + +@noindent +Units compiled with this option will generate extra instructions to check +that any use of the stack (for procedure calls or for declaring local +variables in declare blocks) do not exceed the available stack space. +If the space is exceeded, then a @code{Storage_Error} exception is raised. + +For declared tasks, the stack size is always controlled by the size +given in an applicable @code{Storage_Size} pragma (or is set to +the default size if no pragma is used. + +For the environment task, the stack size depends on +system defaults and is unknown to the compiler. The stack +may even dynamically grow on some systems, precluding the +normal Ada semantics for stack overflow. In the worst case, +unbounded stack usage, causes unbounded stack expansion +resulting in the system running out of virtual memory. + +The stack checking may still work correctly if a fixed +size stack is allocated, but this cannot be guaranteed. +To ensure that a clean exception is signalled for stack +overflow, set the environment variable +@code{GNAT_STACK_LIMIT} to indicate the maximum +stack area that can be used, as in: +@cindex GNAT_STACK_LIMIT + +@smallexample +SET GNAT_STACK_LIMIT 1600 +@end smallexample + +@noindent +The limit is given in kilobytes, so the above declaration would +set the stack limit of the environment task to 1.6 megabytes. +Note that the only purpose of this usage is to limit the amount +of stack used by the environment task. If it is necessary to +increase the amount of stack for the environment task, then this +is an operating systems issue, and must be addressed with the +appropriate operating systems commands. + +@node Static Stack Usage Analysis +@section Static Stack Usage Analysis +@cindex Static Stack Usage Analysis +@cindex -fstack-usage + +@noindent +Units compiled with -fstack-usage will generate an extra file containing +the maximum amount of stack used on a per-function basis. The filename for +the dump is made by appending +@file{.su} to the AUXNAME. AUXNAME is generated from the name of +the output file, if explicitly specified and it is not an executable, +otherwise it is the basename of the source file. An entry is made up +of three fields: + +@itemize +@item +The name of the function. +@item +A number of bytes. +@item +One or more qualifiers: @code{static}, @code{dynamic}, @code{bounded}. +@end itemize + +The qualifier @code{static} means that the function manipulates the stack +statically: a fixed number of bytes are allocated for the frame on function +entry and released on function exit; no stack adjustments are otherwise made +in the function. The second field is this fixed number of bytes. + +The qualifier @code{dynamic} means that the function manipulates the stack +dynamically: in addition to the static allocation described above, stack +adjustments are made in the body of the function, for example to push/pop +arguments around function calls. If the qualifier @code{bounded} is also +present, the amount of these adjustments is bounded at compile-time and +the second field is an upper bound of the total amount of stack used by +the function. If it is not present, the amount of these adjustments is +not bounded at compile-time and the second field only represents the +bounded part. + +@node Dynamic Stack Usage Analysis +@section Dynamic Stack Usage Analysis + +@noindent +It is possible to measure the maximum amount of stack used by a task, by +adding a switch to @command{gnatbind}, as: + +@smallexample +$ gnatbind -u0 file +@end smallexample + +@noindent +Here, as soon as a task ends, its stack usage will be printed on stderr. It's +also possible to store a certain number of results to display them only at the +end of the execution. The following command will display the 100 first results +at the end of the programm, and others on the fly: + +@smallexample +$ gnatbind -u100 file +@end smallexample + +@noindent +Results are displayed in the folowing format: + +@noindent +INDEX | TASK NAME | STACK SIZE | MAX USAGE + +@noindent +where: + +@table @emph +@item INDEX +is a number associated with each task. Numbers before n parameter given +with -u flag correspond to stored results. + +@item TASK NAME +is the name of the task analyzed. + +@item STACK SIZE +is the maximum size for the stack. In order to prevent overflowed, +this value is a little smaller than the real limit. + +@item MAX USAGE +is the measure done by the stack analyzer. + +@end table + +@noindent +The environment task stack, e.g. the stack that contains the main unit, is +only processed when the environment variable GNAT_STACK_LIMIT is set. + @node Creating Sample Bodies Using gnatstub @chapter Creating Sample Bodies Using @command{gnatstub} @findex gnatstub diff --git a/gcc/ada/gnatcmd.adb b/gcc/ada/gnatcmd.adb index 3ef1ec700ad..995f985ed4e 100644 --- a/gcc/ada/gnatcmd.adb +++ b/gcc/ada/gnatcmd.adb @@ -106,6 +106,8 @@ procedure GNATCmd is Naming_String : constant String_Access := new String'("naming"); Binder_String : constant String_Access := new String'("binder"); + Compiler_String : constant String_Access := new String'("compiler"); + Check_String : constant String_Access := new String'("check"); Eliminate_String : constant String_Access := new String'("eliminate"); Finder_String : constant String_Access := new String'("finder"); Linker_String : constant String_Access := new String'("linker"); @@ -118,8 +120,11 @@ procedure GNATCmd is Packages_To_Check_By_Binder : constant String_List_Access := new String_List'((Naming_String, Binder_String)); + Packages_To_Check_By_Check : constant String_List_Access := + new String_List'((Naming_String, Check_String, Compiler_String)); + Packages_To_Check_By_Eliminate : constant String_List_Access := - new String_List'((Naming_String, Eliminate_String)); + new String_List'((Naming_String, Eliminate_String, Compiler_String)); Packages_To_Check_By_Finder : constant String_List_Access := new String_List'((Naming_String, Finder_String)); @@ -131,13 +136,13 @@ procedure GNATCmd is new String_List'((Naming_String, Gnatls_String)); Packages_To_Check_By_Pretty : constant String_List_Access := - new String_List'((Naming_String, Pretty_String)); + new String_List'((Naming_String, Pretty_String, Compiler_String)); Packages_To_Check_By_Gnatstub : constant String_List_Access := - new String_List'((Naming_String, Gnatstub_String)); + new String_List'((Naming_String, Gnatstub_String, Compiler_String)); Packages_To_Check_By_Metric : constant String_List_Access := - new String_List'((Naming_String, Metric_String)); + new String_List'((Naming_String, Metric_String, Compiler_String)); Packages_To_Check_By_Xref : constant String_List_Access := new String_List'((Naming_String, Xref_String)); @@ -163,8 +168,8 @@ procedure GNATCmd is All_Projects : Boolean := False; -- Flag used for GNAT PRETTY and GNAT METRIC to indicate that - -- the underlying tool (gnatpp or gnatmetric) should be invoked for all - -- sources of all projects. + -- the underlying tool (gnatcheck, gnatpp or gnatmetric) should be invoked + -- for all sources of all projects. ----------------------- -- Local Subprograms -- @@ -345,7 +350,7 @@ procedure GNATCmd is end if; else - -- For gnatpp and gnatmetric, put all sources + -- For gnatcheck, gnatpp and gnatmetric, put all sources -- of the project, or of all projects if -U was specified. for Kind in Spec_Or_Body loop @@ -369,7 +374,7 @@ procedure GNATCmd is -- If the list of files is too long, create a temporary -- text file that lists these files, and pass this temp - -- file to gnatpp or gnatmetric using switch -files=. + -- file to gnatcheck, gnatpp or gnatmetric using switch -files=. if Last_Switches.Last - Current_Last > Max_Files_On_The_Command_Line @@ -1342,7 +1347,7 @@ begin Exec_Path := Locate_Exec_On_Path (Program); if Exec_Path = null then - Put_Line (Standard_Error, "Couldn't locate " & Program); + Put_Line (Standard_Error, "could not locate " & Program); raise Error_Exit; end if; @@ -1356,10 +1361,11 @@ begin end loop; end if; - -- For BIND, FIND, LINK, LIST, PRETTY ad XREF, look for project file - -- related switches. + -- For BIND, CHECK, FIND, LINK, LIST, PRETTY ad XREF, look for project + -- file related switches. if The_Command = Bind + or else The_Command = Check or else The_Command = Elim or else The_Command = Find or else The_Command = Link @@ -1373,6 +1379,9 @@ begin when Bind => Tool_Package_Name := Name_Binder; Packages_To_Check := Packages_To_Check_By_Binder; + when Check => + Tool_Package_Name := Name_Check; + Packages_To_Check := Packages_To_Check_By_Check; when Elim => Tool_Package_Name := Name_Eliminate; Packages_To_Check := Packages_To_Check_By_Eliminate; @@ -1539,7 +1548,10 @@ begin Remove_Switch (Arg_Num); - elsif (The_Command = Pretty or else The_Command = Metric) + elsif + (The_Command = Check or else + The_Command = Pretty or else + The_Command = Metric) and then Argv'Length = 2 and then Argv (2) = 'U' then @@ -1610,9 +1622,10 @@ begin -- Packages Binder (for gnatbind), Cross_Reference (for -- gnatxref), Linker (for gnatlink) Finder (for gnatfind), - -- Pretty_Printer (for gnatpp) Eliminate (for gnatelim) and - -- Metric (for gnatmetric) have an attributed Switches, - -- an associative array, indexed by the name of the file. + -- Pretty_Printer (for gnatpp) Eliminate (for gnatelim), + -- Check (for gnatcheck) and Metric (for gnatmetric) have + -- an attributed Switches, an associative array, indexed + -- by the name of the file. -- They also have an attribute Default_Switches, indexed -- by the name of the programming language. @@ -1691,16 +1704,92 @@ begin Prj.Env.Set_Ada_Paths (Project, Project_Tree, Including_Libraries => False); - -- For gnatstub, gnatmetric, gnatpp and gnatelim, create + -- For gnatcheck, gnatstub, gnatmetric, gnatpp and gnatelim, create -- a configuration pragmas file, if necessary. if The_Command = Pretty or else The_Command = Metric or else The_Command = Stub or else The_Command = Elim + or else The_Command = Check then - -- If -cargs is one of the switches, move the following - -- switches to the Carg_Switches table. + -- If there are switches in package Compiler, put them in the + -- Carg_Switches table. + + declare + Data : constant Prj.Project_Data := + Project_Tree.Projects.Table (Project); + + Pkg : constant Prj.Package_Id := + Prj.Util.Value_Of + (Name => Name_Compiler, + In_Packages => Data.Decl.Packages, + In_Tree => Project_Tree); + + Element : Package_Element; + + Default_Switches_Array : Array_Element_Id; + + The_Switches : Prj.Variable_Value; + Current : Prj.String_List_Id; + The_String : String_Element; + + begin + if Pkg /= No_Package then + Element := Project_Tree.Packages.Table (Pkg); + + Default_Switches_Array := + Prj.Util.Value_Of + (Name => Name_Default_Switches, + In_Arrays => Element.Decl.Arrays, + In_Tree => Project_Tree); + The_Switches := Prj.Util.Value_Of + (Index => Name_Ada, + Src_Index => 0, + In_Array => Default_Switches_Array, + In_Tree => Project_Tree); + + -- If there are switches specified in the package of the + -- project file corresponding to the tool, scan them. + + case The_Switches.Kind is + when Prj.Undefined => + null; + + when Prj.Single => + declare + Switch : constant String := + Get_Name_String (The_Switches.Value); + + begin + if Switch'Length > 0 then + Add_To_Carg_Switches (new String'(Switch)); + end if; + end; + + when Prj.List => + Current := The_Switches.Values; + while Current /= Prj.Nil_String loop + The_String := + Project_Tree.String_Elements.Table (Current); + + declare + Switch : constant String := + Get_Name_String (The_String.Value); + begin + if Switch'Length > 0 then + Add_To_Carg_Switches (new String'(Switch)); + end if; + end; + + Current := The_String.Next; + end loop; + end case; + end if; + end; + + -- If -cargs is one of the switches, move the following switches + -- to the Carg_Switches table. for J in 1 .. First_Switches.Last loop if First_Switches.Table (J).all = "-cargs" then @@ -1724,6 +1813,7 @@ begin declare CP_File : constant Name_Id := Configuration_Pragmas_File; + begin if CP_File /= No_Name then if The_Command = Elim then @@ -1762,7 +1852,6 @@ begin declare Project_Dir : constant String := Name_Buffer (1 .. Name_Len); - begin for J in 1 .. First_Switches.Last loop Test_If_Relative_Path @@ -1847,10 +1936,10 @@ begin end; end if; - -- For gnatmetric, the generated files should be put in the - -- object directory. This must be the first switch, because it may - -- be overriden by a switch in package Metrics in the project file - -- or by a command line option. + -- For gnatmetric, the generated files should be put in the object + -- directory. This must be the first switch, because it may be + -- overriden by a switch in package Metrics in the project file or by + -- a command line option. if The_Command = Metric then First_Switches.Increment_Last; @@ -1863,11 +1952,12 @@ begin (Project).Object_Directory)); end if; - -- For gnat pretty and gnat metric, if no file has been put on the - -- command line, call the tool with all the sources of the main - -- project. + -- For gnat check, gnat pretty, gnat metric ands gnat list, + -- if no file has been put on the command line, call tool with all + -- the sources of the main project. - if The_Command = Pretty or else + if The_Command = Check or else + The_Command = Pretty or else The_Command = Metric or else The_Command = List then @@ -1943,10 +2033,10 @@ exception Prj.Env.Delete_All_Path_Files (Project_Tree); Delete_Temp_Config_Files; - -- Since GNATCmd is normally called from DCL (the VMS shell), - -- it must return an understandable VMS exit status. However - -- the exit status returned *to* GNATCmd is a Posix style code, - -- so we test it and return just a simple success or failure on VMS. + -- Since GNATCmd is normally called from DCL (the VMS shell), it must + -- return an understandable VMS exit status. However the exit status + -- returned *to* GNATCmd is a Posix style code, so we test it and return + -- just a simple success or failure on VMS. if Hostparm.OpenVMS and then My_Exit_Status /= Success then Set_Exit_Status (Failure); diff --git a/gcc/ada/gnatlink.adb b/gcc/ada/gnatlink.adb index f63cc86fce9..a099217f4ac 100644 --- a/gcc/ada/gnatlink.adb +++ b/gcc/ada/gnatlink.adb @@ -27,6 +27,7 @@ -- Gnatlink usage: please consult the gnat documentation with ALI; use ALI; +with Csets; with Gnatvsn; use Gnatvsn; with Hostparm; with Indepsw; use Indepsw; @@ -34,9 +35,11 @@ with Namet; use Namet; with Opt; with Osint; use Osint; with Output; use Output; +with Snames; with Switch; use Switch; with System; use System; with Table; +with Targparm; use Targparm; with Types; with Ada.Command_Line; use Ada.Command_Line; @@ -301,9 +304,7 @@ procedure Gnatlink is new String'(Arg); elsif Arg'Length /= 0 and then Arg (1) = '-' then - if Arg'Length > 4 - and then Arg (2 .. 5) = "gnat" - then + if Arg'Length > 4 and then Arg (2 .. 5) = "gnat" then Exit_With_Error ("invalid switch: """ & Arg & """ (gnat not needed here)"); end if; @@ -335,6 +336,7 @@ procedure Gnatlink is elsif Arg'Length >= 3 and then Arg (2) = 'M' then declare Switches : String_List_Access; + begin Convert (Map_File, Arg (3 .. Arg'Last), Switches); @@ -461,7 +463,6 @@ procedure Gnatlink is Linker_Options.Table (Linker_Options.Last); elsif Arg'Length >= 7 and then Arg (1 .. 7) = "--LINK=" then - if Arg'Length = 7 then Exit_With_Error ("Missing argument for --LINK="); end if; @@ -502,6 +503,15 @@ procedure Gnatlink is end if; end if; + -- Add directory to source search dirs so that + -- Get_Target_Parameters can find system.ads + + if Arg (AF .. AF + 1) = "-I" + and then Arg'Length > 2 + then + Add_Src_Search_Dir (Arg (AF + 2 .. Arg'Last)); + end if; + -- Pass to gcc for compiling binder generated file -- No use passing libraries, it will just generate -- a warning @@ -546,7 +556,20 @@ procedure Gnatlink is Exit_With_Error ("cannot handle more than one ALI file"); end if; - -- If object file, record object file + -- If target object file, record object file + + elsif Arg'Length > Get_Target_Object_Suffix.all'Length + and then Arg + (Arg'Last - + Get_Target_Object_Suffix.all'Length + 1 .. Arg'Last) + = Get_Target_Object_Suffix.all + then + Linker_Objects.Increment_Last; + Linker_Objects.Table (Linker_Objects.Last) := + new String'(Arg); + + -- If host object file, record object file + -- e.g. accept foo.o as well as foo.obj on VMS target elsif Arg'Length > Get_Object_Suffix.all'Length and then Arg @@ -1012,7 +1035,7 @@ procedure Gnatlink is -- The following test needs comments, why is it VMS specific. -- The above comment looks out of date ??? - elsif not (Hostparm.OpenVMS + elsif not (OpenVMS_On_Target and then Is_Option_Present (Next_Line (Nfirst .. Nlast))) then @@ -1424,17 +1447,24 @@ begin if not Is_Regular_File (Ali_File_Name.all) then Exit_With_Error (Ali_File_Name.all & " not found"); + end if; + + -- Get target parameters + + Namet.Initialize; + Csets.Initialize; + Snames.Initialize; + Osint.Add_Default_Search_Dirs; + Targparm.Get_Target_Parameters; -- Read the ALI file of the main subprogram if the binder generated -- file needs to be compiled and no --GCC= switch has been specified. -- Fetch the back end switches from this ALI file and use these switches -- to compile the binder generated file - elsif Compile_Bind_File and then Standard_Gcc then - -- Do some initializations + if Compile_Bind_File and then Standard_Gcc then Initialize_ALI; - Namet.Initialize; Name_Len := Ali_File_Name'Length; Name_Buffer (1 .. Name_Len) := Ali_File_Name.all; @@ -1445,7 +1475,6 @@ begin A : ALI_Id; begin - -- Osint.Add_Default_Search_Dirs; -- Load the ALI file T := Read_Library_Info (F, True); @@ -1494,10 +1523,9 @@ begin -- If no output name specified, then use the base name of .ali file name if Output_File_Name = null then - Output_File_Name := new String'(Base_Name (Ali_File_Name.all) - & Get_Debuggable_Suffix.all); + & Get_Target_Debuggable_Suffix.all); Linker_Options.Increment_Last; Linker_Options.Table (Linker_Options.Last) := @@ -1506,7 +1534,6 @@ begin Linker_Options.Increment_Last; Linker_Options.Table (Linker_Options.Last) := new String'(Output_File_Name.all); - end if; -- Warn if main program is called "test", as that may be a built-in command @@ -1554,63 +1581,49 @@ begin "__gnat_get_maximum_file_name_length"); Maximum_File_Name_Length : constant Integer := - Get_Maximum_File_Name_Length; + Get_Maximum_File_Name_Length; - Second_Char : Character; - -- Second character of name of files + Bind_File_Prefix : Types.String_Ptr; + -- Contains prefix used for bind files begin - -- Set proper second character of file name + -- Set prefix if not Ada_Bind_File then - Second_Char := '_'; - - elsif Hostparm.OpenVMS then - Second_Char := '$'; - + Bind_File_Prefix := new String'("b_"); + elsif OpenVMS_On_Target then + Bind_File_Prefix := new String'("b__"); else - Second_Char := '~'; + Bind_File_Prefix := new String'("b~"); end if; -- If the length of the binder file becomes too long due to -- the addition of the "b?" prefix, then truncate it. if Maximum_File_Name_Length > 0 then - while Fname_Len > Maximum_File_Name_Length - 2 loop + while Fname_Len > + Maximum_File_Name_Length - Bind_File_Prefix.all'Length + loop Fname_Len := Fname_Len - 1; end loop; end if; - if Ada_Bind_File then - Binder_Spec_Src_File := - new String'('b' - & Second_Char - & Fname (Fname'First .. Fname'First + Fname_Len - 1) - & ".ads"); - Binder_Body_Src_File := - new String'('b' - & Second_Char - & Fname (Fname'First .. Fname'First + Fname_Len - 1) - & ".adb"); - Binder_Ali_File := - new String'('b' - & Second_Char - & Fname (Fname'First .. Fname'First + Fname_Len - 1) - & ".ali"); + declare + Fnam : constant String := + Bind_File_Prefix.all & + Fname (Fname'First .. Fname'First + Fname_Len - 1); - else - Binder_Body_Src_File := - new String'('b' - & Second_Char - & Fname (Fname'First .. Fname'First + Fname_Len - 1) - & ".c"); - end if; + begin + if Ada_Bind_File then + Binder_Spec_Src_File := new String'(Fnam & ".ads"); + Binder_Body_Src_File := new String'(Fnam & ".adb"); + Binder_Ali_File := new String'(Fnam & ".ali"); + else + Binder_Body_Src_File := new String'(Fnam & ".c"); + end if; - Binder_Obj_File := - new String'('b' - & Second_Char - & Fname (Fname'First .. Fname'First + Fname_Len - 1) - & Get_Object_Suffix.all); + Binder_Obj_File := new String'(Fnam & Get_Target_Object_Suffix.all); + end; if Fname_Len /= Fname'Length then Binder_Options.Increment_Last; @@ -1618,7 +1631,6 @@ begin Binder_Options.Increment_Last; Binder_Options.Table (Binder_Options.Last) := Binder_Obj_File; end if; - end Make_Binder_File_Names; Process_Binder_File (Binder_Body_Src_File.all & ASCII.NUL); diff --git a/gcc/ada/gnatvsn.ads b/gcc/ada/gnatvsn.ads index 1013bd70d88..06153b9e768 100644 --- a/gcc/ada/gnatvsn.ads +++ b/gcc/ada/gnatvsn.ads @@ -74,7 +74,7 @@ package Gnatvsn is -- value should never be decreased in the future, but it would be -- OK to increase it if absolutely necessary. - Library_Version : constant String := "4.1"; + Library_Version : constant String := "4.2"; -- Library version. This value must be updated whenever any change to the -- compiler affects the library formats in such a way as to obsolete -- previously compiled library modules. @@ -85,7 +85,7 @@ package Gnatvsn is Verbose_Library_Version : constant String := "GNAT Lib v" & Library_Version; -- Version string stored in e.g. ALI files. - ASIS_Version_Number : constant := 4; + ASIS_Version_Number : constant := 5; -- ASIS Version. This is used to check for consistency between the compiler -- used to generate trees, and an ASIS application that is reading the -- trees. It must be updated (incremented) whenever a change is made to diff --git a/gcc/ada/hostparm.ads b/gcc/ada/hostparm.ads index 6f2ecc7dd2f..eae07726a67 100644 --- a/gcc/ada/hostparm.ads +++ b/gcc/ada/hostparm.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2003 Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2005 Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -35,6 +35,8 @@ -- are parameters that are relevant to the host machine on which the -- compiler is running, and thus this package is part of the compiler. +with Types; + package Hostparm is ----------------------- @@ -61,13 +63,15 @@ package Hostparm is Normalized_CWD : constant String := "./"; -- Normalized string to access current directory - Max_Line_Length : constant := 255; - -- Maximum source line length. This can be set to any value up to - -- 2**15 - 1, a limit imposed by the assumption that column numbers - -- can be stored in 16 bits (see Types.Column_Number). A value of - -- 200 is the minimum value required (RM 2.2(15)), but we use 255 - -- for most GNAT targets since this is DEC Ada compatible. The value - -- set here can be overridden by the explicit use of -gnatyM. + Max_Line_Length : constant := Types.Column_Number'Pred + (Types.Column_Number'Last); + -- Maximum source line length. By default we set it to the maximum + -- value that can be supported, which is given by the range of the + -- Column_Number type. We subtract 1 because need to be able to + -- have a valid Column_Number equal to Max_Line_Length to represent + -- the location of a "line too long" error. + -- 200 is the minimum value required (RM 2.2(15)). The value set here + -- can be reduced by the explicit use of the -gnatyM style switch. Max_Name_Length : constant := 1024; -- Maximum length of unit name (including all dots, and " (spec)") and diff --git a/gcc/ada/i-c.adb b/gcc/ada/i-c.adb index ea044772b08..82687568b95 100644 --- a/gcc/ada/i-c.adb +++ b/gcc/ada/i-c.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2005 Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2005, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/i-cexten.ads b/gcc/ada/i-cexten.ads index ed08fc912ae..d331fbd0830 100644 --- a/gcc/ada/i-cexten.ads +++ b/gcc/ada/i-cexten.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2005 Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2005, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/i-cobol.adb b/gcc/ada/i-cobol.adb index fd30de8576f..758c5066a01 100644 --- a/gcc/ada/i-cobol.adb +++ b/gcc/ada/i-cobol.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2005 Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2005, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/i-cobol.ads b/gcc/ada/i-cobol.ads index f474d69cc05..34ef56da6aa 100644 --- a/gcc/ada/i-cobol.ads +++ b/gcc/ada/i-cobol.ads @@ -7,7 +7,7 @@ -- S p e c -- -- (ASCII Version) -- -- -- --- Copyright (C) 1993-2005 Free Software Foundation, Inc. -- +-- Copyright (C) 1993-2005, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/i-cpoint.ads b/gcc/ada/i-cpoint.ads index e473f57e10e..80c2bfb27b8 100644 --- a/gcc/ada/i-cpoint.ads +++ b/gcc/ada/i-cpoint.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1993-2005 Free Software Foundation, Inc. -- +-- Copyright (C) 1993-2005, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/i-cpp.adb b/gcc/ada/i-cpp.adb index 48658af555a..55f4d3a68c5 100644 --- a/gcc/ada/i-cpp.adb +++ b/gcc/ada/i-cpp.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2005 Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2005, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/i-cpp.ads b/gcc/ada/i-cpp.ads index e534f651f3c..f5c42533c1e 100644 --- a/gcc/ada/i-cpp.ads +++ b/gcc/ada/i-cpp.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2005 Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2005, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/i-cstrea-vms.adb b/gcc/ada/i-cstrea-vms.adb index 9e34a96ea59..1266280dadb 100644 --- a/gcc/ada/i-cstrea-vms.adb +++ b/gcc/ada/i-cstrea-vms.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1996-2005 Free Software Foundation, Inc. -- +-- Copyright (C) 1996-2005, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/i-cstrea.ads b/gcc/ada/i-cstrea.ads index af3279817c5..a7a30b2d3c4 100644 --- a/gcc/ada/i-cstrea.ads +++ b/gcc/ada/i-cstrea.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1995-2005 Free Software Foundation, Inc. -- +-- Copyright (C) 1995-2005, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/i-cstrin.adb b/gcc/ada/i-cstrin.adb index 84c0e22f62d..226661f4762 100644 --- a/gcc/ada/i-cstrin.adb +++ b/gcc/ada/i-cstrin.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2005 Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2005, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/i-cstrin.ads b/gcc/ada/i-cstrin.ads index d959bb5082e..5ea063ab0ef 100644 --- a/gcc/ada/i-cstrin.ads +++ b/gcc/ada/i-cstrin.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1993-2005 Free Software Foundation, Inc. -- +-- Copyright (C) 1993-2005, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/i-os2err.ads b/gcc/ada/i-os2err.ads index 21cbf84ccb5..f837224ae6b 100644 --- a/gcc/ada/i-os2err.ads +++ b/gcc/ada/i-os2err.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1993-2005 Free Software Foundation, Inc. -- +-- Copyright (C) 1993-2005, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/i-os2lib.ads b/gcc/ada/i-os2lib.ads index 45fa1aee6a6..ac5a65433eb 100644 --- a/gcc/ada/i-os2lib.ads +++ b/gcc/ada/i-os2lib.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1993-2005 Free Software Foundation, Inc. -- +-- Copyright (C) 1993-2005, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/i-os2syn.ads b/gcc/ada/i-os2syn.ads index 844e2f0b7dd..9dfa2c6dfe0 100644 --- a/gcc/ada/i-os2syn.ads +++ b/gcc/ada/i-os2syn.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1993-2005 Free Software Foundation, Inc. -- +-- Copyright (C) 1993-2005, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/i-os2thr.ads b/gcc/ada/i-os2thr.ads index 1fd90496c3c..97ac453d9fb 100644 --- a/gcc/ada/i-os2thr.ads +++ b/gcc/ada/i-os2thr.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1993-2005 Free Software Foundation, Inc. -- +-- Copyright (C) 1993-2005, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/impunit.adb b/gcc/ada/impunit.adb index ff753ac0215..5fca8158a47 100644 --- a/gcc/ada/impunit.adb +++ b/gcc/ada/impunit.adb @@ -195,6 +195,11 @@ package body Impunit is -- GNAT Library Units -- ------------------------ + "g-altive", -- GNAT.Altivec + "g-alvety", -- GNAT.Altivec.Vector_Types + "g-alvevi", -- GNAT.Altivec.Vector_Views + "g-alveop", -- GNAT.Altivec.Vector_Operations + "g-altcon", -- GNAT.Altivec.Conversions "g-arrspl", -- GNAT.Array_Split "g-awk ", -- GNAT.AWK "g-boubuf", -- GNAT.Bounded_Buffers @@ -359,12 +364,13 @@ package body Impunit is "a-stzmap", -- Ada.Strings.Wide_Wide_Maps "a-stzunb", -- Ada.Strings.Wide_Wide_Unbounded "a-swuwha", -- Ada.Strings.Wide_Unbounded.Wide_Hash - "a-szmzco", -- Ada.Strings.Wide_Wide_Maps.Wide_Wide_Constants; + "a-szmzco", -- Ada.Strings.Wide_Wide_Maps.Wide_Wide_Constants "a-szuzha", -- Ada.Strings.Wide_Wide_Unbounded.Wide_Wide_Hash - "a-tgdico", -- Ada.Tags.Generic_Dispatching_Constructor; - "a-tiunio", -- Ada.Text_IO.Unbounded_IO; + "a-taster", -- Ada.Task_Termination + "a-tgdico", -- Ada.Tags.Generic_Dispatching_Constructor + "a-tiunio", -- Ada.Text_IO.Unbounded_IO "a-wichun", -- Ada.Wide_Characters.Unicode - "a-wwunio", -- Ada.Wide_Text_IO.Wide_Unbounded_IO; + "a-wwunio", -- Ada.Wide_Text_IO.Wide_Unbounded_IO "a-zchara", -- Ada.Wide_Wide_Characters "a-zttest", -- Ada.Wide_Wide_Text_IO.Text_Streams "a-ztexio", -- Ada.Wide_Wide_Text_IO diff --git a/gcc/ada/indepsw-gnu.adb b/gcc/ada/indepsw-gnu.adb index 44cd6bf65e2..5698461ea48 100644 --- a/gcc/ada/indepsw-gnu.adb +++ b/gcc/ada/indepsw-gnu.adb @@ -7,7 +7,7 @@ -- B o d y -- -- (GNU version) -- -- -- --- Copyright (C) 2005 Free Software Foundation, Inc. -- +-- Copyright (C) 2005, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/indepsw.ads b/gcc/ada/indepsw.ads index 7296291b35d..ecab5bb75e0 100644 --- a/gcc/ada/indepsw.ads +++ b/gcc/ada/indepsw.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2004-2005 Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2005, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/inline.adb b/gcc/ada/inline.adb index 8b8004f5187..7847a1577d6 100644 --- a/gcc/ada/inline.adb +++ b/gcc/ada/inline.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2005 Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2005, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/interfac-vms.ads b/gcc/ada/interfac-vms.ads index 1705e1e19df..bdd0c59c72a 100644 --- a/gcc/ada/interfac-vms.ads +++ b/gcc/ada/interfac-vms.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2002-2005 Free Software Foundation, Inc. -- +-- Copyright (C) 2002-2005, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/interfac.ads b/gcc/ada/interfac.ads index 38e5cdab736..2f0cdf04594 100644 --- a/gcc/ada/interfac.ads +++ b/gcc/ada/interfac.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2002-2005 Free Software Foundation, Inc. -- +-- Copyright (C) 2002-2005, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/itypes.adb b/gcc/ada/itypes.adb index f9f86d57e2e..4b65da2c757 100644 --- a/gcc/ada/itypes.adb +++ b/gcc/ada/itypes.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2005 Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2005, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -24,11 +24,11 @@ -- -- ------------------------------------------------------------------------------ -with Atree; use Atree; -with Opt; use Opt; -with Sem; use Sem; -with Sinfo; use Sinfo; -with Stand; use Stand; +with Atree; use Atree; +with Opt; use Opt; +with Sem; use Sem; +with Sinfo; use Sinfo; +with Stand; use Stand; package body Itypes is @@ -42,8 +42,7 @@ package body Itypes is Related_Id : Entity_Id := Empty; Suffix : Character := ' '; Suffix_Index : Nat := 0; - Scope_Id : Entity_Id := Current_Scope) - return Entity_Id + Scope_Id : Entity_Id := Current_Scope) return Entity_Id is Typ : Entity_Id; @@ -90,20 +89,19 @@ package body Itypes is Related_Nod => Related_Nod, Scope_Id => Scope_Id); - Set_Directly_Designated_Type (I_Typ, - Directly_Designated_Type (T)); - Set_Etype (I_Typ, T); - Init_Size_Align (I_Typ); - Set_Depends_On_Private (I_Typ, Depends_On_Private (T)); - Set_Is_Public (I_Typ, Is_Public (T)); - Set_From_With_Type (I_Typ, From_With_Type (T)); - Set_Is_Access_Constant (I_Typ, Is_Access_Constant (T)); - Set_Is_Generic_Type (I_Typ, Is_Generic_Type (T)); - Set_Is_Volatile (I_Typ, Is_Volatile (T)); - Set_Treat_As_Volatile (I_Typ, Treat_As_Volatile (T)); - Set_Is_Atomic (I_Typ, Is_Atomic (T)); - Set_Is_Ada_2005 (I_Typ, Is_Ada_2005 (T)); - Set_Can_Never_Be_Null (I_Typ); + Set_Directly_Designated_Type (I_Typ, Directly_Designated_Type (T)); + Set_Etype (I_Typ, T); + Init_Size_Align (I_Typ); + Set_Depends_On_Private (I_Typ, Depends_On_Private (T)); + Set_Is_Public (I_Typ, Is_Public (T)); + Set_From_With_Type (I_Typ, From_With_Type (T)); + Set_Is_Access_Constant (I_Typ, Is_Access_Constant (T)); + Set_Is_Generic_Type (I_Typ, Is_Generic_Type (T)); + Set_Is_Volatile (I_Typ, Is_Volatile (T)); + Set_Treat_As_Volatile (I_Typ, Treat_As_Volatile (T)); + Set_Is_Atomic (I_Typ, Is_Atomic (T)); + Set_Is_Ada_2005 (I_Typ, Is_Ada_2005 (T)); + Set_Can_Never_Be_Null (I_Typ); return I_Typ; end Create_Null_Excluding_Itype; diff --git a/gcc/ada/itypes.ads b/gcc/ada/itypes.ads index e4dcffce707..453a35b218f 100644 --- a/gcc/ada/itypes.ads +++ b/gcc/ada/itypes.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2005 Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2005, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -85,8 +85,7 @@ package Itypes is Related_Id : Entity_Id := Empty; Suffix : Character := ' '; Suffix_Index : Nat := 0; - Scope_Id : Entity_Id := Current_Scope) - return Entity_Id; + Scope_Id : Entity_Id := Current_Scope) return Entity_Id; -- Used to create a new Itype. -- -- Related_Nod is the node for which this Itype was created. It is diff --git a/gcc/ada/krunch.adb b/gcc/ada/krunch.adb index b5e8c67b5ae..53d6285f410 100644 --- a/gcc/ada/krunch.adb +++ b/gcc/ada/krunch.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2005 Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2005, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -32,6 +32,7 @@ ------------------------------------------------------------------------------ with Hostparm; + procedure Krunch (Buffer : in out String; Len : in out Natural; diff --git a/gcc/ada/krunch.ads b/gcc/ada/krunch.ads index 59f07bd9af4..f5dbdb9a876 100644 --- a/gcc/ada/krunch.ads +++ b/gcc/ada/krunch.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2005 Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2005, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/layout.adb b/gcc/ada/layout.adb index 736dd0dc6b4..b24b4d80010 100644 --- a/gcc/ada/layout.adb +++ b/gcc/ada/layout.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2001-2005 Free Software Foundation, Inc. -- +-- Copyright (C) 2001-2005, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -107,7 +107,7 @@ package body Layout is -- dynamic sizes in storage units. If the argument N is anything other -- than an integer literal, it is returned unchanged, but if it is an -- integer literal, then it is taken as a size in bits, and is replaced - -- by the corresponding size in bytes. + -- by the corresponding size in storage units. function Compute_Length (Lo : Node_Id; Hi : Node_Id) return Node_Id; -- Given expressions for the low bound (Lo) and the high bound (Hi), @@ -154,7 +154,7 @@ package body Layout is -- resolved (which may not be the case yet if we build the expression -- in this unit). - function Get_Max_Size (E : Entity_Id) return Node_Id; + function Get_Max_SU_Size (E : Entity_Id) return Node_Id; -- E is an array type or subtype that has at least one index bound that -- is the value of a record discriminant. For such an array, the function -- computes an expression that yields the maximum possible size of the @@ -222,7 +222,7 @@ package body Layout is Esize_Set := Has_Size_Clause (E); end if; - -- If size is known it must be a multiple of the byte size + -- If size is known it must be a multiple of the storage unit size if Esize (E) mod SSU /= 0 then @@ -230,10 +230,11 @@ package body Layout is if Esize_Set then Error_Msg_NE - ("size for& not a multiple of byte size", Size_Clause (E), E); + ("size for& not a multiple of storage unit size", + Size_Clause (E), E); return; - -- Otherwise bump up size to a byte boundary + -- Otherwise bump up size to a storage unit boundary else Set_Esize (E, (Esize (E) + SSU - 1) / SSU * SSU); @@ -270,7 +271,7 @@ package body Layout is -- In this situation, the initial alignment of t is 4, copied from -- the Integer base type, but it is safe to reduce it to 1 at this - -- stage, since we will only be loading a single byte. + -- stage, since we will only be loading a single storage unit. if Is_Discrete_Type (Etype (E)) and then not Has_Alignment_Clause (E) @@ -652,11 +653,11 @@ package body Layout is end if; end Expr_From_SO_Ref; - ------------------ - -- Get_Max_Size -- - ------------------ + --------------------- + -- Get_Max_SU_Size -- + --------------------- - function Get_Max_Size (E : Entity_Id) return Node_Id is + function Get_Max_SU_Size (E : Entity_Id) return Node_Id is Loc : constant Source_Ptr := Sloc (E); Indx : Node_Id; Ityp : Entity_Id; @@ -725,7 +726,7 @@ package body Layout is end if; end Min_Discrim; - -- Start of processing for Get_Max_Size + -- Start of processing for Get_Max_SU_Size begin pragma Assert (Size_Depends_On_Discriminant (E)); @@ -859,10 +860,10 @@ package body Layout is end loop; -- Here after processing all bounds to set sizes. If the value is - -- a constant, then it is bits, and we just return the value. + -- a constant, then it is bits, so we convert to storage units. if Size.Status = Const then - return Make_Integer_Literal (Loc, Size.Val); + return Bits_To_SU (Make_Integer_Literal (Loc, Size.Val)); -- Case where the value is dynamic @@ -884,7 +885,7 @@ package body Layout is return Size.Nod; end if; - end Get_Max_Size; + end Get_Max_SU_Size; ----------------------- -- Layout_Array_Type -- @@ -1480,7 +1481,7 @@ package body Layout is -- Get maximum size of previous component if Size_Depends_On_Discriminant (Etype (Prev_Comp)) then - Old_Maxsz := Get_Max_Size (Etype (Prev_Comp)); + Old_Maxsz := Get_Max_SU_Size (Etype (Prev_Comp)); else Old_Maxsz := Expr_From_SO_Ref (Loc, Old_Esiz, Prev_Comp); end if; @@ -2556,7 +2557,7 @@ package body Layout is -- For scalar types, increase Object_Size to power of 2, -- but not less than a storage unit in any case (i.e., - -- normally this means it will be byte addressable). + -- normally this means it will be storage-unit addressable). if Is_Scalar_Type (E) then if Size <= System_Storage_Unit then @@ -2717,7 +2718,8 @@ package body Layout is -- Size is known, alignment is not set - -- Reset alignment to match size if size is exactly 2, 4, or 8 bytes + -- Reset alignment to match size if size is exactly 2, 4, or 8 + -- storage units. if Siz = 2 * System_Storage_Unit then Align := 2; diff --git a/gcc/ada/lib-list.adb b/gcc/ada/lib-list.adb index 79029e3652b..479a51e9791 100644 --- a/gcc/ada/lib-list.adb +++ b/gcc/ada/lib-list.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2005 Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2005, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/lib-load.adb b/gcc/ada/lib-load.adb index 92e74369c54..248c5fcf901 100644 --- a/gcc/ada/lib-load.adb +++ b/gcc/ada/lib-load.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2005 Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2005, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/lib-load.ads b/gcc/ada/lib-load.ads index 81b91e97caa..cd8555827de 100644 --- a/gcc/ada/lib-load.ads +++ b/gcc/ada/lib-load.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2005 Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2005, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/lib-sort.adb b/gcc/ada/lib-sort.adb index 477eec3db2f..b5925165542 100644 --- a/gcc/ada/lib-sort.adb +++ b/gcc/ada/lib-sort.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2005 Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2005, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/lib.adb b/gcc/ada/lib.adb index a5d476c34fc..e02ebb0ed00 100644 --- a/gcc/ada/lib.adb +++ b/gcc/ada/lib.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2005 Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2005, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/lib.ads b/gcc/ada/lib.ads index e906ff25610..159ccc317c0 100644 --- a/gcc/ada/lib.ads +++ b/gcc/ada/lib.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2005 Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2005, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/live.adb b/gcc/ada/live.adb index df92d0d6e12..ceccbc0e6bc 100644 --- a/gcc/ada/live.adb +++ b/gcc/ada/live.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2000-2005 Free Software Foundation, Inc. -- +-- Copyright (C) 2000-2005, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/make.adb b/gcc/ada/make.adb index 3204154947d..32da876b8bb 100644 --- a/gcc/ada/make.adb +++ b/gcc/ada/make.adb @@ -628,8 +628,8 @@ package body Make is GNAT_Flag : constant String_Access := new String'("-gnatpg"); Do_Not_Check_Flag : constant String_Access := new String'("-x"); - Object_Suffix : constant String := Get_Object_Suffix.all; - Executable_Suffix : constant String := Get_Executable_Suffix.all; + Object_Suffix : constant String := Get_Target_Object_Suffix.all; + Executable_Suffix : constant String := Get_Target_Executable_Suffix.all; Syntax_Only : Boolean := False; -- Set to True when compiling with -gnats diff --git a/gcc/ada/make.ads b/gcc/ada/make.ads index f5c4d25d10c..aba233db74f 100644 --- a/gcc/ada/make.ads +++ b/gcc/ada/make.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2005 Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2005, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/makegpr.adb b/gcc/ada/makegpr.adb index 2e8f5c22355..c96396defb1 100644 --- a/gcc/ada/makegpr.adb +++ b/gcc/ada/makegpr.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2004-2005 Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2005, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/mlib-prj.adb b/gcc/ada/mlib-prj.adb index f6e65be16f4..6cae545c2de 100644 --- a/gcc/ada/mlib-prj.adb +++ b/gcc/ada/mlib-prj.adb @@ -26,7 +26,6 @@ with ALI; use ALI; with Gnatvsn; use Gnatvsn; -with Hostparm; with MLib.Fil; use MLib.Fil; with MLib.Tgt; use MLib.Tgt; with MLib.Utl; use MLib.Utl; @@ -40,6 +39,7 @@ with Sinput.P; with Snames; use Snames; with Switch; use Switch; with Table; +with Targparm; use Targparm; with Ada.Characters.Handling; @@ -55,12 +55,13 @@ package body MLib.Prj is pragma Import (C, Prj_Add_Obj_Files, "__gnat_prj_add_obj_files"); Add_Object_Files : constant Boolean := Prj_Add_Obj_Files /= 0; -- Indicates if object files in pragmas Linker_Options (found in the - -- binder generated file) should be taken when linking aq stand-alone - -- library. - -- False for Windows, True for other platforms. + -- binder generated file) should be taken when linking a stand-alone + -- library. False for Windows, True for other platforms. ALI_Suffix : constant String := ".ali"; - B_Start : String := "b~"; + + B_Start : String_Ptr := new String'("b~"); + -- Prefix of bind file, changed to b__ for VMS S_Osinte_Ads : Name_Id := No_Name; -- Name_Id for "s-osinte.ads" @@ -515,7 +516,7 @@ package body MLib.Prj is begin if not Libgnarl_Needed or - (Hostparm.OpenVMS and then + (OpenVMS_On_Target and then ((not Libdecgnat_Needed) or (not Gtrasymobj_Needed))) then @@ -542,7 +543,7 @@ package body MLib.Prj is if ALI.Sdep.Table (Index).Sfile = S_Osinte_Ads then Libgnarl_Needed := True; - elsif Hostparm.OpenVMS then + elsif OpenVMS_On_Target then if ALI.Sdep.Table (Index).Sfile = S_Dec_Ads then Libdecgnat_Needed := True; @@ -799,18 +800,18 @@ package body MLib.Prj is Arguments := new String_List (1 .. Initial_Argument_Max); end if; - -- Add "-n -o b~.adb (b$.adb on VMS) -L" + -- Add "-n -o b~.adb (b__.adb on VMS) -L" Argument_Number := 2; Arguments (1) := No_Main; Arguments (2) := Output_Switch; - if Hostparm.OpenVMS then - B_Start (B_Start'Last) := '$'; + if OpenVMS_On_Target then + B_Start := new String'("b__"); end if; Add_Argument - (B_Start & Get_Name_String (Data.Library_Name) & ".adb"); + (B_Start.all & Get_Name_String (Data.Library_Name) & ".adb"); Add_Argument ("-L" & Get_Name_String (Data.Library_Name)); if Data.Lib_Auto_Init and then SALs_Use_Constructors then @@ -1006,7 +1007,7 @@ package body MLib.Prj is In_Tree => In_Tree, Including_Libraries => True); - -- Invoke -c b$$.adb + -- Invoke -c b__.adb -- Allocate Arguments, if it is the first time we see a standalone -- library. @@ -1018,12 +1019,12 @@ package body MLib.Prj is Argument_Number := 1; Arguments (1) := Compile_Switch; - if Hostparm.OpenVMS then - B_Start (B_Start'Last) := '$'; + if OpenVMS_On_Target then + B_Start := new String'("b__"); end if; Add_Argument - (B_Start & Get_Name_String (Data.Library_Name) & ".adb"); + (B_Start.all & Get_Name_String (Data.Library_Name) & ".adb"); -- If necessary, add the PIC option @@ -1160,7 +1161,7 @@ package body MLib.Prj is -- Add the objects found in the object directory and the object -- directories of the extended files, if any, except for generated - -- object files (b~.. or B$..) from extended projects. + -- object files (b~.. or B__..) from extended projects. -- When there are one or more extended files, only add an object file -- if no object file with the same name have already been added. @@ -1203,7 +1204,7 @@ package body MLib.Prj is if In_Main_Object_Directory or else Last < 5 - or else Filename (1 .. B_Start'Length) /= B_Start + or else Filename (1 .. B_Start'Length) /= B_Start.all then Name_Len := Last; Name_Buffer (1 .. Name_Len) := Filename (1 .. Last); @@ -1790,8 +1791,8 @@ package body MLib.Prj is Object_Dir : Dir_Type; begin - if Hostparm.OpenVMS then - B_Start (B_Start'Last) := '$'; + if OpenVMS_On_Target then + B_Start := new String'("b__"); end if; -- If the library file does not exist, then the time stamp will @@ -1810,7 +1811,7 @@ package body MLib.Prj is -- generated file. if Is_Obj (Name_Buffer (1 .. Name_Len)) - and then Name_Buffer (1 .. B_Start'Length) /= B_Start + and then Name_Buffer (1 .. B_Start'Length) /= B_Start.all then -- Get the object file time stamp diff --git a/gcc/ada/mlib-tgt-vms-alpha.adb b/gcc/ada/mlib-tgt-vms-alpha.adb index 6dbc09e5e35..8c2aa1b023b 100644 --- a/gcc/ada/mlib-tgt-vms-alpha.adb +++ b/gcc/ada/mlib-tgt-vms-alpha.adb @@ -179,7 +179,7 @@ package body MLib.Tgt is return True; elsif ALI'Length > 2 and then - ALI (ALI'First .. ALI'First + 1) = "b$" + ALI (ALI'First .. ALI'First + 2) = "b__" then return True; @@ -289,7 +289,7 @@ package body MLib.Tgt is if Auto_Init then declare - Macro_File_Name : constant String := Lib_Filename & "$init.asm"; + Macro_File_Name : constant String := Lib_Filename & "__init.asm"; Macro_File : File_Descriptor; Init_Proc : String := Lib_Filename & "INIT"; Popen_Result : System.Address; @@ -382,7 +382,7 @@ package body MLib.Tgt is Additional_Objects := new Argument_List' - (1 => new String'(Lib_Filename & "$init.obj")); + (1 => new String'(Lib_Filename & "__init.obj")); end; end if; @@ -515,7 +515,7 @@ package body MLib.Tgt is if Auto_Init then declare Auto_Init_Object_File_Name : constant String := - Lib_Filename & "$init.obj"; + Lib_Filename & "__init.obj"; Disregard : Boolean; begin diff --git a/gcc/ada/mlib-tgt-vms-ia64.adb b/gcc/ada/mlib-tgt-vms-ia64.adb index f72b4b93e04..ca8ed75460b 100644 --- a/gcc/ada/mlib-tgt-vms-ia64.adb +++ b/gcc/ada/mlib-tgt-vms-ia64.adb @@ -179,7 +179,7 @@ package body MLib.Tgt is return True; elsif ALI'Length > 2 and then - ALI (ALI'First .. ALI'First + 1) = "b$" + ALI (ALI'First .. ALI'First + 2) = "b__" then return True; @@ -287,7 +287,7 @@ package body MLib.Tgt is if Auto_Init then declare - Macro_File_Name : constant String := Lib_Filename & "$init.asm"; + Macro_File_Name : constant String := Lib_Filename & "__init.asm"; Macro_File : File_Descriptor; Init_Proc : String := Lib_Filename & "INIT"; Popen_Result : System.Address; @@ -415,7 +415,7 @@ package body MLib.Tgt is Additional_Objects := new Argument_List' - (1 => new String'(Lib_Filename & "$init.obj")); + (1 => new String'(Lib_Filename & "__init.obj")); end; end if; @@ -548,7 +548,7 @@ package body MLib.Tgt is if Auto_Init then declare Auto_Init_Object_File_Name : constant String := - Lib_Filename & "$init.obj"; + Lib_Filename & "__init.obj"; Disregard : Boolean; begin diff --git a/gcc/ada/mlib-utl.adb b/gcc/ada/mlib-utl.adb index f6512b494bf..91c6b9c3e03 100644 --- a/gcc/ada/mlib-utl.adb +++ b/gcc/ada/mlib-utl.adb @@ -85,9 +85,7 @@ package body MLib.Utl is -- Make sure the Output buffer does not overflow - if Line_Length + 1 + Arguments (J)'Length > - Integer (Opt.Max_Line_Length) - then + if Line_Length + 1 + Arguments (J)'Length > Buffer_Max then Write_Eol; Line_Length := 0; end if; diff --git a/gcc/ada/namet.ads b/gcc/ada/namet.ads index 231fe852919..4bf12e6a85c 100644 --- a/gcc/ada/namet.ads +++ b/gcc/ada/namet.ads @@ -33,6 +33,7 @@ with Alloc; with Table; +with Hostparm; use Hostparm; with System; use System; with Types; use Types; @@ -125,12 +126,11 @@ package Namet is -- binder, the Byte field is unused, and the Int field is used in various -- ways depending on the name involved (see binder documentation). - Name_Buffer : String (1 .. 16*1024); + Name_Buffer : String (1 .. 4 * Max_Line_Length); -- This buffer is used to set the name to be stored in the table for the -- Name_Find call, and to retrieve the name for the Get_Name_String call. - -- The plus 1 in the length allows for cases of adding ASCII.NUL. The 16K - -- here is intended to be an infinite value that ensures that we never - -- overflow the buffer (names this long are too absurd to worry!) + -- The limit here is intended to be an infinite value that ensures that we + -- never overflow the buffer (names this long are too absurd to worry!) Name_Len : Natural; -- Length of name stored in Name_Buffer. Used as an input parameter for diff --git a/gcc/ada/opt.ads b/gcc/ada/opt.ads index 69cd038e124..f125939ddc2 100644 --- a/gcc/ada/opt.ads +++ b/gcc/ada/opt.ads @@ -344,6 +344,17 @@ package Opt is -- Set True for dynamic elaboration checking mode, as set by the -gnatE -- switch or by the use of pragma Elaboration_Checks (Dynamic). + Dynamic_Stack_Measurement : Boolean := False; + -- GNATBIND + -- Set True to enable dynamic stack measurement (-u flag for gnatbind) + + Dynamic_Stack_Measurement_Array_Size : Nat := 100; + -- GNATBIND + -- Number of measurements we want to store during dynamic stack analysis. + -- When the buffer is full, non-storable results will be output on the fly. + -- The value is relevant only if Dynamic_Stack_Measurement is set. Set + -- by processing of -u flag for gnatbind. + Elab_Dependency_Output : Boolean := False; -- GNATBIND -- Set to True to output complete list of elaboration constraints @@ -687,15 +698,6 @@ package Opt is -- extension, as set by the appropriate switch. If no switch is given, -- then this value is initialized by Osint to the appropriate value. - Max_Line_Length : Int := Hostparm.Max_Line_Length; - -- This is a copy of Max_Line_Length used by the scanner. It is usually - -- set to be a copy of Hostparm.Max_Line_Length, and is used to check - -- the maximum line length in the scanner when style checking is inactive. - -- The only time it is set to a different value is during the scanning of - -- configuration pragma files, where we want to turn off all checking and - -- in particular we want to allow long lines. So we reset this value to - -- Column_Number'Last during scanning of configuration pragma files. - Maximum_Processes : Positive := 1; -- GNATMAKE, GPRMAKE -- Maximum number of processes that should be spawned to carry out diff --git a/gcc/ada/osint-b.adb b/gcc/ada/osint-b.adb index 6d4f383b863..2dc070ebd7e 100644 --- a/gcc/ada/osint-b.adb +++ b/gcc/ada/osint-b.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2001-2003 Free Software Foundation, Inc. -- +-- Copyright (C) 2001-2005 Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -24,9 +24,9 @@ -- -- ------------------------------------------------------------------------------ -with Hostparm; -with Namet; use Namet; -with Opt; use Opt; +with Namet; use Namet; +with Opt; use Opt; +with Targparm; use Targparm; package body Osint.B is @@ -71,6 +71,10 @@ package body Osint.B is Findex2 : Natural; Flength : Natural; + Bind_File_Prefix_Len : Natural := 2; + -- Length of binder file prefix (normally set to 2 for b~, but gets + -- reset to 3 for VMS for b__). + begin if Output_File_Name /= "" then Name_Buffer (Output_File_Name'Range) := Output_File_Name; @@ -112,16 +116,24 @@ package body Osint.B is if Maximum_File_Name_Length > 0 then + if OpenVMS_On_Target and then Typ /= 'c' then + Bind_File_Prefix_Len := 3; + end if; + -- Make room for the extra two characters in "b?" - while Int (Flength) > Maximum_File_Name_Length - 2 loop + while Int (Flength) > + Maximum_File_Name_Length - Nat (Bind_File_Prefix_Len) + loop Findex2 := Findex2 - 1; Flength := Findex2 - Findex1; end loop; end if; - Name_Buffer (3 .. Flength + 2) := File_Name (Findex1 .. Findex2 - 1); - Name_Buffer (Flength + 3) := '.'; + Name_Buffer + (Bind_File_Prefix_Len + 1 .. Flength + Bind_File_Prefix_Len) := + File_Name (Findex1 .. Findex2 - 1); + Name_Buffer (Flength + Bind_File_Prefix_Len + 1) := '.'; -- C bind file, name is b_xxx.c @@ -132,20 +144,21 @@ package body Osint.B is Name_Len := Flength + 4; -- Ada bind file, name is b~xxx.adb or b~xxx.ads - -- (with $ instead of ~ in VMS) + -- (with __ instead of ~ in VMS) else - if Hostparm.OpenVMS then - Name_Buffer (2) := '$'; + if OpenVMS_On_Target then + Name_Buffer (2) := '_'; + Name_Buffer (3) := '_'; else Name_Buffer (2) := '~'; end if; - Name_Buffer (Flength + 4) := 'a'; - Name_Buffer (Flength + 5) := 'd'; - Name_Buffer (Flength + 6) := Typ; - Name_Buffer (Flength + 7) := ASCII.NUL; - Name_Len := Flength + 6; + Name_Buffer (Flength + Bind_File_Prefix_Len + 2) := 'a'; + Name_Buffer (Flength + Bind_File_Prefix_Len + 3) := 'd'; + Name_Buffer (Flength + Bind_File_Prefix_Len + 4) := Typ; + Name_Buffer (Flength + Bind_File_Prefix_Len + 5) := ASCII.NUL; + Name_Len := Flength + Bind_File_Prefix_Len + 4; end if; end if; diff --git a/gcc/ada/osint-c.adb b/gcc/ada/osint-c.adb index 648a4b24e16..124ce39fc3b 100644 --- a/gcc/ada/osint-c.adb +++ b/gcc/ada/osint-c.adb @@ -319,7 +319,7 @@ package body Osint.C is --------------------------------- procedure Set_Output_Object_File_Name (Name : String) is - Ext : constant String := Object_Suffix; + Ext : constant String := Target_Object_Suffix; NL : constant Natural := Name'Length; EL : constant Natural := Ext'Length; diff --git a/gcc/ada/osint.adb b/gcc/ada/osint.adb index d14ad276fbe..d1a6b52c66c 100644 --- a/gcc/ada/osint.adb +++ b/gcc/ada/osint.adb @@ -32,6 +32,7 @@ with Opt; use Opt; with Output; use Output; with Sdefault; use Sdefault; with Table; +with Targparm; use Targparm; with System.Case_Util; use System.Case_Util; @@ -1776,9 +1777,9 @@ package body Osint is Get_Name_String (N); Name_Len := Name_Len - ALI_Suffix'Length - 1; - for J in Object_Suffix'Range loop + for J in Target_Object_Suffix'Range loop Name_Len := Name_Len + 1; - Name_Buffer (Name_Len) := Object_Suffix (J); + Name_Buffer (Name_Len) := Target_Object_Suffix (J); end loop; return Name_Enter; @@ -2292,7 +2293,7 @@ package body Osint is Library (3 + Name'Length) := '-'; Library (4 + Name'Length .. Library'Last) := Library_Version; - if Hostparm.OpenVMS then + if OpenVMS_On_Target then for K in Library'First + 2 .. Library'Last loop if Library (K) = '.' or else Library (K) = '-' then Library (K) := '_'; @@ -2799,13 +2800,6 @@ begin Identifier_Character_Set := Get_Default_Identifier_Character_Set; Maximum_File_Name_Length := Get_Maximum_File_Name_Length; - -- On VMS, '~' is not allowed in file names. Change the multi unit - -- index character to '$'. - - if Hostparm.OpenVMS then - Multi_Unit_Index_Character := '$'; - end if; - -- Following should be removed by having above function return -- Integer'Last as indication of no maximum instead of -1 ??? diff --git a/gcc/ada/osint.ads b/gcc/ada/osint.ads index fab994e76dc..d7c8c49a25a 100644 --- a/gcc/ada/osint.ads +++ b/gcc/ada/osint.ads @@ -558,8 +558,8 @@ private -- No_File, that indicates that the file whose name was returned by the -- last call to Next_Main_Source (and stored here) is to be read. - Object_Suffix : constant String := Get_Object_Suffix.all; - -- The suffix used for the object files + Target_Object_Suffix : constant String := Get_Target_Object_Suffix.all; + -- The suffix used for the target object files Output_FD : File_Descriptor; -- The file descriptor for the current library info, tree or binder output diff --git a/gcc/ada/output.adb b/gcc/ada/output.adb index 0985743c8e3..e7e7ea04064 100644 --- a/gcc/ada/output.adb +++ b/gcc/ada/output.adb @@ -42,29 +42,6 @@ package body Output is -- Record argument to last call to Set_Special_Output. If this is -- non-null, then we are in special output mode. - ------------------------- - -- Line Buffer Control -- - ------------------------- - - -- Note: the following buffer and column position are maintained by - -- the subprograms defined in this package, and are not normally - -- directly modified or accessed by a client. However, a client is - -- permitted to modify these values, using the knowledge that only - -- Write_Eol actually generates any output. - - Buffer_Max : constant := 8192; - Buffer : String (1 .. Buffer_Max + 1); - -- Buffer used to build output line. We do line buffering because it - -- is needed for the support of the debug-generated-code option (-gnatD). - -- Historically it was first added because on VMS, line buffering is - -- needed with certain file formats. So in any case line buffering must - -- be retained for this purpose, even if other reasons disappear. Note - -- any attempt to write more output to a line than can fit in the buffer - -- will be silently ignored. - - Next_Column : Pos range 1 .. Buffer'Length + 1 := 1; - -- Column about to be written - ----------------------- -- Local_Subprograms -- ----------------------- @@ -86,7 +63,7 @@ package body Output is ------------------ procedure Flush_Buffer is - Len : constant Natural := Natural (Next_Column - 1); + Len : constant Natural := Next_Col - 1; begin if Len /= 0 then @@ -111,7 +88,7 @@ package body Output is else Current_FD := Standerr; - Next_Column := 1; + Next_Col := 1; Write_Line ("fatal error: disk full"); OS_Exit (2); end if; @@ -119,7 +96,7 @@ package body Output is -- Buffer is now empty - Next_Column := 1; + Next_Col := 1; end if; end Flush_Buffer; @@ -127,11 +104,34 @@ package body Output is -- Column -- ------------ - function Column return Nat is + function Column return Pos is begin - return Next_Column; + return Pos (Next_Col); end Column; + --------------------------- + -- Restore_Output_Buffer -- + --------------------------- + + procedure Restore_Output_Buffer (S : Saved_Output_Buffer) is + begin + Next_Col := S.Next_Col; + Buffer (1 .. Next_Col - 1) := S.Buffer (1 .. Next_Col - 1); + end Restore_Output_Buffer; + + ------------------------ + -- Save_Output_Buffer -- + ------------------------ + + function Save_Output_Buffer return Saved_Output_Buffer is + S : Saved_Output_Buffer; + begin + S.Buffer (1 .. Next_Col - 1) := Buffer (1 .. Next_Col - 1); + S.Next_Col := Next_Col; + Next_Col := 1; + return S; + end Save_Output_Buffer; + ------------------------ -- Set_Special_Output -- ------------------------ @@ -149,7 +149,7 @@ package body Output is begin if Special_Output_Proc = null then Flush_Buffer; - Next_Column := 1; + Next_Col := 1; end if; Current_FD := Standerr; @@ -163,7 +163,7 @@ package body Output is begin if Special_Output_Proc = null then Flush_Buffer; - Next_Column := 1; + Next_Col := 1; end if; Current_FD := Standout; @@ -236,12 +236,12 @@ package body Output is procedure Write_Char (C : Character) is begin - if Next_Column = Buffer'Length then + if Next_Col = Buffer'Length then Write_Eol; end if; - Buffer (Natural (Next_Column)) := C; - Next_Column := Next_Column + 1; + Buffer (Next_Col) := C; + Next_Col := Next_Col + 1; end Write_Char; --------------- @@ -250,11 +250,22 @@ package body Output is procedure Write_Eol is begin - Buffer (Natural (Next_Column)) := ASCII.LF; - Next_Column := Next_Column + 1; + Buffer (Next_Col) := ASCII.LF; + Next_Col := Next_Col + 1; Flush_Buffer; end Write_Eol; + ---------------------- + -- Write_Erase_Char -- + ---------------------- + + procedure Write_Erase_Char (C : Character) is + begin + if Next_Col /= 1 and then Buffer (Next_Col - 1) = C then + Next_Col := Next_Col - 1; + end if; + end Write_Erase_Char; + --------------- -- Write_Int -- --------------- diff --git a/gcc/ada/output.ads b/gcc/ada/output.ads index d69bcb3dcfb..10df6557844 100644 --- a/gcc/ada/output.ads +++ b/gcc/ada/output.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2005 Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2005, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -35,7 +35,8 @@ -- for writing error messages and informational output. It is also used -- by the debug source file output routines (see Sprintf.Print_Eol). -with Types; use Types; +with Hostparm; use Hostparm; +with Types; use Types; package Output is pragma Elaborate_Body; @@ -86,6 +87,9 @@ package Output is -- Write one character to the standard output file. Note that the -- character should not be LF or CR (use Write_Eol for end of line) + procedure Write_Erase_Char (C : Character); + -- If last character in buffer matches C, erase it, otherwise no effect + procedure Write_Eol; -- Write an end of line (whatever is required by the system in use, -- e.g. CR/LF for DOS, or LF for Unix) to the standard output file. @@ -106,11 +110,30 @@ package Output is procedure Write_Line (S : String); -- Equivalent to Write_Str (S) followed by Write_Eol; - function Column return Nat; + function Column return Pos; pragma Inline (Column); -- Returns the number of the column about to be written (e.g. a value -- of 1 means the current line is empty). + ------------------------- + -- Buffer Save/Restore -- + ------------------------- + + -- This facility allows the current line buffer to be saved and restored + + type Saved_Output_Buffer is private; + -- Type used for Save/Restore_Buffer + + Buffer_Max : constant := Hostparm.Max_Line_Length; + -- Maximal size of a buffered output line + + function Save_Output_Buffer return Saved_Output_Buffer; + -- Save current line buffer and reset line buffer to empty + + procedure Restore_Output_Buffer (S : Saved_Output_Buffer); + -- Restore previously saved output buffer. The value in S is not affected + -- so it is legtimate to restore a buffer more than once. + -------------------------- -- Debugging Procedures -- -------------------------- @@ -144,4 +167,28 @@ package Output is procedure w (L : String; B : Boolean); -- Dump contents of string followed by blank, Boolean, line return +private + -- Note: the following buffer and column position are maintained by the + -- subprograms defined in this package, and cannot be directly modified or + -- accessed by a client. + + Buffer : String (1 .. Buffer_Max + 1); + for Buffer'Alignment use 4; + -- Buffer used to build output line. We do line buffering because it + -- is needed for the support of the debug-generated-code option (-gnatD). + -- Historically it was first added because on VMS, line buffering is + -- needed with certain file formats. So in any case line buffering must + -- be retained for this purpose, even if other reasons disappear. Note + -- any attempt to write more output to a line than can fit in the buffer + -- will be silently ignored. The alignment clause improves the efficiency + -- of the save/restore procedures. + + Next_Col : Positive range 1 .. Buffer'Length + 1 := 1; + -- Column about to be written + + type Saved_Output_Buffer is record + Buffer : String (1 .. Buffer_Max + 1); + Next_Col : Positive; + end record; + end Output; diff --git a/gcc/ada/par-ch12.adb b/gcc/ada/par-ch12.adb index 49e18de7e52..cff5ac44fa1 100644 --- a/gcc/ada/par-ch12.adb +++ b/gcc/ada/par-ch12.adb @@ -519,6 +519,9 @@ package body Ch12 is -- exception is ABSTRACT, where we have to scan ahead to see if we -- have a formal derived type or a formal private type definition. + -- In addition, in Ada 2005 LIMITED may appear after abstract, so + -- that the lookahead must be extended by one more token. + when Tok_Abstract => Save_Scan_State (Scan_State); Scan; -- past ABSTRACT @@ -527,6 +530,18 @@ package body Ch12 is Restore_Scan_State (Scan_State); -- to ABSTRACT return P_Formal_Derived_Type_Definition; + elsif Token = Tok_Limited then + Scan; -- past LIMITED + + if Token = Tok_New then + Restore_Scan_State (Scan_State); -- to ABSTRACT + return P_Formal_Derived_Type_Definition; + + else + Restore_Scan_State (Scan_State); -- to ABSTRACT + return P_Formal_Private_Type_Definition; + end if; + else Restore_Scan_State (Scan_State); -- to ABSTRACT return P_Formal_Private_Type_Definition; @@ -560,7 +575,25 @@ package body Ch12 is Set_Limited_Present (Typedef_Node); return Typedef_Node; + elsif Token = Tok_New then + Restore_Scan_State (Scan_State); -- to LIMITED + return P_Formal_Derived_Type_Definition; + else + if Token = Tok_Abstract then + Error_Msg_SC ("ABSTRACT must come before LIMITED"); + Scan; -- past improper ABSTRACT + + if Token = Tok_New then + Restore_Scan_State (Scan_State); -- to LIMITED + return P_Formal_Derived_Type_Definition; + + else + Restore_Scan_State (Scan_State); + return P_Formal_Private_Type_Definition; + end if; + end if; + Restore_Scan_State (Scan_State); return P_Formal_Private_Type_Definition; end if; @@ -666,6 +699,20 @@ package body Ch12 is Scan; -- past LIMITED end if; + if Token = Tok_Abstract then + if Prev_Token = Tok_Tagged then + Error_Msg_SC ("ABSTRACT must come before TAGGED"); + elsif Prev_Token = Tok_Limited then + Error_Msg_SC ("ABSTRACT must come before LIMITED"); + end if; + + Resync_Past_Semicolon; + + elsif Token = Tok_Tagged then + Error_Msg_SC ("TAGGED must come before LIMITED"); + Resync_Past_Semicolon; + end if; + Set_Sloc (Def_Node, Token_Ptr); T_Private; return Def_Node; @@ -676,9 +723,11 @@ package body Ch12 is -------------------------------------------- -- FORMAL_DERIVED_TYPE_DEFINITION ::= - -- [abstract] new SUBTYPE_MARK [[AND interface_list] with private] + -- [abstract] [limited] + -- new SUBTYPE_MARK [[AND interface_list] with private] - -- The caller has checked the initial token(s) is/are NEW or ASTRACT NEW + -- The caller has checked the initial token(s) is/are NEW, ASTRACT NEW + -- LIMITED NEW, or ABSTRACT LIMITED NEW -- Error recovery: cannot raise Error_Resync @@ -693,6 +742,22 @@ package body Ch12 is Scan; -- past ABSTRACT end if; + if Token = Tok_Limited then + Set_Limited_Present (Def_Node); + Scan; -- past Limited + + if Ada_Version < Ada_05 then + Error_Msg_SP + ("LIMITED in derived type is an Ada 2005 extension"); + Error_Msg_SP + ("\unit must be compiled with -gnat05 switch"); + end if; + + if Token = Tok_Abstract then + Scan; -- past ABSTRACT. diagnosed already in caller. + end if; + end if; + Scan; -- past NEW; Set_Subtype_Mark (Def_Node, P_Subtype_Mark); No_Constraint; diff --git a/gcc/ada/par-prag.adb b/gcc/ada/par-prag.adb index 5c87fa92a3b..7489d9decc0 100644 --- a/gcc/ada/par-prag.adb +++ b/gcc/ada/par-prag.adb @@ -329,27 +329,34 @@ begin -- semantically we treat it as a procedure call (which has exactly the -- same syntactic form, so that's why we can get away with this!) - when Pragma_Debug => - Check_Arg_Count (1); - Check_No_Identifier (Arg1); + when Pragma_Debug => Debug : declare + Expr : Node_Id; - declare - Expr : constant Node_Id := New_Copy (Expression (Arg1)); + begin + if Arg_Count = 2 then + Check_No_Identifier (Arg1); + Check_No_Identifier (Arg2); + Expr := New_Copy (Expression (Arg2)); - begin - if Nkind (Expr) /= N_Indexed_Component - and then Nkind (Expr) /= N_Function_Call - and then Nkind (Expr) /= N_Identifier - and then Nkind (Expr) /= N_Selected_Component - then - Error_Msg - ("argument of pragma% is not procedure call", Sloc (Expr)); - raise Error_Resync; - else - Set_Debug_Statement - (Pragma_Node, P_Statement_Name (Expr)); - end if; - end; + else + Check_Arg_Count (1); + Check_No_Identifier (Arg1); + Expr := New_Copy (Expression (Arg1)); + end if; + + if Nkind (Expr) /= N_Indexed_Component + and then Nkind (Expr) /= N_Function_Call + and then Nkind (Expr) /= N_Identifier + and then Nkind (Expr) /= N_Selected_Component + then + Error_Msg + ("argument of pragma% is not procedure call", Sloc (Expr)); + raise Error_Resync; + else + Set_Debug_Statement + (Pragma_Node, P_Statement_Name (Expr)); + end if; + end Debug; ------------------------------- -- Extensions_Allowed (GNAT) -- @@ -929,7 +936,7 @@ begin if not OK then Error_Msg - ("invalid style check option", + (Style_Msg_Buf (1 .. Style_Msg_Len), Sloc (Expression (Arg1)) + Source_Ptr (Ptr)); raise Error_Resync; end if; @@ -1013,6 +1020,7 @@ begin Pragma_C_Pass_By_Copy | Pragma_Comment | Pragma_Common_Object | + Pragma_Complete_Representation | Pragma_Complex_Representation | Pragma_Component_Alignment | Pragma_Controlled | diff --git a/gcc/ada/prj-attr.adb b/gcc/ada/prj-attr.adb index b43fe801bc3..8234d27c8fc 100644 --- a/gcc/ada/prj-attr.adb +++ b/gcc/ada/prj-attr.adb @@ -161,6 +161,12 @@ package body Prj.Attr is "Ladefault_switches#" & "Lbswitches#" & + -- package Check + + "Pcheck#" & + "Ladefault_switches#" & + "Lbswitches#" & + -- package Eliminate "Peliminate#" & diff --git a/gcc/ada/prj-nmsc.adb b/gcc/ada/prj-nmsc.adb index 959294405d0..3a7dd9630e9 100644 --- a/gcc/ada/prj-nmsc.adb +++ b/gcc/ada/prj-nmsc.adb @@ -38,6 +38,7 @@ with Prj.Util; use Prj.Util; with Sinput.P; with Snames; use Snames; with Table; use Table; +with Targparm; use Targparm; with Ada.Characters.Handling; use Ada.Characters.Handling; with Ada.Strings; use Ada.Strings; @@ -56,7 +57,7 @@ package body Prj.Nmsc is ALI_Suffix : constant String := ".ali"; -- File suffix for ali files - Object_Suffix : constant String := Get_Object_Suffix.all; + Object_Suffix : constant String := Get_Target_Object_Suffix.all; -- File suffix for object files type Name_Location is record @@ -3902,6 +3903,7 @@ package body Prj.Nmsc is declare S1 : constant Character := Src (Src'First); S2 : constant Character := Src (Src'First + 1); + S3 : constant Character := Src (Src'First + 2); begin if S1 = 'a' or else S1 = 'g' @@ -3909,8 +3911,11 @@ package body Prj.Nmsc is then -- Children or separates of packages A, G, I or S - if (Hostparm.OpenVMS and then S2 = '$') - or else (not Hostparm.OpenVMS and then S2 = '~') + if (OpenVMS_On_Target + and then S2 = '_' + and then S3 = '_') + or else + S2 = '~' then Src (Src'First + 1) := '.'; diff --git a/gcc/ada/rident.ads b/gcc/ada/rident.ads index da9eb71c753..678c3b82393 100644 --- a/gcc/ada/rident.ads +++ b/gcc/ada/rident.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2003 Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2005 Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -19,6 +19,13 @@ -- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, -- -- Boston, MA 02110-1301, USA. -- -- -- +-- As a special exception, if other files instantiate generics from this -- +-- unit, or you link this unit with other files to produce an executable, -- +-- this unit 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 Public License. -- +-- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- diff --git a/gcc/ada/rtsfind.ads b/gcc/ada/rtsfind.ads index 8b19055fef9..3b4522c85f9 100644 --- a/gcc/ada/rtsfind.ads +++ b/gcc/ada/rtsfind.ads @@ -120,6 +120,7 @@ package Rtsfind is Ada_Streams, Ada_Tags, Ada_Task_Identification, + Ada_Task_Termination, -- Children of Ada.Calendar @@ -488,10 +489,12 @@ package Rtsfind is RE_Stream_Access, -- Ada.Streams.Stream_IO + RE_Abstract_Interface, -- Ada.Tags RE_Addr_Ptr, -- Ada.Tags + RE_Address_Array, -- Ada.Tags RE_CW_Membership, -- Ada.Tags - RE_IW_Membership, -- Ada.Tags RE_Descendant_Tag, -- Ada.Tags + RE_Displace, -- Ada.Tags RE_DT_Entry_Size, -- Ada.Tags RE_DT_Prologue_Size, -- Ada.Tags RE_External_Tag, -- Ada.Tags @@ -503,11 +506,16 @@ package Rtsfind is RE_Get_Prim_Op_Kind, -- Ada.Tags RE_Get_RC_Offset, -- Ada.Tags RE_Get_Remotely_Callable, -- Ada.Tags + RE_Get_Tagged_Kind, -- Ada.Tags RE_Inherit_DT, -- Ada.Tags RE_Inherit_TSD, -- Ada.Tags + RE_Interface_Data, -- Ada.Tags + RE_Interface_Tag, -- Ada.Tags RE_Internal_Tag, -- Ada.Tags RE_Is_Descendant_At_Same_Level, -- Ada.Tags + RE_IW_Membership, -- Ada.Tags RE_Object_Specific_Data, -- Ada.Tags + RE_Offset_To_Top, -- Ada.Tags RE_POK_Function, -- Ada.Tags RE_POK_Procedure, -- Ada.Tags RE_POK_Protected_Entry, -- Ada.Tags @@ -517,13 +525,16 @@ package Rtsfind is RE_POK_Task_Function, -- Ada.Tags RE_POK_Task_Procedure, -- Ada.Tags RE_Prim_Op_Kind, -- Ada.Tags + RE_Primary_DT, -- Ada.Tags RE_Register_Interface_Tag, -- Ada.Tags RE_Register_Tag, -- Ada.Tags + RE_Secondary_DT, -- Ada.Tags RE_Select_Specific_Data, -- Ada.Tags RE_Set_Access_Level, -- Ada.Tags RE_Set_Entry_Index, -- Ada.Tags RE_Set_Expanded_Name, -- Ada.Tags RE_Set_External_Tag, -- Ada.Tags + RE_Set_Interface_Table, -- Ada.Tags RE_Set_Num_Prim_Ops, -- Ada.Tags RE_Set_Offset_Index, -- Ada.Tags RE_Set_Offset_To_Top, -- Ada.Tags @@ -533,17 +544,20 @@ package Rtsfind is RE_Set_RC_Offset, -- Ada.Tags RE_Set_Remotely_Callable, -- Ada.Tags RE_Set_SSD, -- Ada.Tags + RE_Set_Tagged_Kind, -- Ada.Tags RE_Set_TSD, -- Ada.Tags + RE_Tag, -- Ada.Tags RE_Tag_Error, -- Ada.Tags + RE_Tagged_Kind, -- Ada.Tags RE_TSD_Entry_Size, -- Ada.Tags RE_TSD_Prologue_Size, -- Ada.Tags - RE_Interface_Tag, -- Ada.Tags - RE_Tag, -- Ada.Tags - RE_Address_Array, -- Ada.Tags + RE_TK_Abstract_Limited_Tagged, -- Ada.Tags + RE_TK_Abstract_Tagged, -- Ada.Tags + RE_TK_Limited_Tagged, -- Ada.Tags + RE_TK_Protected, -- Ada.Tags + RE_TK_Tagged, -- Ada.Tags + RE_TK_Task, -- Ada.Tags RE_Valid_Signature, -- Ada.Tags - RE_Primary_DT, -- Ada.Tags - RE_Secondary_DT, -- Ada.Tags - RE_Abstract_Interface, -- Ada.Tags RE_Abort_Task, -- Ada.Task_Identification RE_Current_Task, -- Ada.Task_Identification @@ -1629,10 +1643,12 @@ package Rtsfind is RE_Stream_Access => Ada_Streams_Stream_IO, + RE_Abstract_Interface => Ada_Tags, RE_Addr_Ptr => Ada_Tags, + RE_Address_Array => Ada_Tags, RE_CW_Membership => Ada_Tags, - RE_IW_Membership => Ada_Tags, RE_Descendant_Tag => Ada_Tags, + RE_Displace => Ada_Tags, RE_DT_Entry_Size => Ada_Tags, RE_DT_Prologue_Size => Ada_Tags, RE_External_Tag => Ada_Tags, @@ -1644,11 +1660,16 @@ package Rtsfind is RE_Get_Prim_Op_Kind => Ada_Tags, RE_Get_RC_Offset => Ada_Tags, RE_Get_Remotely_Callable => Ada_Tags, + RE_Get_Tagged_Kind => Ada_Tags, RE_Inherit_DT => Ada_Tags, RE_Inherit_TSD => Ada_Tags, + RE_Interface_Data => Ada_Tags, + RE_Interface_Tag => Ada_Tags, RE_Internal_Tag => Ada_Tags, RE_Is_Descendant_At_Same_Level => Ada_Tags, + RE_IW_Membership => Ada_Tags, RE_Object_Specific_Data => Ada_Tags, + RE_Offset_To_Top => Ada_Tags, RE_POK_Function => Ada_Tags, RE_POK_Procedure => Ada_Tags, RE_POK_Protected_Entry => Ada_Tags, @@ -1658,13 +1679,16 @@ package Rtsfind is RE_POK_Task_Function => Ada_Tags, RE_POK_Task_Procedure => Ada_Tags, RE_Prim_Op_Kind => Ada_Tags, + RE_Primary_DT => Ada_Tags, RE_Register_Interface_Tag => Ada_Tags, RE_Register_Tag => Ada_Tags, + RE_Secondary_DT => Ada_Tags, RE_Select_Specific_Data => Ada_Tags, RE_Set_Access_Level => Ada_Tags, RE_Set_Entry_Index => Ada_Tags, RE_Set_Expanded_Name => Ada_Tags, RE_Set_External_Tag => Ada_Tags, + RE_Set_Interface_Table => Ada_Tags, RE_Set_Num_Prim_Ops => Ada_Tags, RE_Set_Offset_Index => Ada_Tags, RE_Set_Offset_To_Top => Ada_Tags, @@ -1674,17 +1698,20 @@ package Rtsfind is RE_Set_RC_Offset => Ada_Tags, RE_Set_Remotely_Callable => Ada_Tags, RE_Set_SSD => Ada_Tags, + RE_Set_Tagged_Kind => Ada_Tags, RE_Set_TSD => Ada_Tags, + RE_Tag => Ada_Tags, RE_Tag_Error => Ada_Tags, + RE_Tagged_Kind => Ada_Tags, RE_TSD_Entry_Size => Ada_Tags, RE_TSD_Prologue_Size => Ada_Tags, - RE_Interface_Tag => Ada_Tags, - RE_Tag => Ada_Tags, - RE_Address_Array => Ada_Tags, + RE_TK_Abstract_Limited_Tagged => Ada_Tags, + RE_TK_Abstract_Tagged => Ada_Tags, + RE_TK_Limited_Tagged => Ada_Tags, + RE_TK_Protected => Ada_Tags, + RE_TK_Tagged => Ada_Tags, + RE_TK_Task => Ada_Tags, RE_Valid_Signature => Ada_Tags, - RE_Primary_DT => Ada_Tags, - RE_Secondary_DT => Ada_Tags, - RE_Abstract_Interface => Ada_Tags, RE_Abort_Task => Ada_Task_Identification, RE_Current_Task => Ada_Task_Identification, diff --git a/gcc/ada/s-bitops.adb b/gcc/ada/s-bitops.adb index 2224ff0a650..e5f33b118f9 100644 --- a/gcc/ada/s-bitops.adb +++ b/gcc/ada/s-bitops.adb @@ -40,12 +40,13 @@ with Unchecked_Conversion; package body System.Bit_Ops is subtype Bits_Array is System.Unsigned_Types.Packed_Bytes1 (Positive); - -- Constrained array used to interpret the address values. We use the + -- Dummy array type used to interpret the address values. We use the -- unaligned version always, since this will handle both the aligned and -- unaligned cases, and we always do these operations by bytes anyway. -- Note: we use a ones origin array here so that the computations of the -- length in bytes work correctly (give a non-negative value) for the - -- case of zero length bit strings). + -- case of zero length bit strings). Note that we never allocate any + -- objects of this type (we can't because they would be absurdly big). type Bits is access Bits_Array; -- This is the actual type into which address values are converted diff --git a/gcc/ada/s-finimp.adb b/gcc/ada/s-finimp.adb index d746cd3676f..712bb127b68 100644 --- a/gcc/ada/s-finimp.adb +++ b/gcc/ada/s-finimp.adb @@ -594,6 +594,6 @@ package body System.Finalization_Implementation is -- Initialization of package, set Adafinal soft link begin - SSL.Adafinal := Finalize_Global_List'Access; + SSL.Finalize_Global_List := Finalize_Global_List'Access; end System.Finalization_Implementation; diff --git a/gcc/ada/s-imgwch.adb b/gcc/ada/s-imgwch.adb index dc524da531e..a408ef62828 100644 --- a/gcc/ada/s-imgwch.adb +++ b/gcc/ada/s-imgwch.adb @@ -42,9 +42,24 @@ package body System.Img_WChar is -------------------------- function Image_Wide_Character - (V : Wide_Character) return String + (V : Wide_Character; + Ada_2005 : Boolean) return String is begin + -- Annoying Ada 95 incompatibility with FFFE/FFFF + + if V >= Wide_Character'Val (16#FFFE#) + and then not Ada_2005 + then + if V = Wide_Character'Val (16#FFFE#) then + return "FFFE"; + else + return "FFFF"; + end if; + end if; + + -- Normal case, same as Wide_Wide_Character + return Image_Wide_Wide_Character (Wide_Wide_Character'Val (Wide_Character'Pos (V))); diff --git a/gcc/ada/s-imgwch.ads b/gcc/ada/s-imgwch.ads index 61f4441f53a..b827b803b92 100644 --- a/gcc/ada/s-imgwch.ads +++ b/gcc/ada/s-imgwch.ads @@ -36,8 +36,12 @@ package System.Img_WChar is pragma Pure; - function Image_Wide_Character (V : Wide_Character) return String; - -- Computes Wide_Character'Image (V) and returns the computed result + function Image_Wide_Character + (V : Wide_Character; + Ada_2005 : Boolean) return String; + -- Computes Wide_Character'Image (V) and returns the computed result. The + -- parameter Ada_2005 is True if operating in Ada 2005 mode (or beyond). + -- This is needed for the annoying FFFE/FFFF incompatibility. function Image_Wide_Wide_Character (V : Wide_Wide_Character) return String; -- Computes Wide_Wide_Character'Image (V) and returns the computed result diff --git a/gcc/ada/s-io.adb b/gcc/ada/s-io.adb index 1afdd37b708..264976b4591 100644 --- a/gcc/ada/s-io.adb +++ b/gcc/ada/s-io.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2005 Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2005, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -33,6 +33,10 @@ package body System.IO is + Current_Out : File_Type := Stdout; + pragma Atomic (Current_Out); + -- Current output file (modified by Set_Output) + -------------- -- New_Line -- -------------- @@ -49,21 +53,35 @@ package body System.IO is --------- procedure Put (X : Integer) is - procedure Put_Int (X : Integer); pragma Import (C, Put_Int, "put_int"); + procedure Put_Int_Err (X : Integer); + pragma Import (C, Put_Int_Err, "put_int_stderr"); + begin - Put_Int (X); + case Current_Out is + when Stdout => + Put_Int (X); + when Stderr => + Put_Int_Err (X); + end case; end Put; procedure Put (C : Character) is - procedure Put_Char (C : Character); pragma Import (C, Put_Char, "put_char"); + procedure Put_Char_Stderr (C : Character); + pragma Import (C, Put_Char_Stderr, "put_char_stderr"); + begin - Put_Char (C); + case Current_Out is + when Stdout => + Put_Char (C); + when Stderr => + Put_Char_Stderr (C); + end case; end Put; procedure Put (S : String) is @@ -83,4 +101,31 @@ package body System.IO is New_Line; end Put_Line; + --------------------- + -- Standard_Output -- + --------------------- + + function Standard_Output return File_Type is + begin + return Stdout; + end Standard_Output; + + -------------------- + -- Standard_Error -- + -------------------- + + function Standard_Error return File_Type is + begin + return Stderr; + end Standard_Error; + + ---------------- + -- Set_Output -- + ---------------- + + procedure Set_Output (File : in File_Type) is + begin + Current_Out := File; + end Set_Output; + end System.IO; diff --git a/gcc/ada/s-io.ads b/gcc/ada/s-io.ads index 6171510e7c0..7ab099b8473 100644 --- a/gcc/ada/s-io.ads +++ b/gcc/ada/s-io.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2005 Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2005, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -48,4 +48,19 @@ package System.IO is procedure New_Line (Spacing : Positive := 1); + type File_Type is limited private; + + function Standard_Error return File_Type; + function Standard_Output return File_Type; + + procedure Set_Output (File : in File_Type); + +private + + type File_Type is (Stdout, Stderr); + -- Stdout = Standard_Output, Stderr = Standard_Error + + pragma Inline (Standard_Error); + pragma Inline (Standard_Output); + end System.IO; diff --git a/gcc/ada/s-osinte-linux-hppa.ads b/gcc/ada/s-osinte-linux-hppa.ads index a04c636f1e8..ec7efd2feae 100644 --- a/gcc/ada/s-osinte-linux-hppa.ads +++ b/gcc/ada/s-osinte-linux-hppa.ads @@ -508,7 +508,7 @@ private lock : lock_array; end record; pragma Convention (C, atomic_lock_t); - for atomic_lock_t'Alignment use 8 * 16; + for atomic_lock_t'Alignment use 16; type struct_pthread_fast_lock is record spinlock : atomic_lock_t; diff --git a/gcc/ada/s-soflin.adb b/gcc/ada/s-soflin.adb index 02b57bfe364..8c32568a125 100644 --- a/gcc/ada/s-soflin.adb +++ b/gcc/ada/s-soflin.adb @@ -83,6 +83,25 @@ package body System.Soft_Links is null; end Abort_Undefer_NT; + ----------------- + -- Adafinal_NT -- + ----------------- + + procedure Adafinal_NT is + begin + -- Handle normal task termination by the environment task, but only + -- for the normal task termination. In the case of Abnormal and + -- Unhandled_Exception they must have been handled before, and the + -- task termination soft link must have been changed so the task + -- termination routine is not executed twice. + + Task_Termination_Handler.all (Ada.Exceptions.Null_Occurrence); + + -- Finalize the global list for controlled objects if needed + + Finalize_Global_List.all; + end Adafinal_NT; + --------------------------- -- Check_Abort_Status_NT -- --------------------------- @@ -226,14 +245,14 @@ package body System.Soft_Links is return NT_TSD.Pri_Stack_Info'Access; end Get_Stack_Info_NT; - ------------------- - -- Null_Adafinal -- - ------------------- + ------------------------------- + -- Null_Finalize_Global_List -- + ------------------------------- - procedure Null_Adafinal is + procedure Null_Finalize_Global_List is begin null; - end Null_Adafinal; + end Null_Finalize_Global_List; --------------------------- -- Set_Jmpbuf_Address_NT -- @@ -286,6 +305,16 @@ package body System.Soft_Links is end Task_Unlock_NT; ------------------------- + -- Task_Termination_NT -- + ------------------------- + + procedure Task_Termination_NT (Excep : EO) is + pragma Warnings (Off, Excep); + begin + null; + end Task_Termination_NT; + + ------------------------- -- Update_Exception_NT -- ------------------------- diff --git a/gcc/ada/s-soflin.ads b/gcc/ada/s-soflin.ads index 8f166e61263..2abe631a418 100644 --- a/gcc/ada/s-soflin.ads +++ b/gcc/ada/s-soflin.ads @@ -62,6 +62,7 @@ package System.Soft_Links is type No_Param_Proc is access procedure; type Addr_Param_Proc is access procedure (Addr : Address); + type EO_Param_Proc is access procedure (Excep : EO); type Get_Address_Call is access function return Address; type Set_Address_Call is access procedure (Addr : Address); @@ -92,6 +93,7 @@ package System.Soft_Links is pragma Suppress (Access_Check, No_Param_Proc); pragma Suppress (Access_Check, Addr_Param_Proc); + pragma Suppress (Access_Check, EO_Param_Proc); pragma Suppress (Access_Check, Get_Address_Call); pragma Suppress (Access_Check, Set_Address_Call); pragma Suppress (Access_Check, Set_Address_Call2); @@ -139,9 +141,15 @@ package System.Soft_Links is procedure Task_Unlock_NT; -- Release lock set by Task_Lock (non-tasking case, does nothing) - procedure Null_Adafinal; - -- Shuts down the runtime system (non-tasking no-finalization case, - -- does nothing) + procedure Task_Termination_NT (Excep : EO); + -- Handle task termination routines for the environment task (non-tasking + -- case, does nothing). + + procedure Null_Finalize_Global_List; + -- Finalize global list for controlled objects (does nothing) + + procedure Adafinal_NT; + -- Shuts down the runtime system (non-tasking case) Abort_Defer : No_Param_Proc := Abort_Defer_NT'Access; pragma Suppress (Access_Check, Abort_Defer); @@ -197,7 +205,13 @@ package System.Soft_Links is -- This ensures that the lock is not left set if an exception is raised -- explicitly or implicitly during the critical locked region. - Adafinal : No_Param_Proc := Null_Adafinal'Access; + Task_Termination_Handler : EO_Param_Proc := Task_Termination_NT'Access; + -- Handle task termination routines (task/non-task case as appropriate) + + Finalize_Global_List : No_Param_Proc := Null_Finalize_Global_List'Access; + -- Performs finalization of global list for controlled objects + + Adafinal : No_Param_Proc := Adafinal_NT'Access; -- Performs the finalization of the Ada Runtime function Get_Jmpbuf_Address_NT return Address; diff --git a/gcc/ada/s-solita.adb b/gcc/ada/s-solita.adb index 920284764b4..5c4b9ed6219 100644 --- a/gcc/ada/s-solita.adb +++ b/gcc/ada/s-solita.adb @@ -46,12 +46,25 @@ with System.Task_Primitives.Operations; with System.Tasking; -- Used for Task_Id +-- Cause_Of_Termination + +with Ada.Exceptions; +-- Used for Exception_Id +-- Exception_Occurrence +-- Save_Occurrence + +with Ada.Exceptions.Is_Null_Occurrence; package body System.Soft_Links.Tasking is package STPO renames System.Task_Primitives.Operations; package SSL renames System.Soft_Links; + use Ada.Exceptions; + + use type System.Tasking.Task_Id; + use type System.Tasking.Termination_Handler; + ---------------- -- Local Data -- ---------------- @@ -78,6 +91,9 @@ package body System.Soft_Links.Tasking is procedure Timed_Delay_T (Time : Duration; Mode : Integer); -- Task-safe version of SSL.Timed_Delay + procedure Task_Termination_Handler_T (Excep : SSL.EO); + -- Task-safe version of the task termination procedure + -------------------------- -- Soft-Link Get Bodies -- -------------------------- @@ -134,6 +150,48 @@ package body System.Soft_Links.Tasking is end if; end Timed_Delay_T; + -------------------------------- + -- Task_Termination_Handler_T -- + -------------------------------- + + procedure Task_Termination_Handler_T (Excep : SSL.EO) is + Self_Id : constant System.Tasking.Task_Id := STPO.Self; + Cause : System.Tasking.Cause_Of_Termination; + EO : Ada.Exceptions.Exception_Occurrence; + + begin + -- We can only be here because we are terminating the environment task. + -- Task termination for the rest of the tasks is handled in the + -- Task_Wrapper. + + pragma Assert (Self_Id = STPO.Environment_Task); + + -- Normal task termination + + if Is_Null_Occurrence (Excep) then + Cause := System.Tasking.Normal; + Ada.Exceptions.Save_Occurrence (EO, Ada.Exceptions.Null_Occurrence); + + -- Abnormal task termination + + elsif Exception_Identity (Excep) = Standard'Abort_Signal'Identity then + Cause := System.Tasking.Abnormal; + Ada.Exceptions.Save_Occurrence (EO, Ada.Exceptions.Null_Occurrence); + + -- Termination because of an unhandled exception + + else + Cause := System.Tasking.Unhandled_Exception; + Ada.Exceptions.Save_Occurrence (EO, Excep); + end if; + + if Self_Id.Common.Specific_Handler /= null then + Self_Id.Common.Specific_Handler.all (Cause, Self_Id, EO); + elsif Self_Id.Common.Fall_Back_Handler /= null then + Self_Id.Common.Fall_Back_Handler.all (Cause, Self_Id, EO); + end if; + end Task_Termination_Handler_T; + ----------------------------- -- Init_Tasking_Soft_Links -- ----------------------------- @@ -151,12 +209,13 @@ package body System.Soft_Links.Tasking is -- The application being executed uses tasking so that the tasking -- version of the following soft links need to be used. - SSL.Get_Jmpbuf_Address := Get_Jmpbuf_Address'Access; - SSL.Set_Jmpbuf_Address := Set_Jmpbuf_Address'Access; - SSL.Get_Sec_Stack_Addr := Get_Sec_Stack_Addr'Access; - SSL.Set_Sec_Stack_Addr := Set_Sec_Stack_Addr'Access; - SSL.Get_Current_Excep := Get_Current_Excep'Access; - SSL.Timed_Delay := Timed_Delay_T'Access; + SSL.Get_Jmpbuf_Address := Get_Jmpbuf_Address'Access; + SSL.Set_Jmpbuf_Address := Set_Jmpbuf_Address'Access; + SSL.Get_Sec_Stack_Addr := Get_Sec_Stack_Addr'Access; + SSL.Set_Sec_Stack_Addr := Set_Sec_Stack_Addr'Access; + SSL.Get_Current_Excep := Get_Current_Excep'Access; + SSL.Timed_Delay := Timed_Delay_T'Access; + SSL.Task_Termination_Handler := Task_Termination_Handler_T'Access; -- No need to create a new Secondary Stack, since we will use the -- default one created in s-secsta.adb diff --git a/gcc/ada/s-stausa.adb b/gcc/ada/s-stausa.adb index 3823ebe9aaa..5f7de0955bf 100644 --- a/gcc/ada/s-stausa.adb +++ b/gcc/ada/s-stausa.adb @@ -30,28 +30,146 @@ -- Extensive contributions were provided by Ada Core Technologies, Inc. -- -- -- ------------------------------------------------------------------------------ --- Dummy implementation. + +with System.Parameters; +with System.CRTL; +with System.IO; package body System.Stack_Usage is + use System.Storage_Elements; + use System; + use System.IO; - -------------------- - -- Compute_Result -- - -------------------- + procedure Output_Result (Result_Id : Natural; Result : Task_Result); - procedure Compute_Result (Analyzer : in out Stack_Analyzer) is - pragma Unreferenced (Analyzer); + function Report_Result (Analyzer : Stack_Analyzer) return Natural; + + function Inner_Than + (A1 : Stack_Address; + A2 : Stack_Address) return Boolean; + pragma Inline (Inner_Than); + -- Return True if, according to the direction of the stack growth, A1 is + -- inner than A2. Inlined to reduce the size of the stack used by the + -- instrumentation code. + + ---------------- + -- Inner_Than -- + ---------------- + + function Inner_Than + (A1 : Stack_Address; + A2 : Stack_Address) return Boolean + is begin - null; - end Compute_Result; + if System.Parameters.Stack_Grows_Down then + return A1 > A2; + else + return A2 > A1; + end if; + end Inner_Than; + + ---------------- + -- Initialize -- + ---------------- + + -- Add comments to this procedure ??? + -- Other subprograms also need more comment in code??? + + procedure Initialize (Buffer_Size : Natural) is + Bottom_Of_Stack : aliased Integer; + + Stack_Size_Chars : System.Address; + begin + Result_Array := new Result_Array_Type (1 .. Buffer_Size); + Result_Array.all := + (others => + (Task_Name => + (others => ASCII.NUL), + Measure => 0, + Max_Size => 0)); + + Is_Enabled := True; + + Stack_Size_Chars := System.CRTL.getenv ("GNAT_STACK_LIMIT" & ASCII.NUL); + + -- If variable GNAT_STACK_LIMIT is set, then we will take care of the + -- environment task, using GNAT_STASK_LIMIT as the size of the stack. + -- It doens't make sens to process the stack when no bound is set (e.g. + -- limit is typically up to 4 GB). + + if Stack_Size_Chars /= Null_Address then + declare + Stack_Size : Integer; + + begin + Stack_Size := System.CRTL.atoi (Stack_Size_Chars) * 1024; + + Initialize_Analyzer (Environment_Task_Analyzer, + "ENVIRONMENT TASK", + Stack_Size, + System.Storage_Elements.To_Integer + (Bottom_Of_Stack'Address)); + + Fill_Stack (Environment_Task_Analyzer); + + Compute_Environment_Task := True; + end; + + -- GNAT_STACK_LIMIT not set + + else + Compute_Environment_Task := False; + end if; + end Initialize; ---------------- -- Fill_Stack -- ---------------- procedure Fill_Stack (Analyzer : in out Stack_Analyzer) is - pragma Unreferenced (Analyzer); + + -- Change the local variables and parameters of this function with + -- super-extra care. The more the stack frame size of this function is + -- big, the more an "instrumentation threshold at writing" error is + -- likely to happen. + + type Word_32_Arr is + array (1 .. Analyzer.Size / (Word_32_Size / Byte_Size)) of Word_32; + pragma Pack (Word_32_Arr); + + package Arr_Addr is + new System.Address_To_Access_Conversions (Word_32_Arr); + + Arr : aliased Word_32_Arr; + begin - null; + for J in Word_32_Arr'Range loop + Arr (J) := Analyzer.Pattern; + end loop; + Analyzer.Array_Address := Arr_Addr.To_Address (Arr'Access); + Analyzer.Inner_Pattern_Mark := To_Stack_Address (Arr (1)'Address); + Analyzer.Outer_Pattern_Mark := + To_Stack_Address (Arr (Word_32_Arr'Last)'Address); + + if Inner_Than (Analyzer.Outer_Pattern_Mark, + Analyzer.Inner_Pattern_Mark) then + Analyzer.Inner_Pattern_Mark := Analyzer.Outer_Pattern_Mark; + Analyzer.Outer_Pattern_Mark := To_Stack_Address (Arr (1)'Address); + Analyzer.First_Is_Outermost := True; + else + Analyzer.First_Is_Outermost := False; + end if; + + -- If Arr has been packed, the following assertion must be true (we add + -- the size of the element whose address is: + -- + -- Min (Analyzer.Inner_Pattern_Mark, Analyzer.Outer_Pattern_Mark)): + + pragma Assert + (Analyzer.Size = + Stack_Size + (Analyzer.Outer_Pattern_Mark, Analyzer.Inner_Pattern_Mark) + + Word_32_Size / Byte_Size); end Fill_Stack; ------------------------- @@ -65,22 +183,119 @@ package body System.Stack_Usage is Bottom : Stack_Address; Pattern : Word_32 := 16#DEAD_BEEF#) is - pragma Unreferenced (Analyzer); - pragma Unreferenced (Task_Name); - pragma Unreferenced (Size); - pragma Unreferenced (Pattern); - pragma Unreferenced (Bottom); begin - null; + Analyzer.Bottom_Of_Stack := Bottom; + Analyzer.Size := Size; + Analyzer.Pattern := Pattern; + Analyzer.Result_Id := Next_Id; + + Analyzer.Task_Name := (others => ' '); + + if Task_Name'Length <= Task_Name_Length then + Analyzer.Task_Name (1 .. Task_Name_Length) := Task_Name; + else + Analyzer.Task_Name := + Task_Name (Task_Name'First .. + Task_Name'First + Task_Name_Length - 1); + end if; + + if Next_Id in Result_Array'Range then + Result_Array (Analyzer.Result_Id).Task_Name := Analyzer.Task_Name; + end if; + + Result_Array (Analyzer.Result_Id).Max_Size := Size; + Next_Id := Next_Id + 1; end Initialize_Analyzer; + ---------------- + -- Stack_Size -- + ---------------- + + function Stack_Size + (SP_Low : Stack_Address; + SP_High : Stack_Address) return Natural + is + begin + if SP_Low > SP_High then + return Natural (SP_Low - SP_High + 4); + else + return Natural (SP_High - SP_Low + 4); + end if; + end Stack_Size; + + -------------------- + -- Compute_Result -- + -------------------- + + procedure Compute_Result (Analyzer : in out Stack_Analyzer) is + + -- Change the local variables and parameters of this function with + -- super-extra care. The larger the stack frame size of this function + -- is, the more an "instrumentation threshold at reading" error is + -- likely to happen. + + type Word_32_Arr is + array (1 .. Analyzer.Size / (Word_32_Size / Byte_Size)) of Word_32; + pragma Pack (Word_32_Arr); + + package Arr_Addr is + new System.Address_To_Access_Conversions (Word_32_Arr); + + Arr_Access : Arr_Addr.Object_Pointer; + + begin + Arr_Access := Arr_Addr.To_Pointer (Analyzer.Array_Address); + Analyzer.Outermost_Touched_Mark := Analyzer.Inner_Pattern_Mark; + + for J in Word_32_Arr'Range loop + if Arr_Access (J) /= Analyzer.Pattern then + Analyzer.Outermost_Touched_Mark := + To_Stack_Address (Arr_Access (J)'Address); + + if Analyzer.First_Is_Outermost then + exit; + end if; + end if; + end loop; + end Compute_Result; + + --------------------- + -- Output_Result -- + --------------------- + + procedure Output_Result (Result_Id : Natural; Result : Task_Result) is + begin + Set_Output (Standard_Error); + Put (Natural'Image (Result_Id)); + Put (" | "); + Put (Result.Task_Name); + Put (" | "); + Put (Natural'Image (Result.Max_Size)); + Put (" | "); + Put (Natural'Image (Result.Measure)); + New_Line; + end Output_Result; + --------------------- -- Output_Results -- --------------------- procedure Output_Results is begin - null; + if Compute_Environment_Task then + Compute_Result (Environment_Task_Analyzer); + Report_Result (Environment_Task_Analyzer); + end if; + + Set_Output (Standard_Error); + Put ("INDEX | TASK NAME | STACK SIZE | MAX USAGE"); + New_Line; + + for J in Result_Array'Range loop + exit when J >= Next_Id; + + Output_Result (J, Result_Array (J)); + end loop; end Output_Results; ------------------- @@ -88,9 +303,28 @@ package body System.Stack_Usage is ------------------- procedure Report_Result (Analyzer : Stack_Analyzer) is - pragma Unreferenced (Analyzer); begin - null; + if Analyzer.Result_Id in Result_Array'Range then + Result_Array (Analyzer.Result_Id).Measure := Report_Result (Analyzer); + else + Output_Result + (Analyzer.Result_Id, + (Task_Name => Analyzer.Task_Name, + Max_Size => Analyzer.Size, + Measure => Report_Result (Analyzer))); + end if; + end Report_Result; + + function Report_Result (Analyzer : Stack_Analyzer) return Natural is + begin + if Analyzer.Outermost_Touched_Mark = Analyzer.Inner_Pattern_Mark then + return Stack_Size (Analyzer.Inner_Pattern_Mark, + Analyzer.Bottom_Of_Stack); + + else + return Stack_Size (Analyzer.Outermost_Touched_Mark, + Analyzer.Bottom_Of_Stack); + end if; end Report_Result; end System.Stack_Usage; diff --git a/gcc/ada/s-stausa.ads b/gcc/ada/s-stausa.ads index 0c0d8eb17b2..72242c20677 100644 --- a/gcc/ada/s-stausa.ads +++ b/gcc/ada/s-stausa.ads @@ -36,6 +36,7 @@ with System.Storage_Elements; with System.Address_To_Access_Conversions; package System.Stack_Usage is + pragma Preelaborate; package SSE renames System.Storage_Elements; @@ -46,46 +47,43 @@ package System.Stack_Usage is for Word_32'Alignment use 4; subtype Stack_Address is SSE.Integer_Address; - -- Address on the stack. + -- Address on the stack -- - -- NOTE: - -- ***** - -- - -- in this package, when comparing two addresses on the - -- stack, the comments use the terms "outer", "inner", "outermost" - -- and "innermost" instead of the ambigous "higher", "lower", - -- "highest" and "lowest". "inner" means "closer to the bottom of - -- stack" and is the contrary of "outer". "innermost" means "closest - -- address to the bottom of stack". The stack is growing from the - -- innermost addresses to the outermost addresses. + -- Note: in this package, when comparing two addresses on the stack, the + -- comments use the terms "outer", "inner", "outermost" and "innermost" + -- instead of the ambigous "higher", "lower", "highest" and "lowest". + -- "inner" means "closer to the bottom of stack" and is the contrary of + -- "outer". "innermost" means "closest address to the bottom of stack". The + -- stack is growing from the inner to the outer. + + -- Top/Bottom would be much better than inner and outer ??? - function To_Stack_Address (Value : Address) return Stack_Address - renames System.Storage_Elements.To_Integer; + function To_Stack_Address (Value : System.Address) return Stack_Address + renames System.Storage_Elements.To_Integer; type Stack_Analyzer is private; -- Type of the stack analyzer tool. It is used to fill a portion of -- the stack with Pattern, and to compute the stack used after some -- execution. - -- - -- USAGE: - -- ****** - -- - -- -- A typical use of the package is something like: - -- + + -- Usage: + + -- A typical use of the package is something like: + -- A : Stack_Analyzer; - -- + -- task T is -- pragma Storage_Size (A_Storage_Size); -- end T; - -- + -- [...] - -- + -- Bottom_Of_Stack : aliased Integer; -- -- Bottom_Of_Stack'Address will be used as an approximation of -- -- the bottom of stack. A good practise is to avoid allocating -- -- other local variables on this stack, as it would degrade -- -- the quality of this approximation. - -- + -- begin -- Initialize_Analyzer (A, -- "Task t", @@ -96,92 +94,112 @@ package System.Stack_Usage is -- Compute_Result (A); -- Report_Result (A); -- end T; - -- - -- + -- Errors: - -- ******* -- -- We are instrumenting the code to measure the stack used by the user -- code. This method has a number of systematic errors, but several -- methods can be used to evaluate or reduce those errors. Here are -- those errors and the strategy that we use to deal with them: - -- - -- * Bottom offset: - -- - Description: The procedure used to fill the stack with a given - -- pattern will itself have a stack frame. The value of the stack pointer - -- in this procedure is, therefore, different from the value before the - -- call to the instrumentation procedure. - -- - Strategy: The user of this package shall measure the bottom of stack - -- before the call to Fill_Stack and pass it in parameter. - -- - -- * Instrumentation threshold at writing: - -- - Description: The procedure used to fill the stack with a given - -- pattern will itself have a stack frame. Therefore, it will - -- fill the stack after this stack frame. This part of the stack will - -- appear as used in the final measure. - -- - Strategy: As the user pass the value of the bottom of stack to - -- the instrumentation to deal with the bottom offset error, and as - -- as the instrumentation procedure knows where the pattern filling - -- start on the stack, the difference between the two values is the - -- minimum stack usage that the method can measure. If, when the results - -- are computed, the pattern zone has been left untouched, we conclude - -- that the stack usage is inferior to this minimum stack usage. - -- - -- * Instrumentation threshold at reading: - -- - Description: The procedure used to read the stack at the end of the - -- execution clobbers the stack by allocating its stack frame. If this - -- stack frame is bigger than the total stack used by the user code at - -- this point, it will increase the measured stack size. - -- - Strategy: We could augment this stack frame and see if it changes the - -- measure. However, this error should be negligeable. - -- - -- * Pattern zone overflow: - -- - Description: The stack grows outer than the outermost bound of the - -- pattern zone. In that case, the outermost region modified in the - -- pattern is not the maximum value of the stack pointer during the - -- execution. - -- - Strategy: At the end of the execution, the difference between the - -- outermost memory region modified in the pattern zone and the - -- outermost bound of the pattern zone can be understood as the - -- biggest allocation that the method could have detect, provided - -- that there is no "Untouched allocated zone" error and no "Pattern - -- usage in user code" error. If no object in the user code is likely - -- to have this size, this is not likely to happen. - -- - -- * Pattern usage in user code: - -- - Description: The pattern can be found in the object of the user - -- code. Therefore, the address space where this object has been - -- allocated will appear as untouched. - -- - Strategy: Choose a pattern that is uncommon. 16#0000_0000# is the - -- worst choice; 16#DEAD_BEEF# can be a good one. A good choice is an - -- address which is not a multiple of 2, and which is not in the - -- target address space. You can also change the pattern to see if - -- it changes the measure. Note that this error *very* rarely influence - -- the measure of the total stack usage: to have some influence, the - -- pattern has to be used in the object that has been allocated on the - -- outermost address of the used stack. - -- - -- * Stack overflow: - -- - Description: The pattern zone does not fit on the stack. - -- This may lead to an erroneous execution. - -- - Strategy: Specify a storage size that is bigger than the - -- size of the pattern. 2 times bigger should be enough. - -- - -- * Augmentation of the user stack frames: - -- - Description: The use of instrumentation object or procedure may - -- augment the stack frame of the caller. - -- - Strategy: Do *not* inline the instrumentation procedures. Do *not* - -- allocate the Stack_Analyzer object on the stack. - -- - -- * Untouched allocated zone: - -- - Description: The user code may allocate objects that it will never - -- touch. In that case, the pattern will not be changed. - -- - Strategy: There are no way to detect this error. Fortunately, this - -- error is really rare, and it is most probably a bug in the user code, - -- e.g. some uninitialized variable. It is (most of the time) harmless: - -- it influences the measure only if the untouched allocated zone - -- happens to be located at the outermost value of the stack pointer - -- for the whole execution. + + -- Bottom offset: + + -- Description: The procedure used to fill the stack with a given + -- pattern will itself have a stack frame. The value of the stack + -- pointer in this procedure is, therefore, different from the value + -- before the call to the instrumentation procedure. + + -- Strategy: The user of this package should measure the bottom of stack + -- before the call to Fill_Stack and pass it in parameter. + + -- Instrumentation threshold at writing: + + -- Description: The procedure used to fill the stack with a given + -- pattern will itself have a stack frame. Therefore, it will + -- fill the stack after this stack frame. This part of the stack will + -- appear as used in the final measure. + + -- Strategy: As the user passes the value of the bottom of stack to + -- the instrumentation to deal with the bottom offset error, and as as + -- the instrumentation procedure knows where the pattern filling start + -- on the stack, the difference between the two values is the minimum + -- stack usage that the method can measure. If, when the results are + -- computed, the pattern zone has been left untouched, we conclude + -- that the stack usage is inferior to this minimum stack usage. + + -- Instrumentation threshold at reading: + + -- Description: The procedure used to read the stack at the end of the + -- execution clobbers the stack by allocating its stack frame. If this + -- stack frame is bigger than the total stack used by the user code at + -- this point, it will increase the measured stack size. + + -- Strategy: We could augment this stack frame and see if it changes the + -- measure. However, this error should be negligeable. + + -- Pattern zone overflow: + + -- Description: The stack grows outer than the outermost bound of the + -- pattern zone. In that case, the outermost region modified in the + -- pattern is not the maximum value of the stack pointer during the + -- execution. + + -- Strategy: At the end of the execution, the difference between the + -- outermost memory region modified in the pattern zone and the + -- outermost bound of the pattern zone can be understood as the + -- biggest allocation that the method could have detect, provided + -- that there is no "Untouched allocated zone" error and no "Pattern + -- usage in user code" error. If no object in the user code is likely + -- to have this size, this is not likely to happen. + + -- Pattern usage in user code: + + -- Description: The pattern can be found in the object of the user code. + -- Therefore, the address space where this object has been allocated + -- will appear as untouched. + + -- Strategy: Choose a pattern that is uncommon. 16#0000_0000# is the + -- worst choice; 16#DEAD_BEEF# can be a good one. A good choice is an + -- address which is not a multiple of 2, and which is not in the + -- target address space. You can also change the pattern to see if it + -- changes the measure. Note that this error *very* rarely influence + -- the measure of the total stack usage: to have some influence, the + -- pattern has to be used in the object that has been allocated on the + -- outermost address of the used stack. + + -- Stack overflow: + + -- Description: The pattern zone does not fit on the stack. This may + -- lead to an erroneous execution. + + -- Strategy: Specify a storage size that is bigger than the size of the + -- pattern. 2 times bigger should be enough. + + -- Augmentation of the user stack frames: + + -- Description: The use of instrumentation object or procedure may + -- augment the stack frame of the caller. + + -- Strategy: Do *not* inline the instrumentation procedures. Do *not* + -- allocate the Stack_Analyzer object on the stack. + + -- Untouched allocated zone: + + -- Description: The user code may allocate objects that it will never + -- touch. In that case, the pattern will not be changed. + + -- Strategy: There are no way to detect this error. Fortunately, this + -- error is really rare, and it is most probably a bug in the user + -- code, e.g. some uninitialized variable. It is (most of the time) + -- harmless: it influences the measure only if the untouched allocated + -- zone happens to be located at the outermost value of the stack + -- pointer for the whole execution. + + procedure Initialize (Buffer_Size : Natural); + pragma Export (C, Initialize, "__gnat_stack_usage_initialize"); + -- Initializes the size of the buffer that stores the results. Only the + -- first Buffer_Size results are stored. Any results that do not fit in + -- this buffer will be displayed on the fly. procedure Fill_Stack (Analyzer : in out Stack_Analyzer); -- Fill an area of the stack with the pattern Analyzer.Pattern. The size @@ -200,13 +218,26 @@ package System.Stack_Usage is -- Analyzer.Inner_Pattern_Mark ^ -- Analyzer.Outer_Pattern_Mark + procedure Initialize_Analyzer + (Analyzer : in out Stack_Analyzer; + Task_Name : String; + Size : Natural; + Bottom : Stack_Address; + Pattern : Word_32 := 16#DEAD_BEEF#); + -- Should be called before any use of a Stack_Analyzer, to initialize it. + -- Size is the size of the pattern zone. Bottom should be a close + -- approximation of the caller base frame address. + + Is_Enabled : Boolean := False; + -- When this flag is true, then stack analysis is enabled + procedure Compute_Result (Analyzer : in out Stack_Analyzer); - -- Read the patern zone and deduce the stack usage. It should - -- be called from the same frame as Fill_Stack. If Analyzer.Probe is not - -- null, an array of Word_32 with Analyzer.Probe elements is allocated on - -- Compute_Result's stack frame. Probe can be used to detect an - -- "instrumentation threshold at reading" error; See above. - -- After the call to this procedure, the memory will look like: + -- Read the patern zone and deduce the stack usage. It should be called + -- from the same frame as Fill_Stack. If Analyzer.Probe is not null, an + -- array of Word_32 with Analyzer.Probe elements is allocated on + -- Compute_Result's stack frame. Probe can be used to detect the error: + -- "instrumentation threshold at reading". See above. After the call + -- to this procedure, the memory will look like: -- -- Stack growing -- -----------------------------------------------------------------------> @@ -224,45 +255,38 @@ package System.Stack_Usage is procedure Report_Result (Analyzer : Stack_Analyzer); -- Store the results of the computation in memory, at the address - -- corresponding to the symbol __gnat_stack_usage_results. - - type Parameterless_Procedure is access procedure; - - procedure Initialize_Analyzer - (Analyzer : in out Stack_Analyzer; - Task_Name : String; - Size : Natural; - Bottom : Stack_Address; - Pattern : Word_32 := 16#DEAD_BEEF#); - -- Should be called before any use of a Stack_Analyzer, to initialize it. - -- Size is the size of the pattern zone. - -- Bottom should be a close approximation of the caller base - -- frame address. + -- corresponding to the symbol __gnat_stack_usage_results. This is not + -- done inside Compute_Resuls in order to use as less stack as possible + -- within a task. procedure Output_Results; -- Print the results computed so far on the standard output. Should be -- called when all tasks are dead. + pragma Export (C, Output_Results, "__gnat_stack_usage_output_results"); + private + Task_Name_Length : constant := 32; + package Word_32_Addr is - new System.Address_To_Access_Conversions (Word_32); + new System.Address_To_Access_Conversions (Word_32); - type Result_Array_Id is range 0 .. 1_023; + type Stack_Analyzer is record + Task_Name : String (1 .. Task_Name_Length); + -- Name of the task - type Stack_Analyzer - is record - Size : Natural; - -- Size of the pattern zone. + Size : Natural; + -- Size of the pattern zone - Pattern : Word_32 := 16#DEAD_BEEF#; - -- Pattern used to recognize untouched memory. + Pattern : Word_32; + -- Pattern used to recognize untouched memory - Inner_Pattern_Mark : Stack_Address; - -- Innermost bound of the pattern area on the stack. + Inner_Pattern_Mark : Stack_Address; + -- Innermost bound of the pattern area on the stack - Outer_Pattern_Mark : Stack_Address; - -- Outermost bound of the pattern area on the stack. + Outer_Pattern_Mark : Stack_Address; + -- Outermost bound of the pattern area on the stack Outermost_Touched_Mark : Stack_Address; -- Outermost address of the pattern area whose value it is pointing @@ -270,20 +294,50 @@ private -- compensated, it is the outermost value of the stack pointer during -- the execution. - Bottom_Of_Stack : Stack_Address; + Bottom_Of_Stack : Stack_Address; -- Address of the bottom of the stack, as given by the caller of -- Initialize_Analyzer. - Array_Address : Address; - -- Address of the array of Word_32 that represents the pattern zone. + Array_Address : System.Address; + -- Address of the array of Word_32 that represents the pattern zone - First_Is_Outermost : Boolean; + First_Is_Outermost : Boolean; -- Set to true if the first element of the array of Word_32 that -- represents the pattern zone is at the outermost address of the -- pattern zone; false if it is the innermost address. - Result_Id : Result_Array_Id; - -- Location in the result array of the result for the current task. + Result_Id : Positive; + -- Id of the result. If less than value given to gnatbind -u corresponds + -- to the location in the result array of result for the current task. + end record; + + Environment_Task_Analyzer : Stack_Analyzer; + + Compute_Environment_Task : Boolean; + + type Task_Result is record + Task_Name : String (1 .. Task_Name_Length); + Measure : Natural; + Max_Size : Natural; end record; + type Result_Array_Type is array (Positive range <>) of Task_Result; + type Result_Array_Ptr is access all Result_Array_Type; + + Result_Array : Result_Array_Ptr; + pragma Export (C, Result_Array, "__gnat_stack_usage_results"); + -- Exported in order to have an easy accessible symbol in when debugging + + Next_Id : Positive := 1; + -- Id of the next stack analyzer + + function Stack_Size + (SP_Low : Stack_Address; + SP_High : Stack_Address) return Natural; + pragma Inline (Stack_Size); + -- Return the size of a portion of stack delimeted by SP_High and SP_Low + -- (), i.e. the difference between SP_High and SP_Low. The storage element + -- pointed by SP_Low is not included in the size. Inlined to reduce the + -- size of the stack used by the instrumentation code. + end System.Stack_Usage; diff --git a/gcc/ada/s-tarest.adb b/gcc/ada/s-tarest.adb index f8d9a1fd096..f0ac3b8de16 100644 --- a/gcc/ada/s-tarest.adb +++ b/gcc/ada/s-tarest.adb @@ -45,6 +45,9 @@ pragma Polling (Off); -- Turn off polling, we do not want ATC polling to take place during -- tasking operations. It causes infinite loops and other problems. +with Ada.Exceptions; +-- used for Exception_Occurrence + with System.Parameters; -- used for Size_Type -- Single_Lock @@ -83,6 +86,8 @@ package body System.Tasking.Restricted.Stages is package SSE renames System.Storage_Elements; package SST renames System.Secondary_Stack; + use Ada.Exceptions; + use Parameters; use Task_Primitives.Operations; use Task_Info; @@ -133,8 +138,15 @@ package body System.Tasking.Restricted.Stages is --------------- procedure Task_Lock is + Self_ID : constant Task_Id := STPO.Self; + begin - STPO.Write_Lock (Global_Task_Lock'Access, Global_Lock => True); + Self_ID.Common.Global_Task_Lock_Nesting := + Self_ID.Common.Global_Task_Lock_Nesting + 1; + + if Self_ID.Common.Global_Task_Lock_Nesting = 1 then + STPO.Write_Lock (Global_Task_Lock'Access, Global_Lock => True); + end if; end Task_Lock; ----------------- @@ -142,8 +154,16 @@ package body System.Tasking.Restricted.Stages is ----------------- procedure Task_Unlock is + Self_ID : constant Task_Id := STPO.Self; + begin - STPO.Unlock (Global_Task_Lock'Access, Global_Lock => True); + pragma Assert (Self_ID.Common.Global_Task_Lock_Nesting > 0); + Self_ID.Common.Global_Task_Lock_Nesting := + Self_ID.Common.Global_Task_Lock_Nesting - 1; + + if Self_ID.Common.Global_Task_Lock_Nesting = 0 then + STPO.Unlock (Global_Task_Lock'Access, Global_Lock => True); + end if; end Task_Unlock; ------------------ @@ -162,21 +182,40 @@ package body System.Tasking.Restricted.Stages is procedure Task_Wrapper (Self_ID : Task_Id) is ID : Task_Id := Self_ID; pragma Volatile (ID); - pragma Warnings (Off, ID); - -- Turn off warnings (stand alone volatile constant has to be - -- imported, so we cannot just make ID constant). - - -- Do not delete this variable. - -- In some targets, we need this variable to implement a fast Self. + -- Variable used on some targets to implement a fast self. We turn off + -- warnings because a stand alone volatile constant has to be imported, + -- so we don't want warnings about ID not being referenced, and volatile + -- having no effect. + -- + -- DO NOT delete ID. As noted, it is needed on some targets. use type System.Parameters.Size_Type; use type SSE.Storage_Offset; Secondary_Stack : aliased SSE.Storage_Array (1 .. Self_ID.Common.Compiler_Data.Pri_Stack_Info.Size * - SSE.Storage_Offset (Parameters.Sec_Stack_Ratio) / 100); + SSE.Storage_Offset (Parameters.Sec_Stack_Ratio) / 100); + + pragma Warnings (Off); Secondary_Stack_Address : System.Address := Secondary_Stack'Address; + pragma Warnings (On); + -- Address of secondary stack. In the fixed secondary stack case, this + -- value is not modified, causing a warning, hence the bracketing with + -- Warnings (Off/On). + + Cause : Cause_Of_Termination := Normal; + -- Indicates the reason why this task terminates. Normal corresponds to + -- a task terminating due to completing the last statement of its body. + -- If the task terminates because of an exception raised by the + -- execution of its task body, then Cause is set to Unhandled_Exception. + -- Aborts are not allowed in the restriced profile to which this file + -- belongs. + + EO : Exception_Occurrence; + -- If the task terminates because of an exception raised by the + -- execution of its task body, then EO will contain the associated + -- exception occurrence. Otherwise, it will contain Null_Occurrence. begin if not Parameters.Sec_Stack_Dynamic then @@ -190,25 +229,53 @@ package body System.Tasking.Restricted.Stages is Enter_Task (Self_ID); - -- Call the task body procedure. + -- Call the task body procedure begin -- We are separating the following portion of the code in order to - -- place the exception handlers in a different block. - -- In this way we do not call Set_Jmpbuf_Address (which needs - -- Self) before we set Self in Enter_Task. + -- place the exception handlers in a different block. In this way we + -- do not call Set_Jmpbuf_Address (which needs Self) before we set + -- Self in Enter_Task. + -- Note that in the case of Ravenscar HI-E where there are no -- exception handlers, the exception handler is suppressed. - -- Call the task body procedure. + -- Call the task body procedure Self_ID.Common.Task_Entry_Point (Self_ID.Common.Task_Arg); - Terminate_Task (Self_ID); + + -- Normal task termination + + Cause := Normal; + Save_Occurrence (EO, Ada.Exceptions.Null_Occurrence); exception - when others => - Terminate_Task (Self_ID); + when E : others => + + -- Task terminating because of an unhandled exception + + Cause := Unhandled_Exception; + Save_Occurrence (EO, E); end; + + -- Look for a fall-back handler. It can be either in the task itself + -- or in the environment task. Note that this code is always executed + -- by a task whose master is the environment task. The task termination + -- code for the environment task is executed by + -- SSL.Task_Termination_Handler. + + -- This package is part of the restricted run time which supports + -- neither task hierarchies (No_Task_Hierarchy) nor specific task + -- termination handlers (No_Specific_Termination_Handlers). + + if Self_ID.Common.Fall_Back_Handler /= null then + Self_ID.Common.Fall_Back_Handler.all (Cause, Self_ID, EO); + elsif Self_ID.Common.Parent.Common.Fall_Back_Handler /= null then + Self_ID.Common.Parent.Common.Fall_Back_Handler.all + (Cause, Self_ID, EO); + end if; + + Terminate_Task (Self_ID); end Task_Wrapper; ----------------------- @@ -219,11 +286,11 @@ package body System.Tasking.Restricted.Stages is -- Activate_Restricted_Tasks -- ------------------------------- - -- Note that locks of activator and activated task are both locked - -- here. This is necessary because C.State and Self.Wait_Count - -- have to be synchronized. This is safe from deadlock because - -- the activator is always created before the activated task. - -- That satisfies our in-order-of-creation ATCB locking policy. + -- Note that locks of activator and activated task are both locked here. + -- This is necessary because C.State and Self.Wait_Count have to be + -- synchronized. This is safe from deadlock because the activator is always + -- created before the activated task. That satisfies our + -- in-order-of-creation ATCB locking policy. procedure Activate_Restricted_Tasks (Chain_Access : Activation_Chain_Access) @@ -241,14 +308,13 @@ package body System.Tasking.Restricted.Stages is Lock_RTS; end if; - -- Lock self, to prevent activated tasks - -- from racing ahead before we finish activating the chain. + -- Lock self, to prevent activated tasks from racing ahead before we + -- finish activating the chain. Write_Lock (Self_ID); - -- Activate all the tasks in the chain. - -- Creation of the thread of control was deferred until - -- activation. So create it now. + -- Activate all the tasks in the chain. Creation of the thread of + -- control was deferred until activation. So create it now. C := Chain_Access.T_ID; @@ -286,9 +352,8 @@ package body System.Tasking.Restricted.Stages is Self_ID.Common.State := Activator_Sleep; - -- Wait for the activated tasks to complete activation. - -- It is unsafe to abort any of these tasks until the count goes to - -- zero. + -- Wait for the activated tasks to complete activation. It is unsafe to + -- abort any of these tasks until the count goes to zero. loop exit when Self_ID.Common.Wait_Count = 0; @@ -302,7 +367,7 @@ package body System.Tasking.Restricted.Stages is Unlock_RTS; end if; - -- Remove the tasks from the chain. + -- Remove the tasks from the chain Chain_Access.T_ID := null; end Activate_Restricted_Tasks; @@ -328,14 +393,13 @@ package body System.Tasking.Restricted.Stages is Write_Lock (Activator); Write_Lock (Self_ID); - -- Remove dangling reference to Activator, - -- since a task may outlive its activator. + -- Remove dangling reference to Activator, since a task may outlive its + -- activator. Self_ID.Common.Activator := null; - -- Wake up the activator, if it is waiting for a chain - -- of tasks to activate, and we are the last in the chain - -- to complete activation + -- Wake up the activator, if it is waiting for a chain of tasks to + -- activate, and we are the last in the chain to complete activation if Activator.Common.State = Activator_Sleep then Activator.Common.Wait_Count := Activator.Common.Wait_Count - 1; @@ -352,9 +416,9 @@ package body System.Tasking.Restricted.Stages is Unlock_RTS; end if; - -- After the activation, active priority should be the same - -- as base priority. We must unlock the Activator first, - -- though, since it should not wait if we have lower priority. + -- After the activation, active priority should be the same as base + -- priority. We must unlock the Activator first, though, since it should + -- not wait if we have lower priority. if Get_Priority (Self_ID) /= Self_ID.Common.Base_Priority then Set_Priority (Self_ID, Self_ID.Common.Base_Priority); @@ -391,8 +455,8 @@ package body System.Tasking.Restricted.Stages is Success : Boolean; begin - -- Stack is not preallocated on this target, so that - -- Stack_Address must be null. + -- Stack is not preallocated on this target, so that Stack_Address must + -- be null. pragma Assert (Stack_Address = Null_Address); @@ -415,9 +479,9 @@ package body System.Tasking.Restricted.Stages is (Self_ID, State, Discriminants, Self_ID, Elaborated, Base_Priority, Task_Info, Size, Created_Task, Success); - -- If we do our job right then there should never be any failures, - -- which was probably said about the Titanic; so just to be safe, - -- let's retain this code for now + -- If we do our job right then there should never be any failures, which + -- was probably said about the Titanic; so just to be safe, let's retain + -- this code for now if not Success then Unlock (Self_ID); @@ -468,6 +532,22 @@ package body System.Tasking.Restricted.Stages is Lock_RTS; end if; + -- Handle normal task termination by the environment task, but only for + -- the normal task termination. In the case of Abnormal and + -- Unhandled_Exception they must have been handled before, and the task + -- termination soft link must have been changed so the task termination + -- routine is not executed twice. + + -- Note that in the "normal" implementation in s-tassta.adb the task + -- termination procedure for the environment task should be executed + -- after termination of library-level tasks. However, this + -- implementation is to be used when the Ravenscar restrictions are in + -- effect, and AI-394 says that if there is a fall-back handler set for + -- the partition it should be called when the first task (including the + -- environment task) attempts to terminate. + + SSL.Task_Termination_Handler.all (Ada.Exceptions.Null_Occurrence); + Write_Lock (Self_ID); Sleep (Self_ID, Master_Completion_Sleep); Unlock (Self_ID); diff --git a/gcc/ada/s-tasini.adb b/gcc/ada/s-tasini.adb index 63b47e7b9e7..318e4bdaaa8 100644 --- a/gcc/ada/s-tasini.adb +++ b/gcc/ada/s-tasini.adb @@ -323,7 +323,7 @@ package body System.Tasking.Initialization is procedure Final_Task_Unlock (Self_ID : Task_Id) is begin - pragma Assert (Self_ID.Global_Task_Lock_Nesting = 1); + pragma Assert (Self_ID.Common.Global_Task_Lock_Nesting = 1); Unlock (Global_Task_Lock'Access, Global_Lock => True); end Final_Task_Unlock; @@ -624,9 +624,10 @@ package body System.Tasking.Initialization is procedure Task_Lock (Self_ID : Task_Id) is begin - Self_ID.Global_Task_Lock_Nesting := Self_ID.Global_Task_Lock_Nesting + 1; + Self_ID.Common.Global_Task_Lock_Nesting := + Self_ID.Common.Global_Task_Lock_Nesting + 1; - if Self_ID.Global_Task_Lock_Nesting = 1 then + if Self_ID.Common.Global_Task_Lock_Nesting = 1 then Defer_Abort_Nestable (Self_ID); Write_Lock (Global_Task_Lock'Access, Global_Lock => True); end if; @@ -654,10 +655,11 @@ package body System.Tasking.Initialization is procedure Task_Unlock (Self_ID : Task_Id) is begin - pragma Assert (Self_ID.Global_Task_Lock_Nesting > 0); - Self_ID.Global_Task_Lock_Nesting := Self_ID.Global_Task_Lock_Nesting - 1; + pragma Assert (Self_ID.Common.Global_Task_Lock_Nesting > 0); + Self_ID.Common.Global_Task_Lock_Nesting := + Self_ID.Common.Global_Task_Lock_Nesting - 1; - if Self_ID.Global_Task_Lock_Nesting = 0 then + if Self_ID.Common.Global_Task_Lock_Nesting = 0 then Unlock (Global_Task_Lock'Access, Global_Lock => True); Undefer_Abort_Nestable (Self_ID); end if; diff --git a/gcc/ada/s-taskin.adb b/gcc/ada/s-taskin.adb index fd76b575761..6c0ef7a04e6 100644 --- a/gcc/ada/s-taskin.adb +++ b/gcc/ada/s-taskin.adb @@ -107,6 +107,9 @@ package body System.Tasking is T.Common.Elaborated := Elaborated; T.Common.Activation_Failed := False; T.Common.Task_Info := Task_Info; + T.Common.Global_Task_Lock_Nesting := 0; + T.Common.Fall_Back_Handler := null; + T.Common.Specific_Handler := null; if T.Common.Parent = null then -- For the environment task, the adjusted stack size is diff --git a/gcc/ada/s-taskin.ads b/gcc/ada/s-taskin.ads index e979b7ab13b..da8b8005003 100644 --- a/gcc/ada/s-taskin.ads +++ b/gcc/ada/s-taskin.ads @@ -37,7 +37,8 @@ -- Any changes to this interface may require corresponding compiler changes. with Ada.Exceptions; --- Used for: Exception_Id +-- Used for Exception_Id +-- Exception_Occurrence with System.Parameters; -- used for Size_Type @@ -51,6 +52,9 @@ with System.Soft_Links; with System.Task_Primitives; -- used for Private_Data +with System.Stack_Usage; +-- used for Stack_Analyzer + with Unchecked_Conversion; package System.Tasking is @@ -329,6 +333,32 @@ package System.Tasking is end record; pragma Suppress_Initialization (Restricted_Entry_Call_Record); + ------------------------------------------- + -- Task termination procedure definition -- + ------------------------------------------- + + -- We need to redefine here these types (already defined in + -- Ada.Task_Termination) for avoiding circular dependencies. + + type Cause_Of_Termination is (Normal, Abnormal, Unhandled_Exception); + -- Possible causes for task termination: + -- + -- Normal means that the task terminates due to completing the + -- last sentence of its body, or as a result of waiting on a + -- terminate alternative. + + -- Abnormal means that the task terminates because it is being aborted + + -- handled_Exception means that the task terminates because of exception + -- raised by by the execution of its task_body. + + type Termination_Handler is access protected procedure + (Cause : in Cause_Of_Termination; + T : in Task_Id; + X : in Ada.Exceptions.Exception_Occurrence); + -- Used to represent protected procedures to be executed when task + -- terminates. + ------------------------------------ -- Task related other definitions -- ------------------------------------ @@ -539,6 +569,32 @@ package System.Tasking is Task_Info : System.Task_Info.Task_Info_Type; -- System-specific attributes of the task as specified by the -- Task_Info pragma. + + Analyzer : System.Stack_Usage.Stack_Analyzer; + -- For storing informations used to measure the stack usage. + + Global_Task_Lock_Nesting : Natural; + -- This is the current nesting level of calls to + -- System.Tasking.Initialization.Lock_Task. This allows a task to call + -- Lock_Task multiple times without deadlocking. A task only locks + -- Global_Task_Lock when its Global_Task_Lock_Nesting goes from 0 to 1, + -- and only unlocked when it goes from 1 to 0. + -- + -- Protection: Only accessed by Self + + Fall_Back_Handler : Termination_Handler; + pragma Atomic (Fall_Back_Handler); + -- This is the fall-back handler that applies to the dependent tasks of + -- the task. + -- + -- Protection: atomic access + + Specific_Handler : Termination_Handler; + pragma Atomic (Specific_Handler); + -- This is the specific handler that applies only to this task, and not + -- any of its dependent tasks. + -- + -- Protection: atomic access end record; --------------------------------------- @@ -796,15 +852,6 @@ package System.Tasking is -- -- Protection: Self.L - Global_Task_Lock_Nesting : Natural := 0; - -- This is the current nesting level of calls to - -- System.Tasking.Stages.Lock_Task_T. This allows a task to call - -- Lock_Task_T multiple times without deadlocking. A task only locks - -- All_Task_Lock when its All_Tasks_Nesting goes from 0 to 1, and only - -- unlocked when it goes from 1 to 0. - -- - -- Protection: Only accessed by Self - Open_Accepts : Accept_List_Access; -- This points to the Open_Accepts array of accept alternatives passed -- to the RTS by the compiler-generated code to Selective_Wait. It is diff --git a/gcc/ada/s-tassta.adb b/gcc/ada/s-tassta.adb index 54f92ebcde8..4ceea414a6d 100644 --- a/gcc/ada/s-tassta.adb +++ b/gcc/ada/s-tassta.adb @@ -68,7 +68,7 @@ with System.Soft_Links; -- specific data. In the absence of tasking, these routines refer to global -- data. In the presense of tasking, they must be replaced with pointers to -- task-specific versions. Also used for Create_TSD, Destroy_TSD, --- Get_Current_Excep +-- Get_Current_Excep, Finalize_Global_List, Task_Termination, Handler. with System.Tasking.Initialization; -- Used for Remove_From_All_Tasks_List @@ -84,6 +84,7 @@ pragma Elaborate_All (System.Tasking.Initialization); with System.Tasking.Utilities; -- Used for Make_Passive -- Abort_One_Task +-- Abort_Tasks with System.Tasking.Queuing; -- Used for Dequeue_Head @@ -94,9 +95,6 @@ with System.Tasking.Rendezvous; with System.OS_Primitives; -- Used for Delay_Modes -with System.Finalization_Implementation; --- Used for System.Finalization_Implementation.Finalize_Global_List - with System.Secondary_Stack; -- Used for SS_Init @@ -115,6 +113,8 @@ with System.Traces.Tasking; with Unchecked_Deallocation; -- To recover from failure of ATCB initialization +with System.Stack_Usage; + package body System.Tasking.Stages is package STPO renames System.Task_Primitives.Operations; @@ -232,17 +232,6 @@ package body System.Tasking.Stages is procedure Abort_Tasks (Tasks : Task_List) is begin - -- If pragma Detect_Blocking is active then Program_Error must be - -- raised if this potentially blocking operation is called from a - -- protected action. - - if System.Tasking.Detect_Blocking - and then STPO.Self.Common.Protected_Action_Nesting > 0 - then - Ada.Exceptions.Raise_Exception - (Program_Error'Identity, "potentially blocking operation"); - end if; - Utilities.Abort_Tasks (Tasks); end Abort_Tasks; @@ -826,7 +815,19 @@ package body System.Tasking.Stages is Vulnerable_Complete_Task (Self_ID); - System.Finalization_Implementation.Finalize_Global_List; + -- Handle normal task termination by the environment task, but only + -- for the normal task termination. In the case of Abnormal and + -- Unhandled_Exception they must have been handled before, and the + -- task termination soft link must have been changed so the task + -- termination routine is not executed twice. + + SSL.Task_Termination_Handler.all (Ada.Exceptions.Null_Occurrence); + + -- Finalize the global list for controlled objects if needed + + SSL.Finalize_Global_List.all; + + -- Reset the soft links to non-tasking SSL.Abort_Defer := SSL.Abort_Defer_NT'Access; SSL.Abort_Undefer := SSL.Abort_Undefer_NT'Access; @@ -890,14 +891,32 @@ package body System.Tasking.Stages is use type System.Parameters.Size_Type; use type SSE.Storage_Offset; use System.Standard_Library; + use System.Stack_Usage; + + Bottom_Of_Stack : aliased Integer; + + Secondary_Stack_Size : + constant SSE.Storage_Offset := + Self_ID.Common.Compiler_Data.Pri_Stack_Info.Size * + SSE.Storage_Offset (Parameters.Sec_Stack_Ratio) / 100; Secondary_Stack : aliased SSE.Storage_Array - (1 .. Self_ID.Common.Compiler_Data.Pri_Stack_Info.Size * - SSE.Storage_Offset (Parameters.Sec_Stack_Ratio) / 100); + (1 .. Secondary_Stack_Size); + pragma Warnings (Off); Secondary_Stack_Address : System.Address := Secondary_Stack'Address; + Overflow_Guard : constant := 16#1_000#; + + Size : + Natural := Natural (Self_ID.Common.Compiler_Data.Pri_Stack_Info.Size); + + pragma Warnings (On); + -- Address of secondary stack. In the fixed secondary stack case, this + -- value is not modified, causing a warning, hence the bracketing with + -- Warnings (Off/On). + SEH_Table : aliased SSE.Storage_Array (1 .. 8); -- Structured Exception Registration table (2 words) @@ -905,6 +924,43 @@ package body System.Tasking.Stages is pragma Import (C, Install_SEH_Handler, "__gnat_install_SEH_handler"); -- Install the SEH (Structured Exception Handling) handler + Cause : Cause_Of_Termination := Normal; + -- Indicates the reason why this task terminates. Normal corresponds to + -- a task terminating due to completing the last statement of its body, + -- or as a result of waiting on a terminate alternative. If the task + -- terminates because it is being aborted then Cause will be set to + -- Abnormal. If the task terminates because of an exception raised by + -- the execution of its task body, then Cause is set to + -- Unhandled_Exception. + + EO : Exception_Occurrence; + -- If the task terminates because of an exception raised by the + -- execution of its task body, then EO will contain the associated + -- exception occurrence. Otherwise, it will contain Null_Occurrence. + + procedure Search_Fall_Back_Handler (ID : Task_Id); + -- Procedure that searches recursively a fall-back handler through the + -- master relationship. + + procedure Search_Fall_Back_Handler (ID : Task_Id) is + begin + -- If there is a fall back handler, execute it + + if ID.Common.Fall_Back_Handler /= null then + ID.Common.Fall_Back_Handler.all (Cause, Self_ID, EO); + + -- Otherwise look for a fall back handler in the parent + + elsif ID.Common.Parent /= null then + Search_Fall_Back_Handler (ID.Common.Parent); + + -- Otherwise, do nothing + + else + return; + end if; + end Search_Fall_Back_Handler; + begin pragma Assert (Self_ID.Deferral_Level = 1); @@ -912,10 +968,24 @@ package body System.Tasking.Stages is Self_ID.Common.Compiler_Data.Sec_Stack_Addr := Secondary_Stack'Address; SST.SS_Init (Secondary_Stack_Address, Integer (Secondary_Stack'Last)); + Size := Size - Natural (Secondary_Stack_Size); + end if; + + Size := Size - Overflow_Guard; + + if System.Stack_Usage.Is_Enabled then + STPO.Lock_RTS; + Initialize_Analyzer (Self_ID.Common.Analyzer, + Self_ID.Common.Task_Image + (1 .. Self_ID.Common.Task_Image_Len), + Size, + SSE.To_Integer (Bottom_Of_Stack'Address)); + STPO.Unlock_RTS; + Fill_Stack (Self_ID.Common.Analyzer); end if; - -- Set the guard page at the bottom of the stack. The call to - -- unprotect the page is done in Terminate_Task + -- Set the guard page at the bottom of the stack. The call to unprotect + -- the page is done in Terminate_Task Stack_Guard (Self_ID, True); @@ -930,9 +1000,13 @@ package body System.Tasking.Stages is Install_SEH_Handler (SEH_Table'Address); - -- We lock RTS_Lock to wait for activator to finish activating - -- the rest of the chain, so that everyone in the chain comes out - -- in priority order. + -- Initialize exception occurrence + + Save_Occurrence (EO, Ada.Exceptions.Null_Occurrence); + + -- We lock RTS_Lock to wait for activator to finish activating the rest + -- of the chain, so that everyone in the chain comes out in priority + -- order. -- This also protects the value of -- Self_ID.Common.Activator.Common.Wait_Count. @@ -980,6 +1054,17 @@ package body System.Tasking.Stages is when Standard'Abort_Signal => Initialization.Defer_Abort_Nestable (Self_ID); + -- Update the cause that motivated the task termination so that + -- the appropriate information is passed to the task termination + -- procedure. Task termination as a result of waiting on a + -- terminate alternative is a normal termination, although it is + -- implemented using the abort mechanisms. + + if Self_ID.Terminate_Alternative then + Cause := Normal; + else + Cause := Abnormal; + end if; when others => -- ??? Using an E : others here causes CD2C11A to fail on -- DEC Unix, see 7925-005. @@ -998,8 +1083,33 @@ package body System.Tasking.Stages is if Exception_Trace = Unhandled_Raise then Trace_Unhandled_Exception_In_Task (Self_ID); end if; + + -- Update the cause that motivated the task termination so that + -- the appropriate information is passed to the task termination + -- procedure, as well as the associated Exception_Occurrence. + + Cause := Unhandled_Exception; + Save_Occurrence (EO, SSL.Get_Current_Excep.all.all); end; + -- Look for a task termination handler. This code is for all tasks but + -- the environment task. The task termination code for the environment + -- task is executed by SSL.Task_Termination_Handler. + + if Self_ID.Common.Specific_Handler /= null then + Self_ID.Common.Specific_Handler.all (Cause, Self_ID, EO); + else + -- Look for a fall-back handler following the master relationship + -- for the task. + + Search_Fall_Back_Handler (Self_ID); + end if; + + if System.Stack_Usage.Is_Enabled then + Compute_Result (Self_ID.Common.Analyzer); + Report_Result (Self_ID.Common.Analyzer); + end if; + Terminate_Task (Self_ID); end Task_Wrapper; @@ -1021,16 +1131,16 @@ package body System.Tasking.Stages is -- We can't call Destroy_TSD while we are holding any other locks, because -- it locks Global_Task_Lock, and our deadlock prevention rules require -- that to be the outermost lock. Our first "solution" was to just lock - -- Global_Task_Lock in addition to the other locks, and force the parent - -- to also lock this lock between its wakeup and its freeing of the ATCB. - -- See Complete_Task for the parent-side of the code that has the matching + -- Global_Task_Lock in addition to the other locks, and force the parent to + -- also lock this lock between its wakeup and its freeing of the ATCB. See + -- Complete_Task for the parent-side of the code that has the matching -- calls to Task_Lock and Task_Unlock. That was not really a solution, -- since the operation Task_Unlock continued to access the ATCB after - -- unlocking, after which the parent was observed to race ahead, - -- deallocate the ATCB, and then reallocate it to another task. The - -- call to Undefer_Abortion in Task_Unlock by the "terminated" task was - -- overwriting the data of the new task that reused the ATCB! To solve - -- this problem, we introduced the new operation Final_Task_Unlock. + -- unlocking, after which the parent was observed to race ahead, deallocate + -- the ATCB, and then reallocate it to another task. The call to + -- Undefer_Abortion in Task_Unlock by the "terminated" task was overwriting + -- the data of the new task that reused the ATCB! To solve this problem, we + -- introduced the new operation Final_Task_Unlock. procedure Terminate_Task (Self_ID : Task_Id) is Environment_Task : constant Task_Id := STPO.Environment_Task; diff --git a/gcc/ada/s-tasuti.adb b/gcc/ada/s-tasuti.adb index 6721681827e..ee68ebcec7b 100644 --- a/gcc/ada/s-tasuti.adb +++ b/gcc/ada/s-tasuti.adb @@ -117,9 +117,6 @@ package body System.Tasking.Utilities is -- Abort_Tasks -- ----------------- - -- Compiler interface only: Do not call from within the RTS, - - -- except in the implementation of Ada.Task_Identification. -- This must be called to implement the abort statement. -- Much of the actual work of the abort is done by the abortee, -- via the Abort_Handler signal handler, and propagation of the @@ -131,6 +128,17 @@ package body System.Tasking.Utilities is P : Task_Id; begin + -- If pragma Detect_Blocking is active then Program_Error must be + -- raised if this potentially blocking operation is called from a + -- protected action. + + if System.Tasking.Detect_Blocking + and then Self_Id.Common.Protected_Action_Nesting > 0 + then + Ada.Exceptions.Raise_Exception + (Program_Error'Identity, "potentially blocking operation"); + end if; + Initialization.Defer_Abort_Nestable (Self_Id); -- ????? diff --git a/gcc/ada/s-vaflop-vms-alpha.adb b/gcc/ada/s-vaflop-vms-alpha.adb index 5ab772d4477..92e62734ee7 100644 --- a/gcc/ada/s-vaflop-vms-alpha.adb +++ b/gcc/ada/s-vaflop-vms-alpha.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1997-2005 Free Software Foundation, Inc. -- +-- Copyright (C) 1997-2005, Free Software Foundation, Inc. -- -- (Version for Alpha OpenVMS) -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- @@ -58,14 +58,16 @@ package body System.Vax_Float_Operations is -- we define variables of the corresponding IEEE type so that they are -- passed and kept in the proper register class. + Debug_String_Buffer : String (1 .. 32); + -- Buffer used by all Debug_String_x routines for returning result + ------------ -- D_To_G -- ------------ function D_To_G (X : D) return G is A, B : T; - C : G; - + C : G; begin Asm ("ldg %0,%1", T'Asm_Output ("=f", A), D'Asm_Input ("m", X)); Asm ("cvtdg %1,%0", T'Asm_Output ("=f", B), T'Asm_Input ("f", A)); @@ -80,7 +82,6 @@ package body System.Vax_Float_Operations is function F_To_G (X : F) return G is A : T; B : G; - begin Asm ("ldf %0,%1", T'Asm_Output ("=f", A), F'Asm_Input ("m", X)); Asm ("stg %1,%0", G'Asm_Output ("=m", B), T'Asm_Input ("f", A)); @@ -98,6 +99,7 @@ package body System.Vax_Float_Operations is begin -- Because converting to a wider FP format is a no-op, we say -- A is 64-bit even though we are loading 32 bits into it. + Asm ("ldf %0,%1", T'Asm_Output ("=f", A), F'Asm_Input ("m", X)); B := S (Cvt_G_T (A)); @@ -110,8 +112,7 @@ package body System.Vax_Float_Operations is function G_To_D (X : G) return D is A, B : T; - C : D; - + C : D; begin Asm ("ldg %0,%1", T'Asm_Output ("=f", A), G'Asm_Input ("m", X)); Asm ("cvtgd %1,%0", T'Asm_Output ("=f", B), T'Asm_Input ("f", A)); @@ -127,7 +128,6 @@ package body System.Vax_Float_Operations is A : T; B : S; C : F; - begin Asm ("ldg %0,%1", T'Asm_Output ("=f", A), G'Asm_Input ("m", X)); Asm ("cvtgf %1,%0", S'Asm_Output ("=f", B), T'Asm_Input ("f", A)); @@ -142,7 +142,6 @@ package body System.Vax_Float_Operations is function G_To_Q (X : G) return Q is A : T; B : Q; - begin Asm ("ldg %0,%1", T'Asm_Output ("=f", A), G'Asm_Input ("m", X)); Asm ("cvtgq %1,%0", Q'Asm_Output ("=f", B), T'Asm_Input ("f", A)); @@ -155,7 +154,6 @@ package body System.Vax_Float_Operations is function G_To_T (X : G) return T is A, B : T; - begin Asm ("ldg %0,%1", T'Asm_Output ("=f", A), G'Asm_Input ("m", X)); B := Cvt_G_T (A); @@ -178,7 +176,6 @@ package body System.Vax_Float_Operations is function Q_To_F (X : Q) return F is A : S; B : F; - begin Asm ("cvtqf %1,%0", S'Asm_Output ("=f", A), Q'Asm_Input ("f", X)); Asm ("stf %1,%0", F'Asm_Output ("=m", B), S'Asm_Input ("f", A)); @@ -192,7 +189,6 @@ package body System.Vax_Float_Operations is function Q_To_G (X : Q) return G is A : T; B : G; - begin Asm ("cvtqg %1,%0", T'Asm_Output ("=f", A), Q'Asm_Input ("f", X)); Asm ("stg %1,%0", G'Asm_Output ("=m", B), T'Asm_Input ("f", A)); @@ -206,7 +202,6 @@ package body System.Vax_Float_Operations is function S_To_F (X : S) return F is A : S; B : F; - begin A := Cvt_T_F (T (X)); Asm ("stf %1,%0", F'Asm_Output ("=m", B), S'Asm_Input ("f", A)); @@ -229,7 +224,6 @@ package body System.Vax_Float_Operations is function T_To_G (X : T) return G is A : T; B : G; - begin A := Cvt_T_G (X); Asm ("stg %1,%0", G'Asm_Output ("=m", B), T'Asm_Input ("f", A)); @@ -242,8 +236,7 @@ package body System.Vax_Float_Operations is function Abs_F (X : F) return F is A, B : S; - C : F; - + C : F; begin Asm ("ldf %0,%1", S'Asm_Output ("=f", A), F'Asm_Input ("m", X)); Asm ("cpys $f31,%1,%0", S'Asm_Output ("=f", B), S'Asm_Input ("f", A)); @@ -257,8 +250,7 @@ package body System.Vax_Float_Operations is function Abs_G (X : G) return G is A, B : T; - C : G; - + C : G; begin Asm ("ldg %0,%1", T'Asm_Output ("=f", A), G'Asm_Input ("m", X)); Asm ("cpys $f31,%1,%0", T'Asm_Output ("=f", B), T'Asm_Input ("f", A)); @@ -272,8 +264,7 @@ package body System.Vax_Float_Operations is function Add_F (X, Y : F) return F is X1, Y1, R : S; - R1 : F; - + R1 : F; begin Asm ("ldf %0,%1", S'Asm_Output ("=f", X1), F'Asm_Input ("m", X)); Asm ("ldf %0,%1", S'Asm_Output ("=f", Y1), F'Asm_Input ("m", Y)); @@ -289,8 +280,7 @@ package body System.Vax_Float_Operations is function Add_G (X, Y : G) return G is X1, Y1, R : T; - R1 : G; - + R1 : G; begin Asm ("ldg %0,%1", T'Asm_Output ("=f", X1), G'Asm_Input ("m", X)); Asm ("ldg %0,%1", T'Asm_Output ("=f", Y1), G'Asm_Input ("m", Y)); @@ -331,13 +321,9 @@ package body System.Vax_Float_Operations is -- Debug_String_D -- -------------------- - Debug_String_Buffer : String (1 .. 32); - -- Buffer used by all Debug_String_x routines for returning result - function Debug_String_D (Arg : D) return System.Address is - Image_String : constant String := D'Image (Arg) & ASCII.NUL; + Image_String : constant String := D'Image (Arg) & ASCII.NUL; Image_Size : constant Integer := Image_String'Length; - begin Debug_String_Buffer (1 .. Image_Size) := Image_String; return Debug_String_Buffer (1)'Address; @@ -348,9 +334,8 @@ package body System.Vax_Float_Operations is -------------------- function Debug_String_F (Arg : F) return System.Address is - Image_String : constant String := F'Image (Arg) & ASCII.NUL; + Image_String : constant String := F'Image (Arg) & ASCII.NUL; Image_Size : constant Integer := Image_String'Length; - begin Debug_String_Buffer (1 .. Image_Size) := Image_String; return Debug_String_Buffer (1)'Address; @@ -361,9 +346,8 @@ package body System.Vax_Float_Operations is -------------------- function Debug_String_G (Arg : G) return System.Address is - Image_String : constant String := G'Image (Arg) & ASCII.NUL; + Image_String : constant String := G'Image (Arg) & ASCII.NUL; Image_Size : constant Integer := Image_String'Length; - begin Debug_String_Buffer (1 .. Image_Size) := Image_String; return Debug_String_Buffer (1)'Address; @@ -375,8 +359,7 @@ package body System.Vax_Float_Operations is function Div_F (X, Y : F) return F is X1, Y1, R : S; - - R1 : F; + R1 : F; begin Asm ("ldf %0,%1", S'Asm_Output ("=f", X1), F'Asm_Input ("m", X)); Asm ("ldf %0,%1", S'Asm_Output ("=f", Y1), F'Asm_Input ("m", Y)); @@ -392,8 +375,7 @@ package body System.Vax_Float_Operations is function Div_G (X, Y : G) return G is X1, Y1, R : T; - R1 : G; - + R1 : G; begin Asm ("ldg %0,%1", T'Asm_Output ("=f", X1), G'Asm_Input ("m", X)); Asm ("ldg %0,%1", T'Asm_Output ("=f", Y1), G'Asm_Input ("m", Y)); @@ -409,7 +391,6 @@ package body System.Vax_Float_Operations is function Eq_F (X, Y : F) return Boolean is X1, Y1, R : S; - begin Asm ("ldf %0,%1", S'Asm_Output ("=f", X1), F'Asm_Input ("m", X)); Asm ("ldf %0,%1", S'Asm_Output ("=f", Y1), F'Asm_Input ("m", Y)); @@ -424,7 +405,6 @@ package body System.Vax_Float_Operations is function Eq_G (X, Y : G) return Boolean is X1, Y1, R : T; - begin Asm ("ldg %0,%1", T'Asm_Output ("=f", X1), G'Asm_Input ("m", X)); Asm ("ldg %0,%1", T'Asm_Output ("=f", Y1), G'Asm_Input ("m", Y)); @@ -439,7 +419,6 @@ package body System.Vax_Float_Operations is function Le_F (X, Y : F) return Boolean is X1, Y1, R : S; - begin Asm ("ldf %0,%1", S'Asm_Output ("=f", X1), F'Asm_Input ("m", X)); Asm ("ldf %0,%1", S'Asm_Output ("=f", Y1), F'Asm_Input ("m", Y)); @@ -454,7 +433,6 @@ package body System.Vax_Float_Operations is function Le_G (X, Y : G) return Boolean is X1, Y1, R : T; - begin Asm ("ldg %0,%1", T'Asm_Output ("=f", X1), G'Asm_Input ("m", X)); Asm ("ldg %0,%1", T'Asm_Output ("=f", Y1), G'Asm_Input ("m", Y)); @@ -469,7 +447,6 @@ package body System.Vax_Float_Operations is function Lt_F (X, Y : F) return Boolean is X1, Y1, R : S; - begin Asm ("ldf %0,%1", S'Asm_Output ("=f", X1), F'Asm_Input ("m", X)); Asm ("ldf %0,%1", S'Asm_Output ("=f", Y1), F'Asm_Input ("m", Y)); @@ -484,7 +461,6 @@ package body System.Vax_Float_Operations is function Lt_G (X, Y : G) return Boolean is X1, Y1, R : T; - begin Asm ("ldg %0,%1", T'Asm_Output ("=f", X1), G'Asm_Input ("m", X)); Asm ("ldg %0,%1", T'Asm_Output ("=f", Y1), G'Asm_Input ("m", Y)); @@ -499,8 +475,7 @@ package body System.Vax_Float_Operations is function Mul_F (X, Y : F) return F is X1, Y1, R : S; - R1 : F; - + R1 : F; begin Asm ("ldf %0,%1", S'Asm_Output ("=f", X1), F'Asm_Input ("m", X)); Asm ("ldf %0,%1", S'Asm_Output ("=f", Y1), F'Asm_Input ("m", Y)); @@ -516,8 +491,7 @@ package body System.Vax_Float_Operations is function Mul_G (X, Y : G) return G is X1, Y1, R : T; - R1 : G; - + R1 : G; begin Asm ("ldg %0,%1", T'Asm_Output ("=f", X1), G'Asm_Input ("m", X)); Asm ("ldg %0,%1", T'Asm_Output ("=f", Y1), G'Asm_Input ("m", Y)); @@ -527,14 +501,41 @@ package body System.Vax_Float_Operations is return R1; end Mul_G; + ---------- + -- Ne_F -- + ---------- + + function Ne_F (X, Y : F) return Boolean is + X1, Y1, R : S; + begin + Asm ("ldf %0,%1", S'Asm_Output ("=f", X1), F'Asm_Input ("m", X)); + Asm ("ldf %0,%1", S'Asm_Output ("=f", Y1), F'Asm_Input ("m", Y)); + Asm ("cmpgeq %1,%2,%0", S'Asm_Output ("=f", R), + (S'Asm_Input ("f", X1), S'Asm_Input ("f", Y1))); + return R = 0.0; + end Ne_F; + + ---------- + -- Ne_G -- + ---------- + + function Ne_G (X, Y : G) return Boolean is + X1, Y1, R : T; + begin + Asm ("ldg %0,%1", T'Asm_Output ("=f", X1), G'Asm_Input ("m", X)); + Asm ("ldg %0,%1", T'Asm_Output ("=f", Y1), G'Asm_Input ("m", Y)); + Asm ("cmpgeq %1,%2,%0", T'Asm_Output ("=f", R), + (T'Asm_Input ("f", X1), T'Asm_Input ("f", Y1))); + return R = 0.0; + end Ne_G; + ----------- -- Neg_F -- ----------- function Neg_F (X : F) return F is A, B : S; - C : F; - + C : F; begin Asm ("ldf %0,%1", S'Asm_Output ("=f", A), F'Asm_Input ("m", X)); Asm ("cpysn %1,%1,%0", S'Asm_Output ("=f", B), S'Asm_Input ("f", A)); @@ -548,8 +549,7 @@ package body System.Vax_Float_Operations is function Neg_G (X : G) return G is A, B : T; - C : G; - + C : G; begin Asm ("ldg %0,%1", T'Asm_Output ("=f", A), G'Asm_Input ("m", X)); Asm ("cpysn %1,%1,%0", T'Asm_Output ("=f", B), T'Asm_Input ("f", A)); @@ -590,7 +590,7 @@ package body System.Vax_Float_Operations is function Sub_F (X, Y : F) return F is X1, Y1, R : S; - R1 : F; + R1 : F; begin Asm ("ldf %0,%1", S'Asm_Output ("=f", X1), F'Asm_Input ("m", X)); @@ -607,8 +607,7 @@ package body System.Vax_Float_Operations is function Sub_G (X, Y : G) return G is X1, Y1, R : T; - R1 : G; - + R1 : G; begin Asm ("ldg %0,%1", T'Asm_Output ("=f", X1), G'Asm_Input ("m", X)); Asm ("ldg %0,%1", T'Asm_Output ("=f", Y1), G'Asm_Input ("m", Y)); diff --git a/gcc/ada/s-wchcon.ads b/gcc/ada/s-wchcon.ads index f2666458525..b5fdba04bfd 100644 --- a/gcc/ada/s-wchcon.ads +++ b/gcc/ada/s-wchcon.ads @@ -171,7 +171,7 @@ package System.WCh_Con is subtype WC_ESC_Encoding_Method is WC_Encoding_Method range WCEM_Hex .. WCEM_Hex; - -- Encoding methods using an ESC character at the start of the sequence. + -- Encoding methods using an ESC character at the start of the sequence subtype WC_Upper_Half_Encoding_Method is WC_Encoding_Method range WCEM_Upper .. WCEM_UTF8; diff --git a/gcc/ada/scn.adb b/gcc/ada/scn.adb index ce8402d7745..4a6f4f964ec 100644 --- a/gcc/ada/scn.adb +++ b/gcc/ada/scn.adb @@ -26,6 +26,7 @@ with Atree; use Atree; with Csets; use Csets; +with Hostparm; use Hostparm; with Namet; use Namet; with Opt; use Opt; with Restrict; use Restrict; @@ -104,7 +105,7 @@ package body Scn is begin if Style_Check then Style.Check_Line_Terminator (Len); - elsif Len > Opt.Max_Line_Length then + elsif Len > Max_Line_Length then Error_Long_Line; end if; end Check_End_Of_Line; @@ -266,7 +267,7 @@ package body Scn is begin Error_Msg ("this line is too long", - Current_Line_Start + Source_Ptr (Opt.Max_Line_Length)); + Current_Line_Start + Source_Ptr (Max_Line_Length)); end Error_Long_Line; ------------------------ diff --git a/gcc/ada/scng.adb b/gcc/ada/scng.adb index 687c32b11d5..1f1fe156266 100644 --- a/gcc/ada/scng.adb +++ b/gcc/ada/scng.adb @@ -26,6 +26,7 @@ with Csets; use Csets; with Err_Vars; use Err_Vars; +with Hostparm; use Hostparm; with Namet; use Namet; with Opt; use Opt; with Scans; use Scans; @@ -357,13 +358,9 @@ package body Scng is Style.Check_Line_Max_Length (Len); -- If style checking is inactive, check maximum line length against - -- standard value. Note that we take this from Opt.Max_Line_Length - -- rather than Hostparm.Max_Line_Length because we do not want to - -- impose any limit during scanning of configuration pragma files, - -- and Opt.Max_Line_Length (normally set to Hostparm.Max_Line_Length) - -- is reset to Column_Number'Max during scanning of such files. + -- standard value. - elsif Len > Opt.Max_Line_Length then + elsif Len > Max_Line_Length then Error_Long_Line; end if; @@ -423,7 +420,7 @@ package body Scng is begin Error_Msg ("this line is too long", - Current_Line_Start + Source_Ptr (Opt.Max_Line_Length)); + Current_Line_Start + Source_Ptr (Max_Line_Length)); end Error_Long_Line; ------------------------------- diff --git a/gcc/ada/sdefault.ads b/gcc/ada/sdefault.ads index d8e5f06e759..2a6fd4b1fd5 100644 --- a/gcc/ada/sdefault.ads +++ b/gcc/ada/sdefault.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-1999 Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2005, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -24,15 +24,15 @@ -- -- ------------------------------------------------------------------------------ -with Types; use Types; -package Sdefault is +-- This package contains functions that return the default values for the +-- include and object file directories, target name, default library +-- subdirectory (libsubdir) prefix, and the target OS. - -- This package contains functions that return the default values for - -- the include and object file directories, target name, and the default - -- library subdirectory (libsubdir) prefix. +with Types; use Types; +package Sdefault is function Include_Dir_Default_Name return String_Ptr; - function Object_Dir_Default_Name return String_Ptr; - function Target_Name return String_Ptr; - function Search_Dir_Prefix return String_Ptr; + function Object_Dir_Default_Name return String_Ptr; + function Target_Name return String_Ptr; + function Search_Dir_Prefix return String_Ptr; end Sdefault; diff --git a/gcc/ada/sem_aggr.adb b/gcc/ada/sem_aggr.adb index b67a6a85fcb..8890ffc43dc 100644 --- a/gcc/ada/sem_aggr.adb +++ b/gcc/ada/sem_aggr.adb @@ -29,6 +29,7 @@ with Checks; use Checks; with Einfo; use Einfo; with Elists; use Elists; with Errout; use Errout; +with Exp_Tss; use Exp_Tss; with Exp_Util; use Exp_Util; with Freeze; use Freeze; with Itypes; use Itypes; @@ -2984,11 +2985,15 @@ package body Sem_Aggr is Component := Node (Component_Elmt); Expr := Get_Value (Component, Component_Associations (N), True); - -- Ada 2005 (AI-287): Default initialized limited component are - -- passed to the expander, that will generate calls to the - -- corresponding IP. + -- Ada 2005 (AI-287): Although the default initialization by means + -- of the mbox was initially added to Ada 2005 for limited types, it + -- is not constrained to limited types. Therefore if the component + -- has some initialization procedure (IP) we pass the component to + -- the expander, which will generate the call to such IP. - if Mbox_Present and then Is_Limited_Type (Etype (Component)) then + if Mbox_Present + and then Has_Non_Null_Base_Init_Proc (Etype (Component)) + then Add_Association (Component => Component, Expr => Empty, diff --git a/gcc/ada/sem_cat.adb b/gcc/ada/sem_cat.adb index db7594cf3b8..d650184913c 100644 --- a/gcc/ada/sem_cat.adb +++ b/gcc/ada/sem_cat.adb @@ -1188,6 +1188,7 @@ package body Sem_Cat is Param_Spec : Node_Id; Param_Type : Entity_Id; Base_Param_Type : Entity_Id; + Base_Under_Type : Entity_Id; Type_Decl : Node_Id; Error_Node : Node_Id := N; @@ -1257,32 +1258,69 @@ package body Sem_Cat is and then not (Has_Private_Declaration (Param_Type)) and then Comes_From_Source (N))) then - -- A limited parameter is legal only if user-specified - -- Read and Write attributes exist for it. - -- second part of RM E.2.3 (14) + -- A limited parameter is legal only if user-specified Read and + -- Write attributes exist for it. Second part of RM E.2.3 (14). if No (Full_View (Param_Type)) and then Ekind (Param_Type) /= E_Record_Type then - -- Type does not have completion yet, so if declared in - -- in the current RCI scope it is illegal, and will be - -- flagged subsequently. + -- Type does not have completion yet, so if declared in in + -- the current RCI scope it is illegal, and will be flagged + -- subsequently. + return; end if; - Base_Param_Type := Base_Type (Underlying_Type (Param_Type)); - - if No (TSS (Base_Param_Type, TSS_Stream_Read)) - or else - No (TSS (Base_Param_Type, TSS_Stream_Write)) + -- In Ada 95 the rules permit using a limited type that has + -- user-specified Read and Write attributes that are specified + -- in the private part of the package, whereas Ada 2005 + -- (AI-240) revises this to require the attributes to be + -- "available" (implying that the attribute clauses must be + -- visible to the RCI client). The Ada 95 rules violate the + -- contract model for privacy, but we support both semantics + -- for now for compatibility (note that ACATS test BXE2009 + -- checks a case that conforms to the Ada 95 rules but is + -- illegal in Ada 2005). + + Base_Param_Type := Base_Type (Param_Type); + Base_Under_Type := Base_Type (Underlying_Type + (Base_Param_Type)); + + if (Ada_Version < Ada_05 + and then + (No (TSS (Base_Param_Type, TSS_Stream_Read)) + or else + No (TSS (Base_Param_Type, TSS_Stream_Write))) + and then + (No (TSS (Base_Under_Type, TSS_Stream_Read)) + or else + No (TSS (Base_Under_Type, TSS_Stream_Write)))) + or else + (Ada_Version >= Ada_05 + and then + (No (TSS (Base_Param_Type, TSS_Stream_Read)) + or else + No (TSS (Base_Param_Type, TSS_Stream_Write)) + or else + Is_Hidden (TSS (Base_Param_Type, TSS_Stream_Read)) + or else + Is_Hidden (TSS (Base_Param_Type, TSS_Stream_Write)))) then if K = N_Subprogram_Declaration then Error_Node := Param_Spec; end if; - Error_Msg_N - ("limited parameter in rci unit " - & "must have read/write attributes ", Error_Node); + if Ada_Version >= Ada_05 then + Error_Msg_N + ("limited parameter in rci unit " + & "must have visible read/write attributes ", + Error_Node); + else + Error_Msg_N + ("limited parameter in rci unit " + & "must have read/write attributes ", + Error_Node); + end if; Explain_Limited_Type (Param_Type, Error_Node); end if; end if; diff --git a/gcc/ada/sem_ch10.adb b/gcc/ada/sem_ch10.adb index 838e82256e7..167d088b3e9 100644 --- a/gcc/ada/sem_ch10.adb +++ b/gcc/ada/sem_ch10.adb @@ -777,7 +777,7 @@ package body Sem_Ch10 is declare Save_Style_Check : constant Boolean := Style_Check; Save_Warning : constant Warning_Mode_Type := Warning_Mode; - Options : Style_Check_Options; + Options : Style_Check_Options; begin Save_Style_Check_Options (Options); diff --git a/gcc/ada/sem_ch12.adb b/gcc/ada/sem_ch12.adb index 470f5ed237c..5e8e6dc1d9d 100644 --- a/gcc/ada/sem_ch12.adb +++ b/gcc/ada/sem_ch12.adb @@ -8090,16 +8090,22 @@ package body Sem_Ch12 is begin return (Base_Type (T) = Base_Type (Act_T) --- why is the and then commented out here??? --- and then Is_Constrained (T) = Is_Constrained (Act_T) and then Subtypes_Statically_Match (T, Act_T)) or else (Is_Class_Wide_Type (Gen_T) and then Is_Class_Wide_Type (Act_T) and then - Subtypes_Match ( - Get_Instance_Of (Root_Type (Gen_T)), - Root_Type (Act_T))); + Subtypes_Match + (Get_Instance_Of (Root_Type (Gen_T)), + Root_Type (Act_T))) + + or else + ((Ekind (Gen_T) = E_Anonymous_Access_Subprogram_Type + or else Ekind (Gen_T) = E_Anonymous_Access_Type) + and then Ekind (Act_T) = Ekind (Gen_T) + and then + Subtypes_Statically_Match + (Designated_Type (Gen_T), Designated_Type (Act_T))); end Subtypes_Match; ----------------------------------------- diff --git a/gcc/ada/sem_ch13.adb b/gcc/ada/sem_ch13.adb index c1586603857..a1e0dffe4d4 100644 --- a/gcc/ada/sem_ch13.adb +++ b/gcc/ada/sem_ch13.adb @@ -1731,6 +1731,9 @@ package body Sem_Ch13 is Ccount : Natural := 0; -- Number of component clauses in record rep clause + CR_Pragma : Node_Id := Empty; + -- Points to N_Pragma node if Complete_Representation pragma present + begin Find_Type (Ident); Rectype := Entity (Ident); @@ -1893,11 +1896,17 @@ package body Sem_Ch13 is while Present (CC) loop - -- If pragma, just analyze it + -- Pragma if Nkind (CC) = N_Pragma then Analyze (CC); + -- The only pragma of interest is Complete_Representation + + if Chars (CC) = Name_Complete_Representation then + CR_Pragma := CC; + end if; + -- Processing for real component clause else @@ -2271,9 +2280,7 @@ package body Sem_Ch13 is if Ekind (Comp) = E_Component or else Ekind (Comp) = E_Discriminant then - if No (Component_Clause (Comp)) then - return; - end if; + exit when No (Component_Clause (Comp)); end if; Next_Entity (Comp); @@ -2282,7 +2289,28 @@ package body Sem_Ch13 is -- If we fall out of loop, all components have component clauses -- and so we can set the size to the maximum value. - Set_RM_Size (Rectype, Hbit + 1); + if No (Comp) then + Set_RM_Size (Rectype, Hbit + 1); + end if; + end if; + + -- Check missing components if Complete_Representation pragma appeared + + if Present (CR_Pragma) then + Comp := First_Entity (Rectype); + while Present (Comp) loop + if Ekind (Comp) = E_Component + or else + Ekind (Comp) = E_Discriminant + then + if No (Component_Clause (Comp)) then + Error_Msg_NE + ("missing component clause for &", CR_Pragma, Comp); + end if; + end if; + + Next_Entity (Comp); + end loop; end if; end Analyze_Record_Representation_Clause; @@ -2571,7 +2599,6 @@ package body Sem_Ch13 is Check_Expr_Constants (Prefix (Nod)); when N_Attribute_Reference => - if Attribute_Name (Nod) = Name_Address or else Attribute_Name (Nod) = Name_Access diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb index a799427e013..d2442b44bad 100644 --- a/gcc/ada/sem_ch3.adb +++ b/gcc/ada/sem_ch3.adb @@ -65,6 +65,7 @@ with Sem_Warn; use Sem_Warn; with Stand; use Stand; with Sinfo; use Sinfo; with Snames; use Snames; +with Targparm; use Targparm; with Tbuild; use Tbuild; with Ttypes; use Ttypes; with Uintp; use Uintp; @@ -1416,6 +1417,7 @@ package body Sem_Ch3 is elsif not Is_Derived_Type (Current_Scope) and then not Is_Limited_Record (Current_Scope) + and then not Is_Concurrent_Type (Current_Scope) then Error_Msg_N ("nonlimited tagged type cannot have limited components", N); @@ -2654,6 +2656,15 @@ package body Sem_Ch3 is end if; Build_Derived_Record_Type (N, Parent_Type, T); + + if Limited_Present (N) then + Set_Is_Limited_Record (T); + + if not Is_Limited_Type (Parent_Type) then + Error_Msg_NE ("parent type& of limited extension must be limited", + N, Parent_Type); + end if; + end if; end Analyze_Private_Extension_Declaration; --------------------------------- @@ -5703,8 +5714,12 @@ package body Sem_Ch3 is -- are only specified for limited records. For completeness, these -- flags are also initialized along with all the other flags below. + -- AI-419: limitedness is not inherited from an interface parent + Set_Is_Tagged_Type (Derived_Type, Is_Tagged); - Set_Is_Limited_Record (Derived_Type, Is_Limited_Record (Parent_Type)); + Set_Is_Limited_Record (Derived_Type, + Is_Limited_Record (Parent_Type) + and then not Is_Interface (Parent_Type)); -- STEP 2a: process discriminants of derived type if any @@ -5887,7 +5902,9 @@ package body Sem_Ch3 is Set_Is_Limited_Composite (Derived_Type, Is_Limited_Composite (Parent_Type)); Set_Is_Limited_Record - (Derived_Type, Is_Limited_Record (Parent_Type)); + (Derived_Type, + Is_Limited_Record (Parent_Type) + and then not Is_Interface (Parent_Type)); Set_Is_Private_Composite (Derived_Type, Is_Private_Composite (Parent_Type)); @@ -7646,7 +7663,7 @@ package body Sem_Ch3 is end if; end Add_Interface; - -- Start of processing for Add_Interface + -- Start of processing for Collect_Interfaces begin pragma Assert (False @@ -7682,29 +7699,6 @@ package body Sem_Ch3 is Next (Intf); end loop; - - -- A type extension may be written as a derivation from an interface. - -- The completion will have to implement the same, or derive from a - -- type that implements it as well. - - elsif Nkind (N) = N_Private_Extension_Declaration - and then Is_Interface (Etype (Derived_Type)) - then - Add_Interface (Etype (Derived_Type)); - end if; - - -- Same for task and protected types, that can derive directly from - -- an interface (and implement additional interfaces that will be - -- present in the interface list of the declaration). - - if Nkind (N) = N_Task_Type_Declaration - or else Nkind (N) = N_Protected_Type_Declaration - or else Nkind (N) = N_Single_Protected_Declaration - or else Nkind (N) = N_Single_Task_Declaration - then - if Is_Interface (Etype (Derived_Type)) then - Add_Interface (Etype (Derived_Type)); - end if; end if; end Collect_Interfaces; @@ -9719,24 +9713,42 @@ package body Sem_Ch3 is New_Compon : constant Entity_Id := New_Copy (Old_Compon); begin - -- Set the parent so we have a proper link for freezing etc. This - -- is not a real parent pointer, since of course our parent does - -- not own up to us and reference us, we are an illegitimate - -- child of the original parent! + -- Set the parent so we have a proper link for freezing etc. This is + -- not a real parent pointer, since of course our parent does not own + -- up to us and reference us, we are an illegitimate child of the + -- original parent! Set_Parent (New_Compon, Parent (Old_Compon)); + -- If the old component's Esize was already determined and is a + -- static value, then the new component simply inherits it. Otherwise + -- the old component's size may require run-time determination, but + -- the new component's size still might be statically determinable + -- (if, for example it has a static constraint). In that case we want + -- Layout_Type to recompute the component's size, so we reset its + -- size and positional fields. + + if Frontend_Layout_On_Target + and then not Known_Static_Esize (Old_Compon) + then + Set_Esize (New_Compon, Uint_0); + Init_Normalized_First_Bit (New_Compon); + Init_Normalized_Position (New_Compon); + Init_Normalized_Position_Max (New_Compon); + end if; + -- We do not want this node marked as Comes_From_Source, since - -- otherwise it would get first class status and a separate - -- cross-reference line would be generated. Illegitimate - -- children do not rate such recognition. + -- otherwise it would get first class status and a separate cross- + -- reference line would be generated. Illegitimate children do not + -- rate such recognition. Set_Comes_From_Source (New_Compon, False); - -- But it is a real entity, and a birth certificate must be - -- properly registered by entering it into the entity list. + -- But it is a real entity, and a birth certificate must be properly + -- registered by entering it into the entity list. Enter_Name (New_Compon); + return New_Compon; end Create_Component; @@ -10749,6 +10761,13 @@ package body Sem_Ch3 is if not Is_Interface (T) then Error_Msg_NE ("(Ada 2005) & must be an interface", Intf, T); + + elsif Limited_Present (Def) + and then not Is_Limited_Interface (T) + then + Error_Msg_NE + ("progenitor interface& of limited type must be limited", + N, T); end if; Next (Intf); @@ -10782,6 +10801,100 @@ package body Sem_Ch3 is return; end if; + -- Ada 2005 (AI-251): The case in which the parent of the full-view is + -- an interface is special because the list of interfaces in the full + -- view can be given in any order. For example: + + -- type A is interface; + -- type B is interface and A; + -- type D is new B with private; + -- private + -- type D is new A and B with null record; -- 1 -- + + -- In this case we perform the following transformation of -1-: + + -- type D is new B and A with null record; + + -- If the parent of the full-view covers the parent of the partial-view + -- we have two possible cases: + + -- 1) They have the same parent + -- 2) The parent of the full-view implements some further interfaces + + -- In both cases we do not need to perform the transformation. In the + -- first case the source program is correct and the transformation is + -- not needed; in the second case the source program does not fulfill + -- the no-hidden interfaces rule (AI-396) and the error will be reported + -- later. + + -- This transformation not only simplifies the rest of the analysis of + -- this type declaration but also simplifies the correct generation of + -- the object layout to the expander. + + if In_Private_Part (Current_Scope) + and then Is_Interface (Parent_Type) + then + declare + Iface : Node_Id; + Partial_View : Entity_Id; + Partial_View_Parent : Entity_Id; + New_Iface : Node_Id; + + begin + -- Look for the associated private type declaration + + Partial_View := First_Entity (Current_Scope); + loop + exit when not Present (Partial_View) + or else (Has_Private_Declaration (Partial_View) + and then Full_View (Partial_View) = T); + + Next_Entity (Partial_View); + end loop; + + -- If the partial view was not found then the source code has + -- errors and the transformation is not needed. + + if Present (Partial_View) then + Partial_View_Parent := Etype (Partial_View); + + -- If the parent of the full-view covers the parent of the + -- partial-view we have nothing else to do. + + if Interface_Present_In_Ancestor + (Parent_Type, Partial_View_Parent) + then + null; + + -- Traverse the list of interfaces of the full-view to look + -- for the parent of the partial-view and perform the tree + -- transformation. + + else + Iface := First (Interface_List (Def)); + while Present (Iface) loop + if Etype (Iface) = Etype (Partial_View) then + Rewrite (Subtype_Indication (Def), + New_Copy (Subtype_Indication + (Parent (Partial_View)))); + + New_Iface := Make_Identifier (Sloc (N), + Chars (Parent_Type)); + Append (New_Iface, Interface_List (Def)); + + -- Analyze the transformed code + + Derived_Type_Declaration (T, N, Is_Completion); + return; + end if; + + Next (Iface); + end loop; + end if; + end if; + end; + end if; + -- Only composite types other than array types are allowed to have -- discriminants. @@ -10905,6 +11018,20 @@ package body Sem_Ch3 is end if; Build_Derived_Type (N, Parent_Type, T, Is_Completion); + + -- AI-419: the parent type of an explicitly limited derived type must + -- be limited. Interface progenitors were checked earlier. + + if Limited_Present (Def) then + Set_Is_Limited_Record (T); + + if not Is_Limited_Type (Parent_Type) + and then not Is_Interface (Parent_Type) + then + Error_Msg_NE ("parent type& of limited type must be limited", + N, Parent_Type); + end if; + end if; end Derived_Type_Declaration; ---------------------------------- @@ -13186,36 +13313,136 @@ package body Sem_Ch3 is Full_Parent : Entity_Id; Full_Indic : Node_Id; - function Find_Ancestor_Interface - (Typ : Entity_Id) return Entity_Id; - -- Find an implemented interface in the derivation chain of Typ + procedure Collect_Implemented_Interfaces + (Typ : Entity_Id; + Ifaces : Elist_Id); + -- Ada 2005: Gather all the interfaces that Typ directly or + -- inherently implements. Duplicate entries are not added to + -- the list Ifaces. + + function Contain_Interface + (Iface : Entity_Id; + Ifaces : Elist_Id) return Boolean; + -- Ada 2005: Determine whether Iface is present in the list Ifaces + + function Find_Hidden_Interface + (Src : Elist_Id; + Dest : Elist_Id) return Entity_Id; + -- Ada 2005: Determine whether the interfaces in list Src are all + -- present in the list Dest. Return the first differing interface, + -- or Empty otherwise. - ----------------------------- - -- Find_Ancestor_Interface -- - ----------------------------- + ------------------------------------ + -- Collect_Implemented_Interfaces -- + ------------------------------------ - function Find_Ancestor_Interface - (Typ : Entity_Id) return Entity_Id + procedure Collect_Implemented_Interfaces + (Typ : Entity_Id; + Ifaces : Elist_Id) is - T : Entity_Id; + Iface : Entity_Id; + Iface_Elmt : Elmt_Id; begin - T := Typ; - while T /= Etype (T) loop - if Is_Interface (Etype (T)) then - return Etype (T); - end if; + -- Implementations of the form: + -- type Typ is new Iface ... - T := Etype (T); + if Is_Interface (Etype (Typ)) + and then not Contain_Interface (Etype (Typ), Ifaces) + then + Append_Elmt (Etype (Typ), Ifaces); + end if; - -- Protect us against erroneous code that has a large - -- chain of circularity dependencies + -- Implementations of the form: + -- type Typ is ... and Iface ... - exit when T = Typ; - end loop; + if Present (Abstract_Interfaces (Typ)) then + Iface_Elmt := First_Elmt (Abstract_Interfaces (Typ)); + while Present (Iface_Elmt) loop + Iface := Node (Iface_Elmt); + + if Is_Interface (Iface) + and then not Contain_Interface (Iface, Ifaces) + then + Append_Elmt (Iface, Ifaces); + end if; + + Next_Elmt (Iface_Elmt); + end loop; + end if; + + -- Implementations of the form: + -- type Typ is new Parent_Typ and ... + + if Ekind (Typ) = E_Record_Type + and then Present (Parent_Subtype (Typ)) + then + Collect_Implemented_Interfaces (Parent_Subtype (Typ), Ifaces); + + -- Implementations of the form: + -- type Typ is ... with private; + + elsif Ekind (Typ) = E_Record_Type_With_Private + and then Present (Full_View (Typ)) + and then Etype (Typ) /= Full_View (Typ) + and then Etype (Typ) /= Typ + then + Collect_Implemented_Interfaces (Etype (Typ), Ifaces); + end if; + end Collect_Implemented_Interfaces; + + ----------------------- + -- Contain_Interface -- + ----------------------- + + function Contain_Interface + (Iface : Entity_Id; + Ifaces : Elist_Id) return Boolean + is + Iface_Elmt : Elmt_Id; + + begin + if Present (Ifaces) then + Iface_Elmt := First_Elmt (Ifaces); + while Present (Iface_Elmt) loop + if Node (Iface_Elmt) = Iface then + return True; + end if; + + Next_Elmt (Iface_Elmt); + end loop; + end if; + + return False; + end Contain_Interface; + + --------------------------- + -- Find_Hidden_Interface -- + --------------------------- + + function Find_Hidden_Interface + (Src : Elist_Id; + Dest : Elist_Id) return Entity_Id + is + Iface : Entity_Id; + Iface_Elmt : Elmt_Id; + + begin + if Present (Src) and then Present (Dest) then + Iface_Elmt := First_Elmt (Src); + while Present (Iface_Elmt) loop + Iface := Node (Iface_Elmt); + + if not Contain_Interface (Iface, Dest) then + return Iface; + end if; + + Next_Elmt (Iface_Elmt); + end loop; + end if; return Empty; - end Find_Ancestor_Interface; + end Find_Hidden_Interface; -- Start of processing for Process_Full_View @@ -13255,49 +13482,28 @@ package body Sem_Ch3 is Error_Msg_N ("generic type cannot have a completion", Full_T); end if; - -- Ada 2005 (AI-396): A full view shall be a descendant of an - -- interface type if and only if the corresponding partial view - -- (if any) is also a descendant of the interface type, or if - -- the partial view is untagged. - if Ada_Version >= Ada_05 + and then Is_Tagged_Type (Priv_T) and then Is_Tagged_Type (Full_T) then declare - Iface : Entity_Id; - Iface_Def : Node_Id; + Iface : Entity_Id; + Priv_T_Ifaces : constant Elist_Id := New_Elmt_List; + Full_T_Ifaces : constant Elist_Id := New_Elmt_List; begin - Iface := Find_Ancestor_Interface (Full_T); - - if Present (Iface) then - Iface_Def := Type_Definition (Parent (Iface)); - - -- The full view derives from an interface descendant, but the - -- partial view does not share the same tagged type. + Collect_Implemented_Interfaces (Priv_T, Priv_T_Ifaces); + Collect_Implemented_Interfaces (Full_T, Full_T_Ifaces); - if Is_Tagged_Type (Priv_T) - and then Etype (Priv_T) /= Etype (Full_T) - and then Etype (Priv_T) /= Iface - then - Error_Msg_N ("(Ada 2005) tagged partial view cannot be " & - "completed by a type that implements an " & - "interface", Priv_T); - end if; + -- Ada 2005 (AI-396): The partial view shall be a descendant of + -- an interface type if and only if the full view is a descendant + -- of the interface type. - -- The full view derives from a limited, protected, - -- synchronized or task interface descendant, but the - -- partial view is not labeled as limited. + Iface := Find_Hidden_Interface (Full_T_Ifaces, Priv_T_Ifaces); - if (Limited_Present (Iface_Def) - or else Protected_Present (Iface_Def) - or else Synchronized_Present (Iface_Def) - or else Task_Present (Iface_Def)) - and then not Limited_Present (Parent (Priv_T)) - then - Error_Msg_N ("(Ada 2005) non-limited private type cannot be " - & "completed by a limited type", Priv_T); - end if; + if Present (Iface) then + Error_Msg_NE ("interface & not implemented by partial view " & + "('R'M'-2005 7.3(9))", Full_T, Iface); end if; end; end if; @@ -13328,6 +13534,15 @@ package body Sem_Ch3 is if Priv_Parent = Any_Type or else Full_Parent = Any_Type then return; + -- Ada 2005 (AI-251): Interfaces in the full-typ can be given in + -- any order. Therefore we don't have to check that its parent must + -- be a descendant of the parent of the private type declaration. + + elsif Is_Interface (Priv_Parent) + and then Is_Interface (Full_Parent) + then + null; + elsif not Is_Ancestor (Base_Type (Priv_Parent), Full_Parent) then Error_Msg_N ("parent of full type must descend from parent" @@ -13428,6 +13643,23 @@ package body Sem_Ch3 is end if; end if; + -- AI-419: verify that the use of "limited" is consistent + + declare + Orig_Decl : constant Node_Id := Original_Node (N); + begin + if Nkind (Parent (Priv_T)) = N_Private_Extension_Declaration + and then not Limited_Present (Parent (Priv_T)) + and then Nkind (Orig_Decl) = N_Full_Type_Declaration + and then Nkind + (Type_Definition (Orig_Decl)) = N_Derived_Type_Definition + and then Limited_Present (Type_Definition (Orig_Decl)) + then + Error_Msg_N + ("full view of non-limited extension cannot be limited", N); + end if; + end; + -- Ada 2005 AI-363: if the full view has discriminants with -- defaults, it is illegal to declare constrained access subtypes -- whose designated type is the current type. This allows objects @@ -14072,8 +14304,7 @@ package body Sem_Ch3 is if Nkind (Parent (S)) /= N_Access_To_Object_Definition and then not (Nkind (Parent (S)) = N_Subtype_Declaration - and then - Is_Itype (Defining_Identifier (Parent (S)))) + and then Is_Itype (Defining_Identifier (Parent (S)))) then Check_Incomplete (Subtype_Mark (S)); end if; diff --git a/gcc/ada/sem_ch4.adb b/gcc/ada/sem_ch4.adb index e1aa6b863b2..c35b3a74313 100644 --- a/gcc/ada/sem_ch4.adb +++ b/gcc/ada/sem_ch4.adb @@ -4379,9 +4379,9 @@ package body Sem_Ch4 is -- If either operand is a junk operand (e.g. package name), then -- post appropriate error messages, but do not complain further. - -- Note that the use of OR in this test instead of OR ELSE - -- is quite deliberate, we may as well check both operands - -- in the binary operator case. + -- Note that the use of OR in this test instead of OR ELSE is + -- quite deliberate, we may as well check both operands in the + -- binary operator case. elsif Junk_Operand (R) or (Nkind (N) in N_Binary_Op and then Junk_Operand (L)) @@ -4389,10 +4389,10 @@ package body Sem_Ch4 is return; -- If we have a logical operator, one of whose operands is - -- Boolean, then we know that the other operand cannot resolve - -- to Boolean (since we got no interpretations), but in that - -- case we pretty much know that the other operand should be - -- Boolean, so resolve it that way (generating an error) + -- Boolean, then we know that the other operand cannot resolve to + -- Boolean (since we got no interpretations), but in that case we + -- pretty much know that the other operand should be Boolean, so + -- resolve it that way (generating an error) elsif Nkind (N) = N_Op_And or else @@ -4476,10 +4476,10 @@ package body Sem_Ch4 is return; end if; - -- If we fall through then just give general message. Note - -- that in the following messages, if the operand is overloaded - -- we choose an arbitrary type to complain about, but that is - -- probably more useful than not giving a type at all. + -- If we fall through then just give general message. Note that in + -- the following messages, if the operand is overloaded we choose + -- an arbitrary type to complain about, but that is probably more + -- useful than not giving a type at all. if Nkind (N) in N_Unary_Op then Error_Msg_Node_2 := Etype (R); @@ -4543,23 +4543,21 @@ package body Sem_Ch4 is It : Interp; Abstract_Op : Entity_Id := Empty; - -- AI-310: If overloaded, remove abstract non-dispatching - -- operations. We activate this if either extensions are - -- enabled, or if the abstract operation in question comes - -- from a predefined file. This latter test allows us to - -- use abstract to make operations invisible to users. In - -- particular, if type Address is non-private and abstract - -- subprograms are used to hide its operators, they will be - -- truly hidden. + -- AI-310: If overloaded, remove abstract non-dispatching operations. We + -- activate this if either extensions are enabled, or if the abstract + -- operation in question comes from a predefined file. This latter test + -- allows us to use abstract to make operations invisible to users. In + -- particular, if type Address is non-private and abstract subprograms + -- are used to hide its operators, they will be truly hidden. type Operand_Position is (First_Op, Second_Op); Univ_Type : constant Entity_Id := Universal_Interpretation (N); procedure Remove_Address_Interpretations (Op : Operand_Position); - -- Ambiguities may arise when the operands are literal and the - -- address operations in s-auxdec are visible. In that case, remove - -- the interpretation of a literal as Address, to retain the semantics - -- of Address as a private type. + -- Ambiguities may arise when the operands are literal and the address + -- operations in s-auxdec are visible. In that case, remove the + -- interpretation of a literal as Address, to retain the semantics of + -- Address as a private type. ------------------------------------ -- Remove_Address_Interpretations -- @@ -4627,10 +4625,11 @@ package body Sem_Ch4 is Present (Universal_Interpretation (Left_Opnd (N))); begin - if U1 and then not U2 then + if U1 then Remove_Address_Interpretations (Second_Op); + end if; - elsif U2 and then not U1 then + if U2 then Remove_Address_Interpretations (First_Op); end if; @@ -4655,15 +4654,17 @@ package body Sem_Ch4 is and then Present (Univ_Type) then -- If both operands have a universal interpretation, - -- select the predefined operator and discard others. + -- it is still necessary to remove interpretations that + -- yield Address. Any remaining ambiguities will be + -- removed in Disambiguate. Get_First_Interp (N, I, It); while Present (It.Nam) loop - if Scope (It.Nam) = Standard_Standard then - Set_Etype (N, Univ_Type); + if Is_Descendent_Of_Address (It.Typ) then + Remove_Interp (I); + + elsif not Is_Type (It.Nam) then Set_Entity (N, It.Nam); - Set_Is_Overloaded (N, False); - exit; end if; Get_Next_Interp (I, It); @@ -4690,10 +4691,11 @@ package body Sem_Ch4 is Present (Universal_Interpretation (Next (Arg1))); begin - if U1 and then not U2 then + if U1 then Remove_Address_Interpretations (First_Op); + end if; - elsif U2 and then not U1 then + if U2 then Remove_Address_Interpretations (Second_Op); end if; diff --git a/gcc/ada/sem_ch6.adb b/gcc/ada/sem_ch6.adb index dae06218468..b6c262b5ad4 100644 --- a/gcc/ada/sem_ch6.adb +++ b/gcc/ada/sem_ch6.adb @@ -955,7 +955,7 @@ package body Sem_Ch6 is end if; else - -- Create a subprogram declaration, to make treatment uniform. + -- Create a subprogram declaration, to make treatment uniform declare Subp : constant Entity_Id := @@ -1449,14 +1449,13 @@ package body Sem_Ch6 is if Present (Spec_Id) then - -- If a parent unit is categorized, the context of a subunit must - -- conform to the categorization. Conversely, if a child unit is - -- categorized, the parents themselves must conform. + -- We must conform to the categorization of our spec - if Nkind (Parent (N)) = N_Subunit then - Validate_Categorization_Dependency (N, Spec_Id); + Validate_Categorization_Dependency (N, Spec_Id); - elsif Is_Child_Unit (Spec_Id) then + -- And if this is a child unit, the parent units must conform + + if Is_Child_Unit (Spec_Id) then Validate_Categorization_Dependency (Unit_Declaration_Node (Spec_Id), Spec_Id); end if; diff --git a/gcc/ada/sem_ch8.adb b/gcc/ada/sem_ch8.adb index a0b0f38e603..9af04a761da 100644 --- a/gcc/ada/sem_ch8.adb +++ b/gcc/ada/sem_ch8.adb @@ -4684,7 +4684,13 @@ package body Sem_Ch8 is -- Case of tagged type else - C := Class_Wide_Type (Entity (Prefix (N))); + if Is_Concurrent_Type (T) then + C := Class_Wide_Type + (Corresponding_Record_Type (Entity (Prefix (N)))); + else + C := Class_Wide_Type (Entity (Prefix (N))); + end if; + Set_Entity_With_Style_Check (N, C); Generate_Reference (C, N); Set_Etype (N, C); diff --git a/gcc/ada/sem_ch9.adb b/gcc/ada/sem_ch9.adb index c49bed34cbf..dc34ada80d8 100644 --- a/gcc/ada/sem_ch9.adb +++ b/gcc/ada/sem_ch9.adb @@ -525,6 +525,7 @@ package body Sem_Ch9 is procedure Analyze_Delay_Alternative (N : Node_Id) is Expr : Node_Id; + Typ : Entity_Id; begin Tasking_Used := True; @@ -549,9 +550,11 @@ package body Sem_Ch9 is Pre_Analyze_And_Resolve (Expr); end if; + Typ := First_Subtype (Etype (Expr)); + if Nkind (Delay_Statement (N)) = N_Delay_Until_Statement - and then not Is_RTE (Base_Type (Etype (Expr)), RO_CA_Time) - and then not Is_RTE (Base_Type (Etype (Expr)), RO_RT_Time) + and then not Is_RTE (Typ, RO_CA_Time) + and then not Is_RTE (Typ, RO_RT_Time) then Error_Msg_N ("expect Time types for `DELAY UNTIL`", Expr); end if; @@ -592,16 +595,18 @@ package body Sem_Ch9 is ------------------------- procedure Analyze_Delay_Until (N : Node_Id) is - E : constant Node_Id := Expression (N); + E : constant Node_Id := Expression (N); + Typ : Entity_Id; begin Tasking_Used := True; Check_Restriction (No_Delay, N); Check_Potentially_Blocking_Operation (N); Analyze (E); + Typ := First_Subtype (Etype (E)); - if not Is_RTE (Base_Type (Etype (E)), RO_CA_Time) and then - not Is_RTE (Base_Type (Etype (E)), RO_RT_Time) + if not Is_RTE (Typ, RO_CA_Time) and then + not Is_RTE (Typ, RO_RT_Time) then Error_Msg_N ("expect Time types for `DELAY UNTIL`", E); end if; diff --git a/gcc/ada/sem_eval.adb b/gcc/ada/sem_eval.adb index d99e042dd5c..3e354ec1b4d 100644 --- a/gcc/ada/sem_eval.adb +++ b/gcc/ada/sem_eval.adb @@ -38,6 +38,7 @@ with Nlists; use Nlists; with Opt; use Opt; with Sem; use Sem; with Sem_Cat; use Sem_Cat; +with Sem_Ch6; use Sem_Ch6; with Sem_Ch8; use Sem_Ch8; with Sem_Res; use Sem_Res; with Sem_Util; use Sem_Util; @@ -4056,9 +4057,21 @@ package body Sem_Eval is end; elsif Is_Access_Type (T1) then - return Subtypes_Statically_Match - (Designated_Type (T1), - Designated_Type (T2)); + if Can_Never_Be_Null (T1) /= Can_Never_Be_Null (T2) then + return False; + + elsif Ekind (T1) = E_Access_Subprogram_Type then + return + Subtype_Conformant + (Designated_Type (T1), + Designated_Type (T1)); + else + return + Subtypes_Statically_Match + (Designated_Type (T1), + Designated_Type (T2)) + and then Is_Access_Constant (T1) = Is_Access_Constant (T2); + end if; -- All other types definitely match diff --git a/gcc/ada/sem_eval.ads b/gcc/ada/sem_eval.ads index 5509185db31..31f7d634102 100644 --- a/gcc/ada/sem_eval.ads +++ b/gcc/ada/sem_eval.ads @@ -25,14 +25,14 @@ ------------------------------------------------------------------------------ -- This package contains various subprograms involved in compile time --- evaluation of expressions and checks for staticness of expressions --- and types. It also contains the circuitry for checking for violations --- of pure and preelaborated conditions (this naturally goes here, since --- these rules involve consideration of staticness). +-- evaluation of expressions and checks for staticness of expressions and +-- types. It also contains the circuitry for checking for violations of pure +-- and preelaborated conditions (this naturally goes here, since these rules +-- involve consideration of staticness). --- Note: the static evaluation for attributes is found in Sem_Attr even --- though logically it belongs here. We have done this so that it is easier --- to add new attributes to GNAT. +-- Note: the static evaluation for attributes is found in Sem_Attr even though +-- logically it belongs here. We have done this so that it is easier to add +-- new attributes to GNAT. with Types; use Types; with Uintp; use Uintp; @@ -45,66 +45,64 @@ package Sem_Eval is ------------------------------------ -- This package contains a set of routine that process individual - -- subexpression nodes with the objective of folding (precomputing) - -- the value of static expressions that are known at compile time and - -- properly computing the setting of two flags that appear in every - -- subexpression node: + -- subexpression nodes with the objective of folding (precomputing) the + -- value of static expressions that are known at compile time and properly + -- computing the setting of two flags that appear in every subexpression + -- node: -- Is_Static_Expression - -- This flag is set on any expression that is static according - -- to the rules in (RM 4.9(3-32)). + -- This flag is set on any expression that is static according to the + -- rules in (RM 4.9(3-32)). -- Raises_Constraint_Error -- This flag indicatest that it is known at compile time that the -- evaluation of an expression raises constraint error. If the - -- expression is static, and this flag is off, then it is also known - -- at compile time that the expression does not raise constraint error + -- expression is static, and this flag is off, then it is also known at + -- compile time that the expression does not raise constraint error -- (i.e. the flag is accurate for static expressions, and conservative -- for non-static expressions. -- If a static expression does not raise constraint error, then the - -- Raises_Constraint_Error flag is off, and the expression must be - -- computed at compile time, which means that it has the form of either - -- a literal, or a constant that is itself (recursively) either a literal - -- or a constant. + -- Raises_Constraint_Error flag is off, and the expression must be computed + -- at compile time, which means that it has the form of either a literal, + -- or a constant that is itself (recursively) either a literal or a + -- constant. - -- The above rules must be followed exactly in order for legality - -- checks to be accurate. For subexpressions that are not static - -- according to the RM definition, they are sometimes folded anyway, - -- but of course in this case Is_Static_Expression is not set. + -- The above rules must be followed exactly in order for legality checks to + -- be accurate. For subexpressions that are not static according to the RM + -- definition, they are sometimes folded anyway, but of course in this case + -- Is_Static_Expression is not set. ------------------------------- -- Compile-Time Known Values -- ------------------------------- -- For most legality checking purposes the flag Is_Static_Expression - -- defined in Sinfo should be used. This package also provides - -- a routine called Is_OK_Static_Expression which in addition of - -- checking that an expression is static in the RM 4.9 sense, it - -- checks that the expression does not raise constraint error. In - -- fact for certain legality checks not only do we need to ascertain - -- that the expression is static, but we must also ensure that it - -- does not raise constraint error. + -- defined in Sinfo should be used. This package also provides a routine + -- called Is_OK_Static_Expression which in addition of checking that an + -- expression is static in the RM 4.9 sense, it checks that the expression + -- does not raise constraint error. In fact for certain legality checks not + -- only do we need to ascertain that the expression is static, but we must + -- also ensure that it does not raise constraint error. -- - -- Neither of Is_Static_Expression and Is_OK_Static_Expression should - -- be used for compile time evaluation purposes. In fact certain - -- expression whose value is known at compile time are not static - -- in the RM 4.9 sense. A typical example is: + -- Neither of Is_Static_Expression and Is_OK_Static_Expression should be + -- used for compile time evaluation purposes. In fact certain expression + -- whose value is known at compile time are not static in the RM 4.9 sense. + -- A typical example is: -- -- C : constant Integer := Record_Type'Size; -- - -- The expression 'C' is not static in the technical RM sense, but for - -- many simple record types, the size is in fact known at compile time. - -- When we are trying to perform compile time constant folding (for - -- instance for expressions such as 'C + 1', Is_Static_Expression or - -- Is_OK_Static_Expression are not the right functions to test to see - -- if folding is possible. Instead, we use Compile_Time_Known_Value. - -- All static expressions that do not raise constraint error (i.e. - -- those for which Is_OK_Static_Expression is true) are known at - -- compile time, but as shown by the above example, there are cases - -- of non-static expressions which are known at compile time. + -- The expression 'C' is not static in the technical RM sense, but for many + -- simple record types, the size is in fact known at compile time. When we + -- are trying to perform compile time constant folding (for instance for + -- expressions like C + 1, Is_Static_Expression or Is_OK_Static_Expression + -- are not the right functions to test if folding is possible. Instead, we + -- use Compile_Time_Known_Value. All static expressions that do not raise + -- constraint error (i.e. those for which Is_OK_Static_Expression is true) + -- are known at compile time, but as shown by the above example, there are + -- cases of non-static expressions which are known at compile time. ----------------- -- Subprograms -- @@ -114,17 +112,17 @@ package Sem_Eval is -- Deals with the special check required for a static expression that -- appears in a non-static context, i.e. is not part of a larger static -- expression (see RM 4.9(35)), i.e. the value of the expression must be - -- within the base range of the base type of its expected type. A check - -- is also made for expressions that are inside the base range, but - -- outside the range of the expected subtype (this is a warning message - -- rather than an illegality). + -- within the base range of the base type of its expected type. A check is + -- also made for expressions that are inside the base range, but outside + -- the range of the expected subtype (this is a warning message rather than + -- an illegality). -- -- Note: most cases of non-static context checks are handled within - -- Sem_Eval itself, including all cases of expressions at the outer - -- level (i.e. those that are not a subexpression). Currently the only - -- outside customer for this procedure is Sem_Attr (because Eval_Attribute - -- is there). There is also one special case arising from ranges (see body - -- of Resolve_Range). + -- Sem_Eval itself, including all cases of expressions at the outer level + -- (i.e. those that are not a subexpression). Currently the only outside + -- customer for this procedure is Sem_Attr (because Eval_Attribute is + -- there). There is also one special case arising from ranges (see body of + -- Resolve_Range). procedure Check_String_Literal_Length (N : Node_Id; Ttype : Entity_Id); -- N is either a string literal, or a constraint error node. In the latter @@ -138,48 +136,47 @@ package Sem_Eval is function Compile_Time_Compare (L, R : Node_Id; Rec : Boolean := False) return Compare_Result; - -- Given two expression nodes, finds out whether it can be determined - -- at compile time how the runtime values will compare. An Unknown - -- result means that the result of a comparison cannot be determined at - -- compile time, otherwise the returned result indicates the known result - -- of the comparison, given as tightly as possible (i.e. EQ or LT is a - -- preferred returned value to LE). Rec is a parameter that is set True - -- for a recursive call from within Compile_Time_Compare to avoid some - -- infinite recursion cases. It should never be set by a client. + -- Given two expression nodes, finds out whether it can be determined at + -- compile time how the runtime values will compare. An Unknown result + -- means that the result of a comparison cannot be determined at compile + -- time, otherwise the returned result indicates the known result of the + -- comparison, given as tightly as possible (i.e. EQ or LT is preferred + -- returned value to LE). Rec is a parameter that is set True for a + -- recursive call from within Compile_Time_Compare to avoid some infinite + -- recursion cases. It should never be set by a client. procedure Flag_Non_Static_Expr (Msg : String; Expr : Node_Id); - -- This procedure is called after it has been determined that Expr is - -- not static when it is required to be. Msg is the text of a message - -- that explains the error. This procedure checks if an error is already - -- posted on Expr, if so, it does nothing unless All_Errors_Mode is set - -- in which case this flag is ignored. Otherwise the given message is - -- posted using Error_Msg_F, and then Why_Not_Static is called on - -- Expr to generate additional messages. The string given as Msg - -- should end with ! to make it an unconditional message, to ensure - -- that if it is posted, the entire set of messages is all posted. + -- This procedure is called after it has been determined that Expr is not + -- static when it is required to be. Msg is the text of a message that + -- explains the error. This procedure checks if an error is already posted + -- on Expr, if so, it does nothing unless All_Errors_Mode is set in which + -- case this flag is ignored. Otherwise the given message is posted using + -- Error_Msg_F, and then Why_Not_Static is called on Expr to generate + -- additional messages. The string given as Msg should end with ! to make + -- it an unconditional message, to ensure that if it is posted, the entire + -- set of messages is all posted. function Is_OK_Static_Expression (N : Node_Id) return Boolean; - -- An OK static expression is one that is static in the RM definition - -- sense and which does not raise constraint error. For most legality - -- checking purposes you should use Is_Static_Expression. For those - -- legality checks where the expression N should not raise constaint - -- error use this routine. This routine is *not* to be used in contexts - -- where the test is for compile time evaluation purposes. Use routine - -- Compile_Time_Known_Value instead (see section on "Compile-Time Known - -- Values" above). + -- An OK static expression is one that is static in the RM definition sense + -- and which does not raise constraint error. For most legality checking + -- purposes you should use Is_Static_Expression. For those legality checks + -- where the expression N should not raise constaint error use this + -- routine. This routine is *not* to be used in contexts where the test is + -- for compile time evaluation purposes. Use Compile_Time_Known_Value + -- instead (see section on "Compile-Time Known Values" above). function Is_Static_Range (N : Node_Id) return Boolean; - -- Determine if range is static, as defined in RM 4.9(26). The only - -- allowed argument is an N_Range node (but note that the semantic - -- analysis of equivalent range attribute references already turned - -- them into the equivalent range). + -- Determine if range is static, as defined in RM 4.9(26). The only allowed + -- argument is an N_Range node (but note that the semantic analysis of + -- equivalent range attribute references already turned them into the + -- equivalent range). function Is_OK_Static_Range (N : Node_Id) return Boolean; - -- Like Is_Static_Range, but also makes sure that the bounds of the - -- range are compile-time evaluable (i.e. do not raise constraint error). - -- A result of true means that the bounds are compile time evaluable. - -- A result of false means they are not (either because the range is - -- not static, or because one or the other bound raises CE). + -- Like Is_Static_Range, but also makes sure that the bounds of the range + -- are compile-time evaluable (i.e. do not raise constraint error). A + -- result of true means that the bounds are compile time evaluable. A + -- result of false means they are not (either because the range is not + -- static, or because one or the other bound raises CE). function Is_Static_Subtype (Typ : Entity_Id) return Boolean; -- Determines whether a subtype fits the definition of an Ada static @@ -187,10 +184,10 @@ package Sem_Eval is function Is_OK_Static_Subtype (Typ : Entity_Id) return Boolean; -- Like Is_Static_Subtype but also makes sure that the bounds of the - -- subtype are compile-time evaluable (i.e. do not raise constraint - -- error). A result of true means that the bounds are compile time - -- evaluable. A result of false means they are not (either because the - -- range is not static, or because one or the other bound raises CE). + -- subtype are compile-time evaluable (i.e. do not raise constraint error). + -- A result of true means that the bounds are compile time evaluable. A + -- result of false means they are not (either because the range is not + -- static, or because one or the other bound raises CE). function Subtypes_Statically_Compatible (T1 : Entity_Id; @@ -204,52 +201,49 @@ package Sem_Eval is -- are statically matching subtypes (RM 4.9.1(1-2)). function Compile_Time_Known_Value (Op : Node_Id) return Boolean; - -- Returns true if Op is an expression not raising constraint error - -- whose value is known at compile time. This is true if Op is a static - -- expression, but can also be true for expressions which are - -- technically non-static but which are in fact known at compile time, - -- such as the static lower bound of a non-static range or the value - -- of a constant object whose initial value is static. Note that this - -- routine is defended against unanalyzed expressions. Such expressions - -- will not cause a blowup, they may cause pessimistic (i.e. False) - -- results to be returned. + -- Returns true if Op is an expression not raising constraint error whose + -- value is known at compile time. This is true if Op is a static + -- expression, but can also be true for expressions which are technically + -- non-static but which are in fact known at compile time, such as the + -- static lower bound of a non-static range or the value of a constant + -- object whose initial value is static. Note that this routine is defended + -- against unanalyzed expressions. Such expressions will not cause a + -- blowup, they may cause pessimistic (i.e. False) results to be returned. function Compile_Time_Known_Value_Or_Aggr (Op : Node_Id) return Boolean; - -- Similar to Compile_Time_Known_Value, but also returns True if the - -- value is a compile time known aggregate, i.e. an aggregate all of - -- whose constituent expressions are either compile time known values - -- or compile time known aggregates. + -- Similar to Compile_Time_Known_Value, but also returns True if the value + -- is a compile time known aggregate, i.e. an aggregate all of whose + -- constituent expressions are either compile time known values or compile + -- time known aggregates. function Compile_Time_Known_Bounds (T : Entity_Id) return Boolean; - -- If T is an array whose index bounds are all known at compile time, - -- then True is returned, if T is not an array, or one or more of its - -- index bounds is not known at compile time, then False is returned. + -- If T is an array whose index bounds are all known at compile time, then + -- True is returned, if T is not an array, or one or more of its index + -- bounds is not known at compile time, then False is returned. function Expr_Value (N : Node_Id) return Uint; - -- Returns the folded value of the expression N. This function is called - -- in instances where it has already been determined that the expression - -- is static or its value is known at compile time (ie the call to - -- Compile_Time_Known_Value (N) returns True). This version is used for - -- integer values, and enumeration or character literals. In the latter - -- two cases, the value returned is the Pos value in the relevant - -- enumeration type. It can also be used for fixed-point values, in - -- which case it returns the corresponding integer value. It cannot be - -- used for floating-point values. + -- Returns the folded value of the expression N. This function is called in + -- instances where it has already been determined that the expression is + -- static or its value is compile time known (Compile_Time_Known_Value (N) + -- returns True). This version is used for integer values, and enumeration + -- or character literals. In the latter two cases, the value returned is + -- the Pos value in the relevant enumeration type. It can also be used for + -- fixed-point values, in which case it returns the corresponding integer + -- value. It cannot be used for floating-point values. function Expr_Value_E (N : Node_Id) return Entity_Id; - -- Returns the folded value of the expression. This function is called - -- in instances where it has already been determined that the expression - -- is static or its value known at compile time. This version is used - -- for enumeration types and returns the corresponding enumeration - -- literal. + -- Returns the folded value of the expression. This function is called in + -- instances where it has already been determined that the expression is + -- static or its value known at compile time. This version is used for + -- enumeration types and returns the corresponding enumeration literal. function Expr_Value_R (N : Node_Id) return Ureal; - -- Returns the folded value of the expression. This function is called - -- in instances where it has already been determined that the expression - -- is static or its value known at compile time. This version is used - -- for real values (including both the floating-point and fixed-point - -- cases). In the case of a fixed-point type, the real value is returned - -- (cf above version returning Uint). + -- Returns the folded value of the expression. This function is called in + -- instances where it has already been determined that the expression is + -- static or its value known at compile time. This version is used for real + -- values (including both the floating-point and fixed-point cases). In the + -- case of a fixed-point type, the real value is returned (cf above version + -- returning Uint). function Expr_Value_S (N : Node_Id) return Node_Id; -- Returns the folded value of the expression. This function is called @@ -261,12 +255,12 @@ package Sem_Eval is -- This is identical to Expr_Value, except in the case of enumeration -- literals of types for which an enumeration representation clause has -- been given, in which case it returns the representation value rather - -- than the pos value. This is the value that is needed for generating - -- code sequences, while the Expr_Value value is appropriate for compile - -- time constraint errors or getting the logical value. Note that this - -- function does NOT concern itself with biased values, if the caller - -- needs a properly biased value, the subtraction of the bias must be - -- handled explicitly. + -- than the pos value. This is the value that is needed for generating code + -- sequences, while the Expr_Value value is appropriate for compile time + -- constraint errors or getting the logical value. Note that this function + -- does NOT concern itself with biased values, if the caller needs a + -- properly biased value, the subtraction of the bias must be handled + -- explicitly. procedure Eval_Actual (N : Node_Id); procedure Eval_Allocator (N : Node_Id); @@ -296,58 +290,56 @@ package Sem_Eval is procedure Eval_Unchecked_Conversion (N : Node_Id); procedure Fold_Str (N : Node_Id; Val : String_Id; Static : Boolean); - -- Rewrite N with a new N_String_Literal node as the result of the - -- compile time evaluation of the node N. Val is the resulting string - -- value from the folding operation. The Is_Static_Expression flag is - -- set in the result node. The result is fully analyzed and resolved. - -- Static indicates whether the result should be considered static or - -- not (True = consider static). The point here is that normally all - -- string literals are static, but if this was the result of some - -- sequence of evaluation where values were known at compile time - -- but not static, then the result is not static. + -- Rewrite N with a new N_String_Literal node as the result of the compile + -- time evaluation of the node N. Val is the resulting string value from + -- the folding operation. The Is_Static_Expression flag is set in the + -- result node. The result is fully analyzed and resolved. Static indicates + -- whether the result should be considered static or not (True = consider + -- static). The point here is that normally all string literals are static, + -- but if this was the result of some sequence of evaluation where values + -- were known at compile time but not static, then the result is not + -- static. procedure Fold_Uint (N : Node_Id; Val : Uint; Static : Boolean); -- Rewrite N with a (N_Integer_Literal, N_Identifier, N_Character_Literal) - -- node as the result of the compile time evaluation of the node N. Val - -- is the result in the integer case and is the position of the literal - -- in the literals list for the enumeration case. Is_Static_Expression - -- is set True in the result node. The result is fully analyzed/resolved. - -- Static indicates whether the result should be considered static or - -- not (True = consider static). The point here is that normally all - -- string literals are static, but if this was the result of some - -- sequence of evaluation where values were known at compile time - -- but not static, then the result is not static. + -- node as the result of the compile time evaluation of the node N. Val is + -- the result in the integer case and is the position of the literal in the + -- literals list for the enumeration case. Is_Static_Expression is set True + -- in the result node. The result is fully analyzed/resolved. Static + -- indicates whether the result should be considered static or not (True = + -- consider static). The point here is that normally all string literals + -- are static, but if this was the result of some sequence of evaluation + -- where values were known at compile time but not static, then the result + -- is not static. procedure Fold_Ureal (N : Node_Id; Val : Ureal; Static : Boolean); -- Rewrite N with a new N_Real_Literal node as the result of the compile - -- time evaluation of the node N. Val is the resulting real value from - -- the folding operation. The Is_Static_Expression flag is set in the - -- result node. The result is fully analyzed and result. Static - -- indicates whether the result should be considered static or not - -- (True = consider static). The point here is that normally all - -- string literals are static, but if this was the result of some - -- sequence of evaluation where values were known at compile time - -- but not static, then the result is not static. + -- time evaluation of the node N. Val is the resulting real value from the + -- folding operation. The Is_Static_Expression flag is set in the result + -- node. The result is fully analyzed and result. Static indicates whether + -- the result should be considered static or not (True = consider static). + -- The point here is that normally all string literals are static, but if + -- this was the result of some sequence of evaluation where values were + -- known at compile time but not static, then the result is not static. function Is_In_Range (N : Node_Id; Typ : Entity_Id; Fixed_Int : Boolean := False; Int_Real : Boolean := False) return Boolean; - -- Returns True if it can be guaranteed at compile time that expression - -- N is known to be in range of the subtype Typ. If the values of N or - -- of either bouds of Type are unknown at compile time, False will - -- always be returned. A result of False does not mean that the - -- expression is out of range, merely that it cannot be determined at - -- compile time that it is in range. If Typ is a floating point type or - -- Int_Real is set, any integer value is treated as though it was a real - -- value (i.e. the underlying real value is used). In this case we use - -- the corresponding real value, both for the bounds of Typ, and for the - -- value of the expression N. If Typ is a fixed type or a discrete type - -- and Int_Real is False but flag Fixed_Int is True then any fixed-point - -- value is treated as though it was a discrete value (i.e. the - -- underlying integer value is used). In this case we use the - -- corresponding integer value, both for the bounds of Typ, and for the + -- Returns True if it can be guaranteed at compile time that expression is + -- known to be in range of the subtype Typ. If the values of N or of either + -- bouds of Type are unknown at compile time, False will always be + -- returned. A result of False does not mean that the expression is out of + -- range, merely that it cannot be determined at compile time that it is in + -- range. If Typ is a floating point type or Int_Real is set, any integer + -- value is treated as though it was a real value (i.e. the underlying real + -- value is used). In this case we use the corresponding real value, both + -- for the bounds of Typ, and for the value of the expression N. If Typ is + -- a fixed type or a discrete type and Int_Real is False but flag Fixed_Int + -- is True then any fixed-point value is treated as though it was discrete + -- value (i.e. the underlying integer value is used). In this case we use + -- the corresponding integer value, both for the bounds of Typ, and for the -- value of the expression N. If Typ is a discret type and Fixed_Int as -- well as Int_Real are false, intere values are used throughout. @@ -356,52 +348,52 @@ package Sem_Eval is Typ : Entity_Id; Fixed_Int : Boolean := False; Int_Real : Boolean := False) return Boolean; - -- Returns True if it can be guaranteed at compile time that expression - -- N is known to be out of range of the subtype Typ. True is returned - -- if Typ is a scalar type, at least one of whose bounds is known at - -- compile time, and N is a compile time known expression which can be - -- determined to be outside a compile_time known bound of Typ. A result - -- of False does not mean that the expression is in range, merely that - -- it cannot be determined at compile time that it is out of range. Flags - -- Int_Real and Fixed_Int are used as in routine Is_In_Range above. + -- Returns True if it can be guaranteed at compile time that expression is + -- known to be out of range of the subtype Typ. True is returned if Typ is + -- a scalar type, at least one of whose bounds is known at compile time, + -- and N is a compile time known expression which can be determined to be + -- outside a compile_time known bound of Typ. A result of False does not + -- mean that the expression is in range, but rather merely that it cannot + -- be determined at compile time that it is out of range. Flags Int_Real + -- and Fixed_Int are used as in routine Is_In_Range above. function In_Subrange_Of (T1 : Entity_Id; T2 : Entity_Id; Fixed_Int : Boolean := False) return Boolean; - -- Returns True if it can be guaranteed at compile time that the range - -- of values for scalar type T1 are always in the range of scalar type - -- T2. A result of False does not mean that T1 is not in T2's subrange, - -- only that it cannot be determined at compile time. Flag Fixed_Int is - -- used as in routine Is_In_Range above. + -- Returns True if it can be guaranteed at compile time that the range of + -- values for scalar type T1 are always in the range of scalar type T2. A + -- result of False does not mean that T1 is not in T2's subrange, only that + -- it cannot be determined at compile time. Flag Fixed_Int is used as in + -- routine Is_In_Range above. function Is_Null_Range (Lo : Node_Id; Hi : Node_Id) return Boolean; - -- Returns True if it can guarantee that Lo .. Hi is a null range. - -- If it cannot (because the value of Lo or Hi is not known at compile - -- time) then it returns False. + -- Returns True if it can guarantee that Lo .. Hi is a null range. If it + -- cannot (because the value of Lo or Hi is not known at compile time) then + -- it returns False. function Not_Null_Range (Lo : Node_Id; Hi : Node_Id) return Boolean; - -- Returns True if it can guarantee that Lo .. Hi is not a null range. - -- If it cannot (because the value of Lo or Hi is not known at compile - -- time) then it returns False. + -- Returns True if it can guarantee that Lo .. Hi is not a null range. If + -- it cannot (because the value of Lo or Hi is not known at compile time) + -- then it returns False. procedure Why_Not_Static (Expr : Node_Id); -- This procedure may be called after generating an error message that - -- complains that something is non-static. If it finds good reasons, - -- it generates one or more error messages pointing the appropriate - -- offending component of the expression. If no good reasons can be - -- figured out, then no messages are generated. The expectation here - -- is that the caller has already issued a message complaining that - -- the expression is non-static. Note that this message should be - -- placed using Error_Msg_F or Error_Msg_FE, so that it will sort - -- before any messages placed by this call. Note that it is fine to - -- call Why_Not_Static with something that is not an expression, and - -- usually this has no effect, but in some cases (N_Parameter_Association - -- or N_Range), it makes sense for the internal recursive calls. + -- complains that something is non-static. If it finds good reasons, it + -- generates one or more error messages pointing the appropriate offending + -- component of the expression. If no good reasons can be figured out, then + -- no messages are generated. The expectation here is that the caller has + -- already issued a message complaining that the expression is non-static. + -- Note that this message should be placed using Error_Msg_F or + -- Error_Msg_FE, so that it will sort before any messages placed by this + -- call. Note that it is fine to call Why_Not_Static with something that is + -- not an expression, and usually this has no effect, but in some cases + -- (N_Parameter_Association or N_Range), it makes sense for the internal + -- recursive calls. procedure Initialize; - -- Initializes the internal data structures. Must be called before - -- each separate main program unit (e.g. in a GNSA/ASIS context). + -- Initializes the internal data structures. Must be called before each + -- separate main program unit (e.g. in a GNSA/ASIS context). private -- The Eval routines are all marked inline, since they are called once diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb index b06f117e158..1610c2848a7 100644 --- a/gcc/ada/sem_prag.adb +++ b/gcc/ada/sem_prag.adb @@ -4967,6 +4967,21 @@ package body Sem_Prag is end if; end Compile_Time_Warning; + ----------------------------- + -- Complete_Representation -- + ----------------------------- + + -- pragma Complete_Representation; + + when Pragma_Complete_Representation => + GNAT_Pragma; + Check_Arg_Count (0); + + if Nkind (Parent (N)) /= N_Record_Representation_Clause then + Error_Pragma + ("pragma & must appear within record representation clause"); + end if; + ---------------------------- -- Complex_Representation -- ---------------------------- @@ -5573,18 +5588,39 @@ package body Sem_Prag is -- Debug -- ----------- - -- pragma Debug (PROCEDURE_CALL_STATEMENT); + -- pragma Debug ([boolean_EXPRESSION,] PROCEDURE_CALL_STATEMENT); + + when Pragma_Debug => Debug : declare + Cond : Node_Id; - when Pragma_Debug => Debug : begin + begin GNAT_Pragma; - -- Rewrite into a conditional with a static condition + Cond := + New_Occurrence_Of + (Boolean_Literals (Debug_Pragmas_Enabled and Expander_Active), + Loc); + + if Arg_Count = 2 then + Cond := + Make_And_Then (Loc, + Left_Opnd => Relocate_Node (Cond), + Right_Opnd => Expression (Arg1)); + end if; + + -- Rewrite into a conditional with an appropriate condition. We + -- wrap the procedure call in a block so that overhead from e.g. + -- use of the secondary stack does not generate execution overhead + -- for suppressed conditions. Rewrite (N, Make_Implicit_If_Statement (N, - Condition => New_Occurrence_Of (Boolean_Literals ( - Debug_Pragmas_Enabled and Expander_Active), Loc), - Then_Statements => New_List ( - Relocate_Node (Debug_Statement (N))))); + Condition => Cond, + Then_Statements => New_List ( + Make_Block_Statement (Loc, + Handled_Statement_Sequence => + Make_Handled_Sequence_Of_Statements (Loc, + Statements => New_List ( + Relocate_Node (Debug_Statement (N)))))))); Analyze (N); end Debug; @@ -9587,17 +9623,20 @@ package body Sem_Prag is exit when not In_Character_Range (C); Options (J) := Get_Character (C); + -- If at end of string, set options. As per discussion + -- above, no need to check for errors, since we issued + -- them in the parser. + if J = Slen then Set_Style_Check_Options (Options); exit; - else - J := J + 1; end if; + + J := J + 1; end loop; end; elsif Nkind (A) = N_Identifier then - if Chars (A) = Name_All_Checks then Set_Default_Style_Check_Options; @@ -9606,7 +9645,6 @@ package body Sem_Prag is elsif Chars (A) = Name_Off then Style_Check := False; - end if; end if; end if; @@ -10664,6 +10702,7 @@ package body Sem_Prag is Pragma_Comment => 0, Pragma_Common_Object => -1, Pragma_Compile_Time_Warning => -1, + Pragma_Complete_Representation => 0, Pragma_Complex_Representation => 0, Pragma_Component_Alignment => -1, Pragma_Controlled => 0, diff --git a/gcc/ada/sem_res.adb b/gcc/ada/sem_res.adb index f9093455fbb..45e902bccff 100644 --- a/gcc/ada/sem_res.adb +++ b/gcc/ada/sem_res.adb @@ -1559,8 +1559,8 @@ package body Sem_Res is if Nkind (N) = N_Attribute_Reference and then (Attribute_Name (N) = Name_Access - or else Attribute_Name (N) = Name_Unrestricted_Access - or else Attribute_Name (N) = Name_Unchecked_Access) + or else Attribute_Name (N) = Name_Unrestricted_Access + or else Attribute_Name (N) = Name_Unchecked_Access) and then Comes_From_Source (N) and then Is_Entity_Name (Prefix (N)) and then Is_Subprogram (Entity (Prefix (N))) @@ -2091,11 +2091,9 @@ package body Sem_Res is Get_First_Interp (Name (N), Index, It); while Present (It.Nam) loop - Error_Msg_Sloc := Sloc (It.Nam); - Error_Msg_Node_2 := It.Typ; - Error_Msg_NE ("\& declared#, type&", - N, It.Nam); - + Error_Msg_Sloc := Sloc (It.Nam); + Error_Msg_Node_2 := It.Typ; + Error_Msg_NE ("\& declared#, type&", N, It.Nam); Get_Next_Interp (Index, It); end loop; end; @@ -2591,15 +2589,15 @@ package body Sem_Res is -- If the formal is Out or In_Out, do not resolve and expand the -- conversion, because it is subsequently expanded into explicit -- temporaries and assignments. However, the object of the - -- conversion can be resolved. An exception is the case of a - -- tagged type conversion with a class-wide actual. In that case - -- we want the tag check to occur and no temporary will be needed - -- (no representation change can occur) and the parameter is - -- passed by reference, so we go ahead and resolve the type - -- conversion. Another excpetion is the case of reference to a - -- component or subcomponent of a bit-packed array, in which case - -- we want to defer expansion to the point the in and out - -- assignments are performed. + -- conversion can be resolved. An exception is the case of tagged + -- type conversion with a class-wide actual. In that case we want + -- the tag check to occur and no temporary will be needed (no + -- representation change can occur) and the parameter is passed by + -- reference, so we go ahead and resolve the type conversion. + -- Another excpetion is the case of reference to component or + -- subcomponent of a bit-packed array, in which case we want to + -- defer expansion to the point the in and out assignments are + -- performed. if Ekind (F) /= E_In_Parameter and then Nkind (A) = N_Type_Conversion @@ -6660,34 +6658,50 @@ package body Sem_Res is Opnd_Type := Directly_Designated_Type (Opnd_Type); end if; - if Is_Class_Wide_Type (Opnd_Type) then - Opnd_Type := Etype (Opnd_Type); - end if; + declare + Save_Typ : constant Entity_Id := Opnd_Type; - if not Interface_Present_In_Ancestor - (Typ => Opnd_Type, - Iface => Target_Type) - then - Error_Msg_NE - ("(Ada 2005) does not implement interface }", - Operand, Target_Type); + begin + if Is_Class_Wide_Type (Opnd_Type) then + Opnd_Type := Etype (Opnd_Type); + end if; - else - -- If a conversion to an interface type appears as an actual in - -- a source call, it will be expanded when the enclosing call - -- itself is examined in Expand_Interface_Formals. Otherwise, - -- generate the proper conversion code now, using the tag of - -- the interface. - - if (Nkind (Parent (N)) = N_Procedure_Call_Statement - or else Nkind (Parent (N)) = N_Function_Call) - and then Comes_From_Source (N) + if not Interface_Present_In_Ancestor + (Typ => Opnd_Type, + Iface => Target_Type) then - null; + -- The static analysis is not enough to know if the + -- interface is implemented or not. Hence we must pass the + -- work to the expander to generate the required code to + -- evaluate the conversion at run-time. + + if Is_Class_Wide_Type (Save_Typ) + and then Is_Interface (Save_Typ) + then + Expand_Interface_Conversion (N, Is_Static => False); + else + Error_Msg_NE + ("(Ada 2005) does not implement interface }", + Operand, Target_Type); + end if; + else - Expand_Interface_Conversion (N); + -- If a conversion to an interface type appears as an actual + -- in a source call, it will be expanded when the enclosing + -- call itself is examined in Expand_Interface_Formals. + -- Otherwise, generate the proper conversion code now, using + -- the tag of the interface. + + if (Nkind (Parent (N)) = N_Procedure_Call_Statement + or else Nkind (Parent (N)) = N_Function_Call) + and then Comes_From_Source (N) + then + null; + else + Expand_Interface_Conversion (N); + end if; end if; - end if; + end; end if; end if; end Resolve_Type_Conversion; diff --git a/gcc/ada/sem_type.adb b/gcc/ada/sem_type.adb index 94c4c5c060e..b4218db925e 100644 --- a/gcc/ada/sem_type.adb +++ b/gcc/ada/sem_type.adb @@ -1019,6 +1019,10 @@ package body Sem_Type is -- pathology in the other direction with calls whose multiple overloaded -- actuals make them truly unresolvable. + -- The new rules concerning abstract operations create additional + -- for special handling of expressions with universal operands, See + -- comments to Has_Abstract_Interpretation below. + ------------------------ -- In_Generic_Actual -- ------------------------ @@ -1105,12 +1109,43 @@ package body Sem_Type is Act1 : Node_Id; Act2 : Node_Id; + function Has_Abstract_Interpretation (N : Node_Id) return Boolean; + -- If an operation has universal operands the universal operation + -- is present among its interpretations. If there is an abstract + -- interpretation for the operator, with a numeric result, this + -- interpretation was already removed in sem_ch4, but the universal + -- one is still visible. We must rescan the list of operators and + -- remove the universal interpretation to resolve the ambiguity. + + --------------------------------- + -- Has_Abstract_Interpretation -- + --------------------------------- + + function Has_Abstract_Interpretation (N : Node_Id) return Boolean is + E : Entity_Id; + + begin + E := Current_Entity (N); + while Present (E) loop + if Is_Abstract (E) + and then Is_Numeric_Type (Etype (E)) + then + return True; + else + E := Homonym (E); + end if; + end loop; + + return False; + end Has_Abstract_Interpretation; + + -- Start of processing for Remove_ConversionsMino + begin It1 := No_Interp; Get_First_Interp (N, I, It); while Present (It.Typ) loop - if not Is_Overloadable (It.Nam) then return No_Interp; end if; @@ -1185,6 +1220,19 @@ package body Sem_Type is else It1 := It; end if; + + elsif Nkind (Act1) in N_Op + and then Is_Overloaded (Act1) + and then Present (Universal_Interpretation (Act1)) + and then Is_Numeric_Type (Etype (F1)) + and then Ada_Version >= Ada_05 + and then Has_Abstract_Interpretation (Act1) + then + if It = Disambiguate.It1 then + return Disambiguate.It2; + elsif It = Disambiguate.It2 then + return Disambiguate.It1; + end if; end if; end if; @@ -1267,6 +1315,19 @@ package body Sem_Type is It2 := It; Nam2 := It.Nam; + if Ada_Version < Ada_05 then + + -- Check whether one of the entities is an Ada 2005 entity and we are + -- operating in an earlier mode, in which case we discard the Ada + -- 2005 entity, so that we get proper Ada 95 overload resolution. + + if Is_Ada_2005 (Nam1) then + return It2; + elsif Is_Ada_2005 (Nam2) then + return It1; + end if; + end if; + -- If the context is universal, the predefined operator is preferred. -- This includes bounds in numeric type declarations, and expressions -- in type conversions. If no interpretation yields a universal type, @@ -1912,6 +1973,7 @@ package body Sem_Type is if Present (Interface_List (Parent (Target_Typ))) then declare AI : Node_Id; + begin AI := First (Interface_List (Parent (Target_Typ))); while Present (AI) loop diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb index 25f33b15a6b..ada7e636a3f 100644 --- a/gcc/ada/sem_util.adb +++ b/gcc/ada/sem_util.adb @@ -2201,8 +2201,7 @@ package body Sem_Util is Ent := Defining_Identifier (Ent); end if; - -- Compute recursively the qualification. Only "Standard" has no - -- scope. + -- Compute qualification recursively (only "Standard" has no scope) if Present (Scope (Scope (Ent))) then Parent_Name := Internal_Full_Qualified_Name (Scope (Ent)); @@ -2227,7 +2226,7 @@ package body Sem_Util is -- Generates the entity name in upper case - Get_Name_String (Chars (Ent)); + Get_Decoded_Name_String (Chars (Ent)); Set_All_Upper_Case; Store_String_Chars (Name_Buffer (1 .. Name_Len)); return End_String; @@ -5235,26 +5234,26 @@ package body Sem_Util is -- Normalize_Actuals -- ----------------------- - -- Chain actuals according to formals of subprogram. If there are - -- no named associations, the chain is simply the list of Parameter - -- Associations, since the order is the same as the declaration order. - -- If there are named associations, then the First_Named_Actual field - -- in the N_Procedure_Call_Statement node or N_Function_Call node - -- points to the Parameter_Association node for the parameter that - -- comes first in declaration order. The remaining named parameters - -- are then chained in declaration order using Next_Named_Actual. + -- Chain actuals according to formals of subprogram. If there are no named + -- associations, the chain is simply the list of Parameter Associations, + -- since the order is the same as the declaration order. If there are named + -- associations, then the First_Named_Actual field in the N_Function_Call + -- or N_Procedure_Call_Statement node points to the Parameter_Association + -- node for the parameter that comes first in declaration order. The + -- remaining named parameters are then chained in declaration order using + -- Next_Named_Actual. - -- This routine also verifies that the number of actuals is compatible - -- with the number and default values of formals, but performs no type - -- checking (type checking is done by the caller). + -- This routine also verifies that the number of actuals is compatible with + -- the number and default values of formals, but performs no type checking + -- (type checking is done by the caller). - -- If the matching succeeds, Success is set to True, and the caller - -- proceeds with type-checking. If the match is unsuccessful, then - -- Success is set to False, and the caller attempts a different - -- interpretation, if there is one. + -- If the matching succeeds, Success is set to True and the caller proceeds + -- with type-checking. If the match is unsuccessful, then Success is set to + -- False, and the caller attempts a different interpretation, if there is + -- one. - -- If the flag Report is on, the call is not overloaded, and a failure - -- to match can be reported here, rather than in the caller. + -- If the flag Report is on, the call is not overloaded, and a failure to + -- match can be reported here, rather than in the caller. procedure Normalize_Actuals (N : Node_Id; @@ -5488,7 +5487,7 @@ package body Sem_Util is Next_Formal (Formal); end loop; - if Formals_To_Match = 0 and then Actuals_To_Match = 0 then + if Formals_To_Match = 0 and then Actuals_To_Match = 0 then Success := True; return; diff --git a/gcc/ada/sem_util.ads b/gcc/ada/sem_util.ads index 64dd828a050..b7844a06f0f 100644 --- a/gcc/ada/sem_util.ads +++ b/gcc/ada/sem_util.ads @@ -251,7 +251,8 @@ package Sem_Util is function Full_Qualified_Name (E : Entity_Id) return String_Id; -- Generates the string literal corresponding to the E's full qualified - -- name in upper case. An ASCII.NUL is appended as the last character + -- name in upper case. An ASCII.NUL is appended as the last character. + -- The names in the string are generated by Namet.Get_Decoded_Name_String. function Find_Static_Alternative (N : Node_Id) return Node_Id; -- N is a case statement whose expression is a compile-time value. diff --git a/gcc/ada/sinfo.adb b/gcc/ada/sinfo.adb index 673d4541782..dc53ec01a8b 100644 --- a/gcc/ada/sinfo.adb +++ b/gcc/ada/sinfo.adb @@ -1692,6 +1692,7 @@ package body Sinfo is begin pragma Assert (False or else NT (N).Nkind = N_Derived_Type_Definition + or else NT (N).Nkind = N_Formal_Derived_Type_Definition or else NT (N).Nkind = N_Formal_Private_Type_Definition or else NT (N).Nkind = N_Private_Extension_Declaration or else NT (N).Nkind = N_Private_Type_Declaration @@ -4278,6 +4279,7 @@ package body Sinfo is begin pragma Assert (False or else NT (N).Nkind = N_Derived_Type_Definition + or else NT (N).Nkind = N_Formal_Derived_Type_Definition or else NT (N).Nkind = N_Formal_Private_Type_Definition or else NT (N).Nkind = N_Private_Extension_Declaration or else NT (N).Nkind = N_Private_Type_Declaration diff --git a/gcc/ada/sinfo.ads b/gcc/ada/sinfo.ads index 60f8be32224..bf5edbc4e65 100644 --- a/gcc/ada/sinfo.ads +++ b/gcc/ada/sinfo.ads @@ -32,8 +32,8 @@ ------------------------------------------------------------------------------ -- This package defines the structure of the abstract syntax tree. The Tree --- package provides a basic tree structure. Sinfo describes how this --- structure is used to represent the syntax of an Ada program. +-- package provides a basic tree structure. Sinfo describes how this structure +-- is used to represent the syntax of an Ada program. -- Note: the grammar used here is taken from Version 5.95 of the RM, dated -- November 1994. The grammar in the RM is followed very closely in the tree @@ -43,12 +43,12 @@ -- program, but also the results of semantic analysis. In particular, the -- nodes for defining identifiers, defining character literals and defining -- operator symbols, collectively referred to as entities, represent what --- would normally be regarded as the symbol table information. In addition --- a number of the tree nodes contain semantic information. +-- would normally be regarded as the symbol table information. In addition a +-- number of the tree nodes contain semantic information. --- WARNING: There is a C version of this package. Any changes to this --- source file must be properly reflected in this C header file sinfo.h --- which is created automatically from sinfo.ads using xsinfo.adb. +-- WARNING: There is a C version of this package. Any changes to this source +-- file must be properly reflected in this C header file sinfo.h which is +-- created automatically from sinfo.ads using xsinfo.adb. with Types; use Types; with Uintp; use Uintp; @@ -61,8 +61,8 @@ package Sinfo is --------------------------------- -- If changes are made to this file, a number of related steps must be - -- carried out to ensure consistency. First, if a field access function - -- is added, it appears in seven places: + -- carried out to ensure consistency. First, if a field access function is + -- added, it appears in seven places: -- The documentation associated with the node -- The spec of the access function in sinfo.ads @@ -72,9 +72,9 @@ package Sinfo is -- The body of the set procedure in sinfo.adb -- The pragma Inline at the end of sinfo.ads for the set procedure - -- The field chosen must be consistent in all places, and, for a node - -- that is a subexpression, must not overlap any of the standard - -- expression fields. + -- The field chosen must be consistent in all places, and, for a node that + -- is a subexpression, must not overlap any of the standard expression + -- fields. -- In addition, if any of the standard expression fields is changed, then -- the utiliy program which creates the Treeprs spec (in file treeprs.ads) @@ -99,52 +99,52 @@ package Sinfo is -- Finally, four utility programs must be run: - -- Run CSinfo to check that you have made the changes consistently. - -- It checks most of the rules given above, with clear error messages. - -- This utility reads sinfo.ads and sinfo.adb and generates a report - -- to standard output. + -- Run CSinfo to check that you have made the changes consistently. It + -- checks most of the rules given above, with clear error messages. This + -- utility reads sinfo.ads and sinfo.adb and generates a report to + -- standard output. -- Run XSinfo to create a-sinfo.h, the corresponding C header. This - -- utility reads sinfo.ads and generates a-sinfo.h. Note that it - -- does not need to read sinfo.adb, since the contents of the body - -- are algorithmically determinable from the spec. + -- utility reads sinfo.ads and generates a-sinfo.h. Note that it does + -- not need to read sinfo.adb, since the contents of the body are + -- algorithmically determinable from the spec. - -- Run XTreeprs to create treeprs.ads, an updated version of - -- the module that is used to drive the tree print routine. This - -- utility reads (but does not modify) treeprs.adt, the template - -- that provides the basic structure of the file, and then fills - -- in the data from the comments in sinfo.ads. + -- Run XTreeprs to create treeprs.ads, an updated version of the module + -- that is used to drive the tree print routine. This utility reads (but + -- does not modify) treeprs.adt, the template that provides the basic + -- structure of the file, and then fills in the data from the comments + -- in sinfo.ads. - -- Run XNmake to create nmake.ads and nmake.adb, the package body - -- and spec of the Nmake package which contains functions for - -- constructing nodes. + -- Run XNmake to create nmake.ads and nmake.adb, the package body and + -- spec of the Nmake package which contains functions for constructing + -- nodes. - -- Note: sometime we could write a utility that actually generated the - -- body of sinfo from the spec instead of simply checking it, since, as - -- noted above, the contents of the body can be determined from the spec. + -- Note: sometime we could write a utility that actually generated the body + -- of sinfo from the spec instead of simply checking it, since, as noted + -- above, the contents of the body can be determined from the spec. -------------------------------- -- Implicit Nodes in the Tree -- -------------------------------- - -- Generally the structure of the tree very closely follows the grammar - -- as defined in the RM. However, certain nodes are omitted to save - -- space and simplify semantic processing. Two general classes of such - -- omitted nodes are as follows: + -- Generally the structure of the tree very closely follows the grammar as + -- defined in the RM. However, certain nodes are omitted to save space and + -- simplify semantic processing. Two general classes of such omitted nodes + -- are as follows: -- If the only possibilities for a non-terminal are one or more other - -- non terminals (i.e. the rule is a "skinny" rule), then usually the + -- non-terminals (i.e. the rule is a "skinny" rule), then usually the -- corresponding node is omitted from the tree, and the target construct - -- appears directly. For example, a real type definition is either a - -- floating point definition or a fixed point definition. No explicit - -- node appears for real type definition. Instead either the floating - -- point definition or fixed point definition appears directly. + -- appears directly. For example, a real type definition is either + -- floating point definition or a fixed point definition. No explicit node + -- appears for real type definition. Instead either the floating point + -- definition or fixed point definition appears directly. -- If a non-terminal corresponds to a list of some other non-terminal - -- (possibly with separating punctuation), then usually it is omitted - -- from the tree, and a list of components appears instead. For - -- example, sequence of statements does not appear explicitly in the - -- tree. Instead a list of statements appears directly. + -- (possibly with separating punctuation), then usually it is omitted from + -- the tree, and a list of components appears instead. For example, + -- sequence of statements does not appear explicitly in the tree. Instead + -- a list of statements appears directly. -- Some additional cases of omitted nodes occur and are documented -- individually. In particular, many nodes are omitted in the tree @@ -155,23 +155,22 @@ package Sinfo is ------------------------------------------- -- In several declarative forms in the syntax, lists of defining - -- identifiers appear (object declarations, component declarations, - -- number declarations etc.) + -- identifiers appear (object declarations, component declarations, number + -- declarations etc.) - -- The semantics of such statements are equivalent to a series of - -- identical declarations of single defining identifiers (except that - -- conformance checks require the same grouping of identifiers in the - -- parameter case). + -- The semantics of such statements are equivalent to a series of identical + -- declarations of single defining identifiers (except that conformance + -- checks require the same grouping of identifiers in the parameter case). -- To simplify semantic processing, the parser breaks down such multiple -- declaration cases into sequences of single declarations, duplicating - -- type and initialization information as required. The flags More_Ids - -- and Prev_Ids are used to record the original form of the source in - -- the case where the original source used a list of names, More_Ids - -- being set on all but the last name and Prev_Ids being set on all - -- but the first name. These flags are used to reconstruct the original - -- source (e.g. in the Sprint package), and also are included in the - -- conformance checks, but otherwise have no semantic significance. + -- type and initialization information as required. The flags More_Ids and + -- Prev_Ids are used to record the original form of the source in the case + -- where the original source used a list of names, More_Ids being set on + -- all but the last name and Prev_Ids being set on all but the first name. + -- These flags are used to reconstruct the original source (e.g. in the + -- Sprint package), and also are included in the conformance checks, but + -- otherwise have no semantic significance. -- Note: the reason that we use More_Ids and Prev_Ids rather than -- First_Name and Last_Name flags is so that the flags are off in the @@ -182,20 +181,20 @@ package Sinfo is ----------------------- -- With a few exceptions, if a construction of the form {non-terminal} - -- appears in the tree, lists are used in the corresponding tree node - -- (see package Nlists for handling of node lists). In this case a field - -- of the parent node points to a list of nodes for the non-terminal. The - -- field name for such fields has a plural name which always ends in "s". - -- For example, a case statement has a field Alternatives pointing to a - -- list of case statement alternative nodes. + -- appears in the tree, lists are used in the corresponding tree node (see + -- package Nlists for handling of node lists). In this case a field of the + -- parent node points to a list of nodes for the non-terminal. The field + -- name for such fields has a plural name which always ends in "s". For + -- example, a case statement has a field Alternatives pointing to list of + -- case statement alternative nodes. - -- Only fields pointing to lists have names ending in "s", so generally - -- the structure is strongly typed, fields not ending in s point to - -- single nodes, and fields ending in s point to lists. + -- Only fields pointing to lists have names ending in "s", so generally the + -- structure is strongly typed, fields not ending in s point to single + -- nodes, and fields ending in s point to lists. -- The following example shows how a traversal of a list is written. We - -- suppose here that Stmt points to a N_Case_Statement node which has - -- a list field called Alternatives: + -- suppose here that Stmt points to a N_Case_Statement node which has a + -- list field called Alternatives: -- Alt := First (Alternatives (Stmt)); -- while Present (Alt) loop @@ -205,8 +204,8 @@ package Sinfo is -- Alt := Next (Alt); -- end loop; - -- The Present function tests for Empty, which in this case signals the - -- end of the list. First returns Empty immediately if the list is empty. + -- The Present function tests for Empty, which in this case signals the end + -- of the list. First returns Empty immediately if the list is empty. -- Present is defined in Atree, First and Next are defined in Nlists. -- The exceptions to this rule occur with {DEFINING_IDENTIFIERS} in all @@ -219,25 +218,25 @@ package Sinfo is -- Pragmas -- ------------- - -- Pragmas can appear in many different context, but are not included - -- in the grammar. Still they must appear in the tree, so they can be - -- properly processed. + -- Pragmas can appear in many different context, but are not included in + -- the grammar. Still they must appear in the tree, so they can be properly + -- processed. - -- Two approaches are used. In some cases, an extra field is defined - -- in an appropriate node that contains a list of pragmas appearing - -- in the expected context. For example pragmas can appear before an + -- Two approaches are used. In some cases, an extra field is defined in an + -- appropriate node that contains a list of pragmas appearing in the + -- expected context. For example pragmas can appear before an -- Accept_Alternative in a Selective_Accept_Statement, and these pragmas -- appear in the Pragmas_Before field of the N_Accept_Alternative node. -- The other approach is to simply allow pragmas to appear in syntactic -- lists where the grammar (of course) does not include the possibility. - -- For example, the Variants field of an N_Variant_Part node points to - -- a list that can contain both N_Pragma and N_Variant nodes. + -- For example, the Variants field of an N_Variant_Part node points to a + -- list that can contain both N_Pragma and N_Variant nodes. -- To make processing easier in the latter case, the Nlists package -- provides a set of routines (First_Non_Pragma, Last_Non_Pragma, - -- Next_Non_Pragma, Prev_Non_Pragma) that allow such lists to be - -- handled ignoring all pragmas. + -- Next_Non_Pragma, Prev_Non_Pragma) that allow such lists to be handled + -- ignoring all pragmas. -- In the case of the variants list, we can either write: @@ -255,30 +254,30 @@ package Sinfo is -- Variant := Next_Non_Pragma (Variant); -- end loop; - -- In the first form of the loop, Variant can either be an N_Pragma or - -- an N_Variant node. In the second form, Variant can only be N_Variant - -- since all pragmas are skipped. + -- In the first form of the loop, Variant can either be an N_Pragma or an + -- N_Variant node. In the second form, Variant can only be N_Variant since + -- all pragmas are skipped. --------------------- -- Optional Fields -- --------------------- -- Fields which correspond to a section of the syntax enclosed in square - -- brackets are generally omitted (and the corresponding field set to - -- Empty for a node, or No_List for a list). The documentation of such - -- fields notes these cases. One exception to this rule occurs in the - -- case of possibly empty statement sequences (such as the sequence of - -- statements in an entry call alternative). Such cases appear in the - -- syntax rules as [SEQUENCE_OF_STATEMENTS] and the fields corresponding - -- to such optional statement sequences always contain an empty list (not - -- No_List) if no statements are present. - - -- Note: the utility program that constructs the body and spec of the - -- Nmake package relies on the format of the comments to determine if - -- a field should have a default value in the corresponding make routine. - -- The rule is that if the first line of the description of the field - -- contains the string "(set to xxx if", then a default value of xxx is - -- provided for this field in the corresponding Make_yyy routine. + -- brackets are generally omitted (and the corresponding field set to Empty + -- for a node, or No_List for a list). The documentation of such fields + -- notes these cases. One exception to this rule occurs in the case of + -- possibly empty statement sequences (such as the sequence of statements + -- in an entry call alternative). Such cases appear in the syntax rules as + -- [SEQUENCE_OF_STATEMENTS] and the fields corresponding to such optional + -- statement sequences always contain an empty list (not No_List) if no + -- statements are present. + + -- Note: the utility program that constructs the body and spec of the Nmake + -- package relies on the format of the comments to determine if a field + -- should have a default value in the corresponding make routine. The rule + -- is that if the first line of the description of the field contains the + -- string "(set to xxx if", then a default value of xxx is provided for + -- this field in the corresponding Make_yyy routine. ----------------------------------- -- Note on Body/Spec Terminology -- @@ -287,33 +286,33 @@ package Sinfo is -- In informal discussions about Ada, it is customary to refer to package -- and subprogram specs and bodies. However, this is not technically -- correct, what is normally referred to as a spec or specification is in - -- fact a package declaration or subprogram declaration. We are careful - -- in GNAT to use the correct terminology and in particular, the full - -- word specification is never used as an incorrect substitute for - -- declaration. The structure and terminology used in the tree also - -- reflects the grammar and thus uses declaration and specification in - -- the technically correct manner. - - -- However, there are contexts in which the informal terminology is - -- useful. We have the word "body" to refer to the Interp_Etype declared by - -- the declaration of a unit body, and in some contexts we need a - -- similar term to refer to the entity declared by the package or - -- subprogram declaration, and simply using declaration can be confusing - -- since the body also has a declaration. - - -- An example of such a context is the link between the package body - -- and its declaration. With_Declaration is confusing, since - -- the package body itself is a declaration. - - -- To deal with this problem, we reserve the informal term Spec, i.e. - -- the popular abbreviation used in this context, to refer to the entity + -- fact a package declaration or subprogram declaration. We are careful in + -- GNAT to use the correct terminology and in particular, the full word + -- specification is never used as an incorrect substitute for declaration. + -- The structure and terminology used in the tree also reflects the grammar + -- and thus uses declaration and specification in the technically correct + -- manner. + + -- However, there are contexts in which the informal terminology is useful. + -- We have the word "body" to refer to the Interp_Etype declared by the + -- declaration of a unit body, and in some contexts we need similar term to + -- refer to the entity declared by the package or subprogram declaration, + -- and simply using declaration can be confusing since the body also has a + -- declaration. + + -- An example of such a context is the link between the package body and + -- its declaration. With_Declaration is confusing, since the package body + -- itself is a declaration. + + -- To deal with this problem, we reserve the informal term Spec, i.e. the + -- popular abbreviation used in this context, to refer to the entity -- declared by the package or subprogram declaration. So in the above -- example case, the field in the body is called With_Spec. -- Another important context for the use of the word Spec is in error - -- messages, where a hyper-correct use of declaration would be confusing - -- to a typical Ada programmer, and even for an expert programmer can - -- cause confusion since the body has a declaration as well. + -- messages, where a hyper-correct use of declaration would be confusing to + -- a typical Ada programmer, and even for an expert programmer can cause + -- confusion since the body has a declaration as well. -- So, to summarize: @@ -340,8 +339,8 @@ package Sinfo is -- Internal Use Nodes -- ------------------------ - -- These are Node_Kind settings used in the internal implementation - -- which are not logically part of the specification. + -- These are Node_Kind settings used in the internal implementation which + -- are not logically part of the specification. -- N_Unused_At_Start -- Completely unused entry at the start of the enumeration type. This @@ -352,24 +351,24 @@ package Sinfo is -- Completely unused entry at the end of the enumeration type. This is -- handy so that arrays with Node_Kind as the index type have an extra -- entry at the end (see for example the use of the Pchar_Pos_Array in - -- Treepr, where the extra entry provides the limit value when dealing - -- with the last used entry in the array). + -- Treepr, where the extra entry provides the limit value when dealing with + -- the last used entry in the array). ----------------------------------------- -- Note on the settings of Sloc fields -- ----------------------------------------- - -- The Sloc field of nodes that come from the source is set by the - -- parser. For internal nodes, and nodes generated during expansion - -- the Sloc is usually set in the call to the constructor for the node. - -- In general the Sloc value chosen for an internal node is the Sloc of - -- the source node whose processing is responsible for the expansion. For - -- example, the Sloc of an inherited primitive operation is the Sloc of - -- the corresponding derived type declaration. + -- The Sloc field of nodes that come from the source is set by the parser. + -- For internal nodes, and nodes generated during expansion the Sloc is + -- usually set in the call to the constructor for the node. In general the + -- Sloc value chosen for an internal node is the Sloc of the source node + -- whose processing is responsible for the expansion. For example, the Sloc + -- of an inherited primitive operation is the Sloc of the corresponding + -- derived type declaration. - -- For the nodes of a generic instantiation, the Sloc value is encoded - -- to represent both the original Sloc in the generic unit, and the Sloc - -- of the instantiation itself. See Sinput.ads for details. + -- For the nodes of a generic instantiation, the Sloc value is encoded to + -- represent both the original Sloc in the generic unit, and the Sloc of + -- the instantiation itself. See Sinput.ads for details. -- Subprogram instances create two callable entities: one is the visible -- subprogram instance, and the other is an anonymous subprogram nested @@ -383,12 +382,12 @@ package Sinfo is -- In the following node definitions, all fields, both syntactic and -- semantic, are documented. The one exception is in the case of entities - -- (defining indentifiers, character literals and operator symbols), - -- where the usage of the fields depends on the entity kind. Entity - -- fields are fully documented in the separate package Einfo. + -- (defining indentifiers, character literals and operator symbols), where + -- the usage of the fields depends on the entity kind. Entity fields are + -- fully documented in the separate package Einfo. - -- In the node definitions, three common sets of fields are abbreviated - -- to save both space in the documentation, and also space in the string + -- In the node definitions, three common sets of fields are abbreviated to + -- save both space in the documentation, and also space in the string -- (defined in Tree_Print_Strings) used to print trees. The following -- abbreviations are used: @@ -427,15 +426,14 @@ package Sinfo is -- Note: see under (EXPRESSION) for further details on the use of -- the Paren_Count field to record the number of parentheses levels. - -- Node_Kind is the type used in the Nkind field to indicate the node - -- kind. The actual definition of this type is given later (the reason - -- for this is that we want the descriptions ordered by logical chapter - -- in the RM, but the type definition is reordered to facilitate the - -- definition of some subtype ranges. The individual descriptions of - -- the nodes show how the various fields are used in each node kind, - -- as well as providing logical names for the fields. Functions and - -- procedures are provided for accessing and setting these fields - -- using these logical names. + -- Node_Kind is the type used in the Nkind field to indicate the node kind. + -- The actual definition of this type is given later (the reason for this + -- is that we want the descriptions ordered by logical chapter in the RM, + -- but the type definition is reordered to facilitate the definition of + -- some subtype ranges. The individual descriptions of the nodes show how + -- the various fields are used in each node kind, as well as providing + -- logical names for the fields. Functions and procedures are provided for + -- accessing and setting these fields using these logical names. ----------------------- -- Gigi Restrictions -- @@ -458,118 +456,115 @@ package Sinfo is -- The following flag fields appear in all nodes -- Analyzed (Flag1) - -- This flag is used to indicate that a node (and all its children - -- have been analyzed. It is used to avoid reanalysis of a node that - -- has already been analyzed, both for efficiency and functional - -- correctness reasons. + -- This flag is used to indicate that a node (and all its children have + -- been analyzed. It is used to avoid reanalysis of a node that has + -- already been analyzed, both for efficiency and functional correctness + -- reasons. -- Comes_From_Source (Flag2) - -- This flag is on for any nodes built by the scanner or parser from - -- the source program, and off for any nodes built by the analyzer or + -- This flag is on for any nodes built by the scanner or parser from the + -- source program, and off for any nodes built by the analyzer or -- expander. It indicates that a node comes from the original source. -- This flag is defined in Atree. -- Error_Posted (Flag3) - -- This flag is used to avoid multiple error messages being posted - -- on or referring to the same node. This flag is set if an error - -- message refers to a node or is posted on its source location, - -- and has the effect of inhibiting further messages involving - -- this same node. + -- This flag is used to avoid multiple error messages being posted on or + -- referring to the same node. This flag is set if an error message + -- refers to a node or is posted on its source location, and has the + -- effect of inhibiting further messages involving this same node. -- Has_Dynamic_Length_Check (Flag10-Sem) - -- This flag is present on all nodes. It is set to indicate that one - -- of the routines in unit Checks has generated a length check action - -- which has been inserted at the flagged node. This is used to avoid - -- the generation of duplicate checks. + -- This flag is present on all nodes. It is set to indicate that one of + -- the routines in unit Checks has generated a length check action which + -- has been inserted at the flagged node. This is used to avoid the + -- generation of duplicate checks. -- Has_Dynamic_Range_Check (Flag12-Sem) - -- This flag is present on all nodes. It is set to indicate that one - -- of the routines in unit Checks has generated a range check action - -- which has been inserted at the flagged node. This is used to avoid - -- the generation of duplicate checks. + -- This flag is present on all nodes. It is set to indicate that one of + -- the routines in unit Checks has generated a range check action which + -- has been inserted at the flagged node. This is used to avoid the + -- generation of duplicate checks. ------------------------------------ -- Description of Semantic Fields -- ------------------------------------ - -- The meaning of the syntactic fields is generally clear from their - -- names without any further description, since the names are chosen - -- to correspond very closely to the syntax in the reference manual. - -- This section describes the usage of the semantic fields, which are - -- used to contain additional information determined during semantic - -- analysis. + -- The meaning of the syntactic fields is generally clear from their names + -- without any further description, since the names are chosen to + -- correspond very closely to the syntax in the reference manual. This + -- section describes the usage of the semantic fields, which are used to + -- contain additional information determined during semantic analysis. -- ABE_Is_Certain (Flag18-Sem) - -- This flag is set in an instantiation node or a call node is - -- determined to be sure to raise an ABE. This is used to trigger - -- special handling of such cases, particularly in the instantiation - -- case where we avoid instantiating the body if this flag is set. - -- This flag is also present in an N_Formal_Package_Declaration_Node - -- since formal package declarations are treated like instantiations, - -- but it is always set to False in this context. + -- This flag is set in an instantiation node or a call node is determined + -- to be sure to raise an ABE. This is used to trigger special handling + -- of such cases, particularly in the instantiation case where we avoid + -- instantiating the body if this flag is set. This flag is also present + -- in an N_Formal_Package_Declaration_Node since formal package + -- declarations are treated like instantiations, but it is always set to + -- False in this context. -- Accept_Handler_Records (List5-Sem) - -- This field is present only in an N_Accept_Alternative node. It is - -- used to temporarily hold the exception handler records from an - -- accept statement in a selective accept. These exception handlers - -- will eventually be placed in the Handler_Records list of the - -- procedure built for this accept (see Expand_N_Selective_Accept - -- procedure in Exp_Ch9 for further details). + -- This field is present only in an N_Accept_Alternative node. It is used + -- to temporarily hold the exception handler records from an accept + -- statement in a selective accept. These exception handlers will + -- eventually be placed in the Handler_Records list of the procedure + -- built for this accept (see Expand_N_Selective_Accept procedure in + -- Exp_Ch9 for further details). -- Access_Types_To_Process (Elist2-Sem) -- Present in N_Freeze_Entity nodes for Incomplete or private types. - -- Contains the list of access types which may require specific - -- treatment when the nature of the type completion is completely - -- known. An example of such treatement is the generation of the - -- associated_final_chain. + -- Contains the list of access types which may require specific treatment + -- when the nature of the type completion is completely known. An example + -- of such treatement is the generation of the associated_final_chain. -- Actions (List1-Sem) - -- This field contains a sequence of actions that are associated - -- with the node holding the field. See the individual node types - -- for details of how this field is used, as well as the description - -- of the specific use for a particular node type. + -- This field contains a sequence of actions that are associated with the + -- node holding the field. See the individual node types for details of + -- how this field is used, as well as the description of the specific use + -- for a particular node type. -- Activation_Chain_Entity (Node3-Sem) -- This is used in tree nodes representing task activators (blocks, -- subprogram bodies, package declarations, and task bodies). It is -- initially Empty, and then gets set to point to the entity for the -- declared Activation_Chain variable when the first task is declared. - -- When tasks are declared in the corresponding declarative region - -- this entity is located by name (its name is always _Chain) and - -- the declared tasks are added to the chain. + -- When tasks are declared in the corresponding declarative region this + -- entity is located by name (its name is always _Chain) and the declared + -- tasks are added to the chain. -- Acts_As_Spec (Flag4-Sem) - -- A flag set in the N_Subprogram_Body node for a subprogram body - -- which is acting as its own spec. This flag also appears in the - -- compilation unit node at the library level for such a subprogram - -- (see further description in spec of Lib package). + -- A flag set in the N_Subprogram_Body node for a subprogram body which + -- is acting as its own spec. This flag also appears in the compilation + -- unit node at the library level for such a subprogram (see further + -- description in spec of Lib package). -- Actual_Designated_Subtype (Node2-Sem) - -- Present in N_Free_Statement and N_Explicit_Dereference nodes. If - -- GIGI needs to known the dynamic constrained subtype of the designated + -- Present in N_Free_Statement and N_Explicit_Dereference nodes. If gigi + -- needs to known the dynamic constrained subtype of the designated -- object, this attribute is set to that type. This is done for -- N_Free_Statements for access-to-classwide types and access to - -- unconstrained packed array types, and for N_Explicit_Dereference - -- when the designated type is an unconstrained packed array and the + -- unconstrained packed array types, and for N_Explicit_Dereference when + -- the designated type is an unconstrained packed array and the -- dereference is the prefix of a 'Size attribute reference. -- Aggregate_Bounds (Node3-Sem) -- Present in array N_Aggregate nodes. If the aggregate contains -- component associations this field points to an N_Range node whose -- bounds give the lowest and highest discrete choice values. If the - -- named aggregate contains a dynamic or null choice this field is - -- empty. If the aggregate contains positional elements this field - -- points to an N_Integer_Literal node giving the number of positional - -- elements. Note that if the aggregate contains positional elements - -- and an other choice the N_Integer_Literal only accounts for the - -- number of positional elements. + -- named aggregate contains a dynamic or null choice this field is empty. + -- If the aggregate contains positional elements this field points to an + -- N_Integer_Literal node giving the number of positional elements. Note + -- that if the aggregate contains positional elements and an other choice + -- the N_Integer_Literal only accounts for the number of positional + -- elements. -- All_Others (Flag11-Sem) - -- Present in an N_Others_Choice node. This flag is set in the case - -- of an others exception where all exceptions are to be caught, even - -- those that are not normally handled (in particular the tasking abort - -- signal). This is used for translation of the at end handler into - -- a normal exception handler. + -- Present in an N_Others_Choice node. This flag is set in the case of an + -- others exception where all exceptions are to be caught, even those + -- that are not normally handled (in particular the tasking abort + -- signal). This is used for translation of the at end handler into a + -- normal exception handler. -- Assignment_OK (Flag15-Sem) -- This flag is set in a subexpression node for an object, indicating @@ -580,37 +575,37 @@ package Sinfo is -- limited type objects (such as tasks), setting discriminant fields, -- setting tag values, etc. N_Object_Declaration nodes also have this -- flag defined. Here it is used to indicate that an initialization - -- expression is valid, even where it would normally not be allowed - -- (e.g. where the type involved is limited). + -- expression is valid, even where it would normally not be allowed (e.g. + -- where the type involved is limited). -- Associated_Node (Node4-Sem) -- Present in nodes that can denote an entity: identifiers, character -- literals, operator symbols, expanded names, operator nodes, and - -- attribute reference nodes (all these nodes have an Entity field). - -- This field is also present in N_Aggregate, N_Selected_Component, - -- and N_Extension_Aggregate nodes. This field is used in generic - -- processing to create links between the generic template and the - -- generic copy. See Sem_Ch12.Get_Associated_Node for full details. - -- Note that this field overlaps Entity, which is fine, since, as - -- explained in Sem_Ch12, the normal function of Entity is not - -- required at the point where the Associated_Node is set. Note - -- also, that in generic templates, this means that the Entity field - -- does not necessarily point to an Entity. Since the back end is - -- expected to ignore generic templates, this is harmless. + -- attribute reference nodes (all these nodes have an Entity field). This + -- field is also present in N_Aggregate, N_Selected_Component, and + -- N_Extension_Aggregate nodes. This field is used in generic processing + -- to create links between the generic template and the generic copy. See + -- Sem_Ch12.Get_Associated_Node for full details. Note that this field + -- overlaps Entity, which is fine, since, as explained in Sem_Ch12, the + -- normal function of Entity is not required at the point where the + -- Associated_Node is set. Note also, that in generic templates, this + -- means that the Entity field does not necessarily point to an Entity. + -- Since the back end is expected to ignore generic templates, this is + -- harmless. -- At_End_Proc (Node1) - -- This field is present in an N_Handled_Sequence_Of_Statements node. - -- It contains an identifier reference for the cleanup procedure to - -- be called. See description of this node for further details. + -- This field is present in an N_Handled_Sequence_Of_Statements node. It + -- contains an identifier reference for the cleanup procedure to be + -- called. See description of this node for further details. -- Backwards_OK (Flag6-Sem) - -- A flag present in the N_Assignment_Statement node. It is used only - -- if the type being assigned is an array type, and is set if analysis + -- A flag present in the N_Assignment_Statement node. It is used only if + -- the type being assigned is an array type, and is set if analysis -- determines that it is definitely safe to do the copy backwards, i.e. - -- starting at the highest addressed element. Note that if neither of - -- the flags Forwards_OK or Backwards_OK is set, it means that the - -- front end could not determine that either direction is definitely - -- safe, and a runtime check is required. + -- starting at the highest addressed element. Note that if neither of the + -- flags Forwards_OK or Backwards_OK is set, it means that the front end + -- could not determine that either direction is definitely safe, and a + -- runtime check is required. -- Body_To_Inline (Node3-Sem) -- present in subprogram declarations. Denotes analyzed but unexpanded @@ -621,68 +616,68 @@ package Sinfo is -- which is used directly in later calls to the original subprogram. -- Body_Required (Flag13-Sem) - -- A flag that appears in the N_Compilation_Unit node indicating that - -- the corresponding unit requires a body. For the package case, this - -- indicates that a completion is required. In Ada 95, if the flag - -- is not set for the package case, then a body may not be present. - -- In Ada 83, if the flag is not set for the package case, then a - -- body is optional. For a subprogram declaration, the flag is set - -- except in the case where a pragma Import or Interface applies, - -- in which case no body is permitted (in Ada 83 or Ada 95). + -- A flag that appears in the N_Compilation_Unit node indicating that the + -- corresponding unit requires a body. For the package case, this + -- indicates that a completion is required. In Ada 95, if the flag is not + -- set for the package case, then a body may not be present. In Ada 83, + -- if the flag is not set for the package case, then body is optional. + -- For a subprogram declaration, the flag is set except in the case where + -- a pragma Import or Interface applies, in which case no body is + -- permitted (in Ada 83 or Ada 95). -- By_Ref (Flag5-Sem) -- A flag present in the N_Return_Statement_Node. It is set when the - -- returned expression is already allocated on the secondary stack - -- and thus the result is passed by reference rather than copied - -- another time. + -- returned expression is already allocated on the secondary stack and + -- thus the result is passed by reference rather than copied another + -- time. -- Check_Address_Alignment (Flag11-Sem) -- A flag present in N_Attribute_Definition clause for a 'Address - -- attribute definition. This flag is set if a dynamic check should - -- be generated at the freeze point for the entity to which this - -- address clause applies. The reason that we need this flag is that - -- we want to check for range checks being suppressed at the point - -- where the attribute definition clause is given, rather than - -- testing this at the freeze point. + -- attribute definition. This flag is set if a dynamic check should be + -- generated at the freeze point for the entity to which this address + -- clause applies. The reason that we need this flag is that we want to + -- check for range checks being suppressed at the point where the + -- attribute definition clause is given, rather than testing this at the + -- freeze point. -- Compile_Time_Known_Aggregate (Flag18-Sem) - -- Present in N_Aggregate nodes. Set for aggregates which can be - -- fully evaluated at compile time without raising constraint error. - -- Such aggregates can be passed as is to Gigi without any expansion. - -- See Sem_Aggr for the specific conditions under which an aggregate - -- has this flag set. See also the flag Static_Processing_OK. + -- Present in N_Aggregate nodes. Set for aggregates which can be fully + -- evaluated at compile time without raising constraint error. Such + -- aggregates can be passed as is to Gigi without any expansion. See + -- Sem_Aggr for the specific conditions under which an aggregate has this + -- flag set. See also the flag Static_Processing_OK. -- Condition_Actions (List3-Sem) - -- This field appears in else-if nodes and in the iteration scheme - -- node for while loops. This field is only used during semantic - -- processing to temporarily hold actions inserted into the tree. - -- In the tree passed to gigi, the condition actions field is always - -- set to No_List. For details on how this field is used, see the - -- routine Insert_Actions in package Exp_Util, and also the expansion - -- routines for the relevant nodes. + -- This field appears in else-if nodes and in the iteration scheme node + -- for while loops. This field is only used during semantic processing to + -- temporarily hold actions inserted into the tree. In the tree passed to + -- gigi, the condition actions field is always set to No_List. For + -- details on how this field is used, see the routine Insert_Actions in + -- package Exp_Util, and also the expansion routines for the relevant + -- nodes. -- Controlling_Argument (Node1-Sem) - -- This field is set in procedure and function call nodes if the call - -- is a dispatching call (it is Empty for a non-dispatching call). - -- It indicates the source of the controlling tag for the call. For - -- Procedure calls, the Controlling_Argument is one of the actuals. - -- For a function that has a dispatching result, it is an entity in - -- the context of the call that can provide a tag, or else it is the - -- tag of the root type of the class. It can also specify a tag - -- directly rather than being a tagged object. The latter is needed - -- by the implementations of AI-239 and AI-260. + -- This field is set in procedure and function call nodes if the call is + -- a dispatching call (it is Empty for a non-dispatching call). It + -- indicates the source of the call's controlling tag. For procedure + -- calls, the Controlling_Argument is one of the actuals. For function + -- that has a dispatching result, it is an entity in the context of the + -- call that can provide a tag, or else it is the tag of the root type of + -- the class. It can also specify a tag directly rather than being a + -- tagged object. The latter is needed by the implementations of AI-239 + -- and AI-260. -- Conversion_OK (Flag14-Sem) - -- A flag set on type conversion nodes to indicate that the conversion - -- is to be considered as being valid, even though it is the case that - -- the conversion is not valid Ada. This is used for the Enum_Rep, - -- Fixed_Value and Integer_Value attributes, for internal conversions - -- done for fixed-point operations, and for certain conversions for - -- calls to initialization procedures. If Conversion_OK is set, then - -- Etype must be set (the analyzer assumes that Etype has been set). - -- For the case of fixed-point operands, it also indicates that the - -- conversion is to be a direct conversion of the underlying integer - -- result, with no regard to the small operand. + -- A flag set on type conversion nodes to indicate that the conversion is + -- to be considered as being valid, even though it is the case that the + -- conversion is not valid Ada. This is used for Enum_Rep, Fixed_Value + -- and Integer_Value attributes, for internal conversions done for + -- fixed-point operations, and for certain conversions for calls to + -- initialization procedures. If Conversion_OK is set, then Etype must be + -- set (the analyzer assumes that Etype has been set). For the case of + -- fixed-point operands, it also indicates that the conversion is to be + -- direct conversion of the underlying integer result, with no regard to + -- the small operand. -- Corresponding_Body (Node5-Sem) -- This field is set in subprogram declarations, package declarations, @@ -714,11 +709,11 @@ package Sinfo is -- Corresponding_Spec (Node5-Sem) -- This field is set in subprogram, package, task, and protected body -- nodes, where it points to the defining entity in the corresponding - -- spec. The attribute is also set in N_With_Clause nodes, where - -- it points to the defining entity for the with'ed spec, and in - -- a subprogram renaming declaration when it is a Renaming_As_Body. - -- The field is Empty if there is no corresponding spec, as in the - -- case of a subprogram body that serves as its own spec. + -- spec. The attribute is also set in N_With_Clause nodes, where it + -- points to the defining entity for the with'ed spec, and in a + -- subprogram renaming declaration when it is a Renaming_As_Body. The + -- field is Empty if there is no corresponding spec, as in the case of a + -- subprogram body that serves as its own spec. -- Corresponding_Stub (Node3-Sem) -- This field is present in an N_Subunit node. It holds the node in @@ -732,29 +727,28 @@ package Sinfo is -- for the discriminant checking function for the variant. -- Debug_Statement (Node3) - -- This field is present in an N_Pragma node. It is used only for - -- a Debug pragma or pragma Assert with a second parameter. The - -- parameter is of the form of an expression, as required by the - -- pragma syntax, but is actually a procedure call. To simplify + -- This field is present in an N_Pragma node. It is used only for a Debug + -- pragma. The parameter is of the form of an expression, as required by + -- the pragma syntax, but is actually a procedure call. To simplify -- semantic processing, the parser creates a copy of the argument -- rearranged into a procedure call statement and places it in the - -- Debug_Statement field. Note that this field is considered a - -- syntactic field, since it is created by the parser. + -- Debug_Statement field. Note that this field is considered syntactic + -- field, since it is created by the parser. -- Default_Expression (Node5-Sem) - -- This field is Empty if there is no default expression. If there - -- is a simple default expression (one with no side effects), then - -- this field simply contains a copy of the Expression field (both - -- point to the tree for the default expression). Default_Expression - -- is used for conformance checking. + -- This field is Empty if there is no default expression. If there is a + -- simple default expression (one with no side effects), then this field + -- simply contains a copy of the Expression field (both point to the tree + -- for the default expression). Default_Expression is used for + -- conformance checking. -- Delay_Finalize_Attach (Flag14-Sem) -- This flag is present in an N_Object_Declaration node. If it is set, -- then in the case of a controlled type being declared and initialized, -- the normal code for attaching the result to the appropriate local -- finalization list is suppressed. This is used for functions that - -- return controlled types without using the secondary stack, where - -- it is the caller who must do the attachment. + -- return controlled types without using the secondary stack, where it is + -- the caller who must do the attachment. -- Discr_Check_Funcs_Built (Flag11-Sem) -- This flag is present in N_Full_Type_Declaration nodes. It is set when @@ -783,16 +777,16 @@ package Sinfo is -- is required. It is not determined who deals with this flag (???). -- Do_Overflow_Check (Flag17-Sem) - -- This flag is set on an operator where an overflow check is required - -- on the operation. The actual check is dealt with by the backend - -- (all the front end does is to set the flag). The other cases where - -- this flag is used is on a Type_Conversion node and for attribute - -- reference nodes. For a type conversion, it means that the conversion - -- is from one base type to another, and the value may not fit in the - -- target base type. See also the description of Do_Range_Check for - -- this case. The only attribute references which use this flag are - -- Pred and Succ, where it means that the result should be checked - -- for going outside the base range. + -- This flag is set on an operator where an overflow check is required on + -- the operation. The actual check is dealt with by the backend (all the + -- front end does is to set the flag). The other cases where this flag is + -- used is on a Type_Conversion node and for attribute reference nodes. + -- For a type conversion, it means that the conversion is from one base + -- type to another, and the value may not fit in the target base type. + -- See also the description of Do_Range_Check for this case. The only + -- attribute references which use this flag are Pred and Succ, where it + -- means that the result should be checked for going outside the base + -- range. -- Do_Range_Check (Flag9-Sem) -- This flag is set on an expression which appears in a context where @@ -808,27 +802,27 @@ package Sinfo is -- target type is determined from the type of the array, which is -- referenced by the Prefix of the N_Indexed_Component node. - -- Argument expression for a parameter, appearing either directly - -- in the Parameter_Associations list of a call or as the Expression - -- of an N_Parameter_Association node that appears in this list. In - -- either case, the check is against the type of the formal. Note - -- that the flag is relevant only in IN and IN OUT parameters, and - -- will be ignored for OUT parameters, where no check is required - -- in the call, and if a check is required on the return, it is - -- generated explicitly with a type conversion. + -- Argument expression for a parameter, appearing either directly in + -- the Parameter_Associations list of a call or as the Expression of an + -- N_Parameter_Association node that appears in this list. In either + -- case, the check is against the type of the formal. Note that the + -- flag is relevant only in IN and IN OUT parameters, and will be + -- ignored for OUT parameters, where no check is required in the call, + -- and if a check is required on the return, it is generated explicitly + -- with a type conversion. -- Initialization expression for the initial value in an object -- declaration. In this case the Do_Range_Check flag is set on -- the initialization expression, and the check is against the -- range of the type of the object being declared. - -- The expression of a type conversion. In this case the range check - -- is against the target type of the conversion. See also the use of - -- Do_Overflow_Check on a type conversion. The distinction is that - -- the overflow check protects against a value that is outside the - -- range of the target base type, whereas a range check checks that - -- the resulting value (which is a value of the base type of the - -- target type), satisfies the range constraint of the target type. + -- The expression of a type conversion. In this case the range check is + -- against the target type of the conversion. See also the use of + -- Do_Overflow_Check on a type conversion. The distinction is that the + -- overflow check protects against a value that is outside the range of + -- the target base type, whereas a range check checks that the + -- resulting value (which is a value of the base type of the target + -- type), satisfies the range constraint of the target type. -- Note: when a range check is required in contexts other than those -- listed above (e.g. in a return statement), an additional type @@ -836,11 +830,11 @@ package Sinfo is -- Do_Storage_Check (Flag17-Sem) -- This flag is set in an N_Allocator node to indicate that a storage - -- check is required for the allocation, or in an N_Subprogram_Body - -- node to indicate that a stack check is required in the subprogram - -- prolog. The N_Allocator case is handled by the routine that expands - -- the call to the runtime routine. The N_Subprogram_Body case is - -- handled by the backend, and all the semantics does is set the flag. + -- check is required for the allocation, or in an N_Subprogram_Body node + -- to indicate that a stack check is required in the subprogram prolog. + -- The N_Allocator case is handled by the routine that expands the call + -- to the runtime routine. The N_Subprogram_Body case is handled by the + -- backend, and all the semantics does is set the flag. -- Do_Tag_Check (Flag13-Sem) -- This flag is set on an N_Assignment_Statement, N_Function_Call, @@ -879,10 +873,10 @@ package Sinfo is -- actions at an appropriate place in the tree to get elaborated at the -- right time. For conditional expressions, we have to be sure that the -- actions for the Else branch are only elaborated if the condition is - -- False. The Else_Actions field is used as a temporary parking place - -- for these actions. The final tree is always rewritten to eliminate - -- the need for this field, so in the tree passed to Gigi, this field - -- is always set to No_List. + -- False. The Else_Actions field is used as a temporary parking place for + -- these actions. The final tree is always rewritten to eliminate the + -- need for this field, so in the tree passed to Gigi, this field is + -- always set to No_List. -- Enclosing_Variant (Node2-Sem) -- This field is present in the N_Variant node and identifies the @@ -891,142 +885,137 @@ package Sinfo is -- processing of the variant part of a record type. -- Entity (Node4-Sem) - -- Appears in all direct names (identifier, character literal, - -- operator symbol), as well as expanded names, and attributes that - -- denote entities, such as 'Class. Points to the entity for the - -- corresponding defining occurrence. Set after name resolution. - -- In the case of identifiers in a WITH list, the corresponding - -- defining occurrence is in a separately compiled file, and this - -- pointer must be set using the library Load procedure. Note that - -- during name resolution, the value in Entity may be temporarily - -- incorrect (e.g. during overload resolution, Entity is initially - -- set to the first possible correct interpretation, and then later - -- modified if necessary to contain the correct value after resolution). - -- Note that this field overlaps Associated_Node, which is used during - -- generic processing (see Sem_Ch12 for details). Note also that in - -- generic templates, this means that the Entity field does not always - -- point to an Entity. Since the back end is expected to ignore - -- generic templates, this is harmless. + -- Appears in all direct names (identifier, character literal, operator + -- symbol), as well as expanded names, and attributes that denote + -- entities, such as 'Class. Points to the entity for the corresponding + -- defining occurrence. Set after name resolution. In the case of + -- identifiers in a WITH list, the corresponding defining occurrence is + -- in a separately compiled file, and this pointer must be set using the + -- library Load procedure. Note that during name resolution, the value in + -- Entity may be temporarily incorrect (e.g. during overload resolution, + -- Entity is initially set to the first possible correct interpretation, + -- and then later modified if necessary to contain the correct value + -- after resolution). Note that this field overlaps Associated_Node, + -- which is used during generic processing (see Sem_Ch12 for details). + -- Note also that in generic templates, this means that the Entity field + -- does not always point to an Entity. Since the back end is expected to + -- ignore generic templates, this is harmless. -- Entity_Or_Associated_Node (Node4-Sem) - -- A synonym for both Entity and Associated_Node. Used by convention - -- in the code when referencing this field in cases where it is not - -- known whether the field contains an Entity or an Associated_Node. + -- A synonym for both Entity and Associated_Node. Used by convention in + -- the code when referencing this field in cases where it is not known + -- whether the field contains an Entity or an Associated_Node. -- Etype (Node5-Sem) - -- Appears in all expression nodes, all direct names, and all - -- entities. Points to the entity for the related type. Set after - -- type resolution. Normally this is the actual subtype of the - -- expression. However, in certain contexts such as the right side - -- of an assignment, subscripts, arguments to calls, returned value - -- in a function, initial value etc. it is the desired target type. - -- In the event that this is different from the actual type, the - -- Do_Range_Check flag will be set if a range check is required. - -- Note: if the Is_Overloaded flag is set, then Etype points to - -- an essentially arbitrary choice from the possible set of types. + -- Appears in all expression nodes, all direct names, and all entities. + -- Points to the entity for the related type. Set after type resolution. + -- Normally this is the actual subtype of the expression. However, in + -- certain contexts such as the right side of an assignment, subscripts, + -- arguments to calls, returned value in a function, initial value etc. + -- it is the desired target type. In the event that this is different + -- from the actual type, the Do_Range_Check flag will be set if a range + -- check is required. Note: if the Is_Overloaded flag is set, then Etype + -- points to an essentially arbitrary choice from the possible set of + -- types. -- Exception_Junk (Flag7-Sem) - -- This flag is set in a various nodes appearing in a statement - -- sequence to indicate that the corresponding node is an artifact - -- of the generated code for exception handling, and should be - -- ignored when analyzing the control flow of the relevant sequence - -- of statements (e.g. to check that it does not end with a bad - -- return statement). + -- This flag is set in a various nodes appearing in a statement sequence + -- to indicate that the corresponding node is an artifact of the + -- generated code for exception handling, and should be ignored when + -- analyzing the control flow of the relevant sequence of statements + -- (e.g. to check that it does not end with a bad return statement). -- Expansion_Delayed (Flag11-Sem) - -- Set on aggregates and extension aggregates that need a top-down - -- rather than bottom up expansion. Typically aggregate expansion - -- happens bottom up. For nested aggregates the expansion is delayed - -- until the enclosing aggregate itself is expanded, e.g. in the context - -- of a declaration. To delay it we set this flag. This is done to - -- avoid creating a temporary for each level of a nested aggregates, - -- and also to prevent the premature generation of constraint checks. - -- This is also a requirement if we want to generate the proper - -- attachment to the internal finalization lists (for record with - -- controlled components). Top down expansion of aggregates is also - -- used for in-place array aggregate assignment or initialization. - -- When the full context is known, the target of the assignment or - -- initialization is used to generate the left-hand side of individual - -- assignment to each sub-component. + -- Set on aggregates and extension aggregates that need a top-down rather + -- than bottom up expansion. Typically aggregate expansion happens bottom + -- up. For nested aggregates the expansion is delayed until the enclosing + -- aggregate itself is expanded, e.g. in the context of a declaration. To + -- delay it we set this flag. This is done to avoid creating a temporary + -- for each level of a nested aggregates, and also to prevent the + -- premature generation of constraint checks. This is also a requirement + -- if we want to generate the proper attachment to the internal + -- finalization lists (for record with controlled components). Top down + -- expansion of aggregates is also used for in-place array aggregate + -- assignment or initialization. When the full context is known, the + -- target of the assignment or initialization is used to generate the + -- left-hand side of individual assignment to each sub-component. -- First_Inlined_Subprogram (Node3-Sem) - -- Present in the N_Compilation_Unit node for the main program. Points - -- to a chain of entities for subprograms that are to be inlined. The + -- Present in the N_Compilation_Unit node for the main program. Points to + -- a chain of entities for subprograms that are to be inlined. The -- Next_Inlined_Subprogram field of these entities is used as a link - -- pointer with Empty marking the end of the list. This field is Empty - -- if there are no inlined subprograms or inlining is not active. + -- pointer with Empty marking the end of the list. This field is Empty if + -- there are no inlined subprograms or inlining is not active. -- First_Named_Actual (Node4-Sem) - -- Present in procedure call statement and function call nodes, and - -- also in Intrinsic nodes. Set during semantic analysis to point to - -- the first named parameter where parameters are ordered by declaration - -- order (as opposed to the actual order in the call which may be - -- different due to named associations). Note: this field points to the - -- explicit actual parameter itself, not the N_Parameter_Association - -- node (its parent). + -- Present in procedure call statement and function call nodes, and also + -- in Intrinsic nodes. Set during semantic analysis to point to the first + -- named parameter where parameters are ordered by declaration order (as + -- opposed to the actual order in the call which may be different due to + -- named associations). Note: this field points to the explicit actual + -- parameter itself, not the N_Parameter_Association node (its parent). -- First_Real_Statement (Node2-Sem) -- Present in N_Handled_Sequence_Of_Statements node. Normally set to - -- Empty. Used only when declarations are moved into the statement - -- part of a construct as a result of wrapping an AT END handler that - -- is required to cover the declarations. In this case, this field is - -- used to remember the location in the statements list of the first - -- real statement, i.e. the statement that used to be first in the - -- statement list before the declarations were prepended. + -- Empty. Used only when declarations are moved into the statement part + -- of a construct as a result of wrapping an AT END handler that is + -- required to cover the declarations. In this case, this field is used + -- to remember the location in the statements list of the first real + -- statement, i.e. the statement that used to be first in the statement + -- list before the declarations were prepended. -- First_Subtype_Link (Node5-Sem) - -- Present in N_Freeze_Entity node for an anonymous base type that - -- is implicitly created by the declaration of a first subtype. It - -- points to the entity for the first subtype. + -- Present in N_Freeze_Entity node for an anonymous base type that is + -- implicitly created by the declaration of a first subtype. It points to + -- the entity for the first subtype. -- Float_Truncate (Flag11-Sem) - -- A flag present in type conversion nodes. This is used for float - -- to integer conversions where truncation is required rather than - -- rounding. Note that Gigi does not handle type conversions from real - -- to integer with rounding (see Expand_N_Type_Conversion). + -- A flag present in type conversion nodes. This is used for float to + -- integer conversions where truncation is required rather than rounding. + -- Note that Gigi does not handle type conversions from real to integer + -- with rounding (see Expand_N_Type_Conversion). -- Forwards_OK (Flag5-Sem) - -- A flag present in the N_Assignment_Statement node. It is used only - -- if the type being assigned is an array type, and is set if analysis + -- A flag present in the N_Assignment_Statement node. It is used only if + -- the type being assigned is an array type, and is set if analysis -- determines that it is definitely safe to do the copy forwards, i.e. - -- starting at the lowest addressed element. Note that if neither of - -- the flags Forwards_OK or Backwards_OK is set, it means that the - -- front end could not determine that either direction is definitely - -- safe, and a runtime check is required. + -- starting at the lowest addressed element. Note that if neither of the + -- flags Forwards_OK or Backwards_OK is set, it means that the front end + -- could not determine that either direction is definitely safe, and a + -- runtime check is required. -- From_At_Mod (Flag4-Sem) -- This flag is set on the attribute definition clause node that is -- generated by a transformation of an at mod phrase in a record - -- representation clause. This is used to give slightly different - -- (Ada 83 compatible) semantics to such a clause, namely it is - -- used to specify a minimum acceptable alignment for the base type - -- and all subtypes. In Ada 95 terms, the actual alignment of the - -- base type and all subtypes must be a multiple of the given value, - -- and the representation clause is considered to be type specific - -- instead of subtype specific. + -- representation clause. This is used to give slightly different (Ada 83 + -- compatible) semantics to such a clause, namely it is used to specify a + -- minimum acceptable alignment for the base type and all subtypes. In + -- Ada 95 terms, the actual alignment of the base type and all subtypes + -- must be a multiple of the given value, and the representation clause + -- is considered to be type specific instead of subtype specific. -- From_Default (Flag6-Sem) - -- This flag is set on the subprogram renaming declaration created in - -- an instance for a formal subprogram, when the formal is declared - -- with a box, and there is no explicit actual. If the flag is present, - -- the declaration is treated as an implicit reference to the formal in - -- the ali file. + -- This flag is set on the subprogram renaming declaration created in an + -- instance for a formal subprogram, when the formal is declared with a + -- box, and there is no explicit actual. If the flag is present, the + -- declaration is treated as an implicit reference to the formal in the + -- ali file. -- Generic_Parent (Node5-Sem) - -- Generic_parent is defined on declaration nodes that are instances. - -- The value of Generic_Parent is the generic entity from which the - -- instance is obtained. Generic_Parent is also defined for the renaming + -- Generic_parent is defined on declaration nodes that are instances. The + -- value of Generic_Parent is the generic entity from which the instance + -- is obtained. Generic_Parent is also defined for the renaming -- declarations and object declarations created for the actuals in an -- instantiation. The generic parent of such a declaration is the -- corresponding generic association in the Instantiation node. -- Generic_Parent_Type (Node4-Sem) - -- Generic_Parent_Type is defined on Subtype_Declaration nodes for - -- the actuals of formal private and derived types. Within the instance, - -- the operations on the actual are those inherited from the parent. - -- For a formal private type, the parent type is the generic type - -- itself. The Generic_Parent_Type is also used in an instance to - -- determine whether a private operation overrides an inherited one. + -- Generic_Parent_Type is defined on Subtype_Declaration nodes for the + -- actuals of formal private and derived types. Within the instance, the + -- operations on the actual are those inherited from the parent. For a + -- formal private type, the parent type is the generic type itself. The + -- Generic_Parent_Type is also used in an instance to determine whether a + -- private operation overrides an inherited one. -- Handler_List_Entry (Node2-Sem) -- This field is present in N_Object_Declaration nodes. It is set only @@ -1037,75 +1026,75 @@ package Sinfo is -- this is required, see Exp_Ch11.Remove_Handler_Entries. -- Has_No_Elaboration_Code (Flag17-Sem) - -- A flag that appears in the N_Compilation_Unit node to indicate - -- whether or not elaboration code is present for this unit. It is - -- initially set true for subprogram specs and bodies and for all - -- generic units and false for non-generic package specs and bodies. - -- Gigi may set the flag in the non-generic package case if it - -- determines that no elaboration code is generated. Note that this - -- flag is not related to the Is_Preelaborated status, there can be - -- preelaborated packages that generate elaboration code, and non- - -- preelaborated packages which do not generate elaboration code. + -- A flag that appears in the N_Compilation_Unit node to indicate whether + -- or not elaboration code is present for this unit. It is initially set + -- true for subprogram specs and bodies and for all generic units and + -- false for non-generic package specs and bodies. Gigi may set the flag + -- in the non-generic package case if it determines that no elaboration + -- code is generated. Note that this flag is not related to the + -- Is_Preelaborated status, there can be preelaborated packages that + -- generate elaboration code, and non- preelaborated packages which do + -- not generate elaboration code. -- Has_Priority_Pragma (Flag6-Sem) -- A flag present in N_Subprogram_Body, N_Task_Definition and - -- N_Protected_Definition nodes to flag the presence of either - -- a Priority or Interrupt_Priority pragma in the declaration - -- sequence (public or private in the task and protected cases) + -- N_Protected_Definition nodes to flag the presence of either a Priority + -- or Interrupt_Priority pragma in the declaration sequence (public or + -- private in the task and protected cases) -- Has_Private_View (Flag11-Sem) - -- A flag present in generic nodes that have an entity, to indicate - -- that the node has a private type. Used to exchange private - -- and full declarations if the visibility at instantiation is - -- different from the visibility at generic definition. + -- A flag present in generic nodes that have an entity, to indicate that + -- the node has a private type. Used to exchange private and full + -- declarations if the visibility at instantiation is different from the + -- visibility at generic definition. -- Has_Storage_Size_Pragma (Flag5-Sem) - -- A flag present in an N_Task_Definition node to flag the presence - -- of a Storage_Size pragma + -- A flag present in an N_Task_Definition node to flag the presence of a + -- Storage_Size pragma. -- Has_Task_Info_Pragma (Flag7-Sem) - -- A flag present in an N_Task_Definition node to flag the presence - -- of a Task_Info pragma. Used to detect duplicate pragmas. + -- A flag present in an N_Task_Definition node to flag the presence of a + -- Task_Info pragma. Used to detect duplicate pragmas. -- Has_Task_Name_Pragma (Flag8-Sem) - -- A flag present in N_Task_Definition nodes to flag the presence - -- of a Task_Name pragma in the declaration sequence for the task. + -- A flag present in N_Task_Definition nodes to flag the presence of a + -- Task_Name pragma in the declaration sequence for the task. -- Has_Wide_Character (Flag11-Sem) - -- Present in string literals, set if any wide character (i.e. a - -- character code outside the Character range) appears in the string. + -- Present in string literals, set if any wide character (i.e. character + -- code outside the Character range) appears in the string. -- Hidden_By_Use_Clause (Elist4-Sem) -- An entity list present in use clauses that appear within -- instantiations. For the resolution of local entities, entities - -- introduced by these use clauses have priority over global ones, - -- and outer entities must be explicitly hidden/restored on exit. + -- introduced by these use clauses have priority over global ones, and + -- outer entities must be explicitly hidden/restored on exit. -- Implicit_With (Flag16-Sem) -- This flag is set in the N_With_Clause node that is implicitly - -- generated for runtime units that are loaded by the expander, and - -- also for package System, if it is loaded implicitly by a use of - -- the 'Address or 'Tag attribute + -- generated for runtime units that are loaded by the expander, and also + -- for package System, if it is loaded implicitly by a use of the + -- 'Address or 'Tag attribute. -- Includes_Infinities (Flag11-Sem) - -- This flag is present in N_Range nodes. It is set for the range - -- of unconstrained float types defined in Standard, which include - -- not only the given range of values, but also legtitimately can - -- include infinite values. This flag is false for any float type - -- for which an explicit range is given by the programmer, even if - -- that range is identical to the range for float. + -- This flag is present in N_Range nodes. It is set for the range of + -- unconstrained float types defined in Standard, which include not only + -- the given range of values, but also legtitimately can include infinite + -- values. This flag is false for any float type for which an explicit + -- range is given by the programmer, even if that range is identical to + -- the range for Float. -- Instance_Spec (Node5-Sem) -- This field is present in generic instantiation nodes, and also in -- formal package declaration nodes (formal package declarations are - -- treated in a manner very similar to package instantiations). It - -- points to the node for the spec of the instance, inserted as part - -- of the semantic processing for instantiations in Sem_Ch12. + -- treated in a manner very similar to package instantiations). It points + -- to the node for the spec of the instance, inserted as part of the + -- semantic processing for instantiations in Sem_Ch12. -- Is_Asynchronous_Call_Block (Flag7-Sem) -- A flag set in a Block_Statement node to indicate that it is the - -- expansion of an asynchronous entry call. Such a block needs a - -- cleanup handler to assure that the call is cancelled. + -- expansion of an asynchronous entry call. Such a block needs cleanup + -- handler to assure that the call is cancelled. -- Is_Component_Left_Opnd (Flag13-Sem) -- Is_Component_Right_Opnd (Flag14-Sem) @@ -1114,59 +1103,59 @@ package Sinfo is -- concatenation nodes in instances. -- Is_Controlling_Actual (Flag16-Sem) - -- This flag is set on in an expression that is a controlling argument - -- in a dispatching call. It is off in all other cases. See Sem_Disp - -- for details of its use. + -- This flag is set on in an expression that is a controlling argument in + -- a dispatching call. It is off in all other cases. See Sem_Disp for + -- details of its use. -- Is_In_Discriminant_Check (Flag11-Sem) - -- This flag is present in a selected component, and is used to - -- indicate that the reference occurs within a discriminant check. - -- The significance is that optimizations based on assuming that - -- the discriminant check has a correct value cannot be performed - -- in this case (or the disriminant check may be optimized away!) + -- This flag is present in a selected component, and is used to indicate + -- that the reference occurs within a discriminant check. The + -- significance is that optimizations based on assuming that the + -- discriminant check has a correct value cannot be performed in this + -- case (or the disriminant check may be optimized away!) -- Is_Machine_Number (Flag11-Sem) - -- This flag is set in an N_Real_Literal node to indicate that the - -- value is a machine number. This avoids some unnecessary cases - -- of converting real literals to machine numbers. + -- This flag is set in an N_Real_Literal node to indicate that the value + -- is a machine number. This avoids some unnecessary cases of converting + -- real literals to machine numbers. -- Is_Null_Loop (Flag16-Sem) - -- This flag is set in an N_Loop_Statement node if the corresponding - -- loop can be determined to be null at compile time. This is used to - -- suppress any warnings that would otherwise be issued inside the - -- loop since they are probably not useful. + -- This flag is set in an N_Loop_Statement node if the corresponding loop + -- can be determined to be null at compile time. This is used to suppress + -- any warnings that would otherwise be issued inside the loop since they + -- are probably not useful. -- Is_Overloaded (Flag5-Sem) -- A flag present in all expression nodes. Used temporarily during - -- overloading determination. The setting of this flag is not - -- relevant once overloading analysis is complete. + -- overloading determination. The setting of this flag is not relevant + -- once overloading analysis is complete. -- Is_Power_Of_2_For_Shift (Flag13-Sem) -- A flag present only in N_Op_Expon nodes. It is set when the - -- exponentiation is of the forma 2 ** N, where the type of N is - -- an unsigned integral subtype whose size does not exceed the size - -- of Standard_Integer (i.e. a type that can be safely converted to - -- Natural), and the exponentiation appears as the right operand of - -- an integer multiplication or an integer division where the dividend - -- is unsigned. It is also required that overflow checking is off for - -- both the exponentiation and the multiply/divide node. If this set - -- of conditions holds, and the flag is set, then the division or + -- exponentiation is of the forma 2 ** N, where the type of N is an + -- unsigned integral subtype whose size does not exceed the size of + -- Standard_Integer (i.e. a type that can be safely converted to + -- Natural), and the exponentiation appears as the right operand of an + -- integer multiplication or an integer division where the dividend is + -- unsigned. It is also required that overflow checking is off for both + -- the exponentiation and the multiply/divide node. If this set of + -- conditions holds, and the flag is set, then the division or -- multiplication can be (and is) converted to a shift. -- Is_Overloaded (Flag5-Sem) -- A flag present in all expression nodes. Used temporarily during - -- overloading determination. The setting of this flag is not - -- relevant once overloading analysis is complete. + -- overloading determination. The setting of this flag is not relevant + -- once overloading analysis is complete. -- Is_Protected_Subprogram_Body (Flag7-Sem) -- A flag set in a Subprogram_Body block to indicate that it is the - -- implemenation of a protected subprogram. Such a body needs a - -- cleanup handler to make sure that the associated protected object - -- is unlocked when the subprogram completes. + -- implemenation of a protected subprogram. Such a body needs cleanup + -- handler to make sure that the associated protected object is unlocked + -- when the subprogram completes. -- Is_Static_Expression (Flag6-Sem) - -- Indicates that an expression is a static expression (RM 4.9). See - -- spec of package Sem_Eval for full details on the use of this flag. + -- Indicates that an expression is a static expression (RM 4.9). See spec + -- of package Sem_Eval for full details on the use of this flag. -- Is_Subprogram_Descriptor (Flag16-Sem) -- Present in N_Object_Declaration, and set only for the object @@ -1181,19 +1170,19 @@ package Sinfo is -- allocated but not activated when the allocator completes abnormally. -- Is_Task_Master (Flag5-Sem) - -- A flag set in a Subprogram_Body, Block_Statement or Task_Body node - -- to indicate that the construct is a task master (i.e. has declared - -- tasks or declares an access to a task type). + -- A flag set in a Subprogram_Body, Block_Statement or Task_Body node to + -- indicate that the construct is a task master (i.e. has declared tasks + -- or declares an access to a task type). -- Itype (Node1-Sem) - -- Used in N_Itype_Reference node to reference an itype for which it - -- is important to ensure that it is defined. See description of this - -- node for further details. + -- Used in N_Itype_Reference node to reference an itype for which it is + -- important to ensure that it is defined. See description of this node + -- for further details. -- Kill_Range_Check (Flag11-Sem) -- Used in an N_Unchecked_Type_Conversion node to indicate that the - -- result should not be subjected to range checks. This is used for - -- the implementation of Normalize_Scalars. + -- result should not be subjected to range checks. This is used for the + -- implementation of Normalize_Scalars. -- Label_Construct (Node2-Sem) -- Used in an N_Implicit_Label_Declaration node. Refers to an N_Label, @@ -1202,36 +1191,35 @@ package Sinfo is -- itself, but it is useful in the implementation of ASIS queries. -- Library_Unit (Node4-Sem) - -- In a stub node, the Library_Unit field points to the compilation unit - -- node of the corresponding subunit. + -- In a stub node, Library_Unit points to the compilation unit node of + -- the corresponding subunit. -- - -- In a with clause node, the Library_Unit field points to the spec - -- of the with'ed unit. + -- In a with clause node, Library_Unit points to the spec of the with'ed + -- unit. -- - -- In a compilation unit node, the use of this field depends on - -- the unit type: + -- In a compilation unit node, the usage depends on the unit type: -- - -- For a subprogram body, the Library_Unit field points to the - -- compilation unit node of the corresponding spec, unless - -- Acts_As_Spec is set, in which case it points to itself. + -- For a subprogram body, Library_Unit points to the compilation unit + -- node of the corresponding spec, unless Acts_As_Spec is set, in which + -- case it points to itself. -- - -- For a package body, the Library_Unit field points to the - -- compilation unit node of the corresponding spec. + -- For a package body, Library_Unit points to the compilation unit of + -- the corresponding package spec. -- - -- For a subprogram spec to which pragma Inline applies, the - -- Library_Unit field points to the compilation unit node of - -- the corresponding body, if inlining is active. + -- For a subprogram spec to which pragma Inline applies, Library_Unit + -- points to the compilation unit node of the corresponding body, if + -- inlining is active. -- - -- For a generic declaration, the Library_Unit field points - -- to the compilation unit node of the corresponding generic body. + -- For a generic declaration, Library_Unit points to the compilation + -- unit node of the corresponding generic body. -- - -- For a subunit, the Library_Unit field points to the compilation - -- unit node of the parent body. + -- For a subunit, Library_Unit points to the compilation unit node of + -- the parent body. -- - -- Note that this field is not used to hold the parent pointer for a - -- child unit (which might in any case need to use it for some other - -- purpose as described above). Instead for a child unit, implicit - -- with's are generated for all parents. + -- Note that this field is not used to hold the parent pointer for child + -- unit (which might in any case need to use it for some other purpose as + -- described above). Instead for a child unit, implicit with's are + -- generated for all parents. -- Loop_Actions (List2-Sem) -- A list present in Component_Association nodes in array aggregates. @@ -1239,76 +1227,75 @@ package Sinfo is -- they may need to be evaluated anew each time through. -- Limited_View_Installed (Flag18-Sem) - -- Present in With_Clauses and in package specifications. If set on a + -- Present in With_Clauses and in package specifications. If set on -- with_clause, it indicates that this clause has created the current - -- limited view of the designated package. On a package specification, - -- it indicates that the limited view has already been created because - -- the package is mentioned in a limited_with_clause in the closure of - -- the unit being compiled. + -- limited view of the designated package. On a package specification, it + -- indicates that the limited view has already been created because the + -- package is mentioned in a limited_with_clause in the closure of the + -- unit being compiled. -- Must_Be_Byte_Aligned (Flag14-Sem) -- This flag is present in N_Attribute_Reference nodes. It can be set -- only for the Address and Unrestricted_Access attributes. If set it - -- means that the object for which the address/access is given must be - -- on a byte (more accurately a storage unit) boundary. If necessary, - -- a copy of the object is to be made before taking the address (this - -- copy is in the current scope on the stack frame). This is used for - -- certain cases of code generated by the expander that passes - -- parameters by address. + -- means that the object for which the address/access is given must be on + -- a byte (more accurately a storage unit) boundary. If necessary, a copy + -- of the object is to be made before taking the address (this copy is in + -- the current scope on the stack frame). This is used for certain cases + -- of code generated by the expander that passes parameters by address. -- - -- The reason the copy is not made by the front end is that the back - -- end has more information about type layout and may be able to (but - -- is not guaranteed to) prevent making unnecessary copies. + -- The reason the copy is not made by the front end is that the back end + -- has more information about type layout and may be able to (but is not + -- guaranteed to) prevent making unnecessary copies. -- Must_Not_Freeze (Flag8-Sem) -- A flag present in all expression nodes. Normally expressions cause - -- freezing as described in the RM. If this flag is set, then this - -- is inhibited. This is used by the analyzer and expander to label - -- nodes that are created by semantic analysis or expansion and which - -- must not cause freezing even though they normally would. This flag - -- is also present in an N_Subtype_Indication node, since we also use - -- these in calls to Freeze_Expression. + -- freezing as described in the RM. If this flag is set, then this is + -- inhibited. This is used by the analyzer and expander to label nodes + -- that are created by semantic analysis or expansion and which must not + -- cause freezing even though they normally would. This flag is also + -- present in an N_Subtype_Indication node, since we also use these in + -- calls to Freeze_Expression. -- Next_Entity (Node2-Sem) -- Present in defining identifiers, defining character literals and - -- defining operator symbols (i.e. in all entities). The entities of - -- a scope are chained, and this field is used as the forward pointer - -- for this list. See Einfo for further details. + -- defining operator symbols (i.e. in all entities). The entities of a + -- scope are chained, and this field is used as the forward pointer for + -- this list. See Einfo for further details. -- Next_Named_Actual (Node4-Sem) - -- Present in parameter association node. Set during semantic - -- analysis to point to the next named parameter, where parameters - -- are ordered by declaration order (as opposed to the actual order - -- in the call, which may be different due to named associations). - -- Not that this field points to the explicit actual parameter itself, - -- not to the N_Parameter_Association node (its parent). + -- Present in parameter association node. Set during semantic analysis to + -- point to the next named parameter, where parameters are ordered by + -- declaration order (as opposed to the actual order in the call, which + -- may be different due to named associations). Not that this field + -- points to the explicit actual parameter itself, not to the + -- N_Parameter_Association node (its parent). -- Next_Rep_Item (Node4-Sem) - -- Present in pragma nodes and attribute definition nodes. Used to - -- link representation items that apply to an entity. See description - -- of First_Rep_Item field in Einfo for full details. + -- Present in pragma nodes and attribute definition nodes. Used to link + -- representation items that apply to an entity. See description of + -- First_Rep_Item field in Einfo for full details. -- Next_Use_Clause (Node3-Sem) - -- While use clauses are active during semantic processing, they - -- are chained from the scope stack entry, using Next_Use_Clause - -- as a link pointer, with Empty marking the end of the list. The - -- head pointer is in the scope stack entry (First_Use_Clause). At - -- the end of semantic processing (i.e. when Gigi sees the tree, - -- the contents of this field is undefined and should not be read). + -- While use clauses are active during semantic processing, they are + -- chained from the scope stack entry, using Next_Use_Clause as a link + -- pointer, with Empty marking the end of the list. The head pointer is + -- in the scope stack entry (First_Use_Clause). At the end of semantic + -- processing (i.e. when Gigi sees the tree, the contents of this field + -- is undefined and should not be read). -- No_Ctrl_Actions (Flag7-Sem) - -- Present in N_Assignment_Statement to indicate that no finalize nor - -- nor adjust should take place on this assignment eventhough the rhs - -- is controlled. This is used in init procs and aggregate expansions - -- where the generated assignments are more initialisations than real + -- Present in N_Assignment_Statement to indicate that no finalize nor nor + -- adjust should take place on this assignment eventhough the rhs is + -- controlled. This is used in init procs and aggregate expansions where + -- the generated assignments are more initialisations than real -- assignments. -- No_Elaboration_Check (Flag14-Sem) -- Present in N_Function_Call and N_Procedure_Call_Statement. Indicates - -- that no elaboration check is needed on the call, because it appears - -- in the context of a local Suppress pragma. This is used on calls - -- within task bodies, where the actual elaboration checks are applied - -- after analysis, when the local scope stack is not present. + -- that no elaboration check is needed on the call, because it appears in + -- the context of a local Suppress pragma. This is used on calls within + -- task bodies, where the actual elaboration checks are applied after + -- analysis, when the local scope stack is not present. -- No_Entities_Ref_In_Spec (Flag8-Sem) -- Present in N_With_Clause nodes. Set if the with clause is on the @@ -1319,12 +1306,12 @@ package Sinfo is -- full details) -- No_Initialization (Flag13-Sem) - -- Present in N_Object_Declaration & N_Allocator to indicate - -- that the object must not be initialized (by Initialize or a - -- call to an init proc). This is needed for controlled aggregates. - -- When the Object declaration has an expression, this flag means - -- that this expression should not be taken into account (needed - -- for in place initialization with aggregates) + -- Present in N_Object_Declaration & N_Allocator to indicate that the + -- object must not be initialized (by Initialize or call to an init + -- proc). This is needed for controlled aggregates. When the Object + -- declaration has an expression, this flag means that this expression + -- should not be taken into account (needed for in place initialization + -- with aggregates) -- No_Truncation (Flag17-Sem) -- Present in N_Unchecked_Type_Conversion node. This flag has an effect @@ -1332,51 +1319,51 @@ package Sinfo is -- target for scalar operands. Normally in such a case we truncate some -- higher order bits of the source, and then sign/zero extend the result -- to form the output value. But if this flag is set, then we do not do - -- any truncation, so for example, if an 8 bit input is converted to a - -- 5 bit result which is in fact stored in 8 bits, then the high order + -- any truncation, so for example, if an 8 bit input is converted to 5 + -- bit result which is in fact stored in 8 bits, then the high order -- three bits of the target result will be copied from the source. This -- is used for properly setting out of range values for use by pragmas -- Initialize_Scalars and Normalize_Scalars. -- Original_Discriminant (Node2-Sem) -- Present in identifiers. Used in references to discriminants that - -- appear in generic units. Because the names of the discriminants - -- may be different in an instance, we use this field to recover the - -- position of the discriminant in the original type, and replace it - -- with the discriminant at the same position in the instantiated type. + -- appear in generic units. Because the names of the discriminants may be + -- different in an instance, we use this field to recover the position of + -- the discriminant in the original type, and replace it with the + -- discriminant at the same position in the instantiated type. -- Original_Entity (Node2-Sem) - -- Present in numeric literals. Used to denote the named number that - -- has been constant-folded into the given literal. If literal is from + -- Present in numeric literals. Used to denote the named number that has + -- been constant-folded into the given literal. If literal is from -- source, or the result of some other constant-folding operation, then -- Original_Entity is empty. This field is needed to handle properly -- named numbers in generic units, where the Associated_Node field - -- interferes with the Entity field, making it impossible to preserve - -- the original entity at the point of instantiation (ASIS problem). + -- interferes with the Entity field, making it impossible to preserve the + -- original entity at the point of instantiation (ASIS problem). -- Others_Discrete_Choices (List1-Sem) -- When a case statement or variant is analyzed, the semantic checks -- determine the actual list of choices that correspond to an others - -- choice. This list is materialized for later use by the expander - -- and the Others_Discrete_Choices field of an N_Others_Choice node - -- points to this materialized list of choices, which is in standard - -- format for a list of discrete choices, except that of course it - -- cannot contain an N_Others_Choice entry. + -- choice. This list is materialized for later use by the expander and + -- the Others_Discrete_Choices field of an N_Others_Choice node points to + -- this materialized list of choices, which is in standard format for a + -- list of discrete choices, except that of course it cannot contain an + -- N_Others_Choice entry. -- Parameter_List_Truncated (Flag17-Sem) - -- Present in N_Function_Call and N_Procedure_Call_Statement nodes. - -- Set (for OpenVMS ports of GNAT only) if the parameter list is - -- truncated as a result of a First_Optional_Parameter specification - -- in an Import_Function, Import_Procedure, or Import_Valued_Procedure - -- pragma. The truncation is done by the expander by removing trailing - -- parameters from the argument list, in accordance with the set of - -- rules allowing such parameter removal. In particular, parameters - -- can be removed working from the end of the parameter list backwards - -- up to and including the entry designated by First_Optional_Parameter - -- in the Import pragma. Parameters can be removed if they are implicit - -- and the default value is a known-at-compile-time value, including - -- the use of the Null_Parameter attribute, or if explicit parameter - -- values are present that match the corresponding defaults. + -- Present in N_Function_Call and N_Procedure_Call_Statement nodes. Set + -- (for OpenVMS ports of GNAT only) if the parameter list is truncated as + -- a result of a First_Optional_Parameter specification in an + -- Import_Function, Import_Procedure, or Import_Valued_Procedure pragma. + -- The truncation is done by the expander by removing trailing parameters + -- from the argument list, in accordance with the set of rules allowing + -- such parameter removal. In particular, parameters can be removed + -- working from the end of the parameter list backwards up to and + -- including the entry designated by First_Optional_Parameter in the + -- Import pragma. Parameters can be removed if they are implicit and the + -- default value is a known-at-compile-time value, including the use of + -- the Null_Parameter attribute, or if explicit parameter values are + -- present that match the corresponding defaults. -- Parent_Spec (Node4-Sem) -- For a library unit that is a child unit spec (package or subprogram @@ -1387,67 +1374,67 @@ package Sinfo is -- Present_Expr (Uint3-Sem) -- Present in an N_Variant node. This has a meaningful value only after - -- Gigi has back annotated the tree with representation information. - -- At this point, it contains a reference to a gcc expression that - -- depends on the values of one or more discriminants. Give a set of - -- discriminant values, this expression evaluates to False (zero) if - -- variant is not present, and True (non-zero) if it is present. See - -- unit Repinfo for further details on gigi back annotation. This - -- field is used during ASIS processing (data decomposition annex) - -- to determine if a field is present or not. + -- Gigi has back annotated the tree with representation information. At + -- this point, it contains a reference to a gcc expression that depends + -- on the values of one or more discriminants. Give a set of discriminant + -- values, this expression evaluates to False (zero) if variant is not + -- present, and True (non-zero) if it is present. See unit Repinfo for + -- further details on gigi back annotation. This field is used during + -- ASIS processing (data decomposition annex) to determine if a field is + -- present or not. -- Print_In_Hex (Flag13-Sem) - -- Set on an N_Integer_Literal node to indicate that the value should - -- be printed in hexadecimal in the sprint listing. Has no effect on - -- legality or semantics of program, only on the displayed output. - -- This is used to clarify output from the packed array cases. + -- Set on an N_Integer_Literal node to indicate that the value should be + -- printed in hexadecimal in the sprint listing. Has no effect on + -- legality or semantics of program, only on the displayed output. This + -- is used to clarify output from the packed array cases. -- Procedure_To_Call (Node4-Sem) -- Present in N_Allocator, N_Free_Statement, and N_Return_Statement - -- nodes. References the entity for the declaration of the procedure - -- to be called to accomplish the required operation (i.e. for the - -- Allocate procedure in the case of N_Allocator and N_Return_Statement - -- (for allocating the return value), and for the Deallocate procedure - -- in the case of N_Free_Statement. + -- nodes. References the entity for the declaration of the procedure to + -- be called to accomplish the required operation (i.e. for the Allocate + -- procedure in the case of N_Allocator and N_Return_Statement (for + -- allocating the return value), and for the Deallocate procedure in the + -- case of N_Free_Statement. -- Raises_Constraint_Error (Flag7-Sem) - -- Set on an expression whose evaluation will definitely fail a - -- constraint error check. In the case of static expressions, this - -- flag must be set accurately (and if it is set, the expression is - -- typically illegal unless it appears as a non-elaborated branch of - -- a short-circuit form). For a non-static expression, this flag may - -- be set whenever an expression (e.g. an aggregate) is known to raise - -- constraint error. If set, the expression definitely will raise CE - -- if elaborated at runtime. If not set, the expression may or may - -- not raise CE. In other words, on static expressions, the flag is - -- set accurately, on non-static expressions it is set conservatively. + -- Set on an expression whose evaluation will definitely fail constraint + -- error check. In the case of static expressions, this flag must be set + -- accurately (and if it is set, the expression is typically illegal + -- unless it appears as a non-elaborated branch of a short-circuit form). + -- For a non-static expression, this flag may be set whenever an + -- expression (e.g. an aggregate) is known to raise constraint error. If + -- set, the expression definitely will raise CE if elaborated at runtime. + -- If not set, the expression may or may not raise CE. In other words, on + -- static expressions, the flag is set accurately, on non-static + -- expressions it is set conservatively. -- Redundant_Use (Flag13-Sem) - -- A flag present in nodes that can appear as an operand in a use - -- clause or use type clause (identifiers, expanded names, attribute - -- references). Set to indicate that a use is redundant (and therefore - -- need not be undone on scope exit). + -- Present in nodes that can appear as an operand in a use clause or use + -- type clause (identifiers, expanded names, attribute references). Set + -- to indicate that a use is redundant (and therefore need not be undone + -- on scope exit). -- Return_Type (Node2-Sem) - -- Present in N_Return_Statement node. For a procedure, this is set - -- to Standard_Void_Type. For a function it references the entity - -- for the returned type. + -- Present in N_Return_Statement node. For a procedure, this is set to + -- Standard_Void_Type. For a function it references the entity for the + -- returned type. -- Rounded_Result (Flag18-Sem) -- Present in N_Type_Conversion, N_Op_Divide and N_Op_Multiply nodes. -- Used in the fixed-point cases to indicate that the result must be - -- rounded as a result of the use of the 'Round attribute. Also used - -- for integer N_Op_Divide nodes to indicate that the result should - -- be rounded to the nearest integer (breaking ties away from zero), - -- rather than truncated towards zero as usual. These rounded integer - -- operations are the result of expansion of rounded fixed-point - -- divide, conversion and multiplication operations. + -- rounded as a result of the use of the 'Round attribute. Also used for + -- integer N_Op_Divide nodes to indicate that the result should be + -- rounded to the nearest integer (breaking ties away from zero), rather + -- than truncated towards zero as usual. These rounded integer operations + -- are the result of expansion of rounded fixed-point divide, conversion + -- and multiplication operations. -- Scope (Node3-Sem) -- Present in defining identifiers, defining character literals and - -- defining operator symbols (i.e. in all entities). The entities of - -- a scope all use this field to reference the corresponding scope - -- entity. See Einfo for further details. + -- defining operator symbols (i.e. in all entities). The entities of a + -- scope all use this field to reference the corresponding scope entity. + -- See Einfo for further details. -- Shift_Count_OK (Flag4-Sem) -- A flag present in shift nodes to indicate that the shift count is @@ -1464,29 +1451,29 @@ package Sinfo is -- Static_Processing_OK (Flag4-Sem) -- Present in N_Aggregate nodes. When the Compile_Time_Known_Aggregate -- flag is set, the full value of the aggregate can be determined at - -- compile time and the aggregate can be passed as is to the back-end. - -- In this event it is irrelevant whether this flag is set or not. - -- However, if the Compile_Time_Known_Aggregate flag is not set but + -- compile time and the aggregate can be passed as is to the back-end. In + -- this event it is irrelevant whether this flag is set or not. However, + -- if the Compile_Time_Known_Aggregate flag is not set but -- Static_Processing_OK is set, the aggregate can (but need not) be - -- converted into a compile time known aggregate by the expander. - -- See Sem_Aggr for the specific conditions under which an aggregate - -- has its Static_Processing_OK flag set. + -- converted into a compile time known aggregate by the expander. See + -- Sem_Aggr for the specific conditions under which an aggregate has its + -- Static_Processing_OK flag set. -- Storage_Pool (Node1-Sem) - -- Present in N_Allocator, N_Free_Statement and N_Return_Statement - -- nodes. References the entity for the storage pool to be used for - -- the allocate or free call or for the allocation of the returned - -- value from a function. Empty indicates that the global default - -- default pool is to be used. Note that in the case of a return - -- statement, this field is set only if the function returns a - -- value of a type whose size is not known at compile time on the - -- secondary stack. It is never set on targets for which the target - -- parameter Targparm.Functions_Return_By_DSP_On_Target is True. + -- Present in N_Allocator, N_Free_Statement and N_Return_Statement nodes. + -- References the entity for the storage pool to be used for the allocate + -- or free call or for the allocation of the returned value from a + -- function. Empty indicates that the global default default pool is to + -- be used. Note that in the case of a return statement, this field is + -- set only if the function returns value of a type whose size is not + -- known at compile time on the secondary stack. It is never set on + -- targets for which the parameter Functions_Return_By_DSP_On_Target in + -- Targparm is True. -- Target_Type (Node2-Sem) - -- Used in an N_Validate_Unchecked_Conversion node to point to the - -- target type entity for the unchecked conversion instantiation - -- which gigi must do size validation for. + -- Used in an N_Validate_Unchecked_Conversion node to point to the target + -- type entity for the unchecked conversion instantiation which gigi must + -- do size validation for. -- Then_Actions (List3-Sem) -- This field is present in conditional expression nodes. During code @@ -1494,55 +1481,55 @@ package Sinfo is -- actions at an appropriate place in the tree to get elaborated at the -- right time. For conditional expressions, we have to be sure that the -- actions for the Then branch are only elaborated if the condition is - -- True. The Then_Actions field is used as a temporary parking place - -- for these actions. The final tree is always rewritten to eliminate - -- the need for this field, so in the tree passed to Gigi, this field - -- is always set to No_List. + -- True. The Then_Actions field is used as a temporary parking place for + -- these actions. The final tree is always rewritten to eliminate the + -- need for this field, so in the tree passed to Gigi, this field is + -- always set to No_List. -- Treat_Fixed_As_Integer (Flag14-Sem) - -- This flag appears in operator nodes for divide, multiply, mod and - -- rem on fixed-point operands. It indicates that the operands are - -- to be treated as integer values, ignoring small values. This flag - -- is only set as a result of expansion of fixed-point operations. - -- Typically a fixed-point multplication in the source generates - -- subsidiary multiplication and division operations that work with - -- the underlying integer values and have this flag set. Note that - -- this flag is not needed on other arithmetic operations (add, neg, - -- subtract etc) since in these cases it is always the case that fixed - -- is treated as integer. The Etype field MUST be set if this flag - -- is set. The analyzer knows to leave such nodes alone, and whoever - -- makes them must set the correct Etype value. + -- This flag appears in operator nodes for divide, multiply, mod and rem + -- on fixed-point operands. It indicates that the operands are to be + -- treated as integer values, ignoring small values. This flag is only + -- set as a result of expansion of fixed-point operations. Typically a + -- fixed-point multplication in the source generates subsidiary + -- multiplication and division operations that work with the underlying + -- integer values and have this flag set. Note that this flag is not + -- needed on other arithmetic operations (add, neg, subtract etc) since + -- in these cases it is always the case that fixed is treated as integer. + -- The Etype field MUST be set if this flag is set. The analyzer knows to + -- leave such nodes alone, and whoever makes them must set the correct + -- Etype value. -- TSS_Elist (Elist3-Sem) -- Present in N_Freeze_Entity nodes. Holds an element list containing -- entries for each TSS (type support subprogram) associated with the -- frozen type. The elements of the list are the entities for the - -- subprograms (see package Exp_TSS for further details). Set to - -- No_Elist if there are no type support subprograms for the type - -- or if the freeze node is not for a type. + -- subprograms (see package Exp_TSS for further details). Set to No_Elist + -- if there are no type support subprograms for the type or if the freeze + -- node is not for a type. -- Unreferenced_In_Spec (Flag7-Sem) -- Present in N_With_Clause nodes. Set if the with clause is on the -- package or subprogram spec where the main unit is the corresponding - -- body, and is not referenced by the spec (it may still be referenced - -- by the body, so this flag is used to generate the proper message - -- (see Sem_Util.Check_Unused_Withs for details) + -- body, and is not referenced by the spec (it may still be referenced by + -- the body, so this flag is used to generate the proper message (see + -- Sem_Util.Check_Unused_Withs for details) -- Was_Originally_Stub (Flag13-Sem) - -- This flag is set in the node for a proper body that replaces a - -- stub. During the analysis procedure, stubs in some situations - -- get rewritten by the corresponding bodies, and we set this flag - -- to remember that this happened. Note that it is not good enough - -- to rely on the use of Original_Node here because of the case of - -- nested instantiations where the substituted node can be copied. + -- This flag is set in the node for a proper body that replaces stub. + -- During the analysis procedure, stubs in some situations get rewritten + -- by the corresponding bodies, and we set this flag to remember that + -- this happened. Note that it is not good enough to rely on the use of + -- Original_Node here because of the case of nested instantiations where + -- the substituted node can be copied. -- Zero_Cost_Handling (Flag5-Sem) -- This flag is set in all handled sequence of statement and exception -- handler nodes if eceptions are to be handled using the zero-cost -- mechanism (see Ada.Exceptions and System.Exceptions in files - -- a-except.ads/adb and s-except.ads for full details). What gigi - -- needs to do for such a handler is simply to put the code in the - -- handler somewhere. The front end has generated all necessary labels. + -- a-except.ads/adb and s-except.ads for full details). What gigi needs + -- to do for such a handler is simply to put the code in the handler + -- somewhere. The front end has generated all necessary labels. -------------------------------------------------- -- Note on Use of End_Label and End_Span Fields -- @@ -1569,46 +1556,43 @@ package Sinfo is -- Record Definition end record; -- Enumeration Definition ); - -- The End_Label and End_Span fields are used to mark the locations - -- of these lines, and also keep track of the label in the case where - -- a label is present. - - -- For the first group above, the End_Label field of the corresponding - -- node is used to point to the label identifier. In the case where - -- there is no label in the source, the parser supplies a dummy - -- identifier (with Comes_From_Source set to False), and the Sloc - -- of this dummy identifier marks the location of the token following - -- the END token. - - -- For the second group, the use of End_Label is similar, but the - -- End_Label is found in the N_Handled_Sequence_Of_Statements node. - -- This is done simply because in some cases there is no room in - -- the parent node. - - -- For the third group, there is never any label, and instead of - -- using End_Label, we use the End_Span field which gives the - -- location of the token following END, relative to the starting - -- Sloc of the construct, i.e. add Sloc (Node) + End_Span (Node) - -- to get the Sloc of the IF or CASE following the End_Label. - - -- The record definition case is handled specially, we treat it - -- as though it required an optional label which is never present, - -- and so the parser always builds a dummy identifier with Comes - -- From Source set False. The reason we do this, rather than using - -- End_Span in this case, is that we want to generate a cross-ref - -- entry for the end of a record, since it represents a scope for - -- name declaration purposes. - - -- The enumeration definition case is handled in an exactly similar - -- manner, building a dummy identifier to get a cross-reference. - - -- Note: the reason we store the difference as a Uint, instead of - -- storing the Source_Ptr value directly, is that Source_Ptr values - -- cannot be distinguished from other types of values, and we count - -- on all general use fields being self describing. To make things - -- easier for clients, note that we provide function End_Location, - -- and procedure Set_End_Location to allow access to the logical - -- value (which is the Source_Ptr value for the end token). + -- The End_Label and End_Span fields are used to mark the locations of + -- these lines, and also keep track of the label in the case where a label + -- is present. + + -- For the first group above, the End_Label field of the corresponding node + -- is used to point to the label identifier. In the case where there is no + -- label in the source, the parser supplies a dummy identifier (with + -- Comes_From_Source set to False), and the Sloc of this dummy identifier + -- marks the location of the token following the END token. + + -- For the second group, the use of End_Label is similar, but the End_Label + -- is found in the N_Handled_Sequence_Of_Statements node. This is done + -- simply because in some cases there is no room in the parent node. + + -- For the third group, there is never any label, and instead of using + -- End_Label, we use the End_Span field which gives the location of the + -- token following END, relative to the starting Sloc of the construct, + -- i.e. add Sloc (Node) + End_Span (Node) to get the Sloc of the IF or CASE + -- following the End_Label. + + -- The record definition case is handled specially, we treat it as though + -- it required an optional label which is never present, and so the parser + -- always builds a dummy identifier with Comes From Source set False. The + -- reason we do this, rather than using End_Span in this case, is that we + -- want to generate a cross-ref entry for the end of a record, since it + -- represents a scope for name declaration purposes. + + -- The enumeration definition case is handled in an exactly similar manner, + -- building a dummy identifier to get a cross-reference. + + -- Note: the reason we store the difference as a Uint, instead of storing + -- the Source_Ptr value directly, is that Source_Ptr values cannot be + -- distinguished from other types of values, and we count on all general + -- use fields being self describing. To make things easier for clients, + -- note that we provide function End_Location, and procedure + -- Set_End_Location to allow access to the logical value (which is the + -- Source_Ptr value for the end token). --------------------- -- Syntactic Nodes -- @@ -1623,23 +1607,23 @@ package Sinfo is -- An IDENTIFIER shall not be a reserved word - -- In the Ada grammar identifiers are the bottom level tokens which - -- have very few semantics. Actual program identifiers are direct - -- names. If we were being 100% honest with the grammar, then we would - -- have a node called N_Direct_Name which would point to an identifier. - -- However, that's too many extra nodes, so we just use the N_Identifier - -- node directly as a direct name, and it contains the expression fields - -- and Entity field that correspond to its use as a direct name. In - -- those few cases where identifiers appear in contexts where they are - -- not direct names (pragmas, pragma argument associations, attribute + -- In the Ada grammar identifiers are the bottom level tokens which have + -- very few semantics. Actual program identifiers are direct names. If + -- we were being 100% honest with the grammar, then we would have a node + -- called N_Direct_Name which would point to an identifier. However, + -- that's too many extra nodes, so we just use the N_Identifier node + -- directly as a direct name, and it contains the expression fields and + -- Entity field that correspond to its use as a direct name. In those + -- few cases where identifiers appear in contexts where they are not + -- direct names (pragmas, pragma argument associations, attribute -- references and attribute definition clauses), the Chars field of the -- node contains the Name_Id for the identifier name. - -- Note: in GNAT, a reserved word can be treated as an identifier - -- in two cases. First, an incorrect use of a reserved word as an - -- identifier is diagnosed and then treated as a normal identifier. - -- Second, an attribute designator of the form of a reserved word - -- (access, delta, digits, range) is treated as an identifier. + -- Note: in GNAT, a reserved word can be treated as an identifier in two + -- cases. First, an incorrect use of a reserved word as an identifier is + -- diagnosed and then treated as a normal identifier. Second, an + -- attribute designator of the form of a reserved word (access, delta, + -- digits, range) is treated as an identifier. -- Note: The set of letters that is permitted in an identifier depends -- on the character set in use. See package Csets for full details. @@ -1735,12 +1719,12 @@ package Sinfo is -- Has_Private_View (Flag11-Sem) set in generic units. -- plus fields for expression - -- Note: the Entity field will be missing (and set to Empty) for - -- character literals whose type is Standard.Wide_Character or - -- Standard.Character or a type derived from one of these two. - -- In this case the character literal stands for its own coding. - -- The reason we take this irregular short cut is to avoid the - -- need to build lots of junk defining character literal nodes. + -- Note: the Entity field will be missing (set to Empty) for character + -- literals whose type is Standard.Wide_Character or Standard.Character + -- or a type derived from one of these two. In this case the character + -- literal stands for its own coding. The reason we take this irregular + -- short cut is to avoid the need to build lots of junk defining + -- character literal nodes. ------------------------- -- 2.6 String Literal -- @@ -5701,7 +5685,8 @@ package Sinfo is -------------------------------------------- -- FORMAL_DERIVED_TYPE_DEFINITION ::= - -- [abstract] new SUBTYPE_MARK [[and INTERFACE_LIST] with private] + -- [abstract] [limited] + -- new SUBTYPE_MARK [[and INTERFACE_LIST] with private] -- Note: this construct is not allowed in Ada 83 mode -- N_Formal_Derived_Type_Definition @@ -5709,6 +5694,7 @@ package Sinfo is -- Subtype_Mark (Node4) -- Private_Present (Flag15) -- Abstract_Present (Flag4) + -- Limited_Present (Flag17) -- Interface_List (List2) (set to No_List if none) --------------------------------------------- diff --git a/gcc/ada/snames.adb b/gcc/ada/snames.adb index c1ca4dde733..cd7ae14248f 100644 --- a/gcc/ada/snames.adb +++ b/gcc/ada/snames.adb @@ -229,6 +229,7 @@ package body Snames is "attach_handler#" & "comment#" & "common_object#" & + "complete_representation#" & "complex_representation#" & "controlled#" & "convention#" & diff --git a/gcc/ada/snames.ads b/gcc/ada/snames.ads index caa31e35750..97225020244 100644 --- a/gcc/ada/snames.ads +++ b/gcc/ada/snames.ads @@ -402,73 +402,74 @@ package Snames is Name_Attach_Handler : constant Name_Id := N + 169; Name_Comment : constant Name_Id := N + 170; -- GNAT Name_Common_Object : constant Name_Id := N + 171; -- GNAT - Name_Complex_Representation : constant Name_Id := N + 172; -- GNAT - Name_Controlled : constant Name_Id := N + 173; - Name_Convention : constant Name_Id := N + 174; - Name_CPP_Class : constant Name_Id := N + 175; -- GNAT - Name_CPP_Constructor : constant Name_Id := N + 176; -- GNAT - Name_CPP_Virtual : constant Name_Id := N + 177; -- GNAT - Name_CPP_Vtable : constant Name_Id := N + 178; -- GNAT - Name_Debug : constant Name_Id := N + 179; -- GNAT - Name_Elaborate : constant Name_Id := N + 180; -- Ada 83 - Name_Elaborate_All : constant Name_Id := N + 181; - Name_Elaborate_Body : constant Name_Id := N + 182; - Name_Export : constant Name_Id := N + 183; - Name_Export_Exception : constant Name_Id := N + 184; -- VMS - Name_Export_Function : constant Name_Id := N + 185; -- GNAT - Name_Export_Object : constant Name_Id := N + 186; -- GNAT - Name_Export_Procedure : constant Name_Id := N + 187; -- GNAT - Name_Export_Value : constant Name_Id := N + 188; -- GNAT - Name_Export_Valued_Procedure : constant Name_Id := N + 189; -- GNAT - Name_External : constant Name_Id := N + 190; -- GNAT - Name_Finalize_Storage_Only : constant Name_Id := N + 191; -- GNAT - Name_Ident : constant Name_Id := N + 192; -- VMS - Name_Import : constant Name_Id := N + 193; - Name_Import_Exception : constant Name_Id := N + 194; -- VMS - Name_Import_Function : constant Name_Id := N + 195; -- GNAT - Name_Import_Object : constant Name_Id := N + 196; -- GNAT - Name_Import_Procedure : constant Name_Id := N + 197; -- GNAT - Name_Import_Valued_Procedure : constant Name_Id := N + 198; -- GNAT - Name_Inline : constant Name_Id := N + 199; - Name_Inline_Always : constant Name_Id := N + 200; -- GNAT - Name_Inline_Generic : constant Name_Id := N + 201; -- GNAT - Name_Inspection_Point : constant Name_Id := N + 202; - Name_Interface_Name : constant Name_Id := N + 203; -- GNAT - Name_Interrupt_Handler : constant Name_Id := N + 204; - Name_Interrupt_Priority : constant Name_Id := N + 205; - Name_Java_Constructor : constant Name_Id := N + 206; -- GNAT - Name_Java_Interface : constant Name_Id := N + 207; -- GNAT - Name_Keep_Names : constant Name_Id := N + 208; -- GNAT - Name_Link_With : constant Name_Id := N + 209; -- GNAT - Name_Linker_Alias : constant Name_Id := N + 210; -- GNAT - Name_Linker_Constructor : constant Name_Id := N + 211; -- GNAT - Name_Linker_Destructor : constant Name_Id := N + 212; -- GNAT - Name_Linker_Options : constant Name_Id := N + 213; - Name_Linker_Section : constant Name_Id := N + 214; -- GNAT - Name_List : constant Name_Id := N + 215; - Name_Machine_Attribute : constant Name_Id := N + 216; -- GNAT - Name_Main : constant Name_Id := N + 217; -- GNAT - Name_Main_Storage : constant Name_Id := N + 218; -- GNAT - Name_Memory_Size : constant Name_Id := N + 219; -- Ada 83 - Name_No_Return : constant Name_Id := N + 220; -- GNAT - Name_Obsolescent : constant Name_Id := N + 221; -- GNAT - Name_Optimize : constant Name_Id := N + 222; - Name_Optional_Overriding : constant Name_Id := N + 223; -- Ada 05 - Name_Pack : constant Name_Id := N + 224; - Name_Page : constant Name_Id := N + 225; - Name_Passive : constant Name_Id := N + 226; -- GNAT - Name_Preelaborate : constant Name_Id := N + 227; - Name_Preelaborate_05 : constant Name_Id := N + 228; -- GNAT - Name_Priority : constant Name_Id := N + 229; - Name_Psect_Object : constant Name_Id := N + 230; -- VMS - Name_Pure : constant Name_Id := N + 231; - Name_Pure_05 : constant Name_Id := N + 232; -- GNAT - Name_Pure_Function : constant Name_Id := N + 233; -- GNAT - Name_Remote_Call_Interface : constant Name_Id := N + 234; - Name_Remote_Types : constant Name_Id := N + 235; - Name_Share_Generic : constant Name_Id := N + 236; -- GNAT - Name_Shared : constant Name_Id := N + 237; -- Ada 83 - Name_Shared_Passive : constant Name_Id := N + 238; + Name_Complete_Representation : constant Name_Id := N + 172; -- GNAT + Name_Complex_Representation : constant Name_Id := N + 173; -- GNAT + Name_Controlled : constant Name_Id := N + 174; + Name_Convention : constant Name_Id := N + 175; + Name_CPP_Class : constant Name_Id := N + 176; -- GNAT + Name_CPP_Constructor : constant Name_Id := N + 177; -- GNAT + Name_CPP_Virtual : constant Name_Id := N + 178; -- GNAT + Name_CPP_Vtable : constant Name_Id := N + 179; -- GNAT + Name_Debug : constant Name_Id := N + 180; -- GNAT + Name_Elaborate : constant Name_Id := N + 181; -- Ada 83 + Name_Elaborate_All : constant Name_Id := N + 182; + Name_Elaborate_Body : constant Name_Id := N + 183; + Name_Export : constant Name_Id := N + 184; + Name_Export_Exception : constant Name_Id := N + 185; -- VMS + Name_Export_Function : constant Name_Id := N + 186; -- GNAT + Name_Export_Object : constant Name_Id := N + 187; -- GNAT + Name_Export_Procedure : constant Name_Id := N + 188; -- GNAT + Name_Export_Value : constant Name_Id := N + 189; -- GNAT + Name_Export_Valued_Procedure : constant Name_Id := N + 190; -- GNAT + Name_External : constant Name_Id := N + 191; -- GNAT + Name_Finalize_Storage_Only : constant Name_Id := N + 192; -- GNAT + Name_Ident : constant Name_Id := N + 193; -- VMS + Name_Import : constant Name_Id := N + 194; + Name_Import_Exception : constant Name_Id := N + 195; -- VMS + Name_Import_Function : constant Name_Id := N + 196; -- GNAT + Name_Import_Object : constant Name_Id := N + 197; -- GNAT + Name_Import_Procedure : constant Name_Id := N + 198; -- GNAT + Name_Import_Valued_Procedure : constant Name_Id := N + 199; -- GNAT + Name_Inline : constant Name_Id := N + 200; + Name_Inline_Always : constant Name_Id := N + 201; -- GNAT + Name_Inline_Generic : constant Name_Id := N + 202; -- GNAT + Name_Inspection_Point : constant Name_Id := N + 203; + Name_Interface_Name : constant Name_Id := N + 204; -- GNAT + Name_Interrupt_Handler : constant Name_Id := N + 205; + Name_Interrupt_Priority : constant Name_Id := N + 206; + Name_Java_Constructor : constant Name_Id := N + 207; -- GNAT + Name_Java_Interface : constant Name_Id := N + 208; -- GNAT + Name_Keep_Names : constant Name_Id := N + 209; -- GNAT + Name_Link_With : constant Name_Id := N + 210; -- GNAT + Name_Linker_Alias : constant Name_Id := N + 211; -- GNAT + Name_Linker_Constructor : constant Name_Id := N + 212; -- GNAT + Name_Linker_Destructor : constant Name_Id := N + 213; -- GNAT + Name_Linker_Options : constant Name_Id := N + 214; + Name_Linker_Section : constant Name_Id := N + 215; -- GNAT + Name_List : constant Name_Id := N + 216; + Name_Machine_Attribute : constant Name_Id := N + 217; -- GNAT + Name_Main : constant Name_Id := N + 218; -- GNAT + Name_Main_Storage : constant Name_Id := N + 219; -- GNAT + Name_Memory_Size : constant Name_Id := N + 220; -- Ada 83 + Name_No_Return : constant Name_Id := N + 221; -- GNAT + Name_Obsolescent : constant Name_Id := N + 222; -- GNAT + Name_Optimize : constant Name_Id := N + 223; + Name_Optional_Overriding : constant Name_Id := N + 224; -- Ada 05 + Name_Pack : constant Name_Id := N + 225; + Name_Page : constant Name_Id := N + 226; + Name_Passive : constant Name_Id := N + 227; -- GNAT + Name_Preelaborate : constant Name_Id := N + 228; + Name_Preelaborate_05 : constant Name_Id := N + 229; -- GNAT + Name_Priority : constant Name_Id := N + 230; + Name_Psect_Object : constant Name_Id := N + 231; -- VMS + Name_Pure : constant Name_Id := N + 232; + Name_Pure_05 : constant Name_Id := N + 233; -- GNAT + Name_Pure_Function : constant Name_Id := N + 234; -- GNAT + Name_Remote_Call_Interface : constant Name_Id := N + 235; + Name_Remote_Types : constant Name_Id := N + 236; + Name_Share_Generic : constant Name_Id := N + 237; -- GNAT + Name_Shared : constant Name_Id := N + 238; -- Ada 83 + Name_Shared_Passive : constant Name_Id := N + 239; -- Note: Storage_Size is not in this list because its name matches the -- name of the corresponding attribute. However, it is included in the @@ -478,27 +479,27 @@ package Snames is -- Note: Storage_Unit is also omitted from the list because of a clash -- with an attribute name, and is treated similarly. - Name_Source_Reference : constant Name_Id := N + 239; -- GNAT - Name_Stream_Convert : constant Name_Id := N + 240; -- GNAT - Name_Subtitle : constant Name_Id := N + 241; -- GNAT - Name_Suppress_All : constant Name_Id := N + 242; -- GNAT - Name_Suppress_Debug_Info : constant Name_Id := N + 243; -- GNAT - Name_Suppress_Initialization : constant Name_Id := N + 244; -- GNAT - Name_System_Name : constant Name_Id := N + 245; -- Ada 83 - Name_Task_Info : constant Name_Id := N + 246; -- GNAT - Name_Task_Name : constant Name_Id := N + 247; -- GNAT - Name_Task_Storage : constant Name_Id := N + 248; -- VMS - Name_Thread_Body : constant Name_Id := N + 249; -- GNAT - Name_Time_Slice : constant Name_Id := N + 250; -- GNAT - Name_Title : constant Name_Id := N + 251; -- GNAT - Name_Unchecked_Union : constant Name_Id := N + 252; -- GNAT - Name_Unimplemented_Unit : constant Name_Id := N + 253; -- GNAT - Name_Unreferenced : constant Name_Id := N + 254; -- GNAT - Name_Unreserve_All_Interrupts : constant Name_Id := N + 255; -- GNAT - Name_Volatile : constant Name_Id := N + 256; - Name_Volatile_Components : constant Name_Id := N + 257; - Name_Weak_External : constant Name_Id := N + 258; -- GNAT - Last_Pragma_Name : constant Name_Id := N + 258; + Name_Source_Reference : constant Name_Id := N + 240; -- GNAT + Name_Stream_Convert : constant Name_Id := N + 241; -- GNAT + Name_Subtitle : constant Name_Id := N + 242; -- GNAT + Name_Suppress_All : constant Name_Id := N + 243; -- GNAT + Name_Suppress_Debug_Info : constant Name_Id := N + 244; -- GNAT + Name_Suppress_Initialization : constant Name_Id := N + 245; -- GNAT + Name_System_Name : constant Name_Id := N + 246; -- Ada 83 + Name_Task_Info : constant Name_Id := N + 247; -- GNAT + Name_Task_Name : constant Name_Id := N + 248; -- GNAT + Name_Task_Storage : constant Name_Id := N + 249; -- VMS + Name_Thread_Body : constant Name_Id := N + 250; -- GNAT + Name_Time_Slice : constant Name_Id := N + 251; -- GNAT + Name_Title : constant Name_Id := N + 252; -- GNAT + Name_Unchecked_Union : constant Name_Id := N + 253; -- GNAT + Name_Unimplemented_Unit : constant Name_Id := N + 254; -- GNAT + Name_Unreferenced : constant Name_Id := N + 255; -- GNAT + Name_Unreserve_All_Interrupts : constant Name_Id := N + 256; -- GNAT + Name_Volatile : constant Name_Id := N + 257; + Name_Volatile_Components : constant Name_Id := N + 258; + Name_Weak_External : constant Name_Id := N + 259; -- GNAT + Last_Pragma_Name : constant Name_Id := N + 259; -- Language convention names for pragma Convention/Export/Import/Interface -- Note that Name_C is not included in this list, since it was already @@ -509,114 +510,114 @@ package Snames is -- Entry and Protected, this is because these conventions cannot be -- specified by a pragma. - First_Convention_Name : constant Name_Id := N + 259; - Name_Ada : constant Name_Id := N + 259; - Name_Assembler : constant Name_Id := N + 260; - Name_COBOL : constant Name_Id := N + 261; - Name_CPP : constant Name_Id := N + 262; - Name_Fortran : constant Name_Id := N + 263; - Name_Intrinsic : constant Name_Id := N + 264; - Name_Java : constant Name_Id := N + 265; - Name_Stdcall : constant Name_Id := N + 266; - Name_Stubbed : constant Name_Id := N + 267; - Last_Convention_Name : constant Name_Id := N + 267; + First_Convention_Name : constant Name_Id := N + 260; + Name_Ada : constant Name_Id := N + 260; + Name_Assembler : constant Name_Id := N + 261; + Name_COBOL : constant Name_Id := N + 262; + Name_CPP : constant Name_Id := N + 263; + Name_Fortran : constant Name_Id := N + 264; + Name_Intrinsic : constant Name_Id := N + 265; + Name_Java : constant Name_Id := N + 266; + Name_Stdcall : constant Name_Id := N + 267; + Name_Stubbed : constant Name_Id := N + 268; + Last_Convention_Name : constant Name_Id := N + 268; -- The following names are preset as synonyms for Assembler - Name_Asm : constant Name_Id := N + 268; - Name_Assembly : constant Name_Id := N + 269; + Name_Asm : constant Name_Id := N + 269; + Name_Assembly : constant Name_Id := N + 270; -- The following names are preset as synonyms for C - Name_Default : constant Name_Id := N + 270; + Name_Default : constant Name_Id := N + 271; -- Name_Exernal (previously defined as pragma) -- The following names are present as synonyms for Stdcall - Name_DLL : constant Name_Id := N + 271; - Name_Win32 : constant Name_Id := N + 272; + Name_DLL : constant Name_Id := N + 272; + Name_Win32 : constant Name_Id := N + 273; -- Other special names used in processing pragmas - Name_As_Is : constant Name_Id := N + 273; - Name_Attribute_Name : constant Name_Id := N + 274; - Name_Body_File_Name : constant Name_Id := N + 275; - Name_Boolean_Entry_Barriers : constant Name_Id := N + 276; - Name_Check : constant Name_Id := N + 277; - Name_Casing : constant Name_Id := N + 278; - Name_Code : constant Name_Id := N + 279; - Name_Component : constant Name_Id := N + 280; - Name_Component_Size_4 : constant Name_Id := N + 281; - Name_Copy : constant Name_Id := N + 282; - Name_D_Float : constant Name_Id := N + 283; - Name_Descriptor : constant Name_Id := N + 284; - Name_Dot_Replacement : constant Name_Id := N + 285; - Name_Dynamic : constant Name_Id := N + 286; - Name_Entity : constant Name_Id := N + 287; - Name_Entry_Count : constant Name_Id := N + 288; - Name_External_Name : constant Name_Id := N + 289; - Name_First_Optional_Parameter : constant Name_Id := N + 290; - Name_Form : constant Name_Id := N + 291; - Name_G_Float : constant Name_Id := N + 292; - Name_Gcc : constant Name_Id := N + 293; - Name_Gnat : constant Name_Id := N + 294; - Name_GPL : constant Name_Id := N + 295; - Name_IEEE_Float : constant Name_Id := N + 296; - Name_Ignore : constant Name_Id := N + 297; - Name_Info : constant Name_Id := N + 298; - Name_Internal : constant Name_Id := N + 299; - Name_Link_Name : constant Name_Id := N + 300; - Name_Lowercase : constant Name_Id := N + 301; - Name_Max_Entry_Queue_Depth : constant Name_Id := N + 302; - Name_Max_Entry_Queue_Length : constant Name_Id := N + 303; - Name_Max_Size : constant Name_Id := N + 304; - Name_Mechanism : constant Name_Id := N + 305; - Name_Message : constant Name_Id := N + 306; - Name_Mixedcase : constant Name_Id := N + 307; - Name_Modified_GPL : constant Name_Id := N + 308; - Name_Name : constant Name_Id := N + 309; - Name_NCA : constant Name_Id := N + 310; - Name_No : constant Name_Id := N + 311; - Name_No_Dependence : constant Name_Id := N + 312; - Name_No_Dynamic_Attachment : constant Name_Id := N + 313; - Name_No_Dynamic_Interrupts : constant Name_Id := N + 314; - Name_No_Requeue : constant Name_Id := N + 315; - Name_No_Requeue_Statements : constant Name_Id := N + 316; - Name_No_Task_Attributes : constant Name_Id := N + 317; - Name_No_Task_Attributes_Package : constant Name_Id := N + 318; - Name_On : constant Name_Id := N + 319; - Name_Parameter_Types : constant Name_Id := N + 320; - Name_Reference : constant Name_Id := N + 321; - Name_Restricted : constant Name_Id := N + 322; - Name_Result_Mechanism : constant Name_Id := N + 323; - Name_Result_Type : constant Name_Id := N + 324; - Name_Runtime : constant Name_Id := N + 325; - Name_SB : constant Name_Id := N + 326; - Name_Secondary_Stack_Size : constant Name_Id := N + 327; - Name_Section : constant Name_Id := N + 328; - Name_Semaphore : constant Name_Id := N + 329; - Name_Simple_Barriers : constant Name_Id := N + 330; - Name_Spec_File_Name : constant Name_Id := N + 331; - Name_State : constant Name_Id := N + 332; - Name_Static : constant Name_Id := N + 333; - Name_Stack_Size : constant Name_Id := N + 334; - Name_Subunit_File_Name : constant Name_Id := N + 335; - Name_Task_Stack_Size_Default : constant Name_Id := N + 336; - Name_Task_Type : constant Name_Id := N + 337; - Name_Time_Slicing_Enabled : constant Name_Id := N + 338; - Name_Top_Guard : constant Name_Id := N + 339; - Name_UBA : constant Name_Id := N + 340; - Name_UBS : constant Name_Id := N + 341; - Name_UBSB : constant Name_Id := N + 342; - Name_Unit_Name : constant Name_Id := N + 343; - Name_Unknown : constant Name_Id := N + 344; - Name_Unrestricted : constant Name_Id := N + 345; - Name_Uppercase : constant Name_Id := N + 346; - Name_User : constant Name_Id := N + 347; - Name_VAX_Float : constant Name_Id := N + 348; - Name_VMS : constant Name_Id := N + 349; - Name_Vtable_Ptr : constant Name_Id := N + 350; - Name_Working_Storage : constant Name_Id := N + 351; + Name_As_Is : constant Name_Id := N + 274; + Name_Attribute_Name : constant Name_Id := N + 275; + Name_Body_File_Name : constant Name_Id := N + 276; + Name_Boolean_Entry_Barriers : constant Name_Id := N + 277; + Name_Check : constant Name_Id := N + 278; + Name_Casing : constant Name_Id := N + 279; + Name_Code : constant Name_Id := N + 280; + Name_Component : constant Name_Id := N + 281; + Name_Component_Size_4 : constant Name_Id := N + 282; + Name_Copy : constant Name_Id := N + 283; + Name_D_Float : constant Name_Id := N + 284; + Name_Descriptor : constant Name_Id := N + 285; + Name_Dot_Replacement : constant Name_Id := N + 286; + Name_Dynamic : constant Name_Id := N + 287; + Name_Entity : constant Name_Id := N + 288; + Name_Entry_Count : constant Name_Id := N + 289; + Name_External_Name : constant Name_Id := N + 290; + Name_First_Optional_Parameter : constant Name_Id := N + 291; + Name_Form : constant Name_Id := N + 292; + Name_G_Float : constant Name_Id := N + 293; + Name_Gcc : constant Name_Id := N + 294; + Name_Gnat : constant Name_Id := N + 295; + Name_GPL : constant Name_Id := N + 296; + Name_IEEE_Float : constant Name_Id := N + 297; + Name_Ignore : constant Name_Id := N + 298; + Name_Info : constant Name_Id := N + 299; + Name_Internal : constant Name_Id := N + 300; + Name_Link_Name : constant Name_Id := N + 301; + Name_Lowercase : constant Name_Id := N + 302; + Name_Max_Entry_Queue_Depth : constant Name_Id := N + 303; + Name_Max_Entry_Queue_Length : constant Name_Id := N + 304; + Name_Max_Size : constant Name_Id := N + 305; + Name_Mechanism : constant Name_Id := N + 306; + Name_Message : constant Name_Id := N + 307; + Name_Mixedcase : constant Name_Id := N + 308; + Name_Modified_GPL : constant Name_Id := N + 309; + Name_Name : constant Name_Id := N + 310; + Name_NCA : constant Name_Id := N + 311; + Name_No : constant Name_Id := N + 312; + Name_No_Dependence : constant Name_Id := N + 313; + Name_No_Dynamic_Attachment : constant Name_Id := N + 314; + Name_No_Dynamic_Interrupts : constant Name_Id := N + 315; + Name_No_Requeue : constant Name_Id := N + 316; + Name_No_Requeue_Statements : constant Name_Id := N + 317; + Name_No_Task_Attributes : constant Name_Id := N + 318; + Name_No_Task_Attributes_Package : constant Name_Id := N + 319; + Name_On : constant Name_Id := N + 320; + Name_Parameter_Types : constant Name_Id := N + 321; + Name_Reference : constant Name_Id := N + 322; + Name_Restricted : constant Name_Id := N + 323; + Name_Result_Mechanism : constant Name_Id := N + 324; + Name_Result_Type : constant Name_Id := N + 325; + Name_Runtime : constant Name_Id := N + 326; + Name_SB : constant Name_Id := N + 327; + Name_Secondary_Stack_Size : constant Name_Id := N + 328; + Name_Section : constant Name_Id := N + 329; + Name_Semaphore : constant Name_Id := N + 330; + Name_Simple_Barriers : constant Name_Id := N + 331; + Name_Spec_File_Name : constant Name_Id := N + 332; + Name_State : constant Name_Id := N + 333; + Name_Static : constant Name_Id := N + 334; + Name_Stack_Size : constant Name_Id := N + 335; + Name_Subunit_File_Name : constant Name_Id := N + 336; + Name_Task_Stack_Size_Default : constant Name_Id := N + 337; + Name_Task_Type : constant Name_Id := N + 338; + Name_Time_Slicing_Enabled : constant Name_Id := N + 339; + Name_Top_Guard : constant Name_Id := N + 340; + Name_UBA : constant Name_Id := N + 341; + Name_UBS : constant Name_Id := N + 342; + Name_UBSB : constant Name_Id := N + 343; + Name_Unit_Name : constant Name_Id := N + 344; + Name_Unknown : constant Name_Id := N + 345; + Name_Unrestricted : constant Name_Id := N + 346; + Name_Uppercase : constant Name_Id := N + 347; + Name_User : constant Name_Id := N + 348; + Name_VAX_Float : constant Name_Id := N + 349; + Name_VMS : constant Name_Id := N + 350; + Name_Vtable_Ptr : constant Name_Id := N + 351; + Name_Working_Storage : constant Name_Id := N + 352; -- Names of recognized attributes. The entries with the comment "Ada 83" -- are attributes that are defined in Ada 83, but not in Ada 95. These @@ -630,166 +631,166 @@ package Snames is -- The entries marked VMS are recognized only in OpenVMS implementations -- of GNAT, and are treated as illegal in all other contexts. - First_Attribute_Name : constant Name_Id := N + 352; - Name_Abort_Signal : constant Name_Id := N + 352; -- GNAT - Name_Access : constant Name_Id := N + 353; - Name_Address : constant Name_Id := N + 354; - Name_Address_Size : constant Name_Id := N + 355; -- GNAT - Name_Aft : constant Name_Id := N + 356; - Name_Alignment : constant Name_Id := N + 357; - Name_Asm_Input : constant Name_Id := N + 358; -- GNAT - Name_Asm_Output : constant Name_Id := N + 359; -- GNAT - Name_AST_Entry : constant Name_Id := N + 360; -- VMS - Name_Bit : constant Name_Id := N + 361; -- GNAT - Name_Bit_Order : constant Name_Id := N + 362; - Name_Bit_Position : constant Name_Id := N + 363; -- GNAT - Name_Body_Version : constant Name_Id := N + 364; - Name_Callable : constant Name_Id := N + 365; - Name_Caller : constant Name_Id := N + 366; - Name_Code_Address : constant Name_Id := N + 367; -- GNAT - Name_Component_Size : constant Name_Id := N + 368; - Name_Compose : constant Name_Id := N + 369; - Name_Constrained : constant Name_Id := N + 370; - Name_Count : constant Name_Id := N + 371; - Name_Default_Bit_Order : constant Name_Id := N + 372; -- GNAT - Name_Definite : constant Name_Id := N + 373; - Name_Delta : constant Name_Id := N + 374; - Name_Denorm : constant Name_Id := N + 375; - Name_Digits : constant Name_Id := N + 376; - Name_Elaborated : constant Name_Id := N + 377; -- GNAT - Name_Emax : constant Name_Id := N + 378; -- Ada 83 - Name_Enum_Rep : constant Name_Id := N + 379; -- GNAT - Name_Epsilon : constant Name_Id := N + 380; -- Ada 83 - Name_Exponent : constant Name_Id := N + 381; - Name_External_Tag : constant Name_Id := N + 382; - Name_First : constant Name_Id := N + 383; - Name_First_Bit : constant Name_Id := N + 384; - Name_Fixed_Value : constant Name_Id := N + 385; -- GNAT - Name_Fore : constant Name_Id := N + 386; - Name_Has_Access_Values : constant Name_Id := N + 387; -- GNAT - Name_Has_Discriminants : constant Name_Id := N + 388; -- GNAT - Name_Identity : constant Name_Id := N + 389; - Name_Img : constant Name_Id := N + 390; -- GNAT - Name_Integer_Value : constant Name_Id := N + 391; -- GNAT - Name_Large : constant Name_Id := N + 392; -- Ada 83 - Name_Last : constant Name_Id := N + 393; - Name_Last_Bit : constant Name_Id := N + 394; - Name_Leading_Part : constant Name_Id := N + 395; - Name_Length : constant Name_Id := N + 396; - Name_Machine_Emax : constant Name_Id := N + 397; - Name_Machine_Emin : constant Name_Id := N + 398; - Name_Machine_Mantissa : constant Name_Id := N + 399; - Name_Machine_Overflows : constant Name_Id := N + 400; - Name_Machine_Radix : constant Name_Id := N + 401; - Name_Machine_Rounding : constant Name_Id := N + 402; -- Ada 05 - Name_Machine_Rounds : constant Name_Id := N + 403; - Name_Machine_Size : constant Name_Id := N + 404; -- GNAT - Name_Mantissa : constant Name_Id := N + 405; -- Ada 83 - Name_Max_Size_In_Storage_Elements : constant Name_Id := N + 406; - Name_Maximum_Alignment : constant Name_Id := N + 407; -- GNAT - Name_Mechanism_Code : constant Name_Id := N + 408; -- GNAT - Name_Mod : constant Name_Id := N + 409; - Name_Model_Emin : constant Name_Id := N + 410; - Name_Model_Epsilon : constant Name_Id := N + 411; - Name_Model_Mantissa : constant Name_Id := N + 412; - Name_Model_Small : constant Name_Id := N + 413; - Name_Modulus : constant Name_Id := N + 414; - Name_Null_Parameter : constant Name_Id := N + 415; -- GNAT - Name_Object_Size : constant Name_Id := N + 416; -- GNAT - Name_Partition_ID : constant Name_Id := N + 417; - Name_Passed_By_Reference : constant Name_Id := N + 418; -- GNAT - Name_Pool_Address : constant Name_Id := N + 419; - Name_Pos : constant Name_Id := N + 420; - Name_Position : constant Name_Id := N + 421; - Name_Range : constant Name_Id := N + 422; - Name_Range_Length : constant Name_Id := N + 423; -- GNAT - Name_Round : constant Name_Id := N + 424; - Name_Safe_Emax : constant Name_Id := N + 425; -- Ada 83 - Name_Safe_First : constant Name_Id := N + 426; - Name_Safe_Large : constant Name_Id := N + 427; -- Ada 83 - Name_Safe_Last : constant Name_Id := N + 428; - Name_Safe_Small : constant Name_Id := N + 429; -- Ada 83 - Name_Scale : constant Name_Id := N + 430; - Name_Scaling : constant Name_Id := N + 431; - Name_Signed_Zeros : constant Name_Id := N + 432; - Name_Size : constant Name_Id := N + 433; - Name_Small : constant Name_Id := N + 434; - Name_Storage_Size : constant Name_Id := N + 435; - Name_Storage_Unit : constant Name_Id := N + 436; -- GNAT - Name_Stream_Size : constant Name_Id := N + 437; -- Ada 05 - Name_Tag : constant Name_Id := N + 438; - Name_Target_Name : constant Name_Id := N + 439; -- GNAT - Name_Terminated : constant Name_Id := N + 440; - Name_To_Address : constant Name_Id := N + 441; -- GNAT - Name_Type_Class : constant Name_Id := N + 442; -- GNAT - Name_UET_Address : constant Name_Id := N + 443; -- GNAT - Name_Unbiased_Rounding : constant Name_Id := N + 444; - Name_Unchecked_Access : constant Name_Id := N + 445; - Name_Unconstrained_Array : constant Name_Id := N + 446; - Name_Universal_Literal_String : constant Name_Id := N + 447; -- GNAT - Name_Unrestricted_Access : constant Name_Id := N + 448; -- GNAT - Name_VADS_Size : constant Name_Id := N + 449; -- GNAT - Name_Val : constant Name_Id := N + 450; - Name_Valid : constant Name_Id := N + 451; - Name_Value_Size : constant Name_Id := N + 452; -- GNAT - Name_Version : constant Name_Id := N + 453; - Name_Wchar_T_Size : constant Name_Id := N + 454; -- GNAT - Name_Wide_Wide_Width : constant Name_Id := N + 455; -- Ada 05 - Name_Wide_Width : constant Name_Id := N + 456; - Name_Width : constant Name_Id := N + 457; - Name_Word_Size : constant Name_Id := N + 458; -- GNAT + First_Attribute_Name : constant Name_Id := N + 353; + Name_Abort_Signal : constant Name_Id := N + 353; -- GNAT + Name_Access : constant Name_Id := N + 354; + Name_Address : constant Name_Id := N + 355; + Name_Address_Size : constant Name_Id := N + 356; -- GNAT + Name_Aft : constant Name_Id := N + 357; + Name_Alignment : constant Name_Id := N + 358; + Name_Asm_Input : constant Name_Id := N + 359; -- GNAT + Name_Asm_Output : constant Name_Id := N + 360; -- GNAT + Name_AST_Entry : constant Name_Id := N + 361; -- VMS + Name_Bit : constant Name_Id := N + 362; -- GNAT + Name_Bit_Order : constant Name_Id := N + 363; + Name_Bit_Position : constant Name_Id := N + 364; -- GNAT + Name_Body_Version : constant Name_Id := N + 365; + Name_Callable : constant Name_Id := N + 366; + Name_Caller : constant Name_Id := N + 367; + Name_Code_Address : constant Name_Id := N + 368; -- GNAT + Name_Component_Size : constant Name_Id := N + 369; + Name_Compose : constant Name_Id := N + 370; + Name_Constrained : constant Name_Id := N + 371; + Name_Count : constant Name_Id := N + 372; + Name_Default_Bit_Order : constant Name_Id := N + 373; -- GNAT + Name_Definite : constant Name_Id := N + 374; + Name_Delta : constant Name_Id := N + 375; + Name_Denorm : constant Name_Id := N + 376; + Name_Digits : constant Name_Id := N + 377; + Name_Elaborated : constant Name_Id := N + 378; -- GNAT + Name_Emax : constant Name_Id := N + 379; -- Ada 83 + Name_Enum_Rep : constant Name_Id := N + 380; -- GNAT + Name_Epsilon : constant Name_Id := N + 381; -- Ada 83 + Name_Exponent : constant Name_Id := N + 382; + Name_External_Tag : constant Name_Id := N + 383; + Name_First : constant Name_Id := N + 384; + Name_First_Bit : constant Name_Id := N + 385; + Name_Fixed_Value : constant Name_Id := N + 386; -- GNAT + Name_Fore : constant Name_Id := N + 387; + Name_Has_Access_Values : constant Name_Id := N + 388; -- GNAT + Name_Has_Discriminants : constant Name_Id := N + 389; -- GNAT + Name_Identity : constant Name_Id := N + 390; + Name_Img : constant Name_Id := N + 391; -- GNAT + Name_Integer_Value : constant Name_Id := N + 392; -- GNAT + Name_Large : constant Name_Id := N + 393; -- Ada 83 + Name_Last : constant Name_Id := N + 394; + Name_Last_Bit : constant Name_Id := N + 395; + Name_Leading_Part : constant Name_Id := N + 396; + Name_Length : constant Name_Id := N + 397; + Name_Machine_Emax : constant Name_Id := N + 398; + Name_Machine_Emin : constant Name_Id := N + 399; + Name_Machine_Mantissa : constant Name_Id := N + 400; + Name_Machine_Overflows : constant Name_Id := N + 401; + Name_Machine_Radix : constant Name_Id := N + 402; + Name_Machine_Rounding : constant Name_Id := N + 403; -- Ada 05 + Name_Machine_Rounds : constant Name_Id := N + 404; + Name_Machine_Size : constant Name_Id := N + 405; -- GNAT + Name_Mantissa : constant Name_Id := N + 406; -- Ada 83 + Name_Max_Size_In_Storage_Elements : constant Name_Id := N + 407; + Name_Maximum_Alignment : constant Name_Id := N + 408; -- GNAT + Name_Mechanism_Code : constant Name_Id := N + 409; -- GNAT + Name_Mod : constant Name_Id := N + 410; + Name_Model_Emin : constant Name_Id := N + 411; + Name_Model_Epsilon : constant Name_Id := N + 412; + Name_Model_Mantissa : constant Name_Id := N + 413; + Name_Model_Small : constant Name_Id := N + 414; + Name_Modulus : constant Name_Id := N + 415; + Name_Null_Parameter : constant Name_Id := N + 416; -- GNAT + Name_Object_Size : constant Name_Id := N + 417; -- GNAT + Name_Partition_ID : constant Name_Id := N + 418; + Name_Passed_By_Reference : constant Name_Id := N + 419; -- GNAT + Name_Pool_Address : constant Name_Id := N + 420; + Name_Pos : constant Name_Id := N + 421; + Name_Position : constant Name_Id := N + 422; + Name_Range : constant Name_Id := N + 423; + Name_Range_Length : constant Name_Id := N + 424; -- GNAT + Name_Round : constant Name_Id := N + 425; + Name_Safe_Emax : constant Name_Id := N + 426; -- Ada 83 + Name_Safe_First : constant Name_Id := N + 427; + Name_Safe_Large : constant Name_Id := N + 428; -- Ada 83 + Name_Safe_Last : constant Name_Id := N + 429; + Name_Safe_Small : constant Name_Id := N + 430; -- Ada 83 + Name_Scale : constant Name_Id := N + 431; + Name_Scaling : constant Name_Id := N + 432; + Name_Signed_Zeros : constant Name_Id := N + 433; + Name_Size : constant Name_Id := N + 434; + Name_Small : constant Name_Id := N + 435; + Name_Storage_Size : constant Name_Id := N + 436; + Name_Storage_Unit : constant Name_Id := N + 437; -- GNAT + Name_Stream_Size : constant Name_Id := N + 438; -- Ada 05 + Name_Tag : constant Name_Id := N + 439; + Name_Target_Name : constant Name_Id := N + 440; -- GNAT + Name_Terminated : constant Name_Id := N + 441; + Name_To_Address : constant Name_Id := N + 442; -- GNAT + Name_Type_Class : constant Name_Id := N + 443; -- GNAT + Name_UET_Address : constant Name_Id := N + 444; -- GNAT + Name_Unbiased_Rounding : constant Name_Id := N + 445; + Name_Unchecked_Access : constant Name_Id := N + 446; + Name_Unconstrained_Array : constant Name_Id := N + 447; + Name_Universal_Literal_String : constant Name_Id := N + 448; -- GNAT + Name_Unrestricted_Access : constant Name_Id := N + 449; -- GNAT + Name_VADS_Size : constant Name_Id := N + 450; -- GNAT + Name_Val : constant Name_Id := N + 451; + Name_Valid : constant Name_Id := N + 452; + Name_Value_Size : constant Name_Id := N + 453; -- GNAT + Name_Version : constant Name_Id := N + 454; + Name_Wchar_T_Size : constant Name_Id := N + 455; -- GNAT + Name_Wide_Wide_Width : constant Name_Id := N + 456; -- Ada 05 + Name_Wide_Width : constant Name_Id := N + 457; + Name_Width : constant Name_Id := N + 458; + Name_Word_Size : constant Name_Id := N + 459; -- GNAT -- Attributes that designate attributes returning renamable functions, -- i.e. functions that return other than a universal value and that -- have non-universal arguments. - First_Renamable_Function_Attribute : constant Name_Id := N + 459; - Name_Adjacent : constant Name_Id := N + 459; - Name_Ceiling : constant Name_Id := N + 460; - Name_Copy_Sign : constant Name_Id := N + 461; - Name_Floor : constant Name_Id := N + 462; - Name_Fraction : constant Name_Id := N + 463; - Name_Image : constant Name_Id := N + 464; - Name_Input : constant Name_Id := N + 465; - Name_Machine : constant Name_Id := N + 466; - Name_Max : constant Name_Id := N + 467; - Name_Min : constant Name_Id := N + 468; - Name_Model : constant Name_Id := N + 469; - Name_Pred : constant Name_Id := N + 470; - Name_Remainder : constant Name_Id := N + 471; - Name_Rounding : constant Name_Id := N + 472; - Name_Succ : constant Name_Id := N + 473; - Name_Truncation : constant Name_Id := N + 474; - Name_Value : constant Name_Id := N + 475; - Name_Wide_Image : constant Name_Id := N + 476; - Name_Wide_Wide_Image : constant Name_Id := N + 477; - Name_Wide_Value : constant Name_Id := N + 478; - Name_Wide_Wide_Value : constant Name_Id := N + 479; - Last_Renamable_Function_Attribute : constant Name_Id := N + 479; + First_Renamable_Function_Attribute : constant Name_Id := N + 460; + Name_Adjacent : constant Name_Id := N + 460; + Name_Ceiling : constant Name_Id := N + 461; + Name_Copy_Sign : constant Name_Id := N + 462; + Name_Floor : constant Name_Id := N + 463; + Name_Fraction : constant Name_Id := N + 464; + Name_Image : constant Name_Id := N + 465; + Name_Input : constant Name_Id := N + 466; + Name_Machine : constant Name_Id := N + 467; + Name_Max : constant Name_Id := N + 468; + Name_Min : constant Name_Id := N + 469; + Name_Model : constant Name_Id := N + 470; + Name_Pred : constant Name_Id := N + 471; + Name_Remainder : constant Name_Id := N + 472; + Name_Rounding : constant Name_Id := N + 473; + Name_Succ : constant Name_Id := N + 474; + Name_Truncation : constant Name_Id := N + 475; + Name_Value : constant Name_Id := N + 476; + Name_Wide_Image : constant Name_Id := N + 477; + Name_Wide_Wide_Image : constant Name_Id := N + 478; + Name_Wide_Value : constant Name_Id := N + 479; + Name_Wide_Wide_Value : constant Name_Id := N + 480; + Last_Renamable_Function_Attribute : constant Name_Id := N + 480; -- Attributes that designate procedures - First_Procedure_Attribute : constant Name_Id := N + 480; - Name_Output : constant Name_Id := N + 480; - Name_Read : constant Name_Id := N + 481; - Name_Write : constant Name_Id := N + 482; - Last_Procedure_Attribute : constant Name_Id := N + 482; + First_Procedure_Attribute : constant Name_Id := N + 481; + Name_Output : constant Name_Id := N + 481; + Name_Read : constant Name_Id := N + 482; + Name_Write : constant Name_Id := N + 483; + Last_Procedure_Attribute : constant Name_Id := N + 483; -- Remaining attributes are ones that return entities - First_Entity_Attribute_Name : constant Name_Id := N + 483; - Name_Elab_Body : constant Name_Id := N + 483; -- GNAT - Name_Elab_Spec : constant Name_Id := N + 484; -- GNAT - Name_Storage_Pool : constant Name_Id := N + 485; + First_Entity_Attribute_Name : constant Name_Id := N + 484; + Name_Elab_Body : constant Name_Id := N + 484; -- GNAT + Name_Elab_Spec : constant Name_Id := N + 485; -- GNAT + Name_Storage_Pool : constant Name_Id := N + 486; -- These attributes are the ones that return types - First_Type_Attribute_Name : constant Name_Id := N + 486; - Name_Base : constant Name_Id := N + 486; - Name_Class : constant Name_Id := N + 487; - Last_Type_Attribute_Name : constant Name_Id := N + 487; - Last_Entity_Attribute_Name : constant Name_Id := N + 487; - Last_Attribute_Name : constant Name_Id := N + 487; + First_Type_Attribute_Name : constant Name_Id := N + 487; + Name_Base : constant Name_Id := N + 487; + Name_Class : constant Name_Id := N + 488; + Last_Type_Attribute_Name : constant Name_Id := N + 488; + Last_Entity_Attribute_Name : constant Name_Id := N + 488; + Last_Attribute_Name : constant Name_Id := N + 488; -- Names of recognized locking policy identifiers @@ -797,10 +798,10 @@ package Snames is -- name (e.g. C for Ceiling_Locking). If new policy names are added, -- the first character must be distinct. - First_Locking_Policy_Name : constant Name_Id := N + 488; - Name_Ceiling_Locking : constant Name_Id := N + 488; - Name_Inheritance_Locking : constant Name_Id := N + 489; - Last_Locking_Policy_Name : constant Name_Id := N + 489; + First_Locking_Policy_Name : constant Name_Id := N + 489; + Name_Ceiling_Locking : constant Name_Id := N + 489; + Name_Inheritance_Locking : constant Name_Id := N + 490; + Last_Locking_Policy_Name : constant Name_Id := N + 490; -- Names of recognized queuing policy identifiers @@ -808,10 +809,10 @@ package Snames is -- name (e.g. F for FIFO_Queuing). If new policy names are added, -- the first character must be distinct. - First_Queuing_Policy_Name : constant Name_Id := N + 490; - Name_FIFO_Queuing : constant Name_Id := N + 490; - Name_Priority_Queuing : constant Name_Id := N + 491; - Last_Queuing_Policy_Name : constant Name_Id := N + 491; + First_Queuing_Policy_Name : constant Name_Id := N + 491; + Name_FIFO_Queuing : constant Name_Id := N + 491; + Name_Priority_Queuing : constant Name_Id := N + 492; + Last_Queuing_Policy_Name : constant Name_Id := N + 492; -- Names of recognized task dispatching policy identifiers @@ -819,220 +820,220 @@ package Snames is -- name (e.g. F for FIFO_WIthinn_Priorities). If new policy names -- are added, the first character must be distinct. - First_Task_Dispatching_Policy_Name : constant Name_Id := N + 492; - Name_FIFO_Within_Priorities : constant Name_Id := N + 492; - Last_Task_Dispatching_Policy_Name : constant Name_Id := N + 492; + First_Task_Dispatching_Policy_Name : constant Name_Id := N + 493; + Name_FIFO_Within_Priorities : constant Name_Id := N + 493; + Last_Task_Dispatching_Policy_Name : constant Name_Id := N + 493; -- Names of recognized checks for pragma Suppress - First_Check_Name : constant Name_Id := N + 493; - Name_Access_Check : constant Name_Id := N + 493; - Name_Accessibility_Check : constant Name_Id := N + 494; - Name_Discriminant_Check : constant Name_Id := N + 495; - Name_Division_Check : constant Name_Id := N + 496; - Name_Elaboration_Check : constant Name_Id := N + 497; - Name_Index_Check : constant Name_Id := N + 498; - Name_Length_Check : constant Name_Id := N + 499; - Name_Overflow_Check : constant Name_Id := N + 500; - Name_Range_Check : constant Name_Id := N + 501; - Name_Storage_Check : constant Name_Id := N + 502; - Name_Tag_Check : constant Name_Id := N + 503; - Name_All_Checks : constant Name_Id := N + 504; - Last_Check_Name : constant Name_Id := N + 504; + First_Check_Name : constant Name_Id := N + 494; + Name_Access_Check : constant Name_Id := N + 494; + Name_Accessibility_Check : constant Name_Id := N + 495; + Name_Discriminant_Check : constant Name_Id := N + 496; + Name_Division_Check : constant Name_Id := N + 497; + Name_Elaboration_Check : constant Name_Id := N + 498; + Name_Index_Check : constant Name_Id := N + 499; + Name_Length_Check : constant Name_Id := N + 500; + Name_Overflow_Check : constant Name_Id := N + 501; + Name_Range_Check : constant Name_Id := N + 502; + Name_Storage_Check : constant Name_Id := N + 503; + Name_Tag_Check : constant Name_Id := N + 504; + Name_All_Checks : constant Name_Id := N + 505; + Last_Check_Name : constant Name_Id := N + 505; -- Names corresponding to reserved keywords, excluding those already -- declared in the attribute list (Access, Delta, Digits, Mod, Range). - Name_Abort : constant Name_Id := N + 505; - Name_Abs : constant Name_Id := N + 506; - Name_Accept : constant Name_Id := N + 507; - Name_And : constant Name_Id := N + 508; - Name_All : constant Name_Id := N + 509; - Name_Array : constant Name_Id := N + 510; - Name_At : constant Name_Id := N + 511; - Name_Begin : constant Name_Id := N + 512; - Name_Body : constant Name_Id := N + 513; - Name_Case : constant Name_Id := N + 514; - Name_Constant : constant Name_Id := N + 515; - Name_Declare : constant Name_Id := N + 516; - Name_Delay : constant Name_Id := N + 517; - Name_Do : constant Name_Id := N + 518; - Name_Else : constant Name_Id := N + 519; - Name_Elsif : constant Name_Id := N + 520; - Name_End : constant Name_Id := N + 521; - Name_Entry : constant Name_Id := N + 522; - Name_Exception : constant Name_Id := N + 523; - Name_Exit : constant Name_Id := N + 524; - Name_For : constant Name_Id := N + 525; - Name_Function : constant Name_Id := N + 526; - Name_Generic : constant Name_Id := N + 527; - Name_Goto : constant Name_Id := N + 528; - Name_If : constant Name_Id := N + 529; - Name_In : constant Name_Id := N + 530; - Name_Is : constant Name_Id := N + 531; - Name_Limited : constant Name_Id := N + 532; - Name_Loop : constant Name_Id := N + 533; - Name_New : constant Name_Id := N + 534; - Name_Not : constant Name_Id := N + 535; - Name_Null : constant Name_Id := N + 536; - Name_Of : constant Name_Id := N + 537; - Name_Or : constant Name_Id := N + 538; - Name_Others : constant Name_Id := N + 539; - Name_Out : constant Name_Id := N + 540; - Name_Package : constant Name_Id := N + 541; - Name_Pragma : constant Name_Id := N + 542; - Name_Private : constant Name_Id := N + 543; - Name_Procedure : constant Name_Id := N + 544; - Name_Raise : constant Name_Id := N + 545; - Name_Record : constant Name_Id := N + 546; - Name_Rem : constant Name_Id := N + 547; - Name_Renames : constant Name_Id := N + 548; - Name_Return : constant Name_Id := N + 549; - Name_Reverse : constant Name_Id := N + 550; - Name_Select : constant Name_Id := N + 551; - Name_Separate : constant Name_Id := N + 552; - Name_Subtype : constant Name_Id := N + 553; - Name_Task : constant Name_Id := N + 554; - Name_Terminate : constant Name_Id := N + 555; - Name_Then : constant Name_Id := N + 556; - Name_Type : constant Name_Id := N + 557; - Name_Use : constant Name_Id := N + 558; - Name_When : constant Name_Id := N + 559; - Name_While : constant Name_Id := N + 560; - Name_With : constant Name_Id := N + 561; - Name_Xor : constant Name_Id := N + 562; + Name_Abort : constant Name_Id := N + 506; + Name_Abs : constant Name_Id := N + 507; + Name_Accept : constant Name_Id := N + 508; + Name_And : constant Name_Id := N + 509; + Name_All : constant Name_Id := N + 510; + Name_Array : constant Name_Id := N + 511; + Name_At : constant Name_Id := N + 512; + Name_Begin : constant Name_Id := N + 513; + Name_Body : constant Name_Id := N + 514; + Name_Case : constant Name_Id := N + 515; + Name_Constant : constant Name_Id := N + 516; + Name_Declare : constant Name_Id := N + 517; + Name_Delay : constant Name_Id := N + 518; + Name_Do : constant Name_Id := N + 519; + Name_Else : constant Name_Id := N + 520; + Name_Elsif : constant Name_Id := N + 521; + Name_End : constant Name_Id := N + 522; + Name_Entry : constant Name_Id := N + 523; + Name_Exception : constant Name_Id := N + 524; + Name_Exit : constant Name_Id := N + 525; + Name_For : constant Name_Id := N + 526; + Name_Function : constant Name_Id := N + 527; + Name_Generic : constant Name_Id := N + 528; + Name_Goto : constant Name_Id := N + 529; + Name_If : constant Name_Id := N + 530; + Name_In : constant Name_Id := N + 531; + Name_Is : constant Name_Id := N + 532; + Name_Limited : constant Name_Id := N + 533; + Name_Loop : constant Name_Id := N + 534; + Name_New : constant Name_Id := N + 535; + Name_Not : constant Name_Id := N + 536; + Name_Null : constant Name_Id := N + 537; + Name_Of : constant Name_Id := N + 538; + Name_Or : constant Name_Id := N + 539; + Name_Others : constant Name_Id := N + 540; + Name_Out : constant Name_Id := N + 541; + Name_Package : constant Name_Id := N + 542; + Name_Pragma : constant Name_Id := N + 543; + Name_Private : constant Name_Id := N + 544; + Name_Procedure : constant Name_Id := N + 545; + Name_Raise : constant Name_Id := N + 546; + Name_Record : constant Name_Id := N + 547; + Name_Rem : constant Name_Id := N + 548; + Name_Renames : constant Name_Id := N + 549; + Name_Return : constant Name_Id := N + 550; + Name_Reverse : constant Name_Id := N + 551; + Name_Select : constant Name_Id := N + 552; + Name_Separate : constant Name_Id := N + 553; + Name_Subtype : constant Name_Id := N + 554; + Name_Task : constant Name_Id := N + 555; + Name_Terminate : constant Name_Id := N + 556; + Name_Then : constant Name_Id := N + 557; + Name_Type : constant Name_Id := N + 558; + Name_Use : constant Name_Id := N + 559; + Name_When : constant Name_Id := N + 560; + Name_While : constant Name_Id := N + 561; + Name_With : constant Name_Id := N + 562; + Name_Xor : constant Name_Id := N + 563; -- Names of intrinsic subprograms -- Note: Asm is missing from this list, since Asm is a legitimate -- convention name. So is To_Adress, which is a GNAT attribute. - First_Intrinsic_Name : constant Name_Id := N + 563; - Name_Divide : constant Name_Id := N + 563; - Name_Enclosing_Entity : constant Name_Id := N + 564; - Name_Exception_Information : constant Name_Id := N + 565; - Name_Exception_Message : constant Name_Id := N + 566; - Name_Exception_Name : constant Name_Id := N + 567; - Name_File : constant Name_Id := N + 568; - Name_Generic_Dispatching_Constructor : constant Name_Id := N + 569; - Name_Import_Address : constant Name_Id := N + 570; - Name_Import_Largest_Value : constant Name_Id := N + 571; - Name_Import_Value : constant Name_Id := N + 572; - Name_Is_Negative : constant Name_Id := N + 573; - Name_Line : constant Name_Id := N + 574; - Name_Rotate_Left : constant Name_Id := N + 575; - Name_Rotate_Right : constant Name_Id := N + 576; - Name_Shift_Left : constant Name_Id := N + 577; - Name_Shift_Right : constant Name_Id := N + 578; - Name_Shift_Right_Arithmetic : constant Name_Id := N + 579; - Name_Source_Location : constant Name_Id := N + 580; - Name_Unchecked_Conversion : constant Name_Id := N + 581; - Name_Unchecked_Deallocation : constant Name_Id := N + 582; - Name_To_Pointer : constant Name_Id := N + 583; - Last_Intrinsic_Name : constant Name_Id := N + 583; + First_Intrinsic_Name : constant Name_Id := N + 564; + Name_Divide : constant Name_Id := N + 564; + Name_Enclosing_Entity : constant Name_Id := N + 565; + Name_Exception_Information : constant Name_Id := N + 566; + Name_Exception_Message : constant Name_Id := N + 567; + Name_Exception_Name : constant Name_Id := N + 568; + Name_File : constant Name_Id := N + 569; + Name_Generic_Dispatching_Constructor : constant Name_Id := N + 570; + Name_Import_Address : constant Name_Id := N + 571; + Name_Import_Largest_Value : constant Name_Id := N + 572; + Name_Import_Value : constant Name_Id := N + 573; + Name_Is_Negative : constant Name_Id := N + 574; + Name_Line : constant Name_Id := N + 575; + Name_Rotate_Left : constant Name_Id := N + 576; + Name_Rotate_Right : constant Name_Id := N + 577; + Name_Shift_Left : constant Name_Id := N + 578; + Name_Shift_Right : constant Name_Id := N + 579; + Name_Shift_Right_Arithmetic : constant Name_Id := N + 580; + Name_Source_Location : constant Name_Id := N + 581; + Name_Unchecked_Conversion : constant Name_Id := N + 582; + Name_Unchecked_Deallocation : constant Name_Id := N + 583; + Name_To_Pointer : constant Name_Id := N + 584; + Last_Intrinsic_Name : constant Name_Id := N + 584; -- Names used in processing intrinsic calls - Name_Free : constant Name_Id := N + 584; + Name_Free : constant Name_Id := N + 585; -- Reserved words used only in Ada 95 - First_95_Reserved_Word : constant Name_Id := N + 585; - Name_Abstract : constant Name_Id := N + 585; - Name_Aliased : constant Name_Id := N + 586; - Name_Protected : constant Name_Id := N + 587; - Name_Until : constant Name_Id := N + 588; - Name_Requeue : constant Name_Id := N + 589; - Name_Tagged : constant Name_Id := N + 590; - Last_95_Reserved_Word : constant Name_Id := N + 590; + First_95_Reserved_Word : constant Name_Id := N + 586; + Name_Abstract : constant Name_Id := N + 586; + Name_Aliased : constant Name_Id := N + 587; + Name_Protected : constant Name_Id := N + 588; + Name_Until : constant Name_Id := N + 589; + Name_Requeue : constant Name_Id := N + 590; + Name_Tagged : constant Name_Id := N + 591; + Last_95_Reserved_Word : constant Name_Id := N + 591; subtype Ada_95_Reserved_Words is Name_Id range First_95_Reserved_Word .. Last_95_Reserved_Word; -- Miscellaneous names used in semantic checking - Name_Raise_Exception : constant Name_Id := N + 591; + Name_Raise_Exception : constant Name_Id := N + 592; -- Additional reserved words and identifiers used in GNAT Project Files -- Note that Name_External is already previously declared - Name_Ada_Roots : constant Name_Id := N + 592; - Name_Binder : constant Name_Id := N + 593; - Name_Binder_Driver : constant Name_Id := N + 594; - Name_Body_Suffix : constant Name_Id := N + 595; - Name_Builder : constant Name_Id := N + 596; - Name_Compiler : constant Name_Id := N + 597; - Name_Compiler_Driver : constant Name_Id := N + 598; - Name_Compiler_Kind : constant Name_Id := N + 599; - Name_Compute_Dependency : constant Name_Id := N + 600; - Name_Cross_Reference : constant Name_Id := N + 601; - Name_Default_Linker : constant Name_Id := N + 602; - Name_Default_Switches : constant Name_Id := N + 603; - Name_Dependency_Option : constant Name_Id := N + 604; - Name_Exec_Dir : constant Name_Id := N + 605; - Name_Executable : constant Name_Id := N + 606; - Name_Executable_Suffix : constant Name_Id := N + 607; - Name_Extends : constant Name_Id := N + 608; - Name_Externally_Built : constant Name_Id := N + 609; - Name_Finder : constant Name_Id := N + 610; - Name_Global_Configuration_Pragmas : constant Name_Id := N + 611; - Name_Gnatls : constant Name_Id := N + 612; - Name_Gnatstub : constant Name_Id := N + 613; - Name_Implementation : constant Name_Id := N + 614; - Name_Implementation_Exceptions : constant Name_Id := N + 615; - Name_Implementation_Suffix : constant Name_Id := N + 616; - Name_Include_Option : constant Name_Id := N + 617; - Name_Language_Processing : constant Name_Id := N + 618; - Name_Languages : constant Name_Id := N + 619; - Name_Library_Ali_Dir : constant Name_Id := N + 620; - Name_Library_Dir : constant Name_Id := N + 621; - Name_Library_Auto_Init : constant Name_Id := N + 622; - Name_Library_GCC : constant Name_Id := N + 623; - Name_Library_Interface : constant Name_Id := N + 624; - Name_Library_Kind : constant Name_Id := N + 625; - Name_Library_Name : constant Name_Id := N + 626; - Name_Library_Options : constant Name_Id := N + 627; - Name_Library_Reference_Symbol_File : constant Name_Id := N + 628; - Name_Library_Src_Dir : constant Name_Id := N + 629; - Name_Library_Symbol_File : constant Name_Id := N + 630; - Name_Library_Symbol_Policy : constant Name_Id := N + 631; - Name_Library_Version : constant Name_Id := N + 632; - Name_Linker : constant Name_Id := N + 633; - Name_Local_Configuration_Pragmas : constant Name_Id := N + 634; - Name_Locally_Removed_Files : constant Name_Id := N + 635; - Name_Metrics : constant Name_Id := N + 636; - Name_Naming : constant Name_Id := N + 637; - Name_Object_Dir : constant Name_Id := N + 638; - Name_Pretty_Printer : constant Name_Id := N + 639; - Name_Project : constant Name_Id := N + 640; - Name_Separate_Suffix : constant Name_Id := N + 641; - Name_Source_Dirs : constant Name_Id := N + 642; - Name_Source_Files : constant Name_Id := N + 643; - Name_Source_List_File : constant Name_Id := N + 644; - Name_Spec : constant Name_Id := N + 645; - Name_Spec_Suffix : constant Name_Id := N + 646; - Name_Specification : constant Name_Id := N + 647; - Name_Specification_Exceptions : constant Name_Id := N + 648; - Name_Specification_Suffix : constant Name_Id := N + 649; - Name_Switches : constant Name_Id := N + 650; + Name_Ada_Roots : constant Name_Id := N + 593; + Name_Binder : constant Name_Id := N + 594; + Name_Binder_Driver : constant Name_Id := N + 595; + Name_Body_Suffix : constant Name_Id := N + 596; + Name_Builder : constant Name_Id := N + 597; + Name_Compiler : constant Name_Id := N + 598; + Name_Compiler_Driver : constant Name_Id := N + 599; + Name_Compiler_Kind : constant Name_Id := N + 600; + Name_Compute_Dependency : constant Name_Id := N + 601; + Name_Cross_Reference : constant Name_Id := N + 602; + Name_Default_Linker : constant Name_Id := N + 603; + Name_Default_Switches : constant Name_Id := N + 604; + Name_Dependency_Option : constant Name_Id := N + 605; + Name_Exec_Dir : constant Name_Id := N + 606; + Name_Executable : constant Name_Id := N + 607; + Name_Executable_Suffix : constant Name_Id := N + 608; + Name_Extends : constant Name_Id := N + 609; + Name_Externally_Built : constant Name_Id := N + 610; + Name_Finder : constant Name_Id := N + 611; + Name_Global_Configuration_Pragmas : constant Name_Id := N + 612; + Name_Gnatls : constant Name_Id := N + 613; + Name_Gnatstub : constant Name_Id := N + 614; + Name_Implementation : constant Name_Id := N + 615; + Name_Implementation_Exceptions : constant Name_Id := N + 616; + Name_Implementation_Suffix : constant Name_Id := N + 617; + Name_Include_Option : constant Name_Id := N + 618; + Name_Language_Processing : constant Name_Id := N + 619; + Name_Languages : constant Name_Id := N + 620; + Name_Library_Ali_Dir : constant Name_Id := N + 621; + Name_Library_Dir : constant Name_Id := N + 622; + Name_Library_Auto_Init : constant Name_Id := N + 623; + Name_Library_GCC : constant Name_Id := N + 624; + Name_Library_Interface : constant Name_Id := N + 625; + Name_Library_Kind : constant Name_Id := N + 626; + Name_Library_Name : constant Name_Id := N + 627; + Name_Library_Options : constant Name_Id := N + 628; + Name_Library_Reference_Symbol_File : constant Name_Id := N + 629; + Name_Library_Src_Dir : constant Name_Id := N + 630; + Name_Library_Symbol_File : constant Name_Id := N + 631; + Name_Library_Symbol_Policy : constant Name_Id := N + 632; + Name_Library_Version : constant Name_Id := N + 633; + Name_Linker : constant Name_Id := N + 634; + Name_Local_Configuration_Pragmas : constant Name_Id := N + 635; + Name_Locally_Removed_Files : constant Name_Id := N + 636; + Name_Metrics : constant Name_Id := N + 637; + Name_Naming : constant Name_Id := N + 638; + Name_Object_Dir : constant Name_Id := N + 639; + Name_Pretty_Printer : constant Name_Id := N + 640; + Name_Project : constant Name_Id := N + 641; + Name_Separate_Suffix : constant Name_Id := N + 642; + Name_Source_Dirs : constant Name_Id := N + 643; + Name_Source_Files : constant Name_Id := N + 644; + Name_Source_List_File : constant Name_Id := N + 645; + Name_Spec : constant Name_Id := N + 646; + Name_Spec_Suffix : constant Name_Id := N + 647; + Name_Specification : constant Name_Id := N + 648; + Name_Specification_Exceptions : constant Name_Id := N + 649; + Name_Specification_Suffix : constant Name_Id := N + 650; + Name_Switches : constant Name_Id := N + 651; -- Other miscellaneous names used in front end - Name_Unaligned_Valid : constant Name_Id := N + 651; + Name_Unaligned_Valid : constant Name_Id := N + 652; -- ---------------------------------------------------------------- - First_2005_Reserved_Word : constant Name_Id := N + 652; - Name_Interface : constant Name_Id := N + 652; - Name_Overriding : constant Name_Id := N + 653; - Name_Synchronized : constant Name_Id := N + 654; - Last_2005_Reserved_Word : constant Name_Id := N + 654; + First_2005_Reserved_Word : constant Name_Id := N + 653; + Name_Interface : constant Name_Id := N + 653; + Name_Overriding : constant Name_Id := N + 654; + Name_Synchronized : constant Name_Id := N + 655; + Last_2005_Reserved_Word : constant Name_Id := N + 655; subtype Ada_2005_Reserved_Words is Name_Id range First_2005_Reserved_Word .. Last_2005_Reserved_Word; -- Mark last defined name for consistency check in Snames body - Last_Predefined_Name : constant Name_Id := N + 654; + Last_Predefined_Name : constant Name_Id := N + 655; subtype Any_Operator_Name is Name_Id range First_Operator_Name .. Last_Operator_Name; @@ -1303,6 +1304,7 @@ package Snames is Pragma_Attach_Handler, Pragma_Comment, Pragma_Common_Object, + Pragma_Complete_Representation, Pragma_Complex_Representation, Pragma_Controlled, Pragma_Convention, diff --git a/gcc/ada/snames.h b/gcc/ada/snames.h index 7b0c2ee5d0a..d16232e435a 100644 --- a/gcc/ada/snames.h +++ b/gcc/ada/snames.h @@ -270,96 +270,97 @@ extern unsigned char Get_Pragma_Id (int); #define Pragma_Attach_Handler 55 #define Pragma_Comment 56 #define Pragma_Common_Object 57 -#define Pragma_Complex_Representation 58 -#define Pragma_Controlled 59 -#define Pragma_Convention 60 -#define Pragma_CPP_Class 61 -#define Pragma_CPP_Constructor 62 -#define Pragma_CPP_Virtual 63 -#define Pragma_CPP_Vtable 64 -#define Pragma_Debug 65 -#define Pragma_Elaborate 66 -#define Pragma_Elaborate_All 67 -#define Pragma_Elaborate_Body 68 -#define Pragma_Export 69 -#define Pragma_Export_Exception 70 -#define Pragma_Export_Function 71 -#define Pragma_Export_Object 72 -#define Pragma_Export_Procedure 73 -#define Pragma_Export_Value 74 -#define Pragma_Export_Valued_Procedure 75 -#define Pragma_External 76 -#define Pragma_Finalize_Storage_Only 77 -#define Pragma_Ident 78 -#define Pragma_Import 79 -#define Pragma_Import_Exception 80 -#define Pragma_Import_Function 81 -#define Pragma_Import_Object 82 -#define Pragma_Import_Procedure 83 -#define Pragma_Import_Valued_Procedure 84 -#define Pragma_Inline 85 -#define Pragma_Inline_Always 86 -#define Pragma_Inline_Generic 87 -#define Pragma_Inspection_Point 88 -#define Pragma_Interface_Name 89 -#define Pragma_Interrupt_Handler 90 -#define Pragma_Interrupt_Priority 91 -#define Pragma_Java_Constructor 92 -#define Pragma_Java_Interface 93 -#define Pragma_Keep_Names 94 -#define Pragma_Link_With 95 -#define Pragma_Linker_Alias 96 -#define Pragma_Linker_Constructor 97 -#define Pragma_Linker_Destructor 98 -#define Pragma_Linker_Options 99 -#define Pragma_Linker_Section 100 -#define Pragma_List 101 -#define Pragma_Machine_Attribute 102 -#define Pragma_Main 103 -#define Pragma_Main_Storage 104 -#define Pragma_Memory_Size 105 -#define Pragma_No_Return 106 -#define Pragma_Obsolescent 107 -#define Pragma_Optimize 108 -#define Pragma_Optional_Overriding 109 -#define Pragma_Pack 110 -#define Pragma_Page 111 -#define Pragma_Passive 112 -#define Pragma_Preelaborate 113 -#define Pragma_Preelaborate_05 114 -#define Pragma_Priority 115 -#define Pragma_Psect_Object 116 -#define Pragma_Pure 117 -#define Pragma_Pure_05 118 -#define Pragma_Pure_Function 119 -#define Pragma_Remote_Call_Interface 120 -#define Pragma_Remote_Types 121 -#define Pragma_Share_Generic 122 -#define Pragma_Shared 123 -#define Pragma_Shared_Passive 124 -#define Pragma_Source_Reference 125 -#define Pragma_Stream_Convert 126 -#define Pragma_Subtitle 127 -#define Pragma_Suppress_All 128 -#define Pragma_Suppress_Debug_Info 129 -#define Pragma_Suppress_Initialization 130 -#define Pragma_System_Name 131 -#define Pragma_Task_Info 132 -#define Pragma_Task_Name 133 -#define Pragma_Task_Storage 134 -#define Pragma_Thread_Body 135 -#define Pragma_Time_Slice 136 -#define Pragma_Title 137 -#define Pragma_Unchecked_Union 138 -#define Pragma_Unimplemented_Unit 139 -#define Pragma_Unreferenced 140 -#define Pragma_Unreserve_All_Interrupts 141 -#define Pragma_Volatile 142 -#define Pragma_Volatile_Components 143 -#define Pragma_Weak_External 144 -#define Pragma_AST_Entry 145 -#define Pragma_Interface 146 -#define Pragma_Storage_Size 147 -#define Pragma_Storage_Unit 148 +#define Pragma_Complete_Representation 58 +#define Pragma_Complex_Representation 59 +#define Pragma_Controlled 60 +#define Pragma_Convention 61 +#define Pragma_CPP_Class 62 +#define Pragma_CPP_Constructor 63 +#define Pragma_CPP_Virtual 64 +#define Pragma_CPP_Vtable 65 +#define Pragma_Debug 66 +#define Pragma_Elaborate 67 +#define Pragma_Elaborate_All 68 +#define Pragma_Elaborate_Body 69 +#define Pragma_Export 70 +#define Pragma_Export_Exception 71 +#define Pragma_Export_Function 72 +#define Pragma_Export_Object 73 +#define Pragma_Export_Procedure 74 +#define Pragma_Export_Value 75 +#define Pragma_Export_Valued_Procedure 76 +#define Pragma_External 77 +#define Pragma_Finalize_Storage_Only 78 +#define Pragma_Ident 79 +#define Pragma_Import 80 +#define Pragma_Import_Exception 81 +#define Pragma_Import_Function 82 +#define Pragma_Import_Object 83 +#define Pragma_Import_Procedure 84 +#define Pragma_Import_Valued_Procedure 85 +#define Pragma_Inline 86 +#define Pragma_Inline_Always 87 +#define Pragma_Inline_Generic 88 +#define Pragma_Inspection_Point 89 +#define Pragma_Interface_Name 90 +#define Pragma_Interrupt_Handler 91 +#define Pragma_Interrupt_Priority 92 +#define Pragma_Java_Constructor 93 +#define Pragma_Java_Interface 94 +#define Pragma_Keep_Names 95 +#define Pragma_Link_With 96 +#define Pragma_Linker_Alias 97 +#define Pragma_Linker_Constructor 98 +#define Pragma_Linker_Destructor 99 +#define Pragma_Linker_Options 100 +#define Pragma_Linker_Section 101 +#define Pragma_List 102 +#define Pragma_Machine_Attribute 103 +#define Pragma_Main 104 +#define Pragma_Main_Storage 105 +#define Pragma_Memory_Size 106 +#define Pragma_No_Return 107 +#define Pragma_Obsolescent 108 +#define Pragma_Optimize 109 +#define Pragma_Optional_Overriding 110 +#define Pragma_Pack 111 +#define Pragma_Page 112 +#define Pragma_Passive 113 +#define Pragma_Preelaborate 114 +#define Pragma_Preelaborate_05 115 +#define Pragma_Priority 116 +#define Pragma_Psect_Object 117 +#define Pragma_Pure 118 +#define Pragma_Pure_05 119 +#define Pragma_Pure_Function 120 +#define Pragma_Remote_Call_Interface 121 +#define Pragma_Remote_Types 122 +#define Pragma_Share_Generic 123 +#define Pragma_Shared 124 +#define Pragma_Shared_Passive 125 +#define Pragma_Source_Reference 126 +#define Pragma_Stream_Convert 127 +#define Pragma_Subtitle 128 +#define Pragma_Suppress_All 129 +#define Pragma_Suppress_Debug_Info 130 +#define Pragma_Suppress_Initialization 131 +#define Pragma_System_Name 132 +#define Pragma_Task_Info 133 +#define Pragma_Task_Name 134 +#define Pragma_Task_Storage 135 +#define Pragma_Thread_Body 136 +#define Pragma_Time_Slice 137 +#define Pragma_Title 138 +#define Pragma_Unchecked_Union 139 +#define Pragma_Unimplemented_Unit 140 +#define Pragma_Unreferenced 141 +#define Pragma_Unreserve_All_Interrupts 142 +#define Pragma_Volatile 143 +#define Pragma_Volatile_Components 144 +#define Pragma_Weak_External 145 +#define Pragma_AST_Entry 146 +#define Pragma_Interface 147 +#define Pragma_Storage_Size 148 +#define Pragma_Storage_Unit 149 /* End of snames.h (C version of Snames package spec) */ diff --git a/gcc/ada/sprint.adb b/gcc/ada/sprint.adb index 58e61df8967..08e6cf892a6 100644 --- a/gcc/ada/sprint.adb +++ b/gcc/ada/sprint.adb @@ -193,7 +193,7 @@ package body Sprint is -- declarations that can have discriminants. procedure Write_Ekind (E : Entity_Id); - -- Write the String corresponding to the Ekind without "E_". + -- Write the String corresponding to the Ekind without "E_" procedure Write_Id (N : Node_Id); -- N is a node with a Chars field. This procedure writes the name that @@ -203,7 +203,8 @@ package body Sprint is -- the name associated with the entity (since it may have been encoded). -- One other special case is that an entity has an active external name -- (i.e. an external name present with no address clause), then this - -- external name is output. + -- external name is output. This procedure also deals with outputting + -- declarations of referenced itypes, if not output earlier. function Write_Identifiers (Node : Node_Id) return Boolean; -- Handle node where the grammar has a list of defining identifiers, but @@ -238,6 +239,10 @@ package body Sprint is -- the Sloc of the current node is set to the first non-blank character -- in the string S. + procedure Write_Itype (Typ : Entity_Id); + -- If Typ is an Itype that has not been written yet, write it. If Typ is + -- any other kind of entity or tree node, the call is ignored. + procedure Write_Name_With_Col_Check (N : Name_Id); -- Write name (using Write_Name) with initial column check, and possible -- initial Write_Indent (to get new line) if current line is too full. @@ -272,6 +277,11 @@ package body Sprint is -- Like Write_Str_WIth_Col_Check, but sets debug Sloc of current debug -- node to first non-blank character if a current debug node is active. + procedure Write_Uint_With_Col_Check (U : Uint; Format : UI_Format); + -- Write Uint (using UI_Write) with initial column check, and possible + -- initial Write_Indent (to get new line) if current line is too full. + -- The format parameter determines the output format (see UI_Write). + procedure Write_Uint_With_Col_Check_Sloc (U : Uint; Format : UI_Format); -- Write Uint (using UI_Write) with initial column check, and possible -- initial Write_Indent (to get new line) if current line is too full. @@ -417,7 +427,7 @@ package body Sprint is Write_Eol; end Underline; - -- Start of processing for Tree_Dump. + -- Start of processing for Tree_Dump begin Dump_Generated_Only := Debug_Flag_G or @@ -1078,7 +1088,6 @@ package body Sprint is Condition : constant Node_Id := First (Expressions (Node)); Then_Expr : constant Node_Id := Next (Condition); Else_Expr : constant Node_Id := Next (Then_Expr); - begin Write_Str_With_Col_Check_Sloc ("(if "); Sprint_Node (Condition); @@ -2344,7 +2353,6 @@ package body Sprint is declare Alt_Node : Node_Id; - begin Alt_Node := First (Select_Alternatives (Node)); loop @@ -2607,7 +2615,6 @@ package body Sprint is declare Node1 : Node_Id; - begin Node1 := First (Subtype_Marks (Node)); loop @@ -2808,9 +2815,7 @@ package body Sprint is if Dump_Original_Only then N := First (List); - while Present (N) loop - if not Is_Rewrite_Insertion (N) then Node_Exists := True; exit; @@ -2944,6 +2949,19 @@ package body Sprint is procedure Write_Id (N : Node_Id) is begin + -- Deal with outputting Itype + + -- Note: if we are printing the full tree with -gnatds, then we may + -- end up picking up the Associated_Node link from a generic template + -- here which overlaps the Entity field, but as documented, Write_Itype + -- is defended against junk calls. + + if Nkind (N) in N_Entity then + Write_Itype (N); + elsif Nkind (N) in N_Has_Entity then + Write_Itype (Entity (N)); + end if; + -- Case of a defining identifier if Nkind (N) = N_Defining_Identifier then @@ -3022,7 +3040,6 @@ package body Sprint is Write_Str_With_Col_Check (" ("); Ind := First_Index (E); - while Present (Ind) loop Sprint_Node (Ind); Next_Index (Ind); @@ -3153,6 +3170,266 @@ package body Sprint is Write_Str_Sloc (S); end Write_Indent_Str_Sloc; + ----------------- + -- Write_Itype -- + ----------------- + + procedure Write_Itype (Typ : Entity_Id) is + + procedure Write_Header (T : Boolean := True); + -- Write type if T is True, subtype if T is false + + ------------------ + -- Write_Header -- + ------------------ + + procedure Write_Header (T : Boolean := True) is + begin + if T then + Write_Str ("[type "); + else + Write_Str ("[subtype "); + end if; + + Write_Name_With_Col_Check (Chars (Typ)); + Write_Str (" is "); + end Write_Header; + + -- Start of processing for Write_Itype + + begin + if Nkind (Typ) in N_Entity + and then Is_Itype (Typ) + and then not Itype_Printed (Typ) + then + -- Itype to be printed + + declare + B : constant Node_Id := Etype (Typ); + X : Node_Id; + P : constant Node_Id := Parent (Typ); + + S : constant Saved_Output_Buffer := Save_Output_Buffer; + -- Save current output buffer + + begin + -- Write indentation at start of line + + for J in 1 .. Indent loop + Write_Char (' '); + end loop; + + -- If we have a constructed declaration, print it + + if Present (P) and then Nkind (P) in N_Declaration then + + -- We must set Itype_Printed true before the recursive call to + -- print the node, otherwise we get an infinite recursion! + + Set_Itype_Printed (Typ, True); + + -- Write the declaration enclosed in [], avoiding new line + -- at start of declaration, and semicolon at end. + + Write_Char ('['); + Indent_Annull_Flag := True; + Sprint_Node (P); + Write_Erase_Char (';'); + + -- If no constructed declaration, then we have to concoct the + -- source corresponding to the type entity that we have at hand. + + else + case Ekind (Typ) is + + -- Access types and subtypes + + when Access_Kind => + Write_Header (Ekind (Typ) = E_Access_Type); + Write_Str ("access "); + + if Is_Access_Constant (Typ) then + Write_Str ("constant "); + elsif Can_Never_Be_Null (Typ) then + Write_Str ("not null "); + end if; + + Write_Id (Directly_Designated_Type (Typ)); + + -- Array types and string types + + when E_Array_Type | E_String_Type => + Write_Header; + Write_Str ("array ("); + + X := First_Index (Typ); + loop + Sprint_Node (X); + + if not Is_Constrained (Typ) then + Write_Str (" range <>"); + end if; + + Next_Index (X); + exit when No (X); + Write_Str (", "); + end loop; + + Write_Str (") of "); + Sprint_Node (Component_Type (Typ)); + + -- Array subtypes and string subtypes + + when E_Array_Subtype | E_String_Subtype => + Write_Header (False); + Write_Id (Etype (Typ)); + Write_Str (" ("); + + X := First_Index (Typ); + loop + Sprint_Node (X); + Next_Index (X); + exit when No (X); + Write_Str (", "); + end loop; + + Write_Char (')'); + + -- Signed integer types, and modular integer subtypes + + when E_Signed_Integer_Type | + E_Signed_Integer_Subtype | + E_Modular_Integer_Subtype => + + Write_Header (Ekind (Typ) = E_Signed_Integer_Type); + + if Ekind (Typ) = E_Signed_Integer_Type then + Write_Str ("new "); + end if; + + Write_Id (B); + + -- Print bounds if not different from base type + + declare + L : constant Node_Id := Type_Low_Bound (Typ); + H : constant Node_Id := Type_High_Bound (Typ); + LE : constant Node_Id := Type_Low_Bound (B); + HE : constant Node_Id := Type_High_Bound (B); + + begin + if Nkind (L) = N_Integer_Literal + and then Nkind (H) = N_Integer_Literal + and then Nkind (LE) = N_Integer_Literal + and then Nkind (HE) = N_Integer_Literal + and then UI_Eq (Intval (L), Intval (LE)) + and then UI_Eq (Intval (H), Intval (HE)) + then + null; + + else + Write_Str (" range "); + Sprint_Node (Type_Low_Bound (Typ)); + Write_Str (" .. "); + Sprint_Node (Type_High_Bound (Typ)); + end if; + end; + + -- Modular integer types + + when E_Modular_Integer_Type => + Write_Header; + Write_Str (" mod "); + Write_Uint_With_Col_Check (Modulus (Typ), Auto); + + -- Floating point types and subtypes + + when E_Floating_Point_Type | + E_Floating_Point_Subtype => + + Write_Header (Ekind (Typ) = E_Floating_Point_Type); + + if Ekind (Typ) = E_Floating_Point_Type then + Write_Str ("new "); + end if; + + Write_Id (Etype (Typ)); + + if Digits_Value (Typ) /= Digits_Value (Etype (Typ)) then + Write_Str (" digits "); + Write_Uint_With_Col_Check + (Digits_Value (Typ), Decimal); + end if; + + -- Print bounds if not different from base type + + declare + L : constant Node_Id := Type_Low_Bound (Typ); + H : constant Node_Id := Type_High_Bound (Typ); + LE : constant Node_Id := Type_Low_Bound (B); + HE : constant Node_Id := Type_High_Bound (B); + + begin + if Nkind (L) = N_Real_Literal + and then Nkind (H) = N_Real_Literal + and then Nkind (LE) = N_Real_Literal + and then Nkind (HE) = N_Real_Literal + and then UR_Eq (Realval (L), Realval (LE)) + and then UR_Eq (Realval (H), Realval (HE)) + then + null; + + else + Write_Str (" range "); + Sprint_Node (Type_Low_Bound (Typ)); + Write_Str (" .. "); + Sprint_Node (Type_High_Bound (Typ)); + end if; + end; + + -- Record subtypes + + when E_Record_Subtype => + Write_Header (False); + Write_Str ("record"); + Indent_Begin; + + declare + C : Entity_Id; + begin + C := First_Entity (Typ); + while Present (C) loop + Write_Indent; + Write_Id (C); + Write_Str (" : "); + Write_Id (Etype (C)); + Next_Entity (C); + end loop; + end; + + Indent_End; + Write_Indent_Str (" end record"); + + -- For all other Itypes, print ??? (fill in later) + + when others => + Write_Header (True); + Write_Str ("???"); + + end case; + end if; + + -- Add terminating bracket and restore output buffer + + Write_Char (']'); + Write_Eol; + Restore_Output_Buffer (S); + end; + + Set_Itype_Printed (Typ); + end if; + end Write_Itype; + ------------------------------- -- Write_Name_With_Col_Check -- ------------------------------- @@ -3167,7 +3444,6 @@ package body Sprint is -- name by three dots (e.g. R7b becomes R...b). if Debug_Flag_II and then Name_Buffer (1) in 'A' .. 'Z' then - J := 2; while J < Name_Len loop exit when Name_Buffer (J) not in 'A' .. 'Z'; @@ -3355,6 +3631,16 @@ package body Sprint is end if; end Write_Str_With_Col_Check_Sloc; + ------------------------------- + -- Write_Uint_With_Col_Check -- + ------------------------------- + + procedure Write_Uint_With_Col_Check (U : Uint; Format : UI_Format) is + begin + Col_Check (UI_Decimal_Digits_Hi (U)); + UI_Write (U, Format); + end Write_Uint_With_Col_Check; + ------------------------------------ -- Write_Uint_With_Col_Check_Sloc -- ------------------------------------ diff --git a/gcc/ada/sprint.ads b/gcc/ada/sprint.ads index d10a009ea47..997e7a4bd22 100644 --- a/gcc/ada/sprint.ads +++ b/gcc/ada/sprint.ads @@ -58,6 +58,7 @@ package Sprint is -- Freeze entity with freeze actions freeze entityname [ actions ] -- Interpretation interpretation type [, entity] -- Intrinsic calls function-name!(arg, arg, arg) + -- Itype declaration [(sub)type declaration without ;] -- Itype reference reference itype -- Label declaration labelname : label -- Mod wi Treat_Fixed_As_Integer x #mod y diff --git a/gcc/ada/stylesw.adb b/gcc/ada/stylesw.adb index 27e9153c9c6..4368372d2a3 100644 --- a/gcc/ada/stylesw.adb +++ b/gcc/ada/stylesw.adb @@ -24,7 +24,8 @@ -- -- ------------------------------------------------------------------------------ -with Opt; use Opt; +with Hostparm; use Hostparm; +with Opt; use Opt; package body Stylesw is @@ -166,6 +167,7 @@ package body Stylesw is EC : Natural; begin Set_Style_Check_Options (Options, OK, EC); + pragma Assert (OK); end Set_Style_Check_Options; -- Normal version with error checking @@ -175,19 +177,53 @@ package body Stylesw is OK : out Boolean; Err_Col : out Natural) is - J : Natural; C : Character; + procedure Add_Img (N : Natural); + -- Concatenates image of N at end of Style_Msg_Buf + + procedure Bad_Style_Switch (Msg : String); + -- Called if bad style switch found. Msg is mset in Style_Msg_Buf and + -- Style_Msg_Len. OK is set False. + + ------------- + -- Add_Img -- + ------------- + + procedure Add_Img (N : Natural) is + begin + if N >= 10 then + Add_Img (N / 10); + end if; + + Style_Msg_Len := Style_Msg_Len + 1; + Style_Msg_Buf (Style_Msg_Len) := + Character'Val (N mod 10 + Character'Pos ('0')); + end Add_Img; + + ---------------------- + -- Bad_Style_Switch -- + ---------------------- + + procedure Bad_Style_Switch (Msg : String) is + begin + OK := False; + Style_Msg_Len := Msg'Length; + Style_Msg_Buf (1 .. Style_Msg_Len) := Msg; + end Bad_Style_Switch; + + -- Start of processing for Set_Style_Check_Options + begin - J := Options'First; - while J <= Options'Last loop - C := Options (J); - J := J + 1; + Err_Col := Options'First; + while Err_Col <= Options'Last loop + C := Options (Err_Col); + Err_Col := Err_Col + 1; case C is when '1' .. '9' => - Style_Check_Indentation - := Character'Pos (C) - Character'Pos ('0'); + Style_Check_Indentation := + Character'Pos (C) - Character'Pos ('0'); when 'a' => Style_Check_Attribute_Casing := True; @@ -222,28 +258,27 @@ package body Stylesw is when 'L' => Style_Max_Nesting_Level := 0; - if J > Options'Last - or else Options (J) not in '0' .. '9' + if Err_Col > Options'Last + or else Options (Err_Col) not in '0' .. '9' then - OK := False; - Err_Col := J; + Bad_Style_Switch ("invalid nesting level"); return; end if; loop Style_Max_Nesting_Level := Style_Max_Nesting_Level * 10 + - Character'Pos (Options (J)) - Character'Pos ('0'); + Character'Pos (Options (Err_Col)) - Character'Pos ('0'); if Style_Max_Nesting_Level > 999 then - OK := False; - Err_Col := J; + Bad_Style_Switch + ("max nesting level (999) exceeded in style check"); return; end if; - J := J + 1; - exit when J > Options'Last - or else Options (J) not in '0' .. '9'; + Err_Col := Err_Col + 1; + exit when Err_Col > Options'Last + or else Options (Err_Col) not in '0' .. '9'; end loop; Style_Check_Max_Nesting_Level := Style_Max_Nesting_Level /= 0; @@ -252,41 +287,43 @@ package body Stylesw is Style_Check_Max_Line_Length := True; Style_Max_Line_Length := 79; - when 'n' => - Style_Check_Standard := True; - - when 'N' => - Reset_Style_Check_Options; - when 'M' => Style_Max_Line_Length := 0; - if J > Options'Last - or else Options (J) not in '0' .. '9' + if Err_Col > Options'Last + or else Options (Err_Col) not in '0' .. '9' then - OK := False; - Err_Col := J; + Bad_Style_Switch + ("invalid line length in style check"); return; end if; loop Style_Max_Line_Length := Style_Max_Line_Length * 10 + - Character'Pos (Options (J)) - Character'Pos ('0'); + Character'Pos (Options (Err_Col)) - Character'Pos ('0'); - if Style_Max_Line_Length > Int (Column_Number'Last) then + if Style_Max_Line_Length > Int (Max_Line_Length) then OK := False; - Err_Col := J; + Style_Msg_Buf (1 .. 27) := "max line length allowed is "; + Style_Msg_Len := 27; + Add_Img (Natural (Max_Line_Length)); return; end if; - J := J + 1; - exit when J > Options'Last - or else Options (J) not in '0' .. '9'; + Err_Col := Err_Col + 1; + exit when Err_Col > Options'Last + or else Options (Err_Col) not in '0' .. '9'; end loop; Style_Check_Max_Line_Length := Style_Max_Line_Length /= 0; + when 'n' => + Style_Check_Standard := True; + + when 'N' => + Reset_Style_Check_Options; + when 'o' => Style_Check_Order_Subprograms := True; @@ -312,15 +349,16 @@ package body Stylesw is null; when others => - OK := False; - Err_Col := J - 1; + Err_Col := Err_Col - 1; + Style_Msg_Buf (1 .. 21) := "invalid style switch:"; + Style_Msg_Len := 22; + Style_Msg_Buf (Style_Msg_Len) := C; + OK := False; return; end case; end loop; Style_Check := True; OK := True; - Err_Col := Options'Last + 1; end Set_Style_Check_Options; - end Stylesw; diff --git a/gcc/ada/stylesw.ads b/gcc/ada/stylesw.ads index ae7f113152e..4dd662672d1 100644 --- a/gcc/ada/stylesw.ads +++ b/gcc/ada/stylesw.ads @@ -254,24 +254,31 @@ package Stylesw is -- This procedure is called to set the default style checking options -- in response to a -gnaty switch with no suboptions. + Style_Msg_Buf : String (1 .. 80); + Style_Msg_Len : Natural; + -- Used to return + procedure Set_Style_Check_Options (Options : String; OK : out Boolean; Err_Col : out Natural); - -- This procedure is called to set the style check options that - -- correspond to the characters in the given Options string. If - -- all options are valid, they are set in an additive manner: - -- any previous options are retained unless overridden. If any - -- invalid character is found, then OK is False on exit, and - -- Err_Col is the index in options of the bad character. If all - -- options are valid, OK is True on return, and Err_Col is set - -- to Options'Last + 1. + -- This procedure is called to set the style check options that correspond + -- to the characters in the given Options string. If all options are valid, + -- they are set in an additive manner: any previous options are retained + -- unless overridden. + -- + -- If all options given are valid, then OK is True, Err_Col is set to + -- Options'Last + 1, and Style_Msg_Buf/Style_Msg_Len are unchanged. + -- + -- If an invalid character is found, then OK is False on exit, and Err_Col + -- is the index in options of the bad character. In this case Style_Msg_Len + -- is set and Style_Msg_Buf (1 .. Style_Msg_Len) has a detailed message + -- describing the error. procedure Set_Style_Check_Options (Options : String); - -- Like the above procedure, except that the call is simply ignored if - -- there are any error conditions, this is for example appopriate for - -- calls where the string is known to be valid, e.g. because it was - -- obtained by Save_Style_Check_Options. + -- Like the above procedure, but used when the Options string is known to + -- be valid. This is for example appopriate for calls where the string == + -- was obtained by Save_Style_Check_Options. procedure Reset_Style_Check_Options; -- Sets all style check options to off diff --git a/gcc/ada/switch-b.adb b/gcc/ada/switch-b.adb index f5beb05c470..43be4d0b337 100644 --- a/gcc/ada/switch-b.adb +++ b/gcc/ada/switch-b.adb @@ -286,6 +286,18 @@ package body Switch.B is Scan_Nat (Switch_Chars, Max, Ptr, Time_Slice_Value, C); Time_Slice_Value := Time_Slice_Value * 1_000; + -- Processing for u switch + + when 'u' => + Ptr := Ptr + 1; + Dynamic_Stack_Measurement := True; + Scan_Nat + (Switch_Chars, + Max, + Ptr, + Dynamic_Stack_Measurement_Array_Size, + C); + -- Processing for v switch when 'v' => diff --git a/gcc/ada/switch-c.adb b/gcc/ada/switch-c.adb index fe7545edadf..eaefef90430 100644 --- a/gcc/ada/switch-c.adb +++ b/gcc/ada/switch-c.adb @@ -852,11 +852,18 @@ package body Switch.C is (Switch_Chars (Ptr .. Max), OK, Ptr); if not OK then - Bad_Switch (C); + declare + R : String (1 .. Style_Msg_Len + 20); + begin + R (1 .. 19) := "bad -gnaty switch ("; + R (20 .. R'Last - 1) := + Style_Msg_Buf (1 .. Style_Msg_Len); + R (R'Last) := ')'; + Osint.Fail (R); + end; end if; Ptr := First_Char + 1; - while Ptr <= Max loop Last_Stored := First_Stored + 1; Storing (Last_Stored) := Switch_Chars (Ptr); diff --git a/gcc/ada/system-mingw.ads b/gcc/ada/system-mingw.ads index 5924fc8f9c2..24ed0b44cc5 100644 --- a/gcc/ada/system-mingw.ads +++ b/gcc/ada/system-mingw.ads @@ -167,39 +167,22 @@ private pragma Suppress_Initialization (Priorities_Mapping); -- Suppress initialization in case gnat.adc specifies Normalize_Scalars - -- On NT, the default mapping preserves the standard 31 priorities - -- of the Ada model, but maps them using compression onto the 7 - -- priority levels available in NT. - - -- To replace the default values of the Underlying_Priorities mapping, - -- copy this source file into your build directory, edit the file to - -- reflect your desired behavior, and recompile with the command: - - -- $ gcc -c -O3 -gnatpgn system.ads - - -- then recompile the run-time parts that depend on this package: - - -- $ gnatmake -a -gnatn -O3 - - -- then force rebuilding your application if you need different options: - - -- $ gnatmake -f - Underlying_Priorities : constant Priorities_Mapping := - (Priority'First .. 1 => -15, - 2 .. Default_Priority - 2 => -2, - Default_Priority - 1 => -1, - Default_Priority => 0, - Default_Priority + 1 .. 19 => 1, - 20 .. Priority'Last => 2, - Interrupt_Priority => 15); + -- On NT, the default mapping preserves the standard 31 priorities + -- of the Ada model, but maps them using compression onto the 7 + -- priority levels available in NT. + + -- To replace the default values of the Underlying_Priorities mapping, + -- copy this source file into your build directory, edit the file to + -- reflect your desired behavior, and recompile using Makefile.adalib + -- which can be found under the adalib directory of your gnat installation pragma Linker_Options ("-Wl,--stack=0x2000000"); -- This is used to change the default stack (32 MB) size for non tasking diff --git a/gcc/ada/targext.c b/gcc/ada/targext.c new file mode 100644 index 00000000000..97d6b7f9a63 --- /dev/null +++ b/gcc/ada/targext.c @@ -0,0 +1,51 @@ +/**************************************************************************** + * * + * GNAT COMPILER COMPONENTS * + * * + * T A R G E X T * + * * + * C Implementation File * + * * + * Copyright (C) 2005, Free Software Foundation, Inc. * + * * + * GNAT is free software; you can redistribute it and/or modify it under * + * terms of the GNU General Public License as published by the Free Soft- * + * ware Foundation; either version 2, or (at your option) any later ver- * + * sion. GNAT is distributed in the hope that it will be useful, but WITH- * + * OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * + * for more details. You should have received a copy of the GNU General * + * Public License distributed with GNAT; see file COPYING. If not, write * + * to the Free Software Foundation, 51 Franklin Street, Fifth Floor, * + * Boston, MA 02110-1301, USA. * + * * + * As a special exception, if you link this file with other files to * + * produce an executable, this file does not by itself cause the resulting * + * executable to be covered by the GNU General Public License. This except- * + * ion does not however invalidate any other reasons why the executable * + * file might be covered by the GNU Public License. * + * * + * GNAT was originally developed by the GNAT team at New York University. * + * Extensive contributions were provided by Ada Core Technologies Inc. * + * * + ****************************************************************************/ + +/* This file contains target-specific parameters describing the file */ +/* extension for object and executable files. It is used by the compiler, */ +/* binder and tools. */ + +#include "system.h" +#include "coretypes.h" +#include "tm.h" + +#ifndef TARGET_OBJECT_SUFFIX +#define TARGET_OBJECT_SUFFIX ".o" +#endif + +#ifndef TARGET_EXECUTABLE_SUFFIX +#define TARGET_EXECUTABLE_SUFFIX "" +#endif + +const char *__gnat_target_object_extension = TARGET_OBJECT_SUFFIX; +const char *__gnat_target_executable_extension = TARGET_EXECUTABLE_SUFFIX; +const char *__gnat_target_debuggable_extension = TARGET_EXECUTABLE_SUFFIX; diff --git a/gcc/ada/targparm.adb b/gcc/ada/targparm.adb index 65ba29f977e..829535d8603 100644 --- a/gcc/ada/targparm.adb +++ b/gcc/ada/targparm.adb @@ -24,11 +24,11 @@ -- -- ------------------------------------------------------------------------------ -with Csets; use Csets; -with Namet; use Namet; -with Opt; use Opt; -with Osint; use Osint; -with Output; use Output; +with Csets; use Csets; +with Namet; use Namet; +with Opt; use Opt; +with Osint; use Osint; +with Output; use Output; package body Targparm is use ASCII; @@ -154,7 +154,6 @@ package body Targparm is procedure Set_Profile_Restrictions (P : Profile_Name) is R : Restriction_Flags renames Profile_Info (P).Set; V : Restriction_Values renames Profile_Info (P).Value; - begin for J in R'Range loop if R (J) then @@ -603,6 +602,13 @@ package body Targparm is end if; end loop Line_Loop; + -- Now that OpenVMS_On_Target has been given its definitive value, + -- change the multi-unit index character from '~' to '$' for OpenVMS. + + if OpenVMS_On_Target then + Multi_Unit_Index_Character := '$'; + end if; + -- Check no missing target parameter settings (skip for compiler vsn) if not Compiler_System_Version then diff --git a/gcc/ada/targparm.ads b/gcc/ada/targparm.ads index 38dd2266840..8325e8cb38b 100644 --- a/gcc/ada/targparm.ads +++ b/gcc/ada/targparm.ads @@ -19,6 +19,13 @@ -- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, -- -- Boston, MA 02110-1301, USA. -- -- -- +-- As a special exception, if other files instantiate generics from this -- +-- unit, or you link this unit with other files to produce an executable, -- +-- this unit 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 Public License. -- +-- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- diff --git a/gcc/ada/trans.c b/gcc/ada/trans.c index c7126720003..f8698c5a77a 100644 --- a/gcc/ada/trans.c +++ b/gcc/ada/trans.c @@ -1546,14 +1546,18 @@ call_to_gnu (Node_Id gnat_node, tree *gnu_result_type_p, tree gnu_target) gnat_actual = Next_Actual (gnat_actual)) add_stmt (gnat_to_gnu (gnat_actual)); - if (Nkind (gnat_node) == N_Function_Call && !gnu_target) - { - *gnu_result_type_p = TREE_TYPE (gnu_subprog_type); - return build1 (NULL_EXPR, *gnu_result_type_p, - build_call_raise (PE_Stubbed_Subprogram_Called)); - } - else - return build_call_raise (PE_Stubbed_Subprogram_Called); + { + tree call_expr + = build_call_raise (PE_Stubbed_Subprogram_Called, gnat_node); + + if (Nkind (gnat_node) == N_Function_Call && !gnu_target) + { + *gnu_result_type_p = TREE_TYPE (gnu_subprog_type); + return build1 (NULL_EXPR, *gnu_result_type_p, call_expr); + } + else + return call_expr; + } } /* If we are calling by supplying a pointer to a target, set up that @@ -2515,7 +2519,7 @@ gnat_to_gnu (Node_Id gnat_node) && Nkind (gnat_node) != N_Identifier && !Compile_Time_Known_Value (gnat_node)) return build1 (NULL_EXPR, get_unpadded_type (Etype (gnat_node)), - build_call_raise (CE_Range_Check_Failed)); + build_call_raise (CE_Range_Check_Failed, gnat_node)); /* If this is a Statement and we are at top level, it must be part of the elaboration procedure, so mark us as being in that procedure and push our @@ -3463,7 +3467,7 @@ gnat_to_gnu (Node_Id gnat_node) Storage_Error: execution shouldn't have gotten here anyway. */ if (TREE_CODE (TYPE_SIZE_UNIT (TREE_TYPE (gnu_lhs))) == INTEGER_CST && TREE_OVERFLOW (TYPE_SIZE_UNIT (TREE_TYPE (gnu_lhs)))) - gnu_result = build_call_raise (SE_Object_Too_Large); + gnu_result = build_call_raise (SE_Object_Too_Large, gnat_node); else if (Nkind (Expression (gnat_node)) == N_Function_Call && !Do_Range_Check (Expression (gnat_node))) gnu_result = call_to_gnu (Expression (gnat_node), @@ -4037,7 +4041,8 @@ gnat_to_gnu (Node_Id gnat_node) } gnu_result_type = get_unpadded_type (Etype (gnat_node)); - gnu_result = build_call_raise (UI_To_Int (Reason (gnat_node))); + gnu_result + = build_call_raise (UI_To_Int (Reason (gnat_node)), gnat_node); /* If the type is VOID, this is a statement, so we need to generate the code for the call. Handle a Condition, if there @@ -4148,7 +4153,7 @@ gnat_to_gnu (Node_Id gnat_node) gnu_result = build1 (NULL_EXPR, gnu_result_type, - build_call_raise (CE_Overflow_Check_Failed)); + build_call_raise (CE_Overflow_Check_Failed, gnat_node)); } /* If our result has side-effects and is of an unconstrained type, @@ -4617,7 +4622,7 @@ gnat_gimplify_expr (tree *expr_p, tree *pre_p, tree *post_p ATTRIBUTE_UNUSED) DECL_INITIAL (new_var) = op; TREE_OPERAND (expr, 0) = new_var; - recompute_tree_invarant_for_addr_expr (expr); + recompute_tree_invariant_for_addr_expr (expr); return GS_ALL_DONE; } @@ -4632,7 +4637,7 @@ gnat_gimplify_expr (tree *expr_p, tree *pre_p, tree *post_p ATTRIBUTE_UNUSED) && TREE_CODE_CLASS (TREE_CODE (op)) != tcc_constant) { tree new_var = create_tmp_var (TREE_TYPE (op), "A"); - tree mod = build (MODIFY_EXPR, TREE_TYPE (op), new_var, op); + tree mod = build2 (MODIFY_EXPR, TREE_TYPE (op), new_var, op); TREE_ADDRESSABLE (new_var) = 1; @@ -4641,7 +4646,7 @@ gnat_gimplify_expr (tree *expr_p, tree *pre_p, tree *post_p ATTRIBUTE_UNUSED) gimplify_and_add (mod, pre_p); TREE_OPERAND (expr, 0) = new_var; - recompute_tree_invarant_for_addr_expr (expr); + recompute_tree_invariant_for_addr_expr (expr); return GS_ALL_DONE; } @@ -5207,7 +5212,7 @@ emit_check (tree gnu_cond, tree gnu_expr, int reason) tree gnu_call; tree gnu_result; - gnu_call = build_call_raise (reason); + gnu_call = build_call_raise (reason, Empty); /* Use an outer COMPOUND_EXPR to make sure that GNU_EXPR will get evaluated in front of the comparison in case it ends up being a SAVE_EXPR. Put the diff --git a/gcc/ada/types.ads b/gcc/ada/types.ads index 2367a91c2ff..a2a9927be01 100644 --- a/gcc/ada/types.ads +++ b/gcc/ada/types.ads @@ -172,8 +172,9 @@ package Types is type Column_Number is range 0 .. 32767; for Column_Number'Size use 16; - -- Column number (assume that 2**15 is large enough, see declaration of - -- Hostparm.Max_Line_Length, and also processing for -gnatyM in Stylesw) + -- Column number (assume that 2**15 - 1 is large enough). The range for + -- this type is used to compute Hostparm.Max_Line_Length. See also the + -- processing for -gnatyM in Stylesw). No_Column_Number : constant Column_Number := 0; -- Special value used to indicate no column number diff --git a/gcc/ada/utils.c b/gcc/ada/utils.c index 2bfafce9b51..0b499af270c 100644 --- a/gcc/ada/utils.c +++ b/gcc/ada/utils.c @@ -2031,12 +2031,19 @@ max_size (tree exp, bool max_p) Likewise, handle a MINUS_EXPR or PLUS_EXPR with the LHS overflowing or the maximum possible value and the RHS a variable. */ - if (max_p && code == MIN_EXPR && TREE_OVERFLOW (rhs)) + if (max_p + && code == MIN_EXPR + && TREE_CODE (rhs) == INTEGER_CST + && TREE_OVERFLOW (rhs)) return lhs; - else if (max_p && code == MIN_EXPR && TREE_OVERFLOW (lhs)) + else if (max_p + && code == MIN_EXPR + && TREE_CODE (lhs) == INTEGER_CST + && TREE_OVERFLOW (lhs)) return rhs; else if ((code == MINUS_EXPR || code == PLUS_EXPR) - && ((TREE_CONSTANT (lhs) && TREE_OVERFLOW (lhs)) + && ((TREE_CODE (lhs) == INTEGER_CST + && TREE_OVERFLOW (lhs)) || operand_equal_p (lhs, TYPE_MAX_VALUE (type), 0)) && !TREE_CONSTANT (rhs)) return lhs; @@ -2782,9 +2789,8 @@ convert (tree type, tree expr) /* If the input is a biased type, adjust first. */ if (ecode == INTEGER_TYPE && TYPE_BIASED_REPRESENTATION_P (etype)) return convert (type, fold (build2 (PLUS_EXPR, TREE_TYPE (etype), - fold (build1 (NOP_EXPR, - TREE_TYPE (etype), - expr)), + fold_convert (TREE_TYPE (etype), + expr), TYPE_MIN_VALUE (etype)))); /* If the input is a justified modular type, we need to extract the actual @@ -2933,7 +2939,7 @@ convert (tree type, tree expr) else if (TYPE_MAIN_VARIANT (type) == TYPE_MAIN_VARIANT (etype) || (code == INTEGER_CST && ecode == INTEGER_CST && (type == TREE_TYPE (etype) || etype == TREE_TYPE (type)))) - return fold (build1 (NOP_EXPR, type, expr)); + return fold_convert (type, expr); switch (code) { @@ -2941,7 +2947,7 @@ convert (tree type, tree expr) return build1 (CONVERT_EXPR, type, expr); case BOOLEAN_TYPE: - return fold (build1 (NOP_EXPR, type, gnat_truthvalue_conversion (expr))); + return fold_convert (type, gnat_truthvalue_conversion (expr)); case INTEGER_TYPE: if (TYPE_HAS_ACTUAL_BOUNDS_P (type) @@ -2949,10 +2955,10 @@ convert (tree type, tree expr) || (ecode == RECORD_TYPE && TYPE_CONTAINS_TEMPLATE_P (etype)))) return unchecked_convert (type, expr, false); else if (TYPE_BIASED_REPRESENTATION_P (type)) - return fold (build1 (CONVERT_EXPR, type, - fold (build2 (MINUS_EXPR, TREE_TYPE (type), - convert (TREE_TYPE (type), expr), - TYPE_MIN_VALUE (type))))); + return fold_convert (type, + fold_build2 (MINUS_EXPR, TREE_TYPE (type), + convert (TREE_TYPE (type), expr), + TYPE_MIN_VALUE (type))); /* ... fall through ... */ @@ -3088,9 +3094,10 @@ remove_conversions (tree exp, bool true_address) if (true_address && TREE_CODE (TREE_TYPE (exp)) == RECORD_TYPE && TYPE_JUSTIFIED_MODULAR_P (TREE_TYPE (exp))) - return remove_conversions (VEC_index (constructor_elt, - CONSTRUCTOR_ELTS (exp), 0)->value, - true); + return + remove_conversions (VEC_index (constructor_elt, + CONSTRUCTOR_ELTS (exp), 0)->value, + true); break; case COMPONENT_REF: diff --git a/gcc/ada/utils2.c b/gcc/ada/utils2.c index 24937449cc1..f9d87dc1335 100644 --- a/gcc/ada/utils2.c +++ b/gcc/ada/utils2.c @@ -37,6 +37,7 @@ #include "types.h" #include "atree.h" #include "stringt.h" +#include "namet.h" #include "uintp.h" #include "fe.h" #include "elists.h" @@ -854,7 +855,8 @@ build_binary_op (enum tree_code op_code, tree result_type, && TREE_CODE (right_operand) == CONSTRUCTOR && integer_zerop (VEC_index (constructor_elt, CONSTRUCTOR_ELTS (right_operand), - 0)->value)) + 0) + ->value)) { right_operand = build_component_ref (left_operand, NULL_TREE, TYPE_FIELDS (left_base_type), @@ -1107,13 +1109,13 @@ build_unary_op (enum tree_code op_code, tree result_type, tree operand) a pointer to our type. */ if (TREE_CODE (type) == RECORD_TYPE && TYPE_IS_PADDING_P (type)) { - result = VEC_index (constructor_elt, - CONSTRUCTOR_ELTS (operand), - 0)->value; - result - = build_unary_op (ADDR_EXPR, NULL_TREE, result); + result = (VEC_index (constructor_elt, + CONSTRUCTOR_ELTS (operand), + 0) + ->value); + result = convert (build_pointer_type (TREE_TYPE (operand)), - result); + build_unary_op (ADDR_EXPR, NULL_TREE, result)); break; } @@ -1443,17 +1445,34 @@ build_call_0_expr (tree fundecl) } /* Call a function that raises an exception and pass the line number and file - name, if requested. MSG says which exception function to call. */ + name, if requested. MSG says which exception function to call. + + GNAT_NODE is the gnat node conveying the source location for which the + error should be signaled, or Empty in which case the error is signaled on + the current ref_file_name/input_line. */ tree -build_call_raise (int msg) +build_call_raise (int msg, Node_Id gnat_node) { tree fndecl = gnat_raise_decls[msg]; + const char *str - = (Debug_Flag_NN || Exception_Locations_Suppressed) ? "" : ref_filename; + = (Debug_Flag_NN || Exception_Locations_Suppressed) + ? "" + : (gnat_node != Empty) + ? IDENTIFIER_POINTER + (get_identifier (Get_Name_String + (Debug_Source_Name + (Get_Source_File_Index (Sloc (gnat_node)))))) + : ref_filename; + int len = strlen (str) + 1; tree filename = build_string (len, str); + int line_number + = (gnat_node != Empty) + ? Get_Logical_Line_Number (Sloc(gnat_node)) : input_line; + TREE_TYPE (filename) = build_array_type (char_type_node, build_index_type (build_int_cst (NULL_TREE, len))); @@ -1462,7 +1481,7 @@ build_call_raise (int msg) build_call_2_expr (fndecl, build1 (ADDR_EXPR, build_pointer_type (char_type_node), filename), - build_int_cst (NULL_TREE, input_line)); + build_int_cst (NULL_TREE, line_number)); } /* qsort comparer for the bit positions of two constructor elements @@ -1631,6 +1650,14 @@ build_simple_component_ref (tree record_variable, tree component, if (!field) return NULL_TREE; + /* If the field's offset has overflowed, do not attempt to access it + as doing so may trigger sanity checks deeper in the back-end. + Note that we don't need to warn since this will be done on trying + to declare the object. */ + if (TREE_CODE (DECL_FIELD_OFFSET (field)) == INTEGER_CST + && TREE_CONSTANT_OVERFLOW (DECL_FIELD_OFFSET (field))) + return NULL_TREE; + /* It would be nice to call "fold" here, but that can lose a type we need to tag a PLACEHOLDER_EXPR with, so we can't do it. */ ref = build3 (COMPONENT_REF, TREE_TYPE (field), record_variable, field, @@ -1663,7 +1690,7 @@ build_component_ref (tree record_variable, tree component, abort. */ gcc_assert (field); return build1 (NULL_EXPR, TREE_TYPE (field), - build_call_raise (CE_Discriminant_Check_Failed)); + build_call_raise (CE_Discriminant_Check_Failed, Empty)); } /* Build a GCC tree to call an allocation or deallocation function. diff --git a/gcc/ada/vms_conv.adb b/gcc/ada/vms_conv.adb index 2157731bdf4..b9da2bb2bd7 100644 --- a/gcc/ada/vms_conv.adb +++ b/gcc/ada/vms_conv.adb @@ -27,7 +27,8 @@ with Gnatvsn; with Hostparm; with Opt; -with Osint; use Osint; +with Osint; use Osint; +with Targparm; use Targparm; with Ada.Characters.Handling; use Ada.Characters.Handling; with Ada.Command_Line; use Ada.Command_Line; @@ -185,7 +186,7 @@ package body VMS_Conv is Object_Dirs := Object_Dirs + 1; Object_Dir (Object_Dirs) := new String'("-lgnat"); - if Hostparm.OpenVMS then + if OpenVMS_On_Target then Object_Dirs := Object_Dirs + 1; Object_Dir (Object_Dirs) := new String'("-ldecgnat"); end if; @@ -242,6 +243,16 @@ package body VMS_Conv is Params => new Parameter_Array'(1 => Files_Or_Wildcard), Defext => " "), + Check => + (Cname => new S'("CHECK"), + Usage => new S'("GNAT CHECK name /qualifiers"), + VMS_Only => False, + Unixcmd => new S'("gnatcheck"), + Unixsws => null, + Switches => Check_Switches'Access, + Params => new Parameter_Array'(1 => Unlimited_Files), + Defext => " "), + Elim => (Cname => new S'("ELIM"), Usage => new S'("GNAT ELIM name /qualifiers"), diff --git a/gcc/ada/vms_conv.ads b/gcc/ada/vms_conv.ads index 1989381f5a2..7f58c28e9df 100644 --- a/gcc/ada/vms_conv.ads +++ b/gcc/ada/vms_conv.ads @@ -98,6 +98,7 @@ package VMS_Conv is Chop, Clean, Compile, + Check, Elim, Find, Krunch, diff --git a/gcc/ada/vms_data.ads b/gcc/ada/vms_data.ads index 9f37b20683c..d9d4015f59b 100644 --- a/gcc/ada/vms_data.ads +++ b/gcc/ada/vms_data.ads @@ -665,6 +665,145 @@ package VMS_Data is S_Bind_WarnX 'Access, S_Bind_Zero 'Access); + ----------------------------- + -- Switches for GNAT CHECK -- + ----------------------------- + + S_Check_All : aliased constant S := "/ALL " & + "-a"; + -- /NOALL (D) + -- /ALL + -- + -- Also check the components of the GNAT run time and process the needed + -- components of the GNAT RTL when building and analyzing the global + -- structure for checking the global rules. + + S_Check_Ext : aliased constant S := "/EXTERNAL_REFERENCE=" & '"' & + "-X" & '"'; + -- /EXTERNAL_REFERENCE="name=val" + -- + -- Specifies an external reference to the project manager. Useful only if + -- /PROJECT_FILE is used. + -- + -- Example: + -- /EXTERNAL_REFERENCE="DEBUG=TRUE" + + S_Check_Files : aliased constant S := "/FILES=@" & + "-files=@"; + -- /FILES=filename + -- + -- Take as arguments the files that are listed in the specified + -- text file. + + S_Check_Help : aliased constant S := "/HELP " & + "-h"; + -- /NOHELP (D) + -- /HELP + -- + -- Print information about currently implemented checks. + + S_Check_Locs : aliased constant S := "/LOCS " & + "-l"; + -- /NOLOCS (D) + -- /LOCS + -- + -- Use full source locations referebces in the report file. + + S_Check_Mess : aliased constant S := "/MESSAGES_PROJECT_FILE=" & + "DEFAULT " & + "-vP0 " & + "MEDIUM " & + "-vP1 " & + "HIGH " & + "-vP2"; + -- /MESSAGES_PROJECT_FILE[=messages-option] + -- + -- Specifies the "verbosity" of the parsing of project files. + -- messages-option may be one of the following: + -- + -- DEFAULT (D) No messages are output if there is no error or warning. + -- + -- MEDIUM A small number of messages are output. + -- + -- HIGH A great number of messages are output, most of them not + -- being useful for the user. + + S_Check_Project : aliased constant S := "/PROJECT_FILE=<" & + "-P>"; + -- /PROJECT_FILE=filename + -- + -- Specifies the main project file to be used. The project files rooted + -- at the main project file will be parsed before the invocation of the + -- gnatcheck. The source directories to be searched will be communicated + -- to gnatcheck through logical name ADA_PRJ_INCLUDE_FILE. + + S_Check_Quiet : aliased constant S := "/QUIET " & + "-q"; + -- /NOQUIET (D) + -- /QUIET + -- + -- Work quietly, only output warnings and errors. + + S_Check_Sections : aliased constant S := "/SECTIONS= " & + "DEFAULT " & + "-s123 " & + "COMPILER_STYLE " & + "-s1 " & + "BY_RULES " & + "-s2 " & + "BY_FILES_BY_RULES " & + "-s3 "; + -- /SECTIONS[=section-option, section-option, ...] + -- + -- Specify what sections should be included into the report file. + -- By default, all three section (diagnises in the format correcponding + -- to compiler error and warning messages, diagnoses grouped by rules and + -- then - by files, diagnoses grouped by files and then - by rules) are + -- included in the report file. + -- + -- section-option may be one of the following: + -- + -- COMPILER_STYLE Include diagnoses in compile-style format + -- (diagoses are grouped by files, for each file + -- they are ordered according to the references + -- into the source) + -- BY_RULES Include diagnoses grouped first by rules and + -- then by files + -- BY_FILES_BY_RULES Include diagnoses grouped first by files and + -- then by rules + -- + -- If one of these options is specified, then the report file contains + -- only sections set by these options + + S_Check_Short : aliased constant S := "/SHORT " & + "-s"; + -- /NOSHORT (D) + -- /SHORT + -- + -- Generate a short form of the report file. + + S_Check_Verb : aliased constant S := "/VERBOSE " & + "-v"; + -- /NOVERBOSE (D) + -- /VERBOSE + -- + -- The version number and copyright notice are output, as well as exact + -- copies of the gnat1 commands spawned to obtain the chop control + -- information. + + Check_Switches : aliased constant Switches := + (S_Check_All 'Access, + S_Check_Ext 'Access, + S_Check_Files 'Access, + S_Check_Help 'Access, + S_Check_Locs 'Access, + S_Check_Mess 'Access, + S_Check_Project 'Access, + S_Check_Quiet 'Access, + S_Check_Sections 'Access, + S_Check_Short 'Access, + S_Check_Verb 'Access); + ---------------------------- -- Switches for GNAT CHOP -- ---------------------------- @@ -2961,6 +3100,16 @@ package VMS_Data is -- -- Look for source files in the default directory. + S_Elim_Ext : aliased constant S := "/EXTERNAL_REFERENCE=" & '"' & + "-X" & '"'; + -- /EXTERNAL_REFERENCE="name=val" + -- + -- Specifies an external reference to the project manager. Useful only if + -- /PROJECT_FILE is used. + -- + -- Example: + -- /EXTERNAL_REFERENCE="DEBUG=TRUE" + S_Elim_GNATMAKE : aliased constant S := "/GNATMAKE=@" & "--GNATMAKE=@"; -- /GNATMAKE=path_name @@ -2968,6 +3117,34 @@ package VMS_Data is -- Instructs GNAT MAKE to use a specific gnatmake instead of one available -- on the path. + S_Elim_Mess : aliased constant S := "/MESSAGES_PROJECT_FILE=" & + "DEFAULT " & + "-vP0 " & + "MEDIUM " & + "-vP1 " & + "HIGH " & + "-vP2"; + -- /MESSAGES_PROJECT_FILE[=messages-option] + -- + -- Specifies the "verbosity" of the parsing of project files. + -- messages-option may be one of the following: + -- + -- DEFAULT (D) No messages are output if there is no error or warning. + -- + -- MEDIUM A small number of messages are output. + -- + -- HIGH A great number of messages are output, most of them not + -- being useful for the user. + + S_Elim_Project : aliased constant S := "/PROJECT_FILE=<" & + "-P>"; + -- /PROJECT_FILE=filename + -- + -- Specifies the main project file to be used. The project files rooted + -- at the main project file will be parsed before the invocation of the + -- gnatelim. The source directories to be searched will be communicated + -- to gnatelim through logical name ADA_PRJ_INCLUDE_FILE. + S_Elim_Quiet : aliased constant S := "/QUIET " & "-q"; -- /NOQUIET (D) @@ -2994,15 +3171,18 @@ package VMS_Data is -- being processed. Elim_Switches : aliased constant Switches := - (S_Elim_All 'Access, - S_Elim_Bind 'Access, - S_Elim_Comp 'Access, - S_Elim_Config 'Access, - S_Elim_Current 'Access, - S_Elim_GNATMAKE'Access, - S_Elim_Quiet 'Access, - S_Elim_Search 'Access, - S_Elim_Verb 'Access); + (S_Elim_All 'Access, + S_Elim_Bind 'Access, + S_Elim_Comp 'Access, + S_Elim_Config 'Access, + S_Elim_Current 'Access, + S_Elim_Ext 'Access, + S_Elim_GNATMAKE'Access, + S_Elim_Mess 'Access, + S_Elim_Project 'Access, + S_Elim_Quiet 'Access, + S_Elim_Search 'Access, + S_Elim_Verb 'Access); ---------------------------- -- Switches for GNAT FIND -- diff --git a/gcc/basic-block.h b/gcc/basic-block.h index 790b27b0222..d9fd10c90d1 100644 --- a/gcc/basic-block.h +++ b/gcc/basic-block.h @@ -282,6 +282,10 @@ struct rtl_bb_info GTY(()) typedef struct basic_block_def *basic_block; +DEF_VEC_P(basic_block); +DEF_VEC_ALLOC_P(basic_block,gc); +DEF_VEC_ALLOC_P(basic_block,heap); + #define BB_FREQ_MAX 10000 /* Masks for basic_block.flags. @@ -363,7 +367,7 @@ struct control_flow_graph GTY(()) basic_block x_exit_block_ptr; /* Index by basic block number, get basic block struct info. */ - varray_type x_basic_block_info; + VEC(basic_block,gc) *x_basic_block_info; /* Number of basic blocks in this flow graph. */ int x_n_basic_blocks; @@ -376,7 +380,7 @@ struct control_flow_graph GTY(()) /* Mapping of labels to their associated blocks. At present only used for the tree CFG. */ - varray_type x_label_to_block_map; + VEC(basic_block,gc) *x_label_to_block_map; enum profile_status { PROFILE_ABSENT, @@ -395,7 +399,7 @@ struct control_flow_graph GTY(()) #define label_to_block_map_for_function(FN) ((FN)->cfg->x_label_to_block_map) #define BASIC_BLOCK_FOR_FUNCTION(FN,N) \ - (VARRAY_BB (basic_block_info_for_function(FN), (N))) + (VEC_index (basic_block, basic_block_info_for_function(FN), (N))) /* Defines for textual backward source compatibility. */ #define ENTRY_BLOCK_PTR (cfun->cfg->x_entry_block_ptr) @@ -407,7 +411,8 @@ struct control_flow_graph GTY(()) #define label_to_block_map (cfun->cfg->x_label_to_block_map) #define profile_status (cfun->cfg->x_profile_status) -#define BASIC_BLOCK(N) (VARRAY_BB (basic_block_info, (N))) +#define BASIC_BLOCK(N) (VEC_index (basic_block, basic_block_info, (N))) +#define SET_BASIC_BLOCK(N,BB) (VEC_replace (basic_block, basic_block_info, (N), (BB))) /* TRUE if we should re-run loop discovery after threading jumps, FALSE otherwise. */ @@ -430,12 +435,12 @@ extern bool rediscover_loops_after_threading; /* For iterating over insns in basic block. */ #define FOR_BB_INSNS(BB, INSN) \ for ((INSN) = BB_HEAD (BB); \ - (INSN) != NEXT_INSN (BB_END (BB)); \ + (INSN) && (INSN) != NEXT_INSN (BB_END (BB)); \ (INSN) = NEXT_INSN (INSN)) #define FOR_BB_INSNS_REVERSE(BB, INSN) \ for ((INSN) = BB_END (BB); \ - (INSN) != PREV_INSN (BB_HEAD (BB)); \ + (INSN) && (INSN) != PREV_INSN (BB_HEAD (BB)); \ (INSN) = PREV_INSN (INSN)) /* Cycles through _all_ basic blocks, even the fake ones (entry and @@ -467,11 +472,12 @@ extern bitmap_obstack reg_obstack; #define BB_END(B) (B)->il.rtl->end_ /* Special block numbers [markers] for entry and exit. */ -#define ENTRY_BLOCK (-1) -#define EXIT_BLOCK (-2) +#define ENTRY_BLOCK (0) +#define EXIT_BLOCK (1) + +/* The two blocks that are always in the cfg. */ +#define NUM_FIXED_BLOCKS (2) -/* Special block number not valid for any block. */ -#define INVALID_BLOCK (-3) #define BLOCK_NUM(INSN) (BLOCK_FOR_INSN (INSN)->index + 0) #define set_block_for_insn(INSN, BB) (BLOCK_FOR_INSN (INSN) = BB) @@ -502,8 +508,8 @@ extern edge redirect_edge_succ_nodup (edge, basic_block); extern void redirect_edge_pred (edge, basic_block); extern basic_block create_basic_block_structure (rtx, rtx, rtx, basic_block); extern void clear_bb_flags (void); -extern void flow_reverse_top_sort_order_compute (int *); -extern int flow_depth_first_order_compute (int *, int *); +extern int post_order_compute (int *, bool); +extern int pre_and_rev_post_order_compute (int *, int *, bool); extern int dfs_enumerate_from (basic_block, int, bool (*)(basic_block, void *), basic_block *, int, void *); @@ -807,6 +813,9 @@ enum update_life_extent to flag analysis of asms. */ #define PROP_DEAD_INSN 1024 /* Internal flag used within flow.c to flag analysis of dead insn. */ +#define PROP_POST_REGSTACK 2048 /* We run after reg-stack and need + to preserve REG_DEAD notes for + stack regs. */ #define PROP_FINAL (PROP_DEATH_NOTES | PROP_LOG_LINKS \ | PROP_REG_INFO | PROP_KILL_DEAD_CODE \ | PROP_SCAN_DEAD_CODE | PROP_AUTOINC \ @@ -831,6 +840,17 @@ enum update_life_extent #define CLEANUP_CFGLAYOUT 128 /* Do cleanup in cfglayout mode. */ #define CLEANUP_LOG_LINKS 256 /* Update log links. */ +/* The following are ORed in on top of the CLEANUP* flags in calls to + struct_equiv_block_eq. */ +#define STRUCT_EQUIV_START 512 /* Initializes the search range. */ +#define STRUCT_EQUIV_RERUN 1024 /* Rerun to find register use in + found equivalence. */ +#define STRUCT_EQUIV_FINAL 2048 /* Make any changes necessary to get + actual equivalence. */ +#define STRUCT_EQUIV_NEED_FULL_BLOCK 4096 /* struct_equiv_block_eq is required + to match only full blocks */ +#define STRUCT_EQUIV_MATCH_JUMPS 8192 /* Also include the jumps at the end of the block in the comparison. */ + extern void life_analysis (FILE *, int); extern int update_life_info (sbitmap, enum update_life_extent, int); extern int update_life_info_in_dirty_blocks (enum update_life_extent, int); @@ -991,4 +1011,169 @@ extern basic_block get_bb_copy (basic_block); #include "cfghooks.h" +/* In struct-equiv.c */ + +/* Constants used to size arrays in struct equiv_info (currently only one). + When these limits are exceeded, struct_equiv returns zero. + The maximum number of pseudo registers that are different in the two blocks, + but appear in equivalent places and are dead at the end (or where one of + a pair is dead at the end). */ +#define STRUCT_EQUIV_MAX_LOCAL 16 +/* The maximum number of references to an input register that struct_equiv + can handle. */ + +/* Structure used to track state during struct_equiv that can be rolled + back when we find we can't match an insn, or if we want to match part + of it in a different way. + This information pertains to the pair of partial blocks that has been + matched so far. Since this pair is structurally equivalent, this is + conceptually just one partial block expressed in two potentially + different ways. */ +struct struct_equiv_checkpoint +{ + int ninsns; /* Insns are matched so far. */ + int local_count; /* Number of block-local registers. */ + int input_count; /* Number of inputs to the block. */ + + /* X_START and Y_START are the first insns (in insn stream order) + of the partial blocks that have been considered for matching so far. + Since we are scanning backwards, they are also the instructions that + are currently considered - or the last ones that have been considered - + for matching (Unless we tracked back to these because a preceding + instruction failed to match). */ + rtx x_start, y_start; + + /* INPUT_VALID indicates if we have actually set up X_INPUT / Y_INPUT + during the current pass; we keep X_INPUT / Y_INPUT around between passes + so that we can match REG_EQUAL / REG_EQUIV notes referring to these. */ + bool input_valid; + + /* Some information would be expensive to exactly checkpoint, so we + merely increment VERSION any time information about local + registers, inputs and/or register liveness changes. When backtracking, + it is decremented for changes that can be undone, and if a discrepancy + remains, NEED_RERUN in the relevant struct equiv_info is set to indicate + that a new pass should be made over the entire block match to get + accurate register information. */ + int version; +}; + +/* A struct equiv_info is used to pass information to struct_equiv and + to gather state while two basic blocks are checked for structural + equivalence. */ + +struct equiv_info +{ + /* Fields set up by the caller to struct_equiv_block_eq */ + + basic_block x_block, y_block; /* The two blocks being matched. */ + + /* MODE carries the mode bits from cleanup_cfg if we are called from + try_crossjump_to_edge, and additionally it carries the + STRUCT_EQUIV_* bits described above. */ + int mode; + + /* INPUT_COST is the cost that adding an extra input to the matched blocks + is supposed to have, and is taken into account when considering if the + matched sequence should be extended backwards. input_cost < 0 means + don't accept any inputs at all. */ + int input_cost; + + + /* Fields to track state inside of struct_equiv_block_eq. Some of these + are also outputs. */ + + /* X_INPUT and Y_INPUT are used by struct_equiv to record a register that + is used as an input parameter, i.e. where different registers are used + as sources. This is only used for a register that is live at the end + of the blocks, or in some identical code at the end of the blocks; + Inputs that are dead at the end go into X_LOCAL / Y_LOCAL. */ + rtx x_input, y_input; + /* When a previous pass has identified a valid input, INPUT_REG is set + by struct_equiv_block_eq, and it is henceforth replaced in X_BLOCK + for the input. */ + rtx input_reg; + + /* COMMON_LIVE keeps track of the registers which are currently live + (as we scan backwards from the end) and have the same numbers in both + blocks. N.B. a register that is in common_live is unsuitable to become + a local reg. */ + regset common_live; + /* Likewise, X_LOCAL_LIVE / Y_LOCAL_LIVE keep track of registers that are + local to one of the blocks; these registers must not be accepted as + identical when encountered in both blocks. */ + regset x_local_live, y_local_live; + + /* EQUIV_USED indicates for which insns a REG_EQUAL or REG_EQUIV note is + being used, to avoid having to backtrack in the next pass, so that we + get accurate life info for this insn then. For each such insn, + the bit with the number corresponding to the CUR.NINSNS value at the + time of scanning is set. */ + bitmap equiv_used; + + /* Current state that can be saved & restored easily. */ + struct struct_equiv_checkpoint cur; + /* BEST_MATCH is used to store the best match so far, weighing the + cost of matched insns COSTS_N_INSNS (CUR.NINSNS) against the cost + CUR.INPUT_COUNT * INPUT_COST of setting up the inputs. */ + struct struct_equiv_checkpoint best_match; + /* If a checkpoint restore failed, or an input conflict newly arises, + NEED_RERUN is set. This has to be tested by the caller to re-run + the comparison if the match appears otherwise sound. The state kept in + x_start, y_start, equiv_used and check_input_conflict ensures that + we won't loop indefinitely. */ + bool need_rerun; + /* If there is indication of an input conflict at the end, + CHECK_INPUT_CONFLICT is set so that we'll check for input conflicts + for each insn in the next pass. This is needed so that we won't discard + a partial match if there is a longer match that has to be abandoned due + to an input conflict. */ + bool check_input_conflict; + /* HAD_INPUT_CONFLICT is set if CHECK_INPUT_CONFLICT was already set and we + have passed a point where there were multiple dying inputs. This helps + us decide if we should set check_input_conflict for the next pass. */ + bool had_input_conflict; + + /* LIVE_UPDATE controls if we want to change any life info at all. We + set it to false during REG_EQUAL / REG_EUQIV note comparison of the final + pass so that we don't introduce new registers just for the note; if we + can't match the notes without the current register information, we drop + them. */ + bool live_update; + + /* X_LOCAL and Y_LOCAL are used to gather register numbers of register pairs + that are local to X_BLOCK and Y_BLOCK, with CUR.LOCAL_COUNT being the index + to the next free entry. */ + rtx x_local[STRUCT_EQUIV_MAX_LOCAL], y_local[STRUCT_EQUIV_MAX_LOCAL]; + /* LOCAL_RVALUE is nonzero if the corresponding X_LOCAL / Y_LOCAL entry + was a source operand (including STRICT_LOW_PART) for the last invocation + of struct_equiv mentioning it, zero if it was a destination-only operand. + Since we are scanning backwards, this means the register is input/local + for the (partial) block scanned so far. */ + bool local_rvalue[STRUCT_EQUIV_MAX_LOCAL]; + + + /* Additional fields that are computed for the convenience of the caller. */ + + /* DYING_INPUTS is set to the number of local registers that turn out + to be inputs to the (possibly partial) block. */ + int dying_inputs; + /* X_END and Y_END are the last insns in X_BLOCK and Y_BLOCK, respectively, + that are being compared. A final jump insn will not be included. */ + rtx x_end, y_end; + + /* If we are matching tablejumps, X_LABEL in X_BLOCK corresponds to + Y_LABEL in Y_BLOCK. */ + rtx x_label, y_label; + +}; + +extern bool insns_match_p (rtx, rtx, struct equiv_info *); +extern int struct_equiv_block_eq (int, struct equiv_info *); +extern bool struct_equiv_init (int, struct equiv_info *); +extern bool rtx_equiv_p (rtx *, rtx, int, struct equiv_info *); + +/* In cfgrtl.c */ +extern bool condjump_equiv_p (struct equiv_info *, bool); + #endif /* GCC_BASIC_BLOCK_H */ diff --git a/gcc/bb-reorder.c b/gcc/bb-reorder.c index 40d0cdf676e..f46b2cf871e 100644 --- a/gcc/bb-reorder.c +++ b/gcc/bb-reorder.c @@ -1894,7 +1894,7 @@ reorder_basic_blocks (unsigned int flags) int i; struct trace *traces; - if (n_basic_blocks <= 1) + if (n_basic_blocks <= NUM_FIXED_BLOCKS + 1) return; if (targetm.cannot_modify_jumps_p ()) @@ -1986,7 +1986,7 @@ duplicate_computed_gotos (void) bitmap candidates; int max_size; - if (n_basic_blocks <= 1) + if (n_basic_blocks <= NUM_FIXED_BLOCKS + 1) return; if (targetm.cannot_modify_jumps_p ()) @@ -2169,7 +2169,7 @@ partition_hot_cold_basic_blocks (void) int n_crossing_edges; int max_edges = 2 * last_basic_block; - if (n_basic_blocks <= 1) + if (n_basic_blocks <= NUM_FIXED_BLOCKS + 1) return; crossing_edges = xcalloc (max_edges, sizeof (edge)); @@ -2177,8 +2177,8 @@ partition_hot_cold_basic_blocks (void) cfg_layout_initialize (0); FOR_EACH_BB (cur_bb) - if (cur_bb->index >= 0 - && cur_bb->next_bb->index >= 0) + if (cur_bb->index >= NUM_FIXED_BLOCKS + && cur_bb->next_bb->index >= NUM_FIXED_BLOCKS) cur_bb->aux = cur_bb->next_bb; find_rarely_executed_basic_blocks_and_crossing_edges (crossing_edges, diff --git a/gcc/bitmap.c b/gcc/bitmap.c index a1c053e75fe..e864ee80c69 100644 --- a/gcc/bitmap.c +++ b/gcc/bitmap.c @@ -40,7 +40,7 @@ static void bitmap_element_free (bitmap, bitmap_element *); static bitmap_element *bitmap_element_allocate (bitmap); static int bitmap_element_zerop (bitmap_element *); static void bitmap_element_link (bitmap, bitmap_element *); -static bitmap_element *bitmap_elt_insert_after (bitmap, bitmap_element *); +static bitmap_element *bitmap_elt_insert_after (bitmap, bitmap_element *, unsigned int); static void bitmap_elt_clear_from (bitmap, bitmap_element *); static bitmap_element *bitmap_find_bit (bitmap, unsigned int); @@ -89,6 +89,8 @@ bitmap_element_free (bitmap head, bitmap_element *elt) head->current = next != 0 ? next : prev; if (head->current) head->indx = head->current->indx; + else + head->indx = 0; } bitmap_elem_to_freelist (head, elt); } @@ -354,14 +356,18 @@ bitmap_element_link (bitmap head, bitmap_element *element) new element. */ static bitmap_element * -bitmap_elt_insert_after (bitmap head, bitmap_element *elt) +bitmap_elt_insert_after (bitmap head, bitmap_element *elt, unsigned int indx) { bitmap_element *node = bitmap_element_allocate (head); + node->indx = indx; if (!elt) { if (!head->current) - head->current = node; + { + head->current = node; + head->indx = indx; + } node->next = head->first; if (node->next) node->next->prev = node; @@ -524,6 +530,59 @@ bitmap_bit_p (bitmap head, int bit) return (ptr->bits[word_num] >> bit_num) & 1; } +#if GCC_VERSION < 3400 +/* Table of number of set bits in a character, indexed by value of char. */ +static unsigned char popcount_table[] = +{ + 0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5, + 1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5,2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6, + 1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5,2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6, + 2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,3,4,4,5,4,5,5,6,4,5,5,6,5,6,6,7, + 1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5,2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6, + 2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,3,4,4,5,4,5,5,6,4,5,5,6,5,6,6,7, + 2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,3,4,4,5,4,5,5,6,4,5,5,6,5,6,6,7, + 3,4,4,5,4,5,5,6,4,5,5,6,5,6,6,7,4,5,5,6,5,6,6,7,5,6,6,7,6,7,7,8, +}; + +static unsigned long +bitmap_popcount (BITMAP_WORD a) +{ + unsigned long ret = 0; + unsigned i; + + /* Just do this the table way for now */ + for (i = 0; i < BITMAP_WORD_BITS; i+= 8) + ret += popcount_table[(a >> i) & 0xff]; + return ret; +} +#endif +/* Count the number of bits set in the bitmap, and return it. */ + +unsigned long +bitmap_count_bits (bitmap a) +{ + unsigned long count = 0; + bitmap_element *elt; + unsigned ix; + + for (elt = a->first; elt; elt = elt->next) + { + for (ix = 0; ix != BITMAP_ELEMENT_WORDS; ix++) + { +#if GCC_VERSION >= 3400 + /* Note that popcountl matches BITMAP_WORD in type, so the actual size + of BITMAP_WORD is not material. */ + count += __builtin_popcountl (elt->bits[ix]); +#else + count += bitmap_popcount (elt->bits[ix]); +#endif + } + } + return count; +} + + + /* Return the bit number of the first set bit in the bitmap. The bitmap must be non-empty. */ @@ -607,9 +666,9 @@ bitmap_and (bitmap dst, bitmap a, bitmap b) BITMAP_WORD ior = 0; if (!dst_elt) - dst_elt = bitmap_elt_insert_after (dst, dst_prev); - - dst_elt->indx = a_elt->indx; + dst_elt = bitmap_elt_insert_after (dst, dst_prev, a_elt->indx); + else + dst_elt->indx = a_elt->indx; for (ix = BITMAP_ELEMENT_WORDS; ix--;) { BITMAP_WORD r = a_elt->bits[ix] & b_elt->bits[ix]; @@ -703,9 +762,9 @@ bitmap_and_compl (bitmap dst, bitmap a, bitmap b) { /* Copy a_elt. */ if (!dst_elt) - dst_elt = bitmap_elt_insert_after (dst, dst_prev); - - dst_elt->indx = a_elt->indx; + dst_elt = bitmap_elt_insert_after (dst, dst_prev, a_elt->indx); + else + dst_elt->indx = a_elt->indx; memcpy (dst_elt->bits, a_elt->bits, sizeof (dst_elt->bits)); dst_prev = dst_elt; dst_elt = dst_elt->next; @@ -720,9 +779,9 @@ bitmap_and_compl (bitmap dst, bitmap a, bitmap b) BITMAP_WORD ior = 0; if (!dst_elt) - dst_elt = bitmap_elt_insert_after (dst, dst_prev); - - dst_elt->indx = a_elt->indx; + dst_elt = bitmap_elt_insert_after (dst, dst_prev, a_elt->indx); + else + dst_elt->indx = a_elt->indx; for (ix = BITMAP_ELEMENT_WORDS; ix--;) { BITMAP_WORD r = a_elt->bits[ix] & ~b_elt->bits[ix]; @@ -799,6 +858,195 @@ bitmap_and_compl_into (bitmap a, bitmap b) return changed != 0; } +/* Clear COUNT bits from START in HEAD. */ +void +bitmap_clear_range (bitmap head, unsigned int start, unsigned int count) +{ + unsigned int first_index = start / BITMAP_ELEMENT_ALL_BITS; + unsigned int end_bit_plus1 = start + count; + unsigned int end_bit = end_bit_plus1 - 1; + unsigned int last_index = (end_bit) / BITMAP_ELEMENT_ALL_BITS; + bitmap_element *elt = bitmap_find_bit (head, start); + + /* If bitmap_find_bit returns zero, the current is the closest block + to the result. If the current is less than first index, find the + next one. Otherwise, just set elt to be current. */ + if (!elt) + { + if (head->current) + { + if (head->indx < first_index) + { + elt = head->current->next; + if (!elt) + return; + } + else + elt = head->current; + } + else + return; + } + + while (elt && (elt->indx <= last_index)) + { + bitmap_element * next_elt = elt->next; + unsigned elt_start_bit = (elt->indx) * BITMAP_ELEMENT_ALL_BITS; + unsigned elt_end_bit_plus1 = elt_start_bit + BITMAP_ELEMENT_ALL_BITS; + + + if (elt_start_bit >= start && elt_end_bit_plus1 <= end_bit_plus1) + /* Get rid of the entire elt and go to the next one. */ + bitmap_element_free (head, elt); + else + { + /* Going to have to knock out some bits in this elt. */ + unsigned int first_word_to_mod; + BITMAP_WORD first_mask; + unsigned int last_word_to_mod; + BITMAP_WORD last_mask; + unsigned int i; + bool clear = true; + + if (elt_start_bit <= start) + { + /* The first bit to turn off is somewhere inside this + elt. */ + first_word_to_mod = (start - elt_start_bit) / BITMAP_WORD_BITS; + + /* This mask should have 1s in all bits >= start position. */ + first_mask = + (((BITMAP_WORD) 1) << ((start % BITMAP_WORD_BITS))) - 1; + first_mask = ~first_mask; + } + else + { + /* The first bit to turn off is below this start of this elt. */ + first_word_to_mod = 0; + first_mask = 0; + first_mask = ~first_mask; + } + + if (elt_end_bit_plus1 <= end_bit_plus1) + { + /* The last bit to turn off is beyond this elt. */ + last_word_to_mod = BITMAP_ELEMENT_WORDS - 1; + last_mask = 0; + last_mask = ~last_mask; + } + else + { + /* The last bit to turn off is inside to this elt. */ + last_word_to_mod = + (end_bit_plus1 - elt_start_bit) / BITMAP_WORD_BITS; + + /* The last mask should have 1s below the end bit. */ + last_mask = + (((BITMAP_WORD) 1) << (((end_bit_plus1) % BITMAP_WORD_BITS))) - 1; + } + + + if (first_word_to_mod == last_word_to_mod) + { + BITMAP_WORD mask = first_mask & last_mask; + elt->bits[first_word_to_mod] &= ~mask; + } + else + { + elt->bits[first_word_to_mod] &= ~first_mask; + for (i = first_word_to_mod + 1; i < last_word_to_mod; i++) + elt->bits[i] = 0; + elt->bits[last_word_to_mod] &= ~last_mask; + } + for (i = 0; i < BITMAP_ELEMENT_WORDS; i++) + if (elt->bits[i]) + { + clear = false; + break; + } + /* Check to see if there are any bits left. */ + if (clear) + bitmap_element_free (head, elt); + } + elt = next_elt; + } + + if (elt) + { + head->current = elt; + head->indx = head->current->indx; + } +} + +/* A = ~A & B. */ + +void +bitmap_compl_and_into (bitmap a, bitmap b) +{ + bitmap_element *a_elt = a->first; + bitmap_element *b_elt = b->first; + bitmap_element *a_prev = NULL; + bitmap_element *next; + + gcc_assert (a != b); + + if (bitmap_empty_p (a)) + { + bitmap_copy (a, b); + return; + } + if (bitmap_empty_p (b)) + { + bitmap_clear (a); + return; + } + + while (a_elt || b_elt) + { + if (!b_elt || (a_elt && a_elt->indx < b_elt->indx)) + { + /* A is before B. Remove A */ + next = a_elt->next; + a_prev = a_elt->prev; + bitmap_element_free (a, a_elt); + a_elt = next; + } + else if (!a_elt || b_elt->indx < a_elt->indx) + { + /* B is before A. Copy B. */ + next = bitmap_elt_insert_after (a, a_prev, b_elt->indx); + memcpy (next->bits, b_elt->bits, sizeof (next->bits)); + a_prev = next; + b_elt = b_elt->next; + } + else + { + /* Matching elts, generate A = ~A & B. */ + unsigned ix; + BITMAP_WORD ior = 0; + + for (ix = BITMAP_ELEMENT_WORDS; ix--;) + { + BITMAP_WORD cleared = a_elt->bits[ix] & b_elt->bits[ix]; + BITMAP_WORD r = b_elt->bits[ix] ^ cleared; + + a_elt->bits[ix] = r; + ior |= r; + } + next = a_elt->next; + if (!ior) + bitmap_element_free (a, a_elt); + else + a_prev = a_elt; + a_elt = next; + b_elt = b_elt->next; + } + } + gcc_assert (!a->current == !a->first); + gcc_assert (!a->current || a->indx == a->current->indx); + return; +} + /* DST = A | B. Return true if DST changes. */ bool @@ -836,8 +1084,9 @@ bitmap_ior (bitmap dst, bitmap a, bitmap b) { changed = true; if (!dst_elt) - dst_elt = bitmap_elt_insert_after (dst, dst_prev); - dst_elt->indx = a_elt->indx; + dst_elt = bitmap_elt_insert_after (dst, dst_prev, a_elt->indx); + else + dst_elt->indx = a_elt->indx; for (ix = BITMAP_ELEMENT_WORDS; ix--;) { BITMAP_WORD r = a_elt->bits[ix] | b_elt->bits[ix]; @@ -881,8 +1130,9 @@ bitmap_ior (bitmap dst, bitmap a, bitmap b) { changed = true; if (!dst_elt) - dst_elt = bitmap_elt_insert_after (dst, dst_prev); - dst_elt->indx = src->indx; + dst_elt = bitmap_elt_insert_after (dst, dst_prev, src->indx); + else + dst_elt->indx = src->indx; memcpy (dst_elt->bits, src->bits, sizeof (dst_elt->bits)); } @@ -920,9 +1170,7 @@ bitmap_ior_into (bitmap a, bitmap b) if (!a_elt || b_elt->indx < a_elt->indx) { /* Copy b_elt. */ - bitmap_element *dst = bitmap_elt_insert_after (a, a_prev); - - dst->indx = b_elt->indx; + bitmap_element *dst = bitmap_elt_insert_after (a, a_prev, b_elt->indx); memcpy (dst->bits, b_elt->bits, sizeof (dst->bits)); a_prev = dst; b_elt = b_elt->next; @@ -993,9 +1241,9 @@ bitmap_xor (bitmap dst, bitmap a, bitmap b) BITMAP_WORD ior = 0; if (!dst_elt) - dst_elt = bitmap_elt_insert_after (dst, dst_prev); - - dst_elt->indx = a_elt->indx; + dst_elt = bitmap_elt_insert_after (dst, dst_prev, a_elt->indx); + else + dst_elt->indx = a_elt->indx; for (ix = BITMAP_ELEMENT_WORDS; ix--;) { BITMAP_WORD r = a_elt->bits[ix] ^ b_elt->bits[ix]; @@ -1028,9 +1276,9 @@ bitmap_xor (bitmap dst, bitmap a, bitmap b) } if (!dst_elt) - dst_elt = bitmap_elt_insert_after (dst, dst_prev); - - dst_elt->indx = src->indx; + dst_elt = bitmap_elt_insert_after (dst, dst_prev, src->indx); + else + dst_elt->indx = src->indx; memcpy (dst_elt->bits, src->bits, sizeof (dst_elt->bits)); dst_prev = dst_elt; dst_elt = dst_elt->next; @@ -1062,9 +1310,7 @@ bitmap_xor_into (bitmap a, bitmap b) if (!a_elt || b_elt->indx < a_elt->indx) { /* Copy b_elt. */ - bitmap_element *dst = bitmap_elt_insert_after (a, a_prev); - - dst->indx = b_elt->indx; + bitmap_element *dst = bitmap_elt_insert_after (a, a_prev, b_elt->indx); memcpy (dst->bits, b_elt->bits, sizeof (dst->bits)); a_prev = dst; b_elt = b_elt->next; diff --git a/gcc/bitmap.h b/gcc/bitmap.h index 3400c057336..fb56e4e0db4 100644 --- a/gcc/bitmap.h +++ b/gcc/bitmap.h @@ -102,6 +102,9 @@ extern bool bitmap_intersect_compl_p (bitmap, bitmap); /* True if MAP is an empty bitmap. */ #define bitmap_empty_p(MAP) (!(MAP)->first) +/* Count the number of bits set in the bitmap. */ +extern unsigned long bitmap_count_bits (bitmap); + /* Boolean operations on bitmaps. The _into variants are two operand versions that modify the first source operand. The other variants are three operand versions that to not destroy the source bitmaps. @@ -110,6 +113,9 @@ extern void bitmap_and (bitmap, bitmap, bitmap); extern void bitmap_and_into (bitmap, bitmap); extern void bitmap_and_compl (bitmap, bitmap, bitmap); extern bool bitmap_and_compl_into (bitmap, bitmap); +#define bitmap_compl_and(DST, A, B) bitmap_and_compl (DST, B, A) +extern void bitmap_compl_and_into (bitmap, bitmap); +extern void bitmap_clear_range (bitmap, unsigned int, unsigned int); extern bool bitmap_ior (bitmap, bitmap, bitmap); extern bool bitmap_ior_into (bitmap, bitmap); extern void bitmap_xor (bitmap, bitmap, bitmap); diff --git a/gcc/bt-load.c b/gcc/bt-load.c index ae648411940..c39c5b5aaaa 100644 --- a/gcc/bt-load.c +++ b/gcc/bt-load.c @@ -461,7 +461,7 @@ compute_defs_uses_and_gen (fibheap_t all_btr_defs, btr_def *def_array, defs_uses_info info; sbitmap_vector_zero (bb_gen, n_basic_blocks); - for (i = 0; i < n_basic_blocks; i++) + for (i = NUM_FIXED_BLOCKS; i < n_basic_blocks; i++) { basic_block bb = BASIC_BLOCK (i); int reg; @@ -622,7 +622,7 @@ compute_kill (sbitmap *bb_kill, sbitmap *btr_defset, /* For each basic block, form the set BB_KILL - the set of definitions that the block kills. */ sbitmap_vector_zero (bb_kill, n_basic_blocks); - for (i = 0; i < n_basic_blocks; i++) + for (i = NUM_FIXED_BLOCKS; i < n_basic_blocks; i++) { for (regno = first_btr; regno <= last_btr; regno++) if (TEST_HARD_REG_BIT (all_btrs, regno) @@ -645,14 +645,14 @@ compute_out (sbitmap *bb_out, sbitmap *bb_gen, sbitmap *bb_kill, int max_uid) int changed; sbitmap bb_in = sbitmap_alloc (max_uid); - for (i = 0; i < n_basic_blocks; i++) + for (i = NUM_FIXED_BLOCKS; i < n_basic_blocks; i++) sbitmap_copy (bb_out[i], bb_gen[i]); changed = 1; while (changed) { changed = 0; - for (i = 0; i < n_basic_blocks; i++) + for (i = NUM_FIXED_BLOCKS; i < n_basic_blocks; i++) { sbitmap_union_of_preds (bb_in, bb_out, i); changed |= sbitmap_union_of_diff_cg (bb_out[i], bb_gen[i], @@ -671,7 +671,7 @@ link_btr_uses (btr_def *def_array, btr_user *use_array, sbitmap *bb_out, /* Link uses to the uses lists of all of their reaching defs. Count up the number of reaching defs of each use. */ - for (i = 0; i < n_basic_blocks; i++) + for (i = NUM_FIXED_BLOCKS; i < n_basic_blocks; i++) { basic_block bb = BASIC_BLOCK (i); rtx insn; @@ -1397,7 +1397,7 @@ migrate_btr_defs (enum reg_class btr_class, int allow_callee_save) { int i; - for (i = 0; i < n_basic_blocks; i++) + for (i = NUM_FIXED_BLOCKS; i < n_basic_blocks; i++) { basic_block bb = BASIC_BLOCK (i); fprintf(dump_file, diff --git a/gcc/builtin-types.def b/gcc/builtin-types.def index 3f25cdd4477..9540f3a719f 100644 --- a/gcc/builtin-types.def +++ b/gcc/builtin-types.def @@ -98,6 +98,13 @@ DEF_PRIMITIVE_TYPE (BT_WINT, wint_type_node) DEF_PRIMITIVE_TYPE (BT_STRING, string_type_node) DEF_PRIMITIVE_TYPE (BT_CONST_STRING, const_string_type_node) +DEF_PRIMITIVE_TYPE (BT_DFLOAT32, dfloat32_type_node) +DEF_PRIMITIVE_TYPE (BT_DFLOAT64, dfloat64_type_node) +DEF_PRIMITIVE_TYPE (BT_DFLOAT128, dfloat128_type_node) +DEF_PRIMITIVE_TYPE (BT_DFLOAT32_PTR, dfloat32_ptr_type_node) +DEF_PRIMITIVE_TYPE (BT_DFLOAT64_PTR, dfloat64_ptr_type_node) +DEF_PRIMITIVE_TYPE (BT_DFLOAT128_PTR, dfloat128_ptr_type_node) + DEF_PRIMITIVE_TYPE (BT_VALIST_REF, va_list_ref_type_node) DEF_PRIMITIVE_TYPE (BT_VALIST_ARG, va_list_arg_type_node) @@ -105,6 +112,7 @@ DEF_PRIMITIVE_TYPE (BT_I1, builtin_type_for_size (BITS_PER_UNIT*1, 1)) DEF_PRIMITIVE_TYPE (BT_I2, builtin_type_for_size (BITS_PER_UNIT*2, 1)) DEF_PRIMITIVE_TYPE (BT_I4, builtin_type_for_size (BITS_PER_UNIT*4, 1)) DEF_PRIMITIVE_TYPE (BT_I8, builtin_type_for_size (BITS_PER_UNIT*8, 1)) +DEF_PRIMITIVE_TYPE (BT_I16, builtin_type_for_size (BITS_PER_UNIT*16, 1)) DEF_POINTER_TYPE (BT_PTR_CONST_STRING, BT_CONST_STRING) @@ -118,6 +126,9 @@ DEF_FUNCTION_TYPE_0 (BT_FN_DOUBLE, BT_DOUBLE) distinguish it from two types in sequence, "long" followed by "double". */ DEF_FUNCTION_TYPE_0 (BT_FN_LONGDOUBLE, BT_LONGDOUBLE) +DEF_FUNCTION_TYPE_0 (BT_FN_DFLOAT32, BT_DFLOAT32) +DEF_FUNCTION_TYPE_0 (BT_FN_DFLOAT64, BT_DFLOAT64) +DEF_FUNCTION_TYPE_0 (BT_FN_DFLOAT128, BT_DFLOAT128) DEF_FUNCTION_TYPE_1 (BT_FN_LONG_LONG, BT_LONG, BT_LONG) DEF_FUNCTION_TYPE_1 (BT_FN_LONGLONG_LONGLONG, BT_LONGLONG, BT_LONGLONG) @@ -152,6 +163,9 @@ DEF_FUNCTION_TYPE_1 (BT_FN_INT_PTR, BT_INT, BT_PTR) DEF_FUNCTION_TYPE_1 (BT_FN_INT_FLOAT, BT_INT, BT_FLOAT) DEF_FUNCTION_TYPE_1 (BT_FN_INT_DOUBLE, BT_INT, BT_DOUBLE) DEF_FUNCTION_TYPE_1 (BT_FN_INT_LONGDOUBLE, BT_INT, BT_LONGDOUBLE) +DEF_FUNCTION_TYPE_1 (BT_FN_INT_DFLOAT32, BT_INT, BT_DFLOAT32) +DEF_FUNCTION_TYPE_1 (BT_FN_INT_DFLOAT64, BT_INT, BT_DFLOAT64) +DEF_FUNCTION_TYPE_1 (BT_FN_INT_DFLOAT128, BT_INT, BT_DFLOAT128) DEF_FUNCTION_TYPE_1 (BT_FN_LONG_FLOAT, BT_LONG, BT_FLOAT) DEF_FUNCTION_TYPE_1 (BT_FN_LONG_DOUBLE, BT_LONG, BT_DOUBLE) DEF_FUNCTION_TYPE_1 (BT_FN_LONG_LONGDOUBLE, BT_LONG, BT_LONGDOUBLE) @@ -168,10 +182,17 @@ DEF_FUNCTION_TYPE_1 (BT_FN_FLOAT_CONST_STRING, BT_FLOAT, BT_CONST_STRING) DEF_FUNCTION_TYPE_1 (BT_FN_DOUBLE_CONST_STRING, BT_DOUBLE, BT_CONST_STRING) DEF_FUNCTION_TYPE_1 (BT_FN_LONGDOUBLE_CONST_STRING, BT_LONGDOUBLE, BT_CONST_STRING) +DEF_FUNCTION_TYPE_1 (BT_FN_DFLOAT32_CONST_STRING, BT_DFLOAT32, BT_CONST_STRING) +DEF_FUNCTION_TYPE_1 (BT_FN_DFLOAT64_CONST_STRING, BT_DFLOAT64, BT_CONST_STRING) +DEF_FUNCTION_TYPE_1 (BT_FN_DFLOAT128_CONST_STRING, + BT_DFLOAT128, BT_CONST_STRING) DEF_FUNCTION_TYPE_1 (BT_FN_STRING_CONST_STRING, BT_STRING, BT_CONST_STRING) DEF_FUNCTION_TYPE_1 (BT_FN_WORD_PTR, BT_WORD, BT_PTR) DEF_FUNCTION_TYPE_1 (BT_FN_INT_WINT, BT_INT, BT_WINT) DEF_FUNCTION_TYPE_1 (BT_FN_WINT_WINT, BT_WINT, BT_WINT) +DEF_FUNCTION_TYPE_1 (BT_FN_DFLOAT32_DFLOAT32, BT_DFLOAT32, BT_DFLOAT32) +DEF_FUNCTION_TYPE_1 (BT_FN_DFLOAT64_DFLOAT64, BT_DFLOAT64, BT_DFLOAT64) +DEF_FUNCTION_TYPE_1 (BT_FN_DFLOAT128_DFLOAT128, BT_DFLOAT128, BT_DFLOAT128) DEF_FUNCTION_TYPE_1 (BT_FN_VOID_VPTR, BT_VOID, BT_VOLATILE_PTR) DEF_FUNCTION_TYPE_2 (BT_FN_VOID_PTR_INT, BT_VOID, BT_PTR, BT_INT) @@ -259,6 +280,7 @@ DEF_FUNCTION_TYPE_2 (BT_FN_I1_VPTR_I1, BT_I1, BT_VOLATILE_PTR, BT_I1) DEF_FUNCTION_TYPE_2 (BT_FN_I2_VPTR_I2, BT_I2, BT_VOLATILE_PTR, BT_I2) DEF_FUNCTION_TYPE_2 (BT_FN_I4_VPTR_I4, BT_I4, BT_VOLATILE_PTR, BT_I4) DEF_FUNCTION_TYPE_2 (BT_FN_I8_VPTR_I8, BT_I8, BT_VOLATILE_PTR, BT_I8) +DEF_FUNCTION_TYPE_2 (BT_FN_I16_VPTR_I16, BT_I16, BT_VOLATILE_PTR, BT_I16) DEF_FUNCTION_TYPE_3 (BT_FN_STRING_STRING_CONST_STRING_SIZE, BT_STRING, BT_STRING, BT_CONST_STRING, BT_SIZE) @@ -313,10 +335,14 @@ DEF_FUNCTION_TYPE_3 (BT_FN_BOOL_VPTR_I4_I4, BT_BOOL, BT_VOLATILE_PTR, BT_I4, BT_I4) DEF_FUNCTION_TYPE_3 (BT_FN_BOOL_VPTR_I8_I8, BT_BOOL, BT_VOLATILE_PTR, BT_I8, BT_I8) +DEF_FUNCTION_TYPE_3 (BT_FN_BOOL_VPTR_I16_I16, BT_BOOL, BT_VOLATILE_PTR, + BT_I16, BT_I16) DEF_FUNCTION_TYPE_3 (BT_FN_I1_VPTR_I1_I1, BT_I1, BT_VOLATILE_PTR, BT_I1, BT_I1) DEF_FUNCTION_TYPE_3 (BT_FN_I2_VPTR_I2_I2, BT_I2, BT_VOLATILE_PTR, BT_I2, BT_I2) DEF_FUNCTION_TYPE_3 (BT_FN_I4_VPTR_I4_I4, BT_I4, BT_VOLATILE_PTR, BT_I4, BT_I4) DEF_FUNCTION_TYPE_3 (BT_FN_I8_VPTR_I8_I8, BT_I8, BT_VOLATILE_PTR, BT_I8, BT_I8) +DEF_FUNCTION_TYPE_3 (BT_FN_I16_VPTR_I16_I16, BT_I16, BT_VOLATILE_PTR, + BT_I16, BT_I16) DEF_FUNCTION_TYPE_4 (BT_FN_SIZE_CONST_PTR_SIZE_SIZE_FILEPTR, BT_SIZE, BT_CONST_PTR, BT_SIZE, BT_SIZE, BT_FILEPTR) diff --git a/gcc/builtins.c b/gcc/builtins.c index 6cca5fbe37e..657f38b7e22 100644 --- a/gcc/builtins.c +++ b/gcc/builtins.c @@ -95,6 +95,7 @@ static void expand_errno_check (tree, rtx); static rtx expand_builtin_mathfn (tree, rtx, rtx); static rtx expand_builtin_mathfn_2 (tree, rtx, rtx); static rtx expand_builtin_mathfn_3 (tree, rtx, rtx); +static rtx expand_builtin_sincos (tree); static rtx expand_builtin_int_roundingfn (tree, rtx, rtx); static rtx expand_builtin_args_info (tree); static rtx expand_builtin_next_arg (void); @@ -199,6 +200,15 @@ static tree fold_builtin_strncat_chk (tree, tree); static tree fold_builtin_sprintf_chk (tree, enum built_in_function); static tree fold_builtin_printf (tree, tree, bool, enum built_in_function); static tree fold_builtin_fprintf (tree, tree, bool, enum built_in_function); +static bool init_target_chars (void); + +static unsigned HOST_WIDE_INT target_newline; +static unsigned HOST_WIDE_INT target_percent; +static unsigned HOST_WIDE_INT target_c; +static unsigned HOST_WIDE_INT target_s; +static char target_percent_c[3]; +static char target_percent_s[3]; +static char target_percent_s_newline[4]; /* Return true if NODE should be considered for inline expansion regardless of the optimization level. This means whenever a function is invoked with @@ -1781,101 +1791,53 @@ expand_builtin_mathfn (tree exp, rtx target, rtx subtarget) switch (DECL_FUNCTION_CODE (fndecl)) { - case BUILT_IN_SQRT: - case BUILT_IN_SQRTF: - case BUILT_IN_SQRTL: + CASE_FLT_FN (BUILT_IN_SQRT): errno_set = ! tree_expr_nonnegative_p (arg); builtin_optab = sqrt_optab; break; - case BUILT_IN_EXP: - case BUILT_IN_EXPF: - case BUILT_IN_EXPL: + CASE_FLT_FN (BUILT_IN_EXP): errno_set = true; builtin_optab = exp_optab; break; - case BUILT_IN_EXP10: - case BUILT_IN_EXP10F: - case BUILT_IN_EXP10L: - case BUILT_IN_POW10: - case BUILT_IN_POW10F: - case BUILT_IN_POW10L: + CASE_FLT_FN (BUILT_IN_EXP10): + CASE_FLT_FN (BUILT_IN_POW10): errno_set = true; builtin_optab = exp10_optab; break; - case BUILT_IN_EXP2: - case BUILT_IN_EXP2F: - case BUILT_IN_EXP2L: + CASE_FLT_FN (BUILT_IN_EXP2): errno_set = true; builtin_optab = exp2_optab; break; - case BUILT_IN_EXPM1: - case BUILT_IN_EXPM1F: - case BUILT_IN_EXPM1L: + CASE_FLT_FN (BUILT_IN_EXPM1): errno_set = true; builtin_optab = expm1_optab; break; - case BUILT_IN_LOGB: - case BUILT_IN_LOGBF: - case BUILT_IN_LOGBL: + CASE_FLT_FN (BUILT_IN_LOGB): errno_set = true; builtin_optab = logb_optab; break; - case BUILT_IN_ILOGB: - case BUILT_IN_ILOGBF: - case BUILT_IN_ILOGBL: + CASE_FLT_FN (BUILT_IN_ILOGB): errno_set = true; builtin_optab = ilogb_optab; break; - case BUILT_IN_LOG: - case BUILT_IN_LOGF: - case BUILT_IN_LOGL: + CASE_FLT_FN (BUILT_IN_LOG): errno_set = true; builtin_optab = log_optab; break; - case BUILT_IN_LOG10: - case BUILT_IN_LOG10F: - case BUILT_IN_LOG10L: + CASE_FLT_FN (BUILT_IN_LOG10): errno_set = true; builtin_optab = log10_optab; break; - case BUILT_IN_LOG2: - case BUILT_IN_LOG2F: - case BUILT_IN_LOG2L: + CASE_FLT_FN (BUILT_IN_LOG2): errno_set = true; builtin_optab = log2_optab; break; - case BUILT_IN_LOG1P: - case BUILT_IN_LOG1PF: - case BUILT_IN_LOG1PL: + CASE_FLT_FN (BUILT_IN_LOG1P): errno_set = true; builtin_optab = log1p_optab; break; - case BUILT_IN_ASIN: - case BUILT_IN_ASINF: - case BUILT_IN_ASINL: + CASE_FLT_FN (BUILT_IN_ASIN): builtin_optab = asin_optab; break; - case BUILT_IN_ACOS: - case BUILT_IN_ACOSF: - case BUILT_IN_ACOSL: + CASE_FLT_FN (BUILT_IN_ACOS): builtin_optab = acos_optab; break; - case BUILT_IN_TAN: - case BUILT_IN_TANF: - case BUILT_IN_TANL: + CASE_FLT_FN (BUILT_IN_TAN): builtin_optab = tan_optab; break; - case BUILT_IN_ATAN: - case BUILT_IN_ATANF: - case BUILT_IN_ATANL: + CASE_FLT_FN (BUILT_IN_ATAN): builtin_optab = atan_optab; break; - case BUILT_IN_FLOOR: - case BUILT_IN_FLOORF: - case BUILT_IN_FLOORL: + CASE_FLT_FN (BUILT_IN_FLOOR): builtin_optab = floor_optab; break; - case BUILT_IN_CEIL: - case BUILT_IN_CEILF: - case BUILT_IN_CEILL: + CASE_FLT_FN (BUILT_IN_CEIL): builtin_optab = ceil_optab; break; - case BUILT_IN_TRUNC: - case BUILT_IN_TRUNCF: - case BUILT_IN_TRUNCL: + CASE_FLT_FN (BUILT_IN_TRUNC): builtin_optab = btrunc_optab; break; - case BUILT_IN_ROUND: - case BUILT_IN_ROUNDF: - case BUILT_IN_ROUNDL: + CASE_FLT_FN (BUILT_IN_ROUND): builtin_optab = round_optab; break; - case BUILT_IN_NEARBYINT: - case BUILT_IN_NEARBYINTF: - case BUILT_IN_NEARBYINTL: + CASE_FLT_FN (BUILT_IN_NEARBYINT): builtin_optab = nearbyint_optab; break; - case BUILT_IN_RINT: - case BUILT_IN_RINTF: - case BUILT_IN_RINTL: + CASE_FLT_FN (BUILT_IN_RINT): builtin_optab = rint_optab; break; - case BUILT_IN_LRINT: - case BUILT_IN_LRINTF: - case BUILT_IN_LRINTL: - case BUILT_IN_LLRINT: - case BUILT_IN_LLRINTF: - case BUILT_IN_LLRINTL: + CASE_FLT_FN (BUILT_IN_LRINT): + CASE_FLT_FN (BUILT_IN_LLRINT): builtin_optab = lrint_optab; break; default: gcc_unreachable (); @@ -2008,25 +1970,15 @@ expand_builtin_mathfn_2 (tree exp, rtx target, rtx subtarget) switch (DECL_FUNCTION_CODE (fndecl)) { - case BUILT_IN_POW: - case BUILT_IN_POWF: - case BUILT_IN_POWL: + CASE_FLT_FN (BUILT_IN_POW): builtin_optab = pow_optab; break; - case BUILT_IN_ATAN2: - case BUILT_IN_ATAN2F: - case BUILT_IN_ATAN2L: + CASE_FLT_FN (BUILT_IN_ATAN2): builtin_optab = atan2_optab; break; - case BUILT_IN_LDEXP: - case BUILT_IN_LDEXPF: - case BUILT_IN_LDEXPL: + CASE_FLT_FN (BUILT_IN_LDEXP): builtin_optab = ldexp_optab; break; - case BUILT_IN_FMOD: - case BUILT_IN_FMODF: - case BUILT_IN_FMODL: + CASE_FLT_FN (BUILT_IN_FMOD): builtin_optab = fmod_optab; break; - case BUILT_IN_DREM: - case BUILT_IN_DREMF: - case BUILT_IN_DREML: + CASE_FLT_FN (BUILT_IN_DREM): builtin_optab = drem_optab; break; default: gcc_unreachable (); @@ -2113,7 +2065,6 @@ expand_builtin_mathfn_3 (tree exp, rtx target, rtx subtarget) tree fndecl = get_callee_fndecl (exp); tree arglist = TREE_OPERAND (exp, 1); enum machine_mode mode; - bool errno_set = false; tree arg, narg; if (!validate_arglist (arglist, REAL_TYPE, VOID_TYPE)) @@ -2123,12 +2074,8 @@ expand_builtin_mathfn_3 (tree exp, rtx target, rtx subtarget) switch (DECL_FUNCTION_CODE (fndecl)) { - case BUILT_IN_SIN: - case BUILT_IN_SINF: - case BUILT_IN_SINL: - case BUILT_IN_COS: - case BUILT_IN_COSF: - case BUILT_IN_COSL: + CASE_FLT_FN (BUILT_IN_SIN): + CASE_FLT_FN (BUILT_IN_COS): builtin_optab = sincos_optab; break; default: gcc_unreachable (); @@ -2137,21 +2084,14 @@ expand_builtin_mathfn_3 (tree exp, rtx target, rtx subtarget) /* Make a suitable register to place result in. */ mode = TYPE_MODE (TREE_TYPE (exp)); - if (! flag_errno_math || ! HONOR_NANS (mode)) - errno_set = false; - /* Check if sincos insn is available, otherwise fallback to sin or cos insn. */ if (builtin_optab->handlers[(int) mode].insn_code == CODE_FOR_nothing) { switch (DECL_FUNCTION_CODE (fndecl)) { - case BUILT_IN_SIN: - case BUILT_IN_SINF: - case BUILT_IN_SINL: + CASE_FLT_FN (BUILT_IN_SIN): builtin_optab = sin_optab; break; - case BUILT_IN_COS: - case BUILT_IN_COSF: - case BUILT_IN_COSL: + CASE_FLT_FN (BUILT_IN_COS): builtin_optab = cos_optab; break; default: gcc_unreachable (); @@ -2186,14 +2126,10 @@ expand_builtin_mathfn_3 (tree exp, rtx target, rtx subtarget) switch (DECL_FUNCTION_CODE (fndecl)) { - case BUILT_IN_SIN: - case BUILT_IN_SINF: - case BUILT_IN_SINL: + CASE_FLT_FN (BUILT_IN_SIN): result = expand_twoval_unop (builtin_optab, op0, 0, target, 0); break; - case BUILT_IN_COS: - case BUILT_IN_COSF: - case BUILT_IN_COSL: + CASE_FLT_FN (BUILT_IN_COS): result = expand_twoval_unop (builtin_optab, op0, target, 0, 0); break; default: @@ -2208,9 +2144,6 @@ expand_builtin_mathfn_3 (tree exp, rtx target, rtx subtarget) if (target != 0) { - if (errno_set) - expand_errno_check (exp, target); - /* Output the entire sequence. */ insns = get_insns (); end_sequence (); @@ -2229,6 +2162,55 @@ expand_builtin_mathfn_3 (tree exp, rtx target, rtx subtarget) return target; } +/* Expand a call to the builtin sincos math function. + Return 0 if a normal call should be emitted rather than expanding the + function in-line. EXP is the expression that is a call to the builtin + function. */ + +static rtx +expand_builtin_sincos (tree exp) +{ + rtx op0, op1, op2, target1, target2; + tree arglist = TREE_OPERAND (exp, 1); + enum machine_mode mode; + tree arg, sinp, cosp; + int result; + + if (!validate_arglist (arglist, REAL_TYPE, + POINTER_TYPE, POINTER_TYPE, VOID_TYPE)) + return 0; + + arg = TREE_VALUE (arglist); + sinp = TREE_VALUE (TREE_CHAIN (arglist)); + cosp = TREE_VALUE (TREE_CHAIN (TREE_CHAIN (arglist))); + + /* Make a suitable register to place result in. */ + mode = TYPE_MODE (TREE_TYPE (arg)); + + /* Check if sincos insn is available, otherwise emit the call. */ + if (sincos_optab->handlers[(int) mode].insn_code == CODE_FOR_nothing) + return NULL_RTX; + + target1 = gen_reg_rtx (mode); + target2 = gen_reg_rtx (mode); + + op0 = expand_expr (arg, NULL_RTX, VOIDmode, 0); + op1 = expand_expr (build_fold_indirect_ref (sinp), NULL_RTX, VOIDmode, 0); + op2 = expand_expr (build_fold_indirect_ref (cosp), NULL_RTX, VOIDmode, 0); + + /* Compute into target1 and target2. + Set TARGET to wherever the result comes back. */ + result = expand_twoval_unop (sincos_optab, op0, target2, target1, 0); + gcc_assert (result); + + /* Move target1 and target2 to the memory locations indicated + by op1 and op2. */ + emit_move_insn (op1, target1); + emit_move_insn (op2, target2); + + return const0_rtx; +} + /* Expand a call to one of the builtin rounding functions (lfloor). If expanding via optab fails, lower expression to (int)(floor(x)). EXP is the expression that is a call to the builtin function; @@ -2254,22 +2236,14 @@ expand_builtin_int_roundingfn (tree exp, rtx target, rtx subtarget) switch (DECL_FUNCTION_CODE (fndecl)) { - case BUILT_IN_LCEIL: - case BUILT_IN_LCEILF: - case BUILT_IN_LCEILL: - case BUILT_IN_LLCEIL: - case BUILT_IN_LLCEILF: - case BUILT_IN_LLCEILL: + CASE_FLT_FN (BUILT_IN_LCEIL): + CASE_FLT_FN (BUILT_IN_LLCEIL): builtin_optab = lceil_optab; fallback_fn = BUILT_IN_CEIL; break; - case BUILT_IN_LFLOOR: - case BUILT_IN_LFLOORF: - case BUILT_IN_LFLOORL: - case BUILT_IN_LLFLOOR: - case BUILT_IN_LLFLOORF: - case BUILT_IN_LLFLOORL: + CASE_FLT_FN (BUILT_IN_LFLOOR): + CASE_FLT_FN (BUILT_IN_LLFLOOR): builtin_optab = lfloor_optab; fallback_fn = BUILT_IN_FLOOR; break; @@ -4231,7 +4205,8 @@ std_gimplify_va_arg_expr (tree valist, tree type, tree *pre_p, tree *post_p) /* va_list pointer is aligned to PARM_BOUNDARY. If argument actually requires greater alignment, we must perform dynamic alignment. */ - if (boundary > align) + if (boundary > align + && !integer_zerop (TYPE_SIZE (type))) { t = fold_convert (TREE_TYPE (valist), size_int (boundary - 1)); t = build2 (MODIFY_EXPR, TREE_TYPE (valist), valist_tmp, @@ -4843,11 +4818,12 @@ expand_builtin_printf (tree exp, rtx target, enum machine_mode mode, bool unlocked) { tree arglist = TREE_OPERAND (exp, 1); - tree fn_putchar = unlocked - ? implicit_built_in_decls[BUILT_IN_PUTCHAR_UNLOCKED] - : implicit_built_in_decls[BUILT_IN_PUTCHAR]; - tree fn_puts = unlocked ? implicit_built_in_decls[BUILT_IN_PUTS_UNLOCKED] - : implicit_built_in_decls[BUILT_IN_PUTS]; + /* If we're using an unlocked function, assume the other unlocked + functions exist explicitly. */ + tree const fn_putchar = unlocked ? built_in_decls[BUILT_IN_PUTCHAR_UNLOCKED] + : implicit_built_in_decls[BUILT_IN_PUTCHAR]; + tree const fn_puts = unlocked ? built_in_decls[BUILT_IN_PUTS_UNLOCKED] + : implicit_built_in_decls[BUILT_IN_PUTS]; const char *fmt_str; tree fn, fmt, arg; @@ -4868,8 +4844,11 @@ expand_builtin_printf (tree exp, rtx target, enum machine_mode mode, if (fmt_str == NULL) return 0; + if (!init_target_chars()) + return 0; + /* If the format specifier was "%s\n", call __builtin_puts(arg). */ - if (strcmp (fmt_str, "%s\n") == 0) + if (strcmp (fmt_str, target_percent_s_newline) == 0) { if (! arglist || ! POINTER_TYPE_P (TREE_TYPE (TREE_VALUE (arglist))) @@ -4878,7 +4857,7 @@ expand_builtin_printf (tree exp, rtx target, enum machine_mode mode, fn = fn_puts; } /* If the format specifier was "%c", call __builtin_putchar(arg). */ - else if (strcmp (fmt_str, "%c") == 0) + else if (strcmp (fmt_str, target_percent_c) == 0) { if (! arglist || TREE_CODE (TREE_TYPE (TREE_VALUE (arglist))) != INTEGER_TYPE @@ -4889,7 +4868,7 @@ expand_builtin_printf (tree exp, rtx target, enum machine_mode mode, else { /* We can't handle anything else with % args or %% ... yet. */ - if (strchr (fmt_str, '%')) + if (strchr (fmt_str, target_percent)) return 0; if (arglist) @@ -4912,7 +4891,7 @@ expand_builtin_printf (tree exp, rtx target, enum machine_mode mode, { /* If the format specifier was "string\n", call puts("string"). */ size_t len = strlen (fmt_str); - if (fmt_str[len - 1] == '\n') + if ((unsigned char)fmt_str[len - 1] == target_newline) { /* Create a NUL-terminated string that's one char shorter than the original, stripping off the trailing '\n'. */ @@ -4949,10 +4928,12 @@ expand_builtin_fprintf (tree exp, rtx target, enum machine_mode mode, bool unlocked) { tree arglist = TREE_OPERAND (exp, 1); - tree fn_fputc = unlocked ? implicit_built_in_decls[BUILT_IN_FPUTC_UNLOCKED] - : implicit_built_in_decls[BUILT_IN_FPUTC]; - tree fn_fputs = unlocked ? implicit_built_in_decls[BUILT_IN_FPUTS_UNLOCKED] - : implicit_built_in_decls[BUILT_IN_FPUTS]; + /* If we're using an unlocked function, assume the other unlocked + functions exist explicitly. */ + tree const fn_fputc = unlocked ? built_in_decls[BUILT_IN_FPUTC_UNLOCKED] + : implicit_built_in_decls[BUILT_IN_FPUTC]; + tree const fn_fputs = unlocked ? built_in_decls[BUILT_IN_FPUTS_UNLOCKED] + : implicit_built_in_decls[BUILT_IN_FPUTS]; const char *fmt_str; tree fn, fmt, fp, arg; @@ -4979,8 +4960,11 @@ expand_builtin_fprintf (tree exp, rtx target, enum machine_mode mode, if (fmt_str == NULL) return 0; + if (!init_target_chars()) + return 0; + /* If the format specifier was "%s", call __builtin_fputs(arg,fp). */ - if (strcmp (fmt_str, "%s") == 0) + if (strcmp (fmt_str, target_percent_s) == 0) { if (! arglist || ! POINTER_TYPE_P (TREE_TYPE (TREE_VALUE (arglist))) @@ -4992,7 +4976,7 @@ expand_builtin_fprintf (tree exp, rtx target, enum machine_mode mode, fn = fn_fputs; } /* If the format specifier was "%c", call __builtin_fputc(arg,fp). */ - else if (strcmp (fmt_str, "%c") == 0) + else if (strcmp (fmt_str, target_percent_c) == 0) { if (! arglist || TREE_CODE (TREE_TYPE (TREE_VALUE (arglist))) != INTEGER_TYPE @@ -5006,7 +4990,7 @@ expand_builtin_fprintf (tree exp, rtx target, enum machine_mode mode, else { /* We can't handle anything else with % args or %% ... yet. */ - if (strchr (fmt_str, '%')) + if (strchr (fmt_str, target_percent)) return 0; if (arglist) @@ -5068,8 +5052,11 @@ expand_builtin_sprintf (tree arglist, rtx target, enum machine_mode mode) if (fmt_str == NULL) return 0; + if (!init_target_chars()) + return 0; + /* If the format doesn't contain % args or %%, use strcpy. */ - if (strchr (fmt_str, '%') == 0) + if (strchr (fmt_str, target_percent) == 0) { tree fn = implicit_built_in_decls[BUILT_IN_STRCPY]; tree exp; @@ -5084,7 +5071,7 @@ expand_builtin_sprintf (tree arglist, rtx target, enum machine_mode mode) return expand_expr (exp, target, mode, EXPAND_NORMAL); } /* If the format is "%s", use strcpy if the result isn't used. */ - else if (strcmp (fmt_str, "%s") == 0) + else if (strcmp (fmt_str, target_percent_s) == 0) { tree fn, arg, len; fn = implicit_built_in_decls[BUILT_IN_STRCPY]; @@ -5404,6 +5391,27 @@ get_builtin_sync_mode (int fcode_diff) return mode_for_size (BITS_PER_UNIT << fcode_diff, MODE_INT, 0); } +/* Expand the memory expression LOC and return the appropriate memory operand + for the builtin_sync operations. */ + +static rtx +get_builtin_sync_mem (tree loc, enum machine_mode mode) +{ + rtx addr, mem; + + addr = expand_expr (loc, NULL, Pmode, EXPAND_SUM); + + /* Note that we explicitly do not want any alias information for this + memory, so that we kill all other live memories. Otherwise we don't + satisfy the full barrier semantics of the intrinsic. */ + mem = validize_mem (gen_rtx_MEM (mode, addr)); + + set_mem_align (mem, get_pointer_alignment (loc, BIGGEST_ALIGNMENT)); + MEM_VOLATILE_P (mem) = 1; + + return mem; +} + /* Expand the __sync_xxx_and_fetch and __sync_fetch_and_xxx intrinsics. ARGLIST is the operands list to the function. CODE is the rtx code that corresponds to the arithmetic or logical operation from the name; @@ -5417,20 +5425,14 @@ expand_builtin_sync_operation (enum machine_mode mode, tree arglist, enum rtx_code code, bool after, rtx target, bool ignore) { - rtx addr, val, mem; + rtx val, mem; /* Expand the operands. */ - addr = expand_expr (TREE_VALUE (arglist), NULL, Pmode, EXPAND_SUM); + mem = get_builtin_sync_mem (TREE_VALUE (arglist), mode); arglist = TREE_CHAIN (arglist); val = expand_expr (TREE_VALUE (arglist), NULL, mode, EXPAND_NORMAL); - /* Note that we explicitly do not want any alias information for this - memory, so that we kill all other live memories. Otherwise we don't - satisfy the full barrier semantics of the intrinsic. */ - mem = validize_mem (gen_rtx_MEM (mode, addr)); - MEM_VOLATILE_P (mem) = 1; - if (ignore) return expand_sync_operation (mem, val, code); else @@ -5446,10 +5448,10 @@ static rtx expand_builtin_compare_and_swap (enum machine_mode mode, tree arglist, bool is_bool, rtx target) { - rtx addr, old_val, new_val, mem; + rtx old_val, new_val, mem; /* Expand the operands. */ - addr = expand_expr (TREE_VALUE (arglist), NULL, Pmode, EXPAND_SUM); + mem = get_builtin_sync_mem (TREE_VALUE (arglist), mode); arglist = TREE_CHAIN (arglist); old_val = expand_expr (TREE_VALUE (arglist), NULL, mode, EXPAND_NORMAL); @@ -5457,12 +5459,6 @@ expand_builtin_compare_and_swap (enum machine_mode mode, tree arglist, arglist = TREE_CHAIN (arglist); new_val = expand_expr (TREE_VALUE (arglist), NULL, mode, EXPAND_NORMAL); - /* Note that we explicitly do not want any alias information for this - memory, so that we kill all other live memories. Otherwise we don't - satisfy the full barrier semantics of the intrinsic. */ - mem = validize_mem (gen_rtx_MEM (mode, addr)); - MEM_VOLATILE_P (mem) = 1; - if (is_bool) return expand_bool_compare_and_swap (mem, old_val, new_val, target); else @@ -5479,20 +5475,14 @@ static rtx expand_builtin_lock_test_and_set (enum machine_mode mode, tree arglist, rtx target) { - rtx addr, val, mem; + rtx val, mem; /* Expand the operands. */ - addr = expand_expr (TREE_VALUE (arglist), NULL, Pmode, EXPAND_NORMAL); + mem = get_builtin_sync_mem (TREE_VALUE (arglist), mode); arglist = TREE_CHAIN (arglist); val = expand_expr (TREE_VALUE (arglist), NULL, mode, EXPAND_NORMAL); - /* Note that we explicitly do not want any alias information for this - memory, so that we kill all other live memories. Otherwise we don't - satisfy the barrier semantics of the intrinsic. */ - mem = validize_mem (gen_rtx_MEM (mode, addr)); - MEM_VOLATILE_P (mem) = 1; - return expand_sync_lock_test_and_set (mem, val, target); } @@ -5526,17 +5516,11 @@ static void expand_builtin_lock_release (enum machine_mode mode, tree arglist) { enum insn_code icode; - rtx addr, mem, insn; + rtx mem, insn; rtx val = const0_rtx; /* Expand the operands. */ - addr = expand_expr (TREE_VALUE (arglist), NULL, Pmode, EXPAND_NORMAL); - - /* Note that we explicitly do not want any alias information for this - memory, so that we kill all other live memories. Otherwise we don't - satisfy the barrier semantics of the intrinsic. */ - mem = validize_mem (gen_rtx_MEM (mode, addr)); - MEM_VOLATILE_P (mem) = 1; + mem = get_builtin_sync_mem (TREE_VALUE (arglist), mode); /* If there is an explicit operation in the md file, use it. */ icode = sync_lock_release[mode]; @@ -5617,17 +5601,13 @@ expand_builtin (tree exp, rtx target, rtx subtarget, enum machine_mode mode, switch (fcode) { - case BUILT_IN_FABS: - case BUILT_IN_FABSF: - case BUILT_IN_FABSL: + CASE_FLT_FN (BUILT_IN_FABS): target = expand_builtin_fabs (arglist, target, subtarget); if (target) return target; break; - case BUILT_IN_COPYSIGN: - case BUILT_IN_COPYSIGNF: - case BUILT_IN_COPYSIGNL: + CASE_FLT_FN (BUILT_IN_COPYSIGN): target = expand_builtin_copysign (arglist, target, subtarget); if (target) return target; @@ -5635,137 +5615,67 @@ expand_builtin (tree exp, rtx target, rtx subtarget, enum machine_mode mode, /* Just do a normal library call if we were unable to fold the values. */ - case BUILT_IN_CABS: - case BUILT_IN_CABSF: - case BUILT_IN_CABSL: + CASE_FLT_FN (BUILT_IN_CABS): break; - case BUILT_IN_EXP: - case BUILT_IN_EXPF: - case BUILT_IN_EXPL: - case BUILT_IN_EXP10: - case BUILT_IN_EXP10F: - case BUILT_IN_EXP10L: - case BUILT_IN_POW10: - case BUILT_IN_POW10F: - case BUILT_IN_POW10L: - case BUILT_IN_EXP2: - case BUILT_IN_EXP2F: - case BUILT_IN_EXP2L: - case BUILT_IN_EXPM1: - case BUILT_IN_EXPM1F: - case BUILT_IN_EXPM1L: - case BUILT_IN_LOGB: - case BUILT_IN_LOGBF: - case BUILT_IN_LOGBL: - case BUILT_IN_ILOGB: - case BUILT_IN_ILOGBF: - case BUILT_IN_ILOGBL: - case BUILT_IN_LOG: - case BUILT_IN_LOGF: - case BUILT_IN_LOGL: - case BUILT_IN_LOG10: - case BUILT_IN_LOG10F: - case BUILT_IN_LOG10L: - case BUILT_IN_LOG2: - case BUILT_IN_LOG2F: - case BUILT_IN_LOG2L: - case BUILT_IN_LOG1P: - case BUILT_IN_LOG1PF: - case BUILT_IN_LOG1PL: - case BUILT_IN_TAN: - case BUILT_IN_TANF: - case BUILT_IN_TANL: - case BUILT_IN_ASIN: - case BUILT_IN_ASINF: - case BUILT_IN_ASINL: - case BUILT_IN_ACOS: - case BUILT_IN_ACOSF: - case BUILT_IN_ACOSL: - case BUILT_IN_ATAN: - case BUILT_IN_ATANF: - case BUILT_IN_ATANL: + CASE_FLT_FN (BUILT_IN_EXP): + CASE_FLT_FN (BUILT_IN_EXP10): + CASE_FLT_FN (BUILT_IN_POW10): + CASE_FLT_FN (BUILT_IN_EXP2): + CASE_FLT_FN (BUILT_IN_EXPM1): + CASE_FLT_FN (BUILT_IN_LOGB): + CASE_FLT_FN (BUILT_IN_ILOGB): + CASE_FLT_FN (BUILT_IN_LOG): + CASE_FLT_FN (BUILT_IN_LOG10): + CASE_FLT_FN (BUILT_IN_LOG2): + CASE_FLT_FN (BUILT_IN_LOG1P): + CASE_FLT_FN (BUILT_IN_TAN): + CASE_FLT_FN (BUILT_IN_ASIN): + CASE_FLT_FN (BUILT_IN_ACOS): + CASE_FLT_FN (BUILT_IN_ATAN): /* Treat these like sqrt only if unsafe math optimizations are allowed, because of possible accuracy problems. */ if (! flag_unsafe_math_optimizations) break; - case BUILT_IN_SQRT: - case BUILT_IN_SQRTF: - case BUILT_IN_SQRTL: - case BUILT_IN_FLOOR: - case BUILT_IN_FLOORF: - case BUILT_IN_FLOORL: - case BUILT_IN_CEIL: - case BUILT_IN_CEILF: - case BUILT_IN_CEILL: - case BUILT_IN_TRUNC: - case BUILT_IN_TRUNCF: - case BUILT_IN_TRUNCL: - case BUILT_IN_ROUND: - case BUILT_IN_ROUNDF: - case BUILT_IN_ROUNDL: - case BUILT_IN_NEARBYINT: - case BUILT_IN_NEARBYINTF: - case BUILT_IN_NEARBYINTL: - case BUILT_IN_RINT: - case BUILT_IN_RINTF: - case BUILT_IN_RINTL: - case BUILT_IN_LRINT: - case BUILT_IN_LRINTF: - case BUILT_IN_LRINTL: - case BUILT_IN_LLRINT: - case BUILT_IN_LLRINTF: - case BUILT_IN_LLRINTL: + CASE_FLT_FN (BUILT_IN_SQRT): + CASE_FLT_FN (BUILT_IN_FLOOR): + CASE_FLT_FN (BUILT_IN_CEIL): + CASE_FLT_FN (BUILT_IN_TRUNC): + CASE_FLT_FN (BUILT_IN_ROUND): + CASE_FLT_FN (BUILT_IN_NEARBYINT): + CASE_FLT_FN (BUILT_IN_RINT): + CASE_FLT_FN (BUILT_IN_LRINT): + CASE_FLT_FN (BUILT_IN_LLRINT): target = expand_builtin_mathfn (exp, target, subtarget); if (target) return target; break; - case BUILT_IN_LCEIL: - case BUILT_IN_LCEILF: - case BUILT_IN_LCEILL: - case BUILT_IN_LLCEIL: - case BUILT_IN_LLCEILF: - case BUILT_IN_LLCEILL: - case BUILT_IN_LFLOOR: - case BUILT_IN_LFLOORF: - case BUILT_IN_LFLOORL: - case BUILT_IN_LLFLOOR: - case BUILT_IN_LLFLOORF: - case BUILT_IN_LLFLOORL: + CASE_FLT_FN (BUILT_IN_LCEIL): + CASE_FLT_FN (BUILT_IN_LLCEIL): + CASE_FLT_FN (BUILT_IN_LFLOOR): + CASE_FLT_FN (BUILT_IN_LLFLOOR): target = expand_builtin_int_roundingfn (exp, target, subtarget); if (target) return target; break; - case BUILT_IN_POW: - case BUILT_IN_POWF: - case BUILT_IN_POWL: + CASE_FLT_FN (BUILT_IN_POW): target = expand_builtin_pow (exp, target, subtarget); if (target) return target; break; - case BUILT_IN_POWI: - case BUILT_IN_POWIF: - case BUILT_IN_POWIL: + CASE_FLT_FN (BUILT_IN_POWI): target = expand_builtin_powi (exp, target, subtarget); if (target) return target; break; - case BUILT_IN_ATAN2: - case BUILT_IN_ATAN2F: - case BUILT_IN_ATAN2L: - case BUILT_IN_LDEXP: - case BUILT_IN_LDEXPF: - case BUILT_IN_LDEXPL: - case BUILT_IN_FMOD: - case BUILT_IN_FMODF: - case BUILT_IN_FMODL: - case BUILT_IN_DREM: - case BUILT_IN_DREMF: - case BUILT_IN_DREML: + CASE_FLT_FN (BUILT_IN_ATAN2): + CASE_FLT_FN (BUILT_IN_LDEXP): + CASE_FLT_FN (BUILT_IN_FMOD): + CASE_FLT_FN (BUILT_IN_DREM): if (! flag_unsafe_math_optimizations) break; target = expand_builtin_mathfn_2 (exp, target, subtarget); @@ -5773,12 +5683,8 @@ expand_builtin (tree exp, rtx target, rtx subtarget, enum machine_mode mode, return target; break; - case BUILT_IN_SIN: - case BUILT_IN_SINF: - case BUILT_IN_SINL: - case BUILT_IN_COS: - case BUILT_IN_COSF: - case BUILT_IN_COSL: + CASE_FLT_FN (BUILT_IN_SIN): + CASE_FLT_FN (BUILT_IN_COS): if (! flag_unsafe_math_optimizations) break; target = expand_builtin_mathfn_3 (exp, target, subtarget); @@ -5786,6 +5692,14 @@ expand_builtin (tree exp, rtx target, rtx subtarget, enum machine_mode mode, return target; break; + CASE_FLT_FN (BUILT_IN_SINCOS): + if (! flag_unsafe_math_optimizations) + break; + target = expand_builtin_sincos (exp); + if (target) + return target; + break; + case BUILT_IN_APPLY_ARGS: return expand_builtin_apply_args (); @@ -5871,9 +5785,7 @@ expand_builtin (tree exp, rtx target, rtx subtarget, enum machine_mode mode, expand_stack_restore (TREE_VALUE (arglist)); return const0_rtx; - case BUILT_IN_FFS: - case BUILT_IN_FFSL: - case BUILT_IN_FFSLL: + CASE_INT_FN (BUILT_IN_FFS): case BUILT_IN_FFSIMAX: target = expand_builtin_unop (target_mode, arglist, target, subtarget, ffs_optab); @@ -5881,9 +5793,7 @@ expand_builtin (tree exp, rtx target, rtx subtarget, enum machine_mode mode, return target; break; - case BUILT_IN_CLZ: - case BUILT_IN_CLZL: - case BUILT_IN_CLZLL: + CASE_INT_FN (BUILT_IN_CLZ): case BUILT_IN_CLZIMAX: target = expand_builtin_unop (target_mode, arglist, target, subtarget, clz_optab); @@ -5891,9 +5801,7 @@ expand_builtin (tree exp, rtx target, rtx subtarget, enum machine_mode mode, return target; break; - case BUILT_IN_CTZ: - case BUILT_IN_CTZL: - case BUILT_IN_CTZLL: + CASE_INT_FN (BUILT_IN_CTZ): case BUILT_IN_CTZIMAX: target = expand_builtin_unop (target_mode, arglist, target, subtarget, ctz_optab); @@ -5901,9 +5809,7 @@ expand_builtin (tree exp, rtx target, rtx subtarget, enum machine_mode mode, return target; break; - case BUILT_IN_POPCOUNT: - case BUILT_IN_POPCOUNTL: - case BUILT_IN_POPCOUNTLL: + CASE_INT_FN (BUILT_IN_POPCOUNT): case BUILT_IN_POPCOUNTIMAX: target = expand_builtin_unop (target_mode, arglist, target, subtarget, popcount_optab); @@ -5911,9 +5817,7 @@ expand_builtin (tree exp, rtx target, rtx subtarget, enum machine_mode mode, return target; break; - case BUILT_IN_PARITY: - case BUILT_IN_PARITYL: - case BUILT_IN_PARITYLL: + CASE_INT_FN (BUILT_IN_PARITY): case BUILT_IN_PARITYIMAX: target = expand_builtin_unop (target_mode, arglist, target, subtarget, parity_optab); @@ -6144,9 +6048,7 @@ expand_builtin (tree exp, rtx target, rtx subtarget, enum machine_mode mode, return target; break; - case BUILT_IN_SIGNBIT: - case BUILT_IN_SIGNBITF: - case BUILT_IN_SIGNBITL: + CASE_FLT_FN (BUILT_IN_SIGNBIT): target = expand_builtin_signbit (exp, target); if (target) return target; @@ -6219,6 +6121,7 @@ expand_builtin (tree exp, rtx target, rtx subtarget, enum machine_mode mode, case BUILT_IN_FETCH_AND_ADD_2: case BUILT_IN_FETCH_AND_ADD_4: case BUILT_IN_FETCH_AND_ADD_8: + case BUILT_IN_FETCH_AND_ADD_16: mode = get_builtin_sync_mode (fcode - BUILT_IN_FETCH_AND_ADD_1); target = expand_builtin_sync_operation (mode, arglist, PLUS, false, target, ignore); @@ -6230,6 +6133,7 @@ expand_builtin (tree exp, rtx target, rtx subtarget, enum machine_mode mode, case BUILT_IN_FETCH_AND_SUB_2: case BUILT_IN_FETCH_AND_SUB_4: case BUILT_IN_FETCH_AND_SUB_8: + case BUILT_IN_FETCH_AND_SUB_16: mode = get_builtin_sync_mode (fcode - BUILT_IN_FETCH_AND_SUB_1); target = expand_builtin_sync_operation (mode, arglist, MINUS, false, target, ignore); @@ -6241,6 +6145,7 @@ expand_builtin (tree exp, rtx target, rtx subtarget, enum machine_mode mode, case BUILT_IN_FETCH_AND_OR_2: case BUILT_IN_FETCH_AND_OR_4: case BUILT_IN_FETCH_AND_OR_8: + case BUILT_IN_FETCH_AND_OR_16: mode = get_builtin_sync_mode (fcode - BUILT_IN_FETCH_AND_OR_1); target = expand_builtin_sync_operation (mode, arglist, IOR, false, target, ignore); @@ -6252,6 +6157,7 @@ expand_builtin (tree exp, rtx target, rtx subtarget, enum machine_mode mode, case BUILT_IN_FETCH_AND_AND_2: case BUILT_IN_FETCH_AND_AND_4: case BUILT_IN_FETCH_AND_AND_8: + case BUILT_IN_FETCH_AND_AND_16: mode = get_builtin_sync_mode (fcode - BUILT_IN_FETCH_AND_AND_1); target = expand_builtin_sync_operation (mode, arglist, AND, false, target, ignore); @@ -6263,6 +6169,7 @@ expand_builtin (tree exp, rtx target, rtx subtarget, enum machine_mode mode, case BUILT_IN_FETCH_AND_XOR_2: case BUILT_IN_FETCH_AND_XOR_4: case BUILT_IN_FETCH_AND_XOR_8: + case BUILT_IN_FETCH_AND_XOR_16: mode = get_builtin_sync_mode (fcode - BUILT_IN_FETCH_AND_XOR_1); target = expand_builtin_sync_operation (mode, arglist, XOR, false, target, ignore); @@ -6274,6 +6181,7 @@ expand_builtin (tree exp, rtx target, rtx subtarget, enum machine_mode mode, case BUILT_IN_FETCH_AND_NAND_2: case BUILT_IN_FETCH_AND_NAND_4: case BUILT_IN_FETCH_AND_NAND_8: + case BUILT_IN_FETCH_AND_NAND_16: mode = get_builtin_sync_mode (fcode - BUILT_IN_FETCH_AND_NAND_1); target = expand_builtin_sync_operation (mode, arglist, NOT, false, target, ignore); @@ -6285,6 +6193,7 @@ expand_builtin (tree exp, rtx target, rtx subtarget, enum machine_mode mode, case BUILT_IN_ADD_AND_FETCH_2: case BUILT_IN_ADD_AND_FETCH_4: case BUILT_IN_ADD_AND_FETCH_8: + case BUILT_IN_ADD_AND_FETCH_16: mode = get_builtin_sync_mode (fcode - BUILT_IN_ADD_AND_FETCH_1); target = expand_builtin_sync_operation (mode, arglist, PLUS, true, target, ignore); @@ -6296,6 +6205,7 @@ expand_builtin (tree exp, rtx target, rtx subtarget, enum machine_mode mode, case BUILT_IN_SUB_AND_FETCH_2: case BUILT_IN_SUB_AND_FETCH_4: case BUILT_IN_SUB_AND_FETCH_8: + case BUILT_IN_SUB_AND_FETCH_16: mode = get_builtin_sync_mode (fcode - BUILT_IN_SUB_AND_FETCH_1); target = expand_builtin_sync_operation (mode, arglist, MINUS, true, target, ignore); @@ -6307,6 +6217,7 @@ expand_builtin (tree exp, rtx target, rtx subtarget, enum machine_mode mode, case BUILT_IN_OR_AND_FETCH_2: case BUILT_IN_OR_AND_FETCH_4: case BUILT_IN_OR_AND_FETCH_8: + case BUILT_IN_OR_AND_FETCH_16: mode = get_builtin_sync_mode (fcode - BUILT_IN_OR_AND_FETCH_1); target = expand_builtin_sync_operation (mode, arglist, IOR, true, target, ignore); @@ -6318,6 +6229,7 @@ expand_builtin (tree exp, rtx target, rtx subtarget, enum machine_mode mode, case BUILT_IN_AND_AND_FETCH_2: case BUILT_IN_AND_AND_FETCH_4: case BUILT_IN_AND_AND_FETCH_8: + case BUILT_IN_AND_AND_FETCH_16: mode = get_builtin_sync_mode (fcode - BUILT_IN_AND_AND_FETCH_1); target = expand_builtin_sync_operation (mode, arglist, AND, true, target, ignore); @@ -6329,6 +6241,7 @@ expand_builtin (tree exp, rtx target, rtx subtarget, enum machine_mode mode, case BUILT_IN_XOR_AND_FETCH_2: case BUILT_IN_XOR_AND_FETCH_4: case BUILT_IN_XOR_AND_FETCH_8: + case BUILT_IN_XOR_AND_FETCH_16: mode = get_builtin_sync_mode (fcode - BUILT_IN_XOR_AND_FETCH_1); target = expand_builtin_sync_operation (mode, arglist, XOR, true, target, ignore); @@ -6340,6 +6253,7 @@ expand_builtin (tree exp, rtx target, rtx subtarget, enum machine_mode mode, case BUILT_IN_NAND_AND_FETCH_2: case BUILT_IN_NAND_AND_FETCH_4: case BUILT_IN_NAND_AND_FETCH_8: + case BUILT_IN_NAND_AND_FETCH_16: mode = get_builtin_sync_mode (fcode - BUILT_IN_NAND_AND_FETCH_1); target = expand_builtin_sync_operation (mode, arglist, NOT, true, target, ignore); @@ -6351,6 +6265,7 @@ expand_builtin (tree exp, rtx target, rtx subtarget, enum machine_mode mode, case BUILT_IN_BOOL_COMPARE_AND_SWAP_2: case BUILT_IN_BOOL_COMPARE_AND_SWAP_4: case BUILT_IN_BOOL_COMPARE_AND_SWAP_8: + case BUILT_IN_BOOL_COMPARE_AND_SWAP_16: if (mode == VOIDmode) mode = TYPE_MODE (boolean_type_node); if (!target || !register_operand (target, mode)) @@ -6366,6 +6281,7 @@ expand_builtin (tree exp, rtx target, rtx subtarget, enum machine_mode mode, case BUILT_IN_VAL_COMPARE_AND_SWAP_2: case BUILT_IN_VAL_COMPARE_AND_SWAP_4: case BUILT_IN_VAL_COMPARE_AND_SWAP_8: + case BUILT_IN_VAL_COMPARE_AND_SWAP_16: mode = get_builtin_sync_mode (fcode - BUILT_IN_VAL_COMPARE_AND_SWAP_1); target = expand_builtin_compare_and_swap (mode, arglist, false, target); if (target) @@ -6376,6 +6292,7 @@ expand_builtin (tree exp, rtx target, rtx subtarget, enum machine_mode mode, case BUILT_IN_LOCK_TEST_AND_SET_2: case BUILT_IN_LOCK_TEST_AND_SET_4: case BUILT_IN_LOCK_TEST_AND_SET_8: + case BUILT_IN_LOCK_TEST_AND_SET_16: mode = get_builtin_sync_mode (fcode - BUILT_IN_LOCK_TEST_AND_SET_1); target = expand_builtin_lock_test_and_set (mode, arglist, target); if (target) @@ -6386,6 +6303,7 @@ expand_builtin (tree exp, rtx target, rtx subtarget, enum machine_mode mode, case BUILT_IN_LOCK_RELEASE_2: case BUILT_IN_LOCK_RELEASE_4: case BUILT_IN_LOCK_RELEASE_8: + case BUILT_IN_LOCK_RELEASE_16: mode = get_builtin_sync_mode (fcode - BUILT_IN_LOCK_RELEASE_1); expand_builtin_lock_release (mode, arglist); return const0_rtx; @@ -6719,24 +6637,12 @@ integer_valued_real_p (tree t) case CALL_EXPR: switch (builtin_mathfn_code (t)) { - case BUILT_IN_CEIL: - case BUILT_IN_CEILF: - case BUILT_IN_CEILL: - case BUILT_IN_FLOOR: - case BUILT_IN_FLOORF: - case BUILT_IN_FLOORL: - case BUILT_IN_NEARBYINT: - case BUILT_IN_NEARBYINTF: - case BUILT_IN_NEARBYINTL: - case BUILT_IN_RINT: - case BUILT_IN_RINTF: - case BUILT_IN_RINTL: - case BUILT_IN_ROUND: - case BUILT_IN_ROUNDF: - case BUILT_IN_ROUNDL: - case BUILT_IN_TRUNC: - case BUILT_IN_TRUNCF: - case BUILT_IN_TRUNCL: + CASE_FLT_FN (BUILT_IN_CEIL): + CASE_FLT_FN (BUILT_IN_FLOOR): + CASE_FLT_FN (BUILT_IN_NEARBYINT): + CASE_FLT_FN (BUILT_IN_RINT): + CASE_FLT_FN (BUILT_IN_ROUND): + CASE_FLT_FN (BUILT_IN_TRUNC): return true; default: @@ -7327,30 +7233,18 @@ fold_builtin_int_roundingfn (tree fndecl, tree arglist) switch (DECL_FUNCTION_CODE (fndecl)) { - case BUILT_IN_LFLOOR: - case BUILT_IN_LFLOORF: - case BUILT_IN_LFLOORL: - case BUILT_IN_LLFLOOR: - case BUILT_IN_LLFLOORF: - case BUILT_IN_LLFLOORL: + CASE_FLT_FN (BUILT_IN_LFLOOR): + CASE_FLT_FN (BUILT_IN_LLFLOOR): real_floor (&r, TYPE_MODE (ftype), &x); break; - case BUILT_IN_LCEIL: - case BUILT_IN_LCEILF: - case BUILT_IN_LCEILL: - case BUILT_IN_LLCEIL: - case BUILT_IN_LLCEILF: - case BUILT_IN_LLCEILL: + CASE_FLT_FN (BUILT_IN_LCEIL): + CASE_FLT_FN (BUILT_IN_LLCEIL): real_ceil (&r, TYPE_MODE (ftype), &x); break; - case BUILT_IN_LROUND: - case BUILT_IN_LROUNDF: - case BUILT_IN_LROUNDL: - case BUILT_IN_LLROUND: - case BUILT_IN_LLROUNDF: - case BUILT_IN_LLROUNDL: + CASE_FLT_FN (BUILT_IN_LROUND): + CASE_FLT_FN (BUILT_IN_LLROUND): real_round (&r, TYPE_MODE (ftype), &x); break; @@ -7408,9 +7302,7 @@ fold_builtin_bitop (tree fndecl, tree arglist) switch (DECL_FUNCTION_CODE (fndecl)) { - case BUILT_IN_FFS: - case BUILT_IN_FFSL: - case BUILT_IN_FFSLL: + CASE_INT_FN (BUILT_IN_FFS): if (lo != 0) result = exact_log2 (lo & -lo) + 1; else if (hi != 0) @@ -7419,9 +7311,7 @@ fold_builtin_bitop (tree fndecl, tree arglist) result = 0; break; - case BUILT_IN_CLZ: - case BUILT_IN_CLZL: - case BUILT_IN_CLZLL: + CASE_INT_FN (BUILT_IN_CLZ): if (hi != 0) result = width - floor_log2 (hi) - 1 - HOST_BITS_PER_WIDE_INT; else if (lo != 0) @@ -7430,9 +7320,7 @@ fold_builtin_bitop (tree fndecl, tree arglist) result = width; break; - case BUILT_IN_CTZ: - case BUILT_IN_CTZL: - case BUILT_IN_CTZLL: + CASE_INT_FN (BUILT_IN_CTZ): if (lo != 0) result = exact_log2 (lo & -lo); else if (hi != 0) @@ -7441,9 +7329,7 @@ fold_builtin_bitop (tree fndecl, tree arglist) result = width; break; - case BUILT_IN_POPCOUNT: - case BUILT_IN_POPCOUNTL: - case BUILT_IN_POPCOUNTLL: + CASE_INT_FN (BUILT_IN_POPCOUNT): result = 0; while (lo) result++, lo &= lo - 1; @@ -7451,9 +7337,7 @@ fold_builtin_bitop (tree fndecl, tree arglist) result++, hi &= hi - 1; break; - case BUILT_IN_PARITY: - case BUILT_IN_PARITYL: - case BUILT_IN_PARITYLL: + CASE_INT_FN (BUILT_IN_PARITY): result = 0; while (lo) result++, lo &= lo - 1; @@ -7538,49 +7422,35 @@ fold_builtin_logarithm (tree fndecl, tree arglist, switch (fcode) { - case BUILT_IN_EXP: - case BUILT_IN_EXPF: - case BUILT_IN_EXPL: + CASE_FLT_FN (BUILT_IN_EXP): /* Prepare to do logN(exp(exponent) -> exponent*logN(e). */ x = build_real (type, real_value_truncate (TYPE_MODE (type), dconste)); exponent = TREE_VALUE (TREE_OPERAND (arg, 1)); break; - case BUILT_IN_EXP2: - case BUILT_IN_EXP2F: - case BUILT_IN_EXP2L: + CASE_FLT_FN (BUILT_IN_EXP2): /* Prepare to do logN(exp2(exponent) -> exponent*logN(2). */ x = build_real (type, dconst2); exponent = TREE_VALUE (TREE_OPERAND (arg, 1)); break; - case BUILT_IN_EXP10: - case BUILT_IN_EXP10F: - case BUILT_IN_EXP10L: - case BUILT_IN_POW10: - case BUILT_IN_POW10F: - case BUILT_IN_POW10L: + CASE_FLT_FN (BUILT_IN_EXP10): + CASE_FLT_FN (BUILT_IN_POW10): /* Prepare to do logN(exp10(exponent) -> exponent*logN(10). */ x = build_real (type, dconst10); exponent = TREE_VALUE (TREE_OPERAND (arg, 1)); break; - case BUILT_IN_SQRT: - case BUILT_IN_SQRTF: - case BUILT_IN_SQRTL: + CASE_FLT_FN (BUILT_IN_SQRT): /* Prepare to do logN(sqrt(x) -> 0.5*logN(x). */ x = TREE_VALUE (TREE_OPERAND (arg, 1)); exponent = build_real (type, dconsthalf); break; - case BUILT_IN_CBRT: - case BUILT_IN_CBRTF: - case BUILT_IN_CBRTL: + CASE_FLT_FN (BUILT_IN_CBRT): /* Prepare to do logN(cbrt(x) -> (1/3)*logN(x). */ x = TREE_VALUE (TREE_OPERAND (arg, 1)); exponent = build_real (type, real_value_truncate (TYPE_MODE (type), dconstthird)); break; - case BUILT_IN_POW: - case BUILT_IN_POWF: - case BUILT_IN_POWL: + CASE_FLT_FN (BUILT_IN_POW): /* Prepare to do logN(pow(x,exponent) -> exponent*logN(x). */ x = TREE_VALUE (TREE_OPERAND (arg, 1)); exponent = TREE_VALUE (TREE_CHAIN (TREE_OPERAND (arg, 1))); @@ -8715,9 +8585,7 @@ fold_builtin_1 (tree fndecl, tree arglist, bool ignore) case BUILT_IN_STRLEN: return fold_builtin_strlen (arglist); - case BUILT_IN_FABS: - case BUILT_IN_FABSF: - case BUILT_IN_FABSL: + CASE_FLT_FN (BUILT_IN_FABS): return fold_builtin_fabs (arglist, type); case BUILT_IN_ABS: @@ -8726,198 +8594,120 @@ fold_builtin_1 (tree fndecl, tree arglist, bool ignore) case BUILT_IN_IMAXABS: return fold_builtin_abs (arglist, type); - case BUILT_IN_CONJ: - case BUILT_IN_CONJF: - case BUILT_IN_CONJL: + CASE_FLT_FN (BUILT_IN_CONJ): if (validate_arglist (arglist, COMPLEX_TYPE, VOID_TYPE)) return fold_build1 (CONJ_EXPR, type, TREE_VALUE (arglist)); break; - case BUILT_IN_CREAL: - case BUILT_IN_CREALF: - case BUILT_IN_CREALL: + CASE_FLT_FN (BUILT_IN_CREAL): if (validate_arglist (arglist, COMPLEX_TYPE, VOID_TYPE)) return non_lvalue (fold_build1 (REALPART_EXPR, type, TREE_VALUE (arglist))); break; - case BUILT_IN_CIMAG: - case BUILT_IN_CIMAGF: - case BUILT_IN_CIMAGL: + CASE_FLT_FN (BUILT_IN_CIMAG): if (validate_arglist (arglist, COMPLEX_TYPE, VOID_TYPE)) return non_lvalue (fold_build1 (IMAGPART_EXPR, type, TREE_VALUE (arglist))); break; - case BUILT_IN_CABS: - case BUILT_IN_CABSF: - case BUILT_IN_CABSL: + CASE_FLT_FN (BUILT_IN_CABS): return fold_builtin_cabs (arglist, type); - case BUILT_IN_SQRT: - case BUILT_IN_SQRTF: - case BUILT_IN_SQRTL: + CASE_FLT_FN (BUILT_IN_SQRT): return fold_builtin_sqrt (arglist, type); - case BUILT_IN_CBRT: - case BUILT_IN_CBRTF: - case BUILT_IN_CBRTL: + CASE_FLT_FN (BUILT_IN_CBRT): return fold_builtin_cbrt (arglist, type); - case BUILT_IN_SIN: - case BUILT_IN_SINF: - case BUILT_IN_SINL: + CASE_FLT_FN (BUILT_IN_SIN): return fold_builtin_sin (arglist); - case BUILT_IN_COS: - case BUILT_IN_COSF: - case BUILT_IN_COSL: + CASE_FLT_FN (BUILT_IN_COS): return fold_builtin_cos (arglist, type, fndecl); - case BUILT_IN_EXP: - case BUILT_IN_EXPF: - case BUILT_IN_EXPL: + CASE_FLT_FN (BUILT_IN_EXP): return fold_builtin_exponent (fndecl, arglist, &dconste); - case BUILT_IN_EXP2: - case BUILT_IN_EXP2F: - case BUILT_IN_EXP2L: + CASE_FLT_FN (BUILT_IN_EXP2): return fold_builtin_exponent (fndecl, arglist, &dconst2); - case BUILT_IN_EXP10: - case BUILT_IN_EXP10F: - case BUILT_IN_EXP10L: - case BUILT_IN_POW10: - case BUILT_IN_POW10F: - case BUILT_IN_POW10L: + CASE_FLT_FN (BUILT_IN_EXP10): + CASE_FLT_FN (BUILT_IN_POW10): return fold_builtin_exponent (fndecl, arglist, &dconst10); - case BUILT_IN_LOG: - case BUILT_IN_LOGF: - case BUILT_IN_LOGL: + CASE_FLT_FN (BUILT_IN_LOG): return fold_builtin_logarithm (fndecl, arglist, &dconste); - case BUILT_IN_LOG2: - case BUILT_IN_LOG2F: - case BUILT_IN_LOG2L: + CASE_FLT_FN (BUILT_IN_LOG2): return fold_builtin_logarithm (fndecl, arglist, &dconst2); - case BUILT_IN_LOG10: - case BUILT_IN_LOG10F: - case BUILT_IN_LOG10L: + CASE_FLT_FN (BUILT_IN_LOG10): return fold_builtin_logarithm (fndecl, arglist, &dconst10); - case BUILT_IN_TAN: - case BUILT_IN_TANF: - case BUILT_IN_TANL: + CASE_FLT_FN (BUILT_IN_TAN): return fold_builtin_tan (arglist); - case BUILT_IN_ATAN: - case BUILT_IN_ATANF: - case BUILT_IN_ATANL: + CASE_FLT_FN (BUILT_IN_ATAN): return fold_builtin_atan (arglist, type); - case BUILT_IN_POW: - case BUILT_IN_POWF: - case BUILT_IN_POWL: + CASE_FLT_FN (BUILT_IN_POW): return fold_builtin_pow (fndecl, arglist, type); - case BUILT_IN_POWI: - case BUILT_IN_POWIF: - case BUILT_IN_POWIL: + CASE_FLT_FN (BUILT_IN_POWI): return fold_builtin_powi (fndecl, arglist, type); - case BUILT_IN_INF: - case BUILT_IN_INFF: - case BUILT_IN_INFL: + CASE_FLT_FN (BUILT_IN_INF): + case BUILT_IN_INFD32: + case BUILT_IN_INFD64: + case BUILT_IN_INFD128: return fold_builtin_inf (type, true); - case BUILT_IN_HUGE_VAL: - case BUILT_IN_HUGE_VALF: - case BUILT_IN_HUGE_VALL: + CASE_FLT_FN (BUILT_IN_HUGE_VAL): return fold_builtin_inf (type, false); - case BUILT_IN_NAN: - case BUILT_IN_NANF: - case BUILT_IN_NANL: + CASE_FLT_FN (BUILT_IN_NAN): + case BUILT_IN_NAND32: + case BUILT_IN_NAND64: + case BUILT_IN_NAND128: return fold_builtin_nan (arglist, type, true); - case BUILT_IN_NANS: - case BUILT_IN_NANSF: - case BUILT_IN_NANSL: + CASE_FLT_FN (BUILT_IN_NANS): return fold_builtin_nan (arglist, type, false); - case BUILT_IN_FLOOR: - case BUILT_IN_FLOORF: - case BUILT_IN_FLOORL: + CASE_FLT_FN (BUILT_IN_FLOOR): return fold_builtin_floor (fndecl, arglist); - case BUILT_IN_CEIL: - case BUILT_IN_CEILF: - case BUILT_IN_CEILL: + CASE_FLT_FN (BUILT_IN_CEIL): return fold_builtin_ceil (fndecl, arglist); - case BUILT_IN_TRUNC: - case BUILT_IN_TRUNCF: - case BUILT_IN_TRUNCL: + CASE_FLT_FN (BUILT_IN_TRUNC): return fold_builtin_trunc (fndecl, arglist); - case BUILT_IN_ROUND: - case BUILT_IN_ROUNDF: - case BUILT_IN_ROUNDL: + CASE_FLT_FN (BUILT_IN_ROUND): return fold_builtin_round (fndecl, arglist); - case BUILT_IN_NEARBYINT: - case BUILT_IN_NEARBYINTF: - case BUILT_IN_NEARBYINTL: - case BUILT_IN_RINT: - case BUILT_IN_RINTF: - case BUILT_IN_RINTL: + CASE_FLT_FN (BUILT_IN_NEARBYINT): + CASE_FLT_FN (BUILT_IN_RINT): return fold_trunc_transparent_mathfn (fndecl, arglist); - case BUILT_IN_LCEIL: - case BUILT_IN_LCEILF: - case BUILT_IN_LCEILL: - case BUILT_IN_LLCEIL: - case BUILT_IN_LLCEILF: - case BUILT_IN_LLCEILL: - case BUILT_IN_LFLOOR: - case BUILT_IN_LFLOORF: - case BUILT_IN_LFLOORL: - case BUILT_IN_LLFLOOR: - case BUILT_IN_LLFLOORF: - case BUILT_IN_LLFLOORL: - case BUILT_IN_LROUND: - case BUILT_IN_LROUNDF: - case BUILT_IN_LROUNDL: - case BUILT_IN_LLROUND: - case BUILT_IN_LLROUNDF: - case BUILT_IN_LLROUNDL: + CASE_FLT_FN (BUILT_IN_LCEIL): + CASE_FLT_FN (BUILT_IN_LLCEIL): + CASE_FLT_FN (BUILT_IN_LFLOOR): + CASE_FLT_FN (BUILT_IN_LLFLOOR): + CASE_FLT_FN (BUILT_IN_LROUND): + CASE_FLT_FN (BUILT_IN_LLROUND): return fold_builtin_int_roundingfn (fndecl, arglist); - case BUILT_IN_LRINT: - case BUILT_IN_LRINTF: - case BUILT_IN_LRINTL: - case BUILT_IN_LLRINT: - case BUILT_IN_LLRINTF: - case BUILT_IN_LLRINTL: + CASE_FLT_FN (BUILT_IN_LRINT): + CASE_FLT_FN (BUILT_IN_LLRINT): return fold_fixed_mathfn (fndecl, arglist); - case BUILT_IN_FFS: - case BUILT_IN_FFSL: - case BUILT_IN_FFSLL: - case BUILT_IN_CLZ: - case BUILT_IN_CLZL: - case BUILT_IN_CLZLL: - case BUILT_IN_CTZ: - case BUILT_IN_CTZL: - case BUILT_IN_CTZLL: - case BUILT_IN_POPCOUNT: - case BUILT_IN_POPCOUNTL: - case BUILT_IN_POPCOUNTLL: - case BUILT_IN_PARITY: - case BUILT_IN_PARITYL: - case BUILT_IN_PARITYLL: + CASE_INT_FN (BUILT_IN_FFS): + CASE_INT_FN (BUILT_IN_CLZ): + CASE_INT_FN (BUILT_IN_CTZ): + CASE_INT_FN (BUILT_IN_POPCOUNT): + CASE_INT_FN (BUILT_IN_PARITY): return fold_builtin_bitop (fndecl, arglist); case BUILT_IN_MEMCPY: @@ -8929,9 +8719,7 @@ fold_builtin_1 (tree fndecl, tree arglist, bool ignore) case BUILT_IN_MEMMOVE: return fold_builtin_memmove (arglist, type); - case BUILT_IN_SIGNBIT: - case BUILT_IN_SIGNBITF: - case BUILT_IN_SIGNBITL: + CASE_FLT_FN (BUILT_IN_SIGNBIT): return fold_builtin_signbit (fndecl, arglist); case BUILT_IN_ISASCII: @@ -8943,24 +8731,25 @@ fold_builtin_1 (tree fndecl, tree arglist, bool ignore) case BUILT_IN_ISDIGIT: return fold_builtin_isdigit (arglist); - case BUILT_IN_COPYSIGN: - case BUILT_IN_COPYSIGNF: - case BUILT_IN_COPYSIGNL: + CASE_FLT_FN (BUILT_IN_COPYSIGN): return fold_builtin_copysign (fndecl, arglist, type); - case BUILT_IN_FINITE: - case BUILT_IN_FINITEF: - case BUILT_IN_FINITEL: + CASE_FLT_FN (BUILT_IN_FINITE): + case BUILT_IN_FINITED32: + case BUILT_IN_FINITED64: + case BUILT_IN_FINITED128: return fold_builtin_classify (fndecl, arglist, BUILT_IN_FINITE); - case BUILT_IN_ISINF: - case BUILT_IN_ISINFF: - case BUILT_IN_ISINFL: + CASE_FLT_FN (BUILT_IN_ISINF): + case BUILT_IN_ISINFD32: + case BUILT_IN_ISINFD64: + case BUILT_IN_ISINFD128: return fold_builtin_classify (fndecl, arglist, BUILT_IN_ISINF); - case BUILT_IN_ISNAN: - case BUILT_IN_ISNANF: - case BUILT_IN_ISNANL: + CASE_FLT_FN (BUILT_IN_ISNAN): + case BUILT_IN_ISNAND32: + case BUILT_IN_ISNAND64: + case BUILT_IN_ISNAND128: return fold_builtin_classify (fndecl, arglist, BUILT_IN_ISNAN); case BUILT_IN_ISGREATER: @@ -9611,14 +9400,15 @@ tree fold_builtin_fputs (tree arglist, bool ignore, bool unlocked, tree len) { tree fn; - tree fn_fputc = unlocked ? implicit_built_in_decls[BUILT_IN_FPUTC_UNLOCKED] + /* If we're using an unlocked function, assume the other unlocked + functions exist explicitly. */ + tree const fn_fputc = unlocked ? built_in_decls[BUILT_IN_FPUTC_UNLOCKED] : implicit_built_in_decls[BUILT_IN_FPUTC]; - tree fn_fwrite = unlocked ? implicit_built_in_decls[BUILT_IN_FWRITE_UNLOCKED] + tree const fn_fwrite = unlocked ? built_in_decls[BUILT_IN_FWRITE_UNLOCKED] : implicit_built_in_decls[BUILT_IN_FWRITE]; - /* If the return value is used, or the replacement _DECL isn't - initialized, don't do the transformation. */ - if (!ignore || !fn_fputc || !fn_fwrite) + /* If the return value is used, don't do the transformation. */ + if (!ignore) return 0; /* Verify the arguments in the original call. */ @@ -9680,6 +9470,11 @@ fold_builtin_fputs (tree arglist, bool ignore, bool unlocked, tree len) gcc_unreachable (); } + /* If the replacement _DECL isn't initialized, don't do the + transformation. */ + if (!fn) + return 0; + /* These optimizations are only performed when the result is ignored, hence there's no need to cast the result to integer_type_node. */ return build_function_call_expr (fn, arglist); @@ -9785,8 +9580,11 @@ fold_builtin_sprintf (tree arglist, int ignored) call = NULL_TREE; retval = NULL_TREE; + if (!init_target_chars()) + return 0; + /* If the format doesn't contain % args or %%, use strcpy. */ - if (strchr (fmt_str, '%') == NULL) + if (strchr (fmt_str, target_percent) == NULL) { tree fn = implicit_built_in_decls[BUILT_IN_STRCPY]; @@ -9803,7 +9601,7 @@ fold_builtin_sprintf (tree arglist, int ignored) } /* If the format is "%s", use strcpy if the result isn't used. */ - else if (fmt_str && strcmp (fmt_str, "%s") == 0) + else if (fmt_str && strcmp (fmt_str, target_percent_s) == 0) { tree fn, orig; fn = implicit_built_in_decls[BUILT_IN_STRCPY]; @@ -10100,12 +9898,15 @@ maybe_emit_sprintf_chk_warning (tree exp, enum built_in_function fcode) if (fmt_str == NULL) return; + if (!init_target_chars()) + return; + /* If the format doesn't contain % args or %%, we know its size. */ - if (strchr (fmt_str, '%') == 0) + if (strchr (fmt_str, target_percent) == 0) len = build_int_cstu (size_type_node, strlen (fmt_str)); /* If the format is "%s" and first ... argument is a string literal, we know it too. */ - else if (fcode == BUILT_IN_SPRINTF_CHK && strcmp (fmt_str, "%s") == 0) + else if (fcode == BUILT_IN_SPRINTF_CHK && strcmp (fmt_str, target_percent_s) == 0) { tree arg; @@ -10560,19 +10361,22 @@ fold_builtin_sprintf_chk (tree arglist, enum built_in_function fcode) len = NULL_TREE; + if (!init_target_chars()) + return 0; + /* Check whether the format is a literal string constant. */ fmt_str = c_getstr (fmt); if (fmt_str != NULL) { /* If the format doesn't contain % args or %%, we know the size. */ - if (strchr (fmt_str, '%') == 0) + if (strchr (fmt_str, target_percent) == 0) { if (fcode != BUILT_IN_SPRINTF_CHK || arglist == NULL_TREE) len = build_int_cstu (size_type_node, strlen (fmt_str)); } /* If the format is "%s" and first ... argument is a string literal, we know the size too. */ - else if (fcode == BUILT_IN_SPRINTF_CHK && strcmp (fmt_str, "%s") == 0) + else if (fcode == BUILT_IN_SPRINTF_CHK && strcmp (fmt_str, target_percent_s) == 0) { tree arg; @@ -10601,7 +10405,7 @@ fold_builtin_sprintf_chk (tree arglist, enum built_in_function fcode) { if (fmt_str == NULL) return 0; - if (strchr (fmt_str, '%') != NULL && strcmp (fmt_str, "%s")) + if (strchr (fmt_str, target_percent) != NULL && strcmp (fmt_str, target_percent_s)) return 0; } @@ -10682,6 +10486,9 @@ fold_builtin_snprintf_chk (tree arglist, tree maxlen, return 0; } + if (!init_target_chars()) + return 0; + /* Only convert __{,v}snprintf_chk to {,v}snprintf if flag is 0 or if format doesn't contain % chars or is "%s". */ if (! integer_zerop (flag)) @@ -10689,7 +10496,7 @@ fold_builtin_snprintf_chk (tree arglist, tree maxlen, fmt_str = c_getstr (fmt); if (fmt_str == NULL) return 0; - if (strchr (fmt_str, '%') != NULL && strcmp (fmt_str, "%s")) + if (strchr (fmt_str, target_percent) != NULL && strcmp (fmt_str, target_percent_s)) return 0; } @@ -10752,8 +10559,10 @@ fold_builtin_printf (tree fndecl, tree arglist, bool ignore, if (fcode == BUILT_IN_PRINTF_UNLOCKED) { - fn_putchar = implicit_built_in_decls[BUILT_IN_PUTCHAR_UNLOCKED]; - fn_puts = implicit_built_in_decls[BUILT_IN_PUTS_UNLOCKED]; + /* If we're using an unlocked function, assume the other + unlocked functions exist explicitly. */ + fn_putchar = built_in_decls[BUILT_IN_PUTCHAR_UNLOCKED]; + fn_puts = built_in_decls[BUILT_IN_PUTS_UNLOCKED]; } else { @@ -10761,11 +10570,14 @@ fold_builtin_printf (tree fndecl, tree arglist, bool ignore, fn_puts = implicit_built_in_decls[BUILT_IN_PUTS]; } - if (strcmp (fmt_str, "%s") == 0 || strchr (fmt_str, '%') == NULL) + if (!init_target_chars()) + return 0; + + if (strcmp (fmt_str, target_percent_s) == 0 || strchr (fmt_str, target_percent) == NULL) { const char *str; - if (strcmp (fmt_str, "%s") == 0) + if (strcmp (fmt_str, target_percent_s) == 0) { if (fcode == BUILT_IN_VPRINTF || fcode == BUILT_IN_VPRINTF_CHK) return 0; @@ -10806,7 +10618,7 @@ fold_builtin_printf (tree fndecl, tree arglist, bool ignore, { /* If the string was "string\n", call puts("string"). */ size_t len = strlen (str); - if (str[len - 1] == '\n') + if ((unsigned char)str[len - 1] == target_newline) { /* Create a NUL-terminated string that's one char shorter than the original, stripping off the trailing '\n'. */ @@ -10830,7 +10642,7 @@ fold_builtin_printf (tree fndecl, tree arglist, bool ignore, return 0; /* If the format specifier was "%s\n", call __builtin_puts(arg). */ - else if (strcmp (fmt_str, "%s\n") == 0) + else if (strcmp (fmt_str, target_percent_s_newline) == 0) { if (! arglist || ! POINTER_TYPE_P (TREE_TYPE (TREE_VALUE (arglist))) @@ -10840,7 +10652,7 @@ fold_builtin_printf (tree fndecl, tree arglist, bool ignore, } /* If the format specifier was "%c", call __builtin_putchar(arg). */ - else if (strcmp (fmt_str, "%c") == 0) + else if (strcmp (fmt_str, target_percent_c) == 0) { if (! arglist || TREE_CODE (TREE_TYPE (TREE_VALUE (arglist))) != INTEGER_TYPE @@ -10908,8 +10720,10 @@ fold_builtin_fprintf (tree fndecl, tree arglist, bool ignore, if (fcode == BUILT_IN_FPRINTF_UNLOCKED) { - fn_fputc = implicit_built_in_decls[BUILT_IN_FPUTC_UNLOCKED]; - fn_fputs = implicit_built_in_decls[BUILT_IN_FPUTS_UNLOCKED]; + /* If we're using an unlocked function, assume the other + unlocked functions exist explicitly. */ + fn_fputc = built_in_decls[BUILT_IN_FPUTC_UNLOCKED]; + fn_fputs = built_in_decls[BUILT_IN_FPUTS_UNLOCKED]; } else { @@ -10917,8 +10731,11 @@ fold_builtin_fprintf (tree fndecl, tree arglist, bool ignore, fn_fputs = implicit_built_in_decls[BUILT_IN_FPUTS]; } + if (!init_target_chars()) + return 0; + /* If the format doesn't contain % args or %%, use strcpy. */ - if (strchr (fmt_str, '%') == NULL) + if (strchr (fmt_str, target_percent) == NULL) { if (fcode != BUILT_IN_VFPRINTF && fcode != BUILT_IN_VFPRINTF_CHK && arglist) @@ -10948,7 +10765,7 @@ fold_builtin_fprintf (tree fndecl, tree arglist, bool ignore, return 0; /* If the format specifier was "%s", call __builtin_fputs (arg, fp). */ - else if (strcmp (fmt_str, "%s") == 0) + else if (strcmp (fmt_str, target_percent_s) == 0) { if (! arglist || ! POINTER_TYPE_P (TREE_TYPE (TREE_VALUE (arglist))) @@ -10961,7 +10778,7 @@ fold_builtin_fprintf (tree fndecl, tree arglist, bool ignore, } /* If the format specifier was "%c", call __builtin_fputc (arg, fp). */ - else if (strcmp (fmt_str, "%c") == 0) + else if (strcmp (fmt_str, target_percent_c) == 0) { if (! arglist || TREE_CODE (TREE_TYPE (TREE_VALUE (arglist))) != INTEGER_TYPE @@ -10979,3 +10796,37 @@ fold_builtin_fprintf (tree fndecl, tree arglist, bool ignore, call = build_function_call_expr (fn, arglist); return fold_convert (TREE_TYPE (TREE_TYPE (fndecl)), call); } + +/* Initialize format string characters in the target charset. */ + +static bool +init_target_chars (void) +{ + static bool init; + if (!init) + { + target_newline = lang_hooks.to_target_charset ('\n'); + target_percent = lang_hooks.to_target_charset ('%'); + target_c = lang_hooks.to_target_charset ('c'); + target_s = lang_hooks.to_target_charset ('s'); + if (target_newline == 0 || target_percent == 0 || target_c == 0 + || target_s == 0) + return false; + + target_percent_c[0] = target_percent; + target_percent_c[1] = target_c; + target_percent_c[2] = '\0'; + + target_percent_s[0] = target_percent; + target_percent_s[1] = target_s; + target_percent_s[2] = '\0'; + + target_percent_s_newline[0] = target_percent; + target_percent_s_newline[1] = target_s; + target_percent_s_newline[2] = target_newline; + target_percent_s_newline[3] = '\0'; + + init = true; + } + return true; +} diff --git a/gcc/builtins.def b/gcc/builtins.def index e7b7a455546..d3563612237 100644 --- a/gcc/builtins.def +++ b/gcc/builtins.def @@ -261,6 +261,9 @@ DEF_C99_BUILTIN (BUILT_IN_ILOGBL, "ilogbl", BT_FN_INT_LONGDOUBLE, ATTR_MA DEF_GCC_BUILTIN (BUILT_IN_INF, "inf", BT_FN_DOUBLE, ATTR_CONST_NOTHROW_LIST) DEF_GCC_BUILTIN (BUILT_IN_INFF, "inff", BT_FN_FLOAT, ATTR_CONST_NOTHROW_LIST) DEF_GCC_BUILTIN (BUILT_IN_INFL, "infl", BT_FN_LONGDOUBLE, ATTR_CONST_NOTHROW_LIST) +DEF_GCC_BUILTIN (BUILT_IN_INFD32, "infd32", BT_FN_DFLOAT32, ATTR_CONST_NOTHROW_LIST) +DEF_GCC_BUILTIN (BUILT_IN_INFD64, "infd64", BT_FN_DFLOAT64, ATTR_CONST_NOTHROW_LIST) +DEF_GCC_BUILTIN (BUILT_IN_INFD128, "infd128", BT_FN_DFLOAT128, ATTR_CONST_NOTHROW_LIST) DEF_EXT_LIB_BUILTIN (BUILT_IN_J0, "j0", BT_FN_DOUBLE_DOUBLE, ATTR_MATHFN_FPROUNDING_ERRNO) DEF_EXT_LIB_BUILTIN (BUILT_IN_J0F, "j0f", BT_FN_FLOAT_FLOAT, ATTR_MATHFN_FPROUNDING_ERRNO) DEF_EXT_LIB_BUILTIN (BUILT_IN_J0L, "j0l", BT_FN_LONGDOUBLE_LONGDOUBLE, ATTR_MATHFN_FPROUNDING_ERRNO) @@ -321,6 +324,9 @@ DEF_C99_C90RES_BUILTIN (BUILT_IN_MODFL, "modfl", BT_FN_LONGDOUBLE_LONGDOUBLE_LON DEF_GCC_BUILTIN (BUILT_IN_NAN, "nan", BT_FN_DOUBLE_CONST_STRING, ATTR_CONST_NOTHROW_NONNULL) DEF_GCC_BUILTIN (BUILT_IN_NANF, "nanf", BT_FN_FLOAT_CONST_STRING, ATTR_CONST_NOTHROW_NONNULL) DEF_GCC_BUILTIN (BUILT_IN_NANL, "nanl", BT_FN_LONGDOUBLE_CONST_STRING, ATTR_CONST_NOTHROW_NONNULL) +DEF_GCC_BUILTIN (BUILT_IN_NAND32, "nand32", BT_FN_DFLOAT32_CONST_STRING, ATTR_CONST_NOTHROW_NONNULL) +DEF_GCC_BUILTIN (BUILT_IN_NAND64, "nand64", BT_FN_DFLOAT64_CONST_STRING, ATTR_CONST_NOTHROW_NONNULL) +DEF_GCC_BUILTIN (BUILT_IN_NAND128, "nand128", BT_FN_DFLOAT128_CONST_STRING, ATTR_CONST_NOTHROW_NONNULL) DEF_GCC_BUILTIN (BUILT_IN_NANS, "nans", BT_FN_DOUBLE_CONST_STRING, ATTR_CONST_NOTHROW_NONNULL) DEF_GCC_BUILTIN (BUILT_IN_NANSF, "nansf", BT_FN_FLOAT_CONST_STRING, ATTR_CONST_NOTHROW_NONNULL) DEF_GCC_BUILTIN (BUILT_IN_NANSL, "nansl", BT_FN_LONGDOUBLE_CONST_STRING, ATTR_CONST_NOTHROW_NONNULL) @@ -510,6 +516,8 @@ DEF_LIB_BUILTIN (BUILT_IN_STRSTR, "strstr", BT_FN_STRING_CONST_STRING_CON /* Category: stdio builtins. */ DEF_LIB_BUILTIN (BUILT_IN_FPRINTF, "fprintf", BT_FN_INT_FILEPTR_CONST_STRING_VAR, ATTR_FORMAT_PRINTF_2_3) DEF_EXT_LIB_BUILTIN (BUILT_IN_FPRINTF_UNLOCKED, "fprintf_unlocked", BT_FN_INT_FILEPTR_CONST_STRING_VAR, ATTR_FORMAT_PRINTF_2_3) +DEF_LIB_BUILTIN (BUILT_IN_PUTC, "putc", BT_FN_INT_INT_FILEPTR, ATTR_NONNULL_LIST) +DEF_EXT_LIB_BUILTIN (BUILT_IN_PUTC_UNLOCKED, "putc_unlocked", BT_FN_INT_INT_FILEPTR, ATTR_NONNULL_LIST) DEF_LIB_BUILTIN (BUILT_IN_FPUTC, "fputc", BT_FN_INT_INT_FILEPTR, ATTR_NONNULL_LIST) DEF_EXT_LIB_BUILTIN (BUILT_IN_FPUTC_UNLOCKED, "fputc_unlocked", BT_FN_INT_INT_FILEPTR, ATTR_NONNULL_LIST) DEF_LIB_BUILTIN (BUILT_IN_FPUTS, "fputs", BT_FN_INT_CONST_STRING_FILEPTR, ATTR_NONNULL_LIST) @@ -617,12 +625,21 @@ DEF_GCC_BUILTIN (BUILT_IN_INIT_DWARF_REG_SIZES, "init_dwarf_reg_size_tabl DEF_EXT_LIB_BUILTIN (BUILT_IN_FINITE, "finite", BT_FN_INT_DOUBLE, ATTR_CONST_NOTHROW_LIST) DEF_EXT_LIB_BUILTIN (BUILT_IN_FINITEF, "finitef", BT_FN_INT_FLOAT, ATTR_CONST_NOTHROW_LIST) DEF_EXT_LIB_BUILTIN (BUILT_IN_FINITEL, "finitel", BT_FN_INT_LONGDOUBLE, ATTR_CONST_NOTHROW_LIST) +DEF_EXT_LIB_BUILTIN (BUILT_IN_FINITED32, "finited32", BT_FN_INT_DFLOAT32, ATTR_CONST_NOTHROW_LIST) +DEF_EXT_LIB_BUILTIN (BUILT_IN_FINITED64, "finited64", BT_FN_INT_DFLOAT64, ATTR_CONST_NOTHROW_LIST) +DEF_EXT_LIB_BUILTIN (BUILT_IN_FINITED128, "finited128", BT_FN_INT_DFLOAT128, ATTR_CONST_NOTHROW_LIST) DEF_C99_C90RES_BUILTIN (BUILT_IN_ISINF, "isinf", BT_FN_INT_VAR, ATTR_CONST_NOTHROW_LIST) DEF_EXT_LIB_BUILTIN (BUILT_IN_ISINFF, "isinff", BT_FN_INT_FLOAT, ATTR_CONST_NOTHROW_LIST) DEF_EXT_LIB_BUILTIN (BUILT_IN_ISINFL, "isinfl", BT_FN_INT_LONGDOUBLE, ATTR_CONST_NOTHROW_LIST) +DEF_EXT_LIB_BUILTIN (BUILT_IN_ISINFD32, "isinfd32", BT_FN_INT_DFLOAT32, ATTR_CONST_NOTHROW_LIST) +DEF_EXT_LIB_BUILTIN (BUILT_IN_ISINFD64, "isinfd64", BT_FN_INT_DFLOAT64, ATTR_CONST_NOTHROW_LIST) +DEF_EXT_LIB_BUILTIN (BUILT_IN_ISINFD128, "isinfd128", BT_FN_INT_DFLOAT128, ATTR_CONST_NOTHROW_LIST) DEF_C99_C90RES_BUILTIN (BUILT_IN_ISNAN, "isnan", BT_FN_INT_VAR, ATTR_CONST_NOTHROW_LIST) DEF_EXT_LIB_BUILTIN (BUILT_IN_ISNANF, "isnanf", BT_FN_INT_FLOAT, ATTR_CONST_NOTHROW_LIST) DEF_EXT_LIB_BUILTIN (BUILT_IN_ISNANL, "isnanl", BT_FN_INT_LONGDOUBLE, ATTR_CONST_NOTHROW_LIST) +DEF_EXT_LIB_BUILTIN (BUILT_IN_ISNAND32, "isnand32", BT_FN_INT_DFLOAT32, ATTR_CONST_NOTHROW_LIST) +DEF_EXT_LIB_BUILTIN (BUILT_IN_ISNAND64, "isnand64", BT_FN_INT_DFLOAT64, ATTR_CONST_NOTHROW_LIST) +DEF_EXT_LIB_BUILTIN (BUILT_IN_ISNAND128, "isnand128", BT_FN_INT_DFLOAT128, ATTR_CONST_NOTHROW_LIST) DEF_GCC_BUILTIN (BUILT_IN_ISGREATER, "isgreater", BT_FN_INT_VAR, ATTR_CONST_NOTHROW_LIST) DEF_GCC_BUILTIN (BUILT_IN_ISGREATEREQUAL, "isgreaterequal", BT_FN_INT_VAR, ATTR_CONST_NOTHROW_LIST) DEF_GCC_BUILTIN (BUILT_IN_ISLESS, "isless", BT_FN_INT_VAR, ATTR_CONST_NOTHROW_LIST) @@ -692,195 +709,5 @@ DEF_EXT_LIB_BUILTIN (BUILT_IN_VPRINTF_CHK, "__vprintf_chk", BT_FN_INT_INT_CON DEF_BUILTIN_STUB (BUILT_IN_PROFILE_FUNC_ENTER, "profile_func_enter") DEF_BUILTIN_STUB (BUILT_IN_PROFILE_FUNC_EXIT, "profile_func_exit") -/* Synchronization Primitives. The "_N" version is the one that the user - is supposed to be using. It's overloaded, and is resolved to one of the - "_1" through "_8" versions, plus some extra casts. */ - -DEF_SYNC_BUILTIN (BUILT_IN_FETCH_AND_ADD_N, "__sync_fetch_and_add", - BT_FN_VOID_VAR, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_FETCH_AND_ADD_1, "__sync_fetch_and_add_1", - BT_FN_I1_VPTR_I1, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_FETCH_AND_ADD_2, "__sync_fetch_and_add_2", - BT_FN_I2_VPTR_I2, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_FETCH_AND_ADD_4, "__sync_fetch_and_add_4", - BT_FN_I4_VPTR_I4, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_FETCH_AND_ADD_8, "__sync_fetch_and_add_8", - BT_FN_I8_VPTR_I8, ATTR_NOTHROW_LIST) - -DEF_SYNC_BUILTIN (BUILT_IN_FETCH_AND_SUB_N, "__sync_fetch_and_sub", - BT_FN_VOID_VAR, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_FETCH_AND_SUB_1, "__sync_fetch_and_sub_1", - BT_FN_I1_VPTR_I1, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_FETCH_AND_SUB_2, "__sync_fetch_and_sub_2", - BT_FN_I2_VPTR_I2, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_FETCH_AND_SUB_4, "__sync_fetch_and_sub_4", - BT_FN_I4_VPTR_I4, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_FETCH_AND_SUB_8, "__sync_fetch_and_sub_8", - BT_FN_I8_VPTR_I8, ATTR_NOTHROW_LIST) - -DEF_SYNC_BUILTIN (BUILT_IN_FETCH_AND_OR_N, "__sync_fetch_and_or", - BT_FN_VOID_VAR, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_FETCH_AND_OR_1, "__sync_fetch_and_or_1", - BT_FN_I1_VPTR_I1, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_FETCH_AND_OR_2, "__sync_fetch_and_or_2", - BT_FN_I2_VPTR_I2, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_FETCH_AND_OR_4, "__sync_fetch_and_or_4", - BT_FN_I4_VPTR_I4, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_FETCH_AND_OR_8, "__sync_fetch_and_or_8", - BT_FN_I8_VPTR_I8, ATTR_NOTHROW_LIST) - -DEF_SYNC_BUILTIN (BUILT_IN_FETCH_AND_AND_N, "__sync_fetch_and_and", - BT_FN_VOID_VAR, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_FETCH_AND_AND_1, "__sync_fetch_and_and_1", - BT_FN_I1_VPTR_I1, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_FETCH_AND_AND_2, "__sync_fetch_and_and_2", - BT_FN_I2_VPTR_I2, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_FETCH_AND_AND_4, "__sync_fetch_and_and_4", - BT_FN_I4_VPTR_I4, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_FETCH_AND_AND_8, "__sync_fetch_and_and_8", - BT_FN_I8_VPTR_I8, ATTR_NOTHROW_LIST) - -DEF_SYNC_BUILTIN (BUILT_IN_FETCH_AND_XOR_N, "__sync_fetch_and_xor", - BT_FN_VOID_VAR, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_FETCH_AND_XOR_1, "__sync_fetch_and_xor_1", - BT_FN_I1_VPTR_I1, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_FETCH_AND_XOR_2, "__sync_fetch_and_xor_2", - BT_FN_I2_VPTR_I2, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_FETCH_AND_XOR_4, "__sync_fetch_and_xor_4", - BT_FN_I4_VPTR_I4, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_FETCH_AND_XOR_8, "__sync_fetch_and_xor_8", - BT_FN_I8_VPTR_I8, ATTR_NOTHROW_LIST) - -DEF_SYNC_BUILTIN (BUILT_IN_FETCH_AND_NAND_N, "__sync_fetch_and_nand", - BT_FN_VOID_VAR, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_FETCH_AND_NAND_1, "__sync_fetch_and_nand_1", - BT_FN_I1_VPTR_I1, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_FETCH_AND_NAND_2, "__sync_fetch_and_nand_2", - BT_FN_I2_VPTR_I2, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_FETCH_AND_NAND_4, "__sync_fetch_and_nand_4", - BT_FN_I4_VPTR_I4, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_FETCH_AND_NAND_8, "__sync_fetch_and_nand_8", - BT_FN_I8_VPTR_I8, ATTR_NOTHROW_LIST) - -DEF_SYNC_BUILTIN (BUILT_IN_ADD_AND_FETCH_N, "__sync_add_and_fetch", - BT_FN_VOID_VAR, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_ADD_AND_FETCH_1, "__sync_add_and_fetch_1", - BT_FN_I1_VPTR_I1, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_ADD_AND_FETCH_2, "__sync_add_and_fetch_2", - BT_FN_I2_VPTR_I2, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_ADD_AND_FETCH_4, "__sync_add_and_fetch_4", - BT_FN_I4_VPTR_I4, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_ADD_AND_FETCH_8, "__sync_add_and_fetch_8", - BT_FN_I8_VPTR_I8, ATTR_NOTHROW_LIST) - -DEF_SYNC_BUILTIN (BUILT_IN_SUB_AND_FETCH_N, "__sync_sub_and_fetch", - BT_FN_VOID_VAR, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_SUB_AND_FETCH_1, "__sync_sub_and_fetch_1", - BT_FN_I1_VPTR_I1, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_SUB_AND_FETCH_2, "__sync_sub_and_fetch_2", - BT_FN_I2_VPTR_I2, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_SUB_AND_FETCH_4, "__sync_sub_and_fetch_4", - BT_FN_I4_VPTR_I4, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_SUB_AND_FETCH_8, "__sync_sub_and_fetch_8", - BT_FN_I8_VPTR_I8, ATTR_NOTHROW_LIST) - -DEF_SYNC_BUILTIN (BUILT_IN_OR_AND_FETCH_N, "__sync_or_and_fetch", - BT_FN_VOID_VAR, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_OR_AND_FETCH_1, "__sync_or_and_fetch_1", - BT_FN_I1_VPTR_I1, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_OR_AND_FETCH_2, "__sync_or_and_fetch_2", - BT_FN_I2_VPTR_I2, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_OR_AND_FETCH_4, "__sync_or_and_fetch_4", - BT_FN_I4_VPTR_I4, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_OR_AND_FETCH_8, "__sync_or_and_fetch_8", - BT_FN_I8_VPTR_I8, ATTR_NOTHROW_LIST) - -DEF_SYNC_BUILTIN (BUILT_IN_AND_AND_FETCH_N, "__sync_and_and_fetch", - BT_FN_VOID_VAR, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_AND_AND_FETCH_1, "__sync_and_and_fetch_1", - BT_FN_I1_VPTR_I1, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_AND_AND_FETCH_2, "__sync_and_and_fetch_2", - BT_FN_I2_VPTR_I2, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_AND_AND_FETCH_4, "__sync_and_and_fetch_4", - BT_FN_I4_VPTR_I4, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_AND_AND_FETCH_8, "__sync_and_and_fetch_8", - BT_FN_I8_VPTR_I8, ATTR_NOTHROW_LIST) - -DEF_SYNC_BUILTIN (BUILT_IN_XOR_AND_FETCH_N, "__sync_xor_and_fetch", - BT_FN_VOID_VAR, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_XOR_AND_FETCH_1, "__sync_xor_and_fetch_1", - BT_FN_I1_VPTR_I1, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_XOR_AND_FETCH_2, "__sync_xor_and_fetch_2", - BT_FN_I2_VPTR_I2, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_XOR_AND_FETCH_4, "__sync_xor_and_fetch_4", - BT_FN_I4_VPTR_I4, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_XOR_AND_FETCH_8, "__sync_xor_and_fetch_8", - BT_FN_I8_VPTR_I8, ATTR_NOTHROW_LIST) - -DEF_SYNC_BUILTIN (BUILT_IN_NAND_AND_FETCH_N, "__sync_nand_and_fetch", - BT_FN_VOID_VAR, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_NAND_AND_FETCH_1, "__sync_nand_and_fetch_1", - BT_FN_I1_VPTR_I1, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_NAND_AND_FETCH_2, "__sync_nand_and_fetch_2", - BT_FN_I2_VPTR_I2, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_NAND_AND_FETCH_4, "__sync_nand_and_fetch_4", - BT_FN_I4_VPTR_I4, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_NAND_AND_FETCH_8, "__sync_nand_and_fetch_8", - BT_FN_I8_VPTR_I8, ATTR_NOTHROW_LIST) - -DEF_SYNC_BUILTIN (BUILT_IN_BOOL_COMPARE_AND_SWAP_N, - "__sync_bool_compare_and_swap", - BT_FN_VOID_VAR, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_BOOL_COMPARE_AND_SWAP_1, - "__sync_bool_compare_and_swap_1", - BT_FN_BOOL_VPTR_I1_I1, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_BOOL_COMPARE_AND_SWAP_2, - "__sync_bool_compare_and_swap_2", - BT_FN_BOOL_VPTR_I2_I2, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_BOOL_COMPARE_AND_SWAP_4, - "__sync_bool_compare_and_swap_4", - BT_FN_BOOL_VPTR_I4_I4, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_BOOL_COMPARE_AND_SWAP_8, - "__sync_bool_compare_and_swap_8", - BT_FN_BOOL_VPTR_I8_I8, ATTR_NOTHROW_LIST) - -DEF_SYNC_BUILTIN (BUILT_IN_VAL_COMPARE_AND_SWAP_N, - "__sync_val_compare_and_swap", - BT_FN_VOID_VAR, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_VAL_COMPARE_AND_SWAP_1, - "__sync_val_compare_and_swap_1", - BT_FN_I1_VPTR_I1_I1, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_VAL_COMPARE_AND_SWAP_2, - "__sync_val_compare_and_swap_2", - BT_FN_I2_VPTR_I2_I2, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_VAL_COMPARE_AND_SWAP_4, - "__sync_val_compare_and_swap_4", - BT_FN_I4_VPTR_I4_I4, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_VAL_COMPARE_AND_SWAP_8, - "__sync_val_compare_and_swap_8", - BT_FN_I8_VPTR_I8_I8, ATTR_NOTHROW_LIST) - -DEF_SYNC_BUILTIN (BUILT_IN_LOCK_TEST_AND_SET_N, "__sync_lock_test_and_set", - BT_FN_VOID_VAR, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_LOCK_TEST_AND_SET_1, "__sync_lock_test_and_set_1", - BT_FN_I1_VPTR_I1, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_LOCK_TEST_AND_SET_2, "__sync_lock_test_and_set_2", - BT_FN_I2_VPTR_I2, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_LOCK_TEST_AND_SET_4, "__sync_lock_test_and_set_4", - BT_FN_I4_VPTR_I4, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_LOCK_TEST_AND_SET_8, "__sync_lock_test_and_set_8", - BT_FN_I8_VPTR_I8, ATTR_NOTHROW_LIST) - -DEF_SYNC_BUILTIN (BUILT_IN_LOCK_RELEASE_N, "__sync_lock_release", - BT_FN_VOID_VAR, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_LOCK_RELEASE_1, "__sync_lock_release_1", - BT_FN_VOID_VPTR, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_LOCK_RELEASE_2, "__sync_lock_release_2", - BT_FN_VOID_VPTR, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_LOCK_RELEASE_4, "__sync_lock_release_4", - BT_FN_VOID_VPTR, ATTR_NOTHROW_LIST) -DEF_SYNC_BUILTIN (BUILT_IN_LOCK_RELEASE_8, "__sync_lock_release_8", - BT_FN_VOID_VPTR, ATTR_NOTHROW_LIST) - -DEF_SYNC_BUILTIN (BUILT_IN_SYNCHRONIZE, "__sync_synchronize", - BT_FN_VOID, ATTR_NOTHROW_LIST) +/* Synchronization Primitives. */ +#include "sync-builtins.def" diff --git a/gcc/c-common.c b/gcc/c-common.c index 7b27ba06e4e..2a7c1e777d3 100644 --- a/gcc/c-common.c +++ b/gcc/c-common.c @@ -131,6 +131,10 @@ cpp_reader *parse_in; /* Declared in c-pragma.h. */ tree complex_double_type_node; tree complex_long_double_type_node; + tree dfloat32_type_node; + tree dfloat64_type_node; + tree_dfloat128_type_node; + tree intQI_type_node; tree intHI_type_node; tree intSI_type_node; @@ -954,6 +958,42 @@ unsigned_conversion_warning (tree result, tree operand) } } +/* Print a warning about casts that might indicate violation + of strict aliasing rules if -Wstrict-aliasing is used and + strict aliasing mode is in effect. otype is the original + TREE_TYPE of expr, and type the type we're casting to. */ + +void +strict_aliasing_warning(tree otype, tree type, tree expr) +{ + if (flag_strict_aliasing && warn_strict_aliasing + && POINTER_TYPE_P (type) && POINTER_TYPE_P (otype) + && TREE_CODE (expr) == ADDR_EXPR + && (DECL_P (TREE_OPERAND (expr, 0)) + || handled_component_p (TREE_OPERAND (expr, 0))) + && !VOID_TYPE_P (TREE_TYPE (type))) + { + /* Casting the address of an object to non void pointer. Warn + if the cast breaks type based aliasing. */ + if (!COMPLETE_TYPE_P (TREE_TYPE (type))) + warning (OPT_Wstrict_aliasing, "type-punning to incomplete type " + "might break strict-aliasing rules"); + else + { + HOST_WIDE_INT set1 = get_alias_set (TREE_TYPE (TREE_OPERAND (expr, 0))); + HOST_WIDE_INT set2 = get_alias_set (TREE_TYPE (type)); + + if (!alias_sets_conflict_p (set1, set2)) + warning (OPT_Wstrict_aliasing, "dereferencing type-punned " + "pointer will break strict-aliasing rules"); + else if (warn_strict_aliasing > 1 + && !alias_sets_might_conflict_p (set1, set2)) + warning (OPT_Wstrict_aliasing, "dereferencing type-punned " + "pointer might break strict-aliasing rules"); + } + } +} + /* Nonzero if constant C has a value that is permissible for type TYPE (an INTEGER_TYPE). */ @@ -1650,6 +1690,13 @@ c_common_type_for_mode (enum machine_mode mode, int unsignedp) return build_vector_type_for_mode (inner_type, mode); } + if (mode == TYPE_MODE (dfloat32_type_node)) + return dfloat32_type_node; + if (mode == TYPE_MODE (dfloat64_type_node)) + return dfloat64_type_node; + if (mode == TYPE_MODE (dfloat128_type_node)) + return dfloat128_type_node; + for (t = registered_builtin_types; t; t = TREE_CHAIN (t)) if (TYPE_MODE (TREE_VALUE (t)) == mode) return TREE_VALUE (t); @@ -1826,8 +1873,7 @@ min_precision (tree value, int unsignedp) } /* Print an error message for invalid operands to arith operation - CODE. NOP_EXPR is used as a special case (see - c_common_truthvalue_conversion). */ + CODE. */ void binary_op_error (enum tree_code code) @@ -1836,10 +1882,6 @@ binary_op_error (enum tree_code code) switch (code) { - case NOP_EXPR: - error ("invalid truth-value expression"); - return; - case PLUS_EXPR: opname = "+"; break; case MINUS_EXPR: @@ -2137,6 +2179,14 @@ shorten_compare (tree *op0_ptr, tree *op1_ptr, tree *restype_ptr, in the type of the operand that is not constant. TYPE is already properly set. */ } + + /* If either arg is decimal float and the other is float, find the + proper common type to use for comparison. */ + else if (real1 && real2 + && (DECIMAL_FLOAT_MODE_P (TYPE_MODE (TREE_TYPE (primop0))) + || DECIMAL_FLOAT_MODE_P (TYPE_MODE (TREE_TYPE (primop1))))) + type = common_type (TREE_TYPE (primop0), TREE_TYPE (primop1)); + else if (real1 && real2 && (TYPE_PRECISION (TREE_TYPE (primop0)) == TYPE_PRECISION (TREE_TYPE (primop1)))) @@ -2376,12 +2426,12 @@ c_common_truthvalue_conversion (tree expr) case ADDR_EXPR: { - if (TREE_CODE (TREE_OPERAND (expr, 0)) == FUNCTION_DECL + if (DECL_P (TREE_OPERAND (expr, 0)) && !DECL_WEAK (TREE_OPERAND (expr, 0))) { /* Common Ada/Pascal programmer's mistake. We always warn about this since it is so bad. */ - warning (0, "the address of %qD, will always evaluate as %", + warning (OPT_Walways_true, "the address of %qD, will always evaluate as %", TREE_OPERAND (expr, 0)); return truthvalue_true_node; } @@ -2431,13 +2481,12 @@ c_common_truthvalue_conversion (tree expr) c_common_truthvalue_conversion (TREE_OPERAND (expr, 2))); case CONVERT_EXPR: + case NOP_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)))) @@ -2837,7 +2886,7 @@ c_sizeof_or_alignof_type (tree type, bool is_sizeof, int complain) TYPE_IS_SIZETYPE means that certain things (like overflow) will never happen. However, this node should really have type `size_t', which is just a typedef for an ordinary integer type. */ - value = fold_build1 (NOP_EXPR, size_type_node, value); + value = fold_convert (size_type_node, value); gcc_assert (!TYPE_IS_SIZETYPE (TREE_TYPE (value))); return value; @@ -2872,7 +2921,7 @@ c_alignof_expr (tree expr) tree best = t; int bestalign = TYPE_ALIGN (TREE_TYPE (TREE_TYPE (t))); - while (TREE_CODE (t) == NOP_EXPR + while ((TREE_CODE (t) == NOP_EXPR || TREE_CODE (t) == CONVERT_EXPR) && TREE_CODE (TREE_TYPE (TREE_OPERAND (t, 0))) == POINTER_TYPE) { int thisalign; @@ -2887,7 +2936,7 @@ c_alignof_expr (tree expr) else return c_alignof (TREE_TYPE (expr)); - return fold_build1 (NOP_EXPR, size_type_node, t); + return fold_convert (size_type_node, t); } /* Handle C and C++ default attributes. */ @@ -2910,14 +2959,8 @@ static GTY(()) tree built_in_attributes[(int) ATTR_LAST]; static void c_init_attributes (void); -/* Build tree nodes and builtin functions common to both C and C++ language - frontends. */ - -void -c_common_nodes_and_builtins (void) +enum c_builtin_type { - enum builtin_type - { #define DEF_PRIMITIVE_TYPE(NAME, VALUE) NAME, #define DEF_FUNCTION_TYPE_0(NAME, RETURN) NAME, #define DEF_FUNCTION_TYPE_1(NAME, RETURN, ARG1) NAME, @@ -2925,8 +2968,8 @@ c_common_nodes_and_builtins (void) #define DEF_FUNCTION_TYPE_3(NAME, RETURN, ARG1, ARG2, ARG3) NAME, #define DEF_FUNCTION_TYPE_4(NAME, RETURN, ARG1, ARG2, ARG3, ARG4) NAME, #define DEF_FUNCTION_TYPE_5(NAME, RETURN, ARG1, ARG2, ARG3, ARG4, ARG5) NAME, -#define DEF_FUNCTION_TYPE_6(NAME, RETURN, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6) \ - NAME, +#define DEF_FUNCTION_TYPE_6(NAME, RETURN, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6) NAME, +#define DEF_FUNCTION_TYPE_7(NAME, RETURN, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6, ARG7) NAME, #define DEF_FUNCTION_TYPE_VAR_0(NAME, RETURN) NAME, #define DEF_FUNCTION_TYPE_VAR_1(NAME, RETURN, ARG1) NAME, #define DEF_FUNCTION_TYPE_VAR_2(NAME, RETURN, ARG1, ARG2) NAME, @@ -2944,6 +2987,7 @@ c_common_nodes_and_builtins (void) #undef DEF_FUNCTION_TYPE_4 #undef DEF_FUNCTION_TYPE_5 #undef DEF_FUNCTION_TYPE_6 +#undef DEF_FUNCTION_TYPE_7 #undef DEF_FUNCTION_TYPE_VAR_0 #undef DEF_FUNCTION_TYPE_VAR_1 #undef DEF_FUNCTION_TYPE_VAR_2 @@ -2951,12 +2995,61 @@ c_common_nodes_and_builtins (void) #undef DEF_FUNCTION_TYPE_VAR_4 #undef DEF_FUNCTION_TYPE_VAR_5 #undef DEF_POINTER_TYPE - BT_LAST - }; + BT_LAST +}; + +typedef enum c_builtin_type builtin_type; + +/* A temporary array for c_common_nodes_and_builtins. Used in + communication with def_fn_type. */ +static tree builtin_types[(int) BT_LAST + 1]; + +/* A helper function for c_common_nodes_and_builtins. Build function type + for DEF with return type RET and N arguments. If VAR is true, then the + function should be variadic after those N arguments. - typedef enum builtin_type builtin_type; + Takes special care not to ICE if any of the types involved are + error_mark_node, which indicates that said type is not in fact available + (see builtin_type_for_size). In which case the function type as a whole + should be error_mark_node. */ - tree builtin_types[(int) BT_LAST + 1]; +static void +def_fn_type (builtin_type def, builtin_type ret, bool var, int n, ...) +{ + tree args = NULL, t; + va_list list; + int i; + + va_start (list, n); + for (i = 0; i < n; ++i) + { + builtin_type a = va_arg (list, builtin_type); + t = builtin_types[a]; + if (t == error_mark_node) + goto egress; + args = tree_cons (NULL_TREE, t, args); + } + va_end (list); + + args = nreverse (args); + if (!var) + args = chainon (args, void_list_node); + + t = builtin_types[ret]; + if (t == error_mark_node) + goto egress; + t = build_function_type (t, args); + + egress: + builtin_types[def] = t; +} + +/* Build tree nodes and builtin functions common to both C and C++ language + frontends. */ + +void +c_common_nodes_and_builtins (void) +{ int wchar_type_size; tree array_domain_type; tree va_list_ref_type_node; @@ -3054,6 +3147,17 @@ c_common_nodes_and_builtins (void) record_builtin_type (RID_DOUBLE, NULL, double_type_node); record_builtin_type (RID_MAX, "long double", long_double_type_node); + /* Only supported decimal floating point extension if the target + actually supports underlying modes. */ + if (targetm.scalar_mode_supported_p (SDmode) + && targetm.scalar_mode_supported_p (DDmode) + && targetm.scalar_mode_supported_p (TDmode)) + { + record_builtin_type (RID_DFLOAT32, NULL, dfloat32_type_node); + record_builtin_type (RID_DFLOAT64, NULL, dfloat64_type_node); + record_builtin_type (RID_DFLOAT128, NULL, dfloat128_type_node); + } + lang_hooks.decls.pushdecl (build_decl (TYPE_DECL, get_identifier ("complex int"), complex_integer_type_node)); @@ -3153,155 +3257,42 @@ c_common_nodes_and_builtins (void) } #define DEF_PRIMITIVE_TYPE(ENUM, VALUE) \ - builtin_types[(int) ENUM] = VALUE; -#define DEF_FUNCTION_TYPE_0(ENUM, RETURN) \ - builtin_types[(int) ENUM] \ - = build_function_type (builtin_types[(int) RETURN], \ - void_list_node); -#define DEF_FUNCTION_TYPE_1(ENUM, RETURN, ARG1) \ - builtin_types[(int) ENUM] \ - = build_function_type (builtin_types[(int) RETURN], \ - tree_cons (NULL_TREE, \ - builtin_types[(int) ARG1], \ - void_list_node)); -#define DEF_FUNCTION_TYPE_2(ENUM, RETURN, ARG1, ARG2) \ - builtin_types[(int) ENUM] \ - = build_function_type \ - (builtin_types[(int) RETURN], \ - tree_cons (NULL_TREE, \ - builtin_types[(int) ARG1], \ - tree_cons (NULL_TREE, \ - builtin_types[(int) ARG2], \ - void_list_node))); -#define DEF_FUNCTION_TYPE_3(ENUM, RETURN, ARG1, ARG2, ARG3) \ - builtin_types[(int) ENUM] \ - = build_function_type \ - (builtin_types[(int) RETURN], \ - tree_cons (NULL_TREE, \ - builtin_types[(int) ARG1], \ - tree_cons (NULL_TREE, \ - builtin_types[(int) ARG2], \ - tree_cons (NULL_TREE, \ - builtin_types[(int) ARG3], \ - void_list_node)))); -#define DEF_FUNCTION_TYPE_4(ENUM, RETURN, ARG1, ARG2, ARG3, ARG4) \ - builtin_types[(int) ENUM] \ - = build_function_type \ - (builtin_types[(int) RETURN], \ - tree_cons (NULL_TREE, \ - builtin_types[(int) ARG1], \ - tree_cons (NULL_TREE, \ - builtin_types[(int) ARG2], \ - tree_cons \ - (NULL_TREE, \ - builtin_types[(int) ARG3], \ - tree_cons (NULL_TREE, \ - builtin_types[(int) ARG4], \ - void_list_node))))); + builtin_types[ENUM] = VALUE; +#define DEF_FUNCTION_TYPE_0(ENUM, RETURN) \ + def_fn_type (ENUM, RETURN, 0, 0); +#define DEF_FUNCTION_TYPE_1(ENUM, RETURN, ARG1) \ + def_fn_type (ENUM, RETURN, 0, 1, ARG1); +#define DEF_FUNCTION_TYPE_2(ENUM, RETURN, ARG1, ARG2) \ + def_fn_type (ENUM, RETURN, 0, 2, ARG1, ARG2); +#define DEF_FUNCTION_TYPE_3(ENUM, RETURN, ARG1, ARG2, ARG3) \ + def_fn_type (ENUM, RETURN, 0, 3, ARG1, ARG2, ARG3); +#define DEF_FUNCTION_TYPE_4(ENUM, RETURN, ARG1, ARG2, ARG3, ARG4) \ + def_fn_type (ENUM, RETURN, 0, 4, ARG1, ARG2, ARG3, ARG4); #define DEF_FUNCTION_TYPE_5(ENUM, RETURN, ARG1, ARG2, ARG3, ARG4, ARG5) \ - builtin_types[(int) ENUM] \ - = build_function_type \ - (builtin_types[(int) RETURN], \ - tree_cons (NULL_TREE, \ - builtin_types[(int) ARG1], \ - tree_cons (NULL_TREE, \ - builtin_types[(int) ARG2], \ - tree_cons \ - (NULL_TREE, \ - builtin_types[(int) ARG3], \ - tree_cons (NULL_TREE, \ - builtin_types[(int) ARG4], \ - tree_cons (NULL_TREE, \ - builtin_types[(int) ARG5],\ - void_list_node)))))); + def_fn_type (ENUM, RETURN, 0, 5, ARG1, ARG2, ARG3, ARG4, ARG5); #define DEF_FUNCTION_TYPE_6(ENUM, RETURN, ARG1, ARG2, ARG3, ARG4, ARG5, \ ARG6) \ - builtin_types[(int) ENUM] \ - = build_function_type \ - (builtin_types[(int) RETURN], \ - tree_cons (NULL_TREE, \ - builtin_types[(int) ARG1], \ - tree_cons (NULL_TREE, \ - builtin_types[(int) ARG2], \ - tree_cons \ - (NULL_TREE, \ - builtin_types[(int) ARG3], \ - tree_cons \ - (NULL_TREE, \ - builtin_types[(int) ARG4], \ - tree_cons (NULL_TREE, \ - builtin_types[(int) ARG5], \ - tree_cons (NULL_TREE, \ - builtin_types[(int) ARG6],\ - void_list_node))))))); -#define DEF_FUNCTION_TYPE_VAR_0(ENUM, RETURN) \ - builtin_types[(int) ENUM] \ - = build_function_type (builtin_types[(int) RETURN], NULL_TREE); -#define DEF_FUNCTION_TYPE_VAR_1(ENUM, RETURN, ARG1) \ - builtin_types[(int) ENUM] \ - = build_function_type (builtin_types[(int) RETURN], \ - tree_cons (NULL_TREE, \ - builtin_types[(int) ARG1], \ - NULL_TREE)); - -#define DEF_FUNCTION_TYPE_VAR_2(ENUM, RETURN, ARG1, ARG2) \ - builtin_types[(int) ENUM] \ - = build_function_type \ - (builtin_types[(int) RETURN], \ - tree_cons (NULL_TREE, \ - builtin_types[(int) ARG1], \ - tree_cons (NULL_TREE, \ - builtin_types[(int) ARG2], \ - NULL_TREE))); - -#define DEF_FUNCTION_TYPE_VAR_3(ENUM, RETURN, ARG1, ARG2, ARG3) \ - builtin_types[(int) ENUM] \ - = build_function_type \ - (builtin_types[(int) RETURN], \ - tree_cons (NULL_TREE, \ - builtin_types[(int) ARG1], \ - tree_cons (NULL_TREE, \ - builtin_types[(int) ARG2], \ - tree_cons (NULL_TREE, \ - builtin_types[(int) ARG3], \ - NULL_TREE)))); - -#define DEF_FUNCTION_TYPE_VAR_4(ENUM, RETURN, ARG1, ARG2, ARG3, ARG4) \ - builtin_types[(int) ENUM] \ - = build_function_type \ - (builtin_types[(int) RETURN], \ - tree_cons (NULL_TREE, \ - builtin_types[(int) ARG1], \ - tree_cons (NULL_TREE, \ - builtin_types[(int) ARG2], \ - tree_cons (NULL_TREE, \ - builtin_types[(int) ARG3], \ - tree_cons (NULL_TREE, \ - builtin_types[(int) ARG4],\ - NULL_TREE))))); - -#define DEF_FUNCTION_TYPE_VAR_5(ENUM, RETURN, ARG1, ARG2, ARG3, ARG4, \ - ARG5) \ - builtin_types[(int) ENUM] \ - = build_function_type \ - (builtin_types[(int) RETURN], \ - tree_cons (NULL_TREE, \ - builtin_types[(int) ARG1], \ - tree_cons (NULL_TREE, \ - builtin_types[(int) ARG2], \ - tree_cons \ - (NULL_TREE, \ - builtin_types[(int) ARG3], \ - tree_cons (NULL_TREE, \ - builtin_types[(int) ARG4], \ - tree_cons (NULL_TREE, \ - builtin_types[(int) ARG5],\ - NULL_TREE)))))); - -#define DEF_POINTER_TYPE(ENUM, TYPE) \ - builtin_types[(int) ENUM] \ - = build_pointer_type (builtin_types[(int) TYPE]); + def_fn_type (ENUM, RETURN, 0, 6, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6); +#define DEF_FUNCTION_TYPE_7(ENUM, RETURN, ARG1, ARG2, ARG3, ARG4, ARG5, \ + ARG6, ARG7) \ + def_fn_type (ENUM, RETURN, 0, 7, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6, ARG7); +#define DEF_FUNCTION_TYPE_VAR_0(ENUM, RETURN) \ + def_fn_type (ENUM, RETURN, 1, 0); +#define DEF_FUNCTION_TYPE_VAR_1(ENUM, RETURN, ARG1) \ + def_fn_type (ENUM, RETURN, 1, 1, ARG1); +#define DEF_FUNCTION_TYPE_VAR_2(ENUM, RETURN, ARG1, ARG2) \ + def_fn_type (ENUM, RETURN, 1, 2, ARG1, ARG2); +#define DEF_FUNCTION_TYPE_VAR_3(ENUM, RETURN, ARG1, ARG2, ARG3) \ + def_fn_type (ENUM, RETURN, 1, 3, ARG1, ARG2, ARG3); +#define DEF_FUNCTION_TYPE_VAR_4(ENUM, RETURN, ARG1, ARG2, ARG3, ARG4) \ + def_fn_type (ENUM, RETURN, 1, 4, ARG1, ARG2, ARG3, ARG4); +#define DEF_FUNCTION_TYPE_VAR_5(ENUM, RETURN, ARG1, ARG2, ARG3, ARG4, ARG5) \ + def_fn_type (ENUM, RETURN, 1, 5, ARG1, ARG2, ARG3, ARG4, ARG5); +#define DEF_POINTER_TYPE(ENUM, TYPE) \ + builtin_types[(int) ENUM] = build_pointer_type (builtin_types[(int) TYPE]); + #include "builtin-types.def" + #undef DEF_PRIMITIVE_TYPE #undef DEF_FUNCTION_TYPE_1 #undef DEF_FUNCTION_TYPE_2 @@ -3343,6 +3334,9 @@ c_common_nodes_and_builtins (void) not shared. */ null_node = make_node (INTEGER_CST); TREE_TYPE (null_node) = c_common_type_for_size (POINTER_SIZE, 0); + + /* Since builtin_types isn't gc'ed, don't export these nodes. */ + memset (builtin_types, 0, sizeof (builtin_types)); } /* Look up the function in built_in_decls that corresponds to DECL @@ -3365,6 +3359,21 @@ set_builtin_user_assembler_name (tree decl, const char *asmspec) init_block_clear_fn (asmspec); } +/* The number of named compound-literals generated thus far. */ +static GTY(()) int compound_literal_number; + +/* Set DECL_NAME for DECL, a VAR_DECL for a compound-literal. */ + +void +set_compound_literal_name (tree decl) +{ + char *name; + ASM_FORMAT_PRIVATE_NAME (name, "__compound_literal", + compound_literal_number); + compound_literal_number++; + DECL_NAME (decl) = get_identifier (name); +} + tree build_va_arg (tree expr, tree type) { @@ -3433,6 +3442,9 @@ def_builtin_1 (enum built_in_function fncode, tree decl; const char *libname; + if (fntype == error_mark_node) + return; + gcc_assert ((!both_p && !fallback_p) || !strncmp (name, "__builtin_", strlen ("__builtin_"))); @@ -4029,17 +4041,23 @@ handle_packed_attribute (tree *node, tree name, tree ARG_UNUSED (args), struct Foo { struct Foo const *ptr; // creates a variant w/o packed flag - } __ attribute__((packed)); // packs it now. - */ + } __ attribute__((packed)); // packs it now. + */ tree probe; for (probe = *node; probe; probe = TYPE_NEXT_VARIANT (probe)) TYPE_PACKED (probe) = 1; } - } else if (TREE_CODE (*node) == FIELD_DECL) - DECL_PACKED (*node) = 1; + { + if (TYPE_ALIGN (TREE_TYPE (*node)) <= BITS_PER_UNIT) + warning (OPT_Wattributes, + "%qE attribute ignored for field of type %qT", + name, TREE_TYPE (*node)); + else + DECL_PACKED (*node) = 1; + } /* We can't set DECL_PACKED for a VAR_DECL, because the bit is used for DECL_REGISTER. It wouldn't mean anything anyway. We can't set DECL_PACKED on the type of a TYPE_DECL, because @@ -4470,6 +4488,7 @@ handle_mode_attribute (tree *node, tree name, tree args, case MODE_INT: case MODE_PARTIAL_INT: case MODE_FLOAT: + case MODE_DECIMAL_FLOAT: valid_mode = targetm.scalar_mode_supported_p (mode); break; @@ -4715,7 +4734,12 @@ handle_alias_attribute (tree *node, tree name, tree args, tree decl = *node; if ((TREE_CODE (decl) == FUNCTION_DECL && DECL_INITIAL (decl)) - || (TREE_CODE (decl) != FUNCTION_DECL && !DECL_EXTERNAL (decl))) + || (TREE_CODE (decl) != FUNCTION_DECL + && TREE_PUBLIC (decl) && !DECL_EXTERNAL (decl)) + /* A static variable declaration is always a tentative definition, + but the alias is a non-tentative definition which overrides. */ + || (TREE_CODE (decl) != FUNCTION_DECL + && ! TREE_PUBLIC (decl) && DECL_INITIAL (decl))) { error ("%q+D defined both normally and as an alias", decl); *no_add_attrs = true; @@ -4780,6 +4804,8 @@ handle_weakref_attribute (tree *node, tree ARG_UNUSED (name), tree args, attr = tree_cons (get_identifier ("weakref"), NULL_TREE, attr); *no_add_attrs = true; + + decl_attributes (node, attr, flags); } else { @@ -4787,11 +4813,12 @@ handle_weakref_attribute (tree *node, tree ARG_UNUSED (name), tree args, error ("%Jweakref attribute must appear before alias attribute", *node); - attr = tree_cons (get_identifier ("weak"), NULL_TREE, attr); + /* Can't call declare_weak because it wants this to be TREE_PUBLIC, + and that isn't supported; and because it wants to add it to + the list of weak decls, which isn't helpful. */ + DECL_WEAK (*node) = 1; } - decl_attributes (node, attr, flags); - return NULL_TREE; } @@ -5172,6 +5199,18 @@ handle_vector_size_attribute (tree *node, tree name, tree args, return NULL_TREE; } + if (vecsize % tree_low_cst (TYPE_SIZE_UNIT (type), 1)) + { + error ("vector size not an integral multiple of component size"); + return NULL; + } + + if (vecsize == 0) + { + error ("zero vector size"); + return NULL; + } + /* Calculate how many units fit in the vector. */ nunits = vecsize / tree_low_cst (TYPE_SIZE_UNIT (type), 1); if (nunits & (nunits - 1)) @@ -5572,7 +5611,9 @@ check_function_arguments_recurse (void (*callback) void *ctx, tree param, unsigned HOST_WIDE_INT param_num) { - if (TREE_CODE (param) == NOP_EXPR) + if ((TREE_CODE (param) == NOP_EXPR || TREE_CODE (param) == CONVERT_EXPR) + && (TYPE_PRECISION (TREE_TYPE (param)) + == TYPE_PRECISION (TREE_TYPE (TREE_OPERAND (param, 0))))) { /* Strip coercion. */ check_function_arguments_recurse (callback, ctx, @@ -5762,6 +5803,10 @@ c_parse_error (const char *gmsgid, enum cpp_ttype token, tree value) free (message); message = NULL; } + else if (token == CPP_PRAGMA) + message = catenate_messages (gmsgid, " before %<#pragma%>"); + else if (token == CPP_PRAGMA_EOL) + message = catenate_messages (gmsgid, " before end of line"); else if (token < N_TTYPES) { message = catenate_messages (gmsgid, " before %qs token"); @@ -5948,19 +5993,19 @@ lvalue_error (enum lvalue_use use) switch (use) { case lv_assign: - error ("invalid lvalue in assignment"); + error ("lvalue required as left operand of assignment"); break; case lv_increment: - error ("invalid lvalue in increment"); + error ("lvalue required as increment operand"); break; case lv_decrement: - error ("invalid lvalue in decrement"); + error ("lvalue required as decrement operand"); break; case lv_addressof: - error ("invalid lvalue in unary %<&%>"); + error ("lvalue required as unary %<&%> operand"); break; case lv_asm: - error ("invalid lvalue in asm statement"); + error ("lvalue required in asm statement"); break; default: gcc_unreachable (); @@ -6101,7 +6146,7 @@ sync_resolve_size (tree function, tree params) goto incompatible; size = tree_low_cst (TYPE_SIZE_UNIT (type), 1); - if (size == 1 || size == 2 || size == 4 || size == 8) + if (size == 1 || size == 2 || size == 4 || size == 8 || size == 16) return size; incompatible: @@ -6284,4 +6329,20 @@ check_missing_format_attribute (tree ltype, tree rtype) return false; } +/* Subscripting with type char is likely to lose on a machine where + chars are signed. So warn on any machine, but optionally. Don't + warn for unsigned char since that type is safe. Don't warn for + signed char because anyone who uses that must have done so + deliberately. Furthermore, we reduce the false positive load by + warning only for non-constant value of type char. */ + +void +warn_array_subscript_with_type_char (tree index) +{ + if (TYPE_MAIN_VARIANT (TREE_TYPE (index)) == char_type_node + && TREE_CODE (index) != INTEGER_CST) + warning (OPT_Wchar_subscripts, "array subscript has type %"); +} + + #include "gt-c-common.h" diff --git a/gcc/c-common.h b/gcc/c-common.h index cf75ed9e82a..735250f8011 100644 --- a/gcc/c-common.h +++ b/gcc/c-common.h @@ -72,6 +72,7 @@ enum rid RID_ASM, RID_TYPEOF, RID_ALIGNOF, RID_ATTRIBUTE, RID_VA_ARG, RID_EXTENSION, RID_IMAGPART, RID_REALPART, RID_LABEL, RID_CHOOSE_EXPR, RID_TYPES_COMPATIBLE_P, + RID_DFLOAT32, RID_DFLOAT64, RID_DFLOAT128, /* Too many ways of getting the name of a function as a string */ RID_FUNCTION_NAME, RID_PRETTY_FUNCTION_NAME, RID_C99_FUNCTION_NAME, @@ -649,6 +650,7 @@ extern void binary_op_error (enum tree_code); extern tree fix_string_type (tree); struct varray_head_tag; extern void constant_expression_warning (tree); +extern void strict_aliasing_warning(tree, tree, tree); extern tree convert_and_check (tree, tree); extern void overflow_warning (tree); extern void unsigned_conversion_warning (tree, tree); @@ -677,6 +679,8 @@ extern void set_builtin_user_assembler_name (tree decl, const char *asmspec); extern void disable_builtin_function (const char *); +extern void set_compound_literal_name (tree decl); + extern tree build_va_arg (tree, tree); extern unsigned int c_common_init_options (unsigned int, const char **); @@ -836,6 +840,8 @@ extern int complete_array_type (tree *, tree, bool); extern tree builtin_type_for_size (int, bool); +extern void warn_array_subscript_with_type_char (tree); + /* In c-gimplify.c */ extern void c_genericize (tree); extern int c_gimplify_expr (tree *, tree *, tree *); @@ -848,7 +854,7 @@ extern void c_common_read_pch (cpp_reader *pfile, const char *name, int fd, const char *orig); extern void c_common_write_pch (void); extern void c_common_no_more_pch (void); -extern void c_common_pch_pragma (cpp_reader *pfile); +extern void c_common_pch_pragma (cpp_reader *pfile, const char *); extern void c_common_print_pch_checksum (FILE *f); /* In *-checksum.c */ diff --git a/gcc/c-convert.c b/gcc/c-convert.c index 50bb923bae2..bf306c8ea2f 100644 --- a/gcc/c-convert.c +++ b/gcc/c-convert.c @@ -88,7 +88,7 @@ convert (tree type, tree expr) return expr; if (TYPE_MAIN_VARIANT (type) == TYPE_MAIN_VARIANT (TREE_TYPE (expr))) - return fold_build1 (NOP_EXPR, type, expr); + return fold_convert (type, expr); if (TREE_CODE (TREE_TYPE (expr)) == ERROR_MARK) return error_mark_node; if (TREE_CODE (TREE_TYPE (expr)) == VOID_TYPE) @@ -97,28 +97,11 @@ convert (tree type, tree expr) return error_mark_node; } if (code == VOID_TYPE) - return build1 (CONVERT_EXPR, type, e); -#if 0 - /* This is incorrect. A truncation can't be stripped this way. - Extensions will be stripped by the use of get_unwidened. */ - if (TREE_CODE (expr) == NOP_EXPR) - return convert (type, TREE_OPERAND (expr, 0)); -#endif + return fold_convert (type, e); if (code == INTEGER_TYPE || code == ENUMERAL_TYPE) return fold (convert_to_integer (type, e)); if (code == BOOLEAN_TYPE) - { - tree t = c_objc_common_truthvalue_conversion (expr); - if (TREE_CODE (t) == ERROR_MARK) - return t; - - /* If it returns a NOP_EXPR, we must fold it here to avoid - infinite recursion between fold () and convert (). */ - if (TREE_CODE (t) == NOP_EXPR) - return fold_build1 (NOP_EXPR, type, TREE_OPERAND (t, 0)); - else - return fold_build1 (NOP_EXPR, type, t); - } + return fold_convert (type, c_objc_common_truthvalue_conversion (expr)); if (code == POINTER_TYPE || code == REFERENCE_TYPE) return fold (convert_to_pointer (type, e)); if (code == REAL_TYPE) diff --git a/gcc/c-cppbuiltin.c b/gcc/c-cppbuiltin.c index e0d61892009..e9f60f63bf3 100644 --- a/gcc/c-cppbuiltin.c +++ b/gcc/c-cppbuiltin.c @@ -53,11 +53,14 @@ static void builtin_define_with_value_n (const char *, const char *, static void builtin_define_with_int_value (const char *, HOST_WIDE_INT); static void builtin_define_with_hex_fp_value (const char *, tree, int, const char *, + const char *, const char *); static void builtin_define_stdint_macros (void); static void builtin_define_type_max (const char *, tree, int); static void builtin_define_type_precision (const char *, tree); -static void builtin_define_float_constants (const char *, const char *, +static void builtin_define_float_constants (const char *, + const char *, + const char *, tree); static void define__GNUC__ (void); @@ -68,9 +71,13 @@ builtin_define_type_precision (const char *name, tree type) builtin_define_with_int_value (name, TYPE_PRECISION (type)); } -/* Define the float.h constants for TYPE using NAME_PREFIX and FP_SUFFIX. */ +/* Define the float.h constants for TYPE using NAME_PREFIX, FP_SUFFIX, + and FP_CAST. */ static void -builtin_define_float_constants (const char *name_prefix, const char *fp_suffix, tree type) +builtin_define_float_constants (const char *name_prefix, + const char *fp_suffix, + const char *fp_cast, + tree type) { /* Used to convert radix-based values to base 10 values in several cases. @@ -89,6 +96,7 @@ builtin_define_float_constants (const char *name_prefix, const char *fp_suffix, int decimal_dig; fmt = REAL_MODE_FORMAT (TYPE_MODE (type)); + gcc_assert (fmt->b != 10); /* The radix of the exponent representation. */ if (type == float_type_node) @@ -208,13 +216,13 @@ builtin_define_float_constants (const char *name_prefix, const char *fp_suffix, } } sprintf (name, "__%s_MAX__", name_prefix); - builtin_define_with_hex_fp_value (name, type, decimal_dig, buf, fp_suffix); + builtin_define_with_hex_fp_value (name, type, decimal_dig, buf, fp_suffix, fp_cast); /* The minimum normalized positive floating-point number, b**(emin-1). */ sprintf (name, "__%s_MIN__", name_prefix); sprintf (buf, "0x1p%d", (fmt->emin - 1) * fmt->log2_b); - builtin_define_with_hex_fp_value (name, type, decimal_dig, buf, fp_suffix); + builtin_define_with_hex_fp_value (name, type, decimal_dig, buf, fp_suffix, fp_cast); /* The difference between 1 and the least value greater than 1 that is representable in the given floating point type, b**(1-p). */ @@ -225,7 +233,7 @@ builtin_define_float_constants (const char *name_prefix, const char *fp_suffix, sprintf (buf, "0x1p%d", (fmt->emin - fmt->p) * fmt->log2_b); else sprintf (buf, "0x1p%d", (1 - fmt->p) * fmt->log2_b); - builtin_define_with_hex_fp_value (name, type, decimal_dig, buf, fp_suffix); + builtin_define_with_hex_fp_value (name, type, decimal_dig, buf, fp_suffix, fp_cast); /* For C++ std::numeric_limits::denorm_min. The minimum denormalized positive floating-point number, b**(emin-p). Zero for formats that @@ -235,7 +243,7 @@ builtin_define_float_constants (const char *name_prefix, const char *fp_suffix, { sprintf (buf, "0x1p%d", (fmt->emin - fmt->p) * fmt->log2_b); builtin_define_with_hex_fp_value (name, type, decimal_dig, - buf, fp_suffix); + buf, fp_suffix, fp_cast); } else { @@ -243,6 +251,9 @@ builtin_define_float_constants (const char *name_prefix, const char *fp_suffix, builtin_define_with_value (name, buf, 0); } + sprintf (name, "__%s_HAS_DENORM__", name_prefix); + builtin_define_with_value (name, fmt->has_denorm ? "1" : "0", 0); + /* For C++ std::numeric_limits::has_infinity. */ sprintf (name, "__%s_HAS_INFINITY__", name_prefix); builtin_define_with_int_value (name, @@ -256,6 +267,70 @@ builtin_define_float_constants (const char *name_prefix, const char *fp_suffix, builtin_define_with_int_value (name, MODE_HAS_NANS (TYPE_MODE (type))); } +/* Define __DECx__ constants for TYPE using NAME_PREFIX and SUFFIX. */ +static void +builtin_define_decimal_float_constants (const char *name_prefix, + const char *suffix, + tree type) +{ + const struct real_format *fmt; + char name[64], buf[128], *p; + int digits; + + fmt = REAL_MODE_FORMAT (TYPE_MODE (type)); + + /* The number of radix digits, p, in the significand. */ + sprintf (name, "__%s_MANT_DIG__", name_prefix); + builtin_define_with_int_value (name, fmt->p); + + /* The minimum negative int x such that b**(x-1) is a normalized float. */ + sprintf (name, "__%s_MIN_EXP__", name_prefix); + sprintf (buf, "(%d)", fmt->emin); + builtin_define_with_value (name, buf, 0); + + /* The maximum int x such that b**(x-1) is a representable float. */ + sprintf (name, "__%s_MAX_EXP__", name_prefix); + builtin_define_with_int_value (name, fmt->emax); + + /* Compute the minimum representable value. */ + sprintf (name, "__%s_MIN__", name_prefix); + sprintf (buf, "1E%d%s", fmt->emin, suffix); + builtin_define_with_value (name, buf, 0); + + /* Compute the maximum representable value. */ + sprintf (name, "__%s_MAX__", name_prefix); + p = buf; + for (digits = fmt->p; digits; digits--) + { + *p++ = '9'; + if (digits == fmt->p) + *p++ = '.'; + } + *p = 0; + /* fmt->p plus 1, to account for the decimal point. */ + sprintf (&buf[fmt->p + 1], "E%d%s", fmt->emax, suffix); + builtin_define_with_value (name, buf, 0); + + /* Compute epsilon (the difference between 1 and least value greater + than 1 representable). */ + sprintf (name, "__%s_EPSILON__", name_prefix); + sprintf (buf, "1E-%d%s", fmt->p - 1, suffix); + builtin_define_with_value (name, buf, 0); + + /* Minimum denormalized postive decimal value. */ + sprintf (name, "__%s_DEN__", name_prefix); + p = buf; + for (digits = fmt->p; digits > 1; digits--) + { + *p++ = '0'; + if (digits == fmt->p) + *p++ = '.'; + } + *p = 0; + sprintf (&buf[fmt->p], "1E%d%s", fmt->emin, suffix); + builtin_define_with_value (name, buf, 0); +} + /* Define __GNUC__, __GNUC_MINOR__ and __GNUC_PATCHLEVEL__. */ static void define__GNUC__ (void) @@ -382,9 +457,25 @@ c_cpp_builtins (cpp_reader *pfile) builtin_define_with_int_value ("__FLT_EVAL_METHOD__", TARGET_FLT_EVAL_METHOD); - builtin_define_float_constants ("FLT", "F", float_type_node); - builtin_define_float_constants ("DBL", "", double_type_node); - builtin_define_float_constants ("LDBL", "L", long_double_type_node); + /* And decfloat.h needs this. */ + builtin_define_with_int_value ("__DEC_EVAL_METHOD__", + TARGET_DEC_EVAL_METHOD); + + builtin_define_float_constants ("FLT", "F", "%s", float_type_node); + /* Cast the double precision constants when single precision constants are + specified. The correct result is computed by the compiler when using + macros that include a cast. This has the side-effect of making the value + unusable in const expressions. */ + if (flag_single_precision_constant) + builtin_define_float_constants ("DBL", "L", "((double)%s)", double_type_node); + else + builtin_define_float_constants ("DBL", "", "%s", double_type_node); + builtin_define_float_constants ("LDBL", "L", "%s", long_double_type_node); + + /* For decfloat.h. */ + builtin_define_decimal_float_constants ("DEC32", "DF", dfloat32_type_node); + builtin_define_decimal_float_constants ("DEC64", "DD", dfloat64_type_node); + builtin_define_decimal_float_constants ("DEC128", "DL", dfloat128_type_node); /* For use in assembly language. */ builtin_define_with_value ("__REGISTER_PREFIX__", REGISTER_PREFIX, 0); @@ -486,7 +577,7 @@ void builtin_define_std (const char *macro) { size_t len = strlen (macro); - char *buff = alloca (len + 5); + char *buff = (char *) alloca (len + 5); char *p = buff + 2; char *q = p + len; @@ -532,7 +623,7 @@ builtin_define_with_value (const char *macro, const char *expansion, int is_str) if (is_str) extra += 2; /* space for two quote marks */ - buf = alloca (mlen + elen + extra); + buf = (char *) alloca (mlen + elen + extra); if (is_str) sprintf (buf, "%s=\"%s\"", macro, expansion); else @@ -550,7 +641,7 @@ builtin_define_with_value_n (const char *macro, const char *expansion, size_t el size_t mlen = strlen (macro); /* Space for an = and a NUL. */ - buf = alloca (mlen + elen + 2); + buf = (char *) alloca (mlen + elen + 2); memcpy (buf, macro, mlen); buf[mlen] = '='; memcpy (buf + mlen + 1, expansion, elen); @@ -568,7 +659,7 @@ builtin_define_with_int_value (const char *macro, HOST_WIDE_INT value) size_t vlen = 18; size_t extra = 2; /* space for = and NUL. */ - buf = alloca (mlen + vlen + extra); + buf = (char *) alloca (mlen + vlen + extra); memcpy (buf, macro, mlen); buf[mlen] = '='; sprintf (buf + mlen + 1, HOST_WIDE_INT_PRINT_DEC, value); @@ -580,10 +671,12 @@ builtin_define_with_int_value (const char *macro, HOST_WIDE_INT value) static void builtin_define_with_hex_fp_value (const char *macro, tree type ATTRIBUTE_UNUSED, int digits, - const char *hex_str, const char *fp_suffix) + const char *hex_str, + const char *fp_suffix, + const char *fp_cast) { REAL_VALUE_TYPE real; - char dec_str[64], buf[256]; + char dec_str[64], buf1[256], buf2[256]; /* Hex values are really cool and convenient, except that they're not supported in strict ISO C90 mode. First, the "p-" sequence @@ -598,8 +691,13 @@ builtin_define_with_hex_fp_value (const char *macro, real_from_string (&real, hex_str); real_to_decimal (dec_str, &real, sizeof (dec_str), digits, 0); - sprintf (buf, "%s=%s%s", macro, dec_str, fp_suffix); - cpp_define (parse_in, buf); + /* Assemble the macro in the following fashion + macro = fp_cast [dec_str fp_suffix] */ + sprintf (buf1, "%s%s", dec_str, fp_suffix); + sprintf (buf2, fp_cast, buf1); + sprintf (buf1, "%s=%s", macro, buf2); + + cpp_define (parse_in, buf1); } /* Define MAX for TYPE based on the precision of the type. IS_LONG is @@ -638,7 +736,8 @@ builtin_define_type_max (const char *macro, tree type, int is_long) value = values[idx + TYPE_UNSIGNED (type)]; suffix = suffixes[is_long * 2 + TYPE_UNSIGNED (type)]; - buf = alloca (strlen (macro) + 1 + strlen (value) + strlen (suffix) + 1); + buf = (char *) alloca (strlen (macro) + 1 + strlen (value) + + strlen (suffix) + 1); sprintf (buf, "%s=%s%s", macro, value, suffix); cpp_define (parse_in, buf); diff --git a/gcc/c-decl.c b/gcc/c-decl.c index a86cfdc01b6..4c786b6cdb1 100644 --- a/gcc/c-decl.c +++ b/gcc/c-decl.c @@ -3601,8 +3601,6 @@ mark_forward_parm_decls (void) TREE_ASM_WRITTEN (b->decl) = 1; } -static GTY(()) int compound_literal_number; - /* Build a COMPOUND_LITERAL_EXPR. TYPE is the type given in the compound literal, which may be an incomplete array type completed by the initializer; INIT is a CONSTRUCTOR that initializes the compound @@ -3652,14 +3650,8 @@ build_compound_literal (tree type, tree init) if (TREE_STATIC (decl)) { - /* This decl needs a name for the assembler output. We also need - a unique suffix to be added to the name. */ - char *name; - - ASM_FORMAT_PRIVATE_NAME (name, "__compound_literal", - compound_literal_number); - compound_literal_number++; - DECL_NAME (decl) = get_identifier (name); + /* This decl needs a name for the assembler output. */ + set_compound_literal_name (decl); DECL_DEFER_OUTPUT (decl) = 1; DECL_COMDAT (decl) = 1; DECL_ARTIFICIAL (decl) = 1; @@ -5326,7 +5318,9 @@ finish_struct (tree t, tree fieldlist, tree attributes) for (x = fieldlist; x; x = TREE_CHAIN (x)) { DECL_CONTEXT (x) = t; - DECL_PACKED (x) |= TYPE_PACKED (t); + + if (TYPE_PACKED (t) && TYPE_ALIGN (TREE_TYPE (x)) > BITS_PER_UNIT) + DECL_PACKED (x) = 1; /* If any field is const, the structure type is pseudo-const. */ if (TREE_READONLY (x)) @@ -7067,6 +7061,15 @@ declspecs_add_type (struct c_declspecs *specs, struct c_typespec spec) else if (specs->typespec_word == cts_float) error ("both % and % in " "declaration specifiers"); + else if (specs->typespec_word == cts_dfloat32) + error ("both % and %<_Decimal32%> in " + "declaration specifiers"); + else if (specs->typespec_word == cts_dfloat64) + error ("both % and %<_Decimal64%> in " + "declaration specifiers"); + else if (specs->typespec_word == cts_dfloat128) + error ("both % and %<_Decimal128%> in " + "declaration specifiers"); else specs->long_p = true; break; @@ -7090,6 +7093,15 @@ declspecs_add_type (struct c_declspecs *specs, struct c_typespec spec) else if (specs->typespec_word == cts_double) error ("both % and % in " "declaration specifiers"); + else if (specs->typespec_word == cts_dfloat32) + error ("both % and %<_Decimal32%> in " + "declaration specifiers"); + else if (specs->typespec_word == cts_dfloat64) + error ("both % and %<_Decimal64%> in " + "declaration specifiers"); + else if (specs->typespec_word == cts_dfloat128) + error ("both % and %<_Decimal128%> in " + "declaration specifiers"); else specs->short_p = true; break; @@ -7110,6 +7122,15 @@ declspecs_add_type (struct c_declspecs *specs, struct c_typespec spec) else if (specs->typespec_word == cts_double) error ("both % and % in " "declaration specifiers"); + else if (specs->typespec_word == cts_dfloat32) + error ("both % and %<_Decimal32%> in " + "declaration specifiers"); + else if (specs->typespec_word == cts_dfloat64) + error ("both % and %<_Decimal64%> in " + "declaration specifiers"); + else if (specs->typespec_word == cts_dfloat128) + error ("both % and %<_Decimal128%> in " + "declaration specifiers"); else specs->signed_p = true; break; @@ -7130,6 +7151,15 @@ declspecs_add_type (struct c_declspecs *specs, struct c_typespec spec) else if (specs->typespec_word == cts_double) error ("both % and % in " "declaration specifiers"); + else if (specs->typespec_word == cts_dfloat32) + error ("both % and %<_Decimal32%> in " + "declaration specifiers"); + else if (specs->typespec_word == cts_dfloat64) + error ("both % and %<_Decimal64%> in " + "declaration specifiers"); + else if (specs->typespec_word == cts_dfloat128) + error ("both % and %<_Decimal128%> in " + "declaration specifiers"); else specs->unsigned_p = true; break; @@ -7143,6 +7173,15 @@ declspecs_add_type (struct c_declspecs *specs, struct c_typespec spec) else if (specs->typespec_word == cts_bool) error ("both % and %<_Bool%> in " "declaration specifiers"); + else if (specs->typespec_word == cts_dfloat32) + error ("both % and %<_Decimal32%> in " + "declaration specifiers"); + else if (specs->typespec_word == cts_dfloat64) + error ("both % and %<_Decimal64%> in " + "declaration specifiers"); + else if (specs->typespec_word == cts_dfloat128) + error ("both % and %<_Decimal128%> in " + "declaration specifiers"); else specs->complex_p = true; break; @@ -7248,6 +7287,47 @@ declspecs_add_type (struct c_declspecs *specs, struct c_typespec spec) else specs->typespec_word = cts_double; return specs; + case RID_DFLOAT32: + case RID_DFLOAT64: + case RID_DFLOAT128: + { + const char *str; + if (i == RID_DFLOAT32) + str = "_Decimal32"; + else if (i == RID_DFLOAT64) + str = "_Decimal64"; + else + str = "_Decimal128"; + if (specs->long_long_p) + error ("both % and %<%s%> in " + "declaration specifiers", str); + if (specs->long_p) + error ("both % and %<%s%> in " + "declaration specifiers", str); + else if (specs->short_p) + error ("both % and %<%s%> in " + "declaration specifiers", str); + else if (specs->signed_p) + error ("both % and %<%s%> in " + "declaration specifiers", str); + else if (specs->unsigned_p) + error ("both % and %<%s%> in " + "declaration specifiers", str); + else if (specs->complex_p) + error ("both % and %<%s%> in " + "declaration specifiers", str); + else if (i == RID_DFLOAT32) + specs->typespec_word = cts_dfloat32; + else if (i == RID_DFLOAT64) + specs->typespec_word = cts_dfloat64; + else + specs->typespec_word = cts_dfloat128; + } + if (!targetm.decimal_float_supported_p ()) + error ("decimal floating point not supported for this target"); + if (pedantic) + pedwarn ("ISO C does not support decimal floating point"); + return specs; default: /* ObjC reserved word "id", handled below. */ break; @@ -7525,6 +7605,18 @@ finish_declspecs (struct c_declspecs *specs) : double_type_node); } break; + case cts_dfloat32: + case cts_dfloat64: + case cts_dfloat128: + gcc_assert (!specs->long_p && !specs->long_long_p && !specs->short_p + && !specs->signed_p && !specs->unsigned_p && !specs->complex_p); + if (specs->typespec_word == cts_dfloat32) + specs->type = dfloat32_type_node; + else if (specs->typespec_word == cts_dfloat64) + specs->type = dfloat64_type_node; + else + specs->type = dfloat128_type_node; + break; default: gcc_unreachable (); } diff --git a/gcc/c-format.c b/gcc/c-format.c index 82f2bc77b0f..7a797ba3c61 100644 --- a/gcc/c-format.c +++ b/gcc/c-format.c @@ -291,6 +291,8 @@ static const format_length_info printf_length_specs[] = { "Z", FMT_LEN_z, STD_EXT, NULL, 0, 0 }, { "t", FMT_LEN_t, STD_C99, NULL, 0, 0 }, { "j", FMT_LEN_j, STD_C99, NULL, 0, 0 }, + { "H", FMT_LEN_H, STD_EXT, NULL, 0, 0 }, + { "D", FMT_LEN_D, STD_EXT, "DD", FMT_LEN_DD, STD_EXT }, { NULL, 0, 0, NULL, 0, 0 } }; @@ -325,6 +327,8 @@ static const format_length_info scanf_length_specs[] = { "z", FMT_LEN_z, STD_C99, NULL, 0, 0 }, { "t", FMT_LEN_t, STD_C99, NULL, 0, 0 }, { "j", FMT_LEN_j, STD_C99, NULL, 0, 0 }, + { "H", FMT_LEN_H, STD_EXT, NULL, 0, 0 }, + { "D", FMT_LEN_D, STD_EXT, "DD", FMT_LEN_DD, STD_EXT }, { NULL, 0, 0, NULL, 0, 0 } }; @@ -489,34 +493,34 @@ static const format_flag_pair strfmon_flag_pairs[] = static const format_char_info print_char_table[] = { /* C89 conversion specifiers. */ - { "di", 0, STD_C89, { T89_I, T99_SC, T89_S, T89_L, T9L_LL, TEX_LL, T99_SST, T99_PD, T99_IM }, "-wp0 +'I", "i", NULL }, - { "oxX", 0, STD_C89, { T89_UI, T99_UC, T89_US, T89_UL, T9L_ULL, TEX_ULL, T99_ST, T99_UPD, T99_UIM }, "-wp0#", "i", NULL }, - { "u", 0, STD_C89, { T89_UI, T99_UC, T89_US, T89_UL, T9L_ULL, TEX_ULL, T99_ST, T99_UPD, T99_UIM }, "-wp0'I", "i", NULL }, - { "fgG", 0, STD_C89, { T89_D, BADLEN, BADLEN, T99_D, BADLEN, T89_LD, BADLEN, BADLEN, BADLEN }, "-wp0 +#'I", "", NULL }, - { "eE", 0, STD_C89, { T89_D, BADLEN, BADLEN, T99_D, BADLEN, T89_LD, BADLEN, BADLEN, BADLEN }, "-wp0 +#I", "", NULL }, - { "c", 0, STD_C89, { T89_I, BADLEN, BADLEN, T94_WI, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "-w", "", NULL }, - { "s", 1, STD_C89, { T89_C, BADLEN, BADLEN, T94_W, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "-wp", "cR", NULL }, - { "p", 1, STD_C89, { T89_V, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "-w", "c", NULL }, - { "n", 1, STD_C89, { T89_I, T99_SC, T89_S, T89_L, T9L_LL, BADLEN, T99_SST, T99_PD, T99_IM }, "", "W", NULL }, + { "di", 0, STD_C89, { T89_I, T99_SC, T89_S, T89_L, T9L_LL, TEX_LL, T99_SST, T99_PD, T99_IM, BADLEN, BADLEN, BADLEN }, "-wp0 +'I", "i", NULL }, + { "oxX", 0, STD_C89, { T89_UI, T99_UC, T89_US, T89_UL, T9L_ULL, TEX_ULL, T99_ST, T99_UPD, T99_UIM, BADLEN, BADLEN, BADLEN }, "-wp0#", "i", NULL }, + { "u", 0, STD_C89, { T89_UI, T99_UC, T89_US, T89_UL, T9L_ULL, TEX_ULL, T99_ST, T99_UPD, T99_UIM, BADLEN, BADLEN, BADLEN }, "-wp0'I", "i", NULL }, + { "fgG", 0, STD_C89, { T89_D, BADLEN, BADLEN, T99_D, BADLEN, T89_LD, BADLEN, BADLEN, BADLEN, TEX_D32, TEX_D64, TEX_D128 }, "-wp0 +#'I", "", NULL }, + { "eE", 0, STD_C89, { T89_D, BADLEN, BADLEN, T99_D, BADLEN, T89_LD, BADLEN, BADLEN, BADLEN, TEX_D32, TEX_D64, TEX_D128 }, "-wp0 +#I", "", NULL }, + { "c", 0, STD_C89, { T89_I, BADLEN, BADLEN, T94_WI, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "-w", "", NULL }, + { "s", 1, STD_C89, { T89_C, BADLEN, BADLEN, T94_W, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "-wp", "cR", NULL }, + { "p", 1, STD_C89, { T89_V, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "-w", "c", NULL }, + { "n", 1, STD_C89, { T89_I, T99_SC, T89_S, T89_L, T9L_LL, BADLEN, T99_SST, T99_PD, T99_IM, BADLEN, BADLEN, BADLEN }, "", "W", NULL }, /* C99 conversion specifiers. */ - { "F", 0, STD_C99, { T99_D, BADLEN, BADLEN, T99_D, BADLEN, T99_LD, BADLEN, BADLEN, BADLEN }, "-wp0 +#'I", "", NULL }, - { "aA", 0, STD_C99, { T99_D, BADLEN, BADLEN, T99_D, BADLEN, T99_LD, BADLEN, BADLEN, BADLEN }, "-wp0 +#", "", NULL }, + { "F", 0, STD_C99, { T99_D, BADLEN, BADLEN, T99_D, BADLEN, T99_LD, BADLEN, BADLEN, BADLEN, TEX_D32, TEX_D64, TEX_D128 }, "-wp0 +#'I", "", NULL }, + { "aA", 0, STD_C99, { T99_D, BADLEN, BADLEN, T99_D, BADLEN, T99_LD, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "-wp0 +#", "", NULL }, /* X/Open conversion specifiers. */ - { "C", 0, STD_EXT, { TEX_WI, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "-w", "", NULL }, - { "S", 1, STD_EXT, { TEX_W, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "-wp", "R", NULL }, + { "C", 0, STD_EXT, { TEX_WI, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "-w", "", NULL }, + { "S", 1, STD_EXT, { TEX_W, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "-wp", "R", NULL }, /* GNU conversion specifiers. */ - { "m", 0, STD_EXT, { T89_V, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "-wp", "", NULL }, + { "m", 0, STD_EXT, { T89_V, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "-wp", "", NULL }, { NULL, 0, 0, NOLENGTHS, NULL, NULL, NULL } }; static const format_char_info asm_fprintf_char_table[] = { /* C89 conversion specifiers. */ - { "di", 0, STD_C89, { T89_I, BADLEN, BADLEN, T89_L, T9L_LL, BADLEN, BADLEN, BADLEN, BADLEN }, "-wp0 +", "i", NULL }, - { "oxX", 0, STD_C89, { T89_UI, BADLEN, BADLEN, T89_UL, T9L_ULL, BADLEN, BADLEN, BADLEN, BADLEN }, "-wp0#", "i", NULL }, - { "u", 0, STD_C89, { T89_UI, BADLEN, BADLEN, T89_UL, T9L_ULL, BADLEN, BADLEN, BADLEN, BADLEN }, "-wp0", "i", NULL }, - { "c", 0, STD_C89, { T89_I, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "-w", "", NULL }, - { "s", 1, STD_C89, { T89_C, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "-wp", "cR", NULL }, + { "di", 0, STD_C89, { T89_I, BADLEN, BADLEN, T89_L, T9L_LL, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "-wp0 +", "i", NULL }, + { "oxX", 0, STD_C89, { T89_UI, BADLEN, BADLEN, T89_UL, T9L_ULL, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "-wp0#", "i", NULL }, + { "u", 0, STD_C89, { T89_UI, BADLEN, BADLEN, T89_UL, T9L_ULL, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "-wp0", "i", NULL }, + { "c", 0, STD_C89, { T89_I, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "-w", "", NULL }, + { "s", 1, STD_C89, { T89_C, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "-wp", "cR", NULL }, /* asm_fprintf conversion specifiers. */ { "O", 0, STD_C89, NOARGUMENTS, "", "", NULL }, @@ -524,7 +528,7 @@ static const format_char_info asm_fprintf_char_table[] = { "I", 0, STD_C89, NOARGUMENTS, "", "", NULL }, { "L", 0, STD_C89, NOARGUMENTS, "", "", NULL }, { "U", 0, STD_C89, NOARGUMENTS, "", "", NULL }, - { "r", 0, STD_C89, { T89_I, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "", "", NULL }, + { "r", 0, STD_C89, { T89_I, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "", "", NULL }, { "@", 0, STD_C89, NOARGUMENTS, "", "", NULL }, { NULL, 0, 0, NOLENGTHS, NULL, NULL, NULL } }; @@ -532,20 +536,20 @@ static const format_char_info asm_fprintf_char_table[] = static const format_char_info gcc_diag_char_table[] = { /* C89 conversion specifiers. */ - { "di", 0, STD_C89, { T89_I, BADLEN, BADLEN, T89_L, T9L_LL, BADLEN, BADLEN, BADLEN, BADLEN }, "q", "", NULL }, - { "ox", 0, STD_C89, { T89_UI, BADLEN, BADLEN, T89_UL, T9L_ULL, BADLEN, BADLEN, BADLEN, BADLEN }, "q", "", NULL }, - { "u", 0, STD_C89, { T89_UI, BADLEN, BADLEN, T89_UL, T9L_ULL, BADLEN, BADLEN, BADLEN, BADLEN }, "q", "", NULL }, - { "c", 0, STD_C89, { T89_I, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "q", "", NULL }, - { "s", 1, STD_C89, { T89_C, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "pq", "cR", NULL }, - { "p", 1, STD_C89, { T89_V, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "q", "c", NULL }, + { "di", 0, STD_C89, { T89_I, BADLEN, BADLEN, T89_L, T9L_LL, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "q", "", NULL }, + { "ox", 0, STD_C89, { T89_UI, BADLEN, BADLEN, T89_UL, T9L_ULL, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "q", "", NULL }, + { "u", 0, STD_C89, { T89_UI, BADLEN, BADLEN, T89_UL, T9L_ULL, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "q", "", NULL }, + { "c", 0, STD_C89, { T89_I, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "q", "", NULL }, + { "s", 1, STD_C89, { T89_C, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "pq", "cR", NULL }, + { "p", 1, STD_C89, { T89_V, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "q", "c", NULL }, /* Custom conversion specifiers. */ /* %H will require "location_t" at runtime. */ - { "H", 0, STD_C89, { T89_V, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "q", "", NULL }, + { "H", 0, STD_C89, { T89_V, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "q", "", NULL }, /* These will require a "tree" at runtime. */ - { "J", 0, STD_C89, { T89_V, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "q", "", NULL }, + { "J", 0, STD_C89, { T89_V, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "q", "", NULL }, { "<>'", 0, STD_C89, NOARGUMENTS, "", "", NULL }, { "m", 0, STD_C89, NOARGUMENTS, "q", "", NULL }, @@ -578,20 +582,20 @@ static const format_char_info gcc_tdiag_char_table[] = static const format_char_info gcc_cdiag_char_table[] = { /* C89 conversion specifiers. */ - { "di", 0, STD_C89, { T89_I, BADLEN, BADLEN, T89_L, T9L_LL, BADLEN, BADLEN, BADLEN, BADLEN }, "q", "", NULL }, - { "ox", 0, STD_C89, { T89_UI, BADLEN, BADLEN, T89_UL, T9L_ULL, BADLEN, BADLEN, BADLEN, BADLEN }, "q", "", NULL }, - { "u", 0, STD_C89, { T89_UI, BADLEN, BADLEN, T89_UL, T9L_ULL, BADLEN, BADLEN, BADLEN, BADLEN }, "q", "", NULL }, - { "c", 0, STD_C89, { T89_I, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "q", "", NULL }, - { "s", 1, STD_C89, { T89_C, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "pq", "cR", NULL }, - { "p", 1, STD_C89, { T89_V, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "q", "c", NULL }, + { "di", 0, STD_C89, { T89_I, BADLEN, BADLEN, T89_L, T9L_LL, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "q", "", NULL }, + { "ox", 0, STD_C89, { T89_UI, BADLEN, BADLEN, T89_UL, T9L_ULL, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "q", "", NULL }, + { "u", 0, STD_C89, { T89_UI, BADLEN, BADLEN, T89_UL, T9L_ULL, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "q", "", NULL }, + { "c", 0, STD_C89, { T89_I, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "q", "", NULL }, + { "s", 1, STD_C89, { T89_C, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "pq", "cR", NULL }, + { "p", 1, STD_C89, { T89_V, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "q", "c", NULL }, /* Custom conversion specifiers. */ /* %H will require "location_t" at runtime. */ - { "H", 0, STD_C89, { T89_V, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "q", "", NULL }, + { "H", 0, STD_C89, { T89_V, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "q", "", NULL }, /* These will require a "tree" at runtime. */ - { "DEFJT", 0, STD_C89, { T89_V, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "q+", "", NULL }, + { "DEFJT", 0, STD_C89, { T89_V, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "q+", "", NULL }, { "<>'", 0, STD_C89, NOARGUMENTS, "", "", NULL }, { "m", 0, STD_C89, NOARGUMENTS, "q", "", NULL }, @@ -601,23 +605,23 @@ static const format_char_info gcc_cdiag_char_table[] = static const format_char_info gcc_cxxdiag_char_table[] = { /* C89 conversion specifiers. */ - { "di", 0, STD_C89, { T89_I, BADLEN, BADLEN, T89_L, T9L_LL, BADLEN, BADLEN, BADLEN, BADLEN }, "q", "", NULL }, - { "ox", 0, STD_C89, { T89_UI, BADLEN, BADLEN, T89_UL, T9L_ULL, BADLEN, BADLEN, BADLEN, BADLEN }, "q", "", NULL }, - { "u", 0, STD_C89, { T89_UI, BADLEN, BADLEN, T89_UL, T9L_ULL, BADLEN, BADLEN, BADLEN, BADLEN }, "q", "", NULL }, - { "c", 0, STD_C89, { T89_I, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "q", "", NULL }, - { "s", 1, STD_C89, { T89_C, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "pq", "cR", NULL }, - { "p", 1, STD_C89, { T89_V, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "q", "c", NULL }, + { "di", 0, STD_C89, { T89_I, BADLEN, BADLEN, T89_L, T9L_LL, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "q", "", NULL }, + { "ox", 0, STD_C89, { T89_UI, BADLEN, BADLEN, T89_UL, T9L_ULL, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "q", "", NULL }, + { "u", 0, STD_C89, { T89_UI, BADLEN, BADLEN, T89_UL, T9L_ULL, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "q", "", NULL }, + { "c", 0, STD_C89, { T89_I, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "q", "", NULL }, + { "s", 1, STD_C89, { T89_C, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "pq", "cR", NULL }, + { "p", 1, STD_C89, { T89_V, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "q", "c", NULL }, /* Custom conversion specifiers. */ /* %H will require "location_t" at runtime. */ - { "H", 0, STD_C89, { T89_V, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "q", "", NULL }, + { "H", 0, STD_C89, { T89_V, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "q", "", NULL }, /* These will require a "tree" at runtime. */ - { "ADEFJTV",0,STD_C89,{ T89_V, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "q+#", "", NULL }, + { "ADEFJTV",0,STD_C89,{ T89_V, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "q+#", "", NULL }, /* These accept either an 'int' or an 'enum tree_code' (which is handled as an 'int'.) */ - { "CLOPQ",0,STD_C89, { T89_I, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "q", "", NULL }, + { "CLOPQ",0,STD_C89, { T89_I, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "q", "", NULL }, { "<>'", 0, STD_C89, NOARGUMENTS, "", "", NULL }, { "m", 0, STD_C89, NOARGUMENTS, "q", "", NULL }, @@ -644,20 +648,21 @@ static const format_char_info gcc_gfc_char_table[] = static const format_char_info scan_char_table[] = { /* C89 conversion specifiers. */ - { "di", 1, STD_C89, { T89_I, T99_SC, T89_S, T89_L, T9L_LL, TEX_LL, T99_SST, T99_PD, T99_IM }, "*w'I", "W", NULL }, - { "u", 1, STD_C89, { T89_UI, T99_UC, T89_US, T89_UL, T9L_ULL, TEX_ULL, T99_ST, T99_UPD, T99_UIM }, "*w'I", "W", NULL }, - { "oxX", 1, STD_C89, { T89_UI, T99_UC, T89_US, T89_UL, T9L_ULL, TEX_ULL, T99_ST, T99_UPD, T99_UIM }, "*w", "W", NULL }, - { "efgEG", 1, STD_C89, { T89_F, BADLEN, BADLEN, T89_D, BADLEN, T89_LD, BADLEN, BADLEN, BADLEN }, "*w'", "W", NULL }, - { "c", 1, STD_C89, { T89_C, BADLEN, BADLEN, T94_W, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "*w", "cW", NULL }, - { "s", 1, STD_C89, { T89_C, BADLEN, BADLEN, T94_W, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "*aw", "cW", NULL }, - { "[", 1, STD_C89, { T89_C, BADLEN, BADLEN, T94_W, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "*aw", "cW[", NULL }, - { "p", 2, STD_C89, { T89_V, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "*w", "W", NULL }, - { "n", 1, STD_C89, { T89_I, T99_SC, T89_S, T89_L, T9L_LL, BADLEN, T99_SST, T99_PD, T99_IM }, "", "W", NULL }, + { "di", 1, STD_C89, { T89_I, T99_SC, T89_S, T89_L, T9L_LL, TEX_LL, T99_SST, T99_PD, T99_IM, BADLEN, BADLEN, BADLEN }, "*w'I", "W", NULL }, + { "u", 1, STD_C89, { T89_UI, T99_UC, T89_US, T89_UL, T9L_ULL, TEX_ULL, T99_ST, T99_UPD, T99_UIM, BADLEN, BADLEN, BADLEN }, "*w'I", "W", NULL }, + { "oxX", 1, STD_C89, { T89_UI, T99_UC, T89_US, T89_UL, T9L_ULL, TEX_ULL, T99_ST, T99_UPD, T99_UIM, BADLEN, BADLEN, BADLEN }, "*w", "W", NULL }, + { "efgEG", 1, STD_C89, { T89_F, BADLEN, BADLEN, T89_D, BADLEN, T89_LD, BADLEN, BADLEN, BADLEN, TEX_D32, TEX_D64, TEX_D128 }, "*w'", "W", NULL }, + { "c", 1, STD_C89, { T89_C, BADLEN, BADLEN, T94_W, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "*w", "cW", NULL }, + { "s", 1, STD_C89, { T89_C, BADLEN, BADLEN, T94_W, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "*aw", "cW", NULL }, + { "[", 1, STD_C89, { T89_C, BADLEN, BADLEN, T94_W, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "*aw", "cW[", NULL }, + { "p", 2, STD_C89, { T89_V, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "*w", "W", NULL }, + { "n", 1, STD_C89, { T89_I, T99_SC, T89_S, T89_L, T9L_LL, BADLEN, T99_SST, T99_PD, T99_IM, BADLEN, BADLEN, BADLEN }, "", "W", NULL }, /* C99 conversion specifiers. */ - { "FaA", 1, STD_C99, { T99_F, BADLEN, BADLEN, T99_D, BADLEN, T99_LD, BADLEN, BADLEN, BADLEN }, "*w'", "W", NULL }, + { "F", 1, STD_C99, { T99_F, BADLEN, BADLEN, T99_D, BADLEN, T99_LD, BADLEN, BADLEN, BADLEN, TEX_D32, TEX_D64, TEX_D128 }, "*w'", "W", NULL }, + { "aA", 1, STD_C99, { T99_F, BADLEN, BADLEN, T99_D, BADLEN, T99_LD, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "*w'", "W", NULL }, /* X/Open conversion specifiers. */ - { "C", 1, STD_EXT, { TEX_W, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "*w", "W", NULL }, - { "S", 1, STD_EXT, { TEX_W, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "*aw", "W", NULL }, + { "C", 1, STD_EXT, { TEX_W, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "*w", "W", NULL }, + { "S", 1, STD_EXT, { TEX_W, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "*aw", "W", NULL }, { NULL, 0, 0, NOLENGTHS, NULL, NULL, NULL } }; @@ -690,7 +695,7 @@ static const format_char_info time_char_table[] = static const format_char_info monetary_char_table[] = { - { "in", 0, STD_C89, { T89_D, BADLEN, BADLEN, BADLEN, BADLEN, T89_LD, BADLEN, BADLEN, BADLEN }, "=^+(!-w#p", "", NULL }, + { "in", 0, STD_C89, { T89_D, BADLEN, BADLEN, BADLEN, BADLEN, T89_LD, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "=^+(!-w#p", "", NULL }, { NULL, 0, 0, NOLENGTHS, NULL, NULL, NULL } }; @@ -2072,7 +2077,7 @@ check_format_info_main (format_check_results *res, fci = fci->chain; if (fci) { - wanted_type_ptr = ggc_alloc (sizeof (main_wanted_type)); + wanted_type_ptr = GGC_NEW (format_wanted_type); arg_num++; wanted_type = *fci->types[length_chars_val].type; wanted_type_name = fci->types[length_chars_val].name; @@ -2281,7 +2286,7 @@ format_type_warning (const char *descr, const char *format_start, this is adequate, but formats taking pointers to functions or arrays would require the full type to be built up in order to print it with %T. */ - p = alloca (pointer_count + 2); + p = (char *) alloca (pointer_count + 2); if (pointer_count == 0) p[0] = 0; else if (c_dialect_cxx ()) diff --git a/gcc/c-format.h b/gcc/c-format.h index 0cb15733e20..5fa544dde80 100644 --- a/gcc/c-format.h +++ b/gcc/c-format.h @@ -35,6 +35,9 @@ enum format_lengths FMT_LEN_z, FMT_LEN_t, FMT_LEN_j, + FMT_LEN_H, + FMT_LEN_D, + FMT_LEN_DD, FMT_LEN_MAX }; @@ -295,5 +298,11 @@ typedef struct #define T99_IM { STD_C99, "intmax_t", T_IM } #define T_UIM &uintmax_type_node #define T99_UIM { STD_C99, "uintmax_t", T_UIM } +#define T_D32 &dfloat32_type_node +#define TEX_D32 { STD_EXT, "_Decimal32", T_D32 } +#define T_D64 &dfloat64_type_node +#define TEX_D64 { STD_EXT, "_Decimal64", T_D64 } +#define T_D128 &dfloat128_type_node +#define TEX_D128 { STD_EXT, "_Decimal128", T_D128 } #endif /* GCC_C_FORMAT_H */ diff --git a/gcc/c-incpath.c b/gcc/c-incpath.c index 40406124e5b..38611068a79 100644 --- a/gcc/c-incpath.c +++ b/gcc/c-incpath.c @@ -109,7 +109,7 @@ add_env_var_paths (const char *env_var, int chain) path = xstrdup ("."); else { - path = xmalloc (q - p + 1); + path = XNEWVEC (char, q - p + 1); memcpy (path, p, q - p); path[q - p] = '\0'; } @@ -340,7 +340,7 @@ add_path (char *path, int chain, int cxx_aware, bool user_supplied_p) if (*c == '\\') *c = '/'; #endif - p = xmalloc (sizeof (cpp_dir)); + p = XNEW (cpp_dir); p->next = NULL; p->name = path; if (chain == SYSTEM || chain == AFTER) diff --git a/gcc/c-lex.c b/gcc/c-lex.c index 1c832c50d15..44e63d73816 100644 --- a/gcc/c-lex.c +++ b/gcc/c-lex.c @@ -333,6 +333,7 @@ c_lex_with_flags (tree *value, location_t *loc, unsigned char *cpp_flags) static bool no_more_pch; const cpp_token *tok; enum cpp_ttype type; + unsigned char add_flags = 0; timevar_push (TV_CPP); retry: @@ -366,6 +367,10 @@ c_lex_with_flags (tree *value, location_t *loc, unsigned char *cpp_flags) break; case CPP_N_INTEGER: + /* C++ uses '0' to mark virtual functions as pure. + Set PURE_ZERO to pass this information to the C++ parser. */ + if (tok->val.str.len == 1 && *tok->val.str.text == '0') + add_flags = PURE_ZERO; *value = interpret_integer (tok, flags); break; @@ -453,11 +458,11 @@ c_lex_with_flags (tree *value, location_t *loc, unsigned char *cpp_flags) type = lex_string (tok, value, false); break; } + *value = build_string (tok->val.str.len, (char *) tok->val.str.text); + break; - /* FALLTHROUGH */ - case CPP_PRAGMA: - *value = build_string (tok->val.str.len, (char *) tok->val.str.text); + *value = build_int_cst (NULL, tok->val.pragma); break; /* These tokens should not be visible outside cpplib. */ @@ -472,7 +477,7 @@ c_lex_with_flags (tree *value, location_t *loc, unsigned char *cpp_flags) } if (cpp_flags) - *cpp_flags = tok->flags; + *cpp_flags = tok->flags | add_flags; if (!no_more_pch) { @@ -485,13 +490,6 @@ c_lex_with_flags (tree *value, location_t *loc, unsigned char *cpp_flags) return type; } -enum cpp_ttype -c_lex (tree *value) -{ - location_t loc; - return c_lex_with_flags (value, &loc, NULL); -} - /* Returns the narrowest C-visible unsigned type, starting with the minimum specified by FLAGS, that can fit HIGH:LOW, or itk_none if there isn't one. */ @@ -640,43 +638,45 @@ interpret_float (const cpp_token *token, unsigned int flags) REAL_VALUE_TYPE real; char *copy; size_t copylen; - const char *type_name; - /* FIXME: make %T work in error/warning, then we don't need type_name. */ - if ((flags & CPP_N_WIDTH) == CPP_N_LARGE) - { + /* Decode type based on width and properties. */ + if (flags & CPP_N_DFLOAT) + if ((flags & CPP_N_WIDTH) == CPP_N_LARGE) + type = dfloat128_type_node; + else if ((flags & CPP_N_WIDTH) == CPP_N_SMALL) + type = dfloat32_type_node; + else + type = dfloat64_type_node; + else + if ((flags & CPP_N_WIDTH) == CPP_N_LARGE) type = long_double_type_node; - type_name = "long double"; - } - else if ((flags & CPP_N_WIDTH) == CPP_N_SMALL - || flag_single_precision_constant) - { + else if ((flags & CPP_N_WIDTH) == CPP_N_SMALL + || flag_single_precision_constant) type = float_type_node; - type_name = "float"; - } - else - { + else type = double_type_node; - type_name = "double"; - } /* Copy the constant to a nul-terminated buffer. If the constant has any suffixes, cut them off; REAL_VALUE_ATOF/ REAL_VALUE_HTOF can't handle them. */ copylen = token->val.str.len; - if ((flags & CPP_N_WIDTH) != CPP_N_MEDIUM) - /* Must be an F or L suffix. */ - copylen--; - if (flags & CPP_N_IMAGINARY) - /* I or J suffix. */ - copylen--; + if (flags & CPP_N_DFLOAT) + copylen -= 2; + else + { + if ((flags & CPP_N_WIDTH) != CPP_N_MEDIUM) + /* Must be an F or L suffix. */ + copylen--; + if (flags & CPP_N_IMAGINARY) + /* I or J suffix. */ + copylen--; + } copy = (char *) alloca (copylen + 1); memcpy (copy, token->val.str.text, copylen); copy[copylen] = '\0'; - real_from_string (&real, copy); - real_convert (&real, TYPE_MODE (type), &real); + real_from_string3 (&real, copy, TYPE_MODE (type)); /* Both C and C++ require a diagnostic for a floating constant outside the range of representable values of its type. Since we @@ -684,7 +684,7 @@ interpret_float (const cpp_token *token, unsigned int flags) appropriate for this to be a mandatory pedwarn rather than conditioned on -pedantic. */ if (REAL_VALUE_ISINF (real) && pedantic) - pedwarn ("floating constant exceeds range of %<%s%>", type_name); + pedwarn ("floating constant exceeds range of %qT", type); /* Create a node with determined type and value. */ value = build_real (type, real); diff --git a/gcc/c-opts.c b/gcc/c-opts.c index 62db668b4e1..9968c9b187b 100644 --- a/gcc/c-opts.c +++ b/gcc/c-opts.c @@ -386,6 +386,8 @@ c_common_handle_option (size_t scode, const char *arg, int value) warn_sign_compare = value; warn_switch = value; warn_strict_aliasing = value; + warn_string_literal_comparison = value; + warn_always_true = value; /* Only warn about unknown pragmas that are not in system headers. */ diff --git a/gcc/c-parser.c b/gcc/c-parser.c index 518a92ce9f5..91a9d299ca0 100644 --- a/gcc/c-parser.c +++ b/gcc/c-parser.c @@ -42,6 +42,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA #include "coretypes.h" #include "tm.h" #include "tree.h" +#include "rtl.h" #include "langhooks.h" #include "input.h" #include "cpplib.h" @@ -53,6 +54,8 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA #include "toplev.h" #include "ggc.h" #include "c-common.h" +#include "vec.h" +#include "target.h" /* Miscellaneous data and functions needed for the parser. */ @@ -93,6 +96,9 @@ static const struct resword reswords[] = { { "_Bool", RID_BOOL, 0 }, { "_Complex", RID_COMPLEX, 0 }, + { "_Decimal32", RID_DFLOAT32, D_EXT }, + { "_Decimal64", RID_DFLOAT64, D_EXT }, + { "_Decimal128", RID_DFLOAT128, D_EXT }, { "__FUNCTION__", RID_FUNCTION_NAME, 0 }, { "__PRETTY_FUNCTION__", RID_PRETTY_FUNCTION_NAME, 0 }, { "__alignof", RID_ALIGNOF, 0 }, @@ -263,6 +269,9 @@ typedef struct c_token GTY (()) /* If this token is a keyword, this value indicates which keyword. Otherwise, this value is RID_MAX. */ ENUM_BITFIELD (rid) keyword : 8; + /* If this token is a CPP_PRAGMA, this indicates the pragma that + was seen. Otherwise it is PRAGMA_NONE. */ + ENUM_BITFIELD (pragma_kind) pragma_kind : 7; /* True if this token is from a system header. */ BOOL_BITFIELD in_system_header : 1; /* The value associated with this token, if any. */ @@ -284,21 +293,34 @@ typedef struct c_parser GTY(()) c_parser_error sets this flag. It should clear this flag when enough tokens have been consumed to recover from the error. */ BOOL_BITFIELD error : 1; + /* True if we're processing a pragma, and shouldn't automatically + consume CPP_PRAGMA_EOL. */ + BOOL_BITFIELD in_pragma : 1; } c_parser; + +/* The actual parser and external interface. ??? Does this need to be + garbage-collected? */ + +static GTY (()) c_parser *the_parser; + + /* Read in and lex a single token, storing it in *TOKEN. */ static void c_lex_one_token (c_token *token) { timevar_push (TV_LEX); + token->type = c_lex_with_flags (&token->value, &token->location, NULL); + token->id_kind = C_ID_NONE; + token->keyword = RID_MAX; + token->pragma_kind = PRAGMA_NONE; token->in_system_header = in_system_header; + switch (token->type) { case CPP_NAME: - token->id_kind = C_ID_NONE; - token->keyword = RID_MAX; { tree decl; @@ -355,13 +377,12 @@ c_lex_one_token (c_token *token) break; } } + token->id_kind = C_ID_ID; } - token->id_kind = C_ID_ID; break; case CPP_AT_NAME: /* This only happens in Objective-C; it must be a keyword. */ token->type = CPP_KEYWORD; - token->id_kind = C_ID_NONE; token->keyword = C_RID_CODE (token->value); break; case CPP_COLON: @@ -371,12 +392,13 @@ c_lex_one_token (c_token *token) /* These tokens may affect the interpretation of any identifiers following, if doing Objective-C. */ OBJC_NEED_RAW_IDENTIFIER (0); - token->id_kind = C_ID_NONE; - token->keyword = RID_MAX; + break; + case CPP_PRAGMA: + /* We smuggled the cpp_token->u.pragma value in an INTEGER_CST. */ + token->pragma_kind = TREE_INT_CST_LOW (token->value); + token->value = NULL; break; default: - token->id_kind = C_ID_NONE; - token->keyword = RID_MAX; break; } timevar_pop (TV_LEX); @@ -461,6 +483,9 @@ c_token_starts_typename (c_token *token) case RID_FLOAT: case RID_DOUBLE: case RID_VOID: + case RID_DFLOAT32: + case RID_DFLOAT64: + case RID_DFLOAT128: case RID_BOOL: case RID_ENUM: case RID_STRUCT: @@ -532,6 +557,9 @@ c_token_starts_declspecs (c_token *token) case RID_FLOAT: case RID_DOUBLE: case RID_VOID: + case RID_DFLOAT32: + case RID_DFLOAT64: + case RID_DFLOAT128: case RID_BOOL: case RID_ENUM: case RID_STRUCT: @@ -573,6 +601,7 @@ c_parser_peek_2nd_token (c_parser *parser) return &parser->tokens[1]; gcc_assert (parser->tokens_avail == 1); gcc_assert (parser->tokens[0].type != CPP_EOF); + gcc_assert (parser->tokens[0].type != CPP_PRAGMA_EOL); c_lex_one_token (&parser->tokens[1]); parser->tokens_avail = 2; return &parser->tokens[1]; @@ -583,16 +612,30 @@ c_parser_peek_2nd_token (c_parser *parser) static void c_parser_consume_token (c_parser *parser) { + gcc_assert (parser->tokens_avail >= 1); + gcc_assert (parser->tokens[0].type != CPP_EOF); + gcc_assert (!parser->in_pragma || parser->tokens[0].type != CPP_PRAGMA_EOL); + gcc_assert (parser->error || parser->tokens[0].type != CPP_PRAGMA); if (parser->tokens_avail == 2) parser->tokens[0] = parser->tokens[1]; - else - { - gcc_assert (parser->tokens_avail == 1); - gcc_assert (parser->tokens[0].type != CPP_EOF); - } parser->tokens_avail--; } +/* Expect the current token to be a #pragma. Consume it and remember + that we've begun parsing a pragma. */ + +static void +c_parser_consume_pragma (c_parser *parser) +{ + gcc_assert (!parser->in_pragma); + gcc_assert (parser->tokens_avail >= 1); + gcc_assert (parser->tokens[0].type == CPP_PRAGMA); + if (parser->tokens_avail == 2) + parser->tokens[0] = parser->tokens[1]; + parser->tokens_avail--; + parser->in_pragma = true; +} + /* Update the globals input_location and in_system_header from TOKEN. */ static inline void @@ -605,23 +648,6 @@ c_parser_set_source_position_from_token (c_token *token) } } -/* Allocate a new parser. */ - -static c_parser * -c_parser_new (void) -{ - /* Use local storage to lex the first token because loading a PCH - file may cause garbage collection. */ - c_parser tparser; - c_parser *ret; - memset (&tparser, 0, sizeof tparser); - c_lex_one_token (&tparser.tokens[0]); - tparser.tokens_avail = 1; - ret = GGC_NEW (c_parser); - memcpy (ret, &tparser, sizeof tparser); - return ret; -} - /* Issue a diagnostic of the form FILE:LINE: MESSAGE before TOKEN where TOKEN is the next token in the input stream of PARSER. @@ -723,9 +749,12 @@ c_parser_skip_until_found (c_parser *parser, c_parser_consume_token (parser); break; } + /* If we've run out of tokens, stop. */ if (token->type == CPP_EOF) return; + if (token->type == CPP_PRAGMA_EOL && parser->in_pragma) + return; if (token->type == CPP_OPEN_BRACE || token->type == CPP_OPEN_PAREN || token->type == CPP_OPEN_SQUARE) @@ -760,6 +789,8 @@ c_parser_skip_to_end_of_parameter (c_parser *parser) /* If we've run out of tokens, stop. */ if (token->type == CPP_EOF) return; + if (token->type == CPP_PRAGMA_EOL && parser->in_pragma) + return; if (token->type == CPP_OPEN_BRACE || token->type == CPP_OPEN_PAREN || token->type == CPP_OPEN_SQUARE) @@ -794,6 +825,8 @@ c_parser_skip_to_end_of_block_or_statement (c_parser *parser) /* If we've run out of tokens, stop. */ if (token->type == CPP_EOF) return; + if (token->type == CPP_PRAGMA_EOL && parser->in_pragma) + return; /* If the next token is a ';', we have reached the end of the statement. */ if (token->type == CPP_SEMICOLON && !nesting_depth) @@ -819,6 +852,31 @@ c_parser_skip_to_end_of_block_or_statement (c_parser *parser) parser->error = false; } +/* Expect to be at the end of the pragma directive and consume an + end of line marker. */ + +static void +c_parser_skip_to_pragma_eol (c_parser *parser) +{ + gcc_assert (parser->in_pragma); + parser->in_pragma = false; + + if (!c_parser_require (parser, CPP_PRAGMA_EOL, "expected end of line")) + while (true) + { + c_token *token = c_parser_peek_token (parser); + if (token->type == CPP_EOF) + break; + if (token->type == CPP_PRAGMA_EOL) + { + c_parser_consume_token (parser); + break; + } + c_parser_consume_token (parser); + } + + parser->error = false; +} /* Save the warning flags which are controlled by __extension__. */ @@ -923,6 +981,9 @@ static struct c_expr c_parser_expression (c_parser *); static struct c_expr c_parser_expression_conv (c_parser *); static tree c_parser_expr_list (c_parser *, bool); +enum pragma_context { pragma_external, pragma_stmt, pragma_compound }; +static bool c_parser_pragma (c_parser *, enum pragma_context); + /* These Objective-C parser functions are only ever called when compiling Objective-C. */ static void c_parser_objc_class_definition (c_parser *); @@ -1054,6 +1115,9 @@ c_parser_external_declaration (c_parser *parser) pedwarn ("ISO C does not allow extra %<;%> outside of a function"); c_parser_consume_token (parser); break; + case CPP_PRAGMA: + c_parser_pragma (parser, pragma_external); + break; case CPP_PLUS: case CPP_MINUS: if (c_dialect_objc ()) @@ -1073,6 +1137,7 @@ c_parser_external_declaration (c_parser *parser) } } + /* Parse a declaration or function definition (C90 6.5, 6.7.1, C99 6.7, 6.9.1). If FNDEF_OK is true, a function definition is accepted; otherwise (old-style parameter declarations) only other @@ -1133,6 +1198,7 @@ c_parser_declaration_or_fndef (c_parser *parser, bool fndef_ok, bool empty_ok, tree prefix_attrs; tree all_prefix_attrs; bool diagnosed_no_specs = false; + specs = build_null_declspecs (); c_parser_declspecs (parser, specs, true, true, start_attr_ok); if (parser->error) @@ -1396,6 +1462,9 @@ c_parser_asm_definition (c_parser *parser) type-specifier: typeof-specifier + _Decimal32 + _Decimal64 + _Decimal128 Objective-C: @@ -1494,6 +1563,9 @@ c_parser_declspecs (c_parser *parser, struct c_declspecs *specs, case RID_FLOAT: case RID_DOUBLE: case RID_VOID: + case RID_DFLOAT32: + case RID_DFLOAT64: + case RID_DFLOAT128: case RID_BOOL: if (!typespec_ok) goto out; @@ -1793,6 +1865,12 @@ c_parser_struct_or_union_specifier (c_parser *parser) c_parser_consume_token (parser); break; } + /* Accept #pragmas at struct scope. */ + if (c_parser_next_token_is (parser, CPP_PRAGMA)) + { + c_parser_pragma (parser, pragma_external); + continue; + } /* Parse some comma-separated declarations, but not the trailing semicolon if any. */ decls = c_parser_struct_declaration (parser); @@ -2714,6 +2792,9 @@ c_parser_attributes (c_parser *parser) case RID_FLOAT: case RID_DOUBLE: case RID_VOID: + case RID_DFLOAT32: + case RID_DFLOAT64: + case RID_DFLOAT128: case RID_BOOL: ok = true; break; @@ -3250,11 +3331,6 @@ c_parser_compound_statement_nostart (c_parser *parser) while (c_parser_next_token_is_not (parser, CPP_CLOSE_BRACE)) { location_t loc = c_parser_peek_token (parser)->location; - if (c_parser_next_token_is (parser, CPP_EOF)) - { - c_parser_error (parser, "expected declaration or statement"); - return; - } if (c_parser_next_token_is_keyword (parser, RID_CASE) || c_parser_next_token_is_keyword (parser, RID_DEFAULT) || (c_parser_next_token_is (parser, CPP_NAME) @@ -3307,6 +3383,21 @@ c_parser_compound_statement_nostart (c_parser *parser) else goto statement; } + else if (c_parser_next_token_is (parser, CPP_PRAGMA)) + { + /* External pragmas, and some omp pragmas, are not associated + with regular c code, and so are not to be considered statements + syntactically. This ensures that the user doesn't put them + places that would turn into syntax errors if the directive + were ignored. */ + if (c_parser_pragma (parser, pragma_compound)) + last_label = false, last_stmt = true; + } + else if (c_parser_next_token_is (parser, CPP_EOF)) + { + c_parser_error (parser, "expected declaration or statement"); + return; + } else { statement: @@ -3560,6 +3651,9 @@ c_parser_statement_after_labels (c_parser *parser) c_parser_error (parser, "expected statement"); c_parser_consume_token (parser); break; + case CPP_PRAGMA: + c_parser_pragma (parser, pragma_stmt); + break; default: expr_stmt: stmt = c_finish_expr_stmt (c_parser_expression_conv (parser).value); @@ -3629,7 +3723,7 @@ c_parser_if_body (c_parser *parser, bool *if_p) c_parser_label (parser); *if_p = c_parser_next_token_is_keyword (parser, RID_IF); if (extra_warnings && c_parser_next_token_is (parser, CPP_SEMICOLON)) - add_stmt (build (NOP_EXPR, NULL_TREE, NULL_TREE)); + add_stmt (build1 (NOP_EXPR, NULL_TREE, NULL_TREE)); c_parser_statement_after_labels (parser); return c_end_compound_stmt (block, flag_isoc99); } @@ -3692,7 +3786,7 @@ c_parser_switch_statement (c_parser *parser) body = c_parser_c99_block_statement (parser); c_finish_case (body); if (c_break_label) - add_stmt (build (LABEL_EXPR, void_type_node, c_break_label)); + add_stmt (build1 (LABEL_EXPR, void_type_node, c_break_label)); c_break_label = save_break; add_stmt (c_end_compound_stmt (block, flag_isoc99)); } @@ -5540,6 +5634,12 @@ c_parser_objc_class_instance_variables (c_parser *parser) objc_set_visibility (1); continue; } + else if (c_parser_next_token_is (parser, CPP_PRAGMA)) + { + c_parser_pragma (parser, pragma_external); + continue; + } + /* Parse some comma-separated declarations. */ decls = c_parser_struct_declaration (parser); { @@ -5766,6 +5866,9 @@ c_parser_objc_methodprotolist (c_parser *parser) case CPP_MINUS: c_parser_objc_methodproto (parser); break; + case CPP_PRAGMA: + c_parser_pragma (parser, pragma_external); + break; case CPP_EOF: return; default: @@ -6244,17 +6347,101 @@ c_parser_objc_keywordexpr (c_parser *parser) } -/* The actual parser and external interface. ??? Does this need to be - garbage-collected? */ +/* Handle pragmas. ALLOW_STMT is true if we're within the context of + a function and such pragmas are to be allowed. Returns true if we + actually parsed such a pragma. */ -static GTY (()) c_parser *the_parser; +static bool +c_parser_pragma (c_parser *parser, enum pragma_context context ATTRIBUTE_UNUSED) +{ + unsigned int id; + + id = c_parser_peek_token (parser)->pragma_kind; + gcc_assert (id != PRAGMA_NONE); + + switch (id) + { + case PRAGMA_GCC_PCH_PREPROCESS: + c_parser_error (parser, "%<#pragma GCC pch_preprocess%> must be first"); + c_parser_skip_until_found (parser, CPP_PRAGMA_EOL, NULL); + return false; + + default: + gcc_assert (id >= PRAGMA_FIRST_EXTERNAL); + break; + } + + c_parser_consume_pragma (parser); + c_invoke_pragma_handler (id); + + /* Skip to EOL, but suppress any error message. Those will have been + generated by the handler routine through calling error, as opposed + to calling c_parser_error. */ + parser->error = true; + c_parser_skip_to_pragma_eol (parser); + return false; +} + +/* The interface the pragma parsers have to the lexer. */ + +enum cpp_ttype +pragma_lex (tree *value) +{ + c_token *tok = c_parser_peek_token (the_parser); + enum cpp_ttype ret = tok->type; + + *value = tok->value; + if (ret == CPP_PRAGMA_EOL || ret == CPP_EOF) + ret = CPP_EOF; + else + { + if (ret == CPP_KEYWORD) + ret = CPP_NAME; + c_parser_consume_token (the_parser); + } + + return ret; +} + +static void +c_parser_pragma_pch_preprocess (c_parser *parser) +{ + tree name = NULL; + + c_parser_consume_pragma (parser); + if (c_parser_next_token_is (parser, CPP_STRING)) + { + name = c_parser_peek_token (parser)->value; + c_parser_consume_token (parser); + } + else + c_parser_error (parser, "expected string literal"); + c_parser_skip_to_pragma_eol (parser); + + if (name) + c_common_pch_pragma (parse_in, TREE_STRING_POINTER (name)); +} + /* Parse a single source file. */ void c_parse_file (void) { - the_parser = c_parser_new (); + /* Use local storage to begin. If the first token is a pragma, parse it. + If it is #pragma GCC pch_preprocess, then this will load a PCH file + which will cause garbage collection. */ + c_parser tparser; + + memset (&tparser, 0, sizeof tparser); + the_parser = &tparser; + + if (c_parser_peek_token (&tparser)->pragma_kind == PRAGMA_GCC_PCH_PREPROCESS) + c_parser_pragma_pch_preprocess (&tparser); + + the_parser = GGC_NEW (c_parser); + *the_parser = tparser; + c_parser_translation_unit (the_parser); the_parser = NULL; } diff --git a/gcc/c-pch.c b/gcc/c-pch.c index d066b657b08..37c8c30da9c 100644 --- a/gcc/c-pch.c +++ b/gcc/c-pch.c @@ -187,7 +187,7 @@ c_common_write_pch (void) if (fwrite (&h, sizeof (h), 1, pch_outfile) != 1) fatal_error ("can%'t write %s: %m", pch_file); - buf = xmalloc (16384); + buf = XNEWVEC (char, 16384); if (fseek (asm_out_file, asm_file_startpos, SEEK_SET) != 0) fatal_error ("can%'t seek in %s: %m", asm_file_name); @@ -385,7 +385,7 @@ c_common_read_pch (cpp_reader *pfile, const char *name, if (!flag_preprocess_only) { unsigned long written; - char * buf = xmalloc (16384); + char * buf = XNEWVEC (char, 16384); for (written = 0; written < h.asm_size; ) { @@ -441,18 +441,10 @@ c_common_no_more_pch (void) #endif void -c_common_pch_pragma (cpp_reader *pfile) +c_common_pch_pragma (cpp_reader *pfile, const char *name) { - tree name_t; - const char *name; int fd; - if (c_lex (&name_t) != CPP_STRING) - { - error ("malformed #pragma GCC pch_preprocess, ignored"); - return; - } - if (!cpp_get_options (pfile)->preprocessed) { error ("pch_preprocess pragma should only be used with -fpreprocessed"); @@ -460,8 +452,6 @@ c_common_pch_pragma (cpp_reader *pfile) return; } - name = TREE_STRING_POINTER (name_t); - fd = open (name, O_RDONLY | O_BINARY, 0666); if (fd == -1) fatal_error ("%s: couldn%'t open PCH file: %m", name); diff --git a/gcc/c-ppoutput.c b/gcc/c-ppoutput.c index ddc12ceed85..52187a726ab 100644 --- a/gcc/c-ppoutput.c +++ b/gcc/c-ppoutput.c @@ -246,7 +246,8 @@ print_line (source_location src_loc, const char *special_flags) const struct line_map *map = linemap_lookup (&line_table, src_loc); size_t to_file_len = strlen (map->to_file); - unsigned char *to_file_quoted = alloca (to_file_len * 4 + 1); + unsigned char *to_file_quoted = + (unsigned char *) alloca (to_file_len * 4 + 1); unsigned char *p; print.src_line = SOURCE_LINE (map, src_loc); @@ -368,7 +369,8 @@ void pp_dir_change (cpp_reader *pfile ATTRIBUTE_UNUSED, const char *dir) { size_t to_file_len = strlen (dir); - unsigned char *to_file_quoted = alloca (to_file_len * 4 + 1); + unsigned char *to_file_quoted = + (unsigned char *) alloca (to_file_len * 4 + 1); unsigned char *p; /* cpp_quote_string does not nul-terminate, so we have to do it ourselves. */ diff --git a/gcc/c-pragma.c b/gcc/c-pragma.c index 1407a114c52..e2a46773a95 100644 --- a/gcc/c-pragma.c +++ b/gcc/c-pragma.c @@ -37,6 +37,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA #include "vec.h" #include "target.h" + #define GCC_BAD(gmsgid) \ do { warning (OPT_Wpragmas, gmsgid); return; } while (0) #define GCC_BAD2(gmsgid, arg) \ @@ -74,7 +75,7 @@ push_alignment (int alignment, tree id) { align_stack * entry; - entry = ggc_alloc (sizeof (* entry)); + entry = GGC_NEW (align_stack); entry->alignment = alignment; entry->id = id; @@ -147,10 +148,10 @@ handle_pragma_pack (cpp_reader * ARG_UNUSED (dummy)) enum cpp_ttype token; enum { set, push, pop } action; - if (c_lex (&x) != CPP_OPEN_PAREN) + if (pragma_lex (&x) != CPP_OPEN_PAREN) GCC_BAD ("missing %<(%> after %<#pragma pack%> - ignored"); - token = c_lex (&x); + token = pragma_lex (&x); if (token == CPP_CLOSE_PAREN) { action = set; @@ -160,7 +161,7 @@ handle_pragma_pack (cpp_reader * ARG_UNUSED (dummy)) { align = TREE_INT_CST_LOW (x); action = set; - if (c_lex (&x) != CPP_CLOSE_PAREN) + if (pragma_lex (&x) != CPP_CLOSE_PAREN) GCC_BAD ("malformed %<#pragma pack%> - ignored"); } else if (token == CPP_NAME) @@ -179,9 +180,9 @@ handle_pragma_pack (cpp_reader * ARG_UNUSED (dummy)) else GCC_BAD2 ("unknown action %qs for %<#pragma pack%> - ignored", op); - while ((token = c_lex (&x)) == CPP_COMMA) + while ((token = pragma_lex (&x)) == CPP_COMMA) { - token = c_lex (&x); + token = pragma_lex (&x); if (token == CPP_NAME && id == 0) { id = x; @@ -203,7 +204,7 @@ handle_pragma_pack (cpp_reader * ARG_UNUSED (dummy)) else GCC_BAD ("malformed %<#pragma pack%> - ignored"); - if (c_lex (&x) != CPP_EOF) + if (pragma_lex (&x) != CPP_EOF) warning (OPT_Wpragmas, "junk at end of %<#pragma pack%>"); if (flag_pack_struct) @@ -333,17 +334,17 @@ handle_pragma_weak (cpp_reader * ARG_UNUSED (dummy)) value = 0; - if (c_lex (&name) != CPP_NAME) + if (pragma_lex (&name) != CPP_NAME) GCC_BAD ("malformed #pragma weak, ignored"); - t = c_lex (&x); + t = pragma_lex (&x); if (t == CPP_EQ) { - if (c_lex (&value) != CPP_NAME) + if (pragma_lex (&value) != CPP_NAME) GCC_BAD ("malformed #pragma weak, ignored"); - t = c_lex (&x); + t = pragma_lex (&x); } if (t != CPP_EOF) - warning (OPT_Wpragmas, "junk at end of #pragma weak"); + warning (OPT_Wpragmas, "junk at end of %<#pragma weak%>"); decl = identifier_global_value (name); if (decl && DECL_P (decl)) @@ -410,13 +411,13 @@ handle_pragma_redefine_extname (cpp_reader * ARG_UNUSED (dummy)) tree oldname, newname, decl, x; enum cpp_ttype t; - if (c_lex (&oldname) != CPP_NAME) + if (pragma_lex (&oldname) != CPP_NAME) GCC_BAD ("malformed #pragma redefine_extname, ignored"); - if (c_lex (&newname) != CPP_NAME) + if (pragma_lex (&newname) != CPP_NAME) GCC_BAD ("malformed #pragma redefine_extname, ignored"); - t = c_lex (&x); + t = pragma_lex (&x); if (t != CPP_EOF) - warning (OPT_Wpragmas, "junk at end of #pragma redefine_extname"); + warning (OPT_Wpragmas, "junk at end of %<#pragma redefine_extname%>"); if (!flag_mudflap && !targetm.handle_pragma_redefine_extname) { @@ -480,11 +481,11 @@ handle_pragma_extern_prefix (cpp_reader * ARG_UNUSED (dummy)) tree prefix, x; enum cpp_ttype t; - if (c_lex (&prefix) != CPP_STRING) + if (pragma_lex (&prefix) != CPP_STRING) GCC_BAD ("malformed #pragma extern_prefix, ignored"); - t = c_lex (&x); + t = pragma_lex (&x); if (t != CPP_EOF) - warning (OPT_Wpragmas, "junk at end of #pragma extern_prefix"); + warning (OPT_Wpragmas, "junk at end of %<#pragma extern_prefix%>"); if (targetm.handle_pragma_extern_prefix) /* Note that the length includes the null terminator. */ @@ -603,7 +604,7 @@ handle_pragma_visibility (cpp_reader *dummy ATTRIBUTE_UNUSED) enum { bad, push, pop } action = bad; static VEC (visibility, heap) *visstack; - token = c_lex (&x); + token = pragma_lex (&x); if (token == CPP_NAME) { const char *op = IDENTIFIER_POINTER (x); @@ -631,9 +632,9 @@ handle_pragma_visibility (cpp_reader *dummy ATTRIBUTE_UNUSED) } else { - if (c_lex (&x) != CPP_OPEN_PAREN) + if (pragma_lex (&x) != CPP_OPEN_PAREN) GCC_BAD ("missing %<(%> after %<#pragma GCC visibility push%> - ignored"); - token = c_lex (&x); + token = pragma_lex (&x); if (token != CPP_NAME) { GCC_BAD ("malformed #pragma GCC visibility push"); @@ -657,36 +658,75 @@ handle_pragma_visibility (cpp_reader *dummy ATTRIBUTE_UNUSED) } visibility_options.inpragma = 1; } - if (c_lex (&x) != CPP_CLOSE_PAREN) + if (pragma_lex (&x) != CPP_CLOSE_PAREN) GCC_BAD ("missing %<(%> after %<#pragma GCC visibility push%> - ignored"); } } - if (c_lex (&x) != CPP_EOF) + if (pragma_lex (&x) != CPP_EOF) warning (OPT_Wpragmas, "junk at end of %<#pragma GCC visibility%>"); } #endif +/* A vector of registered pragma callbacks. */ + +DEF_VEC_O (pragma_handler); +DEF_VEC_ALLOC_O (pragma_handler, heap); + +static VEC(pragma_handler, heap) *registered_pragmas; + /* Front-end wrappers for pragma registration to avoid dragging cpplib.h in almost everywhere. */ + +static void +c_register_pragma_1 (const char *space, const char *name, + pragma_handler handler, bool allow_expansion) +{ + unsigned id; + + VEC_safe_push (pragma_handler, heap, registered_pragmas, &handler); + id = VEC_length (pragma_handler, registered_pragmas); + id += PRAGMA_FIRST_EXTERNAL - 1; + + /* The C++ front end allocates 6 bits in cp_token; the C front end + allocates 7 bits in c_token. At present this is sufficient. */ + gcc_assert (id < 64); + + cpp_register_deferred_pragma (parse_in, space, name, id, + allow_expansion, false); +} + void -c_register_pragma (const char *space, const char *name, - void (*handler) (struct cpp_reader *)) +c_register_pragma (const char *space, const char *name, pragma_handler handler) { - cpp_register_pragma (parse_in, space, name, handler, 0); + c_register_pragma_1 (space, name, handler, false); } void c_register_pragma_with_expansion (const char *space, const char *name, - void (*handler) (struct cpp_reader *)) + pragma_handler handler) +{ + c_register_pragma_1 (space, name, handler, true); +} + +void +c_invoke_pragma_handler (unsigned int id) { - cpp_register_pragma (parse_in, space, name, handler, 1); + pragma_handler handler; + + id -= PRAGMA_FIRST_EXTERNAL; + handler = *VEC_index (pragma_handler, registered_pragmas, id); + + handler (parse_in); } /* Set up front-end pragmas. */ void init_pragma (void) { + cpp_register_deferred_pragma (parse_in, "GCC", "pch_preprocess", + PRAGMA_GCC_PCH_PREPROCESS, false, false); + #ifdef HANDLE_PRAGMA_PACK #ifdef HANDLE_PRAGMA_PACK_WITH_EXPANSION c_register_pragma_with_expansion (0, "pack", handle_pragma_pack); @@ -704,8 +744,6 @@ init_pragma (void) c_register_pragma (0, "redefine_extname", handle_pragma_redefine_extname); c_register_pragma (0, "extern_prefix", handle_pragma_extern_prefix); - c_register_pragma ("GCC", "pch_preprocess", c_common_pch_pragma); - #ifdef REGISTER_TARGET_PRAGMAS REGISTER_TARGET_PRAGMAS (); #endif diff --git a/gcc/c-pragma.h b/gcc/c-pragma.h index 749782dd56a..98765555ef4 100644 --- a/gcc/c-pragma.h +++ b/gcc/c-pragma.h @@ -24,6 +24,16 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA #include /* For enum cpp_ttype. */ +/* Pragma identifiers built in to the front end parsers. Identifiers + for anciliary handlers will follow these. */ +typedef enum pragma_kind { + PRAGMA_NONE = 0, + + PRAGMA_GCC_PCH_PREPROCESS, + + PRAGMA_FIRST_EXTERNAL +} pragma_kind; + /* Cause the `yydebug' variable to be defined. */ #define YYDEBUG 1 extern int yydebug; @@ -53,18 +63,23 @@ extern struct cpp_reader* parse_in; extern void init_pragma (void); -/* Front-end wrappers for pragma registration to avoid dragging - cpplib.h in almost everywhere. */ -extern void c_register_pragma (const char *, const char *, - void (*) (struct cpp_reader *)); +/* Front-end wrappers for pragma registration. */ +typedef void (*pragma_handler)(struct cpp_reader *); +extern void c_register_pragma (const char *, const char *, pragma_handler); extern void c_register_pragma_with_expansion (const char *, const char *, - void (*) (struct cpp_reader *)); + pragma_handler); +extern void c_invoke_pragma_handler (unsigned int); + extern void maybe_apply_pragma_weak (tree); extern void maybe_apply_pending_pragma_weaks (void); extern tree maybe_apply_renaming_pragma (tree, tree); extern void add_to_renaming_pragma_list (tree, tree); -extern enum cpp_ttype c_lex (tree *); +extern enum cpp_ttype pragma_lex (tree *); + +/* This is not actually available to pragma parsers. It's merely a + convenient location to declare this function for c-lex, after + having enum cpp_ttype declared. */ extern enum cpp_ttype c_lex_with_flags (tree *, location_t *, unsigned char *); /* If 1, then lex strings into the execution character set. diff --git a/gcc/c-pretty-print.c b/gcc/c-pretty-print.c index bbc19be9fd4..784038f3461 100644 --- a/gcc/c-pretty-print.c +++ b/gcc/c-pretty-print.c @@ -890,6 +890,12 @@ pp_c_floating_constant (c_pretty_printer *pp, tree r) pp_character (pp, 'f'); else if (TREE_TYPE (r) == long_double_type_node) pp_character (pp, 'l'); + else if (TREE_TYPE (r) == dfloat128_type_node) + pp_string (pp, "dl"); + else if (TREE_TYPE (r) == dfloat64_type_node) + pp_string (pp, "dd"); + else if (TREE_TYPE (r) == dfloat32_type_node) + pp_string (pp, "df"); } /* Pretty-print a compound literal expression. GNU extensions include @@ -1471,6 +1477,7 @@ pp_c_cast_expression (c_pretty_printer *pp, tree e) case FLOAT_EXPR: case FIX_TRUNC_EXPR: case CONVERT_EXPR: + case NOP_EXPR: pp_c_type_cast (pp, TREE_TYPE (e)); pp_c_cast_expression (pp, TREE_OPERAND (e, 0)); break; @@ -1849,6 +1856,7 @@ pp_c_expression (c_pretty_printer *pp, tree e) case FLOAT_EXPR: case FIX_TRUNC_EXPR: case CONVERT_EXPR: + case NOP_EXPR: pp_c_cast_expression (pp, e); break; @@ -1917,7 +1925,6 @@ pp_c_expression (c_pretty_printer *pp, tree e) pp_c_right_paren (pp); break; - case NOP_EXPR: case NON_LVALUE_EXPR: case SAVE_EXPR: pp_expression (pp, TREE_OPERAND (e, 0)); @@ -1973,6 +1980,7 @@ pp_c_pretty_printer_init (c_pretty_printer *pp) pp->statement = pp_c_statement; + pp->constant = pp_c_constant; pp->id_expression = pp_c_id_expression; pp->primary_expression = pp_c_primary_expression; pp->postfix_expression = pp_c_postfix_expression; diff --git a/gcc/c-pretty-print.h b/gcc/c-pretty-print.h index 0f9d46a86e7..14cb670c7ed 100644 --- a/gcc/c-pretty-print.h +++ b/gcc/c-pretty-print.h @@ -80,6 +80,7 @@ struct c_pretty_print_info c_pretty_print_fn statement; + c_pretty_print_fn constant; c_pretty_print_fn id_expression; c_pretty_print_fn primary_expression; c_pretty_print_fn postfix_expression; @@ -129,6 +130,8 @@ struct c_pretty_print_info #define pp_statement(PPI, S) \ pp_c_base (PPI)->statement (pp_c_base (PPI), S) +#define pp_constant(PP, E) \ + pp_c_base (PP)->constant (pp_c_base (PP), E) #define pp_id_expression(PP, E) \ pp_c_base (PP)->id_expression (pp_c_base (PP), E) #define pp_primary_expression(PPI, E) \ diff --git a/gcc/c-tree.h b/gcc/c-tree.h index 6468ef27cc6..db6c3828cc4 100644 --- a/gcc/c-tree.h +++ b/gcc/c-tree.h @@ -207,7 +207,10 @@ enum c_typespec_keyword { cts_char, cts_int, cts_float, - cts_double + cts_double, + cts_dfloat32, + cts_dfloat64, + cts_dfloat128 }; /* A sequence of declaration specifiers in C. */ diff --git a/gcc/c-typeck.c b/gcc/c-typeck.c index 80259cc811d..bda87890de5 100644 --- a/gcc/c-typeck.c +++ b/gcc/c-typeck.c @@ -1,6 +1,7 @@ /* Build expressions with type checking for C compiler. Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, - 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. + 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 + Free Software Foundation, Inc. This file is part of GCC. @@ -74,6 +75,7 @@ static int missing_braces_mentioned; static int require_constant_value; static int require_constant_elements; +static bool null_pointer_constant_p (tree); static tree qualify_type (tree, tree); static int tagged_types_tu_compatible_p (tree, tree); static int comp_target_types (tree, tree); @@ -106,6 +108,23 @@ static int lvalue_or_else (tree, enum lvalue_use); static int lvalue_p (tree); static void record_maybe_used_decl (tree); static int comptypes_internal (tree, tree); + +/* Return true if EXP is a null pointer constant, false otherwise. */ + +static bool +null_pointer_constant_p (tree expr) +{ + /* This should really operate on c_expr structures, but they aren't + yet available everywhere required. */ + tree type = TREE_TYPE (expr); + return (TREE_CODE (expr) == INTEGER_CST + && !TREE_CONSTANT_OVERFLOW (expr) + && integer_zerop (expr) + && (INTEGRAL_TYPE_P (type) + || (TREE_CODE (type) == POINTER_TYPE + && VOID_TYPE_P (TREE_TYPE (type)) + && TYPE_QUALS (TREE_TYPE (type)) == TYPE_UNQUALIFIED))); +} /* This is a cache to hold if two types are compatible or not. */ struct tagged_tu_seen_cache { @@ -599,6 +618,22 @@ c_common_type (tree t1, tree t2) if (code2 == REAL_TYPE && code1 != REAL_TYPE) return t2; + /* If both are real and either are decimal floating point types, use + the decimal floating point type with the greater precision. */ + + if (code1 == REAL_TYPE && code2 == REAL_TYPE) + { + if (TYPE_MAIN_VARIANT (t1) == dfloat128_type_node + || TYPE_MAIN_VARIANT (t2) == dfloat128_type_node) + return dfloat128_type_node; + else if (TYPE_MAIN_VARIANT (t1) == dfloat64_type_node + || TYPE_MAIN_VARIANT (t2) == dfloat64_type_node) + return dfloat64_type_node; + else if (TYPE_MAIN_VARIANT (t1) == dfloat32_type_node + || TYPE_MAIN_VARIANT (t2) == dfloat32_type_node) + return dfloat32_type_node; + } + /* Both real or both integers; use the one with greater precision. */ if (TYPE_PRECISION (t1) > TYPE_PRECISION (t2)) @@ -900,7 +935,7 @@ same_translation_unit_p (tree t1, tree t2) static struct tagged_tu_seen_cache * alloc_tagged_tu_seen_cache (tree t1, tree t2) { - struct tagged_tu_seen_cache *tu = xmalloc (sizeof (struct tagged_tu_seen_cache)); + struct tagged_tu_seen_cache *tu = XNEW (struct tagged_tu_seen_cache); tu->next = tagged_tu_seen_base; tu->t1 = t1; tu->t2 = t2; @@ -1467,7 +1502,8 @@ default_function_array_conversion (struct c_expr exp) bool lvalue_array_p; while ((TREE_CODE (exp.value) == NON_LVALUE_EXPR - || TREE_CODE (exp.value) == NOP_EXPR) + || TREE_CODE (exp.value) == NOP_EXPR + || TREE_CODE (exp.value) == CONVERT_EXPR) && TREE_TYPE (TREE_OPERAND (exp.value, 0)) == type) { if (TREE_CODE (exp.value) == NON_LVALUE_EXPR) @@ -1859,16 +1895,10 @@ build_array_ref (tree array, tree index) return error_mark_node; } - /* Subscripting with type char is likely to lose on a machine where - chars are signed. So warn on any machine, but optionally. Don't - warn for unsigned char since that type is safe. Don't warn for - signed char because anyone who uses that must have done so - deliberately. ??? Existing practice has also been to warn only - when the char index is syntactically the index, not for - char[array]. */ - if (!swapped - && TYPE_MAIN_VARIANT (TREE_TYPE (index)) == char_type_node) - warning (OPT_Wchar_subscripts, "array subscript has type %"); + /* ??? Existing practice has been to warn only when the char + index is syntactically the index, not for char[array]. */ + if (!swapped) + warn_array_subscript_with_type_char (index); /* Apply default promotions *after* noticing character types. */ index = default_conversion (index); @@ -2167,7 +2197,8 @@ build_function_call (tree function, tree params) expression if necessary. This has the nice side-effect to prevent the tree-inliner from generating invalid assignment trees which may blow up in the RTL expander later. */ - if (TREE_CODE (function) == NOP_EXPR + if ((TREE_CODE (function) == NOP_EXPR + || TREE_CODE (function) == CONVERT_EXPR) && TREE_CODE (tem = TREE_OPERAND (function, 0)) == ADDR_EXPR && TREE_CODE (tem = TREE_OPERAND (tem, 0)) == FUNCTION_DECL && !comptypes (fntype, TREE_TYPE (tem))) @@ -2195,7 +2226,7 @@ build_function_call (tree function, tree params) rhs = build_compound_literal (return_type, build_constructor (return_type, 0)); else - rhs = fold_build1 (NOP_EXPR, return_type, integer_zero_node); + rhs = fold_convert (return_type, integer_zero_node); return build2 (COMPOUND_EXPR, return_type, trap, rhs); } @@ -2356,10 +2387,37 @@ convert_arguments (tree typelist, tree values, tree function, tree fundecl) { /* Warn if any argument is passed as `float', since without a prototype it would be `double'. */ - if (formal_prec == TYPE_PRECISION (float_type_node)) + if (formal_prec == TYPE_PRECISION (float_type_node) + && type != dfloat32_type_node) warning (0, "passing argument %d of %qE as % " "rather than % due to prototype", argnum, rname); + + /* Warn if mismatch between argument and prototype + for decimal float types. Warn of conversions with + binary float types and of precision narrowing due to + prototype. */ + else if (type != TREE_TYPE (val) + && (type == dfloat32_type_node + || type == dfloat64_type_node + || type == dfloat128_type_node + || TREE_TYPE (val) == dfloat32_type_node + || TREE_TYPE (val) == dfloat64_type_node + || TREE_TYPE (val) == dfloat128_type_node) + && (formal_prec + <= TYPE_PRECISION (TREE_TYPE (val)) + || (type == dfloat128_type_node + && (TREE_TYPE (val) + != dfloat64_type_node + && (TREE_TYPE (val) + != dfloat32_type_node))) + || (type == dfloat64_type_node + && (TREE_TYPE (val) + != dfloat32_type_node)))) + warning (0, "passing argument %d of %qE as %qT " + "rather than %qT due to prototype", + argnum, rname, type, TREE_TYPE (val)); + } /* Detect integer changing in width or signedness. These warnings are only activated with @@ -2422,7 +2480,8 @@ convert_arguments (tree typelist, tree values, tree function, tree fundecl) } else if (TREE_CODE (TREE_TYPE (val)) == REAL_TYPE && (TYPE_PRECISION (TREE_TYPE (val)) - < TYPE_PRECISION (double_type_node))) + < TYPE_PRECISION (double_type_node)) + && !DECIMAL_FLOAT_MODE_P (TYPE_MODE (TREE_TYPE (val)))) /* Convert `float' to `double'. */ result = tree_cons (NULL_TREE, convert (double_type_node, val), result); else if ((invalid_func_diag = @@ -2556,6 +2615,20 @@ parser_build_binary_op (enum tree_code code, struct c_expr arg1, } + /* Warn about comparisons against string literals, with the exception + of testing for equality or inequality of a string literal with NULL. */ + if (code == EQ_EXPR || code == NE_EXPR) + { + if ((code1 == STRING_CST && !integer_zerop (arg2.value)) + || (code2 == STRING_CST && !integer_zerop (arg1.value))) + warning (OPT_Wstring_literal_comparison, + "comparison with string literal"); + } + else if (TREE_CODE_CLASS (code) == tcc_comparison + && (code1 == STRING_CST || code2 == STRING_CST)) + warning (OPT_Wstring_literal_comparison, + "comparison with string literal"); + unsigned_conversion_warning (result.value, arg1.value); unsigned_conversion_warning (result.value, arg2.value); overflow_warning (result.value); @@ -2591,8 +2664,18 @@ pointer_diff (tree op0, tree op1) different mode in place.) So first try to find a common term here 'by hand'; we want to cover at least the cases that occur in legal static initializers. */ - con0 = TREE_CODE (op0) == NOP_EXPR ? TREE_OPERAND (op0, 0) : op0; - con1 = TREE_CODE (op1) == NOP_EXPR ? TREE_OPERAND (op1, 0) : op1; + if ((TREE_CODE (op0) == NOP_EXPR || TREE_CODE (op0) == CONVERT_EXPR) + && (TYPE_PRECISION (TREE_TYPE (op0)) + == TYPE_PRECISION (TREE_TYPE (TREE_OPERAND (op0, 0))))) + con0 = TREE_OPERAND (op0, 0); + else + con0 = op0; + if ((TREE_CODE (op1) == NOP_EXPR || TREE_CODE (op1) == CONVERT_EXPR) + && (TYPE_PRECISION (TREE_TYPE (op1)) + == TYPE_PRECISION (TREE_TYPE (TREE_OPERAND (op1, 0))))) + con1 = TREE_OPERAND (op1, 0); + else + con1 = op1; if (TREE_CODE (con0) == PLUS_EXPR) { @@ -2751,9 +2834,6 @@ build_unary_op (enum tree_code code, tree xarg, int flag) arg = c_objc_common_truthvalue_conversion (arg); return invert_truthvalue (arg); - case NOP_EXPR: - break; - case REALPART_EXPR: if (TREE_CODE (arg) == COMPLEX_CST) return TREE_REALPART (arg); @@ -2931,7 +3011,7 @@ build_unary_op (enum tree_code code, tree xarg, int flag) return val; default: - break; + gcc_unreachable (); } if (argtype == 0) @@ -3188,11 +3268,9 @@ build_conditional_expr (tree ifexp, tree op1, tree op2) { if (comp_target_types (type1, type2)) result_type = common_pointer_type (type1, type2); - else if (integer_zerop (op1) && TREE_TYPE (type1) == void_type_node - && TREE_CODE (orig_op1) != NOP_EXPR) + else if (null_pointer_constant_p (orig_op1)) result_type = qualify_type (type2, type1); - else if (integer_zerop (op2) && TREE_TYPE (type2) == void_type_node - && TREE_CODE (orig_op2) != NOP_EXPR) + else if (null_pointer_constant_p (orig_op2)) result_type = qualify_type (type1, type2); else if (VOID_TYPE_P (TREE_TYPE (type1))) { @@ -3218,7 +3296,7 @@ build_conditional_expr (tree ifexp, tree op1, tree op2) } else if (code1 == POINTER_TYPE && code2 == INTEGER_TYPE) { - if (!integer_zerop (op2)) + if (!null_pointer_constant_p (orig_op2)) pedwarn ("pointer/integer type mismatch in conditional expression"); else { @@ -3228,7 +3306,7 @@ build_conditional_expr (tree ifexp, tree op1, tree op2) } else if (code2 == POINTER_TYPE && code1 == INTEGER_TYPE) { - if (!integer_zerop (op1)) + if (!null_pointer_constant_p (orig_op1)) pedwarn ("pointer/integer type mismatch in conditional expression"); else { @@ -3276,11 +3354,13 @@ build_compound_expr (tree expr1, tree expr2) if (warn_unused_value) { if (VOID_TYPE_P (TREE_TYPE (expr1)) - && TREE_CODE (expr1) == CONVERT_EXPR) + && (TREE_CODE (expr1) == NOP_EXPR + || TREE_CODE (expr1) == CONVERT_EXPR)) ; /* (void) a, b */ else if (VOID_TYPE_P (TREE_TYPE (expr1)) && TREE_CODE (expr1) == COMPOUND_EXPR - && TREE_CODE (TREE_OPERAND (expr1, 1)) == CONVERT_EXPR) + && (TREE_CODE (TREE_OPERAND (expr1, 1)) == CONVERT_EXPR + || TREE_CODE (TREE_OPERAND (expr1, 1)) == NOP_EXPR)) ; /* (void) a, (void) b, c */ else warning (0, "left-hand operand of comma expression has no effect"); @@ -3429,8 +3509,12 @@ build_c_cast (tree type, tree expr) if (TREE_CODE (type) == INTEGER_TYPE && TREE_CODE (otype) == POINTER_TYPE - && TYPE_PRECISION (type) != TYPE_PRECISION (otype) - && !TREE_CONSTANT (value)) + && TYPE_PRECISION (type) != TYPE_PRECISION (otype)) + /* Unlike conversion of integers to pointers, where the + warning is disabled for converting constants because + of cases such as SIG_*, warn about converting constant + pointers to integers. In some cases it may cause unwanted + sign extension, and a warning is appropriate. */ warning (OPT_Wpointer_to_int_cast, "cast from pointer to integer of different size"); @@ -3447,33 +3531,7 @@ build_c_cast (tree type, tree expr) warning (OPT_Wint_to_pointer_cast, "cast to pointer from integer " "of different size"); - if (flag_strict_aliasing && warn_strict_aliasing - && TREE_CODE (type) == POINTER_TYPE - && TREE_CODE (otype) == POINTER_TYPE - && TREE_CODE (expr) == ADDR_EXPR - && (DECL_P (TREE_OPERAND (expr, 0)) - || TREE_CODE (TREE_OPERAND (expr, 0)) == COMPONENT_REF) - && !VOID_TYPE_P (TREE_TYPE (type))) - { - /* Casting the address of an object to non void pointer. Warn - if the cast breaks type based aliasing. */ - if (!COMPLETE_TYPE_P (TREE_TYPE (type))) - warning (OPT_Wstrict_aliasing, "type-punning to incomplete type " - "might break strict-aliasing rules"); - else - { - HOST_WIDE_INT set1 = get_alias_set (TREE_TYPE (TREE_OPERAND (expr, 0))); - HOST_WIDE_INT set2 = get_alias_set (TREE_TYPE (type)); - - if (!alias_sets_conflict_p (set1, set2)) - warning (OPT_Wstrict_aliasing, "dereferencing type-punned " - "pointer will break strict-aliasing rules"); - else if (warn_strict_aliasing > 1 - && !alias_sets_might_conflict_p (set1, set2)) - warning (OPT_Wstrict_aliasing, "dereferencing type-punned " - "pointer might break strict-aliasing rules"); - } - } + strict_aliasing_warning (otype, type, expr); /* If pedantic, warn for conversions between function and object pointer types, except for converting a null pointer constant @@ -3490,8 +3548,7 @@ build_c_cast (tree type, tree expr) && TREE_CODE (otype) == POINTER_TYPE && TREE_CODE (TREE_TYPE (type)) == FUNCTION_TYPE && TREE_CODE (TREE_TYPE (otype)) != FUNCTION_TYPE - && !(integer_zerop (value) && TREE_TYPE (otype) == void_type_node - && TREE_CODE (expr) != NOP_EXPR)) + && !null_pointer_constant_p (value)) pedwarn ("ISO C forbids conversion of object pointer to function pointer type"); ovalue = value; @@ -3844,9 +3901,7 @@ convert_for_assignment (tree type, tree rhs, enum impl_conv errtype, } /* Can convert integer zero to any pointer type. */ - if (integer_zerop (rhs) - || (TREE_CODE (rhs) == NOP_EXPR - && integer_zerop (TREE_OPERAND (rhs, 0)))) + if (null_pointer_constant_p (rhs)) { rhs = null_pointer_node; break; @@ -3984,9 +4039,7 @@ convert_for_assignment (tree type, tree rhs, enum impl_conv errtype, && ((VOID_TYPE_P (ttl) && TREE_CODE (ttr) == FUNCTION_TYPE) || (VOID_TYPE_P (ttr) - /* Check TREE_CODE to catch cases like (void *) (char *) 0 - which are not ANSI null ptr constants. */ - && (!integer_zerop (rhs) || TREE_CODE (rhs) == NOP_EXPR) + && !null_pointer_constant_p (rhs) && TREE_CODE (ttl) == FUNCTION_TYPE))) WARN_FOR_ASSIGNMENT (G_("ISO C forbids passing argument %d of " "%qE between function pointer " @@ -4076,12 +4129,7 @@ convert_for_assignment (tree type, tree rhs, enum impl_conv errtype, /* An explicit constant 0 can convert to a pointer, or one that results from arithmetic, even including a cast to integer type. */ - if (!(TREE_CODE (rhs) == INTEGER_CST && integer_zerop (rhs)) - && - !(TREE_CODE (rhs) == NOP_EXPR - && TREE_CODE (TREE_TYPE (rhs)) == INTEGER_TYPE - && TREE_CODE (TREE_OPERAND (rhs, 0)) == INTEGER_CST - && integer_zerop (TREE_OPERAND (rhs, 0)))) + if (!null_pointer_constant_p (rhs)) WARN_FOR_ASSIGNMENT (G_("passing argument %d of %qE makes " "pointer from integer without a cast"), G_("assignment makes pointer from integer " @@ -4839,7 +4887,7 @@ void start_init (tree decl, tree asmspec_tree ATTRIBUTE_UNUSED, int top_level) { const char *locus; - struct initializer_stack *p = xmalloc (sizeof (struct initializer_stack)); + struct initializer_stack *p = XNEW (struct initializer_stack); p->decl = constructor_decl; p->require_constant_value = require_constant_value; @@ -7919,14 +7967,14 @@ build_binary_op (enum tree_code code, tree orig_op0, tree orig_op1, { /* op0 != orig_op0 detects the case of something whose value is 0 but which isn't a valid null ptr const. */ - if (pedantic && (!integer_zerop (op0) || op0 != orig_op0) + if (pedantic && !null_pointer_constant_p (orig_op0) && TREE_CODE (tt1) == FUNCTION_TYPE) pedwarn ("ISO C forbids comparison of %" " with function pointer"); } else if (VOID_TYPE_P (tt1)) { - if (pedantic && (!integer_zerop (op1) || op1 != orig_op1) + if (pedantic && !null_pointer_constant_p (orig_op1) && TREE_CODE (tt0) == FUNCTION_TYPE) pedwarn ("ISO C forbids comparison of %" " with function pointer"); @@ -7939,12 +7987,24 @@ build_binary_op (enum tree_code code, tree orig_op0, tree orig_op1, if (result_type == NULL_TREE) result_type = ptr_type_node; } - else if (code0 == POINTER_TYPE && TREE_CODE (op1) == INTEGER_CST - && integer_zerop (op1)) - result_type = type0; - else if (code1 == POINTER_TYPE && TREE_CODE (op0) == INTEGER_CST - && integer_zerop (op0)) - result_type = type1; + else if (code0 == POINTER_TYPE && null_pointer_constant_p (orig_op1)) + { + if (TREE_CODE (op0) == ADDR_EXPR + && DECL_P (TREE_OPERAND (op0, 0)) + && !DECL_WEAK (TREE_OPERAND (op0, 0))) + warning (OPT_Walways_true, "the address of %qD will never be NULL", + TREE_OPERAND (op0, 0)); + result_type = type0; + } + else if (code1 == POINTER_TYPE && null_pointer_constant_p (orig_op0)) + { + if (TREE_CODE (op1) == ADDR_EXPR + && DECL_P (TREE_OPERAND (op1, 0)) + && !DECL_WEAK (TREE_OPERAND (op1, 0))) + warning (OPT_Walways_true, "the address of %qD will never be NULL", + TREE_OPERAND (op1, 0)); + result_type = type1; + } else if (code0 == POINTER_TYPE && code1 == INTEGER_TYPE) { result_type = type0; @@ -7983,15 +8043,13 @@ build_binary_op (enum tree_code code, tree orig_op0, tree orig_op1, pedwarn ("comparison of distinct pointer types lacks a cast"); } } - else if (code0 == POINTER_TYPE && TREE_CODE (op1) == INTEGER_CST - && integer_zerop (op1)) + else if (code0 == POINTER_TYPE && null_pointer_constant_p (orig_op1)) { result_type = type0; if (pedantic || extra_warnings) pedwarn ("ordered comparison of pointer with integer zero"); } - else if (code1 == POINTER_TYPE && TREE_CODE (op0) == INTEGER_CST - && integer_zerop (op0)) + else if (code1 == POINTER_TYPE && null_pointer_constant_p (orig_op0)) { result_type = type1; if (pedantic) diff --git a/gcc/caller-save.c b/gcc/caller-save.c index b5438743788..ea85044cfec 100644 --- a/gcc/caller-save.c +++ b/gcc/caller-save.c @@ -83,10 +83,6 @@ static int n_regs_saved; insn. */ static HARD_REG_SET referenced_regs; -/* Computed in mark_set_regs, holds all registers set by the current - instruction. */ -static HARD_REG_SET this_insn_sets; - static void mark_set_regs (rtx, rtx, void *); static void mark_referenced_regs (rtx); @@ -370,6 +366,10 @@ save_call_clobbered_regs (void) struct insn_chain *chain, *next; enum machine_mode save_mode [FIRST_PSEUDO_REGISTER]; + /* Computed in mark_set_regs, holds all registers set by the current + instruction. */ + HARD_REG_SET this_insn_sets; + CLEAR_HARD_REG_SET (hard_regs_saved); n_regs_saved = 0; @@ -448,7 +448,12 @@ save_call_clobbered_regs (void) multi-hard-reg pseudo; then the pseudo is considered live during the call, but the subreg that is set isn't. */ CLEAR_HARD_REG_SET (this_insn_sets); - note_stores (PATTERN (insn), mark_set_regs, NULL); + note_stores (PATTERN (insn), mark_set_regs, &this_insn_sets); + /* Sibcalls are considered to set the return value, + compare flow.c:propagate_one_insn. */ + if (SIBLING_CALL_P (insn) && current_function_return_rtx) + mark_set_regs (current_function_return_rtx, NULL_RTX, + &this_insn_sets); /* Compute which hard regs must be saved before this call. */ AND_COMPL_HARD_REG_SET (hard_regs_to_save, call_fixed_reg_set); @@ -484,16 +489,17 @@ save_call_clobbered_regs (void) } } -/* Here from note_stores when an insn stores a value in a register. +/* Here from note_stores, or directly from save_call_clobbered_regs, when + an insn stores a value in a register. Set the proper bit or bits in this_insn_sets. All pseudos that have been assigned hard regs have had their register number changed already, so we can ignore pseudos. */ static void -mark_set_regs (rtx reg, rtx setter ATTRIBUTE_UNUSED, - void *data ATTRIBUTE_UNUSED) +mark_set_regs (rtx reg, rtx setter ATTRIBUTE_UNUSED, void *data) { int regno, endregno, i; enum machine_mode mode = GET_MODE (reg); + HARD_REG_SET *this_insn_sets = data; if (GET_CODE (reg) == SUBREG) { @@ -511,7 +517,7 @@ mark_set_regs (rtx reg, rtx setter ATTRIBUTE_UNUSED, endregno = regno + hard_regno_nregs[regno][mode]; for (i = regno; i < endregno; i++) - SET_HARD_REG_BIT (this_insn_sets, i); + SET_HARD_REG_BIT (*this_insn_sets, i); } /* Here from note_stores when an insn stores a value in a register. diff --git a/gcc/cfg.c b/gcc/cfg.c index c46ac0b88ee..7b2a30fea6d 100644 --- a/gcc/cfg.c +++ b/gcc/cfg.c @@ -163,10 +163,13 @@ compact_blocks (void) int i; basic_block bb; - i = 0; - FOR_EACH_BB (bb) + SET_BASIC_BLOCK (ENTRY_BLOCK, ENTRY_BLOCK_PTR); + SET_BASIC_BLOCK (EXIT_BLOCK, EXIT_BLOCK_PTR); + + i = NUM_FIXED_BLOCKS; + FOR_EACH_BB (bb) { - BASIC_BLOCK (i) = bb; + SET_BASIC_BLOCK (i, bb); bb->index = i; i++; } @@ -174,7 +177,7 @@ compact_blocks (void) gcc_assert (i == n_basic_blocks); for (; i < last_basic_block; i++) - BASIC_BLOCK (i) = NULL; + SET_BASIC_BLOCK (i, NULL); last_basic_block = n_basic_blocks; } @@ -185,7 +188,7 @@ void expunge_block (basic_block b) { unlink_block (b); - BASIC_BLOCK (b->index) = NULL; + SET_BASIC_BLOCK (b->index, NULL); n_basic_blocks--; /* We should be able to ggc_free here, but we are not. The dead SSA_NAMES are left pointing to dead statements that are pointing diff --git a/gcc/cfganal.c b/gcc/cfganal.c index 3ed1c592186..efe5db7f6f5 100644 --- a/gcc/cfganal.c +++ b/gcc/cfganal.c @@ -152,7 +152,7 @@ could_fall_through (basic_block src, basic_block target) Steven Muchnick Morgan Kaufmann, 1997 - and heavily borrowed from flow_depth_first_order_compute. */ + and heavily borrowed from pre_and_rev_post_order_compute. */ bool mark_dfs_back_edges (void) @@ -345,7 +345,7 @@ create_edge_list (void) basic_block bb; edge_iterator ei; - block_count = n_basic_blocks + 2; /* Include the entry and exit blocks. */ + block_count = n_basic_blocks; /* Include the entry and exit blocks. */ num_edges = 0; @@ -391,7 +391,7 @@ print_edge_list (FILE *f, struct edge_list *elist) int x; fprintf (f, "Compressed edge list, %d BBs + entry & exit, and %d edges\n", - elist->num_blocks - 2, elist->num_edges); + elist->num_blocks, elist->num_edges); for (x = 0; x < elist->num_edges; x++) { @@ -645,16 +645,20 @@ connect_infinite_loops_to_exit (void) return; } -/* Compute reverse top sort order. */ +/* Compute reverse top sort order. + This is computing a post order numbering of the graph. */ -void -flow_reverse_top_sort_order_compute (int *rts_order) +int +post_order_compute (int *post_order, bool include_entry_exit) { edge_iterator *stack; int sp; - int postnum = 0; + int post_order_num = 0; sbitmap visited; + if (include_entry_exit) + post_order[post_order_num++] = EXIT_BLOCK; + /* Allocate stack for back-tracking up CFG. */ stack = xmalloc ((n_basic_blocks + 1) * sizeof (edge_iterator)); sp = 0; @@ -690,12 +694,12 @@ flow_reverse_top_sort_order_compute (int *rts_order) time, check its successors. */ stack[sp++] = ei_start (dest->succs); else - rts_order[postnum++] = dest->index; + post_order[post_order_num++] = dest->index; } else { if (ei_one_before_end_p (ei) && src != ENTRY_BLOCK_PTR) - rts_order[postnum++] = src->index; + post_order[post_order_num++] = src->index; if (!ei_one_before_end_p (ei)) ei_next (&stack[sp - 1]); @@ -704,30 +708,50 @@ flow_reverse_top_sort_order_compute (int *rts_order) } } + if (include_entry_exit) + post_order[post_order_num++] = ENTRY_BLOCK; + free (stack); sbitmap_free (visited); + return post_order_num; } /* Compute the depth first search order and store in the array - DFS_ORDER if nonzero, marking the nodes visited in VISITED. If - RC_ORDER is nonzero, return the reverse completion number for each + PRE_ORDER if nonzero, marking the nodes visited in VISITED. If + REV_POST_ORDER is nonzero, return the reverse completion number for each node. Returns the number of nodes visited. A depth first search tries to get as far away from the starting point as quickly as - possible. */ + possible. + + pre_order is a really a preorder numbering of the graph. + rev_post_order is really a reverse postorder numbering of the graph. + */ int -flow_depth_first_order_compute (int *dfs_order, int *rc_order) +pre_and_rev_post_order_compute (int *pre_order, int *rev_post_order, + bool include_entry_exit) { edge_iterator *stack; int sp; - int dfsnum = 0; - int rcnum = n_basic_blocks - 1; + int pre_order_num = 0; + int rev_post_order_num = n_basic_blocks - 1; sbitmap visited; /* Allocate stack for back-tracking up CFG. */ stack = xmalloc ((n_basic_blocks + 1) * sizeof (edge_iterator)); sp = 0; + if (include_entry_exit) + { + if (pre_order) + pre_order[pre_order_num] = ENTRY_BLOCK; + pre_order_num++; + if (rev_post_order) + rev_post_order[rev_post_order_num--] = ENTRY_BLOCK; + } + else + rev_post_order_num -= NUM_FIXED_BLOCKS; + /* Allocate bitmap to track nodes that have been visited. */ visited = sbitmap_alloc (last_basic_block); @@ -754,27 +778,27 @@ flow_depth_first_order_compute (int *dfs_order, int *rc_order) /* Mark that we have visited the destination. */ SET_BIT (visited, dest->index); - if (dfs_order) - dfs_order[dfsnum] = dest->index; + if (pre_order) + pre_order[pre_order_num] = dest->index; - dfsnum++; + pre_order_num++; if (EDGE_COUNT (dest->succs) > 0) /* Since the DEST node has been visited for the first time, check its successors. */ stack[sp++] = ei_start (dest->succs); - else if (rc_order) + else if (rev_post_order) /* There are no successors for the DEST node so assign its reverse completion number. */ - rc_order[rcnum--] = dest->index; + rev_post_order[rev_post_order_num--] = dest->index; } else { if (ei_one_before_end_p (ei) && src != ENTRY_BLOCK_PTR - && rc_order) + && rev_post_order) /* There are no more successors for the SRC node so assign its reverse completion number. */ - rc_order[rcnum--] = src->index; + rev_post_order[rev_post_order_num--] = src->index; if (!ei_one_before_end_p (ei)) ei_next (&stack[sp - 1]); @@ -786,10 +810,22 @@ flow_depth_first_order_compute (int *dfs_order, int *rc_order) free (stack); sbitmap_free (visited); - /* The number of nodes visited should be the number of blocks. */ - gcc_assert (dfsnum == n_basic_blocks); + if (include_entry_exit) + { + if (pre_order) + pre_order[pre_order_num] = EXIT_BLOCK; + pre_order_num++; + if (rev_post_order) + rev_post_order[rev_post_order_num--] = EXIT_BLOCK; + /* The number of nodes visited should be the number of blocks. */ + gcc_assert (pre_order_num == n_basic_blocks); + } + else + /* The number of nodes visited should be the number of blocks minus + the entry and exit blocks which are not visited here. */ + gcc_assert (pre_order_num == n_basic_blocks - NUM_FIXED_BLOCKS); - return dfsnum; + return pre_order_num; } /* Compute the depth first search order on the _reverse_ graph and @@ -826,12 +862,11 @@ static void flow_dfs_compute_reverse_init (depth_first_search_ds data) { /* Allocate stack for back-tracking up CFG. */ - data->stack = xmalloc ((n_basic_blocks - (INVALID_BLOCK + 1)) - * sizeof (basic_block)); + data->stack = xmalloc (n_basic_blocks * sizeof (basic_block)); data->sp = 0; /* Allocate bitmap to track nodes that have been visited. */ - data->visited_blocks = sbitmap_alloc (last_basic_block - (INVALID_BLOCK + 1)); + data->visited_blocks = sbitmap_alloc (last_basic_block); /* None of the nodes in the CFG have been visited yet. */ sbitmap_zero (data->visited_blocks); @@ -847,7 +882,7 @@ static void flow_dfs_compute_reverse_add_bb (depth_first_search_ds data, basic_block bb) { data->stack[data->sp++] = bb; - SET_BIT (data->visited_blocks, bb->index - (INVALID_BLOCK + 1)); + SET_BIT (data->visited_blocks, bb->index); } /* Continue the depth-first search through the reverse graph starting with the @@ -869,14 +904,13 @@ flow_dfs_compute_reverse_execute (depth_first_search_ds data, /* Perform depth-first search on adjacent vertices. */ FOR_EACH_EDGE (e, ei, bb->preds) - if (!TEST_BIT (data->visited_blocks, - e->src->index - (INVALID_BLOCK + 1))) + if (!TEST_BIT (data->visited_blocks, e->src->index)) flow_dfs_compute_reverse_add_bb (data, e->src); } /* Determine if there are unvisited basic blocks. */ FOR_BB_BETWEEN (bb, last_unvisited, NULL, prev_bb) - if (!TEST_BIT (data->visited_blocks, bb->index - (INVALID_BLOCK + 1))) + if (!TEST_BIT (data->visited_blocks, bb->index)) return bb; return NULL; @@ -912,12 +946,12 @@ dfs_enumerate_from (basic_block bb, int reverse, static sbitmap visited; static unsigned v_size; -#define MARK_VISITED(BB) (SET_BIT (visited, (BB)->index + 2)) -#define UNMARK_VISITED(BB) (RESET_BIT (visited, (BB)->index + 2)) -#define VISITED_P(BB) (TEST_BIT (visited, (BB)->index + 2)) +#define MARK_VISITED(BB) (SET_BIT (visited, (BB)->index)) +#define UNMARK_VISITED(BB) (RESET_BIT (visited, (BB)->index)) +#define VISITED_P(BB) (TEST_BIT (visited, (BB)->index)) /* Resize the VISITED sbitmap if necessary. */ - size = last_basic_block + 2; + size = last_basic_block; if (size < 10) size = 10; diff --git a/gcc/cfgbuild.c b/gcc/cfgbuild.c index e860e9885cd..6a7395abeeb 100644 --- a/gcc/cfgbuild.c +++ b/gcc/cfgbuild.c @@ -138,7 +138,7 @@ control_flow_insn_p (rtx insn) static int count_basic_blocks (rtx f) { - int count = 0; + int count = NUM_FIXED_BLOCKS; bool saw_insn = false; rtx insn; @@ -164,10 +164,10 @@ count_basic_blocks (rtx f) /* The rest of the compiler works a bit smoother when we don't have to check for the edge case of do-nothing functions with no basic blocks. */ - if (count == 0) + if (count == NUM_FIXED_BLOCKS) { emit_insn (gen_rtx_USE (VOIDmode, const0_rtx)); - count = 1; + count = NUM_FIXED_BLOCKS + 1; } return count; @@ -529,10 +529,11 @@ find_basic_blocks (rtx f) } n_basic_blocks = count_basic_blocks (f); - last_basic_block = 0; + last_basic_block = NUM_FIXED_BLOCKS; ENTRY_BLOCK_PTR->next_bb = EXIT_BLOCK_PTR; EXIT_BLOCK_PTR->prev_bb = ENTRY_BLOCK_PTR; + /* Size the basic block table. The actual structures will be allocated by find_basic_blocks_1, since we want to keep the structure pointers stable across calls to find_basic_blocks. */ @@ -541,7 +542,12 @@ find_basic_blocks (rtx f) instructions at all until close to the end of compilation when we actually lay them out. */ - VARRAY_BB_INIT (basic_block_info, n_basic_blocks, "basic_block_info"); + basic_block_info = VEC_alloc (basic_block, gc, n_basic_blocks); + VEC_safe_grow (basic_block, gc, basic_block_info, n_basic_blocks); + memset (VEC_address (basic_block, basic_block_info), 0, + sizeof (basic_block) * n_basic_blocks); + SET_BASIC_BLOCK (ENTRY_BLOCK, ENTRY_BLOCK_PTR); + SET_BASIC_BLOCK (EXIT_BLOCK, EXIT_BLOCK_PTR); find_basic_blocks_1 (f); diff --git a/gcc/cfgcleanup.c b/gcc/cfgcleanup.c index 66a0dec6488..8bc49a2abd8 100644 --- a/gcc/cfgcleanup.c +++ b/gcc/cfgcleanup.c @@ -62,7 +62,7 @@ static bool try_crossjump_to_edge (int, edge, edge); static bool try_crossjump_bb (int, basic_block); static bool outgoing_edges_match (int, basic_block, basic_block); static int flow_find_cross_jump (int, basic_block, basic_block, rtx *, rtx *); -static bool insns_match_p (int, rtx, rtx); +static bool old_insns_match_p (int, rtx, rtx); static void merge_blocks_move_predecessor_nojumps (basic_block, basic_block); static void merge_blocks_move_successor_nojumps (basic_block, basic_block); @@ -444,7 +444,7 @@ try_forward_edges (int mode, basic_block b) } target = first = e->dest; - counter = 0; + counter = NUM_FIXED_BLOCKS; /* If we are partitioning hot/cold basic_blocks, we don't want to mess up jumps that cross between hot/cold sections. @@ -506,7 +506,7 @@ try_forward_edges (int mode, basic_block b) if (t->dest == b) break; - gcc_assert (nthreaded_edges < n_basic_blocks); + gcc_assert (nthreaded_edges < n_basic_blocks - NUM_FIXED_BLOCKS); threaded_edges[nthreaded_edges++] = t; new_target = t->dest; @@ -976,7 +976,7 @@ merge_memattrs (rtx x, rtx y) /* Return true if I1 and I2 are equivalent and thus can be crossjumped. */ static bool -insns_match_p (int mode ATTRIBUTE_UNUSED, rtx i1, rtx i2) +old_insns_match_p (int mode ATTRIBUTE_UNUSED, rtx i1, rtx i2) { rtx p1, p2; @@ -1130,7 +1130,7 @@ flow_find_cross_jump (int mode ATTRIBUTE_UNUSED, basic_block bb1, if (i1 == BB_HEAD (bb1) || i2 == BB_HEAD (bb2)) break; - if (!insns_match_p (mode, i1, i2)) + if (!old_insns_match_p (mode, i1, i2)) break; merge_memattrs (i1, i2); @@ -1194,6 +1194,134 @@ flow_find_cross_jump (int mode ATTRIBUTE_UNUSED, basic_block bb1, return ninsns; } +/* Return true iff the condbranches at the end of BB1 and BB2 match. */ +bool +condjump_equiv_p (struct equiv_info *info, bool call_init) +{ + basic_block bb1 = info->x_block; + basic_block bb2 = info->y_block; + edge b1 = BRANCH_EDGE (bb1); + edge b2 = BRANCH_EDGE (bb2); + edge f1 = FALLTHRU_EDGE (bb1); + edge f2 = FALLTHRU_EDGE (bb2); + bool reverse, match; + rtx set1, set2, cond1, cond2; + rtx src1, src2; + enum rtx_code code1, code2; + + /* Get around possible forwarders on fallthru edges. Other cases + should be optimized out already. */ + if (FORWARDER_BLOCK_P (f1->dest)) + f1 = single_succ_edge (f1->dest); + + if (FORWARDER_BLOCK_P (f2->dest)) + f2 = single_succ_edge (f2->dest); + + /* To simplify use of this function, return false if there are + unneeded forwarder blocks. These will get eliminated later + during cleanup_cfg. */ + if (FORWARDER_BLOCK_P (f1->dest) + || FORWARDER_BLOCK_P (f2->dest) + || FORWARDER_BLOCK_P (b1->dest) + || FORWARDER_BLOCK_P (b2->dest)) + return false; + + if (f1->dest == f2->dest && b1->dest == b2->dest) + reverse = false; + else if (f1->dest == b2->dest && b1->dest == f2->dest) + reverse = true; + else + return false; + + set1 = pc_set (BB_END (bb1)); + set2 = pc_set (BB_END (bb2)); + if ((XEXP (SET_SRC (set1), 1) == pc_rtx) + != (XEXP (SET_SRC (set2), 1) == pc_rtx)) + reverse = !reverse; + + src1 = SET_SRC (set1); + src2 = SET_SRC (set2); + cond1 = XEXP (src1, 0); + cond2 = XEXP (src2, 0); + code1 = GET_CODE (cond1); + if (reverse) + code2 = reversed_comparison_code (cond2, BB_END (bb2)); + else + code2 = GET_CODE (cond2); + + if (code2 == UNKNOWN) + return false; + + if (call_init && !struct_equiv_init (STRUCT_EQUIV_START | info->mode, info)) + gcc_unreachable (); + /* Make the sources of the pc sets unreadable so that when we call + insns_match_p it won't process them. + The death_notes_match_p from insns_match_p won't see the local registers + used for the pc set, but that could only cause missed optimizations when + there are actually condjumps that use stack registers. */ + SET_SRC (set1) = pc_rtx; + SET_SRC (set2) = pc_rtx; + /* Verify codes and operands match. */ + if (code1 == code2) + { + match = (insns_match_p (BB_END (bb1), BB_END (bb2), info) + && rtx_equiv_p (&XEXP (cond1, 0), XEXP (cond2, 0), 1, info) + && rtx_equiv_p (&XEXP (cond1, 1), XEXP (cond2, 1), 1, info)); + + } + else if (code1 == swap_condition (code2)) + { + match = (insns_match_p (BB_END (bb1), BB_END (bb2), info) + && rtx_equiv_p (&XEXP (cond1, 1), XEXP (cond2, 0), 1, info) + && rtx_equiv_p (&XEXP (cond1, 0), XEXP (cond2, 1), 1, info)); + + } + else + match = false; + SET_SRC (set1) = src1; + SET_SRC (set2) = src2; + match &= verify_changes (0); + + /* If we return true, we will join the blocks. Which means that + we will only have one branch prediction bit to work with. Thus + we require the existing branches to have probabilities that are + roughly similar. */ + if (match + && !optimize_size + && maybe_hot_bb_p (bb1) + && maybe_hot_bb_p (bb2)) + { + int prob2; + + if (b1->dest == b2->dest) + prob2 = b2->probability; + else + /* Do not use f2 probability as f2 may be forwarded. */ + prob2 = REG_BR_PROB_BASE - b2->probability; + + /* Fail if the difference in probabilities is greater than 50%. + This rules out two well-predicted branches with opposite + outcomes. */ + if (abs (b1->probability - prob2) > REG_BR_PROB_BASE / 2) + { + if (dump_file) + fprintf (dump_file, + "Outcomes of branch in bb %i and %i differ too much (%i %i)\n", + bb1->index, bb2->index, b1->probability, prob2); + + match = false; + } + } + + if (dump_file && match) + fprintf (dump_file, "Conditionals in bb %i and %i match.\n", + bb1->index, bb2->index); + + if (!match) + cancel_changes (0); + return match; +} + /* Return true iff outgoing edges of BB1 and BB2 match, together with the branch instruction. This means that if we commonize the control flow before end of the basic block, the semantic remains unchanged. @@ -1385,7 +1513,7 @@ outgoing_edges_match (int mode, basic_block bb1, basic_block bb2) rr.update_label_nuses = false; for_each_rtx (&BB_END (bb1), replace_label, &rr); - match = insns_match_p (mode, BB_END (bb1), BB_END (bb2)); + match = old_insns_match_p (mode, BB_END (bb1), BB_END (bb2)); if (dump_file && match) fprintf (dump_file, "Tablejumps in bb %i and %i match.\n", @@ -1407,7 +1535,7 @@ outgoing_edges_match (int mode, basic_block bb1, basic_block bb2) /* First ensure that the instructions match. There may be many outgoing edges so this test is generally cheaper. */ - if (!insns_match_p (mode, BB_END (bb1), BB_END (bb2))) + if (!old_insns_match_p (mode, BB_END (bb1), BB_END (bb2))) return false; /* Search the outgoing edges, ensure that the counts do match, find possible @@ -1572,11 +1700,23 @@ try_crossjump_to_edge (int mode, edge e1, edge e2) } } - /* Avoid splitting if possible. */ - if (newpos2 == BB_HEAD (src2)) + /* Avoid splitting if possible. We must always split when SRC2 has + EH predecessor edges, or we may end up with basic blocks with both + normal and EH predecessor edges. */ + if (newpos2 == BB_HEAD (src2) + && !(EDGE_PRED (src2, 0)->flags & EDGE_EH)) redirect_to = src2; else { + if (newpos2 == BB_HEAD (src2)) + { + /* Skip possible basic block header. */ + if (LABEL_P (newpos2)) + newpos2 = NEXT_INSN (newpos2); + if (NOTE_P (newpos2)) + newpos2 = NEXT_INSN (newpos2); + } + if (dump_file) fprintf (dump_file, "Splitting bb %i before %i insns\n", src2->index, nmatch); @@ -1905,7 +2045,7 @@ try_optimize_cfg (int mode) /* Note that forwarder_block_p true ensures that there is a successor for this block. */ && (single_succ_edge (b)->flags & EDGE_FALLTHRU) - && n_basic_blocks > 1) + && n_basic_blocks > NUM_FIXED_BLOCKS + 1) { if (dump_file) fprintf (dump_file, diff --git a/gcc/cfghooks.c b/gcc/cfghooks.c index 138bc4ab2ae..a42e4d74b7b 100644 --- a/gcc/cfghooks.c +++ b/gcc/cfghooks.c @@ -77,8 +77,8 @@ verify_flow_info (void) basic_block *last_visited; timevar_push (TV_CFG_VERIFY); - last_visited = xcalloc (last_basic_block + 2, sizeof (basic_block)); - edge_checksum = xcalloc (last_basic_block + 2, sizeof (size_t)); + last_visited = xcalloc (last_basic_block, sizeof (basic_block)); + edge_checksum = xcalloc (last_basic_block, sizeof (size_t)); /* Check bb chain & numbers. */ last_bb_seen = ENTRY_BLOCK_PTR; @@ -122,7 +122,7 @@ verify_flow_info (void) } FOR_EACH_EDGE (e, ei, bb->succs) { - if (last_visited [e->dest->index + 2] == bb) + if (last_visited [e->dest->index] == bb) { error ("verify_flow_info: Duplicate edge %i->%i", e->src->index, e->dest->index); @@ -141,7 +141,7 @@ verify_flow_info (void) err = 1; } - last_visited [e->dest->index + 2] = bb; + last_visited [e->dest->index] = bb; if (e->flags & EDGE_FALLTHRU) n_fallthru++; @@ -158,7 +158,7 @@ verify_flow_info (void) err = 1; } - edge_checksum[e->dest->index + 2] += (size_t) e; + edge_checksum[e->dest->index] += (size_t) e; } if (n_fallthru > 1) { @@ -192,7 +192,7 @@ verify_flow_info (void) err = 1; } - edge_checksum[e->dest->index + 2] -= (size_t) e; + edge_checksum[e->dest->index] -= (size_t) e; } } @@ -202,14 +202,14 @@ verify_flow_info (void) edge_iterator ei; FOR_EACH_EDGE (e, ei, ENTRY_BLOCK_PTR->succs) - edge_checksum[e->dest->index + 2] += (size_t) e; + edge_checksum[e->dest->index] += (size_t) e; FOR_EACH_EDGE (e, ei, EXIT_BLOCK_PTR->preds) - edge_checksum[e->dest->index + 2] -= (size_t) e; + edge_checksum[e->dest->index] -= (size_t) e; } FOR_BB_BETWEEN (bb, ENTRY_BLOCK_PTR, NULL, next_bb) - if (edge_checksum[bb->index + 2]) + if (edge_checksum[bb->index]) { error ("basic block %i edge lists are corrupted", bb->index); err = 1; diff --git a/gcc/cfglayout.c b/gcc/cfglayout.c index 9cc2f8fa709..265afd73f93 100644 --- a/gcc/cfglayout.c +++ b/gcc/cfglayout.c @@ -601,7 +601,7 @@ fixup_reorder_chain (void) /* First do the bulk reordering -- rechain the blocks without regard to the needed changes to jumps and labels. */ - for (bb = ENTRY_BLOCK_PTR->next_bb, index = 0; + for (bb = ENTRY_BLOCK_PTR->next_bb, index = NUM_FIXED_BLOCKS; bb != 0; bb = bb->aux, index++) { @@ -680,41 +680,13 @@ fixup_reorder_chain (void) continue; /* The degenerated case of conditional jump jumping to the next - instruction can happen on target having jumps with side - effects. - - Create temporarily the duplicated edge representing branch. - It will get unidentified by force_nonfallthru_and_redirect - that would otherwise get confused by fallthru edge not pointing - to the next basic block. */ + instruction can happen for jumps with side effects. We need + to construct a forwarder block and this will be done just + fine by force_nonfallthru below. */ if (!e_taken) - { - rtx note; - edge e_fake; - bool redirected; - - e_fake = unchecked_make_edge (bb, e_fall->dest, 0); - - redirected = redirect_jump (BB_END (bb), - block_label (bb), 0); - gcc_assert (redirected); - - note = find_reg_note (BB_END (bb), REG_BR_PROB, NULL_RTX); - if (note) - { - int prob = INTVAL (XEXP (note, 0)); - - e_fake->probability = prob; - e_fake->count = e_fall->count * prob / REG_BR_PROB_BASE; - e_fall->probability -= e_fall->probability; - e_fall->count -= e_fake->count; - if (e_fall->probability < 0) - e_fall->probability = 0; - if (e_fall->count < 0) - e_fall->count = 0; - } - } - /* There is one special case: if *neither* block is next, + ; + + /* There is another special case: if *neither* block is next, such as happens at the very end of a function, then we'll need to add a new unconditional jump. Choose the taken edge based on known or assumed probability. */ @@ -818,7 +790,7 @@ fixup_reorder_chain (void) if (dump_file) { fprintf (dump_file, "Reordered sequence:\n"); - for (bb = ENTRY_BLOCK_PTR->next_bb, index = 0; + for (bb = ENTRY_BLOCK_PTR->next_bb, index = NUM_FIXED_BLOCKS; bb; bb = bb->aux, index++) { @@ -837,12 +809,12 @@ fixup_reorder_chain (void) prev_bb = ENTRY_BLOCK_PTR; bb = ENTRY_BLOCK_PTR->next_bb; - index = 0; + index = NUM_FIXED_BLOCKS; for (; bb; prev_bb = bb, bb = bb->aux, index ++) { bb->index = index; - BASIC_BLOCK (index) = bb; + SET_BASIC_BLOCK (index, bb); bb->prev_bb = prev_bb; prev_bb->next_bb = bb; diff --git a/gcc/cfgloop.c b/gcc/cfgloop.c index ff977039522..7629c917016 100644 --- a/gcc/cfgloop.c +++ b/gcc/cfgloop.c @@ -73,7 +73,7 @@ flow_loops_cfg_dump (const struct loops *loops, FILE *file) if (loops->cfg.dfs_order) { fputs (";; DFS order: ", file); - for (i = 0; i < n_basic_blocks; i++) + for (i = NUM_FIXED_BLOCKS; i < n_basic_blocks; i++) fprintf (file, "%d ", loops->cfg.dfs_order[i]); fputs ("\n", file); @@ -83,7 +83,7 @@ flow_loops_cfg_dump (const struct loops *loops, FILE *file) if (loops->cfg.rc_order) { fputs (";; RC order: ", file); - for (i = 0; i < n_basic_blocks; i++) + for (i = NUM_FIXED_BLOCKS; i < n_basic_blocks; i++) fprintf (file, "%d ", loops->cfg.rc_order[i]); fputs ("\n", file); @@ -610,7 +610,7 @@ flow_loops_find (struct loops *loops) /* Taking care of this degenerate case makes the rest of this code simpler. */ - if (n_basic_blocks == 0) + if (n_basic_blocks == NUM_FIXED_BLOCKS) return 0; dfs_order = NULL; @@ -676,7 +676,7 @@ flow_loops_find (struct loops *loops) loops->parray[0]->outer = NULL; loops->parray[0]->depth = 0; loops->parray[0]->pred = NULL; - loops->parray[0]->num_nodes = n_basic_blocks + 2; + loops->parray[0]->num_nodes = n_basic_blocks; loops->parray[0]->latch = EXIT_BLOCK_PTR; loops->parray[0]->header = ENTRY_BLOCK_PTR; ENTRY_BLOCK_PTR->loop_father = loops->parray[0]; @@ -696,7 +696,7 @@ flow_loops_find (struct loops *loops) natural loops will be found before inner natural loops. */ dfs_order = xmalloc (n_basic_blocks * sizeof (int)); rc_order = xmalloc (n_basic_blocks * sizeof (int)); - flow_depth_first_order_compute (dfs_order, rc_order); + pre_and_rev_post_order_compute (dfs_order, rc_order, false); /* Save CFG derived information to avoid recomputing it. */ loops->cfg.dfs_order = dfs_order; @@ -704,7 +704,7 @@ flow_loops_find (struct loops *loops) num_loops = 1; - for (b = 0; b < n_basic_blocks; b++) + for (b = 0; b < n_basic_blocks - NUM_FIXED_BLOCKS; b++) { struct loop *loop; edge_iterator ei; @@ -804,7 +804,7 @@ get_loop_body (const struct loop *loop) if (loop->latch == EXIT_BLOCK_PTR) { /* There may be blocks unreachable from EXIT_BLOCK. */ - gcc_assert (loop->num_nodes == (unsigned) n_basic_blocks + 2); + gcc_assert (loop->num_nodes == (unsigned) n_basic_blocks); FOR_EACH_BB (bb) tovisit[tv++] = bb; tovisit[tv++] = EXIT_BLOCK_PTR; diff --git a/gcc/cfgloop.h b/gcc/cfgloop.h index b237631433d..b9c0dbc5b0d 100644 --- a/gcc/cfgloop.h +++ b/gcc/cfgloop.h @@ -417,7 +417,7 @@ extern void free_simple_loop_desc (struct loop *loop); static inline struct niter_desc * simple_loop_desc (struct loop *loop) { - return loop->aux; + return (struct niter_desc *) loop->aux; } /* The properties of the target. */ diff --git a/gcc/cfgloopmanip.c b/gcc/cfgloopmanip.c index 806daa789f7..cfc11e0f62e 100644 --- a/gcc/cfgloopmanip.c +++ b/gcc/cfgloopmanip.c @@ -1404,7 +1404,7 @@ static basic_block lv_adjust_loop_entry_edge (basic_block first_head, basic_block second_head, edge e, - tree cond_expr) + void *cond_expr) { basic_block new_head = NULL; edge e1; @@ -1563,7 +1563,7 @@ fix_loop_structure (struct loops *loops, bitmap changed_bbs) } /* Remove the dead loops from structures. */ - loops->tree_root->num_nodes = n_basic_blocks + 2; + loops->tree_root->num_nodes = n_basic_blocks; for (i = 1; i < loops->num; i++) { loop = loops->parray[i]; diff --git a/gcc/cfgrtl.c b/gcc/cfgrtl.c index f49eceb1657..9bbeddd1524 100644 --- a/gcc/cfgrtl.c +++ b/gcc/cfgrtl.c @@ -305,7 +305,7 @@ create_basic_block_structure (rtx head, rtx end, rtx bb_note, basic_block after) bb->index = last_basic_block++; bb->flags = BB_NEW | BB_RTL; link_block (bb, after); - BASIC_BLOCK (bb->index) = bb; + SET_BASIC_BLOCK (bb->index, bb); update_bb_for_insn (bb); BB_SET_PARTITION (bb, BB_UNPARTITIONED); @@ -328,10 +328,14 @@ rtl_create_basic_block (void *headp, void *endp, basic_block after) basic_block bb; /* Grow the basic block array if needed. */ - if ((size_t) last_basic_block >= VARRAY_SIZE (basic_block_info)) + if ((size_t) last_basic_block >= VEC_length (basic_block, basic_block_info)) { + size_t old_size = VEC_length (basic_block, basic_block_info); size_t new_size = last_basic_block + (last_basic_block + 3) / 4; - VARRAY_GROW (basic_block_info, new_size); + basic_block *p; + VEC_safe_grow (basic_block, gc, basic_block_info, new_size); + p = VEC_address (basic_block, basic_block_info); + memset (&p[old_size], 0, sizeof (basic_block) * (new_size - old_size)); } n_basic_blocks++; @@ -440,7 +444,8 @@ struct tree_opt_pass pass_free_cfg = rtx entry_of_function (void) { - return (n_basic_blocks ? BB_HEAD (ENTRY_BLOCK_PTR->next_bb) : get_insns ()); + return (n_basic_blocks > NUM_FIXED_BLOCKS ? + BB_HEAD (ENTRY_BLOCK_PTR->next_bb) : get_insns ()); } /* Update insns block within BB. */ @@ -1013,9 +1018,6 @@ force_nonfallthru_and_redirect (edge e, basic_block target) by creating a basic block afterwards to redirect fallthru edge. */ if (e->src != ENTRY_BLOCK_PTR && e->dest != EXIT_BLOCK_PTR && any_condjump_p (BB_END (e->src)) - /* When called from cfglayout, fallthru edges do not - necessarily go to the next block. */ - && e->src->next_bb == e->dest && JUMP_LABEL (BB_END (e->src)) == BB_HEAD (e->dest)) { rtx note; @@ -2258,7 +2260,7 @@ rtl_verify_flow_info (void) curr_bb = NULL; } - if (num_bb_notes != n_basic_blocks) + if (num_bb_notes != n_basic_blocks - NUM_FIXED_BLOCKS) internal_error ("number of bb notes in insn chain (%d) != n_basic_blocks (%d)", num_bb_notes, n_basic_blocks); @@ -2911,7 +2913,7 @@ rtl_flow_call_edges_add (sbitmap blocks) int last_bb = last_basic_block; bool check_last_block = false; - if (n_basic_blocks == 0) + if (n_basic_blocks == NUM_FIXED_BLOCKS) return 0; if (! blocks) @@ -2958,7 +2960,7 @@ rtl_flow_call_edges_add (sbitmap blocks) calls since there is no way that we can determine if they will return or not... */ - for (i = 0; i < last_bb; i++) + for (i = NUM_FIXED_BLOCKS; i < last_bb; i++) { basic_block bb = BASIC_BLOCK (i); rtx insn; diff --git a/gcc/cgraph.c b/gcc/cgraph.c index 0bee5646d2c..88cf8ac818e 100644 --- a/gcc/cgraph.c +++ b/gcc/cgraph.c @@ -146,7 +146,7 @@ static int eq_node (const void *, const void *); static hashval_t hash_node (const void *p) { - const struct cgraph_node *n = p; + const struct cgraph_node *n = (const struct cgraph_node *) p; return (hashval_t) DECL_UID (n->decl); } @@ -155,7 +155,8 @@ hash_node (const void *p) static int eq_node (const void *p1, const void *p2) { - const struct cgraph_node *n1 = p1, *n2 = p2; + const struct cgraph_node *n1 = (const struct cgraph_node *) p1; + const struct cgraph_node *n2 = (const struct cgraph_node *) p2; return DECL_UID (n1->decl) == DECL_UID (n2->decl); } @@ -165,7 +166,7 @@ cgraph_create_node (void) { struct cgraph_node *node; - node = ggc_alloc_cleared (sizeof (*node)); + node = GGC_CNEW (struct cgraph_node); node->next = cgraph_nodes; node->uid = cgraph_max_uid++; if (cgraph_nodes) @@ -299,7 +300,7 @@ struct cgraph_edge * cgraph_create_edge (struct cgraph_node *caller, struct cgraph_node *callee, tree call_stmt, gcov_type count, int nest) { - struct cgraph_edge *edge = ggc_alloc (sizeof (struct cgraph_edge)); + struct cgraph_edge *edge = GGC_NEW (struct cgraph_edge); #ifdef ENABLE_CHECKING struct cgraph_edge *e; @@ -485,7 +486,7 @@ cgraph_remove_node (struct cgraph_node *node) */ if (!kill_body && *slot) { - struct cgraph_node *n = *slot; + struct cgraph_node *n = (struct cgraph_node *) *slot; if (!n->next_clone && !n->global.inlined_to && (cgraph_global_info_ready && (TREE_ASM_WRITTEN (n->decl) || DECL_EXTERNAL (n->decl)))) @@ -710,7 +711,7 @@ dump_varpool (FILE *f) static hashval_t hash_varpool_node (const void *p) { - const struct cgraph_varpool_node *n = p; + const struct cgraph_varpool_node *n = (const struct cgraph_varpool_node *) p; return (hashval_t) DECL_UID (n->decl); } @@ -719,7 +720,10 @@ hash_varpool_node (const void *p) static int eq_varpool_node (const void *p1, const void *p2) { - const struct cgraph_varpool_node *n1 = p1, *n2 = p2; + const struct cgraph_varpool_node *n1 = + (const struct cgraph_varpool_node *) p1; + const struct cgraph_varpool_node *n2 = + (const struct cgraph_varpool_node *) p2; return DECL_UID (n1->decl) == DECL_UID (n2->decl); } @@ -739,7 +743,7 @@ cgraph_varpool_node (tree decl) htab_find_slot (cgraph_varpool_hash, &key, INSERT); if (*slot) return *slot; - node = ggc_alloc_cleared (sizeof (*node)); + node = GGC_CNEW (struct cgraph_varpool_node); node->decl = decl; node->next = cgraph_varpool_nodes; cgraph_varpool_nodes = node; diff --git a/gcc/combine.c b/gcc/combine.c index abd64582d3e..3b1fd77605e 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -1,6 +1,6 @@ /* Optimize by combining instructions for GNU compiler. Copyright (C) 1987, 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998, - 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. + 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This file is part of GCC. @@ -55,7 +55,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA - reg_live_length is not updated - reg_n_refs is not adjusted in the rare case when a register is no longer required in a computation - - there are extremely rare cases (see distribute_regnotes) when a + - there are extremely rare cases (see distribute_notes) when a REG_DEAD note is lost - a LOG_LINKS entry that refers to an insn with multiple SETs may be removed because there is no way to know which register it was @@ -220,7 +220,7 @@ struct reg_stat { unsigned HOST_WIDE_INT last_set_nonzero_bits; char last_set_sign_bit_copies; - ENUM_BITFIELD(machine_mode) last_set_mode : 8; + ENUM_BITFIELD(machine_mode) last_set_mode : 8; /* Set nonzero if references to register n in expressions should not be used. last_set_invalid is set nonzero when this register is being @@ -243,6 +243,19 @@ struct reg_stat { unsigned char sign_bit_copies; unsigned HOST_WIDE_INT nonzero_bits; + + /* Record the value of the label_tick when the last truncation + happened. The field truncated_to_mode is only valid if + truncation_label == label_tick. */ + + int truncation_label; + + /* Record the last truncation seen for this register. If truncation + is not a nop to this mode we might be able to save an explicit + truncation if we know that value already contains a truncated + value. */ + + ENUM_BITFIELD(machine_mode) truncated_to_mode : 8; }; static struct reg_stat *reg_stat; @@ -321,15 +334,14 @@ static int nonzero_sign_valid; /* Record one modification to rtl structure - to be undone by storing old_contents into *where. - is_int is 1 if the contents are an int. */ + to be undone by storing old_contents into *where. */ struct undo { struct undo *next; - int is_int; - union {rtx r; int i;} old_contents; - union {rtx *r; int *i;} where; + enum { UNDO_RTX, UNDO_INT, UNDO_MODE } kind; + union { rtx r; int i; enum machine_mode m; } old_contents; + union { rtx *r; int *i; } where; }; /* Record a bunch of changes to be undone, up to MAX_UNDO of them. @@ -385,26 +397,30 @@ static rtx extract_left_shift (rtx, int); static rtx make_compound_operation (rtx, enum rtx_code); static int get_pos_from_mask (unsigned HOST_WIDE_INT, unsigned HOST_WIDE_INT *); +static rtx canon_reg_for_combine (rtx, rtx); static rtx force_to_mode (rtx, enum machine_mode, - unsigned HOST_WIDE_INT, rtx, int); + unsigned HOST_WIDE_INT, int); static rtx if_then_else_cond (rtx, rtx *, rtx *); static rtx known_cond (rtx, enum rtx_code, rtx, rtx); static int rtx_equal_for_field_assignment_p (rtx, rtx); static rtx make_field_assignment (rtx); static rtx apply_distributive_law (rtx); static rtx distribute_and_simplify_rtx (rtx, int); +static rtx simplify_and_const_int_1 (enum machine_mode, rtx, + unsigned HOST_WIDE_INT); static rtx simplify_and_const_int (rtx, enum machine_mode, rtx, unsigned HOST_WIDE_INT); static int merge_outer_ops (enum rtx_code *, HOST_WIDE_INT *, enum rtx_code, HOST_WIDE_INT, enum machine_mode, int *); -static rtx simplify_shift_const (rtx, enum rtx_code, enum machine_mode, rtx, +static rtx simplify_shift_const_1 (enum rtx_code, enum machine_mode, rtx, int); +static rtx simplify_shift_const (rtx, enum rtx_code, enum machine_mode, rtx, int); static int recog_for_combine (rtx *, rtx, rtx *); static rtx gen_lowpart_for_combine (enum machine_mode, rtx); static enum rtx_code simplify_comparison (enum rtx_code, rtx *, rtx *); static void update_table_tick (rtx); static void record_value_for_reg (rtx, rtx, rtx); -static void check_promoted_subreg (rtx, rtx); +static void check_conversions (rtx, rtx); static void record_dead_and_set_regs_1 (rtx, rtx, void *); static void record_dead_and_set_regs (rtx); static int get_last_value_validate (rtx *, rtx, int, int); @@ -421,6 +437,9 @@ static int insn_cuid (rtx); static void record_promoted_value (rtx, rtx); static int unmentioned_reg_p_1 (rtx *, void *); static bool unmentioned_reg_p (rtx, rtx); +static void record_truncated_value (rtx); +static bool reg_truncated_to_mode (enum machine_mode, rtx); +static rtx gen_lowpart_or_truncate (enum machine_mode, rtx); /* It is not safe to use ordinary gen_lowpart in combine. @@ -486,7 +505,7 @@ do_SUBST (rtx *into, rtx newval) else buf = xmalloc (sizeof (struct undo)); - buf->is_int = 0; + buf->kind = UNDO_RTX; buf->where.r = into; buf->old_contents.r = oldval; *into = newval; @@ -514,7 +533,7 @@ do_SUBST_INT (int *into, int newval) else buf = xmalloc (sizeof (struct undo)); - buf->is_int = 1; + buf->kind = UNDO_INT; buf->where.i = into; buf->old_contents.i = oldval; *into = newval; @@ -523,6 +542,35 @@ do_SUBST_INT (int *into, int newval) } #define SUBST_INT(INTO, NEWVAL) do_SUBST_INT(&(INTO), (NEWVAL)) + +/* Similar to SUBST, but just substitute the mode. This is used when + changing the mode of a pseudo-register, so that any other + references to the entry in the regno_reg_rtx array will change as + well. */ + +static void +do_SUBST_MODE (rtx *into, enum machine_mode newval) +{ + struct undo *buf; + enum machine_mode oldval = GET_MODE (*into); + + if (oldval == newval) + return; + + if (undobuf.frees) + buf = undobuf.frees, undobuf.frees = buf->next; + else + buf = xmalloc (sizeof (struct undo)); + + buf->kind = UNDO_MODE; + buf->where.r = into; + buf->old_contents.m = oldval; + PUT_MODE (*into, newval); + + buf->next = undobuf.undos, undobuf.undos = buf; +} + +#define SUBST_MODE(INTO, NEWVAL) do_SUBST_MODE(&(INTO), (NEWVAL)) /* Subroutine of try_combine. Determine whether the combine replacement patterns NEWPAT and NEWI2PAT are cheaper according to insn_rtx_cost @@ -758,7 +806,7 @@ combine_instructions (rtx f, unsigned int nregs) { /* See if we know about function return values before this insn based upon SUBREG flags. */ - check_promoted_subreg (insn, PATTERN (insn)); + check_conversions (insn, PATTERN (insn)); /* Try this insn with each insn it links back to. */ @@ -1702,6 +1750,27 @@ can_change_dest_mode (rtx x, int added_sets, enum machine_mode mode) && !REG_USERVAR_P (x)); } + +/* Check whether X, the destination of a set, refers to part of + the register specified by REG. */ + +static bool +reg_subword_p (rtx x, rtx reg) +{ + /* Check that reg is an integer mode register. */ + if (!REG_P (reg) || GET_MODE_CLASS (GET_MODE (reg)) != MODE_INT) + return false; + + if (GET_CODE (x) == STRICT_LOW_PART + || GET_CODE (x) == ZERO_EXTRACT) + x = XEXP (x, 0); + + return GET_CODE (x) == SUBREG + && SUBREG_REG (x) == reg + && GET_MODE_CLASS (GET_MODE (x)) == MODE_INT; +} + + /* Try to combine the insns I1 and I2 into I3. Here I1 and I2 appear earlier than I3. I1 can be zero; then we combine just I2 into I3. @@ -1866,74 +1935,140 @@ try_combine (rtx i3, rtx i2, rtx i1, int *new_direct_jump_p) } } - /* If I2 is setting a double-word pseudo to a constant and I3 is setting - one of those words to another constant, merge them by making a new + /* If I2 is setting a pseudo to a constant and I3 is setting some + sub-part of it to another constant, merge them by making a new constant. */ if (i1 == 0 && (temp = single_set (i2)) != 0 && (GET_CODE (SET_SRC (temp)) == CONST_INT || GET_CODE (SET_SRC (temp)) == CONST_DOUBLE) - && REG_P (SET_DEST (temp)) - && GET_MODE_CLASS (GET_MODE (SET_DEST (temp))) == MODE_INT - && GET_MODE_SIZE (GET_MODE (SET_DEST (temp))) == 2 * UNITS_PER_WORD && GET_CODE (PATTERN (i3)) == SET - && GET_CODE (SET_DEST (PATTERN (i3))) == SUBREG - && SUBREG_REG (SET_DEST (PATTERN (i3))) == SET_DEST (temp) - && GET_MODE_CLASS (GET_MODE (SET_DEST (PATTERN (i3)))) == MODE_INT - && GET_MODE_SIZE (GET_MODE (SET_DEST (PATTERN (i3)))) == UNITS_PER_WORD - && GET_CODE (SET_SRC (PATTERN (i3))) == CONST_INT) + && (GET_CODE (SET_SRC (PATTERN (i3))) == CONST_INT + || GET_CODE (SET_SRC (PATTERN (i3))) == CONST_DOUBLE) + && reg_subword_p (SET_DEST (PATTERN (i3)), SET_DEST (temp))) { - HOST_WIDE_INT lo, hi; + rtx dest = SET_DEST (PATTERN (i3)); + int offset = -1; + int width = 0; - if (GET_CODE (SET_SRC (temp)) == CONST_INT) - lo = INTVAL (SET_SRC (temp)), hi = lo < 0 ? -1 : 0; - else + if (GET_CODE (dest) == STRICT_LOW_PART) { - lo = CONST_DOUBLE_LOW (SET_SRC (temp)); - hi = CONST_DOUBLE_HIGH (SET_SRC (temp)); + width = GET_MODE_BITSIZE (GET_MODE (XEXP (dest, 0))); + offset = 0; } - - if (subreg_lowpart_p (SET_DEST (PATTERN (i3)))) + else if (GET_CODE (dest) == ZERO_EXTRACT) { - /* We don't handle the case of the target word being wider - than a host wide int. */ - gcc_assert (HOST_BITS_PER_WIDE_INT >= BITS_PER_WORD); + if (GET_CODE (XEXP (dest, 1)) == CONST_INT + && GET_CODE (XEXP (dest, 2)) == CONST_INT) + { + width = INTVAL (XEXP (dest, 1)); + offset = INTVAL (XEXP (dest, 2)); - lo &= ~(UWIDE_SHIFT_LEFT_BY_BITS_PER_WORD (1) - 1); - lo |= (INTVAL (SET_SRC (PATTERN (i3))) - & (UWIDE_SHIFT_LEFT_BY_BITS_PER_WORD (1) - 1)); + if (BITS_BIG_ENDIAN) + offset = GET_MODE_BITSIZE (GET_MODE (XEXP (dest, 0))) + - width - offset; + } } - else if (HOST_BITS_PER_WIDE_INT == BITS_PER_WORD) - hi = INTVAL (SET_SRC (PATTERN (i3))); - else if (HOST_BITS_PER_WIDE_INT >= 2 * BITS_PER_WORD) + else if (subreg_lowpart_p (dest)) { - int sign = -(int) ((unsigned HOST_WIDE_INT) lo - >> (HOST_BITS_PER_WIDE_INT - 1)); - - lo &= ~ (UWIDE_SHIFT_LEFT_BY_BITS_PER_WORD - (UWIDE_SHIFT_LEFT_BY_BITS_PER_WORD (1) - 1)); - lo |= (UWIDE_SHIFT_LEFT_BY_BITS_PER_WORD - (INTVAL (SET_SRC (PATTERN (i3))))); - if (hi == sign) - hi = lo < 0 ? -1 : 0; + width = GET_MODE_BITSIZE (GET_MODE (dest)); + offset = 0; + } + /* ??? Preserve the original logic to handle setting the high word + of double-word pseudos, where inner is half the size of outer + but not the lowpart. This could be generalized by handling + SUBREG_BYTE, WORDS_BIG_ENDIAN and BYTES_BIG_ENDIAN ourselves. + Unfortunately this logic is tricky to get right and probably + not worth the effort. */ + else if (GET_MODE_BITSIZE (GET_MODE (SET_DEST (temp))) + == 2 * GET_MODE_BITSIZE (GET_MODE (dest))) + { + width = GET_MODE_BITSIZE (GET_MODE (dest)); + offset = width; } - else - /* We don't handle the case of the higher word not fitting - entirely in either hi or lo. */ - gcc_unreachable (); - combine_merges++; - subst_insn = i3; - subst_low_cuid = INSN_CUID (i2); - added_sets_2 = added_sets_1 = 0; - i2dest = SET_DEST (temp); - i2dest_killed = dead_or_set_p (i2, i2dest); + if (offset >= 0) + { + HOST_WIDE_INT mhi, ohi, ihi; + HOST_WIDE_INT mlo, olo, ilo; + rtx inner = SET_SRC (PATTERN (i3)); + rtx outer = SET_SRC (temp); - SUBST (SET_SRC (temp), - immed_double_const (lo, hi, GET_MODE (SET_DEST (temp)))); + if (GET_CODE (outer) == CONST_INT) + { + olo = INTVAL (outer); + ohi = olo < 0 ? -1 : 0; + } + else + { + olo = CONST_DOUBLE_LOW (outer); + ohi = CONST_DOUBLE_HIGH (outer); + } - newpat = PATTERN (i2); - goto validate_replacement; + if (GET_CODE (inner) == CONST_INT) + { + ilo = INTVAL (inner); + ihi = ilo < 0 ? -1 : 0; + } + else + { + ilo = CONST_DOUBLE_LOW (inner); + ihi = CONST_DOUBLE_HIGH (inner); + } + + if (width < HOST_BITS_PER_WIDE_INT) + { + mlo = ((unsigned HOST_WIDE_INT) 1 << width) - 1; + mhi = 0; + } + else if (width < HOST_BITS_PER_WIDE_INT * 2) + { + mhi = ((unsigned HOST_WIDE_INT) 1 + << (width - HOST_BITS_PER_WIDE_INT)) - 1; + mlo = -1; + } + else + { + mlo = -1; + mhi = -1; + } + + ilo &= mlo; + ihi &= mhi; + + if (offset >= HOST_BITS_PER_WIDE_INT) + { + mhi = mlo << (offset - HOST_BITS_PER_WIDE_INT); + mlo = 0; + ihi = ilo << (offset - HOST_BITS_PER_WIDE_INT); + ilo = 0; + } + else if (offset > 0) + { + mhi = (mhi << offset) | ((unsigned HOST_WIDE_INT) mlo + >> (HOST_BITS_PER_WIDE_INT - offset)); + mlo = mlo << offset; + ihi = (ihi << offset) | ((unsigned HOST_WIDE_INT) ilo + >> (HOST_BITS_PER_WIDE_INT - offset)); + ilo = ilo << offset; + } + + olo = (olo & ~mlo) | ilo; + ohi = (ohi & ~mhi) | ihi; + + combine_merges++; + subst_insn = i3; + subst_low_cuid = INSN_CUID (i2); + added_sets_2 = added_sets_1 = 0; + i2dest = SET_DEST (temp); + i2dest_killed = dead_or_set_p (i2, i2dest); + + SUBST (SET_SRC (temp), + immed_double_const (olo, ohi, GET_MODE (SET_DEST (temp)))); + + newpat = PATTERN (i2); + goto validate_replacement; + } } #ifndef HAVE_cc0 @@ -2133,10 +2268,15 @@ try_combine (rtx i3, rtx i2, rtx i1, int *new_direct_jump_p) compare_mode)) { unsigned int regno = REGNO (SET_DEST (newpat)); - rtx new_dest = gen_rtx_REG (compare_mode, regno); + rtx new_dest; - if (regno >= FIRST_PSEUDO_REGISTER) - SUBST (regno_reg_rtx[regno], new_dest); + if (regno < FIRST_PSEUDO_REGISTER) + new_dest = gen_rtx_REG (compare_mode, regno); + else + { + SUBST_MODE (regno_reg_rtx[regno], compare_mode); + new_dest = regno_reg_rtx[regno]; + } SUBST (SET_DEST (newpat), new_dest); SUBST (XEXP (*cc_use, 0), new_dest); @@ -2385,7 +2525,6 @@ try_combine (rtx i3, rtx i2, rtx i1, int *new_direct_jump_p) && asm_noperands (newpat) < 0) { rtx m_split, *split; - rtx ni2dest = i2dest; /* See if the MD file can split NEWPAT. If it can't, see if letting it use I2DEST as a scratch register will help. In the latter case, @@ -2400,34 +2539,55 @@ try_combine (rtx i3, rtx i2, rtx i1, int *new_direct_jump_p) possible to try that as a scratch reg. This would require adding more code to make it work though. */ - if (m_split == 0 && ! reg_overlap_mentioned_p (ni2dest, newpat)) + if (m_split == 0 && ! reg_overlap_mentioned_p (i2dest, newpat)) { - enum machine_mode new_mode = GET_MODE (SET_DEST (newpat)); - /* If I2DEST is a hard register or the only use of a pseudo, - we can change its mode. */ - if (new_mode != GET_MODE (i2dest) - && new_mode != VOIDmode - && can_change_dest_mode (i2dest, added_sets_2, new_mode)) - ni2dest = gen_rtx_REG (GET_MODE (SET_DEST (newpat)), - REGNO (i2dest)); + enum machine_mode new_mode = GET_MODE (SET_DEST (newpat)); + /* First try to split using the original register as a + scratch register. */ m_split = split_insns (gen_rtx_PARALLEL (VOIDmode, gen_rtvec (2, newpat, gen_rtx_CLOBBER (VOIDmode, - ni2dest))), + i2dest))), i3); - /* If the split with the mode-changed register didn't work, try - the original register. */ - if (! m_split && ni2dest != i2dest) + + /* If that didn't work, try changing the mode of I2DEST if + we can. */ + if (m_split == 0 + && new_mode != GET_MODE (i2dest) + && new_mode != VOIDmode + && can_change_dest_mode (i2dest, added_sets_2, new_mode)) { - ni2dest = i2dest; + enum machine_mode old_mode = GET_MODE (i2dest); + rtx ni2dest; + + if (REGNO (i2dest) < FIRST_PSEUDO_REGISTER) + ni2dest = gen_rtx_REG (new_mode, REGNO (i2dest)); + else + { + SUBST_MODE (regno_reg_rtx[REGNO (i2dest)], new_mode); + ni2dest = regno_reg_rtx[REGNO (i2dest)]; + } + m_split = split_insns (gen_rtx_PARALLEL (VOIDmode, gen_rtvec (2, newpat, gen_rtx_CLOBBER (VOIDmode, - i2dest))), + ni2dest))), i3); + + if (m_split == 0 + && REGNO (i2dest) >= FIRST_PSEUDO_REGISTER) + { + struct undo *buf; + + PUT_MODE (regno_reg_rtx[REGNO (i2dest)], old_mode); + buf = undobuf.undos; + undobuf.undos = buf->next; + buf->next = undobuf.frees; + undobuf.frees = buf; + } } } @@ -2456,13 +2616,6 @@ try_combine (rtx i3, rtx i2, rtx i1, int *new_direct_jump_p) i3set = single_set (NEXT_INSN (m_split)); i2set = single_set (m_split); - /* In case we changed the mode of I2DEST, replace it in the - pseudo-register table here. We can't do it above in case this - code doesn't get executed and we do a split the other way. */ - - if (REGNO (i2dest) >= FIRST_PSEUDO_REGISTER) - SUBST (regno_reg_rtx[REGNO (i2dest)], ni2dest); - i2_code_number = recog_for_combine (&newi2pat, i2, &new_i2_notes); /* If I2 or I3 has multiple SETs, we won't know how to track @@ -2526,15 +2679,20 @@ try_combine (rtx i3, rtx i2, rtx i1, int *new_direct_jump_p) rtx newdest = i2dest; enum rtx_code split_code = GET_CODE (*split); enum machine_mode split_mode = GET_MODE (*split); + bool subst_done = false; + newi2pat = NULL_RTX; /* Get NEWDEST as a register in the proper mode. We have already validated that we can do this. */ if (GET_MODE (i2dest) != split_mode && split_mode != VOIDmode) { - newdest = gen_rtx_REG (split_mode, REGNO (i2dest)); - - if (REGNO (i2dest) >= FIRST_PSEUDO_REGISTER) - SUBST (regno_reg_rtx[REGNO (i2dest)], newdest); + if (REGNO (i2dest) < FIRST_PSEUDO_REGISTER) + newdest = gen_rtx_REG (split_mode, REGNO (i2dest)); + else + { + SUBST_MODE (regno_reg_rtx[REGNO (i2dest)], split_mode); + newdest = regno_reg_rtx[REGNO (i2dest)]; + } } /* If *SPLIT is a (mult FOO (const_int pow2)), convert it to @@ -2571,8 +2729,69 @@ try_combine (rtx i3, rtx i2, rtx i1, int *new_direct_jump_p) } #endif - newi2pat = gen_rtx_SET (VOIDmode, newdest, *split); - SUBST (*split, newdest); + /* Attempt to split binary operators using arithmetic identities. */ + if (BINARY_P (SET_SRC (newpat)) + && split_mode == GET_MODE (SET_SRC (newpat)) + && ! side_effects_p (SET_SRC (newpat))) + { + rtx setsrc = SET_SRC (newpat); + enum machine_mode mode = GET_MODE (setsrc); + enum rtx_code code = GET_CODE (setsrc); + rtx src_op0 = XEXP (setsrc, 0); + rtx src_op1 = XEXP (setsrc, 1); + + /* Split "X = Y op Y" as "Z = Y; X = Z op Z". */ + if (rtx_equal_p (src_op0, src_op1)) + { + newi2pat = gen_rtx_SET (VOIDmode, newdest, src_op0); + SUBST (XEXP (setsrc, 0), newdest); + SUBST (XEXP (setsrc, 1), newdest); + subst_done = true; + } + /* Split "((P op Q) op R) op S" where op is PLUS or MULT. */ + else if ((code == PLUS || code == MULT) + && GET_CODE (src_op0) == code + && GET_CODE (XEXP (src_op0, 0)) == code + && (INTEGRAL_MODE_P (mode) + || (FLOAT_MODE_P (mode) + && flag_unsafe_math_optimizations))) + { + rtx p = XEXP (XEXP (src_op0, 0), 0); + rtx q = XEXP (XEXP (src_op0, 0), 1); + rtx r = XEXP (src_op0, 1); + rtx s = src_op1; + + /* Split both "((X op Y) op X) op Y" and + "((X op Y) op Y) op X" as "T op T" where T is + "X op Y". */ + if ((rtx_equal_p (p,r) && rtx_equal_p (q,s)) + || (rtx_equal_p (p,s) && rtx_equal_p (q,r))) + { + newi2pat = gen_rtx_SET (VOIDmode, newdest, + XEXP (src_op0, 0)); + SUBST (XEXP (setsrc, 0), newdest); + SUBST (XEXP (setsrc, 1), newdest); + subst_done = true; + } + /* Split "((X op X) op Y) op Y)" as "T op T" where + T is "X op Y". */ + else if (rtx_equal_p (p,q) && rtx_equal_p (r,s)) + { + rtx tmp = simplify_gen_binary (code, mode, p, r); + newi2pat = gen_rtx_SET (VOIDmode, newdest, tmp); + SUBST (XEXP (setsrc, 0), newdest); + SUBST (XEXP (setsrc, 1), newdest); + subst_done = true; + } + } + } + + if (!subst_done) + { + newi2pat = gen_rtx_SET (VOIDmode, newdest, *split); + SUBST (*split, newdest); + } + i2_code_number = recog_for_combine (&newi2pat, i2, &new_i2_notes); /* recog_for_combine might have added CLOBBERs to newi2pat. @@ -3174,10 +3393,20 @@ undo_all (void) for (undo = undobuf.undos; undo; undo = next) { next = undo->next; - if (undo->is_int) - *undo->where.i = undo->old_contents.i; - else - *undo->where.r = undo->old_contents.r; + switch (undo->kind) + { + case UNDO_RTX: + *undo->where.r = undo->old_contents.r; + break; + case UNDO_INT: + *undo->where.i = undo->old_contents.i; + break; + case UNDO_MODE: + PUT_MODE (*undo->where.r, undo->old_contents.m); + break; + default: + gcc_unreachable (); + } undo->next = undobuf.frees; undobuf.frees = undo; @@ -3361,13 +3590,15 @@ find_split_point (rtx *loc, rtx insn) rtx dest = XEXP (SET_DEST (x), 0); enum machine_mode mode = GET_MODE (dest); unsigned HOST_WIDE_INT mask = ((HOST_WIDE_INT) 1 << len) - 1; + rtx or_mask; if (BITS_BIG_ENDIAN) pos = GET_MODE_BITSIZE (mode) - len - pos; + or_mask = gen_int_mode (src << pos, mode); if (src == mask) SUBST (SET_SRC (x), - simplify_gen_binary (IOR, mode, dest, GEN_INT (src << pos))); + simplify_gen_binary (IOR, mode, dest, or_mask)); else { rtx negmask = gen_int_mode (~(mask << pos), mode); @@ -3375,7 +3606,7 @@ find_split_point (rtx *loc, rtx insn) simplify_gen_binary (IOR, mode, simplify_gen_binary (AND, mode, dest, negmask), - GEN_INT (src << pos))); + or_mask)); } SUBST (SET_DEST (x), dest); @@ -3899,7 +4130,6 @@ combine_simplify_rtx (rtx x, enum machine_mode op0_mode, int in_dest) enum rtx_code code = GET_CODE (x); enum machine_mode mode = GET_MODE (x); rtx temp; - rtx reversed; int i; /* If this is a commutative operation, put a constant last and a complex @@ -4156,60 +4386,7 @@ combine_simplify_rtx (rtx x, enum machine_mode op0_mode, int in_dest) break; - case NOT: - if (GET_CODE (XEXP (x, 0)) == SUBREG - && subreg_lowpart_p (XEXP (x, 0)) - && (GET_MODE_SIZE (GET_MODE (XEXP (x, 0))) - < GET_MODE_SIZE (GET_MODE (SUBREG_REG (XEXP (x, 0))))) - && GET_CODE (SUBREG_REG (XEXP (x, 0))) == ASHIFT - && XEXP (SUBREG_REG (XEXP (x, 0)), 0) == const1_rtx) - { - enum machine_mode inner_mode = GET_MODE (SUBREG_REG (XEXP (x, 0))); - - x = gen_rtx_ROTATE (inner_mode, - simplify_gen_unary (NOT, inner_mode, const1_rtx, - inner_mode), - XEXP (SUBREG_REG (XEXP (x, 0)), 1)); - return gen_lowpart (mode, x); - } - - /* Apply De Morgan's laws to reduce number of patterns for machines - with negating logical insns (and-not, nand, etc.). If result has - only one NOT, put it first, since that is how the patterns are - coded. */ - - if (GET_CODE (XEXP (x, 0)) == IOR || GET_CODE (XEXP (x, 0)) == AND) - { - rtx in1 = XEXP (XEXP (x, 0), 0), in2 = XEXP (XEXP (x, 0), 1); - enum machine_mode op_mode; - - op_mode = GET_MODE (in1); - in1 = simplify_gen_unary (NOT, op_mode, in1, op_mode); - - op_mode = GET_MODE (in2); - if (op_mode == VOIDmode) - op_mode = mode; - in2 = simplify_gen_unary (NOT, op_mode, in2, op_mode); - - if (GET_CODE (in2) == NOT && GET_CODE (in1) != NOT) - { - rtx tem = in2; - in2 = in1; in1 = tem; - } - - return gen_rtx_fmt_ee (GET_CODE (XEXP (x, 0)) == IOR ? AND : IOR, - mode, in1, in2); - } - break; - case NEG: - /* (neg (xor A 1)) is (plus A -1) if A is known to be either 0 or 1. */ - if (GET_CODE (XEXP (x, 0)) == XOR - && XEXP (XEXP (x, 0), 1) == const1_rtx - && nonzero_bits (XEXP (XEXP (x, 0), 0), mode) == 1) - return simplify_gen_binary (PLUS, mode, XEXP (XEXP (x, 0), 0), - constm1_rtx); - temp = expand_compound_operation (XEXP (x, 0)); /* For C equal to the width of MODE minus 1, (neg (ashiftrt X C)) can be @@ -4219,7 +4396,7 @@ combine_simplify_rtx (rtx x, enum machine_mode op0_mode, int in_dest) if (GET_CODE (temp) == ASHIFTRT && GET_CODE (XEXP (temp, 1)) == CONST_INT && INTVAL (XEXP (temp, 1)) == GET_MODE_BITSIZE (mode) - 1) - return simplify_shift_const (temp, LSHIFTRT, mode, XEXP (temp, 0), + return simplify_shift_const (NULL_RTX, LSHIFTRT, mode, XEXP (temp, 0), INTVAL (XEXP (temp, 1))); /* If X has only a single bit that might be nonzero, say, bit I, convert @@ -4262,133 +4439,18 @@ combine_simplify_rtx (rtx x, enum machine_mode op0_mode, int in_dest) GET_MODE_BITSIZE (GET_MODE (XEXP (x, 0))))) SUBST (XEXP (x, 0), force_to_mode (XEXP (x, 0), GET_MODE (XEXP (x, 0)), - GET_MODE_MASK (mode), NULL_RTX, 0)); - - /* (truncate:SI ({sign,zero}_extend:DI foo:SI)) == foo:SI. */ - if ((GET_CODE (XEXP (x, 0)) == SIGN_EXTEND - || GET_CODE (XEXP (x, 0)) == ZERO_EXTEND) - && GET_MODE (XEXP (XEXP (x, 0), 0)) == mode) - return XEXP (XEXP (x, 0), 0); - - /* (truncate:SI (OP:DI ({sign,zero}_extend:DI foo:SI))) is - (OP:SI foo:SI) if OP is NEG or ABS. */ - if ((GET_CODE (XEXP (x, 0)) == ABS - || GET_CODE (XEXP (x, 0)) == NEG) - && (GET_CODE (XEXP (XEXP (x, 0), 0)) == SIGN_EXTEND - || GET_CODE (XEXP (XEXP (x, 0), 0)) == ZERO_EXTEND) - && GET_MODE (XEXP (XEXP (XEXP (x, 0), 0), 0)) == mode) - return simplify_gen_unary (GET_CODE (XEXP (x, 0)), mode, - XEXP (XEXP (XEXP (x, 0), 0), 0), mode); - - /* (truncate:SI (subreg:DI (truncate:SI X) 0)) is - (truncate:SI x). */ - if (GET_CODE (XEXP (x, 0)) == SUBREG - && GET_CODE (SUBREG_REG (XEXP (x, 0))) == TRUNCATE - && subreg_lowpart_p (XEXP (x, 0))) - return SUBREG_REG (XEXP (x, 0)); - - /* If we know that the value is already truncated, we can - replace the TRUNCATE with a SUBREG if TRULY_NOOP_TRUNCATION - is nonzero for the corresponding modes. But don't do this - for an (LSHIFTRT (MULT ...)) since this will cause problems - with the umulXi3_highpart patterns. */ - if (TRULY_NOOP_TRUNCATION (GET_MODE_BITSIZE (mode), - GET_MODE_BITSIZE (GET_MODE (XEXP (x, 0)))) - && num_sign_bit_copies (XEXP (x, 0), GET_MODE (XEXP (x, 0))) - >= (unsigned int) (GET_MODE_BITSIZE (mode) + 1) - && ! (GET_CODE (XEXP (x, 0)) == LSHIFTRT - && GET_CODE (XEXP (XEXP (x, 0), 0)) == MULT)) - return gen_lowpart (mode, XEXP (x, 0)); - - /* A truncate of a comparison can be replaced with a subreg if - STORE_FLAG_VALUE permits. This is like the previous test, - but it works even if the comparison is done in a mode larger - than HOST_BITS_PER_WIDE_INT. */ - if (GET_MODE_BITSIZE (mode) <= HOST_BITS_PER_WIDE_INT - && COMPARISON_P (XEXP (x, 0)) - && ((HOST_WIDE_INT) STORE_FLAG_VALUE & ~GET_MODE_MASK (mode)) == 0) - return gen_lowpart (mode, XEXP (x, 0)); + GET_MODE_MASK (mode), 0)); - /* Similarly, a truncate of a register whose value is a - comparison can be replaced with a subreg if STORE_FLAG_VALUE - permits. */ + /* Similarly to what we do in simplify-rtx.c, a truncate of a register + whose value is a comparison can be replaced with a subreg if + STORE_FLAG_VALUE permits. */ if (GET_MODE_BITSIZE (mode) <= HOST_BITS_PER_WIDE_INT && ((HOST_WIDE_INT) STORE_FLAG_VALUE & ~GET_MODE_MASK (mode)) == 0 && (temp = get_last_value (XEXP (x, 0))) && COMPARISON_P (temp)) return gen_lowpart (mode, XEXP (x, 0)); - break; - case FLOAT_TRUNCATE: - /* (float_truncate:SF (float_extend:DF foo:SF)) = foo:SF. */ - if (GET_CODE (XEXP (x, 0)) == FLOAT_EXTEND - && GET_MODE (XEXP (XEXP (x, 0), 0)) == mode) - return XEXP (XEXP (x, 0), 0); - - /* (float_truncate:SF (float_truncate:DF foo:XF)) - = (float_truncate:SF foo:XF). - This may eliminate double rounding, so it is unsafe. - - (float_truncate:SF (float_extend:XF foo:DF)) - = (float_truncate:SF foo:DF). - - (float_truncate:DF (float_extend:XF foo:SF)) - = (float_extend:SF foo:DF). */ - if ((GET_CODE (XEXP (x, 0)) == FLOAT_TRUNCATE - && flag_unsafe_math_optimizations) - || GET_CODE (XEXP (x, 0)) == FLOAT_EXTEND) - return simplify_gen_unary (GET_MODE_SIZE (GET_MODE (XEXP (XEXP (x, 0), - 0))) - > GET_MODE_SIZE (mode) - ? FLOAT_TRUNCATE : FLOAT_EXTEND, - mode, - XEXP (XEXP (x, 0), 0), mode); - - /* (float_truncate (float x)) is (float x) */ - if (GET_CODE (XEXP (x, 0)) == FLOAT - && (flag_unsafe_math_optimizations - || ((unsigned)significand_size (GET_MODE (XEXP (x, 0))) - >= (GET_MODE_BITSIZE (GET_MODE (XEXP (XEXP (x, 0), 0))) - - num_sign_bit_copies (XEXP (XEXP (x, 0), 0), - GET_MODE (XEXP (XEXP (x, 0), 0))))))) - return simplify_gen_unary (FLOAT, mode, - XEXP (XEXP (x, 0), 0), - GET_MODE (XEXP (XEXP (x, 0), 0))); - - /* (float_truncate:SF (OP:DF (float_extend:DF foo:sf))) is - (OP:SF foo:SF) if OP is NEG or ABS. */ - if ((GET_CODE (XEXP (x, 0)) == ABS - || GET_CODE (XEXP (x, 0)) == NEG) - && GET_CODE (XEXP (XEXP (x, 0), 0)) == FLOAT_EXTEND - && GET_MODE (XEXP (XEXP (XEXP (x, 0), 0), 0)) == mode) - return simplify_gen_unary (GET_CODE (XEXP (x, 0)), mode, - XEXP (XEXP (XEXP (x, 0), 0), 0), mode); - - /* (float_truncate:SF (subreg:DF (float_truncate:SF X) 0)) - is (float_truncate:SF x). */ - if (GET_CODE (XEXP (x, 0)) == SUBREG - && subreg_lowpart_p (XEXP (x, 0)) - && GET_CODE (SUBREG_REG (XEXP (x, 0))) == FLOAT_TRUNCATE) - return SUBREG_REG (XEXP (x, 0)); - break; - case FLOAT_EXTEND: - /* (float_extend (float_extend x)) is (float_extend x) - - (float_extend (float x)) is (float x) assuming that double - rounding can't happen. - */ - if (GET_CODE (XEXP (x, 0)) == FLOAT_EXTEND - || (GET_CODE (XEXP (x, 0)) == FLOAT - && ((unsigned)significand_size (GET_MODE (XEXP (x, 0))) - >= (GET_MODE_BITSIZE (GET_MODE (XEXP (XEXP (x, 0), 0))) - - num_sign_bit_copies (XEXP (XEXP (x, 0), 0), - GET_MODE (XEXP (XEXP (x, 0), 0))))))) - return simplify_gen_unary (GET_CODE (XEXP (x, 0)), mode, - XEXP (XEXP (x, 0), 0), - GET_MODE (XEXP (XEXP (x, 0), 0))); - - break; #ifdef HAVE_cc0 case COMPARE: /* Convert (compare FOO (const_int 0)) to FOO unless we aren't @@ -4427,32 +4489,6 @@ combine_simplify_rtx (rtx x, enum machine_mode op0_mode, int in_dest) #endif case PLUS: - /* Canonicalize (plus (mult (neg B) C) A) to (minus A (mult B C)). - */ - if (GET_CODE (XEXP (x, 0)) == MULT - && GET_CODE (XEXP (XEXP (x, 0), 0)) == NEG) - { - rtx in1, in2; - - in1 = XEXP (XEXP (XEXP (x, 0), 0), 0); - in2 = XEXP (XEXP (x, 0), 1); - return simplify_gen_binary (MINUS, mode, XEXP (x, 1), - simplify_gen_binary (MULT, mode, - in1, in2)); - } - - /* If we have (plus (plus (A const) B)), associate it so that CONST is - outermost. That's because that's the way indexed addresses are - supposed to appear. This code used to check many more cases, but - they are now checked elsewhere. */ - if (GET_CODE (XEXP (x, 0)) == PLUS - && CONSTANT_ADDRESS_P (XEXP (XEXP (x, 0), 1))) - return simplify_gen_binary (PLUS, mode, - simplify_gen_binary (PLUS, mode, - XEXP (XEXP (x, 0), 0), - XEXP (x, 1)), - XEXP (XEXP (x, 0), 1)); - /* (plus (xor (and (const_int pow2 - 1)) ) <-c>) when c is (const_int (pow2 + 1) / 2) is a sign extension of a bit-field and can be replaced by either a sign_extend or a @@ -4479,17 +4515,6 @@ combine_simplify_rtx (rtx x, enum machine_mode op0_mode, int in_dest) GET_MODE_BITSIZE (mode) - (i + 1)), GET_MODE_BITSIZE (mode) - (i + 1)); - /* (plus (comparison A B) C) can become (neg (rev-comp A B)) if - C is 1 and STORE_FLAG_VALUE is -1 or if C is -1 and STORE_FLAG_VALUE - is 1. This produces better code than the alternative immediately - below. */ - if (COMPARISON_P (XEXP (x, 0)) - && ((STORE_FLAG_VALUE == -1 && XEXP (x, 1) == const1_rtx) - || (STORE_FLAG_VALUE == 1 && XEXP (x, 1) == constm1_rtx)) - && (reversed = reversed_comparison (XEXP (x, 0), mode))) - return - simplify_gen_unary (NEG, mode, reversed, mode); - /* If only the low-order bit of X is possibly nonzero, (plus x -1) can become (ashiftrt (ashift (xor x 1) C) C) where C is the bitsize of the mode - 1. This allows simplification of @@ -4527,14 +4552,6 @@ combine_simplify_rtx (rtx x, enum machine_mode op0_mode, int in_dest) break; case MINUS: - /* If STORE_FLAG_VALUE is 1, (minus 1 (comparison foo bar)) can be done - by reversing the comparison code if valid. */ - if (STORE_FLAG_VALUE == 1 - && XEXP (x, 0) == const1_rtx - && COMPARISON_P (XEXP (x, 1)) - && (reversed = reversed_comparison (XEXP (x, 1), mode))) - return reversed; - /* (minus (and (const_int -pow2))) becomes (and (const_int pow2-1)) */ if (GET_CODE (XEXP (x, 1)) == AND @@ -4543,45 +4560,6 @@ combine_simplify_rtx (rtx x, enum machine_mode op0_mode, int in_dest) && rtx_equal_p (XEXP (XEXP (x, 1), 0), XEXP (x, 0))) return simplify_and_const_int (NULL_RTX, mode, XEXP (x, 0), -INTVAL (XEXP (XEXP (x, 1), 1)) - 1); - - /* Canonicalize (minus A (mult (neg B) C)) to (plus (mult B C) A). - */ - if (GET_CODE (XEXP (x, 1)) == MULT - && GET_CODE (XEXP (XEXP (x, 1), 0)) == NEG) - { - rtx in1, in2; - - in1 = XEXP (XEXP (XEXP (x, 1), 0), 0); - in2 = XEXP (XEXP (x, 1), 1); - return simplify_gen_binary (PLUS, mode, - simplify_gen_binary (MULT, mode, - in1, in2), - XEXP (x, 0)); - } - - /* Canonicalize (minus (neg A) (mult B C)) to - (minus (mult (neg B) C) A). */ - if (GET_CODE (XEXP (x, 1)) == MULT - && GET_CODE (XEXP (x, 0)) == NEG) - { - rtx in1, in2; - - in1 = simplify_gen_unary (NEG, mode, XEXP (XEXP (x, 1), 0), mode); - in2 = XEXP (XEXP (x, 1), 1); - return simplify_gen_binary (MINUS, mode, - simplify_gen_binary (MULT, mode, - in1, in2), - XEXP (XEXP (x, 0), 0)); - } - - /* Canonicalize (minus A (plus B C)) to (minus (minus A B) C) for - integers. */ - if (GET_CODE (XEXP (x, 1)) == PLUS && INTEGRAL_MODE_P (mode)) - return simplify_gen_binary (MINUS, mode, - simplify_gen_binary (MINUS, mode, - XEXP (x, 0), - XEXP (XEXP (x, 1), 0)), - XEXP (XEXP (x, 1), 1)); break; case MULT: @@ -4797,55 +4775,8 @@ combine_simplify_rtx (rtx x, enum machine_mode op0_mode, int in_dest) case AND: case IOR: - case XOR: return simplify_logical (x); - case ABS: - /* (abs (neg )) -> (abs ) */ - if (GET_CODE (XEXP (x, 0)) == NEG) - SUBST (XEXP (x, 0), XEXP (XEXP (x, 0), 0)); - - /* If the mode of the operand is VOIDmode (i.e. if it is ASM_OPERANDS), - do nothing. */ - if (GET_MODE (XEXP (x, 0)) == VOIDmode) - break; - - /* If operand is something known to be positive, ignore the ABS. */ - if (GET_CODE (XEXP (x, 0)) == FFS || GET_CODE (XEXP (x, 0)) == ABS - || ((GET_MODE_BITSIZE (GET_MODE (XEXP (x, 0))) - <= HOST_BITS_PER_WIDE_INT) - && ((nonzero_bits (XEXP (x, 0), GET_MODE (XEXP (x, 0))) - & ((HOST_WIDE_INT) 1 - << (GET_MODE_BITSIZE (GET_MODE (XEXP (x, 0))) - 1))) - == 0))) - return XEXP (x, 0); - - /* If operand is known to be only -1 or 0, convert ABS to NEG. */ - if (num_sign_bit_copies (XEXP (x, 0), mode) == GET_MODE_BITSIZE (mode)) - return gen_rtx_NEG (mode, XEXP (x, 0)); - - break; - - case FFS: - /* (ffs (*_extend )) = (ffs ) */ - if (GET_CODE (XEXP (x, 0)) == SIGN_EXTEND - || GET_CODE (XEXP (x, 0)) == ZERO_EXTEND) - SUBST (XEXP (x, 0), XEXP (XEXP (x, 0), 0)); - break; - - case POPCOUNT: - case PARITY: - /* (pop* (zero_extend )) = (pop* ) */ - if (GET_CODE (XEXP (x, 0)) == ZERO_EXTEND) - SUBST (XEXP (x, 0), XEXP (XEXP (x, 0), 0)); - break; - - case FLOAT: - /* (float (sign_extend )) = (float ). */ - if (GET_CODE (XEXP (x, 0)) == SIGN_EXTEND) - SUBST (XEXP (x, 0), XEXP (XEXP (x, 0), 0)); - break; - case ASHIFT: case LSHIFTRT: case ASHIFTRT: @@ -4862,45 +4793,7 @@ combine_simplify_rtx (rtx x, enum machine_mode op0_mode, int in_dest) ((HOST_WIDE_INT) 1 << exact_log2 (GET_MODE_BITSIZE (GET_MODE (x)))) - 1, - NULL_RTX, 0)); - break; - - case VEC_SELECT: - { - rtx op0 = XEXP (x, 0); - rtx op1 = XEXP (x, 1); - int len; - - gcc_assert (GET_CODE (op1) == PARALLEL); - len = XVECLEN (op1, 0); - if (len == 1 - && GET_CODE (XVECEXP (op1, 0, 0)) == CONST_INT - && GET_CODE (op0) == VEC_CONCAT) - { - int offset = INTVAL (XVECEXP (op1, 0, 0)) * GET_MODE_SIZE (GET_MODE (x)); - - /* Try to find the element in the VEC_CONCAT. */ - for (;;) - { - if (GET_MODE (op0) == GET_MODE (x)) - return op0; - if (GET_CODE (op0) == VEC_CONCAT) - { - HOST_WIDE_INT op0_size = GET_MODE_SIZE (GET_MODE (XEXP (op0, 0))); - if (offset < op0_size) - op0 = XEXP (op0, 0); - else - { - offset -= op0_size; - op0 = XEXP (op0, 1); - } - } - else - break; - } - } - } - + 0)); break; default: @@ -5264,7 +5157,7 @@ simplify_set (rtx x) if (GET_MODE_CLASS (mode) == MODE_INT && GET_MODE_BITSIZE (mode) <= HOST_BITS_PER_WIDE_INT) { - src = force_to_mode (src, mode, ~(HOST_WIDE_INT) 0, NULL_RTX, 0); + src = force_to_mode (src, mode, ~(HOST_WIDE_INT) 0, 0); SUBST (SET_SRC (x), src); } @@ -5342,10 +5235,15 @@ simplify_set (rtx x) if (can_change_dest_mode (dest, 0, compare_mode)) { unsigned int regno = REGNO (dest); - rtx new_dest = gen_rtx_REG (compare_mode, regno); + rtx new_dest; - if (regno >= FIRST_PSEUDO_REGISTER) - SUBST (regno_reg_rtx[regno], new_dest); + if (regno < FIRST_PSEUDO_REGISTER) + new_dest = gen_rtx_REG (compare_mode, regno); + else + { + SUBST_MODE (regno_reg_rtx[regno], compare_mode); + new_dest = regno_reg_rtx[regno]; + } SUBST (SET_DEST (x), new_dest); SUBST (XEXP (*cc_use, 0), new_dest); @@ -5595,42 +5493,10 @@ simplify_logical (rtx x) enum machine_mode mode = GET_MODE (x); rtx op0 = XEXP (x, 0); rtx op1 = XEXP (x, 1); - rtx reversed; switch (GET_CODE (x)) { case AND: - /* Convert (A ^ B) & A to A & (~B) since the latter is often a single - insn (and may simplify more). */ - if (GET_CODE (op0) == XOR - && rtx_equal_p (XEXP (op0, 0), op1) - && ! side_effects_p (op1)) - x = simplify_gen_binary (AND, mode, - simplify_gen_unary (NOT, mode, - XEXP (op0, 1), mode), - op1); - - if (GET_CODE (op0) == XOR - && rtx_equal_p (XEXP (op0, 1), op1) - && ! side_effects_p (op1)) - x = simplify_gen_binary (AND, mode, - simplify_gen_unary (NOT, mode, - XEXP (op0, 0), mode), - op1); - - /* Similarly for (~(A ^ B)) & A. */ - if (GET_CODE (op0) == NOT - && GET_CODE (XEXP (op0, 0)) == XOR - && rtx_equal_p (XEXP (XEXP (op0, 0), 0), op1) - && ! side_effects_p (op1)) - x = simplify_gen_binary (AND, mode, XEXP (XEXP (op0, 0), 1), op1); - - if (GET_CODE (op0) == NOT - && GET_CODE (XEXP (op0, 0)) == XOR - && rtx_equal_p (XEXP (XEXP (op0, 0), 1), op1) - && ! side_effects_p (op1)) - x = simplify_gen_binary (AND, mode, XEXP (XEXP (op0, 0), 0), op1); - /* We can call simplify_and_const_int only if we don't lose any (sign) bits when converting INTVAL (op1) to "unsigned HOST_WIDE_INT". */ @@ -5639,22 +5505,6 @@ simplify_logical (rtx x) || INTVAL (op1) > 0)) { x = simplify_and_const_int (x, mode, op0, INTVAL (op1)); - - /* If we have (ior (and (X C1) C2)) and the next restart would be - the last, simplify this by making C1 as small as possible - and then exit. Only do this if C1 actually changes: for now - this only saves memory but, should this transformation be - moved to simplify-rtx.c, we'd risk unbounded recursion there. */ - if (GET_CODE (x) == IOR && GET_CODE (op0) == AND - && GET_CODE (XEXP (op0, 1)) == CONST_INT - && GET_CODE (op1) == CONST_INT - && (INTVAL (XEXP (op0, 1)) & INTVAL (op1)) != 0) - return simplify_gen_binary (IOR, mode, - simplify_gen_binary - (AND, mode, XEXP (op0, 0), - GEN_INT (INTVAL (XEXP (op0, 1)) - & ~INTVAL (op1))), op1); - if (GET_CODE (x) != AND) return x; @@ -5662,14 +5512,6 @@ simplify_logical (rtx x) op1 = XEXP (x, 1); } - /* Convert (A | B) & A to A. */ - if (GET_CODE (op0) == IOR - && (rtx_equal_p (XEXP (op0, 0), op1) - || rtx_equal_p (XEXP (op0, 1), op1)) - && ! side_effects_p (XEXP (op0, 0)) - && ! side_effects_p (XEXP (op0, 1))) - return op1; - /* If we have any of (and (ior A B) C) or (and (xor A B) C), apply the distributive law and then the inverse distributive law to see if things simplify. */ @@ -5688,20 +5530,6 @@ simplify_logical (rtx x) break; case IOR: - /* (ior A C) is C if all bits of A that might be nonzero are on in C. */ - if (GET_CODE (op1) == CONST_INT - && GET_MODE_BITSIZE (mode) <= HOST_BITS_PER_WIDE_INT - && (nonzero_bits (op0, mode) & ~INTVAL (op1)) == 0) - return op1; - - /* Convert (A & B) | A to A. */ - if (GET_CODE (op0) == AND - && (rtx_equal_p (XEXP (op0, 0), op1) - || rtx_equal_p (XEXP (op0, 1), op1)) - && ! side_effects_p (XEXP (op0, 0)) - && ! side_effects_p (XEXP (op0, 1))) - return op1; - /* If we have (ior (and A B) C), apply the distributive law and then the inverse distributive law to see if things simplify. */ @@ -5718,127 +5546,6 @@ simplify_logical (rtx x) if (result) return result; } - - /* Convert (ior (ashift A CX) (lshiftrt A CY)) where CX+CY equals the - mode size to (rotate A CX). */ - - if (((GET_CODE (op0) == ASHIFT && GET_CODE (op1) == LSHIFTRT) - || (GET_CODE (op1) == ASHIFT && GET_CODE (op0) == LSHIFTRT)) - && rtx_equal_p (XEXP (op0, 0), XEXP (op1, 0)) - && GET_CODE (XEXP (op0, 1)) == CONST_INT - && GET_CODE (XEXP (op1, 1)) == CONST_INT - && (INTVAL (XEXP (op0, 1)) + INTVAL (XEXP (op1, 1)) - == GET_MODE_BITSIZE (mode))) - return gen_rtx_ROTATE (mode, XEXP (op0, 0), - (GET_CODE (op0) == ASHIFT - ? XEXP (op0, 1) : XEXP (op1, 1))); - - /* If OP0 is (ashiftrt (plus ...) C), it might actually be - a (sign_extend (plus ...)). If so, OP1 is a CONST_INT, and the PLUS - does not affect any of the bits in OP1, it can really be done - as a PLUS and we can associate. We do this by seeing if OP1 - can be safely shifted left C bits. */ - if (GET_CODE (op1) == CONST_INT && GET_CODE (op0) == ASHIFTRT - && GET_CODE (XEXP (op0, 0)) == PLUS - && GET_CODE (XEXP (XEXP (op0, 0), 1)) == CONST_INT - && GET_CODE (XEXP (op0, 1)) == CONST_INT - && INTVAL (XEXP (op0, 1)) < HOST_BITS_PER_WIDE_INT) - { - int count = INTVAL (XEXP (op0, 1)); - HOST_WIDE_INT mask = INTVAL (op1) << count; - - if (mask >> count == INTVAL (op1) - && (mask & nonzero_bits (XEXP (op0, 0), mode)) == 0) - { - SUBST (XEXP (XEXP (op0, 0), 1), - GEN_INT (INTVAL (XEXP (XEXP (op0, 0), 1)) | mask)); - return op0; - } - } - break; - - case XOR: - /* If we are XORing two things that have no bits in common, - convert them into an IOR. This helps to detect rotation encoded - using those methods and possibly other simplifications. */ - - if (GET_MODE_BITSIZE (mode) <= HOST_BITS_PER_WIDE_INT - && (nonzero_bits (op0, mode) - & nonzero_bits (op1, mode)) == 0) - return (simplify_gen_binary (IOR, mode, op0, op1)); - - /* Convert (XOR (NOT x) (NOT y)) to (XOR x y). - Also convert (XOR (NOT x) y) to (NOT (XOR x y)), similarly for - (NOT y). */ - { - int num_negated = 0; - - if (GET_CODE (op0) == NOT) - num_negated++, op0 = XEXP (op0, 0); - if (GET_CODE (op1) == NOT) - num_negated++, op1 = XEXP (op1, 0); - - if (num_negated == 2) - { - SUBST (XEXP (x, 0), op0); - SUBST (XEXP (x, 1), op1); - } - else if (num_negated == 1) - return - simplify_gen_unary (NOT, mode, - simplify_gen_binary (XOR, mode, op0, op1), - mode); - } - - /* Convert (xor (and A B) B) to (and (not A) B). The latter may - correspond to a machine insn or result in further simplifications - if B is a constant. */ - - if (GET_CODE (op0) == AND - && rtx_equal_p (XEXP (op0, 1), op1) - && ! side_effects_p (op1)) - return simplify_gen_binary (AND, mode, - simplify_gen_unary (NOT, mode, - XEXP (op0, 0), mode), - op1); - - else if (GET_CODE (op0) == AND - && rtx_equal_p (XEXP (op0, 0), op1) - && ! side_effects_p (op1)) - return simplify_gen_binary (AND, mode, - simplify_gen_unary (NOT, mode, - XEXP (op0, 1), mode), - op1); - - /* (xor (comparison foo bar) (const_int 1)) can become the reversed - comparison if STORE_FLAG_VALUE is 1. */ - if (STORE_FLAG_VALUE == 1 - && op1 == const1_rtx - && COMPARISON_P (op0) - && (reversed = reversed_comparison (op0, mode))) - return reversed; - - /* (lshiftrt foo C) where C is the number of bits in FOO minus 1 - is (lt foo (const_int 0)), so we can perform the above - simplification if STORE_FLAG_VALUE is 1. */ - - if (STORE_FLAG_VALUE == 1 - && op1 == const1_rtx - && GET_CODE (op0) == LSHIFTRT - && GET_CODE (XEXP (op0, 1)) == CONST_INT - && INTVAL (XEXP (op0, 1)) == GET_MODE_BITSIZE (mode) - 1) - return gen_rtx_GE (mode, XEXP (op0, 0), const0_rtx); - - /* (xor (comparison foo bar) (const_int sign-bit)) - when STORE_FLAG_VALUE is the sign bit. */ - if (GET_MODE_BITSIZE (mode) <= HOST_BITS_PER_WIDE_INT - && ((STORE_FLAG_VALUE & GET_MODE_MASK (mode)) - == (unsigned HOST_WIDE_INT) 1 << (GET_MODE_BITSIZE (mode) - 1)) - && op1 == const_true_rtx - && COMPARISON_P (op0) - && (reversed = reversed_comparison (op0, mode))) - return reversed; - break; default: @@ -6298,6 +6005,11 @@ make_extraction (enum machine_mode mode, rtx inner, HOST_WIDE_INT pos, && ! (spans_byte && inner_mode != tmode) && ((pos_rtx == 0 && (pos % BITS_PER_WORD) == 0 && !MEM_P (inner) + && (inner_mode == tmode + || !REG_P (inner) + || TRULY_NOOP_TRUNCATION (GET_MODE_BITSIZE (tmode), + GET_MODE_BITSIZE (inner_mode)) + || reg_truncated_to_mode (tmode, inner)) && (! in_dest || (REG_P (inner) && have_insn_for (STRICT_LOW_PART, tmode)))) @@ -6372,7 +6084,7 @@ make_extraction (enum machine_mode mode, rtx inner, HOST_WIDE_INT pos, len >= HOST_BITS_PER_WIDE_INT ? ~(unsigned HOST_WIDE_INT) 0 : ((unsigned HOST_WIDE_INT) 1 << len) - 1, - NULL_RTX, 0); + 0); /* If this extraction is going into the destination of a SET, make a STRICT_LOW_PART unless we made a MEM. */ @@ -6562,7 +6274,7 @@ make_extraction (enum machine_mode mode, rtx inner, HOST_WIDE_INT pos, ? ~(unsigned HOST_WIDE_INT) 0 : ((((unsigned HOST_WIDE_INT) 1 << len) - 1) << orig_pos), - NULL_RTX, 0); + 0); } /* Adjust mode of POS_RTX, if needed. If we want a wider mode, we @@ -6895,7 +6607,7 @@ make_compound_operation (rtx x, enum rtx_code in_code) && subreg_lowpart_p (x)) { rtx newer = force_to_mode (tem, mode, ~(HOST_WIDE_INT) 0, - NULL_RTX, 0); + 0); /* If we have something other than a SUBREG, we might have done an expansion, so rerun ourselves. */ @@ -6968,6 +6680,121 @@ get_pos_from_mask (unsigned HOST_WIDE_INT m, unsigned HOST_WIDE_INT *plen) return pos; } +/* If X refers to a register that equals REG in value, replace these + references with REG. */ +static rtx +canon_reg_for_combine (rtx x, rtx reg) +{ + rtx op0, op1, op2; + const char *fmt; + int i; + bool copied; + + enum rtx_code code = GET_CODE (x); + switch (GET_RTX_CLASS (code)) + { + case RTX_UNARY: + op0 = canon_reg_for_combine (XEXP (x, 0), reg); + if (op0 != XEXP (x, 0)) + return simplify_gen_unary (GET_CODE (x), GET_MODE (x), op0, + GET_MODE (reg)); + break; + + case RTX_BIN_ARITH: + case RTX_COMM_ARITH: + op0 = canon_reg_for_combine (XEXP (x, 0), reg); + op1 = canon_reg_for_combine (XEXP (x, 1), reg); + if (op0 != XEXP (x, 0) || op1 != XEXP (x, 1)) + return simplify_gen_binary (GET_CODE (x), GET_MODE (x), op0, op1); + break; + + case RTX_COMPARE: + case RTX_COMM_COMPARE: + op0 = canon_reg_for_combine (XEXP (x, 0), reg); + op1 = canon_reg_for_combine (XEXP (x, 1), reg); + if (op0 != XEXP (x, 0) || op1 != XEXP (x, 1)) + return simplify_gen_relational (GET_CODE (x), GET_MODE (x), + GET_MODE (op0), op0, op1); + break; + + case RTX_TERNARY: + case RTX_BITFIELD_OPS: + op0 = canon_reg_for_combine (XEXP (x, 0), reg); + op1 = canon_reg_for_combine (XEXP (x, 1), reg); + op2 = canon_reg_for_combine (XEXP (x, 2), reg); + if (op0 != XEXP (x, 0) || op1 != XEXP (x, 1) || op2 != XEXP (x, 2)) + return simplify_gen_ternary (GET_CODE (x), GET_MODE (x), + GET_MODE (op0), op0, op1, op2); + + case RTX_OBJ: + if (REG_P (x)) + { + if (rtx_equal_p (get_last_value (reg), x) + || rtx_equal_p (reg, get_last_value (x))) + return reg; + else + break; + } + + /* fall through */ + + default: + fmt = GET_RTX_FORMAT (code); + copied = false; + for (i = GET_RTX_LENGTH (code) - 1; i >= 0; i--) + if (fmt[i] == 'e') + { + rtx op = canon_reg_for_combine (XEXP (x, i), reg); + if (op != XEXP (x, i)) + { + if (!copied) + { + copied = true; + x = copy_rtx (x); + } + XEXP (x, i) = op; + } + } + else if (fmt[i] == 'E') + { + int j; + for (j = 0; j < XVECLEN (x, i); j++) + { + rtx op = canon_reg_for_combine (XVECEXP (x, i, j), reg); + if (op != XVECEXP (x, i, j)) + { + if (!copied) + { + copied = true; + x = copy_rtx (x); + } + XVECEXP (x, i, j) = op; + } + } + } + + break; + } + + return x; +} + +/* Return X converted to MODE. If the value is already truncated to + MODE we can just return a subreg even though in the general case we + would need an explicit truncation. */ + +static rtx +gen_lowpart_or_truncate (enum machine_mode mode, rtx x) +{ + if (GET_MODE_SIZE (GET_MODE (x)) <= GET_MODE_SIZE (mode) + || TRULY_NOOP_TRUNCATION (GET_MODE_BITSIZE (mode), + GET_MODE_BITSIZE (GET_MODE (x))) + || (REG_P (x) && reg_truncated_to_mode (mode, x))) + return gen_lowpart (mode, x); + else + return gen_rtx_TRUNCATE (mode, x); +} + /* See if X can be simplified knowing that we will only refer to it in MODE and will only refer to those bits that are nonzero in MASK. If other bits are being computed or if masking operations are done @@ -6977,16 +6804,13 @@ get_pos_from_mask (unsigned HOST_WIDE_INT m, unsigned HOST_WIDE_INT *plen) Return a possibly simplified expression, but always convert X to MODE. If X is a CONST_INT, AND the CONST_INT with MASK. - Also, if REG is nonzero and X is a register equal in value to REG, - replace X with REG. - If JUST_SELECT is nonzero, don't optimize by noticing that bits in MASK are all off in X. This is used when X will be complemented, by either NOT, NEG, or XOR. */ static rtx force_to_mode (rtx x, enum machine_mode mode, unsigned HOST_WIDE_INT mask, - rtx reg, int just_select) + int just_select) { enum rtx_code code = GET_CODE (x); int next_select = just_select || code == XOR || code == NOT || code == NEG; @@ -7068,7 +6892,7 @@ force_to_mode (rtx x, enum machine_mode mode, unsigned HOST_WIDE_INT mask, within that boundary, we don't need the USE any more. */ if (! BITS_BIG_ENDIAN && (mask & ~GET_MODE_MASK (GET_MODE (XEXP (x, 0)))) == 0) - return force_to_mode (XEXP (x, 0), mode, mask, reg, next_select); + return force_to_mode (XEXP (x, 0), mode, mask, next_select); break; case SIGN_EXTEND: @@ -7077,13 +6901,7 @@ force_to_mode (rtx x, enum machine_mode mode, unsigned HOST_WIDE_INT mask, case SIGN_EXTRACT: x = expand_compound_operation (x); if (GET_CODE (x) != code) - return force_to_mode (x, mode, mask, reg, next_select); - break; - - case REG: - if (reg != 0 && (rtx_equal_p (get_last_value (reg), x) - || rtx_equal_p (reg, get_last_value (x)))) - x = reg; + return force_to_mode (x, mode, mask, next_select); break; case SUBREG: @@ -7096,7 +6914,7 @@ force_to_mode (rtx x, enum machine_mode mode, unsigned HOST_WIDE_INT mask, || (0 == (mask & GET_MODE_MASK (GET_MODE (x)) & ~GET_MODE_MASK (GET_MODE (SUBREG_REG (x))))))) - return force_to_mode (SUBREG_REG (x), mode, mask, reg, next_select); + return force_to_mode (SUBREG_REG (x), mode, mask, next_select); break; case AND: @@ -7172,7 +6990,7 @@ force_to_mode (rtx x, enum machine_mode mode, unsigned HOST_WIDE_INT mask, && (INTVAL (XEXP (x, 1)) & ~smask) != 0) return force_to_mode (plus_constant (XEXP (x, 0), (INTVAL (XEXP (x, 1)) & smask)), - mode, smask, reg, next_select); + mode, smask, next_select); } /* ... fall through ... */ @@ -7194,7 +7012,7 @@ force_to_mode (rtx x, enum machine_mode mode, unsigned HOST_WIDE_INT mask, { x = simplify_gen_unary (NEG, GET_MODE (x), XEXP (x, 1), GET_MODE (x)); - return force_to_mode (x, mode, mask, reg, next_select); + return force_to_mode (x, mode, mask, next_select); } /* Similarly, if C contains every bit in the fuller_mask, then we may @@ -7205,7 +7023,7 @@ force_to_mode (rtx x, enum machine_mode mode, unsigned HOST_WIDE_INT mask, { x = simplify_gen_unary (NOT, GET_MODE (x), XEXP (x, 1), GET_MODE (x)); - return force_to_mode (x, mode, mask, reg, next_select); + return force_to_mode (x, mode, mask, next_select); } mask = fuller_mask; @@ -7235,19 +7053,19 @@ force_to_mode (rtx x, enum machine_mode mode, unsigned HOST_WIDE_INT mask, XEXP (XEXP (x, 0), 0), temp); x = simplify_gen_binary (LSHIFTRT, GET_MODE (x), temp, XEXP (XEXP (x, 0), 1)); - return force_to_mode (x, mode, mask, reg, next_select); + return force_to_mode (x, mode, mask, next_select); } binop: /* For most binary operations, just propagate into the operation and change the mode if we have an operation of that mode. */ - op0 = gen_lowpart (op_mode, - force_to_mode (XEXP (x, 0), mode, mask, - reg, next_select)); - op1 = gen_lowpart (op_mode, - force_to_mode (XEXP (x, 1), mode, mask, - reg, next_select)); + op0 = gen_lowpart_or_truncate (op_mode, + force_to_mode (XEXP (x, 0), mode, mask, + next_select)); + op1 = gen_lowpart_or_truncate (op_mode, + force_to_mode (XEXP (x, 1), mode, mask, + next_select)); if (op_mode != GET_MODE (x) || op0 != XEXP (x, 0) || op1 != XEXP (x, 1)) x = simplify_gen_binary (code, op_mode, op0, op1); @@ -7279,9 +7097,9 @@ force_to_mode (rtx x, enum machine_mode mode, unsigned HOST_WIDE_INT mask, else mask = fuller_mask; - op0 = gen_lowpart (op_mode, - force_to_mode (XEXP (x, 0), op_mode, - mask, reg, next_select)); + op0 = gen_lowpart_or_truncate (op_mode, + force_to_mode (XEXP (x, 0), op_mode, + mask, next_select)); if (op_mode != GET_MODE (x) || op0 != XEXP (x, 0)) x = simplify_gen_binary (code, op_mode, op0, XEXP (x, 1)); @@ -7308,7 +7126,7 @@ force_to_mode (rtx x, enum machine_mode mode, unsigned HOST_WIDE_INT mask, if ((inner_mask & ~GET_MODE_MASK (GET_MODE (x))) != 0) op_mode = GET_MODE (x); - inner = force_to_mode (inner, op_mode, inner_mask, reg, next_select); + inner = force_to_mode (inner, op_mode, inner_mask, next_select); if (GET_MODE (x) != op_mode || inner != XEXP (x, 0)) x = simplify_gen_binary (LSHIFTRT, op_mode, inner, XEXP (x, 1)); @@ -7345,7 +7163,7 @@ force_to_mode (rtx x, enum machine_mode mode, unsigned HOST_WIDE_INT mask, if (GET_MODE_BITSIZE (GET_MODE (x)) <= HOST_BITS_PER_WIDE_INT && (mask == ((unsigned HOST_WIDE_INT) 1 << (GET_MODE_BITSIZE (GET_MODE (x)) - 1)))) - return force_to_mode (XEXP (x, 0), mode, mask, reg, next_select); + return force_to_mode (XEXP (x, 0), mode, mask, next_select); /* If this is a shift by a constant, get a mask that contains those bits that are not copies of the sign bit. We then have two cases: If @@ -7357,7 +7175,7 @@ force_to_mode (rtx x, enum machine_mode mode, unsigned HOST_WIDE_INT mask, if (GET_CODE (XEXP (x, 1)) == CONST_INT && INTVAL (XEXP (x, 1)) >= 0 && INTVAL (XEXP (x, 1)) < HOST_BITS_PER_WIDE_INT) { - int i = -1; + int i; /* If the considered data is wider than HOST_WIDE_INT, we can't represent a mask for all its bits in a single scalar. @@ -7384,16 +7202,22 @@ force_to_mode (rtx x, enum machine_mode mode, unsigned HOST_WIDE_INT mask, nonzero >>= INTVAL (XEXP (x, 1)); } - if ((mask & ~nonzero) == 0 - || (i = exact_log2 (mask)) >= 0) + if ((mask & ~nonzero) == 0) + { + x = simplify_shift_const (NULL_RTX, LSHIFTRT, GET_MODE (x), + XEXP (x, 0), INTVAL (XEXP (x, 1))); + if (GET_CODE (x) != ASHIFTRT) + return force_to_mode (x, mode, mask, next_select); + } + + else if ((i = exact_log2 (mask)) >= 0) { x = simplify_shift_const - (x, LSHIFTRT, GET_MODE (x), XEXP (x, 0), - i < 0 ? INTVAL (XEXP (x, 1)) - : GET_MODE_BITSIZE (GET_MODE (x)) - 1 - i); + (NULL_RTX, LSHIFTRT, GET_MODE (x), XEXP (x, 0), + GET_MODE_BITSIZE (GET_MODE (x)) - 1 - i); if (GET_CODE (x) != ASHIFTRT) - return force_to_mode (x, mode, mask, reg, next_select); + return force_to_mode (x, mode, mask, next_select); } } @@ -7417,7 +7241,7 @@ force_to_mode (rtx x, enum machine_mode mode, unsigned HOST_WIDE_INT mask, && GET_CODE (XEXP (x, 0)) == ASHIFT && XEXP (XEXP (x, 0), 1) == XEXP (x, 1)) return force_to_mode (XEXP (XEXP (x, 0), 0), mode, mask, - reg, next_select); + next_select); break; @@ -7436,7 +7260,7 @@ force_to_mode (rtx x, enum machine_mode mode, unsigned HOST_WIDE_INT mask, if (temp && GET_CODE (temp) == CONST_INT) SUBST (XEXP (x, 0), force_to_mode (XEXP (x, 0), GET_MODE (x), - INTVAL (temp), reg, next_select)); + INTVAL (temp), next_select)); } break; @@ -7444,7 +7268,7 @@ force_to_mode (rtx x, enum machine_mode mode, unsigned HOST_WIDE_INT mask, /* If we just want the low-order bit, the NEG isn't needed since it won't change the low-order bit. */ if (mask == 1) - return force_to_mode (XEXP (x, 0), mode, mask, reg, just_select); + return force_to_mode (XEXP (x, 0), mode, mask, just_select); /* We need any bits less significant than the most significant bit in MASK since carries from those bits will affect the bits we are @@ -7471,7 +7295,7 @@ force_to_mode (rtx x, enum machine_mode mode, unsigned HOST_WIDE_INT mask, x = simplify_gen_binary (LSHIFTRT, GET_MODE (x), temp, XEXP (XEXP (x, 0), 1)); - return force_to_mode (x, mode, mask, reg, next_select); + return force_to_mode (x, mode, mask, next_select); } /* (and (not FOO) CONST) is (not (or FOO (not CONST))), so we must @@ -7479,9 +7303,9 @@ force_to_mode (rtx x, enum machine_mode mode, unsigned HOST_WIDE_INT mask, mask = fuller_mask; unop: - op0 = gen_lowpart (op_mode, - force_to_mode (XEXP (x, 0), mode, mask, - reg, next_select)); + op0 = gen_lowpart_or_truncate (op_mode, + force_to_mode (XEXP (x, 0), mode, mask, + next_select)); if (op_mode != GET_MODE (x) || op0 != XEXP (x, 0)) x = simplify_gen_unary (code, op_mode, op0, op_mode); break; @@ -7495,7 +7319,7 @@ force_to_mode (rtx x, enum machine_mode mode, unsigned HOST_WIDE_INT mask, && exact_log2 (nonzero_bits (XEXP (x, 0), mode)) >= 0 && (nonzero_bits (XEXP (x, 0), mode) == (unsigned HOST_WIDE_INT) STORE_FLAG_VALUE)) - return force_to_mode (XEXP (x, 0), mode, mask, reg, next_select); + return force_to_mode (XEXP (x, 0), mode, mask, next_select); break; @@ -7504,13 +7328,13 @@ force_to_mode (rtx x, enum machine_mode mode, unsigned HOST_WIDE_INT mask, written in a narrower mode. We play it safe and do not do so. */ SUBST (XEXP (x, 1), - gen_lowpart (GET_MODE (x), + gen_lowpart_or_truncate (GET_MODE (x), force_to_mode (XEXP (x, 1), mode, - mask, reg, next_select))); + mask, next_select))); SUBST (XEXP (x, 2), - gen_lowpart (GET_MODE (x), + gen_lowpart_or_truncate (GET_MODE (x), force_to_mode (XEXP (x, 2), mode, - mask, reg, next_select))); + mask, next_select))); break; default: @@ -7518,7 +7342,7 @@ force_to_mode (rtx x, enum machine_mode mode, unsigned HOST_WIDE_INT mask, } /* Ensure we return a value of the proper mode. */ - return gen_lowpart (mode, x); + return gen_lowpart_or_truncate (mode, x); } /* Return nonzero if X is an expression that has one of two values depending on @@ -8062,13 +7886,15 @@ make_field_assignment (rtx x) /* Shift OTHER right POS places and make it the source, restricting it to the proper length and mode. */ - src = force_to_mode (simplify_shift_const (NULL_RTX, LSHIFTRT, - GET_MODE (src), other, pos), - mode, + src = canon_reg_for_combine (simplify_shift_const (NULL_RTX, LSHIFTRT, + GET_MODE (src), + other, pos), + dest); + src = force_to_mode (src, mode, GET_MODE_BITSIZE (mode) >= HOST_BITS_PER_WIDE_INT ? ~(unsigned HOST_WIDE_INT) 0 : ((unsigned HOST_WIDE_INT) 1 << len) - 1, - dest, 0); + 0); /* If SRC is masked by an AND that does not make a difference in the value being stored, strip it. */ @@ -8162,7 +7988,12 @@ apply_distributive_law (rtx x) || (GET_MODE_SIZE (GET_MODE (lhs)) > GET_MODE_SIZE (GET_MODE (SUBREG_REG (lhs)))) || VECTOR_MODE_P (GET_MODE (lhs)) - || GET_MODE_SIZE (GET_MODE (SUBREG_REG (lhs))) > UNITS_PER_WORD) + || GET_MODE_SIZE (GET_MODE (SUBREG_REG (lhs))) > UNITS_PER_WORD + /* Result might need to be truncated. Don't change mode if + explicit truncation is needed. */ + || !TRULY_NOOP_TRUNCATION + (GET_MODE_BITSIZE (GET_MODE (x)), + GET_MODE_BITSIZE (GET_MODE (SUBREG_REG (lhs))))) return x; tem = simplify_gen_binary (code, GET_MODE (SUBREG_REG (lhs)), @@ -8277,19 +8108,24 @@ distribute_and_simplify_rtx (rtx x, int n) return NULL_RTX; } -/* We have X, a logical `and' of VAROP with the constant CONSTOP, to be done - in MODE. - - Return an equivalent form, if different from X. Otherwise, return X. If - X is zero, we are to always construct the equivalent form. */ +/* Simplify a logical `and' of VAROP with the constant CONSTOP, to be done + in MODE. Return an equivalent form, if different from (and VAROP + (const_int CONSTOP)). Otherwise, return NULL_RTX. */ static rtx -simplify_and_const_int (rtx x, enum machine_mode mode, rtx varop, - unsigned HOST_WIDE_INT constop) +simplify_and_const_int_1 (enum machine_mode mode, rtx varop, + unsigned HOST_WIDE_INT constop) { unsigned HOST_WIDE_INT nonzero; + unsigned HOST_WIDE_INT orig_constop; + rtx orig_varop; int i; + orig_varop = varop; + orig_constop = constop; + if (GET_CODE (varop) == CLOBBER) + return NULL_RTX; + /* Simplify VAROP knowing that we will be only looking at some of the bits in it. @@ -8297,7 +8133,7 @@ simplify_and_const_int (rtx x, enum machine_mode mode, rtx varop, CONSTOP are not significant and will never be examined. We must ensure that is the case by explicitly masking out those bits before returning. */ - varop = force_to_mode (varop, mode, constop, NULL_RTX, 0); + varop = force_to_mode (varop, mode, constop, 0); /* If VAROP is a CLOBBER, we will fail so return it. */ if (GET_CODE (varop) == CLOBBER) @@ -8351,7 +8187,7 @@ simplify_and_const_int (rtx x, enum machine_mode mode, rtx varop, XEXP (varop, 1), constop)))); - /* If VAROP is PLUS, and the constant is a mask of low bite, distribute + /* If VAROP is PLUS, and the constant is a mask of low bits, distribute the AND and see if one of the operands simplifies to zero. If so, we may eliminate it. */ @@ -8368,40 +8204,42 @@ simplify_and_const_int (rtx x, enum machine_mode mode, rtx varop, return o0; } - /* Get VAROP in MODE. Try to get a SUBREG if not. Don't make a new SUBREG - if we already had one (just check for the simplest cases). */ - if (x && GET_CODE (XEXP (x, 0)) == SUBREG - && GET_MODE (XEXP (x, 0)) == mode - && SUBREG_REG (XEXP (x, 0)) == varop) - varop = XEXP (x, 0); - else - varop = gen_lowpart (mode, varop); - - /* If we can't make the SUBREG, try to return what we were given. */ - if (GET_CODE (varop) == CLOBBER) - return x ? x : varop; + /* Make a SUBREG if necessary. If we can't make it, fail. */ + varop = gen_lowpart (mode, varop); + if (varop == NULL_RTX || GET_CODE (varop) == CLOBBER) + return NULL_RTX; /* If we are only masking insignificant bits, return VAROP. */ if (constop == nonzero) - x = varop; - else - { - /* Otherwise, return an AND. */ - constop = trunc_int_for_mode (constop, mode); - /* See how much, if any, of X we can use. */ - if (x == 0 || GET_CODE (x) != AND || GET_MODE (x) != mode) - x = simplify_gen_binary (AND, mode, varop, GEN_INT (constop)); + return varop; - else - { - if (GET_CODE (XEXP (x, 1)) != CONST_INT - || (unsigned HOST_WIDE_INT) INTVAL (XEXP (x, 1)) != constop) - SUBST (XEXP (x, 1), GEN_INT (constop)); + if (varop == orig_varop && constop == orig_constop) + return NULL_RTX; - SUBST (XEXP (x, 0), varop); - } - } + /* Otherwise, return an AND. */ + constop = trunc_int_for_mode (constop, mode); + return simplify_gen_binary (AND, mode, varop, GEN_INT (constop)); +} + + +/* We have X, a logical `and' of VAROP with the constant CONSTOP, to be done + in MODE. + + Return an equivalent form, if different from X. Otherwise, return X. If + X is zero, we are to always construct the equivalent form. */ +static rtx +simplify_and_const_int (rtx x, enum machine_mode mode, rtx varop, + unsigned HOST_WIDE_INT constop) +{ + rtx tem = simplify_and_const_int_1 (mode, varop, constop); + if (tem) + return tem; + + if (!x) + x = simplify_gen_binary (AND, GET_MODE (varop), varop, GEN_INT (constop)); + if (GET_MODE (x) != mode) + x = gen_lowpart (mode, x); return x; } @@ -8677,21 +8515,20 @@ merge_outer_ops (enum rtx_code *pop0, HOST_WIDE_INT *pconst0, enum rtx_code op1, } /* Simplify a shift of VAROP by COUNT bits. CODE says what kind of shift. - The result of the shift is RESULT_MODE. X, if nonzero, is an expression - that we started with. + The result of the shift is RESULT_MODE. Return NULL_RTX if we cannot + simplify it. Otherwise, return a simplified value. The shift is normally computed in the widest mode we find in VAROP, as long as it isn't a different number of words than RESULT_MODE. Exceptions - are ASHIFTRT and ROTATE, which are always done in their original mode, */ + are ASHIFTRT and ROTATE, which are always done in their original mode. */ static rtx -simplify_shift_const (rtx x, enum rtx_code code, - enum machine_mode result_mode, rtx varop, - int orig_count) +simplify_shift_const_1 (enum rtx_code code, enum machine_mode result_mode, + rtx varop, int orig_count) { enum rtx_code orig_code = code; - unsigned int count; - int signed_count; + rtx orig_varop = varop; + int count; enum machine_mode mode = result_mode; enum machine_mode shift_mode, tmode; unsigned int mode_words @@ -8699,9 +8536,8 @@ simplify_shift_const (rtx x, enum rtx_code code, /* We form (outer_op (code varop count) (outer_const)). */ enum rtx_code outer_op = UNKNOWN; HOST_WIDE_INT outer_const = 0; - rtx const_rtx; int complement_p = 0; - rtx new; + rtx new, x; /* Make sure and truncate the "natural" shift on the way in. We don't want to do this inside the loop as it makes it more difficult to @@ -8713,12 +8549,7 @@ simplify_shift_const (rtx x, enum rtx_code code, what was requested. */ if (orig_count < 0 || orig_count >= (int) GET_MODE_BITSIZE (mode)) - { - if (x) - return x; - - return gen_rtx_fmt_ee (code, mode, varop, GEN_INT (orig_count)); - } + return NULL_RTX; count = orig_count; @@ -8727,10 +8558,9 @@ simplify_shift_const (rtx x, enum rtx_code code, while (count != 0) { - /* If we have an operand of (clobber (const_int 0)), just return that - value. */ + /* If we have an operand of (clobber (const_int 0)), fail. */ if (GET_CODE (varop) == CLOBBER) - return varop; + return NULL_RTX; /* If we discovered we had to complement VAROP, leave. Making a NOT here would cause an infinite loop. */ @@ -8766,7 +8596,7 @@ simplify_shift_const (rtx x, enum rtx_code code, multiple operations, each of which are defined, we know what the result is supposed to be. */ - if (count > (unsigned int) (GET_MODE_BITSIZE (shift_mode) - 1)) + if (count > (GET_MODE_BITSIZE (shift_mode) - 1)) { if (code == ASHIFTRT) count = GET_MODE_BITSIZE (shift_mode) - 1; @@ -8940,7 +8770,7 @@ simplify_shift_const (rtx x, enum rtx_code code, interpreted as the sign bit in a narrower mode, so, if the result is narrower, don't discard the shift. */ if (code == LSHIFTRT - && count == (unsigned int) (GET_MODE_BITSIZE (result_mode) - 1) + && count == (GET_MODE_BITSIZE (result_mode) - 1) && (GET_MODE_BITSIZE (result_mode) >= GET_MODE_BITSIZE (GET_MODE (varop)))) { @@ -8974,8 +8804,7 @@ simplify_shift_const (rtx x, enum rtx_code code, (ashiftrt:M1 (ashift:M1 (and:M1 (subreg:M1 FOO 0 C2) C3) C1). This simplifies certain SIGN_EXTEND operations. */ if (code == ASHIFT && first_code == ASHIFTRT - && count == (unsigned int) - (GET_MODE_BITSIZE (result_mode) + && count == (GET_MODE_BITSIZE (result_mode) - GET_MODE_BITSIZE (GET_MODE (varop)))) { /* C3 has the low-order C1 bits zero. */ @@ -9005,12 +8834,12 @@ simplify_shift_const (rtx x, enum rtx_code code, > first_count)) { varop = XEXP (varop, 0); - - signed_count = count - first_count; - if (signed_count < 0) - count = -signed_count, code = ASHIFT; - else - count = signed_count; + count -= first_count; + if (count < 0) + { + count = -count; + code = ASHIFT; + } continue; } @@ -9058,8 +8887,8 @@ simplify_shift_const (rtx x, enum rtx_code code, mask_rtx = GEN_INT (nonzero_bits (varop, GET_MODE (varop))); mask_rtx - = simplify_binary_operation (code, result_mode, mask_rtx, - GEN_INT (count)); + = simplify_const_binary_operation (code, result_mode, mask_rtx, + GEN_INT (count)); /* Give up if we can't compute an outer operation to use. */ if (mask_rtx == 0 @@ -9071,25 +8900,22 @@ simplify_shift_const (rtx x, enum rtx_code code, /* If the shifts are in the same direction, we add the counts. Otherwise, we subtract them. */ - signed_count = count; if ((code == ASHIFTRT || code == LSHIFTRT) == (first_code == ASHIFTRT || first_code == LSHIFTRT)) - signed_count += first_count; + count += first_count; else - signed_count -= first_count; + count -= first_count; /* If COUNT is positive, the new shift is usually CODE, except for the two exceptions below, in which case it is FIRST_CODE. If the count is negative, FIRST_CODE should always be used */ - if (signed_count > 0 + if (count > 0 && ((first_code == ROTATE && code == ASHIFT) || (first_code == ASHIFTRT && code == LSHIFTRT))) - code = first_code, count = signed_count; - else if (signed_count < 0) - code = first_code, count = -signed_count; - else - count = signed_count; + code = first_code; + else if (count < 0) + code = first_code, count = -count; varop = XEXP (varop, 0); continue; @@ -9100,12 +8926,12 @@ simplify_shift_const (rtx x, enum rtx_code code, B is not a constant. */ else if (GET_CODE (varop) == code - && GET_CODE (XEXP (varop, 1)) != CONST_INT - && 0 != (new - = simplify_binary_operation (code, mode, - XEXP (varop, 0), - GEN_INT (count)))) + && GET_CODE (XEXP (varop, 0)) == CONST_INT + && GET_CODE (XEXP (varop, 1)) != CONST_INT) { + rtx new = simplify_const_binary_operation (code, mode, + XEXP (varop, 0), + GEN_INT (count)); varop = gen_rtx_fmt_ee (code, mode, new, XEXP (varop, 1)); count = 0; continue; @@ -9132,8 +8958,7 @@ simplify_shift_const (rtx x, enum rtx_code code, && XEXP (XEXP (varop, 0), 1) == constm1_rtx && (STORE_FLAG_VALUE == 1 || STORE_FLAG_VALUE == -1) && (code == LSHIFTRT || code == ASHIFTRT) - && count == (unsigned int) - (GET_MODE_BITSIZE (GET_MODE (varop)) - 1) + && count == (GET_MODE_BITSIZE (GET_MODE (varop)) - 1) && rtx_equal_p (XEXP (XEXP (varop, 0), 0), XEXP (varop, 1))) { count = 0; @@ -9158,9 +8983,9 @@ simplify_shift_const (rtx x, enum rtx_code code, && !(code == ASHIFTRT && GET_CODE (varop) == XOR && 0 > trunc_int_for_mode (INTVAL (XEXP (varop, 1)), shift_mode)) - && (new = simplify_binary_operation (code, result_mode, - XEXP (varop, 1), - GEN_INT (count))) != 0 + && (new = simplify_const_binary_operation (code, result_mode, + XEXP (varop, 1), + GEN_INT (count))) != 0 && GET_CODE (new) == CONST_INT && merge_outer_ops (&outer_op, &outer_const, GET_CODE (varop), INTVAL (new), result_mode, &complement_p)) @@ -9200,11 +9025,9 @@ simplify_shift_const (rtx x, enum rtx_code code, if (code == LSHIFTRT && XEXP (varop, 1) == const0_rtx && GET_MODE (XEXP (varop, 0)) == result_mode - && count == (unsigned int) (GET_MODE_BITSIZE (result_mode) - 1) + && count == (GET_MODE_BITSIZE (result_mode) - 1) && GET_MODE_BITSIZE (result_mode) <= HOST_BITS_PER_WIDE_INT - && ((STORE_FLAG_VALUE - & ((HOST_WIDE_INT) 1 - < (GET_MODE_BITSIZE (result_mode) - 1)))) + && STORE_FLAG_VALUE == -1 && nonzero_bits (XEXP (varop, 0), result_mode) == 1 && merge_outer_ops (&outer_op, &outer_const, XOR, (HOST_WIDE_INT) 1, result_mode, @@ -9220,7 +9043,7 @@ simplify_shift_const (rtx x, enum rtx_code code, /* (lshiftrt (neg A) C) where A is either 0 or 1 and C is one less than the number of bits in the mode is equivalent to A. */ if (code == LSHIFTRT - && count == (unsigned int) (GET_MODE_BITSIZE (result_mode) - 1) + && count == (GET_MODE_BITSIZE (result_mode) - 1) && nonzero_bits (XEXP (varop, 0), result_mode) == 1) { varop = XEXP (varop, 0); @@ -9245,7 +9068,7 @@ simplify_shift_const (rtx x, enum rtx_code code, is one less than the number of bits in the mode is equivalent to (xor A 1). */ if (code == LSHIFTRT - && count == (unsigned int) (GET_MODE_BITSIZE (result_mode) - 1) + && count == (GET_MODE_BITSIZE (result_mode) - 1) && XEXP (varop, 1) == constm1_rtx && nonzero_bits (XEXP (varop, 0), result_mode) == 1 && merge_outer_ops (&outer_op, &outer_const, XOR, @@ -9288,9 +9111,9 @@ simplify_shift_const (rtx x, enum rtx_code code, /* (ashift (plus foo C) N) is (plus (ashift foo N) C'). */ if (code == ASHIFT && GET_CODE (XEXP (varop, 1)) == CONST_INT - && (new = simplify_binary_operation (ASHIFT, result_mode, - XEXP (varop, 1), - GEN_INT (count))) != 0 + && (new = simplify_const_binary_operation (ASHIFT, result_mode, + XEXP (varop, 1), + GEN_INT (count))) != 0 && GET_CODE (new) == CONST_INT && merge_outer_ops (&outer_op, &outer_const, PLUS, INTVAL (new), result_mode, &complement_p)) @@ -9307,9 +9130,9 @@ simplify_shift_const (rtx x, enum rtx_code code, if (code == LSHIFTRT && GET_CODE (XEXP (varop, 1)) == CONST_INT && mode_signbit_p (result_mode, XEXP (varop, 1)) - && (new = simplify_binary_operation (code, result_mode, - XEXP (varop, 1), - GEN_INT (count))) != 0 + && (new = simplify_const_binary_operation (code, result_mode, + XEXP (varop, 1), + GEN_INT (count))) != 0 && GET_CODE (new) == CONST_INT && merge_outer_ops (&outer_op, &outer_const, XOR, INTVAL (new), result_mode, &complement_p)) @@ -9330,12 +9153,10 @@ simplify_shift_const (rtx x, enum rtx_code code, if ((STORE_FLAG_VALUE == 1 || STORE_FLAG_VALUE == -1) && GET_CODE (XEXP (varop, 0)) == ASHIFTRT - && count == (unsigned int) - (GET_MODE_BITSIZE (GET_MODE (varop)) - 1) + && count == (GET_MODE_BITSIZE (GET_MODE (varop)) - 1) && (code == LSHIFTRT || code == ASHIFTRT) && GET_CODE (XEXP (XEXP (varop, 0), 1)) == CONST_INT - && (unsigned HOST_WIDE_INT) INTVAL (XEXP (XEXP (varop, 0), 1)) - == count + && INTVAL (XEXP (XEXP (varop, 0), 1)) == count && rtx_equal_p (XEXP (XEXP (varop, 0), 0), XEXP (varop, 1))) { count = 0; @@ -9392,44 +9213,31 @@ simplify_shift_const (rtx x, enum rtx_code code, a shift of type CODE with SHIFT_MODE shifting VAROP COUNT places. If OUTER_OP is non-UNKNOWN, it is an operation that needs to be applied to the result of the shift. OUTER_CONST is the relevant constant, - but we must turn off all bits turned off in the shift. - - If we were passed a value for X, see if we can use any pieces of - it. If not, make new rtx. */ - - if (x && GET_RTX_CLASS (GET_CODE (x)) == RTX_BIN_ARITH - && GET_CODE (XEXP (x, 1)) == CONST_INT - && (unsigned HOST_WIDE_INT) INTVAL (XEXP (x, 1)) == count) - const_rtx = XEXP (x, 1); - else - const_rtx = GEN_INT (count); + but we must turn off all bits turned off in the shift. */ - if (x && GET_CODE (XEXP (x, 0)) == SUBREG - && GET_MODE (XEXP (x, 0)) == shift_mode - && SUBREG_REG (XEXP (x, 0)) == varop) - varop = XEXP (x, 0); - else if (GET_MODE (varop) != shift_mode) - varop = gen_lowpart (shift_mode, varop); - - /* If we can't make the SUBREG, try to return what we were given. */ - if (GET_CODE (varop) == CLOBBER) - return x ? x : varop; + if (outer_op == UNKNOWN + && orig_code == code && orig_count == count + && varop == orig_varop + && shift_mode == GET_MODE (varop)) + return NULL_RTX; - new = simplify_binary_operation (code, shift_mode, varop, const_rtx); - if (new != 0) - x = new; - else - x = gen_rtx_fmt_ee (code, shift_mode, varop, const_rtx); + /* Make a SUBREG if necessary. If we can't make it, fail. */ + varop = gen_lowpart (shift_mode, varop); + if (varop == NULL_RTX || GET_CODE (varop) == CLOBBER) + return NULL_RTX; /* If we have an outer operation and we just made a shift, it is possible that we could have simplified the shift were it not for the outer operation. So try to do the simplification recursively. */ - if (outer_op != UNKNOWN && GET_CODE (x) == code - && GET_CODE (XEXP (x, 1)) == CONST_INT) - x = simplify_shift_const (x, code, shift_mode, XEXP (x, 0), - INTVAL (XEXP (x, 1))); + if (outer_op != UNKNOWN) + x = simplify_shift_const_1 (code, shift_mode, varop, count); + else + x = NULL_RTX; + + if (x == NULL_RTX) + x = simplify_gen_binary (code, shift_mode, varop, GEN_INT (count)); /* If we were doing an LSHIFTRT in a wider mode than it was originally, turn off all the bits that the shift would have turned off. */ @@ -9465,6 +9273,31 @@ simplify_shift_const (rtx x, enum rtx_code code, return x; } + +/* Simplify a shift of VAROP by COUNT bits. CODE says what kind of shift. + The result of the shift is RESULT_MODE. If we cannot simplify it, + return X or, if it is NULL, synthesize the expression with + simplify_gen_binary. Otherwise, return a simplified value. + + The shift is normally computed in the widest mode we find in VAROP, as + long as it isn't a different number of words than RESULT_MODE. Exceptions + are ASHIFTRT and ROTATE, which are always done in their original mode. */ + +static rtx +simplify_shift_const (rtx x, enum rtx_code code, enum machine_mode result_mode, + rtx varop, int count) +{ + rtx tem = simplify_shift_const_1 (code, result_mode, varop, count); + if (tem) + return tem; + + if (!x) + x = simplify_gen_binary (code, GET_MODE (varop), varop, GEN_INT (count)); + if (GET_MODE (x) != result_mode) + x = gen_lowpart (result_mode, x); + return x; +} + /* Like recog, but we receive the address of a pointer to a new pattern. We try to match the rtx that the pointer points to. @@ -10072,7 +9905,7 @@ simplify_comparison (enum rtx_code code, rtx *pop0, rtx *pop1) op0 = force_to_mode (op0, mode, ((HOST_WIDE_INT) 1 << (GET_MODE_BITSIZE (mode) - 1)), - NULL_RTX, 0); + 0); /* Now try cases based on the opcode of OP0. If none of the cases does a "continue", we exit this loop immediately after the @@ -10469,9 +10302,9 @@ simplify_comparison (enum rtx_code code, rtx *pop0, rtx *pop1) && XEXP (XEXP (op0, 0), 0) == const1_rtx) { op0 = simplify_and_const_int - (op0, mode, gen_rtx_LSHIFTRT (mode, - XEXP (op0, 1), - XEXP (XEXP (op0, 0), 1)), + (NULL_RTX, mode, gen_rtx_LSHIFTRT (mode, + XEXP (op0, 1), + XEXP (XEXP (op0, 0), 1)), (HOST_WIDE_INT) 1); continue; } @@ -11077,6 +10910,7 @@ record_value_for_reg (rtx reg, rtx insn, rtx value) reg_stat[i].last_set_nonzero_bits = 0; reg_stat[i].last_set_sign_bit_copies = 0; reg_stat[i].last_death = 0; + reg_stat[i].truncated_to_mode = 0; } /* Mark registers that are being referenced in this value. */ @@ -11210,6 +11044,7 @@ record_dead_and_set_regs (rtx insn) reg_stat[i].last_set_nonzero_bits = 0; reg_stat[i].last_set_sign_bit_copies = 0; reg_stat[i].last_death = 0; + reg_stat[i].truncated_to_mode = 0; } last_call_cuid = mem_last_set = INSN_CUID (insn); @@ -11273,15 +11108,81 @@ record_promoted_value (rtx insn, rtx subreg) } } -/* Scan X for promoted SUBREGs. For each one found, - note what it implies to the registers used in it. */ +/* Check if X, a register, is known to contain a value already + truncated to MODE. In this case we can use a subreg to refer to + the truncated value even though in the generic case we would need + an explicit truncation. */ + +static bool +reg_truncated_to_mode (enum machine_mode mode, rtx x) +{ + enum machine_mode truncated = reg_stat[REGNO (x)].truncated_to_mode; + + if (truncated == 0 || reg_stat[REGNO (x)].truncation_label != label_tick) + return false; + if (GET_MODE_SIZE (truncated) <= GET_MODE_SIZE (mode)) + return true; + if (TRULY_NOOP_TRUNCATION (GET_MODE_BITSIZE (mode), + GET_MODE_BITSIZE (truncated))) + return true; + return false; +} + +/* X is a REG or a SUBREG. If X is some sort of a truncation record + it. For non-TRULY_NOOP_TRUNCATION targets we might be able to turn + a truncate into a subreg using this information. */ static void -check_promoted_subreg (rtx insn, rtx x) +record_truncated_value (rtx x) { - if (GET_CODE (x) == SUBREG && SUBREG_PROMOTED_VAR_P (x) - && REG_P (SUBREG_REG (x))) - record_promoted_value (insn, x); + enum machine_mode truncated_mode; + + if (GET_CODE (x) == SUBREG && REG_P (SUBREG_REG (x))) + { + enum machine_mode original_mode = GET_MODE (SUBREG_REG (x)); + truncated_mode = GET_MODE (x); + + if (GET_MODE_SIZE (original_mode) <= GET_MODE_SIZE (truncated_mode)) + return; + + if (TRULY_NOOP_TRUNCATION (GET_MODE_BITSIZE (truncated_mode), + GET_MODE_BITSIZE (original_mode))) + return; + + x = SUBREG_REG (x); + } + /* ??? For hard-regs we now record everthing. We might be able to + optimize this using last_set_mode. */ + else if (REG_P (x) && REGNO (x) < FIRST_PSEUDO_REGISTER) + truncated_mode = GET_MODE (x); + else + return; + + if (reg_stat[REGNO (x)].truncated_to_mode == 0 + || reg_stat[REGNO (x)].truncation_label < label_tick + || (GET_MODE_SIZE (truncated_mode) + < GET_MODE_SIZE (reg_stat[REGNO (x)].truncated_to_mode))) + { + reg_stat[REGNO (x)].truncated_to_mode = truncated_mode; + reg_stat[REGNO (x)].truncation_label = label_tick; + } +} + +/* Scan X for promoted SUBREGs and truncated REGs. For each one + found, note what it implies to the registers used in it. */ + +static void +check_conversions (rtx insn, rtx x) +{ + if (GET_CODE (x) == SUBREG || REG_P (x)) + { + if (GET_CODE (x) == SUBREG + && SUBREG_PROMOTED_VAR_P (x) + && REG_P (SUBREG_REG (x))) + record_promoted_value (insn, x); + + record_truncated_value (x); + } else { const char *format = GET_RTX_FORMAT (GET_CODE (x)); @@ -11291,13 +11192,13 @@ check_promoted_subreg (rtx insn, rtx x) switch (format[i]) { case 'e': - check_promoted_subreg (insn, XEXP (x, i)); + check_conversions (insn, XEXP (x, i)); break; case 'V': case 'E': if (XVEC (x, i) != 0) for (j = 0; j < XVECLEN (x, i); j++) - check_promoted_subreg (insn, XVECEXP (x, i, j)); + check_conversions (insn, XVECEXP (x, i, j)); break; } } @@ -11979,12 +11880,6 @@ distribute_notes (rtx notes, rtx from_insn, rtx i3, rtx i2, rtx elim_i2, { rtx place = 0, place2 = 0; - /* If this NOTE references a pseudo register, ensure it references - the latest copy of that register. */ - if (XEXP (note, 0) && REG_P (XEXP (note, 0)) - && REGNO (XEXP (note, 0)) >= FIRST_PSEUDO_REGISTER) - XEXP (note, 0) = regno_reg_rtx[REGNO (XEXP (note, 0))]; - next_note = XEXP (note, 1); switch (REG_NOTE_KIND (note)) { diff --git a/gcc/common.opt b/gcc/common.opt index ccadf43eb4b..0f72c6fa836 100644 --- a/gcc/common.opt +++ b/gcc/common.opt @@ -57,6 +57,10 @@ Waggregate-return Common Var(warn_aggregate_return) Warn about returning structures, unions or arrays +Walways-true +Common Var(warn_always_true) +Warn about comparisons that always evaluate to true + Wattributes Common Var(warn_attributes) Init(1) Warn about inappropriate attribute usage @@ -125,6 +129,10 @@ Wstrict-aliasing= Common Joined UInteger Warn about code which might break strict aliasing rules +Wstring-literal-comparison +Common Var(warn_string_literal_comparison) +Warn about comparisons to constant string literals + Wswitch Common Var(warn_switch) Warn about enumerated switches, with no default, missing a case diff --git a/gcc/config.build b/gcc/config.build index 5f2e70e1878..4a8f409e431 100644 --- a/gcc/config.build +++ b/gcc/config.build @@ -90,15 +90,10 @@ case $build in build_install_headers_dir=install-headers-cpio ;; i[34567]86-sequent-ptx4* | i[34567]86-sequent-sysv4* ) - build_xm_defines="SMALL_ARG_MAX" build_install_headers_dir=install-headers-cpio ;; - i[34567]86-*-solaris2*) - build_xm_defines="SMALL_ARG_MAX" - ;; i[34567]86-*-sysv4*) # Intel x86 running system V r4 - build_xm_defines="SMALL_ARG_MAX" build_install_headers_dir=install-headers-cpio ;; i[34567]86-*-udk*) diff --git a/gcc/config.gcc b/gcc/config.gcc index c0867e1e91c..5e2216c50d2 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -984,7 +984,6 @@ i[34567]86-sequent-ptx4* | i[34567]86-sequent-sysv4*) then tm_file="${tm_file} usegas.h" fi - xm_defines="SMALL_ARG_MAX" tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h ptx4.h i386/ptx4-i.h" tmake_file=t-svr4 extra_parts="crtbegin.o crtend.o" @@ -1115,7 +1114,6 @@ i[34567]86-*-sco3.2v5*) # 80386 running SCO Open Server 5 use_fixproto=yes ;; i[34567]86-*-solaris2*) - xm_defines="SMALL_ARG_MAX" tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h i386/sysv4.h sol2.h" case ${target} in *-*-solaris2.[0-6] | *-*-solaris2.[0-6].*) @@ -1182,7 +1180,6 @@ i[34567]86-*-sysv5*) # Intel x86 on System V Release 5 use_fixproto=yes ;; i[34567]86-*-sysv4*) # Intel 80386's running system V.4 - xm_defines="SMALL_ARG_MAX" tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h i386/sysv4.h i386/sysv4-cpp.h" if test x$stabs = xyes then @@ -1382,7 +1379,6 @@ m68020-*-elf* | m68k-*-elf*) tm_defines="MOTOROLA USE_GAS" tmake_file=m68k/t-m68kelf extra_parts="crtbegin.o crtend.o" - use_fixproto=yes ;; m68010-*-netbsdelf* | m68k*-*-netbsdelf*) tm_file="${tm_file} dbxelf.h elfos.h netbsd.h netbsd-elf.h m68k/netbsd-elf.h" @@ -1586,9 +1582,9 @@ mn10300-*-*) use_collect2=no use_fixproto=yes ;; -ms1-*-elf) +mt-*-elf) tm_file="dbxelf.h elfos.h svr4.h ${tm_file}" - tmake_file="${tmake_file} ms1/t-ms1" + tmake_file="${tmake_file} mt/t-mt" ;; ns32k-*-netbsdelf*) echo "GCC does not yet support the ${target} target"; exit 1 @@ -2673,6 +2669,25 @@ case "${target}" in esac ;; + mt-*-*) + supported_defaults="arch" + + case "$with_arch" in + "" \ + | ms1-64-001 \ + | ms1-16-002 \ + | ms1-16-003 \ + | ms2 \ + | "") + # OK + ;; + *) + echo "Unknown arch used in --with-arch=$with_arch" 1>&2 + exit 1 + ;; + esac + ;; + powerpc*-*-* | rs6000-*-*) supported_defaults="cpu float tune" @@ -2927,6 +2942,7 @@ do ;; *) echo "This target does not support --with-$option." 2>&1 + echo "Valid --with options are: $supported_defaults" 2>&1 exit 1 ;; esac diff --git a/gcc/config.host b/gcc/config.host index 026cd09a91d..8d227dd68f6 100644 --- a/gcc/config.host +++ b/gcc/config.host @@ -132,17 +132,10 @@ case ${host} in i370-*-opened* | i370-*-mvs* ) # IBM 360/370/390 Architecture host_xm_defines='FATAL_EXIT_CODE=12' ;; - i[34567]86-sequent-ptx4*) - host_xm_defines="SMALL_ARG_MAX" - ;; i[34567]86-*-solaris2*) - host_xm_defines="SMALL_ARG_MAX" out_host_hook_obj=host-solaris.o host_xmake_file=x-solaris ;; - i[34567]86-*-sysv4*) # Intel 80386's running System V Release 4 - host_xm_defines="SMALL_ARG_MAX" - ;; i[34567]86-pc-msdosdjgpp*) host_xm_file=i386/xm-djgpp.h host_exeext=.exe diff --git a/gcc/config.in b/gcc/config.in index d91891f0709..bb262d8c260 100644 --- a/gcc/config.in +++ b/gcc/config.in @@ -46,6 +46,12 @@ #endif +/* Define to 1 to enable decimal float extension to C. */ +#ifndef USED_FOR_TARGET +#undef ENABLE_DECIMAL_FLOAT +#endif + + /* Define if you want fold checked that it never destructs its argument. This is quite expensive. */ #ifndef USED_FOR_TARGET diff --git a/gcc/config/alpha/alpha-protos.h b/gcc/config/alpha/alpha-protos.h index f6b237a1c0f..00fc52530b0 100644 --- a/gcc/config/alpha/alpha-protos.h +++ b/gcc/config/alpha/alpha-protos.h @@ -127,8 +127,6 @@ extern rtx unicosmk_add_call_info_word (rtx); 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/gcc/config/alpha/alpha.c b/gcc/config/alpha/alpha.c index 2dfc8776282..5d9d2a5a831 100644 --- a/gcc/config/alpha/alpha.c +++ b/gcc/config/alpha/alpha.c @@ -6137,8 +6137,8 @@ alpha_va_start (tree valist, rtx nextarg ATTRIBUTE_UNUSED) { 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)); + t = build2 (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); @@ -6148,20 +6148,20 @@ alpha_va_start (tree valist, rtx nextarg ATTRIBUTE_UNUSED) 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, NULL_TREE); - offset_field = build (COMPONENT_REF, TREE_TYPE (offset_field), - valist, offset_field, NULL_TREE); + base_field = build3 (COMPONENT_REF, TREE_TYPE (base_field), + valist, base_field, NULL_TREE); + offset_field = build3 (COMPONENT_REF, TREE_TYPE (offset_field), + valist, offset_field, NULL_TREE); t = make_tree (ptr_type_node, virtual_incoming_args_rtx); - t = build (PLUS_EXPR, ptr_type_node, t, - build_int_cst (NULL_TREE, offset)); - t = build (MODIFY_EXPR, TREE_TYPE (base_field), base_field, t); + t = build2 (PLUS_EXPR, ptr_type_node, t, + build_int_cst (NULL_TREE, offset)); + t = build2 (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_cst (NULL_TREE, NUM_ARGS * UNITS_PER_WORD); - t = build (MODIFY_EXPR, TREE_TYPE (offset_field), offset_field, t); + t = build2 (MODIFY_EXPR, TREE_TYPE (offset_field), offset_field, t); TREE_SIDE_EFFECTS (t) = 1; expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL); } @@ -6177,8 +6177,8 @@ alpha_gimplify_va_arg_1 (tree type, tree base, tree offset, tree *pre_p) if (targetm.calls.must_pass_in_stack (TYPE_MODE (type), type)) { t = build_int_cst (TREE_TYPE (offset), 6*8); - t = build (MODIFY_EXPR, TREE_TYPE (offset), offset, - build (MAX_EXPR, TREE_TYPE (offset), offset, t)); + t = build2 (MODIFY_EXPR, TREE_TYPE (offset), offset, + build2 (MAX_EXPR, TREE_TYPE (offset), offset, t)); gimplify_and_add (t, pre_p); } @@ -6199,23 +6199,23 @@ alpha_gimplify_va_arg_1 (tree type, tree base, tree offset, tree *pre_p) imag_part = alpha_gimplify_va_arg_1 (TREE_TYPE (type), base, offset, pre_p); - return build (COMPLEX_EXPR, type, real_temp, imag_part); + return build2 (COMPLEX_EXPR, type, real_temp, imag_part); } else if (TREE_CODE (type) == REAL_TYPE) { tree fpaddend, cond, fourtyeight; fourtyeight = build_int_cst (TREE_TYPE (addend), 6*8); - fpaddend = fold (build (MINUS_EXPR, TREE_TYPE (addend), - addend, fourtyeight)); - cond = fold (build (LT_EXPR, boolean_type_node, addend, fourtyeight)); - addend = fold (build (COND_EXPR, TREE_TYPE (addend), cond, - fpaddend, addend)); + fpaddend = fold_build2 (MINUS_EXPR, TREE_TYPE (addend), + addend, fourtyeight); + cond = fold_build2 (LT_EXPR, boolean_type_node, addend, fourtyeight); + addend = fold_build3 (COND_EXPR, TREE_TYPE (addend), cond, + fpaddend, addend); } /* Build the final address and force that value into a temporary. */ - addr = build (PLUS_EXPR, ptr_type, fold_convert (ptr_type, base), - fold_convert (ptr_type, addend)); + addr = build2 (PLUS_EXPR, ptr_type, fold_convert (ptr_type, base), + fold_convert (ptr_type, addend)); internal_post = NULL; gimplify_expr (&addr, pre_p, &internal_post, is_gimple_val, fb_rvalue); append_to_statement_list (internal_post, pre_p); @@ -6231,8 +6231,8 @@ alpha_gimplify_va_arg_1 (tree type, tree base, tree offset, tree *pre_p) t = size_binop (MULT_EXPR, t, size_int (8)); } t = fold_convert (TREE_TYPE (offset), t); - t = build (MODIFY_EXPR, void_type_node, offset, - build (PLUS_EXPR, TREE_TYPE (offset), offset, t)); + t = build2 (MODIFY_EXPR, void_type_node, offset, + build2 (PLUS_EXPR, TREE_TYPE (offset), offset, t)); gimplify_and_add (t, pre_p); return build_va_arg_indirect_ref (addr); @@ -6249,10 +6249,10 @@ alpha_gimplify_va_arg (tree valist, tree type, tree *pre_p, tree *post_p) base_field = TYPE_FIELDS (va_list_type_node); offset_field = TREE_CHAIN (base_field); - base_field = build (COMPONENT_REF, TREE_TYPE (base_field), - valist, base_field, NULL_TREE); - offset_field = build (COMPONENT_REF, TREE_TYPE (offset_field), - valist, offset_field, NULL_TREE); + base_field = build3 (COMPONENT_REF, TREE_TYPE (base_field), + valist, base_field, NULL_TREE); + offset_field = build3 (COMPONENT_REF, TREE_TYPE (offset_field), + valist, offset_field, NULL_TREE); /* Pull the fields of the structure out into temporaries. Since we never modify the base field, we can use a formal temporary. Sign-extend the @@ -6271,8 +6271,8 @@ alpha_gimplify_va_arg (tree valist, tree type, tree *pre_p, tree *post_p) r = alpha_gimplify_va_arg_1 (type, base, offset, pre_p); /* Stuff the offset temporary back into its field. */ - t = build (MODIFY_EXPR, void_type_node, offset_field, - fold_convert (TREE_TYPE (offset_field), offset)); + t = build2 (MODIFY_EXPR, void_type_node, offset_field, + fold_convert (TREE_TYPE (offset_field), offset)); gimplify_and_add (t, pre_p); if (indirect) @@ -7948,14 +7948,14 @@ alpha_start_function (FILE *file, const char *fnname, #if TARGET_ABI_OPEN_VMS /* Ifdef'ed cause link_section are only available then. */ - readonly_data_section (); + switch_to_section (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 (); + switch_to_section (text_section); #endif } @@ -9344,18 +9344,18 @@ alpha_file_start (void) #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. */ +/* Return a section for X. The only special thing we do here is to + honor small data. */ -static void +static section * 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 (); + return sdata_section; else - default_elf_select_rtx_section (mode, x, align); + return default_elf_select_rtx_section (mode, x, align); } #endif /* OBJECT_FORMAT_ELF */ @@ -9625,8 +9625,10 @@ alpha_write_linkage (FILE *stream, const char *funname, tree fundecl) splay_tree_node node; struct alpha_funcs *func; - link_section (); + fprintf (stream, "\t.link\n"); fprintf (stream, "\t.align 3\n"); + in_section = NULL; + node = splay_tree_lookup (alpha_funcs_tree, (splay_tree_key) fundecl); func = (struct alpha_funcs *) node->value; @@ -9706,7 +9708,7 @@ vms_asm_named_section (const char *name, unsigned int flags, static void vms_asm_out_constructor (rtx symbol, int priority ATTRIBUTE_UNUSED) { - ctors_section (); + switch_to_section (ctors_section); assemble_align (BITS_PER_WORD); assemble_integer (symbol, UNITS_PER_WORD, BITS_PER_WORD, 1); } @@ -9714,7 +9716,7 @@ vms_asm_out_constructor (rtx symbol, int priority ATTRIBUTE_UNUSED) static void vms_asm_out_destructor (rtx symbol, int priority ATTRIBUTE_UNUSED) { - dtors_section (); + switch_to_section (dtors_section); assemble_align (BITS_PER_WORD); assemble_integer (symbol, UNITS_PER_WORD, BITS_PER_WORD, 1); } @@ -9815,7 +9817,7 @@ unicosmk_output_common (FILE *file, const char *name, int size, int align) tree name_tree; printf ("T3E__: common %s\n", name); - common_section (); + in_section = NULL; fputs("\t.endp\n\n\t.psect ", file); assemble_name(file, name); fprintf(file, ",%d,common\n", floor_log2 (align / BITS_PER_UNIT)); @@ -9830,6 +9832,43 @@ unicosmk_output_common (FILE *file, const char *name, int size, int align) #define SECTION_MAIN (SECTION_PUBLIC << 1) static int current_section_align; +/* A get_unnamed_section callback for switching to the text section. */ + +static void +unicosmk_output_text_section_asm_op (const void *data ATTRIBUTE_UNUSED) +{ + static int count = 0; + fprintf (asm_out_file, "\t.endp\n\n\t.psect\tgcc@text___%d,code\n", count++); +} + +/* A get_unnamed_section callback for switching to the data section. */ + +static void +unicosmk_output_data_section_asm_op (const void *data ATTRIBUTE_UNUSED) +{ + static int count = 1; + fprintf (asm_out_file, "\t.endp\n\n\t.psect\tgcc@data___%d,data\n", count++); +} + +/* Implement TARGET_ASM_INIT_SECTIONS. + + 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. */ + +static void +unicosmk_init_sections (void) +{ + text_section = get_unnamed_section (SECTION_CODE, + unicosmk_output_text_section_asm_op, + NULL); + data_section = get_unnamed_section (SECTION_WRITE, + unicosmk_output_data_section_asm_op, + NULL); + readonly_data_section = data_section; +} + static unsigned int unicosmk_section_type_flags (tree decl, const char *name, int reloc ATTRIBUTE_UNUSED) @@ -9993,7 +10032,7 @@ unicosmk_output_deferred_case_vectors (FILE *file) if (machine->addr_list == NULL_RTX) return; - data_section (); + switch_to_section (data_section); for (t = machine->addr_list; t; t = XEXP (t, 1)) unicosmk_output_addr_vec (file, XEXP (t, 0)); } @@ -10112,7 +10151,7 @@ unicosmk_output_ssib (FILE *file, const char *fnname) rtx ciw; struct machine_function *machine = cfun->machine; - ssib_section (); + in_section = NULL; fprintf (file, "\t.endp\n\n\t.psect\t%s%s,data\n", user_label_prefix, unicosmk_ssib_name ()); @@ -10184,26 +10223,6 @@ unicosmk_add_call_info_word (rtx x) + 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 diff --git a/gcc/config/alpha/elf.h b/gcc/config/alpha/elf.h index 43449f5adcc..043a5244c08 100644 --- a/gcc/config/alpha/elf.h +++ b/gcc/config/alpha/elf.h @@ -123,9 +123,9 @@ do { \ #define ASM_OUTPUT_ALIGNED_LOCAL(FILE, NAME, SIZE, ALIGN) \ do { \ if ((SIZE) <= g_switch_value) \ - sbss_section(); \ + switch_to_section (sbss_section); \ else \ - bss_section(); \ + switch_to_section (bss_section); \ ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "object"); \ if (!flag_inhibit_size_directive) \ ASM_OUTPUT_SIZE_DIRECTIVE (FILE, NAME, SIZE); \ @@ -193,37 +193,6 @@ do { \ #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 diff --git a/gcc/config/alpha/unicosmk.h b/gcc/config/alpha/unicosmk.h index da7d375f3b4..a05b33396c0 100644 --- a/gcc/config/alpha/unicosmk.h +++ b/gcc/config/alpha/unicosmk.h @@ -244,51 +244,9 @@ do { fprintf (FILE, "\tbr $1,0\n"); \ /* 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. */ @@ -413,7 +371,7 @@ ssib_section (void) \ #undef ASM_OUTPUT_LOCAL #define ASM_OUTPUT_ALIGNED_LOCAL(FILE, NAME, SIZE, ALIGN) \ - do { data_section (); \ + do { switch_to_section (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));\ @@ -449,6 +407,7 @@ ssib_section (void) \ /* Switch into a generic section. */ #define TARGET_ASM_NAMED_SECTION unicosmk_asm_named_section +#define TARGET_ASM_INIT_SECTIONS unicosmk_init_sections #undef ASM_OUTPUT_MAX_SKIP_ALIGN #define ASM_OUTPUT_MAX_SKIP_ALIGN(STREAM,POWER,MAXSKIP) diff --git a/gcc/config/alpha/vms.h b/gcc/config/alpha/vms.h index c1f4a43e4b1..83545877190 100644 --- a/gcc/config/alpha/vms.h +++ b/gcc/config/alpha/vms.h @@ -198,39 +198,10 @@ typedef struct {int num_args; enum avms_arg_type atypes[6];} avms_arg_info; #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) gcc_unreachable () @@ -327,7 +298,8 @@ do { \ #define TARGET_ASM_NAMED_SECTION vms_asm_named_section #define ASM_OUTPUT_DEF(FILE,LABEL1,LABEL2) \ - do { literals_section(); \ + do { fprintf ((FILE), "\t.literals\n"); \ + in_section = NULL; \ fprintf ((FILE), "\t"); \ assemble_name (FILE, LABEL1); \ fprintf (FILE, " = "); \ diff --git a/gcc/config/arm/aof.h b/gcc/config/arm/aof.h index 45aacfe8c5b..8a1223c45d8 100644 --- a/gcc/config/arm/aof.h +++ b/gcc/config/arm/aof.h @@ -44,48 +44,6 @@ #define LIBGCC_SPEC "libgcc.a%s" -/* Dividing the Output into Sections (Text, Data, ...) */ -/* AOF Assembler syntax is a nightmare when it comes to areas, since once - we change from one area to another, we can't go back again. Instead, - we must create a new area with the same attributes and add the new output - to that. Unfortunately, there is nothing we can do here to guarantee that - two areas with the same attributes will be linked adjacently in the - resulting executable, so we have to be careful not to do pc-relative - addressing across such boundaries. */ -#define TEXT_SECTION_ASM_OP aof_text_section () - -#define DATA_SECTION_ASM_OP aof_data_section () - -#define EXTRA_SECTIONS in_zero_init, in_common - -#define EXTRA_SECTION_FUNCTIONS \ - ZERO_INIT_SECTION \ - COMMON_SECTION - -#define ZERO_INIT_SECTION \ - void \ - zero_init_section () \ - { \ - static int zero_init_count = 1; \ - \ - if (in_section != in_zero_init) \ - { \ - fprintf (asm_out_file, "\tAREA |C$$zidata%d|,NOINIT\n", \ - zero_init_count++); \ - in_section = in_zero_init; \ - } \ - } - -/* Used by ASM_OUTPUT_COMMON (below) to tell varasm.c that we've - changed areas. */ -#define COMMON_SECTION \ - void \ - common_section () \ - { \ - if (in_section != in_common) \ - in_section = in_common; \ - } - #define CTOR_LIST_BEGIN \ asm (CTORS_SECTION_ASM_OP); \ extern func_ptr __CTOR_END__[1]; \ @@ -130,6 +88,8 @@ whole table generation until the end of the function. */ #define JUMP_TABLES_IN_TEXT_SECTION 1 +#define TARGET_ASM_INIT_SECTIONS aof_asm_init_sections + /* Some systems use __main in a way incompatible with its use in gcc, in these cases use the macros NAME__MAIN to give a quoted symbol and SYMBOL__MAIN to give the same symbol without quotes for an alternative entry point. You @@ -159,7 +119,7 @@ /* Output of Uninitialized Variables. */ #define ASM_OUTPUT_COMMON(STREAM, NAME, SIZE, ROUNDED) \ - (common_section (), \ + (in_section = NULL, \ fprintf ((STREAM), "\tAREA "), \ assemble_name ((STREAM), (NAME)), \ fprintf ((STREAM), ", DATA, COMMON\n\t%% %d\t%s size=%d\n", \ diff --git a/gcc/config/arm/aout.h b/gcc/config/arm/aout.h index 2b5d42f6cab..903afa70f04 100644 --- a/gcc/config/arm/aout.h +++ b/gcc/config/arm/aout.h @@ -273,7 +273,7 @@ #define ASM_OUTPUT_ALIGNED_LOCAL(STREAM, NAME, SIZE, ALIGN) \ do \ { \ - bss_section (); \ + switch_to_section (bss_section); \ ASM_OUTPUT_ALIGN (STREAM, floor_log2 (ALIGN / BITS_PER_UNIT)); \ ASM_OUTPUT_LABEL (STREAM, NAME); \ fprintf (STREAM, "\t.space\t%d\n", (int)(SIZE)); \ diff --git a/gcc/config/arm/arm-protos.h b/gcc/config/arm/arm-protos.h index 2bd84ca6024..4e0d77b3341 100644 --- a/gcc/config/arm/arm-protos.h +++ b/gcc/config/arm/arm-protos.h @@ -139,12 +139,9 @@ extern int arm_apply_result_size (void); #if defined AOF_ASSEMBLER extern rtx aof_pic_entry (rtx); -extern char *aof_text_section (void); -extern char *aof_data_section (void); extern void aof_add_import (const char *); extern void aof_delete_import (const char *); extern void zero_init_section (void); -extern void common_section (void); #endif /* AOF_ASSEMBLER */ #endif /* RTX_CODE */ diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index 009d1420d08..8e3ade5caab 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -161,6 +161,7 @@ static void aof_dump_imports (FILE *); static void aof_dump_pic_table (FILE *); static void aof_file_start (void); static void aof_file_end (void); +static void aof_asm_init_sections (void); #endif static rtx arm_struct_value_rtx (tree, int); static void arm_setup_incoming_varargs (CUMULATIVE_ARGS *, enum machine_mode, @@ -637,7 +638,7 @@ struct fpu_desc }; -/* Available values for for -mfpu=. */ +/* Available values for -mfpu=. */ static const struct fpu_desc all_fpus[] = { @@ -7297,11 +7298,7 @@ get_jump_table_size (rtx insn) { /* ADDR_VECs only take room if read-only data does into the text section. */ - if (JUMP_TABLES_IN_TEXT_SECTION -#if !defined(READONLY_DATA_SECTION) && !defined(READONLY_DATA_SECTION_ASM_OP) - || 1 -#endif - ) + if (JUMP_TABLES_IN_TEXT_SECTION || readonly_data_section == text_section) { rtx body = PATTERN (insn); int elt = GET_CODE (body) == ADDR_DIFF_VEC ? 1 : 0; @@ -10064,7 +10061,7 @@ arm_output_function_epilogue (FILE *file ATTRIBUTE_UNUSED, if (label != NULL) { - function_section (current_function_decl); + switch_to_section (function_section (current_function_decl)); targetm.asm_out.internal_label (asm_out_file, "L", CODE_LABEL_NUMBER (label)); asm_fprintf (asm_out_file, "\tbx\t%r\n", regno); @@ -11281,7 +11278,7 @@ arm_elf_asm_constructor (rtx symbol, int priority ATTRIBUTE_UNUSED) } /* Put these in the .init_array section, using a special relocation. */ - ctors_section (); + switch_to_section (ctors_section); assemble_align (POINTER_SIZE); fputs ("\t.word\t", asm_out_file); output_addr_const (asm_out_file, symbol); @@ -14195,7 +14192,7 @@ thumb_call_via_reg (rtx reg) /* If we are in the normal text section we can use a single instance per compilation unit. If we are doing function sections, then we need an entry per section, since we can't rely on reachability. */ - if (in_text_section ()) + if (in_section == text_section) { thumb_call_reg_needed = 1; @@ -14332,7 +14329,7 @@ arm_file_end (void) if (! thumb_call_reg_needed) return; - text_section (); + switch_to_section (text_section); asm_fprintf (asm_out_file, "\t.code 16\n"); ASM_OUTPUT_ALIGN (asm_out_file, 1); @@ -14407,25 +14404,56 @@ aof_dump_pic_table (FILE *f) int arm_text_section_count = 1; -char * -aof_text_section (void ) +/* A get_unnamed_section callback for switching to the text section. */ + +static void +aof_output_text_section_asm_op (const void *data ATTRIBUTE_UNUSED) { - static char buf[100]; - sprintf (buf, "\tAREA |C$$code%d|, CODE, READONLY", + fprintf (asm_out_file, "\tAREA |C$$code%d|, CODE, READONLY", arm_text_section_count++); if (flag_pic) - strcat (buf, ", PIC, REENTRANT"); - return buf; + fprintf (asm_out_file, ", PIC, REENTRANT"); + fprintf (asm_out_file, "\n"); } static int arm_data_section_count = 1; -char * -aof_data_section (void) +/* A get_unnamed_section callback for switching to the data section. */ + +static void +aof_output_data_section_asm_op (const void *data ATTRIBUTE_UNUSED) +{ + fprintf (asm_out_file, "\tAREA |C$$data%d|, DATA\n", + arm_data_section_count++); +} + +/* Implement TARGET_ASM_INIT_SECTIONS. + + AOF Assembler syntax is a nightmare when it comes to areas, since once + we change from one area to another, we can't go back again. Instead, + we must create a new area with the same attributes and add the new output + to that. Unfortunately, there is nothing we can do here to guarantee that + two areas with the same attributes will be linked adjacently in the + resulting executable, so we have to be careful not to do pc-relative + addressing across such boundaries. */ + +static void +aof_asm_init_sections (void) +{ + text_section = get_unnamed_section (SECTION_CODE, + aof_output_text_section_asm_op, NULL); + data_section = get_unnamed_section (SECTION_WRITE, + aof_output_data_section_asm_op, NULL); + readonly_data_section = text_section; +} + +void +zero_init_section (void) { - static char buf[100]; - sprintf (buf, "\tAREA |C$$data%d|, DATA", arm_data_section_count++); - return buf; + static int zero_init_count = 1; + + fprintf (asm_out_file, "\tAREA |C$$zidata%d|,NOINIT\n", zero_init_count++); + in_section = NULL; } /* The AOF assembler is religiously strict about declarations of @@ -14486,7 +14514,7 @@ aof_dump_imports (FILE *f) automagically. */ if (arm_main_function) { - text_section (); + switch_to_section (text_section); fputs ("\tIMPORT __main\n", f); fputs ("\tDCD __main\n", f); } @@ -14537,7 +14565,7 @@ aof_file_start (void) fputs ("__f5\tFN\t5\n", asm_out_file); fputs ("__f6\tFN\t6\n", asm_out_file); fputs ("__f7\tFN\t7\n", asm_out_file); - text_section (); + switch_to_section (text_section); } static void diff --git a/gcc/config/arm/arm.h b/gcc/config/arm/arm.h index 2bca1538dc1..b7b775c18bb 100644 --- a/gcc/config/arm/arm.h +++ b/gcc/config/arm/arm.h @@ -1527,7 +1527,7 @@ typedef struct machine_function GTY(()) machine_function; /* As in the machine_function, a global set of call-via labels, for code - that is in text_section(). */ + that is in text_section. */ extern GTY(()) rtx thumb_call_via_label[14]; /* A C type for declaring a variable that is used as the first argument of diff --git a/gcc/config/arm/arm.md b/gcc/config/arm/arm.md index aa28c3fae77..a161d4d5a43 100644 --- a/gcc/config/arm/arm.md +++ b/gcc/config/arm/arm.md @@ -3500,6 +3500,16 @@ "" ) +(define_split + [(set (match_operand:SI 0 "s_register_operand" "") + (zero_extend:SI (subreg:QI (match_operand:SI 1 "" "") 3))) + (clobber (match_operand:SI 2 "s_register_operand" ""))] + "TARGET_ARM && (GET_CODE (operands[1]) != MEM) && BYTES_BIG_ENDIAN" + [(set (match_dup 2) (match_dup 1)) + (set (match_dup 0) (and:SI (match_dup 2) (const_int 255)))] + "" +) + (define_insn "*compareqi_eq0" [(set (reg:CC_Z CC_REGNUM) (compare:CC_Z (match_operand:QI 0 "s_register_operand" "r") @@ -7551,7 +7561,7 @@ ) (define_insn "*call_mem" - [(call (mem:SI (match_operand:SI 0 "memory_operand" "m")) + [(call (mem:SI (match_operand:SI 0 "call_memory_operand" "m")) (match_operand 1 "" "")) (use (match_operand 2 "" "")) (clobber (reg:SI LR_REGNUM))] @@ -7645,7 +7655,7 @@ (define_insn "*call_value_mem" [(set (match_operand 0 "" "") - (call (mem:SI (match_operand:SI 1 "memory_operand" "m")) + (call (mem:SI (match_operand:SI 1 "call_memory_operand" "m")) (match_operand 2 "" ""))) (use (match_operand 3 "" "")) (clobber (reg:SI LR_REGNUM))] diff --git a/gcc/config/arm/bpabi.h b/gcc/config/arm/bpabi.h index ac5a0905cc5..4c730885ec0 100644 --- a/gcc/config/arm/bpabi.h +++ b/gcc/config/arm/bpabi.h @@ -46,7 +46,7 @@ /* Tell the assembler to build BPABI binaries. */ #undef SUBTARGET_EXTRA_ASM_SPEC -#define SUBTARGET_EXTRA_ASM_SPEC "-meabi=4" +#define SUBTARGET_EXTRA_ASM_SPEC "%{mabi=apcs-gnu|mabi=atpcs:-meabi=gnu;:-meabi=4}" /* The generic link spec in elf.h does not support shared libraries. */ #undef LINK_SPEC diff --git a/gcc/config/arm/pe.h b/gcc/config/arm/pe.h index 2b806d3bcae..f96cd66a93d 100644 --- a/gcc/config/arm/pe.h +++ b/gcc/config/arm/pe.h @@ -93,7 +93,7 @@ drectve_section (); \ fprintf (STREAM, "\t.ascii \" -export:%s\"\n", \ arm_strip_name_encoding (NAME)); \ - function_section (DECL); \ + switch_to_section (function_section (DECL)); \ } \ ARM_DECLARE_FUNCTION_NAME (STREAM, NAME, DECL); \ if (TARGET_THUMB) \ @@ -130,11 +130,11 @@ { \ if (arm_dllexport_name_p (NAME)) \ { \ - enum in_section save_section = in_section; \ + section *save_section = in_section; \ drectve_section (); \ fprintf (STREAM, "\t.ascii \" -export:%s\"\n",\ arm_strip_name_encoding (NAME)); \ - switch_to_section (save_section, (DECL)); \ + switch_to_section (save_section); \ } \ ASM_OUTPUT_LABEL ((STREAM), (NAME)); \ } \ @@ -144,51 +144,6 @@ #define DRECTVE_SECTION_ASM_OP "\t.section .drectve" -/* A list of other sections which the compiler might be "in" at any - given time. */ - -#undef EXTRA_SECTIONS -#define EXTRA_SECTIONS in_drectve - -/* A list of extra section function definitions. */ - -#undef EXTRA_SECTION_FUNCTIONS -#define EXTRA_SECTION_FUNCTIONS \ - DRECTVE_SECTION_FUNCTION \ - SWITCH_TO_SECTION_FUNCTION - -#define DRECTVE_SECTION_FUNCTION \ -void \ -drectve_section (void) \ -{ \ - if (in_section != in_drectve) \ - { \ - fprintf (asm_out_file, "%s\n", DRECTVE_SECTION_ASM_OP); \ - in_section = in_drectve; \ - } \ -} - -/* Switch to SECTION (an `enum in_section'). - - ??? This facility should be provided by GCC proper. - The problem is that we want to temporarily switch sections in - ASM_DECLARE_OBJECT_NAME and then switch back to the original section - afterwards. */ -#define SWITCH_TO_SECTION_FUNCTION \ -static void \ -switch_to_section (enum in_section section, tree decl) \ -{ \ - switch (section) \ - { \ - case in_text: text_section (); break; \ - case in_unlikely_executed_text: unlikely_text_section (); break; \ - case in_data: data_section (); break; \ - case in_named: named_section (decl, NULL, 0); break; \ - case in_readonly_data: readonly_data_section (); break; \ - case in_ctors: ctors_section (); break; \ - case in_dtors: dtors_section (); break; \ - case in_drectve: drectve_section (); break; \ - default: abort (); break; \ - } \ -} - +#define drectve_section() \ + (fprintf (asm_out_file, "%s\n", DRECTVE_SECTION_ASM_OP), \ + in_section = NULL) diff --git a/gcc/config/arm/predicates.md b/gcc/config/arm/predicates.md index aa4f60ed013..4a08204d155 100644 --- a/gcc/config/arm/predicates.md +++ b/gcc/config/arm/predicates.md @@ -110,6 +110,14 @@ "offsettable_address_p (reload_completed | reload_in_progress, mode, XEXP (op, 0))"))) +;; True if the operand is a memory operand that does not have an +;; automodified base register (and thus will not generate output reloads). +(define_predicate "call_memory_operand" + (and (match_code "mem") + (and (match_test "GET_RTX_CLASS (GET_CODE (XEXP (op, 0))) + != RTX_AUTOINC") + (match_operand 0 "memory_operand")))) + (define_predicate "arm_reload_memory_operand" (and (match_code "mem,reg,subreg") (match_test "(!CONSTANT_P (op) diff --git a/gcc/config/arm/t-arm-elf b/gcc/config/arm/t-arm-elf index b4e19b0abb2..dd330ea93a1 100644 --- a/gcc/config/arm/t-arm-elf +++ b/gcc/config/arm/t-arm-elf @@ -4,7 +4,7 @@ LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_tls _bb_init_func \ _lshrdi3 _ashrdi3 _ashldi3 \ _negdf2 _addsubdf3 _muldivdf3 _cmpdf2 _unorddf2 _fixdfsi _fixunsdfsi \ _truncdfsf2 _negsf2 _addsubsf3 _muldivsf3 _cmpsf2 _unordsf2 \ - _fixsfsi _fixunssfsi _floatdidf _floatdisf + _fixsfsi _fixunssfsi _floatdidf _floatdisf _floatundidf _floatundisf MULTILIB_OPTIONS = marm/mthumb MULTILIB_DIRNAMES = arm thumb diff --git a/gcc/config/arm/t-netbsd b/gcc/config/arm/t-netbsd index ef613902153..7d0724cc872 100644 --- a/gcc/config/arm/t-netbsd +++ b/gcc/config/arm/t-netbsd @@ -2,6 +2,7 @@ # difference. It is then pointless adding debugging. TARGET_LIBGCC2_CFLAGS = -fomit-frame-pointer -fpic LIBGCC2_DEBUG_CFLAGS = -g0 +LIB2FUNCS_EXTRA = $(srcdir)/config/floatunsidf.c $(srcdir)/config/floatunsisf.c # Build a shared libgcc library. SHLIB_EXT = .so diff --git a/gcc/config/arm/unknown-elf.h b/gcc/config/arm/unknown-elf.h index 916aac9f255..c9ad9903490 100644 --- a/gcc/config/arm/unknown-elf.h +++ b/gcc/config/arm/unknown-elf.h @@ -58,9 +58,9 @@ do \ { \ if (IN_NAMED_SECTION (DECL)) \ - named_section (DECL, NULL, 0); \ + switch_to_section (get_named_section (DECL, NULL, 0)); \ else \ - bss_section (); \ + switch_to_section (bss_section); \ \ ASM_OUTPUT_ALIGN (FILE, floor_log2 (ALIGN / BITS_PER_UNIT)); \ \ @@ -75,9 +75,9 @@ do \ { \ if ((DECL) != NULL && IN_NAMED_SECTION (DECL)) \ - named_section (DECL, NULL, 0); \ + switch_to_section (get_named_section (DECL, NULL, 0)); \ else \ - bss_section (); \ + switch_to_section (bss_section); \ \ ASM_OUTPUT_ALIGN (FILE, floor_log2 (ALIGN / BITS_PER_UNIT)); \ ASM_OUTPUT_LABEL (FILE, NAME); \ diff --git a/gcc/config/avr/avr-protos.h b/gcc/config/avr/avr-protos.h index 930329b00ae..169be85f6d4 100644 --- a/gcc/config/avr/avr-protos.h +++ b/gcc/config/avr/avr-protos.h @@ -35,7 +35,6 @@ extern void asm_globalize_label (FILE *file, const char *name); extern void order_regs_for_local_alloc (void); extern int initial_elimination_offset (int from, int to); extern int avr_simple_epilogue (void); -extern void progmem_section (void); extern int mask_one_bit_p (HOST_WIDE_INT mask); extern void gas_output_limited_string (FILE *file, const char *str); extern void gas_output_ascii (FILE *file, const char *str, size_t length); diff --git a/gcc/config/avr/avr.c b/gcc/config/avr/avr.c index 5367bd1fdb2..f6e9f9fbd03 100644 --- a/gcc/config/avr/avr.c +++ b/gcc/config/avr/avr.c @@ -69,6 +69,7 @@ static void avr_file_end (void); static void avr_output_function_prologue (FILE *, HOST_WIDE_INT); static void avr_output_function_epilogue (FILE *, HOST_WIDE_INT); static void avr_insert_attributes (tree, tree *); +static void avr_asm_init_sections (void); static unsigned int avr_section_type_flags (tree, const char *, int); static void avr_reorg (void); @@ -114,6 +115,8 @@ static int jump_tables_size; const char *avr_base_arch_macro; const char *avr_extra_arch_macro; +section *progmem_section; + /* More than 8K of program memory: use "call" and "jmp". */ int avr_mega_p = 0; @@ -4756,6 +4759,29 @@ avr_insert_attributes (tree node, tree *attributes) } } +/* A get_unnamed_section callback for switching to progmem_section. */ + +static void +avr_output_progmem_section_asm_op (const void *arg ATTRIBUTE_UNUSED) +{ + fprintf (asm_out_file, + "\t.section .progmem.gcc_sw_table, \"%s\", @progbits\n", + AVR_MEGA ? "a" : "ax"); + /* Should already be aligned, this is just to be safe if it isn't. */ + fprintf (asm_out_file, "\t.p2align 1\n"); +} + +/* Implement TARGET_ASM_INIT_SECTIONS. */ + +static void +avr_asm_init_sections (void) +{ + progmem_section = get_unnamed_section (AVR_MEGA ? 0 : SECTION_CODE, + avr_output_progmem_section_asm_op, + NULL); + readonly_data_section = data_section; +} + static unsigned int avr_section_type_flags (tree decl, const char *name, int reloc) { @@ -5847,7 +5873,7 @@ avr_output_bld (rtx operands[], int bit_nr) void avr_output_addr_vec_elt (FILE *stream, int value) { - progmem_section (); + switch_to_section (progmem_section); if (AVR_MEGA) fprintf (stream, "\t.word pm(.L%d)\n", value); else diff --git a/gcc/config/avr/avr.h b/gcc/config/avr/avr.h index 53a0f9fb567..6fe46014dc4 100644 --- a/gcc/config/avr/avr.h +++ b/gcc/config/avr/avr.h @@ -47,6 +47,9 @@ extern const char *avr_extra_arch_macro; extern int avr_mega_p; extern int avr_enhanced_p; extern int avr_asm_only_p; +#ifndef IN_LIBGCC2 +extern GTY(()) section *progmem_section; +#endif #define AVR_MEGA (avr_mega_p && !TARGET_SHORT_CALLS) #define AVR_ENHANCED (avr_enhanced_p) @@ -476,26 +479,6 @@ do { \ #define TARGET_ASM_DESTRUCTOR avr_asm_out_dtor -#define EXTRA_SECTIONS in_progmem - -#define EXTRA_SECTION_FUNCTIONS \ - \ -void \ -progmem_section (void) \ -{ \ - if (in_section != in_progmem) \ - { \ - fprintf (asm_out_file, \ - "\t.section .progmem.gcc_sw_table, \"%s\", @progbits\n", \ - AVR_MEGA ? "a" : "ax"); \ - /* Should already be aligned, this is just to be safe if it isn't. */ \ - fprintf (asm_out_file, "\t.p2align 1\n"); \ - in_section = in_progmem; \ - } \ -} - -#define READONLY_DATA_SECTION data_section - #define JUMP_TABLES_IN_TEXT_SECTION 0 #define ASM_COMMENT_START " ; " @@ -506,6 +489,7 @@ progmem_section (void) \ /* Switch into a generic section. */ #define TARGET_ASM_NAMED_SECTION default_elf_asm_named_section +#define TARGET_ASM_INIT_SECTIONS avr_asm_init_sections #define ASM_OUTPUT_ASCII(FILE, P, SIZE) gas_output_ascii (FILE,P,SIZE) @@ -682,7 +666,8 @@ sprintf (STRING, "*.%s%lu", PREFIX, (unsigned long)(NUM)) avr_output_addr_vec_elt(STREAM, VALUE) #define ASM_OUTPUT_CASE_LABEL(STREAM, PREFIX, NUM, TABLE) \ - progmem_section (), (*targetm.asm_out.internal_label) (STREAM, PREFIX, NUM) + (switch_to_section (progmem_section), \ + (*targetm.asm_out.internal_label) (STREAM, PREFIX, NUM)) #define ASM_OUTPUT_SKIP(STREAM, N) \ fprintf (STREAM, "\t.skip %lu,0\n", (unsigned long)(N)) diff --git a/gcc/config/avr/t-avr b/gcc/config/avr/t-avr index 4209e9c55e2..0627b9b0468 100644 --- a/gcc/config/avr/t-avr +++ b/gcc/config/avr/t-avr @@ -22,7 +22,7 @@ LIB1ASMFUNCS = \ # We do not have the DF type. # Most of the C functions in libgcc2 use almost all registers, # so use -mcall-prologues for smaller code size. -TARGET_LIBGCC2_CFLAGS = -DDF=SF -Dinhibit_libc -mcall-prologues +TARGET_LIBGCC2_CFLAGS = -DDF=SF -Dinhibit_libc -mcall-prologues -Os fp-bit.c: $(srcdir)/config/fp-bit.c $(srcdir)/config/avr/t-avr echo '#define FLOAT' > fp-bit.c diff --git a/gcc/config/bfin/bfin.c b/gcc/config/bfin/bfin.c index f1a82683aa1..b60716d9f97 100644 --- a/gcc/config/bfin/bfin.c +++ b/gcc/config/bfin/bfin.c @@ -45,6 +45,7 @@ #include "recog.h" #include "ggc.h" #include "integrate.h" +#include "cgraph.h" #include "langhooks.h" #include "bfin-protos.h" #include "tm-preds.h" @@ -863,10 +864,19 @@ expand_interrupt_handler_epilogue (rtx spreg, e_funkind fkind) /* Used while emitting the prologue to generate code to load the correct value into the PIC register, which is passed in DEST. */ -static void +static rtx bfin_load_pic_reg (rtx dest) { + struct cgraph_local_info *i = NULL; rtx addr, insn; + + if (flag_unit_at_a_time) + i = cgraph_local_info (current_function_decl); + + /* Functions local to the translation unit don't need to reload the + pic reg, since the caller always passes a usable one. */ + if (i && i->local) + return pic_offset_table_rtx; if (bfin_lib_id_given) addr = plus_constant (pic_offset_table_rtx, -4 - bfin_library_id * 4); @@ -876,6 +886,7 @@ bfin_load_pic_reg (rtx dest) UNSPEC_LIBRARY_OFFSET)); insn = emit_insn (gen_movsi (dest, gen_rtx_MEM (Pmode, addr))); REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_MAYBE_DEAD, const0_rtx, NULL); + return dest; } /* Generate RTL for the prologue of the current function. */ @@ -908,11 +919,10 @@ bfin_expand_prologue (void) if (TARGET_ID_SHARED_LIBRARY) { rtx p1reg = gen_rtx_REG (Pmode, REG_P1); - rtx r3reg = gen_rtx_REG (Pmode, REG_R3); rtx val; - pic_reg_loaded = p2reg; - bfin_load_pic_reg (pic_reg_loaded); - val = legitimize_pic_address (stack_limit_rtx, p1reg, p2reg); + pic_reg_loaded = bfin_load_pic_reg (p2reg); + val = legitimize_pic_address (stack_limit_rtx, p1reg, + pic_reg_loaded); emit_move_insn (p1reg, val); frame_related_constant_load (p2reg, offset, FALSE); emit_insn (gen_addsi3 (p2reg, p2reg, p1reg)); @@ -1714,9 +1724,9 @@ bfin_memory_move_cost (enum machine_mode mode ATTRIBUTE_UNUSED, CLASS requires an extra scratch register. Return the class needed for the scratch register. */ -enum reg_class -secondary_input_reload_class (enum reg_class class, enum machine_mode mode, - rtx x) +static enum reg_class +bfin_secondary_reload (bool in_p, rtx x, enum reg_class class, + enum machine_mode mode, secondary_reload_info *sri) { /* If we have HImode or QImode, we can only use DREGS as secondary registers; in most other cases we can also use PREGS. */ @@ -1750,11 +1760,13 @@ secondary_input_reload_class (enum reg_class class, enum machine_mode mode, return NO_REGS; /* If destination is a DREG, we can do this without a scratch register if the constant is valid for an add instruction. */ - if (class == DREGS || class == DPREGS) - return large_constant_p ? PREGS : NO_REGS; + if ((class == DREGS || class == DPREGS) + && ! large_constant_p) + return NO_REGS; /* Reloading to anything other than a DREG? Use a PREG scratch register. */ - return PREGS; + sri->icode = CODE_FOR_reload_insi; + return NO_REGS; } /* Data can usually be moved freely between registers of most classes. @@ -1783,15 +1795,6 @@ secondary_input_reload_class (enum reg_class class, enum machine_mode mode, return default_class; return NO_REGS; } - -/* Like secondary_input_reload_class; and all we do is call that function. */ - -enum reg_class -secondary_output_reload_class (enum reg_class class, enum machine_mode mode, - rtx x) -{ - return secondary_input_reload_class (class, mode, x); -} /* Implement TARGET_HANDLE_OPTION. */ @@ -3008,4 +3011,7 @@ bfin_expand_builtin (tree exp, rtx target ATTRIBUTE_UNUSED, #undef TARGET_DEFAULT_TARGET_FLAGS #define TARGET_DEFAULT_TARGET_FLAGS TARGET_DEFAULT +#undef TARGET_SECONDARY_RELOAD +#define TARGET_SECONDARY_RELOAD bfin_secondary_reload + struct gcc_target targetm = TARGET_INITIALIZER; diff --git a/gcc/config/bfin/bfin.h b/gcc/config/bfin/bfin.h index 0e6da5c08a8..803aa589291 100644 --- a/gcc/config/bfin/bfin.h +++ b/gcc/config/bfin/bfin.h @@ -515,11 +515,6 @@ enum reg_class perhaps another, smaller class. */ #define PREFERRED_RELOAD_CLASS(X, CLASS) (CLASS) -#define SECONDARY_OUTPUT_RELOAD_CLASS(class,mode,x) \ - secondary_output_reload_class(class,mode,x) -#define SECONDARY_INPUT_RELOAD_CLASS(class,mode,x) \ - secondary_input_reload_class(class,mode,x) - /* Function Calling Conventions. */ /* The type of the current function; normal functions are of type @@ -1099,7 +1094,7 @@ do { char __buf[256]; \ #define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE, ROUNDED) \ do { \ - data_section(); \ + switch_to_section (data_section); \ if ((SIZE) >= (unsigned int) 4 ) ASM_OUTPUT_ALIGN(FILE,2); \ ASM_OUTPUT_SIZE_DIRECTIVE (FILE, NAME, SIZE); \ ASM_OUTPUT_LABEL (FILE, NAME); \ diff --git a/gcc/config/c4x/c4x-c.c b/gcc/config/c4x/c4x-c.c index fe3a9222981..d0de53ae020 100644 --- a/gcc/config/c4x/c4x-c.c +++ b/gcc/config/c4x/c4x-c.c @@ -68,25 +68,25 @@ c4x_parse_pragma (name, func, sect) { tree f, s, x; - if (c_lex (&x) != CPP_OPEN_PAREN) + if (pragma_lex (&x) != CPP_OPEN_PAREN) BAD ("missing '(' after '#pragma %s' - ignored", name); - if (c_lex (&f) != CPP_NAME) + if (pragma_lex (&f) != CPP_NAME) BAD ("missing function name in '#pragma %s' - ignored", name); if (sect) { - if (c_lex (&x) != CPP_COMMA) + if (pragma_lex (&x) != CPP_COMMA) BAD ("malformed '#pragma %s' - ignored", name); - if (c_lex (&s) != CPP_STRING) + if (pragma_lex (&s) != CPP_STRING) BAD ("missing section name in '#pragma %s' - ignored", name); *sect = s; } - if (c_lex (&x) != CPP_CLOSE_PAREN) + if (pragma_lex (&x) != CPP_CLOSE_PAREN) BAD ("missing ')' for '#pragma %s' - ignored", name); - if (c_lex (&x) != CPP_EOF) + if (pragma_lex (&x) != CPP_EOF) warning (OPT_Wpragmas, "junk at end of '#pragma %s'", name); *func = f; diff --git a/gcc/config/c4x/c4x.c b/gcc/config/c4x/c4x.c index 52be551cb7b..3757523a620 100644 --- a/gcc/config/c4x/c4x.c +++ b/gcc/config/c4x/c4x.c @@ -722,8 +722,8 @@ c4x_gimplify_va_arg_expr (tree valist, tree type, if (indirect) type = build_pointer_type (type); - t = build (PREDECREMENT_EXPR, TREE_TYPE (valist), valist, - build_int_cst (NULL_TREE, int_size_in_bytes (type))); + t = build2 (PREDECREMENT_EXPR, TREE_TYPE (valist), valist, + build_int_cst (NULL_TREE, int_size_in_bytes (type))); t = fold_convert (build_pointer_type (type), t); t = build_va_arg_indirect_ref (t); diff --git a/gcc/config/c4x/c4x.h b/gcc/config/c4x/c4x.h index 43d44b1ce8c..22904e1dc46 100644 --- a/gcc/config/c4x/c4x.h +++ b/gcc/config/c4x/c4x.h @@ -1239,37 +1239,6 @@ if (REG_P (OP1) && ! REG_P (OP0)) \ #define FINI_SECTION_ASM_OP "\t.sect\t\".fini\"" -#undef EXTRA_SECTIONS -#define EXTRA_SECTIONS in_init, in_fini - -#undef EXTRA_SECTION_FUNCTIONS -#define EXTRA_SECTION_FUNCTIONS \ - INIT_SECTION_FUNCTION \ - FINI_SECTION_FUNCTION - -#define INIT_SECTION_FUNCTION \ -extern void init_section (void); \ -void \ -init_section (void) \ -{ \ - if (in_section != in_init) \ - { \ - fprintf (asm_out_file, ";\t.init\n"); \ - 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; \ - } \ -} - /* Switch into a generic section. */ #define TARGET_ASM_NAMED_SECTION c4x_asm_named_section diff --git a/gcc/config/cris/arit.c b/gcc/config/cris/arit.c index 32632ab5c18..e094ea76ec0 100644 --- a/gcc/config/cris/arit.c +++ b/gcc/config/cris/arit.c @@ -2,7 +2,8 @@ Contributed by Axis Communications. Written by Hans-Peter Nilsson , c:a 1992. - Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. + Copyright (C) 1998, 1999, 2000, 2001, 2002, + 2005 Free Software Foundation, Inc. This file is part of GCC. @@ -62,7 +63,8 @@ struct quot_rem }; /* This is the worker function for div and mod. It is inlined into the - respective library function. */ + respective library function. Parameter A must have bit 31 == 0. */ + static __inline__ struct quot_rem do_31div (unsigned long a, unsigned long b) __attribute__ ((__const__, __always_inline__)); @@ -155,19 +157,10 @@ do_31div (unsigned long a, unsigned long b) } } -/* Note that unsigned and signed division both build when L_divsi3, but - the unsigned variant is then inlined, as with do_31div above. */ -#if defined (L_udivsi3) || defined (L_divsi3) -#ifndef L_udivsi3 -static __inline__ -#endif +#ifdef L_udivsi3 unsigned long -__Udiv (unsigned long a, unsigned long b) - __attribute__ ((__const__, __always_inline__)); +__Udiv (unsigned long a, unsigned long b) __attribute__ ((__const__)); -#ifndef L_udivsi3 -static __inline__ -#endif unsigned long __Udiv (unsigned long a, unsigned long b) { @@ -208,7 +201,7 @@ __Udiv (unsigned long a, unsigned long b) return do_31div (a, b).quot+extra; } - +#endif /* L_udivsi3 */ #ifdef L_divsi3 long @@ -217,35 +210,40 @@ __Div (long a, long b) __attribute__ ((__const__)); long __Div (long a, long b) { - long sign; - long result; - - /* Do *not* call do_31div since abs (-2147483648) == 2147483648 - <=> abs (-0x80000000) == 0x80000000 - which is still 32 bits. */ + long extra = 0; + long sign = (b < 0) ? -1 : 1; + + /* We need to handle a == -2147483648 as expected and must while + doing that avoid producing a sequence like "abs (a) < 0" as GCC + may optimize out the test. That sequence may not be obvious as + we call inline functions. Testing for a being negative and + handling (presumably much rarer than positive) enables us to get + a bit of optimization for an (accumulated) reduction of the + penalty of the 0x80000000 special-case. */ + if (a < 0) + { + sign = -sign; - sign = a ^ b; - result = __Udiv (__builtin_labs (a), __builtin_labs (b)); + if ((a & 0x7fffffff) == 0) + { + /* We're at 0x80000000. Tread carefully. */ + a -= b * sign; + extra = sign; + } + a = -a; + } - return (sign < 0) ? -result : result; + /* We knowingly penalize pre-v10 models by multiplication with the + sign. */ + return sign * do_31div (a, __builtin_labs (b)).quot + extra; } #endif /* L_divsi3 */ -#endif /* L_udivsi3 || L_divsi3 */ -/* Note that unsigned and signed modulus both build when L_modsi3, but - then the unsigned variant is inlined, as with do_31div above. */ -#if defined (L_umodsi3) || defined (L_modsi3) -#ifndef L_umodsi3 -static __inline__ -#endif +#ifdef L_umodsi3 unsigned long -__Umod (unsigned long a, unsigned long b) - __attribute__ ((__const__, __always_inline__)); +__Umod (unsigned long a, unsigned long b) __attribute__ ((__const__)); -#ifndef L_umodsi3 -static __inline__ -#endif unsigned long __Umod (unsigned long a, unsigned long b) { @@ -279,6 +277,7 @@ __Umod (unsigned long a, unsigned long b) return do_31div (a, b).rem; } +#endif /* L_umodsi3 */ #ifdef L_modsi3 long @@ -287,14 +286,27 @@ __Mod (long a, long b) __attribute__ ((__const__)); long __Mod (long a, long b) { - long result; - - result = __Umod (__builtin_labs (a), __builtin_labs (b)); + long sign = 1; + + /* We need to handle a == -2147483648 as expected and must while + doing that avoid producing a sequence like "abs (a) < 0" as GCC + may optimize out the test. That sequence may not be obvious as + we call inline functions. Testing for a being negative and + handling (presumably much rarer than positive) enables us to get + a bit of optimization for an (accumulated) reduction of the + penalty of the 0x80000000 special-case. */ + if (a < 0) + { + sign = -1; + if ((a & 0x7fffffff) == 0) + /* We're at 0x80000000. Tread carefully. */ + a += __builtin_labs (b); + a = -a; + } - return (a < 0) ? -result : result; + return sign * do_31div (a, __builtin_labs (b)).rem; } #endif /* L_modsi3 */ -#endif /* L_umodsi3 || L_modsi3 */ #endif /* L_udivsi3 || L_divsi3 || L_umodsi3 || L_modsi3 */ /* diff --git a/gcc/config/cris/cris.c b/gcc/config/cris/cris.c index 0c415391543..8271a4ff4a1 100644 --- a/gcc/config/cris/cris.c +++ b/gcc/config/cris/cris.c @@ -468,7 +468,7 @@ cris_op_str (rtx x) break; case UMIN: - /* Used to control the sign/zero-extend character for the 'e' modifier. + /* Used to control the sign/zero-extend character for the 'E' modifier. BOUND has none. */ cris_output_insn_is_bound = 1; return "bound"; @@ -872,6 +872,13 @@ cris_print_operand (FILE *file, rtx x, int code) break; case 'e': + /* Like 'E', but ignore state set by 'x'. FIXME: Use code + iterators ("code macros") and attributes in cris.md to avoid + the need for %x and %E (and %e) and state passed between + those modifiers. */ + cris_output_insn_is_bound = 0; + /* FALL THROUGH. */ + case 'E': /* Print 's' if operand is SIGN_EXTEND or 'u' if ZERO_EXTEND unless cris_output_insn_is_bound is nonzero. */ if (GET_CODE (operand) != SIGN_EXTEND @@ -2353,12 +2360,31 @@ cris_split_movdx (rtx *operands) if (GET_CODE (addr) == POST_INC) { - emit_insn (gen_rtx_SET (VOIDmode, - operand_subword (dest, 0, TRUE, mode), - change_address (src, SImode, addr))); - emit_insn (gen_rtx_SET (VOIDmode, - operand_subword (dest, 1, TRUE, mode), - change_address (src, SImode, addr))); + rtx mem; + rtx insn; + + /* Whenever we emit insns with post-incremented + addresses ourselves, we must add a post-inc note + manually. */ + mem = change_address (src, SImode, addr); + insn + = gen_rtx_SET (VOIDmode, + operand_subword (dest, 0, TRUE, mode), mem); + insn = emit_insn (insn); + if (GET_CODE (XEXP (mem, 0)) == POST_INC) + REG_NOTES (insn) + = alloc_EXPR_LIST (REG_INC, XEXP (XEXP (mem, 0), 0), + REG_NOTES (insn)); + + mem = change_address (src, SImode, addr); + insn + = gen_rtx_SET (VOIDmode, + operand_subword (dest, 1, TRUE, mode), mem); + insn = emit_insn (insn); + if (GET_CODE (XEXP (mem, 0)) == POST_INC) + REG_NOTES (insn) + = alloc_EXPR_LIST (REG_INC, XEXP (XEXP (mem, 0), 0), + REG_NOTES (insn)); } else { @@ -2399,12 +2425,31 @@ cris_split_movdx (rtx *operands) if (GET_CODE (addr) == POST_INC) { - emit_insn (gen_rtx_SET (VOIDmode, - change_address (dest, SImode, addr), - operand_subword (src, 0, TRUE, mode))); - emit_insn (gen_rtx_SET (VOIDmode, - change_address (dest, SImode, addr), - operand_subword (src, 1, TRUE, mode))); + rtx mem; + rtx insn; + + /* Whenever we emit insns with post-incremented addresses + ourselves, we must add a post-inc note manually. */ + mem = change_address (dest, SImode, addr); + insn + = gen_rtx_SET (VOIDmode, + mem, operand_subword (src, 0, TRUE, mode)); + insn = emit_insn (insn); + if (GET_CODE (XEXP (mem, 0)) == POST_INC) + REG_NOTES (insn) + = alloc_EXPR_LIST (REG_INC, XEXP (XEXP (mem, 0), 0), + REG_NOTES (insn)); + + mem = change_address (dest, SImode, addr); + insn + = gen_rtx_SET (VOIDmode, + mem, + operand_subword (src, 1, TRUE, mode)); + insn = emit_insn (insn); + if (GET_CODE (XEXP (mem, 0)) == POST_INC) + REG_NOTES (insn) + = alloc_EXPR_LIST (REG_INC, XEXP (XEXP (mem, 0), 0), + REG_NOTES (insn)); } else { @@ -2780,6 +2825,8 @@ cris_expand_epilogue (void) regno--) if (cris_reg_saved_in_regsave_area (regno, got_really_used)) { + rtx insn; + if (argspace_offset) { /* There is an area for outgoing parameters located before @@ -2795,12 +2842,19 @@ cris_expand_epilogue (void) mem = gen_rtx_MEM (SImode, gen_rtx_POST_INC (SImode, stack_pointer_rtx)); set_mem_alias_set (mem, get_frame_alias_set ()); - emit_move_insn (gen_rtx_raw_REG (SImode, regno), mem); + insn = emit_move_insn (gen_rtx_raw_REG (SImode, regno), mem); + + /* Whenever we emit insns with post-incremented addresses + ourselves, we must add a post-inc note manually. */ + REG_NOTES (insn) + = alloc_EXPR_LIST (REG_INC, stack_pointer_rtx, REG_NOTES (insn)); } /* If we have any movem-restore, do it now. */ if (last_movem_reg != -1) { + rtx insn; + if (argspace_offset) { emit_insn (gen_rtx_SET (VOIDmode, @@ -2813,7 +2867,14 @@ cris_expand_epilogue (void) mem = gen_rtx_MEM (SImode, gen_rtx_POST_INC (SImode, stack_pointer_rtx)); set_mem_alias_set (mem, get_frame_alias_set ()); - emit_insn (cris_gen_movem_load (mem, GEN_INT (last_movem_reg + 1), 0)); + insn + = emit_insn (cris_gen_movem_load (mem, + GEN_INT (last_movem_reg + 1), 0)); + /* Whenever we emit insns with post-incremented addresses + ourselves, we must add a post-inc note manually. */ + if (side_effects_p (PATTERN (insn))) + REG_NOTES (insn) + = alloc_EXPR_LIST (REG_INC, stack_pointer_rtx, REG_NOTES (insn)); } /* If we don't clobber all of the allocated stack area (we've already @@ -2829,13 +2890,20 @@ cris_expand_epilogue (void) /* Restore frame pointer if necessary. */ if (frame_pointer_needed) { + rtx insn; + emit_insn (gen_cris_frame_deallocated_barrier ()); emit_move_insn (stack_pointer_rtx, frame_pointer_rtx); mem = gen_rtx_MEM (SImode, gen_rtx_POST_INC (SImode, stack_pointer_rtx)); set_mem_alias_set (mem, get_frame_alias_set ()); - emit_move_insn (frame_pointer_rtx, mem); + insn = emit_move_insn (frame_pointer_rtx, mem); + + /* Whenever we emit insns with post-incremented addresses + ourselves, we must add a post-inc note manually. */ + REG_NOTES (insn) + = alloc_EXPR_LIST (REG_INC, stack_pointer_rtx, REG_NOTES (insn)); } else if ((size + argspace_offset) != 0) { @@ -2861,12 +2929,18 @@ cris_expand_epilogue (void) if (current_function_calls_eh_return) { rtx mem; + rtx insn; rtx srpreg = gen_rtx_raw_REG (SImode, CRIS_SRP_REGNUM); mem = gen_rtx_MEM (SImode, gen_rtx_POST_INC (SImode, stack_pointer_rtx)); set_mem_alias_set (mem, get_frame_alias_set ()); - emit_move_insn (srpreg, mem); + insn = emit_move_insn (srpreg, mem); + + /* Whenever we emit insns with post-incremented addresses + ourselves, we must add a post-inc note manually. */ + REG_NOTES (insn) + = alloc_EXPR_LIST (REG_INC, stack_pointer_rtx, REG_NOTES (insn)); emit_insn (gen_addsi3 (stack_pointer_rtx, stack_pointer_rtx, @@ -2889,11 +2963,18 @@ cris_expand_epilogue (void) { rtx mem; rtx srpreg = gen_rtx_raw_REG (SImode, CRIS_SRP_REGNUM); + rtx insn; + mem = gen_rtx_MEM (SImode, gen_rtx_POST_INC (SImode, stack_pointer_rtx)); set_mem_alias_set (mem, get_frame_alias_set ()); - emit_move_insn (srpreg, mem); + insn = emit_move_insn (srpreg, mem); + + /* Whenever we emit insns with post-incremented addresses + ourselves, we must add a post-inc note manually. */ + REG_NOTES (insn) + = alloc_EXPR_LIST (REG_INC, stack_pointer_rtx, REG_NOTES (insn)); } emit_insn (gen_rtx_SET (VOIDmode, diff --git a/gcc/config/cris/cris.md b/gcc/config/cris/cris.md index 37bd4ab1306..9fcc4b01e4b 100644 --- a/gcc/config/cris/cris.md +++ b/gcc/config/cris/cris.md @@ -1151,7 +1151,7 @@ "") (define_expand "reload_out" - [(set (match_operand:BW 2 "register_operand" "=r") + [(set (match_operand:BW 2 "register_operand" "=&r") (match_operand:BW 1 "register_operand" "x")) (set (match_operand:BW 0 "memory_operand" "=m") (match_dup 2))] @@ -1686,8 +1686,8 @@ || CONST_OK_FOR_LETTER_P (INTVAL (operands[3]), 'J'))) return "#"; if (which_alternative == 4) - return "%x5%e6.%m6 [%4=%3%S2],%0"; - return "%x5%e6.%m6 [%4=%2%S3],%0"; + return "%x5%E6.%m6 [%4=%3%S2],%0"; + return "%x5%E6.%m6 [%4=%2%S3],%0"; }) (define_insn "*extopsi_side" @@ -1715,8 +1715,8 @@ || CONST_OK_FOR_LETTER_P (INTVAL (operands[3]), 'J'))) return "#"; if (which_alternative == 4) - return "%x5%e6 [%4=%3%S2],%0"; - return "%x5%e6 [%4=%2%S3],%0"; + return "%x5%E6 [%4=%3%S2],%0"; + return "%x5%E6 [%4=%2%S3],%0"; }) @@ -1766,7 +1766,7 @@ && cris_side_effect_mode_ok (MULT, operands, 5, 4, 2, 3, 0)" "@ # - %x7%e6 [%5=%4+%2%T3],%0") + %x7%E6 [%5=%4+%2%T3],%0") ;; [rx=ry+i] ;; FIXME: GCC should widen. @@ -1823,8 +1823,8 @@ || CONST_OK_FOR_LETTER_P (INTVAL (operands[3]), 'J'))) return "#"; if (which_alternative == 4) - return \"%x6%e5.%m5 [%4=%3%S2],%0\"; - return "%x6%e5 [%4=%2%S3],%0"; + return \"%x6%E5.%m5 [%4=%3%S2],%0\"; + return "%x6%E5 [%4=%2%S3],%0"; }) ;; Extend versions (zero/sign) of normal add/sub (no side-effects). @@ -1843,10 +1843,10 @@ "GET_MODE_SIZE (GET_MODE (operands[0])) <= UNITS_PER_WORD && (operands[1] != frame_pointer_rtx || GET_CODE (operands[3]) != PLUS)" "@ - %x3%e4.%m4 %2,%0 - %x3%e4.%m4 %2,%0 - %x3%e4.%m4 %2,%0 - %x3%e4.%m4 %2,%1,%0" + %x3%E4.%m4 %2,%0 + %x3%E4.%m4 %2,%0 + %x3%E4.%m4 %2,%0 + %x3%E4.%m4 %2,%1,%0" [(set_attr "slottable" "yes,yes,no,no") (set_attr "cc" "clobber")]) @@ -1864,10 +1864,10 @@ && GET_MODE_SIZE (GET_MODE (operands[0])) <= UNITS_PER_WORD && (operands[1] != frame_pointer_rtx || GET_CODE (operands[3]) != PLUS)" "@ - %x3%e4 %2,%0 - %x3%e4 %2,%0 - %x3%e4 %2,%0 - %x3%e4 %2,%1,%0" + %x3%E4 %2,%0 + %x3%E4 %2,%0 + %x3%E4 %2,%0 + %x3%E4 %2,%1,%0" [(set_attr "slottable" "yes,yes,no,no")]) @@ -1903,10 +1903,10 @@ "(GET_CODE (operands[4]) != UMIN || GET_CODE (operands[3]) == ZERO_EXTEND) && operands[1] != frame_pointer_rtx" "@ - %x4%e3 %2,%0 - %x4%e3 %2,%0 - %x4%e3 %2,%0 - %x4%e3 %2,%1,%0" + %x4%E3 %2,%0 + %x4%E3 %2,%0 + %x4%E3 %2,%0 + %x4%E3 %2,%1,%0" [(set_attr "slottable" "yes,yes,no,no")]) ;; This is the special case when we use what corresponds to the @@ -2679,11 +2679,16 @@ { if (GET_CODE (operands[2]) == CONST_INT) { - if (INTVAL (operands[2]) < 256) - return "bound.b %2,%0"; + /* Constant operands are zero-extended, so only 32-bit operands + may be negative. */ + if (INTVAL (operands[2]) >= 0) + { + if (INTVAL (operands[2]) < 256) + return "bound.b %2,%0"; - if (INTVAL (operands[2]) < 65536) - return "bound.w %2,%0"; + if (INTVAL (operands[2]) < 65536) + return "bound.w %2,%0"; + } } else if (which_alternative == 3) return "bound.d %2,%1,%0"; diff --git a/gcc/config/darwin-c.c b/gcc/config/darwin-c.c index d044deb709c..36b03c40fb4 100644 --- a/gcc/config/darwin-c.c +++ b/gcc/config/darwin-c.c @@ -102,17 +102,17 @@ darwin_pragma_options (cpp_reader *pfile ATTRIBUTE_UNUSED) const char *arg; tree t, x; - if (c_lex (&t) != CPP_NAME) + if (pragma_lex (&t) != CPP_NAME) BAD ("malformed '#pragma options', ignoring"); arg = IDENTIFIER_POINTER (t); if (strcmp (arg, "align")) BAD ("malformed '#pragma options', ignoring"); - if (c_lex (&t) != CPP_EQ) + if (pragma_lex (&t) != CPP_EQ) BAD ("malformed '#pragma options', ignoring"); - if (c_lex (&t) != CPP_NAME) + if (pragma_lex (&t) != CPP_NAME) BAD ("malformed '#pragma options', ignoring"); - if (c_lex (&x) != CPP_EOF) + if (pragma_lex (&x) != CPP_EOF) warning (0, "junk at end of '#pragma options'"); arg = IDENTIFIER_POINTER (t); @@ -134,19 +134,19 @@ darwin_pragma_unused (cpp_reader *pfile ATTRIBUTE_UNUSED) tree decl, x; int tok; - if (c_lex (&x) != CPP_OPEN_PAREN) + if (pragma_lex (&x) != CPP_OPEN_PAREN) BAD ("missing '(' after '#pragma unused', ignoring"); while (1) { - tok = c_lex (&decl); + tok = pragma_lex (&decl); if (tok == CPP_NAME && decl) { tree local = lookup_name (decl); if (local && (TREE_CODE (local) == PARM_DECL || TREE_CODE (local) == VAR_DECL)) TREE_USED (local) = 1; - tok = c_lex (&x); + tok = pragma_lex (&x); if (tok != CPP_COMMA) break; } @@ -155,7 +155,7 @@ darwin_pragma_unused (cpp_reader *pfile ATTRIBUTE_UNUSED) if (tok != CPP_CLOSE_PAREN) BAD ("missing ')' after '#pragma unused', ignoring"); - if (c_lex (&x) != CPP_EOF) + if (pragma_lex (&x) != CPP_EOF) warning (0, "junk at end of '#pragma unused'"); } diff --git a/gcc/config/darwin-protos.h b/gcc/config/darwin-protos.h index dfada767b01..a22e76f8d79 100644 --- a/gcc/config/darwin-protos.h +++ b/gcc/config/darwin-protos.h @@ -18,6 +18,7 @@ along with GCC; see the file COPYING. If not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +extern void darwin_init_sections (void); extern int name_needs_quotes (const char *); extern void machopic_validate_stub_or_non_lazy_ptr (const char *); @@ -27,18 +28,6 @@ extern void machopic_output_function_base_name (FILE *); extern const char *machopic_indirection_name (rtx, bool); extern const char *machopic_mcount_stub_name (void); -extern void machopic_picsymbol_stub_section (void); -extern void machopic_picsymbol_stub1_section (void); -extern void machopic_symbol_stub_section (void); -extern void machopic_symbol_stub1_section (void); -extern void machopic_lazy_symbol_ptr_section (void); -extern void machopic_nl_symbol_ptr_section (void); - -extern void constructor_section (void); -extern void destructor_section (void); -extern void mod_init_section (void); -extern void mod_term_section (void); - #ifdef RTX_CODE extern rtx machopic_function_base_sym (void); @@ -62,17 +51,16 @@ extern void darwin_encode_section_info (tree, rtx, int); extern void machopic_finish (FILE *); -extern void darwin_exception_section (void); -extern void darwin_eh_frame_section (void); -extern void machopic_select_section (tree, int, unsigned HOST_WIDE_INT); -extern void machopic_select_rtx_section (enum machine_mode, rtx, - unsigned HOST_WIDE_INT); +extern section *machopic_select_section (tree, int, unsigned HOST_WIDE_INT); +extern section *machopic_select_rtx_section (enum machine_mode, rtx, + unsigned HOST_WIDE_INT); extern void darwin_unique_section (tree decl, int reloc); extern void darwin_asm_named_section (const char *, unsigned int, tree); extern void darwin_non_lazy_pcrel (FILE *, rtx); extern void darwin_emit_unwind_label (FILE *, tree, int, int); +extern void darwin_emit_except_table_label (FILE *); extern void darwin_pragma_ignore (struct cpp_reader *); extern void darwin_pragma_options (struct cpp_reader *); @@ -85,51 +73,7 @@ extern void darwin_mark_decl_preserved (const char *); extern tree darwin_handle_weak_import_attribute (tree *node, tree name, tree args, int flags, bool * no_add_attrs); - -/* Expanded by EXTRA_SECTION_FUNCTIONS into varasm.o. */ -extern void text_coal_section (void); -extern void text_unlikely_section (void); -extern void text_unlikely_coal_section (void); -extern void const_section (void); -extern void const_coal_section (void); -extern void const_data_section (void); -extern void const_data_coal_section (void); -extern void data_coal_section (void); -extern void cstring_section (void); -extern void literal4_section (void); -extern void literal8_section (void); -extern void constructor_section (void); -extern void mod_init_section (void); -extern void mod_term_section (void); -extern void destructor_section (void); -extern void objc_class_section (void); -extern void objc_meta_class_section (void); -extern void objc_category_section (void); -extern void objc_class_vars_section (void); -extern void objc_instance_vars_section (void); -extern void objc_cls_meth_section (void); -extern void objc_inst_meth_section (void); -extern void objc_cat_cls_meth_section (void); -extern void objc_cat_inst_meth_section (void); -extern void objc_selector_refs_section (void); -extern void objc_selector_fixup_section (void); -extern void objc_symbols_section (void); -extern void objc_module_info_section (void); -extern void objc_image_info_section (void); -extern void objc_protocol_section (void); -extern void objc_string_object_section (void); -extern void objc_constant_string_object_section (void); -extern void objc_class_names_section (void); -extern void objc_meth_var_names_section (void); -extern void objc_meth_var_types_section (void); -extern void objc_cls_refs_section (void); -extern void machopic_lazy_symbol_ptr_section (void); -extern void machopic_nl_symbol_ptr_section (void); -extern void machopic_symbol_stub_section (void); -extern void machopic_picsymbol_stub_section (void); extern void machopic_output_stub (FILE *, const char *, const char *); -extern void darwin_exception_section (void); -extern void darwin_eh_frame_section (void); extern void darwin_globalize_label (FILE *, const char *); extern void darwin_assemble_visibility (tree, int); extern void darwin_asm_output_dwarf_delta (FILE *, int, const char *, diff --git a/gcc/config/darwin-sections.def b/gcc/config/darwin-sections.def new file mode 100644 index 00000000000..327c1754a05 --- /dev/null +++ b/gcc/config/darwin-sections.def @@ -0,0 +1,62 @@ +DEF_SECTION (text_coal_section, SECTION_CODE, + ".section __TEXT,__textcoal_nt,coalesced,pure_instructions", 0) +DEF_SECTION (text_unlikely_coal_section, SECTION_CODE, + ".section __TEXT,__text_unlikely_coal," + "coalesced,pure_instructions", 0) +DEF_SECTION (const_section, 0, ".const", 0) +DEF_SECTION (const_coal_section, 0, + ".section __TEXT,__const_coal,coalesced", 0) +DEF_SECTION (const_data_section, 0, ".const_data", 0) +DEF_SECTION (const_data_coal_section, 0, + ".section __DATA,__const_coal,coalesced", 0) +DEF_SECTION (data_coal_section, SECTION_WRITE, + ".section __DATA,__datacoal_nt,coalesced", 0) +DEF_SECTION (cstring_section, 0, ".cstring", 0) +DEF_SECTION (literal4_section, 0, ".literal4", 0) +DEF_SECTION (literal8_section, 0, ".literal8", 0) +DEF_SECTION (constructor_section, 0, ".constructor", 0) +DEF_SECTION (mod_init_section, 0, ".mod_init_func", 0) +DEF_SECTION (mod_term_section, 0, ".mod_term_func", 0) +DEF_SECTION (destructor_section, 0, ".destructor", 0) +DEF_SECTION (objc_class_section, 0, ".objc_class", 1) +DEF_SECTION (objc_meta_class_section, 0, ".objc_meta_class", 1) +DEF_SECTION (objc_category_section, 0, ".objc_category", 1) +DEF_SECTION (objc_class_vars_section, 0, ".objc_class_vars", 1) +DEF_SECTION (objc_instance_vars_section, 0, ".objc_instance_vars", 1) +DEF_SECTION (objc_cls_meth_section, 0, ".objc_cls_meth", 1) +DEF_SECTION (objc_inst_meth_section, 0, ".objc_inst_meth", 1) +DEF_SECTION (objc_cat_cls_meth_section, 0, ".objc_cat_cls_meth", 1) +DEF_SECTION (objc_cat_inst_meth_section, 0, ".objc_cat_inst_meth", 1) +DEF_SECTION (objc_selector_refs_section, 0, ".objc_message_refs", 1) +DEF_SECTION (objc_selector_fixup_section, 0, + ".section __OBJC, __sel_fixup, regular, no_dead_strip", 1) +DEF_SECTION (objc_symbols_section, 0, ".objc_symbols", 1) +DEF_SECTION (objc_module_info_section, 0, ".objc_module_info", 1) +DEF_SECTION (objc_protocol_section, 0, ".objc_protocol", 1) +DEF_SECTION (objc_string_object_section, 0, ".objc_string_object", 1) +DEF_SECTION (objc_constant_string_object_section, 0, + ".section __OBJC, __cstring_object, regular, no_dead_strip", 1) + +/* Fix-and-Continue image marker. */ +DEF_SECTION (objc_image_info_section, 0, + ".section __OBJC, __image_info, regular, no_dead_strip", 1) +DEF_SECTION (objc_class_names_section, 0, ".objc_class_names", 1) +DEF_SECTION (objc_meth_var_names_section, 0, ".objc_meth_var_names", 1) +DEF_SECTION (objc_meth_var_types_section, 0, ".objc_meth_var_types", 1) +DEF_SECTION (objc_cls_refs_section, 0, ".objc_cls_refs", 1) + +DEF_SECTION (machopic_lazy_symbol_ptr_section, 0, ".lazy_symbol_pointer", 0) +DEF_SECTION (machopic_nl_symbol_ptr_section, 0, ".non_lazy_symbol_pointer", 0) +DEF_SECTION (machopic_symbol_stub_section, 0, ".symbol_stub", 0) +DEF_SECTION (machopic_symbol_stub1_section, 0, + ".section __TEXT,__symbol_stub1,symbol_stubs," + "pure_instructions,16", 0) +DEF_SECTION (machopic_picsymbol_stub_section, 0, ".picsymbol_stub", 0) +DEF_SECTION (machopic_picsymbol_stub1_section, 0, + ".section __TEXT,__picsymbolstub1,symbol_stubs," + "pure_instructions,32", 0) +DEF_SECTION (darwin_exception_section, 0, + ".section __DATA,__gcc_except_tab", 0) +DEF_SECTION (darwin_eh_frame_section, 0, + ".section " EH_FRAME_SECTION_NAME ",__eh_frame" + EH_FRAME_SECTION_ATTR, 0) diff --git a/gcc/config/darwin.c b/gcc/config/darwin.c index bd5d5a8c75b..8920d62095c 100644 --- a/gcc/config/darwin.c +++ b/gcc/config/darwin.c @@ -53,7 +53,7 @@ Boston, MA 02110-1301, USA. */ able to do easily. These changes allow gdb to load in recompilation of a translation unit that has been changed into a running program and replace existing functions and methods of that - translation unit with with versions of those functions and methods + translation unit with versions of those functions and methods from the newly compiled translation unit. The new functions access the existing static symbols from the old translation unit, if the symbol existed in the unit to be replaced, and from the new @@ -66,7 +66,7 @@ Boston, MA 02110-1301, USA. */ allows all uses of the old name to forward to the replacement, including existing function pointers and virtual methods. See rs6000_emit_prologue for the code that handles the nop insertions. - + The added indirection allows gdb to redirect accesses to static symbols from the newly loaded translation unit to the existing symbol, if any. @code{static} symbols are special and are handled by @@ -76,6 +76,71 @@ Boston, MA 02110-1301, USA. */ of MACHO_SYMBOL_STATIC for the code that handles @code{static} symbol indirection. */ +/* Section names. */ +section * darwin_sections[NUM_DARWIN_SECTIONS]; + +/* A get_unnamed_section callback used to switch to an ObjC section. + DIRECTIVE is as for output_section_asm_op. */ + +static void +output_objc_section_asm_op (const void *directive) +{ + static bool been_here = false; + + if (! been_here) + { + static const enum darwin_section_enum tomark[] = + { + /* written, cold -> hot */ + objc_cat_cls_meth_section, + objc_cat_inst_meth_section, + objc_string_object_section, + objc_constant_string_object_section, + objc_selector_refs_section, + objc_selector_fixup_section, + objc_cls_refs_section, + objc_class_section, + objc_meta_class_section, + /* shared, hot -> cold */ + objc_cls_meth_section, + objc_inst_meth_section, + objc_protocol_section, + objc_class_names_section, + objc_meth_var_types_section, + objc_meth_var_names_section, + objc_category_section, + objc_class_vars_section, + objc_instance_vars_section, + objc_module_info_section, + objc_symbols_section + }; + size_t i; + + been_here = true; + for (i = 0; i < ARRAY_SIZE (tomark); i++) + switch_to_section (darwin_sections[tomark[i]]); + } + output_section_asm_op (directive); +} + +/* Implement TARGET_ASM_INIT_SECTIONS. */ + +void +darwin_init_sections (void) +{ +#define DEF_SECTION(NAME, FLAGS, DIRECTIVE, OBJC) \ + darwin_sections[NAME] = \ + get_unnamed_section (FLAGS, (OBJC \ + ? output_objc_section_asm_op \ + : output_section_asm_op), \ + "\t" DIRECTIVE); +#include "config/darwin-sections.def" +#undef DEF_SECTION + + readonly_data_section = darwin_sections[const_section]; + exception_section = darwin_sections[darwin_exception_section]; + eh_frame_section = darwin_sections[darwin_eh_frame_section]; +} int name_needs_quotes (const char *name) @@ -125,10 +190,10 @@ machopic_classify_symbol (rtx sym_ref) flags = SYMBOL_REF_FLAGS (sym_ref); function_p = SYMBOL_REF_FUNCTION_P (sym_ref); if (machopic_symbol_defined_p (sym_ref)) - return (function_p + return (function_p ? MACHOPIC_DEFINED_FUNCTION : MACHOPIC_DEFINED_DATA); else - return (function_p + return (function_p ? MACHOPIC_UNDEFINED_FUNCTION : MACHOPIC_UNDEFINED_DATA); } @@ -191,7 +256,7 @@ void machopic_define_symbol (rtx mem) { rtx sym_ref; - + gcc_assert (GET_CODE (mem) == MEM); sym_ref = XEXP (mem, 0); SYMBOL_REF_FLAGS (sym_ref) |= MACHO_SYMBOL_FLAG_DEFINED; @@ -222,7 +287,7 @@ machopic_function_base_sym (void) rtx sym_ref; sym_ref = gen_rtx_SYMBOL_REF (Pmode, machopic_function_base_name ()); - SYMBOL_REF_FLAGS (sym_ref) + SYMBOL_REF_FLAGS (sym_ref) |= (MACHO_SYMBOL_FLAG_VARIABLE | MACHO_SYMBOL_FLAG_DEFINED); return sym_ref; } @@ -279,7 +344,7 @@ typedef struct machopic_indirection GTY (()) /* A table mapping stub names and non-lazy pointer names to SYMBOL_REFs for the stubbed-to and pointed-to entities. */ -static GTY ((param_is (struct machopic_indirection))) htab_t +static GTY ((param_is (struct machopic_indirection))) htab_t machopic_indirections; /* Return a hash value for a SLOT in the indirections hash table. */ @@ -316,7 +381,22 @@ machopic_indirection_name (rtx sym_ref, bool stub_p) const char *suffix; const char *prefix = user_label_prefix; const char *quote = ""; - + tree id; + + id = maybe_get_identifier (name); + if (id) + { + tree id_orig = id; + + while (IDENTIFIER_TRANSPARENT_ALIAS (id)) + id = TREE_CHAIN (id); + if (id != id_orig) + { + name = IDENTIFIER_POINTER (id); + namelen = strlen (name); + } + } + if (name[0] == '*') { saw_star = true; @@ -347,11 +427,11 @@ machopic_indirection_name (rtx sym_ref, bool stub_p) sprintf (buffer, "&%sL%s%s%s%s", quote, prefix, name, suffix, quote); if (!machopic_indirections) - machopic_indirections = htab_create_ggc (37, + machopic_indirections = htab_create_ggc (37, machopic_indirection_hash, machopic_indirection_eq, /*htab_del=*/NULL); - + slot = htab_find_slot_with_hash (machopic_indirections, buffer, htab_hash_string (buffer), INSERT); if (*slot) @@ -367,7 +447,7 @@ machopic_indirection_name (rtx sym_ref, bool stub_p) p->used = false; *slot = p; } - + return p->ptr_name; } @@ -389,15 +469,15 @@ void machopic_validate_stub_or_non_lazy_ptr (const char *name) { machopic_indirection *p; - - p = ((machopic_indirection *) + + p = ((machopic_indirection *) (htab_find_with_hash (machopic_indirections, name, htab_hash_string (name)))); if (p && ! p->used) { const char *real_name; tree id; - + p->used = true; /* Do what output_addr_const will do when we actually call it. */ @@ -405,7 +485,7 @@ machopic_validate_stub_or_non_lazy_ptr (const char *name) mark_decl_referenced (SYMBOL_REF_DECL (p->symbol)); real_name = targetm.strip_name_encoding (XSTR (p->symbol, 0)); - + id = maybe_get_identifier (real_name); if (id) mark_referenced (id); @@ -476,7 +556,7 @@ machopic_indirect_data_reference (rtx orig, rtx reg) } ptr_ref = (gen_rtx_SYMBOL_REF - (Pmode, + (Pmode, machopic_indirection_name (orig, /*stub_p=*/false))); SYMBOL_REF_DECL (ptr_ref) = SYMBOL_REF_DECL (orig); @@ -553,17 +633,17 @@ machopic_indirect_call_target (rtx target) if (GET_CODE (target) != MEM) return target; - if (MACHOPIC_INDIRECT + if (MACHOPIC_INDIRECT && GET_CODE (XEXP (target, 0)) == SYMBOL_REF && !(SYMBOL_REF_FLAGS (XEXP (target, 0)) & MACHO_SYMBOL_FLAG_DEFINED)) { rtx sym_ref = XEXP (target, 0); - const char *stub_name = machopic_indirection_name (sym_ref, + const char *stub_name = machopic_indirection_name (sym_ref, /*stub_p=*/true); enum machine_mode mode = GET_MODE (sym_ref); tree decl = SYMBOL_REF_DECL (sym_ref); - + XEXP (target, 0) = gen_rtx_SYMBOL_REF (mode, stub_name); SYMBOL_REF_DECL (XEXP (target, 0)) = decl; MEM_READONLY_P (target) = 1; @@ -647,7 +727,7 @@ machopic_legitimize_pic_address (rtx orig, enum machine_mode mode, rtx reg) rtx mem; rtx insn; rtx sum; - + sum = gen_rtx_HIGH (Pmode, offset); if (! MACHO_DYNAMIC_NO_PIC_P) sum = gen_rtx_PLUS (Pmode, pic_offset_table_rtx, sum); @@ -655,21 +735,21 @@ machopic_legitimize_pic_address (rtx orig, enum machine_mode mode, rtx reg) emit_insn (gen_rtx_SET (Pmode, hi_sum_reg, sum)); mem = gen_const_mem (GET_MODE (orig), - gen_rtx_LO_SUM (Pmode, + gen_rtx_LO_SUM (Pmode, hi_sum_reg, offset)); insn = emit_insn (gen_rtx_SET (VOIDmode, reg, mem)); - REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_EQUAL, pic_ref, + REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_EQUAL, pic_ref, REG_NOTES (insn)); pic_ref = reg; #else emit_insn (gen_rtx_USE (VOIDmode, - gen_rtx_REG (Pmode, + gen_rtx_REG (Pmode, PIC_OFFSET_TABLE_REGNUM))); emit_insn (gen_rtx_SET (VOIDmode, reg, gen_rtx_HIGH (Pmode, - gen_rtx_CONST (Pmode, + gen_rtx_CONST (Pmode, offset)))); emit_insn (gen_rtx_SET (VOIDmode, reg, gen_rtx_LO_SUM (Pmode, reg, @@ -689,10 +769,12 @@ machopic_legitimize_pic_address (rtx orig, enum machine_mode mode, rtx reg) } #if 0 emit_insn (gen_rtx_USE (VOIDmode, - gen_rtx_REG (Pmode, + gen_rtx_REG (Pmode, PIC_OFFSET_TABLE_REGNUM))); #endif + if (reload_in_progress) + regs_ever_live[REGNO (pic)] = 1; pic_ref = gen_rtx_PLUS (Pmode, pic, gen_pic_offset (XEXP (orig, 0), pic_base)); @@ -727,7 +809,7 @@ machopic_legitimize_pic_address (rtx orig, enum machine_mode mode, rtx reg) ? gen_rtx_HIGH (Pmode, offset) : gen_rtx_PLUS (Pmode, pic_offset_table_rtx, - gen_rtx_HIGH (Pmode, + gen_rtx_HIGH (Pmode, offset)))); emit_insn (gen_rtx_SET (VOIDmode, reg, gen_rtx_LO_SUM (Pmode, @@ -762,6 +844,8 @@ machopic_legitimize_pic_address (rtx orig, enum machine_mode mode, rtx reg) emit_insn (gen_rtx_USE (VOIDmode, pic_offset_table_rtx)); #endif + if (reload_in_progress) + regs_ever_live[REGNO (pic)] = 1; pic_ref = gen_rtx_PLUS (Pmode, pic, gen_pic_offset (orig, pic_base)); @@ -849,18 +933,30 @@ machopic_output_indirection (void **slot, void *data) rtx symbol; const char *sym_name; const char *ptr_name; - + if (!p->used) return 1; symbol = p->symbol; sym_name = XSTR (symbol, 0); ptr_name = p->ptr_name; - + if (p->stub_p) { char *sym; char *stub; + tree id; + + id = maybe_get_identifier (sym_name); + if (id) + { + tree id_orig = id; + + while (IDENTIFIER_TRANSPARENT_ALIAS (id)) + id = TREE_CHAIN (id); + if (id != id_orig) + sym_name = IDENTIFIER_POINTER (id); + } sym = alloca (strlen (sym_name) + 2); if (sym_name[0] == '*' || sym_name[0] == '&') @@ -882,7 +978,7 @@ machopic_output_indirection (void **slot, void *data) && (machopic_symbol_defined_p (symbol) || SYMBOL_REF_LOCAL_P (symbol))) { - data_section (); + switch_to_section (data_section); assemble_align (GET_MODE_ALIGNMENT (Pmode)); assemble_label (ptr_name); assemble_integer (gen_rtx_SYMBOL_REF (Pmode, sym_name), @@ -893,14 +989,14 @@ machopic_output_indirection (void **slot, void *data) { rtx init = const0_rtx; - machopic_nl_symbol_ptr_section (); + switch_to_section (darwin_sections[machopic_nl_symbol_ptr_section]); assemble_name (asm_out_file, ptr_name); fprintf (asm_out_file, ":\n"); - + fprintf (asm_out_file, "\t.indirect_symbol "); assemble_name (asm_out_file, sym_name); fprintf (asm_out_file, "\n"); - + /* Variables that are marked with MACHO_SYMBOL_STATIC need to have their symbol name instead of 0 in the second entry of the non-lazy symbol pointer data structure when they are @@ -915,7 +1011,7 @@ machopic_output_indirection (void **slot, void *data) assemble_integer (init, GET_MODE_SIZE (Pmode), GET_MODE_ALIGNMENT (Pmode), 1); } - + return 1; } @@ -976,6 +1072,7 @@ darwin_encode_section_info (tree decl, rtx rtl, int first ATTRIBUTE_UNUSED) if (!DECL_EXTERNAL (decl) && (!TREE_PUBLIC (decl) || !DECL_WEAK (decl)) + && ! lookup_attribute ("weakref", DECL_ATTRIBUTES (decl)) && ((TREE_STATIC (decl) && (!DECL_COMMON (decl) || !TREE_PUBLIC (decl))) || (!DECL_COMMON (decl) && DECL_INITIAL (decl) @@ -994,38 +1091,36 @@ darwin_mark_decl_preserved (const char *name) fputc ('\n', asm_out_file); } -void +section * machopic_select_section (tree exp, int reloc, unsigned HOST_WIDE_INT align ATTRIBUTE_UNUSED) { - void (*base_function)(void); - bool weak_p = DECL_P (exp) && DECL_WEAK (exp); - static void (* const base_funs[][2])(void) = { - { text_section, text_coal_section }, - { unlikely_text_section, text_unlikely_coal_section }, - { readonly_data_section, const_coal_section }, - { const_data_section, const_data_coal_section }, - { data_section, data_coal_section } - }; - - if (reloc == 0 - && (last_text_section == in_text_unlikely - || last_text_section == in_text_unlikely_coal)) - reloc = 1; - + section *base_section; + bool weak_p = (DECL_P (exp) && DECL_WEAK (exp) + && (lookup_attribute ("weak", DECL_ATTRIBUTES (exp)) + || ! lookup_attribute ("weak_import", + DECL_ATTRIBUTES (exp)))); + if (TREE_CODE (exp) == FUNCTION_DECL) - base_function = base_funs[reloc][weak_p]; + { + if (reloc == 1) + base_section = (weak_p + ? darwin_sections[text_unlikely_coal_section] + : unlikely_text_section ()); + else + base_section = weak_p ? darwin_sections[text_coal_section] : text_section; + } else if (decl_readonly_section_1 (exp, reloc, MACHOPIC_INDIRECT)) - base_function = base_funs[2][weak_p]; + base_section = weak_p ? darwin_sections[const_coal_section] : darwin_sections[const_section]; else if (TREE_READONLY (exp) || TREE_CONSTANT (exp)) - base_function = base_funs[3][weak_p]; + base_section = weak_p ? darwin_sections[const_data_coal_section] : darwin_sections[const_data_section]; else - base_function = base_funs[4][weak_p]; + base_section = weak_p ? darwin_sections[data_coal_section] : data_section; if (TREE_CODE (exp) == STRING_CST && ((size_t) TREE_STRING_LENGTH (exp) == strlen (TREE_STRING_POINTER (exp)) + 1)) - cstring_section (); + return darwin_sections[cstring_section]; else if ((TREE_CODE (exp) == INTEGER_CST || TREE_CODE (exp) == REAL_CST) && flag_merge_constants) { @@ -1034,13 +1129,13 @@ machopic_select_section (tree exp, int reloc, if (TREE_CODE (size) == INTEGER_CST && TREE_INT_CST_LOW (size) == 4 && TREE_INT_CST_HIGH (size) == 0) - literal4_section (); + return darwin_sections[literal4_section]; else if (TREE_CODE (size) == INTEGER_CST && TREE_INT_CST_LOW (size) == 8 && TREE_INT_CST_HIGH (size) == 0) - literal8_section (); + return darwin_sections[literal8_section]; else - base_function (); + return base_section; } else if (TREE_CODE (exp) == CONSTRUCTOR && TREE_TYPE (exp) @@ -1054,12 +1149,12 @@ machopic_select_section (tree exp, int reloc, if (!strcmp (IDENTIFIER_POINTER (name), "__builtin_ObjCString")) { if (flag_next_runtime) - objc_constant_string_object_section (); + return darwin_sections[objc_constant_string_object_section]; else - objc_string_object_section (); + return darwin_sections[objc_string_object_section]; } else - base_function (); + return base_section; } else if (TREE_CODE (exp) == VAR_DECL && DECL_NAME (exp) && @@ -1070,89 +1165,89 @@ machopic_select_section (tree exp, int reloc, const char *name = IDENTIFIER_POINTER (DECL_NAME (exp)); if (!strncmp (name, "_OBJC_CLASS_METHODS_", 20)) - objc_cls_meth_section (); + return darwin_sections[objc_cls_meth_section]; else if (!strncmp (name, "_OBJC_INSTANCE_METHODS_", 23)) - objc_inst_meth_section (); + return darwin_sections[objc_inst_meth_section]; else if (!strncmp (name, "_OBJC_CATEGORY_CLASS_METHODS_", 20)) - objc_cat_cls_meth_section (); + return darwin_sections[objc_cat_cls_meth_section]; else if (!strncmp (name, "_OBJC_CATEGORY_INSTANCE_METHODS_", 23)) - objc_cat_inst_meth_section (); + return darwin_sections[objc_cat_inst_meth_section]; else if (!strncmp (name, "_OBJC_CLASS_VARIABLES_", 22)) - objc_class_vars_section (); + return darwin_sections[objc_class_vars_section]; else if (!strncmp (name, "_OBJC_INSTANCE_VARIABLES_", 25)) - objc_instance_vars_section (); + return darwin_sections[objc_instance_vars_section]; else if (!strncmp (name, "_OBJC_CLASS_PROTOCOLS_", 22)) - objc_cat_cls_meth_section (); + return darwin_sections[objc_cat_cls_meth_section]; else if (!strncmp (name, "_OBJC_CLASS_NAME_", 17)) - objc_class_names_section (); + return darwin_sections[objc_class_names_section]; else if (!strncmp (name, "_OBJC_METH_VAR_NAME_", 20)) - objc_meth_var_names_section (); + return darwin_sections[objc_meth_var_names_section]; else if (!strncmp (name, "_OBJC_METH_VAR_TYPE_", 20)) - objc_meth_var_types_section (); + return darwin_sections[objc_meth_var_types_section]; else if (!strncmp (name, "_OBJC_CLASS_REFERENCES", 22)) - objc_cls_refs_section (); + return darwin_sections[objc_cls_refs_section]; else if (!strncmp (name, "_OBJC_CLASS_", 12)) - objc_class_section (); + return darwin_sections[objc_class_section]; else if (!strncmp (name, "_OBJC_METACLASS_", 16)) - objc_meta_class_section (); + return darwin_sections[objc_meta_class_section]; else if (!strncmp (name, "_OBJC_CATEGORY_", 15)) - objc_category_section (); + return darwin_sections[objc_category_section]; else if (!strncmp (name, "_OBJC_SELECTOR_REFERENCES", 25)) - objc_selector_refs_section (); + return darwin_sections[objc_selector_refs_section]; else if (!strncmp (name, "_OBJC_SELECTOR_FIXUP", 20)) - objc_selector_fixup_section (); + return darwin_sections[objc_selector_fixup_section]; else if (!strncmp (name, "_OBJC_SYMBOLS", 13)) - objc_symbols_section (); + return darwin_sections[objc_symbols_section]; else if (!strncmp (name, "_OBJC_MODULES", 13)) - objc_module_info_section (); + return darwin_sections[objc_module_info_section]; else if (!strncmp (name, "_OBJC_IMAGE_INFO", 16)) - objc_image_info_section (); + return darwin_sections[objc_image_info_section]; else if (!strncmp (name, "_OBJC_PROTOCOL_INSTANCE_METHODS_", 32)) - objc_cat_inst_meth_section (); + return darwin_sections[objc_cat_inst_meth_section]; else if (!strncmp (name, "_OBJC_PROTOCOL_CLASS_METHODS_", 29)) - objc_cat_cls_meth_section (); + return darwin_sections[objc_cat_cls_meth_section]; else if (!strncmp (name, "_OBJC_PROTOCOL_REFS_", 20)) - objc_cat_cls_meth_section (); + return darwin_sections[objc_cat_cls_meth_section]; else if (!strncmp (name, "_OBJC_PROTOCOL_", 15)) - objc_protocol_section (); + return darwin_sections[objc_protocol_section]; else - base_function (); + return base_section; } else - base_function (); + return base_section; } /* This can be called with address expressions as "rtx". They must go in "const". */ -void +section * machopic_select_rtx_section (enum machine_mode mode, rtx x, unsigned HOST_WIDE_INT align ATTRIBUTE_UNUSED) { if (GET_MODE_SIZE (mode) == 8 && (GET_CODE (x) == CONST_INT || GET_CODE (x) == CONST_DOUBLE)) - literal8_section (); + return darwin_sections[literal8_section]; else if (GET_MODE_SIZE (mode) == 4 && (GET_CODE (x) == CONST_INT || GET_CODE (x) == CONST_DOUBLE)) - literal4_section (); + return darwin_sections[literal4_section]; else if (MACHOPIC_INDIRECT && (GET_CODE (x) == SYMBOL_REF || GET_CODE (x) == CONST || GET_CODE (x) == LABEL_REF)) - const_data_section (); + return darwin_sections[const_data_section]; else - const_section (); + return darwin_sections[const_section]; } void machopic_asm_out_constructor (rtx symbol, int priority ATTRIBUTE_UNUSED) { if (MACHOPIC_INDIRECT) - mod_init_section (); + switch_to_section (darwin_sections[mod_init_section]); else - constructor_section (); + switch_to_section (darwin_sections[constructor_section]); assemble_align (POINTER_SIZE); assemble_integer (symbol, POINTER_SIZE / BITS_PER_UNIT, POINTER_SIZE, 1); @@ -1164,9 +1259,9 @@ void machopic_asm_out_destructor (rtx symbol, int priority ATTRIBUTE_UNUSED) { if (MACHOPIC_INDIRECT) - mod_term_section (); + switch_to_section (darwin_sections[mod_term_section]); else - destructor_section (); + switch_to_section (darwin_sections[destructor_section]); assemble_align (POINTER_SIZE); assemble_integer (symbol, POINTER_SIZE / BITS_PER_UNIT, POINTER_SIZE, 1); @@ -1182,14 +1277,14 @@ darwin_globalize_label (FILE *stream, const char *name) } void -darwin_asm_named_section (const char *name, +darwin_asm_named_section (const char *name, unsigned int flags ATTRIBUTE_UNUSED, tree decl ATTRIBUTE_UNUSED) { fprintf (asm_out_file, "\t.section %s\n", name); } -void +void darwin_unique_section (tree decl ATTRIBUTE_UNUSED, int reloc ATTRIBUTE_UNUSED) { /* Darwin does not use unique sections. */ @@ -1222,12 +1317,12 @@ no_dead_strip (FILE *file, const char *lab) fprintf (file, ".no_dead_strip %s\n", lab); } -/* Emit a label for an FDE, making it global and/or weak if appropriate. +/* Emit a label for an FDE, making it global and/or weak if appropriate. The third parameter is nonzero if this is for exception handling. The fourth parameter is nonzero if this is just a placeholder for an FDE that we are omitting. */ -void +void darwin_emit_unwind_label (FILE *file, tree decl, int for_eh, int empty) { tree id = DECL_ASSEMBLER_NAME (decl) @@ -1286,7 +1381,18 @@ darwin_emit_unwind_label (FILE *file, tree decl, int for_eh, int empty) free (lab); } -/* Generate a PC-relative reference to a Mach-O non-lazy-symbol. */ +static GTY(()) unsigned long except_table_label_num; + +void +darwin_emit_except_table_label (FILE *file) +{ + char section_start_label[30]; + + ASM_GENERATE_INTERNAL_LABEL (section_start_label, "GCC_except_table", + except_table_label_num++); + ASM_OUTPUT_LABEL (file, section_start_label); +} +/* Generate a PC-relative reference to a Mach-O non-lazy-symbol. */ void darwin_non_lazy_pcrel (FILE *file, rtx addr) @@ -1307,7 +1413,7 @@ darwin_non_lazy_pcrel (FILE *file, rtx addr) extern". There is no MACH-O equivalent of ELF's VISIBILITY_INTERNAL or VISIBILITY_PROTECTED. */ -void +void darwin_assemble_visibility (tree decl, int vis) { if (vis == VISIBILITY_DEFAULT) @@ -1358,8 +1464,8 @@ darwin_file_end (void) machopic_finish (asm_out_file); if (strcmp (lang_hooks.name, "GNU C++") == 0) { - constructor_section (); - destructor_section (); + switch_to_section (darwin_sections[constructor_section]); + switch_to_section (darwin_sections[destructor_section]); ASM_OUTPUT_ALIGN (asm_out_file, 1); } fprintf (asm_out_file, "\t.subsections_via_symbols\n"); diff --git a/gcc/config/darwin.h b/gcc/config/darwin.h index a78d1d33b07..70481bbea4c 100644 --- a/gcc/config/darwin.h +++ b/gcc/config/darwin.h @@ -123,7 +123,7 @@ Boston, MA 02110-1301, USA. */ { "-segs_read_only_addr", "-Zsegs_read_only_addr" }, \ { "-segs_read_write_addr", "-Zsegs_read_write_addr" }, \ { "-seg_addr_table", "-Zseg_addr_table" }, \ - { "-seg_addr_table_filename", "-Zseg_addr_table_filename" }, \ + { "-seg_addr_table_filename", "-Zfn_seg_addr_table_filename" }, \ { "-filelist", "-Xlinker -filelist -Xlinker" }, \ { "-framework", "-Xlinker -framework -Xlinker" }, \ { "-flat_namespace", "-Zflat_namespace" }, \ @@ -167,7 +167,7 @@ Boston, MA 02110-1301, USA. */ !strcmp (STR, "Zsegs_read_only_addr") ? 1 : \ !strcmp (STR, "Zsegs_read_write_addr") ? 1 : \ !strcmp (STR, "Zseg_addr_table") ? 1 : \ - !strcmp (STR, "Zseg_addr_table_filename") ?1 :\ + !strcmp (STR, "Zfn_seg_addr_table_filename") ? 1 :\ !strcmp (STR, "seg1addr") ? 1 : \ !strcmp (STR, "segprot") ? 3 : \ !strcmp (STR, "sub_library") ? 1 : \ @@ -272,7 +272,7 @@ Boston, MA 02110-1301, USA. */ %{Zsegs_read_only_addr*:-segs_read_only_addr %*} \ %{Zsegs_read_write_addr*:-segs_read_write_addr %*} \ %{Zseg_addr_table*: -seg_addr_table %*} \ - %{Zseg_addr_table_filename*:-seg_addr_table_filename %*} \ + %{Zfn_seg_addr_table_filename*:-seg_addr_table_filename %*} \ %{sub_library*} %{sub_umbrella*} \ %{isysroot*:-syslibroot %*} \ %{twolevel_namespace} %{twolevel_namespace_hints} \ @@ -303,8 +303,8 @@ Boston, MA 02110-1301, USA. */ be in a new format, or the fallback routine might be changed; if you want to explicitly link against the static version of those routines, because you know you don't need to unwind through system - libraries, you need to explicitly say -static-libgcc. - + libraries, you need to explicitly say -static-libgcc. + If it is linked against, it has to be before -lgcc, because it may need symbols from -lgcc. */ #undef REAL_LIBGCC_SPEC @@ -317,7 +317,7 @@ Boston, MA 02110-1301, USA. */ :%:version-compare(>< 10.3.9 10.5 mmacosx-version-min= -lgcc_s.10.4) \ %:version-compare(>= 10.5 mmacosx-version-min= -lgcc_s.10.5) \ -lgcc}" - + /* We specify crt0.o as -lcrt0.o so that ld will search the library path. */ #undef STARTFILE_SPEC @@ -419,6 +419,10 @@ Boston, MA 02110-1301, USA. */ #undef TARGET_WEAK_NOT_IN_ARCHIVE_TOC #define TARGET_WEAK_NOT_IN_ARCHIVE_TOC 1 +/* On Darwin, we don't (at the time of writing) have linkonce sections + with names, so it's safe to make the class data not comdat. */ +#define TARGET_CXX_CLASS_DATA_ALWAYS_COMDAT hook_bool_void_false + /* We make exception information linkonce. */ #undef TARGET_USES_WEAK_UNWIND_INFO #define TARGET_USES_WEAK_UNWIND_INFO 1 @@ -432,6 +436,9 @@ Boston, MA 02110-1301, USA. */ emit a label for an empty FDE. */ #define TARGET_ASM_EMIT_UNWIND_LABEL darwin_emit_unwind_label +/* Emit a label to separate the exception table. */ +#define TARGET_ASM_EMIT_EXCEPT_TABLE_LABEL darwin_emit_except_table_label + /* Our profiling scheme doesn't LP labels and counter words. */ #define NO_PROFILE_COUNTERS 1 @@ -605,233 +612,16 @@ Boston, MA 02110-1301, USA. */ #undef MAX_OFILE_ALIGNMENT #define MAX_OFILE_ALIGNMENT 0x8000 -/* Create new Mach-O sections. */ - -#undef SECTION_FUNCTION -#define SECTION_FUNCTION(FUNCTION, SECTION, DIRECTIVE, OBJC) \ -extern void FUNCTION (void); \ -void \ -FUNCTION (void) \ -{ \ - if (in_section != SECTION) \ - { \ - if (OBJC) \ - objc_section_init (); \ - if (asm_out_file) \ - fputs ("\t" DIRECTIVE "\n", asm_out_file); \ - in_section = SECTION; \ - if ((SECTION == in_text_coal) \ - || (SECTION == in_text_unlikely) \ - || (SECTION == in_text_unlikely_coal)) \ - last_text_section = SECTION; \ - } \ -} \ - -/* Darwin uses many types of special sections. */ - -#undef EXTRA_SECTIONS -#define EXTRA_SECTIONS \ - in_text_coal, in_text_unlikely, in_text_unlikely_coal, \ - in_const, in_const_data, in_cstring, in_literal4, in_literal8, \ - in_const_coal, in_const_data_coal, in_data_coal, \ - in_constructor, in_destructor, in_mod_init, in_mod_term, \ - in_objc_class, in_objc_meta_class, in_objc_category, \ - in_objc_class_vars, in_objc_instance_vars, \ - in_objc_cls_meth, in_objc_inst_meth, \ - in_objc_cat_cls_meth, in_objc_cat_inst_meth, \ - in_objc_selector_refs, \ - in_objc_selector_fixup, \ - in_objc_symbols, in_objc_module_info, \ - in_objc_protocol, in_objc_string_object, \ - in_objc_constant_string_object, \ - in_objc_image_info, \ - in_objc_class_names, in_objc_meth_var_names, \ - in_objc_meth_var_types, in_objc_cls_refs, \ - in_machopic_nl_symbol_ptr, \ - in_machopic_lazy_symbol_ptr, \ - in_machopic_symbol_stub, \ - in_machopic_symbol_stub1, \ - in_machopic_picsymbol_stub, \ - in_machopic_picsymbol_stub1, \ - in_darwin_exception, in_darwin_eh_frame, \ - num_sections - -#undef EXTRA_SECTION_FUNCTIONS -#define EXTRA_SECTION_FUNCTIONS \ -static void objc_section_init (void); \ -SECTION_FUNCTION (text_coal_section, \ - in_text_coal, \ - ".section __TEXT,__textcoal_nt,coalesced," \ - "pure_instructions", 0) \ -SECTION_FUNCTION (text_unlikely_coal_section, \ - in_text_unlikely_coal, \ - ".section __TEXT,__text_unlikely_coal," \ - "coalesced,pure_instructions", 0) \ -SECTION_FUNCTION (const_section, \ - in_const, \ - ".const", 0) \ -SECTION_FUNCTION (const_coal_section, \ - in_const_coal, \ - ".section __TEXT,__const_coal,coalesced", 0) \ -SECTION_FUNCTION (const_data_section, \ - in_const_data, \ - ".const_data", 0) \ -SECTION_FUNCTION (const_data_coal_section, \ - in_const_data_coal, \ - ".section __DATA,__const_coal,coalesced", 0) \ -SECTION_FUNCTION (data_coal_section, \ - in_data_coal, \ - ".section __DATA,__datacoal_nt,coalesced", 0) \ -SECTION_FUNCTION (cstring_section, \ - in_cstring, \ - ".cstring", 0) \ -SECTION_FUNCTION (literal4_section, \ - in_literal4, \ - ".literal4", 0) \ -SECTION_FUNCTION (literal8_section, \ - in_literal8, \ - ".literal8", 0) \ -SECTION_FUNCTION (constructor_section, \ - in_constructor, \ - ".constructor", 0) \ -SECTION_FUNCTION (mod_init_section, \ - in_mod_init, \ - ".mod_init_func", 0) \ -SECTION_FUNCTION (mod_term_section, \ - in_mod_term, \ - ".mod_term_func", 0) \ -SECTION_FUNCTION (destructor_section, \ - in_destructor, \ - ".destructor", 0) \ -SECTION_FUNCTION (objc_class_section, \ - in_objc_class, \ - ".objc_class", 1) \ -SECTION_FUNCTION (objc_meta_class_section, \ - in_objc_meta_class, \ - ".objc_meta_class", 1) \ -SECTION_FUNCTION (objc_category_section, \ - in_objc_category, \ - ".objc_category", 1) \ -SECTION_FUNCTION (objc_class_vars_section, \ - in_objc_class_vars, \ - ".objc_class_vars", 1) \ -SECTION_FUNCTION (objc_instance_vars_section, \ - in_objc_instance_vars, \ - ".objc_instance_vars", 1) \ -SECTION_FUNCTION (objc_cls_meth_section, \ - in_objc_cls_meth, \ - ".objc_cls_meth", 1) \ -SECTION_FUNCTION (objc_inst_meth_section, \ - in_objc_inst_meth, \ - ".objc_inst_meth", 1) \ -SECTION_FUNCTION (objc_cat_cls_meth_section, \ - in_objc_cat_cls_meth, \ - ".objc_cat_cls_meth", 1) \ -SECTION_FUNCTION (objc_cat_inst_meth_section, \ - in_objc_cat_inst_meth, \ - ".objc_cat_inst_meth", 1) \ -SECTION_FUNCTION (objc_selector_refs_section, \ - in_objc_selector_refs, \ - ".objc_message_refs", 1) \ -SECTION_FUNCTION (objc_selector_fixup_section, \ - in_objc_selector_fixup, \ - ".section __OBJC, __sel_fixup, regular, no_dead_strip", 1) \ -SECTION_FUNCTION (objc_symbols_section, \ - in_objc_symbols, \ - ".objc_symbols", 1) \ -SECTION_FUNCTION (objc_module_info_section, \ - in_objc_module_info, \ - ".objc_module_info", 1) \ -SECTION_FUNCTION (objc_protocol_section, \ - in_objc_protocol, \ - ".objc_protocol", 1) \ -SECTION_FUNCTION (objc_string_object_section, \ - in_objc_string_object, \ - ".objc_string_object", 1) \ -SECTION_FUNCTION (objc_constant_string_object_section, \ - in_objc_constant_string_object, \ - ".section __OBJC, __cstring_object, regular, " \ - "no_dead_strip", 1) \ -/* Fix-and-Continue image marker. */ \ -SECTION_FUNCTION (objc_image_info_section, \ - in_objc_image_info, \ - ".section __OBJC, __image_info, regular, " \ - "no_dead_strip", 1) \ -SECTION_FUNCTION (objc_class_names_section, \ - in_objc_class_names, \ - ".objc_class_names", 1) \ -SECTION_FUNCTION (objc_meth_var_names_section, \ - in_objc_meth_var_names, \ - ".objc_meth_var_names", 1) \ -SECTION_FUNCTION (objc_meth_var_types_section, \ - in_objc_meth_var_types, \ - ".objc_meth_var_types", 1) \ -SECTION_FUNCTION (objc_cls_refs_section, \ - in_objc_cls_refs, \ - ".objc_cls_refs", 1) \ -\ -SECTION_FUNCTION (machopic_lazy_symbol_ptr_section, \ - in_machopic_lazy_symbol_ptr, \ - ".lazy_symbol_pointer", 0) \ -SECTION_FUNCTION (machopic_nl_symbol_ptr_section, \ - in_machopic_nl_symbol_ptr, \ - ".non_lazy_symbol_pointer", 0) \ -SECTION_FUNCTION (machopic_symbol_stub_section, \ - in_machopic_symbol_stub, \ - ".symbol_stub", 0) \ -SECTION_FUNCTION (machopic_symbol_stub1_section, \ - in_machopic_symbol_stub1, \ - ".section __TEXT,__symbol_stub1,symbol_stubs," \ - "pure_instructions,16", 0) \ -SECTION_FUNCTION (machopic_picsymbol_stub_section, \ - in_machopic_picsymbol_stub, \ - ".picsymbol_stub", 0) \ -SECTION_FUNCTION (machopic_picsymbol_stub1_section, \ - in_machopic_picsymbol_stub1, \ - ".section __TEXT,__picsymbolstub1,symbol_stubs," \ - "pure_instructions,32", 0) \ -SECTION_FUNCTION (darwin_exception_section, \ - in_darwin_exception, \ - ".section __DATA,__gcc_except_tab", 0) \ -SECTION_FUNCTION (darwin_eh_frame_section, \ - in_darwin_eh_frame, \ - ".section " EH_FRAME_SECTION_NAME ",__eh_frame" \ - EH_FRAME_SECTION_ATTR, 0) \ -\ -static void \ -objc_section_init (void) \ -{ \ - static int been_here = 0; \ - \ - if (been_here == 0) \ - { \ - been_here = 1; \ - /* written, cold -> hot */ \ - objc_cat_cls_meth_section (); \ - objc_cat_inst_meth_section (); \ - objc_string_object_section (); \ - objc_constant_string_object_section (); \ - objc_selector_refs_section (); \ - objc_selector_fixup_section (); \ - objc_cls_refs_section (); \ - objc_class_section (); \ - objc_meta_class_section (); \ - /* shared, hot -> cold */ \ - objc_cls_meth_section (); \ - objc_inst_meth_section (); \ - objc_protocol_section (); \ - objc_class_names_section (); \ - objc_meth_var_types_section (); \ - objc_meth_var_names_section (); \ - objc_category_section (); \ - objc_class_vars_section (); \ - objc_instance_vars_section (); \ - objc_module_info_section (); \ - objc_symbols_section (); \ - } \ -} - -#define READONLY_DATA_SECTION const_section +/* Declare the section variables. */ +#ifndef USED_FOR_TARGET +enum darwin_section_enum { +#define DEF_SECTION(NAME, FLAGS, DIRECTIVE, OBJC) NAME, +#include "darwin-sections.def" +#undef DEF_SECTION + NUM_DARWIN_SECTIONS +}; +extern GTY(()) section * darwin_sections[NUM_DARWIN_SECTIONS]; +#endif #undef TARGET_ASM_SELECT_SECTION #define TARGET_ASM_SELECT_SECTION machopic_select_section @@ -982,10 +772,6 @@ enum machopic_addr_class { } \ } while (0) -#define TARGET_ASM_EXCEPTION_SECTION darwin_exception_section - -#define TARGET_ASM_EH_FRAME_SECTION darwin_eh_frame_section - #define EH_FRAME_SECTION_NAME "__TEXT" #define EH_FRAME_SECTION_ATTR ",coalesced,no_toc+strip_static_syms+live_support" @@ -1016,6 +802,7 @@ enum machopic_addr_class { #define TARGET_TERMINATE_DW2_EH_FRAME_INFO false +#define TARGET_ASM_INIT_SECTIONS darwin_init_sections #undef TARGET_ASM_NAMED_SECTION #define TARGET_ASM_NAMED_SECTION darwin_asm_named_section diff --git a/gcc/config/floatunsidf.c b/gcc/config/floatunsidf.c new file mode 100644 index 00000000000..ff28112502b --- /dev/null +++ b/gcc/config/floatunsidf.c @@ -0,0 +1,15 @@ +/* Public domain. */ +typedef int SItype __attribute__ ((mode (SI))); +typedef unsigned int USItype __attribute__ ((mode (SI))); +typedef float DFtype __attribute__ ((mode (DF))); + +DFtype +__floatunsidf (USItype u) +{ + SItype s = (SItype) u; + DFtype r = (DFtype) s; + if (s < 0) + r += (DFtype)2.0 * (DFtype) ((USItype) 1 + << (sizeof (USItype) * __CHAR_BIT__ - 1)); + return r; +} diff --git a/gcc/config/floatunsisf.c b/gcc/config/floatunsisf.c new file mode 100644 index 00000000000..11d4aa78cbe --- /dev/null +++ b/gcc/config/floatunsisf.c @@ -0,0 +1,18 @@ +/* Public domain. */ +typedef int SItype __attribute__ ((mode (SI))); +typedef unsigned int USItype __attribute__ ((mode (SI))); +typedef float SFtype __attribute__ ((mode (SF))); + +SFtype +__floatunsisf (USItype u) +{ + SItype s = (SItype) u; + if (s < 0) + { + /* As in expand_float, compute (u & 1) | (u >> 1) to ensure + correct rounding if a nonzero bit is shifted out. */ + return (SFtype) 2.0 * (SFtype) (SItype) ((u & 1) | (u >> 1)); + } + else + return (SFtype) s; +} diff --git a/gcc/config/floatunsitf.c b/gcc/config/floatunsitf.c new file mode 100644 index 00000000000..955d67666c5 --- /dev/null +++ b/gcc/config/floatunsitf.c @@ -0,0 +1,15 @@ +/* Public domain. */ +typedef int SItype __attribute__ ((mode (SI))); +typedef unsigned int USItype __attribute__ ((mode (SI))); +typedef float TFtype __attribute__ ((mode (TF))); + +TFtype +__floatunsitf (USItype u) +{ + SItype s = (SItype) u; + TFtype r = (TFtype) s; + if (s < 0) + r += (TFtype)2.0 * (TFtype) ((USItype) 1 + << (sizeof (USItype) * __CHAR_BIT__ - 1)); + return r; +} diff --git a/gcc/config/floatunsixf.c b/gcc/config/floatunsixf.c new file mode 100644 index 00000000000..52511688dad --- /dev/null +++ b/gcc/config/floatunsixf.c @@ -0,0 +1,15 @@ +/* Public domain. */ +typedef int SItype __attribute__ ((mode (SI))); +typedef unsigned int USItype __attribute__ ((mode (SI))); +typedef float XFtype __attribute__ ((mode (XF))); + +XFtype +__floatunsixf (USItype u) +{ + SItype s = (SItype) u; + XFtype r = (XFtype) s; + if (s < 0) + r += (XFtype)2.0 * (XFtype) ((USItype) 1 + << (sizeof (USItype) * __CHAR_BIT__ - 1)); + return r; +} diff --git a/gcc/config/fp-bit.c b/gcc/config/fp-bit.c index ccf927e8c3b..bdf04ffd312 100644 --- a/gcc/config/fp-bit.c +++ b/gcc/config/fp-bit.c @@ -3,35 +3,31 @@ Copyright (C) 1994, 1995, 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005 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. +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 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. +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 this program; see the file COPYING. If not, write to -the Free Software Foundation, 51 Franklin Street, Fifth Floor, -Boston, MA 02110-1301, 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. */ +along with GCC; see the file COPYING. If not, write to the Free +Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301, USA. */ /* This implements IEEE 754 format arithmetic, but does not provide a mechanism for setting the rounding mode, or for generating or handling @@ -160,14 +156,15 @@ INLINE static int isnan ( fp_number_type * x) { - return x->class == CLASS_SNAN || x->class == CLASS_QNAN; + return __builtin_expect (x->class == CLASS_SNAN || x->class == CLASS_QNAN, + 0); } INLINE static int isinf ( fp_number_type * x) { - return x->class == CLASS_INFINITY; + return __builtin_expect (x->class == CLASS_INFINITY, 0); } #endif /* NO_NANS */ @@ -249,7 +246,7 @@ pack_d ( fp_number_type * src) } else { - if (src->normal_exp < NORMAL_EXPMIN) + if (__builtin_expect (src->normal_exp < NORMAL_EXPMIN, 0)) { #ifdef NO_DENORMALS /* Go straight to a zero representation if denormals are not @@ -296,7 +293,7 @@ pack_d ( fp_number_type * src) #endif /* NO_DENORMALS */ } else if (!LARGEST_EXPONENT_IS_NORMAL (FRAC_NBITS) - && src->normal_exp > EXPBIAS) + && __builtin_expect (src->normal_exp > EXPBIAS, 0)) { exp = EXPMAX; fraction = 0; @@ -560,7 +557,8 @@ unpack_d (FLO_union_type * src, fp_number_type * dst) dst->fraction.ll = fraction; } } - else if (!LARGEST_EXPONENT_IS_NORMAL (FRAC_NBITS) && exp == EXPMAX) + else if (!LARGEST_EXPONENT_IS_NORMAL (FRAC_NBITS) + && __builtin_expect (exp == EXPMAX, 0)) { /* Huge exponent*/ if (fraction == 0) @@ -649,6 +647,7 @@ _fpadd_parts (fp_number_type * a, they're the same */ { int diff; + int sdiff; a_normal_exp = a->normal_exp; b_normal_exp = b->normal_exp; @@ -656,21 +655,21 @@ _fpadd_parts (fp_number_type * a, b_fraction = b->fraction.ll; diff = a_normal_exp - b_normal_exp; + sdiff = diff; if (diff < 0) diff = -diff; if (diff < FRAC_NBITS) { - /* ??? This does shifts one bit at a time. Optimize. */ - while (a_normal_exp > b_normal_exp) + if (sdiff > 0) { - b_normal_exp++; - LSHIFT (b_fraction); + b_normal_exp += diff; + LSHIFT (b_fraction, diff); } - while (b_normal_exp > a_normal_exp) + else if (sdiff < 0) { - a_normal_exp++; - LSHIFT (a_fraction); + a_normal_exp += diff; + LSHIFT (a_fraction, diff); } } else @@ -731,7 +730,7 @@ _fpadd_parts (fp_number_type * a, if (tmp->fraction.ll >= IMPLICIT_2) { - LSHIFT (tmp->fraction.ll); + LSHIFT (tmp->fraction.ll, 1); tmp->normal_exp++; } return tmp; diff --git a/gcc/config/fp-bit.h b/gcc/config/fp-bit.h index 3f7a0dfb315..373b659e6a5 100644 --- a/gcc/config/fp-bit.h +++ b/gcc/config/fp-bit.h @@ -3,27 +3,29 @@ 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. +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, 51 Franklin Street, Fifth Floor, -Boston, MA 02110-1301, 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. */ +along with GCC; see the file COPYING. If not, write to the Free +Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301, USA. */ #ifndef GCC_FP_BIT_H #define GCC_FP_BIT_H @@ -318,7 +320,7 @@ typedef unsigned int UTItype __attribute__ ((mode (TI))); #endif /* Preserve the sticky-bit when shifting fractions to the right. */ -#define LSHIFT(a) { a = (a & 1) | (a >> 1); } +#define LSHIFT(a, s) { a = (a >> s) | !!(a & (((fractype) 1 << s) - 1)); } /* numeric parameters */ /* F_D_BITOFF is the number of bits offset between the MSB of the mantissa diff --git a/gcc/config/freebsd-spec.h b/gcc/config/freebsd-spec.h index f60e94f3aed..b3f18e20b65 100644 --- a/gcc/config/freebsd-spec.h +++ b/gcc/config/freebsd-spec.h @@ -51,22 +51,7 @@ Boston, MA 02110-1301, USA. */ #define FBSD_TARGET_OS_CPP_BUILTINS() \ do \ { \ - if (FBSD_MAJOR == 9) \ - builtin_define ("__FreeBSD__=9"); \ - else if (FBSD_MAJOR == 8) \ - builtin_define ("__FreeBSD__=8"); \ - if (FBSD_MAJOR == 7) \ - builtin_define ("__FreeBSD__=7"); \ - else if (FBSD_MAJOR == 6) \ - builtin_define ("__FreeBSD__=6"); \ - else if (FBSD_MAJOR == 5) \ - builtin_define ("__FreeBSD__=5"); \ - else if (FBSD_MAJOR == 4) \ - builtin_define ("__FreeBSD__=4"); \ - else if (FBSD_MAJOR == 3) \ - builtin_define ("__FreeBSD__=3"); \ - else \ - builtin_define ("__FreeBSD__"); \ + builtin_define_with_int_value ("__FreeBSD__", FBSD_MAJOR); \ builtin_define_std ("unix"); \ builtin_define ("__KPRINTF_ATTRIBUTE__"); \ builtin_assert ("system=unix"); \ diff --git a/gcc/config/frv/frv-protos.h b/gcc/config/frv/frv-protos.h index b176ddf32c6..91f203394a6 100644 --- a/gcc/config/frv/frv-protos.h +++ b/gcc/config/frv/frv-protos.h @@ -128,11 +128,6 @@ extern int frv_acc_group (rtx); 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); diff --git a/gcc/config/frv/frv.c b/gcc/config/frv/frv.c index 0731302618b..82b7cbfd8c2 100644 --- a/gcc/config/frv/frv.c +++ b/gcc/config/frv/frv.c @@ -2203,8 +2203,8 @@ frv_expand_builtin_va_start (tree valist, rtx nextarg) debug_rtx (nextarg); } - t = build (MODIFY_EXPR, TREE_TYPE (valist), valist, - make_tree (ptr_type_node, nextarg)); + t = build2 (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); @@ -9542,7 +9542,7 @@ frv_rtx_costs (rtx x, static void frv_asm_out_constructor (rtx symbol, int priority ATTRIBUTE_UNUSED) { - ctors_section (); + switch_to_section (ctors_section); assemble_align (POINTER_SIZE); if (TARGET_FDPIC) { @@ -9557,7 +9557,7 @@ frv_asm_out_constructor (rtx symbol, int priority ATTRIBUTE_UNUSED) static void frv_asm_out_destructor (rtx symbol, int priority ATTRIBUTE_UNUSED) { - dtors_section (); + switch_to_section (dtors_section); assemble_align (POINTER_SIZE); if (TARGET_FDPIC) { diff --git a/gcc/config/frv/frv.h b/gcc/config/frv/frv.h index d5586c06493..9c1c1e2d39f 100644 --- a/gcc/config/frv/frv.h +++ b/gcc/config/frv/frv.h @@ -1808,7 +1808,7 @@ typedef struct frv_stack { /* How Large Values are Returned. */ -/* The number of the register that is used to to pass the structure +/* The number of the register that is used to pass the structure value address. */ #define FRV_STRUCT_VALUE_REGNUM (GPR_FIRST + 3) @@ -2272,43 +2272,6 @@ do { \ 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. */ @@ -2394,9 +2357,9 @@ extern int size_directive_output; #define ASM_OUTPUT_ALIGNED_DECL_LOCAL(STREAM, DECL, NAME, SIZE, ALIGN) \ do { \ if ((SIZE) > 0 && (SIZE) <= g_switch_value) \ - named_section (0, ".sbss", 0); \ + switch_to_section (get_named_section (NULL, ".sbss", 0)); \ else \ - bss_section (); \ + switch_to_section (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); \ @@ -2652,8 +2615,8 @@ fprintf (STREAM, "\t.word .L%d\n", VALUE) #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); \ + switch_to_section (function_section (current_function_decl)); \ + (*targetm.asm_out.internal_label) (STREAM, PREFIX, NUM); \ } while (0) diff --git a/gcc/config/h8300/h8300.md b/gcc/config/h8300/h8300.md index 6f71dc984e0..65fea7e13e0 100644 --- a/gcc/config/h8300/h8300.md +++ b/gcc/config/h8300/h8300.md @@ -2775,7 +2775,7 @@ [(set_attr "length" "8,12")]) ;; The following pattern is needed because without the pattern, the -;; combiner would split (sign_extend:SI (reg:QI)) into into two 24-bit +;; combiner would split (sign_extend:SI (reg:QI)) into two 24-bit ;; shifts, one ashift and one ashiftrt. (define_insn_and_split "*extendqisi2_h8300hs" diff --git a/gcc/config/i386/cygming.h b/gcc/config/i386/cygming.h index 4005f1d8e63..bb02b7b8d49 100644 --- a/gcc/config/i386/cygming.h +++ b/gcc/config/i386/cygming.h @@ -108,53 +108,14 @@ Boston, MA 02110-1301, USA. */ union tree_node; #define TREE union tree_node * -#undef EXTRA_SECTIONS -#define EXTRA_SECTIONS in_drectve - -#undef EXTRA_SECTION_FUNCTIONS -#define EXTRA_SECTION_FUNCTIONS \ - DRECTVE_SECTION_FUNCTION \ - SWITCH_TO_SECTION_FUNCTION - -#define DRECTVE_SECTION_FUNCTION \ -void \ -drectve_section (void) \ -{ \ - if (in_section != in_drectve) \ - { \ - fprintf (asm_out_file, "%s\n", "\t.section .drectve\n"); \ - in_section = in_drectve; \ - } \ -} -void drectve_section (void); +#define drectve_section() \ + (fprintf (asm_out_file, "\t.section .drectve\n"), \ + in_section = NULL) /* Older versions of gas don't handle 'r' as data. Explicitly set data flag with 'd'. */ #define READONLY_DATA_SECTION_ASM_OP "\t.section .rdata,\"dr\"" -/* Switch to SECTION (an `enum in_section'). - - ??? This facility should be provided by GCC proper. - The problem is that we want to temporarily switch sections in - ASM_DECLARE_OBJECT_NAME and then switch back to the original section - afterwards. */ -#define SWITCH_TO_SECTION_FUNCTION \ -void switch_to_section (enum in_section, tree); \ -void \ -switch_to_section (enum in_section section, tree decl) \ -{ \ - switch (section) \ - { \ - case in_text: text_section (); break; \ - case in_unlikely_executed_text: unlikely_text_section (); break; \ - case in_data: data_section (); break; \ - case in_readonly_data: readonly_data_section (); break; \ - case in_named: named_section (decl, NULL, 0); break; \ - case in_drectve: drectve_section (); break; \ - default: abort (); break; \ - } \ -} - /* Don't allow flag_pic to propagate since gas may produce invalid code otherwise. */ diff --git a/gcc/config/i386/darwin.h b/gcc/config/i386/darwin.h index 89972339855..a6a953e5de5 100644 --- a/gcc/config/i386/darwin.h +++ b/gcc/config/i386/darwin.h @@ -37,6 +37,9 @@ Boston, MA 02110-1301, USA. */ } \ while (0) +#undef FORCE_PREFERRED_STACK_BOUNDARY_IN_MAIN +#define FORCE_PREFERRED_STACK_BOUNDARY_IN_MAIN (0) + /* We want -fPIC by default, unless we're using -static to compile for the kernel or some such. */ @@ -69,6 +72,10 @@ Boston, MA 02110-1301, USA. */ #define SHIFT_DOUBLE_OMITS_COUNT 0 +extern void darwin_x86_file_end (void); +#undef TARGET_ASM_FILE_END +#define TARGET_ASM_FILE_END darwin_x86_file_end + /* Define the syntax of pseudo-ops, labels and comments. */ /* String containing the assembler's comment-starter. */ @@ -80,16 +87,14 @@ Boston, MA 02110-1301, USA. */ #define TARGET_SUBTARGET_DEFAULT (MASK_80387 | MASK_IEEE_FP | MASK_FLOAT_RETURNS | MASK_128BIT_LONG_DOUBLE | MASK_ALIGN_DOUBLE) -/* TARGET_DEEP_BRANCH_PREDICTION is incompatible with Mach-O PIC. */ - -#undef TARGET_DEEP_BRANCH_PREDICTION -#define TARGET_DEEP_BRANCH_PREDICTION 0 - /* For now, disable dynamic-no-pic. We'll need to go through i386.c with a fine-tooth comb looking for refs to flag_pic! */ #define MASK_MACHO_DYNAMIC_NO_PIC 0 #define TARGET_DYNAMIC_NO_PIC (target_flags & MASK_MACHO_DYNAMIC_NO_PIC) +#undef GOT_SYMBOL_NAME +#define GOT_SYMBOL_NAME (machopic_function_base_name ()) + /* Define the syntax of pseudo-ops, labels and comments. */ #define LPREFIX "L" @@ -106,11 +111,13 @@ Boston, MA 02110-1301, USA. */ #define ASM_LONG "\t.long\t" /* Darwin as doesn't do ".quad". */ +#define SUBTARGET_ENCODE_SECTION_INFO darwin_encode_section_info + #undef ASM_OUTPUT_ALIGN #define ASM_OUTPUT_ALIGN(FILE,LOG) \ do { if ((LOG) != 0) \ { \ - if (in_text_section ()) \ + if (in_section == text_section) \ fprintf (FILE, "\t%s %d,0x90\n", ALIGN_ASM_OP, (LOG)); \ else \ fprintf (FILE, "\t%s %d\n", ALIGN_ASM_OP, (LOG)); \ diff --git a/gcc/config/i386/i386-protos.h b/gcc/config/i386/i386-protos.h index df2ba4e8841..188c9677b77 100644 --- a/gcc/config/i386/i386-protos.h +++ b/gcc/config/i386/i386-protos.h @@ -67,7 +67,7 @@ extern bool output_addr_const_extra (FILE*, rtx); extern void split_di (rtx[], int, rtx[], rtx[]); extern void split_ti (rtx[], int, rtx[], rtx[]); -extern const char *output_set_got (rtx); +extern const char *output_set_got (rtx, rtx); extern const char *output_387_binary_op (rtx, rtx*); extern const char *output_387_reg_move (rtx, rtx*); extern const char *output_fix_trunc (rtx, rtx*, int); diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index fe96fe150ee..288352df723 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -65,15 +65,23 @@ Boston, MA 02110-1301, USA. */ /* Processor costs (relative to an add) */ static const struct processor_costs size_cost = { /* costs for tunning for size */ - 2, /* cost of an add instruction */ - 3, /* cost of a lea instruction */ - 2, /* variable shift costs */ - 3, /* constant shift costs */ - {3, 3, 3, 3, 5}, /* cost of starting a multiply */ + COSTS_N_INSNS (2), /* cost of an add instruction */ + COSTS_N_INSNS (3), /* cost of a lea instruction */ + COSTS_N_INSNS (2), /* variable shift costs */ + COSTS_N_INSNS (3), /* constant shift costs */ + {COSTS_N_INSNS (3), /* cost of starting multiply for QI */ + COSTS_N_INSNS (3), /* HI */ + COSTS_N_INSNS (3), /* SI */ + COSTS_N_INSNS (3), /* DI */ + COSTS_N_INSNS (5)}, /* other */ 0, /* cost of multiply per each bit set */ - {3, 3, 3, 3, 5}, /* cost of a divide/mod */ - 3, /* cost of movsx */ - 3, /* cost of movzx */ + {COSTS_N_INSNS (3), /* cost of a divide/mod for QI */ + COSTS_N_INSNS (3), /* HI */ + COSTS_N_INSNS (3), /* SI */ + COSTS_N_INSNS (3), /* DI */ + COSTS_N_INSNS (5)}, /* other */ + COSTS_N_INSNS (3), /* cost of movsx */ + COSTS_N_INSNS (3), /* cost of movzx */ 0, /* "large" insn */ 2, /* MOVE_RATIO */ 2, /* cost for loading QImode using movzbl */ @@ -99,26 +107,34 @@ struct processor_costs size_cost = { /* costs for tunning for size */ 0, /* size of prefetch block */ 0, /* number of parallel prefetches */ 1, /* Branch cost */ - 2, /* cost of FADD and FSUB insns. */ - 2, /* cost of FMUL instruction. */ - 2, /* cost of FDIV instruction. */ - 2, /* cost of FABS instruction. */ - 2, /* cost of FCHS instruction. */ - 2, /* cost of FSQRT instruction. */ + COSTS_N_INSNS (2), /* cost of FADD and FSUB insns. */ + COSTS_N_INSNS (2), /* cost of FMUL instruction. */ + COSTS_N_INSNS (2), /* cost of FDIV instruction. */ + COSTS_N_INSNS (2), /* cost of FABS instruction. */ + COSTS_N_INSNS (2), /* cost of FCHS instruction. */ + COSTS_N_INSNS (2), /* cost of FSQRT instruction. */ }; /* Processor costs (relative to an add) */ static const struct processor_costs i386_cost = { /* 386 specific costs */ - 1, /* cost of an add instruction */ - 1, /* cost of a lea instruction */ - 3, /* variable shift costs */ - 2, /* constant shift costs */ - {6, 6, 6, 6, 6}, /* cost of starting a multiply */ - 1, /* cost of multiply per each bit set */ - {23, 23, 23, 23, 23}, /* cost of a divide/mod */ - 3, /* cost of movsx */ - 2, /* cost of movzx */ + COSTS_N_INSNS (1), /* cost of an add instruction */ + COSTS_N_INSNS (1), /* cost of a lea instruction */ + COSTS_N_INSNS (3), /* variable shift costs */ + COSTS_N_INSNS (2), /* constant shift costs */ + {COSTS_N_INSNS (6), /* cost of starting multiply for QI */ + COSTS_N_INSNS (6), /* HI */ + COSTS_N_INSNS (6), /* SI */ + COSTS_N_INSNS (6), /* DI */ + COSTS_N_INSNS (6)}, /* other */ + COSTS_N_INSNS (1), /* cost of multiply per each bit set */ + {COSTS_N_INSNS (23), /* cost of a divide/mod for QI */ + COSTS_N_INSNS (23), /* HI */ + COSTS_N_INSNS (23), /* SI */ + COSTS_N_INSNS (23), /* DI */ + COSTS_N_INSNS (23)}, /* other */ + COSTS_N_INSNS (3), /* cost of movsx */ + COSTS_N_INSNS (2), /* cost of movzx */ 15, /* "large" insn */ 3, /* MOVE_RATIO */ 4, /* cost for loading QImode using movzbl */ @@ -144,25 +160,33 @@ struct processor_costs i386_cost = { /* 386 specific costs */ 0, /* size of prefetch block */ 0, /* number of parallel prefetches */ 1, /* Branch cost */ - 23, /* cost of FADD and FSUB insns. */ - 27, /* cost of FMUL instruction. */ - 88, /* cost of FDIV instruction. */ - 22, /* cost of FABS instruction. */ - 24, /* cost of FCHS instruction. */ - 122, /* cost of FSQRT instruction. */ + COSTS_N_INSNS (23), /* cost of FADD and FSUB insns. */ + COSTS_N_INSNS (27), /* cost of FMUL instruction. */ + COSTS_N_INSNS (88), /* cost of FDIV instruction. */ + COSTS_N_INSNS (22), /* cost of FABS instruction. */ + COSTS_N_INSNS (24), /* cost of FCHS instruction. */ + COSTS_N_INSNS (122), /* cost of FSQRT instruction. */ }; static const struct processor_costs i486_cost = { /* 486 specific costs */ - 1, /* cost of an add instruction */ - 1, /* cost of a lea instruction */ - 3, /* variable shift costs */ - 2, /* constant shift costs */ - {12, 12, 12, 12, 12}, /* cost of starting a multiply */ + COSTS_N_INSNS (1), /* cost of an add instruction */ + COSTS_N_INSNS (1), /* cost of a lea instruction */ + COSTS_N_INSNS (3), /* variable shift costs */ + COSTS_N_INSNS (2), /* constant shift costs */ + {COSTS_N_INSNS (12), /* cost of starting multiply for QI */ + COSTS_N_INSNS (12), /* HI */ + COSTS_N_INSNS (12), /* SI */ + COSTS_N_INSNS (12), /* DI */ + COSTS_N_INSNS (12)}, /* other */ 1, /* cost of multiply per each bit set */ - {40, 40, 40, 40, 40}, /* cost of a divide/mod */ - 3, /* cost of movsx */ - 2, /* cost of movzx */ + {COSTS_N_INSNS (40), /* cost of a divide/mod for QI */ + COSTS_N_INSNS (40), /* HI */ + COSTS_N_INSNS (40), /* SI */ + COSTS_N_INSNS (40), /* DI */ + COSTS_N_INSNS (40)}, /* other */ + COSTS_N_INSNS (3), /* cost of movsx */ + COSTS_N_INSNS (2), /* cost of movzx */ 15, /* "large" insn */ 3, /* MOVE_RATIO */ 4, /* cost for loading QImode using movzbl */ @@ -188,25 +212,33 @@ struct processor_costs i486_cost = { /* 486 specific costs */ 0, /* size of prefetch block */ 0, /* number of parallel prefetches */ 1, /* Branch cost */ - 8, /* cost of FADD and FSUB insns. */ - 16, /* cost of FMUL instruction. */ - 73, /* cost of FDIV instruction. */ - 3, /* cost of FABS instruction. */ - 3, /* cost of FCHS instruction. */ - 83, /* cost of FSQRT instruction. */ + COSTS_N_INSNS (8), /* cost of FADD and FSUB insns. */ + COSTS_N_INSNS (16), /* cost of FMUL instruction. */ + COSTS_N_INSNS (73), /* cost of FDIV instruction. */ + COSTS_N_INSNS (3), /* cost of FABS instruction. */ + COSTS_N_INSNS (3), /* cost of FCHS instruction. */ + COSTS_N_INSNS (83), /* cost of FSQRT instruction. */ }; static const struct processor_costs pentium_cost = { - 1, /* cost of an add instruction */ - 1, /* cost of a lea instruction */ - 4, /* variable shift costs */ - 1, /* constant shift costs */ - {11, 11, 11, 11, 11}, /* cost of starting a multiply */ + COSTS_N_INSNS (1), /* cost of an add instruction */ + COSTS_N_INSNS (1), /* cost of a lea instruction */ + COSTS_N_INSNS (4), /* variable shift costs */ + COSTS_N_INSNS (1), /* constant shift costs */ + {COSTS_N_INSNS (11), /* cost of starting multiply for QI */ + COSTS_N_INSNS (11), /* HI */ + COSTS_N_INSNS (11), /* SI */ + COSTS_N_INSNS (11), /* DI */ + COSTS_N_INSNS (11)}, /* other */ 0, /* cost of multiply per each bit set */ - {25, 25, 25, 25, 25}, /* cost of a divide/mod */ - 3, /* cost of movsx */ - 2, /* cost of movzx */ + {COSTS_N_INSNS (25), /* cost of a divide/mod for QI */ + COSTS_N_INSNS (25), /* HI */ + COSTS_N_INSNS (25), /* SI */ + COSTS_N_INSNS (25), /* DI */ + COSTS_N_INSNS (25)}, /* other */ + COSTS_N_INSNS (3), /* cost of movsx */ + COSTS_N_INSNS (2), /* cost of movzx */ 8, /* "large" insn */ 6, /* MOVE_RATIO */ 6, /* cost for loading QImode using movzbl */ @@ -232,25 +264,33 @@ struct processor_costs pentium_cost = { 0, /* size of prefetch block */ 0, /* number of parallel prefetches */ 2, /* Branch cost */ - 3, /* cost of FADD and FSUB insns. */ - 3, /* cost of FMUL instruction. */ - 39, /* cost of FDIV instruction. */ - 1, /* cost of FABS instruction. */ - 1, /* cost of FCHS instruction. */ - 70, /* cost of FSQRT instruction. */ + COSTS_N_INSNS (3), /* cost of FADD and FSUB insns. */ + COSTS_N_INSNS (3), /* cost of FMUL instruction. */ + COSTS_N_INSNS (39), /* cost of FDIV instruction. */ + COSTS_N_INSNS (1), /* cost of FABS instruction. */ + COSTS_N_INSNS (1), /* cost of FCHS instruction. */ + COSTS_N_INSNS (70), /* cost of FSQRT instruction. */ }; static const struct processor_costs pentiumpro_cost = { - 1, /* cost of an add instruction */ - 1, /* cost of a lea instruction */ - 1, /* variable shift costs */ - 1, /* constant shift costs */ - {4, 4, 4, 4, 4}, /* cost of starting a multiply */ + COSTS_N_INSNS (1), /* cost of an add instruction */ + COSTS_N_INSNS (1), /* cost of a lea instruction */ + COSTS_N_INSNS (1), /* variable shift costs */ + COSTS_N_INSNS (1), /* constant shift costs */ + {COSTS_N_INSNS (4), /* cost of starting multiply for QI */ + COSTS_N_INSNS (4), /* HI */ + COSTS_N_INSNS (4), /* SI */ + COSTS_N_INSNS (4), /* DI */ + COSTS_N_INSNS (4)}, /* other */ 0, /* cost of multiply per each bit set */ - {17, 17, 17, 17, 17}, /* cost of a divide/mod */ - 1, /* cost of movsx */ - 1, /* cost of movzx */ + {COSTS_N_INSNS (17), /* cost of a divide/mod for QI */ + COSTS_N_INSNS (17), /* HI */ + COSTS_N_INSNS (17), /* SI */ + COSTS_N_INSNS (17), /* DI */ + COSTS_N_INSNS (17)}, /* other */ + COSTS_N_INSNS (1), /* cost of movsx */ + COSTS_N_INSNS (1), /* cost of movzx */ 8, /* "large" insn */ 6, /* MOVE_RATIO */ 2, /* cost for loading QImode using movzbl */ @@ -276,25 +316,33 @@ struct processor_costs pentiumpro_cost = { 32, /* size of prefetch block */ 6, /* number of parallel prefetches */ 2, /* Branch cost */ - 3, /* cost of FADD and FSUB insns. */ - 5, /* cost of FMUL instruction. */ - 56, /* cost of FDIV instruction. */ - 2, /* cost of FABS instruction. */ - 2, /* cost of FCHS instruction. */ - 56, /* cost of FSQRT instruction. */ + COSTS_N_INSNS (3), /* cost of FADD and FSUB insns. */ + COSTS_N_INSNS (5), /* cost of FMUL instruction. */ + COSTS_N_INSNS (56), /* cost of FDIV instruction. */ + COSTS_N_INSNS (2), /* cost of FABS instruction. */ + COSTS_N_INSNS (2), /* cost of FCHS instruction. */ + COSTS_N_INSNS (56), /* cost of FSQRT instruction. */ }; static const struct processor_costs k6_cost = { - 1, /* cost of an add instruction */ - 2, /* cost of a lea instruction */ - 1, /* variable shift costs */ - 1, /* constant shift costs */ - {3, 3, 3, 3, 3}, /* cost of starting a multiply */ + COSTS_N_INSNS (1), /* cost of an add instruction */ + COSTS_N_INSNS (2), /* cost of a lea instruction */ + COSTS_N_INSNS (1), /* variable shift costs */ + COSTS_N_INSNS (1), /* constant shift costs */ + {COSTS_N_INSNS (3), /* cost of starting multiply for QI */ + COSTS_N_INSNS (3), /* HI */ + COSTS_N_INSNS (3), /* SI */ + COSTS_N_INSNS (3), /* DI */ + COSTS_N_INSNS (3)}, /* other */ 0, /* cost of multiply per each bit set */ - {18, 18, 18, 18, 18}, /* cost of a divide/mod */ - 2, /* cost of movsx */ - 2, /* cost of movzx */ + {COSTS_N_INSNS (18), /* cost of a divide/mod for QI */ + COSTS_N_INSNS (18), /* HI */ + COSTS_N_INSNS (18), /* SI */ + COSTS_N_INSNS (18), /* DI */ + COSTS_N_INSNS (18)}, /* other */ + COSTS_N_INSNS (2), /* cost of movsx */ + COSTS_N_INSNS (2), /* cost of movzx */ 8, /* "large" insn */ 4, /* MOVE_RATIO */ 3, /* cost for loading QImode using movzbl */ @@ -320,25 +368,33 @@ struct processor_costs k6_cost = { 32, /* size of prefetch block */ 1, /* number of parallel prefetches */ 1, /* Branch cost */ - 2, /* cost of FADD and FSUB insns. */ - 2, /* cost of FMUL instruction. */ - 56, /* cost of FDIV instruction. */ - 2, /* cost of FABS instruction. */ - 2, /* cost of FCHS instruction. */ - 56, /* cost of FSQRT instruction. */ + COSTS_N_INSNS (2), /* cost of FADD and FSUB insns. */ + COSTS_N_INSNS (2), /* cost of FMUL instruction. */ + COSTS_N_INSNS (56), /* cost of FDIV instruction. */ + COSTS_N_INSNS (2), /* cost of FABS instruction. */ + COSTS_N_INSNS (2), /* cost of FCHS instruction. */ + COSTS_N_INSNS (56), /* cost of FSQRT instruction. */ }; static const struct processor_costs athlon_cost = { - 1, /* cost of an add instruction */ - 2, /* cost of a lea instruction */ - 1, /* variable shift costs */ - 1, /* constant shift costs */ - {5, 5, 5, 5, 5}, /* cost of starting a multiply */ + COSTS_N_INSNS (1), /* cost of an add instruction */ + COSTS_N_INSNS (2), /* cost of a lea instruction */ + COSTS_N_INSNS (1), /* variable shift costs */ + COSTS_N_INSNS (1), /* constant shift costs */ + {COSTS_N_INSNS (5), /* cost of starting multiply for QI */ + COSTS_N_INSNS (5), /* HI */ + COSTS_N_INSNS (5), /* SI */ + COSTS_N_INSNS (5), /* DI */ + COSTS_N_INSNS (5)}, /* other */ 0, /* cost of multiply per each bit set */ - {18, 26, 42, 74, 74}, /* cost of a divide/mod */ - 1, /* cost of movsx */ - 1, /* cost of movzx */ + {COSTS_N_INSNS (18), /* cost of a divide/mod for QI */ + COSTS_N_INSNS (26), /* HI */ + COSTS_N_INSNS (42), /* SI */ + COSTS_N_INSNS (74), /* DI */ + COSTS_N_INSNS (74)}, /* other */ + COSTS_N_INSNS (1), /* cost of movsx */ + COSTS_N_INSNS (1), /* cost of movzx */ 8, /* "large" insn */ 9, /* MOVE_RATIO */ 4, /* cost for loading QImode using movzbl */ @@ -364,25 +420,33 @@ struct processor_costs athlon_cost = { 64, /* size of prefetch block */ 6, /* number of parallel prefetches */ 5, /* Branch cost */ - 4, /* cost of FADD and FSUB insns. */ - 4, /* cost of FMUL instruction. */ - 24, /* cost of FDIV instruction. */ - 2, /* cost of FABS instruction. */ - 2, /* cost of FCHS instruction. */ - 35, /* cost of FSQRT instruction. */ + COSTS_N_INSNS (4), /* cost of FADD and FSUB insns. */ + COSTS_N_INSNS (4), /* cost of FMUL instruction. */ + COSTS_N_INSNS (24), /* cost of FDIV instruction. */ + COSTS_N_INSNS (2), /* cost of FABS instruction. */ + COSTS_N_INSNS (2), /* cost of FCHS instruction. */ + COSTS_N_INSNS (35), /* cost of FSQRT instruction. */ }; static const struct processor_costs k8_cost = { - 1, /* cost of an add instruction */ - 2, /* cost of a lea instruction */ - 1, /* variable shift costs */ - 1, /* constant shift costs */ - {3, 4, 3, 4, 5}, /* cost of starting a multiply */ + COSTS_N_INSNS (1), /* cost of an add instruction */ + COSTS_N_INSNS (2), /* cost of a lea instruction */ + COSTS_N_INSNS (1), /* variable shift costs */ + COSTS_N_INSNS (1), /* constant shift costs */ + {COSTS_N_INSNS (3), /* cost of starting multiply for QI */ + COSTS_N_INSNS (4), /* HI */ + COSTS_N_INSNS (3), /* SI */ + COSTS_N_INSNS (4), /* DI */ + COSTS_N_INSNS (5)}, /* other */ 0, /* cost of multiply per each bit set */ - {18, 26, 42, 74, 74}, /* cost of a divide/mod */ - 1, /* cost of movsx */ - 1, /* cost of movzx */ + {COSTS_N_INSNS (18), /* cost of a divide/mod for QI */ + COSTS_N_INSNS (26), /* HI */ + COSTS_N_INSNS (42), /* SI */ + COSTS_N_INSNS (74), /* DI */ + COSTS_N_INSNS (74)}, /* other */ + COSTS_N_INSNS (1), /* cost of movsx */ + COSTS_N_INSNS (1), /* cost of movzx */ 8, /* "large" insn */ 9, /* MOVE_RATIO */ 4, /* cost for loading QImode using movzbl */ @@ -408,25 +472,33 @@ struct processor_costs k8_cost = { 64, /* size of prefetch block */ 6, /* number of parallel prefetches */ 5, /* Branch cost */ - 4, /* cost of FADD and FSUB insns. */ - 4, /* cost of FMUL instruction. */ - 19, /* cost of FDIV instruction. */ - 2, /* cost of FABS instruction. */ - 2, /* cost of FCHS instruction. */ - 35, /* cost of FSQRT instruction. */ + COSTS_N_INSNS (4), /* cost of FADD and FSUB insns. */ + COSTS_N_INSNS (4), /* cost of FMUL instruction. */ + COSTS_N_INSNS (19), /* cost of FDIV instruction. */ + COSTS_N_INSNS (2), /* cost of FABS instruction. */ + COSTS_N_INSNS (2), /* cost of FCHS instruction. */ + COSTS_N_INSNS (35), /* cost of FSQRT instruction. */ }; static const struct processor_costs pentium4_cost = { - 1, /* cost of an add instruction */ - 3, /* cost of a lea instruction */ - 4, /* variable shift costs */ - 4, /* constant shift costs */ - {15, 15, 15, 15, 15}, /* cost of starting a multiply */ + COSTS_N_INSNS (1), /* cost of an add instruction */ + COSTS_N_INSNS (3), /* cost of a lea instruction */ + COSTS_N_INSNS (4), /* variable shift costs */ + COSTS_N_INSNS (4), /* constant shift costs */ + {COSTS_N_INSNS (15), /* cost of starting multiply for QI */ + COSTS_N_INSNS (15), /* HI */ + COSTS_N_INSNS (15), /* SI */ + COSTS_N_INSNS (15), /* DI */ + COSTS_N_INSNS (15)}, /* other */ 0, /* cost of multiply per each bit set */ - {56, 56, 56, 56, 56}, /* cost of a divide/mod */ - 1, /* cost of movsx */ - 1, /* cost of movzx */ + {COSTS_N_INSNS (56), /* cost of a divide/mod for QI */ + COSTS_N_INSNS (56), /* HI */ + COSTS_N_INSNS (56), /* SI */ + COSTS_N_INSNS (56), /* DI */ + COSTS_N_INSNS (56)}, /* other */ + COSTS_N_INSNS (1), /* cost of movsx */ + COSTS_N_INSNS (1), /* cost of movzx */ 16, /* "large" insn */ 6, /* MOVE_RATIO */ 2, /* cost for loading QImode using movzbl */ @@ -452,25 +524,33 @@ struct processor_costs pentium4_cost = { 64, /* size of prefetch block */ 6, /* number of parallel prefetches */ 2, /* Branch cost */ - 5, /* cost of FADD and FSUB insns. */ - 7, /* cost of FMUL instruction. */ - 43, /* cost of FDIV instruction. */ - 2, /* cost of FABS instruction. */ - 2, /* cost of FCHS instruction. */ - 43, /* cost of FSQRT instruction. */ + COSTS_N_INSNS (5), /* cost of FADD and FSUB insns. */ + COSTS_N_INSNS (7), /* cost of FMUL instruction. */ + COSTS_N_INSNS (43), /* cost of FDIV instruction. */ + COSTS_N_INSNS (2), /* cost of FABS instruction. */ + COSTS_N_INSNS (2), /* cost of FCHS instruction. */ + COSTS_N_INSNS (43), /* cost of FSQRT instruction. */ }; static const struct processor_costs nocona_cost = { - 1, /* cost of an add instruction */ - 1, /* cost of a lea instruction */ - 1, /* variable shift costs */ - 1, /* constant shift costs */ - {10, 10, 10, 10, 10}, /* cost of starting a multiply */ + COSTS_N_INSNS (1), /* cost of an add instruction */ + COSTS_N_INSNS (1), /* cost of a lea instruction */ + COSTS_N_INSNS (1), /* variable shift costs */ + COSTS_N_INSNS (1), /* constant shift costs */ + {COSTS_N_INSNS (10), /* cost of starting multiply for QI */ + COSTS_N_INSNS (10), /* HI */ + COSTS_N_INSNS (10), /* SI */ + COSTS_N_INSNS (10), /* DI */ + COSTS_N_INSNS (10)}, /* other */ 0, /* cost of multiply per each bit set */ - {66, 66, 66, 66, 66}, /* cost of a divide/mod */ - 1, /* cost of movsx */ - 1, /* cost of movzx */ + {COSTS_N_INSNS (66), /* cost of a divide/mod for QI */ + COSTS_N_INSNS (66), /* HI */ + COSTS_N_INSNS (66), /* SI */ + COSTS_N_INSNS (66), /* DI */ + COSTS_N_INSNS (66)}, /* other */ + COSTS_N_INSNS (1), /* cost of movsx */ + COSTS_N_INSNS (1), /* cost of movzx */ 16, /* "large" insn */ 17, /* MOVE_RATIO */ 4, /* cost for loading QImode using movzbl */ @@ -496,12 +576,12 @@ struct processor_costs nocona_cost = { 128, /* size of prefetch block */ 8, /* number of parallel prefetches */ 1, /* Branch cost */ - 6, /* cost of FADD and FSUB insns. */ - 8, /* cost of FMUL instruction. */ - 40, /* cost of FDIV instruction. */ - 3, /* cost of FABS instruction. */ - 3, /* cost of FCHS instruction. */ - 44, /* cost of FSQRT instruction. */ + COSTS_N_INSNS (6), /* cost of FADD and FSUB insns. */ + COSTS_N_INSNS (8), /* cost of FMUL instruction. */ + COSTS_N_INSNS (40), /* cost of FDIV instruction. */ + COSTS_N_INSNS (3), /* cost of FABS instruction. */ + COSTS_N_INSNS (3), /* cost of FCHS instruction. */ + COSTS_N_INSNS (44), /* cost of FSQRT instruction. */ }; const struct processor_costs *ix86_cost = &pentium_cost; @@ -560,7 +640,6 @@ const int x86_memory_mismatch_stall = m_ATHLON_K8 | m_PENT4 | m_NOCONA; const int x86_accumulate_outgoing_args = m_ATHLON_K8 | m_PENT4 | m_NOCONA | m_PPRO; const int x86_prologue_using_move = m_ATHLON_K8 | m_PPRO; const int x86_epilogue_using_move = m_ATHLON_K8 | m_PPRO; -const int x86_decompose_lea = m_PENT4 | m_NOCONA; const int x86_shift1 = ~m_486; const int x86_arch_always_fancy_math_387 = m_PENT | m_PPRO | m_ATHLON_K8 | m_PENT4 | m_NOCONA; const int x86_sse_partial_reg_dependency = m_PENT4 | m_NOCONA | m_PPRO; @@ -586,6 +665,10 @@ const int x86_schedule = m_PPRO | m_ATHLON_K8 | m_K6 | m_PENT; const int x86_use_bt = m_ATHLON_K8; /* Compare and exchange was added for 80486. */ const int x86_cmpxchg = ~m_386; +/* Compare and exchange 8 bytes was added for pentium. */ +const int x86_cmpxchg8b = ~(m_386 | m_486); +/* Compare and exchange 16 bytes was added for nocona. */ +const int x86_cmpxchg16b = m_NOCONA; /* Exchange and add was added for 80486. */ const int x86_xadd = ~m_386; @@ -954,9 +1037,9 @@ static void init_ext_80387_constants (void); static bool ix86_in_large_data_p (tree) ATTRIBUTE_UNUSED; static void ix86_encode_section_info (tree, rtx, int) ATTRIBUTE_UNUSED; static void x86_64_elf_unique_section (tree decl, int reloc) ATTRIBUTE_UNUSED; -static void x86_64_elf_select_section (tree decl, int reloc, - unsigned HOST_WIDE_INT align) - ATTRIBUTE_UNUSED; +static section *x86_64_elf_select_section (tree decl, int reloc, + unsigned HOST_WIDE_INT align) + ATTRIBUTE_UNUSED; /* Initialize the GCC target structure. */ #undef TARGET_ATTRIBUTE_TABLE @@ -1499,9 +1582,8 @@ override_options (void) The default of 128 bits is for Pentium III's SSE __m128, but we don't want additional code to keep the stack aligned when optimizing for code size. */ - ix86_preferred_stack_boundary = (optimize_size - ? TARGET_64BIT ? 128 : 32 - : 128); + ix86_preferred_stack_boundary = ((TARGET_64BIT || TARGET_MACHO || !optimize_size) + ? 128 : 32); if (ix86_preferred_stack_boundary_string) { i = atoi (ix86_preferred_stack_boundary_string); @@ -1689,14 +1771,15 @@ override_options (void) RELOC indicates whether forming the initial value of DECL requires link-time relocations. */ -static void +static section * x86_64_elf_select_section (tree decl, int reloc, - unsigned HOST_WIDE_INT align) + unsigned HOST_WIDE_INT align) { if ((ix86_cmodel == CM_MEDIUM || ix86_cmodel == CM_MEDIUM_PIC) && ix86_in_large_data_p (decl)) { const char *sname = NULL; + unsigned int flags = SECTION_WRITE; switch (categorize_decl_for_section (decl, reloc, flag_pic)) { case SECCAT_DATA: @@ -1716,12 +1799,14 @@ x86_64_elf_select_section (tree decl, int reloc, break; case SECCAT_BSS: sname = ".lbss"; + flags |= SECTION_BSS; break; case SECCAT_RODATA: case SECCAT_RODATA_MERGE_STR: case SECCAT_RODATA_MERGE_STR_INIT: case SECCAT_RODATA_MERGE_CONST: sname = ".lrodata"; + flags = 0; break; case SECCAT_SRODATA: case SECCAT_SDATA: @@ -1736,11 +1821,15 @@ x86_64_elf_select_section (tree decl, int reloc, } if (sname) { - named_section (decl, sname, reloc); - return; + /* We might get called with string constants, but get_named_section + doesn't like them as they are not DECLs. Also, we need to set + flags in that case. */ + if (!DECL_P (decl)) + return get_section (sname, flags, NULL); + return get_named_section (decl, sname, reloc); } } - default_elf_select_section (decl, reloc, align); + return default_elf_select_section (decl, reloc, align); } /* Build up a unique section name, expressed as a @@ -1840,9 +1929,9 @@ x86_output_aligned_bss (FILE *file, tree decl ATTRIBUTE_UNUSED, { if ((ix86_cmodel == CM_MEDIUM || ix86_cmodel == CM_MEDIUM_PIC) && size > (unsigned int)ix86_section_threshold) - named_section (decl, ".lbss", 0); + switch_to_section (get_named_section (decl, ".lbss", 0)); else - bss_section (); + switch_to_section (bss_section); ASM_OUTPUT_ALIGN (file, floor_log2 (align / BITS_PER_UNIT)); #ifdef ASM_DECLARE_OBJECT_NAME last_assemble_variable_decl = decl; @@ -2641,8 +2730,8 @@ classify_argument (enum machine_mode mode, tree type, misaligned integers. */ if (DECL_BIT_FIELD (field)) { - for (i = int_bit_position (field) / 8 / 8; - i < (int_bit_position (field) + for (i = (int_bit_position (field) + (bit_offset % 64)) / 8 / 8; + i < ((int_bit_position (field) + (bit_offset % 64)) + tree_low_cst (DECL_SIZE (field), 0) + 63) / 8 / 8; i++) classes[i] = @@ -3470,7 +3559,7 @@ ix86_function_value (tree valtype, tree fntype_or_decl, } } -/* Return false iff type is returned in memory. */ +/* Return true iff type is returned in memory. */ int ix86_return_in_memory (tree type) { @@ -3793,10 +3882,10 @@ ix86_va_start (tree valist, rtx nextarg) f_sav = TREE_CHAIN (f_ovf); valist = build1 (INDIRECT_REF, TREE_TYPE (TREE_TYPE (valist)), valist); - gpr = build (COMPONENT_REF, TREE_TYPE (f_gpr), valist, f_gpr, NULL_TREE); - fpr = build (COMPONENT_REF, TREE_TYPE (f_fpr), valist, f_fpr, NULL_TREE); - ovf = build (COMPONENT_REF, TREE_TYPE (f_ovf), valist, f_ovf, NULL_TREE); - sav = build (COMPONENT_REF, TREE_TYPE (f_sav), valist, f_sav, NULL_TREE); + gpr = build3 (COMPONENT_REF, TREE_TYPE (f_gpr), valist, f_gpr, NULL_TREE); + fpr = build3 (COMPONENT_REF, TREE_TYPE (f_fpr), valist, f_fpr, NULL_TREE); + ovf = build3 (COMPONENT_REF, TREE_TYPE (f_ovf), valist, f_ovf, NULL_TREE); + sav = build3 (COMPONENT_REF, TREE_TYPE (f_sav), valist, f_sav, NULL_TREE); /* Count number of gp and fp argument registers used. */ words = current_function_args_info.words; @@ -3809,16 +3898,16 @@ ix86_va_start (tree valist, rtx nextarg) if (cfun->va_list_gpr_size) { - t = build (MODIFY_EXPR, TREE_TYPE (gpr), gpr, - build_int_cst (NULL_TREE, n_gpr * 8)); + t = build2 (MODIFY_EXPR, TREE_TYPE (gpr), gpr, + build_int_cst (NULL_TREE, n_gpr * 8)); TREE_SIDE_EFFECTS (t) = 1; expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL); } if (cfun->va_list_fpr_size) { - t = build (MODIFY_EXPR, TREE_TYPE (fpr), fpr, - build_int_cst (NULL_TREE, n_fpr * 16 + 8*REGPARM_MAX)); + t = build2 (MODIFY_EXPR, TREE_TYPE (fpr), fpr, + build_int_cst (NULL_TREE, n_fpr * 16 + 8*REGPARM_MAX)); TREE_SIDE_EFFECTS (t) = 1; expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL); } @@ -3826,9 +3915,9 @@ ix86_va_start (tree valist, rtx nextarg) /* Find the overflow area. */ t = make_tree (TREE_TYPE (ovf), virtual_incoming_args_rtx); if (words != 0) - t = build (PLUS_EXPR, TREE_TYPE (ovf), t, - build_int_cst (NULL_TREE, words * UNITS_PER_WORD)); - t = build (MODIFY_EXPR, TREE_TYPE (ovf), ovf, t); + t = build2 (PLUS_EXPR, TREE_TYPE (ovf), t, + build_int_cst (NULL_TREE, words * UNITS_PER_WORD)); + t = build2 (MODIFY_EXPR, TREE_TYPE (ovf), ovf, t); TREE_SIDE_EFFECTS (t) = 1; expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL); @@ -3837,7 +3926,7 @@ ix86_va_start (tree valist, rtx nextarg) /* Find the register save area. Prologue of the function save it right above stack frame. */ t = make_tree (TREE_TYPE (sav), frame_pointer_rtx); - t = build (MODIFY_EXPR, TREE_TYPE (sav), sav, t); + t = build2 (MODIFY_EXPR, TREE_TYPE (sav), sav, t); TREE_SIDE_EFFECTS (t) = 1; expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL); } @@ -3869,10 +3958,10 @@ ix86_gimplify_va_arg (tree valist, tree type, tree *pre_p, tree *post_p) f_sav = TREE_CHAIN (f_ovf); valist = build_va_arg_indirect_ref (valist); - gpr = build (COMPONENT_REF, TREE_TYPE (f_gpr), valist, f_gpr, NULL_TREE); - fpr = build (COMPONENT_REF, TREE_TYPE (f_fpr), valist, f_fpr, NULL_TREE); - ovf = build (COMPONENT_REF, TREE_TYPE (f_ovf), valist, f_ovf, NULL_TREE); - sav = build (COMPONENT_REF, TREE_TYPE (f_sav), valist, f_sav, NULL_TREE); + gpr = build3 (COMPONENT_REF, TREE_TYPE (f_gpr), valist, f_gpr, NULL_TREE); + fpr = build3 (COMPONENT_REF, TREE_TYPE (f_fpr), valist, f_fpr, NULL_TREE); + ovf = build3 (COMPONENT_REF, TREE_TYPE (f_ovf), valist, f_ovf, NULL_TREE); + sav = build3 (COMPONENT_REF, TREE_TYPE (f_sav), valist, f_sav, NULL_TREE); indirect_p = pass_by_reference (NULL, TYPE_MODE (type), type, false); if (indirect_p) @@ -3954,7 +4043,7 @@ ix86_gimplify_va_arg (tree valist, tree type, tree *pre_p, tree *post_p) (REGPARM_MAX - needed_intregs + 1) * 8); t = build2 (GE_EXPR, boolean_type_node, gpr, t); t2 = build1 (GOTO_EXPR, void_type_node, lab_false); - t = build (COND_EXPR, void_type_node, t, t2, NULL_TREE); + t = build3 (COND_EXPR, void_type_node, t, t2, NULL_TREE); gimplify_and_add (t, pre_p); } if (needed_sseregs) @@ -3964,7 +4053,7 @@ ix86_gimplify_va_arg (tree valist, tree type, tree *pre_p, tree *post_p) + REGPARM_MAX * 8); t = build2 (GE_EXPR, boolean_type_node, fpr, t); t2 = build1 (GOTO_EXPR, void_type_node, lab_false); - t = build (COND_EXPR, void_type_node, t, t2, NULL_TREE); + t = build3 (COND_EXPR, void_type_node, t, t2, NULL_TREE); gimplify_and_add (t, pre_p); } @@ -4056,15 +4145,16 @@ ix86_gimplify_va_arg (tree valist, tree type, tree *pre_p, tree *post_p) /* ... otherwise out of the overflow area. */ /* Care for on-stack alignment if needed. */ - if (FUNCTION_ARG_BOUNDARY (VOIDmode, type) <= 64) + if (FUNCTION_ARG_BOUNDARY (VOIDmode, type) <= 64 + || integer_zerop (TYPE_SIZE (type))) t = ovf; else { HOST_WIDE_INT align = FUNCTION_ARG_BOUNDARY (VOIDmode, type) / 8; - t = build (PLUS_EXPR, TREE_TYPE (ovf), ovf, - build_int_cst (TREE_TYPE (ovf), align - 1)); - t = build (BIT_AND_EXPR, TREE_TYPE (t), t, - build_int_cst (TREE_TYPE (t), -align)); + t = build2 (PLUS_EXPR, TREE_TYPE (ovf), ovf, + build_int_cst (TREE_TYPE (ovf), align - 1)); + t = build2 (BIT_AND_EXPR, TREE_TYPE (t), t, + build_int_cst (TREE_TYPE (t), -align)); } gimplify_expr (&t, pre_p, NULL, is_gimple_val, fb_rvalue); @@ -4328,7 +4418,7 @@ ix86_setup_frame_addresses (void) cfun->machine->accesses_prev_frame = 1; } -#if defined(HAVE_GAS_HIDDEN) && defined(SUPPORTS_ONE_ONLY) +#if (defined(HAVE_GAS_HIDDEN) && (SUPPORTS_ONE_ONLY - 0)) || TARGET_MACHO # define USE_HIDDEN_LINKONCE 1 #else # define USE_HIDDEN_LINKONCE 0 @@ -4367,6 +4457,19 @@ ix86_file_end (void) get_pc_thunk_name (name, regno); +#if TARGET_MACHO + if (TARGET_MACHO) + { + switch_to_section (darwin_sections[text_coal_section]); + fputs ("\t.weak_definition\t", asm_out_file); + assemble_name (asm_out_file, name); + fputs ("\n\t.private_extern\t", asm_out_file); + assemble_name (asm_out_file, name); + fputs ("\n", asm_out_file); + ASM_OUTPUT_LABEL (asm_out_file, name); + } + else +#endif if (USE_HIDDEN_LINKONCE) { tree decl; @@ -4378,7 +4481,7 @@ ix86_file_end (void) DECL_ONE_ONLY (decl) = 1; (*targetm.asm_out.unique_section) (decl, 0); - named_section (decl, NULL, 0); + switch_to_section (get_named_section (decl, NULL, 0)); (*targetm.asm_out.globalize_label) (asm_out_file, name); fputs ("\t.hidden\t", asm_out_file); @@ -4388,7 +4491,7 @@ ix86_file_end (void) } else { - text_section (); + switch_to_section (text_section); ASM_OUTPUT_LABEL (asm_out_file, name); } @@ -4405,7 +4508,7 @@ ix86_file_end (void) /* Emit code for the SET_GOT patterns. */ const char * -output_set_got (rtx dest) +output_set_got (rtx dest, rtx label ATTRIBUTE_UNUSED) { rtx xops[3]; @@ -4414,7 +4517,7 @@ output_set_got (rtx dest) if (! TARGET_DEEP_BRANCH_PREDICTION || !flag_pic) { - xops[2] = gen_rtx_LABEL_REF (Pmode, gen_label_rtx ()); + xops[2] = gen_rtx_LABEL_REF (Pmode, label ? label : gen_label_rtx ()); if (!flag_pic) output_asm_insn ("mov{l}\t{%2, %0|%0, %2}", xops); @@ -4422,10 +4525,12 @@ output_set_got (rtx dest) output_asm_insn ("call\t%a2", xops); #if TARGET_MACHO - /* Output the "canonical" label name ("Lxx$pb") here too. This - is what will be referred to by the Mach-O PIC subsystem. */ - ASM_OUTPUT_LABEL (asm_out_file, machopic_function_base_name ()); + /* Output the Mach-O "canonical" label name ("Lxx$pb") here too. This + is what will be referenced by the Mach-O PIC subsystem. */ + if (!label) + ASM_OUTPUT_LABEL (asm_out_file, machopic_function_base_name ()); #endif + (*targetm.asm_out.internal_label) (asm_out_file, "L", CODE_LABEL_NUMBER (XEXP (xops[2], 0))); @@ -4441,11 +4546,20 @@ output_set_got (rtx dest) xops[2] = gen_rtx_SYMBOL_REF (Pmode, ggc_strdup (name)); xops[2] = gen_rtx_MEM (QImode, xops[2]); output_asm_insn ("call\t%X2", xops); + /* Output the Mach-O "canonical" label name ("Lxx$pb") here too. This + is what will be referenced by the Mach-O PIC subsystem. */ +#if TARGET_MACHO + if (!label) + ASM_OUTPUT_LABEL (asm_out_file, machopic_function_base_name ()); +#endif } + if (TARGET_MACHO) + return ""; + if (!flag_pic || TARGET_DEEP_BRANCH_PREDICTION) output_asm_insn ("add{l}\t{%1, %0|%0, %1}", xops); - else if (!TARGET_MACHO) + else output_asm_insn ("add{l}\t{%1+[.-%a2], %0|%0, %1+(.-%a2)}", xops); return ""; @@ -13162,12 +13276,15 @@ ix86_constant_alignment (tree exp, int align) int ix86_data_alignment (tree type, int align) { + int max_align = optimize_size ? BITS_PER_WORD : 256; + if (AGGREGATE_TYPE_P (type) - && TYPE_SIZE (type) - && TREE_CODE (TYPE_SIZE (type)) == INTEGER_CST - && (TREE_INT_CST_LOW (TYPE_SIZE (type)) >= 256 - || TREE_INT_CST_HIGH (TYPE_SIZE (type))) && align < 256) - return 256; + && TYPE_SIZE (type) + && TREE_CODE (TYPE_SIZE (type)) == INTEGER_CST + && (TREE_INT_CST_LOW (TYPE_SIZE (type)) >= (unsigned) max_align + || TREE_INT_CST_HIGH (TYPE_SIZE (type))) + && align < max_align) + align = max_align; /* x86-64 ABI requires arrays greater than 16 bytes to be aligned to 16byte boundary. */ @@ -13360,7 +13477,6 @@ enum ix86_builtins IX86_BUILTIN_CMPNGEPS, IX86_BUILTIN_CMPORDPS, IX86_BUILTIN_CMPUNORDPS, - IX86_BUILTIN_CMPNEPS, IX86_BUILTIN_CMPEQSS, IX86_BUILTIN_CMPLTSS, IX86_BUILTIN_CMPLESS, @@ -13371,7 +13487,6 @@ enum ix86_builtins IX86_BUILTIN_CMPNGESS, IX86_BUILTIN_CMPORDSS, IX86_BUILTIN_CMPUNORDSS, - IX86_BUILTIN_CMPNESS, IX86_BUILTIN_COMIEQSS, IX86_BUILTIN_COMILTSS, @@ -13881,11 +13996,11 @@ static const struct builtin_description bdesc_2arg[] = { MASK_MMX, CODE_FOR_mmx_addv8qi3, "__builtin_ia32_paddb", IX86_BUILTIN_PADDB, 0, 0 }, { MASK_MMX, CODE_FOR_mmx_addv4hi3, "__builtin_ia32_paddw", IX86_BUILTIN_PADDW, 0, 0 }, { MASK_MMX, CODE_FOR_mmx_addv2si3, "__builtin_ia32_paddd", IX86_BUILTIN_PADDD, 0, 0 }, - { MASK_MMX, CODE_FOR_mmx_adddi3, "__builtin_ia32_paddq", IX86_BUILTIN_PADDQ, 0, 0 }, + { MASK_SSE2, CODE_FOR_mmx_adddi3, "__builtin_ia32_paddq", IX86_BUILTIN_PADDQ, 0, 0 }, { MASK_MMX, CODE_FOR_mmx_subv8qi3, "__builtin_ia32_psubb", IX86_BUILTIN_PSUBB, 0, 0 }, { MASK_MMX, CODE_FOR_mmx_subv4hi3, "__builtin_ia32_psubw", IX86_BUILTIN_PSUBW, 0, 0 }, { MASK_MMX, CODE_FOR_mmx_subv2si3, "__builtin_ia32_psubd", IX86_BUILTIN_PSUBD, 0, 0 }, - { MASK_MMX, CODE_FOR_mmx_subdi3, "__builtin_ia32_psubq", IX86_BUILTIN_PSUBQ, 0, 0 }, + { MASK_SSE2, CODE_FOR_mmx_subdi3, "__builtin_ia32_psubq", IX86_BUILTIN_PSUBQ, 0, 0 }, { MASK_MMX, CODE_FOR_mmx_ssaddv8qi3, "__builtin_ia32_paddsb", IX86_BUILTIN_PADDSB, 0, 0 }, { MASK_MMX, CODE_FOR_mmx_ssaddv4hi3, "__builtin_ia32_paddsw", IX86_BUILTIN_PADDSW, 0, 0 }, @@ -14314,9 +14429,6 @@ ix86_init_mmx_sse_builtins (void) = build_function_type_list (integer_type_node, V2DF_type_node, V2DF_type_node, NULL_TREE); - tree ti_ftype_ti_ti - = build_function_type_list (intTI_type_node, - intTI_type_node, intTI_type_node, NULL_TREE); tree void_ftype_pcvoid = build_function_type_list (void_type_node, const_ptr_type_node, NULL_TREE); tree v4sf_ftype_v4si @@ -14448,10 +14560,13 @@ ix86_init_mmx_sse_builtins (void) (*lang_hooks.types.register_builtin_type) (float80_type, "__float80"); } - float128_type = make_node (REAL_TYPE); - TYPE_PRECISION (float128_type) = 128; - layout_type (float128_type); - (*lang_hooks.types.register_builtin_type) (float128_type, "__float128"); + if (TARGET_64BIT) + { + float128_type = make_node (REAL_TYPE); + TYPE_PRECISION (float128_type) = 128; + layout_type (float128_type); + (*lang_hooks.types.register_builtin_type) (float128_type, "__float128"); + } /* Add all builtins that are more or less simple operations on two operands. */ @@ -14483,9 +14598,6 @@ ix86_init_mmx_sse_builtins (void) case V2DFmode: type = v2df_ftype_v2df_v2df; break; - case TImode: - type = ti_ftype_ti_ti; - break; case V4SFmode: type = v4sf_ftype_v4sf_v4sf; break; @@ -14531,7 +14643,7 @@ ix86_init_mmx_sse_builtins (void) def_builtin (MASK_MMX, "__builtin_ia32_psraw", v4hi_ftype_v4hi_di, IX86_BUILTIN_PSRAW); def_builtin (MASK_MMX, "__builtin_ia32_psrad", v2si_ftype_v2si_di, IX86_BUILTIN_PSRAD); - def_builtin (MASK_MMX, "__builtin_ia32_pshufw", v4hi_ftype_v4hi_int, IX86_BUILTIN_PSHUFW); + def_builtin (MASK_SSE | MASK_3DNOW_A, "__builtin_ia32_pshufw", v4hi_ftype_v4hi_int, IX86_BUILTIN_PSHUFW); def_builtin (MASK_MMX, "__builtin_ia32_pmaddwd", v2si_ftype_v4hi_v4hi, IX86_BUILTIN_PMADDWD); /* comi/ucomi insns. */ @@ -15682,9 +15794,8 @@ ix86_force_to_memory (enum machine_mode mode, rtx operand) } break; case HImode: - /* It is better to store HImodes as SImodes. */ - if (!TARGET_PARTIAL_REG_STALL) - operand = gen_lowpart (SImode, operand); + /* Store HImodes as SImodes. */ + operand = gen_lowpart (SImode, operand); /* FALLTHRU */ case SImode: emit_insn ( @@ -15712,8 +15823,6 @@ ix86_free_from_memory (enum machine_mode mode) if (mode == DImode || TARGET_64BIT) size = 8; - else if (mode == HImode && TARGET_PARTIAL_REG_STALL) - size = 2; else size = 4; /* Use LEA to deallocate stack space. In peephole2 it will be converted @@ -16210,13 +16319,13 @@ ix86_rtx_costs (rtx x, int code, int outer_code, int *total) && GET_MODE (XEXP (x, 0)) == SImode) *total = 1; else if (TARGET_ZERO_EXTEND_WITH_AND) - *total = COSTS_N_INSNS (ix86_cost->add); + *total = ix86_cost->add; else - *total = COSTS_N_INSNS (ix86_cost->movzx); + *total = ix86_cost->movzx; return false; case SIGN_EXTEND: - *total = COSTS_N_INSNS (ix86_cost->movsx); + *total = ix86_cost->movsx; return false; case ASHIFT: @@ -16226,13 +16335,13 @@ ix86_rtx_costs (rtx x, int code, int outer_code, int *total) HOST_WIDE_INT value = INTVAL (XEXP (x, 1)); if (value == 1) { - *total = COSTS_N_INSNS (ix86_cost->add); + *total = ix86_cost->add; return false; } if ((value == 2 || value == 3) && ix86_cost->lea <= ix86_cost->shift_const) { - *total = COSTS_N_INSNS (ix86_cost->lea); + *total = ix86_cost->lea; return false; } } @@ -16247,31 +16356,31 @@ ix86_rtx_costs (rtx x, int code, int outer_code, int *total) if (GET_CODE (XEXP (x, 1)) == CONST_INT) { if (INTVAL (XEXP (x, 1)) > 32) - *total = COSTS_N_INSNS(ix86_cost->shift_const + 2); + *total = ix86_cost->shift_const + COSTS_N_INSNS (2); else - *total = COSTS_N_INSNS(ix86_cost->shift_const * 2); + *total = ix86_cost->shift_const * 2; } else { if (GET_CODE (XEXP (x, 1)) == AND) - *total = COSTS_N_INSNS(ix86_cost->shift_var * 2); + *total = ix86_cost->shift_var * 2; else - *total = COSTS_N_INSNS(ix86_cost->shift_var * 6 + 2); + *total = ix86_cost->shift_var * 6 + COSTS_N_INSNS (2); } } else { if (GET_CODE (XEXP (x, 1)) == CONST_INT) - *total = COSTS_N_INSNS (ix86_cost->shift_const); + *total = ix86_cost->shift_const; else - *total = COSTS_N_INSNS (ix86_cost->shift_var); + *total = ix86_cost->shift_var; } return false; case MULT: if (FLOAT_MODE_P (mode)) { - *total = COSTS_N_INSNS (ix86_cost->fmul); + *total = ix86_cost->fmul; return false; } else @@ -16312,9 +16421,9 @@ ix86_rtx_costs (rtx x, int code, int outer_code, int *total) op0 = XEXP (op0, 0), mode = GET_MODE (op0); } - *total = COSTS_N_INSNS (ix86_cost->mult_init[MODE_INDEX (mode)] - + nbits * ix86_cost->mult_bit) - + rtx_cost (op0, outer_code) + rtx_cost (op1, outer_code); + *total = (ix86_cost->mult_init[MODE_INDEX (mode)] + + nbits * ix86_cost->mult_bit + + rtx_cost (op0, outer_code) + rtx_cost (op1, outer_code)); return true; } @@ -16324,14 +16433,14 @@ ix86_rtx_costs (rtx x, int code, int outer_code, int *total) case MOD: case UMOD: if (FLOAT_MODE_P (mode)) - *total = COSTS_N_INSNS (ix86_cost->fdiv); + *total = ix86_cost->fdiv; else - *total = COSTS_N_INSNS (ix86_cost->divide[MODE_INDEX (mode)]); + *total = ix86_cost->divide[MODE_INDEX (mode)]; return false; case PLUS: if (FLOAT_MODE_P (mode)) - *total = COSTS_N_INSNS (ix86_cost->fadd); + *total = ix86_cost->fadd; else if (GET_MODE_CLASS (mode) == MODE_INT && GET_MODE_BITSIZE (mode) <= GET_MODE_BITSIZE (Pmode)) { @@ -16343,7 +16452,7 @@ ix86_rtx_costs (rtx x, int code, int outer_code, int *total) HOST_WIDE_INT val = INTVAL (XEXP (XEXP (XEXP (x, 0), 0), 1)); if (val == 2 || val == 4 || val == 8) { - *total = COSTS_N_INSNS (ix86_cost->lea); + *total = ix86_cost->lea; *total += rtx_cost (XEXP (XEXP (x, 0), 1), outer_code); *total += rtx_cost (XEXP (XEXP (XEXP (x, 0), 0), 0), outer_code); @@ -16357,7 +16466,7 @@ ix86_rtx_costs (rtx x, int code, int outer_code, int *total) HOST_WIDE_INT val = INTVAL (XEXP (XEXP (x, 0), 1)); if (val == 2 || val == 4 || val == 8) { - *total = COSTS_N_INSNS (ix86_cost->lea); + *total = ix86_cost->lea; *total += rtx_cost (XEXP (XEXP (x, 0), 0), outer_code); *total += rtx_cost (XEXP (x, 1), outer_code); return true; @@ -16365,7 +16474,7 @@ ix86_rtx_costs (rtx x, int code, int outer_code, int *total) } else if (GET_CODE (XEXP (x, 0)) == PLUS) { - *total = COSTS_N_INSNS (ix86_cost->lea); + *total = ix86_cost->lea; *total += rtx_cost (XEXP (XEXP (x, 0), 0), outer_code); *total += rtx_cost (XEXP (XEXP (x, 0), 1), outer_code); *total += rtx_cost (XEXP (x, 1), outer_code); @@ -16377,7 +16486,7 @@ ix86_rtx_costs (rtx x, int code, int outer_code, int *total) case MINUS: if (FLOAT_MODE_P (mode)) { - *total = COSTS_N_INSNS (ix86_cost->fadd); + *total = ix86_cost->fadd; return false; } /* FALLTHRU */ @@ -16387,7 +16496,7 @@ ix86_rtx_costs (rtx x, int code, int outer_code, int *total) case XOR: if (!TARGET_64BIT && mode == DImode) { - *total = (COSTS_N_INSNS (ix86_cost->add) * 2 + *total = (ix86_cost->add * 2 + (rtx_cost (XEXP (x, 0), outer_code) << (GET_MODE (XEXP (x, 0)) != DImode)) + (rtx_cost (XEXP (x, 1), outer_code) @@ -16399,16 +16508,16 @@ ix86_rtx_costs (rtx x, int code, int outer_code, int *total) case NEG: if (FLOAT_MODE_P (mode)) { - *total = COSTS_N_INSNS (ix86_cost->fchs); + *total = ix86_cost->fchs; return false; } /* FALLTHRU */ case NOT: if (!TARGET_64BIT && mode == DImode) - *total = COSTS_N_INSNS (ix86_cost->add * 2); + *total = ix86_cost->add * 2; else - *total = COSTS_N_INSNS (ix86_cost->add); + *total = ix86_cost->add; return false; case COMPARE: @@ -16419,7 +16528,7 @@ ix86_rtx_costs (rtx x, int code, int outer_code, int *total) { /* This kind of construct is implemented using test[bwl]. Treat it as if we had an AND. */ - *total = (COSTS_N_INSNS (ix86_cost->add) + *total = (ix86_cost->add + rtx_cost (XEXP (XEXP (x, 0), 0), outer_code) + rtx_cost (const1_rtx, outer_code)); return true; @@ -16435,12 +16544,12 @@ ix86_rtx_costs (rtx x, int code, int outer_code, int *total) case ABS: if (FLOAT_MODE_P (mode)) - *total = COSTS_N_INSNS (ix86_cost->fabs); + *total = ix86_cost->fabs; return false; case SQRT: if (FLOAT_MODE_P (mode)) - *total = COSTS_N_INSNS (ix86_cost->fsqrt); + *total = ix86_cost->fsqrt; return false; case UNSPEC: @@ -16481,9 +16590,9 @@ machopic_output_stub (FILE *file, const char *symb, const char *stub) sprintf (lazy_ptr_name, "L%d$lz", label); if (MACHOPIC_PURE) - machopic_picsymbol_stub_section (); + switch_to_section (darwin_sections[machopic_picsymbol_stub_section]); else - machopic_symbol_stub_section (); + switch_to_section (darwin_sections[machopic_symbol_stub_section]); fprintf (file, "%s:\n", stub); fprintf (file, "\t.indirect_symbol %s\n", symbol_name); @@ -16509,11 +16618,18 @@ machopic_output_stub (FILE *file, const char *symb, const char *stub) fprintf (file, "\tjmp dyld_stub_binding_helper\n"); - machopic_lazy_symbol_ptr_section (); + switch_to_section (darwin_sections[machopic_lazy_symbol_ptr_section]); fprintf (file, "%s:\n", lazy_ptr_name); fprintf (file, "\t.indirect_symbol %s\n", symbol_name); fprintf (file, "\t.long %s\n", binder_name); } + +void +darwin_x86_file_end (void) +{ + darwin_file_end (); + ix86_file_end (); +} #endif /* TARGET_MACHO */ /* Order the registers for register allocator. */ @@ -16802,7 +16918,7 @@ x86_output_mi_thunk (FILE *file ATTRIBUTE_UNUSED, #endif /* TARGET_MACHO */ { tmp = gen_rtx_REG (SImode, 2 /* ECX */); - output_set_got (tmp); + output_set_got (tmp, NULL_RTX); xops[1] = tmp; output_asm_insn ("mov{l}\t{%0@GOT(%1), %1|%1, %0@GOT[%1]}", xops); @@ -18001,8 +18117,7 @@ void ix86_emit_i387_log1p (rtx op0, rtx op1) emit_label (label2); } -/* Solaris named-section hook. Parameters are as for - named_section_real. */ +/* Solaris implementation of TARGET_ASM_NAMED_SECTION. */ static void i386_solaris_elf_named_section (const char *name, unsigned int flags, diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h index a00e0e043ab..45cb0373fdc 100644 --- a/gcc/config/i386/i386.h +++ b/gcc/config/i386/i386.h @@ -162,7 +162,7 @@ extern const int x86_sse_typeless_stores, x86_sse_load0_by_pxor; extern const int x86_use_ffreep; extern const int x86_inter_unit_moves, x86_schedule; extern const int x86_use_bt; -extern const int x86_cmpxchg, x86_xadd; +extern const int x86_cmpxchg, x86_cmpxchg8b, x86_cmpxchg16b, x86_xadd; extern int x86_prefetch_sse; #define TARGET_USE_LEAVE (x86_use_leave & TUNEMASK) @@ -209,7 +209,6 @@ extern int x86_prefetch_sse; #define TARGET_MEMORY_MISMATCH_STALL (x86_memory_mismatch_stall & TUNEMASK) #define TARGET_PROLOGUE_USING_MOVE (x86_prologue_using_move & TUNEMASK) #define TARGET_EPILOGUE_USING_MOVE (x86_epilogue_using_move & TUNEMASK) -#define TARGET_DECOMPOSE_LEA (x86_decompose_lea & TUNEMASK) #define TARGET_PREFETCH_SSE (x86_prefetch_sse) #define TARGET_SHIFT1 (x86_shift1 & TUNEMASK) #define TARGET_USE_FFREEP (x86_use_ffreep & TUNEMASK) @@ -229,6 +228,8 @@ extern int x86_prefetch_sse; #define TARGET_SUN_TLS (ix86_tls_dialect == TLS_DIALECT_SUN) #define TARGET_CMPXCHG (x86_cmpxchg & (1 << ix86_arch)) +#define TARGET_CMPXCHG8B (x86_cmpxchg8b & (1 << ix86_arch)) +#define TARGET_CMPXCHG16B (x86_cmpxchg16b & (1 << ix86_arch)) #define TARGET_XADD (x86_xadd & (1 << ix86_arch)) #ifndef TARGET_64BIT_DEFAULT @@ -547,7 +548,7 @@ extern int x86_prefetch_sse; aligned; the compiler cannot rely on having this alignment. */ #define PREFERRED_STACK_BOUNDARY ix86_preferred_stack_boundary -/* As of July 2001, many runtimes to not align the stack properly when +/* As of July 2001, many runtimes do not align the stack properly when entering main. This causes expand_main_function to forcibly align the stack, which results in aligned frames for functions called from main, though it does nothing for the alignment of main itself. */ @@ -576,7 +577,7 @@ extern int x86_prefetch_sse; /* Decide whether a variable of mode MODE should be 128 bit aligned. */ #define ALIGN_MODE_128(MODE) \ - ((MODE) == XFmode || (MODE) == TFmode || SSE_REG_MODE_P (MODE)) + ((MODE) == XFmode || SSE_REG_MODE_P (MODE)) /* The published ABIs say that doubles should be aligned on word boundaries, so lower the alignment for structure fields unless @@ -1374,9 +1375,10 @@ enum reg_class /* If we generate an insn to push BYTES bytes, this says how many the stack pointer really advances by. - On 386 pushw decrements by exactly 2 no matter what the position was. - On the 386 there is no pushb; we use pushw instead, and this - has the effect of rounding up to 2. + On 386, we have pushw instruction that decrements by exactly 2 no + matter what the position was, there is no pushb. + But as CIE data alignment factor on this arch is -4, we need to make + sure all stack pointer adjustments are in multiple of 4. For 64bit ABI we round up to 8 bytes. */ @@ -1384,7 +1386,7 @@ enum reg_class #define PUSH_ROUNDING(BYTES) \ (TARGET_64BIT \ ? (((BYTES) + 7) & (-8)) \ - : (((BYTES) + 1) & (-2))) + : (((BYTES) + 3) & (-4))) /* If defined, the maximum amount of space required for outgoing arguments will be computed and placed into the variable diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index 6229eeafe67..675d857baa1 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -81,6 +81,7 @@ (UNSPEC_FLDCW 25) (UNSPEC_REP 26) (UNSPEC_EH_RETURN 27) + (UNSPEC_LD_MPIC 28) ; load_macho_picbase ; For SSE/MMX support: (UNSPEC_FIX_NOTRUNC 30) @@ -1272,14 +1273,12 @@ "ix86_expand_move (HImode, operands); DONE;") (define_insn "*pushhi2" - [(set (match_operand:HI 0 "push_operand" "=<,<") - (match_operand:HI 1 "general_no_elim_operand" "n,r*m"))] + [(set (match_operand:HI 0 "push_operand" "=X") + (match_operand:HI 1 "nonmemory_no_elim_operand" "rn"))] "!TARGET_64BIT" - "@ - push{w}\t{|WORD PTR }%1 - push{w}\t%1" + "push{l}\t%k1" [(set_attr "type" "push") - (set_attr "mode" "HI")]) + (set_attr "mode" "SI")]) ;; For 64BIT abi we always round up to 8 bytes. (define_insn "*pushhi2_rex64" @@ -1288,7 +1287,7 @@ "TARGET_64BIT" "push{q}\t%q1" [(set_attr "type" "push") - (set_attr "mode" "QI")]) + (set_attr "mode" "DI")]) (define_insn "*movhi_1" [(set (match_operand:HI 0 "nonimmediate_operand" "=r,r,r,m") @@ -1433,18 +1432,16 @@ "ix86_expand_move (QImode, operands); DONE;") ;; emit_push_insn when it calls move_by_pieces requires an insn to -;; "push a byte". But actually we use pushw, which has the effect -;; of rounding the amount pushed up to a halfword. +;; "push a byte". But actually we use pushl, which has the effect +;; of rounding the amount pushed up to a word. (define_insn "*pushqi2" - [(set (match_operand:QI 0 "push_operand" "=X,X") - (match_operand:QI 1 "nonmemory_no_elim_operand" "n,r"))] + [(set (match_operand:QI 0 "push_operand" "=X") + (match_operand:QI 1 "nonmemory_no_elim_operand" "rn"))] "!TARGET_64BIT" - "@ - push{w}\t{|word ptr }%1 - push{w}\t%w1" + "push{l}\t%k1" [(set_attr "type" "push") - (set_attr "mode" "HI")]) + (set_attr "mode" "SI")]) ;; For 64BIT abi we always round up to 8 bytes. (define_insn "*pushqi2_rex64" @@ -1453,7 +1450,7 @@ "TARGET_64BIT" "push{q}\t%q1" [(set_attr "type" "push") - (set_attr "mode" "QI")]) + (set_attr "mode" "DI")]) ;; Situation is quite tricky about when to choose full sized (SImode) move ;; over QImode moves. For Q_REG -> Q_REG move we use full size only for @@ -1467,7 +1464,7 @@ ;; partial register stall can be caused there. Then we use movzx. (define_insn "*movqi_1" [(set (match_operand:QI 0 "nonimmediate_operand" "=q,q ,q ,r,r ,?r,m") - (match_operand:QI 1 "general_operand" " q,qn,qm,q,rn,m ,qn"))] + (match_operand:QI 1 "general_operand" " q,qn,qm,q,rn,qm,qn"))] "GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != MEM" { switch (get_attr_type (insn)) @@ -1483,7 +1480,8 @@ } } [(set (attr "type") - (cond [(eq_attr "alternative" "5") + (cond [(and (eq_attr "alternative" "5") + (not (match_operand:QI 1 "aligned_operand" ""))) (const_string "imovx") (ne (symbol_ref "optimize_size") (const_int 0)) (const_string "imov") @@ -1493,7 +1491,7 @@ (eq (symbol_ref "TARGET_QIMODE_MATH") (const_int 0)))) (const_string "imov") - (eq_attr "alternative" "3") + (eq_attr "alternative" "3,5") (const_string "imovx") (and (ne (symbol_ref "TARGET_MOVX") (const_int 0)) @@ -2145,24 +2143,16 @@ gcc_unreachable (); } } - [(set_attr "type" "ssemov,ssemov,ssemov") + [(set_attr "type" "sselog1,ssemov,ssemov") (set (attr "mode") - (cond [(eq (symbol_ref "TARGET_SSE2") (const_int 0)) + (cond [(ior (eq (symbol_ref "TARGET_SSE2") (const_int 0)) + (ne (symbol_ref "optimize_size") (const_int 0))) (const_string "V4SF") - - (eq_attr "alternative" "0,1") - (if_then_else - (ne (symbol_ref "optimize_size") - (const_int 0)) - (const_string "V4SF") - (const_string "TI")) - (eq_attr "alternative" "2") - (if_then_else - (ne (symbol_ref "optimize_size") - (const_int 0)) - (const_string "V4SF") - (const_string "TI"))] - (const_string "TI")))]) + (and (eq_attr "alternative" "2") + (ne (symbol_ref "TARGET_SSE_TYPELESS_STORES") + (const_int 0))) + (const_string "V4SF")] + (const_string "TI")))]) (define_insn "*movti_rex64" [(set (match_operand:TI 0 "nonimmediate_operand" "=r,o,x,x,xm") @@ -2190,7 +2180,7 @@ gcc_unreachable (); } } - [(set_attr "type" "*,*,ssemov,ssemov,ssemov") + [(set_attr "type" "*,*,sselog1,ssemov,ssemov") (set (attr "mode") (cond [(eq_attr "alternative" "2,3") (if_then_else @@ -2327,7 +2317,7 @@ gcc_unreachable (); } } - [(set_attr "type" "fmov,fmov,fmov,imov,imov,ssemov,ssemov,ssemov,ssemov,mmxmov,mmxmov,mmxmov") + [(set_attr "type" "fmov,fmov,fmov,imov,imov,sselog1,ssemov,ssemov,ssemov,mmxmov,mmxmov,mmxmov") (set (attr "mode") (cond [(eq_attr "alternative" "3,4,9,10") (const_string "SI") @@ -2509,7 +2499,7 @@ gcc_unreachable (); } } - [(set_attr "type" "fmov,fmov,fmov,multi,multi,ssemov,ssemov,ssemov,ssemov") + [(set_attr "type" "fmov,fmov,fmov,multi,multi,sselog1,ssemov,ssemov,ssemov") (set (attr "mode") (cond [(eq_attr "alternative" "0,1,2") (const_string "DF") @@ -2630,7 +2620,7 @@ gcc_unreachable(); } } - [(set_attr "type" "fmov,fmov,fmov,multi,multi,ssemov,ssemov,ssemov,ssemov") + [(set_attr "type" "fmov,fmov,fmov,multi,multi,sselog1,ssemov,ssemov,ssemov") (set (attr "mode") (cond [(eq_attr "alternative" "0,1,2") (const_string "DF") @@ -2941,7 +2931,7 @@ gcc_unreachable (); } } - [(set_attr "type" "*,*,ssemov,ssemov,ssemov") + [(set_attr "type" "*,*,sselog1,ssemov,ssemov") (set (attr "mode") (cond [(eq_attr "alternative" "2,3") (if_then_else @@ -3034,13 +3024,14 @@ [(set_attr "type" "imovx,alu1") (set_attr "mode" "HI")]) -(define_insn "*zero_extendqihi2_movzbw" +; zero extend to SImode here to avoid partial register stalls +(define_insn "*zero_extendqihi2_movzbl" [(set (match_operand:HI 0 "register_operand" "=r") (zero_extend:HI (match_operand:QI 1 "nonimmediate_operand" "qm")))] "(!TARGET_ZERO_EXTEND_WITH_AND || optimize_size) && reload_completed" - "movz{bw|x}\t{%1, %0|%0, %1}" + "movz{bl|x}\t{%1, %k0|%k0, %k1}" [(set_attr "type" "imovx") - (set_attr "mode" "HI")]) + (set_attr "mode" "SI")]) ;; For the movzbw case strip only the clobber (define_split @@ -7873,6 +7864,9 @@ (match_operand:SI 2 "const_int_operand" "")) (const_int 0)))] "ix86_match_ccmode (insn, CCNOmode) + && INTVAL (operands[1]) > 0 + && INTVAL (operands[2]) >= 0 + && INTVAL (operands[1]) + INTVAL (operands[2]) <= 32 && (GET_MODE (operands[0]) == SImode || (TARGET_64BIT && GET_MODE (operands[0]) == DImode) || GET_MODE (operands[0]) == HImode @@ -7888,8 +7882,8 @@ (const_int 0)))] "TARGET_64BIT && ix86_match_ccmode (insn, CCNOmode) - /* The code below cannot deal with constants outside HOST_WIDE_INT. */ - && INTVAL (operands[1]) + INTVAL (operands[2]) < HOST_BITS_PER_WIDE_INT + && INTVAL (operands[1]) > 0 + && INTVAL (operands[2]) >= 0 /* Ensure that resulting mask is zero or sign extended operand. */ && (INTVAL (operands[1]) + INTVAL (operands[2]) <= 32 || (INTVAL (operands[1]) + INTVAL (operands[2]) == 64 @@ -7944,8 +7938,11 @@ val = gen_lowpart (QImode, val); } - mask = ((HOST_WIDE_INT)1 << (pos + len)) - 1; - mask &= ~(((HOST_WIDE_INT)1 << pos) - 1); + if (len == HOST_BITS_PER_WIDE_INT) + mask = -1; + else + mask = ((HOST_WIDE_INT)1 << len) - 1; + mask <<= pos; operands[2] = gen_rtx_AND (mode, val, gen_int_mode (mask, mode)); }) @@ -9699,7 +9696,7 @@ (define_expand "absxf2" [(set (match_operand:XF 0 "nonimmediate_operand" "") - (neg:XF (match_operand:XF 1 "nonimmediate_operand" "")))] + (abs:XF (match_operand:XF 1 "nonimmediate_operand" "")))] "TARGET_80387" "ix86_expand_fp_absneg_operator (ABS, XFmode, operands); DONE;") @@ -13861,7 +13858,17 @@ (unspec:SI [(const_int 0)] UNSPEC_SET_GOT)) (clobber (reg:CC FLAGS_REG))] "!TARGET_64BIT" - { return output_set_got (operands[0]); } + { return output_set_got (operands[0], NULL_RTX); } + [(set_attr "type" "multi") + (set_attr "length" "12")]) + +(define_insn "set_got_labelled" + [(set (match_operand:SI 0 "register_operand" "=r") + (unspec:SI [(label_ref (match_operand 1 "" ""))] + UNSPEC_SET_GOT)) + (clobber (reg:CC FLAGS_REG))] + "!TARGET_64BIT" + { return output_set_got (operands[0], operands[1]); } [(set_attr "type" "multi") (set_attr "length" "12")]) @@ -18803,7 +18810,22 @@ [(label_ref (match_operand 0 "" ""))] "!TARGET_64BIT && flag_pic" { - emit_insn (gen_set_got (pic_offset_table_rtx)); + if (TARGET_MACHO) + { + rtx xops[3]; + rtx picreg = gen_rtx_REG (Pmode, PIC_OFFSET_TABLE_REGNUM); + rtx label_rtx = gen_label_rtx (); + emit_insn (gen_set_got_labelled (pic_offset_table_rtx, label_rtx)); + emit_label (label_rtx); + xops[0] = xops[1] = picreg; + xops[2] = gen_rtx_CONST (SImode, + gen_rtx_MINUS (SImode, + gen_rtx_LABEL_REF (SImode, label_rtx), + gen_rtx_SYMBOL_REF (SImode, GOT_SYMBOL_NAME))); + ix86_expand_binary_operator (MINUS, SImode, xops); + } + else + emit_insn (gen_set_got (pic_offset_table_rtx)); DONE; }) diff --git a/gcc/config/i386/mmintrin.h b/gcc/config/i386/mmintrin.h index 252364b803e..b98caf0cac2 100644 --- a/gcc/config/i386/mmintrin.h +++ b/gcc/config/i386/mmintrin.h @@ -274,11 +274,13 @@ _m_paddd (__m64 __m1, __m64 __m2) } /* Add the 64-bit values in M1 to the 64-bit values in M2. */ +#ifdef __SSE2__ static __inline __m64 __attribute__((__always_inline__)) _mm_add_si64 (__m64 __m1, __m64 __m2) { return (__m64) __builtin_ia32_paddq ((long long)__m1, (long long)__m2); } +#endif /* Add the 8-bit values in M1 to the 8-bit values in M2 using signed saturated arithmetic. */ @@ -376,11 +378,13 @@ _m_psubd (__m64 __m1, __m64 __m2) } /* Add the 64-bit values in M1 to the 64-bit values in M2. */ +#ifdef __SSE2__ static __inline __m64 __attribute__((__always_inline__)) _mm_sub_si64 (__m64 __m1, __m64 __m2) { return (__m64) __builtin_ia32_psubq ((long long)__m1, (long long)__m2); } +#endif /* Subtract the 8-bit values in M2 from the 8-bit values in M1 using signed saturating arithmetic. */ diff --git a/gcc/config/i386/mmx.md b/gcc/config/i386/mmx.md index 2f0065d370c..4f0ab2ca3ee 100644 --- a/gcc/config/i386/mmx.md +++ b/gcc/config/i386/mmx.md @@ -82,7 +82,7 @@ movq\t{%1, %0|%0, %1} movd\t{%1, %0|%0, %1} movd\t{%1, %0|%0, %1}" - [(set_attr "type" "imov,imov,mmxmov,mmxmov,mmxmov,ssecvt,ssecvt,ssemov,ssemov,ssemov,ssemov,ssemov") + [(set_attr "type" "imov,imov,mmx,mmxmov,mmxmov,ssecvt,ssecvt,sselog1,ssemov,ssemov,ssemov,ssemov") (set_attr "unit" "*,*,*,*,*,mmx,mmx,*,*,*,*,*") (set_attr "mode" "DI")]) @@ -108,7 +108,7 @@ movlps\t{%1, %0|%0, %1} # #" - [(set_attr "type" "mmxmov,mmxmov,mmxmov,ssecvt,ssecvt,ssemov,ssemov,ssemov,ssemov,ssemov,ssemov,ssemov,*,*") + [(set_attr "type" "mmx,mmxmov,mmxmov,ssecvt,ssecvt,sselog1,ssemov,ssemov,sselog1,ssemov,ssemov,ssemov,*,*") (set_attr "unit" "*,*,*,mmx,mmx,*,*,*,*,*,*,*,*,*") (set_attr "mode" "DI,DI,DI,DI,DI,TI,DI,DI,V4SF,V4SF,V2SF,V2SF,DI,DI")]) @@ -142,7 +142,7 @@ movlps\t{%1, %0|%0, %1} movd\t{%1, %0|%0, %1} movd\t{%1, %0|%0, %1}" - [(set_attr "type" "imov,imov,mmxmov,mmxmov,mmxmov,ssecvt,ssecvt,ssemov,ssemov,ssemov,ssemov,ssemov,ssemov") + [(set_attr "type" "imov,imov,mmx,mmxmov,mmxmov,ssecvt,ssecvt,ssemov,sselog1,ssemov,ssemov,ssemov,ssemov") (set_attr "unit" "*,*,*,*,*,mmx,mmx,*,*,*,*,*,*") (set_attr "mode" "DI,DI,DI,DI,DI,DI,DI,V4SF,V4SF,V2SF,V2SF,DI,DI")]) @@ -165,7 +165,7 @@ movlps\t{%1, %0|%0, %1} # #" - [(set_attr "type" "mmxmov,mmxmov,mmxmov,ssecvt,ssecvt,ssemov,ssemov,ssemov,ssemov,*,*") + [(set_attr "type" "mmx,mmxmov,mmxmov,ssecvt,ssecvt,sselog1,ssemov,ssemov,ssemov,*,*") (set_attr "unit" "*,*,*,mmx,mmx,*,*,*,*,*,*") (set_attr "mode" "DI,DI,DI,DI,DI,V4SF,V4SF,V2SF,V2SF,DI,DI")]) @@ -573,7 +573,7 @@ [(plus:DI (match_operand:DI 1 "nonimmediate_operand" "%0") (match_operand:DI 2 "nonimmediate_operand" "ym"))] UNSPEC_NOP))] - "TARGET_MMX && ix86_binary_operator_ok (PLUS, DImode, operands)" + "TARGET_SSE2 && ix86_binary_operator_ok (PLUS, DImode, operands)" "paddq\t{%2, %0|%0, %2}" [(set_attr "type" "mmxadd") (set_attr "mode" "DI")]) @@ -614,7 +614,7 @@ [(minus:DI (match_operand:DI 1 "register_operand" "0") (match_operand:DI 2 "nonimmediate_operand" "ym"))] UNSPEC_NOP))] - "TARGET_MMX" + "TARGET_SSE2" "psubq\t{%2, %0|%0, %2}" [(set_attr "type" "mmxadd") (set_attr "mode" "DI")]) diff --git a/gcc/config/i386/netware.h b/gcc/config/i386/netware.h index 197bdc5a6a2..3630765c7aa 100644 --- a/gcc/config/i386/netware.h +++ b/gcc/config/i386/netware.h @@ -71,7 +71,7 @@ Boston, MA 02110-1301, USA. */ returns float values in the 387, and uses MSVC bit field layout. */ #undef TARGET_SUBTARGET_DEFAULT #define TARGET_SUBTARGET_DEFAULT (MASK_80387 | MASK_IEEE_FP | \ - MASK_FLOAT_RETURNS | MASK_MS_BITFIELD_LAYOUT) + MASK_FLOAT_RETURNS | MASK_ALIGN_DOUBLE | MASK_MS_BITFIELD_LAYOUT) #undef MATH_LIBRARY #define MATH_LIBRARY "" diff --git a/gcc/config/i386/nwld.c b/gcc/config/i386/nwld.c index 962432e9a88..4688ca0108c 100644 --- a/gcc/config/i386/nwld.c +++ b/gcc/config/i386/nwld.c @@ -48,7 +48,7 @@ nwld_named_section_asm_out_constructor (rtx symbol, int priority) MAX_INIT_PRIORITY - priority); #endif - named_section_flags (section, 0); + switch_to_section (get_section (section, 0, NULL)); assemble_align (POINTER_SIZE); assemble_integer (symbol, POINTER_SIZE / BITS_PER_UNIT, POINTER_SIZE, 1); } @@ -68,7 +68,7 @@ nwld_named_section_asm_out_destructor (rtx symbol, int priority) MAX_INIT_PRIORITY - priority); #endif - named_section_flags (section, 0); + switch_to_section (get_section (section, 0, NULL)); assemble_align (POINTER_SIZE); assemble_integer (symbol, POINTER_SIZE / BITS_PER_UNIT, POINTER_SIZE, 1); } diff --git a/gcc/config/i386/nwld.h b/gcc/config/i386/nwld.h index 7585f86974e..fe132afbf84 100644 --- a/gcc/config/i386/nwld.h +++ b/gcc/config/i386/nwld.h @@ -31,7 +31,8 @@ Boston, MA 02110-1301, USA. */ #define LINKER_NAME "nwld" #undef LINK_SPEC -#define LINK_SPEC "--format nlm %{static:%{!nostdlib:%{!nodefaultlib:%eStatic linking is not supported.\n}}}" +#define LINK_SPEC "--format:NLM --extensions:GNU" \ + " %{static:%{!nostdlib:%{!nodefaultlib:%eStatic linking is not supported.\n}}}" #undef LINK_GCC_C_SEQUENCE_SPEC #define LINK_GCC_C_SEQUENCE_SPEC "%L %G" diff --git a/gcc/config/i386/pmm_malloc.h b/gcc/config/i386/pmm_malloc.h index ae09aad31c6..744ac6d41cc 100644 --- a/gcc/config/i386/pmm_malloc.h +++ b/gcc/config/i386/pmm_malloc.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2004 Free Software Foundation, Inc. +/* Copyright (C) 2004, 2006 Free Software Foundation, Inc. This file is part of GCC. @@ -31,7 +31,11 @@ /* We can't depend on since the prototype of posix_memalign may not be visible. */ +#ifndef __cplusplus extern int posix_memalign (void **, size_t, size_t); +#else +extern "C" int posix_memalign (void **, size_t, size_t) throw (); +#endif static __inline void * _mm_malloc (size_t size, size_t alignment) diff --git a/gcc/config/i386/predicates.md b/gcc/config/i386/predicates.md index 4a7d88a7f5d..bc16628439b 100644 --- a/gcc/config/i386/predicates.md +++ b/gcc/config/i386/predicates.md @@ -687,7 +687,7 @@ return parts.seg == SEG_DEFAULT; }) -;; Return nonzero if the rtx is known aligned. +;; Return nonzero if the rtx is known to be at least 32 bits aligned. (define_predicate "aligned_operand" (match_operand 0 "general_operand") { @@ -701,6 +701,10 @@ /* Don't even try to do any aligned optimizations with volatiles. */ if (MEM_VOLATILE_P (op)) return 0; + + if (MEM_ALIGN (op) >= 32) + return 1; + op = XEXP (op, 0); /* Pushes and pops are only valid on the stack pointer. */ diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md index 6535d687b3b..bd943f7665d 100644 --- a/gcc/config/i386/sse.md +++ b/gcc/config/i386/sse.md @@ -81,24 +81,14 @@ } [(set_attr "type" "sselog1,ssemov,ssemov") (set (attr "mode") - (cond [(eq (symbol_ref "TARGET_SSE2") (const_int 0)) - (const_string "V4SF") - - (eq_attr "alternative" "0,1") - (if_then_else - (ne (symbol_ref "optimize_size") - (const_int 0)) - (const_string "V4SF") - (const_string "TI")) - (eq_attr "alternative" "2") - (if_then_else - (ior (ne (symbol_ref "TARGET_SSE_TYPELESS_STORES") - (const_int 0)) - (ne (symbol_ref "optimize_size") - (const_int 0))) - (const_string "V4SF") - (const_string "TI"))] - (const_string "TI")))]) + (if_then_else + (ior (ior (ne (symbol_ref "optimize_size") (const_int 0)) + (eq (symbol_ref "TARGET_SSE2") (const_int 0))) + (and (eq_attr "alternative" "2") + (ne (symbol_ref "TARGET_SSE_TYPELESS_STORES") + (const_int 0)))) + (const_string "V4SF") + (const_string "TI")))]) (define_expand "movv4sf" [(set (match_operand:V4SF 0 "nonimmediate_operand" "") @@ -167,23 +157,14 @@ } [(set_attr "type" "sselog1,ssemov,ssemov") (set (attr "mode") - (cond [(eq (symbol_ref "TARGET_SSE2") (const_int 0)) - (const_string "V4SF") - (eq_attr "alternative" "0,1") - (if_then_else - (ne (symbol_ref "optimize_size") - (const_int 0)) - (const_string "V4SF") - (const_string "V2DF")) - (eq_attr "alternative" "2") - (if_then_else - (ior (ne (symbol_ref "TARGET_SSE_TYPELESS_STORES") - (const_int 0)) - (ne (symbol_ref "optimize_size") - (const_int 0))) - (const_string "V4SF") - (const_string "V2DF"))] - (const_string "V2DF")))]) + (if_then_else + (ior (ior (ne (symbol_ref "optimize_size") (const_int 0)) + (eq (symbol_ref "TARGET_SSE2") (const_int 0))) + (and (eq_attr "alternative" "2") + (ne (symbol_ref "TARGET_SSE_TYPELESS_STORES") + (const_int 0)))) + (const_string "V4SF") + (const_string "V2DF")))]) (define_split [(set (match_operand:V2DF 0 "register_operand" "") @@ -1063,8 +1044,8 @@ [(set (match_operand:V4SF 0 "nonimmediate_operand" "=x,x,m") (vec_select:V4SF (vec_concat:V8SF - (match_operand:V4SF 1 "nonimmediate_operand" " 0,o,x") - (match_operand:V4SF 2 "nonimmediate_operand" " x,0,0")) + (match_operand:V4SF 1 "nonimmediate_operand" " 0,0,0") + (match_operand:V4SF 2 "nonimmediate_operand" " x,o,x")) (parallel [(const_int 6) (const_int 7) (const_int 2) @@ -1072,8 +1053,8 @@ "TARGET_SSE && !(MEM_P (operands[1]) && MEM_P (operands[2]))" "@ movhlps\t{%2, %0|%0, %2} - movlps\t{%H1, %0|%0, %H1} - movhps\t{%1, %0|%0, %1}" + movlps\t{%H2, %0|%0, %H2} + movhps\t{%2, %0|%0, %2}" [(set_attr "type" "ssemov") (set_attr "mode" "V4SF,V2SF,V2SF")]) @@ -1525,7 +1506,7 @@ "TARGET_SSE2" "sqrtsd\t{%1, %0|%0, %1}" [(set_attr "type" "sse") - (set_attr "mode" "SF")]) + (set_attr "mode" "DF")]) ;; ??? For !flag_finite_math_only, the representation with SMIN/SMAX ;; isn't really correct, as those rtl operators aren't defined when @@ -3483,6 +3464,34 @@ operands[1] = gen_rtx_REG (DImode, REGNO (operands[1])); }) +(define_insn "*vec_extractv2di_1_sse2" + [(set (match_operand:DI 0 "nonimmediate_operand" "=m,x,x") + (vec_select:DI + (match_operand:V2DI 1 "nonimmediate_operand" "x,0,o") + (parallel [(const_int 1)])))] + "TARGET_SSE2 && !(MEM_P (operands[0]) && MEM_P (operands[1]))" + "@ + movhps\t{%1, %0|%0, %1} + psrldq\t{$4, %0|%0, 4} + movq\t{%H1, %0|%0, %H1}" + [(set_attr "type" "ssemov,sseishft,ssemov") + (set_attr "mode" "V2SF,TI,TI")]) + +;; Not sure this is ever used, but it doesn't hurt to have it. -aoliva +(define_insn "*vec_extractv2di_1_sse" + [(set (match_operand:DI 0 "nonimmediate_operand" "=m,x,x") + (vec_select:DI + (match_operand:V2DI 1 "nonimmediate_operand" "x,x,o") + (parallel [(const_int 1)])))] + "!TARGET_SSE2 && TARGET_SSE + && !(MEM_P (operands[0]) && MEM_P (operands[1]))" + "@ + movhps\t{%1, %0|%0, %1} + movhlps\t{%1, %0|%0, %1} + movlps\t{%H1, %0|%0, %H1}" + [(set_attr "type" "ssemov") + (set_attr "mode" "V2SF,V4SF,V2SF")]) + (define_insn "*vec_dupv4si" [(set (match_operand:V4SI 0 "register_operand" "=Y,x") (vec_duplicate:V4SI diff --git a/gcc/config/i386/sync.md b/gcc/config/i386/sync.md index 03f87b072db..fb3976cc6bc 100644 --- a/gcc/config/i386/sync.md +++ b/gcc/config/i386/sync.md @@ -24,13 +24,54 @@ (define_mode_attr modeconstraint [(QI "q") (HI "r") (SI "r") (DI "r")]) (define_mode_attr immconstraint [(QI "i") (HI "i") (SI "i") (DI "e")]) +(define_mode_macro CASMODE [QI HI SI (DI "TARGET_64BIT || TARGET_CMPXCHG8B") + (TI "TARGET_64BIT && TARGET_CMPXCHG16B")]) +(define_mode_macro DCASMODE + [(DI "!TARGET_64BIT && TARGET_CMPXCHG8B && !flag_pic") + (TI "TARGET_64BIT && TARGET_CMPXCHG16B")]) +(define_mode_attr doublemodesuffix [(DI "8") (TI "16")]) +(define_mode_attr DCASHMODE [(DI "SI") (TI "DI")]) + ;; ??? It would be possible to use cmpxchg8b on pentium for DImode ;; changes. It's complicated because the insn uses ecx:ebx as the ;; new value; note that the registers are reversed from the order ;; that they'd be in with (reg:DI 2 ecx). Similarly for TImode ;; data in 64-bit mode. -(define_insn "sync_compare_and_swap" +(define_expand "sync_compare_and_swap" + [(parallel + [(set (match_operand:CASMODE 0 "register_operand" "") + (match_operand:CASMODE 1 "memory_operand" "")) + (set (match_dup 1) + (unspec_volatile:CASMODE + [(match_dup 1) + (match_operand:CASMODE 2 "register_operand" "") + (match_operand:CASMODE 3 "register_operand" "")] + UNSPECV_CMPXCHG_1)) + (clobber (reg:CC FLAGS_REG))])] + "TARGET_CMPXCHG" +{ + if ((mode == DImode && !TARGET_64BIT) || mode == TImode) + { + enum machine_mode hmode = mode == DImode ? SImode : DImode; + rtx low = simplify_gen_subreg (hmode, operands[3], mode, 0); + rtx high = simplify_gen_subreg (hmode, operands[3], mode, + GET_MODE_SIZE (hmode)); + low = force_reg (hmode, low); + high = force_reg (hmode, high); + if (mode == DImode) + emit_insn (gen_sync_double_compare_and_swapdi + (operands[0], operands[1], operands[2], low, high)); + else if (mode == TImode) + emit_insn (gen_sync_double_compare_and_swapti + (operands[0], operands[1], operands[2], low, high)); + else + gcc_unreachable (); + DONE; + } +}) + +(define_insn "*sync_compare_and_swap" [(set (match_operand:IMODE 0 "register_operand" "=a") (match_operand:IMODE 1 "memory_operand" "+m")) (set (match_dup 1) @@ -43,19 +84,47 @@ "TARGET_CMPXCHG" "lock\;cmpxchg{}\t{%3, %1|%1, %3}") +(define_insn "sync_double_compare_and_swap" + [(set (match_operand:DCASMODE 0 "register_operand" "=A") + (match_operand:DCASMODE 1 "memory_operand" "+m")) + (set (match_dup 1) + (unspec_volatile:DCASMODE + [(match_dup 1) + (match_operand:DCASMODE 2 "register_operand" "A") + (match_operand: 3 "register_operand" "b") + (match_operand: 4 "register_operand" "c")] + UNSPECV_CMPXCHG_1)) + (clobber (reg:CC FLAGS_REG))] + "" + "lock\;cmpxchgb\t%1") + +(define_insn "*sync_double_compare_and_swapdi_pic" + [(set (match_operand:DI 0 "register_operand" "=A") + (match_operand:DI 1 "memory_operand" "+m")) + (set (match_dup 1) + (unspec_volatile:DI + [(match_dup 1) + (match_operand:DI 2 "register_operand" "A") + (match_operand:SI 3 "register_operand" "r") + (match_operand:SI 4 "register_operand" "c")] + UNSPECV_CMPXCHG_1)) + (clobber (reg:CC FLAGS_REG))] + "!TARGET_64BIT && TARGET_CMPXCHG8B && flag_pic" + "xchg{l}\t%%ebx, %3\;lock\;cmpxchg8b\t%1\;xchg{l}\t%%ebx, %3") + (define_expand "sync_compare_and_swap_cc" [(parallel - [(set (match_operand:IMODE 0 "register_operand" "") - (match_operand:IMODE 1 "memory_operand" "")) + [(set (match_operand:CASMODE 0 "register_operand" "") + (match_operand:CASMODE 1 "memory_operand" "")) (set (match_dup 1) - (unspec_volatile:IMODE + (unspec_volatile:CASMODE [(match_dup 1) - (match_operand:IMODE 2 "register_operand" "") - (match_operand:IMODE 3 "register_operand" "")] + (match_operand:CASMODE 2 "register_operand" "") + (match_operand:CASMODE 3 "register_operand" "")] UNSPECV_CMPXCHG_1)) (set (match_dup 4) (compare:CCZ - (unspec_volatile:IMODE + (unspec_volatile:CASMODE [(match_dup 1) (match_dup 2) (match_dup 3)] UNSPECV_CMPXCHG_2) (match_dup 2)))])] "TARGET_CMPXCHG" @@ -64,6 +133,24 @@ ix86_compare_op0 = operands[3]; ix86_compare_op1 = NULL; ix86_compare_emitted = operands[4]; + if ((mode == DImode && !TARGET_64BIT) || mode == TImode) + { + enum machine_mode hmode = mode == DImode ? SImode : DImode; + rtx low = simplify_gen_subreg (hmode, operands[3], mode, 0); + rtx high = simplify_gen_subreg (hmode, operands[3], mode, + GET_MODE_SIZE (hmode)); + low = force_reg (hmode, low); + high = force_reg (hmode, high); + if (mode == DImode) + emit_insn (gen_sync_double_compare_and_swap_ccdi + (operands[0], operands[1], operands[2], low, high)); + else if (mode == TImode) + emit_insn (gen_sync_double_compare_and_swap_ccti + (operands[0], operands[1], operands[2], low, high)); + else + gcc_unreachable (); + DONE; + } }) (define_insn "*sync_compare_and_swap_cc" @@ -83,6 +170,44 @@ "TARGET_CMPXCHG" "lock\;cmpxchg{}\t{%3, %1|%1, %3}") +(define_insn "sync_double_compare_and_swap_cc" + [(set (match_operand:DCASMODE 0 "register_operand" "=A") + (match_operand:DCASMODE 1 "memory_operand" "+m")) + (set (match_dup 1) + (unspec_volatile:DCASMODE + [(match_dup 1) + (match_operand:DCASMODE 2 "register_operand" "A") + (match_operand: 3 "register_operand" "b") + (match_operand: 4 "register_operand" "c")] + UNSPECV_CMPXCHG_1)) + (set (reg:CCZ FLAGS_REG) + (compare:CCZ + (unspec_volatile:DCASMODE + [(match_dup 1) (match_dup 2) (match_dup 3) (match_dup 4)] + UNSPECV_CMPXCHG_2) + (match_dup 2)))] + "" + "lock\;cmpxchgb\t%1") + +(define_insn "*sync_double_compare_and_swap_ccdi_pic" + [(set (match_operand:DI 0 "register_operand" "=A") + (match_operand:DI 1 "memory_operand" "+m")) + (set (match_dup 1) + (unspec_volatile:DI + [(match_dup 1) + (match_operand:DI 2 "register_operand" "A") + (match_operand:SI 3 "register_operand" "r") + (match_operand:SI 4 "register_operand" "c")] + UNSPECV_CMPXCHG_1)) + (set (reg:CCZ FLAGS_REG) + (compare:CCZ + (unspec_volatile:DI + [(match_dup 1) (match_dup 2) (match_dup 3) (match_dup 4)] + UNSPECV_CMPXCHG_2) + (match_dup 2)))] + "!TARGET_64BIT && TARGET_CMPXCHG8B && flag_pic" + "xchg{l}\t%%ebx, %3\;lock\;cmpxchg8b\t%1\;xchg{l}\t%%ebx, %3") + (define_insn "sync_old_add" [(set (match_operand:IMODE 0 "register_operand" "=") (unspec_volatile:IMODE diff --git a/gcc/config/i386/t-nwld b/gcc/config/i386/t-nwld index fbca0dfe933..6f6905541ec 100644 --- a/gcc/config/i386/t-nwld +++ b/gcc/config/i386/t-nwld @@ -40,7 +40,7 @@ SHLIB_LINK = set -e; \ echo "name $(SHLIB_NAME)" >>@shlib_base_name@.def; \ echo "version $(version)" | sed "s!\.!,!g" >>@shlib_base_name@.def; \ touch libgcc/build; \ - echo "build $$$$(expr $$$$(>@shlib_base_name@.def; \ + echo "build $$$$(expr $$$$(>@shlib_base_name@.def; \ echo "export @$(SHLIB_MAP)" >>@shlib_base_name@.def; \ if mpkxdc -n -p @shlib_base_name@.xdc; \ then echo "xdcdata @shlib_base_name@.xdc" >>@shlib_base_name@.def; \ @@ -51,7 +51,7 @@ SHLIB_LINK = set -e; \ -Wl,--Map,--map-info,full,--strip-all,--def-file,@shlib_base_name@.def; \ rm -f @shlib_base_name@.imp; $(LN_S) $(SHLIB_MAP) @shlib_base_name@.imp; \ rm -f libgcc.imp; $(LN_S) @shlib_base_name@.imp libgcc.imp; \ - expr $$$$(libgcc/build + expr $$$$(libgcc/build # $(slibdir) double quoted to protect it from expansion while building # libgcc.mk. We want this delayed until actual install time. diff --git a/gcc/config/i386/winnt.c b/gcc/config/i386/winnt.c index f8a36ff1ba1..d80db9ec616 100644 --- a/gcc/config/i386/winnt.c +++ b/gcc/config/i386/winnt.c @@ -155,7 +155,7 @@ i386_pe_dllimport_p (tree decl) /* The DECL_DLLIMPORT_P flag was set for decls in the class definition by targetm.cxx.adjust_class_at_definition. Check again to emit - warnings if the class attribute has been overriden by an + warnings if the class attribute has been overridden by an out-of-class definition. */ if (associated_type (decl) && lookup_attribute ("dllimport", diff --git a/gcc/config/i386/xmmintrin.h b/gcc/config/i386/xmmintrin.h index b80d6b58ec7..20c41c739d5 100644 --- a/gcc/config/i386/xmmintrin.h +++ b/gcc/config/i386/xmmintrin.h @@ -1075,6 +1075,7 @@ _m_pmulhuw (__m64 __A, __m64 __B) /* Return a combination of the four 16-bit values in A. The selector must be an immediate. */ +#ifdef __SSE2__ #if 0 static __inline __m64 __attribute__((__always_inline__)) _mm_shuffle_pi16 (__m64 __A, int __N) @@ -1092,6 +1093,7 @@ _m_pshufw (__m64 __A, int __N) ((__m64) __builtin_ia32_pshufw ((__v4hi)(A), (N))) #define _m_pshufw(A, N) _mm_shuffle_pi16 ((A), (N)) #endif +#endif /* Conditionally store byte elements of A into P. The high bit of each byte in the selector N determines whether the corresponding byte from @@ -1197,14 +1199,14 @@ _mm_pause (void) #define _MM_TRANSPOSE4_PS(row0, row1, row2, row3) \ do { \ __v4sf __r0 = (row0), __r1 = (row1), __r2 = (row2), __r3 = (row3); \ - __v4sf __t0 = __builtin_ia32_shufps (__r0, __r1, 0x44); \ - __v4sf __t2 = __builtin_ia32_shufps (__r0, __r1, 0xEE); \ - __v4sf __t1 = __builtin_ia32_shufps (__r2, __r3, 0x44); \ - __v4sf __t3 = __builtin_ia32_shufps (__r2, __r3, 0xEE); \ - (row0) = __builtin_ia32_shufps (__t0, __t1, 0x88); \ - (row1) = __builtin_ia32_shufps (__t0, __t1, 0xDD); \ - (row2) = __builtin_ia32_shufps (__t2, __t3, 0x88); \ - (row3) = __builtin_ia32_shufps (__t2, __t3, 0xDD); \ + __v4sf __t0 = __builtin_ia32_unpcklps (__r0, __r1); \ + __v4sf __t1 = __builtin_ia32_unpcklps (__r2, __r3); \ + __v4sf __t2 = __builtin_ia32_unpckhps (__r0, __r1); \ + __v4sf __t3 = __builtin_ia32_unpckhps (__r2, __r3); \ + (row0) = __builtin_ia32_movlhps (__t0, __t1); \ + (row1) = __builtin_ia32_movhlps (__t1, __t0); \ + (row2) = __builtin_ia32_movlhps (__t2, __t3); \ + (row3) = __builtin_ia32_movhlps (__t3, __t2); \ } while (0) /* For backward source compatibility. */ diff --git a/gcc/config/ia64/hpux.h b/gcc/config/ia64/hpux.h index 512f7c8f7ad..9ffe1fddf30 100644 --- a/gcc/config/ia64/hpux.h +++ b/gcc/config/ia64/hpux.h @@ -195,10 +195,12 @@ do { \ /* Put all *xf routines in libgcc, regardless of long double size. */ #undef LIBGCC2_HAS_XF_MODE #define LIBGCC2_HAS_XF_MODE 1 +#define XF_SIZE 64 /* Put all *tf routines in libgcc, regardless of long double size. */ #undef LIBGCC2_HAS_TF_MODE #define LIBGCC2_HAS_TF_MODE 1 +#define TF_SIZE 113 /* HP-UX headers are C++-compatible. */ #define NO_IMPLICIT_EXTERN_C diff --git a/gcc/config/ia64/ia64-c.c b/gcc/config/ia64/ia64-c.c index d51a98d6ebc..9bb2a800755 100644 --- a/gcc/config/ia64/ia64-c.c +++ b/gcc/config/ia64/ia64-c.c @@ -40,13 +40,13 @@ ia64_hpux_handle_builtin_pragma (cpp_reader *pfile ATTRIBUTE_UNUSED) enum cpp_ttype type; tree x; - type = c_lex (&x); + type = pragma_lex (&x); while (type == CPP_NAME) { ia64_hpux_add_pragma_builtin (x); - type = c_lex (&x); + type = pragma_lex (&x); if (type == CPP_COMMA) - type = c_lex (&x); + type = pragma_lex (&x); } if (type != CPP_EOF) warning (OPT_Wpragmas, "malformed #pragma builtin"); diff --git a/gcc/config/ia64/ia64-protos.h b/gcc/config/ia64/ia64-protos.h index 6de20c8afd1..b05cdab6bf4 100644 --- a/gcc/config/ia64/ia64-protos.h +++ b/gcc/config/ia64/ia64-protos.h @@ -102,14 +102,6 @@ extern int ia64_dbx_register_number (int); extern rtx ia64_return_addr_rtx (HOST_WIDE_INT, rtx); extern void ia64_split_return_addr_rtx (rtx); -#ifdef SDATA_SECTION_ASM_OP -extern void sdata_section (void); -#endif - -#ifdef SBSS_SECTION_ASM_OP -extern void sbss_section (void); -#endif - #ifdef ARGS_SIZE_RTX /* expr.h defines ARGS_SIZE_RTX and `enum direction'. */ extern enum direction ia64_hpux_function_arg_padding (enum machine_mode, tree); diff --git a/gcc/config/ia64/ia64.c b/gcc/config/ia64/ia64.c index b11583d19a7..e6767538d68 100644 --- a/gcc/config/ia64/ia64.c +++ b/gcc/config/ia64/ia64.c @@ -229,16 +229,16 @@ static void ia64_output_mi_thunk (FILE *, tree, HOST_WIDE_INT, HOST_WIDE_INT, tree); static void ia64_file_start (void); -static void ia64_select_rtx_section (enum machine_mode, rtx, - unsigned HOST_WIDE_INT); +static section *ia64_select_rtx_section (enum machine_mode, rtx, + unsigned HOST_WIDE_INT); static void ia64_output_dwarf_dtprel (FILE *, int, rtx) ATTRIBUTE_UNUSED; -static void ia64_rwreloc_select_section (tree, int, unsigned HOST_WIDE_INT) +static section *ia64_rwreloc_select_section (tree, int, unsigned HOST_WIDE_INT) ATTRIBUTE_UNUSED; static void ia64_rwreloc_unique_section (tree, int) ATTRIBUTE_UNUSED; -static void ia64_rwreloc_select_rtx_section (enum machine_mode, rtx, - unsigned HOST_WIDE_INT) +static section *ia64_rwreloc_select_rtx_section (enum machine_mode, rtx, + unsigned HOST_WIDE_INT) ATTRIBUTE_UNUSED; static unsigned int ia64_section_type_flags (tree, const char *, int); static void ia64_hpux_add_extern_decl (tree decl) @@ -891,15 +891,12 @@ gen_thread_pointer (void) static rtx ia64_expand_tls_address (enum tls_model tls_kind, rtx op0, rtx op1, - HOST_WIDE_INT addend) + rtx orig_op1, HOST_WIDE_INT addend) { rtx tga_op1, tga_op2, tga_ret, tga_eqv, tmp, insns; - rtx orig_op0 = op0, orig_op1 = op1; + rtx orig_op0 = op0; HOST_WIDE_INT addend_lo, addend_hi; - addend_lo = ((addend & 0x3fff) ^ 0x2000) - 0x2000; - addend_hi = addend - addend_lo; - switch (tls_kind) { case TLS_MODEL_GLOBAL_DYNAMIC: @@ -959,6 +956,9 @@ ia64_expand_tls_address (enum tls_model tls_kind, rtx op0, rtx op1, break; case TLS_MODEL_INITIAL_EXEC: + addend_lo = ((addend & 0x3fff) ^ 0x2000) - 0x2000; + addend_hi = addend - addend_lo; + op1 = plus_constant (op1, addend_hi); addend = addend_lo; @@ -1023,7 +1023,7 @@ ia64_expand_move (rtx op0, rtx op1) tls_kind = tls_symbolic_operand_type (sym); if (tls_kind) - return ia64_expand_tls_address (tls_kind, op0, sym, addend); + return ia64_expand_tls_address (tls_kind, op0, sym, op1, addend); if (any_offset_symbol_operand (sym, mode)) addend = 0; @@ -2039,8 +2039,13 @@ ia64_expand_atomic_op (enum rtx_code code, rtx mem, rtx val, enum insn_code icode; /* Special case for using fetchadd. */ - if ((mode == SImode || mode == DImode) && fetchadd_operand (val, mode)) + if ((mode == SImode || mode == DImode) + && (code == PLUS || code == MINUS) + && fetchadd_operand (val, mode)) { + if (code == MINUS) + val = GEN_INT (-INTVAL (val)); + if (!old_dst) old_dst = gen_reg_rtx (mode); @@ -4255,11 +4260,11 @@ ia64_gimplify_va_arg (tree valist, tree type, tree *pre_p, tree *post_p) if ((TREE_CODE (type) == REAL_TYPE || TREE_CODE (type) == INTEGER_TYPE) ? int_size_in_bytes (type) > 8 : TYPE_ALIGN (type) > 8 * BITS_PER_UNIT) { - tree t = build (PLUS_EXPR, TREE_TYPE (valist), valist, - build_int_cst (NULL_TREE, 2 * UNITS_PER_WORD - 1)); - t = build (BIT_AND_EXPR, TREE_TYPE (t), t, - build_int_cst (NULL_TREE, -2 * UNITS_PER_WORD)); - t = build (MODIFY_EXPR, TREE_TYPE (valist), valist, t); + tree t = build2 (PLUS_EXPR, TREE_TYPE (valist), valist, + build_int_cst (NULL_TREE, 2 * UNITS_PER_WORD - 1)); + t = build2 (BIT_AND_EXPR, TREE_TYPE (t), t, + build_int_cst (NULL_TREE, -2 * UNITS_PER_WORD)); + t = build2 (MODIFY_EXPR, TREE_TYPE (valist), valist, t); gimplify_and_add (t, pre_p); } @@ -8432,11 +8437,16 @@ ia64_init_libfuncs (void) set_conv_libfunc (sfix_optab, SImode, TFmode, "_U_Qfcnvfxt_quad_to_sgl"); set_conv_libfunc (sfix_optab, DImode, TFmode, "_U_Qfcnvfxt_quad_to_dbl"); + set_conv_libfunc (sfix_optab, TImode, TFmode, "_U_Qfcnvfxt_quad_to_quad"); set_conv_libfunc (ufix_optab, SImode, TFmode, "_U_Qfcnvfxut_quad_to_sgl"); set_conv_libfunc (ufix_optab, DImode, TFmode, "_U_Qfcnvfxut_quad_to_dbl"); set_conv_libfunc (sfloat_optab, TFmode, SImode, "_U_Qfcnvxf_sgl_to_quad"); set_conv_libfunc (sfloat_optab, TFmode, DImode, "_U_Qfcnvxf_dbl_to_quad"); + set_conv_libfunc (sfloat_optab, TFmode, TImode, "_U_Qfcnvxf_quad_to_quad"); + /* HP-UX 11.23 libc does not have a function for unsigned + SImode-to-TFmode conversion. */ + set_conv_libfunc (ufloat_optab, TFmode, DImode, "_U_Qfcnvxuf_dbl_to_quad"); } /* Rename all the TFmode libfuncs using the HPUX conventions. */ @@ -8499,27 +8509,27 @@ ia64_sysv4_init_libfuncs (void) glibc doesn't have them. */ } -/* Switch to the section to which we should output X. The only thing - special we do here is to honor small data. */ +/* Return the section to use for X. The only special thing we do here + is to honor small data. */ -static void +static section * ia64_select_rtx_section (enum machine_mode mode, rtx x, unsigned HOST_WIDE_INT align) { if (GET_MODE_SIZE (mode) > 0 && GET_MODE_SIZE (mode) <= ia64_section_threshold) - sdata_section (); + return sdata_section; else - default_elf_select_rtx_section (mode, x, align); + return default_elf_select_rtx_section (mode, x, align); } /* It is illegal to have relocations in shared segments on AIX and HPUX. Pretend flag_pic is always set. */ -static void +static section * ia64_rwreloc_select_section (tree exp, int reloc, unsigned HOST_WIDE_INT align) { - default_elf_select_section_1 (exp, reloc, align, true); + return default_elf_select_section_1 (exp, reloc, align, true); } static void @@ -8528,14 +8538,16 @@ ia64_rwreloc_unique_section (tree decl, int reloc) default_unique_section_1 (decl, reloc, true); } -static void +static section * ia64_rwreloc_select_rtx_section (enum machine_mode mode, rtx x, unsigned HOST_WIDE_INT align) { + section *sect; int save_pic = flag_pic; flag_pic = 1; - ia64_select_rtx_section (mode, x, align); + sect = ia64_select_rtx_section (mode, x, align); flag_pic = save_pic; + return sect; } #ifndef TARGET_RWRELOC diff --git a/gcc/config/ia64/ia64.md b/gcc/config/ia64/ia64.md index 989a4fd0e16..afe3e53ba4d 100644 --- a/gcc/config/ia64/ia64.md +++ b/gcc/config/ia64/ia64.md @@ -4453,8 +4453,8 @@ (rotate:SI (match_operand:SI 1 "gr_register_operand" "r") (match_operand:SI 2 "shift_32bit_count_operand" "n")))] "" - "#" - "reload_completed" + "mux2 %0 = %1, 0xe1" + "reload_completed && INTVAL (operands[2]) != 16" [(set (match_dup 3) (ior:DI (zero_extend:DI (match_dup 1)) (ashift:DI (zero_extend:DI (match_dup 1)) (const_int 32)))) @@ -4463,7 +4463,8 @@ { operands[3] = gen_rtx_REG (DImode, REGNO (operands[0])); operands[2] = GEN_INT (32 - INTVAL (operands[2])); -}) +} + [(set_attr "itanium_class" "mmshf")]) ;; :::::::::::::::::::: ;; :: diff --git a/gcc/config/ia64/sysv4.h b/gcc/config/ia64/sysv4.h index 69c24240948..bc85108b278 100644 --- a/gcc/config/ia64/sysv4.h +++ b/gcc/config/ia64/sysv4.h @@ -46,9 +46,9 @@ extern int size_directive_output; #define ASM_OUTPUT_ALIGNED_DECL_LOCAL(FILE, DECL, NAME, SIZE, ALIGN) \ do { \ if ((DECL) && sdata_symbolic_operand (XEXP (DECL_RTL (DECL), 0), Pmode)) \ - sbss_section (); \ + switch_to_section (sbss_section); \ else \ - bss_section (); \ + switch_to_section (bss_section); \ ASM_OUTPUT_ALIGN (FILE, floor_log2 ((ALIGN) / BITS_PER_UNIT)); \ ASM_DECLARE_OBJECT_NAME (FILE, NAME, DECL); \ ASM_OUTPUT_SKIP (FILE, SIZE ? SIZE : 1); \ @@ -124,36 +124,5 @@ do { \ #undef TARGET_ASM_SELECT_RTX_SECTION #define TARGET_ASM_SELECT_RTX_SECTION ia64_select_rtx_section -#undef EXTRA_SECTIONS -#define EXTRA_SECTIONS in_sdata, in_sbss - -#undef EXTRA_SECTION_FUNCTIONS -#define EXTRA_SECTION_FUNCTIONS \ - SDATA_SECTION_FUNCTION \ - SBSS_SECTION_FUNCTION - #define SDATA_SECTION_ASM_OP "\t.sdata" - -#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 SBSS_SECTION_ASM_OP "\t.sbss" - -#define SBSS_SECTION_FUNCTION \ -void \ -sbss_section (void) \ -{ \ - if (in_section != in_sbss) \ - { \ - fprintf (asm_out_file, "%s\n", SBSS_SECTION_ASM_OP); \ - in_section = in_sbss; \ - } \ -} diff --git a/gcc/config/ia64/t-hpux b/gcc/config/ia64/t-hpux index 2897739fda1..7d294d17457 100644 --- a/gcc/config/ia64/t-hpux +++ b/gcc/config/ia64/t-hpux @@ -9,7 +9,7 @@ MULTILIB_MATCHES = # Support routines for HP-UX 128 bit floats. -LIB2FUNCS_EXTRA=quadlib.c +LIB2FUNCS_EXTRA=quadlib.c $(srcdir)/config/floatunsitf.c quadlib.c: $(srcdir)/config/ia64/quadlib.c cat $(srcdir)/config/ia64/quadlib.c > quadlib.c diff --git a/gcc/config/iq2000/iq2000.c b/gcc/config/iq2000/iq2000.c index 2adf50ac49b..dd42fe94094 100644 --- a/gcc/config/iq2000/iq2000.c +++ b/gcc/config/iq2000/iq2000.c @@ -154,7 +154,8 @@ static enum machine_mode gpr_mode; /* Initialize the GCC target structure. */ static struct machine_function* iq2000_init_machine_status (void); static bool iq2000_handle_option (size_t, const char *, int); -static void iq2000_select_rtx_section (enum machine_mode, rtx, unsigned HOST_WIDE_INT); +static section *iq2000_select_rtx_section (enum machine_mode, rtx, + unsigned HOST_WIDE_INT); static void iq2000_init_builtins (void); static rtx iq2000_expand_builtin (tree, rtx, rtx, enum machine_mode, int); static bool iq2000_return_in_memory (tree, tree); @@ -163,7 +164,7 @@ static void iq2000_setup_incoming_varargs (CUMULATIVE_ARGS *, int); static bool iq2000_rtx_costs (rtx, int, int, int *); static int iq2000_address_cost (rtx); -static void iq2000_select_section (tree, int, unsigned HOST_WIDE_INT); +static section *iq2000_select_section (tree, int, unsigned HOST_WIDE_INT); static bool iq2000_return_in_memory (tree, tree); static bool iq2000_pass_by_reference (CUMULATIVE_ARGS *, enum machine_mode, tree, bool); @@ -2146,15 +2147,13 @@ symbolic_expression_p (rtx x) /* Choose the section to use for the constant rtx expression X that has mode MODE. */ -static void +static section * iq2000_select_rtx_section (enum machine_mode mode, rtx x ATTRIBUTE_UNUSED, unsigned HOST_WIDE_INT align) { /* For embedded applications, always put constants in read-only data, in order to reduce RAM usage. */ - /* For embedded applications, always put constants in read-only data, - in order to reduce RAM usage. */ - mergeable_constant_section (mode, align, 0); + return mergeable_constant_section (mode, align, 0); } /* Choose the section to use for DECL. RELOC is true if its value contains @@ -2164,7 +2163,7 @@ iq2000_select_rtx_section (enum machine_mode mode, rtx x ATTRIBUTE_UNUSED, ENCODE_SECTION_INFO in iq2000.h so that references to these symbols are done correctly. */ -static void +static section * iq2000_select_section (tree decl, int reloc ATTRIBUTE_UNUSED, unsigned HOST_WIDE_INT align ATTRIBUTE_UNUSED) { @@ -2179,9 +2178,9 @@ iq2000_select_section (tree decl, int reloc ATTRIBUTE_UNUSED, || TREE_CONSTANT (DECL_INITIAL (decl)))) /* Deal with calls from output_constant_def_contents. */ || TREE_CODE (decl) != VAR_DECL) - readonly_data_section (); + return readonly_data_section; else - data_section (); + return data_section; } else { @@ -2194,9 +2193,9 @@ iq2000_select_section (tree decl, int reloc ATTRIBUTE_UNUSED, || TREE_CONSTANT (DECL_INITIAL (decl)))) /* Deal with calls from output_constant_def_contents. */ || TREE_CODE (decl) != VAR_DECL) - readonly_data_section (); + return readonly_data_section; else - data_section (); + return data_section; } } /* Return register to use for a function return value with VALTYPE for function diff --git a/gcc/config/iq2000/iq2000.h b/gcc/config/iq2000/iq2000.h index f60b6277f8a..45c1c349a08 100644 --- a/gcc/config/iq2000/iq2000.h +++ b/gcc/config/iq2000/iq2000.h @@ -835,11 +835,6 @@ enum processor_type /* Recast the cpu class to be the cpu attribute. */ #define iq2000_cpu_attr ((enum attr_cpu) iq2000_tune) -/* Functions to change what output section we are using. */ -extern void rdata_section (void); -extern void sdata_section (void); -extern void sbss_section (void); - #define BITMASK_UPPER16 ((unsigned long) 0xffff << 16) /* 0xffff0000 */ #define BITMASK_LOWER16 ((unsigned long) 0xffff) /* 0x0000ffff */ diff --git a/gcc/config/m32c/addsub.md b/gcc/config/m32c/addsub.md index 57f81acf751..104709c96bb 100644 --- a/gcc/config/m32c/addsub.md +++ b/gcc/config/m32c/addsub.md @@ -36,11 +36,11 @@ (define_insn "addhi3" [(set (match_operand:HI 0 "nonimmediate_operand" - "=SdRhi,SdRhi,??Rmm,??Rmm, SdRhi,??Rmm, Rhi, !Rsp") + "=SdRhi,SdRhi,??Rmm,??Rmm, SdRhi,??Rmm, Rhi, Raw, Raw, !Rsp") (plus:HI (match_operand:HI 1 "general_operand" - "%0,0,0,0, 0,0, Raw, 0") + "%0,0,0,0, 0,0, Raw, Rfb, Rfb, 0") (match_operand:HI 2 "general_operand" - "IU2sSdRhi,?Rmm,IU2sSdRhi,?Rmm, IM2,IM2, IS2IU2, i")))] + "IU2sSdRhi,?Rmm,IU2sSdRhi,?Rmm, IM2,IM2, IS2IU2, I00, IS1, i")))] "" "@ add.w\t%2,%0 @@ -50,8 +50,10 @@ sub.w\t%m2,%0 sub.w\t%m2,%0 mova\t%d2[%1],%0 + stc\t%1,%0 + mova\t%D2[%1],%0 add.w\t%2,%0" - [(set_attr "flags" "oszc,oszc,oszc,oszc,oszc,oszc,oszc,oszc")] + [(set_attr "flags" "oszc,oszc,oszc,oszc,oszc,oszc,oszc,oszc,oszc,oszc")] ) (define_insn "addpsi3" diff --git a/gcc/config/m32c/m32c-pragma.c b/gcc/config/m32c/m32c-pragma.c index 236087867cf..b468388e275 100644 --- a/gcc/config/m32c/m32c-pragma.c +++ b/gcc/config/m32c/m32c-pragma.c @@ -52,14 +52,14 @@ m32c_pragma_memregs (cpp_reader * reader ATTRIBUTE_UNUSED) HOST_WIDE_INT i; static char new_number[3]; - type = c_lex (&val); + type = pragma_lex (&val); if (type == CPP_NUMBER) { if (host_integerp (val, 1)) { i = tree_low_cst (val, 1); - type = c_lex (&val); + type = pragma_lex (&val); if (type != CPP_EOF) warning (0, "junk at end of #pragma GCC memregs [0..16]"); diff --git a/gcc/config/m32c/m32c.c b/gcc/config/m32c/m32c.c index 97b095328e4..24b7fffb598 100644 --- a/gcc/config/m32c/m32c.c +++ b/gcc/config/m32c/m32c.c @@ -901,6 +901,10 @@ m32c_const_ok_for_constraint_p (HOST_WIDE_INT value, { return (-16 <= value && value && value <= 16); } + if (memcmp (str, "In6", 3) == 0) + { + return (-32 <= value && value && value <= 32); + } if (memcmp (str, "IM2", 3) == 0) { return (-65536 <= value && value && value <= -1); @@ -1505,7 +1509,7 @@ m32c_function_arg_regno_p (int r) for some opcodes in R8C/M16C and for reset vectors and such. */ #undef TARGET_VALID_POINTER_MODE #define TARGET_VALID_POINTER_MODE m32c_valid_pointer_mode -bool +static bool m32c_valid_pointer_mode (enum machine_mode mode) { if (mode == HImode @@ -1822,6 +1826,31 @@ m32c_reg_ok_for_base_p (rtx x, int strict) } } +/* We have three choices for choosing fb->aN offsets. If we choose -128, + we need one MOVA -128[fb],aN opcode and 16 bit aN displacements, + like this: + EB 4B FF mova -128[$fb],$a0 + D8 0C FF FF mov.w:Q #0,-1[$a0] + + Alternately, we subtract the frame size, and hopefully use 8 bit aN + displacements: + 7B F4 stc $fb,$a0 + 77 54 00 01 sub #256,$a0 + D8 08 01 mov.w:Q #0,1[$a0] + + If we don't offset (i.e. offset by zero), we end up with: + 7B F4 stc $fb,$a0 + D8 0C 00 FF mov.w:Q #0,-256[$a0] + + We have to subtract *something* so that we have a PLUS rtx to mark + that we've done this reload. The -128 offset will never result in + an 8 bit aN offset, and the payoff for the second case is five + loads *if* those loads are within 256 bytes of the other end of the + frame, so the third case seems best. Note that we subtract the + zero, but detect that in the addhi3 pattern. */ + +#define BIG_FB_ADJ 0 + /* Implements LEGITIMIZE_ADDRESS. The only address we really have to worry about is frame base offsets, as $fb has a limited displacement range. We deal with this by attempting to reload $fb @@ -1846,10 +1875,9 @@ m32c_legitimize_address (rtx * x ATTRIBUTE_UNUSED, || INTVAL (XEXP (*x, 1)) > (128 - GET_MODE_SIZE (mode)))) { /* reload FB to A_REGS */ - rtx foo; rtx temp = gen_reg_rtx (Pmode); *x = copy_rtx (*x); - foo = emit_insn (gen_rtx_SET (VOIDmode, temp, XEXP (*x, 0))); + emit_insn (gen_rtx_SET (VOIDmode, temp, XEXP (*x, 0))); XEXP (*x, 0) = temp; return 1; } @@ -1875,7 +1903,47 @@ m32c_legitimize_reload_address (rtx * x, *also* still trying to reload the whole address, and we'd run out of address registers. So we let gcc do the naive (but safe) reload instead, when the above function doesn't handle it for - us. */ + us. + + The code below is a second attempt at the above. */ + + if (GET_CODE (*x) == PLUS + && GET_CODE (XEXP (*x, 0)) == REG + && REGNO (XEXP (*x, 0)) == FB_REGNO + && GET_CODE (XEXP (*x, 1)) == CONST_INT + && (INTVAL (XEXP (*x, 1)) < -128 + || INTVAL (XEXP (*x, 1)) > (128 - GET_MODE_SIZE (mode)))) + { + rtx sum; + int offset = INTVAL (XEXP (*x, 1)); + int adjustment = -BIG_FB_ADJ; + + sum = gen_rtx_PLUS (Pmode, XEXP (*x, 0), + GEN_INT (adjustment)); + *x = gen_rtx_PLUS (Pmode, sum, GEN_INT (offset - adjustment)); + if (type == RELOAD_OTHER) + type = RELOAD_FOR_OTHER_ADDRESS; + push_reload (sum, NULL_RTX, &XEXP (*x, 0), NULL, + A_REGS, Pmode, VOIDmode, 0, 0, opnum, + type); + return 1; + } + + if (GET_CODE (*x) == PLUS + && GET_CODE (XEXP (*x, 0)) == PLUS + && GET_CODE (XEXP (XEXP (*x, 0), 0)) == REG + && REGNO (XEXP (XEXP (*x, 0), 0)) == FB_REGNO + && GET_CODE (XEXP (XEXP (*x, 0), 1)) == CONST_INT + && GET_CODE (XEXP (*x, 1)) == CONST_INT + ) + { + if (type == RELOAD_OTHER) + type = RELOAD_FOR_OTHER_ADDRESS; + push_reload (XEXP (*x, 0), NULL_RTX, &XEXP (*x, 0), NULL, + A_REGS, Pmode, VOIDmode, 0, 0, opnum, + type); + return 1; + } return 0; } @@ -2386,7 +2454,7 @@ m32c_output_reg_push (FILE * s, int regno) if (regno == FLG_REGNO) fprintf (s, "\tpushc\tflg\n"); else - fprintf (s, "\tpush.%c\t%s", + fprintf (s, "\tpush.%c\t%s\n", " bwll"[reg_push_size (regno)], reg_names[regno]); } @@ -2397,7 +2465,7 @@ m32c_output_reg_pop (FILE * s, int regno) if (regno == FLG_REGNO) fprintf (s, "\tpopc\tflg\n"); else - fprintf (s, "\tpop.%c\t%s", + fprintf (s, "\tpop.%c\t%s\n", " bwll"[reg_push_size (regno)], reg_names[regno]); } @@ -2770,27 +2838,63 @@ m32c_split_move (rtx * operands, enum machine_mode mode, int split_all) return rv; } +typedef rtx (*shift_gen_func)(rtx, rtx, rtx); + +static shift_gen_func +shift_gen_func_for (int mode, int code) +{ +#define GFF(m,c,f) if (mode == m && code == c) return f + GFF(QImode, ASHIFT, gen_ashlqi3_i); + GFF(QImode, ASHIFTRT, gen_ashrqi3_i); + GFF(QImode, LSHIFTRT, gen_lshrqi3_i); + GFF(HImode, ASHIFT, gen_ashlhi3_i); + GFF(HImode, ASHIFTRT, gen_ashrhi3_i); + GFF(HImode, LSHIFTRT, gen_lshrhi3_i); + GFF(PSImode, ASHIFT, gen_ashlpsi3_i); + GFF(PSImode, ASHIFTRT, gen_ashrpsi3_i); + GFF(PSImode, LSHIFTRT, gen_lshrpsi3_i); + GFF(SImode, ASHIFT, TARGET_A16 ? gen_ashlsi3_16 : gen_ashlsi3_24); + GFF(SImode, ASHIFTRT, TARGET_A16 ? gen_ashrsi3_16 : gen_ashrsi3_24); + GFF(SImode, LSHIFTRT, TARGET_A16 ? gen_lshrsi3_16 : gen_lshrsi3_24); +#undef GFF +} + /* The m32c only has one shift, but it takes a signed count. GCC doesn't want this, so we fake it by negating any shift count when we're pretending to shift the other way. */ int -m32c_prepare_shift (rtx * operands, int scale, int bits) +m32c_prepare_shift (rtx * operands, int scale, int shift_code) { + enum machine_mode mode = GET_MODE (operands[0]); + shift_gen_func func = shift_gen_func_for (mode, shift_code); rtx temp; - if (GET_CODE (operands[2]) == CONST_INT - && INTVAL (operands[2]) <= (1 << (bits - 1)) - && INTVAL (operands[2]) >= -(1 << (bits - 1))) + + if (GET_CODE (operands[2]) == CONST_INT) { - operands[2] = GEN_INT (scale * INTVAL (operands[2])); - return 0; + int maxc = TARGET_A24 && (mode == PSImode || mode == SImode) ? 32 : 8; + int count = INTVAL (operands[2]) * scale; + + while (count > maxc) + { + temp = gen_reg_rtx (mode); + emit_insn (func (temp, operands[1], GEN_INT (maxc))); + operands[1] = temp; + count -= maxc; + } + while (count < -maxc) + { + temp = gen_reg_rtx (mode); + emit_insn (func (temp, operands[1], GEN_INT (-maxc))); + operands[1] = temp; + count += maxc; + } + emit_insn (func (operands[0], operands[1], GEN_INT (count))); + return 1; } if (scale < 0) { temp = gen_reg_rtx (QImode); - if (GET_CODE (operands[2]) == CONST_INT) - temp = GEN_INT (-INTVAL (operands[2])); - else - emit_move_insn (temp, gen_rtx_NEG (QImode, operands[2])); + emit_move_insn (temp, gen_rtx_NEG (QImode, operands[2])); } else temp = operands[2]; @@ -2798,6 +2902,30 @@ m32c_prepare_shift (rtx * operands, int scale, int bits) return 0; } +/* The m32c has a limited range of operations that work on PSImode + values; we have to expand to SI, do the math, and truncate back to + PSI. Yes, this is expensive, but hopefully gcc will learn to avoid + those cases. */ +void +m32c_expand_neg_mulpsi3 (rtx * operands) +{ + /* operands: a = b * i */ + rtx temp1; /* b as SI */ + rtx temp2; /* -b as SI */ + rtx temp3; /* -b as PSI */ + rtx scale; + + temp1 = gen_reg_rtx (SImode); + temp2 = gen_reg_rtx (SImode); + temp3 = gen_reg_rtx (PSImode); + scale = GEN_INT (- INTVAL (operands[2])); + + emit_insn (gen_zero_extendpsisi2 (temp1, operands[1])); + emit_insn (gen_negsi2 (temp2, temp1)); + emit_insn (gen_truncsipsi2 (temp3, temp2)); + emit_insn (gen_mulpsi3 (operands[0], temp3, scale)); +} + /* Pattern Output Functions */ /* Returns TRUE if the current function is a leaf, and thus we can diff --git a/gcc/config/m32c/m32c.h b/gcc/config/m32c/m32c.h index 99968f9c442..98400a0096b 100644 --- a/gcc/config/m32c/m32c.h +++ b/gcc/config/m32c/m32c.h @@ -575,6 +575,15 @@ typedef struct m32c_cumulative_args #define DATA_SECTION_ASM_OP ".data" #define BSS_SECTION_ASM_OP ".bss" +#define CTOR_LIST_BEGIN +#define CTOR_LIST_END +#define DTOR_LIST_BEGIN +#define DTOR_LIST_END +#define CTORS_SECTION_ASM_OP "\t.section\t.init_array,\"aw\",%init_array" +#define DTORS_SECTION_ASM_OP "\t.section\t.fini_array,\"aw\",%fini_array" +#define INIT_ARRAY_SECTION_ASM_OP "\t.section\t.init_array,\"aw\",%init_array" +#define FINI_ARRAY_SECTION_ASM_OP "\t.section\t.fini_array,\"aw\",%fini_array" + /* The Overall Framework of an Assembler File */ #define ASM_COMMENT_START ";" diff --git a/gcc/config/m32c/mov.md b/gcc/config/m32c/mov.md index e146bb6cc20..c3794a3b2ed 100644 --- a/gcc/config/m32c/mov.md +++ b/gcc/config/m32c/mov.md @@ -115,8 +115,9 @@ (mem:QHSI (match_operand:HPSI 4 "register_operand" "")))] "REGNO (operands[0]) == REGNO (operands[1]) && REGNO (operands[0]) == REGNO (operands[4]) - && dead_or_set_p (peep2_next_insn (1), operands[4]) - && ! reg_mentioned_p (operands[0], operands[3])" + && (rtx_equal_p (operands[0], operands[3]) + || (dead_or_set_p (peep2_next_insn (1), operands[4]) + && ! reg_mentioned_p (operands[0], operands[3])))" [(set (match_dup 3) (mem:QHSI (plus:HPSI (match_dup 1) (match_dup 2))))] diff --git a/gcc/config/m32c/muldiv.md b/gcc/config/m32c/muldiv.md index e80d4dc763a..bf6f35755dd 100644 --- a/gcc/config/m32c/muldiv.md +++ b/gcc/config/m32c/muldiv.md @@ -127,16 +127,29 @@ ; GCC expects to be able to multiply pointer-sized integers too, but -; fortunately it only multiplies by powers of two. -(define_insn "mulpsi3" +; fortunately it only multiplies by powers of two, although sometimes +; they're negative. +(define_insn "mulpsi3_op" [(set (match_operand:PSI 0 "mra_operand" "=RsiSd") (mult:PSI (match_operand:PSI 1 "mra_operand" "%0") - (match_operand 2 "const_int_operand" "Ilb")))] + (match_operand 2 "m32c_psi_scale" "Ilb")))] "TARGET_A24" "shl.l\t%b2,%0" [(set_attr "flags" "szc")] ) +(define_expand "mulpsi3" + [(set (match_operand:PSI 0 "mra_operand" "=RsiSd") + (mult:PSI (match_operand:PSI 1 "mra_operand" "%0") + (match_operand 2 "m32c_psi_scale" "Ilb")))] + "TARGET_A24" + "if (INTVAL(operands[2]) < 0) + { + m32c_expand_neg_mulpsi3 (operands); + DONE; + }" + ) + (define_expand "divmodqi4" diff --git a/gcc/config/m32c/predicates.md b/gcc/config/m32c/predicates.md index 362f20d1118..c3b44b812d0 100644 --- a/gcc/config/m32c/predicates.md +++ b/gcc/config/m32c/predicates.md @@ -145,9 +145,13 @@ ; TRUE if we can shift by this amount. Constant shift counts have a ; limited range. (define_predicate "shiftcount_operand" - (ior (match_operand 0 "m32c_pseudo" "") + (ior (match_operand 0 "mra_operand" "") (and (match_operand 2 "const_int_operand" "") (match_test "-8 <= INTVAL (op) && INTVAL (op) && INTVAL (op) <= 8")))) +(define_predicate "longshiftcount_operand" + (ior (match_operand 0 "mra_operand" "") + (and (match_operand 2 "const_int_operand" "") + (match_test "-32 <= INTVAL (op) && INTVAL (op) && INTVAL (op) <= 32")))) ; TRUE for r0..r3, a0..a1, or sp. (define_predicate "mra_or_sp_operand" @@ -195,3 +199,8 @@ (ior (match_operand 0 "m32c_r0_operand") (ior (match_operand 0 "m32c_mem0_operand") (match_code "parallel")))) + +; TRUE for constants we can multiply pointers by +(define_predicate "m32c_psi_scale" + (and (match_operand 0 "const_int_operand") + (match_test "m32c_const_ok_for_constraint_p(INTVAL(op), 'I', \"Ilb\")"))) diff --git a/gcc/config/m32c/shift.md b/gcc/config/m32c/shift.md index 95b298c02ea..3e07b25c5ed 100644 --- a/gcc/config/m32c/shift.md +++ b/gcc/config/m32c/shift.md @@ -33,34 +33,34 @@ (define_insn "ashlqi3_i" [(set (match_operand:QI 0 "mra_operand" "=RqiSd*Rmm,RqiSd*Rmm") (ashift:QI (match_operand:QI 1 "mra_operand" "0,0") - (match_operand:QI 2 "mrai_operand" "In4,R1w"))) + (match_operand:QI 2 "mrai_operand" "In4,RqiSd"))) (clobber (match_scratch:HI 3 "=X,R1w"))] "" "@ sha.b\t%2,%0 - mov.b\tr1l,r1h\n\tsha.b\tr1h,%0" + mov.b\t%2,r1h\n\tsha.b\tr1h,%0" ) (define_insn "ashrqi3_i" [(set (match_operand:QI 0 "mra_operand" "=RqiSd*Rmm,RqiSd*Rmm") (ashiftrt:QI (match_operand:QI 1 "mra_operand" "0,0") - (neg:QI (match_operand:QI 2 "mrai_operand" "In4,R1w")))) + (neg:QI (match_operand:QI 2 "mrai_operand" "In4,RqiSd")))) (clobber (match_scratch:HI 3 "=X,R1w"))] "" "@ sha.b\t%2,%0 - mov.b\tr1l,r1h\n\tsha.b\tr1h,%0" + mov.b\t%2,r1h\n\tsha.b\tr1h,%0" ) -(define_insn "lshlqi3_i" +(define_insn "lshrqi3_i" [(set (match_operand:QI 0 "mra_operand" "=RqiSd*Rmm,RqiSd*Rmm") (lshiftrt:QI (match_operand:QI 1 "mra_operand" "0,0") - (neg:QI (match_operand:QI 2 "mrai_operand" "In4,R1w")))) + (neg:QI (match_operand:QI 2 "mrai_operand" "In4,RqiSd")))) (clobber (match_scratch:HI 3 "=X,R1w"))] "" "@ shl.b\t%2,%0 - mov.b\tr1l,r1h\n\tshl.b\tr1h,%0" + mov.b\t%2,r1h\n\tshl.b\tr1h,%0" ) @@ -70,7 +70,7 @@ (match_operand:QI 2 "general_operand" ""))) (clobber (match_scratch:HI 3 ""))])] "" - "if (m32c_prepare_shift (operands, 1, 4)) + "if (m32c_prepare_shift (operands, 1, ASHIFT)) DONE;" ) @@ -80,7 +80,7 @@ (neg:QI (match_operand:QI 2 "general_operand" "")))) (clobber (match_scratch:HI 3 ""))])] "" - "if (m32c_prepare_shift (operands, -1, 4)) + "if (m32c_prepare_shift (operands, -1, ASHIFTRT)) DONE;" ) @@ -90,7 +90,7 @@ (neg:QI (match_operand:QI 2 "general_operand" "")))) (clobber (match_scratch:HI 3 ""))])] "" - "if (m32c_prepare_shift (operands, -1, 4)) + "if (m32c_prepare_shift (operands, -1, LSHIFTRT)) DONE;" ) @@ -99,34 +99,34 @@ (define_insn "ashlhi3_i" [(set (match_operand:HI 0 "mra_operand" "=SdRhi*Rmm,SdRhi*Rmm") (ashift:HI (match_operand:HI 1 "mra_operand" "0,0") - (match_operand:QI 2 "mrai_operand" "In4,R1w"))) + (match_operand:QI 2 "mrai_operand" "In4,RqiSd"))) (clobber (match_scratch:HI 3 "=X,R1w"))] "" "@ sha.w\t%2,%0 - mov.b\tr1l,r1h\n\tsha.w\tr1h,%0" + mov.b\t%2,r1h\n\tsha.w\tr1h,%0" ) (define_insn "ashrhi3_i" [(set (match_operand:HI 0 "mra_operand" "=SdRhi*Rmm,SdRhi*Rmm") (ashiftrt:HI (match_operand:HI 1 "mra_operand" "0,0") - (neg:QI (match_operand:QI 2 "mrai_operand" "In4,R1w")))) + (neg:QI (match_operand:QI 2 "mrai_operand" "In4,RqiSd")))) (clobber (match_scratch:HI 3 "=X,R1w"))] "" "@ sha.w\t%2,%0 - mov.b\tr1l,r1h\n\tsha.w\tr1h,%0" + mov.b\t%2,r1h\n\tsha.w\tr1h,%0" ) -(define_insn "lshlhi3_i" +(define_insn "lshrhi3_i" [(set (match_operand:HI 0 "mra_operand" "=RhiSd*Rmm,RhiSd*Rmm") (lshiftrt:HI (match_operand:HI 1 "mra_operand" "0,0") - (neg:QI (match_operand:QI 2 "mrai_operand" "In4,R1w")))) + (neg:QI (match_operand:QI 2 "mrai_operand" "In4,RqiSd")))) (clobber (match_scratch:HI 3 "=X,R1w"))] "" "@ shl.w\t%2,%0 - mov.b\tr1l,r1h\n\tshl.w\tr1h,%0" + mov.b\t%2,r1h\n\tshl.w\tr1h,%0" ) @@ -136,7 +136,7 @@ (match_operand:QI 2 "general_operand" ""))) (clobber (match_scratch:HI 3 ""))])] "" - "if (m32c_prepare_shift (operands, 1, 4)) + "if (m32c_prepare_shift (operands, 1, ASHIFT)) DONE;" ) @@ -146,7 +146,7 @@ (neg:QI (match_operand:QI 2 "general_operand" "")))) (clobber (match_scratch:HI 3 ""))])] "" - "if (m32c_prepare_shift (operands, -1, 4)) + "if (m32c_prepare_shift (operands, -1, ASHIFTRT)) DONE;" ) @@ -156,7 +156,7 @@ (neg:QI (match_operand:QI 2 "general_operand" "")))) (clobber (match_scratch:HI 3 ""))])] "" - "if (m32c_prepare_shift (operands, -1, 4)) + "if (m32c_prepare_shift (operands, -1, LSHIFTRT)) DONE;" ) @@ -169,34 +169,34 @@ (define_insn "ashlpsi3_i" [(set (match_operand:PSI 0 "mra_operand" "=R02RaaSd*Rmm,R02RaaSd*Rmm") (ashift:PSI (match_operand:PSI 1 "mra_operand" "0,0") - (match_operand:QI 2 "mrai_operand" "In4,R1w"))) + (match_operand:QI 2 "mrai_operand" "In4,RqiSd"))) (clobber (match_scratch:HI 3 "=X,R1w"))] "TARGET_A24" "@ sha.l\t%2,%0 - mov.b\tr1l,r1h\n\tsha.l\tr1h,%0" + mov.b\t%2,r1h\n\tsha.l\tr1h,%0" ) (define_insn "ashrpsi3_i" [(set (match_operand:PSI 0 "mra_operand" "=R02RaaSd*Rmm,R02RaaSd*Rmm") (ashiftrt:PSI (match_operand:PSI 1 "mra_operand" "0,0") - (neg:QI (match_operand:QI 2 "mrai_operand" "In4,R1w")))) + (neg:QI (match_operand:QI 2 "mrai_operand" "In4,RqiSd")))) (clobber (match_scratch:HI 3 "=X,R1w"))] "TARGET_A24" "@ sha.l\t%2,%0 - mov.b\tr1l,r1h\n\tsha.l\tr1h,%0" + mov.b\t%2,r1h\n\tsha.l\tr1h,%0" ) -(define_insn "lshlpsi3_i" +(define_insn "lshrpsi3_i" [(set (match_operand:PSI 0 "mra_operand" "=R02RaaSd,??Rmm") (lshiftrt:PSI (match_operand:PSI 1 "mra_operand" "0,0") - (neg:QI (match_operand:QI 2 "shiftcount_operand" "In4,R1w")))) + (neg:QI (match_operand:QI 2 "shiftcount_operand" "In4,RqiSd")))) (clobber (match_scratch:HI 3 "=X,R1w"))] "TARGET_A24" "@ shl.l\t%2,%0 - mov.b\tr1l,r1h\n\tshl.l\tr1h,%0" + mov.b\t%2,r1h\n\tshl.l\tr1h,%0" ) @@ -206,7 +206,7 @@ (match_operand:QI 2 "mrai_operand" ""))) (clobber (match_scratch:HI 3 ""))])] "TARGET_A24" - "if (m32c_prepare_shift (operands, 1, 4)) + "if (m32c_prepare_shift (operands, 1, ASHIFT)) DONE;" ) @@ -216,7 +216,7 @@ (neg:QI (match_operand:QI 2 "mrai_operand" "")))) (clobber (match_scratch:HI 3 ""))])] "TARGET_A24" - "if (m32c_prepare_shift (operands, -1, 4)) + "if (m32c_prepare_shift (operands, -1, ASHIFTRT)) DONE;" ) @@ -226,55 +226,98 @@ (neg:QI (match_operand:QI 2 "mrai_operand" "")))) (clobber (match_scratch:HI 3 ""))])] "TARGET_A24" - "if (m32c_prepare_shift (operands, -1, 4)) + "if (m32c_prepare_shift (operands, -1, LSHIFTRT)) DONE;" ) ; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +; The m16c has a maximum shift count of -16..16, even when in a +; register. It's optimal to use multiple shifts of -8..8 rather than +; loading larger constants into R1H multiple time. The m32c can shift +; -32..32 either via immediates or in registers. Hence, separate +; patterns. -(define_insn "ashlsi3_i" +(define_insn "ashlsi3_16" [(set (match_operand:SI 0 "r0123_operand" "=R03,R03") (ashift:SI (match_operand:SI 1 "r0123_operand" "0,0") - (match_operand:QI 2 "mrai_operand" "In4,R1w"))) + (match_operand:QI 2 "shiftcount_operand" "In4,RqiSd"))) (clobber (match_scratch:HI 3 "=X,R1w"))] - "" + "TARGET_A16" "@ sha.l\t%2,%0 - mov.b\tr1l,r1h\n\tsha.l\tr1h,%0" + mov.b\t%2,r1h\n\tsha.l\tr1h,%0" + [(set_attr "flags" "sz,sz")] ) -(define_insn "ashrsi3_i" +(define_insn "ashrsi3_16" [(set (match_operand:SI 0 "r0123_operand" "=R03,R03") (ashiftrt:SI (match_operand:SI 1 "r0123_operand" "0,0") - (neg:QI (match_operand:QI 2 "mrai_operand" "In4,R1w")))) + (neg:QI (match_operand:QI 2 "shiftcount_operand" "In4,RqiSd")))) (clobber (match_scratch:HI 3 "=X,R1w"))] - "" + "TARGET_A16" "@ sha.l\t%2,%0 - mov.b\tr1l,r1h\n\tsha.l\tr1h,%0" + mov.b\t%2,r1h\n\tsha.l\tr1h,%0" ) -(define_insn "lshlsi3_i" +(define_insn "lshrsi3_16" [(set (match_operand:SI 0 "r0123_operand" "=R03,R03") (lshiftrt:SI (match_operand:SI 1 "r0123_operand" "0,0") - (neg:QI (match_operand:QI 2 "mrai_operand" "In4,R1w")))) + (neg:QI (match_operand:QI 2 "shiftcount_operand" "In4,RqiSd")))) (clobber (match_scratch:HI 3 "=X,R1w"))] - "" + "TARGET_A16" "@ shl.l\t%2,%0 - mov.b\tr1l,r1h\n\tshl.l\tr1h,%0" + mov.b\t%2,r1h\n\tshl.l\tr1h,%0" + ) + + + +(define_insn "ashlsi3_24" + [(set (match_operand:SI 0 "r0123_operand" "=R03,R03") + (ashift:SI (match_operand:SI 1 "r0123_operand" "0,0") + (match_operand:QI 2 "longshiftcount_operand" "In6,RqiSd"))) + (clobber (match_scratch:HI 3 "=X,R1w"))] + "TARGET_A24" + "@ + sha.l\t%2,%0 + mov.b\t%2,r1h\n\tsha.l\tr1h,%0" ) +(define_insn "ashrsi3_24" + [(set (match_operand:SI 0 "r0123_operand" "=R03,R03") + (ashiftrt:SI (match_operand:SI 1 "r0123_operand" "0,0") + (neg:QI (match_operand:QI 2 "longshiftcount_operand" "In6,RqiSd")))) + (clobber (match_scratch:HI 3 "=X,R1w"))] + "TARGET_A24" + "@ + sha.l\t%2,%0 + mov.b\t%2,r1h\n\tsha.l\tr1h,%0" + ) + +(define_insn "lshrsi3_24" + [(set (match_operand:SI 0 "r0123_operand" "=R03,R03") + (lshiftrt:SI (match_operand:SI 1 "r0123_operand" "0,0") + (neg:QI (match_operand:QI 2 "longshiftcount_operand" "In6,RqiSd")))) + (clobber (match_scratch:HI 3 "=X,R1w"))] + "TARGET_A24" + "@ + shl.l\t%2,%0 + mov.b\t%2,r1h\n\tshl.l\tr1h,%0" + ) + + + (define_expand "ashlsi3" [(parallel [(set (match_operand:SI 0 "r0123_operand" "") - (ashift:SI (match_operand:SI 1 "r0123_operand" "") - (match_operand:QI 2 "mrai_operand" ""))) + (ashift:SI (match_operand:SI 1 "r0123_operand" "") + (match_operand:QI 2 "mrai_operand" ""))) (clobber (match_scratch:HI 3 ""))])] "" - "if (m32c_prepare_shift (operands, 1, 4)) + "if (m32c_prepare_shift (operands, 1, ASHIFT)) DONE;" ) @@ -284,7 +327,7 @@ (neg:QI (match_operand:QI 2 "mrai_operand" "")))) (clobber (match_scratch:HI 3 ""))])] "" - "if (m32c_prepare_shift (operands, -1, 4)) + "if (m32c_prepare_shift (operands, -1, ASHIFTRT)) DONE;" ) @@ -294,6 +337,6 @@ (neg:QI (match_operand:QI 2 "mrai_operand" "")))) (clobber (match_scratch:HI 3 ""))])] "" - "if (m32c_prepare_shift (operands, -1, 5)) + "if (m32c_prepare_shift (operands, -1, LSHIFTRT)) DONE;" ) diff --git a/gcc/config/m32r/m32r-protos.h b/gcc/config/m32r/m32r-protos.h index a8479302540..ee03a1e4cd7 100644 --- a/gcc/config/m32r/m32r-protos.h +++ b/gcc/config/m32r/m32r-protos.h @@ -23,8 +23,6 @@ complications. */ #define Mmode enum machine_mode -extern void sbss_section (void); -extern void sdata_section (void); extern void m32r_init (void); extern void m32r_init_expanders (void); extern unsigned m32r_compute_frame_size (int); diff --git a/gcc/config/m32r/m32r.h b/gcc/config/m32r/m32r.h index 7f82a1cd3bf..785896a75e8 100644 --- a/gcc/config/m32r/m32r.h +++ b/gcc/config/m32r/m32r.h @@ -1529,9 +1529,9 @@ extern char m32r_punct_chars[256]; { \ if (! TARGET_SDATA_NONE \ && (SIZE) > 0 && (SIZE) <= g_switch_value) \ - named_section (0, ".sbss", 0); \ + switch_to_section (get_named_section (NULL, ".sbss", 0)); \ else \ - bss_section (); \ + switch_to_section (bss_section); \ ASM_OUTPUT_ALIGN (FILE, floor_log2 (ALIGN / BITS_PER_UNIT)); \ last_assemble_variable_decl = DECL; \ ASM_DECLARE_OBJECT_NAME (FILE, NAME, DECL); \ diff --git a/gcc/config/m68hc11/m68hc11.c b/gcc/config/m68hc11/m68hc11.c index 473999b9ccf..2a0c725f1c5 100644 --- a/gcc/config/m68hc11/m68hc11.c +++ b/gcc/config/m68hc11/m68hc11.c @@ -822,7 +822,7 @@ m68hc11_reload_operands (rtx operands[]) } /* If the offset is out of range, we have to compute the address - with a separate add instruction. We try to do with with an 8-bit + with a separate add instruction. We try to do this with an 8-bit add on the A register. This is possible only if the lowest part of the offset (i.e., big_offset % 256) is a valid constant offset with respect to the mode. If it's not, we have to generate a diff --git a/gcc/config/m68k/fpgnulib.c b/gcc/config/m68k/fpgnulib.c index 2e8dd5d1430..1ef43c758f0 100644 --- a/gcc/config/m68k/fpgnulib.c +++ b/gcc/config/m68k/fpgnulib.c @@ -105,6 +105,69 @@ union long_double_long #ifndef EXTFLOAT +int +__unordsf2(float a, float b) +{ + union float_long fl; + + fl.f = a; + if (EXP(fl.l) == EXP(~0u) && (MANT(fl.l) & ~HIDDEN) != 0) + return 1; + fl.f = b; + if (EXP(fl.l) == EXP(~0u) && (MANT(fl.l) & ~HIDDEN) != 0) + return 1; + return 0; +} + +int +__unorddf2(double a, double b) +{ + union double_long dl; + + dl.d = a; + if (EXPD(dl) == EXPDMASK + && ((dl.l.upper & MANTDMASK) != 0 || dl.l.lower != 0)) + return 1; + dl.d = b; + if (EXPD(dl) == EXPDMASK + && ((dl.l.upper & MANTDMASK) != 0 || dl.l.lower != 0)) + return 1; + return 0; +} + +/* convert unsigned int to double */ +double +__floatunsidf (unsigned long a1) +{ + long exp = 32 + EXCESSD; + union double_long dl; + + if (!a1) + { + dl.l.upper = dl.l.lower = 0; + return dl.d; + } + + while (a1 < 0x2000000L) + { + a1 <<= 4; + exp -= 4; + } + + while (a1 < 0x80000000L) + { + a1 <<= 1; + exp--; + } + + /* pack up and go home */ + dl.l.upper = exp << 20L; + dl.l.upper |= (a1 >> 11L) & ~HIDDEND; + dl.l.lower = a1 << 21L; + + return dl.d; +} + /* convert int to double */ double __floatsidf (long a1) @@ -151,6 +214,14 @@ __floatsidf (long a1) return dl.d; } +/* convert unsigned int to float */ +float +__floatunsisf (unsigned long l) +{ + double foo = __floatunsidf (l); + return foo; +} + /* convert int to float */ float __floatsisf (long l) @@ -170,13 +241,13 @@ __extendsfdf2 (float a1) fl1.f = a1; - if (!fl1.l) + dl.l.upper = SIGN (fl1.l); + if ((fl1.l & ~SIGNBIT) == 0) { - dl.l.upper = dl.l.lower = 0; + dl.l.lower = 0; return dl.d; } - dl.l.upper = SIGN (fl1.l); exp = EXP(fl1.l); mant = MANT (fl1.l) & ~HIDDEN; if (exp == 0) @@ -209,8 +280,11 @@ __truncdfsf2 (double a1) dl1.d = a1; - if (!dl1.l.upper && !dl1.l.lower) - return 0; + if ((dl1.l.upper & ~SIGNBIT) == 0 && !dl1.l.lower) + { + fl.l = SIGND(dl1); + return fl.f; + } exp = EXPD (dl1) - EXCESSD + EXCESS; @@ -292,6 +366,7 @@ __fixsfsi (float a1) We assume all numbers are normalized, don't do any rounding, etc. */ /* Prototypes for the above in case we use them. */ +double __floatunsidf (unsigned long); double __floatsidf (long); float __floatsisf (long); double __extendsfdf2 (float); @@ -299,6 +374,22 @@ float __truncdfsf2 (double); long __fixdfsi (double); long __fixsfsi (float); +int +__unordxf2(long double a, long double b) +{ + union long_double_long ldl; + + ldl.ld = a; + if (EXPX(ldl) == EXPXMASK + && ((ldl.l.middle & MANTXMASK) != 0 || ldl.l.lower != 0)) + return 1; + ldl.ld = b; + if (EXPX(ldl) == EXPXMASK + && ((ldl.l.middle & MANTXMASK) != 0 || ldl.l.lower != 0)) + return 1; + return 0; +} + /* convert double to long double */ long double __extenddfxf2 (double d) @@ -310,10 +401,14 @@ __extenddfxf2 (double d) dl.d = d; /*printf ("dfxf in: %g\n", d);*/ - if (!dl.l.upper && !dl.l.lower) - return 0; - ldl.l.upper = SIGND (dl); + if ((dl.l.upper & ~SIGNBIT) == 0 && !dl.l.lower) + { + ldl.l.middle = 0; + ldl.l.lower = 0; + return ldl.ld; + } + exp = EXPD (dl) - EXCESSD + EXCESSX; ldl.l.upper |= exp << 16; ldl.l.middle = HIDDENX; @@ -339,14 +434,17 @@ __truncxfdf2 (long double ld) ldl.ld = ld; /*printf ("xfdf in: %s\n", dumpxf (ld));*/ - if (!ldl.l.upper && !ldl.l.middle && !ldl.l.lower) - return 0; + dl.l.upper = SIGNX (ldl); + if ((ldl.l.upper & ~SIGNBIT) == 0 && !ldl.l.middle && !ldl.l.lower) + { + dl.l.lower = 0; + return dl.d; + } exp = EXPX (ldl) - EXCESSX + EXCESSD; /* ??? quick and dirty: keep `exp' sane */ if (exp >= EXPDMASK) exp = EXPDMASK - 1; - dl.l.upper = SIGNX (ldl); dl.l.upper |= exp << (32 - (EXPDBITS + 1)); /* +1-1: add one for sign bit, but take one off for explicit-integer-bit */ dl.l.upper |= (ldl.l.middle & MANTXMASK) >> (EXPDBITS + 1 - 1); @@ -381,6 +479,14 @@ __floatsixf (long l) return foo; } +/* convert an unsigned int to a long double */ +long double +__floatunsixf (unsigned long l) +{ + double foo = __floatunsidf (l); + return foo; +} + /* convert a long double to an int */ long __fixxfsi (long double ld) diff --git a/gcc/config/m68k/lb1sf68.asm b/gcc/config/m68k/lb1sf68.asm index e1b4c2fcc3d..24529ccb129 100644 --- a/gcc/config/m68k/lb1sf68.asm +++ b/gcc/config/m68k/lb1sf68.asm @@ -599,6 +599,7 @@ ROUND_TO_MINUS = 3 | round result towards minus infinity .globl SYM (__divdf3) .globl SYM (__negdf2) .globl SYM (__cmpdf2) + .globl SYM (__cmpdf2_internal) .text .even @@ -1285,7 +1286,12 @@ Ladddf$b: | Return b (if a is zero) movel d2,d0 movel d3,d1 - bra 1f + bne 1f | Check if b is -0 + cmpl IMM (0x80000000),d0 + bne 1f + andl IMM (0x80000000),d7 | Use the sign of a + clrl d0 + bra Ladddf$ret Ladddf$a: movel a6@(8),d0 movel a6@(12),d1 @@ -2218,8 +2224,8 @@ GREATER = 1 LESS = -1 EQUAL = 0 -| int __cmpdf2(double, double); -SYM (__cmpdf2): +| int __cmpdf2_internal(double, double, int); +SYM (__cmpdf2_internal): #ifndef __mcoldfire__ link a6,IMM (0) moveml d2-d7,sp@- | save registers @@ -2238,15 +2244,15 @@ SYM (__cmpdf2): bclr IMM (31),d0 | and clear signs in d0 and d2 movel d2,d7 | bclr IMM (31),d2 | - cmpl IMM (0x7fff0000),d0 | check for a == NaN - bhi Ld$inop | if d0 > 0x7ff00000, a is NaN + cmpl IMM (0x7ff00000),d0 | check for a == NaN + bhi Lcmpd$inop | if d0 > 0x7ff00000, a is NaN beq Lcmpdf$a$nf | if equal can be INFINITY, so check d1 movel d0,d4 | copy into d4 to test for zero orl d1,d4 | beq Lcmpdf$a$0 | Lcmpdf$0: - cmpl IMM (0x7fff0000),d2 | check for b == NaN - bhi Ld$inop | if d2 > 0x7ff00000, b is NaN + cmpl IMM (0x7ff00000),d2 | check for b == NaN + bhi Lcmpd$inop | if d2 > 0x7ff00000, b is NaN beq Lcmpdf$b$nf | if equal can be INFINITY, so check d3 movel d2,d4 | orl d3,d4 | @@ -2336,6 +2342,24 @@ Lcmpdf$b$nf: bne Ld$inop bra Lcmpdf$1 +Lcmpd$inop: + movl a6@(24),d0 + movew IMM (INEXACT_RESULT+INVALID_OPERATION),d7 + moveq IMM (DOUBLE_FLOAT),d6 + PICJUMP $_exception_handler + +| int __cmpdf2(double, double); +SYM (__cmpdf2): + link a6,IMM (0) + pea 1 + movl a6@(20),sp@- + movl a6@(16),sp@- + movl a6@(12),sp@- + movl a6@(8),sp@- + bsr SYM (__cmpdf2_internal) + unlk a6 + rts + |============================================================================= | rounding routines |============================================================================= @@ -2483,6 +2507,7 @@ ROUND_TO_MINUS = 3 | round result towards minus infinity .globl SYM (__divsf3) .globl SYM (__negsf2) .globl SYM (__cmpsf2) + .globl SYM (__cmpsf2_internal) | These are common routines to return and signal exceptions. @@ -2570,16 +2595,13 @@ SYM (__addsf3): #endif movel a6@(8),d0 | get first operand movel a6@(12),d1 | get second operand - movel d0,d6 | get d0's sign bit ' + movel d0,a0 | get d0's sign bit ' addl d0,d0 | check and clear sign bit of a beq Laddsf$b | if zero return second operand - movel d1,d7 | save b's sign bit ' + movel d1,a1 | save b's sign bit ' addl d1,d1 | get rid of sign bit beq Laddsf$a | if zero return first operand - movel d6,a0 | save signs in address registers - movel d7,a1 | so we can use d6 and d7 - | Get the exponents and check for denormalized and/or infinity. movel IMM (0x00ffffff),d4 | mask to get fraction @@ -2950,7 +2972,12 @@ Laddsf$b$den: Laddsf$b: | Return b (if a is zero). movel a6@(12),d0 - bra 1f + cmpl IMM (0x80000000),d0 | Check if b is -0 + bne 1f + movel a0,d7 + andl IMM (0x80000000),d7 | Use the sign of a + clrl d0 + bra Laddsf$ret Laddsf$a: | Return a (if b is zero). movel a6@(8),d0 @@ -3626,8 +3653,8 @@ GREATER = 1 LESS = -1 EQUAL = 0 -| int __cmpsf2(float, float); -SYM (__cmpsf2): +| int __cmpsf2_internal(float, float, int); +SYM (__cmpsf2_internal): #ifndef __mcoldfire__ link a6,IMM (0) moveml d2-d7,sp@- | save registers @@ -3645,13 +3672,13 @@ SYM (__cmpsf2): andl IMM (0x7fffffff),d0 beq Lcmpsf$a$0 cmpl IMM (0x7f800000),d0 - bhi Lf$inop + bhi Lcmpf$inop Lcmpsf$1: movel d1,d7 andl IMM (0x7fffffff),d1 beq Lcmpsf$b$0 cmpl IMM (0x7f800000),d1 - bhi Lf$inop + bhi Lcmpf$inop Lcmpsf$2: | Check the signs eorl d6,d7 @@ -3717,6 +3744,22 @@ Lcmpsf$b$0: bclr IMM (31),d7 bra Lcmpsf$2 +Lcmpf$inop: + movl a6@(16),d0 + movew IMM (INEXACT_RESULT+INVALID_OPERATION),d7 + moveq IMM (SINGLE_FLOAT),d6 + PICJUMP $_exception_handler + +| int __cmpsf2(float, float); +SYM (__cmpsf2): + link a6,IMM (0) + pea 1 + movl a6@(12),sp@- + movl a6@(8),sp@- + bsr (__cmpsf2_internal) + unlk a6 + rts + |============================================================================= | rounding routines |============================================================================= @@ -3801,6 +3844,8 @@ Lround$to$minus: | simply calls __cmpdf2. It would be more efficient to give the | __cmpdf2 routine several names, but separating them out will make it | easier to write efficient versions of these routines someday. +| If the operands recompare unordered unordered __gtdf2 and __gedf2 return -1. +| The other routines return 1. #ifdef L_eqdf2 .text @@ -3808,11 +3853,12 @@ Lround$to$minus: .globl SYM (__eqdf2) SYM (__eqdf2): link a6,IMM (0) + pea 1 movl a6@(20),sp@- movl a6@(16),sp@- movl a6@(12),sp@- movl a6@(8),sp@- - PICCALL SYM (__cmpdf2) + PICCALL SYM (__cmpdf2_internal) unlk a6 rts #endif /* L_eqdf2 */ @@ -3823,11 +3869,12 @@ SYM (__eqdf2): .globl SYM (__nedf2) SYM (__nedf2): link a6,IMM (0) + pea 1 movl a6@(20),sp@- movl a6@(16),sp@- movl a6@(12),sp@- movl a6@(8),sp@- - PICCALL SYM (__cmpdf2) + PICCALL SYM (__cmpdf2_internal) unlk a6 rts #endif /* L_nedf2 */ @@ -3838,11 +3885,12 @@ SYM (__nedf2): .globl SYM (__gtdf2) SYM (__gtdf2): link a6,IMM (0) + pea -1 movl a6@(20),sp@- movl a6@(16),sp@- movl a6@(12),sp@- movl a6@(8),sp@- - PICCALL SYM (__cmpdf2) + PICCALL SYM (__cmpdf2_internal) unlk a6 rts #endif /* L_gtdf2 */ @@ -3853,11 +3901,12 @@ SYM (__gtdf2): .globl SYM (__gedf2) SYM (__gedf2): link a6,IMM (0) + pea -1 movl a6@(20),sp@- movl a6@(16),sp@- movl a6@(12),sp@- movl a6@(8),sp@- - PICCALL SYM (__cmpdf2) + PICCALL SYM (__cmpdf2_internal) unlk a6 rts #endif /* L_gedf2 */ @@ -3868,11 +3917,12 @@ SYM (__gedf2): .globl SYM (__ltdf2) SYM (__ltdf2): link a6,IMM (0) + pea 1 movl a6@(20),sp@- movl a6@(16),sp@- movl a6@(12),sp@- movl a6@(8),sp@- - PICCALL SYM (__cmpdf2) + PICCALL SYM (__cmpdf2_internal) unlk a6 rts #endif /* L_ltdf2 */ @@ -3883,11 +3933,12 @@ SYM (__ltdf2): .globl SYM (__ledf2) SYM (__ledf2): link a6,IMM (0) + pea 1 movl a6@(20),sp@- movl a6@(16),sp@- movl a6@(12),sp@- movl a6@(8),sp@- - PICCALL SYM (__cmpdf2) + PICCALL SYM (__cmpdf2_internal) unlk a6 rts #endif /* L_ledf2 */ @@ -3901,9 +3952,10 @@ SYM (__ledf2): .globl SYM (__eqsf2) SYM (__eqsf2): link a6,IMM (0) + pea 1 movl a6@(12),sp@- movl a6@(8),sp@- - PICCALL SYM (__cmpsf2) + PICCALL SYM (__cmpsf2_internal) unlk a6 rts #endif /* L_eqsf2 */ @@ -3914,9 +3966,10 @@ SYM (__eqsf2): .globl SYM (__nesf2) SYM (__nesf2): link a6,IMM (0) + pea 1 movl a6@(12),sp@- movl a6@(8),sp@- - PICCALL SYM (__cmpsf2) + PICCALL SYM (__cmpsf2_internal) unlk a6 rts #endif /* L_nesf2 */ @@ -3927,9 +3980,10 @@ SYM (__nesf2): .globl SYM (__gtsf2) SYM (__gtsf2): link a6,IMM (0) + pea -1 movl a6@(12),sp@- movl a6@(8),sp@- - PICCALL SYM (__cmpsf2) + PICCALL SYM (__cmpsf2_internal) unlk a6 rts #endif /* L_gtsf2 */ @@ -3940,9 +3994,10 @@ SYM (__gtsf2): .globl SYM (__gesf2) SYM (__gesf2): link a6,IMM (0) + pea -1 movl a6@(12),sp@- movl a6@(8),sp@- - PICCALL SYM (__cmpsf2) + PICCALL SYM (__cmpsf2_internal) unlk a6 rts #endif /* L_gesf2 */ @@ -3953,9 +4008,10 @@ SYM (__gesf2): .globl SYM (__ltsf2) SYM (__ltsf2): link a6,IMM (0) + pea 1 movl a6@(12),sp@- movl a6@(8),sp@- - PICCALL SYM (__cmpsf2) + PICCALL SYM (__cmpsf2_internal) unlk a6 rts #endif /* L_ltsf2 */ @@ -3966,9 +4022,10 @@ SYM (__ltsf2): .globl SYM (__lesf2) SYM (__lesf2): link a6,IMM (0) + pea 1 movl a6@(12),sp@- movl a6@(8),sp@- - PICCALL SYM (__cmpsf2) + PICCALL SYM (__cmpsf2_internal) unlk a6 rts #endif /* L_lesf2 */ diff --git a/gcc/config/m68k/m68k.c b/gcc/config/m68k/m68k.c index 2af20a480c3..0f3c2d04f7e 100644 --- a/gcc/config/m68k/m68k.c +++ b/gcc/config/m68k/m68k.c @@ -1,6 +1,6 @@ /* Subroutines for insn-output.c for Motorola 68000 family. Copyright (C) 1987, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, - 2001, 2003, 2004, 2005 + 2001, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This file is part of GCC. @@ -434,20 +434,21 @@ m68k_compute_frame_layout (void) HOST_WIDE_INT m68k_initial_elimination_offset (int from, int to) { - /* FIXME: The correct offset to compute here would appear to be - (frame_pointer_needed ? -UNITS_PER_WORD * 2 : -UNITS_PER_WORD); - but for some obscure reason, this must be 0 to get correct code. */ + int argptr_offset; + /* The arg pointer points 8 bytes before the start of the arguments, + as defined by FIRST_PARM_OFFSET. This makes it coincident with the + frame pointer in most frames. */ + argptr_offset = frame_pointer_needed ? 0 : UNITS_PER_WORD; if (from == ARG_POINTER_REGNUM && to == FRAME_POINTER_REGNUM) - return 0; + return argptr_offset; m68k_compute_frame_layout (); gcc_assert (to == STACK_POINTER_REGNUM); switch (from) { - case ARG_POINTER_REGNUM: - return current_frame.offset + current_frame.size - + (frame_pointer_needed ? -UNITS_PER_WORD * 2 : -UNITS_PER_WORD); + case ARG_POINTER_REGNUM: + return current_frame.offset + current_frame.size - argptr_offset; case FRAME_POINTER_REGNUM: return current_frame.offset + current_frame.size; default: @@ -496,13 +497,13 @@ m68k_save_reg (unsigned int regno, bool interrupt_handler) /* Interrupt handlers must also save call_used_regs if they are live or when calling nested functions. */ if (interrupt_handler) - { - if (regs_ever_live[regno]) - return true; + { + if (regs_ever_live[regno]) + return true; - if (!current_function_is_leaf && call_used_regs[regno]) - return true; - } + if (!current_function_is_leaf && call_used_regs[regno]) + return true; + } /* Never need to save registers that aren't touched. */ if (!regs_ever_live[regno]) @@ -517,7 +518,8 @@ m68k_save_reg (unsigned int regno, bool interrupt_handler) SIZE is an int: how many units of temporary storage to allocate. */ static void -m68k_output_function_prologue (FILE *stream, HOST_WIDE_INT size ATTRIBUTE_UNUSED) +m68k_output_function_prologue (FILE *stream, + HOST_WIDE_INT size ATTRIBUTE_UNUSED) { HOST_WIDE_INT fsize_with_regs; HOST_WIDE_INT cfa_offset = INCOMING_FRAME_SP_OFFSET; @@ -540,33 +542,24 @@ m68k_output_function_prologue (FILE *stream, HOST_WIDE_INT size ATTRIBUTE_UNUSED { if (current_frame.size == 0 && TARGET_68040) /* on the 68040, pea + move is faster than link.w 0 */ - fprintf (stream, MOTOROLA ? - "\tpea (%s)\n\tmove.l %s,%s\n" : - "\tpea %s@\n\tmovel %s,%s\n", - M68K_REGNAME(FRAME_POINTER_REGNUM), - M68K_REGNAME(STACK_POINTER_REGNUM), - M68K_REGNAME(FRAME_POINTER_REGNUM)); + fprintf (stream, (MOTOROLA + ? "\tpea (%s)\n\tmove.l %s,%s\n" + : "\tpea %s@\n\tmovel %s,%s\n"), + M68K_REGNAME (FRAME_POINTER_REGNUM), + M68K_REGNAME (STACK_POINTER_REGNUM), + M68K_REGNAME (FRAME_POINTER_REGNUM)); else if (fsize_with_regs < 0x8000) asm_fprintf (stream, "\tlink" ASM_DOTW " %s,%I%wd\n", - M68K_REGNAME(FRAME_POINTER_REGNUM), -fsize_with_regs); + M68K_REGNAME (FRAME_POINTER_REGNUM), -fsize_with_regs); else if (TARGET_68020) asm_fprintf (stream, "\tlink" ASM_DOTL " %s,%I%wd\n", - M68K_REGNAME(FRAME_POINTER_REGNUM), -fsize_with_regs); + M68K_REGNAME (FRAME_POINTER_REGNUM), -fsize_with_regs); else /* Adding negative number is faster on the 68040. */ - asm_fprintf (stream, "\tlink" ASM_DOTW " %s,%I0\n" - "\tadd" ASM_DOT "l %I%wd,%Rsp\n", - M68K_REGNAME(FRAME_POINTER_REGNUM), -fsize_with_regs); - - if (dwarf2out_do_frame ()) - { - char *l; - l = (char *) dwarf2out_cfi_label (); - cfa_offset += 4; - dwarf2out_reg_save (l, FRAME_POINTER_REGNUM, -cfa_offset); - dwarf2out_def_cfa (l, FRAME_POINTER_REGNUM, cfa_offset); - cfa_offset += current_frame.size; - } + asm_fprintf (stream, + "\tlink" ASM_DOTW " %s,%I0\n" + "\tadd" ASM_DOT "l %I%wd,%Rsp\n", + M68K_REGNAME (FRAME_POINTER_REGNUM), -fsize_with_regs); } else if (fsize_with_regs) /* !frame_pointer_needed */ { @@ -593,26 +586,39 @@ m68k_output_function_prologue (FILE *stream, HOST_WIDE_INT size ATTRIBUTE_UNUSED asm_fprintf (stream, "\tadd" ASM_DOT "w %I%wd,%Rsp\n", -fsize_with_regs); else - asm_fprintf (stream, MOTOROLA ? - "\tlea (%wd,%Rsp),%Rsp\n" : - "\tlea %Rsp@(%wd),%Rsp\n", + asm_fprintf (stream, (MOTOROLA + ? "\tlea (%wd,%Rsp),%Rsp\n" + : "\tlea %Rsp@(%wd),%Rsp\n"), -fsize_with_regs); } else /* fsize_with_regs >= 0x8000 */ - asm_fprintf (stream, "\tadd" ASM_DOT "l %I%wd,%Rsp\n", -fsize_with_regs); + asm_fprintf (stream, "\tadd" ASM_DOT "l %I%wd,%Rsp\n", + -fsize_with_regs); + } /* !frame_pointer_needed */ - if (dwarf2out_do_frame ()) + if (dwarf2out_do_frame ()) + { + if (frame_pointer_needed) { - cfa_offset += current_frame.size + 4; + char *l; + l = (char *) dwarf2out_cfi_label (); + cfa_offset += 4; + dwarf2out_reg_save (l, FRAME_POINTER_REGNUM, -cfa_offset); + dwarf2out_def_cfa (l, FRAME_POINTER_REGNUM, cfa_offset); + cfa_offset += current_frame.size; + } + else + { + cfa_offset += current_frame.size; dwarf2out_def_cfa ("", STACK_POINTER_REGNUM, cfa_offset); - } - } /* !frame_pointer_needed */ + } + } if (current_frame.fpu_mask) { - asm_fprintf (stream, MOTOROLA ? - "\tfmovm %I0x%x,-(%Rsp)\n" : - "\tfmovem %I0x%x,%Rsp@-\n", + asm_fprintf (stream, (MOTOROLA + ? "\tfmovm %I0x%x,-(%Rsp)\n" + : "\tfmovem %I0x%x,%Rsp@-\n"), current_frame.fpu_mask); if (dwarf2out_do_frame ()) @@ -635,7 +641,7 @@ m68k_output_function_prologue (FILE *stream, HOST_WIDE_INT size ATTRIBUTE_UNUSED { if (REG_P (stack_limit_rtx)) asm_fprintf (stream, "\tcmp" ASM_DOT "l %s,%Rsp\n\ttrapcs\n", - M68K_REGNAME(REGNO (stack_limit_rtx))); + M68K_REGNAME (REGNO (stack_limit_rtx))); else if (GET_CODE (stack_limit_rtx) != SYMBOL_REF) warning (0, "stack limit expression is not supported"); } @@ -652,10 +658,10 @@ m68k_output_function_prologue (FILE *stream, HOST_WIDE_INT size ATTRIBUTE_UNUSED for (i = 0; i < 16; i++) if (current_frame.reg_rev_mask & (1 << i)) { - asm_fprintf (stream, MOTOROLA ? - "\t%Omove.l %s,-(%Rsp)\n" : - "\tmovel %s,%Rsp@-\n", - M68K_REGNAME(15 - i)); + asm_fprintf (stream, (MOTOROLA + ? "\t%Omove.l %s,-(%Rsp)\n" + : "\tmovel %s,%Rsp@-\n"), + M68K_REGNAME (15 - i)); if (dwarf2out_do_frame ()) { char *l = (char *) dwarf2out_cfi_label (); @@ -676,14 +682,14 @@ m68k_output_function_prologue (FILE *stream, HOST_WIDE_INT size ATTRIBUTE_UNUSED The required register save space was combined earlier with the fsize_with_regs amount. */ - asm_fprintf (stream, MOTOROLA ? - "\tmovm.l %I0x%x,(%Rsp)\n" : - "\tmoveml %I0x%x,%Rsp@\n", + asm_fprintf (stream, (MOTOROLA + ? "\tmovm.l %I0x%x,(%Rsp)\n" + : "\tmoveml %I0x%x,%Rsp@\n"), current_frame.reg_mask); else - asm_fprintf (stream, MOTOROLA ? - "\tmovm.l %I0x%x,-(%Rsp)\n" : - "\tmoveml %I0x%x,%Rsp@-\n", + asm_fprintf (stream, (MOTOROLA + ? "\tmovm.l %I0x%x,-(%Rsp)\n" + : "\tmoveml %I0x%x,%Rsp@-\n"), current_frame.reg_rev_mask); if (dwarf2out_do_frame ()) { @@ -698,29 +704,30 @@ m68k_output_function_prologue (FILE *stream, HOST_WIDE_INT size ATTRIBUTE_UNUSED dwarf2out_reg_save (l, regno, -cfa_offset + n_regs++ * 4); } } - if (!TARGET_SEP_DATA && flag_pic && - (current_function_uses_pic_offset_table || - (!current_function_is_leaf && TARGET_ID_SHARED_LIBRARY))) + if (!TARGET_SEP_DATA && flag_pic + && (current_function_uses_pic_offset_table + || (!current_function_is_leaf && TARGET_ID_SHARED_LIBRARY))) { if (TARGET_ID_SHARED_LIBRARY) { asm_fprintf (stream, "\tmovel %s@(%s), %s\n", - M68K_REGNAME(PIC_OFFSET_TABLE_REGNUM), + M68K_REGNAME (PIC_OFFSET_TABLE_REGNUM), m68k_library_id_string, - M68K_REGNAME(PIC_OFFSET_TABLE_REGNUM)); + M68K_REGNAME (PIC_OFFSET_TABLE_REGNUM)); } else { if (MOTOROLA) - asm_fprintf (stream, "\t%Olea (%Rpc, %U_GLOBAL_OFFSET_TABLE_@GOTPC), %s\n", - M68K_REGNAME(PIC_OFFSET_TABLE_REGNUM)); + asm_fprintf (stream, + "\t%Olea (%Rpc, %U_GLOBAL_OFFSET_TABLE_@GOTPC), %s\n", + M68K_REGNAME (PIC_OFFSET_TABLE_REGNUM)); else { asm_fprintf (stream, "\tmovel %I%U_GLOBAL_OFFSET_TABLE_, %s\n", - M68K_REGNAME(PIC_OFFSET_TABLE_REGNUM)); + M68K_REGNAME (PIC_OFFSET_TABLE_REGNUM)); asm_fprintf (stream, "\tlea %Rpc@(0,%s:l),%s\n", - M68K_REGNAME(PIC_OFFSET_TABLE_REGNUM), - M68K_REGNAME(PIC_OFFSET_TABLE_REGNUM)); + M68K_REGNAME (PIC_OFFSET_TABLE_REGNUM), + M68K_REGNAME (PIC_OFFSET_TABLE_REGNUM)); } } } @@ -736,7 +743,7 @@ use_return_insn (void) /* We can output the epilogue as RTL only if no registers need to be restored. */ - m68k_compute_frame_layout(); + m68k_compute_frame_layout (); return current_frame.reg_no ? false : true; } @@ -749,14 +756,15 @@ use_return_insn (void) omit stack adjustments before returning. */ static void -m68k_output_function_epilogue (FILE *stream, HOST_WIDE_INT size ATTRIBUTE_UNUSED) +m68k_output_function_epilogue (FILE *stream, + HOST_WIDE_INT size ATTRIBUTE_UNUSED) { HOST_WIDE_INT fsize, fsize_with_regs; bool big = false; bool restore_from_sp = false; rtx insn = get_last_insn (); - m68k_compute_frame_layout(); + m68k_compute_frame_layout (); /* If the last insn was a BARRIER, we don't have to write any code. */ if (GET_CODE (insn) == NOTE) @@ -775,11 +783,12 @@ m68k_output_function_epilogue (FILE *stream, HOST_WIDE_INT size ATTRIBUTE_UNUSED fsize = current_frame.size; - /* FIXME : leaf_function_p below is too strong. + /* FIXME: leaf_function_p below is too strong. What we really need to know there is if there could be pending stack adjustment needed at that point. */ - restore_from_sp = ! frame_pointer_needed - || (! current_function_calls_alloca && leaf_function_p ()); + restore_from_sp + = (! frame_pointer_needed + || (! current_function_calls_alloca && leaf_function_p ())); /* fsize_with_regs is the size we need to adjust the sp when popping the frame. */ @@ -823,64 +832,65 @@ m68k_output_function_epilogue (FILE *stream, HOST_WIDE_INT size ATTRIBUTE_UNUSED if (MOTOROLA) asm_fprintf (stream, "\t%Omove.l -%wd(%s,%Ra1.l),%s\n", offset, - M68K_REGNAME(FRAME_POINTER_REGNUM), - M68K_REGNAME(i)); + M68K_REGNAME (FRAME_POINTER_REGNUM), + M68K_REGNAME (i)); else asm_fprintf (stream, "\tmovel %s@(-%wd,%Ra1:l),%s\n", - M68K_REGNAME(FRAME_POINTER_REGNUM), + M68K_REGNAME (FRAME_POINTER_REGNUM), offset, - M68K_REGNAME(i)); + M68K_REGNAME (i)); } else if (restore_from_sp) - asm_fprintf (stream, MOTOROLA ? - "\t%Omove.l (%Rsp)+,%s\n" : - "\tmovel %Rsp@+,%s\n", - M68K_REGNAME(i)); + asm_fprintf (stream, (MOTOROLA + ? "\t%Omove.l (%Rsp)+,%s\n" + : "\tmovel %Rsp@+,%s\n"), + M68K_REGNAME (i)); else { if (MOTOROLA) asm_fprintf (stream, "\t%Omove.l -%wd(%s),%s\n", offset, - M68K_REGNAME(FRAME_POINTER_REGNUM), - M68K_REGNAME(i)); + M68K_REGNAME (FRAME_POINTER_REGNUM), + M68K_REGNAME (i)); else asm_fprintf (stream, "\tmovel %s@(-%wd),%s\n", - M68K_REGNAME(FRAME_POINTER_REGNUM), + M68K_REGNAME (FRAME_POINTER_REGNUM), offset, - M68K_REGNAME(i)); + M68K_REGNAME (i)); } offset -= 4; } } else if (current_frame.reg_mask) { - /* The ColdFire requires special handling due to its limited moveml insn. */ + /* The ColdFire requires special handling due to its limited moveml + insn. */ if (TARGET_COLDFIRE) { if (big) { asm_fprintf (stream, "\tadd" ASM_DOT "l %s,%Ra1\n", - M68K_REGNAME(FRAME_POINTER_REGNUM)); - asm_fprintf (stream, MOTOROLA ? - "\tmovm.l (%Ra1),%I0x%x\n" : - "\tmoveml %Ra1@,%I0x%x\n", + M68K_REGNAME (FRAME_POINTER_REGNUM)); + asm_fprintf (stream, (MOTOROLA + ? "\tmovm.l (%Ra1),%I0x%x\n" + : "\tmoveml %Ra1@,%I0x%x\n"), current_frame.reg_mask); } else if (restore_from_sp) - asm_fprintf (stream, MOTOROLA ? - "\tmovm.l (%Rsp),%I0x%x\n" : - "\tmoveml %Rsp@,%I0x%x\n", + asm_fprintf (stream, (MOTOROLA + ? "\tmovm.l (%Rsp),%I0x%x\n" + : "\tmoveml %Rsp@,%I0x%x\n"), current_frame.reg_mask); else { if (MOTOROLA) asm_fprintf (stream, "\tmovm.l -%wd(%s),%I0x%x\n", current_frame.offset + fsize, - M68K_REGNAME(FRAME_POINTER_REGNUM), + M68K_REGNAME (FRAME_POINTER_REGNUM), current_frame.reg_mask); else asm_fprintf (stream, "\tmoveml %s@(-%wd),%I0x%x\n", - M68K_REGNAME(FRAME_POINTER_REGNUM), + M68K_REGNAME (FRAME_POINTER_REGNUM), current_frame.offset + fsize, current_frame.reg_mask); } @@ -892,19 +902,19 @@ m68k_output_function_epilogue (FILE *stream, HOST_WIDE_INT size ATTRIBUTE_UNUSED if (MOTOROLA) asm_fprintf (stream, "\tmovm.l -%wd(%s,%Ra1.l),%I0x%x\n", current_frame.offset + fsize, - M68K_REGNAME(FRAME_POINTER_REGNUM), + M68K_REGNAME (FRAME_POINTER_REGNUM), current_frame.reg_mask); else asm_fprintf (stream, "\tmoveml %s@(-%wd,%Ra1:l),%I0x%x\n", - M68K_REGNAME(FRAME_POINTER_REGNUM), + M68K_REGNAME (FRAME_POINTER_REGNUM), current_frame.offset + fsize, current_frame.reg_mask); } else if (restore_from_sp) { - asm_fprintf (stream, MOTOROLA ? - "\tmovm.l (%Rsp)+,%I0x%x\n" : - "\tmoveml %Rsp@+,%I0x%x\n", + asm_fprintf (stream, (MOTOROLA + ? "\tmovm.l (%Rsp)+,%I0x%x\n" + : "\tmoveml %Rsp@+,%I0x%x\n"), current_frame.reg_mask); } else @@ -912,11 +922,11 @@ m68k_output_function_epilogue (FILE *stream, HOST_WIDE_INT size ATTRIBUTE_UNUSED if (MOTOROLA) asm_fprintf (stream, "\tmovm.l -%wd(%s),%I0x%x\n", current_frame.offset + fsize, - M68K_REGNAME(FRAME_POINTER_REGNUM), + M68K_REGNAME (FRAME_POINTER_REGNUM), current_frame.reg_mask); else asm_fprintf (stream, "\tmoveml %s@(-%wd),%I0x%x\n", - M68K_REGNAME(FRAME_POINTER_REGNUM), + M68K_REGNAME (FRAME_POINTER_REGNUM), current_frame.offset + fsize, current_frame.reg_mask); } @@ -929,11 +939,11 @@ m68k_output_function_epilogue (FILE *stream, HOST_WIDE_INT size ATTRIBUTE_UNUSED if (MOTOROLA) asm_fprintf (stream, "\tfmovm -%wd(%s,%Ra1.l),%I0x%x\n", current_frame.foffset + fsize, - M68K_REGNAME(FRAME_POINTER_REGNUM), + M68K_REGNAME (FRAME_POINTER_REGNUM), current_frame.fpu_rev_mask); else asm_fprintf (stream, "\tfmovem %s@(-%wd,%Ra1:l),%I0x%x\n", - M68K_REGNAME(FRAME_POINTER_REGNUM), + M68K_REGNAME (FRAME_POINTER_REGNUM), current_frame.foffset + fsize, current_frame.fpu_rev_mask); } @@ -951,17 +961,17 @@ m68k_output_function_epilogue (FILE *stream, HOST_WIDE_INT size ATTRIBUTE_UNUSED if (MOTOROLA) asm_fprintf (stream, "\tfmovm -%wd(%s),%I0x%x\n", current_frame.foffset + fsize, - M68K_REGNAME(FRAME_POINTER_REGNUM), + M68K_REGNAME (FRAME_POINTER_REGNUM), current_frame.fpu_rev_mask); else asm_fprintf (stream, "\tfmovem %s@(-%wd),%I0x%x\n", - M68K_REGNAME(FRAME_POINTER_REGNUM), + M68K_REGNAME (FRAME_POINTER_REGNUM), current_frame.foffset + fsize, current_frame.fpu_rev_mask); } } if (frame_pointer_needed) - fprintf (stream, "\tunlk %s\n", M68K_REGNAME(FRAME_POINTER_REGNUM)); + fprintf (stream, "\tunlk %s\n", M68K_REGNAME (FRAME_POINTER_REGNUM)); else if (fsize_with_regs) { if (fsize_with_regs <= 8) @@ -977,8 +987,9 @@ m68k_output_function_epilogue (FILE *stream, HOST_WIDE_INT size ATTRIBUTE_UNUSED { /* On the CPU32 it is faster to use two addqw instructions to add a small integer (8 < N <= 16) to a register. */ - asm_fprintf (stream, "\taddq" ASM_DOT "w %I8,%Rsp\n" - "\taddq" ASM_DOT "w %I%wd,%Rsp\n", + asm_fprintf (stream, + "\taddq" ASM_DOT "w %I8,%Rsp\n" + "\taddq" ASM_DOT "w %I%wd,%Rsp\n", fsize_with_regs - 8); } else if (fsize_with_regs < 0x8000) @@ -987,16 +998,16 @@ m68k_output_function_epilogue (FILE *stream, HOST_WIDE_INT size ATTRIBUTE_UNUSED asm_fprintf (stream, "\tadd" ASM_DOT "w %I%wd,%Rsp\n", fsize_with_regs); else - asm_fprintf (stream, MOTOROLA ? - "\tlea (%wd,%Rsp),%Rsp\n" : - "\tlea %Rsp@(%wd),%Rsp\n", + asm_fprintf (stream, (MOTOROLA + ? "\tlea (%wd,%Rsp),%Rsp\n" + : "\tlea %Rsp@(%wd),%Rsp\n"), fsize_with_regs); } else asm_fprintf (stream, "\tadd" ASM_DOT "l %I%wd,%Rsp\n", fsize_with_regs); } if (current_function_calls_eh_return) - asm_fprintf (stream, "\tadd" ASM_DOT"l %Ra0,%Rsp\n"); + asm_fprintf (stream, "\tadd" ASM_DOT "l %Ra0,%Rsp\n"); if (m68k_interrupt_function_p (current_function_decl)) fprintf (stream, "\trte\n"); else if (current_function_pops_args) @@ -1041,22 +1052,20 @@ flags_in_68881 (void) /* Output a BSR instruction suitable for PIC code. */ void -m68k_output_pic_call(rtx dest) +m68k_output_pic_call (rtx dest) { const char *out; if (!(GET_CODE (dest) == MEM && GET_CODE (XEXP (dest, 0)) == SYMBOL_REF)) out = "jsr %0"; - /* We output a BSR instruction if we're using -fpic or we're building for - * a target that supports long branches. If we're building -fPIC on the - * 68000, 68010 or ColdFire we generate one of two sequences: - * a shorter one that uses a GOT entry or a longer one that doesn't. - * We'll use the -Os command-line flag to decide which to generate. - * Both sequences take the same time to execute on the ColdFire. - */ + /* We output a BSR instruction if we're building for a target that + supports long branches. Otherwise we generate one of two sequences: + a shorter one that uses a GOT entry or a longer one that doesn't. + We'll use the -Os command-line flag to decide which to generate. + Both sequences take the same time to execute on the ColdFire. */ else if (TARGET_PCREL) out = "bsr.l %o0"; - else if ((flag_pic == 1) || TARGET_68020) + else if (TARGET_68020) #if defined(USE_GAS) out = "bsr.l %0@PLTPC"; #else @@ -1067,7 +1076,7 @@ m68k_output_pic_call(rtx dest) else out = "lea %0-.-8,%%a1\n\tjsr 0(%%pc,%%a1)"; - output_asm_insn(out, &dest); + output_asm_insn (out, &dest); } /* Output a dbCC; jCC sequence. Note we do not handle the @@ -1082,72 +1091,72 @@ output_dbcc_and_branch (rtx *operands) switch (GET_CODE (operands[3])) { case EQ: - output_asm_insn (MOTOROLA ? - "dbeq %0,%l1\n\tjbeq %l2" : - "dbeq %0,%l1\n\tjeq %l2", + output_asm_insn (MOTOROLA + ? "dbeq %0,%l1\n\tjbeq %l2" + : "dbeq %0,%l1\n\tjeq %l2", operands); break; case NE: - output_asm_insn (MOTOROLA ? - "dbne %0,%l1\n\tjbne %l2" : - "dbne %0,%l1\n\tjne %l2", + output_asm_insn (MOTOROLA + ? "dbne %0,%l1\n\tjbne %l2" + : "dbne %0,%l1\n\tjne %l2", operands); break; case GT: - output_asm_insn (MOTOROLA ? - "dbgt %0,%l1\n\tjbgt %l2" : - "dbgt %0,%l1\n\tjgt %l2", + output_asm_insn (MOTOROLA + ? "dbgt %0,%l1\n\tjbgt %l2" + : "dbgt %0,%l1\n\tjgt %l2", operands); break; case GTU: - output_asm_insn (MOTOROLA ? - "dbhi %0,%l1\n\tjbhi %l2" : - "dbhi %0,%l1\n\tjhi %l2", + output_asm_insn (MOTOROLA + ? "dbhi %0,%l1\n\tjbhi %l2" + : "dbhi %0,%l1\n\tjhi %l2", operands); break; case LT: - output_asm_insn (MOTOROLA ? - "dblt %0,%l1\n\tjblt %l2" : - "dblt %0,%l1\n\tjlt %l2", + output_asm_insn (MOTOROLA + ? "dblt %0,%l1\n\tjblt %l2" + : "dblt %0,%l1\n\tjlt %l2", operands); break; case LTU: - output_asm_insn (MOTOROLA ? - "dbcs %0,%l1\n\tjbcs %l2" : - "dbcs %0,%l1\n\tjcs %l2", + output_asm_insn (MOTOROLA + ? "dbcs %0,%l1\n\tjbcs %l2" + : "dbcs %0,%l1\n\tjcs %l2", operands); break; case GE: - output_asm_insn (MOTOROLA ? - "dbge %0,%l1\n\tjbge %l2" : - "dbge %0,%l1\n\tjge %l2", + output_asm_insn (MOTOROLA + ? "dbge %0,%l1\n\tjbge %l2" + : "dbge %0,%l1\n\tjge %l2", operands); break; case GEU: - output_asm_insn (MOTOROLA ? - "dbcc %0,%l1\n\tjbcc %l2" : - "dbcc %0,%l1\n\tjcc %l2", + output_asm_insn (MOTOROLA + ? "dbcc %0,%l1\n\tjbcc %l2" + : "dbcc %0,%l1\n\tjcc %l2", operands); break; case LE: - output_asm_insn (MOTOROLA ? - "dble %0,%l1\n\tjble %l2" : - "dble %0,%l1\n\tjle %l2", + output_asm_insn (MOTOROLA + ? "dble %0,%l1\n\tjble %l2" + : "dble %0,%l1\n\tjle %l2", operands); break; case LEU: - output_asm_insn (MOTOROLA ? - "dbls %0,%l1\n\tjbls %l2" : - "dbls %0,%l1\n\tjls %l2", + output_asm_insn (MOTOROLA + ? "dbls %0,%l1\n\tjbls %l2" + : "dbls %0,%l1\n\tjls %l2", operands); break; @@ -1160,9 +1169,9 @@ output_dbcc_and_branch (rtx *operands) switch (GET_MODE (operands[0])) { case SImode: - output_asm_insn (MOTOROLA ? - "clr%.w %0\n\tsubq%.l #1,%0\n\tjbpl %l1" : - "clr%.w %0\n\tsubq%.l #1,%0\n\tjpl %l1", + output_asm_insn (MOTOROLA + ? "clr%.w %0\n\tsubq%.l #1,%0\n\tjbpl %l1" + : "clr%.w %0\n\tsubq%.l #1,%0\n\tjpl %l1", operands); break; @@ -1210,19 +1219,17 @@ output_scc_di (rtx op, rtx operand1, rtx operand2, rtx dest) loperands[4] = gen_label_rtx (); if (operand2 != const0_rtx) { - output_asm_insn (MOTOROLA ? - "cmp%.l %2,%0\n\tjbne %l4\n\tcmp%.l %3,%1" : - "cmp%.l %2,%0\n\tjne %l4\n\tcmp%.l %3,%1", - loperands); + output_asm_insn (MOTOROLA + ? "cmp%.l %2,%0\n\tjbne %l4\n\tcmp%.l %3,%1" + : "cmp%.l %2,%0\n\tjne %l4\n\tcmp%.l %3,%1", + loperands); } else { if (TARGET_68020 || TARGET_COLDFIRE || ! ADDRESS_REG_P (loperands[0])) output_asm_insn ("tst%.l %0", loperands); else - { - output_asm_insn ("cmp%.w #0,%0", loperands); - } + output_asm_insn ("cmp%.w #0,%0", loperands); output_asm_insn (MOTOROLA ? "jbne %l4" : "jne %l4", loperands); @@ -1238,89 +1245,81 @@ output_scc_di (rtx op, rtx operand1, rtx operand2, rtx dest) { case EQ: (*targetm.asm_out.internal_label) (asm_out_file, "L", - CODE_LABEL_NUMBER (loperands[4])); + CODE_LABEL_NUMBER (loperands[4])); output_asm_insn ("seq %5", loperands); break; case NE: (*targetm.asm_out.internal_label) (asm_out_file, "L", - CODE_LABEL_NUMBER (loperands[4])); + CODE_LABEL_NUMBER (loperands[4])); output_asm_insn ("sne %5", loperands); break; case GT: loperands[6] = gen_label_rtx (); - output_asm_insn (MOTOROLA ? - "shi %5\n\tjbra %l6" : - "shi %5\n\tjra %l6", + output_asm_insn (MOTOROLA ? "shi %5\n\tjbra %l6" : "shi %5\n\tjra %l6", loperands); (*targetm.asm_out.internal_label) (asm_out_file, "L", - CODE_LABEL_NUMBER (loperands[4])); + CODE_LABEL_NUMBER (loperands[4])); output_asm_insn ("sgt %5", loperands); (*targetm.asm_out.internal_label) (asm_out_file, "L", - CODE_LABEL_NUMBER (loperands[6])); + CODE_LABEL_NUMBER (loperands[6])); break; case GTU: (*targetm.asm_out.internal_label) (asm_out_file, "L", - CODE_LABEL_NUMBER (loperands[4])); + CODE_LABEL_NUMBER (loperands[4])); output_asm_insn ("shi %5", loperands); break; case LT: loperands[6] = gen_label_rtx (); - output_asm_insn (MOTOROLA ? - "scs %5\n\tjbra %l6" : - "scs %5\n\tjra %l6", + output_asm_insn (MOTOROLA ? "scs %5\n\tjbra %l6" : "scs %5\n\tjra %l6", loperands); (*targetm.asm_out.internal_label) (asm_out_file, "L", - CODE_LABEL_NUMBER (loperands[4])); + CODE_LABEL_NUMBER (loperands[4])); output_asm_insn ("slt %5", loperands); (*targetm.asm_out.internal_label) (asm_out_file, "L", - CODE_LABEL_NUMBER (loperands[6])); + CODE_LABEL_NUMBER (loperands[6])); break; case LTU: (*targetm.asm_out.internal_label) (asm_out_file, "L", - CODE_LABEL_NUMBER (loperands[4])); + CODE_LABEL_NUMBER (loperands[4])); output_asm_insn ("scs %5", loperands); break; case GE: loperands[6] = gen_label_rtx (); - output_asm_insn (MOTOROLA ? - "scc %5\n\tjbra %l6" : - "scc %5\n\tjra %l6", - loperands); + output_asm_insn (MOTOROLA ? "scc %5\n\tjbra %l6" : "scc %5\n\tjra %l6", + loperands); (*targetm.asm_out.internal_label) (asm_out_file, "L", - CODE_LABEL_NUMBER (loperands[4])); + CODE_LABEL_NUMBER (loperands[4])); output_asm_insn ("sge %5", loperands); (*targetm.asm_out.internal_label) (asm_out_file, "L", - CODE_LABEL_NUMBER (loperands[6])); + CODE_LABEL_NUMBER (loperands[6])); break; case GEU: (*targetm.asm_out.internal_label) (asm_out_file, "L", - CODE_LABEL_NUMBER (loperands[4])); + CODE_LABEL_NUMBER (loperands[4])); output_asm_insn ("scc %5", loperands); break; case LE: loperands[6] = gen_label_rtx (); - output_asm_insn (MOTOROLA ? - "sls %5\n\tjbra %l6" : - "sls %5\n\tjra %l6", + output_asm_insn (MOTOROLA ? "sls %5\n\tjbra %l6" : "sls %5\n\tjra %l6", loperands); (*targetm.asm_out.internal_label) (asm_out_file, "L", - CODE_LABEL_NUMBER (loperands[4])); + CODE_LABEL_NUMBER (loperands[4])); output_asm_insn ("sle %5", loperands); (*targetm.asm_out.internal_label) (asm_out_file, "L", - CODE_LABEL_NUMBER (loperands[6])); + CODE_LABEL_NUMBER (loperands[6])); break; case LEU: (*targetm.asm_out.internal_label) (asm_out_file, "L", - CODE_LABEL_NUMBER (loperands[4])); + CODE_LABEL_NUMBER (loperands[4])); output_asm_insn ("sls %5", loperands); break; @@ -1459,7 +1458,7 @@ typedef enum { MOVL, SWAP, NEGW, NOTW, NOTB, MOVQ, MVS, MVZ } CONST_METHOD; static CONST_METHOD const_method (rtx); -#define USE_MOVQ(i) ((unsigned)((i) + 128) <= 255) +#define USE_MOVQ(i) ((unsigned) ((i) + 128) <= 255) static CONST_METHOD const_method (rtx constant) @@ -1510,21 +1509,21 @@ const_int_cost (rtx constant) { switch (const_method (constant)) { - case MOVQ : - /* Constants between -128 and 127 are cheap due to moveq */ - return 0; - case MVZ: - case MVS: - case NOTB : - case NOTW : - case NEGW : - case SWAP : - /* Constants easily generated by moveq + not.b/not.w/neg.w/swap */ - return 1; - case MOVL : - return 2; - default : - gcc_unreachable (); + case MOVQ: + /* Constants between -128 and 127 are cheap due to moveq. */ + return 0; + case MVZ: + case MVS: + case NOTB: + case NOTW: + case NEGW: + case SWAP: + /* Constants easily generated by moveq + not.b/not.w/neg.w/swap. */ + return 1; + case MOVL: + return 2; + default: + gcc_unreachable (); } } @@ -1562,10 +1561,13 @@ m68k_rtx_costs (rtx x, int code, int outer_code, int *total) in synth_mult on the 68020, relative to an average of the time for add and the time for shift, taking away a little more because sometimes move insns are needed. */ - /* div?.w is relatively cheaper on 68000 counted in COSTS_N_INSNS terms. */ -#define MULL_COST (TARGET_68060 ? 2 : TARGET_68040 ? 5 : (TARGET_COLDFIRE && !TARGET_5200) ? 3 : TARGET_COLDFIRE ? 10 : 13) -#define MULW_COST (TARGET_68060 ? 2 : TARGET_68040 ? 3 : TARGET_68020 ? 8 : \ - (TARGET_COLDFIRE && !TARGET_5200) ? 2 : 5) + /* div?.w is relatively cheaper on 68000 counted in COSTS_N_INSNS + terms. */ +#define MULL_COST (TARGET_68060 ? 2 : TARGET_68040 ? 5 \ + : (TARGET_COLDFIRE && !TARGET_5200) ? 3 \ + : TARGET_COLDFIRE ? 10 : 13) +#define MULW_COST (TARGET_68060 ? 2 : TARGET_68040 ? 3 : TARGET_68020 ? 8 \ + : (TARGET_COLDFIRE && !TARGET_5200) ? 2 : 5) #define DIVW_COST (TARGET_68020 ? 27 : TARGET_CF_HWDIV ? 11 : 12) case PLUS: @@ -1604,7 +1606,7 @@ m68k_rtx_costs (rtx x, int code, int outer_code, int *total) *total = COSTS_N_INSNS (4) + (INTVAL (XEXP (x, 1)) - 16) / 2; } else - *total = COSTS_N_INSNS (10); /* worst case */ + *total = COSTS_N_INSNS (10); /* Worst case. */ return true; } /* A shift by a big integer takes an extra instruction. */ @@ -1663,29 +1665,29 @@ output_move_const_into_data_reg (rtx *operands) return "mvsw %1,%0"; case MVS: return "mvzw %1,%0"; - case MOVQ : + case MOVQ: return "moveq %1,%0"; - case NOTB : + case NOTB: CC_STATUS_INIT; operands[1] = GEN_INT (i ^ 0xff); return "moveq %1,%0\n\tnot%.b %0"; - case NOTW : + case NOTW: CC_STATUS_INIT; operands[1] = GEN_INT (i ^ 0xffff); return "moveq %1,%0\n\tnot%.w %0"; - case NEGW : + case NEGW: CC_STATUS_INIT; return "moveq #-128,%0\n\tneg%.w %0"; - case SWAP : + case SWAP: { unsigned u = i; operands[1] = GEN_INT ((u << 16) | (u >> 16)); return "moveq %1,%0\n\tswap %0"; } - case MOVL : + case MOVL: return "move%.l %1,%0"; - default : + default: gcc_unreachable (); } } @@ -1700,7 +1702,7 @@ valid_mov3q_const (rtx constant) if (TARGET_CFV4 && GET_CODE (constant) == CONST_INT) { i = INTVAL (constant); - if ((i == -1) || (i >= 1 && i <= 7)) + if (i == -1 || (i >= 1 && i <= 7)) return 1; } return 0; @@ -1721,7 +1723,7 @@ output_move_simode_const (rtx *operands) return "clr%.l %0"; else if ((GET_MODE (operands[0]) == SImode) && valid_mov3q_const (operands[1])) - return "mov3q%.l %1,%0"; + return "mov3q%.l %1,%0"; else if (operands[1] == const0_rtx && ADDRESS_REG_P (operands[0])) return "sub%.l %0,%0"; @@ -1736,8 +1738,8 @@ output_move_simode_const (rtx *operands) return "move%.w %1,%0"; } else if (GET_CODE (operands[0]) == MEM - && GET_CODE (XEXP (operands[0], 0)) == PRE_DEC - && REGNO (XEXP (XEXP (operands[0], 0), 0)) == STACK_POINTER_REGNUM + && GET_CODE (XEXP (operands[0], 0)) == PRE_DEC + && REGNO (XEXP (XEXP (operands[0], 0), 0)) == STACK_POINTER_REGNUM && INTVAL (operands[1]) < 0x8000 && INTVAL (operands[1]) >= -0x8000) { @@ -1784,9 +1786,7 @@ output_move_himode (rtx *operands) else if (DATA_REG_P (operands[0]) && INTVAL (operands[1]) < 128 && INTVAL (operands[1]) >= -128) - { - return "moveq %1,%0"; - } + return "moveq %1,%0"; else if (INTVAL (operands[1]) < 0x8000 && INTVAL (operands[1]) >= -0x8000) return "move%.w %1,%0"; @@ -1810,7 +1810,7 @@ output_move_himode (rtx *operands) CODE_LABEL_NUMBER (XEXP (labelref, 0))); else (*targetm.asm_out.internal_label) (asm_out_file, "LI", - CODE_LABEL_NUMBER (XEXP (labelref, 0))); + CODE_LABEL_NUMBER (XEXP (labelref, 0))); } return "move%.w %1,%0"; } @@ -1821,7 +1821,7 @@ output_move_qimode (rtx *operands) /* 68k family always modifies the stack pointer by at least 2, even for byte pushes. The 5200 (ColdFire) does not do this. */ - /* This case is generated by pushqi1 pattern now */ + /* This case is generated by pushqi1 pattern now. */ gcc_assert (!(GET_CODE (operands[0]) == MEM && GET_CODE (XEXP (operands[0], 0)) == PRE_DEC && XEXP (XEXP (operands[0], 0), 0) == stack_pointer_rtx @@ -1848,9 +1848,7 @@ output_move_qimode (rtx *operands) && DATA_REG_P (operands[0]) && INTVAL (operands[1]) < 128 && INTVAL (operands[1]) >= -128) - { - return "moveq %1,%0"; - } + return "moveq %1,%0"; if (operands[1] == const0_rtx && ADDRESS_REG_P (operands[0])) return "sub%.l %0,%0"; if (GET_CODE (operands[1]) != CONST_INT && CONSTANT_P (operands[1])) @@ -2348,9 +2346,7 @@ notice_update_cc (rtx exp, rtx insn) if (GET_CODE (exp) == SET) { if (GET_CODE (SET_SRC (exp)) == CALL) - { - CC_STATUS_INIT; - } + CC_STATUS_INIT; else if (ADDRESS_REG_P (SET_DEST (exp))) { if (cc_status.value1 && modified_in_p (cc_status.value1, insn)) @@ -2364,9 +2360,7 @@ notice_update_cc (rtx exp, rtx insn) || GET_CODE (SET_SRC (exp)) == FIX || GET_CODE (SET_SRC (exp)) == FLOAT_TRUNCATE || GET_CODE (SET_SRC (exp)) == FLOAT_EXTEND)) - { - CC_STATUS_INIT; - } + CC_STATUS_INIT; /* A pair of move insns doesn't produce a useful overall cc. */ else if (!FP_REG_P (SET_DEST (exp)) && !FP_REG_P (SET_SRC (exp)) @@ -2374,30 +2368,27 @@ notice_update_cc (rtx exp, rtx insn) && (GET_CODE (SET_SRC (exp)) == REG || GET_CODE (SET_SRC (exp)) == MEM || GET_CODE (SET_SRC (exp)) == CONST_DOUBLE)) - { - CC_STATUS_INIT; - } - else if (GET_CODE (SET_SRC (exp)) == CALL) - { - CC_STATUS_INIT; - } - else if (XEXP (exp, 0) != pc_rtx) + CC_STATUS_INIT; + else if (SET_DEST (exp) != pc_rtx) { cc_status.flags = 0; - cc_status.value1 = XEXP (exp, 0); - cc_status.value2 = XEXP (exp, 1); + cc_status.value1 = SET_DEST (exp); + cc_status.value2 = SET_SRC (exp); } } else if (GET_CODE (exp) == PARALLEL && GET_CODE (XVECEXP (exp, 0, 0)) == SET) { - if (ADDRESS_REG_P (XEXP (XVECEXP (exp, 0, 0), 0))) + rtx dest = SET_DEST (XVECEXP (exp, 0, 0)); + rtx src = SET_SRC (XVECEXP (exp, 0, 0)); + + if (ADDRESS_REG_P (dest)) CC_STATUS_INIT; - else if (XEXP (XVECEXP (exp, 0, 0), 0) != pc_rtx) + else if (dest != pc_rtx) { cc_status.flags = 0; - cc_status.value1 = XEXP (XVECEXP (exp, 0, 0), 0); - cc_status.value2 = XEXP (XVECEXP (exp, 0, 0), 1); + cc_status.value1 = dest; + cc_status.value2 = src; } } else @@ -2489,7 +2480,7 @@ static const char *const strings_68881[7] = { "10000.0", "1e8", "1e16" - }; +}; static const int codes_68881[7] = { 0x0f, @@ -2499,7 +2490,7 @@ static const int codes_68881[7] = { 0x35, 0x36, 0x37 - }; +}; REAL_VALUE_TYPE values_68881[7]; @@ -2747,11 +2738,11 @@ print_operand (FILE *file, rtx op, int letter) -fPIC code the offset is output in long mode (e.g. movel a5@(_foo:l), a0) */ #if MOTOROLA -# define ASM_OUTPUT_CASE_FETCH(file, labelno, regname)\ - asm_fprintf (file, "%LL%d-%LLI%d.b(%Rpc,%s.", labelno, labelno, regname) +# define ASM_OUTPUT_CASE_FETCH(file, labelno, regname) \ + asm_fprintf (file, "%LL%d-%LLI%d.b(%Rpc,%s.", labelno, labelno, regname) #else /* !MOTOROLA */ -# define ASM_OUTPUT_CASE_FETCH(file, labelno, regname)\ - asm_fprintf (file, "%Rpc@(%LL%d-%LLI%d-2:b,%s:", labelno, labelno, regname) +# define ASM_OUTPUT_CASE_FETCH(file, labelno, regname) \ + asm_fprintf (file, "%Rpc@(%LL%d-%LLI%d-2:b,%s:", labelno, labelno, regname) #endif /* !MOTOROLA */ void @@ -2762,251 +2753,249 @@ print_operand_address (FILE *file, rtx addr) switch (GET_CODE (addr)) { - case REG: - fprintf (file, MOTOROLA ? "(%s)" : "%s@", M68K_REGNAME(REGNO (addr))); - break; - case PRE_DEC: - fprintf (file, MOTOROLA ? "-(%s)" : "%s@-", - M68K_REGNAME(REGNO (XEXP (addr, 0)))); - break; - case POST_INC: - fprintf (file, MOTOROLA ? "(%s)+" : "%s@+", - M68K_REGNAME(REGNO (XEXP (addr, 0)))); - break; - case PLUS: - reg1 = reg2 = ireg = breg = offset = 0; - if (CONSTANT_ADDRESS_P (XEXP (addr, 0))) - { - offset = XEXP (addr, 0); - addr = XEXP (addr, 1); - } - else if (CONSTANT_ADDRESS_P (XEXP (addr, 1))) - { - offset = XEXP (addr, 1); - addr = XEXP (addr, 0); - } - if (GET_CODE (addr) != PLUS) - { - ; - } - else if (GET_CODE (XEXP (addr, 0)) == SIGN_EXTEND) - { - reg1 = XEXP (addr, 0); - addr = XEXP (addr, 1); - } - else if (GET_CODE (XEXP (addr, 1)) == SIGN_EXTEND) - { - reg1 = XEXP (addr, 1); - addr = XEXP (addr, 0); - } - else if (GET_CODE (XEXP (addr, 0)) == MULT) - { - reg1 = XEXP (addr, 0); - addr = XEXP (addr, 1); - } - else if (GET_CODE (XEXP (addr, 1)) == MULT) - { - reg1 = XEXP (addr, 1); - addr = XEXP (addr, 0); - } - else if (GET_CODE (XEXP (addr, 0)) == REG) - { - reg1 = XEXP (addr, 0); - addr = XEXP (addr, 1); - } - else if (GET_CODE (XEXP (addr, 1)) == REG) - { - reg1 = XEXP (addr, 1); - addr = XEXP (addr, 0); - } - if (GET_CODE (addr) == REG || GET_CODE (addr) == MULT - || GET_CODE (addr) == SIGN_EXTEND) - { - if (reg1 == 0) - { - reg1 = addr; - } - else - { - reg2 = addr; - } - addr = 0; - } + case REG: + fprintf (file, MOTOROLA ? "(%s)" : "%s@", M68K_REGNAME (REGNO (addr))); + break; + case PRE_DEC: + fprintf (file, MOTOROLA ? "-(%s)" : "%s@-", + M68K_REGNAME (REGNO (XEXP (addr, 0)))); + break; + case POST_INC: + fprintf (file, MOTOROLA ? "(%s)+" : "%s@+", + M68K_REGNAME (REGNO (XEXP (addr, 0)))); + break; + case PLUS: + reg1 = reg2 = ireg = breg = offset = 0; + if (CONSTANT_ADDRESS_P (XEXP (addr, 0))) + { + offset = XEXP (addr, 0); + addr = XEXP (addr, 1); + } + else if (CONSTANT_ADDRESS_P (XEXP (addr, 1))) + { + offset = XEXP (addr, 1); + addr = XEXP (addr, 0); + } + if (GET_CODE (addr) != PLUS) + { + ; + } + else if (GET_CODE (XEXP (addr, 0)) == SIGN_EXTEND) + { + reg1 = XEXP (addr, 0); + addr = XEXP (addr, 1); + } + else if (GET_CODE (XEXP (addr, 1)) == SIGN_EXTEND) + { + reg1 = XEXP (addr, 1); + addr = XEXP (addr, 0); + } + else if (GET_CODE (XEXP (addr, 0)) == MULT) + { + reg1 = XEXP (addr, 0); + addr = XEXP (addr, 1); + } + else if (GET_CODE (XEXP (addr, 1)) == MULT) + { + reg1 = XEXP (addr, 1); + addr = XEXP (addr, 0); + } + else if (GET_CODE (XEXP (addr, 0)) == REG) + { + reg1 = XEXP (addr, 0); + addr = XEXP (addr, 1); + } + else if (GET_CODE (XEXP (addr, 1)) == REG) + { + reg1 = XEXP (addr, 1); + addr = XEXP (addr, 0); + } + if (GET_CODE (addr) == REG || GET_CODE (addr) == MULT + || GET_CODE (addr) == SIGN_EXTEND) + { + if (reg1 == 0) + reg1 = addr; + else + reg2 = addr; + addr = 0; + } #if 0 /* for OLD_INDEXING */ - else if (GET_CODE (addr) == PLUS) - { - if (GET_CODE (XEXP (addr, 0)) == REG) - { - reg2 = XEXP (addr, 0); - addr = XEXP (addr, 1); - } - else if (GET_CODE (XEXP (addr, 1)) == REG) - { - reg2 = XEXP (addr, 1); - addr = XEXP (addr, 0); - } - } + else if (GET_CODE (addr) == PLUS) + { + if (GET_CODE (XEXP (addr, 0)) == REG) + { + reg2 = XEXP (addr, 0); + addr = XEXP (addr, 1); + } + else if (GET_CODE (XEXP (addr, 1)) == REG) + { + reg2 = XEXP (addr, 1); + addr = XEXP (addr, 0); + } + } #endif - if (offset != 0) - { - gcc_assert (!addr); - addr = offset; - } - if ((reg1 && (GET_CODE (reg1) == SIGN_EXTEND - || GET_CODE (reg1) == MULT)) - || (reg2 != 0 && REGNO_OK_FOR_BASE_P (REGNO (reg2)))) - { - breg = reg2; - ireg = reg1; - } - else if (reg1 != 0 && REGNO_OK_FOR_BASE_P (REGNO (reg1))) - { - breg = reg1; - ireg = reg2; - } - if (ireg != 0 && breg == 0 && GET_CODE (addr) == LABEL_REF - && ! (flag_pic && ireg == pic_offset_table_rtx)) - { - int scale = 1; - if (GET_CODE (ireg) == MULT) - { - scale = INTVAL (XEXP (ireg, 1)); - ireg = XEXP (ireg, 0); - } - if (GET_CODE (ireg) == SIGN_EXTEND) - { - ASM_OUTPUT_CASE_FETCH (file, - CODE_LABEL_NUMBER (XEXP (addr, 0)), - M68K_REGNAME(REGNO (XEXP (ireg, 0)))); - fprintf (file, "w"); - } - else - { - ASM_OUTPUT_CASE_FETCH (file, - CODE_LABEL_NUMBER (XEXP (addr, 0)), - M68K_REGNAME(REGNO (ireg))); - fprintf (file, "l"); - } - if (scale != 1) - fprintf (file, MOTOROLA ? "*%d" : ":%d", scale); - putc (')', file); - break; - } - if (breg != 0 && ireg == 0 && GET_CODE (addr) == LABEL_REF - && ! (flag_pic && breg == pic_offset_table_rtx)) - { - ASM_OUTPUT_CASE_FETCH (file, - CODE_LABEL_NUMBER (XEXP (addr, 0)), - M68K_REGNAME(REGNO (breg))); - fprintf (file, "l)"); - break; - } - if (ireg != 0 || breg != 0) - { - int scale = 1; + if (offset != 0) + { + gcc_assert (!addr); + addr = offset; + } + if ((reg1 && (GET_CODE (reg1) == SIGN_EXTEND + || GET_CODE (reg1) == MULT)) + || (reg2 != 0 && REGNO_OK_FOR_BASE_P (REGNO (reg2)))) + { + breg = reg2; + ireg = reg1; + } + else if (reg1 != 0 && REGNO_OK_FOR_BASE_P (REGNO (reg1))) + { + breg = reg1; + ireg = reg2; + } + if (ireg != 0 && breg == 0 && GET_CODE (addr) == LABEL_REF + && ! (flag_pic && ireg == pic_offset_table_rtx)) + { + int scale = 1; + if (GET_CODE (ireg) == MULT) + { + scale = INTVAL (XEXP (ireg, 1)); + ireg = XEXP (ireg, 0); + } + if (GET_CODE (ireg) == SIGN_EXTEND) + { + ASM_OUTPUT_CASE_FETCH (file, + CODE_LABEL_NUMBER (XEXP (addr, 0)), + M68K_REGNAME (REGNO (XEXP (ireg, 0)))); + fprintf (file, "w"); + } + else + { + ASM_OUTPUT_CASE_FETCH (file, + CODE_LABEL_NUMBER (XEXP (addr, 0)), + M68K_REGNAME (REGNO (ireg))); + fprintf (file, "l"); + } + if (scale != 1) + fprintf (file, MOTOROLA ? "*%d" : ":%d", scale); + putc (')', file); + break; + } + if (breg != 0 && ireg == 0 && GET_CODE (addr) == LABEL_REF + && ! (flag_pic && breg == pic_offset_table_rtx)) + { + ASM_OUTPUT_CASE_FETCH (file, + CODE_LABEL_NUMBER (XEXP (addr, 0)), + M68K_REGNAME (REGNO (breg))); + fprintf (file, "l)"); + break; + } + if (ireg != 0 || breg != 0) + { + int scale = 1; - gcc_assert (breg); - gcc_assert (flag_pic || !addr || GET_CODE (addr) != LABEL_REF); + gcc_assert (breg); + gcc_assert (flag_pic || !addr || GET_CODE (addr) != LABEL_REF); - if (MOTOROLA) - { - if (addr != 0) - { - output_addr_const (file, addr); - if (flag_pic && (breg == pic_offset_table_rtx)) + if (MOTOROLA) + { + if (addr != 0) + { + output_addr_const (file, addr); + if (flag_pic && (breg == pic_offset_table_rtx)) + { + fprintf (file, "@GOT"); + if (flag_pic == 1) + fprintf (file, ".w"); + } + } + fprintf (file, "(%s", M68K_REGNAME (REGNO (breg))); + if (ireg != 0) + putc (',', file); + } + else /* !MOTOROLA */ + { + fprintf (file, "%s@(", M68K_REGNAME (REGNO (breg))); + if (addr != 0) + { + output_addr_const (file, addr); + if (breg == pic_offset_table_rtx) + switch (flag_pic) { - fprintf (file, "@GOT"); - if (flag_pic == 1) - fprintf (file, ".w"); + case 1: + fprintf (file, ":w"); + break; + case 2: + fprintf (file, ":l"); + break; + default: + break; } - } - fprintf (file, "(%s", M68K_REGNAME(REGNO (breg))); - if (ireg != 0) - putc (',', file); - } - else /* !MOTOROLA */ - { - fprintf (file, "%s@(", M68K_REGNAME(REGNO (breg))); - if (addr != 0) - { - output_addr_const (file, addr); - if (breg == pic_offset_table_rtx) - switch (flag_pic) - { - case 1: - fprintf (file, ":w"); break; - case 2: - fprintf (file, ":l"); break; - default: - break; - } - if (ireg != 0) - putc (',', file); - } - } /* !MOTOROLA */ - if (ireg != 0 && GET_CODE (ireg) == MULT) - { - scale = INTVAL (XEXP (ireg, 1)); - ireg = XEXP (ireg, 0); - } - if (ireg != 0 && GET_CODE (ireg) == SIGN_EXTEND) - fprintf (file, MOTOROLA ? "%s.w" : "%s:w", - M68K_REGNAME(REGNO (XEXP (ireg, 0)))); - else if (ireg != 0) - fprintf (file, MOTOROLA ? "%s.l" : "%s:l", - M68K_REGNAME(REGNO (ireg))); - if (scale != 1) - fprintf (file, MOTOROLA ? "*%d" : ":%d", scale); - putc (')', file); - break; - } - else if (reg1 != 0 && GET_CODE (addr) == LABEL_REF - && ! (flag_pic && reg1 == pic_offset_table_rtx)) - { - ASM_OUTPUT_CASE_FETCH (file, - CODE_LABEL_NUMBER (XEXP (addr, 0)), - M68K_REGNAME(REGNO (reg1))); - fprintf (file, "l)"); - break; - } - /* FALL-THROUGH (is this really what we want?) */ - default: - if (GET_CODE (addr) == CONST_INT - && INTVAL (addr) < 0x8000 - && INTVAL (addr) >= -0x8000) - { - fprintf (file, MOTOROLA ? "%d.w" : "%d:w", (int) INTVAL (addr)); - } - else if (GET_CODE (addr) == CONST_INT) - { - fprintf (file, HOST_WIDE_INT_PRINT_DEC, INTVAL (addr)); - } - else if (TARGET_PCREL) - { - fputc ('(', file); - output_addr_const (file, addr); - if (flag_pic == 1) - asm_fprintf (file, ":w,%Rpc)"); - else - asm_fprintf (file, ":l,%Rpc)"); - } - else - { - /* Special case for SYMBOL_REF if the symbol name ends in - `.', this can be mistaken as a size suffix. Put - the name in parentheses. */ - if (GET_CODE (addr) == SYMBOL_REF - && strlen (XSTR (addr, 0)) > 2 - && XSTR (addr, 0)[strlen (XSTR (addr, 0)) - 2] == '.') - { - putc ('(', file); - output_addr_const (file, addr); - putc (')', file); - } - else + if (ireg != 0) + putc (',', file); + } + } /* !MOTOROLA */ + if (ireg != 0 && GET_CODE (ireg) == MULT) + { + scale = INTVAL (XEXP (ireg, 1)); + ireg = XEXP (ireg, 0); + } + if (ireg != 0 && GET_CODE (ireg) == SIGN_EXTEND) + fprintf (file, MOTOROLA ? "%s.w" : "%s:w", + M68K_REGNAME (REGNO (XEXP (ireg, 0)))); + else if (ireg != 0) + fprintf (file, MOTOROLA ? "%s.l" : "%s:l", + M68K_REGNAME (REGNO (ireg))); + if (scale != 1) + fprintf (file, MOTOROLA ? "*%d" : ":%d", scale); + putc (')', file); + break; + } + else if (reg1 != 0 && GET_CODE (addr) == LABEL_REF + && ! (flag_pic && reg1 == pic_offset_table_rtx)) + { + ASM_OUTPUT_CASE_FETCH (file, + CODE_LABEL_NUMBER (XEXP (addr, 0)), + M68K_REGNAME (REGNO (reg1))); + fprintf (file, "l)"); + break; + } + /* FALL-THROUGH (is this really what we want?) */ + default: + if (GET_CODE (addr) == CONST_INT + && INTVAL (addr) < 0x8000 + && INTVAL (addr) >= -0x8000) + { + fprintf (file, MOTOROLA ? "%d.w" : "%d:w", (int) INTVAL (addr)); + } + else if (GET_CODE (addr) == CONST_INT) + { + fprintf (file, HOST_WIDE_INT_PRINT_DEC, INTVAL (addr)); + } + else if (TARGET_PCREL) + { + fputc ('(', file); + output_addr_const (file, addr); + if (flag_pic == 1) + asm_fprintf (file, ":w,%Rpc)"); + else + asm_fprintf (file, ":l,%Rpc)"); + } + else + { + /* Special case for SYMBOL_REF if the symbol name ends in + `.', this can be mistaken as a size suffix. Put + the name in parentheses. */ + if (GET_CODE (addr) == SYMBOL_REF + && strlen (XSTR (addr, 0)) > 2 + && XSTR (addr, 0)[strlen (XSTR (addr, 0)) - 2] == '.') + { + putc ('(', file); output_addr_const (file, addr); - } - break; + putc (')', file); + } + else + output_addr_const (file, addr); + } + break; } } @@ -3148,9 +3137,7 @@ output_andsi3 (rtx *operands) || offsettable_memref_p (operands[0]))) { if (DATA_REG_P (operands[0])) - { - operands[1] = GEN_INT (logval); - } + operands[1] = GEN_INT (logval); else { operands[0] = adjust_address (operands[0], SImode, 3 - (logval / 8)); @@ -3264,14 +3251,14 @@ m68k_output_mi_thunk (FILE *file, tree thunk ATTRIBUTE_UNUSED, const char *fmt; if (delta > 0 && delta <= 8) - asm_fprintf (file, MOTOROLA ? - "\taddq.l %I%d,4(%Rsp)\n" : - "\taddql %I%d,%Rsp@(4)\n", + asm_fprintf (file, (MOTOROLA + ? "\taddq.l %I%d,4(%Rsp)\n" + : "\taddql %I%d,%Rsp@(4)\n"), (int) delta); else if (delta < 0 && delta >= -8) - asm_fprintf (file, MOTOROLA ? - "\tsubq.l %I%d,4(%Rsp)\n" : - "\tsubql %I%d,%Rsp@(4)\n", + asm_fprintf (file, (MOTOROLA + ? "\tsubq.l %I%d,4(%Rsp)\n" + : "\tsubql %I%d,%Rsp@(4)\n"), (int) -delta); else if (TARGET_COLDFIRE) { @@ -3279,21 +3266,23 @@ m68k_output_mi_thunk (FILE *file, tree thunk ATTRIBUTE_UNUSED, the range of addq/subq. So load the value into %d0 and then add it to 4(%sp). */ if (delta >= -128 && delta <= 127) - asm_fprintf (file, MOTOROLA ? - "\tmoveq.l %I%wd,%Rd0\n" : - "\tmoveql %I%wd,%Rd0\n", delta); + asm_fprintf (file, (MOTOROLA + ? "\tmoveq.l %I%wd,%Rd0\n" + : "\tmoveql %I%wd,%Rd0\n"), + delta); else - asm_fprintf (file, MOTOROLA ? - "\tmove.l %I%wd,%Rd0\n" : - "\tmovel %I%wd,%Rd0\n", delta); - asm_fprintf (file, MOTOROLA ? - "\tadd.l %Rd0,4(%Rsp)\n" : - "\taddl %Rd0,%Rsp@(4)\n"); + asm_fprintf (file, (MOTOROLA + ? "\tmove.l %I%wd,%Rd0\n" + : "\tmovel %I%wd,%Rd0\n"), + delta); + asm_fprintf (file, (MOTOROLA + ? "\tadd.l %Rd0,4(%Rsp)\n" + : "\taddl %Rd0,%Rsp@(4)\n")); } else - asm_fprintf (file, MOTOROLA ? - "\tadd.l %I%wd,4(%Rsp)\n" : - "\taddl %I%wd,%Rsp@(4)\n", + asm_fprintf (file, (MOTOROLA + ? "\tadd.l %I%wd,4(%Rsp)\n" + : "\taddl %I%wd,%Rsp@(4)\n"), delta); xops[0] = DECL_RTL (function); @@ -3303,25 +3292,29 @@ m68k_output_mi_thunk (FILE *file, tree thunk ATTRIBUTE_UNUSED, { if (TARGET_PCREL) fmt = "bra.l %o0"; - else if ((flag_pic == 1) || TARGET_68020) + else if (flag_pic == 1 || TARGET_68020) { if (MOTOROLA) -#if defined(USE_GAS) - fmt = "bra.l %0@PLTPC"; + { +#if defined (USE_GAS) + fmt = "bra.l %0@PLTPC"; #else - fmt = "bra %0@PLTPC"; + fmt = "bra %0@PLTPC"; #endif + } else /* !MOTOROLA */ + { #ifdef USE_GAS - fmt = "bra.l %0"; + fmt = "bra.l %0"; #else - fmt = "jra %0,a1"; + fmt = "jra %0,a1"; #endif + } } else if (optimize_size || TARGET_ID_SHARED_LIBRARY) fmt = "move.l %0@GOT(%%a5), %%a1\n\tjmp (%%a1)"; else - fmt = "lea %0-.-8,%%a1\n\tjsr 0(%%pc,%%a1)"; + fmt = "lea %0-.-8,%%a1\n\tjmp 0(%%pc,%%a1)"; } else { @@ -3369,27 +3362,27 @@ m68k_regno_mode_ok (int regno, enum machine_mode mode) { if (regno < 8) { - /* Data Registers, can hold aggregate if fits in. */ - if (regno + GET_MODE_SIZE (mode) / 4 <= 8) - return true; + /* Data Registers, can hold aggregate if fits in. */ + if (regno + GET_MODE_SIZE (mode) / 4 <= 8) + return true; } else if (regno < 16) { - /* Address Registers, can't hold bytes, can hold aggregate if - fits in. */ - if (GET_MODE_SIZE (mode) == 1) - return false; - if (regno + GET_MODE_SIZE (mode) / 4 <= 16) - return true; + /* Address Registers, can't hold bytes, can hold aggregate if + fits in. */ + if (GET_MODE_SIZE (mode) == 1) + return false; + if (regno + GET_MODE_SIZE (mode) / 4 <= 16) + return true; } else if (regno < 24) { /* FPU registers, hold float or complex float of long double or - smaller. */ - if ((GET_MODE_CLASS (mode) == MODE_FLOAT - || GET_MODE_CLASS (mode) == MODE_COMPLEX_FLOAT) - && GET_MODE_UNIT_SIZE (mode) <= 12) - return true; + smaller. */ + if ((GET_MODE_CLASS (mode) == MODE_FLOAT + || GET_MODE_CLASS (mode) == MODE_COMPLEX_FLOAT) + && GET_MODE_UNIT_SIZE (mode) <= 12) + return true; } return false; } diff --git a/gcc/config/m68k/m68k.h b/gcc/config/m68k/m68k.h index 3f140d4d127..245747fcf5c 100644 --- a/gcc/config/m68k/m68k.h +++ b/gcc/config/m68k/m68k.h @@ -890,6 +890,12 @@ do { if (cc_prev_status.flags & CC_IN_68881) \ #define INCOMING_RETURN_ADDR_RTX \ gen_rtx_MEM (VOIDmode, gen_rtx_REG (VOIDmode, STACK_POINTER_REGNUM)) +/* After the prologue, RA is at 4(AP) in the current frame. */ +#define RETURN_ADDR_RTX(COUNT, FRAME) \ + ((COUNT) == 0 \ + ? gen_rtx_MEM (Pmode, plus_constant (arg_pointer_rtx, UNITS_PER_WORD)) \ + : gen_rtx_MEM (Pmode, plus_constant (FRAME, UNITS_PER_WORD))) + /* We must not use the DBX register numbers for the DWARF 2 CFA column numbers because that maps to numbers beyond FIRST_PSEUDO_REGISTER. Instead use the identity mapping. */ diff --git a/gcc/config/m68k/t-m68kelf b/gcc/config/m68k/t-m68kelf index 686e2d49054..a1d57a04c26 100644 --- a/gcc/config/m68k/t-m68kelf +++ b/gcc/config/m68k/t-m68kelf @@ -24,6 +24,6 @@ LIBGCC = stmp-multilib INSTALL_LIBGCC = install-multilib # from ../t-svr4 -EXTRA_PARTS=crtbegin.o crtend.o +EXTRA_MULTILIB_PARTS=crtbegin.o crtend.o # no pic for now #CRTSTUFF_T_CFLAGS=-fpic diff --git a/gcc/config/m68k/t-uclinux b/gcc/config/m68k/t-uclinux index 8d864bfeb58..1fb7a42e598 100644 --- a/gcc/config/m68k/t-uclinux +++ b/gcc/config/m68k/t-uclinux @@ -21,4 +21,4 @@ LIBGCC = stmp-multilib INSTALL_LIBGCC = install-multilib # We don't use crtbegin.o and crtend.o -EXTRA_PARTS= +EXTRA_MULTILIB_PARTS= diff --git a/gcc/config/mcore/mcore-elf.h b/gcc/config/mcore/mcore-elf.h index 75c15d8cea8..4ec6d586810 100644 --- a/gcc/config/mcore/mcore-elf.h +++ b/gcc/config/mcore/mcore-elf.h @@ -32,34 +32,13 @@ Boston, MA 02110-1301, USA. */ #undef PREFERRED_DEBUGGING_TYPE #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG -#define EXPORTS_SECTION_ASM_OP "\t.section .exports" - -#define SUBTARGET_EXTRA_SECTIONS in_exports - -#define SUBTARGET_EXTRA_SECTION_FUNCTIONS \ - EXPORT_SECTION_FUNCTION - -#define EXPORT_SECTION_FUNCTION \ -void \ -exports_section () \ -{ \ - if (in_section != in_exports) \ - { \ - fprintf (asm_out_file, "%s\n", EXPORTS_SECTION_ASM_OP); \ - in_section = in_exports; \ - } \ -} - -#define SUBTARGET_SWITCH_SECTIONS \ - case in_exports: exports_section (); break; - - #define MCORE_EXPORT_NAME(STREAM, NAME) \ do \ { \ - exports_section (); \ + fprintf (STREAM, "\t.section .exports\n"); \ fprintf (STREAM, "\t.ascii \" -export:%s\"\n", \ (* targetm.strip_name_encoding) (NAME)); \ + in_section = NULL; \ } \ while (0); @@ -73,7 +52,7 @@ exports_section () \ if (mcore_dllexport_name_p (NAME)) \ { \ MCORE_EXPORT_NAME (FILE, NAME); \ - function_section (DECL); \ + switch_to_section (function_section (DECL)); \ } \ ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "function"); \ ASM_DECLARE_RESULT (FILE, DECL_RESULT (DECL)); \ @@ -89,9 +68,9 @@ exports_section () \ HOST_WIDE_INT size; \ if (mcore_dllexport_name_p (NAME)) \ { \ - enum in_section save_section = in_section; \ + section *save_section = in_section; \ MCORE_EXPORT_NAME (FILE, NAME); \ - switch_to_section (save_section, (DECL)); \ + switch_to_section (save_section); \ } \ ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "object"); \ size_directive_output = 0; \ diff --git a/gcc/config/mcore/mcore-pe.h b/gcc/config/mcore/mcore-pe.h index f186805ff2c..5a3aba1c4aa 100644 --- a/gcc/config/mcore/mcore-pe.h +++ b/gcc/config/mcore/mcore-pe.h @@ -41,37 +41,15 @@ Boston, MA 02110-1301, USA. */ /* Computed in toplev.c. */ #undef PREFERRED_DEBUGGING_TYPE -/* Lay out additional 'sections' where we place things like code - and readonly data. This gets them out of default places. */ - -#define SUBTARGET_SWITCH_SECTIONS \ - case in_drectve: drectve_section (); break; - -#define DRECTVE_SECTION_ASM_OP "\t.section .drectve" #define READONLY_DATA_SECTION_ASM_OP "\t.section .rdata" -#define SUBTARGET_EXTRA_SECTIONS in_drectve - -#define SUBTARGET_EXTRA_SECTION_FUNCTIONS \ - DRECTVE_SECTION_FUNCTION - -#define DRECTVE_SECTION_FUNCTION \ -void \ -drectve_section () \ -{ \ - if (in_section != in_drectve) \ - { \ - fprintf (asm_out_file, "%s\n", DRECTVE_SECTION_ASM_OP); \ - in_section = in_drectve; \ - } \ -} - #define MCORE_EXPORT_NAME(STREAM, NAME) \ do \ { \ - drectve_section (); \ + fprintf (STREAM, "\t.section .drectve\n"); \ fprintf (STREAM, "\t.ascii \" -export:%s\"\n", \ (* targetm.strip_name_encoding) (NAME)); \ + in_section = NULL; \ } \ while (0); @@ -82,9 +60,9 @@ drectve_section () \ { \ if (mcore_dllexport_name_p (NAME)) \ { \ - enum in_section save_section = in_section; \ + section *save_section = in_section; \ MCORE_EXPORT_NAME (STREAM, NAME); \ - switch_to_section (save_section, (DECL)); \ + switch_to_section (save_section); \ } \ ASM_OUTPUT_LABEL ((STREAM), (NAME)); \ } \ @@ -97,7 +75,7 @@ drectve_section () \ if (mcore_dllexport_name_p (NAME)) \ { \ MCORE_EXPORT_NAME (STREAM, NAME); \ - function_section (DECL); \ + switch_to_section (function_section (DECL)); \ } \ ASM_OUTPUT_LABEL ((STREAM), (NAME)); \ } \ diff --git a/gcc/config/mcore/mcore.h b/gcc/config/mcore/mcore.h index d9960dc0edb..fd1ba70389b 100644 --- a/gcc/config/mcore/mcore.h +++ b/gcc/config/mcore/mcore.h @@ -857,36 +857,6 @@ extern const enum reg_class reg_class_from_letter[]; #define TEXT_SECTION_ASM_OP "\t.text" #define DATA_SECTION_ASM_OP "\t.data" -#undef EXTRA_SECTIONS -#define EXTRA_SECTIONS SUBTARGET_EXTRA_SECTIONS - -#undef EXTRA_SECTION_FUNCTIONS -#define EXTRA_SECTION_FUNCTIONS \ - SUBTARGET_EXTRA_SECTION_FUNCTIONS \ - SWITCH_SECTION_FUNCTION - -/* Switch to SECTION (an `enum in_section'). - - ??? This facility should be provided by GCC proper. - The problem is that we want to temporarily switch sections in - ASM_DECLARE_OBJECT_NAME and then switch back to the original section - afterwards. */ -#define SWITCH_SECTION_FUNCTION \ -static void switch_to_section (enum in_section, tree); \ -static void \ -switch_to_section (enum in_section section, tree decl) \ -{ \ - switch (section) \ - { \ - case in_text: text_section (); break; \ - case in_unlikely_executed_text: unlikely_text_section (); break; \ - case in_data: data_section (); break; \ - case in_named: named_section (decl, NULL, 0); break; \ - SUBTARGET_SWITCH_SECTIONS \ - default: gcc_unreachable (); \ - } \ -} - /* Switch into a generic section. */ #undef TARGET_ASM_NAMED_SECTION #define TARGET_ASM_NAMED_SECTION mcore_asm_named_section diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c index 154ec302afa..5a655f6edf0 100644 --- a/gcc/config/mips/mips.c +++ b/gcc/config/mips/mips.c @@ -328,9 +328,9 @@ static void mips_restore_reg (rtx, rtx); static void mips_output_mi_thunk (FILE *, tree, HOST_WIDE_INT, HOST_WIDE_INT, tree); static int symbolic_expression_p (rtx); -static void mips_select_rtx_section (enum machine_mode, rtx, - unsigned HOST_WIDE_INT); -static void mips_function_rodata_section (tree); +static section *mips_select_rtx_section (enum machine_mode, rtx, + unsigned HOST_WIDE_INT); +static section *mips_function_rodata_section (tree); static bool mips_in_small_data_p (tree); static int mips_fpr_return_fields (tree, tree *); static bool mips_return_in_msb (tree); @@ -4092,31 +4092,31 @@ mips_va_start (tree valist, rtx nextarg) f_goff = TREE_CHAIN (f_ftop); f_foff = TREE_CHAIN (f_goff); - ovfl = build (COMPONENT_REF, TREE_TYPE (f_ovfl), valist, f_ovfl, - NULL_TREE); - gtop = build (COMPONENT_REF, TREE_TYPE (f_gtop), valist, f_gtop, - NULL_TREE); - ftop = build (COMPONENT_REF, TREE_TYPE (f_ftop), valist, f_ftop, - NULL_TREE); - goff = build (COMPONENT_REF, TREE_TYPE (f_goff), valist, f_goff, - NULL_TREE); - foff = build (COMPONENT_REF, TREE_TYPE (f_foff), valist, f_foff, - NULL_TREE); + ovfl = build3 (COMPONENT_REF, TREE_TYPE (f_ovfl), valist, f_ovfl, + NULL_TREE); + gtop = build3 (COMPONENT_REF, TREE_TYPE (f_gtop), valist, f_gtop, + NULL_TREE); + ftop = build3 (COMPONENT_REF, TREE_TYPE (f_ftop), valist, f_ftop, + NULL_TREE); + goff = build3 (COMPONENT_REF, TREE_TYPE (f_goff), valist, f_goff, + NULL_TREE); + foff = build3 (COMPONENT_REF, TREE_TYPE (f_foff), valist, f_foff, + NULL_TREE); /* Emit code to initialize OVFL, which points to the next varargs stack argument. CUM->STACK_WORDS gives the number of stack words used by named arguments. */ t = make_tree (TREE_TYPE (ovfl), virtual_incoming_args_rtx); if (cum->stack_words > 0) - t = build (PLUS_EXPR, TREE_TYPE (ovfl), t, - build_int_cst (NULL_TREE, - cum->stack_words * UNITS_PER_WORD)); - t = build (MODIFY_EXPR, TREE_TYPE (ovfl), ovfl, t); + t = build2 (PLUS_EXPR, TREE_TYPE (ovfl), t, + build_int_cst (NULL_TREE, + cum->stack_words * UNITS_PER_WORD)); + t = build2 (MODIFY_EXPR, TREE_TYPE (ovfl), ovfl, t); expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL); /* Emit code to initialize GTOP, the top of the GPR save area. */ t = make_tree (TREE_TYPE (gtop), virtual_incoming_args_rtx); - t = build (MODIFY_EXPR, TREE_TYPE (gtop), gtop, t); + t = build2 (MODIFY_EXPR, TREE_TYPE (gtop), gtop, t); expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL); /* Emit code to initialize FTOP, the top of the FPR save area. @@ -4126,21 +4126,21 @@ mips_va_start (tree valist, rtx nextarg) fpr_offset = gpr_save_area_size + UNITS_PER_FPVALUE - 1; fpr_offset &= ~(UNITS_PER_FPVALUE - 1); if (fpr_offset) - t = build (PLUS_EXPR, TREE_TYPE (ftop), t, - build_int_cst (NULL_TREE, -fpr_offset)); - t = build (MODIFY_EXPR, TREE_TYPE (ftop), ftop, t); + t = build2 (PLUS_EXPR, TREE_TYPE (ftop), t, + build_int_cst (NULL_TREE, -fpr_offset)); + t = build2 (MODIFY_EXPR, TREE_TYPE (ftop), ftop, t); expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL); /* Emit code to initialize GOFF, the offset from GTOP of the next GPR argument. */ - t = build (MODIFY_EXPR, TREE_TYPE (goff), goff, - build_int_cst (NULL_TREE, gpr_save_area_size)); + t = build2 (MODIFY_EXPR, TREE_TYPE (goff), goff, + build_int_cst (NULL_TREE, gpr_save_area_size)); expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL); /* Likewise emit code to initialize FOFF, the offset from FTOP of the next FPR argument. */ - t = build (MODIFY_EXPR, TREE_TYPE (foff), foff, - build_int_cst (NULL_TREE, fpr_save_area_size)); + t = build2 (MODIFY_EXPR, TREE_TYPE (foff), foff, + build_int_cst (NULL_TREE, fpr_save_area_size)); expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL); } else @@ -4214,16 +4214,16 @@ mips_gimplify_va_arg_expr (tree valist, tree type, tree *pre_p, tree *post_p) [1] and [9] can sometimes be optimized away. */ - ovfl = build (COMPONENT_REF, TREE_TYPE (f_ovfl), valist, f_ovfl, - NULL_TREE); + ovfl = build3 (COMPONENT_REF, TREE_TYPE (f_ovfl), valist, f_ovfl, + NULL_TREE); if (GET_MODE_CLASS (TYPE_MODE (type)) == MODE_FLOAT && GET_MODE_SIZE (TYPE_MODE (type)) <= UNITS_PER_FPVALUE) { - top = build (COMPONENT_REF, TREE_TYPE (f_ftop), valist, f_ftop, - NULL_TREE); - off = build (COMPONENT_REF, TREE_TYPE (f_foff), valist, f_foff, - NULL_TREE); + top = build3 (COMPONENT_REF, TREE_TYPE (f_ftop), valist, f_ftop, + NULL_TREE); + off = build3 (COMPONENT_REF, TREE_TYPE (f_foff), valist, f_foff, + NULL_TREE); /* When floating-point registers are saved to the stack, each one will take up UNITS_PER_HWFPVALUE bytes, regardless @@ -4251,42 +4251,42 @@ mips_gimplify_va_arg_expr (tree valist, tree type, tree *pre_p, tree *post_p) } else { - top = build (COMPONENT_REF, TREE_TYPE (f_gtop), valist, f_gtop, - NULL_TREE); - off = build (COMPONENT_REF, TREE_TYPE (f_goff), valist, f_goff, - NULL_TREE); + top = build3 (COMPONENT_REF, TREE_TYPE (f_gtop), valist, f_gtop, + NULL_TREE); + off = build3 (COMPONENT_REF, TREE_TYPE (f_goff), valist, f_goff, + NULL_TREE); if (rsize > UNITS_PER_WORD) { /* [1] Emit code for: off &= -rsize. */ - t = build (BIT_AND_EXPR, TREE_TYPE (off), off, - build_int_cst (NULL_TREE, -rsize)); - t = build (MODIFY_EXPR, TREE_TYPE (off), off, t); + t = build2 (BIT_AND_EXPR, TREE_TYPE (off), off, + build_int_cst (NULL_TREE, -rsize)); + t = build2 (MODIFY_EXPR, TREE_TYPE (off), off, t); gimplify_and_add (t, pre_p); } osize = rsize; } /* [2] Emit code to branch if off == 0. */ - t = build (NE_EXPR, boolean_type_node, off, - build_int_cst (TREE_TYPE (off), 0)); - addr = build (COND_EXPR, ptr_type_node, t, NULL, NULL); + t = build2 (NE_EXPR, boolean_type_node, off, + build_int_cst (TREE_TYPE (off), 0)); + addr = build3 (COND_EXPR, ptr_type_node, t, NULL_TREE, NULL_TREE); /* [5] Emit code for: off -= rsize. We do this as a form of post-increment not available to C. Also widen for the coming pointer arithmetic. */ t = fold_convert (TREE_TYPE (off), build_int_cst (NULL_TREE, rsize)); - t = build (POSTDECREMENT_EXPR, TREE_TYPE (off), off, t); + t = build2 (POSTDECREMENT_EXPR, TREE_TYPE (off), off, t); t = fold_convert (sizetype, t); t = fold_convert (TREE_TYPE (top), t); /* [4] Emit code for: addr_rtx = top - off. On big endian machines, the argument has RSIZE - SIZE bytes of leading padding. */ - t = build (MINUS_EXPR, TREE_TYPE (top), top, t); + t = build2 (MINUS_EXPR, TREE_TYPE (top), top, t); if (BYTES_BIG_ENDIAN && rsize > size) { u = fold_convert (TREE_TYPE (t), build_int_cst (NULL_TREE, rsize - size)); - t = build (PLUS_EXPR, TREE_TYPE (t), t, u); + t = build2 (PLUS_EXPR, TREE_TYPE (t), t, u); } COND_EXPR_THEN (addr) = t; @@ -4295,11 +4295,11 @@ mips_gimplify_va_arg_expr (tree valist, tree type, tree *pre_p, tree *post_p) /* [9] Emit: ovfl += ((intptr_t) ovfl + osize - 1) & -osize. */ u = fold_convert (TREE_TYPE (ovfl), build_int_cst (NULL_TREE, osize - 1)); - t = build (PLUS_EXPR, TREE_TYPE (ovfl), ovfl, u); + t = build2 (PLUS_EXPR, TREE_TYPE (ovfl), ovfl, u); u = fold_convert (TREE_TYPE (ovfl), build_int_cst (NULL_TREE, -osize)); - t = build (BIT_AND_EXPR, TREE_TYPE (ovfl), t, u); - align = build (MODIFY_EXPR, TREE_TYPE (ovfl), ovfl, t); + t = build2 (BIT_AND_EXPR, TREE_TYPE (ovfl), t, u); + align = build2 (MODIFY_EXPR, TREE_TYPE (ovfl), ovfl, t); } else align = NULL; @@ -4309,17 +4309,17 @@ mips_gimplify_va_arg_expr (tree valist, tree type, tree *pre_p, tree *post_p) the argument has OSIZE - SIZE bytes of leading padding. */ u = fold_convert (TREE_TYPE (ovfl), build_int_cst (NULL_TREE, osize)); - t = build (POSTINCREMENT_EXPR, TREE_TYPE (ovfl), ovfl, u); + t = build2 (POSTINCREMENT_EXPR, TREE_TYPE (ovfl), ovfl, u); if (BYTES_BIG_ENDIAN && osize > size) { u = fold_convert (TREE_TYPE (t), build_int_cst (NULL_TREE, osize - size)); - t = build (PLUS_EXPR, TREE_TYPE (t), t, u); + t = build2 (PLUS_EXPR, TREE_TYPE (t), t, u); } /* String [9] and [10,11] together. */ if (align) - t = build (COMPOUND_EXPR, TREE_TYPE (t), align, t); + t = build2 (COMPOUND_EXPR, TREE_TYPE (t), align, t); COND_EXPR_ELSE (addr) = t; addr = fold_convert (build_pointer_type (type), addr); @@ -4916,8 +4916,13 @@ override_options (void) && size <= UNITS_PER_FPVALUE) /* Allow integer modes that fit into a single register. We need to put integers into FPRs - when using instructions like cvt and trunc. */ - || (class == MODE_INT && size <= UNITS_PER_FPREG) + when using instructions like cvt and trunc. + We can't allow sizes smaller than a word, + the FPU has no appropriate load/store + instructions for those. */ + || (class == MODE_INT + && size >= MIN_UNITS_PER_WORD + && size <= UNITS_PER_FPREG) /* Allow TFmode for CCmode reloads. */ || (ISA_HAS_8CC && mode == TFmode)); @@ -5762,7 +5767,7 @@ mips_file_start (void) default: gcc_unreachable (); } - /* Note - we use fprintf directly rather than called named_section() + /* Note - we use fprintf directly rather than calling switch_to_section because in this way we can avoid creating an allocated section. We do not want this section to take up any space in the running executable. */ @@ -5804,9 +5809,9 @@ mips_output_aligned_bss (FILE *stream, tree decl, const char *name, extern tree last_assemble_variable_decl; if (mips_in_small_data_p (decl)) - named_section (0, ".sbss", 0); + switch_to_section (get_named_section (NULL, ".sbss", 0)); else - bss_section (); + switch_to_section (bss_section); ASM_OUTPUT_ALIGN (stream, floor_log2 (align / BITS_PER_UNIT)); last_assemble_variable_decl = decl; ASM_DECLARE_OBJECT_NAME (stream, name, decl); @@ -5875,7 +5880,7 @@ mips_output_aligned_decl_common (FILE *stream, tree decl, const char *name, if (TREE_PUBLIC (decl) && DECL_NAME (decl)) targetm.asm_out.globalize_label (stream, name); - readonly_data_section (); + switch_to_section (readonly_data_section); ASM_OUTPUT_ALIGN (stream, floor_log2 (align / BITS_PER_UNIT)); mips_declare_object (stream, name, "", ":\n\t.space\t" HOST_WIDE_INT_PRINT_UNSIGNED "\n", @@ -7110,7 +7115,7 @@ symbolic_expression_p (rtx x) /* Choose the section to use for the constant rtx expression X that has mode MODE. */ -static void +static section * mips_select_rtx_section (enum machine_mode mode, rtx x, unsigned HOST_WIDE_INT align) { @@ -7119,13 +7124,13 @@ mips_select_rtx_section (enum machine_mode mode, rtx x, /* In mips16 mode, the constant table always goes in the same section as the function, so that constants can be loaded using PC relative addressing. */ - function_section (current_function_decl); + return function_section (current_function_decl); } else if (TARGET_EMBEDDED_DATA) { /* For embedded applications, always put constants in read-only data, in order to reduce RAM usage. */ - mergeable_constant_section (mode, align, 0); + return mergeable_constant_section (mode, align, 0); } else { @@ -7135,11 +7140,11 @@ mips_select_rtx_section (enum machine_mode mode, rtx x, if (GET_MODE_SIZE (mode) <= (unsigned) mips_section_threshold && mips_section_threshold > 0) - named_section (0, ".sdata", 0); + return get_named_section (NULL, ".sdata", 0); else if (flag_pic && symbolic_expression_p (x)) - named_section (0, ".data.rel.ro", 3); + return get_named_section (NULL, ".data.rel.ro", 3); else - mergeable_constant_section (mode, align, 0); + return mergeable_constant_section (mode, align, 0); } } @@ -7151,32 +7156,30 @@ mips_select_rtx_section (enum machine_mode mode, rtx x, cases by selecting a normal data section instead of a read-only one. The logic apes that in default_function_rodata_section. */ -static void +static section * mips_function_rodata_section (tree decl) { if (!TARGET_ABICALLS || TARGET_GPWORD) - default_function_rodata_section (decl); - else if (decl && DECL_SECTION_NAME (decl)) + return default_function_rodata_section (decl); + + if (decl && DECL_SECTION_NAME (decl)) { const char *name = TREE_STRING_POINTER (DECL_SECTION_NAME (decl)); if (DECL_ONE_ONLY (decl) && strncmp (name, ".gnu.linkonce.t.", 16) == 0) { char *rname = ASTRDUP (name); rname[14] = 'd'; - named_section_real (rname, SECTION_LINKONCE | SECTION_WRITE, decl); + return get_section (rname, SECTION_LINKONCE | SECTION_WRITE, decl); } else if (flag_function_sections && flag_data_sections && strncmp (name, ".text.", 6) == 0) { char *rname = ASTRDUP (name); memcpy (rname + 1, "data", 4); - named_section_flags (rname, SECTION_WRITE); + return get_section (rname, SECTION_WRITE, decl); } - else - data_section (); } - else - data_section (); + return data_section; } /* Implement TARGET_IN_SMALL_DATA_P. Return true if it would be safe to @@ -7807,7 +7810,7 @@ build_mips16_function_stub (FILE *file) fprintf (file, ")\n"); fprintf (file, "\t.set\tnomips16\n"); - function_section (stubdecl); + switch_to_section (function_section (stubdecl)); ASM_OUTPUT_ALIGN (file, floor_log2 (FUNCTION_BOUNDARY / BITS_PER_UNIT)); /* ??? If FUNCTION_NAME_ALREADY_DECLARED is defined, then we are @@ -7852,7 +7855,7 @@ build_mips16_function_stub (FILE *file) fprintf (file, "\t.set\tmips16\n"); - function_section (current_function_decl); + switch_to_section (function_section (current_function_decl)); } /* We keep a list of functions for which we have already built stubs diff --git a/gcc/config/mips/mips.h b/gcc/config/mips/mips.h index 2d11a88a7d4..7a1837f68fd 100644 --- a/gcc/config/mips/mips.h +++ b/gcc/config/mips/mips.h @@ -2698,7 +2698,7 @@ do { \ { \ const char *p = STRING; \ int size = strlen (p) + 1; \ - readonly_data_section (); \ + switch_to_section (readonly_data_section); \ assemble_string (p, size); \ } @@ -2710,7 +2710,6 @@ do { \ /* Define the strings to put out for each section in the object file. */ #define TEXT_SECTION_ASM_OP "\t.text" /* instructions */ #define DATA_SECTION_ASM_OP "\t.data" /* large data */ -#define SDATA_SECTION_ASM_OP "\t.sdata" /* small data */ #undef READONLY_DATA_SECTION_ASM_OP #define READONLY_DATA_SECTION_ASM_OP "\t.rdata" /* read-only data */ diff --git a/gcc/config/mips/vxworks.h b/gcc/config/mips/vxworks.h index 53a9ae4a889..bf37901bac3 100644 --- a/gcc/config/mips/vxworks.h +++ b/gcc/config/mips/vxworks.h @@ -17,15 +17,6 @@ along with GCC; see the file COPYING. If not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#undef EXTRA_SECTIONS -#define EXTRA_SECTIONS in_sdata, in_sbss - -#undef EXTRA_SECTION_FUNCTIONS -#define EXTRA_SECTION_FUNCTIONS \ - SECTION_FUNCTION_TEMPLATE(sdata_section, in_sdata, SDATA_SECTION_ASM_OP) \ - SECTION_FUNCTION_TEMPLATE(sbss_section, in_sbss, SBSS_SECTION_ASM_OP) - - #undef TARGET_VERSION #define TARGET_VERSION fprintf (stderr, " (MIPS, VxWorks syntax)"); diff --git a/gcc/config/mmix/mmix.c b/gcc/config/mmix/mmix.c index fc2a5c82d68..b57ed7aefa6 100644 --- a/gcc/config/mmix/mmix.c +++ b/gcc/config/mmix/mmix.c @@ -1182,7 +1182,7 @@ mmix_file_start (void) fputs ("! mmixal:= 8H LOC Data_Section\n", asm_out_file); /* Make sure each file starts with the text section. */ - text_section (); + switch_to_section (text_section); } /* TARGET_ASM_FILE_END. */ @@ -1191,7 +1191,7 @@ static void mmix_file_end (void) { /* Make sure each file ends with the data section. */ - data_section (); + switch_to_section (data_section); } /* ASM_OUTPUT_SOURCE_FILENAME. */ @@ -1350,7 +1350,7 @@ mmix_asm_output_aligned_local (FILE *stream, int size, int align) { - data_section (); + switch_to_section (data_section); ASM_OUTPUT_ALIGN (stream, exact_log2 (align/BITS_PER_UNIT)); assemble_name (stream, name); diff --git a/gcc/config/ms1/crti.asm b/gcc/config/ms1/crti.asm deleted file mode 100644 index 115b96e7cb8..00000000000 --- a/gcc/config/ms1/crti.asm +++ /dev/null @@ -1,71 +0,0 @@ -# crti.asm for ms1 -# -# Copyright (C) 2005 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 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 GCC; see the file COPYING. If not, write to the Free -# Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA -# 02110-1301, USA. -# -# As a special exception, if you link this library with files -# compiled with GCC to produce an executable, this does not cause -# the resulting executable to be covered by the GNU General Public License. -# This exception does not however invalidate any other reasons why -# the executable file might be covered by the GNU General Public License. -# - -# This file just make a stack frame for the contents of the .fini and -# .init sections. Users may put any desired instructions in those -# sections. - - .file "crti.asm" - - .section ".init" - .global _init - .type _init,#function - .align 4 -_init: - subi sp, sp, #4 - stw r14, sp, #0 - or r0, r0, r0 - or r0, r0, r0 - or r0, r0, r0 - or r0, r0, r0 - or r0, r0, r0 - or r0, r0, r0 - or r0, r0, r0 - or r0, r0, r0 - - .section ".fini" - .global _fini - .type _fini,#function - .align 4 -_fini: - subi sp, sp, #4 - stw r14, sp, #0 - or r0, r0, r0 - or r0, r0, r0 - or r0, r0, r0 - or r0, r0, r0 - or r0, r0, r0 - or r0, r0, r0 - or r0, r0, r0 - or r0, r0, r0 diff --git a/gcc/config/ms1/crtn.asm b/gcc/config/ms1/crtn.asm deleted file mode 100644 index 5fbe7ece969..00000000000 --- a/gcc/config/ms1/crtn.asm +++ /dev/null @@ -1,56 +0,0 @@ -# crtn.asm for ms1 - -# Copyright (C) 2005 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 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 GCC; see the file COPYING. If not, write to the Free -# Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA -# 02110-1301, USA. -# -# As a special exception, if you link this library with files -# compiled with GCC to produce an executable, this does not cause -# the resulting executable to be covered by the GNU General Public License. -# This exception does not however invalidate any other reasons why -# the executable file might be covered by the GNU General Public License. -# - -# This file just makes sure that the .fini and .init sections do in -# fact return. Users may put any desired instructions in those sections. -# This file is the last thing linked into any executable. - - .file "crtn.asm" - - .section ".init" - .align 4 - ldw r14, sp, #0 - addi sp, sp, #4 - nop - jal r0, r14 - or r0, r0, r0 - - .section ".fini" - .align 4 - - ldw r14, sp, #0 - addi sp, sp, #4 - nop - jal r0, r14 - or r0, r0, r0 diff --git a/gcc/config/ms1/ms1-protos.h b/gcc/config/ms1/ms1-protos.h deleted file mode 100644 index 412b42d2ac2..00000000000 --- a/gcc/config/ms1/ms1-protos.h +++ /dev/null @@ -1,65 +0,0 @@ -/* Prototypes for exported functions defined in ms1.c - Copyright (C) 2005 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, 51 Franklin Street, Fifth Floor, Boston, MA - 02110-1301, USA. */ - -extern void ms1_init_expanders (void); -extern void ms1_expand_prologue (void); -extern void ms1_expand_epilogue (enum epilogue_type); -extern unsigned ms1_compute_frame_size (int); -extern void ms1_override_options (void); -extern int ms1_initial_elimination_offset (int, int); -extern const char * ms1_asm_output_opcode (FILE *, const char *); -extern int ms1_epilogue_uses (int); - -#ifdef TREE_CODE -extern const char * ms1_cannot_inline_p (tree); -extern int ms1_function_arg_boundary (enum machine_mode, tree); -extern void ms1_function_arg_advance (CUMULATIVE_ARGS *, enum machine_mode, tree, int); -#endif - -#ifdef RTX_CODE -extern void ms1_expand_eh_return (rtx *); -extern void ms1_emit_eh_epilogue (rtx *); -extern void ms1_print_operand (FILE *, rtx, int); -extern void ms1_print_operand_address (FILE *, rtx); -extern int ms1_check_split (rtx, enum machine_mode); -extern int ms1_reg_ok_for_base_p (rtx, int); -extern int ms1_legitimate_address_p (enum machine_mode, rtx, int); -/* Predicates for machine description. */ -extern int uns_arith_operand (rtx, enum machine_mode); -extern int arith_operand (rtx, enum machine_mode); -extern int reg_or_0_operand (rtx, enum machine_mode); -extern int big_const_operand (rtx, enum machine_mode); -extern int single_const_operand (rtx, enum machine_mode); -extern void ms1_emit_cbranch (enum rtx_code, rtx, rtx, rtx); -extern void ms1_set_memflags (rtx); -extern rtx ms1_return_addr_rtx (int); -extern void ms1_split_words (enum machine_mode, enum machine_mode, rtx *); -extern void ms1_final_prescan_insn (rtx, rtx *, int); -#endif - -#ifdef TREE_CODE -#ifdef RTX_CODE -extern void ms1_init_cumulative_args (CUMULATIVE_ARGS *, tree, rtx, tree, int); -extern rtx ms1_function_arg (const CUMULATIVE_ARGS *, enum machine_mode, tree, int, int); -extern void ms1_va_start (tree, rtx); -extern enum reg_class ms1_secondary_reload_class (enum reg_class, enum machine_mode, rtx); -extern rtx ms1_function_value (tree, enum machine_mode, tree); -#endif -#endif diff --git a/gcc/config/ms1/ms1.c b/gcc/config/ms1/ms1.c deleted file mode 100644 index 19f02a1c746..00000000000 --- a/gcc/config/ms1/ms1.c +++ /dev/null @@ -1,1980 +0,0 @@ -/* Target definitions for the MorphoRISC1 - Copyright (C) 2005 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, 51 Franklin Street, Fifth Floor, Boston, MA - 02110-1301, USA. */ - -#include "config.h" -#include "system.h" -#include "coretypes.h" -#include "tm.h" -#include "rtl.h" -#include "regs.h" -#include "hard-reg-set.h" -#include "real.h" -#include "insn-config.h" -#include "conditions.h" -#include "insn-attr.h" -#include "recog.h" -#include "toplev.h" -#include "output.h" -#include "integrate.h" -#include "tree.h" -#include "function.h" -#include "expr.h" -#include "optabs.h" -#include "libfuncs.h" -#include "flags.h" -#include "tm_p.h" -#include "ggc.h" -#include "insn-flags.h" -#include "obstack.h" -#include "except.h" -#include "target.h" -#include "target-def.h" - -/* Frame pointer register mask. */ -#define FP_MASK (1 << (GPR_FP)) - -/* Link register mask. */ -#define LINK_MASK (1 << (GPR_LINK)) - -/* First GPR. */ -#define MS1_INT_ARG_FIRST 1 - -/* Given a SIZE in bytes, advance to the next word. */ -#define ROUND_ADVANCE(SIZE) (((SIZE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD) - -/* A C structure for machine-specific, per-function data. - This is added to the cfun structure. */ -struct machine_function GTY(()) -{ - /* Flags if __builtin_return_address (n) with n >= 1 was used. */ - int ra_needs_full_frame; - struct rtx_def * eh_stack_adjust; - int interrupt_handler; -}; - -/* Define the information needed to generate branch and scc insns. - This is stored from the compare operation. */ -struct rtx_def * ms1_compare_op0; -struct rtx_def * ms1_compare_op1; - -/* Current frame information calculated by compute_frame_size. */ -struct ms1_frame_info current_frame_info; - -/* Zero structure to initialize current_frame_info. */ -struct ms1_frame_info zero_frame_info; - -/* ms1 doesn't have unsigned compares need a library call for this. */ -struct rtx_def * ms1_ucmpsi3_libcall; - -static int ms1_flag_delayed_branch; - - -static rtx -ms1_struct_value_rtx (tree fndecl ATTRIBUTE_UNUSED, - int incoming ATTRIBUTE_UNUSED) -{ - return gen_rtx_REG (Pmode, RETVAL_REGNUM); -} - -/* Implement RETURN_ADDR_RTX. */ -rtx -ms1_return_addr_rtx (int count) -{ - if (count != 0) - return NULL_RTX; - - return get_hard_reg_initial_val (Pmode, GPR_LINK); -} - -/* The following variable value indicates the number of nops required - between the current instruction and the next instruction to avoid - any pipeline hazards. */ -static int ms1_nops_required = 0; -static const char * ms1_nop_reasons = ""; - -/* Implement ASM_OUTPUT_OPCODE. */ -const char * -ms1_asm_output_opcode (FILE *f ATTRIBUTE_UNUSED, const char *ptr) -{ - if (ms1_nops_required) - fprintf (f, ";# need %d nops because of %s\n\t", - ms1_nops_required, ms1_nop_reasons); - - while (ms1_nops_required) - { - fprintf (f, "or r0, r0, r0\n\t"); - -- ms1_nops_required; - } - - return ptr; -} - -/* Given an insn, return whether it's a memory operation or a branch - operation, otherwise return TYPE_ARITH. */ -static enum attr_type -ms1_get_attr_type (rtx complete_insn) -{ - rtx insn = PATTERN (complete_insn); - - if (JUMP_P (complete_insn)) - return TYPE_BRANCH; - if (CALL_P (complete_insn)) - return TYPE_BRANCH; - - if (GET_CODE (insn) != SET) - return TYPE_ARITH; - - if (SET_DEST (insn) == pc_rtx) - return TYPE_BRANCH; - - if (GET_CODE (SET_DEST (insn)) == MEM) - return TYPE_STORE; - - if (GET_CODE (SET_SRC (insn)) == MEM) - return TYPE_LOAD; - - return TYPE_ARITH; -} - -/* A helper routine for insn_dependent_p called through note_stores. */ - -static void -insn_dependent_p_1 (rtx x, rtx pat ATTRIBUTE_UNUSED, void *data) -{ - rtx * pinsn = (rtx *) data; - - if (*pinsn && reg_mentioned_p (x, *pinsn)) - *pinsn = NULL_RTX; -} - -/* Return true if anything in insn X is (anti,output,true) - dependent on anything in insn Y. */ - -static bool -insn_dependent_p (rtx x, rtx y) -{ - rtx tmp; - - if (! INSN_P (x) || ! INSN_P (y)) - return 0; - - tmp = PATTERN (y); - note_stores (PATTERN (x), insn_dependent_p_1, &tmp); - if (tmp == NULL_RTX) - return true; - - tmp = PATTERN (x); - note_stores (PATTERN (y), insn_dependent_p_1, &tmp); - return (tmp == NULL_RTX); -} - - -/* Return true if anything in insn X is true dependent on anything in - insn Y. */ -static bool -insn_true_dependent_p (rtx x, rtx y) -{ - rtx tmp; - - if (! INSN_P (x) || ! INSN_P (y)) - return 0; - - tmp = PATTERN (y); - note_stores (PATTERN (x), insn_dependent_p_1, &tmp); - return (tmp == NULL_RTX); -} - -/* The following determines the number of nops that need to be - inserted between the previous instructions and current instruction - to avoid pipeline hazards on the ms1 processor. Remember that - the function is not called for asm insns. */ - -void -ms1_final_prescan_insn (rtx insn, - rtx * opvec ATTRIBUTE_UNUSED, - int noperands ATTRIBUTE_UNUSED) -{ - rtx prev_i; - enum attr_type prev_attr; - - ms1_nops_required = 0; - ms1_nop_reasons = ""; - - /* ms2 constraints are dealt with in reorg. */ - if (ms1_cpu == PROCESSOR_MS2) - return; - - /* Only worry about real instructions. */ - if (! INSN_P (insn)) - return; - - /* Find the previous real instructions. */ - for (prev_i = PREV_INSN (insn); - prev_i != NULL - && (! INSN_P (prev_i) - || GET_CODE (PATTERN (prev_i)) == USE - || GET_CODE (PATTERN (prev_i)) == CLOBBER); - prev_i = PREV_INSN (prev_i)) - { - /* If we meet a barrier, there is no flow through here. */ - if (BARRIER_P (prev_i)) - return; - } - - /* If there isn't one then there is nothing that we need do. */ - if (prev_i == NULL || ! INSN_P (prev_i)) - return; - - prev_attr = ms1_get_attr_type (prev_i); - - /* Delayed branch slots already taken care of by delay branch scheduling. */ - if (prev_attr == TYPE_BRANCH) - return; - - switch (ms1_get_attr_type (insn)) - { - case TYPE_LOAD: - case TYPE_STORE: - /* Avoid consecutive memory operation. */ - if ((prev_attr == TYPE_LOAD || prev_attr == TYPE_STORE) - && ms1_cpu == PROCESSOR_MS1_64_001) - { - ms1_nops_required = 1; - ms1_nop_reasons = "consecutive mem ops"; - } - /* Drop through. */ - - case TYPE_ARITH: - case TYPE_COMPLEX: - /* One cycle of delay is required between load - and the dependent arithmetic instruction. */ - if (prev_attr == TYPE_LOAD - && insn_true_dependent_p (prev_i, insn)) - { - ms1_nops_required = 1; - ms1_nop_reasons = "load->arith dependency delay"; - } - break; - - case TYPE_BRANCH: - if (insn_dependent_p (prev_i, insn)) - { - if (prev_attr == TYPE_ARITH - && ms1_cpu == PROCESSOR_MS1_64_001) - { - /* One cycle of delay between arith - instructions and branch dependent on arith. */ - ms1_nops_required = 1; - ms1_nop_reasons = "arith->branch dependency delay"; - } - else if (prev_attr == TYPE_LOAD) - { - /* Two cycles of delay are required - between load and dependent branch. */ - if (ms1_cpu == PROCESSOR_MS1_64_001) - ms1_nops_required = 2; - else - ms1_nops_required = 1; - ms1_nop_reasons = "load->branch dependency delay"; - } - } - break; - - default: - fatal_insn ("ms1_final_prescan_insn, invalid insn #1", insn); - break; - } -} - -/* Print debugging information for a frame. */ -static void -ms1_debug_stack (struct ms1_frame_info * info) -{ - int regno; - - if (!info) - { - error ("info pointer NULL"); - gcc_unreachable (); - } - - 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 = %d\n", info->total_size); - fprintf (stderr, "\tpretend_size = %d\n", info->pretend_size); - fprintf (stderr, "\targs_size = %d\n", info->args_size); - fprintf (stderr, "\textra_size = %d\n", info->extra_size); - fprintf (stderr, "\treg_size = %d\n", info->reg_size); - fprintf (stderr, "\tvar_size = %d\n", info->var_size); - fprintf (stderr, "\tframe_size = %d\n", info->frame_size); - fprintf (stderr, "\treg_mask = 0x%x\n", info->reg_mask); - fprintf (stderr, "\tsave_fp = %d\n", info->save_fp); - fprintf (stderr, "\tsave_lr = %d\n", info->save_lr); - fprintf (stderr, "\tinitialized = %d\n", info->initialized); - fprintf (stderr, "\tsaved registers ="); - - /* Print out reg_mask in a more readable format. */ - for (regno = GPR_R0; regno <= GPR_LAST; regno++) - if ( (1 << regno) & info->reg_mask) - fprintf (stderr, " %s", reg_names[regno]); - - putc ('\n', stderr); - fflush (stderr); -} - -/* Print a memory address as an operand to reference that memory location. */ - -static void -ms1_print_operand_simple_address (FILE * file, rtx addr) -{ - if (!addr) - error ("PRINT_OPERAND_ADDRESS, null pointer"); - - else - switch (GET_CODE (addr)) - { - case REG: - fprintf (file, "%s, #0", reg_names [REGNO (addr)]); - break; - - case PLUS: - { - rtx reg = 0; - rtx offset = 0; - rtx arg0 = XEXP (addr, 0); - rtx arg1 = XEXP (addr, 1); - - if (GET_CODE (arg0) == REG) - { - reg = arg0; - offset = arg1; - if (GET_CODE (offset) == REG) - fatal_insn ("PRINT_OPERAND_ADDRESS, 2 regs", addr); - } - - else if (GET_CODE (arg1) == REG) - reg = arg1, offset = arg0; - else if (CONSTANT_P (arg0) && CONSTANT_P (arg1)) - { - fprintf (file, "%s, #", reg_names [GPR_R0]); - output_addr_const (file, addr); - break; - } - fprintf (file, "%s, #", reg_names [REGNO (reg)]); - output_addr_const (file, offset); - break; - } - - case LABEL_REF: - case SYMBOL_REF: - case CONST_INT: - case CONST: - output_addr_const (file, addr); - break; - - default: - fatal_insn ("PRINT_OPERAND_ADDRESS, invalid insn #1", addr); - break; - } -} - -/* Implement PRINT_OPERAND_ADDRESS. */ -void -ms1_print_operand_address (FILE * file, rtx addr) -{ - if (GET_CODE (addr) == AND - && GET_CODE (XEXP (addr, 1)) == CONST_INT - && INTVAL (XEXP (addr, 1)) == -3) - ms1_print_operand_simple_address (file, XEXP (addr, 0)); - else - ms1_print_operand_simple_address (file, addr); -} - -/* Implement PRINT_OPERAND. */ -void -ms1_print_operand (FILE * file, rtx x, int code) -{ - switch (code) - { - case '#': - /* Output a nop if there's nothing for the delay slot. */ - if (dbr_sequence_length () == 0) - fputs ("\n\tor r0, r0, r0", file); - return; - - case 'H': - fprintf(file, "#%%hi16("); - output_addr_const (file, x); - fprintf(file, ")"); - return; - - case 'L': - fprintf(file, "#%%lo16("); - output_addr_const (file, x); - fprintf(file, ")"); - return; - - case 'N': - fprintf(file, "#%ld", ~INTVAL (x)); - return; - - case 'z': - if (GET_CODE (x) == CONST_INT && INTVAL (x) == 0) - { - fputs (reg_names[GPR_R0], file); - return; - } - - case 0: - /* Handled below. */ - break; - - default: - /* output_operand_lossage ("ms1_print_operand: unknown code"); */ - fprintf (file, "unknown code"); - return; - } - - switch (GET_CODE (x)) - { - case REG: - fputs (reg_names [REGNO (x)], file); - break; - - case CONST: - case CONST_INT: - fprintf(file, "#%ld", INTVAL (x)); - break; - - case MEM: - ms1_print_operand_address(file, XEXP (x,0)); - break; - - case LABEL_REF: - case SYMBOL_REF: - output_addr_const (file, x); - break; - - default: - fprintf(file, "Uknown code: %d", GET_CODE (x)); - break; - } - - return; -} - -/* Implement INIT_CUMULATIVE_ARGS. */ -void -ms1_init_cumulative_args (CUMULATIVE_ARGS * cum, tree fntype, rtx libname, - tree fndecl ATTRIBUTE_UNUSED, int incoming) -{ - *cum = 0; - - if (TARGET_DEBUG_ARG) - { - fprintf (stderr, "\nms1_init_cumulative_args:"); - - 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); - } -} - -/* Compute the slot number to pass an argument in. - Returns the slot number or -1 if passing on the stack. - - CUM is a variable of type CUMULATIVE_ARGS which gives info about - the preceding args and about the function being called. - MODE is the argument's machine mode. - TYPE is the data type of the argument (as a tree). - This is null for libcalls where that information may - not be available. - NAMED is nonzero if this argument is a named parameter - (otherwise it is an extra parameter matching an ellipsis). - INCOMING_P is zero for FUNCTION_ARG, nonzero for FUNCTION_INCOMING_ARG. - *PREGNO records the register number to use if scalar type. */ - -static int -ms1_function_arg_slotno (const CUMULATIVE_ARGS * cum, - enum machine_mode mode, - tree type, - int named ATTRIBUTE_UNUSED, - int incoming_p ATTRIBUTE_UNUSED, - int * pregno) -{ - int regbase = MS1_INT_ARG_FIRST; - int slotno = * cum; - - if (mode == VOIDmode || targetm.calls.must_pass_in_stack (mode, type)) - return -1; - - if (slotno >= MS1_NUM_ARG_REGS) - return -1; - - * pregno = regbase + slotno; - - return slotno; -} - -/* Implement FUNCTION_ARG. */ -rtx -ms1_function_arg (const CUMULATIVE_ARGS * cum, - enum machine_mode mode, - tree type, - int named, - int incoming_p) -{ - int slotno, regno; - rtx reg; - - slotno = ms1_function_arg_slotno (cum, mode, type, named, incoming_p, - & regno); - - if (slotno == -1) - reg = NULL_RTX; - else - reg = gen_rtx_REG (mode, regno); - - return reg; -} - -/* Implement FUNCTION_ARG_ADVANCE. */ -void -ms1_function_arg_advance (CUMULATIVE_ARGS * cum, - enum machine_mode mode, - tree type ATTRIBUTE_UNUSED, - int named) -{ - int slotno, regno; - - /* We pass 0 for incoming_p here, it doesn't matter. */ - slotno = ms1_function_arg_slotno (cum, mode, type, named, 0, ®no); - - * cum += (mode != BLKmode - ? ROUND_ADVANCE (GET_MODE_SIZE (mode)) - : ROUND_ADVANCE (int_size_in_bytes (type))); - - if (TARGET_DEBUG_ARG) - fprintf (stderr, - "ms1_function_arg_advance: words = %2d, mode = %4s, named = %d, size = %3d\n", - *cum, GET_MODE_NAME (mode), named, - (*cum) * UNITS_PER_WORD); -} - -/* Implement hook TARGET_ARG_PARTIAL_BYTES. - - Returns the number of bytes at the beginning of an argument that - 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. */ -static int -ms1_arg_partial_bytes (CUMULATIVE_ARGS * pcum, - enum machine_mode mode, - tree type, - bool named ATTRIBUTE_UNUSED) -{ - int cum = * pcum; - int words; - - if (mode == BLKmode) - words = ((int_size_in_bytes (type) + UNITS_PER_WORD - 1) - / UNITS_PER_WORD); - else - words = (GET_MODE_SIZE (mode) + UNITS_PER_WORD - 1) / UNITS_PER_WORD; - - if (! targetm.calls.pass_by_reference (& cum, mode, type, named) - && cum < MS1_NUM_ARG_REGS - && (cum + words) > MS1_NUM_ARG_REGS) - { - int bytes = (MS1_NUM_ARG_REGS - cum) * UNITS_PER_WORD; - - if (TARGET_DEBUG) - fprintf (stderr, "function_arg_partial_nregs = %d\n", bytes); - return bytes; - } - - return 0; -} - - -/* Implement TARGET_PASS_BY_REFERENCE hook. */ -static bool -ms1_pass_by_reference (CUMULATIVE_ARGS * cum ATTRIBUTE_UNUSED, - enum machine_mode mode ATTRIBUTE_UNUSED, - tree type, - bool named ATTRIBUTE_UNUSED) -{ - return (type && int_size_in_bytes (type) > 4 * UNITS_PER_WORD); -} - -/* Implement FUNCTION_ARG_BOUNDARY. */ -int -ms1_function_arg_boundary (enum machine_mode mode ATTRIBUTE_UNUSED, - tree type ATTRIBUTE_UNUSED) -{ - return BITS_PER_WORD; -} - -/* Implement REG_OK_FOR_BASE_P. */ -int -ms1_reg_ok_for_base_p (rtx x, int strict) -{ - if (strict) - return (((unsigned) REGNO (x)) < FIRST_PSEUDO_REGISTER); - return 1; -} - -/* Helper function of ms1_legitimate_address_p. Return true if XINSN - is a simple address, otherwise false. */ -static bool -ms1_legitimate_simple_address_p (enum machine_mode mode ATTRIBUTE_UNUSED, - rtx xinsn, - int strict) -{ - if (TARGET_DEBUG) - { - fprintf (stderr, "\n========== GO_IF_LEGITIMATE_ADDRESS, %sstrict\n", - strict ? "" : "not "); - debug_rtx (xinsn); - } - - if (GET_CODE (xinsn) == REG && ms1_reg_ok_for_base_p (xinsn, strict)) - return true; - - if (GET_CODE (xinsn) == PLUS - && GET_CODE (XEXP (xinsn, 0)) == REG - && ms1_reg_ok_for_base_p (XEXP (xinsn, 0), strict) - && GET_CODE (XEXP (xinsn, 1)) == CONST_INT - && SMALL_INT (XEXP (xinsn, 1))) - return true; - - return false; -} - - -/* Helper function of GO_IF_LEGITIMATE_ADDRESS. Return non-zero if - XINSN is a legitimate address on MS1. */ -int -ms1_legitimate_address_p (enum machine_mode mode, - rtx xinsn, - int strict) -{ - if (ms1_legitimate_simple_address_p (mode, xinsn, strict)) - return 1; - - if ((mode) == SImode - && GET_CODE (xinsn) == AND - && GET_CODE (XEXP (xinsn, 1)) == CONST_INT - && INTVAL (XEXP (xinsn, 1)) == -3) - return ms1_legitimate_simple_address_p (mode, XEXP (xinsn, 0), strict); - else - return 0; -} - -/* Return truth value of whether OP can be used as an operands where a - register or 16 bit unsigned integer is needed. */ - -int -uns_arith_operand (rtx op, enum machine_mode mode) -{ - if (GET_CODE (op) == CONST_INT && SMALL_INT_UNSIGNED (op)) - return 1; - - return register_operand (op, mode); -} - -/* Return truth value of whether OP can be used as an operands where a - 16 bit integer is needed. */ - -int -arith_operand (rtx op, enum machine_mode mode) -{ - if (GET_CODE (op) == CONST_INT && SMALL_INT (op)) - return 1; - - return register_operand (op, mode); -} - -/* Return truth value of whether OP is a register or the constant 0. */ - -int -reg_or_0_operand (rtx op, enum machine_mode mode) -{ - switch (GET_CODE (op)) - { - case CONST_INT: - return INTVAL (op) == 0; - - case REG: - case SUBREG: - return register_operand (op, mode); - - default: - break; - } - - return 0; -} - -/* Return truth value of whether OP is a constant that requires two - loads to put in a register. */ - -int -big_const_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED) -{ - if (GET_CODE (op) == CONST_INT && CONST_OK_FOR_LETTER_P (INTVAL (op), 'M')) - return 1; - - return 0; -} - -/* Return truth value of whether OP is a constant that require only - one load to put in a register. */ - -int -single_const_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED) -{ - if (big_const_operand (op, mode) - || GET_CODE (op) == CONST - || GET_CODE (op) == LABEL_REF - || GET_CODE (op) == SYMBOL_REF) - return 0; - - return 1; -} - -/* True if the current function is an interrupt handler - (either via #pragma or an attribute specification). */ -int interrupt_handler; -enum processor_type ms1_cpu; - -static struct machine_function * -ms1_init_machine_status (void) -{ - struct machine_function *f; - - f = ggc_alloc_cleared (sizeof (struct machine_function)); - - return f; -} - -/* Implement OVERRIDE_OPTIONS. */ -void -ms1_override_options (void) -{ - if (ms1_cpu_string != NULL) - { - if (!strcasecmp (ms1_cpu_string, "MS1-64-001")) - ms1_cpu = PROCESSOR_MS1_64_001; - else if (!strcasecmp (ms1_cpu_string, "MS1-16-002")) - ms1_cpu = PROCESSOR_MS1_16_002; - else if (!strcasecmp (ms1_cpu_string, "MS1-16-003")) - ms1_cpu = PROCESSOR_MS1_16_003; - else if (!strcasecmp (ms1_cpu_string, "MS2")) - ms1_cpu = PROCESSOR_MS2; - else - error ("bad value (%s) for -march= switch", ms1_cpu_string); - } - else - ms1_cpu = PROCESSOR_MS1_64_001; - - if (flag_exceptions) - { - flag_omit_frame_pointer = 0; - flag_gcse = 0; - } - - /* We do delayed branch filling in machine dependent reorg */ - ms1_flag_delayed_branch = flag_delayed_branch; - flag_delayed_branch = 0; - - init_machine_status = ms1_init_machine_status; -} - -/* Do what is necessary for `va_start'. We look at the current function - to determine if stdarg or varargs is used and return the address of the - first unnamed parameter. */ - -static rtx -ms1_builtin_saveregs (void) -{ - int first_reg = 0; - rtx address; - int regno; - - for (regno = first_reg; regno < MS1_NUM_ARG_REGS; regno ++) - emit_move_insn (gen_rtx_MEM (word_mode, - gen_rtx_PLUS (Pmode, - gen_rtx_REG (SImode, ARG_POINTER_REGNUM), - GEN_INT (UNITS_PER_WORD * regno))), - gen_rtx_REG (word_mode, - MS1_INT_ARG_FIRST + regno)); - - address = gen_rtx_PLUS (Pmode, - gen_rtx_REG (SImode, ARG_POINTER_REGNUM), - GEN_INT (UNITS_PER_WORD * first_reg)); - return address; -} - -/* Implement `va_start'. */ - -void -ms1_va_start (tree valist, rtx nextarg) -{ - ms1_builtin_saveregs (); - std_expand_builtin_va_start (valist, nextarg); -} - -/* Returns the number of bytes offset between the frame pointer and the stack - pointer for the current function. SIZE is the number of bytes of space - needed for local variables. */ - -unsigned int -ms1_compute_frame_size (int size) -{ - int regno; - unsigned int total_size; - unsigned int var_size; - unsigned int args_size; - unsigned int pretend_size; - unsigned int extra_size; - unsigned int reg_size; - unsigned int frame_size; - unsigned int reg_mask; - - var_size = size; - args_size = current_function_outgoing_args_size; - pretend_size = current_function_pretend_args_size; - extra_size = FIRST_PARM_OFFSET (0); - total_size = extra_size + pretend_size + args_size + var_size; - reg_size = 0; - reg_mask = 0; - - /* Calculate space needed for registers. */ - for (regno = GPR_R0; regno <= GPR_LAST; regno++) - { - if (MUST_SAVE_REGISTER (regno)) - { - reg_size += UNITS_PER_WORD; - reg_mask |= 1 << regno; - } - } - - current_frame_info.save_fp = (regs_ever_live [GPR_FP] - || frame_pointer_needed - || interrupt_handler); - current_frame_info.save_lr = (regs_ever_live [GPR_LINK] - || profile_flag - || interrupt_handler); - - reg_size += (current_frame_info.save_fp + current_frame_info.save_lr) - * UNITS_PER_WORD; - total_size += reg_size; - total_size = ((total_size + 3) & ~3); - - frame_size = total_size; - - /* Save computed information. */ - current_frame_info.pretend_size = pretend_size; - current_frame_info.var_size = var_size; - current_frame_info.args_size = args_size; - current_frame_info.reg_size = reg_size; - current_frame_info.frame_size = args_size + var_size; - current_frame_info.total_size = total_size; - current_frame_info.extra_size = extra_size; - current_frame_info.reg_mask = reg_mask; - current_frame_info.initialized = reload_completed; - - return total_size; -} - -/* Emit code to save REG in stack offset pointed to by MEM. - STACK_OFFSET is the offset from the SP where the save will happen. - This function sets the REG_FRAME_RELATED_EXPR note accordingly. */ -static void -ms1_emit_save_restore (enum save_direction direction, - rtx reg, - rtx mem, - int stack_offset) -{ - if (direction == FROM_PROCESSOR_TO_MEM) - { - rtx insn; - - insn = emit_move_insn (mem, reg); - RTX_FRAME_RELATED_P (insn) = 1; - REG_NOTES (insn) - = gen_rtx_EXPR_LIST (REG_FRAME_RELATED_EXPR, - gen_rtx_SET (VOIDmode, - gen_rtx_MEM - (SImode, - gen_rtx_PLUS (SImode, - stack_pointer_rtx, - GEN_INT (stack_offset))), - reg), - REG_NOTES (insn)); - } - else - emit_move_insn (reg, mem); -} - - -/* Emit code to save the frame pointer in the prologue and restore - frame pointer in epilogue. */ - -static void -ms1_emit_save_fp (enum save_direction direction, - struct ms1_frame_info info) -{ - rtx base_reg; - int reg_mask = info.reg_mask & ~(FP_MASK | LINK_MASK); - int offset = info.total_size; - int stack_offset = info.total_size; - - /* If there is nothing to save, get out now. */ - if (! info.save_fp && ! info.save_lr && ! reg_mask) - return; - - /* If offset doesn't fit in a 15-bit signed integer, - uses a scratch registers to get a smaller offset. */ - if (CONST_OK_FOR_LETTER_P(offset, 'O')) - base_reg = stack_pointer_rtx; - else - { - /* Use the scratch register R9 that holds old stack pointer. */ - base_reg = gen_rtx_REG (SImode, GPR_R9); - offset = 0; - } - - if (info.save_fp) - { - offset -= UNITS_PER_WORD; - stack_offset -= UNITS_PER_WORD; - ms1_emit_save_restore (direction, gen_rtx_REG (SImode, GPR_FP), - gen_rtx_MEM (SImode, - gen_rtx_PLUS (SImode, base_reg, GEN_INT (offset))), - stack_offset); - } -} - -/* Emit code to save registers in the prologue and restore register - in epilogue. */ - -static void -ms1_emit_save_regs (enum save_direction direction, - struct ms1_frame_info info) -{ - rtx base_reg; - int regno; - int reg_mask = info.reg_mask & ~(FP_MASK | LINK_MASK); - int offset = info.total_size; - int stack_offset = info.total_size; - - /* If there is nothing to save, get out now. */ - if (! info.save_fp && ! info.save_lr && ! reg_mask) - return; - - /* If offset doesn't fit in a 15-bit signed integer, - uses a scratch registers to get a smaller offset. */ - if (CONST_OK_FOR_LETTER_P(offset, 'O')) - base_reg = stack_pointer_rtx; - else - { - /* Use the scratch register R9 that holds old stack pointer. */ - base_reg = gen_rtx_REG (SImode, GPR_R9); - offset = 0; - } - - if (info.save_fp) - { - /* This just records the space for it, the actual move generated in - ms1_emit_save_fp (). */ - offset -= UNITS_PER_WORD; - stack_offset -= UNITS_PER_WORD; - } - - if (info.save_lr) - { - offset -= UNITS_PER_WORD; - stack_offset -= UNITS_PER_WORD; - ms1_emit_save_restore (direction, gen_rtx_REG (SImode, GPR_LINK), - gen_rtx_MEM (SImode, - gen_rtx_PLUS (SImode, base_reg, GEN_INT (offset))), - stack_offset); - } - - /* Save any needed call-saved regs. */ - for (regno = GPR_R0; regno <= GPR_LAST; regno++) - { - if ((reg_mask & (1 << regno)) != 0) - { - offset -= UNITS_PER_WORD; - stack_offset -= UNITS_PER_WORD; - ms1_emit_save_restore (direction, gen_rtx_REG (SImode, regno), - gen_rtx_MEM (SImode, - gen_rtx_PLUS (SImode, base_reg, GEN_INT (offset))), - stack_offset); - } - } -} - -/* Return true if FUNC is a function with the 'interrupt' attribute. */ -static bool -ms1_interrupt_function_p (tree func) -{ - tree a; - - if (TREE_CODE (func) != FUNCTION_DECL) - return false; - - a = lookup_attribute ("interrupt", DECL_ATTRIBUTES (func)); - return a != NULL_TREE; -} - -/* Generate prologue code. */ -void -ms1_expand_prologue (void) -{ - rtx size_rtx, insn; - unsigned int frame_size; - - if (ms1_interrupt_function_p (current_function_decl)) - { - interrupt_handler = 1; - if (cfun->machine) - cfun->machine->interrupt_handler = 1; - } - - ms1_compute_frame_size (get_frame_size ()); - - if (TARGET_DEBUG_STACK) - ms1_debug_stack (¤t_frame_info); - - /* Compute size of stack adjustment. */ - frame_size = current_frame_info.total_size; - - /* If offset doesn't fit in a 15-bit signed integer, - uses a scratch registers to get a smaller offset. */ - if (CONST_OK_FOR_LETTER_P(frame_size, 'O')) - size_rtx = GEN_INT (frame_size); - else - { - /* We do not have any scratch registers. */ - gcc_assert (!interrupt_handler); - - size_rtx = gen_rtx_REG (SImode, GPR_R9); - insn = emit_move_insn (size_rtx, GEN_INT (frame_size & 0xffff0000)); - insn = emit_insn (gen_iorsi3 (size_rtx, size_rtx, - GEN_INT (frame_size & 0x0000ffff))); - } - - /* Allocate stack for this frame. */ - /* Make stack adjustment and use scratch register if constant too - large to fit as immediate. */ - if (frame_size) - { - insn = emit_insn (gen_subsi3 (stack_pointer_rtx, - stack_pointer_rtx, - size_rtx)); - RTX_FRAME_RELATED_P (insn) = 1; - REG_NOTES (insn) - = gen_rtx_EXPR_LIST (REG_FRAME_RELATED_EXPR, - gen_rtx_SET (VOIDmode, - stack_pointer_rtx, - gen_rtx_MINUS (SImode, - stack_pointer_rtx, - GEN_INT (frame_size))), - REG_NOTES (insn)); - } - - /* Set R9 to point to old sp if required for access to register save area. */ - if ( current_frame_info.reg_size != 0 - && !CONST_OK_FOR_LETTER_P (frame_size, 'O')) - emit_insn (gen_addsi3 (size_rtx, size_rtx, stack_pointer_rtx)); - - /* Save the frame pointer. */ - ms1_emit_save_fp (FROM_PROCESSOR_TO_MEM, current_frame_info); - - /* Now put the frame pointer into the frame pointer register. */ - if (frame_pointer_needed) - { - insn = emit_move_insn (frame_pointer_rtx, stack_pointer_rtx); - RTX_FRAME_RELATED_P (insn) = 1; - } - - /* Save the registers. */ - ms1_emit_save_regs (FROM_PROCESSOR_TO_MEM, current_frame_info); - - /* If we are profiling, make sure no instructions are scheduled before - the call to mcount. */ - if (profile_flag) - emit_insn (gen_blockage ()); -} - -/* Implement EPILOGUE_USES. */ -int -ms1_epilogue_uses (int regno) -{ - if (cfun->machine && cfun->machine->interrupt_handler && reload_completed) - return 1; - return regno == GPR_LINK; -} - -/* Generate epilogue. EH_MODE is NORMAL_EPILOGUE when generating a - function epilogue, or EH_EPILOGUE when generating an EH - epilogue. */ -void -ms1_expand_epilogue (enum epilogue_type eh_mode) -{ - rtx size_rtx, insn; - unsigned frame_size; - - ms1_compute_frame_size (get_frame_size ()); - - if (TARGET_DEBUG_STACK) - ms1_debug_stack (& current_frame_info); - - /* Compute size of stack adjustment. */ - frame_size = current_frame_info.total_size; - - /* If offset doesn't fit in a 15-bit signed integer, - uses a scratch registers to get a smaller offset. */ - if (CONST_OK_FOR_LETTER_P(frame_size, 'O')) - size_rtx = GEN_INT (frame_size); - else - { - /* We do not have any scratch registers. */ - gcc_assert (!interrupt_handler); - - size_rtx = gen_rtx_REG (SImode, GPR_R9); - insn = emit_move_insn (size_rtx, GEN_INT (frame_size & 0xffff0000)); - insn = emit_insn (gen_iorsi3 (size_rtx, size_rtx, - GEN_INT (frame_size & 0x0000ffff))); - /* Set R9 to point to old sp if required for access to register - save area. */ - emit_insn (gen_addsi3 (size_rtx, size_rtx, stack_pointer_rtx)); - } - - /* Restore sp if there was some possible change to it. */ - if (frame_pointer_needed) - insn = emit_move_insn (stack_pointer_rtx, frame_pointer_rtx); - - /* Restore the registers. */ - ms1_emit_save_fp (FROM_MEM_TO_PROCESSOR, current_frame_info); - ms1_emit_save_regs (FROM_MEM_TO_PROCESSOR, current_frame_info); - - /* Make stack adjustment and use scratch register if constant too - large to fit as immediate. */ - if (frame_size) - { - if (CONST_OK_FOR_LETTER_P(frame_size, 'O')) - /* Can handle this with simple add. */ - insn = emit_insn (gen_addsi3 (stack_pointer_rtx, - stack_pointer_rtx, - size_rtx)); - else - /* Scratch reg R9 has the old sp value. */ - insn = emit_move_insn (stack_pointer_rtx, - gen_rtx_REG (SImode, GPR_R9)); - - REG_NOTES (insn) - = gen_rtx_EXPR_LIST (REG_FRAME_RELATED_EXPR, - gen_rtx_SET (VOIDmode, - stack_pointer_rtx, - gen_rtx_PLUS (SImode, - stack_pointer_rtx, - GEN_INT (frame_size))), - REG_NOTES (insn)); - } - - if (cfun->machine && cfun->machine->eh_stack_adjust != NULL_RTX) - /* Perform the additional bump for __throw. */ - emit_insn (gen_addsi3 (stack_pointer_rtx, - stack_pointer_rtx, - cfun->machine->eh_stack_adjust)); - - /* Generate the appropriate return. */ - if (eh_mode == EH_EPILOGUE) - { - emit_jump_insn (gen_eh_return_internal ()); - emit_barrier (); - } - else if (interrupt_handler) - emit_jump_insn (gen_return_interrupt_internal ()); - else - emit_jump_insn (gen_return_internal ()); - - /* Reset state info for each function. */ - interrupt_handler = 0; - current_frame_info = zero_frame_info; - if (cfun->machine) - cfun->machine->eh_stack_adjust = NULL_RTX; -} - - -/* Generate code for the "eh_return" pattern. */ -void -ms1_expand_eh_return (rtx * operands) -{ - if (GET_CODE (operands[0]) != REG - || REGNO (operands[0]) != EH_RETURN_STACKADJ_REGNO) - { - rtx sp = EH_RETURN_STACKADJ_RTX; - - emit_move_insn (sp, operands[0]); - operands[0] = sp; - } - - emit_insn (gen_eh_epilogue (operands[0])); -} - -/* Generate code for the "eh_epilogue" pattern. */ -void -ms1_emit_eh_epilogue (rtx * operands ATTRIBUTE_UNUSED) -{ - cfun->machine->eh_stack_adjust = EH_RETURN_STACKADJ_RTX; /* operands[0]; */ - ms1_expand_epilogue (EH_EPILOGUE); -} - -/* Handle an "interrupt" attribute. */ -static tree -ms1_handle_interrupt_attribute (tree * node, - tree name, - tree args ATTRIBUTE_UNUSED, - int flags ATTRIBUTE_UNUSED, - bool * no_add_attrs) -{ - if (TREE_CODE (*node) != FUNCTION_DECL) - { - warning (OPT_Wattributes, - "%qs attribute only applies to functions", - IDENTIFIER_POINTER (name)); - *no_add_attrs = true; - } - - return NULL_TREE; -} - -/* Table of machine attributes. */ -const struct attribute_spec ms1_attribute_table[] = -{ - /* name, min, max, decl?, type?, func?, handler */ - { "interrupt", 0, 0, false, false, false, ms1_handle_interrupt_attribute }, - { NULL, 0, 0, false, false, false, NULL } -}; - -/* Implement INITIAL_ELIMINATION_OFFSET. */ -int -ms1_initial_elimination_offset (int from, int to) -{ - ms1_compute_frame_size (get_frame_size ()); - - if (from == FRAME_POINTER_REGNUM && to == STACK_POINTER_REGNUM) - return 0; - - else if (from == ARG_POINTER_REGNUM && to == STACK_POINTER_REGNUM) - return current_frame_info.total_size; - - else if (from == ARG_POINTER_REGNUM && to == FRAME_POINTER_REGNUM) - return current_frame_info.total_size; - - else - gcc_unreachable (); -} - -/* Generate a compare for CODE. Return a brand-new rtx that - represents the result of the compare. */ - -static rtx -ms1_generate_compare (enum rtx_code code, rtx op0, rtx op1) -{ - rtx scratch0, scratch1, const_scratch; - - switch (code) - { - case GTU: - case LTU: - case GEU: - case LEU: - /* Need to adjust ranges for faking unsigned compares. */ - scratch0 = gen_reg_rtx (SImode); - scratch1 = gen_reg_rtx (SImode); - const_scratch = force_reg (SImode, GEN_INT(MS1_MIN_INT)); - emit_insn (gen_addsi3 (scratch0, const_scratch, op0)); - emit_insn (gen_addsi3 (scratch1, const_scratch, op1)); - break; - default: - scratch0 = op0; - scratch1 = op1; - break; - } - - /* Adjust compare operator to fake unsigned compares. */ - switch (code) - { - case GTU: - code = GT; break; - case LTU: - code = LT; break; - case GEU: - code = GE; break; - case LEU: - code = LE; break; - default: - /* do nothing */ - break; - } - - /* Generate the actual compare. */ - return gen_rtx_fmt_ee (code, VOIDmode, scratch0, scratch1); -} - -/* Emit a branch of kind CODE to location LOC. */ - -void -ms1_emit_cbranch (enum rtx_code code, rtx loc, rtx op0, rtx op1) -{ - rtx condition_rtx, loc_ref; - - if (! reg_or_0_operand (op0, SImode)) - op0 = copy_to_mode_reg (SImode, op0); - - if (! reg_or_0_operand (op1, SImode)) - op1 = copy_to_mode_reg (SImode, op1); - - condition_rtx = ms1_generate_compare (code, op0, op1); - loc_ref = gen_rtx_LABEL_REF (VOIDmode, loc); - emit_jump_insn (gen_rtx_SET (VOIDmode, pc_rtx, - gen_rtx_IF_THEN_ELSE (VOIDmode, condition_rtx, - loc_ref, pc_rtx))); -} - -/* Subfunction of the following function. Update the flags of any MEM - found in part of X. */ - -static void -ms1_set_memflags_1 (rtx x, int in_struct_p, int volatile_p) -{ - int i; - - switch (GET_CODE (x)) - { - case SEQUENCE: - case PARALLEL: - for (i = XVECLEN (x, 0) - 1; i >= 0; i--) - ms1_set_memflags_1 (XVECEXP (x, 0, i), in_struct_p, volatile_p); - break; - - case INSN: - ms1_set_memflags_1 (PATTERN (x), in_struct_p, volatile_p); - break; - - case SET: - ms1_set_memflags_1 (SET_DEST (x), in_struct_p, volatile_p); - ms1_set_memflags_1 (SET_SRC (x), in_struct_p, volatile_p); - break; - - case MEM: - MEM_IN_STRUCT_P (x) = in_struct_p; - MEM_VOLATILE_P (x) = volatile_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. */ - /* set_mem_alias_set (x, alias_set); */ - break; - - default: - break; - } -} - -/* Look for any MEMs in the current sequence of insns and set the - in-struct, unchanging, and volatile flags from the flags in REF. - If REF is not a MEM, don't do anything. */ - -void -ms1_set_memflags (rtx ref) -{ - rtx insn; - int in_struct_p, volatile_p; - - if (GET_CODE (ref) != MEM) - return; - - in_struct_p = MEM_IN_STRUCT_P (ref); - volatile_p = MEM_VOLATILE_P (ref); - - /* This is only called from ms1.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) - return; - - for (insn = get_insns (); insn; insn = NEXT_INSN (insn)) - ms1_set_memflags_1 (insn, in_struct_p, volatile_p); -} - -/* Implement SECONDARY_RELOAD_CLASS. */ -enum reg_class -ms1_secondary_reload_class (enum reg_class class ATTRIBUTE_UNUSED, - enum machine_mode mode, - rtx x) -{ - if ((mode == QImode && (!TARGET_BYTE_ACCESS)) || mode == HImode) - { - if (GET_CODE (x) == MEM - || (GET_CODE (x) == REG && true_regnum (x) == -1) - || (GET_CODE (x) == SUBREG - && (GET_CODE (SUBREG_REG (x)) == MEM - || (GET_CODE (SUBREG_REG (x)) == REG - && true_regnum (SUBREG_REG (x)) == -1)))) - return GENERAL_REGS; - } - - return NO_REGS; -} - -/* Handle FUNCTION_VALUE, FUNCTION_OUTGOING_VALUE, and LIBCALL_VALUE - macros. */ -rtx -ms1_function_value (tree valtype, enum machine_mode mode, tree func_decl ATTRIBUTE_UNUSED) -{ - if ((mode) == DImode || (mode) == DFmode) - return gen_rtx_MEM (mode, gen_rtx_REG (mode, RETURN_VALUE_REGNUM)); - - if (valtype) - mode = TYPE_MODE (valtype); - - return gen_rtx_REG (mode, RETURN_VALUE_REGNUM); -} - -/* Split a move into two smaller pieces. - MODE indicates the reduced mode. OPERANDS[0] is the original destination - OPERANDS[1] is the original src. The new destinations are - OPERANDS[2] and OPERANDS[4], while the new sources are OPERANDS[3] - and OPERANDS[5]. */ - -void -ms1_split_words (enum machine_mode nmode, - enum machine_mode omode, - rtx *operands) -{ - rtx dl,dh; /* src/dest pieces. */ - rtx sl,sh; - int move_high_first = 0; /* Assume no overlap. */ - - switch (GET_CODE (operands[0])) /* Dest. */ - { - case SUBREG: - case REG: - if ((GET_CODE (operands[1]) == REG - || GET_CODE (operands[1]) == SUBREG) - && true_regnum (operands[0]) <= true_regnum (operands[1])) - move_high_first = 1; - - if (GET_CODE (operands[0]) == SUBREG) - { - dl = gen_rtx_SUBREG (nmode, SUBREG_REG (operands[0]), - SUBREG_BYTE (operands[0]) + GET_MODE_SIZE (nmode)); - dh = gen_rtx_SUBREG (nmode, SUBREG_REG (operands[0]), SUBREG_BYTE (operands[0])); - } - else if (GET_CODE (operands[0]) == REG && ! IS_PSEUDO_P (operands[0])) - { - int r = REGNO (operands[0]); - dh = gen_rtx_REG (nmode, r); - dl = gen_rtx_REG (nmode, r + HARD_REGNO_NREGS (r, nmode)); - } - else - { - dh = gen_rtx_SUBREG (nmode, operands[0], 0); - dl = gen_rtx_SUBREG (nmode, operands[0], GET_MODE_SIZE (nmode)); - } - break; - - case MEM: - switch (GET_CODE (XEXP (operands[0], 0))) - { - case POST_INC: - case POST_DEC: - gcc_unreachable (); - default: - dl = operand_subword (operands[0], - GET_MODE_SIZE (nmode)/UNITS_PER_WORD, - 0, omode); - dh = operand_subword (operands[0], 0, 0, omode); - } - break; - default: - gcc_unreachable (); - } - - switch (GET_CODE (operands[1])) - { - case REG: - if (! IS_PSEUDO_P (operands[1])) - { - int r = REGNO (operands[1]); - - sh = gen_rtx_REG (nmode, r); - sl = gen_rtx_REG (nmode, r + HARD_REGNO_NREGS (r, nmode)); - } - else - { - sh = gen_rtx_SUBREG (nmode, operands[1], 0); - sl = gen_rtx_SUBREG (nmode, operands[1], GET_MODE_SIZE (nmode)); - } - break; - - case CONST_DOUBLE: - if (operands[1] == const0_rtx) - sh = sl = const0_rtx; - else - split_double (operands[1], & sh, & sl); - break; - - case CONST_INT: - if (operands[1] == const0_rtx) - sh = sl = const0_rtx; - else - { - int vl, vh; - - switch (nmode) - { - default: - gcc_unreachable (); - } - - sl = GEN_INT (vl); - sh = GEN_INT (vh); - } - break; - - case SUBREG: - sl = gen_rtx_SUBREG (nmode, - SUBREG_REG (operands[1]), - SUBREG_BYTE (operands[1]) + GET_MODE_SIZE (nmode)); - sh = gen_rtx_SUBREG (nmode, - SUBREG_REG (operands[1]), - SUBREG_BYTE (operands[1])); - break; - - case MEM: - switch (GET_CODE (XEXP (operands[1], 0))) - { - case POST_DEC: - case POST_INC: - gcc_unreachable (); - break; - default: - sl = operand_subword (operands[1], - GET_MODE_SIZE (nmode)/UNITS_PER_WORD, - 0, omode); - sh = operand_subword (operands[1], 0, 0, omode); - - /* Check if the DF load is going to clobber the register - used for the address, and if so make sure that is going - to be the second move. */ - if (GET_CODE (dl) == REG - && true_regnum (dl) - == true_regnum (XEXP (XEXP (sl, 0 ), 0))) - move_high_first = 1; - } - break; - default: - gcc_unreachable (); - } - - if (move_high_first) - { - operands[2] = dh; - operands[3] = sh; - operands[4] = dl; - operands[5] = sl; - } - else - { - operands[2] = dl; - operands[3] = sl; - operands[4] = dh; - operands[5] = sh; - } - return; -} - -/* Implement TARGET_MUST_PASS_IN_STACK hook. */ -static bool -ms1_pass_in_stack (enum machine_mode mode ATTRIBUTE_UNUSED, tree type) -{ - return (((type) != 0 - && (TREE_CODE (TYPE_SIZE (type)) != INTEGER_CST - || TREE_ADDRESSABLE (type)))); -} - - -/* Structures to hold branch information during reorg. */ -typedef struct branch_info -{ - rtx insn; /* The branch insn. */ - - struct branch_info *next; -} branch_info; - -typedef struct label_info -{ - rtx label; /* The label. */ - branch_info *branches; /* branches to this label. */ - struct label_info *next; -} label_info; - -/* Chain of labels found in current function, used during reorg. */ -static label_info *ms1_labels; - -/* If *X is a label, add INSN to the list of branches for that - label. */ - -static int -ms1_add_branches (rtx *x, void *insn) -{ - if (GET_CODE (*x) == LABEL_REF) - { - branch_info *branch = xmalloc (sizeof (*branch)); - rtx label = XEXP (*x, 0); - label_info *info; - - for (info = ms1_labels; info; info = info->next) - if (info->label == label) - break; - - if (!info) - { - info = xmalloc (sizeof (*info)); - info->next = ms1_labels; - ms1_labels = info; - - info->label = label; - info->branches = NULL; - } - - branch->next = info->branches; - info->branches = branch; - branch->insn = insn; - } - return 0; -} - -/* If BRANCH has a filled delay slot, check if INSN is dependent upon - it. If so, undo the delay slot fill. Returns the next insn, if - we patch out the branch. Returns the branch insn, if we cannot - patch out the branch (due to anti-dependency in the delay slot). - In that case, the caller must insert nops at the branch target. */ - -static rtx -ms1_check_delay_slot (rtx branch, rtx insn) -{ - rtx slot; - rtx tmp; - rtx p; - rtx jmp; - - gcc_assert (GET_CODE (PATTERN (branch)) == SEQUENCE); - if (INSN_DELETED_P (branch)) - return NULL_RTX; - slot = XVECEXP (PATTERN (branch), 0, 1); - - tmp = PATTERN (insn); - note_stores (PATTERN (slot), insn_dependent_p_1, &tmp); - if (tmp) - /* Not dependent. */ - return NULL_RTX; - - /* Undo the delay slot. */ - jmp = XVECEXP (PATTERN (branch), 0, 0); - - tmp = PATTERN (jmp); - note_stores (PATTERN (slot), insn_dependent_p_1, &tmp); - if (!tmp) - /* Anti dependent. */ - return branch; - - p = PREV_INSN (branch); - NEXT_INSN (p) = slot; - PREV_INSN (slot) = p; - NEXT_INSN (slot) = jmp; - PREV_INSN (jmp) = slot; - NEXT_INSN (jmp) = branch; - PREV_INSN (branch) = jmp; - XVECEXP (PATTERN (branch), 0, 0) = NULL_RTX; - XVECEXP (PATTERN (branch), 0, 1) = NULL_RTX; - delete_insn (branch); - return jmp; -} - -/* Insert nops to satisfy pipeline constraints. We only deal with ms2 - constraints here. Earlier CPUs are dealt with by inserting nops with - final_prescan (but that can lead to inferior code, and is - impractical with ms2's JAL hazard). - - ms2 dynamic constraints - 1) a load and a following use must be separated by one insn - 2) an insn and a following dependent call must be separated by two insns - - only arith insns are placed in delay slots so #1 cannot happen with - a load in a delay slot. #2 can happen with an arith insn in the - delay slot. */ - -static void -ms1_reorg_hazard (void) -{ - rtx insn, next; - - /* Find all the branches */ - for (insn = get_insns (); - insn; - insn = NEXT_INSN (insn)) - { - rtx jmp; - - if (!INSN_P (insn)) - continue; - - jmp = PATTERN (insn); - - if (GET_CODE (jmp) != SEQUENCE) - /* If it's not got a filled delay slot, then it can't - conflict. */ - continue; - - jmp = XVECEXP (jmp, 0, 0); - - if (recog_memoized (jmp) == CODE_FOR_tablejump) - for (jmp = XEXP (XEXP (XVECEXP (PATTERN (jmp), 0, 1), 0), 0); - !JUMP_TABLE_DATA_P (jmp); - jmp = NEXT_INSN (jmp)) - continue; - - for_each_rtx (&PATTERN (jmp), ms1_add_branches, insn); - } - - /* Now scan for dependencies. */ - for (insn = get_insns (); - insn && !INSN_P (insn); - insn = NEXT_INSN (insn)) - continue; - - for (; - insn; - insn = next) - { - rtx jmp, tmp; - enum attr_type attr; - - gcc_assert (INSN_P (insn) && !INSN_DELETED_P (insn)); - for (next = NEXT_INSN (insn); - next && !INSN_P (next); - next = NEXT_INSN (next)) - continue; - - jmp = insn; - if (GET_CODE (PATTERN (insn)) == SEQUENCE) - jmp = XVECEXP (PATTERN (insn), 0, 0); - - attr = recog_memoized (jmp) >= 0 ? get_attr_type (jmp) : TYPE_UNKNOWN; - - if (next && attr == TYPE_LOAD) - { - /* A load. See if NEXT is dependent, and if so insert a - nop. */ - - tmp = PATTERN (next); - if (GET_CODE (tmp) == SEQUENCE) - tmp = PATTERN (XVECEXP (tmp, 0, 0)); - note_stores (PATTERN (insn), insn_dependent_p_1, &tmp); - if (!tmp) - emit_insn_after (gen_nop (), insn); - } - - if (attr == TYPE_CALL) - { - /* A call. Make sure we're not dependent on either of the - previous two dynamic instructions. */ - int nops = 0; - int count; - rtx prev = insn; - rtx rescan = NULL_RTX; - - for (count = 2; count && !nops;) - { - int type; - - prev = PREV_INSN (prev); - if (!prev) - { - /* If we reach the start of the function, we must - presume the caller set the address in the delay - slot of the call instruction. */ - nops = count; - break; - } - - if (BARRIER_P (prev)) - break; - if (LABEL_P (prev)) - { - /* Look at branches to this label. */ - label_info *label; - branch_info *branch; - - for (label = ms1_labels; - label; - label = label->next) - if (label->label == prev) - { - for (branch = label->branches; - branch; - branch = branch->next) - { - tmp = ms1_check_delay_slot (branch->insn, jmp); - - if (tmp == branch->insn) - { - nops = count; - break; - } - - if (tmp && branch->insn == next) - rescan = tmp; - } - break; - } - continue; - } - if (!INSN_P (prev)) - continue; - - if (GET_CODE (PATTERN (prev)) == SEQUENCE) - { - /* Look at the delay slot. */ - tmp = ms1_check_delay_slot (prev, jmp); - if (tmp == prev) - nops = count; - break; - } - - type = (INSN_CODE (prev) >= 0 ? get_attr_type (prev) - : TYPE_COMPLEX); - if (type == TYPE_CALL || type == TYPE_BRANCH) - break; - - if (type == TYPE_LOAD - || type == TYPE_ARITH - || type == TYPE_COMPLEX) - { - tmp = PATTERN (jmp); - note_stores (PATTERN (prev), insn_dependent_p_1, &tmp); - if (!tmp) - { - nops = count; - break; - } - } - count -= INSN_CODE (prev) >= 0; - } - - if (rescan) - for (next = NEXT_INSN (rescan); - next && !INSN_P (next); - next = NEXT_INSN (next)) - continue; - while (nops--) - emit_insn_before (gen_nop (), insn); - } - } - - /* Free the data structures. */ - while (ms1_labels) - { - label_info *label = ms1_labels; - branch_info *branch, *next; - - ms1_labels = label->next; - for (branch = label->branches; branch; branch = next) - { - next = branch->next; - free (branch); - } - free (label); - } -} - -/* Fixup the looping instructions, do delayed branch scheduling, fixup - scheduling hazards. */ - -static void -ms1_machine_reorg (void) -{ - if (ms1_flag_delayed_branch) - dbr_schedule (get_insns (), dump_file); - - if (ms1_cpu == PROCESSOR_MS2) - ms1_reorg_hazard (); -} - -/* Initialize the GCC target structure. */ -const struct attribute_spec ms1_attribute_table[]; - -#undef TARGET_ATTRIBUTE_TABLE -#define TARGET_ATTRIBUTE_TABLE ms1_attribute_table -#undef TARGET_STRUCT_VALUE_RTX -#define TARGET_STRUCT_VALUE_RTX ms1_struct_value_rtx -#undef TARGET_PROMOTE_PROTOTYPES -#define TARGET_PROMOTE_PROTOTYPES hook_bool_tree_true -#undef TARGET_PASS_BY_REFERENCE -#define TARGET_PASS_BY_REFERENCE ms1_pass_by_reference -#undef TARGET_MUST_PASS_IN_STACK -#define TARGET_MUST_PASS_IN_STACK ms1_pass_in_stack -#undef TARGET_ARG_PARTIAL_BYTES -#define TARGET_ARG_PARTIAL_BYTES ms1_arg_partial_bytes -#undef TARGET_MACHINE_DEPENDENT_REORG -#define TARGET_MACHINE_DEPENDENT_REORG ms1_machine_reorg - -struct gcc_target targetm = TARGET_INITIALIZER; - -#include "gt-ms1.h" diff --git a/gcc/config/ms1/ms1.h b/gcc/config/ms1/ms1.h deleted file mode 100644 index aa01831ade4..00000000000 --- a/gcc/config/ms1/ms1.h +++ /dev/null @@ -1,873 +0,0 @@ -/* Target Definitions for MorphoRISC1 - Copyright (C) 2005 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, 51 Franklin Street, Fifth Floor, Boston, MA - 02110-1301, USA. */ - -extern struct rtx_def * ms1_ucmpsi3_libcall; - -enum processor_type -{ - PROCESSOR_MS1_64_001, - PROCESSOR_MS1_16_002, - PROCESSOR_MS1_16_003, - PROCESSOR_MS2 -}; - -enum epilogue_type -{ - EH_EPILOGUE, - NORMAL_EPILOGUE -}; - -extern enum processor_type ms1_cpu; - - -/* A C string constant that tells the GCC driver program options to pass to - the assembler. */ -#undef ASM_SPEC -#define ASM_SPEC "%{march=ms1-16-002: -march=ms1-16-002} %{march=ms1-16-003: -march=ms1-16-003} %{march=ms2: -march=ms2} %{!march=*: -march=ms1-16-002}" - -/* A string to pass to at the end of the command given to the linker. */ -#undef LIB_SPEC -#define LIB_SPEC "--start-group -lc -lsim --end-group \ -%{msim: ; \ -march=ms1-64-001:-T 64-001.ld%s; \ -march=MS1-64-001:-T 64-001.ld%s; \ -march=ms1-16-002:-T 16-002.ld%s; \ -march=MS1-16-002:-T 16-002.ld%s; \ -march=ms1-16-003:-T 16-003.ld%s; \ -march=MS1-16-003:-T 16-003.ld%s; \ -march=ms2:-T ms2.ld%s; \ -march=MS2:-T ms2.ld%s}" - -/* A string to pass at the very beginning of the command given to the - linker. */ -#undef STARTFILE_SPEC -#define STARTFILE_SPEC "%{msim:crt0.o%s;\ -march=ms1-64-001:%{!mno-crt0:crt0-64-001.o%s} startup-64-001.o%s; \ -march=MS1-64-001:%{!mno-crt0:crt0-64-001.o%s} startup-64-001.o%s; \ -march=ms1-16-002:%{!mno-crt0:crt0-16-002.o%s} startup-16-002.o%s; \ -march=MS1-16-002:%{!mno-crt0:crt0-16-002.o%s} startup-16-002.o%s; \ -march=ms1-16-003:%{!mno-crt0:crt0-16-003.o%s} startup-16-003.o%s; \ -march=MS1-16-003:%{!mno-crt0:crt0-16-003.o%s} startup-16-003.o%s; \ -march=ms2:%{!mno-crt0:crt0-ms2.o%s} startup-ms2.o%s; \ -march=MS2:%{!mno-crt0:crt0-ms2.o%s} startup-ms2.o%s} \ -crti.o%s crtbegin.o%s" - -/* A string to pass at the end of the command given to the linker. */ -#undef ENDFILE_SPEC -#define ENDFILE_SPEC "%{msim:exit.o%s; \ -march=ms1-64-001:exit-64-001.o%s; \ -march=MS1-64-001:exit-64-001.o%s; \ -march=ms1-16-002:exit-16-002.o%s; \ -march=MS1-16-002:exit-16-002.o%s; \ -march=ms1-16-003:exit-16-003.o%s; \ -march=MS1-16-003:exit-16-003.o%s; \ -march=ms2:exit-ms2.o%s; \ -march=MS2:exit-ms2.o%s} \ - crtend.o%s crtn.o%s" - -/* Run-time target specifications. */ - -#define TARGET_CPU_CPP_BUILTINS() \ - do \ - { \ - builtin_define_std ("ms1"); \ - builtin_assert ("machine=ms1"); \ - } \ - while (0) - -#define TARGET_MS1_64_001 (ms1_cpu == PROCESSOR_MS1_64_001) -#define TARGET_MS1_16_002 (ms1_cpu == PROCESSOR_MS1_16_002) -#define TARGET_MS1_16_003 (ms1_cpu == PROCESSOR_MS1_16_003) -#define TARGET_MS2 (ms1_cpu == PROCESSOR_MS2) - -#define TARGET_VERSION fprintf (stderr, " (ms1)"); - -#define OVERRIDE_OPTIONS ms1_override_options () - -#define CAN_DEBUG_WITHOUT_FP 1 - - -/* Storage Layout. */ - -#define BITS_BIG_ENDIAN 0 - -#define BYTES_BIG_ENDIAN 1 - -#define WORDS_BIG_ENDIAN 1 - -#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 to the minimum alignment enforced by hardware for - the stack pointer on this machine. The definition is a C - expression for the desired alignment (measured in bits). This - value is used as a default if PREFERRED_STACK_BOUNDARY is not - defined. On most machines, this should be the same as - PARM_BOUNDARY. */ -#define STACK_BOUNDARY 32 - -/* Alignment required for a function entry point, in bits. */ -#define FUNCTION_BOUNDARY 32 - -/* Biggest alignment that any data type can require on this machine, - in bits. */ -#define BIGGEST_ALIGNMENT 32 - -/* If defined, a C expression to compute the alignment for a variable - in the static store. 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. */ -#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)) - -/* Number of bits which any structure or union's size must be a multiple of. - Each structure or union's size is rounded up to a multiple of this. - - If you do not define this macro, the default is the same as `BITS_PER_UNIT'. */ -#define STRUCTURE_SIZE_BOUNDARY 32 - -/* 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. */ -#define PCC_BITFIELD_TYPE_MATTERS 1 - -/* Layout of Source Language Data Types. */ - -#define INT_TYPE_SIZE 32 - -#define SHORT_TYPE_SIZE 16 - -#define LONG_TYPE_SIZE 32 - -#define LONG_LONG_TYPE_SIZE 64 - -#define CHAR_TYPE_SIZE 8 - -#define FLOAT_TYPE_SIZE 32 - -#define DOUBLE_TYPE_SIZE 64 - -#define LONG_DOUBLE_TYPE_SIZE 64 - -#define DEFAULT_SIGNED_CHAR 1 - -/* Register Basics. */ - -/* General purpose registers. */ -#define GPR_FIRST 0 /* First gpr */ -#define GPR_LAST 15 /* Last possible gpr */ - -#define GPR_R0 0 /* Always 0 */ -#define GPR_R7 7 /* Used as a scratch register */ -#define GPR_R8 8 /* Used as a scratch register */ -#define GPR_R9 9 /* Used as a scratch register */ -#define GPR_R10 10 /* Used as a scratch register */ -#define GPR_R11 11 /* Used as a scratch register */ -#define GPR_FP 12 /* Frame pointer */ -#define GPR_SP 13 /* Stack pointer */ -#define GPR_LINK 14 /* Saved return address as - seen by the caller */ -#define GPR_INTERRUPT_LINK 15 /* hold return addres for interrupts */ - -/* Argument register that is eliminated in favor of the frame and/or stack - pointer. Also add register to point to where the return address is - stored. */ -#define SPECIAL_REG_FIRST (GPR_LAST + 1) -#define SPECIAL_REG_LAST (SPECIAL_REG_FIRST) -#define ARG_POINTER_REGNUM (SPECIAL_REG_FIRST + 0) -#define SPECIAL_REG_P(R) ((R) == SPECIAL_REG_FIRST) - -/* The first/last register that can contain the arguments to a function. */ -#define FIRST_ARG_REGNUM 1 -#define LAST_ARG_REGNUM 4 - -/* The register used to hold functions return value */ -#define RETVAL_REGNUM 11 - -#define FIRST_PSEUDO_REGISTER (GPR_FIRST + 17) - -#define IS_PSEUDO_P(R) (REGNO (R) >= FIRST_PSEUDO_REGISTER) - -/* R0 always has the value 0 - R10 static link - R12 FP pointer to active frame - R13 SP pointer to top of stack - R14 RA return address - R15 IRA interrupt return address. */ -#define FIXED_REGISTERS { 1, 0, 0, 0, 0, 0, 0, 0, \ - 0, 0, 0, 0, 1, 1, 1, 1, \ - 1 \ - } - -/* Like `FIXED_REGISTERS' but has 1 for each register that is clobbered (in - general) by function calls as well as for fixed registers. This macro - therefore identifies the registers that are not available for general - allocation of values that must live across function calls. */ -#define CALL_USED_REGISTERS { 1, 1, 1, 1, 1, 0, 0, 1, \ - 1, 1, 1, 1, 1, 1, 1, 1, \ - 1 \ - } - - -/* How Values Fit in Registers. */ - -#define HARD_REGNO_NREGS(REGNO, MODE) \ - ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD) - -#define HARD_REGNO_MODE_OK(REGNO, MODE) 1 - -/* A C expression that is nonzero if a value of mode MODE1 is - accessible in mode MODE2 without copying. */ -#define MODES_TIEABLE_P(MODE1, MODE2) 1 - -/* Register Classes. */ - -enum reg_class -{ - NO_REGS, - ALL_REGS, - LIM_REG_CLASSES -}; - -#define GENERAL_REGS ALL_REGS - -#define N_REG_CLASSES ((int) LIM_REG_CLASSES) - -#define REG_CLASS_NAMES {"NO_REGS", "ALL_REGS" } - -#define REG_CLASS_CONTENTS \ - { \ - { 0x0, 0x0 }, \ - { (((1 << (GPR_LAST + 1)) - 1) & ~(1 << GPR_FIRST)), 0x0 }, \ - } - -/* A C expression whose value is a register class containing hard register - REGNO. In general there is more than one such class; choose a class which - is "minimal", meaning that no smaller class also contains the register. */ -#define REGNO_REG_CLASS(REGNO) GENERAL_REGS - -#define BASE_REG_CLASS GENERAL_REGS - -#define INDEX_REG_CLASS NO_REGS - -#define REG_CLASS_FROM_LETTER(CHAR) NO_REGS - -#define REGNO_OK_FOR_BASE_P(NUM) 1 - -#define REGNO_OK_FOR_INDEX_P(NUM) 1 - -/* 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 -*/ -#define PREFERRED_RELOAD_CLASS(X, CLASS) (CLASS) - -#define SECONDARY_RELOAD_CLASS(CLASS,MODE,X) \ - ms1_secondary_reload_class((CLASS), (MODE), (X)) - -/* A C expression for the maximum number of consecutive registers of - class CLASS needed to hold a value of mode MODE. */ -#define CLASS_MAX_NREGS(CLASS, MODE) \ - ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD) - -/* For MorphoRISC1: - - `I' is used for the range of constants an arithmetic insn can - actually contain (16 bits signed integers). - - `J' is used for the range which is just zero (ie, $r0). - - `K' is used for the range of constants a logical insn can actually - contain (16 bit zero-extended integers). - - `L' is used for the range of constants that be loaded with lui - (ie, the bottom 16 bits are zero). - - `M' is used for the range of constants that take two words to load - (ie, not matched by `I', `K', and `L'). - - `N' is used for negative 16 bit constants other than -65536. - - `O' is a 15 bit signed integer. - - `P' is used for positive 16 bit constants. */ - -#define SMALL_INT(X) ((unsigned HOST_WIDE_INT) (INTVAL (X) + 0x8000) < 0x10000) -#define SMALL_INT_UNSIGNED(X) ((unsigned HOST_WIDE_INT) (INTVAL (X)) < 0x10000) - -/* A C expression that defines the machine-dependent operand - constraint letters 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' ? ((unsigned HOST_WIDE_INT) ((VALUE) + 0x8000) < 0x10000) \ - : (C) == 'J' ? ((VALUE) == 0) \ - : (C) == 'K' ? ((unsigned HOST_WIDE_INT) (VALUE) < 0x10000) \ - : (C) == 'L' ? (((VALUE) & 0x0000ffff) == 0 \ - && (((VALUE) & ~2147483647) == 0 \ - || ((VALUE) & ~2147483647) == ~2147483647)) \ - : (C) == 'M' ? ((((VALUE) & ~0x0000ffff) != 0) \ - && (((VALUE) & ~0x0000ffff) != ~0x0000ffff) \ - && (((VALUE) & 0x0000ffff) != 0 \ - || (((VALUE) & ~2147483647) != 0 \ - && ((VALUE) & ~2147483647) != ~2147483647))) \ - : (C) == 'N' ? ((unsigned HOST_WIDE_INT) ((VALUE) + 0xffff) < 0xffff) \ - : (C) == 'O' ? ((unsigned HOST_WIDE_INT) ((VALUE) + 0x4000) < 0x8000) \ - : (C) == 'P' ? ((VALUE) != 0 && (((VALUE) & ~0x0000ffff) == 0)) \ - : 0) - -/* A C expression that defines the machine-dependent operand constraint letters - (`G', `H') that specify particular ranges of `const_double' values. */ -#define CONST_DOUBLE_OK_FOR_LETTER_P(VALUE, C) 0 - -/* Most negative value represent on ms1 */ -#define MS1_MIN_INT 0x80000000 - -/* Basic Stack Layout. */ - -enum save_direction -{ - FROM_PROCESSOR_TO_MEM, - FROM_MEM_TO_PROCESSOR -}; - -/* Tell prologue and epilogue if register REGNO should be saved / restored. - The return address and frame pointer are treated separately. - Don't consider them here. */ -#define MUST_SAVE_REGISTER(regno) \ - ( (regno) != GPR_LINK \ - && (regno) != GPR_FP \ - && (regno) != GPR_SP \ - && (regno) != GPR_R0 \ - && (( regs_ever_live [regno] && ! call_used_regs [regno] ) \ - /* Save ira register in an interrupt handler. */ \ - || (interrupt_handler && (regno) == GPR_INTERRUPT_LINK) \ - /* Save any register used in an interrupt handler. */ \ - || (interrupt_handler && regs_ever_live [regno]) \ - /* Save call clobbered registers in non-leaf interrupt \ - handlers. */ \ - || (interrupt_handler && call_used_regs[regno] \ - && !current_function_is_leaf) \ - ||(current_function_calls_eh_return \ - && (regno == GPR_R7 || regno == GPR_R8)) \ - ) \ - ) - -#define STACK_GROWS_DOWNWARD 1 - -/* 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 current_function_outgoing_args_size - -/* 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 - -#define RETURN_ADDR_RTX(COUNT, FRAMEADDR) \ - ms1_return_addr_rtx (COUNT) - -/* 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, GPR_LINK) - -/* A C expression whose value is an integer giving the offset, in bytes, from - the value of the stack pointer register to the top of the stack frame at the - beginning of any function, before the prologue. The top of the frame is - defined to be the value of the stack pointer in the previous frame, just - before the call instruction. - - You only need to define this macro if you want to support call frame - debugging information like that provided by DWARF 2. */ -#define INCOMING_FRAME_SP_OFFSET 0 - -#define STACK_POINTER_REGNUM GPR_SP - -#define FRAME_POINTER_REGNUM GPR_FP - -/* The register number of the arg pointer register, which is used to - access the function's argument list. */ -#define ARG_POINTER_REGNUM (SPECIAL_REG_FIRST + 0) - -/* Register numbers used for passing a function's static chain pointer. */ -#define STATIC_CHAIN_REGNUM 10 - -/* A C expression which is nonzero if a function must have and use a frame - pointer. */ -#define FRAME_POINTER_REQUIRED 0 - -/* Structure to be filled in by compute_frame_size with register - save masks, and offsets for the current function. */ - -struct ms1_frame_info -{ - unsigned int total_size; /* # Bytes that the entire frame takes up. */ - unsigned int pretend_size; /* # Bytes we push and pretend caller did. */ - unsigned int args_size; /* # Bytes that outgoing arguments take up. */ - unsigned int extra_size; - unsigned int reg_size; /* # Bytes needed to store regs. */ - unsigned int var_size; /* # Bytes that variables take up. */ - unsigned int frame_size; /* # Bytes in current frame. */ - unsigned int reg_mask; /* Mask of saved registers. */ - unsigned int save_fp; /* Nonzero if frame pointer must be saved. */ - unsigned int save_lr; /* Nonzero if return pointer must be saved. */ - int initialized; /* Nonzero if frame size already calculated. */ -}; - -extern struct ms1_frame_info current_frame_info; - -/* If defined, this macro specifies a table of register pairs used to eliminate - unneeded registers that point into the stack frame. */ -#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 non-zero if the compiler is allowed to try to - replace register number FROM with register number TO. */ -#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) = ms1_initial_elimination_offset (FROM, TO) - -/* If defined, the maximum amount of space required for outgoing - arguments will be computed and placed into the variable - `current_function_outgoing_args_size'. */ -#define ACCUMULATE_OUTGOING_ARGS 1 - -/* Define this if it is the responsibility of the caller to - allocate the area reserved for arguments passed in registers. */ -#define OUTGOING_REG_PARM_STACK_SPACE - -/* The number of register assigned to holding function arguments. */ -#define MS1_NUM_ARG_REGS 4 - -/* Define this if it is the responsibility of the caller to allocate - the area reserved for arguments passed in registers. */ -#define REG_PARM_STACK_SPACE(FNDECL) (MS1_NUM_ARG_REGS * UNITS_PER_WORD) - -/* Define this macro if `REG_PARM_STACK_SPACE' is defined, but the stack - parameters don't skip the area specified by it. */ -#define STACK_PARMS_IN_REG_PARM_AREA - -/* 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. */ -#define RETURN_POPS_ARGS(FUNDECL, FUNTYPE, STACK_SIZE) 0 - -#define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \ - ms1_function_arg (& (CUM), (MODE), (TYPE), (NAMED), FALSE) - -#define CUMULATIVE_ARGS int - -#define INIT_CUMULATIVE_ARGS(CUM, FNTYPE, LIBNAME, FNDECL, N_NAMED_ARGS) \ - ms1_init_cumulative_args (& (CUM), FNTYPE, LIBNAME, FNDECL, FALSE) - -#define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED) \ - ms1_function_arg_advance (&CUM, MODE, TYPE, NAMED) - -#define FUNCTION_ARG_BOUNDARY(MODE, TYPE) \ - ms1_function_arg_boundary (MODE, TYPE) - -#define FUNCTION_ARG_REGNO_P(REGNO) \ - ((REGNO) >= FIRST_ARG_REGNUM && ((REGNO) <= LAST_ARG_REGNUM)) - -#define RETURN_VALUE_REGNUM RETVAL_REGNUM - -#define FUNCTION_VALUE(VALTYPE, FUNC) \ - ms1_function_value (VALTYPE, TYPE_MODE(VALTYPE), FUNC) - -#define LIBCALL_VALUE(MODE) \ - ms1_function_value (NULL_TREE, MODE, NULL_TREE) - -#define FUNCTION_VALUE_REGNO_P(REGNO) ((REGNO) == RETURN_VALUE_REGNUM) - -/* A C expression which can inhibit the returning of certain function - values in registers, based on the type of value. */ -#define RETURN_IN_MEMORY(TYPE) (int_size_in_bytes (TYPE) > UNITS_PER_WORD) - -/* Define this macro to be 1 if all structure and union return values must be - in memory. */ -#define DEFAULT_PCC_STRUCT_RETURN 0 - -/* 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. */ -#define EXIT_IGNORE_STACK 1 - -#define EPILOGUE_USES(REGNO) ms1_epilogue_uses(REGNO) - -/* Define this macro if the function epilogue contains delay slots to which - instructions from the rest of the function can be "moved". */ -#define DELAY_SLOTS_FOR_EPILOGUE 1 - -/* A C expression that returns 1 if INSN can be placed in delay slot number N - of the epilogue. */ -#define ELIGIBLE_FOR_EPILOGUE_DELAY(INSN, N) 0 - -#define FUNCTION_PROFILER(FILE, LABELNO) gcc_unreachable () - -#define EXPAND_BUILTIN_VA_START(VALIST, NEXTARG) \ - ms1_va_start (VALIST, NEXTARG) - -/* Trampolines are not implemented. */ -#define TRAMPOLINE_SIZE 0 - -#define INITIALIZE_TRAMPOLINE(ADDR, FNADDR, STATIC_CHAIN) - -/* ?? What is this -- aldyh ?? */ -#define UCMPSI3_LIBCALL "__ucmpsi3" - -/* Addressing Modes. */ - -/* A C expression that is 1 if the RTX X is a constant which is a valid - address. */ -#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 1 - -#ifdef REG_OK_STRICT -#define GO_IF_LEGITIMATE_ADDRESS(MODE, X, ADDR) \ -{ \ - if (ms1_legitimate_address_p (MODE, X, 1)) \ - goto ADDR; \ -} -#else -#define GO_IF_LEGITIMATE_ADDRESS(MODE, X, ADDR) \ -{ \ - if (ms1_legitimate_address_p (MODE, X, 0)) \ - goto ADDR; \ -} -#endif - -#ifdef REG_OK_STRICT -#define REG_OK_FOR_BASE_P(X) ms1_reg_ok_for_base_p (X, 1) -#else -#define REG_OK_FOR_BASE_P(X) ms1_reg_ok_for_base_p (X, 0) -#endif - -#define REG_OK_FOR_INDEX_P(X) REG_OK_FOR_BASE_P (X) - -#define LEGITIMIZE_ADDRESS(X, OLDX, MODE, WIN) {} - -#define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR, LABEL) - -#define LEGITIMATE_CONSTANT_P(X) 1 - -/* A C expression for the cost of moving data of mode M between a register and - memory. A value of 2 is the default; this cost is relative to those in - `REGISTER_MOVE_COST'. - - If moving between registers and memory is more expensive than between two - registers, you should define this macro to express the relative cost. */ -#define MEMORY_MOVE_COST(M,C,I) 10 - -/* 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. */ -#define SLOW_BYTE_ACCESS 1 - -#define SLOW_UNALIGNED_ACCESS(MODE, ALIGN) 1 - -#define TEXT_SECTION_ASM_OP ".text" - -#define DATA_SECTION_ASM_OP ".data" - -#define BSS_SECTION_ASM_OP "\t.section\t.bss" - -/* 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" - -/* This is how to output an assembler line defining a `char' constant. */ -#define ASM_OUTPUT_CHAR(FILE, VALUE) \ - do \ - { \ - fprintf (FILE, "\t.byte\t"); \ - output_addr_const (FILE, (VALUE)); \ - fprintf (FILE, "\n"); \ - } \ - while (0) - -/* This is how to output an assembler line defining a `short' constant. */ -#define ASM_OUTPUT_SHORT(FILE, VALUE) \ - do \ - { \ - fprintf (FILE, "\t.hword\t"); \ - output_addr_const (FILE, (VALUE)); \ - fprintf (FILE, "\n"); \ - } \ - while (0) - -/* This is how to output an assembler line defining an `int' constant. - We also handle symbol output here. */ -#define ASM_OUTPUT_INT(FILE, VALUE) \ - do \ - { \ - fprintf (FILE, "\t.word\t"); \ - output_addr_const (FILE, (VALUE)); \ - fprintf (FILE, "\n"); \ - } \ - while (0) - -/* A C statement to output to the stdio stream STREAM an assembler instruction - to assemble a single byte containing the number VALUE. - - This declaration must be present. */ -#define ASM_OUTPUT_BYTE(STREAM, VALUE) \ - fprintf (STREAM, "\t%s\t0x%x\n", ASM_BYTE_OP, (VALUE)) - -/* Globalizing directive for a label. */ -#define GLOBAL_ASM_OP "\t.globl " - -#define REGISTER_NAMES \ -{ "R0", "R1", "R2", "R3", "R4", "R5", "R6", "R7", \ - "R8", "R9", "R10", "R11", "R12", "R13", "R14", "R15", \ - "ap" } - -/* If defined, a C initializer for an array of structures containing a name and - a register number. This macro defines additional names for hard registers, - thus allowing the `asm' option in declarations to refer to registers using - alternate names. */ -#define ADDITIONAL_REGISTER_NAMES \ -{ { "FP", 12}, {"SP", 13}, {"RA", 14}, {"IRA", 15} } - -/* 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. */ -#define ASM_OUTPUT_OPCODE(STREAM, PTR) \ - (PTR) = ms1_asm_output_opcode (STREAM, PTR) - -#define FINAL_PRESCAN_INSN(INSN, OPVEC, NOPERANDS) \ - ms1_final_prescan_insn (INSN, OPVEC, NOPERANDS) - -#define PRINT_OPERAND(STREAM, X, CODE) ms1_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. */ -/* #: Print nop for delay slot. */ -#define PRINT_OPERAND_PUNCT_VALID_P(CODE) ((CODE) == '#') - -#define PRINT_OPERAND_ADDRESS(STREAM, X) ms1_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. */ -#define REGISTER_PREFIX "%" -#define LOCAL_LABEL_PREFIX "." -#define USER_LABEL_PREFIX "" -#define IMMEDIATE_PREFIX "" - -/* 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. */ -#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'. */ -#define ASM_OUTPUT_ADDR_VEC_ELT(STREAM, VALUE) \ -fprintf (STREAM, "\t.word .L%d\n", VALUE) - -#define DWARF_FRAME_RETURN_COLUMN DWARF_FRAME_REGNUM (GPR_LINK) - -#define EH_RETURN_DATA_REGNO(N) \ - ((N) == 0 ? GPR_R7 : (N) == 1 ? GPR_R8 : INVALID_REGNUM) - -#define EH_RETURN_STACKADJ_REGNO GPR_R11 -#define EH_RETURN_STACKADJ_RTX \ - gen_rtx_REG (SImode, EH_RETURN_STACKADJ_REGNO) -#define EH_RETURN_HANDLER_REGNO GPR_R10 -#define EH_RETURN_HANDLER_RTX \ - gen_rtx_REG (SImode, EH_RETURN_HANDLER_REGNO) - -#define ASM_OUTPUT_ALIGN(STREAM, POWER) \ - fprintf ((STREAM), "\t.p2align %d\n", (POWER)) - -#define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG - -#ifndef DWARF2_DEBUGGING_INFO -#define DWARF2_DEBUGGING_INFO -#endif - -/* Define this macro if GCC should produce dwarf version 2-style - line numbers. This usually requires extending the assembler to - support them, and #defining DWARF2_LINE_MIN_INSN_LENGTH in the - assembler configuration header files. */ -#define DWARF2_ASM_LINE_DEBUG_INFO 1 - -/* 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 - -/* The maximum number of bytes that a single instruction can move quickly from - memory to memory. */ -#define MOVE_MAX 4 - -/* 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 - -#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 HANDLE_SYSV_PRAGMA 1 - -/* Indicate how many instructions can be issued at the same time. */ -#define ISSUE_RATE 1 - -/* Define the information needed to generate branch and scc insns. This is - stored from the compare operation. Note that we can't use "rtx" here - since it hasn't been defined! */ - -extern struct rtx_def * ms1_compare_op0; -extern struct rtx_def * ms1_compare_op1; - diff --git a/gcc/config/ms1/ms1.md b/gcc/config/ms1/ms1.md deleted file mode 100644 index 1d5ff5266f3..00000000000 --- a/gcc/config/ms1/ms1.md +++ /dev/null @@ -1,1466 +0,0 @@ -;; Machine description for MorphoRISC1 -;; Copyright (C) 2005 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, 51 Franklin Street, Fifth Floor, Boston, MA -;; 02110-1301, USA. - -;; UNSPECs -(define_constants - [ - (UNSPEC_BLOCKAGE 0) - (UNSPEC_EI 1) - (UNSPEC_DI 2) - ]) - -;; Attributes -(define_attr "type" "branch,call,load,store,io,arith,complex,unknown" - (const_string "unknown") ) - -;; 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)) - - -;; DFA scheduler. -(define_automaton "other") -(define_cpu_unit "decode_unit" "other") -(define_cpu_unit "memory_unit" "other") -(define_cpu_unit "branch_unit" "other") - -(define_insn_reservation "mem_access" 2 - (ior (eq_attr "type" "load") (eq_attr "type" "store")) - "decode_unit+memory_unit*2") - -(define_insn_reservation "io_access" 2 - (eq_attr "type" "io") - "decode_unit+memory_unit*2") - -(define_insn_reservation "branch_access" 2 - (ior (eq_attr "type" "branch") - (eq_attr "type" "call")) - "decode_unit+branch_unit*2") - -(define_insn_reservation "arith_access" 1 - (eq_attr "type" "arith") - "decode_unit") - -(define_bypass 2 "arith_access" "branch_access") -(define_bypass 3 "mem_access" "branch_access") -(define_bypass 3 "io_access" "branch_access") - - -;; Delay Slots - -;; The ms1 does not allow branches in the delay slot. -;; The ms1 does not allow back to back memory or io instruction. -;; The compiler does not know what the type of instruction is at -;; the destination of the branch. Thus, only type that will be acceptable -;; (safe) is the arith type. - -(define_delay (ior (eq_attr "type" "branch") - (eq_attr "type" "call")) - [(eq_attr "type" "arith") (nil) (nil)]) - - -(define_insn "decrement_and_branch_until_zero" - [(set (pc) - (if_then_else - (ne (match_operand:SI 0 "nonimmediate_operand" "+r,*m") - (const_int 0)) - (label_ref (match_operand 1 "" "")) - (pc))) - (set (match_dup 0) - (plus:SI (match_dup 0) - (const_int -1))) - (clobber (match_scratch:SI 2 "=X,r"))] - "TARGET_MS1_16_003 || TARGET_MS2" - "@ - dbnz\t%0, %l1%# - #" - [(set_attr "length" "4,16")] -) - -;; Same as above, but without the clobber. The peephole below will -;; match this pattern. -(define_insn "*decrement_and_branch_until_zero_no_clobber" - [(set (pc) - (if_then_else - (ne (match_operand:SI 0 "register_operand" "+r") - (const_int 0)) - (label_ref (match_operand 1 "" "")) - (pc))) - (set (match_dup 0) - (plus:SI (match_dup 0) - (const_int -1)))] - "TARGET_MS1_16_003 || TARGET_MS2" - "dbnz\t%0, %l1%#" - [(set_attr "length" "4") - (set_attr "type" "branch")] -) - -;; Split the above to handle the case where operand 0 is in memory -;; (a register that couldn't get a hard register). -(define_split - [(set (pc) - (if_then_else - (ne (match_operand:SI 0 "memory_operand" "") - (const_int 0)) - (label_ref (match_operand 1 "" "")) - (pc))) - (set (match_dup 0) - (plus:SI (match_dup 0) - (const_int -1))) - (clobber (match_scratch:SI 2 ""))] - "TARGET_MS1_16_003 || TARGET_MS2" - [(set (match_dup 2) (match_dup 0)) - (set (match_dup 2) (plus:SI (match_dup 2) (const_int -1))) - (set (match_dup 0) (match_dup 2)) - (set (pc) - (if_then_else - (ne (match_dup 2) - (const_int 0)) - (label_ref (match_dup 1)) - (pc)))] - "") - -;; This peephole is defined in the vain hope that it might actually trigger one -;; day, although I have yet to find a test case that matches it. The normal -;; problem is that GCC likes to move the loading of the constant value -1 out -;; of the loop, so it is not here to be matched. - -(define_peephole2 - [(set (match_operand:SI 0 "register_operand" "") - (plus:SI (match_dup 0) (const_int -1))) - (set (match_operand:SI 1 "register_operand" "") - (const_int -1)) - (set (pc) (if_then_else - (ne (match_dup 0) (match_dup 1)) - (label_ref (match_operand 2 "" "")) - (pc))) - ] - "TARGET_MS1_16_003 || TARGET_MS2" - [(parallel [(set (pc) - (if_then_else - (ne (match_dup 0) (const_int 0)) - (label_ref (match_dup 2)) - (pc))) - (set (match_dup 0) - (plus:SI (match_dup 0) (const_int -1))) - ]) - ] - "" -) - -;; Moves - -(define_expand "loadqi" - [ - ;; compute shift - (set (match_operand:SI 2 "register_operand" "") - (and:SI (match_dup 1) (const_int 3))) - (set (match_dup 2) (xor:SI (match_dup 2) (const_int 3))) - (set (match_dup 2 ) (ashift:SI (match_dup 2) (const_int 3))) - - ;; get word that contains byte - (set (match_operand:SI 0 "register_operand" "") - (mem:SI (and:SI (match_operand:SI 1 "register_operand" "") - (const_int -3)))) - - ;; align byte - (set (match_dup 0) (ashiftrt:SI (match_dup 0) (match_dup 2))) - ] - "" - "") - - -;; storeqi -;; operand 0 byte value to store -;; operand 1 address -;; operand 2 temp, word containing byte -;; operand 3 temp, shift count -;; operand 4 temp, mask, aligned and masked byte -;; operand 5 (unused) -(define_expand "storeqi" - [ - ;; compute shift - (set (match_operand:SI 3 "register_operand" "") - (and:SI (match_operand:SI 1 "register_operand" "") (const_int 3))) - (set (match_dup 3) (xor:SI (match_dup 3) (const_int 3))) - (set (match_dup 3) (ashift:SI (match_dup 3) (const_int 3))) - - ;; get word that contains byte - (set (match_operand:SI 2 "register_operand" "") - (mem:SI (and:SI (match_dup 1) (const_int -3)))) - - ;; generate mask - (set (match_operand:SI 4 "register_operand" "") (const_int 255)) - (set (match_dup 4) (ashift:SI (match_dup 4) (match_dup 3))) - (set (match_dup 4) (not:SI (match_dup 4))) - - ;; clear appropriate bits - (set (match_dup 2) (and:SI (match_dup 2) (match_dup 4))) - - ;; align byte - (set (match_dup 4) - (and:SI (match_operand:SI 0 "register_operand" "") (const_int 255))) - (set (match_dup 4) (ashift:SI (match_dup 4) (match_dup 3))) - - ;; combine - (set (match_dup 2) (ior:SI (match_dup 4) (match_dup 2))) - ;; store updated word - (set (mem:SI (and:SI (match_dup 1) (const_int -3))) (match_dup 2)) - ] - "" - "") - - -(define_expand "movqi" - [(set (match_operand:QI 0 "general_operand" "") - (match_operand:QI 1 "general_operand" ""))] - "" - " -{ - if (!reload_in_progress - && !reload_completed - && GET_CODE (operands[0]) == MEM - && GET_CODE (operands[1]) == MEM) - operands[1] = copy_to_mode_reg (QImode, operands[1]); - - if ( (! TARGET_BYTE_ACCESS) && GET_CODE (operands[0]) == MEM) - { - rtx scratch1 = gen_reg_rtx (SImode); - rtx scratch2 = gen_reg_rtx (SImode); - rtx scratch3 = gen_reg_rtx (SImode); - rtx data = operands[1]; - rtx address = XEXP (operands[0], 0); - rtx seq; - - if ( GET_CODE (data) != REG ) - data = copy_to_mode_reg (QImode, data); - - if ( GET_CODE (address) != REG ) - address = copy_to_mode_reg (SImode, address); - - start_sequence (); - emit_insn (gen_storeqi (gen_lowpart (SImode, data), address, - scratch1, scratch2, scratch3)); - ms1_set_memflags (operands[0]); - seq = get_insns (); - end_sequence (); - emit_insn (seq); - DONE; - } - - if ( (! TARGET_BYTE_ACCESS) && GET_CODE (operands[1]) == MEM) - { - rtx scratch1 = gen_reg_rtx (SImode); - rtx data = operands[0]; - rtx address = XEXP (operands[1], 0); - rtx seq; - - if ( GET_CODE (address) != REG ) - address = copy_to_mode_reg (SImode, address); - - start_sequence (); - emit_insn (gen_loadqi (gen_lowpart (SImode, data), address, scratch1)); - ms1_set_memflags (operands[1]); - seq = get_insns (); - end_sequence (); - emit_insn (seq); - DONE; - } - - /* If the load is a pseudo register in a stack slot, some simplification - can be made because the loads are aligned */ - if ( (! TARGET_BYTE_ACCESS) - && (reload_in_progress && GET_CODE (operands[1]) == SUBREG - && GET_CODE (SUBREG_REG (operands[1])) == REG - && REGNO (SUBREG_REG (operands[1])) >= FIRST_PSEUDO_REGISTER)) - { - rtx data = operands[0]; - rtx address = XEXP (operands[1], 0); - rtx seq; - - start_sequence (); - emit_insn (gen_movsi (gen_lowpart (SImode, data), address)); - ms1_set_memflags (operands[1]); - seq = get_insns (); - end_sequence (); - emit_insn (seq); - DONE; - } -}") - -(define_insn "*movqi_internal" - [(set (match_operand:QI 0 "nonimmediate_operand" "=r,r,m,r") - (match_operand:QI 1 "general_operand" "r,m,r,I"))] - "TARGET_BYTE_ACCESS - && (!memory_operand (operands[0], QImode) - || !memory_operand (operands[1], QImode))" - "@ - or %0, %1, %1 - ldb %0, %1 - stb %1, %0 - addi %0, r0, %1" - [(set_attr "length" "4,4,4,4") - (set_attr "type" "arith,load,store,arith")]) - -(define_insn "*movqi_internal_nobyte" - [(set (match_operand:QI 0 "register_operand" "=r,r") - (match_operand:QI 1 "arith_operand" "r,I"))] - "!TARGET_BYTE_ACCESS - && (!memory_operand (operands[0], QImode) - || !memory_operand (operands[1], QImode))" - "@ - or %0, %1, %1 - addi %0, r0, %1" - [(set_attr "length" "4,4") - (set_attr "type" "arith,arith")]) - - -;; The MorphoRISC does not have 16-bit loads and stores. -;; These operations must be synthesized. Note that the code -;; for loadhi and storehi assumes that the least significant bits -;; is ignored. - -;; loadhi -;; operand 0 location of result -;; operand 1 memory address -;; operand 2 temp -(define_expand "loadhi" - [ - ;; compute shift - (set (match_operand:SI 2 "register_operand" "") - (and:SI (match_dup 1) (const_int 2))) - (set (match_dup 2) (xor:SI (match_dup 2) (const_int 2))) - (set (match_dup 2 ) (ashift:SI (match_dup 2) (const_int 3))) - - ;; get word that contains the 16-bits - (set (match_operand:SI 0 "register_operand" "") - (mem:SI (and:SI (match_operand:SI 1 "register_operand" "") - (const_int -3)))) - - ;; align 16-bit value - (set (match_dup 0) (ashiftrt:SI (match_dup 0) (match_dup 2))) - ] - "" - "") - -;; storehi -;; operand 0 byte value to store -;; operand 1 address -;; operand 2 temp, word containing byte -;; operand 3 temp, shift count -;; operand 4 temp, mask, aligned and masked byte -;; operand 5 (unused) -(define_expand "storehi" - [ - ;; compute shift - (set (match_operand:SI 3 "register_operand" "") - (and:SI (match_operand:SI 1 "register_operand" "") (const_int 2))) - (set (match_dup 3) (xor:SI (match_dup 3) (const_int 2))) - (set (match_dup 3) (ashift:SI (match_dup 3) (const_int 3))) - - ;; get word that contains the 16-bits - (set (match_operand:SI 2 "register_operand" "") - (mem:SI (and:SI (match_dup 1) (const_int -3)))) - - ;; generate mask - (set (match_operand:SI 4 "register_operand" "") (const_int 65535)) - (set (match_dup 4) (ashift:SI (match_dup 4) (match_dup 3))) - (set (match_dup 4) (not:SI (match_dup 4))) - - ;; clear appropriate bits - (set (match_dup 2) (and:SI (match_dup 2) (match_dup 4))) - - ;; align 16-bit value - (set (match_dup 4) - (and:SI (match_operand:SI 0 "register_operand" "") (const_int 65535))) - (set (match_dup 4) (ashift:SI (match_dup 4) (match_dup 3))) - - ;; combine - (set (match_dup 2) (ior:SI (match_dup 4) (match_dup 2))) - ;; store updated word - (set (mem:SI (and:SI (match_dup 1) (const_int -3))) (match_dup 2)) - ] - "" - "") - - -(define_expand "movhi" - [(set (match_operand:HI 0 "general_operand" "") - (match_operand:HI 1 "general_operand" ""))] - "" - " -{ - if (!reload_in_progress - && !reload_completed - && GET_CODE (operands[0]) == MEM - && GET_CODE (operands[1]) == MEM) - operands[1] = copy_to_mode_reg (HImode, operands[1]); - - if ( GET_CODE (operands[0]) == MEM) - { - rtx scratch1 = gen_reg_rtx (SImode); - rtx scratch2 = gen_reg_rtx (SImode); - rtx scratch3 = gen_reg_rtx (SImode); - rtx data = operands[1]; - rtx address = XEXP (operands[0], 0); - rtx seq; - - if (GET_CODE (data) != REG) - data = copy_to_mode_reg (HImode, data); - - if (GET_CODE (address) != REG) - address = copy_to_mode_reg (SImode, address); - - start_sequence (); - emit_insn (gen_storehi (gen_lowpart (SImode, data), address, - scratch1, scratch2, scratch3)); - ms1_set_memflags (operands[0]); - seq = get_insns (); - end_sequence (); - emit_insn (seq); - DONE; - } - - if ( GET_CODE (operands[1]) == MEM) - { - rtx scratch1 = gen_reg_rtx (SImode); - rtx data = operands[0]; - rtx address = XEXP (operands[1], 0); - rtx seq; - - if (GET_CODE (address) != REG) - address = copy_to_mode_reg (SImode, address); - - start_sequence (); - emit_insn (gen_loadhi (gen_lowpart (SImode, data), address, - scratch1)); - ms1_set_memflags (operands[1]); - seq = get_insns (); - end_sequence (); - emit_insn (seq); - DONE; - } - - /* If the load is a pseudo register in a stack slot, some simplification - can be made because the loads are aligned */ - if ( (reload_in_progress && GET_CODE (operands[1]) == SUBREG - && GET_CODE (SUBREG_REG (operands[1])) == REG - && REGNO (SUBREG_REG (operands[1])) >= FIRST_PSEUDO_REGISTER)) - { - rtx data = operands[0]; - rtx address = XEXP (operands[1], 0); - rtx seq; - - start_sequence (); - emit_insn (gen_movsi (gen_lowpart (SImode, data), address)); - ms1_set_memflags (operands[1]); - seq = get_insns (); - end_sequence (); - emit_insn (seq); - DONE; - } -}") - -(define_insn "*movhi_internal" - [(set (match_operand:HI 0 "register_operand" "=r,r") - (match_operand:HI 1 "arith_operand" "r,I"))] - "!memory_operand (operands[0], HImode) || !memory_operand (operands[1], HImode)" - "@ - or %0, %1, %1 - addi %0, r0, %1" - [(set_attr "length" "4,4") - (set_attr "type" "arith,arith")]) - -(define_expand "movsi" - [(set (match_operand:SI 0 "nonimmediate_operand" "") - (match_operand:SI 1 "general_operand" ""))] - "" - " -{ - if (!reload_in_progress && !reload_completed - && !register_operand (operands[0], SImode) - && !register_operand (operands[1], SImode)) - operands[1] = copy_to_mode_reg (SImode, operands[1]); - - /* Take care of constants that don't fit in single instruction */ - if ( (reload_in_progress || reload_completed) - && !single_const_operand (operands[1], SImode)) - { - emit_insn (gen_movsi_high (operands[0], operands[1])); - emit_insn (gen_movsi_lo_sum (operands[0], operands[0], operands[1])); - DONE; - } - -}") - -(define_insn "movsi_high" - [(set (match_operand:SI 0 "register_operand" "=r") - (high:SI (match_operand:SI 1 "general_operand" "i")))] - "" - "* -{ - return \"ldui\\t%0, %H1\"; -}" - [(set_attr "length" "4") - (set_attr "type" "arith")]) - - -(define_insn "movsi_lo_sum" - [(set (match_operand:SI 0 "register_operand" "=r") - (lo_sum:SI (match_operand:SI 1 "register_operand" "r") - (match_operand:SI 2 "general_operand" "i")))] - "" - "* -{ - return \"addui\\t%0, %1, %L2\"; -}" - [(set_attr "length" "4") - (set_attr "type" "arith")]) - -/* Take care of constants that don't fit in single instruction */ -(define_split - [(set (match_operand:SI 0 "register_operand" "") - (match_operand:SI 1 "general_operand" ""))] - "(reload_in_progress || reload_completed) - && !single_const_operand (operands[1], SImode)" - - [(set (match_dup 0 ) - (high:SI (match_dup 1))) - (set (match_dup 0 ) - (lo_sum:SI (match_dup 0) - (match_dup 1)))] -) - - -;; The last pattern in movsi (with two instructions) -;; is really handled by the emit_insn's in movsi -;; and the define_split above. This provides additional -;; instructions to fill delay slots. - -;; 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). -(define_insn "*movsi_internal" - [(set (match_operand:SI 0 "nonimmediate_operand" "=r,r,m,r,r,r,r,r") - (match_operand:SI 1 "general_operand" "r,m,r,I,P,L,N,i"))] - "(!memory_operand (operands[0], SImode) || !memory_operand (operands[1], SImode)) - && !((reload_in_progress || reload_completed) - && !single_const_operand (operands[1], SImode))" - "@ - or %0, %1, %1 - ldw %0, %1 - stw %1, %0 - addi %0, r0, %1 - addui %0, r0, %1 - ldui %0, %H1 - nori %0, r0, %N1 - ldui %0, %H1\;addui %0, %0, %L1" - [(set_attr "length" "4,4,4,4,4,4,4,8") - (set_attr "type" "arith,load,store,arith,arith,arith,arith,complex")] -) - -;; 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 - && GET_CODE (operands[0]) == MEM - && (GET_CODE (operands[1]) == MEM - || GET_CODE (operands[1]) == CONST_DOUBLE)) - operands[1] = copy_to_mode_reg (SFmode, operands[1]); - - /* Take care of reg <- SF constant */ - if ( const_double_operand (operands[1], GET_MODE (operands[1]) ) ) - { - emit_insn (gen_movsf_high (operands[0], operands[1])); - emit_insn (gen_movsf_lo_sum (operands[0], operands[0], operands[1])); - DONE; - } -}") - -(define_insn "movsf_lo_sum" - [(set (match_operand:SF 0 "register_operand" "=r") - (lo_sum:SF (match_operand:SF 1 "register_operand" "r") - (match_operand:SF 2 "const_double_operand" "")))] - "" - "* -{ - REAL_VALUE_TYPE r; - long i; - - REAL_VALUE_FROM_CONST_DOUBLE (r, operands[2]); - REAL_VALUE_TO_TARGET_SINGLE (r, i); - operands[2] = GEN_INT (i); - return \"addui\\t%0, %1, %L2\"; -}" - [(set_attr "length" "4") - (set_attr "type" "arith")]) - -(define_insn "movsf_high" - [(set (match_operand:SF 0 "register_operand" "=r") - (high:SF (match_operand:SF 1 "const_double_operand" "")))] - "" - "* -{ - REAL_VALUE_TYPE r; - long i; - - REAL_VALUE_FROM_CONST_DOUBLE (r, operands[1]); - REAL_VALUE_TO_TARGET_SINGLE (r, i); - operands[1] = GEN_INT (i); - return \"ldui\\t%0, %H1\"; -}" - [(set_attr "length" "4") - (set_attr "type" "arith")]) - - -(define_insn "*movsf_internal" - [(set (match_operand:SF 0 "nonimmediate_operand" "=r,r,m") - (match_operand:SF 1 "nonimmediate_operand" "r,m,r"))] - "!memory_operand (operands[0], SFmode) || !memory_operand (operands[1], SFmode)" - "@ - or %0, %1, %1 - ldw %0, %1 - stw %1, %0" - [(set_attr "length" "4,4,4") - (set_attr "type" "arith,load,store")] -) - -(define_expand "movdf" - [(set (match_operand:DF 0 "general_operand" "") - (match_operand:DF 1 "general_operand" ""))] - "" - " -{ - /* One of the ops has to be in a register or 0 */ - if (!register_operand (operand0, DFmode) - && !reg_or_0_operand (operand1, DFmode)) - operands[1] = copy_to_mode_reg (DFmode, operand1); -}") - -(define_insn_and_split "*movdf_internal" - [(set (match_operand:DF 0 "nonimmediate_operand" "=r,o") - (match_operand:DF 1 "general_operand" "rim,r"))] - "! (memory_operand (operands[0], DFmode) - && memory_operand (operands[1], DFmode))" - "#" - - "(reload_completed || reload_in_progress)" - - [(set (match_dup 2) (match_dup 3)) - (set (match_dup 4) (match_dup 5)) - ] - - "{ - /* figure out what precisely to put into operands 2, 3, 4, and 5 */ - ms1_split_words (SImode, DFmode, operands); - }" -) - - -;; Reloads - -;; Like `movM', but used when a scratch register is required to move between -;; operand 0 and operand 1. Operand 2 describes the scratch register. See the -;; discussion of the `SECONDARY_RELOAD_CLASS' macro. - -(define_expand "reload_inqi" - [(set (match_operand:QI 0 "register_operand" "=r") - (match_operand:QI 1 "memory_operand" "m")) - (clobber (match_operand:DI 2 "register_operand" "=&r"))] - "! TARGET_BYTE_ACCESS" - " -{ - rtx scratch1 = gen_rtx_REG (SImode, REGNO (operands[2])); - rtx scratch2 = gen_rtx_REG (SImode, REGNO (operands[2])+1); - rtx data = operands[0]; - rtx address = XEXP (operands[1], 0); - rtx swap, seq; - - /* It is possible that the registers we got for scratch1 - might coincide with that of operands[0]. gen_loadqi - requires operand0 and operand2 to be different registers. - The following statement ensure that is always the case. */ - if (REGNO(operands[0]) == REGNO(scratch1)) - { - swap = scratch1; - scratch1 = scratch2; - scratch2 = swap; - } - - /* need to make sure address is already in register */ - if ( GET_CODE (address) != REG ) - address = force_operand (address, scratch2); - - start_sequence (); - emit_insn (gen_loadqi (gen_lowpart (SImode, data), address, scratch1)); - ms1_set_memflags (operands[1]); - seq = get_insns (); - end_sequence (); - emit_insn (seq); - DONE; -}") - -(define_expand "reload_outqi" - [(set (match_operand:QI 0 "memory_operand" "=m") - (match_operand:QI 1 "register_operand" "r")) - (clobber (match_operand:TI 2 "register_operand" "=&r"))] - "! TARGET_BYTE_ACCESS" - " -{ - rtx scratch1 = gen_rtx_REG (SImode, REGNO (operands[2])); - rtx scratch2 = gen_rtx_REG (SImode, REGNO (operands[2])+1); - rtx scratch3 = gen_rtx_REG (SImode, REGNO (operands[2])+2); - rtx scratch4 = gen_rtx_REG (SImode, REGNO (operands[2])+3); - rtx data = operands[1]; - rtx address = XEXP (operands[0], 0); - rtx seq; - - /* need to make sure address is already in register */ - if ( GET_CODE (address) != REG ) - address = force_operand (address, scratch4); - - start_sequence (); - emit_insn (gen_storeqi (gen_lowpart (SImode, data), address, - scratch1, scratch2, scratch3)); - ms1_set_memflags (operands[0]); - seq = get_insns (); - end_sequence (); - emit_insn (seq); - DONE; -}") - -(define_expand "reload_inhi" - [(set (match_operand:HI 0 "register_operand" "=r") - (match_operand:HI 1 "memory_operand" "m")) - (clobber (match_operand:DI 2 "register_operand" "=&r"))] - "" - " -{ - rtx scratch1 = gen_rtx_REG (SImode, REGNO (operands[2])); - rtx scratch2 = gen_rtx_REG (SImode, REGNO (operands[2])+1); - rtx data = operands[0]; - rtx address = XEXP (operands[1], 0); - rtx swap, seq; - - /* It is possible that the registers we got for scratch1 - might coincide with that of operands[0]. gen_loadqi - requires operand0 and operand2 to be different registers. - The following statement ensure that is always the case. */ - if (REGNO(operands[0]) == REGNO(scratch1)) - { - swap = scratch1; - scratch1 = scratch2; - scratch2 = swap; - } - - /* need to make sure address is already in register */ - if ( GET_CODE (address) != REG ) - address = force_operand (address, scratch2); - - start_sequence (); - emit_insn (gen_loadhi (gen_lowpart (SImode, data), address, - scratch1)); - ms1_set_memflags (operands[1]); - seq = get_insns (); - end_sequence (); - emit_insn (seq); - DONE; -}") - -(define_expand "reload_outhi" - [(set (match_operand:HI 0 "memory_operand" "=m") - (match_operand:HI 1 "register_operand" "r")) - (clobber (match_operand:TI 2 "register_operand" "=&r"))] - "" - " -{ - rtx scratch1 = gen_rtx_REG (SImode, REGNO (operands[2])); - rtx scratch2 = gen_rtx_REG (SImode, REGNO (operands[2])+1); - rtx scratch3 = gen_rtx_REG (SImode, REGNO (operands[2])+2); - rtx scratch4 = gen_rtx_REG (SImode, REGNO (operands[2])+3); - rtx data = operands[1]; - rtx address = XEXP (operands[0], 0); - rtx seq; - - /* need to make sure address is already in register */ - if ( GET_CODE (address) != REG ) - address = force_operand (address, scratch4); - - start_sequence (); - emit_insn (gen_storehi (gen_lowpart (SImode, data), address, - scratch1, scratch2, scratch3)); - ms1_set_memflags (operands[0]); - seq = get_insns (); - end_sequence (); - emit_insn (seq); - DONE; -}") - - -;; 32 bit Integer arithmetic - -;; Addition -(define_insn "addsi3" - [(set (match_operand:SI 0 "register_operand" "=r,r") - (plus:SI (match_operand:SI 1 "register_operand" "%r,r") - (match_operand:SI 2 "arith_operand" "r,I")))] - "" - "@ - add %0, %1, %2 - addi %0, %1, %2" - [(set_attr "length" "4,4") - (set_attr "type" "arith,arith")]) - -;; Subtraction -(define_insn "subsi3" - [(set (match_operand:SI 0 "register_operand" "=r,r") - (minus:SI (match_operand:SI 1 "reg_or_0_operand" "rJ,rJ") - (match_operand:SI 2 "arith_operand" "rJ,I")))] - "" - "@ - sub %0, %z1, %z2 - subi %0, %z1, %2" - [(set_attr "length" "4,4") - (set_attr "type" "arith,arith")]) - -;; Negation -(define_insn "negsi2" - [(set (match_operand:SI 0 "register_operand" "=r,r") - (neg:SI (match_operand:SI 1 "arith_operand" "r,I")))] - "" - "@ - sub %0, r0, %1 - subi %0, r0, %1" - [(set_attr "length" "4,4") - (set_attr "type" "arith,arith")]) - - -;; 32 bit Integer Shifts and Rotates - -;; Arithmetic Shift Left -(define_insn "ashlsi3" - [(set (match_operand:SI 0 "register_operand" "=r,r") - (ashift:SI (match_operand:SI 1 "register_operand" "r,r") - (match_operand:SI 2 "arith_operand" "r,K")))] - "" - "@ - lsl %0, %1, %2 - lsli %0, %1, %2" - [(set_attr "length" "4,4") - (set_attr "type" "arith,arith")]) - -;; Arithmetic Shift Right -(define_insn "ashrsi3" - [(set (match_operand:SI 0 "register_operand" "=r,r") - (ashiftrt:SI (match_operand:SI 1 "register_operand" "r,r") - (match_operand:SI 2 "uns_arith_operand" "r,K")))] - "" - "@ - asr %0, %1, %2 - asri %0, %1, %2" - [(set_attr "length" "4,4") - (set_attr "type" "arith,arith")]) - -;; Logical Shift Right -(define_insn "lshrsi3" - [(set (match_operand:SI 0 "register_operand" "=r,r") - (lshiftrt:SI (match_operand:SI 1 "register_operand" "r,r") - (match_operand:SI 2 "uns_arith_operand" "r,K")))] - "" - "@ - lsr %0, %1, %2 - lsri %0, %1, %2" - [(set_attr "length" "4,4") - (set_attr "type" "arith,arith")]) - - -;; 32 Bit Integer Logical operations - -;; Logical AND, 32 bit integers -(define_insn "andsi3" - [(set (match_operand:SI 0 "register_operand" "=r,r") - (and:SI (match_operand:SI 1 "register_operand" "%r,r") - (match_operand:SI 2 "uns_arith_operand" "r,K")))] - "" - "@ - and %0, %1, %2 - andi %0, %1, %2" - [(set_attr "length" "4,4") - (set_attr "type" "arith,arith")]) - -;; Inclusive OR, 32 bit integers -(define_insn "iorsi3" - [(set (match_operand:SI 0 "register_operand" "=r,r") - (ior:SI (match_operand:SI 1 "register_operand" "%r,r") - (match_operand:SI 2 "uns_arith_operand" "r,K")))] - "" - "@ - or %0, %1, %2 - ori %0, %1, %2" - [(set_attr "length" "4,4") - (set_attr "type" "arith,arith")]) - -;; Exclusive OR, 32 bit integers -(define_insn "xorsi3" - [(set (match_operand:SI 0 "register_operand" "=r,r") - (xor:SI (match_operand:SI 1 "register_operand" "%r,r") - (match_operand:SI 2 "uns_arith_operand" "r,K")))] - "" - "@ - xor %0, %1, %2 - xori %0, %1, %2" - [(set_attr "length" "4,4") - (set_attr "type" "arith,arith")]) - - -;; One's complement, 32 bit integers -(define_insn "one_cmplsi2" - [(set (match_operand:SI 0 "register_operand" "=r") - (not:SI (match_operand:SI 1 "register_operand" "r")))] - "" - "nor %0, %1, %1" - [(set_attr "length" "4") - (set_attr "type" "arith")]) - - -;; Multiply - -(define_insn "mulhisi3" - [(set (match_operand:SI 0 "register_operand" "=r,r") - (mult:SI (sign_extend:SI (match_operand:HI 1 "register_operand" "%r,r")) - (sign_extend:SI (match_operand:HI 2 "arith_operand" "r,I"))))] - "TARGET_MUL" - "@ - mul %0, %1, %2 - muli %0, %1, %2" - [(set_attr "length" "4,4") - (set_attr "type" "arith,arith")]) - - -;; 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 "register_operand" "") - (match_operand:SI 1 "arith_operand" "")))] - "" - " -{ - ms1_compare_op0 = operands[0]; - ms1_compare_op1 = operands[1]; - DONE; -}") - - -;; Branches - -(define_expand "beq" - [(use (match_operand 0 "" ""))] - "" - " -{ ms1_emit_cbranch (EQ, operands[0], - ms1_compare_op0, ms1_compare_op1); - DONE; -}") - -(define_expand "bne" - [(use (match_operand 0 "" ""))] - "" - " -{ ms1_emit_cbranch (NE, operands[0], - ms1_compare_op0, ms1_compare_op1); - DONE; -}") - -(define_expand "bge" - [(use (match_operand 0 "" ""))] - "" - " -{ ms1_emit_cbranch (GE, operands[0], - ms1_compare_op0, ms1_compare_op1); - DONE; -}") - -(define_expand "bgt" - [(use (match_operand 0 "" ""))] - "" - " -{ ms1_emit_cbranch (GT, operands[0], - ms1_compare_op0, ms1_compare_op1); - DONE; -}") - -(define_expand "ble" - [(use (match_operand 0 "" ""))] - "" - " -{ ms1_emit_cbranch (LE, operands[0], - ms1_compare_op0, ms1_compare_op1); - DONE; -}") - -(define_expand "blt" - [(use (match_operand 0 "" ""))] - "" - " -{ ms1_emit_cbranch (LT, operands[0], - ms1_compare_op0, ms1_compare_op1); - DONE; -}") - -(define_expand "bgeu" - [(use (match_operand 0 "" ""))] - "" - " -{ ms1_emit_cbranch (GEU, operands[0], - ms1_compare_op0, ms1_compare_op1); - DONE; -}") - -(define_expand "bgtu" - [(use (match_operand 0 "" ""))] - "" - " -{ ms1_emit_cbranch (GTU, operands[0], - ms1_compare_op0, ms1_compare_op1); - DONE; -}") - -(define_expand "bleu" - [(use (match_operand 0 "" ""))] - "" - " -{ ms1_emit_cbranch (LEU, operands[0], - ms1_compare_op0, ms1_compare_op1); - DONE; -}") - -(define_expand "bltu" - [(use (match_operand 0 "" ""))] - "" - " -{ ms1_emit_cbranch (LTU, operands[0], - ms1_compare_op0, ms1_compare_op1); - DONE; -}") - -(define_expand "bunge" - [(use (match_operand 0 "" ""))] - "" - " -{ ms1_emit_cbranch (GEU, operands[0], - ms1_compare_op0, ms1_compare_op1); - DONE; -}") - -(define_expand "bungt" - [(use (match_operand 0 "" ""))] - "" - " -{ - ms1_emit_cbranch (GTU, operands[0], - ms1_compare_op0, ms1_compare_op1); - DONE; -}") - -(define_expand "bunle" - [(use (match_operand 0 "" ""))] - "" - " -{ - ms1_emit_cbranch (LEU, operands[0], - ms1_compare_op0, ms1_compare_op1); - DONE; -}") - -(define_expand "bunlt" - [(use (match_operand 0 "" ""))] - "" - " -{ - ms1_emit_cbranch (LTU, operands[0], - ms1_compare_op0, ms1_compare_op1); - DONE; -}") - -(define_insn "*beq_true" - [(set (pc) - (if_then_else (eq (match_operand:SI 0 "reg_or_0_operand" "rJ") - (match_operand:SI 1 "reg_or_0_operand" "rJ")) - (label_ref (match_operand 2 "" "")) - (pc)))] - "" - "breq %z0, %z1, %l2%#" - [(set_attr "length" "4") - (set_attr "type" "branch")]) - -(define_insn "*beq_false" - [(set (pc) - (if_then_else (eq (match_operand:SI 0 "reg_or_0_operand" "rJ") - (match_operand:SI 1 "reg_or_0_operand" "rJ")) - (pc) - (label_ref (match_operand 2 "" ""))))] - "" - "brne %z0, %z1, %l2%#" - [(set_attr "length" "4") - (set_attr "type" "branch")]) - - -(define_insn "*bne_true" - [(set (pc) - (if_then_else (ne (match_operand:SI 0 "reg_or_0_operand" "rJ") - (match_operand:SI 1 "reg_or_0_operand" "rJ")) - (label_ref (match_operand 2 "" "")) - (pc)))] - "" - "brne %z0, %z1, %l2%#" - [(set_attr "length" "4") - (set_attr "type" "branch")]) - -(define_insn "*bne_false" - [(set (pc) - (if_then_else (ne (match_operand:SI 0 "reg_or_0_operand" "rJ") - (match_operand:SI 1 "reg_or_0_operand" "rJ")) - (pc) - (label_ref (match_operand 2 "" ""))))] - "" - "breq %z0, %z1, %l2%#" - [(set_attr "length" "4") - (set_attr "type" "branch")]) - -(define_insn "*blt_true" - [(set (pc) - (if_then_else (lt (match_operand:SI 0 "reg_or_0_operand" "rJ") - (match_operand:SI 1 "reg_or_0_operand" "rJ")) - (label_ref (match_operand 2 "" "")) - (pc)))] - "" - "brlt %z0, %z1, %l2%#" - [(set_attr "length" "4") - (set_attr "type" "branch")]) - -(define_insn "*blt_false" - [(set (pc) - (if_then_else (lt (match_operand:SI 0 "reg_or_0_operand" "rJ") - (match_operand:SI 1 "reg_or_0_operand" "rJ")) - (pc) - (label_ref (match_operand 2 "" ""))))] - "" - "brle %z1, %z0,%l2%#" - [(set_attr "length" "4") - (set_attr "type" "branch")]) - -(define_insn "*ble_true" - [(set (pc) - (if_then_else (le (match_operand:SI 0 "reg_or_0_operand" "rJ") - (match_operand:SI 1 "reg_or_0_operand" "rJ")) - (label_ref (match_operand 2 "" "")) - (pc)))] - "" - "brle %z0, %z1, %l2%#" - [(set_attr "length" "4") - (set_attr "type" "branch")]) - -(define_insn "*ble_false" - [(set (pc) - (if_then_else (le (match_operand:SI 0 "reg_or_0_operand" "rJ") - (match_operand:SI 1 "reg_or_0_operand" "rJ")) - (pc) - (label_ref (match_operand 2 "" ""))))] - "" - "brlt %z1, %z0,%l2%#" - [(set_attr "length" "4") - (set_attr "type" "branch")]) - -(define_insn "*bgt_true" - [(set (pc) - (if_then_else (gt (match_operand:SI 0 "reg_or_0_operand" "rJ") - (match_operand:SI 1 "reg_or_0_operand" "rJ")) - (label_ref (match_operand 2 "" "")) - (pc)))] - "" - "brlt %z1, %z0, %l2%#" - [(set_attr "length" "4") - (set_attr "type" "branch")]) - -(define_insn "*bgt_false" - [(set (pc) - (if_then_else (gt (match_operand:SI 0 "reg_or_0_operand" "rJ") - (match_operand:SI 1 "reg_or_0_operand" "rJ")) - (pc) - (label_ref (match_operand 2 "" ""))))] - "" - "brle %z0, %z1, %l2%#" - [(set_attr "length" "4") - (set_attr "type" "branch")]) - -(define_insn "*bge_true" - [(set (pc) - (if_then_else (ge (match_operand:SI 0 "reg_or_0_operand" "rJ") - (match_operand:SI 1 "reg_or_0_operand" "rJ")) - (label_ref (match_operand 2 "" "")) - (pc)))] - "" - "brle %z1, %z0,%l2%#" - [(set_attr "length" "4") - (set_attr "type" "branch")]) - -(define_insn "*bge_false" - [(set (pc) - (if_then_else (ge (match_operand:SI 0 "reg_or_0_operand" "rJ") - (match_operand:SI 1 "reg_or_0_operand" "rJ")) - (pc) - (label_ref (match_operand 2 "" ""))))] - "" - "brlt %z0, %z1, %l2%#" - [(set_attr "length" "4") - (set_attr "type" "branch")]) - -;; No unsigned operators on Morpho ms1. All the unsigned operations are -;; converted to the signed operations above. - - -;; Set flag operations - -;; "seq", "sne", "slt", "sle", "sgt", "sge", "sltu", "sleu", -;; "sgtu", and "sgeu" don't exist as regular instruction on the -;; ms1, so these are not defined - -;; Call and branch instructions - -(define_expand "call" - [(parallel [(call (mem:SI (match_operand:SI 0 "register_operand" "")) - (match_operand 1 "" "")) - (clobber (reg:SI 14))])] - "" - " -{ - operands[0] = force_reg (SImode, XEXP (operands[0], 0)); -}") - -(define_insn "call_internal" - [(call (mem:SI (match_operand 0 "register_operand" "r")) - (match_operand 1 "" "")) - ;; possibly add a clobber of the reg that gets the return address - (clobber (reg:SI 14))] - "" - "jal r14, %0%#" - [(set_attr "length" "4") - (set_attr "type" "call")]) - -(define_expand "call_value" - [(parallel [(set (match_operand 0 "register_operand" "") - (call (mem:SI (match_operand:SI 1 "register_operand" "")) - (match_operand 2 "general_operand" ""))) - (clobber (reg:SI 14))])] - "" - " -{ - operands[1] = force_reg (SImode, XEXP (operands[1], 0)); -}") - - -(define_insn "call_value_internal" - [(set (match_operand 0 "register_operand" "=r") - (call (mem:SI (match_operand 1 "register_operand" "r")) - (match_operand 2 "" ""))) - ;; possibly add a clobber of the reg that gets the return address - (clobber (reg:SI 14))] - "" - "jal r14, %1%#" - [(set_attr "length" "4") - (set_attr "type" "call")]) - -;; Subroutine return -(define_insn "return_internal" - [(const_int 2) - (return) - (use (reg:SI 14))] - "" - "jal r0, r14%#" - [(set_attr "length" "4") - (set_attr "type" "call")]) - -;; Interrupt return -(define_insn "return_interrupt_internal" - [(const_int 3) - (return) - (use (reg:SI 15))] - "" - "reti r15%#" - [(set_attr "length" "4") - (set_attr "type" "call")]) - -;; Subroutine return -(define_insn "eh_return_internal" - [(return) - (use (reg:SI 7)) - (use (reg:SI 8)) - (use (reg:SI 11)) - (use (reg:SI 10))] - "" - "jal r0, r11%#" - [(set_attr "length" "4") - (set_attr "type" "call")]) - - -;; Normal unconditional jump -(define_insn "jump" - [(set (pc) (label_ref (match_operand 0 "" "")))] - "" - "jmp %l0%#" - [(set_attr "length" "4") - (set_attr "type" "branch")]) - -;; Indirect jump through a register -(define_insn "indirect_jump" - [(set (pc) (match_operand 0 "register_operand" "r"))] - "" - "jal r0,%0%#" - [(set_attr "length" "4") - (set_attr "type" "call")]) - -(define_insn "tablejump" - [(set (pc) (match_operand:SI 0 "register_operand" "r")) - (use (label_ref (match_operand 1 "" "")))] - "" - "jal r0, %0%#" - [(set_attr "length" "4") - (set_attr "type" "call")]) - - -(define_expand "prologue" - [(const_int 1)] - "" - " -{ - ms1_expand_prologue (); - DONE; -}") - -(define_expand "epilogue" - [(const_int 2)] - "" - " -{ - ms1_expand_epilogue (NORMAL_EPILOGUE); - DONE; -}") - - -(define_expand "eh_return" - [(use (match_operand:SI 0 "register_operand" "r"))] - "" - " -{ - ms1_expand_eh_return (operands); - DONE; -}") - - -(define_insn_and_split "eh_epilogue" - [(unspec [(match_operand 0 "register_operand" "r")] 6)] - "" - "#" - "reload_completed" - [(const_int 1)] - "ms1_emit_eh_epilogue (operands); DONE;" -) - -;; No operation, needed in case the user uses -g but not -O. -(define_insn "nop" - [(const_int 0)] - "" - "or r0,r0,r0" - [(set_attr "length" "4") - (set_attr "type" "arith")]) - -;; :::::::::::::::::::: -;; :: -;; :: UNSPEC_VOLATILE usage -;; :: -;; :::::::::::::::::::: -;; -;; 0 blockage -;; 1 Enable interrupts -;; 2 Disable interrupts -;; - -;; Pseudo instruction that prevents the scheduler from moving code above this -;; point. -(define_insn "blockage" - [(unspec_volatile [(const_int 0)] UNSPEC_BLOCKAGE)] - "" - "" - [(set_attr "length" "0")]) - -;; Trap instruction to allow usage of the __builtin_trap function -(define_insn "trap" - [(trap_if (const_int 1) (const_int 0)) - (clobber (reg:SI 14))] - "" - "si r14%#" - [(set_attr "length" "4") - (set_attr "type" "branch")]) - -(define_expand "conditional_trap" - [(trap_if (match_operator 0 "comparison_operator" - [(match_dup 2) - (match_dup 3)]) - (match_operand 1 "const_int_operand" ""))] - "" - " -{ - operands[2] = ms1_compare_op0; - operands[3] = ms1_compare_op1; -}") - -;; Templates to control handling of interrupts - -;; Enable interrupts template -(define_insn "ei" - [(unspec_volatile [(const_int 0)] UNSPEC_EI)] - "" - "ei" - [(set_attr "length" "4")]) - -;; Enable interrupts template -(define_insn "di" - [(unspec_volatile [(const_int 0)] UNSPEC_DI)] - "" - "di" - [(set_attr "length" "4")]) diff --git a/gcc/config/ms1/ms1.opt b/gcc/config/ms1/ms1.opt deleted file mode 100644 index 44baad37ef2..00000000000 --- a/gcc/config/ms1/ms1.opt +++ /dev/null @@ -1,60 +0,0 @@ -; Options for the ms1 port of the compiler -; -; Copyright (C) 2005 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, 51 Franklin Street, Fifth Floor, Boston, MA -; 02110-1301, USA. - -mmul -Target Report Mask(MUL) -Generate multiply instructions - -mbacc -Target Report Mask(BYTE_ACCESS) -Use byte loads and stores when generating code. - -msim -Target RejectNegative -Use simulator runtime - -mno-crt0 -Target RejectNegative -Do not include crt0.o in the startup files - -mdebug-arg -Target RejectNegative Mask(DEBUG_ARG) -Internal debug switch - -mdebug-addr -Target RejectNegative Mask(DEBUG_ADDR) -Internal debug switch - -mdebug-stack -Target RejectNegative Mask(DEBUG_STACK) -Internal debug switch - -mdebug-loc -Target RejectNegative Mask(DEBUG_LOC) -Internal debug switch - -mdebug -Target RejectNegative Mask(DEBUG) -Internal debug switch - -march= -Target RejectNegative Joined Var(ms1_cpu_string) -Specify CPU for code generation purposes diff --git a/gcc/config/ms1/t-ms1 b/gcc/config/ms1/t-ms1 deleted file mode 100644 index d9aa314ba46..00000000000 --- a/gcc/config/ms1/t-ms1 +++ /dev/null @@ -1,70 +0,0 @@ -# Copyright (C) 2005 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, 51 Franklin Street, Fifth Floor, Boston, MA -# 02110-1301, USA. - -# 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. -CROSS_LIBGCC1 = -# -# Alternatively if assembler functions *are* needed then define the -# entries below: -# CROSS_LIBGCC1 = libgcc1-asm.a -# LIB1ASMSRC = ms1/lib1funcs.asm -# LIB1ASMFUNCS = _udivsi3 etc... - -LIB2FUNCS_EXTRA = $(srcdir)/config/ms1/lib2extra-funcs.c - -# If any special flags are necessary when building libgcc2 put them here. -# -# TARGET_LIBGCC2_CFLAGS = - -EXTRA_PARTS = crtbegin.o crtend.o crti.o crtn.o - -# 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 - -fp-bit.c: $(srcdir)/config/fp-bit.c - echo '#define FLOAT' > fp-bit.c - cat $(srcdir)/config/fp-bit.c >> fp-bit.c - -dp-bit.c: $(srcdir)/config/fp-bit.c - cat $(srcdir)/config/fp-bit.c > dp-bit.c - -# Assemble startup files. -crti.o: $(srcdir)/config/ms1/crti.asm $(GCC_PASSES) - $(GCC_FOR_TARGET) -c -o crti.o -x assembler $(srcdir)/config/ms1/crti.asm - -crtn.o: $(srcdir)/config/ms1/crtn.asm $(GCC_PASSES) - $(GCC_FOR_TARGET) -c -o crtn.o -x assembler $(srcdir)/config/ms1/crtn.asm - -# 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 = -# MULTILIB_DIRNAMES = -# MULTILIB_MATCHES = -# MULTILIB_EXCEPTIONS = -# MULTILIB_EXTRA_OPTS = -# -# LIBGCC = stmp-multilib -# INSTALL_LIBGCC = install-multilib - diff --git a/gcc/config/ms1/ABI.txt b/gcc/config/mt/ABI.txt similarity index 100% rename from gcc/config/ms1/ABI.txt rename to gcc/config/mt/ABI.txt diff --git a/gcc/config/mt/crti.asm b/gcc/config/mt/crti.asm new file mode 100644 index 00000000000..07bc6ff77b6 --- /dev/null +++ b/gcc/config/mt/crti.asm @@ -0,0 +1,71 @@ +# crti.asm for mt +# +# Copyright (C) 2005 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 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 GCC; see the file COPYING. If not, write to the Free +# Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA +# 02110-1301, USA. +# +# As a special exception, if you link this library with files +# compiled with GCC to produce an executable, this does not cause +# the resulting executable to be covered by the GNU General Public License. +# This exception does not however invalidate any other reasons why +# the executable file might be covered by the GNU General Public License. +# + +# This file just make a stack frame for the contents of the .fini and +# .init sections. Users may put any desired instructions in those +# sections. + + .file "crti.asm" + + .section ".init" + .global _init + .type _init,#function + .align 4 +_init: + subi sp, sp, #4 + stw r14, sp, #0 + or r0, r0, r0 + or r0, r0, r0 + or r0, r0, r0 + or r0, r0, r0 + or r0, r0, r0 + or r0, r0, r0 + or r0, r0, r0 + or r0, r0, r0 + + .section ".fini" + .global _fini + .type _fini,#function + .align 4 +_fini: + subi sp, sp, #4 + stw r14, sp, #0 + or r0, r0, r0 + or r0, r0, r0 + or r0, r0, r0 + or r0, r0, r0 + or r0, r0, r0 + or r0, r0, r0 + or r0, r0, r0 + or r0, r0, r0 diff --git a/gcc/config/mt/crtn.asm b/gcc/config/mt/crtn.asm new file mode 100644 index 00000000000..d179c1895cf --- /dev/null +++ b/gcc/config/mt/crtn.asm @@ -0,0 +1,56 @@ +# crtn.asm for mt + +# Copyright (C) 2005 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 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 GCC; see the file COPYING. If not, write to the Free +# Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA +# 02110-1301, USA. +# +# As a special exception, if you link this library with files +# compiled with GCC to produce an executable, this does not cause +# the resulting executable to be covered by the GNU General Public License. +# This exception does not however invalidate any other reasons why +# the executable file might be covered by the GNU General Public License. +# + +# This file just makes sure that the .fini and .init sections do in +# fact return. Users may put any desired instructions in those sections. +# This file is the last thing linked into any executable. + + .file "crtn.asm" + + .section ".init" + .align 4 + ldw r14, sp, #0 + addi sp, sp, #4 + nop + jal r0, r14 + or r0, r0, r0 + + .section ".fini" + .align 4 + + ldw r14, sp, #0 + addi sp, sp, #4 + nop + jal r0, r14 + or r0, r0, r0 diff --git a/gcc/config/ms1/lib2extra-funcs.c b/gcc/config/mt/lib2extra-funcs.c similarity index 100% rename from gcc/config/ms1/lib2extra-funcs.c rename to gcc/config/mt/lib2extra-funcs.c diff --git a/gcc/config/mt/mt-protos.h b/gcc/config/mt/mt-protos.h new file mode 100644 index 00000000000..32867994618 --- /dev/null +++ b/gcc/config/mt/mt-protos.h @@ -0,0 +1,66 @@ +/* Prototypes for exported functions defined in ms1.c + Copyright (C) 2005 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, 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301, USA. */ + +extern void mt_init_expanders (void); +extern void mt_expand_prologue (void); +extern void mt_expand_epilogue (enum epilogue_type); +extern unsigned mt_compute_frame_size (int); +extern void mt_override_options (void); +extern int mt_initial_elimination_offset (int, int); +extern const char * mt_asm_output_opcode (FILE *, const char *); +extern int mt_epilogue_uses (int); +extern void mt_add_loop (void); + +#ifdef TREE_CODE +extern const char * mt_cannot_inline_p (tree); +extern int mt_function_arg_boundary (enum machine_mode, tree); +extern void mt_function_arg_advance (CUMULATIVE_ARGS *, enum machine_mode, tree, int); +#endif + +#ifdef RTX_CODE +extern void mt_expand_eh_return (rtx *); +extern void mt_emit_eh_epilogue (rtx *); +extern void mt_print_operand (FILE *, rtx, int); +extern void mt_print_operand_address (FILE *, rtx); +extern int mt_check_split (rtx, enum machine_mode); +extern int mt_reg_ok_for_base_p (rtx, int); +extern int mt_legitimate_address_p (enum machine_mode, rtx, int); +/* Predicates for machine description. */ +extern int uns_arith_operand (rtx, enum machine_mode); +extern int arith_operand (rtx, enum machine_mode); +extern int reg_or_0_operand (rtx, enum machine_mode); +extern int big_const_operand (rtx, enum machine_mode); +extern int single_const_operand (rtx, enum machine_mode); +extern void mt_emit_cbranch (enum rtx_code, rtx, rtx, rtx); +extern void mt_set_memflags (rtx); +extern rtx mt_return_addr_rtx (int); +extern void mt_split_words (enum machine_mode, enum machine_mode, rtx *); +extern void mt_final_prescan_insn (rtx, rtx *, int); +#endif + +#ifdef TREE_CODE +#ifdef RTX_CODE +extern void mt_init_cumulative_args (CUMULATIVE_ARGS *, tree, rtx, tree, int); +extern rtx mt_function_arg (const CUMULATIVE_ARGS *, enum machine_mode, tree, int, int); +extern void mt_va_start (tree, rtx); +extern enum reg_class mt_secondary_reload_class (enum reg_class, enum machine_mode, rtx); +extern rtx mt_function_value (tree, enum machine_mode, tree); +#endif +#endif diff --git a/gcc/config/mt/mt.c b/gcc/config/mt/mt.c new file mode 100644 index 00000000000..2906e3c1573 --- /dev/null +++ b/gcc/config/mt/mt.c @@ -0,0 +1,2487 @@ +/* Target definitions for the MorphoRISC1 + Copyright (C) 2005 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, 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301, USA. */ + +#include "config.h" +#include "system.h" +#include "coretypes.h" +#include "tm.h" +#include "rtl.h" +#include "regs.h" +#include "hard-reg-set.h" +#include "real.h" +#include "insn-config.h" +#include "conditions.h" +#include "insn-attr.h" +#include "recog.h" +#include "toplev.h" +#include "output.h" +#include "integrate.h" +#include "tree.h" +#include "function.h" +#include "expr.h" +#include "optabs.h" +#include "libfuncs.h" +#include "flags.h" +#include "tm_p.h" +#include "ggc.h" +#include "insn-flags.h" +#include "obstack.h" +#include "except.h" +#include "target.h" +#include "target-def.h" +#include "basic-block.h" + +/* Frame pointer register mask. */ +#define FP_MASK (1 << (GPR_FP)) + +/* Link register mask. */ +#define LINK_MASK (1 << (GPR_LINK)) + +/* Given a SIZE in bytes, advance to the next word. */ +#define ROUND_ADVANCE(SIZE) (((SIZE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD) + +/* A C structure for machine-specific, per-function data. + This is added to the cfun structure. */ +struct machine_function GTY(()) +{ + /* Flags if __builtin_return_address (n) with n >= 1 was used. */ + int ra_needs_full_frame; + struct rtx_def * eh_stack_adjust; + int interrupt_handler; + int has_loops; +}; + +/* Define the information needed to generate branch and scc insns. + This is stored from the compare operation. */ +struct rtx_def * mt_compare_op0; +struct rtx_def * mt_compare_op1; + +/* Current frame information calculated by compute_frame_size. */ +struct mt_frame_info current_frame_info; + +/* Zero structure to initialize current_frame_info. */ +struct mt_frame_info zero_frame_info; + +/* mt doesn't have unsigned compares need a library call for this. */ +struct rtx_def * mt_ucmpsi3_libcall; + +static int mt_flag_delayed_branch; + + +static rtx +mt_struct_value_rtx (tree fndecl ATTRIBUTE_UNUSED, + int incoming ATTRIBUTE_UNUSED) +{ + return gen_rtx_REG (Pmode, RETVAL_REGNUM); +} + +/* Implement RETURN_ADDR_RTX. */ +rtx +mt_return_addr_rtx (int count) +{ + if (count != 0) + return NULL_RTX; + + return get_hard_reg_initial_val (Pmode, GPR_LINK); +} + +/* The following variable value indicates the number of nops required + between the current instruction and the next instruction to avoid + any pipeline hazards. */ +static int mt_nops_required = 0; +static const char * mt_nop_reasons = ""; + +/* Implement ASM_OUTPUT_OPCODE. */ +const char * +mt_asm_output_opcode (FILE *f ATTRIBUTE_UNUSED, const char *ptr) +{ + if (mt_nops_required) + fprintf (f, ";# need %d nops because of %s\n\t", + mt_nops_required, mt_nop_reasons); + + while (mt_nops_required) + { + fprintf (f, "nop\n\t"); + -- mt_nops_required; + } + + return ptr; +} + +/* Given an insn, return whether it's a memory operation or a branch + operation, otherwise return TYPE_ARITH. */ +static enum attr_type +mt_get_attr_type (rtx complete_insn) +{ + rtx insn = PATTERN (complete_insn); + + if (JUMP_P (complete_insn)) + return TYPE_BRANCH; + if (CALL_P (complete_insn)) + return TYPE_BRANCH; + + if (GET_CODE (insn) != SET) + return TYPE_ARITH; + + if (SET_DEST (insn) == pc_rtx) + return TYPE_BRANCH; + + if (GET_CODE (SET_DEST (insn)) == MEM) + return TYPE_STORE; + + if (GET_CODE (SET_SRC (insn)) == MEM) + return TYPE_LOAD; + + return TYPE_ARITH; +} + +/* A helper routine for insn_dependent_p called through note_stores. */ + +static void +insn_dependent_p_1 (rtx x, rtx pat ATTRIBUTE_UNUSED, void *data) +{ + rtx * pinsn = (rtx *) data; + + if (*pinsn && reg_mentioned_p (x, *pinsn)) + *pinsn = NULL_RTX; +} + +/* Return true if anything in insn X is (anti,output,true) + dependent on anything in insn Y. */ + +static bool +insn_dependent_p (rtx x, rtx y) +{ + rtx tmp; + + if (! INSN_P (x) || ! INSN_P (y)) + return 0; + + tmp = PATTERN (y); + note_stores (PATTERN (x), insn_dependent_p_1, &tmp); + if (tmp == NULL_RTX) + return true; + + tmp = PATTERN (x); + note_stores (PATTERN (y), insn_dependent_p_1, &tmp); + return (tmp == NULL_RTX); +} + + +/* Return true if anything in insn X is true dependent on anything in + insn Y. */ +static bool +insn_true_dependent_p (rtx x, rtx y) +{ + rtx tmp; + + if (! INSN_P (x) || ! INSN_P (y)) + return 0; + + tmp = PATTERN (y); + note_stores (PATTERN (x), insn_dependent_p_1, &tmp); + return (tmp == NULL_RTX); +} + +/* The following determines the number of nops that need to be + inserted between the previous instructions and current instruction + to avoid pipeline hazards on the mt processor. Remember that + the function is not called for asm insns. */ + +void +mt_final_prescan_insn (rtx insn, + rtx * opvec ATTRIBUTE_UNUSED, + int noperands ATTRIBUTE_UNUSED) +{ + rtx prev_i; + enum attr_type prev_attr; + + mt_nops_required = 0; + mt_nop_reasons = ""; + + /* ms2 constraints are dealt with in reorg. */ + if (TARGET_MS2) + return; + + /* Only worry about real instructions. */ + if (! INSN_P (insn)) + return; + + /* Find the previous real instructions. */ + for (prev_i = PREV_INSN (insn); + prev_i != NULL + && (! INSN_P (prev_i) + || GET_CODE (PATTERN (prev_i)) == USE + || GET_CODE (PATTERN (prev_i)) == CLOBBER); + prev_i = PREV_INSN (prev_i)) + { + /* If we meet a barrier, there is no flow through here. */ + if (BARRIER_P (prev_i)) + return; + } + + /* If there isn't one then there is nothing that we need do. */ + if (prev_i == NULL || ! INSN_P (prev_i)) + return; + + prev_attr = mt_get_attr_type (prev_i); + + /* Delayed branch slots already taken care of by delay branch scheduling. */ + if (prev_attr == TYPE_BRANCH) + return; + + switch (mt_get_attr_type (insn)) + { + case TYPE_LOAD: + case TYPE_STORE: + /* Avoid consecutive memory operation. */ + if ((prev_attr == TYPE_LOAD || prev_attr == TYPE_STORE) + && TARGET_MS1_64_001) + { + mt_nops_required = 1; + mt_nop_reasons = "consecutive mem ops"; + } + /* Drop through. */ + + case TYPE_ARITH: + case TYPE_COMPLEX: + /* One cycle of delay is required between load + and the dependent arithmetic instruction. */ + if (prev_attr == TYPE_LOAD + && insn_true_dependent_p (prev_i, insn)) + { + mt_nops_required = 1; + mt_nop_reasons = "load->arith dependency delay"; + } + break; + + case TYPE_BRANCH: + if (insn_dependent_p (prev_i, insn)) + { + if (prev_attr == TYPE_ARITH && TARGET_MS1_64_001) + { + /* One cycle of delay between arith + instructions and branch dependent on arith. */ + mt_nops_required = 1; + mt_nop_reasons = "arith->branch dependency delay"; + } + else if (prev_attr == TYPE_LOAD) + { + /* Two cycles of delay are required + between load and dependent branch. */ + if (TARGET_MS1_64_001) + mt_nops_required = 2; + else + mt_nops_required = 1; + mt_nop_reasons = "load->branch dependency delay"; + } + } + break; + + default: + fatal_insn ("mt_final_prescan_insn, invalid insn #1", insn); + break; + } +} + +/* Print debugging information for a frame. */ +static void +mt_debug_stack (struct mt_frame_info * info) +{ + int regno; + + if (!info) + { + error ("info pointer NULL"); + gcc_unreachable (); + } + + 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 = %d\n", info->total_size); + fprintf (stderr, "\tpretend_size = %d\n", info->pretend_size); + fprintf (stderr, "\targs_size = %d\n", info->args_size); + fprintf (stderr, "\textra_size = %d\n", info->extra_size); + fprintf (stderr, "\treg_size = %d\n", info->reg_size); + fprintf (stderr, "\tvar_size = %d\n", info->var_size); + fprintf (stderr, "\tframe_size = %d\n", info->frame_size); + fprintf (stderr, "\treg_mask = 0x%x\n", info->reg_mask); + fprintf (stderr, "\tsave_fp = %d\n", info->save_fp); + fprintf (stderr, "\tsave_lr = %d\n", info->save_lr); + fprintf (stderr, "\tinitialized = %d\n", info->initialized); + fprintf (stderr, "\tsaved registers ="); + + /* Print out reg_mask in a more readable format. */ + for (regno = GPR_R0; regno <= GPR_LAST; regno++) + if ( (1 << regno) & info->reg_mask) + fprintf (stderr, " %s", reg_names[regno]); + + putc ('\n', stderr); + fflush (stderr); +} + +/* Print a memory address as an operand to reference that memory location. */ + +static void +mt_print_operand_simple_address (FILE * file, rtx addr) +{ + if (!addr) + error ("PRINT_OPERAND_ADDRESS, null pointer"); + + else + switch (GET_CODE (addr)) + { + case REG: + fprintf (file, "%s, #0", reg_names [REGNO (addr)]); + break; + + case PLUS: + { + rtx reg = 0; + rtx offset = 0; + rtx arg0 = XEXP (addr, 0); + rtx arg1 = XEXP (addr, 1); + + if (GET_CODE (arg0) == REG) + { + reg = arg0; + offset = arg1; + if (GET_CODE (offset) == REG) + fatal_insn ("PRINT_OPERAND_ADDRESS, 2 regs", addr); + } + + else if (GET_CODE (arg1) == REG) + reg = arg1, offset = arg0; + else if (CONSTANT_P (arg0) && CONSTANT_P (arg1)) + { + fprintf (file, "%s, #", reg_names [GPR_R0]); + output_addr_const (file, addr); + break; + } + fprintf (file, "%s, #", reg_names [REGNO (reg)]); + output_addr_const (file, offset); + break; + } + + case LABEL_REF: + case SYMBOL_REF: + case CONST_INT: + case CONST: + output_addr_const (file, addr); + break; + + default: + fatal_insn ("PRINT_OPERAND_ADDRESS, invalid insn #1", addr); + break; + } +} + +/* Implement PRINT_OPERAND_ADDRESS. */ +void +mt_print_operand_address (FILE * file, rtx addr) +{ + if (GET_CODE (addr) == AND + && GET_CODE (XEXP (addr, 1)) == CONST_INT + && INTVAL (XEXP (addr, 1)) == -3) + mt_print_operand_simple_address (file, XEXP (addr, 0)); + else + mt_print_operand_simple_address (file, addr); +} + +/* Implement PRINT_OPERAND. */ +void +mt_print_operand (FILE * file, rtx x, int code) +{ + switch (code) + { + case '#': + /* Output a nop if there's nothing for the delay slot. */ + if (dbr_sequence_length () == 0) + fputs ("\n\tnop", file); + return; + + case 'H': + fprintf(file, "#%%hi16("); + output_addr_const (file, x); + fprintf(file, ")"); + return; + + case 'L': + fprintf(file, "#%%lo16("); + output_addr_const (file, x); + fprintf(file, ")"); + return; + + case 'N': + fprintf(file, "#%ld", ~INTVAL (x)); + return; + + case 'z': + if (GET_CODE (x) == CONST_INT && INTVAL (x) == 0) + { + fputs (reg_names[GPR_R0], file); + return; + } + + case 0: + /* Handled below. */ + break; + + default: + /* output_operand_lossage ("mt_print_operand: unknown code"); */ + fprintf (file, "unknown code"); + return; + } + + switch (GET_CODE (x)) + { + case REG: + fputs (reg_names [REGNO (x)], file); + break; + + case CONST: + case CONST_INT: + fprintf(file, "#%ld", INTVAL (x)); + break; + + case MEM: + mt_print_operand_address(file, XEXP (x,0)); + break; + + case LABEL_REF: + case SYMBOL_REF: + output_addr_const (file, x); + break; + + default: + fprintf(file, "Uknown code: %d", GET_CODE (x)); + break; + } + + return; +} + +/* Implement INIT_CUMULATIVE_ARGS. */ +void +mt_init_cumulative_args (CUMULATIVE_ARGS * cum, tree fntype, rtx libname, + tree fndecl ATTRIBUTE_UNUSED, int incoming) +{ + *cum = 0; + + if (TARGET_DEBUG_ARG) + { + fprintf (stderr, "\nmt_init_cumulative_args:"); + + 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); + } +} + +/* Compute the slot number to pass an argument in. + Returns the slot number or -1 if passing on the stack. + + CUM is a variable of type CUMULATIVE_ARGS which gives info about + the preceding args and about the function being called. + MODE is the argument's machine mode. + TYPE is the data type of the argument (as a tree). + This is null for libcalls where that information may + not be available. + NAMED is nonzero if this argument is a named parameter + (otherwise it is an extra parameter matching an ellipsis). + INCOMING_P is zero for FUNCTION_ARG, nonzero for FUNCTION_INCOMING_ARG. + *PREGNO records the register number to use if scalar type. */ + +static int +mt_function_arg_slotno (const CUMULATIVE_ARGS * cum, + enum machine_mode mode, + tree type, + int named ATTRIBUTE_UNUSED, + int incoming_p ATTRIBUTE_UNUSED, + int * pregno) +{ + int regbase = FIRST_ARG_REGNUM; + int slotno = * cum; + + if (mode == VOIDmode || targetm.calls.must_pass_in_stack (mode, type)) + return -1; + + if (slotno >= MT_NUM_ARG_REGS) + return -1; + + * pregno = regbase + slotno; + + return slotno; +} + +/* Implement FUNCTION_ARG. */ +rtx +mt_function_arg (const CUMULATIVE_ARGS * cum, + enum machine_mode mode, + tree type, + int named, + int incoming_p) +{ + int slotno, regno; + rtx reg; + + slotno = mt_function_arg_slotno (cum, mode, type, named, incoming_p, ®no); + + if (slotno == -1) + reg = NULL_RTX; + else + reg = gen_rtx_REG (mode, regno); + + return reg; +} + +/* Implement FUNCTION_ARG_ADVANCE. */ +void +mt_function_arg_advance (CUMULATIVE_ARGS * cum, + enum machine_mode mode, + tree type ATTRIBUTE_UNUSED, + int named) +{ + int slotno, regno; + + /* We pass 0 for incoming_p here, it doesn't matter. */ + slotno = mt_function_arg_slotno (cum, mode, type, named, 0, ®no); + + * cum += (mode != BLKmode + ? ROUND_ADVANCE (GET_MODE_SIZE (mode)) + : ROUND_ADVANCE (int_size_in_bytes (type))); + + if (TARGET_DEBUG_ARG) + fprintf (stderr, + "mt_function_arg_advance: words = %2d, mode = %4s, named = %d, size = %3d\n", + *cum, GET_MODE_NAME (mode), named, + (*cum) * UNITS_PER_WORD); +} + +/* Implement hook TARGET_ARG_PARTIAL_BYTES. + + Returns the number of bytes at the beginning of an argument that + 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. */ +static int +mt_arg_partial_bytes (CUMULATIVE_ARGS * pcum, + enum machine_mode mode, + tree type, + bool named ATTRIBUTE_UNUSED) +{ + int cum = * pcum; + int words; + + if (mode == BLKmode) + words = ((int_size_in_bytes (type) + UNITS_PER_WORD - 1) + / UNITS_PER_WORD); + else + words = (GET_MODE_SIZE (mode) + UNITS_PER_WORD - 1) / UNITS_PER_WORD; + + if (! targetm.calls.pass_by_reference (&cum, mode, type, named) + && cum < MT_NUM_ARG_REGS + && (cum + words) > MT_NUM_ARG_REGS) + { + int bytes = (MT_NUM_ARG_REGS - cum) * UNITS_PER_WORD; + + if (TARGET_DEBUG) + fprintf (stderr, "function_arg_partial_nregs = %d\n", bytes); + return bytes; + } + + return 0; +} + + +/* Implement TARGET_PASS_BY_REFERENCE hook. */ +static bool +mt_pass_by_reference (CUMULATIVE_ARGS * cum ATTRIBUTE_UNUSED, + enum machine_mode mode ATTRIBUTE_UNUSED, + tree type, + bool named ATTRIBUTE_UNUSED) +{ + return (type && int_size_in_bytes (type) > 4 * UNITS_PER_WORD); +} + +/* Implement FUNCTION_ARG_BOUNDARY. */ +int +mt_function_arg_boundary (enum machine_mode mode ATTRIBUTE_UNUSED, + tree type ATTRIBUTE_UNUSED) +{ + return BITS_PER_WORD; +} + +/* Implement REG_OK_FOR_BASE_P. */ +int +mt_reg_ok_for_base_p (rtx x, int strict) +{ + if (strict) + return (((unsigned) REGNO (x)) < FIRST_PSEUDO_REGISTER); + return 1; +} + +/* Helper function of mt_legitimate_address_p. Return true if XINSN + is a simple address, otherwise false. */ +static bool +mt_legitimate_simple_address_p (enum machine_mode mode ATTRIBUTE_UNUSED, + rtx xinsn, int strict) +{ + if (TARGET_DEBUG) + { + fprintf (stderr, "\n========== GO_IF_LEGITIMATE_ADDRESS, %sstrict\n", + strict ? "" : "not "); + debug_rtx (xinsn); + } + + if (GET_CODE (xinsn) == REG && mt_reg_ok_for_base_p (xinsn, strict)) + return true; + + if (GET_CODE (xinsn) == PLUS + && GET_CODE (XEXP (xinsn, 0)) == REG + && mt_reg_ok_for_base_p (XEXP (xinsn, 0), strict) + && GET_CODE (XEXP (xinsn, 1)) == CONST_INT + && SMALL_INT (XEXP (xinsn, 1))) + return true; + + return false; +} + + +/* Helper function of GO_IF_LEGITIMATE_ADDRESS. Return non-zero if + XINSN is a legitimate address on MT. */ +int +mt_legitimate_address_p (enum machine_mode mode, rtx xinsn, int strict) +{ + if (mt_legitimate_simple_address_p (mode, xinsn, strict)) + return 1; + + if ((mode) == SImode + && GET_CODE (xinsn) == AND + && GET_CODE (XEXP (xinsn, 1)) == CONST_INT + && INTVAL (XEXP (xinsn, 1)) == -3) + return mt_legitimate_simple_address_p (mode, XEXP (xinsn, 0), strict); + else + return 0; +} + +/* Return truth value of whether OP can be used as an operands where a + register or 16 bit unsigned integer is needed. */ + +int +uns_arith_operand (rtx op, enum machine_mode mode) +{ + if (GET_CODE (op) == CONST_INT && SMALL_INT_UNSIGNED (op)) + return 1; + + return register_operand (op, mode); +} + +/* Return truth value of whether OP can be used as an operands where a + 16 bit integer is needed. */ + +int +arith_operand (rtx op, enum machine_mode mode) +{ + if (GET_CODE (op) == CONST_INT && SMALL_INT (op)) + return 1; + + return register_operand (op, mode); +} + +/* Return truth value of whether OP is a register or the constant 0. */ + +int +reg_or_0_operand (rtx op, enum machine_mode mode) +{ + switch (GET_CODE (op)) + { + case CONST_INT: + return INTVAL (op) == 0; + + case REG: + case SUBREG: + return register_operand (op, mode); + + default: + break; + } + + return 0; +} + +/* Return truth value of whether OP is a constant that requires two + loads to put in a register. */ + +int +big_const_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED) +{ + if (GET_CODE (op) == CONST_INT && CONST_OK_FOR_LETTER_P (INTVAL (op), 'M')) + return 1; + + return 0; +} + +/* Return truth value of whether OP is a constant that require only + one load to put in a register. */ + +int +single_const_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED) +{ + if (big_const_operand (op, mode) + || GET_CODE (op) == CONST + || GET_CODE (op) == LABEL_REF + || GET_CODE (op) == SYMBOL_REF) + return 0; + + return 1; +} + +/* True if the current function is an interrupt handler + (either via #pragma or an attribute specification). */ +int interrupt_handler; +enum processor_type mt_cpu; + +static struct machine_function * +mt_init_machine_status (void) +{ + struct machine_function *f; + + f = ggc_alloc_cleared (sizeof (struct machine_function)); + + return f; +} + +/* Implement OVERRIDE_OPTIONS. */ +void +mt_override_options (void) +{ + if (mt_cpu_string != NULL) + { + if (!strcmp (mt_cpu_string, "ms1-64-001")) + mt_cpu = PROCESSOR_MS1_64_001; + else if (!strcmp (mt_cpu_string, "ms1-16-002")) + mt_cpu = PROCESSOR_MS1_16_002; + else if (!strcmp (mt_cpu_string, "ms1-16-003")) + mt_cpu = PROCESSOR_MS1_16_003; + else if (!strcmp (mt_cpu_string, "ms2")) + mt_cpu = PROCESSOR_MS2; + else + error ("bad value (%s) for -march= switch", mt_cpu_string); + } + else + mt_cpu = PROCESSOR_MS1_16_002; + + if (flag_exceptions) + { + flag_omit_frame_pointer = 0; + flag_gcse = 0; + } + + /* We do delayed branch filling in machine dependent reorg */ + mt_flag_delayed_branch = flag_delayed_branch; + flag_delayed_branch = 0; + + init_machine_status = mt_init_machine_status; +} + +/* Do what is necessary for `va_start'. We look at the current function + to determine if stdarg or varargs is used and return the address of the + first unnamed parameter. */ + +static void +mt_setup_incoming_varargs (CUMULATIVE_ARGS *cum, + enum machine_mode mode ATTRIBUTE_UNUSED, + tree type ATTRIBUTE_UNUSED, + int *pretend_size, int no_rtl) +{ + int regno; + int regs = MT_NUM_ARG_REGS - *cum; + + *pretend_size = regs < 0 ? 0 : GET_MODE_SIZE (SImode) * regs; + + if (no_rtl) + return; + + for (regno = *cum; regno < MT_NUM_ARG_REGS; regno++) + { + rtx reg = gen_rtx_REG (SImode, FIRST_ARG_REGNUM + regno); + rtx slot = gen_rtx_PLUS (Pmode, + gen_rtx_REG (SImode, ARG_POINTER_REGNUM), + GEN_INT (UNITS_PER_WORD * regno)); + + emit_move_insn (gen_rtx_MEM (SImode, slot), reg); + } +} + +/* Returns the number of bytes offset between the frame pointer and the stack + pointer for the current function. SIZE is the number of bytes of space + needed for local variables. */ + +unsigned int +mt_compute_frame_size (int size) +{ + int regno; + unsigned int total_size; + unsigned int var_size; + unsigned int args_size; + unsigned int pretend_size; + unsigned int extra_size; + unsigned int reg_size; + unsigned int frame_size; + unsigned int reg_mask; + + var_size = size; + args_size = current_function_outgoing_args_size; + pretend_size = current_function_pretend_args_size; + extra_size = FIRST_PARM_OFFSET (0); + total_size = extra_size + pretend_size + args_size + var_size; + reg_size = 0; + reg_mask = 0; + + /* Calculate space needed for registers. */ + for (regno = GPR_R0; regno <= GPR_LAST; regno++) + { + if (MUST_SAVE_REGISTER (regno)) + { + reg_size += UNITS_PER_WORD; + reg_mask |= 1 << regno; + } + } + + current_frame_info.save_fp = (regs_ever_live [GPR_FP] + || frame_pointer_needed + || interrupt_handler); + current_frame_info.save_lr = (regs_ever_live [GPR_LINK] + || profile_flag + || interrupt_handler); + + reg_size += (current_frame_info.save_fp + current_frame_info.save_lr) + * UNITS_PER_WORD; + total_size += reg_size; + total_size = ((total_size + 3) & ~3); + + frame_size = total_size; + + /* Save computed information. */ + current_frame_info.pretend_size = pretend_size; + current_frame_info.var_size = var_size; + current_frame_info.args_size = args_size; + current_frame_info.reg_size = reg_size; + current_frame_info.frame_size = args_size + var_size; + current_frame_info.total_size = total_size; + current_frame_info.extra_size = extra_size; + current_frame_info.reg_mask = reg_mask; + current_frame_info.initialized = reload_completed; + + return total_size; +} + +/* Emit code to save REG in stack offset pointed to by MEM. + STACK_OFFSET is the offset from the SP where the save will happen. + This function sets the REG_FRAME_RELATED_EXPR note accordingly. */ +static void +mt_emit_save_restore (enum save_direction direction, + rtx reg, rtx mem, int stack_offset) +{ + if (direction == FROM_PROCESSOR_TO_MEM) + { + rtx insn; + + insn = emit_move_insn (mem, reg); + RTX_FRAME_RELATED_P (insn) = 1; + REG_NOTES (insn) + = gen_rtx_EXPR_LIST + (REG_FRAME_RELATED_EXPR, + gen_rtx_SET (VOIDmode, + gen_rtx_MEM (SImode, + gen_rtx_PLUS (SImode, + stack_pointer_rtx, + GEN_INT (stack_offset))), + reg), + REG_NOTES (insn)); + } + else + emit_move_insn (reg, mem); +} + + +/* Emit code to save the frame pointer in the prologue and restore + frame pointer in epilogue. */ + +static void +mt_emit_save_fp (enum save_direction direction, + struct mt_frame_info info) +{ + rtx base_reg; + int reg_mask = info.reg_mask & ~(FP_MASK | LINK_MASK); + int offset = info.total_size; + int stack_offset = info.total_size; + + /* If there is nothing to save, get out now. */ + if (! info.save_fp && ! info.save_lr && ! reg_mask) + return; + + /* If offset doesn't fit in a 15-bit signed integer, + uses a scratch registers to get a smaller offset. */ + if (CONST_OK_FOR_LETTER_P(offset, 'O')) + base_reg = stack_pointer_rtx; + else + { + /* Use the scratch register R9 that holds old stack pointer. */ + base_reg = gen_rtx_REG (SImode, GPR_R9); + offset = 0; + } + + if (info.save_fp) + { + offset -= UNITS_PER_WORD; + stack_offset -= UNITS_PER_WORD; + mt_emit_save_restore + (direction, gen_rtx_REG (SImode, GPR_FP), + gen_rtx_MEM (SImode, + gen_rtx_PLUS (SImode, base_reg, GEN_INT (offset))), + stack_offset); + } +} + +/* Emit code to save registers in the prologue and restore register + in epilogue. */ + +static void +mt_emit_save_regs (enum save_direction direction, + struct mt_frame_info info) +{ + rtx base_reg; + int regno; + int reg_mask = info.reg_mask & ~(FP_MASK | LINK_MASK); + int offset = info.total_size; + int stack_offset = info.total_size; + + /* If there is nothing to save, get out now. */ + if (! info.save_fp && ! info.save_lr && ! reg_mask) + return; + + /* If offset doesn't fit in a 15-bit signed integer, + uses a scratch registers to get a smaller offset. */ + if (CONST_OK_FOR_LETTER_P(offset, 'O')) + base_reg = stack_pointer_rtx; + else + { + /* Use the scratch register R9 that holds old stack pointer. */ + base_reg = gen_rtx_REG (SImode, GPR_R9); + offset = 0; + } + + if (info.save_fp) + { + /* This just records the space for it, the actual move generated in + mt_emit_save_fp (). */ + offset -= UNITS_PER_WORD; + stack_offset -= UNITS_PER_WORD; + } + + if (info.save_lr) + { + offset -= UNITS_PER_WORD; + stack_offset -= UNITS_PER_WORD; + mt_emit_save_restore + (direction, gen_rtx_REG (SImode, GPR_LINK), + gen_rtx_MEM (SImode, + gen_rtx_PLUS (SImode, base_reg, GEN_INT (offset))), + stack_offset); + } + + /* Save any needed call-saved regs. */ + for (regno = GPR_R0; regno <= GPR_LAST; regno++) + { + if ((reg_mask & (1 << regno)) != 0) + { + offset -= UNITS_PER_WORD; + stack_offset -= UNITS_PER_WORD; + mt_emit_save_restore + (direction, gen_rtx_REG (SImode, regno), + gen_rtx_MEM (SImode, + gen_rtx_PLUS (SImode, base_reg, GEN_INT (offset))), + stack_offset); + } + } +} + +/* Return true if FUNC is a function with the 'interrupt' attribute. */ +static bool +mt_interrupt_function_p (tree func) +{ + tree a; + + if (TREE_CODE (func) != FUNCTION_DECL) + return false; + + a = lookup_attribute ("interrupt", DECL_ATTRIBUTES (func)); + return a != NULL_TREE; +} + +/* Generate prologue code. */ +void +mt_expand_prologue (void) +{ + rtx size_rtx, insn; + unsigned int frame_size; + + if (mt_interrupt_function_p (current_function_decl)) + { + interrupt_handler = 1; + if (cfun->machine) + cfun->machine->interrupt_handler = 1; + } + + mt_compute_frame_size (get_frame_size ()); + + if (TARGET_DEBUG_STACK) + mt_debug_stack (¤t_frame_info); + + /* Compute size of stack adjustment. */ + frame_size = current_frame_info.total_size; + + /* If offset doesn't fit in a 15-bit signed integer, + uses a scratch registers to get a smaller offset. */ + if (CONST_OK_FOR_LETTER_P(frame_size, 'O')) + size_rtx = GEN_INT (frame_size); + else + { + /* We do not have any scratch registers. */ + gcc_assert (!interrupt_handler); + + size_rtx = gen_rtx_REG (SImode, GPR_R9); + insn = emit_move_insn (size_rtx, GEN_INT (frame_size & 0xffff0000)); + insn = emit_insn (gen_iorsi3 (size_rtx, size_rtx, + GEN_INT (frame_size & 0x0000ffff))); + } + + /* Allocate stack for this frame. */ + /* Make stack adjustment and use scratch register if constant too + large to fit as immediate. */ + if (frame_size) + { + insn = emit_insn (gen_subsi3 (stack_pointer_rtx, + stack_pointer_rtx, + size_rtx)); + RTX_FRAME_RELATED_P (insn) = 1; + REG_NOTES (insn) + = gen_rtx_EXPR_LIST (REG_FRAME_RELATED_EXPR, + gen_rtx_SET (VOIDmode, + stack_pointer_rtx, + gen_rtx_MINUS (SImode, + stack_pointer_rtx, + GEN_INT (frame_size))), + REG_NOTES (insn)); + } + + /* Set R9 to point to old sp if required for access to register save + area. */ + if ( current_frame_info.reg_size != 0 + && !CONST_OK_FOR_LETTER_P (frame_size, 'O')) + emit_insn (gen_addsi3 (size_rtx, size_rtx, stack_pointer_rtx)); + + /* Save the frame pointer. */ + mt_emit_save_fp (FROM_PROCESSOR_TO_MEM, current_frame_info); + + /* Now put the frame pointer into the frame pointer register. */ + if (frame_pointer_needed) + { + insn = emit_move_insn (frame_pointer_rtx, stack_pointer_rtx); + RTX_FRAME_RELATED_P (insn) = 1; + } + + /* Save the registers. */ + mt_emit_save_regs (FROM_PROCESSOR_TO_MEM, current_frame_info); + + /* If we are profiling, make sure no instructions are scheduled before + the call to mcount. */ + if (profile_flag) + emit_insn (gen_blockage ()); +} + +/* Implement EPILOGUE_USES. */ +int +mt_epilogue_uses (int regno) +{ + if (cfun->machine && cfun->machine->interrupt_handler && reload_completed) + return 1; + return regno == GPR_LINK; +} + +/* Generate epilogue. EH_MODE is NORMAL_EPILOGUE when generating a + function epilogue, or EH_EPILOGUE when generating an EH + epilogue. */ +void +mt_expand_epilogue (enum epilogue_type eh_mode) +{ + rtx size_rtx, insn; + unsigned frame_size; + + mt_compute_frame_size (get_frame_size ()); + + if (TARGET_DEBUG_STACK) + mt_debug_stack (& current_frame_info); + + /* Compute size of stack adjustment. */ + frame_size = current_frame_info.total_size; + + /* If offset doesn't fit in a 15-bit signed integer, + uses a scratch registers to get a smaller offset. */ + if (CONST_OK_FOR_LETTER_P(frame_size, 'O')) + size_rtx = GEN_INT (frame_size); + else + { + /* We do not have any scratch registers. */ + gcc_assert (!interrupt_handler); + + size_rtx = gen_rtx_REG (SImode, GPR_R9); + insn = emit_move_insn (size_rtx, GEN_INT (frame_size & 0xffff0000)); + insn = emit_insn (gen_iorsi3 (size_rtx, size_rtx, + GEN_INT (frame_size & 0x0000ffff))); + /* Set R9 to point to old sp if required for access to register + save area. */ + emit_insn (gen_addsi3 (size_rtx, size_rtx, stack_pointer_rtx)); + } + + /* Restore sp if there was some possible change to it. */ + if (frame_pointer_needed) + insn = emit_move_insn (stack_pointer_rtx, frame_pointer_rtx); + + /* Restore the registers. */ + mt_emit_save_fp (FROM_MEM_TO_PROCESSOR, current_frame_info); + mt_emit_save_regs (FROM_MEM_TO_PROCESSOR, current_frame_info); + + /* Make stack adjustment and use scratch register if constant too + large to fit as immediate. */ + if (frame_size) + { + if (CONST_OK_FOR_LETTER_P(frame_size, 'O')) + /* Can handle this with simple add. */ + insn = emit_insn (gen_addsi3 (stack_pointer_rtx, + stack_pointer_rtx, + size_rtx)); + else + /* Scratch reg R9 has the old sp value. */ + insn = emit_move_insn (stack_pointer_rtx, + gen_rtx_REG (SImode, GPR_R9)); + + REG_NOTES (insn) + = gen_rtx_EXPR_LIST (REG_FRAME_RELATED_EXPR, + gen_rtx_SET (VOIDmode, + stack_pointer_rtx, + gen_rtx_PLUS (SImode, + stack_pointer_rtx, + GEN_INT (frame_size))), + REG_NOTES (insn)); + } + + if (cfun->machine && cfun->machine->eh_stack_adjust != NULL_RTX) + /* Perform the additional bump for __throw. */ + emit_insn (gen_addsi3 (stack_pointer_rtx, + stack_pointer_rtx, + cfun->machine->eh_stack_adjust)); + + /* Generate the appropriate return. */ + if (eh_mode == EH_EPILOGUE) + { + emit_jump_insn (gen_eh_return_internal ()); + emit_barrier (); + } + else if (interrupt_handler) + emit_jump_insn (gen_return_interrupt_internal ()); + else + emit_jump_insn (gen_return_internal ()); + + /* Reset state info for each function. */ + interrupt_handler = 0; + current_frame_info = zero_frame_info; + if (cfun->machine) + cfun->machine->eh_stack_adjust = NULL_RTX; +} + + +/* Generate code for the "eh_return" pattern. */ +void +mt_expand_eh_return (rtx * operands) +{ + if (GET_CODE (operands[0]) != REG + || REGNO (operands[0]) != EH_RETURN_STACKADJ_REGNO) + { + rtx sp = EH_RETURN_STACKADJ_RTX; + + emit_move_insn (sp, operands[0]); + operands[0] = sp; + } + + emit_insn (gen_eh_epilogue (operands[0])); +} + +/* Generate code for the "eh_epilogue" pattern. */ +void +mt_emit_eh_epilogue (rtx * operands ATTRIBUTE_UNUSED) +{ + cfun->machine->eh_stack_adjust = EH_RETURN_STACKADJ_RTX; /* operands[0]; */ + mt_expand_epilogue (EH_EPILOGUE); +} + +/* Handle an "interrupt" attribute. */ +static tree +mt_handle_interrupt_attribute (tree * node, + tree name, + tree args ATTRIBUTE_UNUSED, + int flags ATTRIBUTE_UNUSED, + bool * no_add_attrs) +{ + if (TREE_CODE (*node) != FUNCTION_DECL) + { + warning (OPT_Wattributes, + "%qs attribute only applies to functions", + IDENTIFIER_POINTER (name)); + *no_add_attrs = true; + } + + return NULL_TREE; +} + +/* Table of machine attributes. */ +const struct attribute_spec mt_attribute_table[] = +{ + /* name, min, max, decl?, type?, func?, handler */ + { "interrupt", 0, 0, false, false, false, mt_handle_interrupt_attribute }, + { NULL, 0, 0, false, false, false, NULL } +}; + +/* Implement INITIAL_ELIMINATION_OFFSET. */ +int +mt_initial_elimination_offset (int from, int to) +{ + mt_compute_frame_size (get_frame_size ()); + + if (from == FRAME_POINTER_REGNUM && to == STACK_POINTER_REGNUM) + return 0; + + else if (from == ARG_POINTER_REGNUM && to == STACK_POINTER_REGNUM) + return current_frame_info.total_size; + + else if (from == ARG_POINTER_REGNUM && to == FRAME_POINTER_REGNUM) + return current_frame_info.total_size; + + else + gcc_unreachable (); +} + +/* Generate a compare for CODE. Return a brand-new rtx that + represents the result of the compare. */ + +static rtx +mt_generate_compare (enum rtx_code code, rtx op0, rtx op1) +{ + rtx scratch0, scratch1, const_scratch; + + switch (code) + { + case GTU: + case LTU: + case GEU: + case LEU: + /* Need to adjust ranges for faking unsigned compares. */ + scratch0 = gen_reg_rtx (SImode); + scratch1 = gen_reg_rtx (SImode); + const_scratch = force_reg (SImode, GEN_INT(MT_MIN_INT)); + emit_insn (gen_addsi3 (scratch0, const_scratch, op0)); + emit_insn (gen_addsi3 (scratch1, const_scratch, op1)); + break; + default: + scratch0 = op0; + scratch1 = op1; + break; + } + + /* Adjust compare operator to fake unsigned compares. */ + switch (code) + { + case GTU: + code = GT; break; + case LTU: + code = LT; break; + case GEU: + code = GE; break; + case LEU: + code = LE; break; + default: + /* do nothing */ + break; + } + + /* Generate the actual compare. */ + return gen_rtx_fmt_ee (code, VOIDmode, scratch0, scratch1); +} + +/* Emit a branch of kind CODE to location LOC. */ + +void +mt_emit_cbranch (enum rtx_code code, rtx loc, rtx op0, rtx op1) +{ + rtx condition_rtx, loc_ref; + + if (! reg_or_0_operand (op0, SImode)) + op0 = copy_to_mode_reg (SImode, op0); + + if (! reg_or_0_operand (op1, SImode)) + op1 = copy_to_mode_reg (SImode, op1); + + condition_rtx = mt_generate_compare (code, op0, op1); + loc_ref = gen_rtx_LABEL_REF (VOIDmode, loc); + emit_jump_insn (gen_rtx_SET (VOIDmode, pc_rtx, + gen_rtx_IF_THEN_ELSE (VOIDmode, condition_rtx, + loc_ref, pc_rtx))); +} + +/* Subfunction of the following function. Update the flags of any MEM + found in part of X. */ + +static void +mt_set_memflags_1 (rtx x, int in_struct_p, int volatile_p) +{ + int i; + + switch (GET_CODE (x)) + { + case SEQUENCE: + case PARALLEL: + for (i = XVECLEN (x, 0) - 1; i >= 0; i--) + mt_set_memflags_1 (XVECEXP (x, 0, i), in_struct_p, volatile_p); + break; + + case INSN: + mt_set_memflags_1 (PATTERN (x), in_struct_p, volatile_p); + break; + + case SET: + mt_set_memflags_1 (SET_DEST (x), in_struct_p, volatile_p); + mt_set_memflags_1 (SET_SRC (x), in_struct_p, volatile_p); + break; + + case MEM: + MEM_IN_STRUCT_P (x) = in_struct_p; + MEM_VOLATILE_P (x) = volatile_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. */ + /* set_mem_alias_set (x, alias_set); */ + break; + + default: + break; + } +} + +/* Look for any MEMs in the current sequence of insns and set the + in-struct, unchanging, and volatile flags from the flags in REF. + If REF is not a MEM, don't do anything. */ + +void +mt_set_memflags (rtx ref) +{ + rtx insn; + int in_struct_p, volatile_p; + + if (GET_CODE (ref) != MEM) + return; + + in_struct_p = MEM_IN_STRUCT_P (ref); + volatile_p = MEM_VOLATILE_P (ref); + + /* This is only called from mt.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) + return; + + for (insn = get_insns (); insn; insn = NEXT_INSN (insn)) + mt_set_memflags_1 (insn, in_struct_p, volatile_p); +} + +/* Implement SECONDARY_RELOAD_CLASS. */ +enum reg_class +mt_secondary_reload_class (enum reg_class class ATTRIBUTE_UNUSED, + enum machine_mode mode, + rtx x) +{ + if ((mode == QImode && (!TARGET_BYTE_ACCESS)) || mode == HImode) + { + if (GET_CODE (x) == MEM + || (GET_CODE (x) == REG && true_regnum (x) == -1) + || (GET_CODE (x) == SUBREG + && (GET_CODE (SUBREG_REG (x)) == MEM + || (GET_CODE (SUBREG_REG (x)) == REG + && true_regnum (SUBREG_REG (x)) == -1)))) + return GENERAL_REGS; + } + + return NO_REGS; +} + +/* Handle FUNCTION_VALUE, FUNCTION_OUTGOING_VALUE, and LIBCALL_VALUE + macros. */ +rtx +mt_function_value (tree valtype, enum machine_mode mode, tree func_decl ATTRIBUTE_UNUSED) +{ + if ((mode) == DImode || (mode) == DFmode) + return gen_rtx_MEM (mode, gen_rtx_REG (mode, RETURN_VALUE_REGNUM)); + + if (valtype) + mode = TYPE_MODE (valtype); + + return gen_rtx_REG (mode, RETURN_VALUE_REGNUM); +} + +/* Split a move into two smaller pieces. + MODE indicates the reduced mode. OPERANDS[0] is the original destination + OPERANDS[1] is the original src. The new destinations are + OPERANDS[2] and OPERANDS[4], while the new sources are OPERANDS[3] + and OPERANDS[5]. */ + +void +mt_split_words (enum machine_mode nmode, + enum machine_mode omode, + rtx *operands) +{ + rtx dl,dh; /* src/dest pieces. */ + rtx sl,sh; + int move_high_first = 0; /* Assume no overlap. */ + + switch (GET_CODE (operands[0])) /* Dest. */ + { + case SUBREG: + case REG: + if ((GET_CODE (operands[1]) == REG + || GET_CODE (operands[1]) == SUBREG) + && true_regnum (operands[0]) <= true_regnum (operands[1])) + move_high_first = 1; + + if (GET_CODE (operands[0]) == SUBREG) + { + dl = gen_rtx_SUBREG (nmode, SUBREG_REG (operands[0]), + SUBREG_BYTE (operands[0]) + GET_MODE_SIZE (nmode)); + dh = gen_rtx_SUBREG (nmode, SUBREG_REG (operands[0]), SUBREG_BYTE (operands[0])); + } + else if (GET_CODE (operands[0]) == REG && ! IS_PSEUDO_P (operands[0])) + { + int r = REGNO (operands[0]); + dh = gen_rtx_REG (nmode, r); + dl = gen_rtx_REG (nmode, r + HARD_REGNO_NREGS (r, nmode)); + } + else + { + dh = gen_rtx_SUBREG (nmode, operands[0], 0); + dl = gen_rtx_SUBREG (nmode, operands[0], GET_MODE_SIZE (nmode)); + } + break; + + case MEM: + switch (GET_CODE (XEXP (operands[0], 0))) + { + case POST_INC: + case POST_DEC: + gcc_unreachable (); + default: + dl = operand_subword (operands[0], + GET_MODE_SIZE (nmode)/UNITS_PER_WORD, + 0, omode); + dh = operand_subword (operands[0], 0, 0, omode); + } + break; + default: + gcc_unreachable (); + } + + switch (GET_CODE (operands[1])) + { + case REG: + if (! IS_PSEUDO_P (operands[1])) + { + int r = REGNO (operands[1]); + + sh = gen_rtx_REG (nmode, r); + sl = gen_rtx_REG (nmode, r + HARD_REGNO_NREGS (r, nmode)); + } + else + { + sh = gen_rtx_SUBREG (nmode, operands[1], 0); + sl = gen_rtx_SUBREG (nmode, operands[1], GET_MODE_SIZE (nmode)); + } + break; + + case CONST_DOUBLE: + if (operands[1] == const0_rtx) + sh = sl = const0_rtx; + else + split_double (operands[1], & sh, & sl); + break; + + case CONST_INT: + if (operands[1] == const0_rtx) + sh = sl = const0_rtx; + else + { + int vl, vh; + + switch (nmode) + { + default: + gcc_unreachable (); + } + + sl = GEN_INT (vl); + sh = GEN_INT (vh); + } + break; + + case SUBREG: + sl = gen_rtx_SUBREG (nmode, + SUBREG_REG (operands[1]), + SUBREG_BYTE (operands[1]) + GET_MODE_SIZE (nmode)); + sh = gen_rtx_SUBREG (nmode, + SUBREG_REG (operands[1]), + SUBREG_BYTE (operands[1])); + break; + + case MEM: + switch (GET_CODE (XEXP (operands[1], 0))) + { + case POST_DEC: + case POST_INC: + gcc_unreachable (); + break; + default: + sl = operand_subword (operands[1], + GET_MODE_SIZE (nmode)/UNITS_PER_WORD, + 0, omode); + sh = operand_subword (operands[1], 0, 0, omode); + + /* Check if the DF load is going to clobber the register + used for the address, and if so make sure that is going + to be the second move. */ + if (GET_CODE (dl) == REG + && true_regnum (dl) + == true_regnum (XEXP (XEXP (sl, 0 ), 0))) + move_high_first = 1; + } + break; + default: + gcc_unreachable (); + } + + if (move_high_first) + { + operands[2] = dh; + operands[3] = sh; + operands[4] = dl; + operands[5] = sl; + } + else + { + operands[2] = dl; + operands[3] = sl; + operands[4] = dh; + operands[5] = sh; + } + return; +} + +/* Implement TARGET_MUST_PASS_IN_STACK hook. */ +static bool +mt_pass_in_stack (enum machine_mode mode ATTRIBUTE_UNUSED, tree type) +{ + return (((type) != 0 + && (TREE_CODE (TYPE_SIZE (type)) != INTEGER_CST + || TREE_ADDRESSABLE (type)))); +} + +/* Increment the counter for the number of loop instructions in the + current function. */ + +void mt_add_loop (void) +{ + cfun->machine->has_loops++; +} + + +/* Maxium loop nesting depth. */ +#define MAX_LOOP_DEPTH 4 +/* Maxium size of a loop (allows some headroom for delayed branch slot + filling. */ +#define MAX_LOOP_LENGTH (200 * 4) + +/* We need to keep a vector of loops */ +typedef struct loop_info *loop_info; +DEF_VEC_P (loop_info); +DEF_VEC_ALLOC_P (loop_info,heap); + +/* Information about a loop we have found (or are in the process of + finding). */ +struct loop_info GTY (()) +{ + /* loop number, for dumps */ + int loop_no; + + /* Predecessor block of the loop. This is the one that falls into + the loop and contains the initialization instruction. */ + basic_block predecessor; + + /* First block in the loop. This is the one branched to by the dbnz + insn. */ + basic_block head; + + /* Last block in the loop (the one with the dbnz insn */ + basic_block tail; + + /* The successor block of the loop. This is the one the dbnz insn + falls into. */ + basic_block successor; + + /* The dbnz insn. */ + rtx dbnz; + + /* The initialization insn. */ + rtx init; + + /* The new initialization instruction. */ + rtx loop_init; + + /* The new ending instruction. */ + rtx loop_end; + + /* The new label placed at the end of the loop. */ + rtx end_label; + + /* The nesting depth of the loop. Set to -1 for a bad loop. */ + int depth; + + /* The length of the loop. */ + int length; + + /* Next loop in the graph. */ + struct loop_info *next; + + /* Vector of blocks only within the loop, (excluding those within + inner loops). */ + VEC (basic_block,heap) *blocks; + + /* Vector of inner loops within this loop */ + VEC (loop_info,heap) *loops; +}; + +/* Information used during loop detection. */ +typedef struct loop_work GTY(()) +{ + /* Basic block to be scanned. */ + basic_block block; + + /* Loop it will be within. */ + loop_info loop; +} loop_work; + +/* Work list. */ +DEF_VEC_O (loop_work); +DEF_VEC_ALLOC_O (loop_work,heap); + +/* Determine the nesting and length of LOOP. Return false if the loop + is bad. */ + +static bool +mt_loop_nesting (loop_info loop) +{ + loop_info inner; + unsigned ix; + int inner_depth = 0; + + if (!loop->depth) + { + /* Make sure we only have one entry point. */ + if (EDGE_COUNT (loop->head->preds) == 2) + { + loop->predecessor = EDGE_PRED (loop->head, 0)->src; + if (loop->predecessor == loop->tail) + /* We wanted the other predecessor. */ + loop->predecessor = EDGE_PRED (loop->head, 1)->src; + + /* We can only place a loop insn on a fall through edge of a + single exit block. */ + if (EDGE_COUNT (loop->predecessor->succs) != 1 + || !(EDGE_SUCC (loop->predecessor, 0)->flags & EDGE_FALLTHRU)) + loop->predecessor = NULL; + } + + /* Mark this loop as bad for now. */ + loop->depth = -1; + if (loop->predecessor) + { + for (ix = 0; VEC_iterate (loop_info, loop->loops, ix++, inner);) + { + if (!inner->depth) + mt_loop_nesting (inner); + + if (inner->depth < 0) + { + inner_depth = -1; + break; + } + + if (inner_depth < inner->depth) + inner_depth = inner->depth; + loop->length += inner->length; + } + + /* Set the proper loop depth, if it was good. */ + if (inner_depth >= 0) + loop->depth = inner_depth + 1; + } + } + return (loop->depth > 0 + && loop->predecessor + && loop->depth < MAX_LOOP_DEPTH + && loop->length < MAX_LOOP_LENGTH); +} + +/* Determine the length of block BB. */ + +static int +mt_block_length (basic_block bb) +{ + int length = 0; + rtx insn; + + for (insn = BB_HEAD (bb); + insn != NEXT_INSN (BB_END (bb)); + insn = NEXT_INSN (insn)) + { + if (!INSN_P (insn)) + continue; + if (CALL_P (insn)) + { + /* Calls are not allowed in loops. */ + length = MAX_LOOP_LENGTH + 1; + break; + } + + length += get_attr_length (insn); + } + return length; +} + +/* Scan the blocks of LOOP (and its inferiors) looking for uses of + REG. Return true, if we find any. Don't count the loop's dbnz + insn if it matches DBNZ. */ + +static bool +mt_scan_loop (loop_info loop, rtx reg, rtx dbnz) +{ + unsigned ix; + loop_info inner; + basic_block bb; + + for (ix = 0; VEC_iterate (basic_block, loop->blocks, ix, bb); ix++) + { + rtx insn; + + for (insn = BB_HEAD (bb); + insn != NEXT_INSN (BB_END (bb)); + insn = NEXT_INSN (insn)) + { + if (!INSN_P (insn)) + continue; + if (insn == dbnz) + continue; + if (reg_mentioned_p (reg, PATTERN (insn))) + return true; + } + } + for (ix = 0; VEC_iterate (loop_info, loop->loops, ix, inner); ix++) + if (mt_scan_loop (inner, reg, NULL_RTX)) + return true; + + return false; +} + +/* MS2 has a loop instruction which needs to be placed just before the + loop. It indicates the end of the loop and specifies the number of + loop iterations. It can be nested with an automatically maintained + stack of counter and end address registers. It's an ideal + candidate for doloop. Unfortunately, gcc presumes that loops + always end with an explicit instriction, and the doloop_begin + instruction is not a flow control instruction so it can be + scheduled earlier than just before the start of the loop. To make + matters worse, the optimization pipeline can duplicate loop exit + and entrance blocks and fails to track abnormally exiting loops. + Thus we cannot simply use doloop. + + What we do is emit a dbnz pattern for the doloop optimization, and + let that be optimized as normal. Then in machine dependent reorg + we have to repeat the loop searching algorithm. We use the + flow graph to find closed loops ending in a dbnz insn. We then try + and convert it to use the loop instruction. The conditions are, + + * the loop has no abnormal exits, duplicated end conditions or + duplicated entrance blocks + + * the loop counter register is only used in the dbnz instruction + within the loop + + * we can find the instruction setting the initial value of the loop + counter + + * the loop is not executed more than 65535 times. (This might be + changed to 2^32-1, and would therefore allow variable initializers.) + + * the loop is not nested more than 4 deep 5) there are no + subroutine calls in the loop. */ + +static void +mt_reorg_loops (FILE *dump_file) +{ + basic_block bb; + loop_info loops = NULL; + loop_info loop; + int nloops = 0; + unsigned dwork = 0; + VEC (loop_work,heap) *works = VEC_alloc (loop_work,heap,20); + loop_work *work; + edge e; + edge_iterator ei; + bool replaced = false; + + /* Find all the possible loop tails. This means searching for every + dbnz instruction. For each one found, create a loop_info + structure and add the head block to the work list. */ + FOR_EACH_BB (bb) + { + rtx tail = BB_END (bb); + + while (GET_CODE (tail) == NOTE) + tail = PREV_INSN (tail); + + bb->aux = NULL; + if (recog_memoized (tail) == CODE_FOR_decrement_and_branch_until_zero) + { + /* A possible loop end */ + + loop = XNEW (struct loop_info); + loop->next = loops; + loops = loop; + loop->tail = bb; + loop->head = BRANCH_EDGE (bb)->dest; + loop->successor = FALLTHRU_EDGE (bb)->dest; + loop->predecessor = NULL; + loop->dbnz = tail; + loop->depth = 0; + loop->length = mt_block_length (bb); + loop->blocks = VEC_alloc (basic_block, heap, 20); + VEC_quick_push (basic_block, loop->blocks, bb); + loop->loops = NULL; + loop->loop_no = nloops++; + + loop->init = loop->end_label = NULL_RTX; + loop->loop_init = loop->loop_end = NULL_RTX; + + work = VEC_safe_push (loop_work, heap, works, NULL); + work->block = loop->head; + work->loop = loop; + + bb->aux = loop; + + if (dump_file) + { + fprintf (dump_file, ";; potential loop %d ending at\n", + loop->loop_no); + print_rtl_single (dump_file, tail); + } + } + } + + /* Now find all the closed loops. + until work list empty, + if block's auxptr is set + if != loop slot + if block's loop's start != block + mark loop as bad + else + append block's loop's fallthrough block to worklist + increment this loop's depth + else if block is exit block + mark loop as bad + else + set auxptr + for each target of block + add to worklist */ + while (VEC_iterate (loop_work, works, dwork++, work)) + { + loop = work->loop; + bb = work->block; + if (bb == EXIT_BLOCK_PTR) + /* We've reached the exit block. The loop must be bad. */ + loop->depth = -1; + else if (!bb->aux) + { + /* We've not seen this block before. Add it to the loop's + list and then add each successor to the work list. */ + bb->aux = loop; + loop->length += mt_block_length (bb); + VEC_safe_push (basic_block, heap, loop->blocks, bb); + FOR_EACH_EDGE (e, ei, bb->succs) + { + if (!VEC_space (loop_work, works, 1)) + { + if (dwork) + { + VEC_block_remove (loop_work, works, 0, dwork); + dwork = 0; + } + else + VEC_reserve (loop_work, heap, works, 1); + } + work = VEC_quick_push (loop_work, works, NULL); + work->block = EDGE_SUCC (bb, ei.index)->dest; + work->loop = loop; + } + } + else if (bb->aux != loop) + { + /* We've seen this block in a different loop. If it's not + the other loop's head, then this loop must be bad. + Otherwise, the other loop might be a nested loop, so + continue from that loop's successor. */ + loop_info other = bb->aux; + + if (other->head != bb) + loop->depth = -1; + else + { + VEC_safe_push (loop_info, heap, loop->loops, other); + work = VEC_safe_push (loop_work, heap, works, NULL); + work->loop = loop; + work->block = other->successor; + } + } + } + VEC_free (loop_work, heap, works); + + /* Now optimize the loops. */ + for (loop = loops; loop; loop = loop->next) + { + rtx iter_reg, insn, init_insn; + rtx init_val, loop_end, loop_init, end_label, head_label; + + if (!mt_loop_nesting (loop)) + { + if (dump_file) + fprintf (dump_file, ";; loop %d is bad\n", loop->loop_no); + continue; + } + + /* Get the loop iteration register. */ + iter_reg = SET_DEST (XVECEXP (PATTERN (loop->dbnz), 0, 1)); + + if (!REG_P (iter_reg)) + { + /* Spilled */ + if (dump_file) + fprintf (dump_file, ";; loop %d has spilled iteration count\n", + loop->loop_no); + continue; + } + + /* Look for the initializing insn */ + init_insn = NULL_RTX; + for (insn = BB_END (loop->predecessor); + insn != PREV_INSN (BB_HEAD (loop->predecessor)); + insn = PREV_INSN (insn)) + { + if (!INSN_P (insn)) + continue; + if (reg_mentioned_p (iter_reg, PATTERN (insn))) + { + rtx set = single_set (insn); + + if (set && rtx_equal_p (iter_reg, SET_DEST (set))) + init_insn = insn; + break; + } + } + + if (!init_insn) + { + if (dump_file) + fprintf (dump_file, ";; loop %d has no initializer\n", + loop->loop_no); + continue; + } + if (dump_file) + { + fprintf (dump_file, ";; loop %d initialized by\n", + loop->loop_no); + print_rtl_single (dump_file, init_insn); + } + + init_val = PATTERN (init_insn); + if (GET_CODE (init_val) == SET) + init_val = SET_SRC (init_val); + if (GET_CODE (init_val) != CONST_INT || INTVAL (init_val) >= 65535) + { + if (dump_file) + fprintf (dump_file, ";; loop %d has complex initializer\n", + loop->loop_no); + continue; + } + + /* Scan all the blocks to make sure they don't use iter_reg. */ + if (mt_scan_loop (loop, iter_reg, loop->dbnz)) + { + if (dump_file) + fprintf (dump_file, ";; loop %d uses iterator\n", + loop->loop_no); + continue; + } + + /* The loop is good for replacement. */ + + /* loop is 1 based, dbnz is zero based. */ + init_val = GEN_INT (INTVAL (init_val) + 1); + + iter_reg = gen_rtx_REG (SImode, LOOP_FIRST + loop->depth - 1); + end_label = gen_label_rtx (); + head_label = XEXP (SET_SRC (XVECEXP (PATTERN (loop->dbnz), 0, 0)), 1); + loop_end = gen_loop_end (iter_reg, head_label); + loop_init = gen_loop_init (iter_reg, init_val, end_label); + loop->init = init_insn; + loop->end_label = end_label; + loop->loop_init = loop_init; + loop->loop_end = loop_end; + replaced = true; + + if (dump_file) + { + fprintf (dump_file, ";; replacing loop %d initializer with\n", + loop->loop_no); + print_rtl_single (dump_file, loop->loop_init); + fprintf (dump_file, ";; replacing loop %d terminator with\n", + loop->loop_no); + print_rtl_single (dump_file, loop->loop_end); + } + } + + /* Now apply the optimizations. Do it this way so we don't mess up + the flow graph half way through. */ + for (loop = loops; loop; loop = loop->next) + if (loop->loop_init) + { + emit_jump_insn_after (loop->loop_init, BB_END (loop->predecessor)); + delete_insn (loop->init); + emit_label_before (loop->end_label, loop->dbnz); + emit_jump_insn_before (loop->loop_end, loop->dbnz); + delete_insn (loop->dbnz); + } + + /* Free up the loop structures */ + while (loops) + { + loop = loops; + loops = loop->next; + VEC_free (loop_info, heap, loop->loops); + VEC_free (basic_block, heap, loop->blocks); + XDELETE (loop); + } + + if (replaced && dump_file) + { + fprintf (dump_file, ";; Replaced loops\n"); + print_rtl (dump_file, get_insns ()); + } +} + +/* Structures to hold branch information during reorg. */ +typedef struct branch_info +{ + rtx insn; /* The branch insn. */ + + struct branch_info *next; +} branch_info; + +typedef struct label_info +{ + rtx label; /* The label. */ + branch_info *branches; /* branches to this label. */ + struct label_info *next; +} label_info; + +/* Chain of labels found in current function, used during reorg. */ +static label_info *mt_labels; + +/* If *X is a label, add INSN to the list of branches for that + label. */ + +static int +mt_add_branches (rtx *x, void *insn) +{ + if (GET_CODE (*x) == LABEL_REF) + { + branch_info *branch = xmalloc (sizeof (*branch)); + rtx label = XEXP (*x, 0); + label_info *info; + + for (info = mt_labels; info; info = info->next) + if (info->label == label) + break; + + if (!info) + { + info = xmalloc (sizeof (*info)); + info->next = mt_labels; + mt_labels = info; + + info->label = label; + info->branches = NULL; + } + + branch->next = info->branches; + info->branches = branch; + branch->insn = insn; + } + return 0; +} + +/* If BRANCH has a filled delay slot, check if INSN is dependent upon + it. If so, undo the delay slot fill. Returns the next insn, if + we patch out the branch. Returns the branch insn, if we cannot + patch out the branch (due to anti-dependency in the delay slot). + In that case, the caller must insert nops at the branch target. */ + +static rtx +mt_check_delay_slot (rtx branch, rtx insn) +{ + rtx slot; + rtx tmp; + rtx p; + rtx jmp; + + gcc_assert (GET_CODE (PATTERN (branch)) == SEQUENCE); + if (INSN_DELETED_P (branch)) + return NULL_RTX; + slot = XVECEXP (PATTERN (branch), 0, 1); + + tmp = PATTERN (insn); + note_stores (PATTERN (slot), insn_dependent_p_1, &tmp); + if (tmp) + /* Not dependent. */ + return NULL_RTX; + + /* Undo the delay slot. */ + jmp = XVECEXP (PATTERN (branch), 0, 0); + + tmp = PATTERN (jmp); + note_stores (PATTERN (slot), insn_dependent_p_1, &tmp); + if (!tmp) + /* Anti dependent. */ + return branch; + + p = PREV_INSN (branch); + NEXT_INSN (p) = slot; + PREV_INSN (slot) = p; + NEXT_INSN (slot) = jmp; + PREV_INSN (jmp) = slot; + NEXT_INSN (jmp) = branch; + PREV_INSN (branch) = jmp; + XVECEXP (PATTERN (branch), 0, 0) = NULL_RTX; + XVECEXP (PATTERN (branch), 0, 1) = NULL_RTX; + delete_insn (branch); + return jmp; +} + +/* Insert nops to satisfy pipeline constraints. We only deal with ms2 + constraints here. Earlier CPUs are dealt with by inserting nops with + final_prescan (but that can lead to inferior code, and is + impractical with ms2's JAL hazard). + + ms2 dynamic constraints + 1) a load and a following use must be separated by one insn + 2) an insn and a following dependent call must be separated by two insns + + only arith insns are placed in delay slots so #1 cannot happen with + a load in a delay slot. #2 can happen with an arith insn in the + delay slot. */ + +static void +mt_reorg_hazard (void) +{ + rtx insn, next; + + /* Find all the branches */ + for (insn = get_insns (); + insn; + insn = NEXT_INSN (insn)) + { + rtx jmp; + + if (!INSN_P (insn)) + continue; + + jmp = PATTERN (insn); + + if (GET_CODE (jmp) != SEQUENCE) + /* If it's not got a filled delay slot, then it can't + conflict. */ + continue; + + jmp = XVECEXP (jmp, 0, 0); + + if (recog_memoized (jmp) == CODE_FOR_tablejump) + for (jmp = XEXP (XEXP (XVECEXP (PATTERN (jmp), 0, 1), 0), 0); + !JUMP_TABLE_DATA_P (jmp); + jmp = NEXT_INSN (jmp)) + continue; + + for_each_rtx (&PATTERN (jmp), mt_add_branches, insn); + } + + /* Now scan for dependencies. */ + for (insn = get_insns (); + insn && !INSN_P (insn); + insn = NEXT_INSN (insn)) + continue; + + for (; + insn; + insn = next) + { + rtx jmp, tmp; + enum attr_type attr; + + gcc_assert (INSN_P (insn) && !INSN_DELETED_P (insn)); + for (next = NEXT_INSN (insn); + next; + next = NEXT_INSN (next)) + { + if (!INSN_P (next)) + continue; + if (GET_CODE (PATTERN (next)) != USE) + break; + } + + jmp = insn; + if (GET_CODE (PATTERN (insn)) == SEQUENCE) + jmp = XVECEXP (PATTERN (insn), 0, 0); + + attr = recog_memoized (jmp) >= 0 ? get_attr_type (jmp) : TYPE_UNKNOWN; + + if (next && attr == TYPE_LOAD) + { + /* A load. See if NEXT is dependent, and if so insert a + nop. */ + + tmp = PATTERN (next); + if (GET_CODE (tmp) == SEQUENCE) + tmp = PATTERN (XVECEXP (tmp, 0, 0)); + note_stores (PATTERN (insn), insn_dependent_p_1, &tmp); + if (!tmp) + emit_insn_after (gen_nop (), insn); + } + + if (attr == TYPE_CALL) + { + /* A call. Make sure we're not dependent on either of the + previous two dynamic instructions. */ + int nops = 0; + int count; + rtx prev = insn; + rtx rescan = NULL_RTX; + + for (count = 2; count && !nops;) + { + int type; + + prev = PREV_INSN (prev); + if (!prev) + { + /* If we reach the start of the function, we must + presume the caller set the address in the delay + slot of the call instruction. */ + nops = count; + break; + } + + if (BARRIER_P (prev)) + break; + if (LABEL_P (prev)) + { + /* Look at branches to this label. */ + label_info *label; + branch_info *branch; + + for (label = mt_labels; + label; + label = label->next) + if (label->label == prev) + { + for (branch = label->branches; + branch; + branch = branch->next) + { + tmp = mt_check_delay_slot (branch->insn, jmp); + + if (tmp == branch->insn) + { + nops = count; + break; + } + + if (tmp && branch->insn == next) + rescan = tmp; + } + break; + } + continue; + } + if (!INSN_P (prev) || GET_CODE (PATTERN (prev)) == USE) + continue; + + if (GET_CODE (PATTERN (prev)) == SEQUENCE) + { + /* Look at the delay slot. */ + tmp = mt_check_delay_slot (prev, jmp); + if (tmp == prev) + nops = count; + break; + } + + type = (INSN_CODE (prev) >= 0 ? get_attr_type (prev) + : TYPE_COMPLEX); + if (type == TYPE_CALL || type == TYPE_BRANCH) + break; + + if (type == TYPE_LOAD + || type == TYPE_ARITH + || type == TYPE_COMPLEX) + { + tmp = PATTERN (jmp); + note_stores (PATTERN (prev), insn_dependent_p_1, &tmp); + if (!tmp) + { + nops = count; + break; + } + } + + if (INSN_CODE (prev) >= 0) + count--; + } + + if (rescan) + for (next = NEXT_INSN (rescan); + next && !INSN_P (next); + next = NEXT_INSN (next)) + continue; + while (nops--) + emit_insn_before (gen_nop (), insn); + } + } + + /* Free the data structures. */ + while (mt_labels) + { + label_info *label = mt_labels; + branch_info *branch, *next; + + mt_labels = label->next; + for (branch = label->branches; branch; branch = next) + { + next = branch->next; + free (branch); + } + free (label); + } +} + +/* Fixup the looping instructions, do delayed branch scheduling, fixup + scheduling hazards. */ + +static void +mt_machine_reorg (void) +{ + if (cfun->machine->has_loops && TARGET_MS2) + mt_reorg_loops (dump_file); + + if (mt_flag_delayed_branch) + dbr_schedule (get_insns (), dump_file); + + if (TARGET_MS2) + { + /* Force all instructions to be split into their final form. */ + split_all_insns_noflow (); + mt_reorg_hazard (); + } +} + +/* Initialize the GCC target structure. */ +const struct attribute_spec mt_attribute_table[]; + +#undef TARGET_ATTRIBUTE_TABLE +#define TARGET_ATTRIBUTE_TABLE mt_attribute_table +#undef TARGET_STRUCT_VALUE_RTX +#define TARGET_STRUCT_VALUE_RTX mt_struct_value_rtx +#undef TARGET_PROMOTE_PROTOTYPES +#define TARGET_PROMOTE_PROTOTYPES hook_bool_tree_true +#undef TARGET_PASS_BY_REFERENCE +#define TARGET_PASS_BY_REFERENCE mt_pass_by_reference +#undef TARGET_MUST_PASS_IN_STACK +#define TARGET_MUST_PASS_IN_STACK mt_pass_in_stack +#undef TARGET_ARG_PARTIAL_BYTES +#define TARGET_ARG_PARTIAL_BYTES mt_arg_partial_bytes +#undef TARGET_SETUP_INCOMING_VARARGS +#define TARGET_SETUP_INCOMING_VARARGS mt_setup_incoming_varargs +#undef TARGET_MACHINE_DEPENDENT_REORG +#define TARGET_MACHINE_DEPENDENT_REORG mt_machine_reorg + +struct gcc_target targetm = TARGET_INITIALIZER; + +#include "gt-mt.h" diff --git a/gcc/config/mt/mt.h b/gcc/config/mt/mt.h new file mode 100644 index 00000000000..9764d7fc739 --- /dev/null +++ b/gcc/config/mt/mt.h @@ -0,0 +1,869 @@ +/* Target Definitions for MorphoRISC1 + Copyright (C) 2005 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, 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301, USA. */ + +extern struct rtx_def * mt_ucmpsi3_libcall; + +enum processor_type +{ + PROCESSOR_MS1_64_001, + PROCESSOR_MS1_16_002, + PROCESSOR_MS1_16_003, + PROCESSOR_MS2 +}; + +enum epilogue_type +{ + EH_EPILOGUE, + NORMAL_EPILOGUE +}; + +extern enum processor_type mt_cpu; + + +/* Support for a compile-time default CPU, et cetera. The rules are: + --with-arch is ignored if -march is specified. */ +#define OPTION_DEFAULT_SPECS \ + {"arch", "%{!march=*:-march=%(VALUE)}" } + +/* A C string constant that tells the GCC driver program options to pass to + the assembler. */ +#undef ASM_SPEC +#define ASM_SPEC "%{march=*} %{!march=*: -march=ms1-16-002}" + +/* A string to pass to at the end of the command given to the linker. */ +#undef LIB_SPEC +#define LIB_SPEC "--start-group -lc -lsim --end-group \ +%{msim: ; \ +march=ms1-64-001:-T 64-001.ld%s; \ +march=ms1-16-002:-T 16-002.ld%s; \ +march=ms1-16-003:-T 16-003.ld%s; \ +march=ms2:-T ms2.ld%s; \ + :-T 16-002.ld}" + +/* A string to pass at the very beginning of the command given to the + linker. */ +#undef STARTFILE_SPEC +#define STARTFILE_SPEC "%{msim:crt0.o%s;\ +march=ms1-64-001:%{!mno-crt0:crt0-64-001.o%s} startup-64-001.o%s; \ +march=ms1-16-002:%{!mno-crt0:crt0-16-002.o%s} startup-16-002.o%s; \ +march=ms1-16-003:%{!mno-crt0:crt0-16-003.o%s} startup-16-003.o%s; \ +march=ms2:%{!mno-crt0:crt0-ms2.o%s} startup-ms2.o%s; \ + :%{!mno-crt0:crt0-16-002.o%s} startup-16-002.o%s} \ +crti.o%s crtbegin.o%s" + +/* A string to pass at the end of the command given to the linker. */ +#undef ENDFILE_SPEC +#define ENDFILE_SPEC "%{msim:exit.o%s; \ +march=ms1-64-001:exit-64-001.o%s; \ +march=ms1-16-002:exit-16-002.o%s; \ +march=ms1-16-003:exit-16-003.o%s; \ +march=ms2:exit-ms2.o%s; \ + :exit-16-002.o%s} \ + crtend.o%s crtn.o%s" + +/* Run-time target specifications. */ + +#define TARGET_CPU_CPP_BUILTINS() \ + do \ + { \ + builtin_define_with_int_value ("__mt__", mt_cpu); \ + builtin_assert ("machine=mt"); \ + } \ + while (0) + +#define TARGET_MS1_64_001 (mt_cpu == PROCESSOR_MS1_64_001) +#define TARGET_MS1_16_002 (mt_cpu == PROCESSOR_MS1_16_002) +#define TARGET_MS1_16_003 (mt_cpu == PROCESSOR_MS1_16_003) +#define TARGET_MS2 (mt_cpu == PROCESSOR_MS2) + +#define TARGET_VERSION fprintf (stderr, " (mt)"); + +#define OVERRIDE_OPTIONS mt_override_options () + +#define CAN_DEBUG_WITHOUT_FP 1 + + +/* Storage Layout. */ + +#define BITS_BIG_ENDIAN 0 + +#define BYTES_BIG_ENDIAN 1 + +#define WORDS_BIG_ENDIAN 1 + +#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 to the minimum alignment enforced by hardware for + the stack pointer on this machine. The definition is a C + expression for the desired alignment (measured in bits). This + value is used as a default if PREFERRED_STACK_BOUNDARY is not + defined. On most machines, this should be the same as + PARM_BOUNDARY. */ +#define STACK_BOUNDARY 32 + +/* Alignment required for a function entry point, in bits. */ +#define FUNCTION_BOUNDARY 32 + +/* Biggest alignment that any data type can require on this machine, + in bits. */ +#define BIGGEST_ALIGNMENT 32 + +/* If defined, a C expression to compute the alignment for a variable + in the static store. 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. */ +#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)) + +/* Number of bits which any structure or union's size must be a multiple of. + Each structure or union's size is rounded up to a multiple of this. + + If you do not define this macro, the default is the same as `BITS_PER_UNIT'. */ +#define STRUCTURE_SIZE_BOUNDARY 32 + +/* 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. */ +#define PCC_BITFIELD_TYPE_MATTERS 1 + +/* Layout of Source Language Data Types. */ + +#define INT_TYPE_SIZE 32 + +#define SHORT_TYPE_SIZE 16 + +#define LONG_TYPE_SIZE 32 + +#define LONG_LONG_TYPE_SIZE 64 + +#define CHAR_TYPE_SIZE 8 + +#define FLOAT_TYPE_SIZE 32 + +#define DOUBLE_TYPE_SIZE 64 + +#define LONG_DOUBLE_TYPE_SIZE 64 + +#define DEFAULT_SIGNED_CHAR 1 + +/* Register Basics. */ + +/* General purpose registers. */ +#define GPR_FIRST 0 /* First gpr */ +#define GPR_LAST 15 /* Last possible gpr */ + +#define GPR_R0 0 /* Always 0 */ +#define GPR_R7 7 /* Used as a scratch register */ +#define GPR_R8 8 /* Used as a scratch register */ +#define GPR_R9 9 /* Used as a scratch register */ +#define GPR_R10 10 /* Used as a scratch register */ +#define GPR_R11 11 /* Used as a scratch register */ +#define GPR_FP 12 /* Frame pointer */ +#define GPR_SP 13 /* Stack pointer */ +#define GPR_LINK 14 /* Saved return address as + seen by the caller */ +#define GPR_INTERRUPT_LINK 15 /* hold return addres for interrupts */ + +#define LOOP_FIRST (GPR_LAST + 1) +#define LOOP_LAST (LOOP_FIRST + 3) + +/* Argument register that is eliminated in favor of the frame and/or stack + pointer. Also add register to point to where the return address is + stored. */ +#define SPECIAL_REG_FIRST (LOOP_LAST + 1) +#define SPECIAL_REG_LAST (SPECIAL_REG_FIRST) +#define ARG_POINTER_REGNUM (SPECIAL_REG_FIRST + 0) +#define SPECIAL_REG_P(R) ((R) == SPECIAL_REG_FIRST) + +/* The first/last register that can contain the arguments to a function. */ +#define FIRST_ARG_REGNUM 1 +#define LAST_ARG_REGNUM 4 + +/* The register used to hold functions return value */ +#define RETVAL_REGNUM 11 + +#define FIRST_PSEUDO_REGISTER (SPECIAL_REG_LAST + 1) + +#define IS_PSEUDO_P(R) (REGNO (R) >= FIRST_PSEUDO_REGISTER) + +/* R0 always has the value 0 + R10 static link + R12 FP pointer to active frame + R13 SP pointer to top of stack + R14 RA return address + R15 IRA interrupt return address. */ +#define FIXED_REGISTERS { 1, 0, 0, 0, 0, 0, 0, 0, \ + 0, 0, 0, 0, 1, 1, 1, 1, \ + 1, 1, 1, 1, 1 \ + } + +/* Like `FIXED_REGISTERS' but has 1 for each register that is clobbered (in + general) by function calls as well as for fixed registers. This macro + therefore identifies the registers that are not available for general + allocation of values that must live across function calls. */ +#define CALL_USED_REGISTERS { 1, 1, 1, 1, 1, 0, 0, 1, \ + 1, 1, 1, 1, 1, 1, 1, 1, \ + 1, 1, 1, 1, 1 \ + } + + +/* How Values Fit in Registers. */ + +#define HARD_REGNO_NREGS(REGNO, MODE) \ + ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD) + +#define HARD_REGNO_MODE_OK(REGNO, MODE) 1 + +/* A C expression that is nonzero if a value of mode MODE1 is + accessible in mode MODE2 without copying. */ +#define MODES_TIEABLE_P(MODE1, MODE2) 1 + +/* Register Classes. */ + +enum reg_class +{ + NO_REGS, + ALL_REGS, + LIM_REG_CLASSES +}; + +#define GENERAL_REGS ALL_REGS + +#define N_REG_CLASSES ((int) LIM_REG_CLASSES) + +#define REG_CLASS_NAMES {"NO_REGS", "ALL_REGS" } + +#define REG_CLASS_CONTENTS \ + { \ + { 0x0 }, \ + { 0x000fffff }, \ + } + +/* A C expression whose value is a register class containing hard register + REGNO. In general there is more than one such class; choose a class which + is "minimal", meaning that no smaller class also contains the register. */ +#define REGNO_REG_CLASS(REGNO) GENERAL_REGS + +#define BASE_REG_CLASS GENERAL_REGS + +#define INDEX_REG_CLASS NO_REGS + +#define REG_CLASS_FROM_LETTER(CHAR) NO_REGS + +#define REGNO_OK_FOR_BASE_P(NUM) 1 + +#define REGNO_OK_FOR_INDEX_P(NUM) 1 + +/* 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 +*/ +#define PREFERRED_RELOAD_CLASS(X, CLASS) (CLASS) + +#define SECONDARY_RELOAD_CLASS(CLASS,MODE,X) \ + mt_secondary_reload_class((CLASS), (MODE), (X)) + +/* A C expression for the maximum number of consecutive registers of + class CLASS needed to hold a value of mode MODE. */ +#define CLASS_MAX_NREGS(CLASS, MODE) \ + ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD) + +/* For MorphoRISC1: + + `I' is used for the range of constants an arithmetic insn can + actually contain (16 bits signed integers). + + `J' is used for the range which is just zero (ie, $r0). + + `K' is used for the range of constants a logical insn can actually + contain (16 bit zero-extended integers). + + `L' is used for the range of constants that be loaded with lui + (ie, the bottom 16 bits are zero). + + `M' is used for the range of constants that take two words to load + (ie, not matched by `I', `K', and `L'). + + `N' is used for negative 16 bit constants other than -65536. + + `O' is a 15 bit signed integer. + + `P' is used for positive 16 bit constants. */ + +#define SMALL_INT(X) ((unsigned HOST_WIDE_INT) (INTVAL (X) + 0x8000) < 0x10000) +#define SMALL_INT_UNSIGNED(X) ((unsigned HOST_WIDE_INT) (INTVAL (X)) < 0x10000) + +/* A C expression that defines the machine-dependent operand + constraint letters 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' ? ((unsigned HOST_WIDE_INT) ((VALUE) + 0x8000) < 0x10000) \ + : (C) == 'J' ? ((VALUE) == 0) \ + : (C) == 'K' ? ((unsigned HOST_WIDE_INT) (VALUE) < 0x10000) \ + : (C) == 'L' ? (((VALUE) & 0x0000ffff) == 0 \ + && (((VALUE) & ~2147483647) == 0 \ + || ((VALUE) & ~2147483647) == ~2147483647)) \ + : (C) == 'M' ? ((((VALUE) & ~0x0000ffff) != 0) \ + && (((VALUE) & ~0x0000ffff) != ~0x0000ffff) \ + && (((VALUE) & 0x0000ffff) != 0 \ + || (((VALUE) & ~2147483647) != 0 \ + && ((VALUE) & ~2147483647) != ~2147483647))) \ + : (C) == 'N' ? ((unsigned HOST_WIDE_INT) ((VALUE) + 0xffff) < 0xffff) \ + : (C) == 'O' ? ((unsigned HOST_WIDE_INT) ((VALUE) + 0x4000) < 0x8000) \ + : (C) == 'P' ? ((VALUE) != 0 && (((VALUE) & ~0x0000ffff) == 0)) \ + : 0) + +/* A C expression that defines the machine-dependent operand constraint letters + (`G', `H') that specify particular ranges of `const_double' values. */ +#define CONST_DOUBLE_OK_FOR_LETTER_P(VALUE, C) 0 + +/* Most negative value represent on mt */ +#define MT_MIN_INT 0x80000000 + +/* Basic Stack Layout. */ + +enum save_direction +{ + FROM_PROCESSOR_TO_MEM, + FROM_MEM_TO_PROCESSOR +}; + +/* Tell prologue and epilogue if register REGNO should be saved / restored. + The return address and frame pointer are treated separately. + Don't consider them here. */ +#define MUST_SAVE_REGISTER(regno) \ + ( (regno) != GPR_LINK \ + && (regno) != GPR_FP \ + && (regno) != GPR_SP \ + && (regno) != GPR_R0 \ + && (( regs_ever_live [regno] && ! call_used_regs [regno] ) \ + /* Save ira register in an interrupt handler. */ \ + || (interrupt_handler && (regno) == GPR_INTERRUPT_LINK) \ + /* Save any register used in an interrupt handler. */ \ + || (interrupt_handler && regs_ever_live [regno]) \ + /* Save call clobbered registers in non-leaf interrupt \ + handlers. */ \ + || (interrupt_handler && call_used_regs[regno] \ + && !current_function_is_leaf) \ + ||(current_function_calls_eh_return \ + && (regno == GPR_R7 || regno == GPR_R8)) \ + ) \ + ) + +#define STACK_GROWS_DOWNWARD 1 + +/* 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 current_function_outgoing_args_size + +/* 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 + +#define RETURN_ADDR_RTX(COUNT, FRAMEADDR) \ + mt_return_addr_rtx (COUNT) + +/* 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, GPR_LINK) + +/* A C expression whose value is an integer giving the offset, in bytes, from + the value of the stack pointer register to the top of the stack frame at the + beginning of any function, before the prologue. The top of the frame is + defined to be the value of the stack pointer in the previous frame, just + before the call instruction. + + You only need to define this macro if you want to support call frame + debugging information like that provided by DWARF 2. */ +#define INCOMING_FRAME_SP_OFFSET 0 + +#define STACK_POINTER_REGNUM GPR_SP + +#define FRAME_POINTER_REGNUM GPR_FP + +/* The register number of the arg pointer register, which is used to + access the function's argument list. */ +#define ARG_POINTER_REGNUM (SPECIAL_REG_FIRST + 0) + +/* Register numbers used for passing a function's static chain pointer. */ +#define STATIC_CHAIN_REGNUM 10 + +/* A C expression which is nonzero if a function must have and use a frame + pointer. */ +#define FRAME_POINTER_REQUIRED 0 + +/* Structure to be filled in by compute_frame_size with register + save masks, and offsets for the current function. */ + +struct mt_frame_info +{ + unsigned int total_size; /* # Bytes that the entire frame takes up. */ + unsigned int pretend_size; /* # Bytes we push and pretend caller did. */ + unsigned int args_size; /* # Bytes that outgoing arguments take up. */ + unsigned int extra_size; + unsigned int reg_size; /* # Bytes needed to store regs. */ + unsigned int var_size; /* # Bytes that variables take up. */ + unsigned int frame_size; /* # Bytes in current frame. */ + unsigned int reg_mask; /* Mask of saved registers. */ + unsigned int save_fp; /* Nonzero if frame pointer must be saved. */ + unsigned int save_lr; /* Nonzero if return pointer must be saved. */ + int initialized; /* Nonzero if frame size already calculated. */ +}; + +extern struct mt_frame_info current_frame_info; + +/* If defined, this macro specifies a table of register pairs used to eliminate + unneeded registers that point into the stack frame. */ +#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 non-zero if the compiler is allowed to try to + replace register number FROM with register number TO. */ +#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) = mt_initial_elimination_offset (FROM, TO) + +/* If defined, the maximum amount of space required for outgoing + arguments will be computed and placed into the variable + `current_function_outgoing_args_size'. */ +#define ACCUMULATE_OUTGOING_ARGS 1 + +/* Define this if it is the responsibility of the caller to + allocate the area reserved for arguments passed in registers. */ +#define OUTGOING_REG_PARM_STACK_SPACE + +/* The number of register assigned to holding function arguments. */ +#define MT_NUM_ARG_REGS 4 + +/* Define this if it is the responsibility of the caller to allocate + the area reserved for arguments passed in registers. */ +#define REG_PARM_STACK_SPACE(FNDECL) (MT_NUM_ARG_REGS * UNITS_PER_WORD) + +/* Define this macro if `REG_PARM_STACK_SPACE' is defined, but the stack + parameters don't skip the area specified by it. */ +#define STACK_PARMS_IN_REG_PARM_AREA + +/* 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. */ +#define RETURN_POPS_ARGS(FUNDECL, FUNTYPE, STACK_SIZE) 0 + +#define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \ + mt_function_arg (& (CUM), (MODE), (TYPE), (NAMED), FALSE) + +#define CUMULATIVE_ARGS int + +#define INIT_CUMULATIVE_ARGS(CUM, FNTYPE, LIBNAME, FNDECL, N_NAMED_ARGS) \ + mt_init_cumulative_args (& (CUM), FNTYPE, LIBNAME, FNDECL, FALSE) + +#define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED) \ + mt_function_arg_advance (&CUM, MODE, TYPE, NAMED) + +#define FUNCTION_ARG_BOUNDARY(MODE, TYPE) \ + mt_function_arg_boundary (MODE, TYPE) + +#define FUNCTION_ARG_REGNO_P(REGNO) \ + ((REGNO) >= FIRST_ARG_REGNUM && ((REGNO) <= LAST_ARG_REGNUM)) + +#define RETURN_VALUE_REGNUM RETVAL_REGNUM + +#define FUNCTION_VALUE(VALTYPE, FUNC) \ + mt_function_value (VALTYPE, TYPE_MODE(VALTYPE), FUNC) + +#define LIBCALL_VALUE(MODE) \ + mt_function_value (NULL_TREE, MODE, NULL_TREE) + +#define FUNCTION_VALUE_REGNO_P(REGNO) ((REGNO) == RETURN_VALUE_REGNUM) + +/* A C expression which can inhibit the returning of certain function + values in registers, based on the type of value. */ +#define RETURN_IN_MEMORY(TYPE) (int_size_in_bytes (TYPE) > UNITS_PER_WORD) + +/* Define this macro to be 1 if all structure and union return values must be + in memory. */ +#define DEFAULT_PCC_STRUCT_RETURN 0 + +/* 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. */ +#define EXIT_IGNORE_STACK 1 + +#define EPILOGUE_USES(REGNO) mt_epilogue_uses(REGNO) + +/* Define this macro if the function epilogue contains delay slots to which + instructions from the rest of the function can be "moved". */ +#define DELAY_SLOTS_FOR_EPILOGUE 1 + +/* A C expression that returns 1 if INSN can be placed in delay slot number N + of the epilogue. */ +#define ELIGIBLE_FOR_EPILOGUE_DELAY(INSN, N) 0 + +#define FUNCTION_PROFILER(FILE, LABELNO) gcc_unreachable () + +/* Trampolines are not implemented. */ +#define TRAMPOLINE_SIZE 0 + +#define INITIALIZE_TRAMPOLINE(ADDR, FNADDR, STATIC_CHAIN) + +/* ?? What is this -- aldyh ?? */ +#define UCMPSI3_LIBCALL "__ucmpsi3" + +/* Addressing Modes. */ + +/* A C expression that is 1 if the RTX X is a constant which is a valid + address. */ +#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 1 + +#ifdef REG_OK_STRICT +#define GO_IF_LEGITIMATE_ADDRESS(MODE, X, ADDR) \ +{ \ + if (mt_legitimate_address_p (MODE, X, 1)) \ + goto ADDR; \ +} +#else +#define GO_IF_LEGITIMATE_ADDRESS(MODE, X, ADDR) \ +{ \ + if (mt_legitimate_address_p (MODE, X, 0)) \ + goto ADDR; \ +} +#endif + +#ifdef REG_OK_STRICT +#define REG_OK_FOR_BASE_P(X) mt_reg_ok_for_base_p (X, 1) +#else +#define REG_OK_FOR_BASE_P(X) mt_reg_ok_for_base_p (X, 0) +#endif + +#define REG_OK_FOR_INDEX_P(X) REG_OK_FOR_BASE_P (X) + +#define LEGITIMIZE_ADDRESS(X, OLDX, MODE, WIN) {} + +#define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR, LABEL) + +#define LEGITIMATE_CONSTANT_P(X) 1 + +/* A C expression for the cost of moving data of mode M between a register and + memory. A value of 2 is the default; this cost is relative to those in + `REGISTER_MOVE_COST'. + + If moving between registers and memory is more expensive than between two + registers, you should define this macro to express the relative cost. */ +#define MEMORY_MOVE_COST(M,C,I) 10 + +/* 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. */ +#define SLOW_BYTE_ACCESS 1 + +#define SLOW_UNALIGNED_ACCESS(MODE, ALIGN) 1 + +#define TEXT_SECTION_ASM_OP ".text" + +#define DATA_SECTION_ASM_OP ".data" + +#define BSS_SECTION_ASM_OP "\t.section\t.bss" + +/* 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" + +/* This is how to output an assembler line defining a `char' constant. */ +#define ASM_OUTPUT_CHAR(FILE, VALUE) \ + do \ + { \ + fprintf (FILE, "\t.byte\t"); \ + output_addr_const (FILE, (VALUE)); \ + fprintf (FILE, "\n"); \ + } \ + while (0) + +/* This is how to output an assembler line defining a `short' constant. */ +#define ASM_OUTPUT_SHORT(FILE, VALUE) \ + do \ + { \ + fprintf (FILE, "\t.hword\t"); \ + output_addr_const (FILE, (VALUE)); \ + fprintf (FILE, "\n"); \ + } \ + while (0) + +/* This is how to output an assembler line defining an `int' constant. + We also handle symbol output here. */ +#define ASM_OUTPUT_INT(FILE, VALUE) \ + do \ + { \ + fprintf (FILE, "\t.word\t"); \ + output_addr_const (FILE, (VALUE)); \ + fprintf (FILE, "\n"); \ + } \ + while (0) + +/* A C statement to output to the stdio stream STREAM an assembler instruction + to assemble a single byte containing the number VALUE. + + This declaration must be present. */ +#define ASM_OUTPUT_BYTE(STREAM, VALUE) \ + fprintf (STREAM, "\t%s\t0x%x\n", ASM_BYTE_OP, (VALUE)) + +/* Globalizing directive for a label. */ +#define GLOBAL_ASM_OP "\t.globl " + +#define REGISTER_NAMES \ +{ "R0", "R1", "R2", "R3", "R4", "R5", "R6", "R7", \ + "R8", "R9", "R10", "R11", "R12", "R13", "R14", "R15", \ + "LOOP1", "LOOP2", "LOOP3", "LOOP4", "ap" } + +/* If defined, a C initializer for an array of structures containing a name and + a register number. This macro defines additional names for hard registers, + thus allowing the `asm' option in declarations to refer to registers using + alternate names. */ +#define ADDITIONAL_REGISTER_NAMES \ +{ { "FP", 12}, {"SP", 13}, {"RA", 14}, {"IRA", 15} } + +/* 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. */ +#define ASM_OUTPUT_OPCODE(STREAM, PTR) \ + (PTR) = mt_asm_output_opcode (STREAM, PTR) + +#define FINAL_PRESCAN_INSN(INSN, OPVEC, NOPERANDS) \ + mt_final_prescan_insn (INSN, OPVEC, NOPERANDS) + +#define PRINT_OPERAND(STREAM, X, CODE) mt_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. */ +/* #: Print nop for delay slot. */ +#define PRINT_OPERAND_PUNCT_VALID_P(CODE) ((CODE) == '#') + +#define PRINT_OPERAND_ADDRESS(STREAM, X) mt_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. */ +#define REGISTER_PREFIX "%" +#define LOCAL_LABEL_PREFIX "." +#define USER_LABEL_PREFIX "" +#define IMMEDIATE_PREFIX "" + +/* 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. */ +#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'. */ +#define ASM_OUTPUT_ADDR_VEC_ELT(STREAM, VALUE) \ +fprintf (STREAM, "\t.word .L%d\n", VALUE) + +#define DWARF_FRAME_RETURN_COLUMN DWARF_FRAME_REGNUM (GPR_LINK) + +#define EH_RETURN_DATA_REGNO(N) \ + ((N) == 0 ? GPR_R7 : (N) == 1 ? GPR_R8 : INVALID_REGNUM) + +#define EH_RETURN_STACKADJ_REGNO GPR_R11 +#define EH_RETURN_STACKADJ_RTX \ + gen_rtx_REG (SImode, EH_RETURN_STACKADJ_REGNO) +#define EH_RETURN_HANDLER_REGNO GPR_R10 +#define EH_RETURN_HANDLER_RTX \ + gen_rtx_REG (SImode, EH_RETURN_HANDLER_REGNO) + +#define ASM_OUTPUT_ALIGN(STREAM, POWER) \ + fprintf ((STREAM), "\t.p2align %d\n", (POWER)) + +#define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG + +#ifndef DWARF2_DEBUGGING_INFO +#define DWARF2_DEBUGGING_INFO +#endif + +/* Define this macro if GCC should produce dwarf version 2-style + line numbers. This usually requires extending the assembler to + support them, and #defining DWARF2_LINE_MIN_INSN_LENGTH in the + assembler configuration header files. */ +#define DWARF2_ASM_LINE_DEBUG_INFO 1 + +/* 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 + +/* The maximum number of bytes that a single instruction can move quickly from + memory to memory. */ +#define MOVE_MAX 4 + +/* 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 + +#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 HANDLE_SYSV_PRAGMA 1 + +/* Indicate how many instructions can be issued at the same time. */ +#define ISSUE_RATE 1 + +/* Define the information needed to generate branch and scc insns. This is + stored from the compare operation. Note that we can't use "rtx" here + since it hasn't been defined! */ + +extern struct rtx_def * mt_compare_op0; +extern struct rtx_def * mt_compare_op1; + diff --git a/gcc/config/mt/mt.md b/gcc/config/mt/mt.md new file mode 100644 index 00000000000..fd244386ccd --- /dev/null +++ b/gcc/config/mt/mt.md @@ -0,0 +1,1501 @@ +;; Machine description for MorphoRISC1 +;; Copyright (C) 2005 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, 51 Franklin Street, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;; UNSPECs +(define_constants + [ + (UNSPEC_BLOCKAGE 0) + (UNSPEC_EI 1) + (UNSPEC_DI 2) + (UNSPEC_LOOP 3) + ]) + +;; Attributes +(define_attr "type" "branch,call,load,store,io,arith,complex,unknown" + (const_string "unknown") ) + +;; 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)) + + +;; DFA scheduler. +(define_automaton "other") +(define_cpu_unit "decode_unit" "other") +(define_cpu_unit "memory_unit" "other") +(define_cpu_unit "branch_unit" "other") + +(define_insn_reservation "mem_access" 2 + (ior (eq_attr "type" "load") (eq_attr "type" "store")) + "decode_unit+memory_unit*2") + +(define_insn_reservation "io_access" 2 + (eq_attr "type" "io") + "decode_unit+memory_unit*2") + +(define_insn_reservation "branch_access" 2 + (ior (eq_attr "type" "branch") + (eq_attr "type" "call")) + "decode_unit+branch_unit*2") + +(define_insn_reservation "arith_access" 1 + (eq_attr "type" "arith") + "decode_unit") + +(define_bypass 2 "arith_access" "branch_access") +(define_bypass 3 "mem_access" "branch_access") +(define_bypass 3 "io_access" "branch_access") + + +;; Delay Slots + +;; The mt does not allow branches in the delay slot. +;; The mt does not allow back to back memory or io instruction. +;; The compiler does not know what the type of instruction is at +;; the destination of the branch. Thus, only type that will be acceptable +;; (safe) is the arith type. + +(define_delay (ior (eq_attr "type" "branch") + (eq_attr "type" "call")) + [(eq_attr "type" "arith") (nil) (nil)]) + + +(define_insn "decrement_and_branch_until_zero" + [(set (pc) + (if_then_else + (ne (match_operand:SI 0 "nonimmediate_operand" "+r,*m") + (const_int 0)) + (label_ref (match_operand 1 "" "")) + (pc))) + (set (match_dup 0) + (plus:SI (match_dup 0) + (const_int -1))) + (clobber (match_scratch:SI 2 "=X,&r")) + (clobber (match_scratch:SI 3 "=X,&r"))] + "TARGET_MS1_16_003 || TARGET_MS2" + "@ + dbnz\t%0, %l1%# + #" + [(set_attr "length" "4,16") + (set_attr "type" "branch,unknown")] +) + +;; Split the above to handle the case where operand 0 is in memory +;; (a register that couldn't get a hard register). +(define_split + [(set (pc) + (if_then_else + (ne (match_operand:SI 0 "memory_operand" "") + (const_int 0)) + (label_ref (match_operand 1 "" "")) + (pc))) + (set (match_dup 0) + (plus:SI (match_dup 0) + (const_int -1))) + (clobber (match_scratch:SI 2 "")) + (clobber (match_scratch:SI 3 ""))] + "TARGET_MS1_16_003 || TARGET_MS2" + [(set (match_dup 2) (match_dup 0)) + (set (match_dup 3) (plus:SI (match_dup 2) (const_int -1))) + (set (match_dup 0) (match_dup 3)) + (set (pc) + (if_then_else + (ne (match_dup 2) + (const_int 0)) + (label_ref (match_dup 1)) + (pc)))] + "") + +;; This peephole is defined in the vain hope that it might actually trigger one +;; day, although I have yet to find a test case that matches it. The normal +;; problem is that GCC likes to move the loading of the constant value -1 out +;; of the loop, so it is not here to be matched. + +(define_peephole2 + [(set (match_operand:SI 0 "register_operand" "") + (plus:SI (match_dup 0) (const_int -1))) + (set (match_operand:SI 1 "register_operand" "") + (const_int -1)) + (set (pc) (if_then_else + (ne (match_dup 0) (match_dup 1)) + (label_ref (match_operand 2 "" "")) + (pc)))] + "TARGET_MS1_16_003 || TARGET_MS2" + [(parallel [(set (pc) + (if_then_else + (ne (match_dup 0) (const_int 0)) + (label_ref (match_dup 2)) + (pc))) + (set (match_dup 0) + (plus:SI (match_dup 0) (const_int -1))) + (clobber (reg:SI 0)) + (clobber (reg:SI 0))])] + "") + + +;; Loop instructions. ms2 has a low overhead looping instructions. +;; these take a constant or register loop count and a loop length +;; offset. Unfortunately the loop can only be up to 256 instructions, +;; We deal with longer loops by moving the loop end upwards. To do +;; otherwise would force us to to be very pessimistic right up until +;; the end. + +;; This instruction is a placeholder to make the control flow explicit. +(define_insn "loop_end" + [(set (pc) (if_then_else + (ne (match_operand:SI 0 "register_operand" "") + (const_int 1)) + (label_ref (match_operand 1 "" "")) + (pc))) + (set (match_dup 0) (plus:SI (match_dup 0) (const_int -1))) + (unspec [(const_int 0)] UNSPEC_LOOP)] + "TARGET_MS2" + ";loop end %0,%l1" + [(set_attr "length" "0")]) + +;; This is the real looping instruction. It is placed just before the +;; loop body. We make it a branch insn, so it stays at the end of the +;; block it is in. +(define_insn "loop_init" + [(set (match_operand:SI 0 "register_operand" "=r,r") + (match_operand:SI 1 "uns_arith_operand" "r,K")) + (unspec [(label_ref (match_operand 2 "" ""))] UNSPEC_LOOP)] + "TARGET_MS2" + "@ + loop %1,%l2 ;%0%# + loopi %1,%l2 ;%0%#" + [(set_attr "length" "4") + (set_attr "type" "branch")]) + +; operand 0 is the loop count pseudo register +; operand 1 is the number of loop iterations or 0 if it is unknown +; operand 2 is the maximum number of loop iterations +; operand 3 is the number of levels of enclosed loops +; operand 4 is the label to jump to at the top of the loop +(define_expand "doloop_end" + [(parallel [(set (pc) (if_then_else + (ne (match_operand:SI 0 "nonimmediate_operand" "") + (const_int 0)) + (label_ref (match_operand 4 "" "")) + (pc))) + (set (match_dup 0) + (plus:SI (match_dup 0) + (const_int -1))) + (clobber (match_scratch:SI 5 "")) + (clobber (match_scratch:SI 6 ""))])] + "TARGET_MS1_16_003 || TARGET_MS2" + {mt_add_loop ();}) + +;; Moves + +(define_expand "loadqi" + [ + ;; compute shift + (set (match_operand:SI 2 "register_operand" "") + (and:SI (match_dup 1) (const_int 3))) + (set (match_dup 2) (xor:SI (match_dup 2) (const_int 3))) + (set (match_dup 2 ) (ashift:SI (match_dup 2) (const_int 3))) + + ;; get word that contains byte + (set (match_operand:SI 0 "register_operand" "") + (mem:SI (and:SI (match_operand:SI 1 "register_operand" "") + (const_int -3)))) + + ;; align byte + (set (match_dup 0) (ashiftrt:SI (match_dup 0) (match_dup 2))) + ] + "" + "") + + +;; storeqi +;; operand 0 byte value to store +;; operand 1 address +;; operand 2 temp, word containing byte +;; operand 3 temp, shift count +;; operand 4 temp, mask, aligned and masked byte +;; operand 5 (unused) +(define_expand "storeqi" + [ + ;; compute shift + (set (match_operand:SI 3 "register_operand" "") + (and:SI (match_operand:SI 1 "register_operand" "") (const_int 3))) + (set (match_dup 3) (xor:SI (match_dup 3) (const_int 3))) + (set (match_dup 3) (ashift:SI (match_dup 3) (const_int 3))) + + ;; get word that contains byte + (set (match_operand:SI 2 "register_operand" "") + (mem:SI (and:SI (match_dup 1) (const_int -3)))) + + ;; generate mask + (set (match_operand:SI 4 "register_operand" "") (const_int 255)) + (set (match_dup 4) (ashift:SI (match_dup 4) (match_dup 3))) + (set (match_dup 4) (not:SI (match_dup 4))) + + ;; clear appropriate bits + (set (match_dup 2) (and:SI (match_dup 2) (match_dup 4))) + + ;; align byte + (set (match_dup 4) + (and:SI (match_operand:SI 0 "register_operand" "") (const_int 255))) + (set (match_dup 4) (ashift:SI (match_dup 4) (match_dup 3))) + + ;; combine + (set (match_dup 2) (ior:SI (match_dup 4) (match_dup 2))) + ;; store updated word + (set (mem:SI (and:SI (match_dup 1) (const_int -3))) (match_dup 2)) + ] + "" + "") + + +(define_expand "movqi" + [(set (match_operand:QI 0 "general_operand" "") + (match_operand:QI 1 "general_operand" ""))] + "" + " +{ + if (!reload_in_progress + && !reload_completed + && GET_CODE (operands[0]) == MEM + && GET_CODE (operands[1]) == MEM) + operands[1] = copy_to_mode_reg (QImode, operands[1]); + + if ( (! TARGET_BYTE_ACCESS) && GET_CODE (operands[0]) == MEM) + { + rtx scratch1 = gen_reg_rtx (SImode); + rtx scratch2 = gen_reg_rtx (SImode); + rtx scratch3 = gen_reg_rtx (SImode); + rtx data = operands[1]; + rtx address = XEXP (operands[0], 0); + rtx seq; + + if ( GET_CODE (data) != REG ) + data = copy_to_mode_reg (QImode, data); + + if ( GET_CODE (address) != REG ) + address = copy_to_mode_reg (SImode, address); + + start_sequence (); + emit_insn (gen_storeqi (gen_lowpart (SImode, data), address, + scratch1, scratch2, scratch3)); + mt_set_memflags (operands[0]); + seq = get_insns (); + end_sequence (); + emit_insn (seq); + DONE; + } + + if ( (! TARGET_BYTE_ACCESS) && GET_CODE (operands[1]) == MEM) + { + rtx scratch1 = gen_reg_rtx (SImode); + rtx data = operands[0]; + rtx address = XEXP (operands[1], 0); + rtx seq; + + if ( GET_CODE (address) != REG ) + address = copy_to_mode_reg (SImode, address); + + start_sequence (); + emit_insn (gen_loadqi (gen_lowpart (SImode, data), address, scratch1)); + mt_set_memflags (operands[1]); + seq = get_insns (); + end_sequence (); + emit_insn (seq); + DONE; + } + + /* If the load is a pseudo register in a stack slot, some simplification + can be made because the loads are aligned */ + if ( (! TARGET_BYTE_ACCESS) + && (reload_in_progress && GET_CODE (operands[1]) == SUBREG + && GET_CODE (SUBREG_REG (operands[1])) == REG + && REGNO (SUBREG_REG (operands[1])) >= FIRST_PSEUDO_REGISTER)) + { + rtx data = operands[0]; + rtx address = XEXP (operands[1], 0); + rtx seq; + + start_sequence (); + emit_insn (gen_movsi (gen_lowpart (SImode, data), address)); + mt_set_memflags (operands[1]); + seq = get_insns (); + end_sequence (); + emit_insn (seq); + DONE; + } +}") + +(define_insn "*movqi_internal" + [(set (match_operand:QI 0 "nonimmediate_operand" "=r,r,m,r") + (match_operand:QI 1 "general_operand" "r,m,r,I"))] + "TARGET_BYTE_ACCESS + && (!memory_operand (operands[0], QImode) + || !memory_operand (operands[1], QImode))" + "@ + or %0, %1, %1 + ldb %0, %1 + stb %1, %0 + addi %0, r0, %1" + [(set_attr "length" "4,4,4,4") + (set_attr "type" "arith,load,store,arith")]) + +(define_insn "*movqi_internal_nobyte" + [(set (match_operand:QI 0 "register_operand" "=r,r") + (match_operand:QI 1 "arith_operand" "r,I"))] + "!TARGET_BYTE_ACCESS + && (!memory_operand (operands[0], QImode) + || !memory_operand (operands[1], QImode))" + "@ + or %0, %1, %1 + addi %0, r0, %1" + [(set_attr "length" "4,4") + (set_attr "type" "arith,arith")]) + + +;; The MorphoRISC does not have 16-bit loads and stores. +;; These operations must be synthesized. Note that the code +;; for loadhi and storehi assumes that the least significant bits +;; is ignored. + +;; loadhi +;; operand 0 location of result +;; operand 1 memory address +;; operand 2 temp +(define_expand "loadhi" + [ + ;; compute shift + (set (match_operand:SI 2 "register_operand" "") + (and:SI (match_dup 1) (const_int 2))) + (set (match_dup 2) (xor:SI (match_dup 2) (const_int 2))) + (set (match_dup 2 ) (ashift:SI (match_dup 2) (const_int 3))) + + ;; get word that contains the 16-bits + (set (match_operand:SI 0 "register_operand" "") + (mem:SI (and:SI (match_operand:SI 1 "register_operand" "") + (const_int -3)))) + + ;; align 16-bit value + (set (match_dup 0) (ashiftrt:SI (match_dup 0) (match_dup 2))) + ] + "" + "") + +;; storehi +;; operand 0 byte value to store +;; operand 1 address +;; operand 2 temp, word containing byte +;; operand 3 temp, shift count +;; operand 4 temp, mask, aligned and masked byte +;; operand 5 (unused) +(define_expand "storehi" + [ + ;; compute shift + (set (match_operand:SI 3 "register_operand" "") + (and:SI (match_operand:SI 1 "register_operand" "") (const_int 2))) + (set (match_dup 3) (xor:SI (match_dup 3) (const_int 2))) + (set (match_dup 3) (ashift:SI (match_dup 3) (const_int 3))) + + ;; get word that contains the 16-bits + (set (match_operand:SI 2 "register_operand" "") + (mem:SI (and:SI (match_dup 1) (const_int -3)))) + + ;; generate mask + (set (match_operand:SI 4 "register_operand" "") (const_int 65535)) + (set (match_dup 4) (ashift:SI (match_dup 4) (match_dup 3))) + (set (match_dup 4) (not:SI (match_dup 4))) + + ;; clear appropriate bits + (set (match_dup 2) (and:SI (match_dup 2) (match_dup 4))) + + ;; align 16-bit value + (set (match_dup 4) + (and:SI (match_operand:SI 0 "register_operand" "") (const_int 65535))) + (set (match_dup 4) (ashift:SI (match_dup 4) (match_dup 3))) + + ;; combine + (set (match_dup 2) (ior:SI (match_dup 4) (match_dup 2))) + ;; store updated word + (set (mem:SI (and:SI (match_dup 1) (const_int -3))) (match_dup 2)) + ] + "" + "") + + +(define_expand "movhi" + [(set (match_operand:HI 0 "general_operand" "") + (match_operand:HI 1 "general_operand" ""))] + "" + " +{ + if (!reload_in_progress + && !reload_completed + && GET_CODE (operands[0]) == MEM + && GET_CODE (operands[1]) == MEM) + operands[1] = copy_to_mode_reg (HImode, operands[1]); + + if ( GET_CODE (operands[0]) == MEM) + { + rtx scratch1 = gen_reg_rtx (SImode); + rtx scratch2 = gen_reg_rtx (SImode); + rtx scratch3 = gen_reg_rtx (SImode); + rtx data = operands[1]; + rtx address = XEXP (operands[0], 0); + rtx seq; + + if (GET_CODE (data) != REG) + data = copy_to_mode_reg (HImode, data); + + if (GET_CODE (address) != REG) + address = copy_to_mode_reg (SImode, address); + + start_sequence (); + emit_insn (gen_storehi (gen_lowpart (SImode, data), address, + scratch1, scratch2, scratch3)); + mt_set_memflags (operands[0]); + seq = get_insns (); + end_sequence (); + emit_insn (seq); + DONE; + } + + if ( GET_CODE (operands[1]) == MEM) + { + rtx scratch1 = gen_reg_rtx (SImode); + rtx data = operands[0]; + rtx address = XEXP (operands[1], 0); + rtx seq; + + if (GET_CODE (address) != REG) + address = copy_to_mode_reg (SImode, address); + + start_sequence (); + emit_insn (gen_loadhi (gen_lowpart (SImode, data), address, + scratch1)); + mt_set_memflags (operands[1]); + seq = get_insns (); + end_sequence (); + emit_insn (seq); + DONE; + } + + /* If the load is a pseudo register in a stack slot, some simplification + can be made because the loads are aligned */ + if ( (reload_in_progress && GET_CODE (operands[1]) == SUBREG + && GET_CODE (SUBREG_REG (operands[1])) == REG + && REGNO (SUBREG_REG (operands[1])) >= FIRST_PSEUDO_REGISTER)) + { + rtx data = operands[0]; + rtx address = XEXP (operands[1], 0); + rtx seq; + + start_sequence (); + emit_insn (gen_movsi (gen_lowpart (SImode, data), address)); + mt_set_memflags (operands[1]); + seq = get_insns (); + end_sequence (); + emit_insn (seq); + DONE; + } +}") + +(define_insn "*movhi_internal" + [(set (match_operand:HI 0 "register_operand" "=r,r") + (match_operand:HI 1 "arith_operand" "r,I"))] + "!memory_operand (operands[0], HImode) || !memory_operand (operands[1], HImode)" + "@ + or %0, %1, %1 + addi %0, r0, %1" + [(set_attr "length" "4,4") + (set_attr "type" "arith,arith")]) + +(define_expand "movsi" + [(set (match_operand:SI 0 "nonimmediate_operand" "") + (match_operand:SI 1 "general_operand" ""))] + "" + " +{ + if (!reload_in_progress && !reload_completed + && !register_operand (operands[0], SImode) + && !register_operand (operands[1], SImode)) + operands[1] = copy_to_mode_reg (SImode, operands[1]); + + /* Take care of constants that don't fit in single instruction */ + if ( (reload_in_progress || reload_completed) + && !single_const_operand (operands[1], SImode)) + { + emit_insn (gen_movsi_high (operands[0], operands[1])); + emit_insn (gen_movsi_lo_sum (operands[0], operands[0], operands[1])); + DONE; + } + +}") + +(define_insn "movsi_high" + [(set (match_operand:SI 0 "register_operand" "=r") + (high:SI (match_operand:SI 1 "general_operand" "i")))] + "" + "* +{ + return \"ldui\\t%0, %H1\"; +}" + [(set_attr "length" "4") + (set_attr "type" "arith")]) + + +(define_insn "movsi_lo_sum" + [(set (match_operand:SI 0 "register_operand" "=r") + (lo_sum:SI (match_operand:SI 1 "register_operand" "r") + (match_operand:SI 2 "general_operand" "i")))] + "" + "* +{ + return \"addui\\t%0, %1, %L2\"; +}" + [(set_attr "length" "4") + (set_attr "type" "arith")]) + +/* Take care of constants that don't fit in single instruction */ +(define_split + [(set (match_operand:SI 0 "register_operand" "") + (match_operand:SI 1 "general_operand" ""))] + "(reload_in_progress || reload_completed) + && !single_const_operand (operands[1], SImode)" + + [(set (match_dup 0 ) + (high:SI (match_dup 1))) + (set (match_dup 0 ) + (lo_sum:SI (match_dup 0) + (match_dup 1)))] +) + + +;; The last pattern in movsi (with two instructions) +;; is really handled by the emit_insn's in movsi +;; and the define_split above. This provides additional +;; instructions to fill delay slots. + +;; 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). +(define_insn "*movsi_internal" + [(set (match_operand:SI 0 "nonimmediate_operand" "=r,r,m,r,r,r,r,r") + (match_operand:SI 1 "general_operand" "r,m,r,I,P,L,N,i"))] + "(!memory_operand (operands[0], SImode) || !memory_operand (operands[1], SImode)) + && !((reload_in_progress || reload_completed) + && !single_const_operand (operands[1], SImode))" + "@ + or %0, %1, %1 + ldw %0, %1 + stw %1, %0 + addi %0, r0, %1 + addui %0, r0, %1 + ldui %0, %H1 + nori %0, r0, %N1 + ldui %0, %H1\;addui %0, %0, %L1" + [(set_attr "length" "4,4,4,4,4,4,4,8") + (set_attr "type" "arith,load,store,arith,arith,arith,arith,complex")] +) + +;; 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 + && GET_CODE (operands[0]) == MEM + && (GET_CODE (operands[1]) == MEM + || GET_CODE (operands[1]) == CONST_DOUBLE)) + operands[1] = copy_to_mode_reg (SFmode, operands[1]); + + /* Take care of reg <- SF constant */ + if ( const_double_operand (operands[1], GET_MODE (operands[1]) ) ) + { + emit_insn (gen_movsf_high (operands[0], operands[1])); + emit_insn (gen_movsf_lo_sum (operands[0], operands[0], operands[1])); + DONE; + } +}") + +(define_insn "movsf_lo_sum" + [(set (match_operand:SF 0 "register_operand" "=r") + (lo_sum:SF (match_operand:SF 1 "register_operand" "r") + (match_operand:SF 2 "const_double_operand" "")))] + "" + "* +{ + REAL_VALUE_TYPE r; + long i; + + REAL_VALUE_FROM_CONST_DOUBLE (r, operands[2]); + REAL_VALUE_TO_TARGET_SINGLE (r, i); + operands[2] = GEN_INT (i); + return \"addui\\t%0, %1, %L2\"; +}" + [(set_attr "length" "4") + (set_attr "type" "arith")]) + +(define_insn "movsf_high" + [(set (match_operand:SF 0 "register_operand" "=r") + (high:SF (match_operand:SF 1 "const_double_operand" "")))] + "" + "* +{ + REAL_VALUE_TYPE r; + long i; + + REAL_VALUE_FROM_CONST_DOUBLE (r, operands[1]); + REAL_VALUE_TO_TARGET_SINGLE (r, i); + operands[1] = GEN_INT (i); + return \"ldui\\t%0, %H1\"; +}" + [(set_attr "length" "4") + (set_attr "type" "arith")]) + + +(define_insn "*movsf_internal" + [(set (match_operand:SF 0 "nonimmediate_operand" "=r,r,m") + (match_operand:SF 1 "nonimmediate_operand" "r,m,r"))] + "!memory_operand (operands[0], SFmode) || !memory_operand (operands[1], SFmode)" + "@ + or %0, %1, %1 + ldw %0, %1 + stw %1, %0" + [(set_attr "length" "4,4,4") + (set_attr "type" "arith,load,store")] +) + +(define_expand "movdf" + [(set (match_operand:DF 0 "general_operand" "") + (match_operand:DF 1 "general_operand" ""))] + "" + " +{ + /* One of the ops has to be in a register or 0 */ + if (!register_operand (operand0, DFmode) + && !reg_or_0_operand (operand1, DFmode)) + operands[1] = copy_to_mode_reg (DFmode, operand1); +}") + +(define_insn_and_split "*movdf_internal" + [(set (match_operand:DF 0 "nonimmediate_operand" "=r,o") + (match_operand:DF 1 "general_operand" "rim,r"))] + "! (memory_operand (operands[0], DFmode) + && memory_operand (operands[1], DFmode))" + "#" + + "(reload_completed || reload_in_progress)" + + [(set (match_dup 2) (match_dup 3)) + (set (match_dup 4) (match_dup 5)) + ] + + "{ + /* figure out what precisely to put into operands 2, 3, 4, and 5 */ + mt_split_words (SImode, DFmode, operands); + }" +) + + +;; Reloads + +;; Like `movM', but used when a scratch register is required to move between +;; operand 0 and operand 1. Operand 2 describes the scratch register. See the +;; discussion of the `SECONDARY_RELOAD_CLASS' macro. + +(define_expand "reload_inqi" + [(set (match_operand:QI 0 "register_operand" "=r") + (match_operand:QI 1 "memory_operand" "m")) + (clobber (match_operand:DI 2 "register_operand" "=&r"))] + "! TARGET_BYTE_ACCESS" + " +{ + rtx scratch1 = gen_rtx_REG (SImode, REGNO (operands[2])); + rtx scratch2 = gen_rtx_REG (SImode, REGNO (operands[2])+1); + rtx data = operands[0]; + rtx address = XEXP (operands[1], 0); + rtx swap, seq; + + /* It is possible that the registers we got for scratch1 + might coincide with that of operands[0]. gen_loadqi + requires operand0 and operand2 to be different registers. + The following statement ensure that is always the case. */ + if (REGNO(operands[0]) == REGNO(scratch1)) + { + swap = scratch1; + scratch1 = scratch2; + scratch2 = swap; + } + + /* need to make sure address is already in register */ + if ( GET_CODE (address) != REG ) + address = force_operand (address, scratch2); + + start_sequence (); + emit_insn (gen_loadqi (gen_lowpart (SImode, data), address, scratch1)); + mt_set_memflags (operands[1]); + seq = get_insns (); + end_sequence (); + emit_insn (seq); + DONE; +}") + +(define_expand "reload_outqi" + [(set (match_operand:QI 0 "memory_operand" "=m") + (match_operand:QI 1 "register_operand" "r")) + (clobber (match_operand:TI 2 "register_operand" "=&r"))] + "! TARGET_BYTE_ACCESS" + " +{ + rtx scratch1 = gen_rtx_REG (SImode, REGNO (operands[2])); + rtx scratch2 = gen_rtx_REG (SImode, REGNO (operands[2])+1); + rtx scratch3 = gen_rtx_REG (SImode, REGNO (operands[2])+2); + rtx scratch4 = gen_rtx_REG (SImode, REGNO (operands[2])+3); + rtx data = operands[1]; + rtx address = XEXP (operands[0], 0); + rtx seq; + + /* need to make sure address is already in register */ + if ( GET_CODE (address) != REG ) + address = force_operand (address, scratch4); + + start_sequence (); + emit_insn (gen_storeqi (gen_lowpart (SImode, data), address, + scratch1, scratch2, scratch3)); + mt_set_memflags (operands[0]); + seq = get_insns (); + end_sequence (); + emit_insn (seq); + DONE; +}") + +(define_expand "reload_inhi" + [(set (match_operand:HI 0 "register_operand" "=r") + (match_operand:HI 1 "memory_operand" "m")) + (clobber (match_operand:DI 2 "register_operand" "=&r"))] + "" + " +{ + rtx scratch1 = gen_rtx_REG (SImode, REGNO (operands[2])); + rtx scratch2 = gen_rtx_REG (SImode, REGNO (operands[2])+1); + rtx data = operands[0]; + rtx address = XEXP (operands[1], 0); + rtx swap, seq; + + /* It is possible that the registers we got for scratch1 + might coincide with that of operands[0]. gen_loadqi + requires operand0 and operand2 to be different registers. + The following statement ensure that is always the case. */ + if (REGNO(operands[0]) == REGNO(scratch1)) + { + swap = scratch1; + scratch1 = scratch2; + scratch2 = swap; + } + + /* need to make sure address is already in register */ + if ( GET_CODE (address) != REG ) + address = force_operand (address, scratch2); + + start_sequence (); + emit_insn (gen_loadhi (gen_lowpart (SImode, data), address, + scratch1)); + mt_set_memflags (operands[1]); + seq = get_insns (); + end_sequence (); + emit_insn (seq); + DONE; +}") + +(define_expand "reload_outhi" + [(set (match_operand:HI 0 "memory_operand" "=m") + (match_operand:HI 1 "register_operand" "r")) + (clobber (match_operand:TI 2 "register_operand" "=&r"))] + "" + " +{ + rtx scratch1 = gen_rtx_REG (SImode, REGNO (operands[2])); + rtx scratch2 = gen_rtx_REG (SImode, REGNO (operands[2])+1); + rtx scratch3 = gen_rtx_REG (SImode, REGNO (operands[2])+2); + rtx scratch4 = gen_rtx_REG (SImode, REGNO (operands[2])+3); + rtx data = operands[1]; + rtx address = XEXP (operands[0], 0); + rtx seq; + + /* need to make sure address is already in register */ + if ( GET_CODE (address) != REG ) + address = force_operand (address, scratch4); + + start_sequence (); + emit_insn (gen_storehi (gen_lowpart (SImode, data), address, + scratch1, scratch2, scratch3)); + mt_set_memflags (operands[0]); + seq = get_insns (); + end_sequence (); + emit_insn (seq); + DONE; +}") + + +;; 32 bit Integer arithmetic + +;; Addition +(define_insn "addsi3" + [(set (match_operand:SI 0 "register_operand" "=r,r") + (plus:SI (match_operand:SI 1 "register_operand" "%r,r") + (match_operand:SI 2 "arith_operand" "r,I")))] + "" + "@ + add %0, %1, %2 + addi %0, %1, %2" + [(set_attr "length" "4,4") + (set_attr "type" "arith,arith")]) + +;; Subtraction +(define_insn "subsi3" + [(set (match_operand:SI 0 "register_operand" "=r,r") + (minus:SI (match_operand:SI 1 "reg_or_0_operand" "rJ,rJ") + (match_operand:SI 2 "arith_operand" "rJ,I")))] + "" + "@ + sub %0, %z1, %z2 + subi %0, %z1, %2" + [(set_attr "length" "4,4") + (set_attr "type" "arith,arith")]) + +;; Negation +(define_insn "negsi2" + [(set (match_operand:SI 0 "register_operand" "=r,r") + (neg:SI (match_operand:SI 1 "arith_operand" "r,I")))] + "" + "@ + sub %0, r0, %1 + subi %0, r0, %1" + [(set_attr "length" "4,4") + (set_attr "type" "arith,arith")]) + + +;; 32 bit Integer Shifts and Rotates + +;; Arithmetic Shift Left +(define_insn "ashlsi3" + [(set (match_operand:SI 0 "register_operand" "=r,r") + (ashift:SI (match_operand:SI 1 "register_operand" "r,r") + (match_operand:SI 2 "arith_operand" "r,K")))] + "" + "@ + lsl %0, %1, %2 + lsli %0, %1, %2" + [(set_attr "length" "4,4") + (set_attr "type" "arith,arith")]) + +;; Arithmetic Shift Right +(define_insn "ashrsi3" + [(set (match_operand:SI 0 "register_operand" "=r,r") + (ashiftrt:SI (match_operand:SI 1 "register_operand" "r,r") + (match_operand:SI 2 "uns_arith_operand" "r,K")))] + "" + "@ + asr %0, %1, %2 + asri %0, %1, %2" + [(set_attr "length" "4,4") + (set_attr "type" "arith,arith")]) + +;; Logical Shift Right +(define_insn "lshrsi3" + [(set (match_operand:SI 0 "register_operand" "=r,r") + (lshiftrt:SI (match_operand:SI 1 "register_operand" "r,r") + (match_operand:SI 2 "uns_arith_operand" "r,K")))] + "" + "@ + lsr %0, %1, %2 + lsri %0, %1, %2" + [(set_attr "length" "4,4") + (set_attr "type" "arith,arith")]) + + +;; 32 Bit Integer Logical operations + +;; Logical AND, 32 bit integers +(define_insn "andsi3" + [(set (match_operand:SI 0 "register_operand" "=r,r") + (and:SI (match_operand:SI 1 "register_operand" "%r,r") + (match_operand:SI 2 "uns_arith_operand" "r,K")))] + "" + "@ + and %0, %1, %2 + andi %0, %1, %2" + [(set_attr "length" "4,4") + (set_attr "type" "arith,arith")]) + +;; Inclusive OR, 32 bit integers +(define_insn "iorsi3" + [(set (match_operand:SI 0 "register_operand" "=r,r") + (ior:SI (match_operand:SI 1 "register_operand" "%r,r") + (match_operand:SI 2 "uns_arith_operand" "r,K")))] + "" + "@ + or %0, %1, %2 + ori %0, %1, %2" + [(set_attr "length" "4,4") + (set_attr "type" "arith,arith")]) + +;; Exclusive OR, 32 bit integers +(define_insn "xorsi3" + [(set (match_operand:SI 0 "register_operand" "=r,r") + (xor:SI (match_operand:SI 1 "register_operand" "%r,r") + (match_operand:SI 2 "uns_arith_operand" "r,K")))] + "" + "@ + xor %0, %1, %2 + xori %0, %1, %2" + [(set_attr "length" "4,4") + (set_attr "type" "arith,arith")]) + + +;; One's complement, 32 bit integers +(define_insn "one_cmplsi2" + [(set (match_operand:SI 0 "register_operand" "=r") + (not:SI (match_operand:SI 1 "register_operand" "r")))] + "" + "nor %0, %1, %1" + [(set_attr "length" "4") + (set_attr "type" "arith")]) + + +;; Multiply + +(define_insn "mulhisi3" + [(set (match_operand:SI 0 "register_operand" "=r,r") + (mult:SI (sign_extend:SI (match_operand:HI 1 "register_operand" "%r,r")) + (sign_extend:SI (match_operand:HI 2 "arith_operand" "r,I"))))] + "TARGET_MS1_16_003 || TARGET_MS2" + "@ + mul %0, %1, %2 + muli %0, %1, %2" + [(set_attr "length" "4,4") + (set_attr "type" "arith,arith")]) + + +;; 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 "register_operand" "") + (match_operand:SI 1 "arith_operand" "")))] + "" + " +{ + mt_compare_op0 = operands[0]; + mt_compare_op1 = operands[1]; + DONE; +}") + + +;; Branches + +(define_expand "beq" + [(use (match_operand 0 "" ""))] + "" + " +{ + mt_emit_cbranch (EQ, operands[0], mt_compare_op0, mt_compare_op1); + DONE; +}") + +(define_expand "bne" + [(use (match_operand 0 "" ""))] + "" + " +{ + mt_emit_cbranch (NE, operands[0], mt_compare_op0, mt_compare_op1); + DONE; +}") + +(define_expand "bge" + [(use (match_operand 0 "" ""))] + "" + " +{ + mt_emit_cbranch (GE, operands[0], mt_compare_op0, mt_compare_op1); + DONE; +}") + +(define_expand "bgt" + [(use (match_operand 0 "" ""))] + "" + " +{ + mt_emit_cbranch (GT, operands[0], mt_compare_op0, mt_compare_op1); + DONE; +}") + +(define_expand "ble" + [(use (match_operand 0 "" ""))] + "" + " +{ + mt_emit_cbranch (LE, operands[0], mt_compare_op0, mt_compare_op1); + DONE; +}") + +(define_expand "blt" + [(use (match_operand 0 "" ""))] + "" + " +{ + mt_emit_cbranch (LT, operands[0], mt_compare_op0, mt_compare_op1); + DONE; +}") + +(define_expand "bgeu" + [(use (match_operand 0 "" ""))] + "" + " +{ + mt_emit_cbranch (GEU, operands[0], mt_compare_op0, mt_compare_op1); + DONE; +}") + +(define_expand "bgtu" + [(use (match_operand 0 "" ""))] + "" + " +{ + mt_emit_cbranch (GTU, operands[0], mt_compare_op0, mt_compare_op1); + DONE; +}") + +(define_expand "bleu" + [(use (match_operand 0 "" ""))] + "" + " +{ + mt_emit_cbranch (LEU, operands[0], mt_compare_op0, mt_compare_op1); + DONE; +}") + +(define_expand "bltu" + [(use (match_operand 0 "" ""))] + "" + " +{ + mt_emit_cbranch (LTU, operands[0], mt_compare_op0, mt_compare_op1); + DONE; +}") + +(define_expand "bunge" + [(use (match_operand 0 "" ""))] + "" + " +{ + mt_emit_cbranch (GEU, operands[0], mt_compare_op0, mt_compare_op1); + DONE; +}") + +(define_expand "bungt" + [(use (match_operand 0 "" ""))] + "" + " +{ + mt_emit_cbranch (GTU, operands[0], mt_compare_op0, mt_compare_op1); + DONE; +}") + +(define_expand "bunle" + [(use (match_operand 0 "" ""))] + "" + " +{ + mt_emit_cbranch (LEU, operands[0], mt_compare_op0, mt_compare_op1); + DONE; +}") + +(define_expand "bunlt" + [(use (match_operand 0 "" ""))] + "" + " +{ + mt_emit_cbranch (LTU, operands[0], mt_compare_op0, mt_compare_op1); + DONE; +}") + +(define_insn "*beq_true" + [(set (pc) + (if_then_else (eq (match_operand:SI 0 "reg_or_0_operand" "rJ") + (match_operand:SI 1 "reg_or_0_operand" "rJ")) + (label_ref (match_operand 2 "" "")) + (pc)))] + "" + "breq %z0, %z1, %l2%#" + [(set_attr "length" "4") + (set_attr "type" "branch")]) + +(define_insn "*beq_false" + [(set (pc) + (if_then_else (eq (match_operand:SI 0 "reg_or_0_operand" "rJ") + (match_operand:SI 1 "reg_or_0_operand" "rJ")) + (pc) + (label_ref (match_operand 2 "" ""))))] + "" + "brne %z0, %z1, %l2%#" + [(set_attr "length" "4") + (set_attr "type" "branch")]) + + +(define_insn "*bne_true" + [(set (pc) + (if_then_else (ne (match_operand:SI 0 "reg_or_0_operand" "rJ") + (match_operand:SI 1 "reg_or_0_operand" "rJ")) + (label_ref (match_operand 2 "" "")) + (pc)))] + "" + "brne %z0, %z1, %l2%#" + [(set_attr "length" "4") + (set_attr "type" "branch")]) + +(define_insn "*bne_false" + [(set (pc) + (if_then_else (ne (match_operand:SI 0 "reg_or_0_operand" "rJ") + (match_operand:SI 1 "reg_or_0_operand" "rJ")) + (pc) + (label_ref (match_operand 2 "" ""))))] + "" + "breq %z0, %z1, %l2%#" + [(set_attr "length" "4") + (set_attr "type" "branch")]) + +(define_insn "*blt_true" + [(set (pc) + (if_then_else (lt (match_operand:SI 0 "reg_or_0_operand" "rJ") + (match_operand:SI 1 "reg_or_0_operand" "rJ")) + (label_ref (match_operand 2 "" "")) + (pc)))] + "" + "brlt %z0, %z1, %l2%#" + [(set_attr "length" "4") + (set_attr "type" "branch")]) + +(define_insn "*blt_false" + [(set (pc) + (if_then_else (lt (match_operand:SI 0 "reg_or_0_operand" "rJ") + (match_operand:SI 1 "reg_or_0_operand" "rJ")) + (pc) + (label_ref (match_operand 2 "" ""))))] + "" + "brle %z1, %z0,%l2%#" + [(set_attr "length" "4") + (set_attr "type" "branch")]) + +(define_insn "*ble_true" + [(set (pc) + (if_then_else (le (match_operand:SI 0 "reg_or_0_operand" "rJ") + (match_operand:SI 1 "reg_or_0_operand" "rJ")) + (label_ref (match_operand 2 "" "")) + (pc)))] + "" + "brle %z0, %z1, %l2%#" + [(set_attr "length" "4") + (set_attr "type" "branch")]) + +(define_insn "*ble_false" + [(set (pc) + (if_then_else (le (match_operand:SI 0 "reg_or_0_operand" "rJ") + (match_operand:SI 1 "reg_or_0_operand" "rJ")) + (pc) + (label_ref (match_operand 2 "" ""))))] + "" + "brlt %z1, %z0,%l2%#" + [(set_attr "length" "4") + (set_attr "type" "branch")]) + +(define_insn "*bgt_true" + [(set (pc) + (if_then_else (gt (match_operand:SI 0 "reg_or_0_operand" "rJ") + (match_operand:SI 1 "reg_or_0_operand" "rJ")) + (label_ref (match_operand 2 "" "")) + (pc)))] + "" + "brlt %z1, %z0, %l2%#" + [(set_attr "length" "4") + (set_attr "type" "branch")]) + +(define_insn "*bgt_false" + [(set (pc) + (if_then_else (gt (match_operand:SI 0 "reg_or_0_operand" "rJ") + (match_operand:SI 1 "reg_or_0_operand" "rJ")) + (pc) + (label_ref (match_operand 2 "" ""))))] + "" + "brle %z0, %z1, %l2%#" + [(set_attr "length" "4") + (set_attr "type" "branch")]) + +(define_insn "*bge_true" + [(set (pc) + (if_then_else (ge (match_operand:SI 0 "reg_or_0_operand" "rJ") + (match_operand:SI 1 "reg_or_0_operand" "rJ")) + (label_ref (match_operand 2 "" "")) + (pc)))] + "" + "brle %z1, %z0,%l2%#" + [(set_attr "length" "4") + (set_attr "type" "branch")]) + +(define_insn "*bge_false" + [(set (pc) + (if_then_else (ge (match_operand:SI 0 "reg_or_0_operand" "rJ") + (match_operand:SI 1 "reg_or_0_operand" "rJ")) + (pc) + (label_ref (match_operand 2 "" ""))))] + "" + "brlt %z0, %z1, %l2%#" + [(set_attr "length" "4") + (set_attr "type" "branch")]) + +;; No unsigned operators on Morpho mt. All the unsigned operations are +;; converted to the signed operations above. + + +;; Set flag operations + +;; "seq", "sne", "slt", "sle", "sgt", "sge", "sltu", "sleu", +;; "sgtu", and "sgeu" don't exist as regular instruction on the +;; mt, so these are not defined + +;; Call and branch instructions + +(define_expand "call" + [(parallel [(call (mem:SI (match_operand:SI 0 "register_operand" "")) + (match_operand 1 "" "")) + (clobber (reg:SI 14))])] + "" + " +{ + operands[0] = force_reg (SImode, XEXP (operands[0], 0)); +}") + +(define_insn "call_internal" + [(call (mem:SI (match_operand 0 "register_operand" "r")) + (match_operand 1 "" "")) + ;; possibly add a clobber of the reg that gets the return address + (clobber (reg:SI 14))] + "" + "jal r14, %0%#" + [(set_attr "length" "4") + (set_attr "type" "call")]) + +(define_expand "call_value" + [(parallel [(set (match_operand 0 "register_operand" "") + (call (mem:SI (match_operand:SI 1 "register_operand" "")) + (match_operand 2 "general_operand" ""))) + (clobber (reg:SI 14))])] + "" + " +{ + operands[1] = force_reg (SImode, XEXP (operands[1], 0)); +}") + + +(define_insn "call_value_internal" + [(set (match_operand 0 "register_operand" "=r") + (call (mem:SI (match_operand 1 "register_operand" "r")) + (match_operand 2 "" ""))) + ;; possibly add a clobber of the reg that gets the return address + (clobber (reg:SI 14))] + "" + "jal r14, %1%#" + [(set_attr "length" "4") + (set_attr "type" "call")]) + +;; Subroutine return +(define_insn "return_internal" + [(const_int 2) + (return) + (use (reg:SI 14))] + "" + "jal r0, r14%#" + [(set_attr "length" "4") + (set_attr "type" "call")]) + +;; Interrupt return +(define_insn "return_interrupt_internal" + [(const_int 3) + (return) + (use (reg:SI 15))] + "" + "reti r15%#" + [(set_attr "length" "4") + (set_attr "type" "call")]) + +;; Subroutine return +(define_insn "eh_return_internal" + [(return) + (use (reg:SI 7)) + (use (reg:SI 8)) + (use (reg:SI 11)) + (use (reg:SI 10))] + "" + "jal r0, r11%#" + [(set_attr "length" "4") + (set_attr "type" "call")]) + + +;; Normal unconditional jump +(define_insn "jump" + [(set (pc) (label_ref (match_operand 0 "" "")))] + "" + "jmp %l0%#" + [(set_attr "length" "4") + (set_attr "type" "branch")]) + +;; Indirect jump through a register +(define_insn "indirect_jump" + [(set (pc) (match_operand 0 "register_operand" "r"))] + "" + "jal r0,%0%#" + [(set_attr "length" "4") + (set_attr "type" "call")]) + +(define_insn "tablejump" + [(set (pc) (match_operand:SI 0 "register_operand" "r")) + (use (label_ref (match_operand 1 "" "")))] + "" + "jal r0, %0%#" + [(set_attr "length" "4") + (set_attr "type" "call")]) + + +(define_expand "prologue" + [(const_int 1)] + "" + " +{ + mt_expand_prologue (); + DONE; +}") + +(define_expand "epilogue" + [(const_int 2)] + "" + " +{ + mt_expand_epilogue (NORMAL_EPILOGUE); + DONE; +}") + + +(define_expand "eh_return" + [(use (match_operand:SI 0 "register_operand" "r"))] + "" + " +{ + mt_expand_eh_return (operands); + DONE; +}") + + +(define_insn_and_split "eh_epilogue" + [(unspec [(match_operand 0 "register_operand" "r")] 6)] + "" + "#" + "reload_completed" + [(const_int 1)] + "mt_emit_eh_epilogue (operands); DONE;" +) + +;; 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" "arith")]) + +;; :::::::::::::::::::: +;; :: +;; :: UNSPEC_VOLATILE usage +;; :: +;; :::::::::::::::::::: +;; +;; 0 blockage +;; 1 Enable interrupts +;; 2 Disable interrupts +;; + +;; Pseudo instruction that prevents the scheduler from moving code above this +;; point. +(define_insn "blockage" + [(unspec_volatile [(const_int 0)] UNSPEC_BLOCKAGE)] + "" + "" + [(set_attr "length" "0")]) + +;; Trap instruction to allow usage of the __builtin_trap function +(define_insn "trap" + [(trap_if (const_int 1) (const_int 0)) + (clobber (reg:SI 14))] + "" + "si r14%#" + [(set_attr "length" "4") + (set_attr "type" "branch")]) + +(define_expand "conditional_trap" + [(trap_if (match_operator 0 "comparison_operator" + [(match_dup 2) + (match_dup 3)]) + (match_operand 1 "const_int_operand" ""))] + "" + " +{ + operands[2] = mt_compare_op0; + operands[3] = mt_compare_op1; +}") + +;; Templates to control handling of interrupts + +;; Enable interrupts template +(define_insn "ei" + [(unspec_volatile [(const_int 0)] UNSPEC_EI)] + "" + "ei" + [(set_attr "length" "4")]) + +;; Enable interrupts template +(define_insn "di" + [(unspec_volatile [(const_int 0)] UNSPEC_DI)] + "" + "di" + [(set_attr "length" "4")]) diff --git a/gcc/config/mt/mt.opt b/gcc/config/mt/mt.opt new file mode 100644 index 00000000000..83e93562b05 --- /dev/null +++ b/gcc/config/mt/mt.opt @@ -0,0 +1,56 @@ +; Options for the mt port of the compiler +; +; Copyright (C) 2005 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, 51 Franklin Street, Fifth Floor, Boston, MA +; 02110-1301, USA. + +mbacc +Target Report Mask(BYTE_ACCESS) +Use byte loads and stores when generating code. + +msim +Target RejectNegative +Use simulator runtime + +mno-crt0 +Target RejectNegative +Do not include crt0.o in the startup files + +mdebug-arg +Target RejectNegative Mask(DEBUG_ARG) +Internal debug switch + +mdebug-addr +Target RejectNegative Mask(DEBUG_ADDR) +Internal debug switch + +mdebug-stack +Target RejectNegative Mask(DEBUG_STACK) +Internal debug switch + +mdebug-loc +Target RejectNegative Mask(DEBUG_LOC) +Internal debug switch + +mdebug +Target RejectNegative Mask(DEBUG) +Internal debug switch + +march= +Target RejectNegative Joined Var(mt_cpu_string) +Specify CPU for code generation purposes diff --git a/gcc/config/mt/t-mt b/gcc/config/mt/t-mt new file mode 100644 index 00000000000..46cbbbab2d8 --- /dev/null +++ b/gcc/config/mt/t-mt @@ -0,0 +1,73 @@ +# Copyright (C) 2005 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, 51 Franklin Street, Fifth Floor, Boston, MA +# 02110-1301, USA. + +# 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. +CROSS_LIBGCC1 = +# +# Alternatively if assembler functions *are* needed then define the +# entries below: +# CROSS_LIBGCC1 = libgcc1-asm.a +# LIB1ASMSRC = mt/lib1funcs.asm +# LIB1ASMFUNCS = _udivsi3 etc... + +LIB2FUNCS_EXTRA = $(srcdir)/config/mt/lib2extra-funcs.c + +# If any special flags are necessary when building libgcc2 put them here. +# +# TARGET_LIBGCC2_CFLAGS = + +EXTRA_PARTS = crtbegin.o crtend.o crti.o crtn.o + +# 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 + +fp-bit.c: $(srcdir)/config/fp-bit.c + echo '#define FLOAT' > fp-bit.c + cat $(srcdir)/config/fp-bit.c >> fp-bit.c + +dp-bit.c: $(srcdir)/config/fp-bit.c + cat $(srcdir)/config/fp-bit.c > dp-bit.c + +# Assemble startup files. +$(T)crti.o: $(srcdir)/config/mt/crti.asm $(GCC_PASSES) + $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(MULTILIB_CFLAGS) $(INCLUDES) \ + -c -o $(T)crti.o -x assembler $(srcdir)/config/mt/crti.asm + +$(T)crtn.o: $(srcdir)/config/mt/crtn.asm $(GCC_PASSES) + $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(MULTILIB_CFLAGS) $(INCLUDES) \ + -c -o $(T)crtn.o -x assembler $(srcdir)/config/mt/crtn.asm + +# 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 = march=ms1-64-001/march=ms1-16-002/march=ms1-16-003/march=ms2 +MULTILIB_DIRNAMES = ms1-64-001 ms1-16-002 ms1-16-003 ms2 +# MULTILIB_MATCHES = +# MULTILIB_EXCEPTIONS = +# MULTILIB_EXTRA_OPTS = +EXTRA_MULTILIB_PARTS = crtbegin.o crtend.o crti.o crtn.o +# +# LIBGCC = stmp-multilib +# INSTALL_LIBGCC = install-multilib + diff --git a/gcc/config/pa/pa-64.h b/gcc/config/pa/pa-64.h index a59b4e04af2..750b13ca032 100644 --- a/gcc/config/pa/pa-64.h +++ b/gcc/config/pa/pa-64.h @@ -70,10 +70,6 @@ Boston, MA 02110-1301, USA. */ relocs which appear in stabs. */ #undef DBX_DEBUGGING_INFO -/* We want the compiler to select a suitable secondary memory location. - ?!? This may not work reliably. Keep an eye out for problems. */ -#undef SECONDARY_MEMORY_NEEDED_RTX - /* ?!? This needs to be made compile-time selectable. The PA64 runtime model has arguments that grow to higher addresses diff --git a/gcc/config/pa/pa-protos.h b/gcc/config/pa/pa-protos.h index d0daf72f6ba..510ac07f7b3 100644 --- a/gcc/config/pa/pa-protos.h +++ b/gcc/config/pa/pa-protos.h @@ -106,8 +106,6 @@ extern int emit_move_sequence (rtx *, enum machine_mode, rtx); extern int emit_hpdiv_const (rtx *, int); extern int is_function_label_plus_const (rtx); extern int jump_in_call_delay (rtx); -extern enum reg_class pa_secondary_reload_class (enum reg_class, - enum machine_mode, rtx); extern int hppa_fpstore_bypass_p (rtx, rtx); extern int attr_length_millicode_call (rtx); extern int attr_length_call (rtx, int); @@ -140,7 +138,6 @@ extern int zdepi_cint_p (unsigned HOST_WIDE_INT); extern void override_options (void); extern void output_ascii (FILE *, const char *, int); -extern const char * som_text_section_asm_op (void); extern HOST_WIDE_INT compute_frame_size (HOST_WIDE_INT, int *); extern int and_mask_p (unsigned HOST_WIDE_INT); extern int cint_ok_for_move (HOST_WIDE_INT); @@ -181,9 +178,3 @@ extern void pa_hpux_asm_output_external (FILE *, tree, const char *); extern const int magic_milli[]; extern int shadd_constant_p (int); - -/* Functions in varasm.c used by pa.c. */ -extern void som_readonly_data_section (void); -extern void som_one_only_readonly_data_section (void); -extern void som_one_only_data_section (void); -extern void forget_section (void); diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c index 0eeb163ea58..0d8ec24c1f9 100644 --- a/gcc/config/pa/pa.c +++ b/gcc/config/pa/pa.c @@ -107,7 +107,8 @@ static void pa_output_function_epilogue (FILE *, HOST_WIDE_INT); static int pa_adjust_cost (rtx, rtx, rtx, int); static int pa_adjust_priority (rtx, int); static int pa_issue_rate (void); -static void pa_select_section (tree, int, unsigned HOST_WIDE_INT) +static void pa_som_asm_init_sections (void) ATTRIBUTE_UNUSED; +static section *pa_select_section (tree, int, unsigned HOST_WIDE_INT) ATTRIBUTE_UNUSED; static void pa_encode_section_info (tree, rtx, int); static const char *pa_strip_name_encoding (const char *); @@ -150,8 +151,16 @@ static bool pa_pass_by_reference (CUMULATIVE_ARGS *, enum machine_mode, static int pa_arg_partial_bytes (CUMULATIVE_ARGS *, enum machine_mode, tree, bool); static struct machine_function * pa_init_machine_status (void); +static enum reg_class pa_secondary_reload (bool, rtx, enum reg_class, + enum machine_mode, + secondary_reload_info *); +/* The following extra sections are only used for SOM. */ +static GTY(()) section *som_readonly_data_section; +static GTY(()) section *som_one_only_readonly_data_section; +static GTY(()) section *som_one_only_data_section; + /* Save the operands last given to a compare for use when we generate a scc or bcc insn. */ rtx hppa_compare_op0, hppa_compare_op1; @@ -299,6 +308,9 @@ static size_t n_deferred_plabels = 0; #undef TARGET_CANNOT_FORCE_CONST_MEM #define TARGET_CANNOT_FORCE_CONST_MEM pa_tls_referenced_p +#undef TARGET_SECONDARY_RELOAD +#define TARGET_SECONDARY_RELOAD pa_secondary_reload + struct gcc_target targetm = TARGET_INITIALIZER; /* Parse the -mfixed-range= option string. */ @@ -495,8 +507,10 @@ static void pa_init_builtins (void) { #ifdef DONT_HAVE_FPUTC_UNLOCKED - built_in_decls[(int) BUILT_IN_FPUTC_UNLOCKED] = NULL_TREE; - implicit_built_in_decls[(int) BUILT_IN_FPUTC_UNLOCKED] = NULL_TREE; + built_in_decls[(int) BUILT_IN_FPUTC_UNLOCKED] = + built_in_decls[(int) BUILT_IN_PUTC_UNLOCKED]; + implicit_built_in_decls[(int) BUILT_IN_FPUTC_UNLOCKED] + = implicit_built_in_decls[(int) BUILT_IN_PUTC_UNLOCKED]; #endif } @@ -2195,6 +2209,25 @@ output_move_double (rtx *operands) supposed to allow to happen. */ gcc_assert (optype0 == REGOP || optype1 == REGOP); + /* Handle copies between general and floating registers. */ + + if (optype0 == REGOP && optype1 == REGOP + && FP_REG_P (operands[0]) ^ FP_REG_P (operands[1])) + { + if (FP_REG_P (operands[0])) + { + output_asm_insn ("{stws|stw} %1,-16(%%sp)", operands); + output_asm_insn ("{stws|stw} %R1,-12(%%sp)", operands); + return "{fldds|fldd} -16(%%sp),%0"; + } + else + { + output_asm_insn ("{fstds|fstd} %1,-16(%%sp)", operands); + output_asm_insn ("{ldws|ldw} -16(%%sp),%0", operands); + return "{ldws|ldw} -12(%%sp),%R0"; + } + } + /* Handle auto decrementing and incrementing loads and stores specifically, since the structure of the function doesn't work for them without major modification. Do it better when we learn @@ -3920,7 +3953,8 @@ pa_output_function_epilogue (FILE *file, HOST_WIDE_INT size ATTRIBUTE_UNUSED) /* We done with this subspace except possibly for some additional debug information. Forget that we are in this subspace to ensure that the next function is output in its own subspace. */ - forget_section (); + in_section = NULL; + cfun->machine->in_nsubspa = 2; } if (INSN_ADDRESSES_SET_P ()) @@ -4141,7 +4175,7 @@ output_deferred_profile_counters (void) if (VEC_empty (int, funcdef_nos)) return; - data_section (); + switch_to_section (data_section); align = MIN (BIGGEST_ALIGNMENT, LONG_TYPE_SIZE); ASM_OUTPUT_ALIGN (asm_out_file, floor_log2 (align / BITS_PER_UNIT)); @@ -5286,12 +5320,13 @@ static void output_deferred_plabels (void) { size_t i; - /* If we have deferred plabels, then we need to switch into the data - section and align it to a 4 byte boundary before we output the - deferred plabels. */ + + /* If we have some deferred plabels, then we need to switch into the + data or readonly data section, and align it to a 4 byte boundary + before outputting the deferred plabels. */ if (n_deferred_plabels) { - data_section (); + switch_to_section (flag_pic ? data_section : readonly_data_section); ASM_OUTPUT_ALIGN (asm_out_file, TARGET_64BIT ? 3 : 2); } @@ -5342,6 +5377,8 @@ pa_hpux_init_libfuncs (void) set_conv_libfunc (sfloat_optab, TFmode, SImode, "_U_Qfcnvxf_sgl_to_quad"); set_conv_libfunc (sfloat_optab, TFmode, DImode, "_U_Qfcnvxf_dbl_to_quad"); + set_conv_libfunc (ufloat_optab, TFmode, SImode, "_U_Qfcnvxf_usgl_to_quad"); + set_conv_libfunc (ufloat_optab, TFmode, DImode, "_U_Qfcnvxf_udbl_to_quad"); } #endif @@ -5565,100 +5602,108 @@ output_arg_descriptor (rtx call_insn) fputc ('\n', asm_out_file); } -/* Return the class of any secondary reload register that is needed to - move IN into a register in class CLASS using mode MODE. - - Profiling has showed this routine and its descendants account for - a significant amount of compile time (~7%). So it has been - optimized to reduce redundant computations and eliminate useless - function calls. - - It might be worthwhile to try and make this a leaf function too. */ - -enum reg_class -pa_secondary_reload_class (enum reg_class class, enum machine_mode mode, rtx in) +static enum reg_class +pa_secondary_reload (bool in_p, rtx x, enum reg_class class, + enum machine_mode mode, secondary_reload_info *sri) { - int regno, is_symbolic; + int is_symbolic, regno; - /* Trying to load a constant into a FP register during PIC code - generation will require %r1 as a scratch register. */ - if (flag_pic - && GET_MODE_CLASS (mode) == MODE_INT - && FP_REG_CLASS_P (class) - && (GET_CODE (in) == CONST_INT || GET_CODE (in) == CONST_DOUBLE)) - return R1_REGS; - - /* Profiling showed the PA port spends about 1.3% of its compilation - time in true_regnum from calls inside pa_secondary_reload_class. */ + /* Handle the easy stuff first. */ + if (class == R1_REGS) + return NO_REGS; - if (GET_CODE (in) == REG) + if (REG_P (x)) { - regno = REGNO (in); - if (regno >= FIRST_PSEUDO_REGISTER) - regno = true_regnum (in); + regno = REGNO (x); + if (class == BASE_REG_CLASS && regno < FIRST_PSEUDO_REGISTER) + return NO_REGS; } - else if (GET_CODE (in) == SUBREG) - regno = true_regnum (in); else regno = -1; /* If we have something like (mem (mem (...)), we can safely assume the inner MEM will end up in a general register after reloading, so there's no need for a secondary reload. */ - if (GET_CODE (in) == MEM - && GET_CODE (XEXP (in, 0)) == MEM) + if (GET_CODE (x) == MEM && GET_CODE (XEXP (x, 0)) == MEM) return NO_REGS; + /* Trying to load a constant into a FP register during PIC code + generation requires %r1 as a scratch register. */ + if (flag_pic + && GET_MODE_CLASS (mode) == MODE_INT + && FP_REG_CLASS_P (class) + && (GET_CODE (x) == CONST_INT || GET_CODE (x) == CONST_DOUBLE)) + { + gcc_assert (mode == SImode || mode == DImode); + sri->icode = (mode == SImode ? CODE_FOR_reload_insi_r1 + : CODE_FOR_reload_indi_r1); + return NO_REGS; + } + + /* Profiling showed the PA port spends about 1.3% of its compilation + time in true_regnum from calls inside pa_secondary_reload_class. */ + if (regno >= FIRST_PSEUDO_REGISTER || GET_CODE (x) == SUBREG) + regno = true_regnum (x); + /* Handle out of range displacement for integer mode loads/stores of FP registers. */ if (((regno >= FIRST_PSEUDO_REGISTER || regno == -1) && GET_MODE_CLASS (mode) == MODE_INT && FP_REG_CLASS_P (class)) || (class == SHIFT_REGS && (regno <= 0 || regno >= 32))) - return GENERAL_REGS; + { + sri->icode = in_p ? reload_in_optab[mode] : reload_out_optab[mode]; + return NO_REGS; + } /* A SAR<->FP register copy requires a secondary register (GPR) as well as secondary memory. */ if (regno >= 0 && regno < FIRST_PSEUDO_REGISTER && ((REGNO_REG_CLASS (regno) == SHIFT_REGS && FP_REG_CLASS_P (class)) - || (class == SHIFT_REGS && FP_REG_CLASS_P (REGNO_REG_CLASS (regno))))) - return GENERAL_REGS; + || (class == SHIFT_REGS + && FP_REG_CLASS_P (REGNO_REG_CLASS (regno))))) + { + sri->icode = in_p ? reload_in_optab[mode] : reload_out_optab[mode]; + return NO_REGS; + } - if (GET_CODE (in) == HIGH) - in = XEXP (in, 0); + /* Secondary reloads of symbolic operands require %r1 as a scratch + register when we're generating PIC code and the operand isn't + readonly. */ + if (GET_CODE (x) == HIGH) + x = XEXP (x, 0); /* Profiling has showed GCC spends about 2.6% of its compilation time in symbolic_operand from calls inside pa_secondary_reload_class. - - We use an inline copy and only compute its return value once to avoid - useless work. */ - switch (GET_CODE (in)) + So, we use an inline copy to avoid useless work. */ + switch (GET_CODE (x)) { - rtx tmp; + rtx op; case SYMBOL_REF: + is_symbolic = !SYMBOL_REF_TLS_MODEL (x); + break; case LABEL_REF: is_symbolic = 1; break; case CONST: - tmp = XEXP (in, 0); - is_symbolic = ((GET_CODE (XEXP (tmp, 0)) == SYMBOL_REF - || GET_CODE (XEXP (tmp, 0)) == LABEL_REF) - && GET_CODE (XEXP (tmp, 1)) == CONST_INT); + op = XEXP (x, 0); + is_symbolic = (((GET_CODE (XEXP (op, 0)) == SYMBOL_REF + && !SYMBOL_REF_TLS_MODEL (XEXP (op, 0))) + || GET_CODE (XEXP (op, 0)) == LABEL_REF) + && GET_CODE (XEXP (op, 1)) == CONST_INT); break; - default: is_symbolic = 0; break; } - if (!flag_pic - && is_symbolic - && read_only_operand (in, VOIDmode)) - return NO_REGS; - - if (class != R1_REGS && is_symbolic) - return R1_REGS; + if (is_symbolic && (flag_pic || !read_only_operand (x, VOIDmode))) + { + gcc_assert (mode == SImode || mode == DImode); + sri->icode = (mode == SImode ? CODE_FOR_reload_insi_r1 + : CODE_FOR_reload_indi_r1); + } return NO_REGS; } @@ -5837,20 +5882,20 @@ hppa_gimplify_va_arg_expr (tree valist, tree type, tree *pre_p, tree *post_p) /* Args grow down. Not handled by generic routines. */ u = fold_convert (valist_type, size_in_bytes (type)); - t = build (MINUS_EXPR, valist_type, valist, u); + t = build2 (MINUS_EXPR, valist_type, valist, u); /* Copied from va-pa.h, but we probably don't need to align to word size, since we generate and preserve that invariant. */ u = build_int_cst (valist_type, (size > 4 ? -8 : -4)); - t = build (BIT_AND_EXPR, valist_type, t, u); + t = build2 (BIT_AND_EXPR, valist_type, t, u); - t = build (MODIFY_EXPR, valist_type, valist, t); + t = build2 (MODIFY_EXPR, valist_type, valist, t); ofs = (8 - size) % 4; if (ofs != 0) { u = fold_convert (valist_type, size_int (ofs)); - t = build (PLUS_EXPR, valist_type, t, u); + t = build2 (PLUS_EXPR, valist_type, t, u); } t = fold_convert (ptr, t); @@ -5902,6 +5947,9 @@ pa_scalar_mode_supported_p (enum machine_mode mode) return true; return false; + case MODE_DECIMAL_FLOAT: + return false; + default: gcc_unreachable (); } @@ -7775,15 +7823,22 @@ pa_asm_output_mi_thunk (FILE *file, tree thunk_fndecl, HOST_WIDE_INT delta, fprintf (file, "\t.EXIT\n\t.PROCEND\n"); + if (TARGET_SOM && TARGET_GAS) + { + /* We done with this subspace except possibly for some additional + debug information. Forget that we are in this subspace to ensure + that the next function is output in its own subspace. */ + in_section = NULL; + cfun->machine->in_nsubspa = 2; + } + if (TARGET_SOM && flag_pic && TREE_PUBLIC (function)) { - data_section (); + switch_to_section (data_section); output_asm_insn (".align 4", xoperands); ASM_OUTPUT_LABEL (file, label); output_asm_insn (".word P'%0", xoperands); } - else if (TARGET_SOM && TARGET_GAS) - forget_section (); current_thunk_number++; nbytes = ((nbytes + FUNCTION_BOUNDARY / BITS_PER_UNIT - 1) @@ -7959,7 +8014,7 @@ pa_asm_output_aligned_bss (FILE *stream, unsigned HOST_WIDE_INT size, unsigned int align) { - bss_section (); + switch_to_section (bss_section); fprintf (stream, "\t.align %u\n", align / BITS_PER_UNIT); #ifdef ASM_OUTPUT_TYPE_DIRECTIVE @@ -7999,7 +8054,7 @@ pa_asm_output_aligned_common (FILE *stream, align = max_common_align; } - bss_section (); + switch_to_section (bss_section); assemble_name (stream, name); fprintf (stream, "\t.comm "HOST_WIDE_INT_PRINT_UNSIGNED"\n", @@ -8019,7 +8074,7 @@ pa_asm_output_aligned_local (FILE *stream, unsigned HOST_WIDE_INT size, unsigned int align) { - bss_section (); + switch_to_section (bss_section); fprintf (stream, "\t.align %u\n", align / BITS_PER_UNIT); #ifdef LOCAL_ASM_OP @@ -9011,17 +9066,16 @@ pa_arg_partial_bytes (CUMULATIVE_ARGS *cum, enum machine_mode mode, } -/* Return a string to output before text in the current function. +/* A get_unnamed_section callback for switching to the text section. This function is only used with SOM. Because we don't support named subspaces, we can only create a new subspace or switch back to the default text subspace. */ -const char * -som_text_section_asm_op (void) -{ - if (!TARGET_SOM) - return ""; +static void +som_output_text_section_asm_op (const void *data ATTRIBUTE_UNUSED) +{ + gcc_assert (TARGET_SOM); if (TARGET_GAS) { if (cfun && !cfun->machine->in_nsubspa) @@ -9035,24 +9089,92 @@ som_text_section_asm_op (void) if (cfun->decl && DECL_ONE_ONLY (cfun->decl) && !DECL_WEAK (cfun->decl)) - return - "\t.SPACE $TEXT$\n\t.NSUBSPA $CODE$,QUAD=0,ALIGN=8,ACCESS=44,SORT=24,COMDAT"; - - return "\t.SPACE $TEXT$\n\t.NSUBSPA $CODE$"; + { + output_section_asm_op ("\t.SPACE $TEXT$\n" + "\t.NSUBSPA $CODE$,QUAD=0,ALIGN=8," + "ACCESS=44,SORT=24,COMDAT"); + return; + } } else { /* There isn't a current function or the body of the current function has been completed. So, we are changing to the - text section to output debugging information. Do this in - the default text section. We need to forget that we are - in the text section so that the function text_section in - varasm.c will call us the next time around. */ - forget_section (); + text section to output debugging information. Thus, we + need to forget that we are in the text section so that + varasm.c will call us when text_section is selected again. */ + gcc_assert (!cfun || cfun->machine->in_nsubspa == 2); + in_section = NULL; } + output_section_asm_op ("\t.SPACE $TEXT$\n\t.NSUBSPA $CODE$"); + return; } + output_section_asm_op ("\t.SPACE $TEXT$\n\t.SUBSPA $CODE$"); +} + +/* A get_unnamed_section callback for switching to comdat data + sections. This function is only used with SOM. */ - return "\t.SPACE $TEXT$\n\t.SUBSPA $CODE$"; +static void +som_output_comdat_data_section_asm_op (const void *data) +{ + in_section = NULL; + output_section_asm_op (data); +} + +/* Implement TARGET_ASM_INITIALIZE_SECTIONS */ + +static void +pa_som_asm_init_sections (void) +{ + text_section + = get_unnamed_section (0, som_output_text_section_asm_op, NULL); + + /* SOM puts readonly data in the default $LIT$ subspace when PIC code + is not being generated. */ + som_readonly_data_section + = get_unnamed_section (0, output_section_asm_op, + "\t.SPACE $TEXT$\n\t.SUBSPA $LIT$"); + + /* When secondary definitions are not supported, SOM makes readonly + data one-only by creating a new $LIT$ subspace in $TEXT$ with + the comdat flag. */ + som_one_only_readonly_data_section + = get_unnamed_section (0, som_output_comdat_data_section_asm_op, + "\t.SPACE $TEXT$\n" + "\t.NSUBSPA $LIT$,QUAD=0,ALIGN=8," + "ACCESS=0x2c,SORT=16,COMDAT"); + + + /* When secondary definitions are not supported, SOM makes data one-only + by creating a new $DATA$ subspace in $PRIVATE$ with the comdat flag. */ + som_one_only_data_section + = get_unnamed_section (SECTION_WRITE, + som_output_comdat_data_section_asm_op, + "\t.SPACE $PRIVATE$\n" + "\t.NSUBSPA $DATA$,QUAD=1,ALIGN=8," + "ACCESS=31,SORT=24,COMDAT"); + + /* FIXME: HPUX ld generates incorrect GOT entries for "T" fixups + which reference data within the $TEXT$ space (for example constant + strings in the $LIT$ subspace). + + The assemblers (GAS and HP as) both have problems with handling + the difference of two symbols which is the other correct way to + reference constant data during PIC code generation. + + So, there's no way to reference constant data which is in the + $TEXT$ space during PIC generation. Instead place all constant + data into the $PRIVATE$ subspace (this reduces sharing, but it + works correctly). */ + readonly_data_section = flag_pic ? data_section : som_readonly_data_section; + + /* We must not have a reference to an external symbol defined in a + shared library in a readonly section, else the SOM linker will + complain. + + So, we force exception information into the data section. */ + exception_section = data_section; } /* On hpux10, the linker will give an error if we have a reference @@ -9060,7 +9182,7 @@ som_text_section_asm_op (void) library. Therefore, expressions that might require a reloc can not be placed in the read-only data section. */ -static void +static section * pa_select_section (tree exp, int reloc, unsigned HOST_WIDE_INT align ATTRIBUTE_UNUSED) { @@ -9075,19 +9197,19 @@ pa_select_section (tree exp, int reloc, if (TARGET_SOM && DECL_ONE_ONLY (exp) && !DECL_WEAK (exp)) - som_one_only_readonly_data_section (); + return som_one_only_readonly_data_section; else - readonly_data_section (); + return readonly_data_section; } else if (CONSTANT_CLASS_P (exp) && !reloc) - readonly_data_section (); + return readonly_data_section; else if (TARGET_SOM && TREE_CODE (exp) == VAR_DECL && DECL_ONE_ONLY (exp) && !DECL_WEAK (exp)) - som_one_only_data_section (); + return som_one_only_data_section; else - data_section (); + return data_section; } static void diff --git a/gcc/config/pa/pa.h b/gcc/config/pa/pa.h index 17870385cf5..c29a8764eab 100644 --- a/gcc/config/pa/pa.h +++ b/gcc/config/pa/pa.h @@ -527,28 +527,19 @@ extern struct rtx_def *hppa_pic_save_rtx (void); in some cases it is preferable to use a more restrictive class. */ #define PREFERRED_RELOAD_CLASS(X,CLASS) (CLASS) -/* Return the register class of a scratch register needed to copy - IN into a register in CLASS in MODE, or a register in CLASS in MODE - to IN. If it can be done directly NO_REGS is returned. - - Avoid doing any work for the common case calls. */ -#define SECONDARY_RELOAD_CLASS(CLASS,MODE,IN) \ - ((CLASS == BASE_REG_CLASS && GET_CODE (IN) == REG \ - && REGNO (IN) < FIRST_PSEUDO_REGISTER) \ - ? NO_REGS : pa_secondary_reload_class (CLASS, MODE, IN)) - #define MAYBE_FP_REG_CLASS_P(CLASS) \ reg_classes_intersect_p ((CLASS), FP_REGS) /* On the PA it is not possible to directly move data between - GENERAL_REGS and FP_REGS. */ -#define SECONDARY_MEMORY_NEEDED(CLASS1, CLASS2, MODE) \ - (MAYBE_FP_REG_CLASS_P (CLASS1) != FP_REG_CLASS_P (CLASS2) \ - || MAYBE_FP_REG_CLASS_P (CLASS2) != FP_REG_CLASS_P (CLASS1)) - -/* Return the stack location to use for secondary memory needed reloads. */ -#define SECONDARY_MEMORY_NEEDED_RTX(MODE) \ - gen_rtx_MEM (MODE, gen_rtx_PLUS (Pmode, stack_pointer_rtx, GEN_INT (-16))) + GENERAL_REGS and FP_REGS. On the 32-bit port, we use the + location at SP-16. We don't expose this location in the RTL to + avoid scheduling related problems. For example, the store and + load could be separated by a call to a pure or const function + which has no frame and uses SP-16. */ +#define SECONDARY_MEMORY_NEEDED(CLASS1, CLASS2, MODE) \ + (TARGET_64BIT \ + && (MAYBE_FP_REG_CLASS_P (CLASS1) != FP_REG_CLASS_P (CLASS2) \ + || MAYBE_FP_REG_CLASS_P (CLASS2) != FP_REG_CLASS_P (CLASS1))) /* Stack layout; function entry, exit and calling. */ @@ -1578,72 +1569,6 @@ do { \ ((TREE_CODE (DECL) == FUNCTION_DECL || TREE_CODE (DECL) == VAR_DECL) \ && DECL_SECTION_NAME (DECL) != NULL_TREE) -/* The following extra sections and extra section functions are only used - for SOM, but they must be provided unconditionally because pa.c's calls - to the functions might not get optimized out when other object formats - are in use. */ - -#define EXTRA_SECTIONS \ - in_som_readonly_data, \ - in_som_one_only_readonly_data, \ - in_som_one_only_data - -#define EXTRA_SECTION_FUNCTIONS \ - SOM_READONLY_DATA_SECTION_FUNCTION \ - SOM_ONE_ONLY_READONLY_DATA_SECTION_FUNCTION \ - SOM_ONE_ONLY_DATA_SECTION_FUNCTION \ - FORGET_SECTION_FUNCTION - -/* SOM puts readonly data in the default $LIT$ subspace when PIC code - is not being generated. */ -#define SOM_READONLY_DATA_SECTION_FUNCTION \ -void \ -som_readonly_data_section (void) \ -{ \ - if (!TARGET_SOM) \ - return; \ - if (in_section != in_som_readonly_data) \ - { \ - in_section = in_som_readonly_data; \ - fputs ("\t.SPACE $TEXT$\n\t.SUBSPA $LIT$\n", asm_out_file); \ - } \ -} - -/* When secondary definitions are not supported, SOM makes readonly data one - only by creating a new $LIT$ subspace in $TEXT$ with the comdat flag. */ -#define SOM_ONE_ONLY_READONLY_DATA_SECTION_FUNCTION \ -void \ -som_one_only_readonly_data_section (void) \ -{ \ - if (!TARGET_SOM) \ - return; \ - in_section = in_som_one_only_readonly_data; \ - fputs ("\t.SPACE $TEXT$\n" \ - "\t.NSUBSPA $LIT$,QUAD=0,ALIGN=8,ACCESS=0x2c,SORT=16,COMDAT\n",\ - asm_out_file); \ -} - -/* When secondary definitions are not supported, SOM makes data one only by - creating a new $DATA$ subspace in $PRIVATE$ with the comdat flag. */ -#define SOM_ONE_ONLY_DATA_SECTION_FUNCTION \ -void \ -som_one_only_data_section (void) \ -{ \ - if (!TARGET_SOM) \ - return; \ - in_section = in_som_one_only_data; \ - fputs ("\t.SPACE $PRIVATE$\n" \ - "\t.NSUBSPA $DATA$,QUAD=1,ALIGN=8,ACCESS=31,SORT=24,COMDAT\n", \ - asm_out_file); \ -} - -#define FORGET_SECTION_FUNCTION \ -void \ -forget_section (void) \ -{ \ - in_section = no_section; \ -} - /* Define this macro if references to a symbol must be treated differently depending on something about the variable or function named by the symbol (such as what section it is in). diff --git a/gcc/config/pa/pa.md b/gcc/config/pa/pa.md index 83fdec6066a..b51feb0ee16 100644 --- a/gcc/config/pa/pa.md +++ b/gcc/config/pa/pa.md @@ -2255,9 +2255,24 @@ DONE; }") -;; Reloading an SImode or DImode value requires a scratch register if -;; going in to or out of float point registers. +;; Handle SImode input reloads requiring %r1 as a scratch register. +(define_expand "reload_insi_r1" + [(set (match_operand:SI 0 "register_operand" "=Z") + (match_operand:SI 1 "non_hard_reg_operand" "")) + (clobber (match_operand:SI 2 "register_operand" "=&a"))] + "" + " +{ + if (emit_move_sequence (operands, SImode, operands[2])) + DONE; + + /* We don't want the clobber emitted, so handle this ourselves. */ + emit_insn (gen_rtx_SET (VOIDmode, operands[0], operands[1])); + DONE; +}") +;; Handle SImode input reloads requiring a general register as a +;; scratch register. (define_expand "reload_insi" [(set (match_operand:SI 0 "register_operand" "=Z") (match_operand:SI 1 "non_hard_reg_operand" "")) @@ -2273,6 +2288,8 @@ DONE; }") +;; Handle SImode output reloads requiring a general register as a +;; scratch register. (define_expand "reload_outsi" [(set (match_operand:SI 0 "non_hard_reg_operand" "") (match_operand:SI 1 "register_operand" "Z")) @@ -2290,12 +2307,41 @@ (define_insn "" [(set (match_operand:SI 0 "move_dest_operand" + "=r,r,r,r,r,r,Q,!*q,!r,!*f,*f,T,r,f") + (match_operand:SI 1 "move_src_operand" + "A,r,J,N,K,RQ,rM,!rM,!*q,!*fM,RT,*f,f,r"))] + "(register_operand (operands[0], SImode) + || reg_or_0_operand (operands[1], SImode)) + && !TARGET_SOFT_FLOAT + && !TARGET_64BIT" + "@ + ldw RT'%A1,%0 + copy %1,%0 + ldi %1,%0 + ldil L'%1,%0 + {zdepi|depwi,z} %Z1,%0 + ldw%M1 %1,%0 + stw%M0 %r1,%0 + mtsar %r1 + {mfctl|mfctl,w} %%sar,%0 + fcpy,sgl %f1,%0 + fldw%F1 %1,%0 + fstw%F0 %1,%0 + {fstws|fstw} %1,-16(%%sp)\n\t{ldws|ldw} -16(%%sp),%0 + {stws|stw} %1,-16(%%sp)\n\t{fldws|fldw} -16(%%sp),%0" + [(set_attr "type" "load,move,move,move,shift,load,store,move,move,fpalu,fpload,fpstore,move,move") + (set_attr "pa_combine_type" "addmove") + (set_attr "length" "4,4,4,4,4,4,4,4,4,4,4,4,8,8")]) + +(define_insn "" + [(set (match_operand:SI 0 "move_dest_operand" "=r,r,r,r,r,r,Q,!*q,!r,!*f,*f,T") (match_operand:SI 1 "move_src_operand" "A,r,J,N,K,RQ,rM,!rM,!*q,!*fM,RT,*f"))] "(register_operand (operands[0], SImode) || reg_or_0_operand (operands[1], SImode)) - && !TARGET_SOFT_FLOAT" + && !TARGET_SOFT_FLOAT + && TARGET_64BIT" "@ ldw RT'%A1,%0 copy %1,%0 @@ -2404,9 +2450,9 @@ (match_operand:SI 3 "register_operand" ""))] "!TARGET_SOFT_FLOAT && !TARGET_DISABLE_INDEXING - && REG_OK_FOR_BASE_P (operands[1]) - && (TARGET_NO_SPACE_REGS - || (!REG_POINTER (operands[1]) && REG_POINTER (operands[2]))) + && TARGET_NO_SPACE_REGS + && REG_OK_FOR_INDEX_P (operands[1]) + && REG_OK_FOR_BASE_P (operands[2]) && FP_REGNO_P (REGNO (operands[3]))" [(set (mem:SI (plus:SI (match_dup 1) (match_dup 2))) (match_dup 3)) @@ -2421,9 +2467,9 @@ (match_operand:SI 3 "register_operand" ""))] "!TARGET_SOFT_FLOAT && !TARGET_DISABLE_INDEXING - && REG_OK_FOR_BASE_P (operands[2]) - && (TARGET_NO_SPACE_REGS - || (REG_POINTER (operands[1]) && !REG_POINTER (operands[2]))) + && TARGET_NO_SPACE_REGS + && REG_OK_FOR_BASE_P (operands[1]) + && REG_OK_FOR_INDEX_P (operands[2]) && FP_REGNO_P (REGNO (operands[3]))" [(set (mem:SI (plus:SI (match_dup 2) (match_dup 1))) (match_dup 3)) @@ -2439,9 +2485,9 @@ "!TARGET_SOFT_FLOAT && !TARGET_DISABLE_INDEXING && TARGET_64BIT - && REG_OK_FOR_BASE_P (operands[1]) - && (TARGET_NO_SPACE_REGS - || (!REG_POINTER (operands[1]) && REG_POINTER (operands[2]))) + && TARGET_NO_SPACE_REGS + && REG_OK_FOR_INDEX_P (operands[1]) + && REG_OK_FOR_BASE_P (operands[2]) && FP_REGNO_P (REGNO (operands[3]))" [(set (mem:SI (plus:DI (match_dup 1) (match_dup 2))) (match_dup 3)) @@ -2457,9 +2503,9 @@ "!TARGET_SOFT_FLOAT && !TARGET_DISABLE_INDEXING && TARGET_64BIT - && REG_OK_FOR_BASE_P (operands[2]) - && (TARGET_NO_SPACE_REGS - || (REG_POINTER (operands[1]) && !REG_POINTER (operands[2]))) + && TARGET_NO_SPACE_REGS + && REG_OK_FOR_BASE_P (operands[1]) + && REG_OK_FOR_INDEX_P (operands[2]) && FP_REGNO_P (REGNO (operands[3]))" [(set (mem:SI (plus:DI (match_dup 2) (match_dup 1))) (match_dup 3)) @@ -3787,9 +3833,8 @@ DONE; }") -;; Reloading an SImode or DImode value requires a scratch register if -;; going in to or out of float point registers. - +;; Handle DFmode input reloads requiring a general register as a +;; scratch register. (define_expand "reload_indf" [(set (match_operand:DF 0 "register_operand" "=Z") (match_operand:DF 1 "non_hard_reg_operand" "")) @@ -3805,6 +3850,8 @@ DONE; }") +;; Handle DFmode output reloads requiring a general register as a +;; scratch register. (define_expand "reload_outdf" [(set (match_operand:DF 0 "non_hard_reg_operand" "") (match_operand:DF 1 "register_operand" "Z")) @@ -3822,9 +3869,9 @@ (define_insn "" [(set (match_operand:DF 0 "move_dest_operand" - "=f,*r,Q,?o,?Q,f,*r,*r") + "=f,*r,Q,?o,?Q,f,*r,*r,r,f") (match_operand:DF 1 "reg_or_0_or_nonsymb_mem_operand" - "fG,*rG,f,*r,*r,RQ,o,RQ"))] + "fG,*rG,f,*r,*r,RQ,o,RQ,f,r"))] "(register_operand (operands[0], DFmode) || reg_or_0_operand (operands[1], DFmode)) && !(GET_CODE (operands[1]) == CONST_DOUBLE @@ -3833,13 +3880,15 @@ && !TARGET_SOFT_FLOAT" "* { - if (FP_REG_P (operands[0]) || FP_REG_P (operands[1]) - || operands[1] == CONST0_RTX (DFmode)) + if ((FP_REG_P (operands[0]) || FP_REG_P (operands[1]) + || operands[1] == CONST0_RTX (DFmode)) + && !(REG_P (operands[0]) && REG_P (operands[1]) + && FP_REG_P (operands[0]) ^ FP_REG_P (operands[1]))) return output_fp_move_double (operands); return output_move_double (operands); }" - [(set_attr "type" "fpalu,move,fpstore,store,store,fpload,load,load") - (set_attr "length" "4,8,4,8,16,4,8,16")]) + [(set_attr "type" "fpalu,move,fpstore,store,store,fpload,load,load,move,move") + (set_attr "length" "4,8,4,8,16,4,8,16,12,12")]) (define_insn "" [(set (match_operand:DF 0 "indexed_memory_operand" "=R") @@ -3930,9 +3979,9 @@ (match_operand:DF 3 "register_operand" ""))] "!TARGET_SOFT_FLOAT && !TARGET_DISABLE_INDEXING - && REG_OK_FOR_BASE_P (operands[1]) - && (TARGET_NO_SPACE_REGS - || (!REG_POINTER (operands[1]) && REG_POINTER (operands[2]))) + && TARGET_NO_SPACE_REGS + && REG_OK_FOR_INDEX_P (operands[1]) + && REG_OK_FOR_BASE_P (operands[2]) && FP_REGNO_P (REGNO (operands[3]))" [(set (mem:DF (plus:SI (match_dup 1) (match_dup 2))) (match_dup 3)) @@ -3947,9 +3996,9 @@ (match_operand:DF 3 "register_operand" ""))] "!TARGET_SOFT_FLOAT && !TARGET_DISABLE_INDEXING - && REG_OK_FOR_BASE_P (operands[2]) - && (TARGET_NO_SPACE_REGS - || (REG_POINTER (operands[1]) && !REG_POINTER (operands[2]))) + && TARGET_NO_SPACE_REGS + && REG_OK_FOR_BASE_P (operands[1]) + && REG_OK_FOR_INDEX_P (operands[2]) && FP_REGNO_P (REGNO (operands[3]))" [(set (mem:DF (plus:SI (match_dup 2) (match_dup 1))) (match_dup 3)) @@ -3965,9 +4014,9 @@ "!TARGET_SOFT_FLOAT && !TARGET_DISABLE_INDEXING && TARGET_64BIT - && REG_OK_FOR_BASE_P (operands[1]) - && (TARGET_NO_SPACE_REGS - || (!REG_POINTER (operands[1]) && REG_POINTER (operands[2]))) + && TARGET_NO_SPACE_REGS + && REG_OK_FOR_INDEX_P (operands[1]) + && REG_OK_FOR_BASE_P (operands[2]) && FP_REGNO_P (REGNO (operands[3]))" [(set (mem:DF (plus:DI (match_dup 1) (match_dup 2))) (match_dup 3)) @@ -3983,9 +4032,9 @@ "!TARGET_SOFT_FLOAT && !TARGET_DISABLE_INDEXING && TARGET_64BIT - && REG_OK_FOR_BASE_P (operands[2]) - && (TARGET_NO_SPACE_REGS - || (REG_POINTER (operands[1]) && !REG_POINTER (operands[2]))) + && TARGET_NO_SPACE_REGS + && REG_OK_FOR_BASE_P (operands[1]) + && REG_OK_FOR_INDEX_P (operands[2]) && FP_REGNO_P (REGNO (operands[3]))" [(set (mem:DF (plus:DI (match_dup 2) (match_dup 1))) (match_dup 3)) @@ -3994,9 +4043,9 @@ (define_insn "" [(set (match_operand:DF 0 "move_dest_operand" - "=r,?o,?Q,r,r") + "=r,?o,?Q,r,r,r,f") (match_operand:DF 1 "reg_or_0_or_nonsymb_mem_operand" - "rG,r,r,o,RQ"))] + "rG,r,r,o,RQ,f,r"))] "(register_operand (operands[0], DFmode) || reg_or_0_operand (operands[1], DFmode)) && !TARGET_64BIT @@ -4005,8 +4054,8 @@ { return output_move_double (operands); }" - [(set_attr "type" "move,store,store,load,load") - (set_attr "length" "8,8,16,8,16")]) + [(set_attr "type" "move,store,store,load,load,move,move") + (set_attr "length" "8,8,16,8,16,12,12")]) (define_insn "" [(set (match_operand:DF 0 "move_dest_operand" @@ -4044,6 +4093,24 @@ DONE; }") +;; Handle DImode input reloads requiring %r1 as a scratch register. +(define_expand "reload_indi_r1" + [(set (match_operand:DI 0 "register_operand" "=Z") + (match_operand:DI 1 "non_hard_reg_operand" "")) + (clobber (match_operand:SI 2 "register_operand" "=&a"))] + "" + " +{ + if (emit_move_sequence (operands, DImode, operands[2])) + DONE; + + /* We don't want the clobber emitted, so handle this ourselves. */ + emit_insn (gen_rtx_SET (VOIDmode, operands[0], operands[1])); + DONE; +}") + +;; Handle DImode input reloads requiring a general register as a +;; scratch register. (define_expand "reload_indi" [(set (match_operand:DI 0 "register_operand" "=Z") (match_operand:DI 1 "non_hard_reg_operand" "")) @@ -4059,6 +4126,8 @@ DONE; }") +;; Handle DImode output reloads requiring a general register as a +;; scratch register. (define_expand "reload_outdi" [(set (match_operand:DI 0 "non_hard_reg_operand" "") (match_operand:DI 1 "register_operand" "Z")) @@ -4116,22 +4185,25 @@ (define_insn "" [(set (match_operand:DI 0 "move_dest_operand" - "=r,o,Q,r,r,r,*f,*f,T") + "=r,o,Q,r,r,r,*f,*f,T,r,f") (match_operand:DI 1 "general_operand" - "rM,r,r,o*R,Q,i,*fM,RT,*f"))] + "rM,r,r,o*R,Q,i,*fM,RT,*f,f,r"))] "(register_operand (operands[0], DImode) || reg_or_0_operand (operands[1], DImode)) && !TARGET_64BIT && !TARGET_SOFT_FLOAT" "* { - if (FP_REG_P (operands[0]) || FP_REG_P (operands[1]) - || (operands[1] == CONST0_RTX (DImode))) + if ((FP_REG_P (operands[0]) || FP_REG_P (operands[1]) + || operands[1] == CONST0_RTX (DFmode)) + && !(REG_P (operands[0]) && REG_P (operands[1]) + && FP_REG_P (operands[0]) ^ FP_REG_P (operands[1]))) return output_fp_move_double (operands); return output_move_double (operands); }" - [(set_attr "type" "move,store,store,load,load,multi,fpalu,fpload,fpstore") - (set_attr "length" "8,8,16,8,16,16,4,4,4")]) + [(set_attr "type" + "move,store,store,load,load,multi,fpalu,fpload,fpstore,move,move") + (set_attr "length" "8,8,16,8,16,16,4,4,4,12,12")]) (define_insn "" [(set (match_operand:DI 0 "move_dest_operand" @@ -4215,9 +4287,9 @@ "!TARGET_SOFT_FLOAT && !TARGET_DISABLE_INDEXING && TARGET_64BIT - && REG_OK_FOR_BASE_P (operands[1]) - && (TARGET_NO_SPACE_REGS - || (!REG_POINTER (operands[1]) && REG_POINTER (operands[2]))) + && TARGET_NO_SPACE_REGS + && REG_OK_FOR_INDEX_P (operands[1]) + && REG_OK_FOR_BASE_P (operands[2]) && FP_REGNO_P (REGNO (operands[3]))" [(set (mem:DI (plus:DI (match_dup 1) (match_dup 2))) (match_dup 3)) @@ -4233,9 +4305,9 @@ "!TARGET_SOFT_FLOAT && !TARGET_DISABLE_INDEXING && TARGET_64BIT - && REG_OK_FOR_BASE_P (operands[2]) - && (TARGET_NO_SPACE_REGS - || (REG_POINTER (operands[1]) && !REG_POINTER (operands[2]))) + && TARGET_NO_SPACE_REGS + && REG_OK_FOR_BASE_P (operands[1]) + && REG_OK_FOR_INDEX_P (operands[2]) && FP_REGNO_P (REGNO (operands[3]))" [(set (mem:DI (plus:DI (match_dup 2) (match_dup 1))) (match_dup 3)) @@ -4306,9 +4378,8 @@ DONE; }") -;; Reloading an SImode or DImode value requires a scratch register if -;; going in to or out of float point registers. - +;; Handle SFmode input reloads requiring a general register as a +;; scratch register. (define_expand "reload_insf" [(set (match_operand:SF 0 "register_operand" "=Z") (match_operand:SF 1 "non_hard_reg_operand" "")) @@ -4324,6 +4395,8 @@ DONE; }") +;; Handle SFmode output reloads requiring a general register as a +;; scratch register. (define_expand "reload_outsf" [(set (match_operand:SF 0 "non_hard_reg_operand" "") (match_operand:SF 1 "register_operand" "Z")) @@ -4341,12 +4414,35 @@ (define_insn "" [(set (match_operand:SF 0 "move_dest_operand" + "=f,!*r,f,*r,Q,Q,r,f") + (match_operand:SF 1 "reg_or_0_or_nonsymb_mem_operand" + "fG,!*rG,RQ,RQ,f,*rG,f,r"))] + "(register_operand (operands[0], SFmode) + || reg_or_0_operand (operands[1], SFmode)) + && !TARGET_SOFT_FLOAT + && !TARGET_64BIT" + "@ + fcpy,sgl %f1,%0 + copy %r1,%0 + fldw%F1 %1,%0 + ldw%M1 %1,%0 + fstw%F0 %1,%0 + stw%M0 %r1,%0 + {fstws|fstw} %1,-16(%%sp)\n\t{ldws|ldw} -16(%%sp),%0 + {stws|stw} %1,-16(%%sp)\n\t{fldws|fldw} -16(%%sp),%0" + [(set_attr "type" "fpalu,move,fpload,load,fpstore,store,move,move") + (set_attr "pa_combine_type" "addmove") + (set_attr "length" "4,4,4,4,4,4,8,8")]) + +(define_insn "" + [(set (match_operand:SF 0 "move_dest_operand" "=f,!*r,f,*r,Q,Q") (match_operand:SF 1 "reg_or_0_or_nonsymb_mem_operand" "fG,!*rG,RQ,RQ,f,*rG"))] "(register_operand (operands[0], SFmode) || reg_or_0_operand (operands[1], SFmode)) - && !TARGET_SOFT_FLOAT" + && !TARGET_SOFT_FLOAT + && TARGET_64BIT" "@ fcpy,sgl %f1,%0 copy %r1,%0 @@ -4447,9 +4543,9 @@ (match_operand:SF 3 "register_operand" ""))] "!TARGET_SOFT_FLOAT && !TARGET_DISABLE_INDEXING - && REG_OK_FOR_BASE_P (operands[1]) - && (TARGET_NO_SPACE_REGS - || (!REG_POINTER (operands[1]) && REG_POINTER (operands[2]))) + && TARGET_NO_SPACE_REGS + && REG_OK_FOR_INDEX_P (operands[1]) + && REG_OK_FOR_BASE_P (operands[2]) && FP_REGNO_P (REGNO (operands[3]))" [(set (mem:SF (plus:SI (match_dup 1) (match_dup 2))) (match_dup 3)) @@ -4464,9 +4560,9 @@ (match_operand:SF 3 "register_operand" ""))] "!TARGET_SOFT_FLOAT && !TARGET_DISABLE_INDEXING - && REG_OK_FOR_BASE_P (operands[2]) - && (TARGET_NO_SPACE_REGS - || (REG_POINTER (operands[1]) && !REG_POINTER (operands[2]))) + && TARGET_NO_SPACE_REGS + && REG_OK_FOR_BASE_P (operands[1]) + && REG_OK_FOR_INDEX_P (operands[2]) && FP_REGNO_P (REGNO (operands[3]))" [(set (mem:SF (plus:SI (match_dup 2) (match_dup 1))) (match_dup 3)) @@ -4482,9 +4578,9 @@ "!TARGET_SOFT_FLOAT && !TARGET_DISABLE_INDEXING && TARGET_64BIT - && REG_OK_FOR_BASE_P (operands[1]) - && (TARGET_NO_SPACE_REGS - || (!REG_POINTER (operands[1]) && REG_POINTER (operands[2]))) + && TARGET_NO_SPACE_REGS + && REG_OK_FOR_INDEX_P (operands[1]) + && REG_OK_FOR_BASE_P (operands[2]) && FP_REGNO_P (REGNO (operands[3]))" [(set (mem:SF (plus:DI (match_dup 1) (match_dup 2))) (match_dup 3)) @@ -4500,9 +4596,9 @@ "!TARGET_SOFT_FLOAT && !TARGET_DISABLE_INDEXING && TARGET_64BIT - && REG_OK_FOR_BASE_P (operands[2]) - && (TARGET_NO_SPACE_REGS - || (REG_POINTER (operands[1]) && !REG_POINTER (operands[2]))) + && TARGET_NO_SPACE_REGS + && REG_OK_FOR_BASE_P (operands[1]) + && REG_OK_FOR_INDEX_P (operands[2]) && FP_REGNO_P (REGNO (operands[3]))" [(set (mem:SF (plus:DI (match_dup 2) (match_dup 1))) (match_dup 3)) diff --git a/gcc/config/pa/predicates.md b/gcc/config/pa/predicates.md index b3835699a8e..685a4941991 100644 --- a/gcc/config/pa/predicates.md +++ b/gcc/config/pa/predicates.md @@ -60,7 +60,8 @@ return (memory_address_p (mode, op) && IS_INDEX_ADDR_P (op)); }) -;; TODO: Add a comment. +;; Return 1 iff OP is a symbolic operand. +;; Note: an inline copy of this code is present in pa_secondary_reload. (define_predicate "symbolic_operand" (match_code "symbol_ref,label_ref,const") diff --git a/gcc/config/pa/quadlib.c b/gcc/config/pa/quadlib.c index 376609001d5..bce99d2cee8 100644 --- a/gcc/config/pa/quadlib.c +++ b/gcc/config/pa/quadlib.c @@ -64,7 +64,9 @@ long double _U_Qfneg (long double); int __U_Qfcnvfxt_quad_to_sgl (long double); #endif unsigned int _U_Qfcnvfxt_quad_to_usgl(long double); +long double _U_Qfcnvxf_usgl_to_quad (unsigned int); unsigned long long _U_Qfcnvfxt_quad_to_udbl(long double); +long double _U_Qfcnvxf_udbl_to_quad (unsigned long long); int _U_Qfeq (long double a, long double b) @@ -186,27 +188,42 @@ __U_Qfcnvfxt_quad_to_sgl (long double a) } #endif -/* HP only has signed conversion in library, so need to synthesize an - unsigned version */ +/* HP only has signed conversion in the C library, so need to synthesize + unsigned versions. */ unsigned int -_U_Qfcnvfxt_quad_to_usgl(long double a) +_U_Qfcnvfxt_quad_to_usgl (long double a) { extern long long _U_Qfcnvfxt_quad_to_dbl (long double a); return (unsigned int) _U_Qfcnvfxt_quad_to_dbl (a); } -/* HP only has signed conversion in library, so need to synthesize an - unsigned version */ +long double +_U_Qfcnvxf_usgl_to_quad (unsigned int a) +{ + extern long double _U_Qfcnvxf_dbl_to_quad (long long); + return _U_Qfcnvxf_dbl_to_quad ((long long) a); +} + typedef union { - long long unsigned int u[2]; + unsigned long long u[2]; long double d[1]; } quad_type; unsigned long long -_U_Qfcnvfxt_quad_to_udbl(long double a) +_U_Qfcnvfxt_quad_to_udbl (long double a) { extern quad_type _U_Qfcnvfxt_quad_to_quad (long double a); quad_type u; u = _U_Qfcnvfxt_quad_to_quad(a); return u.u[1]; } + +long double +_U_Qfcnvxf_udbl_to_quad (unsigned long long a) +{ + extern long double _U_Qfcnvxf_quad_to_quad (quad_type a); + quad_type u; + u.u[0] = 0; + u.u[1] = a; + return _U_Qfcnvxf_quad_to_quad (u); +} diff --git a/gcc/config/pa/som.h b/gcc/config/pa/som.h index e397b9dfd8e..abeafbeebf6 100644 --- a/gcc/config/pa/som.h +++ b/gcc/config/pa/som.h @@ -175,9 +175,7 @@ do { \ }} while (0) #define TARGET_ASM_FILE_START pa_som_file_start - -/* String to output before text. */ -#define TEXT_SECTION_ASM_OP som_text_section_asm_op () +#define TARGET_ASM_INIT_SECTIONS pa_som_asm_init_sections /* String to output before writable data. */ #define DATA_SECTION_ASM_OP "\t.SPACE $PRIVATE$\n\t.SUBSPA $DATA$\n" @@ -185,28 +183,6 @@ do { \ /* String to output before uninitialized data. */ #define BSS_SECTION_ASM_OP "\t.SPACE $PRIVATE$\n\t.SUBSPA $BSS$\n" -/* FIXME: HPUX ld generates incorrect GOT entries for "T" fixups - which reference data within the $TEXT$ space (for example constant - strings in the $LIT$ subspace). - - The assemblers (GAS and HP as) both have problems with handling - the difference of two symbols which is the other correct way to - reference constant data during PIC code generation. - - So, there's no way to reference constant data which is in the - $TEXT$ space during PIC generation. Instead place all constant - data into the $PRIVATE$ subspace (this reduces sharing, but it - works correctly). */ -#define READONLY_DATA_SECTION \ - (flag_pic ? data_section : som_readonly_data_section) - -/* We must not have a reference to an external symbol defined in a - shared library in a readonly section, else the SOM linker will - complain. - - So, we force exception information into the data section. */ -#define TARGET_ASM_EXCEPTION_SECTION data_section - /* This is how to output a command to make the user-level label named NAME defined for reference from other files. We use assemble_name_raw instead of assemble_name since a symbol in diff --git a/gcc/config/rs6000/darwin.h b/gcc/config/rs6000/darwin.h index bb0302930d5..6c625753a5c 100644 --- a/gcc/config/rs6000/darwin.h +++ b/gcc/config/rs6000/darwin.h @@ -77,7 +77,6 @@ do { \ else if (flag_pic == 1) \ { \ /* Darwin doesn't support -fpic. */ \ - warning (0, "-fpic is not supported; -fPIC assumed"); \ flag_pic = 2; \ } \ } \ diff --git a/gcc/config/rs6000/host-darwin.c b/gcc/config/rs6000/host-darwin.c index 694d0a1dcd1..75c92a2a25b 100644 --- a/gcc/config/rs6000/host-darwin.c +++ b/gcc/config/rs6000/host-darwin.c @@ -58,11 +58,15 @@ segv_handler (int sig ATTRIBUTE_UNUSED, void *scp) { ucontext_t *uc = (ucontext_t *)scp; + sigset_t sigset; unsigned faulting_insn; /* The fault might have happened when trying to run some instruction, in which case the next line will segfault _again_. Handle this case. */ signal (SIGSEGV, segv_crash_handler); + sigemptyset (&sigset); + sigaddset (&sigset, SIGSEGV); + sigprocmask (SIG_UNBLOCK, &sigset, NULL); faulting_insn = *(unsigned *)uc->uc_mcontext->ss.srr0; diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h index 1555d2968a7..bc615e8c96d 100644 --- a/gcc/config/rs6000/linux64.h +++ b/gcc/config/rs6000/linux64.h @@ -236,6 +236,12 @@ extern int dot_symbols; ? rs6000_special_round_type_align (STRUCT, COMPUTED, SPECIFIED) \ : MAX ((COMPUTED), (SPECIFIED))) +/* Use the default for compiling target libs. */ +#ifdef IN_TARGET_LIBS +#undef TARGET_ALIGN_NATURAL +#define TARGET_ALIGN_NATURAL 1 +#endif + /* Indicate that jump tables go in the text section. */ #undef JUMP_TABLES_IN_TEXT_SECTION #define JUMP_TABLES_IN_TEXT_SECTION TARGET_64BIT diff --git a/gcc/config/rs6000/ppc64-fp.c b/gcc/config/rs6000/ppc64-fp.c index cb8e585484c..6be3ca8235f 100644 --- a/gcc/config/rs6000/ppc64-fp.c +++ b/gcc/config/rs6000/ppc64-fp.c @@ -39,8 +39,11 @@ extern DItype __fixsfdi (SFtype); extern USItype __fixunsdfsi (DFtype); extern USItype __fixunssfsi (SFtype); extern TFtype __floatditf (DItype); +extern TFtype __floatunditf (UDItype); extern DFtype __floatdidf (DItype); +extern DFtype __floatundidf (UDItype); extern SFtype __floatdisf (DItype); +extern SFtype __floatundisf (UDItype); extern DItype __fixunstfdi (TFtype); static DItype local_fixunssfdi (SFtype); @@ -100,6 +103,18 @@ __floatditf (DItype u) return (TFtype) dh + (TFtype) dl; } +TFtype +__floatunditf (UDItype u) +{ + DFtype dh, dl; + + dh = (USItype) (u >> (sizeof (SItype) * 8)); + dh *= 2.0 * (((UDItype) 1) << ((sizeof (SItype) * 8) - 1)); + dl = (USItype) (u & ((((UDItype) 1) << (sizeof (SItype) * 8)) - 1)); + + return (TFtype) dh + (TFtype) dl; +} + DFtype __floatdidf (DItype u) { @@ -112,6 +127,18 @@ __floatdidf (DItype u) return d; } +DFtype +__floatundidf (UDItype u) +{ + DFtype d; + + d = (USItype) (u >> (sizeof (SItype) * 8)); + d *= 2.0 * (((UDItype) 1) << ((sizeof (SItype) * 8) - 1)); + d += (USItype) (u & ((((UDItype) 1) << (sizeof (SItype) * 8)) - 1)); + + return d; +} + SFtype __floatdisf (DItype u) { @@ -137,6 +164,30 @@ __floatdisf (DItype u) return (SFtype) f; } +SFtype +__floatundisf (UDItype u) +{ + DFtype f; + + if (53 < (sizeof (DItype) * 8) + && 53 > ((sizeof (DItype) * 8) - 53 + 24)) + { + if (u >= ((UDItype) 1 << 53)) + { + if ((UDItype) u & (((UDItype) 1 << ((sizeof (DItype) * 8) - 53)) - 1)) + { + u &= ~ (((UDItype) 1 << ((sizeof (DItype) * 8) - 53)) - 1); + u |= ((UDItype) 1 << ((sizeof (DItype) * 8) - 53)); + } + } + } + f = (USItype) (u >> (sizeof (SItype) * 8)); + f *= 2.0 * (((UDItype) 1) << ((sizeof (SItype) * 8) - 1)); + f += (USItype) (u & ((((UDItype) 1) << (sizeof (SItype) * 8)) - 1)); + + return (SFtype) f; +} + DItype __fixunstfdi (TFtype a) { diff --git a/gcc/config/rs6000/predicates.md b/gcc/config/rs6000/predicates.md index 2b0716e658c..de31fe2e54f 100644 --- a/gcc/config/rs6000/predicates.md +++ b/gcc/config/rs6000/predicates.md @@ -1,5 +1,5 @@ ;; Predicate definitions for POWER and PowerPC. -;; Copyright (C) 2005 Free Software Foundation, Inc. +;; Copyright (C) 2005, 2006 Free Software Foundation, Inc. ;; ;; This file is part of GCC. ;; @@ -195,6 +195,9 @@ && mode != DImode) return 1; + if (DECIMAL_FLOAT_MODE_P (mode)) + return 0; + /* If we are using V.4 style PIC, consider all constants to be hard. */ if (flag_pic && DEFAULT_ABI == ABI_V4) return 0; @@ -353,25 +356,6 @@ || reload_in_progress, mode, XEXP (op, 0))"))) -;; Return 1 if the operand is an indexed or indirect memory operand. -(define_predicate "indexed_or_indirect_operand" - (match_operand 0 "memory_operand") -{ - rtx tmp = XEXP (op, 0); - - if (TARGET_ALTIVEC - && ALTIVEC_VECTOR_MODE (mode) - && GET_CODE (tmp) == AND - && GET_CODE (XEXP (tmp, 1)) == CONST_INT - && INTVAL (XEXP (tmp, 1)) == -16) - tmp = XEXP (tmp, 0); - - return REG_P (tmp) - || (GET_CODE (tmp) == PLUS - && REG_P (XEXP (tmp, 0)) - && REG_P (XEXP (tmp, 1))); -}) - ;; Return 1 if the operand is a memory operand with an address divisible by 4 (define_predicate "word_offset_memref_operand" (and (match_operand 0 "memory_operand") @@ -380,13 +364,28 @@ || GET_CODE (XEXP (XEXP (op, 0), 1)) != CONST_INT || INTVAL (XEXP (XEXP (op, 0), 1)) % 4 == 0"))) +;; Return 1 if the operand is an indexed or indirect memory operand. +(define_predicate "indexed_or_indirect_operand" + (match_code "mem") +{ + op = XEXP (op, 0); + if (TARGET_ALTIVEC + && ALTIVEC_VECTOR_MODE (mode) + && GET_CODE (op) == AND + && GET_CODE (XEXP (op, 1)) == CONST_INT + && INTVAL (XEXP (op, 1)) == -16) + op = XEXP (op, 0); + + return indexed_or_indirect_address (op, mode); +}) + ;; Return 1 if the operand is an indexed or indirect address. -(define_predicate "indexed_or_indirect_address" - (and (match_operand 0 "address_operand") - (match_test "REG_P (op) +(define_special_predicate "indexed_or_indirect_address" + (and (match_test "REG_P (op) || (GET_CODE (op) == PLUS - && REG_P (XEXP (op, 0)) - && REG_P (XEXP (op, 1)))"))) + /* Omit testing REG_P (XEXP (op, 0)). */ + && REG_P (XEXP (op, 1)))") + (match_operand 0 "address_operand"))) ;; Used for the destination of the fix_truncdfsi2 expander. ;; If stfiwx will be used, the result goes to memory; otherwise, @@ -411,16 +410,13 @@ (match_test "!CONST_OK_FOR_LETTER_P (INTVAL (op), 'I') && !CONST_OK_FOR_LETTER_P (INTVAL (op), 'L')"))) -;; Return 1 if the operand is a non-special register or a constant that -;; can be used as the operand of an OR or XOR. -(define_predicate "logical_operand" - (match_code "reg,subreg,const_int,const_double") +;; Return 1 if the operand is a constant that can be used as the operand +;; of an OR or XOR. +(define_predicate "logical_const_operand" + (match_code "const_int,const_double") { HOST_WIDE_INT opl, oph; - if (gpc_reg_operand (op, mode)) - return 1; - if (GET_CODE (op) == CONST_INT) { opl = INTVAL (op) & GET_MODE_MASK (mode); @@ -445,6 +441,12 @@ || (opl & ~ (unsigned HOST_WIDE_INT) 0xffff0000) == 0); }) +;; Return 1 if the operand is a non-special register or a constant that +;; can be used as the operand of an OR or XOR. +(define_predicate "logical_operand" + (ior (match_operand 0 "gpc_reg_operand") + (match_operand 0 "logical_const_operand"))) + ;; Return 1 if op is a constant that is not a logical operand, but could ;; be split into one. (define_predicate "non_logical_cint_operand" diff --git a/gcc/config/rs6000/rs6000-c.c b/gcc/config/rs6000/rs6000-c.c index ecd403da758..67416c20e62 100644 --- a/gcc/config/rs6000/rs6000-c.c +++ b/gcc/config/rs6000/rs6000-c.c @@ -62,17 +62,17 @@ rs6000_pragma_longcall (cpp_reader *pfile ATTRIBUTE_UNUSED) /* If we get here, generic code has already scanned the directive leader and the word "longcall". */ - if (c_lex (&x) != CPP_OPEN_PAREN) + if (pragma_lex (&x) != CPP_OPEN_PAREN) SYNTAX_ERROR ("missing open paren"); - if (c_lex (&n) != CPP_NUMBER) + if (pragma_lex (&n) != CPP_NUMBER) SYNTAX_ERROR ("missing number"); - if (c_lex (&x) != CPP_CLOSE_PAREN) + if (pragma_lex (&x) != CPP_CLOSE_PAREN) SYNTAX_ERROR ("missing close paren"); if (n != integer_zero_node && n != integer_one_node) SYNTAX_ERROR ("number must be 0 or 1"); - if (c_lex (&x) != CPP_EOF) + if (pragma_lex (&x) != CPP_EOF) warning (OPT_Wpragmas, "junk at end of #pragma longcall"); rs6000_default_long_calls = (n == integer_one_node); diff --git a/gcc/config/rs6000/rs6000-protos.h b/gcc/config/rs6000/rs6000-protos.h index fe04d81f43e..c1f6a045b48 100644 --- a/gcc/config/rs6000/rs6000-protos.h +++ b/gcc/config/rs6000/rs6000-protos.h @@ -86,6 +86,8 @@ extern void rs6000_emit_sync (enum rtx_code, enum machine_mode, rtx, rtx, rtx, rtx, bool); extern void rs6000_split_atomic_op (enum rtx_code, rtx, rtx, rtx, rtx, rtx); extern void rs6000_split_compare_and_swap (rtx, rtx, rtx, rtx, rtx); +extern void rs6000_expand_compare_and_swapqhi (rtx, rtx, rtx, rtx); +extern void rs6000_split_compare_and_swapqhi (rtx, rtx, rtx, rtx, rtx, rtx); extern void rs6000_split_lock_test_and_set (rtx, rtx, rtx, rtx); extern void rs6000_emit_swdivsf (rtx, rtx, rtx); extern void rs6000_emit_swdivdf (rtx, rtx, rtx); @@ -105,14 +107,13 @@ extern rtx rs6000_return_addr (int, rtx); extern void rs6000_output_symbol_ref (FILE*, rtx); extern HOST_WIDE_INT rs6000_initial_elimination_offset (int, int); -extern rtx rs6000_machopic_legitimize_pic_address (rtx orig, - enum machine_mode mode, - rtx reg); - +extern rtx rs6000_machopic_legitimize_pic_address (rtx, enum machine_mode, + rtx); #endif /* RTX_CODE */ #ifdef TREE_CODE -extern unsigned int rs6000_special_round_type_align (tree, int, int); +extern unsigned int rs6000_special_round_type_align (tree, unsigned int, + unsigned int); extern void function_arg_advance (CUMULATIVE_ARGS *, enum machine_mode, tree, int, int); extern int function_arg_boundary (enum machine_mode, tree); @@ -123,6 +124,7 @@ extern rtx rs6000_libcall_value (enum machine_mode); extern rtx rs6000_va_arg (tree, tree); extern int function_ok_for_sibcall (tree); extern void rs6000_elf_declare_function_name (FILE *, const char *, tree); +extern bool rs6000_elf_in_small_data_p (tree); #ifdef ARGS_SIZE_RTX /* expr.h defines ARGS_SIZE_RTX and `enum direction' */ extern enum direction function_arg_padding (enum machine_mode, tree); @@ -140,13 +142,6 @@ extern void rs6000_gen_section_name (char **, const char *, const char *); extern void output_function_profiler (FILE *, int); extern void output_profile_hook (int); extern int rs6000_trampoline_size (void); -extern void toc_section (void); -extern void sdata_section (void); -extern void sdata2_section (void); -extern void sbss_section (void); -extern void private_data_section (void); -extern void read_only_data_section (void); -extern void read_only_private_data_section (void); extern int get_TOC_alias_set (void); extern void rs6000_emit_prologue (void); extern void rs6000_emit_load_toc_table (int); diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 072df4fdff1..e7e50fdb897 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -1,6 +1,7 @@ /* Subroutines used for code generation on IBM RS/6000. Copyright (C) 1991, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. + 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, + Inc. Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu) This file is part of GCC. @@ -77,7 +78,6 @@ typedef struct rs6000_stack { int lr_save_p; /* true if the link reg needs to be saved */ int cr_save_p; /* true if the CR reg needs to be saved */ unsigned int vrsave_mask; /* mask of vec registers to save */ - int toc_save_p; /* true if the TOC needs to be saved */ int push_p; /* true if we need to allocate stack space */ int calls_p; /* true if the function makes any calls */ int world_save_p; /* true if we're saving *everything*: @@ -90,7 +90,6 @@ typedef struct rs6000_stack { int cr_save_offset; /* offset to save CR from initial SP */ int vrsave_save_offset; /* offset to save VRSAVE from initial SP */ int spe_gp_save_offset; /* offset to save spe 64-bit gprs */ - int toc_save_offset; /* offset to save the TOC pointer */ int varargs_save_offset; /* offset to save the varargs registers */ int ehrd_offset; /* offset to EH return data */ int reg_size; /* register size (4 or 8) */ @@ -102,13 +101,11 @@ typedef struct rs6000_stack { int fp_size; /* size of saved FP registers */ int altivec_size; /* size of saved AltiVec registers */ int cr_size; /* size to hold CR if not in save_size */ - int lr_size; /* size to hold LR if not in save_size */ int vrsave_size; /* size to hold VRSAVE if not in save_size */ int altivec_padding_size; /* size of altivec alignment padding if not in save_size */ int spe_gp_size; /* size of 64-bit GPR save size for SPE */ int spe_padding_size; - int toc_size; /* size to hold TOC if not in save_size */ HOST_WIDE_INT total_size; /* total bytes allocated for stack */ int spe_64bit_regs_used; } rs6000_stack_t; @@ -234,8 +231,11 @@ static enum { int toc_initialized; char toc_label_name[10]; -/* Alias set for saves and restores from the rs6000 stack. */ -static GTY(()) int rs6000_sr_alias_set; +static GTY(()) section *read_only_data_section; +static GTY(()) section *private_data_section; +static GTY(()) section *read_only_private_data_section; +static GTY(()) section *sdata2_section; +static GTY(()) section *toc_section; /* Control alignment for fields within structures. */ /* String from -malign-XXXXX. */ @@ -612,21 +612,23 @@ static unsigned int rs6000_elf_section_type_flags (tree, const char *, int); static void rs6000_elf_asm_out_constructor (rtx, int); static void rs6000_elf_asm_out_destructor (rtx, int); static void rs6000_elf_end_indicate_exec_stack (void) ATTRIBUTE_UNUSED; -static void rs6000_elf_select_section (tree, int, unsigned HOST_WIDE_INT); +static void rs6000_elf_asm_init_sections (void); +static section *rs6000_elf_select_section (tree, int, unsigned HOST_WIDE_INT); static void rs6000_elf_unique_section (tree, int); -static void rs6000_elf_select_rtx_section (enum machine_mode, rtx, - unsigned HOST_WIDE_INT); +static section *rs6000_elf_select_rtx_section (enum machine_mode, rtx, + unsigned HOST_WIDE_INT); static void rs6000_elf_encode_section_info (tree, rtx, int) ATTRIBUTE_UNUSED; -static bool rs6000_elf_in_small_data_p (tree); #endif #if TARGET_XCOFF static void rs6000_xcoff_asm_globalize_label (FILE *, const char *); +static void rs6000_xcoff_asm_init_sections (void); static void rs6000_xcoff_asm_named_section (const char *, unsigned int, tree); -static void rs6000_xcoff_select_section (tree, int, unsigned HOST_WIDE_INT); -static void rs6000_xcoff_unique_section (tree, int); -static void rs6000_xcoff_select_rtx_section (enum machine_mode, rtx, +static section *rs6000_xcoff_select_section (tree, int, unsigned HOST_WIDE_INT); +static void rs6000_xcoff_unique_section (tree, int); +static section *rs6000_xcoff_select_rtx_section + (enum machine_mode, rtx, unsigned HOST_WIDE_INT); static const char * rs6000_xcoff_strip_name_encoding (const char *); static unsigned int rs6000_xcoff_section_type_flags (tree, const char *, int); static void rs6000_xcoff_file_start (void); @@ -741,6 +743,7 @@ static void rs6000_darwin_file_start (void); static tree rs6000_build_builtin_va_list (void); static tree rs6000_gimplify_va_arg (tree, tree, tree *, tree *); static bool rs6000_must_pass_in_stack (enum machine_mode, tree); +static bool rs6000_scalar_mode_supported_p (enum machine_mode); static bool rs6000_vector_mode_supported_p (enum machine_mode); static int get_vec_cmp_insn (enum rtx_code, enum machine_mode, enum machine_mode); @@ -980,6 +983,9 @@ static const char alt_reg_names[][8] = #undef TARGET_EH_RETURN_FILTER_MODE #define TARGET_EH_RETURN_FILTER_MODE rs6000_eh_return_filter_mode +#undef TARGET_SCALAR_MODE_SUPPORTED_P +#define TARGET_SCALAR_MODE_SUPPORTED_P rs6000_scalar_mode_supported_p + #undef TARGET_VECTOR_MODE_SUPPORTED_P #define TARGET_VECTOR_MODE_SUPPORTED_P rs6000_vector_mode_supported_p @@ -1406,9 +1412,6 @@ rs6000_override_options (const char *default_cpu) && (DEFAULT_ABI == ABI_AIX || DEFAULT_ABI == ABI_DARWIN)) REAL_MODE_FORMAT (TFmode) = &ibm_extended_format; - /* Allocate an alias set for register saves & restores from stack. */ - rs6000_sr_alias_set = new_alias_set (); - if (TARGET_TOC) ASM_GENERATE_INTERNAL_LABEL (toc_label_name, "LCTOC", 1); @@ -1914,8 +1917,8 @@ rs6000_file_start (void) if (DEFAULT_ABI == ABI_AIX || (TARGET_ELF && flag_pic == 2)) { - toc_section (); - text_section (); + switch_to_section (toc_section); + switch_to_section (text_section); } } @@ -2507,18 +2510,27 @@ invalid_e500_subreg (rtx op, enum machine_mode mode) field is an FP double while the FP fields remain word aligned. */ unsigned int -rs6000_special_round_type_align (tree type, int computed, int specified) +rs6000_special_round_type_align (tree type, unsigned int computed, + unsigned int specified) { + unsigned int align = MAX (computed, specified); tree field = TYPE_FIELDS (type); /* Skip all non field decls */ while (field != NULL && TREE_CODE (field) != FIELD_DECL) field = TREE_CHAIN (field); - if (field == NULL || field == type || DECL_MODE (field) != DFmode) - return MAX (computed, specified); + if (field != NULL && field != type) + { + type = TREE_TYPE (field); + while (TREE_CODE (type) == ARRAY_TYPE) + type = TREE_TYPE (type); - return MAX (MAX (computed, specified), 64); + if (type != error_mark_node && TYPE_MODE (type) == DFmode) + align = MAX (align, 64); + } + + return align; } /* Return 1 for an operand in small memory on V.4/eabi. */ @@ -2737,13 +2749,19 @@ legitimate_indexed_address_p (rtx x, int strict) op0 = XEXP (x, 0); op1 = XEXP (x, 1); - if (!REG_P (op0) || !REG_P (op1)) - return false; + /* Recognize the rtl generated by reload which we know will later be + replaced with proper base and index regs. */ + if (!strict + && reload_in_progress + && (REG_P (op0) || GET_CODE (op0) == PLUS) + && REG_P (op1)) + return true; - return ((INT_REG_OK_FOR_BASE_P (op0, strict) - && INT_REG_OK_FOR_INDEX_P (op1, strict)) - || (INT_REG_OK_FOR_BASE_P (op1, strict) - && INT_REG_OK_FOR_INDEX_P (op0, strict))); + return (REG_P (op0) && REG_P (op1) + && ((INT_REG_OK_FOR_BASE_P (op0, strict) + && INT_REG_OK_FOR_INDEX_P (op1, strict)) + || (INT_REG_OK_FOR_BASE_P (op1, strict) + && INT_REG_OK_FOR_INDEX_P (op0, strict)))); } inline bool @@ -4127,6 +4145,7 @@ rs6000_emit_move (rtx dest, rtx source, enum machine_mode mode) /* Nonzero if we can use a floating-point register to pass this arg. */ #define USE_FP_FOR_ARG_P(CUM,MODE,TYPE) \ (SCALAR_FLOAT_MODE_P (MODE) \ + && !DECIMAL_FLOAT_MODE_P (MODE) \ && (CUM)->fregno <= FP_ARG_MAX_REG \ && TARGET_HARD_FLOAT && TARGET_FPRS) @@ -4651,6 +4670,7 @@ function_arg_advance (CUMULATIVE_ARGS *cum, enum machine_mode mode, cum->words = align_words + n_words; if (SCALAR_FLOAT_MODE_P (mode) + && !DECIMAL_FLOAT_MODE_P (mode) && TARGET_HARD_FLOAT && TARGET_FPRS) cum->fregno += (GET_MODE_SIZE (mode) + 7) >> 3; @@ -5655,10 +5675,10 @@ rs6000_va_start (tree valist, rtx nextarg) f_sav = TREE_CHAIN (f_ovf); valist = build_va_arg_indirect_ref (valist); - gpr = build (COMPONENT_REF, TREE_TYPE (f_gpr), valist, f_gpr, NULL_TREE); - fpr = build (COMPONENT_REF, TREE_TYPE (f_fpr), valist, f_fpr, NULL_TREE); - ovf = build (COMPONENT_REF, TREE_TYPE (f_ovf), valist, f_ovf, NULL_TREE); - sav = build (COMPONENT_REF, TREE_TYPE (f_sav), valist, f_sav, NULL_TREE); + gpr = build3 (COMPONENT_REF, TREE_TYPE (f_gpr), valist, f_gpr, NULL_TREE); + fpr = build3 (COMPONENT_REF, TREE_TYPE (f_fpr), valist, f_fpr, NULL_TREE); + ovf = build3 (COMPONENT_REF, TREE_TYPE (f_ovf), valist, f_ovf, NULL_TREE); + sav = build3 (COMPONENT_REF, TREE_TYPE (f_sav), valist, f_sav, NULL_TREE); /* Count number of gp and fp argument registers used. */ words = current_function_args_info.words; @@ -5674,16 +5694,16 @@ rs6000_va_start (tree valist, rtx nextarg) if (cfun->va_list_gpr_size) { - t = build (MODIFY_EXPR, TREE_TYPE (gpr), gpr, - build_int_cst (NULL_TREE, n_gpr)); + t = build2 (MODIFY_EXPR, TREE_TYPE (gpr), gpr, + build_int_cst (NULL_TREE, n_gpr)); TREE_SIDE_EFFECTS (t) = 1; expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL); } if (cfun->va_list_fpr_size) { - t = build (MODIFY_EXPR, TREE_TYPE (fpr), fpr, - build_int_cst (NULL_TREE, n_fpr)); + t = build2 (MODIFY_EXPR, TREE_TYPE (fpr), fpr, + build_int_cst (NULL_TREE, n_fpr)); TREE_SIDE_EFFECTS (t) = 1; expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL); } @@ -5691,9 +5711,9 @@ rs6000_va_start (tree valist, rtx nextarg) /* Find the overflow area. */ t = make_tree (TREE_TYPE (ovf), virtual_incoming_args_rtx); if (words != 0) - t = build (PLUS_EXPR, TREE_TYPE (ovf), t, - build_int_cst (NULL_TREE, words * UNITS_PER_WORD)); - t = build (MODIFY_EXPR, TREE_TYPE (ovf), ovf, t); + t = build2 (PLUS_EXPR, TREE_TYPE (ovf), t, + build_int_cst (NULL_TREE, words * UNITS_PER_WORD)); + t = build2 (MODIFY_EXPR, TREE_TYPE (ovf), ovf, t); TREE_SIDE_EFFECTS (t) = 1; expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL); @@ -5708,9 +5728,9 @@ rs6000_va_start (tree valist, rtx nextarg) /* Find the register save area. */ t = make_tree (TREE_TYPE (sav), virtual_stack_vars_rtx); if (cfun->machine->varargs_save_offset) - t = build (PLUS_EXPR, TREE_TYPE (sav), t, - build_int_cst (NULL_TREE, cfun->machine->varargs_save_offset)); - t = build (MODIFY_EXPR, TREE_TYPE (sav), sav, t); + t = build2 (PLUS_EXPR, TREE_TYPE (sav), t, + build_int_cst (NULL_TREE, cfun->machine->varargs_save_offset)); + t = build2 (MODIFY_EXPR, TREE_TYPE (sav), sav, t); TREE_SIDE_EFFECTS (t) = 1; expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL); } @@ -5756,7 +5776,7 @@ rs6000_gimplify_va_arg (tree valist, tree type, tree *pre_p, tree *post_p) imag_part = rs6000_gimplify_va_arg (valist, elem_type, pre_p, post_p); - return build (COMPLEX_EXPR, type, real_part, imag_part); + return build2 (COMPLEX_EXPR, type, real_part, imag_part); } } @@ -5770,10 +5790,10 @@ rs6000_gimplify_va_arg (tree valist, tree type, tree *pre_p, tree *post_p) f_sav = TREE_CHAIN (f_ovf); valist = build_va_arg_indirect_ref (valist); - gpr = build (COMPONENT_REF, TREE_TYPE (f_gpr), valist, f_gpr, NULL_TREE); - fpr = build (COMPONENT_REF, TREE_TYPE (f_fpr), valist, f_fpr, NULL_TREE); - ovf = build (COMPONENT_REF, TREE_TYPE (f_ovf), valist, f_ovf, NULL_TREE); - sav = build (COMPONENT_REF, TREE_TYPE (f_sav), valist, f_sav, NULL_TREE); + gpr = build3 (COMPONENT_REF, TREE_TYPE (f_gpr), valist, f_gpr, NULL_TREE); + fpr = build3 (COMPONENT_REF, TREE_TYPE (f_fpr), valist, f_fpr, NULL_TREE); + ovf = build3 (COMPONENT_REF, TREE_TYPE (f_ovf), valist, f_ovf, NULL_TREE); + sav = build3 (COMPONENT_REF, TREE_TYPE (f_sav), valist, f_sav, NULL_TREE); size = int_size_in_bytes (type); rsize = (size + 3) / 4; @@ -5854,7 +5874,7 @@ rs6000_gimplify_va_arg (tree valist, tree type, tree *pre_p, tree *post_p) { /* Ensure that we don't find any more args in regs. Alignment has taken care of the n_reg == 2 case. */ - t = build (MODIFY_EXPR, TREE_TYPE (reg), reg, size_int (8)); + t = build2 (MODIFY_EXPR, TREE_TYPE (reg), reg, size_int (8)); gimplify_and_add (t, pre_p); } } @@ -9078,6 +9098,7 @@ rs6000_init_libfuncs (void) set_conv_libfunc (sfix_optab, SImode, TFmode, "_q_qtoi"); set_conv_libfunc (ufix_optab, SImode, TFmode, "_q_qtou"); set_conv_libfunc (sfloat_optab, TFmode, SImode, "_q_itoq"); + set_conv_libfunc (ufloat_optab, TFmode, SImode, "_q_utoq"); } } @@ -10667,7 +10688,8 @@ print_operand (FILE *file, rtx x, int code) else { gcc_assert (GET_CODE (tmp) == PLUS - && GET_CODE (XEXP (tmp, 1)) == REG); + && REG_P (XEXP (tmp, 0)) + && REG_P (XEXP (tmp, 1))); if (REGNO (XEXP (tmp, 0)) == 0) fprintf (file, "%s,%s", reg_names[ REGNO (XEXP (tmp, 1)) ], @@ -10727,6 +10749,7 @@ print_operand_address (FILE *file, rtx x) } else if (GET_CODE (x) == PLUS && GET_CODE (XEXP (x, 1)) == REG) { + gcc_assert (REG_P (XEXP (x, 0))); if (REGNO (XEXP (x, 0)) == 0) fprintf (file, "%s,%s", reg_names[ REGNO (XEXP (x, 1)) ], reg_names[ REGNO (XEXP (x, 0)) ]); @@ -10806,15 +10829,14 @@ rs6000_assemble_integer (rtx x, unsigned int size, int aligned_p) /* Special handling for SI values. */ if (RELOCATABLE_NEEDS_FIXUP && size == 4 && aligned_p) { - extern int in_toc_section (void); static int recurse = 0; /* For -mrelocatable, we mark all addresses that need to be fixed up in the .fixup section. */ if (TARGET_RELOCATABLE - && !in_toc_section () - && !in_text_section () - && !in_unlikely_text_section () + && in_section != toc_section + && in_section != text_section + && unlikely_text_section_p (in_section) && !recurse && GET_CODE (x) != CONST_INT && GET_CODE (x) != CONST_DOUBLE @@ -12260,6 +12282,96 @@ rs6000_split_lock_test_and_set (rtx retval, rtx mem, rtx val, rtx scratch) emit_insn (gen_isync ()); } +void +rs6000_expand_compare_and_swapqhi (rtx dst, rtx mem, rtx oldval, rtx newval) +{ + enum machine_mode mode = GET_MODE (mem); + rtx addrSI, align, wdst, shift, mask; + HOST_WIDE_INT shift_mask = mode == QImode ? 0x18 : 0x10; + HOST_WIDE_INT imask = GET_MODE_MASK (mode); + + /* Shift amount for subword relative to aligned word. */ + addrSI = force_reg (SImode, gen_lowpart_common (SImode, XEXP (mem, 0))); + shift = gen_reg_rtx (SImode); + emit_insn (gen_rlwinm (shift, addrSI, GEN_INT (3), + GEN_INT (shift_mask))); + emit_insn (gen_xorsi3 (shift, shift, GEN_INT (shift_mask))); + + /* Shift and mask old value into position within word. */ + oldval = convert_modes (SImode, mode, oldval, 1); + oldval = expand_binop (SImode, and_optab, + oldval, GEN_INT (imask), NULL_RTX, + 1, OPTAB_LIB_WIDEN); + emit_insn (gen_ashlsi3 (oldval, oldval, shift)); + + /* Shift and mask new value into position within word. */ + newval = convert_modes (SImode, mode, newval, 1); + newval = expand_binop (SImode, and_optab, + newval, GEN_INT (imask), NULL_RTX, + 1, OPTAB_LIB_WIDEN); + emit_insn (gen_ashlsi3 (newval, newval, shift)); + + /* Mask for insertion. */ + mask = gen_reg_rtx (SImode); + emit_move_insn (mask, GEN_INT (imask)); + emit_insn (gen_ashlsi3 (mask, mask, shift)); + + /* Address of aligned word containing subword. */ + align = expand_binop (Pmode, and_optab, XEXP (mem, 0), GEN_INT (-4), + NULL_RTX, 1, OPTAB_LIB_WIDEN); + mem = change_address (mem, SImode, align); + set_mem_align (mem, 32); + MEM_VOLATILE_P (mem) = 1; + + wdst = gen_reg_rtx (SImode); + emit_insn (gen_sync_compare_and_swapqhi_internal (wdst, mask, + oldval, newval, mem)); + + emit_move_insn (dst, gen_lowpart (mode, wdst)); +} + +void +rs6000_split_compare_and_swapqhi (rtx dest, rtx mask, + rtx oldval, rtx newval, rtx mem, + rtx scratch) +{ + rtx label1, label2, x, cond = gen_rtx_REG (CCmode, CR0_REGNO); + + emit_insn (gen_memory_barrier ()); + label1 = gen_rtx_LABEL_REF (VOIDmode, gen_label_rtx ()); + label2 = gen_rtx_LABEL_REF (VOIDmode, gen_label_rtx ()); + emit_label (XEXP (label1, 0)); + + emit_load_locked (SImode, scratch, mem); + + /* Mask subword within loaded value for comparison with oldval. + Use UNSPEC_AND to avoid clobber.*/ + emit_insn (gen_rtx_SET (SImode, dest, + gen_rtx_UNSPEC (SImode, + gen_rtvec (2, scratch, mask), + UNSPEC_AND))); + + x = gen_rtx_COMPARE (CCmode, dest, oldval); + emit_insn (gen_rtx_SET (VOIDmode, cond, x)); + + x = gen_rtx_NE (VOIDmode, cond, const0_rtx); + emit_unlikely_jump (x, label2); + + /* Clear subword within loaded value for insertion of new value. */ + emit_insn (gen_rtx_SET (SImode, scratch, + gen_rtx_AND (SImode, + gen_rtx_NOT (SImode, mask), scratch))); + emit_insn (gen_iorsi3 (scratch, scratch, newval)); + emit_store_conditional (SImode, cond, mem, scratch); + + x = gen_rtx_NE (VOIDmode, cond, const0_rtx); + emit_unlikely_jump (x, label1); + + emit_insn (gen_isync ()); + emit_label (XEXP (label2, 0)); +} + + /* Emit instructions to move SRC to DST. Called by splitters for multi-register moves. It will emit at most one instruction for each register that is accessed; that is, it won't emit li/lis pairs @@ -12668,15 +12780,14 @@ is_altivec_return_reg (rtx reg, void *xyes) static rs6000_stack_t * rs6000_stack_info (void) { - static rs6000_stack_t info, zero_info; + static rs6000_stack_t info; rs6000_stack_t *info_ptr = &info; int reg_size = TARGET_32BIT ? 4 : 8; int ehrd_size; int save_align; HOST_WIDE_INT non_fixed_size; - /* Zero all fields portably. */ - info = zero_info; + memset (&info, 0, sizeof (info)); if (TARGET_SPE) { @@ -12729,10 +12840,9 @@ rs6000_stack_info (void) || cfun->machine->ra_needs_full_frame); /* Determine if we need to save the link register. */ - if (rs6000_ra_ever_killed () - || (DEFAULT_ABI == ABI_AIX - && current_function_profile - && !TARGET_PROFILE_KERNEL) + if ((DEFAULT_ABI == ABI_AIX + && current_function_profile + && !TARGET_PROFILE_KERNEL) #ifdef TARGET_RELOCATABLE || (TARGET_RELOCATABLE && (get_pool_size () != 0)) #endif @@ -12740,7 +12850,8 @@ rs6000_stack_info (void) && !FP_SAVE_INLINE (info_ptr->first_fp_reg_save)) || info_ptr->first_altivec_reg_save <= LAST_ALTIVEC_REGNO || (DEFAULT_ABI == ABI_V4 && current_function_calls_alloca) - || info_ptr->calls_p) + || info_ptr->calls_p + || rs6000_ra_ever_killed ()) { info_ptr->lr_save_p = 1; regs_ever_live[LINK_REGISTER_REGNUM] = 1; @@ -12863,8 +12974,7 @@ rs6000_stack_info (void) - info_ptr->spe_gp_size; /* Adjust for SPE case. */ - info_ptr->toc_save_offset - = info_ptr->spe_gp_save_offset - info_ptr->toc_size; + info_ptr->ehrd_offset = info_ptr->spe_gp_save_offset; } else if (TARGET_ALTIVEC_ABI) { @@ -12884,12 +12994,11 @@ rs6000_stack_info (void) - info_ptr->altivec_size; /* Adjust for AltiVec case. */ - info_ptr->toc_save_offset - = info_ptr->altivec_save_offset - info_ptr->toc_size; + info_ptr->ehrd_offset = info_ptr->altivec_save_offset; } else - info_ptr->toc_save_offset = info_ptr->cr_save_offset - info_ptr->toc_size; - info_ptr->ehrd_offset = info_ptr->toc_save_offset - ehrd_size; + info_ptr->ehrd_offset = info_ptr->cr_save_offset; + info_ptr->ehrd_offset -= ehrd_size; info_ptr->lr_save_offset = reg_size; break; } @@ -12903,9 +13012,7 @@ rs6000_stack_info (void) + info_ptr->spe_padding_size + ehrd_size + info_ptr->cr_size - + info_ptr->lr_size - + info_ptr->vrsave_size - + info_ptr->toc_size, + + info_ptr->vrsave_size, save_align); non_fixed_size = (info_ptr->vars_size @@ -12966,9 +13073,6 @@ rs6000_stack_info (void) if (! info_ptr->cr_save_p) info_ptr->cr_save_offset = 0; - if (! info_ptr->toc_save_p) - info_ptr->toc_save_offset = 0; - return info_ptr; } @@ -13064,9 +13168,6 @@ debug_stack_info (rs6000_stack_t *info) if (info->cr_save_p) fprintf (stderr, "\tcr_save_p = %5d\n", info->cr_save_p); - if (info->toc_save_p) - fprintf (stderr, "\ttoc_save_p = %5d\n", info->toc_save_p); - if (info->vrsave_mask) fprintf (stderr, "\tvrsave_mask = 0x%x\n", info->vrsave_mask); @@ -13100,9 +13201,6 @@ debug_stack_info (rs6000_stack_t *info) if (info->cr_save_offset) fprintf (stderr, "\tcr_save_offset = %5d\n", info->cr_save_offset); - if (info->toc_save_offset) - fprintf (stderr, "\ttoc_save_offset = %5d\n", info->toc_save_offset); - if (info->varargs_save_offset) fprintf (stderr, "\tvarargs_save_offset = %5d\n", info->varargs_save_offset); @@ -13143,15 +13241,9 @@ debug_stack_info (rs6000_stack_t *info) fprintf (stderr, "\tspe_padding_size = %5d\n", info->spe_padding_size); - if (info->lr_size) - fprintf (stderr, "\tlr_size = %5d\n", info->lr_size); - if (info->cr_size) fprintf (stderr, "\tcr_size = %5d\n", info->cr_size); - if (info->toc_size) - fprintf (stderr, "\ttoc_size = %5d\n", info->toc_size); - if (info->save_size) fprintf (stderr, "\tsave_size = %5d\n", info->save_size); @@ -13274,10 +13366,12 @@ rs6000_ra_ever_killed (void) { if (INSN_P (insn)) { - if (FIND_REG_INC_NOTE (insn, reg)) - return 1; - else if (GET_CODE (insn) == CALL_INSN - && !SIBLING_CALL_P (insn)) + if (CALL_P (insn)) + { + if (!SIBLING_CALL_P (insn)) + return 1; + } + else if (find_regno_note (insn, REG_INC, LINK_REGISTER_REGNUM)) return 1; else if (set_of (reg, insn) != NULL_RTX && !prologue_epilogue_contains (insn)) @@ -13442,9 +13536,7 @@ rs6000_emit_eh_reg_restore (rtx source, rtx scratch) || current_function_calls_alloca || info->total_size > 32767) { - tmp = gen_rtx_MEM (Pmode, frame_rtx); - MEM_NOTRAP_P (tmp) = 1; - set_mem_alias_set (tmp, rs6000_sr_alias_set); + tmp = gen_frame_mem (Pmode, frame_rtx); emit_move_insn (operands[1], tmp); frame_rtx = operands[1]; } @@ -13452,9 +13544,7 @@ rs6000_emit_eh_reg_restore (rtx source, rtx scratch) sp_offset = info->total_size; tmp = plus_constant (frame_rtx, info->lr_save_offset + sp_offset); - tmp = gen_rtx_MEM (Pmode, tmp); - MEM_NOTRAP_P (tmp) = 1; - set_mem_alias_set (tmp, rs6000_sr_alias_set); + tmp = gen_frame_mem (Pmode, tmp); emit_move_insn (tmp, operands[0]); } else @@ -13506,6 +13596,8 @@ uses_TOC (void) rtx create_TOC_reference (rtx symbol) { + if (no_new_pseudos) + regs_ever_live[TOC_REGISTER] = 1; return gen_rtx_PLUS (Pmode, gen_rtx_REG (Pmode, TOC_REGISTER), gen_rtx_CONST (Pmode, @@ -13549,15 +13641,15 @@ rs6000_aix_emit_builtin_unwind_init (void) emit_label (no_toc_save_needed); } -/* This ties together stack memory (MEM with an alias set of - rs6000_sr_alias_set) and the change to the stack pointer. */ +/* This ties together stack memory (MEM with an alias set of frame_alias_set) + and the change to the stack pointer. */ static void rs6000_emit_stack_tie (void) { - rtx mem = gen_rtx_MEM (BLKmode, gen_rtx_REG (Pmode, STACK_POINTER_REGNUM)); + rtx mem = gen_frame_mem (BLKmode, + gen_rtx_REG (Pmode, STACK_POINTER_REGNUM)); - set_mem_alias_set (mem, rs6000_sr_alias_set); emit_insn (gen_stack_tie (mem)); } @@ -13897,8 +13989,7 @@ emit_frame_save (rtx frame_reg, rtx frame_ptr, enum machine_mode mode, reg = gen_rtx_REG (mode, regno); addr = gen_rtx_PLUS (Pmode, frame_reg, offset_rtx); - mem = gen_rtx_MEM (mode, addr); - set_mem_alias_set (mem, rs6000_sr_alias_set); + mem = gen_frame_mem (mode, addr); insn = emit_move_insn (mem, reg); @@ -13924,7 +14015,7 @@ gen_frame_mem_offset (enum machine_mode mode, rtx reg, int offset) else offset_rtx = int_rtx; - return gen_rtx_MEM (mode, gen_rtx_PLUS (Pmode, reg, offset_rtx)); + return gen_frame_mem (mode, gen_rtx_PLUS (Pmode, reg, offset_rtx)); } /* Look for user-defined global regs. We should not save and restore these, @@ -14067,8 +14158,7 @@ rs6000_emit_prologue (void) rtx addr = gen_rtx_PLUS (Pmode, frame_reg_rtx, GEN_INT (info->fp_save_offset + sp_offset + 8 * i)); - rtx mem = gen_rtx_MEM (DFmode, addr); - set_mem_alias_set (mem, rs6000_sr_alias_set); + rtx mem = gen_frame_mem (DFmode, addr); RTVEC_ELT (p, j++) = gen_rtx_SET (VOIDmode, mem, reg); } @@ -14078,8 +14168,7 @@ rs6000_emit_prologue (void) rtx addr = gen_rtx_PLUS (Pmode, frame_reg_rtx, GEN_INT (info->altivec_save_offset + sp_offset + 16 * i)); - rtx mem = gen_rtx_MEM (V4SImode, addr); - set_mem_alias_set (mem, rs6000_sr_alias_set); + rtx mem = gen_frame_mem (V4SImode, addr); RTVEC_ELT (p, j++) = gen_rtx_SET (VOIDmode, mem, reg); } @@ -14089,8 +14178,7 @@ rs6000_emit_prologue (void) rtx addr = gen_rtx_PLUS (Pmode, frame_reg_rtx, GEN_INT (info->gp_save_offset + sp_offset + reg_size * i)); - rtx mem = gen_rtx_MEM (reg_mode, addr); - set_mem_alias_set (mem, rs6000_sr_alias_set); + rtx mem = gen_frame_mem (reg_mode, addr); RTVEC_ELT (p, j++) = gen_rtx_SET (VOIDmode, mem, reg); } @@ -14101,8 +14189,7 @@ rs6000_emit_prologue (void) rtx addr = gen_rtx_PLUS (Pmode, frame_reg_rtx, GEN_INT (info->cr_save_offset + sp_offset)); - rtx mem = gen_rtx_MEM (reg_mode, addr); - set_mem_alias_set (mem, rs6000_sr_alias_set); + rtx mem = gen_frame_mem (reg_mode, addr); RTVEC_ELT (p, j++) = gen_rtx_SET (VOIDmode, mem, reg); } @@ -14153,10 +14240,8 @@ rs6000_emit_prologue (void) emit_move_insn (areg, GEN_INT (offset)); /* AltiVec addressing mode is [reg+reg]. */ - mem = gen_rtx_MEM (V4SImode, - gen_rtx_PLUS (Pmode, frame_reg_rtx, areg)); - - set_mem_alias_set (mem, rs6000_sr_alias_set); + mem = gen_frame_mem (V4SImode, + gen_rtx_PLUS (Pmode, frame_reg_rtx, areg)); insn = emit_move_insn (mem, savereg); @@ -14192,10 +14277,9 @@ rs6000_emit_prologue (void) { /* Save VRSAVE. */ offset = info->vrsave_save_offset + sp_offset; - mem - = gen_rtx_MEM (SImode, - gen_rtx_PLUS (Pmode, frame_reg_rtx, GEN_INT (offset))); - set_mem_alias_set (mem, rs6000_sr_alias_set); + mem = gen_frame_mem (SImode, + gen_rtx_PLUS (Pmode, frame_reg_rtx, + GEN_INT (offset))); insn = emit_move_insn (mem, reg); } @@ -14271,8 +14355,7 @@ rs6000_emit_prologue (void) addr = gen_rtx_PLUS (Pmode, frame_reg_rtx, GEN_INT (info->fp_save_offset + sp_offset + 8*i)); - mem = gen_rtx_MEM (DFmode, addr); - set_mem_alias_set (mem, rs6000_sr_alias_set); + mem = gen_frame_mem (DFmode, addr); RTVEC_ELT (p, i + 2) = gen_rtx_SET (VOIDmode, mem, reg); } @@ -14296,8 +14379,7 @@ rs6000_emit_prologue (void) GEN_INT (info->gp_save_offset + sp_offset + reg_size * i)); - mem = gen_rtx_MEM (reg_mode, addr); - set_mem_alias_set (mem, rs6000_sr_alias_set); + mem = gen_frame_mem (reg_mode, addr); RTVEC_ELT (p, i) = gen_rtx_SET (VOIDmode, mem, reg); } @@ -14335,8 +14417,7 @@ rs6000_emit_prologue (void) b = GEN_INT (offset); addr = gen_rtx_PLUS (Pmode, frame_reg_rtx, b); - mem = gen_rtx_MEM (V2SImode, addr); - set_mem_alias_set (mem, rs6000_sr_alias_set); + mem = gen_frame_mem (V2SImode, addr); insn = emit_move_insn (mem, reg); if (GET_CODE (b) == CONST_INT) @@ -14352,8 +14433,7 @@ rs6000_emit_prologue (void) GEN_INT (info->gp_save_offset + sp_offset + reg_size * i)); - mem = gen_rtx_MEM (reg_mode, addr); - set_mem_alias_set (mem, rs6000_sr_alias_set); + mem = gen_frame_mem (reg_mode, addr); insn = emit_move_insn (mem, reg); rs6000_frame_related (insn, frame_ptr_rtx, info->total_size, @@ -14376,8 +14456,7 @@ rs6000_emit_prologue (void) reg = gen_rtx_REG (reg_mode, 2); addr = gen_rtx_PLUS (Pmode, frame_reg_rtx, GEN_INT (sp_offset + 5 * reg_size)); - mem = gen_rtx_MEM (reg_mode, addr); - set_mem_alias_set (mem, rs6000_sr_alias_set); + mem = gen_frame_mem (reg_mode, addr); insn = emit_move_insn (mem, reg); rs6000_frame_related (insn, frame_ptr_rtx, info->total_size, @@ -14405,7 +14484,7 @@ rs6000_emit_prologue (void) GEN_INT (info->lr_save_offset + sp_offset)); rtx reg = gen_rtx_REG (Pmode, 0); rtx mem = gen_rtx_MEM (Pmode, addr); - /* This should not be of rs6000_sr_alias_set, because of + /* This should not be of frame_alias_set, because of __builtin_return_address. */ insn = emit_move_insn (mem, reg); @@ -14418,12 +14497,10 @@ rs6000_emit_prologue (void) { rtx addr = gen_rtx_PLUS (Pmode, frame_reg_rtx, GEN_INT (info->cr_save_offset + sp_offset)); - rtx mem = gen_rtx_MEM (SImode, addr); + rtx mem = gen_frame_mem (SImode, addr); /* See the large comment above about why CR2_REGNO is used. */ rtx magic_eh_cr_reg = gen_rtx_REG (SImode, CR2_REGNO); - set_mem_alias_set (mem, rs6000_sr_alias_set); - /* If r12 was used to hold the original sp, copy cr into r0 now that it's free. */ if (REGNO (frame_reg_rtx) == 12) @@ -14666,8 +14743,7 @@ rs6000_emit_epilogue (int sibcall) rtx reg = gen_rtx_REG (reg_mode, CR2_REGNO); rtx addr = gen_rtx_PLUS (Pmode, frame_reg_rtx, GEN_INT (info->cr_save_offset)); - rtx mem = gen_rtx_MEM (reg_mode, addr); - set_mem_alias_set (mem, rs6000_sr_alias_set); + rtx mem = gen_frame_mem (reg_mode, addr); RTVEC_ELT (p, j++) = gen_rtx_SET (VOIDmode, reg, mem); } @@ -14678,8 +14754,7 @@ rs6000_emit_epilogue (int sibcall) rtx addr = gen_rtx_PLUS (Pmode, frame_reg_rtx, GEN_INT (info->gp_save_offset + reg_size * i)); - rtx mem = gen_rtx_MEM (reg_mode, addr); - set_mem_alias_set (mem, rs6000_sr_alias_set); + rtx mem = gen_frame_mem (reg_mode, addr); RTVEC_ELT (p, j++) = gen_rtx_SET (VOIDmode, reg, mem); } @@ -14689,8 +14764,7 @@ rs6000_emit_epilogue (int sibcall) rtx addr = gen_rtx_PLUS (Pmode, frame_reg_rtx, GEN_INT (info->altivec_save_offset + 16 * i)); - rtx mem = gen_rtx_MEM (V4SImode, addr); - set_mem_alias_set (mem, rs6000_sr_alias_set); + rtx mem = gen_frame_mem (V4SImode, addr); RTVEC_ELT (p, j++) = gen_rtx_SET (VOIDmode, reg, mem); } @@ -14700,8 +14774,7 @@ rs6000_emit_epilogue (int sibcall) rtx addr = gen_rtx_PLUS (Pmode, frame_reg_rtx, GEN_INT (info->fp_save_offset + 8 * i)); - rtx mem = gen_rtx_MEM (DFmode, addr); - set_mem_alias_set (mem, rs6000_sr_alias_set); + rtx mem = gen_frame_mem (DFmode, addr); RTVEC_ELT (p, j++) = gen_rtx_SET (VOIDmode, reg, mem); } @@ -14732,7 +14805,6 @@ rs6000_emit_epilogue (int sibcall) emit_move_insn (frame_reg_rtx, gen_rtx_MEM (Pmode, sp_reg_rtx)); - } else if (info->push_p) { @@ -14767,8 +14839,7 @@ rs6000_emit_epilogue (int sibcall) /* AltiVec addressing mode is [reg+reg]. */ addr = gen_rtx_PLUS (Pmode, frame_reg_rtx, areg); - mem = gen_rtx_MEM (V4SImode, addr); - set_mem_alias_set (mem, rs6000_sr_alias_set); + mem = gen_frame_mem (V4SImode, addr); emit_move_insn (gen_rtx_REG (V4SImode, i), mem); } @@ -14782,8 +14853,7 @@ rs6000_emit_epilogue (int sibcall) addr = gen_rtx_PLUS (Pmode, frame_reg_rtx, GEN_INT (info->vrsave_save_offset + sp_offset)); - mem = gen_rtx_MEM (SImode, addr); - set_mem_alias_set (mem, rs6000_sr_alias_set); + mem = gen_frame_mem (SImode, addr); reg = gen_rtx_REG (SImode, 12); emit_move_insn (reg, mem); @@ -14796,8 +14866,6 @@ rs6000_emit_epilogue (int sibcall) rtx mem = gen_frame_mem_offset (Pmode, frame_reg_rtx, info->lr_save_offset + sp_offset); - set_mem_alias_set (mem, rs6000_sr_alias_set); - emit_move_insn (gen_rtx_REG (Pmode, 0), mem); } @@ -14806,9 +14874,7 @@ rs6000_emit_epilogue (int sibcall) { rtx addr = gen_rtx_PLUS (Pmode, frame_reg_rtx, GEN_INT (info->cr_save_offset + sp_offset)); - rtx mem = gen_rtx_MEM (SImode, addr); - - set_mem_alias_set (mem, rs6000_sr_alias_set); + rtx mem = gen_frame_mem (SImode, addr); emit_move_insn (gen_rtx_REG (SImode, 12), mem); } @@ -14827,9 +14893,7 @@ rs6000_emit_epilogue (int sibcall) { rtx addr = gen_rtx_PLUS (Pmode, frame_reg_rtx, GEN_INT (sp_offset + 5 * reg_size)); - rtx mem = gen_rtx_MEM (reg_mode, addr); - - set_mem_alias_set (mem, rs6000_sr_alias_set); + rtx mem = gen_frame_mem (reg_mode, addr); emit_move_insn (gen_rtx_REG (reg_mode, 2), mem); } @@ -14845,7 +14909,6 @@ rs6000_emit_epilogue (int sibcall) mem = gen_frame_mem_offset (reg_mode, frame_reg_rtx, info->ehrd_offset + sp_offset + reg_size * (int) i); - set_mem_alias_set (mem, rs6000_sr_alias_set); emit_move_insn (gen_rtx_REG (reg_mode, regno), mem); } @@ -14863,9 +14926,7 @@ rs6000_emit_epilogue (int sibcall) GEN_INT (info->gp_save_offset + sp_offset + reg_size * i)); - rtx mem = gen_rtx_MEM (reg_mode, addr); - - set_mem_alias_set (mem, rs6000_sr_alias_set); + rtx mem = gen_frame_mem (reg_mode, addr); RTVEC_ELT (p, i) = gen_rtx_SET (VOIDmode, @@ -14888,7 +14949,7 @@ rs6000_emit_epilogue (int sibcall) GEN_INT (info->gp_save_offset + sp_offset + reg_size * i)); - rtx mem = gen_rtx_MEM (reg_mode, addr); + rtx mem = gen_frame_mem (reg_mode, addr); /* Restore 64-bit quantities for SPE. */ if (TARGET_SPE_ABI && info->spe_64bit_regs_used != 0) @@ -14905,11 +14966,9 @@ rs6000_emit_epilogue (int sibcall) b = GEN_INT (offset); addr = gen_rtx_PLUS (Pmode, frame_reg_rtx, b); - mem = gen_rtx_MEM (V2SImode, addr); + mem = gen_frame_mem (V2SImode, addr); } - set_mem_alias_set (mem, rs6000_sr_alias_set); - emit_move_insn (gen_rtx_REG (reg_mode, info->first_gp_reg_save + i), mem); } @@ -14925,8 +14984,7 @@ rs6000_emit_epilogue (int sibcall) GEN_INT (info->fp_save_offset + sp_offset + 8 * i)); - mem = gen_rtx_MEM (DFmode, addr); - set_mem_alias_set (mem, rs6000_sr_alias_set); + mem = gen_frame_mem (DFmode, addr); emit_move_insn (gen_rtx_REG (DFmode, info->first_fp_reg_save + i), @@ -14980,30 +15038,20 @@ rs6000_emit_epilogue (int sibcall) } /* If this is V.4, unwind the stack pointer after all of the loads - have been done. We need to emit a block here so that sched - doesn't decide to move the sp change before the register restores - (which may not have any obvious dependency on the stack). This - doesn't hurt performance, because there is no scheduling that can - be done after this point. */ - if (DEFAULT_ABI == ABI_V4 - || current_function_calls_eh_return) + have been done. */ + if (frame_reg_rtx != sp_reg_rtx) { - if (frame_reg_rtx != sp_reg_rtx) - rs6000_emit_stack_tie (); - - if (use_backchain_to_restore_sp) - { - emit_move_insn (sp_reg_rtx, frame_reg_rtx); - } - else if (sp_offset != 0) - { - emit_insn (TARGET_32BIT - ? gen_addsi3 (sp_reg_rtx, sp_reg_rtx, - GEN_INT (sp_offset)) - : gen_adddi3 (sp_reg_rtx, sp_reg_rtx, - GEN_INT (sp_offset))); - } + /* This blockage is needed so that sched doesn't decide to move + the sp change before the register restores. */ + rs6000_emit_stack_tie (); + emit_move_insn (sp_reg_rtx, frame_reg_rtx); } + else if (sp_offset != 0) + emit_insn (TARGET_32BIT + ? gen_addsi3 (sp_reg_rtx, sp_reg_rtx, + GEN_INT (sp_offset)) + : gen_adddi3 (sp_reg_rtx, sp_reg_rtx, + GEN_INT (sp_offset))); if (current_function_calls_eh_return) { @@ -15046,8 +15094,7 @@ rs6000_emit_epilogue (int sibcall) rtx addr, mem; addr = gen_rtx_PLUS (Pmode, sp_reg_rtx, GEN_INT (info->fp_save_offset + 8*i)); - mem = gen_rtx_MEM (DFmode, addr); - set_mem_alias_set (mem, rs6000_sr_alias_set); + mem = gen_frame_mem (DFmode, addr); RTVEC_ELT (p, i+3) = gen_rtx_SET (VOIDmode, @@ -15706,13 +15753,17 @@ output_toc (FILE *file, rtx x, int labelno, enum machine_mode mode) /* Handle FP constants specially. Note that if we have a minimal TOC, things we put here aren't actually in the TOC, so we can allow FP constants. */ - if (GET_CODE (x) == CONST_DOUBLE && GET_MODE (x) == TFmode) + if (GET_CODE (x) == CONST_DOUBLE && + (GET_MODE (x) == TFmode || GET_MODE (x) == TDmode)) { REAL_VALUE_TYPE rv; long k[4]; REAL_VALUE_FROM_CONST_DOUBLE (rv, x); - REAL_VALUE_TO_TARGET_LONG_DOUBLE (rv, k); + if (DECIMAL_FLOAT_MODE_P (GET_MODE (x))) + REAL_VALUE_TO_TARGET_DECIMAL128 (rv, k); + else + REAL_VALUE_TO_TARGET_LONG_DOUBLE (rv, k); if (TARGET_64BIT) { @@ -15741,13 +15792,18 @@ output_toc (FILE *file, rtx x, int labelno, enum machine_mode mode) return; } } - else if (GET_CODE (x) == CONST_DOUBLE && GET_MODE (x) == DFmode) + else if (GET_CODE (x) == CONST_DOUBLE && + (GET_MODE (x) == DFmode || GET_MODE (x) == DDmode)) { REAL_VALUE_TYPE rv; long k[2]; REAL_VALUE_FROM_CONST_DOUBLE (rv, x); - REAL_VALUE_TO_TARGET_DOUBLE (rv, k); + + if (DECIMAL_FLOAT_MODE_P (GET_MODE (x))) + REAL_VALUE_TO_TARGET_DECIMAL64 (rv, k); + else + REAL_VALUE_TO_TARGET_DOUBLE (rv, k); if (TARGET_64BIT) { @@ -15772,13 +15828,17 @@ output_toc (FILE *file, rtx x, int labelno, enum machine_mode mode) return; } } - else if (GET_CODE (x) == CONST_DOUBLE && GET_MODE (x) == SFmode) + else if (GET_CODE (x) == CONST_DOUBLE && + (GET_MODE (x) == SFmode || GET_MODE (x) == SDmode)) { REAL_VALUE_TYPE rv; long l; REAL_VALUE_FROM_CONST_DOUBLE (rv, x); - REAL_VALUE_TO_TARGET_SINGLE (rv, l); + if (DECIMAL_FLOAT_MODE_P (GET_MODE (x))) + REAL_VALUE_TO_TARGET_DECIMAL32 (rv, l); + else + REAL_VALUE_TO_TARGET_SINGLE (rv, l); if (TARGET_64BIT) { @@ -17259,6 +17319,8 @@ rs6000_handle_altivec_attribute (tree *node, error ("use of boolean types in AltiVec types is invalid"); else if (TREE_CODE (type) == COMPLEX_TYPE) error ("use of % in AltiVec types is invalid"); + else if (DECIMAL_FLOAT_MODE_P (mode)) + error ("use of decimal floating point types in AltiVec types is invalid"); switch (altivec_type) { @@ -17390,31 +17452,74 @@ rs6000_longcall_ref (rtx call_ref) #ifdef USING_ELFOS_H -/* A C statement or statements to switch to the appropriate section - for output of RTX in mode MODE. You can assume that RTX is some - kind of constant in RTL. The argument MODE is redundant except in - the case of a `const_int' rtx. Select the section by calling - `text_section' or one of the alternatives for other sections. +/* A get_unnamed_section callback, used for switching to toc_section. */ + +static void +rs6000_elf_output_toc_section_asm_op (const void *data ATTRIBUTE_UNUSED) +{ + if (DEFAULT_ABI == ABI_AIX + && TARGET_MINIMAL_TOC + && !TARGET_RELOCATABLE) + { + if (!toc_initialized) + { + toc_initialized = 1; + fprintf (asm_out_file, "%s\n", TOC_SECTION_ASM_OP); + (*targetm.asm_out.internal_label) (asm_out_file, "LCTOC", 0); + fprintf (asm_out_file, "\t.tc "); + ASM_OUTPUT_INTERNAL_LABEL_PREFIX (asm_out_file, "LCTOC1[TC],"); + ASM_OUTPUT_INTERNAL_LABEL_PREFIX (asm_out_file, "LCTOC1"); + fprintf (asm_out_file, "\n"); + + fprintf (asm_out_file, "%s\n", MINIMAL_TOC_SECTION_ASM_OP); + ASM_OUTPUT_INTERNAL_LABEL_PREFIX (asm_out_file, "LCTOC1"); + fprintf (asm_out_file, " = .+32768\n"); + } + else + fprintf (asm_out_file, "%s\n", MINIMAL_TOC_SECTION_ASM_OP); + } + else if (DEFAULT_ABI == ABI_AIX && !TARGET_RELOCATABLE) + fprintf (asm_out_file, "%s\n", TOC_SECTION_ASM_OP); + else + { + fprintf (asm_out_file, "%s\n", MINIMAL_TOC_SECTION_ASM_OP); + if (!toc_initialized) + { + ASM_OUTPUT_INTERNAL_LABEL_PREFIX (asm_out_file, "LCTOC1"); + fprintf (asm_out_file, " = .+32768\n"); + toc_initialized = 1; + } + } +} - Do not define this macro if you put all constants in the read-only - data section. */ +/* Implement TARGET_ASM_INIT_SECTIONS. */ static void +rs6000_elf_asm_init_sections (void) +{ + toc_section + = get_unnamed_section (0, rs6000_elf_output_toc_section_asm_op, NULL); + + sdata2_section + = get_unnamed_section (SECTION_WRITE, output_section_asm_op, + SDATA2_SECTION_ASM_OP); +} + +/* Implement TARGET_SELECT_RTX_SECTION. */ + +static section * rs6000_elf_select_rtx_section (enum machine_mode mode, rtx x, unsigned HOST_WIDE_INT align) { if (ASM_OUTPUT_SPECIAL_POOL_ENTRY_P (x, mode)) - toc_section (); + return toc_section; else - default_elf_select_rtx_section (mode, x, align); + return default_elf_select_rtx_section (mode, x, align); } -/* A C statement or statements to switch to the appropriate - section for output of DECL. DECL is either a `VAR_DECL' node - or a constant of some sort. RELOC indicates whether forming - the initial value of DECL requires link-time relocations. */ +/* Implement TARGET_ASM_SELECT_SECTION for ELF targets. */ -static void +static section * rs6000_elf_select_section (tree decl, int reloc, unsigned HOST_WIDE_INT align) { @@ -17422,8 +17527,8 @@ rs6000_elf_select_section (tree decl, int reloc, ABI_AIX, because otherwise we end up with dynamic relocations in read-only sections. This happens for function pointers, references to vtables in typeinfo, and probably other cases. */ - default_elf_select_section_1 (decl, reloc, align, - flag_pic || DEFAULT_ABI == ABI_AIX); + return default_elf_select_section_1 (decl, reloc, align, + flag_pic || DEFAULT_ABI == ABI_AIX); } /* A C statement to build up a unique section name, expressed as a @@ -17470,7 +17575,7 @@ rs6000_elf_encode_section_info (tree decl, rtx rtl, int first) } } -static bool +bool rs6000_elf_in_small_data_p (tree decl) { if (rs6000_sdata == SDATA_NONE) @@ -17745,9 +17850,9 @@ machopic_output_stub (FILE *file, const char *symb, const char *stub) GEN_LAZY_PTR_NAME_FOR_SYMBOL (lazy_ptr_name, symb, length); if (flag_pic == 2) - machopic_picsymbol_stub1_section (); + switch_to_section (darwin_sections[machopic_picsymbol_stub1_section]); else - machopic_symbol_stub1_section (); + switch_to_section (darwin_sections[machopic_symbol_stub1_section]); if (flag_pic == 2) { @@ -17787,7 +17892,7 @@ machopic_output_stub (FILE *file, const char *symb, const char *stub) fprintf (file, "\tbctr\n"); } - machopic_lazy_symbol_ptr_section (); + switch_to_section (darwin_sections[machopic_lazy_symbol_ptr_section]); fprintf (file, "%s:\n", lazy_ptr_name); fprintf (file, "\t.indirect_symbol %s\n", symbol_name); fprintf (file, "%sdyld_stub_binding_helper\n", @@ -17848,16 +17953,6 @@ rs6000_machopic_legitimize_pic_address (rtx orig, enum machine_mode mode, return machopic_legitimize_pic_address (orig, mode, reg); } -/* This is just a placeholder to make linking work without having to - add this to the generic Darwin EXTRA_SECTIONS. If -mcall-aix is - ever needed for Darwin (not too likely!) this would have to get a - real definition. */ - -void -toc_section (void) -{ -} - /* Output a .machine directive for the Darwin assembler, and call the generic start_file routine. */ @@ -17943,7 +18038,7 @@ rs6000_elf_asm_out_constructor (rtx symbol, int priority) section = buf; } - named_section_flags (section, SECTION_WRITE); + switch_to_section (get_section (section, SECTION_WRITE, NULL)); assemble_align (POINTER_SIZE); if (TARGET_RELOCATABLE) @@ -17972,7 +18067,7 @@ rs6000_elf_asm_out_destructor (rtx symbol, int priority) section = buf; } - named_section_flags (section, SECTION_WRITE); + switch_to_section (get_section (section, SECTION_WRITE, NULL)); assemble_align (POINTER_SIZE); if (TARGET_RELOCATABLE) @@ -18078,6 +18173,73 @@ rs6000_xcoff_asm_globalize_label (FILE *stream, const char *name) putc ('\n', stream); } +/* A get_unnamed_decl callback, used for read-only sections. PTR + points to the section string variable. */ + +static void +rs6000_xcoff_output_readonly_section_asm_op (const void *directive) +{ + fprintf (asm_out_file, "\t.csect %s[RO],3\n", + *(const char *const *) directive); +} + +/* Likewise for read-write sections. */ + +static void +rs6000_xcoff_output_readwrite_section_asm_op (const void *directive) +{ + fprintf (asm_out_file, "\t.csect %s[RW],3\n", + *(const char *const *) directive); +} + +/* A get_unnamed_section callback, used for switching to toc_section. */ + +static void +rs6000_xcoff_output_toc_section_asm_op (const void *data ATTRIBUTE_UNUSED) +{ + if (TARGET_MINIMAL_TOC) + { + /* toc_section is always selected at least once from + rs6000_xcoff_file_start, so this is guaranteed to + always be defined once and only once in each file. */ + if (!toc_initialized) + { + fputs ("\t.toc\nLCTOC..1:\n", asm_out_file); + fputs ("\t.tc toc_table[TC],toc_table[RW]\n", asm_out_file); + toc_initialized = 1; + } + fprintf (asm_out_file, "\t.csect toc_table[RW]%s\n", + (TARGET_32BIT ? "" : ",3")); + } + else + fputs ("\t.toc\n", asm_out_file); +} + +/* Implement TARGET_ASM_INIT_SECTIONS. */ + +static void +rs6000_xcoff_asm_init_sections (void) +{ + read_only_data_section + = get_unnamed_section (0, rs6000_xcoff_output_readonly_section_asm_op, + &xcoff_read_only_section_name); + + private_data_section + = get_unnamed_section (SECTION_WRITE, + rs6000_xcoff_output_readwrite_section_asm_op, + &xcoff_private_data_section_name); + + read_only_private_data_section + = get_unnamed_section (0, rs6000_xcoff_output_readonly_section_asm_op, + &xcoff_private_data_section_name); + + toc_section + = get_unnamed_section (0, rs6000_xcoff_output_toc_section_asm_op, NULL); + + readonly_data_section = read_only_data_section; + exception_section = data_section; +} + static void rs6000_xcoff_asm_named_section (const char *name, unsigned int flags, tree decl ATTRIBUTE_UNUSED) @@ -18097,23 +18259,23 @@ rs6000_xcoff_asm_named_section (const char *name, unsigned int flags, name, suffix[smclass], flags & SECTION_ENTSIZE); } -static void +static section * rs6000_xcoff_select_section (tree decl, int reloc, unsigned HOST_WIDE_INT align ATTRIBUTE_UNUSED) { if (decl_readonly_section_1 (decl, reloc, 1)) { if (TREE_PUBLIC (decl)) - read_only_data_section (); + return read_only_data_section; else - read_only_private_data_section (); + return read_only_private_data_section; } else { if (TREE_PUBLIC (decl)) - data_section (); + return data_section; else - private_data_section (); + return private_data_section; } } @@ -18142,14 +18304,14 @@ rs6000_xcoff_unique_section (tree decl, int reloc ATTRIBUTE_UNUSED) However, if this is being placed in the TOC it must be output as a toc entry. */ -static void +static section * rs6000_xcoff_select_rtx_section (enum machine_mode mode, rtx x, unsigned HOST_WIDE_INT align ATTRIBUTE_UNUSED) { if (ASM_OUTPUT_SPECIAL_POOL_ENTRY_P (x, mode)) - toc_section (); + return toc_section; else - read_only_private_data_section (); + return read_only_private_data_section; } /* Remove any trailing [DS] or the like from the symbol name. */ @@ -18213,8 +18375,8 @@ rs6000_xcoff_file_start (void) output_quoted_string (asm_out_file, main_input_filename); fputc ('\n', asm_out_file); if (write_symbols != NO_DEBUG) - private_data_section (); - text_section (); + switch_to_section (private_data_section); + switch_to_section (text_section); if (profile_flag) fprintf (asm_out_file, "\t.extern %s\n", RS6000_MCOUNT); rs6000_file_start (); @@ -18226,9 +18388,9 @@ rs6000_xcoff_file_start (void) static void rs6000_xcoff_file_end (void) { - text_section (); + switch_to_section (text_section); fputs ("_section_.text:\n", asm_out_file); - data_section (); + switch_to_section (data_section); fputs (TARGET_32BIT ? "\t.long _section_.text\n" : "\t.llong _section_.text\n", asm_out_file); @@ -18882,7 +19044,9 @@ rs6000_function_value (tree valtype, tree func ATTRIBUTE_UNUSED) else mode = TYPE_MODE (valtype); - if (SCALAR_FLOAT_TYPE_P (valtype) && TARGET_HARD_FLOAT && TARGET_FPRS) + if (DECIMAL_FLOAT_MODE_P (mode)) + regno = GP_ARG_RETURN; + else if (SCALAR_FLOAT_TYPE_P (valtype) && TARGET_HARD_FLOAT && TARGET_FPRS) regno = FP_ARG_RETURN; else if (TREE_CODE (valtype) == COMPLEX_TYPE && targetm.calls.split_complex_arg) @@ -18921,7 +19085,9 @@ rs6000_libcall_value (enum machine_mode mode) GEN_INT (4)))); } - if (SCALAR_FLOAT_MODE_P (mode) + if (DECIMAL_FLOAT_MODE_P (mode)) + regno = GP_ARG_RETURN; + else if (SCALAR_FLOAT_MODE_P (mode) && TARGET_HARD_FLOAT && TARGET_FPRS) regno = FP_ARG_RETURN; else if (ALTIVEC_VECTOR_MODE (mode) @@ -19049,6 +19215,16 @@ rs6000_eh_return_filter_mode (void) return TARGET_32BIT ? SImode : word_mode; } +/* Target hook for scalar_mode_supported_p. */ +static bool +rs6000_scalar_mode_supported_p (enum machine_mode mode) +{ + if (DECIMAL_FLOAT_MODE_P (mode)) + return true; + else + return default_scalar_mode_supported_p (mode); +} + /* Target hook for vector_mode_supported_p. */ static bool rs6000_vector_mode_supported_p (enum machine_mode mode) diff --git a/gcc/config/rs6000/rs6000.h b/gcc/config/rs6000/rs6000.h index 8dc2d023010..8a01d992041 100644 --- a/gcc/config/rs6000/rs6000.h +++ b/gcc/config/rs6000/rs6000.h @@ -1723,17 +1723,14 @@ typedef struct rs6000_args /* Nonzero if X is a hard reg that can be used as an index or if it is a pseudo reg in the non-strict case. */ #define INT_REG_OK_FOR_INDEX_P(X, STRICT) \ - ((! (STRICT) \ - && (REGNO (X) <= 31 \ - || REGNO (X) == ARG_POINTER_REGNUM \ - || REGNO (X) == FRAME_POINTER_REGNUM \ - || REGNO (X) >= FIRST_PSEUDO_REGISTER)) \ - || ((STRICT) && REGNO_OK_FOR_INDEX_P (REGNO (X)))) + ((!(STRICT) && REGNO (X) >= FIRST_PSEUDO_REGISTER) \ + || REGNO_OK_FOR_INDEX_P (REGNO (X))) /* Nonzero if X is a hard reg that can be used as a base reg or if it is a pseudo reg in the non-strict case. */ #define INT_REG_OK_FOR_BASE_P(X, STRICT) \ - (REGNO (X) > 0 && INT_REG_OK_FOR_INDEX_P (X, (STRICT))) + ((!(STRICT) && REGNO (X) >= FIRST_PSEUDO_REGISTER) \ + || REGNO_OK_FOR_BASE_P (REGNO (X))) #define REG_OK_FOR_INDEX_P(X) INT_REG_OK_FOR_INDEX_P (X, REG_OK_STRICT_FLAG) #define REG_OK_FOR_BASE_P(X) INT_REG_OK_FOR_BASE_P (X, REG_OK_STRICT_FLAG) @@ -1743,7 +1740,7 @@ typedef struct rs6000_args The MODE argument is the machine mode for the MEM expression that wants to use this address. - On the RS/6000, there are four valid address: a SYMBOL_REF that + On the RS/6000, there are four valid addresses: a SYMBOL_REF that refers to a constant pool entry of an address (or the sum of it plus a constant), a short (16-bit signed) constant plus a register, the sum of two registers, or a register indirect, possibly with an diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md index 14e1fb80531..17d8ef660ce 100644 --- a/gcc/config/rs6000/rs6000.md +++ b/gcc/config/rs6000/rs6000.md @@ -11283,10 +11283,10 @@ (define_peephole2 [(set (match_operand:SI 0 "register_operand") - (match_operand:SI 1 "logical_operand" "")) + (match_operand:SI 1 "logical_const_operand" "")) (set (match_dup 0) (match_operator:SI 3 "boolean_or_operator" [(match_dup 0) - (match_operand:SI 2 "logical_operand" "")])) + (match_operand:SI 2 "logical_const_operand" "")])) (set (match_operand:CC 4 "cc_reg_operand" "") (compare:CC (match_operand:SI 5 "gpc_reg_operand" "") (match_dup 0))) diff --git a/gcc/config/rs6000/sync.md b/gcc/config/rs6000/sync.md index 92a42237605..b244ef63986 100644 --- a/gcc/config/rs6000/sync.md +++ b/gcc/config/rs6000/sync.md @@ -86,6 +86,52 @@ DONE; }) +(define_expand "sync_compare_and_swaphi" + [(match_operand:HI 0 "gpc_reg_operand" "") + (match_operand:HI 1 "memory_operand" "") + (match_operand:HI 2 "gpc_reg_operand" "") + (match_operand:HI 3 "gpc_reg_operand" "")] + "TARGET_POWERPC" +{ + rs6000_expand_compare_and_swapqhi (operands[0], operands[1], + operands[2], operands[3]); + DONE; +}) + +(define_expand "sync_compare_and_swapqi" + [(match_operand:QI 0 "gpc_reg_operand" "") + (match_operand:QI 1 "memory_operand" "") + (match_operand:QI 2 "gpc_reg_operand" "") + (match_operand:QI 3 "gpc_reg_operand" "")] + "TARGET_POWERPC" +{ + rs6000_expand_compare_and_swapqhi (operands[0], operands[1], + operands[2], operands[3]); + DONE; +}) + +(define_insn_and_split "sync_compare_and_swapqhi_internal" + [(set (match_operand:SI 0 "gpc_reg_operand" "=&r") + (match_operand:SI 4 "memory_operand" "+Z")) + (set (match_dup 4) + (unspec:SI + [(match_operand:SI 1 "gpc_reg_operand" "r") + (match_operand:SI 2 "gpc_reg_operand" "r") + (match_operand:SI 3 "gpc_reg_operand" "r")] + UNSPEC_CMPXCHG)) + (clobber (match_scratch:SI 5 "=&r")) + (clobber (match_scratch:CC 6 "=&x"))] + "TARGET_POWERPC" + "#" + "&& reload_completed" + [(const_int 0)] +{ + rs6000_split_compare_and_swapqhi (operands[0], operands[1], + operands[2], operands[3], operands[4], + operands[5]); + DONE; +}) + (define_insn_and_split "sync_lock_test_and_set" [(set (match_operand:GPR 0 "gpc_reg_operand" "=&r") (match_operand:GPR 1 "memory_operand" "+Z")) diff --git a/gcc/config/rs6000/sysv4.h b/gcc/config/rs6000/sysv4.h index 238b497250f..62690f45364 100644 --- a/gcc/config/rs6000/sysv4.h +++ b/gcc/config/rs6000/sysv4.h @@ -359,126 +359,8 @@ do { \ #define SDATA2_SECTION_ASM_OP "\t.section\t\".sdata2\",\"a\"" #define SBSS_SECTION_ASM_OP "\t.section\t\".sbss\",\"aw\",@nobits" -/* Besides the usual ELF sections, we need a toc section. */ -/* Override elfos.h definition. */ -#undef EXTRA_SECTIONS -#define EXTRA_SECTIONS in_toc, in_sdata, in_sdata2, in_sbss, in_init, in_fini - -/* Override elfos.h definition. */ -#undef EXTRA_SECTION_FUNCTIONS -#define EXTRA_SECTION_FUNCTIONS \ - TOC_SECTION_FUNCTION \ - SDATA_SECTION_FUNCTION \ - SDATA2_SECTION_FUNCTION \ - SBSS_SECTION_FUNCTION \ - INIT_SECTION_FUNCTION \ - FINI_SECTION_FUNCTION - -#define TOC_SECTION_FUNCTION \ -void \ -toc_section (void) \ -{ \ - if (in_section != in_toc) \ - { \ - in_section = in_toc; \ - if (DEFAULT_ABI == ABI_AIX \ - && TARGET_MINIMAL_TOC \ - && !TARGET_RELOCATABLE) \ - { \ - if (! toc_initialized) \ - { \ - toc_initialized = 1; \ - fprintf (asm_out_file, "%s\n", TOC_SECTION_ASM_OP); \ - (*targetm.asm_out.internal_label) (asm_out_file, "LCTOC", 0); \ - fprintf (asm_out_file, "\t.tc "); \ - ASM_OUTPUT_INTERNAL_LABEL_PREFIX (asm_out_file, "LCTOC1[TC],"); \ - ASM_OUTPUT_INTERNAL_LABEL_PREFIX (asm_out_file, "LCTOC1"); \ - fprintf (asm_out_file, "\n"); \ - \ - fprintf (asm_out_file, "%s\n", MINIMAL_TOC_SECTION_ASM_OP); \ - ASM_OUTPUT_INTERNAL_LABEL_PREFIX (asm_out_file, "LCTOC1"); \ - fprintf (asm_out_file, " = .+32768\n"); \ - } \ - else \ - fprintf (asm_out_file, "%s\n", MINIMAL_TOC_SECTION_ASM_OP); \ - } \ - else if (DEFAULT_ABI == ABI_AIX && !TARGET_RELOCATABLE) \ - fprintf (asm_out_file, "%s\n", TOC_SECTION_ASM_OP); \ - else \ - { \ - fprintf (asm_out_file, "%s\n", MINIMAL_TOC_SECTION_ASM_OP); \ - if (! toc_initialized) \ - { \ - ASM_OUTPUT_INTERNAL_LABEL_PREFIX (asm_out_file, "LCTOC1"); \ - fprintf (asm_out_file, " = .+32768\n"); \ - toc_initialized = 1; \ - } \ - } \ - } \ -} \ - \ -extern int in_toc_section (void); \ -int in_toc_section (void) \ -{ \ - return in_section == in_toc; \ -} - -#define SDATA_SECTION_FUNCTION \ -void \ -sdata_section (void) \ -{ \ - if (in_section != in_sdata) \ - { \ - in_section = in_sdata; \ - fprintf (asm_out_file, "%s\n", SDATA_SECTION_ASM_OP); \ - } \ -} - -#define SDATA2_SECTION_FUNCTION \ -void \ -sdata2_section (void) \ -{ \ - if (in_section != in_sdata2) \ - { \ - in_section = in_sdata2; \ - fprintf (asm_out_file, "%s\n", SDATA2_SECTION_ASM_OP); \ - } \ -} - -#define SBSS_SECTION_FUNCTION \ -void \ -sbss_section (void) \ -{ \ - if (in_section != in_sbss) \ - { \ - in_section = in_sbss; \ - fprintf (asm_out_file, "%s\n", SBSS_SECTION_ASM_OP); \ - } \ -} - -#define INIT_SECTION_FUNCTION \ -void \ -init_section (void) \ -{ \ - if (in_section != in_init) \ - { \ - in_section = in_init; \ - fprintf (asm_out_file, "%s\n", INIT_SECTION_ASM_OP); \ - } \ -} - -#define FINI_SECTION_FUNCTION \ -void \ -fini_section (void) \ -{ \ - if (in_section != in_fini) \ - { \ - in_section = in_fini; \ - fprintf (asm_out_file, "%s\n", FINI_SECTION_ASM_OP); \ - } \ -} - /* Override default elf definitions. */ +#define TARGET_ASM_INIT_SECTIONS rs6000_elf_asm_init_sections #undef TARGET_ASM_SELECT_RTX_SECTION #define TARGET_ASM_SELECT_RTX_SECTION rs6000_elf_select_rtx_section #undef TARGET_ASM_SELECT_SECTION @@ -550,14 +432,12 @@ extern int rs6000_pic_labelno; #define LCOMM_ASM_OP "\t.lcomm\t" -/* Override elfos.h definition. */ -#undef ASM_OUTPUT_ALIGNED_LOCAL -#define ASM_OUTPUT_ALIGNED_LOCAL(FILE, NAME, SIZE, ALIGN) \ +/* Describe how to emit uninitialized local items. */ +#define ASM_OUTPUT_ALIGNED_DECL_LOCAL(FILE, DECL, NAME, SIZE, ALIGN) \ do { \ - if (rs6000_sdata != SDATA_NONE && (SIZE) > 0 \ - && (SIZE) <= g_switch_value) \ + if ((DECL) && rs6000_elf_in_small_data_p (DECL)) \ { \ - sbss_section (); \ + switch_to_section (sbss_section); \ ASM_OUTPUT_ALIGN (FILE, exact_log2 (ALIGN / BITS_PER_UNIT)); \ ASM_OUTPUT_LABEL (FILE, NAME); \ ASM_OUTPUT_SKIP (FILE, SIZE); \ @@ -577,7 +457,7 @@ do { \ /* Describe how to emit uninitialized external linkage items. */ #define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \ do { \ - ASM_OUTPUT_ALIGNED_LOCAL (FILE, NAME, SIZE, ALIGN); \ + ASM_OUTPUT_ALIGNED_DECL_LOCAL (FILE, DECL, NAME, SIZE, ALIGN); \ } while (0) #ifdef HAVE_GAS_MAX_SKIP_P2ALIGN diff --git a/gcc/config/rs6000/xcoff.h b/gcc/config/rs6000/xcoff.h index 822b5a0de5e..e7560a86ab1 100644 --- a/gcc/config/rs6000/xcoff.h +++ b/gcc/config/rs6000/xcoff.h @@ -56,93 +56,6 @@ #define DOLLARS_IN_IDENTIFIERS 0 -/* Define the extra sections we need. We define three: one is the read-only - data section which is used for constants. This is a csect whose name is - derived from the name of the input file. The second is for initialized - global variables. This is a csect whose name is that of the variable. - The third is the TOC. */ - -#define EXTRA_SECTIONS \ - read_only_data, private_data, read_only_private_data, toc, bss - -/* Define the routines to implement these extra sections. - BIGGEST_ALIGNMENT is 64, so align the sections that much. */ - -#define EXTRA_SECTION_FUNCTIONS \ - READ_ONLY_DATA_SECTION_FUNCTION \ - PRIVATE_DATA_SECTION_FUNCTION \ - READ_ONLY_PRIVATE_DATA_SECTION_FUNCTION \ - TOC_SECTION_FUNCTION - -#define READ_ONLY_DATA_SECTION_FUNCTION \ -void \ -read_only_data_section (void) \ -{ \ - if (in_section != read_only_data) \ - { \ - fprintf (asm_out_file, "\t.csect %s[RO],3\n", \ - xcoff_read_only_section_name); \ - in_section = read_only_data; \ - } \ -} - -#define PRIVATE_DATA_SECTION_FUNCTION \ -void \ -private_data_section (void) \ -{ \ - if (in_section != private_data) \ - { \ - fprintf (asm_out_file, "\t.csect %s[RW],3\n", \ - xcoff_private_data_section_name); \ - in_section = private_data; \ - } \ -} - -#define READ_ONLY_PRIVATE_DATA_SECTION_FUNCTION \ -void \ -read_only_private_data_section (void) \ -{ \ - if (in_section != read_only_private_data) \ - { \ - fprintf (asm_out_file, "\t.csect %s[RO],3\n", \ - xcoff_private_data_section_name); \ - in_section = read_only_private_data; \ - } \ -} - -#define TOC_SECTION_FUNCTION \ -void \ -toc_section (void) \ -{ \ - if (TARGET_MINIMAL_TOC) \ - { \ - /* toc_section is always called at least once \ - from rs6000_xcoff_file_start, so this is \ - guaranteed to always be defined once and \ - only once in each file. */ \ - if (! toc_initialized) \ - { \ - fputs ("\t.toc\nLCTOC..1:\n", asm_out_file); \ - fputs ("\t.tc toc_table[TC],toc_table[RW]\n", asm_out_file); \ - toc_initialized = 1; \ - } \ - \ - if (in_section != toc) \ - fprintf (asm_out_file, "\t.csect toc_table[RW]%s\n", \ - (TARGET_32BIT ? "" : ",3")); \ - } \ - else \ - { \ - if (in_section != toc) \ - fputs ("\t.toc\n", asm_out_file); \ - } \ - in_section = toc; \ -} - -/* Define the name of our readonly data section. */ - -#define READONLY_DATA_SECTION read_only_data_section - /* Return nonzero if this entry is to be written into the constant pool in a special way. We do so if this is a SYMBOL_REF, LABEL_REF or a CONST containing one of them. If -mfp-in-toc (the default), @@ -168,6 +81,7 @@ toc_section (void) \ && ! TARGET_NO_FP_IN_TOC))))) #define TARGET_ASM_GLOBALIZE_LABEL rs6000_xcoff_asm_globalize_label +#define TARGET_ASM_INIT_SECTIONS rs6000_xcoff_asm_init_sections #define TARGET_ASM_NAMED_SECTION rs6000_xcoff_asm_named_section #define TARGET_ASM_SELECT_SECTION rs6000_xcoff_select_section #define TARGET_ASM_SELECT_RTX_SECTION rs6000_xcoff_select_rtx_section @@ -213,9 +127,8 @@ toc_section (void) \ On the RS/6000, we need to place an extra '.' in the function name and output the function descriptor. - The csect for the function will have already been created by the - `text_section' call previously done. We do have to go back to that - csect, however. + The csect for the function will have already been created when + text_section was selected. We do have to go back to that csect, however. The third and fourth parameters to the .function pseudo-op (16 and 044) are placeholders which no longer have any use. */ @@ -244,8 +157,8 @@ toc_section (void) \ fputs (TARGET_32BIT ? "\t.long ." : "\t.llong .", FILE); \ RS6000_OUTPUT_BASENAME (FILE, NAME); \ fputs (", TOC[tc0], 0\n", FILE); \ - in_section = no_section; \ - function_section(DECL); \ + in_section = NULL; \ + switch_to_section (function_section (DECL)); \ putc ('.', FILE); \ RS6000_OUTPUT_BASENAME (FILE, NAME); \ fputs (":\n", FILE); \ @@ -362,10 +275,6 @@ toc_section (void) \ Align entire section to BIGGEST_ALIGNMENT. */ #define DATA_SECTION_ASM_OP "\t.csect .data[RW],3" -/* Define the name of the section to use for the EH language specific - data areas (.gcc_except_table on most other systems). */ -#define TARGET_ASM_EXCEPTION_SECTION data_section - /* Define to prevent DWARF2 unwind info in the data section rather than in the .eh_frame section. We do this because the AIX linker would otherwise garbage collect these sections. */ diff --git a/gcc/config/s390/predicates.md b/gcc/config/s390/predicates.md index 9f8f8237075..b910f97e8ef 100644 --- a/gcc/config/s390/predicates.md +++ b/gcc/config/s390/predicates.md @@ -75,80 +75,15 @@ (and (match_test "mode == Pmode") (match_test "!legitimate_la_operand_p (op)")))) -;; Return true if OP is a valid operand for setmem. +;; Return true if OP is a valid operand as shift count or setmem. -(define_predicate "setmem_operand" +(define_predicate "shift_count_or_setmem_operand" (match_code "reg, subreg, plus, const_int") { HOST_WIDE_INT offset = 0; - /* The padding byte operand of the mvcle instruction is always truncated - to the 8 least significant bits. */ - if (GET_CODE (op) == AND && GET_CODE (XEXP (op, 1)) == CONST_INT - && (INTVAL (XEXP (op, 1)) & 255) == 255) - op = XEXP (op, 0); - - /* We can have an integer constant, an address register, - or a sum of the two. Note that reload already checks - that any register present is an address register, so - we just check for any register here. */ - if (GET_CODE (op) == CONST_INT) - { - offset = INTVAL (op); - op = NULL_RTX; - } - if (op && GET_CODE (op) == PLUS && GET_CODE (XEXP (op, 1)) == CONST_INT) - { - offset = INTVAL (XEXP (op, 1)); - op = XEXP (op, 0); - } - while (op && GET_CODE (op) == SUBREG) - op = SUBREG_REG (op); - if (op && GET_CODE (op) != REG) - return false; - - if (op && REGNO (op) < FIRST_PSEUDO_REGISTER - && !GENERAL_REGNO_P (REGNO (op))) - return false; - - /* Unfortunately we have to reject constants that are invalid - for an address, or else reload will get confused. */ - if (!DISP_IN_RANGE (offset)) - return false; - - return true; -}) - -;; Return true if OP is a valid shift count operand. - -(define_predicate "shift_count_operand" - (match_code "reg, subreg, plus, const_int, and") -{ - HOST_WIDE_INT offset = 0; - - /* Shift count operands are always truncated to the 6 least significant bits. - So we can accept pointless ANDs here. */ - if (GET_CODE (op) == AND && GET_CODE (XEXP (op, 1)) == CONST_INT - && (INTVAL (XEXP (op, 1)) & 63) == 63) - op = XEXP (op, 0); - - /* We can have an integer constant, an address register, - or a sum of the two. Note that reload already checks - that any register present is an address register, so - we just check for any register here. */ - if (GET_CODE (op) == CONST_INT) - { - offset = INTVAL (op); - op = NULL_RTX; - } - if (op && GET_CODE (op) == PLUS && GET_CODE (XEXP (op, 1)) == CONST_INT) - { - offset = INTVAL (XEXP (op, 1)); - op = XEXP (op, 0); - } - while (op && GET_CODE (op) == SUBREG) - op = SUBREG_REG (op); - if (op && GET_CODE (op) != REG) + /* Extract base register and offset. */ + if (!s390_decompose_shift_count (op, &base, &offset)) return false; if (op && REGNO (op) < FIRST_PSEUDO_REGISTER diff --git a/gcc/config/s390/s390-protos.h b/gcc/config/s390/s390-protos.h index 3ae43ea209e..710f4e750a5 100644 --- a/gcc/config/s390/s390-protos.h +++ b/gcc/config/s390/s390-protos.h @@ -75,6 +75,9 @@ extern void s390_expand_setmem (rtx, rtx, rtx); extern void s390_expand_cmpmem (rtx, rtx, rtx, rtx); extern bool s390_expand_addcc (enum rtx_code, rtx, rtx, rtx, rtx, rtx); extern bool s390_expand_insv (rtx, rtx, rtx, rtx); +extern void s390_expand_cs_hqi (enum machine_mode, rtx, rtx, rtx, rtx); +extern void s390_expand_atomic (enum machine_mode, enum rtx_code, + rtx, rtx, rtx, bool); extern rtx s390_return_addr_rtx (int, rtx); extern rtx s390_back_chain_rtx (void); extern rtx s390_emit_call (rtx, rtx, rtx, rtx); @@ -97,6 +100,7 @@ extern rtx s390_load_got (void); extern rtx s390_get_thread_pointer (void); extern void s390_emit_tpf_eh_return (rtx); extern bool s390_legitimate_address_without_index_p (rtx); +extern bool s390_decompose_shift_count (rtx, rtx *, HOST_WIDE_INT *); extern int s390_branch_condition_mask (rtx); #endif /* RTX_CODE */ diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c index 04cc741348b..f1b83621b5f 100644 --- a/gcc/config/s390/s390.c +++ b/gcc/config/s390/s390.c @@ -209,6 +209,7 @@ struct s390_address rtx indx; rtx disp; bool pointer; + bool literal_pool; }; /* Which cpu are we tuning for. */ @@ -1473,6 +1474,14 @@ s390_decompose_address (rtx addr, struct s390_address *out) bool pointer = false; bool base_ptr = false; bool indx_ptr = false; + bool literal_pool = false; + + /* We may need to substitute the literal pool base register into the address + below. However, at this point we do not know which register is going to + be used as base, so we substitute the arg pointer register. This is going + to be treated as holding a pointer below -- it shouldn't be used for any + other purpose. */ + rtx fake_pool_base = gen_rtx_REG (Pmode, ARG_POINTER_REGNUM); /* Decompose address into base + index + displacement. */ @@ -1545,9 +1554,9 @@ s390_decompose_address (rtx addr, struct s390_address *out) { /* Either base or index must be free to hold the base register. */ if (!base) - base = gen_rtx_REG (Pmode, BASE_REGNUM); + base = fake_pool_base, literal_pool = true; else if (!indx) - indx = gen_rtx_REG (Pmode, BASE_REGNUM); + indx = fake_pool_base, literal_pool = true; else return false; @@ -1570,11 +1579,14 @@ s390_decompose_address (rtx addr, struct s390_address *out) else return false; - base = gen_rtx_REG (Pmode, BASE_REGNUM); + base = XVECEXP (base, 0, 1); break; case UNSPEC_LTREL_BASE: - base = gen_rtx_REG (Pmode, BASE_REGNUM); + if (XVECLEN (base, 0) == 1) + base = fake_pool_base, literal_pool = true; + else + base = XVECEXP (base, 0, 1); break; default: @@ -1584,8 +1596,7 @@ s390_decompose_address (rtx addr, struct s390_address *out) if (GET_CODE (base) != REG || GET_MODE (base) != Pmode) return false; - if (REGNO (base) == BASE_REGNUM - || REGNO (base) == STACK_POINTER_REGNUM + if (REGNO (base) == STACK_POINTER_REGNUM || REGNO (base) == FRAME_POINTER_REGNUM || ((reload_completed || reload_in_progress) && frame_pointer_needed @@ -1594,6 +1605,10 @@ s390_decompose_address (rtx addr, struct s390_address *out) || (flag_pic && REGNO (base) == PIC_OFFSET_TABLE_REGNUM)) pointer = base_ptr = true; + + if ((reload_completed || reload_in_progress) + && base == cfun->machine->base_reg) + pointer = base_ptr = literal_pool = true; } /* Validate index register. */ @@ -1610,11 +1625,14 @@ s390_decompose_address (rtx addr, struct s390_address *out) else return false; - indx = gen_rtx_REG (Pmode, BASE_REGNUM); + indx = XVECEXP (indx, 0, 1); break; case UNSPEC_LTREL_BASE: - indx = gen_rtx_REG (Pmode, BASE_REGNUM); + if (XVECLEN (indx, 0) == 1) + indx = fake_pool_base, literal_pool = true; + else + indx = XVECEXP (indx, 0, 1); break; default: @@ -1624,8 +1642,7 @@ s390_decompose_address (rtx addr, struct s390_address *out) if (GET_CODE (indx) != REG || GET_MODE (indx) != Pmode) return false; - if (REGNO (indx) == BASE_REGNUM - || REGNO (indx) == STACK_POINTER_REGNUM + if (REGNO (indx) == STACK_POINTER_REGNUM || REGNO (indx) == FRAME_POINTER_REGNUM || ((reload_completed || reload_in_progress) && frame_pointer_needed @@ -1634,6 +1651,10 @@ s390_decompose_address (rtx addr, struct s390_address *out) || (flag_pic && REGNO (indx) == PIC_OFFSET_TABLE_REGNUM)) pointer = indx_ptr = true; + + if ((reload_completed || reload_in_progress) + && indx == cfun->machine->base_reg) + pointer = indx_ptr = literal_pool = true; } /* Prefer to use pointer as base, not index. */ @@ -1721,11 +1742,49 @@ s390_decompose_address (rtx addr, struct s390_address *out) out->indx = indx; out->disp = orig_disp; out->pointer = pointer; + out->literal_pool = literal_pool; } return true; } +/* Decompose a RTL expression OP for a shift count into its components, + and return the base register in BASE and the offset in OFFSET. + + Return true if OP is a valid shift count, false if not. */ + +bool +s390_decompose_shift_count (rtx op, rtx *base, HOST_WIDE_INT *offset) +{ + HOST_WIDE_INT off = 0; + + /* We can have an integer constant, an address register, + or a sum of the two. */ + if (GET_CODE (op) == CONST_INT) + { + off = INTVAL (op); + op = NULL_RTX; + } + if (op && GET_CODE (op) == PLUS && GET_CODE (XEXP (op, 1)) == CONST_INT) + { + off = INTVAL (XEXP (op, 1)); + op = XEXP (op, 0); + } + while (op && GET_CODE (op) == SUBREG) + op = SUBREG_REG (op); + + if (op && GET_CODE (op) != REG) + return false; + + if (offset) + *offset = off; + if (base) + *base = op; + + return true; +} + + /* Return true if CODE is a valid address without index. */ bool @@ -1772,9 +1831,7 @@ s390_extra_constraint_str (rtx op, int c, const char * str) return 0; if (!s390_decompose_address (XEXP (op, 0), &addr)) return 0; - if (addr.base && REG_P (addr.base) && REGNO (addr.base) == BASE_REGNUM) - return 0; - if (addr.indx && REG_P (addr.indx) && REGNO (addr.indx) == BASE_REGNUM) + if (addr.literal_pool) return 0; c = str[1]; @@ -1856,7 +1913,11 @@ s390_extra_constraint_str (rtx op, int c, const char * str) break; case 'Y': - return shift_count_operand (op, VOIDmode); + /* Simply check for the basic form of a shift count. Reload will + take care of making sure we have a proper base register. */ + if (!s390_decompose_shift_count (op, NULL, NULL)) + return 0; + break; default: return 0; @@ -3916,6 +3977,247 @@ s390_expand_insv (rtx dest, rtx op1, rtx op2, rtx src) return false; } +/* A subroutine of s390_expand_cs_hqi and s390_expand_atomic which returns a + register that holds VAL of mode MODE shifted by COUNT bits. */ + +static inline rtx +s390_expand_mask_and_shift (rtx val, enum machine_mode mode, rtx count) +{ + val = expand_simple_binop (SImode, AND, val, GEN_INT (GET_MODE_MASK (mode)), + NULL_RTX, 1, OPTAB_DIRECT); + return expand_simple_binop (SImode, ASHIFT, val, count, + NULL_RTX, 1, OPTAB_DIRECT); +} + +/* Structure to hold the initial parameters for a compare_and_swap operation + in HImode and QImode. */ + +struct alignment_context +{ + rtx memsi; /* SI aligned memory location. */ + rtx shift; /* Bit offset with regard to lsb. */ + rtx modemask; /* Mask of the HQImode shifted by SHIFT bits. */ + rtx modemaski; /* ~modemask */ + bool aligned; /* True if memory is aligned, false else. */ +}; + +/* A subroutine of s390_expand_cs_hqi and s390_expand_atomic to initialize + structure AC for transparent simplifying, if the memory alignment is known + to be at least 32bit. MEM is the memory location for the actual operation + and MODE its mode. */ + +static void +init_alignment_context (struct alignment_context *ac, rtx mem, + enum machine_mode mode) +{ + ac->shift = GEN_INT (GET_MODE_SIZE (SImode) - GET_MODE_SIZE (mode)); + ac->aligned = (MEM_ALIGN (mem) >= GET_MODE_BITSIZE (SImode)); + + if (ac->aligned) + ac->memsi = adjust_address (mem, SImode, 0); /* Memory is aligned. */ + else + { + /* Alignment is unknown. */ + rtx byteoffset, addr, align; + + /* Force the address into a register. */ + addr = force_reg (Pmode, XEXP (mem, 0)); + + /* Align it to SImode. */ + align = expand_simple_binop (Pmode, AND, addr, + GEN_INT (-GET_MODE_SIZE (SImode)), + NULL_RTX, 1, OPTAB_DIRECT); + /* Generate MEM. */ + ac->memsi = gen_rtx_MEM (SImode, align); + MEM_VOLATILE_P (ac->memsi) = MEM_VOLATILE_P (mem); + set_mem_align (ac->memsi, GET_MODE_BITSIZE (SImode)); + + /* Calculate shiftcount. */ + byteoffset = expand_simple_binop (Pmode, AND, addr, + GEN_INT (GET_MODE_SIZE (SImode) - 1), + NULL_RTX, 1, OPTAB_DIRECT); + /* As we already have some offset, evaluate the remaining distance. */ + ac->shift = expand_simple_binop (SImode, MINUS, ac->shift, byteoffset, + NULL_RTX, 1, OPTAB_DIRECT); + + } + /* Shift is the byte count, but we need the bitcount. */ + ac->shift = expand_simple_binop (SImode, MULT, ac->shift, GEN_INT (BITS_PER_UNIT), + NULL_RTX, 1, OPTAB_DIRECT); + /* Calculate masks. */ + ac->modemask = expand_simple_binop (SImode, ASHIFT, + GEN_INT (GET_MODE_MASK (mode)), ac->shift, + NULL_RTX, 1, OPTAB_DIRECT); + ac->modemaski = expand_simple_unop (SImode, NOT, ac->modemask, NULL_RTX, 1); +} + +/* Expand an atomic compare and swap operation for HImode and QImode. MEM is + the memory location, CMP the old value to compare MEM with and NEW the value + to set if CMP == MEM. + CMP is never in memory for compare_and_swap_cc because + expand_bool_compare_and_swap puts it into a register for later compare. */ + +void +s390_expand_cs_hqi (enum machine_mode mode, rtx target, rtx mem, rtx cmp, rtx new) +{ + struct alignment_context ac; + rtx cmpv, newv, val, resv, cc; + rtx res = gen_reg_rtx (SImode); + rtx csloop = gen_label_rtx (); + rtx csend = gen_label_rtx (); + + gcc_assert (register_operand (target, VOIDmode)); + gcc_assert (MEM_P (mem)); + + init_alignment_context (&ac, mem, mode); + + /* Shift the values to the correct bit positions. */ + if (!(ac.aligned && MEM_P (cmp))) + cmp = s390_expand_mask_and_shift (cmp, mode, ac.shift); + if (!(ac.aligned && MEM_P (new))) + new = s390_expand_mask_and_shift (new, mode, ac.shift); + + /* Load full word. Subsequent loads are performed by CS. */ + val = expand_simple_binop (SImode, AND, ac.memsi, ac.modemaski, + NULL_RTX, 1, OPTAB_DIRECT); + + /* Start CS loop. */ + emit_label (csloop); + /* val = "00..0" + * cmp = "00..000..0" + * new = "00..000..0" + */ + + /* Patch cmp and new with val at correct position. */ + if (ac.aligned && MEM_P (cmp)) + { + cmpv = force_reg (SImode, val); + store_bit_field (cmpv, GET_MODE_BITSIZE (mode), 0, SImode, cmp); + } + else + cmpv = force_reg (SImode, expand_simple_binop (SImode, IOR, cmp, val, + NULL_RTX, 1, OPTAB_DIRECT)); + if (ac.aligned && MEM_P (new)) + { + newv = force_reg (SImode, val); + store_bit_field (newv, GET_MODE_BITSIZE (mode), 0, SImode, new); + } + else + newv = force_reg (SImode, expand_simple_binop (SImode, IOR, new, val, + NULL_RTX, 1, OPTAB_DIRECT)); + + /* Emit compare_and_swap pattern. */ + emit_insn (gen_sync_compare_and_swap_ccsi (res, ac.memsi, cmpv, newv)); + + /* Jump to end if we're done (likely?). */ + s390_emit_jump (csend, s390_emit_compare (EQ, cmpv, ac.memsi)); + + /* Check for changes outside mode. */ + resv = expand_simple_binop (SImode, AND, res, ac.modemaski, + NULL_RTX, 1, OPTAB_DIRECT); + cc = s390_emit_compare (NE, resv, val); + emit_move_insn (val, resv); + /* Loop internal if so. */ + s390_emit_jump (csloop, cc); + + emit_label (csend); + + /* Return the correct part of the bitfield. */ + convert_move (target, expand_simple_binop (SImode, LSHIFTRT, res, ac.shift, + NULL_RTX, 1, OPTAB_DIRECT), 1); +} + +/* Expand an atomic operation CODE of mode MODE. MEM is the memory location + and VAL the value to play with. If AFTER is true then store the the value + MEM holds after the operation, if AFTER is false then store the value MEM + holds before the operation. If TARGET is zero then discard that value, else + store it to TARGET. */ + +void +s390_expand_atomic (enum machine_mode mode, enum rtx_code code, + rtx target, rtx mem, rtx val, bool after) +{ + struct alignment_context ac; + rtx cmp; + rtx new = gen_reg_rtx (SImode); + rtx orig = gen_reg_rtx (SImode); + rtx csloop = gen_label_rtx (); + + gcc_assert (!target || register_operand (target, VOIDmode)); + gcc_assert (MEM_P (mem)); + + init_alignment_context (&ac, mem, mode); + + /* Shift val to the correct bit positions. + Preserve "icm", but prevent "ex icm". */ + if (!(ac.aligned && code == SET && MEM_P (val))) + val = s390_expand_mask_and_shift (val, mode, ac.shift); + + /* Further preparation insns. */ + if (code == PLUS || code == MINUS) + emit_move_insn (orig, val); + else if (code == MULT || code == AND) /* val = "11..111..1" */ + val = expand_simple_binop (SImode, XOR, val, ac.modemaski, + NULL_RTX, 1, OPTAB_DIRECT); + + /* Load full word. Subsequent loads are performed by CS. */ + cmp = force_reg (SImode, ac.memsi); + + /* Start CS loop. */ + emit_label (csloop); + emit_move_insn (new, cmp); + + /* Patch new with val at correct position. */ + switch (code) + { + case PLUS: + case MINUS: + val = expand_simple_binop (SImode, code, new, orig, + NULL_RTX, 1, OPTAB_DIRECT); + val = expand_simple_binop (SImode, AND, val, ac.modemask, + NULL_RTX, 1, OPTAB_DIRECT); + /* FALLTHRU */ + case SET: + if (ac.aligned && MEM_P (val)) + store_bit_field (new, GET_MODE_BITSIZE (mode), 0, SImode, val); + else + { + new = expand_simple_binop (SImode, AND, new, ac.modemaski, + NULL_RTX, 1, OPTAB_DIRECT); + new = expand_simple_binop (SImode, IOR, new, val, + NULL_RTX, 1, OPTAB_DIRECT); + } + break; + case AND: + case IOR: + case XOR: + new = expand_simple_binop (SImode, code, new, val, + NULL_RTX, 1, OPTAB_DIRECT); + break; + case MULT: /* NAND */ + new = expand_simple_binop (SImode, XOR, new, ac.modemask, + NULL_RTX, 1, OPTAB_DIRECT); + new = expand_simple_binop (SImode, AND, new, val, + NULL_RTX, 1, OPTAB_DIRECT); + break; + default: + gcc_unreachable (); + } + /* Emit compare_and_swap pattern. */ + emit_insn (gen_sync_compare_and_swap_ccsi (cmp, ac.memsi, cmp, new)); + + /* Loop until swapped (unlikely?). */ + s390_emit_jump (csloop, gen_rtx_fmt_ee (NE, CCZ1mode, + gen_rtx_REG (CCZ1mode, CC_REGNUM), + const0_rtx)); + + /* Return the correct part of the bitfield. */ + if (target) + convert_move (target, expand_simple_binop (SImode, LSHIFTRT, + after ? new : cmp, ac.shift, + NULL_RTX, 1, OPTAB_DIRECT), 1); +} + /* This is called from dwarf2out.c via TARGET_ASM_OUTPUT_DWARF_DTPREL. We need to emit DTP-relative relocations. */ @@ -3985,13 +4287,9 @@ print_shift_count_operand (FILE *file, rtx op) { HOST_WIDE_INT offset = 0; - /* Shift count operands are always truncated to the 6 least significant bits and - the setmem padding byte to the least 8 significant bits. Hence we can drop - pointless ANDs. */ - if (GET_CODE (op) == AND && GET_CODE (XEXP (op, 1)) == CONST_INT) - { - if ((INTVAL (XEXP (op, 1)) & 63) != 63) - gcc_unreachable (); + /* Extract base register and offset. */ + if (!s390_decompose_shift_count (op, &base, &offset)) + gcc_unreachable (); op = XEXP (op, 0); } @@ -7458,10 +7756,10 @@ s390_va_start (tree valist, rtx nextarg ATTRIBUTE_UNUSED) f_sav = TREE_CHAIN (f_ovf); valist = build_va_arg_indirect_ref (valist); - gpr = build (COMPONENT_REF, TREE_TYPE (f_gpr), valist, f_gpr, NULL_TREE); - fpr = build (COMPONENT_REF, TREE_TYPE (f_fpr), valist, f_fpr, NULL_TREE); - ovf = build (COMPONENT_REF, TREE_TYPE (f_ovf), valist, f_ovf, NULL_TREE); - sav = build (COMPONENT_REF, TREE_TYPE (f_sav), valist, f_sav, NULL_TREE); + gpr = build3 (COMPONENT_REF, TREE_TYPE (f_gpr), valist, f_gpr, NULL_TREE); + fpr = build3 (COMPONENT_REF, TREE_TYPE (f_fpr), valist, f_fpr, NULL_TREE); + ovf = build3 (COMPONENT_REF, TREE_TYPE (f_ovf), valist, f_ovf, NULL_TREE); + sav = build3 (COMPONENT_REF, TREE_TYPE (f_sav), valist, f_sav, NULL_TREE); /* Count number of gp and fp argument registers used. */ @@ -7470,16 +7768,16 @@ s390_va_start (tree valist, rtx nextarg ATTRIBUTE_UNUSED) if (cfun->va_list_gpr_size) { - t = build (MODIFY_EXPR, TREE_TYPE (gpr), gpr, - build_int_cst (NULL_TREE, n_gpr)); + t = build2 (MODIFY_EXPR, TREE_TYPE (gpr), gpr, + build_int_cst (NULL_TREE, n_gpr)); TREE_SIDE_EFFECTS (t) = 1; expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL); } if (cfun->va_list_fpr_size) { - t = build (MODIFY_EXPR, TREE_TYPE (fpr), fpr, - build_int_cst (NULL_TREE, n_fpr)); + t = build2 (MODIFY_EXPR, TREE_TYPE (fpr), fpr, + build_int_cst (NULL_TREE, n_fpr)); TREE_SIDE_EFFECTS (t) = 1; expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL); } @@ -7496,9 +7794,9 @@ s390_va_start (tree valist, rtx nextarg ATTRIBUTE_UNUSED) fprintf (stderr, "va_start: n_gpr = %d, n_fpr = %d off %d\n", (int)n_gpr, (int)n_fpr, off); - t = build (PLUS_EXPR, TREE_TYPE (ovf), t, build_int_cst (NULL_TREE, off)); + t = build2 (PLUS_EXPR, TREE_TYPE (ovf), t, build_int_cst (NULL_TREE, off)); - t = build (MODIFY_EXPR, TREE_TYPE (ovf), ovf, t); + t = build2 (MODIFY_EXPR, TREE_TYPE (ovf), ovf, t); TREE_SIDE_EFFECTS (t) = 1; expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL); } @@ -7508,10 +7806,10 @@ s390_va_start (tree valist, rtx nextarg ATTRIBUTE_UNUSED) || (cfun->va_list_fpr_size && n_fpr < FP_ARG_NUM_REG)) { t = make_tree (TREE_TYPE (sav), return_address_pointer_rtx); - t = build (PLUS_EXPR, TREE_TYPE (sav), t, - build_int_cst (NULL_TREE, -RETURN_REGNUM * UNITS_PER_WORD)); + t = build2 (PLUS_EXPR, TREE_TYPE (sav), t, + build_int_cst (NULL_TREE, -RETURN_REGNUM * UNITS_PER_WORD)); - t = build (MODIFY_EXPR, TREE_TYPE (sav), sav, t); + t = build2 (MODIFY_EXPR, TREE_TYPE (sav), sav, t); TREE_SIDE_EFFECTS (t) = 1; expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL); } @@ -7556,10 +7854,10 @@ s390_gimplify_va_arg (tree valist, tree type, tree *pre_p, f_sav = TREE_CHAIN (f_ovf); valist = build_va_arg_indirect_ref (valist); - gpr = build (COMPONENT_REF, TREE_TYPE (f_gpr), valist, f_gpr, NULL_TREE); - fpr = build (COMPONENT_REF, TREE_TYPE (f_fpr), valist, f_fpr, NULL_TREE); - ovf = build (COMPONENT_REF, TREE_TYPE (f_ovf), valist, f_ovf, NULL_TREE); - sav = build (COMPONENT_REF, TREE_TYPE (f_sav), valist, f_sav, NULL_TREE); + gpr = build3 (COMPONENT_REF, TREE_TYPE (f_gpr), valist, f_gpr, NULL_TREE); + fpr = build3 (COMPONENT_REF, TREE_TYPE (f_fpr), valist, f_fpr, NULL_TREE); + ovf = build3 (COMPONENT_REF, TREE_TYPE (f_ovf), valist, f_ovf, NULL_TREE); + sav = build3 (COMPONENT_REF, TREE_TYPE (f_sav), valist, f_sav, NULL_TREE); size = int_size_in_bytes (type); @@ -8313,7 +8611,7 @@ s390_function_ok_for_sibcall (tree decl, tree exp) /* The 31 bit PLT code uses register 12 (GOT pointer - caller saved) which would have to be restored before the sibcall. */ - if (!TARGET_64BIT && flag_pic && decl && TREE_PUBLIC (decl)) + if (!TARGET_64BIT && flag_pic && decl && !targetm.binds_local_p (decl)) return false; /* Register 6 on s390 is available as an argument register but unfortunately diff --git a/gcc/config/s390/s390.md b/gcc/config/s390/s390.md index bc9e4c36262..d4e515c50e8 100644 --- a/gcc/config/s390/s390.md +++ b/gcc/config/s390/s390.md @@ -213,45 +213,15 @@ ;; reg: Instruction does not use the agen unit (define_attr "atype" "agen,reg" - (cond [(eq_attr "op_type" "E") (const_string "reg") - (eq_attr "op_type" "RR") (const_string "reg") - (eq_attr "op_type" "RX") (const_string "agen") - (eq_attr "op_type" "RI") (const_string "reg") - (eq_attr "op_type" "RRE") (const_string "reg") - (eq_attr "op_type" "RS") (const_string "agen") - (eq_attr "op_type" "RSI") (const_string "agen") - (eq_attr "op_type" "S") (const_string "agen") - (eq_attr "op_type" "SI") (const_string "agen") - (eq_attr "op_type" "SS") (const_string "agen") - (eq_attr "op_type" "SSE") (const_string "agen") - (eq_attr "op_type" "RXE") (const_string "agen") - (eq_attr "op_type" "RSE") (const_string "agen") - (eq_attr "op_type" "RIL") (const_string "agen") - (eq_attr "op_type" "RXY") (const_string "agen") - (eq_attr "op_type" "RSY") (const_string "agen") - (eq_attr "op_type" "SIY") (const_string "agen")] - (const_string "agen"))) + (if_then_else (eq_attr "op_type" "E,RR,RI,RRE") + (const_string "reg") + (const_string "agen"))) ;; Length in bytes. (define_attr "length" "" - (cond [(eq_attr "op_type" "E") (const_int 2) - (eq_attr "op_type" "RR") (const_int 2) - (eq_attr "op_type" "RX") (const_int 4) - (eq_attr "op_type" "RI") (const_int 4) - (eq_attr "op_type" "RRE") (const_int 4) - (eq_attr "op_type" "RS") (const_int 4) - (eq_attr "op_type" "RSI") (const_int 4) - (eq_attr "op_type" "S") (const_int 4) - (eq_attr "op_type" "SI") (const_int 4) - (eq_attr "op_type" "SS") (const_int 6) - (eq_attr "op_type" "SSE") (const_int 6) - (eq_attr "op_type" "RXE") (const_int 6) - (eq_attr "op_type" "RSE") (const_int 6) - (eq_attr "op_type" "RIL") (const_int 6) - (eq_attr "op_type" "RXY") (const_int 6) - (eq_attr "op_type" "RSY") (const_int 6) - (eq_attr "op_type" "SIY") (const_int 6)] + (cond [(eq_attr "op_type" "E,RR") (const_int 2) + (eq_attr "op_type" "RX,RI,RRE,RS,RSI,S,SI") (const_int 4)] (const_int 6))) @@ -315,6 +285,11 @@ ;; the same template. (define_code_macro SHIFT [ashift lshiftrt]) +;; These macros allow to combine most atomic operations. +(define_code_macro ATOMIC [and ior xor plus minus mult]) +(define_code_attr atomic [(and "and") (ior "ior") (xor "xor") + (plus "add") (minus "sub") (mult "nand")]) + ;; In FPR templates, a string like "ltbr" will expand to "ltdbr" in DFmode ;; and "ltebr" in SFmode. @@ -324,6 +299,16 @@ ;; and "meebr" in SFmode. This is needed for the 'mul3' pattern. (define_mode_attr dee [(DF "d") (SF "ee")]) +;; In GPR and P templates, a constraint like "" will expand to "d" in DImode +;; and "0" in SImode. This allows to combine instructions of which the 31bit +;; version only operates on one register. +(define_mode_attr d0 [(DI "d") (SI "0")]) + +;; In combination with d0 this allows to combine instructions of which the 31bit +;; version only operates on one register. The DImode version needs an additional +;; register for the assembler output. +(define_mode_attr 1 [(DI "%1,") (SI "")]) + ;; In SHIFT templates, a string like "sdl" will expand to "sldl" in ;; 'ashift' and "srdl" in 'lshiftrt'. (define_code_attr lr [(ashift "l") (lshiftrt "r")]) @@ -445,7 +430,11 @@ [(set_attr "op_type" "RI")]) +; ; Load-and-Test instructions +; + +; tst(di|si) intruction pattern(s). (define_insn "*tstdi_sign" [(set (reg CC_REGNUM) @@ -458,28 +447,28 @@ "ltgfr\t%2,%0" [(set_attr "op_type" "RRE")]) -(define_insn "*tstdi_extimm" +(define_insn "*tst_extimm" [(set (reg CC_REGNUM) - (compare (match_operand:DI 0 "nonimmediate_operand" "d,m") - (match_operand:DI 1 "const0_operand" ""))) - (set (match_operand:DI 2 "register_operand" "=d,d") + (compare (match_operand:GPR 0 "nonimmediate_operand" "d,m") + (match_operand:GPR 1 "const0_operand" ""))) + (set (match_operand:GPR 2 "register_operand" "=d,d") (match_dup 0))] - "s390_match_ccmode(insn, CCSmode) && TARGET_64BIT && TARGET_EXTIMM" + "s390_match_ccmode(insn, CCSmode) && TARGET_EXTIMM" "@ - ltgr\t%2,%0 - ltg\t%2,%0" - [(set_attr "op_type" "RRE,RXY")]) + ltr\t%2,%0 + lt\t%2,%0" + [(set_attr "op_type" "RR,RXY")]) -(define_insn "*tstdi_cconly_extimm" +(define_insn "*tst_cconly_extimm" [(set (reg CC_REGNUM) - (compare (match_operand:DI 0 "nonimmediate_operand" "d,m") - (match_operand:DI 1 "const0_operand" ""))) - (clobber (match_scratch:DI 2 "=X,d"))] - "s390_match_ccmode(insn, CCSmode) && TARGET_64BIT && TARGET_EXTIMM" + (compare (match_operand:GPR 0 "nonimmediate_operand" "d,m") + (match_operand:GPR 1 "const0_operand" ""))) + (clobber (match_scratch:GPR 2 "=X,d"))] + "s390_match_ccmode(insn, CCSmode) && TARGET_EXTIMM" "@ - ltgr\t%0,%0 - ltg\t%2,%0" - [(set_attr "op_type" "RRE,RXY")]) + ltr\t%0,%0 + lt\t%2,%0" + [(set_attr "op_type" "RR,RXY")]) (define_insn "*tstdi" [(set (reg CC_REGNUM) @@ -491,46 +480,6 @@ "ltgr\t%2,%0" [(set_attr "op_type" "RRE")]) -(define_insn "*tstdi_cconly" - [(set (reg CC_REGNUM) - (compare (match_operand:DI 0 "register_operand" "d") - (match_operand:DI 1 "const0_operand" "")))] - "s390_match_ccmode(insn, CCSmode) && TARGET_64BIT" - "ltgr\t%0,%0" - [(set_attr "op_type" "RRE")]) - -(define_insn "*tstdi_cconly_31" - [(set (reg CC_REGNUM) - (compare (match_operand:DI 0 "register_operand" "d") - (match_operand:DI 1 "const0_operand" "")))] - "s390_match_ccmode(insn, CCSmode) && !TARGET_64BIT" - "srda\t%0,0" - [(set_attr "op_type" "RS") - (set_attr "atype" "reg")]) - -(define_insn "*tstsi_extimm" - [(set (reg CC_REGNUM) - (compare (match_operand:SI 0 "nonimmediate_operand" "d,m") - (match_operand:SI 1 "const0_operand" ""))) - (set (match_operand:SI 2 "register_operand" "=d,d") - (match_dup 0))] - "s390_match_ccmode(insn, CCSmode) && TARGET_EXTIMM" - "@ - ltr\t%2,%0 - lt\t%2,%0" - [(set_attr "op_type" "RR,RXY")]) - -(define_insn "*tstsi_cconly_extimm" - [(set (reg CC_REGNUM) - (compare (match_operand:SI 0 "nonimmediate_operand" "d,m") - (match_operand:SI 1 "const0_operand" ""))) - (clobber (match_scratch:SI 2 "=X,d"))] - "s390_match_ccmode(insn, CCSmode) && TARGET_EXTIMM" - "@ - ltr\t%0,%0 - lt\t%2,%0" - [(set_attr "op_type" "RR,RXY")]) - (define_insn "*tstsi" [(set (reg CC_REGNUM) (compare (match_operand:SI 0 "nonimmediate_operand" "d,Q,S") @@ -556,13 +505,24 @@ icmy\t%2,15,%S0" [(set_attr "op_type" "RR,RS,RSY")]) -(define_insn "*tstsi_cconly2" +(define_insn "*tstdi_cconly_31" + [(set (reg CC_REGNUM) + (compare (match_operand:DI 0 "register_operand" "d") + (match_operand:DI 1 "const0_operand" "")))] + "s390_match_ccmode(insn, CCSmode) && !TARGET_64BIT" + "srda\t%0,0" + [(set_attr "op_type" "RS") + (set_attr "atype" "reg")]) + +(define_insn "*tst_cconly2" [(set (reg CC_REGNUM) - (compare (match_operand:SI 0 "register_operand" "d") - (match_operand:SI 1 "const0_operand" "")))] + (compare (match_operand:GPR 0 "register_operand" "d") + (match_operand:GPR 1 "const0_operand" "")))] "s390_match_ccmode(insn, CCSmode)" - "ltr\t%0,%0" - [(set_attr "op_type" "RR")]) + "ltr\t%0,%0" + [(set_attr "op_type" "RR")]) + +; tst(hi|qi) intruction pattern(s). (define_insn "*tstCCT" [(set (reg CC_REGNUM) @@ -2217,7 +2177,7 @@ [(parallel [(clobber (match_dup 1)) (set (match_operand:BLK 0 "memory_operand" "") - (match_operand 2 "setmem_operand" "")) + (match_operand 2 "shift_count_or_setmem_operand" "")) (use (match_operand 1 "general_operand" "")) (use (match_dup 3)) (clobber (reg:CC CC_REGNUM))])] @@ -2243,7 +2203,7 @@ (define_insn "*setmem_long" [(clobber (match_operand: 0 "register_operand" "=d")) (set (mem:BLK (subreg:P (match_operand: 3 "register_operand" "0") 0)) - (match_operand 2 "setmem_operand" "Y")) + (match_operand 2 "shift_count_or_setmem_operand" "Y")) (use (match_dup 3)) (use (match_operand: 1 "register_operand" "d")) (clobber (reg:CC CC_REGNUM))] @@ -2252,6 +2212,18 @@ [(set_attr "length" "8") (set_attr "type" "vs")]) +(define_insn "*setmem_long_and" + [(clobber (match_operand: 0 "register_operand" "=d")) + (set (mem:BLK (subreg:P (match_operand: 3 "register_operand" "0") 0)) + (and (match_operand 2 "shift_count_or_setmem_operand" "Y") + (match_operand 4 "const_int_operand" "n"))) + (use (match_dup 3)) + (use (match_operand: 1 "register_operand" "d")) + (clobber (reg:CC CC_REGNUM))] + "(INTVAL (operands[4]) & 255) == 255" + "mvcle\t%0,%1,%Y2\;jo\t.-4" + [(set_attr "length" "8") + (set_attr "type" "vs")]) ; ; cmpmemM instruction pattern(s). ; @@ -2598,7 +2570,7 @@ [(set (zero_extract:P (match_operand:P 0 "register_operand" "+d") (const_int 16) (match_operand 1 "const_int_operand" "n")) - (match_operand:P 2 "const_int_operand" "K"))] + (match_operand:P 2 "const_int_operand" "n"))] "TARGET_ZARCH && INTVAL (operands[1]) >= 0 && INTVAL (operands[1]) < BITS_PER_WORD @@ -2619,7 +2591,7 @@ [(set (zero_extract:P (match_operand:P 0 "register_operand" "+d") (const_int 32) (match_operand 1 "const_int_operand" "n")) - (match_operand:P 2 "const_int_operand" "Os"))] + (match_operand:P 2 "const_int_operand" "n"))] "TARGET_EXTIMM && INTVAL (operands[1]) >= 0 && INTVAL (operands[1]) < BITS_PER_WORD @@ -2663,32 +2635,37 @@ [(set_attr "op_type" "RRE,RXY")]) ; -; extend(hi|qi)di2 instruction pattern(s). +; extend(hi|qi)(si|di)2 instruction pattern(s). ; -(define_expand "extenddi2" - [(set (match_operand:DI 0 "register_operand" "") - (sign_extend:DI (match_operand:HQI 1 "nonimmediate_operand" "")))] +(define_expand "extend2" + [(set (match_operand:DSI 0 "register_operand" "") + (sign_extend:DSI (match_operand:HQI 1 "nonimmediate_operand" "")))] "" { - if (!TARGET_64BIT) + if (mode == DImode && !TARGET_64BIT) { rtx tmp = gen_reg_rtx (SImode); - emit_insn (gen_extendsi2 (tmp, operands[1])); + emit_insn (gen_extendsi2 (tmp, operands[1])); emit_insn (gen_extendsidi2 (operands[0], tmp)); DONE; } else if (!TARGET_EXTIMM) { - rtx bitcount = GEN_INT (GET_MODE_BITSIZE (DImode) - - GET_MODE_BITSIZE (mode)); - operands[1] = gen_lowpart (DImode, operands[1]); - emit_insn (gen_ashldi3 (operands[0], operands[1], bitcount)); - emit_insn (gen_ashrdi3 (operands[0], operands[0], bitcount)); + rtx bitcount = GEN_INT (GET_MODE_BITSIZE (mode) - + GET_MODE_BITSIZE (mode)); + + operands[1] = gen_lowpart (mode, operands[1]); + emit_insn (gen_ashl3 (operands[0], operands[1], bitcount)); + emit_insn (gen_ashr3 (operands[0], operands[0], bitcount)); DONE; } }) +; +; extendhidi2 instruction pattern(s). +; + (define_insn "*extendhidi2_extimm" [(set (match_operand:DI 0 "register_operand" "=d,d") (sign_extend:DI (match_operand:HI 1 "nonimmediate_operand" "d,m")))] @@ -2705,60 +2682,10 @@ "lgh\t%0,%1" [(set_attr "op_type" "RXY")]) -(define_insn "*extendqidi2_extimm" - [(set (match_operand:DI 0 "register_operand" "=d,d") - (sign_extend:DI (match_operand:QI 1 "nonimmediate_operand" "d,m")))] - "TARGET_64BIT && TARGET_EXTIMM" - "@ - lgbr\t%0,%1 - lgb\t%0,%1" - [(set_attr "op_type" "RRE,RXY")]) - -(define_insn "*extendqidi2" - [(set (match_operand:DI 0 "register_operand" "=d") - (sign_extend:DI (match_operand:QI 1 "memory_operand" "m")))] - "TARGET_64BIT && TARGET_LONG_DISPLACEMENT" - "lgb\t%0,%1" - [(set_attr "op_type" "RXY")]) - -(define_insn_and_split "*extendqidi2_short_displ" - [(set (match_operand:DI 0 "register_operand" "=d") - (sign_extend:DI (match_operand:QI 1 "s_operand" "Q"))) - (clobber (reg:CC CC_REGNUM))] - "TARGET_64BIT && !TARGET_LONG_DISPLACEMENT" - "#" - "&& reload_completed" - [(parallel - [(set (match_dup 0) (unspec:DI [(match_dup 1) (const_int 8)] UNSPEC_ICM)) - (clobber (reg:CC CC_REGNUM))]) - (parallel - [(set (match_dup 0) (ashiftrt:DI (match_dup 0) (const_int 56))) - (clobber (reg:CC CC_REGNUM))])] -{ - operands[1] = adjust_address (operands[1], BLKmode, 0); - set_mem_size (operands[1], GEN_INT (GET_MODE_SIZE (QImode))); -}) - ; -; extend(hi|qi)si2 instruction pattern(s). +; extendhisi2 instruction pattern(s). ; -(define_expand "extendsi2" - [(set (match_operand:SI 0 "register_operand" "") - (sign_extend:SI (match_operand:HQI 1 "nonimmediate_operand" "")))] - "" -{ - if (!TARGET_EXTIMM) - { - rtx bitcount = GEN_INT (GET_MODE_BITSIZE(SImode) - - GET_MODE_BITSIZE(mode)); - operands[1] = gen_lowpart (SImode, operands[1]); - emit_insn (gen_ashlsi3 (operands[0], operands[1], bitcount)); - emit_insn (gen_ashrsi3 (operands[0], operands[0], bitcount)); - DONE; - } -}) - (define_insn "*extendhisi2_extimm" [(set (match_operand:SI 0 "register_operand" "=d,d,d") (sign_extend:SI (match_operand:HI 1 "nonimmediate_operand" "d,R,T")))] @@ -2778,38 +2705,44 @@ lhy\t%0,%1" [(set_attr "op_type" "RX,RXY")]) -(define_insn "*extendqisi2_extimm" - [(set (match_operand:SI 0 "register_operand" "=d,d") - (sign_extend:SI (match_operand:QI 1 "nonimmediate_operand" "d,m")))] +; +; extendqi(si|di)2 instruction pattern(s). +; + +(define_insn "*extendqi2_extimm" + [(set (match_operand:GPR 0 "register_operand" "=d,d") + (sign_extend:GPR (match_operand:QI 1 "nonimmediate_operand" "d,m")))] "TARGET_EXTIMM" "@ - lbr\t%0,%1 - lb\t%0,%1" + lbr\t%0,%1 + lb\t%0,%1" [(set_attr "op_type" "RRE,RXY")]) -(define_insn "*extendqisi2" - [(set (match_operand:SI 0 "register_operand" "=d") - (sign_extend:SI (match_operand:QI 1 "memory_operand" "m")))] - "TARGET_LONG_DISPLACEMENT && !TARGET_EXTIMM" - "lb\t%0,%1" +(define_insn "*extendqi2" + [(set (match_operand:GPR 0 "register_operand" "=d") + (sign_extend:GPR (match_operand:QI 1 "memory_operand" "m")))] + "!TARGET_EXTIMM && TARGET_LONG_DISPLACEMENT" + "lb\t%0,%1" [(set_attr "op_type" "RXY")]) -(define_insn_and_split "*extendqisi2_short_displ" - [(set (match_operand:SI 0 "register_operand" "=d") - (sign_extend:SI (match_operand:QI 1 "s_operand" "Q"))) +(define_insn_and_split "*extendqi2_short_displ" + [(set (match_operand:GPR 0 "register_operand" "=d") + (sign_extend:GPR (match_operand:QI 1 "s_operand" "Q"))) (clobber (reg:CC CC_REGNUM))] - "!TARGET_LONG_DISPLACEMENT" + "!TARGET_EXTIMM && !TARGET_LONG_DISPLACEMENT" "#" "&& reload_completed" [(parallel - [(set (match_dup 0) (unspec:SI [(match_dup 1) (const_int 8)] UNSPEC_ICM)) + [(set (match_dup 0) (unspec:GPR [(match_dup 1) (const_int 8)] UNSPEC_ICM)) (clobber (reg:CC CC_REGNUM))]) (parallel - [(set (match_dup 0) (ashiftrt:SI (match_dup 0) (const_int 24))) + [(set (match_dup 0) (ashiftrt:GPR (match_dup 0) (match_dup 2))) (clobber (reg:CC CC_REGNUM))])] { operands[1] = adjust_address (operands[1], BLKmode, 0); set_mem_size (operands[1], GEN_INT (GET_MODE_SIZE (QImode))); + operands[2] = GEN_INT (GET_MODE_BITSIZE (mode) + - GET_MODE_BITSIZE (QImode)); }) ; @@ -2845,49 +2778,6 @@ [(set_attr "op_type" "RRE,RXY")]) ; -; zero_extend(hi|qi)di2 instruction pattern(s). -; - -(define_expand "zero_extenddi2" - [(set (match_operand:DI 0 "register_operand" "") - (zero_extend:DI (match_operand:HQI 1 "nonimmediate_operand" "")))] - "" -{ - if (!TARGET_64BIT) - { - rtx tmp = gen_reg_rtx (SImode); - emit_insn (gen_zero_extendsi2 (tmp, operands[1])); - emit_insn (gen_zero_extendsidi2 (operands[0], tmp)); - DONE; - } - else if (!TARGET_EXTIMM) - { - rtx bitcount = GEN_INT (GET_MODE_BITSIZE(DImode) - - GET_MODE_BITSIZE(mode)); - operands[1] = gen_lowpart (DImode, operands[1]); - emit_insn (gen_ashldi3 (operands[0], operands[1], bitcount)); - emit_insn (gen_lshrdi3 (operands[0], operands[0], bitcount)); - DONE; - } -}) - -(define_insn "*zero_extenddi2_extimm" - [(set (match_operand:DI 0 "register_operand" "=d,d") - (zero_extend:DI (match_operand:HQI 1 "nonimmediate_operand" "d,m")))] - "TARGET_64BIT && TARGET_EXTIMM" - "@ - llgr\t%0,%1 - llg\t%0,%1" - [(set_attr "op_type" "RRE,RXY")]) - -(define_insn "*zero_extenddi2" - [(set (match_operand:DI 0 "register_operand" "=d") - (zero_extend:DI (match_operand:HQI 1 "memory_operand" "m")))] - "TARGET_64BIT && !TARGET_EXTIMM" - "llg\t%0,%1" - [(set_attr "op_type" "RXY")]) - -; ; LLGT-type instructions (zero-extend from 31 bit to 64 bit). ; @@ -2944,9 +2834,32 @@ "") ; -; zero_extend(hi|qi)si2 instruction pattern(s). +; zero_extend(hi|qi)(si|di)2 instruction pattern(s). ; +(define_expand "zero_extenddi2" + [(set (match_operand:DI 0 "register_operand" "") + (zero_extend:DI (match_operand:HQI 1 "nonimmediate_operand" "")))] + "" +{ + if (!TARGET_64BIT) + { + rtx tmp = gen_reg_rtx (SImode); + emit_insn (gen_zero_extendsi2 (tmp, operands[1])); + emit_insn (gen_zero_extendsidi2 (operands[0], tmp)); + DONE; + } + else if (!TARGET_EXTIMM) + { + rtx bitcount = GEN_INT (GET_MODE_BITSIZE(DImode) - + GET_MODE_BITSIZE(mode)); + operands[1] = gen_lowpart (DImode, operands[1]); + emit_insn (gen_ashldi3 (operands[0], operands[1], bitcount)); + emit_insn (gen_lshrdi3 (operands[0], operands[0], bitcount)); + DONE; + } +}) + (define_expand "zero_extendsi2" [(set (match_operand:SI 0 "register_operand" "") (zero_extend:SI (match_operand:HQI 1 "nonimmediate_operand" "")))] @@ -2958,21 +2871,21 @@ emit_insn (gen_andsi3 (operands[0], operands[1], GEN_INT ((1 << GET_MODE_BITSIZE(mode)) - 1))); DONE; -} + } }) -(define_insn "*zero_extendsi2_extimm" - [(set (match_operand:SI 0 "register_operand" "=d,d") - (zero_extend:SI (match_operand:HQI 1 "nonimmediate_operand" "d,m")))] +(define_insn "*zero_extend2_extimm" + [(set (match_operand:GPR 0 "register_operand" "=d,d") + (zero_extend:GPR (match_operand:HQI 1 "nonimmediate_operand" "d,m")))] "TARGET_EXTIMM" "@ - llr\t%0,%1 - ll\t%0,%1" + llr\t%0,%1 + ll\t%0,%1" [(set_attr "op_type" "RRE,RXY")]) -(define_insn "*zero_extendsi2_64" - [(set (match_operand:SI 0 "register_operand" "=d") - (zero_extend:SI (match_operand:HQI 1 "memory_operand" "m")))] +(define_insn "*zero_extend2" + [(set (match_operand:GPR 0 "register_operand" "=d") + (zero_extend:GPR (match_operand:HQI 1 "memory_operand" "m")))] "TARGET_ZARCH && !TARGET_EXTIMM" "llg\t%0,%1" [(set_attr "op_type" "RXY")]) @@ -6258,55 +6171,85 @@ (define_insn "rotl3" [(set (match_operand:GPR 0 "register_operand" "=d") (rotate:GPR (match_operand:GPR 1 "register_operand" "d") - (match_operand:SI 2 "shift_count_operand" "Y")))] + (match_operand:SI 2 "shift_count_or_setmem_operand" "Y")))] "TARGET_CPU_ZARCH" "rll\t%0,%1,%Y2" [(set_attr "op_type" "RSE") (set_attr "atype" "reg")]) +(define_insn "*rotl3_and" + [(set (match_operand:GPR 0 "register_operand" "=d") + (rotate:GPR (match_operand:GPR 1 "register_operand" "d") + (and:SI (match_operand:SI 2 "shift_count_or_setmem_operand" "Y") + (match_operand:SI 3 "const_int_operand" "n"))))] + "TARGET_CPU_ZARCH && (INTVAL (operands[3]) & 63) == 63" + "rll\t%0,%1,%Y2" + [(set_attr "op_type" "RSE") + (set_attr "atype" "reg")]) + ;; ;;- Shift instructions. ;; ; -; (ashl|lshr)di3 instruction pattern(s). +; (ashl|lshr)(di|si)3 instruction pattern(s). ; -(define_expand "di3" - [(set (match_operand:DI 0 "register_operand" "") - (SHIFT:DI (match_operand:DI 1 "register_operand" "") - (match_operand:SI 2 "shift_count_operand" "")))] +(define_expand "3" + [(set (match_operand:DSI 0 "register_operand" "") + (SHIFT:DSI (match_operand:DSI 1 "register_operand" "") + (match_operand:SI 2 "shift_count_or_setmem_operand" "")))] "" "") (define_insn "*di3_31" [(set (match_operand:DI 0 "register_operand" "=d") (SHIFT:DI (match_operand:DI 1 "register_operand" "0") - (match_operand:SI 2 "shift_count_operand" "Y")))] + (match_operand:SI 2 "shift_count_or_setmem_operand" "Y")))] "!TARGET_64BIT" "sdl\t%0,%Y2" [(set_attr "op_type" "RS") (set_attr "atype" "reg")]) -(define_insn "*di3_64" +(define_insn "*3" + [(set (match_operand:GPR 0 "register_operand" "=d") + (SHIFT:GPR (match_operand:GPR 1 "register_operand" "") + (match_operand:SI 2 "shift_count_or_setmem_operand" "Y")))] + "" + "sl\t%0,<1>%Y2" + [(set_attr "op_type" "RS") + (set_attr "atype" "reg")]) + +(define_insn "*di3_31_and" [(set (match_operand:DI 0 "register_operand" "=d") - (SHIFT:DI (match_operand:DI 1 "register_operand" "d") - (match_operand:SI 2 "shift_count_operand" "Y")))] - "TARGET_64BIT" - "slg\t%0,%1,%Y2" - [(set_attr "op_type" "RSE") + (SHIFT:DI (match_operand:DI 1 "register_operand" "0") + (and:SI (match_operand:SI 2 "shift_count_or_setmem_operand" "Y") + (match_operand:SI 3 "const_int_operand" "n"))))] + "!TARGET_64BIT && (INTVAL (operands[3]) & 63) == 63" + "sdl\t%0,%Y2" + [(set_attr "op_type" "RS") + (set_attr "atype" "reg")]) + +(define_insn "*3_and" + [(set (match_operand:GPR 0 "register_operand" "=d") + (SHIFT:GPR (match_operand:GPR 1 "register_operand" "") + (and:SI (match_operand:SI 2 "shift_count_or_setmem_operand" "Y") + (match_operand:SI 3 "const_int_operand" "n"))))] + "(INTVAL (operands[3]) & 63) == 63" + "sl\t%0,<1>%Y2" + [(set_attr "op_type" "RS") (set_attr "atype" "reg")]) ; -; ashrdi3 instruction pattern(s). +; ashr(di|si)3 instruction pattern(s). ; -(define_expand "ashrdi3" +(define_expand "ashr3" [(parallel - [(set (match_operand:DI 0 "register_operand" "") - (ashiftrt:DI (match_operand:DI 1 "register_operand" "") - (match_operand:SI 2 "shift_count_operand" ""))) + [(set (match_operand:DSI 0 "register_operand" "") + (ashiftrt:DSI (match_operand:DSI 1 "register_operand" "") + (match_operand:SI 2 "shift_count_or_setmem_operand" ""))) (clobber (reg:CC CC_REGNUM))])] "" "") @@ -6314,7 +6257,7 @@ (define_insn "*ashrdi3_cc_31" [(set (reg CC_REGNUM) (compare (ashiftrt:DI (match_operand:DI 1 "register_operand" "0") - (match_operand:SI 2 "shift_count_operand" "Y")) + (match_operand:SI 2 "shift_count_or_setmem_operand" "Y")) (const_int 0))) (set (match_operand:DI 0 "register_operand" "=d") (ashiftrt:DI (match_dup 1) (match_dup 2)))] @@ -6326,7 +6269,7 @@ (define_insn "*ashrdi3_cconly_31" [(set (reg CC_REGNUM) (compare (ashiftrt:DI (match_operand:DI 1 "register_operand" "0") - (match_operand:SI 2 "shift_count_operand" "Y")) + (match_operand:SI 2 "shift_count_or_setmem_operand" "Y")) (const_int 0))) (clobber (match_scratch:DI 0 "=d"))] "!TARGET_64BIT && s390_match_ccmode(insn, CCSmode)" @@ -6337,96 +6280,121 @@ (define_insn "*ashrdi3_31" [(set (match_operand:DI 0 "register_operand" "=d") (ashiftrt:DI (match_operand:DI 1 "register_operand" "0") - (match_operand:SI 2 "shift_count_operand" "Y"))) + (match_operand:SI 2 "shift_count_or_setmem_operand" "Y"))) (clobber (reg:CC CC_REGNUM))] "!TARGET_64BIT" "srda\t%0,%Y2" [(set_attr "op_type" "RS") (set_attr "atype" "reg")]) -(define_insn "*ashrdi3_cc_64" +(define_insn "*ashr3_cc" [(set (reg CC_REGNUM) - (compare (ashiftrt:DI (match_operand:DI 1 "register_operand" "d") - (match_operand:SI 2 "shift_count_operand" "Y")) + (compare (ashiftrt:GPR (match_operand:GPR 1 "register_operand" "") + (match_operand:SI 2 "shift_count_or_setmem_operand" "Y")) (const_int 0))) - (set (match_operand:DI 0 "register_operand" "=d") - (ashiftrt:DI (match_dup 1) (match_dup 2)))] - "s390_match_ccmode(insn, CCSmode) && TARGET_64BIT" - "srag\t%0,%1,%Y2" - [(set_attr "op_type" "RSE") + (set (match_operand:GPR 0 "register_operand" "=d") + (ashiftrt:GPR (match_dup 1) (match_dup 2)))] + "s390_match_ccmode(insn, CCSmode)" + "sra\t%0,<1>%Y2" + [(set_attr "op_type" "RS") (set_attr "atype" "reg")]) -(define_insn "*ashrdi3_cconly_64" +(define_insn "*ashr3_cconly" [(set (reg CC_REGNUM) - (compare (ashiftrt:DI (match_operand:DI 1 "register_operand" "d") - (match_operand:SI 2 "shift_count_operand" "Y")) + (compare (ashiftrt:GPR (match_operand:GPR 1 "register_operand" "") + (match_operand:SI 2 "shift_count_or_setmem_operand" "Y")) (const_int 0))) - (clobber (match_scratch:DI 0 "=d"))] - "s390_match_ccmode(insn, CCSmode) && TARGET_64BIT" - "srag\t%0,%1,%Y2" - [(set_attr "op_type" "RSE") + (clobber (match_scratch:GPR 0 "=d"))] + "s390_match_ccmode(insn, CCSmode)" + "sra\t%0,<1>%Y2" + [(set_attr "op_type" "RS") (set_attr "atype" "reg")]) -(define_insn "*ashrdi3_64" - [(set (match_operand:DI 0 "register_operand" "=d") - (ashiftrt:DI (match_operand:DI 1 "register_operand" "d") - (match_operand:SI 2 "shift_count_operand" "Y"))) +(define_insn "*ashr3" + [(set (match_operand:GPR 0 "register_operand" "=d") + (ashiftrt:GPR (match_operand:GPR 1 "register_operand" "") + (match_operand:SI 2 "shift_count_or_setmem_operand" "Y"))) (clobber (reg:CC CC_REGNUM))] - "TARGET_64BIT" - "srag\t%0,%1,%Y2" - [(set_attr "op_type" "RSE") + "" + "sra\t%0,<1>%Y2" + [(set_attr "op_type" "RS") (set_attr "atype" "reg")]) -; -; (ashl|lshr)si3 instruction pattern(s). -; +; shift pattern with implicit ANDs -(define_insn "si3" - [(set (match_operand:SI 0 "register_operand" "=d") - (SHIFT:SI (match_operand:SI 1 "register_operand" "0") - (match_operand:SI 2 "shift_count_operand" "Y")))] - "" - "sl\t%0,%Y2" +(define_insn "*ashrdi3_cc_31_and" + [(set (reg CC_REGNUM) + (compare (ashiftrt:DI (match_operand:DI 1 "register_operand" "0") + (and:SI (match_operand:SI 2 "shift_count_or_setmem_operand" "Y") + (match_operand:SI 3 "const_int_operand" "n"))) + (const_int 0))) + (set (match_operand:DI 0 "register_operand" "=d") + (ashiftrt:DI (match_dup 1) (and:SI (match_dup 2) (match_dup 3))))] + "!TARGET_64BIT && s390_match_ccmode(insn, CCSmode) + && (INTVAL (operands[3]) & 63) == 63" + "srda\t%0,%Y2" [(set_attr "op_type" "RS") (set_attr "atype" "reg")]) -; -; ashrsi3 instruction pattern(s). -; - -(define_insn "*ashrsi3_cc" +(define_insn "*ashrdi3_cconly_31_and" [(set (reg CC_REGNUM) - (compare (ashiftrt:SI (match_operand:SI 1 "register_operand" "0") - (match_operand:SI 2 "shift_count_operand" "Y")) + (compare (ashiftrt:DI (match_operand:DI 1 "register_operand" "0") + (and:SI (match_operand:SI 2 "shift_count_or_setmem_operand" "Y") + (match_operand:SI 3 "const_int_operand" "n"))) (const_int 0))) - (set (match_operand:SI 0 "register_operand" "=d") - (ashiftrt:SI (match_dup 1) (match_dup 2)))] - "s390_match_ccmode(insn, CCSmode)" - "sra\t%0,%Y2" + (clobber (match_scratch:DI 0 "=d"))] + "!TARGET_64BIT && s390_match_ccmode(insn, CCSmode) + && (INTVAL (operands[3]) & 63) == 63" + "srda\t%0,%Y2" + [(set_attr "op_type" "RS") + (set_attr "atype" "reg")]) + +(define_insn "*ashrdi3_31_and" + [(set (match_operand:DI 0 "register_operand" "=d") + (ashiftrt:DI (match_operand:DI 1 "register_operand" "0") + (and:SI (match_operand:SI 2 "shift_count_or_setmem_operand" "Y") + (match_operand:SI 3 "const_int_operand" "n")))) + (clobber (reg:CC CC_REGNUM))] + "!TARGET_64BIT && (INTVAL (operands[3]) & 63) == 63" + "srda\t%0,%Y2" [(set_attr "op_type" "RS") (set_attr "atype" "reg")]) +(define_insn "*ashr3_cc_and" + [(set (reg CC_REGNUM) + (compare (ashiftrt:GPR (match_operand:GPR 1 "register_operand" "") + (and:SI (match_operand:SI 2 "shift_count_or_setmem_operand" "Y") + (match_operand:SI 3 "const_int_operand" "n"))) + (const_int 0))) + (set (match_operand:GPR 0 "register_operand" "=d") + (ashiftrt:GPR (match_dup 1) (and:SI (match_dup 2) (match_dup 3))))] + "s390_match_ccmode(insn, CCSmode) && (INTVAL (operands[3]) & 63) == 63" + "sra\t%0,<1>%Y2" + [(set_attr "op_type" "RS") + (set_attr "atype" "reg")]) -(define_insn "*ashrsi3_cconly" +(define_insn "*ashr3_cconly_and" [(set (reg CC_REGNUM) - (compare (ashiftrt:SI (match_operand:SI 1 "register_operand" "0") - (match_operand:SI 2 "shift_count_operand" "Y")) + (compare (ashiftrt:GPR (match_operand:GPR 1 "register_operand" "") + (and:SI (match_operand:SI 2 "shift_count_or_setmem_operand" "Y") + (match_operand:SI 3 "const_int_operand" "n"))) (const_int 0))) - (clobber (match_scratch:SI 0 "=d"))] - "s390_match_ccmode(insn, CCSmode)" - "sra\t%0,%Y2" - [(set_attr "op_type" "RS") + (clobber (match_scratch:GPR 0 "=d"))] + "s390_match_ccmode(insn, CCSmode) && (INTVAL (operands[3]) & 63) == 63" + "sra\t%0,<1>%Y2" + [(set_attr "op_type" "RS") (set_attr "atype" "reg")]) -(define_insn "ashrsi3" - [(set (match_operand:SI 0 "register_operand" "=d") - (ashiftrt:SI (match_operand:SI 1 "register_operand" "0") - (match_operand:SI 2 "shift_count_operand" "Y"))) +(define_insn "*ashr3_and" + [(set (match_operand:GPR 0 "register_operand" "=d") + (ashiftrt:GPR (match_operand:GPR 1 "register_operand" "") + (and:SI (match_operand:SI 2 "shift_count_or_setmem_operand" "Y") + (match_operand:SI 3 "const_int_operand" "n")))) (clobber (reg:CC CC_REGNUM))] - "" - "sra\t%0,%Y2" - [(set_attr "op_type" "RS") + "(INTVAL (operands[3]) & 63) == 63" + "sra\t%0,<1>%Y2" + [(set_attr "op_type" "RS") (set_attr "atype" "reg")]) @@ -7270,6 +7238,22 @@ (compare:CCZ1 (match_dup 1) (match_dup 2)))])] "") +(define_expand "sync_compare_and_swap" + [(parallel + [(set (match_operand:HQI 0 "register_operand" "") + (match_operand:HQI 1 "memory_operand" "")) + (set (match_dup 1) + (unspec_volatile:HQI + [(match_dup 1) + (match_operand:HQI 2 "general_operand" "") + (match_operand:HQI 3 "general_operand" "")] + UNSPECV_CAS)) + (set (reg:CCZ1 CC_REGNUM) + (compare:CCZ1 (match_dup 1) (match_dup 2)))])] + "" + "s390_expand_cs_hqi (mode, operands[0], operands[1], + operands[2], operands[3]); DONE;") + (define_expand "sync_compare_and_swap_cc" [(parallel [(set (match_operand:TDSI 0 "register_operand" "") @@ -7324,6 +7308,45 @@ (set_attr "type" "sem")]) +; +; Other atomic instruction patterns. +; + +(define_expand "sync_lock_test_and_set" + [(match_operand:HQI 0 "register_operand") + (match_operand:HQI 1 "memory_operand") + (match_operand:HQI 2 "general_operand")] + "" + "s390_expand_atomic (mode, SET, operands[0], operands[1], + operands[2], false); DONE;") + +(define_expand "sync_" + [(set (match_operand:HQI 0 "memory_operand") + (ATOMIC:HQI (match_dup 0) + (match_operand:HQI 1 "general_operand")))] + "" + "s390_expand_atomic (mode, , NULL_RTX, operands[0], + operands[1], false); DONE;") + +(define_expand "sync_old_" + [(set (match_operand:HQI 0 "register_operand") + (match_operand:HQI 1 "memory_operand")) + (set (match_dup 1) + (ATOMIC:HQI (match_dup 1) + (match_operand:HQI 2 "general_operand")))] + "" + "s390_expand_atomic (mode, , operands[0], operands[1], + operands[2], false); DONE;") + +(define_expand "sync_new_" + [(set (match_operand:HQI 0 "register_operand") + (ATOMIC:HQI (match_operand:HQI 1 "memory_operand") + (match_operand:HQI 2 "general_operand"))) + (set (match_dup 1) (ATOMIC:HQI (match_dup 1) (match_dup 2)))] + "" + "s390_expand_atomic (mode, , operands[0], operands[1], + operands[2], true); DONE;") + ;; ;;- Miscellaneous instructions. ;; diff --git a/gcc/config/sh/predicates.md b/gcc/config/sh/predicates.md index 87281c3b49b..7a55b8b4809 100644 --- a/gcc/config/sh/predicates.md +++ b/gcc/config/sh/predicates.md @@ -1,5 +1,5 @@ ;; Predicate definitions for Renesas / SuperH SH. -;; Copyright (C) 2005 Free Software Foundation, Inc. +;; Copyright (C) 2005, 2006 Free Software Foundation, Inc. ;; ;; This file is part of GCC. ;; @@ -111,7 +111,7 @@ same register from literal constants into a set and an add, when the difference is too wide for an add. */ if (GET_CODE (op) == CONST_INT - || EXTRA_CONSTRAINT_C16 (op)) + || EXTRA_CONSTRAINT_Css (op)) return 1; else if (GET_CODE (op) == TRUNCATE && ! system_reg_operand (XEXP (op, 0), VOIDmode) @@ -207,41 +207,14 @@ ;; TODO: Add a comment here. (define_predicate "binary_float_operator" - (match_code "plus,minus,mult,div") -{ - if (GET_MODE (op) != mode) - return 0; - switch (GET_CODE (op)) - { - case PLUS: - case MINUS: - case MULT: - case DIV: - return 1; - default: - break; - } - return 0; -}) + (and (match_code "plus,minus,mult,div") + (match_test "GET_MODE (op) == mode"))) ;; TODO: Add a comment here. (define_predicate "binary_logical_operator" - (match_code "and,ior,xor") -{ - if (GET_MODE (op) != mode) - return 0; - switch (GET_CODE (op)) - { - case IOR: - case AND: - case XOR: - return 1; - default: - break; - } - return 0; -}) + (and (match_code "and,ior,xor") + (match_test "GET_MODE (op) == mode"))) ;; TODO: Add a comment here. @@ -290,29 +263,13 @@ ;; TODO: Add a comment here. (define_predicate "commutative_float_operator" - (match_code "plus,mult") -{ - if (GET_MODE (op) != mode) - return 0; - switch (GET_CODE (op)) - { - case PLUS: - case MULT: - return 1; - default: - break; - } - return 0; -}) + (and (match_code "plus,mult") + (match_test "GET_MODE (op) == mode"))) ;; TODO: Add a comment here. (define_predicate "equality_comparison_operator" - (match_code "eq,ne") -{ - return ((mode == VOIDmode || GET_MODE (op) == mode) - && (GET_CODE (op) == EQ || GET_CODE (op) == NE)); -}) + (match_code "eq,ne")) ;; TODO: Add a comment here. @@ -494,21 +451,7 @@ ;; TODO: Add a comment here. (define_predicate "greater_comparison_operator" - (match_code "gt,ge,gtu,geu") -{ - if (mode != VOIDmode && GET_MODE (op) != mode) - return 0; - switch (GET_CODE (op)) - { - case GT: - case GE: - case GTU: - case GEU: - return 1; - default: - return 0; - } -}) + (match_code "gt,ge,gtu,geu")) ;; TODO: Add a comment here. @@ -541,21 +484,7 @@ ;; TODO: Add a comment here. (define_predicate "less_comparison_operator" - (match_code "lt,le,ltu,leu") -{ - if (mode != VOIDmode && GET_MODE (op) != mode) - return 0; - switch (GET_CODE (op)) - { - case LT: - case LE: - case LTU: - case LEU: - return 1; - default: - return 0; - } -}) + (match_code "lt,le,ltu,leu")) ;; Returns 1 if OP is a valid source operand for a logical operation. @@ -586,20 +515,7 @@ ;; TODO: Add a comment here. (define_predicate "logical_operator" - (match_code "and,ior,xor") -{ - if (mode != VOIDmode && GET_MODE (op) != mode) - return 0; - switch (GET_CODE (op)) - { - case AND: - case IOR: - case XOR: - return 1; - default: - return 0; - } -}) + (match_code "and,ior,xor")) ;; Like arith_reg_operand, but for register source operands of narrow ;; logical SHMEDIA operations: forbid subregs of DImode / TImode regs. @@ -639,20 +555,8 @@ ;; TODO: Add a comment here. (define_predicate "noncommutative_float_operator" - (match_code "minus,div") -{ - if (GET_MODE (op) != mode) - return 0; - switch (GET_CODE (op)) - { - case MINUS: - case DIV: - return 1; - default: - break; - } - return 0; -}) + (and (match_code "minus,div") + (match_test "GET_MODE (op) == mode"))) ;; TODO: Add a comment here. @@ -720,7 +624,7 @@ ;; TODO: Add a comment here. (define_predicate "sh_rep_vec" - (match_code "const_vector") + (match_code "const_vector,parallel") { int i; rtx x, y; @@ -783,28 +687,12 @@ ;; TODO: Add a comment here. (define_predicate "shift_operator" - (match_code "ashift,ashiftrt,lshiftrt") -{ - if (mode != VOIDmode && GET_MODE (op) != mode) - return 0; - switch (GET_CODE (op)) - { - case ASHIFT: - case ASHIFTRT: - case LSHIFTRT: - return 1; - default: - return 0; - } -}) + (match_code "ashift,ashiftrt,lshiftrt")) ;; TODO: Add a comment here. (define_predicate "symbol_ref_operand" - (match_code "symbol_ref") -{ - return (GET_CODE (op) == SYMBOL_REF); -}) + (match_code "symbol_ref")) ;; Same as target_reg_operand, except that label_refs and symbol_refs ;; are accepted before reload. @@ -884,21 +772,8 @@ ;; TODO: Add a comment here. (define_predicate "unary_float_operator" - (match_code "abs,neg,sqrt") -{ - if (GET_MODE (op) != mode) - return 0; - switch (GET_CODE (op)) - { - case ABS: - case NEG: - case SQRT: - return 1; - default: - break; - } - return 0; -}) + (and (match_code "abs,neg,sqrt") + (match_test "GET_MODE (op) == mode"))) ;; Return 1 if OP is a valid source operand for xor. diff --git a/gcc/config/sh/sh-protos.h b/gcc/config/sh/sh-protos.h index 564c1bee2cf..a0661545b56 100644 --- a/gcc/config/sh/sh-protos.h +++ b/gcc/config/sh/sh-protos.h @@ -165,6 +165,10 @@ extern int shmedia_cleanup_truncate (rtx *, void *); extern int sh_contains_memref_p (rtx); extern rtx shmedia_prepare_call_address (rtx fnaddr, int is_sibcall); +struct secondary_reload_info; +extern enum reg_class sh_secondary_reload (bool, rtx, enum reg_class, + enum machine_mode, + struct secondary_reload_info *); #endif /* ! GCC_SH_PROTOS_H */ diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c index e11d557d3c1..a9cafec612f 100644 --- a/gcc/config/sh/sh.c +++ b/gcc/config/sh/sh.c @@ -1,6 +1,6 @@ /* Output routines for GCC for Renesas / SuperH SH. Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, - 2003, 2004, 2005 Free Software Foundation, Inc. + 2003, 2004, 2005, 2006 Free Software Foundation, Inc. Contributed by Steve Chamberlain (sac@cygnus.com). Improved by Jim Wilson (wilson@cygnus.com). @@ -500,6 +500,9 @@ static int hard_regs_intersect_p (HARD_REG_SET *, HARD_REG_SET *); #define TARGET_ADJUST_UNROLL_MAX sh_adjust_unroll_max #endif +#undef TARGET_SECONDARY_RELOAD +#define TARGET_SECONDARY_RELOAD sh_secondary_reload + struct gcc_target targetm = TARGET_INITIALIZER; /* Implement TARGET_HANDLE_OPTION. */ @@ -973,35 +976,38 @@ print_operand (FILE *stream, rtx x, int code) case CONST: if (TARGET_SHMEDIA - && GET_CODE (XEXP (x, 0)) == SIGN_EXTEND + && (GET_CODE (XEXP (x, 0)) == SIGN_EXTEND + || GET_CODE (XEXP (x, 0)) == ZERO_EXTEND) && (GET_MODE (XEXP (x, 0)) == DImode || GET_MODE (XEXP (x, 0)) == SImode) && GET_CODE (XEXP (XEXP (x, 0), 0)) == TRUNCATE && GET_MODE (XEXP (XEXP (x, 0), 0)) == HImode) { rtx val = XEXP (XEXP (XEXP (x, 0), 0), 0); + rtx val2 = val; + bool nested_expr = false; fputc ('(', stream); if (GET_CODE (val) == ASHIFTRT) { fputc ('(', stream); - if (GET_CODE (XEXP (val, 0)) == CONST) - fputc ('(', stream); - output_addr_const (stream, XEXP (val, 0)); - if (GET_CODE (XEXP (val, 0)) == CONST) - fputc (')', stream); + val2 = XEXP (val, 0); + } + if (GET_CODE (val2) == CONST + || GET_RTX_CLASS (GET_CODE (val2)) != RTX_OBJ) + { + fputc ('(', stream); + nested_expr = true; + } + output_addr_const (stream, val2); + if (nested_expr) + fputc (')', stream); + if (GET_CODE (val) == ASHIFTRT) + { fputs (" >> ", stream); output_addr_const (stream, XEXP (val, 1)); fputc (')', stream); } - else - { - if (GET_CODE (val) == CONST) - fputc ('(', stream); - output_addr_const (stream, val); - if (GET_CODE (val) == CONST) - fputc (')', stream); - } fputs (" & 65535)", stream); break; } @@ -1782,7 +1788,7 @@ sh_file_start (void) else /* Switch to the data section so that the coffsem symbol isn't in the text section. */ - data_section (); + switch_to_section (data_section); if (TARGET_LITTLE_ENDIAN) fputs ("\t.little\n", asm_out_file); @@ -1968,12 +1974,12 @@ andcosts (rtx x) if (TARGET_SHMEDIA) { - if ((GET_CODE (XEXP (x, 1)) == CONST_INT - && CONST_OK_FOR_I16 (INTVAL (XEXP (x, 1)))) - || EXTRA_CONSTRAINT_C16 (XEXP (x, 1))) + if (GET_CODE (XEXP (x, 1)) == CONST_INT + && (CONST_OK_FOR_I10 (INTVAL (XEXP (x, 1))) + || CONST_OK_FOR_J16 (INTVAL (XEXP (x, 1))))) return 1; else - return 2; + return 1 + rtx_cost (XEXP (x, 1), AND); } /* These constants are single cycle extu.[bw] instructions. */ @@ -2093,9 +2099,9 @@ sh_rtx_costs (rtx x, int code, int outer_code, int *total) else if (CONST_OK_FOR_I16 (INTVAL (x) >> 16)) *total = COSTS_N_INSNS ((outer_code != SET) + 1); else if (CONST_OK_FOR_I16 ((INTVAL (x) >> 16) >> 16)) - *total = COSTS_N_INSNS (3); + *total = COSTS_N_INSNS ((outer_code != SET) + 2); else - *total = COSTS_N_INSNS (4); + *total = COSTS_N_INSNS ((outer_code != SET) + 3); return true; } if (CONST_OK_FOR_I08 (INTVAL (x))) @@ -6655,20 +6661,20 @@ sh_va_start (tree valist, rtx nextarg) f_next_fp_limit = TREE_CHAIN (f_next_fp); f_next_stack = TREE_CHAIN (f_next_fp_limit); - next_o = build (COMPONENT_REF, TREE_TYPE (f_next_o), valist, f_next_o, - NULL_TREE); - next_o_limit = build (COMPONENT_REF, TREE_TYPE (f_next_o_limit), - valist, f_next_o_limit, NULL_TREE); - next_fp = build (COMPONENT_REF, TREE_TYPE (f_next_fp), valist, f_next_fp, + next_o = build3 (COMPONENT_REF, TREE_TYPE (f_next_o), valist, f_next_o, NULL_TREE); - next_fp_limit = build (COMPONENT_REF, TREE_TYPE (f_next_fp_limit), - valist, f_next_fp_limit, NULL_TREE); - next_stack = build (COMPONENT_REF, TREE_TYPE (f_next_stack), - valist, f_next_stack, NULL_TREE); + next_o_limit = build3 (COMPONENT_REF, TREE_TYPE (f_next_o_limit), + valist, f_next_o_limit, NULL_TREE); + next_fp = build3 (COMPONENT_REF, TREE_TYPE (f_next_fp), valist, f_next_fp, + NULL_TREE); + next_fp_limit = build3 (COMPONENT_REF, TREE_TYPE (f_next_fp_limit), + valist, f_next_fp_limit, NULL_TREE); + next_stack = build3 (COMPONENT_REF, TREE_TYPE (f_next_stack), + valist, f_next_stack, NULL_TREE); /* Call __builtin_saveregs. */ u = make_tree (ptr_type_node, expand_builtin_saveregs ()); - t = build (MODIFY_EXPR, ptr_type_node, next_fp, u); + t = build2 (MODIFY_EXPR, ptr_type_node, next_fp, u); TREE_SIDE_EFFECTS (t) = 1; expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL); @@ -6677,13 +6683,13 @@ sh_va_start (tree valist, rtx nextarg) nfp = 8 - nfp; else nfp = 0; - u = fold (build (PLUS_EXPR, ptr_type_node, u, - build_int_cst (NULL_TREE, UNITS_PER_WORD * nfp))); - t = build (MODIFY_EXPR, ptr_type_node, next_fp_limit, u); + u = fold_build2 (PLUS_EXPR, ptr_type_node, u, + build_int_cst (NULL_TREE, UNITS_PER_WORD * nfp)); + t = build2 (MODIFY_EXPR, ptr_type_node, next_fp_limit, u); TREE_SIDE_EFFECTS (t) = 1; expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL); - t = build (MODIFY_EXPR, ptr_type_node, next_o, u); + t = build2 (MODIFY_EXPR, ptr_type_node, next_o, u); TREE_SIDE_EFFECTS (t) = 1; expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL); @@ -6692,14 +6698,14 @@ sh_va_start (tree valist, rtx nextarg) nint = 4 - nint; else nint = 0; - u = fold (build (PLUS_EXPR, ptr_type_node, u, - build_int_cst (NULL_TREE, UNITS_PER_WORD * nint))); - t = build (MODIFY_EXPR, ptr_type_node, next_o_limit, u); + u = fold_build2 (PLUS_EXPR, ptr_type_node, u, + build_int_cst (NULL_TREE, UNITS_PER_WORD * nint)); + t = build2 (MODIFY_EXPR, ptr_type_node, next_o_limit, u); TREE_SIDE_EFFECTS (t) = 1; expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL); u = make_tree (ptr_type_node, nextarg); - t = build (MODIFY_EXPR, ptr_type_node, next_stack, u); + t = build2 (MODIFY_EXPR, ptr_type_node, next_stack, u); TREE_SIDE_EFFECTS (t) = 1; expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL); } @@ -6758,16 +6764,16 @@ sh_gimplify_va_arg_expr (tree valist, tree type, tree *pre_p, f_next_fp_limit = TREE_CHAIN (f_next_fp); f_next_stack = TREE_CHAIN (f_next_fp_limit); - next_o = build (COMPONENT_REF, TREE_TYPE (f_next_o), valist, f_next_o, - NULL_TREE); - next_o_limit = build (COMPONENT_REF, TREE_TYPE (f_next_o_limit), - valist, f_next_o_limit, NULL_TREE); - next_fp = build (COMPONENT_REF, TREE_TYPE (f_next_fp), - valist, f_next_fp, NULL_TREE); - next_fp_limit = build (COMPONENT_REF, TREE_TYPE (f_next_fp_limit), - valist, f_next_fp_limit, NULL_TREE); - next_stack = build (COMPONENT_REF, TREE_TYPE (f_next_stack), - valist, f_next_stack, NULL_TREE); + next_o = build3 (COMPONENT_REF, TREE_TYPE (f_next_o), valist, f_next_o, + NULL_TREE); + next_o_limit = build3 (COMPONENT_REF, TREE_TYPE (f_next_o_limit), + valist, f_next_o_limit, NULL_TREE); + next_fp = build3 (COMPONENT_REF, TREE_TYPE (f_next_fp), + valist, f_next_fp, NULL_TREE); + next_fp_limit = build3 (COMPONENT_REF, TREE_TYPE (f_next_fp_limit), + valist, f_next_fp_limit, NULL_TREE); + next_stack = build3 (COMPONENT_REF, TREE_TYPE (f_next_stack), + valist, f_next_stack, NULL_TREE); /* Structures with a single member with a distinct mode are passed like their member. This is relevant if the latter has a REAL_TYPE @@ -6826,19 +6832,19 @@ sh_gimplify_va_arg_expr (tree valist, tree type, tree *pre_p, if (size > 4 && !is_double) tmp = build2 (PLUS_EXPR, TREE_TYPE (tmp), tmp, fold_convert (TREE_TYPE (tmp), size_int (4 - size))); - tmp = build (GE_EXPR, boolean_type_node, next_fp_tmp, tmp); - cmp = build (COND_EXPR, void_type_node, tmp, - build (GOTO_EXPR, void_type_node, lab_false), - NULL); + tmp = build2 (GE_EXPR, boolean_type_node, next_fp_tmp, tmp); + cmp = build3 (COND_EXPR, void_type_node, tmp, + build1 (GOTO_EXPR, void_type_node, lab_false), + NULL_TREE); if (!is_double) gimplify_and_add (cmp, pre_p); if (TYPE_ALIGN (type) > BITS_PER_WORD || (is_double || size == 16)) { tmp = fold_convert (ptr_type_node, size_int (UNITS_PER_WORD)); - tmp = build (BIT_AND_EXPR, ptr_type_node, next_fp_tmp, tmp); - tmp = build (PLUS_EXPR, ptr_type_node, next_fp_tmp, tmp); - tmp = build (MODIFY_EXPR, ptr_type_node, next_fp_tmp, tmp); + tmp = build2 (BIT_AND_EXPR, ptr_type_node, next_fp_tmp, tmp); + tmp = build2 (PLUS_EXPR, ptr_type_node, next_fp_tmp, tmp); + tmp = build2 (MODIFY_EXPR, ptr_type_node, next_fp_tmp, tmp); gimplify_and_add (tmp, pre_p); } if (is_double) @@ -6858,19 +6864,19 @@ sh_gimplify_va_arg_expr (tree valist, tree type, tree *pre_p, = std_gimplify_va_arg_expr (next_fp_tmp, subtype, pre_p, NULL); real = get_initialized_tmp_var (real, pre_p, NULL); - result = build (COMPLEX_EXPR, type, real, imag); + result = build2 (COMPLEX_EXPR, type, real, imag); result = get_initialized_tmp_var (result, pre_p, NULL); } #endif /* FUNCTION_ARG_SCmode_WART */ - tmp = build (GOTO_EXPR, void_type_node, lab_over); + tmp = build1 (GOTO_EXPR, void_type_node, lab_over); gimplify_and_add (tmp, pre_p); - tmp = build (LABEL_EXPR, void_type_node, lab_false); + tmp = build1 (LABEL_EXPR, void_type_node, lab_false); gimplify_and_add (tmp, pre_p); tmp = build1 (ADDR_EXPR, pptr_type_node, next_stack); - tmp = build (MODIFY_EXPR, void_type_node, addr, tmp); + tmp = build2 (MODIFY_EXPR, void_type_node, addr, tmp); gimplify_and_add (tmp, pre_p); tmp = build2 (MODIFY_EXPR, ptr_type_node, next_fp_tmp, valist); gimplify_and_add (tmp, pre_p); @@ -6882,37 +6888,37 @@ sh_gimplify_va_arg_expr (tree valist, tree type, tree *pre_p, else { tmp = fold_convert (ptr_type_node, size_int (rsize)); - tmp = build (PLUS_EXPR, ptr_type_node, next_o, tmp); - tmp = build (GT_EXPR, boolean_type_node, tmp, next_o_limit); - tmp = build (COND_EXPR, void_type_node, tmp, - build (GOTO_EXPR, void_type_node, lab_false), - NULL); + tmp = build2 (PLUS_EXPR, ptr_type_node, next_o, tmp); + tmp = build2 (GT_EXPR, boolean_type_node, tmp, next_o_limit); + tmp = build3 (COND_EXPR, void_type_node, tmp, + build1 (GOTO_EXPR, void_type_node, lab_false), + NULL_TREE); gimplify_and_add (tmp, pre_p); tmp = build1 (ADDR_EXPR, pptr_type_node, next_o); - tmp = build (MODIFY_EXPR, void_type_node, addr, tmp); + tmp = build2 (MODIFY_EXPR, void_type_node, addr, tmp); gimplify_and_add (tmp, pre_p); - tmp = build (GOTO_EXPR, void_type_node, lab_over); + tmp = build1 (GOTO_EXPR, void_type_node, lab_over); gimplify_and_add (tmp, pre_p); - tmp = build (LABEL_EXPR, void_type_node, lab_false); + tmp = build1 (LABEL_EXPR, void_type_node, lab_false); gimplify_and_add (tmp, pre_p); if (size > 4 && ! TARGET_SH4) { - tmp = build (MODIFY_EXPR, ptr_type_node, next_o, next_o_limit); + tmp = build2 (MODIFY_EXPR, ptr_type_node, next_o, next_o_limit); gimplify_and_add (tmp, pre_p); } tmp = build1 (ADDR_EXPR, pptr_type_node, next_stack); - tmp = build (MODIFY_EXPR, void_type_node, addr, tmp); + tmp = build2 (MODIFY_EXPR, void_type_node, addr, tmp); gimplify_and_add (tmp, pre_p); } if (!result) { - tmp = build (LABEL_EXPR, void_type_node, lab_over); + tmp = build1 (LABEL_EXPR, void_type_node, lab_over); gimplify_and_add (tmp, pre_p); } } @@ -6923,10 +6929,10 @@ sh_gimplify_va_arg_expr (tree valist, tree type, tree *pre_p, tmp = std_gimplify_va_arg_expr (valist, type, pre_p, NULL); if (result) { - tmp = build (MODIFY_EXPR, void_type_node, result, tmp); + tmp = build2 (MODIFY_EXPR, void_type_node, result, tmp); gimplify_and_add (tmp, pre_p); - tmp = build (LABEL_EXPR, void_type_node, lab_over); + tmp = build1 (LABEL_EXPR, void_type_node, lab_over); gimplify_and_add (tmp, pre_p); } else @@ -10276,10 +10282,10 @@ sh_adjust_unroll_max (struct loop * loop, int insn_count, if (TREE_CODE (type) != ARRAY_TYPE || ! TYPE_SIZE (type) || ! TYPE_SIZE_UNIT (type)) break; - size_tree = fold (build (TRUNC_DIV_EXPR, + size_tree = fold_build2 (TRUNC_DIV_EXPR, bitsizetype, TYPE_SIZE (type), - TYPE_SIZE_UNIT (type))); + TYPE_SIZE_UNIT (type)); if (TREE_CODE (size_tree) == INTEGER_CST && ! TREE_INT_CST_HIGH (size_tree) && TREE_INT_CST_LOW (size_tree) < max_iterations) @@ -10672,6 +10678,106 @@ shmedia_prepare_call_address (rtx fnaddr, int is_sibcall) return fnaddr; } +enum reg_class +sh_secondary_reload (bool in_p, rtx x, enum reg_class class, + enum machine_mode mode, secondary_reload_info *sri) +{ + if (in_p) + { + if (REGCLASS_HAS_FP_REG (class) + && ! TARGET_SHMEDIA + && immediate_operand ((x), mode) + && ! ((fp_zero_operand (x) || fp_one_operand (x)) + && mode == SFmode && fldi_ok ())) + switch (mode) + { + case SFmode: + sri->icode = CODE_FOR_reload_insf__frn; + return NO_REGS; + case DFmode: + sri->icode = CODE_FOR_reload_indf__frn; + return NO_REGS; + case SImode: + /* ??? If we knew that we are in the appropriate mode - + single precision - we could use a reload pattern directly. */ + return FPUL_REGS; + default: + abort (); + } + if (class == FPUL_REGS + && ((GET_CODE (x) == REG + && (REGNO (x) == MACL_REG || REGNO (x) == MACH_REG + || REGNO (x) == T_REG)) + || GET_CODE (x) == PLUS)) + return GENERAL_REGS; + if (class == FPUL_REGS && immediate_operand (x, mode)) + { + if (GET_CODE (x) == CONST_INT && CONST_OK_FOR_I08 (INTVAL (x))) + return GENERAL_REGS; + sri->icode = CODE_FOR_reload_insi__i_fpul; + return NO_REGS; + } + if (class == FPSCR_REGS + && ((GET_CODE (x) == REG && REGNO (x) >= FIRST_PSEUDO_REGISTER) + || (GET_CODE (x) == MEM && GET_CODE (XEXP (x, 0)) == PLUS))) + return GENERAL_REGS; + if (REGCLASS_HAS_FP_REG (class) + && TARGET_SHMEDIA + && immediate_operand (x, mode) + && x != CONST0_RTX (GET_MODE (x)) + && GET_MODE (x) != V4SFmode) + return GENERAL_REGS; + if ((mode == QImode || mode == HImode) + && TARGET_SHMEDIA && inqhi_operand (x, mode)) + { + sri->icode = ((mode == QImode) + ? CODE_FOR_reload_inqi : CODE_FOR_reload_inhi); + return NO_REGS; + } + if (TARGET_SHMEDIA && class == GENERAL_REGS + && (GET_CODE (x) == LABEL_REF || PIC_DIRECT_ADDR_P (x))) + return TARGET_REGS; + } /* end of input-only processing. */ + + if (((REGCLASS_HAS_FP_REG (class) + && (GET_CODE (x) == REG + && (GENERAL_OR_AP_REGISTER_P (REGNO (x)) + || (FP_REGISTER_P (REGNO (x)) && mode == SImode + && TARGET_FMOVD)))) + || (REGCLASS_HAS_GENERAL_REG (class) + && GET_CODE (x) == REG + && FP_REGISTER_P (REGNO (x)))) + && ! TARGET_SHMEDIA + && (mode == SFmode || mode == SImode)) + return FPUL_REGS; + if ((class == FPUL_REGS + || (REGCLASS_HAS_FP_REG (class) + && ! TARGET_SHMEDIA && mode == SImode)) + && (GET_CODE (x) == MEM + || (GET_CODE (x) == REG + && (REGNO (x) >= FIRST_PSEUDO_REGISTER + || REGNO (x) == T_REG + || system_reg_operand (x, VOIDmode))))) + { + if (class == FPUL_REGS) + return GENERAL_REGS; + return FPUL_REGS; + } + if ((class == TARGET_REGS + || (TARGET_SHMEDIA && class == SIBCALL_REGS)) + && !EXTRA_CONSTRAINT_Csy (x) + && (GET_CODE (x) != REG || ! GENERAL_REGISTER_P (REGNO (x)))) + return GENERAL_REGS; + if ((class == MAC_REGS || class == PR_REGS) + && GET_CODE (x) == REG && ! GENERAL_REGISTER_P (REGNO (x)) + && class != REGNO_REG_CLASS (REGNO (x))) + return GENERAL_REGS; + if (class != GENERAL_REGS && GET_CODE (x) == REG + && TARGET_REGISTER_P (REGNO (x))) + return GENERAL_REGS; + return NO_REGS; +} + enum sh_divide_strategy_e sh_div_strategy = SH_DIV_STRATEGY_DEFAULT; /* This defines the storage for the variable part of a -mboard= option. diff --git a/gcc/config/sh/sh.h b/gcc/config/sh/sh.h index 7f541fbda8b..87117f45b4c 100644 --- a/gcc/config/sh/sh.h +++ b/gcc/config/sh/sh.h @@ -1,6 +1,6 @@ /* Definitions of target machine for GNU compiler for Renesas / SuperH SH. Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, - 2003, 2004, 2005 Free Software Foundation, Inc. + 2003, 2004, 2005, 2006 Free Software Foundation, Inc. Contributed by Steve Chamberlain (sac@cygnus.com). Improved by Jim Wilson (wilson@cygnus.com). @@ -1493,7 +1493,8 @@ extern enum reg_class reg_class_from_letter[]; Bsc: SCRATCH - for the scratch register in movsi_ie in the fldi0 / fldi0 cases C: Constants other than only CONST_INT (constraint len == 3) - C16: 16 bit constant, literal or symbolic + Css: signed 16 bit constant, literal or symbolic + Csu: unsigned 16 bit constant, literal or symbolic Csy: label or symbol Cpg: non-explicit constants that can be directly loaded into a general purpose register in PIC code. like 's' except we don't allow @@ -1527,7 +1528,8 @@ extern enum reg_class reg_class_from_letter[]; C is the letter, and VALUE is a constant value. Return 1 if VALUE is in the range specified by C. I08: arithmetic operand -127..128, as used in add, sub, etc - I16: arithmetic operand -32768..32767, as used in SHmedia movi and shori + I16: arithmetic operand -32768..32767, as used in SHmedia movi + K16: arithmetic operand 0..65535, as used in SHmedia shori P27: shift operand 1,2,8 or 16 K08: logical operand 0..255, as used in and, or, etc. M: constant 1 @@ -1564,8 +1566,11 @@ extern enum reg_class reg_class_from_letter[]; #define CONST_OK_FOR_K08(VALUE) (((HOST_WIDE_INT)(VALUE))>= 0 \ && ((HOST_WIDE_INT)(VALUE)) <= 255) +#define CONST_OK_FOR_K16(VALUE) (((HOST_WIDE_INT)(VALUE))>= 0 \ + && ((HOST_WIDE_INT)(VALUE)) <= 65535) #define CONST_OK_FOR_K(VALUE, STR) \ ((STR)[1] == '0' && (STR)[2] == '8' ? CONST_OK_FOR_K08 (VALUE) \ + : (STR)[1] == '1' && (STR)[2] == '6' ? CONST_OK_FOR_K16 (VALUE) \ : 0) #define CONST_OK_FOR_P27(VALUE) \ ((VALUE)==1||(VALUE)==2||(VALUE)==8||(VALUE)==16) @@ -1604,6 +1609,7 @@ extern enum reg_class reg_class_from_letter[]; ? GENERAL_REGS \ : (CLASS)) \ +#if 0 #define SECONDARY_INOUT_RELOAD_CLASS(CLASS,MODE,X,ELSE) \ ((((REGCLASS_HAS_FP_REG (CLASS) \ && (GET_CODE (X) == REG \ @@ -1675,6 +1681,9 @@ extern enum reg_class reg_class_from_letter[]; && (GET_CODE (X) == LABEL_REF || PIC_DIRECT_ADDR_P (X))) \ ? TARGET_REGS \ : SECONDARY_INOUT_RELOAD_CLASS((CLASS),(MODE),(X), NO_REGS)) +#else +#define HAVE_SECONDARY_RELOADS +#endif /* Return the maximum number of consecutive registers needed to represent mode MODE in a register of class CLASS. @@ -2094,7 +2103,9 @@ struct sh_args { && ((MODE) == BLKmode || (MODE) == TImode || (MODE) == CDImode \ || (MODE) == DCmode) \ && ((CUM).arg_count[(int) SH_ARG_INT] \ - + (int_size_in_bytes (TYPE) + 7) / 8) > NPARM_REGS (SImode)) + + (((MODE) == BLKmode ? int_size_in_bytes (TYPE) \ + : GET_MODE_SIZE (MODE)) \ + + 7) / 8) > NPARM_REGS (SImode)) /* Perform any needed actions needed for a function that is receiving a variable number of arguments. */ @@ -2308,8 +2319,8 @@ struct sh_args { ((STR)[1] == 's' && (STR)[2] == 'c' ? EXTRA_CONSTRAINT_Bsc (OP) \ : 0) -/* The `C16' constraint is a 16-bit constant, literal or symbolic. */ -#define EXTRA_CONSTRAINT_C16(OP) \ +/* The `Css' constraint is a signed 16-bit constant, literal or symbolic. */ +#define EXTRA_CONSTRAINT_Css(OP) \ (GET_CODE (OP) == CONST \ && GET_CODE (XEXP ((OP), 0)) == SIGN_EXTEND \ && (GET_MODE (XEXP ((OP), 0)) == DImode \ @@ -2323,6 +2334,21 @@ struct sh_args { && GET_CODE (XEXP (XEXP (XEXP (XEXP ((OP), 0), 0), 0), \ 1)) == CONST_INT))) +/* The `Csu' constraint is an unsigned 16-bit constant, literal or symbolic. */ +#define EXTRA_CONSTRAINT_Csu(OP) \ + (GET_CODE (OP) == CONST \ + && GET_CODE (XEXP ((OP), 0)) == ZERO_EXTEND \ + && (GET_MODE (XEXP ((OP), 0)) == DImode \ + || GET_MODE (XEXP ((OP), 0)) == SImode) \ + && GET_CODE (XEXP (XEXP ((OP), 0), 0)) == TRUNCATE \ + && GET_MODE (XEXP (XEXP ((OP), 0), 0)) == HImode \ + && (MOVI_SHORI_BASE_OPERAND_P (XEXP (XEXP (XEXP ((OP), 0), 0), 0)) \ + || (GET_CODE (XEXP (XEXP (XEXP ((OP), 0), 0), 0)) == ASHIFTRT \ + && (MOVI_SHORI_BASE_OPERAND_P \ + (XEXP (XEXP (XEXP (XEXP ((OP), 0), 0), 0), 0))) \ + && GET_CODE (XEXP (XEXP (XEXP (XEXP ((OP), 0), 0), 0), \ + 1)) == CONST_INT))) + /* Check whether OP is a datalabel unspec. */ #define DATALABEL_REF_NO_CONST_P(OP) \ (GET_CODE (OP) == UNSPEC \ @@ -2409,7 +2435,8 @@ struct sh_args { && (! PIC_ADDR_P (OP) || PIC_OFFSET_P (OP)) \ && GET_CODE (OP) != LABEL_REF))) #define EXTRA_CONSTRAINT_C(OP, STR) \ - ((STR)[1] == '1' && (STR)[2] == '6' ? EXTRA_CONSTRAINT_C16 (OP) \ + ((STR)[1] == 's' && (STR)[2] == 's' ? EXTRA_CONSTRAINT_Css (OP) \ + : (STR)[1] == 's' && (STR)[2] == 'u' ? EXTRA_CONSTRAINT_Csu (OP) \ : (STR)[1] == 's' && (STR)[2] == 'y' ? EXTRA_CONSTRAINT_Csy (OP) \ : (STR)[1] == 'p' && (STR)[2] == 'g' ? EXTRA_CONSTRAINT_Cpg (OP) \ : 0) diff --git a/gcc/config/sh/sh.md b/gcc/config/sh/sh.md index 42e05bce806..38cd3bd6c6e 100644 --- a/gcc/config/sh/sh.md +++ b/gcc/config/sh/sh.md @@ -1,6 +1,6 @@ ;;- Machine description for Renesas / SuperH SH. ;; Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -;; 2003, 2004, 2005 Free Software Foundation, Inc. +;; 2003, 2004, 2005, 2006 Free Software Foundation, Inc. ;; Contributed by Steve Chamberlain (sac@cygnus.com). ;; Improved by Jim Wilson (wilson@cygnus.com). @@ -4844,7 +4844,7 @@ label: [(set (match_operand:SI 0 "general_movdst_operand" "=r,r,r,r,m,f?,m,f?,r,f?,*b,r,b") (match_operand:SI 1 "general_movsrc_operand" - "r,I16C16,nCpg,m,rZ,m,f?,rZ,f?,f?,r,*b,Csy"))] + "r,I16Css,nCpg,m,rZ,m,f?,rZ,f?,f?,r,*b,Csy"))] "TARGET_SHMEDIA_FPU && (register_operand (operands[0], SImode) || sh_register_operand (operands[1], SImode) @@ -4874,7 +4874,7 @@ label: [(set (match_operand:SI 0 "general_movdst_operand" "=r,r,r,r,m,*b,r,*b") (match_operand:SI 1 "general_movsrc_operand" - "r,I16C16,nCpg,m,rZ,r,*b,Csy"))] + "r,I16Css,nCpg,m,rZ,r,*b,Csy"))] "TARGET_SHMEDIA && (register_operand (operands[0], SImode) || sh_register_operand (operands[1], SImode) @@ -4904,11 +4904,9 @@ label: (const_int 16)))))) (set (match_dup 0) (ior:SI (ashift:SI (match_dup 0) (const_int 16)) - (zero_extend:SI - (truncate:HI - (const:SI - (sign_extend:SI - (truncate:HI (match_dup 1))))))))] + (const:SI + (zero_extend:SI + (truncate:HI (match_dup 1))))))] "TARGET_SHMEDIA && reload_completed && MOVI_SHORI_BASE_OPERAND_P (operands[1])" " @@ -5092,7 +5090,7 @@ label: (define_insn "*movqi_media" [(set (match_operand:QI 0 "general_movdst_operand" "=r,r,r,m") - (match_operand:QI 1 "general_movsrc_operand" "r,I16C16,m,rZ"))] + (match_operand:QI 1 "general_movsrc_operand" "r,I16Css,m,rZ"))] "TARGET_SHMEDIA && (arith_reg_operand (operands[0], QImode) || extend_reg_or_0_operand (operands[1], QImode))" @@ -5153,7 +5151,7 @@ label: (define_insn "*movhi_media" [(set (match_operand:HI 0 "general_movdst_operand" "=r,r,r,r,m") - (match_operand:HI 1 "general_movsrc_operand" "r,I16C16,n,m,rZ"))] + (match_operand:HI 1 "general_movsrc_operand" "r,I16Css,n,m,rZ"))] "TARGET_SHMEDIA && (arith_reg_operand (operands[0], HImode) || arith_reg_or_0_operand (operands[1], HImode))" @@ -5272,7 +5270,7 @@ label: [(set (match_operand:DI 0 "general_movdst_operand" "=r,r,r,rl,m,f?,m,f?,r,f?,*b,r,*b") (match_operand:DI 1 "general_movsrc_operand" - "r,I16C16,nCpgF,m,rlZ,m,f?,rZ,f?,f?,r,*b,Csy"))] + "r,I16Css,nCpgF,m,rlZ,m,f?,rZ,f?,f?,r,*b,Csy"))] "TARGET_SHMEDIA_FPU && (register_operand (operands[0], DImode) || sh_register_operand (operands[1], DImode))" @@ -5295,7 +5293,7 @@ label: (define_insn "*movdi_media_nofpu" [(set (match_operand:DI 0 "general_movdst_operand" "=r,r,r,rl,m,*b,r,*b"); - (match_operand:DI 1 "general_movsrc_operand" "r,I16C16,nCpgF,m,rlZ,r,*b,Csy"))] + (match_operand:DI 1 "general_movsrc_operand" "r,I16Css,nCpgF,m,rlZ,r,*b,Csy"))] "TARGET_SHMEDIA && (register_operand (operands[0], DImode) || sh_register_operand (operands[1], DImode))" @@ -5349,32 +5347,26 @@ label: (const_int 48)))))) (set (match_dup 0) (ior:DI (ashift:DI (match_dup 0) (const_int 16)) - (zero_extend:DI - (truncate:HI - (const:DI - (sign_extend:DI - (truncate:HI - (ashiftrt:SI - (match_dup 1) - (const_int 32))))))))) + (const:DI + (zero_extend:DI + (truncate:HI + (ashiftrt:SI + (match_dup 1) + (const_int 32))))))) (set (match_dup 0) (ior:DI (ashift:DI (match_dup 0) (const_int 16)) - (zero_extend:DI - (truncate:HI - (const:DI - (sign_extend:DI - (truncate:HI - (ashiftrt:SI - (match_dup 1) - (const_int 16))))))))) + (const:DI + (zero_extend:DI + (truncate:HI + (ashiftrt:SI + (match_dup 1) + (const_int 16))))))) (set (match_dup 0) (ior:DI (ashift:DI (match_dup 0) (const_int 16)) - (zero_extend:DI - (truncate:HI - (const:DI - (sign_extend:DI - (truncate:HI - (match_dup 1))))))))] + (const:DI + (zero_extend:DI + (truncate:HI + (match_dup 1))))))] "TARGET_SHMEDIA64 && reload_completed && MOVI_SHORI_BASE_OPERAND_P (operands[1])" " @@ -5391,12 +5383,10 @@ label: (const_int 16)))))) (set (match_dup 0) (ior:DI (ashift:DI (match_dup 0) (const_int 16)) - (zero_extend:DI - (truncate:HI - (const:DI - (sign_extend:DI - (truncate:HI - (match_dup 1))))))))] + (const:DI + (zero_extend:DI + (truncate:HI + (match_dup 1))))))] "TARGET_SHMEDIA32 && reload_completed && MOVI_SHORI_BASE_OPERAND_P (operands[1])" " @@ -5429,10 +5419,8 @@ label: unsigned HOST_WIDE_INT sign; unsigned HOST_WIDE_INT val2 = val ^ (val-1); - /* Sign-extend the 16 least-significant bits. */ + /* Zero-extend the 16 least-significant bits. */ low &= 0xffff; - low ^= 0x8000; - low -= 0x8000; /* Arithmetic shift right the word by 16 bits. */ high >>= 16; @@ -5529,8 +5517,7 @@ label: && GET_CODE (operands[1]) == CONST_DOUBLE" [(set (match_dup 0) (match_dup 2)) (set (match_dup 0) - (ior:DI (ashift:DI (match_dup 0) (const_int 16)) - (zero_extend:DI (truncate:HI (match_dup 1)))))] + (ior:DI (ashift:DI (match_dup 0) (const_int 16)) (match_dup 1)))] " { unsigned HOST_WIDE_INT low = CONST_DOUBLE_LOW (operands[1]); @@ -5538,10 +5525,8 @@ label: unsigned HOST_WIDE_INT val = low; unsigned HOST_WIDE_INT sign; - /* Sign-extend the 16 least-significant bits. */ + /* Zero-extend the 16 least-significant bits. */ val &= 0xffff; - val ^= 0x8000; - val -= 0x8000; operands[1] = GEN_INT (val); /* Arithmetic shift right the double-word by 16 bits. */ @@ -5566,9 +5551,7 @@ label: [(set (match_operand:DI 0 "ext_dest_operand" "=r,r") (ior:DI (ashift:DI (match_operand:DI 1 "arith_reg_operand" "0,0") (const_int 16)) - (zero_extend:DI - (truncate:HI - (match_operand:DI 2 "immediate_operand" "I16C16,nF")))))] + (match_operand:DI 2 "immediate_operand" "K16Csu,nF")))] "TARGET_SHMEDIA && (reload_completed || arith_reg_dest (operands[0], DImode))" "@ shori %u2, %0 @@ -5579,9 +5562,7 @@ label: [(set (match_operand:SI 0 "arith_reg_dest" "=r") (ior:SI (ashift:SI (match_operand:SI 1 "arith_reg_operand" "0") (const_int 16)) - (zero_extend:SI - (truncate:HI - (match_operand:SI 2 "immediate_operand" "I16C16")))))] + (match_operand:SI 2 "immediate_operand" "K16Csu")))] "TARGET_SHMEDIA" "shori %u2, %0") @@ -5845,15 +5826,15 @@ label: (clobber (scratch:SI))])] "") -(define_expand "reload_indf" - [(parallel [(set (match_operand:DF 0 "register_operand" "=f") +(define_expand "reload_indf__frn" + [(parallel [(set (match_operand:DF 0 "register_operand" "=a") (match_operand:DF 1 "immediate_operand" "FQ")) (use (reg:PSI FPSCR_REG)) (clobber (match_operand:SI 2 "register_operand" "=&z"))])] "TARGET_SH1" "") -(define_expand "reload_outdf" +(define_expand "reload_outdf__RnFRm" [(parallel [(set (match_operand:DF 0 "register_operand" "=r,f") (match_operand:DF 1 "register_operand" "af,r")) (clobber (match_operand:SI 2 "register_operand" "=&y,y"))])] @@ -6475,7 +6456,7 @@ label: [(set_attr "length" "0") (set_attr "type" "nil")]) -(define_expand "reload_insf" +(define_expand "reload_insf__frn" [(parallel [(set (match_operand:SF 0 "register_operand" "=a") (match_operand:SF 1 "immediate_operand" "FQ")) (use (reg:PSI FPSCR_REG)) @@ -6483,7 +6464,7 @@ label: "TARGET_SH1" "") -(define_expand "reload_insi" +(define_expand "reload_insi__i_fpul" [(parallel [(set (match_operand:SI 0 "fpul_operand" "=y") (match_operand:SI 1 "immediate_operand" "i")) (clobber (match_operand:SI 2 "register_operand" "=&z"))])] @@ -8315,17 +8296,16 @@ label: DONE; }") -(define_expand "sym2GOTPLT" - [(const (unspec [(match_operand 0 "" "")] UNSPEC_GOTPLT))] - "" - "") - (define_expand "symGOTPLT2reg" [(match_operand 0 "" "") (match_operand 1 "" "")] "" " { - emit_insn (gen_symGOT_load (operands[0], gen_sym2GOTPLT (operands[1]))); + rtx pltsym = gen_rtx_CONST (Pmode, + gen_rtx_UNSPEC (Pmode, + gen_rtvec (1, operands[1]), + UNSPEC_GOTPLT)); + emit_insn (gen_symGOT_load (operands[0], pltsym)); DONE; }") @@ -11260,7 +11240,7 @@ mov.l\\t1f,r0\\n\\ (define_insn "movv8qi_i" [(set (match_operand:V8QI 0 "general_movdst_operand" "=r,r,r,rl,m") - (match_operand:V8QI 1 "general_movsrc_operand" "r,I16C16Z,nW,m,rlZ"))] + (match_operand:V8QI 1 "general_movsrc_operand" "r,I16CssZ,nW,m,rlZ"))] "TARGET_SHMEDIA && (register_operand (operands[0], V8QImode) || sh_register_operand (operands[1], V8QImode))" @@ -11352,7 +11332,7 @@ mov.l\\t1f,r0\\n\\ (define_insn "movv2hi_i" [(set (match_operand:V2HI 0 "general_movdst_operand" "=r,r,r,rl,m") - (match_operand:V2HI 1 "general_movsrc_operand" "r,I16C16Z,nW,m,rlZ"))] + (match_operand:V2HI 1 "general_movsrc_operand" "r,I16CssZ,nW,m,rlZ"))] "TARGET_SHMEDIA && (register_operand (operands[0], V2HImode) || sh_register_operand (operands[1], V2HImode))" @@ -11377,7 +11357,7 @@ mov.l\\t1f,r0\\n\\ (define_insn "movv4hi_i" [(set (match_operand:V4HI 0 "general_movdst_operand" "=r,r,r,rl,m") - (match_operand:V4HI 1 "general_movsrc_operand" "r,I16C16Z,nW,m,rlZ"))] + (match_operand:V4HI 1 "general_movsrc_operand" "r,I16CssZ,nW,m,rlZ"))] "TARGET_SHMEDIA && (register_operand (operands[0], V4HImode) || sh_register_operand (operands[1], V4HImode))" @@ -11399,7 +11379,7 @@ mov.l\\t1f,r0\\n\\ (define_insn "movv2si_i" [(set (match_operand:V2SI 0 "general_movdst_operand" "=r,r,r,rl,m") - (match_operand:V2SI 1 "general_movsrc_operand" "r,I16C16Z,nW,m,rlZ"))] + (match_operand:V2SI 1 "general_movsrc_operand" "r,I16CssZ,nW,m,rlZ"))] "TARGET_SHMEDIA && (register_operand (operands[0], V2SImode) || sh_register_operand (operands[1], V2SImode))" @@ -12345,7 +12325,7 @@ mov.l\\t1f,r0\\n\\ (const_int 32)) (match_operand:DI 2 "const_int_operand" "n")))] "TARGET_SHMEDIA - && INTVAL (operands[2]) == trunc_int_for_mode (INTVAL (operands[2]), SImode)" + && ! (INTVAL (operands[2]) & ~(unsigned HOST_WIDE_INT) 0xffffffffUL)" "#" "rtx_equal_p (operands[0], operands[1])" [(const_int 0)] @@ -12353,10 +12333,8 @@ mov.l\\t1f,r0\\n\\ { HOST_WIDE_INT v = INTVAL (operands[2]); - emit_insn (gen_shori_media (operands[0], operands[0], - gen_int_mode (INTVAL (operands[2]) >> 16, HImode))); - emit_insn (gen_shori_media (operands[0], operands[0], - gen_int_mode (v, HImode))); + emit_insn (gen_shori_media (operands[0], operands[0], GEN_INT (v >> 16))); + emit_insn (gen_shori_media (operands[0], operands[0], GEN_INT (v & 65535))); DONE; }" [(set_attr "highpart" "ignore")]) diff --git a/gcc/config/sol2-c.c b/gcc/config/sol2-c.c index 1934270d2f6..173583be26b 100644 --- a/gcc/config/sol2-c.c +++ b/gcc/config/sol2-c.c @@ -88,8 +88,8 @@ solaris_pragma_align (cpp_reader *pfile ATTRIBUTE_UNUSED) enum cpp_ttype ttype; HOST_WIDE_INT low; - if (c_lex (&x) != CPP_NUMBER - || c_lex (&t) != CPP_OPEN_PAREN) + if (pragma_lex (&x) != CPP_NUMBER + || pragma_lex (&t) != CPP_OPEN_PAREN) { warning (0, "malformed %<#pragma align%>, ignoring"); return; @@ -104,7 +104,7 @@ solaris_pragma_align (cpp_reader *pfile ATTRIBUTE_UNUSED) return; } - ttype = c_lex (&t); + ttype = pragma_lex (&t); if (ttype != CPP_NAME) { warning (0, "malformed %<#pragma align%>, ignoring"); @@ -121,10 +121,10 @@ solaris_pragma_align (cpp_reader *pfile ATTRIBUTE_UNUSED) solaris_pending_aligns = tree_cons (t, build_tree_list (NULL, x), solaris_pending_aligns); - ttype = c_lex (&t); + ttype = pragma_lex (&t); if (ttype == CPP_COMMA) { - ttype = c_lex (&t); + ttype = pragma_lex (&t); if (ttype != CPP_NAME) { warning (0, "malformed %<#pragma align%>"); @@ -133,7 +133,7 @@ solaris_pragma_align (cpp_reader *pfile ATTRIBUTE_UNUSED) } else if (ttype == CPP_CLOSE_PAREN) { - if (c_lex (&t) != CPP_EOF) + if (pragma_lex (&t) != CPP_EOF) warning (0, "junk at end of %<#pragma align%>"); return; } @@ -153,13 +153,13 @@ solaris_pragma_init (cpp_reader *pfile ATTRIBUTE_UNUSED) tree t; enum cpp_ttype ttype; - if (c_lex (&t) != CPP_OPEN_PAREN) + if (pragma_lex (&t) != CPP_OPEN_PAREN) { warning (0, "malformed %<#pragma init%>, ignoring"); return; } - ttype = c_lex (&t); + ttype = pragma_lex (&t); if (ttype != CPP_NAME) { warning (0, "malformed %<#pragma init%>, ignoring"); @@ -179,10 +179,10 @@ solaris_pragma_init (cpp_reader *pfile ATTRIBUTE_UNUSED) else solaris_pending_inits = tree_cons (t, NULL, solaris_pending_inits); - ttype = c_lex (&t); + ttype = pragma_lex (&t); if (ttype == CPP_COMMA) { - ttype = c_lex (&t); + ttype = pragma_lex (&t); if (ttype != CPP_NAME) { warning (0, "malformed %<#pragma init%>"); @@ -191,7 +191,7 @@ solaris_pragma_init (cpp_reader *pfile ATTRIBUTE_UNUSED) } else if (ttype == CPP_CLOSE_PAREN) { - if (c_lex (&t) != CPP_EOF) + if (pragma_lex (&t) != CPP_EOF) warning (0, "junk at end of %<#pragma init%>"); return; } @@ -211,13 +211,13 @@ solaris_pragma_fini (cpp_reader *pfile ATTRIBUTE_UNUSED) tree t; enum cpp_ttype ttype; - if (c_lex (&t) != CPP_OPEN_PAREN) + if (pragma_lex (&t) != CPP_OPEN_PAREN) { warning (0, "malformed %<#pragma fini%>, ignoring"); return; } - ttype = c_lex (&t); + ttype = pragma_lex (&t); if (ttype != CPP_NAME) { warning (0, "malformed %<#pragma fini%>, ignoring"); @@ -237,10 +237,10 @@ solaris_pragma_fini (cpp_reader *pfile ATTRIBUTE_UNUSED) else solaris_pending_finis = tree_cons (t, NULL, solaris_pending_finis); - ttype = c_lex (&t); + ttype = pragma_lex (&t); if (ttype == CPP_COMMA) { - ttype = c_lex (&t); + ttype = pragma_lex (&t); if (ttype != CPP_NAME) { warning (0, "malformed %<#pragma fini%>"); @@ -249,7 +249,7 @@ solaris_pragma_fini (cpp_reader *pfile ATTRIBUTE_UNUSED) } else if (ttype == CPP_CLOSE_PAREN) { - if (c_lex (&t) != CPP_EOF) + if (pragma_lex (&t) != CPP_EOF) warning (0, "junk at end of %<#pragma fini%>"); return; } diff --git a/gcc/config/sparc/predicates.md b/gcc/config/sparc/predicates.md index 6754a6de10b..048d651c2e5 100644 --- a/gcc/config/sparc/predicates.md +++ b/gcc/config/sparc/predicates.md @@ -470,3 +470,9 @@ ;; and (xor ... (not ...)) to (not (xor ...)). */ (define_predicate "cc_arith_not_operator" (match_code "and,ior")) + +;; Return true if OP is memory operand with just [%reg] addressing mode. +(define_predicate "memory_reg_operand" + (and (match_code "mem") + (and (match_operand 0 "memory_operand") + (match_test "REG_P (XEXP (op, 0))")))) diff --git a/gcc/config/sparc/sparc-protos.h b/gcc/config/sparc/sparc-protos.h index 7acf2b20778..4fb862cc908 100644 --- a/gcc/config/sparc/sparc-protos.h +++ b/gcc/config/sparc/sparc-protos.h @@ -55,7 +55,7 @@ extern void sparc_output_scratch_registers (FILE *); #ifdef RTX_CODE extern enum machine_mode select_cc_mode (enum rtx_code, rtx, rtx); /* Define the function that build the compare insn for scc and bcc. */ -extern rtx gen_compare_reg (enum rtx_code code, rtx, rtx); +extern rtx gen_compare_reg (enum rtx_code code); extern void sparc_emit_float_lib_cmp (rtx, rtx, enum rtx_code); extern void sparc_emit_floatunsdi (rtx [2], enum machine_mode); extern void sparc_emit_fixunsdi (rtx [2], enum machine_mode); @@ -114,6 +114,7 @@ extern int v9_regcmp_p (enum rtx_code); extern int sparc_check_64 (rtx, rtx); extern rtx gen_df_reg (rtx, int); extern int sparc_extra_constraint_check (rtx, int, int); +extern void sparc_expand_compare_and_swap_12 (rtx, rtx, rtx, rtx); #endif /* RTX_CODE */ #endif /* __SPARC_PROTOS_H__ */ diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c index 0b18efd6f28..59ff2e17b86 100644 --- a/gcc/config/sparc/sparc.c +++ b/gcc/config/sparc/sparc.c @@ -1900,8 +1900,10 @@ select_cc_mode (enum rtx_code op, rtx x, rtx y ATTRIBUTE_UNUSED) return the rtx for the cc reg in the proper mode. */ rtx -gen_compare_reg (enum rtx_code code, rtx x, rtx y) +gen_compare_reg (enum rtx_code code) { + rtx x = sparc_compare_op0; + rtx y = sparc_compare_op1; enum machine_mode mode = SELECT_CC_MODE (code, x, y); rtx cc_reg; @@ -1990,22 +1992,20 @@ gen_compare_reg (enum rtx_code code, rtx x, rtx y) int gen_v9_scc (enum rtx_code compare_code, register rtx *operands) { - rtx temp, op0, op1; - if (! TARGET_ARCH64 && (GET_MODE (sparc_compare_op0) == DImode || GET_MODE (operands[0]) == DImode)) return 0; - op0 = sparc_compare_op0; - op1 = sparc_compare_op1; - /* Try to use the movrCC insns. */ if (TARGET_ARCH64 - && GET_MODE_CLASS (GET_MODE (op0)) == MODE_INT - && op1 == const0_rtx + && GET_MODE_CLASS (GET_MODE (sparc_compare_op0)) == MODE_INT + && sparc_compare_op1 == const0_rtx && v9_regcmp_p (compare_code)) { + rtx op0 = sparc_compare_op0; + rtx temp; + /* Special case for op0 != 0. This can be done with one instruction if operands[0] == sparc_compare_op0. */ @@ -2048,7 +2048,7 @@ gen_v9_scc (enum rtx_code compare_code, register rtx *operands) } else { - operands[1] = gen_compare_reg (compare_code, op0, op1); + operands[1] = gen_compare_reg (compare_code); switch (GET_MODE (operands[1])) { @@ -3287,7 +3287,7 @@ emit_pic_helper (void) const char *pic_name = reg_names[REGNO (pic_offset_table_rtx)]; int align; - text_section (); + switch_to_section (text_section); align = floor_log2 (FUNCTION_BOUNDARY / BITS_PER_UNIT); if (align > 0) @@ -7477,7 +7477,7 @@ sparc_output_deferred_case_vectors (void) return; /* Align to cache line in the function's code section. */ - current_function_section (current_function_decl); + switch_to_section (current_function_section ()); align = floor_log2 (FUNCTION_BOUNDARY / BITS_PER_UNIT); if (align > 0) @@ -7707,12 +7707,14 @@ sparc_init_libfuncs (void) set_conv_libfunc (sfix_optab, SImode, TFmode, "_Q_qtoi"); set_conv_libfunc (ufix_optab, SImode, TFmode, "_Q_qtou"); set_conv_libfunc (sfloat_optab, TFmode, SImode, "_Q_itoq"); + set_conv_libfunc (ufloat_optab, TFmode, SImode, "_Q_utoq"); if (DITF_CONVERSION_LIBFUNCS) { set_conv_libfunc (sfix_optab, DImode, TFmode, "_Q_qtoll"); set_conv_libfunc (ufix_optab, DImode, TFmode, "_Q_qtoull"); set_conv_libfunc (sfloat_optab, TFmode, DImode, "_Q_lltoq"); + set_conv_libfunc (ufloat_optab, TFmode, DImode, "_Q_ulltoq"); } if (SUN_CONVERSION_LIBFUNCS) @@ -8708,4 +8710,106 @@ sparc_file_end (void) file_end_indicate_exec_stack (); } +/* Expand code to perform a 8 or 16-bit compare and swap by doing 32-bit + compare and swap on the word containing the byte or half-word. */ + +void +sparc_expand_compare_and_swap_12 (rtx result, rtx mem, rtx oldval, rtx newval) +{ + rtx addr1 = force_reg (Pmode, XEXP (mem, 0)); + rtx addr = gen_reg_rtx (Pmode); + rtx off = gen_reg_rtx (SImode); + rtx oldv = gen_reg_rtx (SImode); + rtx newv = gen_reg_rtx (SImode); + rtx oldvalue = gen_reg_rtx (SImode); + rtx newvalue = gen_reg_rtx (SImode); + rtx res = gen_reg_rtx (SImode); + rtx resv = gen_reg_rtx (SImode); + rtx memsi, val, mask, end_label, loop_label, cc; + + emit_insn (gen_rtx_SET (VOIDmode, addr, + gen_rtx_AND (Pmode, addr1, GEN_INT (-4)))); + + if (Pmode != SImode) + addr1 = gen_lowpart (SImode, addr1); + emit_insn (gen_rtx_SET (VOIDmode, off, + gen_rtx_AND (SImode, addr1, GEN_INT (3)))); + + memsi = gen_rtx_MEM (SImode, addr); + MEM_VOLATILE_P (memsi) = MEM_VOLATILE_P (mem); + + val = force_reg (SImode, memsi); + + emit_insn (gen_rtx_SET (VOIDmode, off, + gen_rtx_XOR (SImode, off, + GEN_INT (GET_MODE (mem) == QImode + ? 3 : 2)))); + + emit_insn (gen_rtx_SET (VOIDmode, off, + gen_rtx_ASHIFT (SImode, off, GEN_INT (3)))); + + if (GET_MODE (mem) == QImode) + mask = force_reg (SImode, GEN_INT (0xff)); + else + mask = force_reg (SImode, GEN_INT (0xffff)); + + emit_insn (gen_rtx_SET (VOIDmode, mask, + gen_rtx_ASHIFT (SImode, mask, off))); + + emit_insn (gen_rtx_SET (VOIDmode, val, + gen_rtx_AND (SImode, gen_rtx_NOT (SImode, mask), + val))); + + oldval = gen_lowpart (SImode, oldval); + emit_insn (gen_rtx_SET (VOIDmode, oldv, + gen_rtx_ASHIFT (SImode, oldval, off))); + + newval = gen_lowpart_common (SImode, newval); + emit_insn (gen_rtx_SET (VOIDmode, newv, + gen_rtx_ASHIFT (SImode, newval, off))); + + emit_insn (gen_rtx_SET (VOIDmode, oldv, + gen_rtx_AND (SImode, oldv, mask))); + + emit_insn (gen_rtx_SET (VOIDmode, newv, + gen_rtx_AND (SImode, newv, mask))); + + end_label = gen_label_rtx (); + loop_label = gen_label_rtx (); + emit_label (loop_label); + + emit_insn (gen_rtx_SET (VOIDmode, oldvalue, + gen_rtx_IOR (SImode, oldv, val))); + + emit_insn (gen_rtx_SET (VOIDmode, newvalue, + gen_rtx_IOR (SImode, newv, val))); + + emit_insn (gen_sync_compare_and_swapsi (res, memsi, oldvalue, newvalue)); + + emit_cmp_and_jump_insns (res, oldvalue, EQ, NULL, SImode, 0, end_label); + + emit_insn (gen_rtx_SET (VOIDmode, resv, + gen_rtx_AND (SImode, gen_rtx_NOT (SImode, mask), + res))); + + sparc_compare_op0 = resv; + sparc_compare_op1 = val; + cc = gen_compare_reg (NE); + + emit_insn (gen_rtx_SET (VOIDmode, val, resv)); + + sparc_compare_emitted = cc; + emit_jump_insn (gen_bne (loop_label)); + + emit_label (end_label); + + emit_insn (gen_rtx_SET (VOIDmode, res, + gen_rtx_AND (SImode, res, mask))); + + emit_insn (gen_rtx_SET (VOIDmode, res, + gen_rtx_LSHIFTRT (SImode, res, off))); + + emit_move_insn (result, gen_lowpart (GET_MODE (result), res)); +} + #include "gt-sparc.h" diff --git a/gcc/config/sparc/sparc.h b/gcc/config/sparc/sparc.h index a72cc90910b..bb4647c1e86 100644 --- a/gcc/config/sparc/sparc.h +++ b/gcc/config/sparc/sparc.h @@ -884,6 +884,11 @@ extern int sparc_mode_class[]; #define HARD_REGNO_MODE_OK(REGNO, MODE) \ ((hard_regno_mode_classes[REGNO] & sparc_mode_class[MODE]) != 0) +/* Value is 1 if it is OK to rename a hard register FROM to another hard + register TO. We cannot rename %g1 as it may be used before the save + register window instruction in the prologue. */ +#define HARD_REGNO_RENAME_OK(FROM, TO) ((FROM) != 1) + /* Value is 1 if it is a good idea to tie two pseudo registers when one has mode MODE1 and one has mode MODE2. If HARD_REGNO_MODE_OK could produce different values for MODE1 and MODE2, diff --git a/gcc/config/sparc/sparc.md b/gcc/config/sparc/sparc.md index db0348888b0..10727cb3416 100644 --- a/gcc/config/sparc/sparc.md +++ b/gcc/config/sparc/sparc.md @@ -69,6 +69,10 @@ (UNSPECV_FLUSH 4) (UNSPECV_SETJMP 5) (UNSPECV_SAVEW 6) + (UNSPECV_MEMBAR 7) + (UNSPECV_CAS 8) + (UNSPECV_SWAP 9) + (UNSPECV_LDSTUB 10) ]) ;; The upper 32 fp regs on the v9 can't hold SFmode values. To deal with this @@ -803,7 +807,7 @@ if (gen_v9_scc (LTU, operands)) DONE; } - operands[1] = gen_compare_reg (LTU, sparc_compare_op0, sparc_compare_op1); + operands[1] = gen_compare_reg (LTU); }) (define_expand "sgeu" @@ -816,7 +820,7 @@ if (gen_v9_scc (GEU, operands)) DONE; } - operands[1] = gen_compare_reg (GEU, sparc_compare_op0, sparc_compare_op1); + operands[1] = gen_compare_reg (GEU); }) (define_expand "sleu" @@ -1267,7 +1271,7 @@ emit_jump_insn (gen_bne (operands[0])); DONE; } - operands[1] = gen_compare_reg (EQ, sparc_compare_op0, sparc_compare_op1); + operands[1] = gen_compare_reg (EQ); }) (define_expand "bne" @@ -1290,7 +1294,7 @@ emit_jump_insn (gen_bne (operands[0])); DONE; } - operands[1] = gen_compare_reg (NE, sparc_compare_op0, sparc_compare_op1); + operands[1] = gen_compare_reg (NE); }) (define_expand "bgt" @@ -1313,7 +1317,7 @@ emit_jump_insn (gen_bne (operands[0])); DONE; } - operands[1] = gen_compare_reg (GT, sparc_compare_op0, sparc_compare_op1); + operands[1] = gen_compare_reg (GT); }) (define_expand "bgtu" @@ -1323,7 +1327,7 @@ (pc)))] "" { - operands[1] = gen_compare_reg (GTU, sparc_compare_op0, sparc_compare_op1); + operands[1] = gen_compare_reg (GTU); }) (define_expand "blt" @@ -1346,7 +1350,7 @@ emit_jump_insn (gen_bne (operands[0])); DONE; } - operands[1] = gen_compare_reg (LT, sparc_compare_op0, sparc_compare_op1); + operands[1] = gen_compare_reg (LT); }) (define_expand "bltu" @@ -1356,7 +1360,7 @@ (pc)))] "" { - operands[1] = gen_compare_reg (LTU, sparc_compare_op0, sparc_compare_op1); + operands[1] = gen_compare_reg (LTU); }) (define_expand "bge" @@ -1379,7 +1383,7 @@ emit_jump_insn (gen_bne (operands[0])); DONE; } - operands[1] = gen_compare_reg (GE, sparc_compare_op0, sparc_compare_op1); + operands[1] = gen_compare_reg (GE); }) (define_expand "bgeu" @@ -1389,7 +1393,7 @@ (pc)))] "" { - operands[1] = gen_compare_reg (GEU, sparc_compare_op0, sparc_compare_op1); + operands[1] = gen_compare_reg (GEU); }) (define_expand "ble" @@ -1412,7 +1416,7 @@ emit_jump_insn (gen_bne (operands[0])); DONE; } - operands[1] = gen_compare_reg (LE, sparc_compare_op0, sparc_compare_op1); + operands[1] = gen_compare_reg (LE); }) (define_expand "bleu" @@ -1422,7 +1426,7 @@ (pc)))] "" { - operands[1] = gen_compare_reg (LEU, sparc_compare_op0, sparc_compare_op1); + operands[1] = gen_compare_reg (LEU); }) (define_expand "bunordered" @@ -1439,8 +1443,7 @@ emit_jump_insn (gen_beq (operands[0])); DONE; } - operands[1] = gen_compare_reg (UNORDERED, sparc_compare_op0, - sparc_compare_op1); + operands[1] = gen_compare_reg (UNORDERED); }) (define_expand "bordered" @@ -1456,8 +1459,7 @@ emit_jump_insn (gen_bne (operands[0])); DONE; } - operands[1] = gen_compare_reg (ORDERED, sparc_compare_op0, - sparc_compare_op1); + operands[1] = gen_compare_reg (ORDERED); }) (define_expand "bungt" @@ -1473,7 +1475,7 @@ emit_jump_insn (gen_bgt (operands[0])); DONE; } - operands[1] = gen_compare_reg (UNGT, sparc_compare_op0, sparc_compare_op1); + operands[1] = gen_compare_reg (UNGT); }) (define_expand "bunlt" @@ -1489,7 +1491,7 @@ emit_jump_insn (gen_bne (operands[0])); DONE; } - operands[1] = gen_compare_reg (UNLT, sparc_compare_op0, sparc_compare_op1); + operands[1] = gen_compare_reg (UNLT); }) (define_expand "buneq" @@ -1505,7 +1507,7 @@ emit_jump_insn (gen_beq (operands[0])); DONE; } - operands[1] = gen_compare_reg (UNEQ, sparc_compare_op0, sparc_compare_op1); + operands[1] = gen_compare_reg (UNEQ); }) (define_expand "bunge" @@ -1521,7 +1523,7 @@ emit_jump_insn (gen_bne (operands[0])); DONE; } - operands[1] = gen_compare_reg (UNGE, sparc_compare_op0, sparc_compare_op1); + operands[1] = gen_compare_reg (UNGE); }) (define_expand "bunle" @@ -1537,7 +1539,7 @@ emit_jump_insn (gen_bne (operands[0])); DONE; } - operands[1] = gen_compare_reg (UNLE, sparc_compare_op0, sparc_compare_op1); + operands[1] = gen_compare_reg (UNLE); }) (define_expand "bltgt" @@ -1553,7 +1555,7 @@ emit_jump_insn (gen_bne (operands[0])); DONE; } - operands[1] = gen_compare_reg (LTGT, sparc_compare_op0, sparc_compare_op1); + operands[1] = gen_compare_reg (LTGT); }) ;; Now match both normal and inverted jump. @@ -3025,8 +3027,7 @@ } else { - rtx cc_reg = gen_compare_reg (code, - sparc_compare_op0, sparc_compare_op1); + rtx cc_reg = gen_compare_reg (code); operands[1] = gen_rtx_fmt_ee (code, GET_MODE (cc_reg), cc_reg, const0_rtx); } }) @@ -3054,8 +3055,7 @@ } else { - rtx cc_reg = gen_compare_reg (code, - sparc_compare_op0, sparc_compare_op1); + rtx cc_reg = gen_compare_reg (code); operands[1] = gen_rtx_fmt_ee (code, GET_MODE (cc_reg), cc_reg, const0_rtx); } }) @@ -3079,8 +3079,7 @@ } else { - rtx cc_reg = gen_compare_reg (code, - sparc_compare_op0, sparc_compare_op1); + rtx cc_reg = gen_compare_reg (code); operands[1] = gen_rtx_fmt_ee (code, GET_MODE (cc_reg), cc_reg, const0_rtx); } @@ -3105,8 +3104,7 @@ } else { - rtx cc_reg = gen_compare_reg (code, - sparc_compare_op0, sparc_compare_op1); + rtx cc_reg = gen_compare_reg (code); operands[1] = gen_rtx_fmt_ee (code, GET_MODE (cc_reg), cc_reg, const0_rtx); } @@ -3135,8 +3133,7 @@ } else { - rtx cc_reg = gen_compare_reg (code, - sparc_compare_op0, sparc_compare_op1); + rtx cc_reg = gen_compare_reg (code); operands[1] = gen_rtx_fmt_ee (code, GET_MODE (cc_reg), cc_reg, const0_rtx); } }) @@ -3164,8 +3161,7 @@ } else { - rtx cc_reg = gen_compare_reg (code, - sparc_compare_op0, sparc_compare_op1); + rtx cc_reg = gen_compare_reg (code); operands[1] = gen_rtx_fmt_ee (code, GET_MODE (cc_reg), cc_reg, const0_rtx); } }) @@ -3193,8 +3189,7 @@ } else { - rtx cc_reg = gen_compare_reg (code, - sparc_compare_op0, sparc_compare_op1); + rtx cc_reg = gen_compare_reg (code); operands[1] = gen_rtx_fmt_ee (code, GET_MODE (cc_reg), cc_reg, const0_rtx); } }) @@ -7567,8 +7562,7 @@ [(trap_if (match_operator 0 "noov_compare_operator" [(match_dup 2) (match_dup 3)]) (match_operand:SI 1 "arith_operand" ""))] "" - "operands[2] = gen_compare_reg (GET_CODE (operands[0]), - sparc_compare_op0, sparc_compare_op1); + "operands[2] = gen_compare_reg (GET_CODE (operands[0])); if (GET_MODE (operands[2]) != CCmode && GET_MODE (operands[2]) != CCXmode) FAIL; operands[3] = const0_rtx;") @@ -8486,3 +8480,5 @@ "pdist\t%1, %2, %0" [(set_attr "type" "fga") (set_attr "fptype" "double")]) + +(include "sync.md") diff --git a/gcc/config/sparc/sync.md b/gcc/config/sparc/sync.md new file mode 100644 index 00000000000..133792127e5 --- /dev/null +++ b/gcc/config/sparc/sync.md @@ -0,0 +1,208 @@ +;; GCC machine description for SPARC synchronization instructions. +;; Copyright (C) 2005 +;; 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, 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. + +(define_mode_macro I12MODE [QI HI]) +(define_mode_macro I24MODE [HI SI]) +(define_mode_macro I48MODE [SI (DI "TARGET_ARCH64 || TARGET_V8PLUS")]) +(define_mode_attr modesuffix [(SI "") (DI "x")]) + +(define_expand "memory_barrier" + [(set (mem:BLK (match_dup 0)) + (unspec_volatile:BLK [(mem:BLK (match_dup 0)) (match_dup 1)] + UNSPECV_MEMBAR))] + "TARGET_V8 || TARGET_V9" +{ + operands[0] = gen_rtx_MEM (BLKmode, gen_rtx_SCRATCH (DImode)); + MEM_VOLATILE_P (operands[0]) = 1; + if (TARGET_V9) + /* member #StoreStore | #LoadStore | #StoreLoad | #LoadLoad */ + operands[1] = GEN_INT (15); + else + /* stbar */ + operands[1] = GEN_INT (8); +}) + +(define_insn "*stbar" + [(set (match_operand:BLK 0 "" "") + (unspec_volatile:BLK [(match_operand:BLK 1 "" "") + (const_int 8)] UNSPECV_MEMBAR))] + "TARGET_V8" + "stbar" + [(set_attr "type" "multi")]) + +(define_insn "*membar" + [(set (match_operand:BLK 0 "" "") + (unspec_volatile:BLK [(match_operand:BLK 1 "" "") + (match_operand:SI 2 "immediate_operand" "I")] + UNSPECV_MEMBAR))] + "TARGET_V9" + "membar\t%2" + [(set_attr "type" "multi")]) + +(define_expand "sync_compare_and_swap" + [(match_operand:I12MODE 0 "register_operand" "") + (match_operand:I12MODE 1 "memory_operand" "") + (match_operand:I12MODE 2 "register_operand" "") + (match_operand:I12MODE 3 "register_operand" "")] + "TARGET_V9" +{ + sparc_expand_compare_and_swap_12 (operands[0], operands[1], + operands[2], operands[3]); + DONE; +}) + +(define_expand "sync_compare_and_swap" + [(parallel + [(set (match_operand:I48MODE 0 "register_operand" "=r") + (match_operand:I48MODE 1 "memory_operand" "")) + (set (match_dup 1) + (unspec_volatile:I48MODE + [(match_operand:I48MODE 2 "register_operand" "") + (match_operand:I48MODE 3 "register_operand" "")] + UNSPECV_CAS))])] + "TARGET_V9" +{ + if (! REG_P (XEXP (operands[1], 0))) + { + rtx addr = force_reg (Pmode, XEXP (operands[1], 0)); + operands[1] = replace_equiv_address (operands[1], addr); + } + emit_insn (gen_memory_barrier ()); +}) + +(define_insn "*sync_compare_and_swap" + [(set (match_operand:I48MODE 0 "register_operand" "=r") + (match_operand:I48MODE 1 "memory_reg_operand" "+m")) + (set (match_dup 1) + (unspec_volatile:I48MODE + [(match_operand:I48MODE 2 "register_operand" "r") + (match_operand:I48MODE 3 "register_operand" "0")] + UNSPECV_CAS))] + "TARGET_V9 && (mode == SImode || TARGET_ARCH64)" + "cas\t%1, %2, %0" + [(set_attr "type" "multi")]) + +(define_insn "*sync_compare_and_swapdi_v8plus" + [(set (match_operand:DI 0 "register_operand" "=h") + (match_operand:DI 1 "memory_reg_operand" "+m")) + (set (match_dup 1) + (unspec_volatile:DI + [(match_operand:DI 2 "register_operand" "h") + (match_operand:DI 3 "register_operand" "0")] + UNSPECV_CAS))] + "TARGET_V8PLUS" +{ + if (sparc_check_64 (operands[3], insn) <= 0) + output_asm_insn ("srl\t%L3, 0, %L3", operands); + output_asm_insn ("sllx\t%H3, 32, %H3", operands); + output_asm_insn ("or\t%L3, %H3, %L3", operands); + if (sparc_check_64 (operands[2], insn) <= 0) + output_asm_insn ("srl\t%L2, 0, %L2", operands); + output_asm_insn ("sllx\t%H2, 32, %H3", operands); + output_asm_insn ("or\t%L2, %H3, %H3", operands); + output_asm_insn ("casx\t%1, %H3, %L3", operands); + return "srlx\t%L3, 32, %H3"; +} + [(set_attr "type" "multi") + (set_attr "length" "8")]) + +(define_expand "sync_lock_test_and_set" + [(match_operand:I12MODE 0 "register_operand" "") + (match_operand:I12MODE 1 "memory_operand" "") + (match_operand:I12MODE 2 "arith_operand" "")] + "!TARGET_V9" +{ + if (operands[2] != const1_rtx) + FAIL; + if (TARGET_V8) + emit_insn (gen_memory_barrier ()); + if (mode != QImode) + operands[1] = adjust_address (operands[1], QImode, 0); + emit_insn (gen_ldstub (operands[0], operands[1])); + DONE; +}) + +(define_expand "sync_lock_test_and_setsi" + [(parallel + [(set (match_operand:SI 0 "register_operand" "") + (unspec_volatile:SI [(match_operand:SI 1 "memory_operand" "")] + UNSPECV_SWAP)) + (set (match_dup 1) + (match_operand:SI 2 "arith_operand" ""))])] + "" +{ + if (! TARGET_V8 && ! TARGET_V9) + { + if (operands[2] != const1_rtx) + FAIL; + operands[1] = adjust_address (operands[1], QImode, 0); + emit_insn (gen_ldstubsi (operands[0], operands[1])); + DONE; + } + emit_insn (gen_memory_barrier ()); + operands[2] = force_reg (SImode, operands[2]); +}) + +(define_insn "*swapsi" + [(set (match_operand:SI 0 "register_operand" "=r") + (unspec_volatile:SI [(match_operand:SI 1 "memory_operand" "+m")] + UNSPECV_SWAP)) + (set (match_dup 1) + (match_operand:SI 2 "register_operand" "0"))] + "TARGET_V8 || TARGET_V9" + "swap\t%1, %0" + [(set_attr "type" "multi")]) + +(define_expand "ldstubqi" + [(parallel [(set (match_operand:QI 0 "register_operand" "") + (unspec_volatile:QI [(match_operand:QI 1 "memory_operand" "")] + UNSPECV_LDSTUB)) + (set (match_dup 1) (const_int -1))])] + "" + "") + +(define_expand "ldstub" + [(parallel [(set (match_operand:I24MODE 0 "register_operand" "") + (zero_extend:I24MODE + (unspec_volatile:QI [(match_operand:QI 1 "memory_operand" "")] + UNSPECV_LDSTUB))) + (set (match_dup 1) (const_int -1))])] + "" + "") + +(define_insn "*ldstubqi" + [(set (match_operand:QI 0 "register_operand" "=r") + (unspec_volatile:QI [(match_operand:QI 1 "memory_operand" "+m")] + UNSPECV_LDSTUB)) + (set (match_dup 1) (const_int -1))] + "" + "ldstub\t%1, %0" + [(set_attr "type" "multi")]) + +(define_insn "*ldstub" + [(set (match_operand:I24MODE 0 "register_operand" "=r") + (zero_extend:I24MODE + (unspec_volatile:QI [(match_operand:QI 1 "memory_operand" "+m")] + UNSPECV_LDSTUB))) + (set (match_dup 1) (const_int -1))] + "" + "ldstub\t%1, %0" + [(set_attr "type" "multi")]) diff --git a/gcc/config/stormy16/stormy16-protos.h b/gcc/config/stormy16/stormy16-protos.h index 1cc9c4fd098..32c5ea6d2d5 100644 --- a/gcc/config/stormy16/stormy16-protos.h +++ b/gcc/config/stormy16/stormy16-protos.h @@ -29,7 +29,6 @@ extern int direct_return (void); extern int xstormy16_interrupt_function_p (void); extern int xstormy16_epilogue_uses (int); extern void xstormy16_function_profiler (void); -extern void bss100_section (void); #if defined (TREE_CODE) extern void xstormy16_asm_output_aligned_common (FILE *, tree, const char *, diff --git a/gcc/config/stormy16/stormy16.c b/gcc/config/stormy16/stormy16.c index d1f33c7b719..76becfc4f11 100644 --- a/gcc/config/stormy16/stormy16.c +++ b/gcc/config/stormy16/stormy16.c @@ -47,6 +47,7 @@ Boston, MA 02110-1301, USA. */ #include "tm_p.h" #include "langhooks.h" #include "tree-gimple.h" +#include "ggc.h" static rtx emit_addhi3_postreload (rtx, rtx, rtx); static void xstormy16_asm_out_constructor (rtx, int); @@ -65,6 +66,8 @@ static bool xstormy16_return_in_memory (tree, tree); struct rtx_def * xstormy16_compare_op0; struct rtx_def * xstormy16_compare_op1; +static GTY(()) section *bss100_section; + /* 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. */ @@ -1365,20 +1368,20 @@ xstormy16_expand_builtin_va_start (tree valist, rtx nextarg ATTRIBUTE_UNUSED) f_base = TYPE_FIELDS (va_list_type_node); f_count = TREE_CHAIN (f_base); - base = build (COMPONENT_REF, TREE_TYPE (f_base), valist, f_base, NULL_TREE); - count = build (COMPONENT_REF, TREE_TYPE (f_count), valist, f_count, - NULL_TREE); + base = build3 (COMPONENT_REF, TREE_TYPE (f_base), valist, f_base, NULL_TREE); + count = build3 (COMPONENT_REF, TREE_TYPE (f_count), valist, f_count, + NULL_TREE); t = make_tree (TREE_TYPE (base), virtual_incoming_args_rtx); - t = build (PLUS_EXPR, TREE_TYPE (base), t, - build_int_cst (NULL_TREE, INCOMING_FRAME_SP_OFFSET)); - t = build (MODIFY_EXPR, TREE_TYPE (base), base, t); + t = build2 (PLUS_EXPR, TREE_TYPE (base), t, + build_int_cst (NULL_TREE, INCOMING_FRAME_SP_OFFSET)); + t = build2 (MODIFY_EXPR, TREE_TYPE (base), base, t); TREE_SIDE_EFFECTS (t) = 1; expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL); - t = build (MODIFY_EXPR, TREE_TYPE (count), count, - build_int_cst (NULL_TREE, - current_function_args_info * UNITS_PER_WORD)); + t = build2 (MODIFY_EXPR, TREE_TYPE (count), count, + build_int_cst (NULL_TREE, + current_function_args_info * UNITS_PER_WORD)); TREE_SIDE_EFFECTS (t) = 1; expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL); } @@ -1401,9 +1404,9 @@ xstormy16_expand_builtin_va_arg (tree valist, tree type, tree *pre_p, f_base = TYPE_FIELDS (va_list_type_node); f_count = TREE_CHAIN (f_base); - base = build (COMPONENT_REF, TREE_TYPE (f_base), valist, f_base, NULL_TREE); - count = build (COMPONENT_REF, TREE_TYPE (f_count), valist, f_count, - NULL_TREE); + base = build3 (COMPONENT_REF, TREE_TYPE (f_base), valist, f_base, NULL_TREE); + count = build3 (COMPONENT_REF, TREE_TYPE (f_count), valist, f_count, + NULL_TREE); must_stack = targetm.calls.must_pass_in_stack (TYPE_MODE (type), type); size_tree = round_up (size_in_bytes (type), UNITS_PER_WORD); @@ -1421,23 +1424,23 @@ xstormy16_expand_builtin_va_arg (tree valist, tree type, tree *pre_p, tree r; t = fold_convert (TREE_TYPE (count), size_tree); - t = build (PLUS_EXPR, TREE_TYPE (count), count_tmp, t); + t = build2 (PLUS_EXPR, TREE_TYPE (count), count_tmp, t); r = fold_convert (TREE_TYPE (count), size_int (size_of_reg_args)); - t = build (GT_EXPR, boolean_type_node, t, r); - t = build (COND_EXPR, void_type_node, t, - build (GOTO_EXPR, void_type_node, lab_fromstack), - NULL); + t = build2 (GT_EXPR, boolean_type_node, t, r); + t = build3 (COND_EXPR, void_type_node, t, + build1 (GOTO_EXPR, void_type_node, lab_fromstack), + NULL_TREE); gimplify_and_add (t, pre_p); t = fold_convert (ptr_type_node, count_tmp); - t = build (PLUS_EXPR, ptr_type_node, base, t); - t = build (MODIFY_EXPR, void_type_node, addr, t); + t = build2 (PLUS_EXPR, ptr_type_node, base, t); + t = build2 (MODIFY_EXPR, void_type_node, addr, t); gimplify_and_add (t, pre_p); - t = build (GOTO_EXPR, void_type_node, lab_gotaddr); + t = build1 (GOTO_EXPR, void_type_node, lab_gotaddr); gimplify_and_add (t, pre_p); - t = build (LABEL_EXPR, void_type_node, lab_fromstack); + t = build1 (LABEL_EXPR, void_type_node, lab_fromstack); gimplify_and_add (t, pre_p); } @@ -1450,31 +1453,31 @@ xstormy16_expand_builtin_va_arg (tree valist, tree type, tree *pre_p, tree r, u; r = size_int (NUM_ARGUMENT_REGISTERS * UNITS_PER_WORD); - u = build (MODIFY_EXPR, void_type_node, count_tmp, r); + u = build2 (MODIFY_EXPR, void_type_node, count_tmp, r); t = fold_convert (TREE_TYPE (count), r); - t = build (GE_EXPR, boolean_type_node, count_tmp, t); - t = build (COND_EXPR, void_type_node, t, NULL, u); + t = build2 (GE_EXPR, boolean_type_node, count_tmp, t); + t = build3 (COND_EXPR, void_type_node, t, NULL_TREE, u); gimplify_and_add (t, pre_p); } t = size_int (NUM_ARGUMENT_REGISTERS * UNITS_PER_WORD - INCOMING_FRAME_SP_OFFSET); t = fold_convert (TREE_TYPE (count), t); - t = build (MINUS_EXPR, TREE_TYPE (count), count_tmp, t); - t = build (PLUS_EXPR, TREE_TYPE (count), t, - fold_convert (TREE_TYPE (count), size_tree)); + t = build2 (MINUS_EXPR, TREE_TYPE (count), count_tmp, t); + t = build2 (PLUS_EXPR, TREE_TYPE (count), t, + fold_convert (TREE_TYPE (count), size_tree)); t = fold_convert (TREE_TYPE (base), fold (t)); - t = build (MINUS_EXPR, TREE_TYPE (base), base, t); - t = build (MODIFY_EXPR, void_type_node, addr, t); + t = build2 (MINUS_EXPR, TREE_TYPE (base), base, t); + t = build2 (MODIFY_EXPR, void_type_node, addr, t); gimplify_and_add (t, pre_p); - t = build (LABEL_EXPR, void_type_node, lab_gotaddr); + t = build1 (LABEL_EXPR, void_type_node, lab_gotaddr); gimplify_and_add (t, pre_p); t = fold_convert (TREE_TYPE (count), size_tree); - t = build (PLUS_EXPR, TREE_TYPE (count), count_tmp, t); - t = build (MODIFY_EXPR, TREE_TYPE (count), count, t); + t = build2 (PLUS_EXPR, TREE_TYPE (count), count_tmp, t); + t = build2 (MODIFY_EXPR, TREE_TYPE (count), count, t); gimplify_and_add (t, pre_p); addr = fold_convert (build_pointer_type (type), addr); @@ -1593,7 +1596,7 @@ xstormy16_asm_output_aligned_common (FILE *stream, const char *name2; int p2align = 0; - bss100_section (); + switch_to_section (bss100_section); while (align > 8) { @@ -1623,6 +1626,17 @@ xstormy16_asm_output_aligned_common (FILE *stream, fprintf (stream, ",%u,%u\n", size, align / BITS_PER_UNIT); } +/* Implement TARGET_ASM_INIT_SECTIONS. */ + +static void +xstormy16_asm_init_sections (void) +{ + bss100_section + = get_unnamed_section (SECTION_WRITE | SECTION_BSS, + output_section_asm_op, + "\t.section \".bss_below100\",\"aw\",@nobits"); +} + /* Mark symbols with the "below100" attribute so that we can use the special addressing modes for them. */ @@ -1666,7 +1680,7 @@ xstormy16_asm_out_destructor (rtx symbol, int priority) section = buf; } - named_section_flags (section, 0); + switch_to_section (get_section (section, 0, NULL)); assemble_align (POINTER_SIZE); assemble_integer (symbol, POINTER_SIZE / BITS_PER_UNIT, POINTER_SIZE, 1); } @@ -1688,7 +1702,7 @@ xstormy16_asm_out_constructor (rtx symbol, int priority) section = buf; } - named_section_flags (section, 0); + switch_to_section (get_section (section, 0, NULL)); assemble_align (POINTER_SIZE); assemble_integer (symbol, POINTER_SIZE / BITS_PER_UNIT, POINTER_SIZE, 1); } @@ -1917,7 +1931,7 @@ xstormy16_output_addr_vec (FILE *file, rtx label ATTRIBUTE_UNUSED, rtx table) { int vlen, idx; - current_function_section (current_function_decl); + switch_to_section (current_function_section ()); vlen = XVECLEN (table, 0); for (idx = 0; idx < vlen; idx++) @@ -2668,3 +2682,5 @@ xstormy16_return_in_memory (tree type, tree fntype ATTRIBUTE_UNUSED) #define TARGET_MACHINE_DEPENDENT_REORG xstormy16_reorg struct gcc_target targetm = TARGET_INITIALIZER; + +#include "gt-stormy16.h" diff --git a/gcc/config/stormy16/stormy16.h b/gcc/config/stormy16/stormy16.h index e37d19ab174..faf04727f98 100644 --- a/gcc/config/stormy16/stormy16.h +++ b/gcc/config/stormy16/stormy16.h @@ -618,29 +618,10 @@ do { \ #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\"" -#define EXTRA_SECTIONS in_bss100 - -/* We define the function body in a separate macro so that if we ever - add another section, we can just add an entry to - EXTRA_SECTION_FUNCTIONS without making it difficult to read. It is - not used anywhere else. */ -#define XSTORMY16_SECTION_FUNCTION(name, in, string, bits) \ - void \ - name () \ - { \ - if (in_section != in) \ - { \ - fprintf (asm_out_file, "\t.section %s,\"aw\",@%sbits\n", string, bits); \ - in_section = in; \ - } \ - } - -#undef EXTRA_SECTION_FUNCTIONS -#define EXTRA_SECTION_FUNCTIONS \ - XSTORMY16_SECTION_FUNCTION (bss100_section, in_bss100, ".bss_below100", "no") -#define JUMP_TABLES_IN_TEXT_SECTION 1 +#define TARGET_ASM_INIT_SECTIONS xstormy16_asm_init_sections +#define JUMP_TABLES_IN_TEXT_SECTION 1 /* The Overall Framework of an Assembler File. */ diff --git a/gcc/config/svr3.h b/gcc/config/svr3.h index ffdac98d335..283ebf0cdd7 100644 --- a/gcc/config/svr3.h +++ b/gcc/config/svr3.h @@ -54,7 +54,7 @@ Boston, MA 02110-1301, USA. */ do { \ int align = exact_log2 (ROUNDED); \ if (align > 2) align = 2; \ - data_section (); \ + switch_to_section (data_section); \ ASM_OUTPUT_ALIGN ((FILE), align == -1 ? 2 : align); \ ASM_OUTPUT_LABEL ((FILE), (NAME)); \ fprintf ((FILE), "\t.set .,.+%u\n", (int)(ROUNDED)); \ @@ -159,33 +159,3 @@ do { \ } while (0) #endif /* STACK_GROWS_DOWNWARD */ - -#undef EXTRA_SECTIONS -#define EXTRA_SECTIONS in_init, in_fini - -#undef EXTRA_SECTION_FUNCTIONS -#define EXTRA_SECTION_FUNCTIONS \ - INIT_SECTION_FUNCTION \ - FINI_SECTION_FUNCTION - -#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; \ - } \ -} diff --git a/gcc/config/t-darwin b/gcc/config/t-darwin index d59f0b7a162..3e524f36901 100644 --- a/gcc/config/t-darwin +++ b/gcc/config/t-darwin @@ -1,11 +1,12 @@ darwin.o: $(srcdir)/config/darwin.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ $(TM_H) $(RTL_H) $(REGS_H) hard-reg-set.h $(REAL_H) insn-config.h \ conditions.h insn-flags.h output.h insn-attr.h flags.h $(TREE_H) expr.h \ - reload.h function.h $(GGC_H) langhooks.h $(TARGET_H) $(TM_P_H) gt-darwin.h + reload.h function.h $(GGC_H) langhooks.h $(TARGET_H) $(TM_P_H) gt-darwin.h \ + config/darwin-sections.def $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(srcdir)/config/darwin.c darwin-c.o: $(srcdir)/config/darwin-c.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ - $(TM_H) $(CPPLIB_H) tree.h c-pragma.h $(C_TREE_H) toplev.h $(TM_P_H) \ + $(TM_H) $(CPPLIB_H) $(TREE_H) c-pragma.h $(C_TREE_H) toplev.h $(TM_P_H) \ c-incpath.h flags.h $(C_COMMON_H) $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(srcdir)/config/darwin-c.c $(PREPROCESSOR_DEFINES) diff --git a/gcc/config/t-slibgcc-darwin b/gcc/config/t-slibgcc-darwin index 2e1f5c83d54..e90f500d74c 100644 --- a/gcc/config/t-slibgcc-darwin +++ b/gcc/config/t-slibgcc-darwin @@ -14,7 +14,7 @@ SHLIB_DIR = @multilib_dir@ # uses the stub versions named by $(LIBGCC). SHLIB_LINK = $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -dynamiclib -nodefaultlibs \ -Wl,-install_name,$(slibdir)/$(SHLIB_SONAME) \ - -Wl,-flat_namespace -o $(SHLIB_SONAME).tmp \ + -single_module -o $(SHLIB_SONAME).tmp \ -Wl,-exported_symbols_list,$(SHLIB_MAP) \ $(SHLIB_VERSTRING) \ @multilib_flags@ $(SHLIB_OBJS) -lc && \ diff --git a/gcc/config/v850/v850-c.c b/gcc/config/v850/v850-c.c index cbb86cdd426..0dbeb2eb550 100644 --- a/gcc/config/v850/v850-c.c +++ b/gcc/config/v850/v850-c.c @@ -125,7 +125,7 @@ ghs_pragma_section (cpp_reader * pfile ATTRIBUTE_UNUSED) const char *sect, *alias; enum GHS_section_kind kind; - type = c_lex (&x); + type = pragma_lex (&x); if (type == CPP_EOF && !repeat) goto reset; @@ -135,14 +135,14 @@ ghs_pragma_section (cpp_reader * pfile ATTRIBUTE_UNUSED) goto bad; repeat = 0; - if (c_lex (&x) != CPP_EQ) + if (pragma_lex (&x) != CPP_EQ) goto bad; - if (c_lex (&x) != CPP_NAME) + if (pragma_lex (&x) != CPP_NAME) goto bad; alias = IDENTIFIER_POINTER (x); - type = c_lex (&x); + type = pragma_lex (&x); if (type == CPP_COMMA) repeat = 1; else if (type != CPP_EOF) @@ -196,7 +196,7 @@ ghs_pragma_interrupt (cpp_reader * pfile ATTRIBUTE_UNUSED) { tree x; - if (c_lex (&x) != CPP_EOF) + if (pragma_lex (&x) != CPP_EOF) warning (OPT_Wpragmas, "junk at end of #pragma ghs interrupt"); mark_current_function_as_interrupt (); @@ -207,7 +207,7 @@ ghs_pragma_starttda (cpp_reader * pfile ATTRIBUTE_UNUSED) { tree x; - if (c_lex (&x) != CPP_EOF) + if (pragma_lex (&x) != CPP_EOF) warning (OPT_Wpragmas, "junk at end of #pragma ghs starttda"); push_data_area (DATA_AREA_TDA); @@ -218,7 +218,7 @@ ghs_pragma_startsda (cpp_reader * pfile ATTRIBUTE_UNUSED) { tree x; - if (c_lex (&x) != CPP_EOF) + if (pragma_lex (&x) != CPP_EOF) warning (OPT_Wpragmas, "junk at end of #pragma ghs startsda"); push_data_area (DATA_AREA_SDA); @@ -229,7 +229,7 @@ ghs_pragma_startzda (cpp_reader * pfile ATTRIBUTE_UNUSED) { tree x; - if (c_lex (&x) != CPP_EOF) + if (pragma_lex (&x) != CPP_EOF) warning (OPT_Wpragmas, "junk at end of #pragma ghs startzda"); push_data_area (DATA_AREA_ZDA); @@ -240,7 +240,7 @@ ghs_pragma_endtda (cpp_reader * pfile ATTRIBUTE_UNUSED) { tree x; - if (c_lex (&x) != CPP_EOF) + if (pragma_lex (&x) != CPP_EOF) warning (OPT_Wpragmas, "junk at end of #pragma ghs endtda"); pop_data_area (DATA_AREA_TDA); @@ -251,7 +251,7 @@ ghs_pragma_endsda (cpp_reader * pfile ATTRIBUTE_UNUSED) { tree x; - if (c_lex (&x) != CPP_EOF) + if (pragma_lex (&x) != CPP_EOF) warning (OPT_Wpragmas, "junk at end of #pragma ghs endsda"); pop_data_area (DATA_AREA_SDA); @@ -262,7 +262,7 @@ ghs_pragma_endzda (cpp_reader * pfile ATTRIBUTE_UNUSED) { tree x; - if (c_lex (&x) != CPP_EOF) + if (pragma_lex (&x) != CPP_EOF) warning (OPT_Wpragmas, "junk at end of #pragma ghs endzda"); pop_data_area (DATA_AREA_ZDA); diff --git a/gcc/config/v850/v850-protos.h b/gcc/config/v850/v850-protos.h index aff12412fed..8374b53c105 100644 --- a/gcc/config/v850/v850-protos.h +++ b/gcc/config/v850/v850-protos.h @@ -27,13 +27,6 @@ extern void expand_prologue (void); extern void expand_epilogue (void); -extern void sdata_section (void); -extern void rosdata_section (void); -extern void sbss_section (void); -extern void tdata_section (void); -extern void zdata_section (void); -extern void rozdata_section (void); -extern void zbss_section (void); extern int v850_handle_pragma (int (*)(void), void (*)(int), char *); extern int compute_register_save_size (long *); extern int compute_frame_size (int, long *); diff --git a/gcc/config/v850/v850.c b/gcc/config/v850/v850.c index e77d56ab5e7..7629a7af3a7 100644 --- a/gcc/config/v850/v850.c +++ b/gcc/config/v850/v850.c @@ -62,7 +62,8 @@ const struct attribute_spec v850_attribute_table[]; static tree v850_handle_interrupt_attribute (tree *, tree, tree, int, bool *); static tree v850_handle_data_area_attribute (tree *, tree, tree, int, bool *); static void v850_insert_attributes (tree, tree *); -static void v850_select_section (tree, int, unsigned HOST_WIDE_INT); +static void v850_asm_init_sections (void); +static section *v850_select_section (tree, int, unsigned HOST_WIDE_INT); static void v850_encode_data_area (tree, rtx); static void v850_encode_section_info (tree, rtx, int); static bool v850_return_in_memory (tree, tree); @@ -96,6 +97,12 @@ static int v850_interrupt_cache_p = FALSE; /* Whether current function is an interrupt handler. */ static int v850_interrupt_p = FALSE; + +static GTY(()) section *rosdata_section; +static GTY(()) section *rozdata_section; +static GTY(()) section *tdata_section; +static GTY(()) section *zdata_section; +static GTY(()) section *zbss_section; /* Initialize the GCC target structure. */ #undef TARGET_ASM_ALIGNED_HI_OP @@ -2498,18 +2505,18 @@ v850_output_aligned_bss (FILE * file, switch (v850_get_data_area (decl)) { case DATA_AREA_ZDA: - zbss_section (); + switch_to_section (zbss_section); break; case DATA_AREA_SDA: - sbss_section (); + switch_to_section (sbss_section); break; case DATA_AREA_TDA: - tdata_section (); + switch_to_section (tdata_section); default: - bss_section (); + switch_to_section (bss_section); break; } @@ -2927,7 +2934,34 @@ v850_return_addr (int count) return get_hard_reg_initial_val (Pmode, LINK_POINTER_REGNUM); } +/* Implement TARGET_ASM_INIT_SECTIONS. */ + static void +v850_asm_init_sections (void) +{ + rosdata_section + = get_unnamed_section (0, output_section_asm_op, + "\t.section .rosdata,\"a\""); + + rozdata_section + = get_unnamed_section (0, output_section_asm_op, + "\t.section .rozdata,\"a\""); + + tdata_section + = get_unnamed_section (SECTION_WRITE, output_section_asm_op, + "\t.section .tdata,\"aw\""); + + zdata_section + = get_unnamed_section (SECTION_WRITE, output_section_asm_op, + "\t.section .zdata,\"aw\""); + + zbss_section + = get_unnamed_section (SECTION_WRITE | SECTION_BSS, + output_section_asm_op, + "\t.section .zbss,\"aw\""); +} + +static section * v850_select_section (tree exp, int reloc ATTRIBUTE_UNUSED, unsigned HOST_WIDE_INT align ATTRIBUTE_UNUSED) @@ -2947,33 +2981,19 @@ v850_select_section (tree exp, switch (v850_get_data_area (exp)) { case DATA_AREA_ZDA: - if (is_const) - rozdata_section (); - else - zdata_section (); - break; + return is_const ? rozdata_section : zdata_section; case DATA_AREA_TDA: - tdata_section (); - break; + return tdata_section; case DATA_AREA_SDA: - if (is_const) - rosdata_section (); - else - sdata_section (); - break; + return is_const ? rosdata_section : sdata_section; default: - if (is_const) - readonly_data_section (); - else - data_section (); - break; + return is_const ? readonly_data_section : data_section; } } - else - readonly_data_section (); + return readonly_data_section; } /* Worker function for TARGET_RETURN_IN_MEMORY. */ @@ -2996,3 +3016,5 @@ v850_setup_incoming_varargs (CUMULATIVE_ARGS *ca, { ca->anonymous_args = (!TARGET_GHS ? 1 : 0); } + +#include "gt-v850.h" diff --git a/gcc/config/v850/v850.h b/gcc/config/v850/v850.h index c43c802838a..c1dbd783113 100644 --- a/gcc/config/v850/v850.h +++ b/gcc/config/v850/v850.h @@ -876,101 +876,11 @@ typedef enum DATA_AREA_ZDA } v850_data_area; -/* 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_tdata, in_sdata, in_zdata, \ - in_rozdata, in_rosdata, in_sbss, in_zbss, in_zcommon, in_scommon - -/* One or more functions to be defined in `varasm.c'. These - 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 - -/* This could be done a lot more cleanly using ANSI C.... */ -#define EXTRA_SECTION_FUNCTIONS \ -void \ -sdata_section () \ -{ \ - if (in_section != in_sdata) \ - { \ - fprintf (asm_out_file, "%s\n", SDATA_SECTION_ASM_OP); \ - in_section = in_sdata; \ - } \ -} \ - \ -void \ -rosdata_section () \ -{ \ - if (in_section != in_rosdata) \ - { \ - fprintf (asm_out_file, "%s\n", ROSDATA_SECTION_ASM_OP); \ - in_section = in_sdata; \ - } \ -} \ - \ -void \ -sbss_section () \ -{ \ - if (in_section != in_sbss) \ - { \ - fprintf (asm_out_file, "%s\n", SBSS_SECTION_ASM_OP); \ - in_section = in_sbss; \ - } \ -} \ - \ -void \ -tdata_section () \ -{ \ - if (in_section != in_tdata) \ - { \ - fprintf (asm_out_file, "%s\n", TDATA_SECTION_ASM_OP); \ - in_section = in_tdata; \ - } \ -} \ - \ -void \ -zdata_section () \ -{ \ - if (in_section != in_zdata) \ - { \ - fprintf (asm_out_file, "%s\n", ZDATA_SECTION_ASM_OP); \ - in_section = in_zdata; \ - } \ -} \ - \ -void \ -rozdata_section () \ -{ \ - if (in_section != in_rozdata) \ - { \ - fprintf (asm_out_file, "%s\n", ROZDATA_SECTION_ASM_OP); \ - in_section = in_rozdata; \ - } \ -} \ - \ -void \ -zbss_section () \ -{ \ - if (in_section != in_zbss) \ - { \ - fprintf (asm_out_file, "%s\n", ZBSS_SECTION_ASM_OP); \ - in_section = in_zbss; \ - } \ -} - #define TEXT_SECTION_ASM_OP "\t.section .text" #define DATA_SECTION_ASM_OP "\t.section .data" #define BSS_SECTION_ASM_OP "\t.section .bss" #define SDATA_SECTION_ASM_OP "\t.section .sdata,\"aw\"" #define SBSS_SECTION_ASM_OP "\t.section .sbss,\"aw\"" -#define ZDATA_SECTION_ASM_OP "\t.section .zdata,\"aw\"" -#define ZBSS_SECTION_ASM_OP "\t.section .zbss,\"aw\"" -#define TDATA_SECTION_ASM_OP "\t.section .tdata,\"aw\"" -#define ROSDATA_SECTION_ASM_OP "\t.section .rosdata,\"a\"" -#define ROZDATA_SECTION_ASM_OP "\t.section .rozdata,\"a\"" #define SCOMMON_ASM_OP "\t.scomm\t" #define ZCOMMON_ASM_OP "\t.zcomm\t" @@ -1230,4 +1140,6 @@ extern union tree_node * GHS_current_section_names [(int) COUNT_OF_GHS_SECTION_K #define SYMBOL_REF_TDA_P(X) ((SYMBOL_REF_FLAGS (X) & SYMBOL_FLAG_TDA) != 0) #define SYMBOL_REF_SDA_P(X) ((SYMBOL_REF_FLAGS (X) & SYMBOL_FLAG_SDA) != 0) +#define TARGET_ASM_INIT_SECTIONS v850_asm_init_sections + #endif /* ! GCC_V850_H */ diff --git a/gcc/config/vax/vaxv.h b/gcc/config/vax/vaxv.h index 8394c64158a..83870a0230d 100644 --- a/gcc/config/vax/vaxv.h +++ b/gcc/config/vax/vaxv.h @@ -48,7 +48,7 @@ Boston, MA 02110-1301, USA. */ #undef ASM_OUTPUT_LOCAL #define ASM_OUTPUT_LOCAL(FILE,NAME,SIZE,ROUNDED) \ -( data_section (), \ +( switch_to_section (data_section), \ assemble_name ((FILE), (NAME)), \ fprintf ((FILE), ":\n\t.space %u\n", (int)(ROUNDED))) diff --git a/gcc/config/vx-common.h b/gcc/config/vx-common.h index baa37f0e80e..cb8d7a0808e 100644 --- a/gcc/config/vx-common.h +++ b/gcc/config/vx-common.h @@ -83,17 +83,6 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA sorry ("profiler support for VxWorks"); \ } while (0) -/* This section either contains dynamic relocations, or contains - PC-rel indirections to stubs in the data section which contain dynamic - relocations. General dynamic relocations are not processed - for shared libraries' text segments, and PC-relative displacements - from the text segment to the data segment don't work. So force - it to .gcc_except_section, which the linker will place in .data. */ - -void vxworks_exception_section (void); -#undef TARGET_ASM_EXCEPTION_SECTION -#define TARGET_ASM_EXCEPTION_SECTION default_exception_section - /* We occasionally need to distinguish between the VxWorks variants. */ #define VXWORKS_KIND_NORMAL 1 #define VXWORKS_KIND_AE 2 diff --git a/gcc/config/xtensa/ieee754-df.S b/gcc/config/xtensa/ieee754-df.S new file mode 100644 index 00000000000..66c4ea0d018 --- /dev/null +++ b/gcc/config/xtensa/ieee754-df.S @@ -0,0 +1,2365 @@ +/* IEEE-754 double-precision functions for Xtensa + Copyright (C) 2006 Free Software Foundation, Inc. + Contributed by Bob Wilson (bwilson@tensilica.com) at Tensilica. + + 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. */ + +#ifdef __XTENSA_EB__ +#define xh a2 +#define xl a3 +#define yh a4 +#define yl a5 +#else +#define xh a3 +#define xl a2 +#define yh a5 +#define yl a4 +#endif + +/* Warning! The branch displacements for some Xtensa branch instructions + are quite small, and this code has been carefully laid out to keep + branch targets in range. If you change anything, be sure to check that + the assembler is not relaxing anything to branch over a jump. */ + +#ifdef L_negdf2 + + .align 4 + .global __negdf2 + .type __negdf2, @function +__negdf2: + abi_entry sp, 32 + movi a4, 0x80000000 + xor xh, xh, a4 + abi_return + +#endif /* L_negdf2 */ + +#ifdef L_addsubdf3 + + /* Addition */ +__adddf3_aux: + + /* Handle NaNs and Infinities. (This code is placed before the + start of the function just to keep it in range of the limited + branch displacements.) */ + +.Ladd_xnan_or_inf: + /* If y is neither Infinity nor NaN, return x. */ + bnall yh, a6, 1f + /* If x is a NaN, return it. Otherwise, return y. */ + slli a7, xh, 12 + or a7, a7, xl + beqz a7, .Ladd_ynan_or_inf +1: abi_return + +.Ladd_ynan_or_inf: + /* Return y. */ + mov xh, yh + mov xl, yl + abi_return + +.Ladd_opposite_signs: + /* Operand signs differ. Do a subtraction. */ + slli a7, a6, 11 + xor yh, yh, a7 + j .Lsub_same_sign + + .align 4 + .global __adddf3 + .type __adddf3, @function +__adddf3: + abi_entry sp, 32 + movi a6, 0x7ff00000 + + /* Check if the two operands have the same sign. */ + xor a7, xh, yh + bltz a7, .Ladd_opposite_signs + +.Ladd_same_sign: + /* Check if either exponent == 0x7ff (i.e., NaN or Infinity). */ + ball xh, a6, .Ladd_xnan_or_inf + ball yh, a6, .Ladd_ynan_or_inf + + /* Compare the exponents. The smaller operand will be shifted + right by the exponent difference and added to the larger + one. */ + extui a7, xh, 20, 12 + extui a8, yh, 20, 12 + bltu a7, a8, .Ladd_shiftx + +.Ladd_shifty: + /* Check if the smaller (or equal) exponent is zero. */ + bnone yh, a6, .Ladd_yexpzero + + /* Replace yh sign/exponent with 0x001. */ + or yh, yh, a6 + slli yh, yh, 11 + srli yh, yh, 11 + +.Ladd_yexpdiff: + /* Compute the exponent difference. Optimize for difference < 32. */ + sub a10, a7, a8 + bgeui a10, 32, .Ladd_bigshifty + + /* Shift yh/yl right by the exponent difference. Any bits that are + shifted out of yl are saved in a9 for rounding the result. */ + ssr a10 + movi a9, 0 + src a9, yl, a9 + src yl, yh, yl + srl yh, yh + +.Ladd_addy: + /* Do the 64-bit addition. */ + add xl, xl, yl + add xh, xh, yh + bgeu xl, yl, 1f + addi xh, xh, 1 +1: + /* Check if the add overflowed into the exponent. */ + extui a10, xh, 20, 12 + beq a10, a7, .Ladd_round + mov a8, a7 + j .Ladd_carry + +.Ladd_yexpzero: + /* y is a subnormal value. Replace its sign/exponent with zero, + i.e., no implicit "1.0", and increment the apparent exponent + because subnormals behave as if they had the minimum (nonzero) + exponent. Test for the case when both exponents are zero. */ + slli yh, yh, 12 + srli yh, yh, 12 + bnone xh, a6, .Ladd_bothexpzero + addi a8, a8, 1 + j .Ladd_yexpdiff + +.Ladd_bothexpzero: + /* Both exponents are zero. Handle this as a special case. There + is no need to shift or round, and the normal code for handling + a carry into the exponent field will not work because it + assumes there is an implicit "1.0" that needs to be added. */ + add xl, xl, yl + add xh, xh, yh + bgeu xl, yl, 1f + addi xh, xh, 1 +1: abi_return + +.Ladd_bigshifty: + /* Exponent difference > 64 -- just return the bigger value. */ + bgeui a10, 64, 1b + + /* Shift yh/yl right by the exponent difference. Any bits that are + shifted out are saved in a9 for rounding the result. */ + ssr a10 + sll a11, yl /* lost bits shifted out of yl */ + src a9, yh, yl + srl yl, yh + movi yh, 0 + beqz a11, .Ladd_addy + or a9, a9, a10 /* any positive, nonzero value will work */ + j .Ladd_addy + +.Ladd_xexpzero: + /* Same as "yexpzero" except skip handling the case when both + exponents are zero. */ + slli xh, xh, 12 + srli xh, xh, 12 + addi a7, a7, 1 + j .Ladd_xexpdiff + +.Ladd_shiftx: + /* Same thing as the "shifty" code, but with x and y swapped. Also, + because the exponent difference is always nonzero in this version, + the shift sequence can use SLL and skip loading a constant zero. */ + bnone xh, a6, .Ladd_xexpzero + + or xh, xh, a6 + slli xh, xh, 11 + srli xh, xh, 11 + +.Ladd_xexpdiff: + sub a10, a8, a7 + bgeui a10, 32, .Ladd_bigshiftx + + ssr a10 + sll a9, xl + src xl, xh, xl + srl xh, xh + +.Ladd_addx: + add xl, xl, yl + add xh, xh, yh + bgeu xl, yl, 1f + addi xh, xh, 1 +1: + /* Check if the add overflowed into the exponent. */ + extui a10, xh, 20, 12 + bne a10, a8, .Ladd_carry + +.Ladd_round: + /* Round up if the leftover fraction is >= 1/2. */ + bgez a9, 1f + addi xl, xl, 1 + beqz xl, .Ladd_roundcarry + + /* Check if the leftover fraction is exactly 1/2. */ + slli a9, a9, 1 + beqz a9, .Ladd_exactlyhalf +1: abi_return + +.Ladd_bigshiftx: + /* Mostly the same thing as "bigshifty".... */ + bgeui a10, 64, .Ladd_returny + + ssr a10 + sll a11, xl + src a9, xh, xl + srl xl, xh + movi xh, 0 + beqz a11, .Ladd_addx + or a9, a9, a10 + j .Ladd_addx + +.Ladd_returny: + mov xh, yh + mov xl, yl + abi_return + +.Ladd_carry: + /* The addition has overflowed into the exponent field, so the + value needs to be renormalized. The mantissa of the result + can be recovered by subtracting the original exponent and + adding 0x100000 (which is the explicit "1.0" for the + mantissa of the non-shifted operand -- the "1.0" for the + shifted operand was already added). The mantissa can then + be shifted right by one bit. The explicit "1.0" of the + shifted mantissa then needs to be replaced by the exponent, + incremented by one to account for the normalizing shift. + It is faster to combine these operations: do the shift first + and combine the additions and subtractions. If x is the + original exponent, the result is: + shifted mantissa - (x << 19) + (1 << 19) + (x << 20) + or: + shifted mantissa + ((x + 1) << 19) + Note that the exponent is incremented here by leaving the + explicit "1.0" of the mantissa in the exponent field. */ + + /* Shift xh/xl right by one bit. Save the lsb of xl. */ + mov a10, xl + ssai 1 + src xl, xh, xl + srl xh, xh + + /* See explanation above. The original exponent is in a8. */ + addi a8, a8, 1 + slli a8, a8, 19 + add xh, xh, a8 + + /* Return an Infinity if the exponent overflowed. */ + ball xh, a6, .Ladd_infinity + + /* Same thing as the "round" code except the msb of the leftover + fraction is bit 0 of a10, with the rest of the fraction in a9. */ + bbci.l a10, 0, 1f + addi xl, xl, 1 + beqz xl, .Ladd_roundcarry + beqz a9, .Ladd_exactlyhalf +1: abi_return + +.Ladd_infinity: + /* Clear the mantissa. */ + movi xl, 0 + srli xh, xh, 20 + slli xh, xh, 20 + + /* The sign bit may have been lost in a carry-out. Put it back. */ + slli a8, a8, 1 + or xh, xh, a8 + abi_return + +.Ladd_exactlyhalf: + /* Round down to the nearest even value. */ + srli xl, xl, 1 + slli xl, xl, 1 + abi_return + +.Ladd_roundcarry: + /* xl is always zero when the rounding increment overflows, so + there's no need to round it to an even value. */ + addi xh, xh, 1 + /* Overflow to the exponent is OK. */ + abi_return + + + /* Subtraction */ +__subdf3_aux: + + /* Handle NaNs and Infinities. (This code is placed before the + start of the function just to keep it in range of the limited + branch displacements.) */ + +.Lsub_xnan_or_inf: + /* If y is neither Infinity nor NaN, return x. */ + bnall yh, a6, 1f + /* Both x and y are either NaN or Inf, so the result is NaN. */ + movi a4, 0x80000 /* make it a quiet NaN */ + or xh, xh, a4 +1: abi_return + +.Lsub_ynan_or_inf: + /* Negate y and return it. */ + slli a7, a6, 11 + xor xh, yh, a7 + mov xl, yl + abi_return + +.Lsub_opposite_signs: + /* Operand signs differ. Do an addition. */ + slli a7, a6, 11 + xor yh, yh, a7 + j .Ladd_same_sign + + .align 4 + .global __subdf3 + .type __subdf3, @function +__subdf3: + abi_entry sp, 32 + movi a6, 0x7ff00000 + + /* Check if the two operands have the same sign. */ + xor a7, xh, yh + bltz a7, .Lsub_opposite_signs + +.Lsub_same_sign: + /* Check if either exponent == 0x7ff (i.e., NaN or Infinity). */ + ball xh, a6, .Lsub_xnan_or_inf + ball yh, a6, .Lsub_ynan_or_inf + + /* Compare the operands. In contrast to addition, the entire + value matters here. */ + extui a7, xh, 20, 11 + extui a8, yh, 20, 11 + bltu xh, yh, .Lsub_xsmaller + beq xh, yh, .Lsub_compare_low + +.Lsub_ysmaller: + /* Check if the smaller (or equal) exponent is zero. */ + bnone yh, a6, .Lsub_yexpzero + + /* Replace yh sign/exponent with 0x001. */ + or yh, yh, a6 + slli yh, yh, 11 + srli yh, yh, 11 + +.Lsub_yexpdiff: + /* Compute the exponent difference. Optimize for difference < 32. */ + sub a10, a7, a8 + bgeui a10, 32, .Lsub_bigshifty + + /* Shift yh/yl right by the exponent difference. Any bits that are + shifted out of yl are saved in a9 for rounding the result. */ + ssr a10 + movi a9, 0 + src a9, yl, a9 + src yl, yh, yl + srl yh, yh + +.Lsub_suby: + /* Do the 64-bit subtraction. */ + sub xh, xh, yh + bgeu xl, yl, 1f + addi xh, xh, -1 +1: sub xl, xl, yl + + /* Subtract the leftover bits in a9 from zero and propagate any + borrow from xh/xl. */ + neg a9, a9 + beqz a9, 1f + addi a5, xh, -1 + moveqz xh, a5, xl + addi xl, xl, -1 +1: + /* Check if the subtract underflowed into the exponent. */ + extui a10, xh, 20, 11 + beq a10, a7, .Lsub_round + j .Lsub_borrow + +.Lsub_compare_low: + /* The high words are equal. Compare the low words. */ + bltu xl, yl, .Lsub_xsmaller + bltu yl, xl, .Lsub_ysmaller + /* The operands are equal. Return 0.0. */ + movi xh, 0 + movi xl, 0 +1: abi_return + +.Lsub_yexpzero: + /* y is a subnormal value. Replace its sign/exponent with zero, + i.e., no implicit "1.0". Unless x is also a subnormal, increment + y's apparent exponent because subnormals behave as if they had + the minimum (nonzero) exponent. */ + slli yh, yh, 12 + srli yh, yh, 12 + bnone xh, a6, .Lsub_yexpdiff + addi a8, a8, 1 + j .Lsub_yexpdiff + +.Lsub_bigshifty: + /* Exponent difference > 64 -- just return the bigger value. */ + bgeui a10, 64, 1b + + /* Shift yh/yl right by the exponent difference. Any bits that are + shifted out are saved in a9 for rounding the result. */ + ssr a10 + sll a11, yl /* lost bits shifted out of yl */ + src a9, yh, yl + srl yl, yh + movi yh, 0 + beqz a11, .Lsub_suby + or a9, a9, a10 /* any positive, nonzero value will work */ + j .Lsub_suby + +.Lsub_xsmaller: + /* Same thing as the "ysmaller" code, but with x and y swapped and + with y negated. */ + bnone xh, a6, .Lsub_xexpzero + + or xh, xh, a6 + slli xh, xh, 11 + srli xh, xh, 11 + +.Lsub_xexpdiff: + sub a10, a8, a7 + bgeui a10, 32, .Lsub_bigshiftx + + ssr a10 + movi a9, 0 + src a9, xl, a9 + src xl, xh, xl + srl xh, xh + + /* Negate y. */ + slli a11, a6, 11 + xor yh, yh, a11 + +.Lsub_subx: + sub xl, yl, xl + sub xh, yh, xh + bgeu yl, xl, 1f + addi xh, xh, -1 +1: + /* Subtract the leftover bits in a9 from zero and propagate any + borrow from xh/xl. */ + neg a9, a9 + beqz a9, 1f + addi a5, xh, -1 + moveqz xh, a5, xl + addi xl, xl, -1 +1: + /* Check if the subtract underflowed into the exponent. */ + extui a10, xh, 20, 11 + bne a10, a8, .Lsub_borrow + +.Lsub_round: + /* Round up if the leftover fraction is >= 1/2. */ + bgez a9, 1f + addi xl, xl, 1 + beqz xl, .Lsub_roundcarry + + /* Check if the leftover fraction is exactly 1/2. */ + slli a9, a9, 1 + beqz a9, .Lsub_exactlyhalf +1: abi_return + +.Lsub_xexpzero: + /* Same as "yexpzero". */ + slli xh, xh, 12 + srli xh, xh, 12 + bnone yh, a6, .Lsub_xexpdiff + addi a7, a7, 1 + j .Lsub_xexpdiff + +.Lsub_bigshiftx: + /* Mostly the same thing as "bigshifty", but with the sign bit of the + shifted value set so that the subsequent subtraction flips the + sign of y. */ + bgeui a10, 64, .Lsub_returny + + ssr a10 + sll a11, xl + src a9, xh, xl + srl xl, xh + slli xh, a6, 11 /* set sign bit of xh */ + beqz a11, .Lsub_subx + or a9, a9, a10 + j .Lsub_subx + +.Lsub_returny: + /* Negate and return y. */ + slli a7, a6, 11 + xor xh, yh, a7 + mov xl, yl + abi_return + +.Lsub_borrow: + /* The subtraction has underflowed into the exponent field, so the + value needs to be renormalized. Shift the mantissa left as + needed to remove any leading zeros and adjust the exponent + accordingly. If the exponent is not large enough to remove + all the leading zeros, the result will be a subnormal value. */ + + slli a8, xh, 12 + beqz a8, .Lsub_xhzero + do_nsau a6, a8, a7, a11 + srli a8, a8, 12 + bge a6, a10, .Lsub_subnormal + addi a6, a6, 1 + +.Lsub_shift_lt32: + /* Shift the mantissa (a8/xl/a9) left by a6. */ + ssl a6 + src a8, a8, xl + src xl, xl, a9 + sll a9, a9 + + /* Combine the shifted mantissa with the sign and exponent, + decrementing the exponent by a6. (The exponent has already + been decremented by one due to the borrow from the subtraction, + but adding the mantissa will increment the exponent by one.) */ + srli xh, xh, 20 + sub xh, xh, a6 + slli xh, xh, 20 + add xh, xh, a8 + j .Lsub_round + +.Lsub_exactlyhalf: + /* Round down to the nearest even value. */ + srli xl, xl, 1 + slli xl, xl, 1 + abi_return + +.Lsub_roundcarry: + /* xl is always zero when the rounding increment overflows, so + there's no need to round it to an even value. */ + addi xh, xh, 1 + /* Overflow to the exponent is OK. */ + abi_return + +.Lsub_xhzero: + /* When normalizing the result, all the mantissa bits in the high + word are zero. Shift by "20 + (leading zero count of xl) + 1". */ + do_nsau a6, xl, a7, a11 + addi a6, a6, 21 + blt a10, a6, .Lsub_subnormal + +.Lsub_normalize_shift: + bltui a6, 32, .Lsub_shift_lt32 + + ssl a6 + src a8, xl, a9 + sll xl, a9 + movi a9, 0 + + srli xh, xh, 20 + sub xh, xh, a6 + slli xh, xh, 20 + add xh, xh, a8 + j .Lsub_round + +.Lsub_subnormal: + /* The exponent is too small to shift away all the leading zeros. + Set a6 to the current exponent (which has already been + decremented by the borrow) so that the exponent of the result + will be zero. Do not add 1 to a6 in this case, because: (1) + adding the mantissa will not increment the exponent, so there is + no need to subtract anything extra from the exponent to + compensate, and (2) the effective exponent of a subnormal is 1 + not 0 so the shift amount must be 1 smaller than normal. */ + mov a6, a10 + j .Lsub_normalize_shift + +#endif /* L_addsubdf3 */ + +#ifdef L_muldf3 + + /* Multiplication */ +__muldf3_aux: + + /* Handle unusual cases (zeros, subnormals, NaNs and Infinities). + (This code is placed before the start of the function just to + keep it in range of the limited branch displacements.) */ + +.Lmul_xexpzero: + /* Clear the sign bit of x. */ + slli xh, xh, 1 + srli xh, xh, 1 + + /* If x is zero, return zero. */ + or a10, xh, xl + beqz a10, .Lmul_return_zero + + /* Normalize x. Adjust the exponent in a8. */ + beqz xh, .Lmul_xh_zero + do_nsau a10, xh, a11, a12 + addi a10, a10, -11 + ssl a10 + src xh, xh, xl + sll xl, xl + movi a8, 1 + sub a8, a8, a10 + j .Lmul_xnormalized +.Lmul_xh_zero: + do_nsau a10, xl, a11, a12 + addi a10, a10, -11 + movi a8, -31 + sub a8, a8, a10 + ssl a10 + bltz a10, .Lmul_xl_srl + sll xh, xl + movi xl, 0 + j .Lmul_xnormalized +.Lmul_xl_srl: + srl xh, xl + sll xl, xl + j .Lmul_xnormalized + +.Lmul_yexpzero: + /* Clear the sign bit of y. */ + slli yh, yh, 1 + srli yh, yh, 1 + + /* If y is zero, return zero. */ + or a10, yh, yl + beqz a10, .Lmul_return_zero + + /* Normalize y. Adjust the exponent in a9. */ + beqz yh, .Lmul_yh_zero + do_nsau a10, yh, a11, a12 + addi a10, a10, -11 + ssl a10 + src yh, yh, yl + sll yl, yl + movi a9, 1 + sub a9, a9, a10 + j .Lmul_ynormalized +.Lmul_yh_zero: + do_nsau a10, yl, a11, a12 + addi a10, a10, -11 + movi a9, -31 + sub a9, a9, a10 + ssl a10 + bltz a10, .Lmul_yl_srl + sll yh, yl + movi yl, 0 + j .Lmul_ynormalized +.Lmul_yl_srl: + srl yh, yl + sll yl, yl + j .Lmul_ynormalized + +.Lmul_return_zero: + /* Return zero with the appropriate sign bit. */ + srli xh, a7, 31 + slli xh, xh, 31 + movi xl, 0 + j .Lmul_done + +.Lmul_xnan_or_inf: + /* If y is zero, return NaN. */ + bnez yl, 1f + slli a8, yh, 1 + bnez a8, 1f + movi a4, 0x80000 /* make it a quiet NaN */ + or xh, xh, a4 + j .Lmul_done +1: + /* If y is NaN, return y. */ + bnall yh, a6, .Lmul_returnx + slli a8, yh, 12 + or a8, a8, yl + beqz a8, .Lmul_returnx + +.Lmul_returny: + mov xh, yh + mov xl, yl + +.Lmul_returnx: + /* Set the sign bit and return. */ + extui a7, a7, 31, 1 + slli xh, xh, 1 + ssai 1 + src xh, a7, xh + j .Lmul_done + +.Lmul_ynan_or_inf: + /* If x is zero, return NaN. */ + bnez xl, .Lmul_returny + slli a8, xh, 1 + bnez a8, .Lmul_returny + movi a7, 0x80000 /* make it a quiet NaN */ + or xh, yh, a7 + j .Lmul_done + + .align 4 + .global __muldf3 + .type __muldf3, @function +__muldf3: + abi_entry sp, 48 +#if __XTENSA_CALL0_ABI__ + addi sp, sp, -32 + s32i a12, sp, 16 + s32i a13, sp, 20 + s32i a14, sp, 24 + s32i a15, sp, 28 +#endif + movi a6, 0x7ff00000 + + /* Get the sign of the result. */ + xor a7, xh, yh + + /* Check for NaN and infinity. */ + ball xh, a6, .Lmul_xnan_or_inf + ball yh, a6, .Lmul_ynan_or_inf + + /* Extract the exponents. */ + extui a8, xh, 20, 11 + extui a9, yh, 20, 11 + + beqz a8, .Lmul_xexpzero +.Lmul_xnormalized: + beqz a9, .Lmul_yexpzero +.Lmul_ynormalized: + + /* Add the exponents. */ + add a8, a8, a9 + + /* Replace sign/exponent fields with explicit "1.0". */ + movi a10, 0x1fffff + or xh, xh, a6 + and xh, xh, a10 + or yh, yh, a6 + and yh, yh, a10 + + /* Multiply 64x64 to 128 bits. The result ends up in xh/xl/a6. + The least-significant word of the result is thrown away except + that if it is nonzero, the lsb of a6 is set to 1. */ +#if XCHAL_HAVE_MUL32_HIGH + + /* Compute a6 with any carry-outs in a10. */ + movi a10, 0 + mull a6, xl, yh + mull a11, xh, yl + add a6, a6, a11 + bgeu a6, a11, 1f + addi a10, a10, 1 +1: + muluh a11, xl, yl + add a6, a6, a11 + bgeu a6, a11, 1f + addi a10, a10, 1 +1: + /* If the low word of the result is nonzero, set the lsb of a6. */ + mull a11, xl, yl + beqz a11, 1f + movi a9, 1 + or a6, a6, a9 +1: + /* Compute xl with any carry-outs in a9. */ + movi a9, 0 + mull a11, xh, yh + add a10, a10, a11 + bgeu a10, a11, 1f + addi a9, a9, 1 +1: + muluh a11, xh, yl + add a10, a10, a11 + bgeu a10, a11, 1f + addi a9, a9, 1 +1: + muluh xl, xl, yh + add xl, xl, a10 + bgeu xl, a10, 1f + addi a9, a9, 1 +1: + /* Compute xh. */ + muluh xh, xh, yh + add xh, xh, a9 + +#else + + /* Break the inputs into 16-bit chunks and compute 16 32-bit partial + products. These partial products are: + + 0 xll * yll + + 1 xll * ylh + 2 xlh * yll + + 3 xll * yhl + 4 xlh * ylh + 5 xhl * yll + + 6 xll * yhh + 7 xlh * yhl + 8 xhl * ylh + 9 xhh * yll + + 10 xlh * yhh + 11 xhl * yhl + 12 xhh * ylh + + 13 xhl * yhh + 14 xhh * yhl + + 15 xhh * yhh + + where the input chunks are (hh, hl, lh, ll). If using the Mul16 + or Mul32 multiplier options, these input chunks must be stored in + separate registers. For Mac16, the UMUL.AA.* opcodes can specify + that the inputs come from either half of the registers, so there + is no need to shift them out ahead of time. If there is no + multiply hardware, the 16-bit chunks can be extracted when setting + up the arguments to the separate multiply function. */ + + /* Save a7 since it is needed to hold a temporary value. */ + s32i a7, sp, 4 +#if !XCHAL_HAVE_MUL16 && !XCHAL_HAVE_MUL32 && !XCHAL_HAVE_MAC16 + /* Calling a separate multiply function will clobber a0 and requires + use of a8 as a temporary, so save those values now. (The function + uses a custom ABI so nothing else needs to be saved.) */ + s32i a0, sp, 0 + s32i a8, sp, 8 +#endif + +#if XCHAL_HAVE_MUL16 || XCHAL_HAVE_MUL32 + +#define xlh a12 +#define ylh a13 +#define xhh a14 +#define yhh a15 + + /* Get the high halves of the inputs into registers. */ + srli xlh, xl, 16 + srli ylh, yl, 16 + srli xhh, xh, 16 + srli yhh, yh, 16 + +#define xll xl +#define yll yl +#define xhl xh +#define yhl yh + +#if XCHAL_HAVE_MUL32 && !XCHAL_HAVE_MUL16 + /* Clear the high halves of the inputs. This does not matter + for MUL16 because the high bits are ignored. */ + extui xl, xl, 0, 16 + extui xh, xh, 0, 16 + extui yl, yl, 0, 16 + extui yh, yh, 0, 16 +#endif +#endif /* MUL16 || MUL32 */ + + +#if XCHAL_HAVE_MUL16 + +#define do_mul(dst, xreg, xhalf, yreg, yhalf) \ + mul16u dst, xreg ## xhalf, yreg ## yhalf + +#elif XCHAL_HAVE_MUL32 + +#define do_mul(dst, xreg, xhalf, yreg, yhalf) \ + mull dst, xreg ## xhalf, yreg ## yhalf + +#elif XCHAL_HAVE_MAC16 + +/* The preprocessor insists on inserting a space when concatenating after + a period in the definition of do_mul below. These macros are a workaround + using underscores instead of periods when doing the concatenation. */ +#define umul_aa_ll umul.aa.ll +#define umul_aa_lh umul.aa.lh +#define umul_aa_hl umul.aa.hl +#define umul_aa_hh umul.aa.hh + +#define do_mul(dst, xreg, xhalf, yreg, yhalf) \ + umul_aa_ ## xhalf ## yhalf xreg, yreg; \ + rsr dst, ACCLO + +#else /* no multiply hardware */ + +#define set_arg_l(dst, src) \ + extui dst, src, 0, 16 +#define set_arg_h(dst, src) \ + srli dst, src, 16 + +#define do_mul(dst, xreg, xhalf, yreg, yhalf) \ + set_arg_ ## xhalf (a13, xreg); \ + set_arg_ ## yhalf (a14, yreg); \ + call0 .Lmul_mulsi3; \ + mov dst, a12 +#endif + + /* Add pp1 and pp2 into a10 with carry-out in a9. */ + do_mul(a10, xl, l, yl, h) /* pp 1 */ + do_mul(a11, xl, h, yl, l) /* pp 2 */ + movi a9, 0 + add a10, a10, a11 + bgeu a10, a11, 1f + addi a9, a9, 1 +1: + /* Initialize a6 with a9/a10 shifted into position. Note that + this value can be safely incremented without any carry-outs. */ + ssai 16 + src a6, a9, a10 + + /* Compute the low word into a10. */ + do_mul(a11, xl, l, yl, l) /* pp 0 */ + sll a10, a10 + add a10, a10, a11 + bgeu a10, a11, 1f + addi a6, a6, 1 +1: + /* Compute the contributions of pp0-5 to a6, with carry-outs in a9. + This is good enough to determine the low half of a6, so that any + nonzero bits from the low word of the result can be collapsed + into a6, freeing up a register. */ + movi a9, 0 + do_mul(a11, xl, l, yh, l) /* pp 3 */ + add a6, a6, a11 + bgeu a6, a11, 1f + addi a9, a9, 1 +1: + do_mul(a11, xl, h, yl, h) /* pp 4 */ + add a6, a6, a11 + bgeu a6, a11, 1f + addi a9, a9, 1 +1: + do_mul(a11, xh, l, yl, l) /* pp 5 */ + add a6, a6, a11 + bgeu a6, a11, 1f + addi a9, a9, 1 +1: + /* Collapse any nonzero bits from the low word into a6. */ + beqz a10, 1f + movi a11, 1 + or a6, a6, a11 +1: + /* Add pp6-9 into a11 with carry-outs in a10. */ + do_mul(a7, xl, l, yh, h) /* pp 6 */ + do_mul(a11, xh, h, yl, l) /* pp 9 */ + movi a10, 0 + add a11, a11, a7 + bgeu a11, a7, 1f + addi a10, a10, 1 +1: + do_mul(a7, xl, h, yh, l) /* pp 7 */ + add a11, a11, a7 + bgeu a11, a7, 1f + addi a10, a10, 1 +1: + do_mul(a7, xh, l, yl, h) /* pp 8 */ + add a11, a11, a7 + bgeu a11, a7, 1f + addi a10, a10, 1 +1: + /* Shift a10/a11 into position, and add low half of a11 to a6. */ + src a10, a10, a11 + add a10, a10, a9 + sll a11, a11 + add a6, a6, a11 + bgeu a6, a11, 1f + addi a10, a10, 1 +1: + /* Add pp10-12 into xl with carry-outs in a9. */ + movi a9, 0 + do_mul(xl, xl, h, yh, h) /* pp 10 */ + add xl, xl, a10 + bgeu xl, a10, 1f + addi a9, a9, 1 +1: + do_mul(a10, xh, l, yh, l) /* pp 11 */ + add xl, xl, a10 + bgeu xl, a10, 1f + addi a9, a9, 1 +1: + do_mul(a10, xh, h, yl, h) /* pp 12 */ + add xl, xl, a10 + bgeu xl, a10, 1f + addi a9, a9, 1 +1: + /* Add pp13-14 into a11 with carry-outs in a10. */ + do_mul(a11, xh, l, yh, h) /* pp 13 */ + do_mul(a7, xh, h, yh, l) /* pp 14 */ + movi a10, 0 + add a11, a11, a7 + bgeu a11, a7, 1f + addi a10, a10, 1 +1: + /* Shift a10/a11 into position, and add low half of a11 to a6. */ + src a10, a10, a11 + add a10, a10, a9 + sll a11, a11 + add xl, xl, a11 + bgeu xl, a11, 1f + addi a10, a10, 1 +1: + /* Compute xh. */ + do_mul(xh, xh, h, yh, h) /* pp 15 */ + add xh, xh, a10 + + /* Restore values saved on the stack during the multiplication. */ + l32i a7, sp, 4 +#if !XCHAL_HAVE_MUL16 && !XCHAL_HAVE_MUL32 && !XCHAL_HAVE_MAC16 + l32i a0, sp, 0 + l32i a8, sp, 8 +#endif +#endif + + /* Shift left by 12 bits, unless there was a carry-out from the + multiply, in which case, shift by 11 bits and increment the + exponent. Note: It is convenient to use the constant 0x3ff + instead of 0x400 when removing the extra exponent bias (so that + it is easy to construct 0x7fe for the overflow check). Reverse + the logic here to decrement the exponent sum by one unless there + was a carry-out. */ + movi a4, 11 + srli a5, xh, 21 - 12 + bnez a5, 1f + addi a4, a4, 1 + addi a8, a8, -1 +1: ssl a4 + src xh, xh, xl + src xl, xl, a6 + sll a6, a6 + + /* Subtract the extra bias from the exponent sum (plus one to account + for the explicit "1.0" of the mantissa that will be added to the + exponent in the final result). */ + movi a4, 0x3ff + sub a8, a8, a4 + + /* Check for over/underflow. The value in a8 is one less than the + final exponent, so values in the range 0..7fd are OK here. */ + slli a4, a4, 1 /* 0x7fe */ + bgeu a8, a4, .Lmul_overflow + +.Lmul_round: + /* Round. */ + bgez a6, .Lmul_rounded + addi xl, xl, 1 + beqz xl, .Lmul_roundcarry + slli a6, a6, 1 + beqz a6, .Lmul_exactlyhalf + +.Lmul_rounded: + /* Add the exponent to the mantissa. */ + slli a8, a8, 20 + add xh, xh, a8 + +.Lmul_addsign: + /* Add the sign bit. */ + srli a7, a7, 31 + slli a7, a7, 31 + or xh, xh, a7 + +.Lmul_done: +#if __XTENSA_CALL0_ABI__ + l32i a12, sp, 16 + l32i a13, sp, 20 + l32i a14, sp, 24 + l32i a15, sp, 28 + addi sp, sp, 32 +#endif + abi_return + +.Lmul_exactlyhalf: + /* Round down to the nearest even value. */ + srli xl, xl, 1 + slli xl, xl, 1 + j .Lmul_rounded + +.Lmul_roundcarry: + /* xl is always zero when the rounding increment overflows, so + there's no need to round it to an even value. */ + addi xh, xh, 1 + /* Overflow is OK -- it will be added to the exponent. */ + j .Lmul_rounded + +.Lmul_overflow: + bltz a8, .Lmul_underflow + /* Return +/- Infinity. */ + addi a8, a4, 1 /* 0x7ff */ + slli xh, a8, 20 + movi xl, 0 + j .Lmul_addsign + +.Lmul_underflow: + /* Create a subnormal value, where the exponent field contains zero, + but the effective exponent is 1. The value of a8 is one less than + the actual exponent, so just negate it to get the shift amount. */ + neg a8, a8 + mov a9, a6 + ssr a8 + bgeui a8, 32, .Lmul_bigshift + + /* Shift xh/xl right. Any bits that are shifted out of xl are saved + in a6 (combined with the shifted-out bits currently in a6) for + rounding the result. */ + sll a6, xl + src xl, xh, xl + srl xh, xh + j 1f + +.Lmul_bigshift: + bgeui a8, 64, .Lmul_flush_to_zero + sll a10, xl /* lost bits shifted out of xl */ + src a6, xh, xl + srl xl, xh + movi xh, 0 + or a9, a9, a10 + + /* Set the exponent to zero. */ +1: movi a8, 0 + + /* Pack any nonzero bits shifted out into a6. */ + beqz a9, .Lmul_round + movi a9, 1 + or a6, a6, a9 + j .Lmul_round + +.Lmul_flush_to_zero: + /* Return zero with the appropriate sign bit. */ + srli xh, a7, 31 + slli xh, xh, 31 + movi xl, 0 + j .Lmul_done + +#if !XCHAL_HAVE_MUL16 && !XCHAL_HAVE_MUL32 && !XCHAL_HAVE_MAC16 + + /* For Xtensa processors with no multiply hardware, this simplified + version of _mulsi3 is used for multiplying 16-bit chunks of + the floating-point mantissas. It uses a custom ABI: the inputs + are passed in a13 and a14, the result is returned in a12, and + a8 and a15 are clobbered. */ + .align 4 +.Lmul_mulsi3: + movi a12, 0 +.Lmul_mult_loop: + add a15, a14, a12 + extui a8, a13, 0, 1 + movnez a12, a15, a8 + + do_addx2 a15, a14, a12, a15 + extui a8, a13, 1, 1 + movnez a12, a15, a8 + + do_addx4 a15, a14, a12, a15 + extui a8, a13, 2, 1 + movnez a12, a15, a8 + + do_addx8 a15, a14, a12, a15 + extui a8, a13, 3, 1 + movnez a12, a15, a8 + + srli a13, a13, 4 + slli a14, a14, 4 + bnez a13, .Lmul_mult_loop + ret +#endif /* !MUL16 && !MUL32 && !MAC16 */ +#endif /* L_muldf3 */ + +#ifdef L_divdf3 + + /* Division */ +__divdf3_aux: + + /* Handle unusual cases (zeros, subnormals, NaNs and Infinities). + (This code is placed before the start of the function just to + keep it in range of the limited branch displacements.) */ + +.Ldiv_yexpzero: + /* Clear the sign bit of y. */ + slli yh, yh, 1 + srli yh, yh, 1 + + /* Check for division by zero. */ + or a10, yh, yl + beqz a10, .Ldiv_yzero + + /* Normalize y. Adjust the exponent in a9. */ + beqz yh, .Ldiv_yh_zero + do_nsau a10, yh, a11, a9 + addi a10, a10, -11 + ssl a10 + src yh, yh, yl + sll yl, yl + movi a9, 1 + sub a9, a9, a10 + j .Ldiv_ynormalized +.Ldiv_yh_zero: + do_nsau a10, yl, a11, a9 + addi a10, a10, -11 + movi a9, -31 + sub a9, a9, a10 + ssl a10 + bltz a10, .Ldiv_yl_srl + sll yh, yl + movi yl, 0 + j .Ldiv_ynormalized +.Ldiv_yl_srl: + srl yh, yl + sll yl, yl + j .Ldiv_ynormalized + +.Ldiv_yzero: + /* y is zero. Return NaN if x is also zero; otherwise, infinity. */ + slli xh, xh, 1 + srli xh, xh, 1 + or xl, xl, xh + srli xh, a7, 31 + slli xh, xh, 31 + or xh, xh, a6 + bnez xl, 1f + movi a4, 0x80000 /* make it a quiet NaN */ + or xh, xh, a4 +1: movi xl, 0 + abi_return + +.Ldiv_xexpzero: + /* Clear the sign bit of x. */ + slli xh, xh, 1 + srli xh, xh, 1 + + /* If x is zero, return zero. */ + or a10, xh, xl + beqz a10, .Ldiv_return_zero + + /* Normalize x. Adjust the exponent in a8. */ + beqz xh, .Ldiv_xh_zero + do_nsau a10, xh, a11, a8 + addi a10, a10, -11 + ssl a10 + src xh, xh, xl + sll xl, xl + movi a8, 1 + sub a8, a8, a10 + j .Ldiv_xnormalized +.Ldiv_xh_zero: + do_nsau a10, xl, a11, a8 + addi a10, a10, -11 + movi a8, -31 + sub a8, a8, a10 + ssl a10 + bltz a10, .Ldiv_xl_srl + sll xh, xl + movi xl, 0 + j .Ldiv_xnormalized +.Ldiv_xl_srl: + srl xh, xl + sll xl, xl + j .Ldiv_xnormalized + +.Ldiv_return_zero: + /* Return zero with the appropriate sign bit. */ + srli xh, a7, 31 + slli xh, xh, 31 + movi xl, 0 + abi_return + +.Ldiv_xnan_or_inf: + /* Set the sign bit of the result. */ + srli a7, yh, 31 + slli a7, a7, 31 + xor xh, xh, a7 + /* If y is NaN or Inf, return NaN. */ + bnall yh, a6, 1f + movi a4, 0x80000 /* make it a quiet NaN */ + or xh, xh, a4 +1: abi_return + +.Ldiv_ynan_or_inf: + /* If y is Infinity, return zero. */ + slli a8, yh, 12 + or a8, a8, yl + beqz a8, .Ldiv_return_zero + /* y is NaN; return it. */ + mov xh, yh + mov xl, yl + abi_return + +.Ldiv_highequal1: + bltu xl, yl, 2f + j 3f + + .align 4 + .global __divdf3 + .type __divdf3, @function +__divdf3: + abi_entry sp, 32 + movi a6, 0x7ff00000 + + /* Get the sign of the result. */ + xor a7, xh, yh + + /* Check for NaN and infinity. */ + ball xh, a6, .Ldiv_xnan_or_inf + ball yh, a6, .Ldiv_ynan_or_inf + + /* Extract the exponents. */ + extui a8, xh, 20, 11 + extui a9, yh, 20, 11 + + beqz a9, .Ldiv_yexpzero +.Ldiv_ynormalized: + beqz a8, .Ldiv_xexpzero +.Ldiv_xnormalized: + + /* Subtract the exponents. */ + sub a8, a8, a9 + + /* Replace sign/exponent fields with explicit "1.0". */ + movi a10, 0x1fffff + or xh, xh, a6 + and xh, xh, a10 + or yh, yh, a6 + and yh, yh, a10 + + /* Set SAR for left shift by one. */ + ssai (32 - 1) + + /* The first digit of the mantissa division must be a one. + Shift x (and adjust the exponent) as needed to make this true. */ + bltu yh, xh, 3f + beq yh, xh, .Ldiv_highequal1 +2: src xh, xh, xl + sll xl, xl + addi a8, a8, -1 +3: + /* Do the first subtraction and shift. */ + sub xh, xh, yh + bgeu xl, yl, 1f + addi xh, xh, -1 +1: sub xl, xl, yl + src xh, xh, xl + sll xl, xl + + /* Put the quotient into a10/a11. */ + movi a10, 0 + movi a11, 1 + + /* Divide one bit at a time for 52 bits. */ + movi a9, 52 +#if XCHAL_HAVE_LOOPS + loop a9, .Ldiv_loopend +#endif +.Ldiv_loop: + /* Shift the quotient << 1. */ + src a10, a10, a11 + sll a11, a11 + + /* Is this digit a 0 or 1? */ + bltu xh, yh, 3f + beq xh, yh, .Ldiv_highequal2 + + /* Output a 1 and subtract. */ +2: addi a11, a11, 1 + sub xh, xh, yh + bgeu xl, yl, 1f + addi xh, xh, -1 +1: sub xl, xl, yl + + /* Shift the dividend << 1. */ +3: src xh, xh, xl + sll xl, xl + +#if !XCHAL_HAVE_LOOPS + addi a9, a9, -1 + bnez a9, .Ldiv_loop +#endif +.Ldiv_loopend: + + /* Add the exponent bias (less one to account for the explicit "1.0" + of the mantissa that will be added to the exponent in the final + result). */ + movi a9, 0x3fe + add a8, a8, a9 + + /* Check for over/underflow. The value in a8 is one less than the + final exponent, so values in the range 0..7fd are OK here. */ + addmi a9, a9, 0x400 /* 0x7fe */ + bgeu a8, a9, .Ldiv_overflow + +.Ldiv_round: + /* Round. The remainder (<< 1) is in xh/xl. */ + bltu xh, yh, .Ldiv_rounded + beq xh, yh, .Ldiv_highequal3 +.Ldiv_roundup: + addi a11, a11, 1 + beqz a11, .Ldiv_roundcarry + +.Ldiv_rounded: + mov xl, a11 + /* Add the exponent to the mantissa. */ + slli a8, a8, 20 + add xh, a10, a8 + +.Ldiv_addsign: + /* Add the sign bit. */ + srli a7, a7, 31 + slli a7, a7, 31 + or xh, xh, a7 + abi_return + +.Ldiv_highequal2: + bgeu xl, yl, 2b + j 3b + +.Ldiv_highequal3: + bltu xl, yl, .Ldiv_rounded + bne xl, yl, .Ldiv_roundup + + /* Remainder is exactly half the divisor. Round even. */ + addi a11, a11, 1 + beqz a11, .Ldiv_roundcarry + srli a11, a11, 1 + slli a11, a11, 1 + j .Ldiv_rounded + +.Ldiv_overflow: + bltz a8, .Ldiv_underflow + /* Return +/- Infinity. */ + addi a8, a9, 1 /* 0x7ff */ + slli xh, a8, 20 + movi xl, 0 + j .Ldiv_addsign + +.Ldiv_underflow: + /* Create a subnormal value, where the exponent field contains zero, + but the effective exponent is 1. The value of a8 is one less than + the actual exponent, so just negate it to get the shift amount. */ + neg a8, a8 + ssr a8 + bgeui a8, 32, .Ldiv_bigshift + + /* Shift a10/a11 right. Any bits that are shifted out of a11 are + saved in a6 for rounding the result. */ + sll a6, a11 + src a11, a10, a11 + srl a10, a10 + j 1f + +.Ldiv_bigshift: + bgeui a8, 64, .Ldiv_flush_to_zero + sll a9, a11 /* lost bits shifted out of a11 */ + src a6, a10, a11 + srl a11, a10 + movi a10, 0 + or xl, xl, a9 + + /* Set the exponent to zero. */ +1: movi a8, 0 + + /* Pack any nonzero remainder (in xh/xl) into a6. */ + or xh, xh, xl + beqz xh, 1f + movi a9, 1 + or a6, a6, a9 + + /* Round a10/a11 based on the bits shifted out into a6. */ +1: bgez a6, .Ldiv_rounded + addi a11, a11, 1 + beqz a11, .Ldiv_roundcarry + slli a6, a6, 1 + bnez a6, .Ldiv_rounded + srli a11, a11, 1 + slli a11, a11, 1 + j .Ldiv_rounded + +.Ldiv_roundcarry: + /* a11 is always zero when the rounding increment overflows, so + there's no need to round it to an even value. */ + addi a10, a10, 1 + /* Overflow to the exponent field is OK. */ + j .Ldiv_rounded + +.Ldiv_flush_to_zero: + /* Return zero with the appropriate sign bit. */ + srli xh, a7, 31 + slli xh, xh, 31 + movi xl, 0 + abi_return + +#endif /* L_divdf3 */ + +#ifdef L_cmpdf2 + + /* Equal and Not Equal */ + + .align 4 + .global __eqdf2 + .global __nedf2 + .set __nedf2, __eqdf2 + .type __eqdf2, @function +__eqdf2: + abi_entry sp, 32 + bne xl, yl, 2f + bne xh, yh, 4f + + /* The values are equal but NaN != NaN. Check the exponent. */ + movi a6, 0x7ff00000 + ball xh, a6, 3f + + /* Equal. */ + movi a2, 0 + abi_return + + /* Not equal. */ +2: movi a2, 1 + abi_return + + /* Check if the mantissas are nonzero. */ +3: slli a7, xh, 12 + or a7, a7, xl + j 5f + + /* Check if x and y are zero with different signs. */ +4: or a7, xh, yh + slli a7, a7, 1 + or a7, a7, xl /* xl == yl here */ + + /* Equal if a7 == 0, where a7 is either abs(x | y) or the mantissa + or x when exponent(x) = 0x7ff and x == y. */ +5: movi a2, 0 + movi a3, 1 + movnez a2, a3, a7 + abi_return + + + /* Greater Than */ + + .align 4 + .global __gtdf2 + .type __gtdf2, @function +__gtdf2: + abi_entry sp, 32 + movi a6, 0x7ff00000 + ball xh, a6, 2f +1: bnall yh, a6, .Lle_cmp + + /* Check if y is a NaN. */ + slli a7, yh, 12 + or a7, a7, yl + beqz a7, .Lle_cmp + movi a2, 0 + abi_return + + /* Check if x is a NaN. */ +2: slli a7, xh, 12 + or a7, a7, xl + beqz a7, 1b + movi a2, 0 + abi_return + + + /* Less Than or Equal */ + + .align 4 + .global __ledf2 + .type __ledf2, @function +__ledf2: + abi_entry sp, 32 + movi a6, 0x7ff00000 + ball xh, a6, 2f +1: bnall yh, a6, .Lle_cmp + + /* Check if y is a NaN. */ + slli a7, yh, 12 + or a7, a7, yl + beqz a7, .Lle_cmp + movi a2, 1 + abi_return + + /* Check if x is a NaN. */ +2: slli a7, xh, 12 + or a7, a7, xl + beqz a7, 1b + movi a2, 1 + abi_return + +.Lle_cmp: + /* Check if x and y have different signs. */ + xor a7, xh, yh + bltz a7, .Lle_diff_signs + + /* Check if x is negative. */ + bltz xh, .Lle_xneg + + /* Check if x <= y. */ + bltu xh, yh, 4f + bne xh, yh, 5f + bltu yl, xl, 5f +4: movi a2, 0 + abi_return + +.Lle_xneg: + /* Check if y <= x. */ + bltu yh, xh, 4b + bne yh, xh, 5f + bgeu xl, yl, 4b +5: movi a2, 1 + abi_return + +.Lle_diff_signs: + bltz xh, 4b + + /* Check if both x and y are zero. */ + or a7, xh, yh + slli a7, a7, 1 + or a7, a7, xl + or a7, a7, yl + movi a2, 1 + movi a3, 0 + moveqz a2, a3, a7 + abi_return + + + /* Greater Than or Equal */ + + .align 4 + .global __gedf2 + .type __gedf2, @function +__gedf2: + abi_entry sp, 32 + movi a6, 0x7ff00000 + ball xh, a6, 2f +1: bnall yh, a6, .Llt_cmp + + /* Check if y is a NaN. */ + slli a7, yh, 12 + or a7, a7, yl + beqz a7, .Llt_cmp + movi a2, -1 + abi_return + + /* Check if x is a NaN. */ +2: slli a7, xh, 12 + or a7, a7, xl + beqz a7, 1b + movi a2, -1 + abi_return + + + /* Less Than */ + + .align 4 + .global __ltdf2 + .type __ltdf2, @function +__ltdf2: + abi_entry sp, 32 + movi a6, 0x7ff00000 + ball xh, a6, 2f +1: bnall yh, a6, .Llt_cmp + + /* Check if y is a NaN. */ + slli a7, yh, 12 + or a7, a7, yl + beqz a7, .Llt_cmp + movi a2, 0 + abi_return + + /* Check if x is a NaN. */ +2: slli a7, xh, 12 + or a7, a7, xl + beqz a7, 1b + movi a2, 0 + abi_return + +.Llt_cmp: + /* Check if x and y have different signs. */ + xor a7, xh, yh + bltz a7, .Llt_diff_signs + + /* Check if x is negative. */ + bltz xh, .Llt_xneg + + /* Check if x < y. */ + bltu xh, yh, 4f + bne xh, yh, 5f + bgeu xl, yl, 5f +4: movi a2, -1 + abi_return + +.Llt_xneg: + /* Check if y < x. */ + bltu yh, xh, 4b + bne yh, xh, 5f + bltu yl, xl, 4b +5: movi a2, 0 + abi_return + +.Llt_diff_signs: + bgez xh, 5b + + /* Check if both x and y are nonzero. */ + or a7, xh, yh + slli a7, a7, 1 + or a7, a7, xl + or a7, a7, yl + movi a2, 0 + movi a3, -1 + movnez a2, a3, a7 + abi_return + + + /* Unordered */ + + .align 4 + .global __unorddf2 + .type __unorddf2, @function +__unorddf2: + abi_entry sp, 32 + movi a6, 0x7ff00000 + ball xh, a6, 3f +1: ball yh, a6, 4f +2: movi a2, 0 + abi_return + +3: slli a7, xh, 12 + or a7, a7, xl + beqz a7, 1b + movi a2, 1 + abi_return + +4: slli a7, yh, 12 + or a7, a7, yl + beqz a7, 2b + movi a2, 1 + abi_return + +#endif /* L_cmpdf2 */ + +#ifdef L_fixdfsi + + .align 4 + .global __fixdfsi + .type __fixdfsi, @function +__fixdfsi: + abi_entry sp, 32 + + /* Check for NaN and Infinity. */ + movi a6, 0x7ff00000 + ball xh, a6, .Lfixdfsi_nan_or_inf + + /* Extract the exponent and check if 0 < (exp - 0x3fe) < 32. */ + extui a4, xh, 20, 11 + extui a5, a6, 19, 10 /* 0x3fe */ + sub a4, a4, a5 + bgei a4, 32, .Lfixdfsi_maxint + blti a4, 1, .Lfixdfsi_zero + + /* Add explicit "1.0" and shift << 11. */ + or a7, xh, a6 + ssai (32 - 11) + src a5, a7, xl + + /* Shift back to the right, based on the exponent. */ + ssl a4 /* shift by 32 - a4 */ + srl a5, a5 + + /* Negate the result if sign != 0. */ + neg a2, a5 + movgez a2, a5, a7 + abi_return + +.Lfixdfsi_nan_or_inf: + /* Handle Infinity and NaN. */ + slli a4, xh, 12 + or a4, a4, xl + beqz a4, .Lfixdfsi_maxint + + /* Translate NaN to +maxint. */ + movi xh, 0 + +.Lfixdfsi_maxint: + slli a4, a6, 11 /* 0x80000000 */ + addi a5, a4, -1 /* 0x7fffffff */ + movgez a4, a5, xh + mov a2, a4 + abi_return + +.Lfixdfsi_zero: + movi a2, 0 + abi_return + +#endif /* L_fixdfsi */ + +#ifdef L_fixdfdi + + .align 4 + .global __fixdfdi + .type __fixdfdi, @function +__fixdfdi: + abi_entry sp, 32 + + /* Check for NaN and Infinity. */ + movi a6, 0x7ff00000 + ball xh, a6, .Lfixdfdi_nan_or_inf + + /* Extract the exponent and check if 0 < (exp - 0x3fe) < 64. */ + extui a4, xh, 20, 11 + extui a5, a6, 19, 10 /* 0x3fe */ + sub a4, a4, a5 + bgei a4, 64, .Lfixdfdi_maxint + blti a4, 1, .Lfixdfdi_zero + + /* Add explicit "1.0" and shift << 11. */ + or a7, xh, a6 + ssai (32 - 11) + src xh, a7, xl + sll xl, xl + + /* Shift back to the right, based on the exponent. */ + ssl a4 /* shift by 64 - a4 */ + bgei a4, 32, .Lfixdfdi_smallshift + srl xl, xh + movi xh, 0 + +.Lfixdfdi_shifted: + /* Negate the result if sign != 0. */ + bgez a7, 1f + neg xl, xl + neg xh, xh + beqz xl, 1f + addi xh, xh, -1 +1: abi_return + +.Lfixdfdi_smallshift: + src xl, xh, xl + srl xh, xh + j .Lfixdfdi_shifted + +.Lfixdfdi_nan_or_inf: + /* Handle Infinity and NaN. */ + slli a4, xh, 12 + or a4, a4, xl + beqz a4, .Lfixdfdi_maxint + + /* Translate NaN to +maxint. */ + movi xh, 0 + +.Lfixdfdi_maxint: + slli a7, a6, 11 /* 0x80000000 */ + bgez xh, 1f + mov xh, a7 + movi xl, 0 + abi_return + +1: addi xh, a7, -1 /* 0x7fffffff */ + movi xl, -1 + abi_return + +.Lfixdfdi_zero: + movi xh, 0 + movi xl, 0 + abi_return + +#endif /* L_fixdfdi */ + +#ifdef L_fixunsdfsi + + .align 4 + .global __fixunsdfsi + .type __fixunsdfsi, @function +__fixunsdfsi: + abi_entry sp, 32 + + /* Check for NaN and Infinity. */ + movi a6, 0x7ff00000 + ball xh, a6, .Lfixunsdfsi_nan_or_inf + + /* Extract the exponent and check if 0 <= (exp - 0x3ff) < 32. */ + extui a4, xh, 20, 11 + extui a5, a6, 20, 10 /* 0x3ff */ + sub a4, a4, a5 + bgei a4, 32, .Lfixunsdfsi_maxint + bltz a4, .Lfixunsdfsi_zero + + /* Add explicit "1.0" and shift << 11. */ + or a7, xh, a6 + ssai (32 - 11) + src a5, a7, xl + + /* Shift back to the right, based on the exponent. */ + addi a4, a4, 1 + beqi a4, 32, .Lfixunsdfsi_bigexp + ssl a4 /* shift by 32 - a4 */ + srl a5, a5 + + /* Negate the result if sign != 0. */ + neg a2, a5 + movgez a2, a5, a7 + abi_return + +.Lfixunsdfsi_nan_or_inf: + /* Handle Infinity and NaN. */ + slli a4, xh, 12 + or a4, a4, xl + beqz a4, .Lfixunsdfsi_maxint + + /* Translate NaN to 0xffffffff. */ + movi a2, -1 + abi_return + +.Lfixunsdfsi_maxint: + slli a4, a6, 11 /* 0x80000000 */ + movi a5, -1 /* 0xffffffff */ + movgez a4, a5, xh + mov a2, a4 + abi_return + +.Lfixunsdfsi_zero: + movi a2, 0 + abi_return + +.Lfixunsdfsi_bigexp: + /* Handle unsigned maximum exponent case. */ + bltz xh, 1f + mov a2, a5 /* no shift needed */ + abi_return + + /* Return 0x80000000 if negative. */ +1: slli a2, a6, 11 + abi_return + +#endif /* L_fixunsdfsi */ + +#ifdef L_fixunsdfdi + + .align 4 + .global __fixunsdfdi + .type __fixunsdfdi, @function +__fixunsdfdi: + abi_entry sp, 32 + + /* Check for NaN and Infinity. */ + movi a6, 0x7ff00000 + ball xh, a6, .Lfixunsdfdi_nan_or_inf + + /* Extract the exponent and check if 0 <= (exp - 0x3ff) < 64. */ + extui a4, xh, 20, 11 + extui a5, a6, 20, 10 /* 0x3ff */ + sub a4, a4, a5 + bgei a4, 64, .Lfixunsdfdi_maxint + bltz a4, .Lfixunsdfdi_zero + + /* Add explicit "1.0" and shift << 11. */ + or a7, xh, a6 + ssai (32 - 11) + src xh, a7, xl + sll xl, xl + + /* Shift back to the right, based on the exponent. */ + addi a4, a4, 1 + beqi a4, 64, .Lfixunsdfdi_bigexp + ssl a4 /* shift by 64 - a4 */ + bgei a4, 32, .Lfixunsdfdi_smallshift + srl xl, xh + movi xh, 0 + +.Lfixunsdfdi_shifted: + /* Negate the result if sign != 0. */ + bgez a7, 1f + neg xl, xl + neg xh, xh + beqz xl, 1f + addi xh, xh, -1 +1: abi_return + +.Lfixunsdfdi_smallshift: + src xl, xh, xl + srl xh, xh + j .Lfixunsdfdi_shifted + +.Lfixunsdfdi_nan_or_inf: + /* Handle Infinity and NaN. */ + slli a4, xh, 12 + or a4, a4, xl + beqz a4, .Lfixunsdfdi_maxint + + /* Translate NaN to 0xffffffff.... */ +1: movi xh, -1 + movi xl, -1 + abi_return + +.Lfixunsdfdi_maxint: + bgez xh, 1b +2: slli xh, a6, 11 /* 0x80000000 */ + movi xl, 0 + abi_return + +.Lfixunsdfdi_zero: + movi xh, 0 + movi xl, 0 + abi_return + +.Lfixunsdfdi_bigexp: + /* Handle unsigned maximum exponent case. */ + bltz a7, 2b + abi_return /* no shift needed */ + +#endif /* L_fixunsdfdi */ + +#ifdef L_floatsidf + + .align 4 + .global __floatunsidf + .type __floatunsidf, @function +__floatunsidf: + abi_entry sp, 32 + beqz a2, .Lfloatsidf_return_zero + + /* Set the sign to zero and jump to the floatsidf code. */ + movi a7, 0 + j .Lfloatsidf_normalize + + .align 4 + .global __floatsidf + .type __floatsidf, @function +__floatsidf: + abi_entry sp, 32 + + /* Check for zero. */ + beqz a2, .Lfloatsidf_return_zero + + /* Save the sign. */ + extui a7, a2, 31, 1 + + /* Get the absolute value. */ +#if XCHAL_HAVE_ABS + abs a2, a2 +#else + neg a4, a2 + movltz a2, a4, a2 +#endif + +.Lfloatsidf_normalize: + /* Normalize with the first 1 bit in the msb. */ + do_nsau a4, a2, a5, a6 + ssl a4 + sll a5, a2 + + /* Shift the mantissa into position. */ + srli xh, a5, 11 + slli xl, a5, (32 - 11) + + /* Set the exponent. */ + movi a5, 0x41d /* 0x3fe + 31 */ + sub a5, a5, a4 + slli a5, a5, 20 + add xh, xh, a5 + + /* Add the sign and return. */ + slli a7, a7, 31 + or xh, xh, a7 + abi_return + +.Lfloatsidf_return_zero: + movi a3, 0 + abi_return + +#endif /* L_floatsidf */ + +#ifdef L_floatdidf + + .align 4 + .global __floatundidf + .type __floatundidf, @function +__floatundidf: + abi_entry sp, 32 + + /* Check for zero. */ + or a4, xh, xl + beqz a4, 2f + + /* Set the sign to zero and jump to the floatdidf code. */ + movi a7, 0 + j .Lfloatdidf_normalize + + .align 4 + .global __floatdidf + .type __floatdidf, @function +__floatdidf: + abi_entry sp, 32 + + /* Check for zero. */ + or a4, xh, xl + beqz a4, 2f + + /* Save the sign. */ + extui a7, xh, 31, 1 + + /* Get the absolute value. */ + bgez xh, .Lfloatdidf_normalize + neg xl, xl + neg xh, xh + beqz xl, .Lfloatdidf_normalize + addi xh, xh, -1 + +.Lfloatdidf_normalize: + /* Normalize with the first 1 bit in the msb of xh. */ + beqz xh, .Lfloatdidf_bigshift + do_nsau a4, xh, a5, a6 + ssl a4 + src xh, xh, xl + sll xl, xl + +.Lfloatdidf_shifted: + /* Shift the mantissa into position, with rounding bits in a6. */ + ssai 11 + sll a6, xl + src xl, xh, xl + srl xh, xh + + /* Set the exponent. */ + movi a5, 0x43d /* 0x3fe + 63 */ + sub a5, a5, a4 + slli a5, a5, 20 + add xh, xh, a5 + + /* Add the sign. */ + slli a7, a7, 31 + or xh, xh, a7 + + /* Round up if the leftover fraction is >= 1/2. */ + bgez a6, 2f + addi xl, xl, 1 + beqz xl, .Lfloatdidf_roundcarry + + /* Check if the leftover fraction is exactly 1/2. */ + slli a6, a6, 1 + beqz a6, .Lfloatdidf_exactlyhalf +2: abi_return + +.Lfloatdidf_bigshift: + /* xh is zero. Normalize with first 1 bit of xl in the msb of xh. */ + do_nsau a4, xl, a5, a6 + ssl a4 + sll xh, xl + movi xl, 0 + addi a4, a4, 32 + j .Lfloatdidf_shifted + +.Lfloatdidf_exactlyhalf: + /* Round down to the nearest even value. */ + srli xl, xl, 1 + slli xl, xl, 1 + abi_return + +.Lfloatdidf_roundcarry: + /* xl is always zero when the rounding increment overflows, so + there's no need to round it to an even value. */ + addi xh, xh, 1 + /* Overflow to the exponent is OK. */ + abi_return + +#endif /* L_floatdidf */ + +#ifdef L_truncdfsf2 + + .align 4 + .global __truncdfsf2 + .type __truncdfsf2, @function +__truncdfsf2: + abi_entry sp, 32 + + /* Adjust the exponent bias. */ + movi a4, (0x3ff - 0x7f) << 20 + sub a5, xh, a4 + + /* Check for underflow. */ + xor a6, xh, a5 + bltz a6, .Ltrunc_underflow + extui a6, a5, 20, 11 + beqz a6, .Ltrunc_underflow + + /* Check for overflow. */ + movi a4, 255 + bge a6, a4, .Ltrunc_overflow + + /* Shift a5/xl << 3 into a5/a4. */ + ssai (32 - 3) + src a5, a5, xl + sll a4, xl + +.Ltrunc_addsign: + /* Add the sign bit. */ + extui a6, xh, 31, 1 + slli a6, a6, 31 + or a2, a6, a5 + + /* Round up if the leftover fraction is >= 1/2. */ + bgez a4, 1f + addi a2, a2, 1 + /* Overflow to the exponent is OK. The answer will be correct. */ + + /* Check if the leftover fraction is exactly 1/2. */ + slli a4, a4, 1 + beqz a4, .Ltrunc_exactlyhalf +1: abi_return + +.Ltrunc_exactlyhalf: + /* Round down to the nearest even value. */ + srli a2, a2, 1 + slli a2, a2, 1 + abi_return + +.Ltrunc_overflow: + /* Check if exponent == 0x7ff. */ + movi a4, 0x7ff00000 + bnall xh, a4, 1f + + /* Check if mantissa is nonzero. */ + slli a5, xh, 12 + or a5, a5, xl + beqz a5, 1f + + /* Shift a4 to set a bit in the mantissa, making a quiet NaN. */ + srli a4, a4, 1 + +1: slli a4, a4, 4 /* 0xff000000 or 0xff800000 */ + /* Add the sign bit. */ + extui a6, xh, 31, 1 + ssai 1 + src a2, a6, a4 + abi_return + +.Ltrunc_underflow: + /* Find shift count for a subnormal. Flush to zero if >= 32. */ + extui a6, xh, 20, 11 + movi a5, 0x3ff - 0x7f + sub a6, a5, a6 + addi a6, a6, 1 + bgeui a6, 32, 1f + + /* Replace the exponent with an explicit "1.0". */ + slli a5, a5, 13 /* 0x700000 */ + or a5, a5, xh + slli a5, a5, 11 + srli a5, a5, 11 + + /* Shift the mantissa left by 3 bits (into a5/a4). */ + ssai (32 - 3) + src a5, a5, xl + sll a4, xl + + /* Shift right by a6. */ + ssr a6 + sll a7, a4 + src a4, a5, a4 + srl a5, a5 + beqz a7, .Ltrunc_addsign + or a4, a4, a6 /* any positive, nonzero value will work */ + j .Ltrunc_addsign + + /* Return +/- zero. */ +1: extui a2, xh, 31, 1 + slli a2, a2, 31 + abi_return + +#endif /* L_truncdfsf2 */ + +#ifdef L_extendsfdf2 + + .align 4 + .global __extendsfdf2 + .type __extendsfdf2, @function +__extendsfdf2: + abi_entry sp, 32 + + /* Save the sign bit and then shift it off. */ + extui a5, a2, 31, 1 + slli a5, a5, 31 + slli a4, a2, 1 + + /* Extract and check the exponent. */ + extui a6, a2, 23, 8 + beqz a6, .Lextend_expzero + addi a6, a6, 1 + beqi a6, 256, .Lextend_nan_or_inf + + /* Shift >> 3 into a4/xl. */ + srli a4, a4, 4 + slli xl, a2, (32 - 3) + + /* Adjust the exponent bias. */ + movi a6, (0x3ff - 0x7f) << 20 + add a4, a4, a6 + + /* Add the sign bit. */ + or xh, a4, a5 + abi_return + +.Lextend_nan_or_inf: + movi a4, 0x7ff00000 + + /* Check for NaN. */ + slli a7, a2, 9 + beqz a7, 1f + + slli a6, a6, 11 /* 0x80000 */ + or a4, a4, a6 + + /* Add the sign and return. */ +1: or xh, a4, a5 + movi xl, 0 + abi_return + +.Lextend_expzero: + beqz a4, 1b + + /* Normalize it to have 8 zero bits before the first 1 bit. */ + do_nsau a7, a4, a2, a3 + addi a7, a7, -8 + ssl a7 + sll a4, a4 + + /* Shift >> 3 into a4/xl. */ + slli xl, a4, (32 - 3) + srli a4, a4, 3 + + /* Set the exponent. */ + movi a6, 0x3fe - 0x7f + sub a6, a6, a7 + slli a6, a6, 20 + add a4, a4, a6 + + /* Add the sign and return. */ + or xh, a4, a5 + abi_return + +#endif /* L_extendsfdf2 */ + + diff --git a/gcc/config/xtensa/ieee754-sf.S b/gcc/config/xtensa/ieee754-sf.S new file mode 100644 index 00000000000..498b20bb11a --- /dev/null +++ b/gcc/config/xtensa/ieee754-sf.S @@ -0,0 +1,1734 @@ +/* IEEE-754 single-precision functions for Xtensa + Copyright (C) 2006 Free Software Foundation, Inc. + Contributed by Bob Wilson (bwilson@tensilica.com) at Tensilica. + + 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. */ + +#ifdef __XTENSA_EB__ +#define xh a2 +#define xl a3 +#define yh a4 +#define yl a5 +#else +#define xh a3 +#define xl a2 +#define yh a5 +#define yl a4 +#endif + +/* Warning! The branch displacements for some Xtensa branch instructions + are quite small, and this code has been carefully laid out to keep + branch targets in range. If you change anything, be sure to check that + the assembler is not relaxing anything to branch over a jump. */ + +#ifdef L_negsf2 + + .align 4 + .global __negsf2 + .type __negsf2, @function +__negsf2: + abi_entry sp, 32 + movi a4, 0x80000000 + xor a2, a2, a4 + abi_return + +#endif /* L_negsf2 */ + +#ifdef L_addsubsf3 + + /* Addition */ +__addsf3_aux: + + /* Handle NaNs and Infinities. (This code is placed before the + start of the function just to keep it in range of the limited + branch displacements.) */ + +.Ladd_xnan_or_inf: + /* If y is neither Infinity nor NaN, return x. */ + bnall a3, a6, 1f + /* If x is a NaN, return it. Otherwise, return y. */ + slli a7, a2, 9 + beqz a7, .Ladd_ynan_or_inf +1: abi_return + +.Ladd_ynan_or_inf: + /* Return y. */ + mov a2, a3 + abi_return + +.Ladd_opposite_signs: + /* Operand signs differ. Do a subtraction. */ + slli a7, a6, 8 + xor a3, a3, a7 + j .Lsub_same_sign + + .align 4 + .global __addsf3 + .type __addsf3, @function +__addsf3: + abi_entry sp, 32 + movi a6, 0x7f800000 + + /* Check if the two operands have the same sign. */ + xor a7, a2, a3 + bltz a7, .Ladd_opposite_signs + +.Ladd_same_sign: + /* Check if either exponent == 0x7f8 (i.e., NaN or Infinity). */ + ball a2, a6, .Ladd_xnan_or_inf + ball a3, a6, .Ladd_ynan_or_inf + + /* Compare the exponents. The smaller operand will be shifted + right by the exponent difference and added to the larger + one. */ + extui a7, a2, 23, 9 + extui a8, a3, 23, 9 + bltu a7, a8, .Ladd_shiftx + +.Ladd_shifty: + /* Check if the smaller (or equal) exponent is zero. */ + bnone a3, a6, .Ladd_yexpzero + + /* Replace y sign/exponent with 0x008. */ + or a3, a3, a6 + slli a3, a3, 8 + srli a3, a3, 8 + +.Ladd_yexpdiff: + /* Compute the exponent difference. */ + sub a10, a7, a8 + + /* Exponent difference > 32 -- just return the bigger value. */ + bgeui a10, 32, 1f + + /* Shift y right by the exponent difference. Any bits that are + shifted out of y are saved in a9 for rounding the result. */ + ssr a10 + movi a9, 0 + src a9, a3, a9 + srl a3, a3 + + /* Do the addition. */ + add a2, a2, a3 + + /* Check if the add overflowed into the exponent. */ + extui a10, a2, 23, 9 + beq a10, a7, .Ladd_round + mov a8, a7 + j .Ladd_carry + +.Ladd_yexpzero: + /* y is a subnormal value. Replace its sign/exponent with zero, + i.e., no implicit "1.0", and increment the apparent exponent + because subnormals behave as if they had the minimum (nonzero) + exponent. Test for the case when both exponents are zero. */ + slli a3, a3, 9 + srli a3, a3, 9 + bnone a2, a6, .Ladd_bothexpzero + addi a8, a8, 1 + j .Ladd_yexpdiff + +.Ladd_bothexpzero: + /* Both exponents are zero. Handle this as a special case. There + is no need to shift or round, and the normal code for handling + a carry into the exponent field will not work because it + assumes there is an implicit "1.0" that needs to be added. */ + add a2, a2, a3 +1: abi_return + +.Ladd_xexpzero: + /* Same as "yexpzero" except skip handling the case when both + exponents are zero. */ + slli a2, a2, 9 + srli a2, a2, 9 + addi a7, a7, 1 + j .Ladd_xexpdiff + +.Ladd_shiftx: + /* Same thing as the "shifty" code, but with x and y swapped. Also, + because the exponent difference is always nonzero in this version, + the shift sequence can use SLL and skip loading a constant zero. */ + bnone a2, a6, .Ladd_xexpzero + + or a2, a2, a6 + slli a2, a2, 8 + srli a2, a2, 8 + +.Ladd_xexpdiff: + sub a10, a8, a7 + bgeui a10, 32, .Ladd_returny + + ssr a10 + sll a9, a2 + srl a2, a2 + + add a2, a2, a3 + + /* Check if the add overflowed into the exponent. */ + extui a10, a2, 23, 9 + bne a10, a8, .Ladd_carry + +.Ladd_round: + /* Round up if the leftover fraction is >= 1/2. */ + bgez a9, 1f + addi a2, a2, 1 + + /* Check if the leftover fraction is exactly 1/2. */ + slli a9, a9, 1 + beqz a9, .Ladd_exactlyhalf +1: abi_return + +.Ladd_returny: + mov a2, a3 + abi_return + +.Ladd_carry: + /* The addition has overflowed into the exponent field, so the + value needs to be renormalized. The mantissa of the result + can be recovered by subtracting the original exponent and + adding 0x800000 (which is the explicit "1.0" for the + mantissa of the non-shifted operand -- the "1.0" for the + shifted operand was already added). The mantissa can then + be shifted right by one bit. The explicit "1.0" of the + shifted mantissa then needs to be replaced by the exponent, + incremented by one to account for the normalizing shift. + It is faster to combine these operations: do the shift first + and combine the additions and subtractions. If x is the + original exponent, the result is: + shifted mantissa - (x << 22) + (1 << 22) + (x << 23) + or: + shifted mantissa + ((x + 1) << 22) + Note that the exponent is incremented here by leaving the + explicit "1.0" of the mantissa in the exponent field. */ + + /* Shift x right by one bit. Save the lsb. */ + mov a10, a2 + srli a2, a2, 1 + + /* See explanation above. The original exponent is in a8. */ + addi a8, a8, 1 + slli a8, a8, 22 + add a2, a2, a8 + + /* Return an Infinity if the exponent overflowed. */ + ball a2, a6, .Ladd_infinity + + /* Same thing as the "round" code except the msb of the leftover + fraction is bit 0 of a10, with the rest of the fraction in a9. */ + bbci.l a10, 0, 1f + addi a2, a2, 1 + beqz a9, .Ladd_exactlyhalf +1: abi_return + +.Ladd_infinity: + /* Clear the mantissa. */ + srli a2, a2, 23 + slli a2, a2, 23 + + /* The sign bit may have been lost in a carry-out. Put it back. */ + slli a8, a8, 1 + or a2, a2, a8 + abi_return + +.Ladd_exactlyhalf: + /* Round down to the nearest even value. */ + srli a2, a2, 1 + slli a2, a2, 1 + abi_return + + + /* Subtraction */ +__subsf3_aux: + + /* Handle NaNs and Infinities. (This code is placed before the + start of the function just to keep it in range of the limited + branch displacements.) */ + +.Lsub_xnan_or_inf: + /* If y is neither Infinity nor NaN, return x. */ + bnall a3, a6, 1f + /* Both x and y are either NaN or Inf, so the result is NaN. */ + movi a4, 0x400000 /* make it a quiet NaN */ + or a2, a2, a4 +1: abi_return + +.Lsub_ynan_or_inf: + /* Negate y and return it. */ + slli a7, a6, 8 + xor a2, a3, a7 + abi_return + +.Lsub_opposite_signs: + /* Operand signs differ. Do an addition. */ + slli a7, a6, 8 + xor a3, a3, a7 + j .Ladd_same_sign + + .align 4 + .global __subsf3 + .type __subsf3, @function +__subsf3: + abi_entry sp, 32 + movi a6, 0x7f800000 + + /* Check if the two operands have the same sign. */ + xor a7, a2, a3 + bltz a7, .Lsub_opposite_signs + +.Lsub_same_sign: + /* Check if either exponent == 0x7f8 (i.e., NaN or Infinity). */ + ball a2, a6, .Lsub_xnan_or_inf + ball a3, a6, .Lsub_ynan_or_inf + + /* Compare the operands. In contrast to addition, the entire + value matters here. */ + extui a7, a2, 23, 8 + extui a8, a3, 23, 8 + bltu a2, a3, .Lsub_xsmaller + +.Lsub_ysmaller: + /* Check if the smaller (or equal) exponent is zero. */ + bnone a3, a6, .Lsub_yexpzero + + /* Replace y sign/exponent with 0x008. */ + or a3, a3, a6 + slli a3, a3, 8 + srli a3, a3, 8 + +.Lsub_yexpdiff: + /* Compute the exponent difference. */ + sub a10, a7, a8 + + /* Exponent difference > 32 -- just return the bigger value. */ + bgeui a10, 32, 1f + + /* Shift y right by the exponent difference. Any bits that are + shifted out of y are saved in a9 for rounding the result. */ + ssr a10 + movi a9, 0 + src a9, a3, a9 + srl a3, a3 + + sub a2, a2, a3 + + /* Subtract the leftover bits in a9 from zero and propagate any + borrow from a2. */ + neg a9, a9 + addi a10, a2, -1 + movnez a2, a10, a9 + + /* Check if the subtract underflowed into the exponent. */ + extui a10, a2, 23, 8 + beq a10, a7, .Lsub_round + j .Lsub_borrow + +.Lsub_yexpzero: + /* Return zero if the inputs are equal. (For the non-subnormal + case, subtracting the "1.0" will cause a borrow from the exponent + and this case can be detected when handling the borrow.) */ + beq a2, a3, .Lsub_return_zero + + /* y is a subnormal value. Replace its sign/exponent with zero, + i.e., no implicit "1.0". Unless x is also a subnormal, increment + y's apparent exponent because subnormals behave as if they had + the minimum (nonzero) exponent. */ + slli a3, a3, 9 + srli a3, a3, 9 + bnone a2, a6, .Lsub_yexpdiff + addi a8, a8, 1 + j .Lsub_yexpdiff + +.Lsub_returny: + /* Negate and return y. */ + slli a7, a6, 8 + xor a2, a3, a7 +1: abi_return + +.Lsub_xsmaller: + /* Same thing as the "ysmaller" code, but with x and y swapped and + with y negated. */ + bnone a2, a6, .Lsub_xexpzero + + or a2, a2, a6 + slli a2, a2, 8 + srli a2, a2, 8 + +.Lsub_xexpdiff: + sub a10, a8, a7 + bgeui a10, 32, .Lsub_returny + + ssr a10 + movi a9, 0 + src a9, a2, a9 + srl a2, a2 + + /* Negate y. */ + slli a11, a6, 8 + xor a3, a3, a11 + + sub a2, a3, a2 + + neg a9, a9 + addi a10, a2, -1 + movnez a2, a10, a9 + + /* Check if the subtract underflowed into the exponent. */ + extui a10, a2, 23, 8 + bne a10, a8, .Lsub_borrow + +.Lsub_round: + /* Round up if the leftover fraction is >= 1/2. */ + bgez a9, 1f + addi a2, a2, 1 + + /* Check if the leftover fraction is exactly 1/2. */ + slli a9, a9, 1 + beqz a9, .Lsub_exactlyhalf +1: abi_return + +.Lsub_xexpzero: + /* Same as "yexpzero". */ + beq a2, a3, .Lsub_return_zero + slli a2, a2, 9 + srli a2, a2, 9 + bnone a3, a6, .Lsub_xexpdiff + addi a7, a7, 1 + j .Lsub_xexpdiff + +.Lsub_return_zero: + movi a2, 0 + abi_return + +.Lsub_borrow: + /* The subtraction has underflowed into the exponent field, so the + value needs to be renormalized. Shift the mantissa left as + needed to remove any leading zeros and adjust the exponent + accordingly. If the exponent is not large enough to remove + all the leading zeros, the result will be a subnormal value. */ + + slli a8, a2, 9 + beqz a8, .Lsub_xzero + do_nsau a6, a8, a7, a11 + srli a8, a8, 9 + bge a6, a10, .Lsub_subnormal + addi a6, a6, 1 + +.Lsub_normalize_shift: + /* Shift the mantissa (a8/a9) left by a6. */ + ssl a6 + src a8, a8, a9 + sll a9, a9 + + /* Combine the shifted mantissa with the sign and exponent, + decrementing the exponent by a6. (The exponent has already + been decremented by one due to the borrow from the subtraction, + but adding the mantissa will increment the exponent by one.) */ + srli a2, a2, 23 + sub a2, a2, a6 + slli a2, a2, 23 + add a2, a2, a8 + j .Lsub_round + +.Lsub_exactlyhalf: + /* Round down to the nearest even value. */ + srli a2, a2, 1 + slli a2, a2, 1 + abi_return + +.Lsub_xzero: + /* If there was a borrow from the exponent, and the mantissa and + guard digits are all zero, then the inputs were equal and the + result should be zero. */ + beqz a9, .Lsub_return_zero + + /* Only the guard digit is nonzero. Shift by min(24, a10). */ + addi a11, a10, -24 + movi a6, 24 + movltz a6, a10, a11 + j .Lsub_normalize_shift + +.Lsub_subnormal: + /* The exponent is too small to shift away all the leading zeros. + Set a6 to the current exponent (which has already been + decremented by the borrow) so that the exponent of the result + will be zero. Do not add 1 to a6 in this case, because: (1) + adding the mantissa will not increment the exponent, so there is + no need to subtract anything extra from the exponent to + compensate, and (2) the effective exponent of a subnormal is 1 + not 0 so the shift amount must be 1 smaller than normal. */ + mov a6, a10 + j .Lsub_normalize_shift + +#endif /* L_addsubsf3 */ + +#ifdef L_mulsf3 + + /* Multiplication */ +__mulsf3_aux: + + /* Handle unusual cases (zeros, subnormals, NaNs and Infinities). + (This code is placed before the start of the function just to + keep it in range of the limited branch displacements.) */ + +.Lmul_xexpzero: + /* Clear the sign bit of x. */ + slli a2, a2, 1 + srli a2, a2, 1 + + /* If x is zero, return zero. */ + beqz a2, .Lmul_return_zero + + /* Normalize x. Adjust the exponent in a8. */ + do_nsau a10, a2, a11, a12 + addi a10, a10, -8 + ssl a10 + sll a2, a2 + movi a8, 1 + sub a8, a8, a10 + j .Lmul_xnormalized + +.Lmul_yexpzero: + /* Clear the sign bit of y. */ + slli a3, a3, 1 + srli a3, a3, 1 + + /* If y is zero, return zero. */ + beqz a3, .Lmul_return_zero + + /* Normalize y. Adjust the exponent in a9. */ + do_nsau a10, a3, a11, a12 + addi a10, a10, -8 + ssl a10 + sll a3, a3 + movi a9, 1 + sub a9, a9, a10 + j .Lmul_ynormalized + +.Lmul_return_zero: + /* Return zero with the appropriate sign bit. */ + srli a2, a7, 31 + slli a2, a2, 31 + j .Lmul_done + +.Lmul_xnan_or_inf: + /* If y is zero, return NaN. */ + slli a8, a3, 1 + bnez a8, 1f + movi a4, 0x400000 /* make it a quiet NaN */ + or a2, a2, a4 + j .Lmul_done +1: + /* If y is NaN, return y. */ + bnall a3, a6, .Lmul_returnx + slli a8, a3, 9 + beqz a8, .Lmul_returnx + +.Lmul_returny: + mov a2, a3 + +.Lmul_returnx: + /* Set the sign bit and return. */ + extui a7, a7, 31, 1 + slli a2, a2, 1 + ssai 1 + src a2, a7, a2 + j .Lmul_done + +.Lmul_ynan_or_inf: + /* If x is zero, return NaN. */ + slli a8, a2, 1 + bnez a8, .Lmul_returny + movi a7, 0x400000 /* make it a quiet NaN */ + or a2, a3, a7 + j .Lmul_done + + .align 4 + .global __mulsf3 + .type __mulsf3, @function +__mulsf3: + abi_entry sp, 48 +#if __XTENSA_CALL0_ABI__ + addi sp, sp, -32 + s32i a12, sp, 16 + s32i a13, sp, 20 + s32i a14, sp, 24 + s32i a15, sp, 28 +#endif + movi a6, 0x7f800000 + + /* Get the sign of the result. */ + xor a7, a2, a3 + + /* Check for NaN and infinity. */ + ball a2, a6, .Lmul_xnan_or_inf + ball a3, a6, .Lmul_ynan_or_inf + + /* Extract the exponents. */ + extui a8, a2, 23, 8 + extui a9, a3, 23, 8 + + beqz a8, .Lmul_xexpzero +.Lmul_xnormalized: + beqz a9, .Lmul_yexpzero +.Lmul_ynormalized: + + /* Add the exponents. */ + add a8, a8, a9 + + /* Replace sign/exponent fields with explicit "1.0". */ + movi a10, 0xffffff + or a2, a2, a6 + and a2, a2, a10 + or a3, a3, a6 + and a3, a3, a10 + + /* Multiply 32x32 to 64 bits. The result ends up in a2/a6. */ + +#if XCHAL_HAVE_MUL32_HIGH + + mull a6, a2, a3 + muluh a2, a2, a3 + +#else + + /* Break the inputs into 16-bit chunks and compute 4 32-bit partial + products. These partial products are: + + 0 xl * yl + + 1 xl * yh + 2 xh * yl + + 3 xh * yh + + If using the Mul16 or Mul32 multiplier options, these input + chunks must be stored in separate registers. For Mac16, the + UMUL.AA.* opcodes can specify that the inputs come from either + half of the registers, so there is no need to shift them out + ahead of time. If there is no multiply hardware, the 16-bit + chunks can be extracted when setting up the arguments to the + separate multiply function. */ + +#if !XCHAL_HAVE_MUL16 && !XCHAL_HAVE_MUL32 && !XCHAL_HAVE_MAC16 + /* Calling a separate multiply function will clobber a0 and requires + use of a8 as a temporary, so save those values now. (The function + uses a custom ABI so nothing else needs to be saved.) */ + s32i a0, sp, 0 + s32i a8, sp, 4 +#endif + +#if XCHAL_HAVE_MUL16 || XCHAL_HAVE_MUL32 + +#define a2h a4 +#define a3h a5 + + /* Get the high halves of the inputs into registers. */ + srli a2h, a2, 16 + srli a3h, a3, 16 + +#define a2l a2 +#define a3l a3 + +#if XCHAL_HAVE_MUL32 && !XCHAL_HAVE_MUL16 + /* Clear the high halves of the inputs. This does not matter + for MUL16 because the high bits are ignored. */ + extui a2, a2, 0, 16 + extui a3, a3, 0, 16 +#endif +#endif /* MUL16 || MUL32 */ + + +#if XCHAL_HAVE_MUL16 + +#define do_mul(dst, xreg, xhalf, yreg, yhalf) \ + mul16u dst, xreg ## xhalf, yreg ## yhalf + +#elif XCHAL_HAVE_MUL32 + +#define do_mul(dst, xreg, xhalf, yreg, yhalf) \ + mull dst, xreg ## xhalf, yreg ## yhalf + +#elif XCHAL_HAVE_MAC16 + +/* The preprocessor insists on inserting a space when concatenating after + a period in the definition of do_mul below. These macros are a workaround + using underscores instead of periods when doing the concatenation. */ +#define umul_aa_ll umul.aa.ll +#define umul_aa_lh umul.aa.lh +#define umul_aa_hl umul.aa.hl +#define umul_aa_hh umul.aa.hh + +#define do_mul(dst, xreg, xhalf, yreg, yhalf) \ + umul_aa_ ## xhalf ## yhalf xreg, yreg; \ + rsr dst, ACCLO + +#else /* no multiply hardware */ + +#define set_arg_l(dst, src) \ + extui dst, src, 0, 16 +#define set_arg_h(dst, src) \ + srli dst, src, 16 + +#define do_mul(dst, xreg, xhalf, yreg, yhalf) \ + set_arg_ ## xhalf (a13, xreg); \ + set_arg_ ## yhalf (a14, yreg); \ + call0 .Lmul_mulsi3; \ + mov dst, a12 +#endif + + /* Add pp1 and pp2 into a6 with carry-out in a9. */ + do_mul(a6, a2, l, a3, h) /* pp 1 */ + do_mul(a11, a2, h, a3, l) /* pp 2 */ + movi a9, 0 + add a6, a6, a11 + bgeu a6, a11, 1f + addi a9, a9, 1 +1: + /* Shift the high half of a9/a6 into position in a9. Note that + this value can be safely incremented without any carry-outs. */ + ssai 16 + src a9, a9, a6 + + /* Compute the low word into a6. */ + do_mul(a11, a2, l, a3, l) /* pp 0 */ + sll a6, a6 + add a6, a6, a11 + bgeu a6, a11, 1f + addi a9, a9, 1 +1: + /* Compute the high word into a2. */ + do_mul(a2, a2, h, a3, h) /* pp 3 */ + add a2, a2, a9 + +#if !XCHAL_HAVE_MUL16 && !XCHAL_HAVE_MUL32 && !XCHAL_HAVE_MAC16 + /* Restore values saved on the stack during the multiplication. */ + l32i a0, sp, 0 + l32i a8, sp, 4 +#endif +#endif + + /* Shift left by 9 bits, unless there was a carry-out from the + multiply, in which case, shift by 8 bits and increment the + exponent. */ + movi a4, 9 + srli a5, a2, 24 - 9 + beqz a5, 1f + addi a4, a4, -1 + addi a8, a8, 1 +1: ssl a4 + src a2, a2, a6 + sll a6, a6 + + /* Subtract the extra bias from the exponent sum (plus one to account + for the explicit "1.0" of the mantissa that will be added to the + exponent in the final result). */ + movi a4, 0x80 + sub a8, a8, a4 + + /* Check for over/underflow. The value in a8 is one less than the + final exponent, so values in the range 0..fd are OK here. */ + movi a4, 0xfe + bgeu a8, a4, .Lmul_overflow + +.Lmul_round: + /* Round. */ + bgez a6, .Lmul_rounded + addi a2, a2, 1 + slli a6, a6, 1 + beqz a6, .Lmul_exactlyhalf + +.Lmul_rounded: + /* Add the exponent to the mantissa. */ + slli a8, a8, 23 + add a2, a2, a8 + +.Lmul_addsign: + /* Add the sign bit. */ + srli a7, a7, 31 + slli a7, a7, 31 + or a2, a2, a7 + +.Lmul_done: +#if __XTENSA_CALL0_ABI__ + l32i a12, sp, 16 + l32i a13, sp, 20 + l32i a14, sp, 24 + l32i a15, sp, 28 + addi sp, sp, 32 +#endif + abi_return + +.Lmul_exactlyhalf: + /* Round down to the nearest even value. */ + srli a2, a2, 1 + slli a2, a2, 1 + j .Lmul_rounded + +.Lmul_overflow: + bltz a8, .Lmul_underflow + /* Return +/- Infinity. */ + movi a8, 0xff + slli a2, a8, 23 + j .Lmul_addsign + +.Lmul_underflow: + /* Create a subnormal value, where the exponent field contains zero, + but the effective exponent is 1. The value of a8 is one less than + the actual exponent, so just negate it to get the shift amount. */ + neg a8, a8 + mov a9, a6 + ssr a8 + bgeui a8, 32, .Lmul_flush_to_zero + + /* Shift a2 right. Any bits that are shifted out of a2 are saved + in a6 (combined with the shifted-out bits currently in a6) for + rounding the result. */ + sll a6, a2 + srl a2, a2 + + /* Set the exponent to zero. */ + movi a8, 0 + + /* Pack any nonzero bits shifted out into a6. */ + beqz a9, .Lmul_round + movi a9, 1 + or a6, a6, a9 + j .Lmul_round + +.Lmul_flush_to_zero: + /* Return zero with the appropriate sign bit. */ + srli a2, a7, 31 + slli a2, a2, 31 + j .Lmul_done + +#if !XCHAL_HAVE_MUL16 && !XCHAL_HAVE_MUL32 && !XCHAL_HAVE_MAC16 + + /* For Xtensa processors with no multiply hardware, this simplified + version of _mulsi3 is used for multiplying 16-bit chunks of + the floating-point mantissas. It uses a custom ABI: the inputs + are passed in a13 and a14, the result is returned in a12, and + a8 and a15 are clobbered. */ + .align 4 +.Lmul_mulsi3: + movi a12, 0 +.Lmul_mult_loop: + add a15, a14, a12 + extui a8, a13, 0, 1 + movnez a12, a15, a8 + + do_addx2 a15, a14, a12, a15 + extui a8, a13, 1, 1 + movnez a12, a15, a8 + + do_addx4 a15, a14, a12, a15 + extui a8, a13, 2, 1 + movnez a12, a15, a8 + + do_addx8 a15, a14, a12, a15 + extui a8, a13, 3, 1 + movnez a12, a15, a8 + + srli a13, a13, 4 + slli a14, a14, 4 + bnez a13, .Lmul_mult_loop + ret +#endif /* !MUL16 && !MUL32 && !MAC16 */ +#endif /* L_mulsf3 */ + +#ifdef L_divsf3 + + /* Division */ +__divsf3_aux: + + /* Handle unusual cases (zeros, subnormals, NaNs and Infinities). + (This code is placed before the start of the function just to + keep it in range of the limited branch displacements.) */ + +.Ldiv_yexpzero: + /* Clear the sign bit of y. */ + slli a3, a3, 1 + srli a3, a3, 1 + + /* Check for division by zero. */ + beqz a3, .Ldiv_yzero + + /* Normalize y. Adjust the exponent in a9. */ + do_nsau a10, a3, a4, a5 + addi a10, a10, -8 + ssl a10 + sll a3, a3 + movi a9, 1 + sub a9, a9, a10 + j .Ldiv_ynormalized + +.Ldiv_yzero: + /* y is zero. Return NaN if x is also zero; otherwise, infinity. */ + slli a4, a2, 1 + srli a4, a4, 1 + srli a2, a7, 31 + slli a2, a2, 31 + or a2, a2, a6 + bnez a4, 1f + movi a4, 0x400000 /* make it a quiet NaN */ + or a2, a2, a4 +1: abi_return + +.Ldiv_xexpzero: + /* Clear the sign bit of x. */ + slli a2, a2, 1 + srli a2, a2, 1 + + /* If x is zero, return zero. */ + beqz a2, .Ldiv_return_zero + + /* Normalize x. Adjust the exponent in a8. */ + do_nsau a10, a2, a4, a5 + addi a10, a10, -8 + ssl a10 + sll a2, a2 + movi a8, 1 + sub a8, a8, a10 + j .Ldiv_xnormalized + +.Ldiv_return_zero: + /* Return zero with the appropriate sign bit. */ + srli a2, a7, 31 + slli a2, a2, 31 + abi_return + +.Ldiv_xnan_or_inf: + /* Set the sign bit of the result. */ + srli a7, a3, 31 + slli a7, a7, 31 + xor a2, a2, a7 + /* If y is NaN or Inf, return NaN. */ + bnall a3, a6, 1f + movi a4, 0x400000 /* make it a quiet NaN */ + or a2, a2, a4 +1: abi_return + +.Ldiv_ynan_or_inf: + /* If y is Infinity, return zero. */ + slli a8, a3, 9 + beqz a8, .Ldiv_return_zero + /* y is NaN; return it. */ + mov a2, a3 + abi_return + + .align 4 + .global __divsf3 + .type __divsf3, @function +__divsf3: + abi_entry sp, 32 + movi a6, 0x7f800000 + + /* Get the sign of the result. */ + xor a7, a2, a3 + + /* Check for NaN and infinity. */ + ball a2, a6, .Ldiv_xnan_or_inf + ball a3, a6, .Ldiv_ynan_or_inf + + /* Extract the exponents. */ + extui a8, a2, 23, 8 + extui a9, a3, 23, 8 + + beqz a9, .Ldiv_yexpzero +.Ldiv_ynormalized: + beqz a8, .Ldiv_xexpzero +.Ldiv_xnormalized: + + /* Subtract the exponents. */ + sub a8, a8, a9 + + /* Replace sign/exponent fields with explicit "1.0". */ + movi a10, 0xffffff + or a2, a2, a6 + and a2, a2, a10 + or a3, a3, a6 + and a3, a3, a10 + + /* The first digit of the mantissa division must be a one. + Shift x (and adjust the exponent) as needed to make this true. */ + bltu a3, a2, 1f + slli a2, a2, 1 + addi a8, a8, -1 +1: + /* Do the first subtraction and shift. */ + sub a2, a2, a3 + slli a2, a2, 1 + + /* Put the quotient into a10. */ + movi a10, 1 + + /* Divide one bit at a time for 23 bits. */ + movi a9, 23 +#if XCHAL_HAVE_LOOPS + loop a9, .Ldiv_loopend +#endif +.Ldiv_loop: + /* Shift the quotient << 1. */ + slli a10, a10, 1 + + /* Is this digit a 0 or 1? */ + bltu a2, a3, 1f + + /* Output a 1 and subtract. */ + addi a10, a10, 1 + sub a2, a2, a3 + + /* Shift the dividend << 1. */ +1: slli a2, a2, 1 + +#if !XCHAL_HAVE_LOOPS + addi a9, a9, -1 + bnez a9, .Ldiv_loop +#endif +.Ldiv_loopend: + + /* Add the exponent bias (less one to account for the explicit "1.0" + of the mantissa that will be added to the exponent in the final + result). */ + addi a8, a8, 0x7e + + /* Check for over/underflow. The value in a8 is one less than the + final exponent, so values in the range 0..fd are OK here. */ + movi a4, 0xfe + bgeu a8, a4, .Ldiv_overflow + +.Ldiv_round: + /* Round. The remainder (<< 1) is in a2. */ + bltu a2, a3, .Ldiv_rounded + addi a10, a10, 1 + beq a2, a3, .Ldiv_exactlyhalf + +.Ldiv_rounded: + /* Add the exponent to the mantissa. */ + slli a8, a8, 23 + add a2, a10, a8 + +.Ldiv_addsign: + /* Add the sign bit. */ + srli a7, a7, 31 + slli a7, a7, 31 + or a2, a2, a7 + abi_return + +.Ldiv_overflow: + bltz a8, .Ldiv_underflow + /* Return +/- Infinity. */ + addi a8, a4, 1 /* 0xff */ + slli a2, a8, 23 + j .Ldiv_addsign + +.Ldiv_exactlyhalf: + /* Remainder is exactly half the divisor. Round even. */ + srli a10, a10, 1 + slli a10, a10, 1 + j .Ldiv_rounded + +.Ldiv_underflow: + /* Create a subnormal value, where the exponent field contains zero, + but the effective exponent is 1. The value of a8 is one less than + the actual exponent, so just negate it to get the shift amount. */ + neg a8, a8 + ssr a8 + bgeui a8, 32, .Ldiv_flush_to_zero + + /* Shift a10 right. Any bits that are shifted out of a10 are + saved in a6 for rounding the result. */ + sll a6, a10 + srl a10, a10 + + /* Set the exponent to zero. */ + movi a8, 0 + + /* Pack any nonzero remainder (in a2) into a6. */ + beqz a2, 1f + movi a9, 1 + or a6, a6, a9 + + /* Round a10 based on the bits shifted out into a6. */ +1: bgez a6, .Ldiv_rounded + addi a10, a10, 1 + slli a6, a6, 1 + bnez a6, .Ldiv_rounded + srli a10, a10, 1 + slli a10, a10, 1 + j .Ldiv_rounded + +.Ldiv_flush_to_zero: + /* Return zero with the appropriate sign bit. */ + srli a2, a7, 31 + slli a2, a2, 31 + abi_return + +#endif /* L_divsf3 */ + +#ifdef L_cmpsf2 + + /* Equal and Not Equal */ + + .align 4 + .global __eqsf2 + .global __nesf2 + .set __nesf2, __eqsf2 + .type __eqsf2, @function +__eqsf2: + abi_entry sp, 32 + bne a2, a3, 4f + + /* The values are equal but NaN != NaN. Check the exponent. */ + movi a6, 0x7f800000 + ball a2, a6, 3f + + /* Equal. */ + movi a2, 0 + abi_return + + /* Not equal. */ +2: movi a2, 1 + abi_return + + /* Check if the mantissas are nonzero. */ +3: slli a7, a2, 9 + j 5f + + /* Check if x and y are zero with different signs. */ +4: or a7, a2, a3 + slli a7, a7, 1 + + /* Equal if a7 == 0, where a7 is either abs(x | y) or the mantissa + or x when exponent(x) = 0x7f8 and x == y. */ +5: movi a2, 0 + movi a3, 1 + movnez a2, a3, a7 + abi_return + + + /* Greater Than */ + + .align 4 + .global __gtsf2 + .type __gtsf2, @function +__gtsf2: + abi_entry sp, 32 + movi a6, 0x7f800000 + ball a2, a6, 2f +1: bnall a3, a6, .Lle_cmp + + /* Check if y is a NaN. */ + slli a7, a3, 9 + beqz a7, .Lle_cmp + movi a2, 0 + abi_return + + /* Check if x is a NaN. */ +2: slli a7, a2, 9 + beqz a7, 1b + movi a2, 0 + abi_return + + + /* Less Than or Equal */ + + .align 4 + .global __lesf2 + .type __lesf2, @function +__lesf2: + abi_entry sp, 32 + movi a6, 0x7f800000 + ball a2, a6, 2f +1: bnall a3, a6, .Lle_cmp + + /* Check if y is a NaN. */ + slli a7, a3, 9 + beqz a7, .Lle_cmp + movi a2, 1 + abi_return + + /* Check if x is a NaN. */ +2: slli a7, a2, 9 + beqz a7, 1b + movi a2, 1 + abi_return + +.Lle_cmp: + /* Check if x and y have different signs. */ + xor a7, a2, a3 + bltz a7, .Lle_diff_signs + + /* Check if x is negative. */ + bltz a2, .Lle_xneg + + /* Check if x <= y. */ + bltu a3, a2, 5f +4: movi a2, 0 + abi_return + +.Lle_xneg: + /* Check if y <= x. */ + bgeu a2, a3, 4b +5: movi a2, 1 + abi_return + +.Lle_diff_signs: + bltz a2, 4b + + /* Check if both x and y are zero. */ + or a7, a2, a3 + slli a7, a7, 1 + movi a2, 1 + movi a3, 0 + moveqz a2, a3, a7 + abi_return + + + /* Greater Than or Equal */ + + .align 4 + .global __gesf2 + .type __gesf2, @function +__gesf2: + abi_entry sp, 32 + movi a6, 0x7f800000 + ball a2, a6, 2f +1: bnall a3, a6, .Llt_cmp + + /* Check if y is a NaN. */ + slli a7, a3, 9 + beqz a7, .Llt_cmp + movi a2, -1 + abi_return + + /* Check if x is a NaN. */ +2: slli a7, a2, 9 + beqz a7, 1b + movi a2, -1 + abi_return + + + /* Less Than */ + + .align 4 + .global __ltsf2 + .type __ltsf2, @function +__ltsf2: + abi_entry sp, 32 + movi a6, 0x7f800000 + ball a2, a6, 2f +1: bnall a3, a6, .Llt_cmp + + /* Check if y is a NaN. */ + slli a7, a3, 9 + beqz a7, .Llt_cmp + movi a2, 0 + abi_return + + /* Check if x is a NaN. */ +2: slli a7, a2, 9 + beqz a7, 1b + movi a2, 0 + abi_return + +.Llt_cmp: + /* Check if x and y have different signs. */ + xor a7, a2, a3 + bltz a7, .Llt_diff_signs + + /* Check if x is negative. */ + bltz a2, .Llt_xneg + + /* Check if x < y. */ + bgeu a2, a3, 5f +4: movi a2, -1 + abi_return + +.Llt_xneg: + /* Check if y < x. */ + bltu a3, a2, 4b +5: movi a2, 0 + abi_return + +.Llt_diff_signs: + bgez a2, 5b + + /* Check if both x and y are nonzero. */ + or a7, a2, a3 + slli a7, a7, 1 + movi a2, 0 + movi a3, -1 + movnez a2, a3, a7 + abi_return + + + /* Unordered */ + + .align 4 + .global __unordsf2 + .type __unordsf2, @function +__unordsf2: + abi_entry sp, 32 + movi a6, 0x7f800000 + ball a2, a6, 3f +1: ball a3, a6, 4f +2: movi a2, 0 + abi_return + +3: slli a7, a2, 9 + beqz a7, 1b + movi a2, 1 + abi_return + +4: slli a7, a3, 9 + beqz a7, 2b + movi a2, 1 + abi_return + +#endif /* L_cmpsf2 */ + +#ifdef L_fixsfsi + + .align 4 + .global __fixsfsi + .type __fixsfsi, @function +__fixsfsi: + abi_entry sp, 32 + + /* Check for NaN and Infinity. */ + movi a6, 0x7f800000 + ball a2, a6, .Lfixsfsi_nan_or_inf + + /* Extract the exponent and check if 0 < (exp - 0x7e) < 32. */ + extui a4, a2, 23, 8 + addi a4, a4, -0x7e + bgei a4, 32, .Lfixsfsi_maxint + blti a4, 1, .Lfixsfsi_zero + + /* Add explicit "1.0" and shift << 8. */ + or a7, a2, a6 + slli a5, a7, 8 + + /* Shift back to the right, based on the exponent. */ + ssl a4 /* shift by 32 - a4 */ + srl a5, a5 + + /* Negate the result if sign != 0. */ + neg a2, a5 + movgez a2, a5, a7 + abi_return + +.Lfixsfsi_nan_or_inf: + /* Handle Infinity and NaN. */ + slli a4, a2, 9 + beqz a4, .Lfixsfsi_maxint + + /* Translate NaN to +maxint. */ + movi a2, 0 + +.Lfixsfsi_maxint: + slli a4, a6, 8 /* 0x80000000 */ + addi a5, a4, -1 /* 0x7fffffff */ + movgez a4, a5, a2 + mov a2, a4 + abi_return + +.Lfixsfsi_zero: + movi a2, 0 + abi_return + +#endif /* L_fixsfsi */ + +#ifdef L_fixsfdi + + .align 4 + .global __fixsfdi + .type __fixsfdi, @function +__fixsfdi: + abi_entry sp, 32 + + /* Check for NaN and Infinity. */ + movi a6, 0x7f800000 + ball a2, a6, .Lfixsfdi_nan_or_inf + + /* Extract the exponent and check if 0 < (exp - 0x7e) < 64. */ + extui a4, a2, 23, 8 + addi a4, a4, -0x7e + bgei a4, 64, .Lfixsfdi_maxint + blti a4, 1, .Lfixsfdi_zero + + /* Add explicit "1.0" and shift << 8. */ + or a7, a2, a6 + slli xh, a7, 8 + + /* Shift back to the right, based on the exponent. */ + ssl a4 /* shift by 64 - a4 */ + bgei a4, 32, .Lfixsfdi_smallshift + srl xl, xh + movi xh, 0 + +.Lfixsfdi_shifted: + /* Negate the result if sign != 0. */ + bgez a7, 1f + neg xl, xl + neg xh, xh + beqz xl, 1f + addi xh, xh, -1 +1: abi_return + +.Lfixsfdi_smallshift: + movi xl, 0 + sll xl, xh + srl xh, xh + j .Lfixsfdi_shifted + +.Lfixsfdi_nan_or_inf: + /* Handle Infinity and NaN. */ + slli a4, a2, 9 + beqz a4, .Lfixsfdi_maxint + + /* Translate NaN to +maxint. */ + movi a2, 0 + +.Lfixsfdi_maxint: + slli a7, a6, 8 /* 0x80000000 */ + bgez a2, 1f + mov xh, a7 + movi xl, 0 + abi_return + +1: addi xh, a7, -1 /* 0x7fffffff */ + movi xl, -1 + abi_return + +.Lfixsfdi_zero: + movi xh, 0 + movi xl, 0 + abi_return + +#endif /* L_fixsfdi */ + +#ifdef L_fixunssfsi + + .align 4 + .global __fixunssfsi + .type __fixunssfsi, @function +__fixunssfsi: + abi_entry sp, 32 + + /* Check for NaN and Infinity. */ + movi a6, 0x7f800000 + ball a2, a6, .Lfixunssfsi_nan_or_inf + + /* Extract the exponent and check if 0 <= (exp - 0x7f) < 32. */ + extui a4, a2, 23, 8 + addi a4, a4, -0x7f + bgei a4, 32, .Lfixunssfsi_maxint + bltz a4, .Lfixunssfsi_zero + + /* Add explicit "1.0" and shift << 8. */ + or a7, a2, a6 + slli a5, a7, 8 + + /* Shift back to the right, based on the exponent. */ + addi a4, a4, 1 + beqi a4, 32, .Lfixunssfsi_bigexp + ssl a4 /* shift by 32 - a4 */ + srl a5, a5 + + /* Negate the result if sign != 0. */ + neg a2, a5 + movgez a2, a5, a7 + abi_return + +.Lfixunssfsi_nan_or_inf: + /* Handle Infinity and NaN. */ + slli a4, a2, 9 + beqz a4, .Lfixunssfsi_maxint + + /* Translate NaN to 0xffffffff. */ + movi a2, -1 + abi_return + +.Lfixunssfsi_maxint: + slli a4, a6, 8 /* 0x80000000 */ + movi a5, -1 /* 0xffffffff */ + movgez a4, a5, a2 + mov a2, a4 + abi_return + +.Lfixunssfsi_zero: + movi a2, 0 + abi_return + +.Lfixunssfsi_bigexp: + /* Handle unsigned maximum exponent case. */ + bltz a2, 1f + mov a2, a5 /* no shift needed */ + abi_return + + /* Return 0x80000000 if negative. */ +1: slli a2, a6, 8 + abi_return + +#endif /* L_fixunssfsi */ + +#ifdef L_fixunssfdi + + .align 4 + .global __fixunssfdi + .type __fixunssfdi, @function +__fixunssfdi: + abi_entry sp, 32 + + /* Check for NaN and Infinity. */ + movi a6, 0x7f800000 + ball a2, a6, .Lfixunssfdi_nan_or_inf + + /* Extract the exponent and check if 0 <= (exp - 0x7f) < 64. */ + extui a4, a2, 23, 8 + addi a4, a4, -0x7f + bgei a4, 64, .Lfixunssfdi_maxint + bltz a4, .Lfixunssfdi_zero + + /* Add explicit "1.0" and shift << 8. */ + or a7, a2, a6 + slli xh, a7, 8 + + /* Shift back to the right, based on the exponent. */ + addi a4, a4, 1 + beqi a4, 64, .Lfixunssfdi_bigexp + ssl a4 /* shift by 64 - a4 */ + bgei a4, 32, .Lfixunssfdi_smallshift + srl xl, xh + movi xh, 0 + +.Lfixunssfdi_shifted: + /* Negate the result if sign != 0. */ + bgez a7, 1f + neg xl, xl + neg xh, xh + beqz xl, 1f + addi xh, xh, -1 +1: abi_return + +.Lfixunssfdi_smallshift: + movi xl, 0 + src xl, xh, xl + srl xh, xh + j .Lfixunssfdi_shifted + +.Lfixunssfdi_nan_or_inf: + /* Handle Infinity and NaN. */ + slli a4, a2, 9 + beqz a4, .Lfixunssfdi_maxint + + /* Translate NaN to 0xffffffff.... */ +1: movi xh, -1 + movi xl, -1 + abi_return + +.Lfixunssfdi_maxint: + bgez a2, 1b +2: slli xh, a6, 8 /* 0x80000000 */ + movi xl, 0 + abi_return + +.Lfixunssfdi_zero: + movi xh, 0 + movi xl, 0 + abi_return + +.Lfixunssfdi_bigexp: + /* Handle unsigned maximum exponent case. */ + bltz a7, 2b + movi xl, 0 + abi_return /* no shift needed */ + +#endif /* L_fixunssfdi */ + +#ifdef L_floatsisf + + .align 4 + .global __floatunsisf + .type __floatunsisf, @function +__floatunsisf: + abi_entry sp, 32 + beqz a2, .Lfloatsisf_return + + /* Set the sign to zero and jump to the floatsisf code. */ + movi a7, 0 + j .Lfloatsisf_normalize + + .align 4 + .global __floatsisf + .type __floatsisf, @function +__floatsisf: + abi_entry sp, 32 + + /* Check for zero. */ + beqz a2, .Lfloatsisf_return + + /* Save the sign. */ + extui a7, a2, 31, 1 + + /* Get the absolute value. */ +#if XCHAL_HAVE_ABS + abs a2, a2 +#else + neg a4, a2 + movltz a2, a4, a2 +#endif + +.Lfloatsisf_normalize: + /* Normalize with the first 1 bit in the msb. */ + do_nsau a4, a2, a5, a6 + ssl a4 + sll a5, a2 + + /* Shift the mantissa into position, with rounding bits in a6. */ + srli a2, a5, 8 + slli a6, a5, (32 - 8) + + /* Set the exponent. */ + movi a5, 0x9d /* 0x7e + 31 */ + sub a5, a5, a4 + slli a5, a5, 23 + add a2, a2, a5 + + /* Add the sign. */ + slli a7, a7, 31 + or a2, a2, a7 + + /* Round up if the leftover fraction is >= 1/2. */ + bgez a6, .Lfloatsisf_return + addi a2, a2, 1 /* Overflow to the exponent is OK. */ + + /* Check if the leftover fraction is exactly 1/2. */ + slli a6, a6, 1 + beqz a6, .Lfloatsisf_exactlyhalf + +.Lfloatsisf_return: + abi_return + +.Lfloatsisf_exactlyhalf: + /* Round down to the nearest even value. */ + srli a2, a2, 1 + slli a2, a2, 1 + abi_return + +#endif /* L_floatsisf */ + +#ifdef L_floatdisf + + .align 4 + .global __floatundisf + .type __floatundisf, @function +__floatundisf: + abi_entry sp, 32 + + /* Check for zero. */ + or a4, xh, xl + beqz a4, 2f + + /* Set the sign to zero and jump to the floatdisf code. */ + movi a7, 0 + j .Lfloatdisf_normalize + + .align 4 + .global __floatdisf + .type __floatdisf, @function +__floatdisf: + abi_entry sp, 32 + + /* Check for zero. */ + or a4, xh, xl + beqz a4, 2f + + /* Save the sign. */ + extui a7, xh, 31, 1 + + /* Get the absolute value. */ + bgez xh, .Lfloatdisf_normalize + neg xl, xl + neg xh, xh + beqz xl, .Lfloatdisf_normalize + addi xh, xh, -1 + +.Lfloatdisf_normalize: + /* Normalize with the first 1 bit in the msb of xh. */ + beqz xh, .Lfloatdisf_bigshift + do_nsau a4, xh, a5, a6 + ssl a4 + src xh, xh, xl + sll xl, xl + +.Lfloatdisf_shifted: + /* Shift the mantissa into position, with rounding bits in a6. */ + ssai 8 + sll a5, xl + src a6, xh, xl + srl xh, xh + beqz a5, 1f + movi a5, 1 + or a6, a6, a5 +1: + /* Set the exponent. */ + movi a5, 0xbd /* 0x7e + 63 */ + sub a5, a5, a4 + slli a5, a5, 23 + add a2, xh, a5 + + /* Add the sign. */ + slli a7, a7, 31 + or a2, a2, a7 + + /* Round up if the leftover fraction is >= 1/2. */ + bgez a6, 2f + addi a2, a2, 1 /* Overflow to the exponent is OK. */ + + /* Check if the leftover fraction is exactly 1/2. */ + slli a6, a6, 1 + beqz a6, .Lfloatdisf_exactlyhalf +2: abi_return + +.Lfloatdisf_bigshift: + /* xh is zero. Normalize with first 1 bit of xl in the msb of xh. */ + do_nsau a4, xl, a5, a6 + ssl a4 + sll xh, xl + movi xl, 0 + addi a4, a4, 32 + j .Lfloatdisf_shifted + +.Lfloatdisf_exactlyhalf: + /* Round down to the nearest even value. */ + srli a2, a2, 1 + slli a2, a2, 1 + abi_return + +#endif /* L_floatdisf */ diff --git a/gcc/config/xtensa/lib1funcs.asm b/gcc/config/xtensa/lib1funcs.asm index 718fcbe39d8..ebfd54ddfcd 100644 --- a/gcc/config/xtensa/lib1funcs.asm +++ b/gcc/config/xtensa/lib1funcs.asm @@ -1,5 +1,5 @@ /* Assembly functions for the Xtensa version of libgcc1. - Copyright (C) 2001,2002,2003, 2005 Free Software Foundation, Inc. + Copyright (C) 2001, 2002, 2003, 2005, 2006 Free Software Foundation, Inc. Contributed by Bob Wilson (bwilson@tensilica.com) at Tensilica. This file is part of GCC. @@ -484,3 +484,6 @@ __modsi3: .size __modsi3,.-__modsi3 #endif /* L_modsi3 */ + +#include "ieee754-df.S" +#include "ieee754-sf.S" diff --git a/gcc/config/xtensa/t-xtensa b/gcc/config/xtensa/t-xtensa index d1c8031fdaa..6bcaa616c5e 100644 --- a/gcc/config/xtensa/t-xtensa +++ b/gcc/config/xtensa/t-xtensa @@ -1,17 +1,14 @@ -# Use GCC's floating-point emulation code -LIB2FUNCS_EXTRA = fp-bit.c dp-bit.c - -dp-bit.c: $(srcdir)/config/fp-bit.c - cat $(srcdir)/config/fp-bit.c > dp-bit.c - -fp-bit.c: $(srcdir)/config/fp-bit.c - echo '#define FLOAT' > fp-bit.c - cat $(srcdir)/config/fp-bit.c >> fp-bit.c - LIB1ASMSRC = xtensa/lib1funcs.asm -LIB1ASMFUNCS = _mulsi3 _nsau _divsi3 _modsi3 _udivsi3 _umodsi3 +LIB1ASMFUNCS = _mulsi3 _nsau _divsi3 _modsi3 _udivsi3 _umodsi3 \ + _negsf2 _addsubsf3 _mulsf3 _divsf3 _cmpsf2 _fixsfsi _fixsfdi \ + _fixunssfsi _fixunssfdi _floatsisf _floatunsisf \ + _floatdisf _floatundisf \ + _negdf2 _addsubdf3 _muldf3 _divdf3 _cmpdf2 _fixdfsi _fixdfdi \ + _fixunsdfsi _fixunsdfdi _floatsidf _floatunsidf \ + _floatdidf _floatundidf \ + _truncdfsf2 _extendsfdf2 -LIB2FUNCS_EXTRA += $(srcdir)/config/xtensa/lib2funcs.S +LIB2FUNCS_EXTRA = $(srcdir)/config/xtensa/lib2funcs.S $(T)crti.o: $(srcdir)/config/xtensa/crti.asm $(GCC_PASSES) $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(MULTILIB_CFLAGS) $(INCLUDES) \ diff --git a/gcc/config/xtensa/xtensa.c b/gcc/config/xtensa/xtensa.c index 32cb94d0320..d05d97e063e 100644 --- a/gcc/config/xtensa/xtensa.c +++ b/gcc/config/xtensa/xtensa.c @@ -204,8 +204,8 @@ static void xtensa_function_epilogue (FILE *, HOST_WIDE_INT); static rtx xtensa_builtin_saveregs (void); static unsigned int xtensa_multibss_section_type_flags (tree, const char *, int) ATTRIBUTE_UNUSED; -static void xtensa_select_rtx_section (enum machine_mode, rtx, - unsigned HOST_WIDE_INT); +static section *xtensa_select_rtx_section (enum machine_mode, rtx, + unsigned HOST_WIDE_INT); static bool xtensa_rtx_costs (rtx, int, int, int *); static tree xtensa_build_builtin_va_list (void); static bool xtensa_return_in_memory (tree, tree); @@ -2098,21 +2098,21 @@ xtensa_va_start (tree valist, rtx nextarg ATTRIBUTE_UNUSED) f_reg = TREE_CHAIN (f_stk); f_ndx = TREE_CHAIN (f_reg); - stk = build (COMPONENT_REF, TREE_TYPE (f_stk), valist, f_stk, NULL_TREE); - reg = build (COMPONENT_REF, TREE_TYPE (f_reg), valist, f_reg, NULL_TREE); - ndx = build (COMPONENT_REF, TREE_TYPE (f_ndx), valist, f_ndx, NULL_TREE); + stk = build3 (COMPONENT_REF, TREE_TYPE (f_stk), valist, f_stk, NULL_TREE); + reg = build3 (COMPONENT_REF, TREE_TYPE (f_reg), valist, f_reg, NULL_TREE); + ndx = build3 (COMPONENT_REF, TREE_TYPE (f_ndx), valist, f_ndx, NULL_TREE); /* Call __builtin_saveregs; save the result in __va_reg */ u = make_tree (ptr_type_node, expand_builtin_saveregs ()); - t = build (MODIFY_EXPR, ptr_type_node, reg, u); + t = build2 (MODIFY_EXPR, ptr_type_node, reg, u); TREE_SIDE_EFFECTS (t) = 1; expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL); /* Set the __va_stk member to ($arg_ptr - 32). */ u = make_tree (ptr_type_node, virtual_incoming_args_rtx); - u = fold (build (PLUS_EXPR, ptr_type_node, u, - build_int_cst (NULL_TREE, -32))); - t = build (MODIFY_EXPR, ptr_type_node, stk, u); + u = fold_build2 (PLUS_EXPR, ptr_type_node, u, + build_int_cst (NULL_TREE, -32)); + t = build2 (MODIFY_EXPR, ptr_type_node, stk, u); TREE_SIDE_EFFECTS (t) = 1; expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL); @@ -2122,7 +2122,7 @@ xtensa_va_start (tree valist, rtx nextarg ATTRIBUTE_UNUSED) if (arg_words >= MAX_ARGS_IN_REGISTERS) arg_words += 2; u = build_int_cst (NULL_TREE, arg_words * UNITS_PER_WORD); - t = build (MODIFY_EXPR, integer_type_node, ndx, u); + t = build2 (MODIFY_EXPR, integer_type_node, ndx, u); TREE_SIDE_EFFECTS (t) = 1; expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL); } @@ -2158,16 +2158,16 @@ xtensa_gimplify_va_arg_expr (tree valist, tree type, tree *pre_p, pre_p, NULL); imag_part = get_initialized_tmp_var (imag_part, pre_p, NULL); - return build (COMPLEX_EXPR, type, real_part, imag_part); + return build2 (COMPLEX_EXPR, type, real_part, imag_part); } f_stk = TYPE_FIELDS (va_list_type_node); f_reg = TREE_CHAIN (f_stk); f_ndx = TREE_CHAIN (f_reg); - stk = build (COMPONENT_REF, TREE_TYPE (f_stk), valist, f_stk, NULL_TREE); - reg = build (COMPONENT_REF, TREE_TYPE (f_reg), valist, f_reg, NULL_TREE); - ndx = build (COMPONENT_REF, TREE_TYPE (f_ndx), valist, f_ndx, NULL_TREE); + stk = build3 (COMPONENT_REF, TREE_TYPE (f_stk), valist, f_stk, NULL_TREE); + reg = build3 (COMPONENT_REF, TREE_TYPE (f_reg), valist, f_reg, NULL_TREE); + ndx = build3 (COMPONENT_REF, TREE_TYPE (f_ndx), valist, f_ndx, NULL_TREE); type_size = size_in_bytes (type); va_size = round_up (type_size, UNITS_PER_WORD); @@ -2187,11 +2187,11 @@ xtensa_gimplify_va_arg_expr (tree valist, tree type, tree *pre_p, { int align = TYPE_ALIGN (type) / BITS_PER_UNIT; - t = build (PLUS_EXPR, integer_type_node, orig_ndx, - build_int_cst (NULL_TREE, align - 1)); - t = build (BIT_AND_EXPR, integer_type_node, t, - build_int_cst (NULL_TREE, -align)); - t = build (MODIFY_EXPR, integer_type_node, orig_ndx, t); + t = build2 (PLUS_EXPR, integer_type_node, orig_ndx, + build_int_cst (NULL_TREE, align - 1)); + t = build2 (BIT_AND_EXPR, integer_type_node, t, + build_int_cst (NULL_TREE, -align)); + t = build2 (MODIFY_EXPR, integer_type_node, orig_ndx, t); gimplify_and_add (t, pre_p); } @@ -2201,8 +2201,8 @@ xtensa_gimplify_va_arg_expr (tree valist, tree type, tree *pre_p, (AP).__va_ndx = orig_ndx + __va_size (TYPE); */ t = fold_convert (integer_type_node, va_size); - t = build (PLUS_EXPR, integer_type_node, orig_ndx, t); - t = build (MODIFY_EXPR, integer_type_node, ndx, t); + t = build2 (PLUS_EXPR, integer_type_node, orig_ndx, t); + t = build2 (MODIFY_EXPR, integer_type_node, ndx, t); gimplify_and_add (t, pre_p); @@ -2221,19 +2221,19 @@ xtensa_gimplify_va_arg_expr (tree valist, tree type, tree *pre_p, lab_over = create_artificial_label (); t = build_int_cst (NULL_TREE, MAX_ARGS_IN_REGISTERS * UNITS_PER_WORD); - t = build (GT_EXPR, boolean_type_node, ndx, t); - t = build (COND_EXPR, void_type_node, t, - build (GOTO_EXPR, void_type_node, lab_false), - NULL); + t = build2 (GT_EXPR, boolean_type_node, ndx, t); + t = build3 (COND_EXPR, void_type_node, t, + build1 (GOTO_EXPR, void_type_node, lab_false), + NULL_TREE); gimplify_and_add (t, pre_p); - t = build (MODIFY_EXPR, void_type_node, array, reg); + t = build2 (MODIFY_EXPR, void_type_node, array, reg); gimplify_and_add (t, pre_p); - t = build (GOTO_EXPR, void_type_node, lab_over); + t = build1 (GOTO_EXPR, void_type_node, lab_over); gimplify_and_add (t, pre_p); - t = build (LABEL_EXPR, void_type_node, lab_false); + t = build1 (LABEL_EXPR, void_type_node, lab_false); gimplify_and_add (t, pre_p); } @@ -2251,26 +2251,26 @@ xtensa_gimplify_va_arg_expr (tree valist, tree type, tree *pre_p, lab_false2 = create_artificial_label (); t = build_int_cst (NULL_TREE, MAX_ARGS_IN_REGISTERS * UNITS_PER_WORD); - t = build (GT_EXPR, boolean_type_node, orig_ndx, t); - t = build (COND_EXPR, void_type_node, t, - build (GOTO_EXPR, void_type_node, lab_false2), - NULL); + t = build2 (GT_EXPR, boolean_type_node, orig_ndx, t); + t = build3 (COND_EXPR, void_type_node, t, + build1 (GOTO_EXPR, void_type_node, lab_false2), + NULL_TREE); gimplify_and_add (t, pre_p); t = size_binop (PLUS_EXPR, va_size, size_int (32)); t = fold_convert (integer_type_node, t); - t = build (MODIFY_EXPR, integer_type_node, ndx, t); + t = build2 (MODIFY_EXPR, integer_type_node, ndx, t); gimplify_and_add (t, pre_p); - t = build (LABEL_EXPR, void_type_node, lab_false2); + t = build1 (LABEL_EXPR, void_type_node, lab_false2); gimplify_and_add (t, pre_p); - t = build (MODIFY_EXPR, void_type_node, array, stk); + t = build2 (MODIFY_EXPR, void_type_node, array, stk); gimplify_and_add (t, pre_p); if (lab_over) { - t = build (LABEL_EXPR, void_type_node, lab_over); + t = build1 (LABEL_EXPR, void_type_node, lab_over); gimplify_and_add (t, pre_p); } @@ -2289,17 +2289,17 @@ xtensa_gimplify_va_arg_expr (tree valist, tree type, tree *pre_p, if (BYTES_BIG_ENDIAN && TREE_CODE (type_size) == INTEGER_CST) { t = size_int (PARM_BOUNDARY / BITS_PER_UNIT); - t = fold (build (GE_EXPR, boolean_type_node, type_size, t)); - t = fold (build (COND_EXPR, sizetype, t, va_size, type_size)); + t = fold_build2 (GE_EXPR, boolean_type_node, type_size, t); + t = fold_build3 (COND_EXPR, sizetype, t, va_size, type_size); size = t; } else size = va_size; t = fold_convert (ptr_type_node, ndx); - addr = build (PLUS_EXPR, ptr_type_node, array, t); + addr = build2 (PLUS_EXPR, ptr_type_node, array, t); t = fold_convert (ptr_type_node, size); - addr = build (MINUS_EXPR, ptr_type_node, addr, t); + addr = build2 (MINUS_EXPR, ptr_type_node, addr, t); addr = fold_convert (build_pointer_type (type), addr); if (indirect) @@ -2421,12 +2421,12 @@ xtensa_multibss_section_type_flags (tree decl, const char *name, int reloc) /* The literal pool stays with the function. */ -static void +static section * xtensa_select_rtx_section (enum machine_mode mode ATTRIBUTE_UNUSED, rtx x ATTRIBUTE_UNUSED, unsigned HOST_WIDE_INT align ATTRIBUTE_UNUSED) { - function_section (current_function_decl); + return function_section (current_function_decl); } diff --git a/gcc/config/xtensa/xtensa.h b/gcc/config/xtensa/xtensa.h index bfa90823f99..0a48ebfbe36 100644 --- a/gcc/config/xtensa/xtensa.h +++ b/gcc/config/xtensa/xtensa.h @@ -1208,7 +1208,7 @@ typedef struct xtensa_args } \ if ((SIZE) > 0) \ { \ - function_section (FUNDECL); \ + switch_to_section (function_section (FUNDECL)); \ fprintf (FILE, "\t.literal_position\n"); \ } \ } while (0) diff --git a/gcc/configure b/gcc/configure index f9bb1e9015f..7578f7fbf26 100755 --- a/gcc/configure +++ b/gcc/configure @@ -309,7 +309,7 @@ ac_includes_default="\ # include #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os target_noncanonical build_subdir host_subdir target_subdir GENINSRC CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT NO_MINUS_C_MINUS_O OUTPUT_OPTION CPP EGREP strict1_warn warn_cflags WERROR nocommon_flag TREEBROWSER valgrind_path valgrind_path_defines valgrind_command coverage_flags enable_multilib enable_shared TARGET_SYSTEM_ROOT TARGET_SYSTEM_ROOT_DEFINE CROSS_SYSTEM_HEADER_DIR onestep SET_MAKE AWK LN_S LN RANLIB ac_ct_RANLIB ranlib_flags INSTALL INSTALL_PROGRAM INSTALL_DATA make_compare_target have_mktemp_command MAKEINFO BUILD_INFO GENERATED_MANPAGES FLEX BISON NM AR stage1_cflags COLLECT2_LIBS GNAT_LIBEXC LDEXP_LIB TARGET_GETGROUPS_T LIBICONV LTLIBICONV LIBICONV_DEP manext objext gthread_flags extra_modes_file extra_opt_files USE_NLS LIBINTL LIBINTL_DEP INCINTL XGETTEXT GMSGFMT POSUB CATALOGS host_cc_for_libada CROSS ALL SYSTEM_HEADER_DIR inhibit_libc CC_FOR_BUILD BUILD_CFLAGS STMP_FIXINC STMP_FIXPROTO collect2 gcc_cv_as ORIGINAL_AS_FOR_TARGET gcc_cv_ld ORIGINAL_LD_FOR_TARGET gcc_cv_nm ORIGINAL_NM_FOR_TARGET gcc_cv_objdump ORIGINAL_OBJDUMP_FOR_TARGET libgcc_visibility GGC zlibdir zlibinc MAINT gcc_tooldir dollar slibdir objdir subdirs srcdir all_boot_languages all_compilers all_gtfiles all_gtfiles_files_langs all_gtfiles_files_files all_lang_makefrags all_lang_makefiles all_languages all_stagestuff build_exeext build_install_headers_dir build_xm_file_list build_xm_include_list build_xm_defines check_languages cc_set_by_configure quoted_cc_set_by_configure cpp_install_dir xmake_file tmake_file extra_gcc_objs extra_headers_list extra_objs extra_parts extra_passes extra_programs float_h_file gcc_config_arguments gcc_gxx_include_dir libstdcxx_incdir host_exeext host_xm_file_list host_xm_include_list host_xm_defines out_host_hook_obj install lang_opt_files lang_specs_files lang_tree_files local_prefix md_file objc_boehm_gc out_file out_object_file stage_prefix_set_by_configure quoted_stage_prefix_set_by_configure thread_file tm_file_list tm_include_list tm_defines tm_p_file_list tm_p_include_list xm_file_list xm_include_list xm_defines c_target_objs cxx_target_objs target_cpu_default GMPLIBS GMPINC LIBOBJS LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os target_noncanonical build_subdir host_subdir target_subdir GENINSRC CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT NO_MINUS_C_MINUS_O OUTPUT_OPTION CPP EGREP strict1_warn warn_cflags WERROR nocommon_flag TREEBROWSER valgrind_path valgrind_path_defines valgrind_command coverage_flags enable_multilib enable_decimal_float enable_shared TARGET_SYSTEM_ROOT TARGET_SYSTEM_ROOT_DEFINE CROSS_SYSTEM_HEADER_DIR onestep SET_MAKE AWK LN_S LN RANLIB ac_ct_RANLIB ranlib_flags INSTALL INSTALL_PROGRAM INSTALL_DATA make_compare_target have_mktemp_command MAKEINFO BUILD_INFO GENERATED_MANPAGES FLEX BISON NM AR stage1_cflags COLLECT2_LIBS GNAT_LIBEXC LDEXP_LIB TARGET_GETGROUPS_T LIBICONV LTLIBICONV LIBICONV_DEP manext objext gthread_flags extra_modes_file extra_opt_files USE_NLS LIBINTL LIBINTL_DEP INCINTL XGETTEXT GMSGFMT POSUB CATALOGS host_cc_for_libada CROSS ALL SYSTEM_HEADER_DIR inhibit_libc CC_FOR_BUILD BUILD_CFLAGS STMP_FIXINC STMP_FIXPROTO collect2 gcc_cv_as ORIGINAL_AS_FOR_TARGET gcc_cv_ld ORIGINAL_LD_FOR_TARGET gcc_cv_nm ORIGINAL_NM_FOR_TARGET gcc_cv_objdump ORIGINAL_OBJDUMP_FOR_TARGET libgcc_visibility GGC zlibdir zlibinc MAINT gcc_tooldir dollar slibdir objdir subdirs srcdir all_boot_languages all_compilers all_gtfiles all_gtfiles_files_langs all_gtfiles_files_files all_lang_makefrags all_lang_makefiles all_languages all_stagestuff build_exeext build_install_headers_dir build_xm_file_list build_xm_include_list build_xm_defines check_languages cc_set_by_configure quoted_cc_set_by_configure cpp_install_dir xmake_file tmake_file extra_gcc_objs extra_headers_list extra_objs extra_parts extra_passes extra_programs float_h_file gcc_config_arguments gcc_gxx_include_dir libstdcxx_incdir host_exeext host_xm_file_list host_xm_include_list host_xm_defines out_host_hook_obj install lang_opt_files lang_specs_files lang_tree_files local_prefix md_file objc_boehm_gc out_file out_object_file stage_prefix_set_by_configure quoted_stage_prefix_set_by_configure thread_file tm_file_list tm_include_list tm_defines tm_p_file_list tm_p_include_list xm_file_list xm_include_list xm_defines c_target_objs cxx_target_objs target_cpu_default GMPLIBS GMPINC LIBOBJS LTLIBOBJS' ac_subst_files='language_hooks' # Initialize some variables set by options. @@ -880,6 +880,7 @@ Optional Features: --enable-gather-detailed-mem-stats enable detailed memory allocation stats gathering --enable-multilib enable library support for multiple ABIs --enable-__cxa_atexit enable __cxa_atexit for C++ + --enable-decimal-float enable decimal float extension to C --enable-threads enable thread usage for target GCC --enable-threads=LIB use LIB thread package for target GCC --enable-objc-gc enable the use of Boehm's garbage collector with @@ -1036,7 +1037,7 @@ esac else echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi - cd $ac_popdir + cd "$ac_popdir" done fi @@ -2392,8 +2393,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -2451,8 +2451,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -2568,8 +2567,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -2623,8 +2621,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -2669,8 +2666,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -2714,8 +2710,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -3137,8 +3132,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -3230,8 +3224,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -3401,8 +3394,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -3467,8 +3459,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -3530,8 +3521,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -3571,8 +3561,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -3628,8 +3617,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -3669,8 +3657,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -3734,8 +3721,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -3766,10 +3752,8 @@ See \`config.log' for more details." >&2;} esac else if test "$cross_compiling" = yes; then - { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot run test program while cross compiling -See \`config.log' for more details." >&2;} + { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5 +echo "$as_me: error: internal error: not reached in cross-compile" >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF @@ -3881,8 +3865,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -3944,8 +3927,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -3985,8 +3967,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -4042,8 +4023,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -4083,8 +4063,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -4148,8 +4127,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -4180,10 +4158,8 @@ See \`config.log' for more details." >&2;} esac else if test "$cross_compiling" = yes; then - { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot run test program while cross compiling -See \`config.log' for more details." >&2;} + { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5 +echo "$as_me: error: internal error: not reached in cross-compile" >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF @@ -4295,8 +4271,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -4358,8 +4333,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -4399,8 +4373,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -4456,8 +4429,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -4497,8 +4469,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -4562,8 +4533,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -4594,10 +4564,8 @@ See \`config.log' for more details." >&2;} esac else if test "$cross_compiling" = yes; then - { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot run test program while cross compiling -See \`config.log' for more details." >&2;} + { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5 +echo "$as_me: error: internal error: not reached in cross-compile" >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF @@ -4709,8 +4677,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -4772,8 +4739,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -4813,8 +4779,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -4870,8 +4835,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -4911,8 +4875,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -4976,8 +4939,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -5008,10 +4970,8 @@ See \`config.log' for more details." >&2;} esac else if test "$cross_compiling" = yes; then - { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot run test program while cross compiling -See \`config.log' for more details." >&2;} + { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5 +echo "$as_me: error: internal error: not reached in cross-compile" >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF @@ -5123,8 +5083,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -5185,8 +5144,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -5248,8 +5206,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -5289,8 +5246,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -5346,8 +5302,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -5387,8 +5342,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -5452,8 +5406,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -5484,10 +5437,8 @@ See \`config.log' for more details." >&2;} esac else if test "$cross_compiling" = yes; then - { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot run test program while cross compiling -See \`config.log' for more details." >&2;} + { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5 +echo "$as_me: error: internal error: not reached in cross-compile" >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF @@ -5601,8 +5552,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -5663,8 +5613,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -5726,8 +5675,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -5767,8 +5715,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -5824,8 +5771,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -5865,8 +5811,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -5930,8 +5875,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -5962,10 +5906,8 @@ See \`config.log' for more details." >&2;} esac else if test "$cross_compiling" = yes; then - { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot run test program while cross compiling -See \`config.log' for more details." >&2;} + { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5 +echo "$as_me: error: internal error: not reached in cross-compile" >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF @@ -6082,8 +6024,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -6133,8 +6074,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -6191,8 +6131,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -6246,8 +6185,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -6492,8 +6430,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -6880,6 +6817,45 @@ if test "${enable___cxa_atexit+set}" = set; then fi; +# Enable C extension for decimal float if target supports it. +# Check whether --enable-decimal-float or --disable-decimal-float was given. +if test "${enable_decimal_float+set}" = set; then + enableval="$enable_decimal_float" + + if test x$enablevar = xyes ; then + case $target in + powerpc*-*-linux* | i?86*-*-linux*) + ;; + *) + { echo "$as_me:$LINENO: WARNING: decimal float is not supported for this target" >&5 +echo "$as_me: WARNING: decimal float is not supported for this target" >&2;} + enable_decimal_float=no + ;; + esac + fi + +else + + case $target in + powerpc*-*-linux*) + enable_decimal_float=yes + ;; + *) + enable_decimal_float=no + ;; + esac + +fi; + + + +dfp=`if test $enable_decimal_float = yes; then echo 1; else echo 0; fi` + +cat >>confdefs.h <<_ACEOF +#define ENABLE_DECIMAL_FLOAT $dfp +_ACEOF + + # Enable threads # Pass with no value to take the default # Pass with a value to specify a thread package @@ -7473,10 +7449,10 @@ if test "${gcc_cv_prog_makeinfo_modern+set}" = set; then else ac_prog_version=`$MAKEINFO --version 2>&1 | sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'` - echo "configure:7476: version of makeinfo is $ac_prog_version" >&5 + echo "configure:7452: version of makeinfo is $ac_prog_version" >&5 case $ac_prog_version in '') gcc_cv_prog_makeinfo_modern=no;; - 4.[2-9]*) + 4.[4-9]*) gcc_cv_prog_makeinfo_modern=yes;; *) gcc_cv_prog_makeinfo_modern=no;; esac @@ -7728,8 +7704,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -7799,8 +7774,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -7965,8 +7939,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -8027,8 +8000,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -8098,8 +8070,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -8374,8 +8345,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -8448,8 +8418,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -8491,8 +8460,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -8549,8 +8517,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -8713,8 +8680,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -8788,8 +8754,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -8843,8 +8808,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -8922,8 +8886,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -8977,8 +8940,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -9046,8 +9008,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -9187,8 +9148,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -9309,8 +9269,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -9602,8 +9561,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -9720,8 +9678,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -9833,8 +9790,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -9992,8 +9948,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -10035,18 +9990,24 @@ else ac_cv_func_fork_works=cross else cat >conftest.$ac_ext <<_ACEOF -/* By Ruediger Kuhlmann. */ - #include - #if HAVE_UNISTD_H - # include - #endif - /* Some systems only have a dummy stub for fork() */ - int main () - { - if (fork() < 0) - exit (1); - exit (0); - } +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ + + /* By Ruediger Kuhlmann. */ + if (fork() < 0) + exit (1); + exit (0); + + ; + return 0; +} _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 @@ -10865,8 +10826,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -10916,8 +10876,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -11007,8 +10966,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -11077,8 +11035,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -11141,8 +11098,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -11260,8 +11216,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -11346,8 +11301,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -11416,8 +11370,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -11492,8 +11445,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -11576,8 +11528,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -11653,8 +11604,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -11720,8 +11670,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -11857,8 +11806,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -12167,8 +12115,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -12429,8 +12376,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -12484,8 +12430,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -16342,8 +16287,8 @@ done rm -f Make-hooks touch Make-hooks -target_list="all.build all.cross start.encap rest.encap tags \ - install-normal install-common install-man \ +target_list="all.cross start.encap rest.encap tags \ + install-common install-man \ uninstall info man srcextra srcman srcinfo \ mostlyclean clean distclean maintainer-clean \ stage1 stage2 stage3 stage4 stageprofile stagefeedback" @@ -17196,6 +17141,7 @@ s,@valgrind_path_defines@,$valgrind_path_defines,;t t s,@valgrind_command@,$valgrind_command,;t t s,@coverage_flags@,$coverage_flags,;t t s,@enable_multilib@,$enable_multilib,;t t +s,@enable_decimal_float@,$enable_decimal_float,;t t s,@enable_shared@,$enable_shared,;t t s,@TARGET_SYSTEM_ROOT@,$TARGET_SYSTEM_ROOT,;t t s,@TARGET_SYSTEM_ROOT_DEFINE@,$TARGET_SYSTEM_ROOT_DEFINE,;t t @@ -17496,11 +17442,6 @@ esac - if test x"$ac_file" != x-; then - { echo "$as_me:$LINENO: creating $ac_file" >&5 -echo "$as_me: creating $ac_file" >&6;} - rm -f "$ac_file" - fi # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ @@ -17539,6 +17480,12 @@ echo "$as_me: error: cannot find input file: $f" >&2;} fi;; esac done` || { (exit 1); exit 1; } + + if test x"$ac_file" != x-; then + { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + rm -f "$ac_file" + fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF sed "$ac_vpsub diff --git a/gcc/configure.ac b/gcc/configure.ac index 169a7cb9c4e..876b1deac51 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -639,6 +639,38 @@ AC_ARG_ENABLE(__cxa_atexit, [ --enable-__cxa_atexit enable __cxa_atexit for C++], [], []) +# Enable C extension for decimal float if target supports it. +AC_ARG_ENABLE(decimal-float, +[ --enable-decimal-float enable decimal float extension to C], +[ + if test x$enablevar = xyes ; then + case $target in + powerpc*-*-linux* | i?86*-*-linux*) + ;; + *) + AC_MSG_WARN(decimal float is not supported for this target, ignored) + enable_decimal_float=no + ;; + esac + fi +], +[ + case $target in + powerpc*-*-linux*) + enable_decimal_float=yes + ;; + *) + enable_decimal_float=no + ;; + esac +]) + +AC_SUBST(enable_decimal_float) + +dfp=`if test $enable_decimal_float = yes; then echo 1; else echo 0; fi` +AC_DEFINE_UNQUOTED(ENABLE_DECIMAL_FLOAT, $dfp, +[Define to 1 to enable decimal float extension to C.]) + # Enable threads # Pass with no value to take the default # Pass with a value to specify a thread package @@ -822,7 +854,7 @@ MISSING="${CONFIG_SHELL-/bin/sh} $srcdir/../missing" # that we can use it. gcc_AC_CHECK_PROG_VER(MAKEINFO, makeinfo, --version, [GNU texinfo.* \([0-9][0-9.]*\)], - [4.[2-9]*]) + [4.[4-9]*]) if test $gcc_cv_prog_makeinfo_modern = no; then MAKEINFO="$MISSING makeinfo" AC_MSG_WARN([ @@ -3255,8 +3287,8 @@ done rm -f Make-hooks touch Make-hooks -target_list="all.build all.cross start.encap rest.encap tags \ - install-normal install-common install-man \ +target_list="all.cross start.encap rest.encap tags \ + install-common install-man \ uninstall info man srcextra srcman srcinfo \ mostlyclean clean distclean maintainer-clean \ stage1 stage2 stage3 stage4 stageprofile stagefeedback" diff --git a/gcc/convert.c b/gcc/convert.c index 5680c39df20..805c6f5c789 100644 --- a/gcc/convert.c +++ b/gcc/convert.c @@ -263,6 +263,28 @@ convert_to_real (tree type, tree expr) && FLOAT_TYPE_P (TREE_TYPE (arg1))) { tree newtype = type; + + if (TYPE_MODE (TREE_TYPE (arg0)) == SDmode + || TYPE_MODE (TREE_TYPE (arg1)) == SDmode) + newtype = dfloat32_type_node; + if (TYPE_MODE (TREE_TYPE (arg0)) == DDmode + || TYPE_MODE (TREE_TYPE (arg1)) == DDmode) + newtype = dfloat64_type_node; + if (TYPE_MODE (TREE_TYPE (arg0)) == TDmode + || TYPE_MODE (TREE_TYPE (arg1)) == TDmode) + newtype = dfloat128_type_node; + if (newtype == dfloat32_type_node + || newtype == dfloat64_type_node + || newtype == dfloat128_type_node) + { + expr = build2 (TREE_CODE (expr), newtype, + fold (convert_to_real (newtype, arg0)), + fold (convert_to_real (newtype, arg1))); + if (newtype == type) + return expr; + break; + } + if (TYPE_PRECISION (TREE_TYPE (arg0)) > TYPE_PRECISION (newtype)) newtype = TREE_TYPE (arg0); if (TYPE_PRECISION (TREE_TYPE (arg1)) > TYPE_PRECISION (newtype)) @@ -351,7 +373,7 @@ convert_to_integer (tree type, tree expr) switch (fcode) { - case BUILT_IN_CEIL: case BUILT_IN_CEILF: case BUILT_IN_CEILL: + CASE_FLT_FN (BUILT_IN_CEIL): /* Only convert in ISO C99 mode. */ if (!TARGET_C99_FUNCTIONS) break; @@ -361,7 +383,7 @@ convert_to_integer (tree type, tree expr) fn = mathfn_built_in (s_intype, BUILT_IN_LCEIL); break; - case BUILT_IN_FLOOR: case BUILT_IN_FLOORF: case BUILT_IN_FLOORL: + CASE_FLT_FN (BUILT_IN_FLOOR): /* Only convert in ISO C99 mode. */ if (!TARGET_C99_FUNCTIONS) break; @@ -371,26 +393,26 @@ convert_to_integer (tree type, tree expr) fn = mathfn_built_in (s_intype, BUILT_IN_LFLOOR); break; - case BUILT_IN_ROUND: case BUILT_IN_ROUNDF: case BUILT_IN_ROUNDL: + CASE_FLT_FN (BUILT_IN_ROUND): if (TYPE_MAIN_VARIANT (type) == TYPE_MAIN_VARIANT (long_long_integer_type_node)) fn = mathfn_built_in (s_intype, BUILT_IN_LLROUND); else fn = mathfn_built_in (s_intype, BUILT_IN_LROUND); break; - case BUILT_IN_RINT: case BUILT_IN_RINTF: case BUILT_IN_RINTL: + CASE_FLT_FN (BUILT_IN_RINT): /* Only convert rint* if we can ignore math exceptions. */ if (flag_trapping_math) break; /* ... Fall through ... */ - case BUILT_IN_NEARBYINT: case BUILT_IN_NEARBYINTF: case BUILT_IN_NEARBYINTL: + CASE_FLT_FN (BUILT_IN_NEARBYINT): if (TYPE_MAIN_VARIANT (type) == TYPE_MAIN_VARIANT (long_long_integer_type_node)) fn = mathfn_built_in (s_intype, BUILT_IN_LLRINT); else fn = mathfn_built_in (s_intype, BUILT_IN_LRINT); break; - case BUILT_IN_TRUNC: case BUILT_IN_TRUNCF: case BUILT_IN_TRUNCL: + CASE_FLT_FN (BUILT_IN_TRUNC): { tree arglist = TREE_OPERAND (s_expr, 1); return convert_to_integer (type, TREE_VALUE (arglist)); @@ -420,7 +442,7 @@ convert_to_integer (tree type, tree expr) expr = fold_build1 (CONVERT_EXPR, lang_hooks.types.type_for_size (POINTER_SIZE, 0), expr); - return fold_build1 (NOP_EXPR, type, expr); + return fold_convert (type, expr); case INTEGER_TYPE: case ENUMERAL_TYPE: @@ -500,9 +522,7 @@ convert_to_integer (tree type, tree expr) /* We can pass truncation down through right shifting when the shift count is a nonpositive constant. */ if (TREE_CODE (TREE_OPERAND (expr, 1)) == INTEGER_CST - && tree_int_cst_lt (TREE_OPERAND (expr, 1), - convert (TREE_TYPE (TREE_OPERAND (expr, 1)), - integer_one_node))) + && tree_int_cst_sgn (TREE_OPERAND (expr, 1)) <= 0) goto trunc1; break; @@ -528,7 +548,7 @@ convert_to_integer (tree type, tree expr) but (int) a << 32 is undefined and would get a warning. */ - tree t = convert_to_integer (type, integer_zero_node); + tree t = build_int_cst (type, 0); /* If the original expression had side-effects, we must preserve it. */ @@ -608,7 +628,17 @@ convert_to_integer (tree type, tree expr) || ex_form == RSHIFT_EXPR || ex_form == LROTATE_EXPR || ex_form == RROTATE_EXPR)) - || ex_form == LSHIFT_EXPR) + || ex_form == LSHIFT_EXPR + /* If we have !flag_wrapv, and either ARG0 or + ARG1 is of a signed type, we have to do + PLUS_EXPR or MINUS_EXPR in an unsigned + type. Otherwise, we would introduce + signed-overflow undefinedness. */ + || (!flag_wrapv + && (ex_form == PLUS_EXPR + || ex_form == MINUS_EXPR) + && (!TYPE_UNSIGNED (TREE_TYPE (arg0)) + || !TYPE_UNSIGNED (TREE_TYPE (arg1))))) typex = lang_hooks.types.unsigned_type (typex); else typex = lang_hooks.types.signed_type (typex); diff --git a/gcc/coretypes.h b/gcc/coretypes.h index 935f660217f..7942459c9b5 100644 --- a/gcc/coretypes.h +++ b/gcc/coretypes.h @@ -43,6 +43,8 @@ struct rtvec_def; typedef struct rtvec_def *rtvec; union tree_node; typedef union tree_node *tree; +union section; +typedef union section section; /* Provide forward struct declaration so that we don't have to include all of cpplib.h whenever a random prototype includes a pointer. diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 17094dd3f69..96cf0a954f2 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,430 @@ +2006-01-14 Mark Mitchell + + PR c++/25663 + * parser.c (cp_parser_direct_declarator): Use cp_parser_error + instead of error. + +2006-01-13 Jason Merrill + + * pt.c (check_explicit_specialization): Use CP_DECL_CONTEXT even more. + + * name-lookup.c (set_decl_namespace): Use CP_DECL_CONTEXT. + * pt.c (check_explicit_specialization): Likewise. + +2006-01-12 Jason Merrill + + PR libstdc++/24660 + * pt.c (check_explicit_specialization): Handle namespace + association. + * name-lookup.c (set_decl_namespace): Likewise. + +2006-01-12 Nathan Sidwell + + PR c++/24824 + * class.c (handle_using_decl): Pass correct scope to + cp_emit_debug_info_for_using. + +2006-01-11 Nathan Sidwell + + PR c++/25386 + * tree.c (lvalue_p_1): Any part of a COMPONENT_REF affects + packedness. + +2006-01-06 Gabriel Dos Reis + + * parser.c (cp_parser_primary_expression): Document the grammar + for the built-in offsetof, a GNU extension. + +2005-01-04 Zdenek Dvorak + + PR c++/25632 + * init.c (constant_value_1): Unshare use of DECL_INITIAL. Fix a typo + in condition. + +2006-01-04 Chris Lattner + + * typeck2.c: update copyright to 2006 + (split_nonconstant_init_1): Set TREE_CONSTANT to true. + +2006-01-04 Mark Mitchell + + PR c++/24782 + * parser.c (cp_parser_nested_name_specifier_opt): Preserve access + checks, even when parsing tentatively. + +2006-01-04 Richard Henderson + + Merge from gomp branch. + * lex.c (handle_pragma_java_exceptions): Fix whitespace. + * parser.c (struct cp_token): Add pragma_kind. + (eof_token): Update to match. + (struct cp_lexer): Add in_pragma; rearrange next for better packing. + (cp_parser_initial_pragma): New. + (cp_lexer_new_main): Use it. Don't bother clearing + c_lex_return_raw_strings. + (cp_lexer_get_preprocessor_token): Always initialize keyword + and pragma_kind fields. Handle CPP_PRAGMA. + (cp_lexer_consume_token): Don't allow CPP_PRAGMA_EOL when + in_pragma is set. + (cp_lexer_handle_pragma): Remove. Update callers to cp_parser_pragma. + (cp_lexer_print_token) : Don't print as a string. + (cp_parser_skip_to_pragma_eol): New. + (cp_parser_error): Use it. + (cp_parser_skip_to_closing_parenthesis): Stop at CPP_PRAGMA_EOL; + rearrange with switch statement. + (cp_parser_skip_to_end_of_statement): Likewise. + (cp_parser_skip_to_end_of_block_or_statement): Likewise. + (cp_parser_skip_to_closing_brace): Likewise. + (cp_parser_skip_until_found): Likewise. + (cp_parser_statement): Add in_compound argument; update callers. + Use it to decide how to handle pragma parsing. + (cp_parser_labeled_statement): Add in_compound argument; pass + it on to cp_parser_statement. + (cp_parser_statement_seq_opt): Stop at CPP_PRAGMA_EOL. + (cp_parser_declaration_seq_opt): Likewise. + (cp_parser_parameter_declaration): Likewise. + (cp_parser_member_specification_opt): Likewise. + (cp_parser_function_definition_after_decl): Likewise. + (cp_parser_cache_group): Handle CPP_PRAGMA/CPP_PRAGMA_EOL pairs. + (cp_parser_pragma): New. + (pragma_lex): New. + +2006-01-04 Dirk Mueller + + * decl.c (finish_constructor_body): create simple + compound stmt instead of a if(1) { } construct. + +2006-01-03 Mark Mitchell + + PR c++/25492 + * name-lookup.c (push_class_level_binding): When a derived class + provides a type binding, eliminate any type binding from a base + class. + + PR c++/25625 + * repo.c (repo_emit_p): Always instantiate static data members + initialized by constant expressions, so that there values are + available. + +2006-01-02 Mark Mitchell + + PR c++/25635 + * class.c (add_method): Set TYPE_HAS_CONVERSION for classes with a + conversion operator. + * decl.c (grokdeclarator): Do not set TYPE_HAS_CONVERSION here. + + PR c++/25638 + * class.c (add_method): Never associate more than one destructor + with a single class. + + PR c++/25637 + * cp-tree.h (do_friend): Adjust prototype. + * decl.c (grokfndecl): Make funcdef_flag a bool, not an int. + (grokdeclarator): Likewise. Refine check for invalid + declarations/definitions of member functions outside of their own + class. + * friend.c (do_friend): Make funcdef_flag a bool, not an int. + + PR c++/25633 + * parser.c (cp_parser_mem_initializer_list): Check result of + cp_parser_mem_initializer against error_mark_node, not NULL_TREE. + (cp_parser_mem_initializer): Return error_mark_node for failure. + + PR c++/25634 + * parser.c (cp_parser_template_parameter_list): Call + begin_template_parm_list and end_template_parm_list here. + (cp_parser_type_parameter): Not here. + (cp_parser_template_declaration_after_export): Or here. + (cp_parser_elaborated_type_specifier): Call + cp_parser_check_template_parameters. + + * tree.c (build_target_expr_with_type): Use force_target_expr. + + * decl2.c (mark_used): Fix typo in comment. + +2006-01-02 Volker Reichelt + + * parser.c (cp_parser_using_declaration): Skip name-lookup on + invalid scope. + +2005-12-30 Gabriel Dos Reis + + * cxx-pretty-print.c (pp_cxx_constant): New. Print + string-literal in parens if input program says so. + (pp_cxx_primary_expression): Hand off constant printing to + pp_cxx_constant. + (pp_cxx_pretty_printer_init): Set pp->c_base.constant. + (pp_cxx_expression): Use pp_cxx_constant for literals. + * error.c (dump_expr): Use pp_constant for literals. + +2005-12-29 Nathan Sidwell + + * method.c (make_thunk): Don't set comdat_linkage here. + (use_thunk): Make thunk one only here, if thunk target is + DECL_ONE_ONLY. + +2005-12-26 Mark Mitchell + + PR c++/25439 + * decl.c (grokdeclarator): Remove dead code. + * ptree.c (cxx_print_xnode): Handle BASELINK. + * parser.c (make_id_declarator): Add sfk parameter. + (cp_parser_direct_declarator): Do not pass TYPE_DECLs to + make_id_declarator. + (cp_parser_declarator_id): Simplify BASELINKs here. + (cp_parser_member_declaration): Adjust calls to + make_id_declarator. + +2005-12-26 Mark Mitchell + + PR c++/23171, c++/23172, c++/25417. + * typeck.c (build_unary_op): Create temporary variables for + compound literals whose addresses are taken. + * init.c (expand_aggr_init_1): Use COMPOUND_LITERAL_P. + * decl.c (reshape_init_vector): Likewise. + (reshape_init): Give it external linkage. + (check_initializer): Use COMPOUND_LITERAL_P. + (initialize_artificial_var): Allow the initializer to be a + CONSTRUCTOR. + * call.c (make_temporary_var_for_ref_to_temp): Use + create_temporary_var. + * cp-tree.h (COMPOUND_LITERAL_P): New macro. + (rehape_init): Declare. + * typeck2.c (digest_init): Use COMPOUND_LITERAL_P. + * semantics.c (finish_compound_literal): Use reshape_init. + +2005-12-23 Mark Mitchell + + PR c++/24671 + * pt.c (instantiate_template): Handle SFINAE. + +2005-12-23 Volker Reichelt + + * decl.c (grokdeclarator): Improve diagnostic for friend + declarations of class members. + +2005-12-22 Mark Mitchell + + PR c++/25369 + * tree.c (really_overloaded_fn): Tweak comment. + * pt.c (tsubst_call_declarator_parms): Remove. + (tsubst_copy): Call mark_used on the member referenced by an + OFFSET_REF. + * semantics.c (finish_qualified_id_expr): Simplify. + * decl2.c (mark_used): Accept BASELINKs. + + PR c++/25364 + * typeck.c (build_unary_op): Pass DECLs not names to + build_offset_refs. + * init.c (build_offset_ref): Do not do name lookup. Do not call + mark_used. + * call.c (build_call): Simplify and tidy. + * semantics.c (finish_qualified_id_expr): Call mark_used. + +2005-12-22 Volker Reichelt + + PR c++/23333 + * parser.c (cp_parser_pure_specifier): Check for PURE_ZERO to + identify a single '0'. + +2005-12-20 Mark Mitchell + + PR c++/21228 + * decl.c (use_eh_spec_block): New function. + (store_parm_decls): Use it. + (finish_function): Likewise. + +2005-12-19 Mark Mitchell + + PR c++/24278 + * init.c (expand_member_init): Print messages about baseclasses + using %T rather than %D. + + PR c++/24915 + * class.c (add_method): Do not treat templates as identical unless + their return types are the same. + +2005-12-12 Mark Mitchell + + PR c++/25300 + * tree.c (build_qualified_name): Return error_mark_node for + erroneous input. + +2005-12-10 Mark Mitchell + + PR c++/25337 + * pt.c (tsubst_copy_and_build): Permit dependent types for the + object in a class member access expression. + +2005-12-10 Terry Laurenzo + + PR java/9861 + * mangle.c (write_bare_function_type): Mangle return type for + methods of Java classes + +2005-12-08 Théodore Papadopoulo + + * call.c (build_conditional_expr): Print types in error messages. + +2005-12-07 Volker Reichelt + + * expr.c (cxx_expand_expr): Call gcc_unreachable instead of abort. + +2005-12-07 Volker Reichelt + + * cp-gimplify.c (gimplify_cp_loop): Use fold_build3. + +2005-12-07 Rafael Ávila de Espíndola + + * Make-lang.in (c++.all.build, c++.install-normal): Remove. + +2005-12-07 Rafael Ávila de Espíndola + + * Make-lang.in: Remove all dependencies on s-gtype. + +2005-12-06 Aldy Hernandez + + PR C++/24138 + * decl.c (reshape_init_array_1): Handle max_index of -1. + +2005-12-06 Roger Sayle + + * typeck.c (build_binary_op): Issue warning if either operand of a + comparison operator is a string literal, except for testing equality + or inequality against NULL. + +2005-12-06 Roger Sayle + + PR c++/25263 + * decl.c (compute_array_index_type): Check that itype is an + INTEGER_CST node before testing/clearing TREE_OVERFLOW. + +2005-12-05 Daniel Berlin + + * ptree.c (cxx_print_decl): Update to check for decl_common + structure. + +2005-12-02 Mark Mitchell + + PR c++/24173 + * decl.c (duplicate_decls): Don't rely on DECL_TEMPLATE_INFO after + clobbering newdecl. + +2005-12-02 Richard Guenther + + * semantics.c (simplify_aggr_init_expr): Use buildN instead + of build. + +2005-12-02 Gabriel Dos Reis + + * parser.c (cp_lexer_new_main): Usr GGC_RESIZEVEC instead of + ggc_realloc. + (cp_parser_template_argument_list): Use XRESIZEVEC instead of + xrealloc. + * class.c (pushclass): Likewise. + +2005-12-02 Gabriel Dos Reis + + * decl2.c (get_priority_info): Use XNEW, not xmalloc. + * decl.c (push_switch): Likewise. + * lex.c (handle_pragma_implementation): Likewise. + * cp-objcp-common.c (decl_shadowed_for_var_insert): Use GGC_NEW, + not ggc_alloc. + (cxx_initialize_diagnostics): Use XNEW, not xmalloc. + * class.c (init_class_processing): Use XNEWVEC, not xmalloc. + * g++spec.c (lang_specific_driver): Likewise. + * mangle.c (save_partially_mangled_name): Likewise. + * parser.c (cp_lexer_new_main): Use GGC_NEWVEC, not ggc_alloc. + (cp_parser_template_argument_list): Use XNEWVEC, nto xmalloc. + (cp_parser_sizeof_operand): Likewise. + * repo.c (open_repo_file, open_repo_file): Likewise. + +2005-12-01 Gabriel Dos Reis + + * parser.c (cp_parser_make_typename_type): Call make_typename_type + with tf_none instead of magic value 0. + (cp_parser_explicit_instantiation): Call do_type_instantiation + with tf_error instead of magic value 1. + (cp_parser_elaborated_type_specifier): Call make_typename_type + with tf_error instead of magic value 1. + (cp_parser_class_name): Likewise. + (cp_parser_lookup_name): Likewise. + +2005-12-01 Gabriel Dos Reis + + * parser.c (cp_parser_declaration): Set token2.type to CPP_EOF, + not RID_MAX. + +2005-11-30 Jason Merrill + + PR c++/21123 + * cp-gimplify.c (cp_genericize_r): Don't dereference invisible reference + parms in a thunk. + +2005-11-30 Ben Elliston + + * typeck.c (build_x_unary_op): Correct spelling in error message. + +2005-11-28 Nathan Sidwell + + PR c++/21166 + * class.c (check_field_decls): Only set DECL_PACKED on a field + when its natural alignment is > BITS_PER_UNIT. + +2005-11-27 Volker Reichelt + + PR c++/24979 + * cp-tree.h (DECL_MAIN_P): Remove duplicate definition. + +2005-11-26 Richard Henderson + + * lex.c: Update for pragma_lex rename. + * parser.c: Likewise. + +2005-11-25 Volker Reichelt + + PR c++/9278 + * decl.c (grokparms): Do not allow typedef-names in a '(void)' + parmlist. + +2005-11-25 Volker Reichelt + + * typeck2.c (process_init_constructor_union): Remove check for + unnamed union members. + +2005-11-25 Volker Reichelt + + * name-lookup.c (lookup_name_real): Merge two if's. + +2005-11-25 Volker Reichelt + + * pt.c (instantiate_class_template): Clean-up. + +2005-11-25 Volker Reichelt + + * pt.c (template_class_depth_real): Remove. Move functionality to ... + (template_class_depth): ... here, replacing count_specializations + with 0. Adjust comment. + +2005-11-24 Richard Guenther + Dirk Mueller + + PR c++/14024 + * typeck.c (build_reinterpret_cast_1): Use + strict_aliasing_warning. + +2005-11-23 Gabriel Dos Reis + + PR c++/24235 + * pt.c (check_instantiated_args): Reword diagnostic message about + template argument involving local types. + +2005-11-23 Gabriel Dos Reis + + PR c++/21667 + * typeck.c (build_array_ref): Avoid code duplicate. Use common + C/C++ diagnostic function warn_array_subscript_with_type_char. + 2005-11-21 Gabriel Dos Reis PR c++/22238 diff --git a/gcc/cp/Make-lang.in b/gcc/cp/Make-lang.in index 7b9b7d9046e..4f59fc7bac3 100644 --- a/gcc/cp/Make-lang.in +++ b/gcc/cp/Make-lang.in @@ -23,8 +23,8 @@ # 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.all.cross, foo.start.encap, foo.rest.encap, +# 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 @@ -109,15 +109,9 @@ $(srcdir)/cp/cfns.h: $(srcdir)/cp/cfns.gperf gperf -o -C -E -k '1-6,$$' -j1 -D -N 'libc_name_p' -L ANSI-C \ $(srcdir)/cp/cfns.gperf > $(srcdir)/cp/cfns.h -gtype-cp.h gt-cp-call.h gt-cp-decl.h gt-cp-decl2.h : s-gtype; @true -gt-cp-pt.h gt-cp-repo.h gt-cp-parser.h gt-cp-method.h : s-gtype; @true -gt-cp-tree.h gt-cp-mangle.h gt-cp-name-lookup.h gt-cp-typeck2.h: s-gtype; @true -gt-cp-rtti.h gt-cp-cp-objcp-common.h: s-gtype ; @true - # # Build hooks: -c++.all.build: g++$(exeext) c++.all.cross: g++-cross$(exeext) c++.start.encap: g++$(exeext) c++.rest.encap: @@ -146,9 +140,6 @@ lang_checks += check-g++ # Install hooks: # cc1plus is installed elsewhere as part of $(COMPILERS). -# Nothing to do here. -c++.install-normal: - # Install the driver program as $(target)-g++ # and also as either g++ (if native) or $(tooldir)/bin/g++. c++.install-common: installdirs diff --git a/gcc/cp/call.c b/gcc/cp/call.c index 77cbe2a5ae5..8dd3ebc6c89 100644 --- a/gcc/cp/call.c +++ b/gcc/cp/call.c @@ -284,18 +284,28 @@ build_call (tree function, tree parms) function = build_addr_func (function); - if (TYPE_PTRMEMFUNC_P (TREE_TYPE (function))) - { - sorry ("unable to call pointer to member function here"); - return error_mark_node; - } - + gcc_assert (TYPE_PTR_P (TREE_TYPE (function))); fntype = TREE_TYPE (TREE_TYPE (function)); + gcc_assert (TREE_CODE (fntype) == FUNCTION_TYPE + || TREE_CODE (fntype) == METHOD_TYPE); result_type = TREE_TYPE (fntype); if (TREE_CODE (function) == ADDR_EXPR && TREE_CODE (TREE_OPERAND (function, 0)) == FUNCTION_DECL) - decl = TREE_OPERAND (function, 0); + { + decl = TREE_OPERAND (function, 0); + if (!TREE_USED (decl)) + { + /* We invoke build_call directly for several library + functions. These may have been declared normally if + we're building libgcc, so we can't just check + DECL_ARTIFICIAL. */ + gcc_assert (DECL_ARTIFICIAL (decl) + || !strncmp (IDENTIFIER_POINTER (DECL_NAME (decl)), + "__", 2)); + mark_used (decl); + } + } else decl = NULL_TREE; @@ -314,17 +324,6 @@ build_call (tree function, tree parms) if (decl && DECL_CONSTRUCTOR_P (decl)) is_constructor = 1; - if (decl && ! TREE_USED (decl)) - { - /* We invoke build_call directly for several library functions. - These may have been declared normally if we're building libgcc, - so we can't just check DECL_ARTIFICIAL. */ - gcc_assert (DECL_ARTIFICIAL (decl) - || !strncmp (IDENTIFIER_POINTER (DECL_NAME (decl)), - "__", 2)); - mark_used (decl); - } - /* Don't pass empty class objects by value. This is useful for tags in STL, which are used to control overload resolution. We don't need to handle other cases of copying empty classes. */ @@ -3278,7 +3277,8 @@ build_conditional_expr (tree arg1, tree arg2, tree arg3) || (conv2 && conv2->kind == ck_ambig) || (conv3 && conv3->kind == ck_ambig)) { - error ("operands to ?: have different types"); + error ("operands to ?: have different types %qT and %qT", + arg2_type, arg3_type); result = error_mark_node; } else if (conv2 && !conv2->bad_p) @@ -3488,7 +3488,8 @@ build_conditional_expr (tree arg1, tree arg2, tree arg3) if (!result_type) { - error ("operands to ?: have different types"); + error ("operands to ?: have different types %qT and %qT", + arg2_type, arg3_type); return error_mark_node; } @@ -6429,10 +6430,7 @@ make_temporary_var_for_ref_to_temp (tree decl, tree type) tree var; /* Create the variable. */ - var = build_decl (VAR_DECL, NULL_TREE, type); - DECL_ARTIFICIAL (var) = 1; - DECL_IGNORED_P (var) = 1; - TREE_USED (var) = 1; + var = create_temporary_var (type); /* Register the variable. */ if (TREE_STATIC (decl)) @@ -6447,12 +6445,8 @@ make_temporary_var_for_ref_to_temp (tree decl, tree type) var = pushdecl_top_level (var); } else - { - /* Create a new cleanup level if necessary. */ - maybe_push_cleanup_level (type); - /* Don't push unnamed temps. Do set DECL_CONTEXT, though. */ - DECL_CONTEXT (var) = current_function_decl; - } + /* Create a new cleanup level if necessary. */ + maybe_push_cleanup_level (type); return var; } diff --git a/gcc/cp/class.c b/gcc/cp/class.c index 7c43d3b242e..86dbcca14e6 100644 --- a/gcc/cp/class.c +++ b/gcc/cp/class.c @@ -982,9 +982,10 @@ add_method (tree type, tree method, tree using_decl) for (fns = current_fns; fns; fns = OVL_NEXT (fns)) { tree fn = OVL_CURRENT (fns); + tree fn_type; + tree method_type; tree parms1; tree parms2; - bool same = 1; if (TREE_CODE (fn) != TREE_CODE (method)) continue; @@ -999,8 +1000,10 @@ add_method (tree type, tree method, tree using_decl) functions in the derived class override and/or hide member functions with the same name and parameter types in a base class (rather than conflicting). */ - parms1 = TYPE_ARG_TYPES (TREE_TYPE (fn)); - parms2 = TYPE_ARG_TYPES (TREE_TYPE (method)); + fn_type = TREE_TYPE (fn); + method_type = TREE_TYPE (method); + parms1 = TYPE_ARG_TYPES (fn_type); + parms2 = TYPE_ARG_TYPES (method_type); /* Compare the quals on the 'this' parm. Don't compare the whole types, as used functions are treated as @@ -1009,23 +1012,26 @@ add_method (tree type, tree method, tree using_decl) && ! DECL_STATIC_FUNCTION_P (method) && (TYPE_QUALS (TREE_TYPE (TREE_VALUE (parms1))) != TYPE_QUALS (TREE_TYPE (TREE_VALUE (parms2))))) - same = 0; + continue; - /* For templates, the template parms must be identical. */ + /* For templates, the return type and template parameters + must be identical. */ if (TREE_CODE (fn) == TEMPLATE_DECL - && !comp_template_parms (DECL_TEMPLATE_PARMS (fn), - DECL_TEMPLATE_PARMS (method))) - same = 0; + && (!same_type_p (TREE_TYPE (fn_type), + TREE_TYPE (method_type)) + || !comp_template_parms (DECL_TEMPLATE_PARMS (fn), + DECL_TEMPLATE_PARMS (method)))) + continue; if (! DECL_STATIC_FUNCTION_P (fn)) parms1 = TREE_CHAIN (parms1); if (! DECL_STATIC_FUNCTION_P (method)) parms2 = TREE_CHAIN (parms2); - if (same && compparms (parms1, parms2) + if (compparms (parms1, parms2) && (!DECL_CONV_FN_P (fn) - || same_type_p (TREE_TYPE (TREE_TYPE (fn)), - TREE_TYPE (TREE_TYPE (method))))) + || same_type_p (TREE_TYPE (fn_type), + TREE_TYPE (method_type)))) { if (using_decl) { @@ -1053,10 +1059,16 @@ add_method (tree type, tree method, tree using_decl) } } + /* A class should never have more than one destructor. */ + if (current_fns && DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P (method)) + return false; + /* Add the new binding. */ overload = build_overload (method, current_fns); - if (!conv_p && slot >= CLASSTYPE_FIRST_CONVERSION_SLOT && !complete_p) + if (conv_p) + TYPE_HAS_CONVERSION (type) = 1; + else if (slot >= CLASSTYPE_FIRST_CONVERSION_SLOT && !complete_p) push_class_level_binding (DECL_NAME (method), overload); if (insert_p) @@ -1147,7 +1159,7 @@ handle_using_decl (tree using_decl, tree t) old_value = NULL_TREE; } - cp_emit_debug_info_for_using (decl, current_class_type); + cp_emit_debug_info_for_using (decl, USING_DECL_SCOPE (using_decl)); if (is_overloaded_fn (decl)) flist = decl; @@ -2801,7 +2813,7 @@ check_field_decls (tree t, tree *access_decls, (0, "ignoring packed attribute on unpacked non-POD field %q+#D", x); - else + else if (TYPE_ALIGN (TREE_TYPE (x)) > BITS_PER_UNIT) DECL_PACKED (x) = 1; } @@ -5334,7 +5346,7 @@ init_class_processing (void) current_class_depth = 0; current_class_stack_size = 10; current_class_stack - = xmalloc (current_class_stack_size * sizeof (struct class_stack_node)); + = XNEWVEC (struct class_stack_node, current_class_stack_size); local_classes = VEC_alloc (tree, gc, 8); sizeof_biggest_empty_class = size_zero_node; @@ -5382,9 +5394,8 @@ pushclass (tree type) { current_class_stack_size *= 2; current_class_stack - = xrealloc (current_class_stack, - current_class_stack_size - * sizeof (struct class_stack_node)); + = XRESIZEVEC (struct class_stack_node, current_class_stack, + current_class_stack_size); } /* Insert a new entry on the class stack. */ diff --git a/gcc/cp/cp-gimplify.c b/gcc/cp/cp-gimplify.c index a4d59f563fc..2eb4ae9f6c0 100644 --- a/gcc/cp/cp-gimplify.c +++ b/gcc/cp/cp-gimplify.c @@ -247,8 +247,7 @@ gimplify_cp_loop (tree cond, tree body, tree incr, bool cond_is_first) if (cond && !integer_nonzerop (cond)) { t = build_bc_goto (bc_break); - exit = build3 (COND_EXPR, void_type_node, cond, exit, t); - exit = fold (exit); + exit = fold_build3 (COND_EXPR, void_type_node, cond, exit, t); gimplify_stmt (&exit); if (cond_is_first) @@ -596,7 +595,10 @@ cp_genericize_r (tree *stmt_p, int *walk_subtrees, void *data) tree stmt = *stmt_p; struct pointer_set_t *p_set = (struct pointer_set_t*) data; - if (is_invisiref_parm (stmt)) + if (is_invisiref_parm (stmt) + /* Don't dereference parms in a thunk, pass the references through. */ + && !(DECL_THUNK_P (current_function_decl) + && TREE_CODE (stmt) == PARM_DECL)) { *stmt_p = convert_from_reference (stmt); *walk_subtrees = 0; diff --git a/gcc/cp/cp-objcp-common.c b/gcc/cp/cp-objcp-common.c index 43a7576bcd4..7a4d862336c 100644 --- a/gcc/cp/cp-objcp-common.c +++ b/gcc/cp/cp-objcp-common.c @@ -154,7 +154,7 @@ void cxx_initialize_diagnostics (diagnostic_context *context) { pretty_printer *base = context->printer; - cxx_pretty_printer *pp = xmalloc (sizeof (cxx_pretty_printer)); + cxx_pretty_printer *pp = XNEW (cxx_pretty_printer); memcpy (pp_base (pp), base, sizeof (pretty_printer)); pp_cxx_pretty_printer_init (pp); context->printer = (pretty_printer *) pp; @@ -229,7 +229,7 @@ decl_shadowed_for_var_insert (tree from, tree to) struct tree_map *h; void **loc; - h = ggc_alloc (sizeof (struct tree_map)); + h = GGC_NEW (struct tree_map); h->hash = htab_hash_pointer (from); h->from = from; h->to = to; diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h index 978a95f85af..3fbaff86916 100644 --- a/gcc/cp/cp-tree.h +++ b/gcc/cp/cp-tree.h @@ -2440,6 +2440,11 @@ extern void decl_shadowed_for_var_insert (tree, tree); #define BRACE_ENCLOSED_INITIALIZER_P(NODE) \ (TREE_CODE (NODE) == CONSTRUCTOR && !TREE_TYPE (NODE)) +/* True if NODE is a compound-literal, i.e., a brace-enclosed + initializer cast to a particular type. */ +#define COMPOUND_LITERAL_P(NODE) \ + (TREE_CODE (NODE) == CONSTRUCTOR && TREE_HAS_CONSTRUCTOR (NODE)) + #define EMPTY_CONSTRUCTOR_P(NODE) (TREE_CODE (NODE) == CONSTRUCTOR \ && VEC_empty (constructor_elt, \ CONSTRUCTOR_ELTS (NODE)) \ @@ -3274,13 +3279,6 @@ extern GTY(()) VEC(tree,gc) *local_classes; && IDENTIFIER_POINTER (ID_NODE)[1] == '_') #endif /* !defined(NO_DOLLAR_IN_LABEL) || !defined(NO_DOT_IN_LABEL) */ -/* Returns nonzero iff NODE is a declaration for the global function - `main'. */ -#define DECL_MAIN_P(NODE) \ - (DECL_EXTERN_C_FUNCTION_P (NODE) \ - && DECL_NAME (NODE) != NULL_TREE \ - && MAIN_NAME_P (DECL_NAME (NODE))) - /* Nonzero if we're done parsing and into end-of-file activities. */ @@ -3864,6 +3862,7 @@ extern const char *cxx_comdat_group (tree); extern bool cp_missing_noreturn_ok_p (tree); extern void initialize_artificial_var (tree, tree); extern tree check_var_type (tree, tree); +extern tree reshape_init (tree, tree); extern bool have_extern_spec; @@ -3936,7 +3935,7 @@ extern tree cplus_expand_constant (tree); extern int is_friend (tree, tree); extern void make_friend_class (tree, tree, bool); extern void add_friend (tree, tree, bool); -extern tree do_friend (tree, tree, tree, tree, enum overload_flags, cp_cv_quals, int); +extern tree do_friend (tree, tree, tree, tree, enum overload_flags, cp_cv_quals, bool); /* in init.c */ extern tree expand_member_init (tree); diff --git a/gcc/cp/cxx-pretty-print.c b/gcc/cp/cxx-pretty-print.c index cdaf470ce26..43fbe2b3bfa 100644 --- a/gcc/cp/cxx-pretty-print.c +++ b/gcc/cp/cxx-pretty-print.c @@ -292,6 +292,29 @@ pp_cxx_qualified_id (cxx_pretty_printer *pp, tree t) } } + +static void +pp_cxx_constant (cxx_pretty_printer *pp, tree t) +{ + switch (TREE_CODE (t)) + { + case STRING_CST: + { + const bool in_parens = PAREN_STRING_LITERAL_P (t); + if (in_parens) + pp_cxx_left_paren (pp); + pp_c_constant (pp_c_base (pp), t); + if (in_parens) + pp_cxx_right_paren (pp); + } + break; + + default: + pp_c_constant (pp_c_base (pp), t); + break; + } +} + /* id-expression: unqualified-id qualified-id */ @@ -321,10 +344,10 @@ pp_cxx_primary_expression (cxx_pretty_printer *pp, tree t) { switch (TREE_CODE (t)) { - case STRING_CST: case INTEGER_CST: case REAL_CST: - pp_c_constant (pp_c_base (pp), t); + case STRING_CST: + pp_cxx_constant (pp, t); break; case BASELINK: @@ -848,7 +871,7 @@ pp_cxx_expression (cxx_pretty_printer *pp, tree t) case STRING_CST: case INTEGER_CST: case REAL_CST: - pp_c_constant (pp_c_base (pp), t); + pp_cxx_constant (pp, t); break; case RESULT_DECL: @@ -1961,6 +1984,7 @@ pp_cxx_pretty_printer_init (cxx_pretty_printer *pp) /* pp->c_base.statement = (pp_fun) pp_cxx_statement; */ + pp->c_base.constant = (pp_fun) pp_cxx_constant; pp->c_base.id_expression = (pp_fun) pp_cxx_id_expression; pp->c_base.primary_expression = (pp_fun) pp_cxx_primary_expression; pp->c_base.postfix_expression = (pp_fun) pp_cxx_postfix_expression; diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index d87983c1cb9..2f8533412fd 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -114,7 +114,6 @@ static void store_parm_decls (tree); static void initialize_local_var (tree, tree); static void expand_static_init (tree, tree); static tree next_initializable_field (tree); -static tree reshape_init (tree, tree); /* Erroneous argument lists can use this *IFF* they do not modify it. */ tree error_mark_list; @@ -1054,6 +1053,7 @@ duplicate_decls (tree newdecl, tree olddecl, bool newdecl_is_friend) unsigned olddecl_uid = DECL_UID (olddecl); int olddecl_friend = 0, types_match = 0, hidden_friend = 0; int new_defines_function = 0; + tree new_template; if (newdecl == olddecl) return olddecl; @@ -1690,6 +1690,7 @@ duplicate_decls (tree newdecl, tree olddecl, bool newdecl_is_friend) if (! DECL_EXTERNAL (olddecl)) DECL_EXTERNAL (newdecl) = 0; + new_template = NULL_TREE; if (DECL_LANG_SPECIFIC (newdecl) && DECL_LANG_SPECIFIC (olddecl)) { DECL_INTERFACE_KNOWN (newdecl) |= DECL_INTERFACE_KNOWN (olddecl); @@ -1712,6 +1713,8 @@ duplicate_decls (tree newdecl, tree olddecl, bool newdecl_is_friend) DECL_LANG_SPECIFIC (olddecl)->decl_flags.u2; DECL_NONCONVERTING_P (newdecl) = DECL_NONCONVERTING_P (olddecl); DECL_REPO_AVAILABLE_P (newdecl) = DECL_REPO_AVAILABLE_P (olddecl); + if (DECL_TEMPLATE_INFO (newdecl)) + new_template = DECL_TI_TEMPLATE (newdecl); DECL_TEMPLATE_INFO (newdecl) = DECL_TEMPLATE_INFO (olddecl); DECL_INITIALIZED_IN_CLASS_P (newdecl) |= DECL_INITIALIZED_IN_CLASS_P (olddecl); @@ -1873,7 +1876,7 @@ duplicate_decls (tree newdecl, tree olddecl, bool newdecl_is_friend) memcpy ((char *) olddecl + sizeof (struct tree_decl_common), (char *) newdecl + sizeof (struct tree_decl_common), sizeof (struct tree_function_decl) - sizeof (struct tree_decl_common)); - if (DECL_TEMPLATE_INFO (newdecl)) + if (new_template) /* If newdecl is a template instantiation, it is possible that the following sequence of events has occurred: @@ -1896,7 +1899,7 @@ duplicate_decls (tree newdecl, tree olddecl, bool newdecl_is_friend) instantiations so that if we try to do the instantiation again we won't get the clobbered declaration. */ reregister_specialization (newdecl, - DECL_TI_TEMPLATE (newdecl), + new_template, olddecl); } else @@ -2431,7 +2434,7 @@ static struct cp_switch *switch_stack; void push_switch (tree switch_stmt) { - struct cp_switch *p = xmalloc (sizeof (struct cp_switch)); + struct cp_switch *p = XNEW (struct cp_switch); p->level = current_binding_level; p->next = switch_stack; p->switch_stmt = switch_stmt; @@ -4205,6 +4208,10 @@ reshape_init_array_1 (tree elt_type, tree max_index, reshape_iter *d) if (sized_array_p) { + /* Minus 1 is used for zero sized arrays. */ + if (integer_all_onesp (max_index)) + return new_init; + if (host_integerp (max_index, 1)) max_index_cst = tree_low_cst (max_index, 1); /* sizetype is sign extended, not zero extended. */ @@ -4266,8 +4273,7 @@ reshape_init_vector (tree type, reshape_iter *d) gcc_assert (TREE_CODE (type) == VECTOR_TYPE); - if (TREE_CODE (d->cur->value) == CONSTRUCTOR - && TREE_HAS_CONSTRUCTOR (d->cur->value)) + if (COMPOUND_LITERAL_P (d->cur->value)) { tree value = d->cur->value; if (!same_type_p (TREE_TYPE (value), type)) @@ -4451,7 +4457,7 @@ reshape_init_r (tree type, reshape_iter *d, bool first_initializer_p) we should add a call to reshape_init in finish_compound_literal, before calling digest_init, so changing this code would still not be necessary. */ - if (!TREE_HAS_CONSTRUCTOR (init)) + if (!COMPOUND_LITERAL_P (init)) { ++d->cur; gcc_assert (BRACE_ENCLOSED_INITIALIZER_P (init)); @@ -4491,14 +4497,13 @@ reshape_init_r (tree type, reshape_iter *d, bool first_initializer_p) routine transforms INIT from the former form into the latter. The revised CONSTRUCTOR node is returned. */ -static tree +tree reshape_init (tree type, tree init) { VEC(constructor_elt, gc) *v; reshape_iter d; tree new_init; - gcc_assert (TREE_CODE (init) == CONSTRUCTOR); gcc_assert (BRACE_ENCLOSED_INITIALIZER_P (init)); v = CONSTRUCTOR_ELTS (init); @@ -4587,7 +4592,7 @@ check_initializer (tree decl, tree init, int flags, tree *cleanup) /* Do not reshape constructors of vectors (they don't need to be reshaped. */ if (TREE_CODE (init) == CONSTRUCTOR - && !TREE_HAS_CONSTRUCTOR (init) + && !COMPOUND_LITERAL_P (init) && !TREE_TYPE (init)) /* ptrmemfunc */ { init = reshape_init (type, init); @@ -4610,7 +4615,6 @@ check_initializer (tree decl, tree init, int flags, tree *cleanup) goto initialize_aggr; else if (TREE_CODE (init) == CONSTRUCTOR) { - gcc_assert (BRACE_ENCLOSED_INITIALIZER_P (init)); if (TYPE_NON_AGGREGATE_CLASS (type)) { error ("%qD must be initialized by constructor, " @@ -4829,13 +4833,17 @@ initialize_local_var (tree decl, tree init) /* DECL is a VAR_DECL for a compiler-generated variable with static storage duration (like a virtual table) whose initializer is a - compile-time constant. Initialize the variable and provide it to - the back end. */ + compile-time constant. INIT must be either a TREE_LIST of values, + or a CONSTRUCTOR. Initialize the variable and provide it to the + back end. */ void initialize_artificial_var (tree decl, tree init) { - DECL_INITIAL (decl) = build_constructor_from_list (NULL_TREE, init); + if (TREE_CODE (init) == TREE_LIST) + init = build_constructor_from_list (NULL_TREE, init); + gcc_assert (TREE_CODE (init) == CONSTRUCTOR); + DECL_INITIAL (decl) = init; DECL_INITIALIZED_P (decl) = 1; determine_visibility (decl); layout_var_decl (decl); @@ -5689,7 +5697,7 @@ grokfndecl (tree ctype, int publicp, int inlinep, special_function_kind sfk, - int funcdef_flag, + bool funcdef_flag, int template_count, tree in_namespace, tree* attrlist) @@ -5910,7 +5918,7 @@ grokfndecl (tree ctype, decl = check_explicit_specialization (orig_declarator, decl, template_count, - 2 * (funcdef_flag != 0) + + 2 * funcdef_flag + 4 * (friendp != 0)); if (decl == error_mark_node) return NULL_TREE; @@ -5932,27 +5940,26 @@ grokfndecl (tree ctype, > template_class_depth (ctype)) ? current_template_parms : NULL_TREE); - - if (old_decl && TREE_CODE (old_decl) == TEMPLATE_DECL) - /* Because grokfndecl is always supposed to return a - FUNCTION_DECL, we pull out the DECL_TEMPLATE_RESULT - here. We depend on our callers to figure out that its - really a template that's being returned. */ - old_decl = DECL_TEMPLATE_RESULT (old_decl); - - if (old_decl && DECL_STATIC_FUNCTION_P (old_decl) - && TREE_CODE (TREE_TYPE (decl)) == METHOD_TYPE) - /* Remove the `this' parm added by grokclassfn. - XXX Isn't this done in start_function, too? */ - revert_static_member_fn (decl); - if (old_decl && DECL_ARTIFICIAL (old_decl)) - error ("definition of implicitly-declared %qD", old_decl); - if (old_decl) { tree ok; tree pushed_scope; + if (TREE_CODE (old_decl) == TEMPLATE_DECL) + /* Because grokfndecl is always supposed to return a + FUNCTION_DECL, we pull out the DECL_TEMPLATE_RESULT + here. We depend on our callers to figure out that its + really a template that's being returned. */ + old_decl = DECL_TEMPLATE_RESULT (old_decl); + + if (DECL_STATIC_FUNCTION_P (old_decl) + && TREE_CODE (TREE_TYPE (decl)) == METHOD_TYPE) + /* Remove the `this' parm added by grokclassfn. + XXX Isn't this done in start_function, too? */ + revert_static_member_fn (decl); + if (DECL_ARTIFICIAL (old_decl)) + error ("definition of implicitly-declared %qD", old_decl); + /* Since we've smashed OLD_DECL to its DECL_TEMPLATE_RESULT, we must do the same to DECL. */ if (TREE_CODE (decl) == TEMPLATE_DECL) @@ -6370,7 +6377,8 @@ compute_array_index_type (tree name, tree size) /* Make sure that there was no overflow when creating to a signed index type. (For example, on a 32-bit machine, an array with size 2^32 - 1 is too big.) */ - else if (TREE_OVERFLOW (itype)) + else if (TREE_CODE (itype) == INTEGER_CST + && TREE_OVERFLOW (itype)) { error ("overflow in array dimension"); TREE_OVERFLOW (itype) = 0; @@ -6618,7 +6626,8 @@ grokdeclarator (const cp_declarator *declarator, tree typedef_decl = NULL_TREE; const char *name = NULL; tree typedef_type = NULL_TREE; - int funcdef_flag = 0; + /* True if this declarator is a function definition. */ + bool funcdef_flag = false; cp_declarator_kind innermost_code = cdk_error; int bitfield = 0; #if 0 @@ -6665,9 +6674,9 @@ grokdeclarator (const cp_declarator *declarator, thread_p = declspecs->specs[(int)ds_thread]; if (decl_context == FUNCDEF) - funcdef_flag = 1, decl_context = NORMAL; + funcdef_flag = true, decl_context = NORMAL; else if (decl_context == MEMFUNCDEF) - funcdef_flag = -1, decl_context = FIELD; + funcdef_flag = true, decl_context = FIELD; else if (decl_context == BITFIELD) bitfield = 1, decl_context = FIELD; @@ -6716,10 +6725,6 @@ grokdeclarator (const cp_declarator *declarator, else if (TREE_CODE (qualifying_scope) == NAMESPACE_DECL) in_namespace = qualifying_scope; } - if (TREE_CODE (decl) == BASELINK) - decl = BASELINK_FUNCTIONS (decl); - if (decl == error_mark_node) - return error_mark_node; switch (TREE_CODE (decl)) { case BIT_NOT_EXPR: @@ -6783,11 +6788,6 @@ grokdeclarator (const cp_declarator *declarator, } break; - case TYPE_DECL: - dname = constructor_name (TREE_TYPE (decl)); - name = IDENTIFIER_POINTER (dname); - break; - default: gcc_unreachable (); } @@ -7253,8 +7253,6 @@ grokdeclarator (const cp_declarator *declarator, else { unqualified_id = id_declarator->u.id.unqualified_name; - if (TREE_CODE (unqualified_id) == BASELINK) - unqualified_id = BASELINK_FUNCTIONS (unqualified_id); switch (TREE_CODE (unqualified_id)) { case BIT_NOT_EXPR: @@ -7262,11 +7260,6 @@ grokdeclarator (const cp_declarator *declarator, = constructor_name (TREE_OPERAND (unqualified_id, 0)); break; - case TYPE_DECL: - unqualified_id - = constructor_name (TREE_TYPE (unqualified_id)); - break; - case IDENTIFIER_NODE: case TEMPLATE_ID_EXPR: break; @@ -7356,8 +7349,6 @@ grokdeclarator (const cp_declarator *declarator, && (friendp == 0 || dname == current_class_name)) ctype = current_class_type; - if (ctype && sfk == sfk_conversion) - TYPE_HAS_CONVERSION (ctype) = 1; if (ctype && (sfk == sfk_constructor || sfk == sfk_destructor)) { @@ -7600,28 +7591,36 @@ grokdeclarator (const cp_declarator *declarator, } if (ctype == current_class_type) - pedwarn ("extra qualification %<%T::%> on member %qs", - ctype, name); + { + if (friendp) + pedwarn ("member functions are implicitly friends of their class"); + else + pedwarn ("extra qualification %<%T::%> on member %qs", + ctype, name); + } else if (TREE_CODE (type) == FUNCTION_TYPE) { tree sname = declarator->u.id.unqualified_name; + if (current_class_type + && (!friendp || funcdef_flag)) + { + error (funcdef_flag + ? "cannot define member function %<%T::%s%> within %<%T%>" + : "cannot declare member function %<%T::%s%> within %<%T%>", + ctype, name, current_class_type); + return error_mark_node; + } + if (TREE_CODE (sname) == IDENTIFIER_NODE && NEW_DELETE_OPNAME_P (sname)) /* Overloaded operator new and operator delete are always static functions. */ ; - else if (current_class_type == NULL_TREE || friendp) - type - = build_method_type_directly (ctype, - TREE_TYPE (type), - TYPE_ARG_TYPES (type)); else - { - error ("cannot declare member function %<%T::%s%> within %<%T%>", - ctype, name, current_class_type); - return error_mark_node; - } + type = build_method_type_directly (ctype, + TREE_TYPE (type), + TYPE_ARG_TYPES (type)); } else if (declspecs->specs[(int)ds_typedef] || COMPLETE_TYPE_P (complete_type (ctype))) @@ -8174,14 +8173,14 @@ grokdeclarator (const cp_declarator *declarator, { /* Friends are treated specially. */ if (ctype == current_class_type) - warning (0, "member functions are implicitly friends of their class"); + ; /* We already issued a pedwarn. */ else if (decl && DECL_NAME (decl)) { if (template_class_depth (current_class_type) == 0) { decl = check_explicit_specialization (unqualified_id, decl, template_count, - 2 * (funcdef_flag != 0) + 4); + 2 * funcdef_flag + 4); if (decl == error_mark_node) return error_mark_node; } @@ -8598,6 +8597,7 @@ grokparms (cp_parameter_declarator *first_parm, tree *parms) if (VOID_TYPE_P (type)) { if (same_type_p (type, void_type_node) + && DECL_SELF_REFERENCE_P (type) && !DECL_NAME (decl) && !result && !parm->next && !ellipsis) /* this is a parmlist of `(void)', which is ok. */ break; @@ -10472,6 +10472,30 @@ start_function (cp_decl_specifier_seq *declspecs, return 1; } +/* Returns true iff an EH_SPEC_BLOCK should be created in the body of + FN. */ + +static bool +use_eh_spec_block (tree fn) +{ + return (flag_exceptions && flag_enforce_eh_specs + && !processing_template_decl + && TYPE_RAISES_EXCEPTIONS (TREE_TYPE (fn)) + /* We insert the EH_SPEC_BLOCK only in the original + function; then, it is copied automatically to the + clones. */ + && !DECL_CLONED_FUNCTION_P (fn) + /* Implicitly-generated constructors and destructors have + exception specifications. However, those specifications + are the union of the possible exceptions specified by the + constructors/destructors for bases and members, so no + unallowed exception will ever reach this function. By + not creating the EH_SPEC_BLOCK we save a little memory, + and we avoid spurious warnings about unreachable + code. */ + && !DECL_ARTIFICIAL (fn)); +} + /* Store the parameter declarations into the current function declaration. This is called after parsing the parameter declarations, before digesting the body of the function. @@ -10542,16 +10566,8 @@ store_parm_decls (tree current_function_parms) DECL_ARGUMENTS is not modified. */ current_binding_level->names = chainon (nonparms, DECL_ARGUMENTS (fndecl)); - /* For a cloned function, we've already got all the code we need; - there's no need to add any extra bits. */ - if (!DECL_CLONED_FUNCTION_P (fndecl)) - { - /* Do the starting of the exception specifications, if we have any. */ - if (flag_exceptions && !processing_template_decl - && flag_enforce_eh_specs - && TYPE_RAISES_EXCEPTIONS (TREE_TYPE (current_function_decl))) - current_eh_spec_block = begin_eh_spec_block (); - } + if (use_eh_spec_block (current_function_decl)) + current_eh_spec_block = begin_eh_spec_block (); } @@ -10609,31 +10625,8 @@ finish_constructor_body (void) static void begin_destructor_body (void) { - tree if_stmt; tree compound_stmt; - /* If the dtor is empty, and we know there is not any possible - way we could use any vtable entries, before they are possibly - set by a base class dtor, we don't have to setup the vtables, - as we know that any base class dtor will set up any vtables - it needs. We avoid MI, because one base class dtor can do a - virtual dispatch to an overridden function that would need to - have a non-related vtable set up, we cannot avoid setting up - vtables in that case. We could change this to see if there - is just one vtable. - - ??? In the destructor for a class, the vtables are set - appropriately for that class. There will be no non-related - vtables. jason 2001-12-11. */ - if_stmt = begin_if_stmt (); - - /* If it is not safe to avoid setting up the vtables, then - someone will change the condition to be boolean_true_node. - (Actually, for now, we do not have code to set the condition - appropriately, so we just assume that we always need to - initialize the vtables.) */ - finish_if_stmt_cond (boolean_true_node, if_stmt); - compound_stmt = begin_compound_stmt (0); /* Make all virtual function table pointers in non-virtual base @@ -10642,8 +10635,6 @@ begin_destructor_body (void) initialize_vtbl_ptrs (current_class_ptr); finish_compound_stmt (compound_stmt); - finish_then_clause (if_stmt); - finish_if_stmt (if_stmt); /* And insert cleanups for our bases and members so that they will be properly destroyed if we throw. */ @@ -10838,10 +10829,7 @@ finish_function (int flags) #endif } - /* Finish dealing with exception specifiers. */ - if (flag_exceptions && !processing_template_decl - && flag_enforce_eh_specs - && TYPE_RAISES_EXCEPTIONS (TREE_TYPE (current_function_decl))) + if (use_eh_spec_block (current_function_decl)) finish_eh_spec_block (TYPE_RAISES_EXCEPTIONS (TREE_TYPE (current_function_decl)), current_eh_spec_block); diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c index dcf3217dfb3..9408c8acc88 100644 --- a/gcc/cp/decl2.c +++ b/gcc/cp/decl2.c @@ -2301,7 +2301,7 @@ get_priority_info (int priority) { /* Create a new priority information structure, and insert it into the map. */ - pi = xmalloc (sizeof (struct priority_info_s)); + pi = XNEW (struct priority_info_s); pi->initializations_p = 0; pi->destructions_p = 0; splay_tree_insert (priority_info_map, @@ -3233,14 +3233,27 @@ check_default_args (tree x) } } -/* Mark DECL as "used" in the program. If DECL is a specialization or - implicitly declared class member, generate the actual definition. */ +/* Mark DECL (either a _DECL or a BASELINK) as "used" in the program. + If DECL is a specialization or implicitly declared class member, + generate the actual definition. */ void mark_used (tree decl) { HOST_WIDE_INT saved_processing_template_decl = 0; + /* If DECL is a BASELINK for a single function, then treat it just + like the DECL for the function. Otherwise, if the BASELINK is + for an overloaded function, we don't know which function was + actually used until after overload resolution. */ + if (TREE_CODE (decl) == BASELINK) + { + decl = BASELINK_FUNCTIONS (decl); + if (really_overloaded_fn (decl)) + return; + decl = OVL_CURRENT (decl); + } + TREE_USED (decl) = 1; /* If we don't need a value, then we don't need to synthesize DECL. */ if (skip_evaluation) diff --git a/gcc/cp/error.c b/gcc/cp/error.c index be0ee5968ee..d2ee9c509d7 100644 --- a/gcc/cp/error.c +++ b/gcc/cp/error.c @@ -1318,17 +1318,10 @@ dump_expr (tree t, int flags) dump_decl (t, (flags & ~TFF_DECL_SPECIFIERS) | TFF_NO_FUNCTION_ARGUMENTS); break; - case STRING_CST: - if (PAREN_STRING_LITERAL_P (t)) - pp_cxx_left_paren (cxx_pp); - pp_c_constant (pp_c_base (cxx_pp), t); - if (PAREN_STRING_LITERAL_P (t)) - pp_cxx_right_paren (cxx_pp); - break; - case INTEGER_CST: case REAL_CST: - pp_c_constant (pp_c_base (cxx_pp), t); + case STRING_CST: + pp_constant (cxx_pp, t); break; case THROW_EXPR: diff --git a/gcc/cp/expr.c b/gcc/cp/expr.c index c60380aa777..40390028dff 100644 --- a/gcc/cp/expr.c +++ b/gcc/cp/expr.c @@ -113,7 +113,7 @@ cxx_expand_expr (tree exp, rtx target, enum machine_mode tmode, int modifier, case OFFSET_REF: /* Offset refs should not make it through to here. */ - abort (); + gcc_unreachable (); case EMPTY_CLASS_EXPR: /* We don't need to generate any code for an empty class. */ diff --git a/gcc/cp/friend.c b/gcc/cp/friend.c index c71b90f83ef..0ae9130b61a 100644 --- a/gcc/cp/friend.c +++ b/gcc/cp/friend.c @@ -408,7 +408,7 @@ tree do_friend (tree ctype, tree declarator, tree decl, tree attrlist, enum overload_flags flags, cp_cv_quals quals, - int funcdef_flag) + bool funcdef_flag) { /* Every decl that gets here is a friend of something. */ DECL_FRIEND_P (decl) = 1; diff --git a/gcc/cp/g++spec.c b/gcc/cp/g++spec.c index 36cf6c6827f..ec7cefcb3e6 100644 --- a/gcc/cp/g++spec.c +++ b/gcc/cp/g++spec.c @@ -252,7 +252,7 @@ lang_specific_driver (int *in_argc, const char *const **in_argv, /* Make sure to have room for the trailing NULL argument. */ num_args = argc + added + need_math + shared_libgcc + (library > 0) + 1; - arglist = xmalloc (num_args * sizeof (char *)); + arglist = XNEWVEC (const char *, num_args); i = 0; j = 0; diff --git a/gcc/cp/init.c b/gcc/cp/init.c index f43846719e5..3ec55109126 100644 --- a/gcc/cp/init.c +++ b/gcc/cp/init.c @@ -1019,11 +1019,11 @@ expand_member_init (tree name) if (!direct_binfo && !virtual_binfo) { if (CLASSTYPE_VBASECLASSES (current_class_type)) - error ("type %qD is not a direct or virtual base of %qT", - name, current_class_type); + error ("type %qT is not a direct or virtual base of %qT", + basetype, current_class_type); else - error ("type %qD is not a direct base of %qT", - name, current_class_type); + error ("type %qT is not a direct base of %qT", + basetype, current_class_type); return NULL_TREE; } @@ -1271,11 +1271,10 @@ expand_aggr_init_1 (tree binfo, tree true_exp, tree exp, tree init, int flags) as TARGET_EXPRs. */ if (init && TREE_CODE (exp) == VAR_DECL - && TREE_CODE (init) == CONSTRUCTOR - && TREE_HAS_CONSTRUCTOR (init)) + && COMPOUND_LITERAL_P (init)) { /* If store_init_value returns NULL_TREE, the INIT has been - record in the DECL_INITIAL for EXP. That means there's + recorded as the DECL_INITIAL for EXP. That means there's nothing more we have to do. */ init = store_init_value (exp, init); if (init) @@ -1332,112 +1331,40 @@ get_type_value (tree name) @@ This function should be rewritten and placed in search.c. */ tree -build_offset_ref (tree type, tree name, bool address_p) +build_offset_ref (tree type, tree member, bool address_p) { tree decl; - tree member; tree basebinfo = NULL_TREE; - tree orig_name = name; /* class templates can come in as TEMPLATE_DECLs here. */ - if (TREE_CODE (name) == TEMPLATE_DECL) - return name; + if (TREE_CODE (member) == TEMPLATE_DECL) + return member; - if (dependent_type_p (type) || type_dependent_expression_p (name)) - return build_qualified_name (NULL_TREE, type, name, + if (dependent_type_p (type) || type_dependent_expression_p (member)) + return build_qualified_name (NULL_TREE, type, member, /*template_p=*/false); - if (TREE_CODE (name) == TEMPLATE_ID_EXPR) - { - /* If the NAME is a TEMPLATE_ID_EXPR, we are looking at - something like `a.template f' or the like. For the most - part, we treat this just like a.f. We do remember, however, - the template-id that was used. */ - name = TREE_OPERAND (orig_name, 0); - - if (DECL_P (name)) - name = DECL_NAME (name); - else - { - if (TREE_CODE (name) == COMPONENT_REF) - name = TREE_OPERAND (name, 1); - if (TREE_CODE (name) == OVERLOAD) - name = DECL_NAME (OVL_CURRENT (name)); - } - - gcc_assert (TREE_CODE (name) == IDENTIFIER_NODE); - } - - if (type == NULL_TREE) - return error_mark_node; - - /* Handle namespace names fully here. */ - if (TREE_CODE (type) == NAMESPACE_DECL) - { - tree t = lookup_namespace_name (type, name); - if (t == error_mark_node) - return t; - if (TREE_CODE (orig_name) == TEMPLATE_ID_EXPR) - /* Reconstruct the TEMPLATE_ID_EXPR. */ - t = build2 (TEMPLATE_ID_EXPR, TREE_TYPE (t), - t, TREE_OPERAND (orig_name, 1)); - if (! type_unknown_p (t)) - { - mark_used (t); - t = convert_from_reference (t); - } - return t; - } - + gcc_assert (TYPE_P (type)); if (! is_aggr_type (type, 1)) return error_mark_node; - if (TREE_CODE (name) == BIT_NOT_EXPR) - { - if (! check_dtor_name (type, name)) - error ("qualified type %qT does not match destructor name %<~%T%>", - type, TREE_OPERAND (name, 0)); - name = dtor_identifier; - } + gcc_assert (DECL_P (member) || BASELINK_P (member)); + /* Callers should call mark_used before this point. */ + gcc_assert (!DECL_P (member) || TREE_USED (member)); if (!COMPLETE_TYPE_P (complete_type (type)) && !TYPE_BEING_DEFINED (type)) { - error ("incomplete type %qT does not have member %qD", type, name); - return error_mark_node; - } - - /* Set up BASEBINFO for member lookup. */ - decl = maybe_dummy_object (type, &basebinfo); - - if (BASELINK_P (name) || DECL_P (name)) - member = name; - else - { - member = lookup_member (basebinfo, name, 1, 0); - - if (member == error_mark_node) - return error_mark_node; - } - - if (!member) - { - error ("%qD is not a member of type %qT", name, type); + error ("incomplete type %qT does not have member %qD", type, member); return error_mark_node; } + /* Entities other than non-static members need no further + processing. */ if (TREE_CODE (member) == TYPE_DECL) - { - TREE_USED (member) = 1; - return member; - } - /* static class members and class-specific enum - values can be returned without further ado. */ + return member; if (TREE_CODE (member) == VAR_DECL || TREE_CODE (member) == CONST_DECL) - { - mark_used (member); - return convert_from_reference (member); - } + return convert_from_reference (member); if (TREE_CODE (member) == FIELD_DECL && DECL_C_BIT_FIELD (member)) { @@ -1445,6 +1372,9 @@ build_offset_ref (tree type, tree name, bool address_p) return error_mark_node; } + /* Set up BASEBINFO for member lookup. */ + decl = maybe_dummy_object (type, &basebinfo); + /* A lot of this logic is now handled in lookup_member. */ if (BASELINK_P (member)) { @@ -1452,29 +1382,6 @@ build_offset_ref (tree type, tree name, bool address_p) tree fnfields = member; tree t = BASELINK_FUNCTIONS (fnfields); - if (TREE_CODE (orig_name) == TEMPLATE_ID_EXPR) - { - /* The FNFIELDS are going to contain functions that aren't - necessarily templates, and templates that don't - necessarily match the explicit template parameters. We - save all the functions, and the explicit parameters, and - then figure out exactly what to instantiate with what - arguments in instantiate_type. */ - - if (TREE_CODE (t) != OVERLOAD) - /* The code in instantiate_type which will process this - expects to encounter OVERLOADs, not raw functions. */ - t = ovl_cons (t, NULL_TREE); - - t = build2 (TEMPLATE_ID_EXPR, TREE_TYPE (t), t, - TREE_OPERAND (orig_name, 1)); - t = build2 (OFFSET_REF, unknown_type_node, decl, t); - - PTRMEM_OK_P (t) = 1; - - return t; - } - if (TREE_CODE (t) != TEMPLATE_ID_EXPR && !really_overloaded_fn (t)) { /* Get rid of a potential OVERLOAD around it. */ @@ -1494,7 +1401,6 @@ build_offset_ref (tree type, tree name, bool address_p) else perform_or_defer_access_check (basebinfo, t); - mark_used (t); if (DECL_STATIC_FUNCTION_P (t)) return t; member = t; @@ -1597,7 +1503,7 @@ constant_value_1 (tree decl, bool integral_p) mark_used (decl); init = DECL_INITIAL (decl); } - if (!(init || init == error_mark_node) + if (!init || init == error_mark_node || !TREE_TYPE (init) || (integral_p ? !INTEGRAL_OR_ENUMERATION_TYPE_P (TREE_TYPE (init)) @@ -1610,7 +1516,7 @@ constant_value_1 (tree decl, bool integral_p) || TREE_CODE (init) == CONSTRUCTOR || TREE_CODE (init) == STRING_CST))) break; - decl = init; + decl = unshare_expr (init); } return decl; } diff --git a/gcc/cp/lex.c b/gcc/cp/lex.c index ce56265da39..a8004326564 100644 --- a/gcc/cp/lex.c +++ b/gcc/cp/lex.c @@ -460,11 +460,11 @@ parse_strconst_pragma (const char* name, int opt) tree result, x; enum cpp_ttype t; - t = c_lex (&x); + t = pragma_lex (&x); if (t == CPP_STRING) { result = x; - if (c_lex (&x) != CPP_EOF) + if (pragma_lex (&x) != CPP_EOF) warning (0, "junk at end of #pragma %s", name); return result; } @@ -571,7 +571,7 @@ handle_pragma_implementation (cpp_reader* dfile ATTRIBUTE_UNUSED ) } if (ifiles == 0) { - ifiles = xmalloc (sizeof (struct impl_files)); + ifiles = XNEW (struct impl_files); ifiles->filename = filename; ifiles->next = impl_file_chain; impl_file_chain = ifiles; @@ -580,10 +580,10 @@ handle_pragma_implementation (cpp_reader* dfile ATTRIBUTE_UNUSED ) /* Indicate that this file uses Java-personality exception handling. */ static void -handle_pragma_java_exceptions (cpp_reader* dfile ATTRIBUTE_UNUSED ) +handle_pragma_java_exceptions (cpp_reader* dfile ATTRIBUTE_UNUSED) { tree x; - if (c_lex (&x) != CPP_EOF) + if (pragma_lex (&x) != CPP_EOF) warning (0, "junk at end of #pragma GCC java_exceptions"); choose_personality_routine (lang_java); diff --git a/gcc/cp/mangle.c b/gcc/cp/mangle.c index b07012252bb..3b844b5addf 100644 --- a/gcc/cp/mangle.c +++ b/gcc/cp/mangle.c @@ -276,7 +276,7 @@ save_partially_mangled_name (void) { gcc_assert (!partially_mangled_name); partially_mangled_name_len = obstack_object_size (mangle_obstack); - partially_mangled_name = xmalloc (partially_mangled_name_len); + partially_mangled_name = XNEWVEC (char, partially_mangled_name_len); memcpy (partially_mangled_name, obstack_base (mangle_obstack), partially_mangled_name_len); obstack_free (mangle_obstack, obstack_finish (mangle_obstack)); @@ -1858,16 +1858,38 @@ write_function_type (const tree type) is mangled before the parameter types. If non-NULL, DECL is FUNCTION_DECL for the function whose type is being emitted. - ::= + */ + If DECL is a member of a Java type, then a literal 'J' + is output and the return type is mangled as if INCLUDE_RETURN_TYPE + were nonzero. + + ::= [J]+ */ static void write_bare_function_type (const tree type, const int include_return_type_p, const tree decl) { + int java_method_p; + MANGLE_TRACE_TREE ("bare-function-type", type); + /* Detect Java methods and emit special encoding. */ + if (decl != NULL + && DECL_FUNCTION_MEMBER_P (decl) + && TYPE_FOR_JAVA (DECL_CONTEXT (decl)) + && !DECL_CONSTRUCTOR_P (decl) + && !DECL_DESTRUCTOR_P (decl) + && !DECL_CONV_FN_P (decl)) + { + java_method_p = 1; + write_char ('J'); + } + else + { + java_method_p = 0; + } + /* Mangle the return type, if requested. */ - if (include_return_type_p) + if (include_return_type_p || java_method_p) write_type (TREE_TYPE (type)); /* Now mangle the types of the arguments. */ diff --git a/gcc/cp/method.c b/gcc/cp/method.c index f3c86d3178d..250c66d08b3 100644 --- a/gcc/cp/method.c +++ b/gcc/cp/method.c @@ -137,8 +137,6 @@ make_thunk (tree function, bool this_adjusting, TREE_READONLY (thunk) = TREE_READONLY (function); TREE_THIS_VOLATILE (thunk) = TREE_THIS_VOLATILE (function); TREE_PUBLIC (thunk) = TREE_PUBLIC (function); - if (flag_weak) - comdat_linkage (thunk); SET_DECL_THUNK_P (thunk, this_adjusting); THUNK_TARGET (thunk) = function; THUNK_FIXED_OFFSET (thunk) = d; @@ -381,8 +379,8 @@ use_thunk (tree thunk_fndecl, bool emit_p) DECL_VISIBILITY (thunk_fndecl) = DECL_VISIBILITY (function); DECL_VISIBILITY_SPECIFIED (thunk_fndecl) = DECL_VISIBILITY_SPECIFIED (function); - if (flag_weak && TREE_PUBLIC (thunk_fndecl)) - comdat_linkage (thunk_fndecl); + if (DECL_ONE_ONLY (function)) + make_decl_one_only (thunk_fndecl); if (flag_syntax_only) { diff --git a/gcc/cp/name-lookup.c b/gcc/cp/name-lookup.c index 49830c61979..2d204a76c84 100644 --- a/gcc/cp/name-lookup.c +++ b/gcc/cp/name-lookup.c @@ -2669,7 +2669,13 @@ push_class_level_binding (tree name, tree x) INHERITED_VALUE_BINDING_P (binding) = 0; } else - old_decl = bval; + { + old_decl = bval; + /* Any inherited type declaration is hidden by the type + declaration in the derived class. */ + if (TREE_CODE (x) == TYPE_DECL && DECL_ARTIFICIAL (x)) + binding->type = NULL_TREE; + } } else if (TREE_CODE (x) == OVERLOAD && is_overloaded_fn (bval)) old_decl = bval; @@ -2838,7 +2844,7 @@ set_namespace_binding (tree name, tree scope, tree val) void set_decl_namespace (tree decl, tree scope, bool friendp) { - tree old; + tree old, fn; /* Get rid of namespace aliases. */ scope = ORIGINAL_NAMESPACE (scope); @@ -2859,13 +2865,10 @@ set_decl_namespace (tree decl, tree scope, bool friendp) } /* See whether this has been declared in the namespace. */ - old = namespace_binding (DECL_NAME (decl), scope); + old = lookup_qualified_name (scope, DECL_NAME (decl), false, true); if (!old) /* No old declaration at all. */ goto complain; - /* A template can be explicitly specialized in any namespace. */ - if (processing_explicit_instantiation) - return; if (!is_overloaded_fn (decl)) /* Don't compare non-function decls with decls_match here, since it can't check for the correct constness at this @@ -2874,6 +2877,12 @@ set_decl_namespace (tree decl, tree scope, bool friendp) /* Since decl is a function, old should contain a function decl. */ if (!is_overloaded_fn (old)) goto complain; + fn = OVL_CURRENT (old); + if (!is_associated_namespace (scope, CP_DECL_CONTEXT (fn))) + goto complain; + /* A template can be explicitly specialized in any namespace. */ + if (processing_explicit_instantiation) + return; if (processing_template_decl || processing_specialization) /* We have not yet called push_template_decl to turn a FUNCTION_DECL into a TEMPLATE_DECL, so the declarations won't @@ -3971,12 +3980,9 @@ lookup_name_real (tree name, int prefer_type, int nonclass, bool block_p, if (!val) val = unqualified_namespace_lookup (name, flags); - if (val) - { - /* If we have a single function from a using decl, pull it out. */ - if (TREE_CODE (val) == OVERLOAD && ! really_overloaded_fn (val)) - val = OVL_FUNCTION (val); - } + /* If we have a single function from a using decl, pull it out. */ + if (val && TREE_CODE (val) == OVERLOAD && !really_overloaded_fn (val)) + val = OVL_FUNCTION (val); POP_TIMEVAR_AND_RETURN (TV_NAME_LOOKUP, val); } diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index 9c85f12b5b2..2c2a7d74b03 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -55,6 +55,8 @@ typedef struct cp_token GTY (()) ENUM_BITFIELD (rid) keyword : 8; /* Token flags. */ unsigned char flags; + /* Identifier for the pragma. */ + ENUM_BITFIELD (pragma_kind) pragma_kind : 6; /* True if this token is from a system header. */ BOOL_BITFIELD in_system_header : 1; /* True if this token is from a context where it is implicitly extern "C" */ @@ -76,7 +78,7 @@ DEF_VEC_ALLOC_P (cp_token_position,heap); static const cp_token eof_token = { - CPP_EOF, RID_MAX, 0, 0, 0, false, NULL_TREE, + CPP_EOF, RID_MAX, 0, PRAGMA_NONE, 0, 0, false, NULL_TREE, #if USE_MAPPED_LOCATION 0 #else @@ -112,11 +114,15 @@ typedef struct cp_lexer GTY (()) tokens. */ VEC(cp_token_position,heap) *GTY ((skip)) saved_tokens; + /* The next lexer in a linked list of lexers. */ + struct cp_lexer *next; + /* True if we should output debugging information. */ bool debugging_p; - /* The next lexer in a linked list of lexers. */ - struct cp_lexer *next; + /* True if we're in the context of parsing a pragma, and should not + increment past the end-of-line marker. */ + bool in_pragma; } cp_lexer; /* cp_token_cache is a range of tokens. There is no need to represent @@ -166,8 +172,6 @@ static void cp_lexer_purge_token (cp_lexer *); static void cp_lexer_purge_tokens_after (cp_lexer *, cp_token_position); -static void cp_lexer_handle_pragma - (cp_lexer *); static void cp_lexer_save_tokens (cp_lexer *); static void cp_lexer_commit_tokens @@ -196,6 +200,9 @@ static void cp_lexer_stop_debugging static cp_token_cache *cp_token_cache_new (cp_token *, cp_token *); +static void cp_parser_initial_pragma + (cp_token *); + /* Manifest constants. */ #define CP_LEXER_BUFFER_SIZE 10000 #define CP_SAVED_TOKEN_STACK 5 @@ -244,17 +251,12 @@ cp_lexer_new_main (void) size_t space; cp_token *buffer; - /* It's possible that lexing the first token will load a PCH file, - which is a GC collection point. So we have to grab the first - token before allocating any memory. Pragmas must not be deferred - as -fpch-preprocess can generate a pragma to load the PCH file in - the preprocessed output used by -save-temps. */ - cp_lexer_get_preprocessor_token (NULL, &first_token); + /* It's possible that parsing the first pragma will load a PCH file, + which is a GC collection point. So we have to do that before + allocating any memory. */ + cp_parser_initial_pragma (&first_token); - /* Tell cpplib we want CPP_PRAGMA tokens. */ - cpp_get_options (parse_in)->defer_pragmas = true; - - /* Tell c_lex not to merge string constants. */ + /* Tell c_lex_with_flags not to merge string constants. */ c_lex_return_raw_strings = true; c_common_no_more_pch (); @@ -271,7 +273,7 @@ cp_lexer_new_main (void) /* Create the buffer. */ alloc = CP_LEXER_BUFFER_SIZE; - buffer = ggc_alloc (alloc * sizeof (cp_token)); + buffer = GGC_NEWVEC (cp_token, alloc); /* Put the first token in the buffer. */ space = alloc; @@ -286,7 +288,7 @@ cp_lexer_new_main (void) { space = alloc; alloc *= 2; - buffer = ggc_realloc (buffer, alloc * sizeof (cp_token)); + buffer = GGC_RESIZEVEC (cp_token, buffer, alloc); pos = buffer + space; } cp_lexer_get_preprocessor_token (lexer, pos); @@ -296,11 +298,6 @@ cp_lexer_new_main (void) lexer->last_token = pos; lexer->next_token = lexer->buffer_length ? buffer : (cp_token *)&eof_token; - /* Pragma processing (via cpp_handle_deferred_pragma) may result in - direct calls to c_lex. Those callers all expect c_lex to do - string constant concatenation. */ - c_lex_return_raw_strings = false; - /* Subsequent preprocessor diagnostics should use compiler diagnostic functions to get the compiler source location. */ cpp_get_options (parse_in)->client_diagnostic = true; @@ -395,6 +392,8 @@ cp_lexer_get_preprocessor_token (cp_lexer *lexer ATTRIBUTE_UNUSED , /* Get a new token from the preprocessor. */ token->type = c_lex_with_flags (&token->value, &token->location, &token->flags); + token->keyword = RID_MAX; + token->pragma_kind = PRAGMA_NONE; token->in_system_header = in_system_header; /* On some systems, some header files are surrounded by an @@ -442,8 +441,12 @@ cp_lexer_get_preprocessor_token (cp_lexer *lexer ATTRIBUTE_UNUSED , default: token->keyword = C_RID_CODE (token->value); } } - else - token->keyword = RID_MAX; + else if (token->type == CPP_PRAGMA) + { + /* We smuggled the cpp_token->u.pragma value in an INTEGER_CST. */ + token->pragma_kind = TREE_INT_CST_LOW (token->value); + token->value = NULL; + } } /* Update the globals input_location and in_system_header from TOKEN. */ @@ -553,6 +556,7 @@ cp_lexer_consume_token (cp_lexer* lexer) cp_token *token = lexer->next_token; gcc_assert (token != &eof_token); + gcc_assert (!lexer->in_pragma || token->type != CPP_PRAGMA_EOL); do { @@ -630,25 +634,6 @@ cp_lexer_purge_tokens_after (cp_lexer *lexer, cp_token *tok) } } -/* Consume and handle a pragma token. */ -static void -cp_lexer_handle_pragma (cp_lexer *lexer) -{ - cpp_string s; - cp_token *token = cp_lexer_consume_token (lexer); - gcc_assert (token->type == CPP_PRAGMA); - gcc_assert (token->value); - - s.len = TREE_STRING_LENGTH (token->value); - s.text = (const unsigned char *) TREE_STRING_POINTER (token->value); - - cpp_handle_deferred_pragma (parse_in, &s); - - /* Clearing token->value here means that we will get an ICE if we - try to process this #pragma again (which should be impossible). */ - token->value = NULL; -} - /* Begin saving tokens. All tokens consumed after this point will be preserved. */ @@ -731,7 +716,6 @@ cp_lexer_print_token (FILE * stream, cp_token *token) case CPP_STRING: case CPP_WSTRING: - case CPP_PRAGMA: fprintf (stream, " \"%s\"", TREE_STRING_POINTER (token->value)); break; @@ -833,12 +817,15 @@ make_declarator (cp_declarator_kind kind) return declarator; } -/* Make a declarator for a generalized identifier. If non-NULL, the - identifier is QUALIFYING_SCOPE::UNQUALIFIED_NAME; otherwise, it is - just UNQUALIFIED_NAME. */ +/* Make a declarator for a generalized identifier. If + QUALIFYING_SCOPE is non-NULL, the identifier is + QUALIFYING_SCOPE::UNQUALIFIED_NAME; otherwise, it is just + UNQUALIFIED_NAME. SFK indicates the kind of special function this + is, if any. */ static cp_declarator * -make_id_declarator (tree qualifying_scope, tree unqualified_name) +make_id_declarator (tree qualifying_scope, tree unqualified_name, + special_function_kind sfk) { cp_declarator *declarator; @@ -855,10 +842,14 @@ make_id_declarator (tree qualifying_scope, tree unqualified_name) if (qualifying_scope && TYPE_P (qualifying_scope)) qualifying_scope = TYPE_MAIN_VARIANT (qualifying_scope); + gcc_assert (TREE_CODE (unqualified_name) == IDENTIFIER_NODE + || TREE_CODE (unqualified_name) == BIT_NOT_EXPR + || TREE_CODE (unqualified_name) == TEMPLATE_ID_EXPR); + declarator = make_declarator (cdk_id); declarator->u.id.qualifying_scope = qualifying_scope; declarator->u.id.unqualified_name = unqualified_name; - declarator->u.id.sfk = sfk_none; + declarator->u.id.sfk = sfk; return declarator; } @@ -1456,9 +1447,9 @@ static tree cp_parser_builtin_offsetof /* Statements [gram.stmt.stmt] */ static void cp_parser_statement - (cp_parser *, tree); + (cp_parser *, tree, bool); static tree cp_parser_labeled_statement - (cp_parser *, tree); + (cp_parser *, tree, bool); static tree cp_parser_expression_statement (cp_parser *, tree); static tree cp_parser_compound_statement @@ -1678,6 +1669,10 @@ static bool cp_parser_extension_opt static void cp_parser_label_declaration (cp_parser *); +enum pragma_context { pragma_external, pragma_stmt, pragma_compound }; +static bool cp_parser_pragma + (cp_parser *, enum pragma_context); + /* Objective-C++ Productions */ static tree cp_parser_objc_message_receiver @@ -1821,6 +1816,8 @@ static void cp_parser_skip_to_closing_brace (cp_parser *); static void cp_parser_skip_until_found (cp_parser *, enum cpp_ttype, const char *); +static void cp_parser_skip_to_pragma_eol + (cp_parser*, cp_token *); static bool cp_parser_error_occurred (cp_parser *); static bool cp_parser_allow_gnu_extensions_p @@ -1881,12 +1878,14 @@ cp_parser_error (cp_parser* parser, const char* message) /* This diagnostic makes more sense if it is tagged to the line of the token we just peeked at. */ cp_lexer_set_source_position_from_token (token); + if (token->type == CPP_PRAGMA) { error ("%<#pragma%> is not allowed here"); - cp_lexer_purge_token (parser->lexer); + cp_parser_skip_to_pragma_eol (parser, token); return; } + c_parse_error (message, /* Because c_parser_error does not understand CPP_KEYWORD, keywords are treated like @@ -2180,7 +2179,6 @@ cp_parser_skip_to_closing_parenthesis (cp_parser *parser, { unsigned paren_depth = 0; unsigned brace_depth = 0; - int result; if (recovering && !or_comma && cp_parser_uncommitted_to_tentative_parse_p (parser)) @@ -2188,62 +2186,55 @@ cp_parser_skip_to_closing_parenthesis (cp_parser *parser, while (true) { - cp_token *token; + cp_token * token = cp_lexer_peek_token (parser->lexer); - /* If we've run out of tokens, then there is no closing `)'. */ - if (cp_lexer_next_token_is (parser->lexer, CPP_EOF)) + switch (token->type) { - result = 0; - break; - } + case CPP_EOF: + case CPP_PRAGMA_EOL: + /* If we've run out of tokens, then there is no closing `)'. */ + return 0; - token = cp_lexer_peek_token (parser->lexer); + case CPP_SEMICOLON: + /* This matches the processing in skip_to_end_of_statement. */ + if (!brace_depth) + return 0; + break; - /* This matches the processing in skip_to_end_of_statement. */ - if (token->type == CPP_SEMICOLON && !brace_depth) - { - result = 0; + case CPP_OPEN_BRACE: + ++brace_depth; break; - } - if (token->type == CPP_OPEN_BRACE) - ++brace_depth; - if (token->type == CPP_CLOSE_BRACE) - { + case CPP_CLOSE_BRACE: if (!brace_depth--) - { - result = 0; - break; - } - } - if (recovering && or_comma && token->type == CPP_COMMA - && !brace_depth && !paren_depth) - { - result = -1; + return 0; break; - } - if (!brace_depth) - { - /* If it is an `(', we have entered another level of nesting. */ - if (token->type == CPP_OPEN_PAREN) + case CPP_COMMA: + if (recovering && or_comma && !brace_depth && !paren_depth) + return -1; + break; + + case CPP_OPEN_PAREN: + if (!brace_depth) ++paren_depth; - /* If it is a `)', then we might be done. */ - else if (token->type == CPP_CLOSE_PAREN && !paren_depth--) + break; + + case CPP_CLOSE_PAREN: + if (!brace_depth && !paren_depth--) { if (consume_paren) cp_lexer_consume_token (parser->lexer); - { - result = 1; - break; - } + return 1; } + break; + + default: + break; } /* Consume the token. */ cp_lexer_consume_token (parser->lexer); } - - return result; } /* Consume tokens until we reach the end of the current statement. @@ -2257,31 +2248,34 @@ cp_parser_skip_to_end_of_statement (cp_parser* parser) while (true) { - cp_token *token; + cp_token *token = cp_lexer_peek_token (parser->lexer); - /* Peek at the next token. */ - token = cp_lexer_peek_token (parser->lexer); - /* If we've run out of tokens, stop. */ - if (token->type == CPP_EOF) - break; - /* If the next token is a `;', we have reached the end of the - statement. */ - if (token->type == CPP_SEMICOLON && !nesting_depth) - break; - /* If the next token is a non-nested `}', then we have reached - the end of the current block. */ - if (token->type == CPP_CLOSE_BRACE) + switch (token->type) { - /* If this is a non-nested `}', stop before consuming it. + case CPP_EOF: + case CPP_PRAGMA_EOL: + /* If we've run out of tokens, stop. */ + return; + + case CPP_SEMICOLON: + /* If the next token is a `;', we have reached the end of the + statement. */ + if (!nesting_depth) + return; + break; + + case CPP_CLOSE_BRACE: + /* If this is a non-nested '}', stop before consuming it. That way, when confronted with something like: { 3 + } - we stop before consuming the closing `}', even though we + we stop before consuming the closing '}', even though we have not yet reached a `;'. */ if (nesting_depth == 0) - break; - /* If it is the closing `}' for a block that we have + return; + + /* If it is the closing '}' for a block that we have scanned, stop -- but only after consuming the token. That way given: @@ -2294,13 +2288,17 @@ cp_parser_skip_to_end_of_statement (cp_parser* parser) if (--nesting_depth == 0) { cp_lexer_consume_token (parser->lexer); - break; + return; } + + case CPP_OPEN_BRACE: + ++nesting_depth; + break; + + default: + break; } - /* If it the next token is a `{', then we are entering a new - block. Consume the entire block. */ - else if (token->type == CPP_OPEN_BRACE) - ++nesting_depth; + /* Consume the token. */ cp_lexer_consume_token (parser->lexer); } @@ -2337,15 +2335,12 @@ cp_parser_skip_to_end_of_block_or_statement (cp_parser* parser) { cp_token *token = cp_lexer_peek_token (parser->lexer); - if (token->type == CPP_EOF) - break; - switch (token->type) { case CPP_EOF: + case CPP_PRAGMA_EOL: /* If we've run out of tokens, stop. */ - nesting_depth = -1; - continue; + return; case CPP_SEMICOLON: /* Stop if this is an unnested ';'. */ @@ -2372,7 +2367,6 @@ cp_parser_skip_to_end_of_block_or_statement (cp_parser* parser) /* Consume the token. */ cp_lexer_consume_token (parser->lexer); - } } @@ -2386,26 +2380,56 @@ cp_parser_skip_to_closing_brace (cp_parser *parser) while (true) { - cp_token *token; + cp_token *token = cp_lexer_peek_token (parser->lexer); + + switch (token->type) + { + case CPP_EOF: + case CPP_PRAGMA_EOL: + /* If we've run out of tokens, stop. */ + return; + + case CPP_CLOSE_BRACE: + /* If the next token is a non-nested `}', then we have reached + the end of the current block. */ + if (nesting_depth-- == 0) + return; + break; + + case CPP_OPEN_BRACE: + /* If it the next token is a `{', then we are entering a new + block. Consume the entire block. */ + ++nesting_depth; + break; + + default: + break; + } - /* Peek at the next token. */ - token = cp_lexer_peek_token (parser->lexer); - /* If we've run out of tokens, stop. */ - if (token->type == CPP_EOF) - break; - /* If the next token is a non-nested `}', then we have reached - the end of the current block. */ - if (token->type == CPP_CLOSE_BRACE && nesting_depth-- == 0) - break; - /* If it the next token is a `{', then we are entering a new - block. Consume the entire block. */ - else if (token->type == CPP_OPEN_BRACE) - ++nesting_depth; /* Consume the token. */ cp_lexer_consume_token (parser->lexer); } } +/* Consume tokens until we reach the end of the pragma. The PRAGMA_TOK + parameter is the PRAGMA token, allowing us to purge the entire pragma + sequence. */ + +static void +cp_parser_skip_to_pragma_eol (cp_parser* parser, cp_token *pragma_tok) +{ + cp_token *token; + + parser->lexer->in_pragma = false; + + do + token = cp_lexer_consume_token (parser->lexer); + while (token->type != CPP_PRAGMA_EOL && token->type != CPP_EOF); + + /* Ensure that the pragma is not parsed again. */ + cp_lexer_purge_tokens_after (parser->lexer, pragma_tok); +} + /* This is a simple wrapper around make_typename_type. When the id is an unresolved identifier node, we can provide a superior diagnostic using cp_parser_diagnose_invalid_type_name. */ @@ -2417,7 +2441,7 @@ cp_parser_make_typename_type (cp_parser *parser, tree scope, tree id) if (TREE_CODE (id) == IDENTIFIER_NODE) { result = make_typename_type (scope, id, typename_type, - /*complain=*/0); + /*complain=*/tf_none); if (result == error_mark_node) cp_parser_diagnose_invalid_type_name (parser, scope, id); return result; @@ -2723,6 +2747,7 @@ cp_parser_translation_unit (cp_parser* parser) primary-expression: ( compound-statement ) __builtin_va_arg ( assignment-expression , type-id ) + __builtin_offsetof ( type-id , offsetof-expression ) Objective-C++ Extension: @@ -2735,7 +2760,7 @@ cp_parser_translation_unit (cp_parser* parser) ADDRESS_P is true iff this expression was immediately preceded by "&" and therefore might denote a pointer-to-member. CAST_P is true iff this expression is the target of a cast. TEMPLATE_ARG_P is - true iff this expression is a tempalte argument. + true iff this expression is a template argument. Returns a representation of the expression. Upon return, *IDK indicates what kind of id-expression (if any) was present. */ @@ -3493,7 +3518,6 @@ cp_parser_nested_name_specifier_opt (cp_parser *parser, bool is_declaration) { bool success = false; - tree access_check = NULL_TREE; cp_token_position start = 0; cp_token *token; @@ -3513,9 +3537,10 @@ cp_parser_nested_name_specifier_opt (cp_parser *parser, /* Remember where the nested-name-specifier starts. */ if (cp_parser_uncommitted_to_tentative_parse_p (parser)) - start = cp_lexer_token_position (parser->lexer, false); - - push_deferring_access_checks (dk_deferred); + { + start = cp_lexer_token_position (parser->lexer, false); + push_deferring_access_checks (dk_deferred); + } while (true) { @@ -3694,10 +3719,6 @@ cp_parser_nested_name_specifier_opt (cp_parser *parser, parser->scope = new_scope; } - /* Retrieve any deferred checks. Do not pop this access checks yet - so the memory will not be reclaimed during token replacing below. */ - access_check = get_deferred_access_checks (); - /* If parsing tentatively, replace the sequence of tokens that makes up the nested-name-specifier with a CPP_NESTED_NAME_SPECIFIER token. That way, should we re-parse the token stream, we will @@ -3705,19 +3726,27 @@ cp_parser_nested_name_specifier_opt (cp_parser *parser, we issue duplicate error messages. */ if (success && start) { - cp_token *token = cp_lexer_token_at (parser->lexer, start); + cp_token *token; + tree access_checks; + token = cp_lexer_token_at (parser->lexer, start); /* Reset the contents of the START token. */ token->type = CPP_NESTED_NAME_SPECIFIER; - token->value = build_tree_list (access_check, parser->scope); + /* Retrieve any deferred checks. Do not pop this access checks yet + so the memory will not be reclaimed during token replacing below. */ + access_checks = get_deferred_access_checks (); + token->value = build_tree_list (copy_list (access_checks), + parser->scope); TREE_TYPE (token->value) = parser->qualifying_scope; token->keyword = RID_MAX; /* Purge all subsequent tokens. */ cp_lexer_purge_tokens_after (parser->lexer, start); } + + if (start) + pop_to_parent_deferring_access_checks (); - pop_deferring_access_checks (); return success ? parser->scope : NULL_TREE; } @@ -6035,15 +6064,20 @@ cp_parser_builtin_offsetof (cp_parser *parser) iteration-statement jump-statement declaration-statement - try-block */ + try-block + + IN_COMPOUND is true when the statement is nested inside a + cp_parser_compound_statement; this matters for certain pragmas. */ static void -cp_parser_statement (cp_parser* parser, tree in_statement_expr) +cp_parser_statement (cp_parser* parser, tree in_statement_expr, + bool in_compound) { tree statement; cp_token *token; location_t statement_location; + restart: /* There is no statement yet. */ statement = NULL_TREE; /* Peek at the next token. */ @@ -6060,8 +6094,8 @@ cp_parser_statement (cp_parser* parser, tree in_statement_expr) { case RID_CASE: case RID_DEFAULT: - statement = cp_parser_labeled_statement (parser, - in_statement_expr); + statement = cp_parser_labeled_statement (parser, in_statement_expr, + in_compound); break; case RID_IF: @@ -6107,7 +6141,8 @@ cp_parser_statement (cp_parser* parser, tree in_statement_expr) labeled-statement. */ token = cp_lexer_peek_nth_token (parser->lexer, 2); if (token->type == CPP_COLON) - statement = cp_parser_labeled_statement (parser, in_statement_expr); + statement = cp_parser_labeled_statement (parser, in_statement_expr, + in_compound); } /* Anything that starts with a `{' must be a compound-statement. */ else if (token->type == CPP_OPEN_BRACE) @@ -6116,7 +6151,15 @@ cp_parser_statement (cp_parser* parser, tree in_statement_expr) a statement all its own. */ else if (token->type == CPP_PRAGMA) { - cp_lexer_handle_pragma (parser->lexer); + /* Only certain OpenMP pragmas are attached to statements, and thus + are considered statements themselves. All others are not. In + the context of a compound, accept the pragma as a "statement" and + return so that we can check for a close brace. Otherwise we + require a real statement and must go back and read one. */ + if (in_compound) + cp_parser_pragma (parser, pragma_compound); + else if (!cp_parser_pragma (parser, pragma_stmt)) + goto restart; return; } else if (token->type == CPP_EOF) @@ -6162,10 +6205,14 @@ cp_parser_statement (cp_parser* parser, tree in_statement_expr) case constant-expression ... constant-expression : statement Returns the new CASE_LABEL_EXPR, for a `case' or `default' label. - For an ordinary label, returns a LABEL_EXPR. */ + For an ordinary label, returns a LABEL_EXPR. + + IN_COMPOUND is as for cp_parser_statement: true when we're nested + inside a compound. */ static tree -cp_parser_labeled_statement (cp_parser* parser, tree in_statement_expr) +cp_parser_labeled_statement (cp_parser* parser, tree in_statement_expr, + bool in_compound) { cp_token *token; tree statement = error_mark_node; @@ -6208,20 +6255,21 @@ cp_parser_labeled_statement (cp_parser* parser, tree in_statement_expr) else expr_hi = NULL_TREE; - if (!parser->in_switch_statement_p) - error ("case label %qE not within a switch statement", expr); - else + if (parser->in_switch_statement_p) statement = finish_case_label (expr, expr_hi); + else + error ("case label %qE not within a switch statement", expr); } break; case RID_DEFAULT: /* Consume the `default' token. */ cp_lexer_consume_token (parser->lexer); - if (!parser->in_switch_statement_p) - error ("case label not within a switch statement"); - else + + if (parser->in_switch_statement_p) statement = finish_case_label (NULL_TREE, NULL_TREE); + else + error ("case label not within a switch statement"); break; default: @@ -6233,7 +6281,7 @@ cp_parser_labeled_statement (cp_parser* parser, tree in_statement_expr) /* Require the `:' token. */ cp_parser_require (parser, CPP_COLON, "`:'"); /* Parse the labeled statement. */ - cp_parser_statement (parser, in_statement_expr); + cp_parser_statement (parser, in_statement_expr, in_compound); /* Return the label, in the case of a `case' or `default' label. */ return statement; @@ -6315,13 +6363,16 @@ cp_parser_statement_seq_opt (cp_parser* parser, tree in_statement_expr) /* Scan statements until there aren't any more. */ while (true) { + cp_token *token = cp_lexer_peek_token (parser->lexer); + /* If we're looking at a `}', then we've run out of statements. */ - if (cp_lexer_next_token_is (parser->lexer, CPP_CLOSE_BRACE) - || cp_lexer_next_token_is (parser->lexer, CPP_EOF)) + if (token->type == CPP_CLOSE_BRACE + || token->type == CPP_EOF + || token->type == CPP_PRAGMA_EOL) break; /* Parse the statement. */ - cp_parser_statement (parser, in_statement_expr); + cp_parser_statement (parser, in_statement_expr, true); } } @@ -6818,7 +6869,7 @@ cp_parser_implicitly_scoped_statement (cp_parser* parser) /* Create a compound-statement. */ statement = begin_compound_stmt (0); /* Parse the dependent-statement. */ - cp_parser_statement (parser, false); + cp_parser_statement (parser, NULL_TREE, false); /* Finish the dummy compound-statement. */ finish_compound_stmt (statement); } @@ -6840,13 +6891,13 @@ cp_parser_already_scoped_statement (cp_parser* parser) { /* If the token is a `{', then we must take special action. */ if (cp_lexer_next_token_is_not (parser->lexer, CPP_OPEN_BRACE)) - cp_parser_statement (parser, false); + cp_parser_statement (parser, NULL_TREE, false); else { /* Avoid calling cp_parser_compound_statement, so that we don't create a new scope. Do everything else by hand. */ cp_parser_require (parser, CPP_OPEN_BRACE, "`{'"); - cp_parser_statement_seq_opt (parser, false); + cp_parser_statement_seq_opt (parser, NULL_TREE); cp_parser_require (parser, CPP_CLOSE_BRACE, "`}'"); } } @@ -6869,7 +6920,8 @@ cp_parser_declaration_seq_opt (cp_parser* parser) token = cp_lexer_peek_token (parser->lexer); if (token->type == CPP_CLOSE_BRACE - || token->type == CPP_EOF) + || token->type == CPP_EOF + || token->type == CPP_PRAGMA_EOL) break; if (token->type == CPP_SEMICOLON) @@ -6901,7 +6953,7 @@ cp_parser_declaration_seq_opt (cp_parser* parser) A nested declaration cannot, so this is done here and not in cp_parser_declaration. (A #pragma at block scope is handled in cp_parser_statement.) */ - cp_lexer_handle_pragma (parser->lexer); + cp_parser_pragma (parser, pragma_external); continue; } @@ -6951,7 +7003,10 @@ cp_parser_declaration (cp_parser* parser) if (token1.type != CPP_EOF) token2 = *cp_lexer_peek_nth_token (parser->lexer, 2); else - token2.type = token2.keyword = RID_MAX; + { + token2.type = CPP_EOF; + token2.keyword = RID_MAX; + } /* Get the high-water mark for the DECLARATOR_OBSTACK. */ p = obstack_alloc (&declarator_obstack, 0); @@ -7179,7 +7234,16 @@ cp_parser_simple_declaration (cp_parser* parser, bool function_definition_p; tree decl; - saw_declarator = true; + if (saw_declarator) + { + /* If we are processing next declarator, coma is expected */ + token = cp_lexer_peek_token (parser->lexer); + gcc_assert (token->type == CPP_COMMA); + cp_lexer_consume_token (parser->lexer); + } + else + saw_declarator = true; + /* Parse the init-declarator. */ decl = cp_parser_init_declarator (parser, &decl_specifiers, function_definition_allowed_p, @@ -7214,7 +7278,7 @@ cp_parser_simple_declaration (cp_parser* parser, token = cp_lexer_peek_token (parser->lexer); /* If it's a `,', there are more declarators to come. */ if (token->type == CPP_COMMA) - cp_lexer_consume_token (parser->lexer); + /* will be consumed next time around */; /* If it's a `;', we are done. */ else if (token->type == CPP_SEMICOLON) break; @@ -7826,7 +7890,7 @@ cp_parser_mem_initializer_list (cp_parser* parser) /* Parse the mem-initializer. */ mem_initializer = cp_parser_mem_initializer (parser); /* Add it to the list, unless it was erroneous. */ - if (mem_initializer) + if (mem_initializer != error_mark_node) { TREE_CHAIN (mem_initializer) = mem_initializer_list; mem_initializer_list = mem_initializer; @@ -7855,7 +7919,8 @@ cp_parser_mem_initializer_list (cp_parser* parser) Returns a TREE_LIST. The TREE_PURPOSE is the TYPE (for a base class) or FIELD_DECL (for a non-static data member) to initialize; - the TREE_VALUE is the expression-list. */ + the TREE_VALUE is the expression-list. An empty initialization + list is represented by void_list_node. */ static tree cp_parser_mem_initializer (cp_parser* parser) @@ -7880,12 +7945,14 @@ cp_parser_mem_initializer (cp_parser* parser) = cp_parser_parenthesized_expression_list (parser, false, /*cast_p=*/false, /*non_constant_p=*/NULL); + if (expression_list == error_mark_node) + return error_mark_node; if (!expression_list) expression_list = void_type_node; in_base_initializer = 0; - return member ? build_tree_list (member, expression_list) : NULL_TREE; + return member ? build_tree_list (member, expression_list) : error_mark_node; } /* Parse a mem-initializer-id. @@ -8295,6 +8362,7 @@ cp_parser_template_parameter_list (cp_parser* parser) { tree parameter_list = NULL_TREE; + begin_template_parm_list (); while (true) { tree parameter; @@ -8317,7 +8385,7 @@ cp_parser_template_parameter_list (cp_parser* parser) cp_lexer_consume_token (parser->lexer); } - return parameter_list; + return end_template_parm_list (parameter_list); } /* Parse a template-parameter. @@ -8465,10 +8533,7 @@ cp_parser_type_parameter (cp_parser* parser) /* Look for the `<'. */ cp_parser_require (parser, CPP_LESS, "`<'"); /* Parse the template-parameter-list. */ - begin_template_parm_list (); - parameter_list - = cp_parser_template_parameter_list (parser); - parameter_list = end_template_parm_list (parameter_list); + parameter_list = cp_parser_template_parameter_list (parser); /* Look for the `>'. */ cp_parser_require (parser, CPP_GREATER, "`>'"); /* Look for the `class' keyword. */ @@ -8964,11 +9029,11 @@ cp_parser_template_argument_list (cp_parser* parser) if (arg_ary == fixed_args) { - arg_ary = xmalloc (sizeof (tree) * alloced); + arg_ary = XNEWVEC (tree, alloced); memcpy (arg_ary, fixed_args, sizeof (tree) * n_args); } else - arg_ary = xrealloc (arg_ary, sizeof (tree) * alloced); + arg_ary = XRESIZEVEC (tree, arg_ary, alloced); } arg_ary[n_args++] = argument; } @@ -9277,7 +9342,8 @@ cp_parser_explicit_instantiation (cp_parser* parser) template instantiation. */ pop_deferring_access_checks (); if (type) - do_type_instantiation (type, extension_specifier, /*complain=*/1); + do_type_instantiation (type, extension_specifier, + /*complain=*/tf_error); } else { @@ -9987,7 +10053,7 @@ cp_parser_elaborated_type_specifier (cp_parser* parser, && tag_type == typename_type) type = make_typename_type (parser->scope, decl, typename_type, - /*complain=*/1); + /*complain=*/tf_error); else type = TREE_TYPE (decl); } @@ -10129,6 +10195,11 @@ cp_parser_elaborated_type_specifier (cp_parser* parser, (parser->num_template_parameter_lists && (cp_parser_next_token_starts_class_definition_p (parser) || cp_lexer_next_token_is (parser->lexer, CPP_SEMICOLON))); + /* An unqualified name was used to reference this type, so + there were no qualifying templates. */ + if (!cp_parser_check_template_parameters (parser, + /*num_templates=*/0)) + return error_mark_node; type = xref_tag (tag_type, identifier, ts, template_p); } } @@ -10503,7 +10574,7 @@ cp_parser_using_declaration (cp_parser* parser) /* The function we call to handle a using-declaration is different depending on what scope we are in. */ - if (identifier == error_mark_node) + if (qscope == error_mark_node || identifier == error_mark_node) ; else if (TREE_CODE (identifier) != IDENTIFIER_NODE && TREE_CODE (identifier) != BIT_NOT_EXPR) @@ -11378,6 +11449,7 @@ cp_parser_direct_declarator (cp_parser* parser, { tree qualifying_scope; tree unqualified_name; + special_function_kind sfk; /* Parse a declarator-id */ if (dcl_kind == CP_PARSER_DECLARATOR_EITHER) @@ -11435,9 +11507,7 @@ cp_parser_direct_declarator (cp_parser* parser, qualifying_scope = type; } - declarator = make_id_declarator (qualifying_scope, - unqualified_name); - declarator->id_loc = token->location; + sfk = sfk_none; if (unqualified_name) { tree class_type; @@ -11448,28 +11518,9 @@ cp_parser_direct_declarator (cp_parser* parser, else class_type = current_class_type; - if (class_type) + if (TREE_CODE (unqualified_name) == TYPE_DECL) { - if (TREE_CODE (unqualified_name) == BIT_NOT_EXPR) - declarator->u.id.sfk = sfk_destructor; - else if (IDENTIFIER_TYPENAME_P (unqualified_name)) - declarator->u.id.sfk = sfk_conversion; - else if (/* There's no way to declare a constructor - for an anonymous type, even if the type - got a name for linkage purposes. */ - !TYPE_WAS_ANONYMOUS (class_type) - && (constructor_name_p (unqualified_name, - class_type) - || (TREE_CODE (unqualified_name) == TYPE_DECL - && (same_type_p - (TREE_TYPE (unqualified_name), - class_type))))) - declarator->u.id.sfk = sfk_constructor; - - if (ctor_dtor_or_conv_p && declarator->u.id.sfk != sfk_none) - *ctor_dtor_or_conv_p = -1; - if (qualifying_scope - && TREE_CODE (unqualified_name) == TYPE_DECL + if (qualifying_scope && CLASSTYPE_USE_TEMPLATE (TREE_TYPE (unqualified_name))) { error ("invalid use of constructor as a template"); @@ -11478,9 +11529,50 @@ cp_parser_direct_declarator (cp_parser* parser, class_type, DECL_NAME (TYPE_TI_TEMPLATE (class_type)), class_type, class_type); + declarator = cp_error_declarator; + break; + } + else if (class_type + && same_type_p (TREE_TYPE (unqualified_name), + class_type)) + unqualified_name = constructor_name (class_type); + else + { + /* We do not attempt to print the declarator + here because we do not have enough + information about its original syntactic + form. */ + cp_parser_error (parser, "invalid declarator"); + declarator = cp_error_declarator; + break; + } + } + + if (class_type) + { + if (TREE_CODE (unqualified_name) == BIT_NOT_EXPR) + sfk = sfk_destructor; + else if (IDENTIFIER_TYPENAME_P (unqualified_name)) + sfk = sfk_conversion; + else if (/* There's no way to declare a constructor + for an anonymous type, even if the type + got a name for linkage purposes. */ + !TYPE_WAS_ANONYMOUS (class_type) + && constructor_name_p (unqualified_name, + class_type)) + { + unqualified_name = constructor_name (class_type); + sfk = sfk_constructor; } + + if (ctor_dtor_or_conv_p && sfk != sfk_none) + *ctor_dtor_or_conv_p = -1; } } + declarator = make_id_declarator (qualifying_scope, + unqualified_name, + sfk); + declarator->id_loc = token->location; handle_declarator:; scope = get_scope_of_declarator (declarator); @@ -11690,6 +11782,7 @@ cp_parser_cv_qualifier_seq_opt (cp_parser* parser) static tree cp_parser_declarator_id (cp_parser* parser) { + tree id; /* The expression must be an id-expression. Assume that qualified names are the names of types so that: @@ -11704,11 +11797,14 @@ cp_parser_declarator_id (cp_parser* parser) int S::R::i = 3; will work, too. */ - return cp_parser_id_expression (parser, - /*template_keyword_p=*/false, - /*check_dependency_p=*/false, - /*template_p=*/NULL, - /*declarator_p=*/true); + id = cp_parser_id_expression (parser, + /*template_keyword_p=*/false, + /*check_dependency_p=*/false, + /*template_p=*/NULL, + /*declarator_p=*/true); + if (BASELINK_P (id)) + id = BASELINK_FUNCTIONS (id); + return id; } /* Parse a type-id. @@ -12193,6 +12289,7 @@ cp_parser_parameter_declaration (cp_parser *parser, /* If we run out of tokens, issue an error message. */ case CPP_EOF: + case CPP_PRAGMA_EOL: error ("file ends in default argument"); done = true; break; @@ -12622,7 +12719,8 @@ cp_parser_class_name (cp_parser *parser, /* If this is a typename, create a TYPENAME_TYPE. */ if (typename_p && decl != error_mark_node) { - decl = make_typename_type (scope, decl, typename_type, /*complain=*/1); + decl = make_typename_type (scope, decl, typename_type, + /*complain=*/tf_error); if (decl != error_mark_node) decl = TYPE_NAME (decl); } @@ -13227,7 +13325,9 @@ cp_parser_member_specification_opt (cp_parser* parser) /* Peek at the next token. */ token = cp_lexer_peek_token (parser->lexer); /* If it's a `}', or EOF then we've seen all the members. */ - if (token->type == CPP_CLOSE_BRACE || token->type == CPP_EOF) + if (token->type == CPP_CLOSE_BRACE + || token->type == CPP_EOF + || token->type == CPP_PRAGMA_EOL) break; /* See if this token is a keyword. */ @@ -13249,7 +13349,7 @@ cp_parser_member_specification_opt (cp_parser* parser) /* Accept #pragmas at class scope. */ if (token->type == CPP_PRAGMA) { - cp_lexer_handle_pragma (parser->lexer); + cp_parser_pragma (parser, pragma_external); break; } @@ -13487,7 +13587,8 @@ cp_parser_member_declaration (cp_parser* parser) /* Create the bitfield declaration. */ decl = grokbitfield (identifier ? make_id_declarator (NULL_TREE, - identifier) + identifier, + sfk_none) : NULL, &decl_specifiers, width); @@ -13671,18 +13772,13 @@ cp_parser_pure_specifier (cp_parser* parser) return error_mark_node; /* Look for the `0' token. */ token = cp_lexer_consume_token (parser->lexer); - if (token->type != CPP_NUMBER || !integer_zerop (token->value)) - { - cp_parser_error (parser, - "invalid pure specifier (only `= 0' is allowed)"); - cp_parser_skip_to_end_of_statement (parser); - return error_mark_node; - } + /* c_lex_with_flags marks a single digit '0' with PURE_ZERO. */ + if (token->type == CPP_NUMBER && (token->flags & PURE_ZERO)) + return integer_zero_node; - /* FIXME: Unfortunately, this will accept `0L' and `0x00' as well. - We need to get information from the lexer about how the number - was spelled in order to fix this problem. */ - return integer_zero_node; + cp_parser_error (parser, "invalid pure specifier (only `= 0' is allowed)"); + cp_parser_skip_to_end_of_statement (parser); + return error_mark_node; } /* Parse a constant-initializer. @@ -14544,7 +14640,7 @@ cp_parser_label_declaration (cp_parser* parser) types. If AMBIGUOUS_DECLS is non-NULL, *AMBIGUOUS_DECLS is set to a - TREE_LIST of candiates if name-lookup results in an ambiguity, and + TREE_LIST of candidates if name-lookup results in an ambiguity, and NULL_TREE otherwise. */ static tree @@ -14643,7 +14739,7 @@ cp_parser_lookup_name (cp_parser *parser, tree name, A::B' should be considered a type-name, even if `A' is dependent. */ type = make_typename_type (parser->scope, name, tag_type, - /*complain=*/1); + /*complain=*/tf_error); decl = TYPE_NAME (type); } else if (is_template @@ -14652,7 +14748,7 @@ cp_parser_lookup_name (cp_parser *parser, tree name, CPP_CLOSE_PAREN))) decl = make_unbound_class_template (parser->scope, name, NULL_TREE, - /*complain=*/1); + /*complain=*/tf_error); else decl = build_qualified_name (/*type=*/NULL_TREE, parser->scope, name, @@ -15174,9 +15270,15 @@ cp_parser_function_definition_after_declarator (cp_parser* parser, /* Issue an error message. */ error ("named return values are no longer supported"); /* Skip tokens until we reach the start of the function body. */ - while (cp_lexer_next_token_is_not (parser->lexer, CPP_OPEN_BRACE) - && cp_lexer_next_token_is_not (parser->lexer, CPP_EOF)) - cp_lexer_consume_token (parser->lexer); + while (true) + { + cp_token *token = cp_lexer_peek_token (parser->lexer); + if (token->type == CPP_OPEN_BRACE + || token->type == CPP_EOF + || token->type == CPP_PRAGMA_EOL) + break; + cp_lexer_consume_token (parser->lexer); + } } /* The `extern' in `extern "C" void f () { ... }' does not apply to anything declared inside `f'. */ @@ -15254,12 +15356,8 @@ cp_parser_template_declaration_after_export (cp_parser* parser, bool member_p) parameter_list = NULL_TREE; } else - { - /* Parse the template parameters. */ - begin_template_parm_list (); - parameter_list = cp_parser_template_parameter_list (parser); - parameter_list = end_template_parm_list (parameter_list); - } + /* Parse the template parameters. */ + parameter_list = cp_parser_template_parameter_list (parser); /* Look for the `>'. */ cp_parser_skip_until_found (parser, CPP_GREATER, "`>'"); @@ -15805,7 +15903,7 @@ cp_parser_sizeof_operand (cp_parser* parser, enum rid keyword) saved_message = parser->type_definition_forbidden_message; /* And create the new one. */ parser->type_definition_forbidden_message - = xmalloc (strlen (format) + = XNEWVEC (const char, strlen (format) + strlen (IDENTIFIER_POINTER (ridpointers[keyword])) + 1 /* `\0' */); sprintf ((char *) parser->type_definition_forbidden_message, @@ -15998,27 +16096,38 @@ cp_parser_skip_until_found (cp_parser* parser, { /* Peek at the next token. */ token = cp_lexer_peek_token (parser->lexer); - /* If we've reached the token we want, consume it and - stop. */ + + /* If we've reached the token we want, consume it and stop. */ if (token->type == type && !nesting_depth) { cp_lexer_consume_token (parser->lexer); return; } - /* If we've run out of tokens, stop. */ - if (token->type == CPP_EOF) - return; - if (token->type == CPP_OPEN_BRACE - || token->type == CPP_OPEN_PAREN - || token->type == CPP_OPEN_SQUARE) - ++nesting_depth; - else if (token->type == CPP_CLOSE_BRACE - || token->type == CPP_CLOSE_PAREN - || token->type == CPP_CLOSE_SQUARE) + + switch (token->type) { + case CPP_EOF: + case CPP_PRAGMA_EOL: + /* If we've run out of tokens, stop. */ + return; + + case CPP_OPEN_BRACE: + case CPP_OPEN_PAREN: + case CPP_OPEN_SQUARE: + ++nesting_depth; + break; + + case CPP_CLOSE_BRACE: + case CPP_CLOSE_PAREN: + case CPP_CLOSE_SQUARE: if (nesting_depth-- == 0) return; + break; + + default: + break; } + /* Consume this token. */ cp_lexer_consume_token (parser->lexer); } @@ -16237,7 +16346,9 @@ cp_parser_cache_group (cp_parser *parser, && cp_lexer_next_token_is (parser->lexer, CPP_SEMICOLON)) return; /* If we've reached the end of the file, stop. */ - if (cp_lexer_next_token_is (parser->lexer, CPP_EOF)) + if (cp_lexer_next_token_is (parser->lexer, CPP_EOF) + || (end != CPP_PRAGMA_EOL + && cp_lexer_next_token_is (parser->lexer, CPP_PRAGMA_EOL))) return; /* Consume the next token. */ token = cp_lexer_consume_token (parser->lexer); @@ -16250,6 +16361,8 @@ cp_parser_cache_group (cp_parser *parser, } else if (token->type == CPP_OPEN_PAREN) cp_parser_cache_group (parser, CPP_CLOSE_PAREN, depth + 1); + else if (token->type == CPP_PRAGMA) + cp_parser_cache_group (parser, CPP_PRAGMA_EOL, depth + 1); else if (token->type == end) return; } @@ -16986,7 +17099,7 @@ cp_parser_objc_interstitial_code (cp_parser* parser) cp_parser_linkage_specification (parser); /* Handle #pragma, if any. */ else if (token->type == CPP_PRAGMA) - cp_lexer_handle_pragma (parser->lexer); + cp_parser_pragma (parser, pragma_external); /* Allow stray semicolons. */ else if (token->type == CPP_SEMICOLON) cp_lexer_consume_token (parser->lexer); @@ -17126,7 +17239,8 @@ cp_parser_objc_class_ivars (cp_parser* parser) { /* Get the name of the bitfield. */ declarator = make_id_declarator (NULL_TREE, - cp_parser_identifier (parser)); + cp_parser_identifier (parser), + sfk_none); eat_colon: cp_lexer_consume_token (parser->lexer); /* Eat ':'. */ @@ -17477,11 +17591,111 @@ cp_parser_objc_statement (cp_parser * parser) { return error_mark_node; } - /* The parser. */ static GTY (()) cp_parser *the_parser; + +/* Special handling for the first token or line in the file. The first + thing in the file might be #pragma GCC pch_preprocess, which loads a + PCH file, which is a GC collection point. So we need to handle this + first pragma without benefit of an existing lexer structure. + + Always returns one token to the caller in *FIRST_TOKEN. This is + either the true first token of the file, or the first token after + the initial pragma. */ + +static void +cp_parser_initial_pragma (cp_token *first_token) +{ + tree name = NULL; + + cp_lexer_get_preprocessor_token (NULL, first_token); + if (first_token->pragma_kind != PRAGMA_GCC_PCH_PREPROCESS) + return; + + cp_lexer_get_preprocessor_token (NULL, first_token); + if (first_token->type == CPP_STRING) + { + name = first_token->value; + + cp_lexer_get_preprocessor_token (NULL, first_token); + if (first_token->type != CPP_PRAGMA_EOL) + error ("junk at end of %<#pragma GCC pch_preprocess%>"); + } + else + error ("expected string literal"); + + /* Skip to the end of the pragma. */ + while (first_token->type != CPP_PRAGMA_EOL && first_token->type != CPP_EOF) + cp_lexer_get_preprocessor_token (NULL, first_token); + + /* Read one more token to return to our caller. */ + cp_lexer_get_preprocessor_token (NULL, first_token); + + /* Now actually load the PCH file. */ + if (name) + c_common_pch_pragma (parse_in, TREE_STRING_POINTER (name)); +} + +/* Normal parsing of a pragma token. Here we can (and must) use the + regular lexer. */ + +static bool +cp_parser_pragma (cp_parser *parser, enum pragma_context context ATTRIBUTE_UNUSED) +{ + cp_token *pragma_tok; + unsigned int id; + + pragma_tok = cp_lexer_consume_token (parser->lexer); + gcc_assert (pragma_tok->type == CPP_PRAGMA); + parser->lexer->in_pragma = true; + + id = pragma_tok->pragma_kind; + switch (id) + { + case PRAGMA_GCC_PCH_PREPROCESS: + error ("%<#pragma GCC pch_preprocess%> must be first"); + break; + + default: + gcc_assert (id >= PRAGMA_FIRST_EXTERNAL); + c_invoke_pragma_handler (id); + break; + } + + cp_parser_skip_to_pragma_eol (parser, pragma_tok); + return false; +} + +/* The interface the pragma parsers have to the lexer. */ + +enum cpp_ttype +pragma_lex (tree *value) +{ + cp_token *tok; + enum cpp_ttype ret; + + tok = cp_lexer_peek_token (the_parser->lexer); + + ret = tok->type; + *value = tok->value; + + if (ret == CPP_PRAGMA_EOL || ret == CPP_EOF) + ret = CPP_EOF; + else if (ret == CPP_STRING) + *value = cp_parser_string_literal (the_parser, false, false); + else + { + cp_lexer_consume_token (the_parser->lexer); + if (ret == CPP_KEYWORD) + ret = CPP_NAME; + } + + return ret; +} + + /* External interface. */ /* Parse one entire translation unit. */ diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 3fac7f3749d..aa85f92f426 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -137,7 +137,6 @@ static tree tsubst_template_parms (tree, tree, tsubst_flags_t); static void regenerate_decl_from_template (tree, tree); static tree most_specialized (tree, tree, tree); static tree most_specialized_class (tree, tree); -static int template_class_depth_real (tree, int); static tree tsubst_aggr_type (tree, tree, tsubst_flags_t, tree, int); static tree tsubst_arg_types (tree, tree, tsubst_flags_t, tree); static tree tsubst_function_type (tree, tree, tsubst_flags_t, tree); @@ -145,7 +144,6 @@ static void check_specialization_scope (void); static tree process_partial_specialization (tree); static void set_current_access_from_decl (tree); static void check_default_tmpl_args (tree, tree, int, int); -static tree tsubst_call_declarator_parms (tree, tree, tsubst_flags_t, tree); static tree get_template_base (tree, tree, tree, tree); static int verify_class_unification (tree, tree, tree); static tree try_class_unification (tree, tree, tree, tree); @@ -266,15 +264,14 @@ finish_member_template_decl (tree decl) A::B has depth two, while A has depth one. Both A::B and A::B have depth one, if - COUNT_SPECIALIZATIONS is 0 or if they are instantiations, not - specializations. + they are instantiations, not specializations. This function is guaranteed to return 0 if passed NULL_TREE so that, for example, `template_class_depth (current_class_type)' is always safe. */ -static int -template_class_depth_real (tree type, int count_specializations) +int +template_class_depth (tree type) { int depth; @@ -287,18 +284,14 @@ template_class_depth_real (tree type, int count_specializations) { if (CLASSTYPE_TEMPLATE_INFO (type) && PRIMARY_TEMPLATE_P (CLASSTYPE_TI_TEMPLATE (type)) - && ((count_specializations - && CLASSTYPE_TEMPLATE_SPECIALIZATION (type)) - || uses_template_parms (CLASSTYPE_TI_ARGS (type)))) + && uses_template_parms (CLASSTYPE_TI_ARGS (type))) ++depth; } else { if (DECL_TEMPLATE_INFO (type) && PRIMARY_TEMPLATE_P (DECL_TI_TEMPLATE (type)) - && ((count_specializations - && DECL_TEMPLATE_SPECIALIZATION (type)) - || uses_template_parms (DECL_TI_ARGS (type)))) + && uses_template_parms (DECL_TI_ARGS (type))) ++depth; } } @@ -306,16 +299,6 @@ template_class_depth_real (tree type, int count_specializations) return depth; } -/* Returns the template nesting level of the indicated class TYPE. - Like template_class_depth_real, but instantiations do not count in - the depth. */ - -int -template_class_depth (tree type) -{ - return template_class_depth_real (type, /*count_specializations=*/0); -} - /* Returns 1 if processing DECL as part of do_pending_inlines needs us to push template parms. */ @@ -1210,7 +1193,7 @@ register_specialization (tree spec, tree tmpl, tree args, bool is_friend) An explicit specialization of a function template is inline only if it is explicitly declared to be, - and independently of whether its function tempalte + and independently of whether its function template is. to the primary function; now copy the inline bits to @@ -1918,12 +1901,21 @@ check_explicit_specialization (tree declarator, /* Find the namespace binding, using the declaration context. */ - fns = namespace_binding (dname, CP_DECL_CONTEXT (decl)); + fns = lookup_qualified_name (CP_DECL_CONTEXT (decl), dname, + false, true); if (!fns || !is_overloaded_fn (fns)) { error ("%qD is not a template function", dname); fns = error_mark_node; } + else + { + tree fn = OVL_CURRENT (fns); + if (!is_associated_namespace (CP_DECL_CONTEXT (decl), + CP_DECL_CONTEXT (fn))) + error ("%qD is not declared in %qD", + decl, current_namespace); + } } declarator = lookup_template_function (fns, NULL_TREE); @@ -5669,14 +5661,12 @@ instantiate_class_template (tree type) { /* Build new CLASSTYPE_NESTED_UTDS. */ - tree tag = t; - tree name = TYPE_IDENTIFIER (tag); tree newtag; bool class_template_p; - class_template_p = (TREE_CODE (tag) != ENUMERAL_TYPE - && TYPE_LANG_SPECIFIC (tag) - && CLASSTYPE_IS_TEMPLATE (tag)); + class_template_p = (TREE_CODE (t) != ENUMERAL_TYPE + && TYPE_LANG_SPECIFIC (t) + && CLASSTYPE_IS_TEMPLATE (t)); /* If the member is a class template, then -- even after substitution -- there may be dependent types in the template argument list for the class. We increment @@ -5685,7 +5675,7 @@ instantiate_class_template (tree type) when outside of a template. */ if (class_template_p) ++processing_template_decl; - newtag = tsubst (tag, args, tf_error, NULL_TREE); + newtag = tsubst (t, args, tf_error, NULL_TREE); if (class_template_p) --processing_template_decl; if (newtag == error_mark_node) @@ -5693,6 +5683,8 @@ instantiate_class_template (tree type) if (TREE_CODE (newtag) != ENUMERAL_TYPE) { + tree name = TYPE_IDENTIFIER (t); + if (class_template_p) /* Unfortunately, lookup_template_class sets CLASSTYPE_IMPLICIT_INSTANTIATION for a partial @@ -6962,39 +6954,6 @@ tsubst_exception_specification (tree fntype, return new_specs; } -/* Substitute into the PARMS of a call-declarator. */ - -static tree -tsubst_call_declarator_parms (tree parms, - tree args, - tsubst_flags_t complain, - tree in_decl) -{ - tree new_parms; - tree type; - tree defarg; - - if (!parms || parms == void_list_node) - return parms; - - new_parms = tsubst_call_declarator_parms (TREE_CHAIN (parms), - args, complain, in_decl); - - /* Figure out the type of this parameter. */ - type = tsubst (TREE_VALUE (parms), args, complain, in_decl); - - /* Figure out the default argument as well. Note that we use - tsubst_expr since the default argument is really an expression. */ - defarg = tsubst_expr (TREE_PURPOSE (parms), args, complain, in_decl); - - /* Chain this parameter on to the front of those we have already - processed. We don't use hash_tree_cons because that function - doesn't check TREE_PARMLIST. */ - new_parms = tree_cons (defarg, type, new_parms); - - return new_parms; -} - /* Take the tree structure T and replace template parameters used therein with the argument vector ARGS. IN_DECL is an associated decl for diagnostics. If an error occurs, returns ERROR_MARK_NODE. @@ -8127,6 +8086,10 @@ tsubst_copy (tree t, tree args, tsubst_flags_t complain, tree in_decl) in response to the saved STMT_IS_FULL_EXPR_P setting. */ gcc_unreachable (); + case OFFSET_REF: + mark_used (TREE_OPERAND (t, 1)); + return t; + default: return t; } @@ -8873,6 +8836,7 @@ tsubst_copy_and_build (tree t, case COMPONENT_REF: { tree object; + tree object_type; tree member; object = tsubst_non_call_postfix_expression (TREE_OPERAND (t, 0), @@ -8880,6 +8844,7 @@ tsubst_copy_and_build (tree t, /* Remember that there was a reference to this entity. */ if (DECL_P (object)) mark_used (object); + object_type = TREE_TYPE (object); member = TREE_OPERAND (t, 1); if (BASELINK_P (member)) @@ -8888,20 +8853,20 @@ tsubst_copy_and_build (tree t, args, complain, in_decl); else member = tsubst_copy (member, args, complain, in_decl); - if (member == error_mark_node) return error_mark_node; - else if (!CLASS_TYPE_P (TREE_TYPE (object))) + + if (object_type && !CLASS_TYPE_P (object_type)) { if (TREE_CODE (member) == BIT_NOT_EXPR) return finish_pseudo_destructor_expr (object, NULL_TREE, - TREE_TYPE (object)); + object_type); else if (TREE_CODE (member) == SCOPE_REF && (TREE_CODE (TREE_OPERAND (member, 1)) == BIT_NOT_EXPR)) return finish_pseudo_destructor_expr (object, object, - TREE_TYPE (object)); + object_type); } else if (TREE_CODE (member) == SCOPE_REF && TREE_CODE (TREE_OPERAND (member, 1)) == TEMPLATE_ID_EXPR) @@ -8923,12 +8888,11 @@ tsubst_copy_and_build (tree t, args); member = (adjust_result_of_qualified_name_lookup (member, BINFO_TYPE (BASELINK_BINFO (member)), - TREE_TYPE (object))); + object_type)); } else { - qualified_name_lookup_error (TREE_TYPE (object), tmpl, - member); + qualified_name_lookup_error (object_type, tmpl, member); return error_mark_node; } } @@ -9093,7 +9057,8 @@ check_instantiated_args (tree tmpl, tree args, tsubst_flags_t complain) if (TYPE_ANONYMOUS_P (nt)) error ("%qT is/uses anonymous type", t); else - error ("%qT uses local type %qT", t, nt); + error ("template argument for %qD uses local type %qT", + tmpl, t); } result = true; } @@ -9193,6 +9158,8 @@ instantiate_template (tree tmpl, tree targ_ptr, tsubst_flags_t complain) /* Substitute template parameters. */ fndecl = tsubst (DECL_TEMPLATE_RESULT (gen_tmpl), targ_ptr, complain, gen_tmpl); + if (fndecl == error_mark_node) + return error_mark_node; /* Now we know the specialization, compute access previously deferred. */ diff --git a/gcc/cp/ptree.c b/gcc/cp/ptree.c index 8a7ba940063..c222bdcaecd 100644 --- a/gcc/cp/ptree.c +++ b/gcc/cp/ptree.c @@ -41,7 +41,8 @@ cxx_print_decl (FILE *file, tree node, int indent) return; } - if (!DECL_LANG_SPECIFIC (node)) + if (!CODE_CONTAINS_STRUCT (TREE_CODE (node), TS_DECL_COMMON) + || !DECL_LANG_SPECIFIC (node)) return; indent_to (file, indent + 3); if (TREE_CODE (node) == FUNCTION_DECL @@ -168,6 +169,12 @@ cxx_print_xnode (FILE *file, tree node, int indent) { switch (TREE_CODE (node)) { + case BASELINK: + print_node (file, "functions", BASELINK_FUNCTIONS (node), indent + 4); + print_node (file, "binfo", BASELINK_BINFO (node), indent + 4); + print_node (file, "access_binfo", BASELINK_ACCESS_BINFO (node), + indent + 4); + break; case OVERLOAD: print_node (file, "function", OVL_FUNCTION (node), indent+4); print_node (file, "chain", TREE_CHAIN (node), indent+4); diff --git a/gcc/cp/repo.c b/gcc/cp/repo.c index eee3b87f8d3..ad01010c363 100644 --- a/gcc/cp/repo.c +++ b/gcc/cp/repo.c @@ -132,7 +132,7 @@ open_repo_file (const char *filename) if (! p) p = s + strlen (s); - repo_name = xmalloc (p - s + 5); + repo_name = XNEWVEC (char, p - s + 5); memcpy (repo_name, s, p - s); memcpy (repo_name + (p - s), ".rpo", 5); @@ -298,6 +298,12 @@ repo_emit_p (tree decl) && (!TYPE_LANG_SPECIFIC (type) || !CLASSTYPE_TEMPLATE_INSTANTIATION (type))) return 2; + /* Static data members initialized by constant expressions must + be processed where needed so that their definitions are + available. */ + if (DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P (decl) + && DECL_CLASS_SCOPE_P (decl)) + return 2; } else if (!DECL_TEMPLATE_INSTANTIATION (decl)) return 2; diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c index 95387e13bc3..512b78949fb 100644 --- a/gcc/cp/semantics.c +++ b/gcc/cp/semantics.c @@ -1508,9 +1508,14 @@ finish_qualified_id_expr (tree qualifying_class, bool template_p, bool template_arg_p) { + gcc_assert (TYPE_P (qualifying_class)); + if (error_operand_p (expr)) return error_mark_node; + if (DECL_P (expr) || BASELINK_P (expr)) + mark_used (expr); + if (template_p) check_template_keyword (expr); @@ -2000,12 +2005,12 @@ finish_compound_literal (tree type, VEC(constructor_elt,gc) *initializer_list) /* Build a CONSTRUCTOR for the INITIALIZER_LIST. */ compound_literal = build_constructor (NULL_TREE, initializer_list); - /* Mark it as a compound-literal. */ if (processing_template_decl) TREE_TYPE (compound_literal) = type; else { /* Check the initialization. */ + compound_literal = reshape_init (type, compound_literal); compound_literal = digest_init (type, compound_literal); /* If the TYPE was an array type with an unknown bound, then we can figure out the dimension now. For example, something like: @@ -2018,7 +2023,9 @@ finish_compound_literal (tree type, VEC(constructor_elt,gc) *initializer_list) compound_literal, 1); } + /* Mark it as a compound-literal. */ TREE_HAS_CONSTRUCTOR (compound_literal) = 1; + return compound_literal; } @@ -2931,7 +2938,7 @@ simplify_aggr_init_expr (tree *tp) call_expr = build_aggr_init (slot, call_expr, DIRECT_BIND | LOOKUP_ONLYCONVERTING); pop_deferring_access_checks (); - call_expr = build (COMPOUND_EXPR, TREE_TYPE (slot), call_expr, slot); + call_expr = build2 (COMPOUND_EXPR, TREE_TYPE (slot), call_expr, slot); } *tp = call_expr; diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c index 15ee56c7c87..96b461ce66f 100644 --- a/gcc/cp/tree.c +++ b/gcc/cp/tree.c @@ -87,9 +87,6 @@ lvalue_p_1 (tree ref, case COMPONENT_REF: op1_lvalue_kind = lvalue_p_1 (TREE_OPERAND (ref, 0), treat_class_rvalues_as_lvalues); - /* In an expression of the form "X.Y", the packed-ness of the - expression does not depend on "X". */ - op1_lvalue_kind &= ~clk_packed; /* Look at the member designator. */ if (!op1_lvalue_kind /* The "field" can be a FUNCTION_DECL or an OVERLOAD in some @@ -325,8 +322,6 @@ build_cplus_new (tree type, tree init) tree build_target_expr_with_type (tree init, tree type) { - tree slot; - gcc_assert (!VOID_TYPE_P (type)); if (TREE_CODE (init) == TARGET_EXPR) @@ -342,8 +337,7 @@ build_target_expr_with_type (tree init, tree type) aggregate; there's no additional work to be done. */ return force_rvalue (init); - slot = build_local_temp (type); - return build_target_expr (slot, init); + return force_target_expr (type, init); } /* Like the above function, but without the checking. This function should @@ -817,6 +811,10 @@ tree build_qualified_name (tree type, tree scope, tree name, bool template_p) { tree t; + if (type == error_mark_node + || scope == error_mark_node + || name == error_mark_node) + return error_mark_node; t = build2 (SCOPE_REF, type, scope, name); QUALIFIED_NAME_IS_TEMPLATE (t) = template_p; return t; @@ -839,9 +837,9 @@ is_overloaded_fn (tree x) int really_overloaded_fn (tree x) { - /* A baselink is also considered an overloaded function. */ if (TREE_CODE (x) == OFFSET_REF) x = TREE_OPERAND (x, 1); + /* A baselink is also considered an overloaded function. */ if (BASELINK_P (x)) x = BASELINK_FUNCTIONS (x); diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c index a86ee6a516e..01f2ebbd9b5 100644 --- a/gcc/cp/typeck.c +++ b/gcc/cp/typeck.c @@ -2253,15 +2253,7 @@ build_array_ref (tree array, tree idx) { tree rval, type; - /* Subscripting with type char is likely to lose - on a machine where chars are signed. - So warn on any machine, but optionally. - Don't warn for unsigned char since that type is safe. - Don't warn for signed char because anyone who uses that - must have done so deliberately. */ - if (warn_char_subscripts - && TYPE_MAIN_VARIANT (TREE_TYPE (idx)) == char_type_node) - warning (0, "array subscript has type %"); + warn_array_subscript_with_type_char (idx); if (!INTEGRAL_OR_ENUMERATION_TYPE_P (TREE_TYPE (idx))) { @@ -3097,6 +3089,10 @@ build_binary_op (enum tree_code code, tree orig_op0, tree orig_op1, case NE_EXPR: if (warn_float_equal && (code0 == REAL_TYPE || code1 == REAL_TYPE)) warning (0, "comparing floating point with == or != is unsafe"); + if ((TREE_CODE (orig_op0) == STRING_CST && !integer_zerop (op1)) + || (TREE_CODE (orig_op1) == STRING_CST && !integer_zerop (op0))) + warning (OPT_Wstring_literal_comparison, + "comparison with string literal"); build_type = boolean_type_node; if ((code0 == INTEGER_TYPE || code0 == REAL_TYPE @@ -3202,6 +3198,11 @@ build_binary_op (enum tree_code code, tree orig_op0, tree orig_op1, case GE_EXPR: case LT_EXPR: case GT_EXPR: + if (TREE_CODE (orig_op0) == STRING_CST + || TREE_CODE (orig_op1) == STRING_CST) + warning (OPT_Wstring_literal_comparison, + "comparison with string literal"); + build_type = boolean_type_node; if ((code0 == INTEGER_TYPE || code0 == REAL_TYPE) && (code1 == INTEGER_TYPE || code1 == REAL_TYPE)) @@ -3696,7 +3697,7 @@ build_x_unary_op (enum tree_code code, tree xarg) } else { - error ("parenthesis around %qE cannot be used to form a" + error ("parentheses around %qE cannot be used to form a" " pointer-to-member-function", xarg); PTRMEM_OK_P (xarg) = 1; @@ -4116,10 +4117,11 @@ build_unary_op (enum tree_code code, tree xarg, int noconvert) is used here to remove this const from the diagnostics and the created OFFSET_REF. */ tree base = TYPE_MAIN_VARIANT (TREE_TYPE (TREE_OPERAND (arg, 0))); - tree name = DECL_NAME (get_first_fn (TREE_OPERAND (arg, 1))); + tree fn = get_first_fn (TREE_OPERAND (arg, 1)); if (! flag_ms_extensions) { + tree name = DECL_NAME (fn); if (current_class_type && TREE_OPERAND (arg, 0) == current_class_ref) /* An expression like &memfn. */ @@ -4133,7 +4135,7 @@ build_unary_op (enum tree_code code, tree xarg, int noconvert) " Say %<&%T::%D%>", base, name); } - arg = build_offset_ref (base, name, /*address_p=*/true); + arg = build_offset_ref (base, fn, /*address_p=*/true); } offset_ref: @@ -4190,75 +4192,93 @@ build_unary_op (enum tree_code code, tree xarg, int noconvert) break; } - /* Allow the address of a constructor if all the elements - are constant. */ - if (TREE_CODE (arg) == CONSTRUCTOR && TREE_HAS_CONSTRUCTOR (arg) - && TREE_CONSTANT (arg)) - ; /* Anything not already handled and not a true memory reference is an error. */ - else if (TREE_CODE (argtype) != FUNCTION_TYPE - && TREE_CODE (argtype) != METHOD_TYPE - && TREE_CODE (arg) != OFFSET_REF - && !lvalue_or_else (arg, lv_addressof)) + if (TREE_CODE (argtype) != FUNCTION_TYPE + && TREE_CODE (argtype) != METHOD_TYPE + && TREE_CODE (arg) != OFFSET_REF + /* Permit users to take the address of a compound-literal + with sufficient simple elements. */ + && !(COMPOUND_LITERAL_P (arg) && TREE_STATIC (arg)) + && !lvalue_or_else (arg, lv_addressof)) return error_mark_node; if (argtype != error_mark_node) argtype = build_pointer_type (argtype); - { - tree addr; + /* In a template, we are processing a non-dependent expression + so we can just form an ADDR_EXPR with the correct type. */ + if (processing_template_decl) + { + val = build_address (arg); + if (TREE_CODE (arg) == OFFSET_REF) + PTRMEM_OK_P (val) = PTRMEM_OK_P (arg); + return val; + } - if (TREE_CODE (arg) != COMPONENT_REF - /* Inside a template, we are processing a non-dependent - expression so we can just form an ADDR_EXPR with the - correct type. */ - || processing_template_decl) - { - addr = build_address (arg); - if (TREE_CODE (arg) == OFFSET_REF) - PTRMEM_OK_P (addr) = PTRMEM_OK_P (arg); - } - else if (TREE_CODE (TREE_OPERAND (arg, 1)) == BASELINK) - { - tree fn = BASELINK_FUNCTIONS (TREE_OPERAND (arg, 1)); - - /* We can only get here with a single static member - function. */ - gcc_assert (TREE_CODE (fn) == FUNCTION_DECL - && DECL_STATIC_FUNCTION_P (fn)); - mark_used (fn); - addr = build_address (fn); - if (TREE_SIDE_EFFECTS (TREE_OPERAND (arg, 0))) - /* Do not lose object's side effects. */ - addr = build2 (COMPOUND_EXPR, TREE_TYPE (addr), - TREE_OPERAND (arg, 0), addr); - } - else if (DECL_C_BIT_FIELD (TREE_OPERAND (arg, 1))) - { - error ("attempt to take address of bit-field structure member %qD", - TREE_OPERAND (arg, 1)); - return error_mark_node; - } - else - { - tree object = TREE_OPERAND (arg, 0); - tree field = TREE_OPERAND (arg, 1); - gcc_assert (same_type_ignoring_top_level_qualifiers_p - (TREE_TYPE (object), decl_type_context (field))); - addr = build_address (arg); - } + /* If the user has taken the address of the compound literal, + create a variable to contain the value of the literal and + then return the address of that variable. */ + if (COMPOUND_LITERAL_P (arg)) + { + tree var; + gcc_assert (TREE_STATIC (arg)); + var = create_temporary_var (TREE_TYPE (arg)); + TREE_STATIC (var) = 1; + set_compound_literal_name (var); + initialize_artificial_var (var, arg); + arg = pushdecl (var); + /* Since each compound literal is unique, pushdecl should + never find a pre-existing variable with the same + name. */ + gcc_assert (arg == var); + } + + if (TREE_CODE (arg) != COMPONENT_REF) + { + val = build_address (arg); + if (TREE_CODE (arg) == OFFSET_REF) + PTRMEM_OK_P (val) = PTRMEM_OK_P (arg); + } + else if (TREE_CODE (TREE_OPERAND (arg, 1)) == BASELINK) + { + tree fn = BASELINK_FUNCTIONS (TREE_OPERAND (arg, 1)); + + /* We can only get here with a single static member + function. */ + gcc_assert (TREE_CODE (fn) == FUNCTION_DECL + && DECL_STATIC_FUNCTION_P (fn)); + mark_used (fn); + val = build_address (fn); + if (TREE_SIDE_EFFECTS (TREE_OPERAND (arg, 0))) + /* Do not lose object's side effects. */ + val = build2 (COMPOUND_EXPR, TREE_TYPE (val), + TREE_OPERAND (arg, 0), val); + } + else if (DECL_C_BIT_FIELD (TREE_OPERAND (arg, 1))) + { + error ("attempt to take address of bit-field structure member %qD", + TREE_OPERAND (arg, 1)); + return error_mark_node; + } + else + { + tree object = TREE_OPERAND (arg, 0); + tree field = TREE_OPERAND (arg, 1); + gcc_assert (same_type_ignoring_top_level_qualifiers_p + (TREE_TYPE (object), decl_type_context (field))); + val = build_address (arg); + } - if (TREE_CODE (argtype) == POINTER_TYPE - && TREE_CODE (TREE_TYPE (argtype)) == METHOD_TYPE) - { - build_ptrmemfunc_type (argtype); - addr = build_ptrmemfunc (argtype, addr, 0, - /*c_cast_p=*/false); - } + if (TREE_CODE (argtype) == POINTER_TYPE + && TREE_CODE (TREE_TYPE (argtype)) == METHOD_TYPE) + { + build_ptrmemfunc_type (argtype); + val = build_ptrmemfunc (argtype, val, 0, + /*c_cast_p=*/false); + } - return addr; - } + return val; default: break; @@ -5019,6 +5039,8 @@ build_reinterpret_cast_1 (tree type, tree expr, bool c_cast_p, else if ((TYPE_PTRMEM_P (type) && TYPE_PTRMEM_P (intype)) || (TYPE_PTROBV_P (type) && TYPE_PTROBV_P (intype))) { + tree sexpr = expr; + if (!c_cast_p) check_for_casting_away_constness (intype, type, error, "reinterpret_cast"); @@ -5033,6 +5055,11 @@ build_reinterpret_cast_1 (tree type, tree expr, bool c_cast_p, "target type", intype, type); + /* We need to strip nops here, because the frontend likes to + create (int *)&a for array-to-pointer decay, instead of &a[0]. */ + STRIP_NOPS (sexpr); + strict_aliasing_warning (intype, type, sexpr); + return fold_if_not_in_template (build_nop (type, expr)); } else if ((TYPE_PTRFN_P (type) && TYPE_PTROBV_P (intype)) diff --git a/gcc/cp/typeck2.c b/gcc/cp/typeck2.c index 42520e2f767..755535f0371 100644 --- a/gcc/cp/typeck2.c +++ b/gcc/cp/typeck2.c @@ -1,7 +1,7 @@ /* Report error messages, build initializers, and perform some front-end optimizations for C++ compiler. Copyright (C) 1987, 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, - 1999, 2000, 2001, 2002, 2004, 2005 + 1999, 2000, 2001, 2002, 2004, 2005, 2006 Free Software Foundation, Inc. Hacked by Michael Tiemann (tiemann@cygnus.com) @@ -523,6 +523,9 @@ split_nonconstant_init_1 (tree dest, tree init) default: gcc_unreachable (); } + + /* The rest of the initializer is now a constant. */ + TREE_CONSTANT (init) = 1; } /* A subroutine of store_init_value. Splits non-constant static @@ -712,8 +715,7 @@ digest_init (tree type, tree init) return process_init_constructor (type, init); else { - if (TREE_HAS_CONSTRUCTOR (init) - && TREE_CODE (type) == ARRAY_TYPE) + if (COMPOUND_LITERAL_P (init) && TREE_CODE (type) == ARRAY_TYPE) { error ("cannot initialize aggregate of type %qT with " "a compound literal", type); @@ -993,12 +995,7 @@ process_init_constructor_union (tree type, tree init) tree field = TYPE_FIELDS (type); while (field && (!DECL_NAME (field) || TREE_CODE (field) != FIELD_DECL)) field = TREE_CHAIN (field); - if (!field) - { - error ("union %qT with no named members cannot be initialized", - type); - ce->value = error_mark_node; - } + gcc_assert (field); ce->index = field; } diff --git a/gcc/cse.c b/gcc/cse.c index 284f3fd5bea..a352c0efadf 100644 --- a/gcc/cse.c +++ b/gcc/cse.c @@ -2538,16 +2538,26 @@ exp_equiv_p (rtx x, rtx y, int validate, bool for_gcse) case MEM: if (for_gcse) { - /* Can't merge two expressions in different alias sets, since we - can decide that the expression is transparent in a block when - it isn't, due to it being set with the different alias set. */ - if (MEM_ALIAS_SET (x) != MEM_ALIAS_SET (y)) - return 0; - /* A volatile mem should not be considered equivalent to any other. */ if (MEM_VOLATILE_P (x) || MEM_VOLATILE_P (y)) return 0; + + /* Can't merge two expressions in different alias sets, since we + can decide that the expression is transparent in a block when + it isn't, due to it being set with the different alias set. + + Also, can't merge two expressions with different MEM_ATTRS. + They could e.g. be two different entities allocated into the + same space on the stack (see e.g. PR25130). In that case, the + MEM addresses can be the same, even though the two MEMs are + absolutely not equivalent. + + But because really all MEM attributes should be the same for + equivalent MEMs, we just use the invariant that MEMs that have + the same attributes share the same mem_attrs data structure. */ + if (MEM_ATTRS (x) != MEM_ATTRS (y)) + return 0; } break; diff --git a/gcc/cselib.c b/gcc/cselib.c index 13fc5326dc0..a988e86e63e 100644 --- a/gcc/cselib.c +++ b/gcc/cselib.c @@ -74,7 +74,7 @@ static void cselib_record_sets (rtx); the locations of the entries with the rtx we are looking up. */ /* A table that enables us to look up elts by their value. */ -static htab_t hash_table; +static htab_t cselib_hash_table; /* This is a global so we don't have to pass this through every function. It is used in new_elt_loc_list to set SETTING_INSN. */ @@ -212,7 +212,7 @@ cselib_clear_table (void) n_used_regs = 0; - htab_empty (hash_table); + htab_empty (cselib_hash_table); n_useless_values = 0; @@ -332,7 +332,7 @@ discard_useless_values (void **x, void *info ATTRIBUTE_UNUSED) if (v->locs == 0) { CSELIB_VAL_PTR (v->u.val_rtx) = NULL; - htab_clear_slot (hash_table, x); + htab_clear_slot (cselib_hash_table, x); unchain_one_value (v); n_useless_values--; } @@ -352,7 +352,7 @@ remove_useless_values (void) do { values_became_useless = 0; - htab_traverse (hash_table, discard_useless_locs, 0); + htab_traverse (cselib_hash_table, discard_useless_locs, 0); } while (values_became_useless); @@ -367,7 +367,7 @@ remove_useless_values (void) } *p = &dummy_val; - htab_traverse (hash_table, discard_useless_values, 0); + htab_traverse (cselib_hash_table, discard_useless_values, 0); gcc_assert (!n_useless_values); } @@ -803,7 +803,7 @@ cselib_lookup_mem (rtx x, int create) mem_elt = new_cselib_val (++next_unknown_value, mode); add_mem_for_addr (addr, mem_elt, x); - slot = htab_find_slot_with_hash (hash_table, wrap_constant (mode, x), + slot = htab_find_slot_with_hash (cselib_hash_table, wrap_constant (mode, x), mem_elt->value, INSERT); *slot = mem_elt; return mem_elt; @@ -954,7 +954,7 @@ cselib_lookup (rtx x, enum machine_mode mode, int create) REG_VALUES (i) = new_elt_list (REG_VALUES (i), NULL); } REG_VALUES (i)->next = new_elt_list (REG_VALUES (i)->next, e); - slot = htab_find_slot_with_hash (hash_table, x, e->value, INSERT); + slot = htab_find_slot_with_hash (cselib_hash_table, x, e->value, INSERT); *slot = e; return e; } @@ -967,7 +967,7 @@ cselib_lookup (rtx x, enum machine_mode mode, int create) if (! hashval) return 0; - slot = htab_find_slot_with_hash (hash_table, wrap_constant (mode, x), + slot = htab_find_slot_with_hash (cselib_hash_table, wrap_constant (mode, x), hashval, create ? INSERT : NO_INSERT); if (slot == 0) return 0; @@ -1476,7 +1476,8 @@ cselib_init (bool record_memory) } used_regs = xmalloc (sizeof (*used_regs) * cselib_nregs); n_used_regs = 0; - hash_table = htab_create (31, get_value_hash, entry_and_rtx_equal_p, NULL); + cselib_hash_table = htab_create (31, get_value_hash, + entry_and_rtx_equal_p, NULL); cselib_current_insn_in_libcall = false; } @@ -1490,10 +1491,10 @@ cselib_finish (void) free_alloc_pool (cselib_val_pool); free_alloc_pool (value_pool); cselib_clear_table (); - htab_delete (hash_table); + htab_delete (cselib_hash_table); free (used_regs); used_regs = 0; - hash_table = 0; + cselib_hash_table = 0; n_useless_values = 0; next_unknown_value = 0; } diff --git a/gcc/dbxout.c b/gcc/dbxout.c index 9ffced04c9b..cb7df88b739 100644 --- a/gcc/dbxout.c +++ b/gcc/dbxout.c @@ -269,7 +269,7 @@ static int pending_bincls = 0; static const char *base_input_file; #ifdef DEBUG_SYMS_TEXT -#define FORCE_TEXT current_function_section (current_function_decl); +#define FORCE_TEXT switch_to_section (current_function_section ()) #else #define FORCE_TEXT #endif @@ -907,7 +907,7 @@ dbxout_function_end (tree decl) /* The Lscope label must be emitted even if we aren't doing anything else; dbxout_block needs it. */ - function_section (current_function_decl); + switch_to_section (function_section (current_function_decl)); /* Convert Lscope into the appropriate format for local labels in case the system doesn't insert underscores in front of user generated @@ -1033,7 +1033,7 @@ dbxout_init (const char *input_file_name) if (used_ltext_label_name) { - text_section (); + switch_to_section (text_section); targetm.asm_out.internal_label (asm_out_file, "Ltext", 0); } @@ -1232,7 +1232,7 @@ dbxout_source_file (const char *filename) { /* Don't change section amid function. */ if (current_function_decl == NULL_TREE) - text_section (); + switch_to_section (text_section); dbxout_begin_simple_stabs (filename, N_SOL); dbxout_stab_value_internal_label ("Ltext", &source_label_number); @@ -1347,7 +1347,7 @@ dbxout_finish (const char *filename ATTRIBUTE_UNUSED) DBX_OUTPUT_MAIN_SOURCE_FILE_END (asm_out_file, filename); #elif defined DBX_OUTPUT_NULL_N_SO_AT_MAIN_SOURCE_FILE_END { - text_section (); + switch_to_section (text_section); dbxout_begin_empty_stabs (N_SO); dbxout_stab_value_internal_label ("Letext", 0); } @@ -2838,7 +2838,7 @@ dbxout_symbol_location (tree decl, tree type, const char *suffix, rtx home) { /* Ultrix `as' seems to need this. */ #ifdef DBX_STATIC_STAB_DATA_SECTION - data_section (); + switch_to_section (data_section); #endif code = N_STSYM; } diff --git a/gcc/ddg.c b/gcc/ddg.c index 6bb3d6c374d..86ffa1f3161 100644 --- a/gcc/ddg.c +++ b/gcc/ddg.c @@ -1,5 +1,5 @@ /* DDG - Data Dependence Graph implementation. - Copyright (C) 2004, 2005 + Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc. Contributed by Ayal Zaks and Mustafa Hagog @@ -222,10 +222,10 @@ create_ddg_dep_no_link (ddg_ptr g, ddg_node_ptr from, ddg_node_ptr to, for all its uses in the next iteration, and an output dependence to the first def of the next iteration. */ static void -add_deps_for_def (ddg_ptr g, struct df *df, struct ref *rd) +add_deps_for_def (ddg_ptr g, struct df *df, struct df_ref *rd) { int regno = DF_REF_REGNO (rd); - struct bb_info *bb_info = DF_BB_INFO (df, g->bb); + struct df_rd_bb_info *bb_info = DF_RD_BB_INFO (df, g->bb); struct df_link *r_use; int use_before_def = false; rtx def_insn = DF_REF_INSN (rd); @@ -235,7 +235,7 @@ add_deps_for_def (ddg_ptr g, struct df *df, struct ref *rd) that is upwards exposed in RD's block. */ for (r_use = DF_REF_CHAIN (rd); r_use != NULL; r_use = r_use->next) { - if (bitmap_bit_p (bb_info->ru_gen, r_use->ref->id)) + if (bitmap_bit_p (bb_info->gen, r_use->ref->id)) { rtx use_insn = DF_REF_INSN (r_use->ref); ddg_node_ptr dest_node = get_node_of_insn (g, use_insn); @@ -257,7 +257,7 @@ add_deps_for_def (ddg_ptr g, struct df *df, struct ref *rd) there is a use between the two defs. */ if (! use_before_def) { - struct ref *def = df_bb_regno_first_def_find (df, g->bb, regno); + struct df_ref *def = df_bb_regno_first_def_find (df, g->bb, regno); int i; ddg_node_ptr dest_node; @@ -266,7 +266,7 @@ add_deps_for_def (ddg_ptr g, struct df *df, struct ref *rd) /* Check if there are uses after RD. */ for (i = src_node->cuid + 1; i < g->num_nodes; i++) - if (df_reg_used (df, g->nodes[i].insn, rd->reg)) + if (df_find_use (df, g->nodes[i].insn, rd->reg)) return; dest_node = get_node_of_insn (g, def->insn); @@ -278,16 +278,16 @@ add_deps_for_def (ddg_ptr g, struct df *df, struct ref *rd) (nearest BLOCK_BEGIN) def of the next iteration, unless USE is followed by a def in the block. */ static void -add_deps_for_use (ddg_ptr g, struct df *df, struct ref *use) +add_deps_for_use (ddg_ptr g, struct df *df, struct df_ref *use) { int i; int regno = DF_REF_REGNO (use); - struct ref *first_def = df_bb_regno_first_def_find (df, g->bb, regno); + struct df_ref *first_def = df_bb_regno_first_def_find (df, g->bb, regno); ddg_node_ptr use_node; ddg_node_ptr def_node; - struct bb_info *bb_info; + struct df_rd_bb_info *bb_info; - bb_info = DF_BB_INFO (df, g->bb); + bb_info = DF_RD_BB_INFO (df, g->bb); if (!first_def) return; @@ -304,7 +304,7 @@ add_deps_for_use (ddg_ptr g, struct df *df, struct ref *use) /* We must not add ANTI dep when there is an intra-loop TRUE dep in the opposite direction. If the first_def reaches the USE then there is such a dep. */ - if (! bitmap_bit_p (bb_info->rd_gen, first_def->id)) + if (! bitmap_bit_p (bb_info->gen, first_def->id)) create_ddg_dep_no_link (g, use_node, def_node, ANTI_DEP, REG_DEP, 1); } @@ -313,25 +313,28 @@ static void build_inter_loop_deps (ddg_ptr g, struct df *df) { unsigned rd_num, u_num; - struct bb_info *bb_info; + struct df_rd_bb_info *rd_bb_info; + struct df_ru_bb_info *ru_bb_info; bitmap_iterator bi; - bb_info = DF_BB_INFO (df, g->bb); + rd_bb_info = DF_RD_BB_INFO (df, g->bb); /* Find inter-loop output and true deps by connecting downward exposed defs to the first def of the BB and to upwards exposed uses. */ - EXECUTE_IF_SET_IN_BITMAP (bb_info->rd_gen, 0, rd_num, bi) + EXECUTE_IF_SET_IN_BITMAP (rd_bb_info->gen, 0, rd_num, bi) { - struct ref *rd = df->defs[rd_num]; + struct df_ref *rd = DF_DEFS_GET (df, rd_num); add_deps_for_def (g, df, rd); } + ru_bb_info = DF_RU_BB_INFO (df, g->bb); + /* Find inter-loop anti deps. We are interested in uses of the block that appear below all defs; this implies that these uses are killed. */ - EXECUTE_IF_SET_IN_BITMAP (bb_info->ru_kill, 0, u_num, bi) + EXECUTE_IF_SET_IN_BITMAP (ru_bb_info->kill, 0, u_num, bi) { - struct ref *use = df->uses[u_num]; + struct df_ref *use = DF_USES_GET (df, u_num); /* We are interested in uses of this BB. */ if (BLOCK_FOR_INSN (use->insn) == g->bb) diff --git a/gcc/defaults.h b/gcc/defaults.h index 38dab339e34..1207b7be614 100644 --- a/gcc/defaults.h +++ b/gcc/defaults.h @@ -114,6 +114,18 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA #endif #endif +#if defined (HAVE_AS_TLS) && !defined (ASM_OUTPUT_TLS_COMMON) +#define ASM_OUTPUT_TLS_COMMON(FILE, DECL, NAME, SIZE) \ + do \ + { \ + fprintf ((FILE), "\t.tls_common\t"); \ + assemble_name ((FILE), (NAME)); \ + fprintf ((FILE), ","HOST_WIDE_INT_PRINT_UNSIGNED",%u\n", \ + (SIZE), DECL_ALIGN (DECL) / BITS_PER_UNIT); \ + } \ + while (0) +#endif + /* Decide whether to defer emitting the assembler output for an equate of two values. The default is to not defer output. */ #ifndef TARGET_DEFERRED_OUTPUT_DEFS @@ -431,6 +443,18 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA #define LONG_DOUBLE_TYPE_SIZE (BITS_PER_WORD * 2) #endif +#ifndef DECIMAL32_TYPE_SIZE +#define DECIMAL32_TYPE_SIZE 32 +#endif + +#ifndef DECIMAL64_TYPE_SIZE +#define DECIMAL64_TYPE_SIZE 64 +#endif + +#ifndef DECIMAL128_TYPE_SIZE +#define DECIMAL128_TYPE_SIZE 128 +#endif + /* Width in bits of a pointer. Mind the value of the macro `Pmode'. */ #ifndef POINTER_SIZE #define POINTER_SIZE BITS_PER_WORD @@ -696,6 +720,10 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA #define TARGET_FLT_EVAL_METHOD 0 #endif +#ifndef TARGET_DEC_EVAL_METHOD +#define TARGET_DEC_EVAL_METHOD 2 +#endif + #ifndef HOT_TEXT_SECTION_NAME #define HOT_TEXT_SECTION_NAME ".text.hot" #endif diff --git a/gcc/df-core.c b/gcc/df-core.c new file mode 100644 index 00000000000..59602dea291 --- /dev/null +++ b/gcc/df-core.c @@ -0,0 +1,1164 @@ +/* Allocation for dataflow support routines. + Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 + Free Software Foundation, Inc. + Originally contributed by Michael P. Hayes + (m.hayes@elec.canterbury.ac.nz, mhayes@redhat.com) + Major rewrite contributed by Danny Berlin (dberlin@dberlin.org) + and Kenneth Zadeck (zadeck@naturalbridge.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, 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301, USA. +*/ + +/* +OVERVIEW: + +The files in this collection (df*.c,df.h) provide a general framework +for solving dataflow problems. The global dataflow is performed using +a good implementation of iterative dataflow analysis. + +The file df-problems.c provides problem instance for the most common +dataflow problems: reaching defs, upward exposed uses, live variables, +uninitialized variables, def-use chains, and use-def chains. However, +the interface allows other dataflow problems to be defined as well. + + +USAGE: + +Here is an example of using the dataflow routines. + + struct df *df; + + df = df_init (init_flags); + + df_add_problem (df, problem); + + df_set_blocks (df, blocks); + + df_rescan_blocks (df, blocks); + + df_analyze (df); + + df_dump (df, 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. + +There are two flags that can be passed to df_init: + +DF_NO_SCAN means that no scanning of the rtl code is performed. This +is used if the problem instance is to do it's own scanning. + +DF_HARD_REGS means that the scanning is to build information about +both pseudo registers and hardware registers. Without this +information, the problems will be solved only on pseudo registers. + + + +DF_ADD_PROBLEM adds a problem, defined by an instance to struct +df_problem, to the set of problems solved in this instance of df. All +calls to add a problem for a given instance of df must occur before +the first call to DF_RESCAN_BLOCKS or DF_ANALYZE. + +For all of the problems defined in df-problems.c, there are +convienence functions named DF_*_ADD_PROBLEM. + + +Problems can be dependent on other problems. For instance, solving +def-use or use-def chains is dependant on solving reaching +definitions. As long as these dependancies are listed in the problem +definition, the order of adding the problems is not material. +Otherwise, the problems will be solved in the order of calls to +df_add_problem. Note that it is not necessary to have a problem. In +that case, df will just be used to do the scanning. + + + +DF_SET_BLOCKS is an optional call used to define a region of the +function on which the analysis will be performed. The normal case is +to analyze the entire function and no call to df_set_blocks is made. + +When a subset is given, the analysis behaves as if the function only +contains those blocks and any edges that occur directly between the +blocks in the set. Care should be taken to call df_set_blocks right +before the call to analyze in order to eliminate the possiblity that +optimizations that reorder blocks invalidate the bitvector. + + + +DF_RESCAN_BLOCKS is an optional call that causes the scanner to be + (re)run over the set of blocks passed in. If blocks is NULL, the entire +function (or all of the blocks defined in df_set_blocks) is rescanned. +If blocks contains blocks that were not defined in the call to +df_set_blocks, these blocks are added to the set of blocks. + + +DF_ANALYZE causes all of the defined problems to be (re)solved. It +does not cause blocks to be (re)scanned at the rtl level unless no +prior call is made to df_rescan_blocks. + + +DF_DUMP can then be called to dump the information produce to some +file. + + + +DF_FINISH causes all of the datastructures to be cleaned up and freed. +The df_instance is also freed and its pointer should be NULLed. + + + + +Scanning produces a `struct df_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. + +Different optimizations have different needs. Ultimately, only +register allocation and schedulers should be using the bitmaps +produced for the live register and uninitialized register problems. +The rest of the backend should be upgraded to using and maintaining +the linked information such as def use or use def chains. + + + +PHILOSOPHY: + +While incremental bitmaps are not worthwhile to maintain, incremental +chains may be perfectly reasonable. The fastest way to build chains +from scratch or after significant modifications is to build reaching +definitions (RD) and build the chains from this. + +However, general algorithms for maintaining use-def or def-use chains +are not practical. The amount of work to recompute the chain any +chain after an arbitrary change is large. However, with a modest +amount of work it is generally possible to have the application that +uses the chains keep them up to date. The high level knowledge of +what is really happening is essential to crafting efficient +incremental algorithms. + +As for the bit vector problems, there is no interface to give a set of +blocks over with to resolve the iteration. In general, restarting a +dataflow iteration is difficult and expensive. Again, the best way to +keep the dataflow infomation up to data (if this is really what is +needed) it to formulate a problem specific solution. + +There are fine grained calls for creating and deleting references from +instructions in df-scan.c. However, these are not currently connected +to the engine that resolves the dataflow equations. + + +DATA STRUCTURES: + +The basic object is a DF_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 locations that define a given register +while the insn-use lists contain all the locations that use a +register. + +Note that the reg-def and reg-use chains are generally short for +pseudos and long for the hard registers. + +ACCESSING REFS: + +There are 4 ways to obtain access to refs: + +1) References are divided into two categories, REAL and ARTIFICIAL. + + REAL refs are associated with instructions. They are linked into + either in the insn's defs list (accessed by the DF_INSN_DEFS or + DF_INSN_UID_DEFS macros) or the insn's uses list (accessed by the + DF_INSN_USES or DF_INSN_UID_USES macros). These macros produce a + ref (or NULL), the rest of the list can be obtained by traversal of + the NEXT_REF field (accessed by the DF_REF_NEXT_REF macro.) There + is no significance to the ordering of the uses or refs in an + instruction. + + ARTIFICIAL refs are associated with basic blocks. The heads of + these lists can be accessed by calling get_artificial_defs or + get_artificial_uses for the particular basic block. Artificial + defs and uses are only there if DF_HARD_REGS was specified when the + df instance was created. + + Artificial defs and uses occur at the beginning blocks that are the + destination of eh edges. The defs come from the registers + specified in EH_RETURN_DATA_REGNO and the uses come from the + registers specified in ED_USES. Logically these defs and uses + should really occur along the eh edge, but there is no convienent + way to do this. Artificial edges that occur at the beginning of + the block have the DF_REF_AT_TOP flag set. + + Artificial uses also occur at the end of all blocks. These arise + from the hard registers that are always live, such as the stack + register and are put there to keep the code from forgetting about + them. + +2) All of the uses and defs associated with each pseudo or hard + register are linked in a bidirectional chain. These are called + reg-use or reg_def chains. + + The first use (or def) for a register can be obtained using the + DF_REG_USE_GET macro (or DF_REG_DEF_GET macro). Subsequent uses + for the same regno can be obtained by following the next_reg field + of the ref. + + In previous versions of this code, these chains were ordered. It + has not been practical to continue this practice. + +3) If def-use or use-def chains are built, these can be traversed to + get to other refs. + +4) An array of all of the uses (and an array of all of the defs) can + be built. These arrays are indexed by the value in the id + structure. These arrays are only lazily kept up to date, and that + process can be expensive. To have these arrays built, call + df_reorganize_refs. Note that the values in the id field of a ref + may change across calls to df_analyze or df_reorganize refs. + + If the only use of this array is to find all of the refs, it is + better to traverse all of the registers and then traverse all of + reg-use or reg-def chains. + + + +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, or a set to a non-paradoxical SUBREG +for which the number of word_mode units covered by the outer mode is +smaller than that covered by the inner mode, invokes a read-modify-write. +operation. We generate both a use and a def and again mark them +read/write. + +Paradoxical subreg writes do not leave a trace of the old content, so they +are write-only operations. +*/ + + +#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 "output.h" +#include "alloc-pool.h" +#include "flags.h" +#include "hard-reg-set.h" +#include "basic-block.h" +#include "sbitmap.h" +#include "bitmap.h" +#include "timevar.h" +#include "df.h" +#include "tree-pass.h" + +static struct df *ddf = NULL; +struct df *shared_df = NULL; + +/*---------------------------------------------------------------------------- + Functions to create, destroy and manipulate an instance of df. +----------------------------------------------------------------------------*/ + + +/* Initialize dataflow analysis and allocate and initialize dataflow + memory. */ + +struct df * +df_init (int flags) +{ + struct df *df = xcalloc (1, sizeof (struct df)); + df->flags = flags; + + /* This is executed once per compilation to initialize platform + specific data structures. */ + df_hard_reg_init (); + + /* All df instance must define the scanning problem. */ + df_scan_add_problem (df); + ddf = df; + return df; +} + +/* Add PROBLEM to the DF instance. */ + +struct dataflow * +df_add_problem (struct df *df, struct df_problem *problem) +{ + struct dataflow *dflow; + + /* First try to add the dependent problem. */ + if (problem->dependent_problem) + df_add_problem (df, problem->dependent_problem); + + /* Check to see if this problem has already been defined. If it + has, just return that instance, if not, add it to the end of the + vector. */ + dflow = df->problems_by_index[problem->id]; + if (dflow) + return dflow; + + /* Make a new one and add it to the end. */ + dflow = xcalloc (1, sizeof (struct dataflow)); + dflow->df = df; + dflow->problem = problem; + df->problems_in_order[df->num_problems_defined++] = dflow; + df->problems_by_index[dflow->problem->id] = dflow; + + return dflow; +} + + +/* Set the blocks that are to be considered for analysis. If this is + not called or is called with null, the entire function in + analyzed. */ + +void +df_set_blocks (struct df *df, bitmap blocks) +{ + if (blocks) + { + if (!df->blocks_to_analyze) + df->blocks_to_analyze = BITMAP_ALLOC (NULL); + bitmap_copy (df->blocks_to_analyze, blocks); + } + else + { + if (df->blocks_to_analyze) + { + BITMAP_FREE (df->blocks_to_analyze); + df->blocks_to_analyze = NULL; + } + } +} + + +/* Free all the dataflow info and the DF structure. This should be + called from the df_finish macro which also NULLs the parm. */ + +void +df_finish1 (struct df *df) +{ + int i; + + for (i = 0; i < df->num_problems_defined; i++) + (*df->problems_in_order[i]->problem->free_fun) (df->problems_in_order[i]); + + free (df); +} + + +/*---------------------------------------------------------------------------- + The general data flow analysis engine. +----------------------------------------------------------------------------*/ + + +/* Hybrid search algorithm from "Implementation Techniques for + Efficient Data-Flow Analysis of Large Programs". */ + +static void +df_hybrid_search_forward (basic_block bb, + struct dataflow *dataflow, + bool single_pass) +{ + int result_changed; + int i = bb->index; + edge e; + edge_iterator ei; + + SET_BIT (dataflow->visited, bb->index); + gcc_assert (TEST_BIT (dataflow->pending, bb->index)); + RESET_BIT (dataflow->pending, i); + + /* Calculate of predecessor_outs. */ + if (EDGE_COUNT (bb->preds) > 0) + FOR_EACH_EDGE (e, ei, bb->preds) + { + if (!TEST_BIT (dataflow->considered, e->src->index)) + continue; + + (*dataflow->problem->con_fun_n) (dataflow, e); + } + else if (*dataflow->problem->con_fun_0) + (*dataflow->problem->con_fun_0) (dataflow, bb); + + result_changed = (*dataflow->problem->trans_fun) (dataflow, i); + + if (!result_changed || single_pass) + return; + + FOR_EACH_EDGE (e, ei, bb->succs) + { + if (e->dest->index == i) + continue; + if (!TEST_BIT (dataflow->considered, e->dest->index)) + continue; + SET_BIT (dataflow->pending, e->dest->index); + } + + FOR_EACH_EDGE (e, ei, bb->succs) + { + if (e->dest->index == i) + continue; + + if (!TEST_BIT (dataflow->considered, e->dest->index)) + continue; + if (!TEST_BIT (dataflow->visited, e->dest->index)) + df_hybrid_search_forward (e->dest, dataflow, single_pass); + } +} + +static void +df_hybrid_search_backward (basic_block bb, + struct dataflow *dataflow, + bool single_pass) +{ + int result_changed; + int i = bb->index; + edge e; + edge_iterator ei; + + SET_BIT (dataflow->visited, bb->index); + gcc_assert (TEST_BIT (dataflow->pending, bb->index)); + RESET_BIT (dataflow->pending, i); + + /* Calculate of predecessor_outs. */ + if (EDGE_COUNT (bb->succs) > 0) + FOR_EACH_EDGE (e, ei, bb->succs) + { + if (!TEST_BIT (dataflow->considered, e->dest->index)) + continue; + + (*dataflow->problem->con_fun_n) (dataflow, e); + } + else if (*dataflow->problem->con_fun_0) + (*dataflow->problem->con_fun_0) (dataflow, bb); + + result_changed = (*dataflow->problem->trans_fun) (dataflow, i); + + if (!result_changed || single_pass) + return; + + FOR_EACH_EDGE (e, ei, bb->preds) + { + if (e->src->index == i) + continue; + + if (!TEST_BIT (dataflow->considered, e->src->index)) + continue; + + SET_BIT (dataflow->pending, e->src->index); + } + + FOR_EACH_EDGE (e, ei, bb->preds) + { + if (e->src->index == i) + continue; + + if (!TEST_BIT (dataflow->considered, e->src->index)) + continue; + + if (!TEST_BIT (dataflow->visited, e->src->index)) + df_hybrid_search_backward (e->src, dataflow, single_pass); + } +} + + +/* This function will perform iterative bitvector dataflow described + by DATAFLOW, producing the in and out sets. Only the part of the + cfg induced by blocks in DATAFLOW->order is taken into account. + + SINGLE_PASS is true if you just want to make one pass over the + blocks. */ + +void +df_iterative_dataflow (struct dataflow *dataflow, + bitmap blocks_to_consider, bitmap blocks_to_init, + int *blocks_in_postorder, int n_blocks, + bool single_pass) +{ + unsigned int idx; + int i; + sbitmap visited = sbitmap_alloc (last_basic_block); + sbitmap pending = sbitmap_alloc (last_basic_block); + sbitmap considered = sbitmap_alloc (last_basic_block); + bitmap_iterator bi; + + dataflow->visited = visited; + dataflow->pending = pending; + dataflow->considered = considered; + + sbitmap_zero (visited); + sbitmap_zero (pending); + sbitmap_zero (considered); + + EXECUTE_IF_SET_IN_BITMAP (blocks_to_consider, 0, idx, bi) + { + SET_BIT (considered, idx); + } + + for (i = 0; i < n_blocks; i++) + { + idx = blocks_in_postorder[i]; + SET_BIT (pending, idx); + }; + + (*dataflow->problem->init_fun) (dataflow, blocks_to_init); + + while (1) + { + + /* For forward problems, you want to pass in reverse postorder + and for backward problems you want postorder. This has been + shown to be as good as you can do by several people, the + first being Mathew Hecht in his phd dissertation. + + The nodes are passed into this function in postorder. */ + + if (dataflow->problem->dir == DF_FORWARD) + { + for (i = n_blocks - 1 ; i >= 0 ; i--) + { + idx = blocks_in_postorder[i]; + + if (TEST_BIT (pending, idx) && !TEST_BIT (visited, idx)) + df_hybrid_search_forward (BASIC_BLOCK (idx), dataflow, single_pass); + } + } + else + { + for (i = 0; i < n_blocks; i++) + { + idx = blocks_in_postorder[i]; + + if (TEST_BIT (pending, idx) && !TEST_BIT (visited, idx)) + df_hybrid_search_backward (BASIC_BLOCK (idx), dataflow, single_pass); + } + } + + if (sbitmap_first_set_bit (pending) == -1) + break; + + sbitmap_zero (visited); + } + + sbitmap_free (pending); + sbitmap_free (visited); + sbitmap_free (considered); +} + + +/* Remove the entries not in BLOCKS from the LIST of length LEN, preserving + the order of the remaining entries. Returns the length of the resulting + list. */ + +static unsigned +df_prune_to_subcfg (int list[], unsigned len, bitmap blocks) +{ + unsigned act, last; + + for (act = 0, last = 0; act < len; act++) + if (bitmap_bit_p (blocks, list[act])) + list[last++] = list[act]; + + return last; +} + + +/* Execute dataflow analysis on a single dataflow problem. + + There are three sets of blocks passed in: + + BLOCKS_TO_CONSIDER are the blocks whose solution can either be + examined or will be computed. For calls from DF_ANALYZE, this is + the set of blocks that has been passed to DF_SET_BLOCKS. For calls + from DF_ANALYZE_SIMPLE_CHANGE_SOME_BLOCKS, this is the set of + blocks in the fringe (the set of blocks passed in plus the set of + immed preds and succs of those blocks). + + BLOCKS_TO_INIT are the blocks whose solution will be changed by + this iteration. For calls from DF_ANALYZE, this is the set of + blocks that has been passed to DF_SET_BLOCKS. For calls from + DF_ANALYZE_SIMPLE_CHANGE_SOME_BLOCKS, this is the set of blocks + passed in. + + BLOCKS_TO_SCAN are the set of blocks that need to be rescanned. + For calls from DF_ANALYZE, this is the accumulated set of blocks + that has been passed to DF_RESCAN_BLOCKS since the last call to + DF_ANALYZE. For calls from DF_ANALYZE_SIMPLE_CHANGE_SOME_BLOCKS, + this is the set of blocks passed in. + + blocks_to_consider blocks_to_init blocks_to_scan + full redo all all all + partial redo all all sub + small fixup fringe sub sub +*/ + +static void +df_analyze_problem (struct dataflow *dflow, + bitmap blocks_to_consider, + bitmap blocks_to_init, + bitmap blocks_to_scan, + int *postorder, int n_blocks, bool single_pass) +{ + /* (Re)Allocate the datastructures necessary to solve the problem. */ + if (*dflow->problem->alloc_fun) + (*dflow->problem->alloc_fun) (dflow, blocks_to_scan); + + /* Set up the problem and compute the local information. This + function is passed both the blocks_to_consider and the + blocks_to_scan because the RD and RU problems require the entire + function to be rescanned if they are going to be updated. */ + if (*dflow->problem->local_compute_fun) + (*dflow->problem->local_compute_fun) (dflow, blocks_to_consider, blocks_to_scan); + + /* Solve the equations. */ + if (*dflow->problem->dataflow_fun) + (*dflow->problem->dataflow_fun) (dflow, blocks_to_consider, blocks_to_init, + postorder, n_blocks, single_pass); + + /* Massage the solution. */ + if (*dflow->problem->finalize_fun) + (*dflow->problem->finalize_fun) (dflow, blocks_to_consider); +} + + +/* Analyze dataflow info for the basic blocks specified by the bitmap + BLOCKS, or for the whole CFG if BLOCKS is zero. */ + +void +df_analyze (struct df *df) +{ + int *postorder = xmalloc (sizeof (int) *last_basic_block); + bitmap current_all_blocks = BITMAP_ALLOC (NULL); + int n_blocks; + int i; + bool everything; + + n_blocks = post_order_compute (postorder, true); + + if (n_blocks != n_basic_blocks) + delete_unreachable_blocks (); + + for (i = 0; i < n_blocks; i++) + bitmap_set_bit (current_all_blocks, postorder[i]); + + /* No one called df_rescan_blocks, so do it. */ + if (!df->blocks_to_scan) + df_rescan_blocks (df, NULL); + + /* Make sure that we have pruned any unreachable blocks from these + sets. */ + bitmap_and_into (df->blocks_to_scan, current_all_blocks); + + if (df->blocks_to_analyze) + { + everything = false; + bitmap_and_into (df->blocks_to_analyze, current_all_blocks); + n_blocks = df_prune_to_subcfg (postorder, n_blocks, df->blocks_to_analyze); + BITMAP_FREE (current_all_blocks); + } + else + { + everything = true; + df->blocks_to_analyze = current_all_blocks; + current_all_blocks = NULL; + } + + /* Skip over the DF_SCAN problem. */ + for (i = 1; i < df->num_problems_defined; i++) + df_analyze_problem (df->problems_in_order[i], + df->blocks_to_analyze, df->blocks_to_analyze, + df->blocks_to_scan, + postorder, n_blocks, false); + + if (everything) + { + BITMAP_FREE (df->blocks_to_analyze); + df->blocks_to_analyze = NULL; + } + + BITMAP_FREE (df->blocks_to_scan); + df->blocks_to_scan = NULL; +} + + + +/*---------------------------------------------------------------------------- + Functions to support limited incremental change. +----------------------------------------------------------------------------*/ + + +/* Get basic block info. */ + +static void * +df_get_bb_info (struct dataflow *dflow, unsigned int index) +{ + return (struct df_scan_bb_info *) dflow->block_info[index]; +} + + +/* Set basic block info. */ + +static void +df_set_bb_info (struct dataflow *dflow, unsigned int index, + void *bb_info) +{ + dflow->block_info[index] = bb_info; +} + + +/* Called from the rtl_compact_blocks to reorganize the problems basic + block info. */ + +void +df_compact_blocks (struct df *df) +{ + int i, p; + basic_block bb; + void **problem_temps; + int size = last_basic_block *sizeof (void *); + problem_temps = xmalloc (size); + + for (p = 0; p < df->num_problems_defined; p++) + { + struct dataflow *dflow = df->problems_in_order[p]; + if (*dflow->problem->free_bb_fun) + { + df_grow_bb_info (dflow); + memcpy (problem_temps, dflow->block_info, size); + + /* Copy the bb info from the problem tmps to the proper + place in the block_info vector. Null out the copied + item. */ + i = NUM_FIXED_BLOCKS; + FOR_EACH_BB (bb) + { + df_set_bb_info (dflow, i, problem_temps[bb->index]); + problem_temps[bb->index] = NULL; + i++; + } + memset (dflow->block_info + i, 0, + (last_basic_block - i) *sizeof (void *)); + + /* Free any block infos that were not copied (and NULLed). + These are from orphaned blocks. */ + for (i = NUM_FIXED_BLOCKS; i < last_basic_block; i++) + { + if (problem_temps[i]) + (*dflow->problem->free_bb_fun) (dflow, problem_temps[i]); + } + } + } + + free (problem_temps); + + i = NUM_FIXED_BLOCKS; + FOR_EACH_BB (bb) + { + SET_BASIC_BLOCK (i, bb); + bb->index = i; + i++; + } + + gcc_assert (i == n_basic_blocks); + + for (; i < last_basic_block; i++) + SET_BASIC_BLOCK (i, NULL); +} + + +/* Shove NEW_BLOCK in at OLD_INDEX. Called from if-cvt to hack a + block. There is no excuse for people to do this kind of thing. */ + +void +df_bb_replace (struct df *df, int old_index, basic_block new_block) +{ + int p; + + for (p = 0; p < df->num_problems_defined; p++) + { + struct dataflow *dflow = df->problems_in_order[p]; + if (dflow->block_info) + { + void *temp; + + df_grow_bb_info (dflow); + + /* The old switcheroo. */ + + temp = df_get_bb_info (dflow, old_index); + df_set_bb_info (dflow, old_index, + df_get_bb_info (dflow, new_block->index)); + df_set_bb_info (dflow, new_block->index, temp); + } + } + + SET_BASIC_BLOCK (old_index, new_block); + new_block->index = old_index; +} + +/*---------------------------------------------------------------------------- + PUBLIC INTERFACES TO QUERY INFORMATION. +----------------------------------------------------------------------------*/ + + +/* Return last use of REGNO within BB. */ + +struct df_ref * +df_bb_regno_last_use_find (struct df *df, basic_block bb, unsigned int regno) +{ + rtx insn; + struct df_ref *use; + + FOR_BB_INSNS_REVERSE (bb, insn) + { + unsigned int uid = INSN_UID (insn); + for (use = DF_INSN_UID_GET (df, uid)->uses; use; use = use->next_ref) + if (DF_REF_REGNO (use) == regno) + return use; + } + return NULL; +} + + +/* Return first def of REGNO within BB. */ + +struct df_ref * +df_bb_regno_first_def_find (struct df *df, basic_block bb, unsigned int regno) +{ + rtx insn; + struct df_ref *def; + + FOR_BB_INSNS (bb, insn) + { + unsigned int uid = INSN_UID (insn); + for (def = DF_INSN_UID_GET (df, uid)->defs; def; def = def->next_ref) + if (DF_REF_REGNO (def) == regno) + return def; + } + return NULL; +} + + +/* Return last def of REGNO within BB. */ + +struct df_ref * +df_bb_regno_last_def_find (struct df *df, basic_block bb, unsigned int regno) +{ + rtx insn; + struct df_ref *def; + + FOR_BB_INSNS_REVERSE (bb, insn) + { + unsigned int uid = INSN_UID (insn); + + for (def = DF_INSN_UID_GET (df, uid)->defs; def; def = def->next_ref) + if (DF_REF_REGNO (def) == regno) + return def; + } + + return NULL; +} + +/* Return true if INSN defines REGNO. */ + +bool +df_insn_regno_def_p (struct df *df, rtx insn, unsigned int regno) +{ + unsigned int uid; + struct df_ref *def; + + uid = INSN_UID (insn); + for (def = DF_INSN_UID_GET (df, uid)->defs; def; def = def->next_ref) + if (DF_REF_REGNO (def) == regno) + return true; + + return false; +} + + +/* Finds the reference corresponding to the definition of REG in INSN. + DF is the dataflow object. */ + +struct df_ref * +df_find_def (struct df *df, rtx insn, rtx reg) +{ + unsigned int uid; + struct df_ref *def; + + if (GET_CODE (reg) == SUBREG) + reg = SUBREG_REG (reg); + gcc_assert (REG_P (reg)); + + uid = INSN_UID (insn); + for (def = DF_INSN_UID_GET (df, uid)->defs; def; def = def->next_ref) + if (rtx_equal_p (DF_REF_REAL_REG (def), reg)) + return def; + + return NULL; +} + + +/* Return true if REG is defined in INSN, zero otherwise. */ + +bool +df_reg_defined (struct df *df, rtx insn, rtx reg) +{ + return df_find_def (df, insn, reg) != NULL; +} + + +/* Finds the reference corresponding to the use of REG in INSN. + DF is the dataflow object. */ + +struct df_ref * +df_find_use (struct df *df, rtx insn, rtx reg) +{ + unsigned int uid; + struct df_ref *use; + + if (GET_CODE (reg) == SUBREG) + reg = SUBREG_REG (reg); + gcc_assert (REG_P (reg)); + + uid = INSN_UID (insn); + for (use = DF_INSN_UID_GET (df, uid)->uses; use; use = use->next_ref) + if (rtx_equal_p (DF_REF_REAL_REG (use), reg)) + return use; + + return NULL; +} + + +/* Return true if REG is referenced in INSN, zero otherwise. */ + +bool +df_reg_used (struct df *df, rtx insn, rtx reg) +{ + return df_find_use (df, insn, reg) != NULL; +} + + +/*---------------------------------------------------------------------------- + Debugging and printing functions. +----------------------------------------------------------------------------*/ + +/* Dump dataflow info. */ +void +df_dump (struct df *df, FILE *file) +{ + int i; + + if (! df || ! file) + return; + + fprintf (file, "\n\n%s\n", current_function_name ()); + fprintf (file, "\nDataflow summary:\n"); + fprintf (file, "def_info->bitmap_size = %d, use_info->bitmap_size = %d\n", + df->def_info.bitmap_size, df->use_info.bitmap_size); + + for (i = 0; i < df->num_problems_defined; i++) + (*df->problems_in_order[i]->problem->dump_fun) (df->problems_in_order[i], file); + + fprintf (file, "\n"); +} + + +void +df_refs_chain_dump (struct df *df, struct df_ref *ref, + bool follow_chain, FILE *file) +{ + fprintf (file, "{ "); + while (ref) + { + fprintf (file, "%c%d(%d) ", + DF_REF_REG_DEF_P (ref) ? 'd' : 'u', + DF_REF_ID (ref), + DF_REF_REGNO (ref)); + if (follow_chain) + df_chain_dump (df, DF_REF_CHAIN (ref), file); + ref = ref->next_ref; + } + fprintf (file, "}"); +} + + +/* Dump either a ref-def or reg-use chain. */ + +void +df_regs_chain_dump (struct df *df ATTRIBUTE_UNUSED, struct df_ref *ref, FILE *file) +{ + fprintf (file, "{ "); + while (ref) + { + fprintf (file, "%c%d(%d) ", + DF_REF_REG_DEF_P (ref) ? 'd' : 'u', + DF_REF_ID (ref), + DF_REF_REGNO (ref)); + ref = ref->next_reg; + } + fprintf (file, "}"); +} + + +void +df_insn_debug (struct df *df, rtx insn, bool follow_chain, FILE *file) +{ + unsigned int uid; + int bbi; + + uid = INSN_UID (insn); + + if (DF_INSN_UID_DEFS (df, uid)) + bbi = DF_REF_BBNO (DF_INSN_UID_DEFS (df, uid)); + else if (DF_INSN_UID_USES(df, uid)) + bbi = DF_REF_BBNO (DF_INSN_UID_USES (df, uid)); + else + bbi = -1; + + fprintf (file, "insn %d bb %d luid %d defs ", + uid, bbi, DF_INSN_LUID (df, insn)); + + df_refs_chain_dump (df, DF_INSN_UID_DEFS (df, uid), follow_chain, file); + fprintf (file, " defs "); + df_refs_chain_dump (df, DF_INSN_UID_USES (df, uid), follow_chain, 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 (DF_INSN_UID_DEFS (df, uid)) + bbi = DF_REF_BBNO (DF_INSN_UID_DEFS (df, uid)); + else if (DF_INSN_UID_USES(df, uid)) + bbi = DF_REF_BBNO (DF_INSN_UID_USES (df, uid)); + else + bbi = -1; + + fprintf (file, "insn %d bb %d luid %d defs ", + uid, bbi, DF_INSN_LUID (df, insn)); + df_regs_chain_dump (df, DF_INSN_UID_DEFS (df, uid), file); + + fprintf (file, " uses "); + df_regs_chain_dump (df, DF_INSN_UID_USES (df, uid), file); + fprintf (file, "\n"); +} + +void +df_regno_debug (struct df *df, unsigned int regno, FILE *file) +{ + fprintf (file, "reg %d defs ", regno); + df_regs_chain_dump (df, DF_REG_DEF_GET (df, regno)->reg_chain, file); + fprintf (file, " uses "); + df_regs_chain_dump (df, DF_REG_USE_GET (df, regno)->reg_chain, file); + fprintf (file, "\n"); +} + + +void +df_ref_debug (struct df *df, struct df_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_REF_INSN (ref) ? DF_INSN_LUID (df, DF_REF_INSN (ref)) : -1, + DF_REF_INSN (ref) ? INSN_UID (DF_REF_INSN (ref)) : -1); + df_chain_dump (df, DF_REF_CHAIN (ref), file); + fprintf (file, "\n"); +} + +/* Functions for debugging from GDB. */ + +void +debug_df_insn (rtx insn) +{ + df_insn_debug (ddf, insn, true, 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 df_ref *ref) +{ + df_ref_debug (ddf, ref, stderr); +} + + +void +debug_df_defno (unsigned int defno) +{ + df_ref_debug (ddf, DF_DEFS_GET (ddf, defno), stderr); +} + + +void +debug_df_useno (unsigned int defno) +{ + df_ref_debug (ddf, DF_USES_GET (ddf, defno), stderr); +} + + +void +debug_df_chain (struct df_link *link) +{ + df_chain_dump (ddf, link, stderr); + fputc ('\n', stderr); +} diff --git a/gcc/df-problems.c b/gcc/df-problems.c new file mode 100644 index 00000000000..c17e048edad --- /dev/null +++ b/gcc/df-problems.c @@ -0,0 +1,3093 @@ +/* Standard problems for dataflow support routines. + Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 + Free Software Foundation, Inc. + Originally contributed by Michael P. Hayes + (m.hayes@elec.canterbury.ac.nz, mhayes@redhat.com) + Major rewrite contributed by Danny Berlin (dberlin@dberlin.org) + and Kenneth Zadeck (zadeck@naturalbridge.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, 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301, USA. */ + +#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 "output.h" +#include "alloc-pool.h" +#include "flags.h" +#include "hard-reg-set.h" +#include "basic-block.h" +#include "sbitmap.h" +#include "bitmap.h" +#include "timevar.h" +#include "df.h" + +#define DF_SPARSE_THRESHOLD 32 + +static bitmap seen_in_block = NULL; +static bitmap seen_in_insn = NULL; + + +/*---------------------------------------------------------------------------- + Public functions access functions for the dataflow problems. +----------------------------------------------------------------------------*/ + +/* Get the instance of the problem that DFLOW is dependent on. */ + +struct dataflow * +df_get_dependent_problem (struct dataflow *dflow) +{ + struct df *df = dflow->df; + struct df_problem *dependent_problem = dflow->problem->dependent_problem; + + gcc_assert (dependent_problem); + return df->problems_by_index[dependent_problem->id]; +} + + +/* Create a du or ud chain from SRC to DST and link it into SRC. */ + +struct df_link * +df_chain_create (struct dataflow *dflow, struct df_ref *src, struct df_ref *dst) +{ + struct df_link *head = DF_REF_CHAIN (src); + struct df_link *link = pool_alloc (dflow->block_pool);; + + DF_REF_CHAIN (src) = link; + link->next = head; + link->ref = dst; + return link; +} + + +/* Delete a du or ud chain for REF. If LINK is NULL, delete all + chains for ref and check to see if the reverse chains can also be + deleted. If LINK is not NULL it must be a link off of ref. In + this case, the other end is not deleted. */ + +void +df_chain_unlink (struct dataflow *dflow, struct df_ref *ref, struct df_link *link) +{ + struct df_link *chain = DF_REF_CHAIN (ref); + if (link) + { + /* Link was the first element in the chain. */ + if (chain == link) + DF_REF_CHAIN (ref) = link->next; + else + { + /* Link is an internal element in the chain. */ + struct df_link *prev = chain; + while (chain) + { + if (chain == link) + { + prev->next = chain->next; + break; + } + prev = chain; + chain = chain->next; + } + } + pool_free (dflow->block_pool, link); + } + else + { + /* If chain is NULL here, it was because of a recursive call + when the other flavor of chains was not built. Just run thru + the entire chain calling the other side and then deleting the + link. */ + while (chain) + { + struct df_link *next = chain->next; + /* Delete the other side if it exists. */ + df_chain_unlink (dflow, chain->ref, chain); + chain = next; + } + } +} + + +/* Copy the du or ud chain starting at FROM_REF and attach it to + TO_REF. */ + +void +df_chain_copy (struct dataflow *dflow, + struct df_ref *to_ref, + struct df_link *from_ref) +{ + while (from_ref) + { + df_chain_create (dflow, to_ref, from_ref->ref); + from_ref = from_ref->next; + } +} + + +/* Get the live in set for BB no matter what problem happens to be + defined. */ + +bitmap +df_get_live_in (struct df *df, basic_block bb) +{ + gcc_assert (df->problems_by_index[DF_LR]); + + if (df->problems_by_index[DF_UREC]) + return DF_RA_LIVE_IN (df, bb); + else if (df->problems_by_index[DF_UR]) + return DF_LIVE_IN (df, bb); + else + return DF_UPWARD_LIVE_IN (df, bb); +} + + +/* Get the live out set for BB no matter what problem happens to be + defined. */ + +bitmap +df_get_live_out (struct df *df, basic_block bb) +{ + gcc_assert (df->problems_by_index[DF_LR]); + + if (df->problems_by_index[DF_UREC]) + return DF_RA_LIVE_OUT (df, bb); + else if (df->problems_by_index[DF_UR]) + return DF_LIVE_OUT (df, bb); + else + return DF_UPWARD_LIVE_OUT (df, bb); +} + + +/*---------------------------------------------------------------------------- + Utility functions. +----------------------------------------------------------------------------*/ + +/* Generic versions to get the void* version of the block info. Only + used inside the problem instace vectors. */ + +/* Grow the bb_info array. */ + +void +df_grow_bb_info (struct dataflow *dflow) +{ + unsigned int new_size = last_basic_block + 1; + if (dflow->block_info_size < new_size) + { + new_size += new_size / 4; + dflow->block_info = xrealloc (dflow->block_info, + new_size *sizeof (void*)); + memset (dflow->block_info + dflow->block_info_size, 0, + (new_size - dflow->block_info_size) *sizeof (void *)); + dflow->block_info_size = new_size; + } +} + +/* Dump a def-use or use-def chain for REF to FILE. */ + +void +df_chain_dump (struct df *df ATTRIBUTE_UNUSED, struct df_link *link, FILE *file) +{ + fprintf (file, "{ "); + for (; link; link = link->next) + { + fprintf (file, "%c%d(bb %d insn %d) ", + DF_REF_REG_DEF_P (link->ref) ? 'd' : 'u', + DF_REF_ID (link->ref), + DF_REF_BBNO (link->ref), + DF_REF_INSN (link->ref) ? DF_REF_INSN_UID (link->ref) : -1); + } + fprintf (file, "}"); +} + + +/* Print some basic block info as part of df_dump. */ + +void +df_print_bb_index (basic_block bb, FILE *file) +{ + edge e; + edge_iterator ei; + + fprintf (file, "( "); + FOR_EACH_EDGE (e, ei, bb->preds) + { + basic_block pred = e->src; + fprintf (file, "%d ", pred->index); + } + fprintf (file, ")->[%d]->( ", bb->index); + FOR_EACH_EDGE (e, ei, bb->succs) + { + basic_block succ = e->dest; + fprintf (file, "%d ", succ->index); + } + fprintf (file, ")\n"); +} + + +/* Return the set of reference ids in CHAIN, caching the result in *BMAP. */ + +static inline bitmap +df_ref_bitmap (bitmap *maps, unsigned int regno, int start, int count) +{ + bitmap ids = maps[regno]; + if (!ids) + { + unsigned int i; + unsigned int end = start + count;; + ids = BITMAP_ALLOC (NULL); + maps[regno] = ids; + for (i = start; i < end; i++) + bitmap_set_bit (ids, i); + } + return ids; +} + + +/* Make sure that the seen_in_insn and seen_in_block sbitmaps are set + up correctly. */ + +static void +df_set_seen (void) +{ + seen_in_block = BITMAP_ALLOC (NULL); + seen_in_insn = BITMAP_ALLOC (NULL); +} + + +static void +df_unset_seen (void) +{ + BITMAP_FREE (seen_in_block); + BITMAP_FREE (seen_in_insn); +} + + + +/*---------------------------------------------------------------------------- + REACHING USES + + Find the locations in the function where each use site for a pseudo + can reach backwards. + +----------------------------------------------------------------------------*/ + +struct df_ru_problem_data +{ + bitmap *use_sites; /* Bitmap of uses for each pseudo. */ + unsigned int use_sites_size; /* Size of use_sites. */ + /* The set of defs to regs invalidated by call. */ + bitmap sparse_invalidated_by_call; + /* The set of defs to regs invalidate by call for ru. */ + bitmap dense_invalidated_by_call; +}; + +/* Get basic block info. */ + +struct df_ru_bb_info * +df_ru_get_bb_info (struct dataflow *dflow, unsigned int index) +{ + return (struct df_ru_bb_info *) dflow->block_info[index]; +} + + +/* Set basic block info. */ + +static void +df_ru_set_bb_info (struct dataflow *dflow, unsigned int index, + struct df_ru_bb_info *bb_info) +{ + dflow->block_info[index] = bb_info; +} + + +/* Free basic block info. */ + +static void +df_ru_free_bb_info (struct dataflow *dflow, void *vbb_info) +{ + struct df_ru_bb_info *bb_info = (struct df_ru_bb_info *) vbb_info; + if (bb_info) + { + BITMAP_FREE (bb_info->kill); + BITMAP_FREE (bb_info->sparse_kill); + BITMAP_FREE (bb_info->gen); + BITMAP_FREE (bb_info->in); + BITMAP_FREE (bb_info->out); + pool_free (dflow->block_pool, bb_info); + } +} + + +/* Allocate or reset bitmaps for DFLOW blocks. The solution bits are + not touched unless the block is new. */ + +static void +df_ru_alloc (struct dataflow *dflow, bitmap blocks_to_rescan) +{ + unsigned int bb_index; + bitmap_iterator bi; + unsigned int reg_size = max_reg_num (); + + if (! dflow->block_pool) + dflow->block_pool = create_alloc_pool ("df_ru_block pool", + sizeof (struct df_ru_bb_info), 50); + + if (dflow->problem_data) + { + unsigned int i; + struct df_ru_problem_data *problem_data = + (struct df_ru_problem_data *) dflow->problem_data; + + for (i = 0; i < problem_data->use_sites_size; i++) + { + bitmap bm = problem_data->use_sites[i]; + if (bm) + { + BITMAP_FREE (bm); + problem_data->use_sites[i] = NULL; + } + } + + if (problem_data->use_sites_size > reg_size) + { + problem_data->use_sites + = xrealloc (problem_data->use_sites, reg_size *sizeof (bitmap)); + memset (problem_data->use_sites, 0, + (reg_size - problem_data->use_sites_size) *sizeof (bitmap)); + problem_data->use_sites_size = reg_size; + } + + bitmap_clear (problem_data->sparse_invalidated_by_call); + bitmap_clear (problem_data->dense_invalidated_by_call); + } + else + { + struct df_ru_problem_data *problem_data = + xmalloc (sizeof (struct df_ru_problem_data)); + dflow->problem_data = problem_data; + + problem_data->use_sites = xcalloc (reg_size, sizeof (bitmap)); + problem_data->use_sites_size = reg_size; + problem_data->sparse_invalidated_by_call = BITMAP_ALLOC (NULL); + problem_data->dense_invalidated_by_call = BITMAP_ALLOC (NULL); + } + + df_grow_bb_info (dflow); + + /* Because of the clustering of all def sites for the same pseudo, + we have to process all of the blocks before doing the + analysis. */ + + EXECUTE_IF_SET_IN_BITMAP (blocks_to_rescan, 0, bb_index, bi) + { + struct df_ru_bb_info *bb_info = df_ru_get_bb_info (dflow, bb_index); + if (bb_info) + { + bitmap_clear (bb_info->kill); + bitmap_clear (bb_info->sparse_kill); + bitmap_clear (bb_info->gen); + } + else + { + bb_info = (struct df_ru_bb_info *) pool_alloc (dflow->block_pool); + df_ru_set_bb_info (dflow, bb_index, bb_info); + bb_info->kill = BITMAP_ALLOC (NULL); + bb_info->sparse_kill = BITMAP_ALLOC (NULL); + bb_info->gen = BITMAP_ALLOC (NULL); + bb_info->in = BITMAP_ALLOC (NULL); + bb_info->out = BITMAP_ALLOC (NULL); + } + } +} + + +/* Process a list of DEFs for df_ru_bb_local_compute. */ + +static void +df_ru_bb_local_compute_process_def (struct dataflow *dflow, + struct df_ru_bb_info *bb_info, + struct df_ref *def) +{ + struct df *df = dflow->df; + while (def) + { + unsigned int regno = DF_REF_REGNO (def); + unsigned int begin = DF_REG_USE_GET (df, regno)->begin; + unsigned int n_uses = DF_REG_USE_GET (df, regno)->n_refs; + if (!bitmap_bit_p (seen_in_block, regno)) + { + /* The first def for regno, causes the kill info to be + generated and the gen information to cleared. */ + if (!bitmap_bit_p (seen_in_insn, regno)) + { + if (n_uses > DF_SPARSE_THRESHOLD) + { + bitmap_set_bit (bb_info->sparse_kill, regno); + bitmap_clear_range (bb_info->gen, begin, n_uses); + } + else + { + struct df_ru_problem_data *problem_data = + (struct df_ru_problem_data *) dflow->problem_data; + bitmap uses = + df_ref_bitmap (problem_data->use_sites, regno, + begin, n_uses); + bitmap_ior_into (bb_info->kill, uses); + bitmap_and_compl_into (bb_info->gen, uses); + } + } + bitmap_set_bit (seen_in_insn, regno); + } + def = def->next_ref; + } +} + + +/* Process a list of USEs for df_ru_bb_local_compute. */ + +static void +df_ru_bb_local_compute_process_use (struct df_ru_bb_info *bb_info, + struct df_ref *use, + enum df_ref_flags top_flag) +{ + while (use) + { + if (top_flag == (DF_REF_FLAGS (use) & DF_REF_AT_TOP)) + { + /* Add use to set of gens in this BB unless we have seen a + def in a previous instruction. */ + unsigned int regno = DF_REF_REGNO (use); + if (!bitmap_bit_p (seen_in_block, regno)) + bitmap_set_bit (bb_info->gen, DF_REF_ID (use)); + } + use = use->next_ref; + } +} + +/* Compute local reaching use (upward exposed use) info for basic + block BB. USE_INFO->REGS[R] caches the set of uses for register R. */ +static void +df_ru_bb_local_compute (struct dataflow *dflow, unsigned int bb_index) +{ + struct df *df = dflow->df; + basic_block bb = BASIC_BLOCK (bb_index); + struct df_ru_bb_info *bb_info = df_ru_get_bb_info (dflow, bb_index); + rtx insn; + + /* Set when a def for regno is seen. */ + bitmap_clear (seen_in_block); + bitmap_clear (seen_in_insn); + +#ifdef EH_USES + /* Variables defined in the prolog that are used by the exception + handler. */ + df_ru_bb_local_compute_process_use (bb_info, + df_get_artificial_uses (df, bb_index), + DF_REF_AT_TOP); +#endif + + /* Process the artificial defs first since these are at the top of + the block. */ + df_ru_bb_local_compute_process_def (dflow, bb_info, + df_get_artificial_defs (df, bb_index)); + + FOR_BB_INSNS (bb, insn) + { + unsigned int uid = INSN_UID (insn); + if (! INSN_P (insn)) + continue; + + df_ru_bb_local_compute_process_def (dflow, bb_info, + DF_INSN_UID_GET (df, uid)->defs); + + /* The use processing must happen after the defs processing even + though the uses logically happen first since the defs clear + the gen set. Otherwise, a use for regno occuring in the same + instruction as a def for regno would be cleared. */ + df_ru_bb_local_compute_process_use (bb_info, + DF_INSN_UID_GET (df, uid)->uses, 0); + + bitmap_ior_into (seen_in_block, seen_in_insn); + bitmap_clear (seen_in_insn); + } + + /* Process the hardware registers that are always live. */ + df_ru_bb_local_compute_process_use (bb_info, + df_get_artificial_uses (df, bb_index), 0); +} + + +/* Compute local reaching use (upward exposed use) info for each basic + block within BLOCKS. */ +static void +df_ru_local_compute (struct dataflow *dflow, + bitmap all_blocks, + bitmap rescan_blocks ATTRIBUTE_UNUSED) +{ + struct df *df = dflow->df; + unsigned int bb_index; + bitmap_iterator bi; + unsigned int regno; + struct df_ru_problem_data *problem_data = + (struct df_ru_problem_data *) dflow->problem_data; + bitmap sparse_invalidated = problem_data->sparse_invalidated_by_call; + bitmap dense_invalidated = problem_data->dense_invalidated_by_call; + + df_set_seen (); + + if (!df->use_info.refs_organized) + df_reorganize_refs (&df->use_info); + + EXECUTE_IF_SET_IN_BITMAP (all_blocks, 0, bb_index, bi) + { + df_ru_bb_local_compute (dflow, bb_index); + } + + /* Set up the knockout bit vectors to be applied across EH_EDGES. */ + EXECUTE_IF_SET_IN_BITMAP (df_invalidated_by_call, 0, regno, bi) + { + struct df_reg_info *reg_info = DF_REG_USE_GET (df, regno); + if (reg_info->n_refs > DF_SPARSE_THRESHOLD) + bitmap_set_bit (sparse_invalidated, regno); + else + { + bitmap defs = df_ref_bitmap (problem_data->use_sites, regno, + reg_info->begin, reg_info->n_refs); + bitmap_ior_into (dense_invalidated, defs); + } + } + + df_unset_seen (); +} + + +/* Initialize the solution bit vectors for problem. */ + +static void +df_ru_init_solution (struct dataflow *dflow, bitmap all_blocks) +{ + unsigned int bb_index; + bitmap_iterator bi; + + EXECUTE_IF_SET_IN_BITMAP (all_blocks, 0, bb_index, bi) + { + struct df_ru_bb_info *bb_info = df_ru_get_bb_info (dflow, bb_index); + bitmap_copy (bb_info->in, bb_info->gen); + bitmap_clear (bb_info->out); + } +} + + +/* Out of target gets or of in of source. */ + +static void +df_ru_confluence_n (struct dataflow *dflow, edge e) +{ + bitmap op1 = df_ru_get_bb_info (dflow, e->src->index)->out; + bitmap op2 = df_ru_get_bb_info (dflow, e->dest->index)->in; + + if (e->flags & EDGE_EH) + { + struct df_ru_problem_data *problem_data = + (struct df_ru_problem_data *) dflow->problem_data; + bitmap sparse_invalidated = problem_data->sparse_invalidated_by_call; + bitmap dense_invalidated = problem_data->dense_invalidated_by_call; + struct df *df = dflow->df; + bitmap_iterator bi; + unsigned int regno; + bitmap_ior_and_compl_into (op1, op2, dense_invalidated); + EXECUTE_IF_SET_IN_BITMAP (sparse_invalidated, 0, regno, bi) + { + bitmap_clear_range (op1, + DF_REG_USE_GET (df, regno)->begin, + DF_REG_USE_GET (df, regno)->n_refs); + } + } + else + bitmap_ior_into (op1, op2); +} + + +/* Transfer function. */ + +static bool +df_ru_transfer_function (struct dataflow *dflow, int bb_index) +{ + struct df_ru_bb_info *bb_info = df_ru_get_bb_info (dflow, bb_index); + unsigned int regno; + bitmap_iterator bi; + bitmap in = bb_info->in; + bitmap out = bb_info->out; + bitmap gen = bb_info->gen; + bitmap kill = bb_info->kill; + bitmap sparse_kill = bb_info->sparse_kill; + + if (bitmap_empty_p (sparse_kill)) + return bitmap_ior_and_compl (in, gen, out, kill); + else + { + struct df *df = dflow->df; + bool changed = false; + bitmap tmp = BITMAP_ALLOC (NULL); + bitmap_copy (tmp, in); + EXECUTE_IF_SET_IN_BITMAP (sparse_kill, 0, regno, bi) + { + bitmap_clear_range (tmp, + DF_REG_USE_GET (df, regno)->begin, + DF_REG_USE_GET (df, regno)->n_refs); + } + bitmap_and_compl_into (tmp, kill); + bitmap_ior_into (tmp, gen); + changed = !bitmap_equal_p (tmp, out); + if (changed) + { + BITMAP_FREE (out); + bb_info->in = tmp; + } + else + BITMAP_FREE (tmp); + return changed; + } +} + + +/* Free all storage associated with the problem. */ + +static void +df_ru_free (struct dataflow *dflow) +{ + unsigned int i; + struct df_ru_problem_data *problem_data = + (struct df_ru_problem_data *) dflow->problem_data; + + for (i = 0; i < dflow->block_info_size; i++) + { + struct df_ru_bb_info *bb_info = df_ru_get_bb_info (dflow, i); + if (bb_info) + { + BITMAP_FREE (bb_info->kill); + BITMAP_FREE (bb_info->sparse_kill); + BITMAP_FREE (bb_info->gen); + BITMAP_FREE (bb_info->in); + BITMAP_FREE (bb_info->out); + } + } + + free_alloc_pool (dflow->block_pool); + + for (i = 0; i < problem_data->use_sites_size; i++) + { + bitmap bm = problem_data->use_sites[i]; + if (bm) + BITMAP_FREE (bm); + } + + free (problem_data->use_sites); + BITMAP_FREE (problem_data->sparse_invalidated_by_call); + BITMAP_FREE (problem_data->dense_invalidated_by_call); + + dflow->block_info_size = 0; + free (dflow->block_info); + free (dflow->problem_data); + free (dflow); +} + + +/* Debugging info. */ + +static void +df_ru_dump (struct dataflow *dflow, FILE *file) +{ + basic_block bb; + struct df *df = dflow->df; + struct df_ru_problem_data *problem_data = + (struct df_ru_problem_data *) dflow->problem_data; + unsigned int m = max_reg_num (); + unsigned int regno; + + fprintf (file, "Reaching uses:\n"); + + fprintf (file, " sparse invalidated \t"); + dump_bitmap (file, problem_data->sparse_invalidated_by_call); + fprintf (file, " dense invalidated \t"); + dump_bitmap (file, problem_data->dense_invalidated_by_call); + + for (regno = 0; regno < m; regno++) + if (DF_REG_USE_GET (df, regno)->n_refs) + fprintf (file, "%d[%d,%d] ", regno, + DF_REG_USE_GET (df, regno)->begin, + DF_REG_USE_GET (df, regno)->n_refs); + fprintf (file, "\n"); + + FOR_ALL_BB (bb) + { + struct df_ru_bb_info *bb_info = df_ru_get_bb_info (dflow, bb->index); + df_print_bb_index (bb, file); + + if (! bb_info->in) + continue; + + fprintf (file, " in \t"); + dump_bitmap (file, bb_info->in); + fprintf (file, " gen \t"); + dump_bitmap (file, bb_info->gen); + fprintf (file, " kill\t"); + dump_bitmap (file, bb_info->kill); + fprintf (file, " out \t"); + dump_bitmap (file, bb_info->out); + } +} + +/* All of the information associated with every instance of the problem. */ + +static struct df_problem problem_RU = +{ + DF_RU, /* Problem id. */ + DF_BACKWARD, /* Direction. */ + df_ru_alloc, /* Allocate the problem specific data. */ + df_ru_free_bb_info, /* Free basic block info. */ + df_ru_local_compute, /* Local compute function. */ + df_ru_init_solution, /* Init the solution specific data. */ + df_iterative_dataflow, /* Iterative solver. */ + NULL, /* Confluence operator 0. */ + df_ru_confluence_n, /* Confluence operator n. */ + df_ru_transfer_function, /* Transfer function. */ + NULL, /* Finalize function. */ + df_ru_free, /* Free all of the problem information. */ + df_ru_dump, /* Debugging. */ + NULL /* Dependent problem. */ +}; + + + +/* Create a new DATAFLOW instance and add it to an existing instance + of DF. The returned structure is what is used to get at the + solution. */ + +struct dataflow * +df_ru_add_problem (struct df *df) +{ + return df_add_problem (df, &problem_RU); +} + + +/*---------------------------------------------------------------------------- + REACHING DEFINITIONS + + Find the locations in the function where each definition site for a + pseudo reaches. +----------------------------------------------------------------------------*/ + +struct df_rd_problem_data +{ + bitmap *def_sites; /* Bitmap of defs for each pseudo. */ + unsigned int def_sites_size; /* Size of def_sites. */ + /* The set of defs to regs invalidated by call. */ + bitmap sparse_invalidated_by_call; + /* The set of defs to regs invalidate by call for ru. */ + bitmap dense_invalidated_by_call; +}; + +/* Get basic block info. */ + +struct df_rd_bb_info * +df_rd_get_bb_info (struct dataflow *dflow, unsigned int index) +{ + return (struct df_rd_bb_info *) dflow->block_info[index]; +} + + +/* Set basic block info. */ + +static void +df_rd_set_bb_info (struct dataflow *dflow, unsigned int index, + struct df_rd_bb_info *bb_info) +{ + dflow->block_info[index] = bb_info; +} + + +/* Free basic block info. */ + +static void +df_rd_free_bb_info (struct dataflow *dflow, void *vbb_info) +{ + struct df_rd_bb_info *bb_info = (struct df_rd_bb_info *) vbb_info; + if (bb_info) + { + BITMAP_FREE (bb_info->kill); + BITMAP_FREE (bb_info->sparse_kill); + BITMAP_FREE (bb_info->gen); + BITMAP_FREE (bb_info->in); + BITMAP_FREE (bb_info->out); + pool_free (dflow->block_pool, bb_info); + } +} + + +/* Allocate or reset bitmaps for DFLOW blocks. The solution bits are + not touched unless the block is new. */ + +static void +df_rd_alloc (struct dataflow *dflow, bitmap blocks_to_rescan) +{ + unsigned int bb_index; + bitmap_iterator bi; + unsigned int reg_size = max_reg_num (); + + if (! dflow->block_pool) + dflow->block_pool = create_alloc_pool ("df_rd_block pool", + sizeof (struct df_rd_bb_info), 50); + + if (dflow->problem_data) + { + unsigned int i; + struct df_rd_problem_data *problem_data = + (struct df_rd_problem_data *) dflow->problem_data; + + for (i = 0; i < problem_data->def_sites_size; i++) + { + bitmap bm = problem_data->def_sites[i]; + if (bm) + { + BITMAP_FREE (bm); + problem_data->def_sites[i] = NULL; + } + } + + if (problem_data->def_sites_size > reg_size) + { + problem_data->def_sites + = xrealloc (problem_data->def_sites, reg_size *sizeof (bitmap)); + memset (problem_data->def_sites, 0, + (reg_size - problem_data->def_sites_size) *sizeof (bitmap)); + problem_data->def_sites_size = reg_size; + } + + bitmap_clear (problem_data->sparse_invalidated_by_call); + bitmap_clear (problem_data->dense_invalidated_by_call); + } + else + { + struct df_rd_problem_data *problem_data = + xmalloc (sizeof (struct df_rd_problem_data)); + dflow->problem_data = problem_data; + + problem_data->def_sites = xcalloc (reg_size, sizeof (bitmap)); + problem_data->def_sites_size = reg_size; + problem_data->sparse_invalidated_by_call = BITMAP_ALLOC (NULL); + problem_data->dense_invalidated_by_call = BITMAP_ALLOC (NULL); + } + + df_grow_bb_info (dflow); + + /* Because of the clustering of all def sites for the same pseudo, + we have to process all of the blocks before doing the + analysis. */ + + EXECUTE_IF_SET_IN_BITMAP (blocks_to_rescan, 0, bb_index, bi) + { + struct df_rd_bb_info *bb_info = df_rd_get_bb_info (dflow, bb_index); + if (bb_info) + { + bitmap_clear (bb_info->kill); + bitmap_clear (bb_info->sparse_kill); + bitmap_clear (bb_info->gen); + } + else + { + bb_info = (struct df_rd_bb_info *) pool_alloc (dflow->block_pool); + df_rd_set_bb_info (dflow, bb_index, bb_info); + bb_info->kill = BITMAP_ALLOC (NULL); + bb_info->sparse_kill = BITMAP_ALLOC (NULL); + bb_info->gen = BITMAP_ALLOC (NULL); + bb_info->in = BITMAP_ALLOC (NULL); + bb_info->out = BITMAP_ALLOC (NULL); + } + } +} + + +/* Process a list of DEFs for df_rd_bb_local_compute. */ + +static void +df_rd_bb_local_compute_process_def (struct dataflow *dflow, + struct df_rd_bb_info *bb_info, + struct df_ref *def) +{ + struct df *df = dflow->df; + while (def) + { + unsigned int regno = DF_REF_REGNO (def); + unsigned int begin = DF_REG_DEF_GET (df, regno)->begin; + unsigned int n_defs = DF_REG_DEF_GET (df, regno)->n_refs; + + /* Only the last def(s) for a regno in the block has any + effect. */ + if (!bitmap_bit_p (seen_in_block, regno)) + { + /* The first def for regno in insn gets to knock out the + defs from other instructions. */ + if (!bitmap_bit_p (seen_in_insn, regno)) + { + if (n_defs > DF_SPARSE_THRESHOLD) + { + bitmap_set_bit (bb_info->sparse_kill, regno); + bitmap_clear_range (bb_info->gen, begin, n_defs); + } + else + { + struct df_rd_problem_data *problem_data = + (struct df_rd_problem_data *) dflow->problem_data; + bitmap defs = + df_ref_bitmap (problem_data->def_sites, regno, + begin, n_defs); + bitmap_ior_into (bb_info->kill, defs); + bitmap_and_compl_into (bb_info->gen, defs); + } + } + + bitmap_set_bit (seen_in_insn, regno); + /* All defs for regno in the instruction may be put into + the gen set. */ + if (! (DF_REF_FLAGS (def) & DF_REF_CLOBBER)) + bitmap_set_bit (bb_info->gen, DF_REF_ID (def)); + } + def = def->next_ref; + } +} + +/* Compute local reaching def info for basic block BB. */ + +static void +df_rd_bb_local_compute (struct dataflow *dflow, unsigned int bb_index) +{ + struct df *df = dflow->df; + basic_block bb = BASIC_BLOCK (bb_index); + struct df_rd_bb_info *bb_info = df_rd_get_bb_info (dflow, bb_index); + rtx insn; + + bitmap_clear (seen_in_block); + bitmap_clear (seen_in_insn); + + FOR_BB_INSNS_REVERSE (bb, insn) + { + unsigned int uid = INSN_UID (insn); + + if (! INSN_P (insn)) + continue; + + df_rd_bb_local_compute_process_def (dflow, bb_info, + DF_INSN_UID_GET (df, uid)->defs); + + /* This complex dance with the two bitmaps is required because + instructions can assign twice to the same pseudo. This + generally happens with calls that will have one def for the + result and another def for the clobber. If only one vector + is used and the clobber goes first, the result will be + lost. */ + bitmap_ior_into (seen_in_block, seen_in_insn); + bitmap_clear (seen_in_insn); + } + + /* Process the artificial defs last since we are going backwards + thur the block and these are logically at the start. */ + df_rd_bb_local_compute_process_def (dflow, bb_info, + df_get_artificial_defs (df, bb_index)); +} + + +/* Compute local reaching def info for each basic block within BLOCKS. */ + +static void +df_rd_local_compute (struct dataflow *dflow, + bitmap all_blocks, + bitmap rescan_blocks ATTRIBUTE_UNUSED) +{ + struct df *df = dflow->df; + unsigned int bb_index; + bitmap_iterator bi; + unsigned int regno; + struct df_rd_problem_data *problem_data = + (struct df_rd_problem_data *) dflow->problem_data; + bitmap sparse_invalidated = problem_data->sparse_invalidated_by_call; + bitmap dense_invalidated = problem_data->dense_invalidated_by_call; + + df_set_seen (); + + if (!df->def_info.refs_organized) + df_reorganize_refs (&df->def_info); + + EXECUTE_IF_SET_IN_BITMAP (all_blocks, 0, bb_index, bi) + { + df_rd_bb_local_compute (dflow, bb_index); + } + + /* Set up the knockout bit vectors to be applied across EH_EDGES. */ + EXECUTE_IF_SET_IN_BITMAP (df_invalidated_by_call, 0, regno, bi) + { + struct df_reg_info *reg_info = DF_REG_DEF_GET (df, regno); + if (reg_info->n_refs > DF_SPARSE_THRESHOLD) + { + bitmap_set_bit (sparse_invalidated, regno); + } + else + { + bitmap defs = df_ref_bitmap (problem_data->def_sites, regno, + reg_info->begin, reg_info->n_refs); + bitmap_ior_into (dense_invalidated, defs); + } + } + df_unset_seen (); +} + + +/* Initialize the solution bit vectors for problem. */ + +static void +df_rd_init_solution (struct dataflow *dflow, bitmap all_blocks) +{ + unsigned int bb_index; + bitmap_iterator bi; + + EXECUTE_IF_SET_IN_BITMAP (all_blocks, 0, bb_index, bi) + { + struct df_rd_bb_info *bb_info = df_rd_get_bb_info (dflow, bb_index); + + bitmap_copy (bb_info->out, bb_info->gen); + bitmap_clear (bb_info->in); + } +} + +/* In of target gets or of out of source. */ + +static void +df_rd_confluence_n (struct dataflow *dflow, edge e) +{ + bitmap op1 = df_rd_get_bb_info (dflow, e->dest->index)->in; + bitmap op2 = df_rd_get_bb_info (dflow, e->src->index)->out; + + if (e->flags & EDGE_EH) + { + struct df_rd_problem_data *problem_data = + (struct df_rd_problem_data *) dflow->problem_data; + bitmap sparse_invalidated = problem_data->sparse_invalidated_by_call; + bitmap dense_invalidated = problem_data->dense_invalidated_by_call; + struct df *df = dflow->df; + bitmap_iterator bi; + unsigned int regno; + bitmap_ior_and_compl_into (op1, op2, dense_invalidated); + EXECUTE_IF_SET_IN_BITMAP (sparse_invalidated, 0, regno, bi) + { + bitmap_clear_range (op1, + DF_REG_DEF_GET (df, regno)->begin, + DF_REG_DEF_GET (df, regno)->n_refs); + } + } + else + bitmap_ior_into (op1, op2); +} + + +/* Transfer function. */ + +static bool +df_rd_transfer_function (struct dataflow *dflow, int bb_index) +{ + struct df_rd_bb_info *bb_info = df_rd_get_bb_info (dflow, bb_index); + unsigned int regno; + bitmap_iterator bi; + bitmap in = bb_info->in; + bitmap out = bb_info->out; + bitmap gen = bb_info->gen; + bitmap kill = bb_info->kill; + bitmap sparse_kill = bb_info->sparse_kill; + + if (bitmap_empty_p (sparse_kill)) + return bitmap_ior_and_compl (out, gen, in, kill); + else + { + struct df *df = dflow->df; + bool changed = false; + bitmap tmp = BITMAP_ALLOC (NULL); + bitmap_copy (tmp, in); + EXECUTE_IF_SET_IN_BITMAP (sparse_kill, 0, regno, bi) + { + bitmap_clear_range (tmp, + DF_REG_DEF_GET (df, regno)->begin, + DF_REG_DEF_GET (df, regno)->n_refs); + } + bitmap_and_compl_into (tmp, kill); + bitmap_ior_into (tmp, gen); + changed = !bitmap_equal_p (tmp, out); + if (changed) + { + BITMAP_FREE (out); + bb_info->out = tmp; + } + else + BITMAP_FREE (tmp); + return changed; + } +} + + +/* Free all storage associated with the problem. */ + +static void +df_rd_free (struct dataflow *dflow) +{ + unsigned int i; + struct df_rd_problem_data *problem_data = + (struct df_rd_problem_data *) dflow->problem_data; + + for (i = 0; i < dflow->block_info_size; i++) + { + struct df_rd_bb_info *bb_info = df_rd_get_bb_info (dflow, i); + if (bb_info) + { + BITMAP_FREE (bb_info->kill); + BITMAP_FREE (bb_info->sparse_kill); + BITMAP_FREE (bb_info->gen); + BITMAP_FREE (bb_info->in); + BITMAP_FREE (bb_info->out); + } + } + + free_alloc_pool (dflow->block_pool); + + for (i = 0; i < problem_data->def_sites_size; i++) + { + bitmap bm = problem_data->def_sites[i]; + if (bm) + BITMAP_FREE (bm); + } + + free (problem_data->def_sites); + BITMAP_FREE (problem_data->sparse_invalidated_by_call); + BITMAP_FREE (problem_data->dense_invalidated_by_call); + + dflow->block_info_size = 0; + free (dflow->block_info); + free (dflow->problem_data); + free (dflow); +} + + +/* Debugging info. */ + +static void +df_rd_dump (struct dataflow *dflow, FILE *file) +{ + struct df *df = dflow->df; + basic_block bb; + struct df_rd_problem_data *problem_data = + (struct df_rd_problem_data *) dflow->problem_data; + unsigned int m = max_reg_num (); + unsigned int regno; + + fprintf (file, "Reaching defs:\n\n"); + + fprintf (file, " sparse invalidated \t"); + dump_bitmap (file, problem_data->sparse_invalidated_by_call); + fprintf (file, " dense invalidated \t"); + dump_bitmap (file, problem_data->dense_invalidated_by_call); + + for (regno = 0; regno < m; regno++) + if (DF_REG_DEF_GET (df, regno)->n_refs) + fprintf (file, "%d[%d,%d] ", regno, + DF_REG_DEF_GET (df, regno)->begin, + DF_REG_DEF_GET (df, regno)->n_refs); + fprintf (file, "\n"); + + FOR_ALL_BB (bb) + { + struct df_rd_bb_info *bb_info = df_rd_get_bb_info (dflow, bb->index); + df_print_bb_index (bb, file); + + if (! bb_info->in) + continue; + + fprintf (file, " in\t(%d)\n", (int) bitmap_count_bits (bb_info->in)); + dump_bitmap (file, bb_info->in); + fprintf (file, " gen \t(%d)\n", (int) bitmap_count_bits (bb_info->gen)); + dump_bitmap (file, bb_info->gen); + fprintf (file, " kill\t(%d)\n", (int) bitmap_count_bits (bb_info->kill)); + dump_bitmap (file, bb_info->kill); + fprintf (file, " out\t(%d)\n", (int) bitmap_count_bits (bb_info->out)); + dump_bitmap (file, bb_info->out); + } +} + +/* All of the information associated with every instance of the problem. */ + +static struct df_problem problem_RD = +{ + DF_RD, /* Problem id. */ + DF_FORWARD, /* Direction. */ + df_rd_alloc, /* Allocate the problem specific data. */ + df_rd_free_bb_info, /* Free basic block info. */ + df_rd_local_compute, /* Local compute function. */ + df_rd_init_solution, /* Init the solution specific data. */ + df_iterative_dataflow, /* Iterative solver. */ + NULL, /* Confluence operator 0. */ + df_rd_confluence_n, /* Confluence operator n. */ + df_rd_transfer_function, /* Transfer function. */ + NULL, /* Finalize function. */ + df_rd_free, /* Free all of the problem information. */ + df_rd_dump, /* Debugging. */ + NULL /* Dependent problem. */ +}; + + + +/* Create a new DATAFLOW instance and add it to an existing instance + of DF. The returned structure is what is used to get at the + solution. */ + +struct dataflow * +df_rd_add_problem (struct df *df) +{ + return df_add_problem (df, &problem_RD); +} + + + +/*---------------------------------------------------------------------------- + LIVE REGISTERS + + Find the locations in the function where any use of a pseudo can reach + in the backwards direction. +----------------------------------------------------------------------------*/ + +/* Get basic block info. */ + +struct df_lr_bb_info * +df_lr_get_bb_info (struct dataflow *dflow, unsigned int index) +{ + return (struct df_lr_bb_info *) dflow->block_info[index]; +} + + +/* Set basic block info. */ + +static void +df_lr_set_bb_info (struct dataflow *dflow, unsigned int index, + struct df_lr_bb_info *bb_info) +{ + dflow->block_info[index] = bb_info; +} + + +/* Free basic block info. */ + +static void +df_lr_free_bb_info (struct dataflow *dflow, void *vbb_info) +{ + struct df_lr_bb_info *bb_info = (struct df_lr_bb_info *) vbb_info; + if (bb_info) + { + BITMAP_FREE (bb_info->use); + BITMAP_FREE (bb_info->def); + BITMAP_FREE (bb_info->in); + BITMAP_FREE (bb_info->out); + pool_free (dflow->block_pool, bb_info); + } +} + + +/* Allocate or reset bitmaps for DFLOW blocks. The solution bits are + not touched unless the block is new. */ + +static void +df_lr_alloc (struct dataflow *dflow, bitmap blocks_to_rescan) +{ + unsigned int bb_index; + bitmap_iterator bi; + + if (! dflow->block_pool) + dflow->block_pool = create_alloc_pool ("df_lr_block pool", + sizeof (struct df_lr_bb_info), 50); + + df_grow_bb_info (dflow); + + /* Because of the clustering of all def sites for the same pseudo, + we have to process all of the blocks before doing the + analysis. */ + + EXECUTE_IF_SET_IN_BITMAP (blocks_to_rescan, 0, bb_index, bi) + { + struct df_lr_bb_info *bb_info = df_lr_get_bb_info (dflow, bb_index); + if (bb_info) + { + bitmap_clear (bb_info->def); + bitmap_clear (bb_info->use); + } + else + { + bb_info = (struct df_lr_bb_info *) pool_alloc (dflow->block_pool); + df_lr_set_bb_info (dflow, bb_index, bb_info); + bb_info->use = BITMAP_ALLOC (NULL); + bb_info->def = BITMAP_ALLOC (NULL); + bb_info->in = BITMAP_ALLOC (NULL); + bb_info->out = BITMAP_ALLOC (NULL); + } + } +} + + +/* Compute local live register info for basic block BB. */ + +static void +df_lr_bb_local_compute (struct dataflow *dflow, + struct df *df, unsigned int bb_index) +{ + basic_block bb = BASIC_BLOCK (bb_index); + struct df_lr_bb_info *bb_info = df_lr_get_bb_info (dflow, bb_index); + rtx insn; + struct df_ref *def; + struct df_ref *use; + + /* Process the hardware registers that are always live. */ + for (use = df_get_artificial_uses (df, bb_index); use; use = use->next_ref) + /* Add use to set of uses in this BB. */ + if ((DF_REF_FLAGS (use) & DF_REF_AT_TOP) == 0) + bitmap_set_bit (bb_info->use, DF_REF_REGNO (use)); + + FOR_BB_INSNS_REVERSE (bb, insn) + { + unsigned int uid = INSN_UID (insn); + + if (! INSN_P (insn)) + continue; + + if (CALL_P (insn)) + { + for (def = DF_INSN_UID_GET (df, uid)->defs; def; def = def->next_ref) + { + unsigned int dregno = DF_REF_REGNO (def); + + if (dregno >= FIRST_PSEUDO_REGISTER + || !(SIBLING_CALL_P (insn) + && bitmap_bit_p (df->exit_block_uses, dregno) + && !refers_to_regno_p (dregno, dregno+1, + current_function_return_rtx, + (rtx *)0))) + { + /* Add def to set of defs in this BB. */ + bitmap_set_bit (bb_info->def, dregno); + bitmap_clear_bit (bb_info->use, dregno); + } + } + } + else + { + for (def = DF_INSN_UID_GET (df, uid)->defs; def; def = def->next_ref) + { + unsigned int dregno = DF_REF_REGNO (def); + + if (DF_INSN_CONTAINS_ASM (df, insn) + && dregno < FIRST_PSEUDO_REGISTER) + { + unsigned int i; + unsigned int end = + dregno + hard_regno_nregs[dregno][GET_MODE (DF_REF_REG (def))] - 1; + for (i = dregno; i <= end; ++i) + regs_asm_clobbered[i] = 1; + } + /* Add def to set of defs in this BB. */ + bitmap_set_bit (bb_info->def, dregno); + bitmap_clear_bit (bb_info->use, dregno); + } + } + + for (use = DF_INSN_UID_GET (df, uid)->uses; use; use = use->next_ref) + /* Add use to set of uses in this BB. */ + bitmap_set_bit (bb_info->use, DF_REF_REGNO (use)); + } + + /* Process the registers set in an exception handler. */ + for (def = df_get_artificial_defs (df, bb_index); def; def = def->next_ref) + { + unsigned int dregno = DF_REF_REGNO (def); + bitmap_set_bit (bb_info->def, dregno); + bitmap_clear_bit (bb_info->use, dregno); + } + +#ifdef EH_USES + /* Process the uses that are live into an exception handler. */ + for (use = df_get_artificial_uses (df, bb_index); use; use = use->next_ref) + /* Add use to set of uses in this BB. */ + if (DF_REF_FLAGS (use) & DF_REF_AT_TOP) + bitmap_set_bit (bb_info->use, DF_REF_REGNO (use)); +#endif +} + +/* Compute local live register info for each basic block within BLOCKS. */ + +static void +df_lr_local_compute (struct dataflow *dflow, + bitmap all_blocks, + bitmap rescan_blocks) +{ + struct df *df = dflow->df; + unsigned int bb_index; + bitmap_iterator bi; + + /* Assume that the stack pointer is unchanging if alloca hasn't + been used. */ + if (bitmap_equal_p (all_blocks, rescan_blocks)) + memset (regs_asm_clobbered, 0, sizeof (regs_asm_clobbered)); + + bitmap_clear (df->hardware_regs_used); + + /* The all-important stack pointer must always be live. */ + bitmap_set_bit (df->hardware_regs_used, STACK_POINTER_REGNUM); + + /* Before reload, there are a few registers that must be forced + live everywhere -- which might not already be the case for + blocks within infinite loops. */ + if (! reload_completed) + { + /* Any reference to any pseudo before reload is a potential + reference of the frame pointer. */ + bitmap_set_bit (df->hardware_regs_used, FRAME_POINTER_REGNUM); + +#if FRAME_POINTER_REGNUM != ARG_POINTER_REGNUM + /* Pseudos with argument area equivalences may require + reloading via the argument pointer. */ + if (fixed_regs[ARG_POINTER_REGNUM]) + bitmap_set_bit (df->hardware_regs_used, ARG_POINTER_REGNUM); +#endif + + /* Any constant, or pseudo with constant equivalences, may + require reloading from memory using the pic register. */ + if ((unsigned) PIC_OFFSET_TABLE_REGNUM != INVALID_REGNUM + && fixed_regs[PIC_OFFSET_TABLE_REGNUM]) + bitmap_set_bit (df->hardware_regs_used, PIC_OFFSET_TABLE_REGNUM); + } + + if (bitmap_bit_p (rescan_blocks, EXIT_BLOCK)) + { + /* The exit block is special for this problem and its bits are + computed from thin air. */ + struct df_lr_bb_info *bb_info = df_lr_get_bb_info (dflow, EXIT_BLOCK); + bitmap_copy (bb_info->use, df->exit_block_uses); + } + + EXECUTE_IF_SET_IN_BITMAP (rescan_blocks, 0, bb_index, bi) + { + if (bb_index == EXIT_BLOCK) + continue; + df_lr_bb_local_compute (dflow, df, bb_index); + } +} + + +/* Initialize the solution vectors. */ + +static void +df_lr_init (struct dataflow *dflow, bitmap all_blocks) +{ + unsigned int bb_index; + bitmap_iterator bi; + + EXECUTE_IF_SET_IN_BITMAP (all_blocks, 0, bb_index, bi) + { + struct df_lr_bb_info *bb_info = df_lr_get_bb_info (dflow, bb_index); + bitmap_copy (bb_info->in, bb_info->use); + bitmap_clear (bb_info->out); + } +} + + +/* Confluence function that processes infinite loops. This might be a + noreturn function that throws. And even if it isn't, getting the + unwind info right helps debugging. */ +static void +df_lr_confluence_0 (struct dataflow *dflow, basic_block bb) +{ + struct df *df = dflow->df; + + bitmap op1 = df_lr_get_bb_info (dflow, bb->index)->out; + if (bb != EXIT_BLOCK_PTR) + bitmap_copy (op1, df->hardware_regs_used); +} + + +/* Confluence function that ignores fake edges. */ +static void +df_lr_confluence_n (struct dataflow *dflow, edge e) +{ + bitmap op1 = df_lr_get_bb_info (dflow, e->src->index)->out; + bitmap op2 = df_lr_get_bb_info (dflow, e->dest->index)->in; + + /* Call-clobbered registers die across exception and call edges. */ + /* ??? Abnormal call edges ignored for the moment, as this gets + confused by sibling call edges, which crashes reg-stack. */ + if (e->flags & EDGE_EH) + bitmap_ior_and_compl_into (op1, op2, df_invalidated_by_call); + else + bitmap_ior_into (op1, op2); + + bitmap_ior_into (op1, dflow->df->hardware_regs_used); +} + + +/* Transfer function. */ +static bool +df_lr_transfer_function (struct dataflow *dflow, int bb_index) +{ + struct df_lr_bb_info *bb_info = df_lr_get_bb_info (dflow, bb_index); + bitmap in = bb_info->in; + bitmap out = bb_info->out; + bitmap use = bb_info->use; + bitmap def = bb_info->def; + + return bitmap_ior_and_compl (in, use, out, def); +} + + +/* Free all storage associated with the problem. */ + +static void +df_lr_free (struct dataflow *dflow) +{ + unsigned int i; + for (i = 0; i < dflow->block_info_size; i++) + { + struct df_lr_bb_info *bb_info = df_lr_get_bb_info (dflow, i); + if (bb_info) + { + BITMAP_FREE (bb_info->use); + BITMAP_FREE (bb_info->def); + BITMAP_FREE (bb_info->in); + BITMAP_FREE (bb_info->out); + } + } + free_alloc_pool (dflow->block_pool); + + dflow->block_info_size = 0; + free (dflow->block_info); + free (dflow); +} + + +/* Debugging info. */ + +static void +df_lr_dump (struct dataflow *dflow, FILE *file) +{ + basic_block bb; + + fprintf (file, "Live Registers:\n"); + FOR_ALL_BB (bb) + { + struct df_lr_bb_info *bb_info = df_lr_get_bb_info (dflow, bb->index); + df_print_bb_index (bb, file); + + if (!bb_info->in) + continue; + + fprintf (file, " in \t"); + dump_bitmap (file, bb_info->in); + fprintf (file, " use \t"); + dump_bitmap (file, bb_info->use); + fprintf (file, " def \t"); + dump_bitmap (file, bb_info->def); + fprintf (file, " out \t"); + dump_bitmap (file, bb_info->out); + } +} + +/* All of the information associated with every instance of the problem. */ + +static struct df_problem problem_LR = +{ + DF_LR, /* Problem id. */ + DF_BACKWARD, /* Direction. */ + df_lr_alloc, /* Allocate the problem specific data. */ + df_lr_free_bb_info, /* Free basic block info. */ + df_lr_local_compute, /* Local compute function. */ + df_lr_init, /* Init the solution specific data. */ + df_iterative_dataflow, /* Iterative solver. */ + df_lr_confluence_0, /* Confluence operator 0. */ + df_lr_confluence_n, /* Confluence operator n. */ + df_lr_transfer_function, /* Transfer function. */ + NULL, /* Finalize function. */ + df_lr_free, /* Free all of the problem information. */ + df_lr_dump, /* Debugging. */ + NULL /* Dependent problem. */ +}; + + +/* Create a new DATAFLOW instance and add it to an existing instance + of DF. The returned structure is what is used to get at the + solution. */ + +struct dataflow * +df_lr_add_problem (struct df *df) +{ + return df_add_problem (df, &problem_LR); +} + + + +/*---------------------------------------------------------------------------- + UNINITIALIZED REGISTERS + + Find the set of uses for registers that are reachable from the entry + block without passing thru a definition. +----------------------------------------------------------------------------*/ + +/* Get basic block info. */ + +struct df_ur_bb_info * +df_ur_get_bb_info (struct dataflow *dflow, unsigned int index) +{ + return (struct df_ur_bb_info *) dflow->block_info[index]; +} + + +/* Set basic block info. */ + +static void +df_ur_set_bb_info (struct dataflow *dflow, unsigned int index, + struct df_ur_bb_info *bb_info) +{ + dflow->block_info[index] = bb_info; +} + + +/* Free basic block info. */ + +static void +df_ur_free_bb_info (struct dataflow *dflow, void *vbb_info) +{ + struct df_ur_bb_info *bb_info = (struct df_ur_bb_info *) vbb_info; + if (bb_info) + { + BITMAP_FREE (bb_info->gen); + BITMAP_FREE (bb_info->kill); + BITMAP_FREE (bb_info->in); + BITMAP_FREE (bb_info->out); + pool_free (dflow->block_pool, bb_info); + } +} + + +/* Allocate or reset bitmaps for DFLOW blocks. The solution bits are + not touched unless the block is new. */ + +static void +df_ur_alloc (struct dataflow *dflow, bitmap blocks_to_rescan) +{ + unsigned int bb_index; + bitmap_iterator bi; + + if (! dflow->block_pool) + dflow->block_pool = create_alloc_pool ("df_ur_block pool", + sizeof (struct df_ur_bb_info), 100); + + df_grow_bb_info (dflow); + + /* Because of the clustering of all def sites for the same pseudo, + we have to process all of the blocks before doing the + analysis. */ + + EXECUTE_IF_SET_IN_BITMAP (blocks_to_rescan, 0, bb_index, bi) + { + struct df_ur_bb_info *bb_info = df_ur_get_bb_info (dflow, bb_index); + if (bb_info) + { + bitmap_clear (bb_info->kill); + bitmap_clear (bb_info->gen); + } + else + { + bb_info = (struct df_ur_bb_info *) pool_alloc (dflow->block_pool); + df_ur_set_bb_info (dflow, bb_index, bb_info); + bb_info->kill = BITMAP_ALLOC (NULL); + bb_info->gen = BITMAP_ALLOC (NULL); + bb_info->in = BITMAP_ALLOC (NULL); + bb_info->out = BITMAP_ALLOC (NULL); + } + } +} + + +/* Compute local uninitialized register info for basic block BB. */ + +static void +df_ur_bb_local_compute (struct dataflow *dflow, unsigned int bb_index) +{ + struct df *df = dflow->df; + basic_block bb = BASIC_BLOCK (bb_index); + struct df_ur_bb_info *bb_info = df_ur_get_bb_info (dflow, bb_index); + rtx insn; + struct df_ref *def; + + bitmap_clear (seen_in_block); + bitmap_clear (seen_in_insn); + + FOR_BB_INSNS_REVERSE (bb, insn) + { + unsigned int uid = INSN_UID (insn); + if (!INSN_P (insn)) + continue; + + for (def = DF_INSN_UID_GET (df, uid)->defs; def; def = def->next_ref) + { + unsigned int regno = DF_REF_REGNO (def); + /* Only the last def counts. */ + if (!bitmap_bit_p (seen_in_block, regno)) + { + bitmap_set_bit (seen_in_insn, regno); + + if (DF_REF_FLAGS (def) & DF_REF_CLOBBER) + bitmap_set_bit (bb_info->kill, regno); + else + bitmap_set_bit (bb_info->gen, regno); + } + } + bitmap_ior_into (seen_in_block, seen_in_insn); + bitmap_clear (seen_in_insn); + } + + for (def = df_get_artificial_defs (df, bb_index); def; def = def->next_ref) + { + unsigned int regno = DF_REF_REGNO (def); + if (!bitmap_bit_p (seen_in_block, regno)) + { + bitmap_set_bit (seen_in_block, regno); + bitmap_set_bit (bb_info->gen, regno); + } + } +} + + +/* Compute local uninitialized register info. */ + +static void +df_ur_local_compute (struct dataflow *dflow, + bitmap all_blocks ATTRIBUTE_UNUSED, + bitmap rescan_blocks) +{ + unsigned int bb_index; + bitmap_iterator bi; + + df_set_seen (); + + EXECUTE_IF_SET_IN_BITMAP (rescan_blocks, 0, bb_index, bi) + { + df_ur_bb_local_compute (dflow, bb_index); + } + + df_unset_seen (); +} + + +/* Initialize the solution vectors. */ + +static void +df_ur_init (struct dataflow *dflow, bitmap all_blocks) +{ + unsigned int bb_index; + bitmap_iterator bi; + + EXECUTE_IF_SET_IN_BITMAP (all_blocks, 0, bb_index, bi) + { + struct df_ur_bb_info *bb_info = df_ur_get_bb_info (dflow, bb_index); + + bitmap_copy (bb_info->out, bb_info->gen); + bitmap_clear (bb_info->in); + } +} + + +/* Or in the stack regs, hard regs and early clobber regs into the the + ur_in sets of all of the blocks. */ + +static void +df_ur_local_finalize (struct dataflow *dflow, bitmap all_blocks) +{ + struct df *df = dflow->df; + struct dataflow *lr_dflow = df->problems_by_index[DF_LR]; + bitmap tmp = BITMAP_ALLOC (NULL); + bitmap_iterator bi; + unsigned int bb_index; + + EXECUTE_IF_SET_IN_BITMAP (all_blocks, 0, bb_index, bi) + { + struct df_ur_bb_info *bb_info = df_ur_get_bb_info (dflow, bb_index); + struct df_lr_bb_info *bb_lr_info = df_lr_get_bb_info (lr_dflow, bb_index); + + bitmap_ior_into (bb_info->in, df_all_hard_regs); + bitmap_ior_into (bb_info->out, df_all_hard_regs); + + /* No register may reach a location where it is not used. Thus + we trim the rr result to the places where it is used. */ + bitmap_and_into (bb_info->in, bb_lr_info->in); + bitmap_and_into (bb_info->out, bb_lr_info->out); + +#if 1 + /* Hard registers may still stick in the ur_out set, but not + be in the ur_in set, if their only mention was in a call + in this block. This is because a call kills in the lr + problem but does not kill in the ur problem. To clean + this up, we execute the transfer function on the lr_in + set and then use that to knock bits out of ur_out. */ + bitmap_ior_and_compl (tmp, bb_info->gen, bb_lr_info->in, + bb_info->kill); + bitmap_and_into (bb_info->out, tmp); +#endif + } + + BITMAP_FREE (tmp); +} + + +/* Confluence function that ignores fake edges. */ + +static void +df_ur_confluence_n (struct dataflow *dflow, edge e) +{ + bitmap op1 = df_ur_get_bb_info (dflow, e->dest->index)->in; + bitmap op2 = df_ur_get_bb_info (dflow, e->src->index)->out; + + if (e->flags & EDGE_FAKE) + return; + + bitmap_ior_into (op1, op2); +} + + +/* Transfer function. */ + +static bool +df_ur_transfer_function (struct dataflow *dflow, int bb_index) +{ + struct df_ur_bb_info *bb_info = df_ur_get_bb_info (dflow, bb_index); + bitmap in = bb_info->in; + bitmap out = bb_info->out; + bitmap gen = bb_info->gen; + bitmap kill = bb_info->kill; + + return bitmap_ior_and_compl (out, gen, in, kill); +} + + +/* Free all storage associated with the problem. */ + +static void +df_ur_free (struct dataflow *dflow) +{ + unsigned int i; + + for (i = 0; i < dflow->block_info_size; i++) + { + struct df_ur_bb_info *bb_info = df_ur_get_bb_info (dflow, i); + if (bb_info) + { + BITMAP_FREE (bb_info->gen); + BITMAP_FREE (bb_info->kill); + BITMAP_FREE (bb_info->in); + BITMAP_FREE (bb_info->out); + } + } + + free_alloc_pool (dflow->block_pool); + dflow->block_info_size = 0; + free (dflow->block_info); + free (dflow); +} + + +/* Debugging info. */ + +static void +df_ur_dump (struct dataflow *dflow, FILE *file) +{ + basic_block bb; + + fprintf (file, "Undefined regs:\n"); + + FOR_ALL_BB (bb) + { + struct df_ur_bb_info *bb_info = df_ur_get_bb_info (dflow, bb->index); + df_print_bb_index (bb, file); + + if (! bb_info->in) + continue; + + fprintf (file, " in \t"); + dump_bitmap (file, bb_info->in); + fprintf (file, " gen \t"); + dump_bitmap (file, bb_info->gen); + fprintf (file, " kill\t"); + dump_bitmap (file, bb_info->kill); + fprintf (file, " out \t"); + dump_bitmap (file, bb_info->out); + } +} + +/* All of the information associated with every instance of the problem. */ + +static struct df_problem problem_UR = +{ + DF_UR, /* Problem id. */ + DF_FORWARD, /* Direction. */ + df_ur_alloc, /* Allocate the problem specific data. */ + df_ur_free_bb_info, /* Free basic block info. */ + df_ur_local_compute, /* Local compute function. */ + df_ur_init, /* Init the solution specific data. */ + df_iterative_dataflow, /* Iterative solver. */ + NULL, /* Confluence operator 0. */ + df_ur_confluence_n, /* Confluence operator n. */ + df_ur_transfer_function, /* Transfer function. */ + df_ur_local_finalize, /* Finalize function. */ + df_ur_free, /* Free all of the problem information. */ + df_ur_dump, /* Debugging. */ + &problem_LR /* Dependent problem. */ +}; + + +/* Create a new DATAFLOW instance and add it to an existing instance + of DF. The returned structure is what is used to get at the + solution. */ + +struct dataflow * +df_ur_add_problem (struct df *df) +{ + return df_add_problem (df, &problem_UR); +} + + + +/*---------------------------------------------------------------------------- + UNINITIALIZED REGISTERS WITH EARLYCLOBBER + + Find the set of uses for registers that are reachable from the entry + block without passing thru a definition. + + This is a variant of the UR problem above that has a lot of special + features just for the register allocation phase. +----------------------------------------------------------------------------*/ + +struct df_urec_problem_data +{ + bool earlyclobbers_found; /* True if any instruction contains an + earlyclobber. */ +#ifdef STACK_REGS + bitmap stack_regs; /* Registers that may be allocated to a STACK_REGS. */ +#endif +}; + + +/* Get basic block info. */ + +struct df_urec_bb_info * +df_urec_get_bb_info (struct dataflow *dflow, unsigned int index) +{ + return (struct df_urec_bb_info *) dflow->block_info[index]; +} + + +/* Set basic block info. */ + +static void +df_urec_set_bb_info (struct dataflow *dflow, unsigned int index, + struct df_urec_bb_info *bb_info) +{ + dflow->block_info[index] = bb_info; +} + + +/* Free basic block info. */ + +static void +df_urec_free_bb_info (struct dataflow *dflow, void *vbb_info) +{ + struct df_urec_bb_info *bb_info = (struct df_urec_bb_info *) vbb_info; + if (bb_info) + { + BITMAP_FREE (bb_info->gen); + BITMAP_FREE (bb_info->kill); + BITMAP_FREE (bb_info->in); + BITMAP_FREE (bb_info->out); + BITMAP_FREE (bb_info->earlyclobber); + pool_free (dflow->block_pool, bb_info); + } +} + + +/* Allocate or reset bitmaps for DFLOW blocks. The solution bits are + not touched unless the block is new. */ + +static void +df_urec_alloc (struct dataflow *dflow, bitmap blocks_to_rescan) +{ + unsigned int bb_index; + bitmap_iterator bi; + struct df_urec_problem_data *problem_data = + (struct df_urec_problem_data *) dflow->problem_data; + + if (! dflow->block_pool) + dflow->block_pool = create_alloc_pool ("df_urec_block pool", + sizeof (struct df_urec_bb_info), 50); + + if (!dflow->problem_data) + { + problem_data = xmalloc (sizeof (struct df_urec_problem_data)); + dflow->problem_data = problem_data; + } + problem_data->earlyclobbers_found = false; + + df_grow_bb_info (dflow); + + /* Because of the clustering of all def sites for the same pseudo, + we have to process all of the blocks before doing the + analysis. */ + + EXECUTE_IF_SET_IN_BITMAP (blocks_to_rescan, 0, bb_index, bi) + { + struct df_urec_bb_info *bb_info = df_urec_get_bb_info (dflow, bb_index); + if (bb_info) + { + bitmap_clear (bb_info->kill); + bitmap_clear (bb_info->gen); + bitmap_clear (bb_info->earlyclobber); + } + else + { + bb_info = (struct df_urec_bb_info *) pool_alloc (dflow->block_pool); + df_urec_set_bb_info (dflow, bb_index, bb_info); + bb_info->kill = BITMAP_ALLOC (NULL); + bb_info->gen = BITMAP_ALLOC (NULL); + bb_info->in = BITMAP_ALLOC (NULL); + bb_info->out = BITMAP_ALLOC (NULL); + bb_info->earlyclobber = BITMAP_ALLOC (NULL); + } + } +} + + +/* The function modifies local info for register REG being changed in + SETTER. DATA is used to pass the current basic block info. */ + +static void +df_urec_mark_reg_change (rtx reg, rtx setter, void *data) +{ + int regno; + int endregno; + int i; + struct df_urec_bb_info *bb_info = (struct df_urec_bb_info*) data; + + if (GET_CODE (reg) == SUBREG) + reg = SUBREG_REG (reg); + + if (!REG_P (reg)) + return; + + + endregno = regno = REGNO (reg); + if (regno < FIRST_PSEUDO_REGISTER) + { + endregno +=hard_regno_nregs[regno][GET_MODE (reg)]; + + for (i = regno; i < endregno; i++) + { + bitmap_set_bit (bb_info->kill, i); + + if (GET_CODE (setter) != CLOBBER) + bitmap_set_bit (bb_info->gen, i); + else + bitmap_clear_bit (bb_info->gen, i); + } + } + else + { + bitmap_set_bit (bb_info->kill, regno); + + if (GET_CODE (setter) != CLOBBER) + bitmap_set_bit (bb_info->gen, regno); + else + bitmap_clear_bit (bb_info->gen, regno); + } +} +/* Classes of registers which could be early clobbered in the current + insn. */ + +DEF_VEC_I(int); +DEF_VEC_ALLOC_I(int,heap); + +static VEC(int,heap) *earlyclobber_regclass; + +/* This function finds and stores register classes that could be early + clobbered in INSN. If any earlyclobber classes are found, the function + returns TRUE, in all other cases it returns FALSE. */ + +static bool +df_urec_check_earlyclobber (rtx insn) +{ + int opno; + bool found = false; + + extract_insn (insn); + + VEC_truncate (int, earlyclobber_regclass, 0); + for (opno = 0; opno < recog_data.n_operands; opno++) + { + char c; + bool amp_p; + int i; + enum reg_class class; + const char *p = recog_data.constraints[opno]; + + class = NO_REGS; + amp_p = false; + for (;;) + { + c = *p; + switch (c) + { + case '=': case '+': case '?': + case '#': case '!': + case '*': case '%': + case 'm': case '<': case '>': case 'V': case 'o': + case 'E': case 'F': case 'G': case 'H': + case 's': case 'i': case 'n': + case 'I': case 'J': case 'K': case 'L': + case 'M': case 'N': case 'O': case 'P': + case 'X': + case '0': case '1': case '2': case '3': case '4': + case '5': case '6': case '7': case '8': case '9': + /* These don't say anything we care about. */ + break; + + case '&': + amp_p = true; + break; + case '\0': + case ',': + if (amp_p && class != NO_REGS) + { + int rc; + + found = true; + for (i = 0; + VEC_iterate (int, earlyclobber_regclass, i, rc); + i++) + { + if (rc == (int) class) + goto found_rc; + } + + /* We use VEC_quick_push here because + earlyclobber_regclass holds no more than + N_REG_CLASSES elements. */ + VEC_quick_push (int, earlyclobber_regclass, (int) class); + found_rc: + ; + } + + amp_p = false; + class = NO_REGS; + break; + + case 'r': + class = GENERAL_REGS; + break; + + default: + class = REG_CLASS_FROM_CONSTRAINT (c, p); + break; + } + if (c == '\0') + break; + p += CONSTRAINT_LEN (c, p); + } + } + + return found; +} + +/* The function checks that pseudo-register *X has a class + intersecting with the class of pseudo-register could be early + clobbered in the same insn. + + This function is a no-op if earlyclobber_regclass is empty. + + Reload can assign the same hard register to uninitialized + pseudo-register and early clobbered pseudo-register in an insn if + the pseudo-register is used first time in given BB and not lived at + the BB start. To prevent this we don't change life information for + such pseudo-registers. */ + +static int +df_urec_mark_reg_use_for_earlyclobber (rtx *x, void *data) +{ + enum reg_class pref_class, alt_class; + int i, regno; + struct df_urec_bb_info *bb_info = (struct df_urec_bb_info*) data; + + if (REG_P (*x) && REGNO (*x) >= FIRST_PSEUDO_REGISTER) + { + int rc; + + regno = REGNO (*x); + if (bitmap_bit_p (bb_info->kill, regno) + || bitmap_bit_p (bb_info->gen, regno)) + return 0; + pref_class = reg_preferred_class (regno); + alt_class = reg_alternate_class (regno); + for (i = 0; VEC_iterate (int, earlyclobber_regclass, i, rc); i++) + { + if (reg_classes_intersect_p (rc, pref_class) + || (rc != NO_REGS + && reg_classes_intersect_p (rc, alt_class))) + { + bitmap_set_bit (bb_info->earlyclobber, regno); + break; + } + } + } + return 0; +} + +/* The function processes all pseudo-registers in *X with the aid of + previous function. */ + +static void +df_urec_mark_reg_use_for_earlyclobber_1 (rtx *x, void *data) +{ + for_each_rtx (x, df_urec_mark_reg_use_for_earlyclobber, data); +} + + +/* Compute local uninitialized register info for basic block BB. */ + +static void +df_urec_bb_local_compute (struct dataflow *dflow, unsigned int bb_index) +{ + struct df *df = dflow->df; + basic_block bb = BASIC_BLOCK (bb_index); + struct df_urec_bb_info *bb_info = df_urec_get_bb_info (dflow, bb_index); + rtx insn; + struct df_ref *def; + + for (def = df_get_artificial_defs (df, bb_index); def; def = def->next_ref) + { + unsigned int regno = DF_REF_REGNO (def); + bitmap_set_bit (bb_info->gen, regno); + } + + FOR_BB_INSNS (bb, insn) + { + if (INSN_P (insn)) + { + note_stores (PATTERN (insn), df_urec_mark_reg_change, bb_info); + if (df_state & (DF_SCAN_GLOBAL | DF_SCAN_POST_ALLOC) + && df_urec_check_earlyclobber (insn)) + { + struct df_urec_problem_data *problem_data = + (struct df_urec_problem_data *) dflow->problem_data; + problem_data->earlyclobbers_found = true; + note_uses (&PATTERN (insn), + df_urec_mark_reg_use_for_earlyclobber_1, bb_info); + } + } + } +} + + +/* Compute local uninitialized register info. */ + +static void +df_urec_local_compute (struct dataflow *dflow, + bitmap all_blocks ATTRIBUTE_UNUSED, + bitmap rescan_blocks) +{ + unsigned int bb_index; + bitmap_iterator bi; +#ifdef STACK_REGS + int i; + HARD_REG_SET zero, stack_hard_regs, used; + struct df_urec_problem_data *problem_data = + (struct df_urec_problem_data *) dflow->problem_data; + + /* Any register that MAY be allocated to a register stack (like the + 387) is treated poorly. Each such register is marked as being + live everywhere. This keeps the register allocator and the + subsequent passes from doing anything useful with these values. + + FIXME: This seems like an incredibly poor idea. */ + + CLEAR_HARD_REG_SET (zero); + CLEAR_HARD_REG_SET (stack_hard_regs); + for (i = FIRST_STACK_REG; i <= LAST_STACK_REG; i++) + SET_HARD_REG_BIT (stack_hard_regs, i); + problem_data->stack_regs = BITMAP_ALLOC (NULL); + for (i = FIRST_PSEUDO_REGISTER; i < max_regno; i++) + { + COPY_HARD_REG_SET (used, reg_class_contents[reg_preferred_class (i)]); + IOR_HARD_REG_SET (used, reg_class_contents[reg_alternate_class (i)]); + AND_HARD_REG_SET (used, stack_hard_regs); + GO_IF_HARD_REG_EQUAL (used, zero, skip); + bitmap_set_bit (problem_data->stack_regs, i); + skip: + ; + } +#endif + + /* We know that earlyclobber_regclass holds no more than + N_REG_CLASSES elements. See df_urec_check_earlyclobber. */ + earlyclobber_regclass = VEC_alloc (int, heap, N_REG_CLASSES); + + EXECUTE_IF_SET_IN_BITMAP (rescan_blocks, 0, bb_index, bi) + { + df_urec_bb_local_compute (dflow, bb_index); + } + + VEC_free (int, heap, earlyclobber_regclass); +} + + +/* Initialize the solution vectors. */ + +static void +df_urec_init (struct dataflow *dflow, bitmap all_blocks) +{ + unsigned int bb_index; + bitmap_iterator bi; + + EXECUTE_IF_SET_IN_BITMAP (all_blocks, 0, bb_index, bi) + { + struct df_urec_bb_info *bb_info = df_urec_get_bb_info (dflow, bb_index); + + /* FIXME: This is a hack, it has been copied over from + make_accurate_live_analysis by Vlad. Most likely it is necessary + because the generation of gen and kill information for hardware + registers in ur is a subset of what is really necessary and what + is done for the lr problem. */ + + /* Inside the register allocator, partial availability is only + allowed for the psuedo registers. To implement this, the rr is + initially iored with a mask ones for the hard registers and zeros + for the pseudos before being iterated. This means that each + hardware register will be live unless explicitly killed by some + statement. Eventually most of these bit will die because the + results of rr are anded with the results of lr before being used. + Outside of register allocation, a more conservative strategy of + completely ignoring the unintialized registers is imployed in the + finalizer function. */ + if (df_state & DF_SCAN_GLOBAL) + { + bitmap_ior (bb_info->out, bb_info->gen, df_all_hard_regs); + bitmap_copy (bb_info->in, df_all_hard_regs); + } + else + { + bitmap_copy (bb_info->out, bb_info->gen); + bitmap_clear (bb_info->in); + } + } +} + + +/* Or in the stack regs, hard regs and early clobber regs into the the + ur_in sets of all of the blocks. */ + +static void +df_urec_local_finalize (struct dataflow *dflow, bitmap all_blocks) +{ + struct df *df = dflow->df; + struct dataflow *lr_dflow = df->problems_by_index[DF_LR]; + bitmap tmp = BITMAP_ALLOC (NULL); + bitmap_iterator bi; + unsigned int bb_index; + struct df_urec_problem_data *problem_data = + (struct df_urec_problem_data *) dflow->problem_data; + + EXECUTE_IF_SET_IN_BITMAP (all_blocks, 0, bb_index, bi) + { + struct df_urec_bb_info *bb_info = df_urec_get_bb_info (dflow, bb_index); + struct df_lr_bb_info *bb_lr_info = df_lr_get_bb_info (lr_dflow, bb_index); + + if (bb_index != ENTRY_BLOCK && bb_index != EXIT_BLOCK) + { + if (problem_data->earlyclobbers_found) + bitmap_ior_into (bb_info->in, bb_info->earlyclobber); + +#ifdef STACK_REGS + /* We can not use the same stack register for uninitialized + pseudo-register and another living pseudo-register + because if the uninitialized pseudo-register dies, + subsequent pass reg-stack will be confused (it will + believe that the other register dies). */ + bitmap_ior_into (bb_info->in, problem_data->stack_regs); + bitmap_ior_into (bb_info->out, problem_data->stack_regs); +#endif + } + + if (!(df_state & DF_SCAN_GLOBAL)) + { + bitmap_ior_into (bb_info->in, df_all_hard_regs); + bitmap_ior_into (bb_info->out, df_all_hard_regs); + } + + /* No register may reach a location where it is not used. Thus + we trim the rr result to the places where it is used. */ + bitmap_and_into (bb_info->in, bb_lr_info->in); + bitmap_and_into (bb_info->out, bb_lr_info->out); + +#if 1 + /* Hard registers may still stick in the ur_out set, but not + be in the ur_in set, if their only mention was in a call + in this block. This is because a call kills in the lr + problem but does not kill in the rr problem. To clean + this up, we execute the transfer function on the lr_in + set and then use that to knock bits out of ur_out. */ + bitmap_ior_and_compl (tmp, bb_info->gen, bb_lr_info->in, + bb_info->kill); + bitmap_and_into (bb_info->out, tmp); +#endif + } + +#ifdef STACK_REGS + BITMAP_FREE (problem_data->stack_regs); +#endif + BITMAP_FREE (tmp); +} + + +/* Confluence function that ignores fake edges. */ + +static void +df_urec_confluence_n (struct dataflow *dflow, edge e) +{ + bitmap op1 = df_urec_get_bb_info (dflow, e->dest->index)->in; + bitmap op2 = df_urec_get_bb_info (dflow, e->src->index)->out; + + if (e->flags & EDGE_FAKE) + return; + + bitmap_ior_into (op1, op2); +} + + +/* Transfer function. */ + +static bool +df_urec_transfer_function (struct dataflow *dflow, int bb_index) +{ + struct df_urec_bb_info *bb_info = df_urec_get_bb_info (dflow, bb_index); + bitmap in = bb_info->in; + bitmap out = bb_info->out; + bitmap gen = bb_info->gen; + bitmap kill = bb_info->kill; + + return bitmap_ior_and_compl (out, gen, in, kill); +} + + +/* Free all storage associated with the problem. */ + +static void +df_urec_free (struct dataflow *dflow) +{ + unsigned int i; + + for (i = 0; i < dflow->block_info_size; i++) + { + struct df_urec_bb_info *bb_info = df_urec_get_bb_info (dflow, i); + if (bb_info) + { + BITMAP_FREE (bb_info->gen); + BITMAP_FREE (bb_info->kill); + BITMAP_FREE (bb_info->in); + BITMAP_FREE (bb_info->out); + BITMAP_FREE (bb_info->earlyclobber); + } + } + + free_alloc_pool (dflow->block_pool); + + dflow->block_info_size = 0; + free (dflow->block_info); + free (dflow->problem_data); + free (dflow); +} + + +/* Debugging info. */ + +static void +df_urec_dump (struct dataflow *dflow, FILE *file) +{ + basic_block bb; + + fprintf (file, "Undefined regs:\n"); + + FOR_ALL_BB (bb) + { + struct df_urec_bb_info *bb_info = df_urec_get_bb_info (dflow, bb->index); + df_print_bb_index (bb, file); + + if (! bb_info->in) + continue; + + fprintf (file, " in \t"); + dump_bitmap (file, bb_info->in); + fprintf (file, " gen \t"); + dump_bitmap (file, bb_info->gen); + fprintf (file, " kill\t"); + dump_bitmap (file, bb_info->kill); + fprintf (file, " ec\t"); + dump_bitmap (file, bb_info->earlyclobber); + fprintf (file, " out \t"); + dump_bitmap (file, bb_info->out); + } +} + +/* All of the information associated with every instance of the problem. */ + +static struct df_problem problem_UREC = +{ + DF_UREC, /* Problem id. */ + DF_FORWARD, /* Direction. */ + df_urec_alloc, /* Allocate the problem specific data. */ + df_urec_free_bb_info, /* Free basic block info. */ + df_urec_local_compute, /* Local compute function. */ + df_urec_init, /* Init the solution specific data. */ + df_iterative_dataflow, /* Iterative solver. */ + NULL, /* Confluence operator 0. */ + df_urec_confluence_n, /* Confluence operator n. */ + df_urec_transfer_function, /* Transfer function. */ + df_urec_local_finalize, /* Finalize function. */ + df_urec_free, /* Free all of the problem information. */ + df_urec_dump, /* Debugging. */ + &problem_LR /* Dependent problem. */ +}; + + +/* Create a new DATAFLOW instance and add it to an existing instance + of DF. The returned structure is what is used to get at the + solution. */ + +struct dataflow * +df_urec_add_problem (struct df *df) +{ + return df_add_problem (df, &problem_UREC); +} + + + +/*---------------------------------------------------------------------------- + CREATE DEF_USE (DU) and / or USE_DEF (UD) CHAINS + + Link either the defs to the uses and / or the uses to the defs. + + These problems are set up like the other dataflow problems so that + they nicely fit into the framework. They are much simpler and only + involve a single traversal of instructions and an examination of + the reaching defs information (the dependent problem). +----------------------------------------------------------------------------*/ + +struct df_chain_problem_data +{ + int flags; +}; + + +/* Create def-use or use-def chains. */ + +static void +df_chain_alloc (struct dataflow *dflow, + bitmap blocks_to_rescan ATTRIBUTE_UNUSED) +{ + struct df *df = dflow->df; + unsigned int i; + struct df_chain_problem_data *problem_data = + (struct df_chain_problem_data *) dflow->problem_data; + + /* Wholesale destruction of the old chains. */ + if (dflow->block_pool) + free_alloc_pool (dflow->block_pool); + + dflow->block_pool = create_alloc_pool ("df_chain_chain_block pool", + sizeof (struct df_link), 100); + + if (problem_data->flags & DF_DU_CHAIN) + { + if (!df->def_info.refs_organized) + df_reorganize_refs (&df->def_info); + + /* Clear out the pointers from the refs. */ + for (i = 0; i < DF_DEFS_SIZE (df); i++) + { + struct df_ref *ref = df->def_info.refs[i]; + DF_REF_CHAIN (ref) = NULL; + } + } + + if (problem_data->flags & DF_UD_CHAIN) + { + if (!df->use_info.refs_organized) + df_reorganize_refs (&df->use_info); + for (i = 0; i < DF_USES_SIZE (df); i++) + { + struct df_ref *ref = df->use_info.refs[i]; + DF_REF_CHAIN (ref) = NULL; + } + } +} + + +/* Create the chains for a list of USEs. */ + +static void +df_chain_create_bb_process_use (struct dataflow *dflow, + struct df_chain_problem_data *problem_data, + bitmap local_rd, + struct df_ref *use, + enum df_ref_flags top_flag) +{ + struct df *df = dflow->df; + bitmap_iterator bi; + unsigned int def_index; + + while (use) + { + /* Do not want to go thur this for an uninitialized var. */ + unsigned int uregno = DF_REF_REGNO (use); + int count = DF_REG_DEF_GET (df, uregno)->n_refs; + if (count) + { + if (top_flag == (DF_REF_FLAGS (use) & DF_REF_AT_TOP)) + { + unsigned int first_index = DF_REG_DEF_GET (df, uregno)->begin; + unsigned int last_index = first_index + count - 1; + + EXECUTE_IF_SET_IN_BITMAP (local_rd, first_index, def_index, bi) + { + struct df_ref *def; + if (def_index > last_index) + break; + + def = DF_DEFS_GET (df, def_index); + if (problem_data->flags & DF_DU_CHAIN) + df_chain_create (dflow, def, use); + if (problem_data->flags & DF_UD_CHAIN) + df_chain_create (dflow, use, def); + } + } + } + use = use->next_ref; + } +} + +/* Reset the storage pool that the def-use or use-def chains have been + allocated in. We do not need to re adjust the pointers in the refs, + these have already been clean out.*/ + +/* Create chains from reaching defs bitmaps for basic block BB. */ +static void +df_chain_create_bb (struct dataflow *dflow, + struct dataflow *rd_dflow, + unsigned int bb_index) +{ + basic_block bb = BASIC_BLOCK (bb_index); + struct df_rd_bb_info *bb_info = df_rd_get_bb_info (rd_dflow, bb_index); + rtx insn; + bitmap cpy = BITMAP_ALLOC (NULL); + struct df *df = dflow->df; + struct df_chain_problem_data *problem_data = + (struct df_chain_problem_data *) dflow->problem_data; + struct df_ref *def; + + bitmap_copy (cpy, bb_info->in); + + /* Since we are going forwards, process the artificial uses first + then the artificial defs second. */ + +#ifdef EH_USES + /* Create the chains for the artificial uses from the EH_USES at the + beginning of the block. */ + df_chain_create_bb_process_use (dflow, problem_data, cpy, + df_get_artificial_uses (df, bb->index), + DF_REF_AT_TOP); +#endif + + for (def = df_get_artificial_defs (df, bb_index); def; def = def->next_ref) + { + unsigned int dregno = DF_REF_REGNO (def); + bitmap_clear_range (cpy, + DF_REG_DEF_GET (df, dregno)->begin, + DF_REG_DEF_GET (df, dregno)->n_refs); + if (! (DF_REF_FLAGS (def) & DF_REF_CLOBBER)) + bitmap_set_bit (cpy, DF_REF_ID (def)); + } + + /* Process the regular instructions next. */ + FOR_BB_INSNS (bb, insn) + { + struct df_ref *def; + unsigned int uid = INSN_UID (insn); + + if (! INSN_P (insn)) + continue; + + /* Now scan the uses and link them up with the defs that remain + in the cpy vector. */ + + df_chain_create_bb_process_use (dflow, problem_data, cpy, + DF_INSN_UID_GET (df, uid)->uses, 0); + + /* Since we are going forwards, process the defs second. This + pass only changes the bits in cpy. */ + for (def = DF_INSN_UID_GET (df, uid)->defs; def; def = def->next_ref) + { + unsigned int dregno = DF_REF_REGNO (def); + bitmap_clear_range (cpy, + DF_REG_DEF_GET (df, dregno)->begin, + DF_REG_DEF_GET (df, dregno)->n_refs); + if (! (DF_REF_FLAGS (def) & DF_REF_CLOBBER)) + bitmap_set_bit (cpy, DF_REF_ID (def)); + } + } + + /* Create the chains for the artificial uses of the hard registers + at the end of the block. */ + df_chain_create_bb_process_use (dflow, problem_data, cpy, + df_get_artificial_uses (df, bb->index), 0); +} + +/* Create def-use chains from reaching use bitmaps for basic blocks + in BLOCKS. */ + +static void +df_chain_finalize (struct dataflow *dflow, bitmap all_blocks) +{ + unsigned int bb_index; + bitmap_iterator bi; + struct df *df = dflow->df; + struct dataflow *rd_dflow = df->problems_by_index [DF_RD]; + + EXECUTE_IF_SET_IN_BITMAP (all_blocks, 0, bb_index, bi) + { + df_chain_create_bb (dflow, rd_dflow, bb_index); + } +} + + +/* Free all storage associated with the problem. */ + +static void +df_chain_free (struct dataflow *dflow) +{ + free_alloc_pool (dflow->block_pool); + free (dflow->problem_data); + free (dflow); +} + + +/* Debugging info. */ + +static void +df_chains_dump (struct dataflow *dflow, FILE *file) +{ + struct df *df = dflow->df; + unsigned int j; + struct df_chain_problem_data *problem_data = + (struct df_chain_problem_data *) dflow->problem_data; + + if (problem_data->flags & DF_DU_CHAIN) + { + fprintf (file, "Def-use chains:\n"); + for (j = 0; j < df->def_info.bitmap_size; j++) + { + struct df_ref *def = DF_DEFS_GET (df, j); + if (def) + { + fprintf (file, "d%d bb %d luid %d insn %d reg %d ", + j, DF_REF_BBNO (def), + DF_INSN_LUID (df, DF_REF_INSN (def)), + DF_REF_INSN (def) ? DF_REF_INSN_UID (def) : -1, + DF_REF_REGNO (def)); + if (def->flags & DF_REF_READ_WRITE) + fprintf (file, "read/write "); + df_chain_dump (df, DF_REF_CHAIN (def), file); + fprintf (file, "\n"); + } + } + } + + if (problem_data->flags & DF_UD_CHAIN) + { + fprintf (file, "Use-def chains:\n"); + for (j = 0; j < df->use_info.bitmap_size; j++) + { + struct df_ref *use = DF_USES_GET (df, j); + if (use) + { + fprintf (file, "u%d bb %d luid %d insn %d reg %d ", + j, DF_REF_BBNO (use), + DF_REF_INSN (use) ? + DF_INSN_LUID (df, DF_REF_INSN (use)) + : -1, + DF_REF_INSN (DF_USES_GET (df, j)) ? + DF_REF_INSN_UID (DF_USES_GET (df,j)) + : -1, + DF_REF_REGNO (use)); + if (use->flags & DF_REF_READ_WRITE) + fprintf (file, "read/write "); + if (use->flags & DF_REF_STRIPPED) + fprintf (file, "stripped "); + if (use->flags & DF_REF_IN_NOTE) + fprintf (file, "note "); + df_chain_dump (df, DF_REF_CHAIN (use), file); + fprintf (file, "\n"); + } + } + } +} + + +static struct df_problem problem_CHAIN = +{ + DF_CHAIN, /* Problem id. */ + DF_NONE, /* Direction. */ + df_chain_alloc, /* Allocate the problem specific data. */ + NULL, /* Free basic block info. */ + NULL, /* Local compute function. */ + NULL, /* Init the solution specific data. */ + NULL, /* Iterative solver. */ + NULL, /* Confluence operator 0. */ + NULL, /* Confluence operator n. */ + NULL, /* Transfer function. */ + df_chain_finalize, /* Finalize function. */ + df_chain_free, /* Free all of the problem information. */ + df_chains_dump, /* Debugging. */ + &problem_RD /* Dependent problem. */ +}; + + +/* Create a new DATAFLOW instance and add it to an existing instance + of DF. The returned structure is what is used to get at the + solution. */ + +struct dataflow * +df_chain_add_problem (struct df *df, int flags) +{ + struct df_chain_problem_data *problem_data = + xmalloc (sizeof (struct df_chain_problem_data)); + struct dataflow *dflow = df_add_problem (df, &problem_CHAIN); + + dflow->problem_data = problem_data; + problem_data->flags = flags; + + return dflow; +} + + +/*---------------------------------------------------------------------------- + REGISTER INFORMATION + + Currently this consists of only lifetime information. But the plan is + to enhance it so that it produces all of the register information needed + by the register allocators. +----------------------------------------------------------------------------*/ + + +struct df_ri_problem_data +{ + int *lifetime; +}; + + +/* Allocate the lifetime information. */ + +static void +df_ri_alloc (struct dataflow *dflow, bitmap blocks_to_rescan ATTRIBUTE_UNUSED) +{ + struct df_ri_problem_data *problem_data = + (struct df_ri_problem_data *) dflow->problem_data; + + if (!dflow->problem_data) + { + struct df_ri_problem_data *problem_data = + xmalloc (sizeof (struct df_ri_problem_data)); + dflow->problem_data = problem_data; + } + + problem_data->lifetime = xrealloc (problem_data->lifetime, + max_reg_num () *sizeof (int)); + memset (problem_data->lifetime, 0, max_reg_num () *sizeof (int)); +} + +/* Compute register info: lifetime, bb, and number of defs and uses + for basic block BB. */ + +static void +df_ri_bb_compute (struct dataflow *dflow, unsigned int bb_index, bitmap live) +{ + struct df *df = dflow->df; + struct df_ur_bb_info *bb_info = df_ur_get_bb_info (dflow, bb_index); + struct df_ri_problem_data *problem_data = + (struct df_ri_problem_data *) dflow->problem_data; + basic_block bb = BASIC_BLOCK (bb_index); + rtx insn; + + bitmap_copy (live, bb_info->out); + + FOR_BB_INSNS_REVERSE (bb, insn) + { + unsigned int uid = INSN_UID (insn); + unsigned int regno; + bitmap_iterator bi; + struct df_ref *def; + struct df_ref *use; + + if (! INSN_P (insn)) + continue; + + for (def = DF_INSN_UID_GET (df, uid)->defs; def; def = def->next_ref) + { + unsigned int dregno = DF_REF_REGNO (def); + + /* Kill this register. */ + bitmap_clear_bit (live, dregno); + } + + for (use = DF_INSN_UID_GET (df, uid)->uses; use; use = use->next_ref) + { + unsigned int uregno = DF_REF_REGNO (use); + + /* This register is now live. */ + bitmap_set_bit (live, uregno); + } + + /* Increment lifetimes of all live registers. */ + EXECUTE_IF_SET_IN_BITMAP (live, 0, regno, bi) + { + problem_data->lifetime[regno]++; + } + } +} + + +/* Compute register info: lifetime, bb, and number of defs and uses. */ +static void +df_ri_compute (struct dataflow *dflow, bitmap all_blocks ATTRIBUTE_UNUSED, + bitmap blocks_to_scan) +{ + unsigned int bb_index; + bitmap_iterator bi; + bitmap live; + + live = BITMAP_ALLOC (NULL); + + EXECUTE_IF_SET_IN_BITMAP (blocks_to_scan, 0, bb_index, bi) + { + df_ri_bb_compute (dflow, bb_index, live); + } + + BITMAP_FREE (live); +} + + +/* Free all storage associated with the problem. */ + +static void +df_ri_free (struct dataflow *dflow) +{ + struct df_ri_problem_data *problem_data = + (struct df_ri_problem_data *) dflow->problem_data; + + free (problem_data->lifetime); + free (dflow->problem_data); + free (dflow); +} + + +/* Debugging info. */ + +static void +df_ri_dump (struct dataflow *dflow, FILE *file) +{ + struct df_ri_problem_data *problem_data = + (struct df_ri_problem_data *) dflow->problem_data; + int j; + + fprintf (file, "Register info:\n"); + for (j = 0; j < max_reg_num (); j++) + { + fprintf (file, "reg %d life %d\n", j, problem_data->lifetime[j]); + } +} + +/* All of the information associated every instance of the problem. */ + +static struct df_problem problem_RI = +{ + DF_RI, /* Problem id. */ + DF_NONE, /* Direction. */ + df_ri_alloc, /* Allocate the problem specific data. */ + NULL, /* Free basic block info. */ + df_ri_compute, /* Local compute function. */ + NULL, /* Init the solution specific data. */ + NULL, /* Iterative solver. */ + NULL, /* Confluence operator 0. */ + NULL, /* Confluence operator n. */ + NULL, /* Transfer function. */ + NULL, /* Finalize function. */ + df_ri_free, /* Free all of the problem information. */ + df_ri_dump, /* Debugging. */ + &problem_UR /* Dependent problem. */ +}; + + +/* Create a new DATAFLOW instance and add it to an existing instance + of DF. The returned structure is what is used to get at the + solution. */ + +struct dataflow * +df_ri_add_problem (struct df *df) +{ + return df_add_problem (df, &problem_RI); +} + + +/* Return total lifetime (in insns) of REG. */ +int +df_reg_lifetime (struct df *df, rtx reg) +{ + struct dataflow *dflow = df->problems_by_index[DF_RI]; + struct df_ri_problem_data *problem_data = + (struct df_ri_problem_data *) dflow->problem_data; + return problem_data->lifetime[REGNO (reg)]; +} + + diff --git a/gcc/df-scan.c b/gcc/df-scan.c new file mode 100644 index 00000000000..82de4a8b2a7 --- /dev/null +++ b/gcc/df-scan.c @@ -0,0 +1,1795 @@ +/* FIXME: We need to go back and add the warning messages about code + moved across setjmp. */ + + +/* Scanning of rtl for dataflow analysis. + Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 + Free Software Foundation, Inc. + Originally contributed by Michael P. Hayes + (m.hayes@elec.canterbury.ac.nz, mhayes@redhat.com) + Major rewrite contributed by Danny Berlin (dberlin@dberlin.org) + and Kenneth Zadeck (zadeck@naturalbridge.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, 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301, USA. +*/ + +#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 "output.h" +#include "alloc-pool.h" +#include "flags.h" +#include "hard-reg-set.h" +#include "basic-block.h" +#include "sbitmap.h" +#include "bitmap.h" +#include "timevar.h" +#include "df.h" + +#ifndef HAVE_epilogue +#define HAVE_epilogue 0 +#endif +#ifndef HAVE_prologue +#define HAVE_prologue 0 +#endif +#ifndef HAVE_sibcall_epilogue +#define HAVE_sibcall_epilogue 0 +#endif + +#ifndef EPILOGUE_USES +#define EPILOGUE_USES(REGNO) 0 +#endif + +/* Indicates where we are in the compilation. */ +int df_state; + +/* The bitmap_obstack is used to hold some static variables that + should not be reset after each function is compiled. */ + +static bitmap_obstack persistent_obstack; + +/* The set of hard registers in eliminables[i].from. */ + +static HARD_REG_SET elim_reg_set; + +/* This is a bitmap copy of regs_invalidated_by_call so that we can + easily add it into bitmaps, etc. */ + +bitmap df_invalidated_by_call = NULL; + +/* Initialize ur_in and ur_out as if all hard registers were partially + available. */ + +bitmap df_all_hard_regs = NULL; + +static void df_ref_record (struct dataflow *, rtx, rtx *, + basic_block, rtx, enum df_ref_type, + enum df_ref_flags, bool record_live); +static void df_def_record_1 (struct dataflow *, rtx, basic_block, rtx, + enum df_ref_flags, bool record_live); +static void df_defs_record (struct dataflow *, rtx, basic_block, rtx); +static void df_uses_record (struct dataflow *, rtx *, enum df_ref_type, + basic_block, rtx, enum df_ref_flags); + +static void df_insn_refs_record (struct dataflow *, basic_block, rtx); +static void df_bb_refs_record (struct dataflow *, basic_block); +static void df_refs_record (struct dataflow *, bitmap); +static struct df_ref *df_ref_create_structure (struct dataflow *, rtx, rtx *, + basic_block, rtx, enum df_ref_type, + enum df_ref_flags); +static void df_record_exit_block_uses (struct dataflow *); +static void df_grow_reg_info (struct dataflow *, struct df_ref_info *); +static void df_grow_ref_info (struct df_ref_info *, unsigned int); +static void df_grow_insn_info (struct df *); + + +/*---------------------------------------------------------------------------- + SCANNING DATAFLOW PROBLEM + + There are several ways in which scanning looks just like the other + dataflow problems. It shares the all the mechanisms for local info + as well as basic block info. Where it differs is when and how often + it gets run. It also has no need for the iterative solver. +----------------------------------------------------------------------------*/ + +/* Problem data for the scanning dataflow function. */ +struct df_scan_problem_data +{ + alloc_pool ref_pool; + alloc_pool insn_pool; + alloc_pool reg_pool; +}; + +typedef struct df_scan_bb_info *df_scan_bb_info_t; + +static void +df_scan_free_internal (struct dataflow *dflow) +{ + struct df *df = dflow->df; + struct df_scan_problem_data *problem_data = + (struct df_scan_problem_data *) dflow->problem_data; + + free (df->def_info.regs); + free (df->def_info.refs); + memset (&df->def_info, 0, (sizeof (struct df_ref_info))); + + free (df->use_info.regs); + free (df->use_info.refs); + memset (&df->use_info, 0, (sizeof (struct df_ref_info))); + + free (df->insns); + df->insns = NULL; + df->insns_size = 0; + + free (dflow->block_info); + dflow->block_info = NULL; + dflow->block_info_size = 0; + + BITMAP_FREE (df->hardware_regs_used); + BITMAP_FREE (df->exit_block_uses); + + free_alloc_pool (dflow->block_pool); + free_alloc_pool (problem_data->ref_pool); + free_alloc_pool (problem_data->insn_pool); + free_alloc_pool (problem_data->reg_pool); +} + + +/* Get basic block info. */ + +struct df_scan_bb_info * +df_scan_get_bb_info (struct dataflow *dflow, unsigned int index) +{ + gcc_assert (index < dflow->block_info_size); + return (struct df_scan_bb_info *) dflow->block_info[index]; +} + + +/* Set basic block info. */ + +static void +df_scan_set_bb_info (struct dataflow *dflow, unsigned int index, + struct df_scan_bb_info *bb_info) +{ + gcc_assert (index < dflow->block_info_size); + dflow->block_info[index] = (void *) bb_info; +} + + +/* Free basic block info. */ + +static void +df_scan_free_bb_info (struct dataflow *dflow, void *vbb_info) +{ + struct df_scan_bb_info *bb_info = (struct df_scan_bb_info *) vbb_info; + if (bb_info) + pool_free (dflow->block_pool, bb_info); +} + + +/* Allocate the problem data for the scanning problem. This should be + called when the problem is created or when the entire function is to + be rescanned. */ + +static void +df_scan_alloc (struct dataflow *dflow, bitmap blocks_to_rescan) +{ + struct df *df = dflow->df; + struct df_scan_problem_data *problem_data; + unsigned int insn_num = get_max_uid () + 1; + unsigned int block_size = 50; + unsigned int bb_index; + bitmap_iterator bi; + + /* Given the number of pools, this is really faster than tearing + everything apart. */ + if (dflow->problem_data) + df_scan_free_internal (dflow); + + dflow->block_pool + = create_alloc_pool ("df_scan_block pool", + sizeof (struct df_scan_bb_info), + block_size); + + problem_data = xmalloc (sizeof (struct df_scan_problem_data)); + dflow->problem_data = problem_data; + + problem_data->ref_pool + = create_alloc_pool ("df_scan_ref pool", + sizeof (struct df_ref), block_size); + problem_data->insn_pool + = create_alloc_pool ("df_scan_insn pool", + sizeof (struct df_insn_info), block_size); + + problem_data->reg_pool + = create_alloc_pool ("df_scan_reg pool", + sizeof (struct df_reg_info), block_size); + + insn_num += insn_num / 4; + df_grow_reg_info (dflow, &df->def_info); + df_grow_ref_info (&df->def_info, insn_num); + + df_grow_reg_info (dflow, &df->use_info); + df_grow_ref_info (&df->use_info, insn_num *2); + + df_grow_insn_info (df); + df_grow_bb_info (dflow); + + EXECUTE_IF_SET_IN_BITMAP (blocks_to_rescan, 0, bb_index, bi) + { + struct df_scan_bb_info *bb_info = df_scan_get_bb_info (dflow, bb_index); + if (!bb_info) + { + bb_info = (struct df_scan_bb_info *) pool_alloc (dflow->block_pool); + df_scan_set_bb_info (dflow, bb_index, bb_info); + } + bb_info->artificial_defs = NULL; + bb_info->artificial_uses = NULL; + } + + df->hardware_regs_used = BITMAP_ALLOC (NULL); + df->exit_block_uses = BITMAP_ALLOC (NULL); +} + + +/* Free all of the data associated with the scan problem. */ + +static void +df_scan_free (struct dataflow *dflow) +{ + struct df *df = dflow->df; + + df_scan_free_internal (dflow); + if (df->blocks_to_scan) + BITMAP_FREE (df->blocks_to_scan); + + if (df->blocks_to_analyze) + BITMAP_FREE (df->blocks_to_analyze); + + free (dflow->problem_data); + free (dflow); +} + +static void +df_scan_dump (struct dataflow *dflow ATTRIBUTE_UNUSED, FILE *file ATTRIBUTE_UNUSED) +{ + struct df *df = dflow->df; + int i; + + fprintf (file, " all hard regs \t"); + dump_bitmap (file, df_all_hard_regs); + fprintf (file, " invalidated by call \t"); + dump_bitmap (file, df_invalidated_by_call); + fprintf (file, " hardware regs used \t"); + dump_bitmap (file, df->hardware_regs_used); + fprintf (file, " exit block uses \t"); + dump_bitmap (file, df->exit_block_uses); + fprintf (file, " regs ever live \t"); + for (i = 0; i < FIRST_PSEUDO_REGISTER; i++) + if (regs_ever_live[i]) + fprintf (file, "%d ", i); + fprintf (file, "\n"); +} + +static struct df_problem problem_SCAN = +{ + DF_SCAN, /* Problem id. */ + DF_NONE, /* Direction. */ + df_scan_alloc, /* Allocate the problem specific data. */ + df_scan_free_bb_info, /* Free basic block info. */ + NULL, /* Local compute function. */ + NULL, /* Init the solution specific data. */ + NULL, /* Iterative solver. */ + NULL, /* Confluence operator 0. */ + NULL, /* Confluence operator n. */ + NULL, /* Transfer function. */ + NULL, /* Finalize function. */ + df_scan_free, /* Free all of the problem information. */ + df_scan_dump, /* Debugging. */ + NULL /* Dependent problem. */ +}; + + +/* Create a new DATAFLOW instance and add it to an existing instance + of DF. The returned structure is what is used to get at the + solution. */ + +struct dataflow * +df_scan_add_problem (struct df *df) +{ + return df_add_problem (df, &problem_SCAN); +} + +/*---------------------------------------------------------------------------- + Storage Allocation Utilities +----------------------------------------------------------------------------*/ + + +/* First, grow the reg_info information. If the current size is less than + the number of psuedos, grow to 25% more than the number of + pseudos. + + Second, assure that all of the slots up to max_reg_num have been + filled with reg_info structures. */ + +static void +df_grow_reg_info (struct dataflow *dflow, struct df_ref_info *ref_info) +{ + unsigned int max_reg = max_reg_num (); + unsigned int new_size = max_reg; + struct df_scan_problem_data *problem_data = + (struct df_scan_problem_data *) dflow->problem_data; + unsigned int i; + + if (ref_info->regs_size < new_size) + { + new_size += new_size / 4; + ref_info->regs = xrealloc (ref_info->regs, + new_size *sizeof (struct df_reg_info*)); + ref_info->regs_size = new_size; + } + + for (i = ref_info->regs_inited; i < max_reg; i++) + { + struct df_reg_info *reg_info = pool_alloc (problem_data->reg_pool); + memset (reg_info, 0, sizeof (struct df_reg_info)); + ref_info->regs[i] = reg_info; + } + + ref_info->regs_inited = max_reg; +} + + +/* Grow the ref information. */ + +static void +df_grow_ref_info (struct df_ref_info *ref_info, unsigned int new_size) +{ + if (ref_info->refs_size < new_size) + { + ref_info->refs = xrealloc (ref_info->refs, + new_size *sizeof (struct df_ref *)); + memset (ref_info->refs + ref_info->refs_size, 0, + (new_size - ref_info->refs_size) *sizeof (struct df_ref *)); + ref_info->refs_size = new_size; + } +} + + +/* Grow the ref information. If the current size is less than the + number of instructions, grow to 25% more than the number of + instructions. */ + +static void +df_grow_insn_info (struct df *df) +{ + unsigned int new_size = get_max_uid () + 1; + if (df->insns_size < new_size) + { + new_size += new_size / 4; + df->insns = xrealloc (df->insns, + new_size *sizeof (struct df_insn_info *)); + memset (df->insns + df->insns_size, 0, + (new_size - df->insns_size) *sizeof (struct df_insn_info *)); + df->insns_size = new_size; + } +} + + + + +/*---------------------------------------------------------------------------- + PUBLIC INTERFACES FOR SMALL GRAIN CHANGES TO SCANNING. +----------------------------------------------------------------------------*/ + +/* Rescan some BLOCKS or all the blocks defined by the last call to + df_set_blocks if BLOCKS is NULL); */ + +void +df_rescan_blocks (struct df *df, bitmap blocks) +{ + bitmap local_blocks_to_scan = BITMAP_ALLOC (NULL); + + struct dataflow *dflow = df->problems_by_index [DF_SCAN]; + basic_block bb; + + df->def_info.refs_organized = false; + df->use_info.refs_organized = false; + + if (blocks) + { + /* Need to assure that there are space in all of the tables. */ + unsigned int insn_num = get_max_uid () + 1; + insn_num += insn_num / 4; + + df_grow_reg_info (dflow, &df->def_info); + df_grow_ref_info (&df->def_info, insn_num); + + df_grow_reg_info (dflow, &df->use_info); + df_grow_ref_info (&df->use_info, insn_num *2); + + df_grow_insn_info (df); + df_grow_bb_info (dflow); + + bitmap_copy (local_blocks_to_scan, blocks); + df->def_info.add_refs_inline = true; + df->use_info.add_refs_inline = true; + + df_refs_delete (dflow, local_blocks_to_scan); + + /* This may be a mistake, but if an explicit blocks is passed in + and the set of blocks to analyze has been explicitly set, add + the extra blocks to blocks_to_analyze. The alternative is to + put an assert here. We do not want this to just go by + silently or else we may get storage leaks. */ + if (df->blocks_to_analyze) + bitmap_ior_into (df->blocks_to_analyze, blocks); + } + else + { + /* If we are going to do everything, just reallocate everything. + Most stuff is allocated in pools so this is faster than + walking it. */ + if (df->blocks_to_analyze) + bitmap_copy (local_blocks_to_scan, df->blocks_to_analyze); + else + FOR_ALL_BB (bb) + { + bitmap_set_bit (local_blocks_to_scan, bb->index); + } + df_scan_alloc (dflow, local_blocks_to_scan); + + df->def_info.add_refs_inline = false; + df->use_info.add_refs_inline = false; + } + + df_refs_record (dflow, local_blocks_to_scan); +#if 0 + bitmap_print (stderr, local_blocks_to_scan, "scanning: ", "\n"); +#endif + + if (!df->blocks_to_scan) + df->blocks_to_scan = BITMAP_ALLOC (NULL); + + bitmap_ior_into (df->blocks_to_scan, local_blocks_to_scan); + BITMAP_FREE (local_blocks_to_scan); +} + +/* Create a new ref of type DF_REF_TYPE for register REG at address + LOC within INSN of BB. */ + +struct df_ref * +df_ref_create (struct df *df, rtx reg, rtx *loc, rtx insn, + basic_block bb, + enum df_ref_type ref_type, + enum df_ref_flags ref_flags) +{ + struct dataflow *dflow = df->problems_by_index[DF_SCAN]; + struct df_scan_bb_info *bb_info; + + df_grow_reg_info (dflow, &df->use_info); + df_grow_reg_info (dflow, &df->def_info); + df_grow_bb_info (dflow); + + /* Make sure there is the bb_info for this block. */ + bb_info = df_scan_get_bb_info (dflow, bb->index); + if (!bb_info) + { + bb_info = (struct df_scan_bb_info *) pool_alloc (dflow->block_pool); + df_scan_set_bb_info (dflow, bb->index, bb_info); + bb_info->artificial_defs = NULL; + bb_info->artificial_uses = NULL; + } + + if (ref_type == DF_REF_REG_DEF) + df->def_info.add_refs_inline = true; + else + df->use_info.add_refs_inline = true; + + return df_ref_create_structure (dflow, reg, loc, bb, insn, ref_type, ref_flags); +} + + + +/*---------------------------------------------------------------------------- + UTILITIES TO CREATE AND DESTROY REFS AND CHAINS. +----------------------------------------------------------------------------*/ + + +/* Get the artifical uses for a basic block. */ + +struct df_ref * +df_get_artificial_defs (struct df *df, unsigned int bb_index) +{ + struct dataflow *dflow = df->problems_by_index[DF_SCAN]; + return df_scan_get_bb_info (dflow, bb_index)->artificial_defs; +} + + +/* Get the artifical uses for a basic block. */ + +struct df_ref * +df_get_artificial_uses (struct df *df, unsigned int bb_index) +{ + struct dataflow *dflow = df->problems_by_index[DF_SCAN]; + return df_scan_get_bb_info (dflow, bb_index)->artificial_uses; +} + + +/* Link REF at the front of reg_use or reg_def chain for REGNO. */ + +void +df_reg_chain_create (struct df_reg_info *reg_info, + struct df_ref *ref) +{ + struct df_ref *head = reg_info->reg_chain; + reg_info->reg_chain = ref; + + DF_REF_NEXT_REG (ref) = head; + + /* We cannot actually link to the head of the chain. */ + DF_REF_PREV_REG (ref) = NULL; + + if (head) + DF_REF_PREV_REG (head) = ref; +} + + +/* Remove REF from the CHAIN. Return the head of the chain. This + will be CHAIN unless the REF was at the beginning of the chain. */ + +static struct df_ref * +df_ref_unlink (struct df_ref *chain, struct df_ref *ref) +{ + struct df_ref *orig_chain = chain; + struct df_ref *prev = NULL; + while (chain) + { + if (chain == ref) + { + if (prev) + { + prev->next_ref = ref->next_ref; + ref->next_ref = NULL; + return orig_chain; + } + else + { + chain = ref->next_ref; + ref->next_ref = NULL; + return chain; + } + } + + prev = chain; + chain = chain->next_ref; + } + + /* Someone passed in a ref that was not in the chain. */ + gcc_unreachable (); + return NULL; +} + + +/* Unlink and delete REF at the reg_use or reg_def chain. Also delete + the def-use or use-def chain if it exists. Returns the next ref in + uses or defs chain. */ + +struct df_ref * +df_reg_chain_unlink (struct dataflow *dflow, struct df_ref *ref) +{ + struct df *df = dflow->df; + struct df_ref *next = DF_REF_NEXT_REG (ref); + struct df_ref *prev = DF_REF_PREV_REG (ref); + struct df_scan_problem_data *problem_data = + (struct df_scan_problem_data *) dflow->problem_data; + struct df_reg_info *reg_info; + struct df_ref *next_ref = ref->next_ref; + unsigned int id = DF_REF_ID (ref); + + if (DF_REF_TYPE (ref) == DF_REF_REG_DEF) + { + reg_info = DF_REG_DEF_GET (df, DF_REF_REGNO (ref)); + df->def_info.bitmap_size--; + if (df->def_info.refs && (id < df->def_info.refs_size)) + DF_DEFS_SET (df, id, NULL); + } + else + { + reg_info = DF_REG_USE_GET (df, DF_REF_REGNO (ref)); + df->use_info.bitmap_size--; + if (df->use_info.refs && (id < df->use_info.refs_size)) + DF_USES_SET (df, id, NULL); + } + + /* Delete any def-use or use-def chains that start here. */ + if (DF_REF_CHAIN (ref)) + df_chain_unlink (df->problems_by_index[DF_CHAIN], ref, NULL); + + reg_info->n_refs--; + + /* Unlink from the reg chain. If there is no prev, this is the + first of the list. If not, just join the next and prev. */ + if (prev) + { + DF_REF_NEXT_REG (prev) = next; + if (next) + DF_REF_PREV_REG (next) = prev; + } + else + { + reg_info->reg_chain = next; + if (next) + DF_REF_PREV_REG (next) = NULL; + } + + pool_free (problem_data->ref_pool, ref); + return next_ref; +} + + +/* Unlink REF from all def-use/use-def chains, etc. */ + +void +df_ref_remove (struct df *df, struct df_ref *ref) +{ + struct dataflow *dflow = df->problems_by_index [DF_SCAN]; + if (DF_REF_REG_DEF_P (ref)) + { + if (DF_REF_FLAGS (ref) & DF_REF_ARTIFICIAL) + { + struct df_scan_bb_info *bb_info + = df_scan_get_bb_info (dflow, DF_REF_BB (ref)->index); + bb_info->artificial_defs + = df_ref_unlink (bb_info->artificial_defs, ref); + } + else + DF_INSN_UID_DEFS (df, DF_REF_INSN_UID (ref)) = + df_ref_unlink (DF_INSN_UID_DEFS (df, DF_REF_INSN_UID (ref)), ref); + + if (df->def_info.add_refs_inline) + DF_DEFS_SET (df, DF_REF_ID (ref), NULL); + } + else + { + if (DF_REF_FLAGS (ref) & DF_REF_ARTIFICIAL) + { + struct df_scan_bb_info *bb_info + = df_scan_get_bb_info (dflow, DF_REF_BB (ref)->index); + bb_info->artificial_uses + = df_ref_unlink (bb_info->artificial_uses, ref); + } + else + DF_INSN_UID_USES (df, DF_REF_INSN_UID (ref)) = + df_ref_unlink (DF_INSN_UID_USES (df, DF_REF_INSN_UID (ref)), ref); + + if (df->use_info.add_refs_inline) + DF_USES_SET (df, DF_REF_ID (ref), NULL); + } + + df_reg_chain_unlink (dflow, ref); +} + + +/* Create the insn record for INSN. If there was one there, zero it out. */ + +static struct df_insn_info * +df_insn_create_insn_record (struct dataflow *dflow, rtx insn) +{ + struct df *df = dflow->df; + struct df_scan_problem_data *problem_data = + (struct df_scan_problem_data *) dflow->problem_data; + + struct df_insn_info *insn_rec = DF_INSN_GET (df, insn); + if (!insn_rec) + { + insn_rec = pool_alloc (problem_data->insn_pool); + DF_INSN_SET (df, insn, insn_rec); + } + memset (insn_rec, 0, sizeof (struct df_insn_info)); + + return insn_rec; +} + +/* Delete all of the refs information from BLOCKS. */ + +void +df_insn_refs_delete (struct dataflow *dflow, rtx insn) +{ + struct df *df = dflow->df; + unsigned int uid = INSN_UID (insn); + struct df_insn_info *insn_info = DF_INSN_UID_GET (df, uid); + struct df_ref *ref; + struct df_scan_problem_data *problem_data = + (struct df_scan_problem_data *) dflow->problem_data; + + if (insn_info) + { + ref = insn_info->defs; + while (ref) + ref = df_reg_chain_unlink (dflow, ref); + + ref = insn_info->uses; + while (ref) + ref = df_reg_chain_unlink (dflow, ref); + + pool_free (problem_data->insn_pool, insn_info); + DF_INSN_SET (df, insn, NULL); + } +} + + +/* Delete all of the refs information from BLOCKS. */ + +void +df_refs_delete (struct dataflow *dflow, bitmap blocks) +{ + bitmap_iterator bi; + unsigned int bb_index; + struct df_ref *def; + struct df_ref *use; + + EXECUTE_IF_SET_IN_BITMAP (blocks, 0, bb_index, bi) + { + struct df_scan_bb_info *bb_info + = df_scan_get_bb_info (dflow, bb_index); + rtx insn; + basic_block bb = BASIC_BLOCK (bb_index); + FOR_BB_INSNS (bb, insn) + { + if (INSN_P (insn)) + { + /* Record defs within INSN. */ + df_insn_refs_delete (dflow, insn); + } + } + + /* Get rid of any artifical uses. */ + if (bb_info) + { + def = bb_info->artificial_defs; + while (def) + def = df_reg_chain_unlink (dflow, def); + bb_info->artificial_defs = NULL; + use = bb_info->artificial_uses; + while (use) + use = df_reg_chain_unlink (dflow, use); + bb_info->artificial_uses = NULL; + } + } +} + + +/* Take build ref table for either the uses or defs from the reg-use + or reg-def chains. */ + +void +df_reorganize_refs (struct df_ref_info *ref_info) +{ + unsigned int m = ref_info->regs_inited; + unsigned int regno; + unsigned int offset = 0; + unsigned int size = 0; + + if (ref_info->refs_organized) + return; + + if (ref_info->refs_size < ref_info->bitmap_size) + { + int new_size = ref_info->bitmap_size + ref_info->bitmap_size / 4; + df_grow_ref_info (ref_info, new_size); + } + + for (regno = 0; regno < m; regno++) + { + struct df_reg_info *reg_info = ref_info->regs[regno]; + int count = 0; + if (reg_info) + { + struct df_ref *ref = reg_info->reg_chain; + reg_info->begin = offset; + while (ref) + { + ref_info->refs[offset] = ref; + DF_REF_ID (ref) = offset++; + ref = DF_REF_NEXT_REG (ref); + count++; + size++; + } + reg_info->n_refs = count; + } + } + + /* The bitmap size is not decremented when refs are deleted. So + reset it now that we have squished out all of the empty + slots. */ + ref_info->bitmap_size = size; + ref_info->refs_organized = true; + ref_info->add_refs_inline = true; +} + + +/* Local miscellaneous routines. */ + +/* Local routines for recording refs. */ + +/* Set where we are in the compilation. */ + +void +df_set_state (int state) +{ + df_state = state; +} + + + +/*---------------------------------------------------------------------------- + Hard core instruction scanning code. No external interfaces here, + just a lot of routines that look inside insns. +----------------------------------------------------------------------------*/ + +/* Create a ref and add it to the reg-def or reg-use chains. */ + +static struct df_ref * +df_ref_create_structure (struct dataflow *dflow, rtx reg, rtx *loc, + basic_block bb, rtx insn, + enum df_ref_type ref_type, + enum df_ref_flags ref_flags) +{ + struct df_ref *this_ref; + struct df *df = dflow->df; + int regno = REGNO (GET_CODE (reg) == SUBREG ? SUBREG_REG (reg) : reg); + struct df_scan_problem_data *problem_data = + (struct df_scan_problem_data *) dflow->problem_data; + + this_ref = pool_alloc (problem_data->ref_pool); + DF_REF_REG (this_ref) = reg; + DF_REF_REGNO (this_ref) = regno; + DF_REF_LOC (this_ref) = loc; + DF_REF_INSN (this_ref) = insn; + DF_REF_CHAIN (this_ref) = NULL; + DF_REF_TYPE (this_ref) = ref_type; + DF_REF_FLAGS (this_ref) = ref_flags; + DF_REF_DATA (this_ref) = NULL; + DF_REF_BB (this_ref) = bb; + + /* Link the ref into the reg_def and reg_use chains and keep a count + of the instances. */ + if (ref_type == DF_REF_REG_DEF) + { + struct df_reg_info *reg_info = DF_REG_DEF_GET (df, regno); + reg_info->n_refs++; + + /* Add the ref to the reg_def chain. */ + df_reg_chain_create (reg_info, this_ref); + DF_REF_ID (this_ref) = df->def_info.bitmap_size; + if (df->def_info.add_refs_inline) + { + if (DF_DEFS_SIZE (df) >= df->def_info.refs_size) + { + int new_size = df->def_info.bitmap_size + + df->def_info.bitmap_size / 4; + df_grow_ref_info (&df->def_info, new_size); + } + /* Add the ref to the big array of defs. */ + DF_DEFS_SET (df, df->def_info.bitmap_size, this_ref); + df->def_info.refs_organized = false; + } + + df->def_info.bitmap_size++; + + if (DF_REF_FLAGS (this_ref) & DF_REF_ARTIFICIAL) + { + struct df_scan_bb_info *bb_info + = df_scan_get_bb_info (dflow, bb->index); + this_ref->next_ref = bb_info->artificial_defs; + bb_info->artificial_defs = this_ref; + } + else + { + this_ref->next_ref = DF_INSN_GET (df, insn)->defs; + DF_INSN_GET (df, insn)->defs = this_ref; + } + } + else + { + struct df_reg_info *reg_info = DF_REG_USE_GET (df, regno); + reg_info->n_refs++; + + /* Add the ref to the reg_use chain. */ + df_reg_chain_create (reg_info, this_ref); + DF_REF_ID (this_ref) = df->use_info.bitmap_size; + if (df->use_info.add_refs_inline) + { + if (DF_USES_SIZE (df) >= df->use_info.refs_size) + { + int new_size = df->use_info.bitmap_size + + df->use_info.bitmap_size / 4; + df_grow_ref_info (&df->use_info, new_size); + } + /* Add the ref to the big array of defs. */ + DF_USES_SET (df, df->use_info.bitmap_size, this_ref); + df->use_info.refs_organized = false; + } + + df->use_info.bitmap_size++; + if (DF_REF_FLAGS (this_ref) & DF_REF_ARTIFICIAL) + { + struct df_scan_bb_info *bb_info + = df_scan_get_bb_info (dflow, bb->index); + this_ref->next_ref = bb_info->artificial_uses; + bb_info->artificial_uses = this_ref; + } + else + { + this_ref->next_ref = DF_INSN_GET (df, insn)->uses; + DF_INSN_GET (df, insn)->uses = this_ref; + } + } + return this_ref; +} + + +/* 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 dataflow *dflow, rtx reg, rtx *loc, + basic_block bb, rtx insn, + enum df_ref_type ref_type, + enum df_ref_flags ref_flags, + bool record_live) +{ + unsigned int regno; + struct df *df = dflow->df; + + gcc_assert (REG_P (reg) || GET_CODE (reg) == SUBREG); + + /* 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 ((df->flags & DF_SUBREGS) == 0 + && 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++) + { + /* Calls are handled at call site because regs_ever_live + doesn't include clobbered regs, only used ones. */ + if (ref_type == DF_REF_REG_DEF && record_live) + regs_ever_live[i] = 1; + else if ((ref_type == DF_REF_REG_USE + || ref_type == DF_REF_REG_MEM_STORE + || ref_type == DF_REF_REG_MEM_LOAD) + && ((ref_flags & DF_REF_ARTIFICIAL) == 0)) + { + /* Set regs_ever_live on uses of non-eliminable frame + pointers and arg pointers. */ + if (! (TEST_HARD_REG_BIT (elim_reg_set, regno) + && (regno == FRAME_POINTER_REGNUM + || regno == ARG_POINTER_REGNUM))) + regs_ever_live[i] = 1; + } + + df_ref_create_structure (dflow, regno_reg_rtx[i], loc, + bb, insn, ref_type, ref_flags); + } + } + else + { + df_ref_create_structure (dflow, reg, loc, + bb, insn, ref_type, ref_flags); + } +} + + +/* A set to a non-paradoxical SUBREG for which the number of word_mode units + covered by the outer mode is smaller than that covered by the inner mode, + is a read-modify-write operation. + This function returns true iff the SUBREG X is such a SUBREG. */ + +bool +df_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)); + return (isize > osize && isize > UNITS_PER_WORD); +} + + +/* Process all the registers defined in the rtx, X. + Autoincrement/decrement definitions will be picked up by + df_uses_record. */ + +static void +df_def_record_1 (struct dataflow *dflow, rtx x, + basic_block bb, rtx insn, + enum df_ref_flags flags, bool record_live) +{ + rtx *loc; + rtx dst; + + /* 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 (dflow, temp, bb, insn, + GET_CODE (temp) == CLOBBER ? flags | DF_REF_CLOBBER : flags, + record_live); + } + 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 + || df_read_modify_subreg_p (dst)) + { +#if 0 + /* 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; + } +#endif + loc = &XEXP (dst, 0); + dst = *loc; + flags |= DF_REF_READ_WRITE; + } + + if (REG_P (dst) + || (GET_CODE (dst) == SUBREG && REG_P (SUBREG_REG (dst)))) + df_ref_record (dflow, dst, loc, bb, insn, + DF_REF_REG_DEF, flags, record_live); +} + + +/* Process all the registers defined in the pattern rtx, X. */ + +static void +df_defs_record (struct dataflow *dflow, 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 (dflow, x, bb, insn, + code == CLOBBER ? DF_REF_CLOBBER : 0, true); + } + else if (code == COND_EXEC) + { + df_defs_record (dflow, COND_EXEC_CODE (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--) + df_defs_record (dflow, XVECEXP (x, 0, i), bb, insn); + } +} + + +/* Process all the registers used in the rtx at address LOC. */ + +static void +df_uses_record (struct dataflow *dflow, 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 (MEM_P (XEXP (x, 0))) + df_uses_record (dflow, &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 (dflow, &XEXP (x, 0), DF_REF_REG_MEM_LOAD, bb, insn, + flags & DF_REF_IN_NOTE); + return; + + case SUBREG: + /* While we're here, optimize this case. */ + + /* In case the SUBREG is not of a REG, do not optimize. */ + if (!REG_P (SUBREG_REG (x))) + { + loc = &SUBREG_REG (x); + df_uses_record (dflow, loc, ref_type, bb, insn, flags); + return; + } + /* ... Fall through ... */ + + case REG: + df_ref_record (dflow, x, loc, bb, insn, ref_type, flags, true); + return; + + case SET: + { + rtx dst = SET_DEST (x); + gcc_assert (!(flags & DF_REF_IN_NOTE)); + df_uses_record (dflow, &SET_SRC (x), DF_REF_REG_USE, bb, insn, 0); + + switch (GET_CODE (dst)) + { + case SUBREG: + if (df_read_modify_subreg_p (dst)) + { + df_uses_record (dflow, &SUBREG_REG (dst), + DF_REF_REG_USE, bb, + insn, DF_REF_READ_WRITE); + break; + } + /* Fall through. */ + case REG: + case PARALLEL: + case SCRATCH: + case PC: + case CC0: + break; + case MEM: + df_uses_record (dflow, &XEXP (dst, 0), + DF_REF_REG_MEM_STORE, + bb, insn, 0); + break; + case STRICT_LOW_PART: + { + rtx *temp = &XEXP (dst, 0); + /* A strict_low_part uses the whole REG and not just the + SUBREG. */ + dst = XEXP (dst, 0); + df_uses_record (dflow, + (GET_CODE (dst) == SUBREG) + ? &SUBREG_REG (dst) : temp, + DF_REF_REG_USE, bb, + insn, DF_REF_READ_WRITE); + } + break; + case ZERO_EXTRACT: + case SIGN_EXTRACT: + df_uses_record (dflow, &XEXP (dst, 0), + DF_REF_REG_USE, bb, insn, + DF_REF_READ_WRITE); + df_uses_record (dflow, &XEXP (dst, 1), + DF_REF_REG_USE, bb, insn, 0); + df_uses_record (dflow, &XEXP (dst, 2), + DF_REF_REG_USE, bb, insn, 0); + dst = XEXP (dst, 0); + break; + default: + gcc_unreachable (); + } + 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. + + However, flow.c's liveness computation did *not* do this, + giving the reasoning as " ?!? Unfortunately, marking all + hard registers as live causes massive problems for the + register allocator and marking all pseudos as live creates + mountains of uninitialized variable warnings." + + In order to maintain the status quo with regard to liveness + and uses, we do what flow.c did and just mark any regs we + can find in ASM_OPERANDS as used. Later on, when liveness + is computed, asm insns are scanned and regs_asm_clobbered + is filled out. + + 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 (dflow, &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 (dflow, XEXP (x, 0), &XEXP (x, 0), bb, insn, + DF_REF_REG_DEF, DF_REF_READ_WRITE, true); + + /* ... 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 (dflow, &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 (dflow, &XVECEXP (x, i, j), ref_type, + bb, insn, flags); + } + } + } +} + +/* Return true if *LOC contains an asm. */ + +static int +df_insn_contains_asm_1 (rtx *loc, void *data ATTRIBUTE_UNUSED) +{ + if ( !*loc) + return 0; + if (GET_CODE (*loc) == ASM_OPERANDS) + return 1; + return 0; +} + + +/* Return true if INSN contains an ASM. */ + +static int +df_insn_contains_asm (rtx insn) +{ + return for_each_rtx (&insn, df_insn_contains_asm_1, NULL); +} + + + +/* Record all the refs for DF within INSN of basic block BB. */ + +static void +df_insn_refs_record (struct dataflow *dflow, basic_block bb, rtx insn) +{ + int i; + struct df *df = dflow->df; + + if (INSN_P (insn)) + { + rtx note; + + if (df_insn_contains_asm (insn)) + DF_INSN_CONTAINS_ASM (df, insn) = true; + + /* Record register defs. */ + df_defs_record (dflow, 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 (dflow, &XEXP (note, 0), DF_REF_REG_USE, + bb, insn, DF_REF_IN_NOTE); + default: + break; + } + } + + if (CALL_P (insn)) + { + rtx note; + + /* Record the registers used to pass arguments, and explicitly + noted as clobbered. */ + for (note = CALL_INSN_FUNCTION_USAGE (insn); note; + note = XEXP (note, 1)) + { + if (GET_CODE (XEXP (note, 0)) == USE) + df_uses_record (dflow, &XEXP (XEXP (note, 0), 0), + DF_REF_REG_USE, + bb, insn, 0); + else if (GET_CODE (XEXP (note, 0)) == CLOBBER) + { + df_defs_record (dflow, XEXP (note, 0), bb, insn); + if (REG_P (XEXP (XEXP (note, 0), 0))) + { + rtx reg = XEXP (XEXP (note, 0), 0); + int regno_last; + int regno_first; + int i; + + regno_last = regno_first = REGNO (reg); + if (regno_first < FIRST_PSEUDO_REGISTER) + regno_last + += hard_regno_nregs[regno_first][GET_MODE (reg)] - 1; + for (i = regno_first; i <= regno_last; i++) + regs_ever_live[i] = 1; + } + } + } + + /* The stack ptr is used (honorarily) by a CALL insn. */ + df_uses_record (dflow, ®no_reg_rtx[STACK_POINTER_REGNUM], + DF_REF_REG_USE, bb, insn, + 0); + + if (df->flags & DF_HARD_REGS) + { + bitmap_iterator bi; + unsigned int ui; + /* 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]) + df_uses_record (dflow, ®no_reg_rtx[i], + DF_REF_REG_USE, bb, insn, + 0); + EXECUTE_IF_SET_IN_BITMAP (df_invalidated_by_call, 0, ui, bi) + df_ref_record (dflow, regno_reg_rtx[ui], ®no_reg_rtx[ui], bb, insn, + DF_REF_REG_DEF, DF_REF_CLOBBER, false); + } + } + + /* Record the register uses. */ + df_uses_record (dflow, &PATTERN (insn), + DF_REF_REG_USE, bb, insn, 0); + + } +} + +static bool +df_has_eh_preds (basic_block bb) +{ + edge e; + edge_iterator ei; + + FOR_EACH_EDGE (e, ei, bb->preds) + { + if (e->flags & EDGE_EH) + return true; + } + return false; +} + +/* Record all the refs within the basic block BB. */ + +static void +df_bb_refs_record (struct dataflow *dflow, basic_block bb) +{ + struct df *df = dflow->df; + rtx insn; + int luid = 0; + struct df_scan_bb_info *bb_info = df_scan_get_bb_info (dflow, bb->index); + + /* Need to make sure that there is a record in the basic block info. */ + if (!bb_info) + { + bb_info = (struct df_scan_bb_info *) pool_alloc (dflow->block_pool); + df_scan_set_bb_info (dflow, bb->index, bb_info); + bb_info->artificial_defs = NULL; + bb_info->artificial_uses = NULL; + } + + /* Scan the block an insn at a time from beginning to end. */ + FOR_BB_INSNS (bb, insn) + { + df_insn_create_insn_record (dflow, insn); + if (INSN_P (insn)) + { + /* Record defs within INSN. */ + DF_INSN_LUID (df, insn) = luid++; + df_insn_refs_record (dflow, bb, insn); + } + DF_INSN_LUID (df, insn) = luid; + } + +#ifdef EH_RETURN_DATA_REGNO + if ((df->flags & DF_HARD_REGS) + && df_has_eh_preds (bb)) + { + unsigned int i; + /* Mark the registers that will contain data 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; + df_ref_record (dflow, regno_reg_rtx[i], ®no_reg_rtx[i], bb, NULL, + DF_REF_REG_DEF, DF_REF_ARTIFICIAL | DF_REF_AT_TOP, false); + } + } +#endif + +#ifdef EH_USES + /* This code is putting in a artificial ref for the use at the TOP + of the block that receives the exception. It is too cumbersome + to actually put the ref on the edge. We could either model this + at the top of the receiver block or the bottom of the sender + block. + + The bottom of the sender block is problematic because not all + out-edges of the a block are eh-edges. However, it is true that + all edges into a block are either eh-edges or none of them are + eh-edges. Thus, we can model this at the top of the eh-receiver + for all of the edges at once. */ + if ((df->flags & DF_HARD_REGS) + && df_has_eh_preds (bb)) + { + unsigned int i; + for (i = 0; i < FIRST_PSEUDO_REGISTER; i++) + if (EH_USES (i)) + df_uses_record (dflow, ®no_reg_rtx[i], + DF_REF_REG_USE, EXIT_BLOCK_PTR, NULL, + DF_REF_ARTIFICIAL | DF_REF_AT_TOP); + } +#endif + + if ((df->flags & DF_HARD_REGS) + && bb->index >= NUM_FIXED_BLOCKS) + { + /* Before reload, there are a few registers that must be forced + live everywhere -- which might not already be the case for + blocks within infinite loops. */ + if (! reload_completed) + { + + /* Any reference to any pseudo before reload is a potential + reference of the frame pointer. */ + df_uses_record (dflow, ®no_reg_rtx [FRAME_POINTER_REGNUM], + DF_REF_REG_USE, bb, NULL, DF_REF_ARTIFICIAL); + +#if FRAME_POINTER_REGNUM != ARG_POINTER_REGNUM + /* Pseudos with argument area equivalences may require + reloading via the argument pointer. */ + if (fixed_regs[ARG_POINTER_REGNUM]) + df_uses_record (dflow, ®no_reg_rtx[ARG_POINTER_REGNUM], + DF_REF_REG_USE, bb, NULL, + DF_REF_ARTIFICIAL); +#endif + + /* Any constant, or pseudo with constant equivalences, may + require reloading from memory using the pic register. */ + if ((unsigned) PIC_OFFSET_TABLE_REGNUM != INVALID_REGNUM + && fixed_regs[PIC_OFFSET_TABLE_REGNUM]) + df_uses_record (dflow, ®no_reg_rtx[PIC_OFFSET_TABLE_REGNUM], + DF_REF_REG_USE, bb, NULL, + DF_REF_ARTIFICIAL); + } + /* The all-important stack pointer must always be live. */ + df_uses_record (dflow, ®no_reg_rtx[STACK_POINTER_REGNUM], + DF_REF_REG_USE, bb, NULL, DF_REF_ARTIFICIAL); + } +} + + +/* Record all the refs in the basic blocks specified by BLOCKS. */ + +static void +df_refs_record (struct dataflow *dflow, bitmap blocks) +{ + unsigned int bb_index; + bitmap_iterator bi; + + EXECUTE_IF_SET_IN_BITMAP (blocks, 0, bb_index, bi) + { + basic_block bb = BASIC_BLOCK (bb_index); + df_bb_refs_record (dflow, bb); + } + + if (bitmap_bit_p (blocks, EXIT_BLOCK)) + df_record_exit_block_uses (dflow); +} + + +/*---------------------------------------------------------------------------- + Specialized hard register scanning functions. +----------------------------------------------------------------------------*/ + +/* Mark a register in SET. Hard registers in large modes get all + of their component registers set as well. */ + +static void +df_mark_reg (rtx reg, void *vset) +{ + bitmap set = (bitmap) vset; + int regno = REGNO (reg); + + gcc_assert (GET_MODE (reg) != BLKmode); + + bitmap_set_bit (set, regno); + if (regno < FIRST_PSEUDO_REGISTER) + { + int n = hard_regno_nregs[regno][GET_MODE (reg)]; + while (--n > 0) + bitmap_set_bit (set, regno + n); + } +} + +/* Record the set of hard registers that are used in the exit block. */ + +static void +df_record_exit_block_uses (struct dataflow *dflow) +{ + unsigned int i; + bitmap_iterator bi; + struct df *df = dflow->df; + + bitmap_clear (df->exit_block_uses); + + if (! (df->flags & DF_HARD_REGS)) + return; + + /* If exiting needs the right stack value, consider the stack + pointer live at the end of the function. */ + if ((HAVE_epilogue && epilogue_completed) + || ! EXIT_IGNORE_STACK + || (! FRAME_POINTER_REQUIRED + && ! current_function_calls_alloca + && flag_omit_frame_pointer) + || current_function_sp_is_unchanging) + { + bitmap_set_bit (df->exit_block_uses, STACK_POINTER_REGNUM); + } + + /* Mark the frame pointer if needed at the end of the function. + If we end up eliminating it, it will be removed from the live + list of each basic block by reload. */ + + if (! reload_completed || frame_pointer_needed) + { + bitmap_set_bit (df->exit_block_uses, FRAME_POINTER_REGNUM); +#if FRAME_POINTER_REGNUM != HARD_FRAME_POINTER_REGNUM + /* If they are different, also mark the hard frame pointer as live. */ + if (! LOCAL_REGNO (HARD_FRAME_POINTER_REGNUM)) + bitmap_set_bit (df->exit_block_uses, HARD_FRAME_POINTER_REGNUM); +#endif + } + +#ifndef PIC_OFFSET_TABLE_REG_CALL_CLOBBERED + /* Many architectures have a GP register even without flag_pic. + Assume the pic register is not in use, or will be handled by + other means, if it is not fixed. */ + if ((unsigned) PIC_OFFSET_TABLE_REGNUM != INVALID_REGNUM + && fixed_regs[PIC_OFFSET_TABLE_REGNUM]) + bitmap_set_bit (df->exit_block_uses, PIC_OFFSET_TABLE_REGNUM); +#endif + + /* Mark all global registers, and all registers used by the + epilogue as being live at the end of the function since they + may be referenced by our caller. */ + for (i = 0; i < FIRST_PSEUDO_REGISTER; i++) + if (global_regs[i] || EPILOGUE_USES (i)) + bitmap_set_bit (df->exit_block_uses, i); + + if (HAVE_epilogue && epilogue_completed) + { + /* Mark all call-saved registers that we actually used. */ + for (i = 0; i < FIRST_PSEUDO_REGISTER; i++) + if (regs_ever_live[i] && ! LOCAL_REGNO (i) + && ! TEST_HARD_REG_BIT (regs_invalidated_by_call, i)) + bitmap_set_bit (df->exit_block_uses, i); + } + +#ifdef EH_RETURN_DATA_REGNO + /* Mark the registers that will contain data for the handler. */ + if (reload_completed && current_function_calls_eh_return) + for (i = 0; ; ++i) + { + unsigned regno = EH_RETURN_DATA_REGNO (i); + if (regno == INVALID_REGNUM) + break; + bitmap_set_bit (df->exit_block_uses, regno); + } +#endif + +#ifdef EH_RETURN_STACKADJ_RTX + if ((! HAVE_epilogue || ! epilogue_completed) + && current_function_calls_eh_return) + { + rtx tmp = EH_RETURN_STACKADJ_RTX; + if (tmp && REG_P (tmp)) + df_mark_reg (tmp, df->exit_block_uses); + } +#endif + +#ifdef EH_RETURN_HANDLER_RTX + if ((! HAVE_epilogue || ! epilogue_completed) + && current_function_calls_eh_return) + { + rtx tmp = EH_RETURN_HANDLER_RTX; + if (tmp && REG_P (tmp)) + df_mark_reg (tmp, df->exit_block_uses); + } +#endif + + /* Mark function return value. */ + diddle_return_value (df_mark_reg, (void*) df->exit_block_uses); + + if (df->flags & DF_HARD_REGS) + EXECUTE_IF_SET_IN_BITMAP (df->exit_block_uses, 0, i, bi) + df_uses_record (dflow, ®no_reg_rtx[i], + DF_REF_REG_USE, EXIT_BLOCK_PTR, NULL, + DF_REF_ARTIFICIAL); +} + +static bool initialized = false; + +/* Initialize some platform specific structures. */ + +void +df_hard_reg_init (void) +{ + int i; +#ifdef ELIMINABLE_REGS + static const struct {const int from, to; } eliminables[] = ELIMINABLE_REGS; +#endif + /* After reload, some ports add certain bits to regs_ever_live so + this cannot be reset. */ + + if (!reload_completed) + memset (regs_ever_live, 0, sizeof (regs_ever_live)); + + if (initialized) + return; + + bitmap_obstack_initialize (&persistent_obstack); + + /* Record which registers will be eliminated. We use this in + mark_used_regs. */ + CLEAR_HARD_REG_SET (elim_reg_set); + +#ifdef ELIMINABLE_REGS + for (i = 0; i < (int) ARRAY_SIZE (eliminables); i++) + SET_HARD_REG_BIT (elim_reg_set, eliminables[i].from); +#else + SET_HARD_REG_BIT (elim_reg_set, FRAME_POINTER_REGNUM); +#endif + + df_invalidated_by_call = BITMAP_ALLOC (&persistent_obstack); + + /* Inconveniently, this is only readily available in hard reg set + form. */ + for (i = 0; i < FIRST_PSEUDO_REGISTER; ++i) + if (TEST_HARD_REG_BIT (regs_invalidated_by_call, i)) + bitmap_set_bit (df_invalidated_by_call, i); + + df_all_hard_regs = BITMAP_ALLOC (&persistent_obstack); + + for (i = 0; i < FIRST_PSEUDO_REGISTER; i++) + bitmap_set_bit (df_all_hard_regs, i); + + initialized = true; +} diff --git a/gcc/df.c b/gcc/df.c dissimilarity index 100% index d3abb6df4f6..e69de29bb2d 100644 --- a/gcc/df.c +++ b/gcc/df.c @@ -1,3975 +0,0 @@ -/* Dataflow support routines. - Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 - 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, 51 Franklin Street, Fifth Floor, Boston, MA -02110-1301, 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_analyze (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 analyze -everything. - -df_analyze 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_analyze - 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_analyze 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_analyze 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_analyze 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, or a set to a non-paradoxical SUBREG -for which the number of word_mode units covered by the outer mode is -smaller than that covered by the inner mode, invokes a read-modify-write. -operation. We generate both a use and a def and again mark them -read/write. -Paradoxical subreg writes don't leave a trace of the old content, so they -are write-only operations. */ - -#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" - -#define FOR_EACH_BB_IN_BITMAP(BITMAP, MIN, BB, CODE) \ - do \ - { \ - unsigned int node_; \ - bitmap_iterator bi; \ - EXECUTE_IF_SET_IN_BITMAP (BITMAP, MIN, node_, bi) \ - { \ - (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_bb_table_realloc (struct df *, unsigned int); -static void df_bitmaps_alloc (struct df *, bitmap, 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_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, bool); -static void df_bb_reg_use_chain_create (struct df *, basic_block); -static void df_reg_use_chain_create (struct df *, bitmap, bool); -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, bitmap); -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 *, bitmap); -static void df_analyze_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_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 *, void *, void *, void *, - void *, void *); -static void df_ru_transfer_function (int, int *, void *, void *, void *, - void *, void *); -static void df_lr_transfer_function (int, int *, void *, void *, void *, - void *, void *); -static void hybrid_search (basic_block, struct dataflow *, - sbitmap, sbitmap, sbitmap); - - -/* 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_ALLOC (NULL); - bitmap_zero (df->insns_modified); - } -} - -/* Increase the bb info table to have space for at least SIZE + 1 - elements. */ - -static void -df_bb_table_realloc (struct df *df, unsigned int size) -{ - size++; - if (size <= df->n_bbs) - return; - - /* Make the table a little larger than requested, so we do not need - to enlarge it so often. */ - size += df->n_bbs / 4; - - df->bbs = xrealloc (df->bbs, size * sizeof (struct bb_info)); - - memset (df->bbs + df->n_bbs, 0, (size - df->n_bbs) * sizeof (struct bb_info)); - - df->n_bbs = size; -} - -/* 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)); - df->reg_def_last = xrealloc (df->reg_def_last, - size * sizeof (struct ref *)); - - /* 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, bitmap blocks, int flags) -{ - basic_block bb; - - df->n_defs = df->def_id; - df->n_uses = df->use_id; - - if (!blocks) - blocks = df->all_blocks; - - FOR_EACH_BB_IN_BITMAP (blocks, 0, bb, - { - struct bb_info *bb_info = DF_BB_INFO (df, bb); - - if (flags & DF_RD) - { - if (!bb_info->rd_in) - { - /* Allocate bitmaps for reaching definitions. */ - bb_info->rd_kill = BITMAP_ALLOC (NULL); - bb_info->rd_gen = BITMAP_ALLOC (NULL); - bb_info->rd_in = BITMAP_ALLOC (NULL); - bb_info->rd_out = BITMAP_ALLOC (NULL); - } - else - { - bitmap_clear (bb_info->rd_kill); - bitmap_clear (bb_info->rd_gen); - bitmap_clear (bb_info->rd_in); - bitmap_clear (bb_info->rd_out); - } - } - - if (flags & DF_RU) - { - if (!bb_info->ru_in) - { - /* Allocate bitmaps for upward exposed uses. */ - bb_info->ru_kill = BITMAP_ALLOC (NULL); - bb_info->ru_gen = BITMAP_ALLOC (NULL); - bb_info->ru_in = BITMAP_ALLOC (NULL); - bb_info->ru_out = BITMAP_ALLOC (NULL); - } - else - { - bitmap_clear (bb_info->ru_kill); - bitmap_clear (bb_info->ru_gen); - bitmap_clear (bb_info->ru_in); - bitmap_clear (bb_info->ru_out); - } - } - - if (flags & DF_LR) - { - if (!bb_info->lr_in) - { - /* Allocate bitmaps for live variables. */ - bb_info->lr_def = BITMAP_ALLOC (NULL); - bb_info->lr_use = BITMAP_ALLOC (NULL); - bb_info->lr_in = BITMAP_ALLOC (NULL); - bb_info->lr_out = BITMAP_ALLOC (NULL); - } - else - { - bitmap_clear (bb_info->lr_def); - bitmap_clear (bb_info->lr_use); - bitmap_clear (bb_info->lr_in); - bitmap_clear (bb_info->lr_out); - } - } - }); -} - - -/* 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_FREE (bb_info->rd_kill); - bb_info->rd_kill = NULL; - BITMAP_FREE (bb_info->rd_gen); - bb_info->rd_gen = NULL; - BITMAP_FREE (bb_info->rd_in); - bb_info->rd_in = NULL; - BITMAP_FREE (bb_info->rd_out); - bb_info->rd_out = NULL; - } - - if ((flags & DF_RU) && bb_info->ru_in) - { - /* Free bitmaps for upward exposed uses. */ - BITMAP_FREE (bb_info->ru_kill); - bb_info->ru_kill = NULL; - BITMAP_FREE (bb_info->ru_gen); - bb_info->ru_gen = NULL; - BITMAP_FREE (bb_info->ru_in); - bb_info->ru_in = NULL; - BITMAP_FREE (bb_info->ru_out); - bb_info->ru_out = NULL; - } - - if ((flags & DF_LR) && bb_info->lr_in) - { - /* Free bitmaps for live variables. */ - BITMAP_FREE (bb_info->lr_def); - bb_info->lr_def = NULL; - BITMAP_FREE (bb_info->lr_use); - bb_info->lr_use = NULL; - BITMAP_FREE (bb_info->lr_in); - bb_info->lr_in = NULL; - BITMAP_FREE (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_insn_table_realloc (df, n_insns); - - df_reg_table_realloc (df, df->n_regs); - - df->bbs_modified = BITMAP_ALLOC (NULL); - bitmap_zero (df->bbs_modified); - - df->flags = 0; - - df->bbs = xcalloc (last_basic_block, sizeof (struct bb_info)); - - df->all_blocks = BITMAP_ALLOC (NULL); - 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; - - BITMAP_FREE (df->bbs_modified); - df->bbs_modified = 0; - - BITMAP_FREE (df->insns_modified); - df->insns_modified = 0; - - BITMAP_FREE (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; -} - -/* 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; -} - -/* Releases members of the CHAIN. */ - -static void -free_reg_ref_chain (struct df_link **chain) -{ - struct df_link *act, *next; - - for (act = *chain; act; act = next) - { - next = act->next; - pool_free (df_link_pool, act); - } - - *chain = NULL; -} - -/* 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. */ - gcc_assert (link->ref == ref); - - /* 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; - DF_REF_DATA (this_ref) = NULL; - - 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; - - gcc_assert (REG_P (reg) || GET_CODE (reg) == SUBREG); - - /* 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 ((df->flags & DF_SUBREGS) == 0 - && 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); - } -} - - -/* A set to a non-paradoxical SUBREG for which the number of word_mode units - covered by the outer mode is smaller than that covered by the inner mode, - is a read-modify-write operation. - This function returns true iff the SUBREG X is such a SUBREG. */ -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)); - 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 - || 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 (REG_P (dst) - || (GET_CODE (dst) == SUBREG && REG_P (SUBREG_REG (dst)))) - 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 (MEM_P (XEXP (x, 0))) - 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 (!REG_P (SUBREG_REG (x))) - { - 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 (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 SCRATCH: - 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); - gcc_assert (GET_CODE (dst) == SUBREG); - 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: - gcc_unreachable (); - } - 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 (CALL_P (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, &XEXP (x, 0), - 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 (CALL_P (insn)) - { - rtx note; - - /* We do not record hard registers clobbered by the call, - since there are awfully many of them and "defs" created - through them are not interesting (since no use can be legally - reached by them). So we must just make sure we include them when - computing kill bitmaps. */ - - /* 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_BB_INSNS (bb, insn) - { - if (INSN_P (insn)) - { - /* Record defs within INSN. */ - df_insn_refs_record (df, bb, insn); - } - } -} - - -/* 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). */ - - FOR_BB_INSNS_REVERSE (bb, 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. If REDO is true, add - all defs, otherwise just add the new defs. */ - -static void -df_reg_def_chain_create (struct df *df, bitmap blocks, bool redo) -{ - basic_block bb; -#ifdef ENABLE_CHECKING - unsigned regno; -#endif - unsigned old_def_id_save = df->def_id_save; - - if (redo) - { -#ifdef ENABLE_CHECKING - for (regno = 0; regno < df->n_regs; regno++) - gcc_assert (!df->regs[regno].defs); -#endif - - /* Pretend that all defs are new. */ - df->def_id_save = 0; - } - - FOR_EACH_BB_IN_BITMAP (blocks, 0, bb, - { - df_bb_reg_def_chain_create (df, bb); - }); - - df->def_id_save = old_def_id_save; -} - -/* Remove all reg-def chains stored in the dataflow object DF. */ - -static void -df_reg_def_chain_clean (struct df *df) -{ - unsigned regno; - - for (regno = 0; regno < df->n_regs; regno++) - free_reg_ref_chain (&df->regs[regno].defs); -} - -/* 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_BB_INSNS (bb, 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. If REDO is true, remove the - old reg-use chains first, otherwise just add new uses to them. */ - -static void -df_reg_use_chain_create (struct df *df, bitmap blocks, bool redo) -{ - basic_block bb; -#ifdef ENABLE_CHECKING - unsigned regno; -#endif - unsigned old_use_id_save = df->use_id_save; - - if (redo) - { -#ifdef ENABLE_CHECKING - for (regno = 0; regno < df->n_regs; regno++) - gcc_assert (!df->regs[regno].uses); -#endif - - /* Pretend that all uses are new. */ - df->use_id_save = 0; - } - - FOR_EACH_BB_IN_BITMAP (blocks, 0, bb, - { - df_bb_reg_use_chain_create (df, bb); - }); - - df->use_id_save = old_use_id_save; -} - -/* Remove all reg-use chains stored in the dataflow object DF. */ - -static void -df_reg_use_chain_clean (struct df *df) -{ - unsigned regno; - - for (regno = 0; regno < df->n_regs; regno++) - free_reg_ref_chain (&df->regs[regno].uses); -} - -/* 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_BB_INSNS_REVERSE (bb, 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_ALLOC (NULL); - - FOR_EACH_BB_IN_BITMAP (blocks, 0, bb, - { - df_bb_du_chain_create (df, bb, ru); - }); - - BITMAP_FREE (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_BB_INSNS (bb, 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, void *in, - void *out, void *gen, void *kill, - void *data ATTRIBUTE_UNUSED) -{ - *changed = bitmap_ior_and_compl (out, gen, in, kill); -} - - -static void -df_ru_transfer_function (int bb ATTRIBUTE_UNUSED, int *changed, void *in, - void *out, void *gen, void *kill, - void *data ATTRIBUTE_UNUSED) -{ - *changed = bitmap_ior_and_compl (in, gen, out, kill); -} - - -static void -df_lr_transfer_function (int bb ATTRIBUTE_UNUSED, int *changed, void *in, - void *out, void *use, void *def, - void *data ATTRIBUTE_UNUSED) -{ - *changed = bitmap_ior_and_compl (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, bitmap call_killed_defs) -{ - struct bb_info *bb_info = DF_BB_INFO (df, bb); - rtx insn; - bitmap seen = BITMAP_ALLOC (NULL); - bool call_seen = false; - - FOR_BB_INSNS_REVERSE (bb, 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; - - if (bitmap_bit_p (seen, regno) - || (call_seen - && regno < FIRST_PSEUDO_REGISTER - && TEST_HARD_REG_BIT (regs_invalidated_by_call, regno))) - continue; - - 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)); - } - - bitmap_set_bit (bb_info->rd_gen, DF_REF_ID (def)); - bitmap_set_bit (seen, regno); - } - - if (CALL_P (insn) && (df->flags & DF_HARD_REGS)) - { - bitmap_ior_into (bb_info->rd_kill, call_killed_defs); - call_seen = 1; - } - } - - BITMAP_FREE (seen); -} - - -/* 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; - bitmap killed_by_call = NULL; - unsigned regno; - struct df_link *def_link; - - if (df->flags & DF_HARD_REGS) - { - killed_by_call = BITMAP_ALLOC (NULL); - for (regno = 0; regno < FIRST_PSEUDO_REGISTER; regno++) - { - if (!TEST_HARD_REG_BIT (regs_invalidated_by_call, regno)) - continue; - - for (def_link = df->regs[regno].defs; - def_link; - def_link = def_link->next) - bitmap_set_bit (killed_by_call, DF_REF_ID (def_link->ref)); - } - } - - FOR_EACH_BB_IN_BITMAP (blocks, 0, bb, - { - df_bb_rd_local_compute (df, bb, killed_by_call); - }); - - if (df->flags & DF_HARD_REGS) - BITMAP_FREE (killed_by_call); -} - - -/* 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_BB_INSNS_REVERSE (bb, 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)); - } - } -} - - -/* 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_BB_INSNS_REVERSE (bb, 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)); - } - } -} - - -/* 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_BB_INSNS_REVERSE (bb, insn) - { - unsigned int uid = INSN_UID (insn); - unsigned int regno; - struct df_link *link; - bitmap_iterator bi; - - 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, bi) - { - 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_ALLOC (NULL); - - FOR_EACH_BB_IN_BITMAP (blocks, 0, bb, - { - df_bb_reg_info_compute (df, bb, live); - }); - - BITMAP_FREE (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_BB_INSNS (bb, insn) - { - if (INSN_P (insn)) - DF_INSN_LUID (df, insn) = luid++; - DF_INSN_LUID (df, insn) = luid; - } - 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_analyze_1 (struct df *df, bitmap blocks, int flags, int update) -{ - int aflags; - int dflags; - int i; - basic_block bb; - struct dataflow dflow; - - 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, NULL); - /* 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, NULL, 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, false); - } - - if (aflags & DF_RU_CHAIN) - { - df_reg_use_chain_create (df, blocks, false); - } - - 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. */ - dflow.in = xmalloc (sizeof (bitmap) * last_basic_block); - dflow.out = xmalloc (sizeof (bitmap) * last_basic_block); - dflow.gen = xmalloc (sizeof (bitmap) * last_basic_block); - dflow.kill = xmalloc (sizeof (bitmap) * last_basic_block); - - df_rd_local_compute (df, df->flags & DF_RD ? blocks : df->all_blocks); - FOR_EACH_BB (bb) - { - dflow.in[bb->index] = DF_BB_INFO (df, bb)->rd_in; - dflow.out[bb->index] = DF_BB_INFO (df, bb)->rd_out; - dflow.gen[bb->index] = DF_BB_INFO (df, bb)->rd_gen; - dflow.kill[bb->index] = DF_BB_INFO (df, bb)->rd_kill; - } - - dflow.repr = SR_BITMAP; - dflow.dir = DF_FORWARD; - dflow.conf_op = DF_UNION; - dflow.transfun = df_rd_transfer_function; - dflow.n_blocks = n_basic_blocks; - dflow.order = df->rc_order; - dflow.data = NULL; - - iterative_dataflow (&dflow); - free (dflow.in); - free (dflow.out); - free (dflow.gen); - free (dflow.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. */ - dflow.in = xmalloc (sizeof (bitmap) * last_basic_block); - dflow.out = xmalloc (sizeof (bitmap) * last_basic_block); - dflow.gen = xmalloc (sizeof (bitmap) * last_basic_block); - dflow.kill = xmalloc (sizeof (bitmap) * last_basic_block); - - df_ru_local_compute (df, df->flags & DF_RU ? blocks : df->all_blocks); - - FOR_EACH_BB (bb) - { - dflow.in[bb->index] = DF_BB_INFO (df, bb)->ru_in; - dflow.out[bb->index] = DF_BB_INFO (df, bb)->ru_out; - dflow.gen[bb->index] = DF_BB_INFO (df, bb)->ru_gen; - dflow.kill[bb->index] = DF_BB_INFO (df, bb)->ru_kill; - } - - dflow.repr = SR_BITMAP; - dflow.dir = DF_BACKWARD; - dflow.conf_op = DF_UNION; - dflow.transfun = df_ru_transfer_function; - dflow.n_blocks = n_basic_blocks; - dflow.order = df->rts_order; - dflow.data = NULL; - - iterative_dataflow (&dflow); - free (dflow.in); - free (dflow.out); - free (dflow.gen); - free (dflow.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. */ - dflow.in = xmalloc (sizeof (bitmap) * last_basic_block); - dflow.out = xmalloc (sizeof (bitmap) * last_basic_block); - dflow.gen = xmalloc (sizeof (bitmap) * last_basic_block); - dflow.kill = xmalloc (sizeof (bitmap) * last_basic_block); - - df_lr_local_compute (df, df->flags & DF_LR ? blocks : df->all_blocks); - - FOR_EACH_BB (bb) - { - dflow.in[bb->index] = DF_BB_INFO (df, bb)->lr_in; - dflow.out[bb->index] = DF_BB_INFO (df, bb)->lr_out; - dflow.gen[bb->index] = DF_BB_INFO (df, bb)->lr_use; - dflow.kill[bb->index] = DF_BB_INFO (df, bb)->lr_def; - } - - dflow.repr = SR_BITMAP; - dflow.dir = DF_BACKWARD; - dflow.conf_op = DF_UNION; - dflow.transfun = df_lr_transfer_function; - dflow.n_blocks = n_basic_blocks; - dflow.order = df->rts_order; - dflow.data = NULL; - - iterative_dataflow (&dflow); - free (dflow.in); - free (dflow.out); - free (dflow.gen); - free (dflow.kill); - } - - 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_BB_INSNS (bb, 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++; - } - } - return count; -} - - -/* Process all the modified/deleted insns that were queued. */ -static int -df_refs_update (struct df *df, bitmap blocks) -{ - basic_block bb; - unsigned count = 0, bbno; - - df->n_regs = max_reg_num (); - if (df->n_regs >= df->reg_size) - df_reg_table_realloc (df, 0); - - df_refs_queue (df); - - if (!blocks) - { - FOR_EACH_BB_IN_BITMAP (df->bbs_modified, 0, bb, - { - count += df_bb_refs_update (df, bb); - }); - } - else - { - bitmap_iterator bi; - - EXECUTE_IF_AND_IN_BITMAP (df->bbs_modified, blocks, 0, bbno, bi) - { - count += df_bb_refs_update (df, BASIC_BLOCK (bbno)); - } - } - - 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_analyze (struct df *df, bitmap blocks, int flags) -{ - int update; - - /* We could deal with additional basic blocks being created by - rescanning everything again. */ - gcc_assert (!df->n_bbs || df->n_bbs == (unsigned int) last_basic_block); - - 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_analyze_1 (df, 0, flags, 0); - update = 1; - } - else - { - if (blocks == (bitmap) -1) - blocks = df->bbs_modified; - - gcc_assert (df->n_bbs); - - df_analyze_1 (df, blocks, flags, 1); - bitmap_zero (df->bbs_modified); - bitmap_zero (df->insns_modified); - } - } - return update; -} - -/* Remove the entries not in BLOCKS from the LIST of length LEN, preserving - the order of the remaining entries. Returns the length of the resulting - list. */ - -static unsigned -prune_to_subcfg (int list[], unsigned len, bitmap blocks) -{ - unsigned act, last; - - for (act = 0, last = 0; act < len; act++) - if (bitmap_bit_p (blocks, list[act])) - list[last++] = list[act]; - - return last; -} - -/* Alternative entry point to the analysis. Analyze just the part of the cfg - graph induced by BLOCKS. - - TODO I am not quite sure how to avoid code duplication with df_analyze_1 - here, and simultaneously not make even greater chaos in it. We behave - slightly differently in some details, especially in handling modified - insns. */ - -void -df_analyze_subcfg (struct df *df, bitmap blocks, int flags) -{ - rtx insn; - basic_block bb; - struct dataflow dflow; - unsigned n_blocks; - - if (flags & DF_UD_CHAIN) - flags |= DF_RD | DF_RD_CHAIN; - if (flags & DF_DU_CHAIN) - flags |= DF_RU; - if (flags & DF_RU) - flags |= DF_RU_CHAIN; - if (flags & DF_REG_INFO) - flags |= DF_LR; - - if (!df->n_bbs) - { - df_alloc (df, max_reg_num ()); - - /* Mark all insns as modified. */ - - FOR_EACH_BB (bb) - { - FOR_BB_INSNS (bb, insn) - { - df_insn_modify (df, bb, insn); - } - } - } - - df->flags = flags; - - df_reg_def_chain_clean (df); - df_reg_use_chain_clean (df); - - df_refs_update (df, blocks); - - /* Clear the updated stuff from ``modified'' bitmaps. */ - FOR_EACH_BB_IN_BITMAP (blocks, 0, bb, - { - if (bitmap_bit_p (df->bbs_modified, bb->index)) - { - FOR_BB_INSNS (bb, insn) - { - bitmap_clear_bit (df->insns_modified, INSN_UID (insn)); - } - - bitmap_clear_bit (df->bbs_modified, bb->index); - } - }); - - /* 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, blocks, flags); - - /* 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 (flags & DF_RD_CHAIN) - { - df_reg_def_chain_create (df, blocks, true); - } - - if (flags & DF_RU_CHAIN) - { - df_reg_use_chain_create (df, blocks, true); - } - - 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); - - flow_depth_first_order_compute (df->dfs_order, df->rc_order); - flow_reverse_top_sort_order_compute (df->rts_order); - - n_blocks = prune_to_subcfg (df->dfs_order, n_basic_blocks, blocks); - prune_to_subcfg (df->rc_order, n_basic_blocks, blocks); - prune_to_subcfg (df->rts_order, n_basic_blocks, blocks); - - dflow.in = xmalloc (sizeof (bitmap) * last_basic_block); - dflow.out = xmalloc (sizeof (bitmap) * last_basic_block); - dflow.gen = xmalloc (sizeof (bitmap) * last_basic_block); - dflow.kill = xmalloc (sizeof (bitmap) * last_basic_block); - - if (flags & DF_RD) - { - /* Compute the sets of gens and kills for the defs of each bb. */ - df_rd_local_compute (df, blocks); - - FOR_EACH_BB_IN_BITMAP (blocks, 0, bb, - { - dflow.in[bb->index] = DF_BB_INFO (df, bb)->rd_in; - dflow.out[bb->index] = DF_BB_INFO (df, bb)->rd_out; - dflow.gen[bb->index] = DF_BB_INFO (df, bb)->rd_gen; - dflow.kill[bb->index] = DF_BB_INFO (df, bb)->rd_kill; - }); - - dflow.repr = SR_BITMAP; - dflow.dir = DF_FORWARD; - dflow.conf_op = DF_UNION; - dflow.transfun = df_rd_transfer_function; - dflow.n_blocks = n_blocks; - dflow.order = df->rc_order; - dflow.data = NULL; - - iterative_dataflow (&dflow); - } - - if (flags & DF_UD_CHAIN) - { - /* Create use-def chains. */ - df_ud_chain_create (df, blocks); - } - - if (flags & DF_RU) - { - /* Compute the sets of gens and kills for the upwards exposed - uses in each bb. */ - df_ru_local_compute (df, blocks); - - FOR_EACH_BB_IN_BITMAP (blocks, 0, bb, - { - dflow.in[bb->index] = DF_BB_INFO (df, bb)->ru_in; - dflow.out[bb->index] = DF_BB_INFO (df, bb)->ru_out; - dflow.gen[bb->index] = DF_BB_INFO (df, bb)->ru_gen; - dflow.kill[bb->index] = DF_BB_INFO (df, bb)->ru_kill; - }); - - dflow.repr = SR_BITMAP; - dflow.dir = DF_BACKWARD; - dflow.conf_op = DF_UNION; - dflow.transfun = df_ru_transfer_function; - dflow.n_blocks = n_blocks; - dflow.order = df->rts_order; - dflow.data = NULL; - - iterative_dataflow (&dflow); - } - - if (flags & DF_DU_CHAIN) - { - /* Create def-use chains. */ - df_du_chain_create (df, blocks); - } - - if (flags & DF_LR) - { - /* Compute the sets of defs and uses of live variables. */ - df_lr_local_compute (df, blocks); - - FOR_EACH_BB (bb) - { - dflow.in[bb->index] = DF_BB_INFO (df, bb)->lr_in; - dflow.out[bb->index] = DF_BB_INFO (df, bb)->lr_out; - dflow.gen[bb->index] = DF_BB_INFO (df, bb)->lr_use; - dflow.kill[bb->index] = DF_BB_INFO (df, bb)->lr_def; - } - - dflow.repr = SR_BITMAP; - dflow.dir = DF_BACKWARD; - dflow.conf_op = DF_UNION; - dflow.transfun = df_lr_transfer_function; - dflow.n_blocks = n_blocks; - dflow.order = df->rts_order; - dflow.data = NULL; - - iterative_dataflow (&dflow); - } - - if (flags & DF_REG_INFO) - { - df_reg_info_compute (df, blocks); - } - - free (dflow.in); - free (dflow.out); - free (dflow.gen); - free (dflow.kill); - - free (df->dfs_order); - free (df->rc_order); - free (df->rts_order); -} - -/* 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. */ - gcc_assert (insn != BB_HEAD (bb)); - - /* Delete the insn. */ - delete_insn (insn); - - df_insn_modify (df, bb, insn); - - return NEXT_INSN (insn); -} - -/* Mark that basic block BB was modified. */ - -static void -df_bb_modify (struct df *df, basic_block bb) -{ - if ((unsigned) bb->index >= df->n_bbs) - df_bb_table_realloc (df, df->n_bbs); - - bitmap_set_bit (df->bbs_modified, bb->index); -} - -/* 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); - - df_bb_modify (df, bb); - 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. */ -} - -/* Check if INSN was marked as changed. Of course the correctness of - the information depends on whether the instruction was really modified - at the time df_insn_modify was called. */ -bool -df_insn_modified_p (struct df *df, rtx insn) -{ - unsigned int uid; - - uid = INSN_UID (insn); - return (df->insns_modified - && uid < df->insn_size - && bitmap_bit_p (df->insns_modified, uid)); -} - -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_analyze 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; - - gcc_assert (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); - } - } -} - - -/* 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; - - gcc_assert (!oldreg || oldreg == DF_REF_REG (ref)); - - 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. */ - gcc_assert ((!CALL_P (insn) || CONST_OR_PURE_CALL_P (insn)) - && !LABEL_P (insn)); - - 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. */ - gcc_assert (insn != BB_HEAD (bb)); - 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_analyze 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; -} - -/* Finds the reference corresponding to the definition of REG in INSN. - DF is the dataflow object. */ - -struct ref * -df_find_def (struct df *df, rtx insn, rtx reg) -{ - struct df_link *defs; - - for (defs = DF_INSN_DEFS (df, insn); defs; defs = defs->next) - if (rtx_equal_p (DF_REF_REG (defs->ref), reg)) - return defs->ref; - - return NULL; -} - -/* Return 1 if REG is referenced in INSN, zero otherwise. */ - -int -df_reg_used (struct df *df, rtx insn, rtx reg) -{ - struct df_link *uses; - - for (uses = DF_INSN_USES (df, insn); uses; uses = uses->next) - if (rtx_equal_p (DF_REF_REG (uses->ref), reg)) - 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); - - gcc_assert (bb_info->lr_in); - - 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); - - gcc_assert (bb_info->lr_in); - - 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. */ - gcc_assert (df_regno_bb (df, regno1) == bb - && df_regno_bb (df, regno2) == bb); - - 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 true if the definition DEF, which is in the same basic - block as USE, is available at USE. So DEF may as well be - dead, in which case using it will extend its live range. */ -bool -df_local_def_available_p (struct df *df, struct ref *def, struct ref *use) -{ - struct df_link *link; - int def_luid = DF_INSN_LUID (df, DF_REF_INSN (def)); - int in_bb = 0; - unsigned int regno = REGNO (def->reg); - basic_block bb; - - /* The regs must be local to BB. */ - gcc_assert (DF_REF_BB (def) == DF_REF_BB (use)); - bb = DF_REF_BB (def); - - /* 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 *this_def = link->ref; - if (DF_REF_BB (this_def) == bb) - { - int this_luid = DF_INSN_LUID (df, DF_REF_INSN (this_def)); - /* Do nothing with defs coming before DEF. */ - if (this_luid > def_luid) - return this_luid > DF_INSN_LUID (df, DF_REF_INSN (use)); - - in_bb = 1; - } - else if (in_bb) - /* DEF was the last in its basic block. */ - return 1; - } - - /* DEF was the last in the function. */ - return 1; -} - - -/* Return last use of REGNO within BB. */ -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. */ -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 last def of REGNO within BB. */ -struct ref * -df_bb_regno_last_def_find (struct df *df, basic_block bb, unsigned int regno) -{ - struct df_link *link; - struct ref *last_def = NULL; - int in_bb = 0; - - /* 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; - /* The first time in the desired block. */ - if (DF_REF_BB (def) == bb) - in_bb = 1; - /* The last def in the desired block. */ - else if (in_bb) - return last_def; - last_def = def; - } - return last_def; -} - -/* Return last 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)); - - gcc_assert (def); - - 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); -} - - -/* Perform the set operation OP1 OP OP2, using set representation REPR, and - storing the result in OP1. */ - -static void -dataflow_set_a_op_b (enum set_representation repr, - enum df_confluence_op op, - void *op1, void *op2) -{ - switch (repr) - { - case SR_SBITMAP: - switch (op) - { - case DF_UNION: - sbitmap_a_or_b (op1, op1, op2); - break; - - case DF_INTERSECTION: - sbitmap_a_and_b (op1, op1, op2); - break; - - default: - gcc_unreachable (); - } - break; - - case SR_BITMAP: - switch (op) - { - case DF_UNION: - bitmap_ior_into (op1, op2); - break; - - case DF_INTERSECTION: - bitmap_and_into (op1, op2); - break; - - default: - gcc_unreachable (); - } - break; - - default: - gcc_unreachable (); - } -} - -static void -dataflow_set_copy (enum set_representation repr, void *dest, void *src) -{ - switch (repr) - { - case SR_SBITMAP: - sbitmap_copy (dest, src); - break; - - case SR_BITMAP: - bitmap_copy (dest, src); - break; - - default: - gcc_unreachable (); - } -} - -/* Hybrid search algorithm from "Implementation Techniques for - Efficient Data-Flow Analysis of Large Programs". */ - -static void -hybrid_search (basic_block bb, struct dataflow *dataflow, - sbitmap visited, sbitmap pending, sbitmap considered) -{ - int changed; - int i = bb->index; - edge e; - edge_iterator ei; - - SET_BIT (visited, bb->index); - gcc_assert (TEST_BIT (pending, bb->index)); - RESET_BIT (pending, i); - -#define HS(E_ANTI, E_ANTI_BB, E_ANTI_START_BB, IN_SET, \ - E, E_BB, E_START_BB, OUT_SET) \ - do \ - { \ - /* Calculate of predecessor_outs. */ \ - bitmap_zero (IN_SET[i]); \ - FOR_EACH_EDGE (e, ei, bb->E_ANTI) \ - { \ - if (e->E_ANTI_BB == E_ANTI_START_BB) \ - continue; \ - if (!TEST_BIT (considered, e->E_ANTI_BB->index)) \ - continue; \ - \ - dataflow_set_a_op_b (dataflow->repr, dataflow->conf_op, \ - IN_SET[i], \ - OUT_SET[e->E_ANTI_BB->index]); \ - } \ - \ - (*dataflow->transfun)(i, &changed, \ - dataflow->in[i], dataflow->out[i], \ - dataflow->gen[i], dataflow->kill[i], \ - dataflow->data); \ - \ - if (!changed) \ - break; \ - \ - FOR_EACH_EDGE (e, ei, bb->E) \ - { \ - if (e->E_BB == E_START_BB || e->E_BB->index == i) \ - continue; \ - \ - if (!TEST_BIT (considered, e->E_BB->index)) \ - continue; \ - \ - SET_BIT (pending, e->E_BB->index); \ - } \ - \ - FOR_EACH_EDGE (e, ei, bb->E) \ - { \ - if (e->E_BB == E_START_BB || e->E_BB->index == i) \ - continue; \ - \ - if (!TEST_BIT (considered, e->E_BB->index)) \ - continue; \ - \ - if (!TEST_BIT (visited, e->E_BB->index)) \ - hybrid_search (e->E_BB, dataflow, visited, pending, considered); \ - } \ - } while (0) - - if (dataflow->dir == DF_FORWARD) - HS (preds, src, ENTRY_BLOCK_PTR, dataflow->in, - succs, dest, EXIT_BLOCK_PTR, dataflow->out); - else - HS (succs, dest, EXIT_BLOCK_PTR, dataflow->out, - preds, src, ENTRY_BLOCK_PTR, dataflow->in); -} - -/* This function will perform iterative bitvector dataflow described by - DATAFLOW, producing the in and out sets. Only the part of the cfg - induced by blocks in DATAFLOW->order is taken into account. - - 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 (struct dataflow *dataflow) -{ - unsigned i, idx; - sbitmap visited, pending, considered; - - pending = sbitmap_alloc (last_basic_block); - visited = sbitmap_alloc (last_basic_block); - considered = sbitmap_alloc (last_basic_block); - sbitmap_zero (pending); - sbitmap_zero (visited); - sbitmap_zero (considered); - - for (i = 0; i < dataflow->n_blocks; i++) - { - idx = dataflow->order[i]; - SET_BIT (pending, idx); - SET_BIT (considered, idx); - if (dataflow->dir == DF_FORWARD) - dataflow_set_copy (dataflow->repr, - dataflow->out[idx], dataflow->gen[idx]); - else - dataflow_set_copy (dataflow->repr, - dataflow->in[idx], dataflow->gen[idx]); - }; - - while (1) - { - for (i = 0; i < dataflow->n_blocks; i++) - { - idx = dataflow->order[i]; - - if (TEST_BIT (pending, idx) && !TEST_BIT (visited, idx)) - hybrid_search (BASIC_BLOCK (idx), dataflow, - visited, pending, considered); - } - - if (sbitmap_first_set_bit (pending) == -1) - break; - - sbitmap_zero (visited); - } - - sbitmap_free (pending); - sbitmap_free (visited); - sbitmap_free (considered); -} diff --git a/gcc/df.h b/gcc/df.h dissimilarity index 64% index b1b820d41b1..09a112762bf 100644 --- a/gcc/df.h +++ b/gcc/df.h @@ -1,370 +1,579 @@ -/* Form lists of pseudo register references for autoinc optimization - for GNU compiler. This is part of flow optimization. - Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005 - 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, 51 Franklin Street, Fifth Floor, Boston, MA -02110-1301, USA. */ - -#ifndef GCC_DF_H -#define GCC_DF_H - -#include "bitmap.h" -#include "basic-block.h" - -#define DF_RD 1 /* Reaching definitions. */ -#define DF_RU 2 /* Reaching uses. */ -#define DF_LR 4 /* Live registers. */ -#define DF_DU_CHAIN 8 /* Def-use chain. */ -#define DF_UD_CHAIN 16 /* Use-def chain. */ -#define DF_REG_INFO 32 /* Register info. */ -#define DF_RD_CHAIN 64 /* Reg-def chain. */ -#define DF_RU_CHAIN 128 /* Reg-use chain. */ -#define DF_ALL 255 -#define DF_HARD_REGS 1024 /* Mark hard registers. */ -#define DF_EQUIV_NOTES 2048 /* Mark uses present in EQUIV/EQUAL notes. */ -#define DF_SUBREGS 4096 /* Return subregs rather than the inner reg. */ - -enum df_ref_type {DF_REF_REG_DEF, DF_REF_REG_USE, DF_REF_REG_MEM_LOAD, - DF_REF_REG_MEM_STORE}; - -#define DF_REF_TYPE_NAMES {"def", "use", "mem load", "mem store"} - -/* Link on a def-use or use-def chain. */ -struct df_link -{ - struct df_link *next; - struct ref *ref; -}; - -enum df_ref_flags - { - /* Read-modify-write refs generate both a use and a def and - these are marked with this flag to show that they are not - independent. */ - DF_REF_READ_WRITE = 1, - - /* This flag is set, if we stripped the subreg from the reference. - In this case we must make conservative guesses, at what the - outer mode was. */ - DF_REF_STRIPPED = 2 - }; - - -/* Define a register reference structure. One of these is allocated - for every register reference (use or def). Note some register - references (e.g., post_inc, subreg) generate both a def and a use. */ -struct ref -{ - rtx reg; /* The register referenced. */ - rtx insn; /* Insn containing ref. */ - rtx *loc; /* The location of the reg. */ - struct df_link *chain; /* Head of def-use or use-def chain. */ - unsigned int id; /* Ref index. */ - enum df_ref_type type; /* Type of ref. */ - enum df_ref_flags flags; /* Various flags. */ - void *data; /* The data assigned to it by user. */ -}; - - -/* One of these structures is allocated for every insn. */ -struct insn_info -{ - struct df_link *defs; /* Head of insn-def chain. */ - struct df_link *uses; /* Head of insn-use chain. */ - /* ???? The following luid field should be considered private so that - we can change it on the fly to accommodate new insns? */ - int luid; /* Logical UID. */ -}; - - -/* One of these structures is allocated for every reg. */ -struct reg_info -{ - struct df_link *defs; /* Head of reg-def chain. */ - struct df_link *uses; /* Head of reg-use chain. */ - int lifetime; - int n_defs; - int n_uses; -}; - - -/* One of these structures is allocated for every basic block. */ -struct bb_info -{ - /* Reaching def bitmaps have def_id elements. */ - bitmap rd_kill; - bitmap rd_gen; - bitmap rd_in; - bitmap rd_out; - /* Reaching use bitmaps have use_id elements. */ - bitmap ru_kill; - bitmap ru_gen; - bitmap ru_in; - bitmap ru_out; - /* Live variable bitmaps have n_regs elements. */ - bitmap lr_def; - bitmap lr_use; - bitmap lr_in; - bitmap lr_out; - int rd_valid; - int ru_valid; - int lr_valid; -}; - - -struct df -{ - int flags; /* Indicates what's recorded. */ - struct bb_info *bbs; /* Basic block table. */ - struct ref **defs; /* Def table, indexed by def_id. */ - struct ref **uses; /* Use table, indexed by use_id. */ - struct ref **reg_def_last; /* Indexed by regno. */ - struct reg_info *regs; /* Regs table, index by regno. */ - unsigned int reg_size; /* Size of regs table. */ - struct insn_info *insns; /* Insn table, indexed by insn UID. */ - unsigned int insn_size; /* Size of insn table. */ - unsigned int def_id; /* Next def ID. */ - unsigned int def_size; /* Size of def table. */ - unsigned int n_defs; /* Size of def bitmaps. */ - unsigned int use_id; /* Next use ID. */ - unsigned int use_size; /* Size of use table. */ - unsigned int n_uses; /* Size of use bitmaps. */ - unsigned int n_bbs; /* Number of basic blocks. */ - unsigned int n_regs; /* Number of regs. */ - unsigned int def_id_save; /* Saved next def ID. */ - unsigned int use_id_save; /* Saved next use ID. */ - bitmap insns_modified; /* Insns that (may) have changed. */ - bitmap bbs_modified; /* Blocks that (may) have changed. */ - bitmap all_blocks; /* All blocks in CFG. */ - int *dfs_order; /* DFS order -> block number. */ - int *rc_order; /* Reverse completion order -> block number. */ - int *rts_order; /* Reverse top sort order -> block number. */ - int *inverse_rc_map; /* Block number -> reverse completion order. */ - int *inverse_dfs_map; /* Block number -> DFS order. */ - int *inverse_rts_map; /* Block number -> reverse top-sort order. */ -}; - - -struct df_map -{ - rtx old; - rtx new; -}; - - -#define DF_BB_INFO(REFS, BB) (&REFS->bbs[(BB)->index]) - - -/* Macros to access the elements within the ref structure. */ - -#define DF_REF_REAL_REG(REF) (GET_CODE ((REF)->reg) == SUBREG \ - ? SUBREG_REG ((REF)->reg) : ((REF)->reg)) -#define DF_REF_REGNO(REF) REGNO (DF_REF_REAL_REG (REF)) -#define DF_REF_REAL_LOC(REF) (GET_CODE ((REF)->reg) == SUBREG \ - ? &SUBREG_REG ((REF)->reg) : ((REF)->loc)) -#define DF_REF_REG(REF) ((REF)->reg) -#define DF_REF_LOC(REF) ((REF)->loc) -#define DF_REF_BB(REF) (BLOCK_FOR_INSN ((REF)->insn)) -#define DF_REF_BBNO(REF) (BLOCK_FOR_INSN ((REF)->insn)->index) -#define DF_REF_INSN(REF) ((REF)->insn) -#define DF_REF_INSN_UID(REF) (INSN_UID ((REF)->insn)) -#define DF_REF_TYPE(REF) ((REF)->type) -#define DF_REF_CHAIN(REF) ((REF)->chain) -#define DF_REF_ID(REF) ((REF)->id) -#define DF_REF_FLAGS(REF) ((REF)->flags) -#define DF_REF_DATA(REF) ((REF)->data) - -/* Macros to determine the reference type. */ - -#define DF_REF_REG_DEF_P(REF) (DF_REF_TYPE (REF) == DF_REF_REG_DEF) -#define DF_REF_REG_USE_P(REF) ((REF) && ! DF_REF_REG_DEF_P (REF)) -#define DF_REF_REG_MEM_STORE_P(REF) (DF_REF_TYPE (REF) == DF_REF_REG_MEM_STORE) -#define DF_REF_REG_MEM_LOAD_P(REF) (DF_REF_TYPE (REF) == DF_REF_REG_MEM_LOAD) -#define DF_REF_REG_MEM_P(REF) (DF_REF_REG_MEM_STORE_P (REF) \ - || DF_REF_REG_MEM_LOAD_P (REF)) - - -/* Macros to access the elements within the reg_info structure table. */ - -#define DF_REGNO_FIRST_DEF(DF, REGNUM) \ -((DF)->regs[REGNUM].defs ? (DF)->regs[REGNUM].defs->ref : 0) -#define DF_REGNO_LAST_USE(DF, REGNUM) \ -((DF)->regs[REGNUM].uses ? (DF)->regs[REGNUM].uses->ref : 0) - -#define DF_REGNO_FIRST_BB(DF, REGNUM) \ -((DF)->regs[REGNUM].defs ? DF_REF_BB ((DF)->regs[REGNUM].defs->ref) : 0) -#define DF_REGNO_LAST_BB(DF, REGNUM) \ -((DF)->regs[REGNUM].uses ? DF_REF_BB ((DF)->regs[REGNUM].uses->ref) : 0) - - -/* Macros to access the elements within the insn_info structure table. */ - -#define DF_INSN_LUID(DF, INSN) ((DF)->insns[INSN_UID (INSN)].luid) -#define DF_INSN_DEFS(DF, INSN) ((DF)->insns[INSN_UID (INSN)].defs) -#define DF_INSN_USES(DF, INSN) ((DF)->insns[INSN_UID (INSN)].uses) - - -/* Functions to build and analyze dataflow information. */ - -extern struct df *df_init (void); - -extern int df_analyze (struct df *, bitmap, int); -extern void df_analyze_subcfg (struct df *, bitmap, int); - -extern void df_finish (struct df *); - -extern void df_dump (struct df *, int, FILE *); - - -/* Functions to modify insns. */ - -extern bool df_insn_modified_p (struct df *, rtx); - -extern void df_insn_modify (struct df *, basic_block, rtx); - -extern rtx df_insn_delete (struct df *, basic_block, rtx); - -extern rtx df_pattern_emit_before (struct df *, rtx, basic_block, rtx); - -extern rtx df_jump_pattern_emit_after (struct df *, rtx, basic_block, rtx); - -extern rtx df_pattern_emit_after (struct df *, rtx, basic_block, rtx); - -extern rtx df_insn_move_before (struct df *, basic_block, rtx, basic_block, - rtx); - -extern int df_reg_replace (struct df *, bitmap, rtx, rtx); - -extern int df_ref_reg_replace (struct df *, struct ref *, rtx, rtx); - -extern int df_ref_remove (struct df *, struct ref *); - -extern int df_insn_mem_replace (struct df *, basic_block, rtx, rtx, rtx); - -extern struct ref *df_bb_def_use_swap (struct df *, basic_block, rtx, rtx, - unsigned int); - - -/* Functions to query dataflow information. */ - -extern basic_block df_regno_bb (struct df *, unsigned int); - -extern int df_reg_lifetime (struct df *, rtx); - -extern int df_reg_global_p (struct df *, rtx); - -extern int df_insn_regno_def_p (struct df *, basic_block, rtx, unsigned int); - -extern int df_insn_dominates_all_uses_p (struct df *, basic_block, rtx); - -extern int df_insn_dominates_uses_p (struct df *, basic_block, rtx, bitmap); - -extern int df_bb_reg_live_start_p (struct df *, basic_block, rtx); - -extern int df_bb_reg_live_end_p (struct df *, basic_block, rtx); - -extern int df_bb_regs_lives_compare (struct df *, basic_block, rtx, rtx); - -extern bool df_local_def_available_p (struct df *, struct ref *, struct ref *); - -extern rtx df_bb_single_def_use_insn_find (struct df *, basic_block, rtx, - rtx); -extern struct ref *df_bb_regno_last_use_find (struct df *, basic_block, unsigned int); - -extern struct ref *df_bb_regno_first_def_find (struct df *, basic_block, unsigned int); - -extern struct ref *df_bb_regno_last_def_find (struct df *, basic_block, unsigned int); - -extern struct ref *df_find_def (struct df *, rtx, rtx); - -extern int df_reg_used (struct df *, rtx, rtx); - -/* Functions for debugging from GDB. */ - -extern void debug_df_insn (rtx); - -extern void debug_df_regno (unsigned int); - -extern void debug_df_reg (rtx); - -extern void debug_df_defno (unsigned int); - -extern void debug_df_useno (unsigned int); - -extern void debug_df_ref (struct ref *); - -extern void debug_df_chain (struct df_link *); - -extern void df_insn_debug (struct df *, rtx, FILE *); - -extern void df_insn_debug_regno (struct df *, rtx, FILE *); - - -/* Meet over any path (UNION) or meet over all paths (INTERSECTION). */ -enum df_confluence_op - { - DF_UNION, - DF_INTERSECTION - }; - - -/* Dataflow direction. */ -enum df_flow_dir - { - DF_FORWARD, - DF_BACKWARD - }; - - -typedef void (*transfer_function) (int, int *, void *, void *, - void *, void *, void *); - -/* The description of a dataflow problem to solve. */ - -enum set_representation -{ - SR_SBITMAP, /* Represent sets by bitmaps. */ - SR_BITMAP /* Represent sets by sbitmaps. */ -}; - -struct dataflow -{ - enum set_representation repr; /* The way the sets are represented. */ - - /* The following arrays are indexed by block indices, so they must always - be large enough even if we restrict ourselves just to a subset of cfg. */ - void **gen, **kill; /* Gen and kill sets. */ - void **in, **out; /* Results. */ - - enum df_flow_dir dir; /* Dataflow direction. */ - enum df_confluence_op conf_op; /* Confluence operator. */ - unsigned n_blocks; /* Number of basic blocks in the - order. */ - int *order; /* The list of basic blocks to work - with, in the order they should - be processed in. */ - transfer_function transfun; /* The transfer function. */ - void *data; /* Data used by the transfer - function. */ -}; - -extern void iterative_dataflow (struct dataflow *); -extern bool read_modify_subreg_p (rtx); - -#endif /* GCC_DF_H */ +/* Form lists of pseudo register references for autoinc optimization + for GNU compiler. This is part of flow optimization. + Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2006 + Free Software Foundation, Inc. + Originally contributed by Michael P. Hayes + (m.hayes@elec.canterbury.ac.nz, mhayes@redhat.com) + Major rewrite contributed by Danny Berlin (dberlin@dberlin.org) + and Kenneth Zadeck (zadeck@naturalbridge.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, 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301, USA. */ + +#ifndef GCC_DF_H +#define GCC_DF_H + +#include "bitmap.h" +#include "basic-block.h" +#include "alloc-pool.h" + +struct dataflow; +struct df; +struct df_problem; + +/* Data flow problems. All problems must have a unique here. */ +/* Scanning is not really a dataflow problem, but it is useful to have + the basic block functions in the vector so that things get done in + a uniform manner. */ +#define DF_SCAN 0 +#define DF_RU 1 /* Reaching Uses. */ +#define DF_RD 2 /* Reaching Defs. */ +#define DF_LR 3 /* Live Registers. */ +#define DF_UR 4 /* Uninitialized Registers. */ +#define DF_UREC 5 /* Uninitialized Registers with Early Clobber. */ +#define DF_CHAIN 6 /* Def-Use and/or Use-Def Chains. */ +#define DF_RI 7 /* Register Info. */ +#define DF_LAST_PROBLEM_PLUS1 (DF_RI + 1) + +/* Flags that control the building of chains. */ +#define DF_DU_CHAIN 1 /* Build DU chains. */ +#define DF_UD_CHAIN 2 /* Build UD chains. */ + + +/* Dataflow direction. */ +enum df_flow_dir + { + DF_NONE, + DF_FORWARD, + DF_BACKWARD + }; + +/* Function prototypes added to df_problem instance. */ + +/* Allocate the problem specific data. */ +typedef void (*df_alloc_function) (struct dataflow *, bitmap); + +/* Free the basic block info. Called from the block reordering code + to get rid of the blocks that have been squished down. */ +typedef void (*df_free_bb_function) (struct dataflow *, void *); + +/* Local compute function. */ +typedef void (*df_local_compute_function) (struct dataflow *, bitmap, bitmap); + +/* Init the solution specific data. */ +typedef void (*df_init_function) (struct dataflow *, bitmap); + +/* Iterative dataflow function. */ +typedef void (*df_dataflow_function) (struct dataflow *, bitmap, bitmap, + int *, int, bool); + +/* Confluence operator for blocks with 0 out (or in) edges. */ +typedef void (*df_confluence_function_0) (struct dataflow *, basic_block); + +/* Confluence operator for blocks with 1 or more out (or in) edges. */ +typedef void (*df_confluence_function_n) (struct dataflow *, edge); + +/* Transfer function for blocks. */ +typedef bool (*df_transfer_function) (struct dataflow *, int); + +/* Function to massage the information after the problem solving. */ +typedef void (*df_finalizer_function) (struct dataflow*, bitmap); + +/* Function to free all of the problem specific datastructures. */ +typedef void (*df_free_function) (struct dataflow *); + +/* Function to dump results to FILE. */ +typedef void (*df_dump_problem_function) (struct dataflow *, FILE *); + +/* The static description of a dataflow problem to solve. See above + typedefs for doc for the function fields. */ + +struct df_problem { + /* The unique id of the problem. This is used it index into + df->defined_problems to make accessing the problem data easy. */ + unsigned int id; + enum df_flow_dir dir; /* Dataflow direction. */ + df_alloc_function alloc_fun; + df_free_bb_function free_bb_fun; + df_local_compute_function local_compute_fun; + df_init_function init_fun; + df_dataflow_function dataflow_fun; + df_confluence_function_0 con_fun_0; + df_confluence_function_n con_fun_n; + df_transfer_function trans_fun; + df_finalizer_function finalize_fun; + df_free_function free_fun; + df_dump_problem_function dump_fun; + + /* A dataflow problem that must be solved before this problem can be + solved. */ + struct df_problem *dependent_problem; +}; + + +/* The specific instance of the problem to solve. */ +struct dataflow +{ + struct df *df; /* Instance of df we are working in. */ + struct df_problem *problem; /* The problem to be solved. */ + + /* Communication between iterative_dataflow and hybrid_search. */ + sbitmap visited, pending, considered; + + /* Array indexed by bb->index, that contains basic block problem and + solution specific information. */ + void **block_info; + unsigned int block_info_size; + + /* The pool to allocate the block_info from. */ + alloc_pool block_pool; + + /* Other problem specific data that is not on a per basic block + basis. The structure is generally defined privately for the + problem. The exception being the scanning problem where it is + fully public. */ + void *problem_data; +}; + +/* One of these structures is allocated for every insn. */ +struct df_insn_info +{ + struct df_ref *defs; /* Head of insn-def chain. */ + struct df_ref *uses; /* Head of insn-use chain. */ + /* ???? The following luid field should be considered private so that + we can change it on the fly to accommodate new insns? */ + int luid; /* Logical UID. */ + bool contains_asm; /* Contains an asm instruction. */ +}; + +/* Two of these structures are allocated for every pseudo reg, one for + the uses and one for the defs. */ +struct df_reg_info +{ + struct df_ref *reg_chain; /* Head of reg-use or def chain. */ + unsigned int begin; /* First def_index for this pseudo. */ + unsigned int n_refs; /* Number of refs or defs for this pseudo. */ +}; + + +enum df_ref_type {DF_REF_REG_DEF, DF_REF_REG_USE, DF_REF_REG_MEM_LOAD, + DF_REF_REG_MEM_STORE}; + +#define DF_REF_TYPE_NAMES {"def", "use", "mem load", "mem store"} + +enum df_ref_flags + { + /* Read-modify-write refs generate both a use and a def and + these are marked with this flag to show that they are not + independent. */ + DF_REF_READ_WRITE = 1, + + /* This flag is set, if we stripped the subreg from the reference. + In this case we must make conservative guesses, at what the + outer mode was. */ + DF_REF_STRIPPED = 2, + + /* If this flag is set, this is not a real definition/use, but an + artificial one created to model always live registers, eh uses, etc. */ + DF_REF_ARTIFICIAL = 4, + + + /* If this flag is set for an artificial use or def, that ref + logically happens at the top of the block. If it is not set + for an artificial use or def, that ref logically happens at the + bottom of the block. This is never set for regular refs. */ + DF_REF_AT_TOP = 8, + + /* This flag is set if the use is inside a REG_EQUAL note. */ + DF_REF_IN_NOTE = 16, + + /* This flag is set if this ref is really a clobber, and not a def. */ + DF_REF_CLOBBER = 32 + }; + + +/* Define a register reference structure. One of these is allocated + for every register reference (use or def). Note some register + references (e.g., post_inc, subreg) generate both a def and a use. */ +struct df_ref +{ + rtx reg; /* The register referenced. */ + unsigned int regno; /* The register number referenced. */ + basic_block bb; /* Basic block containing the instruction. */ + rtx insn; /* Insn containing ref. NB: THIS MAY BE NULL. */ + rtx *loc; /* The location of the reg. */ + struct df_link *chain; /* Head of def-use, use-def or bi chain. */ + unsigned int id; /* Location in table. */ + enum df_ref_type type; /* Type of ref. */ + enum df_ref_flags flags; /* Various flags. */ + + /* For each regno, there are two chains of refs, one for the uses + and one for the defs. These chains go thru the refs themselves + rather than using an external structure. */ + struct df_ref *next_reg; /* Next ref with same regno and type. */ + struct df_ref *prev_reg; /* Prev ref with same regno and type. */ + + /* Each insn has two lists, one for the uses and one for the + defs. This is the next field in either of these chains. */ + struct df_ref *next_ref; + void *data; /* The data assigned to it by user. */ +}; + +/* There are two kinds of links: */ + +/* This is used for def-use or use-def chains. */ +struct df_link +{ + struct df_ref *ref; + struct df_link *next; +}; + +/* Two of these structures are allocated, one for the uses and one for + the defs. */ +struct df_ref_info +{ + struct df_reg_info **regs; /* Array indexed by pseudo regno. */ + unsigned int regs_size; /* Size of currently allocated regs table. */ + unsigned int regs_inited; /* Number of regs with reg_infos allocated. */ + struct df_ref **refs; /* Ref table, indexed by id. */ + unsigned int refs_size; /* Size of currently allocated refs table. */ + unsigned int bitmap_size; /* Number of refs seen. */ + + /* True if refs table is organized so that every reference for a + pseudo is contigious. */ + bool refs_organized; + /* True if the next refs should be added immediately or false to + defer to later to reorganize the table. */ + bool add_refs_inline; +}; + + +/*---------------------------------------------------------------------------- + Problem data for the scanning dataflow problem. Unlike the other + dataflow problems, the problem data for scanning is fully exposed and + used by owners of the problem. +----------------------------------------------------------------------------*/ + +struct df +{ + +#define DF_HARD_REGS 1 /* Mark hard registers. */ +#define DF_EQUIV_NOTES 2 /* Mark uses present in EQUIV/EQUAL notes. */ +#define DF_SUBREGS 4 /* Return subregs rather than the inner reg. */ + + int flags; /* Indicates what's recorded. */ + + /* The set of problems to be solved is stored in two arrays. In + PROBLEMS_IN_ORDER, the problems are stored in the order that they + are solved. This is an internally dense array that may have + nulls at the end of it. In PROBLEMS_BY_INDEX, the problem is + stored by the value in df_problem.id. These are used to access + the problem local data without having to search the first + array. */ + + struct dataflow *problems_in_order [DF_LAST_PROBLEM_PLUS1]; + struct dataflow *problems_by_index [DF_LAST_PROBLEM_PLUS1]; + int num_problems_defined; + + /* Set after calls to df_scan_blocks, this contains all of the + blocks that higher level problems must rescan before solving the + dataflow equations. If this is NULL, the blocks_to_analyze is + used. */ + bitmap blocks_to_scan; + + /* If not NULL, the subset of blocks of the program to be considered + for analysis. */ + bitmap blocks_to_analyze; + + /* The following information is really the problem data for the + scanning instance but it is used too often by the other problems + to keep getting it from there. */ + struct df_ref_info def_info; /* Def info. */ + struct df_ref_info use_info; /* Use info. */ + struct df_insn_info **insns; /* Insn table, indexed by insn UID. */ + unsigned int insns_size; /* Size of insn table. */ + bitmap hardware_regs_used; /* The set of hardware registers used. */ + bitmap exit_block_uses; /* The set of hardware registers used in exit block. */ +}; + +#define DF_SCAN_BB_INFO(DF, BB) (df_scan_get_bb_info((DF)->problems_by_index[DF_SCAN],(BB)->index)) +#define DF_RU_BB_INFO(DF, BB) (df_ru_get_bb_info((DF)->problems_by_index[DF_RU],(BB)->index)) +#define DF_RD_BB_INFO(DF, BB) (df_rd_get_bb_info((DF)->problems_by_index[DF_RD],(BB)->index)) +#define DF_LR_BB_INFO(DF, BB) (df_lr_get_bb_info((DF)->problems_by_index[DF_LR],(BB)->index)) +#define DF_UR_BB_INFO(DF, BB) (df_ur_get_bb_info((DF)->problems_by_index[DF_UR],(BB)->index)) +#define DF_UREC_BB_INFO(DF, BB) (df_urec_get_bb_info((DF)->problems_by_index[DF_UREC],(BB)->index)) + +/* Most transformations that wish to use live register analysis will + use these macros. The DF_UPWARD_LIVE* macros are only half of the + solution. */ +#define DF_LIVE_IN(DF, BB) (DF_UR_BB_INFO(DF, BB)->in) +#define DF_LIVE_OUT(DF, BB) (DF_UR_BB_INFO(DF, BB)->out) + + +/* Live in for register allocation also takes into account several other factors. */ +#define DF_RA_LIVE_IN(DF, BB) (DF_UREC_BB_INFO(DF, BB)->in) +#define DF_RA_LIVE_OUT(DF, BB) (DF_UREC_BB_INFO(DF, BB)->out) + +/* These macros are currently used by only reg-stack since it is not + tolerant of uninitialized variables. This intolerance should be + fixed because it causes other problems. */ +#define DF_UPWARD_LIVE_IN(DF, BB) (DF_LR_BB_INFO(DF, BB)->in) +#define DF_UPWARD_LIVE_OUT(DF, BB) (DF_LR_BB_INFO(DF, BB)->out) + + +/* Macros to access the elements within the ref structure. */ + + +#define DF_REF_REAL_REG(REF) (GET_CODE ((REF)->reg) == SUBREG \ + ? SUBREG_REG ((REF)->reg) : ((REF)->reg)) +#define DF_REF_REGNO(REF) ((REF)->regno) +#define DF_REF_REAL_LOC(REF) (GET_CODE ((REF)->reg) == SUBREG \ + ? &SUBREG_REG ((REF)->reg) : ((REF)->loc)) +#define DF_REF_REG(REF) ((REF)->reg) +#define DF_REF_LOC(REF) ((REF)->loc) +#define DF_REF_BB(REF) ((REF)->bb) +#define DF_REF_BBNO(REF) (DF_REF_BB (REF)->index) +#define DF_REF_INSN(REF) ((REF)->insn) +#define DF_REF_INSN_UID(REF) (INSN_UID ((REF)->insn)) +#define DF_REF_TYPE(REF) ((REF)->type) +#define DF_REF_CHAIN(REF) ((REF)->chain) +#define DF_REF_ID(REF) ((REF)->id) +#define DF_REF_FLAGS(REF) ((REF)->flags) +#define DF_REF_NEXT_REG(REF) ((REF)->next_reg) +#define DF_REF_PREV_REG(REF) ((REF)->prev_reg) +#define DF_REF_NEXT_REF(REF) ((REF)->next_ref) +#define DF_REF_DATA(REF) ((REF)->data) + +/* Macros to determine the reference type. */ + +#define DF_REF_REG_DEF_P(REF) (DF_REF_TYPE (REF) == DF_REF_REG_DEF) +#define DF_REF_REG_USE_P(REF) ((REF) && ! DF_REF_REG_DEF_P (REF)) +#define DF_REF_REG_MEM_STORE_P(REF) (DF_REF_TYPE (REF) == DF_REF_REG_MEM_STORE) +#define DF_REF_REG_MEM_LOAD_P(REF) (DF_REF_TYPE (REF) == DF_REF_REG_MEM_LOAD) +#define DF_REF_REG_MEM_P(REF) (DF_REF_REG_MEM_STORE_P (REF) \ + || DF_REF_REG_MEM_LOAD_P (REF)) + +/* Macros to get the refs out of def_info or use_info refs table. */ +#define DF_DEFS_SIZE(DF) ((DF)->def_info.bitmap_size) +#define DF_DEFS_GET(DF,ID) ((DF)->def_info.refs[(ID)]) +#define DF_DEFS_SET(DF,ID,VAL) ((DF)->def_info.refs[(ID)]=(VAL)) +#define DF_USES_SIZE(DF) ((DF)->use_info.bitmap_size) +#define DF_USES_GET(DF,ID) ((DF)->use_info.refs[(ID)]) +#define DF_USES_SET(DF,ID,VAL) ((DF)->use_info.refs[(ID)]=(VAL)) + +/* Macros to access the register information from scan dataflow record. */ + +#define DF_REG_SIZE(DF) ((DF)->def_info.regs_size) +#define DF_REG_DEF_GET(DF, REG) ((DF)->def_info.regs[(REG)]) +#define DF_REG_DEF_SET(DF, REG, VAL) ((DF)->def_info.regs[(REG)]=(VAL)) +#define DF_REG_USE_GET(DF, REG) ((DF)->use_info.regs[(REG)]) +#define DF_REG_USE_SET(DF, REG, VAL) ((DF)->use_info.regs[(REG)]=(VAL)) + +/* Macros to access the elements within the reg_info structure table. */ + +#define DF_REGNO_FIRST_DEF(DF, REGNUM) \ +(DF_REG_DEF_GET(DF, REGNUM) ? DF_REG_DEF_GET(DF, REGNUM) : 0) +#define DF_REGNO_LAST_USE(DF, REGNUM) \ +(DF_REG_USE_GET(DF, REGNUM) ? DF_REG_USE_GET(DF, REGNUM) : 0) + +/* Macros to access the elements within the insn_info structure table. */ + +#define DF_INSN_SIZE(DF) ((DF)->insns_size) +#define DF_INSN_GET(DF,INSN) ((DF)->insns[(INSN_UID(INSN))]) +#define DF_INSN_SET(DF,INSN,VAL) ((DF)->insns[(INSN_UID (INSN))]=(VAL)) +#define DF_INSN_CONTAINS_ASM(DF, INSN) (DF_INSN_GET(DF,INSN)->contains_asm) +#define DF_INSN_LUID(DF, INSN) (DF_INSN_GET(DF,INSN)->luid) +#define DF_INSN_DEFS(DF, INSN) (DF_INSN_GET(DF,INSN)->defs) +#define DF_INSN_USES(DF, INSN) (DF_INSN_GET(DF,INSN)->uses) + +#define DF_INSN_UID_GET(DF,UID) ((DF)->insns[(UID)]) +#define DF_INSN_UID_LUID(DF, INSN) (DF_INSN_UID_GET(DF,INSN)->luid) +#define DF_INSN_UID_DEFS(DF, INSN) (DF_INSN_UID_GET(DF,INSN)->defs) +#define DF_INSN_UID_USES(DF, INSN) (DF_INSN_UID_GET(DF,INSN)->uses) + +/* This is a bitmap copy of regs_invalidated_by_call so that we can + easily add it into bitmaps, etc. */ + +extern bitmap df_invalidated_by_call; + +/* Initialize ur_in and ur_out as if all hard registers were partially +available. */ + +extern bitmap df_all_hard_regs; + +/* The way that registers are processed, especially hard registers, + changes as the compilation proceeds. These states are passed to + df_set_state to control this processing. */ + +#define DF_SCAN_INITIAL 1 /* Processing from beginning of rtl to + global-alloc. */ +#define DF_SCAN_GLOBAL 2 /* Processing before global + allocation. */ +#define DF_SCAN_POST_ALLOC 4 /* Processing after register + allocation. */ +extern int df_state; /* Indicates where we are in the compilation. */ + + +/* One of these structures is allocated for every basic block. */ +struct df_scan_bb_info +{ + /* Defs at the start of a basic block that is the target of an + exception edge. */ + struct df_ref *artificial_defs; + + /* Uses of hard registers that are live at every block. */ + struct df_ref *artificial_uses; +}; + + +/* Reaching uses. */ +struct df_ru_bb_info +{ + bitmap kill; + bitmap sparse_kill; + bitmap gen; + bitmap in; + bitmap out; +}; + + +/* Reaching definitions. */ +struct df_rd_bb_info +{ + bitmap kill; + bitmap sparse_kill; + bitmap gen; + bitmap in; + bitmap out; +}; + + +/* Live registers. */ +struct df_lr_bb_info +{ + bitmap def; + bitmap use; + bitmap in; + bitmap out; +}; + + +/* Uninitialized registers. */ +struct df_ur_bb_info +{ + bitmap kill; + bitmap gen; + bitmap in; + bitmap out; +}; + +/* Uninitialized registers. */ +struct df_urec_bb_info +{ + bitmap earlyclobber; + bitmap kill; + bitmap gen; + bitmap in; + bitmap out; +}; + + +#define df_finish(df) {df_finish1(df); df=NULL;} + +/* Functions defined in df-core.c. */ + +extern struct df *df_init (int); +extern struct dataflow *df_add_problem (struct df *, struct df_problem *); +extern void df_set_blocks (struct df*, bitmap); +extern void df_finish1 (struct df *); +extern void df_analyze (struct df *); +extern void df_compact_blocks (struct df *); +extern void df_bb_replace (struct df *, int, basic_block); +extern struct df_ref *df_bb_regno_last_use_find (struct df *, basic_block, unsigned int); +extern struct df_ref *df_bb_regno_first_def_find (struct df *, basic_block, unsigned int); +extern struct df_ref *df_bb_regno_last_def_find (struct df *, basic_block, unsigned int); +extern bool df_insn_regno_def_p (struct df *, rtx, unsigned int); +extern struct df_ref *df_find_def (struct df *, rtx, rtx); +extern bool df_reg_defined (struct df *, rtx, rtx); +extern struct df_ref *df_find_use (struct df *, rtx, rtx); +extern bool df_reg_used (struct df *, rtx, rtx); +extern void df_iterative_dataflow (struct dataflow *, bitmap, bitmap, int *, int, bool); +extern void df_dump (struct df *, FILE *); +extern void df_chain_dump (struct df *, struct df_link *, FILE *); +extern void df_refs_chain_dump (struct df *, struct df_ref *, bool, FILE *); +extern void df_regs_chain_dump (struct df *, struct df_ref *, FILE *); +extern void df_insn_debug (struct df *, rtx, bool, FILE *); +extern void df_insn_debug_regno (struct df *, rtx, FILE *); +extern void df_regno_debug (struct df *, unsigned int, FILE *); +extern void df_ref_debug (struct df *, struct df_ref *, FILE *); +extern void debug_df_insn (rtx); +extern void debug_df_regno (unsigned int); +extern void debug_df_reg (rtx); +extern void debug_df_defno (unsigned int); +extern void debug_df_useno (unsigned int); +extern void debug_df_ref (struct df_ref *); +extern void debug_df_chain (struct df_link *); +/* An instance of df that can be shared between passes. */ +extern struct df *shared_df; + + +/* Functions defined in df-problems.c. */ + +extern struct dataflow *df_get_dependent_problem (struct dataflow *); +extern struct df_link *df_chain_create (struct dataflow *, struct df_ref *, struct df_ref *); +extern void df_chain_unlink (struct dataflow *, struct df_ref *, struct df_link *); +extern void df_chain_copy (struct dataflow *, struct df_ref *, struct df_link *); +extern bitmap df_get_live_in (struct df *, basic_block); +extern bitmap df_get_live_out (struct df *, basic_block); +extern void df_grow_bb_info (struct dataflow *); +extern void df_chain_dump (struct df *, struct df_link *, FILE *); +extern void df_print_bb_index (basic_block bb, FILE *file); +extern struct dataflow *df_ru_add_problem (struct df *); +extern struct df_ru_bb_info *df_ru_get_bb_info (struct dataflow *, unsigned int); +extern struct dataflow *df_rd_add_problem (struct df *); +extern struct df_rd_bb_info *df_rd_get_bb_info (struct dataflow *, unsigned int); +extern struct dataflow *df_lr_add_problem (struct df *); +extern struct df_lr_bb_info *df_lr_get_bb_info (struct dataflow *, unsigned int); +extern struct dataflow *df_ur_add_problem (struct df *); +extern struct df_ur_bb_info *df_ur_get_bb_info (struct dataflow *, unsigned int); +extern struct dataflow *df_urec_add_problem (struct df *); +extern struct df_urec_bb_info *df_urec_get_bb_info (struct dataflow *, unsigned int); +extern struct dataflow *df_chain_add_problem (struct df *, int flags); +extern struct dataflow *df_ri_add_problem (struct df *); +extern int df_reg_lifetime (struct df *, rtx reg); + + +/* Functions defined in df-scan.c. */ + +extern struct df_scan_bb_info *df_scan_get_bb_info (struct dataflow *, unsigned int); +extern struct dataflow *df_scan_add_problem (struct df *); +extern void df_rescan_blocks (struct df *, bitmap); +extern struct df_ref *df_ref_create (struct df *, rtx, rtx *, rtx,basic_block,enum df_ref_type, enum df_ref_flags); +extern struct df_ref *df_get_artificial_defs (struct df *, unsigned int); +extern struct df_ref *df_get_artificial_uses (struct df *, unsigned int); +extern void df_reg_chain_create (struct df_reg_info *, struct df_ref *); +extern struct df_ref *df_reg_chain_unlink (struct dataflow *, struct df_ref *); +extern void df_ref_remove (struct df *, struct df_ref *); +extern void df_insn_refs_delete (struct dataflow *, rtx); +extern void df_refs_delete (struct dataflow *, bitmap); +extern void df_reorganize_refs (struct df_ref_info *); +extern void df_set_state (int); +extern void df_hard_reg_init (void); +extern bool df_read_modify_subreg_p (rtx); + + +#endif /* GCC_DF_H */ diff --git a/gcc/dfp.c b/gcc/dfp.c new file mode 100644 index 00000000000..55c6f2de4f5 --- /dev/null +++ b/gcc/dfp.c @@ -0,0 +1,725 @@ +/* Decimal floating point support. + Copyright (C) 2005 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, 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301, USA. */ + +#include "config.h" +#include "system.h" +#include "coretypes.h" +#include "tm.h" +#include "tree.h" +#include "toplev.h" +#include "real.h" +#include "tm_p.h" +#include "dfp.h" + +/* The order of the following headers is important for making sure + decNumber structure is large enough to hold decimal128 digits. */ + +#include "decimal128.h" +#include "decimal64.h" +#include "decimal32.h" +#include "decNumber.h" + +static unsigned long +dfp_byte_swap (unsigned long in) +{ + unsigned long out; + unsigned char *p = (unsigned char *) &out; + union { + unsigned long i; + unsigned char b[4]; + } u; + + u.i = in; + p[0] = u.b[3]; + p[1] = u.b[2]; + p[2] = u.b[1]; + p[3] = u.b[0]; + + return out; +} + +/* Initialize R (a real with the decimal flag set) from DN. Can + utilize status passed in via CONTEXT, if a previous operation had + interesting status. */ + +static void +decimal_from_decnumber (REAL_VALUE_TYPE *r, decNumber *dn, decContext *context) +{ + memset (r, 0, sizeof (REAL_VALUE_TYPE)); + + r->cl = rvc_normal; + if (decNumberIsZero (dn)) + r->cl = rvc_zero; + if (decNumberIsNaN (dn)) + r->cl = rvc_nan; + if (decNumberIsInfinite (dn)) + r->cl = rvc_inf; + if (context->status & DEC_Overflow) + r->cl = rvc_inf; + if (decNumberIsNegative (dn)) + r->sign = 1; + r->decimal = 1; + + if (r->cl != rvc_normal) + return; + + decContextDefault (context, DEC_INIT_DECIMAL128); + context->traps = 0; + + decimal128FromNumber ((decimal128 *) r->sig, dn, context); +} + +/* Create decimal encoded R from string S. */ + +void +decimal_real_from_string (REAL_VALUE_TYPE *r, const char *s) +{ + decNumber dn; + decContext set; + decContextDefault (&set, DEC_INIT_DECIMAL128); + set.traps = 0; + + decNumberFromString (&dn, (char *) s, &set); + + /* It would be more efficient to store directly in decNumber format, + but that is impractical from current data structure size. + Encoding as a decimal128 is much more compact. */ + decimal_from_decnumber (r, &dn, &set); +} + +/* Initialize a decNumber from a REAL_VALUE_TYPE. */ + +static void +decimal_to_decnumber (const REAL_VALUE_TYPE *r, decNumber *dn) +{ + decContext set; + decContextDefault (&set, DEC_INIT_DECIMAL128); + set.traps = 0; + + switch (r->cl) + { + case rvc_zero: + decNumberZero (dn); + break; + case rvc_inf: + decNumberFromString (dn, (char *)"Infinity", &set); + break; + case rvc_nan: + if (r->signalling) + decNumberFromString (dn, (char *)"snan", &set); + else + decNumberFromString (dn, (char *)"nan", &set); + break; + case rvc_normal: + gcc_assert (r->decimal); + decimal128ToNumber ((decimal128 *) r->sig, dn); + break; + default: + gcc_unreachable (); + } + + /* Fix up sign bit. */ + if (r->sign != decNumberIsNegative (dn)) + decNumberNegate (dn); +} + +/* Encode a real into an IEEE 754R decimal32 type. */ + +void +encode_decimal32 (const struct real_format *fmt ATTRIBUTE_UNUSED, + long *buf, const REAL_VALUE_TYPE *r) +{ + decNumber dn; + decimal32 d32; + decContext set; + + decContextDefault (&set, DEC_INIT_DECIMAL128); + set.traps = 0; + + decimal_to_decnumber (r, &dn); + decimal32FromNumber (&d32, &dn, &set); + + if (FLOAT_WORDS_BIG_ENDIAN) + buf[0] = *(uint32_t *) d32.bytes; + else + buf[0] = dfp_byte_swap (*(uint32_t *) d32.bytes); +} + +/* Decode an IEEE 754R decimal32 type into a real. */ + +void decode_decimal32 (const struct real_format *fmt ATTRIBUTE_UNUSED, + REAL_VALUE_TYPE *r, const long *buf) +{ + decNumber dn; + decimal32 d32; + decContext set; + + decContextDefault (&set, DEC_INIT_DECIMAL128); + set.traps = 0; + + if (FLOAT_WORDS_BIG_ENDIAN) + *((uint32_t *) d32.bytes) = (uint32_t) buf[0]; + else + *((uint32_t *) d32.bytes) = dfp_byte_swap ((uint32_t) buf[0]); + + decimal32ToNumber (&d32, &dn); + decimal_from_decnumber (r, &dn, &set); +} + +/* Encode a real into an IEEE 754R decimal64 type. */ + +void +encode_decimal64 (const struct real_format *fmt ATTRIBUTE_UNUSED, + long *buf, const REAL_VALUE_TYPE *r) +{ + decNumber dn; + decimal64 d64; + decContext set; + + decContextDefault (&set, DEC_INIT_DECIMAL128); + set.traps = 0; + + decimal_to_decnumber (r, &dn); + decimal64FromNumber (&d64, &dn, &set); + + if (FLOAT_WORDS_BIG_ENDIAN) + { + buf[0] = *(uint32_t *) &d64.bytes[0]; + buf[1] = *(uint32_t *) &d64.bytes[4]; + } + else + { + buf[1] = dfp_byte_swap (*(uint32_t *) &d64.bytes[0]); + buf[0] = dfp_byte_swap (*(uint32_t *) &d64.bytes[4]); + } +} + +/* Decode an IEEE 754R decimal64 type into a real. */ + +void +decode_decimal64 (const struct real_format *fmt ATTRIBUTE_UNUSED, + REAL_VALUE_TYPE *r, const long *buf) +{ + decNumber dn; + decimal64 d64; + decContext set; + + decContextDefault (&set, DEC_INIT_DECIMAL128); + set.traps = 0; + + if (FLOAT_WORDS_BIG_ENDIAN) + { + *((uint32_t *) &d64.bytes[0]) = (uint32_t) buf[0]; + *((uint32_t *) &d64.bytes[4]) = (uint32_t) buf[1]; + } + else + { + *((uint32_t *) &d64.bytes[0]) = dfp_byte_swap ((uint32_t) buf[1]); + *((uint32_t *) &d64.bytes[4]) = dfp_byte_swap ((uint32_t) buf[0]); + } + + decimal64ToNumber (&d64, &dn); + decimal_from_decnumber (r, &dn, &set); +} + +/* Encode a real into an IEEE 754R decimal128 type. */ + +void +encode_decimal128 (const struct real_format *fmt ATTRIBUTE_UNUSED, + long *buf, const REAL_VALUE_TYPE *r) +{ + decNumber dn; + decContext set; + decimal128 d128; + + decContextDefault (&set, DEC_INIT_DECIMAL128); + set.traps = 0; + + decimal_to_decnumber (r, &dn); + decimal128FromNumber (&d128, &dn, &set); + + if (FLOAT_WORDS_BIG_ENDIAN) + { + buf[0] = *(uint32_t *) &d128.bytes[0]; + buf[1] = *(uint32_t *) &d128.bytes[4]; + buf[2] = *(uint32_t *) &d128.bytes[8]; + buf[3] = *(uint32_t *) &d128.bytes[12]; + } + else + { + buf[0] = dfp_byte_swap (*(uint32_t *) &d128.bytes[12]); + buf[1] = dfp_byte_swap (*(uint32_t *) &d128.bytes[8]); + buf[2] = dfp_byte_swap (*(uint32_t *) &d128.bytes[4]); + buf[3] = dfp_byte_swap (*(uint32_t *) &d128.bytes[0]); + } +} + +/* Decode an IEEE 754R decimal128 type into a real. */ + +void +decode_decimal128 (const struct real_format *fmt ATTRIBUTE_UNUSED, + REAL_VALUE_TYPE *r, const long *buf) +{ + decNumber dn; + decimal128 d128; + decContext set; + + decContextDefault (&set, DEC_INIT_DECIMAL128); + set.traps = 0; + + if (FLOAT_WORDS_BIG_ENDIAN) + { + *((uint32_t *) &d128.bytes[0]) = (uint32_t) buf[0]; + *((uint32_t *) &d128.bytes[4]) = (uint32_t) buf[1]; + *((uint32_t *) &d128.bytes[8]) = (uint32_t) buf[2]; + *((uint32_t *) &d128.bytes[12]) = (uint32_t) buf[3]; + } + else + { + *((uint32_t *) &d128.bytes[0]) = dfp_byte_swap ((uint32_t) buf[3]); + *((uint32_t *) &d128.bytes[4]) = dfp_byte_swap ((uint32_t) buf[2]); + *((uint32_t *) &d128.bytes[8]) = dfp_byte_swap ((uint32_t) buf[1]); + *((uint32_t *) &d128.bytes[12]) = dfp_byte_swap ((uint32_t) buf[0]); + } + + decimal128ToNumber (&d128, &dn); + decimal_from_decnumber (r, &dn, &set); +} + +/* Helper function to convert from a binary real internal + representation. */ + +static void +decimal_to_binary (REAL_VALUE_TYPE *to, const REAL_VALUE_TYPE *from, + enum machine_mode mode) +{ + char string[256]; + decimal128 *d128; + d128 = (decimal128 *) from->sig; + + decimal128ToString (d128, string); + real_from_string3 (to, string, mode); +} + + +/* Helper function to convert from a binary real internal + representation. */ + +static void +decimal_from_binary (REAL_VALUE_TYPE *to, const REAL_VALUE_TYPE *from) +{ + char string[256]; + + /* We convert to string, then to decNumber then to decimal128. */ + real_to_decimal (string, from, sizeof (string), 0, 1); + decimal_real_from_string (to, string); +} + +/* Helper function to real.c:do_compare() to handle decimal internal + representation including when one of the operands is still in the + binary internal representation. */ + +int +decimal_do_compare (const REAL_VALUE_TYPE *a, const REAL_VALUE_TYPE *b, + int nan_result) +{ + decContext set; + decNumber dn, dn2, dn3; + REAL_VALUE_TYPE a1, b1; + + /* If either operand is non-decimal, create temporary versions. */ + if (!a->decimal) + { + decimal_from_binary (&a1, a); + a = &a1; + } + if (!b->decimal) + { + decimal_from_binary (&b1, b); + b = &b1; + } + + /* Convert into decNumber form for comparison operation. */ + decContextDefault (&set, DEC_INIT_DECIMAL128); + set.traps = 0; + decimal128ToNumber ((decimal128 *) a->sig, &dn2); + decimal128ToNumber ((decimal128 *) b->sig, &dn3); + + /* Finally, do the comparison. */ + decNumberCompare (&dn, &dn2, &dn3, &set); + + /* Return the comparison result. */ + if (decNumberIsNaN (&dn)) + return nan_result; + else if (decNumberIsZero (&dn)) + return 0; + else if (decNumberIsNegative (&dn)) + return -1; + else + return 1; +} + +/* Helper to round_for_format, handling decimal float types. */ + +void +decimal_round_for_format (const struct real_format *fmt, REAL_VALUE_TYPE *r) +{ + decNumber dn; + decContext set; + + /* Real encoding occurs later. */ + if (r->cl != rvc_normal) + return; + + decContextDefault (&set, DEC_INIT_DECIMAL128); + set.traps = 0; + decimal128ToNumber ((decimal128 *) r->sig, &dn); + + if (fmt == &decimal_quad_format) + { + /* The internal format is already in this format. */ + return; + } + else if (fmt == &decimal_single_format) + { + decimal32 d32; + decContextDefault (&set, DEC_INIT_DECIMAL32); + set.traps = 0; + + decimal32FromNumber (&d32, &dn, &set); + decimal32ToNumber (&d32, &dn); + } + else if (fmt == &decimal_double_format) + { + decimal64 d64; + decContextDefault (&set, DEC_INIT_DECIMAL64); + set.traps = 0; + + decimal64FromNumber (&d64, &dn, &set); + decimal64ToNumber (&d64, &dn); + } + else + gcc_unreachable (); + + decimal_from_decnumber (r, &dn, &set); +} + +/* Extend or truncate to a new mode. Handles conversions between + binary and decimal types. */ + +void +decimal_real_convert (REAL_VALUE_TYPE *r, enum machine_mode mode, + const REAL_VALUE_TYPE *a) +{ + const struct real_format *fmt = REAL_MODE_FORMAT (mode); + + if (a->decimal && fmt->b == 10) + return; + if (a->decimal) + decimal_to_binary (r, a, mode); + else + decimal_from_binary (r, a); +} + +/* Render R_ORIG as a decimal floating point constant. Emit DIGITS + significant digits in the result, bounded by BUF_SIZE. If DIGITS + is 0, choose the maximum for the representation. If + CROP_TRAILING_ZEROS, strip trailing zeros. Currently, not honoring + DIGITS or CROP_TRAILING_ZEROS. */ + +void decimal_real_to_decimal (char *str, const REAL_VALUE_TYPE *r_orig, + size_t buf_size, + size_t digits ATTRIBUTE_UNUSED, + int crop_trailing_zeros ATTRIBUTE_UNUSED) +{ + decimal128 *d128 = (decimal128*) r_orig->sig; + + /* decimal128ToString requires space for at least 24 characters; + Require two more for suffix. */ + gcc_assert (buf_size >= 24); + decimal128ToString (d128, str); +} + +static bool +decimal_do_add (REAL_VALUE_TYPE *r, const REAL_VALUE_TYPE *op0, + const REAL_VALUE_TYPE *op1, int subtract_p) +{ + decNumber dn; + decContext set; + decNumber dn2, dn3; + + decimal_to_decnumber (op0, &dn2); + decimal_to_decnumber (op1, &dn3); + + decContextDefault (&set, DEC_INIT_DECIMAL128); + set.traps = 0; + + if (subtract_p) + decNumberSubtract (&dn, &dn2, &dn3, &set); + else + decNumberAdd (&dn, &dn2, &dn3, &set); + + decimal_from_decnumber (r, &dn, &set); + + /* Return true, if inexact. */ + return (set.status & DEC_Inexact); +} + +/* Compute R = OP0 * OP1. */ + +static bool +decimal_do_multiply (REAL_VALUE_TYPE *r, const REAL_VALUE_TYPE *op0, + const REAL_VALUE_TYPE *op1) +{ + decContext set; + decNumber dn, dn2, dn3; + + decimal_to_decnumber (op0, &dn2); + decimal_to_decnumber (op1, &dn3); + + decContextDefault (&set, DEC_INIT_DECIMAL128); + set.traps = 0; + + decNumberMultiply (&dn, &dn2, &dn3, &set); + decimal_from_decnumber (r, &dn, &set); + + /* Return true, if inexact. */ + return (set.status & DEC_Inexact); +} + +/* Compute R = OP0 / OP1. */ + +static bool +decimal_do_divide (REAL_VALUE_TYPE *r, const REAL_VALUE_TYPE *op0, + const REAL_VALUE_TYPE *op1) +{ + decContext set; + decNumber dn, dn2, dn3; + + decimal_to_decnumber (op0, &dn2); + decimal_to_decnumber (op1, &dn3); + + decContextDefault (&set, DEC_INIT_DECIMAL128); + set.traps = 0; + + decNumberDivide (&dn, &dn2, &dn3, &set); + decimal_from_decnumber (r, &dn, &set); + + /* Return true, if inexact. */ + return (set.status & DEC_Inexact); +} + +/* Set R to A truncated to an integral value toward zero (decimal + floating point). */ + +void +decimal_do_fix_trunc (REAL_VALUE_TYPE *r, const REAL_VALUE_TYPE *a) +{ + decNumber dn, dn2; + decContext set; + + decContextDefault (&set, DEC_INIT_DECIMAL128); + set.traps = 0; + set.round = DEC_ROUND_DOWN; + decimal128ToNumber ((decimal128 *) a->sig, &dn2); + + decNumberToIntegralValue (&dn, &dn2, &set); + decimal_from_decnumber (r, &dn, &set); +} + +/* Render decimal float value R as an integer. */ + +HOST_WIDE_INT +decimal_real_to_integer (const REAL_VALUE_TYPE *r) +{ + decContext set; + decNumber dn, dn2, dn3; + REAL_VALUE_TYPE to; + char string[256]; + + decContextDefault (&set, DEC_INIT_DECIMAL128); + set.traps = 0; + set.round = DEC_ROUND_DOWN; + decimal128ToNumber ((decimal128 *) r->sig, &dn); + + decNumberToIntegralValue (&dn2, &dn, &set); + decNumberZero (&dn3); + decNumberRescale (&dn, &dn2, &dn3, &set); + + /* Convert to REAL_VALUE_TYPE and call appropriate conversion + function. */ + decNumberToString (&dn, string); + real_from_string (&to, string); + return real_to_integer (&to); +} + +/* Likewise, but to an integer pair, HI+LOW. */ + +void +decimal_real_to_integer2 (HOST_WIDE_INT *plow, HOST_WIDE_INT *phigh, + const REAL_VALUE_TYPE *r) +{ + decContext set; + decNumber dn, dn2, dn3; + REAL_VALUE_TYPE to; + char string[256]; + + decContextDefault (&set, DEC_INIT_DECIMAL128); + set.traps = 0; + set.round = DEC_ROUND_DOWN; + decimal128ToNumber ((decimal128 *) r->sig, &dn); + + decNumberToIntegralValue (&dn2, &dn, &set); + decNumberZero (&dn3); + decNumberRescale (&dn, &dn2, &dn3, &set); + + /* Conver to REAL_VALUE_TYPE and call appropriate conversion + function. */ + decNumberToString (&dn, string); + real_from_string (&to, string); + real_to_integer2 (plow, phigh, &to); +} + +/* Perform the decimal floating point operation described by COODE. + For a unary operation, leave OP1 NULL. This function returns true + if the result may be inexact due to loss of precision. */ + +bool +decimal_real_arithmetic (REAL_VALUE_TYPE *r, int icode, + const REAL_VALUE_TYPE *op0, + const REAL_VALUE_TYPE *op1) +{ + enum tree_code code = icode; + REAL_VALUE_TYPE a1; + REAL_VALUE_TYPE b1; + + /* If either op is not a decimal, create a temporary decimal + versions. */ + if (!op0->decimal) + { + decimal_from_binary (&a1, op0); + op0 = &a1; + } + if (op1 && !op1->decimal) + { + decimal_from_binary (&b1, op1); + op1 = &b1; + } + + switch (code) + { + case PLUS_EXPR: + (void) decimal_do_add (r, op0, op1, 0); + break; + + case MINUS_EXPR: + (void) decimal_do_add (r, op0, op1, 1); + break; + + case MULT_EXPR: + (void) decimal_do_multiply (r, op0, op1); + break; + + case RDIV_EXPR: + (void) decimal_do_divide (r, op0, op1); + break; + + case MIN_EXPR: + if (op1->cl == rvc_nan) + *r = *op1; + else if (real_compare (UNLT_EXPR, op0, op1)) + *r = *op0; + else + *r = *op1; + break; + + case MAX_EXPR: + if (op1->cl == rvc_nan) + *r = *op1; + else if (real_compare (LT_EXPR, op0, op1)) + *r = *op1; + else + *r = *op0; + break; + + case NEGATE_EXPR: + { + decimal128 *d128; + *r = *op0; + d128 = (decimal128 *) r->sig; + /* Flip high bit. */ + d128->bytes[0] ^= 1 << 7; + /* Keep sign field in sync. */ + r->sign ^= 1; + } + break; + + case ABS_EXPR: + { + decimal128 *d128; + *r = *op0; + d128 = (decimal128 *) r->sig; + /* Clear high bit. */ + d128->bytes[0] &= 0x7f; + /* Keep sign field in sync. */ + r->sign = 0; + } + break; + + case FIX_TRUNC_EXPR: + decimal_do_fix_trunc (r, op0); + break; + + default: + gcc_unreachable (); + } + + /* FIXME: Indicate all operations as inexact for now due to unknown + working precision. */ + return true; +} + +/* Fills R with the largest finite value representable in mode MODE. + If SIGN is nonzero, R is set to the most negative finite value. */ + +void +decimal_real_maxval (REAL_VALUE_TYPE *r, int sign, enum machine_mode mode) +{ + char *max; + + switch (mode) + { + case SDmode: + max = (char *) "9.999999E96"; + break; + case DDmode: + max = (char *) "9.999999999999999E384"; + break; + case TDmode: + max = (char *) "9.999999999999999999999999999999999E6144"; + break; + default: + gcc_unreachable (); + } + + decimal_real_from_string (r, max); + if (sign) + r->sig[0] |= 0x80000000; +} diff --git a/gcc/dfp.h b/gcc/dfp.h new file mode 100644 index 00000000000..d7f5b01cc7d --- /dev/null +++ b/gcc/dfp.h @@ -0,0 +1,47 @@ +/* Decimal floating point support functions for GNU compiler. + Copyright (C) 2005 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, 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301, USA. */ + +#ifndef GCC_DFP_H +#define GCC_DFP_H + +/* Encode REAL_VALUE_TYPEs into 32/64/128-bit IEEE 754R encoded values. */ +void encode_decimal32 (const struct real_format *fmt, long *, const REAL_VALUE_TYPE *); +void encode_decimal64 (const struct real_format *fmt, long *, const REAL_VALUE_TYPE *); +void decode_decimal128 (const struct real_format *, REAL_VALUE_TYPE *, const long *); + +/* Decode 32/64/128-bit IEEE 754R encoded values into REAL_VALUE_TYPEs. */ +void decode_decimal32 (const struct real_format *, REAL_VALUE_TYPE *, const long *); +void decode_decimal64 (const struct real_format *, REAL_VALUE_TYPE *, const long *); +void encode_decimal128 (const struct real_format *fmt, long *, const REAL_VALUE_TYPE *); + +/* Arithmetic and conversion functions. */ +int decimal_do_compare (const REAL_VALUE_TYPE *, const REAL_VALUE_TYPE *, int); +void decimal_real_from_string (REAL_VALUE_TYPE *, const char *); +void decimal_round_for_format (const struct real_format *, REAL_VALUE_TYPE *); +void decimal_real_convert (REAL_VALUE_TYPE *, enum machine_mode, const REAL_VALUE_TYPE *); +void decimal_real_to_decimal (char *, const REAL_VALUE_TYPE *, size_t, size_t, int); +void decimal_do_fix_trunc (REAL_VALUE_TYPE *, const REAL_VALUE_TYPE *); +bool decimal_real_arithmetic (REAL_VALUE_TYPE *, int, const REAL_VALUE_TYPE *, + const REAL_VALUE_TYPE *); +void decimal_real_maxval (REAL_VALUE_TYPE *, int, enum machine_mode); +void decimal_real_to_integer2 (HOST_WIDE_INT *, HOST_WIDE_INT *, const REAL_VALUE_TYPE *); +HOST_WIDE_INT decimal_real_to_integer (const REAL_VALUE_TYPE *); + +#endif /* GCC_DFP_H */ diff --git a/gcc/doc/c-tree.texi b/gcc/doc/c-tree.texi index 0163c5e2f85..5045b72eb60 100644 --- a/gcc/doc/c-tree.texi +++ b/gcc/doc/c-tree.texi @@ -1477,7 +1477,6 @@ This predicate holds if the function an overloaded @findex IF_COND @findex THEN_CLAUSE @findex ELSE_CLAUSE -@tindex RETURN_INIT @tindex RETURN_STMT @findex RETURN_EXPR @tindex SUBOBJECT @@ -1720,22 +1719,6 @@ statement can be obtained with the @code{LABEL_EXPR_LABEL} macro. The @code{IDENTIFIER_NODE} giving the name of the label can be obtained from the @code{LABEL_DECL} with @code{DECL_NAME}. -@item RETURN_INIT - -If the function uses the G++ ``named return value'' extension, meaning -that the function has been defined like: -@smallexample -S f(int) return s @{@dots{}@} -@end smallexample -then there will be a @code{RETURN_INIT}. There is never a named -returned value for a constructor. The first argument to the -@code{RETURN_INIT} is the name of the object returned; the second -argument is the initializer for the object. The object is initialized -when the @code{RETURN_INIT} is encountered. The object referred to is -the actual object returned; this extension is a manual way of doing the -``return-value optimization''. Therefore, the object must actually be -constructed in the place where the object will be returned. - @item RETURN_STMT Used to represent a @code{return} statement. The @code{RETURN_EXPR} is diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi index a796da62685..0c2f39c1e10 100644 --- a/gcc/doc/extend.texi +++ b/gcc/doc/extend.texi @@ -1,5 +1,6 @@ -@c Copyright (C) 1988,1989,1992,1993,1994,1996,1998,1999,2000,2001,2002,2003,2004,2005 -@c Free Software Foundation, Inc. +@c Copyright (C) 1988, 1989, 1992, 1993, 1994, 1996, 1998, 1999, 2000, +@c 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. + @c This is part of the GCC manual. @c For copying conditions, see the file gcc.texi. @@ -32,6 +33,7 @@ extensions, accepted by GCC in C89 mode and in C++. * Conditionals:: Omitting the middle operand of a @samp{?:} expression. * Long Long:: Double-word integers---@code{long long int}. * Complex:: Data types for complex numbers. +* Decimal Float:: Decimal Floating Point. * Hex Floats:: Hexadecimal floating-point constants. * Zero Length:: Zero-length arrays. * Variable Length:: Arrays whose length is computed at run time. @@ -813,6 +815,42 @@ If the variable's actual name is @code{foo}, the two fictitious variables are named @code{foo$real} and @code{foo$imag}. You can examine and set these two fictitious variables with your debugger. +@node Decimal Float +@section Decimal Floating Point +@cindex decimal floating point +@cindex @code{_Decimal32} data type +@cindex @code{_Decimal64} data type +@cindex @code{_Decimal128} data type +@cindex @code{df} integer suffix +@cindex @code{dd} integer suffix +@cindex @code{dl} integer suffix +@cindex @code{DF} integer suffix +@cindex @code{DD} integer suffix +@cindex @code{DL} integer suffix + +GNU C supports decimal floating point types in addition to the +standard floating-point types. This extension supports decimal +floating-point arithmetic as defined in IEEE-754R, the proposed +revision of IEEE-754. The C language extension is defined in ISO/IEC +DTR 24732, Draft 5. Support for this functionality will change when +it is accepted into the C standard and might change for new drafts +of the proposal. Calling conventions for any target might also change. +Not all targets support decimal floating point. + +Support for decimal floating point includes the arithmetic operators +add, subtract, multiply, divide; unary arithmetic operators; +relational operators; equality operators; and conversions to and from +integer and other floating-point types. Use a suffix @samp{df} or +@samp{DF} in a literal constant of type @code{_Decimal32}, @samp{dd} +or @samp{DD} for @code{_Decimal64}, and @samp{dl} or @samp{DL} for +@code{_Decimal128}. + +Passing a decimal floating-point value as an argument to a function +without a prototype is undefined. + +Types @code{_Decimal32}, @code{_Decimal64}, and @code{_Decimal128} +are supported by the DWARF2 debug information format. + @node Hex Floats @section Hex Floats @cindex hex floats @@ -1554,7 +1592,7 @@ void __f () @{ /* @r{Do something.} */; @} void f () __attribute__ ((weak, alias ("__f"))); @end smallexample -declares @samp{f} to be a weak alias for @samp{__f}. In C++, the +defines @samp{f} to be a weak alias for @samp{__f}. In C++, the mangled name for the target must be used. It is an error if @samp{__f} is not defined in the same translation unit. @@ -2376,12 +2414,12 @@ implicitly marks the declaration as @code{weak}. Without a @code{weakref} is equivalent to @code{weak}. @smallexample -extern int x() __attribute__ ((weakref ("y"))); +static int x() __attribute__ ((weakref ("y"))); /* is equivalent to... */ -extern int x() __attribute__ ((weak, weakref, alias ("y"))); +static int x() __attribute__ ((weak, weakref, alias ("y"))); /* and to... */ -extern int x() __attribute__ ((weakref)); -extern int x() __attribute__ ((alias ("y"))); +static int x() __attribute__ ((weakref)); +static int x() __attribute__ ((alias ("y"))); @end smallexample A weak reference is an alias that does not by itself require a @@ -2396,6 +2434,9 @@ separate translation unit, renaming the alias to the aliased symbol, declaring it as weak, compiling the two separate translation units and performing a reloadable link on them. +At present, a declaration to which @code{weakref} is attached can +only be @code{static}. + @item externally_visible @cindex @code{externally_visible} attribute. This attribute, attached to a global variable or function nullify @@ -5658,6 +5699,18 @@ Similar to @code{__builtin_huge_val}, except a warning is generated if the target floating-point format does not support infinities. @end deftypefn +@deftypefn {Built-in Function} _Decimal32 __builtin_infd32 (void) +Similar to @code{__builtin_inf}, except the return type is @code{_Decimal32}. +@end deftypefn + +@deftypefn {Built-in Function} _Decimal64 __builtin_infd64 (void) +Similar to @code{__builtin_inf}, except the return type is @code{_Decimal64}. +@end deftypefn + +@deftypefn {Built-in Function} _Decimal128 __builtin_infd128 (void) +Similar to @code{__builtin_inf}, except the return type is @code{_Decimal128}. +@end deftypefn + @deftypefn {Built-in Function} float __builtin_inff (void) Similar to @code{__builtin_inf}, except the return type is @code{float}. This function is suitable for implementing the ISO C99 macro @code{INFINITY}. @@ -5684,6 +5737,18 @@ This function, if given a string literal, is evaluated early enough that it is considered a compile-time constant. @end deftypefn +@deftypefn {Built-in Function} _Decimal32 __builtin_nand32 (const char *str) +Similar to @code{__builtin_nan}, except the return type is @code{_Decimal32}. +@end deftypefn + +@deftypefn {Built-in Function} _Decimal64 __builtin_nand64 (const char *str) +Similar to @code{__builtin_nan}, except the return type is @code{_Decimal64}. +@end deftypefn + +@deftypefn {Built-in Function} _Decimal128 __builtin_nand128 (const char *str) +Similar to @code{__builtin_nan}, except the return type is @code{_Decimal128}. +@end deftypefn + @deftypefn {Built-in Function} float __builtin_nanf (const char *str) Similar to @code{__builtin_nan}, except the return type is @code{float}. @end deftypefn @@ -9799,7 +9864,7 @@ Predefined Macros,cpp,The GNU C Preprocessor}). * Bound member functions:: You can extract a function pointer to the method denoted by a @samp{->*} or @samp{.*} expression. * C++ Attributes:: Variable, function, and type attributes for C++ only. -* Strong Using:: Strong using-directives for namespace composition. +* Namespace Association:: Strong using-directives for namespace association. * Java Exceptions:: Tweaking exception handling to work with Java. * Deprecated Features:: Things will disappear from g++. * Backwards Compatibility:: Compatibilities with earlier definitions of C++. @@ -10337,22 +10402,23 @@ interface table mechanism, instead of regular virtual table dispatch. @end table -See also @xref{Strong Using}. +See also @xref{Namespace Association}. -@node Strong Using -@section Strong Using +@node Namespace Association +@section Namespace Association @strong{Caution:} The semantics of this extension are not fully defined. Users should refrain from using this extension as its semantics may change subtly over time. It is possible that this -extension wil be removed in future versions of G++. +extension will be removed in future versions of G++. A using-directive with @code{__attribute ((strong))} is stronger than a normal using-directive in two ways: @itemize @bullet @item -Templates from the used namespace can be specialized as though they were members of the using namespace. +Templates from the used namespace can be specialized and explicitly +instantiated as though they were members of the using namespace. @item The using namespace is considered an associated namespace of all @@ -10360,6 +10426,9 @@ templates in the used namespace for purposes of argument-dependent name lookup. @end itemize +The used namespace must be nested within the using namespace so that +normal unqualified lookup works properly. + This is useful for composing a namespace transparently from implementation namespaces. For example: diff --git a/gcc/doc/gty.texi b/gcc/doc/gty.texi index cf4bde76d73..d997d1edc6d 100644 --- a/gcc/doc/gty.texi +++ b/gcc/doc/gty.texi @@ -429,16 +429,8 @@ generated header file should be included after everything else in the source file. Don't forget to mention this file as a dependency in the @file{Makefile}! -@item -If a new @file{gt-@var{path}.h} file is needed, you need to arrange to -add a @file{Makefile} rule that will ensure this file can be built. -This is done by making it a dependency of @code{s-gtype}, like this: -@verbatim -gt-path.h : s-gtype ; @true -@end verbatim @end enumerate For language frontends, there is another file that needs to be included somewhere. It will be called @file{gtype-@var{lang}.h}, where @var{lang} is the name of the subdirectory the language is contained in. -It will need @file{Makefile} rules just like the other generated files. diff --git a/gcc/doc/hostconfig.texi b/gcc/doc/hostconfig.texi index 98dadafe360..1c97ac278e7 100644 --- a/gcc/doc/hostconfig.texi +++ b/gcc/doc/hostconfig.texi @@ -208,11 +208,6 @@ initialization when @code{collect2} is being initialized. If defined, a C statement (sans semicolon) that performs host-dependent initialization when a compilation driver is being initialized. -@item SMALL_ARG_MAX -Define this macro if the host system has a small limit on the total -size of an argument vector. This causes the driver to take more care -not to pass unnecessary arguments to subprocesses. - @item HOST_LONG_LONG_FORMAT If defined, the string used to indicate an argument of type @code{long long} to functions like @code{printf}. The default value is diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi index a649d463e59..074f95df515 100644 --- a/gcc/doc/install.texi +++ b/gcc/doc/install.texi @@ -373,7 +373,7 @@ Necessary to build GCC during development because the generated output files are not included in the CVS repository. They are included in releases. -@item Texinfo version 4.2 (or later) +@item Texinfo version 4.4 (or later) Necessary for running @command{makeinfo} when modifying @file{*.texi} files to test your changes. @@ -1212,6 +1212,14 @@ error message. All support for systems which have been obsoleted in one release of GCC is removed entirely in the next major release, unless someone steps forward to maintain the port. + +@item --enable-decimal-float +@itemx --disable-decimal-float +Enable (or disable) support for the C decimal floating point +extension. This is enabled by default only on PowerPC GNU/Linux +systems. Other systems may also support it, but require the user to +specifically enable it. + @end table @subheading Cross-Compiler-Specific Options @@ -1277,7 +1285,7 @@ omitted from @file{libgcc.a} on the assumption that it will be provided by @samp{newlib}. @end table -@subheading Fortran-specific Option +@subheading Fortran-Specific Options The following options apply to the build of the Fortran front end. @@ -1491,7 +1499,7 @@ parser sources, releases contain the Bison-generated files and you do not need Bison installed to build them. When building from CVS or snapshots, or if you modify Texinfo -documentation, you need version 4.2 or later of Texinfo installed if you +documentation, you need version 4.4 or later of Texinfo installed if you want Info documentation to be regenerated. Releases contain Info documentation pre-built for the unmodified documentation in the release. @@ -2060,7 +2068,7 @@ If you find a bug, please report it following the @uref{../bugs.html,,bug reporting guidelines}. If you want to print the GCC manuals, do @samp{cd @var{objdir}; make -dvi}. You will need to have @command{texi2dvi} (version at least 4.2) +dvi}. You will need to have @command{texi2dvi} (version at least 4.4) and @TeX{} installed. This creates a number of @file{.dvi} files in subdirectories of @file{@var{objdir}}; these may be converted for printing with programs such as @command{dvips}. You can also @@ -3497,7 +3505,7 @@ or newer for a working GCC@. @end html @heading @anchor{powerpc-x-netbsd}powerpc-*-netbsd* PowerPC system in big endian mode running NetBSD@. To build the -documentation you will need Texinfo version 4.2 (NetBSD 1.5.1 included +documentation you will need Texinfo version 4.4 (NetBSD 1.5.1 included Texinfo version 3.12). @html diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 66a7b5daabf..032f3ad048d 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -222,7 +222,7 @@ Objective-C and Objective-C++ Dialects}. @item Warning Options @xref{Warning Options,,Options to Request or Suppress Warnings}. @gccoptlist{-fsyntax-only -pedantic -pedantic-errors @gol --w -Wextra -Wall -Waggregate-return -Wno-attributes @gol +-w -Wextra -Wall -Waggregate-return -Walways-true -Wno-attributes @gol -Wc++-compat -Wcast-align -Wcast-qual -Wchar-subscripts -Wcomment @gol -Wconversion -Wno-deprecated-declarations @gol -Wdisabled-optimization -Wno-div-by-zero -Wno-endif-labels @gol @@ -244,6 +244,7 @@ Objective-C and Objective-C++ Dialects}. -Wreturn-type -Wsequence-point -Wshadow @gol -Wsign-compare -Wstack-protector @gol -Wstrict-aliasing -Wstrict-aliasing=2 @gol +-Wstring-literal-comparison @gol -Wswitch -Wswitch-default -Wswitch-enum @gol -Wsystem-headers -Wtrigraphs -Wundef -Wuninitialized @gol -Wunknown-pragmas -Wno-pragmas -Wunreachable-code @gol @@ -617,8 +618,8 @@ Objective-C and Objective-C++ Dialects}. -mreturn-pointer-on-d0 @gol -mno-crt0 -mrelax} -@emph{MS1 Options} -@gccoptlist{-mno-crt0 -mmul -mbacc -msim @gol +@emph{MT Options} +@gccoptlist{-mno-crt0 -mbacc -msim @gol -march=@var{cpu-type} } @emph{PDP-11 Options} @@ -1987,8 +1988,9 @@ accomplished via the comm page. @item -fobjc-exceptions @opindex fobjc-exceptions Enable syntactic support for structured exception handling in Objective-C, -similar to what is offered by C++ and Java. Currently, this option is only -available in conjunction with the NeXT runtime on Mac OS X 10.3 and later. +similar to what is offered by C++ and Java. This option is +unavailable in conjunction with the NeXT runtime on Mac OS X 10.2 and +earlier. @smallexample @@try @{ @@ -3111,6 +3113,12 @@ Warn if any functions that return structures or unions are defined or called. (In languages where you can return an array, this also elicits a warning.) +@item -Walways-true +@opindex Walways-true +Warn about comparisons which are always true such as testing if +unsigned values are greater than or equal to zero. This warning is +enabled by @option{-Wall}. + @item -Wno-attributes @opindex Wno-attributes @opindex Wattributes @@ -3403,9 +3411,19 @@ This option is only supported for C and Objective-C@. Make all warnings into errors. @item -Wstack-protector +@opindex Wstack-protector This option is only active when @option{-fstack-protector} is active. It warns about functions that will not be protected against stack smashing. +@item -Wstring-literal-comparison +@opindex Wstring-literal-comparison +Warn about suspicious comparisons to string literal constants. In C, +direct comparisons against the memory address of a string literal, such +as @code{if (x == "abc")}, typically indicate a programmer error, and +even when intentional, result in unspecified behavior and are not portable. +Usually these warnings alert that the programmer intended to use +@code{strcmp}. This warning is enabled by @option{-Wall}. + @end table @node Debugging Options @@ -3964,8 +3982,8 @@ Dumps information about call-graph optimization, unused function removal, and inlining decisions. @end table -@item -fdump-tree-@var{switch} @r{(C and C++ only)} -@itemx -fdump-tree-@var{switch}-@var{options} @r{(C and C++ only)} +@item -fdump-tree-@var{switch} +@itemx -fdump-tree-@var{switch}-@var{options} @opindex fdump-tree Control the dumping at various stages of processing the intermediate language tree to a file. The file name is generated by appending a switch @@ -5726,6 +5744,10 @@ The maximum number of fields in a variable without direct structure accesses for which structure aliasing will consider trying to track each field. The default is 5 +@item salias-max-array-elements +The maximum number of elements an array can have and its elements +still be tracked individually by structure aliasing. The default is 4 + @item sra-max-structure-size The maximum structure size, in bytes, at which the scalar replacement of aggregates (SRA) optimization will perform block copies. The @@ -5836,7 +5858,7 @@ A, the growth of unit is 300\% and yet such inlining is very sane. For very large units consisting of small inlininable functions however the overall unit growth limit is needed to avoid exponential explosion of code size. Thus for smaller units, the size is increased to @option{--param large-unit-insns} -before aplying @option{--param inline-unit-growth}. The default is 10000 +before applying @option{--param inline-unit-growth}. The default is 10000 @item inline-unit-growth Specifies maximal overall growth of the compilation unit caused by inlining. @@ -7131,7 +7153,7 @@ platform. * MIPS Options:: * MMIX Options:: * MN10300 Options:: -* MS1 Options:: +* MT Options:: * PDP-11 Options:: * PowerPC Options:: * RS/6000 and PowerPC Options:: @@ -10671,11 +10693,11 @@ has an effect when used on the command line for the final link step. This option makes symbolic debugging impossible. @end table -@node MS1 Options -@subsection MS1 Options -@cindex MS1 options +@node MT Options +@subsection MT Options +@cindex MT options -These @option{-m} options are defined for Morpho MS1 architectures: +These @option{-m} options are defined for Morpho MT architectures: @table @gcctabopt @@ -10683,18 +10705,10 @@ These @option{-m} options are defined for Morpho MS1 architectures: @opindex march Generate code that will run on @var{cpu-type}, which is the name of a system representing a certain processor type. Possible values for -@var{cpu-type} are @samp{MS1-64-001}, @samp{MS1-16-002}, and -@samp{MS1-16-003}. +@var{cpu-type} are @samp{ms1-64-001}, @samp{ms1-16-002}, +@samp{ms1-16-003} and @samp{ms2}. -When this option is not used, the default is @option{-march=MS1-16-003}. - -@item -mmul -@opindex mmul -Generate multiply instructions. - -@item -mno-mul -@opindex mno-mul -Do not generate multiply instructions. +When this option is not used, the default is @option{-march=ms1-16-002}. @item -mbacc @opindex mbacc @@ -11507,9 +11521,9 @@ same as @option{-msdata=sysv}. @item -msdata-data @opindex msdata-data -On System V.4 and embedded PowerPC systems, put small global and static -data in the @samp{.sdata} section. Put small uninitialized global and -static data in the @samp{.sbss} section. Do not use register @code{r13} +On System V.4 and embedded PowerPC systems, put small global +data in the @samp{.sdata} section. Put small uninitialized global +data in the @samp{.sbss} section. Do not use register @code{r13} to address small data however. This is the default behavior unless other @option{-msdata} options are used. diff --git a/gcc/doc/libgcc.texi b/gcc/doc/libgcc.texi index 8d71f957d7d..c97bd8b7497 100644 --- a/gcc/doc/libgcc.texi +++ b/gcc/doc/libgcc.texi @@ -1,4 +1,4 @@ -@c Copyright (C) 2003, 2004 Free Software Foundation, Inc. +@c Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. @c This is part of the GCC manual. @c For copying conditions, see the file gcc.texi. @c Contributed by Aldy Hernandez @@ -356,6 +356,27 @@ These functions convert @var{i}, a signed long, to floating point. These functions convert @var{i}, a signed long long, to floating point. @end deftypefn +@deftypefn {Runtime Function} float __floatunsisf (unsigned int @var{i}) +@deftypefnx {Runtime Function} double __floatunsidf (unsigned int @var{i}) +@deftypefnx {Runtime Function} {long double} __floatunsitf (unsigned int @var{i}) +@deftypefnx {Runtime Function} {long double} __floatunsixf (unsigned int @var{i}) +These functions convert @var{i}, an unsigned integer, to floating point. +@end deftypefn + +@deftypefn {Runtime Function} float __floatundisf (unsigned long @var{i}) +@deftypefnx {Runtime Function} double __floatundidf (unsigned long @var{i}) +@deftypefnx {Runtime Function} {long double} __floatunditf (unsigned long @var{i}) +@deftypefnx {Runtime Function} {long double} __floatundixf (unsigned long @var{i}) +These functions convert @var{i}, an unsigned long, to floating point. +@end deftypefn + +@deftypefn {Runtime Function} float __floatuntisf (unsigned long long @var{i}) +@deftypefnx {Runtime Function} double __floatuntidf (unsigned long long @var{i}) +@deftypefnx {Runtime Function} {long double} __floatuntitf (unsigned long long @var{i}) +@deftypefnx {Runtime Function} {long double} __floatuntixf (unsigned long long @var{i}) +These functions convert @var{i}, an unsigned long long, to floating point. +@end deftypefn + @subsection Comparison functions There are two sets of basic comparison functions. @@ -438,6 +459,32 @@ These functions return a value greater than zero if neither argument is NaN, and @var{a} is strictly greater than @var{b}. @end deftypefn +@subsection Other floating-point functions + +@deftypefn {Runtime Function} float __powisf2 (float @var{a}, int @var{b}) +@deftypefnx {Runtime Function} double __powidf2 (double @var{a}, int @var{b}) +@deftypefnx {Runtime Function} {long double} __powitf2 (long double @var{a}, int @var{b}) +@deftypefnx {Runtime Function} {long double} __powixf2 (long double @var{a}, int @var{b}) +These functions convert raise @var{a} to the power @var{b}. +@end deftypefn + +@deftypefn {Runtime Function} {complex float} __mulsc3 (float @var{a}, float @var{b}, float @var{c}, float @var{d}) +@deftypefnx {Runtime Function} {complex double} __muldc3 (double @var{a}, double @var{b}, double @var{c}, double @var{d}) +@deftypefnx {Runtime Function} {complex long double} __multc3 (long double @var{a}, long double @var{b}, long double @var{c}, long double @var{d}) +@deftypefnx {Runtime Function} {complex long double} __mulxc3 (long double @var{a}, long double @var{b}, long double @var{c}, long double @var{d}) +These functions return the product of @math{@var{a} + i@var{b}} and +@math{@var{c} + i@var{d}}, following the rules of C99 Annex G@. +@end deftypefn + +@deftypefn {Runtime Function} {complex float} __divsc3 (float @var{a}, float @var{b}, float @var{c}, float @var{d}) +@deftypefnx {Runtime Function} {complex double} __divdc3 (double @var{a}, double @var{b}, double @var{c}, double @var{d}) +@deftypefnx {Runtime Function} {complex long double} __divtc3 (long double @var{a}, long double @var{b}, long double @var{c}, long double @var{d}) +@deftypefnx {Runtime Function} {complex long double} __divxc3 (long double @var{a}, long double @var{b}, long double @var{c}, long double @var{d}) +These functions return the quotient of @math{@var{a} + i@var{b}} and +@math{@var{c} + i@var{d}} (i.e., @math{(@var{a} + i@var{b}) / (@var{c} ++ i@var{d})}), following the rules of C99 Annex G@. +@end deftypefn + @node Exception handling routines @section Language-independent routines for exception handling diff --git a/gcc/doc/md.texi b/gcc/doc/md.texi index 115de4a2aba..90efcc34a15 100644 --- a/gcc/doc/md.texi +++ b/gcc/doc/md.texi @@ -1858,7 +1858,7 @@ Constant suitable as a 32-bit mask operand System V Release 4 small data area reference @end table -@item MorphoRISC family---@file{ms1.h} +@item MorphoTech family---@file{mt.h} @table @code @item I Constant for an arithmetic insn (16-bit signed integer). @@ -2323,8 +2323,8 @@ Used to match function return values. @item In5 -16 @dots{} -1 or 1 @dots{} 16 -@item In4 --8 @dots{} -1 or 1 @dots{} 8 +@item In6 +-32 @dots{} -1 or 1 @dots{} 32 @item IM2 -65536 @dots{} -1 @@ -2920,10 +2920,7 @@ If a scratch register is required to move an object to or from memory, it can be allocated using @code{gen_reg_rtx} prior to life analysis. If there are cases which need scratch registers during or after reload, -you must define @code{SECONDARY_INPUT_RELOAD_CLASS} and/or -@code{SECONDARY_OUTPUT_RELOAD_CLASS} to detect them, and provide -patterns @samp{reload_in@var{m}} or @samp{reload_out@var{m}} to handle -them. @xref{Register Classes}. +you must provide an appropriate secondary_reload target hook. @findex no_new_pseudos The global variable @code{no_new_pseudos} can be used to determine if it @@ -2953,6 +2950,9 @@ reload into a floating point register. @cindex @code{reload_out} instruction pattern @item @samp{reload_in@var{m}} @itemx @samp{reload_out@var{m}} +These named patterns have been obsoleted by the target hook +@code{secondary_reload}. + Like @samp{mov@var{m}}, but used when a scratch register is required to move between operand 0 and operand 1. Operand 2 describes the scratch register. See the discussion of the @code{SECONDARY_RELOAD_CLASS} @@ -4200,7 +4200,7 @@ These patterns emit code for an atomic operation on memory. Operand 0 is the memory on which the atomic operation is performed. Operand 1 is the second operand to the binary operator. -The ``nand'' operation is @code{op0 & ~op1}. +The ``nand'' operation is @code{~op0 & op1}. This pattern must issue any memory barrier instructions such that all memory operations before the atomic operation occur before the atomic @@ -4785,6 +4785,9 @@ will be written using @code{zero_extract} rather than the equivalent @end itemize +Further canonicalization rules are defined in the function +@code{commutative_operand_precedence} in @file{gcc/rtlanal.c}. + @end ifset @ifset INTERNALS @node Expander Definitions diff --git a/gcc/doc/objc.texi b/gcc/doc/objc.texi index a8a128dfdce..c15c1acf848 100644 --- a/gcc/doc/objc.texi +++ b/gcc/doc/objc.texi @@ -179,6 +179,8 @@ The types are encoded in the following way: @c @sp 1 @multitable @columnfractions .25 .75 +@item @code{_Bool} +@tab @code{B} @item @code{char} @tab @code{c} @item @code{unsigned char} @@ -215,6 +217,8 @@ The types are encoded in the following way: @tab @code{*} @item unknown type @tab @code{?} +@item Complex types +@tab @code{j} followed by the inner type. For example @code{_Complex double} is encoded as "jd". @item bit-fields @tab @code{b} followed by the starting position of the bit-field, the type of the bit-field and the size of the bit-field (the bit-fields encoding was changed from the NeXT's compiler encoding, see below) @end multitable diff --git a/gcc/doc/rtl.texi b/gcc/doc/rtl.texi index ea4ded7aa83..acd99c99dc9 100644 --- a/gcc/doc/rtl.texi +++ b/gcc/doc/rtl.texi @@ -1081,6 +1081,22 @@ number. This mode only has 80 meaningful bits (ten bytes). Some processors require such numbers to be padded to twelve bytes, others to sixteen; this mode is used for either. +@findex SDmode +@item SDmode +``Single Decimal Floating'' mode represents a four byte decimal +floating point number (as distinct from conventional binary floating +point). + +@findex DDmode +@item DDmode +``Double Decimal Floating'' mode represents an eight byte decimal +floating point number. + +@findex TDmode +@item TDmode +``Tetra Decimal Floating'' mode represents a sixteen byte decimal +floating point number all 128 of whose bits are meaningful. + @findex TFmode @item TFmode ``Tetra Floating'' mode represents a sixteen byte floating point number @@ -1173,6 +1189,11 @@ Floating point modes. By default these are @code{QFmode}, @code{HFmode}, @code{TQFmode}, @code{SFmode}, @code{DFmode}, @code{XFmode} and @code{TFmode}. +@findex MODE_DECIMAL_FLOAT +@item MODE_DECIMAL_FLOAT +Decimal floating point modes. By default these are @code{SDmode}, +@code{DDmode} and @code{TDmode}. + @findex MODE_COMPLEX_INT @item MODE_COMPLEX_INT Complex integer modes. (These are not currently implemented). @@ -2970,14 +2991,7 @@ TARGET_PASS_BY_REFERENCE}) are stored. If the argument is caller-copied (@pxref{Register Arguments, TARGET_CALLEE_COPIES}), the stack slot will be mentioned in @code{CLOBBER} and @code{USE} entries; if it's callee-copied, only a @code{USE} will appear, and the -@code{MEM} may point to addresses that are not stack slots. These -@code{MEM}s are used only in libcalls, because, unlike regular function -calls, @code{CONST_CALL}s (which libcalls generally are, @pxref{Flags, -CONST_CALL_P}) aren't assumed to read and write all memory, so flow -would consider the stores dead and remove them. Note that, since a -libcall must never return values in memory (@pxref{Aggregate Return, -RETURN_IN_MEMORY}), there will never be a @code{CLOBBER} for a memory -address holding a return value. +@code{MEM} may point to addresses that are not stack slots. @code{CLOBBER}ed registers in this list augment registers specified in @code{CALL_USED_REGISTERS} (@pxref{Register Basics}). diff --git a/gcc/doc/sourcebuild.texi b/gcc/doc/sourcebuild.texi index b88a6a76f9c..2f463e4883c 100644 --- a/gcc/doc/sourcebuild.texi +++ b/gcc/doc/sourcebuild.texi @@ -575,7 +575,6 @@ standard rule in @file{gcc/Makefile.in} to the variable @code{lang_checks}. @table @code -@item all.build @itemx all.cross @itemx start.encap @itemx rest.encap @@ -601,8 +600,6 @@ Build generated man pages for the front end from Texinfo manuals is only called if the necessary tools are available, but should ignore errors so as not to stop the build if errors occur; man pages are optional and the tools involved may be installed in a broken way. -@item install-normal -FIXME: what is this target for? @item install-common Install everything that is part of the front end, apart from the compiler executables listed in @code{compilers} in diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi index 488a07f341e..73f9c661aef 100644 --- a/gcc/doc/tm.texi +++ b/gcc/doc/tm.texi @@ -1433,6 +1433,10 @@ precedence for that field, but the alignment of the rest of the structure may affect its placement. @end deftypefn +@deftypefn {Target Hook} {bool} TARGET_DECIMAL_FLOAT_SUPPORTED_P (void) +Returns true if the target supports decimal floating point. +@end deftypefn + @deftypefn {Target Hook} {const char *} TARGET_MANGLE_FUNDAMENTAL_TYPE (tree @var{type}) If your target defines any fundamental types, define this hook to return the appropriate encoding for these types as part of a C++ @@ -1538,7 +1542,7 @@ default is @code{LONG_DOUBLE_TYPE_SIZE}. @end defmac @defmac LIBGCC2_HAS_DF_MODE -Define this macro if neither @code{LIBGCC2_DOUBLE_TYPE_SIZE} nor +Define this macro if neither @code{LIBGCC2_DOUBLE_TYPE_SIZE} nor @code{LIBGCC2_LONG_DOUBLE_TYPE_SIZE} is @code{DFmode} but you want @code{DFmode} routines in @file{libgcc2.a} anyway. If you don't define this and either @code{LIBGCC2_DOUBLE_TYPE_SIZE} @@ -1547,19 +1551,33 @@ otherwise it is 0. @end defmac @defmac LIBGCC2_HAS_XF_MODE -Define this macro if @code{LIBGCC2_LONG_DOUBLE_TYPE_SIZE} is not +Define this macro if @code{LIBGCC2_LONG_DOUBLE_TYPE_SIZE} is not @code{XFmode} but you want @code{XFmode} routines in @file{libgcc2.a} anyway. If you don't define this and @code{LIBGCC2_LONG_DOUBLE_TYPE_SIZE} is 80 then the default is 1, otherwise it is 0. @end defmac @defmac LIBGCC2_HAS_TF_MODE -Define this macro if @code{LIBGCC2_LONG_DOUBLE_TYPE_SIZE} is not +Define this macro if @code{LIBGCC2_LONG_DOUBLE_TYPE_SIZE} is not @code{TFmode} but you want @code{TFmode} routines in @file{libgcc2.a} anyway. If you don't define this and @code{LIBGCC2_LONG_DOUBLE_TYPE_SIZE} is 128 then the default is 1, otherwise it is 0. @end defmac +@defmac SF_SIZE +@defmacx DF_SIZE +@defmacx XF_SIZE +@defmacx TF_SIZE +Define these macros to be the size in bits of the mantissa of +@code{SFmode}, @code{DFmode}, @code{XFmode} and @code{TFmode} values, +if the defaults in @file{libgcc2.h} are inappropriate. By default, +@code{FLT_MANT_DIG} is used for @code{SF_SIZE}, @code{LDBL_MANT_DIG} +for @code{XF_SIZE} and @code{TF_SIZE}, and @code{DBL_MANT_DIG} or +@code{LDBL_MANT_DIG} for @code{DF_SIZE} according to whether +@code{LIBGCC2_DOUBLE_TYPE_SIZE} or +@code{LIBGCC2_LONG_DOUBLE_TYPE_SIZE} is 64. +@end defmac + @defmac TARGET_FLT_EVAL_METHOD A C expression for the value for @code{FLT_EVAL_METHOD} in @file{float.h}, assuming, if applicable, that the floating-point control word is in its @@ -2409,32 +2427,114 @@ Don't define this macro unless the target machine has limitations which require the macro to do something nontrivial. @end defmac -@defmac SECONDARY_RELOAD_CLASS (@var{class}, @var{mode}, @var{x}) -@defmacx SECONDARY_INPUT_RELOAD_CLASS (@var{class}, @var{mode}, @var{x}) -@defmacx SECONDARY_OUTPUT_RELOAD_CLASS (@var{class}, @var{mode}, @var{x}) +@deftypefn {Target Hook} enum reg_class TARGET_SECONDARY_RELOAD (bool @var{in_p}, rtx @var{x}, enum reg_class @var{reload_class}, enum machine_mode @var{reload_mode}, secondary_reload_info *@var{sri}) 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 @samp{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. +from general registers, but not memory. Below, we shall be using the +term 'intermediate register' when a move operation cannot be performed +directly, but has to be done by copying the source into the intermediate +register first, and then copying the intermediate register to the +destination. An intermediate register always has the same mode as +source and destination. Since it holds the actual value being copied, +reload might apply optimizations to re-use an intermediate register +and eliding the copy from the source when it can determine that the +intermediate register still holds the required value. + +Another kind of secondary reload is required on some machines which +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)@. Scratch registers need not have the same mode +as the value being copied, and usually hold a different value that +that being copied. Special patterns in the md file are needed to +describe how the copy is performed with the help of the scratch register; +these patterns also describe the number, register class(es) and mode(s) +of the scratch register(s). + +In some cases, both an intermediate and a scratch register are required. + +For input reloads, this target hook is called with nonzero @var{in_p}, +and @var{x} is an rtx that needs to be copied to a register in of class +@var{reload_class} in @var{reload_mode}. For output reloads, this target +hook is called with zero @var{in_p}, and a register of class @var{reload_mode} +needs to be copied to rtx @var{x} in @var{reload_mode}. + +If copying a register of @var{reload_class} from/to @var{x} requires +an intermediate register, the hook @code{secondary_reload} should +return the register class required for this intermediate register. +If no intermediate register is required, it should return NO_REGS. +If more than one intermediate register is required, describe the one +that is closest in the copy chain to the reload register. + +If scratch registers are needed, you also have to describe how to +perform the copy from/to the reload register to/from this +closest intermediate register. Or if no intermediate register is +required, but still a scratch register is needed, describe the +copy from/to the reload register to/from the reload operand @var{x}. + +You do this by setting @code{sri->icode} to the instruction code of a pattern +in the md file which performs the move. Operands 0 and 1 are the output +and input of this copy, respectively. Operands from operand 2 onward are +for scratch operands. These scratch operands must have a mode, and a +single-register-class +@c [later: or memory] +output constraint. + +When an intermediate register is used, the @code{secondary_reload} +hook will be called again to determine how to copy the intermediate +register to/from the reload operand @var{x}, so your hook must also +have code to handle the register class of the intermediate operand. + +@c [For later: maybe we'll allow multi-alternative reload patterns - +@c the port maintainer could name a mov pattern that has clobbers - +@c and match the constraints of input and output to determine the required +@c alternative. A restriction would be that constraints used to match +@c against reloads registers would have to be written as register class +@c constraints, or we need a new target macro / hook that tells us if an +@c arbitrary constraint can match an unknown register of a given class. +@c Such a macro / hook would also be useful in other places.] + + +@var{x} might be a pseudo-register or a @code{subreg} of a +pseudo-register, which could either be in a hard register or in memory. +Use @code{true_regnum} to find out; it will return @minus{}1 if the pseudo is +in memory and the hard register number if it is in a register. -You should define these macros to indicate to the reload phase that it may +Scratch operands in memory (constraint @code{"=m"} / @code{"=&m"}) are +currently not supported. For the time being, you will have to continue +to use @code{SECONDARY_MEMORY_NEEDED} for that purpose. + +@code{copy_cost} also uses this target hook to find out how values are +copied. If you want it to include some extra cost for the need to allocate +(a) scratch register(s), set @code{sri->extra_cost} to the additional cost. +Or if two dependent moves are supposed to have a lower cost than the sum +of the individual moves due to expected fortuitous scheduling and/or special +forwarding logic, you can set @code{sri->extra_cost} to a negative amount. +@end deftypefn + +@defmac SECONDARY_RELOAD_CLASS (@var{class}, @var{mode}, @var{x}) +@defmacx SECONDARY_INPUT_RELOAD_CLASS (@var{class}, @var{mode}, @var{x}) +@defmacx SECONDARY_OUTPUT_RELOAD_CLASS (@var{class}, @var{mode}, @var{x}) +These macros are obsolete, new ports should use the target hook +@code{TARGET_SECONDARY_RELOAD} instead. + +These are obsolete macros, replaced by the @code{TARGET_SECONDARY_RELOAD} +target hook. Older ports still 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 @var{x} to a register @var{class} in @var{mode} requires an intermediate register, -you should define @code{SECONDARY_INPUT_RELOAD_CLASS} to return the +you were supposed to define @code{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 @var{class} in @var{mode} to @var{x} requires an intermediate or scratch register, @code{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 -@code{SECONDARY_RELOAD_CLASS} should be used instead of defining both +was supposed to be defined be defined to return the largest register +class required. If the +requirements for input and output reloads were the same, the macro +@code{SECONDARY_RELOAD_CLASS} should have been used instead of defining both macros identically. The values returned by these macros are often @code{GENERAL_REGS}. @@ -2444,14 +2544,15 @@ can be directly copied to or from a register of @var{class} in macro if it would always return @code{NO_REGS}. If a scratch register is required (either with or without an -intermediate register), you should define patterns for +intermediate register), you were supposed to define patterns for @samp{reload_in@var{m}} or @samp{reload_out@var{m}}, as required -(@pxref{Standard Names}. These patterns, which will normally be +(@pxref{Standard Names}. These patterns, which were normally implemented with a @code{define_expand}, should be similar to the @samp{mov@var{m}} patterns, except that operand 2 is the scratch register. -Define constraints for the reload register and scratch register that +These patterns need constraints for the reload register and scratch +register that contain a single register class. If the original reload register (whose class is @var{class}) can meet the constraint given in the pattern, the value returned by these macros is used for the class of the scratch @@ -2812,10 +2913,10 @@ machines. See @file{function.c} for details. @defmac INITIAL_FRAME_ADDRESS_RTX A C expression whose value is RTL representing the address of the initial -stack frame. This address is passed to @code{RETURN_ADDR_RTX} and +stack frame. This address is passed to @code{RETURN_ADDR_RTX} and @code{DYNAMIC_CHAIN_ADDRESS}. If you don't define this macro, a reasonable default value will be used. Define this macro in order to make frame pointer -elimination work in the presence of @code{__builtin_frame_address (count)} and +elimination work in the presence of @code{__builtin_frame_address (count)} and @code{__builtin_return_address (count)} for @code{count} not equal to zero. @end defmac @@ -2945,9 +3046,9 @@ The final value should conincide with that calculated by @code{INCOMING_FRAME_SP_OFFSET}. Normally the CFA is calculated as an offset from the argument pointer, -via @code{ARG_POINTER_CFA_OFFSET}, but if the argument pointer is +via @code{ARG_POINTER_CFA_OFFSET}, but if the argument pointer is variable due to the ABI, this may not be possible. If this macro is -defined, it imples that the virtual register instantiation should be +defined, it implies that the virtual register instantiation should be based on the frame pointer instead of the argument pointer. Only one of @code{FRAME_POINTER_CFA_OFFSET} and @code{ARG_POINTER_CFA_OFFSET} should be defined. @@ -4398,7 +4499,7 @@ may vary greatly between different architectures. @deftypefn {Target Hook} tree TARGET_STACK_PROTECT_GUARD (void) This hook returns a @code{DECL} node for the external variable to use -for the stack protection guard. This variable is initialized by the +for the stack protection guard. This variable is initialized by the runtime to some random value and is used to initialize the guard value that is placed at the top of the local stack frame. The type of this variable must be @code{ptr_type_node}. @@ -4413,7 +4514,7 @@ stack protect guard variable has been modified. This expression should involve a call to a @code{noreturn} function. The default version of this hook invokes a function called -@samp{__stack_chk_fail}, taking no arguments. This function is +@samp{__stack_chk_fail}, taking no arguments. This function is normally defined in @file{libgcc2.c}. @end deftypefn @@ -4617,10 +4718,8 @@ to generate it on the spot. @end defmac @defmac TRAMPOLINE_SECTION -The name of a subroutine to switch to the section in which the -trampoline template is to be placed (@pxref{Sections}). The default is -a value of @samp{readonly_data_section}, which places the trampoline in -the section containing read-only data. +Return the section into which the trampoline template is to be placed +(@pxref{Sections}). The default value is @code{readonly_data_section}. @end defmac @defmac TRAMPOLINE_SIZE @@ -5114,7 +5213,7 @@ of TLS symbols for various targets. @deftypefn {Target Hook} tree TARGET_VECTORIZE_BUILTIN_MASK_FOR_LOAD (void) This hook should return the DECL of a function @var{f} that given an address @var{addr} as an argument returns a mask @var{m} that can be -used to extract from two vectors the relevant data that resides in +used to extract from two vectors the relevant data that resides in @var{addr} in case @var{addr} is not properly aligned. The autovectrizer, when vectorizing a load operation from an address @@ -5125,15 +5224,15 @@ two loaded vectors. The first two arguments to @code{REALIGN_LOAD}, @var{v1} and @var{v2}, are the two vectors, each of size @var{VS}, and the third argument, @var{OFF}, defines how the data will be extracted from these two vectors: if @var{OFF} is 0, then the returned vector is -@var{v2}; otherwise, the returned vector is composed from the last -@var{VS}-@var{OFF} elements of @var{v1} concatenated to the first +@var{v2}; otherwise, the returned vector is composed from the last +@var{VS}-@var{OFF} elements of @var{v1} concatenated to the first @var{OFF} elements of @var{v2}. If this hook is defined, the autovectorizer will generate a call to @var{f} (using the DECL tree that this hook returns) and will use the return value of @var{f} as the argument @var{OFF} to @code{REALIGN_LOAD}. Therefore, the mask @var{m} returned by @var{f} -should comply with the semantics expected by @code{REALIGN_LOAD} +should comply with the semantics expected by @code{REALIGN_LOAD} described above. If this hook is not defined, then @var{addr} will be used as the argument @var{OFF} to @code{REALIGN_LOAD}, in which case the low @@ -5843,9 +5942,32 @@ section}, which holds initialized writable data; and the @dfn{bss section}, which holds uninitialized data. Some systems have other kinds of sections. -The compiler must tell the assembler when to switch sections. These -macros control what commands to output to tell the assembler this. You -can also define additional sections. +@file{varasm.c} provides several well-known sections, such as +@code{text_section}, @code{data_section} and @code{bss_section}. +The normal way of controlling a @code{@var{foo}_section} variable +is to define the associated @code{@var{FOO}_SECTION_ASM_OP} macro, +as described below. The macros are only read once, when @file{varasm.c} +initializes itself, so their values must be run-time constants. +They may however depend on command-line flags. + +@emph{Note:} Some run-time files, such @file{crtstuff.c}, also make +use of the @code{@var{FOO}_SECTION_ASM_OP} macros, and expect them +to be string literals. + +Some assemblers require a different string to be written every time a +section is selected. If your assembler falls into this category, you +should define the @code{TARGET_ASM_INIT_SECTIONS} hook and use +@code{get_unnamed_section} to set up the sections. + +You must always create a @code{text_section}, either by defining +@code{TEXT_SECTION_ASM_OP} or by initializing @code{text_section} +in @code{TARGET_ASM_INIT_SECTIONS}. The same is true of +@code{data_section} and @code{DATA_SECTION_ASM_OP}. If you do not +create a distinct @code{readonly_data_section}, the default is to +reuse @code{text_section}. + +All the other @file{varasm.c} sections are optional, and are null +if the target does not provide them. @defmac TEXT_SECTION_ASM_OP A C expression whose value is a string, including spacing, containing the @@ -5870,22 +5992,18 @@ assembler operation to identify the following data as writable initialized data. Normally @code{"\t.data"} is right. @end defmac +@defmac SDATA_SECTION_ASM_OP +If defined, a C expression whose value is a string, including spacing, +containing the assembler operation to identify the following data as +initialized, writable small data. +@end defmac + @defmac READONLY_DATA_SECTION_ASM_OP A C expression whose value is a string, including spacing, containing the assembler operation to identify the following data as read-only initialized data. @end defmac -@defmac READONLY_DATA_SECTION -A macro naming a function to call to switch to the proper section for -read-only data. The default is to use @code{READONLY_DATA_SECTION_ASM_OP} -if defined, else fall back to @code{text_section}. - -The most common definition will be @code{data_section}, if the target -does not have a special read-only data section, and does not put data -in the text section. -@end defmac - @defmac BSS_SECTION_ASM_OP If defined, a C expression whose value is a string, including spacing, containing the assembler operation to identify the following data as @@ -5896,18 +6014,26 @@ uninitialized global data will be output in the data section if used. @end defmac +@defmac SBSS_SECTION_ASM_OP +If defined, a C expression whose value is a string, including spacing, +containing the assembler operation to identify the following data as +uninitialized, writable small data. +@end defmac + @defmac INIT_SECTION_ASM_OP If defined, a C expression whose value is a string, including spacing, containing the assembler operation to identify the following data as initialization code. If not defined, GCC will assume such a section does -not exist. +not exist. This section has no corresponding @code{init_section} +variable; it is used entirely in runtime code. @end defmac @defmac FINI_SECTION_ASM_OP If defined, a C expression whose value is a string, including spacing, containing the assembler operation to identify the following data as finalization code. If not defined, GCC will assume such a section does -not exist. +not exist. This section has no corresponding @code{fini_section} +variable; it is used entirely in runtime code. @end defmac @defmac INIT_ARRAY_SECTION_ASM_OP @@ -5917,7 +6043,7 @@ part of the @code{.init_array} (or equivalent) section. If not defined, GCC will assume such a section does not exist. Do not define both this macro and @code{INIT_SECTION_ASM_OP}. @end defmac - + @defmac FINI_ARRAY_SECTION_ASM_OP If defined, a C expression whose value is a string, including spacing, containing the assembler operation to identify the following data as @@ -5945,23 +6071,6 @@ arbitrary boundary. This is used to force all fragments of the and thus prevent the linker from having to add any padding. @end defmac -@findex in_text -@findex in_data -@defmac EXTRA_SECTIONS -A list of names for sections other than the standard two, which are -@code{in_text} and @code{in_data}. You need not define this macro -on a system with no other sections (that GCC needs to use). -@end defmac - -@findex text_section -@findex data_section -@defmac EXTRA_SECTION_FUNCTIONS -One or more functions to be defined in @file{varasm.c}. These -functions should do jobs analogous to those of @code{text_section} and -@code{data_section}, for your additional sections. Do not define this -macro if you do not define @code{EXTRA_SECTIONS}. -@end defmac - @defmac JUMP_TABLES_IN_TEXT_SECTION Define this macro to be an expression with a nonzero value if jump tables (for @code{tablejump} insns) should be output in the text @@ -5971,15 +6080,23 @@ readonly data section is used. This macro is irrelevant if there is no separate readonly data section. @end defmac -@deftypefn {Target Hook} void TARGET_ASM_SELECT_SECTION (tree @var{exp}, int @var{reloc}, unsigned HOST_WIDE_INT @var{align}) -Switches to the appropriate section for output of @var{exp}. You can +@deftypefn {Target Hook} void TARGET_ASM_INIT_SECTIONS (void) +Define this hook if you need to do something special to set up the +@file{varasm.c} sections, or if your target has some special sections +of its own that you need to create. + +GCC calls this hook after processing the command line, but before writing +any assembly code, and before calling any of the section-returning hooks +described below. +@end deftypefn + +@deftypefn {Target Hook} {section *} TARGET_ASM_SELECT_SECTION (tree @var{exp}, int @var{reloc}, unsigned HOST_WIDE_INT @var{align}) +Return the section into which @var{exp} should be placed. You can assume that @var{exp} is either a @code{VAR_DECL} node or a constant of some sort. @var{reloc} indicates whether the initial value of @var{exp} requires link-time relocations. Bit 0 is set when variable contains local relocations only, while bit 1 is set for global relocations. -Select the section by calling @code{data_section} or one of the -alternatives for other sections. @var{align} is the constant alignment -in bits. +@var{align} is the constant alignment in bits. The default version of this function takes care of putting read-only variables in @code{readonly_data_section}. @@ -6008,22 +6125,21 @@ example, the function @code{foo} would be placed in @code{.text.foo}. Whatever the actual target object format, this is often good enough. @end deftypefn -@deftypefn {Target Hook} void TARGET_ASM_FUNCTION_RODATA_SECTION (tree @var{decl}) -Switches to a readonly data section associated with +@deftypefn {Target Hook} {section *} TARGET_ASM_FUNCTION_RODATA_SECTION (tree @var{decl}) +Return the readonly data section associated with @samp{DECL_SECTION_NAME (@var{decl})}. -The default version of this function switches to @code{.gnu.linkonce.r.name} -section if function's section is @code{.gnu.linkonce.t.name}, to -@code{.rodata.name} if function is in @code{.text.name} section -and otherwise switches to the normal readonly data section. +The default version of this function selects @code{.gnu.linkonce.r.name} if +the function's section is @code{.gnu.linkonce.t.name}, @code{.rodata.name} +if function is in @code{.text.name}, and the normal readonly-data section +otherwise. @end deftypefn -@deftypefn {Target Hook} void TARGET_ASM_SELECT_RTX_SECTION (enum machine_mode @var{mode}, rtx @var{x}, unsigned HOST_WIDE_INT @var{align}) -Switches to the appropriate section for output of constant pool entry -@var{x} in @var{mode}. You can assume that @var{x} is some kind of +@deftypefn {Target Hook} {section *} TARGET_ASM_SELECT_RTX_SECTION (enum machine_mode @var{mode}, rtx @var{x}, unsigned HOST_WIDE_INT @var{align}) +Return the section into which a constant @var{x}, of mode @var{mode}, +should be placed. You can assume that @var{x} is some kind of constant in RTL@. The argument @var{mode} is redundant except in the -case of a @code{const_int} rtx. Select the section by calling -@code{readonly_data_section} or one of the alternatives for other -sections. @var{align} is the constant alignment in bits. +case of a @code{const_int} rtx. @var{align} is the constant alignment +in bits. The default version of this function takes care of putting symbolic constants in @code{flag_pic} mode in @code{data_section} and everything @@ -6437,15 +6553,19 @@ of @code{ASM_OUTPUT_DOUBLE} and the like: @defmac REAL_VALUE_TO_TARGET_SINGLE (@var{x}, @var{l}) @defmacx REAL_VALUE_TO_TARGET_DOUBLE (@var{x}, @var{l}) @defmacx REAL_VALUE_TO_TARGET_LONG_DOUBLE (@var{x}, @var{l}) -These translate @var{x}, of type @code{REAL_VALUE_TYPE}, to the target's -floating point representation, and store its bit pattern in the variable -@var{l}. For @code{REAL_VALUE_TO_TARGET_SINGLE}, this variable should -be a simple @code{long int}. For the others, it should be an array of -@code{long int}. The number of elements in this array is determined by -the size of the desired target floating point data type: 32 bits of it -go in each @code{long int} array element. Each array element holds 32 -bits of the result, even if @code{long int} is wider than 32 bits on the -host machine. +@defmacx REAL_VALUE_TO_TARGET_DECIMAL32 (@var{x}, @var{l}) +@defmacx REAL_VALUE_TO_TARGET_DECIMAL64 (@var{x}, @var{l}) +@defmacx REAL_VALUE_TO_TARGET_DECIMAL128 (@var{x}, @var{l}) +These translate @var{x}, of type @code{REAL_VALUE_TYPE}, to the +target's floating point representation, and store its bit pattern in +the variable @var{l}. For @code{REAL_VALUE_TO_TARGET_SINGLE} and +@code{REAL_VALUE_TO_TARGET_DECIMAL32}, this variable should be a +simple @code{long int}. For the others, it should be an array of +@code{long int}. The number of elements in this array is determined +by the size of the desired target floating point data type: 32 bits of +it go in each @code{long int} array element. Each array element holds +32 bits of the result, even if @code{long int} is wider than 32 bits +on the host machine. The array element values are designed so that you can print them out using @code{fprintf} in the order they should appear in the target @@ -7583,7 +7703,15 @@ true if this is a placeholder label for an omitted FDE@. The default is that FDEs are not given nonlocal labels. @end deftypefn -@deftypefn {Taget Hook} void TARGET_UNWIND_EMIT (FILE * @var{stream}, rtx @var{insn}) +@deftypefn {Target Hook} void TARGET_ASM_EMIT_EXCEPT_TABLE_LABEL (@var{stream}) +This target hook emits a label at the beginning of the exception table. +It should be defined on targets where it is desirable for the table +to be broken up according to function. + +The default is that no label is emitted. +@end deftypefn + +@deftypefn {Target Hook} void TARGET_UNWIND_EMIT (FILE * @var{stream}, rtx @var{insn}) This target hook emits and assembly directives required to unwind the given instruction. This is only used when TARGET_UNWIND_INFO is set. @end deftypefn @@ -7671,24 +7799,6 @@ minimum alignment otherwise. @xref{SDB and DWARF}. Only applicable if the target supports DWARF 2 frame unwind information. @end defmac -@deftypefn {Target Hook} void TARGET_ASM_EXCEPTION_SECTION () -If defined, a function that switches to the section in which the main -exception table is to be placed (@pxref{Sections}). The default is a -function that switches to a section named @code{.gcc_except_table} on -machines that support named sections via -@code{TARGET_ASM_NAMED_SECTION}, otherwise if @option{-fpic} or -@option{-fPIC} is in effect, the @code{data_section}, otherwise the -@code{readonly_data_section}. -@end deftypefn - -@deftypefn {Target Hook} void TARGET_ASM_EH_FRAME_SECTION () -If defined, a function that switches to the section in which the DWARF 2 -frame unwind information to be placed (@pxref{Sections}). The default -is a function that outputs a standard GAS section directive, if -@code{EH_FRAME_SECTION_NAME} is defined, or else a data section -directive followed by a synthetic label. -@end deftypefn - @deftypevar {Target Hook} bool TARGET_TERMINATE_DW2_EH_FRAME_INFO Contains the value true if the target should add a zero word onto the end of a Dwarf-2 frame info section when used for exception handling. @@ -8799,6 +8909,15 @@ point number to a signed fixed point number also convert validly to an unsigned one. @end defmac +@deftypefn {Target Hook} int TARGET_MIN_DIVISIONS_FOR_RECIP_MUL (enum machine_mode @var{mode}) +When @option{-ffast-math} is in effect, GCC tries to optimize +divisions by the same divisor, by turning them into multiplications by +the reciprocal. This target hook specifies the minimum number of divisions +that should be there for GCC to perform the optimization for a variable +of mode @var{mode}. The default implementation returns 3 if the machine +has an instruction for the division, and 2 if it does not. +@end deftypefn + @defmac MOVE_MAX The maximum number of bytes that a single instruction can move quickly between memory and registers or between two memory locations. @@ -9089,7 +9208,7 @@ pragma of the form @code{NULL} to put the pragma in the global namespace. The callback routine receives @var{pfile} as its first argument, which can be passed on to cpplib's functions if necessary. You can lex tokens after the -@var{name} by calling @code{c_lex}. Tokens that are not read by the +@var{name} by calling @code{pragma_lex}. Tokens that are not read by the callback will be silently ignored. The end of the line is indicated by a token of type @code{CPP_EOF}. Macro expansion occurs on the arguments of pragmas registered with @@ -9099,15 +9218,15 @@ pragmas registered with @code{c_register_pragma}. For an example use of this routine, see @file{c4x.h} and the callback routines defined in @file{c4x-c.c}. -Note that the use of @code{c_lex} is specific to the C and C++ +Note that the use of @code{pragma_lex} is specific to the C and C++ compilers. It will not work in the Java or Fortran compilers, or any -other language compilers for that matter. Thus if @code{c_lex} is going +other language compilers for that matter. Thus if @code{pragma_lex} is going to be called from target-specific code, it must only be done so when building the C and C++ compilers. This can be done by defining the variables @code{c_target_objs} and @code{cxx_target_objs} in the target entry in the @file{config.gcc} file. These variables should name the target-specific, language-specific object file which contains the -code that uses @code{c_lex}. Note it will also be necessary to add a +code that uses @code{pragma_lex}. Note it will also be necessary to add a rule to the makefile fragment pointed to by @code{tmake_file} that shows how to build this object file. @end deftypefun @@ -9394,9 +9513,9 @@ low-overhead loop, otherwise return a string why doloop could not be applied. Many targets use special registers for low-overhead looping. For any instruction that clobbers these this function should return a string indicating -the reason why the doloop could not be applied. +the reason why the doloop could not be applied. By default, the RTL loop optimizer does not use a present doloop pattern for -loops containing function calls or branch on table instructions. +loops containing function calls or branch on table instructions. @end deftypefn @defmac MD_CAN_REDIRECT_BRANCH (@var{branch1}, @var{branch2}) @@ -9575,8 +9694,8 @@ and ia64. The default is @code{false}. @end deftypefn @deftypefn {Target Hook} const char *TARGET_INVALID_ARG_FOR_UNPROTOTYPED_FN (tree @var{typelist}, tree @var{funcdecl}, tree @var{val}) -If defined, this macro returns the diagnostic message when it is -illegal to pass argument @var{val} to function @var{funcdecl} +If defined, this macro returns the diagnostic message when it is +illegal to pass argument @var{val} to function @var{funcdecl} with prototype @var{typelist}. @end deftypefn diff --git a/gcc/dominance.c b/gcc/dominance.c index 8cfaba033a3..d341f487ba3 100644 --- a/gcc/dominance.c +++ b/gcc/dominance.c @@ -51,8 +51,7 @@ enum dom_state dom_computed[2]; 'undefined' or 'end of list'. The name of each node is given by the dfs number of the corresponding basic block. Please note, that we include the artificial ENTRY_BLOCK (or EXIT_BLOCK in the post-dom case) in our lists to - support multiple entry points. As it has no real basic block index we use - 'last_basic_block' for that. Its dfs number is of course 1. */ + support multiple entry points. Its dfs number is of course 1. */ /* Type of Basic Block aka. TBB */ typedef unsigned int TBB; @@ -149,9 +148,7 @@ static unsigned n_bbs_in_dom_tree[2]; static void init_dom_info (struct dom_info *di, enum cdi_direction dir) { - /* We need memory for n_basic_blocks nodes and the ENTRY_BLOCK or - EXIT_BLOCK. */ - unsigned int num = n_basic_blocks + 1 + 1; + unsigned int num = n_basic_blocks; init_ar (di->dfs_parent, TBB, num, 0); init_ar (di->path_min, TBB, num, i); init_ar (di->key, TBB, num, i); @@ -216,7 +213,7 @@ calc_dfs_tree_nonrec (struct dom_info *di, basic_block bb, /* Ending block. */ basic_block ex_block; - stack = xmalloc ((n_basic_blocks + 3) * sizeof (edge_iterator)); + stack = xmalloc ((n_basic_blocks + 1) * sizeof (edge_iterator)); sp = 0; /* Initialize our border blocks, and the first edge. */ @@ -372,8 +369,8 @@ calc_dfs_tree (struct dom_info *di, enum cdi_direction reverse) di->nodes = di->dfsnum - 1; - /* Make sure there is a path from ENTRY to EXIT at all. */ - gcc_assert (di->nodes == (unsigned int) n_basic_blocks + 1); + /* This aborts e.g. when there is _no_ path from ENTRY to EXIT at all. */ + gcc_assert (di->nodes == (unsigned int) n_basic_blocks - 1); } /* Compress the path from V to the root of its set and update path_min at the @@ -627,7 +624,7 @@ calculate_dominance_info (enum cdi_direction dir) { b->dom[dir] = et_new_tree (b); } - n_bbs_in_dom_tree[dir] = n_basic_blocks + 2; + n_bbs_in_dom_tree[dir] = n_basic_blocks; init_dom_info (&di, dir); calc_dfs_tree (&di, dir); @@ -817,6 +814,80 @@ nearest_common_dominator_for_set (enum cdi_direction dir, bitmap blocks) return dom; } +/* Given a dominator tree, we can determine whether one thing + dominates another in constant time by using two DFS numbers: + + 1. The number for when we visit a node on the way down the tree + 2. The number for when we visit a node on the way back up the tree + + You can view these as bounds for the range of dfs numbers the + nodes in the subtree of the dominator tree rooted at that node + will contain. + + The dominator tree is always a simple acyclic tree, so there are + only three possible relations two nodes in the dominator tree have + to each other: + + 1. Node A is above Node B (and thus, Node A dominates node B) + + A + | + C + / \ + B D + + + In the above case, DFS_Number_In of A will be <= DFS_Number_In of + B, and DFS_Number_Out of A will be >= DFS_Number_Out of B. This is + because we must hit A in the dominator tree *before* B on the walk + down, and we will hit A *after* B on the walk back up + + 2. Node A is below node B (and thus, node B dominates node A) + + + B + | + A + / \ + C D + + In the above case, DFS_Number_In of A will be >= DFS_Number_In of + B, and DFS_Number_Out of A will be <= DFS_Number_Out of B. + + This is because we must hit A in the dominator tree *after* B on + the walk down, and we will hit A *before* B on the walk back up + + 3. Node A and B are siblings (and thus, neither dominates the other) + + C + | + D + / \ + A B + + In the above case, DFS_Number_In of A will *always* be <= + DFS_Number_In of B, and DFS_Number_Out of A will *always* be <= + DFS_Number_Out of B. This is because we will always finish the dfs + walk of one of the subtrees before the other, and thus, the dfs + numbers for one subtree can't intersect with the range of dfs + numbers for the other subtree. If you swap A and B's position in + the dominator tree, the comparison changes direction, but the point + is that both comparisons will always go the same way if there is no + dominance relationship. + + Thus, it is sufficient to write + + A_Dominates_B (node A, node B) + { + return DFS_Number_In(A) <= DFS_Number_In(B) + && DFS_Number_Out (A) >= DFS_Number_Out(B); + } + + A_Dominated_by_B (node A, node B) + { + return DFS_Number_In(A) >= DFS_Number_In(A) + && DFS_Number_Out (A) <= DFS_Number_Out(B); + } */ /* Return TRUE in case BB1 is dominated by BB2. */ bool diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 12cb61215dd..51cbdaa05c0 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -113,63 +113,6 @@ dwarf2out_do_frame (void) #define PTR_SIZE (POINTER_SIZE / BITS_PER_UNIT) #endif -/* Various versions of targetm.eh_frame_section. Note these must appear - outside the DWARF2_DEBUGGING_INFO || DWARF2_UNWIND_INFO macro guards. */ - -/* Version of targetm.eh_frame_section for systems with named sections. */ -void -named_section_eh_frame_section (void) -{ -#ifdef EH_FRAME_SECTION_NAME - int flags; - - if (EH_TABLES_CAN_BE_READ_ONLY) - { - int fde_encoding; - int per_encoding; - int lsda_encoding; - - fde_encoding = ASM_PREFERRED_EH_DATA_FORMAT (/*code=*/1, /*global=*/0); - per_encoding = ASM_PREFERRED_EH_DATA_FORMAT (/*code=*/2, /*global=*/1); - lsda_encoding = ASM_PREFERRED_EH_DATA_FORMAT (/*code=*/0, /*global=*/0); - flags = (! flag_pic - || ((fde_encoding & 0x70) != DW_EH_PE_absptr - && (fde_encoding & 0x70) != DW_EH_PE_aligned - && (per_encoding & 0x70) != DW_EH_PE_absptr - && (per_encoding & 0x70) != DW_EH_PE_aligned - && (lsda_encoding & 0x70) != DW_EH_PE_absptr - && (lsda_encoding & 0x70) != DW_EH_PE_aligned)) - ? 0 : SECTION_WRITE; - } - else - flags = SECTION_WRITE; - named_section_flags (EH_FRAME_SECTION_NAME, flags); -#endif -} - -/* Version of targetm.eh_frame_section for systems using collect2. */ -void -collect2_eh_frame_section (void) -{ - tree label = get_file_function_name ('F'); - - data_section (); - ASM_OUTPUT_ALIGN (asm_out_file, floor_log2 (PTR_SIZE)); - targetm.asm_out.globalize_label (asm_out_file, IDENTIFIER_POINTER (label)); - ASM_OUTPUT_LABEL (asm_out_file, IDENTIFIER_POINTER (label)); -} - -/* Default version of targetm.eh_frame_section. */ -void -default_eh_frame_section (void) -{ -#ifdef EH_FRAME_SECTION_NAME - named_section_eh_frame_section (); -#else - collect2_eh_frame_section (); -#endif -} - DEF_VEC_P(rtx); DEF_VEC_ALLOC_P(rtx,gc); @@ -190,6 +133,17 @@ static GTY(()) VEC(tree,gc) *incomplete_types; define type declaration DIE's. */ static GTY(()) VEC(tree,gc) *decl_scope_table; +/* Pointers to various DWARF2 sections. */ +static GTY(()) section *debug_info_section; +static GTY(()) section *debug_abbrev_section; +static GTY(()) section *debug_aranges_section; +static GTY(()) section *debug_macinfo_section; +static GTY(()) section *debug_line_section; +static GTY(()) section *debug_loc_section; +static GTY(()) section *debug_pubnames_section; +static GTY(()) section *debug_str_section; +static GTY(()) section *debug_ranges_section; + /* How to start an assembler comment. */ #ifndef ASM_COMMENT_START #define ASM_COMMENT_START ";#" @@ -1554,11 +1508,10 @@ dwarf2out_frame_debug_expr (rtx expr, const char *label) else { /* Saving a register in a register. */ - gcc_assert (call_used_regs [REGNO (dest)] - && (!fixed_regs [REGNO (dest)] - /* For the SPARC and its register window. */ - || DWARF_FRAME_REGNUM (REGNO (src)) - == DWARF_FRAME_RETURN_COLUMN)); + gcc_assert (!fixed_regs [REGNO (dest)] + /* For the SPARC and its register window. */ + || (DWARF_FRAME_REGNUM (REGNO (src)) + == DWARF_FRAME_RETURN_COLUMN)); queue_reg_save (label, src, dest, 0); } break; @@ -1749,7 +1702,8 @@ dwarf2out_frame_debug_expr (rtx expr, const char *label) { int regno; - gcc_assert (GET_CODE (XEXP (XEXP (dest, 0), 1)) == CONST_INT); + gcc_assert (GET_CODE (XEXP (XEXP (dest, 0), 1)) == CONST_INT + && REG_P (XEXP (XEXP (dest, 0), 0))); offset = INTVAL (XEXP (XEXP (dest, 0), 1)); if (GET_CODE (XEXP (dest, 0)) == MINUS) offset = -offset; @@ -1969,6 +1923,62 @@ dw_cfi_oprnd2_desc (enum dwarf_call_frame_info cfi) #if defined (DWARF2_DEBUGGING_INFO) || defined (DWARF2_UNWIND_INFO) +/* Switch to eh_frame_section. If we don't have an eh_frame_section, + switch to the data section instead, and write out a synthetic label + for collect2. */ + +static void +switch_to_eh_frame_section (void) +{ + tree label; + +#ifdef EH_FRAME_SECTION_NAME + if (eh_frame_section == 0) + { + int flags; + + if (EH_TABLES_CAN_BE_READ_ONLY) + { + int fde_encoding; + int per_encoding; + int lsda_encoding; + + fde_encoding = ASM_PREFERRED_EH_DATA_FORMAT (/*code=*/1, + /*global=*/0); + per_encoding = ASM_PREFERRED_EH_DATA_FORMAT (/*code=*/2, + /*global=*/1); + lsda_encoding = ASM_PREFERRED_EH_DATA_FORMAT (/*code=*/0, + /*global=*/0); + flags = ((! flag_pic + || ((fde_encoding & 0x70) != DW_EH_PE_absptr + && (fde_encoding & 0x70) != DW_EH_PE_aligned + && (per_encoding & 0x70) != DW_EH_PE_absptr + && (per_encoding & 0x70) != DW_EH_PE_aligned + && (lsda_encoding & 0x70) != DW_EH_PE_absptr + && (lsda_encoding & 0x70) != DW_EH_PE_aligned)) + ? 0 : SECTION_WRITE); + } + else + flags = SECTION_WRITE; + eh_frame_section = get_section (EH_FRAME_SECTION_NAME, flags, NULL); + } +#endif + + if (eh_frame_section) + switch_to_section (eh_frame_section); + else + { + /* We have no special eh_frame section. Put the information in + the data section and emit special labels to guide collect2. */ + switch_to_section (data_section); + label = get_file_function_name ('F'); + ASM_OUTPUT_ALIGN (asm_out_file, floor_log2 (PTR_SIZE)); + targetm.asm_out.globalize_label (asm_out_file, + IDENTIFIER_POINTER (label)); + ASM_OUTPUT_LABEL (asm_out_file, IDENTIFIER_POINTER (label)); + } +} + /* Map register numbers held in the call frame info that gcc has collected using DWARF_FRAME_REGNUM to those that should be output in .debug_frame and .eh_frame. */ @@ -2163,9 +2173,9 @@ output_call_frame_info (int for_eh) app_enable (); if (for_eh) - targetm.asm_out.eh_frame_section (); + switch_to_eh_frame_section (); else - named_section_flags (DEBUG_FRAME_SECTION, SECTION_DEBUG); + switch_to_section (get_section (DEBUG_FRAME_SECTION, SECTION_DEBUG, NULL)); ASM_GENERATE_INTERNAL_LABEL (section_start_label, FRAME_BEGIN_LABEL, for_eh); ASM_OUTPUT_LABEL (asm_out_file, section_start_label); @@ -2467,7 +2477,7 @@ dwarf2out_begin_prologue (unsigned int line ATTRIBUTE_UNUSED, return; #endif - function_section (current_function_decl); + switch_to_section (function_section (current_function_decl)); ASM_GENERATE_INTERNAL_LABEL (label, FUNC_BEGIN_LABEL, current_function_funcdef_no); ASM_OUTPUT_DEBUG_LABEL (asm_out_file, FUNC_BEGIN_LABEL, @@ -3811,8 +3821,8 @@ static GTY(()) unsigned line_info_table_allocated; /* Number of elements in line_info_table currently in use. */ static GTY(()) unsigned line_info_table_in_use; -/* True if the compilation unit contains more than one .text section. */ -static GTY(()) bool have_switched_text_section = false; +/* True if the compilation unit places functions in more than one section. */ +static GTY(()) bool have_multiple_function_sections = false; /* A pointer to the base of a table that contains line information for each source code line outside of .text in the compilation unit. */ @@ -3870,7 +3880,7 @@ static GTY(()) unsigned ranges_table_in_use; #define RANGES_TABLE_INCREMENT 64 /* Whether we have location lists that need outputting */ -static GTY(()) unsigned have_location_lists; +static GTY(()) bool have_location_lists; /* Unique label counter. */ static GTY(()) unsigned int loclabel_num; @@ -4963,7 +4973,7 @@ AT_string_form (dw_attr_ref a) /* If we cannot expect the linker to merge strings in .debug_str section, only put it into .debug_str if it is worth even in this single module. */ - if ((DEBUG_STR_SECTION_FLAGS & SECTION_MERGE) == 0 + if ((debug_str_section->common.flags & SECTION_MERGE) == 0 && (len - DWARF_OFFSET_SIZE) * node->refcount <= len) return node->form = DW_FORM_string; @@ -5068,7 +5078,7 @@ add_AT_loc_list (dw_die_ref die, enum dwarf_attribute attr_kind, dw_loc_list_ref attr->dw_attr_val.val_class = dw_val_class_loc_list; attr->dw_attr_val.v.val_loc_list = loc_list; add_dwarf_attr (die, attr); - have_location_lists = 1; + have_location_lists = true; } static inline dw_loc_list_ref @@ -6886,7 +6896,7 @@ dwarf2out_switch_text_section (void) fde->dw_fde_hot_section_end_label = cfun->hot_section_end_label; fde->dw_fde_unlikely_section_label = cfun->cold_section_label; fde->dw_fde_unlikely_section_end_label = cfun->cold_section_end_label; - have_switched_text_section = true; + have_multiple_function_sections = true; } /* Output the location list given to us. */ @@ -6902,7 +6912,7 @@ output_loc_list (dw_loc_list_ref list_head) for (curr = list_head; curr != NULL; curr = curr->dw_loc_next) { unsigned long size; - if (!separate_line_info_table_in_use && !have_switched_text_section) + if (!have_multiple_function_sections) { dw2_asm_output_delta (DWARF2_ADDR_SIZE, curr->begin, curr->section, "Location list begin address (%s)", @@ -7171,12 +7181,12 @@ output_comp_unit (dw_die_ref die, int output_if_empty) sprintf (tmp, ".gnu.linkonce.wi.%s", oldsym); secname = tmp; die->die_symbol = NULL; + switch_to_section (get_section (secname, SECTION_DEBUG, NULL)); } else - secname = (const char *) DEBUG_INFO_SECTION; + switch_to_section (debug_info_section); /* Output debugging information. */ - named_section_flags (secname, SECTION_DEBUG); output_compilation_unit_header (); output_die (die); @@ -7411,7 +7421,7 @@ output_ranges (void) /* If all code is in the text section, then the compilation unit base address defaults to DW_AT_low_pc, which is the base of the text section. */ - if (!separate_line_info_table_in_use && !have_switched_text_section) + if (!have_multiple_function_sections) { dw2_asm_output_delta (DWARF2_ADDR_SIZE, blabel, text_section_label, @@ -7803,10 +7813,7 @@ output_line_info (void) current_file = 1; current_line = 1; - if (cfun - && (last_text_section == in_unlikely_executed_text - || (last_text_section == in_named - && last_text_section_name == cfun->unlikely_text_section_name))) + if (cfun && in_cold_section_p) strcpy (prev_line_label, cfun->cold_section_label); else strcpy (prev_line_label, text_section_label); @@ -8093,7 +8100,10 @@ base_type_die (tree type) break; case REAL_TYPE: - encoding = DW_ATE_float; + if (DECIMAL_FLOAT_MODE_P (TYPE_MODE (type))) + encoding = DW_ATE_decimal_float; + else + encoding = DW_ATE_float; break; /* Dwarf2 doesn't know anything about complex ints, so use @@ -9386,7 +9396,7 @@ loc_descriptor_from_tree_1 (tree loc, int want_address) return 0; /* If we've got an address and don't want one, dereference. */ - if (!want_address && have_address) + if (!want_address && have_address && ret) { HOST_WIDE_INT size = int_size_in_bytes (TREE_TYPE (loc)); @@ -10151,11 +10161,7 @@ secname_for_decl (tree decl) tree sectree = DECL_SECTION_NAME (current_function_decl); secname = TREE_STRING_POINTER (sectree); } - else if (cfun - && (last_text_section == in_unlikely_executed_text - || (last_text_section == in_named - && last_text_section_name - == cfun->unlikely_text_section_name))) + else if (cfun && in_cold_section_p) secname = cfun->cold_section_label; else secname = text_section_label; @@ -13344,7 +13350,7 @@ static void dwarf2out_begin_block (unsigned int line ATTRIBUTE_UNUSED, unsigned int blocknum) { - current_function_section (current_function_decl); + switch_to_section (current_function_section ()); ASM_OUTPUT_DEBUG_LABEL (asm_out_file, BLOCK_BEGIN_LABEL, blocknum); } @@ -13354,7 +13360,7 @@ dwarf2out_begin_block (unsigned int line ATTRIBUTE_UNUSED, static void dwarf2out_end_block (unsigned int line ATTRIBUTE_UNUSED, unsigned int blocknum) { - current_function_section (current_function_decl); + switch_to_section (current_function_section ()); ASM_OUTPUT_DEBUG_LABEL (asm_out_file, BLOCK_END_LABEL, blocknum); } @@ -13511,10 +13517,7 @@ dwarf2out_var_location (rtx loc_note) newloc->var_loc_note = loc_note; newloc->next = NULL; - if (cfun - && (last_text_section == in_unlikely_executed_text - || (last_text_section == in_named - && last_text_section_name == cfun->unlikely_text_section_name))) + if (cfun && in_cold_section_p) newloc->section_label = cfun->cold_section_label; else newloc->section_label = text_section_label; @@ -13530,13 +13533,16 @@ dwarf2out_var_location (rtx loc_note) /* We need to reset the locations at the beginning of each function. We can't do this in the end_function hook, because the - declarations that use the locations won't have been outputted when - that hook is called. */ + declarations that use the locations won't have been output when + that hook is called. Also compute have_multiple_function_sections here. */ static void -dwarf2out_begin_function (tree unused ATTRIBUTE_UNUSED) +dwarf2out_begin_function (tree fun) { htab_empty (decl_loc_table); + + if (function_section (fun) != text_section) + have_multiple_function_sections = true; } /* Output a label to mark the beginning of a source code line entry @@ -13549,7 +13555,7 @@ dwarf2out_source_line (unsigned int line, const char *filename) if (debug_info_level >= DINFO_LEVEL_NORMAL && line != 0) { - current_function_section (current_function_decl); + switch_to_section (current_function_section ()); /* If requested, emit something human-readable. */ if (flag_debug_asm) @@ -13567,12 +13573,8 @@ dwarf2out_source_line (unsigned int line, const char *filename) /* Indicate that line number info exists. */ line_info_table_in_use++; - - /* Indicate that multiple line number tables exist. */ - if (DECL_SECTION_NAME (current_function_decl)) - separate_line_info_table_in_use++; } - else if (DECL_SECTION_NAME (current_function_decl)) + else if (function_section (current_function_decl) != text_section) { dw_separate_line_info_ref line_info; targetm.asm_out.internal_label (asm_out_file, SEPARATE_LINE_CODE_LABEL, @@ -13646,7 +13648,7 @@ dwarf2out_start_source_file (unsigned int lineno, const char *filename) { int fileno; - named_section_flags (DEBUG_MACINFO_SECTION, SECTION_DEBUG); + switch_to_section (debug_macinfo_section); dw2_asm_output_data (1, DW_MACINFO_start_file, "Start new file"); dw2_asm_output_data_uleb128 (lineno, "Included from line number %d", lineno); @@ -13667,7 +13669,7 @@ dwarf2out_end_source_file (unsigned int lineno ATTRIBUTE_UNUSED) if (debug_info_level >= DINFO_LEVEL_VERBOSE) { - named_section_flags (DEBUG_MACINFO_SECTION, SECTION_DEBUG); + switch_to_section (debug_macinfo_section); dw2_asm_output_data (1, DW_MACINFO_end_file, "End file"); } } @@ -13682,7 +13684,7 @@ dwarf2out_define (unsigned int lineno ATTRIBUTE_UNUSED, { if (debug_info_level >= DINFO_LEVEL_VERBOSE) { - named_section_flags (DEBUG_MACINFO_SECTION, SECTION_DEBUG); + switch_to_section (debug_macinfo_section); dw2_asm_output_data (1, DW_MACINFO_define, "Define macro"); dw2_asm_output_data_uleb128 (lineno, "At line number %d", lineno); dw2_asm_output_nstring (buffer, -1, "The macro"); @@ -13699,7 +13701,7 @@ dwarf2out_undef (unsigned int lineno ATTRIBUTE_UNUSED, { if (debug_info_level >= DINFO_LEVEL_VERBOSE) { - named_section_flags (DEBUG_MACINFO_SECTION, SECTION_DEBUG); + switch_to_section (debug_macinfo_section); dw2_asm_output_data (1, DW_MACINFO_undef, "Undefine macro"); dw2_asm_output_data_uleb128 (lineno, "At line number %d", lineno); dw2_asm_output_nstring (buffer, -1, "The macro"); @@ -13751,6 +13753,25 @@ dwarf2out_init (const char *filename ATTRIBUTE_UNUSED) used_rtx_array = VEC_alloc (rtx, gc, 32); + debug_info_section = get_section (DEBUG_INFO_SECTION, + SECTION_DEBUG, NULL); + debug_abbrev_section = get_section (DEBUG_ABBREV_SECTION, + SECTION_DEBUG, NULL); + debug_aranges_section = get_section (DEBUG_ARANGES_SECTION, + SECTION_DEBUG, NULL); + debug_macinfo_section = get_section (DEBUG_MACINFO_SECTION, + SECTION_DEBUG, NULL); + debug_line_section = get_section (DEBUG_LINE_SECTION, + SECTION_DEBUG, NULL); + debug_loc_section = get_section (DEBUG_LOC_SECTION, + SECTION_DEBUG, NULL); + debug_pubnames_section = get_section (DEBUG_PUBNAMES_SECTION, + SECTION_DEBUG, NULL); + debug_str_section = get_section (DEBUG_STR_SECTION, + DEBUG_STR_SECTION_FLAGS, NULL); + debug_ranges_section = get_section (DEBUG_RANGES_SECTION, + SECTION_DEBUG, NULL); + ASM_GENERATE_INTERNAL_LABEL (text_end_label, TEXT_END_LABEL, 0); ASM_GENERATE_INTERNAL_LABEL (abbrev_section_label, DEBUG_ABBREV_SECTION_LABEL, 0); @@ -13765,26 +13786,26 @@ dwarf2out_init (const char *filename ATTRIBUTE_UNUSED) DEBUG_LINE_SECTION_LABEL, 0); ASM_GENERATE_INTERNAL_LABEL (ranges_section_label, DEBUG_RANGES_SECTION_LABEL, 0); - named_section_flags (DEBUG_ABBREV_SECTION, SECTION_DEBUG); + switch_to_section (debug_abbrev_section); ASM_OUTPUT_LABEL (asm_out_file, abbrev_section_label); - named_section_flags (DEBUG_INFO_SECTION, SECTION_DEBUG); + switch_to_section (debug_info_section); ASM_OUTPUT_LABEL (asm_out_file, debug_info_section_label); - named_section_flags (DEBUG_LINE_SECTION, SECTION_DEBUG); + switch_to_section (debug_line_section); ASM_OUTPUT_LABEL (asm_out_file, debug_line_section_label); if (debug_info_level >= DINFO_LEVEL_VERBOSE) { - named_section_flags (DEBUG_MACINFO_SECTION, SECTION_DEBUG); + switch_to_section (debug_macinfo_section); ASM_GENERATE_INTERNAL_LABEL (macinfo_section_label, DEBUG_MACINFO_SECTION_LABEL, 0); ASM_OUTPUT_LABEL (asm_out_file, macinfo_section_label); } - text_section (); + switch_to_section (text_section); ASM_OUTPUT_LABEL (asm_out_file, text_section_label); if (flag_reorder_blocks_and_partition) { - unlikely_text_section (); + switch_to_section (unlikely_text_section ()); ASM_OUTPUT_LABEL (asm_out_file, cold_text_section_label); } } @@ -13799,7 +13820,7 @@ output_indirect_string (void **h, void *v ATTRIBUTE_UNUSED) if (node->form == DW_FORM_strp) { - named_section_flags (DEBUG_STR_SECTION, DEBUG_STR_SECTION_FLAGS); + switch_to_section (debug_str_section); ASM_OUTPUT_LABEL (asm_out_file, node->label); assemble_string (node->str, strlen (node->str) + 1); } @@ -14116,11 +14137,11 @@ dwarf2out_finish (const char *filename) add_sibling_attributes (node->die); /* Output a terminator label for the .text section. */ - text_section (); + switch_to_section (text_section); targetm.asm_out.internal_label (asm_out_file, TEXT_END_LABEL, 0); if (flag_reorder_blocks_and_partition) { - unlikely_text_section (); + switch_to_section (unlikely_text_section ()); targetm.asm_out.internal_label (asm_out_file, COLD_END_LABEL, 0); } @@ -14131,25 +14152,13 @@ dwarf2out_finish (const char *filename) examining the file. */ if (! DWARF2_ASM_LINE_DEBUG_INFO) { - named_section_flags (DEBUG_LINE_SECTION, SECTION_DEBUG); + switch_to_section (debug_line_section); output_line_info (); } - /* Output location list section if necessary. */ - if (have_location_lists) - { - /* Output the location lists info. */ - named_section_flags (DEBUG_LOC_SECTION, SECTION_DEBUG); - ASM_GENERATE_INTERNAL_LABEL (loc_section_label, - DEBUG_LOC_SECTION_LABEL, 0); - ASM_OUTPUT_LABEL (asm_out_file, loc_section_label); - output_location_lists (die); - have_location_lists = 0; - } - /* We can only use the low/high_pc attributes if all of the code was in .text. */ - if (!separate_line_info_table_in_use && !have_switched_text_section) + if (!have_multiple_function_sections) { add_AT_lbl_id (comp_unit_die, DW_AT_low_pc, text_section_label); add_AT_lbl_id (comp_unit_die, DW_AT_high_pc, text_end_label); @@ -14160,6 +14169,17 @@ dwarf2out_finish (const char *filename) else if (have_location_lists || ranges_table_in_use) add_AT_addr (comp_unit_die, DW_AT_entry_pc, const0_rtx); + /* Output location list section if necessary. */ + if (have_location_lists) + { + /* Output the location lists info. */ + switch_to_section (debug_loc_section); + ASM_GENERATE_INTERNAL_LABEL (loc_section_label, + DEBUG_LOC_SECTION_LABEL, 0); + ASM_OUTPUT_LABEL (asm_out_file, loc_section_label); + output_location_lists (die); + } + if (debug_info_level >= DINFO_LEVEL_NORMAL) add_AT_lbl_offset (comp_unit_die, DW_AT_stmt_list, debug_line_section_label); @@ -14175,13 +14195,13 @@ dwarf2out_finish (const char *filename) output_comp_unit (comp_unit_die, 0); /* Output the abbreviation table. */ - named_section_flags (DEBUG_ABBREV_SECTION, SECTION_DEBUG); + switch_to_section (debug_abbrev_section); output_abbrev_section (); /* Output public names table if necessary. */ if (pubname_table_in_use) { - named_section_flags (DEBUG_PUBNAMES_SECTION, SECTION_DEBUG); + switch_to_section (debug_pubnames_section); output_pubnames (); } @@ -14189,14 +14209,14 @@ dwarf2out_finish (const char *filename) table, so don't write it out if we don't have any. */ if (fde_table_in_use) { - named_section_flags (DEBUG_ARANGES_SECTION, SECTION_DEBUG); + switch_to_section (debug_aranges_section); output_aranges (); } /* Output ranges section if necessary. */ if (ranges_table_in_use) { - named_section_flags (DEBUG_RANGES_SECTION, SECTION_DEBUG); + switch_to_section (debug_ranges_section); ASM_OUTPUT_LABEL (asm_out_file, ranges_section_label); output_ranges (); } @@ -14204,7 +14224,7 @@ dwarf2out_finish (const char *filename) /* Have to end the macro section. */ if (debug_info_level >= DINFO_LEVEL_VERBOSE) { - named_section_flags (DEBUG_MACINFO_SECTION, SECTION_DEBUG); + switch_to_section (debug_macinfo_section); dw2_asm_output_data (1, 0, "End compilation unit"); } diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c index d17258795fb..aaab19ed4d3 100644 --- a/gcc/emit-rtl.c +++ b/gcc/emit-rtl.c @@ -254,7 +254,7 @@ mem_attrs_htab_hash (const void *x) return (p->alias ^ (p->align * 1000) ^ ((p->offset ? INTVAL (p->offset) : 0) * 50000) ^ ((p->size ? INTVAL (p->size) : 0) * 2500000) - ^ (size_t) p->expr); + ^ (size_t) iterative_hash_expr (p->expr, 0)); } /* Returns nonzero if the value represented by X (which is really a @@ -267,8 +267,11 @@ mem_attrs_htab_eq (const void *x, const void *y) mem_attrs *p = (mem_attrs *) x; mem_attrs *q = (mem_attrs *) y; - return (p->alias == q->alias && p->expr == q->expr && p->offset == q->offset - && p->size == q->size && p->align == q->align); + return (p->alias == q->alias && p->offset == q->offset + && p->size == q->size && p->align == q->align + && (p->expr == q->expr + || (p->expr != NULL_TREE && q->expr != NULL_TREE + && operand_equal_p (p->expr, q->expr, 0)))); } /* Allocate a new mem_attrs structure and insert it into the hash table if @@ -5151,6 +5154,8 @@ gen_const_vector (enum machine_mode mode, int constant) units = GET_MODE_NUNITS (mode); inner = GET_MODE_INNER (mode); + gcc_assert (!DECIMAL_FLOAT_MODE_P (inner)); + v = rtvec_alloc (units); /* We need to call this function after we set the scalar const_tiny_rtx @@ -5227,7 +5232,8 @@ init_emit_once (int line_numbers) word_mode = VOIDmode; double_mode = VOIDmode; - for (mode = GET_CLASS_NARROWEST_MODE (MODE_INT); mode != VOIDmode; + for (mode = GET_CLASS_NARROWEST_MODE (MODE_INT); + mode != VOIDmode; mode = GET_MODE_WIDER_MODE (mode)) { if (GET_MODE_BITSIZE (mode) == BITS_PER_UNIT @@ -5239,7 +5245,8 @@ init_emit_once (int line_numbers) word_mode = mode; } - for (mode = GET_CLASS_NARROWEST_MODE (MODE_FLOAT); mode != VOIDmode; + for (mode = GET_CLASS_NARROWEST_MODE (MODE_FLOAT); + mode != VOIDmode; mode = GET_MODE_WIDER_MODE (mode)) { if (GET_MODE_BITSIZE (mode) == DOUBLE_TYPE_SIZE @@ -5324,14 +5331,22 @@ init_emit_once (int line_numbers) REAL_VALUE_TYPE *r = (i == 0 ? &dconst0 : i == 1 ? &dconst1 : &dconst2); - for (mode = GET_CLASS_NARROWEST_MODE (MODE_FLOAT); mode != VOIDmode; + for (mode = GET_CLASS_NARROWEST_MODE (MODE_FLOAT); + mode != VOIDmode; + mode = GET_MODE_WIDER_MODE (mode)) + const_tiny_rtx[i][(int) mode] = + CONST_DOUBLE_FROM_REAL_VALUE (*r, mode); + + for (mode = GET_CLASS_NARROWEST_MODE (MODE_DECIMAL_FLOAT); + mode != VOIDmode; mode = GET_MODE_WIDER_MODE (mode)) const_tiny_rtx[i][(int) mode] = CONST_DOUBLE_FROM_REAL_VALUE (*r, mode); const_tiny_rtx[i][(int) VOIDmode] = GEN_INT (i); - for (mode = GET_CLASS_NARROWEST_MODE (MODE_INT); mode != VOIDmode; + for (mode = GET_CLASS_NARROWEST_MODE (MODE_INT); + mode != VOIDmode; mode = GET_MODE_WIDER_MODE (mode)) const_tiny_rtx[i][(int) mode] = GEN_INT (i); diff --git a/gcc/except.c b/gcc/except.c index 34dddfeacbf..19aeac8ee7f 100644 --- a/gcc/except.c +++ b/gcc/except.c @@ -134,7 +134,7 @@ struct eh_region GTY(()) /* Each region does exactly one thing. */ enum eh_region_type - { + { ERT_UNKNOWN = 0, ERT_CLEANUP, ERT_TRY, @@ -251,7 +251,6 @@ struct eh_status GTY(()) htab_t GTY((param_is (struct throw_stmt_node))) throw_stmt_table; }; - static int t2r_eq (const void *, const void *); static hashval_t t2r_hash (const void *); @@ -442,7 +441,7 @@ init_eh_for_function (void) cfun->eh = ggc_alloc_cleared (sizeof (struct eh_status)); } -/* Routines to generate the exception tree somewhat directly. +/* Routines to generate the exception tree somewhat directly. These are used from tree-eh.c when processing exception related nodes during tree optimization. */ @@ -738,7 +737,7 @@ remove_unreachable_regions (rtx insns) default: break; } - + if (kill_it) remove_eh_handler (r); } @@ -864,11 +863,11 @@ duplicate_eh_region_1 (struct eh_region *o) struct eh_region *n = ggc_alloc_cleared (sizeof (struct eh_region)); *n = *o; - + n->region_number = o->region_number + cfun->eh->last_region_number; VEC_replace (eh_region, cfun->eh->region_array, n->region_number, n); gcc_assert (!o->aka); - + return n; } @@ -877,7 +876,7 @@ duplicate_eh_region_2 (struct eh_region *o, struct eh_region **n_array, struct eh_region *prev_try) { struct eh_region *n = n_array[o->region_number]; - + switch (n->type) { case ERT_TRY: @@ -886,7 +885,7 @@ duplicate_eh_region_2 (struct eh_region *o, struct eh_region **n_array, if (o->u.try.last_catch) n->u.try.last_catch = n_array[o->u.try.last_catch->region_number]; break; - + case ERT_CATCH: if (o->u.catch.next_catch) n->u.catch.next_catch = n_array[o->u.catch.next_catch->region_number]; @@ -900,11 +899,11 @@ duplicate_eh_region_2 (struct eh_region *o, struct eh_region **n_array, else n->u.cleanup.prev_try = prev_try; break; - + default: break; } - + if (o->outer) n->outer = n_array[o->outer->region_number]; if (o->inner) @@ -922,10 +921,10 @@ duplicate_eh_regions (struct function *ifun, duplicate_eh_regions_map map, int ifun_last_region_number = ifun->eh->last_region_number; struct eh_region **n_array, *root, *cur, *prev_try; int i; - + if (ifun_last_region_number == 0 || !ifun->eh->region_tree) return 0; - + n_array = xcalloc (ifun_last_region_number + 1, sizeof (*n_array)); VEC_safe_grow (eh_region, gc, cfun->eh->region_array, cfun->eh->last_region_number + 1 + ifun_last_region_number); @@ -936,7 +935,7 @@ duplicate_eh_regions (struct function *ifun, duplicate_eh_regions_map map, for (i = cfun->eh->last_region_number + 1; i < cfun->eh->last_region_number + 1 + ifun_last_region_number; i++) VEC_replace (eh_region, cfun->eh->region_array, i, 0); - + /* Search for the containing ERT_TRY region to fix up the prev_try short-cuts for ERT_CLEANUP regions. */ prev_try = NULL; @@ -967,7 +966,7 @@ duplicate_eh_regions (struct function *ifun, duplicate_eh_regions_map map, continue; duplicate_eh_region_2 (cur, n_array, prev_try); } - + root = n_array[ifun->eh->region_tree->region_number]; gcc_assert (root->outer == NULL); if (outer_region > 0) @@ -1000,12 +999,12 @@ duplicate_eh_regions (struct function *ifun, duplicate_eh_regions_map map, else cfun->eh->region_tree = root; } - + free (n_array); - + i = cfun->eh->last_region_number; cfun->eh->last_region_number = i + ifun_last_region_number; - + return i; } @@ -1268,7 +1267,7 @@ emit_to_new_bb_before (rtx seq, rtx insn) edge_iterator ei; /* If there happens to be a fallthru edge (possibly created by cleanup_cfg - call), we don't want it to go into newly created landing pad or other EH + call), we don't want it to go into newly created landing pad or other EH construct. */ for (ei = ei_start (BLOCK_FOR_INSN (insn)->preds); (e = ei_safe_edge (ei)); ) if (e->flags & EDGE_FALLTHRU) @@ -1339,7 +1338,7 @@ build_post_landing_pads (void) emit_cmp_and_jump_insns (cfun->eh->filter, GEN_INT (tree_low_cst (TREE_VALUE (flt_node), 0)), - EQ, NULL_RTX, + EQ, NULL_RTX, targetm.eh_return_filter_mode (), 0, c->label); tp_node = TREE_CHAIN (tp_node); @@ -1372,7 +1371,7 @@ build_post_landing_pads (void) emit_cmp_and_jump_insns (cfun->eh->filter, GEN_INT (region->u.allowed.filter), - EQ, NULL_RTX, + EQ, NULL_RTX, targetm.eh_return_filter_mode (), 0, region->label); /* We delay the generation of the _Unwind_Resume until we generate @@ -1552,7 +1551,7 @@ dw2_build_landing_pads (void) emit_move_insn (cfun->eh->exc_ptr, gen_rtx_REG (ptr_mode, EH_RETURN_DATA_REGNO (0))); emit_move_insn (cfun->eh->filter, - gen_rtx_REG (targetm.eh_return_filter_mode (), + gen_rtx_REG (targetm.eh_return_filter_mode (), EH_RETURN_DATA_REGNO (1))); seq = get_insns (); @@ -2451,7 +2450,7 @@ reachable_next_level (struct eh_region *region, tree type_thrown, /* Here we end our search, since no exceptions may propagate. If we've touched down at some landing pad previous, then the explicit function call we generated may be used. Otherwise - the call is made by the runtime. + the call is made by the runtime. Before inlining, do not perform this optimization. We may inline a subroutine that contains handlers, and that will @@ -3095,7 +3094,7 @@ collect_one_action_chain (htab_t ar_hash, struct eh_region *region) Add a cleanup action to the chain to catch these. */ else if (next <= 0) next = add_action_record (ar_hash, 0, 0); - + return add_action_record (ar_hash, region->u.allowed.filter, next); case ERT_MUST_NOT_THROW: @@ -3425,34 +3424,37 @@ sjlj_output_call_site_table (void) call_site_base += n; } -/* Tell assembler to switch to the section for the exception handling - table. */ +#ifndef TARGET_UNWIND_INFO +/* Switch to the section that should be used for exception tables. */ -void -default_exception_section (void) +static void +switch_to_exception_section (void) { - if (targetm.have_named_sections) + if (exception_section == 0) { - int flags; - - if (EH_TABLES_CAN_BE_READ_ONLY) + if (targetm.have_named_sections) { - int tt_format = ASM_PREFERRED_EH_DATA_FORMAT (/*code=*/0, /*global=*/1); - - flags = (! flag_pic - || ((tt_format & 0x70) != DW_EH_PE_absptr - && (tt_format & 0x70) != DW_EH_PE_aligned)) - ? 0 : SECTION_WRITE; + int flags; + + if (EH_TABLES_CAN_BE_READ_ONLY) + { + int tt_format = + ASM_PREFERRED_EH_DATA_FORMAT (/*code=*/0, /*global=*/1); + flags = ((! flag_pic + || ((tt_format & 0x70) != DW_EH_PE_absptr + && (tt_format & 0x70) != DW_EH_PE_aligned)) + ? 0 : SECTION_WRITE); + } + else + flags = SECTION_WRITE; + exception_section = get_section (".gcc_except_table", flags, NULL); } else - flags = SECTION_WRITE; - named_section_flags (".gcc_except_table", flags); + exception_section = flag_pic ? data_section : readonly_data_section; } - else if (flag_pic) - data_section (); - else - readonly_data_section (); + switch_to_section (exception_section); } +#endif /* Output a reference from an exception table to the type_info object TYPE. @@ -3489,8 +3491,8 @@ output_ttype (tree type, int tt_format, int tt_format_size) public = TREE_PUBLIC (type); } } - else if (TREE_CODE (type) != INTEGER_CST) - abort (); + else + gcc_assert (TREE_CODE (type) == INTEGER_CST); } /* Allow the target to override the type table entry format. */ @@ -3533,9 +3535,12 @@ output_function_exception_table (void) /* Note that varasm still thinks we're in the function's code section. The ".endp" directive that will immediately follow will take us back. */ #else - targetm.asm_out.exception_section (); + switch_to_exception_section (); #endif + /* If the target wants a label to begin the table, emit it here. */ + targetm.asm_out.except_table_label (asm_out_file); + have_tt_data = (VEC_length (tree, cfun->eh->ttype_data) > 0 || VARRAY_ACTIVE_SIZE (cfun->eh->ehspec_data) > 0); @@ -3687,7 +3692,7 @@ output_function_exception_table (void) (i ? NULL : "Exception specification table")); } - current_function_section (current_function_decl); + switch_to_section (current_function_section ()); } void @@ -3703,7 +3708,7 @@ get_eh_throw_stmt_table (struct function *fun) } /* Dump EH information to OUT. */ -void +void dump_eh_tree (FILE *out, struct function *fun) { struct eh_region *i; @@ -3749,7 +3754,7 @@ dump_eh_tree (FILE *out, struct function *fun) /* Verify some basic invariants on EH datastructures. Could be extended to catch more. */ -void +void verify_eh_tree (struct function *fun) { struct eh_region *i, *outer = NULL; @@ -3865,8 +3870,8 @@ rest_of_handle_eh (void) struct tree_opt_pass pass_rtl_eh = { "eh", /* name */ - gate_handle_eh, /* gate */ - rest_of_handle_eh, /* execute */ + gate_handle_eh, /* gate */ + rest_of_handle_eh, /* execute */ NULL, /* sub */ NULL, /* next */ 0, /* static_pass_number */ diff --git a/gcc/except.h b/gcc/except.h index d5e391d9c77..2b2115a09da 100644 --- a/gcc/except.h +++ b/gcc/except.h @@ -173,3 +173,7 @@ struct throw_stmt_node GTY(()) extern struct htab *get_eh_throw_stmt_table (struct function *); extern void set_eh_throw_stmt_table (struct function *, struct htab *); + +#ifdef ENABLE_CHECKING +extern void verify_eh_throw_table_statements (void); +#endif diff --git a/gcc/expmed.c b/gcc/expmed.c index d591b6bc7c2..23909404005 100644 --- a/gcc/expmed.c +++ b/gcc/expmed.c @@ -103,7 +103,8 @@ static int shift_cost[NUM_MACHINE_MODES][MAX_BITS_PER_WORD]; static int shiftadd_cost[NUM_MACHINE_MODES][MAX_BITS_PER_WORD]; static int shiftsub_cost[NUM_MACHINE_MODES][MAX_BITS_PER_WORD]; static int mul_cost[NUM_MACHINE_MODES]; -static int div_cost[NUM_MACHINE_MODES]; +static int sdiv_cost[NUM_MACHINE_MODES]; +static int udiv_cost[NUM_MACHINE_MODES]; static int mul_widen_cost[NUM_MACHINE_MODES]; static int mul_highpart_cost[NUM_MACHINE_MODES]; @@ -115,11 +116,12 @@ init_expmed (void) struct rtx_def reg; rtunion reg_fld[2]; struct rtx_def plus; rtunion plus_fld1; struct rtx_def neg; - struct rtx_def udiv; rtunion udiv_fld1; struct rtx_def mult; rtunion mult_fld1; - struct rtx_def div; rtunion div_fld1; - struct rtx_def mod; rtunion mod_fld1; + struct rtx_def sdiv; rtunion sdiv_fld1; + struct rtx_def udiv; rtunion udiv_fld1; struct rtx_def zext; + struct rtx_def sdiv_32; rtunion sdiv_32_fld1; + struct rtx_def smod_32; rtunion smod_32_fld1; struct rtx_def wide_mult; rtunion wide_mult_fld1; struct rtx_def wide_lshr; rtunion wide_lshr_fld1; struct rtx_def wide_trunc; @@ -155,21 +157,25 @@ init_expmed (void) PUT_CODE (&all.neg, NEG); XEXP (&all.neg, 0) = &all.reg; - PUT_CODE (&all.udiv, UDIV); - XEXP (&all.udiv, 0) = &all.reg; - XEXP (&all.udiv, 1) = &all.reg; - PUT_CODE (&all.mult, MULT); XEXP (&all.mult, 0) = &all.reg; XEXP (&all.mult, 1) = &all.reg; - PUT_CODE (&all.div, DIV); - XEXP (&all.div, 0) = &all.reg; - XEXP (&all.div, 1) = 32 < MAX_BITS_PER_WORD ? cint[32] : GEN_INT (32); + PUT_CODE (&all.sdiv, DIV); + XEXP (&all.sdiv, 0) = &all.reg; + XEXP (&all.sdiv, 1) = &all.reg; - PUT_CODE (&all.mod, MOD); - XEXP (&all.mod, 0) = &all.reg; - XEXP (&all.mod, 1) = XEXP (&all.div, 1); + PUT_CODE (&all.udiv, UDIV); + XEXP (&all.udiv, 0) = &all.reg; + XEXP (&all.udiv, 1) = &all.reg; + + PUT_CODE (&all.sdiv_32, DIV); + XEXP (&all.sdiv_32, 0) = &all.reg; + XEXP (&all.sdiv_32, 1) = 32 < MAX_BITS_PER_WORD ? cint[32] : GEN_INT (32); + + PUT_CODE (&all.smod_32, MOD); + XEXP (&all.smod_32, 0) = &all.reg; + XEXP (&all.smod_32, 1) = XEXP (&all.sdiv_32, 1); PUT_CODE (&all.zext, ZERO_EXTEND); XEXP (&all.zext, 0) = &all.reg; @@ -205,10 +211,11 @@ init_expmed (void) PUT_MODE (&all.reg, mode); PUT_MODE (&all.plus, mode); PUT_MODE (&all.neg, mode); - PUT_MODE (&all.udiv, mode); PUT_MODE (&all.mult, mode); - PUT_MODE (&all.div, mode); - PUT_MODE (&all.mod, mode); + PUT_MODE (&all.sdiv, mode); + PUT_MODE (&all.udiv, mode); + PUT_MODE (&all.sdiv_32, mode); + PUT_MODE (&all.smod_32, mode); PUT_MODE (&all.wide_trunc, mode); PUT_MODE (&all.shift, mode); PUT_MODE (&all.shift_mult, mode); @@ -217,11 +224,14 @@ init_expmed (void) add_cost[mode] = rtx_cost (&all.plus, SET); neg_cost[mode] = rtx_cost (&all.neg, SET); - div_cost[mode] = rtx_cost (&all.udiv, SET); mul_cost[mode] = rtx_cost (&all.mult, SET); + sdiv_cost[mode] = rtx_cost (&all.sdiv, SET); + udiv_cost[mode] = rtx_cost (&all.udiv, SET); - sdiv_pow2_cheap[mode] = (rtx_cost (&all.div, SET) <= 2 * add_cost[mode]); - smod_pow2_cheap[mode] = (rtx_cost (&all.mod, SET) <= 4 * add_cost[mode]); + sdiv_pow2_cheap[mode] = (rtx_cost (&all.sdiv_32, SET) + <= 2 * add_cost[mode]); + smod_pow2_cheap[mode] = (rtx_cost (&all.smod_32, SET) + <= 4 * add_cost[mode]); wider_mode = GET_MODE_WIDER_MODE (mode); if (wider_mode != VOIDmode) @@ -2836,6 +2846,17 @@ choose_mult_variant (enum machine_mode mode, HOST_WIDE_INT val, struct mult_cost limit; int op_cost; + /* Fail quickly for impossible bounds. */ + if (mult_cost < 0) + return false; + + /* Ensure that mult_cost provides a reasonable upper bound. + Any constant multiplication can be performed with less + than 2 * bits additions. */ + op_cost = 2 * GET_MODE_BITSIZE (mode) * add_cost[mode]; + if (mult_cost > op_cost) + mult_cost = op_cost; + *variant = basic_variant; limit.cost = mult_cost; limit.latency = mult_cost; @@ -3362,6 +3383,8 @@ extract_high_half (enum machine_mode mode, rtx op) if (mode == word_mode) return gen_highpart (mode, op); + gcc_assert (!SCALAR_FLOAT_MODE_P (mode)); + wider_mode = GET_MODE_WIDER_MODE (mode); op = expand_shift (RSHIFT_EXPR, wider_mode, op, build_int_cst (NULL_TREE, GET_MODE_BITSIZE (mode)), 0, 1); @@ -3381,6 +3404,8 @@ expand_mult_highpart_optab (enum machine_mode mode, rtx op0, rtx op1, rtx tem; int size; + gcc_assert (!SCALAR_FLOAT_MODE_P (mode)); + wider_mode = GET_MODE_WIDER_MODE (mode); size = GET_MODE_BITSIZE (mode); @@ -3491,6 +3516,7 @@ expand_mult_highpart (enum machine_mode mode, rtx op0, rtx op1, struct algorithm alg; rtx tem; + gcc_assert (!SCALAR_FLOAT_MODE_P (mode)); /* We can't support modes wider than HOST_BITS_PER_INT. */ gcc_assert (GET_MODE_BITSIZE (mode) <= HOST_BITS_PER_WIDE_INT); @@ -3900,11 +3926,10 @@ expand_divmod (int rem_flag, enum tree_code code, enum machine_mode mode, /* Only deduct something for a REM if the last divide done was for a different constant. Then set the constant of the last divide. */ - max_cost = div_cost[compute_mode] - - (rem_flag && ! (last_div_const != 0 && op1_is_constant - && INTVAL (op1) == last_div_const) - ? mul_cost[compute_mode] + add_cost[compute_mode] - : 0); + max_cost = unsignedp ? udiv_cost[compute_mode] : sdiv_cost[compute_mode]; + if (rem_flag && ! (last_div_const != 0 && op1_is_constant + && INTVAL (op1) == last_div_const)) + max_cost -= mul_cost[compute_mode] + add_cost[compute_mode]; last_div_const = ! rem_flag && op1_is_constant ? INTVAL (op1) : 0; diff --git a/gcc/expr.c b/gcc/expr.c index 44ef18223f0..7a83b7e317f 100644 --- a/gcc/expr.c +++ b/gcc/expr.c @@ -410,10 +410,15 @@ convert_move (rtx to, rtx from, int unsignedp) rtx value, insns; convert_optab tab; - gcc_assert (GET_MODE_PRECISION (from_mode) - != GET_MODE_PRECISION (to_mode)); + gcc_assert ((GET_MODE_PRECISION (from_mode) + != GET_MODE_PRECISION (to_mode)) + || (DECIMAL_FLOAT_MODE_P (from_mode) + != DECIMAL_FLOAT_MODE_P (to_mode))); - if (GET_MODE_PRECISION (from_mode) < GET_MODE_PRECISION (to_mode)) + if (GET_MODE_PRECISION (from_mode) == GET_MODE_PRECISION (to_mode)) + /* Conversion between decimal float and binary float, same size. */ + tab = DECIMAL_FLOAT_MODE_P (from_mode) ? trunc_optab : sext_optab; + else if (GET_MODE_PRECISION (from_mode) < GET_MODE_PRECISION (to_mode)) tab = sext_optab; else tab = trunc_optab; @@ -2852,6 +2857,19 @@ emit_move_resolve_push (enum machine_mode mode, rtx x) #endif if (code == PRE_DEC || code == POST_DEC) adjust = -adjust; + else if (code == PRE_MODIFY || code == POST_MODIFY) + { + rtx expr = XEXP (XEXP (x, 0), 1); + HOST_WIDE_INT val; + + gcc_assert (GET_CODE (expr) == PLUS || GET_CODE (expr) == MINUS); + gcc_assert (GET_CODE (XEXP (expr, 1)) == CONST_INT); + val = INTVAL (XEXP (expr, 1)); + if (GET_CODE (expr) == MINUS) + val = -val; + gcc_assert (adjust == val || adjust == -val); + adjust = val; + } /* Do not use anti_adjust_stack, since we don't want to update stack_pointer_delta. */ @@ -2865,13 +2883,13 @@ emit_move_resolve_push (enum machine_mode mode, rtx x) { case PRE_INC: case PRE_DEC: + case PRE_MODIFY: temp = stack_pointer_rtx; break; case POST_INC: - temp = plus_constant (stack_pointer_rtx, -GET_MODE_SIZE (mode)); - break; case POST_DEC: - temp = plus_constant (stack_pointer_rtx, GET_MODE_SIZE (mode)); + case POST_MODIFY: + temp = plus_constant (stack_pointer_rtx, -adjust); break; default: gcc_unreachable (); @@ -5787,15 +5805,6 @@ force_operand (rtx value, rtx target) return subtarget; } - if (code == ZERO_EXTEND || code == SIGN_EXTEND) - { - if (!target) - target = gen_reg_rtx (GET_MODE (value)); - convert_move (target, force_operand (XEXP (value, 0), NULL), - code == ZERO_EXTEND); - return target; - } - if (ARITHMETIC_P (value)) { op2 = XEXP (value, 1); @@ -5867,8 +5876,30 @@ force_operand (rtx value, rtx target) } if (UNARY_P (value)) { + if (!target) + target = gen_reg_rtx (GET_MODE (value)); op1 = force_operand (XEXP (value, 0), NULL_RTX); - return expand_simple_unop (GET_MODE (value), code, op1, target, 0); + switch (code) + { + case ZERO_EXTEND: + case SIGN_EXTEND: + case TRUNCATE: + convert_move (target, op1, code == ZERO_EXTEND); + return target; + + case FIX: + case UNSIGNED_FIX: + expand_fix (target, op1, code == UNSIGNED_FIX); + return target; + + case FLOAT: + case UNSIGNED_FLOAT: + expand_float (target, op1, code == UNSIGNED_FLOAT); + return target; + + default: + return expand_simple_unop (GET_MODE (value), code, op1, target, 0); + } } #ifdef INSN_SCHEDULING @@ -7855,7 +7886,7 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode, TREE_OPERAND (subexp1, 0), NULL_RTX, &op1, &op0, 0); - goto binop2; + goto binop3; } } } @@ -8065,7 +8096,7 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode, else comparison_code = unsignedp ? LEU : LE; - /* Canonicalize to comparsions against 0. */ + /* Canonicalize to comparisons against 0. */ if (op1 == const1_rtx) { /* Converting (a >= 1 ? a : 1) into (a > 0 ? a : 1) diff --git a/gcc/final.c b/gcc/final.c index ed1327dc0a4..b25876af619 100644 --- a/gcc/final.c +++ b/gcc/final.c @@ -114,12 +114,6 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA #define JUMP_TABLES_IN_TEXT_SECTION 0 #endif -#if defined(READONLY_DATA_SECTION) || defined(READONLY_DATA_SECTION_ASM_OP) -#define HAVE_READONLY_DATA_SECTION 1 -#else -#define HAVE_READONLY_DATA_SECTION 0 -#endif - /* Bitflags used by final_scan_insn. */ #define SEEN_BB 1 #define SEEN_NOTE 2 @@ -682,7 +676,10 @@ insn_current_reference_address (rtx branch) } #endif /* HAVE_ATTR_length */ -void +/* Compute branch alignments based on frequency information in the + CFG. */ + +static void compute_alignments (void) { int log, max_skip, max_log; @@ -887,7 +884,8 @@ shorten_branches (rtx first ATTRIBUTE_UNUSED) next = next_nonnote_insn (insn); /* ADDR_VECs only take room if read-only data goes into the text section. */ - if (JUMP_TABLES_IN_TEXT_SECTION || !HAVE_READONLY_DATA_SECTION) + if (JUMP_TABLES_IN_TEXT_SECTION + || readonly_data_section == text_section) if (next && JUMP_P (next)) { rtx nextbody = PATTERN (next); @@ -1050,7 +1048,8 @@ shorten_branches (rtx first ATTRIBUTE_UNUSED) { /* This only takes room if read-only data goes into the text section. */ - if (JUMP_TABLES_IN_TEXT_SECTION || !HAVE_READONLY_DATA_SECTION) + if (JUMP_TABLES_IN_TEXT_SECTION + || readonly_data_section == text_section) insn_lengths[uid] = (XVECLEN (body, GET_CODE (body) == ADDR_DIFF_VEC) * GET_MODE_SIZE (GET_MODE (body))); @@ -1251,7 +1250,8 @@ shorten_branches (rtx first ATTRIBUTE_UNUSED) PUT_MODE (body, CASE_VECTOR_SHORTEN_MODE (min_addr - rel_addr, max_addr - rel_addr, body)); - if (JUMP_TABLES_IN_TEXT_SECTION || !HAVE_READONLY_DATA_SECTION) + if (JUMP_TABLES_IN_TEXT_SECTION + || readonly_data_section == text_section) { insn_lengths[uid] = (XVECLEN (body, 1) * GET_MODE_SIZE (GET_MODE (body))); @@ -1468,13 +1468,13 @@ profile_function (FILE *file ATTRIBUTE_UNUSED) if (! NO_PROFILE_COUNTERS) { int align = MIN (BIGGEST_ALIGNMENT, LONG_TYPE_SIZE); - data_section (); + switch_to_section (data_section); ASM_OUTPUT_ALIGN (file, floor_log2 (align / BITS_PER_UNIT)); targetm.asm_out.internal_label (file, "LP", current_function_funcdef_no); assemble_integer (const0_rtx, LONG_TYPE_SIZE / BITS_PER_UNIT, align, 1); } - current_function_section (current_function_decl); + switch_to_section (current_function_section ()); #if defined(ASM_OUTPUT_REG_PUSH) if (sval && svrtx != NULL_RTX && REG_P (svrtx)) @@ -1711,22 +1711,9 @@ final_scan_insn (rtx insn, FILE *file, int optimize ATTRIBUTE_UNUSED, break; case NOTE_INSN_SWITCH_TEXT_SECTIONS: - - /* The presence of this note indicates that this basic block - belongs in the "cold" section of the .o file. If we are - not already writing to the cold section we need to change - to it. */ - - if (last_text_section == in_text) - { - (*debug_hooks->switch_text_section) (); - unlikely_text_section (); - } - else - { - (*debug_hooks->switch_text_section) (); - text_section (); - } + in_cold_section_p = !in_cold_section_p; + (*debug_hooks->switch_text_section) (); + switch_to_section (current_function_section ()); break; case NOTE_INSN_BASIC_BLOCK: @@ -1939,7 +1926,8 @@ final_scan_insn (rtx insn, FILE *file, int optimize ATTRIBUTE_UNUSED, { int log_align; - targetm.asm_out.function_rodata_section (current_function_decl); + switch_to_section (targetm.asm_out.function_rodata_section + (current_function_decl)); #ifdef ADDR_VEC_ALIGN log_align = ADDR_VEC_ALIGN (next); @@ -1949,7 +1937,7 @@ final_scan_insn (rtx insn, FILE *file, int optimize ATTRIBUTE_UNUSED, ASM_OUTPUT_ALIGN (file, log_align); } else - current_function_section (current_function_decl); + switch_to_section (current_function_section ()); #ifdef ASM_OUTPUT_CASE_LABEL ASM_OUTPUT_CASE_LABEL (file, "L", CODE_LABEL_NUMBER (insn), @@ -2006,9 +1994,10 @@ final_scan_insn (rtx insn, FILE *file, int optimize ATTRIBUTE_UNUSED, #endif if (! JUMP_TABLES_IN_TEXT_SECTION) - targetm.asm_out.function_rodata_section (current_function_decl); + switch_to_section (targetm.asm_out.function_rodata_section + (current_function_decl)); else - current_function_section (current_function_decl); + switch_to_section (current_function_section ()); if (app_on) { @@ -2066,7 +2055,7 @@ final_scan_insn (rtx insn, FILE *file, int optimize ATTRIBUTE_UNUSED, #endif #endif - current_function_section (current_function_decl); + switch_to_section (current_function_section ()); break; } diff --git a/gcc/flow.c b/gcc/flow.c index bdb40323b02..ca2f1e14f6b 100644 --- a/gcc/flow.c +++ b/gcc/flow.c @@ -643,7 +643,8 @@ update_life_info (sbitmap blocks, enum update_life_extent extent, /* If asked, remove notes from the blocks we'll update. */ if (extent == UPDATE_LIFE_GLOBAL_RM_NOTES) - count_or_remove_death_notes (blocks, 1); + count_or_remove_death_notes (blocks, + prop_flags & PROP_POST_REGSTACK ? -1 : 1); } /* Clear log links in case we are asked to (re)compute them. */ @@ -657,12 +658,16 @@ update_life_info (sbitmap blocks, enum update_life_extent extent, EXECUTE_IF_SET_IN_SBITMAP (blocks, 0, i, sbi) { bb = BASIC_BLOCK (i); - - COPY_REG_SET (tmp, bb->il.rtl->global_live_at_end); - propagate_block (bb, tmp, NULL, NULL, stabilized_prop_flags); - - if (extent == UPDATE_LIFE_LOCAL) - verify_local_live_at_start (tmp, bb); + if (bb) + { + /* The bitmap may be flawed in that one of the basic + blocks may have been deleted before you get here. */ + COPY_REG_SET (tmp, bb->il.rtl->global_live_at_end); + propagate_block (bb, tmp, NULL, NULL, stabilized_prop_flags); + + if (extent == UPDATE_LIFE_LOCAL) + verify_local_live_at_start (tmp, bb); + } }; } else @@ -1053,17 +1058,14 @@ calculate_global_regs_live (sbitmap blocks_in, sbitmap blocks_out, int flags) SET_REGNO_REG_SET (invalidated_by_call, i); /* Allocate space for the sets of local properties. */ - local_sets = xcalloc (last_basic_block - (INVALID_BLOCK + 1), - sizeof (regset)); - cond_local_sets = xcalloc (last_basic_block - (INVALID_BLOCK + 1), - sizeof (regset)); - - /* Create a worklist. Allocate an extra slot for ENTRY_BLOCK, and one - because the `head == tail' style test for an empty queue doesn't - work with a full queue. */ - queue = xmalloc ((n_basic_blocks - (INVALID_BLOCK + 1)) * sizeof (*queue)); + local_sets = xcalloc (last_basic_block, sizeof (regset)); + cond_local_sets = xcalloc (last_basic_block, sizeof (regset)); + + /* Create a worklist. Allocate an extra slot for the `head == tail' + style test for an empty queue doesn't work with a full queue. */ + queue = xmalloc ((n_basic_blocks + 1) * sizeof (*queue)); qtail = queue; - qhead = qend = queue + n_basic_blocks - (INVALID_BLOCK + 1); + qhead = qend = queue + n_basic_blocks; /* Queue the blocks set in the initial mask. Do this in reverse block number order so that we are more likely for the first round to do @@ -1244,12 +1246,10 @@ calculate_global_regs_live (sbitmap blocks_in, sbitmap blocks_out, int flags) basic block. On subsequent passes, we get to skip out early if live_at_end wouldn't have changed. */ - if (local_sets[bb->index - (INVALID_BLOCK + 1)] == NULL) + if (local_sets[bb->index] == NULL) { - local_sets[bb->index - (INVALID_BLOCK + 1)] - = ALLOC_REG_SET (®_obstack); - cond_local_sets[bb->index - (INVALID_BLOCK + 1)] - = ALLOC_REG_SET (®_obstack); + local_sets[bb->index] = ALLOC_REG_SET (®_obstack); + cond_local_sets[bb->index] = ALLOC_REG_SET (®_obstack); rescan = 1; } else @@ -1273,7 +1273,7 @@ calculate_global_regs_live (sbitmap blocks_in, sbitmap blocks_out, int flags) successor block. We can miss changes in those sets if we only compare the new live_at_end against the previous one. */ - cond_local_set = cond_local_sets[bb->index - (INVALID_BLOCK + 1)]; + cond_local_set = cond_local_sets[bb->index]; rescan = bitmap_intersect_p (new_live_at_end, cond_local_set); } @@ -1289,7 +1289,7 @@ calculate_global_regs_live (sbitmap blocks_in, sbitmap blocks_out, int flags) /* If any of the changed bits overlap with local_sets[bb], we'll have to rescan the block. */ - local_set = local_sets[bb->index - (INVALID_BLOCK + 1)]; + local_set = local_sets[bb->index]; rescan = bitmap_intersect_p (tmp, local_set); } } @@ -1318,8 +1318,8 @@ calculate_global_regs_live (sbitmap blocks_in, sbitmap blocks_out, int flags) /* Rescan the block insn by insn to turn (a copy of) live_at_end into live_at_start. */ propagate_block (bb, new_live_at_end, - local_sets[bb->index - (INVALID_BLOCK + 1)], - cond_local_sets[bb->index - (INVALID_BLOCK + 1)], + local_sets[bb->index], + cond_local_sets[bb->index], flags); /* If live_at start didn't change, no need to go farther. */ @@ -1365,11 +1365,11 @@ calculate_global_regs_live (sbitmap blocks_in, sbitmap blocks_out, int flags) SET_BIT (blocks_out, pbb->index); /* Makes sure to really rescan the block. */ - if (local_sets[pbb->index - (INVALID_BLOCK + 1)]) + if (local_sets[pbb->index]) { - FREE_REG_SET (local_sets[pbb->index - (INVALID_BLOCK + 1)]); - FREE_REG_SET (cond_local_sets[pbb->index - (INVALID_BLOCK + 1)]); - local_sets[pbb->index - (INVALID_BLOCK + 1)] = 0; + FREE_REG_SET (local_sets[pbb->index]); + FREE_REG_SET (cond_local_sets[pbb->index]); + local_sets[pbb->index] = 0; } /* Add it to the queue. */ @@ -1415,16 +1415,16 @@ calculate_global_regs_live (sbitmap blocks_in, sbitmap blocks_out, int flags) EXECUTE_IF_SET_IN_SBITMAP (blocks_out, 0, i, sbi) { basic_block bb = BASIC_BLOCK (i); - FREE_REG_SET (local_sets[bb->index - (INVALID_BLOCK + 1)]); - FREE_REG_SET (cond_local_sets[bb->index - (INVALID_BLOCK + 1)]); + FREE_REG_SET (local_sets[bb->index]); + FREE_REG_SET (cond_local_sets[bb->index]); }; } else { FOR_EACH_BB (bb) { - FREE_REG_SET (local_sets[bb->index - (INVALID_BLOCK + 1)]); - FREE_REG_SET (cond_local_sets[bb->index - (INVALID_BLOCK + 1)]); + FREE_REG_SET (local_sets[bb->index]); + FREE_REG_SET (cond_local_sets[bb->index]); } } @@ -2471,7 +2471,7 @@ libcall_dead_p (struct propagate_block_info *pbi, rtx note, rtx insn) int regno_clobbered_at_setjmp (int regno) { - if (n_basic_blocks == 0) + if (n_basic_blocks == NUM_FIXED_BLOCKS) return 0; return ((REG_N_SETS (regno) > 1 @@ -2926,7 +2926,13 @@ mark_set_1 (struct propagate_block_info *pbi, enum rtx_code code, rtx reg, rtx c if (flags & PROP_REG_INFO) REG_N_DEATHS (regno_first) += 1; - if (flags & PROP_DEATH_NOTES) + if (flags & PROP_DEATH_NOTES +#ifdef STACK_REGS + && (!(flags & PROP_POST_REGSTACK) + || !IN_RANGE (REGNO (reg), FIRST_STACK_REG, + LAST_STACK_REG)) +#endif + ) { /* Note that dead stores have already been deleted when possible. If we get here, we have found a @@ -2939,7 +2945,13 @@ mark_set_1 (struct propagate_block_info *pbi, enum rtx_code code, rtx reg, rtx c } else { - if (flags & PROP_DEATH_NOTES) + if (flags & PROP_DEATH_NOTES +#ifdef STACK_REGS + && (!(flags & PROP_POST_REGSTACK) + || !IN_RANGE (REGNO (reg), FIRST_STACK_REG, + LAST_STACK_REG)) +#endif + ) { /* This is a case where we have a multi-word hard register and some, but not all, of the words of the register are @@ -2998,7 +3010,12 @@ mark_set_1 (struct propagate_block_info *pbi, enum rtx_code code, rtx reg, rtx c here and count it. */ else if (GET_CODE (reg) == SCRATCH) { - if (flags & PROP_DEATH_NOTES) + if (flags & PROP_DEATH_NOTES +#ifdef STACK_REGS + && (!(flags & PROP_POST_REGSTACK) + || !IN_RANGE (REGNO (reg), FIRST_STACK_REG, LAST_STACK_REG)) +#endif + ) REG_NOTES (insn) = alloc_EXPR_LIST (REG_UNUSED, reg, REG_NOTES (insn)); } @@ -3764,6 +3781,10 @@ mark_used_reg (struct propagate_block_info *pbi, rtx reg, if (! some_was_live) { if ((pbi->flags & PROP_DEATH_NOTES) +#ifdef STACK_REGS + && (!(pbi->flags & PROP_POST_REGSTACK) + || !IN_RANGE (REGNO (reg), FIRST_STACK_REG, LAST_STACK_REG)) +#endif && ! find_regno_note (insn, REG_DEAD, regno_first)) REG_NOTES (insn) = alloc_EXPR_LIST (REG_DEAD, reg, REG_NOTES (insn)); @@ -3857,6 +3878,92 @@ mark_used_reg (struct propagate_block_info *pbi, rtx reg, } } +/* Scan expression X for registers which have to be marked used in PBI. + X is considered to be the SET_DEST rtx of SET. TRUE is returned if + X could be handled by this function. */ + +static bool +mark_used_dest_regs (struct propagate_block_info *pbi, rtx x, rtx cond, rtx insn) +{ + int regno; + bool mark_dest = false; + rtx dest = x; + + /* On some platforms calls return values spread over several + locations. These locations are wrapped in a EXPR_LIST rtx + together with a CONST_INT offset. */ + if (GET_CODE (x) == EXPR_LIST + && GET_CODE (XEXP (x, 1)) == CONST_INT) + x = XEXP (x, 0); + + if (x == NULL_RTX) + return false; + + /* If storing into MEM, don't show it as being used. But do + show the address as being used. */ + if (MEM_P (x)) + { +#ifdef AUTO_INC_DEC + if (pbi->flags & PROP_AUTOINC) + find_auto_inc (pbi, x, insn); +#endif + mark_used_regs (pbi, XEXP (x, 0), cond, insn); + return true; + } + + /* Storing in STRICT_LOW_PART is like storing in a reg + in that this SET might be dead, so ignore it in TESTREG. + but in some other ways it is like using the reg. + + Storing in a SUBREG or a bit field is like storing the entire + register in that if the register's value is not used + then this SET is not needed. */ + while (GET_CODE (x) == STRICT_LOW_PART + || GET_CODE (x) == ZERO_EXTRACT + || GET_CODE (x) == SUBREG) + { +#ifdef CANNOT_CHANGE_MODE_CLASS + if ((pbi->flags & PROP_REG_INFO) && GET_CODE (x) == SUBREG) + record_subregs_of_mode (x); +#endif + + /* Modifying a single register in an alternate mode + does not use any of the old value. But these other + ways of storing in a register do use the old value. */ + if (GET_CODE (x) == SUBREG + && !((REG_BYTES (SUBREG_REG (x)) + + UNITS_PER_WORD - 1) / UNITS_PER_WORD + > (REG_BYTES (x) + + UNITS_PER_WORD - 1) / UNITS_PER_WORD)) + ; + else + mark_dest = true; + + x = XEXP (x, 0); + } + + /* If this is a store into a register or group of registers, + recursively scan the value being stored. */ + if (REG_P (x) + && (regno = REGNO (x), + !(regno == FRAME_POINTER_REGNUM + && (!reload_completed || frame_pointer_needed))) +#if FRAME_POINTER_REGNUM != HARD_FRAME_POINTER_REGNUM + && !(regno == HARD_FRAME_POINTER_REGNUM + && (!reload_completed || frame_pointer_needed)) +#endif +#if FRAME_POINTER_REGNUM != ARG_POINTER_REGNUM + && !(regno == ARG_POINTER_REGNUM && fixed_regs[regno]) +#endif + ) + { + if (mark_dest) + mark_used_regs (pbi, dest, cond, insn); + return true; + } + return false; +} + /* Scan expression X and store a 1-bit in NEW_LIVE for each reg it uses. This is done assuming the registers needed from X are those that have 1-bits in PBI->REG_LIVE. @@ -3868,7 +3975,6 @@ static void mark_used_regs (struct propagate_block_info *pbi, rtx x, rtx cond, rtx insn) { RTX_CODE code; - int regno; int flags = pbi->flags; retry: @@ -3969,73 +4075,18 @@ mark_used_regs (struct propagate_block_info *pbi, rtx x, rtx cond, rtx insn) case SET: { - rtx testreg = SET_DEST (x); - int mark_dest = 0; - - /* If storing into MEM, don't show it as being used. But do - show the address as being used. */ - if (MEM_P (testreg)) - { -#ifdef AUTO_INC_DEC - if (flags & PROP_AUTOINC) - find_auto_inc (pbi, testreg, insn); -#endif - mark_used_regs (pbi, XEXP (testreg, 0), cond, insn); - mark_used_regs (pbi, SET_SRC (x), cond, insn); - return; - } - - /* Storing in STRICT_LOW_PART is like storing in a reg - in that this SET might be dead, so ignore it in TESTREG. - but in some other ways it is like using the reg. - - Storing in a SUBREG or a bit field is like storing the entire - register in that if the register's value is not used - then this SET is not needed. */ - while (GET_CODE (testreg) == STRICT_LOW_PART - || GET_CODE (testreg) == ZERO_EXTRACT - || GET_CODE (testreg) == SUBREG) - { -#ifdef CANNOT_CHANGE_MODE_CLASS - if ((flags & PROP_REG_INFO) && GET_CODE (testreg) == SUBREG) - record_subregs_of_mode (testreg); -#endif - - /* Modifying a single register in an alternate mode - does not use any of the old value. But these other - ways of storing in a register do use the old value. */ - if (GET_CODE (testreg) == SUBREG - && !((REG_BYTES (SUBREG_REG (testreg)) - + UNITS_PER_WORD - 1) / UNITS_PER_WORD - > (REG_BYTES (testreg) - + UNITS_PER_WORD - 1) / UNITS_PER_WORD)) - ; - else - mark_dest = 1; - - testreg = XEXP (testreg, 0); - } - - /* If this is a store into a register or group of registers, - recursively scan the value being stored. */ - - if ((GET_CODE (testreg) == PARALLEL - && GET_MODE (testreg) == BLKmode) - || (REG_P (testreg) - && (regno = REGNO (testreg), - ! (regno == FRAME_POINTER_REGNUM - && (! reload_completed || frame_pointer_needed))) -#if FRAME_POINTER_REGNUM != HARD_FRAME_POINTER_REGNUM - && ! (regno == HARD_FRAME_POINTER_REGNUM - && (! reload_completed || frame_pointer_needed)) -#endif -#if FRAME_POINTER_REGNUM != ARG_POINTER_REGNUM - && ! (regno == ARG_POINTER_REGNUM && fixed_regs[regno]) -#endif - )) + rtx dest = SET_DEST (x); + int i; + bool ret = false; + + if (GET_CODE (dest) == PARALLEL) + for (i = 0; i < XVECLEN (dest, 0); i++) + ret |= mark_used_dest_regs (pbi, XVECEXP (dest, 0, i), cond, insn); + else + ret = mark_used_dest_regs (pbi, dest, cond, insn); + + if (ret) { - if (mark_dest) - mark_used_regs (pbi, SET_DEST (x), cond, insn); mark_used_regs (pbi, SET_SRC (x), cond, insn); return; } @@ -4385,7 +4436,9 @@ struct tree_opt_pass pass_recompute_reg_usage = /* Optionally removes all the REG_DEAD and REG_UNUSED notes from a set of blocks. If BLOCKS is NULL, assume the universal set. Returns a count - of the number of registers that died. */ + of the number of registers that died. + If KILL is 1, remove old REG_DEAD / REG_UNUSED notes. If it is 0, don't. + if it is -1, remove them unless they pertain to a stack reg. */ int count_or_remove_death_notes (sbitmap blocks, int kill) @@ -4407,7 +4460,11 @@ count_or_remove_death_notes (sbitmap blocks, int kill) EXECUTE_IF_SET_IN_SBITMAP (blocks, 0, i, sbi) { - count += count_or_remove_death_notes_bb (BASIC_BLOCK (i), kill); + basic_block bb = BASIC_BLOCK (i); + /* The bitmap may be flawed in that one of the basic blocks + may have been deleted before you get here. */ + if (bb) + count += count_or_remove_death_notes_bb (bb, kill); }; } else @@ -4457,7 +4514,14 @@ count_or_remove_death_notes_bb (basic_block bb, int kill) /* Fall through. */ case REG_UNUSED: - if (kill) + if (kill > 0 + || (kill +#ifdef STACK_REGS + && (!REG_P (XEXP (link, 0)) + || !IN_RANGE (REGNO (XEXP (link, 0)), + FIRST_STACK_REG, LAST_STACK_REG)) +#endif + )) { rtx next = XEXP (link, 1); free_EXPR_LIST_node (link); diff --git a/gcc/fold-const.c b/gcc/fold-const.c index ce71d3a085f..7c4443079d4 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -857,26 +857,23 @@ div_if_zero_remainder (enum tree_code code, tree arg1, tree arg2) return build_int_cst_wide (type, quol, quoh); } -/* Return true if built-in mathematical function specified by CODE - preserves the sign of it argument, i.e. -f(x) == f(-x). */ +/* Return true if the built-in mathematical function specified by CODE + is odd, i.e. -f(x) == f(-x). */ static bool negate_mathfn_p (enum built_in_function code) { switch (code) { - case BUILT_IN_ASIN: - case BUILT_IN_ASINF: - case BUILT_IN_ASINL: - case BUILT_IN_ATAN: - case BUILT_IN_ATANF: - case BUILT_IN_ATANL: - case BUILT_IN_SIN: - case BUILT_IN_SINF: - case BUILT_IN_SINL: - case BUILT_IN_TAN: - case BUILT_IN_TANF: - case BUILT_IN_TANL: + CASE_FLT_FN (BUILT_IN_ASIN): + CASE_FLT_FN (BUILT_IN_ASINH): + CASE_FLT_FN (BUILT_IN_ATAN): + CASE_FLT_FN (BUILT_IN_ATANH): + CASE_FLT_FN (BUILT_IN_CBRT): + CASE_FLT_FN (BUILT_IN_SIN): + CASE_FLT_FN (BUILT_IN_SINH): + CASE_FLT_FN (BUILT_IN_TAN): + CASE_FLT_FN (BUILT_IN_TANH): return true; default: @@ -938,6 +935,8 @@ negate_expr_p (tree t) /* Check that -CST will not overflow type. */ return may_negate_without_overflow_p (t); + case BIT_NOT_EXPR: + return INTEGRAL_TYPE_P (type); case REAL_CST: case NEGATE_EXPR: @@ -976,6 +975,16 @@ negate_expr_p (tree t) || negate_expr_p (TREE_OPERAND (t, 0)); break; + case TRUNC_DIV_EXPR: + case ROUND_DIV_EXPR: + case FLOOR_DIV_EXPR: + case CEIL_DIV_EXPR: + case EXACT_DIV_EXPR: + if (TYPE_UNSIGNED (TREE_TYPE (t)) || flag_wrapv) + break; + return negate_expr_p (TREE_OPERAND (t, 1)) + || negate_expr_p (TREE_OPERAND (t, 0)); + case NOP_EXPR: /* Negate -((double)float) as (double)(-float). */ if (TREE_CODE (type) == REAL_TYPE) @@ -1027,6 +1036,13 @@ negate_expr (tree t) switch (TREE_CODE (t)) { + /* Convert - (~A) to A + 1. */ + case BIT_NOT_EXPR: + if (INTEGRAL_TYPE_P (type)) + return fold_build2 (PLUS_EXPR, type, TREE_OPERAND (t, 0), + build_int_cst (type, 1)); + break; + case INTEGER_CST: tem = fold_negate_const (t, type); if (! TREE_OVERFLOW (tem) @@ -1117,6 +1133,28 @@ negate_expr (tree t) } break; + case TRUNC_DIV_EXPR: + case ROUND_DIV_EXPR: + case FLOOR_DIV_EXPR: + case CEIL_DIV_EXPR: + case EXACT_DIV_EXPR: + if (!TYPE_UNSIGNED (TREE_TYPE (t)) && !flag_wrapv) + { + tem = TREE_OPERAND (t, 1); + if (negate_expr_p (tem)) + return fold_convert (type, + fold_build2 (TREE_CODE (t), TREE_TYPE (t), + TREE_OPERAND (t, 0), + negate_expr (tem))); + tem = TREE_OPERAND (t, 0); + if (negate_expr_p (tem)) + return fold_convert (type, + fold_build2 (TREE_CODE (t), TREE_TYPE (t), + negate_expr (tem), + TREE_OPERAND (t, 1))); + } + break; + case NOP_EXPR: /* Convert -((double)float) into (double)(-float). */ if (TREE_CODE (type) == REAL_TYPE) @@ -1307,7 +1345,8 @@ associate_trees (tree t1, tree t2, enum tree_code code, tree type) } /* Combine two integer constants ARG1 and ARG2 under operation CODE - to produce a new constant. + to produce a new constant. Return NULL_TREE if we don't know how + to evaluate CODE at compile-time. If NOTRUNC is nonzero, do not truncate the result to fit the data type. */ @@ -1396,6 +1435,8 @@ int_const_binop (enum tree_code code, tree arg1, tree arg2, int notrunc) /* ... fall through ... */ case ROUND_DIV_EXPR: + if (int2h == 0 && int2l == 0) + return NULL_TREE; if (int2h == 0 && int2l == 1) { low = int1l, hi = int1h; @@ -1428,6 +1469,8 @@ int_const_binop (enum tree_code code, tree arg1, tree arg2, int notrunc) /* ... fall through ... */ case ROUND_MOD_EXPR: + if (int2h == 0 && int2l == 0) + return NULL_TREE; overflow = div_and_round_double (code, uns, int1l, int1h, int2l, int2h, &garbagel, &garbageh, &low, &hi); @@ -1452,7 +1495,7 @@ int_const_binop (enum tree_code code, tree arg1, tree arg2, int notrunc) break; default: - gcc_unreachable (); + return NULL_TREE; } t = build_int_cst_wide (TREE_TYPE (arg1), low, hi); @@ -1508,6 +1551,21 @@ const_binop (enum tree_code code, tree arg1, tree arg2, int notrunc) bool inexact; tree t, type; + /* The following codes are handled by real_arithmetic. */ + switch (code) + { + case PLUS_EXPR: + case MINUS_EXPR: + case MULT_EXPR: + case RDIV_EXPR: + case MIN_EXPR: + case MAX_EXPR: + break; + + default: + return NULL_TREE; + } + d1 = TREE_REAL_CST (arg1); d2 = TREE_REAL_CST (arg2); @@ -1567,6 +1625,7 @@ const_binop (enum tree_code code, tree arg1, tree arg2, int notrunc) | TREE_CONSTANT_OVERFLOW (arg2); return t; } + if (TREE_CODE (arg1) == COMPLEX_CST) { tree type = TREE_TYPE (arg1); @@ -1642,11 +1701,11 @@ const_binop (enum tree_code code, tree arg1, tree arg2, int notrunc) break; default: - gcc_unreachable (); + return NULL_TREE; } return t; } - return 0; + return NULL_TREE; } /* Create a size type INT_CST node with NUMBER sign extended. KIND @@ -1724,11 +1783,11 @@ size_diffop (tree arg0, tree arg1) overflow) and negate (which can't either). Special-case a result of zero while we're here. */ if (tree_int_cst_equal (arg0, arg1)) - return fold_convert (ctype, integer_zero_node); + return build_int_cst (ctype, 0); else if (tree_int_cst_lt (arg1, arg0)) return fold_convert (ctype, size_binop (MINUS_EXPR, arg0, arg1)); else - return size_binop (MINUS_EXPR, fold_convert (ctype, integer_zero_node), + return size_binop (MINUS_EXPR, build_int_cst (ctype, 0), fold_convert (ctype, size_binop (MINUS_EXPR, arg1, arg0))); } @@ -1979,8 +2038,7 @@ fold_convert (tree type, tree arg) return fold_build1 (FLOAT_EXPR, type, arg); case REAL_TYPE: - return fold_build1 (flag_float_store ? CONVERT_EXPR : NOP_EXPR, - type, arg); + return fold_build1 (NOP_EXPR, type, arg); case COMPLEX_TYPE: tem = fold_build1 (REALPART_EXPR, TREE_TYPE (orig), arg); @@ -2032,7 +2090,7 @@ fold_convert (tree type, tree arg) return fold_build1 (VIEW_CONVERT_EXPR, type, arg); case VOID_TYPE: - return fold_build1 (CONVERT_EXPR, type, fold_ignored_result (arg)); + return fold_build1 (NOP_EXPR, type, fold_ignored_result (arg)); default: gcc_unreachable (); @@ -2577,8 +2635,11 @@ operand_equal_p (tree arg0, tree arg1, unsigned int flags) && OP_SAME_WITH_NULL (3)); case COMPONENT_REF: - /* Handle operand 2 the same as for ARRAY_REF. */ - return OP_SAME (0) && OP_SAME (1) && OP_SAME_WITH_NULL (2); + /* Handle operand 2 the same as for ARRAY_REF. Operand 0 + may be NULL when we're called to compare MEM_EXPRs. */ + return OP_SAME_WITH_NULL (0) + && OP_SAME (1) + && OP_SAME_WITH_NULL (2); case BIT_FIELD_REF: return OP_SAME (0) && OP_SAME (1) && OP_SAME (2); @@ -3068,7 +3129,7 @@ invert_truthvalue (tree arg) if (!integer_onep (TREE_OPERAND (arg, 1))) break; return build2 (EQ_EXPR, type, arg, - fold_convert (type, integer_zero_node)); + build_int_cst (type, 0)); case SAVE_EXPR: return build1 (TRUTH_NOT_EXPR, type, arg); @@ -3346,7 +3407,7 @@ optimize_bit_field_compare (enum tree_code code, tree compare_type, if (lbitsize == 1 && ! integer_zerop (rhs)) { code = code == EQ_EXPR ? NE_EXPR : EQ_EXPR; - rhs = fold_convert (type, integer_zero_node); + rhs = build_int_cst (type, 0); } /* Make a new bitfield reference, shift the constant over the @@ -3683,7 +3744,7 @@ make_range (tree exp, int *pin_p, tree *plow, tree *phigh) the switch, which will "break" the while. */ in_p = 0; - low = high = fold_convert (TREE_TYPE (exp), integer_zero_node); + low = high = build_int_cst (TREE_TYPE (exp), 0); while (1) { @@ -3756,7 +3817,7 @@ make_range (tree exp, int *pin_p, tree *plow, tree *phigh) { if (! merge_ranges (&n_in_p, &n_low, &n_high, in_p, low, high, 1, - fold_convert (arg0_type, integer_zero_node), + build_int_cst (arg0_type, 0), NULL_TREE)) break; @@ -3770,7 +3831,7 @@ make_range (tree exp, int *pin_p, tree *plow, tree *phigh) in_p = ! in_p; high = range_binop (MINUS_EXPR, NULL_TREE, low, 0, integer_one_node, 0); - low = fold_convert (arg0_type, integer_zero_node); + low = build_int_cst (arg0_type, 0); } } @@ -3780,10 +3841,10 @@ make_range (tree exp, int *pin_p, tree *plow, tree *phigh) case NEGATE_EXPR: /* (-x) IN [a,b] -> x in [-b, -a] */ n_low = range_binop (MINUS_EXPR, exp_type, - fold_convert (exp_type, integer_zero_node), + build_int_cst (exp_type, 0), 0, high, 1); n_high = range_binop (MINUS_EXPR, exp_type, - fold_convert (exp_type, integer_zero_node), + build_int_cst (exp_type, 0), 0, low, 0); low = n_low, high = n_high; exp = arg0; @@ -3792,13 +3853,18 @@ make_range (tree exp, int *pin_p, tree *plow, tree *phigh) case BIT_NOT_EXPR: /* ~ X -> -X - 1 */ exp = build2 (MINUS_EXPR, exp_type, negate_expr (arg0), - fold_convert (exp_type, integer_one_node)); + build_int_cst (exp_type, 1)); continue; case PLUS_EXPR: case MINUS_EXPR: if (TREE_CODE (arg1) != INTEGER_CST) break; + /* If flag_wrapv and ARG0_TYPE is signed, then we cannot + move a constant to the other side. */ + if (flag_wrapv && !TYPE_UNSIGNED (arg0_type)) + break; + /* If EXP is signed, any overflow in the computation is undefined, so we don't worry about it so long as our computations on the bounds don't overflow. For unsigned, overflow is defined @@ -3967,7 +4033,7 @@ build_range_check (tree type, tree exp, int in_p, tree low, tree high) } if (low == 0 && high == 0) - return fold_convert (type, integer_one_node); + return build_int_cst (type, 1); if (low == 0) return fold_build2 (LE_EXPR, type, exp, @@ -4019,7 +4085,7 @@ build_range_check (tree type, tree exp, int in_p, tree low, tree high) exp = fold_convert (etype, exp); } return fold_build2 (GT_EXPR, type, exp, - fold_convert (etype, integer_zero_node)); + build_int_cst (etype, 0)); } } @@ -4377,7 +4443,7 @@ fold_cond_expr_with_comparison (tree type, tree arg0, tree arg1, tree arg2) if (comp_code == NE_EXPR) return pedantic_non_lvalue (fold_convert (type, arg1)); else if (comp_code == EQ_EXPR) - return fold_convert (type, integer_zero_node); + return build_int_cst (type, 0); } /* Try some transformations of A op B ? A : B. @@ -4734,14 +4800,14 @@ fold_truthop (enum tree_code code, tree truth_type, tree lhs, tree rhs) if (lcode == BIT_AND_EXPR && integer_onep (TREE_OPERAND (lhs, 1))) { lhs = build2 (NE_EXPR, truth_type, lhs, - fold_convert (TREE_TYPE (lhs), integer_zero_node)); + build_int_cst (TREE_TYPE (lhs), 0)); lcode = NE_EXPR; } if (rcode == BIT_AND_EXPR && integer_onep (TREE_OPERAND (rhs, 1))) { rhs = build2 (NE_EXPR, truth_type, rhs, - fold_convert (TREE_TYPE (rhs), integer_zero_node)); + build_int_cst (TREE_TYPE (rhs), 0)); rcode = NE_EXPR; } @@ -4800,7 +4866,7 @@ fold_truthop (enum tree_code code, tree truth_type, tree lhs, tree rhs) return build2 (NE_EXPR, truth_type, build2 (BIT_IOR_EXPR, TREE_TYPE (ll_arg), ll_arg, rl_arg), - fold_convert (TREE_TYPE (ll_arg), integer_zero_node)); + build_int_cst (TREE_TYPE (ll_arg), 0)); /* Convert (a == 0) && (b == 0) into (a | b) == 0. */ if (code == TRUTH_AND_EXPR @@ -4810,7 +4876,7 @@ fold_truthop (enum tree_code code, tree truth_type, tree lhs, tree rhs) return build2 (EQ_EXPR, truth_type, build2 (BIT_IOR_EXPR, TREE_TYPE (ll_arg), ll_arg, rl_arg), - fold_convert (TREE_TYPE (ll_arg), integer_zero_node)); + build_int_cst (TREE_TYPE (ll_arg), 0)); if (LOGICAL_OP_NON_SHORT_CIRCUIT) return build2 (code, truth_type, lhs, rhs); @@ -6098,7 +6164,7 @@ fold_single_bit_test_into_sign_test (enum tree_code code, tree arg0, tree arg1, tree stype = lang_hooks.types.signed_type (TREE_TYPE (arg00)); return fold_build2 (code == EQ_EXPR ? GE_EXPR : LT_EXPR, result_type, fold_convert (stype, arg00), - fold_convert (stype, integer_zero_node)); + build_int_cst (stype, 0)); } } @@ -6766,7 +6832,7 @@ fold_unary (enum tree_code code, tree type, tree op0) if (TREE_TYPE (op0) == type) return op0; - /* If we have (type) (a CMP b) and type is an integal type, return + /* If we have (type) (a CMP b) and type is an integral type, return new expression involving the new type. */ if (COMPARISON_CLASS_P (op0) && INTEGRAL_TYPE_P (type)) return fold_build2 (TREE_CODE (op0), type, TREE_OPERAND (op0, 0), @@ -6977,10 +7043,6 @@ fold_unary (enum tree_code code, tree type, tree op0) case NEGATE_EXPR: if (negate_expr_p (arg0)) return fold_convert (type, negate_expr (arg0)); - /* Convert - (~A) to A + 1. */ - if (INTEGRAL_TYPE_P (type) && TREE_CODE (arg0) == BIT_NOT_EXPR) - return fold_build2 (PLUS_EXPR, type, TREE_OPERAND (arg0, 0), - build_int_cst (type, 1)); return NULL_TREE; case ABS_EXPR: @@ -7127,80 +7189,57 @@ fold_binary (enum tree_code code, tree type, tree op0, tree op1) tree arg0 = NULL_TREE, arg1 = NULL_TREE; enum tree_code_class kind = TREE_CODE_CLASS (code); - /* WINS will be nonzero when the switch is done - if all operands are constant. */ - int wins = 1; - gcc_assert (IS_EXPR_CODE_CLASS (kind) - && TREE_CODE_LENGTH (code) == 2); + && TREE_CODE_LENGTH (code) == 2 + && op0 != NULL_TREE + && op1 != NULL_TREE); arg0 = op0; arg1 = op1; - if (arg0) - { - tree subop; - - /* Strip any conversions that don't change the mode. This is - safe for every expression, except for a comparison expression - because its signedness is derived from its operands. So, in - the latter case, only strip conversions that don't change the - signedness. - - Note that this is done as an internal manipulation within the - constant folder, in order to find the simplest representation - of the arguments so that their form can be studied. In any - cases, the appropriate type conversions should be put back in - the tree that will get out of the constant folder. */ - if (kind == tcc_comparison) - STRIP_SIGN_NOPS (arg0); - else - STRIP_NOPS (arg0); + /* Strip any conversions that don't change the mode. This is + safe for every expression, except for a comparison expression + because its signedness is derived from its operands. So, in + the latter case, only strip conversions that don't change the + signedness. - if (TREE_CODE (arg0) == COMPLEX_CST) - subop = TREE_REALPART (arg0); - else - subop = arg0; + Note that this is done as an internal manipulation within the + constant folder, in order to find the simplest representation + of the arguments so that their form can be studied. In any + cases, the appropriate type conversions should be put back in + the tree that will get out of the constant folder. */ - if (TREE_CODE (subop) != INTEGER_CST - && TREE_CODE (subop) != REAL_CST) - /* Note that TREE_CONSTANT isn't enough: - static var addresses are constant but we can't - do arithmetic on them. */ - wins = 0; + if (kind == tcc_comparison) + { + STRIP_SIGN_NOPS (arg0); + STRIP_SIGN_NOPS (arg1); } - - if (arg1) + else { - tree subop; - - /* Strip any conversions that don't change the mode. This is - safe for every expression, except for a comparison expression - because its signedness is derived from its operands. So, in - the latter case, only strip conversions that don't change the - signedness. - - Note that this is done as an internal manipulation within the - constant folder, in order to find the simplest representation - of the arguments so that their form can be studied. In any - cases, the appropriate type conversions should be put back in - the tree that will get out of the constant folder. */ - if (kind == tcc_comparison) - STRIP_SIGN_NOPS (arg1); - else - STRIP_NOPS (arg1); + STRIP_NOPS (arg0); + STRIP_NOPS (arg1); + } - if (TREE_CODE (arg1) == COMPLEX_CST) - subop = TREE_REALPART (arg1); + /* Note that TREE_CONSTANT isn't enough: static var addresses are + constant but we can't do arithmetic on them. */ + if ((TREE_CODE (arg0) == INTEGER_CST && TREE_CODE (arg1) == INTEGER_CST) + || (TREE_CODE (arg0) == REAL_CST && TREE_CODE (arg1) == REAL_CST) + || (TREE_CODE (arg0) == COMPLEX_CST && TREE_CODE (arg1) == COMPLEX_CST) + || (TREE_CODE (arg0) == VECTOR_CST && TREE_CODE (arg1) == VECTOR_CST)) + { + if (kind == tcc_binary) + tem = const_binop (code, arg0, arg1, 0); + else if (kind == tcc_comparison) + tem = fold_relational_const (code, type, arg0, arg1); else - subop = arg1; + tem = NULL_TREE; - if (TREE_CODE (subop) != INTEGER_CST - && TREE_CODE (subop) != REAL_CST) - /* Note that TREE_CONSTANT isn't enough: - static var addresses are constant but we can't - do arithmetic on them. */ - wins = 0; + if (tem != NULL_TREE) + { + if (TREE_TYPE (tem) != type) + tem = fold_convert (type, tem); + return tem; + } } /* If this is a commutative operation, and ARG0 is a constant, move it @@ -7209,9 +7248,7 @@ fold_binary (enum tree_code code, tree type, tree op0, tree op1) && tree_swap_operands_p (arg0, arg1, true)) return fold_build2 (code, type, op1, op0); - /* Now WINS is set as described above, - ARG0 is the first operand of EXPR, - and ARG1 is the second operand (if it has more than one operand). + /* ARG0 is the first operand of EXPR, and ARG1 is the second operand. First check for cases where an arithmetic operation is applied to a compound, conditional, or comparison operation. Push the arithmetic @@ -7533,8 +7570,7 @@ fold_binary (enum tree_code code, tree type, tree op0, tree op1) don't associate floats at all, unless the user has specified -funsafe-math-optimizations. */ - if (! wins - && (! FLOAT_TYPE_P (type) || flag_unsafe_math_optimizations)) + if (! FLOAT_TYPE_P (type) || flag_unsafe_math_optimizations) { tree var0, con0, lit0, minus_lit0; tree var1, con1, lit1, minus_lit1; @@ -7608,18 +7644,6 @@ fold_binary (enum tree_code code, tree type, tree op0, tree op1) } } - binary: - if (wins) - t1 = const_binop (code, arg0, arg1, 0); - if (t1 != NULL_TREE) - { - /* The return value should always have - the same type as the original expression. */ - if (TREE_TYPE (t1) != type) - t1 = fold_convert (type, t1); - - return t1; - } return NULL_TREE; case MINUS_EXPR: @@ -7647,7 +7671,7 @@ fold_binary (enum tree_code code, tree type, tree op0, tree op1) if (! FLOAT_TYPE_P (type)) { - if (! wins && integer_zerop (arg0)) + if (integer_zerop (arg0)) return negate_expr (fold_convert (type, arg1)); if (integer_zerop (arg1)) return non_lvalue (fold_convert (type, arg0)); @@ -7695,7 +7719,7 @@ fold_binary (enum tree_code code, tree type, tree op0, tree op1) /* (ARG0 - ARG1) is the same as (-ARG1 + ARG0). So check whether ARG0 is zero and X + ARG0 reduces to X, since that would mean (-ARG1 + ARG0) reduces to -ARG1. */ - else if (!wins && fold_real_zero_addition_p (TREE_TYPE (arg1), arg0, 0)) + else if (fold_real_zero_addition_p (TREE_TYPE (arg1), arg0, 0)) return negate_expr (fold_convert (type, arg1)); /* Fold &x - &x. This can happen from &x.foo - &x. @@ -7709,7 +7733,7 @@ fold_binary (enum tree_code code, tree type, tree op0, tree op1) return fold_convert (type, integer_zero_node); /* A - B -> A + (-B) if B is easily negatable. */ - if (!wins && negate_expr_p (arg1) + if (negate_expr_p (arg1) && ((FLOAT_TYPE_P (type) /* Avoid this transformation if B is a positive REAL_CST. */ && (TREE_CODE (arg1) != REAL_CST @@ -8312,36 +8336,6 @@ fold_binary (enum tree_code code, tree type, tree op0, tree op1) if (flag_unsafe_math_optimizations) { - enum built_in_function fcode = builtin_mathfn_code (arg1); - /* Optimize x/expN(y) into x*expN(-y). */ - if (BUILTIN_EXPONENT_P (fcode)) - { - tree expfn = TREE_OPERAND (TREE_OPERAND (arg1, 0), 0); - tree arg = negate_expr (TREE_VALUE (TREE_OPERAND (arg1, 1))); - tree arglist = build_tree_list (NULL_TREE, - fold_convert (type, arg)); - arg1 = build_function_call_expr (expfn, arglist); - return fold_build2 (MULT_EXPR, type, arg0, arg1); - } - - /* Optimize x/pow(y,z) into x*pow(y,-z). */ - if (fcode == BUILT_IN_POW - || fcode == BUILT_IN_POWF - || fcode == BUILT_IN_POWL) - { - tree powfn = TREE_OPERAND (TREE_OPERAND (arg1, 0), 0); - tree arg10 = TREE_VALUE (TREE_OPERAND (arg1, 1)); - tree arg11 = TREE_VALUE (TREE_CHAIN (TREE_OPERAND (arg1, 1))); - tree neg11 = fold_convert (type, negate_expr (arg11)); - tree arglist = tree_cons(NULL_TREE, arg10, - build_tree_list (NULL_TREE, neg11)); - arg1 = build_function_call_expr (powfn, arglist); - return fold_build2 (MULT_EXPR, type, arg0, arg1); - } - } - - if (flag_unsafe_math_optimizations) - { enum built_in_function fcode0 = builtin_mathfn_code (arg0); enum built_in_function fcode1 = builtin_mathfn_code (arg1); @@ -8377,6 +8371,53 @@ fold_binary (enum tree_code code, tree type, tree op0, tree op1) } } + /* Optimize sin(x)/tan(x) as cos(x) if we don't care about + NaNs or Infinities. */ + if (((fcode0 == BUILT_IN_SIN && fcode1 == BUILT_IN_TAN) + || (fcode0 == BUILT_IN_SINF && fcode1 == BUILT_IN_TANF) + || (fcode0 == BUILT_IN_SINL && fcode1 == BUILT_IN_TANL))) + { + tree arg00 = TREE_VALUE (TREE_OPERAND (arg0, 1)); + tree arg01 = TREE_VALUE (TREE_OPERAND (arg1, 1)); + + if (! HONOR_NANS (TYPE_MODE (TREE_TYPE (arg00))) + && ! HONOR_INFINITIES (TYPE_MODE (TREE_TYPE (arg00))) + && operand_equal_p (arg00, arg01, 0)) + { + tree cosfn = mathfn_built_in (type, BUILT_IN_COS); + + if (cosfn != NULL_TREE) + return build_function_call_expr (cosfn, + TREE_OPERAND (arg0, 1)); + } + } + + /* Optimize tan(x)/sin(x) as 1.0/cos(x) if we don't care about + NaNs or Infinities. */ + if (((fcode0 == BUILT_IN_TAN && fcode1 == BUILT_IN_SIN) + || (fcode0 == BUILT_IN_TANF && fcode1 == BUILT_IN_SINF) + || (fcode0 == BUILT_IN_TANL && fcode1 == BUILT_IN_SINL))) + { + tree arg00 = TREE_VALUE (TREE_OPERAND (arg0, 1)); + tree arg01 = TREE_VALUE (TREE_OPERAND (arg1, 1)); + + if (! HONOR_NANS (TYPE_MODE (TREE_TYPE (arg00))) + && ! HONOR_INFINITIES (TYPE_MODE (TREE_TYPE (arg00))) + && operand_equal_p (arg00, arg01, 0)) + { + tree cosfn = mathfn_built_in (type, BUILT_IN_COS); + + if (cosfn != NULL_TREE) + { + tree tmp = TREE_OPERAND (arg0, 1); + tmp = build_function_call_expr (cosfn, tmp); + return fold_build2 (RDIV_EXPR, type, + build_real (type, dconst1), + tmp); + } + } + } + /* Optimize pow(x,c)/x as pow(x,c-1). */ if (fcode0 == BUILT_IN_POW || fcode0 == BUILT_IN_POWF @@ -8400,8 +8441,34 @@ fold_binary (enum tree_code code, tree type, tree op0, tree op1) return build_function_call_expr (powfn, arglist); } } + + /* Optimize x/expN(y) into x*expN(-y). */ + if (BUILTIN_EXPONENT_P (fcode1)) + { + tree expfn = TREE_OPERAND (TREE_OPERAND (arg1, 0), 0); + tree arg = negate_expr (TREE_VALUE (TREE_OPERAND (arg1, 1))); + tree arglist = build_tree_list (NULL_TREE, + fold_convert (type, arg)); + arg1 = build_function_call_expr (expfn, arglist); + return fold_build2 (MULT_EXPR, type, arg0, arg1); + } + + /* Optimize x/pow(y,z) into x*pow(y,-z). */ + if (fcode1 == BUILT_IN_POW + || fcode1 == BUILT_IN_POWF + || fcode1 == BUILT_IN_POWL) + { + tree powfn = TREE_OPERAND (TREE_OPERAND (arg1, 0), 0); + tree arg10 = TREE_VALUE (TREE_OPERAND (arg1, 1)); + tree arg11 = TREE_VALUE (TREE_CHAIN (TREE_OPERAND (arg1, 1))); + tree neg11 = fold_convert (type, negate_expr (arg11)); + tree arglist = tree_cons(NULL_TREE, arg10, + build_tree_list (NULL_TREE, neg11)); + arg1 = build_function_call_expr (powfn, arglist); + return fold_build2 (MULT_EXPR, type, arg0, arg1); + } } - goto binary; + return NULL_TREE; case TRUNC_DIV_EXPR: case ROUND_DIV_EXPR: @@ -8419,6 +8486,19 @@ fold_binary (enum tree_code code, tree type, tree op0, tree op1) && TREE_INT_CST_HIGH (arg1) == -1) return fold_convert (type, negate_expr (arg0)); + /* Convert -A / -B to A / B when the type is signed and overflow is + undefined. */ + if (!TYPE_UNSIGNED (type) && !flag_wrapv + && TREE_CODE (arg0) == NEGATE_EXPR + && negate_expr_p (arg1)) + return fold_build2 (code, type, TREE_OPERAND (arg0, 0), + negate_expr (arg1)); + if (!TYPE_UNSIGNED (type) && !flag_wrapv + && TREE_CODE (arg1) == NEGATE_EXPR + && negate_expr_p (arg0)) + return fold_build2 (code, type, negate_expr (arg0), + TREE_OPERAND (arg1, 0)); + /* If arg0 is a multiple of arg1, then rewrite to the fastest div operation, EXACT_DIV_EXPR. @@ -8433,7 +8513,7 @@ fold_binary (enum tree_code code, tree type, tree op0, tree op1) && 0 != (tem = extract_muldiv (op0, arg1, code, NULL_TREE))) return fold_convert (type, tem); - goto binary; + return NULL_TREE; case CEIL_MOD_EXPR: case FLOOR_MOD_EXPR: @@ -8513,7 +8593,7 @@ fold_binary (enum tree_code code, tree type, tree op0, tree op1) && 0 != (tem = extract_muldiv (op0, arg1, code, NULL_TREE))) return fold_convert (type, tem); - goto binary; + return NULL_TREE; case LROTATE_EXPR: case RROTATE_EXPR: @@ -8627,7 +8707,7 @@ fold_binary (enum tree_code code, tree type, tree op0, tree op1) == (unsigned int) GET_MODE_BITSIZE (TYPE_MODE (type)))) return TREE_OPERAND (arg0, 0); - goto binary; + return NULL_TREE; case MIN_EXPR: if (operand_equal_p (arg0, arg1, 0)) @@ -8833,6 +8913,13 @@ fold_binary (enum tree_code code, tree type, tree op0, tree op1) /* If one arg is a real or integer constant, put it last. */ if (tree_swap_operands_p (arg0, arg1, true)) return fold_build2 (swap_tree_comparison (code), type, op1, op0); + + /* ~a != C becomes a != ~C where C is a constant. Likewise for ==. */ + if (TREE_CODE (arg0) == BIT_NOT_EXPR && TREE_CODE (arg1) == INTEGER_CST + && (code == NE_EXPR || code == EQ_EXPR)) + return fold_build2 (code, type, TREE_OPERAND (arg0, 0), + fold_build1 (BIT_NOT_EXPR, TREE_TYPE (arg1), + arg1)); /* bool_var != 0 becomes bool_var. */ if (TREE_CODE (TREE_TYPE (arg0)) == BOOLEAN_TYPE && integer_zerop (arg1) @@ -8844,6 +8931,16 @@ fold_binary (enum tree_code code, tree type, tree op0, tree op1) && code == EQ_EXPR) return non_lvalue (fold_convert (type, arg0)); + /* bool_var != 1 becomes !bool_var. */ + if (TREE_CODE (TREE_TYPE (arg0)) == BOOLEAN_TYPE && integer_onep (arg1) + && code == NE_EXPR) + return fold_build1 (TRUTH_NOT_EXPR, type, arg0); + + /* bool_var == 0 becomes !bool_var. */ + if (TREE_CODE (TREE_TYPE (arg0)) == BOOLEAN_TYPE && integer_zerop (arg1) + && code == EQ_EXPR) + return fold_build1 (TRUTH_NOT_EXPR, type, arg0); + /* If this is an equality comparison of the address of a non-weak object against zero, then we know the result. */ if ((code == EQ_EXPR || code == NE_EXPR) @@ -9567,7 +9664,7 @@ fold_binary (enum tree_code code, tree type, tree op0, tree op1) return build2 (code == LT_EXPR ? EQ_EXPR : NE_EXPR, type, build2 (RSHIFT_EXPR, TREE_TYPE (arg0), arg0, TREE_OPERAND (arg1, 1)), - fold_convert (TREE_TYPE (arg0), integer_zero_node)); + build_int_cst (TREE_TYPE (arg0), 0)); else if ((code == LT_EXPR || code == GE_EXPR) && TYPE_UNSIGNED (TREE_TYPE (arg0)) @@ -9581,7 +9678,7 @@ fold_binary (enum tree_code code, tree type, tree op0, tree op1) build2 (RSHIFT_EXPR, TREE_TYPE (arg0), arg0, TREE_OPERAND (TREE_OPERAND (arg1, 0), 1))), - fold_convert (TREE_TYPE (arg0), integer_zero_node)); + build_int_cst (TREE_TYPE (arg0), 0)); /* Simplify comparison of something with itself. (For IEEE floating-point, we can only do some of these simplifications.) */ @@ -9881,7 +9978,10 @@ fold_binary (enum tree_code code, tree type, tree op0, tree op1) return pedantic_non_lvalue (tem); case COMPLEX_EXPR: - if (wins) + if ((TREE_CODE (arg0) == REAL_CST + && TREE_CODE (arg1) == REAL_CST) + || (TREE_CODE (arg0) == INTEGER_CST + && TREE_CODE (arg1) == INTEGER_CST)) return build_complex (type, arg0, arg1); return NULL_TREE; @@ -10395,13 +10495,16 @@ recursive_label: fold_checksum_tree (TREE_OPERAND (expr, i), ctx, ht); break; case tcc_declaration: - fold_checksum_tree (DECL_SIZE (expr), ctx, ht); - fold_checksum_tree (DECL_SIZE_UNIT (expr), ctx, ht); fold_checksum_tree (DECL_NAME (expr), ctx, ht); fold_checksum_tree (DECL_CONTEXT (expr), ctx, ht); - fold_checksum_tree (DECL_INITIAL (expr), ctx, ht); - fold_checksum_tree (DECL_ABSTRACT_ORIGIN (expr), ctx, ht); - fold_checksum_tree (DECL_ATTRIBUTES (expr), ctx, ht); + if (CODE_CONTAINS_STRUCT (TREE_CODE (expr), TS_DECL_COMMON)) + { + fold_checksum_tree (DECL_SIZE (expr), ctx, ht); + fold_checksum_tree (DECL_SIZE_UNIT (expr), ctx, ht); + fold_checksum_tree (DECL_INITIAL (expr), ctx, ht); + fold_checksum_tree (DECL_ABSTRACT_ORIGIN (expr), ctx, ht); + fold_checksum_tree (DECL_ATTRIBUTES (expr), ctx, ht); + } if (CODE_CONTAINS_STRUCT (TREE_CODE (expr), TS_DECL_WITH_VIS)) fold_checksum_tree (DECL_SECTION_NAME (expr), ctx, ht); @@ -10944,84 +11047,77 @@ tree_expr_nonnegative_p (tree t) if (fndecl && DECL_BUILT_IN_CLASS (fndecl) == BUILT_IN_NORMAL) switch (DECL_FUNCTION_CODE (fndecl)) { -#define CASE_BUILTIN_F(BUILT_IN_FN) \ - case BUILT_IN_FN: case BUILT_IN_FN##F: case BUILT_IN_FN##L: -#define CASE_BUILTIN_I(BUILT_IN_FN) \ - case BUILT_IN_FN: case BUILT_IN_FN##L: case BUILT_IN_FN##LL: - - CASE_BUILTIN_F (BUILT_IN_ACOS) - CASE_BUILTIN_F (BUILT_IN_ACOSH) - CASE_BUILTIN_F (BUILT_IN_CABS) - CASE_BUILTIN_F (BUILT_IN_COSH) - CASE_BUILTIN_F (BUILT_IN_ERFC) - CASE_BUILTIN_F (BUILT_IN_EXP) - CASE_BUILTIN_F (BUILT_IN_EXP10) - CASE_BUILTIN_F (BUILT_IN_EXP2) - CASE_BUILTIN_F (BUILT_IN_FABS) - CASE_BUILTIN_F (BUILT_IN_FDIM) - CASE_BUILTIN_F (BUILT_IN_HYPOT) - CASE_BUILTIN_F (BUILT_IN_POW10) - CASE_BUILTIN_I (BUILT_IN_FFS) - CASE_BUILTIN_I (BUILT_IN_PARITY) - CASE_BUILTIN_I (BUILT_IN_POPCOUNT) + CASE_FLT_FN (BUILT_IN_ACOS): + CASE_FLT_FN (BUILT_IN_ACOSH): + CASE_FLT_FN (BUILT_IN_CABS): + CASE_FLT_FN (BUILT_IN_COSH): + CASE_FLT_FN (BUILT_IN_ERFC): + CASE_FLT_FN (BUILT_IN_EXP): + CASE_FLT_FN (BUILT_IN_EXP10): + CASE_FLT_FN (BUILT_IN_EXP2): + CASE_FLT_FN (BUILT_IN_FABS): + CASE_FLT_FN (BUILT_IN_FDIM): + CASE_FLT_FN (BUILT_IN_HYPOT): + CASE_FLT_FN (BUILT_IN_POW10): + CASE_INT_FN (BUILT_IN_FFS): + CASE_INT_FN (BUILT_IN_PARITY): + CASE_INT_FN (BUILT_IN_POPCOUNT): /* Always true. */ return 1; - CASE_BUILTIN_F (BUILT_IN_SQRT) + CASE_FLT_FN (BUILT_IN_SQRT): /* sqrt(-0.0) is -0.0. */ if (!HONOR_SIGNED_ZEROS (TYPE_MODE (TREE_TYPE (t)))) return 1; return tree_expr_nonnegative_p (TREE_VALUE (arglist)); - CASE_BUILTIN_F (BUILT_IN_ASINH) - CASE_BUILTIN_F (BUILT_IN_ATAN) - CASE_BUILTIN_F (BUILT_IN_ATANH) - CASE_BUILTIN_F (BUILT_IN_CBRT) - CASE_BUILTIN_F (BUILT_IN_CEIL) - CASE_BUILTIN_F (BUILT_IN_ERF) - CASE_BUILTIN_F (BUILT_IN_EXPM1) - CASE_BUILTIN_F (BUILT_IN_FLOOR) - CASE_BUILTIN_F (BUILT_IN_FMOD) - CASE_BUILTIN_F (BUILT_IN_FREXP) - CASE_BUILTIN_F (BUILT_IN_LCEIL) - CASE_BUILTIN_F (BUILT_IN_LDEXP) - CASE_BUILTIN_F (BUILT_IN_LFLOOR) - CASE_BUILTIN_F (BUILT_IN_LLCEIL) - CASE_BUILTIN_F (BUILT_IN_LLFLOOR) - CASE_BUILTIN_F (BUILT_IN_LLRINT) - CASE_BUILTIN_F (BUILT_IN_LLROUND) - CASE_BUILTIN_F (BUILT_IN_LRINT) - CASE_BUILTIN_F (BUILT_IN_LROUND) - CASE_BUILTIN_F (BUILT_IN_MODF) - CASE_BUILTIN_F (BUILT_IN_NEARBYINT) - CASE_BUILTIN_F (BUILT_IN_POW) - CASE_BUILTIN_F (BUILT_IN_RINT) - CASE_BUILTIN_F (BUILT_IN_ROUND) - CASE_BUILTIN_F (BUILT_IN_SIGNBIT) - CASE_BUILTIN_F (BUILT_IN_SINH) - CASE_BUILTIN_F (BUILT_IN_TANH) - CASE_BUILTIN_F (BUILT_IN_TRUNC) + CASE_FLT_FN (BUILT_IN_ASINH): + CASE_FLT_FN (BUILT_IN_ATAN): + CASE_FLT_FN (BUILT_IN_ATANH): + CASE_FLT_FN (BUILT_IN_CBRT): + CASE_FLT_FN (BUILT_IN_CEIL): + CASE_FLT_FN (BUILT_IN_ERF): + CASE_FLT_FN (BUILT_IN_EXPM1): + CASE_FLT_FN (BUILT_IN_FLOOR): + CASE_FLT_FN (BUILT_IN_FMOD): + CASE_FLT_FN (BUILT_IN_FREXP): + CASE_FLT_FN (BUILT_IN_LCEIL): + CASE_FLT_FN (BUILT_IN_LDEXP): + CASE_FLT_FN (BUILT_IN_LFLOOR): + CASE_FLT_FN (BUILT_IN_LLCEIL): + CASE_FLT_FN (BUILT_IN_LLFLOOR): + CASE_FLT_FN (BUILT_IN_LLRINT): + CASE_FLT_FN (BUILT_IN_LLROUND): + CASE_FLT_FN (BUILT_IN_LRINT): + CASE_FLT_FN (BUILT_IN_LROUND): + CASE_FLT_FN (BUILT_IN_MODF): + CASE_FLT_FN (BUILT_IN_NEARBYINT): + CASE_FLT_FN (BUILT_IN_POW): + CASE_FLT_FN (BUILT_IN_RINT): + CASE_FLT_FN (BUILT_IN_ROUND): + CASE_FLT_FN (BUILT_IN_SIGNBIT): + CASE_FLT_FN (BUILT_IN_SINH): + CASE_FLT_FN (BUILT_IN_TANH): + CASE_FLT_FN (BUILT_IN_TRUNC): /* True if the 1st argument is nonnegative. */ return tree_expr_nonnegative_p (TREE_VALUE (arglist)); - CASE_BUILTIN_F (BUILT_IN_FMAX) + CASE_FLT_FN (BUILT_IN_FMAX): /* True if the 1st OR 2nd arguments are nonnegative. */ return tree_expr_nonnegative_p (TREE_VALUE (arglist)) || tree_expr_nonnegative_p (TREE_VALUE (TREE_CHAIN (arglist))); - CASE_BUILTIN_F (BUILT_IN_FMIN) + CASE_FLT_FN (BUILT_IN_FMIN): /* True if the 1st AND 2nd arguments are nonnegative. */ return tree_expr_nonnegative_p (TREE_VALUE (arglist)) && tree_expr_nonnegative_p (TREE_VALUE (TREE_CHAIN (arglist))); - CASE_BUILTIN_F (BUILT_IN_COPYSIGN) + CASE_FLT_FN (BUILT_IN_COPYSIGN): /* True if the 2nd argument is nonnegative. */ return tree_expr_nonnegative_p (TREE_VALUE (TREE_CHAIN (arglist))); default: break; -#undef CASE_BUILTIN_F -#undef CASE_BUILTIN_I } } diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog dissimilarity index 99% index 4a124d3b3ad..29a4c77ffb0 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,8745 +1,136 @@ -2005-11-21 Jakub Jelinek - - PR fortran/14943 - PR fortran/21647 - * Make-lang.in (fortran/trans-io.o): Depend on fortran/ioparm.def. - * dump-parse-tree.c (gfc_show_code_node): Dump c->block for - EXEC_{READ,WRITE,IOLENGTH} nodes. - * io.c (terminate_io, match_io, gfc_match_inquire): Put data - transfer commands into EXEC_{READ,WRITE,IOLENGTH}'s code->block. - * resolve.c (resolve_blocks): Handle EXEC_{READ,WRITE,IOLENGTH}. - * trans-io.c (ioparm_unit, ioparm_err, ioparm_end, ioparm_eor, - ioparm_list_format, ioparm_library_return, ioparm_iostat, - ioparm_exist, ioparm_opened, ioparm_number, ioparm_named, - ioparm_rec, ioparm_nextrec, ioparm_size, ioparm_recl_in, - ioparm_recl_out, ioparm_iolength, ioparm_file, ioparm_file_len, - ioparm_status, ioparm_status_len, ioparm_access, ioparm_access_len, - ioparm_form, ioparm_form_len, ioparm_blank, ioparm_blank_len, - ioparm_position, ioparm_position_len, ioparm_action, - ioparm_action_len, ioparm_delim, ioparm_delim_len, ioparm_pad, - ioparm_pad_len, ioparm_format, ioparm_format_len, ioparm_advance, - ioparm_advance_len, ioparm_name, ioparm_name_len, - ioparm_internal_unit, ioparm_internal_unit_len, - ioparm_internal_unit_desc, ioparm_sequential, ioparm_sequential_len, - ioparm_direct, ioparm_direct_len, ioparm_formatted, - ioparm_formatted_len, ioparm_unformatted, ioparm_unformatted_len, - ioparm_read, ioparm_read_len, ioparm_write, ioparm_write_len, - ioparm_readwrite, ioparm_readwrite_len, ioparm_namelist_name, - ioparm_namelist_name_len, ioparm_namelist_read_mode, ioparm_iomsg, - ioparm_iomsg_len, ioparm_var): Remove. - (enum ioparam_type, enum iofield_type, enum iofield, - enum iocall): New enums. - (gfc_st_parameter_field, gfc_st_parameter): New typedefs. - (st_parameter, st_parameter_field, iocall): New variables. - (ADD_FIELD, ADD_STRING): Remove. - (dt_parm, dt_post_end_block): New variables. - (gfc_build_st_parameter): New function. - (gfc_build_io_library_fndecls): Use it. Initialize iocall - array rather than ioparm_*, add extra first arguments to - the function types. - (set_parameter_const): New function. - (set_parameter_value): Add type argument, return a bitmask. - Changed to set a field in automatic structure variable rather - than set a field in a global _gfortran_ioparm variable. - (set_parameter_ref): Likewise. If requested var has different - size than what field should point to, call with a temporary and - then copy into the user variable. Add postblock argument. - (set_string): Remove var_len argument, add type argument, return - a bitmask. Changed to set fields in automatic structure variable - rather than set a field in a global _gfortran_ioparm variable. - (set_internal_unit): Remove iunit, iunit_len, iunit_desc arguments, - add var argument. Return a bitmask. Changed to set fields in - automatic structure variable rather than set a field in a global - _gfortran_ioparm variable. - (set_flag): Removed. - (io_result): Add var argument. Changed to read common.flags field - from automatic structure variable and bitwise AND it with 3. - (set_error_locus): Add var argument. Changed to set fields in - automatic structure variable rather than set a field in a global - _gfortran_{filename,line} variables. - (gfc_trans_open): Use gfc_start_block rather than gfc_init_block. - Create a temporary st_parameter_* structure. Adjust callers of - all above mentioned functions. Pass address of the temporary - variable as first argument to the generated function call. - Use iocall array rather than ioparm_* separate variables. - (gfc_trans_close, build_filepos, gfc_trans_inquire): Likewise. - (build_dt): Likewise. Change first argument to tree from tree *. - Don't dereference code->ext.dt if last_dt == INQUIRE. Emit - IOLENGTH argument setup here. Set dt_parm/dt_post_end_block - variables and gfc_trans_code the nested data transfer commands - in code->block. - (gfc_trans_iolength): Just set last_dt and call build_dt immediately. - (transfer_namelist_element): Pass address of dt_parm variable - to generated functions. Use iocall array rather than ioparm_* - separate variables. - (gfc_trans_backspace, gfc_trans_endfile, gfc_trans_rewind, - gfc_trans_flush, gfc_trans_read, gfc_trans_write): Use iocall array - rather than ioparm_* separate variables. - (gfc_trans_dt_end): Likewise. Pass address of dt_parm variable - as first argument to generated function. Adjust io_result caller. - Prepend dt_post_end_block before io_result code. - (transfer_expr): Use iocall array rather than ioparm_* separate - variables. Pass address of dt_parm variables as first argument - to generated functions. - * ioparm.def: New file. - -2005-11-21 Paul Thomas - - PR fortran/24223 - * resolve.c (resolve_contained_fntype) Error if an internal - function is assumed character length. - - PR fortran/24705 - * trans-decl.c (gfc_create_module_variable) Skip ICE in - when backend decl has been built and the symbol is marked - as being in an equivalence statement. - -2005-11-20 Toon Moene - - * invoke.texi: Remove superfluous @item. - -2005-11-19 Janne Blomqvist - - PR fortran/24862 - * trans-io.c (gfc_trans_transfer): Handle arrays of derived type. - -2005-11-17 Francois-Xavier Coudert - - PR fortran/20811 - * scanner.c (gfc_open_included_file): Add an extra include_cwd - argument. Only include files in the current working directory if - its value is true. - * gfortran.h: Change prototype for gfc_open_included_file. - (load_file): Don't search for include files in the current working - directory. - * options.c (gfc_post_options): Add the directory of the source file - to the list of paths for included files. - * module.c (gfc_use_module): Look for module files in the current - directory. - -2005-11-16 Alan Modra - - PR fortran/24096 - * trans-types.c (gfc_init_kinds): Use one less for max_exponent - of IBM extended double format. - -2005-11-13 Francois-Xavier Coudert - - * intrinsic.c (add_functions): Add COMPLEX, FTELL, FGETC, FGET, - FPUTC, FPUT, AND, XOR and OR intrinsic functions. - (add_subroutines): Add FGETC, FGET, FPUTC, FPUT and FTELL intrinsic - subroutines. - * gfortran.h: Add GFC_ISYM_AND, GFC_ISYM_COMPLEX, GFC_ISYM_FGET, - GFC_ISYM_FGETC, GFC_ISYM_FPUT, GFC_ISYM_FPUTC, GFC_ISYM_FTELL, - GFC_ISYM_OR, GFC_ISYM_XOR. - * iresolve.c (gfc_resolve_and, gfc_resolve_complex, - gfc_resolve_or, gfc_resolve_fgetc, gfc_resolve_fget, - gfc_resolve_fputc, gfc_resolve_fput, gfc_resolve_ftell, - gfc_resolve_xor, gfc_resolve_fgetc_sub, gfc_resolve_fget_sub, - gfc_resolve_fputc_sub, gfc_resolve_fput_sub, gfc_resolve_ftell_sub): - New functions. - * check.c (gfc_check_complex, gfc_check_fgetputc_sub, - gfc_check_fgetputc, gfc_check_fgetput_sub, gfc_check_fgetput, - gfc_check_ftell, gfc_check_ftell_sub, gfc_check_and): New functions. - * simplify.c (gfc_simplify_and, gfc_simplify_complex, gfc_simplify_or, - gfc_simplify_xor): New functions. - * trans-intrinsic.c (gfc_conv_intrinsic_function): Add cases for - GFC_ISYM_AND, GFC_ISYM_COMPLEX, GFC_ISYM_FGET, GFC_ISYM_FGETC, - GFC_ISYM_FPUT, GFC_ISYM_FPUTC, GFC_ISYM_FTELL, GFC_ISYM_OR and - GFC_ISYM_XOR. - * intrinsic.h: Add prototypes for all functions added to iresolve.c, - simplify.c and check.c. - -2005-11-10 Paul Thomas - Steven G. Kargl - - PR fortran/15976 - * resolve.c (resolve_symbol): Disallow automatic arrays in module scope. - -2005-11-10 Paul Thomas - - PR fortran/24655 - PR fortran/24755 - * match.c (recursive_stmt_fcn): Add checks that symtree exists - for the expression to weed out inline intrinsic functions and - parameters. - - PR fortran/24409 - * module.c (mio_symtree_ref): Correct the patch of 0923 so that - a symbol is not substituted for by a the symbol for the module - itself and to prevent the promotion of a formal argument. - -2005-11-10 Tobias Schl"uter - - PR fortran/24643 - * primary.c (match_varspec): Check for implicitly typed CHARACTER - variables before matching substrings. - -2005-11-09 Steven G. Kargl - - * trans-intrinsic.c: Typo in comment. - -2005-11-09 Erik Edelmann - - PR fortran/22607 - * trans-decl.c(build_function_decl): Don't set - DECL_IS_PURE (fndecl) = 1 for return-by-reference - functions. - -2005-11-08 Tobias Schl"uter - - * dump-parse-tree.c: Fix comment typo, add a few blank lines. - -2005-11-07 Steven G. Kargl - - * error.c: Use flag_fatal_error. - * invoke.texi: Remove -Werror from list of options. - -2005-11-06 Paul Thomas - - PR fortran/24534 - * resolve.c (resolve_symbol): Exclude case of PRIVATE declared - within derived type from error associated with PRIVATE type - components within derived type. - - PR fortran/20838 - PR fortran/20840 - * gfortran.h: Add prototype for gfc_has_vector_index. - * io.c (gfc_resolve_dt): Error if internal unit has a vector index. - * expr.c (gfc_has_vector_index): New function to check if any of - the array references of an expression have vector inidices. - (gfc_check_pointer_assign): Error if internal unit has a vector index. - - PR fortran/17737 - * data.c (gfc_assign_data_value): Remove gcc_assert that caused the ICE - and replace by a standard dependent warning/error if overwriting an - existing initialization. - * decl.c (gfc_data_variable): Remove old error for already initialized - variable and the unused error check for common block variables. Add - error for hots associated variable and standard dependent error for - common block variables, outside of blockdata. - * symbol.c (check_conflict): Add constraints for DATA statement. - -2005-11-06 Janne Blomqvist - - PR fortran/24174 - PR fortran/24305 - * fortran/trans-io.c (gfc_build_io_library_fndecls): Add kind - argument to transfer_array. - (transfer_array_desc): Add kind argument. - -2005-11-06 Francois-Xavier Coudert - - * intrinsic.c (add_functions): Add ctime and fdate intrinsics. - (add_subroutines): Likewise. - * intrinsic.h: Prototypes for gfc_check_ctime, - gfc_check_ctime_sub, gfc_check_fdate_sub, gfc_resolve_ctime, - gfc_resolve_fdate, gfc_resolve_ctime_sub, gfc_resolve_fdate_sub. - * gfortran.h: Add GFC_ISYM_CTIME and GFC_ISYM_FDATE. - * iresolve.c (gfc_resolve_ctime, gfc_resolve_fdate, - gfc_resolve_ctime_sub, gfc_resolve_fdate_sub): New functions. - * trans-decl.c (gfc_build_intrinsic_function_decls): Add - gfor_fndecl_fdate and gfor_fndecl_ctime. - * check.c (gfc_check_ctime, gfc_check_ctime_sub, - gfc_check_fdate_sub): New functions. - * trans-intrinsic.c (gfc_conv_intrinsic_ctime, - gfc_conv_intrinsic_fdate): New functions. - (gfc_conv_intrinsic_function): Add cases for GFC_ISYM_CTIME - and GFC_ISYM_FDATE. - * intrinsic.texi: Documentation for the new CTIME and FDATE - intrinsics. - * trans.h: Declarations for gfor_fndecl_ctime and gfor_fndecl_fdate. - -2005-11-05 Kazu Hirata - - * decl.c, trans-decl.c: Fix comment typos. - * gfortran.texi: Fix a typo. - -2005-11-05 Francois-Xavier Coudert - - * intrinsic.c (add_functions): Add function version of TTYNAM. - * intrinsic.h: Add prototypes for gfc_check_ttynam and - gfc_resolve_ttynam. - * gfortran.h: Add case for GFC_ISYM_TTYNAM. - * iresolve.c (gfc_resolve_ttynam): New function. - * trans-decl.c (gfc_build_intrinsic_function_decls): Add a tree - for function call to library ttynam. - * check.c (gfc_check_ttynam): New function. - * trans-intrinsic.c (gfc_conv_intrinsic_ttynam): New function. - (): Call gfc_conv_intrinsic_ttynam. - * trans.h: Add prototype for gfor_fndecl_ttynam. - -2005-11-04 Steven G. Kargl - - PR fortran/24636 - * match.c (gfc_match_stopcode): Set stop_code = -1. - -2005-11-04 Francois-Xavier Coudert - - PR fortran/18452 - * lang-specs.h: Pass -lang-fortran to the preprocessor. - -2005-11-02 Andrew Pinski - - PR fortran/18157 - * trans-array.c (gfc_conv_resolve_dependencies): Use the correct - type for the temporary array. - * trans-expr.c (gfc_trans_assignment): Pass lss - instead of lss_section - to gfc_conv_resolve_dependencies to get the - correct type. - -2005-11-02 Tobias Schl"uter - - * decl.c (gfc_match_entry): Function entries don't need an argument - list if there's no RESULT clause. - -2005-11-01 Tobias Schl"uter - - PR fortran/24008 - * decl.c (gfc_match_entry): Function entries need an argument list. - -2005-11-01 Erik Edelmann - - PR 24245 - * trans.c (gfc_generate_code): Move code to create a main - program symbol from here ... - * parse.c (main_program_symbol): ... to this new - function, setting the locus from gfc_current_locus - instead of ns->code->loc. - (gfc_parse_file): Call main_program_symbol for main programs. - -2005-11-01 Tobias Schl"uter - - PR fortran/24404 - * resolve.c (resolve_symbol): Output symbol names in more error - messages, clarify error message. - -2005-11-01 Tobias Schl"uter - - * dump-parse-tree.c (show_symtree): Revert change unintentionally - committed in r106246. - -2005-11-01 Paul Thomas - - PR fortran/21565 - * symbol.c (check_conflict): An object cannot be in a namelist and in - block data. - - PR fortran/18737 - * resolve.c (resolve_symbol): Set the error flag to - gfc_set_default_type, in the case of an external symbol, so that - an error message is emitted if IMPLICIT NONE is set. - - PR fortran/14994 - * gfortran.h (gfc_generic_isym_id): Add GFC_ISYM_SECNDS to enum. - * check.c (gfc_check_secnds): New function. - * intrinsic.c (add_functions): Add call to secnds. - * iresolve.c (gfc_resolve_secnds): New function. - * trans-intrinsic (gfc_conv_intrinsic_function): Add call to - secnds via case GFC_ISYM_SECNDS. - * intrinsic.texi: Add documentation for secnds. - -2005-10-31 Andreas Schwab - - * Make-lang.in (GFORTRAN_TARGET_INSTALL_NAME): Define. - (GFORTRAN_CROSS_NAME): Remove. - (fortran.install-common): Correctly install a cross compiler. - (fortran.uninstall): Use GFORTRAN_TARGET_INSTALL_NAME instead of - GFORTRAN_CROSS_NAME. - -2005-10-30 Erik Edelmann - - * gfortran.texi: Update contributors. - -2005-10-30 Erik Edelmann - - PR fortran/18883 - * trans-decl.c (gfc_finish_var_decl): Add decl to the - current function, rather than the parent. Make - assertion accept fake result variables. - * trans-expr.c (gfc_conv_variable): If the character - length of an ENTRY isn't set, get the length from - the master function instead. - -2005-10-30 Thomas Koenig - - * gfortran.texi: Remove reservations about I/O usability. Document - that array intrinsics mostly work. - -2005-10-30 Tobias Schl"uter - - * gfortran.texi: Move license stuff to back. Add information - on ENUM and ENUMERATOR. - * invoke.texi: Document -fshort-enums. - -2005-10-30 Gaurav Gautam - Tobias Schl"uter - - * arith.c (gfc_enum_initializer): New function. - (gfc_check_integer_range): Made extern. - * decl.c (enumerator_history): New typedef. - (last_initializer, enum_history, max_enum): New variables. - (create_enum_history, gfc_free_enum_history): New functions. - (add_init_expr_to_sym): Call create_enum_history if parsing ENUM. - (variable_decl): Modified to parse enumerator definition. - (match_attr_spec): Add PARAMETER attribute to ENUMERATORs. - (gfc_match_data_decl): Issues error, if match_type_spec do not - return desired return values. - (set_enum_kind, gfc_match_enum, gfc_match_enumerator_def): New - functions. - (gfc_match_end): Deal with END ENUM. - * gfortran.h (gfc_statement): ST_ENUM, ST_ENUMERATOR, ST_END_ENUM - added. - (symbol_attribute): Bit field for enumerator added. - (gfc_options): Add fshort_enums. - (gfc_enum_initializer, gfc_check_integer_range): Add prototypes. - * options.c: Include target.h - (gfc_init_options): Initialize fshort_enums. - (gfc_handle_option): Deal with fshort_enums. - * parse.c (decode_statement): Match ENUM and ENUMERATOR statement. - (gfc_ascii_statement): Deal with the enumerator statements. - (parse_enum): New function to parse enum construct. - (parse_spec): Added case ST_ENUM. - * parse.h (gfc_compile_state): COMP_ENUM added. - (gfc_match_enum, gfc_match_enumerator_def, gfc_free_enum_history): - Prototype added. - * symbol.c (gfc_copy_attr): Copy enumeration attribute. - * lang.opt (fshort-enums): Option added. - -2005-10-30 Francois-Xavier Coudert - - * check.c (gfc_check_malloc, gfc_check_free): New functions. - * gfortran.h (gfc_generic_isym_id): Add GFC_ISYM_MALLOC. - * intrinsic.c (add_functions): Add symbols for MALLOC function. - (add_subroutines): Add symbol for FREE subroutine. - * intrinsic.h: Prototypes for gfc_check_malloc, gfc_check_free, - gfc_resolve_malloc and gfc_resolve_free. - * intrinsic.texi: Add doc for FREE and MALLOC intrinsics. - * iresolve.c (gfc_resolve_malloc, gfc_resolve_free): New - functions. - * trans-intrinsic.c (gfc_conv_intrinsic_function): Add case for - GFC_ISYM_MALLOC. - -2005-10-30 Steven Bosscher - - * gfortran.texi: Update contributors. - -2005-10-29 Steven Bosscher - - * interface.c: Fix previous checkin (an incomplete patch - was commited for me). - -2005-10-29 Joseph S. Myers - - * intrinsic.texi: Remove empty @cindex line. - -2005-10-28 Francois-Xavier Coudert - - * check.c (gfc_check_alarm_sub, gfc_check_signal, - gfc_check_signal_sub): New functions. - * gfortran.h (gfc_generic_isym_id): Add GFC_ISYM_SIGNAL. - * intrinsic.c (add_functions): Add signal intrinsic. - (add_subroutines): Add signal and alarm intrinsics. - * intrinsic.texi: Document the new intrinsics. - * iresolve.c (gfc_resolve_signal, gfc_resolve_alarm_sub, - gfc_resolve_signal_sub): New functions. - * trans-intrinsic.c (gfc_conv_intrinsic_function): Add case - for GFC_ISYM_SIGNAL. - * intrinsic.h: Add prototypes for gfc_check_alarm_sub, - gfc_check_signal, gfc_check_signal_sub, gfc_resolve_signal, - gfc_resolve_alarm_sub, gfc_resolve_signal_sub. - -2005-10-28 Steven Bosscher - - PR fortran/24545 - * interface.c (gfc_match_end_interface): Fix typo in - INTERFACE_USER_OP case. - -2005-10-26 Francois-Xavier Coudert - - PR fortran/15586 - * resolve.c (resolve_symbol): Remove the use of whynot, so that - error messages are not built from pieces. - -2005-10-26 Paul Thomas - - PR fortran/24158 - * decl.c (gfc_match_data_decl): Correct broken bit of code - that prevents undefined derived types from being used as - components of another derived type. - * resolve.c (resolve_symbol): Add backstop error when derived - type variables arrive here with a type that has no components. - -2005-10-25 Jakub Jelinek - - * trans.h (gfc_conv_cray_pointee): Remove. - * trans-expr.c (gfc_conv_variable): Revert 2005-10-24 change. - * trans-array.c (gfc_conv_array_parameter): Likewise. - * trans-decl.c (gfc_conv_cray_pointee): Remove. - (gfc_finish_cray_pointee): New function. - (gfc_finish_var_decl): Use it. Don't return early for Cray - pointees. - (gfc_create_module_variable): Revert 2005-10-24 change. - * decl.c (cray_pointer_decl): Update comment. - * gfortran.texi: Don't mention Cray pointees aren't visible in the - debugger. - - * symbol.c (check_conflict): Add conflict between cray_pointee - and in_common resp. in_equivalence. - * resolve.c (resolve_equivalence): Revert 2005-10-24 change. - - * module.c (ab_attribute): Add AB_CRAY_POINTER and AB_CRAY_POINTEE. - (attr_bits): Likewise. - (mio_symbol_attribute): Save and restore cray_pointe{r,e} attributes. - (mio_symbol): For cray_pointee write/read cp_pointer reference. - -2005-10-25 Feng Wang - - PR fortran/22290 - * trans-decl.c (gfc_add_assign_aux_vars): New function. Add two - auxiliary variables. - (gfc_get_symbol_decl): Use it when a variable, including dummy - argument, is assigned a label. - (gfc_trans_assign_aux_var): New function. Set initial value of - the auxiliary variable explicitly. - (gfc_trans_deferred_vars): Use it. - * trans-stmt.c (gfc_conv_label_variable): Handle dummy argument. - -2005-10-24 Asher Langton - - PR fortran/17031 - PR fortran/22282 - * check.c (gfc_check_loc): New function. - * decl.c (variable_decl): New variables cp_as and sym. Added a - check for variables that have already been declared as Cray - Pointers, so we can get the necessary attributes without adding - a new symbol. - (attr_decl1): Added code to catch pointee symbols and "fix" - their array specs. - (cray_pointer_decl): New method. - (gfc_match_pointer): Added Cray pointer parsing code. - (gfc_mod_pointee_as): New method. - * expr.c (gfc_check_assign): Added a check to catch vector-type - assignments to pointees with an unspecified final dimension. - * gfortran.h: (GFC_ISYM_LOC): New. - (symbol_attribute): Added cray_pointer and cray_pointee bits. - (gfc_array_spec): Added cray_pointee and cp_was_assumed bools. - (gfc_symbol): Added gfc_symbol *cp_pointer. - (gfc_option): Added flag_cray_pointer. - (gfc_add_cray_pointee): Declare. - (gfc_add_cray_pointer ): Declare. - (gfc_mod_pointee_as): Declare. - * intrinsic.c (add_functions): Add code for loc() intrinsic. - * intrinsic.h (gfc_check_loc): Declare. - (gfc_resolve_loc): Declare. - * iresolve.c (gfc_resolve_loc): New. - * lang.opt: Added fcray-pointer flag. - * options.c (gfc_init_options): Initialized. - gfc_match_option.flag_cray_pointer. - (gfc_handle_option): Deal with -fcray-pointer. - * parse.c:(resolve_equivalence): Added code prohibiting Cray - pointees in equivalence statements. - * resolve.c (resolve_array_ref): Added code to prevent bounds - checking for Cray Pointee arrays. - (resolve_equivalence): Prohibited pointees in equivalence - statements. - * symbol.c (check_conflict): Added Cray pointer/pointee - attribute checking. - (gfc_add_cray_pointer): New. - (gfc_add_cray_pointee): New. - (gfc_copy_attr): New code for Cray pointers and pointees. - * trans-array.c (gfc_trans_auto_array_allocation): Added code to - prevent space from being allocated for pointees. - (gfc_conv_array_parameter): Added code to catch pointees and - correctly set their base address. - * trans-decl.c (gfc_finish_var_decl): Added code to prevent - pointee declarations from making it to the back end. - (gfc_create_module_variable): Same. - * trans-expr.c (gfc_conv_variable): Added code to detect and - translate pointees. - (gfc_conv_cray_pointee): New. - * trans-intrinsic.c (gfc_conv_intrinsic_loc): New. - (gfc_conv_intrinsic_function): Added entry point for loc - translation. - * trans.h (gfc_conv_cray_pointee): Declare. - - * gfortran.texi: Added section on Cray pointers, removed Cray - pointers from list of proposed extensions. - * intrinsic.texi: Added documentation for loc intrinsic. - * invoke.texi: Documented -fcray-pointer flag. - -2005-10-24 Asher Langton - - * decl.c (gfc_match_save): Changed duplicate SAVE errors to - warnings in the absence of strict standard conformance - * symbol.c (gfc_add_save): Same. - -2005-10-24 Francois-Xavier Coudert - - PR fortran/15586 - * arith.c (gfc_arith_error): Change message to include locus. - (check_result, eval_intrinsic, gfc_int2int, gfc_real2real, - gfc_real2complex, gfc_complex2real, gfc_complex2complex): Use - the new gfc_arith_error. - (arith_error): Rewrite full error messages instead of building - them from pieces. - * check.c (must_be): Removed. - (type_check, numeric_check, int_or_real_check, real_or_complex_check, - kind_check, double_check, logical_array_check, array_check, - scalar_check, same_type_check, rank_check, kind_value_check, - variable_check, gfc_check_allocated, gfc_check_associated, - gfc_check_cmplx, gfc_check_dcmplx, gfc_check_dot_product, - gfc_check_index, gfc_check_kind, gfc_check_matmul, gfc_check_null, - gfc_check_pack, gfc_check_precision, gfc_check_present, - gfc_check_spread): Rewrite full error messages instead of - building them from pieces. - * decl.c (gfc_match_entry): Rewrite full error messages instead - of building them from pieces. - * parse.c (gfc_state_name): Remove. - * parse.h: Remove prototype for gfc_state_name. - -2005-10-23 Andrew Pinski - - PR fortran/23635 - * check.c (gfc_check_ichar_iachar): Move the code around so - that the check on the length is after check for - references. - -2005-10-23 Asher Langton - - * decl.c (match_type_spec): Add a BYTE type as an extension. - -2005-10-23 Paul Thomas - - PR fortran/18022 - * trans-expr.c (gfc_trans_arrayfunc_assign): Return NULL - if there is a component ref during an array ref to force - use of temporary in assignment. - - PR fortran/24311 - PR fortran/24384 - * fortran/iresolve.c (check_charlen_present): New function to - add a charlen to the typespec, in the case of constant - expressions. - (gfc_resolve_merge, gfc_resolve_spread): Call.the above. - (gfc_resolve_spread): Make calls to library functions that - handle the case of the spread intrinsic with a scalar source. - -2005-10-22 Erik Edelmann - - PR fortran/24426 - * decl.c (variable_decl): Don't assign default initializers to - pointers. - -2005-10-21 Jakub Jelinek - - * interface.c (compare_actual_formal): Issue error when attempting - to pass an assumed-size array as assumed-shape array argument. - -2005-10-20 Erik Edelmann - - PR fortran/21625 - * resolve.c (expr_to_initialize): New function. - (resolve_allocate_expr): Take current statement as new - argument. Add default initializers to variables of - derived types, if they need it. - (resolve_code): Provide current statement as argument to - resolve_allocate_expr(). - -2005-10-19 Paul Thomas - - PR fortran/24440 - * resolve.c (resolve_symbol): Correct error in check for - assumed size array with default initializer by testing - for arrayspec before dereferencing it. - -2005-10-17 Paul Thomas - - PR fortran/23446 - * gfortran.h: Primitive for gfc_is_formal_arg. - * resolve.c(gfc_is_formal_arg): New function to signal across - several function calls that formal argument lists are being - processed. - (resolve_formal_arglist): Set/reset the flag for gfc_is_formal_arg. - *expr.c(check_restricted): Add check, via gfc_is_formal_arg, if - symbol is part of an formal argument declaration. - - PR fortran/21459 - * decl.c (add_init_expr_to_sym): Make a new character - length for each variable, when the expression is NULL - and link to cl_list. - - PR fortran/20866 - * match.c (recursive_stmt_fcn): New function that tests if - a statement function resurses through itself or other other - statement functions. - (gfc_match_st_function): Call recursive_stmt_fcn to check - if this is recursive and to raise error if so. - - PR fortran/20849 - PR fortran/20853 - * resolve.c (resolve_symbol): Errors for assumed size arrays - with default initializer and for external objects with an - initializer. - - PR fortran/20837 - * decl.c (match_attr_spec): Prevent PUBLIC from being used - outside a module. - -2005-10-16 Erik Edelmann - - PR 22273 - * expr.c (check_inquiry): Add "len" to inquiry_function. - -2005-10-14 Jakub Jelinek - - * primary.c (match_boz_constant): Add missing break after gfc_error. - -2005-10-12 Paul Thomas - - PR fortran/24092 - * trans-types.c (gfc_get_derived_type): Insert code to obtain backend - declaration for derived types, building if necessary. Return the - derived type if the fields have been built by this process. Otherwise, - continue as before but using the already obtained backend_decls for the - derived type components. Change the gcc_assert to act on the field. - -2005-10-12 Paul Thomas - - PR fortran/18082 - * decl.c (variable_decl): Make a new copy of the character - length for each variable, when the expression is not a - constant. - -2005-10-12 Francois-Xavier Coudert - - * gfortran.h: Add bitmasks for different FPE traps. Add fpe - member to options_t. - * invoke.texi: Document the new -ffpe-trap option. - * lang.opt: Add -ffpe-trap option. - * options.c (gfc_init_options): Initialize the FPE option. - (gfc_handle_fpe_trap_option): New function to parse the argument - of the -ffpe-trap option. - (gfc_handle_option): Add case for -ffpe-trap. - * trans-decl.c: Declare a tree for the set_fpe library function. - (gfc_build_builtin_function_decls): Build this tree. - (gfc_generate_function_code): Generate a call to set_fpe at - the beginning of the main program. - * trans.h: New tree for the set_fpe library function. - -2005-10-12 Paul Thomas - - PR fortran/20847 - PR fortran/20856 - * symbol.c (check_conflict): Prevent common variables and - function results from having the SAVE attribute,as required - by the standard. - -2005-10-12 Paul Thomas - - PR fortran/24207 - * resolve.c (resolve_symbol): Exclude use and host associated - symbols from the test for private objects in a public namelist. - -2005-10-12 Jakub Jelinek - - * trans-common.c (build_field): Fix comment typo. - (create_common): Set backend_decl of COMMON or EQUIVALENCEd - variables to a VAR_DECL with the COMPONENT_REF in - DECL_HAS_VALUE_EXPR rather than COMPONENT_REF directly. - * f95-lang.c (gfc_expand_function): Emit debug info for - EQUIVALENCEd variables if the equiv union is going to be output. - -2005-10-11 Steven G. Kargl - - PR fortran/20786 - * iresolve.c (gfc_resolve_aint, gfc_resolve_anint): Type conversion - of the argument. - -2005-10-11 Jakub Jelinek - - * f95-lang.c (gfc_init_decl_processing): Initialize - void_list_node. - -2005-10-07 Erik Edelmann - - PR 18568 - * resolve.c (find_array_spec): Search through the list of - components in the symbol of the type instead of the symbol of the - variable. - -2005-10-05 Richard Guenther - - PR fortran/24176 - * parse.c (gfc_parse_file): Exit early for empty files. - -2005-10-03 Steve Ellcey - - * fortran/trans-types.c (gfc_init_kinds): Only pass float, double, - and long double floating point types through to Fortran compiler. - -2005-10-03 Francois-Xavier Coudert - - PR fortran/20120 - * f95-lang.c (DO_DEFINE_MATH_BUILTIN): Add support for long - double builtin function. - (gfc_init_builtin_functions): Add mfunc_longdouble, - mfunc_clongdouble and func_clongdouble_longdouble trees. Build - them for round, trunc, cabs, copysign and pow functions. - * iresolve.c (gfc_resolve_reshape, gfc_resolve_transpose): Add - case for kind 10 and 16. - * trans-decl.c: Add trees for cpowl10, cpowl16, ishftc16, - exponent10 and exponent16. - (gfc_build_intrinsic_function_decls): Build nodes for int16, - real10, real16, complex10 and complex16 types. Build all possible - combinations for function _gfortran_pow_?n_?n. Build function - calls cpowl10, cpowl16, ishftc16, exponent10 and exponent16. - * trans-expr.c (gfc_conv_power_op): Add case for integer(16), - real(10) and real(16). - * trans-intrinsic.c: Add suppport for long double builtin - functions in BUILT_IN_FUNCTION, LIBM_FUNCTION and LIBF_FUNCTION - macros. - (gfc_conv_intrinsic_aint): Add case for integer(16), real(10) and - real(16) kinds. - (gfc_build_intrinsic_lib_fndecls): Add support for real10_decl - and real16_decl in library functions. - (gfc_get_intrinsic_lib_fndecl): Add cases for real and complex - kinds 10 and 16. - (gfc_conv_intrinsic_exponent): Add cases for real(10) and real(16) - kinds. - (gfc_conv_intrinsic_sign): Likewise. - (gfc_conv_intrinsic_ishftc): Add case for integer(16) kind. - * trans-types.c (gfc_get_int_type, gfc_get_real_type, - gfc_get_complex_type, gfc_get_logical_type): Doesn't error out in - the case of kinds not available. - * trans.h: Declare trees for cpowl10, cpowl16, ishftc16, - exponent10 and exponent16. - -2005-10-01 Paul Thomas - - PR fortran/16404 - PR fortran/20835 - PR fortran/20890 - PR fortran/20899 - PR fortran/20900 - PR fortran/20901 - PR fortran/20902 - * gfortran.h: Prototype for gfc_add_in_equivalence. - * match.c (gfc_match_equivalence): Make a structure component - an explicit,rather than a syntax, error in an equivalence - group. Call gfc_add_in_equivalence to add the constraints - imposed in check_conflict. - * resolve.c (resolve_symbol): Add constraints: No public - structures with private-type components and no public - procedures with private-type dummy arguments. - (resolve_equivalence_derived): Add constraint that prevents - a structure equivalence member from having a default - initializer. - (sequence_type): New static function to determine whether an - object is default numeric, default character, non-default - or mixed sequence. Add corresponding enum typespec. - (resolve_equivalence): Add constraints to equivalence groups - or their members: No more than one initialized member and - that different types are not equivalenced for std=f95. All - the simple constraints have been moved to check_conflict. - * symbol.c (check_conflict): Simple equivalence constraints - added, including those removed from resolve_symbol. - (gfc_add_in_equivalence): New function to interface calls - match_equivalence to check_conflict. - -2005-09-27 Jakub Jelinek - - PR fortran/18518 - * trans-common.c (build_equiv_decl): Add IS_SAVED argument. - If it is true, set TREE_STATIC on the decl. - (create_common): If any symbol in equivalence has SAVE attribute, - pass true as last argument to build_equiv_decl. - -2005-09-24 Janne Blomqvist - - * trans-io.c (gfc_build_io_library_fndecls): Add entry - iocall_x_array for transfer_array. - (transfer_array_desc): New function. - (gfc_trans_transfer): Add code to call transfer_array_desc. - -2005-09-26 Jakub Jelinek - - PR fortran/23677 - * symbol.c (gfc_is_var_automatic): Return true if character length - is non-constant rather than constant. - * resolve.c (gfc_resolve): Don't handle !gfc_option.flag_automatic - here. - * options.c (gfc_post_options): Set gfc_option.flag_max_stack_var_size - to 0 for -fno-automatic. - -2005-09-23 Paul Thomas - - PR fortran/16861 - * module.c (mio_component_ref): Return if the symbol is NULL - and wait for another iteration during module reads. - (mio_symtree_ref): Suppress the writing of contained symbols, - when a symbol is available in the main namespace. - (read_module): Restrict scope of special treatment of contained - symbols to variables only and suppress redundant call to - find_true_name. - -2005-09-22 Steven G. Kargl - - PR fortran/24005 - * interface.c (check_interface1): Fix NULL dereference. - -2005-09-22 Erik Edelmann - - PR fortran/23843 - * resolve.c (derived_inaccessible): New function. - (resolve_transfer): Use it to check for private - components. - -2005-09-22 Steven G. Kargl - - PR fortran/23516 - * intrinsic.c (add_function): Add IMAG, IMAGPART, and REALPART - intrinsics. - * intrinsic.h: Prototypes for gfc_simplify_realpart and - gfc_resolve_realpart. - * intrinsic.texi: Document intrinsic procedures. - * simplify.c (gfc_simplify_realpart): New function. - * irseolve.c (gfc_resolve_realpart): New function. - -2005-09-21 Erik Edelmann - - PR fortran/19929 - * trans-stmt.c (gfc_trans_deallocate): Check if the - object to be deallocated is an array by looking at - expr->rank instead of expr->symtree->n.sym->attr.dimension. - -2005-09-20 Tobias Schl"uter - - PR fortran/23420 - * io.c (resolve_tag): Don't allow non-CHARACTER constants as formats. - (match_io): Fix usage of gfc_find_symbol. - -2005-09-20 Jakub Jelinek - - PR fortran/23663 - * primary.c (match_actual_arg): Handle ENTRY the same way - as FUNCTION. - -2005-09-18 Francois-Xavier Coudert - - * Make-lang.in: Make check-fortran alias for check-gfortran. - -2005-09-18 Andreas Jaeger - - * module.c (read_module): Add missed line from last patch. - -2005-09-18 Erik Edelmann - - PR fortran/15975 - * resolve.c (resolve_symbol): Don't assign default - initializer to pointers. - -2005-09-18 Paul Thomas - - PR fortran/16861 - * module.c (read_module): Give symbols from module procedures - different true_name entries to those from the module proper. - -2005-09-17 Francois-Xavier Coudert - - PR fortran/15586 - * arith.c (gfc_arith_error): Add translation support for error - messages. - * array.c (gfc_match_array_ref): Likewise. - (gfc_match_array_spec): Likewise. - * check.c (must_be): Add msgid convention to third argument. - (same_type_check): Add translation support for error message. - (rank_check): Likewise. - (kind_value_check): Likewise. - (gfc_check_associated): Correct typo. - (gfc_check_reshape): Add translation support for error message. - (gfc_check_spread): Likewise. - * error.c (error_printf): Add nocmsgid convention to argument. - (gfc_warning, gfc_notify_std, gfc_warning_now, gfc_warning_check) - (gfc_error, gfc_error_now): Likewise. - (gfc_status): Add cmsgid convention to argument. - * expr.c (gfc_extract_int): Add translation support for error - messages. - (gfc_check_conformance): Add msgid convention to argument. - (gfc_check_pointer_assign): Correct tabbing. - * gfortran.h: Include intl.h header. Remove prototype for gfc_article. - * gfortranspec.c: Include intl.h header. - (lang_specific_driver): Add translation support for --version. - * io.c (check_format): Add translation support for error message. - (format_item_1): Likewise. - (data_desc): Likewise. - * matchexp.c: Likewise. - * misc.c (gfc_article): Remove function. - * module.c (bad_module): Use msgid convention. Add translation support - for error messages. - (require_atom): Add translation support for error messages. - * parse.c (gfc_ascii_statement): Likewise. - (gfc_state_name): Likewise. - * primary.c (match_boz_constant): Reorganise error messages for - translations. - * resolve.c (resolve_entries): Likewise. - (resolve_operator): Add translation support for error messages. - (gfc_resolve_expr): Use msgid convention. Reorganise error messages - for translations. - (resolve_symbol): Add translation support for error messages. - * symbol.c (gfc_add_procedure): Remove use of gfc_article function. - * trans-const.c (gfc_build_string_const): Use msgid convention. - -2005-09-16 Paul Brook - - PR fortran/23906 - * dependency.c (transform_sections): Divide by correct value. - Elaborate comment. - -2005-09-14 Paul Thomas - - PR fortran/21875 Internal Unit Array I/O, NIST - * fortran/trans-io.c (gfc_build_io_library_fndecls): Add field for - array descriptor to IOPARM structure. - * fortran/trans-io.c (set_internal_unit): New function to generate code - to store the character (array) and the character length for an internal - unit. - * fortran/trans-io (build_dt): Use the new function set_internal_unit. - -2005-09-14 Paul Thomas - - PR fortran/19358 - * trans-array.c (gfc_trans_dummy_array_bias): correct the typo - which uses dim[i].upper for lbound, rather than dim[i].lower. - -2005-09-13 Erik Edelmann - - PR fortran/17740 - * trans-expr.c (gfc_trans_arrayfunc_assign): Check value - of attr.elemental for specific function instead of generic name. - -2005-09-13 Richard Sandiford - - PR fortran/18899 - * trans-intrinsic.c (gfc_conv_intrinsic_bound): Move initialization - of argse. Remove now-redundant want_pointer assignment. - * trans-array.c (gfc_conv_expr_descriptor): When not assigning to - a pointer, keep the original bounds of a full array reference. - -2005-09-13 Richard Sandiford - - PR target/19269 - * iresolve.c (gfc_resolve_cshift, gfc_resolve_eoshift) - (gfc_resolve_pack, gfc_resolve_reshape, gfc_resolve_spread) - (gfc_resolve_transpose, gfc_resolve_unpack): Add "_char" to the name - for character-based operations. - (gfc_resolve_pack): Remove ATTRIBUTE_UNUSED from array argument. - (gfc_resolve_unpack): Copy the whole typespec from the vector. - * trans-array.c (gfc_conv_expr_descriptor): In the EXPR_FUNCTION - case, get the string length from the scalarization state. - -2005-09-14 Francois-Xavier Coudert - - * Make-lang.in: Change targets prefixes from f95 to fortran. - * config-lang.in: Change language name to "fortran". - * lang.opt: Change language name to "fortran". - * options.c: Change CL_F95 to CL_Fortran. - -2005-09-09 Thomas Koenig - - gfortran.texi: Document IOSTAT= specifier. - -2005-09-09 Thomas Koenig - - * gfortran.h: Add iomsg to gfc_open, gfc_close, gfc_filepos, - gfc_inquire and gfc_dt. - * dump-parse-tree.c (gfc_show_code_node): Add iomsg - for open, close, file positioning, inquire and namelist. - * io.c (io_tag): Add tag_iomsg. - (resolve_tag): Add standards warning for iomsg. - (match_open_element): Add iomsg. - (gfc_free_open): Add iomsg. - (gfc_resolve_open): Add iomsg. - (gfc_free_close): Add iomsg. - (match_close_element): Add iomsg. - (gfc_resolve_close): Add iomsg. - (gfc_free_filepos): Add iomsg. - (match_file_element): Add iomsg. - (gfc_resolve_filepos): Add iostat and iomsg. - (match-dt_element): Add iomsg. - (gfc_free_dt): Add iomsg. - (gfc_resolve_dt): Add iomsg. - (gfc_free_inquire): Add iomsg. - (match_inquire_element): Add iomsg. - (gfc_resolve_inquire): Add iomsg. - * trans_io.c: Add ioparm_iomsg and ioparm_iomsg_len. - (gfc_build_io_library_fndecls): Add iomsg as last field. - (gfc_trans_open): Add iomsg. - (gfc_trans_close): Add iomsg. - (build_fileos): Call set_string for iomsg. - (gfc_trans_inquire): Add iomsg. - (build_dt): Add iomsg. - -2005-09-09 Richard Sandiford - - * match.h (gfc_match_equiv_variable): Declare. - -2005-09-09 Richard Sandiford - - PR fortran/19239 - * Makefile.in (fortran/trans-expr.o): Depend on dependency.h. - * dependency.h (gfc_ref_needs_temporary_p): Declare. - * dependency.c (gfc_ref_needs_temporary_p): New function. - (gfc_check_fncall_dependency): Use it instead of inlined check. - By so doing, take advantage of the fact that character substrings - within an array reference also need a temporary. - * trans.h (GFC_SS_VECTOR): Adjust comment. - * trans-array.c (gfc_free_ss): Remove GFC_SS_VECTOR case. - (gfc_set_vector_loop_bounds): New function. - (gfc_add_loop_ss_code): Call it after evaluating the subscripts of - a GFC_SS_SECTION. Deal with the GFC_SS_VECTOR case by evaluating - the vector expression and caching its descriptor for use within - the loop. - (gfc_conv_array_index_ref, gfc_conv_vector_array_index): Delete. - (gfc_conv_array_index_offset): Handle scalar, vector and range - dimensions as separate cases of a switch statement. In the vector - case, use the loop variable to calculate a vector index and use the - referenced element as the dimension's index. Perform bounds checking - on this final index. - (gfc_conv_section_upper_bound): Return null for vector indexes. - (gfc_conv_section_startstride): Give vector indexes a start value - of 0 and a stride of 1. - (gfc_conv_ss_startstride): Adjust for new GFC_SS_VECTOR representation. - (gfc_conv_expr_descriptor): Expand comments. Generalize the - handling of the !want_pointer && !direct_byref case. Use - gfc_ref_needs_temporary_p to decide whether the variable case - needs a temporary. - (gfc_walk_variable_expr): Handle DIMEN_VECTOR by creating a - GFC_SS_VECTOR index. - * trans-expr.c: Include dependency.h. - (gfc_trans_arrayfunc_assign): Fail if the target needs a temporary. - -2005-09-09 Richard Sandiford - - PR fortran/21104 - * trans.h (gfc_interface_sym_mapping, gfc_interface_mapping): Moved - from trans-expr.c. - (gfc_init_interface_mapping, gfc_free_interface_mapping) - (gfc_add_interface_mapping, gfc_finish_interface_mapping) - (gfc_apply_interface_mapping): Declare. - * trans-array.h (gfc_set_loop_bounds_from_array_spec): Declare. - (gfc_trans_allocate_temp_array): Add pre and post block arguments. - * trans-array.c (gfc_set_loop_bounds_from_array_spec): New function. - (gfc_trans_allocate_array_storage): Replace loop argument with - separate pre and post blocks. - (gfc_trans_allocate_temp_array): Add pre and post block arguments. - Update call to gfc_trans_allocate_array_storage. - (gfc_trans_array_constructor, gfc_conv_loop_setup): Adjust for new - interface to gfc_trans_allocate_temp_array. - * trans-expr.c (gfc_interface_sym_mapping, gfc_interface_mapping): - Moved to trans.h. - (gfc_init_interface_mapping, gfc_free_interface_mapping) - (gfc_add_interface_mapping, gfc_finish_interface_mapping) - (gfc_apply_interface_mapping): Make extern. - (gfc_conv_function_call): Build an interface mapping for array - return values too. Call gfc_set_loop_bounds_from_array_spec. - Adjust call to gfc_trans_allocate_temp_array so that code is - added to SE rather than LOOP. - -2005-09-09 Richard Sandiford - - PR fortran/12840 - * trans.h (gfor_fndecl_internal_realloc): Declare. - (gfor_fndecl_internal_realloc64): Declare. - * trans-decl.c (gfor_fndecl_internal_realloc): New variable. - (gfor_fndecl_internal_realloc64): New variable. - (gfc_build_builtin_function_decls): Initialize them. - * trans-array.h (gfc_trans_allocate_temp_array): Add a fourth argument. - * trans-array.c (gfc_trans_allocate_array_storage): Add an argument - to say whether the array can grow later. Don't allocate the array - on the stack if so. Don't call malloc for zero-sized arrays. - (gfc_trans_allocate_temp_array): Add a similar argument here. - Pass it along to gfc_trans_allocate_array_storage. - (gfc_get_iteration_count, gfc_grow_array): New functions. - (gfc_iterator_has_dynamic_bounds): New function. - (gfc_get_array_constructor_element_size): New function. - (gfc_get_array_constructor_size): New function. - (gfc_trans_array_ctor_element): Replace pointer argument with - a descriptor tree. - (gfc_trans_array_constructor_subarray): Likewise. Take an extra - argument to say whether the variable-sized part of the constructor - must be allocated using realloc. Grow the array when this - argument is true. - (gfc_trans_array_constructor_value): Likewise. - (gfc_get_array_cons_size): Delete. - (gfc_trans_array_constructor): If the loop bound has not been set, - split the allocation into a static part and a dynamic part. Set - loop->to to the bounds for static part before allocating the - temporary. Adjust call to gfc_trans_array_constructor_value. - (gfc_conv_loop_setup): Allow any constructor to determine the - loop bounds. Check whether the constructor has a dynamic size - and prefer to use something else if so. Expect the loop bound - to be set later. Adjust call to gfc_trans_allocate_temp_array. - * trans-expr.c (gfc_conv_function_call): Adjust another call here. - -2005-09-09 Paul Thomas - - PR fortran/18878 - * module.c (find_use_name_n): Based on original - find_use_name. Either counts number of use names for a - given real name or returns use name n. - (find_use_name, number_use_names): Interfaces to the - function find_use_name_n. - (read_module): Add the logic and calls to these functions, - so that mutiple reuses of the same real name are loaded. - -2005-09-09 Paul Thomas - - PR fortran/22304 - PR fortran/23270 - PR fortran/18870 - PR fortran/16511 - PR fortran/17917 - * gfortran.h: Move definition of BLANK_COMMON_NAME from trans- - common.c so that it is accessible to module.c. Add common_head - field to gfc_symbol structure. Add field for the equivalence - name AND new attr field, in_equivalence. - * match.c (gfc_match_common, gfc_match_equivalence): In loops - that flag common block equivalences, emit an error if the - common blocks are different, using sym->common_head as the - common block identifier. Ensure that symbols that are equivalence - associated with a common block are marked as being in_common. - * module.c (write_blank_common): New. - (write_common): Use unmangled common block name. - (load_equiv): New function ported from g95. - (read_module): Call load_equiv. - (write_equiv): New function ported from g95. Correct - string referencing for gfc functions. Give module - equivalences a unique name. - (write_module): Call write_equiv and write_blank_common. - * primary.c (match_variable) Old gfc_match_variable, made - static and third argument provided to indicate if parent - namespace to be visited or not. - (gfc_match_variable) New. Interface to match_variable. - (gfc_match_equiv_variable) New. Interface to match_variable. - * trans-common.c (finish_equivalences): Provide the call - to create_common with a gfc_common_header so that - module equivalences are made external, rather than local. - (find_equivalences): Ensure that all members in common block - equivalences are marked as used. This prevents the subsequent - call to this function from making local unions. - * trans-decl.c (gfc_generate_function_code): Move the call to - gfc_generate_contained_functions to after the call to - gfc_trans_common so the use-associated, contained common - blocks produce the correct references. - (gfc_create_module_variable): Return for equivalenced symbols - with existing backend declaration. - -2005-09-08 Tobias Schl"uter - - PR fortran/23765 - * match.c (gfc_match_common): Remove unnecessary / wrong special - cases for end-of-statement. - -2005-09-08 Janne Blomqvist - - * gfortran.texi: Add section about implemented F2003 features. - -2005-09-08 Richard Sandiford - - PR fortran/15326 - * trans-array.c (gfc_add_loop_ss_code): Set ss->string_length in - the GFC_SS_FUNCTION case too. - * trans-expr.c (gfc_conv_function_val): Allow symbols to be bound - to function pointers as well as function decls. - (gfc_interface_sym_mapping, gfc_interface_mapping): New structures. - (gfc_init_interface_mapping, gfc_free_interface_mapping) - (gfc_get_interface_mapping_charlen, gfc_get_interface_mapping_array) - (gfc_set_interface_mapping_bounds, gfc_add_interface_mapping) - (gfc_finish_interface_mapping, gfc_apply_interface_mapping_to_cons) - (gfc_apply_interface_mapping_to_ref) - (gfc_apply_interface_mapping_to_expr) - (gfc_apply_interface_mapping): New functions. - (gfc_conv_function_call): Evaluate the arguments before working - out where the result should go. Make the null pointer case provide - the string length in parmse.string_length. Cope with non-constant - string lengths, using the above functions to evaluate such lengths. - Use a temporary typespec; don't assign to sym->cl->backend_decl. - Don't assign to se->string_length when returning a cached array - descriptor. - -2005-09-08 Richard Sandiford - - PR fortran/19928 - * trans-array.c (gfc_conv_array_ref): Call gfc_advance_se_ss_chain - after handling scalarized references. Make "indexse" inherit from - "se" when handling AR_ELEMENTs. - (gfc_walk_variable_expr): Add GFC_SS_SCALAR entries for each - substring or scalar reference that follows an array section. - * trans-expr.c (gfc_conv_variable): When called from within a - scalarization loop, start out with "ref" pointing to the scalarized - part of the reference. Don't call gfc_advance_se_ss_chain here. - -2005-09-07 Richard Sandiford - - PR fortran/23373 - * trans-expr.c (gfc_trans_pointer_assignment): Assign to a temporary - descriptor if the rhs is not a null pointer or variable. - -2005-09-07 Thomas Koenig - - PR fortran/20848 - * symbol.c(check_conflict): Add conflict for parameter/save, - -2005-09-06 Richard Sandiford - - PR fortran/19269 - * simplify.c (gfc_simplify_transpose): Set the result's typespec from - the source, not the first element of the return value. - -2005-09-04 Tobias Schl"uter - - PR fortran/23661 - * io.c (match_io): Correctly backup if PRINT followed by - symbol which is not a namelist. Force blank between PRINT - and namelist in free form. - -2005-08-31 Francois-Xavier Coudert - - PR fortran/20592 - * gfortran.h (gfc_option_t): Add flag_automatic. - * invoke.texi: Document the -fno-automatic option. - * lang.opt: Add a -fautomatic option. - * options.c (gfc_init_options): Default for -fautomatic is on. - (gfc_handle_option): Add handling of -fautomatic option. - * resolve.c (gfc_resolve): When -fno-automatic is used, mark - needed variables as SAVE. - -2005-08-27 Erik Edelmann - - * trans-array.c (gfc_trans_deferred_array): Fix comments. - -2005-08-27 Erik Schnetter - - * primary.c (match_charkind_name): Fix typo in comment leading to - function. - -2005-08-25 Erik Edelmann - - PR fortran/20363 - * symbol.c (find_special): Remove. - (build_sym, add_init_expr, attr_decl1): Remove calls to - find_special in favor of calls to gfc_get_symbol. - -2005-08-24 Thomas Koenig - - PR fortran/17758 - * gfortran.h (symbol_attribute): Add noreturn to the structure. - (gfc_intrinsic_sym): Add noreturn to the structure. - * intrinsic.c (make_noreturn): New function. - (add_subroutines): Mark subroutines abort and exit as noreturn. - (gfc_intrinsic_sub_interface): Copy noreturn attribute from - isym to the resolved symbol. - * trans-decl.c (gfc_get_extern_function_decl): Set function - as VOLATILE (== noreturn) if the noreturn attribute is set. - -2005-08-21 Steven G. Kargl - - * decl.c: Typo in comment. - -2005-08-21 Steven G. Kargl - - * array.c: Bump GFC_MAX_AC_EXPAND from 100 to 65535. - -2005-08-21 Tobias Schl"uter - - * gfortran.h (gfc_option_t): Remove source field. Add - flag_d_lines field. - (gfc_new_file): Remove arguments in prototype. - (gfc_source_file): Make 'const char *'. - * f95-lang.c (gfc_init): Use gfc_source_file instead of - gfc_option.source. Call gfc_new_file without arguments. - * invoke.texi: Document new options '-fd-lines-as-code' and - '-fd-lines-as-comment'. - * lang.opt: Add new options. Alphabetize. - * options.c (gfc_init_options): Initialize gfc_source_file instead - of gfc_option.source. Initialize gfc_option.flag_d_lines. - (form_from_filename): Move here from scanner.c. Make - 'filename' argument 'const'. - (gfc_post_options): Set gfc_source_file. Determine source form. - Warn if 'd-lines*' are used in free form. - * scanner.c (gfc_source_file): Constify. - (skip_fixed_comments): Deal with d-lines. - (get_file): Constify argument 'name'. - (load_file): Constify argument 'filename'. - (form_from_filename): Moved to options.c. - (gfc_new_file): Remove arguments. Don't initialize - gfc_source_file, don't determine source form. - * trans-const.c (gfc_init_constants): Use gfc_source_file instead - of gfc_option.source. - -2005-08-19 Steven G. Kargl - - PR fortran/23065 - * gfortran.h: Remove PATH_MAX definition. - * module.c (write_module, gfc_dump_module): Use alloca to allocate - buffers. - * scanner.c (gfc_release_include_path, form_from_filename): Ditto. - -2004-08-16 Huang Chun - - * trans-expr.c (gfc_conv_power_op): Evaluate the expression before - expand. - -2005-08-14 Asher Langton - - * parse.c (match): Enclose macro in do...while(0) and braces. - -2005-08-14 Paul Thomas - - PR fortran/21432. - * gfortran.texi: Document PRINT namelist. - -2005-08-14 Paul Thomas - - PR fortran/21432. - * io.c (match_io): Add code to implement PRINT namelist. - -2005-08-14 Canqun Yang - - * trans-stmt.c (gfc_trans_arithmetic_if): Optimized in case of equal - labels. - -2005-08-11 Francois-Xavier Coudert - Steven Bosscher - - PR libfortran/20006 - * gfortran.h: Add is_main_program member to symbol_attribute. - * trans-decl: Add a gfor_fndecl_set_std tree. - (gfc_build_builtin_function_decls): Create it. - (gfc_generate_function_code): Add this call at the beginning of - the main program. - * trans.c (gfc_generate_code): Move main_program and attr. - * trans.h: Add declaration for gfor_fndecl_set_std. - -2005-08-10 Thomas Koenig - - PR libfortran/22143 - gfortran.h: Declare new function gfc_resolve_dim_arg. - resolve.c: New function gfc_resolve_dim_arg. - iresolve.c (gfc_resolve_all): Use gfc_resolve_dim_arg. - (gfc_resolve_any): Likewise. - (gfc_resolve_count): Likewise. - (gfc_resolve_cshift): Likewise. If the kind of shift is less - gfc_default_integer_kind, convert it to default integer type. - (gfc_resolve_eoshift): Likewise. - (gfc_resolve_maxloc): Use gfc_resolve_dim_arg. - (gfc_resolve_maxval): Likewise. - (gfc_resolve_minloc): Likewise. - (gfc_resolve_minval): Likewise. - (gfc_resolve_product): Likewise. - (gfc_resolve_spread): Likewise. - (gfc_resolve_sum): Likewise. - -2005-08-09 Francois-Xavier Coudert - - * check.c (gfc_check_ttynam_sub, gfc_check_isatty): Add check - functions for new intrinsics TTYNAM and ISATTY. - * intrinsic.c (add_functions, add_subroutines): Add new - intrinsics. - * intrinsic.h: Add prototypes for new check and resolve - functions. - * iresolve.c (gfc_resolve_isatty, gfc_resolve_ttynam_sub): New - resolve functions for intrinsics TTYNAM and ISATTY. - * gfortran.h (gfc_generic_isym_id): Add symbol for ISATTY. - * trans-intrinsic.c: Add case for GFC_ISYM_ISATTY. - -2005-08-09 Jakub Jelinek - - * scanner.c (preprocessor_line): Don't write beyond the end of flag - buffer. - -2005-08-07 Janne Blomqvist - - PR fortran/22390 - * dump-parse-tree.c (gfc_show_code_node): Add case for FLUSH. - * gfortran.h: Add enums for FLUSH. - * io.c (gfc_free_filepos,match_file_element,match_filepos): Modify - comment appropriately. (gfc_match_flush): New function. - * match.c (gfc_match_if): Add match for flush. - * match.h: Add prototype. - * parse.c (decode_statement): Add flush to 'f' case. - (next_statement): Add case for flush. (gfc_ascii_statement): Likewise. - * resolve.c (resolve_code): Add flush case. - * st.c (gfc_free_statement): Add flush case. - * trans-io.c: Add prototype for flush. - (gfc_build_io_library_fndecls): Build fndecl for flush. - (gfc_trans_flush): New function. - * trans-stmt.h: Add prototype. - * trans.c (gfc_trans_code): Add case for flush. - -2005-08-06 Francois-Xavier Coudert - - * primary.c (match_hollerith_constant): Fix typo. - -2005-08-06 Kazu Hirata - - * decl.c, dump-parse-tree.c, gfortran.texi, intrinsic.texi, - invoke.texi, resolve.c, trans-array.c, trans-array.h, - trans-common.c, trans-expr.c, trans-io.c, trans.h: Fix - comment/doc typos. Follow spelling conventions. - -2005-08-06 Jakub Jelinek - - PR fortran/18833 - PR fortran/20850 - * primary.c (match_varspec): If equiv_flag, don't look at sym's - attributes, call gfc_match_array_ref up to twice and don't do any - substring or component processing. - * resolve.c (resolve_equivalence): Transform REF_ARRAY into - REF_SUBSTRING or nothing if needed. Check that substrings - don't have zero length. - -2005-08-05 Thomas Koenig - - * trans-expr.c (gfc_build_builtin_function_decls): Mark - stop_numeric and stop_string as non-returning. - -2005-08-04 Paul Brook - - * trans-expr.c (gfc_conv_expr, gfc_conv_expr_type): Update comments. - (gfc_conv_expr_lhs): Fix assertion. - (gfc_conv_expr_val): Merge post block. Set se.expr to new value. - -2005-08-02 David Edelsohn - - PR fortran/22491 - * expr.c (simplify_parameter_variable): Do not copy the subobject - references if the expression value is a constant. - - * expr.c (gfc_simplify_expr): Evaluate constant substrings. - -2005-07-31 Jerry DeLisle - - * intrinsic.texi: Add documentation for exponent, floor, and fnum and - fix description of ceiling in index. - -2005-07-31 Steven Bosscher - - * trans-decl.c (gfc_build_builtin_function_decls): Give the internal - malloc functions the 'malloc' attribute. Give runtime_error the - 'noreturn' attribute. - -2005-07-31 Steven Bosscher - - * trans-stmt.c (gfc_trans_goto): Jump to the known label instead - of the assigned goto variable. - -2005-07-29 Steven Bosscher - - * trans-types.h (gfc_array_range_type): Add missing GTY decl for this. - -2005-07-28 Andrew Pinski - - * fortran/f95-lang.c (language_function): Remove - named_labels, shadowed_labels, returns_value, returns_abnormally, - warn_about_return_type, and extern_inline fields. - (named_labels): Remove variable. - (gfc_init_decl_processing): Remove setting of named_labels. - -2005-07-27 Volker Reichelt - - PR fortran/22503 - * resolve.c (resolve_operator): Improve diagnostic for comparison - of logicals with invalid operator. - -2005-07-25 Jakub Jelinek - - PR fortran/20063 - * data.c (gfc_assign_data_value_range): Call - create_character_initializer if last_ts is a character type. - -2005-07-22 Manfred Hollstein - - * match.c (gfc_match_symbol): Fix uninitialised warnings. - * matchexp.c (gfc_match_expr): Likewise. - -2005-07-20 Giovanni Bajo - - Make CONSTRUCTOR use VEC to store initializers. - * trans-array.c (gfc_build_null_descriptor, - gfc_trans_array_constructor_value, gfc_conv_array_initializer): - Update to cope with VEC in CONSTRUCTOR_ELTS. - * trans-common.c (create_common): Likewise. - * trans-expr.c (gfc_conv_structure): Likewise. - * trans-stmt.c (gfc_trans_character_select): Use - build_constructor_from_list instead of build_constructor. - -2005-07-19 Paul Thomas - - PR fortran/16940 - * resolve.c (resolve_symbol): A symbol with FL_UNKNOWN - is matched against interfaces in parent namespaces. If there - the symtree is set to point to the interface. - -2005-07-16 David Edelsohn - - PR fortran/21730 - * decl.c (do_parm): Adjust character initializer to character length - of symbol before assigning. - -2005-07-14 Steve Ellcey - - * trans-types.c (MAX_REAL_KINDS): Increase from 4 to 5. - -2005-07-14 Jakub Jelinek - - * gfortran.h (MAX_ERROR_MESSAGE): Remove. - (gfc_error_buf): Add allocated and index fields. Change message - field from array to a pointer. - * error.c (use_warning_buffer, error_ptr, warning_ptr): Remove. - (cur_error_buffer): New variable. - (error_char): Use cur_error_buffer->{message,index} instead of - {warning,error}_{buffer.message,ptr}. Reallocate message buffer - if too small. - (gfc_warning, gfc_notify_std, gfc_error, gfc_error_now): Setup - cur_error_buffer and its index rather than {warning,error}_ptr - and use_warning_buffer. - (gfc_warning_check, gfc_error_check): Don't print anything if - message is NULL. - (gfc_push_error): Allocate saved message with xstrdup. - (gfc_pop_error): Free saved message with gfc_free. - (gfc_free_error): New function. - * primary.c (match_complex_constant): Call gfc_free_error if - gfc_pop_error will not be called. - * match.c (gfc_match_st_function): Likewise. - - PR fortran/22417 - * scanner.c (preprocessor_line): Don't treat flag 3 as the start of a new - file. Fix file left but not entered warning. - -2005-07-14 Feng Wang - Steven G. Kargl - - * array.c (resolve_character_array_constructor): Allocate gfc_charlen - for the array and attach to namespace list for automatic deallocation. - -2005-07-13 Andreas Schwab - - * Make-lang.in (fortran/dependency.o): Depend on - $(GFORTRAN_TRANS_DEPS). - -2005-07-11 Jakub Jelinek - - * trans-stmt.c (gfc_trans_forall_loop): Clear maskindex before - the outermost loop. - (gfc_trans_assign_need_temp, gfc_trans_pointer_assign_need_temp, - gfc_trans_forall_1, gfc_evaluate_where_mask, gfc_trans_where_2): - Don't clear maskindexes here. - -2005-07-08 Daniel Berlin - - * trans-decl.c (create_function_arglist): DECL_ARG_TYPE_AS_WRITTEN - is removed. - -2005-07-08 Jakub Jelinek - - * primary.c (gfc_match_rvalue): Handle ENTRY the same way - as FUNCTION. - -2005-07-07 Jakub Jelinek - - * scanner.c (load_line): Add pbuflen argument, don't make - buflen static. If maxlen == 0 or preprocessor_flag, - don't truncate at buflen, but at maxlen. In xrealloc add - 1 byte at the end for the terminating '\0'. Don't fill - with spaces up to buflen, but gfc_option.fixed_line_length. - (load_file): Adjust load_line caller. Add line_len variable. - - * scanner.c (preprocessor_line): Only set current_file->line when errors - have not been encountered. Warn and don't crash if a file leave - preprocessor line has no corresponding entering line. Formatting. - -2005-07-07 Steven Bosscher - - * primary.c (match_hollerith_constant): Use int, not unsigned int, - for the hollerith length. Fix indentation. - -2005-07-07 Feng Wang - - PR fortran/16531 - PR fortran/15966 - PR fortran/18781 - * arith.c (gfc_hollerith2int, gfc_hollerith2real, - gfc_hollerith2complex, gfc_hollerith2character, gfc_hollerith2logical): - New functions. - (eval_intrinsic): Don't evaluate if Hollerith constant arguments exist. - * arith.h (gfc_hollerith2int, gfc_hollerith2real, - gfc_hollerith2complex, gfc_hollerith2character, gfc_hollerith2logical): - Add prototypes. - * expr.c (free_expr0): Free memery allocated for Hollerith constant. - (gfc_copy_expr): Allocate and copy string if Expr is from Hollerith. - (gfc_check_assign): Enable conversion from Hollerith to other. - * gfortran.h (bt): Add BT_HOLLERITH. - (gfc_expr): Add from_H flag. - * intrinsic.c (gfc_type_letter): Return 'h' for BT_HOLLERITH. - (add_conversions): Add conversions from Hollerith constant to other. - (do_simplify): Don't simplify if Hollerith constant arguments exist. - * io.c (resolve_tag): Enable array in FORMAT tag under GFC_STD_GNU. - * misc.c (gfc_basetype_name): Return "HOLLERITH" for BT_HOLLERITH. - (gfc_type_name): Print "HOLLERITH" for BT_HOLLERITH. - * primary.c (match_hollerith_constant): New function. - (gfc_match_literal_constant): Add match Hollerith before Integer. - * simplify.c (gfc_convert_constant): Add conversion from Hollerith - to other. - * trans-const.c (gfc_conv_constant_to_tree): Use VIEW_CONVERT_EXPR to - convert Hollerith constant to tree. - * trans-io.c (gfc_convert_array_to_string): Get array's address and - length to set string expr. - (set_string): Deal with array assigned Hollerith constant and character - array. - * gfortran.texi: Document Hollerith constants as extention support. - -2005-07-07 Feng Wang - - PR fortran/22327 - * trans-array.c (gfc_trans_array_constructor_value): Fix index of data. - -2005-07-07 Jakub Jelinek - - * decl.c (gfc_match_entry): Allow ENTRY without parentheses - even in FUNCTIONs. - -2005-07-03 Kazu Hirata - - * gfortran.texi, intrinsic.texi: Fix typos. - * symbol.c: Fix a comment typo. - -2005-07-03 Kaveh R. Ghazi - - * error.c (error_printf, error_print): Use ATTRIBUTE_GCC_GFC. - * gfortran.h (ATTRIBUTE_GCC_GFC): New. - (gfc_warning, gfc_warning_now, gfc_error, gfc_error_now, - gfc_fatal_error, gfc_internal_error, gfc_notify_std): Use - ATTRIBUTE_GCC_GFC. - -2005-07-03 Francois-Xavier Coudert - - PR fortran/20842 - * io.c (match_dt_element): Do not allow END tag in PRINT or - WRITE statement. - -2005-07-02 Joseph S. Myers - - * lang.opt: Remove "." from end of help texts. - -2005-07-01 Jerry DeLisle - - * gfortran.texi: Fix typos and grammar. - * invoke.texi: Fix typos and grammar. - * intrinsic.texi: Add documentaion for eoshift, epsilon, etime, and - exit. Fixed alignment of text for dtime syntax. Fixed a few line - lengths. - -2005-06-25 Jakub Jelinek - - * trans-stmt.c (gfc_trans_forall_1): Prefer to use smaller logical - type than boolean_type_node. - -2005-06-25 Kelley Cook - - * all files: Update FSF address in copyright headers. - -2005-06-24 Jerry DeLisle - - PR fortran/21915 - * gfortran.h: Add symbols for new intrinsic functions. - * intrinsic.c: Add new functions acosh, asinh, and atanh. - * intrinsic.h: Add prototypes for the new functions. - * iresolve.c (gfc_resolve_acosh): New function. - (gfc_resolve_asinh): New function. - (gfc_resolve_atanh): New function. - * mathbuiltins.def: Add defines. - * simplify.c (gfc_simplify_acosh): New function. - (gfc_simplify_asinh): New function. - (gfc_simplify_atanh): New function. - -2005-06-24 Feng Wang - - * simplify.c (gfc_simplify_modulo): Don't clear before get result. - -2005-06-22 Paul Brook - - PR fortran/21034 - * symbol.c (gfc_is_var_automatic): New function. - (save_symbol): Use it. - -2005-06-21 Tobias Schlueter - Paul Thomas - - PR fortran/22010 - Port from g95. - * module.c (mio_namelist): New function. Correct to set - namelist_tail and to give error on renaming namelist by use - association. - (mio_symbol): Call mio_namelist. - -2005-06-19 Francois-Xavier Coudert - - * gfortran.h: Add flag_backslash compile-time option. - * lang.opt: Add support for -fbackslash option. - * options.c: Likewise. - * primary.c: Implement behavior for -fno-backslash. - * invoke.texi: Add doc for -fbackslash option. - * gfortran.texi: Remove mention of -fno-backslash as a - possible extension. - -2005-06-20 Steven G. Kargl - (port from g95) - - PR fortran/21257 - * match.c (gfc_match_label): Detect duplicate labels. - - -2005-06-20 Erik Edelmann - - * intrinsic.c (check_intrinsic_standard): Fix spelling error - in a warning message. - -2005-06-18 Erik Edelman - Steven G. Kargl - - PR fortran/19926 - * primary.c (gfc_match_rvalue): expr_type can be EXPR_CONSTANT - for an array; check that sym->as is NULL. - - -2005-06-18 Steven G. Kargl - - * intrinsic.c (gfc_intrinsic_func_interface): Enable errors for generic - functions whose simplification routine return FAILURE. - -2005-06-13 Geoffrey Keating - - * Make-lang.in (fortran.install-man): Doesn't depend on installdirs. - (rule for installing f95.1 manpage): Does depend on installdirs. - -2005-06-13 Jakub Jelinek - - PR fortran/22038 - * trans-stmt.c (gfc_trans_forall_loop): Only increment maskindex - in the innermost loop. - - * trans-expr.c (gfc_conv_function_call): Return int instead of - void. Use a local variable for has_alternate_specifier and - return it. Avoid modification of function type's return value - in place, since it may be shared. - * trans.h (has_alternate_specifier): Remove. - (gfc_conv_function_call): Change return type. - * trans-stmt.c (has_alternate_specifier): Remove. - (gfc_trans_call): Add a local has_alternate_specifier variable, - set it from gfc_conv_function_call return value. - -2005-06-12 Richard Henderson - - * trans-array.c (gfc_conv_descriptor_data_get): Rename from - gfc_conv_descriptor_data. Cast the result to the DATAPTR type. - (gfc_conv_descriptor_data_set, gfc_conv_descriptor_data_addr): New. - (gfc_trans_allocate_array_storage): Use them. - (gfc_array_allocate, gfc_array_deallocate): Likewise. - (gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor): Likewise. - (gfc_trans_deferred_array): Likewise. - * trans-expr.c (gfc_conv_function_call): Likewise. - (gfc_trans_subcomponent_assign): Likewise. - (gfc_trans_pointer_assignment): Likewise. - * trans-intrinsic.c (gfc_conv_allocated): Likewise. - * trans-types.c (gfc_array_descriptor_base): New. - (gfc_get_element_type): Use GFC_TYPE_ARRAY_DATAPTR_TYPE. - (gfc_get_array_descriptor_base): Break out from ... - (gfc_get_array_type_bounds): ... here. Create type variants. - * trans-array.h (gfc_conv_descriptor_data_get): Declare. - (gfc_conv_descriptor_data_set, gfc_conv_descriptor_data_addr): Declare. - -2005-06-12 Tobias Schl"uter - - * trans-expr.c (gfc_conv_variable): POINTER results don't need f2c - calling conventions. Look at sym instead of sym->result. - * trans-types.c (gfc_sym_type): Remove workaround for frontend bug. - Remove condition which is always false with workaround removed. - (gfc_return_by_reference): Always look at sym, never at sym->result. - -2005-06-11 Steven G. Kargl - - PR fortran/17792 - PR fortran/21375 - * trans-array.c (gfc_array_deallocate): pstat is new argument - (gfc_array_allocate): update gfc_array_deallocate() call. - (gfc_trans_deferred_array): ditto. - * trans-array.h: update gfc_array_deallocate() prototype. - * trans-decl.c (gfc_build_builtin_function_decls): update declaration - * trans-stmt.c (gfc_trans_deallocate): Implement STAT= feature. - -2005-06-07 Jerry DeLisle - - * intrinsic.texi: Add documentation for dcmplx, digits, - dim, idim, ddim, dot_product, dprod, dreal, and dtime. - -2005-06-05 Tobias Schl"uter - - PR fortran/21912 - * trans-array.c (gfc_trans_array_constructor_value): Slightly reorder. - Generate correct exit condition in case of negative steps in - implied-do loops. - - * invoke.texi: Fix description of flags required for compatibility - with g77. - -2005-06-04 Tobias Schl"uter - Erik Schnetter - - PR fortran/19195 - * trans.c (gfc_get_backend_locus): Remove unnecessary adjustment, - remove FIXME comment. - -2005-06-04 Tobias Schl"uter - - * match.c (match_forall_iterator): Don't immediately give error if '=' - is not followed by an expression. - -2005-06-04 Tobias Schl"uter - Erik Edelmann - - * array.c (gfc_match_array_constructor): Disallow empty array - constructor. - -2005-06-03 Jerry DeLisle - - * fortran/intrinsic.texi: Add documentation for - command_argument_count, conjg, dconjg, count, - cpu_time, cshift, date_and_time, dble, dfloat. - -2005-06-01 Roger Sayle - - * intrinsic.c (add_conv): No longer take a "simplify" argument as - its always gfc_convert_constant, instead take a "standard" argument. - (add_conversions): Change all existing calls of add_conv to pass - GFC_STD_F77 as appropriate. Additionally, if we're allowing GNU - extensions support integer-logical and logical-integer conversions. - (gfc_convert_type_warn): Warn about use the use of these conversions - as a extension when appropriate, i.e. with -pedantic. - * simplify.c (gfc_convert_constant): Add support for integer to - logical and logical to integer conversions, using gfc_int2log and - gfc_log2int. - * arith.c (gfc_log2int, gfc_int2log): New functions. - * arith.h (gfc_log2int, gfc_int2log): Prototype here. - * gfortran.texi: Document this new GNU extension. - -2005-06-01 Paul Thomas - - * fortran/trans-expr.c (gfc_conv_variable): Clean up bracketting. - * fortran/trans-expr.c (gfc_conv_function_call): Insert spaces. - Correct comments and replace convert of integer_one_node with - build_int_cst. - -2005-06-01 Jakub Jelinek - - PR fortran/21729 - * resolve.c (resolve_contained_fntype): Use sym->attr.untyped - to avoid giving error multiple times. - (resolve_entries): Don't error about BT_UNKNOWN here. - (resolve_unknown_f): Capitalize IMPLICIT for consistency. - (resolve_fntype): New function. - (gfc_resolve): Call resolve_fntype. - -2005-06-01 Feng Wang - - PR fortran/20883 - * fortran/io.c (resolve_tag): Fix error message. - -2005-05-31 Kaveh R. Ghazi - - * fortran/trans-decl.c: Don't include errors.h. - * fortran/Make-lang.in: Updates dependencies. - -2005-05-31 Paul Thomas - - PR fortran/18109 - PR fortran/18283 - PR fortran/19107 - * fortran/trans-array.c (gfc_conv_expr_descriptor): Obtain the - string length from the expression typespec character length value - and set temp_ss->stringlength and backend_decl. Obtain the - tree expression from gfc_conv_expr rather than gfc_conv_expr_val. - Dereference the expression to obtain the character. - * fortran/trans-expr.c (gfc_conv_component_ref): Remove the - dereference of scalar character pointer structure components. - * fortran/trans-expr.c (gfc_trans_subarray_assign): Obtain the - string length for the structure component from the component - expression. - -2005-05-30 Roger Sayle - - * gfortran.h (GFC_STD_LEGACY): New "standard" macro. Reindent. - * options.c (gfc_init_options): By default, allow legacy extensions - but warn about them. - (gfc_post_options): Make -pedantic warn about legacy extensions - even with -std=legacy. - (gfc_handle_option): Make -std=gnu follow the default behaviour - of warning about legacy extensions, but allowing them. Make the - new -std=legacy accept everything and warn about nothing. - * lang.opt (std=legacy): New F95 command line option. - * invoke.texi: Document both -std=f2003 and -std=legacy. - * gfortran.texi: Explain the two types of extensions and document - how they are affected by the various -std= command line options. - -2005-05-30 Kazu Hirata - - * trans-expr.c: Remove trailing ^M. - - * trans-expr.c: Fix comment typos. - -2005-05-29 Paul Thomas - - PR fortran/16939 - PR fortran/17192 - PR fortran/17193 - PR fortran/17202 - PR fortran/18689 - PR fortran/18890 - * fortran/trans-array.c (gfc_conv_resolve_dependencies): Add string - length to temp_ss for character pointer array assignments. - * fortran/trans-expr.c (gfc_conv_variable): Correct errors in - dereferencing of characters and character pointers. - * fortran/trans-expr.c (gfc_conv_function_call): Provide string - length as return argument for various kinds of handling of return. - Return a char[]* temporary for character pointer functions and - dereference the temporary upon return. - -2005-05-29 Janne Blomqvist - Steven G. Kargl - - fortran/PR20846 - * io.c (gfc_match_inquire): Implement constraints on UNIT and FILE usage. - -2005-05-29 Francois-Xavier Coudert - - PR libfortran/20006 - * io.c (format_item_1): Add check and extension warning for - $ edit descriptor. - -2005-05-28 Steven G. Kargl - - * arith.c (gfc_arith_init_1): Fix off by one problem; - (gfc_check_integer_range): Chop extra bits in subnormal numbers. - -2005-05-28 Jerry DeLisle - Steven G. Kargl - - * intrinsic.texi: added documentation for BIT_SIZE, BTEST, CHAR, CEILING - and CMPLX - -2005-05-27 Steven G. Kargl - - * trans-array.c (gfc_trans_deferred_array): Use build_int_cst to force - like types in comparsion. - -2005-05-26 Kazu Hirata - - * data.c, parse.c, trans-array.c, trans-decl.c, - trans-intrinsic.c, trans-stmt.c, trans-types.c, trans.c, - trans.h: Fix comment typos. Follow spelling conventions. - -2005-05-22 Roger Sayle - - * gfortran.texi: Document some more GNU extensions. - -2005-05-22 Francois-Xavier Coudert - - * error.c (gfc_warning): Fix typo in comment. - -2005-05-18 Thomas Koenig - - PR libfortran/21127 - * fortran/iresolve.c (gfc_resolve_reshape): Add - gfc_type_letter (BT_COMPLEX) for complex to - to resolved function name. - -2005-05-18 Erik Edelmann - - * array.c (gfc_match_array_constructor): Support [ ... ] - style array constructors. - -2005-05-18 Tobias Schl"uter - - * f95-lang.c (gfc_init_builtin_functions): Define BUILT_IN_TRUNC - and BUILT_IN_TRUNCF instead of BUILT_IN_FLOOR and BUILT_IN_FLOORF. - * trans-intrinsic.c (build_fix_expr): Change 'op' argument - to correct enum type. - (gfc_conv_intrinsic_aint): Likewise. Clarify comment in front of - function. Add default case to switch, deal with FIX_TRUNC_EXPR - instead of FIX_FLOOR_EXPR. - -2005-05-18 Feng Wang - - PR fortran/20954 - * trans-const.c (gfc_conv_const_charlen): Use gfc_charlen_type_node to - build character length. - -2005-05-17 Zdenek Dvorak - - * trans-types.c (gfc_array_range_type): New variable. - (gfc_init_types): Initialize gfc_array_range_type. - (gfc_get_array_type_bounds): Use gfc_array_range_type. - -2005-05-17 Jakub Jelinek - - PR fortran/15080 - * trans-stmt.c (generate_loop_for_temp_to_lhs): Remove SIZE and COUNT2 - arguments. If LSS is gfc_ss_terminator, increment COUNT1 by 1, instead - of incrementing COUNT2 and using COUNT1+COUNT2 increment COUNT1 and use - just that as index. - (generate_loop_for_rhs_to_temp): Likewise. - (compute_overall_iter_number): Add INNER_SIZE_BODY argument. - It non-NULL, add it to body. - (allocate_temp_for_forall_nest_1): New function, split from - allocate_temp_for_forall_nest. - (allocate_temp_for_forall_nest): Add INNER_SIZE_BODY argument, - propagate it down to compute_overall_iter_number. Use - allocate_temp_for_forall_nest_1. - (gfc_trans_assign_need_temp): Remove COUNT2. Call - compute_inner_temp_size into a new stmtblock_t. Adjust calls to - allocate_temp_for_forall_nest, generate_loop_for_rhs_to_temp - and generate_loop_for_temp_to_lhs. - (gfc_trans_pointer_assign_need_temp): Adjust calls to - allocate_temp_for_forall_nest. - (gfc_evaluate_where_mask): Call compute_inner_temp_size into a new - stmtblock_t. Call compute_overall_iter_number just once, then - allocate_temp_for_forall_nest_1 twice with the same size. - Initialize mask indexes if nested_forall_info != NULL. - (gfc_trans_where_2): Initialize mask indexes before calling - gfc_trans_nested_forall_loop. - -2005-05-15 Feng Wang - Jerry DeLisle - - PR fortran/17432 - * trans-stmt.c (gfc_trans_label_assign): fix pointer type, to - resolve ICE on assign of format label. - * trans-io.c (set_string): add fold-convert to properly - handle assigned format label in write. - -2005-05-13 Paul Brook - - * trans-stmt.c (gfc_trans_forall_1): Fix comment typo. - -2005-05-12 Tobias Schl"uter - - * trans-types.c (gfc_is_nodesc_array): Remove redundant check. - -2005-05-11 Tobias Schl"uter - - PR fortran/21260 - * io.c (check_format): Look for literal characters inside - hollerith constant. - -2005-05-11 Tobias Schl"uter - - * resolve.c (resolve_symbol): Copy 'pointer' and 'dimension' - attribute from result symbol to function symbol. - * trans-expr.c (gfc_conv_function_call): Look at sym->attr.dimension - instead of sym->result->attr.dimension. - -2005-05-10 Tobias Schl"uter - - PR fortran/20178 - * gfortran.h (gfc_option): Add flag_f2c. - * invoke.texi: Document '-ff2c' command line option. Adapt - documentation for '-fno-second-underscore' and '-fno-underscoring'. - * lang.opt (ff2c): New entry. - * options.c (gfc-init_options): Set default calling convention - to -fno-f2c. Mark -fsecond-underscore unset. - (gfc_post_options): Set -fsecond-underscore if not explicitly set - by user. - (handle_options): Set gfc_option.flag_f2c according to requested - calling convention. - * trans-decl.c (gfc_get_extern_function_decl): Use special f2c - intrinsics where necessary. - (gfc_trans_deferred_vars): Change todo error to assertion. - * trans-expr.c (gfc_conv_variable): Dereference access - to hidden result argument. - (gfc_conv_function_call): Add hidden result argument to argument - list if f2c calling conventions requested. Slightly restructure - tests. Convert result of default REAL function to requested type - if f2c calling conventions are used. Dereference COMPLEX result - if f2c cc are used. - * trans-types.c (gfc_sym_type): Return double for default REAL - function if f2c cc are used. - (gfc_return_by_reference): Slightly restructure logic. Return - COMPLEX by reference depending on calling conventions. - (gfc_get_function_type): Correctly make hidden result argument a - pass-by-reference argument for COMPLEX. Remove old code which does - this for derived types. - -2005-05-09 Tobias Schl"uter - - * match.c (gfc_match_return): Only require space after keyword when - it is obligatory. Only give stdwarn to after matching is successful. - * dump-parse-tree.c (gfc_show_symbol): Deal with alternate returns. - -2005-05-08 Kazu Hirata - - * intrinsic.texi: Fix typos. - -2005-05-07 Steven G. Kargl - - * intrinsic.texi: Document ASSOCIATED and ATAN2. Update Bessel function - description to include information about scalar arguments. - -2005-05-03 Kazu Hirata - - * Make-lang.in, dump-parse-tree.c, invoke.texi, lang.opt, - match.h, trans-array.h: Update copyright. - -2005-04-29 Tom Tromey - - * f95-lang.c (poplevel): Updated for change to build_block. - -2005-04-29 Jakub Jelinek - - PR fortran/13082 - PR fortran/18824 - * trans-expr.c (gfc_conv_variable): Handle return values in functions - with alternate entry points. - * resolve.c (resolve_entries): Remove unnecessary string termination - after snprintf. Set result of entry master. - If all entries have the same type, set entry master's type - to that common type, otherwise set mixed_entry_master attribute. - * trans-types.c (gfc_get_mixed_entry_union): New function. - (gfc_get_function_type): Use it for mixed_entry_master functions. - * gfortran.h (symbol_attribute): Add mixed_entry_master bit. - * decl.c (gfc_match_entry): Set entry->result properly for - function ENTRY. - * trans-decl.c (gfc_get_symbol_decl): For entry_master, skip over - __entry argument. - (build_entry_thunks): Handle return values in entry thunks. - Clear BT_CHARACTER's ts.cl->backend_decl, so that it is not - shared between multiple contexts. - (gfc_get_fake_result_decl): Use DECL_ARGUMENTS from - current_function_decl instead of sym->backend_decl. Skip over - entry master's entry id argument. For mixed_entry_master entries or - their results, return a COMPONENT_REF of the fake result. - (gfc_trans_deferred_vars): Don't warn about missing return value if - at least one entry point uses RESULT. - (gfc_generate_function_code): For entry master returning - CHARACTER, copy ts.cl->backend_decl to all entry result syms. - * trans-array.c (gfc_trans_dummy_array_bias): Don't consider return - values optional just because they are in entry master. - -2005-04-29 Francois-Xavier Coudert - - * gfortran.h (gfc_namespace): Add seen_implicit_none field, - Tobias forgot this in previous commit. - -2005-04-29 Paul Brook - - * trans-expr.c (gfc_conv_expr_present): Fix broken assert. Update - comment. - -2005-04-29 Tobias Schl"uter - - * gfortran.h (gfc_namespace): Add seen_implicit_none field. - * symbol.c (gfc_set_implicit_none): Give error if there's a previous - IMPLICIT NONE, set seen_implicit_none. - (gfc_merge_new_implicit): Error if there's an IMPLICIT NONE statement. - -2005-04-28 Tobias Schl"uter - - * gfortran.h (gfc_gsymbol): Make name a const char *. - * symbol.c (gfc_get_gsymbol): Allocate gsymbol name via - gfc_get_string. - -2005-04-28 Francois-Xavier Coudert - - PR fortran/20865 - * resolve.c (resolve_actual_arglist): Issue an error if a statement - functions is used as actual argument. - -2005-04-27 Francois-Xavier Coudert - - PR fortran/21177 - * interface.c (compare_parameter): Ignore type for EXPR_NULL - only if type is BT_UNKNOWN. - -2005-04-25 Paul Brook - Steven G. Kargl - - PR fortran/20879 - * check.c (gfc_check_ichar_iachar): New function. - * instinsic.h (gfc_check_ichar_iachar): Add prototype. - * intrinsic.c (add_functions): Use it. - * primary.c (match_varspec, gfc_match_rvalue): Clear incorrect - character expression lengths. - -2005-04-24 Tobias Schl"uter - - PR fortran/20059 - * trans-common.c (translate_common): Cast offset and - common_segment->offset to type int for warning message. - -2005-04-23 DJ Delorie - - * trans-decl.c: Adjust warning() callers. - -2005-04-23 Tobias Schl"uter - - * trans-const.c (gfc_conv_mpfr_to_tree): Use hexadecimal string as - intermediate representation. Fix typo in comment. - -2005-04-21 Steven G. Kargl - - * trans-const.c (gfc_conv_mpfr_to_tree): Remove unneeded computation; - simplify logic; Add a gcc_assert. - -2005-04-19 Steven G. Kargl - - * trans-const.c (gfc_conv_mpz_to_tree): Fix comment. - -2005-04-19 Arnaud Desitter - Steven G. Kargl - - * invoke.texi: Update -Waliasing description - -2005-04-19 Francois-Xavier Coudert - - PR fortran/16861 - * resolve.c (resolve_variable): If e->symtree is not set, this - ought to be a FAILURE, and not a segfault. - -2005-04-17 Paul Thomas - - PR fortran/17472 - PR fortran/18209 - PR fortran/18396 - PR fortran/19467 - PR fortran/19657 - * fortran/trans-io.c (gfc_build_io_library_fndecls): Create - declaration for st_set_nml_var and st_set_nml_var_dim. Remove - declarations of old namelist functions. - (build_dt): Simplified call to transfer_namelist_element. - (nml_get_addr_expr): Generates address expression for start of - object data. New function. - (nml_full_name): Qualified name for derived type components. New - function. - (transfer_namelist_element): Modified for calls to new functions - and improved derived type handling. - -2005-04-17 Richard Guenther - - * scanner.c (gfc_next_char_literal): Reset truncation flag - for lines ending in a comment for both fixed and free form. - (load_line): Do not set truncated flag if only truncating - the EOL marker. - -2005-04-15 Richard Guenther - - PR fortran/14569 - * gfortran.h (gfc_linebuf): Add truncated field. - * parse.c (next_statement): Handle warning for truncated - lines. - * scanner.c (load_line): Return if line was truncated. - No longer warn for truncated lines. Remove unused parameters. - (load_file): Store load_line return value to linebuf. - (gfc_error_recovery): Do not advance line at the end. - -2005-04-14 Steven G. Kargl - - * gfortran.h (gfc_real_info): Add subnormal struct member. - * arith.c (gfc_arith_init_1): Set it. - (gfc_check_real_range): Use it. - * simplify.c (gfc_simplify_nearest): Fix nearest(0.,1.). - -2005-04-12 Kazu Hirata - - * simplify.c: Fix a comment typo. - -2005-04-11 Richard Sandiford - - * lang.opt: Refer to the GCC internals documentation instead of c.opt. - -2005-04-11 Tobias Schl"uter - - * simplify.c (gfc_simplify_nearest): Overhaul. - -2005-04-10 Kazu Hirata - - * interface.c: Fix a comment typo. - -2005-04-10 Francois-Xavier Coudert - - * match.c (match_arithmetic_if): Arithmetic IF is obsolete in - Fortran 95. - -2005-04-09 Steven G. Kargl - - * simplify.c (gfc_simplify_anint): Use mpfr_round() - (gfc_simplify_dnint): ditto. - (gfc_simplify_nint): ditto. - -2005-04-09 Andrew Pinski - - PR fortran/13257 - * io.c (check_format): Allow an optional comma - between descriptors. - -2005-04-09 Francois-Xavier Coudert - - * match.c (match_arithmetic_if): Remove gfc_ prefix and correct - comment according to GNU coding style. - (gfc_match_if): Remove gfc_ prefix in call to - match_arithmetic_if. - -2005-04-08 Diego Novillo - - * match.c (gfc_match_arithmetic_if): Declare static. - -2005-04-08 Francois-Xavier Coudert - - PR fortran/17229 - * match.c (gfc_match_arithmetic_if): New function to match an - arithmetic IF statement. - (gfc_match_if): Use gfc_match_arithmetic_if to match an - arithmetic IF statement embedded in a simple IF statement. - -2005-04-07 Steven G. Kargl - - * simplify.c (gfc_simplify_exponent): Fix exponent(tiny(x)) - -2005-04-06 Steven G. Kargl - - * invoke.texi: Remove documentation of -std=f90 - -2005-04-06 Tobias Schl"uter - - * expr.c (gfc_check_assign): Don't allow NULL as rhs in a - non-pointer assignment. - -2005-04-05 Feng Wang - - PR fortran/15959 - PR fortran/20713 - - * array.c (resolve_character_array_constructor): New function. Set - constant character array's character length. - (gfc_resolve_array_constructor): Use it. - * decl.c (add_init_expr_to_sym): Set symbol and initializer character - length. - (gfc_set_constant_character_len): New function. Set constant character - expression according the given length. - * match.h (gfc_set_constant_character_len): Add prototype. - -2005-04-04 Francois-Xavier Coudert - - * intrinsic.texi: BES?? functions are not in the f95 standard. - -2005-04-03 Francois-Xavier Coudert - - * intrinsic.texi: Document COS, EXP, LOG, LOG10, SIN, SQRT, TAN. - -2005-04-03 Francois-Xavier Coudert - - * intrinsic.texi: Document BESJ0, BESJ1, BESJN, BESY0, BESY1, - BESYN, ATAN, COSH, ERF, ERC, SINH, TANH. - -2005-04-02 Steven G. Kargl - - * intrinsic.texi: Document ALLOCATED, ANINT, ANY, ASIN; fix typos - -2005-04-01 Kazu Hirata - - * decl.c, f95-lang.c, interface.c, module.c, trans-stmt.c, - trans.h: Fix comment typos. - -2005-03-29 Steven G. Kargl - - * gfortran.h (option_t): Change d8, i8, r8 to flag_default_double, - flag_default_integer, flag_default_real - * invoke.texi: Update documentation - * lang.opt: Remove d8, i8, r8 definitions; Add fdefault-double-8 - fdefault-integer-8, and fdefault-real-8 definitions. - * options.c (gfc_init_options): Set option defaults - (gfc_handle_option): Handle command line options. - * trans-types.c (gfc_init_kinds): Use options. - -2005-03-29 Keith Besaw - - * f95-lang.c (builtin_function): Process the attrs parameter - and apply the "const" attribute to the builtin if found. - -2005-03-27 Steven G. Kargl - - * intrinsic.texi: Document AIMAG, AINT, ALL - -2005-03-26 Steven G. Kargl - - * arith.c (check_result): Fix illogical logic. - -2005-03-26 Canqun Yang - - * trans-common.c (create_common): Build RECORD_NODE for common blocks - contain no equivalence objects. - (add_equivalences): New argument saw_equiv. - (trans_common): New local variable saw_equiv. - (finish_equivalences): Add a local variable dummy, Always pass true - for the 3rd parameter to create_common. - -2005-03-25 Steven G. Kargl - - * intrinsic.texi: Fix "make dvi" - -2005-03-24 Steven G. Kargl - - * intrinsic.texi: New file. - * gfortran.texi: Include it; white space change; fix typo. - -2005-03-23 Joseph S. Myers - - * f95-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove. - -2005-03-23 Steven Bosscher - - * convert.c (convert): Replace fold (buildN (...)) with fold_buildN. - * trans-array.c (gfc_trans_allocate_array_storage, - gfc_trans_allocate_temp_array gfc_trans_array_constructor_value, - gfc_conv_array_index_ref, gfc_trans_array_bound_check, - gfc_conv_array_index_offset, gfc_conv_scalarized_array_ref, - gfc_conv_array_ref, gfc_trans_preloop_setup, gfc_conv_ss_startstride, - gfc_conv_loop_setup, gfc_array_init_size, gfc_trans_array_bounds, - gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias, - gfc_conv_expr_descriptor): Likewise. - * trans-expr.c (gfc_conv_powi, gfc_conv_string_tmp, - gfc_conv_concat_op, gfc_conv_expr_op): Likewise. - * trans-intrinsic.c (build_round_expr, gfc_conv_intrinsic_bound, - gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_sign, - gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_minmaxval, - gfc_conv_intrinsic_btest, gfc_conv_intrinsic_bitop, - gfc_conv_intrinsic_singlebitop, gfc_conv_intrinsic_ibits, - gfc_conv_intrinsic_ishft, gfc_conv_intrinsic_ishftc, - gfc_conv_intrinsic_merge, prepare_arg_info, - gfc_conv_intrinsic_rrspacing, gfc_conv_intrinsic_repeat): Likewise. - * trans-stmt.c (gfc_trans_simple_do, gfc_trans_do, gfc_trans_do_while, - gfc_trans_forall_loop, gfc_do_allocate, generate_loop_for_temp_to_lhs, - generate_loop_for_rhs_to_temp, compute_inner_temp_size, - allocate_temp_for_forall_nest, gfc_trans_pointer_assign_need_temp, - gfc_trans_forall_1, gfc_evaluate_where_mask, gfc_trans_where_assign): - Likewise. - * trans-types.c (gfc_get_dtype, gfc_get_array_type_bounds): Likewise. - * trans.c (gfc_add_modify_expr): Likewise. - -2005-03-22 Francois-Xavier Coudert - - * check.c (gfc_check_chdir, gfc_check_chdir_sub, gfc_check_kill, - gfc_check_kill_sub, gfc_check_link, gfc_check_link_sub, - gfc_check_symlnk, gfc_check_symlnk_sub, gfc_check_rename, - gfc_check_rename_sub, gfc_check_sleep_sub, gfc_check_gerror, - gfc_check_getlog, gfc_check_hostnm, gfc_check_hostnm_sub, - gfc_check_perror): new functions to check newly implemented - g77 intrinsics. - * gfortran.h: adding symbols for new intrinsics. - * intrinsic.c (add_functions): adding new intrinsics. - (add_subroutines): adding new intrinsics. - * intrinsic.h: prototype for all checking and resolving - functions. - * iresolve.c (gfc_resolve_chdir, gfc_resolve_chdir_sub, - gfc_resolve_hostnm, gfc_resolve_ierrno, gfc_resolve_kill, - gfc_resolve_link, gfc_resolve_rename, gfc_resolve_symlnk, - gfc_resolve_time, gfc_resolve_time8, gfc_resolve_rename_sub, - gfc_resolve_kill_sub, gfc_resolve_link_sub, - gfc_resolve_symlnk_sub, gfc_resolve_sleep_sub, - gfc_resolve_gerror, gfc_resolve_getlog, gfc_resolve_hostnm_sub, - gfc_resolve_perror): new functions to resolve intrinsics. - * trans-intrinsic.c (gfc_conv_intrinsic_function): add case - for new symbols. - -2005-03-19 Tobias Schl"uter - - * dump-parse-tree.c (gfc_show_expr): Dump name of namespace - in which the variable is declared. - - PR fortran/18525 - * resolve.c (was_declared): Also check for dummy attribute. - -2005-03-19 Tobias Schl"uter - - * gfortran.h (arith): Remove ARITH_0TO0. - * arith.c (gfc_arith_error): Remove handling of ARITH_0TO0. - (gfc_arith_power): Remove special casing of zero to integral - power zero. - -2005-03-18 Kaveh R. Ghazi - - * Make-lang.in (fortran-warn): Remove -Wno-error. - (expr.o-warn, resolve.o-warn, simplify.o-warn, - trans-common.o-warn): Specify -Wno-error. - -2005-03-17 Tobias Schl"uter - - * trans-array.c (gfc_trans_static_array_pointer, - get_array_ctor_var_strlen, gfc_conv_array_index_offset): Fix - comment and formatting typos. - -2005-03-17 Francois-Xavier Coudert - - * invoke.texi: Fix typos. - -2005-03-15 Zack Weinberg - - * Make-lang.in (GFORTRAN_TEXI): Add gcc-vers.texi. - -2005-03-15 Feng Wang - - * trans-stmt.c (gfc_trans_label_assign): Don't set DECL_ARTIFICIAL flag - to zero on label_tree. - -2005-03-15 Feng Wang - - PR fortran/18827 - * io.c (resolve_tag): Add checking on assigned label. - (match_dt_format): Does not set symbol assign attribute. - * match.c (gfc_match_goto):Does not set symbol assign attribute. - * resolve.c (resolve_code): Add checking on assigned label. - * trans-common.c (build_field): Deals with common variable assigned - a label. - * trans-stmt.c (gfc_conv_label_variable): New function. - (gfc_trans_label_assign): Use it. - (gfc_trans_goto): Ditto. - * trans-io.c (set_string): Ditto. - * trans.h (gfc_conv_label_variable): Add prototype. - -2005-03-14 Tobias Schl"uter - - PR fortran/20467 - * symbol.c (check_conflict): A dummy argument can't be a statement - function. - -2005-03-14 Zdenek Dvorak - - * fortran/trans-intrinsic.c (gfc_conv_intrinsic_ishft): Convert - the argument of the shift to the unsigned type. - -2005-03-13 Tobias Schl"uter - - PR fortran/16907 - * resolve.c (gfc_resolve_index): Allow REAL indices as an extension. - -2005-03-13 Tobias Schl"uter - - PR fortran/20323 - * resolve.c (gfc_resolve): Check if character lengths are - specification expressions. - -2005-03-12 Tobias Schl"uter - - PR fortran/20361 - * trans-array.c (gfc_stack_space_left): Remove unused variable. - (gfc_can_put_var_on_stack): Move to trans-decl.c, remove #if 0'ed - code. - * trans-array.h (gfc_stack_space_left, gfc_can_put_var_on_stack): - Remove declaration / prototype. - * trans-common.c (build_equiv_decl): Give union a name. Check if - it can be put on the stack. - * trans-decl.c (gfc_stack_space_left): Move function here. - (gfc_build_qualified_array): Fix comment typo. - * trans.h (gfc_put_var_on_stack): Add prototype. - -2005-03-11 Kaveh R. Ghazi - - * Make-lang.in (fortran-warn): Set to $(STRICT_WARN) -Wno-error. - * decl.c, trans.c: Don't use C++ style comments. - * gfortran.h (sym_flavor, procedure_type, sym_intent, gfc_access, - ifsrc): Give names to enums and use ENUM_BITFIELD. - (gfc_access): Remove trailing comma. - -2005-03-05 Steven G. Kargl - - PR 19936 - * primary.c (match_complex_constant): Mangled complex constant may - be an implied do-loop. Give implied do-loop matcher a chance. - -2005-03-05 Steven G. Kargl - - PR fortran/19754 - * resolve.c (compare_shapes): New function. - (resolve_operator): Use it. - -2005-03-05 Tobias Schl"uter - - * trans-const.c (gfc_conv_constant_to_tree): Use correct tree - type for COMPLEX constants. - -2005-03-04 Tobias Schl"uter - - PR fortran/19673 - * trans-expr.c (gfc_conv_function_call): Correctly dereference - argument from a pointer function also if it has a result clause. - -2005-03-04 Steven G. Kargl - - * expr.c (gfc_copy_shape_excluding): Change && to ||. - -2005-03-04 Tobias Schl"uter - - * trans-intrinsic.c (gfc_get_symbol_for_expr): Fix comment typo, - clarify comment. - -2005-02-28 Tobias Schl"uter - (port from g95) - - PR fortran/19479 - * simplify.c (gfc_simplify_bound): Rename to ... - (simplify_bound): ... this and overhaul. - -2005-02-28 Steven G. Kargl - - * trans-intrinsic.c (gfc_conv_intrinsic_iargc): remove boolean argument. - (gfc_conv_intrinsic_function): update function calls - -2005-02-27 Steven G. Kargl - - PR fortran/20058 - * trans-types.c (gfc_max_integer_kind): Declare - (gfc_init_kinds): Initialize it. - * gfortran.h (gfc_max_integer_kind): extern it. - * primary.c (match_boz_constant): Use it; remove gfortran extension - of kind suffixes on BOZ literal constants - - -2005-02-27 Steven G. Kargl - - * arith.c (gfc_check_real_range): Remove multiple returns - (check_result): New function. - (gfc_arith_uminus,gfc_arith_plus,gfc_arith_times, - gfc_arith_divide,gfc_arith_power,gfc_arith_minus): Use it. - - -2005-02-24 Volker Reichelt - - * decl.c, resolve.c, trans-array.c, trans.h: Fix comment typo(s). - - -2005-02-24 Tobias Schl"uter - - Unrevert previously reverted patch. Adding this fix: - * module.c (find_true_name): Deal with NULL module. - -2005-02-24 Tobias Schl"uter - - Revert yesterday's patch: - 2005-02-23 Tobias Schl"uter - - * gfortran.h (gfc_component, gfc_actual_arglist, ... - ... argument. Copy string instead of pointing to it. - -2005-02-23 Tobias Schl"uter - - * gfortran.h (gfc_get_namespace): Add second argument to prototype. - * intrinsic.c (gfc_intrinsic_init_1): Pass second argument to - gfc_get_namespace. - * module.c (mio_namespace_ref, load_needed): Likewise. - * parse.c (parse_interface, parse_contained): Likewise. Here the - correct second argument matters. - * symbol.c (gfc_get_namespace): Add parent_types argument, only copy - parent's implicit types if this is set. - (gfc_symbol_init_2): Pass second argument to gfc_get_namespace. - * trans-common.c (build_common_decl): Likewise. - - * gfortran.h (symbol_attribute): New 'untyped' field, fix comment - formatting. - * symbol.c (gfc_set_default_type): Issue error only once, by setting - and checking 'untyped' attribute. - - * gfortran.h (gfc_expr): Move 'operator', 'op1', 'op2', and 'uop' - fields into new struct 'op' inside the 'value' union. - * arith.c (eval_intrinsic): Adapt all users. - * dependency.c (gfc_check_dependency): Likewise. - * dump-parse-tree.c (gfc_show_expr): Likewise. - * expr.c (gfc_get_expr): Don't clear removed fields. - (free_expr0, gfc_copy_expr, gfc_type_convert_binary, - gfc_is_constant_expr, simplify_intrinsic_op, check_init_expr, - check_intrinsic_op): Adapt to new field names. - * interface.c (gfc_extend_expr): Likewise. Also explicitly - nullify 'esym' and 'isym' fields of new function call. - * iresolve.c (gfc_resolve_dot_product, gfc_resolve_matmul): - Adapt to renamed structure fields. - * matchexp.c (build_node, match_level_1, match_expr): Likewise. - * module.c (mio_expr): Likewise. - * resolve.c (resolve_operator): Likewise. - (gfc_find_forall_index): Likewise. Only look through operands - if dealing with EXPR_OP - * trans-array.c (gfc_walk_op_expr): Adapt to renamed fields. - * trans-expr.c (gfc_conv_unary_op, gfc_conv_power_op, - gfc_conv_concat_op, gfc_conv_expr_op): Likewise. - - [ Reverted ] - * gfortran.h (gfc_component, gfc_actual_arglist, gfc_user_op): Make - 'name' a 'const char *'. - (gfc_symbol): Likewise, also for 'module'. - (gfc_symtree): Make 'name' a 'const char *'. - (gfc_intrinsic_sym): Likewise, also for 'lib_name'. - (gfc_get_gsymbol, gfc_find_gsymbol): Add 'const' qualifier to - 'char *' argument. - (gfc_intrinsic_symbol): Use 'gfc_get_string' instead of 'strcpy' to - initialize 'SYM->module'. - * check.c (gfc_check_minloc_maxloc, check_reduction): Check for NULL - pointer instead of empty string. - * dump-parse-tree.c (gfc_show_actual_arglist): Likewise. - * interface.c (gfc_compare_types): Adapt check to account for possible - NULL pointer. - (compare_actual_formal): Check for NULL pointer instead of empty - string. - * intrinsic.c (gfc_current_intrinsic, gfc_current_intrinsic_arg): - Add 'const' qualifier. - (conv_name): Return a heap allocated string. - (find_conv): Add 'const' qualifier to 'target'. - (add_sym): Use 'gfc_get_string' instead of 'strcpy'. - (make_generic): Check for NULL pointer instead of empty string. - (make_alias): Use 'gfc_get_string' instead of 'strcpy'. - (add_conv): No need to strcpy result from 'conv_name'. - (sort_actual): Check for NULL pointer instead of empty string. - * intrinsic.h (gfc_current_intrinsic, gfc_current_intrinsic_arg): - Adapt prototype. - * module.c (compare_true_names): Compare pointers instead of strings - for 'module' member. - (find_true_name): Initialize string fields with gfc_get_string. - (mio_pool_string): New function. - (mio_internal_string): Adapt comment. - (mio_component_ref, mio_component, mio_actual_arg): Use - 'mio_pool_string' instead of 'mio_internal_string'. - (mio_symbol_interface): Add 'const' qualifier to string arguments. - Add level of indirection. Use 'mio_pool_string' instead of - 'mio_internal_string'. - (load_needed, read_module): Use 'gfc_get_string' instead of 'strcpy'. - (write_common, write_symbol): Use 'mio_pool_string' instead of - 'mio_internal_string'. - (write_symbol0, write_symbol1): Likewise, also check for NULL pointer - instead of empty string. - (write_operator, write_generic): Pass correct type variable to - 'mio_symbol_interface'. - (write_symtree): Use 'mio_pool_string' instead of - 'mio_internal_string'. - * primary.c (match_keyword_arg): Adapt check to possible - case of NULL pointer. Use 'gfc_get_string' instead of 'strcpy'. - * symbol.c (gfc_add_component, gfc_new_symtree, delete_symtree, - gfc_get_uop, gfc_new_symbol): Use 'gfc_get_string' instead of - 'strcpy'. - (ambiguous_symbol): Check for NULL pointer instead of empty string. - (gfc_find_gsymbol, gfc_get_gsymbol): Add 'const' qualifier on string - arguments. - * trans-array.c (gfc_trans_auto_array_allocation): Check for NULL - pointer instead of empty string. - * trans-decl.c (gfc_sym_mangled_identifier, - gfc_sym_mangled_function_id, gfc_finish_var_decl, gfc_get_symbol_decl, - gfc_get_symbol_decl): Likewise. - * trans-io.c (gfc_new_nml_name_expr): Add 'const' qualifier to - argument. Copy string instead of pointing to it. - -2005-02-23 Kazu Hirata - - * intrinsic.h, st.c: Update copyright. - -2005-02-20 Steven G. Kargl - - * symbol.c: Typos in comments. - -2005-02-20 Steven G. Kargl - - * expr.c (gfc_type_convert_binary): Typo in comment. - -2005-02-19 Steven G. Kargl - - * check.c (gfc_check_selected_int_kind): New function. - * intrinsic.h: Prototype it. - * intrinsic.c (add_function): Use it. - * simplify (gfc_simplify_ceiling,gfc_simplify_floor): Change - BT_REAL to BT_INTEGER and use gfc_default_integer_kind. - -2005-02-19 Steven G. Kargl - - * check.c (gfc_check_int): improve checking of optional kind - * simplify.c (gfc_simplify_int): Change BT_REAL to BT_INTEGER - -2005-02-19 Steven G. Kargl - - * check.c (gfc_check_achar): New function - * intrinsic.h: Prototype it. - * intrinsic.c (add_function): Use it. - -2005-02-13 Tobias Schl"uter - - * trans-stmt.c (generate_loop_for_temp_to_lhs, - generate_loop_for_rhs_to_temp): Remove if whose condition is - always true. - -2005-02-12 Tobias Schl"uter - - * symbol.c (gfc_use_ha_derived): Remove, fold functionality into ... - (gfc_use_derived): ... this function. - -2005-02-09 Richard Henderson - - * f95-lang.c (gfc_init_builtin_functions): Call - build_common_builtin_nodes; do not define any functions handled - by it. - -2005-02-08 Tobias Schl"uter - - * expr.c (gfc_copy_expr): Don't copy 'op1' and 'op2' for - EXPR_SUBSTRING. - (gfc_is_constant_expr): Check 'ref' to determine if substring - reference is constant. - (gfc_simplify_expr): Simplify 'ref' instead of 'op1' and 'op2'. - (check_init_expr, check_restricted): Check 'ref' instead of 'op1' - and 'op2'. - * module.c (mio_expr): Read / write 'ref' instead of 'op1' and 'op2'. - -2005-02-07 Tobias Schl"uter - - * gfortran.h (gfc_add_dimension, gfc_add_result, gfc_add_save, - gfc_add_dummy, gfc_add_generic, gfc_add_in_common, gfc_add_data, - gfc_add_in_namelist, gfc_add_sequence, gfc_add_function, - gfc_add_subroutine, gfc_add_access, gfc_add_flavor, gfc_add_entry, - gfc_add_procedure): Add argument. - * array.c (gfc_set_array_spec), decl.c (var_element, get_proc_name, - gfc_match_null, match_type_spec, match_attr_spec, - gfc_match_formal_arglist, match_result, gfc_match_function_decl): - Update callers to match. - (gfc_match_entry): Likewise, fix comment typo. - (gfc_match_subroutine, attr_decl1, gfc_add_dimension, - access_attr_decl, do_parm, gfc_match_save, gfc_match_modproc, - gfc_match_derived_decl): Update callers. - * interface.c (gfc_match_interface): Likewise. - * match.c (gfc_match_label, gfc_add_flavor, - gfc_match_call, gfc_match_common, gfc_match_block_data, - gfc_match_namelist, gfc_match_module, gfc_match_st_function): - Likewise. - * parse.c (parse_derived, parse_interface, parse_contained), - primary.c (gfc_match_rvalue, gfc_match_variable): Likewise. - * resolve.c (resolve_formal_arglist, resolve_entries): Update callers. - * symbol.c (check_conflict, check_used): Add new 'name' argument, - use when printing error message. - (gfc_add_dimension, gfc_add_result, gfc_add_save, gfc_add_dummy, - gfc_add_generic, gfc_add_in_common, gfc_add_data, - gfc_add_in_namelist, gfc_add_sequence, gfc_add_function, - gfc_add_subroutine, gfc_add_access, gfc_add_flavor, gfc_add_entry, - gfc_add_procedure): Add new 'name' argument. Pass along to - check_conflict and check_used. - (gfc_add_allocatable, gfc_add_external, gfc_add_intrinsic, - gfc_add_optional, gfc_add_pointer, gfc_add_target, gfc_add_elemental, - gfc_add_pure, gfc_add_recursive, gfc_add_intent, - gfc_add_explicit_interface, gfc_copy_attr): Pass NULL for new - argument in calls to any of the modified functions. - -2005-02-06 Joseph S. Myers - - * gfortran.texi: Don't give last update date. - -2006-01-30 Richard Henderson - - * options.c (gfc_init_options): Zero flag_errno_math. - -2005-01-29 Paul Brook - - PR fortran/18565 - * check.c (real_or_complex_check): New function. - (gfc_check_fn_c, gfc_check_fn_r, gfc_check_fn_rc): New functions. - * intrinsic.c (add_functions): Use new check functions. - * intrinsic.h (gfc_check_fn_c, gfc_check_fn_r, gfc_check_fn_rc): - Add prototypes. - -2005-01-29 Steven G. Kargl - - PR fortran/19589 - * expr.c (gfc_check_assign): Check for conformance of logical operands - -2004-01-27 Steven Bosscher - - * trans-decl.c (gfc_build_label_decl): Set DECL_ARTIFICAL and - TREE_USED for all labels. - (gfc_trans_entry_master_switch): Use it instead of building a - label by hand. - * trans-io.c (add_case): Likewise. - * trans-stmt.c (gfc_trans_integer_select): Likewise. - -2004-01-23 Paul Brook - Steven G. Kargl - - PR fortran/17941 - * arith.c (gfc_convert_real): Remove sign handling. - * primary.c (match_digits): Allow whitespace after initial sign. - (match_real_const): Handle signs here. Allow whitespace after - initial sign. Remove dead code. - (match_const_complex_part): Remove. - (match_complex_part): Use match_{real,integer}_const. - (match_complex_constant): Cross-promote integer types. - -2005-01-23 James A. Morrison - - PR fortran/19294 - * iresolve.c (gfc_resolve_transpose): Resolve to transpose_c4 or - transpose_c8 for complex types. - -2005-01-23 Kazu Hirata - - * data.c, dependency.c, f95-lang.c, io.c, trans-array.c, - trans-decl.c, trans-expr.c, trans-intrinsic.c, trans-io.c, - trans-stmt.c, trans-types.c, trans.h: Fix comment typos. - Follow spelling conventions. - -2005-01-22 Bud Davis - - PR fortran/19313 - * trans-io.c (gfc_trans_inquire): Added code to support - pad. - -2005-01-22 Steven G. Kargl - - * intrinsic.c (make_alias): Add standard argument. - (add_functions): Update make_alias calls. - -2005-01-22 Paul Brook - - * trans-expr.c (gfc_conv_function_call): Remove bogus TODO. - -2005-01-22 Paul Brook - - * gfortran.h (gfc_check_access): Add prototype. - * match.c (gfc_match_namelist): Remove TODO. - * module.c (check_access): Rename ... - (gfc_check_access): ... to this. Boolify. Update callers. - * resolve.c (resolve_symbol): Check for private objects in public - namelists. - -2005-01-22 Paul Brook - - * primary.c (gfc_match_rvalue): Only apply implicit type if variable - does not have an explicit type. - (gfc_match_variable): Resolve implicit derived types in all cases. - Resolve contained function types from their own namespace, not the - parent. - * resolve.c (resolve_contained_fntype): Remove duplicate sym->result - checking. Resolve from the contained namespace, not the parent. - -2005-01-22 Tobias Schl"uter - - PR fortran/19543 - * trans-const.c (gfc_conv_constant_to_tree): Give logical - constants the correct type. - - PR fortran/19194 - * trans-io.c (ADD_STRING): Use gfc_charlen_type_node for string - length parameters. - (gfc_build_io_library_fndecls): 'rec' and 'recl_in' are not - pointer fields. - -2005-01-18 Kazu Hirata - - * arith.c, array.c, check.c, decl.c, expr.c, f95-lang.c, - gfortran.h, interface.c, intrinsic.c, io.c, iresolve.c, - match.c, matchexp.c, misc.c, module.c, options.c, parse.c, - scanner.c, simplify.c, symbol.c, trans-array.c, trans-expr.c, - trans-io.c, trans-stmt.c, trans.c: Update copyright. - -2005-01-17 Ira Rosen - - * f95-lang.c (gfc_init_builtin_functions): Call targetm.init_builtins. - -2005-01-16 Tobias Schlueter - - PR fortran/19182 - * error.c (error_char): Line-buffer errors / warnings. - -2005-01-16 Tobias Schlueter - - * trans-intrinsic.c (gfc_conv_intrinsic_ishft): Fix signed / - unsigned issue. Use build_int_cst instead of converting - integer_zero_node. Remove unnecessary conversion. - - * trans-types.c (gfc_get_character_type_len): Use - gfc_charlen_type_node as basic type for the range field. - - * trans-intrinsic.c (build_fixbound_expr, - gfc_conv_intrinsic_bound, gfc_conv_intrinsic_anyall, - gfc_conv_intrinsic_count, gfc_conv_intrinsic_btest, - gfc_conv_intrinsic_singlebitop): Use 'build_int_cst' instead - of converting 'integer_zero_node' or 'integer_one_node' - respectively. - (gfc_conv_intrinsic_ishftc): Same, but store in local variable to - evade re-building. - (gfc_conv_intrinsic_strcmp, gfc_conv_intrinsic_rrspacing, - gfc_conv_intrinsic_trim, gfc_conv_intrinsic_iargc): Use - 'build_int_cst' instead of converting 'integer_zero_node' or - 'integer_one_node' respectively. - - * trans-intrinsic.c (gfc_conv_intrinsic_index, - gfc_conv_intrinsic_scan, gfc_conv_intrinsic_verify): Remove - 'gfc'-prefix from local variable, remove dead code, use correct - type when inserting argument. - - * trans-intrinsic.c, trans-types.c: Update copyright years. - -2005-01-16 Steven G. Kargl - - PR 19168 - * resolve.c (check_case_overlap): Typo in comment. - (validate_case_label_expr): Fix up kinds of case values - (resolve_select): Properly handle kind mismatches. - -2004-01-16 Paul Brook - - PR fortran/17675 - * trans-common.c (translate_common): Remove duplicate function call. - (finish_equivalences): Preserve alignment when biasing offsets. - -2005-01-15 Tobias Schl"uter - - * resolve.c (compare_case): Cleanup. - -2005-01-14 Steven G. Kargl - - * resolve.c (compare_case): Give arguments correct type. - -2005-01-13 Kazu Hirata - - * iresolve.c, trans-common.c, trans-types.c: Fix comment - typos. - -2005-01-09 Paul Brook - - PR fortran/17675 - * trans-common.c (current_common, current_offset): Remove. - (create_common): Add head argument. - (align_segment): New function. - (apply_segment_offset): New function. - (translate_common): Merge code from new_segment. Handle alignment. - (new_segment): Remove. - (finish_equivalences): Ensure proper alignment. - -2005-01-08 Tobias Schl"uter - - * trans-const.c: Don't include unused math.h. - - * trans-intrinsic.c (gfc_get_intrinsic_lib_fndecl, - gfc_conv_intrinsic_bound, gfc_conv_intrinsic_minmaxloc, - gfc_conv_intrinsic_ishft, gfc_conv_intrinsic_len): Remove - trailing whitespace. - (prepare_arg_info): Fix formatting, indenting and remove trailing - whitespace. - (gfc_conv_intrinsic_spacing, gfc_conv_intrinsic_trim): Remove - trailing whitespace. - - * arith.c (arctangent2, gfc_arith_init_1, gfc_arith_done_1, - gfc_constant_result, gfc_range_check, gfc_arith_power, - eval_type_intrinsic0, eval_intrinsic_f2, gfc_real2real, - gfc_real2complex, gfc_complex2int, gfc_complex2real, - gfc_complex2complex): Fix whitespace issues. - * check.c (must_be, type_check, numeric_check, int_or_real_check, - logical_array_check, array_check, scalar_check, nonoptional_check, - variable_check, dim_check, check_a_kind, gfc_check_a_ikind, - gfc_check_a_xkind, gfc_check_abs, gfc_check_all_any, - gfc_check_allocated, gfc_check_a_p, gfc_check_besn, - gfc_check_btest, gfc_check_char, gfc_check_cmplx, gfc_check_count, - gfc_check_cshift, gfc_check_dcmplx, gfc_check_dble, - gfc_check_digits, gfc_check_dot_product, gfc_check_eoshift, - gfc_check_fnum, gfc_check_g77_math1, gfc_check_huge, gfc_check_i, - gfc_check_iand, gfc_check_ibclr, gfc_check_ibits, gfc_check_ibset, - gfc_check_idnint, gfc_check_ieor, gfc_check_index, gfc_check_int, - gfc_check_ior, gfc_check_ishft, gfc_check_ishftc, gfc_check_kind, - gfc_check_lbound, gfc_check_logical, min_max_args, - gfc_check_min_max_integer, gfc_check_min_max_real, - gfc_check_min_max_double, gfc_check_matmul, - gfc_check_minval_maxval, gfc_check_merge, gfc_check_nearest, - gfc_check_pack, gfc_check_precision, gfc_check_radix, - gfc_check_range, gfc_check_real, gfc_check_repeat, - gfc_check_scale, gfc_check_scan, gfc_check_selected_real_kind, - gfc_check_set_exponent): Fix formatting issues. - (gfc_check_size, gfc_check_sign): Alphabetize function order, - remove whitespace-only line. - (gfc_check_fstat, gfc_check_fstat_sub, gfc_check_stat, - gfc_check_stat_sub, gfc_check_transfer, gfc_check_transpose, - gfc_check_ubound, gfc_check_unpack, gfc_check_verify, gfc_check_x, - gfc_check_cpu_time, gfc_check_date_and_time, gfc_check_mvbits, - gfc_check_random_number, gfc_check_random_seed, - gfc_check_second_sub, gfc_check_system_clock, - gfc_check_getcwd_sub, gfc_check_exit, gfc_check_flush, - gfc_check_umask, gfc_check_umask_sub, gfc_check_unlink, - gfc_check_unlink_sub): Fix formatting issues. - -2005-01-08 Tobias Schl"uter - - * gfortran.h: Remove outdated comment. Don't include stdio.h - explicitly. - -2005-01-06 Tobias Schlueter - - * gfortranspec.c (lang_specific_driver): Change year to 2005 in - output of 'gfortran --version'. - -2005-01-03 Steven G. Kargl - - * arith.c: Add system.h; remove string.h - * decl.c: Ditto - * matchexp.c: Ditto - * parse.c: Ditto - * resolve.c: Ditto - * st.c: Ditto - * check.c: Remove stdlib.h and stdarg.h - * error.c: Remove stdlib.h, stdarg.h, stdio.h, string.h - * expr.c: Add system.h; remove stdarg.h, stdio.h, and string.h - * f95-lang.c: Add system.h; remove stdio.h - * interface.c: Add system.h; remove stdlib.h and string.h - * intrinsic.c: Remove stdarg.h, stdio.h, and string.h - * io.c: Remove string.h - * simplify.c: Ditto - * match.c: Remove stdarg.h and string.h - * misc.c: Update copyright; add system.h; remove stdlib.h, - string.h, and sys/stat.h - * module.c: Add system.h; remove string.h, stdio.h, errno.h, - unistd.h, and time.h - * option.c: Remove string.h and stdlib.h - * primary.c: Ditto - * scanner.c: Update copyright; add system.h; remove stdlib.h, - stdio.h, string.h, and strings.h - * symbol.c: Add system.h; remove stdlib.h, stdio.h, and string.h - * trans-array.c: Remove stdio.h and gmp.h - * trans-const.c: Ditto - * trans-expr.c: Ditto - * trans-io.c: Ditto - * trans-stmt.c: Ditto - * trans.c: Ditto - * trans-intrinsic.c: Remove stdio.h and string.h - -2004-12-29 Steven G. Kargl - - * gfortran.h (gfc_case): fix typo in comment. - -2004-12-27 Tobias Schlueter - - * trans-intrinsic.c (gfc_conv_intrinsic_ishft): Change to - logical shift. Call fold. Remove 0-bit shift shortcut. - (gfc_conv_intrinsic_ishftc): Convert first argument to at least - 4 bytes bits. Convert 2nd and 3rd argument to 4 bytes. Convert - result if width(arg 1) < 4 bytes. Call fold. - - PR fortran/19032 - * trans-intrinsic.c (gfc_conv_intrinsic_mod): Update comment - in front of function to match the standard. Correct handling - of MODULO. - -2004-12-27 Andrew Pinski - - * trans-expr.c (gfc_conv_cst_int_power): Only check for - flag_unsafe_math_optimizations if we have a float type. - -2004-12-23 Steven G. Kargl - - * gfortran.texi: Fix typo. - -2004-12-16 Tobias Schlueter - - * trans-intrinsic.c (build_fixbound_expr): Clarify comment, fix - comment typo. - -2004-12-15 Tobias Schlueter - - PR fortran/18993 - * match.c (gfc_match_if): Don't explicitly skip optional whitespace. - (gfc_match_nullify): Make sure that ')' is in front of the end of - statement. - - * scanner.c (skip_fixed_comments): Fix typo in comment preceding - function. - -2004-12-14 Richard Henderson - - * gfortran.h (gfc_expr.function.name): Make const. - (gfc_iresolve_init_1, gfc_iresolve_done_1): Remove. - (gfc_get_string): Update prototype. - * iresolve.c: Include tree.h. - (string_node, HASH_SIZE, string_head, hash): Remove. - (gfc_get_string): Use vsnprintf, get_identifier. - (free_strings, gfc_iresolve_init_1, gfc_iresolve_done_1): Remove. - * misc.c (gfc_init_1): Don't call gfc_iresolve_init_1. - (gfc_done_1): Don't call gfc_iresolve_done_1. - * module.c (mio_allocated_string): Take and return const char *, - instead of modifying char**. - (mio_expr): Update to match. - * resolve.c (pure_function): Constify name argument. - (resolve_function): Constify name. - * trans-intrinsic.c (gfc_conv_intrinsic_function): Likewise. - -2004-12-12 Richard Henderson - - * iresolve.c (gfc_resolve_all, gfc_resolve_any, gfc_resolve_count, - gfc_resolve_cshift, gfc_resolve_dot_product, gfc_resolve_eoshift, - gfc_resolve_matmul, gfc_resolve_maxloc, gfc_resolve_maxval, - gfc_resolve_minloc, gfc_resolve_minval, gfc_resolve_pack, - gfc_resolve_product, gfc_resolve_reshape, gfc_resolve_shape, - gfc_resolve_spread, gfc_resolve_sum, gfc_resolve_transpose, - gfc_resolve_unpack: Use PREFIX. - -2004-12-12 Tobias Schlueter - - PR fortran/18869 - * match.c (gfc_match_common): Skip whitespace. - -2004-12-12 Steven G. Kargl - - PR fortran/16581 - * check.c (gfc_check_iand, gfc_check_ibclr, gfc_check_ibits, - gfc_check_ibset, gfc_check_ieor, gfc_check_ior): Remove default - integer kind check; Issue error for -std=f95 when needed. - * intrinsic.c (add_functions): Change ieor from GFC_STD_GNU to - GFC_STD_F95. - * iresolve.c (gfc_resolve_iand, gfc_resolve_ieor, gfc_resolve_ior): - Promote arguments to same kind. - -2004-12-12 Steven G. Kargl - Paul Brook - - PR fortran/16222 - * resolve.c (gfc_resolve_iterator_expr): New function. - (gfc_resolve_iterator): Use it. Add real_ok argument. Convert - start, end and stride to correct type. - (resolve_code): Pass extra argument. - * array.c (resolve_array_list): Pass extra argument. - * gfortran.h (gfc_resolve): Add prototype. - * trans-stmt.c (gfc_trans_do): Remove redundant type conversions. - Handle real type iterators. - -2004-12-11 Tobias Schlueter - - PR fortran/17175 - * iresolve.c (gfc_resolve_scale): Convert 'I' argument if not of - same kind as C's 'int'. - (gfc_resolve_set_exponent): Convert 'I' argument if not of kind 4. - -2004-12-08 Richard Henderson - - * intrinsic.c (gfc_convert_type_warn): Propagate the input shape - to the output expression. - * iresolve.c (gfc_resolve_cshift, gfc_resolve_eoshift): Suppress - warning conversion. - (gfc_resolve_reshape): Force convert SHAPE and ORDER parameters - to index kind. - -2004-12-08 Tobias Schlueter - - PR fortran/18826 - * resolve.c (resolve_code): Impose correct restrictions on - assigned variable. - - * decl.c (gfc_match_end): Use locus of END when eos is an error. - -2004-12-02 Steven G. Kargl - Paul Brook - - * check.c (gfc_check_flush, gfc_check_fnum): New functions. - (gfc_check_fstat, gfc_check_fstat_sub): New functions. - (gfc_check_stat, gfc_check_stat_sub): New functions. - * gfortran.h (GFC_ISYM_FNUM,GFC_ISYM_FSTAT,GFC_ISYM_STAT): New symbols - * intrinsic.c (add_functions,add_subroutines): Add flush, fnum, - fstat, and stat to intrinsics symbol tables. - * intrinsic.h (gfc_check_flush, gfc_resolve_stat_sub): Add prototypes. - (gfc_resolve_fstat_sub, gfc_resolve_stat): Ditto. - * iresolve.c (gfc_resolve_fnum, gfc_resolve_fstat): New functions. - (gfc_resolve_stat, gfc_resolve_flush): New functions. - (gfc_resolve_stat_sub,gfc_resolve_fstat_sub): New functions - * trans-intrinsic.c (gfc_conv_intrinsic_function): Add new intrinsics. - -2004-12-02 Steven G. Kargl - - * intrinsic.c: Fix and add comments, fix function declarations - (OPTIONAL,REQUIRED): New symbols - (add_functions,add_subroutines): Use symbols - (gmp.h): Remove unused include - -2004-11-25 Joseph S. Myers - - * f95-lang.c, gfortranspec.c, trans-decl.c: Avoid ` as left quote - in diagnostics. - -2004-11-24 Steven Bosscher - - * options.c (gfc_post_options): Don't clear flag_inline_functions. - -2004-11-20 Steven G. Kargl - - * check.c (gfc_check_getcwd_sub): Fix seg fault. - - * check.c (gfc_check_exit,gfc_check_umask,gfc_check_umask_sub, - gfc_check_unlink,gfc_check_unlink_sub): New functions - * gfortran.h (GFC_ISYM_UMASK,GFC_ISYM_UNLINK): New symbols - * intrinsic.c (add_functions,add_subroutines): Add umask, unlink, - exit to intrinsics symbol tables. - * intrinsic.h (gfc_check_umask,gfc_check_unlink,gfc_check_exit, - gfc_check_umask_sub,gfc_check_unlink_sub,gfc_resolve_umask, - gfc_resolve_unlink,gfc_resolve_exit,gfc_resolve_umask_sub, - gfc_resolve_unlink_sub): Add and sort prototypes. - * iresolve.c (gfc_resolve_umask,gfc_resolve_unlink,gfc_resolve_exit, - gfc_resolve_umask_sub,gfc_resolve_unlink_sub): New functions - * trans-intrinsic.c (gfc_conv_intrinsic_function): Use symbols - -2004-11-16 Paul Brook - - PR fortran/13010 - * trans-array.c (gfc_trans_allocate_temp_array): Use gfc_get_dtype. - (gfc_array_init_size, gfc_conv_expr_descriptor): Ditto. - * trans-types.c (gfc_get_dtype): Accept array type rather than element - type. - (gfc_get_nodesc_array_type): Don't set GFC_TYPE_ARRAY_DTYPE. - (gfc_get_array_type_bounds): Ditto. - (gfc_get_derived_type): Recurse into derived type pointers. - * trans-types.h (gfc_get_dtype): Add prototype. - * trans.h (GFC_TYPE_ARRAY_DTYPE): Add comment. - -2004-11-15 Paul Brook - - * trans-types.c (gfc_get_dtype): Remove obsolete TODO. - -2004-11-10 Paul Brook - - PR fortran/18375 - * trans-expr.c (gfc_trans_subarray_assign): Free shape before ss. - * trans-io.c (transfer_array_component): Ditto. - -2004-11-10 Paul Brook - - * invoke.texi: Fix typo. - -2004-11-08 Kazu Hirata - - * arith.c, array.c, decl.c, expr.c, f95-lang.c, gfortran.h, - gfortranspec.c, interface.c, intrinsic.c, iresolve.c, match.c, - module.c, parse.c, parse.h, primary.c, resolve.c, scanner.c, - trans-array.c, trans-array.h, trans-expr.c, trans-intrinsic.c, - trans-io.c, trans-stmt.c, trans.h: Fix comment formatting. - -2004-11-06 Tobias Schlueter - - PR fortran/18023 - * io.c (resolve_tag): Tighten up exception for assigned FORMAT. - -2004-11-06 Kazu Hirata - - * gfortranspec.c: Replace GNU CC with GCC. - -2004-11-05 Tobias Schlueter - - * gfortranspec.c (lang_specific_driver): Change year to 2004. - -2004-11-05 Tobias Schlueter - - PR fortran/18111 - * trans-decl.c (create_function_arglist): Set DECL_ARTIFICIAL for - hidden parameters. - -2004-11-05 Tobias Schlueter - - PR fortran/15164 - * trans-decl.c (gfc_finish_var_decl): Don't declare arguments to - module procedures as if they were module variables. - -2004-11-03 Tobias Schlueter - - PR fortran/17535 - PR fortran/17583 - PR fortran/17713 - * module.c (write_symbol1): Set module_name for dummy arguments. - -2004-11-02 Paul Brook - - * intrinsic.c (check_intrinsic_standard): Include error locus. - Remove VLA. - (gfc_intrinsic_func_interface, gfc_intrinsic_sub_interface): Pass - locus to check_intrinsic_standard. - -2004-10-31 Janne Blomqvist - - PR fortran/17590 - * gfortran.h: Change GFC_STD_* flags to more appropriate - ones. (struct gfc_intrinsic_isym): Add field for standard. (struct - gfc_option_t): Add field for warning about use of nonstandard - intrinsics. - * intrinsic.c (add_sym): Add parameter for standard version, check - this against current standard. - (add_sym_0): Pass standard parameter to add_sym. - (add_sym_1, add_sym_0s, add_sym_1s, add_sym_1m, add_sym_2): Ditto. - (add_sym_2s, add_sym_3, add_sym_3ml, add_sym_3red, add_sym_3s): Ditto. - (add_sym_4, add_sym_4s, add_sym_5, add_sym_5s): Ditto. - (make_generic): Add parameter for standard, check this - against currently selected standard. - (add_functions, add_subroutines): Add parameter to tell which - standard an intrinsic belongs to. - (check_intrinsic_standard): New function. - (gfc_intrinsic_func_interface): Add call to check_intrinsic_standard. - (gfc_intrinsic_sub_interface): Ditto. - * lang.opt: Add Wnonstd-intrinsics option. - * options.c (gfc_init_options): Change to use new GFC_STD_* flags, - init new warning. - (set_Wall): Add warning about nonstd intrinsics. - (gfc_handle_option): Change to use new GFC_STD_* flags, - handle new warning. - * invoke.texi: Update manual to include -Wnonstd-intrinsics. - -2004-10-30 Andrew Pinski - - * f95-lang.c (lang_tree_node): Add chain_next to be the TREE_CHAIN. - -2004-10-30 Tobias Schlueter - - * simplify.c (twos_complement): Calculate mask in GMP arithmetic. - -2004-10-30 Tobias Schlueter - - * trans.c (gfc_trans_code): Set global locus after recursing. Fix - comment typo. - -2004-10-30 Canqun Yang - - * check.c (gfc_check_rand): Allow missing optional argument. - (gfc_check_irand): Ditto. - * intrinsic.c (add_functions): Set arg optional flag for {i,}rand. - -2004-10-28 Scott Robert Ladd - - PR fortran/13490, PR fortran/17912 - * gcc/fortran/gfortran.h: Added pedantic_min_int to gfc_integer_info - * gcc/fortran/gfortran.h: Added ARITH_ASYMMETRIC to arith - * gcc/fortran/arith.c: Added support for an "asymmetric integer" - warning when compiling with pedantic. - * gcc/fortran/arith.c: Set minimum integer values to reflect - realities of two's complement signed integers. Added - pedantic minimum. - -2004-10-17 Andrew Pinski - - * Make-lang.in (F95_ADDITIONAL_OBJS): Kill. - (f951): Do not depend on F95_ADDITIONAL_OBJS and don't - link it in. - -2004-10-14 Tobias Schlueter - - * trans-decl.c (generate_local_decl): Simplify logic, fix comment - typo. - (gfc_generate_function_code): Fix formatting issue. - -2004-10-10 Tobias Schlueter - - * module.c: Fix formatting issues. - -2004-10-09 Tobias Schlueter - - * module.c (mio_interface_rest): Set where member of interface - while loading. - -2004-10-08 Andrew Pinski - - PR fortran/17901 - * options.c (gfc_handle_option): Add break after handing the - J/M option. - -2004-10-08 Tobias Schlueter - - * arith.c: Fix formatting issues. - -2004-10-07 Tobias Schlueter - - PR fortran/17676 - * resolve.c (resolve_operator): Use correct operator name in message. - -2004-10-07 Tobias Schlueter - - * primary.c (match_boz_constant): Allow kind parameter suffixes. - Move standard warning further to the front. - -2004-10-07 Kazu Hirata - - * trans-stmt.c: Fix a comment typo. - -2004-10-07 Paul Brook - - PR fortran/17678 - * trans-array.c (gfc_trans_deferred_array): Leave use associated - variables alone. - -2004-10-06 Tobias Schlueter - - PR fortran/17568 - * simplify.c (twos_complement): New function. - (gfc_simplify_ishft, gfc_simplify_ishftc): Revise. - - * simplify.c (gfc_simplify_abs): Use mpfr_hypot for CABS. - -2004-10-06 Paul Brook - - * trans-stmt.c (gfc_trans_simple_do): New function. - (gfc_trans_do): Use it. Evaluate iteration bounds before entering - loop. Update comments. - -2004-10-04 Tobias Schlueter - - PR fortran/17283 - * iresolve.c (gfc_resolve_pack): Choose function depending if mask - is scalar. - - PR fortran/17631 - * intrinsic.c (add_sym_5): Remove. - (add_subroutines): Add resolution function for MVBITS. - * intrinsic.h (gfc_resolve_mvbits): Declare resolution function for - MVBITS - * iresolve.c (gfc_resolve_mvbits): New function. - (gfc_resolve_random_number): Remove empty line at end of function. - - * trans-const.c (gfc_build_cstring_const): New function. - (gfc_init_cst): Use new function. - * trans-const.h (gfc_build_cstring_const): Add prototype. - * trans-io.c (set_string, set_error_locus): Use new function. - * trans-stmt.c (gfc_trans_goto): Use new function. - - PR fortran/17708 - * parse.c (accept_statement): Don't treat END DO like END IF and - END SELECT. - (parse_do_block): Generate possible END DO label inside END DO - block. - - PR fortran/17776 - * check.c (gfc_check_system_sub): New function. - * gfortran.h (gfc_generic_isym_id): Add GFC_ISYM_SYSTEM. - * intrinsic.c (add_functions): Add 'system'. - (add_subroutines): Add 'system'. - * intrinsic.h (gfc_check_etime_sub, gfc_check_getcwd_sub): - Move prototypes to other suborutines. - (gfc_check_system_sub, gfc_resolve_system, gfc_resolve_system_sub): - Add prototype. - (gfc_resolve_system_clock): Fix formatting of prototype. - * iresolve.c (gfc_resolve_system, gfc_resolve_system_sub): New - functions. - * trans-intrinsic.c (gfc_conv_intrinsic_function): Deal with - GFC_ISYM_SYSTEM. - -2004-10-04 Erik Schnetter - - * scanner.c (preprocessor_line): Accept preprocessor lines without - file names. Check file names for closing quotes. Handle escaped - quotes in file names. - -2004-10-04 Tobias Schlueter - Paul Brook - - * trans-array.c (gfc_conv_expr_descriptor): Check for substriungs. - Use gfc_get_expr_charlen. - * trans-expr.c (gfc_get_expr_charlen): New function. - * trans.h (gfc_get_expr_charlen): Add prototype. - -2004-10-04 Kazu Hirata - - * trans-intrinsic.c: Fix a comment typo. - -2004-10-03 Tobias Schlueter - - * simplify.c (range_check): Remove blank line at beginning of function. - (gfc_simplify_dint): Same at end of function. - (gfc_simplify_exponent, gfc_simplify_fraction): Simplify calculations. - (gfc_simplify_bound): Fix indentation. - (gfc_simplify_log10): Simplify calculation. - (gfc_simplify_min, gfc_simplify_max): Remove blank line at beginning - of function. - (gfc_simplify_nearest): Same at end of function. - (gfc_simplify_nint, gfc_simplify_idnint): Same at beginning of - function. - (gfc_simplify_rrspacing, gfc_simplify_set_exponent, - gfc_simplify_spacing): Simplify calulations. - -2004-10-03 Feng Wang - - * trans-intrinsic.c: Fix comments on spacing and rrspacing - (gfc_conv_intrinsic_rrspacing): Add fold on constant trees. - -2004-10-01 Jan Hubicka - - * f95-lang.c (gfc_expand_function): Update call of - tree_rest_of_compilation. - * trans-decl.c (gfc_generate_constructors): Likewise. - -2004-09-26 Tobias Schlueter - - * trans-intrinsic.c: Comment fixes. - -2004-09-25 Tobias Schlueter - - * decl.c (add_init_expr_to_sym, variable_decl): Comment fixes. - -2004-09-24 Tobias Schlueter - - * trans-types.c (gfc_return_by_reference): Remove superfluous - assertion. - - * intrinsic.h (gfc_resolve_getcwd): Update prototype. - * iresolve.c (gfc_resolve_getcwd): Add second argument to function. - - PR fortran/17615 - * trans-expr.c (gfc_trans_arrayfunc_assign): Look at resolved - function to determine return type. - -2004-09-20 Jan Hubicka - - * trans-decl.c (build_entry_thunks): Finalize the function; do not lower - tree. - (gfc_generate_function_code): Likewise. - -2004-09-20 Tobias Schlueter - - PR fortran/15957 - * simplify.c (gfc_simplify_reshape): Set shape of return value - correctly. - -2004-09-17 Jeffrey D. Oldham - Zack Weinberg - - * f95-lang.c, trans-expr.c, trans.c: Update for new tree-class - enumeration constants. - -2004-09-17 Paul Brook - - * gfortran.h (struct gfc_linebuf): Don't use C99 empty arrays. - (gfc_linebuf_header_size): Define. - * scanner.c (load_file): Use it. - -2004-09-16 Kazu Hirata - - * array.c, data.c, decl.c, dependency.c, error.c, f95-lang.c, - interface.c, intrinsic.c, io.c, misc.c, module.c, parse.h, - resolve.c, scanner.c, trans-array.c, trans-array.h, - trans-common.c, trans-const.h, trans-decl.c, trans-expr.c, - trans-intrinsic.c, trans-stmt.c, trans-types.c, trans.c, - trans.h: Fix comment typos. Follow spelling conventions. - -2004-09-16 Victor Leikehman - - PR/15364 - * trans-io.c (transfer_array_component): New function. - (transfer_expr): For array fields, call transfer_array_component. - -2004-09-16 Kazu Hirata - - * gfortran.texi: Fix a typo. - -2004-09-15 Aaron W. LaFramboise - - * parse.c (eof_buf): Rename eof to eof_buf. - (unexpected_eof): Same. - (gfc_parse_file): Same. - -2004-09-15 Steven G. Kargl - - * check.c (gfc_check_getcwd_sub): New function. - * gfortran.h (GFC_ISYM_GETCWD): New symbol. - * intrinsic.c (add_functions): Add function definition; - Use symbol. - * intrinsic.c (add_subroutines): Add subroutine definitions. - * intrinsic.h: Add prototypes. - * iresolve.c (gfc_resolve_getcwd, gfc_resolve_getcwd_sub): - New functions. - * trans-intrinsic.c (gfc_conv_intrinsic_function): Use symbol. - -2004-09-15 Tobias Schlueter - - PR fortran/16485 - * module.c (write_symbol): Don't fill in module name here. - (write_symbol0): Fill in here instead. - -2004-09-14 Kazu Hirata - - * data.c, decl.c, f95-lang.c, gfortran.h, match.c, - trans-array.c, trans-common.c, trans-expr.c, - trans-intrinsic.c, trans-stmt.c, trans-types.c, trans.h: Fix - comment typos. Follow spelling conventions. - -2004-09-09 Paul Brook - - * scanner.c (get_file): Add ATTRIBUTE_UNUSED. - -2004-09-08 Paul Brook - - * array.c: Don't include assert.h. - * data.c: Don't include assert.h. Replace assert and abort with - gcc_assert and gcc_unreachable. - * dependency.c: Ditto. - * f95-lang.c: Ditto. - * iresolve.c: Ditto. - * resolve.c: Ditto. - * simplify.c: Ditto. - * symbol.c: Ditto. - * trans-array.c: Ditto. - * trans-common.c: Ditto. - * trans-const.c: Ditto. - * trans-decl.c: Ditto. - * trans-expr.c: Ditto. - * trans-intrinsic.c: Ditto. - * trans-io.c: Ditto. - * trans-stmt.c: Ditto. - * trans-types.c: Ditto. - * trans.c: Ditto. - -2004-09-07 Per Bothner - Paul Brook - - * error.c (show_locus): Handle mapped locations. - * f95-lang.c (gfc_be_parse_file): Initialize mapped locations. - * gfortran.h: Include input.h. - (struct gfc_linebuf): Use source_location. - * scanner.c (get_file): Initialize linemap. - (preprocessor_line): Pass extra argument to get_file. - (load_file): Ditto. Setup linemap. - (gfc_new_file): Handle mapped locations. - * trans-common.c (build_field, build_equiv_decl, build_common_decl): - Set decl source locations. - (gfc_trans_common): Set blank common block location. - * trans-decl.c (gfc_set_decl_location): New function. - (gfc_get_label_decl, gfc_get_symbol_decl): Use it. - (trans_function_start): Move call to gfc_set_backend_locus.. - (build_function_decl): ... to here. - (build_entry_thunks): Set and restore the backend locus. - (gfc_generate_constructors): Remove excess arguments to - init_function_start. - (gfc_generate_block_data): Add comments. Set the decl locus. - * trans-io.c (set_error_locus): Handle mapped locations. - * trans.c (gfc_get_backend_locus, gfc_get_backend_locus): Ditto. - (gfc_trans_code): Use SET_EXPR_LOCATION. - (gfc_generate_code): Override the location of the new symbol. - * trans.h (gfc_set_decl_location): Add prototype. - -2004-08-31 Paul Brook - - * trans-types.c (gfc_type_for_mode): Return NULL for unknown modes. - -2004-09-01 Tobias Schlueter - - PR fortran/15327 - * trans-intrinsic.c (gfc_conv_intrinsic_merge): Do the right thing for - strings. - -2004-09-01 Tobias Schlueter - - PR fortran/16400 - PR fortran/16404 - (port from g95) - * resolve.c (resolve_transfer): New function. - (resolve_code): Call resolve_transfer in case of EXEC_TRANSFER. - -2004-08-31 Tobias Schlueter - - PR fortran/16579 - * trans-types.c (gfc_init_types): Make gfc_character1_type_node an - unsigned char. - -2004-08-31 Tobias Schlueter - - * CONTRIB, NEWS, README, TODO: Remove obsolete files. - -2004-08-31 Tobias Schlueter - - PR fortran/17244 - * trans-types.c (gfc_return_by_reference): Remove TODO error, - add comment pointing out possible issue WRT compatibility with g77. - -2004-08-31 Tobias Schlueter - - * trans-decl.c, trans-expr.c, trans-io.c, trans-types.c: Replace - all occurences of 'gfc_strlen_type_node' by - 'gfc_charlen_type_node'. - * trans-types.h: Same. Also update comment accordingly. - -2004-08-31 Tobias Schlueter - - * primary.c: Update copyright boilerplate to say GCC. - * f95-lang.c: Change initial comment to say gfortran. - -2004-08-31 Paul Brook - - * trans-types.h: Add comments. - (intmax_type_node, string_type_node, const_string_type_node): Remove. - -2004-08-30 Richard Henderson - - * Make-lang.in (fortran/f95-lang.o): Update dependencies. - (fortran/trans-decl.o, fortran/trans-types.o): Likewise. - * gfortran.h (gfc_integer_info): Add c_char, c_short, c_int, - c_long, c_long_long. - (gfc_logical_info): Add c_bool. - (gfc_real_info): Add mode_precision, c_float, c_double, c_long_double. - * trans-array.c (gfc_array_allocate): Use TYPE_PRECISION - rather than gfc_int[48]_type_node for allocate choice. - * trans-decl.c (gfc_build_intrinsic_function_decls): Cache - local copies of some kind type nodes. - (gfc_build_builtin_function_decls): Likewise. - * trans-expr.c (gfc_conv_power_op): Likewise. - * trans-intrinsic.c (gfc_conv_intrinsic_index, - gfc_conv_intrinsic_scan, gfc_conv_intrinsic_verify, - gfc_conv_intrinsic_trim, gfc_conv_intrinsic_repeat): Likewise. - * trans-stmt.c (gfc_trans_pause, gfc_trans_stop, - gfc_trans_character_select, gfc_trans_allocate): Likewise. - * trans-io.c (gfc_pint4_type_node): Move into ... - (gfc_build_io_library_fndecls): ... here. Cache local copies of - some kind type nodes. - * trans-types.c (gfc_type_nodes): Remove. - (gfc_character1_type_node, gfc_strlen_type_node): New. - (gfc_integer_types, gfc_logical_types): New. - (gfc_real_types, gfc_complex_types): New. - (gfc_init_kinds): Fill in real mode_precision. - (gfc_build_int_type, gfc_build_real_type): New. - (gfc_build_complex_type, gfc_build_logical_type): New. - (c_size_t_size): New. - (gfc_init_types): Loop over kinds. - (gfc_get_int_type, gfc_get_real_type): Use gfc_validate_kind. - (gfc_get_complex_type, gfc_get_logical_type): Likewise. - (gfc_get_character_type_len): Likewise. - (gfc_type_for_size): Loop over kinds; use a reduced set of - unsigned type nodes. - (gfc_type_for_mode): Loop over kinds. - (gfc_signed_or_unsigned_type): Use gfc_type_for_size. - (gfc_unsigned_type, gfc_signed_type): Use gfc_signed_or_unsigned_type. - * trans-types.h (F95_INT1_TYPE, F95_INT2_TYPE, F95_INT4_TYPE, - F95_INT8_TYPE, F95_INT16_TYPE, F95_REAL4_TYPE, F95_REAL8_TYPE, - F95_REAl16_TYPE, F95_COMPLEX4_TYPE, F95_COMPLEX8_TYPE, - F95_COMPLEX16_TYPE, F95_LOGICAL1_TYPE, F95_LOGICAL2_TYPE, - F95_LOGICAL4_TYPE, F95_LOGICAL8_TYPE, F95_LOGICAL16_TYPE, - F95_CHARACTER1_TYPE, NUM_F95_TYPES, gfc_type_nodes, - gfc_int1_type_node, gfc_int2_type_node, gfc_int4_type_node, - gfc_int8_type_node, gfc_int16_type_node, gfc_real4_type_node, - gfc_real8_type_node, gfc_real16_type_node, gfc_complex4_type_node, - gfc_complex8_type_node, gfc_complex16_type_node, - gfc_logical1_type_node, gfc_logical2_type_node, - gfc_logical4_type_node, gfc_logical8_type_node, - gfc_logical16_type_node, gfc_strlen_kind): Remove. - (gfc_character1_type_node): Turn in to a variable. - (gfc_strlen_type_node): Likewise. - -2004-08-30 Tobias Schlueter - - * gfortran.h (gfc_namespace): Add new field is_block_data. - * parse.c (accept_statement): Remove special handling for BLOCK DATA. - (parse_block_data): Record BLOCK DATA name, set is_block_data field. - * trans.c (gfc_generate_code): Handle BLOCK DATA units. - * trans.h (gfc_generate_block_data): Add prototype. - * trans-decl.c (gfc_generate_block_data): New function. - -2004-08-29 Richard Henderson - - * trans-const.c (gfc_conv_mpz_to_tree): Use mpz_export. - * trans-types.c (gfc_init_kinds): Reject integer kinds larger - than two HOST_WIDE_INT. - -2004-08-29 Tobias Schlueter - - PR fortran/13910 - * decl.c (free_variable, free_value, gfc_free_data, var_list, - var_element, top_var_list, match_data_constant, top_val_list, - gfc_match_data): Move here from match.c. - (match_old_style_init): New function. - (variable_decl): Match old-style initialization. - * expr.c (gfc_get_variable_expr): New function. - * gfortran.h (gfc_get_variable_expr): Add prototype. - * gfortran.texi: Start documentation for supported extensions. - * match.c: Remove the functions moved to decl.c. - * match.h (gfc_match_data): Move prototype to under decl.c. - * symbol.c (gfc_find_sym_tree, gfc_find_symbol): Add/correct - comments. - -2004-08-29 Steven G. Kargl - Paul Brook - - * check.c (gfc_check_besn, gfc_check_g77_math1): New functions. - * f95-lang.c (DO_DEFINE_MATH_BUILTIN): Define. - (DEFINE_MATH_BUILTIN, DEFINE_MATH_BUILTIN_C): Use it. - (build_builtin_fntypes): New function. - (gfc_init_builtin_functions): Use it. - * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_{J,Y}{0,1,N} - and GFC_ISYM_ERF{,C}. - (gfc_c_int_kind): Declare. - * intrinsic.c (add_functions): Add [d]bes* and [d]erf*. - * intrinsic.h (gfc_check_besn, gfc_check_g77_math1, gfc_resolve_besn, - gfc_resolve_g77_math1): Add prototypes. - * resolve.c (gfc_resolve_besn, gfc_resolve_g77_math1): New functions. - * mathbuiltins.def: Add comment. Change third argument. Use - DEFINE_MATH_BUILTIN_C. Add bessel and error functions. - * trans-intrinsic.c (BUILT_IN_FUNCTION): Define. - (DEFINE_MATH_BUILTIN, DEFINE_MATH_BUILTIN_C): Use it. - * trans-types.c (gfc_c_int_kind): Declare. - (gfc_init_kinds): Set it. - -2004-08-29 Steven G. Kargl - Paul Brook - - * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_GET?ID. - (gfc_check_f, gfc_simplify_f): Add f0. - * intrinsic.c (do_check): Call f0. Flatten. - (add_sym_0): Fix prototype. Set f0. - (add_functions): Add getgid, getgid and getuid. - (resolve_intrinsic): Remove obsolete comment. - (do_simplify): Call f0. - * intrinsic.h (gfc_resolve_getgid, gfc_resolve_getpid, - gfc_resolve_getuid): Add prototypes. - * iresolve.c (gfc_resolve_getgid, gfc_resolve_getpid, - gfc_resolve_getuid): New functions. - * trans-intrinsic.c (gfc_conv_intrinsic_function): Handle - GFC_ISYM_GET?ID. - -2004-08-28 Tobias Schlueter - - * error.c (gfc_error_init_1): Remove blank line in front of - function body. Add missing blank. - (gfc_buffer_error, error_char, error_string): Remove blank line in - front of function body. - (show_locus): Add comma in comment. - (gfc_clear_warning, gfc_warning_check, gfc_clear_error, - gfc_push_error, gfc_pop_error): Remove blank line in front of - function body. - (gfc_get_errors): Typo fix in comment in front of function. Remove - blank line in front of function body. - -2004-08-27 Tobias Schlueter - - * gfortran.h (gfc_default_*_kind): Remove prototypes, add extern - variable declaration of same name. - * arith.c, check.c, decl.c, dump_parse_tree.c, expr.c, - intrinsic.c, io.c, iresolve.c, match.c, options.c, primary.c, - resolve.c, simplify.c, symbol.c, trans-const.c, trans-io.c: - Replace all calls to gfc_default_*_kind with variable accesses. - * trans-types.c: Same as above. - (gfc_default_*_kind_1): Rename to gfc_default_*_kind, remove - static qualifier. Replace all occurences. - (gfc_default_*_kind): Remove functions. - -2004-08-26 Richard Henderson - - * arith.c: Include system.h, not real system headers. - (MPZ_NULL, MPF_NULL, DEF_GFC_INTEGER_KIND, DEF_GFC_LOGICAL_KIND, - DEF_GFC_REAL_KIND, GFC_SP_KIND, GFC_SP_PREC, GFC_SP_EMIN, GFC_SP_EMAX, - GFC_DP_KIND, GFC_DP_PREC, GFC_DP_EMIN, GFC_DP_EMAX, GFC_QP_KIND, - GFC_QP_PREC, GFC_QP_EMIN, GFC_QP_EMAX): Remove. - (gfc_integer_kinds, gfc_logical_kinds, gfc_real_kinds, - gfc_index_integer_kind, gfc_default_integer_kind, - gfc_default_real_kind,gfc_default_double_kind, - gfc_default_character_kind, gfc_default_logical_kind, - gfc_default_complex_kind, validate_integer, validate_real, - validate_logical, validate_character, - gfc_validate_kind): Move to trans-types.c. - (gfc_set_model_kind): Use gfc_validate_kind. - (gfc_set_model): Just copy the current precision to default. - (gfc_arith_init_1): Use mpfr precision 128 for integer setup. - * f95-lang.c (gfc_init_decl_processing): Invoke gfc_init_kinds. - * gfortran.h: Update file commentary. - * trans-types.c (MAX_INT_KINDS, MAX_REAL_KINDS): New. - (gfc_default_integer_kind_1, gfc_default_real_kind_1, - gfc_default_double_kind_1, gfc_default_character_kind_1, - gfc_default_logical_kind_1, gfc_default_complex_kind_1): New. - (gfc_init_kinds): New. - (gfc_init_types): Don't set gfc_index_integer_kind here. - * trans-types.h (gfc_init_kinds): Declare. - * doc/invoke.texi: Clarify DOUBLE PRECISION behaviour wrt -r8. - -2004-08-26 Tobias Schlueter - - * check.c (gfc_check_atan2): New function. - * intrinsic.c (add_functions): Use gfc_check_atan2 for ATAN2 - * intrinsic.h (gfc_check_atan2): Add prototype. - -2004-08-25 Richard Henderson - - * arith.c (gfc_validate_kind): Add may_fail argument; abort if - false and we don't validate the kind. - (gfc_check_integer_range, gfc_check_real_range): Update to match. - * check.c (kind_check): Likewise. - * decl.c (gfc_match_old_kind_spec, gfc_match_kind_spec): Likewise. - (match_char_spec, match_logical_spec): Likewise. - * gfortran.h (gfc_validate_kind): Likewise. - * options.c (gfc_handle_option): Likewise. - * primary.c (match_integer_constant, match_real_constant, - match_string_constant, match_logical_constant, - match_const_complex_part): Likewise. - * simplify.c (get_kind, gfc_simplify_bit_size, gfc_simplify_digits, - gfc_simplify_epsilon, gfc_simplify_huge, gfc_simplify_ibclr, - gfc_simplify_ibset, gfc_simplify_ishft, gfc_simplify_ishftc, - gfc_simplify_maxexponent, gfc_simplify_minexponent, - gfc_simplify_nearest, gfc_simplify_not, gfc_simplify_precision, - gfc_simplify_radix, gfc_simplify_range, gfc_simplify_rrspacing, - gfc_simplify_scale, gfc_simplify_spacing, gfc_simplify_tan, - gfc_simplify_tiny): Likewise. - * trans-intrinsic.c (gfc_conv_intrinsic_aint, gfc_conv_intrinsic_mod, - gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_minmaxval, - prepare_arg_info): Likewise. - -2004-08-25 Tobias Schlueter - - * expr.c (gfc_check_assign): Add comment. Add new warning. - * trans-expr.c (gfc_conv_function_call): Correctly dereference - result of pointer valued function when not in pointer assignment. - -2004-08-25 Paul Brook - - * config-lang.in: Remove dead commented line. - * module.c: Replace g95 with gfortran in comment. - -2004-08-25 Paul Brook - - PR fortran/17190 - * arith.c (gfc_mpfr_to_mpz): Workaround mpfr bug. - -2004-08-25 Paul Brook - - PR fortran/17144 - * trans-array.c (gfc_trans_allocate_temp_array): Remove - string_length argument. - (gfc_trans_array_ctor_element): New function. - (gfc_trans_array_constructor_subarray): Use it. - (gfc_trans_array_constructor_value): Ditto. Handle constant - character arrays. - (get_array_ctor_var_strlen, get_array_ctor_strlen): New functions. - (gfc_trans_array_constructor): Use them. - (gfc_add_loop_ss_code): Update to new gfc_ss layout. - (gfc_conv_ss_descriptor): Remember section string length. - (gfc_conv_scalarized_array_ref): Ditto. Remove dead code. - (gfc_conv_resolve_dependencies): Update to new gfc_ss layout. - (gfc_conv_expr_descriptor): Ditto. - (gfc_conv_loop_setup): Ditto. Spelling fixes. - * trans-array.h (gfc_trans_allocate_temp_array): Update prototype. - * trans-const.c (gfc_conv_constant): Update to new gfc_ss layout. - * trans-expr.c (gfc_conv_component_ref): Turn error into ICE. - (gfc_conv_variable): Set string_length from section. - (gfc_conv_function_call): Remove extra argument. - (gfc_conv_expr, gfc_conv_expr_reference): Update to new gfc_ss layout. - * trans-types.c (gfc_get_character_type_len): New function. - (gfc_get_character_type): Use it. - (gfc_get_dtype): Return zero for internal types. - * trans-types.h (gfc_get_character_type_len): Add prototype. - * trans.h (struct gfc_ss): Move string_length out of union. - -2004-08-25 Tobias Schlueter - - * trans.h (build2_v, build3_v): New macros. - (build_v): Remove. - * f95-lang.c (gfc_truthvalue_conversion): Use build2 instead of - build. - * trans-array.c (gfc_conv_descriptor_data, - gfc_conv_descriptor_offset, gfc_conv_descriptor_dimension, - gfc_conv_descriptor_stride, gfc_conv_descriptor_lbound, - gfc_conv_descriptor_ubound, gfc_trans_allocate_array_storage, - gfc_trans_allocate_temp_array, - gfc_trans_array_constructor_subarray, - gfc_trans_array_constructor_value, gfc_conv_array_index_ref, - gfc_trans_array_bound_check, gfc_conv_array_index_offset, - gfc_conv_scalarized_array_ref, gfc_conv_array_ref, - gfc_conv_array_ref, gfc_trans_preloop_setup, - gfc_trans_scalarized_loop_end, gfc_conv_ss_startstride, - gfc_conv_loop_setup, gfc_array_init_size, - gfc_conv_array_initializer, gfc_trans_array_bounds, - gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias, - gfc_conv_expr_descriptor, gfc_conv_array_parameter, - gfc_trans_deferred_array): Use buildN and buildN_v macros instead - of build and build_v as appropriate. - * trans-common.c (create_common): Same. - * trans-decl.c (gfc_trans_auto_character_variable, - gfc_trans_entry_master_switch, gfc_generate_function_code): Same. - * trans-expr.c (gfc_conv_expr_present, gfc_conv_substring, - gfc_conv_component_ref, gfc_conv_unary_op, gfc_conv_powi, - gfc_conv_cst_int_power, gfc_conv_string_tmp, gfc_conv_concat_op, - gfc_conv_expr_op, gfc_conv_function_call, - gfc_trans_structure_assign): Same. - * trans-intrinsic.c (build_fixbound_expr, build_round_expr, - gfc_conv_intrinsic_aint, gfc_conv_intrinsic_bound, - gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_mod, - gfc_conv_intrinsic_dim, gfc_conv_intrinsic_sign, - gfc_conv_intrinsic_dprod, gfc_conv_intrinsic_minmax, - gfc_conv_intrinsic_anyall, gfc_conv_intrinsic_count, - gfc_conv_intrinsic_arith, gfc_conv_intrinsic_minmaxloc, - gfc_conv_intrinsic_minmaxval, gfc_conv_intrinsic_btest, - gfc_conv_intrinsic_bitop, gfc_conv_intrinsic_singlebitop, - gfc_conv_intrinsic_ibits, gfc_conv_intrinsic_ishft, - gfc_conv_intrinsic_merge, gfc_conv_intrinsic_strcmp, - gfc_conv_allocated, gfc_conv_associated, prepare_arg_info, - gfc_conv_intrinsic_spacing, gfc_conv_intrinsic_rrspacing, - gfc_conv_intrinsic_trim, gfc_conv_intrinsic_repeat, - gfc_conv_intrinsic_iargc): Same. - * trans-io.c (set_parameter_value, set_parameter_ref, set_string, - set_flag, add_case, io_result, transfer_namelist_element, - transfer_expr): Same. - * trans-stmt.c (gfc_trans_goto, gfc_trans_return, gfc_trans_if_1, - gfc_trans_arithmetic_if, gfc_trans_do, gfc_trans_do_while, - gfc_trans_integer_select, gfc_trans_logical_select, - gfc_trans_character_select, gfc_trans_forall_loop, - gfc_trans_nested_forall_loop, gfc_do_allocate, - generate_loop_for_temp_to_lhs, generate_loop_for_rhs_to_temp, - compute_inner_temp_size, compute_overall_iter_number, - allocate_temp_for_forall_nest, gfc_trans_pointer_assign_need_temp, - gfc_trans_forall_1, gfc_evaluate_where_mask, - gfc_trans_where_assign, gfc_trans_allocate): Same. - * trans-types.c (gfc_get_dtype, gfc_get_array_type_bounds): Same. - * trans.c (gfc_add_modify_expr, gfc_finish_block, - gfc_build_array_ref, gfc_build_function_call, - gfc_trans_runtime_check): Same. - -2004-08-25 Tobias Schlueter - - * trans-const.c (gfc_conv_mpz_to_tree): Change call to - build_int_cst to build_int_cst_wide in accordance to Nathan's - previous patch. - -2004-08-25 Nathan Sidwell - - * trans-array.c (gfc_trans_array_constructor_value): Adjust - build_int_cst calls. - * trans-const.c (gfc_build_string_const, gfc_init_constants, - gfc_conv_mpz_to_tree, gfc_conv_constant_to_tree): Likewise. - * trans-decl.c (gfc_get_symbol_decl, build_entry_thunks, - gfc_trans_entry_master_switch): Likewise. - * trans-intrinsic.c (gfc_conv_intrinsic_ibits, - gfc_conv_intrinsic_len, prepare_arg_info): Likewise. - * trans-io.c (add_case, set_error_locus, - transfer_namelist_element, transfer_expr): Likewise. - * trans-stmt.c (gfc_trans_label_assign, gfc_trans_pause, - gfc_trans_stop, gfc_trans_character_select): Likewise. - * trans-types.c (gfc_init_types, gfc_get_dtype): Likewise. - * trans.c (gfc_trans_runtime_check): Likewise. - -2004-08-24 Tobias Schlueter - - * trans-decl.c, trans-types.c: Add and remove blank lines as - required. - -2004-08-24 Richard Henderson - - * trans-const.c (gfc_conv_mpz_to_tree): Fix 64-bit shift warning. - -2004-08-24 Tobias Schlueter - - * resolve.c (merge_argument_lists): Revert unintentionally - committed change. - -2004-08-24 Tobias Schlueter - - * trans-decl.c (build_function_decl): Fix spelling in comment. - (build_entry_thunks): Remove code with no function. - (gfc_build_intrinsic_function_decls): Remove empty line. - - * resolve.c (resolve_entries): Fix a bunch of comment typos. - -2004-08-24 Nathan Sidwell - - * f95-lang.c (gfc_init_decl_processing): Adjust - build_common_tree_nodes call. - -2004-08-24 Tobias Schlueter - - * trans-types.c: Spelling and formatting fixes. - -2004-08-23 Richard Henderson - - * trans-const.c (gfc_conv_mpz_to_tree): Use mpz_getlimbn instead - of going through an intermediate string. Fix 32/64 int/long bug. - -2004-08-23 Eric Christopher - - * trans-types.c (gfc_type_for_mode): Remove VECTOR_TYPE_SUPPORTED_P - usage. Use build_vector_type_for_mode for vector types. - -2004-08-22 Richard Henderson - - PR 13465 - * data.c (find_con_by_offset): Search ordered list; handle - elements with repeat counts. - (gfc_assign_data_value_range): New. - * gfortran.h (struct gfc_data_value): Make repeat unsigned. - (gfc_assign_data_value_range): Declare. - * match.c (top_val_list): Extract repeat count into a temporary. - * resolve.c (values): Make left unsigned. - (next_data_value): Don't decrement left. - (check_data_variable): Use gfc_assign_data_value_range. - -2004-08-22 Tobias Schlueter - - * trans-const.c, trans-decl.c, trans-expr.c: Spelling fixes. - -2004-08-22 Tobias Schlueter - - * check.c (gfc_check_reduction): Rename to ... - (check_reduction): ... this. Make static. Don't check type of - first argument. - (gfc_check_minval_maxval, gfc_check_prodcut_sum): New functions. - * intrinsic.c (add_functions): Change MAXVAL, MINVAL, PRODUCT and - SUM to use new check functions. - (check_specific): Change logic to call new functions. - * intrinsic.h (gfc_check_minval_maxval, gfc_check_product_sum): - Add prototypes. - (gfc_check_reduction): Remove prototype. - -2004-08-20 Paul Brook - Canqun Yang - - PR fortran/17077 - * trans-array.c (gfc_conv_array_parameter): Pass correct pointer - for automatic arrays. - * trans-types.c (gfc_get_nodesc_array_type): Add comment. - -2004-08-19 Tobias Schlueter - (Port from g95) - - PR fortran/17074 - * match.c (match_simple_forall, match_simple_where): Forward-declare. - (gfc_match_if): Order statement list alphabetically, add WHERE and - FORALL, remove double PAUSE. - (gfc_match_simple_where, match_forall_header, - gfc_match_simple_forall): New functions. - (gfc_match_forall): Use match_forall_header. - -2004-08-19 Paul Brook - - PR fortran/17091 - * gfortran.h (gfc_access): Give ACCESS_UNKNOWN value 0. - * symbol.c (gfc_clear_attr): Use memset. - -2004-08-19 Paul Brook - - PR fortran/14976 - PR fortran/16228 - * data.c (assign_substring_data_value): Remove. - (create_character_intializer): New function. - (gfc_assign_data_value): Track the typespec for the current - subobject. Use create_character_intializer. - -2004-08-19 Erik Schnetter - - PR fortran/16946 - * check.c (gfc_check_reduction): New function. - (gfc_check_minval_maxval): Removed. - (gfc_check_product): Removed. - (gfc_check_sum): Removed. - * intrinsic.h: Add/remove declarations for these. - * gfortran.h: Add field f3red to union gfc_check_f. - * intrinsic.c (add_sym_3red): New function. - (add_functions): Register maxval, minval, product, and sum intrinsics - through add_sym_3red. - (check_specific): Handle f3red union field. - * iresolve.c: Whitespace change. - -2004-08-18 Paul Brook - - * trans-types.c (gfc_sym_type): Use pointer types for optional args. - -2004-08-18 Victor Leikehman - - PR fortran/13278 - * trans-io.c (transfer_namelist_element): New. Recursively handle - derived-type variables. Pass string lengths. - (build_dt): Code moved to build_namelist, with some - changes and additions. - (gfc_build_io_library_fndecls): Declare the fifth - argument in st_set_nml_var_char -- string_length. - -2004-08-17 Paul Brook - Tobias Schlueter - - PR fortran/13082 - * decl.c (get_proc_name): Update mystery comment. - (gfc_match_entry): Check for errors earlier. Add entry point to list. - * dump-parse-tree.c (gfc_show_code_node): Print EXEC_ENTRY nodes. - * gfortran.h (symbol_attribute): Add entry_master. Document entry. - (struct gfc_entry_list): Define. - (gfc_get_entry_list): Define. - (struct gfc_namespace): Add refs and entries. - (enum gfc_exec_op): Add EXEC_ENTRY. - (struct gfc_code): Add ext.entry. - * module.c (ab_attribute, attr_bits): Remove AB_ENTRY. - (mio_symbol_attribute): Don't save/reture addr->entry. - (mio_namespace_ref): Refcount namespaces. - * parse.c (accept_statement): Handle ST_ENTRY. - (gfc_fixup_sibling_symbols): Mark symbol as referenced. - (parse_contained): Fixup sibling references to entry points - after parsing the procedure body. - * resolve.c (resolve_contained_fntype): New function. - (merge_argument_lists, resolve_entries): New functions. - (resolve_contained_functions): Use them. - (resolve_code): Handle EXEC_ENTRY. - (gfc_resolve): Call resolve_entries. - * st.c (gfc_free_statement): Handle EXEC_ENTRY. - * symbol.c (gfc_get_namespace): Refcount namespaces. - (gfc_free_namespace): Ditto. - * trans-array.c (gfc_trans_dummy_array_bias): Treat all args as - optional when multiple entry points are present. - * trans-decl.c (gfc_get_symbol_decl): Remove incorrect check. - (gfc_get_extern_function_decl): Add assertion. Fix coment. - (create_function_arglist, trans_function_start, build_entry_thunks): - New functions. - (gfc_build_function_decl): Rename ... - (build_function_decl): ... to this. - (gfc_create_function_decl): New function. - (gfc_generate_contained_functions): Use it. - (gfc_trans_entry_master_switch): New function. - (gfc_generate_function_code): Use new functions. - * trans-stmt.c (gfc_trans_entry): New function. - * trans-stmt.h (gfc_trans_entry): Add prototype. - * trans-types.c (gfc_get_function_type): Add entry point argument. - * trans.c (gfc_trans_code): Handle EXEC_ENTRY. - (gfc_generate_module_code): Call gfc_create_function_decl. - * trans.h (gfc_build_function_decl): Remove. - (gfc_create_function_decl): Add prototype. - -2004-08-15 Andrew Pinski - - PR fortran/17030 - * f95-lang.c (gfc_init_builtin_functions): Initialize the builtins - for cabs{,f} and copysign{,f}. - * trans-decl.c (gfor_fndecl_math_cabsf): Delete. - (gfor_fndecl_math_cabs): Delete. - (gfor_fndecl_math_sign4): Delete. - (gfor_fndecl_math_sign8): Delete. - (gfc_build_intrinsic_function_decls): Remove the - initializing of cabs{,f} and copysign{,f} functions. - * trans-intrinsic.c (gfc_conv_intrinsic_abs): Use the builtins - instead of the functions definitions. - (gfc_conv_intrinsic_sign): Likewise. - * trans.h (gfor_fndecl_math_cabsf): Delete. - (gfor_fndecl_math_cabs): Delete. - (gfor_fndecl_math_sign4): Delete. - (gfor_fndecl_math_sign8): Delete. - -2004-08-15 Nathan Sidwell - - * trans-array.c (gfc_trans_array_constructor_value): Use - build_int_cst. - * trans-const.c (gfc_build_string_const, - gfc_init_constants, gfc_conv_mpz_to_tree, - gfc_conv_constant_to_tree): Likewise. - * trans-decl.c (gfc_get_symbol_decl): Likewise. - * trans-intrinsic.c (gfc_conv_intrinsic_ibits, - gfc_conv_intrinsic_len, prepare_arg_info): Likewise. - * trans-io.c (add_case, set_error_locus, build_dt, - transfer_expr): Likewise. - * trans-stmt.c (gfc_trans_label_assign, gfc_trans_pause, - gfc_trans_stop, gfc_trans_character_select): Likewise. - * trans-types.c (gfc_init_types, gfc_get_dtype): Likewise. - * trans.c (gfc_trans_runtime_check): Likewise. - -2004-08-14 Paul Brook - - * trans-decl.c (gfc_build_function_decl): Remove dead code. - -2004-08-14 Paul Brook - - * trans-arry.c (gfc_trans_auto_array_allocation): Remove unused var. - -2004-08-13 Tobias Schlueter - - * gfortran.h: Add comments. - * parse.c (parse_contained): Fix comment typo. - * resolve.c (was_declared): Ditto. - * symbol.c: Ditto. - -2004-08-11 Paul Brook - - PR fortran/16917 - * intrinsic.c (add_functions): Add dfloat as an alias for dble. - -2004-08-10 Richard Henderson - - * f95-lang.c (gfc_init_builtin_functions): Remove - __builtin_stack_alloc, add __builtin_alloca. - * trans-array.c (gfc_trans_auto_array_allocation): Use DECL_EXPR. - * trans-decl.c (gfc_trans_auto_character_variable): Likewise. - -2004-08-10 Paul Brook - - * trans-io.c (transfer_expr): Handle pointters. - -2004-08-10 Paul Brook - - PR fortran/16919 - * trans-array.c (gfc_add_loop_ss_code): Handle GFC_SS_COMPONENT. - (gfc_conv_array_index_offset): Allow "temporary" with nonzero delta. - (gfc_trans_preloop_setup, gfc_trans_scalarized_loop_boundary): - Handle GFC_SS_COMPONENT. - (gfc_conv_ss_startstride): Ditto. Set ss->shape. - (gfc_conv_loop_setup): Tweak commends. Remove dead code. - Use ss->shape. - (gfc_conv_array_initializer): Call specific initializer routines. - * trans-expr.c (gfc_trans_structure_assign): New function. - (gfc_trans_subarray_assign): New function. - (gfc_trans_subcomponent_assign): New fucntion - (gfc_conv_structure): Use them. - * trans.h (gfc_ss_type): Add GFC_SS_COMPONENT. - (gfc_ss): Add shape. - -2004-08-08 Victor Leikehman - - * simplify.c (gfc_simplify_shape): Bugfix. - * expr.c (gfc_copy_shape_excluding): New function. - * gfortran.h (gfc_get_shape): Bugfix. - (gfc_copy_shape_excluding): Added declaration. - * iresolve.c (gfc_resolve_all, gfc_resolve_any, gfc_resolve_count, - gfc_resolve_cshift, gfc_resolve_eoshift, gfc_resolve_lbound, - gfc_resolve_ubound, gfc_resolve_transpose): Added compile - time resolution of shape. - -2004-08-06 Janne Blomqvist - - * intrinsic.c (add_subroutines): Add getenv and - get_environment_variable. (add_sym_5s): New function. - * intrinsic.h (gfc_resolve_get_environment_variable): Add - prototype. - * iresolve.c (gfc_resolve_get_environment_variable): New - function. - -2004-08-06 Feng Wang - - * f95-lang.c (gfc_init_builtin_functions): Fix the number of - __builtin_pow[f] arguments. - -2004-08-06 Steven G. Kargl - - * arith.c: Add #define for model numbers. Remove global GMP variables. - (natural_logarithm,common_logarithm,exponential,sine, - cosine,arctangent,hypercos,hypersine ): Remove. - (gfc_mpfr_to_mpz,gfc_set_model_kind,gfc_set_model): New functions. - (arctangent2,gfc_arith_init_1,gfc_arith_done_1 - gfc_check_real_range, gfc_constant_result, gfc_range_check, - gfc_arith_uminus,gfc_arith_plus, gfc_arith_minus, gfc_arith_times, - gfc_arith_divide,complex_reciprocal,complex_pow_ui, - gfc_arith_power,gfc_compare_expr,compare_complex,gfc_convert_real, - gfc_convert_complex,gfc_int2real,gfc_int2complex, - gfc_real2int,gfc_real2real,gfc_real2complex, - gfc_complex2int,gfc_complex2real,gfc_complex2complex): Convert GMP - to MPFR, use new functions. - * arith.h: Remove extern global variables. - (natural_logarithm,common_logarithm,exponential, sine, cosine, - arctangent,hypercos,hypersine): Remove prototypes. - (arctangent2): Update prototype from GMP to MPFR. - (gfc_mpfr_to_mpz, gfc_set_model_kind,gfc_set_model): Add prototypes. - * dump-parse-tree.c (gfc_show_expr): Convert GMP to MPFR. - * expr.c (free_expr0,gfc_copy_expr): Convert GMP to MPFR. - * gfortran.h (GFC_REAL_BITS): Remove. - (arith): Add ARITH_NAN. - Include mpfr.h. Define GFC_RND_MODE. - Rename GCC_GFORTRAN_H GFC_GFC_H. - (gfc_expr): Convert GMP to MPFR. - * module.c: Add arith.h, correct type in comment. - (mio_gmp_real): Convert GMP to MPFR. - (mio_expr): Use gfc_set_model_kind(). - * primary.c: Update copyright date with 2004. - (match_real_constant,match_const_complex_part): Convert GMP to MPFR. - * simplify.c: Remove global GMP variables - (gfc_simplify_abs,gfc_simplify_acos,gfc_simplify_aimag, - gfc_simplify_aint,gfc_simplify_dint,gfc_simplify_anint, - gfc_simplify_dnint,gfc_simplify_asin,gfc_simplify_atan, - gfc_simplify_atan2,gfc_simplify_ceiling,simplify_cmplx, - gfc_simplify_conjg,gfc_simplify_cos,gfc_simplify_cosh, - gfc_simplify_dim,gfc_simplify_dprod,gfc_simplify_epsilon, - gfc_simplify_exp,gfc_simplify_exponent,gfc_simplify_floor, - gfc_simplify_fraction,gfc_simplify_huge,gfc_simplify_int, - gfc_simplify_ifix,gfc_simplify_idint,gfc_simplify_log, - gfc_simplify_log10,simplify_min_max,gfc_simplify_mod, - gfc_simplify_modulo,gfc_simplify_nearest,simplify_nint, - gfc_simplify_rrspacing,gfc_simplify_scale, - gfc_simplify_set_exponent,gfc_simplify_sign,gfc_simplify_sin, - gfc_simplify_sinh,gfc_simplify_spacing,gfc_simplify_sqrt, - gfc_simplify_tan,gfc_simplify_tanh,gfc_simplify_tiny, - gfc_simplify_init_1,gfc_simplify_done_1): Convert GMP to MPFR. - Use new functions. - * trans-const.c (gfc_conv_mpfr_to_tree): Rename from - gfc_conv_mpf_to_tree. Convert it to use MPFR - (gfc_conv_constant_to_tree): Use it. - * trans-const.h: Update prototype for gfc_conv_mpfr_to_tree(). - * trans-intrinsic.c: Add arith.h, remove gmp.h - (gfc_conv_intrinsic_aint,gfc_conv_intrinsic_mod): Convert GMP to MPFR. - -2004-08-06 Victor Leikehman - Paul Brook - - * trans-array.c (gfc_trans_allocate_array_storage, - gfc_trans_allocate_temp_array, gfc_add_loop_ss_code, - gfc_conv_loop_setup): For functions, if the shape of the result - is not known in compile-time, generate an empty array descriptor for - the result and let the callee to allocate the memory. - (gfc_trans_dummy_array_bias): Do nothing for pointers. - (gfc_conv_expr_descriptor): Use function return values directly. - * trans-expr.c (gfc_conv_function_call): Always add byref call - insn to pre chain. - (gfc_trans_pointer_assignment): Add comments. - (gfc_trans_arrayfunc_assign): Don't chain on expression. - -2004-08-01 Roger Sayle - - * options.c (gfc_init_options): Don't warn about the use GNU - extensions by default. - (gfc_post_options): Warn about GNU extensions with -pedantic. - (gfc_handle_option): Don't warn about GNU extensions with -std=gnu. - -2004-07-30 Richard Henderson - - * trans-expr.c (gfc_conv_expr_reference): Create a CONST_DECL - for TREE_CONSTANTs. - -2004-07-25 Richard Henderson - - * trans-decl.c (gfc_build_function_decl): Set DECL_ARTIFICIAL - and DECL_IGNORED_P on RESULT_DECL. - (gfc_generate_constructors): Likewise. - -2004-07-18 Tobias Schlueter - - PR fortran/16465 - * lang.opt (ffixed-line-length-none, ffixed-line-length-): New - options. - (ffixed-line-length-80, ffixed-line-length-132): Remove. - * options.c (gfc_handle_options): Deal with changed options. - * scanner.c (load_line): Change second arg to 'char **', - allocate if pointing to NULL. Keep track of buffer's length. - Adapt buffer size to overlong lines. Pad lines to full length - in fixed form. - (load_file): Adapt to new interface of load_line. - -2004-07-17 Joseph S. Myers - - * trans.h (builtin_function): Declare. - -2004-07-16 Tobias Schlueter - - PR fortran/16404 - (parts ported from g95) - * parse.h (gfc_state_data): New field do_variable. - (gfc_check_do_variable): Add prototype. - * parse.c (push_state): Initialize field 'do_variable'. - (gfc_check_do_variable): New function. - (parse_do_block): Remember do iterator variable. - (parse_file): Initialize field 'do_variable'. - * match.c (gfc_match_assignment, gfc_match_do, - gfc_match_allocate, gfc_match_nullify, gfc_match_deallocate): - Add previously missing checks. - (gfc_match_return): Reformat error message. - * io.c (match_out_tag): New function. - (match_open_element, match_close_element, - match_file_element, match_dt_element): Call match_out_tag - instead of match_vtag where appropriate. - (match_io_iterator, match_io_element): Add missing check. - (match_io): Reformat error message. - (match_inquire_element): Call match_out_tag where appropriate. - - * parse.c (gfc_check_do_variable): Fix error locus. - -2004-07-15 Tobias Schlueter - - PR fortran/15129 - * trans-decl.c (gfc_build_function_decl): Create a new chardecl - for every assumed length character dummy argument. - - PR fortran/15140 - * trans-decl.c (gfc_trans_deferred_vars): Remove bogus assertion. - - PR fortran/13792 - * simplify.c (gfc_simplify_bound): Copy the bound expression. - -2004-07-15 Tobias Schlueter - - PR fortran/15324 - * trans-array.c gfc_trans_g77_array, - gfc_trans_dummy_array_bias): Don't call gfc_trans_string_init - for assumed length characters. - (gfc_conv_expr_descriptor): Set se->string_length if dealing - with a character expression. - (gfc_cvonv_array_parameter): Pass string length when passing - character array according to g77 conventions. - -2004-07-12 Paul Brook - - * expr.c (gfc_check_assign_symbol): Handle pointer assignments. - * trans-array.c (gfc_trans_auto_array_allocation): Remove - initialization code. - * trans-common.c (create_common): Use gfc_conv_initializer. - * trans-decl.c (gfc_get_symbol_decl): Use gfc_conv_initializer. - * trans-expr.c (gfc_conv_initializer): New function. - (gfc_conv_structure): Use it. - * trans.h (gfc_conv_initializer): Add prototype. - -2004-07-11 Paul Brook - - PR fortran/15986 - * parse.c (gfc_fixup_sibling_symbols): Also look for untyped - variables. - (parse_contained): Mark contained symbols as referenced. - -2004-07-11 Tobias Schlueter - - PR fortran/16455 - * module.c (gfc_dump_module, gfc_use_module): Print locus - when opening of module file fails. - - PR fortran/16404 - * io.c (match_io): Flag 'WRITE(...), ...' as extension. - - PR fortran/16404 - * match.c (gfc_match_program): A program name is obligatory. - (gfc_match_return): RETURN in main program is an extension. - (gfc_match_block_data): A space is required before a block data - name. - - PR fortran/16433 - * primary.c (match_boz_constant): Call gfc_notify_std only if - we actually have a non-standard boz-literal-constant. - - PR fortran/15754 - * expr.c (gfc_check_assign): Print ranks if incompatible. Issue - warning if assigning NULL(). - -2004-07-11 Joseph S. Myers - - * f95-lang.c (set_block): Remove. - (gfc_clear_binding_stack): New. - (LANG_HOOKS_CLEAR_BINDING_STACK): Define. - (struct binding_level): Remove block_created_by_back_end. - (clear_binding_level): Likewise. - (poplevel): Don't handle block_created_by_back_end. - -2004-07-10 Tobias Schlueter - - * trans-decl.c (gfc_create_module_variable): Nothing to do if - symbol is in common, because we ... - (gfc_generate_module_vars): Call gfc_trans_common. - -2004-07-10 Paul Brook - - * trans-array.c (gfc_build_null_descriptor): New function. - (gfc_trans_static_array_pointer): Use it. - * trans-array.h (gfc_build_null_descriptor): Add prototype. - * trans-expr.c (gfc_conv_structure): Handle array pointers. - -2004-07-10 Tobias Schlueter - - PR fortran/16336 - * decl.c (gfc_match_save): Use-associated common block - doesn't collide. - * gfortran.h (gfc_common_head): Add new field 'name'. - Fix typo in comment after #endif. - * match.c (gfc_get_common): Add new argument from_common, - mangle name if flag is set, fill in new field in structure - gfc_common_head. - (match_common): Set new arg in call to gfc_get_common, - use-associated common block doesn't collide. - * match.h (gfc_get_common): Adapt prototype. - * module.c (load_commons): Set new arg in call to - gfc_get_common. - * symbol.c (free_common_tree): New function. - (gfc_free_namespace): Call new function. - * trans-common.c (several functions): Remove argument - 'name', use name from gfc_common_head instead. - -2004-07-10 Tobias Schlueter - - * expr.c (gfc_check_pointer_assign): Verify that rank of the LHS - and RHS match. Return early if the RHS is NULL(). - - PR fortran/16336 - * match.c (match_common): Fix error reporting for used common. - - PR fortran/15969 - * trans-expr.c (gfc_conv_structure): Handle initialization - of scalar pointer components. - - * parse.c (decode_statement): Fix matching of BLOCK DATA. - - * trans-decl.c (generate_local_decl): Remove workaround obsoleted - by fix for PR 15481. - -2004-07-10 Tobias Schlueter - - * trans-common.c: Fix whitespace issues, make variable names - more readable. - (create_common): Additionally, make loop logic more obvious. - -2004-07-10 Tobias Schlueter - Paul Brook - - PR fortran/13415 - * trans-common.c (calculate_length): Remove ... - (get_segment_info): Merge into here. Save field type. - (build_field): Use saved type. - (create_common, new_condition, new_segment, finish_equivalences): - Use new get_segment_info. - * trans-types.c: Update comment. - -2004-07-09 Tobias Schlueter - - PR fortran/14077 - * moduele.c (mio_symbol): Don't I/O initial values unless - symbol is a parameter. - -2004-07-09 Tobias Schlueter - - PR fortran/13201 - * resolve.c (resolve_symbol): Verify that the shape of a - parameter array is not only explicit, but also constant. - * array.c (gfc_is_compile_time_shape): New function. - * gfortran.h (gfc_is_compile_time_shape): Add prototype. - -2004-07-09 Tobias Schlueter - - PR fortran/15481 - PR fortran/13372 - PR fortran/13575 - PR fortran/15978 - * module.c (write_symbol, write_symtree): Remove workaround. - * primary.c (match_actual_arglist): Enhance comment. - (gfc_match_rvalue): Handle function call with first argument - a keyword argument correctly. - * resolve.c (resolve_symbol): Change call to - gfc_set_default_type to issue error if no implicit type - can be found. - * trans-decl.c (gfc_create_module_variable): Remove workaround. - -2004-07-08 Paul Brook - - * intrinsic.c (add_sym_4s): New function. - (add_subroutines): Change gfc_add_sym_? to gfc_add_sym_?s. - -2004-07-04 Janne Blomqvist - Paul Brook - - PR fortran/15280 - PR fortran/15665 - * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_IARGC and - GFC_ISYM_COMMAND_ARGUMENT_COUNT. - * intrinsic.c (add_functions): Identify iargc. Add - command_argument_count. - (add_subroutines): Resolve getarg. Add get_command and - get_command_argument. - * intrinsic.h (gfc_resolve_getarg, gfc_resolve_get_command, - gfc_resolve_get_command_argument): Add prototypes. - * iresolve.c (gfc_resolve_getarg, gfc_resolve_get_command, - gfc_resolve_get_command_argument): New functions. - * trans-decl.c (gfor_fndecl_iargc): New variable. - (gfc_build_intrinsic_function_decls): Set it. - * trans-intrinsic.c (gfc_conv_intrinsic_iargc): New function. - (gfc_conv_intrinsic_function): Use it. - * trans.h (gfor_fndecl_iargc): Declare. - -2004-07-04 Matthias Klose - - * Make-lang.in: Generate and install gfortran man page. - * invoke.texi: Remove extra '@c man end'. - -2004-07-04 Richard Henderson - - * f95-lang.c (gfc_mark_addressable): Don't put_var_into_stack. - -2004-07-04 Paul Brook - - * decl.c (gfc_match_implicit_range): Don't use typespec. - (gfc_match_implicit): Handle character selectors. - * gfortran.h (gfc_set_implicit): Remove prototype. - (gfc_add_new_implicit_range, gfc_merge_new_implicit): Update. - * parse.c (accept_statement): Don't call gfc_set_implicit. - * symbol.c (new_ts): Remove. - (gfc_set_implicit_none): Use same loop bounds as other functions. - (gfc_set_implicit): Remove. - (gfc_clear_new_implicit, gfc_add_new_implicit_range): Only set flags. - (gfc_merge_new_implicit): Combine with gfc_set_implicit. - -2004-06-30 Richard Henderson - - * match.c (var_element): Remove unused variable. - - * trans-decl.c (gfc_generate_function_code): Don't set - x_whole_function_mode_p. - (gfc_generate_constructors): Likewise. - -2004-06-30 Richard Henderson - - * trans-decl.c (gfc_generate_function_code): Don't set - immediate_size_expand. - (gfc_generate_constructors): Likewise. - -2004-06-30 Tobias Schlueter - - PR fortran/16161 - * decl.c (gfc_match_type_spec): Rename second argument to - 'implicit_flag', reverse meaning. Don't match_char_spec if - 'implicit_flag' is set. Rename to ... - (match_type_spec): ... this. - (gfc_match_implicit_none, match_implicit_range): Move here - from match.c. - (gfc_match_implicit): Move here from match.c, try to - match_char_len if match_implicit_range doesn't succeed for - CHARACTER implicits. Call renamed fucntion match_type_spec. - (gfc_match_data_decl, match_prefix): Call renamed function - match_type_spec. - * match.c (gfc_match_implicit_none, match_implicit_range, - gfc_match_implicit): Move to decl.c. - * match.h (gfc_match_implicit_none, gfc_match_implicit): - Move protoypes to section 'decl.c'. - (gfc_match_type_spec): Remove prototype. - -2004-06-29 Tobias Schlueter - - * decl.c, interface.c, symbol.c, trans-common.c: Add 2004 to - copyright years. - -2004-06-29 Steven Bosscher - - Make sure types in assignments are compatible. Mostly mechanical. - * trans-const.h (gfc_index_one_node): New define. - * trans-array.c (gfc_trans_allocate_array_storage, - gfc_trans_allocate_temp_array, gfc_trans_array_constructor_subarray, - gfc_trans_array_constructor_value, gfc_trans_array_constructor, - gfc_conv_array_ubound, gfc_conv_array_ref, - gfc_trans_scalarized_loop_end, gfc_conv_section_startstride, - gfc_conv_ss_startstride, gfc_conv_loop_setup, gfc_array_init_size, - gfc_trans_array_bounds, gfc_trans_dummy_array_bias, - gfc_conv_expr_descriptor, gfc_trans_deferred_array): Use the correct - types in assignments, conversions and conditionals for expressions. - * trans-expr.c (gfc_conv_expr_present, gfc_conv_substring, - gfc_conv_unary_op, gfc_conv_cst_int_power, gfc_conv_string_tmp, - gfc_conv_function_call, gfc_trans_pointer_assignment, - gfc_trans_scalar_assign): Likewise. - * trans-intrinsic.c (build_fixbound_expr, gfc_conv_intrinsic_bound, - gfc_conv_intrinsic_anyall, gfc_conv_intrinsic_count, - gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_btest, - gfc_conv_intrinsic_singlebitop, gfc_conv_intrinsic_ishft, - gfc_conv_intrinsic_ishftc, gfc_conv_intrinsic_strcmp, - gfc_conv_allocated, gfc_conv_associated, - gfc_conv_intrinsic_rrspacing, gfc_conv_intrinsic_trim): Likewise. - * trans-io.c (set_string): Likewise. - * trans-stmt.c (gfc_trans_do, gfc_trans_forall_loop, - gfc_do_allocate, generate_loop_for_temp_to_lhs, - generate_loop_for_rhs_to_temp, compute_inner_temp_size, - compute_overall_iter_number, gfc_trans_assign_need_temp, - gfc_trans_pointer_assign_need_temp, gfc_trans_forall_1, - gfc_evaluate_where_mask, gfc_trans_where_assign, - gfc_trans_where_2): Likewise. - * trans-types.c (gfc_get_character_type, gfc_build_array_type, - gfc_get_nodesc_array_type, gfc_get_array_type_bounds): Likewise. - - * trans.c (gfc_add_modify_expr): Add sanity check that types - for the lhs and rhs are the same for scalar assignments. - -2004-06-29 Tobias Schlueter - - * dump-parse-tree.c (show_common): New function. - (gfc_show_namespace): Show commons. - -2004-06-29 Tobias Schlueter - Andrew Vaught - - PR fortran/13249 - PR fortran/15481 - * decl.c (gfc_match_save): Adapt to new common structures, - don't allow saving USE-associated common. - * dump-parse-tree (gfc_show_attr): (saved_)common are not - symbol attributes any longer. - (gfc_show_symbol): Don't show old-style commons any longer. - (gfc_show_namespace): Adapt call to gfc_traverse_symtree to new - interface. - * gfortran.h (symbol_attribute): Remove common and saved_common - attributes. - (gfc_symbol): Remove common_head element. - (gfc_common_head): New struct. - (gfc_get_common_head): New macro. - (gfc_symtree): Add field 'common' to union. - (gfc_namespace): Add field 'common_root'; change type of field - 'blank_common' to blank_common. - (gfc_add_data): New prototype. - (gfc_traverse_symtree): Expect a symtree as first argument - instead of namespace. - * match.c (gfc_get_common): New function. - (match_common_name): Change to take char * as argument, adapt, - fix bug with empty name. - (gfc_match_common): Adapt to new data structures. Disallow - redeclaration of USE-associated COMMON-block. Fix bug with - empty common. - (var_element): Adapt to new common structures. - * match.h (gfc_get_common): Declare. - * module.c: Add 2004 to copyright years, add commons to module - file layout description. - (ab_attribute, attr_bits, mio_symbol_attributes): Remove code - for removed attributes. - (mio_symbol): Adapt to new way of storing common relations. - (load_commons): New function. - (read_module): Skip common list on first pass, load_commons at - second. - (write_commons): New function. - (write_module): Call write_commons(). - * symbol.c (gfc_add_saved_comon, gfc_add_common): Remove - functions related to removed attributes. - (gfc_add_data): New function. - (gfc_clear_attr): Don't set removed attributes. - (gfc_copy_attr): Don't copy removed attributes. - (traverse_symtree): Remove. - (gfc_traverse_symtree): Don't traverse symbol - tree of the passed namespace, but require a symtree to be passed - instead. Unify with traverse_symtree. - (gfc_traverse_ns): Call gfc_traverse_symtree according to new - interface. - (save_symbol): Remove setting of removed attribute. - * trans-common.c (gfc_sym_mangled_common_id): Change to - take 'char *' argument instead of 'gfc_symbol'. - (build_common_decl, new_segment, translate_common): Adapt to new - data structures, add new - argument name. - (create_common): Adapt to new data structures, add new - argument name. Fix typo in intialization of derived types. - (finish_equivalences): Add second argument in call to - create_common. - (named_common): take 'gfc_symtree' instead of 'gfc_symbol'. - (gfc_trans_common): Adapt to new data structures. - * trans-decl.c (gfc_create_module_variables): Remove test for - removed attribute. - -2004-06-29 Tobias Schlueter - - * io.c: Add 2004 to copyright years. - -2004-06-29 Tobias Schlueter - Andrew Vaught - - * gfortran.h (gfc_gsymbol): New typedef. - (gfc_gsym_root): New variable. - (gfc_get_gsymbol, gfc_find_gsym): New prototypes. - * parse.c (global_used): New function. - (parse_block_data): Check for double empty BLOCK DATA, - use global symbol table. - (parse_module): Use global symbol table. - (add_global_procedure, add_global_program): New functions. - (gfc_parse_file): Use global symbol table. - * symbol.c (gfc_gsym_root): New variable. - (gfc_find_gsym, gsym_compare, gfc_get_gsymbol): New - functions. - -2004-06-29 Tobias Schlueter - - * module.c (mio_gmp_real): Correct writing of negative numbers. - -2004-06-29 Tobias Schlueter - - PR fortran/15963 - * expr.c (check_intrinsic_op): Allow comparison of characters. - Make logic easier. - -2004-06-26 Tobias Schlueter - Andrew Vaught - - * decl.c (contained_procedure): New function. - (match_end): Verify correctness of END STATEMENT in - all cases. - -2004-06-26 Tobias Schlueter - Andrew Vaught - - PR fortran/15190 - * decl.c (gfc_match_type_spec), io.c (match_io), parse.c - (decode_statement): Enforce required space in free-form. - -2004-06-22 Richard Kenner - - * f95-lang.c (LANG_HOOKS_GIMPLE_BEFORE_INLINING): Deleted. - * trans-array.c (gfc_conv_descriptor_data): Add operand - for COMPONENT_REF. - (gfc_conv_descriptor_offset, gfc_conv_descriptor_dtype): Likewise. - (gfc_conv_descriptor_dimension, gfc_conv_descriptor_stride): Likewise. - (gfc_conv_descriptor_lbound, gfc_conv_descriptor_ubound): Likewise. - * trans-common.c (create_common): Likewise. - * trans-expr.c (gfc_conv_component_ref): Likewise. - * trans-io.c (set_parameter_value): Likewise. - (set_parameter_ref, set_string, set_flag, io_result): Likewise. - (transfer_expr): Likewise. - * trans-decl.c (gfc_trans_auto_character_variable): - Set up to get DECL_SIZE and DECL_SIZE_UNIT gimplified. - (gfc_gimplify_function): New function. - (gfc_generate_function-code): Properly handle nested functions. - * trans.c (gfc_build_array_ref): Add two new operands for ARRAY_REF. - -2004-06-22 Janne Blomqvist - - PR fortran/15750 - * io.c (gfc_match_inquire): Bugfix for iolength related stuff. - (gfc_resolve_inquire): Resolve the iolength tag. Return - SUCCESS at end of function if no failure has occured. - * resolve.c (resolve_code): Resolve if iolength is encountered. - * trans-io.c: (ioparm_iolength, iocall_iolength, - iocall_iolength_done): New variables. - (last_dt): Add IOLENGTH. - (gfc_build_io_library_fndecls ): Set iolength related variables. - (gfc_trans_iolength): Implement. - (gfc_trans_dt_end): Treat iolength as a third form of data transfer. - -2004-06-21 Tobias Schlueter - - * resolve.c (resolve_symbol): Add comment in function body. - (check_data_variable): Change type of mark to ar_type, adapt code - accordingly. - -2004-06-21 Tobias Schlueter - - * array.c (gfc_insert_constructor): Avoid redundant call to - mpz_comp. Add 2004 to copyright years. - -2004-06-21 Joseph S. Myers - - * trans.h (stmtblock_t): Change has_scope to unsigned int. - -2004-06-20 Steven G. Kargl - - * arith.c (gfc_range_check): correct complex underflow. - -2004-06-15 Tobias Schlueter - - PR fortran/15962 - * match.c (match_case_selector): Call gfc_match_init_expr - instead of gfc_match_expr. - * resolve.c (validate_case_label_expr): No need to check for - constant, since it wouldn't have been matched with the fix to - match.c. - -2004-06-14 Tobias Schlueter - - PR fortran/15211 - * trans-intrinsic.c (gfc_conv_intrinsic_len): Deal with arrays - of strings. - -2004-06-14 Tobias Schlueter - - PR fortran/15510 - * trans-deecl.c (generate_local_decl): Do not issue warning for - unused variables if they're use associated. - -2004-06-14 Tobias Schlueter - Andrew Vaught - - PR fortran/14928 - * gfortran.h (gfc_check_f): Add new field f3ml. - * check.c (gfc_check_minloc_maxloc): Take argument list instead - of individual arguments, reorder if necessary. - * intrinsic.h (gfc_check_minloc_maxloc): ... adapt prototype. - * intrinsic.c (add_sym_3ml): New function. - (add_functions): Change to add_sym_3ml for MINLOC, MAXLOC. - (check_specific): Catch special case MINLOC, MAXLOC. - -2004-06-14 Paul Brook - - * intrinsic.c (add_sym_2s): Use correct function types. - -2004-06-12 Tobias Schlueter - - * Make-lang.in (F95_OBJS, F95_PARSER_OBJS): Alphabetize. Move data.c - * data.c (gfc_get_section_index): Remove dependency on trans.h. - -2004-06-12 Steven G. Kargl - - * check.c (gfc_check_second_sub, gfc_check_irand, gfc_check_rand - gfc_check_srand, gfc_check_etime, gfc_check_etime_sub): New functions. - * gfortran.h (gfc_generic_isym_id): New symbols GFC_ISYM_ETIME, - GFC_ISYM_IRAND, GFC_ISYM_RAND, GFC_ISYM_SECOND. - * trans-intrinsic.c: Use symbols. - * intrinsic.c (add_sym_2s): New function. - * intrinsic.c: Add etime, dtime, irand, rand, second, srand. - * intrinsic.h: Function prototypes. - * iresolve.c (gfc_resolve_etime_sub, gfc_resolve_second_sub - gfc_resolve_srand): New functions. - -2004-06-12 Tobias Schlueter - - PR fortran/14957 - * decl.c (gfc_match_end): Require END {SUBROUTINE|FUNCTION} for - contained procedure. - -2004-06-12 Tobias Schlueter - - PR fortran/12841 - * interface.c (compare_parameter, compare_actual_formal): Don't - check types and array shapes for NULL() - * trans-expr.c (conv_function_call): No double indirection for - NULL() - -2004-06-09 Toon Moene - - * trans-expr.c (gfc_conv_cst_int_power): Compute - x**(-n) by converting it to (1/x)**n instead of - 1/x**n. - -2004-06-09 Tobias Schlueter - - PR fortran/13372 - * module.c (write_symbol, write_symtree): Don't write symbols - wrongly added to namespace. - * trans-decl.c (gfc_create_module_variable): Don't create a - backend decl for a symbol incorrectly added to namespace. - -2004-06-09 Tobias Schlueter - - PR fortran/13201 - * resolve.c (resolve_symbol): Verify that parameter array has an - explicit shape. Fix typos and coding style issues in surrounding - lines. - -2004-06-05 Tobias Schlueter - - PR fortran/15478 - * gfortran.texi: The documentation doesn't contain infomration on - how to report bugs, and shouldn't, so remove the line which - says it does. - -2004-06-05 Tobias Schlueter - - * intrinsic.c (sort_actual): Keep track of type of missing - arguments. (Missing from previous commit.) - -2004-06-03 Tobias Schlueter - - * gfortran.h (gfc_actual_arglist): New field missing_arg_type. - * interface.c (compare_actual_formal): Keep type of omitted - optional arguments. - * trans-expr.c (gfc_conv_function_call): Add string length - argument for omitted string argument. - -2004-06-03 Paul Brook - - * trans.c (gfc_finish_block, gfc_add_expr_to_block): Build statement - lists instead of compound expr chains. - (gfc_trans_code): Annotate statement lists. - -2004-06-03 Tobias Schlueter - - * trans-array.c: Fix spelling in comments. - -2004-06-02 Tobias Schlueter - - PR fortran/15557 - * data.c (assign_substring_data_value): New function. - (gfc_assign_data_value): Call the new function if we're dealing - with a substring LHS. - -2004-06-01 Tobias Schlueter - - PR fortran/15477 - * gfortran.h (GFC_VERSION): Remove. - * gfortran.texi (version-gfortran): Remove, replace by version-GCC - where used. - -2004-05-31 Tobias Schlueter - - * trans-types.c: Fix spelling & layout in comments. - -2004-05-30 Tobias Schlueter - - PR fortran/14067 - * trans-const.c (gfc_conv_string_init): Allow variable string - length lower than initialization string length. - -2004-05-30 Paul Brook - - PR fortran/15620 - * trans-decl.c (gfc_shadow_sym, gfc_restore_sym): New functions. - * trans-expr.c (gfc_trans_string_copy): New function. - (gfc_conv_statement_function): Use them. Create temp vars. Enforce - character lengths. - (gfc_conv_string_parameter): Use gfc_trans_string_copy. - * trans-stmt.c (gfc_trans_forall_1): Use gfc_{shadow,restore}_sym. - * trans.h (struct gfc_saved_var): Define. - (gfc_shadow_sym, gfc_restore_sym): Add prototypes. - -2004-05-30 Steven G. Kargl - - * iresolve.c (gfc_resolve_random_number): Clean up conditional. - -2004-05-29 Steven G. Kargl - - * simplify.c (gfc_simplify_log): Remove useless line of code. - -2004-05-29 Paul Brook - - * trans-common.c (find_equivalence): Find multiple rules. - -2004-05-27 Tobias Schlueter - - * gfortran.h (gfc_current_locus, gfc_set_locus): Remove. - (gfc_current_locus): Declare new global variable. - * scanner.c (gfc_current_locus, gfc_set_locus): Remove. - (gfc_current_locus1): Rename ... - (gfc_current_locus): ... to this. - (gfc_at_eof, gfc_at_bol, gfc_at_eol, gfc_advance_line, next_char, - skip_fixed_comments, skip_free_comments, gfc_next_char_literal, - gfc_peek_char, gfc_gobble_whitespace, gfc_new_file): Use - gfc_current_locus instead of gfc_current_locus1, gfc_set_locus() - and gfc_current_locus(), respectively. - * array.c (match_subscript, gfc_match_array_ref, match_array_list, - match_array_cons_element, gfc_match_array_constructor): - Read/modify gfc_current_locus instead of calling gfc_set_locus() - and gfc_current_locus(). - * decl.c (gfc_match_null, variable_decl, gfc_match_kind_spec, - match_attr_spec, gfc_match_function_decl, gfc_match_end, - attr_decl1, gfc_match_save): Likewise. - * error.c (error_print, gfc_internal_error): Likewise. - * expr.c (gfc_int_expr, gfc_default_logical_kind): Likewise. - * interface.c (gfc_add_interface): Likewise. - * io.c (gfc_match_format, match_dt_format, match_dt_element, - match_io_iterator, match_io): Likewise. - * match.c (gfc_match_space, gfc_match_eos, - gfc_match_small_literal_int, gfc_match_st_label, - gfc_match_strings, gfc_match_name, gfc_match_iterator, - gfc_match_char, gfc_match, gfc_match_assignment, - gfc_match_pointer_assignment, gfc_match_if, gfc_match_do, - gfc_match_nullify, gfc_match_call, match_implicit_range, - gfc_match_implicit, gfc_match_data, match_case_selector, - gfc_match_case, match_forall_iterator): Likewise. - * matchexp.c (gfc_match_defined_op_name, next_operator, - match_level_1, match_mult_operand, match_ext_mult_operand, - match_add_operand, match_ext_add_operand, match_level_2, - match_level_3, match_level_4, match_and_operand, match_or_operand, - match_equiv_operand, match_level_5, gfc_match_expr): Likewise. - * module.c (gfc_match_use, mio_array_ref, mio_expr): Likewise. - * parse.c (match_word, decode_statement, next_free, next_fixed, - add_statement, verify_st_order, parse_if_block, gfc_parse_file): - Likewise. - * primary.c (match_digits, match_integer_constant, - match_boz_constant, match_real_constant, match_substring, - next_string_char, match_charkind_name, match_string_constant, - match_logical_constant, match_const_complex_part, - match_complex_constant, match_actual_arg, match_keyword_arg, - gfc_match_actual_arglist, gfc_match_structure_constructor, - gfc_match_rvalue, gfc_match_variable): Likewise. - * st.c (gfc_get_code): Likewise. - * symbol.c (check_conflict, check_used, check_done, - duplicate_attr, add_flavor, gfc_add_procedure, gfc_add_intent, - gfc_add_access, gfc_add_explicit_interface, gfc_add_type, - gfc_add_component, gfc_reference_st_label, gfc_new_symbol): Likewise. - -2004-05-26 Roger Sayle - - * io.c (format_asterisk): Silence compiler warnings by correcting - the number of elements of a "locus" initializer. - -2004-05-25 Roger Sayle - - PR fortran/13912 - * matchexp.c: Allow unary operators after arithmetic operators - as a GNU extension. - (match_ext_mult_operand, match_ext_add_operand): New functions. - (match_mult_operand): Tweak to call match_ext_mult_operand. - (match_add_operand): Tweak to call match_ext_mult_operand. - (match_level_2): Rearrange to call match_ext_add_operand. - -2004-05-25 Paul Brook - - * expr.c (check_inquiry): Remove bogus tests. - -2004-05-23 Paul Brook - - PR fortran/13773 - * expr.c (restricted_args): Remove redundant checks/argument. - (external_spec_function): Update to match. - (restricted_intrinsic): Rewrite. - -2004-05-23 Paul Brook - Victor Leikehman - - * gfortran.h (struct gfc_symbol): Add equiv_built. - * trans-common.c: Change int to HOST_WIDE_INT. Capitalize error - messages. - (current_length): Remove. - (add_segments): New function. - (build_equiv_decl): Create initialized common blocks. - (build_common_decl): Always add decl to bindings. - (create_common): Create initializers. - (find_segment_info): Reformat to match coding conventions. - (new_condition): Use add_segments. - (add_condition, find_equivalence, add_equivalences): Move iteration - inside functions. Only process each segment once. - (new_segment, finish_equivalences, translate_common): Simplify. - -2004-05-23 Steven G. Kargl - - * check.c (gfc_check_random_seed): Issue for too many arguments. - -2004-05-22 Steven G. Kargl - - * intrinsic.c (add_subroutines): Use add_sym_3s for random_seed. - -2004-05-22 Paul Brook - - * dump-parse-tree.c (gfc_show_equiv): New function. - (gfc_show_namespace): Use it. - -2004-05-22 Victor Leikehman - - PR fortran/13249 - * symbol.c (gfc_add_common): Disable checks to work around other more - fundamental inadequacies. - -2004-05-22 Tobias Schlüter - - * trans-decl.c (gfc_get_extern_function_decl): Set DECL_IS_PURE - only for functions. - (gfc_build_function_decl): Likewise. - -2004-05-22 Steven G. Kargl - - * check.c (gfc_check_system_clock): New function. - * intrinsic.c (add_sym_3s): New function. - (add_subroutines): Use it. - * intrinsic.h (gfc_check_system_clock, gfc_resolve_system_clock): - Add prototypes. - * iresolve.c (gfc_resolve_system_clock): New function. - -2004-05-22 Steven G. Kargl - - * invoke.texi: Document -Wunderflow and spell check. - * lang.opt: Add Wunderflow. - * gfortran.h (gfc_option_t): Add warn_underflow option. - * options.c (gfc_init_options, set_Wall): Use it. - * primary.c (match_real_constant): Explicitly handle UNDERFLOW. - * arith.c (gfc_arith_uminus, gfc_arith_plus, gfc_arith_minus, - gfc_arith_times, gfc_arith_divide, gfc_arith_power, gfc_real2real, - gfc_real2complex, gfc_complex2real, gfc_complex2complex): Ditto. - * arith.c (common_logarithm): Fix typo in comment. - -2004-05-21 Roger Sayle - - * io.c (check_format): As a GNU extension, allow the comma after a - string literal to be optional in a format. Use gfc_notify_std to - issue an error/warning as appropriate. - -2004-05-21 Roger Sayle - - * io.c (check_format): Use gfc_notify_std to determine whether to - issue an error/warning for omitting the digits from the X format. - -2004-05-20 Roger Sayle - - * io.c (check_format): Allow the number before the X format to - be optional when not -pedantic. - -2004-05-18 Feng Wang - Paul Brook - - * f95-lang.c (gfc_init_builtin_functions): Use vold_list_node. - Create decls for __builtin_pow{,f}. - * gfortran.h (PREFIX_LEN): Define. - * trans-decl.c (gfor_fndecl_math_powi): Add. - (gfor_fndecl_math_powf, gfor_fndecl_math_pow): Remove. - (gfc_build_intrinsic_function_decls): Create decls for powi. - * trans-expr.c (powi_table): Add. - (gfc_conv_integer_power): Remove. - (gfc_conv_powi): New function. - (gfc_conv_cst_int_power): New function. - (gfc_conv_power_op): Use new powi routines. - * trans.h (struct gfc_powdecl_list): Add. - (gfor_fndecl_math_powi): Add. - (gfor_fndecl_math_powf, gfor_fndecl_math_pow): Remove. - -2004-05-18 Tobias Schlueter - - * trans.c, trans-decl.c: Fix comment typos. - -2004-05-18 Tobias Schlueter - - * trans-const.c (gfc_conv_mpf_to_tree): Fix typo. - -2004-05-18 Steve Kargl - - * arith.c (gfc_int2complex): Fix incorrect range checking. - -2004-05-18 Paul Brook - - PR fortran/13930 - * decl.c (add_init_expr_to_sym): Remove incorrect check. - (default_initializer): Move to expr.c. - (variable_decl): Don't assign default initializer to variables. - * expr.c (gfc_default_initializer): Move to here. - * gfortran.h (gfc_default_initializer): Add prototype. - * resolve.c (resolve_symbol): Check for illegal initializers. - Assign default initializer. - -2004-05-17 Steve Kargl - - * arith.c (gfc_arith_power): Complex number raised to 0 power is 1. - -2004-05-17 Steve Kargl - - * arith.c (gfc_real2complex): Range checking wrong part of complex - number. - -2004-05-16 Paul Brook - - * options.c (gfc_handle_module_path_options): Fix buffer overrun. - -2004-05-16 Paul Brook - - * arith.c (gfc_range_check): Fix logic error. - -2004-05-16 Steve Kargl - - * arith.c: Fix comment typos. - -2004-05-15 Tobias Schlueter - - PR fortran/13742 - * decl.c (add_init_expr_to_sym): Verify that COMMON variable is - not initialized in a disallowed fashion. - * match.c (gfc_match_common): Likewise. - (var_element): Verify that variable is not in the blank COMMON, - if it is in a common. - -2004-05-15 Joseph S. Myers - - * Make-lang.in (f95.generated-manpages): Remove. - (f95.srcextra): New. - (f95.info, fortran/gfortran.info, fortran/gfortran.dvi, - f95.maintainer-clean): Generate info and dvi files in objdir/doc. - (f95.dvi): Remove. - (dvi): New. - (f95.install-info): Remove. - (install-info): New. - -2004-05-15 Victor Leikehman - - * decl.c (add_init_expr_to_sym): Check for variable size arrays. - -2004-05-15 Tobias Schlueter - - * primary.c (match_boz_constant): Use gfc_notify_std() for - issuing a warning or an error. - -2004-05-15 Tobias Schlueter - - PR fortran/13826 - * primary.c (match_structure_constructor): Rename ... - (gfc_match_structure_constructor): ... to this. Make non-static. - (gfc_match_rvalue): Call renamed function. - * match.h (gfc_match_structure_constructor): Declare. - * match.c (gfc_match_data_constant): Handle structure - constructor. - -2004-05-15 Tobias Schlueter - - PR fortran/13702 - (Port from g95) - * gfortran.h (gfc_linebuf): New typedef. - (linebuf): Remove. - (gfc_file): Revamped, use new gfc_linebuf. - (locus): Revamped, use new types. - (gfc_current_file): Remove. - (gfc_current_form, gfc_source_file): New global variables. - * match.c (gfc_match_space, gfc_match_strings): Use - gfc_current_form to find source form. - * module.c (gfc_dump_module): Use gfc_source_file when printing - module header. - * error.c (show_locus, show_loci) Use new data structures to print - locus. - * scanner.c (first_file, first_duplicated_file, gfc_current_file): - Remove. - (file_head, current_file, gfc_current_form, line_head, line_tail, - gfc_current_locus1, gfc_source_file): New global variables. - (gfc_scanner_init1): Set new global variables. - (gfc_scanner_done1): Free new data structures. - (gfc_current_locus): Return pointer to gfc_current_locus1. - (gfc_set_locus): Set gfc_current_locus1. - (gfc_at_eof): Set new variables. - (gfc_at_bol, gfc_at_eol, gfc_advance_line, gfc_next_char): Adapt - to new locus structure. - (gfc_check_include): Remove. - (skip_free_comments, skip_fixed_comments): Use gfc_current_locus1. - (gfc_skip_comments): Use gfc_current_form, find locus with - gfc_current_locus1. - (gfc_next_char): Use gfc_current_form. - (gfc_peek_char, gfc_gobble_whitespace): Use gfc_current_locus1. - (load_line): Use gfc_current_form. Recognize ^Z as EOF. Fix - comment formatting. - (get_file): New function. - (preprocessor_line, include_line): New functions. - (load_file): Move down, rewrite to match new data structures. - (gfc_new_file): Rewrite to match new data structures. - * parse.c (next_statement): Remove code which is now useless. Use - gfc_source_form and gfc_source_file where appropriate. - * trans-decl.c (gfc_get_label_decl): adapt to new data structures - when determining locus of frontend code. - * trans-io.c (set_error_locus): Same. - * trans.c (gfc_get_backend_locus, gfc_set_backend_locus): Likewise. - * lang-specs.h (@f77-cpp-input, @f95-cpp-input): Remove '-P' from - preprocessor flags. - (all): Add missing initializers. - -2004-05-15 Tobias Schlueter - - * Make-lang.in (trans-common.o): Remove redundant dependency. - (data.c): Replace object file name ... - (data.o): ... by the correct one. - -2004-05-14 Tobias Schlueter - - * dump-parse-tree.c (gfc_show_array_ref): Print colon only - for ranges when dumping array references. - -2004-05-14 Victor Leikehman - - * decl.c (variable_decl): Always apply default initializer. - -2004-05-08 Tobias Schlüter - - PR fortran/15206 - * trans-intrinsic.c (gfc_conv_intrinsic_rrspacing): Fixed to - handle zero correctly. - -2004-05-14 Tobias Schlueter - - * match.c (gfc_match): Eliminate dead code. - -2004-05-14 Tobias Schlueter - - * parse.c (gfc_statement_next_fixed): (Change from Andy's tree) - Detect bad continuation line in fixed form sources. - -2004-05-14 Tobias Schlueter - - PR fortran/15205 - * iresolve.c (gfc_resolve_nearest): Add new function. - * intrinsic.h: ... declare it here. - * intrinsic.c (add_functions): ... add it as resolving function - for NEAREST. - -2004-05-14 Tobias Schlueter - - PR fortran/14066 - * match.c (gfc_match_do): Allow infinite loops with - label-do-stmt. Do not enforce space after comma. - -2004-05-14 Tobias Schlueter - - PR fortran/15051 - * parse.c (parse_interface): Allow empty INTERFACE, remove - seen_body. - -2004-05-14 Tobias Schlueter - - * Make-lang.in, arith.c, arith.h, array.c, bbt.c, check.c, - decl.c, dependency.c, dependency.h, dump-parse-tree.c, error.c, - expr.c, f95-lang.c, gfortran.h, interface.c, intrinsic.c, - intrinsic.h, io.c, iresolve.c, lang-specs.h, match.c, match.h, - matchexp.c, misc.c, module.c, options.c, parse.c, parse.h, - primary.c, resolve.c, scanner.c, simplify.c, st.c, symbol.c, - trans-array.c, trans-array.h, trans-common.c, trans-const.c, - trans-const.h, trans-decl.c, trans-expr.c, trans-intrinsic.c, - trans-io.c, trans-stmt.c, trans-stmt.h, trans-types.c, - trans-types.h, trans.c, trans.h: Update copyright years and - boilerplate. - * data.c: Likewise, also removed two whitespace-only lines. - * gfortranspec.c, lang.opt: Update copyright years. - -2004-05-14 Tobias Schlueter - - PR fortran/14568 - * trans-decl.c (generate_local_decl): Don't warn for unused - variables which are in common blocks. - -2004-05-13 Diego Novillo - - * Make-lang.in, f95-lang.c, trans-array.c, trans-decl.c, - trans-expr.c, trans-intrinsic.c, trans-io.c, trans-stmt.c, - trans.c: Rename tree-simple.[ch] to tree-gimple.[ch]. - -2004-05-13 Victor Leikehman - - PR fortran/15314 - * trans-expr.c (gfc_conv_structure): Use field type, not expr type. - -2004-05-13 Joseph S. Myers - - * gfortran.texi: Use @table @emph instead of @itemize @emph. - Remove "set DEVELOPMENT". - (Compiling GFORTRAN): Remove. - -2004-05-09 Tobias Schlüter - - * array.c (match_subscript, match_array_ref): Add comments - explaining argument 'init'. - * decl.c, f95-lang.c, match.c, resolve.c, trans-array.c, - trans-expr.c, trans.c: Fix some typos in comments. - * dump-parse-tree.c (gfc_show_expr): Remove wrong comment. - * primary.c (match_digits, match_integer_constant): Add comment - explaining signflag. - -2004-05-01 Tobias Schlüter - - PR fortran/13940 - * primary.c: Include system.h and flags.h, needed for pedantic. - (match_boz_constant): Allow "x" for hexadecimal constants, warn if - pedantic is set. - -2004-05-01 Tobias Schlüter - - PR fortran/13940 - * match.c (match_data_constant): Handle case where - gfc_find_symbol sets sym to NULL - -2004-04-28 Tobias Schlüter - - * Make-lang.in (f95-lang.o, trans-intrinsic.o): Add missing - dependency on mathbuiltins.def - -2004-04-24 Victor Leikehman - - * trans-io.c (transfer_expr): Implemented recursive printing - of derived types. - -2004-04-24 Andrew Pinski - - * gfortranspec.c: Do not include multilib.h. - -2004-04-24 Tobias Schlüter - - * trans-intrinsic.c: Fix comment, this is not trans-expr.c. Add - 2004 to copyright years. - * trans-expr.c, trans-decl.c: Comment update, we now generate - GENERIC, not SIMPLE. Add 2004 to copyright years. - -2004-04-24 Paul Brook - - * Make-lang.in (gfortranspec.o): Add dependency on $(TM_H). - -2004-04-24 Feng Wang - - PR 14817 - * arith.c (gfc_arith_divide): Fix complex divide. - -2004-04-23 Andrew Pinski - - * gfortranspec.c: Include the target headers. - -2004-04-18 Feng Wang - - PR fortran/14921 - PR fortran/14540 - * arith.c (arctangent2): New function. - * arith.h (arctangent2): Add function prototype. - * simplify.c (gfc_simplify_atan2): Use it. - (gfc_simplify_log): Use it. - -2004-04-12 Diego Novillo - - * fortran/f95-lang.c (gfc_expand_stmt): Remove. - (LANG_HOOKS_RTL_EXPAND_STMT): Remove. - -2004-04-11 Bud Davis - - PR fortran/14872 - * trans-io.c (build_dt): Change REC to value. - -2004-04-11 Feng Wang - - PR 14394 - * trans-const.c (gfc_conv_mpf_to_tree): Loosen the maximum digits of - the real value when converting mpf to string. - -2004-04-11 Feng Wang - - PR 14395 - * trans-intrinsic.c (gfc_conv_intrinsic_cmplx): Fix the imag part of - the result. - -2004-04-11 Feng Wang - - PR fortran/14377 - * simplify.c (simplify_min_max): Convert the type of the result. - -2004-04-11 Paul Brook - - * gfortran.texi: Use full target triplet. - -2004-04-11 Paul Brook - - * Make-lang.in (GFORTRAN_TEXI): Set it. - (fortran/dfortran.dvi): Use it. Add fortran to include paths. - (fortran/gfortran.info): Ditto. - * gfortran.texi: Major update. - * invoke.texi: New file. - -2004-04-10 Paul Brook - - * trans-array.c (gfc_trans_allocate_temp_array, - gfc_conv_tmp_array_ref): Don't use GFC_DECL_STRING. - * trans-decl.c (gfc_build_dummy_array_decl, - gfc_get_symbol_decl, gfc_build_function_decl, - gfc_create_module_variable): Ditto. - * trans-expr.c (gfc_conv_variable): Ditto. - * trans-intrinsic.c (gfc_conv_intrinsic_len): Ditto. - * trans.h (GFC_DECL_STRING): Remove. - (GFC_DECL_PACKED_ARRAY, GFC_DECL_PARTIAL_PACKED_ARRAY, - GFC_DECL_ASSIGN): Renumber flags. - -2004-04-05 Paul Brook - - PR 13252 - PR 14081 - * f95-lang.c (gfc_init_builtin_functions): Add stack_alloc, stack_save - and stack_restore. - * gfortran.h (struct gfc_charlen): Add backend_decl. - * trans-array.c (gfc_trans_allocate_temp_array, - gfc_conv_temp_array_ref, gfc_conv_resolve_dependencies, - (gfc_conv_loop_setup, gfc_array_allocate, gfc_conv_array_init_size): - Remove old, broken string handling. - (gfc_trans_auto_array_allocation, gfc_trans_g77_array, - gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor, - gfc_trans_deferred_array): Handle character arrays. - * trans-const.c (gfc_conv_const_charlen): New function. - * trans-const.h (gfc_conv_const_charlen): Add prototype. - * trans-decl.c (gfc_finish_var_decl): Don't mark automatic variables - as static. - (gfc_build_dummy_array_decl): Handle arrays with unknown element size. - (gfc_create_string_length): New function. - (gfc_get_symbol_decl): Create lengths for character variables. - (gfc_get_fake_result_decl): Ditto. - (gfc_build_function_decl): Only set length for assumed length - character arguments. - (gfc_trans_dummy_character): New function. - (gfc_trans_auto_character_variable): Rewrite. - (gfc_trans_deferred_vars): Handle more types of character variable. - (gfc_create_module_variable): String lengths have moved. - (gfc_generate_function_code): Initialize deferred var chain earlier. - * trans-expr.c (gfc_conv_init_string_length): Rename ... - (gfc_trans_init_string_length): ... to this. - (gfc_conv_component_ref, gfc_conv_variable, gfc_conv_concat_op, - gfc_conv_function_call): Update to new format for character variables. - (gfc_conv_string_length): Remove. - (gfc_conv_string_parameter): Update assertion. - * trans-intrinsic.c (gfc_conv_intrinsic_len): Use new location. - * trans-io.c (set_string): Use new macro names. - * trans-stmt.c (gfc_trans_label_assign. gfc_trans_goto): Ditto. - * trans-types.c (gfc_get_character_type): Use existing length expr. - (gfc_is_nodesc_array): Make public. - (gfc_get_dtype_cst): Rename ... - (gfc_get_dtype): ... to this. Handle unknown size arrays. - (gfc_get_nodesc_array_type): Use new name. - (gfc_sym_type): New character variable code. - (gfc_get_derived_type): Ditto. - (gfc_get_function_type): Evaluate character variable lengths. - * trans-types.h (gfc_strlen_kind): Define. - (gfc_is_nodesc_array): Add prototype. - * trans.h: Update prototypes. - (struct lang_type): Update comments. - (GFC_DECL_STRING_LEN): New name for GFC_DECL_STRING_LENGTH. - (GFC_KNOWN_SIZE_STRING_TYPE): Remove. - -2004-04-04 Paul Brook - - * gfortran.h (struct gfc_option_t): Remove flag_g77_calls. - * options.c (gfc_init.options, gfc_handle_option): Ditto. - * trans-expr.c (gfc_conv_function_call): Ditto. - * trans-types.c (gfc_is_nodesc_array): Ditto - * lang.opt (fg77-calls): Remove. - -2004-04-04 Paul Brook - - * trans-array.c (OFFSET_FIELD): Rename from BASE_FIELD. - (gfc_conv_descriptor_base): Rename ... - (gfc_conv_descriptor_offset): ... to this. - (gfc_trans_allocate_array_storage): Set offset to zero. - (gfc_conv_array_base): Rename ... - (gfc_conv_array_offset): ... to this. - (gfc_conv_array_index_ref): Add offset parameter. - (gfc_conv_array_ref): Include offset. - (gfc_trans_preloop_setup): Use existing offset. - (gfc_trans_allocate_temp_array, gfc_array_allocate, - gfc_trans_auto_array_allocation, gfc_trans_g77_array, - gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor, - gfc_conf_ss_descriptor): Set offset. - * trans-array.h: Rename prototypes. - * trans-const.h (gfc_index_zero_node): Define. - * trans-decl.c (gfc_build_qualified_array): Change base to offset. - * trans-types.c (gfc_get_array_type_bounds): Ditto. - (gfc_get_nodesc_array_type): Calculate offset before upper bound. - -2004-03-25 Diego Novillo - - * convert.c (convert): Don't handle WITH_RECORD_EXPR. - -2004-03-24 Bud Davis - - PR 14055 - * arith.c (gfc_convert_integer,gfc_convert_real): Removed leading '+' - before conversion by gmp library call. - -2004-03-24 Bud Davis - - PR 12921 - * trans-io.c (gfc_trans_open): Change RECL= to a value parameter. - -2004-02-24 Richard Henderson - - * trans-array.c (gfc_trans_dummy_array_bias): Fix typo. - -2004-02-19 Loren J. Rittle - - * Make-lang.in ($(srcdir)/fortran/gfortran.info): Move... - (fortran/gfortran.info): ... to here. - (f95.srcinfo): New. - -2004-02-16 Richard Henderson - - * Make-lang.in (f95-lang.o, trans-decl.o): Depend on cgraph.h. - * f95-lang.c (LANG_HOOKS_EXPAND_DECL): Remove. - (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): New. - (gfc_expand_function): Rename from expand_function_body, make static, - don't do anything except invoke tree_rest_of_compilation. - (gfc_be_parse_file): Invoke cgraph. - (gfc_expand_decl): Remove. - (gfc_init_builtin_functions): Add __builtin_init_trampoline and - __builtin_adjust_trampoline. - * trans-decl.c (gfc_get_extern_function_decl): Don't set DECL_CONTEXT. - (gfc_finalize): New. - (gfc_generate_function_code): Use it. Lower nested functions. - * trans-expr.c (gfc_conv_function_call): Add static chain operand - to call_expr. - * trans.c (gfc_build_function_call): Likewise. - * trans.h (expand_function_body): Remove. - -2004-02-15 Victor Leikehman - - PR gfortran/13433 - * trans-decl.c (gfc_build_function_decl) For functions - returning CHARACTER pass an extra length argument, - following g77 calling conventions. - * trans-types.c (gfc_get_function_type) Ditto. - * trans-expr.c (gfc_conv_function_call) Ditto. - -2004-02-14 Paul Brook - - * f95-lang.c (gfc_init_builtin_functions): Build chain properly. - -2004-02-12 Paul Brook - - * BUGS: Remove. - -2004-02-08 Steve Kargl - - * gfortran.texi: Fix typos. - -2004-02-07 Bud Davis - - PR gfortran/13909 - * intrinsic.c (add_conversions) Use logical conversion instead - of real. - * trans-types.c (gfc_get_logical_type) implemented logical*1 - and logical*2. - -2004-01-17 Paul Brook - - * lang-specs.h: Remove % - - * lang-specs.h: Enable preprocessing of source files - ending in .F, .fpp, .FPP, .F90 and .F95. - -2004-01-13 Toon Moene - - PR fortran/12912 - * lang-specs.h: Enable compilation of files ending - in .f, .for and .FOR. - -2004-01-11 Paul Brook - - * trans-stmt.c (gfc_trans_if_1): New function. - (gfc_trans_if): Use it. - -2004-01-11 Erik Schnetter - - * gfortran.h (GFC_MAX_SYMBOL_LEN): Increase. - (gfc_option_t): Add max_identifier_length. - * lang.opt: Add fmax-identifier-length. - * match.c (parse_name): Use limit. - * options.c (gfc_init_options): Set max_identifier_length. - (gfc_handle_option): Ditto. - -2004-01-11 Feng Wang - - * intrinsic.c (add_functions): Add resolve function to dcmplx. - * intrinsic.h (gfc_resolve_dcmplx): Add prototype. - * iresolve.c (gfc_resolve_dcmplx): New function. - -2004-01-10 Paul Brook - - * trans-decl.c (gfc_get_symbol_decl): Don't set subroutine attr. - * trans-types.c (gfc_sym_type): Handle external dummy procedures. - (gfc_return_by_reference): Correct condition. - (gfc_get_function_type): Ditto. - -2004-01-10 Paul Brook - - * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Convert mismatched - types. - -2004-01-10 Huang Chun - - * iresolve.c: Use correct kind. - -2004-01-10 Huang Chun - - PR fortran/13467 - * trans-decl.c (gfc_create_module_variable): Output array valued - parameters. - -2004-01-10 Paul Brook - - * resolve.c (resolve_branch): Get error message right way round. - -2004-01-10 Canqun Yang - - * trans-array (gfc_conv_loop_setup): Adjust comment to track - reality. - (gfc_array_allocate): Don't count size of element twice. - -2004-01-04 Paul Brook - - * lang.opt (i8, r8, std=*): Remove RejectNegative. - -2004-01-04 Paul Brook - - * error.c (gfc_notify_std): New function. - * gfortran.h (gfc_notify_std): Declare. - (GFC_STD_*): Define. - (gfc_option_t): Add warn_std and allow_std. - * intrinsic.c (gfc_init_expr_extensions): Fix logic. - (gfc_intrinsic_func_interface): Use gfc_notify_std. - * check.c (check_rest): Use gfc_notify_std. - * match.c (gfc_match_pause): Ditto. - (gfc_match_assign): Ditto. - (gfc_match_goto): Ditto. - * resolve.c (resolve_branch): Ditto. - * lang.opt: Add std= and w. - * options.c (gfc_init_options): Set allow_std and warn_std. - (gfc_handle_option): Handle OPT_std_* and OPT_w. - -2004-01-01 Paul Brook - - * array.c (gfc_append_constructor): Take constructor, not expression. - * data.c (struct gfc_expr_stack): Remove. - (expr_stack): Remove. - (find_con_by_offset): Rename from find_expr_in_con. - (find_con_by_component): Rename from find_component_in_con. - (gfc_get_expr_stack): Remove. - (gfc_assign_data_value): Rewrite. - (gfc_expr_push): Remove. - (gfc_expr_pop): Remove. - (gfc_advance_section): Rename from - gfc_modify_index_and_calculate_offset. Handle unbounded sections. - (gfc_get_section_index): Handle unbounded sections. - * gfortran.h: Update prototypes. - * resolve.c (check_data_variable): Array section maight not be the - last ref. - -2004-01-01 Paul Brook - - PR fortran/13432 - * resolve.c (resolve_symbol): Allow assumed length function results. - -2004-01-01 Steve Kargl - - * match.c (gfc_match_pause): Fix spelling. - -2004-01-01 Steven Bosscher - - PR fortran/13251 - * trans-expr.c (gfc_conv_variable): Take the type kind of a substring - reference from the expression. - -2003-12-26 Feng Wang - - * dump-parse-tree.c (gfc_show_code_node): Add ASSIGN and ASSIGNED GOTO - dumping. - * gfortran.h (gfc_statement): New ST_LABEL_ASSIGNMENT. - (gfc_exec_op): New EXEC_LABEL_ASSIGN. - (symbol_attribute):New variable attribute: assign. - * io.c (resolve_tag):Integer variable is allowed. - (match_dt_format): Add ASSIGN statement. Set assign flag. - * match.c (gfc_match_if): Change ST_NONE to ST_LABEL_ASSIGNMENT. - (gfc_match_assign): Add ASSIGN statement. Set assign flag. - (gfc_match_goto): Add ASSIGNED GOTO statement. Set assign flag. - * parse.c (decode_statement): Add ST_LABEL_ASSIGNMENT. - (next_statement): Add ST_LABEL_ASSIGNMENT. - (gfc_ascii_statement): Add ST_LABEL_ASSIGNMENT. - * resolve.c (resolve_code): Resolve ASSIGN and ASSIGNED GOTO statement. - (resolve_blocks): Resolve ASSIGNED GOTO statement label list. - * st.c (gfc_free_statement): Add EXEC_LABEL_ASSIGN. - * trans-decl.c (gfc_get_symbol_decl): Create the shadow variable for - assign. Put them into the stuct lang_decl. - * trans-io.c (set_string): Add the assign statement. - * trans-stmt.c (gfc_trans_label_assign): New function. - (gfc_trans_goto): Translate ASSIGNED GOTO statement. - * trans-stmt.h (gfc_trans_label_assign): Added function prototype. - * trans.c (gfc_trans_code): Add EXEC_LABEL_ASSIGN. - * trans.h (lang_decl):Add shadow variable decl tree needed by assign. - (GFC_DECL_ASSIGN_ADDR(node)): New macro to access this. - (GFC_DECL_ASSIGN(node)): New macro to access flag. - -2003-12-31 Huang Chun - - PR fortran/13434 - * trans-intrinsic.c (gfc_conv_intrinsic_minmaxval): Fixed bug in - minval/maxval. - -2003-12-22 Toon Moene - - * options.c (gfc_init_options): Set flag_argument_noalias to 2, to indicate - that arguments to subroutines/functions can't alias themselves, nor global - memory. - -2003-12-20 Steven Bosscher - - * trans-expr.c (gfc_conv_expr_op): Fold the result expression. - * trans.c (gfc_add_modify_expr, gfc_add_expr_to_block): Likewise. - -2003-12-12 Huang Chun - - * primary.c (match_substring): Fix substring bug for start point - or end point is NULL. - * trans-expr.c (gfc_conv_substring): Ditto - * trans-types.c (gfc_sym_type): Get correct type of scalar - character variables. - * trans-intrinsic.c (gfc_conv_intrinsic_len): Handle character in - derived type. - -2003-12-10 Richard Henderson - - * options.c (gfc_post_options): Don't ever use rtl inlining. - -2003-12-05 Canqun Yang - - * trans-common.c: Re-implement COMMON blocks and EQUIVALENCE lists. - * trans-equivalence.c: Remove. - * trans-decl.c (gfc_get_symbol_decl): Update to match. - (gfc_generate_function_code): Ditto. - * trans-array.c (gfc_conv_array_parameter): Ditto. - * Make-lang.in (F95_OBJS): Remove fortran/trans-equivalence.o - (F95_ADDITIONAL_OBJS): Add stor-layout.o - * trans.h (gfc_trans_equivalence): Remove. - * gfortran.h (struct gfc_equiv): Add used field. - (struct gfc_symbol): Remove addr_base, addr_offset, equiv_ring, - equiv_offset fields. - -2003-12-05 Richard Henderson - - * trans.c (gfc_build_addr_expr): New. - (gfc_build_indirect_ref, gfc_build_array_ref): New. - * trans.h: Declare them. - * trans-array.c, trans-expr.c, trans-intrinsic.c, trans-io.c, - trans-stmt.c, trans.c (*): Use them. - - * f95-lang.c (gfc_post_options): Remove dead prototype. - * trans-array.c (gfc_trans_deferred_vars): Remove unused variable. - * trans-stmt.c (gfc_evaluate_where_mask): Fix temporary_list - allocation size. - -2003-12-01 Feng Wang - - * io.c (gfc_match_format): Check for missing format label. - -2003-11-30 Huang Chun - - PR fortran/13155 - * trans-decl.c (gfc_sym_mangled_function_id): Don't mangle symbols - from interfaces in modules. - -2003-11-30 Paul Brook - - * trans-array.c (gfc_trans_g77_array): Make non-static. - (gfc_trans_assumed_size): Remove. - (gfc_trans_dummy_array_bias): Explicitly free temporary. - * trans-array.h (gfc_trans_g77_array): Add prototype. - (gfc_trans_assumed_size): Remove. - * trans-decls.c (gfor_fndecl_push_context): Remove. - (gfor_fndecl_pop_context): Remove. - (gfc_build_function)decls): Don't create them. - (gfc_trans_deferred_vars): Update to match. Remove dead code. - * trans-stmt.c (gfc_trans_pointer_assign_need_temp): Free temp. - -2003-11-30 Kejia Zhao - - * trans-array.c (gfc_conv_array_parameter): Simplify - array argument passing for array name actual argument. - * trans-expr.c (gfc_conv_function_call): Ditto - * trans-types.c (gfc_is_nodesc_array):Ditto. - -2003-11-30 Paul Brook - - * f95-lang.c (gfc_post_options): Move ... - * options.c (gfc_post_options): .. to here. Handle inlining options. - * gfortran.h (gfc_post_options): Add prototype. - -2003-11-28 Richard Henderson - - * trans.c (gfc_create_var_np): Use create_tmp_var_raw. - -2003-11-28 Huang Chun - - * trans.h (has_alternate_specifier): New global variable. - * match.c (gfc_match_call): Handle actual arguments associated with - alternate return indicators. - * trans-expr.c (gfc_conv_function_call): Ditto - * trans-stmt.c (gfc_trans_call): Ditto - (gfc_trans_return): Handle return statement with value. - * trans-decl.c (gfc_generate_function_code): Handle functions with - asterisk dummy. - (gfc_get_fake_result_decl): Ditto - * trans-types.c (gfc_get_function_type): Ditto - * resolve.c (resolve_actual_arglist): Check alternate return indicators. - (resolve_formal_arglist): Check asterisk dummy. - -2003-11-27 Paul Brook - - * trans-array.c (gfc_tran_allocate_array_storage): Use new memory - allocation interface. - (gfc_conv_ array_parameter): Ditto. - (gfc_trans_auto_array_allocation): Ditto. Also free the memory. - * trans-array.c: Update prototype. - * trans-decl.c (gfc_build_builtin_function_decls): Update prototypes. - (gfc_trans_auto_character_variable): Use new memory alloc interface. - * trans-expr.c (gfc_conv_string_tmp): Ditto. - (gfc_conv_function_call): Use gfc_conv_string_tmp. - * trans-stmt.c (gfc_do_allocate): Use new memory alloc interface. - * trans-intrinsic.c (gfc_conv_intrinsic_trim): Ditto. - * trans.h (gfc_ss_info): Remove unused pdata field. - * trans.c (gfc_create_var_np): Change T to V. - -2003-11-26 Richard Henderson - - * mathbuiltins.def: Move acos, asin, cosh, log10, sinh, tanh from ... - * trans-intrinsic.c (gfc_intrinsic_map): ... here. Add SCALE, - FRACTION, NEAREST, SET_EXPONENT. - (gfc_intrinsic_map_t): Add libm_name, complex_available, is_constant. - Fix GTY marking. Remove unnecessary const's. - (LIBM_FUNCTION): Rename from I_LIB. - (LIBF_FUNCTION): New. - (gfc_get_intrinsic_lib_fndecl): Handle libm and libgfortran naming - conventions. Assume the expr signature is correct. Mark const. - (gfc_conv_intrinsic_exponent): Use library functions. - (gfc_conv_intrinsic_set_exponent): Remove. - (gfc_conv_intrinsic_scale): Remove. - (gfc_conv_intrinsic_nearest): Remove. - (gfc_conv_intrinsic_fraction): Remove. - (gfc_conv_intrinsic_function): Update. - * trans-decl.c (gfor_fndecl_math_exponent4): New. - (gfor_fndecl_math_exponent8): New. - (gfc_build_intrinsic_function_decls): Set them. - * trans.h: Declare them. - -2003-11-25 Canqun Yang - - * trans-common.c (gfc_layout_global_equiv): Locate the error for - underflow COMMON block. - (gfc_trans_one_common): Fix bug for size of COMMON block containing - EQUIVALENCE object. Also fix typo in an error message. - -2003-11-25 Diego Novillo - - * Make-lang.in: Add check-gfortran to lang_checks. - (check-f95): Alias for check-gfortran. - -2003-11-25 Jason Merrill - - * Make-lang.in (f95.tags): Create TAGS.sub files in each - directory and TAGS files that include them for each front end. - -2003-11-24 Paul Brook - - PR fortran/13154 - * trans-decl.c (gfc_greate_module_variable): Skip COMMON blocks. - -2003-11-24 Paul Brook - - * expr.c (simplify_const_ref): Return SUCCESS for things we don't - handle. - * resolve.c (gfc_resolve_expr): Resolve contents before rank/shape. - -2003-11-24 Paul Brook - - PR fortran/13105 - * array.c (gfc_array_ref_shape): Handle elemental dimensions. - * trans-array.c (gfc_trans_preloop_setup): Use correct dim lookup. - -2003-11-20 Richard Henderson - - * trans-array.c (gfc_trans_allocate_array_storage): Use convert. - (gfc_conv_array_base): Likewise. - * trans-decl.c (gfc_trans_auto_character_variable): Likewise. - * trans-expr.c (gfc_conv_string_tmp): Likewise. - * trans-intrinsic.c (gfc_conv_intrinsic_trim): Likewise. - * trans-stmt.c (gfc_trans_character_select): Likewise. - -2003-11-13 Paul Brook - - * trans-decl.c (gfc_sym_mangled_function_id): Dont mangle externals. - -2003-11-13 Canqun Yang - - * resolve.c (gfc_resolve): Also resolve EQUIVALENCE objects. - (resolve_equivalence): New function. - (resolve_equivalence_derived): New function. - -2003-11-12 Richard Henderson - - * trans.c (gfc_trans_code): Use annotate_with_locus instead of - annotate_all_with_locus. - -2003-11-11 Canqun Yang - - * options.c (gfc_init_options): Set flag_max_stack_var_size as 32768. - * trans-decl.c (gfc_finish_var_decl): Modified. - -2003-11-08 Paul Brook - - PR fortran/12704 - * trans-intrinsic.c (gfc_conv_intrinsics_minmaxloc): Handle zero-size - arrays. - -2003-11-06 Paul Brook - - * trans-intrinsic.c (gfc_conv_intrinsics_minmaxloc): Initialize pos. - -2003-11-02 Canqun Yang - - * match.c (gfc_match_stopcode): Assign '0' to stop_code. - -2003-10-27 Anthony Green - - * Make-lang.in (f95.stageprofile): Use tabs, not spaces. - (f95.stagefeedback): Ditto. - -2003-10-27 Andrew Pinski - - PR fortran/12682 - * Make-lang.in (f95.stageprofile): Add. - (f95.stagefeedback): Add. - -2003-10-23 Richard Henderson - - * f96-lang.c (gfc_gimplify_expr): Remove. - (LANG_HOOKS_GIMPLIFY_EXPR): Remove. - (LANG_HOOKS_GIMPLE_BEFORE_INLINING): New. - -2003-10-23 Richard Henderson - - * f95-lang.c (gfc_gimplify_expr): Return gimplify_status. - -2003-10-20 Paul Brook - - * trans-expr.c (gfc_conv_integer_power): Use boolean_type_node. - * trans-stmt.c (gfc_trans_do_while): Ditto. - -2003-10-17 Paul Brook - - * simplify.c (gfc_simplify_shape): Use gfc_array_dimen_size. - -2003-10-17 Paul Brook - - * trans-io.c (gfc_build_io_library_fndecls): Set TREE_PUBLIC. - -2003-10-17 Feng Wang - - * iresolve.c (gfc_resolve_maxloc): Change the result's kind and type. - (gfc_resolve_minloc): Ditto. - * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Use correct types. - Return the value after subtracting the lower bound. - -2003-10-16 Richard Henderson - - * f95-lang.c (expand_function_body): Don't check flag_disable_gimple. - -2003-10-16 Steven Bosscher - - * lang.c: Remove -M option for now, it's in the way for C. - -2003-10-14 Jason Merrill - - * Make-lang.in (f95.tags): New rule. - -2003-10-13 Richard Henderson - - * trans.c (gfc_trans_code): Use annotate_all_with_locus. - -2003-10-13 Paul Brook - - * trans-decl.c (generate_local_decl): Don't create junk variables. - -2003-10-13 Paul Brook - - * resolve.c (resolve_formal_arglist): Use function result decl in - preference to function decl. - -2003-10-12 Richard Henderson - - * f95-lang.c (gfc_define_builtin): New const_p argument. Set - TREE_READONLY. Update all callers. - -2003-10-12 Feng Wang - - * iresolve.c (gfc_resolve_cshift): Change to match implementation. - * trans-intrinsic.c (gfc_conv_intrinsic_function): Remove CSHIFT. - (gfc_is_intrinsic_libcall): Add CSHIFT. - -2003-10-12 Richard Henderson - - * trans-array.c (gfc_trans_static_array_pointer): Set TREE_INVARIANT. - (gfc_trans_array_constructor_value): Likewise. - (gfc_conv_array_initializer): Likewise. - * trans-stmt.c (gfc_trans_character_select): Likewise. - -2003-11-12 Kejia Zhao - - * trans-intrinsic.c (integer_kind_info, real_kind_info): Remove. - -2003-10-11 Huang Chun - - * check.c (gfc_check_repeat): Check arguments are scalar. - (gfc_check_trim): New function. - * intrinsic.h (gfc_check_trim): Add prototype. - * intrinsic.c (add_functions): Use it. - * trans.h (gfor_fndecl_string_trim, gfor_fndecl_string_repeat): - Decalare. - * trans-decl.c: Ditto. - (gfc_build_intrinsic_fucntion_decls): Set them. - * trans-intrinsic.c (gfc_conv_intrinsic_len): Handle result vars. - (gfc_conv_intrinsic_trim): New function. - (gfc_conv_intrinsic_repeat): New function. - (gfc_conv_intrinsic_function): Use them. - -2003-10-11 Huang Chun - - * trans-types.c (gfc_sym_type): Handle result variables. - -2003-10-11 Huang Chun - - * trans-intrinsic.c (gfc_conv_intrinsic_char): Don't use - gfc_get_character_type. - -2003-10-11 Feng Wang - - * trans-expr.c (gfc_conv_variable): Check sym->ts, not the decl. - -2003-10-11 Paul Brook - - * iresolve.c (gfc_resolve_dint, gfc_resolve_dnint): New functions. - (gfc_resolve_dprod): New function. - (gfc_resolve_aint, gfc_resolve_anint): Only base name on arg type. - * intrinsic.h (gfc_resolve_dint, gfc_resolve_dnint): Declare. - (gfc_resolve_dprod): Declare. - * intrinsic.c (add_functions): Use them. - * trans-decl.c (gfc_get_extern_function_decl): Only pass one arg. - -2003-10-06 Richard Henderson - - * f95-lang.c (gfc_init_builtin_functions): Add clzll. - * trans-intrinsic.c (call_builtin_clz): Use it. - -2003-10-05 Paul Brook - - * f95-lang.c (expand_function_body): Call (push|pop)_function_context. - * trans-decl.c (gfc_generate_function_code): Set - cfun->function_end_locus. - -2003-09-24 Jason Merrill - - * f95-lang.c, trans-decl.c: Use DECL_SOURCE_LOCATION instead of - TREE_LOCUS. - -2003-09-21 Lifang Zeng - Paul Brook - - * Make-lang.in (F95_OBJS): Add fortran/data.o. - * array.c (gfc_inser_constructor): New function. - (gfc_get_constructor): New function. - (gfc_free_constructor): Initialize offset and repeat. - (iterator_stack): Remove. - (expand_info): Add offset, component and repeat fields. - (expand_constructor): Set them. - (expand): Set new fields. - (gfc_copy_constructor): Ditto. Avoid recursion. - * gfortran.h: Add prototypes for new functions. - (gfc_constructor): Add offset, component and repeat. - (iteratio_stack): Move to here. - * resolve.c (check_data_variable): Convert data values into variable - initializers. - (traverse_data_list): Build implicit loop chain. - (gfc_resolve): Ditto. - * trans-array.c (gfc_conv_array_intializer): Handle repeat count. - * trans-decl.c (gfc_get_symbol_decl): Use gfc_conv_structure. - * trans-expr.c (gfc_conv_structure): Handle array initializers. - (gfc_conv_expr): Update to match. - * trans.h (gfc_conv_structure): Declare. - * data.c: New file. - -2003-09-20 Kejia Zhao - - * trans.h: Add declarations for gfor_fndecl_si_kind and - gfor_fndecl_sr_kind. - * trans-decl.c (g95_build_intrinsic_function_decls): Build them. - * trans-intrinsic.c (g95_conv_intrinsic_si_kind): New function. - (g95_conv_intrinsic_sr_kind): New function. - (g95_conv_intrinsic_function): Add SELECTED_INT_KIND and - SELECTED_REAL_KIND. - -2003-09-17 Lars Segerlund - - * iresolve.c (gfc_resolve_random_number): Generate _r4 & _r8 - instead of _4 and _8 as postfix for libgfortran calls. - -2003-09-16 Paul Brook - - * array.c (compare_bounds): New function. - (gfc_compare_array_spec): Use it. - -2003-09-14 Paul Brook - - * primary.c (gfc_match_rvalue): Make sure sym->result is set. - * trans-expr.c (gfc_conv_string_parameter): Also allow PRAM_DECLs. - -2003-09-14 Paul Brook - - * check.c (dim_rank_check): Allow assumed bounds if requested. - (gfc_check_lbound): Call it. - (gfc_check_ubound): Ditto. - (gfc_check_size): Change to match. - * simplify.c (gfc_simplify_bound): New function. - (gfc_simplify_lbound): New function. - (gfc_simplify_ubound): New function. - * intrinsic.h: Declare them. - * intrinsic.c (add_functions): Use them. - -2003-09-14 Paul Brook - - * io.c (format_lex): Initialize negative_flag. - (check_format): Intialize repeat. - * trans-io.c (gfc_new_nml_name_expr): Declare static. - (gfc_new_var_expr): Ditto. - -2003-09-14 Paul Brook - - * trans-array.c (gfc_conv_array_initializer): Handle derived types. - * trans-decl.c (gfc_get_symbol_decl): Only do local scalar values. - -2003-09-12 Paul Brook - - * trans-intrinsic.c (gfc_conv_intrinsic_sign): Call fold. - -2003-09-12 Zdenek Dvorak - - * fortran/trans.c (gfc_finish_block): Call rationalize_compound_expr - for a correct expression. - -2003-09-10 Kejia Zhao - - * trans-intrinsic.c (real_compnt_info): New struct. - (prepare_arg_info): New function. - (gfc_conv_intrinsic_set_exponent): New function. - (gfc_conv_intrinsic_scale): New function. - (gfc_conv_intrinsic_nearest): New function. - (gfc_conv_intrinsic_fraction): New function. - (gfc_conv_intrinsic_exponent): New function. - (gfc_conv_intrinsic_spacing): New function. - (gfc_conv_intrinsic_rrspacing): New function. - (gfc_conv_intrinsic_function): Use them. - -2003-08-24 XiaoQiang Zhang (zhangapache@yahoo.com> - - * trans-const.c (gfc_conv_mpz_to_tree): Fix bug, parameter for - build_int_2 changed from (high, low) to (low, high). - * trans-io.c (ioparm_namelist_name, ioparm_namelist_name_len, - ioparm_namelist_read_mode, iocall_set_nml_val_int, - iocall_set_nml_val_float, iocall_set_nml_val_char, - iocall_set_nml_val_complex, iocall_set_nml_val_log): New declaration. - (gfc_build_io_library_fndecls): Add variable initialization. - (gfc_new_nml_name_expr, get_new_var_expr): New function. - (build_dt): Add namelist support. - * io.c (value): New variable. - (check_format): Support FMT_H now. - -2003-09-07 Paul Brook - - * io.c (gfc_resolve_dt): Error if format label is not defined. - -2003-09-07 Kejia Zhao - - * trans-intrinsic.c (gfc_conv_intrinsic_aint): Fix two bugs. One is - about case_switch's break. The other is about building the condition - statement tree, which judges the argument in the range of the - corresponding integer type. - * trans-intrinsic.c (gfc_conv_intrinsic_mod): MOD and MODULO can work - for the large values. - -2003-09-05 Paul Brook - - * f95-lang.c (expand_function_body): Gimplify the function. - -2003-09-04 Jeff Law - - * f95-lang.c (DEFINE_MATH_BUILTIN): C arrays start at - index zero! - -2003-09-04 Paul Brook - - * f95-lang.c (gfc_define_builtin): Also set implicit_built_in_decls. - (gfc_expand_stmt): New function. - (LANG_HOOKS_RTL_EXPAND_STMT): Define. - (expand_function_body): Use tree_rest_of_compilation. - * trans-decl.c (gfc_generate_function_code): Don't free cfun. - -2003-09-03 Jeff Law - - * f95-lang.c (gfc_init_builtin_functions): C arrays start at - index zero! - -2003-08-30 Paul Brook - - * f95-lang.c (builtin_function): Remove #if 0 code. - (gfc_define_builtin): New function. - (gfc_init_builtin_functions): Use mathbuiltins.def not ../builtins.def. - * mathbuiltins.def: New file. - * trans-intrinsic.c (gfc_intrinsic_map_t): Add builtin code fields. - (gfc_intrinsic_map): Use mathbuiltins.def. - (gfc_intrinsic_builtin_t): Remove. - (gfc_build_intrinsic_lib_fndecls): Update. - * trans-types.c (gfc_init_types): Remove redundant initilaization of - signed_size_type_node. - -2003-08-29 Paul Brook - - * arith.c (gfc_real_kinds): Use correct minimum exponents. - -2003-08-22 Kejia Zhao - - * trans-instinsic.c (gfc_conv_intrinsic_mod): Also do MODULO. - (gfc_conv_intrinsic_function): Add MODULO. - -2003-08-22 Jason Merrill - - * trans-array.c (gfc_conv_expr_descriptor): Update use of predicates. - -2003-08-22 Andreas Jaeger - - * Make-lang.in (f95.install-common): Add DESTDIR support. - * (f95.install-info): Likewise. - (f95.uninstall): Likewise. - -2003-08-19 Diego Novillo - - * trans-types.c (gfc_init_types): Initialize - signed_size_type_node with size_type_node. - -2003-08-18 Paul Brook - - * dependency.c (gfc_dependency): New enum. - (check_another_array_ref): Remove. - (gfc_get_array_from_component): Remove. - (get_x): Remove. - (get_range): Remove. - (get_no_of_elements): Use mpz_t, not mpf_t. - (transform_sections): New function. - (gfc_check_range_range): Rename ... - (gfc_check_section_vs_section): ... to this. Use new function. - (gfc_is_inside_range): Rewrite to match. - (gfc_check_element_vs_section): Ditto. - (gfc_check_element_vs_element): Ditto. - (get_deps): Ditto. - (gfc_dep_resolver): Ditto. Remove unused parameter. - * Dependency.h (gfc_check_range_range, gfc_check_element_vs_section, - gfc_check_element_vs_element, gfc_is_inside_range, - gfc_get_array_from_component): Remove prototypes for static functions. - (gfc_dep_resolver): Update prototype. - * trans-array.c (gfc_conv_resolve_dependencies): Change to match. - -2003-08-15 Paul Brook - - * trans-decl.c (gfc_build_qualified_array): Don't add symbols for - return values to parent scope. - (gfc_build_dummy_array_decl): Ditto. - -2003-08-14 Paul Brook - - * trans-stmt.c (gfc_trans_allocate): Handle NULL refs. Allocate the - size of the type, not the pointer. - * resolve.c (resolve_symbol): Give more accurate error message. - -2003-08-10 Paul Brook - - * trans-decl.c (gfc_build_function_decl): Only mangle global symbols. - -2003-08-10 Paul Brook - - * trans-stmt.c (gfc_trans_allocate): Correctly handle non-array derived - type components. - -2003-08-10 Chun Huang - - * resolve.c (resolve_formal_arglist): Resolve STATEMENT function. - (resolve_symbol): Ditto. - * trans-expr.c (gfc_conv_statement_function): New function. - (gfc_conv_function_expr): Use it. - -2003-08-10 Paul Brook - - * trans-array.c (gfc_conv_ss_startstride): Handle functions. - (walk_function_expr): Set section rank. - * trans-intrinsic.c (gfc_walk_intrinsic_libfunc): Ditto. - -2003-08-10 Paul Brook - - * intrinsic.c (add_sym): Prefix names with correct string. - (add_sym_0s): New function. - (add_subroutines): Register abort. - -2003-08-10 Erik Schnetter - - * gfortran.h: Introduce options to control the mangling. - * lang.opt: Likewise. - * options.c (gfc_init_options): Handle the options. - * trans-common.c (gfc_sym_mangled_common_id): New function. - (gfc_build_common_decl): Call it. - * trans-decl.c (gfc_sym_mangled_function_id): New function. - (gfc_get_extern_function_decl, gfc_build_function_decl): Call it. - -2003-08-09 Paul Brook - - * module.c (mio_symbol): Always ouput a namespace for formal args. - (load_needed): Namespace now belong to their proper symbol. - (gfc_dump_module): Change G95=>GFORTRAN. - -2003-08-05 Paul Brook - - * options.c: Force -fg77-calls. - -2003-08-02 Paul Brook - - * Makelang.in: Rename G95_* to GFORTRAN_*. - * All sources: Rename G95_* to GFC_*. - -2003-08-01 Paul Brook - - * fortran/Make-lang.in: Use GMPLIBS. - * fortran/config-lang.in: Set need_gmp. - * trans-expr.c (gfc_conv_variable): Remove incorrect assertion. - -2003-07-27 Andreas Jaeger - - * trans-decl.c (gfc_generate_constructors): Convert prototype to - ISO C90. - * trans-const.c (gfc_init_constants): Likewise. - * trans-intrinsic.c (gfc_build_intrinsic_lib_fndecls): Likewise. - - * gfortranspec.c: Convert to ISO C90. - (lang_specific_driver): Correct copyright, remove ALT_LIBM usage. - -2003-07-26 Paul Brook - - * lang.opt: Add -fdump-parse-tree. - * options.c (gfc_handle_option): Ditto. - * resolve.c (resolve_forall_iterators): Convert to proper type. - * trans-stmt.c (gfc_trans_forall_1): Create temp var with correct type. - -2003-07-26 Paul Brook - - * Makefile.in: Add build dependencies on files common with rest of gcc. - -2003-07-26 Lifang Zeng - - * trans.h: Declare g95_trans_pointer_assignment. - * trans-expr.c (g95_trans_pointer_assignment): New function. - (g95_trans_pointer_assign): Use it. - * trans-stmt.c (g95_trans_forall_1): Handle pointer assignment. - (g95_trans_pointer_assign_need_temp): New function. - -2003-07-26 Paul Brook - - * gfortran.texi: Replace references to g95. - -2003-07-26 Paul Brook - - Rename g95_* to gfc_*. - -2003-07-25 Paul Brook - - * gfortran.h: Rename from g95.h. - * trans-types.c (boolean_type_node, booelan_true_node, - boolean_false_node): Remove. - * trans-types.h: Ditto. - -2003-07-25 Chun Huang - - * parse.c (accept_statement): Implement BLOCK DATA statement. - * trans-expr.c (g95_conv_variable): Fix bug for dereference pointer - variables. - -2003-07-24 Lifang Zeng - - * trans-stmt.c (temporary_list): Define. - (g95_trans_assign_need_temp): New function. - (g95_trans_forall_1): Modified for WHERE. - (g95_trans_where_assign): Modified. - (g95_trans_where_2): Modified. - (g95_evaluate_where_mask): Modified. - (g95_trans_where): Modified. - (g95_get_temp_expr): Removed. - (g95_add_to_where_stmt_list): Removed. - (compute_overall_iter_number): Modified for WHERE. - * trans.h: Remove where_stmt_list. - -2003-07-24 Arnaud Desitter - - * lang.opt: Correct description of options -J and -M. - -2003-07-23 Steven Bosscher - - * lang.opt: Move help text to here. - * lang-options.h: Remove. - -2003-07-23 Arnaud Desitter - * iresolve.c (g95_resolve_transpose): Proper variable in switch. - * simplify.c (g95_simplify_nearest): Fix typo and use a correct test - on kind. - -2003-07-22 Steven Bosscher - Paul Brook - - * check.c (check_rest): Use global pedantic flag. - * io.c (data_desc): Ditto. - * error.c (g95_warning, g95_warning_now): Use global flag. - * f95-lang.c (LANG_HOOKS_HANDLE_OPTION): Rename from DECODE. - (expand_function_body): Update to new prototypes. - (g95_init): Use new option names. - * g95.h (g95_option_t): Standardize names. - (g95_init_options, g95_handle_option): Update prototypes. - * interface.c: Use new option names. - * match.c: Ditto. - * module.c: Ditto. - * parse.c: Ditto. - * primary.c: Ditto. - * resolve.c: Ditto. - * scanner.c: Ditto. - * simplify.c: Ditto. - * symbol.c: Ditto. - * trans-array.c: Ditto. - * trans-expr.c: Ditto. - * trans-types.c: Ditto. - * trans-decl.c: Ditto. - (g95_build_library_function_decl): Remove obsolete VPARAMS. - * trans.h: Ditto. - * options.c (g95_display_help): Remove. - (g95_init_options): Convert to new scheme. - (set_Wall): Ditto - (g95module_option): Ditto, rename from g95_parse_arg. - (g95_handle_module_path_options): New function. - * trans-equivalence.c: Fix error message. - * lang.opt: Corrections. - -2003-07-21 Steven Bosscher - - * lang.opt: New file. - -2003-07-21 Arnaud Desitter - - * decl.c (match_attr_spec): Set colon_seen. - -2003-07-14 Paul Brook - - * trans-array.c: Update comment. - (g95_trans_array_constructor_subarray): Cleanup loopinfo data. - * trans-intrinsic.c (g95_conv_intrinsic_anyall,count,arith, - minmaxloc,minmaxval): Ditto. - * trans-io.c (g95_trans_transfer): Ditto. - * trans-stmt.c: Remove unneeded prototypes. - (generate_loop_for_lhs_to_rhs): Rename vars. Add loop post chain. - (generate_loop_for_rhs_to_temp): Rename vars. Don't share loopinfo. - (compute_inner_temp_size): Remove bits of dead code. Add comments. - Don't share loopinfo. - (compute_overall_iter_number): Declare as static. - (allocate_temp_for_forall_nest): Ditto. - (g95_trans_forall_1): Don't pass shared loopinfo. - * trans.c (g95_start_block): Expand comment. - -2003-07-12 Paul Brook - - * arith.c (g95_index_integer_kind): Remove unused initializer. - * trans-stmt.c (generate_loop_for_temp_to_lhs): Don't multiply array - index by size of element. - (generate_loop_for_rhs_to_temp): Ditto. - (allocate_temp_for_forall_nest): Use element size, not index size. - -2003-07-11 Arnaud Desitter - - * arith.c (g95_index_integer_kind): Add a TODO. - * simplify.c (g95_simplify_nearest): Add a TODO. - -2003-07-09 Chun Huang - - * trans.h: Add declarations for gfor_fndecl_string_scan and - gfor_fndecl_string_verify. - * trans-decl.c (g95_build_intrinsic_function_decls): Build them. - * trans-intrinsic.c (g95_conv_intrinsic_scan): New function. - (g95_conv_intrinsic_verify): New function. - (g95_conv_intrinsic_function): Add SCAN and VERIFY. - * simplify.c (g95_simplify_scan, g95_simplify_verify): Fix bug in case - of parameter 'BACK=.TRUE.' - -2003-07-05 Lifang Zeng - - * trans-stmt.c (iter_info, forall_info): Define. - (g95_trans_forall_block): Remove. - (g95_trans_forall_loop): Use forall info blocks. - (g95_trans_nested_forall_loop): New function. - (g95_do_allocate): Handle things other than logical masks. - (generate_loop_for_temp_to_lhs): New function. - (generate_loop_for_rsh_to_temp): New function. - (compute_inner_temp_size): New function. - (compute_overall_iter_number): New function. - (allocate_temp_for_forall_nest): New function. - (g95_trans_forall): Move body ... - (g95_trans_forall_1): ... to here. Handle loops with temporaries. - -2003-07-02 Paul Brook - - * trans-decl.c (create_index_var, g95_build_qualified_array): Put vars - in correct scope. Change callers to match. - * trans-types.c (g95_get_dtype_cst): Allow rank 7 arrays. - * iresolve.c (g95_resolve_reshape): Only use constant shapes. - -2003-07-02 Paul Brook - - * trans-array.c (g95_conv_loop_setup): Remove dead var. Use - expression shape for all expressions. - * trans-decl.c (g95_symbol_init): Allow adding at very end of list. - -2003-07-03 Arnaud Desitter - - * g95.h (g95_option_t), lang-options.h, options.c (g95_init_options, - g95_parse_arg), intrinsic.c (g95_convert_type): support of - -Wconversion. - * intrinsic.c, g95.h: Add g95_convert_type_warn, - * resolve.c (g95_resolve_index): Call it. - -2003-07-02 Paul Brook - - * iresolve.c (g95_resolve_reshape): Set expression shape. - (g95_resolve_shape): Ditto. - * simplify.c (g95_simplify_shape): Move common code outside condition. - * trans-array.c (g95_conv_array_initializer): Teach it how to count. - -2003-07-01 Arnaud Desitter - - * array.c (g95_array_dimen_size): Deal with EXPR_ARRAY to improve - conformance checks. - -2003-06-29 Paul Brook - - * array.c (g95_simplify_iterator_var): Don't bother with return value. - * expr.c (find_array_element, find_component_ref): New functions. - (remove_subobject_ref): New function. - (simplify_const_ref): Use them. Rename from simplify_component_ref. - (simplify_ref_chain): New function. - (g95_simplify_expr): Use it. Simplify parameter variable subobjects. - (g95_specification_expr): Simplify the expression. - * resolve.c (resolve_operator): Check simplifications return code. - (g95_resolve_expr): Ditto. - -2003-06-26 Paul Brook - - * expr.c (simplify_component_ref): New function. - (g95_simplify_expr): Use it. - * resolve.c (resolve_structure_cons): Handle references. - -2003-06-25 Paul Brook - - * trans-io.c (build_dt): Handle internal units. - -2003-06-25 Canqun Yang - - * trans-common.c (g95_build_common_decl): Array index range starts at 0. - (g95_build_common_decl, g95_layout_global_equiv, g95_trans_one_common): - Use g95_array_index_type instead of integer_type_node. - (g95_build_common_decl, g95_set_common_master_type): Use - g95_character1_type_node instead of char_type_node. - * trans-equivalence.c (g95_layout_local_equiv): As above. - -2003-06-24 Steven G. Kargl - - * g95.h (g95_option_t), options.c (g95_init_options, g95_parse_arg): - remove last remains of -fquiet. - -2003-06-22 Paul Brook - - * resolve.c (resolve_operator): Don't fail if we can't simplify. - (g95_resolve_expr): Ditto. - (resolce_code): Mark as static. - * trans-stmt.c (g95_trans_chaaracter_select): Mark labels because the - gimplifer doesn't (yet). - -2003-06-20 Paul Brook - - * g95.h: Add ST_PAUSE and EXEC_PAUSE. - * match.c (g95_match_if): Add ST_PAUSE. - (g95_match_stopcode): New function. - (g95_match_pause, g95_match_stop): Use it. - * parse.c (g95_ascii_statement): Handle ST_PAUSE. - (decode_stmt, next_statement, parse_executable): Ditto. - * resolve.c (resolve_code): Ditto. - * st.c (g95_free_statement): Ditto. - * trans-stmt.c (g95_trans_pause): New function. - * trans-stmt.h: Declare it. - * trans.c (g95_trans_code): Use it. - * trans-decl.c (gfor_fndecl_pause_numeric, gfor_fndecl_pause_string): - Declare. - (g95_build_builtin_function_decls): Initialize them. - * trans.h: Ditto. - * dump-parse-tree.c (g95_show_code_node): Handle EXEC_PAUSE. - -2003-06-18 Arnaud Desitter - - * io.c (g95_match_open , g95_match_close, g95_match_inquire, - match_filepos): Fix error handling. - -2003-06-18 Arnaud Desitter - - * array.c (spec_dimen_size, ref_dimen_size, g95_array_dimen_size): - Add assertions on arguments. - * resolve.c (expression_shape): Remove useless &. - * simplify.c (get_kind, g95_simplify_bit_size, g95_simplify_digits, - g95_simplify_ibclr, g95_simplify_ibits, g95_simplify_ibset, - g95_simplify_ishft,g95_simplify_ishftc, g95_simplify_maxexponent, - g95_simplify_minexponent, g95_simplify_radix, g95_simplify_range - g95_simplify_rrspacing, g95_simplify_scale, g95_simplify_spacing, - g95_simplify_tan, g95_simplify_tiny): Clean predicates and assertions. - (g95_simplify_not, g95_simplify_scale): Add assertions. - -2003-06-15 Paul Brook - - Clean up stuff to work with the ssa optimizers. - * convert.c (convert): Handle BOOLEAN_TYPEs. - * f95-lang.c (g95_truthvalue_conversion): Implement. - * trans-array.c (g95_trans_array_constructor_value): Group multiple - scalar values. - * trans.h (g95_truthvalue_conversion): Declare. - * trans-intrinsic.c (g95_conv_intrinsic_anyall): Use bool constants. - * trans-stmt.c (g95_trans_character_select): Don't create array - assignments. Mark labels as indirect jump targets. - * trans-types.h (g95_init_types): Use BOOLEAN_TYPE nodes. - (g95_get_dtype_cst): Handle LOGICAL types. - -2003-06-14 Paul Brook - - * f95-lang.c (g95_gimplify_expr): New function. - * trans-array.c (g95_trans_array_constructor_value): Don't create - array assignments. - (g95_conv_expr_descriptor): Rename simple->gimple. - * trans-expr.c (conv_expr_op): Use proper logical operators. - * trans-intrinsic.c (build_fixbound_expr): New function. - (build_fix_expr): Ditto. - (g95_conv_intinsic_aint): Use them. Use builtin functions. - (g95_conv_intrinsic_function): Add FLOOR and CEILING. - -2003-06-10 Arnaud Desitter - - * array.c (g95_compare_array_spec): Remove unreachable code. - * expr.c (g95_copy_expr): Likewise. - * intrinsic.c (g95_convert_type): Likewise. - * misc.c (g95_code2string): Likewise. - * simplify.c (g95_simplify_ishft, g95_simplify_real, - g95_simplify_reshape, g95_simplify_sign, g95_simplify_sqrt): Likewise. - * trans-stmt.c (g95_trans_select): Likewise. - * primary.c (extend_ref): Add an assertion. - * simplify.c (g95_convert_constant): Add const. - * intrinsic.h: Remove g95_check_x_ni. - * f95-lang.c (g95_finish): Call g95_release_include_path. - -2003-06-10 Arnaud Desitter - - * resolve.c (resolve_contained_functions): Fix typo introduced on - 2003-01-13. - -2003-06-09 Paul Brook - - * g95.h: Include system.h not hwint.h. - * many: use safe-ctype.h not ctype.h. Change isalpha -> ISALPHA, etc. - * misc.c (g95_getmem): Use xmalloc/memset instead of calloc. - -2003-06-09 Paul Brook - - * g95.h (g95_symbol): Add fields for COMMON and EQUIVALENCE variables. - * Make-lang.in (F95_OBJS): Add files for COMMON and EQUIVALENCE. - * trans-decl.c (g95_add_decl_to_functions): Make non-static. - (g95_get_symbol_decl): Handle COMMON and EQUIVALENCE objects. - (g95_generate_function_code): Translate COMMON and EQUIVALENCE - objects. - * trans.h (g95_trans_equivalence, g95_trans_common, - g95_add_decl_to_function): Declare. - * trans-common.c, trans-equivalence.c: New files. - -2003-06-08 Steven Bosscher - - * intrinsic.c (g95_intrinsic_extension): Remove. - (add_functions): Substitute g95_check_x for g95_check_x_ni - everywhere. - (g95_init_expr_extensions): New function. - (g95_intrinsic_func_interface): Use it. - * intrinsic.h: Remove extern decl for g95_intrinsic_extension. - * check.c (g95_check_digit, g95_check_huge, g95_check_kind, - g95_check_precision, g95_check_present, g95_check_radix, - g95_check_range, g95_check_selected_real_kind): Do not set - g95_intrinsic_extension. - (g95_check_x_ni): Remove now duplicate of g95_check_x. - - * expr.c (check_inquiry): Add FIXME, fixup some code style. - -2003-06-06 Arnaud Desitter - - * g95.h (ref_type): Name this type explicitly. - * module.c (MIO_NAME): Add specialisations of mio_name. - (mio_symbol_attribute, mio_typespec, mio_array_ref, - mio_array_spec, mio_ref, mio_expr, mio_symbol): Use them. - (ab_attribute): Name this type explicitly. - (mio_symbol_attribute, mio_expr): Add cast to call to find_enum. - -2003-06-05 Kejia Zhao - - * trans-intrinsic.c (g95_conv_allocated): New function. - (g95_conv_intrinsic_function): Make G95_ISYM_ALLOCATED work. - -2003-06-05 Steven Bosscher - - * f95-lang.c: Don't include g95-support.h - (g95_mark_addressable): Add prototype. - (g95_init_decl_processing): Remove C front end hack. - * f95-tree.c: Remove file. - * support.c: Remove file. - * g95-support.h: Remove file. - * trans-types.c (g95_init_types): Set up boolean - type related tree nodes. - * Make-lang.in: Remove rules for dead files and - dependencies on them. - -2003-06-05 Steven Bosscher - - * Make-lang.in (F95_ADDITIONAL_OBJS): Remove the final - C front end dependency. Also, convert.c does not depend on - g95-support.h anymore. - * convert.c: Don't include c-common.h and g95-support.h - * f95-lang.c: Don't inlude c-common.h and c-common.def (3x). - (g95_stmt_tree, g95_scope_stmt_stack, anon_aggr_type_p, - stmts_are_full_exprs_p, current_stmt_tree, - current_scope_stmt_stack): Remove. - * g95-support.h (unsigned_conversion_warning): Kill proto. - (boolean_type_node, boolean_true_node, boolean_false_node): - Don't define here. Instead, make then true tree nodes in - trans-types. - * support.c (c_global_trees): Die, C front end, die!!! - (g95_init_c_decl_hacks): Don't touch intmax_type_node, - uintmax_type_node, string_type_node and const_string_type_node. - (decl_constant_value, overflow_warning): Make static functions. - They are in death row too, though. - (default_conversion, c_expand_asm_operands): Remove. - * trans-array.c, trans-expr.c, trans-intrinsic.c, trans-stmt.c, - trans.c: Don't include c-common.h. - * trans-types.c (boolean_type_node, boolean_true_node, - boolean_false_node): Make them real tree nodes. - * trans-types.h (intmax_type_node, string_type_node, - const_string_type_node): Hack to work around C dependencies - in builtin-types.def. - -2003-06-04 Arnaud Desitter - - * decl.c (decl_types): Add some iterators-like sentinels. - * decl.c (match_attr_spec): Use them. - Use "decl_types" instead of "int". - Add cast in call to g95_match_strings. - * dump-parse-tree.c (g95_show_namespace): Use "g95_intrinsic_op" - instead of "int". - * g95.h (g95_intrinsic_op): Add some iterators-like sentinels. - (g95_interface_info): Use "g95_intrinsic_op". - * dump-parse-tree.c (g95_show_namespace): Use them. - * interface.c (g95_check_interfaces): Use them. - * module.c (read_module, write_module): Use them. - * symbol.c (g95_get_namespace, g95_free_namespace): Use them. - Use "g95_intrinsic_op". - * interface.c (check_operator_interface): Use "g95_intrinsic_op". - Add a default case in switch statement. - * intrinsic.h (g95_generic_isym_id): Moved to... - * g95.h (g95_generic_isym_id): here. - (g95_intrinsic_sym): Use "g95_generic_isym_id". - * intrinsic.c (make_generic): Use "g95_generice_isym_id". - * trans-intrinsic.c (g95_intrinsic_map_t, - g95_conv_intrinsic_lib_funtion): Use "g95_generice_isym_id". - * match.c (g95_match_intrinsic_op): Add cast in call to - g95_match_strings. - -2003-06-03 Steven Bosscher - - * support.c (skip_evaluation, warn_conversion, lvalue_p, - lvalue_or_else, pedantic_lvalue_warning, warn_for_assignment, - constant_fits_type_p, convert_and_check, - unsigned_conversion_warning): Remove these ugly remnants - we inherited from the C front end. - (function_types_compatible): Remove '#if 0'-edcode. - (build_modify_expr): Likewise. - (convert_for_assignment): Don't use the deceased functions. - The parameter fundecl is now unused. - (decl_constant_value): Always just return decl. In fact - this function is not used at present, but it might be in - the future, when we start using the tree inliner. - (overflow_warning, default_conversion, c_expand_asm_operands): - Abort when these are called, they are part of the C type - checking implementation and therefore poison to Fortran. - -2003-06-04 Steven Bosscher - - * Make-lang.in (F95_ADDITIONAL_OBJS): Don't depend on - c-pretty-print.o and c-dump.o. Add a comment on why we - depend on c-semantics.c. - * f95-lang.c (LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN): - Don't use the C front end tree dumper hook to dump the - language specific tree representation -- we don't have - one. So instead, inherit the default langhook. - -2003-06-02 Paul Brook - - * trans-expr.c (g95_conv_variable): Remove incorrent assertion. - -2003-06-02 Arnaud Desitter - - * check.c (g95_check_associated): Use proper types. Remove - extraneous argument in call to g95_error(). - -2003-06-02 Kejia Zhao - - * resolve.c (resolve_operator): Make logical operands convert to the - type with higher kind. - -2003-06-02 Kejia Zhao - - * check.c (g95_check_associated): Make sure both pointer and target has - the same type and rank. Null pointer or array section with vector - subscript as target are not allowed. - * trans.h: Declare gfor_fndecl_associated. - * trans-decl.c: (g95_build_builtin_function_decls): Initialize - gfor_fndecl_associated. - * trans-intrinsic.c (g95_conv_associated): New function. - (g95_conv_intrinsic_function): Make G95_ISYM_ASSOCIATED work. - -2003-06-02 Kejia Zhao - - * trans-array.c (g95_conv_expr_descriptor): Set the base of POINTER - according to POINTER itself rather than TARGET. - (g95_conv_expr_descriptor): Make lbound start at 1. - * trans-expr.c (g95_trans_pointer_assign): Fix a bug for Nullify. - -2003-06-01 Paul Brook - - * expr.c (g95_type_convert_binary): Make it match the standard. - * g95.texi: Remove dead link. - -2003-06-01 Steven Bosscher - - * g95.texi: Cleanup somewhat in preparation for inclusion - in GCC CVS. - -2003-05-23 Arnaud Desitter - Canqun Yang - - * resolve.c (compare_bound_int, resolve_where_shape): Proper return - type. - (g95_find_forall_index): Return proper value. - (g95_resolve_assign_in_forall, g95_resolve_forall): Use proper type to - compare the return value from g95_find_forall_index. - -2003-05-23 Arnaud Desitter - * g95.h, io.c (g95_st_label): Remove "length". - (g95_symtree): Remove "link". - (g95_case): Remove "code". - * arith.c, arith.h (g95_compare_string, g95_convert_integer, - g95_convert_real): Make an argument pointer to const. - * decl.c (colon_seen): Add a TODO. - * interface.c (g95_compare_types): Fix typo. - * interface.c (compare_interfaces): Preserve value of "p". - * intrinsic.c (sort_actual): Remove "i". - * match.c (g95_match_assign): Proper type in call to g95_match(). - * parse.c (next_free): Avoid duplicate call due to macro. - * parse.c (check_statement_label): wrong type in call to g95_error. - * primary.c (match_real_constant): Add a TODO. - * resolve.c (resolve_select): Remove useless conditional. - * simplify.c (g95_simplify_repeat): Proper assignment to - "value.character.string". - * simplify.c (g95_simplify_reshape): Wrong variable in call to - g95_error. - -2003-05-20 Canqun Yang - - * trans-stmt.c: Remove unnecessary include file defaults.h. - -2003-05-19 Lifang Zeng - - * trans-stmt.c (g95_trans_forall_loop): Handle FORALL with negative - stride. - (g95_trans_forall): Allow arbitrary number of FORALL indexes and - actual variables used as FORALL indexes. - -2003-05-15 Paul Brook - - * trans-array.c (g95_trans_static_array_pointer): Use - null_pointer_node. - (g95_trans_deferred_array): Initialize static array pointers. - * trans-expr.c (g95_conv_function_call): Use formal arglist to - correctly pass POINTER and absent CHARACTER arguments. - -2003-05-14 Lifang Zeng - - * resolve.c (g95_resolve_forall): Resolve FORALL construct/statement. - (g95_resolve_forall_body): Resolve FORALL body. - (g95_resolve_where_code_in_forall): Resolve WHERE inside FORALL. - (g95_resolve_assign_in_forall): Resolve assignment inside FORALL. - (g95_find_forall_index): Check whether the FORALL index appears in - the expression or not. - (resolve_code): Modified. - -2003-05-14 Paul Brook - - * iresolve.c (g95_resolve_spread): Convert ncopies to index_type. - -2003-05-13 Paul Brook - - * trans-types.c (g95_max_array_element_size): Now a tree node. - (g95_init_types): Work out max size properly. - (g95_get_dtype_cst): Modify to match. - -2003-05-11 Paul Brook - - * trans-io.c (add_case): Create a label decl for case labels. - -2003-05-11 Paul Brook - - * arith.c (g95_integer_index_kind): New variable. - * f95-lang.c (g95_init): Move frontend initialization here ... - (g95_post_options): ... from here. - * g95.h (g95_index_integer_kind, g95_resolve_index): Declare. - * intrinsic.c (add_functions): Use index kinds. - * iresolve.c: Convert to index_kind where needed. - * resolve.c (g95_resolve_index): Make public, use index_kind. - (resolve_array_ref): Adjust to match. - * trans-array.c: Rename g95_array_index_kind to g95_index_integer_kind. - * trans-stmt.c: Ditto. - * trans-types.c: Ditto. - * trans-types.h (g95_array_index_kind): Remove declaration. - * trans-expr.c (g95_conv_expr_present): Use null_pointer_node. - -2003-05-07 Paul Brook - - * trans-const.c (g95_conv_mpz_to_tree): Typecast constant. - * trans-intrinsic.c (g95_conv_intrinsic_bound): Convert type - of bound indices. - -2003-05-07 Paul Brook - - * trans-array.c (trans_static_array_pointer, - g95_trans_array_constructor_value, g95_conv_array_initializer, - g95_conv_structure): CONSTRUCTOR nodes only have one operand. - (g95_add_loop_ss_code): Convert subscripts to the correct type. - * trans-stmt.c (g95_trans_character_select): Ditto. - * trans-types.c (g95_init_types): Ditto. - -2003-05-07 Steven Bosscher - - * f95-lang.c (expand_function_body): Use input_line, not lineno. - * trans-decl.c (g95_generate_function_code, - g95_generate_constructors): Likewise. - * trans.c (g95_trans_runtime_check, g95_add_block_to_block, - g95_get_backend_locus, g95_set_backend_locus, g95_trans_code): - Likewise. - -2003-05-07 Kejia Zhao - * trans-types.c (g95_get_derived_type): Fix bug for DERIVED type - with components point to the DERIVED type itself, and two DERIVED - type with components point to each other. - * trans-expr.c (g95_conv_componet_ref): Modified - -2003-05-07 Kejia Zhao - * trans-expr.c (g95_conv_expr): Translate EXPR_NULL into - null_pointer_node. - (g95_trans_pointer_assign): Implement Nullify. - -2003-05-01 Paul Brook - - * trans-array.c (g95_walk_function_expr): Cope with NULL esym. - * trans-decl.c (g95_get_symbol_decl): Don't mangle dummy functions. - -2003-05-01 Paul Brook - - * trans-array.c, trans.c, trans-expr.c, trans-intrinsic.c, - trans-stmt.c: Replace empty_stmt_node with build_empty_stmt () and - IS_EMPTY_STMT. - -2003-05-01 Canqun Yang - - * trans-stmt.c (g95_trans_integer_select): Add a parameter to build - CASE_LABEL_EXPR. - -2003-04-28 Paul Brook - - * iresolve.c (g95_resolve_transpose): COMPLEX types are twice as big - as their kind suggests. - (g95_resolve_reshape): Ditto. - -2003-04-28 Chun Huang - - * trans-expr.c (g95_conv_substring_expr): New function. - (g95_conv_expr): Use it. - -2003-04-28 Paul Brook - - * iresolve.c (g95_resolve_transpose): Make it match the - implementation. - * trans-intrinsic.c (g95_is_intrinsic_libcall): Add TRANSPOSE. - -2003-04-18 Steven Bosscher - - * trans-types.c (g95_add_field_to_struct): New function to - add a field to a UNION_TYPE or RECORD_TYPE. - * trans-types.h (g95_add_field_to_struct): Prototype. - (g95_get_derived_type): Use g95_add_field_to_struct to add - components. - * trans-io.c (g95_add_field): Remove. - (ADD_FIELD): Use new g95_add_field_to_struct function. - (ADD_STRING): Likewise. - * trans-stmt.c (g95_trans_select): Likewise. - (g95_add_field): Remove duplicated function. - -2003-04-18 Canqun Yang - - Port implementation for CHARACTER SELECT from Andy's tree. - * trans-stmt.c (g95_trans_character_select): Implement character - select. (g95_add_field): New function. - * trans-decl.c: Declare 'gfor_gndecl_select_string'. - (g95_build_builtin_function_decls): Add 'gfor_fndecl_select_string'. - * g95.h (struct g95_case): Add field 'int n'. - * trans.h: Declare 'gfor_fndecl_select_string'. - -2003-04-18 Steven Bosscher - - * bbt.c (duplicate_key, g95_insert_bbt_with_overlap): Remove. - (g95_insert_bbd): Die on duplicates. - * g95.h (g95_insert_bbt_with_overlap): Delete prototype. - -2003-04-14 Steven Bosscher - - * g95.texi: Require GMP 4.0 -- like we actually - do. Explain the testsuite and what-goes-where. - Don't use undefined texinfo symbol. Break very - long line. Remove finished item from the list - of open projects. - -2003-04-11 Canqun Yang - - * trans-stmt.c (g95_evaluate_where_mask): Give mask temporaries - LOGICAL type. - -2003-04-10 Canqun Yang - - * trans-stmt.c (g95_trans_forall): Implement WHERE inside FORALL. - (g95_trans_forall_body): New function. - -2003-04-10 Canqun Yang - - * resolve.c (resove_where): New function. - (resolve_where_shape): New function. - (resolve_code): Add call to 'resolve_where' - * trans-stmt.c (g95_trans_where): Modified. - (g95_trans_where_2): New function. - (g95_trans_where_assign): New function. - (g95_evaluate_where_mask): New function. - (g95_add_to_stmt_list): New function. - (g95_get_temp_expr): New function. - * trans.h (where_stmt_list): New structure. - -2003-04-10 Paul Brook - - * g95spec.c (DEFAULT_SWITCH_TAKES_ARG): Remove. - (DEFAULT_WORD_SWITCH_TAKES_ARG): Ditto. - -2003-04-10 Steven Bosscher - - Update after mainline -> tree-ssa-branch merge. - * f95-lang.c (g95_mark_addressable): Update put_var_into_stack - call. - (g95_init): Update for new lang_hooks definition. - (g95_post_options): New langhook. - (LANG_HOOK_POST_OPTIONS): Clear, then define to g95_post_options. - * scanner.c (g95_new_file): Comment update. - -2003-04-09 Arnaud Desitter - - * g95.h, lang-options.h: Add -Wimplicit-interface. - * options.c (g95_init_options, g95_parse_arg): Set it. - * interface.c (check_intents): Warn about call with implicit - interface. - * resolve.c (resolve_unknown_f, resolve_unknown_s): Call - g95_procedure_use. - -2003-04-05 Paul Brook - - * iresolve.c (g95_resolve_spread): Don't resole based on type. - * trans-intrinsic.c (g95_is_intrinsic_libcall): Add G95_ISYM_SPREAD. - -2003-03-29 Paul Brook - - * iresolve.c (g95_resolve_pack): Don't bother resolving based on type. - (g95_resolve_unpack): Ditto. - * trans-intrinsic.c (g95_conv_intrinsic_merge): New Function. - (g95_conv_intrinsic_function): Use it. Remove PACK and UNPACK. - (g95_is_intrinsic_libcall): Add PACK and UNPACK. - -2003-03-25 Paul Brook - - * arith.c (g95_unary_user, g95_user): Remove dead functions. - * arith.h: Ditto. - * array.c (g95_free_array_ref): Ditto. - * g95.h: Ditto. - * symbol.c (g95_use_derived_tree): Ditto. - * intrinsic.c (add_functions): Use simplification for SCALE. - * primary.c (g95_match_rvalue): Test sym, not symtree. - -2003-03-25 Paul Brook - - * trans-decl.c (build_function_decl): Add parameter before it gets - turned into a constant. - * iresolve.c (g95_resolve_eoshift): Resolve to a useful name. - * trans-intrinsic.c (g95_is_intrinsic_libcall): Add G95_ISYM_EOSHIFT. - * trans-decl.c (g95_create_module_variable): Don't pushdecl constants. - -2003-03-22 Paul Brook - - * trans-array.c (g95_conv_array_initializer): Allow scalar - expressions. - * trans-decl.c (g95_finish_var_decl): Result variables are not - module variables. - * trans-intrinsic.c (g95_conv_intrinsic_transfer): New function. - (g95_conv_intrinsic_function): Use it. - * trans-types.h (g95_type_spec): Remove dead declaration. - -2003-03-21 Paul Brook - - * trans-decl.c (g95_build_function_decl): Mark string parameters. - -2003-03-20 Paul Brook - - * trans-decl.c (g95_build_function_decl): Put character length - parameters at the end of the function declaration. - * trans-expr.c (g95_conv_function_call): Ditto. - * trans-types.c (g95_get_function_type): Ditto. - -2003-03-20 Arnaud Desitter - - * resolve.c (resolve_formal_arglist): Don't impose intent for - procedure arguments of pure functions. - (resolve_select): Remove redundant assignment. - -2003-03-19 Arnaud Desitter - - * arith.c (validate_logical), g95.h, options.c (g95_init_options): - Remove option l1. - * g95.h, intrinsic.c(g95_get_intrinsic_sub_symbol): Add const. - * iresolve.c(g95_resolve_cpu_time, g95_resolve_random_number): Add - const. - * lang-options.h: Remove -finline-repack-arrays. Add -fg77-calls. - Order list. - * symbol.c (g95_add_type): Fix typo in comment. - - -2003-03-16 Paul Brook - - * dump-parse-tree.c (g95_show_code_node): Print resolved sym name. - * expr.c (g95_build_call): Remove. - * f95-lang.c (puchdecl_top_level): New function. - * g95.h (g95_code): Store resolved symbol, not just the name. - * intrinsic.c (g95_intrinsic_namespace): New global namespace. - (g95_intirinsic_init_1, g95_intrinsic_done_1): Use it. - (g95_get_intrinsic_sub_symbol): New function. - * iresolve.c (g95_resolve_cpu_time): Use it. - (g95_resolve_random_number): Ditto. - * resolve.c: Set code->resolved_sym instead of code->sub_name. - * trans-decl.c (g95_get_extern_function_decl): Give external decls - the correct DECL_CONTEXT. Add global symbold to the global scope. - * trans-stmt.c (g95_trans_code): Remove hacks now the fronted is - fixed. - -2003-03-16 Paul Brook - - * g95.h (g95_option_t): Add g77_calls. Remove inline_repack_arrays. - * options.c (g95_parse_arg): Ditto. - * module.c (mio_symbol_attribute): Handle the always_explicit bit. - * resolve.c (resolve_formal_arglist): The always_explicit sould be set - for the procedure, not the parameter. - * trans-array.c (g95_trans_g77_array): New function. - (g95_trans_assumed_size): Use it. - (g95_trans_dummy_array_bias): Ditto. - (g95_conv_array_parameter): Handle g77 arrays. Move existing body ... - (g95_conv_expr_descriptor): ... to here. Update callers. - * trans-decl.c (g95_build_dummy_array_decl): Handle g77 arrays. - (g95_get_symbol_decl): Avoid processing g77 arrays multiple times. - * trans-expr.c (g95_conv_function_call): Handle g77 arrays. - * trans-intrinsic.c (g95_get_symbol_for_expr): Never use g77 arrays. - * trans-types.c (g95_is_nodesc_array): Handle g77 arrays. - (g95_sym_type): Ditto. - -2003-03-15 Paul Brook - - * trans-array.c (g95_walk_elemental_function_args): Don't amputate the - first chain. - * trans-expr.c (g95_conv_function_call): Use the resolved symbol. - -2003-03-14 Paul Brook - - * trans-array.c (g95_array_is_packed): Remove. - (g95_conv_array_base): Correctly handle all descriptorless cases. - (g95_conv_array_stride): Use descriptorless strides. - (g95_trans_dummy_array_bias): Don't always repack the array. - (g95_build_dummy_array_decl): Automatic dummy arrays are only partial - packed. - * trans-types.c (g95_get_nodesc_array_type): Differentiate between - dummy and non-dummy arrays... - (g95_sym_type, g95_get_derived_type): ... like these. - (g95_get_array_type_bounds): Allow discontiguous arrays. - -2003-03-12 Paul Brook - - * array.c (g95_resolve_array_spec): Fix comment. - * g95.h (symbol_attributes): New flag always_explicit. - * resolve.c (resolve_formal_arglist): Set it always_explicit. - * iresolve.c (g95_resolve_lbound, g95_resolve_ubound): Simplify. - * trans-array.c (g95_conv_descriptor_dimension): Remove dead assert. - (g95_trans_array_bounds): Allow assumed shape arrays. - (g95_trans_repack_array): Remove. - (g95_trans_dummy_array_bias): Rewite to use descriptorless arrays. - * trans-decl.c (g95_build_qualified_array): Only ignore absent - bounds for assumed size arrays. - (g95_build_dummy_array_decl): Use descriptorless arrays. - * trans-expr.c (g95_conv_expr_present): Allow descriptorless arrays. - (g95_trans_pointer_assign): Fix typo. - * trans-intrinsic.c (g95_conv_intrinsic_function_args): Remove dead - code. - (g95_conv_intrinsic_bound): Rewrite to handle descriptorless arrays. - * trans-types.c (g95_get_nodesc_array_type): Allow non-packed arrays. - Also modify callers. - * trans-types.h (g95_get_nodesc_array_type): Modify prototype. - -2003-03-08 Paul Brook - - * trans-array.c (g95_walk_elemental_functions): Don't reverse the SS. - (g95_conv_array_ubound): Provide dummy value for assumed size arrays. - * resolve.c (compare_spec_to_ref): Allow full array sections. - -2003-03-08 Paul Brook - - * expr.c (g95_simplify_expr): Also simplify array index and - substring expressions. - * resolve.c (compare_spec_to_ref): Check for assumed size bounds. - * trans-array.c (g95_trans_array_bounds): New function. - (g95_trans_auto_array_allocation): Use it. - (g95_trans_assumed_size): Rewrite. - * trans-decl.c (gfor_fndecl_in_pack, gfor_fndecl_in_unpack): Declare. - (gfor_fndecl_repack): Remove. - (g95_build_qualified_array): Handle absent upper bounds. - (g95_build_dummy_array_decl): Assumed shape arrays are descriptorless. - (g95_get_symbol_decl): Update. - (g95_build_intrinsic_function_decls): Initialize new decls. - * trans.h (gfor_fndecl_in_pack, gfor_fndecl_in_unpack): Declare. - (gfor_fndecl_repack): Remove. - * trans-io.c (g95_build_io_library_fndecls): Correct prototypes. - * trans-types.c: (g95_build_array_type): Merge duplicated code.. - (g95_get_nodesc_array_type): Handle absent bounds. - * trans-types.h (g95_get_nodesc_array_type): Declare. - -2003-03-04 Paul Brook - - * f95-lang.c (DEF_FUNCTION_TYPE_VAR_3): Define before including - builtin-types.def. - -2003-03-02 Paul Brook - - * options.c (g95_init_options): Drfault to 1. - (g95_pasrse_arg): Add -frepack-arrays, use strcmp. - * trans-array.c (g95_conv_array_data, g95_conv_array_base, - g95_conv_array_stride,g95_conv_array_lbound, g95_conv_array_ubound): - Handle non-constant size automatic arrays. - (g95_conv_section_upper_bound, g95_conv_section_startstride): Use - generic bound functions. - (g95_trans_auto_array_allocation): Don't create a descriptor. - (g95_trans_assumed_size): New function (broken). - (g95_trans_dummy_array_bias): Remove unused var. - * trans-array.h (g95_trans_assumed_size): Declare. - * trans-decl.c (create_index_var): New fuction. - (g95_build_qualified_array): New function. - (g95_get_symbol_decl): Use it. - (g95_trans_deferred_vars): Handle assumed shape seperately. - * trans-types.c (get_element_type): Handle heap allocated arrays. - (g95_is_nodesc_array): Include non-const size arrays. - (g95_get_nodesc_array_type): Ditto. - -2003-02-23 Paul Brook - - * trans-array.c (g95_array_init_size): Should use stride, not size of - last dimension. - -2003-02-18 Paul Brook - - * trans-expr.c (g95_trans_arrayfunc_assign): Nove elemental check - after intrinsic function check. - -2003-02-18 Arnaud Desitter - - * io.c (match_io): Fix missing return value and remove useless - assignment. - * match.c (g95_match): Remove useless assignment. - * module.c (parse_string): Remove useless post increment. - * simplify.c (g95_simplify_verify): Remove useless assignment. - -2003-02-15 Paul Brook - - * expr.c (restricted_intrinsic): Handle bad values gracefully. - * g95.h (symbol_attribute): Add referenced member. - (g95_symbol): Add dummy_order member. - (g95_set_sym_referenced): Declare. - * match.c (g95_match_assignment, g95_match_call): Use it - * primary.c (match_actual_arg, g95_match_rvalue, - g95_match_variable): Ditto. - * symbol.c (next_dummy_order): New variable. - (g95_set_sym_referenced): New function. - (check_done): New function. - (g95_add_*): Use it. - * trans-decl.c: Make formatting conform to GCC standards. - (g95_defer_symbol_init): Add dummy variables in the right order. - (g95_get_symbol_decl): Only accept referenced variables. - (g95_create_module_variable): Module variables are always required. - (generatr_local_decls): New function. - (generate_local_vars): New function. - (g95_generate_function_code): Use it. - -2003-02-13 Paul Brook - - * trans-decl.c (g95_conv_struct_cons): Remove. - (g95_get_symbol_decl): Use g95_conv_expr for structure initializers. - * trans-expr.c (g95_conv_structure): New function. - (g95_conv_expr): Use it. - -2003-02-09 Paul Brook - - * trans-array.c (g95_array_init_size): Don't evaluate the linit - expressions multiple times. - (g95_trans_auto_arry_allocation): Use pointer not tmp. - -2003-02-08 Paul Brook - - * module.c (mio_symtree_ref): Declare as static. - (mio_expr): Remove dead code. - (read_module): Set the symtree link for fixups. - * trans-intrinsic.c (g95_conv_intrinsic_round): Rename... - (build_round_expr): ... to this. - (g95_conv_intrinsic_aint): New function. - (g95_conv_intrinsic_function): Use it. - -2003-02-08 Paul Brook - - * trans-array.c (g95_trans_array_constructor_value): Use the acutal - offset after modificaton, not the increment expression. - * dependency.c: Kill excess whitespace. - -2003-02-07 Sanjiv Gupta - - * dependency.h: Remove some function declarations. - * dependency.c (get_no_of_elements): Change this function not to - return int. - * other: Add comments for all modified functions. - -2003-02-06 Paul Brook - - * g95spec.c (lang_specific_functions): Fix initializer warning. - * dump-parse-tree.c (g95_show_expr): Use typespec instead of symtree - for structure type names. - * trans-decl.c (g95_cons_structure_cons): New function. - (g95_get_symbol_decl): Use it. - * trans-expr.c (g95_conv_component_ref): Remove duplicate pointer - referencing code. - -2003-02-06 Arnaud Desitter - - * resolve.c (compare_cases): Add const to casts. - -2003-01-30 Arnaud Desitter - - * g95.h (g95_check_f): Change a1 to f1m. - * intrinsic.c (add_sym_1m, check_specific, - g95_intrinsic_func_interface): Use it. - - * module.c (init_pi_tree): Remove useless cast. - (fp2): Fix argument type. - - * parse.c (parse_select_block): Add comment. - -2003-02-05 Toon Moene - - * lang-options.h: Fix warning involving C90 concatenated - strings. - -2003-02-06 Steven Bosscher - Arnaud Desitter - - * io.c (format_asterisk): Complete initializer to kill warning. - * arith.c (DEF_G95_INTEGER_KIND, DEF_G95_LOGICAL_KIND, - DEF_G95_REAL_KIND, MPZ_NULL, MPF_NULL): New #defines. - (g95_integer_kinds, g95_logical_kinds, g95_real_kinds): Use the - new defines to complete initializers. Kills all warnings. - - * Make-lang.in: Comment cleanup. - -2003-02-05 Paul Brook - - * array.c (g95_free_constructor): Handle NULL expressions. - * resolve.c (resolve_structure_cons): Ditto. - * decl.c (g95_match_null): New Function. - (variable_decl): Use it. - * module.c (mio_expr): Don't bother saving symtree for EXPR_STRUCTURE. - * primary.c (g95_match_runtime): Don't use symtree for EXPR_STRUCTURE. - * trans-types.c (g95_set_decl_attributes): Remove empty function. - -2003-02-05 Paul Brook - - * trans.h (build1_v): New macro. - (build_v): Remove pointless and incorrect prototype. - * various: Use build1_v for GOTO_EXPR and LABEL_EXPRs. - * f95-lang.c (g95_init_builtin_decls): DEF_BUILTIN takes 10 args. - -2003-02-01 Steven Bosscher - - * Make-lang.in (F95_OBJS): Remove one more dead file. - -2003-02-01 Paul Brook - - * lang-specs.h: Don't pass -ffixed-form to the linker. - * trans-decl.c (g95_generate_function_code): Clear saved decl chain. - -2003-02-01 Paul Brook - - * Make-lang.in (F95_OBJS): Remove dead files. - * trans-array.c (g95_array_init_size): Do the right thing when - ubound=NULL. - * trans-decl.c (g95_generate_function_code): Initialize deffered - symbol list before translating contained subroutines. - * trans-expr.c (g95_conv_expr, g95_conv_expr_reference): Substitute - scalar invariant values here... - (g95_conv_variable, g95_conv_function_call): ... instead of here ... - * trans-intrinsic.c (g95_conv_intrinsic_function_args): .. and here. - -2003-01-29 Paul Brook - - * trans-array.c (g95_add_loop_code): Put pre code in the right block. - (g95_walk_elemental_function_args): Reverse chains before adding. - (g95_reverse_ss): Move about a bit. - * trans-expr.c (g95_conv_function_call): Handle scalar intrinsic - function arguments. - -2003-01-28 Paul Brook - - * intrinsic.c (resolve_intrinsic): Use correct union member. - * trans-array.c (g95_trans_dummy_array_bias): Don't touch absent - parameters. - * trans-decl.c (g95_get_symbol_decl): Don't translate initializers for - use associated variables. - * trans-intrinsic.c (g95_conv_intrinsic_present): Move body ... - * trans-expr.c (g95_conv_expr_present): ... to here. - * trans.h: Declare it. - * trans-types.c (g95_sym_type): Assume subroutine if not specified. - -2003-01-28 Arnaud Desitter - - * array.c (expand_iterator): Suppress useless assignment. - * decl.c (match_char_spec): Ditto. - * io.c (match_io_iterator): Ditto. - * primary.c (match_real_constant): Ditto. - * interface.c (fold_unary, g95_free_interface, g95_extend_expr): - Ditto. Also, use g95_intrinsic_op not int for intrinsic operators. - * matchexp.c (match_add_operand, match_level_5): Likewise. - * module.c (parse_atom, find_enum): Likewise. - * resolve.c: move #include - (resolve_select): Fix serious typo. - -2003-01-28 Steven Bosscher - - * Make-lang.in: Don't build with broken tree-ssa-pre. - -2003-01-28 Steven Bosscher - - * resolve.c (resolve_index): Add a TODO. - * symbol.c: Remove useless "#include ". - -2003-01-27 Paul Brook - - * check.c (check_rest): Allow different type kinds as an extension. - * g95.h (g95_resolve_f): Add f1m. - * intrinsic.c (add_sym_1m, resolve_intrinsic): Use it. - * intrinsic.h: Chenge prototypes for MIN and MAX. - * iresolve.c (g95_resolve_minmax): New function. - (g95_resolve_min, g95_resolve_max): Use it. - * trans-intrinsic.c (g95_trans_intrinsic_minmax): Only evaluate - arguments once. - (g95_conv_intrinsic_present): Fix logic. - -2003-01-27 Steven Bossche - - * g95.h (g95_case): Don't be a tree, be a double linked list. - * match.c (match_case_selector): Remove redundant semantics check. - Clean up a few goto's to make it a tiny little bit faster. - * resolve.c (case_tree): Die. - (compare_cases): Accept and compare unbounded cases too. - (check_case_overlap): Don't build a tree. Instead, merge-sort the - whole list of g95_cases passed from resolve_select. - (sane_logical_select): Die. - (check_case_expr): Return FAILURE if a CASE label is of the wrong - type kind. - (resolve_select): Fixup case expression for computed GOTOs, put it - in expr, not expr2, for easier handing in the parse tree dumper and - the code generator. Rewrite the rest of the function: Kill - unreachable case labels and unreachable case blocks. - * dump-parse-tree.c (g95_show_code_node): Always dump expr for - an EXEC_SELECT, not case2 anymore. - * trans-const.c (g95_conv_constant_to_tree): New function. - (g95_conv_constant): Use it. - * trans-const.h: Declare prototype for the new function. - * trans-stmt.c (g95_trans_integer_select, g95_trans_logical_select, - g95_trans_character_select): New static functions. - (g95_trans_select): Rewrite. - -2003-01-26 Paul Brook - - * intrinsic.c (add_fnctions): Properly add dreal. - * trans-intrinsic.c (g95_conv_intrinsic_present): New function. - (g95_conv_intrinsic_function): Use it. - * trans-io.c (build_dt): Abort on internal files (unimplemented). - -2003-01-26 Paul Brook - - Widespread changes to the handling of symbols in expressions. These - are now linked via g95_symtree nodes. - * parse.c (g95_fixup_sibling symbols): New function. - (parse_contained): Use it. - * g95.h (symbol_attribute): Add contained. Indicates a symbol is a - contained procedure that has bee correctly fixed up. - (g95_code, g95_expr): Point to a g95_symtree, not a g95_symbol. - -2003-01-24 Paul Brook - - * trans-array.c (g95_walk_expr): Function result attributes are in - sym->result. - * trans-expr.c (g95_conv_function_call, - g95_trans_arrayfunc_assign): Ditto. - * trans-decl.c (g95_get_symbol_for_expr): Set sym->result. - -2003-01-23 Steven Bosscher - - * expr.c (check_restricted): Fix error message. - * symbol.c (free_st_labels): Plug memleak. - -2003-01-22 Steven Bosscher - - * arith.c (reduce_unary, reduce_binary_ac, reduce_binary_ca, - reduce_binary_aa, reduce_binary, eval_intrinsic, - eval_intrinsic_f2): Use typesafe prototypes for eval functions. - * g95.h (g95_check_f, g95_simplify_f, g95_resolve_f): New unions - for typesafe intrinsics helper functions. - (g95_intrinsic_sym): Use them. - * intrinsic.c (do_check, add_sym, add_sym_0, add_sym_1, - add_sym_1s, add_sym_1m, add_sym_2, add_sym_3, add_sym_4, - add_sym_5, add_conv, resolve_intrinsic, do_simplify, - check_specific, g95_intrinsic_func_interface, - g95_intrinsic_sub_interface): Adjust all calls to intrinsics - helper functions. - * trans-decl.c (g95_get_extern_function_decl): Likewise. - * Make-lang.in: Don't disable warnings for strict prototypes - any longer, everything is typesafe now. - -2003-01-22 Steven Bosscher - - * bbt.c (duplicate_node): Make static. - * module.c (module_name): Make static. - * scanner.c (include_dirs): Make static. - -2003-01-20 Steven Bosscher - - Hard coded _gfor_'s should not show up anymore. - * g95.h (PREFIX): New macro. - * iresolve.c (g95_resolve_cpu_time): Use PREFIX, not - hard-coded "_gfor". - (g95_resolve_random_number): Likewise. - * trans-decl.c (g95_build_intrinsic_function_decls): Likewise. - * trans-io.c: Remove 'prefix' macro. Replace all uses with - the new PREFIX macro from g95.h. - -2003-01-20 Steven Bosscher - - The troubles of forking... Andy implemented this just now too. - Let's stick to that and keep the trees close. - * g95.h (g95_st_label): 'format' member is now a g95_expr. - * io.c: Revert previous changes. - (g95_match_format): Match the format string as a character - literal expression. - * match.h (g95_statement_label): Declare external. - * parse.c: Revert previous changes. - * symbol.c (g95_free_st_label): Free a g95_expr instead - if a 'char *'. - * trans-io.c: Revert previous changes. - (build_dt): Use set_string to set the format string. - -2003-01-20 Steven Bosscher - - * io.c (format_string): Make non-static. - (g95_match_format): Remember the format string. - (terminate_io): Add I/O termination for empty I/O lists. - * match.h: Declare external format_string. - * parse.c (check_statement_label): Attack the format string - to a format label for FORMAT statements. - * trans-io.c (g95_add_field): Define prefix macro. Replace - all uses of PREFIX define with a use of this macro. - (build_dt): Implement formatted I/O for format labels. - -2003-01-20 Steven Bosscher - - * lang-options.h: Kill "-std=F". - * options.c: Remove unimplemented "-std=F". Modify - web address. - * misc.c (g95_terminal_width): New function. - * error.c (g95_error_init_1): Use g95_terminal_width. - * g95.h: Add prototype for g95_terminal_width, remove - fmode flag. - -2003-01-19 Steven Bosscher - - * Make-lang.in: Fix typo. - -2003-01-18 Steven Bosscher - - * g95.h (struct g95_case): Remove unused cruft, new member - 'where' to keep track of the locus of the default case. - * match.c (g95_match_case): Add locus to the current case. - (match_case_selector): Likewise. - * parse.c (parse_select_block): Move semantics check for - multiple DEFAULT cases out of here to... - * resolve.c (check_case_overlap): ...here. Return sooner - when possible. - (check_case_expr): Take two g95_cases now, use to sure the - expression kinds are the same. - (resolve_select): Cleanup. - -2003-01-18 Paul Brook - - * trans-io.c: Fix typos in ported IO work (set_fla[tg]). - * trans-decl.c (g95_set_symbol_decl): Handle non-array result - variables. - (g95_get_extern_function_decl): Put decls in the correct context. - -2003-01-18 Steven Bosscher - - * trans-io.c: Port changes from Andy to set ERR flag. - -2003-01-17 Paul Brook - - * trans-array.c: Add various comments. - (g95_ss_terminator): Declare as const. - (g95_walk_expr): Remove first parameter and update all callers. - (g95_walk_op_expr): Initialize scalar SS properly. - * trans-array.h (g95_walk_expr): Update prototype. - * trans-expr.c: Update for new g95_walk_expr. - * trans-intrinsic.c: Ditto. - * trans-io.c: Ditto. - * trans.h: Various comments for SS chains. - -2003-01-17 Paul Brook - - * intrinsic.h (g95_generic_isym_id): Add G95_ISYM_S?_KIND, SPACING - and RRSPACING. - * intrinsic.c (add_functions): Use them. - * trans-intrinsic.c (g95_conv_intrinsic_function): Ditto. - * trans-expr.c (g95_conv_expr_lhs): Abort on impossible error. - -2003-01-17 Steven Bosscher - - Fallout of a small merge conflict: - * intrinsic.c: Un-revert lost patch (G95_ISYM_SCALE). - -2003-01-17 Steven Bosscher - - * initrinsic.c: New add_sym_* functions for strong typing. - (add_conv): Make prototype strict. - * dump-parse-tree.c, dependency.c: Include config.h - * resolve.c, trans-io.c: Fix typos. - -2003-01-17 Steven Bosscher - - * dump-parse-tree.c (g95_show_code_node): Show the - condition for a computed GOTO that was transformed - to a SELECT CASE construct. - * resolve.c (check_case_overlap): Revert previous switch - to treaps, it was too slow and didn't catch all trouble. - (resolve_symbol): Be more flexible about module procedures. - * symbol.c (check_conflict): Point to relevant section in - the standard for dubious conflict. Allow procedure - dummy arguments to be optional again. - * trans-io (add_field): Rename to g95_add_field. Change - all callers. - * trans-stmt (trans_select): Handle unbounded cases for - integer SELECT CASE constructs. Fix/add more comment. - -2003-01-17 Steven Bosscher - - * g95.h: Uses GCC's function attribute macros. - * error.c, module.c, parse.c, g95.h: More function attributes. - -2003-01-16 Steven Bosscher - Forgot a file... - * trans-decl.c (get_label_decl): Use TREE_LINENO instead - of DECL_SOURCE_LINE, and TREE_FILENAME instead of - DECL_SOURCE_FILE. - -2003-01-16 Steven Bosscher - - * f95-lang.c (pushdecl): Use TREE_LINENO instead of - DECL_SOURCE_LINE. - * trans.c (g95_trans_code): Use annotate_all_with_file_line - instead of nowdead wrap_all_with_wfl. - -2003-01-14 Steven Bosscher - - * parse.c (g95_parse_file): In verbose mode, dump the parse tree - before generating code, so we can still see it even if the code - generation phase dies. - -2003-01-14 Steven Bosscher - - * decl.c (build_sym): Split out initialization expression parts... - (add_init_expr_to_sym): ...to here. - (variable_decl): Add the symbol following an attribute list to the - symbol tree before parsing the optional initialization expression - if the symbol is not of a derived type. - * primary.c (g95_match_rvalue): Don't assume a symbol always has - a value if it is a PARAMETER. - -2003-01-14 Steven Bosscher - - * misc.c: Don't #include - * module.c: Ditto. Kill uses of mtrace, muntrace. If there - ever was a glibc bug, then either this was never reported to - glibc people, or it has been fixed for so long that there's - no information you can find about it, anywhere. - -2003-01-14 Steven Bosscher - - Fix warnings: - * module.c (attr_bits, bt_types, array_spec_types): - Switch 'const' and 'static'. - * iresolve.c (g95_resolve_reshape): Make __resolve0 non-'const'. - - GNU'ify source code: - * trans-io.c: Numerous fixes, one fixed warning and a few - TODO markers so that we don't forget about them. - -2003-01-13 Paul Brook - - * intrinsic.c (add_functions): Add G95_ISYM_SCALE. - * intrinsic.h (g95_generic_isym_id): Remove bogus G95_ISYM_ANINIT. - Add G95_ISYM_SCALE. - * trans-intrinsic.c (g95_conv_intrinsic_function): Ditto - * match.c (g95_match_stop): Fix dumb == -> != error. - -2003-01-13 Steven Bosscher - - * dump-parse-tree.c (show_indent): Add line breaks. This - whole dumping process needs cleanups. - * f95-lang.c (g95_mark_addressable): Fix prototype to match - the langhook. Fix 'return's accordingly. - * g95-support.h: Adjust prototype. - * g95.h: Add 'no_backend' member to 'g95_option_t' struct. - * lang-options.h: Add '-fsyntax-only'. - * options.c (g95_init_options): Init 'no_backend'. - (g95_parse_arg): Deal with '-fsyntax-only'. - * parse.c (g95_parse_file): Do not generate code if 'no_backend' - is set. - -2003-01-13 Steven Bosscher - Patch from Arnaud - * resolve.c (resolve_symbol): Assumed shape arrays must be dummy - arguments. Also make sure that if a symbol is marked INTRINSIC, - an intrinsic with the symbol's name actually exists. - (check_conflict): Make EXTERNAL and DIMENSION attributes conflict. - Do not allow PROCEDURES to have the SAVE, POINTER, TARGET, - ALLOCATABLE, RESULT, IN_NAMESPACE, OPTIONAL or FUNCTION attribute. - -2003-01-13 Steven Bosscher - - * resolve.c (resolve_contained_functions): Fix condition, don't - throw internal_error if a child namespace has no name. Apparently - this can be the case? - -2003-01-11 Paul Brook - - Port changes from Andy's tree: - * g95.h (g95_code): Add stop_code. - * match.c (g95_match_stop): Detter syntax checking. - * resolve.c (resolve_generic_f0): Return match type. - (resolve_generic_f): Remove dead/duplicated code. - (resolve_specific_f): Ditto. - * dump-parse-tree.c (g95_show_code_node): Handle new STOP format. - * trans-decl.c (gfor_fndel_stop_*): New fndecl nodes. - * trans-stmt.c (g95_trans_stop): Handle new STOP format. - -2003-01-11 Paul Brook - - * trans-array.c: Various documentation/comment changes. - * trans-stmt.c: Ditto. - - -2003-01-10 Paul Brook - - * options.c/h: Add -fdump-parse-tree as alias of -v. - -2003-01-10 Steven Bosscher - - * dump-parse-tree.c (g95_show_namespace): Fixed another - typo. Sorry, it's Friday... - -2003-01-10 Steven Bosscher - - Spotted by Tobi: - * trans-array.c, trans-array.h, trans.c, trans-const.c, - trans-const.h, trans-decl.c, trans-expr.c, trans.h - trans-intrinsic.c, trans-io.c, trans-stmt.c, trans-stmt.h - trans-types.c: Fix bogus copyright years, add 2003. - * trans-types.h: Give copyright header. - -2003-01-10 Steven Bosscher - - * dump-parse-tree.c (g95_show_namespace): Fixed typo. - * expr.c, options.c, scanner.c: Add some more 'const' markers. - * intrinsic.c: Some constant strings moved to read-only memory. - * io.c (format_asterisk): Move to... - * g95.h: ...here. - -2003-01-10 Steven Bosscher - - * dump-parse-tree.c (g95_show_namespace): Dump implicit - types for ranges instead of per-letter. Indent the - 'CONTAINS' just like everything else. - * resolve.c (resolve_contained_functions): Clarify comment. - Explain non-obvious conditional expression. Improve - diagnostics if tyoe cannot be resolved. - Port semi-fix from Andy's tree: - (was_declared): Move up before first use. - (generic_sym, specific_sym): New functions. Code moved - out if procedure_kind. - (procedure_kind): Simplify using new functions. - (resolve_generic_f): Make sure the functions we find in - a parent namespace is generic. - (resolve_specific_f): Ditto for specific functions. - -2003-01-10 Steven Bosscher - - * trans-stmt.c, trans.c: Fix some code style issues. Add - some more comment (but still not enough!). - -2003-01-10 Steven Bosscher - - * symbol.c (flavors, procedures, intents, acces_types, - access_types, ifsrc_types): Make const. - * misc.c (g95_string2code): Make 'm' param 'const'. - * module.c (find_enum, write_atom, mio_name): Make - 'm' param 'const'. - (attr_bits, bt_types, array_spec_types, array_ref_types, - ref_types, expr_types): Make const. - * g95.h: Adjust external decls. - -2003-01-09 Paul Brook - - * Testsuite: Add a load of new cases. - -2003-01-08 Steven Bosscher - - * Make-file.in: Add dependency on back end header files; - a parallel build should work now. - * f95-lang-c (lang_identifier): Remove bogus comment. - (g95_be_parse_file): Fix prototype. - (g95_init): Make static. - (g95_finish): Make static. - * error.c (g95_syntax_error): Kill. Make define in... - * g95.h (g95_syntax_error): Define. - (g95.options): Make 'source' member 'const'. - * interface.c (g95_match_interface): Explain - hard-to-read condition. - (g95_match_end_interface): Ditto. - * trans_const.c (g95_build_string_const): Make 's' parameter - 'const'. - * trans_const.h: Adjust protoype accordingly. - * trans-decl.c: Include tree-dump.h - (g95_generate_function_code): Build fixes for recent changes - in the tree-ssa branch. - -2003-01-08 Steven Bosscher - - * format.c: Kill, move code from here... - * io.c: ...to here. - * Make-lang.in: Adjust. - * MANIFEST: Ditto. - * match.h: Ditto. - * BUGS: Mention where to submit bugs. Move old content... - * TODO: ...to here. New file. - -2003-01-08 Steven Bosscher - Fix most warnings, and suppress the ones we can't fix for now. - * Make-lang.in: Suppress warnings about bad proto's in g95.h, - these warnings just clutter the screen and there's not much - we can do about them for now anyway. - * check.c, iresolve.c: Mark unused function parameters. - * dump-parse-tree.c (g95_show_array_spec): Punt on AS_UNKNOWN, - they should be resolved before they get here. - * error.c: Remove unused FILE *status_out. - * f95-lang.c (g95_init): Remove bogus cast. - * Many files: Make things 'const' where required. - * g95.h: Fix prototypes for all modified functions above. - (g95_options): Remove 'object' member. - -2003-01-07 Steven Bosscher - - * Make-file.in: Cleanup bogus targets. Add more comment. - * lang-options.h: New option '-w'. - * g95.h: add no_options field to struct g95_options. - * options.c (g95_init_options): Default no_warnings to off. - (g95_parse_arg): Recognise the '-w' switch and its alias, - '-fno-warnings'. - * error.c (g95_warning, g95_warning_now): Don't emit warning if - no_warning option is set. - * iresolve.c (g95_resolve_shape): Fix warning. - -2003-01-07 Steven Bosscher - - * primary.c (g95_next_string_char): Rename next_string_char, and - make static. Adjust callers accordingly. - * resolve.c (resolve_generic_f0): Return try, not match. Adjust - callers accordingly. - * g95.h: Split out all g95_match* functions to... - * match.h: ...here. New file. - * array.c, decl.c, expr.c, format.c, interface.c, io.c, match.c, - matchexp.c, module.c, parse.c, primary.c: Inlcude match.h - -2003-01-07 Steven Bosscher - - * symbol.c (g95_clear_new_implicit, g95_add_new_implicit_range, - g95_merge_new_implicit): New functions. - (g95_match_implicit_none, g95_match_implicit): Move from here... - * match.c (g95_match_implicit_none, g95_match_implicit): ... to here. - Modify to use the new functions in symbol.c. - * g95.h: Add and move prototypes. - -2003-01-06 Steven Bosscher - - * bbt.c (insert): Use a typedef'ed compare_fn prototype for the - node compare function. - (g95_insert_bbt): Likewise. - (g95_insert_bbt_with_overlap): Likewise. - (g95_delete_bbt): Likewise. - (delete_treap): Likewise. Also fix a potential bug when calling it. - * module.c (compare_pointers): Change proto to compare_fn. - (compare_integers): Likewise. - (compare_true_names): Likewise. - (find_true_name): Adjust call to compare_true_names to match proto. - (require_atom, write_atom, mio_name): Fix 'const' warnings. - (init_pi_tree): Make compare a compare_fn instead of (int *). - * resolve.c (compare_cases): Change proto to compare_fn. - * symbol.c (g95_compare_symtree): Change proto to compare_fn, make - it static, and rename to compare_symtree. - (delete_symtree, g95_undo_symbols, g95_new_symtree): Use renamed - function. - * g95.h: Kill g95_compare_symtree prototype. Adjust prototypes - of g95_insert_bbt, g95_insert_bbt_with_overlap, and g95_delete_bbt. - -2003-01-06 Steven Bosscher - * Make-lang.in: Fix spaces/tabs issues from previous patch. - * patch.options: Blow away Paul's checkin mistake :-) - * io.c (terminate_io): Fix memory leak (Arnaud). - -2003-01-06 Steven Bosscher - - * Make-lang.in: Teach about building DVI, info manual. - * g95.texi: New file. - -2003-01-02 Paul Brook - - * trans-array.c (g95_reverse_ss): Make static and don't use. - (g95_conv_ss_descriptor): Don't use g95_loopinfo - (g95_conv_array_parameters): Modify for pointer assignments. - (g95_walk_subexpr): New function. - (g95_walk_expr*): Use it. - * trans-array.h (g95_reverse_ss): Remove prototype. - * trans-expr.c (g95_trans_pointer_assign): Implement. - (Many): Set se.want_pointer before calling g95_conv_array_parameter. - * trans-intrinsic.c: Sync with scalarizer changes. - * trans-io.c: Ditto. - -2002-12-29 Paul Brook - - * trans-array.c: Document calling convention for arrays. - -2002-12-19 Paul Brook - - * trans-intrinsic.c (g95_conv_intrsinsic_function): Remove incorrect - assertion. Remove intrinsic subroutine G95_ISYM_* cases. Always pass - optional parameters for some intrinsics. - (g95_is_intrinsic_libcall): Add G95_ISYM_RESHAPE. - * trans-expr.c (g95_conv_function_call): Pass NULL for absent - optional parameters. - * trans.h (g95_se): Add ignore_optional flag. - -2002-12-15 Paul Brook - - * trans-array.c (g95_conv_array_parameter): Fix partial rank sections. - * trans-decl.c (g95_generate_function_code): Use TDI_original. - -2002-12-14 Paul Brook - - * trans-stmt.c (g95_trans_call): Use resolved symbol name. - -2002-12-12 Paul Brook - - * trans-array.c (g95_trans_array_constructor_subarray): Fully - initialize the scalarizer. - (various): Update to new format of g95_expr->value.constructor. - -2002-12-08 Paul Brook - - * trans-array.c (g95_put_offset_into_var): New function. - (g95_trans_array_constructor_subarray): New function. - (g95_trans_array_constructor_value): Use it. - (g95_array_cons_size): Don't abort() on array components. - -2002-12-08 Paul Brook - - * Make-lang.in (F95_ADDITIONAL_OBJS): Remove tree-dchain.o. - * support.c: Update #includes. - (statement_code_p, c_size_in_bytes, s_size_type_node): Remove. - * trans-array.c: Update #includes. - * trans.c: Ditto. - * trans-const.c: Ditto. - * trans-io.c: Ditto. - * trans-types.c: Ditto. - (g95_init_types): Set size_type_node. - * trans-decl.c: Update #includes. - (gfor_fndecl_adjust{l,r}): Declare and initialize. - * trans-stmt.c: Update #includes. - (g95_trans_do_while): Generate LABEL_EXPR, not GOTO_EXPR. - (g95_trans_select): Fix check for unbounded ranges. - * trans-expr.c: Update #includes. - (g95_conv_string_tmp): New function. - (g95_conv_concat_op): Use it. - * trans.h (g95_conv_string_tmp, gfor_fndecl_adjust{l,r}): Declare. - * Trans-intrisic.c: Update #includes. - (g95_conv_intrinsic_strcmp): New function. - (g95_conv_intrinsic_adjust): Ditto. - (g95_conv_intrinsic_function: Use them. - -2002-11-30 Paul Brook - - * trans-array.c (g95_walk_function_expr): Handle non-array return by - reference. - * trans-dec.c (g95_build_function_decl): Handle character return - parammeters. - (g95_get_fake_result_decl): Ditto. - (g95_trans_deferred_vars): Ditto. - * trans-expr.c (g95_conv_function_call): Ditto. - (g95_trans_arrayfunc_assign) Limit to array valued functions. - * trans-intrinsic.c (g95_conv_intrinsic_char): New function. - (g95_conv_intrinsic_function): Use it. - * trans-types.c (g95_sym_type): Handle functions returning strings. - (g95_return_by_reference): Ditto. - (g95_get_function_type): Ditto. - -2002-11-18 Paul Brook - - * trans-stmt.c (g95_trans_if): Fix IF statements when the condition - requires a temporary. - (g95_trans_select): Handle computed gotos. - * trans-types.c (g95_build_array_type): Warn about non-functional - assumed shape arrays. - * trans-expr.c (g95_trans_scalar_assign): Correctly handle post - blocks. - * trans-intrinsic.c (g95_conv_intrinsic_round): New function. - (g95_conv_intrinsic_int): New function. - (g95_conv_intrinsic_mod): New function. - (g95_conv_intrinsic_ichar): New function. - (g95_conv_intrinsic_function): Use them. - (g95_conv_intrinsic_dim): Use g95_evaluate_now. - -2002-11-17 Toon Moene - - * trans-types.c (g95_build_array_type): Assumed - sized arrays can have rank > 1. - * trans.c (g95_trans_code): Remove erroneous - warning about CONTINUE. - * trans-expr.c (g95_conv_variable): Remove - erroneous assert. - -2002-11-15 Paul Brook - - * trans-array.c (g95_conv_array_parameter): Check for NULL stride. - -2002-10-31 Paul Brook - - * f95-tree.c: Remove tree copying stuff that's now in gimple.c - * trans-expr.c (g95_conv_component_ref): Handle character string - components. - (g95_conv_string_parameter): Ditto. - * trans-types.c (g95_get_derived_type): Add length decl to caracter - string components. - -2002-10-10 Paul Brook - - * trans-decl.c (gfor_fndecl_size?): Declare and initialize. - * trans-expr.c (g95_conv_function_call): Remove unreliable return value - check. - * trans-intrinsic.c (g95_conv_intrinsic_size): New function. - (g95_conv_intrinsic_function): Handle size and shape intrinsics. - (g95_is_intrinsic_libcall): Add G95_ISYM_SHAPE. - * trans-types.c (pvoid_type_node): Declare and initialize. - * trans-array.c: Fix typo COMPONENT_REF->REF_COMPONENT - (g95_array_allocate): Fix when base==data. - (g95_conv_array_parameter): Correctly handle reduced rank sections. - * trans-io.c (g95_trans_write): Correctly handle string modifiers. - -2002-10-09 Paul Brook - - * (g95_conv_expr_reference): Handle character strings correctly. - -2002-10-07 Paul Brook - - (g95_expand_decl): Rename from f95_expand_decl_stmt and use as - langhook. - * trans-array.c (g95_build_array_initializer): Remove. - (g95_conv_array_initializer): New Function. - (g95_trans_auto_arry_allocation): Cleanup. - (g95_trans_init_character_array): Remove. - * g95spec.c: Link in libgforbegin. - * trans.c (g95_generate_code): Rename main function to MAIN__. - (g95_create_var): New function. - (g95_create_var_np): New function. - (g95_evaluate_now): New function. - (g95_start_block): New function. - (g95_finish_block): New function. - (g95_add_expr_to_block): New function. - (g95_add_block_to_block): New function. - * trans-expr.c (g95_conv_componen_ref): New function. - * Make-lang.in (F95_ADDITIONAL_OBJS): Add gimplify.o. - (F95_OBJS): Add dependency.o. - * f95-lang.c (g95_is_simple_stmt): Remove. - * f95-tree.c (mark_not_simple): New function. - (unshare_all_trees): New function. - (create_tmp_var, create_tmp_alias_var): Remove. - * support.c (declare_tmp_vars, tree_last_decl): Remove. - * trans*: Convert to new IR using GENERIC trees. Don't bother about - SIMPLE/GIMPLE rules, this is now done by Lang-independant code. - -2002-10-01 Paul Brook - - * trans-array.c: Add support for descriptorless arrays. - (g95_conv_array_data): New function. - (g95_conv_array_base): New function. - * trans-array.h: Declare these here. - * trans-decl.c(g95_create_mopdule_variable): Perform variable - initialization and creation here. - (g95_create_module_vars): Instead of here. - * trans.h (G95_TYPE_ARRAY_*: Rename from G95_TYPE_DESCRIPTOR_*. - * trans-intrinsic.c: Ditto. - * trans-types.c (g95_is_nodesc_array): New function. - (g95_get_nodesc_array_type): New function. - (g95_sym_type, g95_get_derived_type): Use them. - * trans-const.c (g95_conv_mpf_to_tree): Remove workaround. - -2002-09-28 Paul Brook - - * trans-const.c (g95_conv_mpf_to_tree): Work around backend bug. - * trans-intrinsic.c (g95_conv_intrinsic_abs): Correctly detect complex - parameters. - -2002-09-24 Paul Brook - - * f95-lang.c (listify): Remove declaration. - (expand_function_body): Use optimize >=1 instead of flag_tree_saa. - (listify) - * f95-tree.c (get_name): New function. - * trans.c (module_namespace): Remove. - * trans-decl.c: Use g95_chainon_list rather than chainon(listify()). - * trans-types.c: Ditto. - -2002-09-19 Paul Brook - - * trans-array.c (g95_get_array_cons_size): New Function. - (g95_con_ss_startstride): Handle Array constructors. - (g95_conv_loop_setup): Ditto. - (g95_conv_array_parameter): Ditto. - * tras-decl.c (g95_finish_var_decl): Make initializes variables - static. - -2002-09-19 Paul Brook - - * trans.c (g95_simple_fold_tmp): Detect variables inside - NON_LVALUE_EXPR. - * trans-stmt.c (g95_trans_arithmetic_if): Implement this. - -2002-09-18 Steven Bosscher - - * Make-lang.in (F95_ADDITIONAL_OBJS): Add tree-ssa-dce.o - -2002-09-14 Paul Brook - - * trans.c (g95_create_module_variable): Move to trans-decl.c. - * trans-const.c (g95_conv_string_init): New Function. - * trans-const.h: Declare it. - * trans-decl.c (g95_get_symbol_decl): Handle initializers for static - variables. Don't bail on intrinsic symbols. - (get_extern_function_decl): Handle specific intrinsic functions. - * trans-types.c (g95_sym_type): Dummy functions don't return - reference types. - * trans-array.c (g95_build_array_initializer): New Function. - (g95_trans_auto_array_allocation): Build initializer for static decls. - Don't use mpz_addmul, it's GMP4 only. - -2002-09-12 Paul Brook - - * trans-decl.c (g95_generate_code): Fix thinko with return variable. - (g95_get_extern_function_decl, g95_build_function_decl): Mangle - assembler names for module procedures. - -2002-09-11 Tobias Schlueter - - * trans-array.c,h trans-expr.c, trans-stmt.c: Correct spelling of - dependency/ - -2002-09-10 Paul Brook - - * trans-array.c: Change format of G95_SS_TEMP strictures. - (g95_check_fncall_dependancy): New function. - (trans_dummy_array_bias): stride[n], not stride[n-1]. for calculating - offsets. - * trans-decl.c (g95_get_symbol_decl): move assertion after handling of - result variables. - (g95_build_function_decl): Don't assume result arrays are packed. - (g95_trans-deferred-vars): Handle array result variables. - (g95_generate_fuction_code): Clear saved_function_decls. - * trans-expr.c (g95_conv_fnction_call): Handle direct array return by - reference. - (g95_trans_arrayfunc_assign): New function. - (g95_trans_assignment): Use it. - * trans.h (g95_ss): Add temp struct for G95_SS_TEMP. - (g95_se): Add direct_byref. - * trans-types.c: Use sym->result rather than sym where appropriate. - * trans-intrinsic.c (g95_conv_intrinsic_funcall): New function. - Update other functions to use this. - (g95_is_intrinsic_libcall): New function. - (g95_conv_intrinsic_function): Add MATMUL and PRODUCT intrinsics. - (g95_walk_intrinsic_function): Ditto. - -2002-09-08 Paul Brook - - * trans-types.c: Change rank field to dtype field in array descriptor. - * trans-array.c: Implement filling of dtype array descriptor field. - * trans-intrinsic.c: Fix broken LEN intrinsic. - -2002-09-07 Paul Brook - - * trans-intrinsic.c: Remove outdated todo intrinsic list. - (g95_get_symbol_for_expr): Remove hack for fortran based intrinsics. - (g95_walk_intrinsic_function): Add MINLOC and MAXLOC. - -2002-09-06 Paul Brook - - * Make-lang.in (F95_ADDITIONAL_OBJS): Add tree_alias_comon.o. - (gt-f95-trans-types.h): Add dependancy information. - * config-lang.in (gtfiles): Add trans-types.c - * f95-lang.c (g95_be_parse_file): Pass error and warning counts - back to top-level code. - * trans-array.c, trans-types.c: Change format of array descriptor. - (g95_conv_descriptor_dimension): New function. - * trans-types.h (g95_conv_descriptor_rank): define. - * trans-intrinsic.c: Implement PRODUCT, COUNT. MINLOC and MAXLOC - intrinsics. - -2002-09-02 Steven Bosscher - - * trans-array.c, trans-types.c: Add rank information to descriptor. - -2002-09-06 Tobias Schlueter - - * trans-stmt.c (g95_trans_allocate): Fix when ref==NULL. - -2002-09-04 Paul Brook - - * f95-lang.c (g95_create_decls): New function. - (g95_init): Move initialization of external decls to above, and call - from g95_be_parse_file. - * trans.c (g95_finish_stmt): Don't amputate the decl chain. - * trans-types.c (g95_init_types): Always name integer and char types. - (g95_get_array_type_bounds): TYPE_NAME may be a TYPE_DECL. - -2002-09-02 Steven Bosscher - - * Make-lang.in: Add options.c to F95_PARSER_OBJS - -2002-09-02 Paul Brook - - * g95_generate_code: Clear the attr for __fortran_main. - * trans-types.c (g95_finish_type): New function. - * g95_init_io_state_type: Use g95_finish_type. - * g95_conv_intrinsic_anyall: Fix thinko in result initialization. - -2002-09-01 Paul Brook - - * README.backend: Warn about the dangers of extra config.h files. - Remove obsolete libgfor stuff. - * config-lang.in: Add target-libgfor dependancy. - * g95_conv_mpf_to_tree: Use & free allocated buffer p rather than buff. - -2002-09-01 Toon Moene - - * g95_conv_mpz_to_tree: Free storage pointed to by q, - not by buff. - -2002-08-30 Paul Brook - - * trans-intrinsic.c (g95_conv_intrinsic_function, - g95_walk_intrinsic_function): Added ANY and ALL. - (g95_conv_intrinsic_anyall): New function. - * iresolve.c (g95_resolve_any, g95_resolve_all): Include rank in - mangled name +2006-01-13 Steven G. Kargl + + PR fortran/25756 + * symbol.c (gfc_free_st_label): Give variable meaningful name. Remove + unneeded parenthesis. Fix-up the head of the list (2 lines gleaned + from g95). + +2006-01-13 Diego Novillo + + * trans.c (gfc_add_expr_to_block): Do not fold tcc_statement + nodes. + +2006-01-11 Tobias Schl"uter + + * parse.c (next_fixed): Remove superfluous string concatenation. + +2006-01-11 Bernhard Fischer + + PR fortran/25486 + * scanner.c (load_line): use maxlen to determine the line-length used + for padding lines in fixed form. + +2005-01-11 Paul Thomas + + PR fortran/25730 + * trans-types.c (copy_dt_decls_ifequal): Copy backend decl for + character lengths. + +2006-01-09 Andrew Pinski + + fortran/24936 + * trans-stmt.c (gfc_trans_pointer_assign_need_temp): Use fold_convert + to avoid type mismatch. + +2006-01-09 Andrew Pinski + + PR fortran/21977 + * trans-decl.c (gfc_generate_function_code): Move the NULLing of + current_fake_result_decl down to below generate_local_vars. + +2006-01-09 Feng Wang + + PR fortran/12456 + * trans-expr.c (gfc_to_single_character): New function that converts + string to single character if its length is 1. + (gfc_build_compare_string):New function that compare string and handle + single character specially. + (gfc_conv_expr_op): Use gfc_build_compare_string. + (gfc_trans_string_copy): Use gfc_to_single_character. + * trans-intrinsic.c (gfc_conv_intrinsic_strcmp): Use + gfc_build_compare_string. + * trans.h (gfc_build_compare_string): Add prototype. + +2006-01-09 Feng Wang + + * simplify.c (gfc_simplify_char): Use UCHAR_MAX instead of literal + constant. + (gfc_simplify_ichar): Get the result from unsinged char and in the + range 0 to UCHAR_MAX instead of CHAR_MIN to CHAR_MAX. + +2005-01-08 Erik Edelmann + + PR fortran/25093 + * resolve.c (resolve_fntype): Check that PUBLIC functions + aren't of PRIVATE type. + +2005-01-07 Tobias Schl"uter + + * decl.c (gfc_match_function_decl): Correctly error out in case of + omitted function argument list. + +2006-01-07 Paul Thomas + + PR fortran/22146 + * trans-array.c (gfc_reverse_ss): Remove static attribute. + (gfc_walk_elemental_function_args): Replace gfc_expr * argument for + the function call with the corresponding gfc_actual_arglist*. Change + code accordingly. + (gfc_walk_function_expr): Call to gfc_walk_elemental_function_args + now requires the actual argument list instead of the expression for + the function call. + * trans-array.h: Modify the prototype for gfc_walk_elemental_function_args + and provide a prototype for gfc_reverse_ss. + * trans-stmt.h (gfc_trans_call): Add the scalarization code for the case + where an elemental subroutine has array valued actual arguments. + + PR fortran/25029 + PR fortran/21256 + PR fortran/20868 + PR fortran/20870 + * resolve.c (check_assumed_size_reference): New function to check for upper + bound in assumed size array references. + (resolve_assumed_size_actual): New function to do a very restricted scan + of actual argument expressions of those procedures for which incomplete + assumed size array references are not allowed. + (resolve_function, resolve_call): Switch off assumed size checking of + actual arguments, except for elemental procedures and intrinsic + inquiry functions, in some circumstances. + (resolve_variable): Call check_assumed_size_reference. + +2006-01-05 Jerry DeLisle + + PR fortran/24268 + * io.c (next_char_not_space): New function that returns the next + character that is not white space. + (format_lex): Use the new function to skip whitespace within + a format string. + +2006-01-05 Erik Edelmann + + PR fortran/23675 + * expr.c (gfc_expr_set_symbols_referenced): New function. + * gfortran.h: Add a function prototype for it. + * resolve.c (resolve_function): Use it for + use associated character functions lengths. + * expr.c, gfortran.h, resolve.c: Updated copyright years. + +2006-01-03 Steven G. Kargl + + PR fortran/25101 + * resolve.c (resolve_forall_iterators): Check for scalar variables; + Check stride is nonzero. + +2006-01-02 Steven G. Kargl + + PR fortran/24640 + * parse.c (next_free): Check for whitespace after the label. + * match.c (gfc_match_small_literal_int): Initialize cnt variable. + +2006-01-01 Steven G. Kargl + + * ChangeLog: Split previous years into ... + * ChangeLog-2002: here. + * ChangeLog-2003: here. + * ChangeLog-2004: here. + * ChangeLog-2005: here. diff --git a/gcc/fortran/ChangeLog-2002 b/gcc/fortran/ChangeLog-2002 new file mode 100644 index 00000000000..222dc0bf154 --- /dev/null +++ b/gcc/fortran/ChangeLog-2002 @@ -0,0 +1,333 @@ +2002-12-29 Paul Brook + + * trans-array.c: Document calling convention for arrays. + +2002-12-19 Paul Brook + + * trans-intrinsic.c (g95_conv_intrsinsic_function): Remove incorrect + assertion. Remove intrinsic subroutine G95_ISYM_* cases. Always pass + optional parameters for some intrinsics. + (g95_is_intrinsic_libcall): Add G95_ISYM_RESHAPE. + * trans-expr.c (g95_conv_function_call): Pass NULL for absent + optional parameters. + * trans.h (g95_se): Add ignore_optional flag. + +2002-12-15 Paul Brook + + * trans-array.c (g95_conv_array_parameter): Fix partial rank sections. + * trans-decl.c (g95_generate_function_code): Use TDI_original. + +2002-12-14 Paul Brook + + * trans-stmt.c (g95_trans_call): Use resolved symbol name. + +2002-12-12 Paul Brook + + * trans-array.c (g95_trans_array_constructor_subarray): Fully + initialize the scalarizer. + (various): Update to new format of g95_expr->value.constructor. + +2002-12-08 Paul Brook + + * trans-array.c (g95_put_offset_into_var): New function. + (g95_trans_array_constructor_subarray): New function. + (g95_trans_array_constructor_value): Use it. + (g95_array_cons_size): Don't abort() on array components. + +2002-12-08 Paul Brook + + * Make-lang.in (F95_ADDITIONAL_OBJS): Remove tree-dchain.o. + * support.c: Update #includes. + (statement_code_p, c_size_in_bytes, s_size_type_node): Remove. + * trans-array.c: Update #includes. + * trans.c: Ditto. + * trans-const.c: Ditto. + * trans-io.c: Ditto. + * trans-types.c: Ditto. + (g95_init_types): Set size_type_node. + * trans-decl.c: Update #includes. + (gfor_fndecl_adjust{l,r}): Declare and initialize. + * trans-stmt.c: Update #includes. + (g95_trans_do_while): Generate LABEL_EXPR, not GOTO_EXPR. + (g95_trans_select): Fix check for unbounded ranges. + * trans-expr.c: Update #includes. + (g95_conv_string_tmp): New function. + (g95_conv_concat_op): Use it. + * trans.h (g95_conv_string_tmp, gfor_fndecl_adjust{l,r}): Declare. + * Trans-intrisic.c: Update #includes. + (g95_conv_intrinsic_strcmp): New function. + (g95_conv_intrinsic_adjust): Ditto. + (g95_conv_intrinsic_function: Use them. + +2002-11-30 Paul Brook + + * trans-array.c (g95_walk_function_expr): Handle non-array return by + reference. + * trans-dec.c (g95_build_function_decl): Handle character return + parammeters. + (g95_get_fake_result_decl): Ditto. + (g95_trans_deferred_vars): Ditto. + * trans-expr.c (g95_conv_function_call): Ditto. + (g95_trans_arrayfunc_assign) Limit to array valued functions. + * trans-intrinsic.c (g95_conv_intrinsic_char): New function. + (g95_conv_intrinsic_function): Use it. + * trans-types.c (g95_sym_type): Handle functions returning strings. + (g95_return_by_reference): Ditto. + (g95_get_function_type): Ditto. + +2002-11-18 Paul Brook + + * trans-stmt.c (g95_trans_if): Fix IF statements when the condition + requires a temporary. + (g95_trans_select): Handle computed gotos. + * trans-types.c (g95_build_array_type): Warn about non-functional + assumed shape arrays. + * trans-expr.c (g95_trans_scalar_assign): Correctly handle post + blocks. + * trans-intrinsic.c (g95_conv_intrinsic_round): New function. + (g95_conv_intrinsic_int): New function. + (g95_conv_intrinsic_mod): New function. + (g95_conv_intrinsic_ichar): New function. + (g95_conv_intrinsic_function): Use them. + (g95_conv_intrinsic_dim): Use g95_evaluate_now. + +2002-11-17 Toon Moene + + * trans-types.c (g95_build_array_type): Assumed + sized arrays can have rank > 1. + * trans.c (g95_trans_code): Remove erroneous + warning about CONTINUE. + * trans-expr.c (g95_conv_variable): Remove + erroneous assert. + +2002-11-15 Paul Brook + + * trans-array.c (g95_conv_array_parameter): Check for NULL stride. + +2002-10-31 Paul Brook + + * f95-tree.c: Remove tree copying stuff that's now in gimple.c + * trans-expr.c (g95_conv_component_ref): Handle character string + components. + (g95_conv_string_parameter): Ditto. + * trans-types.c (g95_get_derived_type): Add length decl to caracter + string components. + +2002-10-10 Paul Brook + + * trans-decl.c (gfor_fndecl_size?): Declare and initialize. + * trans-expr.c (g95_conv_function_call): Remove unreliable return value + check. + * trans-intrinsic.c (g95_conv_intrinsic_size): New function. + (g95_conv_intrinsic_function): Handle size and shape intrinsics. + (g95_is_intrinsic_libcall): Add G95_ISYM_SHAPE. + * trans-types.c (pvoid_type_node): Declare and initialize. + * trans-array.c: Fix typo COMPONENT_REF->REF_COMPONENT + (g95_array_allocate): Fix when base==data. + (g95_conv_array_parameter): Correctly handle reduced rank sections. + * trans-io.c (g95_trans_write): Correctly handle string modifiers. + +2002-10-09 Paul Brook + + * (g95_conv_expr_reference): Handle character strings correctly. + +2002-10-07 Paul Brook + + (g95_expand_decl): Rename from f95_expand_decl_stmt and use as + langhook. + * trans-array.c (g95_build_array_initializer): Remove. + (g95_conv_array_initializer): New Function. + (g95_trans_auto_arry_allocation): Cleanup. + (g95_trans_init_character_array): Remove. + * g95spec.c: Link in libgforbegin. + * trans.c (g95_generate_code): Rename main function to MAIN__. + (g95_create_var): New function. + (g95_create_var_np): New function. + (g95_evaluate_now): New function. + (g95_start_block): New function. + (g95_finish_block): New function. + (g95_add_expr_to_block): New function. + (g95_add_block_to_block): New function. + * trans-expr.c (g95_conv_componen_ref): New function. + * Make-lang.in (F95_ADDITIONAL_OBJS): Add gimplify.o. + (F95_OBJS): Add dependency.o. + * f95-lang.c (g95_is_simple_stmt): Remove. + * f95-tree.c (mark_not_simple): New function. + (unshare_all_trees): New function. + (create_tmp_var, create_tmp_alias_var): Remove. + * support.c (declare_tmp_vars, tree_last_decl): Remove. + * trans*: Convert to new IR using GENERIC trees. Don't bother about + SIMPLE/GIMPLE rules, this is now done by Lang-independant code. + +2002-10-01 Paul Brook + + * trans-array.c: Add support for descriptorless arrays. + (g95_conv_array_data): New function. + (g95_conv_array_base): New function. + * trans-array.h: Declare these here. + * trans-decl.c(g95_create_mopdule_variable): Perform variable + initialization and creation here. + (g95_create_module_vars): Instead of here. + * trans.h (G95_TYPE_ARRAY_*: Rename from G95_TYPE_DESCRIPTOR_*. + * trans-intrinsic.c: Ditto. + * trans-types.c (g95_is_nodesc_array): New function. + (g95_get_nodesc_array_type): New function. + (g95_sym_type, g95_get_derived_type): Use them. + * trans-const.c (g95_conv_mpf_to_tree): Remove workaround. + +2002-09-28 Paul Brook + + * trans-const.c (g95_conv_mpf_to_tree): Work around backend bug. + * trans-intrinsic.c (g95_conv_intrinsic_abs): Correctly detect complex + parameters. + +2002-09-24 Paul Brook + + * f95-lang.c (listify): Remove declaration. + (expand_function_body): Use optimize >=1 instead of flag_tree_saa. + (listify) + * f95-tree.c (get_name): New function. + * trans.c (module_namespace): Remove. + * trans-decl.c: Use g95_chainon_list rather than chainon(listify()). + * trans-types.c: Ditto. + +2002-09-19 Paul Brook + + * trans-array.c (g95_get_array_cons_size): New Function. + (g95_con_ss_startstride): Handle Array constructors. + (g95_conv_loop_setup): Ditto. + (g95_conv_array_parameter): Ditto. + * tras-decl.c (g95_finish_var_decl): Make initializes variables + static. + +2002-09-19 Paul Brook + + * trans.c (g95_simple_fold_tmp): Detect variables inside + NON_LVALUE_EXPR. + * trans-stmt.c (g95_trans_arithmetic_if): Implement this. + +2002-09-18 Steven Bosscher + + * Make-lang.in (F95_ADDITIONAL_OBJS): Add tree-ssa-dce.o + +2002-09-14 Paul Brook + + * trans.c (g95_create_module_variable): Move to trans-decl.c. + * trans-const.c (g95_conv_string_init): New Function. + * trans-const.h: Declare it. + * trans-decl.c (g95_get_symbol_decl): Handle initializers for static + variables. Don't bail on intrinsic symbols. + (get_extern_function_decl): Handle specific intrinsic functions. + * trans-types.c (g95_sym_type): Dummy functions don't return + reference types. + * trans-array.c (g95_build_array_initializer): New Function. + (g95_trans_auto_array_allocation): Build initializer for static decls. + Don't use mpz_addmul, it's GMP4 only. + +2002-09-12 Paul Brook + + * trans-decl.c (g95_generate_code): Fix thinko with return variable. + (g95_get_extern_function_decl, g95_build_function_decl): Mangle + assembler names for module procedures. + +2002-09-11 Tobias Schlueter + + * trans-array.c,h trans-expr.c, trans-stmt.c: Correct spelling of + dependency/ + +2002-09-10 Paul Brook + + * trans-array.c: Change format of G95_SS_TEMP strictures. + (g95_check_fncall_dependancy): New function. + (trans_dummy_array_bias): stride[n], not stride[n-1]. for calculating + offsets. + * trans-decl.c (g95_get_symbol_decl): move assertion after handling of + result variables. + (g95_build_function_decl): Don't assume result arrays are packed. + (g95_trans-deferred-vars): Handle array result variables. + (g95_generate_fuction_code): Clear saved_function_decls. + * trans-expr.c (g95_conv_fnction_call): Handle direct array return by + reference. + (g95_trans_arrayfunc_assign): New function. + (g95_trans_assignment): Use it. + * trans.h (g95_ss): Add temp struct for G95_SS_TEMP. + (g95_se): Add direct_byref. + * trans-types.c: Use sym->result rather than sym where appropriate. + * trans-intrinsic.c (g95_conv_intrinsic_funcall): New function. + Update other functions to use this. + (g95_is_intrinsic_libcall): New function. + (g95_conv_intrinsic_function): Add MATMUL and PRODUCT intrinsics. + (g95_walk_intrinsic_function): Ditto. + +2002-09-08 Paul Brook + + * trans-types.c: Change rank field to dtype field in array descriptor. + * trans-array.c: Implement filling of dtype array descriptor field. + * trans-intrinsic.c: Fix broken LEN intrinsic. + +2002-09-07 Paul Brook + + * trans-intrinsic.c: Remove outdated todo intrinsic list. + (g95_get_symbol_for_expr): Remove hack for fortran based intrinsics. + (g95_walk_intrinsic_function): Add MINLOC and MAXLOC. + +2002-09-06 Paul Brook + + * Make-lang.in (F95_ADDITIONAL_OBJS): Add tree_alias_comon.o. + (gt-f95-trans-types.h): Add dependancy information. + * config-lang.in (gtfiles): Add trans-types.c + * f95-lang.c (g95_be_parse_file): Pass error and warning counts + back to top-level code. + * trans-array.c, trans-types.c: Change format of array descriptor. + (g95_conv_descriptor_dimension): New function. + * trans-types.h (g95_conv_descriptor_rank): define. + * trans-intrinsic.c: Implement PRODUCT, COUNT. MINLOC and MAXLOC + intrinsics. + +2002-09-02 Steven Bosscher + + * trans-array.c, trans-types.c: Add rank information to descriptor. + +2002-09-06 Tobias Schlueter + + * trans-stmt.c (g95_trans_allocate): Fix when ref==NULL. + +2002-09-04 Paul Brook + + * f95-lang.c (g95_create_decls): New function. + (g95_init): Move initialization of external decls to above, and call + from g95_be_parse_file. + * trans.c (g95_finish_stmt): Don't amputate the decl chain. + * trans-types.c (g95_init_types): Always name integer and char types. + (g95_get_array_type_bounds): TYPE_NAME may be a TYPE_DECL. + +2002-09-02 Steven Bosscher + + * Make-lang.in: Add options.c to F95_PARSER_OBJS + +2002-09-02 Paul Brook + + * g95_generate_code: Clear the attr for __fortran_main. + * trans-types.c (g95_finish_type): New function. + * g95_init_io_state_type: Use g95_finish_type. + * g95_conv_intrinsic_anyall: Fix thinko in result initialization. + +2002-09-01 Paul Brook + + * README.backend: Warn about the dangers of extra config.h files. + Remove obsolete libgfor stuff. + * config-lang.in: Add target-libgfor dependancy. + * g95_conv_mpf_to_tree: Use & free allocated buffer p rather than buff. + +2002-09-01 Toon Moene + + * g95_conv_mpz_to_tree: Free storage pointed to by q, + not by buff. + +2002-08-30 Paul Brook + + * trans-intrinsic.c (g95_conv_intrinsic_function, + g95_walk_intrinsic_function): Added ANY and ALL. + (g95_conv_intrinsic_anyall): New function. + * iresolve.c (g95_resolve_any, g95_resolve_all): Include rank in + mangled name diff --git a/gcc/fortran/ChangeLog-2003 b/gcc/fortran/ChangeLog-2003 new file mode 100644 index 00000000000..127de310bab --- /dev/null +++ b/gcc/fortran/ChangeLog-2003 @@ -0,0 +1,2339 @@ +2003-12-26 Feng Wang + + * dump-parse-tree.c (gfc_show_code_node): Add ASSIGN and ASSIGNED GOTO + dumping. + * gfortran.h (gfc_statement): New ST_LABEL_ASSIGNMENT. + (gfc_exec_op): New EXEC_LABEL_ASSIGN. + (symbol_attribute):New variable attribute: assign. + * io.c (resolve_tag):Integer variable is allowed. + (match_dt_format): Add ASSIGN statement. Set assign flag. + * match.c (gfc_match_if): Change ST_NONE to ST_LABEL_ASSIGNMENT. + (gfc_match_assign): Add ASSIGN statement. Set assign flag. + (gfc_match_goto): Add ASSIGNED GOTO statement. Set assign flag. + * parse.c (decode_statement): Add ST_LABEL_ASSIGNMENT. + (next_statement): Add ST_LABEL_ASSIGNMENT. + (gfc_ascii_statement): Add ST_LABEL_ASSIGNMENT. + * resolve.c (resolve_code): Resolve ASSIGN and ASSIGNED GOTO statement. + (resolve_blocks): Resolve ASSIGNED GOTO statement label list. + * st.c (gfc_free_statement): Add EXEC_LABEL_ASSIGN. + * trans-decl.c (gfc_get_symbol_decl): Create the shadow variable for + assign. Put them into the stuct lang_decl. + * trans-io.c (set_string): Add the assign statement. + * trans-stmt.c (gfc_trans_label_assign): New function. + (gfc_trans_goto): Translate ASSIGNED GOTO statement. + * trans-stmt.h (gfc_trans_label_assign): Added function prototype. + * trans.c (gfc_trans_code): Add EXEC_LABEL_ASSIGN. + * trans.h (lang_decl):Add shadow variable decl tree needed by assign. + (GFC_DECL_ASSIGN_ADDR(node)): New macro to access this. + (GFC_DECL_ASSIGN(node)): New macro to access flag. + +2003-12-31 Huang Chun + + PR fortran/13434 + * trans-intrinsic.c (gfc_conv_intrinsic_minmaxval): Fixed bug in + minval/maxval. + +2003-12-22 Toon Moene + + * options.c (gfc_init_options): Set flag_argument_noalias to 2, to indicate + that arguments to subroutines/functions can't alias themselves, nor global + memory. + +2003-12-20 Steven Bosscher + + * trans-expr.c (gfc_conv_expr_op): Fold the result expression. + * trans.c (gfc_add_modify_expr, gfc_add_expr_to_block): Likewise. + +2003-12-12 Huang Chun + + * primary.c (match_substring): Fix substring bug for start point + or end point is NULL. + * trans-expr.c (gfc_conv_substring): Ditto + * trans-types.c (gfc_sym_type): Get correct type of scalar + character variables. + * trans-intrinsic.c (gfc_conv_intrinsic_len): Handle character in + derived type. + +2003-12-10 Richard Henderson + + * options.c (gfc_post_options): Don't ever use rtl inlining. + +2003-12-05 Canqun Yang + + * trans-common.c: Re-implement COMMON blocks and EQUIVALENCE lists. + * trans-equivalence.c: Remove. + * trans-decl.c (gfc_get_symbol_decl): Update to match. + (gfc_generate_function_code): Ditto. + * trans-array.c (gfc_conv_array_parameter): Ditto. + * Make-lang.in (F95_OBJS): Remove fortran/trans-equivalence.o + (F95_ADDITIONAL_OBJS): Add stor-layout.o + * trans.h (gfc_trans_equivalence): Remove. + * gfortran.h (struct gfc_equiv): Add used field. + (struct gfc_symbol): Remove addr_base, addr_offset, equiv_ring, + equiv_offset fields. + +2003-12-05 Richard Henderson + + * trans.c (gfc_build_addr_expr): New. + (gfc_build_indirect_ref, gfc_build_array_ref): New. + * trans.h: Declare them. + * trans-array.c, trans-expr.c, trans-intrinsic.c, trans-io.c, + trans-stmt.c, trans.c (*): Use them. + + * f95-lang.c (gfc_post_options): Remove dead prototype. + * trans-array.c (gfc_trans_deferred_vars): Remove unused variable. + * trans-stmt.c (gfc_evaluate_where_mask): Fix temporary_list + allocation size. + +2003-12-01 Feng Wang + + * io.c (gfc_match_format): Check for missing format label. + +2003-11-30 Huang Chun + + PR fortran/13155 + * trans-decl.c (gfc_sym_mangled_function_id): Don't mangle symbols + from interfaces in modules. + +2003-11-30 Paul Brook + + * trans-array.c (gfc_trans_g77_array): Make non-static. + (gfc_trans_assumed_size): Remove. + (gfc_trans_dummy_array_bias): Explicitly free temporary. + * trans-array.h (gfc_trans_g77_array): Add prototype. + (gfc_trans_assumed_size): Remove. + * trans-decls.c (gfor_fndecl_push_context): Remove. + (gfor_fndecl_pop_context): Remove. + (gfc_build_function)decls): Don't create them. + (gfc_trans_deferred_vars): Update to match. Remove dead code. + * trans-stmt.c (gfc_trans_pointer_assign_need_temp): Free temp. + +2003-11-30 Kejia Zhao + + * trans-array.c (gfc_conv_array_parameter): Simplify + array argument passing for array name actual argument. + * trans-expr.c (gfc_conv_function_call): Ditto + * trans-types.c (gfc_is_nodesc_array):Ditto. + +2003-11-30 Paul Brook + + * f95-lang.c (gfc_post_options): Move ... + * options.c (gfc_post_options): .. to here. Handle inlining options. + * gfortran.h (gfc_post_options): Add prototype. + +2003-11-28 Richard Henderson + + * trans.c (gfc_create_var_np): Use create_tmp_var_raw. + +2003-11-28 Huang Chun + + * trans.h (has_alternate_specifier): New global variable. + * match.c (gfc_match_call): Handle actual arguments associated with + alternate return indicators. + * trans-expr.c (gfc_conv_function_call): Ditto + * trans-stmt.c (gfc_trans_call): Ditto + (gfc_trans_return): Handle return statement with value. + * trans-decl.c (gfc_generate_function_code): Handle functions with + asterisk dummy. + (gfc_get_fake_result_decl): Ditto + * trans-types.c (gfc_get_function_type): Ditto + * resolve.c (resolve_actual_arglist): Check alternate return indicators. + (resolve_formal_arglist): Check asterisk dummy. + +2003-11-27 Paul Brook + + * trans-array.c (gfc_tran_allocate_array_storage): Use new memory + allocation interface. + (gfc_conv_ array_parameter): Ditto. + (gfc_trans_auto_array_allocation): Ditto. Also free the memory. + * trans-array.c: Update prototype. + * trans-decl.c (gfc_build_builtin_function_decls): Update prototypes. + (gfc_trans_auto_character_variable): Use new memory alloc interface. + * trans-expr.c (gfc_conv_string_tmp): Ditto. + (gfc_conv_function_call): Use gfc_conv_string_tmp. + * trans-stmt.c (gfc_do_allocate): Use new memory alloc interface. + * trans-intrinsic.c (gfc_conv_intrinsic_trim): Ditto. + * trans.h (gfc_ss_info): Remove unused pdata field. + * trans.c (gfc_create_var_np): Change T to V. + +2003-11-26 Richard Henderson + + * mathbuiltins.def: Move acos, asin, cosh, log10, sinh, tanh from ... + * trans-intrinsic.c (gfc_intrinsic_map): ... here. Add SCALE, + FRACTION, NEAREST, SET_EXPONENT. + (gfc_intrinsic_map_t): Add libm_name, complex_available, is_constant. + Fix GTY marking. Remove unnecessary const's. + (LIBM_FUNCTION): Rename from I_LIB. + (LIBF_FUNCTION): New. + (gfc_get_intrinsic_lib_fndecl): Handle libm and libgfortran naming + conventions. Assume the expr signature is correct. Mark const. + (gfc_conv_intrinsic_exponent): Use library functions. + (gfc_conv_intrinsic_set_exponent): Remove. + (gfc_conv_intrinsic_scale): Remove. + (gfc_conv_intrinsic_nearest): Remove. + (gfc_conv_intrinsic_fraction): Remove. + (gfc_conv_intrinsic_function): Update. + * trans-decl.c (gfor_fndecl_math_exponent4): New. + (gfor_fndecl_math_exponent8): New. + (gfc_build_intrinsic_function_decls): Set them. + * trans.h: Declare them. + +2003-11-25 Canqun Yang + + * trans-common.c (gfc_layout_global_equiv): Locate the error for + underflow COMMON block. + (gfc_trans_one_common): Fix bug for size of COMMON block containing + EQUIVALENCE object. Also fix typo in an error message. + +2003-11-25 Diego Novillo + + * Make-lang.in: Add check-gfortran to lang_checks. + (check-f95): Alias for check-gfortran. + +2003-11-25 Jason Merrill + + * Make-lang.in (f95.tags): Create TAGS.sub files in each + directory and TAGS files that include them for each front end. + +2003-11-24 Paul Brook + + PR fortran/13154 + * trans-decl.c (gfc_greate_module_variable): Skip COMMON blocks. + +2003-11-24 Paul Brook + + * expr.c (simplify_const_ref): Return SUCCESS for things we don't + handle. + * resolve.c (gfc_resolve_expr): Resolve contents before rank/shape. + +2003-11-24 Paul Brook + + PR fortran/13105 + * array.c (gfc_array_ref_shape): Handle elemental dimensions. + * trans-array.c (gfc_trans_preloop_setup): Use correct dim lookup. + +2003-11-20 Richard Henderson + + * trans-array.c (gfc_trans_allocate_array_storage): Use convert. + (gfc_conv_array_base): Likewise. + * trans-decl.c (gfc_trans_auto_character_variable): Likewise. + * trans-expr.c (gfc_conv_string_tmp): Likewise. + * trans-intrinsic.c (gfc_conv_intrinsic_trim): Likewise. + * trans-stmt.c (gfc_trans_character_select): Likewise. + +2003-11-13 Paul Brook + + * trans-decl.c (gfc_sym_mangled_function_id): Dont mangle externals. + +2003-11-13 Canqun Yang + + * resolve.c (gfc_resolve): Also resolve EQUIVALENCE objects. + (resolve_equivalence): New function. + (resolve_equivalence_derived): New function. + +2003-11-12 Richard Henderson + + * trans.c (gfc_trans_code): Use annotate_with_locus instead of + annotate_all_with_locus. + +2003-11-11 Canqun Yang + + * options.c (gfc_init_options): Set flag_max_stack_var_size as 32768. + * trans-decl.c (gfc_finish_var_decl): Modified. + +2003-11-08 Paul Brook + + PR fortran/12704 + * trans-intrinsic.c (gfc_conv_intrinsics_minmaxloc): Handle zero-size + arrays. + +2003-11-06 Paul Brook + + * trans-intrinsic.c (gfc_conv_intrinsics_minmaxloc): Initialize pos. + +2003-11-02 Canqun Yang + + * match.c (gfc_match_stopcode): Assign '0' to stop_code. + +2003-10-27 Anthony Green + + * Make-lang.in (f95.stageprofile): Use tabs, not spaces. + (f95.stagefeedback): Ditto. + +2003-10-27 Andrew Pinski + + PR fortran/12682 + * Make-lang.in (f95.stageprofile): Add. + (f95.stagefeedback): Add. + +2003-10-23 Richard Henderson + + * f96-lang.c (gfc_gimplify_expr): Remove. + (LANG_HOOKS_GIMPLIFY_EXPR): Remove. + (LANG_HOOKS_GIMPLE_BEFORE_INLINING): New. + +2003-10-23 Richard Henderson + + * f95-lang.c (gfc_gimplify_expr): Return gimplify_status. + +2003-10-20 Paul Brook + + * trans-expr.c (gfc_conv_integer_power): Use boolean_type_node. + * trans-stmt.c (gfc_trans_do_while): Ditto. + +2003-10-17 Paul Brook + + * simplify.c (gfc_simplify_shape): Use gfc_array_dimen_size. + +2003-10-17 Paul Brook + + * trans-io.c (gfc_build_io_library_fndecls): Set TREE_PUBLIC. + +2003-10-17 Feng Wang + + * iresolve.c (gfc_resolve_maxloc): Change the result's kind and type. + (gfc_resolve_minloc): Ditto. + * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Use correct types. + Return the value after subtracting the lower bound. + +2003-10-16 Richard Henderson + + * f95-lang.c (expand_function_body): Don't check flag_disable_gimple. + +2003-10-16 Steven Bosscher + + * lang.c: Remove -M option for now, it's in the way for C. + +2003-10-14 Jason Merrill + + * Make-lang.in (f95.tags): New rule. + +2003-10-13 Richard Henderson + + * trans.c (gfc_trans_code): Use annotate_all_with_locus. + +2003-10-13 Paul Brook + + * trans-decl.c (generate_local_decl): Don't create junk variables. + +2003-10-13 Paul Brook + + * resolve.c (resolve_formal_arglist): Use function result decl in + preference to function decl. + +2003-10-12 Richard Henderson + + * f95-lang.c (gfc_define_builtin): New const_p argument. Set + TREE_READONLY. Update all callers. + +2003-10-12 Feng Wang + + * iresolve.c (gfc_resolve_cshift): Change to match implementation. + * trans-intrinsic.c (gfc_conv_intrinsic_function): Remove CSHIFT. + (gfc_is_intrinsic_libcall): Add CSHIFT. + +2003-10-12 Richard Henderson + + * trans-array.c (gfc_trans_static_array_pointer): Set TREE_INVARIANT. + (gfc_trans_array_constructor_value): Likewise. + (gfc_conv_array_initializer): Likewise. + * trans-stmt.c (gfc_trans_character_select): Likewise. + +2003-11-12 Kejia Zhao + + * trans-intrinsic.c (integer_kind_info, real_kind_info): Remove. + +2003-10-11 Huang Chun + + * check.c (gfc_check_repeat): Check arguments are scalar. + (gfc_check_trim): New function. + * intrinsic.h (gfc_check_trim): Add prototype. + * intrinsic.c (add_functions): Use it. + * trans.h (gfor_fndecl_string_trim, gfor_fndecl_string_repeat): + Decalare. + * trans-decl.c: Ditto. + (gfc_build_intrinsic_fucntion_decls): Set them. + * trans-intrinsic.c (gfc_conv_intrinsic_len): Handle result vars. + (gfc_conv_intrinsic_trim): New function. + (gfc_conv_intrinsic_repeat): New function. + (gfc_conv_intrinsic_function): Use them. + +2003-10-11 Huang Chun + + * trans-types.c (gfc_sym_type): Handle result variables. + +2003-10-11 Huang Chun + + * trans-intrinsic.c (gfc_conv_intrinsic_char): Don't use + gfc_get_character_type. + +2003-10-11 Feng Wang + + * trans-expr.c (gfc_conv_variable): Check sym->ts, not the decl. + +2003-10-11 Paul Brook + + * iresolve.c (gfc_resolve_dint, gfc_resolve_dnint): New functions. + (gfc_resolve_dprod): New function. + (gfc_resolve_aint, gfc_resolve_anint): Only base name on arg type. + * intrinsic.h (gfc_resolve_dint, gfc_resolve_dnint): Declare. + (gfc_resolve_dprod): Declare. + * intrinsic.c (add_functions): Use them. + * trans-decl.c (gfc_get_extern_function_decl): Only pass one arg. + +2003-10-06 Richard Henderson + + * f95-lang.c (gfc_init_builtin_functions): Add clzll. + * trans-intrinsic.c (call_builtin_clz): Use it. + +2003-10-05 Paul Brook + + * f95-lang.c (expand_function_body): Call (push|pop)_function_context. + * trans-decl.c (gfc_generate_function_code): Set + cfun->function_end_locus. + +2003-09-24 Jason Merrill + + * f95-lang.c, trans-decl.c: Use DECL_SOURCE_LOCATION instead of + TREE_LOCUS. + +2003-09-21 Lifang Zeng + Paul Brook + + * Make-lang.in (F95_OBJS): Add fortran/data.o. + * array.c (gfc_inser_constructor): New function. + (gfc_get_constructor): New function. + (gfc_free_constructor): Initialize offset and repeat. + (iterator_stack): Remove. + (expand_info): Add offset, component and repeat fields. + (expand_constructor): Set them. + (expand): Set new fields. + (gfc_copy_constructor): Ditto. Avoid recursion. + * gfortran.h: Add prototypes for new functions. + (gfc_constructor): Add offset, component and repeat. + (iteratio_stack): Move to here. + * resolve.c (check_data_variable): Convert data values into variable + initializers. + (traverse_data_list): Build implicit loop chain. + (gfc_resolve): Ditto. + * trans-array.c (gfc_conv_array_intializer): Handle repeat count. + * trans-decl.c (gfc_get_symbol_decl): Use gfc_conv_structure. + * trans-expr.c (gfc_conv_structure): Handle array initializers. + (gfc_conv_expr): Update to match. + * trans.h (gfc_conv_structure): Declare. + * data.c: New file. + +2003-09-20 Kejia Zhao + + * trans.h: Add declarations for gfor_fndecl_si_kind and + gfor_fndecl_sr_kind. + * trans-decl.c (g95_build_intrinsic_function_decls): Build them. + * trans-intrinsic.c (g95_conv_intrinsic_si_kind): New function. + (g95_conv_intrinsic_sr_kind): New function. + (g95_conv_intrinsic_function): Add SELECTED_INT_KIND and + SELECTED_REAL_KIND. + +2003-09-17 Lars Segerlund + + * iresolve.c (gfc_resolve_random_number): Generate _r4 & _r8 + instead of _4 and _8 as postfix for libgfortran calls. + +2003-09-16 Paul Brook + + * array.c (compare_bounds): New function. + (gfc_compare_array_spec): Use it. + +2003-09-14 Paul Brook + + * primary.c (gfc_match_rvalue): Make sure sym->result is set. + * trans-expr.c (gfc_conv_string_parameter): Also allow PRAM_DECLs. + +2003-09-14 Paul Brook + + * check.c (dim_rank_check): Allow assumed bounds if requested. + (gfc_check_lbound): Call it. + (gfc_check_ubound): Ditto. + (gfc_check_size): Change to match. + * simplify.c (gfc_simplify_bound): New function. + (gfc_simplify_lbound): New function. + (gfc_simplify_ubound): New function. + * intrinsic.h: Declare them. + * intrinsic.c (add_functions): Use them. + +2003-09-14 Paul Brook + + * io.c (format_lex): Initialize negative_flag. + (check_format): Intialize repeat. + * trans-io.c (gfc_new_nml_name_expr): Declare static. + (gfc_new_var_expr): Ditto. + +2003-09-14 Paul Brook + + * trans-array.c (gfc_conv_array_initializer): Handle derived types. + * trans-decl.c (gfc_get_symbol_decl): Only do local scalar values. + +2003-09-12 Paul Brook + + * trans-intrinsic.c (gfc_conv_intrinsic_sign): Call fold. + +2003-09-12 Zdenek Dvorak + + * fortran/trans.c (gfc_finish_block): Call rationalize_compound_expr + for a correct expression. + +2003-09-10 Kejia Zhao + + * trans-intrinsic.c (real_compnt_info): New struct. + (prepare_arg_info): New function. + (gfc_conv_intrinsic_set_exponent): New function. + (gfc_conv_intrinsic_scale): New function. + (gfc_conv_intrinsic_nearest): New function. + (gfc_conv_intrinsic_fraction): New function. + (gfc_conv_intrinsic_exponent): New function. + (gfc_conv_intrinsic_spacing): New function. + (gfc_conv_intrinsic_rrspacing): New function. + (gfc_conv_intrinsic_function): Use them. + +2003-08-24 XiaoQiang Zhang (zhangapache@yahoo.com> + + * trans-const.c (gfc_conv_mpz_to_tree): Fix bug, parameter for + build_int_2 changed from (high, low) to (low, high). + * trans-io.c (ioparm_namelist_name, ioparm_namelist_name_len, + ioparm_namelist_read_mode, iocall_set_nml_val_int, + iocall_set_nml_val_float, iocall_set_nml_val_char, + iocall_set_nml_val_complex, iocall_set_nml_val_log): New declaration. + (gfc_build_io_library_fndecls): Add variable initialization. + (gfc_new_nml_name_expr, get_new_var_expr): New function. + (build_dt): Add namelist support. + * io.c (value): New variable. + (check_format): Support FMT_H now. + +2003-09-07 Paul Brook + + * io.c (gfc_resolve_dt): Error if format label is not defined. + +2003-09-07 Kejia Zhao + + * trans-intrinsic.c (gfc_conv_intrinsic_aint): Fix two bugs. One is + about case_switch's break. The other is about building the condition + statement tree, which judges the argument in the range of the + corresponding integer type. + * trans-intrinsic.c (gfc_conv_intrinsic_mod): MOD and MODULO can work + for the large values. + +2003-09-05 Paul Brook + + * f95-lang.c (expand_function_body): Gimplify the function. + +2003-09-04 Jeff Law + + * f95-lang.c (DEFINE_MATH_BUILTIN): C arrays start at + index zero! + +2003-09-04 Paul Brook + + * f95-lang.c (gfc_define_builtin): Also set implicit_built_in_decls. + (gfc_expand_stmt): New function. + (LANG_HOOKS_RTL_EXPAND_STMT): Define. + (expand_function_body): Use tree_rest_of_compilation. + * trans-decl.c (gfc_generate_function_code): Don't free cfun. + +2003-09-03 Jeff Law + + * f95-lang.c (gfc_init_builtin_functions): C arrays start at + index zero! + +2003-08-30 Paul Brook + + * f95-lang.c (builtin_function): Remove #if 0 code. + (gfc_define_builtin): New function. + (gfc_init_builtin_functions): Use mathbuiltins.def not ../builtins.def. + * mathbuiltins.def: New file. + * trans-intrinsic.c (gfc_intrinsic_map_t): Add builtin code fields. + (gfc_intrinsic_map): Use mathbuiltins.def. + (gfc_intrinsic_builtin_t): Remove. + (gfc_build_intrinsic_lib_fndecls): Update. + * trans-types.c (gfc_init_types): Remove redundant initilaization of + signed_size_type_node. + +2003-08-29 Paul Brook + + * arith.c (gfc_real_kinds): Use correct minimum exponents. + +2003-08-22 Kejia Zhao + + * trans-instinsic.c (gfc_conv_intrinsic_mod): Also do MODULO. + (gfc_conv_intrinsic_function): Add MODULO. + +2003-08-22 Jason Merrill + + * trans-array.c (gfc_conv_expr_descriptor): Update use of predicates. + +2003-08-22 Andreas Jaeger + + * Make-lang.in (f95.install-common): Add DESTDIR support. + * (f95.install-info): Likewise. + (f95.uninstall): Likewise. + +2003-08-19 Diego Novillo + + * trans-types.c (gfc_init_types): Initialize + signed_size_type_node with size_type_node. + +2003-08-18 Paul Brook + + * dependency.c (gfc_dependency): New enum. + (check_another_array_ref): Remove. + (gfc_get_array_from_component): Remove. + (get_x): Remove. + (get_range): Remove. + (get_no_of_elements): Use mpz_t, not mpf_t. + (transform_sections): New function. + (gfc_check_range_range): Rename ... + (gfc_check_section_vs_section): ... to this. Use new function. + (gfc_is_inside_range): Rewrite to match. + (gfc_check_element_vs_section): Ditto. + (gfc_check_element_vs_element): Ditto. + (get_deps): Ditto. + (gfc_dep_resolver): Ditto. Remove unused parameter. + * Dependency.h (gfc_check_range_range, gfc_check_element_vs_section, + gfc_check_element_vs_element, gfc_is_inside_range, + gfc_get_array_from_component): Remove prototypes for static functions. + (gfc_dep_resolver): Update prototype. + * trans-array.c (gfc_conv_resolve_dependencies): Change to match. + +2003-08-15 Paul Brook + + * trans-decl.c (gfc_build_qualified_array): Don't add symbols for + return values to parent scope. + (gfc_build_dummy_array_decl): Ditto. + +2003-08-14 Paul Brook + + * trans-stmt.c (gfc_trans_allocate): Handle NULL refs. Allocate the + size of the type, not the pointer. + * resolve.c (resolve_symbol): Give more accurate error message. + +2003-08-10 Paul Brook + + * trans-decl.c (gfc_build_function_decl): Only mangle global symbols. + +2003-08-10 Paul Brook + + * trans-stmt.c (gfc_trans_allocate): Correctly handle non-array derived + type components. + +2003-08-10 Chun Huang + + * resolve.c (resolve_formal_arglist): Resolve STATEMENT function. + (resolve_symbol): Ditto. + * trans-expr.c (gfc_conv_statement_function): New function. + (gfc_conv_function_expr): Use it. + +2003-08-10 Paul Brook + + * trans-array.c (gfc_conv_ss_startstride): Handle functions. + (walk_function_expr): Set section rank. + * trans-intrinsic.c (gfc_walk_intrinsic_libfunc): Ditto. + +2003-08-10 Paul Brook + + * intrinsic.c (add_sym): Prefix names with correct string. + (add_sym_0s): New function. + (add_subroutines): Register abort. + +2003-08-10 Erik Schnetter + + * gfortran.h: Introduce options to control the mangling. + * lang.opt: Likewise. + * options.c (gfc_init_options): Handle the options. + * trans-common.c (gfc_sym_mangled_common_id): New function. + (gfc_build_common_decl): Call it. + * trans-decl.c (gfc_sym_mangled_function_id): New function. + (gfc_get_extern_function_decl, gfc_build_function_decl): Call it. + +2003-08-09 Paul Brook + + * module.c (mio_symbol): Always ouput a namespace for formal args. + (load_needed): Namespace now belong to their proper symbol. + (gfc_dump_module): Change G95=>GFORTRAN. + +2003-08-05 Paul Brook + + * options.c: Force -fg77-calls. + +2003-08-02 Paul Brook + + * Makelang.in: Rename G95_* to GFORTRAN_*. + * All sources: Rename G95_* to GFC_*. + +2003-08-01 Paul Brook + + * fortran/Make-lang.in: Use GMPLIBS. + * fortran/config-lang.in: Set need_gmp. + * trans-expr.c (gfc_conv_variable): Remove incorrect assertion. + +2003-07-27 Andreas Jaeger + + * trans-decl.c (gfc_generate_constructors): Convert prototype to + ISO C90. + * trans-const.c (gfc_init_constants): Likewise. + * trans-intrinsic.c (gfc_build_intrinsic_lib_fndecls): Likewise. + + * gfortranspec.c: Convert to ISO C90. + (lang_specific_driver): Correct copyright, remove ALT_LIBM usage. + +2003-07-26 Paul Brook + + * lang.opt: Add -fdump-parse-tree. + * options.c (gfc_handle_option): Ditto. + * resolve.c (resolve_forall_iterators): Convert to proper type. + * trans-stmt.c (gfc_trans_forall_1): Create temp var with correct type. + +2003-07-26 Paul Brook + + * Makefile.in: Add build dependencies on files common with rest of gcc. + +2003-07-26 Lifang Zeng + + * trans.h: Declare g95_trans_pointer_assignment. + * trans-expr.c (g95_trans_pointer_assignment): New function. + (g95_trans_pointer_assign): Use it. + * trans-stmt.c (g95_trans_forall_1): Handle pointer assignment. + (g95_trans_pointer_assign_need_temp): New function. + +2003-07-26 Paul Brook + + * gfortran.texi: Replace references to g95. + +2003-07-26 Paul Brook + + Rename g95_* to gfc_*. + +2003-07-25 Paul Brook + + * gfortran.h: Rename from g95.h. + * trans-types.c (boolean_type_node, booelan_true_node, + boolean_false_node): Remove. + * trans-types.h: Ditto. + +2003-07-25 Chun Huang + + * parse.c (accept_statement): Implement BLOCK DATA statement. + * trans-expr.c (g95_conv_variable): Fix bug for dereference pointer + variables. + +2003-07-24 Lifang Zeng + + * trans-stmt.c (temporary_list): Define. + (g95_trans_assign_need_temp): New function. + (g95_trans_forall_1): Modified for WHERE. + (g95_trans_where_assign): Modified. + (g95_trans_where_2): Modified. + (g95_evaluate_where_mask): Modified. + (g95_trans_where): Modified. + (g95_get_temp_expr): Removed. + (g95_add_to_where_stmt_list): Removed. + (compute_overall_iter_number): Modified for WHERE. + * trans.h: Remove where_stmt_list. + +2003-07-24 Arnaud Desitter + + * lang.opt: Correct description of options -J and -M. + +2003-07-23 Steven Bosscher + + * lang.opt: Move help text to here. + * lang-options.h: Remove. + +2003-07-23 Arnaud Desitter + * iresolve.c (g95_resolve_transpose): Proper variable in switch. + * simplify.c (g95_simplify_nearest): Fix typo and use a correct test + on kind. + +2003-07-22 Steven Bosscher + Paul Brook + + * check.c (check_rest): Use global pedantic flag. + * io.c (data_desc): Ditto. + * error.c (g95_warning, g95_warning_now): Use global flag. + * f95-lang.c (LANG_HOOKS_HANDLE_OPTION): Rename from DECODE. + (expand_function_body): Update to new prototypes. + (g95_init): Use new option names. + * g95.h (g95_option_t): Standardize names. + (g95_init_options, g95_handle_option): Update prototypes. + * interface.c: Use new option names. + * match.c: Ditto. + * module.c: Ditto. + * parse.c: Ditto. + * primary.c: Ditto. + * resolve.c: Ditto. + * scanner.c: Ditto. + * simplify.c: Ditto. + * symbol.c: Ditto. + * trans-array.c: Ditto. + * trans-expr.c: Ditto. + * trans-types.c: Ditto. + * trans-decl.c: Ditto. + (g95_build_library_function_decl): Remove obsolete VPARAMS. + * trans.h: Ditto. + * options.c (g95_display_help): Remove. + (g95_init_options): Convert to new scheme. + (set_Wall): Ditto + (g95module_option): Ditto, rename from g95_parse_arg. + (g95_handle_module_path_options): New function. + * trans-equivalence.c: Fix error message. + * lang.opt: Corrections. + +2003-07-21 Steven Bosscher + + * lang.opt: New file. + +2003-07-21 Arnaud Desitter + + * decl.c (match_attr_spec): Set colon_seen. + +2003-07-14 Paul Brook + + * trans-array.c: Update comment. + (g95_trans_array_constructor_subarray): Cleanup loopinfo data. + * trans-intrinsic.c (g95_conv_intrinsic_anyall,count,arith, + minmaxloc,minmaxval): Ditto. + * trans-io.c (g95_trans_transfer): Ditto. + * trans-stmt.c: Remove unneeded prototypes. + (generate_loop_for_lhs_to_rhs): Rename vars. Add loop post chain. + (generate_loop_for_rhs_to_temp): Rename vars. Don't share loopinfo. + (compute_inner_temp_size): Remove bits of dead code. Add comments. + Don't share loopinfo. + (compute_overall_iter_number): Declare as static. + (allocate_temp_for_forall_nest): Ditto. + (g95_trans_forall_1): Don't pass shared loopinfo. + * trans.c (g95_start_block): Expand comment. + +2003-07-12 Paul Brook + + * arith.c (g95_index_integer_kind): Remove unused initializer. + * trans-stmt.c (generate_loop_for_temp_to_lhs): Don't multiply array + index by size of element. + (generate_loop_for_rhs_to_temp): Ditto. + (allocate_temp_for_forall_nest): Use element size, not index size. + +2003-07-11 Arnaud Desitter + + * arith.c (g95_index_integer_kind): Add a TODO. + * simplify.c (g95_simplify_nearest): Add a TODO. + +2003-07-09 Chun Huang + + * trans.h: Add declarations for gfor_fndecl_string_scan and + gfor_fndecl_string_verify. + * trans-decl.c (g95_build_intrinsic_function_decls): Build them. + * trans-intrinsic.c (g95_conv_intrinsic_scan): New function. + (g95_conv_intrinsic_verify): New function. + (g95_conv_intrinsic_function): Add SCAN and VERIFY. + * simplify.c (g95_simplify_scan, g95_simplify_verify): Fix bug in case + of parameter 'BACK=.TRUE.' + +2003-07-05 Lifang Zeng + + * trans-stmt.c (iter_info, forall_info): Define. + (g95_trans_forall_block): Remove. + (g95_trans_forall_loop): Use forall info blocks. + (g95_trans_nested_forall_loop): New function. + (g95_do_allocate): Handle things other than logical masks. + (generate_loop_for_temp_to_lhs): New function. + (generate_loop_for_rsh_to_temp): New function. + (compute_inner_temp_size): New function. + (compute_overall_iter_number): New function. + (allocate_temp_for_forall_nest): New function. + (g95_trans_forall): Move body ... + (g95_trans_forall_1): ... to here. Handle loops with temporaries. + +2003-07-02 Paul Brook + + * trans-decl.c (create_index_var, g95_build_qualified_array): Put vars + in correct scope. Change callers to match. + * trans-types.c (g95_get_dtype_cst): Allow rank 7 arrays. + * iresolve.c (g95_resolve_reshape): Only use constant shapes. + +2003-07-02 Paul Brook + + * trans-array.c (g95_conv_loop_setup): Remove dead var. Use + expression shape for all expressions. + * trans-decl.c (g95_symbol_init): Allow adding at very end of list. + +2003-07-03 Arnaud Desitter + + * g95.h (g95_option_t), lang-options.h, options.c (g95_init_options, + g95_parse_arg), intrinsic.c (g95_convert_type): support of + -Wconversion. + * intrinsic.c, g95.h: Add g95_convert_type_warn, + * resolve.c (g95_resolve_index): Call it. + +2003-07-02 Paul Brook + + * iresolve.c (g95_resolve_reshape): Set expression shape. + (g95_resolve_shape): Ditto. + * simplify.c (g95_simplify_shape): Move common code outside condition. + * trans-array.c (g95_conv_array_initializer): Teach it how to count. + +2003-07-01 Arnaud Desitter + + * array.c (g95_array_dimen_size): Deal with EXPR_ARRAY to improve + conformance checks. + +2003-06-29 Paul Brook + + * array.c (g95_simplify_iterator_var): Don't bother with return value. + * expr.c (find_array_element, find_component_ref): New functions. + (remove_subobject_ref): New function. + (simplify_const_ref): Use them. Rename from simplify_component_ref. + (simplify_ref_chain): New function. + (g95_simplify_expr): Use it. Simplify parameter variable subobjects. + (g95_specification_expr): Simplify the expression. + * resolve.c (resolve_operator): Check simplifications return code. + (g95_resolve_expr): Ditto. + +2003-06-26 Paul Brook + + * expr.c (simplify_component_ref): New function. + (g95_simplify_expr): Use it. + * resolve.c (resolve_structure_cons): Handle references. + +2003-06-25 Paul Brook + + * trans-io.c (build_dt): Handle internal units. + +2003-06-25 Canqun Yang + + * trans-common.c (g95_build_common_decl): Array index range starts at 0. + (g95_build_common_decl, g95_layout_global_equiv, g95_trans_one_common): + Use g95_array_index_type instead of integer_type_node. + (g95_build_common_decl, g95_set_common_master_type): Use + g95_character1_type_node instead of char_type_node. + * trans-equivalence.c (g95_layout_local_equiv): As above. + +2003-06-24 Steven G. Kargl + + * g95.h (g95_option_t), options.c (g95_init_options, g95_parse_arg): + remove last remains of -fquiet. + +2003-06-22 Paul Brook + + * resolve.c (resolve_operator): Don't fail if we can't simplify. + (g95_resolve_expr): Ditto. + (resolce_code): Mark as static. + * trans-stmt.c (g95_trans_chaaracter_select): Mark labels because the + gimplifer doesn't (yet). + +2003-06-20 Paul Brook + + * g95.h: Add ST_PAUSE and EXEC_PAUSE. + * match.c (g95_match_if): Add ST_PAUSE. + (g95_match_stopcode): New function. + (g95_match_pause, g95_match_stop): Use it. + * parse.c (g95_ascii_statement): Handle ST_PAUSE. + (decode_stmt, next_statement, parse_executable): Ditto. + * resolve.c (resolve_code): Ditto. + * st.c (g95_free_statement): Ditto. + * trans-stmt.c (g95_trans_pause): New function. + * trans-stmt.h: Declare it. + * trans.c (g95_trans_code): Use it. + * trans-decl.c (gfor_fndecl_pause_numeric, gfor_fndecl_pause_string): + Declare. + (g95_build_builtin_function_decls): Initialize them. + * trans.h: Ditto. + * dump-parse-tree.c (g95_show_code_node): Handle EXEC_PAUSE. + +2003-06-18 Arnaud Desitter + + * io.c (g95_match_open , g95_match_close, g95_match_inquire, + match_filepos): Fix error handling. + +2003-06-18 Arnaud Desitter + + * array.c (spec_dimen_size, ref_dimen_size, g95_array_dimen_size): + Add assertions on arguments. + * resolve.c (expression_shape): Remove useless &. + * simplify.c (get_kind, g95_simplify_bit_size, g95_simplify_digits, + g95_simplify_ibclr, g95_simplify_ibits, g95_simplify_ibset, + g95_simplify_ishft,g95_simplify_ishftc, g95_simplify_maxexponent, + g95_simplify_minexponent, g95_simplify_radix, g95_simplify_range + g95_simplify_rrspacing, g95_simplify_scale, g95_simplify_spacing, + g95_simplify_tan, g95_simplify_tiny): Clean predicates and assertions. + (g95_simplify_not, g95_simplify_scale): Add assertions. + +2003-06-15 Paul Brook + + Clean up stuff to work with the ssa optimizers. + * convert.c (convert): Handle BOOLEAN_TYPEs. + * f95-lang.c (g95_truthvalue_conversion): Implement. + * trans-array.c (g95_trans_array_constructor_value): Group multiple + scalar values. + * trans.h (g95_truthvalue_conversion): Declare. + * trans-intrinsic.c (g95_conv_intrinsic_anyall): Use bool constants. + * trans-stmt.c (g95_trans_character_select): Don't create array + assignments. Mark labels as indirect jump targets. + * trans-types.h (g95_init_types): Use BOOLEAN_TYPE nodes. + (g95_get_dtype_cst): Handle LOGICAL types. + +2003-06-14 Paul Brook + + * f95-lang.c (g95_gimplify_expr): New function. + * trans-array.c (g95_trans_array_constructor_value): Don't create + array assignments. + (g95_conv_expr_descriptor): Rename simple->gimple. + * trans-expr.c (conv_expr_op): Use proper logical operators. + * trans-intrinsic.c (build_fixbound_expr): New function. + (build_fix_expr): Ditto. + (g95_conv_intinsic_aint): Use them. Use builtin functions. + (g95_conv_intrinsic_function): Add FLOOR and CEILING. + +2003-06-10 Arnaud Desitter + + * array.c (g95_compare_array_spec): Remove unreachable code. + * expr.c (g95_copy_expr): Likewise. + * intrinsic.c (g95_convert_type): Likewise. + * misc.c (g95_code2string): Likewise. + * simplify.c (g95_simplify_ishft, g95_simplify_real, + g95_simplify_reshape, g95_simplify_sign, g95_simplify_sqrt): Likewise. + * trans-stmt.c (g95_trans_select): Likewise. + * primary.c (extend_ref): Add an assertion. + * simplify.c (g95_convert_constant): Add const. + * intrinsic.h: Remove g95_check_x_ni. + * f95-lang.c (g95_finish): Call g95_release_include_path. + +2003-06-10 Arnaud Desitter + + * resolve.c (resolve_contained_functions): Fix typo introduced on + 2003-01-13. + +2003-06-09 Paul Brook + + * g95.h: Include system.h not hwint.h. + * many: use safe-ctype.h not ctype.h. Change isalpha -> ISALPHA, etc. + * misc.c (g95_getmem): Use xmalloc/memset instead of calloc. + +2003-06-09 Paul Brook + + * g95.h (g95_symbol): Add fields for COMMON and EQUIVALENCE variables. + * Make-lang.in (F95_OBJS): Add files for COMMON and EQUIVALENCE. + * trans-decl.c (g95_add_decl_to_functions): Make non-static. + (g95_get_symbol_decl): Handle COMMON and EQUIVALENCE objects. + (g95_generate_function_code): Translate COMMON and EQUIVALENCE + objects. + * trans.h (g95_trans_equivalence, g95_trans_common, + g95_add_decl_to_function): Declare. + * trans-common.c, trans-equivalence.c: New files. + +2003-06-08 Steven Bosscher + + * intrinsic.c (g95_intrinsic_extension): Remove. + (add_functions): Substitute g95_check_x for g95_check_x_ni + everywhere. + (g95_init_expr_extensions): New function. + (g95_intrinsic_func_interface): Use it. + * intrinsic.h: Remove extern decl for g95_intrinsic_extension. + * check.c (g95_check_digit, g95_check_huge, g95_check_kind, + g95_check_precision, g95_check_present, g95_check_radix, + g95_check_range, g95_check_selected_real_kind): Do not set + g95_intrinsic_extension. + (g95_check_x_ni): Remove now duplicate of g95_check_x. + + * expr.c (check_inquiry): Add FIXME, fixup some code style. + +2003-06-06 Arnaud Desitter + + * g95.h (ref_type): Name this type explicitly. + * module.c (MIO_NAME): Add specialisations of mio_name. + (mio_symbol_attribute, mio_typespec, mio_array_ref, + mio_array_spec, mio_ref, mio_expr, mio_symbol): Use them. + (ab_attribute): Name this type explicitly. + (mio_symbol_attribute, mio_expr): Add cast to call to find_enum. + +2003-06-05 Kejia Zhao + + * trans-intrinsic.c (g95_conv_allocated): New function. + (g95_conv_intrinsic_function): Make G95_ISYM_ALLOCATED work. + +2003-06-05 Steven Bosscher + + * f95-lang.c: Don't include g95-support.h + (g95_mark_addressable): Add prototype. + (g95_init_decl_processing): Remove C front end hack. + * f95-tree.c: Remove file. + * support.c: Remove file. + * g95-support.h: Remove file. + * trans-types.c (g95_init_types): Set up boolean + type related tree nodes. + * Make-lang.in: Remove rules for dead files and + dependencies on them. + +2003-06-05 Steven Bosscher + + * Make-lang.in (F95_ADDITIONAL_OBJS): Remove the final + C front end dependency. Also, convert.c does not depend on + g95-support.h anymore. + * convert.c: Don't include c-common.h and g95-support.h + * f95-lang.c: Don't inlude c-common.h and c-common.def (3x). + (g95_stmt_tree, g95_scope_stmt_stack, anon_aggr_type_p, + stmts_are_full_exprs_p, current_stmt_tree, + current_scope_stmt_stack): Remove. + * g95-support.h (unsigned_conversion_warning): Kill proto. + (boolean_type_node, boolean_true_node, boolean_false_node): + Don't define here. Instead, make then true tree nodes in + trans-types. + * support.c (c_global_trees): Die, C front end, die!!! + (g95_init_c_decl_hacks): Don't touch intmax_type_node, + uintmax_type_node, string_type_node and const_string_type_node. + (decl_constant_value, overflow_warning): Make static functions. + They are in death row too, though. + (default_conversion, c_expand_asm_operands): Remove. + * trans-array.c, trans-expr.c, trans-intrinsic.c, trans-stmt.c, + trans.c: Don't include c-common.h. + * trans-types.c (boolean_type_node, boolean_true_node, + boolean_false_node): Make them real tree nodes. + * trans-types.h (intmax_type_node, string_type_node, + const_string_type_node): Hack to work around C dependencies + in builtin-types.def. + +2003-06-04 Arnaud Desitter + + * decl.c (decl_types): Add some iterators-like sentinels. + * decl.c (match_attr_spec): Use them. + Use "decl_types" instead of "int". + Add cast in call to g95_match_strings. + * dump-parse-tree.c (g95_show_namespace): Use "g95_intrinsic_op" + instead of "int". + * g95.h (g95_intrinsic_op): Add some iterators-like sentinels. + (g95_interface_info): Use "g95_intrinsic_op". + * dump-parse-tree.c (g95_show_namespace): Use them. + * interface.c (g95_check_interfaces): Use them. + * module.c (read_module, write_module): Use them. + * symbol.c (g95_get_namespace, g95_free_namespace): Use them. + Use "g95_intrinsic_op". + * interface.c (check_operator_interface): Use "g95_intrinsic_op". + Add a default case in switch statement. + * intrinsic.h (g95_generic_isym_id): Moved to... + * g95.h (g95_generic_isym_id): here. + (g95_intrinsic_sym): Use "g95_generic_isym_id". + * intrinsic.c (make_generic): Use "g95_generice_isym_id". + * trans-intrinsic.c (g95_intrinsic_map_t, + g95_conv_intrinsic_lib_funtion): Use "g95_generice_isym_id". + * match.c (g95_match_intrinsic_op): Add cast in call to + g95_match_strings. + +2003-06-03 Steven Bosscher + + * support.c (skip_evaluation, warn_conversion, lvalue_p, + lvalue_or_else, pedantic_lvalue_warning, warn_for_assignment, + constant_fits_type_p, convert_and_check, + unsigned_conversion_warning): Remove these ugly remnants + we inherited from the C front end. + (function_types_compatible): Remove '#if 0'-edcode. + (build_modify_expr): Likewise. + (convert_for_assignment): Don't use the deceased functions. + The parameter fundecl is now unused. + (decl_constant_value): Always just return decl. In fact + this function is not used at present, but it might be in + the future, when we start using the tree inliner. + (overflow_warning, default_conversion, c_expand_asm_operands): + Abort when these are called, they are part of the C type + checking implementation and therefore poison to Fortran. + +2003-06-04 Steven Bosscher + + * Make-lang.in (F95_ADDITIONAL_OBJS): Don't depend on + c-pretty-print.o and c-dump.o. Add a comment on why we + depend on c-semantics.c. + * f95-lang.c (LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN): + Don't use the C front end tree dumper hook to dump the + language specific tree representation -- we don't have + one. So instead, inherit the default langhook. + +2003-06-02 Paul Brook + + * trans-expr.c (g95_conv_variable): Remove incorrent assertion. + +2003-06-02 Arnaud Desitter + + * check.c (g95_check_associated): Use proper types. Remove + extraneous argument in call to g95_error(). + +2003-06-02 Kejia Zhao + + * resolve.c (resolve_operator): Make logical operands convert to the + type with higher kind. + +2003-06-02 Kejia Zhao + + * check.c (g95_check_associated): Make sure both pointer and target has + the same type and rank. Null pointer or array section with vector + subscript as target are not allowed. + * trans.h: Declare gfor_fndecl_associated. + * trans-decl.c: (g95_build_builtin_function_decls): Initialize + gfor_fndecl_associated. + * trans-intrinsic.c (g95_conv_associated): New function. + (g95_conv_intrinsic_function): Make G95_ISYM_ASSOCIATED work. + +2003-06-02 Kejia Zhao + + * trans-array.c (g95_conv_expr_descriptor): Set the base of POINTER + according to POINTER itself rather than TARGET. + (g95_conv_expr_descriptor): Make lbound start at 1. + * trans-expr.c (g95_trans_pointer_assign): Fix a bug for Nullify. + +2003-06-01 Paul Brook + + * expr.c (g95_type_convert_binary): Make it match the standard. + * g95.texi: Remove dead link. + +2003-06-01 Steven Bosscher + + * g95.texi: Cleanup somewhat in preparation for inclusion + in GCC CVS. + +2003-05-23 Arnaud Desitter + Canqun Yang + + * resolve.c (compare_bound_int, resolve_where_shape): Proper return + type. + (g95_find_forall_index): Return proper value. + (g95_resolve_assign_in_forall, g95_resolve_forall): Use proper type to + compare the return value from g95_find_forall_index. + +2003-05-23 Arnaud Desitter + * g95.h, io.c (g95_st_label): Remove "length". + (g95_symtree): Remove "link". + (g95_case): Remove "code". + * arith.c, arith.h (g95_compare_string, g95_convert_integer, + g95_convert_real): Make an argument pointer to const. + * decl.c (colon_seen): Add a TODO. + * interface.c (g95_compare_types): Fix typo. + * interface.c (compare_interfaces): Preserve value of "p". + * intrinsic.c (sort_actual): Remove "i". + * match.c (g95_match_assign): Proper type in call to g95_match(). + * parse.c (next_free): Avoid duplicate call due to macro. + * parse.c (check_statement_label): wrong type in call to g95_error. + * primary.c (match_real_constant): Add a TODO. + * resolve.c (resolve_select): Remove useless conditional. + * simplify.c (g95_simplify_repeat): Proper assignment to + "value.character.string". + * simplify.c (g95_simplify_reshape): Wrong variable in call to + g95_error. + +2003-05-20 Canqun Yang + + * trans-stmt.c: Remove unnecessary include file defaults.h. + +2003-05-19 Lifang Zeng + + * trans-stmt.c (g95_trans_forall_loop): Handle FORALL with negative + stride. + (g95_trans_forall): Allow arbitrary number of FORALL indexes and + actual variables used as FORALL indexes. + +2003-05-15 Paul Brook + + * trans-array.c (g95_trans_static_array_pointer): Use + null_pointer_node. + (g95_trans_deferred_array): Initialize static array pointers. + * trans-expr.c (g95_conv_function_call): Use formal arglist to + correctly pass POINTER and absent CHARACTER arguments. + +2003-05-14 Lifang Zeng + + * resolve.c (g95_resolve_forall): Resolve FORALL construct/statement. + (g95_resolve_forall_body): Resolve FORALL body. + (g95_resolve_where_code_in_forall): Resolve WHERE inside FORALL. + (g95_resolve_assign_in_forall): Resolve assignment inside FORALL. + (g95_find_forall_index): Check whether the FORALL index appears in + the expression or not. + (resolve_code): Modified. + +2003-05-14 Paul Brook + + * iresolve.c (g95_resolve_spread): Convert ncopies to index_type. + +2003-05-13 Paul Brook + + * trans-types.c (g95_max_array_element_size): Now a tree node. + (g95_init_types): Work out max size properly. + (g95_get_dtype_cst): Modify to match. + +2003-05-11 Paul Brook + + * trans-io.c (add_case): Create a label decl for case labels. + +2003-05-11 Paul Brook + + * arith.c (g95_integer_index_kind): New variable. + * f95-lang.c (g95_init): Move frontend initialization here ... + (g95_post_options): ... from here. + * g95.h (g95_index_integer_kind, g95_resolve_index): Declare. + * intrinsic.c (add_functions): Use index kinds. + * iresolve.c: Convert to index_kind where needed. + * resolve.c (g95_resolve_index): Make public, use index_kind. + (resolve_array_ref): Adjust to match. + * trans-array.c: Rename g95_array_index_kind to g95_index_integer_kind. + * trans-stmt.c: Ditto. + * trans-types.c: Ditto. + * trans-types.h (g95_array_index_kind): Remove declaration. + * trans-expr.c (g95_conv_expr_present): Use null_pointer_node. + +2003-05-07 Paul Brook + + * trans-const.c (g95_conv_mpz_to_tree): Typecast constant. + * trans-intrinsic.c (g95_conv_intrinsic_bound): Convert type + of bound indices. + +2003-05-07 Paul Brook + + * trans-array.c (trans_static_array_pointer, + g95_trans_array_constructor_value, g95_conv_array_initializer, + g95_conv_structure): CONSTRUCTOR nodes only have one operand. + (g95_add_loop_ss_code): Convert subscripts to the correct type. + * trans-stmt.c (g95_trans_character_select): Ditto. + * trans-types.c (g95_init_types): Ditto. + +2003-05-07 Steven Bosscher + + * f95-lang.c (expand_function_body): Use input_line, not lineno. + * trans-decl.c (g95_generate_function_code, + g95_generate_constructors): Likewise. + * trans.c (g95_trans_runtime_check, g95_add_block_to_block, + g95_get_backend_locus, g95_set_backend_locus, g95_trans_code): + Likewise. + +2003-05-07 Kejia Zhao + * trans-types.c (g95_get_derived_type): Fix bug for DERIVED type + with components point to the DERIVED type itself, and two DERIVED + type with components point to each other. + * trans-expr.c (g95_conv_componet_ref): Modified + +2003-05-07 Kejia Zhao + * trans-expr.c (g95_conv_expr): Translate EXPR_NULL into + null_pointer_node. + (g95_trans_pointer_assign): Implement Nullify. + +2003-05-01 Paul Brook + + * trans-array.c (g95_walk_function_expr): Cope with NULL esym. + * trans-decl.c (g95_get_symbol_decl): Don't mangle dummy functions. + +2003-05-01 Paul Brook + + * trans-array.c, trans.c, trans-expr.c, trans-intrinsic.c, + trans-stmt.c: Replace empty_stmt_node with build_empty_stmt () and + IS_EMPTY_STMT. + +2003-05-01 Canqun Yang + + * trans-stmt.c (g95_trans_integer_select): Add a parameter to build + CASE_LABEL_EXPR. + +2003-04-28 Paul Brook + + * iresolve.c (g95_resolve_transpose): COMPLEX types are twice as big + as their kind suggests. + (g95_resolve_reshape): Ditto. + +2003-04-28 Chun Huang + + * trans-expr.c (g95_conv_substring_expr): New function. + (g95_conv_expr): Use it. + +2003-04-28 Paul Brook + + * iresolve.c (g95_resolve_transpose): Make it match the + implementation. + * trans-intrinsic.c (g95_is_intrinsic_libcall): Add TRANSPOSE. + +2003-04-18 Steven Bosscher + + * trans-types.c (g95_add_field_to_struct): New function to + add a field to a UNION_TYPE or RECORD_TYPE. + * trans-types.h (g95_add_field_to_struct): Prototype. + (g95_get_derived_type): Use g95_add_field_to_struct to add + components. + * trans-io.c (g95_add_field): Remove. + (ADD_FIELD): Use new g95_add_field_to_struct function. + (ADD_STRING): Likewise. + * trans-stmt.c (g95_trans_select): Likewise. + (g95_add_field): Remove duplicated function. + +2003-04-18 Canqun Yang + + Port implementation for CHARACTER SELECT from Andy's tree. + * trans-stmt.c (g95_trans_character_select): Implement character + select. (g95_add_field): New function. + * trans-decl.c: Declare 'gfor_gndecl_select_string'. + (g95_build_builtin_function_decls): Add 'gfor_fndecl_select_string'. + * g95.h (struct g95_case): Add field 'int n'. + * trans.h: Declare 'gfor_fndecl_select_string'. + +2003-04-18 Steven Bosscher + + * bbt.c (duplicate_key, g95_insert_bbt_with_overlap): Remove. + (g95_insert_bbd): Die on duplicates. + * g95.h (g95_insert_bbt_with_overlap): Delete prototype. + +2003-04-14 Steven Bosscher + + * g95.texi: Require GMP 4.0 -- like we actually + do. Explain the testsuite and what-goes-where. + Don't use undefined texinfo symbol. Break very + long line. Remove finished item from the list + of open projects. + +2003-04-11 Canqun Yang + + * trans-stmt.c (g95_evaluate_where_mask): Give mask temporaries + LOGICAL type. + +2003-04-10 Canqun Yang + + * trans-stmt.c (g95_trans_forall): Implement WHERE inside FORALL. + (g95_trans_forall_body): New function. + +2003-04-10 Canqun Yang + + * resolve.c (resove_where): New function. + (resolve_where_shape): New function. + (resolve_code): Add call to 'resolve_where' + * trans-stmt.c (g95_trans_where): Modified. + (g95_trans_where_2): New function. + (g95_trans_where_assign): New function. + (g95_evaluate_where_mask): New function. + (g95_add_to_stmt_list): New function. + (g95_get_temp_expr): New function. + * trans.h (where_stmt_list): New structure. + +2003-04-10 Paul Brook + + * g95spec.c (DEFAULT_SWITCH_TAKES_ARG): Remove. + (DEFAULT_WORD_SWITCH_TAKES_ARG): Ditto. + +2003-04-10 Steven Bosscher + + Update after mainline -> tree-ssa-branch merge. + * f95-lang.c (g95_mark_addressable): Update put_var_into_stack + call. + (g95_init): Update for new lang_hooks definition. + (g95_post_options): New langhook. + (LANG_HOOK_POST_OPTIONS): Clear, then define to g95_post_options. + * scanner.c (g95_new_file): Comment update. + +2003-04-09 Arnaud Desitter + + * g95.h, lang-options.h: Add -Wimplicit-interface. + * options.c (g95_init_options, g95_parse_arg): Set it. + * interface.c (check_intents): Warn about call with implicit + interface. + * resolve.c (resolve_unknown_f, resolve_unknown_s): Call + g95_procedure_use. + +2003-04-05 Paul Brook + + * iresolve.c (g95_resolve_spread): Don't resole based on type. + * trans-intrinsic.c (g95_is_intrinsic_libcall): Add G95_ISYM_SPREAD. + +2003-03-29 Paul Brook + + * iresolve.c (g95_resolve_pack): Don't bother resolving based on type. + (g95_resolve_unpack): Ditto. + * trans-intrinsic.c (g95_conv_intrinsic_merge): New Function. + (g95_conv_intrinsic_function): Use it. Remove PACK and UNPACK. + (g95_is_intrinsic_libcall): Add PACK and UNPACK. + +2003-03-25 Paul Brook + + * arith.c (g95_unary_user, g95_user): Remove dead functions. + * arith.h: Ditto. + * array.c (g95_free_array_ref): Ditto. + * g95.h: Ditto. + * symbol.c (g95_use_derived_tree): Ditto. + * intrinsic.c (add_functions): Use simplification for SCALE. + * primary.c (g95_match_rvalue): Test sym, not symtree. + +2003-03-25 Paul Brook + + * trans-decl.c (build_function_decl): Add parameter before it gets + turned into a constant. + * iresolve.c (g95_resolve_eoshift): Resolve to a useful name. + * trans-intrinsic.c (g95_is_intrinsic_libcall): Add G95_ISYM_EOSHIFT. + * trans-decl.c (g95_create_module_variable): Don't pushdecl constants. + +2003-03-22 Paul Brook + + * trans-array.c (g95_conv_array_initializer): Allow scalar + expressions. + * trans-decl.c (g95_finish_var_decl): Result variables are not + module variables. + * trans-intrinsic.c (g95_conv_intrinsic_transfer): New function. + (g95_conv_intrinsic_function): Use it. + * trans-types.h (g95_type_spec): Remove dead declaration. + +2003-03-21 Paul Brook + + * trans-decl.c (g95_build_function_decl): Mark string parameters. + +2003-03-20 Paul Brook + + * trans-decl.c (g95_build_function_decl): Put character length + parameters at the end of the function declaration. + * trans-expr.c (g95_conv_function_call): Ditto. + * trans-types.c (g95_get_function_type): Ditto. + +2003-03-20 Arnaud Desitter + + * resolve.c (resolve_formal_arglist): Don't impose intent for + procedure arguments of pure functions. + (resolve_select): Remove redundant assignment. + +2003-03-19 Arnaud Desitter + + * arith.c (validate_logical), g95.h, options.c (g95_init_options): + Remove option l1. + * g95.h, intrinsic.c(g95_get_intrinsic_sub_symbol): Add const. + * iresolve.c(g95_resolve_cpu_time, g95_resolve_random_number): Add + const. + * lang-options.h: Remove -finline-repack-arrays. Add -fg77-calls. + Order list. + * symbol.c (g95_add_type): Fix typo in comment. + + +2003-03-16 Paul Brook + + * dump-parse-tree.c (g95_show_code_node): Print resolved sym name. + * expr.c (g95_build_call): Remove. + * f95-lang.c (puchdecl_top_level): New function. + * g95.h (g95_code): Store resolved symbol, not just the name. + * intrinsic.c (g95_intrinsic_namespace): New global namespace. + (g95_intirinsic_init_1, g95_intrinsic_done_1): Use it. + (g95_get_intrinsic_sub_symbol): New function. + * iresolve.c (g95_resolve_cpu_time): Use it. + (g95_resolve_random_number): Ditto. + * resolve.c: Set code->resolved_sym instead of code->sub_name. + * trans-decl.c (g95_get_extern_function_decl): Give external decls + the correct DECL_CONTEXT. Add global symbold to the global scope. + * trans-stmt.c (g95_trans_code): Remove hacks now the fronted is + fixed. + +2003-03-16 Paul Brook + + * g95.h (g95_option_t): Add g77_calls. Remove inline_repack_arrays. + * options.c (g95_parse_arg): Ditto. + * module.c (mio_symbol_attribute): Handle the always_explicit bit. + * resolve.c (resolve_formal_arglist): The always_explicit sould be set + for the procedure, not the parameter. + * trans-array.c (g95_trans_g77_array): New function. + (g95_trans_assumed_size): Use it. + (g95_trans_dummy_array_bias): Ditto. + (g95_conv_array_parameter): Handle g77 arrays. Move existing body ... + (g95_conv_expr_descriptor): ... to here. Update callers. + * trans-decl.c (g95_build_dummy_array_decl): Handle g77 arrays. + (g95_get_symbol_decl): Avoid processing g77 arrays multiple times. + * trans-expr.c (g95_conv_function_call): Handle g77 arrays. + * trans-intrinsic.c (g95_get_symbol_for_expr): Never use g77 arrays. + * trans-types.c (g95_is_nodesc_array): Handle g77 arrays. + (g95_sym_type): Ditto. + +2003-03-15 Paul Brook + + * trans-array.c (g95_walk_elemental_function_args): Don't amputate the + first chain. + * trans-expr.c (g95_conv_function_call): Use the resolved symbol. + +2003-03-14 Paul Brook + + * trans-array.c (g95_array_is_packed): Remove. + (g95_conv_array_base): Correctly handle all descriptorless cases. + (g95_conv_array_stride): Use descriptorless strides. + (g95_trans_dummy_array_bias): Don't always repack the array. + (g95_build_dummy_array_decl): Automatic dummy arrays are only partial + packed. + * trans-types.c (g95_get_nodesc_array_type): Differentiate between + dummy and non-dummy arrays... + (g95_sym_type, g95_get_derived_type): ... like these. + (g95_get_array_type_bounds): Allow discontiguous arrays. + +2003-03-12 Paul Brook + + * array.c (g95_resolve_array_spec): Fix comment. + * g95.h (symbol_attributes): New flag always_explicit. + * resolve.c (resolve_formal_arglist): Set it always_explicit. + * iresolve.c (g95_resolve_lbound, g95_resolve_ubound): Simplify. + * trans-array.c (g95_conv_descriptor_dimension): Remove dead assert. + (g95_trans_array_bounds): Allow assumed shape arrays. + (g95_trans_repack_array): Remove. + (g95_trans_dummy_array_bias): Rewite to use descriptorless arrays. + * trans-decl.c (g95_build_qualified_array): Only ignore absent + bounds for assumed size arrays. + (g95_build_dummy_array_decl): Use descriptorless arrays. + * trans-expr.c (g95_conv_expr_present): Allow descriptorless arrays. + (g95_trans_pointer_assign): Fix typo. + * trans-intrinsic.c (g95_conv_intrinsic_function_args): Remove dead + code. + (g95_conv_intrinsic_bound): Rewrite to handle descriptorless arrays. + * trans-types.c (g95_get_nodesc_array_type): Allow non-packed arrays. + Also modify callers. + * trans-types.h (g95_get_nodesc_array_type): Modify prototype. + +2003-03-08 Paul Brook + + * trans-array.c (g95_walk_elemental_functions): Don't reverse the SS. + (g95_conv_array_ubound): Provide dummy value for assumed size arrays. + * resolve.c (compare_spec_to_ref): Allow full array sections. + +2003-03-08 Paul Brook + + * expr.c (g95_simplify_expr): Also simplify array index and + substring expressions. + * resolve.c (compare_spec_to_ref): Check for assumed size bounds. + * trans-array.c (g95_trans_array_bounds): New function. + (g95_trans_auto_array_allocation): Use it. + (g95_trans_assumed_size): Rewrite. + * trans-decl.c (gfor_fndecl_in_pack, gfor_fndecl_in_unpack): Declare. + (gfor_fndecl_repack): Remove. + (g95_build_qualified_array): Handle absent upper bounds. + (g95_build_dummy_array_decl): Assumed shape arrays are descriptorless. + (g95_get_symbol_decl): Update. + (g95_build_intrinsic_function_decls): Initialize new decls. + * trans.h (gfor_fndecl_in_pack, gfor_fndecl_in_unpack): Declare. + (gfor_fndecl_repack): Remove. + * trans-io.c (g95_build_io_library_fndecls): Correct prototypes. + * trans-types.c: (g95_build_array_type): Merge duplicated code.. + (g95_get_nodesc_array_type): Handle absent bounds. + * trans-types.h (g95_get_nodesc_array_type): Declare. + +2003-03-04 Paul Brook + + * f95-lang.c (DEF_FUNCTION_TYPE_VAR_3): Define before including + builtin-types.def. + +2003-03-02 Paul Brook + + * options.c (g95_init_options): Drfault to 1. + (g95_pasrse_arg): Add -frepack-arrays, use strcmp. + * trans-array.c (g95_conv_array_data, g95_conv_array_base, + g95_conv_array_stride,g95_conv_array_lbound, g95_conv_array_ubound): + Handle non-constant size automatic arrays. + (g95_conv_section_upper_bound, g95_conv_section_startstride): Use + generic bound functions. + (g95_trans_auto_array_allocation): Don't create a descriptor. + (g95_trans_assumed_size): New function (broken). + (g95_trans_dummy_array_bias): Remove unused var. + * trans-array.h (g95_trans_assumed_size): Declare. + * trans-decl.c (create_index_var): New fuction. + (g95_build_qualified_array): New function. + (g95_get_symbol_decl): Use it. + (g95_trans_deferred_vars): Handle assumed shape seperately. + * trans-types.c (get_element_type): Handle heap allocated arrays. + (g95_is_nodesc_array): Include non-const size arrays. + (g95_get_nodesc_array_type): Ditto. + +2003-02-23 Paul Brook + + * trans-array.c (g95_array_init_size): Should use stride, not size of + last dimension. + +2003-02-18 Paul Brook + + * trans-expr.c (g95_trans_arrayfunc_assign): Nove elemental check + after intrinsic function check. + +2003-02-18 Arnaud Desitter + + * io.c (match_io): Fix missing return value and remove useless + assignment. + * match.c (g95_match): Remove useless assignment. + * module.c (parse_string): Remove useless post increment. + * simplify.c (g95_simplify_verify): Remove useless assignment. + +2003-02-15 Paul Brook + + * expr.c (restricted_intrinsic): Handle bad values gracefully. + * g95.h (symbol_attribute): Add referenced member. + (g95_symbol): Add dummy_order member. + (g95_set_sym_referenced): Declare. + * match.c (g95_match_assignment, g95_match_call): Use it + * primary.c (match_actual_arg, g95_match_rvalue, + g95_match_variable): Ditto. + * symbol.c (next_dummy_order): New variable. + (g95_set_sym_referenced): New function. + (check_done): New function. + (g95_add_*): Use it. + * trans-decl.c: Make formatting conform to GCC standards. + (g95_defer_symbol_init): Add dummy variables in the right order. + (g95_get_symbol_decl): Only accept referenced variables. + (g95_create_module_variable): Module variables are always required. + (generatr_local_decls): New function. + (generate_local_vars): New function. + (g95_generate_function_code): Use it. + +2003-02-13 Paul Brook + + * trans-decl.c (g95_conv_struct_cons): Remove. + (g95_get_symbol_decl): Use g95_conv_expr for structure initializers. + * trans-expr.c (g95_conv_structure): New function. + (g95_conv_expr): Use it. + +2003-02-09 Paul Brook + + * trans-array.c (g95_array_init_size): Don't evaluate the linit + expressions multiple times. + (g95_trans_auto_arry_allocation): Use pointer not tmp. + +2003-02-08 Paul Brook + + * module.c (mio_symtree_ref): Declare as static. + (mio_expr): Remove dead code. + (read_module): Set the symtree link for fixups. + * trans-intrinsic.c (g95_conv_intrinsic_round): Rename... + (build_round_expr): ... to this. + (g95_conv_intrinsic_aint): New function. + (g95_conv_intrinsic_function): Use it. + +2003-02-08 Paul Brook + + * trans-array.c (g95_trans_array_constructor_value): Use the acutal + offset after modificaton, not the increment expression. + * dependency.c: Kill excess whitespace. + +2003-02-07 Sanjiv Gupta + + * dependency.h: Remove some function declarations. + * dependency.c (get_no_of_elements): Change this function not to + return int. + * other: Add comments for all modified functions. + +2003-02-06 Paul Brook + + * g95spec.c (lang_specific_functions): Fix initializer warning. + * dump-parse-tree.c (g95_show_expr): Use typespec instead of symtree + for structure type names. + * trans-decl.c (g95_cons_structure_cons): New function. + (g95_get_symbol_decl): Use it. + * trans-expr.c (g95_conv_component_ref): Remove duplicate pointer + referencing code. + +2003-02-06 Arnaud Desitter + + * resolve.c (compare_cases): Add const to casts. + +2003-01-30 Arnaud Desitter + + * g95.h (g95_check_f): Change a1 to f1m. + * intrinsic.c (add_sym_1m, check_specific, + g95_intrinsic_func_interface): Use it. + + * module.c (init_pi_tree): Remove useless cast. + (fp2): Fix argument type. + + * parse.c (parse_select_block): Add comment. + +2003-02-05 Toon Moene + + * lang-options.h: Fix warning involving C90 concatenated + strings. + +2003-02-06 Steven Bosscher + Arnaud Desitter + + * io.c (format_asterisk): Complete initializer to kill warning. + * arith.c (DEF_G95_INTEGER_KIND, DEF_G95_LOGICAL_KIND, + DEF_G95_REAL_KIND, MPZ_NULL, MPF_NULL): New #defines. + (g95_integer_kinds, g95_logical_kinds, g95_real_kinds): Use the + new defines to complete initializers. Kills all warnings. + + * Make-lang.in: Comment cleanup. + +2003-02-05 Paul Brook + + * array.c (g95_free_constructor): Handle NULL expressions. + * resolve.c (resolve_structure_cons): Ditto. + * decl.c (g95_match_null): New Function. + (variable_decl): Use it. + * module.c (mio_expr): Don't bother saving symtree for EXPR_STRUCTURE. + * primary.c (g95_match_runtime): Don't use symtree for EXPR_STRUCTURE. + * trans-types.c (g95_set_decl_attributes): Remove empty function. + +2003-02-05 Paul Brook + + * trans.h (build1_v): New macro. + (build_v): Remove pointless and incorrect prototype. + * various: Use build1_v for GOTO_EXPR and LABEL_EXPRs. + * f95-lang.c (g95_init_builtin_decls): DEF_BUILTIN takes 10 args. + +2003-02-01 Steven Bosscher + + * Make-lang.in (F95_OBJS): Remove one more dead file. + +2003-02-01 Paul Brook + + * lang-specs.h: Don't pass -ffixed-form to the linker. + * trans-decl.c (g95_generate_function_code): Clear saved decl chain. + +2003-02-01 Paul Brook + + * Make-lang.in (F95_OBJS): Remove dead files. + * trans-array.c (g95_array_init_size): Do the right thing when + ubound=NULL. + * trans-decl.c (g95_generate_function_code): Initialize deffered + symbol list before translating contained subroutines. + * trans-expr.c (g95_conv_expr, g95_conv_expr_reference): Substitute + scalar invariant values here... + (g95_conv_variable, g95_conv_function_call): ... instead of here ... + * trans-intrinsic.c (g95_conv_intrinsic_function_args): .. and here. + +2003-01-29 Paul Brook + + * trans-array.c (g95_add_loop_code): Put pre code in the right block. + (g95_walk_elemental_function_args): Reverse chains before adding. + (g95_reverse_ss): Move about a bit. + * trans-expr.c (g95_conv_function_call): Handle scalar intrinsic + function arguments. + +2003-01-28 Paul Brook + + * intrinsic.c (resolve_intrinsic): Use correct union member. + * trans-array.c (g95_trans_dummy_array_bias): Don't touch absent + parameters. + * trans-decl.c (g95_get_symbol_decl): Don't translate initializers for + use associated variables. + * trans-intrinsic.c (g95_conv_intrinsic_present): Move body ... + * trans-expr.c (g95_conv_expr_present): ... to here. + * trans.h: Declare it. + * trans-types.c (g95_sym_type): Assume subroutine if not specified. + +2003-01-28 Arnaud Desitter + + * array.c (expand_iterator): Suppress useless assignment. + * decl.c (match_char_spec): Ditto. + * io.c (match_io_iterator): Ditto. + * primary.c (match_real_constant): Ditto. + * interface.c (fold_unary, g95_free_interface, g95_extend_expr): + Ditto. Also, use g95_intrinsic_op not int for intrinsic operators. + * matchexp.c (match_add_operand, match_level_5): Likewise. + * module.c (parse_atom, find_enum): Likewise. + * resolve.c: move #include + (resolve_select): Fix serious typo. + +2003-01-28 Steven Bosscher + + * Make-lang.in: Don't build with broken tree-ssa-pre. + +2003-01-28 Steven Bosscher + + * resolve.c (resolve_index): Add a TODO. + * symbol.c: Remove useless "#include ". + +2003-01-27 Paul Brook + + * check.c (check_rest): Allow different type kinds as an extension. + * g95.h (g95_resolve_f): Add f1m. + * intrinsic.c (add_sym_1m, resolve_intrinsic): Use it. + * intrinsic.h: Chenge prototypes for MIN and MAX. + * iresolve.c (g95_resolve_minmax): New function. + (g95_resolve_min, g95_resolve_max): Use it. + * trans-intrinsic.c (g95_trans_intrinsic_minmax): Only evaluate + arguments once. + (g95_conv_intrinsic_present): Fix logic. + +2003-01-27 Steven Bossche + + * g95.h (g95_case): Don't be a tree, be a double linked list. + * match.c (match_case_selector): Remove redundant semantics check. + Clean up a few goto's to make it a tiny little bit faster. + * resolve.c (case_tree): Die. + (compare_cases): Accept and compare unbounded cases too. + (check_case_overlap): Don't build a tree. Instead, merge-sort the + whole list of g95_cases passed from resolve_select. + (sane_logical_select): Die. + (check_case_expr): Return FAILURE if a CASE label is of the wrong + type kind. + (resolve_select): Fixup case expression for computed GOTOs, put it + in expr, not expr2, for easier handing in the parse tree dumper and + the code generator. Rewrite the rest of the function: Kill + unreachable case labels and unreachable case blocks. + * dump-parse-tree.c (g95_show_code_node): Always dump expr for + an EXEC_SELECT, not case2 anymore. + * trans-const.c (g95_conv_constant_to_tree): New function. + (g95_conv_constant): Use it. + * trans-const.h: Declare prototype for the new function. + * trans-stmt.c (g95_trans_integer_select, g95_trans_logical_select, + g95_trans_character_select): New static functions. + (g95_trans_select): Rewrite. + +2003-01-26 Paul Brook + + * intrinsic.c (add_fnctions): Properly add dreal. + * trans-intrinsic.c (g95_conv_intrinsic_present): New function. + (g95_conv_intrinsic_function): Use it. + * trans-io.c (build_dt): Abort on internal files (unimplemented). + +2003-01-26 Paul Brook + + Widespread changes to the handling of symbols in expressions. These + are now linked via g95_symtree nodes. + * parse.c (g95_fixup_sibling symbols): New function. + (parse_contained): Use it. + * g95.h (symbol_attribute): Add contained. Indicates a symbol is a + contained procedure that has bee correctly fixed up. + (g95_code, g95_expr): Point to a g95_symtree, not a g95_symbol. + +2003-01-24 Paul Brook + + * trans-array.c (g95_walk_expr): Function result attributes are in + sym->result. + * trans-expr.c (g95_conv_function_call, + g95_trans_arrayfunc_assign): Ditto. + * trans-decl.c (g95_get_symbol_for_expr): Set sym->result. + +2003-01-23 Steven Bosscher + + * expr.c (check_restricted): Fix error message. + * symbol.c (free_st_labels): Plug memleak. + +2003-01-22 Steven Bosscher + + * arith.c (reduce_unary, reduce_binary_ac, reduce_binary_ca, + reduce_binary_aa, reduce_binary, eval_intrinsic, + eval_intrinsic_f2): Use typesafe prototypes for eval functions. + * g95.h (g95_check_f, g95_simplify_f, g95_resolve_f): New unions + for typesafe intrinsics helper functions. + (g95_intrinsic_sym): Use them. + * intrinsic.c (do_check, add_sym, add_sym_0, add_sym_1, + add_sym_1s, add_sym_1m, add_sym_2, add_sym_3, add_sym_4, + add_sym_5, add_conv, resolve_intrinsic, do_simplify, + check_specific, g95_intrinsic_func_interface, + g95_intrinsic_sub_interface): Adjust all calls to intrinsics + helper functions. + * trans-decl.c (g95_get_extern_function_decl): Likewise. + * Make-lang.in: Don't disable warnings for strict prototypes + any longer, everything is typesafe now. + +2003-01-22 Steven Bosscher + + * bbt.c (duplicate_node): Make static. + * module.c (module_name): Make static. + * scanner.c (include_dirs): Make static. + +2003-01-20 Steven Bosscher + + Hard coded _gfor_'s should not show up anymore. + * g95.h (PREFIX): New macro. + * iresolve.c (g95_resolve_cpu_time): Use PREFIX, not + hard-coded "_gfor". + (g95_resolve_random_number): Likewise. + * trans-decl.c (g95_build_intrinsic_function_decls): Likewise. + * trans-io.c: Remove 'prefix' macro. Replace all uses with + the new PREFIX macro from g95.h. + +2003-01-20 Steven Bosscher + + The troubles of forking... Andy implemented this just now too. + Let's stick to that and keep the trees close. + * g95.h (g95_st_label): 'format' member is now a g95_expr. + * io.c: Revert previous changes. + (g95_match_format): Match the format string as a character + literal expression. + * match.h (g95_statement_label): Declare external. + * parse.c: Revert previous changes. + * symbol.c (g95_free_st_label): Free a g95_expr instead + if a 'char *'. + * trans-io.c: Revert previous changes. + (build_dt): Use set_string to set the format string. + +2003-01-20 Steven Bosscher + + * io.c (format_string): Make non-static. + (g95_match_format): Remember the format string. + (terminate_io): Add I/O termination for empty I/O lists. + * match.h: Declare external format_string. + * parse.c (check_statement_label): Attack the format string + to a format label for FORMAT statements. + * trans-io.c (g95_add_field): Define prefix macro. Replace + all uses of PREFIX define with a use of this macro. + (build_dt): Implement formatted I/O for format labels. + +2003-01-20 Steven Bosscher + + * lang-options.h: Kill "-std=F". + * options.c: Remove unimplemented "-std=F". Modify + web address. + * misc.c (g95_terminal_width): New function. + * error.c (g95_error_init_1): Use g95_terminal_width. + * g95.h: Add prototype for g95_terminal_width, remove + fmode flag. + +2003-01-19 Steven Bosscher + + * Make-lang.in: Fix typo. + +2003-01-18 Steven Bosscher + + * g95.h (struct g95_case): Remove unused cruft, new member + 'where' to keep track of the locus of the default case. + * match.c (g95_match_case): Add locus to the current case. + (match_case_selector): Likewise. + * parse.c (parse_select_block): Move semantics check for + multiple DEFAULT cases out of here to... + * resolve.c (check_case_overlap): ...here. Return sooner + when possible. + (check_case_expr): Take two g95_cases now, use to sure the + expression kinds are the same. + (resolve_select): Cleanup. + +2003-01-18 Paul Brook + + * trans-io.c: Fix typos in ported IO work (set_fla[tg]). + * trans-decl.c (g95_set_symbol_decl): Handle non-array result + variables. + (g95_get_extern_function_decl): Put decls in the correct context. + +2003-01-18 Steven Bosscher + + * trans-io.c: Port changes from Andy to set ERR flag. + +2003-01-17 Paul Brook + + * trans-array.c: Add various comments. + (g95_ss_terminator): Declare as const. + (g95_walk_expr): Remove first parameter and update all callers. + (g95_walk_op_expr): Initialize scalar SS properly. + * trans-array.h (g95_walk_expr): Update prototype. + * trans-expr.c: Update for new g95_walk_expr. + * trans-intrinsic.c: Ditto. + * trans-io.c: Ditto. + * trans.h: Various comments for SS chains. + +2003-01-17 Paul Brook + + * intrinsic.h (g95_generic_isym_id): Add G95_ISYM_S?_KIND, SPACING + and RRSPACING. + * intrinsic.c (add_functions): Use them. + * trans-intrinsic.c (g95_conv_intrinsic_function): Ditto. + * trans-expr.c (g95_conv_expr_lhs): Abort on impossible error. + +2003-01-17 Steven Bosscher + + Fallout of a small merge conflict: + * intrinsic.c: Un-revert lost patch (G95_ISYM_SCALE). + +2003-01-17 Steven Bosscher + + * initrinsic.c: New add_sym_* functions for strong typing. + (add_conv): Make prototype strict. + * dump-parse-tree.c, dependency.c: Include config.h + * resolve.c, trans-io.c: Fix typos. + +2003-01-17 Steven Bosscher + + * dump-parse-tree.c (g95_show_code_node): Show the + condition for a computed GOTO that was transformed + to a SELECT CASE construct. + * resolve.c (check_case_overlap): Revert previous switch + to treaps, it was too slow and didn't catch all trouble. + (resolve_symbol): Be more flexible about module procedures. + * symbol.c (check_conflict): Point to relevant section in + the standard for dubious conflict. Allow procedure + dummy arguments to be optional again. + * trans-io (add_field): Rename to g95_add_field. Change + all callers. + * trans-stmt (trans_select): Handle unbounded cases for + integer SELECT CASE constructs. Fix/add more comment. + +2003-01-17 Steven Bosscher + + * g95.h: Uses GCC's function attribute macros. + * error.c, module.c, parse.c, g95.h: More function attributes. + +2003-01-16 Steven Bosscher + Forgot a file... + * trans-decl.c (get_label_decl): Use TREE_LINENO instead + of DECL_SOURCE_LINE, and TREE_FILENAME instead of + DECL_SOURCE_FILE. + +2003-01-16 Steven Bosscher + + * f95-lang.c (pushdecl): Use TREE_LINENO instead of + DECL_SOURCE_LINE. + * trans.c (g95_trans_code): Use annotate_all_with_file_line + instead of nowdead wrap_all_with_wfl. + +2003-01-14 Steven Bosscher + + * parse.c (g95_parse_file): In verbose mode, dump the parse tree + before generating code, so we can still see it even if the code + generation phase dies. + +2003-01-14 Steven Bosscher + + * decl.c (build_sym): Split out initialization expression parts... + (add_init_expr_to_sym): ...to here. + (variable_decl): Add the symbol following an attribute list to the + symbol tree before parsing the optional initialization expression + if the symbol is not of a derived type. + * primary.c (g95_match_rvalue): Don't assume a symbol always has + a value if it is a PARAMETER. + +2003-01-14 Steven Bosscher + + * misc.c: Don't #include + * module.c: Ditto. Kill uses of mtrace, muntrace. If there + ever was a glibc bug, then either this was never reported to + glibc people, or it has been fixed for so long that there's + no information you can find about it, anywhere. + +2003-01-14 Steven Bosscher + + Fix warnings: + * module.c (attr_bits, bt_types, array_spec_types): + Switch 'const' and 'static'. + * iresolve.c (g95_resolve_reshape): Make __resolve0 non-'const'. + + GNU'ify source code: + * trans-io.c: Numerous fixes, one fixed warning and a few + TODO markers so that we don't forget about them. + +2003-01-13 Paul Brook + + * intrinsic.c (add_functions): Add G95_ISYM_SCALE. + * intrinsic.h (g95_generic_isym_id): Remove bogus G95_ISYM_ANINIT. + Add G95_ISYM_SCALE. + * trans-intrinsic.c (g95_conv_intrinsic_function): Ditto + * match.c (g95_match_stop): Fix dumb == -> != error. + +2003-01-13 Steven Bosscher + + * dump-parse-tree.c (show_indent): Add line breaks. This + whole dumping process needs cleanups. + * f95-lang.c (g95_mark_addressable): Fix prototype to match + the langhook. Fix 'return's accordingly. + * g95-support.h: Adjust prototype. + * g95.h: Add 'no_backend' member to 'g95_option_t' struct. + * lang-options.h: Add '-fsyntax-only'. + * options.c (g95_init_options): Init 'no_backend'. + (g95_parse_arg): Deal with '-fsyntax-only'. + * parse.c (g95_parse_file): Do not generate code if 'no_backend' + is set. + +2003-01-13 Steven Bosscher + Patch from Arnaud + * resolve.c (resolve_symbol): Assumed shape arrays must be dummy + arguments. Also make sure that if a symbol is marked INTRINSIC, + an intrinsic with the symbol's name actually exists. + (check_conflict): Make EXTERNAL and DIMENSION attributes conflict. + Do not allow PROCEDURES to have the SAVE, POINTER, TARGET, + ALLOCATABLE, RESULT, IN_NAMESPACE, OPTIONAL or FUNCTION attribute. + +2003-01-13 Steven Bosscher + + * resolve.c (resolve_contained_functions): Fix condition, don't + throw internal_error if a child namespace has no name. Apparently + this can be the case? + +2003-01-11 Paul Brook + + Port changes from Andy's tree: + * g95.h (g95_code): Add stop_code. + * match.c (g95_match_stop): Detter syntax checking. + * resolve.c (resolve_generic_f0): Return match type. + (resolve_generic_f): Remove dead/duplicated code. + (resolve_specific_f): Ditto. + * dump-parse-tree.c (g95_show_code_node): Handle new STOP format. + * trans-decl.c (gfor_fndel_stop_*): New fndecl nodes. + * trans-stmt.c (g95_trans_stop): Handle new STOP format. + +2003-01-11 Paul Brook + + * trans-array.c: Various documentation/comment changes. + * trans-stmt.c: Ditto. + + +2003-01-10 Paul Brook + + * options.c/h: Add -fdump-parse-tree as alias of -v. + +2003-01-10 Steven Bosscher + + * dump-parse-tree.c (g95_show_namespace): Fixed another + typo. Sorry, it's Friday... + +2003-01-10 Steven Bosscher + + Spotted by Tobi: + * trans-array.c, trans-array.h, trans.c, trans-const.c, + trans-const.h, trans-decl.c, trans-expr.c, trans.h + trans-intrinsic.c, trans-io.c, trans-stmt.c, trans-stmt.h + trans-types.c: Fix bogus copyright years, add 2003. + * trans-types.h: Give copyright header. + +2003-01-10 Steven Bosscher + + * dump-parse-tree.c (g95_show_namespace): Fixed typo. + * expr.c, options.c, scanner.c: Add some more 'const' markers. + * intrinsic.c: Some constant strings moved to read-only memory. + * io.c (format_asterisk): Move to... + * g95.h: ...here. + +2003-01-10 Steven Bosscher + + * dump-parse-tree.c (g95_show_namespace): Dump implicit + types for ranges instead of per-letter. Indent the + 'CONTAINS' just like everything else. + * resolve.c (resolve_contained_functions): Clarify comment. + Explain non-obvious conditional expression. Improve + diagnostics if tyoe cannot be resolved. + Port semi-fix from Andy's tree: + (was_declared): Move up before first use. + (generic_sym, specific_sym): New functions. Code moved + out if procedure_kind. + (procedure_kind): Simplify using new functions. + (resolve_generic_f): Make sure the functions we find in + a parent namespace is generic. + (resolve_specific_f): Ditto for specific functions. + +2003-01-10 Steven Bosscher + + * trans-stmt.c, trans.c: Fix some code style issues. Add + some more comment (but still not enough!). + +2003-01-10 Steven Bosscher + + * symbol.c (flavors, procedures, intents, acces_types, + access_types, ifsrc_types): Make const. + * misc.c (g95_string2code): Make 'm' param 'const'. + * module.c (find_enum, write_atom, mio_name): Make + 'm' param 'const'. + (attr_bits, bt_types, array_spec_types, array_ref_types, + ref_types, expr_types): Make const. + * g95.h: Adjust external decls. + +2003-01-09 Paul Brook + + * Testsuite: Add a load of new cases. + +2003-01-08 Steven Bosscher + + * Make-file.in: Add dependency on back end header files; + a parallel build should work now. + * f95-lang-c (lang_identifier): Remove bogus comment. + (g95_be_parse_file): Fix prototype. + (g95_init): Make static. + (g95_finish): Make static. + * error.c (g95_syntax_error): Kill. Make define in... + * g95.h (g95_syntax_error): Define. + (g95.options): Make 'source' member 'const'. + * interface.c (g95_match_interface): Explain + hard-to-read condition. + (g95_match_end_interface): Ditto. + * trans_const.c (g95_build_string_const): Make 's' parameter + 'const'. + * trans_const.h: Adjust protoype accordingly. + * trans-decl.c: Include tree-dump.h + (g95_generate_function_code): Build fixes for recent changes + in the tree-ssa branch. + +2003-01-08 Steven Bosscher + + * format.c: Kill, move code from here... + * io.c: ...to here. + * Make-lang.in: Adjust. + * MANIFEST: Ditto. + * match.h: Ditto. + * BUGS: Mention where to submit bugs. Move old content... + * TODO: ...to here. New file. + +2003-01-08 Steven Bosscher + Fix most warnings, and suppress the ones we can't fix for now. + * Make-lang.in: Suppress warnings about bad proto's in g95.h, + these warnings just clutter the screen and there's not much + we can do about them for now anyway. + * check.c, iresolve.c: Mark unused function parameters. + * dump-parse-tree.c (g95_show_array_spec): Punt on AS_UNKNOWN, + they should be resolved before they get here. + * error.c: Remove unused FILE *status_out. + * f95-lang.c (g95_init): Remove bogus cast. + * Many files: Make things 'const' where required. + * g95.h: Fix prototypes for all modified functions above. + (g95_options): Remove 'object' member. + +2003-01-07 Steven Bosscher + + * Make-file.in: Cleanup bogus targets. Add more comment. + * lang-options.h: New option '-w'. + * g95.h: add no_options field to struct g95_options. + * options.c (g95_init_options): Default no_warnings to off. + (g95_parse_arg): Recognise the '-w' switch and its alias, + '-fno-warnings'. + * error.c (g95_warning, g95_warning_now): Don't emit warning if + no_warning option is set. + * iresolve.c (g95_resolve_shape): Fix warning. + +2003-01-07 Steven Bosscher + + * primary.c (g95_next_string_char): Rename next_string_char, and + make static. Adjust callers accordingly. + * resolve.c (resolve_generic_f0): Return try, not match. Adjust + callers accordingly. + * g95.h: Split out all g95_match* functions to... + * match.h: ...here. New file. + * array.c, decl.c, expr.c, format.c, interface.c, io.c, match.c, + matchexp.c, module.c, parse.c, primary.c: Inlcude match.h + +2003-01-07 Steven Bosscher + + * symbol.c (g95_clear_new_implicit, g95_add_new_implicit_range, + g95_merge_new_implicit): New functions. + (g95_match_implicit_none, g95_match_implicit): Move from here... + * match.c (g95_match_implicit_none, g95_match_implicit): ... to here. + Modify to use the new functions in symbol.c. + * g95.h: Add and move prototypes. + +2003-01-06 Steven Bosscher + + * bbt.c (insert): Use a typedef'ed compare_fn prototype for the + node compare function. + (g95_insert_bbt): Likewise. + (g95_insert_bbt_with_overlap): Likewise. + (g95_delete_bbt): Likewise. + (delete_treap): Likewise. Also fix a potential bug when calling it. + * module.c (compare_pointers): Change proto to compare_fn. + (compare_integers): Likewise. + (compare_true_names): Likewise. + (find_true_name): Adjust call to compare_true_names to match proto. + (require_atom, write_atom, mio_name): Fix 'const' warnings. + (init_pi_tree): Make compare a compare_fn instead of (int *). + * resolve.c (compare_cases): Change proto to compare_fn. + * symbol.c (g95_compare_symtree): Change proto to compare_fn, make + it static, and rename to compare_symtree. + (delete_symtree, g95_undo_symbols, g95_new_symtree): Use renamed + function. + * g95.h: Kill g95_compare_symtree prototype. Adjust prototypes + of g95_insert_bbt, g95_insert_bbt_with_overlap, and g95_delete_bbt. + +2003-01-06 Steven Bosscher + * Make-lang.in: Fix spaces/tabs issues from previous patch. + * patch.options: Blow away Paul's checkin mistake :-) + * io.c (terminate_io): Fix memory leak (Arnaud). + +2003-01-06 Steven Bosscher + + * Make-lang.in: Teach about building DVI, info manual. + * g95.texi: New file. + +2003-01-02 Paul Brook + + * trans-array.c (g95_reverse_ss): Make static and don't use. + (g95_conv_ss_descriptor): Don't use g95_loopinfo + (g95_conv_array_parameters): Modify for pointer assignments. + (g95_walk_subexpr): New function. + (g95_walk_expr*): Use it. + * trans-array.h (g95_reverse_ss): Remove prototype. + * trans-expr.c (g95_trans_pointer_assign): Implement. + (Many): Set se.want_pointer before calling g95_conv_array_parameter. + * trans-intrinsic.c: Sync with scalarizer changes. + * trans-io.c: Ditto. diff --git a/gcc/fortran/ChangeLog-2004 b/gcc/fortran/ChangeLog-2004 new file mode 100644 index 00000000000..209ff5a88df --- /dev/null +++ b/gcc/fortran/ChangeLog-2004 @@ -0,0 +1,2846 @@ +2004-12-29 Steven G. Kargl + + * gfortran.h (gfc_case): fix typo in comment. + +2004-12-27 Tobias Schlueter + + * trans-intrinsic.c (gfc_conv_intrinsic_ishft): Change to + logical shift. Call fold. Remove 0-bit shift shortcut. + (gfc_conv_intrinsic_ishftc): Convert first argument to at least + 4 bytes bits. Convert 2nd and 3rd argument to 4 bytes. Convert + result if width(arg 1) < 4 bytes. Call fold. + + PR fortran/19032 + * trans-intrinsic.c (gfc_conv_intrinsic_mod): Update comment + in front of function to match the standard. Correct handling + of MODULO. + +2004-12-27 Andrew Pinski + + * trans-expr.c (gfc_conv_cst_int_power): Only check for + flag_unsafe_math_optimizations if we have a float type. + +2004-12-23 Steven G. Kargl + + * gfortran.texi: Fix typo. + +2004-12-16 Tobias Schlueter + + * trans-intrinsic.c (build_fixbound_expr): Clarify comment, fix + comment typo. + +2004-12-15 Tobias Schlueter + + PR fortran/18993 + * match.c (gfc_match_if): Don't explicitly skip optional whitespace. + (gfc_match_nullify): Make sure that ')' is in front of the end of + statement. + + * scanner.c (skip_fixed_comments): Fix typo in comment preceding + function. + +2004-12-14 Richard Henderson + + * gfortran.h (gfc_expr.function.name): Make const. + (gfc_iresolve_init_1, gfc_iresolve_done_1): Remove. + (gfc_get_string): Update prototype. + * iresolve.c: Include tree.h. + (string_node, HASH_SIZE, string_head, hash): Remove. + (gfc_get_string): Use vsnprintf, get_identifier. + (free_strings, gfc_iresolve_init_1, gfc_iresolve_done_1): Remove. + * misc.c (gfc_init_1): Don't call gfc_iresolve_init_1. + (gfc_done_1): Don't call gfc_iresolve_done_1. + * module.c (mio_allocated_string): Take and return const char *, + instead of modifying char**. + (mio_expr): Update to match. + * resolve.c (pure_function): Constify name argument. + (resolve_function): Constify name. + * trans-intrinsic.c (gfc_conv_intrinsic_function): Likewise. + +2004-12-12 Richard Henderson + + * iresolve.c (gfc_resolve_all, gfc_resolve_any, gfc_resolve_count, + gfc_resolve_cshift, gfc_resolve_dot_product, gfc_resolve_eoshift, + gfc_resolve_matmul, gfc_resolve_maxloc, gfc_resolve_maxval, + gfc_resolve_minloc, gfc_resolve_minval, gfc_resolve_pack, + gfc_resolve_product, gfc_resolve_reshape, gfc_resolve_shape, + gfc_resolve_spread, gfc_resolve_sum, gfc_resolve_transpose, + gfc_resolve_unpack: Use PREFIX. + +2004-12-12 Tobias Schlueter + + PR fortran/18869 + * match.c (gfc_match_common): Skip whitespace. + +2004-12-12 Steven G. Kargl + + PR fortran/16581 + * check.c (gfc_check_iand, gfc_check_ibclr, gfc_check_ibits, + gfc_check_ibset, gfc_check_ieor, gfc_check_ior): Remove default + integer kind check; Issue error for -std=f95 when needed. + * intrinsic.c (add_functions): Change ieor from GFC_STD_GNU to + GFC_STD_F95. + * iresolve.c (gfc_resolve_iand, gfc_resolve_ieor, gfc_resolve_ior): + Promote arguments to same kind. + +2004-12-12 Steven G. Kargl + Paul Brook + + PR fortran/16222 + * resolve.c (gfc_resolve_iterator_expr): New function. + (gfc_resolve_iterator): Use it. Add real_ok argument. Convert + start, end and stride to correct type. + (resolve_code): Pass extra argument. + * array.c (resolve_array_list): Pass extra argument. + * gfortran.h (gfc_resolve): Add prototype. + * trans-stmt.c (gfc_trans_do): Remove redundant type conversions. + Handle real type iterators. + +2004-12-11 Tobias Schlueter + + PR fortran/17175 + * iresolve.c (gfc_resolve_scale): Convert 'I' argument if not of + same kind as C's 'int'. + (gfc_resolve_set_exponent): Convert 'I' argument if not of kind 4. + +2004-12-08 Richard Henderson + + * intrinsic.c (gfc_convert_type_warn): Propagate the input shape + to the output expression. + * iresolve.c (gfc_resolve_cshift, gfc_resolve_eoshift): Suppress + warning conversion. + (gfc_resolve_reshape): Force convert SHAPE and ORDER parameters + to index kind. + +2004-12-08 Tobias Schlueter + + PR fortran/18826 + * resolve.c (resolve_code): Impose correct restrictions on + assigned variable. + + * decl.c (gfc_match_end): Use locus of END when eos is an error. + +2004-12-02 Steven G. Kargl + Paul Brook + + * check.c (gfc_check_flush, gfc_check_fnum): New functions. + (gfc_check_fstat, gfc_check_fstat_sub): New functions. + (gfc_check_stat, gfc_check_stat_sub): New functions. + * gfortran.h (GFC_ISYM_FNUM,GFC_ISYM_FSTAT,GFC_ISYM_STAT): New symbols + * intrinsic.c (add_functions,add_subroutines): Add flush, fnum, + fstat, and stat to intrinsics symbol tables. + * intrinsic.h (gfc_check_flush, gfc_resolve_stat_sub): Add prototypes. + (gfc_resolve_fstat_sub, gfc_resolve_stat): Ditto. + * iresolve.c (gfc_resolve_fnum, gfc_resolve_fstat): New functions. + (gfc_resolve_stat, gfc_resolve_flush): New functions. + (gfc_resolve_stat_sub,gfc_resolve_fstat_sub): New functions + * trans-intrinsic.c (gfc_conv_intrinsic_function): Add new intrinsics. + +2004-12-02 Steven G. Kargl + + * intrinsic.c: Fix and add comments, fix function declarations + (OPTIONAL,REQUIRED): New symbols + (add_functions,add_subroutines): Use symbols + (gmp.h): Remove unused include + +2004-11-25 Joseph S. Myers + + * f95-lang.c, gfortranspec.c, trans-decl.c: Avoid ` as left quote + in diagnostics. + +2004-11-24 Steven Bosscher + + * options.c (gfc_post_options): Don't clear flag_inline_functions. + +2004-11-20 Steven G. Kargl + + * check.c (gfc_check_getcwd_sub): Fix seg fault. + + * check.c (gfc_check_exit,gfc_check_umask,gfc_check_umask_sub, + gfc_check_unlink,gfc_check_unlink_sub): New functions + * gfortran.h (GFC_ISYM_UMASK,GFC_ISYM_UNLINK): New symbols + * intrinsic.c (add_functions,add_subroutines): Add umask, unlink, + exit to intrinsics symbol tables. + * intrinsic.h (gfc_check_umask,gfc_check_unlink,gfc_check_exit, + gfc_check_umask_sub,gfc_check_unlink_sub,gfc_resolve_umask, + gfc_resolve_unlink,gfc_resolve_exit,gfc_resolve_umask_sub, + gfc_resolve_unlink_sub): Add and sort prototypes. + * iresolve.c (gfc_resolve_umask,gfc_resolve_unlink,gfc_resolve_exit, + gfc_resolve_umask_sub,gfc_resolve_unlink_sub): New functions + * trans-intrinsic.c (gfc_conv_intrinsic_function): Use symbols + +2004-11-16 Paul Brook + + PR fortran/13010 + * trans-array.c (gfc_trans_allocate_temp_array): Use gfc_get_dtype. + (gfc_array_init_size, gfc_conv_expr_descriptor): Ditto. + * trans-types.c (gfc_get_dtype): Accept array type rather than element + type. + (gfc_get_nodesc_array_type): Don't set GFC_TYPE_ARRAY_DTYPE. + (gfc_get_array_type_bounds): Ditto. + (gfc_get_derived_type): Recurse into derived type pointers. + * trans-types.h (gfc_get_dtype): Add prototype. + * trans.h (GFC_TYPE_ARRAY_DTYPE): Add comment. + +2004-11-15 Paul Brook + + * trans-types.c (gfc_get_dtype): Remove obsolete TODO. + +2004-11-10 Paul Brook + + PR fortran/18375 + * trans-expr.c (gfc_trans_subarray_assign): Free shape before ss. + * trans-io.c (transfer_array_component): Ditto. + +2004-11-10 Paul Brook + + * invoke.texi: Fix typo. + +2004-11-08 Kazu Hirata + + * arith.c, array.c, decl.c, expr.c, f95-lang.c, gfortran.h, + gfortranspec.c, interface.c, intrinsic.c, iresolve.c, match.c, + module.c, parse.c, parse.h, primary.c, resolve.c, scanner.c, + trans-array.c, trans-array.h, trans-expr.c, trans-intrinsic.c, + trans-io.c, trans-stmt.c, trans.h: Fix comment formatting. + +2004-11-06 Tobias Schlueter + + PR fortran/18023 + * io.c (resolve_tag): Tighten up exception for assigned FORMAT. + +2004-11-06 Kazu Hirata + + * gfortranspec.c: Replace GNU CC with GCC. + +2004-11-05 Tobias Schlueter + + * gfortranspec.c (lang_specific_driver): Change year to 2004. + +2004-11-05 Tobias Schlueter + + PR fortran/18111 + * trans-decl.c (create_function_arglist): Set DECL_ARTIFICIAL for + hidden parameters. + +2004-11-05 Tobias Schlueter + + PR fortran/15164 + * trans-decl.c (gfc_finish_var_decl): Don't declare arguments to + module procedures as if they were module variables. + +2004-11-03 Tobias Schlueter + + PR fortran/17535 + PR fortran/17583 + PR fortran/17713 + * module.c (write_symbol1): Set module_name for dummy arguments. + +2004-11-02 Paul Brook + + * intrinsic.c (check_intrinsic_standard): Include error locus. + Remove VLA. + (gfc_intrinsic_func_interface, gfc_intrinsic_sub_interface): Pass + locus to check_intrinsic_standard. + +2004-10-31 Janne Blomqvist + + PR fortran/17590 + * gfortran.h: Change GFC_STD_* flags to more appropriate + ones. (struct gfc_intrinsic_isym): Add field for standard. (struct + gfc_option_t): Add field for warning about use of nonstandard + intrinsics. + * intrinsic.c (add_sym): Add parameter for standard version, check + this against current standard. + (add_sym_0): Pass standard parameter to add_sym. + (add_sym_1, add_sym_0s, add_sym_1s, add_sym_1m, add_sym_2): Ditto. + (add_sym_2s, add_sym_3, add_sym_3ml, add_sym_3red, add_sym_3s): Ditto. + (add_sym_4, add_sym_4s, add_sym_5, add_sym_5s): Ditto. + (make_generic): Add parameter for standard, check this + against currently selected standard. + (add_functions, add_subroutines): Add parameter to tell which + standard an intrinsic belongs to. + (check_intrinsic_standard): New function. + (gfc_intrinsic_func_interface): Add call to check_intrinsic_standard. + (gfc_intrinsic_sub_interface): Ditto. + * lang.opt: Add Wnonstd-intrinsics option. + * options.c (gfc_init_options): Change to use new GFC_STD_* flags, + init new warning. + (set_Wall): Add warning about nonstd intrinsics. + (gfc_handle_option): Change to use new GFC_STD_* flags, + handle new warning. + * invoke.texi: Update manual to include -Wnonstd-intrinsics. + +2004-10-30 Andrew Pinski + + * f95-lang.c (lang_tree_node): Add chain_next to be the TREE_CHAIN. + +2004-10-30 Tobias Schlueter + + * simplify.c (twos_complement): Calculate mask in GMP arithmetic. + +2004-10-30 Tobias Schlueter + + * trans.c (gfc_trans_code): Set global locus after recursing. Fix + comment typo. + +2004-10-30 Canqun Yang + + * check.c (gfc_check_rand): Allow missing optional argument. + (gfc_check_irand): Ditto. + * intrinsic.c (add_functions): Set arg optional flag for {i,}rand. + +2004-10-28 Scott Robert Ladd + + PR fortran/13490, PR fortran/17912 + * gcc/fortran/gfortran.h: Added pedantic_min_int to gfc_integer_info + * gcc/fortran/gfortran.h: Added ARITH_ASYMMETRIC to arith + * gcc/fortran/arith.c: Added support for an "asymmetric integer" + warning when compiling with pedantic. + * gcc/fortran/arith.c: Set minimum integer values to reflect + realities of two's complement signed integers. Added + pedantic minimum. + +2004-10-17 Andrew Pinski + + * Make-lang.in (F95_ADDITIONAL_OBJS): Kill. + (f951): Do not depend on F95_ADDITIONAL_OBJS and don't + link it in. + +2004-10-14 Tobias Schlueter + + * trans-decl.c (generate_local_decl): Simplify logic, fix comment + typo. + (gfc_generate_function_code): Fix formatting issue. + +2004-10-10 Tobias Schlueter + + * module.c: Fix formatting issues. + +2004-10-09 Tobias Schlueter + + * module.c (mio_interface_rest): Set where member of interface + while loading. + +2004-10-08 Andrew Pinski + + PR fortran/17901 + * options.c (gfc_handle_option): Add break after handing the + J/M option. + +2004-10-08 Tobias Schlueter + + * arith.c: Fix formatting issues. + +2004-10-07 Tobias Schlueter + + PR fortran/17676 + * resolve.c (resolve_operator): Use correct operator name in message. + +2004-10-07 Tobias Schlueter + + * primary.c (match_boz_constant): Allow kind parameter suffixes. + Move standard warning further to the front. + +2004-10-07 Kazu Hirata + + * trans-stmt.c: Fix a comment typo. + +2004-10-07 Paul Brook + + PR fortran/17678 + * trans-array.c (gfc_trans_deferred_array): Leave use associated + variables alone. + +2004-10-06 Tobias Schlueter + + PR fortran/17568 + * simplify.c (twos_complement): New function. + (gfc_simplify_ishft, gfc_simplify_ishftc): Revise. + + * simplify.c (gfc_simplify_abs): Use mpfr_hypot for CABS. + +2004-10-06 Paul Brook + + * trans-stmt.c (gfc_trans_simple_do): New function. + (gfc_trans_do): Use it. Evaluate iteration bounds before entering + loop. Update comments. + +2004-10-04 Tobias Schlueter + + PR fortran/17283 + * iresolve.c (gfc_resolve_pack): Choose function depending if mask + is scalar. + + PR fortran/17631 + * intrinsic.c (add_sym_5): Remove. + (add_subroutines): Add resolution function for MVBITS. + * intrinsic.h (gfc_resolve_mvbits): Declare resolution function for + MVBITS + * iresolve.c (gfc_resolve_mvbits): New function. + (gfc_resolve_random_number): Remove empty line at end of function. + + * trans-const.c (gfc_build_cstring_const): New function. + (gfc_init_cst): Use new function. + * trans-const.h (gfc_build_cstring_const): Add prototype. + * trans-io.c (set_string, set_error_locus): Use new function. + * trans-stmt.c (gfc_trans_goto): Use new function. + + PR fortran/17708 + * parse.c (accept_statement): Don't treat END DO like END IF and + END SELECT. + (parse_do_block): Generate possible END DO label inside END DO + block. + + PR fortran/17776 + * check.c (gfc_check_system_sub): New function. + * gfortran.h (gfc_generic_isym_id): Add GFC_ISYM_SYSTEM. + * intrinsic.c (add_functions): Add 'system'. + (add_subroutines): Add 'system'. + * intrinsic.h (gfc_check_etime_sub, gfc_check_getcwd_sub): + Move prototypes to other suborutines. + (gfc_check_system_sub, gfc_resolve_system, gfc_resolve_system_sub): + Add prototype. + (gfc_resolve_system_clock): Fix formatting of prototype. + * iresolve.c (gfc_resolve_system, gfc_resolve_system_sub): New + functions. + * trans-intrinsic.c (gfc_conv_intrinsic_function): Deal with + GFC_ISYM_SYSTEM. + +2004-10-04 Erik Schnetter + + * scanner.c (preprocessor_line): Accept preprocessor lines without + file names. Check file names for closing quotes. Handle escaped + quotes in file names. + +2004-10-04 Tobias Schlueter + Paul Brook + + * trans-array.c (gfc_conv_expr_descriptor): Check for substriungs. + Use gfc_get_expr_charlen. + * trans-expr.c (gfc_get_expr_charlen): New function. + * trans.h (gfc_get_expr_charlen): Add prototype. + +2004-10-04 Kazu Hirata + + * trans-intrinsic.c: Fix a comment typo. + +2004-10-03 Tobias Schlueter + + * simplify.c (range_check): Remove blank line at beginning of function. + (gfc_simplify_dint): Same at end of function. + (gfc_simplify_exponent, gfc_simplify_fraction): Simplify calculations. + (gfc_simplify_bound): Fix indentation. + (gfc_simplify_log10): Simplify calculation. + (gfc_simplify_min, gfc_simplify_max): Remove blank line at beginning + of function. + (gfc_simplify_nearest): Same at end of function. + (gfc_simplify_nint, gfc_simplify_idnint): Same at beginning of + function. + (gfc_simplify_rrspacing, gfc_simplify_set_exponent, + gfc_simplify_spacing): Simplify calulations. + +2004-10-03 Feng Wang + + * trans-intrinsic.c: Fix comments on spacing and rrspacing + (gfc_conv_intrinsic_rrspacing): Add fold on constant trees. + +2004-10-01 Jan Hubicka + + * f95-lang.c (gfc_expand_function): Update call of + tree_rest_of_compilation. + * trans-decl.c (gfc_generate_constructors): Likewise. + +2004-09-26 Tobias Schlueter + + * trans-intrinsic.c: Comment fixes. + +2004-09-25 Tobias Schlueter + + * decl.c (add_init_expr_to_sym, variable_decl): Comment fixes. + +2004-09-24 Tobias Schlueter + + * trans-types.c (gfc_return_by_reference): Remove superfluous + assertion. + + * intrinsic.h (gfc_resolve_getcwd): Update prototype. + * iresolve.c (gfc_resolve_getcwd): Add second argument to function. + + PR fortran/17615 + * trans-expr.c (gfc_trans_arrayfunc_assign): Look at resolved + function to determine return type. + +2004-09-20 Jan Hubicka + + * trans-decl.c (build_entry_thunks): Finalize the function; do not lower + tree. + (gfc_generate_function_code): Likewise. + +2004-09-20 Tobias Schlueter + + PR fortran/15957 + * simplify.c (gfc_simplify_reshape): Set shape of return value + correctly. + +2004-09-17 Jeffrey D. Oldham + Zack Weinberg + + * f95-lang.c, trans-expr.c, trans.c: Update for new tree-class + enumeration constants. + +2004-09-17 Paul Brook + + * gfortran.h (struct gfc_linebuf): Don't use C99 empty arrays. + (gfc_linebuf_header_size): Define. + * scanner.c (load_file): Use it. + +2004-09-16 Kazu Hirata + + * array.c, data.c, decl.c, dependency.c, error.c, f95-lang.c, + interface.c, intrinsic.c, io.c, misc.c, module.c, parse.h, + resolve.c, scanner.c, trans-array.c, trans-array.h, + trans-common.c, trans-const.h, trans-decl.c, trans-expr.c, + trans-intrinsic.c, trans-stmt.c, trans-types.c, trans.c, + trans.h: Fix comment typos. Follow spelling conventions. + +2004-09-16 Victor Leikehman + + PR/15364 + * trans-io.c (transfer_array_component): New function. + (transfer_expr): For array fields, call transfer_array_component. + +2004-09-16 Kazu Hirata + + * gfortran.texi: Fix a typo. + +2004-09-15 Aaron W. LaFramboise + + * parse.c (eof_buf): Rename eof to eof_buf. + (unexpected_eof): Same. + (gfc_parse_file): Same. + +2004-09-15 Steven G. Kargl + + * check.c (gfc_check_getcwd_sub): New function. + * gfortran.h (GFC_ISYM_GETCWD): New symbol. + * intrinsic.c (add_functions): Add function definition; + Use symbol. + * intrinsic.c (add_subroutines): Add subroutine definitions. + * intrinsic.h: Add prototypes. + * iresolve.c (gfc_resolve_getcwd, gfc_resolve_getcwd_sub): + New functions. + * trans-intrinsic.c (gfc_conv_intrinsic_function): Use symbol. + +2004-09-15 Tobias Schlueter + + PR fortran/16485 + * module.c (write_symbol): Don't fill in module name here. + (write_symbol0): Fill in here instead. + +2004-09-14 Kazu Hirata + + * data.c, decl.c, f95-lang.c, gfortran.h, match.c, + trans-array.c, trans-common.c, trans-expr.c, + trans-intrinsic.c, trans-stmt.c, trans-types.c, trans.h: Fix + comment typos. Follow spelling conventions. + +2004-09-09 Paul Brook + + * scanner.c (get_file): Add ATTRIBUTE_UNUSED. + +2004-09-08 Paul Brook + + * array.c: Don't include assert.h. + * data.c: Don't include assert.h. Replace assert and abort with + gcc_assert and gcc_unreachable. + * dependency.c: Ditto. + * f95-lang.c: Ditto. + * iresolve.c: Ditto. + * resolve.c: Ditto. + * simplify.c: Ditto. + * symbol.c: Ditto. + * trans-array.c: Ditto. + * trans-common.c: Ditto. + * trans-const.c: Ditto. + * trans-decl.c: Ditto. + * trans-expr.c: Ditto. + * trans-intrinsic.c: Ditto. + * trans-io.c: Ditto. + * trans-stmt.c: Ditto. + * trans-types.c: Ditto. + * trans.c: Ditto. + +2004-09-07 Per Bothner + Paul Brook + + * error.c (show_locus): Handle mapped locations. + * f95-lang.c (gfc_be_parse_file): Initialize mapped locations. + * gfortran.h: Include input.h. + (struct gfc_linebuf): Use source_location. + * scanner.c (get_file): Initialize linemap. + (preprocessor_line): Pass extra argument to get_file. + (load_file): Ditto. Setup linemap. + (gfc_new_file): Handle mapped locations. + * trans-common.c (build_field, build_equiv_decl, build_common_decl): + Set decl source locations. + (gfc_trans_common): Set blank common block location. + * trans-decl.c (gfc_set_decl_location): New function. + (gfc_get_label_decl, gfc_get_symbol_decl): Use it. + (trans_function_start): Move call to gfc_set_backend_locus.. + (build_function_decl): ... to here. + (build_entry_thunks): Set and restore the backend locus. + (gfc_generate_constructors): Remove excess arguments to + init_function_start. + (gfc_generate_block_data): Add comments. Set the decl locus. + * trans-io.c (set_error_locus): Handle mapped locations. + * trans.c (gfc_get_backend_locus, gfc_get_backend_locus): Ditto. + (gfc_trans_code): Use SET_EXPR_LOCATION. + (gfc_generate_code): Override the location of the new symbol. + * trans.h (gfc_set_decl_location): Add prototype. + +2004-08-31 Paul Brook + + * trans-types.c (gfc_type_for_mode): Return NULL for unknown modes. + +2004-09-01 Tobias Schlueter + + PR fortran/15327 + * trans-intrinsic.c (gfc_conv_intrinsic_merge): Do the right thing for + strings. + +2004-09-01 Tobias Schlueter + + PR fortran/16400 + PR fortran/16404 + (port from g95) + * resolve.c (resolve_transfer): New function. + (resolve_code): Call resolve_transfer in case of EXEC_TRANSFER. + +2004-08-31 Tobias Schlueter + + PR fortran/16579 + * trans-types.c (gfc_init_types): Make gfc_character1_type_node an + unsigned char. + +2004-08-31 Tobias Schlueter + + * CONTRIB, NEWS, README, TODO: Remove obsolete files. + +2004-08-31 Tobias Schlueter + + PR fortran/17244 + * trans-types.c (gfc_return_by_reference): Remove TODO error, + add comment pointing out possible issue WRT compatibility with g77. + +2004-08-31 Tobias Schlueter + + * trans-decl.c, trans-expr.c, trans-io.c, trans-types.c: Replace + all occurences of 'gfc_strlen_type_node' by + 'gfc_charlen_type_node'. + * trans-types.h: Same. Also update comment accordingly. + +2004-08-31 Tobias Schlueter + + * primary.c: Update copyright boilerplate to say GCC. + * f95-lang.c: Change initial comment to say gfortran. + +2004-08-31 Paul Brook + + * trans-types.h: Add comments. + (intmax_type_node, string_type_node, const_string_type_node): Remove. + +2004-08-30 Richard Henderson + + * Make-lang.in (fortran/f95-lang.o): Update dependencies. + (fortran/trans-decl.o, fortran/trans-types.o): Likewise. + * gfortran.h (gfc_integer_info): Add c_char, c_short, c_int, + c_long, c_long_long. + (gfc_logical_info): Add c_bool. + (gfc_real_info): Add mode_precision, c_float, c_double, c_long_double. + * trans-array.c (gfc_array_allocate): Use TYPE_PRECISION + rather than gfc_int[48]_type_node for allocate choice. + * trans-decl.c (gfc_build_intrinsic_function_decls): Cache + local copies of some kind type nodes. + (gfc_build_builtin_function_decls): Likewise. + * trans-expr.c (gfc_conv_power_op): Likewise. + * trans-intrinsic.c (gfc_conv_intrinsic_index, + gfc_conv_intrinsic_scan, gfc_conv_intrinsic_verify, + gfc_conv_intrinsic_trim, gfc_conv_intrinsic_repeat): Likewise. + * trans-stmt.c (gfc_trans_pause, gfc_trans_stop, + gfc_trans_character_select, gfc_trans_allocate): Likewise. + * trans-io.c (gfc_pint4_type_node): Move into ... + (gfc_build_io_library_fndecls): ... here. Cache local copies of + some kind type nodes. + * trans-types.c (gfc_type_nodes): Remove. + (gfc_character1_type_node, gfc_strlen_type_node): New. + (gfc_integer_types, gfc_logical_types): New. + (gfc_real_types, gfc_complex_types): New. + (gfc_init_kinds): Fill in real mode_precision. + (gfc_build_int_type, gfc_build_real_type): New. + (gfc_build_complex_type, gfc_build_logical_type): New. + (c_size_t_size): New. + (gfc_init_types): Loop over kinds. + (gfc_get_int_type, gfc_get_real_type): Use gfc_validate_kind. + (gfc_get_complex_type, gfc_get_logical_type): Likewise. + (gfc_get_character_type_len): Likewise. + (gfc_type_for_size): Loop over kinds; use a reduced set of + unsigned type nodes. + (gfc_type_for_mode): Loop over kinds. + (gfc_signed_or_unsigned_type): Use gfc_type_for_size. + (gfc_unsigned_type, gfc_signed_type): Use gfc_signed_or_unsigned_type. + * trans-types.h (F95_INT1_TYPE, F95_INT2_TYPE, F95_INT4_TYPE, + F95_INT8_TYPE, F95_INT16_TYPE, F95_REAL4_TYPE, F95_REAL8_TYPE, + F95_REAl16_TYPE, F95_COMPLEX4_TYPE, F95_COMPLEX8_TYPE, + F95_COMPLEX16_TYPE, F95_LOGICAL1_TYPE, F95_LOGICAL2_TYPE, + F95_LOGICAL4_TYPE, F95_LOGICAL8_TYPE, F95_LOGICAL16_TYPE, + F95_CHARACTER1_TYPE, NUM_F95_TYPES, gfc_type_nodes, + gfc_int1_type_node, gfc_int2_type_node, gfc_int4_type_node, + gfc_int8_type_node, gfc_int16_type_node, gfc_real4_type_node, + gfc_real8_type_node, gfc_real16_type_node, gfc_complex4_type_node, + gfc_complex8_type_node, gfc_complex16_type_node, + gfc_logical1_type_node, gfc_logical2_type_node, + gfc_logical4_type_node, gfc_logical8_type_node, + gfc_logical16_type_node, gfc_strlen_kind): Remove. + (gfc_character1_type_node): Turn in to a variable. + (gfc_strlen_type_node): Likewise. + +2004-08-30 Tobias Schlueter + + * gfortran.h (gfc_namespace): Add new field is_block_data. + * parse.c (accept_statement): Remove special handling for BLOCK DATA. + (parse_block_data): Record BLOCK DATA name, set is_block_data field. + * trans.c (gfc_generate_code): Handle BLOCK DATA units. + * trans.h (gfc_generate_block_data): Add prototype. + * trans-decl.c (gfc_generate_block_data): New function. + +2004-08-29 Richard Henderson + + * trans-const.c (gfc_conv_mpz_to_tree): Use mpz_export. + * trans-types.c (gfc_init_kinds): Reject integer kinds larger + than two HOST_WIDE_INT. + +2004-08-29 Tobias Schlueter + + PR fortran/13910 + * decl.c (free_variable, free_value, gfc_free_data, var_list, + var_element, top_var_list, match_data_constant, top_val_list, + gfc_match_data): Move here from match.c. + (match_old_style_init): New function. + (variable_decl): Match old-style initialization. + * expr.c (gfc_get_variable_expr): New function. + * gfortran.h (gfc_get_variable_expr): Add prototype. + * gfortran.texi: Start documentation for supported extensions. + * match.c: Remove the functions moved to decl.c. + * match.h (gfc_match_data): Move prototype to under decl.c. + * symbol.c (gfc_find_sym_tree, gfc_find_symbol): Add/correct + comments. + +2004-08-29 Steven G. Kargl + Paul Brook + + * check.c (gfc_check_besn, gfc_check_g77_math1): New functions. + * f95-lang.c (DO_DEFINE_MATH_BUILTIN): Define. + (DEFINE_MATH_BUILTIN, DEFINE_MATH_BUILTIN_C): Use it. + (build_builtin_fntypes): New function. + (gfc_init_builtin_functions): Use it. + * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_{J,Y}{0,1,N} + and GFC_ISYM_ERF{,C}. + (gfc_c_int_kind): Declare. + * intrinsic.c (add_functions): Add [d]bes* and [d]erf*. + * intrinsic.h (gfc_check_besn, gfc_check_g77_math1, gfc_resolve_besn, + gfc_resolve_g77_math1): Add prototypes. + * resolve.c (gfc_resolve_besn, gfc_resolve_g77_math1): New functions. + * mathbuiltins.def: Add comment. Change third argument. Use + DEFINE_MATH_BUILTIN_C. Add bessel and error functions. + * trans-intrinsic.c (BUILT_IN_FUNCTION): Define. + (DEFINE_MATH_BUILTIN, DEFINE_MATH_BUILTIN_C): Use it. + * trans-types.c (gfc_c_int_kind): Declare. + (gfc_init_kinds): Set it. + +2004-08-29 Steven G. Kargl + Paul Brook + + * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_GET?ID. + (gfc_check_f, gfc_simplify_f): Add f0. + * intrinsic.c (do_check): Call f0. Flatten. + (add_sym_0): Fix prototype. Set f0. + (add_functions): Add getgid, getgid and getuid. + (resolve_intrinsic): Remove obsolete comment. + (do_simplify): Call f0. + * intrinsic.h (gfc_resolve_getgid, gfc_resolve_getpid, + gfc_resolve_getuid): Add prototypes. + * iresolve.c (gfc_resolve_getgid, gfc_resolve_getpid, + gfc_resolve_getuid): New functions. + * trans-intrinsic.c (gfc_conv_intrinsic_function): Handle + GFC_ISYM_GET?ID. + +2004-08-28 Tobias Schlueter + + * error.c (gfc_error_init_1): Remove blank line in front of + function body. Add missing blank. + (gfc_buffer_error, error_char, error_string): Remove blank line in + front of function body. + (show_locus): Add comma in comment. + (gfc_clear_warning, gfc_warning_check, gfc_clear_error, + gfc_push_error, gfc_pop_error): Remove blank line in front of + function body. + (gfc_get_errors): Typo fix in comment in front of function. Remove + blank line in front of function body. + +2004-08-27 Tobias Schlueter + + * gfortran.h (gfc_default_*_kind): Remove prototypes, add extern + variable declaration of same name. + * arith.c, check.c, decl.c, dump_parse_tree.c, expr.c, + intrinsic.c, io.c, iresolve.c, match.c, options.c, primary.c, + resolve.c, simplify.c, symbol.c, trans-const.c, trans-io.c: + Replace all calls to gfc_default_*_kind with variable accesses. + * trans-types.c: Same as above. + (gfc_default_*_kind_1): Rename to gfc_default_*_kind, remove + static qualifier. Replace all occurences. + (gfc_default_*_kind): Remove functions. + +2004-08-26 Richard Henderson + + * arith.c: Include system.h, not real system headers. + (MPZ_NULL, MPF_NULL, DEF_GFC_INTEGER_KIND, DEF_GFC_LOGICAL_KIND, + DEF_GFC_REAL_KIND, GFC_SP_KIND, GFC_SP_PREC, GFC_SP_EMIN, GFC_SP_EMAX, + GFC_DP_KIND, GFC_DP_PREC, GFC_DP_EMIN, GFC_DP_EMAX, GFC_QP_KIND, + GFC_QP_PREC, GFC_QP_EMIN, GFC_QP_EMAX): Remove. + (gfc_integer_kinds, gfc_logical_kinds, gfc_real_kinds, + gfc_index_integer_kind, gfc_default_integer_kind, + gfc_default_real_kind,gfc_default_double_kind, + gfc_default_character_kind, gfc_default_logical_kind, + gfc_default_complex_kind, validate_integer, validate_real, + validate_logical, validate_character, + gfc_validate_kind): Move to trans-types.c. + (gfc_set_model_kind): Use gfc_validate_kind. + (gfc_set_model): Just copy the current precision to default. + (gfc_arith_init_1): Use mpfr precision 128 for integer setup. + * f95-lang.c (gfc_init_decl_processing): Invoke gfc_init_kinds. + * gfortran.h: Update file commentary. + * trans-types.c (MAX_INT_KINDS, MAX_REAL_KINDS): New. + (gfc_default_integer_kind_1, gfc_default_real_kind_1, + gfc_default_double_kind_1, gfc_default_character_kind_1, + gfc_default_logical_kind_1, gfc_default_complex_kind_1): New. + (gfc_init_kinds): New. + (gfc_init_types): Don't set gfc_index_integer_kind here. + * trans-types.h (gfc_init_kinds): Declare. + * doc/invoke.texi: Clarify DOUBLE PRECISION behaviour wrt -r8. + +2004-08-26 Tobias Schlueter + + * check.c (gfc_check_atan2): New function. + * intrinsic.c (add_functions): Use gfc_check_atan2 for ATAN2 + * intrinsic.h (gfc_check_atan2): Add prototype. + +2004-08-25 Richard Henderson + + * arith.c (gfc_validate_kind): Add may_fail argument; abort if + false and we don't validate the kind. + (gfc_check_integer_range, gfc_check_real_range): Update to match. + * check.c (kind_check): Likewise. + * decl.c (gfc_match_old_kind_spec, gfc_match_kind_spec): Likewise. + (match_char_spec, match_logical_spec): Likewise. + * gfortran.h (gfc_validate_kind): Likewise. + * options.c (gfc_handle_option): Likewise. + * primary.c (match_integer_constant, match_real_constant, + match_string_constant, match_logical_constant, + match_const_complex_part): Likewise. + * simplify.c (get_kind, gfc_simplify_bit_size, gfc_simplify_digits, + gfc_simplify_epsilon, gfc_simplify_huge, gfc_simplify_ibclr, + gfc_simplify_ibset, gfc_simplify_ishft, gfc_simplify_ishftc, + gfc_simplify_maxexponent, gfc_simplify_minexponent, + gfc_simplify_nearest, gfc_simplify_not, gfc_simplify_precision, + gfc_simplify_radix, gfc_simplify_range, gfc_simplify_rrspacing, + gfc_simplify_scale, gfc_simplify_spacing, gfc_simplify_tan, + gfc_simplify_tiny): Likewise. + * trans-intrinsic.c (gfc_conv_intrinsic_aint, gfc_conv_intrinsic_mod, + gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_minmaxval, + prepare_arg_info): Likewise. + +2004-08-25 Tobias Schlueter + + * expr.c (gfc_check_assign): Add comment. Add new warning. + * trans-expr.c (gfc_conv_function_call): Correctly dereference + result of pointer valued function when not in pointer assignment. + +2004-08-25 Paul Brook + + * config-lang.in: Remove dead commented line. + * module.c: Replace g95 with gfortran in comment. + +2004-08-25 Paul Brook + + PR fortran/17190 + * arith.c (gfc_mpfr_to_mpz): Workaround mpfr bug. + +2004-08-25 Paul Brook + + PR fortran/17144 + * trans-array.c (gfc_trans_allocate_temp_array): Remove + string_length argument. + (gfc_trans_array_ctor_element): New function. + (gfc_trans_array_constructor_subarray): Use it. + (gfc_trans_array_constructor_value): Ditto. Handle constant + character arrays. + (get_array_ctor_var_strlen, get_array_ctor_strlen): New functions. + (gfc_trans_array_constructor): Use them. + (gfc_add_loop_ss_code): Update to new gfc_ss layout. + (gfc_conv_ss_descriptor): Remember section string length. + (gfc_conv_scalarized_array_ref): Ditto. Remove dead code. + (gfc_conv_resolve_dependencies): Update to new gfc_ss layout. + (gfc_conv_expr_descriptor): Ditto. + (gfc_conv_loop_setup): Ditto. Spelling fixes. + * trans-array.h (gfc_trans_allocate_temp_array): Update prototype. + * trans-const.c (gfc_conv_constant): Update to new gfc_ss layout. + * trans-expr.c (gfc_conv_component_ref): Turn error into ICE. + (gfc_conv_variable): Set string_length from section. + (gfc_conv_function_call): Remove extra argument. + (gfc_conv_expr, gfc_conv_expr_reference): Update to new gfc_ss layout. + * trans-types.c (gfc_get_character_type_len): New function. + (gfc_get_character_type): Use it. + (gfc_get_dtype): Return zero for internal types. + * trans-types.h (gfc_get_character_type_len): Add prototype. + * trans.h (struct gfc_ss): Move string_length out of union. + +2004-08-25 Tobias Schlueter + + * trans.h (build2_v, build3_v): New macros. + (build_v): Remove. + * f95-lang.c (gfc_truthvalue_conversion): Use build2 instead of + build. + * trans-array.c (gfc_conv_descriptor_data, + gfc_conv_descriptor_offset, gfc_conv_descriptor_dimension, + gfc_conv_descriptor_stride, gfc_conv_descriptor_lbound, + gfc_conv_descriptor_ubound, gfc_trans_allocate_array_storage, + gfc_trans_allocate_temp_array, + gfc_trans_array_constructor_subarray, + gfc_trans_array_constructor_value, gfc_conv_array_index_ref, + gfc_trans_array_bound_check, gfc_conv_array_index_offset, + gfc_conv_scalarized_array_ref, gfc_conv_array_ref, + gfc_conv_array_ref, gfc_trans_preloop_setup, + gfc_trans_scalarized_loop_end, gfc_conv_ss_startstride, + gfc_conv_loop_setup, gfc_array_init_size, + gfc_conv_array_initializer, gfc_trans_array_bounds, + gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias, + gfc_conv_expr_descriptor, gfc_conv_array_parameter, + gfc_trans_deferred_array): Use buildN and buildN_v macros instead + of build and build_v as appropriate. + * trans-common.c (create_common): Same. + * trans-decl.c (gfc_trans_auto_character_variable, + gfc_trans_entry_master_switch, gfc_generate_function_code): Same. + * trans-expr.c (gfc_conv_expr_present, gfc_conv_substring, + gfc_conv_component_ref, gfc_conv_unary_op, gfc_conv_powi, + gfc_conv_cst_int_power, gfc_conv_string_tmp, gfc_conv_concat_op, + gfc_conv_expr_op, gfc_conv_function_call, + gfc_trans_structure_assign): Same. + * trans-intrinsic.c (build_fixbound_expr, build_round_expr, + gfc_conv_intrinsic_aint, gfc_conv_intrinsic_bound, + gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_mod, + gfc_conv_intrinsic_dim, gfc_conv_intrinsic_sign, + gfc_conv_intrinsic_dprod, gfc_conv_intrinsic_minmax, + gfc_conv_intrinsic_anyall, gfc_conv_intrinsic_count, + gfc_conv_intrinsic_arith, gfc_conv_intrinsic_minmaxloc, + gfc_conv_intrinsic_minmaxval, gfc_conv_intrinsic_btest, + gfc_conv_intrinsic_bitop, gfc_conv_intrinsic_singlebitop, + gfc_conv_intrinsic_ibits, gfc_conv_intrinsic_ishft, + gfc_conv_intrinsic_merge, gfc_conv_intrinsic_strcmp, + gfc_conv_allocated, gfc_conv_associated, prepare_arg_info, + gfc_conv_intrinsic_spacing, gfc_conv_intrinsic_rrspacing, + gfc_conv_intrinsic_trim, gfc_conv_intrinsic_repeat, + gfc_conv_intrinsic_iargc): Same. + * trans-io.c (set_parameter_value, set_parameter_ref, set_string, + set_flag, add_case, io_result, transfer_namelist_element, + transfer_expr): Same. + * trans-stmt.c (gfc_trans_goto, gfc_trans_return, gfc_trans_if_1, + gfc_trans_arithmetic_if, gfc_trans_do, gfc_trans_do_while, + gfc_trans_integer_select, gfc_trans_logical_select, + gfc_trans_character_select, gfc_trans_forall_loop, + gfc_trans_nested_forall_loop, gfc_do_allocate, + generate_loop_for_temp_to_lhs, generate_loop_for_rhs_to_temp, + compute_inner_temp_size, compute_overall_iter_number, + allocate_temp_for_forall_nest, gfc_trans_pointer_assign_need_temp, + gfc_trans_forall_1, gfc_evaluate_where_mask, + gfc_trans_where_assign, gfc_trans_allocate): Same. + * trans-types.c (gfc_get_dtype, gfc_get_array_type_bounds): Same. + * trans.c (gfc_add_modify_expr, gfc_finish_block, + gfc_build_array_ref, gfc_build_function_call, + gfc_trans_runtime_check): Same. + +2004-08-25 Tobias Schlueter + + * trans-const.c (gfc_conv_mpz_to_tree): Change call to + build_int_cst to build_int_cst_wide in accordance to Nathan's + previous patch. + +2004-08-25 Nathan Sidwell + + * trans-array.c (gfc_trans_array_constructor_value): Adjust + build_int_cst calls. + * trans-const.c (gfc_build_string_const, gfc_init_constants, + gfc_conv_mpz_to_tree, gfc_conv_constant_to_tree): Likewise. + * trans-decl.c (gfc_get_symbol_decl, build_entry_thunks, + gfc_trans_entry_master_switch): Likewise. + * trans-intrinsic.c (gfc_conv_intrinsic_ibits, + gfc_conv_intrinsic_len, prepare_arg_info): Likewise. + * trans-io.c (add_case, set_error_locus, + transfer_namelist_element, transfer_expr): Likewise. + * trans-stmt.c (gfc_trans_label_assign, gfc_trans_pause, + gfc_trans_stop, gfc_trans_character_select): Likewise. + * trans-types.c (gfc_init_types, gfc_get_dtype): Likewise. + * trans.c (gfc_trans_runtime_check): Likewise. + +2004-08-24 Tobias Schlueter + + * trans-decl.c, trans-types.c: Add and remove blank lines as + required. + +2004-08-24 Richard Henderson + + * trans-const.c (gfc_conv_mpz_to_tree): Fix 64-bit shift warning. + +2004-08-24 Tobias Schlueter + + * resolve.c (merge_argument_lists): Revert unintentionally + committed change. + +2004-08-24 Tobias Schlueter + + * trans-decl.c (build_function_decl): Fix spelling in comment. + (build_entry_thunks): Remove code with no function. + (gfc_build_intrinsic_function_decls): Remove empty line. + + * resolve.c (resolve_entries): Fix a bunch of comment typos. + +2004-08-24 Nathan Sidwell + + * f95-lang.c (gfc_init_decl_processing): Adjust + build_common_tree_nodes call. + +2004-08-24 Tobias Schlueter + + * trans-types.c: Spelling and formatting fixes. + +2004-08-23 Richard Henderson + + * trans-const.c (gfc_conv_mpz_to_tree): Use mpz_getlimbn instead + of going through an intermediate string. Fix 32/64 int/long bug. + +2004-08-23 Eric Christopher + + * trans-types.c (gfc_type_for_mode): Remove VECTOR_TYPE_SUPPORTED_P + usage. Use build_vector_type_for_mode for vector types. + +2004-08-22 Richard Henderson + + PR 13465 + * data.c (find_con_by_offset): Search ordered list; handle + elements with repeat counts. + (gfc_assign_data_value_range): New. + * gfortran.h (struct gfc_data_value): Make repeat unsigned. + (gfc_assign_data_value_range): Declare. + * match.c (top_val_list): Extract repeat count into a temporary. + * resolve.c (values): Make left unsigned. + (next_data_value): Don't decrement left. + (check_data_variable): Use gfc_assign_data_value_range. + +2004-08-22 Tobias Schlueter + + * trans-const.c, trans-decl.c, trans-expr.c: Spelling fixes. + +2004-08-22 Tobias Schlueter + + * check.c (gfc_check_reduction): Rename to ... + (check_reduction): ... this. Make static. Don't check type of + first argument. + (gfc_check_minval_maxval, gfc_check_prodcut_sum): New functions. + * intrinsic.c (add_functions): Change MAXVAL, MINVAL, PRODUCT and + SUM to use new check functions. + (check_specific): Change logic to call new functions. + * intrinsic.h (gfc_check_minval_maxval, gfc_check_product_sum): + Add prototypes. + (gfc_check_reduction): Remove prototype. + +2004-08-20 Paul Brook + Canqun Yang + + PR fortran/17077 + * trans-array.c (gfc_conv_array_parameter): Pass correct pointer + for automatic arrays. + * trans-types.c (gfc_get_nodesc_array_type): Add comment. + +2004-08-19 Tobias Schlueter + (Port from g95) + + PR fortran/17074 + * match.c (match_simple_forall, match_simple_where): Forward-declare. + (gfc_match_if): Order statement list alphabetically, add WHERE and + FORALL, remove double PAUSE. + (gfc_match_simple_where, match_forall_header, + gfc_match_simple_forall): New functions. + (gfc_match_forall): Use match_forall_header. + +2004-08-19 Paul Brook + + PR fortran/17091 + * gfortran.h (gfc_access): Give ACCESS_UNKNOWN value 0. + * symbol.c (gfc_clear_attr): Use memset. + +2004-08-19 Paul Brook + + PR fortran/14976 + PR fortran/16228 + * data.c (assign_substring_data_value): Remove. + (create_character_intializer): New function. + (gfc_assign_data_value): Track the typespec for the current + subobject. Use create_character_intializer. + +2004-08-19 Erik Schnetter + + PR fortran/16946 + * check.c (gfc_check_reduction): New function. + (gfc_check_minval_maxval): Removed. + (gfc_check_product): Removed. + (gfc_check_sum): Removed. + * intrinsic.h: Add/remove declarations for these. + * gfortran.h: Add field f3red to union gfc_check_f. + * intrinsic.c (add_sym_3red): New function. + (add_functions): Register maxval, minval, product, and sum intrinsics + through add_sym_3red. + (check_specific): Handle f3red union field. + * iresolve.c: Whitespace change. + +2004-08-18 Paul Brook + + * trans-types.c (gfc_sym_type): Use pointer types for optional args. + +2004-08-18 Victor Leikehman + + PR fortran/13278 + * trans-io.c (transfer_namelist_element): New. Recursively handle + derived-type variables. Pass string lengths. + (build_dt): Code moved to build_namelist, with some + changes and additions. + (gfc_build_io_library_fndecls): Declare the fifth + argument in st_set_nml_var_char -- string_length. + +2004-08-17 Paul Brook + Tobias Schlueter + + PR fortran/13082 + * decl.c (get_proc_name): Update mystery comment. + (gfc_match_entry): Check for errors earlier. Add entry point to list. + * dump-parse-tree.c (gfc_show_code_node): Print EXEC_ENTRY nodes. + * gfortran.h (symbol_attribute): Add entry_master. Document entry. + (struct gfc_entry_list): Define. + (gfc_get_entry_list): Define. + (struct gfc_namespace): Add refs and entries. + (enum gfc_exec_op): Add EXEC_ENTRY. + (struct gfc_code): Add ext.entry. + * module.c (ab_attribute, attr_bits): Remove AB_ENTRY. + (mio_symbol_attribute): Don't save/reture addr->entry. + (mio_namespace_ref): Refcount namespaces. + * parse.c (accept_statement): Handle ST_ENTRY. + (gfc_fixup_sibling_symbols): Mark symbol as referenced. + (parse_contained): Fixup sibling references to entry points + after parsing the procedure body. + * resolve.c (resolve_contained_fntype): New function. + (merge_argument_lists, resolve_entries): New functions. + (resolve_contained_functions): Use them. + (resolve_code): Handle EXEC_ENTRY. + (gfc_resolve): Call resolve_entries. + * st.c (gfc_free_statement): Handle EXEC_ENTRY. + * symbol.c (gfc_get_namespace): Refcount namespaces. + (gfc_free_namespace): Ditto. + * trans-array.c (gfc_trans_dummy_array_bias): Treat all args as + optional when multiple entry points are present. + * trans-decl.c (gfc_get_symbol_decl): Remove incorrect check. + (gfc_get_extern_function_decl): Add assertion. Fix coment. + (create_function_arglist, trans_function_start, build_entry_thunks): + New functions. + (gfc_build_function_decl): Rename ... + (build_function_decl): ... to this. + (gfc_create_function_decl): New function. + (gfc_generate_contained_functions): Use it. + (gfc_trans_entry_master_switch): New function. + (gfc_generate_function_code): Use new functions. + * trans-stmt.c (gfc_trans_entry): New function. + * trans-stmt.h (gfc_trans_entry): Add prototype. + * trans-types.c (gfc_get_function_type): Add entry point argument. + * trans.c (gfc_trans_code): Handle EXEC_ENTRY. + (gfc_generate_module_code): Call gfc_create_function_decl. + * trans.h (gfc_build_function_decl): Remove. + (gfc_create_function_decl): Add prototype. + +2004-08-15 Andrew Pinski + + PR fortran/17030 + * f95-lang.c (gfc_init_builtin_functions): Initialize the builtins + for cabs{,f} and copysign{,f}. + * trans-decl.c (gfor_fndecl_math_cabsf): Delete. + (gfor_fndecl_math_cabs): Delete. + (gfor_fndecl_math_sign4): Delete. + (gfor_fndecl_math_sign8): Delete. + (gfc_build_intrinsic_function_decls): Remove the + initializing of cabs{,f} and copysign{,f} functions. + * trans-intrinsic.c (gfc_conv_intrinsic_abs): Use the builtins + instead of the functions definitions. + (gfc_conv_intrinsic_sign): Likewise. + * trans.h (gfor_fndecl_math_cabsf): Delete. + (gfor_fndecl_math_cabs): Delete. + (gfor_fndecl_math_sign4): Delete. + (gfor_fndecl_math_sign8): Delete. + +2004-08-15 Nathan Sidwell + + * trans-array.c (gfc_trans_array_constructor_value): Use + build_int_cst. + * trans-const.c (gfc_build_string_const, + gfc_init_constants, gfc_conv_mpz_to_tree, + gfc_conv_constant_to_tree): Likewise. + * trans-decl.c (gfc_get_symbol_decl): Likewise. + * trans-intrinsic.c (gfc_conv_intrinsic_ibits, + gfc_conv_intrinsic_len, prepare_arg_info): Likewise. + * trans-io.c (add_case, set_error_locus, build_dt, + transfer_expr): Likewise. + * trans-stmt.c (gfc_trans_label_assign, gfc_trans_pause, + gfc_trans_stop, gfc_trans_character_select): Likewise. + * trans-types.c (gfc_init_types, gfc_get_dtype): Likewise. + * trans.c (gfc_trans_runtime_check): Likewise. + +2004-08-14 Paul Brook + + * trans-decl.c (gfc_build_function_decl): Remove dead code. + +2004-08-14 Paul Brook + + * trans-arry.c (gfc_trans_auto_array_allocation): Remove unused var. + +2004-08-13 Tobias Schlueter + + * gfortran.h: Add comments. + * parse.c (parse_contained): Fix comment typo. + * resolve.c (was_declared): Ditto. + * symbol.c: Ditto. + +2004-08-11 Paul Brook + + PR fortran/16917 + * intrinsic.c (add_functions): Add dfloat as an alias for dble. + +2004-08-10 Richard Henderson + + * f95-lang.c (gfc_init_builtin_functions): Remove + __builtin_stack_alloc, add __builtin_alloca. + * trans-array.c (gfc_trans_auto_array_allocation): Use DECL_EXPR. + * trans-decl.c (gfc_trans_auto_character_variable): Likewise. + +2004-08-10 Paul Brook + + * trans-io.c (transfer_expr): Handle pointters. + +2004-08-10 Paul Brook + + PR fortran/16919 + * trans-array.c (gfc_add_loop_ss_code): Handle GFC_SS_COMPONENT. + (gfc_conv_array_index_offset): Allow "temporary" with nonzero delta. + (gfc_trans_preloop_setup, gfc_trans_scalarized_loop_boundary): + Handle GFC_SS_COMPONENT. + (gfc_conv_ss_startstride): Ditto. Set ss->shape. + (gfc_conv_loop_setup): Tweak commends. Remove dead code. + Use ss->shape. + (gfc_conv_array_initializer): Call specific initializer routines. + * trans-expr.c (gfc_trans_structure_assign): New function. + (gfc_trans_subarray_assign): New function. + (gfc_trans_subcomponent_assign): New fucntion + (gfc_conv_structure): Use them. + * trans.h (gfc_ss_type): Add GFC_SS_COMPONENT. + (gfc_ss): Add shape. + +2004-08-08 Victor Leikehman + + * simplify.c (gfc_simplify_shape): Bugfix. + * expr.c (gfc_copy_shape_excluding): New function. + * gfortran.h (gfc_get_shape): Bugfix. + (gfc_copy_shape_excluding): Added declaration. + * iresolve.c (gfc_resolve_all, gfc_resolve_any, gfc_resolve_count, + gfc_resolve_cshift, gfc_resolve_eoshift, gfc_resolve_lbound, + gfc_resolve_ubound, gfc_resolve_transpose): Added compile + time resolution of shape. + +2004-08-06 Janne Blomqvist + + * intrinsic.c (add_subroutines): Add getenv and + get_environment_variable. (add_sym_5s): New function. + * intrinsic.h (gfc_resolve_get_environment_variable): Add + prototype. + * iresolve.c (gfc_resolve_get_environment_variable): New + function. + +2004-08-06 Feng Wang + + * f95-lang.c (gfc_init_builtin_functions): Fix the number of + __builtin_pow[f] arguments. + +2004-08-06 Steven G. Kargl + + * arith.c: Add #define for model numbers. Remove global GMP variables. + (natural_logarithm,common_logarithm,exponential,sine, + cosine,arctangent,hypercos,hypersine ): Remove. + (gfc_mpfr_to_mpz,gfc_set_model_kind,gfc_set_model): New functions. + (arctangent2,gfc_arith_init_1,gfc_arith_done_1 + gfc_check_real_range, gfc_constant_result, gfc_range_check, + gfc_arith_uminus,gfc_arith_plus, gfc_arith_minus, gfc_arith_times, + gfc_arith_divide,complex_reciprocal,complex_pow_ui, + gfc_arith_power,gfc_compare_expr,compare_complex,gfc_convert_real, + gfc_convert_complex,gfc_int2real,gfc_int2complex, + gfc_real2int,gfc_real2real,gfc_real2complex, + gfc_complex2int,gfc_complex2real,gfc_complex2complex): Convert GMP + to MPFR, use new functions. + * arith.h: Remove extern global variables. + (natural_logarithm,common_logarithm,exponential, sine, cosine, + arctangent,hypercos,hypersine): Remove prototypes. + (arctangent2): Update prototype from GMP to MPFR. + (gfc_mpfr_to_mpz, gfc_set_model_kind,gfc_set_model): Add prototypes. + * dump-parse-tree.c (gfc_show_expr): Convert GMP to MPFR. + * expr.c (free_expr0,gfc_copy_expr): Convert GMP to MPFR. + * gfortran.h (GFC_REAL_BITS): Remove. + (arith): Add ARITH_NAN. + Include mpfr.h. Define GFC_RND_MODE. + Rename GCC_GFORTRAN_H GFC_GFC_H. + (gfc_expr): Convert GMP to MPFR. + * module.c: Add arith.h, correct type in comment. + (mio_gmp_real): Convert GMP to MPFR. + (mio_expr): Use gfc_set_model_kind(). + * primary.c: Update copyright date with 2004. + (match_real_constant,match_const_complex_part): Convert GMP to MPFR. + * simplify.c: Remove global GMP variables + (gfc_simplify_abs,gfc_simplify_acos,gfc_simplify_aimag, + gfc_simplify_aint,gfc_simplify_dint,gfc_simplify_anint, + gfc_simplify_dnint,gfc_simplify_asin,gfc_simplify_atan, + gfc_simplify_atan2,gfc_simplify_ceiling,simplify_cmplx, + gfc_simplify_conjg,gfc_simplify_cos,gfc_simplify_cosh, + gfc_simplify_dim,gfc_simplify_dprod,gfc_simplify_epsilon, + gfc_simplify_exp,gfc_simplify_exponent,gfc_simplify_floor, + gfc_simplify_fraction,gfc_simplify_huge,gfc_simplify_int, + gfc_simplify_ifix,gfc_simplify_idint,gfc_simplify_log, + gfc_simplify_log10,simplify_min_max,gfc_simplify_mod, + gfc_simplify_modulo,gfc_simplify_nearest,simplify_nint, + gfc_simplify_rrspacing,gfc_simplify_scale, + gfc_simplify_set_exponent,gfc_simplify_sign,gfc_simplify_sin, + gfc_simplify_sinh,gfc_simplify_spacing,gfc_simplify_sqrt, + gfc_simplify_tan,gfc_simplify_tanh,gfc_simplify_tiny, + gfc_simplify_init_1,gfc_simplify_done_1): Convert GMP to MPFR. + Use new functions. + * trans-const.c (gfc_conv_mpfr_to_tree): Rename from + gfc_conv_mpf_to_tree. Convert it to use MPFR + (gfc_conv_constant_to_tree): Use it. + * trans-const.h: Update prototype for gfc_conv_mpfr_to_tree(). + * trans-intrinsic.c: Add arith.h, remove gmp.h + (gfc_conv_intrinsic_aint,gfc_conv_intrinsic_mod): Convert GMP to MPFR. + +2004-08-06 Victor Leikehman + Paul Brook + + * trans-array.c (gfc_trans_allocate_array_storage, + gfc_trans_allocate_temp_array, gfc_add_loop_ss_code, + gfc_conv_loop_setup): For functions, if the shape of the result + is not known in compile-time, generate an empty array descriptor for + the result and let the callee to allocate the memory. + (gfc_trans_dummy_array_bias): Do nothing for pointers. + (gfc_conv_expr_descriptor): Use function return values directly. + * trans-expr.c (gfc_conv_function_call): Always add byref call + insn to pre chain. + (gfc_trans_pointer_assignment): Add comments. + (gfc_trans_arrayfunc_assign): Don't chain on expression. + +2004-08-01 Roger Sayle + + * options.c (gfc_init_options): Don't warn about the use GNU + extensions by default. + (gfc_post_options): Warn about GNU extensions with -pedantic. + (gfc_handle_option): Don't warn about GNU extensions with -std=gnu. + +2004-07-30 Richard Henderson + + * trans-expr.c (gfc_conv_expr_reference): Create a CONST_DECL + for TREE_CONSTANTs. + +2004-07-25 Richard Henderson + + * trans-decl.c (gfc_build_function_decl): Set DECL_ARTIFICIAL + and DECL_IGNORED_P on RESULT_DECL. + (gfc_generate_constructors): Likewise. + +2004-07-18 Tobias Schlueter + + PR fortran/16465 + * lang.opt (ffixed-line-length-none, ffixed-line-length-): New + options. + (ffixed-line-length-80, ffixed-line-length-132): Remove. + * options.c (gfc_handle_options): Deal with changed options. + * scanner.c (load_line): Change second arg to 'char **', + allocate if pointing to NULL. Keep track of buffer's length. + Adapt buffer size to overlong lines. Pad lines to full length + in fixed form. + (load_file): Adapt to new interface of load_line. + +2004-07-17 Joseph S. Myers + + * trans.h (builtin_function): Declare. + +2004-07-16 Tobias Schlueter + + PR fortran/16404 + (parts ported from g95) + * parse.h (gfc_state_data): New field do_variable. + (gfc_check_do_variable): Add prototype. + * parse.c (push_state): Initialize field 'do_variable'. + (gfc_check_do_variable): New function. + (parse_do_block): Remember do iterator variable. + (parse_file): Initialize field 'do_variable'. + * match.c (gfc_match_assignment, gfc_match_do, + gfc_match_allocate, gfc_match_nullify, gfc_match_deallocate): + Add previously missing checks. + (gfc_match_return): Reformat error message. + * io.c (match_out_tag): New function. + (match_open_element, match_close_element, + match_file_element, match_dt_element): Call match_out_tag + instead of match_vtag where appropriate. + (match_io_iterator, match_io_element): Add missing check. + (match_io): Reformat error message. + (match_inquire_element): Call match_out_tag where appropriate. + + * parse.c (gfc_check_do_variable): Fix error locus. + +2004-07-15 Tobias Schlueter + + PR fortran/15129 + * trans-decl.c (gfc_build_function_decl): Create a new chardecl + for every assumed length character dummy argument. + + PR fortran/15140 + * trans-decl.c (gfc_trans_deferred_vars): Remove bogus assertion. + + PR fortran/13792 + * simplify.c (gfc_simplify_bound): Copy the bound expression. + +2004-07-15 Tobias Schlueter + + PR fortran/15324 + * trans-array.c gfc_trans_g77_array, + gfc_trans_dummy_array_bias): Don't call gfc_trans_string_init + for assumed length characters. + (gfc_conv_expr_descriptor): Set se->string_length if dealing + with a character expression. + (gfc_cvonv_array_parameter): Pass string length when passing + character array according to g77 conventions. + +2004-07-12 Paul Brook + + * expr.c (gfc_check_assign_symbol): Handle pointer assignments. + * trans-array.c (gfc_trans_auto_array_allocation): Remove + initialization code. + * trans-common.c (create_common): Use gfc_conv_initializer. + * trans-decl.c (gfc_get_symbol_decl): Use gfc_conv_initializer. + * trans-expr.c (gfc_conv_initializer): New function. + (gfc_conv_structure): Use it. + * trans.h (gfc_conv_initializer): Add prototype. + +2004-07-11 Paul Brook + + PR fortran/15986 + * parse.c (gfc_fixup_sibling_symbols): Also look for untyped + variables. + (parse_contained): Mark contained symbols as referenced. + +2004-07-11 Tobias Schlueter + + PR fortran/16455 + * module.c (gfc_dump_module, gfc_use_module): Print locus + when opening of module file fails. + + PR fortran/16404 + * io.c (match_io): Flag 'WRITE(...), ...' as extension. + + PR fortran/16404 + * match.c (gfc_match_program): A program name is obligatory. + (gfc_match_return): RETURN in main program is an extension. + (gfc_match_block_data): A space is required before a block data + name. + + PR fortran/16433 + * primary.c (match_boz_constant): Call gfc_notify_std only if + we actually have a non-standard boz-literal-constant. + + PR fortran/15754 + * expr.c (gfc_check_assign): Print ranks if incompatible. Issue + warning if assigning NULL(). + +2004-07-11 Joseph S. Myers + + * f95-lang.c (set_block): Remove. + (gfc_clear_binding_stack): New. + (LANG_HOOKS_CLEAR_BINDING_STACK): Define. + (struct binding_level): Remove block_created_by_back_end. + (clear_binding_level): Likewise. + (poplevel): Don't handle block_created_by_back_end. + +2004-07-10 Tobias Schlueter + + * trans-decl.c (gfc_create_module_variable): Nothing to do if + symbol is in common, because we ... + (gfc_generate_module_vars): Call gfc_trans_common. + +2004-07-10 Paul Brook + + * trans-array.c (gfc_build_null_descriptor): New function. + (gfc_trans_static_array_pointer): Use it. + * trans-array.h (gfc_build_null_descriptor): Add prototype. + * trans-expr.c (gfc_conv_structure): Handle array pointers. + +2004-07-10 Tobias Schlueter + + PR fortran/16336 + * decl.c (gfc_match_save): Use-associated common block + doesn't collide. + * gfortran.h (gfc_common_head): Add new field 'name'. + Fix typo in comment after #endif. + * match.c (gfc_get_common): Add new argument from_common, + mangle name if flag is set, fill in new field in structure + gfc_common_head. + (match_common): Set new arg in call to gfc_get_common, + use-associated common block doesn't collide. + * match.h (gfc_get_common): Adapt prototype. + * module.c (load_commons): Set new arg in call to + gfc_get_common. + * symbol.c (free_common_tree): New function. + (gfc_free_namespace): Call new function. + * trans-common.c (several functions): Remove argument + 'name', use name from gfc_common_head instead. + +2004-07-10 Tobias Schlueter + + * expr.c (gfc_check_pointer_assign): Verify that rank of the LHS + and RHS match. Return early if the RHS is NULL(). + + PR fortran/16336 + * match.c (match_common): Fix error reporting for used common. + + PR fortran/15969 + * trans-expr.c (gfc_conv_structure): Handle initialization + of scalar pointer components. + + * parse.c (decode_statement): Fix matching of BLOCK DATA. + + * trans-decl.c (generate_local_decl): Remove workaround obsoleted + by fix for PR 15481. + +2004-07-10 Tobias Schlueter + + * trans-common.c: Fix whitespace issues, make variable names + more readable. + (create_common): Additionally, make loop logic more obvious. + +2004-07-10 Tobias Schlueter + Paul Brook + + PR fortran/13415 + * trans-common.c (calculate_length): Remove ... + (get_segment_info): Merge into here. Save field type. + (build_field): Use saved type. + (create_common, new_condition, new_segment, finish_equivalences): + Use new get_segment_info. + * trans-types.c: Update comment. + +2004-07-09 Tobias Schlueter + + PR fortran/14077 + * moduele.c (mio_symbol): Don't I/O initial values unless + symbol is a parameter. + +2004-07-09 Tobias Schlueter + + PR fortran/13201 + * resolve.c (resolve_symbol): Verify that the shape of a + parameter array is not only explicit, but also constant. + * array.c (gfc_is_compile_time_shape): New function. + * gfortran.h (gfc_is_compile_time_shape): Add prototype. + +2004-07-09 Tobias Schlueter + + PR fortran/15481 + PR fortran/13372 + PR fortran/13575 + PR fortran/15978 + * module.c (write_symbol, write_symtree): Remove workaround. + * primary.c (match_actual_arglist): Enhance comment. + (gfc_match_rvalue): Handle function call with first argument + a keyword argument correctly. + * resolve.c (resolve_symbol): Change call to + gfc_set_default_type to issue error if no implicit type + can be found. + * trans-decl.c (gfc_create_module_variable): Remove workaround. + +2004-07-08 Paul Brook + + * intrinsic.c (add_sym_4s): New function. + (add_subroutines): Change gfc_add_sym_? to gfc_add_sym_?s. + +2004-07-04 Janne Blomqvist + Paul Brook + + PR fortran/15280 + PR fortran/15665 + * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_IARGC and + GFC_ISYM_COMMAND_ARGUMENT_COUNT. + * intrinsic.c (add_functions): Identify iargc. Add + command_argument_count. + (add_subroutines): Resolve getarg. Add get_command and + get_command_argument. + * intrinsic.h (gfc_resolve_getarg, gfc_resolve_get_command, + gfc_resolve_get_command_argument): Add prototypes. + * iresolve.c (gfc_resolve_getarg, gfc_resolve_get_command, + gfc_resolve_get_command_argument): New functions. + * trans-decl.c (gfor_fndecl_iargc): New variable. + (gfc_build_intrinsic_function_decls): Set it. + * trans-intrinsic.c (gfc_conv_intrinsic_iargc): New function. + (gfc_conv_intrinsic_function): Use it. + * trans.h (gfor_fndecl_iargc): Declare. + +2004-07-04 Matthias Klose + + * Make-lang.in: Generate and install gfortran man page. + * invoke.texi: Remove extra '@c man end'. + +2004-07-04 Richard Henderson + + * f95-lang.c (gfc_mark_addressable): Don't put_var_into_stack. + +2004-07-04 Paul Brook + + * decl.c (gfc_match_implicit_range): Don't use typespec. + (gfc_match_implicit): Handle character selectors. + * gfortran.h (gfc_set_implicit): Remove prototype. + (gfc_add_new_implicit_range, gfc_merge_new_implicit): Update. + * parse.c (accept_statement): Don't call gfc_set_implicit. + * symbol.c (new_ts): Remove. + (gfc_set_implicit_none): Use same loop bounds as other functions. + (gfc_set_implicit): Remove. + (gfc_clear_new_implicit, gfc_add_new_implicit_range): Only set flags. + (gfc_merge_new_implicit): Combine with gfc_set_implicit. + +2004-06-30 Richard Henderson + + * match.c (var_element): Remove unused variable. + + * trans-decl.c (gfc_generate_function_code): Don't set + x_whole_function_mode_p. + (gfc_generate_constructors): Likewise. + +2004-06-30 Richard Henderson + + * trans-decl.c (gfc_generate_function_code): Don't set + immediate_size_expand. + (gfc_generate_constructors): Likewise. + +2004-06-30 Tobias Schlueter + + PR fortran/16161 + * decl.c (gfc_match_type_spec): Rename second argument to + 'implicit_flag', reverse meaning. Don't match_char_spec if + 'implicit_flag' is set. Rename to ... + (match_type_spec): ... this. + (gfc_match_implicit_none, match_implicit_range): Move here + from match.c. + (gfc_match_implicit): Move here from match.c, try to + match_char_len if match_implicit_range doesn't succeed for + CHARACTER implicits. Call renamed fucntion match_type_spec. + (gfc_match_data_decl, match_prefix): Call renamed function + match_type_spec. + * match.c (gfc_match_implicit_none, match_implicit_range, + gfc_match_implicit): Move to decl.c. + * match.h (gfc_match_implicit_none, gfc_match_implicit): + Move protoypes to section 'decl.c'. + (gfc_match_type_spec): Remove prototype. + +2004-06-29 Tobias Schlueter + + * decl.c, interface.c, symbol.c, trans-common.c: Add 2004 to + copyright years. + +2004-06-29 Steven Bosscher + + Make sure types in assignments are compatible. Mostly mechanical. + * trans-const.h (gfc_index_one_node): New define. + * trans-array.c (gfc_trans_allocate_array_storage, + gfc_trans_allocate_temp_array, gfc_trans_array_constructor_subarray, + gfc_trans_array_constructor_value, gfc_trans_array_constructor, + gfc_conv_array_ubound, gfc_conv_array_ref, + gfc_trans_scalarized_loop_end, gfc_conv_section_startstride, + gfc_conv_ss_startstride, gfc_conv_loop_setup, gfc_array_init_size, + gfc_trans_array_bounds, gfc_trans_dummy_array_bias, + gfc_conv_expr_descriptor, gfc_trans_deferred_array): Use the correct + types in assignments, conversions and conditionals for expressions. + * trans-expr.c (gfc_conv_expr_present, gfc_conv_substring, + gfc_conv_unary_op, gfc_conv_cst_int_power, gfc_conv_string_tmp, + gfc_conv_function_call, gfc_trans_pointer_assignment, + gfc_trans_scalar_assign): Likewise. + * trans-intrinsic.c (build_fixbound_expr, gfc_conv_intrinsic_bound, + gfc_conv_intrinsic_anyall, gfc_conv_intrinsic_count, + gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_btest, + gfc_conv_intrinsic_singlebitop, gfc_conv_intrinsic_ishft, + gfc_conv_intrinsic_ishftc, gfc_conv_intrinsic_strcmp, + gfc_conv_allocated, gfc_conv_associated, + gfc_conv_intrinsic_rrspacing, gfc_conv_intrinsic_trim): Likewise. + * trans-io.c (set_string): Likewise. + * trans-stmt.c (gfc_trans_do, gfc_trans_forall_loop, + gfc_do_allocate, generate_loop_for_temp_to_lhs, + generate_loop_for_rhs_to_temp, compute_inner_temp_size, + compute_overall_iter_number, gfc_trans_assign_need_temp, + gfc_trans_pointer_assign_need_temp, gfc_trans_forall_1, + gfc_evaluate_where_mask, gfc_trans_where_assign, + gfc_trans_where_2): Likewise. + * trans-types.c (gfc_get_character_type, gfc_build_array_type, + gfc_get_nodesc_array_type, gfc_get_array_type_bounds): Likewise. + + * trans.c (gfc_add_modify_expr): Add sanity check that types + for the lhs and rhs are the same for scalar assignments. + +2004-06-29 Tobias Schlueter + + * dump-parse-tree.c (show_common): New function. + (gfc_show_namespace): Show commons. + +2004-06-29 Tobias Schlueter + Andrew Vaught + + PR fortran/13249 + PR fortran/15481 + * decl.c (gfc_match_save): Adapt to new common structures, + don't allow saving USE-associated common. + * dump-parse-tree (gfc_show_attr): (saved_)common are not + symbol attributes any longer. + (gfc_show_symbol): Don't show old-style commons any longer. + (gfc_show_namespace): Adapt call to gfc_traverse_symtree to new + interface. + * gfortran.h (symbol_attribute): Remove common and saved_common + attributes. + (gfc_symbol): Remove common_head element. + (gfc_common_head): New struct. + (gfc_get_common_head): New macro. + (gfc_symtree): Add field 'common' to union. + (gfc_namespace): Add field 'common_root'; change type of field + 'blank_common' to blank_common. + (gfc_add_data): New prototype. + (gfc_traverse_symtree): Expect a symtree as first argument + instead of namespace. + * match.c (gfc_get_common): New function. + (match_common_name): Change to take char * as argument, adapt, + fix bug with empty name. + (gfc_match_common): Adapt to new data structures. Disallow + redeclaration of USE-associated COMMON-block. Fix bug with + empty common. + (var_element): Adapt to new common structures. + * match.h (gfc_get_common): Declare. + * module.c: Add 2004 to copyright years, add commons to module + file layout description. + (ab_attribute, attr_bits, mio_symbol_attributes): Remove code + for removed attributes. + (mio_symbol): Adapt to new way of storing common relations. + (load_commons): New function. + (read_module): Skip common list on first pass, load_commons at + second. + (write_commons): New function. + (write_module): Call write_commons(). + * symbol.c (gfc_add_saved_comon, gfc_add_common): Remove + functions related to removed attributes. + (gfc_add_data): New function. + (gfc_clear_attr): Don't set removed attributes. + (gfc_copy_attr): Don't copy removed attributes. + (traverse_symtree): Remove. + (gfc_traverse_symtree): Don't traverse symbol + tree of the passed namespace, but require a symtree to be passed + instead. Unify with traverse_symtree. + (gfc_traverse_ns): Call gfc_traverse_symtree according to new + interface. + (save_symbol): Remove setting of removed attribute. + * trans-common.c (gfc_sym_mangled_common_id): Change to + take 'char *' argument instead of 'gfc_symbol'. + (build_common_decl, new_segment, translate_common): Adapt to new + data structures, add new + argument name. + (create_common): Adapt to new data structures, add new + argument name. Fix typo in intialization of derived types. + (finish_equivalences): Add second argument in call to + create_common. + (named_common): take 'gfc_symtree' instead of 'gfc_symbol'. + (gfc_trans_common): Adapt to new data structures. + * trans-decl.c (gfc_create_module_variables): Remove test for + removed attribute. + +2004-06-29 Tobias Schlueter + + * io.c: Add 2004 to copyright years. + +2004-06-29 Tobias Schlueter + Andrew Vaught + + * gfortran.h (gfc_gsymbol): New typedef. + (gfc_gsym_root): New variable. + (gfc_get_gsymbol, gfc_find_gsym): New prototypes. + * parse.c (global_used): New function. + (parse_block_data): Check for double empty BLOCK DATA, + use global symbol table. + (parse_module): Use global symbol table. + (add_global_procedure, add_global_program): New functions. + (gfc_parse_file): Use global symbol table. + * symbol.c (gfc_gsym_root): New variable. + (gfc_find_gsym, gsym_compare, gfc_get_gsymbol): New + functions. + +2004-06-29 Tobias Schlueter + + * module.c (mio_gmp_real): Correct writing of negative numbers. + +2004-06-29 Tobias Schlueter + + PR fortran/15963 + * expr.c (check_intrinsic_op): Allow comparison of characters. + Make logic easier. + +2004-06-26 Tobias Schlueter + Andrew Vaught + + * decl.c (contained_procedure): New function. + (match_end): Verify correctness of END STATEMENT in + all cases. + +2004-06-26 Tobias Schlueter + Andrew Vaught + + PR fortran/15190 + * decl.c (gfc_match_type_spec), io.c (match_io), parse.c + (decode_statement): Enforce required space in free-form. + +2004-06-22 Richard Kenner + + * f95-lang.c (LANG_HOOKS_GIMPLE_BEFORE_INLINING): Deleted. + * trans-array.c (gfc_conv_descriptor_data): Add operand + for COMPONENT_REF. + (gfc_conv_descriptor_offset, gfc_conv_descriptor_dtype): Likewise. + (gfc_conv_descriptor_dimension, gfc_conv_descriptor_stride): Likewise. + (gfc_conv_descriptor_lbound, gfc_conv_descriptor_ubound): Likewise. + * trans-common.c (create_common): Likewise. + * trans-expr.c (gfc_conv_component_ref): Likewise. + * trans-io.c (set_parameter_value): Likewise. + (set_parameter_ref, set_string, set_flag, io_result): Likewise. + (transfer_expr): Likewise. + * trans-decl.c (gfc_trans_auto_character_variable): + Set up to get DECL_SIZE and DECL_SIZE_UNIT gimplified. + (gfc_gimplify_function): New function. + (gfc_generate_function-code): Properly handle nested functions. + * trans.c (gfc_build_array_ref): Add two new operands for ARRAY_REF. + +2004-06-22 Janne Blomqvist + + PR fortran/15750 + * io.c (gfc_match_inquire): Bugfix for iolength related stuff. + (gfc_resolve_inquire): Resolve the iolength tag. Return + SUCCESS at end of function if no failure has occured. + * resolve.c (resolve_code): Resolve if iolength is encountered. + * trans-io.c: (ioparm_iolength, iocall_iolength, + iocall_iolength_done): New variables. + (last_dt): Add IOLENGTH. + (gfc_build_io_library_fndecls ): Set iolength related variables. + (gfc_trans_iolength): Implement. + (gfc_trans_dt_end): Treat iolength as a third form of data transfer. + +2004-06-21 Tobias Schlueter + + * resolve.c (resolve_symbol): Add comment in function body. + (check_data_variable): Change type of mark to ar_type, adapt code + accordingly. + +2004-06-21 Tobias Schlueter + + * array.c (gfc_insert_constructor): Avoid redundant call to + mpz_comp. Add 2004 to copyright years. + +2004-06-21 Joseph S. Myers + + * trans.h (stmtblock_t): Change has_scope to unsigned int. + +2004-06-20 Steven G. Kargl + + * arith.c (gfc_range_check): correct complex underflow. + +2004-06-15 Tobias Schlueter + + PR fortran/15962 + * match.c (match_case_selector): Call gfc_match_init_expr + instead of gfc_match_expr. + * resolve.c (validate_case_label_expr): No need to check for + constant, since it wouldn't have been matched with the fix to + match.c. + +2004-06-14 Tobias Schlueter + + PR fortran/15211 + * trans-intrinsic.c (gfc_conv_intrinsic_len): Deal with arrays + of strings. + +2004-06-14 Tobias Schlueter + + PR fortran/15510 + * trans-deecl.c (generate_local_decl): Do not issue warning for + unused variables if they're use associated. + +2004-06-14 Tobias Schlueter + Andrew Vaught + + PR fortran/14928 + * gfortran.h (gfc_check_f): Add new field f3ml. + * check.c (gfc_check_minloc_maxloc): Take argument list instead + of individual arguments, reorder if necessary. + * intrinsic.h (gfc_check_minloc_maxloc): ... adapt prototype. + * intrinsic.c (add_sym_3ml): New function. + (add_functions): Change to add_sym_3ml for MINLOC, MAXLOC. + (check_specific): Catch special case MINLOC, MAXLOC. + +2004-06-14 Paul Brook + + * intrinsic.c (add_sym_2s): Use correct function types. + +2004-06-12 Tobias Schlueter + + * Make-lang.in (F95_OBJS, F95_PARSER_OBJS): Alphabetize. Move data.c + * data.c (gfc_get_section_index): Remove dependency on trans.h. + +2004-06-12 Steven G. Kargl + + * check.c (gfc_check_second_sub, gfc_check_irand, gfc_check_rand + gfc_check_srand, gfc_check_etime, gfc_check_etime_sub): New functions. + * gfortran.h (gfc_generic_isym_id): New symbols GFC_ISYM_ETIME, + GFC_ISYM_IRAND, GFC_ISYM_RAND, GFC_ISYM_SECOND. + * trans-intrinsic.c: Use symbols. + * intrinsic.c (add_sym_2s): New function. + * intrinsic.c: Add etime, dtime, irand, rand, second, srand. + * intrinsic.h: Function prototypes. + * iresolve.c (gfc_resolve_etime_sub, gfc_resolve_second_sub + gfc_resolve_srand): New functions. + +2004-06-12 Tobias Schlueter + + PR fortran/14957 + * decl.c (gfc_match_end): Require END {SUBROUTINE|FUNCTION} for + contained procedure. + +2004-06-12 Tobias Schlueter + + PR fortran/12841 + * interface.c (compare_parameter, compare_actual_formal): Don't + check types and array shapes for NULL() + * trans-expr.c (conv_function_call): No double indirection for + NULL() + +2004-06-09 Toon Moene + + * trans-expr.c (gfc_conv_cst_int_power): Compute + x**(-n) by converting it to (1/x)**n instead of + 1/x**n. + +2004-06-09 Tobias Schlueter + + PR fortran/13372 + * module.c (write_symbol, write_symtree): Don't write symbols + wrongly added to namespace. + * trans-decl.c (gfc_create_module_variable): Don't create a + backend decl for a symbol incorrectly added to namespace. + +2004-06-09 Tobias Schlueter + + PR fortran/13201 + * resolve.c (resolve_symbol): Verify that parameter array has an + explicit shape. Fix typos and coding style issues in surrounding + lines. + +2004-06-05 Tobias Schlueter + + PR fortran/15478 + * gfortran.texi: The documentation doesn't contain infomration on + how to report bugs, and shouldn't, so remove the line which + says it does. + +2004-06-05 Tobias Schlueter + + * intrinsic.c (sort_actual): Keep track of type of missing + arguments. (Missing from previous commit.) + +2004-06-03 Tobias Schlueter + + * gfortran.h (gfc_actual_arglist): New field missing_arg_type. + * interface.c (compare_actual_formal): Keep type of omitted + optional arguments. + * trans-expr.c (gfc_conv_function_call): Add string length + argument for omitted string argument. + +2004-06-03 Paul Brook + + * trans.c (gfc_finish_block, gfc_add_expr_to_block): Build statement + lists instead of compound expr chains. + (gfc_trans_code): Annotate statement lists. + +2004-06-03 Tobias Schlueter + + * trans-array.c: Fix spelling in comments. + +2004-06-02 Tobias Schlueter + + PR fortran/15557 + * data.c (assign_substring_data_value): New function. + (gfc_assign_data_value): Call the new function if we're dealing + with a substring LHS. + +2004-06-01 Tobias Schlueter + + PR fortran/15477 + * gfortran.h (GFC_VERSION): Remove. + * gfortran.texi (version-gfortran): Remove, replace by version-GCC + where used. + +2004-05-31 Tobias Schlueter + + * trans-types.c: Fix spelling & layout in comments. + +2004-05-30 Tobias Schlueter + + PR fortran/14067 + * trans-const.c (gfc_conv_string_init): Allow variable string + length lower than initialization string length. + +2004-05-30 Paul Brook + + PR fortran/15620 + * trans-decl.c (gfc_shadow_sym, gfc_restore_sym): New functions. + * trans-expr.c (gfc_trans_string_copy): New function. + (gfc_conv_statement_function): Use them. Create temp vars. Enforce + character lengths. + (gfc_conv_string_parameter): Use gfc_trans_string_copy. + * trans-stmt.c (gfc_trans_forall_1): Use gfc_{shadow,restore}_sym. + * trans.h (struct gfc_saved_var): Define. + (gfc_shadow_sym, gfc_restore_sym): Add prototypes. + +2004-05-30 Steven G. Kargl + + * iresolve.c (gfc_resolve_random_number): Clean up conditional. + +2004-05-29 Steven G. Kargl + + * simplify.c (gfc_simplify_log): Remove useless line of code. + +2004-05-29 Paul Brook + + * trans-common.c (find_equivalence): Find multiple rules. + +2004-05-27 Tobias Schlueter + + * gfortran.h (gfc_current_locus, gfc_set_locus): Remove. + (gfc_current_locus): Declare new global variable. + * scanner.c (gfc_current_locus, gfc_set_locus): Remove. + (gfc_current_locus1): Rename ... + (gfc_current_locus): ... to this. + (gfc_at_eof, gfc_at_bol, gfc_at_eol, gfc_advance_line, next_char, + skip_fixed_comments, skip_free_comments, gfc_next_char_literal, + gfc_peek_char, gfc_gobble_whitespace, gfc_new_file): Use + gfc_current_locus instead of gfc_current_locus1, gfc_set_locus() + and gfc_current_locus(), respectively. + * array.c (match_subscript, gfc_match_array_ref, match_array_list, + match_array_cons_element, gfc_match_array_constructor): + Read/modify gfc_current_locus instead of calling gfc_set_locus() + and gfc_current_locus(). + * decl.c (gfc_match_null, variable_decl, gfc_match_kind_spec, + match_attr_spec, gfc_match_function_decl, gfc_match_end, + attr_decl1, gfc_match_save): Likewise. + * error.c (error_print, gfc_internal_error): Likewise. + * expr.c (gfc_int_expr, gfc_default_logical_kind): Likewise. + * interface.c (gfc_add_interface): Likewise. + * io.c (gfc_match_format, match_dt_format, match_dt_element, + match_io_iterator, match_io): Likewise. + * match.c (gfc_match_space, gfc_match_eos, + gfc_match_small_literal_int, gfc_match_st_label, + gfc_match_strings, gfc_match_name, gfc_match_iterator, + gfc_match_char, gfc_match, gfc_match_assignment, + gfc_match_pointer_assignment, gfc_match_if, gfc_match_do, + gfc_match_nullify, gfc_match_call, match_implicit_range, + gfc_match_implicit, gfc_match_data, match_case_selector, + gfc_match_case, match_forall_iterator): Likewise. + * matchexp.c (gfc_match_defined_op_name, next_operator, + match_level_1, match_mult_operand, match_ext_mult_operand, + match_add_operand, match_ext_add_operand, match_level_2, + match_level_3, match_level_4, match_and_operand, match_or_operand, + match_equiv_operand, match_level_5, gfc_match_expr): Likewise. + * module.c (gfc_match_use, mio_array_ref, mio_expr): Likewise. + * parse.c (match_word, decode_statement, next_free, next_fixed, + add_statement, verify_st_order, parse_if_block, gfc_parse_file): + Likewise. + * primary.c (match_digits, match_integer_constant, + match_boz_constant, match_real_constant, match_substring, + next_string_char, match_charkind_name, match_string_constant, + match_logical_constant, match_const_complex_part, + match_complex_constant, match_actual_arg, match_keyword_arg, + gfc_match_actual_arglist, gfc_match_structure_constructor, + gfc_match_rvalue, gfc_match_variable): Likewise. + * st.c (gfc_get_code): Likewise. + * symbol.c (check_conflict, check_used, check_done, + duplicate_attr, add_flavor, gfc_add_procedure, gfc_add_intent, + gfc_add_access, gfc_add_explicit_interface, gfc_add_type, + gfc_add_component, gfc_reference_st_label, gfc_new_symbol): Likewise. + +2004-05-26 Roger Sayle + + * io.c (format_asterisk): Silence compiler warnings by correcting + the number of elements of a "locus" initializer. + +2004-05-25 Roger Sayle + + PR fortran/13912 + * matchexp.c: Allow unary operators after arithmetic operators + as a GNU extension. + (match_ext_mult_operand, match_ext_add_operand): New functions. + (match_mult_operand): Tweak to call match_ext_mult_operand. + (match_add_operand): Tweak to call match_ext_mult_operand. + (match_level_2): Rearrange to call match_ext_add_operand. + +2004-05-25 Paul Brook + + * expr.c (check_inquiry): Remove bogus tests. + +2004-05-23 Paul Brook + + PR fortran/13773 + * expr.c (restricted_args): Remove redundant checks/argument. + (external_spec_function): Update to match. + (restricted_intrinsic): Rewrite. + +2004-05-23 Paul Brook + Victor Leikehman + + * gfortran.h (struct gfc_symbol): Add equiv_built. + * trans-common.c: Change int to HOST_WIDE_INT. Capitalize error + messages. + (current_length): Remove. + (add_segments): New function. + (build_equiv_decl): Create initialized common blocks. + (build_common_decl): Always add decl to bindings. + (create_common): Create initializers. + (find_segment_info): Reformat to match coding conventions. + (new_condition): Use add_segments. + (add_condition, find_equivalence, add_equivalences): Move iteration + inside functions. Only process each segment once. + (new_segment, finish_equivalences, translate_common): Simplify. + +2004-05-23 Steven G. Kargl + + * check.c (gfc_check_random_seed): Issue for too many arguments. + +2004-05-22 Steven G. Kargl + + * intrinsic.c (add_subroutines): Use add_sym_3s for random_seed. + +2004-05-22 Paul Brook + + * dump-parse-tree.c (gfc_show_equiv): New function. + (gfc_show_namespace): Use it. + +2004-05-22 Victor Leikehman + + PR fortran/13249 + * symbol.c (gfc_add_common): Disable checks to work around other more + fundamental inadequacies. + +2004-05-22 Tobias Schlüter + + * trans-decl.c (gfc_get_extern_function_decl): Set DECL_IS_PURE + only for functions. + (gfc_build_function_decl): Likewise. + +2004-05-22 Steven G. Kargl + + * check.c (gfc_check_system_clock): New function. + * intrinsic.c (add_sym_3s): New function. + (add_subroutines): Use it. + * intrinsic.h (gfc_check_system_clock, gfc_resolve_system_clock): + Add prototypes. + * iresolve.c (gfc_resolve_system_clock): New function. + +2004-05-22 Steven G. Kargl + + * invoke.texi: Document -Wunderflow and spell check. + * lang.opt: Add Wunderflow. + * gfortran.h (gfc_option_t): Add warn_underflow option. + * options.c (gfc_init_options, set_Wall): Use it. + * primary.c (match_real_constant): Explicitly handle UNDERFLOW. + * arith.c (gfc_arith_uminus, gfc_arith_plus, gfc_arith_minus, + gfc_arith_times, gfc_arith_divide, gfc_arith_power, gfc_real2real, + gfc_real2complex, gfc_complex2real, gfc_complex2complex): Ditto. + * arith.c (common_logarithm): Fix typo in comment. + +2004-05-21 Roger Sayle + + * io.c (check_format): As a GNU extension, allow the comma after a + string literal to be optional in a format. Use gfc_notify_std to + issue an error/warning as appropriate. + +2004-05-21 Roger Sayle + + * io.c (check_format): Use gfc_notify_std to determine whether to + issue an error/warning for omitting the digits from the X format. + +2004-05-20 Roger Sayle + + * io.c (check_format): Allow the number before the X format to + be optional when not -pedantic. + +2004-05-18 Feng Wang + Paul Brook + + * f95-lang.c (gfc_init_builtin_functions): Use vold_list_node. + Create decls for __builtin_pow{,f}. + * gfortran.h (PREFIX_LEN): Define. + * trans-decl.c (gfor_fndecl_math_powi): Add. + (gfor_fndecl_math_powf, gfor_fndecl_math_pow): Remove. + (gfc_build_intrinsic_function_decls): Create decls for powi. + * trans-expr.c (powi_table): Add. + (gfc_conv_integer_power): Remove. + (gfc_conv_powi): New function. + (gfc_conv_cst_int_power): New function. + (gfc_conv_power_op): Use new powi routines. + * trans.h (struct gfc_powdecl_list): Add. + (gfor_fndecl_math_powi): Add. + (gfor_fndecl_math_powf, gfor_fndecl_math_pow): Remove. + +2004-05-18 Tobias Schlueter + + * trans.c, trans-decl.c: Fix comment typos. + +2004-05-18 Tobias Schlueter + + * trans-const.c (gfc_conv_mpf_to_tree): Fix typo. + +2004-05-18 Steve Kargl + + * arith.c (gfc_int2complex): Fix incorrect range checking. + +2004-05-18 Paul Brook + + PR fortran/13930 + * decl.c (add_init_expr_to_sym): Remove incorrect check. + (default_initializer): Move to expr.c. + (variable_decl): Don't assign default initializer to variables. + * expr.c (gfc_default_initializer): Move to here. + * gfortran.h (gfc_default_initializer): Add prototype. + * resolve.c (resolve_symbol): Check for illegal initializers. + Assign default initializer. + +2004-05-17 Steve Kargl + + * arith.c (gfc_arith_power): Complex number raised to 0 power is 1. + +2004-05-17 Steve Kargl + + * arith.c (gfc_real2complex): Range checking wrong part of complex + number. + +2004-05-16 Paul Brook + + * options.c (gfc_handle_module_path_options): Fix buffer overrun. + +2004-05-16 Paul Brook + + * arith.c (gfc_range_check): Fix logic error. + +2004-05-16 Steve Kargl + + * arith.c: Fix comment typos. + +2004-05-15 Tobias Schlueter + + PR fortran/13742 + * decl.c (add_init_expr_to_sym): Verify that COMMON variable is + not initialized in a disallowed fashion. + * match.c (gfc_match_common): Likewise. + (var_element): Verify that variable is not in the blank COMMON, + if it is in a common. + +2004-05-15 Joseph S. Myers + + * Make-lang.in (f95.generated-manpages): Remove. + (f95.srcextra): New. + (f95.info, fortran/gfortran.info, fortran/gfortran.dvi, + f95.maintainer-clean): Generate info and dvi files in objdir/doc. + (f95.dvi): Remove. + (dvi): New. + (f95.install-info): Remove. + (install-info): New. + +2004-05-15 Victor Leikehman + + * decl.c (add_init_expr_to_sym): Check for variable size arrays. + +2004-05-15 Tobias Schlueter + + * primary.c (match_boz_constant): Use gfc_notify_std() for + issuing a warning or an error. + +2004-05-15 Tobias Schlueter + + PR fortran/13826 + * primary.c (match_structure_constructor): Rename ... + (gfc_match_structure_constructor): ... to this. Make non-static. + (gfc_match_rvalue): Call renamed function. + * match.h (gfc_match_structure_constructor): Declare. + * match.c (gfc_match_data_constant): Handle structure + constructor. + +2004-05-15 Tobias Schlueter + + PR fortran/13702 + (Port from g95) + * gfortran.h (gfc_linebuf): New typedef. + (linebuf): Remove. + (gfc_file): Revamped, use new gfc_linebuf. + (locus): Revamped, use new types. + (gfc_current_file): Remove. + (gfc_current_form, gfc_source_file): New global variables. + * match.c (gfc_match_space, gfc_match_strings): Use + gfc_current_form to find source form. + * module.c (gfc_dump_module): Use gfc_source_file when printing + module header. + * error.c (show_locus, show_loci) Use new data structures to print + locus. + * scanner.c (first_file, first_duplicated_file, gfc_current_file): + Remove. + (file_head, current_file, gfc_current_form, line_head, line_tail, + gfc_current_locus1, gfc_source_file): New global variables. + (gfc_scanner_init1): Set new global variables. + (gfc_scanner_done1): Free new data structures. + (gfc_current_locus): Return pointer to gfc_current_locus1. + (gfc_set_locus): Set gfc_current_locus1. + (gfc_at_eof): Set new variables. + (gfc_at_bol, gfc_at_eol, gfc_advance_line, gfc_next_char): Adapt + to new locus structure. + (gfc_check_include): Remove. + (skip_free_comments, skip_fixed_comments): Use gfc_current_locus1. + (gfc_skip_comments): Use gfc_current_form, find locus with + gfc_current_locus1. + (gfc_next_char): Use gfc_current_form. + (gfc_peek_char, gfc_gobble_whitespace): Use gfc_current_locus1. + (load_line): Use gfc_current_form. Recognize ^Z as EOF. Fix + comment formatting. + (get_file): New function. + (preprocessor_line, include_line): New functions. + (load_file): Move down, rewrite to match new data structures. + (gfc_new_file): Rewrite to match new data structures. + * parse.c (next_statement): Remove code which is now useless. Use + gfc_source_form and gfc_source_file where appropriate. + * trans-decl.c (gfc_get_label_decl): adapt to new data structures + when determining locus of frontend code. + * trans-io.c (set_error_locus): Same. + * trans.c (gfc_get_backend_locus, gfc_set_backend_locus): Likewise. + * lang-specs.h (@f77-cpp-input, @f95-cpp-input): Remove '-P' from + preprocessor flags. + (all): Add missing initializers. + +2004-05-15 Tobias Schlueter + + * Make-lang.in (trans-common.o): Remove redundant dependency. + (data.c): Replace object file name ... + (data.o): ... by the correct one. + +2004-05-14 Tobias Schlueter + + * dump-parse-tree.c (gfc_show_array_ref): Print colon only + for ranges when dumping array references. + +2004-05-14 Victor Leikehman + + * decl.c (variable_decl): Always apply default initializer. + +2004-05-08 Tobias Schlüter + + PR fortran/15206 + * trans-intrinsic.c (gfc_conv_intrinsic_rrspacing): Fixed to + handle zero correctly. + +2004-05-14 Tobias Schlueter + + * match.c (gfc_match): Eliminate dead code. + +2004-05-14 Tobias Schlueter + + * parse.c (gfc_statement_next_fixed): (Change from Andy's tree) + Detect bad continuation line in fixed form sources. + +2004-05-14 Tobias Schlueter + + PR fortran/15205 + * iresolve.c (gfc_resolve_nearest): Add new function. + * intrinsic.h: ... declare it here. + * intrinsic.c (add_functions): ... add it as resolving function + for NEAREST. + +2004-05-14 Tobias Schlueter + + PR fortran/14066 + * match.c (gfc_match_do): Allow infinite loops with + label-do-stmt. Do not enforce space after comma. + +2004-05-14 Tobias Schlueter + + PR fortran/15051 + * parse.c (parse_interface): Allow empty INTERFACE, remove + seen_body. + +2004-05-14 Tobias Schlueter + + * Make-lang.in, arith.c, arith.h, array.c, bbt.c, check.c, + decl.c, dependency.c, dependency.h, dump-parse-tree.c, error.c, + expr.c, f95-lang.c, gfortran.h, interface.c, intrinsic.c, + intrinsic.h, io.c, iresolve.c, lang-specs.h, match.c, match.h, + matchexp.c, misc.c, module.c, options.c, parse.c, parse.h, + primary.c, resolve.c, scanner.c, simplify.c, st.c, symbol.c, + trans-array.c, trans-array.h, trans-common.c, trans-const.c, + trans-const.h, trans-decl.c, trans-expr.c, trans-intrinsic.c, + trans-io.c, trans-stmt.c, trans-stmt.h, trans-types.c, + trans-types.h, trans.c, trans.h: Update copyright years and + boilerplate. + * data.c: Likewise, also removed two whitespace-only lines. + * gfortranspec.c, lang.opt: Update copyright years. + +2004-05-14 Tobias Schlueter + + PR fortran/14568 + * trans-decl.c (generate_local_decl): Don't warn for unused + variables which are in common blocks. + +2004-05-13 Diego Novillo + + * Make-lang.in, f95-lang.c, trans-array.c, trans-decl.c, + trans-expr.c, trans-intrinsic.c, trans-io.c, trans-stmt.c, + trans.c: Rename tree-simple.[ch] to tree-gimple.[ch]. + +2004-05-13 Victor Leikehman + + PR fortran/15314 + * trans-expr.c (gfc_conv_structure): Use field type, not expr type. + +2004-05-13 Joseph S. Myers + + * gfortran.texi: Use @table @emph instead of @itemize @emph. + Remove "set DEVELOPMENT". + (Compiling GFORTRAN): Remove. + +2004-05-09 Tobias Schlüter + + * array.c (match_subscript, match_array_ref): Add comments + explaining argument 'init'. + * decl.c, f95-lang.c, match.c, resolve.c, trans-array.c, + trans-expr.c, trans.c: Fix some typos in comments. + * dump-parse-tree.c (gfc_show_expr): Remove wrong comment. + * primary.c (match_digits, match_integer_constant): Add comment + explaining signflag. + +2004-05-01 Tobias Schlüter + + PR fortran/13940 + * primary.c: Include system.h and flags.h, needed for pedantic. + (match_boz_constant): Allow "x" for hexadecimal constants, warn if + pedantic is set. + +2004-05-01 Tobias Schlüter + + PR fortran/13940 + * match.c (match_data_constant): Handle case where + gfc_find_symbol sets sym to NULL + +2004-04-28 Tobias Schlüter + + * Make-lang.in (f95-lang.o, trans-intrinsic.o): Add missing + dependency on mathbuiltins.def + +2004-04-24 Victor Leikehman + + * trans-io.c (transfer_expr): Implemented recursive printing + of derived types. + +2004-04-24 Andrew Pinski + + * gfortranspec.c: Do not include multilib.h. + +2004-04-24 Tobias Schlüter + + * trans-intrinsic.c: Fix comment, this is not trans-expr.c. Add + 2004 to copyright years. + * trans-expr.c, trans-decl.c: Comment update, we now generate + GENERIC, not SIMPLE. Add 2004 to copyright years. + +2004-04-24 Paul Brook + + * Make-lang.in (gfortranspec.o): Add dependency on $(TM_H). + +2004-04-24 Feng Wang + + PR 14817 + * arith.c (gfc_arith_divide): Fix complex divide. + +2004-04-23 Andrew Pinski + + * gfortranspec.c: Include the target headers. + +2004-04-18 Feng Wang + + PR fortran/14921 + PR fortran/14540 + * arith.c (arctangent2): New function. + * arith.h (arctangent2): Add function prototype. + * simplify.c (gfc_simplify_atan2): Use it. + (gfc_simplify_log): Use it. + +2004-04-12 Diego Novillo + + * fortran/f95-lang.c (gfc_expand_stmt): Remove. + (LANG_HOOKS_RTL_EXPAND_STMT): Remove. + +2004-04-11 Bud Davis + + PR fortran/14872 + * trans-io.c (build_dt): Change REC to value. + +2004-04-11 Feng Wang + + PR 14394 + * trans-const.c (gfc_conv_mpf_to_tree): Loosen the maximum digits of + the real value when converting mpf to string. + +2004-04-11 Feng Wang + + PR 14395 + * trans-intrinsic.c (gfc_conv_intrinsic_cmplx): Fix the imag part of + the result. + +2004-04-11 Feng Wang + + PR fortran/14377 + * simplify.c (simplify_min_max): Convert the type of the result. + +2004-04-11 Paul Brook + + * gfortran.texi: Use full target triplet. + +2004-04-11 Paul Brook + + * Make-lang.in (GFORTRAN_TEXI): Set it. + (fortran/dfortran.dvi): Use it. Add fortran to include paths. + (fortran/gfortran.info): Ditto. + * gfortran.texi: Major update. + * invoke.texi: New file. + +2004-04-10 Paul Brook + + * trans-array.c (gfc_trans_allocate_temp_array, + gfc_conv_tmp_array_ref): Don't use GFC_DECL_STRING. + * trans-decl.c (gfc_build_dummy_array_decl, + gfc_get_symbol_decl, gfc_build_function_decl, + gfc_create_module_variable): Ditto. + * trans-expr.c (gfc_conv_variable): Ditto. + * trans-intrinsic.c (gfc_conv_intrinsic_len): Ditto. + * trans.h (GFC_DECL_STRING): Remove. + (GFC_DECL_PACKED_ARRAY, GFC_DECL_PARTIAL_PACKED_ARRAY, + GFC_DECL_ASSIGN): Renumber flags. + +2004-04-05 Paul Brook + + PR 13252 + PR 14081 + * f95-lang.c (gfc_init_builtin_functions): Add stack_alloc, stack_save + and stack_restore. + * gfortran.h (struct gfc_charlen): Add backend_decl. + * trans-array.c (gfc_trans_allocate_temp_array, + gfc_conv_temp_array_ref, gfc_conv_resolve_dependencies, + (gfc_conv_loop_setup, gfc_array_allocate, gfc_conv_array_init_size): + Remove old, broken string handling. + (gfc_trans_auto_array_allocation, gfc_trans_g77_array, + gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor, + gfc_trans_deferred_array): Handle character arrays. + * trans-const.c (gfc_conv_const_charlen): New function. + * trans-const.h (gfc_conv_const_charlen): Add prototype. + * trans-decl.c (gfc_finish_var_decl): Don't mark automatic variables + as static. + (gfc_build_dummy_array_decl): Handle arrays with unknown element size. + (gfc_create_string_length): New function. + (gfc_get_symbol_decl): Create lengths for character variables. + (gfc_get_fake_result_decl): Ditto. + (gfc_build_function_decl): Only set length for assumed length + character arguments. + (gfc_trans_dummy_character): New function. + (gfc_trans_auto_character_variable): Rewrite. + (gfc_trans_deferred_vars): Handle more types of character variable. + (gfc_create_module_variable): String lengths have moved. + (gfc_generate_function_code): Initialize deferred var chain earlier. + * trans-expr.c (gfc_conv_init_string_length): Rename ... + (gfc_trans_init_string_length): ... to this. + (gfc_conv_component_ref, gfc_conv_variable, gfc_conv_concat_op, + gfc_conv_function_call): Update to new format for character variables. + (gfc_conv_string_length): Remove. + (gfc_conv_string_parameter): Update assertion. + * trans-intrinsic.c (gfc_conv_intrinsic_len): Use new location. + * trans-io.c (set_string): Use new macro names. + * trans-stmt.c (gfc_trans_label_assign. gfc_trans_goto): Ditto. + * trans-types.c (gfc_get_character_type): Use existing length expr. + (gfc_is_nodesc_array): Make public. + (gfc_get_dtype_cst): Rename ... + (gfc_get_dtype): ... to this. Handle unknown size arrays. + (gfc_get_nodesc_array_type): Use new name. + (gfc_sym_type): New character variable code. + (gfc_get_derived_type): Ditto. + (gfc_get_function_type): Evaluate character variable lengths. + * trans-types.h (gfc_strlen_kind): Define. + (gfc_is_nodesc_array): Add prototype. + * trans.h: Update prototypes. + (struct lang_type): Update comments. + (GFC_DECL_STRING_LEN): New name for GFC_DECL_STRING_LENGTH. + (GFC_KNOWN_SIZE_STRING_TYPE): Remove. + +2004-04-04 Paul Brook + + * gfortran.h (struct gfc_option_t): Remove flag_g77_calls. + * options.c (gfc_init.options, gfc_handle_option): Ditto. + * trans-expr.c (gfc_conv_function_call): Ditto. + * trans-types.c (gfc_is_nodesc_array): Ditto + * lang.opt (fg77-calls): Remove. + +2004-04-04 Paul Brook + + * trans-array.c (OFFSET_FIELD): Rename from BASE_FIELD. + (gfc_conv_descriptor_base): Rename ... + (gfc_conv_descriptor_offset): ... to this. + (gfc_trans_allocate_array_storage): Set offset to zero. + (gfc_conv_array_base): Rename ... + (gfc_conv_array_offset): ... to this. + (gfc_conv_array_index_ref): Add offset parameter. + (gfc_conv_array_ref): Include offset. + (gfc_trans_preloop_setup): Use existing offset. + (gfc_trans_allocate_temp_array, gfc_array_allocate, + gfc_trans_auto_array_allocation, gfc_trans_g77_array, + gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor, + gfc_conf_ss_descriptor): Set offset. + * trans-array.h: Rename prototypes. + * trans-const.h (gfc_index_zero_node): Define. + * trans-decl.c (gfc_build_qualified_array): Change base to offset. + * trans-types.c (gfc_get_array_type_bounds): Ditto. + (gfc_get_nodesc_array_type): Calculate offset before upper bound. + +2004-03-25 Diego Novillo + + * convert.c (convert): Don't handle WITH_RECORD_EXPR. + +2004-03-24 Bud Davis + + PR 14055 + * arith.c (gfc_convert_integer,gfc_convert_real): Removed leading '+' + before conversion by gmp library call. + +2004-03-24 Bud Davis + + PR 12921 + * trans-io.c (gfc_trans_open): Change RECL= to a value parameter. + +2004-02-24 Richard Henderson + + * trans-array.c (gfc_trans_dummy_array_bias): Fix typo. + +2004-02-19 Loren J. Rittle + + * Make-lang.in ($(srcdir)/fortran/gfortran.info): Move... + (fortran/gfortran.info): ... to here. + (f95.srcinfo): New. + +2004-02-16 Richard Henderson + + * Make-lang.in (f95-lang.o, trans-decl.o): Depend on cgraph.h. + * f95-lang.c (LANG_HOOKS_EXPAND_DECL): Remove. + (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): New. + (gfc_expand_function): Rename from expand_function_body, make static, + don't do anything except invoke tree_rest_of_compilation. + (gfc_be_parse_file): Invoke cgraph. + (gfc_expand_decl): Remove. + (gfc_init_builtin_functions): Add __builtin_init_trampoline and + __builtin_adjust_trampoline. + * trans-decl.c (gfc_get_extern_function_decl): Don't set DECL_CONTEXT. + (gfc_finalize): New. + (gfc_generate_function_code): Use it. Lower nested functions. + * trans-expr.c (gfc_conv_function_call): Add static chain operand + to call_expr. + * trans.c (gfc_build_function_call): Likewise. + * trans.h (expand_function_body): Remove. + +2004-02-15 Victor Leikehman + + PR gfortran/13433 + * trans-decl.c (gfc_build_function_decl) For functions + returning CHARACTER pass an extra length argument, + following g77 calling conventions. + * trans-types.c (gfc_get_function_type) Ditto. + * trans-expr.c (gfc_conv_function_call) Ditto. + +2004-02-14 Paul Brook + + * f95-lang.c (gfc_init_builtin_functions): Build chain properly. + +2004-02-12 Paul Brook + + * BUGS: Remove. + +2004-02-08 Steve Kargl + + * gfortran.texi: Fix typos. + +2004-02-07 Bud Davis + + PR gfortran/13909 + * intrinsic.c (add_conversions) Use logical conversion instead + of real. + * trans-types.c (gfc_get_logical_type) implemented logical*1 + and logical*2. + +2004-01-17 Paul Brook + + * lang-specs.h: Remove % + + * lang-specs.h: Enable preprocessing of source files + ending in .F, .fpp, .FPP, .F90 and .F95. + +2004-01-13 Toon Moene + + PR fortran/12912 + * lang-specs.h: Enable compilation of files ending + in .f, .for and .FOR. + +2004-01-11 Paul Brook + + * trans-stmt.c (gfc_trans_if_1): New function. + (gfc_trans_if): Use it. + +2004-01-11 Erik Schnetter + + * gfortran.h (GFC_MAX_SYMBOL_LEN): Increase. + (gfc_option_t): Add max_identifier_length. + * lang.opt: Add fmax-identifier-length. + * match.c (parse_name): Use limit. + * options.c (gfc_init_options): Set max_identifier_length. + (gfc_handle_option): Ditto. + +2004-01-11 Feng Wang + + * intrinsic.c (add_functions): Add resolve function to dcmplx. + * intrinsic.h (gfc_resolve_dcmplx): Add prototype. + * iresolve.c (gfc_resolve_dcmplx): New function. + +2004-01-10 Paul Brook + + * trans-decl.c (gfc_get_symbol_decl): Don't set subroutine attr. + * trans-types.c (gfc_sym_type): Handle external dummy procedures. + (gfc_return_by_reference): Correct condition. + (gfc_get_function_type): Ditto. + +2004-01-10 Paul Brook + + * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Convert mismatched + types. + +2004-01-10 Huang Chun + + * iresolve.c: Use correct kind. + +2004-01-10 Huang Chun + + PR fortran/13467 + * trans-decl.c (gfc_create_module_variable): Output array valued + parameters. + +2004-01-10 Paul Brook + + * resolve.c (resolve_branch): Get error message right way round. + +2004-01-10 Canqun Yang + + * trans-array (gfc_conv_loop_setup): Adjust comment to track + reality. + (gfc_array_allocate): Don't count size of element twice. + +2004-01-04 Paul Brook + + * lang.opt (i8, r8, std=*): Remove RejectNegative. + +2004-01-04 Paul Brook + + * error.c (gfc_notify_std): New function. + * gfortran.h (gfc_notify_std): Declare. + (GFC_STD_*): Define. + (gfc_option_t): Add warn_std and allow_std. + * intrinsic.c (gfc_init_expr_extensions): Fix logic. + (gfc_intrinsic_func_interface): Use gfc_notify_std. + * check.c (check_rest): Use gfc_notify_std. + * match.c (gfc_match_pause): Ditto. + (gfc_match_assign): Ditto. + (gfc_match_goto): Ditto. + * resolve.c (resolve_branch): Ditto. + * lang.opt: Add std= and w. + * options.c (gfc_init_options): Set allow_std and warn_std. + (gfc_handle_option): Handle OPT_std_* and OPT_w. + +2004-01-01 Paul Brook + + * array.c (gfc_append_constructor): Take constructor, not expression. + * data.c (struct gfc_expr_stack): Remove. + (expr_stack): Remove. + (find_con_by_offset): Rename from find_expr_in_con. + (find_con_by_component): Rename from find_component_in_con. + (gfc_get_expr_stack): Remove. + (gfc_assign_data_value): Rewrite. + (gfc_expr_push): Remove. + (gfc_expr_pop): Remove. + (gfc_advance_section): Rename from + gfc_modify_index_and_calculate_offset. Handle unbounded sections. + (gfc_get_section_index): Handle unbounded sections. + * gfortran.h: Update prototypes. + * resolve.c (check_data_variable): Array section maight not be the + last ref. + +2004-01-01 Paul Brook + + PR fortran/13432 + * resolve.c (resolve_symbol): Allow assumed length function results. + +2004-01-01 Steve Kargl + + * match.c (gfc_match_pause): Fix spelling. + +2004-01-01 Steven Bosscher + + PR fortran/13251 + * trans-expr.c (gfc_conv_variable): Take the type kind of a substring + reference from the expression. diff --git a/gcc/fortran/ChangeLog-2005 b/gcc/fortran/ChangeLog-2005 new file mode 100644 index 00000000000..2a0f26dfdbc --- /dev/null +++ b/gcc/fortran/ChangeLog-2005 @@ -0,0 +1,3723 @@ +2005-12-30 Erik Edelmann + + PR fortran/22607 + * trans-decl.c(gfc_get_extern_function_decl): Don't set + DECL_IS_PURE (fndecl) = 1 for return-by-reference + functions. + + fortran/PR 25396 + * interface.c (gfc_extend_expr): Initialize + e->value.function.name to NULL. + +2005-12-29 Paul Thomas + + PR fortran/25532 + * trans-types.c (copy_dt_decls_ifequal): Copy declarations for + components of derived type components by recursing into + gfc_get_derived_type. + +2005-12-28 Andrew Pinski + + PR fortran/25587 + * trans-io.c (gfc_build_st_parameter): Correct off by one error. + +2005-12-28 Rafael Ávila de Espíndola + + * Make-lang.in: Remove distdir from comment. + +2005-12-24 Paul Thomas + + PR fortran/25029 + PR fortran/21256 + * resolve.c (check_assumed_size_reference, resolve_assumed_size_actual): + Remove because of regressions caused by patch. + (resolve_function, resolve_call, resolve_variable): Remove assumed size + checks because of regressionscaused by patch. + +2005-12-23 Paul Thomas + + PR fortran/25029 + PR fortran/21256 + *resolve.c(resolve_function): Remove assumed size checking for SIZE + and UBOUND and rely on their built-in checking. + +2005-12-22 Tobias Schl"uter + + PR fortran/18990 + * gfortran.h (gfc_charlen): Add resolved field. + * expr.c (gfc_specification_expr): Accept NULL argument. + * resolve.c (gfc_resolve_charlen, gfc_resolve_derived): New. + (gfc_resolve_symbol): Resolve derived type definitions. Use + resolve_charlen to resolve character lengths. + +2005-12-22 Paul Thomas + + PR fortran/20889 + *resolve.c(resolve_structure_cons): Do not attempt to convert + the type of mismatched pointer type components, except when + the constructor component is BT_UNKNOWN; emit error instead. + + PR fortran/25029 + PR fortran/21256 + *resolve.c(check_assumed_size_reference): New function to check for upper + bound in assumed size array references. + (resolve_assumed_size_actual): New function to do a very restricted scan + of actual argument expressions of those procedures for which incomplete + assumed size array references are not allowed. + (resolve_function, resolve_call): Switch off assumed size checking of + actual arguments, except for elemental procedures and array valued + intrinsics; excepting LBOUND. + (resolve_variable): Call check_assumed_size_reference. + + PR fortran/19362 + PR fortran/20244 + PR fortran/20864 + PR fortran/25391 + *interface.c(gfc_compare_types): Broken into two. + (gfc_compare_derived_types): Second half of gfc_compare_types with + corrections for a missing check that module name is non-NULL and + a check for private components. + *symbol.c(gfc_free_dt_list): New function. + (gfc_free_namespace): Call gfc_free_dt_list. + *resolve.c(resolve_symbol): Build the list of derived types in the + symbols namespace. + *gfortran.h: Define the structure type gfc_dt_list. Add a new field, + derived_types to gfc_namespace. Provide a prototye for the new + function gfc_compare_derived_types. + *trans_types.c(gfc_get_derived_type): Test for the derived type being + available in the host namespace. In this case, the host backend + declaration is used for the structure and its components. If an + unbuilt, equal structure that is not use associated is found in the + host namespace, build it there and then. On exit,traverse the + namespace of the derived type to see if there are equal but unbuilt. + If so, copy the structure and its component declarations. + (copy_dt_decls_ifequal): New functions to copy declarations to other + equal structure types. + + PR fortran/20862 + * io.c (gfc_match_format): Make the appearance of a format statement + in a module specification block an error. + + PR fortran/23152 + * match.c (gfc_match_namelist): Set assumed shape arrays in + namelists as std=GFC_STD_GNU and assumed size arrays as an + unconditional error. + + PR fortran/25069 + * match.c (gfc_match_namelist): Set the respecification of a USE + associated namelist group as std=GFC_STD_GNU. Permit the concatenation + on no error. + + PR fortran/25053 + PR fortran/25063 + PR fortran/25064 + PR fortran/25066 + PR fortran/25067 + PR fortran/25068 + PR fortran/25307 + * io.c (resolve_tag): Change std on IOSTAT != default integer to + GFC_STD_GNU and change message accordingly. Add same error for + SIZE. + (match_dt_element, gfortran.h): Add field err_where to gfc_dt and + set it when tags are being matched. + (gfc_resolve_dt): Remove tests that can be done before resolution + and add some of the new ones here. + (check_io_constraints): New function that checks for most of the + data transfer constraints. Some of these were previously done in + match_io, from where this function is called, and some were done + in gfc_resolve_dt. + (match_io): Remove most of the tests of constraints and add the + call to check_io_constraints. + +2005-12-21 Erik Edelmann + + PR fortran/25423 + * parse.c (parse_where_block): break instead of "fall + through" after parsing nested WHERE construct. + +2005-12-18 Paul Thomas + + PR fortran/25018 + *expr.c(check_inquiry): Return FAILURE if there is no symtree to + provide a name. Error/warning for assumed character length argument + to LEN for an initialization expression, using GFC_GNU_STD. Add an + argument to flag that the expression is not restricted. + (check_init_expr): Improve the message for a failing variable. + (gfc_match_init_expr): Call check_enquiry again to make sure that + unsimplified expressions are not causing unnecessary errors. + +2005-12-17 Steven G. Kargl + Tobias Schlueter + + PR fortran/25458 + * simplify.c (gfc_simplify_ibset, gfc_simplify_not): Add call to + twos_complement. + +2005-12-17 Steven G. Kargl + + * decl.c (gfc_match_old_kind_spec,match_type_spec): Use gfc_std_notify + to report nonstandard intrinsic type declarations. + +2005-12-16 Jerry DeLisle + + PR fortran/24268 + * io.c (format_lex): Allow whitespace within text of format specifier. + +2005-12-16 Steven G. Kargl + + PR fortran/25106 + PR fortran/25055 + * match.c (gfc_match_small_literal_int): Add cnt argument; + (gfc_match_st_label,gfc_match_stopcode): Account for cnt argument. + * match.h (gfc_match_small_literal_int): Update prototype. + * decl.c (match_char_length,gfc_match_old_kind_spec): Account for cnt. + * parse.c (next_free): Ditto. + * primary.c (match_kind_param): Ditto. + +2005-12-16 Richard Guenther + + * trans.h (tree): Remove declaration of gfc_build_function_call. + * trans.c (gfc_build_function_call): Remove. + (gfc_build_array_ref): Use build_function_call_expr. + (gfc_trans_runtime_check): Likewise. + * trans-array.c (gfc_trans_allocate_array_storage): Likewise. + (gfc_grow_array): Likewise. + (gfc_trans_array_ctor_element): Likewise. + (gfc_trans_array_constructor_value): Likewise. + (gfc_array_allocate): Likewise. + (gfc_array_deallocate): Likewise. + (gfc_trans_auto_array_allocation): Likewise. + (gfc_trans_dummy_array_bias): Likewise. + (gfc_conv_array_parameter): Likewise. + * trans-expr.c (gfc_conv_power_op): Likewise. + (gfc_conv_string_tmp): Likewise. + (gfc_conv_concat_op): Likewise. + (gfc_conv_expr_op): Likewise. + (gfc_trans_string_copy): Likewise. + * trans-decl.c (build_entry_thunks): Likewise. + (gfc_generate_function_code): Likewise. + (gfc_generate_constructors): Likewise. + * trans-io.c (gfc_trans_open): Likewise. + (gfc_trans_close): Likewise. + (build_filepos): Likewise. + (gfc_trans_inquire): Likewise. + (transfer_namelist_element): Likewise. + (build_dt): Likewise. + (gfc_trans_dt_end): Likewise. + (transfer_expr): Likewise. + (transfer_array_desc): Likewise. + * trans-stmt.c (gfc_trans_pause): Likewise. + (gfc_trans_stop): Likewise. + (gfc_trans_character_select): Likewise. + (gfc_do_allocate): Likewise. + (gfc_trans_assign_need_temp): Likewise. + (gfc_trans_pointer_assign_need_temp): Likewise. + (gfc_trans_forall_1): Likewise. + (gfc_trans_where): Likewise. + (gfc_trans_allocate): Likewise. + (gfc_trans_deallocate): Likewise. + * trans-intrinsic.c (gfc_conv_intrinsic_aint): Likewise. + (gfc_conv_intrinsic_lib_function): Likewise. + (gfc_conv_intrinsic_exponent): Likewise. + (gfc_conv_intrinsic_abs): Likewise. + (gfc_conv_intrinsic_sign): Likewise. + (gfc_conv_intrinsic_ctime): Likewise. + (gfc_conv_intrinsic_fdate): Likewise. + (gfc_conv_intrinsic_ttynam): Likewise. + (gfc_conv_intrinsic_ishftc): Likewise. + (gfc_conv_intrinsic_len_trim): Likewise. + (gfc_conv_intrinsic_index): Likewise. + (gfc_conv_intrinsic_size): Likewise. + (gfc_conv_intrinsic_strcmp): Likewise. + (gfc_conv_intrinsic_adjust): Likewise. + (gfc_conv_associated): Likewise. + (gfc_conv_intrinsic_scan): Likewise. + (gfc_conv_intrinsic_verify): Likewise. + (call_builtin_clz): Likewise. + (gfc_conv_intrinsic_si_kind): Likewise. + (gfc_conv_intrinsic_sr_kind): Likewise. + (gfc_conv_intrinsic_trim): Likewise. + (gfc_conv_intrinsic_repeat): Likewise. + (gfc_conv_intrinsic_iargc): Likewise. + +2005-12-16 Richard Guenther + + * trans.h (gfc_build_indirect_ref): Remove declaration. + * trans.c (gfc_build_indirect_ref): Remove. + * trans-array.c (gfc_trans_array_ctor_element): Use + build_fold_indirect_ref instead of gfc_build_indirect_ref. + (gfc_trans_array_constructor_value): Likewise. + (gfc_conv_array_index_offset): Likewise. + (gfc_conv_scalarized_array_ref): Likewise. + (gfc_conv_array_ref): Likewise. + (gfc_trans_dummy_array_bias): Likewise. + (gfc_conv_expr_descriptor): Likewise. + (gfc_conv_array_parameter): Likewise. + * trans-decl.c (gfc_finish_cray_pointee): Likewise. + (gfc_get_symbol_decl): Likewise. + * trans-expr.c (gfc_conv_substring): Likewise. + (gfc_conv_component_ref): Likewise. + (gfc_conv_variable): Likewise. + (gfc_add_interface_mapping): Likewise. + (gfc_conv_function_call): Likewise. + * trans-intrinsic.c (gfc_conv_intrinsic_ichar): Likewise. + (gfc_conv_intrinsic_transfer): Likewise. + * trans-io.c (nml_get_addr_expr): Likewise. + (transfer_namelist_element): Likewise. + (transfer_expr): Likewise. + * trans-stmt.c (gfc_trans_nested_forall_loop): Likewise. + (allocate_temp_for_forall_nest_1): Likewise. + (gfc_trans_forall_1): Likewise. + +2005-12-16 Richard Guenther + + * trans-array.c (gfc_conv_descriptor_data_addr): Use + build_fold_addr_expr where appropriate. + (gfc_trans_allocate_array_storage): Likewise. + (gfc_trans_array_constructor_value): Likewise. + (gfc_conv_array_data): Likewise. + (gfc_conv_expr_descriptor): Likewise. + (gfc_conv_array_parameter): Likewise. + * trans-expr.c (gfc_conv_variable): Likewise. + (gfc_conv_function_val): Likewise. + (gfc_conv_function_call): Likewise. + (gfc_conv_expr_reference): Likewise. + * trans-intrinsic.c (gfc_conv_intrinsic_ctime): Likewise. + (gfc_conv_intrinsic_fdate): Likewise. + (gfc_conv_intrinsic_ttynam): Likewise. + (gfc_conv_intrinsic_si_kind): Likewise. + (gfc_conv_intrinsic_trim): Likewise. + * trans-io.c (set_parameter_ref): Likewise. + (gfc_convert_array_to_string): Likewise. + (gfc_trans_open): Likewise. + (gfc_trans_close): Likewise. + (build_filepos): Likewise. + (gfc_trans_inquire): Likewise. + (nml_get_addr_expr): Likewise. + (transfer_namelist_element): Likewise. + (build_dt): Likewise. + (gfc_trans_dt_end): Likewise. + (transfer_array_component): Likewise. + (transfer_expr): Likewise. + (transfer_array_desc): Likewise. + (gfc_trans_transfer): Likewise. + * trans-stmt.c (gfc_trans_allocate): Likewise. + (gfc_trans_deallocate): Likewise. + +2005-12-16 Kazu Hirata + + * dependency.c, resolve.c, trans-array.c: Fix comment typos. + * gfortran.texi: Fix typos. + +2005-12-14 Erik Edelmann + + PR fortran/18197 + * resolve.c (resolve_formal_arglist): Remove code to set + the type of a function symbol from it's result symbol. + +2005-12-13 Richard Guenther + + * trans-expr.c (gfc_conv_substring): Use fold_build2 and + build_int_cst. + +2005-12-13 Richard Sandiford + + * Make-lang.in (fortran/trans-resolve.o): Depend on + fortran/dependency.h. + * gfortran.h (gfc_expr): Add an "inline_noncopying_intrinsic" flag. + * dependency.h (gfc_get_noncopying_intrinsic_argument): Declare. + (gfc_check_fncall_dependency): Change prototype. + * dependency.c (gfc_get_noncopying_intrinsic_argument): New function. + (gfc_check_argument_var_dependency): New function, split from + gfc_check_fncall_dependency. + (gfc_check_argument_dependency): New function. + (gfc_check_fncall_dependency): Replace the expression parameter with + separate symbol and argument list parameters. Generalize the function + to handle dependencies for any type of expression, not just variables. + Accept a further argument giving the intent of the expression being + tested. Ignore intent(in) arguments if that expression is also + intent(in). + * resolve.c: Include dependency.h. + (find_noncopying_intrinsics): New function. + (resolve_function, resolve_call): Call it on success. + * trans-array.h (gfc_conv_array_transpose): Declare. + (gfc_check_fncall_dependency): Remove prototype. + * trans-array.c (gfc_conv_array_transpose): New function. + * trans-intrinsic.c (gfc_conv_intrinsic_function): Don't use the + libcall handling if the expression is to be evaluated inline. + Add a case for handling inline transpose()s. + * trans-expr.c (gfc_trans_arrayfunc_assign): Adjust for the new + interface provided by gfc_check_fncall_dependency. + +2005-12-12 Steven G. Kargl + + PR fortran/25078 + * match.c (gfc_match_equivalence): Count number of objects. + +2005-12-11 Aldy Hernandez + + * lang.opt: Add RejectNegative to ffixed-form and ffree-form. + +2005-12-10 Francois-Xavier Coudert + + PR fortran/25068 + * io.c (resolve_tag): Add correct diagnostic for F2003 feature. + +2005-12-10 Thomas Koenig + + PR fortran/23815 + * io.c (top level): Add convert to io_tag. + (resolve_tag): convert is GFC_STD_GNU. + (match_open_element): Add convert. + (gfc_free_open): Likewise. + (gfc_resolve_open): Likewise. + (gfc_free_inquire): Likewise. + (match_inquire_element): Likewise. + * dump-parse-tree.c (gfc_show_code_node): Add + convet for open and inquire. + gfortran.h: Add convert to gfc_open and gfc_inquire. + * trans-io.c (gfc_trans_open): Add convert. + (gfc_trans_inquire): Likewise. + * ioparm.def: Add convert to open and inquire. + * gfortran.texi: Document CONVERT. + +2005-12-09 Roger Sayle + + PR fortran/22527 + * f95-lang.c (gfc_truthvalue_conversion): Use a zero of the correct + integer type when building an inequality. + +2005-12-09 Richard Guenther + + * f95-lang.c (build_builtin_fntypes): Use correct + return types, as indicated by comments. + +2005-12-08 Erik Edelmann + + PR fortran/25292 + * check.c (gfc_check_associated): Allow function results + as actual arguments to ASSOCIATED. Moved a misplaced + comment. + +2005-12-07 Rafael Ávila de Espíndola + + * Make-lang.in (fortran.all.build, fortran.install-normal): Remove. + +2005-12-07 Rafael Ávila de Espíndola + + * Make-lang.in: Remove all dependencies on s-gtype, except for + gt-fortran-trans.h. + +2005-12-03 Francois-Xavier Coudert + + PR fortran/25106 + * parse.c (next_free): Use new prototype for gfc_match_st_label. + Correctly emit hard error if a label is zero. + * match.c (gfc_match_st_label): Never allow zero as a valid + label. + (gfc_match, gfc_match_do, gfc_match_goto): Use new prototype for + gfc_match_st_label. + * primary.c (): Use new prototype for gfc_match_st_label. + * io.c (): Likewise. + * match.h: Likewise. + +2005-12-02 Richard Guenther + + * trans.h (build1_v): Use build1, not build to build the + void typed tree. + +2005-12-01 Erik Schnetter + + * decl.c (gfc_match_old_kind_spec): Improve handling of old style + COMPLEX*N + +2005-12-01 Paul Thomas + + PR fortran/24789 + * trans-decl.c (gfc_get_symbol_decl): Move the expression for + unit size of automatic character length, dummy pointer array + elements down a few lines from the version that fixed PR15809. + +2005-11-30 Bernhard Fischer + + PR fortran/21302 + * lang.opt: New options -ffree-line-length- and -ffree-line-length-none. + * gfortran.h: Add free_line_length and add description of + free_line_length and fixed_line_length. + * options.c (gfc_init_options, gfc_handle_option): Initialize + and set free_line_length and fixed_line_length. + * scanner.c (load_line): Set free_line_length to 132 and + fixed_line_length to 72 or user requested values. + * scanner.c: Typo in comment. + * invoke.texi: Document -ffree-line-length- and + -ffree-line-length-none + +2005-11-30 Paul Thomas + + PR fortran/15809 + * trans-decl.c (gfc_get_symbol_decl): In the case of automatic + character length, dummy pointer arrays, build an expression for + unit size of the array elements, to be picked up and used in the + descriptor dtype. + * trans-io.c (gfc_trans_transfer): Modify the detection of + components of derived type arrays to use the gfc_expr references + instead of the array descriptor dtype. This allows the latter + to contain expressions. + +2005-11-30 Erik Edelmann + + PR fortran/15809 + * trans-array.c (gfc_trans_deferred_array): Allow PARM_DECLs past + in addition to VAR_DECLs. + +2005-11-29 Jakub Jelinek + + * io.c (gfc_resolve_open): RESOLVE_TAG access field as well. + +2005-11-27 Bernhard Fischer + + * gfortran.h: remove superfluous whitespace and use GNU + comment-style for the documentation of backend_decl. + +2005-11-27 Steven G. Kargl + + PR fortran/24917 + * primary.c (match_boz_constant): Implement postfix BOZ constants; + (match_string_constant): Peek for b, o, z, and x + +2005-11-27 Francois-Xavier Coudert + + PR fortran/23912 + * iresolve.c (gfc_resolve_dim, gfc_resolve_mod, + gfc_resolve_modulo): When arguments have different kinds, fold + the lower one to the largest kind. + * check.c (gfc_check_a_p): Arguments of different kinds is not + a hard error, but an extension. + * simplify.c (gfc_simplify_dim, gfc_simplify_mod, + gfc_simplify_modulo): When arguments have different kinds, fold + the lower one to the largest kind. + +2005-11-21 Jakub Jelinek + + PR fortran/14943 + PR fortran/21647 + * Make-lang.in (fortran/trans-io.o): Depend on fortran/ioparm.def. + * dump-parse-tree.c (gfc_show_code_node): Dump c->block for + EXEC_{READ,WRITE,IOLENGTH} nodes. + * io.c (terminate_io, match_io, gfc_match_inquire): Put data + transfer commands into EXEC_{READ,WRITE,IOLENGTH}'s code->block. + * resolve.c (resolve_blocks): Handle EXEC_{READ,WRITE,IOLENGTH}. + * trans-io.c (ioparm_unit, ioparm_err, ioparm_end, ioparm_eor, + ioparm_list_format, ioparm_library_return, ioparm_iostat, + ioparm_exist, ioparm_opened, ioparm_number, ioparm_named, + ioparm_rec, ioparm_nextrec, ioparm_size, ioparm_recl_in, + ioparm_recl_out, ioparm_iolength, ioparm_file, ioparm_file_len, + ioparm_status, ioparm_status_len, ioparm_access, ioparm_access_len, + ioparm_form, ioparm_form_len, ioparm_blank, ioparm_blank_len, + ioparm_position, ioparm_position_len, ioparm_action, + ioparm_action_len, ioparm_delim, ioparm_delim_len, ioparm_pad, + ioparm_pad_len, ioparm_format, ioparm_format_len, ioparm_advance, + ioparm_advance_len, ioparm_name, ioparm_name_len, + ioparm_internal_unit, ioparm_internal_unit_len, + ioparm_internal_unit_desc, ioparm_sequential, ioparm_sequential_len, + ioparm_direct, ioparm_direct_len, ioparm_formatted, + ioparm_formatted_len, ioparm_unformatted, ioparm_unformatted_len, + ioparm_read, ioparm_read_len, ioparm_write, ioparm_write_len, + ioparm_readwrite, ioparm_readwrite_len, ioparm_namelist_name, + ioparm_namelist_name_len, ioparm_namelist_read_mode, ioparm_iomsg, + ioparm_iomsg_len, ioparm_var): Remove. + (enum ioparam_type, enum iofield_type, enum iofield, + enum iocall): New enums. + (gfc_st_parameter_field, gfc_st_parameter): New typedefs. + (st_parameter, st_parameter_field, iocall): New variables. + (ADD_FIELD, ADD_STRING): Remove. + (dt_parm, dt_post_end_block): New variables. + (gfc_build_st_parameter): New function. + (gfc_build_io_library_fndecls): Use it. Initialize iocall + array rather than ioparm_*, add extra first arguments to + the function types. + (set_parameter_const): New function. + (set_parameter_value): Add type argument, return a bitmask. + Changed to set a field in automatic structure variable rather + than set a field in a global _gfortran_ioparm variable. + (set_parameter_ref): Likewise. If requested var has different + size than what field should point to, call with a temporary and + then copy into the user variable. Add postblock argument. + (set_string): Remove var_len argument, add type argument, return + a bitmask. Changed to set fields in automatic structure variable + rather than set a field in a global _gfortran_ioparm variable. + (set_internal_unit): Remove iunit, iunit_len, iunit_desc arguments, + add var argument. Return a bitmask. Changed to set fields in + automatic structure variable rather than set a field in a global + _gfortran_ioparm variable. + (set_flag): Removed. + (io_result): Add var argument. Changed to read common.flags field + from automatic structure variable and bitwise AND it with 3. + (set_error_locus): Add var argument. Changed to set fields in + automatic structure variable rather than set a field in a global + _gfortran_{filename,line} variables. + (gfc_trans_open): Use gfc_start_block rather than gfc_init_block. + Create a temporary st_parameter_* structure. Adjust callers of + all above mentioned functions. Pass address of the temporary + variable as first argument to the generated function call. + Use iocall array rather than ioparm_* separate variables. + (gfc_trans_close, build_filepos, gfc_trans_inquire): Likewise. + (build_dt): Likewise. Change first argument to tree from tree *. + Don't dereference code->ext.dt if last_dt == INQUIRE. Emit + IOLENGTH argument setup here. Set dt_parm/dt_post_end_block + variables and gfc_trans_code the nested data transfer commands + in code->block. + (gfc_trans_iolength): Just set last_dt and call build_dt immediately. + (transfer_namelist_element): Pass address of dt_parm variable + to generated functions. Use iocall array rather than ioparm_* + separate variables. + (gfc_trans_backspace, gfc_trans_endfile, gfc_trans_rewind, + gfc_trans_flush, gfc_trans_read, gfc_trans_write): Use iocall array + rather than ioparm_* separate variables. + (gfc_trans_dt_end): Likewise. Pass address of dt_parm variable + as first argument to generated function. Adjust io_result caller. + Prepend dt_post_end_block before io_result code. + (transfer_expr): Use iocall array rather than ioparm_* separate + variables. Pass address of dt_parm variables as first argument + to generated functions. + * ioparm.def: New file. + +2005-11-21 Paul Thomas + + PR fortran/24223 + * resolve.c (resolve_contained_fntype) Error if an internal + function is assumed character length. + + PR fortran/24705 + * trans-decl.c (gfc_create_module_variable) Skip ICE in + when backend decl has been built and the symbol is marked + as being in an equivalence statement. + +2005-11-20 Toon Moene + + * invoke.texi: Remove superfluous @item. + +2005-11-19 Janne Blomqvist + + PR fortran/24862 + * trans-io.c (gfc_trans_transfer): Handle arrays of derived type. + +2005-11-17 Francois-Xavier Coudert + + PR fortran/20811 + * scanner.c (gfc_open_included_file): Add an extra include_cwd + argument. Only include files in the current working directory if + its value is true. + * gfortran.h: Change prototype for gfc_open_included_file. + (load_file): Don't search for include files in the current working + directory. + * options.c (gfc_post_options): Add the directory of the source file + to the list of paths for included files. + * module.c (gfc_use_module): Look for module files in the current + directory. + +2005-11-16 Alan Modra + + PR fortran/24096 + * trans-types.c (gfc_init_kinds): Use one less for max_exponent + of IBM extended double format. + +2005-11-13 Francois-Xavier Coudert + + * intrinsic.c (add_functions): Add COMPLEX, FTELL, FGETC, FGET, + FPUTC, FPUT, AND, XOR and OR intrinsic functions. + (add_subroutines): Add FGETC, FGET, FPUTC, FPUT and FTELL intrinsic + subroutines. + * gfortran.h: Add GFC_ISYM_AND, GFC_ISYM_COMPLEX, GFC_ISYM_FGET, + GFC_ISYM_FGETC, GFC_ISYM_FPUT, GFC_ISYM_FPUTC, GFC_ISYM_FTELL, + GFC_ISYM_OR, GFC_ISYM_XOR. + * iresolve.c (gfc_resolve_and, gfc_resolve_complex, + gfc_resolve_or, gfc_resolve_fgetc, gfc_resolve_fget, + gfc_resolve_fputc, gfc_resolve_fput, gfc_resolve_ftell, + gfc_resolve_xor, gfc_resolve_fgetc_sub, gfc_resolve_fget_sub, + gfc_resolve_fputc_sub, gfc_resolve_fput_sub, gfc_resolve_ftell_sub): + New functions. + * check.c (gfc_check_complex, gfc_check_fgetputc_sub, + gfc_check_fgetputc, gfc_check_fgetput_sub, gfc_check_fgetput, + gfc_check_ftell, gfc_check_ftell_sub, gfc_check_and): New functions. + * simplify.c (gfc_simplify_and, gfc_simplify_complex, gfc_simplify_or, + gfc_simplify_xor): New functions. + * trans-intrinsic.c (gfc_conv_intrinsic_function): Add cases for + GFC_ISYM_AND, GFC_ISYM_COMPLEX, GFC_ISYM_FGET, GFC_ISYM_FGETC, + GFC_ISYM_FPUT, GFC_ISYM_FPUTC, GFC_ISYM_FTELL, GFC_ISYM_OR and + GFC_ISYM_XOR. + * intrinsic.h: Add prototypes for all functions added to iresolve.c, + simplify.c and check.c. + +2005-11-10 Paul Thomas + Steven G. Kargl + + PR fortran/15976 + * resolve.c (resolve_symbol): Disallow automatic arrays in module scope. + +2005-11-10 Paul Thomas + + PR fortran/24655 + PR fortran/24755 + * match.c (recursive_stmt_fcn): Add checks that symtree exists + for the expression to weed out inline intrinsic functions and + parameters. + + PR fortran/24409 + * module.c (mio_symtree_ref): Correct the patch of 0923 so that + a symbol is not substituted for by a the symbol for the module + itself and to prevent the promotion of a formal argument. + +2005-11-10 Tobias Schl"uter + + PR fortran/24643 + * primary.c (match_varspec): Check for implicitly typed CHARACTER + variables before matching substrings. + +2005-11-09 Steven G. Kargl + + * trans-intrinsic.c: Typo in comment. + +2005-11-09 Erik Edelmann + + PR fortran/22607 + * trans-decl.c(build_function_decl): Don't set + DECL_IS_PURE (fndecl) = 1 for return-by-reference + functions. + +2005-11-08 Tobias Schl"uter + + * dump-parse-tree.c: Fix comment typo, add a few blank lines. + +2005-11-07 Steven G. Kargl + + * error.c: Use flag_fatal_error. + * invoke.texi: Remove -Werror from list of options. + +2005-11-06 Paul Thomas + + PR fortran/24534 + * resolve.c (resolve_symbol): Exclude case of PRIVATE declared + within derived type from error associated with PRIVATE type + components within derived type. + + PR fortran/20838 + PR fortran/20840 + * gfortran.h: Add prototype for gfc_has_vector_index. + * io.c (gfc_resolve_dt): Error if internal unit has a vector index. + * expr.c (gfc_has_vector_index): New function to check if any of + the array references of an expression have vector inidices. + (gfc_check_pointer_assign): Error if internal unit has a vector index. + + PR fortran/17737 + * data.c (gfc_assign_data_value): Remove gcc_assert that caused the ICE + and replace by a standard dependent warning/error if overwriting an + existing initialization. + * decl.c (gfc_data_variable): Remove old error for already initialized + variable and the unused error check for common block variables. Add + error for hots associated variable and standard dependent error for + common block variables, outside of blockdata. + * symbol.c (check_conflict): Add constraints for DATA statement. + +2005-11-06 Janne Blomqvist + + PR fortran/24174 + PR fortran/24305 + * fortran/trans-io.c (gfc_build_io_library_fndecls): Add kind + argument to transfer_array. + (transfer_array_desc): Add kind argument. + +2005-11-06 Francois-Xavier Coudert + + * intrinsic.c (add_functions): Add ctime and fdate intrinsics. + (add_subroutines): Likewise. + * intrinsic.h: Prototypes for gfc_check_ctime, + gfc_check_ctime_sub, gfc_check_fdate_sub, gfc_resolve_ctime, + gfc_resolve_fdate, gfc_resolve_ctime_sub, gfc_resolve_fdate_sub. + * gfortran.h: Add GFC_ISYM_CTIME and GFC_ISYM_FDATE. + * iresolve.c (gfc_resolve_ctime, gfc_resolve_fdate, + gfc_resolve_ctime_sub, gfc_resolve_fdate_sub): New functions. + * trans-decl.c (gfc_build_intrinsic_function_decls): Add + gfor_fndecl_fdate and gfor_fndecl_ctime. + * check.c (gfc_check_ctime, gfc_check_ctime_sub, + gfc_check_fdate_sub): New functions. + * trans-intrinsic.c (gfc_conv_intrinsic_ctime, + gfc_conv_intrinsic_fdate): New functions. + (gfc_conv_intrinsic_function): Add cases for GFC_ISYM_CTIME + and GFC_ISYM_FDATE. + * intrinsic.texi: Documentation for the new CTIME and FDATE + intrinsics. + * trans.h: Declarations for gfor_fndecl_ctime and gfor_fndecl_fdate. + +2005-11-05 Kazu Hirata + + * decl.c, trans-decl.c: Fix comment typos. + * gfortran.texi: Fix a typo. + +2005-11-05 Francois-Xavier Coudert + + * intrinsic.c (add_functions): Add function version of TTYNAM. + * intrinsic.h: Add prototypes for gfc_check_ttynam and + gfc_resolve_ttynam. + * gfortran.h: Add case for GFC_ISYM_TTYNAM. + * iresolve.c (gfc_resolve_ttynam): New function. + * trans-decl.c (gfc_build_intrinsic_function_decls): Add a tree + for function call to library ttynam. + * check.c (gfc_check_ttynam): New function. + * trans-intrinsic.c (gfc_conv_intrinsic_ttynam): New function. + (): Call gfc_conv_intrinsic_ttynam. + * trans.h: Add prototype for gfor_fndecl_ttynam. + +2005-11-04 Steven G. Kargl + + PR fortran/24636 + * match.c (gfc_match_stopcode): Set stop_code = -1. + +2005-11-04 Francois-Xavier Coudert + + PR fortran/18452 + * lang-specs.h: Pass -lang-fortran to the preprocessor. + +2005-11-02 Andrew Pinski + + PR fortran/18157 + * trans-array.c (gfc_conv_resolve_dependencies): Use the correct + type for the temporary array. + * trans-expr.c (gfc_trans_assignment): Pass lss + instead of lss_section + to gfc_conv_resolve_dependencies to get the + correct type. + +2005-11-02 Tobias Schl"uter + + * decl.c (gfc_match_entry): Function entries don't need an argument + list if there's no RESULT clause. + +2005-11-01 Tobias Schl"uter + + PR fortran/24008 + * decl.c (gfc_match_entry): Function entries need an argument list. + +2005-11-01 Erik Edelmann + + PR 24245 + * trans.c (gfc_generate_code): Move code to create a main + program symbol from here ... + * parse.c (main_program_symbol): ... to this new + function, setting the locus from gfc_current_locus + instead of ns->code->loc. + (gfc_parse_file): Call main_program_symbol for main programs. + +2005-11-01 Tobias Schl"uter + + PR fortran/24404 + * resolve.c (resolve_symbol): Output symbol names in more error + messages, clarify error message. + +2005-11-01 Tobias Schl"uter + + * dump-parse-tree.c (show_symtree): Revert change unintentionally + committed in r106246. + +2005-11-01 Paul Thomas + + PR fortran/21565 + * symbol.c (check_conflict): An object cannot be in a namelist and in + block data. + + PR fortran/18737 + * resolve.c (resolve_symbol): Set the error flag to + gfc_set_default_type, in the case of an external symbol, so that + an error message is emitted if IMPLICIT NONE is set. + + PR fortran/14994 + * gfortran.h (gfc_generic_isym_id): Add GFC_ISYM_SECNDS to enum. + * check.c (gfc_check_secnds): New function. + * intrinsic.c (add_functions): Add call to secnds. + * iresolve.c (gfc_resolve_secnds): New function. + * trans-intrinsic (gfc_conv_intrinsic_function): Add call to + secnds via case GFC_ISYM_SECNDS. + * intrinsic.texi: Add documentation for secnds. + +2005-10-31 Andreas Schwab + + * Make-lang.in (GFORTRAN_TARGET_INSTALL_NAME): Define. + (GFORTRAN_CROSS_NAME): Remove. + (fortran.install-common): Correctly install a cross compiler. + (fortran.uninstall): Use GFORTRAN_TARGET_INSTALL_NAME instead of + GFORTRAN_CROSS_NAME. + +2005-10-30 Erik Edelmann + + * gfortran.texi: Update contributors. + +2005-10-30 Erik Edelmann + + PR fortran/18883 + * trans-decl.c (gfc_finish_var_decl): Add decl to the + current function, rather than the parent. Make + assertion accept fake result variables. + * trans-expr.c (gfc_conv_variable): If the character + length of an ENTRY isn't set, get the length from + the master function instead. + +2005-10-30 Thomas Koenig + + * gfortran.texi: Remove reservations about I/O usability. Document + that array intrinsics mostly work. + +2005-10-30 Tobias Schl"uter + + * gfortran.texi: Move license stuff to back. Add information + on ENUM and ENUMERATOR. + * invoke.texi: Document -fshort-enums. + +2005-10-30 Gaurav Gautam + Tobias Schl"uter + + * arith.c (gfc_enum_initializer): New function. + (gfc_check_integer_range): Made extern. + * decl.c (enumerator_history): New typedef. + (last_initializer, enum_history, max_enum): New variables. + (create_enum_history, gfc_free_enum_history): New functions. + (add_init_expr_to_sym): Call create_enum_history if parsing ENUM. + (variable_decl): Modified to parse enumerator definition. + (match_attr_spec): Add PARAMETER attribute to ENUMERATORs. + (gfc_match_data_decl): Issues error, if match_type_spec do not + return desired return values. + (set_enum_kind, gfc_match_enum, gfc_match_enumerator_def): New + functions. + (gfc_match_end): Deal with END ENUM. + * gfortran.h (gfc_statement): ST_ENUM, ST_ENUMERATOR, ST_END_ENUM + added. + (symbol_attribute): Bit field for enumerator added. + (gfc_options): Add fshort_enums. + (gfc_enum_initializer, gfc_check_integer_range): Add prototypes. + * options.c: Include target.h + (gfc_init_options): Initialize fshort_enums. + (gfc_handle_option): Deal with fshort_enums. + * parse.c (decode_statement): Match ENUM and ENUMERATOR statement. + (gfc_ascii_statement): Deal with the enumerator statements. + (parse_enum): New function to parse enum construct. + (parse_spec): Added case ST_ENUM. + * parse.h (gfc_compile_state): COMP_ENUM added. + (gfc_match_enum, gfc_match_enumerator_def, gfc_free_enum_history): + Prototype added. + * symbol.c (gfc_copy_attr): Copy enumeration attribute. + * lang.opt (fshort-enums): Option added. + +2005-10-30 Francois-Xavier Coudert + + * check.c (gfc_check_malloc, gfc_check_free): New functions. + * gfortran.h (gfc_generic_isym_id): Add GFC_ISYM_MALLOC. + * intrinsic.c (add_functions): Add symbols for MALLOC function. + (add_subroutines): Add symbol for FREE subroutine. + * intrinsic.h: Prototypes for gfc_check_malloc, gfc_check_free, + gfc_resolve_malloc and gfc_resolve_free. + * intrinsic.texi: Add doc for FREE and MALLOC intrinsics. + * iresolve.c (gfc_resolve_malloc, gfc_resolve_free): New + functions. + * trans-intrinsic.c (gfc_conv_intrinsic_function): Add case for + GFC_ISYM_MALLOC. + +2005-10-30 Steven Bosscher + + * gfortran.texi: Update contributors. + +2005-10-29 Steven Bosscher + + * interface.c: Fix previous checkin (an incomplete patch + was commited for me). + +2005-10-29 Joseph S. Myers + + * intrinsic.texi: Remove empty @cindex line. + +2005-10-28 Francois-Xavier Coudert + + * check.c (gfc_check_alarm_sub, gfc_check_signal, + gfc_check_signal_sub): New functions. + * gfortran.h (gfc_generic_isym_id): Add GFC_ISYM_SIGNAL. + * intrinsic.c (add_functions): Add signal intrinsic. + (add_subroutines): Add signal and alarm intrinsics. + * intrinsic.texi: Document the new intrinsics. + * iresolve.c (gfc_resolve_signal, gfc_resolve_alarm_sub, + gfc_resolve_signal_sub): New functions. + * trans-intrinsic.c (gfc_conv_intrinsic_function): Add case + for GFC_ISYM_SIGNAL. + * intrinsic.h: Add prototypes for gfc_check_alarm_sub, + gfc_check_signal, gfc_check_signal_sub, gfc_resolve_signal, + gfc_resolve_alarm_sub, gfc_resolve_signal_sub. + +2005-10-28 Steven Bosscher + + PR fortran/24545 + * interface.c (gfc_match_end_interface): Fix typo in + INTERFACE_USER_OP case. + +2005-10-26 Francois-Xavier Coudert + + PR fortran/15586 + * resolve.c (resolve_symbol): Remove the use of whynot, so that + error messages are not built from pieces. + +2005-10-26 Paul Thomas + + PR fortran/24158 + * decl.c (gfc_match_data_decl): Correct broken bit of code + that prevents undefined derived types from being used as + components of another derived type. + * resolve.c (resolve_symbol): Add backstop error when derived + type variables arrive here with a type that has no components. + +2005-10-25 Jakub Jelinek + + * trans.h (gfc_conv_cray_pointee): Remove. + * trans-expr.c (gfc_conv_variable): Revert 2005-10-24 change. + * trans-array.c (gfc_conv_array_parameter): Likewise. + * trans-decl.c (gfc_conv_cray_pointee): Remove. + (gfc_finish_cray_pointee): New function. + (gfc_finish_var_decl): Use it. Don't return early for Cray + pointees. + (gfc_create_module_variable): Revert 2005-10-24 change. + * decl.c (cray_pointer_decl): Update comment. + * gfortran.texi: Don't mention Cray pointees aren't visible in the + debugger. + + * symbol.c (check_conflict): Add conflict between cray_pointee + and in_common resp. in_equivalence. + * resolve.c (resolve_equivalence): Revert 2005-10-24 change. + + * module.c (ab_attribute): Add AB_CRAY_POINTER and AB_CRAY_POINTEE. + (attr_bits): Likewise. + (mio_symbol_attribute): Save and restore cray_pointe{r,e} attributes. + (mio_symbol): For cray_pointee write/read cp_pointer reference. + +2005-10-25 Feng Wang + + PR fortran/22290 + * trans-decl.c (gfc_add_assign_aux_vars): New function. Add two + auxiliary variables. + (gfc_get_symbol_decl): Use it when a variable, including dummy + argument, is assigned a label. + (gfc_trans_assign_aux_var): New function. Set initial value of + the auxiliary variable explicitly. + (gfc_trans_deferred_vars): Use it. + * trans-stmt.c (gfc_conv_label_variable): Handle dummy argument. + +2005-10-24 Asher Langton + + PR fortran/17031 + PR fortran/22282 + * check.c (gfc_check_loc): New function. + * decl.c (variable_decl): New variables cp_as and sym. Added a + check for variables that have already been declared as Cray + Pointers, so we can get the necessary attributes without adding + a new symbol. + (attr_decl1): Added code to catch pointee symbols and "fix" + their array specs. + (cray_pointer_decl): New method. + (gfc_match_pointer): Added Cray pointer parsing code. + (gfc_mod_pointee_as): New method. + * expr.c (gfc_check_assign): Added a check to catch vector-type + assignments to pointees with an unspecified final dimension. + * gfortran.h: (GFC_ISYM_LOC): New. + (symbol_attribute): Added cray_pointer and cray_pointee bits. + (gfc_array_spec): Added cray_pointee and cp_was_assumed bools. + (gfc_symbol): Added gfc_symbol *cp_pointer. + (gfc_option): Added flag_cray_pointer. + (gfc_add_cray_pointee): Declare. + (gfc_add_cray_pointer ): Declare. + (gfc_mod_pointee_as): Declare. + * intrinsic.c (add_functions): Add code for loc() intrinsic. + * intrinsic.h (gfc_check_loc): Declare. + (gfc_resolve_loc): Declare. + * iresolve.c (gfc_resolve_loc): New. + * lang.opt: Added fcray-pointer flag. + * options.c (gfc_init_options): Initialized. + gfc_match_option.flag_cray_pointer. + (gfc_handle_option): Deal with -fcray-pointer. + * parse.c:(resolve_equivalence): Added code prohibiting Cray + pointees in equivalence statements. + * resolve.c (resolve_array_ref): Added code to prevent bounds + checking for Cray Pointee arrays. + (resolve_equivalence): Prohibited pointees in equivalence + statements. + * symbol.c (check_conflict): Added Cray pointer/pointee + attribute checking. + (gfc_add_cray_pointer): New. + (gfc_add_cray_pointee): New. + (gfc_copy_attr): New code for Cray pointers and pointees. + * trans-array.c (gfc_trans_auto_array_allocation): Added code to + prevent space from being allocated for pointees. + (gfc_conv_array_parameter): Added code to catch pointees and + correctly set their base address. + * trans-decl.c (gfc_finish_var_decl): Added code to prevent + pointee declarations from making it to the back end. + (gfc_create_module_variable): Same. + * trans-expr.c (gfc_conv_variable): Added code to detect and + translate pointees. + (gfc_conv_cray_pointee): New. + * trans-intrinsic.c (gfc_conv_intrinsic_loc): New. + (gfc_conv_intrinsic_function): Added entry point for loc + translation. + * trans.h (gfc_conv_cray_pointee): Declare. + + * gfortran.texi: Added section on Cray pointers, removed Cray + pointers from list of proposed extensions. + * intrinsic.texi: Added documentation for loc intrinsic. + * invoke.texi: Documented -fcray-pointer flag. + +2005-10-24 Asher Langton + + * decl.c (gfc_match_save): Changed duplicate SAVE errors to + warnings in the absence of strict standard conformance + * symbol.c (gfc_add_save): Same. + +2005-10-24 Francois-Xavier Coudert + + PR fortran/15586 + * arith.c (gfc_arith_error): Change message to include locus. + (check_result, eval_intrinsic, gfc_int2int, gfc_real2real, + gfc_real2complex, gfc_complex2real, gfc_complex2complex): Use + the new gfc_arith_error. + (arith_error): Rewrite full error messages instead of building + them from pieces. + * check.c (must_be): Removed. + (type_check, numeric_check, int_or_real_check, real_or_complex_check, + kind_check, double_check, logical_array_check, array_check, + scalar_check, same_type_check, rank_check, kind_value_check, + variable_check, gfc_check_allocated, gfc_check_associated, + gfc_check_cmplx, gfc_check_dcmplx, gfc_check_dot_product, + gfc_check_index, gfc_check_kind, gfc_check_matmul, gfc_check_null, + gfc_check_pack, gfc_check_precision, gfc_check_present, + gfc_check_spread): Rewrite full error messages instead of + building them from pieces. + * decl.c (gfc_match_entry): Rewrite full error messages instead + of building them from pieces. + * parse.c (gfc_state_name): Remove. + * parse.h: Remove prototype for gfc_state_name. + +2005-10-23 Andrew Pinski + + PR fortran/23635 + * check.c (gfc_check_ichar_iachar): Move the code around so + that the check on the length is after check for + references. + +2005-10-23 Asher Langton + + * decl.c (match_type_spec): Add a BYTE type as an extension. + +2005-10-23 Paul Thomas + + PR fortran/18022 + * trans-expr.c (gfc_trans_arrayfunc_assign): Return NULL + if there is a component ref during an array ref to force + use of temporary in assignment. + + PR fortran/24311 + PR fortran/24384 + * fortran/iresolve.c (check_charlen_present): New function to + add a charlen to the typespec, in the case of constant + expressions. + (gfc_resolve_merge, gfc_resolve_spread): Call.the above. + (gfc_resolve_spread): Make calls to library functions that + handle the case of the spread intrinsic with a scalar source. + +2005-10-22 Erik Edelmann + + PR fortran/24426 + * decl.c (variable_decl): Don't assign default initializers to + pointers. + +2005-10-21 Jakub Jelinek + + * interface.c (compare_actual_formal): Issue error when attempting + to pass an assumed-size array as assumed-shape array argument. + +2005-10-20 Erik Edelmann + + PR fortran/21625 + * resolve.c (expr_to_initialize): New function. + (resolve_allocate_expr): Take current statement as new + argument. Add default initializers to variables of + derived types, if they need it. + (resolve_code): Provide current statement as argument to + resolve_allocate_expr(). + +2005-10-19 Paul Thomas + + PR fortran/24440 + * resolve.c (resolve_symbol): Correct error in check for + assumed size array with default initializer by testing + for arrayspec before dereferencing it. + +2005-10-17 Paul Thomas + + PR fortran/23446 + * gfortran.h: Primitive for gfc_is_formal_arg. + * resolve.c(gfc_is_formal_arg): New function to signal across + several function calls that formal argument lists are being + processed. + (resolve_formal_arglist): Set/reset the flag for gfc_is_formal_arg. + *expr.c(check_restricted): Add check, via gfc_is_formal_arg, if + symbol is part of an formal argument declaration. + + PR fortran/21459 + * decl.c (add_init_expr_to_sym): Make a new character + length for each variable, when the expression is NULL + and link to cl_list. + + PR fortran/20866 + * match.c (recursive_stmt_fcn): New function that tests if + a statement function resurses through itself or other other + statement functions. + (gfc_match_st_function): Call recursive_stmt_fcn to check + if this is recursive and to raise error if so. + + PR fortran/20849 + PR fortran/20853 + * resolve.c (resolve_symbol): Errors for assumed size arrays + with default initializer and for external objects with an + initializer. + + PR fortran/20837 + * decl.c (match_attr_spec): Prevent PUBLIC from being used + outside a module. + +2005-10-16 Erik Edelmann + + PR 22273 + * expr.c (check_inquiry): Add "len" to inquiry_function. + +2005-10-14 Jakub Jelinek + + * primary.c (match_boz_constant): Add missing break after gfc_error. + +2005-10-12 Paul Thomas + + PR fortran/24092 + * trans-types.c (gfc_get_derived_type): Insert code to obtain backend + declaration for derived types, building if necessary. Return the + derived type if the fields have been built by this process. Otherwise, + continue as before but using the already obtained backend_decls for the + derived type components. Change the gcc_assert to act on the field. + +2005-10-12 Paul Thomas + + PR fortran/18082 + * decl.c (variable_decl): Make a new copy of the character + length for each variable, when the expression is not a + constant. + +2005-10-12 Francois-Xavier Coudert + + * gfortran.h: Add bitmasks for different FPE traps. Add fpe + member to options_t. + * invoke.texi: Document the new -ffpe-trap option. + * lang.opt: Add -ffpe-trap option. + * options.c (gfc_init_options): Initialize the FPE option. + (gfc_handle_fpe_trap_option): New function to parse the argument + of the -ffpe-trap option. + (gfc_handle_option): Add case for -ffpe-trap. + * trans-decl.c: Declare a tree for the set_fpe library function. + (gfc_build_builtin_function_decls): Build this tree. + (gfc_generate_function_code): Generate a call to set_fpe at + the beginning of the main program. + * trans.h: New tree for the set_fpe library function. + +2005-10-12 Paul Thomas + + PR fortran/20847 + PR fortran/20856 + * symbol.c (check_conflict): Prevent common variables and + function results from having the SAVE attribute,as required + by the standard. + +2005-10-12 Paul Thomas + + PR fortran/24207 + * resolve.c (resolve_symbol): Exclude use and host associated + symbols from the test for private objects in a public namelist. + +2005-10-12 Jakub Jelinek + + * trans-common.c (build_field): Fix comment typo. + (create_common): Set backend_decl of COMMON or EQUIVALENCEd + variables to a VAR_DECL with the COMPONENT_REF in + DECL_HAS_VALUE_EXPR rather than COMPONENT_REF directly. + * f95-lang.c (gfc_expand_function): Emit debug info for + EQUIVALENCEd variables if the equiv union is going to be output. + +2005-10-11 Steven G. Kargl + + PR fortran/20786 + * iresolve.c (gfc_resolve_aint, gfc_resolve_anint): Type conversion + of the argument. + +2005-10-11 Jakub Jelinek + + * f95-lang.c (gfc_init_decl_processing): Initialize + void_list_node. + +2005-10-07 Erik Edelmann + + PR 18568 + * resolve.c (find_array_spec): Search through the list of + components in the symbol of the type instead of the symbol of the + variable. + +2005-10-05 Richard Guenther + + PR fortran/24176 + * parse.c (gfc_parse_file): Exit early for empty files. + +2005-10-03 Steve Ellcey + + * fortran/trans-types.c (gfc_init_kinds): Only pass float, double, + and long double floating point types through to Fortran compiler. + +2005-10-03 Francois-Xavier Coudert + + PR fortran/20120 + * f95-lang.c (DO_DEFINE_MATH_BUILTIN): Add support for long + double builtin function. + (gfc_init_builtin_functions): Add mfunc_longdouble, + mfunc_clongdouble and func_clongdouble_longdouble trees. Build + them for round, trunc, cabs, copysign and pow functions. + * iresolve.c (gfc_resolve_reshape, gfc_resolve_transpose): Add + case for kind 10 and 16. + * trans-decl.c: Add trees for cpowl10, cpowl16, ishftc16, + exponent10 and exponent16. + (gfc_build_intrinsic_function_decls): Build nodes for int16, + real10, real16, complex10 and complex16 types. Build all possible + combinations for function _gfortran_pow_?n_?n. Build function + calls cpowl10, cpowl16, ishftc16, exponent10 and exponent16. + * trans-expr.c (gfc_conv_power_op): Add case for integer(16), + real(10) and real(16). + * trans-intrinsic.c: Add suppport for long double builtin + functions in BUILT_IN_FUNCTION, LIBM_FUNCTION and LIBF_FUNCTION + macros. + (gfc_conv_intrinsic_aint): Add case for integer(16), real(10) and + real(16) kinds. + (gfc_build_intrinsic_lib_fndecls): Add support for real10_decl + and real16_decl in library functions. + (gfc_get_intrinsic_lib_fndecl): Add cases for real and complex + kinds 10 and 16. + (gfc_conv_intrinsic_exponent): Add cases for real(10) and real(16) + kinds. + (gfc_conv_intrinsic_sign): Likewise. + (gfc_conv_intrinsic_ishftc): Add case for integer(16) kind. + * trans-types.c (gfc_get_int_type, gfc_get_real_type, + gfc_get_complex_type, gfc_get_logical_type): Doesn't error out in + the case of kinds not available. + * trans.h: Declare trees for cpowl10, cpowl16, ishftc16, + exponent10 and exponent16. + +2005-10-01 Paul Thomas + + PR fortran/16404 + PR fortran/20835 + PR fortran/20890 + PR fortran/20899 + PR fortran/20900 + PR fortran/20901 + PR fortran/20902 + * gfortran.h: Prototype for gfc_add_in_equivalence. + * match.c (gfc_match_equivalence): Make a structure component + an explicit,rather than a syntax, error in an equivalence + group. Call gfc_add_in_equivalence to add the constraints + imposed in check_conflict. + * resolve.c (resolve_symbol): Add constraints: No public + structures with private-type components and no public + procedures with private-type dummy arguments. + (resolve_equivalence_derived): Add constraint that prevents + a structure equivalence member from having a default + initializer. + (sequence_type): New static function to determine whether an + object is default numeric, default character, non-default + or mixed sequence. Add corresponding enum typespec. + (resolve_equivalence): Add constraints to equivalence groups + or their members: No more than one initialized member and + that different types are not equivalenced for std=f95. All + the simple constraints have been moved to check_conflict. + * symbol.c (check_conflict): Simple equivalence constraints + added, including those removed from resolve_symbol. + (gfc_add_in_equivalence): New function to interface calls + match_equivalence to check_conflict. + +2005-09-27 Jakub Jelinek + + PR fortran/18518 + * trans-common.c (build_equiv_decl): Add IS_SAVED argument. + If it is true, set TREE_STATIC on the decl. + (create_common): If any symbol in equivalence has SAVE attribute, + pass true as last argument to build_equiv_decl. + +2005-09-24 Janne Blomqvist + + * trans-io.c (gfc_build_io_library_fndecls): Add entry + iocall_x_array for transfer_array. + (transfer_array_desc): New function. + (gfc_trans_transfer): Add code to call transfer_array_desc. + +2005-09-26 Jakub Jelinek + + PR fortran/23677 + * symbol.c (gfc_is_var_automatic): Return true if character length + is non-constant rather than constant. + * resolve.c (gfc_resolve): Don't handle !gfc_option.flag_automatic + here. + * options.c (gfc_post_options): Set gfc_option.flag_max_stack_var_size + to 0 for -fno-automatic. + +2005-09-23 Paul Thomas + + PR fortran/16861 + * module.c (mio_component_ref): Return if the symbol is NULL + and wait for another iteration during module reads. + (mio_symtree_ref): Suppress the writing of contained symbols, + when a symbol is available in the main namespace. + (read_module): Restrict scope of special treatment of contained + symbols to variables only and suppress redundant call to + find_true_name. + +2005-09-22 Steven G. Kargl + + PR fortran/24005 + * interface.c (check_interface1): Fix NULL dereference. + +2005-09-22 Erik Edelmann + + PR fortran/23843 + * resolve.c (derived_inaccessible): New function. + (resolve_transfer): Use it to check for private + components. + +2005-09-22 Steven G. Kargl + + PR fortran/23516 + * intrinsic.c (add_function): Add IMAG, IMAGPART, and REALPART + intrinsics. + * intrinsic.h: Prototypes for gfc_simplify_realpart and + gfc_resolve_realpart. + * intrinsic.texi: Document intrinsic procedures. + * simplify.c (gfc_simplify_realpart): New function. + * irseolve.c (gfc_resolve_realpart): New function. + +2005-09-21 Erik Edelmann + + PR fortran/19929 + * trans-stmt.c (gfc_trans_deallocate): Check if the + object to be deallocated is an array by looking at + expr->rank instead of expr->symtree->n.sym->attr.dimension. + +2005-09-20 Tobias Schl"uter + + PR fortran/23420 + * io.c (resolve_tag): Don't allow non-CHARACTER constants as formats. + (match_io): Fix usage of gfc_find_symbol. + +2005-09-20 Jakub Jelinek + + PR fortran/23663 + * primary.c (match_actual_arg): Handle ENTRY the same way + as FUNCTION. + +2005-09-18 Francois-Xavier Coudert + + * Make-lang.in: Make check-fortran alias for check-gfortran. + +2005-09-18 Andreas Jaeger + + * module.c (read_module): Add missed line from last patch. + +2005-09-18 Erik Edelmann + + PR fortran/15975 + * resolve.c (resolve_symbol): Don't assign default + initializer to pointers. + +2005-09-18 Paul Thomas + + PR fortran/16861 + * module.c (read_module): Give symbols from module procedures + different true_name entries to those from the module proper. + +2005-09-17 Francois-Xavier Coudert + + PR fortran/15586 + * arith.c (gfc_arith_error): Add translation support for error + messages. + * array.c (gfc_match_array_ref): Likewise. + (gfc_match_array_spec): Likewise. + * check.c (must_be): Add msgid convention to third argument. + (same_type_check): Add translation support for error message. + (rank_check): Likewise. + (kind_value_check): Likewise. + (gfc_check_associated): Correct typo. + (gfc_check_reshape): Add translation support for error message. + (gfc_check_spread): Likewise. + * error.c (error_printf): Add nocmsgid convention to argument. + (gfc_warning, gfc_notify_std, gfc_warning_now, gfc_warning_check) + (gfc_error, gfc_error_now): Likewise. + (gfc_status): Add cmsgid convention to argument. + * expr.c (gfc_extract_int): Add translation support for error + messages. + (gfc_check_conformance): Add msgid convention to argument. + (gfc_check_pointer_assign): Correct tabbing. + * gfortran.h: Include intl.h header. Remove prototype for gfc_article. + * gfortranspec.c: Include intl.h header. + (lang_specific_driver): Add translation support for --version. + * io.c (check_format): Add translation support for error message. + (format_item_1): Likewise. + (data_desc): Likewise. + * matchexp.c: Likewise. + * misc.c (gfc_article): Remove function. + * module.c (bad_module): Use msgid convention. Add translation support + for error messages. + (require_atom): Add translation support for error messages. + * parse.c (gfc_ascii_statement): Likewise. + (gfc_state_name): Likewise. + * primary.c (match_boz_constant): Reorganise error messages for + translations. + * resolve.c (resolve_entries): Likewise. + (resolve_operator): Add translation support for error messages. + (gfc_resolve_expr): Use msgid convention. Reorganise error messages + for translations. + (resolve_symbol): Add translation support for error messages. + * symbol.c (gfc_add_procedure): Remove use of gfc_article function. + * trans-const.c (gfc_build_string_const): Use msgid convention. + +2005-09-16 Paul Brook + + PR fortran/23906 + * dependency.c (transform_sections): Divide by correct value. + Elaborate comment. + +2005-09-14 Paul Thomas + + PR fortran/21875 Internal Unit Array I/O, NIST + * fortran/trans-io.c (gfc_build_io_library_fndecls): Add field for + array descriptor to IOPARM structure. + * fortran/trans-io.c (set_internal_unit): New function to generate code + to store the character (array) and the character length for an internal + unit. + * fortran/trans-io (build_dt): Use the new function set_internal_unit. + +2005-09-14 Paul Thomas + + PR fortran/19358 + * trans-array.c (gfc_trans_dummy_array_bias): correct the typo + which uses dim[i].upper for lbound, rather than dim[i].lower. + +2005-09-13 Erik Edelmann + + PR fortran/17740 + * trans-expr.c (gfc_trans_arrayfunc_assign): Check value + of attr.elemental for specific function instead of generic name. + +2005-09-13 Richard Sandiford + + PR fortran/18899 + * trans-intrinsic.c (gfc_conv_intrinsic_bound): Move initialization + of argse. Remove now-redundant want_pointer assignment. + * trans-array.c (gfc_conv_expr_descriptor): When not assigning to + a pointer, keep the original bounds of a full array reference. + +2005-09-13 Richard Sandiford + + PR target/19269 + * iresolve.c (gfc_resolve_cshift, gfc_resolve_eoshift) + (gfc_resolve_pack, gfc_resolve_reshape, gfc_resolve_spread) + (gfc_resolve_transpose, gfc_resolve_unpack): Add "_char" to the name + for character-based operations. + (gfc_resolve_pack): Remove ATTRIBUTE_UNUSED from array argument. + (gfc_resolve_unpack): Copy the whole typespec from the vector. + * trans-array.c (gfc_conv_expr_descriptor): In the EXPR_FUNCTION + case, get the string length from the scalarization state. + +2005-09-14 Francois-Xavier Coudert + + * Make-lang.in: Change targets prefixes from f95 to fortran. + * config-lang.in: Change language name to "fortran". + * lang.opt: Change language name to "fortran". + * options.c: Change CL_F95 to CL_Fortran. + +2005-09-09 Thomas Koenig + + gfortran.texi: Document IOSTAT= specifier. + +2005-09-09 Thomas Koenig + + * gfortran.h: Add iomsg to gfc_open, gfc_close, gfc_filepos, + gfc_inquire and gfc_dt. + * dump-parse-tree.c (gfc_show_code_node): Add iomsg + for open, close, file positioning, inquire and namelist. + * io.c (io_tag): Add tag_iomsg. + (resolve_tag): Add standards warning for iomsg. + (match_open_element): Add iomsg. + (gfc_free_open): Add iomsg. + (gfc_resolve_open): Add iomsg. + (gfc_free_close): Add iomsg. + (match_close_element): Add iomsg. + (gfc_resolve_close): Add iomsg. + (gfc_free_filepos): Add iomsg. + (match_file_element): Add iomsg. + (gfc_resolve_filepos): Add iostat and iomsg. + (match-dt_element): Add iomsg. + (gfc_free_dt): Add iomsg. + (gfc_resolve_dt): Add iomsg. + (gfc_free_inquire): Add iomsg. + (match_inquire_element): Add iomsg. + (gfc_resolve_inquire): Add iomsg. + * trans_io.c: Add ioparm_iomsg and ioparm_iomsg_len. + (gfc_build_io_library_fndecls): Add iomsg as last field. + (gfc_trans_open): Add iomsg. + (gfc_trans_close): Add iomsg. + (build_fileos): Call set_string for iomsg. + (gfc_trans_inquire): Add iomsg. + (build_dt): Add iomsg. + +2005-09-09 Richard Sandiford + + * match.h (gfc_match_equiv_variable): Declare. + +2005-09-09 Richard Sandiford + + PR fortran/19239 + * Makefile.in (fortran/trans-expr.o): Depend on dependency.h. + * dependency.h (gfc_ref_needs_temporary_p): Declare. + * dependency.c (gfc_ref_needs_temporary_p): New function. + (gfc_check_fncall_dependency): Use it instead of inlined check. + By so doing, take advantage of the fact that character substrings + within an array reference also need a temporary. + * trans.h (GFC_SS_VECTOR): Adjust comment. + * trans-array.c (gfc_free_ss): Remove GFC_SS_VECTOR case. + (gfc_set_vector_loop_bounds): New function. + (gfc_add_loop_ss_code): Call it after evaluating the subscripts of + a GFC_SS_SECTION. Deal with the GFC_SS_VECTOR case by evaluating + the vector expression and caching its descriptor for use within + the loop. + (gfc_conv_array_index_ref, gfc_conv_vector_array_index): Delete. + (gfc_conv_array_index_offset): Handle scalar, vector and range + dimensions as separate cases of a switch statement. In the vector + case, use the loop variable to calculate a vector index and use the + referenced element as the dimension's index. Perform bounds checking + on this final index. + (gfc_conv_section_upper_bound): Return null for vector indexes. + (gfc_conv_section_startstride): Give vector indexes a start value + of 0 and a stride of 1. + (gfc_conv_ss_startstride): Adjust for new GFC_SS_VECTOR representation. + (gfc_conv_expr_descriptor): Expand comments. Generalize the + handling of the !want_pointer && !direct_byref case. Use + gfc_ref_needs_temporary_p to decide whether the variable case + needs a temporary. + (gfc_walk_variable_expr): Handle DIMEN_VECTOR by creating a + GFC_SS_VECTOR index. + * trans-expr.c: Include dependency.h. + (gfc_trans_arrayfunc_assign): Fail if the target needs a temporary. + +2005-09-09 Richard Sandiford + + PR fortran/21104 + * trans.h (gfc_interface_sym_mapping, gfc_interface_mapping): Moved + from trans-expr.c. + (gfc_init_interface_mapping, gfc_free_interface_mapping) + (gfc_add_interface_mapping, gfc_finish_interface_mapping) + (gfc_apply_interface_mapping): Declare. + * trans-array.h (gfc_set_loop_bounds_from_array_spec): Declare. + (gfc_trans_allocate_temp_array): Add pre and post block arguments. + * trans-array.c (gfc_set_loop_bounds_from_array_spec): New function. + (gfc_trans_allocate_array_storage): Replace loop argument with + separate pre and post blocks. + (gfc_trans_allocate_temp_array): Add pre and post block arguments. + Update call to gfc_trans_allocate_array_storage. + (gfc_trans_array_constructor, gfc_conv_loop_setup): Adjust for new + interface to gfc_trans_allocate_temp_array. + * trans-expr.c (gfc_interface_sym_mapping, gfc_interface_mapping): + Moved to trans.h. + (gfc_init_interface_mapping, gfc_free_interface_mapping) + (gfc_add_interface_mapping, gfc_finish_interface_mapping) + (gfc_apply_interface_mapping): Make extern. + (gfc_conv_function_call): Build an interface mapping for array + return values too. Call gfc_set_loop_bounds_from_array_spec. + Adjust call to gfc_trans_allocate_temp_array so that code is + added to SE rather than LOOP. + +2005-09-09 Richard Sandiford + + PR fortran/12840 + * trans.h (gfor_fndecl_internal_realloc): Declare. + (gfor_fndecl_internal_realloc64): Declare. + * trans-decl.c (gfor_fndecl_internal_realloc): New variable. + (gfor_fndecl_internal_realloc64): New variable. + (gfc_build_builtin_function_decls): Initialize them. + * trans-array.h (gfc_trans_allocate_temp_array): Add a fourth argument. + * trans-array.c (gfc_trans_allocate_array_storage): Add an argument + to say whether the array can grow later. Don't allocate the array + on the stack if so. Don't call malloc for zero-sized arrays. + (gfc_trans_allocate_temp_array): Add a similar argument here. + Pass it along to gfc_trans_allocate_array_storage. + (gfc_get_iteration_count, gfc_grow_array): New functions. + (gfc_iterator_has_dynamic_bounds): New function. + (gfc_get_array_constructor_element_size): New function. + (gfc_get_array_constructor_size): New function. + (gfc_trans_array_ctor_element): Replace pointer argument with + a descriptor tree. + (gfc_trans_array_constructor_subarray): Likewise. Take an extra + argument to say whether the variable-sized part of the constructor + must be allocated using realloc. Grow the array when this + argument is true. + (gfc_trans_array_constructor_value): Likewise. + (gfc_get_array_cons_size): Delete. + (gfc_trans_array_constructor): If the loop bound has not been set, + split the allocation into a static part and a dynamic part. Set + loop->to to the bounds for static part before allocating the + temporary. Adjust call to gfc_trans_array_constructor_value. + (gfc_conv_loop_setup): Allow any constructor to determine the + loop bounds. Check whether the constructor has a dynamic size + and prefer to use something else if so. Expect the loop bound + to be set later. Adjust call to gfc_trans_allocate_temp_array. + * trans-expr.c (gfc_conv_function_call): Adjust another call here. + +2005-09-09 Paul Thomas + + PR fortran/18878 + * module.c (find_use_name_n): Based on original + find_use_name. Either counts number of use names for a + given real name or returns use name n. + (find_use_name, number_use_names): Interfaces to the + function find_use_name_n. + (read_module): Add the logic and calls to these functions, + so that mutiple reuses of the same real name are loaded. + +2005-09-09 Paul Thomas + + PR fortran/22304 + PR fortran/23270 + PR fortran/18870 + PR fortran/16511 + PR fortran/17917 + * gfortran.h: Move definition of BLANK_COMMON_NAME from trans- + common.c so that it is accessible to module.c. Add common_head + field to gfc_symbol structure. Add field for the equivalence + name AND new attr field, in_equivalence. + * match.c (gfc_match_common, gfc_match_equivalence): In loops + that flag common block equivalences, emit an error if the + common blocks are different, using sym->common_head as the + common block identifier. Ensure that symbols that are equivalence + associated with a common block are marked as being in_common. + * module.c (write_blank_common): New. + (write_common): Use unmangled common block name. + (load_equiv): New function ported from g95. + (read_module): Call load_equiv. + (write_equiv): New function ported from g95. Correct + string referencing for gfc functions. Give module + equivalences a unique name. + (write_module): Call write_equiv and write_blank_common. + * primary.c (match_variable) Old gfc_match_variable, made + static and third argument provided to indicate if parent + namespace to be visited or not. + (gfc_match_variable) New. Interface to match_variable. + (gfc_match_equiv_variable) New. Interface to match_variable. + * trans-common.c (finish_equivalences): Provide the call + to create_common with a gfc_common_header so that + module equivalences are made external, rather than local. + (find_equivalences): Ensure that all members in common block + equivalences are marked as used. This prevents the subsequent + call to this function from making local unions. + * trans-decl.c (gfc_generate_function_code): Move the call to + gfc_generate_contained_functions to after the call to + gfc_trans_common so the use-associated, contained common + blocks produce the correct references. + (gfc_create_module_variable): Return for equivalenced symbols + with existing backend declaration. + +2005-09-08 Tobias Schl"uter + + PR fortran/23765 + * match.c (gfc_match_common): Remove unnecessary / wrong special + cases for end-of-statement. + +2005-09-08 Janne Blomqvist + + * gfortran.texi: Add section about implemented F2003 features. + +2005-09-08 Richard Sandiford + + PR fortran/15326 + * trans-array.c (gfc_add_loop_ss_code): Set ss->string_length in + the GFC_SS_FUNCTION case too. + * trans-expr.c (gfc_conv_function_val): Allow symbols to be bound + to function pointers as well as function decls. + (gfc_interface_sym_mapping, gfc_interface_mapping): New structures. + (gfc_init_interface_mapping, gfc_free_interface_mapping) + (gfc_get_interface_mapping_charlen, gfc_get_interface_mapping_array) + (gfc_set_interface_mapping_bounds, gfc_add_interface_mapping) + (gfc_finish_interface_mapping, gfc_apply_interface_mapping_to_cons) + (gfc_apply_interface_mapping_to_ref) + (gfc_apply_interface_mapping_to_expr) + (gfc_apply_interface_mapping): New functions. + (gfc_conv_function_call): Evaluate the arguments before working + out where the result should go. Make the null pointer case provide + the string length in parmse.string_length. Cope with non-constant + string lengths, using the above functions to evaluate such lengths. + Use a temporary typespec; don't assign to sym->cl->backend_decl. + Don't assign to se->string_length when returning a cached array + descriptor. + +2005-09-08 Richard Sandiford + + PR fortran/19928 + * trans-array.c (gfc_conv_array_ref): Call gfc_advance_se_ss_chain + after handling scalarized references. Make "indexse" inherit from + "se" when handling AR_ELEMENTs. + (gfc_walk_variable_expr): Add GFC_SS_SCALAR entries for each + substring or scalar reference that follows an array section. + * trans-expr.c (gfc_conv_variable): When called from within a + scalarization loop, start out with "ref" pointing to the scalarized + part of the reference. Don't call gfc_advance_se_ss_chain here. + +2005-09-07 Richard Sandiford + + PR fortran/23373 + * trans-expr.c (gfc_trans_pointer_assignment): Assign to a temporary + descriptor if the rhs is not a null pointer or variable. + +2005-09-07 Thomas Koenig + + PR fortran/20848 + * symbol.c(check_conflict): Add conflict for parameter/save, + +2005-09-06 Richard Sandiford + + PR fortran/19269 + * simplify.c (gfc_simplify_transpose): Set the result's typespec from + the source, not the first element of the return value. + +2005-09-04 Tobias Schl"uter + + PR fortran/23661 + * io.c (match_io): Correctly backup if PRINT followed by + symbol which is not a namelist. Force blank between PRINT + and namelist in free form. + +2005-08-31 Francois-Xavier Coudert + + PR fortran/20592 + * gfortran.h (gfc_option_t): Add flag_automatic. + * invoke.texi: Document the -fno-automatic option. + * lang.opt: Add a -fautomatic option. + * options.c (gfc_init_options): Default for -fautomatic is on. + (gfc_handle_option): Add handling of -fautomatic option. + * resolve.c (gfc_resolve): When -fno-automatic is used, mark + needed variables as SAVE. + +2005-08-27 Erik Edelmann + + * trans-array.c (gfc_trans_deferred_array): Fix comments. + +2005-08-27 Erik Schnetter + + * primary.c (match_charkind_name): Fix typo in comment leading to + function. + +2005-08-25 Erik Edelmann + + PR fortran/20363 + * symbol.c (find_special): Remove. + (build_sym, add_init_expr, attr_decl1): Remove calls to + find_special in favor of calls to gfc_get_symbol. + +2005-08-24 Thomas Koenig + + PR fortran/17758 + * gfortran.h (symbol_attribute): Add noreturn to the structure. + (gfc_intrinsic_sym): Add noreturn to the structure. + * intrinsic.c (make_noreturn): New function. + (add_subroutines): Mark subroutines abort and exit as noreturn. + (gfc_intrinsic_sub_interface): Copy noreturn attribute from + isym to the resolved symbol. + * trans-decl.c (gfc_get_extern_function_decl): Set function + as VOLATILE (== noreturn) if the noreturn attribute is set. + +2005-08-21 Steven G. Kargl + + * decl.c: Typo in comment. + +2005-08-21 Steven G. Kargl + + * array.c: Bump GFC_MAX_AC_EXPAND from 100 to 65535. + +2005-08-21 Tobias Schl"uter + + * gfortran.h (gfc_option_t): Remove source field. Add + flag_d_lines field. + (gfc_new_file): Remove arguments in prototype. + (gfc_source_file): Make 'const char *'. + * f95-lang.c (gfc_init): Use gfc_source_file instead of + gfc_option.source. Call gfc_new_file without arguments. + * invoke.texi: Document new options '-fd-lines-as-code' and + '-fd-lines-as-comment'. + * lang.opt: Add new options. Alphabetize. + * options.c (gfc_init_options): Initialize gfc_source_file instead + of gfc_option.source. Initialize gfc_option.flag_d_lines. + (form_from_filename): Move here from scanner.c. Make + 'filename' argument 'const'. + (gfc_post_options): Set gfc_source_file. Determine source form. + Warn if 'd-lines*' are used in free form. + * scanner.c (gfc_source_file): Constify. + (skip_fixed_comments): Deal with d-lines. + (get_file): Constify argument 'name'. + (load_file): Constify argument 'filename'. + (form_from_filename): Moved to options.c. + (gfc_new_file): Remove arguments. Don't initialize + gfc_source_file, don't determine source form. + * trans-const.c (gfc_init_constants): Use gfc_source_file instead + of gfc_option.source. + +2005-08-19 Steven G. Kargl + + PR fortran/23065 + * gfortran.h: Remove PATH_MAX definition. + * module.c (write_module, gfc_dump_module): Use alloca to allocate + buffers. + * scanner.c (gfc_release_include_path, form_from_filename): Ditto. + +2005-08-16 Huang Chun + + * trans-expr.c (gfc_conv_power_op): Evaluate the expression before + expand. + +2005-08-14 Asher Langton + + * parse.c (match): Enclose macro in do...while(0) and braces. + +2005-08-14 Paul Thomas + + PR fortran/21432. + * gfortran.texi: Document PRINT namelist. + +2005-08-14 Paul Thomas + + PR fortran/21432. + * io.c (match_io): Add code to implement PRINT namelist. + +2005-08-14 Canqun Yang + + * trans-stmt.c (gfc_trans_arithmetic_if): Optimized in case of equal + labels. + +2005-08-11 Francois-Xavier Coudert + Steven Bosscher + + PR libfortran/20006 + * gfortran.h: Add is_main_program member to symbol_attribute. + * trans-decl: Add a gfor_fndecl_set_std tree. + (gfc_build_builtin_function_decls): Create it. + (gfc_generate_function_code): Add this call at the beginning of + the main program. + * trans.c (gfc_generate_code): Move main_program and attr. + * trans.h: Add declaration for gfor_fndecl_set_std. + +2005-08-10 Thomas Koenig + + PR libfortran/22143 + gfortran.h: Declare new function gfc_resolve_dim_arg. + resolve.c: New function gfc_resolve_dim_arg. + iresolve.c (gfc_resolve_all): Use gfc_resolve_dim_arg. + (gfc_resolve_any): Likewise. + (gfc_resolve_count): Likewise. + (gfc_resolve_cshift): Likewise. If the kind of shift is less + gfc_default_integer_kind, convert it to default integer type. + (gfc_resolve_eoshift): Likewise. + (gfc_resolve_maxloc): Use gfc_resolve_dim_arg. + (gfc_resolve_maxval): Likewise. + (gfc_resolve_minloc): Likewise. + (gfc_resolve_minval): Likewise. + (gfc_resolve_product): Likewise. + (gfc_resolve_spread): Likewise. + (gfc_resolve_sum): Likewise. + +2005-08-09 Francois-Xavier Coudert + + * check.c (gfc_check_ttynam_sub, gfc_check_isatty): Add check + functions for new intrinsics TTYNAM and ISATTY. + * intrinsic.c (add_functions, add_subroutines): Add new + intrinsics. + * intrinsic.h: Add prototypes for new check and resolve + functions. + * iresolve.c (gfc_resolve_isatty, gfc_resolve_ttynam_sub): New + resolve functions for intrinsics TTYNAM and ISATTY. + * gfortran.h (gfc_generic_isym_id): Add symbol for ISATTY. + * trans-intrinsic.c: Add case for GFC_ISYM_ISATTY. + +2005-08-09 Jakub Jelinek + + * scanner.c (preprocessor_line): Don't write beyond the end of flag + buffer. + +2005-08-07 Janne Blomqvist + + PR fortran/22390 + * dump-parse-tree.c (gfc_show_code_node): Add case for FLUSH. + * gfortran.h: Add enums for FLUSH. + * io.c (gfc_free_filepos,match_file_element,match_filepos): Modify + comment appropriately. (gfc_match_flush): New function. + * match.c (gfc_match_if): Add match for flush. + * match.h: Add prototype. + * parse.c (decode_statement): Add flush to 'f' case. + (next_statement): Add case for flush. (gfc_ascii_statement): Likewise. + * resolve.c (resolve_code): Add flush case. + * st.c (gfc_free_statement): Add flush case. + * trans-io.c: Add prototype for flush. + (gfc_build_io_library_fndecls): Build fndecl for flush. + (gfc_trans_flush): New function. + * trans-stmt.h: Add prototype. + * trans.c (gfc_trans_code): Add case for flush. + +2005-08-06 Francois-Xavier Coudert + + * primary.c (match_hollerith_constant): Fix typo. + +2005-08-06 Kazu Hirata + + * decl.c, dump-parse-tree.c, gfortran.texi, intrinsic.texi, + invoke.texi, resolve.c, trans-array.c, trans-array.h, + trans-common.c, trans-expr.c, trans-io.c, trans.h: Fix + comment/doc typos. Follow spelling conventions. + +2005-08-06 Jakub Jelinek + + PR fortran/18833 + PR fortran/20850 + * primary.c (match_varspec): If equiv_flag, don't look at sym's + attributes, call gfc_match_array_ref up to twice and don't do any + substring or component processing. + * resolve.c (resolve_equivalence): Transform REF_ARRAY into + REF_SUBSTRING or nothing if needed. Check that substrings + don't have zero length. + +2005-08-05 Thomas Koenig + + * trans-expr.c (gfc_build_builtin_function_decls): Mark + stop_numeric and stop_string as non-returning. + +2005-08-04 Paul Brook + + * trans-expr.c (gfc_conv_expr, gfc_conv_expr_type): Update comments. + (gfc_conv_expr_lhs): Fix assertion. + (gfc_conv_expr_val): Merge post block. Set se.expr to new value. + +2005-08-02 David Edelsohn + + PR fortran/22491 + * expr.c (simplify_parameter_variable): Do not copy the subobject + references if the expression value is a constant. + + * expr.c (gfc_simplify_expr): Evaluate constant substrings. + +2005-07-31 Jerry DeLisle + + * intrinsic.texi: Add documentation for exponent, floor, and fnum and + fix description of ceiling in index. + +2005-07-31 Steven Bosscher + + * trans-decl.c (gfc_build_builtin_function_decls): Give the internal + malloc functions the 'malloc' attribute. Give runtime_error the + 'noreturn' attribute. + +2005-07-31 Steven Bosscher + + * trans-stmt.c (gfc_trans_goto): Jump to the known label instead + of the assigned goto variable. + +2005-07-29 Steven Bosscher + + * trans-types.h (gfc_array_range_type): Add missing GTY decl for this. + +2005-07-28 Andrew Pinski + + * fortran/f95-lang.c (language_function): Remove + named_labels, shadowed_labels, returns_value, returns_abnormally, + warn_about_return_type, and extern_inline fields. + (named_labels): Remove variable. + (gfc_init_decl_processing): Remove setting of named_labels. + +2005-07-27 Volker Reichelt + + PR fortran/22503 + * resolve.c (resolve_operator): Improve diagnostic for comparison + of logicals with invalid operator. + +2005-07-25 Jakub Jelinek + + PR fortran/20063 + * data.c (gfc_assign_data_value_range): Call + create_character_initializer if last_ts is a character type. + +2005-07-22 Manfred Hollstein + + * match.c (gfc_match_symbol): Fix uninitialised warnings. + * matchexp.c (gfc_match_expr): Likewise. + +2005-07-20 Giovanni Bajo + + Make CONSTRUCTOR use VEC to store initializers. + * trans-array.c (gfc_build_null_descriptor, + gfc_trans_array_constructor_value, gfc_conv_array_initializer): + Update to cope with VEC in CONSTRUCTOR_ELTS. + * trans-common.c (create_common): Likewise. + * trans-expr.c (gfc_conv_structure): Likewise. + * trans-stmt.c (gfc_trans_character_select): Use + build_constructor_from_list instead of build_constructor. + +2005-07-19 Paul Thomas + + PR fortran/16940 + * resolve.c (resolve_symbol): A symbol with FL_UNKNOWN + is matched against interfaces in parent namespaces. If there + the symtree is set to point to the interface. + +2005-07-16 David Edelsohn + + PR fortran/21730 + * decl.c (do_parm): Adjust character initializer to character length + of symbol before assigning. + +2005-07-14 Steve Ellcey + + * trans-types.c (MAX_REAL_KINDS): Increase from 4 to 5. + +2005-07-14 Jakub Jelinek + + * gfortran.h (MAX_ERROR_MESSAGE): Remove. + (gfc_error_buf): Add allocated and index fields. Change message + field from array to a pointer. + * error.c (use_warning_buffer, error_ptr, warning_ptr): Remove. + (cur_error_buffer): New variable. + (error_char): Use cur_error_buffer->{message,index} instead of + {warning,error}_{buffer.message,ptr}. Reallocate message buffer + if too small. + (gfc_warning, gfc_notify_std, gfc_error, gfc_error_now): Setup + cur_error_buffer and its index rather than {warning,error}_ptr + and use_warning_buffer. + (gfc_warning_check, gfc_error_check): Don't print anything if + message is NULL. + (gfc_push_error): Allocate saved message with xstrdup. + (gfc_pop_error): Free saved message with gfc_free. + (gfc_free_error): New function. + * primary.c (match_complex_constant): Call gfc_free_error if + gfc_pop_error will not be called. + * match.c (gfc_match_st_function): Likewise. + + PR fortran/22417 + * scanner.c (preprocessor_line): Don't treat flag 3 as the start of a new + file. Fix file left but not entered warning. + +2005-07-14 Feng Wang + Steven G. Kargl + + * array.c (resolve_character_array_constructor): Allocate gfc_charlen + for the array and attach to namespace list for automatic deallocation. + +2005-07-13 Andreas Schwab + + * Make-lang.in (fortran/dependency.o): Depend on + $(GFORTRAN_TRANS_DEPS). + +2005-07-11 Jakub Jelinek + + * trans-stmt.c (gfc_trans_forall_loop): Clear maskindex before + the outermost loop. + (gfc_trans_assign_need_temp, gfc_trans_pointer_assign_need_temp, + gfc_trans_forall_1, gfc_evaluate_where_mask, gfc_trans_where_2): + Don't clear maskindexes here. + +2005-07-08 Daniel Berlin + + * trans-decl.c (create_function_arglist): DECL_ARG_TYPE_AS_WRITTEN + is removed. + +2005-07-08 Jakub Jelinek + + * primary.c (gfc_match_rvalue): Handle ENTRY the same way + as FUNCTION. + +2005-07-07 Jakub Jelinek + + * scanner.c (load_line): Add pbuflen argument, don't make + buflen static. If maxlen == 0 or preprocessor_flag, + don't truncate at buflen, but at maxlen. In xrealloc add + 1 byte at the end for the terminating '\0'. Don't fill + with spaces up to buflen, but gfc_option.fixed_line_length. + (load_file): Adjust load_line caller. Add line_len variable. + + * scanner.c (preprocessor_line): Only set current_file->line when errors + have not been encountered. Warn and don't crash if a file leave + preprocessor line has no corresponding entering line. Formatting. + +2005-07-07 Steven Bosscher + + * primary.c (match_hollerith_constant): Use int, not unsigned int, + for the hollerith length. Fix indentation. + +2005-07-07 Feng Wang + + PR fortran/16531 + PR fortran/15966 + PR fortran/18781 + * arith.c (gfc_hollerith2int, gfc_hollerith2real, + gfc_hollerith2complex, gfc_hollerith2character, gfc_hollerith2logical): + New functions. + (eval_intrinsic): Don't evaluate if Hollerith constant arguments exist. + * arith.h (gfc_hollerith2int, gfc_hollerith2real, + gfc_hollerith2complex, gfc_hollerith2character, gfc_hollerith2logical): + Add prototypes. + * expr.c (free_expr0): Free memery allocated for Hollerith constant. + (gfc_copy_expr): Allocate and copy string if Expr is from Hollerith. + (gfc_check_assign): Enable conversion from Hollerith to other. + * gfortran.h (bt): Add BT_HOLLERITH. + (gfc_expr): Add from_H flag. + * intrinsic.c (gfc_type_letter): Return 'h' for BT_HOLLERITH. + (add_conversions): Add conversions from Hollerith constant to other. + (do_simplify): Don't simplify if Hollerith constant arguments exist. + * io.c (resolve_tag): Enable array in FORMAT tag under GFC_STD_GNU. + * misc.c (gfc_basetype_name): Return "HOLLERITH" for BT_HOLLERITH. + (gfc_type_name): Print "HOLLERITH" for BT_HOLLERITH. + * primary.c (match_hollerith_constant): New function. + (gfc_match_literal_constant): Add match Hollerith before Integer. + * simplify.c (gfc_convert_constant): Add conversion from Hollerith + to other. + * trans-const.c (gfc_conv_constant_to_tree): Use VIEW_CONVERT_EXPR to + convert Hollerith constant to tree. + * trans-io.c (gfc_convert_array_to_string): Get array's address and + length to set string expr. + (set_string): Deal with array assigned Hollerith constant and character + array. + * gfortran.texi: Document Hollerith constants as extention support. + +2005-07-07 Feng Wang + + PR fortran/22327 + * trans-array.c (gfc_trans_array_constructor_value): Fix index of data. + +2005-07-07 Jakub Jelinek + + * decl.c (gfc_match_entry): Allow ENTRY without parentheses + even in FUNCTIONs. + +2005-07-03 Kazu Hirata + + * gfortran.texi, intrinsic.texi: Fix typos. + * symbol.c: Fix a comment typo. + +2005-07-03 Kaveh R. Ghazi + + * error.c (error_printf, error_print): Use ATTRIBUTE_GCC_GFC. + * gfortran.h (ATTRIBUTE_GCC_GFC): New. + (gfc_warning, gfc_warning_now, gfc_error, gfc_error_now, + gfc_fatal_error, gfc_internal_error, gfc_notify_std): Use + ATTRIBUTE_GCC_GFC. + +2005-07-03 Francois-Xavier Coudert + + PR fortran/20842 + * io.c (match_dt_element): Do not allow END tag in PRINT or + WRITE statement. + +2005-07-02 Joseph S. Myers + + * lang.opt: Remove "." from end of help texts. + +2005-07-01 Jerry DeLisle + + * gfortran.texi: Fix typos and grammar. + * invoke.texi: Fix typos and grammar. + * intrinsic.texi: Add documentaion for eoshift, epsilon, etime, and + exit. Fixed alignment of text for dtime syntax. Fixed a few line + lengths. + +2005-06-25 Jakub Jelinek + + * trans-stmt.c (gfc_trans_forall_1): Prefer to use smaller logical + type than boolean_type_node. + +2005-06-25 Kelley Cook + + * all files: Update FSF address in copyright headers. + +2005-06-24 Jerry DeLisle + + PR fortran/21915 + * gfortran.h: Add symbols for new intrinsic functions. + * intrinsic.c: Add new functions acosh, asinh, and atanh. + * intrinsic.h: Add prototypes for the new functions. + * iresolve.c (gfc_resolve_acosh): New function. + (gfc_resolve_asinh): New function. + (gfc_resolve_atanh): New function. + * mathbuiltins.def: Add defines. + * simplify.c (gfc_simplify_acosh): New function. + (gfc_simplify_asinh): New function. + (gfc_simplify_atanh): New function. + +2005-06-24 Feng Wang + + * simplify.c (gfc_simplify_modulo): Don't clear before get result. + +2005-06-22 Paul Brook + + PR fortran/21034 + * symbol.c (gfc_is_var_automatic): New function. + (save_symbol): Use it. + +2005-06-21 Tobias Schlueter + Paul Thomas + + PR fortran/22010 + Port from g95. + * module.c (mio_namelist): New function. Correct to set + namelist_tail and to give error on renaming namelist by use + association. + (mio_symbol): Call mio_namelist. + +2005-06-19 Francois-Xavier Coudert + + * gfortran.h: Add flag_backslash compile-time option. + * lang.opt: Add support for -fbackslash option. + * options.c: Likewise. + * primary.c: Implement behavior for -fno-backslash. + * invoke.texi: Add doc for -fbackslash option. + * gfortran.texi: Remove mention of -fno-backslash as a + possible extension. + +2005-06-20 Steven G. Kargl + (port from g95) + + PR fortran/21257 + * match.c (gfc_match_label): Detect duplicate labels. + + +2005-06-20 Erik Edelmann + + * intrinsic.c (check_intrinsic_standard): Fix spelling error + in a warning message. + +2005-06-18 Erik Edelman + Steven G. Kargl + + PR fortran/19926 + * primary.c (gfc_match_rvalue): expr_type can be EXPR_CONSTANT + for an array; check that sym->as is NULL. + + +2005-06-18 Steven G. Kargl + + * intrinsic.c (gfc_intrinsic_func_interface): Enable errors for generic + functions whose simplification routine return FAILURE. + +2005-06-13 Geoffrey Keating + + * Make-lang.in (fortran.install-man): Doesn't depend on installdirs. + (rule for installing f95.1 manpage): Does depend on installdirs. + +2005-06-13 Jakub Jelinek + + PR fortran/22038 + * trans-stmt.c (gfc_trans_forall_loop): Only increment maskindex + in the innermost loop. + + * trans-expr.c (gfc_conv_function_call): Return int instead of + void. Use a local variable for has_alternate_specifier and + return it. Avoid modification of function type's return value + in place, since it may be shared. + * trans.h (has_alternate_specifier): Remove. + (gfc_conv_function_call): Change return type. + * trans-stmt.c (has_alternate_specifier): Remove. + (gfc_trans_call): Add a local has_alternate_specifier variable, + set it from gfc_conv_function_call return value. + +2005-06-12 Richard Henderson + + * trans-array.c (gfc_conv_descriptor_data_get): Rename from + gfc_conv_descriptor_data. Cast the result to the DATAPTR type. + (gfc_conv_descriptor_data_set, gfc_conv_descriptor_data_addr): New. + (gfc_trans_allocate_array_storage): Use them. + (gfc_array_allocate, gfc_array_deallocate): Likewise. + (gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor): Likewise. + (gfc_trans_deferred_array): Likewise. + * trans-expr.c (gfc_conv_function_call): Likewise. + (gfc_trans_subcomponent_assign): Likewise. + (gfc_trans_pointer_assignment): Likewise. + * trans-intrinsic.c (gfc_conv_allocated): Likewise. + * trans-types.c (gfc_array_descriptor_base): New. + (gfc_get_element_type): Use GFC_TYPE_ARRAY_DATAPTR_TYPE. + (gfc_get_array_descriptor_base): Break out from ... + (gfc_get_array_type_bounds): ... here. Create type variants. + * trans-array.h (gfc_conv_descriptor_data_get): Declare. + (gfc_conv_descriptor_data_set, gfc_conv_descriptor_data_addr): Declare. + +2005-06-12 Tobias Schl"uter + + * trans-expr.c (gfc_conv_variable): POINTER results don't need f2c + calling conventions. Look at sym instead of sym->result. + * trans-types.c (gfc_sym_type): Remove workaround for frontend bug. + Remove condition which is always false with workaround removed. + (gfc_return_by_reference): Always look at sym, never at sym->result. + +2005-06-11 Steven G. Kargl + + PR fortran/17792 + PR fortran/21375 + * trans-array.c (gfc_array_deallocate): pstat is new argument + (gfc_array_allocate): update gfc_array_deallocate() call. + (gfc_trans_deferred_array): ditto. + * trans-array.h: update gfc_array_deallocate() prototype. + * trans-decl.c (gfc_build_builtin_function_decls): update declaration + * trans-stmt.c (gfc_trans_deallocate): Implement STAT= feature. + +2005-06-07 Jerry DeLisle + + * intrinsic.texi: Add documentation for dcmplx, digits, + dim, idim, ddim, dot_product, dprod, dreal, and dtime. + +2005-06-05 Tobias Schl"uter + + PR fortran/21912 + * trans-array.c (gfc_trans_array_constructor_value): Slightly reorder. + Generate correct exit condition in case of negative steps in + implied-do loops. + + * invoke.texi: Fix description of flags required for compatibility + with g77. + +2005-06-04 Tobias Schl"uter + Erik Schnetter + + PR fortran/19195 + * trans.c (gfc_get_backend_locus): Remove unnecessary adjustment, + remove FIXME comment. + +2005-06-04 Tobias Schl"uter + + * match.c (match_forall_iterator): Don't immediately give error if '=' + is not followed by an expression. + +2005-06-04 Tobias Schl"uter + Erik Edelmann + + * array.c (gfc_match_array_constructor): Disallow empty array + constructor. + +2005-06-03 Jerry DeLisle + + * fortran/intrinsic.texi: Add documentation for + command_argument_count, conjg, dconjg, count, + cpu_time, cshift, date_and_time, dble, dfloat. + +2005-06-01 Roger Sayle + + * intrinsic.c (add_conv): No longer take a "simplify" argument as + its always gfc_convert_constant, instead take a "standard" argument. + (add_conversions): Change all existing calls of add_conv to pass + GFC_STD_F77 as appropriate. Additionally, if we're allowing GNU + extensions support integer-logical and logical-integer conversions. + (gfc_convert_type_warn): Warn about use the use of these conversions + as a extension when appropriate, i.e. with -pedantic. + * simplify.c (gfc_convert_constant): Add support for integer to + logical and logical to integer conversions, using gfc_int2log and + gfc_log2int. + * arith.c (gfc_log2int, gfc_int2log): New functions. + * arith.h (gfc_log2int, gfc_int2log): Prototype here. + * gfortran.texi: Document this new GNU extension. + +2005-06-01 Paul Thomas + + * fortran/trans-expr.c (gfc_conv_variable): Clean up bracketting. + * fortran/trans-expr.c (gfc_conv_function_call): Insert spaces. + Correct comments and replace convert of integer_one_node with + build_int_cst. + +2005-06-01 Jakub Jelinek + + PR fortran/21729 + * resolve.c (resolve_contained_fntype): Use sym->attr.untyped + to avoid giving error multiple times. + (resolve_entries): Don't error about BT_UNKNOWN here. + (resolve_unknown_f): Capitalize IMPLICIT for consistency. + (resolve_fntype): New function. + (gfc_resolve): Call resolve_fntype. + +2005-06-01 Feng Wang + + PR fortran/20883 + * fortran/io.c (resolve_tag): Fix error message. + +2005-05-31 Kaveh R. Ghazi + + * fortran/trans-decl.c: Don't include errors.h. + * fortran/Make-lang.in: Updates dependencies. + +2005-05-31 Paul Thomas + + PR fortran/18109 + PR fortran/18283 + PR fortran/19107 + * fortran/trans-array.c (gfc_conv_expr_descriptor): Obtain the + string length from the expression typespec character length value + and set temp_ss->stringlength and backend_decl. Obtain the + tree expression from gfc_conv_expr rather than gfc_conv_expr_val. + Dereference the expression to obtain the character. + * fortran/trans-expr.c (gfc_conv_component_ref): Remove the + dereference of scalar character pointer structure components. + * fortran/trans-expr.c (gfc_trans_subarray_assign): Obtain the + string length for the structure component from the component + expression. + +2005-05-30 Roger Sayle + + * gfortran.h (GFC_STD_LEGACY): New "standard" macro. Reindent. + * options.c (gfc_init_options): By default, allow legacy extensions + but warn about them. + (gfc_post_options): Make -pedantic warn about legacy extensions + even with -std=legacy. + (gfc_handle_option): Make -std=gnu follow the default behaviour + of warning about legacy extensions, but allowing them. Make the + new -std=legacy accept everything and warn about nothing. + * lang.opt (std=legacy): New F95 command line option. + * invoke.texi: Document both -std=f2003 and -std=legacy. + * gfortran.texi: Explain the two types of extensions and document + how they are affected by the various -std= command line options. + +2005-05-30 Kazu Hirata + + * trans-expr.c: Remove trailing ^M. + + * trans-expr.c: Fix comment typos. + +2005-05-29 Paul Thomas + + PR fortran/16939 + PR fortran/17192 + PR fortran/17193 + PR fortran/17202 + PR fortran/18689 + PR fortran/18890 + * fortran/trans-array.c (gfc_conv_resolve_dependencies): Add string + length to temp_ss for character pointer array assignments. + * fortran/trans-expr.c (gfc_conv_variable): Correct errors in + dereferencing of characters and character pointers. + * fortran/trans-expr.c (gfc_conv_function_call): Provide string + length as return argument for various kinds of handling of return. + Return a char[]* temporary for character pointer functions and + dereference the temporary upon return. + +2005-05-29 Janne Blomqvist + Steven G. Kargl + + fortran/PR20846 + * io.c (gfc_match_inquire): Implement constraints on UNIT and FILE usage. + +2005-05-29 Francois-Xavier Coudert + + PR libfortran/20006 + * io.c (format_item_1): Add check and extension warning for + $ edit descriptor. + +2005-05-28 Steven G. Kargl + + * arith.c (gfc_arith_init_1): Fix off by one problem; + (gfc_check_integer_range): Chop extra bits in subnormal numbers. + +2005-05-28 Jerry DeLisle + Steven G. Kargl + + * intrinsic.texi: added documentation for BIT_SIZE, BTEST, CHAR, CEILING + and CMPLX + +2005-05-27 Steven G. Kargl + + * trans-array.c (gfc_trans_deferred_array): Use build_int_cst to force + like types in comparsion. + +2005-05-26 Kazu Hirata + + * data.c, parse.c, trans-array.c, trans-decl.c, + trans-intrinsic.c, trans-stmt.c, trans-types.c, trans.c, + trans.h: Fix comment typos. Follow spelling conventions. + +2005-05-22 Roger Sayle + + * gfortran.texi: Document some more GNU extensions. + +2005-05-22 Francois-Xavier Coudert + + * error.c (gfc_warning): Fix typo in comment. + +2005-05-18 Thomas Koenig + + PR libfortran/21127 + * fortran/iresolve.c (gfc_resolve_reshape): Add + gfc_type_letter (BT_COMPLEX) for complex to + to resolved function name. + +2005-05-18 Erik Edelmann + + * array.c (gfc_match_array_constructor): Support [ ... ] + style array constructors. + +2005-05-18 Tobias Schl"uter + + * f95-lang.c (gfc_init_builtin_functions): Define BUILT_IN_TRUNC + and BUILT_IN_TRUNCF instead of BUILT_IN_FLOOR and BUILT_IN_FLOORF. + * trans-intrinsic.c (build_fix_expr): Change 'op' argument + to correct enum type. + (gfc_conv_intrinsic_aint): Likewise. Clarify comment in front of + function. Add default case to switch, deal with FIX_TRUNC_EXPR + instead of FIX_FLOOR_EXPR. + +2005-05-18 Feng Wang + + PR fortran/20954 + * trans-const.c (gfc_conv_const_charlen): Use gfc_charlen_type_node to + build character length. + +2005-05-17 Zdenek Dvorak + + * trans-types.c (gfc_array_range_type): New variable. + (gfc_init_types): Initialize gfc_array_range_type. + (gfc_get_array_type_bounds): Use gfc_array_range_type. + +2005-05-17 Jakub Jelinek + + PR fortran/15080 + * trans-stmt.c (generate_loop_for_temp_to_lhs): Remove SIZE and COUNT2 + arguments. If LSS is gfc_ss_terminator, increment COUNT1 by 1, instead + of incrementing COUNT2 and using COUNT1+COUNT2 increment COUNT1 and use + just that as index. + (generate_loop_for_rhs_to_temp): Likewise. + (compute_overall_iter_number): Add INNER_SIZE_BODY argument. + It non-NULL, add it to body. + (allocate_temp_for_forall_nest_1): New function, split from + allocate_temp_for_forall_nest. + (allocate_temp_for_forall_nest): Add INNER_SIZE_BODY argument, + propagate it down to compute_overall_iter_number. Use + allocate_temp_for_forall_nest_1. + (gfc_trans_assign_need_temp): Remove COUNT2. Call + compute_inner_temp_size into a new stmtblock_t. Adjust calls to + allocate_temp_for_forall_nest, generate_loop_for_rhs_to_temp + and generate_loop_for_temp_to_lhs. + (gfc_trans_pointer_assign_need_temp): Adjust calls to + allocate_temp_for_forall_nest. + (gfc_evaluate_where_mask): Call compute_inner_temp_size into a new + stmtblock_t. Call compute_overall_iter_number just once, then + allocate_temp_for_forall_nest_1 twice with the same size. + Initialize mask indexes if nested_forall_info != NULL. + (gfc_trans_where_2): Initialize mask indexes before calling + gfc_trans_nested_forall_loop. + +2005-05-15 Feng Wang + Jerry DeLisle + + PR fortran/17432 + * trans-stmt.c (gfc_trans_label_assign): fix pointer type, to + resolve ICE on assign of format label. + * trans-io.c (set_string): add fold-convert to properly + handle assigned format label in write. + +2005-05-13 Paul Brook + + * trans-stmt.c (gfc_trans_forall_1): Fix comment typo. + +2005-05-12 Tobias Schl"uter + + * trans-types.c (gfc_is_nodesc_array): Remove redundant check. + +2005-05-11 Tobias Schl"uter + + PR fortran/21260 + * io.c (check_format): Look for literal characters inside + hollerith constant. + +2005-05-11 Tobias Schl"uter + + * resolve.c (resolve_symbol): Copy 'pointer' and 'dimension' + attribute from result symbol to function symbol. + * trans-expr.c (gfc_conv_function_call): Look at sym->attr.dimension + instead of sym->result->attr.dimension. + +2005-05-10 Tobias Schl"uter + + PR fortran/20178 + * gfortran.h (gfc_option): Add flag_f2c. + * invoke.texi: Document '-ff2c' command line option. Adapt + documentation for '-fno-second-underscore' and '-fno-underscoring'. + * lang.opt (ff2c): New entry. + * options.c (gfc-init_options): Set default calling convention + to -fno-f2c. Mark -fsecond-underscore unset. + (gfc_post_options): Set -fsecond-underscore if not explicitly set + by user. + (handle_options): Set gfc_option.flag_f2c according to requested + calling convention. + * trans-decl.c (gfc_get_extern_function_decl): Use special f2c + intrinsics where necessary. + (gfc_trans_deferred_vars): Change todo error to assertion. + * trans-expr.c (gfc_conv_variable): Dereference access + to hidden result argument. + (gfc_conv_function_call): Add hidden result argument to argument + list if f2c calling conventions requested. Slightly restructure + tests. Convert result of default REAL function to requested type + if f2c calling conventions are used. Dereference COMPLEX result + if f2c cc are used. + * trans-types.c (gfc_sym_type): Return double for default REAL + function if f2c cc are used. + (gfc_return_by_reference): Slightly restructure logic. Return + COMPLEX by reference depending on calling conventions. + (gfc_get_function_type): Correctly make hidden result argument a + pass-by-reference argument for COMPLEX. Remove old code which does + this for derived types. + +2005-05-09 Tobias Schl"uter + + * match.c (gfc_match_return): Only require space after keyword when + it is obligatory. Only give stdwarn to after matching is successful. + * dump-parse-tree.c (gfc_show_symbol): Deal with alternate returns. + +2005-05-08 Kazu Hirata + + * intrinsic.texi: Fix typos. + +2005-05-07 Steven G. Kargl + + * intrinsic.texi: Document ASSOCIATED and ATAN2. Update Bessel function + description to include information about scalar arguments. + +2005-05-03 Kazu Hirata + + * Make-lang.in, dump-parse-tree.c, invoke.texi, lang.opt, + match.h, trans-array.h: Update copyright. + +2005-04-29 Tom Tromey + + * f95-lang.c (poplevel): Updated for change to build_block. + +2005-04-29 Jakub Jelinek + + PR fortran/13082 + PR fortran/18824 + * trans-expr.c (gfc_conv_variable): Handle return values in functions + with alternate entry points. + * resolve.c (resolve_entries): Remove unnecessary string termination + after snprintf. Set result of entry master. + If all entries have the same type, set entry master's type + to that common type, otherwise set mixed_entry_master attribute. + * trans-types.c (gfc_get_mixed_entry_union): New function. + (gfc_get_function_type): Use it for mixed_entry_master functions. + * gfortran.h (symbol_attribute): Add mixed_entry_master bit. + * decl.c (gfc_match_entry): Set entry->result properly for + function ENTRY. + * trans-decl.c (gfc_get_symbol_decl): For entry_master, skip over + __entry argument. + (build_entry_thunks): Handle return values in entry thunks. + Clear BT_CHARACTER's ts.cl->backend_decl, so that it is not + shared between multiple contexts. + (gfc_get_fake_result_decl): Use DECL_ARGUMENTS from + current_function_decl instead of sym->backend_decl. Skip over + entry master's entry id argument. For mixed_entry_master entries or + their results, return a COMPONENT_REF of the fake result. + (gfc_trans_deferred_vars): Don't warn about missing return value if + at least one entry point uses RESULT. + (gfc_generate_function_code): For entry master returning + CHARACTER, copy ts.cl->backend_decl to all entry result syms. + * trans-array.c (gfc_trans_dummy_array_bias): Don't consider return + values optional just because they are in entry master. + +2005-04-29 Francois-Xavier Coudert + + * gfortran.h (gfc_namespace): Add seen_implicit_none field, + Tobias forgot this in previous commit. + +2005-04-29 Paul Brook + + * trans-expr.c (gfc_conv_expr_present): Fix broken assert. Update + comment. + +2005-04-29 Tobias Schl"uter + + * gfortran.h (gfc_namespace): Add seen_implicit_none field. + * symbol.c (gfc_set_implicit_none): Give error if there's a previous + IMPLICIT NONE, set seen_implicit_none. + (gfc_merge_new_implicit): Error if there's an IMPLICIT NONE statement. + +2005-04-28 Tobias Schl"uter + + * gfortran.h (gfc_gsymbol): Make name a const char *. + * symbol.c (gfc_get_gsymbol): Allocate gsymbol name via + gfc_get_string. + +2005-04-28 Francois-Xavier Coudert + + PR fortran/20865 + * resolve.c (resolve_actual_arglist): Issue an error if a statement + functions is used as actual argument. + +2005-04-27 Francois-Xavier Coudert + + PR fortran/21177 + * interface.c (compare_parameter): Ignore type for EXPR_NULL + only if type is BT_UNKNOWN. + +2005-04-25 Paul Brook + Steven G. Kargl + + PR fortran/20879 + * check.c (gfc_check_ichar_iachar): New function. + * instinsic.h (gfc_check_ichar_iachar): Add prototype. + * intrinsic.c (add_functions): Use it. + * primary.c (match_varspec, gfc_match_rvalue): Clear incorrect + character expression lengths. + +2005-04-24 Tobias Schl"uter + + PR fortran/20059 + * trans-common.c (translate_common): Cast offset and + common_segment->offset to type int for warning message. + +2005-04-23 DJ Delorie + + * trans-decl.c: Adjust warning() callers. + +2005-04-23 Tobias Schl"uter + + * trans-const.c (gfc_conv_mpfr_to_tree): Use hexadecimal string as + intermediate representation. Fix typo in comment. + +2005-04-21 Steven G. Kargl + + * trans-const.c (gfc_conv_mpfr_to_tree): Remove unneeded computation; + simplify logic; Add a gcc_assert. + +2005-04-19 Steven G. Kargl + + * trans-const.c (gfc_conv_mpz_to_tree): Fix comment. + +2005-04-19 Arnaud Desitter + Steven G. Kargl + + * invoke.texi: Update -Waliasing description + +2005-04-19 Francois-Xavier Coudert + + PR fortran/16861 + * resolve.c (resolve_variable): If e->symtree is not set, this + ought to be a FAILURE, and not a segfault. + +2005-04-17 Paul Thomas + + PR fortran/17472 + PR fortran/18209 + PR fortran/18396 + PR fortran/19467 + PR fortran/19657 + * fortran/trans-io.c (gfc_build_io_library_fndecls): Create + declaration for st_set_nml_var and st_set_nml_var_dim. Remove + declarations of old namelist functions. + (build_dt): Simplified call to transfer_namelist_element. + (nml_get_addr_expr): Generates address expression for start of + object data. New function. + (nml_full_name): Qualified name for derived type components. New + function. + (transfer_namelist_element): Modified for calls to new functions + and improved derived type handling. + +2005-04-17 Richard Guenther + + * scanner.c (gfc_next_char_literal): Reset truncation flag + for lines ending in a comment for both fixed and free form. + (load_line): Do not set truncated flag if only truncating + the EOL marker. + +2005-04-15 Richard Guenther + + PR fortran/14569 + * gfortran.h (gfc_linebuf): Add truncated field. + * parse.c (next_statement): Handle warning for truncated + lines. + * scanner.c (load_line): Return if line was truncated. + No longer warn for truncated lines. Remove unused parameters. + (load_file): Store load_line return value to linebuf. + (gfc_error_recovery): Do not advance line at the end. + +2005-04-14 Steven G. Kargl + + * gfortran.h (gfc_real_info): Add subnormal struct member. + * arith.c (gfc_arith_init_1): Set it. + (gfc_check_real_range): Use it. + * simplify.c (gfc_simplify_nearest): Fix nearest(0.,1.). + +2005-04-12 Kazu Hirata + + * simplify.c: Fix a comment typo. + +2005-04-11 Richard Sandiford + + * lang.opt: Refer to the GCC internals documentation instead of c.opt. + +2005-04-11 Tobias Schl"uter + + * simplify.c (gfc_simplify_nearest): Overhaul. + +2005-04-10 Kazu Hirata + + * interface.c: Fix a comment typo. + +2005-04-10 Francois-Xavier Coudert + + * match.c (match_arithmetic_if): Arithmetic IF is obsolete in + Fortran 95. + +2005-04-09 Steven G. Kargl + + * simplify.c (gfc_simplify_anint): Use mpfr_round() + (gfc_simplify_dnint): ditto. + (gfc_simplify_nint): ditto. + +2005-04-09 Andrew Pinski + + PR fortran/13257 + * io.c (check_format): Allow an optional comma + between descriptors. + +2005-04-09 Francois-Xavier Coudert + + * match.c (match_arithmetic_if): Remove gfc_ prefix and correct + comment according to GNU coding style. + (gfc_match_if): Remove gfc_ prefix in call to + match_arithmetic_if. + +2005-04-08 Diego Novillo + + * match.c (gfc_match_arithmetic_if): Declare static. + +2005-04-08 Francois-Xavier Coudert + + PR fortran/17229 + * match.c (gfc_match_arithmetic_if): New function to match an + arithmetic IF statement. + (gfc_match_if): Use gfc_match_arithmetic_if to match an + arithmetic IF statement embedded in a simple IF statement. + +2005-04-07 Steven G. Kargl + + * simplify.c (gfc_simplify_exponent): Fix exponent(tiny(x)) + +2005-04-06 Steven G. Kargl + + * invoke.texi: Remove documentation of -std=f90 + +2005-04-06 Tobias Schl"uter + + * expr.c (gfc_check_assign): Don't allow NULL as rhs in a + non-pointer assignment. + +2005-04-05 Feng Wang + + PR fortran/15959 + PR fortran/20713 + + * array.c (resolve_character_array_constructor): New function. Set + constant character array's character length. + (gfc_resolve_array_constructor): Use it. + * decl.c (add_init_expr_to_sym): Set symbol and initializer character + length. + (gfc_set_constant_character_len): New function. Set constant character + expression according the given length. + * match.h (gfc_set_constant_character_len): Add prototype. + +2005-04-04 Francois-Xavier Coudert + + * intrinsic.texi: BES?? functions are not in the f95 standard. + +2005-04-03 Francois-Xavier Coudert + + * intrinsic.texi: Document COS, EXP, LOG, LOG10, SIN, SQRT, TAN. + +2005-04-03 Francois-Xavier Coudert + + * intrinsic.texi: Document BESJ0, BESJ1, BESJN, BESY0, BESY1, + BESYN, ATAN, COSH, ERF, ERC, SINH, TANH. + +2005-04-02 Steven G. Kargl + + * intrinsic.texi: Document ALLOCATED, ANINT, ANY, ASIN; fix typos + +2005-04-01 Kazu Hirata + + * decl.c, f95-lang.c, interface.c, module.c, trans-stmt.c, + trans.h: Fix comment typos. + +2005-03-29 Steven G. Kargl + + * gfortran.h (option_t): Change d8, i8, r8 to flag_default_double, + flag_default_integer, flag_default_real + * invoke.texi: Update documentation + * lang.opt: Remove d8, i8, r8 definitions; Add fdefault-double-8 + fdefault-integer-8, and fdefault-real-8 definitions. + * options.c (gfc_init_options): Set option defaults + (gfc_handle_option): Handle command line options. + * trans-types.c (gfc_init_kinds): Use options. + +2005-03-29 Keith Besaw + + * f95-lang.c (builtin_function): Process the attrs parameter + and apply the "const" attribute to the builtin if found. + +2005-03-27 Steven G. Kargl + + * intrinsic.texi: Document AIMAG, AINT, ALL + +2005-03-26 Steven G. Kargl + + * arith.c (check_result): Fix illogical logic. + +2005-03-26 Canqun Yang + + * trans-common.c (create_common): Build RECORD_NODE for common blocks + contain no equivalence objects. + (add_equivalences): New argument saw_equiv. + (trans_common): New local variable saw_equiv. + (finish_equivalences): Add a local variable dummy, Always pass true + for the 3rd parameter to create_common. + +2005-03-25 Steven G. Kargl + + * intrinsic.texi: Fix "make dvi" + +2005-03-24 Steven G. Kargl + + * intrinsic.texi: New file. + * gfortran.texi: Include it; white space change; fix typo. + +2005-03-23 Joseph S. Myers + + * f95-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove. + +2005-03-23 Steven Bosscher + + * convert.c (convert): Replace fold (buildN (...)) with fold_buildN. + * trans-array.c (gfc_trans_allocate_array_storage, + gfc_trans_allocate_temp_array gfc_trans_array_constructor_value, + gfc_conv_array_index_ref, gfc_trans_array_bound_check, + gfc_conv_array_index_offset, gfc_conv_scalarized_array_ref, + gfc_conv_array_ref, gfc_trans_preloop_setup, gfc_conv_ss_startstride, + gfc_conv_loop_setup, gfc_array_init_size, gfc_trans_array_bounds, + gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias, + gfc_conv_expr_descriptor): Likewise. + * trans-expr.c (gfc_conv_powi, gfc_conv_string_tmp, + gfc_conv_concat_op, gfc_conv_expr_op): Likewise. + * trans-intrinsic.c (build_round_expr, gfc_conv_intrinsic_bound, + gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_sign, + gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_minmaxval, + gfc_conv_intrinsic_btest, gfc_conv_intrinsic_bitop, + gfc_conv_intrinsic_singlebitop, gfc_conv_intrinsic_ibits, + gfc_conv_intrinsic_ishft, gfc_conv_intrinsic_ishftc, + gfc_conv_intrinsic_merge, prepare_arg_info, + gfc_conv_intrinsic_rrspacing, gfc_conv_intrinsic_repeat): Likewise. + * trans-stmt.c (gfc_trans_simple_do, gfc_trans_do, gfc_trans_do_while, + gfc_trans_forall_loop, gfc_do_allocate, generate_loop_for_temp_to_lhs, + generate_loop_for_rhs_to_temp, compute_inner_temp_size, + allocate_temp_for_forall_nest, gfc_trans_pointer_assign_need_temp, + gfc_trans_forall_1, gfc_evaluate_where_mask, gfc_trans_where_assign): + Likewise. + * trans-types.c (gfc_get_dtype, gfc_get_array_type_bounds): Likewise. + * trans.c (gfc_add_modify_expr): Likewise. + +2005-03-22 Francois-Xavier Coudert + + * check.c (gfc_check_chdir, gfc_check_chdir_sub, gfc_check_kill, + gfc_check_kill_sub, gfc_check_link, gfc_check_link_sub, + gfc_check_symlnk, gfc_check_symlnk_sub, gfc_check_rename, + gfc_check_rename_sub, gfc_check_sleep_sub, gfc_check_gerror, + gfc_check_getlog, gfc_check_hostnm, gfc_check_hostnm_sub, + gfc_check_perror): new functions to check newly implemented + g77 intrinsics. + * gfortran.h: adding symbols for new intrinsics. + * intrinsic.c (add_functions): adding new intrinsics. + (add_subroutines): adding new intrinsics. + * intrinsic.h: prototype for all checking and resolving + functions. + * iresolve.c (gfc_resolve_chdir, gfc_resolve_chdir_sub, + gfc_resolve_hostnm, gfc_resolve_ierrno, gfc_resolve_kill, + gfc_resolve_link, gfc_resolve_rename, gfc_resolve_symlnk, + gfc_resolve_time, gfc_resolve_time8, gfc_resolve_rename_sub, + gfc_resolve_kill_sub, gfc_resolve_link_sub, + gfc_resolve_symlnk_sub, gfc_resolve_sleep_sub, + gfc_resolve_gerror, gfc_resolve_getlog, gfc_resolve_hostnm_sub, + gfc_resolve_perror): new functions to resolve intrinsics. + * trans-intrinsic.c (gfc_conv_intrinsic_function): add case + for new symbols. + +2005-03-19 Tobias Schl"uter + + * dump-parse-tree.c (gfc_show_expr): Dump name of namespace + in which the variable is declared. + + PR fortran/18525 + * resolve.c (was_declared): Also check for dummy attribute. + +2005-03-19 Tobias Schl"uter + + * gfortran.h (arith): Remove ARITH_0TO0. + * arith.c (gfc_arith_error): Remove handling of ARITH_0TO0. + (gfc_arith_power): Remove special casing of zero to integral + power zero. + +2005-03-18 Kaveh R. Ghazi + + * Make-lang.in (fortran-warn): Remove -Wno-error. + (expr.o-warn, resolve.o-warn, simplify.o-warn, + trans-common.o-warn): Specify -Wno-error. + +2005-03-17 Tobias Schl"uter + + * trans-array.c (gfc_trans_static_array_pointer, + get_array_ctor_var_strlen, gfc_conv_array_index_offset): Fix + comment and formatting typos. + +2005-03-17 Francois-Xavier Coudert + + * invoke.texi: Fix typos. + +2005-03-15 Zack Weinberg + + * Make-lang.in (GFORTRAN_TEXI): Add gcc-vers.texi. + +2005-03-15 Feng Wang + + * trans-stmt.c (gfc_trans_label_assign): Don't set DECL_ARTIFICIAL flag + to zero on label_tree. + +2005-03-15 Feng Wang + + PR fortran/18827 + * io.c (resolve_tag): Add checking on assigned label. + (match_dt_format): Does not set symbol assign attribute. + * match.c (gfc_match_goto):Does not set symbol assign attribute. + * resolve.c (resolve_code): Add checking on assigned label. + * trans-common.c (build_field): Deals with common variable assigned + a label. + * trans-stmt.c (gfc_conv_label_variable): New function. + (gfc_trans_label_assign): Use it. + (gfc_trans_goto): Ditto. + * trans-io.c (set_string): Ditto. + * trans.h (gfc_conv_label_variable): Add prototype. + +2005-03-14 Tobias Schl"uter + + PR fortran/20467 + * symbol.c (check_conflict): A dummy argument can't be a statement + function. + +2005-03-14 Zdenek Dvorak + + * fortran/trans-intrinsic.c (gfc_conv_intrinsic_ishft): Convert + the argument of the shift to the unsigned type. + +2005-03-13 Tobias Schl"uter + + PR fortran/16907 + * resolve.c (gfc_resolve_index): Allow REAL indices as an extension. + +2005-03-13 Tobias Schl"uter + + PR fortran/20323 + * resolve.c (gfc_resolve): Check if character lengths are + specification expressions. + +2005-03-12 Tobias Schl"uter + + PR fortran/20361 + * trans-array.c (gfc_stack_space_left): Remove unused variable. + (gfc_can_put_var_on_stack): Move to trans-decl.c, remove #if 0'ed + code. + * trans-array.h (gfc_stack_space_left, gfc_can_put_var_on_stack): + Remove declaration / prototype. + * trans-common.c (build_equiv_decl): Give union a name. Check if + it can be put on the stack. + * trans-decl.c (gfc_stack_space_left): Move function here. + (gfc_build_qualified_array): Fix comment typo. + * trans.h (gfc_put_var_on_stack): Add prototype. + +2005-03-11 Kaveh R. Ghazi + + * Make-lang.in (fortran-warn): Set to $(STRICT_WARN) -Wno-error. + * decl.c, trans.c: Don't use C++ style comments. + * gfortran.h (sym_flavor, procedure_type, sym_intent, gfc_access, + ifsrc): Give names to enums and use ENUM_BITFIELD. + (gfc_access): Remove trailing comma. + +2005-03-05 Steven G. Kargl + + PR 19936 + * primary.c (match_complex_constant): Mangled complex constant may + be an implied do-loop. Give implied do-loop matcher a chance. + +2005-03-05 Steven G. Kargl + + PR fortran/19754 + * resolve.c (compare_shapes): New function. + (resolve_operator): Use it. + +2005-03-05 Tobias Schl"uter + + * trans-const.c (gfc_conv_constant_to_tree): Use correct tree + type for COMPLEX constants. + +2005-03-04 Tobias Schl"uter + + PR fortran/19673 + * trans-expr.c (gfc_conv_function_call): Correctly dereference + argument from a pointer function also if it has a result clause. + +2005-03-04 Steven G. Kargl + + * expr.c (gfc_copy_shape_excluding): Change && to ||. + +2005-03-04 Tobias Schl"uter + + * trans-intrinsic.c (gfc_get_symbol_for_expr): Fix comment typo, + clarify comment. + +2005-02-28 Tobias Schl"uter + (port from g95) + + PR fortran/19479 + * simplify.c (gfc_simplify_bound): Rename to ... + (simplify_bound): ... this and overhaul. + +2005-02-28 Steven G. Kargl + + * trans-intrinsic.c (gfc_conv_intrinsic_iargc): remove boolean argument. + (gfc_conv_intrinsic_function): update function calls + +2005-02-27 Steven G. Kargl + + PR fortran/20058 + * trans-types.c (gfc_max_integer_kind): Declare + (gfc_init_kinds): Initialize it. + * gfortran.h (gfc_max_integer_kind): extern it. + * primary.c (match_boz_constant): Use it; remove gfortran extension + of kind suffixes on BOZ literal constants + + +2005-02-27 Steven G. Kargl + + * arith.c (gfc_check_real_range): Remove multiple returns + (check_result): New function. + (gfc_arith_uminus,gfc_arith_plus,gfc_arith_times, + gfc_arith_divide,gfc_arith_power,gfc_arith_minus): Use it. + + +2005-02-24 Volker Reichelt + + * decl.c, resolve.c, trans-array.c, trans.h: Fix comment typo(s). + + +2005-02-24 Tobias Schl"uter + + Unrevert previously reverted patch. Adding this fix: + * module.c (find_true_name): Deal with NULL module. + +2005-02-24 Tobias Schl"uter + + Revert yesterday's patch: + 2005-02-23 Tobias Schl"uter + + * gfortran.h (gfc_component, gfc_actual_arglist, ... + ... argument. Copy string instead of pointing to it. + +2005-02-23 Tobias Schl"uter + + * gfortran.h (gfc_get_namespace): Add second argument to prototype. + * intrinsic.c (gfc_intrinsic_init_1): Pass second argument to + gfc_get_namespace. + * module.c (mio_namespace_ref, load_needed): Likewise. + * parse.c (parse_interface, parse_contained): Likewise. Here the + correct second argument matters. + * symbol.c (gfc_get_namespace): Add parent_types argument, only copy + parent's implicit types if this is set. + (gfc_symbol_init_2): Pass second argument to gfc_get_namespace. + * trans-common.c (build_common_decl): Likewise. + + * gfortran.h (symbol_attribute): New 'untyped' field, fix comment + formatting. + * symbol.c (gfc_set_default_type): Issue error only once, by setting + and checking 'untyped' attribute. + + * gfortran.h (gfc_expr): Move 'operator', 'op1', 'op2', and 'uop' + fields into new struct 'op' inside the 'value' union. + * arith.c (eval_intrinsic): Adapt all users. + * dependency.c (gfc_check_dependency): Likewise. + * dump-parse-tree.c (gfc_show_expr): Likewise. + * expr.c (gfc_get_expr): Don't clear removed fields. + (free_expr0, gfc_copy_expr, gfc_type_convert_binary, + gfc_is_constant_expr, simplify_intrinsic_op, check_init_expr, + check_intrinsic_op): Adapt to new field names. + * interface.c (gfc_extend_expr): Likewise. Also explicitly + nullify 'esym' and 'isym' fields of new function call. + * iresolve.c (gfc_resolve_dot_product, gfc_resolve_matmul): + Adapt to renamed structure fields. + * matchexp.c (build_node, match_level_1, match_expr): Likewise. + * module.c (mio_expr): Likewise. + * resolve.c (resolve_operator): Likewise. + (gfc_find_forall_index): Likewise. Only look through operands + if dealing with EXPR_OP + * trans-array.c (gfc_walk_op_expr): Adapt to renamed fields. + * trans-expr.c (gfc_conv_unary_op, gfc_conv_power_op, + gfc_conv_concat_op, gfc_conv_expr_op): Likewise. + + [ Reverted ] + * gfortran.h (gfc_component, gfc_actual_arglist, gfc_user_op): Make + 'name' a 'const char *'. + (gfc_symbol): Likewise, also for 'module'. + (gfc_symtree): Make 'name' a 'const char *'. + (gfc_intrinsic_sym): Likewise, also for 'lib_name'. + (gfc_get_gsymbol, gfc_find_gsymbol): Add 'const' qualifier to + 'char *' argument. + (gfc_intrinsic_symbol): Use 'gfc_get_string' instead of 'strcpy' to + initialize 'SYM->module'. + * check.c (gfc_check_minloc_maxloc, check_reduction): Check for NULL + pointer instead of empty string. + * dump-parse-tree.c (gfc_show_actual_arglist): Likewise. + * interface.c (gfc_compare_types): Adapt check to account for possible + NULL pointer. + (compare_actual_formal): Check for NULL pointer instead of empty + string. + * intrinsic.c (gfc_current_intrinsic, gfc_current_intrinsic_arg): + Add 'const' qualifier. + (conv_name): Return a heap allocated string. + (find_conv): Add 'const' qualifier to 'target'. + (add_sym): Use 'gfc_get_string' instead of 'strcpy'. + (make_generic): Check for NULL pointer instead of empty string. + (make_alias): Use 'gfc_get_string' instead of 'strcpy'. + (add_conv): No need to strcpy result from 'conv_name'. + (sort_actual): Check for NULL pointer instead of empty string. + * intrinsic.h (gfc_current_intrinsic, gfc_current_intrinsic_arg): + Adapt prototype. + * module.c (compare_true_names): Compare pointers instead of strings + for 'module' member. + (find_true_name): Initialize string fields with gfc_get_string. + (mio_pool_string): New function. + (mio_internal_string): Adapt comment. + (mio_component_ref, mio_component, mio_actual_arg): Use + 'mio_pool_string' instead of 'mio_internal_string'. + (mio_symbol_interface): Add 'const' qualifier to string arguments. + Add level of indirection. Use 'mio_pool_string' instead of + 'mio_internal_string'. + (load_needed, read_module): Use 'gfc_get_string' instead of 'strcpy'. + (write_common, write_symbol): Use 'mio_pool_string' instead of + 'mio_internal_string'. + (write_symbol0, write_symbol1): Likewise, also check for NULL pointer + instead of empty string. + (write_operator, write_generic): Pass correct type variable to + 'mio_symbol_interface'. + (write_symtree): Use 'mio_pool_string' instead of + 'mio_internal_string'. + * primary.c (match_keyword_arg): Adapt check to possible + case of NULL pointer. Use 'gfc_get_string' instead of 'strcpy'. + * symbol.c (gfc_add_component, gfc_new_symtree, delete_symtree, + gfc_get_uop, gfc_new_symbol): Use 'gfc_get_string' instead of + 'strcpy'. + (ambiguous_symbol): Check for NULL pointer instead of empty string. + (gfc_find_gsymbol, gfc_get_gsymbol): Add 'const' qualifier on string + arguments. + * trans-array.c (gfc_trans_auto_array_allocation): Check for NULL + pointer instead of empty string. + * trans-decl.c (gfc_sym_mangled_identifier, + gfc_sym_mangled_function_id, gfc_finish_var_decl, gfc_get_symbol_decl, + gfc_get_symbol_decl): Likewise. + * trans-io.c (gfc_new_nml_name_expr): Add 'const' qualifier to + argument. Copy string instead of pointing to it. + +2005-02-23 Kazu Hirata + + * intrinsic.h, st.c: Update copyright. + +2005-02-20 Steven G. Kargl + + * symbol.c: Typos in comments. + +2005-02-20 Steven G. Kargl + + * expr.c (gfc_type_convert_binary): Typo in comment. + +2005-02-19 Steven G. Kargl + + * check.c (gfc_check_selected_int_kind): New function. + * intrinsic.h: Prototype it. + * intrinsic.c (add_function): Use it. + * simplify (gfc_simplify_ceiling,gfc_simplify_floor): Change + BT_REAL to BT_INTEGER and use gfc_default_integer_kind. + +2005-02-19 Steven G. Kargl + + * check.c (gfc_check_int): improve checking of optional kind + * simplify.c (gfc_simplify_int): Change BT_REAL to BT_INTEGER + +2005-02-19 Steven G. Kargl + + * check.c (gfc_check_achar): New function + * intrinsic.h: Prototype it. + * intrinsic.c (add_function): Use it. + +2005-02-13 Tobias Schl"uter + + * trans-stmt.c (generate_loop_for_temp_to_lhs, + generate_loop_for_rhs_to_temp): Remove if whose condition is + always true. + +2005-02-12 Tobias Schl"uter + + * symbol.c (gfc_use_ha_derived): Remove, fold functionality into ... + (gfc_use_derived): ... this function. + +2005-02-09 Richard Henderson + + * f95-lang.c (gfc_init_builtin_functions): Call + build_common_builtin_nodes; do not define any functions handled + by it. + +2005-02-08 Tobias Schl"uter + + * expr.c (gfc_copy_expr): Don't copy 'op1' and 'op2' for + EXPR_SUBSTRING. + (gfc_is_constant_expr): Check 'ref' to determine if substring + reference is constant. + (gfc_simplify_expr): Simplify 'ref' instead of 'op1' and 'op2'. + (check_init_expr, check_restricted): Check 'ref' instead of 'op1' + and 'op2'. + * module.c (mio_expr): Read / write 'ref' instead of 'op1' and 'op2'. + +2005-02-07 Tobias Schl"uter + + * gfortran.h (gfc_add_dimension, gfc_add_result, gfc_add_save, + gfc_add_dummy, gfc_add_generic, gfc_add_in_common, gfc_add_data, + gfc_add_in_namelist, gfc_add_sequence, gfc_add_function, + gfc_add_subroutine, gfc_add_access, gfc_add_flavor, gfc_add_entry, + gfc_add_procedure): Add argument. + * array.c (gfc_set_array_spec), decl.c (var_element, get_proc_name, + gfc_match_null, match_type_spec, match_attr_spec, + gfc_match_formal_arglist, match_result, gfc_match_function_decl): + Update callers to match. + (gfc_match_entry): Likewise, fix comment typo. + (gfc_match_subroutine, attr_decl1, gfc_add_dimension, + access_attr_decl, do_parm, gfc_match_save, gfc_match_modproc, + gfc_match_derived_decl): Update callers. + * interface.c (gfc_match_interface): Likewise. + * match.c (gfc_match_label, gfc_add_flavor, + gfc_match_call, gfc_match_common, gfc_match_block_data, + gfc_match_namelist, gfc_match_module, gfc_match_st_function): + Likewise. + * parse.c (parse_derived, parse_interface, parse_contained), + primary.c (gfc_match_rvalue, gfc_match_variable): Likewise. + * resolve.c (resolve_formal_arglist, resolve_entries): Update callers. + * symbol.c (check_conflict, check_used): Add new 'name' argument, + use when printing error message. + (gfc_add_dimension, gfc_add_result, gfc_add_save, gfc_add_dummy, + gfc_add_generic, gfc_add_in_common, gfc_add_data, + gfc_add_in_namelist, gfc_add_sequence, gfc_add_function, + gfc_add_subroutine, gfc_add_access, gfc_add_flavor, gfc_add_entry, + gfc_add_procedure): Add new 'name' argument. Pass along to + check_conflict and check_used. + (gfc_add_allocatable, gfc_add_external, gfc_add_intrinsic, + gfc_add_optional, gfc_add_pointer, gfc_add_target, gfc_add_elemental, + gfc_add_pure, gfc_add_recursive, gfc_add_intent, + gfc_add_explicit_interface, gfc_copy_attr): Pass NULL for new + argument in calls to any of the modified functions. + +2005-02-06 Joseph S. Myers + + * gfortran.texi: Don't give last update date. + +2006-01-30 Richard Henderson + + * options.c (gfc_init_options): Zero flag_errno_math. + +2005-01-29 Paul Brook + + PR fortran/18565 + * check.c (real_or_complex_check): New function. + (gfc_check_fn_c, gfc_check_fn_r, gfc_check_fn_rc): New functions. + * intrinsic.c (add_functions): Use new check functions. + * intrinsic.h (gfc_check_fn_c, gfc_check_fn_r, gfc_check_fn_rc): + Add prototypes. + +2005-01-29 Steven G. Kargl + + PR fortran/19589 + * expr.c (gfc_check_assign): Check for conformance of logical operands + +2005-01-27 Steven Bosscher + + * trans-decl.c (gfc_build_label_decl): Set DECL_ARTIFICAL and + TREE_USED for all labels. + (gfc_trans_entry_master_switch): Use it instead of building a + label by hand. + * trans-io.c (add_case): Likewise. + * trans-stmt.c (gfc_trans_integer_select): Likewise. + +2005-01-23 Paul Brook + Steven G. Kargl + + PR fortran/17941 + * arith.c (gfc_convert_real): Remove sign handling. + * primary.c (match_digits): Allow whitespace after initial sign. + (match_real_const): Handle signs here. Allow whitespace after + initial sign. Remove dead code. + (match_const_complex_part): Remove. + (match_complex_part): Use match_{real,integer}_const. + (match_complex_constant): Cross-promote integer types. + +2005-01-23 James A. Morrison + + PR fortran/19294 + * iresolve.c (gfc_resolve_transpose): Resolve to transpose_c4 or + transpose_c8 for complex types. + +2005-01-23 Kazu Hirata + + * data.c, dependency.c, f95-lang.c, io.c, trans-array.c, + trans-decl.c, trans-expr.c, trans-intrinsic.c, trans-io.c, + trans-stmt.c, trans-types.c, trans.h: Fix comment typos. + Follow spelling conventions. + +2005-01-22 Bud Davis + + PR fortran/19313 + * trans-io.c (gfc_trans_inquire): Added code to support + pad. + +2005-01-22 Steven G. Kargl + + * intrinsic.c (make_alias): Add standard argument. + (add_functions): Update make_alias calls. + +2005-01-22 Paul Brook + + * trans-expr.c (gfc_conv_function_call): Remove bogus TODO. + +2005-01-22 Paul Brook + + * gfortran.h (gfc_check_access): Add prototype. + * match.c (gfc_match_namelist): Remove TODO. + * module.c (check_access): Rename ... + (gfc_check_access): ... to this. Boolify. Update callers. + * resolve.c (resolve_symbol): Check for private objects in public + namelists. + +2005-01-22 Paul Brook + + * primary.c (gfc_match_rvalue): Only apply implicit type if variable + does not have an explicit type. + (gfc_match_variable): Resolve implicit derived types in all cases. + Resolve contained function types from their own namespace, not the + parent. + * resolve.c (resolve_contained_fntype): Remove duplicate sym->result + checking. Resolve from the contained namespace, not the parent. + +2005-01-22 Tobias Schl"uter + + PR fortran/19543 + * trans-const.c (gfc_conv_constant_to_tree): Give logical + constants the correct type. + + PR fortran/19194 + * trans-io.c (ADD_STRING): Use gfc_charlen_type_node for string + length parameters. + (gfc_build_io_library_fndecls): 'rec' and 'recl_in' are not + pointer fields. + +2005-01-18 Kazu Hirata + + * arith.c, array.c, check.c, decl.c, expr.c, f95-lang.c, + gfortran.h, interface.c, intrinsic.c, io.c, iresolve.c, + match.c, matchexp.c, misc.c, module.c, options.c, parse.c, + scanner.c, simplify.c, symbol.c, trans-array.c, trans-expr.c, + trans-io.c, trans-stmt.c, trans.c: Update copyright. + +2005-01-17 Ira Rosen + + * f95-lang.c (gfc_init_builtin_functions): Call targetm.init_builtins. + +2005-01-16 Tobias Schlueter + + PR fortran/19182 + * error.c (error_char): Line-buffer errors / warnings. + +2005-01-16 Tobias Schlueter + + * trans-intrinsic.c (gfc_conv_intrinsic_ishft): Fix signed / + unsigned issue. Use build_int_cst instead of converting + integer_zero_node. Remove unnecessary conversion. + + * trans-types.c (gfc_get_character_type_len): Use + gfc_charlen_type_node as basic type for the range field. + + * trans-intrinsic.c (build_fixbound_expr, + gfc_conv_intrinsic_bound, gfc_conv_intrinsic_anyall, + gfc_conv_intrinsic_count, gfc_conv_intrinsic_btest, + gfc_conv_intrinsic_singlebitop): Use 'build_int_cst' instead + of converting 'integer_zero_node' or 'integer_one_node' + respectively. + (gfc_conv_intrinsic_ishftc): Same, but store in local variable to + evade re-building. + (gfc_conv_intrinsic_strcmp, gfc_conv_intrinsic_rrspacing, + gfc_conv_intrinsic_trim, gfc_conv_intrinsic_iargc): Use + 'build_int_cst' instead of converting 'integer_zero_node' or + 'integer_one_node' respectively. + + * trans-intrinsic.c (gfc_conv_intrinsic_index, + gfc_conv_intrinsic_scan, gfc_conv_intrinsic_verify): Remove + 'gfc'-prefix from local variable, remove dead code, use correct + type when inserting argument. + + * trans-intrinsic.c, trans-types.c: Update copyright years. + +2005-01-16 Steven G. Kargl + + PR 19168 + * resolve.c (check_case_overlap): Typo in comment. + (validate_case_label_expr): Fix up kinds of case values + (resolve_select): Properly handle kind mismatches. + +2005-01-16 Paul Brook + + PR fortran/17675 + * trans-common.c (translate_common): Remove duplicate function call. + (finish_equivalences): Preserve alignment when biasing offsets. + +2005-01-15 Tobias Schl"uter + + * resolve.c (compare_case): Cleanup. + +2005-01-14 Steven G. Kargl + + * resolve.c (compare_case): Give arguments correct type. + +2005-01-13 Kazu Hirata + + * iresolve.c, trans-common.c, trans-types.c: Fix comment + typos. + +2005-01-09 Paul Brook + + PR fortran/17675 + * trans-common.c (current_common, current_offset): Remove. + (create_common): Add head argument. + (align_segment): New function. + (apply_segment_offset): New function. + (translate_common): Merge code from new_segment. Handle alignment. + (new_segment): Remove. + (finish_equivalences): Ensure proper alignment. + +2005-01-08 Tobias Schl"uter + + * trans-const.c: Don't include unused math.h. + + * trans-intrinsic.c (gfc_get_intrinsic_lib_fndecl, + gfc_conv_intrinsic_bound, gfc_conv_intrinsic_minmaxloc, + gfc_conv_intrinsic_ishft, gfc_conv_intrinsic_len): Remove + trailing whitespace. + (prepare_arg_info): Fix formatting, indenting and remove trailing + whitespace. + (gfc_conv_intrinsic_spacing, gfc_conv_intrinsic_trim): Remove + trailing whitespace. + + * arith.c (arctangent2, gfc_arith_init_1, gfc_arith_done_1, + gfc_constant_result, gfc_range_check, gfc_arith_power, + eval_type_intrinsic0, eval_intrinsic_f2, gfc_real2real, + gfc_real2complex, gfc_complex2int, gfc_complex2real, + gfc_complex2complex): Fix whitespace issues. + * check.c (must_be, type_check, numeric_check, int_or_real_check, + logical_array_check, array_check, scalar_check, nonoptional_check, + variable_check, dim_check, check_a_kind, gfc_check_a_ikind, + gfc_check_a_xkind, gfc_check_abs, gfc_check_all_any, + gfc_check_allocated, gfc_check_a_p, gfc_check_besn, + gfc_check_btest, gfc_check_char, gfc_check_cmplx, gfc_check_count, + gfc_check_cshift, gfc_check_dcmplx, gfc_check_dble, + gfc_check_digits, gfc_check_dot_product, gfc_check_eoshift, + gfc_check_fnum, gfc_check_g77_math1, gfc_check_huge, gfc_check_i, + gfc_check_iand, gfc_check_ibclr, gfc_check_ibits, gfc_check_ibset, + gfc_check_idnint, gfc_check_ieor, gfc_check_index, gfc_check_int, + gfc_check_ior, gfc_check_ishft, gfc_check_ishftc, gfc_check_kind, + gfc_check_lbound, gfc_check_logical, min_max_args, + gfc_check_min_max_integer, gfc_check_min_max_real, + gfc_check_min_max_double, gfc_check_matmul, + gfc_check_minval_maxval, gfc_check_merge, gfc_check_nearest, + gfc_check_pack, gfc_check_precision, gfc_check_radix, + gfc_check_range, gfc_check_real, gfc_check_repeat, + gfc_check_scale, gfc_check_scan, gfc_check_selected_real_kind, + gfc_check_set_exponent): Fix formatting issues. + (gfc_check_size, gfc_check_sign): Alphabetize function order, + remove whitespace-only line. + (gfc_check_fstat, gfc_check_fstat_sub, gfc_check_stat, + gfc_check_stat_sub, gfc_check_transfer, gfc_check_transpose, + gfc_check_ubound, gfc_check_unpack, gfc_check_verify, gfc_check_x, + gfc_check_cpu_time, gfc_check_date_and_time, gfc_check_mvbits, + gfc_check_random_number, gfc_check_random_seed, + gfc_check_second_sub, gfc_check_system_clock, + gfc_check_getcwd_sub, gfc_check_exit, gfc_check_flush, + gfc_check_umask, gfc_check_umask_sub, gfc_check_unlink, + gfc_check_unlink_sub): Fix formatting issues. + +2005-01-08 Tobias Schl"uter + + * gfortran.h: Remove outdated comment. Don't include stdio.h + explicitly. + +2005-01-06 Tobias Schlueter + + * gfortranspec.c (lang_specific_driver): Change year to 2005 in + output of 'gfortran --version'. + +2005-01-03 Steven G. Kargl + + * arith.c: Add system.h; remove string.h + * decl.c: Ditto + * matchexp.c: Ditto + * parse.c: Ditto + * resolve.c: Ditto + * st.c: Ditto + * check.c: Remove stdlib.h and stdarg.h + * error.c: Remove stdlib.h, stdarg.h, stdio.h, string.h + * expr.c: Add system.h; remove stdarg.h, stdio.h, and string.h + * f95-lang.c: Add system.h; remove stdio.h + * interface.c: Add system.h; remove stdlib.h and string.h + * intrinsic.c: Remove stdarg.h, stdio.h, and string.h + * io.c: Remove string.h + * simplify.c: Ditto + * match.c: Remove stdarg.h and string.h + * misc.c: Update copyright; add system.h; remove stdlib.h, + string.h, and sys/stat.h + * module.c: Add system.h; remove string.h, stdio.h, errno.h, + unistd.h, and time.h + * option.c: Remove string.h and stdlib.h + * primary.c: Ditto + * scanner.c: Update copyright; add system.h; remove stdlib.h, + stdio.h, string.h, and strings.h + * symbol.c: Add system.h; remove stdlib.h, stdio.h, and string.h + * trans-array.c: Remove stdio.h and gmp.h + * trans-const.c: Ditto + * trans-expr.c: Ditto + * trans-io.c: Ditto + * trans-stmt.c: Ditto + * trans.c: Ditto + * trans-intrinsic.c: Remove stdio.h and string.h diff --git a/gcc/fortran/Make-lang.in b/gcc/fortran/Make-lang.in index 5d3a0e0ef5f..260d6c54d8c 100644 --- a/gcc/fortran/Make-lang.in +++ b/gcc/fortran/Make-lang.in @@ -24,10 +24,10 @@ # 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.all.cross, foo.start.encap, foo.rest.encap, # foo.info -# foo.install-normal, foo.install-common, foo.install-info, foo.install-man, -# foo.uninstall, foo.distdir, +# foo.install-common, foo.install-info, foo.install-man, +# foo.uninstall, # foo.mostlyclean, foo.clean, foo.distclean, foo.extraclean, # foo.maintainer-clean, foo.stage1, foo.stage2, foo.stage3, foo.stage4 # @@ -108,15 +108,10 @@ f951$(exeext): $(F95_OBJS) \ $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ \ $(F95_OBJS) $(BACKEND) $(F95_LIBS) -gt-fortran-f95-lang.h gtype-fortran.h : s-gtype; @true -gt-fortran-trans-decl.h gt-fortran-trans.h : s-gtype; @true -gt-fortran-trans-io.h gt-fortran-trans-types.h: s-gtype; @true -gt-fortran-trans-intrinsic.h : s-gtype; @true - +gt-fortran-trans.h : s-gtype; @true # # Build hooks: -fortran.all.build: gfortran$(exeext) fortran.all.cross: gfortran-cross$(exeext) fortran.start.encap: gfortran$(exeext) @@ -180,9 +175,6 @@ gfortran.pod: $(GFORTRAN_TEXI) # Install hooks: # f951 is installed elsewhere as part of $(COMPILERS). -# Nothing to do here. -fortran.install-normal: - # Install the driver program as $(target)-gfortran # and also as either gfortran (if native) or $(tooldir)/bin/gfortran. fortran.install-common: installdirs @@ -294,4 +286,5 @@ fortran/trans-intrinsic.o: $(GFORTRAN_TRANS_DEPS) fortran/mathbuiltins.def \ gt-fortran-trans-intrinsic.h fortran/dependency.o: $(GFORTRAN_TRANS_DEPS) fortran/dependency.h fortran/trans-common.o: $(GFORTRAN_TRANS_DEPS) +fortran/resolve.o: fortran/dependency.h diff --git a/gcc/fortran/check.c b/gcc/fortran/check.c index 3478526692f..14accfc6d41 100644 --- a/gcc/fortran/check.c +++ b/gcc/fortran/check.c @@ -450,8 +450,21 @@ gfc_check_a_p (gfc_expr * a, gfc_expr * p) if (int_or_real_check (a, 0) == FAILURE) return FAILURE; - if (same_type_check (a, 0, p, 1) == FAILURE) - return FAILURE; + if (a->ts.type != p->ts.type) + { + gfc_error ("'%s' and '%s' arguments of '%s' intrinsic at %L must " + "have the same type", gfc_current_intrinsic_arg[0], + gfc_current_intrinsic_arg[1], gfc_current_intrinsic, + &p->where); + return FAILURE; + } + + if (a->ts.kind != p->ts.kind) + { + if (gfc_notify_std (GFC_STD_GNU, "Extension: Different type kinds at %L", + &p->where) == FAILURE) + return FAILURE; + } return SUCCESS; } @@ -464,10 +477,13 @@ gfc_check_associated (gfc_expr * pointer, gfc_expr * target) int i; try t; - if (variable_check (pointer, 0) == FAILURE) - return FAILURE; + if (pointer->expr_type == EXPR_VARIABLE) + attr = gfc_variable_attr (pointer, NULL); + else if (pointer->expr_type == EXPR_FUNCTION) + attr = pointer->symtree->n.sym->attr; + else + gcc_assert (0); /* Pointer must be a variable or a function. */ - attr = gfc_variable_attr (pointer, NULL); if (!attr.pointer) { gfc_error ("'%s' argument of '%s' intrinsic at %L must be a POINTER", @@ -476,10 +492,10 @@ gfc_check_associated (gfc_expr * pointer, gfc_expr * target) return FAILURE; } + /* Target argument is optional. */ if (target == NULL) return SUCCESS; - /* Target argument is optional. */ if (target->expr_type == EXPR_NULL) { gfc_error ("NULL pointer at %L is not permitted as actual argument " @@ -488,7 +504,13 @@ gfc_check_associated (gfc_expr * pointer, gfc_expr * target) return FAILURE; } - attr = gfc_variable_attr (target, NULL); + if (target->expr_type == EXPR_VARIABLE) + attr = gfc_variable_attr (target, NULL); + else if (target->expr_type == EXPR_FUNCTION) + attr = target->symtree->n.sym->attr; + else + gcc_assert (0); /* Target must be a variable or a function. */ + if (!attr.pointer && !attr.target) { gfc_error ("'%s' argument of '%s' intrinsic at %L must be a POINTER " diff --git a/gcc/fortran/decl.c b/gcc/fortran/decl.c index 422a4e80f3b..381ae335b17 100644 --- a/gcc/fortran/decl.c +++ b/gcc/fortran/decl.c @@ -508,14 +508,15 @@ char_len_param_value (gfc_expr ** expr) static match match_char_length (gfc_expr ** expr) { - int length; + int length, cnt; match m; m = gfc_match_char ('*'); if (m != MATCH_YES) return m; - m = gfc_match_small_literal_int (&length); + /* cnt is unused, here. */ + m = gfc_match_small_literal_int (&length, &cnt); if (m == MATCH_ERROR) return m; @@ -1279,28 +1280,41 @@ match gfc_match_old_kind_spec (gfc_typespec * ts) { match m; + int original_kind, cnt; if (gfc_match_char ('*') != MATCH_YES) return MATCH_NO; - m = gfc_match_small_literal_int (&ts->kind); + /* cnt is unsed, here. */ + m = gfc_match_small_literal_int (&ts->kind, &cnt); if (m != MATCH_YES) return MATCH_ERROR; + original_kind = ts->kind; + /* Massage the kind numbers for complex types. */ - if (ts->type == BT_COMPLEX && ts->kind == 8) - ts->kind = 4; - if (ts->type == BT_COMPLEX && ts->kind == 16) - ts->kind = 8; + if (ts->type == BT_COMPLEX) + { + if (ts->kind % 2) + { + gfc_error ("Old-style type declaration %s*%d not supported at %C", + gfc_basic_typename (ts->type), original_kind); + return MATCH_ERROR; + } + ts->kind /= 2; + } if (gfc_validate_kind (ts->type, ts->kind, true) < 0) { - gfc_error ("Old-style kind %d not supported for type %s at %C", - ts->kind, gfc_basic_typename (ts->type)); - + gfc_error ("Old-style type declaration %s*%d not supported at %C", + gfc_basic_typename (ts->type), original_kind); return MATCH_ERROR; } + if (gfc_notify_std (GFC_STD_GNU, "Nonstandard type declaration %s*%d at %C", + gfc_basic_typename (ts->type), original_kind) == FAILURE) + return MATCH_ERROR; + return MATCH_YES; } @@ -1606,6 +1620,10 @@ match_type_spec (gfc_typespec * ts, int implicit_flag) if (gfc_match (" double complex") == MATCH_YES) { + if (gfc_notify_std (GFC_STD_GNU, "DOUBLE COMPLEX at %C does not " + "conform to the Fortran 95 standard") == FAILURE) + return MATCH_ERROR; + ts->type = BT_COMPLEX; ts->kind = gfc_default_double_kind; return MATCH_YES; @@ -2530,7 +2548,12 @@ gfc_match_function_decl (void) m = gfc_match_formal_arglist (sym, 0, 0); if (m == MATCH_NO) - gfc_error ("Expected formal argument list in function definition at %C"); + { + gfc_error ("Expected formal argument list in function " + "definition at %C"); + m = MATCH_ERROR; + goto cleanup; + } else if (m == MATCH_ERROR) goto cleanup; diff --git a/gcc/fortran/dependency.c b/gcc/fortran/dependency.c index b93808a2bce..4a795602414 100644 --- a/gcc/fortran/dependency.c +++ b/gcc/fortran/dependency.c @@ -175,6 +175,32 @@ gfc_is_same_range (gfc_array_ref * ar1, gfc_array_ref * ar2, int n, int def) } +/* Some array-returning intrinsics can be implemented by reusing the + data from one of the array arguments. For example, TRANSPOSE does + not necessarily need to allocate new data: it can be implemented + by copying the original array's descriptor and simply swapping the + two dimension specifications. + + If EXPR is a call to such an intrinsic, return the argument + whose data can be reused, otherwise return NULL. */ + +gfc_expr * +gfc_get_noncopying_intrinsic_argument (gfc_expr * expr) +{ + if (expr->expr_type != EXPR_FUNCTION || !expr->value.function.isym) + return NULL; + + switch (expr->value.function.isym->generic_id) + { + case GFC_ISYM_TRANSPOSE: + return expr->value.function.actual->expr; + + default: + return NULL; + } +} + + /* Return true if the result of reference REF can only be constructed using a temporary array. */ @@ -214,23 +240,82 @@ gfc_ref_needs_temporary_p (gfc_ref *ref) } -/* Dependency checking for direct function return by reference. - Returns true if the arguments of the function depend on the - destination. This is considerably less conservative than other - dependencies because many function arguments will already be - copied into a temporary. */ +/* Return true if array variable VAR could be passed to the same function + as argument EXPR without interfering with EXPR. INTENT is the intent + of VAR. + + This is considerably less conservative than other dependencies + because many function arguments will already be copied into a + temporary. */ + +static int +gfc_check_argument_var_dependency (gfc_expr * var, sym_intent intent, + gfc_expr * expr) +{ + gcc_assert (var->expr_type == EXPR_VARIABLE); + gcc_assert (var->rank > 0); + + switch (expr->expr_type) + { + case EXPR_VARIABLE: + return (gfc_ref_needs_temporary_p (expr->ref) + || gfc_check_dependency (var, expr, NULL, 0)); + + case EXPR_ARRAY: + return gfc_check_dependency (var, expr, NULL, 0); + + case EXPR_FUNCTION: + if (intent != INTENT_IN && expr->inline_noncopying_intrinsic) + { + expr = gfc_get_noncopying_intrinsic_argument (expr); + return gfc_check_argument_var_dependency (var, intent, expr); + } + return 0; + + default: + return 0; + } +} + + +/* Like gfc_check_argument_var_dependency, but extended to any + array expression OTHER, not just variables. */ + +static int +gfc_check_argument_dependency (gfc_expr * other, sym_intent intent, + gfc_expr * expr) +{ + switch (other->expr_type) + { + case EXPR_VARIABLE: + return gfc_check_argument_var_dependency (other, intent, expr); + + case EXPR_FUNCTION: + if (other->inline_noncopying_intrinsic) + { + other = gfc_get_noncopying_intrinsic_argument (other); + return gfc_check_argument_dependency (other, INTENT_IN, expr); + } + return 0; + + default: + return 0; + } +} + + +/* Like gfc_check_argument_dependency, but check all the arguments in ACTUAL. + FNSYM is the function being called, or NULL if not known. */ int -gfc_check_fncall_dependency (gfc_expr * dest, gfc_expr * fncall) +gfc_check_fncall_dependency (gfc_expr * other, sym_intent intent, + gfc_symbol * fnsym, gfc_actual_arglist * actual) { - gfc_actual_arglist *actual; + gfc_formal_arglist *formal; gfc_expr *expr; - gcc_assert (dest->expr_type == EXPR_VARIABLE - && fncall->expr_type == EXPR_FUNCTION); - gcc_assert (fncall->rank > 0); - - for (actual = fncall->value.function.actual; actual; actual = actual->next) + formal = fnsym ? fnsym->formal : NULL; + for (; actual; actual = actual->next, formal = formal ? formal->next : NULL) { expr = actual->expr; @@ -238,23 +323,14 @@ gfc_check_fncall_dependency (gfc_expr * dest, gfc_expr * fncall) if (!expr) continue; - /* Non-variable expressions will be allocated temporaries anyway. */ - switch (expr->expr_type) - { - case EXPR_VARIABLE: - if (!gfc_ref_needs_temporary_p (expr->ref) - && gfc_check_dependency (dest, expr, NULL, 0)) - return 1; - break; - - case EXPR_ARRAY: - if (gfc_check_dependency (dest, expr, NULL, 0)) - return 1; - break; + /* Skip intent(in) arguments if OTHER itself is intent(in). */ + if (formal + && intent == INTENT_IN + && formal->sym->attr.intent == INTENT_IN) + continue; - default: - break; - } + if (gfc_check_argument_dependency (other, intent, expr)) + return 1; } return 0; diff --git a/gcc/fortran/dependency.h b/gcc/fortran/dependency.h index c4fe493c9ec..7ef2edd97e5 100644 --- a/gcc/fortran/dependency.h +++ b/gcc/fortran/dependency.h @@ -22,7 +22,9 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA bool gfc_ref_needs_temporary_p (gfc_ref *); -int gfc_check_fncall_dependency (gfc_expr *, gfc_expr *); +gfc_expr *gfc_get_noncopying_intrinsic_argument (gfc_expr *); +int gfc_check_fncall_dependency (gfc_expr *, sym_intent, gfc_symbol *, + gfc_actual_arglist *); int gfc_check_dependency (gfc_expr *, gfc_expr *, gfc_expr **, int); int gfc_is_same_range (gfc_array_ref *, gfc_array_ref *, int, int); int gfc_dep_compare_expr (gfc_expr *, gfc_expr *); diff --git a/gcc/fortran/dump-parse-tree.c b/gcc/fortran/dump-parse-tree.c index f4765db4b5f..3b74aa16307 100644 --- a/gcc/fortran/dump-parse-tree.c +++ b/gcc/fortran/dump-parse-tree.c @@ -1150,6 +1150,11 @@ gfc_show_code_node (int level, gfc_code * c) gfc_status (" PAD="); gfc_show_expr (open->pad); } + if (open->convert) + { + gfc_status (" CONVERT="); + gfc_show_expr (open->convert); + } if (open->err != NULL) gfc_status (" ERR=%d", open->err->value); @@ -1351,6 +1356,11 @@ gfc_show_code_node (int level, gfc_code * c) gfc_status (" PAD="); gfc_show_expr (i->pad); } + if (i->convert) + { + gfc_status (" CONVERT="); + gfc_show_expr (i->convert); + } if (i->err != NULL) gfc_status (" ERR=%d", i->err->value); diff --git a/gcc/fortran/expr.c b/gcc/fortran/expr.c index 1ceec01eae0..11bf277ae58 100644 --- a/gcc/fortran/expr.c +++ b/gcc/fortran/expr.c @@ -1,6 +1,6 @@ /* Routines for manipulation of expression nodes. - Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, - Inc. + Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software + Foundation, Inc. Contributed by Andy Vaught This file is part of GCC. @@ -1365,7 +1365,7 @@ not_numeric: this problem here. */ static try -check_inquiry (gfc_expr * e) +check_inquiry (gfc_expr * e, int not_restricted) { const char *name; @@ -1379,6 +1379,10 @@ check_inquiry (gfc_expr * e) int i; + /* An undeclared parameter will get us here (PR25018). */ + if (e->symtree == NULL) + return FAILURE; + name = e->symtree->n.sym->name; for (i = 0; inquiry_function[i]; i++) @@ -1407,6 +1411,15 @@ check_inquiry (gfc_expr * e) e->ts = e->symtree->n.sym->ts; } + /* Assumed character length will not reduce to a constant expression + with LEN, as required by the standard. */ + if (i == 4 && not_restricted + && e->symtree->n.sym->ts.type == BT_CHARACTER + && e->symtree->n.sym->ts.cl->length == NULL) + gfc_notify_std (GFC_STD_GNU, "assumed character length " + "variable '%s' in constant expression at %L", + e->symtree->n.sym->name, &e->where); + return SUCCESS; } @@ -1440,7 +1453,7 @@ check_init_expr (gfc_expr * e) case EXPR_FUNCTION: t = SUCCESS; - if (check_inquiry (e) != SUCCESS) + if (check_inquiry (e, 1) != SUCCESS) { t = SUCCESS; for (ap = e->value.function.actual; ap; ap = ap->next) @@ -1478,7 +1491,8 @@ check_init_expr (gfc_expr * e) break; } - gfc_error ("Variable '%s' at %L cannot appear in an initialization " + gfc_error ("Parameter '%s' at %L has not been declared or is " + "a variable, which does not reduce to a constant " "expression", e->symtree->n.sym->name, &e->where); t = FAILURE; break; @@ -1557,8 +1571,14 @@ gfc_match_init_expr (gfc_expr ** result) return MATCH_ERROR; } - if (!gfc_is_constant_expr (expr)) - gfc_internal_error ("Initialization expression didn't reduce %C"); + /* Not all inquiry functions are simplified to constant expressions + so it is necessary to call check_inquiry again. */ + if (!gfc_is_constant_expr (expr) + && check_inquiry (expr, 1) == FAILURE) + { + gfc_error ("Initialization expression didn't reduce %C"); + return MATCH_ERROR; + } *result = expr; @@ -1637,7 +1657,7 @@ static try restricted_intrinsic (gfc_expr * e) { /* TODO: Check constraints on inquiry functions. 7.1.6.2 (7). */ - if (check_inquiry (e) == SUCCESS) + if (check_inquiry (e, 0) == SUCCESS) return SUCCESS; return restricted_args (e->value.function.actual); @@ -1748,6 +1768,8 @@ check_restricted (gfc_expr * e) try gfc_specification_expr (gfc_expr * e) { + if (e == NULL) + return SUCCESS; if (e->ts.type != BT_INTEGER) { @@ -2088,3 +2110,73 @@ gfc_get_variable_expr (gfc_symtree * var) return e; } + +/* Traverse expr, marking all EXPR_VARIABLE symbols referenced. */ + +void +gfc_expr_set_symbols_referenced (gfc_expr * expr) +{ + gfc_actual_arglist *arg; + gfc_constructor *c; + gfc_ref *ref; + int i; + + if (!expr) return; + + switch (expr->expr_type) + { + case EXPR_OP: + gfc_expr_set_symbols_referenced (expr->value.op.op1); + gfc_expr_set_symbols_referenced (expr->value.op.op2); + break; + + case EXPR_FUNCTION: + for (arg = expr->value.function.actual; arg; arg = arg->next) + gfc_expr_set_symbols_referenced (arg->expr); + break; + + case EXPR_VARIABLE: + gfc_set_sym_referenced (expr->symtree->n.sym); + break; + + case EXPR_CONSTANT: + case EXPR_NULL: + case EXPR_SUBSTRING: + break; + + case EXPR_STRUCTURE: + case EXPR_ARRAY: + for (c = expr->value.constructor; c; c = c->next) + gfc_expr_set_symbols_referenced (c->expr); + break; + + default: + gcc_unreachable (); + break; + } + + for (ref = expr->ref; ref; ref = ref->next) + switch (ref->type) + { + case REF_ARRAY: + for (i = 0; i < ref->u.ar.dimen; i++) + { + gfc_expr_set_symbols_referenced (ref->u.ar.start[i]); + gfc_expr_set_symbols_referenced (ref->u.ar.end[i]); + gfc_expr_set_symbols_referenced (ref->u.ar.stride[i]); + } + break; + + case REF_COMPONENT: + break; + + case REF_SUBSTRING: + gfc_expr_set_symbols_referenced (ref->u.ss.start); + gfc_expr_set_symbols_referenced (ref->u.ss.end); + break; + + default: + gcc_unreachable (); + break; + } +} diff --git a/gcc/fortran/f95-lang.c b/gcc/fortran/f95-lang.c index d7bc19b0b4f..a5d11615646 100644 --- a/gcc/fortran/f95-lang.c +++ b/gcc/fortran/f95-lang.c @@ -257,7 +257,8 @@ gfc_truthvalue_conversion (tree expr) if (TREE_CODE (expr) == INTEGER_CST) return integer_zerop (expr) ? boolean_false_node : boolean_true_node; else - return build2 (NE_EXPR, boolean_type_node, expr, integer_zero_node); + return build2 (NE_EXPR, boolean_type_node, expr, + build_int_cst (TREE_TYPE (expr), 0)); default: internal_error ("Unexpected type in truthvalue_conversion"); @@ -772,10 +773,10 @@ build_builtin_fntypes (tree * fntype, tree type) tree tmp; /* type (*) (type) */ - tmp = tree_cons (NULL_TREE, float_type_node, void_list_node); + tmp = tree_cons (NULL_TREE, type, void_list_node); fntype[0] = build_function_type (type, tmp); /* type (*) (type, type) */ - tmp = tree_cons (NULL_TREE, float_type_node, tmp); + tmp = tree_cons (NULL_TREE, type, tmp); fntype[1] = build_function_type (type, tmp); /* type (*) (int, type) */ tmp = tree_cons (NULL_TREE, integer_type_node, void_list_node); diff --git a/gcc/fortran/gfortran.h b/gcc/fortran/gfortran.h index 8787c8f87a0..6e1a4146eb0 100644 --- a/gcc/fortran/gfortran.h +++ b/gcc/fortran/gfortran.h @@ -1,6 +1,6 @@ /* gfortran header file - Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, - Inc. + Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software + Foundation, Inc. Contributed by Andy Vaught This file is part of GCC. @@ -491,17 +491,17 @@ typedef struct ENUM_BITFIELD (ifsrc) if_source:2; ENUM_BITFIELD (procedure_type) proc:3; - + /* Special attributes for Cray pointers, pointees. */ - unsigned cray_pointer:1, cray_pointee:1; + unsigned cray_pointer:1, cray_pointee:1; } symbol_attribute; /* The following three structures are used to identify a location in - the sources. - + the sources. + gfc_file is used to maintain a tree of the source files and how they include each other @@ -509,17 +509,17 @@ symbol_attribute; which file it resides in locus point to the sourceline and the character in the source - line. + line. */ -typedef struct gfc_file +typedef struct gfc_file { struct gfc_file *included_by, *next, *up; int inclusion_line, line; char *filename; } gfc_file; -typedef struct gfc_linebuf +typedef struct gfc_linebuf { #ifdef USE_MAPPED_LOCATION source_location location; @@ -536,7 +536,7 @@ typedef struct gfc_linebuf #define gfc_linebuf_header_size (offsetof (gfc_linebuf, line)) -typedef struct +typedef struct { char *nextc; gfc_linebuf *lb; @@ -570,6 +570,8 @@ typedef struct gfc_charlen struct gfc_expr *length; struct gfc_charlen *next; tree backend_decl; + + int resolved; } gfc_charlen; @@ -785,7 +787,7 @@ typedef struct gfc_common_head int use_assoc, saved; char name[GFC_MAX_SYMBOL_LEN + 1]; struct gfc_symbol *head; -} +} gfc_common_head; #define gfc_get_common_head() gfc_getmem(sizeof(gfc_common_head)) @@ -832,6 +834,16 @@ typedef struct gfc_symtree } gfc_symtree; +/* A linked list of derived types in the namespace. */ +typedef struct gfc_dt_list +{ + struct gfc_symbol *derived; + struct gfc_dt_list *next; +} +gfc_dt_list; + +#define gfc_get_dt_list() gfc_getmem(sizeof(gfc_dt_list)) + /* A namespace describes the contents of procedure, module or interface block. */ @@ -844,7 +856,7 @@ typedef struct gfc_namespace /* Tree containing all the user-defined operators in the namespace. */ gfc_symtree *uop_root; /* Tree containing all the common blocks. */ - gfc_symtree *common_root; + gfc_symtree *common_root; /* If set_flag[letter] is set, an implicit type has been set for letter. */ int set_flag[GFC_LETTERS]; @@ -891,6 +903,9 @@ typedef struct gfc_namespace /* A list of all alternate entry points to this procedure (or NULL). */ gfc_entry_list *entries; + /* A list of all derived types in this procedure (or NULL). */ + gfc_dt_list *derived_types; + /* Set to 1 if namespace is a BLOCK DATA program unit. */ int is_block_data; } @@ -1128,6 +1143,9 @@ typedef struct gfc_expr /* True if it is converted from Hollerith constant. */ unsigned int from_H : 1; + /* True if the expression is a call to a function that returns an array, + and if we have decided not to allocate temporary data for that array. */ + unsigned int inline_noncopying_intrinsic : 1; union { @@ -1308,7 +1326,7 @@ gfc_alloc; typedef struct { gfc_expr *unit, *file, *status, *access, *form, *recl, - *blank, *position, *action, *delim, *pad, *iostat, *iomsg; + *blank, *position, *action, *delim, *pad, *iostat, *iomsg, *convert; gfc_st_label *err; } gfc_open; @@ -1335,7 +1353,7 @@ typedef struct gfc_expr *unit, *file, *iostat, *exist, *opened, *number, *named, *name, *access, *sequential, *direct, *form, *formatted, *unformatted, *recl, *nextrec, *blank, *position, *action, *read, - *write, *readwrite, *delim, *pad, *iolength, *iomsg; + *write, *readwrite, *delim, *pad, *iolength, *iomsg, *convert; gfc_st_label *err; @@ -1352,7 +1370,7 @@ typedef struct gfc_st_label *format_label; gfc_st_label *err, *end, *eor; - locus eor_where, end_where; + locus eor_where, end_where, err_where; } gfc_dt; @@ -1414,7 +1432,7 @@ typedef struct gfc_code ext; /* Points to additional structures required by statement */ /* Backend_decl is used for cycle and break labels in do loops, and - * probably for other constructs as well, once we translate them. */ + probably for other constructs as well, once we translate them. */ tree backend_decl; } gfc_code; @@ -1459,7 +1477,20 @@ typedef struct { char *module_dir; gfc_source_form source_form; - int fixed_line_length; + /* When fixed_line_length or free_line_length are 0, the whole line is used. + + Default is -1, the maximum line length mandated by the respective source + form is used: + for FORM_FREE GFC_MAX_LINE (132) + else 72. + + If fixed_line_length or free_line_length is not 0 nor -1 then the user has + requested a specific line-length. + + If the user requests a fixed_line_length <7 then gfc_init_options() + emits a fatal error. */ + int fixed_line_length; /* maximum line length in fixed-form. */ + int free_line_length; /* maximum line length in free-form. */ int max_identifier_length; int verbose; @@ -1822,6 +1853,7 @@ try gfc_check_assign_symbol (gfc_symbol *, gfc_expr *); gfc_expr *gfc_default_initializer (gfc_typespec *); gfc_expr *gfc_get_variable_expr (gfc_symtree *); +void gfc_expr_set_symbols_referenced (gfc_expr * expr); /* st.c */ extern gfc_code new_st; @@ -1878,6 +1910,7 @@ int gfc_is_compile_time_shape (gfc_array_spec *); /* interface.c -- FIXME: some of these should be in symbol.c */ void gfc_free_interface (gfc_interface *); +int gfc_compare_derived_types (gfc_symbol *, gfc_symbol *); int gfc_compare_types (gfc_typespec *, gfc_typespec *); void gfc_check_interfaces (gfc_namespace *); void gfc_procedure_use (gfc_symbol *, gfc_actual_arglist **, locus *); diff --git a/gcc/fortran/gfortran.texi b/gcc/fortran/gfortran.texi index 92a6d5f4593..b4f1bf95c22 100644 --- a/gcc/fortran/gfortran.texi +++ b/gcc/fortran/gfortran.texi @@ -587,6 +587,7 @@ of extensions, and @option{-std=legacy} allows both without warning. * Implicitly interconvert LOGICAL and INTEGER:: * Hollerith constants support:: * Cray pointers:: +* CONVERT specifier:: @end menu @node Old-style kind specifications @@ -930,6 +931,42 @@ pointees are passed as arguments, they are treated as ordinary variables in the invoked function. Subsequent changes to the pointer will not change the base address of the array that was passed. +@node CONVERT specifier +@section CONVERT specifier +@cindex CONVERT specifier + +gfortran allows the conversion of unformatted data between little- +and big-endian representation to facilitate moving of data +between different systems. The conversion is indicated with +the @code{CONVERT} specifier on the @code{OPEN} statement. + +Valid values for @code{CONVERT} are: +@itemize @w{} +@item @code{CONVERT='NATIVE'} Use the native format. This is the default. +@item @code{CONVERT='SWAP'} Swap between little- and big-endian. +@item @code{CONVERT='LITTLE_ENDIAN'} Use the little-endian format + for unformatted files. +@item @code{CONVERT='BIG_ENDIAN'} Use the big-endian format for + unformatted files. +@end itemize + +Using the option could look like this: +@smallexample + open(file='big.dat',form='unformatted',access='sequential', & + convert='big_endian') +@end smallexample + +The value of the conversion can be queried by using +@code{INQUIRE(CONVERT=ch)}. The values returned are +@code{'BIG_ENDIAN'} and @code{'LITTLE_ENDIAN'}. + +@code{CONVERT} works between big- and little-endian for +@code{INTEGER} values of all supported kinds and for @code{REAL} +on IEEE systems of kinds 4 and 8. Conversion between different +``extended double'' types on different architectures such as +m68k and x86_64, which gfortran +supports as @code{REAL(KIND=10)} will probably not work. + @c --------------------------------------------------------------------- @include intrinsic.texi @c --------------------------------------------------------------------- diff --git a/gcc/fortran/interface.c b/gcc/fortran/interface.c index 5dc6944cafb..e3a13f5d9e4 100644 --- a/gcc/fortran/interface.c +++ b/gcc/fortran/interface.c @@ -320,43 +320,39 @@ gfc_match_end_interface (void) } -/* Compare two typespecs, recursively if necessary. */ +/* Compare two derived types using the criteria in 4.4.2 of the standard, + recursing through gfc_compare_types for the components. */ int -gfc_compare_types (gfc_typespec * ts1, gfc_typespec * ts2) +gfc_compare_derived_types (gfc_symbol * derived1, gfc_symbol * derived2) { gfc_component *dt1, *dt2; - if (ts1->type != ts2->type) - return 0; - if (ts1->type != BT_DERIVED) - return (ts1->kind == ts2->kind); - - /* Compare derived types. */ - if (ts1->derived == ts2->derived) - return 1; - /* Special case for comparing derived types across namespaces. If the true names and module names are the same and the module name is nonnull, then they are equal. */ - if (strcmp (ts1->derived->name, ts2->derived->name) == 0 - && ((ts1->derived->module == NULL && ts2->derived->module == NULL) - || (ts1->derived != NULL && ts2->derived != NULL - && strcmp (ts1->derived->module, ts2->derived->module) == 0))) + if (strcmp (derived1->name, derived2->name) == 0 + && derived1 != NULL && derived2 != NULL + && derived1->module != NULL && derived2->module != NULL + && strcmp (derived1->module, derived2->module) == 0) return 1; /* Compare type via the rules of the standard. Both types must have the SEQUENCE attribute to be equal. */ - if (strcmp (ts1->derived->name, ts2->derived->name)) + if (strcmp (derived1->name, derived2->name)) return 0; - dt1 = ts1->derived->components; - dt2 = ts2->derived->components; + if (derived1->component_access == ACCESS_PRIVATE + || derived2->component_access == ACCESS_PRIVATE) + return 0; - if (ts1->derived->attr.sequence == 0 || ts2->derived->attr.sequence == 0) + if (derived1->attr.sequence == 0 || derived2->attr.sequence == 0) return 0; + dt1 = derived1->components; + dt2 = derived2->components; + /* Since subtypes of SEQUENCE types must be SEQUENCE types as well, a simple test can speed things up. Otherwise, lots of things have to match. */ @@ -389,6 +385,24 @@ gfc_compare_types (gfc_typespec * ts1, gfc_typespec * ts2) return 1; } +/* Compare two typespecs, recursively if necessary. */ + +int +gfc_compare_types (gfc_typespec * ts1, gfc_typespec * ts2) +{ + + if (ts1->type != ts2->type) + return 0; + if (ts1->type != BT_DERIVED) + return (ts1->kind == ts2->kind); + + /* Compare derived types. */ + if (ts1->derived == ts2->derived) + return 1; + + return gfc_compare_derived_types (ts1->derived ,ts2->derived); +} + /* Given two symbols that are formal arguments, compare their ranks and types. Returns nonzero if they have the same rank and type, @@ -1704,6 +1718,7 @@ gfc_extend_expr (gfc_expr * e) e->value.function.actual = actual; e->value.function.esym = NULL; e->value.function.isym = NULL; + e->value.function.name = NULL; if (gfc_pure (NULL) && !gfc_pure (sym)) { diff --git a/gcc/fortran/invoke.texi b/gcc/fortran/invoke.texi index d482b32a54e..5816207d4a6 100644 --- a/gcc/fortran/invoke.texi +++ b/gcc/fortran/invoke.texi @@ -119,6 +119,7 @@ by type. Explanations are in the following sections. -fdollar-ok -fimplicit-none -fmax-identifier-length @gol -std=@var{std} -fd-lines-as-code -fd-lines-as-comments @gol -ffixed-line-length-@var{n} -ffixed-line-length-none @gol +-ffree-line-length-@var{n} -ffree-line-length-none @gol -fdefault-double-8 -fdefault-integer-8 -fdefault-real-8 @gol -fcray-pointer } @@ -251,6 +252,20 @@ to them to fill out the line. @option{-ffixed-line-length-0} means the same thing as @option{-ffixed-line-length-none}. +@cindex -ffree-line-length-@var{n} option +@cindex options, -ffree-line-length-@var{n} +@item -ffree-line-length-@var{n} +@cindex source file format +@cindex lines, length +@cindex length of source lines +@cindex free form +@cindex limits, lengths of source lines +Set column after which characters are ignored in typical free-form +lines in the source file. For free-form, the default value is 132. +@var{n} may be @samp{none}, meaning that the entire line is meaningful. +@option{-ffree-line-length-0} means the same thing as +@option{-ffree-line-length-none}. + @cindex -fmax-identifier-length=@var{n} option @cindex option -fmax-identifier-length=@var{n} @item -fmax-identifier-length=@var{n} diff --git a/gcc/fortran/io.c b/gcc/fortran/io.c index 26c335688fc..e72fe5d01ca 100644 --- a/gcc/fortran/io.c +++ b/gcc/fortran/io.c @@ -78,6 +78,7 @@ static const io_tag tag_s_delim = {"DELIM", " delim = %v", BT_CHARACTER}, tag_s_pad = {"PAD", " pad = %v", BT_CHARACTER}, tag_iolength = {"IOLENGTH", " iolength = %v", BT_INTEGER}, + tag_convert = {"CONVERT", " convert = %e", BT_CHARACTER}, tag_err = {"ERR", " err = %l", BT_UNKNOWN}, tag_end = {"END", " end = %l", BT_UNKNOWN}, tag_eor = {"EOR", " eor = %l", BT_UNKNOWN}; @@ -153,6 +154,20 @@ unget_char (void) use_last_char = 1; } +/* Eat up the spaces and return a character. */ + +static char +next_char_not_space(void) +{ + char c; + do + { + c = next_char (0); + } + while (gfc_is_whitespace (c)); + return c; +} + static int value = 0; /* Simple lexical analyzer for getting the next token in a FORMAT @@ -173,19 +188,15 @@ format_lex (void) return token; } - do - { - c = next_char (0); - } - while (gfc_is_whitespace (c)); - + c = next_char_not_space (); + negative_flag = 0; switch (c) { case '-': negative_flag = 1; case '+': - c = next_char (0); + c = next_char_not_space (); if (!ISDIGIT (c)) { token = FMT_UNKNOWN; @@ -196,7 +207,7 @@ format_lex (void) do { - c = next_char (0); + c = next_char_not_space (); if(ISDIGIT (c)) value = 10 * value + c - '0'; } @@ -226,7 +237,7 @@ format_lex (void) do { - c = next_char (0); + c = next_char_not_space (); if (c != '0') zflag = 0; if (ISDIGIT (c)) @@ -259,7 +270,7 @@ format_lex (void) break; case 'T': - c = next_char (0); + c = next_char_not_space (); if (c != 'L' && c != 'R') unget_char (); @@ -279,7 +290,7 @@ format_lex (void) break; case 'S': - c = next_char (0); + c = next_char_not_space (); if (c != 'P' && c != 'S') unget_char (); @@ -287,7 +298,7 @@ format_lex (void) break; case 'B': - c = next_char (0); + c = next_char_not_space (); if (c == 'N' || c == 'Z') token = FMT_BLANK; else @@ -349,7 +360,7 @@ format_lex (void) break; case 'E': - c = next_char (0); + c = next_char_not_space (); if (c == 'N' || c == 'S') token = FMT_EXT; else @@ -815,6 +826,13 @@ gfc_match_format (void) gfc_expr *e; locus start; + if (gfc_current_ns->proc_name + && gfc_current_ns->proc_name->attr.flavor == FL_MODULE) + { + gfc_error ("Format statement in module main block at %C."); + return MATCH_ERROR; + } + if (gfc_statement_label == NULL) { gfc_error ("Missing format label at %C"); @@ -1045,12 +1063,36 @@ resolve_tag (const io_tag * tag, gfc_expr * e) gfc_error ("%s tag at %L must be scalar", tag->name, &e->where); return FAILURE; } + if (tag == &tag_iomsg) { if (gfc_notify_std (GFC_STD_F2003, "Fortran 2003: IOMSG tag at %L", &e->where) == FAILURE) return FAILURE; } + + if (tag == &tag_iostat && e->ts.kind != gfc_default_integer_kind) + { + if (gfc_notify_std (GFC_STD_GNU, "Fortran 95 requires default " + "INTEGER in IOSTAT tag at %L", + &e->where) == FAILURE) + return FAILURE; + } + + if (tag == &tag_size && e->ts.kind != gfc_default_integer_kind) + { + if (gfc_notify_std (GFC_STD_GNU, "Fortran 95 requires default " + "INTEGER in SIZE tag at %L", + &e->where) == FAILURE) + return FAILURE; + } + + if (tag == &tag_convert) + { + if (gfc_notify_std (GFC_STD_GNU, "Extension: CONVERT tag at %L", + &e->where) == FAILURE) + return FAILURE; + } } return SUCCESS; @@ -1106,6 +1148,9 @@ match_open_element (gfc_open * open) m = match_ltag (&tag_err, &open->err); if (m != MATCH_NO) return m; + m = match_etag (&tag_convert, &open->convert); + if (m != MATCH_NO) + return m; return MATCH_NO; } @@ -1133,6 +1178,7 @@ gfc_free_open (gfc_open * open) gfc_free_expr (open->action); gfc_free_expr (open->delim); gfc_free_expr (open->pad); + gfc_free_expr (open->convert); gfc_free (open); } @@ -1149,6 +1195,7 @@ gfc_resolve_open (gfc_open * open) RESOLVE_TAG (&tag_iostat, open->iostat); RESOLVE_TAG (&tag_file, open->file); RESOLVE_TAG (&tag_status, open->status); + RESOLVE_TAG (&tag_e_access, open->access); RESOLVE_TAG (&tag_e_form, open->form); RESOLVE_TAG (&tag_e_recl, open->recl); @@ -1157,6 +1204,7 @@ gfc_resolve_open (gfc_open * open) RESOLVE_TAG (&tag_e_action, open->action); RESOLVE_TAG (&tag_e_delim, open->delim); RESOLVE_TAG (&tag_e_pad, open->pad); + RESOLVE_TAG (&tag_convert, open->convert); if (gfc_reference_st_label (open->err, ST_LABEL_TARGET) == FAILURE) return FAILURE; @@ -1590,7 +1638,7 @@ match_dt_format (gfc_dt * dt) return MATCH_YES; } - if (gfc_match_st_label (&label, 0) == MATCH_YES) + if (gfc_match_st_label (&label) == MATCH_YES) { if (dt->format_expr != NULL || dt->format_label != NULL) { @@ -1705,6 +1753,8 @@ match_dt_element (io_kind k, gfc_dt * dt) if (m != MATCH_NO) return m; m = match_ltag (&tag_err, &dt->err); + if (m == MATCH_YES) + dt->err_where = gfc_current_locus; if (m != MATCH_NO) return m; m = match_etag (&tag_advance, &dt->advance); @@ -1784,7 +1834,6 @@ gfc_resolve_dt (gfc_dt * dt) return FAILURE; } - /* Sanity checks on data transfer statements. */ if (e->ts.type == BT_CHARACTER) { if (gfc_has_vector_index (e)) @@ -1793,85 +1842,50 @@ gfc_resolve_dt (gfc_dt * dt) &e->where); return FAILURE; } + } - if (dt->rec != NULL) - { - gfc_error ("REC tag at %L is incompatible with internal file", - &dt->rec->where); - return FAILURE; - } - - if (dt->namelist != NULL) - { - gfc_error ("Internal file at %L is incompatible with namelist", - &dt->io_unit->where); - return FAILURE; - } - - if (dt->advance != NULL) - { - gfc_error ("ADVANCE tag at %L is incompatible with internal file", - &dt->advance->where); - return FAILURE; - } + if (e->rank && e->ts.type != BT_CHARACTER) + { + gfc_error ("External IO UNIT cannot be an array at %L", &e->where); + return FAILURE; } - if (dt->rec != NULL) + if (dt->err) { - if (dt->end != NULL) + if (gfc_reference_st_label (dt->err, ST_LABEL_TARGET) == FAILURE) + return FAILURE; + if (dt->err->defined == ST_LABEL_UNKNOWN) { - gfc_error ("REC tag at %L is incompatible with END tag", - &dt->rec->where); + gfc_error ("ERR tag label %d at %L not defined", + dt->err->value, &dt->err_where); return FAILURE; } + } - if (dt->format_label == &format_asterisk) + if (dt->end) + { + if (gfc_reference_st_label (dt->end, ST_LABEL_TARGET) == FAILURE) + return FAILURE; + if (dt->end->defined == ST_LABEL_UNKNOWN) { - gfc_error - ("END tag at %L is incompatible with list directed format (*)", - &dt->end_where); + gfc_error ("END tag label %d at %L not defined", + dt->end->value, &dt->end_where); return FAILURE; } + } - if (dt->namelist != NULL) + if (dt->eor) + { + if (gfc_reference_st_label (dt->eor, ST_LABEL_TARGET) == FAILURE) + return FAILURE; + if (dt->eor->defined == ST_LABEL_UNKNOWN) { - gfc_error ("REC tag at %L is incompatible with namelist", - &dt->rec->where); + gfc_error ("EOR tag label %d at %L not defined", + dt->eor->value, &dt->eor_where); return FAILURE; } } - if (dt->advance != NULL && dt->format_label == &format_asterisk) - { - gfc_error ("ADVANCE tag at %L is incompatible with list directed " - "format (*)", &dt->advance->where); - return FAILURE; - } - - if (dt->eor != 0 && dt->advance == NULL) - { - gfc_error ("EOR tag at %L requires an ADVANCE tag", &dt->eor_where); - return FAILURE; - } - - if (dt->size != NULL && dt->advance == NULL) - { - gfc_error ("SIZE tag at %L requires an ADVANCE tag", &dt->size->where); - return FAILURE; - } - - /* TODO: Make sure the ADVANCE tag is 'yes' or 'no' if it is a string - constant. */ - - if (gfc_reference_st_label (dt->err, ST_LABEL_TARGET) == FAILURE) - return FAILURE; - - if (gfc_reference_st_label (dt->end, ST_LABEL_TARGET) == FAILURE) - return FAILURE; - - if (gfc_reference_st_label (dt->eor, ST_LABEL_TARGET) == FAILURE) - return FAILURE; - /* Check the format label actually exists. */ if (dt->format_label && dt->format_label != &format_asterisk && dt->format_label->defined == ST_LABEL_UNKNOWN) @@ -2158,6 +2172,165 @@ terminate_io (gfc_code * io_code) } +/* Check the constraints for a data transfer statement. The majority of the + constraints appearing in 9.4 of the standard appear here. Some are handled + in resolve_tag and others in gfc_resolve_dt. */ + +static match +check_io_constraints (io_kind k, gfc_dt *dt, gfc_code * io_code, locus * spec_end) +{ +#define io_constraint(condition,msg,arg)\ +if (condition) \ + {\ + gfc_error(msg,arg);\ + m = MATCH_ERROR;\ + } + + match m; + gfc_expr * expr; + gfc_symbol * sym = NULL; + + m = MATCH_YES; + + expr = dt->io_unit; + if (expr && expr->expr_type == EXPR_VARIABLE + && expr->ts.type == BT_CHARACTER) + { + sym = expr->symtree->n.sym; + + io_constraint (k == M_WRITE && sym->attr.intent == INTENT_IN, + "Internal file at %L must not be INTENT(IN)", + &expr->where); + + io_constraint (gfc_has_vector_index (dt->io_unit), + "Internal file incompatible with vector subscript at %L", + &expr->where); + + io_constraint (dt->rec != NULL, + "REC tag at %L is incompatible with internal file", + &dt->rec->where); + + io_constraint (dt->namelist != NULL, + "Internal file at %L is incompatible with namelist", + &expr->where); + + io_constraint (dt->advance != NULL, + "ADVANCE tag at %L is incompatible with internal file", + &dt->advance->where); + } + + if (expr && expr->ts.type != BT_CHARACTER) + { + + io_constraint (gfc_pure (NULL) + && (k == M_READ || k == M_WRITE), + "IO UNIT in %s statement at %C must be " + "an internal file in a PURE procedure", + io_kind_name (k)); + } + + + if (k != M_READ) + { + io_constraint (dt->end, + "END tag not allowed with output at %L", + &dt->end_where); + + io_constraint (dt->eor, + "EOR tag not allowed with output at %L", + &dt->eor_where); + + io_constraint (k != M_READ && dt->size, + "SIZE=specifier not allowed with output at %L", + &dt->size->where); + } + else + { + io_constraint (dt->size && dt->advance == NULL, + "SIZE tag at %L requires an ADVANCE tag", + &dt->size->where); + + io_constraint (dt->eor && dt->advance == NULL, + "EOR tag at %L requires an ADVANCE tag", + &dt->eor_where); + } + + + + if (dt->namelist) + { + io_constraint (io_code && dt->namelist, + "NAMELIST cannot be followed by IO-list at %L", + &io_code->loc); + + io_constraint (dt->format_expr, + "IO spec-list cannot contain both NAMELIST group name " + "and format specification at %L.", + &dt->format_expr->where); + + io_constraint (dt->format_label, + "IO spec-list cannot contain both NAMELIST group name " + "and format label at %L", spec_end); + + io_constraint (dt->rec, + "NAMELIST IO is not allowed with a REC=specifier " + "at %L.", &dt->rec->where); + + io_constraint (dt->advance, + "NAMELIST IO is not allowed with a ADVANCE=specifier " + "at %L.", &dt->advance->where); + } + + if (dt->rec) + { + io_constraint (dt->end, + "An END tag is not allowed with a " + "REC=specifier at %L.", &dt->end_where); + + + io_constraint (dt->format_label == &format_asterisk, + "FMT=* is not allowed with a REC=specifier " + "at %L.", spec_end); + } + + if (dt->advance) + { + const char * advance; + int not_yes, not_no; + expr = dt->advance; + advance = expr->value.character.string; + + io_constraint (dt->format_label == &format_asterisk, + "List directed format(*) is not allowed with a " + "ADVANCE=specifier at %L.", &expr->where); + + not_no = strncasecmp (advance, "no", 2) != 0; + not_yes = strncasecmp (advance, "yes", 2) != 0; + + io_constraint (expr->expr_type == EXPR_CONSTANT + && not_no && not_yes, + "ADVANCE=specifier at %L must have value = " + "YES or NO.", &expr->where); + + io_constraint (dt->size && expr->expr_type == EXPR_CONSTANT + && not_no && k == M_READ, + "SIZE tag at %L requires an ADVANCE = 'NO'", + &dt->size->where); + + io_constraint (dt->eor && expr->expr_type == EXPR_CONSTANT + && not_no && k == M_READ, + "EOR tag at %L requires an ADVANCE = 'NO'", + &dt->eor_where); + } + + expr = dt->format_expr; + if (expr != NULL && expr->expr_type == EXPR_CONSTANT) + check_format_string (expr); + + return m; +} +#undef io_constraint + /* Match a READ, WRITE or PRINT statement. */ static match @@ -2166,12 +2339,13 @@ match_io (io_kind k) char name[GFC_MAX_SYMBOL_LEN + 1]; gfc_code *io_code; gfc_symbol *sym; - gfc_expr *expr; int comma_flag, c; locus where; + locus spec_end; gfc_dt *dt; match m; + where = gfc_current_locus; comma_flag = 0; current_dt = dt = gfc_getmem (sizeof (gfc_dt)); if (gfc_match_char ('(') == MATCH_NO) @@ -2194,12 +2368,6 @@ match_io (io_kind k) m = MATCH_ERROR; goto cleanup; } - if (gfc_match_eos () == MATCH_NO) - { - gfc_error ("Namelist followed by I/O list at %C"); - m = MATCH_ERROR; - goto cleanup; - } dt->io_unit = default_unit (k); dt->namelist = sym; @@ -2298,6 +2466,10 @@ loop: } get_io_list: + + /* Used in check_io_constraints, where no locus is available. */ + spec_end = gfc_current_locus; + /* Optional leading comma (non-standard). */ if (!comma_flag && gfc_match_char (',') == MATCH_YES @@ -2323,33 +2495,12 @@ get_io_list: goto syntax; } - /* A full IO statement has been matched. */ - if (dt->io_unit->expr_type == EXPR_VARIABLE - && k == M_WRITE - && dt->io_unit->ts.type == BT_CHARACTER - && dt->io_unit->symtree->n.sym->attr.intent == INTENT_IN) - { - gfc_error ("Internal file '%s' at %L is INTENT(IN)", - dt->io_unit->symtree->n.sym->name, &dt->io_unit->where); - m = MATCH_ERROR; - goto cleanup; - } + /* A full IO statement has been matched. Check the constraints. spec_end is + supplied for cases where no locus is supplied. */ + m = check_io_constraints (k, dt, io_code, &spec_end); - expr = dt->format_expr; - - if (expr != NULL && expr->expr_type == EXPR_CONSTANT) - check_format_string (expr); - - if (gfc_pure (NULL) - && (k == M_READ || k == M_WRITE) - && dt->io_unit->ts.type != BT_CHARACTER) - { - gfc_error - ("io-unit in %s statement at %C must be an internal file in a " - "PURE procedure", io_kind_name (k)); - m = MATCH_ERROR; - goto cleanup; - } + if (m == MATCH_ERROR) + goto cleanup; new_st.op = (k == M_READ) ? EXEC_READ : EXEC_WRITE; new_st.ext.dt = dt; @@ -2437,6 +2588,7 @@ gfc_free_inquire (gfc_inquire * inquire) gfc_free_expr (inquire->delim); gfc_free_expr (inquire->pad); gfc_free_expr (inquire->iolength); + gfc_free_expr (inquire->convert); gfc_free (inquire); } @@ -2478,6 +2630,7 @@ match_inquire_element (gfc_inquire * inquire) RETM m = match_vtag (&tag_s_delim, &inquire->delim); RETM m = match_vtag (&tag_s_pad, &inquire->pad); RETM m = match_vtag (&tag_iolength, &inquire->iolength); + RETM m = match_vtag (&tag_convert, &inquire->convert); RETM return MATCH_NO; } @@ -2631,6 +2784,7 @@ gfc_resolve_inquire (gfc_inquire * inquire) RESOLVE_TAG (&tag_s_delim, inquire->delim); RESOLVE_TAG (&tag_s_pad, inquire->pad); RESOLVE_TAG (&tag_iolength, inquire->iolength); + RESOLVE_TAG (&tag_convert, inquire->convert); if (gfc_reference_st_label (inquire->err, ST_LABEL_TARGET) == FAILURE) return FAILURE; diff --git a/gcc/fortran/ioparm.def b/gcc/fortran/ioparm.def index 9ca0cf659b1..0fe9a7b45bf 100644 --- a/gcc/fortran/ioparm.def +++ b/gcc/fortran/ioparm.def @@ -25,6 +25,7 @@ IOPARM (open, position, 1 << 13, char1) IOPARM (open, action, 1 << 14, char2) IOPARM (open, delim, 1 << 15, char1) IOPARM (open, pad, 1 << 16, char2) +IOPARM (open, convert, 1 << 17, char1) IOPARM (close, common, 0, common) IOPARM (close, status, 1 << 7, char1) IOPARM (filepos, common, 0, common) @@ -51,6 +52,7 @@ IOPARM (inquire, unformatted, 1 << 25, char1) IOPARM (inquire, read, 1 << 26, char2) IOPARM (inquire, write, 1 << 27, char1) IOPARM (inquire, readwrite, 1 << 28, char2) +IOPARM (inquire, convert, 1 << 29, char1) #ifndef IOPARM_dt_list_format #define IOPARM_dt_list_format (1 << 7) #define IOPARM_dt_namelist_read_mode (1 << 8) diff --git a/gcc/fortran/iresolve.c b/gcc/fortran/iresolve.c index 50f24786c27..9258d2f80f9 100644 --- a/gcc/fortran/iresolve.c +++ b/gcc/fortran/iresolve.c @@ -523,12 +523,24 @@ gfc_resolve_dble (gfc_expr * f, gfc_expr * a) void -gfc_resolve_dim (gfc_expr * f, gfc_expr * x, - gfc_expr * y ATTRIBUTE_UNUSED) +gfc_resolve_dim (gfc_expr * f, gfc_expr * a, gfc_expr * p) { - f->ts = x->ts; + f->ts.type = a->ts.type; + if (p != NULL) + f->ts.kind = gfc_kind_max (a,p); + else + f->ts.kind = a->ts.kind; + + if (p != NULL && a->ts.kind != p->ts.kind) + { + if (a->ts.kind == gfc_kind_max (a,p)) + gfc_convert_type(p, &a->ts, 2); + else + gfc_convert_type(a, &p->ts, 2); + } + f->value.function.name = - gfc_get_string ("__dim_%c%d", gfc_type_letter (x->ts.type), x->ts.kind); + gfc_get_string ("__dim_%c%d", gfc_type_letter (f->ts.type), f->ts.kind); } @@ -1179,23 +1191,47 @@ gfc_resolve_minval (gfc_expr * f, gfc_expr * array, gfc_expr * dim, void -gfc_resolve_mod (gfc_expr * f, gfc_expr * a, - gfc_expr * p ATTRIBUTE_UNUSED) +gfc_resolve_mod (gfc_expr * f, gfc_expr * a, gfc_expr * p) { - f->ts = a->ts; + f->ts.type = a->ts.type; + if (p != NULL) + f->ts.kind = gfc_kind_max (a,p); + else + f->ts.kind = a->ts.kind; + + if (p != NULL && a->ts.kind != p->ts.kind) + { + if (a->ts.kind == gfc_kind_max (a,p)) + gfc_convert_type(p, &a->ts, 2); + else + gfc_convert_type(a, &p->ts, 2); + } + f->value.function.name = - gfc_get_string ("__mod_%c%d", gfc_type_letter (a->ts.type), a->ts.kind); + gfc_get_string ("__mod_%c%d", gfc_type_letter (f->ts.type), f->ts.kind); } void -gfc_resolve_modulo (gfc_expr * f, gfc_expr * a, - gfc_expr * p ATTRIBUTE_UNUSED) +gfc_resolve_modulo (gfc_expr * f, gfc_expr * a, gfc_expr * p) { - f->ts = a->ts; + f->ts.type = a->ts.type; + if (p != NULL) + f->ts.kind = gfc_kind_max (a,p); + else + f->ts.kind = a->ts.kind; + + if (p != NULL && a->ts.kind != p->ts.kind) + { + if (a->ts.kind == gfc_kind_max (a,p)) + gfc_convert_type(p, &a->ts, 2); + else + gfc_convert_type(a, &p->ts, 2); + } + f->value.function.name = - gfc_get_string ("__modulo_%c%d", gfc_type_letter (a->ts.type), - a->ts.kind); + gfc_get_string ("__modulo_%c%d", gfc_type_letter (f->ts.type), + f->ts.kind); } void diff --git a/gcc/fortran/lang.opt b/gcc/fortran/lang.opt index 66f79db3bee..e17bfa54e01 100644 --- a/gcc/fortran/lang.opt +++ b/gcc/fortran/lang.opt @@ -110,11 +110,11 @@ Fortran Use f2c calling convention ffixed-form -Fortran +Fortran RejectNegative Assume that the source file is fixed form ffree-form -Fortran +Fortran RejectNegative Assume that the source file is free form funderscoring @@ -141,6 +141,14 @@ ffixed-line-length- Fortran RejectNegative Joined UInteger -ffixed-line-length- Use n as character line width in fixed mode +ffree-line-length-none +Fortran RejectNegative +Allow arbitrary character line width in free mode + +ffree-line-length- +Fortran RejectNegative Joined UInteger +-ffree-line-length- Use n as character line width in free mode + fmax-identifier-length= Fortran RejectNegative Joined UInteger -fmax-identifier-length= Maximum identifier length diff --git a/gcc/fortran/match.c b/gcc/fortran/match.c index 97e8f5a434f..a07de602fbf 100644 --- a/gcc/fortran/match.c +++ b/gcc/fortran/match.c @@ -141,16 +141,17 @@ gfc_match_eos (void) old-style character length specifications. */ match -gfc_match_small_literal_int (int *value) +gfc_match_small_literal_int (int *value, int *cnt) { locus old_loc; char c; - int i; + int i, j; old_loc = gfc_current_locus; gfc_gobble_whitespace (); c = gfc_next_char (); + *cnt = 0; if (!ISDIGIT (c)) { @@ -159,6 +160,7 @@ gfc_match_small_literal_int (int *value) } i = c - '0'; + j = 1; for (;;) { @@ -169,6 +171,7 @@ gfc_match_small_literal_int (int *value) break; i = 10 * i + c - '0'; + j++; if (i > 99999999) { @@ -180,6 +183,7 @@ gfc_match_small_literal_int (int *value) gfc_current_locus = old_loc; *value = i; + *cnt = j; return MATCH_YES; } @@ -217,25 +221,35 @@ gfc_match_small_int (int *value) do most of the work. */ match -gfc_match_st_label (gfc_st_label ** label, int allow_zero) +gfc_match_st_label (gfc_st_label ** label) { locus old_loc; match m; - int i; + int i, cnt; old_loc = gfc_current_locus; - m = gfc_match_small_literal_int (&i); + m = gfc_match_small_literal_int (&i, &cnt); if (m != MATCH_YES) return m; - if (((i == 0) && allow_zero) || i <= 99999) + if (cnt > 5) { - *label = gfc_get_st_label (i); - return MATCH_YES; + gfc_error ("Too many digits in statement label at %C"); + goto cleanup; + } + + if (i == 0) + { + gfc_error ("Statement label at %C is zero"); + goto cleanup; } - gfc_error ("Statement label at %C is out of range"); + *label = gfc_get_st_label (i); + return MATCH_YES; + +cleanup: + gfc_current_locus = old_loc; return MATCH_ERROR; } @@ -690,7 +704,7 @@ loop: case 'l': label = va_arg (argp, gfc_st_label **); - n = gfc_match_st_label (label, 0); + n = gfc_match_st_label (label); if (n != MATCH_YES) { m = n; @@ -1242,7 +1256,7 @@ gfc_match_do (void) if (gfc_match (" do") != MATCH_YES) return MATCH_NO; - m = gfc_match_st_label (&label, 0); + m = gfc_match_st_label (&label); if (m == MATCH_ERROR) goto cleanup; @@ -1275,7 +1289,7 @@ gfc_match_do (void) gfc_match_label (); /* This won't error */ gfc_match (" do "); /* This will work */ - gfc_match_st_label (&label, 0); /* Can't error out */ + gfc_match_st_label (&label); /* Can't error out */ gfc_match_char (','); /* Optional comma */ m = gfc_match_iterator (&iter, 0); @@ -1404,21 +1418,22 @@ gfc_match_stopcode (gfc_statement st) int stop_code; gfc_expr *e; match m; + int cnt; stop_code = -1; e = NULL; if (gfc_match_eos () != MATCH_YES) { - m = gfc_match_small_literal_int (&stop_code); + m = gfc_match_small_literal_int (&stop_code, &cnt); if (m == MATCH_ERROR) goto cleanup; - if (m == MATCH_YES && stop_code > 99999) - { - gfc_error ("STOP code out of range at %C"); - goto cleanup; - } + if (m == MATCH_YES && cnt > 5) + { + gfc_error ("Too many digits in STOP code at %C"); + goto cleanup; + } if (m == MATCH_NO) { @@ -1585,7 +1600,7 @@ gfc_match_goto (void) do { - m = gfc_match_st_label (&label, 0); + m = gfc_match_st_label (&label); if (m != MATCH_YES) goto syntax; @@ -1631,7 +1646,7 @@ gfc_match_goto (void) do { - m = gfc_match_st_label (&label, 0); + m = gfc_match_st_label (&label); if (m != MATCH_YES) goto syntax; @@ -2489,6 +2504,14 @@ gfc_match_namelist (void) return MATCH_ERROR; } + if (group_name->attr.flavor == FL_NAMELIST + && group_name->attr.use_assoc + && gfc_notify_std (GFC_STD_GNU, "Namelist group name '%s' " + "at %C already is USE associated and can" + "not be respecified.", group_name->name) + == FAILURE) + return MATCH_ERROR; + if (group_name->attr.flavor != FL_NAMELIST && gfc_add_flavor (&group_name->attr, FL_NAMELIST, group_name->name, NULL) == FAILURE) @@ -2506,6 +2529,21 @@ gfc_match_namelist (void) && gfc_add_in_namelist (&sym->attr, sym->name, NULL) == FAILURE) goto error; + /* Use gfc_error_check here, rather than goto error, so that this + these are the only errors for the next two lines. */ + if (sym->as && sym->as->type == AS_ASSUMED_SIZE) + { + gfc_error ("Assumed size array '%s' in namelist '%s'at " + "%C is not allowed.", sym->name, group_name->name); + gfc_error_check (); + } + + if (sym->as && sym->as->type == AS_ASSUMED_SHAPE + && gfc_notify_std (GFC_STD_GNU, "Assumed shape array '%s' in " + "namelist '%s' at %C is an extension.", + sym->name, group_name->name) == FAILURE) + gfc_error_check (); + nl = gfc_get_namelist (); nl->sym = sym; @@ -2596,6 +2634,7 @@ gfc_match_equivalence (void) match m; gfc_common_head *common_head = NULL; bool common_flag; + int cnt; tail = NULL; @@ -2613,6 +2652,7 @@ gfc_match_equivalence (void) set = eq; common_flag = FALSE; + cnt = 0; for (;;) { @@ -2622,6 +2662,9 @@ gfc_match_equivalence (void) if (m == MATCH_NO) goto syntax; + /* count the number of objects. */ + cnt++; + if (gfc_match_char ('%') == MATCH_YES) { gfc_error ("Derived type component %C is not a " @@ -2652,6 +2695,7 @@ gfc_match_equivalence (void) if (gfc_match_char (')') == MATCH_YES) break; + if (gfc_match_char (',') != MATCH_YES) goto syntax; @@ -2659,6 +2703,12 @@ gfc_match_equivalence (void) set = set->eq; } + if (cnt < 2) + { + gfc_error ("EQUIVALENCE at %C requires two or more objects"); + goto cleanup; + } + /* If one of the members of an equivalence is in common, then mark them all as being in common. Before doing this, check that members of the equivalence group are not in different diff --git a/gcc/fortran/match.h b/gcc/fortran/match.h index a698102fb05..1c5115e0b45 100644 --- a/gcc/fortran/match.h +++ b/gcc/fortran/match.h @@ -40,8 +40,8 @@ extern gfc_st_label *gfc_statement_label; /* Generic match subroutines */ match gfc_match_space (void); match gfc_match_eos (void); -match gfc_match_small_literal_int (int *); -match gfc_match_st_label (gfc_st_label **, int); +match gfc_match_small_literal_int (int *, int *); +match gfc_match_st_label (gfc_st_label **); match gfc_match_label (void); match gfc_match_small_int (int *); int gfc_match_strings (mstring *); diff --git a/gcc/fortran/options.c b/gcc/fortran/options.c index a39876b80b5..64fa8a27441 100644 --- a/gcc/fortran/options.c +++ b/gcc/fortran/options.c @@ -46,7 +46,8 @@ gfc_init_options (unsigned int argc ATTRIBUTE_UNUSED, gfc_source_file = NULL; gfc_option.module_dir = NULL; gfc_option.source_form = FORM_UNKNOWN; - gfc_option.fixed_line_length = 72; + gfc_option.fixed_line_length = -1; + gfc_option.free_line_length = -1; gfc_option.max_identifier_length = GFC_MAX_SYMBOL_LEN; gfc_option.verbose = 0; @@ -423,10 +424,28 @@ gfc_handle_option (size_t scode, const char *arg, int value) gfc_option.source_form = FORM_FIXED; break; + case OPT_ffixed_line_length_none: + gfc_option.fixed_line_length = 0; + break; + + case OPT_ffixed_line_length_: + if (value != 0 && value < 7) + gfc_fatal_error ("Fixed line length must be at least seven."); + gfc_option.fixed_line_length = value; + break; + case OPT_ffree_form: gfc_option.source_form = FORM_FREE; break; + case OPT_ffree_line_length_none: + gfc_option.free_line_length = 0; + break; + + case OPT_ffree_line_length_: + gfc_option.free_line_length = value; + break; + case OPT_funderscoring: gfc_option.flag_underscoring = value; break; @@ -459,16 +478,6 @@ gfc_handle_option (size_t scode, const char *arg, int value) gfc_option.flag_repack_arrays = value; break; - case OPT_ffixed_line_length_none: - gfc_option.fixed_line_length = 0; - break; - - case OPT_ffixed_line_length_: - if (value != 0 && value < 7) - gfc_fatal_error ("Fixed line length must be at least seven."); - gfc_option.fixed_line_length = value; - break; - case OPT_fmax_identifier_length_: if (value > GFC_MAX_SYMBOL_LEN) gfc_fatal_error ("Maximum supported idenitifier length is %d", diff --git a/gcc/fortran/parse.c b/gcc/fortran/parse.c index 430d8f3761c..69856db3aaa 100644 --- a/gcc/fortran/parse.c +++ b/gcc/fortran/parse.c @@ -309,7 +309,7 @@ static gfc_statement next_free (void) { match m; - int c, d; + int c, d, cnt; gfc_gobble_whitespace (); @@ -318,30 +318,31 @@ next_free (void) if (ISDIGIT (c)) { /* Found a statement label? */ - m = gfc_match_st_label (&gfc_statement_label, 0); + m = gfc_match_st_label (&gfc_statement_label); d = gfc_peek_char (); if (m != MATCH_YES || !gfc_is_whitespace (d)) { + gfc_match_small_literal_int (&c, &cnt); + + if (cnt > 5) + gfc_error_now ("Too many digits in statement label at %C"); + + if (c == 0) + gfc_error_now ("Statement label at %C is zero"); + do - { - /* Skip the bad statement label. */ - gfc_warning_now ("Ignoring bad statement label at %C"); - c = gfc_next_char (); - } - while (ISDIGIT (c)); + c = gfc_next_char (); + while (ISDIGIT(c)); + + if (!gfc_is_whitespace (c)) + gfc_error_now ("Non-numeric character in statement label at %C"); + } else { label_locus = gfc_current_locus; - if (gfc_statement_label->value == 0) - { - gfc_warning_now ("Ignoring statement label of zero at %C"); - gfc_free_st_label (gfc_statement_label); - gfc_statement_label = NULL; - } - gfc_gobble_whitespace (); if (gfc_match_eos () == MATCH_YES) @@ -463,7 +464,7 @@ next_fixed (void) blank_line: if (digit_flag) - gfc_warning ("Statement label in blank line will be " "ignored at %C"); + gfc_warning ("Statement label in blank line will be ignored at %C"); gfc_advance_line (); return ST_NONE; } @@ -1649,7 +1650,7 @@ parse_where_block (void) case ST_WHERE_BLOCK: parse_where_block (); - /* Fall through */ + break; case ST_ASSIGNMENT: case ST_WHERE: diff --git a/gcc/fortran/primary.c b/gcc/fortran/primary.c index 1cb5d231e4f..b60e0c12834 100644 --- a/gcc/fortran/primary.c +++ b/gcc/fortran/primary.c @@ -40,8 +40,10 @@ match_kind_param (int *kind) gfc_symbol *sym; const char *p; match m; + int cnt; - m = gfc_match_small_literal_int (kind); + /* cnt is unused, here. */ + m = gfc_match_small_literal_int (kind, &cnt); if (m != MATCH_NO) return m; @@ -298,33 +300,46 @@ cleanup: /* Match a binary, octal or hexadecimal constant that can be found in - a DATA statement. */ + a DATA statement. The standard permits b'010...', o'73...', and + z'a1...' where b, o, and z can be capital letters. This function + also accepts postfixed forms of the constants: '01...'b, '73...'o, + and 'a1...'z. An additional extension is the use of x for z. */ static match match_boz_constant (gfc_expr ** result) { - int radix, delim, length, x_hex, kind; - locus old_loc; + int post, radix, delim, length, x_hex, kind; + locus old_loc, start_loc; char *buffer; gfc_expr *e; - old_loc = gfc_current_locus; + start_loc = old_loc = gfc_current_locus; gfc_gobble_whitespace (); x_hex = 0; - switch (gfc_next_char ()) + switch (post = gfc_next_char ()) { case 'b': radix = 2; + post = 0; break; case 'o': radix = 8; + post = 0; break; case 'x': x_hex = 1; /* Fall through. */ case 'z': radix = 16; + post = 0; + break; + case '\'': + /* Fall through. */ + case '\"': + delim = post; + post = 1; + radix = 16; /* Set to accept any valid digit string. */ break; default: goto backup; @@ -332,7 +347,9 @@ match_boz_constant (gfc_expr ** result) /* No whitespace allowed here. */ - delim = gfc_next_char (); + if (post == 0) + delim = gfc_next_char (); + if (delim != '\'' && delim != '\"') goto backup; @@ -347,40 +364,36 @@ match_boz_constant (gfc_expr ** result) length = match_digits (0, radix, NULL); if (length == -1) { - switch (radix) - { - case 2: - gfc_error ("Empty set of digits in binary constant at %C"); - break; - case 8: - gfc_error ("Empty set of digits in octal constant at %C"); - break; - case 16: - gfc_error ("Empty set of digits in hexadecimal constant at %C"); - break; - default: - gcc_unreachable (); - } + gfc_error ("Empty set of digits in BOZ constant at %C"); return MATCH_ERROR; } if (gfc_next_char () != delim) { - switch (radix) - { - case 2: - gfc_error ("Illegal character in binary constant at %C"); + gfc_error ("Illegal character in BOZ constant at %C"); + return MATCH_ERROR; + } + + if (post == 1) + { + switch (gfc_next_char ()) + { + case 'b': + radix = 2; break; - case 8: - gfc_error ("Illegal character in octal constant at %C"); + case 'o': + radix = 8; break; - case 16: - gfc_error ("Illegal character in hexadecimal constant at %C"); + case 'x': + /* Fall through. */ + case 'z': + radix = 16; break; default: - gcc_unreachable (); + goto backup; } - return MATCH_ERROR; + gfc_notify_std (GFC_STD_GNU, "Extension: BOZ constant " + "at %C uses non-standard postfix syntax."); } gfc_current_locus = old_loc; @@ -389,8 +402,9 @@ match_boz_constant (gfc_expr ** result) memset (buffer, '\0', length + 1); match_digits (0, radix, buffer); - gfc_next_char (); /* Eat delimiter. */ - + gfc_next_char (); /* Eat delimiter. */ + if (post == 1) + gfc_next_char (); /* Eat postfixed b, o, z, or x. */ /* In section 5.2.5 and following C567 in the Fortran 2003 standard, we find "If a data-stmt-constant is a boz-literal-constant, the corresponding @@ -405,7 +419,6 @@ match_boz_constant (gfc_expr ** result) if (gfc_range_check (e) != ARITH_OK) { gfc_error ("Integer too big for integer kind %i at %C", kind); - gfc_free_expr (e); return MATCH_ERROR; } @@ -414,7 +427,7 @@ match_boz_constant (gfc_expr ** result) return MATCH_YES; backup: - gfc_current_locus = old_loc; + gfc_current_locus = start_loc; return MATCH_NO; } @@ -955,6 +968,13 @@ got_delim: length++; } + /* Peek at the next character to see if it is a b, o, z, or x for the + postfixed BOZ literal constants. */ + c = gfc_peek_char (); + if (c == 'b' || c == 'o' || c =='z' || c == 'x') + goto no_match; + + e = gfc_get_expr (); e->expr_type = EXPR_CONSTANT; @@ -1456,7 +1476,7 @@ gfc_match_actual_arglist (int sub_flag, gfc_actual_arglist ** argp) if (sub_flag && gfc_match_char ('*') == MATCH_YES) { - m = gfc_match_st_label (&label, 0); + m = gfc_match_st_label (&label); if (m == MATCH_NO) gfc_error ("Expected alternate return label at %C"); if (m != MATCH_YES) diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c index 26e01cb9a3c..0993f91391c 100644 --- a/gcc/fortran/resolve.c +++ b/gcc/fortran/resolve.c @@ -1,5 +1,6 @@ /* Perform type resolution on the various stuctures. - Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. + Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, + Inc. Contributed by Andy Vaught This file is part of GCC. @@ -24,6 +25,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor,Boston, MA #include "system.h" #include "gfortran.h" #include "arith.h" /* For gfc_compare_expr(). */ +#include "dependency.h" /* Types used in equivalence statements. */ @@ -136,16 +138,6 @@ resolve_formal_arglist (gfc_symbol * proc) { if (!sym->attr.function || sym->result == sym) gfc_set_default_type (sym, 1, sym->ns); - else - { - /* Set the type of the RESULT, then copy. */ - if (sym->result->ts.type == BT_UNKNOWN) - gfc_set_default_type (sym->result, 1, sym->result->ns); - - sym->ts = sym->result->ts; - if (sym->as == NULL) - sym->as = gfc_copy_array_spec (sym->result->as); - } } gfc_resolve_array_spec (sym->as, 0); @@ -297,7 +289,7 @@ resolve_contained_fntype (gfc_symbol * sym, gfc_namespace * ns) /*Fortran 95 Draft Standard, page 51, Section 5.1.1.5, on the Character type, lists the only ways a character length value of * can be used: dummy arguments - of proceedures, named constants, and function results in external functions. + of procedures, named constants, and function results in external functions. Internal function results are not on that list; ergo, not permitted. */ if (sym->ts.type == BT_CHARACTER) @@ -597,9 +589,18 @@ resolve_structure_cons (gfc_expr * expr) /* If we don't have the right type, try to convert it. */ - if (!gfc_compare_types (&cons->expr->ts, &comp->ts) - && gfc_convert_type (cons->expr, &comp->ts, 1) == FAILURE) - t = FAILURE; + if (!gfc_compare_types (&cons->expr->ts, &comp->ts)) + { + t = FAILURE; + if (comp->pointer && cons->expr->ts.type != BT_UNKNOWN) + gfc_error ("The element in the derived type constructor at %L, " + "for pointer component '%s', is %s but should be %s", + &cons->expr->where, comp->name, + gfc_basic_typename (cons->expr->ts.type), + gfc_basic_typename (comp->ts.type)); + else + t = gfc_convert_type (cons->expr, &comp->ts, 1); + } } return t; @@ -695,6 +696,69 @@ procedure_kind (gfc_symbol * sym) return PTYPE_UNKNOWN; } +/* Check references to assumed size arrays. The flag need_full_assumed_size + is non-zero when matching actual arguments. */ + +static int need_full_assumed_size = 0; + +static bool +check_assumed_size_reference (gfc_symbol * sym, gfc_expr * e) +{ + gfc_ref * ref; + int dim; + int last = 1; + + if (need_full_assumed_size + || !(sym->as && sym->as->type == AS_ASSUMED_SIZE)) + return false; + + for (ref = e->ref; ref; ref = ref->next) + if (ref->type == REF_ARRAY) + for (dim = 0; dim < ref->u.ar.as->rank; dim++) + last = (ref->u.ar.end[dim] == NULL) && (ref->u.ar.type == DIMEN_ELEMENT); + + if (last) + { + gfc_error ("The upper bound in the last dimension must " + "appear in the reference to the assumed size " + "array '%s' at %L.", sym->name, &e->where); + return true; + } + return false; +} + + +/* Look for bad assumed size array references in argument expressions + of elemental and array valued intrinsic procedures. Since this is + called from procedure resolution functions, it only recurses at + operators. */ + +static bool +resolve_assumed_size_actual (gfc_expr *e) +{ + if (e == NULL) + return false; + + switch (e->expr_type) + { + case EXPR_VARIABLE: + if (e->symtree + && check_assumed_size_reference (e->symtree->n.sym, e)) + return true; + break; + + case EXPR_OP: + if (resolve_assumed_size_actual (e->value.op.op1) + || resolve_assumed_size_actual (e->value.op.op2)) + return true; + break; + + default: + break; + } + return false; +} + /* Resolve an actual argument list. Most of the time, this is just resolving the expressions in the list. @@ -804,6 +868,24 @@ resolve_actual_arglist (gfc_actual_arglist * arg) } +/* Go through each actual argument in ACTUAL and see if it can be + implemented as an inlined, non-copying intrinsic. FNSYM is the + function being called, or NULL if not known. */ + +static void +find_noncopying_intrinsics (gfc_symbol * fnsym, gfc_actual_arglist * actual) +{ + gfc_actual_arglist *ap; + gfc_expr *expr; + + for (ap = actual; ap; ap = ap->next) + if (ap->expr + && (expr = gfc_get_noncopying_intrinsic_argument (ap->expr)) + && !gfc_check_fncall_dependency (expr, INTENT_IN, fnsym, actual)) + ap->expr->inline_noncopying_intrinsic = 1; +} + + /************* Function resolution *************/ /* Resolve a function call known to be generic. @@ -1073,10 +1155,18 @@ resolve_function (gfc_expr * expr) gfc_actual_arglist *arg; const char *name; try t; + int temp; + + /* Switch off assumed size checking and do this again for certain kinds + of procedure, once the procedure itself is resolved. */ + need_full_assumed_size++; if (resolve_actual_arglist (expr->value.function.actual) == FAILURE) return FAILURE; + /* Resume assumed_size checking. */ + need_full_assumed_size--; + /* See if function is already resolved. */ if (expr->value.function.name != NULL) @@ -1114,15 +1204,16 @@ resolve_function (gfc_expr * expr) if (expr->expr_type != EXPR_FUNCTION) return t; + temp = need_full_assumed_size; + need_full_assumed_size = 0; + if (expr->value.function.actual != NULL && ((expr->value.function.esym != NULL && expr->value.function.esym->attr.elemental) || (expr->value.function.isym != NULL && expr->value.function.isym->elemental))) { - /* The rank of an elemental is the rank of its array argument(s). */ - for (arg = expr->value.function.actual; arg; arg = arg->next) { if (arg->expr != NULL && arg->expr->rank > 0) @@ -1131,8 +1222,45 @@ resolve_function (gfc_expr * expr) break; } } + + /* Being elemental, the last upper bound of an assumed size array + argument must be present. */ + for (arg = expr->value.function.actual; arg; arg = arg->next) + { + if (arg->expr != NULL + && arg->expr->rank > 0 + && resolve_assumed_size_actual (arg->expr)) + return FAILURE; + } + } + + else if (expr->value.function.actual != NULL + && expr->value.function.isym != NULL + && strcmp (expr->value.function.isym->name, "lbound")) + { + /* Array instrinsics must also have the last upper bound of an + asumed size array argument. UBOUND and SIZE have to be + excluded from the check if the second argument is anything + than a constant. */ + int inquiry; + inquiry = strcmp (expr->value.function.isym->name, "ubound") == 0 + || strcmp (expr->value.function.isym->name, "size") == 0; + + for (arg = expr->value.function.actual; arg; arg = arg->next) + { + if (inquiry && arg->next != NULL && arg->next->expr + && arg->next->expr->expr_type != EXPR_CONSTANT) + break; + + if (arg->expr != NULL + && arg->expr->rank > 0 + && resolve_assumed_size_actual (arg->expr)) + return FAILURE; + } } + need_full_assumed_size = temp; + if (!pure_function (expr, &name)) { if (forall_flag) @@ -1150,6 +1278,19 @@ resolve_function (gfc_expr * expr) } } + /* Character lengths of use associated functions may contains references to + symbols not referenced from the current program unit otherwise. Make sure + those symbols are marked as referenced. */ + + if (expr->ts.type == BT_CHARACTER && expr->value.function.esym + && expr->value.function.esym->attr.use_assoc) + { + gfc_expr_set_symbols_referenced (expr->ts.cl->length); + } + + if (t == SUCCESS) + find_noncopying_intrinsics (expr->value.function.esym, + expr->value.function.actual); return t; } @@ -1369,30 +1510,54 @@ resolve_call (gfc_code * c) { try t; + /* Switch off assumed size checking and do this again for certain kinds + of procedure, once the procedure itself is resolved. */ + need_full_assumed_size++; + if (resolve_actual_arglist (c->ext.actual) == FAILURE) return FAILURE; - if (c->resolved_sym != NULL) - return SUCCESS; + /* Resume assumed_size checking. */ + need_full_assumed_size--; - switch (procedure_kind (c->symtree->n.sym)) - { - case PTYPE_GENERIC: - t = resolve_generic_s (c); - break; - case PTYPE_SPECIFIC: - t = resolve_specific_s (c); - break; + t = SUCCESS; + if (c->resolved_sym == NULL) + switch (procedure_kind (c->symtree->n.sym)) + { + case PTYPE_GENERIC: + t = resolve_generic_s (c); + break; - case PTYPE_UNKNOWN: - t = resolve_unknown_s (c); - break; + case PTYPE_SPECIFIC: + t = resolve_specific_s (c); + break; - default: - gfc_internal_error ("resolve_subroutine(): bad function type"); + case PTYPE_UNKNOWN: + t = resolve_unknown_s (c); + break; + + default: + gfc_internal_error ("resolve_subroutine(): bad function type"); + } + + if (c->ext.actual != NULL + && c->symtree->n.sym->attr.elemental) + { + gfc_actual_arglist * a; + /* Being elemental, the last upper bound of an assumed size array + argument must be present. */ + for (a = c->ext.actual; a; a = a->next) + { + if (a->expr != NULL + && a->expr->rank > 0 + && resolve_assumed_size_actual (a->expr)) + return FAILURE; + } } + if (t == SUCCESS) + find_noncopying_intrinsics (c->resolved_sym, c->ext.actual); return t; } @@ -2317,6 +2482,9 @@ resolve_variable (gfc_expr * e) e->ts = sym->ts; } + if (check_assumed_size_reference (sym, e)) + return FAILURE; + return SUCCESS; } @@ -2488,7 +2656,9 @@ gfc_resolve_iterator (gfc_iterator * iter, bool real_ok) } -/* Resolve a list of FORALL iterators. */ +/* Resolve a list of FORALL iterators. The FORALL index-name is constrained + to be a scalar INTEGER variable. The subscripts and stride are scalar + INTEGERs, and if stride is a constant it must be nonzero. */ static void resolve_forall_iterators (gfc_forall_iterator * iter) @@ -2497,28 +2667,35 @@ resolve_forall_iterators (gfc_forall_iterator * iter) while (iter) { if (gfc_resolve_expr (iter->var) == SUCCESS - && iter->var->ts.type != BT_INTEGER) - gfc_error ("FORALL Iteration variable at %L must be INTEGER", + && (iter->var->ts.type != BT_INTEGER || iter->var->rank != 0)) + gfc_error ("FORALL index-name at %L must be a scalar INTEGER", &iter->var->where); if (gfc_resolve_expr (iter->start) == SUCCESS - && iter->start->ts.type != BT_INTEGER) - gfc_error ("FORALL start expression at %L must be INTEGER", + && (iter->start->ts.type != BT_INTEGER || iter->start->rank != 0)) + gfc_error ("FORALL start expression at %L must be a scalar INTEGER", &iter->start->where); if (iter->var->ts.kind != iter->start->ts.kind) gfc_convert_type (iter->start, &iter->var->ts, 2); if (gfc_resolve_expr (iter->end) == SUCCESS - && iter->end->ts.type != BT_INTEGER) - gfc_error ("FORALL end expression at %L must be INTEGER", + && (iter->end->ts.type != BT_INTEGER || iter->end->rank != 0)) + gfc_error ("FORALL end expression at %L must be a scalar INTEGER", &iter->end->where); if (iter->var->ts.kind != iter->end->ts.kind) gfc_convert_type (iter->end, &iter->var->ts, 2); - if (gfc_resolve_expr (iter->stride) == SUCCESS - && iter->stride->ts.type != BT_INTEGER) - gfc_error ("FORALL Stride expression at %L must be INTEGER", - &iter->stride->where); + if (gfc_resolve_expr (iter->stride) == SUCCESS) + { + if (iter->stride->ts.type != BT_INTEGER || iter->stride->rank != 0) + gfc_error ("FORALL stride expression at %L must be a scalar %s", + &iter->stride->where, "INTEGER"); + + if (iter->stride->expr_type == EXPR_CONSTANT + && mpz_cmp_ui(iter->stride->value.integer, 0) == 0) + gfc_error ("FORALL stride expression at %L cannot be zero", + &iter->stride->where); + } if (iter->var->ts.kind != iter->stride->ts.kind) gfc_convert_type (iter->stride, &iter->var->ts, 2); @@ -4187,6 +4364,60 @@ resolve_values (gfc_symbol * sym) } +/* Resolve a charlen structure. */ + +static try +resolve_charlen (gfc_charlen *cl) +{ + if (cl->resolved) + return SUCCESS; + + cl->resolved = 1; + + if (gfc_resolve_expr (cl->length) == FAILURE) + return FAILURE; + + if (gfc_simplify_expr (cl->length, 0) == FAILURE) + return FAILURE; + + if (gfc_specification_expr (cl->length) == FAILURE) + return FAILURE; + + return SUCCESS; +} + + +/* Resolve the components of a derived type. */ + +static try +resolve_derived (gfc_symbol *sym) +{ + gfc_component *c; + + for (c = sym->components; c != NULL; c = c->next) + { + if (c->ts.type == BT_CHARACTER) + { + if (resolve_charlen (c->ts.cl) == FAILURE) + return FAILURE; + + if (c->ts.cl->length == NULL + || !gfc_is_constant_expr (c->ts.cl->length)) + { + gfc_error ("Character length of component '%s' needs to " + "be a constant specification expression at %L.", + c->name, + c->ts.cl->length ? &c->ts.cl->length->where : &c->loc); + return FAILURE; + } + } + + /* TODO: Anything else that should be done here? */ + } + + return SUCCESS; +} + /* Do anything necessary to resolve a symbol. Right now, we just assume that an otherwise unknown symbol is a variable. This sort of thing commonly happens for symbols in module. */ @@ -4239,6 +4470,9 @@ resolve_symbol (gfc_symbol * sym) } } + if (sym->attr.flavor == FL_DERIVED && resolve_derived (sym) == FAILURE) + return; + /* Symbols that are module procedures with results (functions) have the types and array specification copied for type checking in procedures that call them, as well as for saving to a module @@ -4565,6 +4799,17 @@ resolve_symbol (gfc_symbol * sym) } break; + case FL_DERIVED: + /* Add derived type to the derived type list. */ + { + gfc_dt_list * dt_list; + dt_list = gfc_get_dt_list (); + dt_list->next = sym->ns->derived_types; + dt_list->derived = sym; + sym->ns->derived_types = dt_list; + } + break; + default: /* An external symbol falls through to here if it is not referenced. */ @@ -5379,6 +5624,15 @@ resolve_fntype (gfc_namespace * ns) sym->attr.untyped = 1; } + if (sym->ts.type == BT_DERIVED && !sym->ts.derived->attr.use_assoc + && !gfc_check_access (sym->ts.derived->attr.access, + sym->ts.derived->ns->default_access) + && gfc_check_access (sym->attr.access, sym->ns->default_access)) + { + gfc_error ("PUBLIC function '%s' at %L cannot be of PRIVATE type '%s'", + sym->name, &sym->declared_at, sym->ts.derived->name); + } + if (ns->entries) for (el = ns->entries->next; el; el = el->next) { @@ -5434,16 +5688,7 @@ gfc_resolve (gfc_namespace * ns) gfc_check_interfaces (ns); for (cl = ns->cl_list; cl; cl = cl->next) - { - if (cl->length == NULL || gfc_resolve_expr (cl->length) == FAILURE) - continue; - - if (gfc_simplify_expr (cl->length, 0) == FAILURE) - continue; - - if (gfc_specification_expr (cl->length) == FAILURE) - continue; - } + resolve_charlen (cl); gfc_traverse_ns (ns, resolve_values); diff --git a/gcc/fortran/scanner.c b/gcc/fortran/scanner.c index 883576166ff..0b21e96497e 100644 --- a/gcc/fortran/scanner.c +++ b/gcc/fortran/scanner.c @@ -694,7 +694,7 @@ gfc_gobble_whitespace (void) In fixed mode, we expand a tab that occurs within the statement label region to expand to spaces that leave the next character in the source region. - load_line returns wether the line was truncated. */ + load_line returns whether the line was truncated. */ static int load_line (FILE * input, char **pbuf, int *pbuflen) @@ -703,11 +703,25 @@ load_line (FILE * input, char **pbuf, int *pbuflen) int trunc_flag = 0; char *buffer; - /* Determine the maximum allowed line length. */ + /* Determine the maximum allowed line length. + The default for free-form is GFC_MAX_LINE, for fixed-form or for + unknown form it is 72. Refer to the documentation in gfc_option_t. */ if (gfc_current_form == FORM_FREE) - maxlen = GFC_MAX_LINE; + { + if (gfc_option.free_line_length == -1) + maxlen = GFC_MAX_LINE; + else + maxlen = gfc_option.free_line_length; + } + else if (gfc_current_form == FORM_FIXED) + { + if (gfc_option.fixed_line_length == -1) + maxlen = 72; + else + maxlen = gfc_option.fixed_line_length; + } else - maxlen = gfc_option.fixed_line_length; + maxlen = 72; if (*pbuf == NULL) { @@ -778,7 +792,7 @@ load_line (FILE * input, char **pbuf, int *pbuflen) } } else if (i >= maxlen) - { + { /* Truncate the rest of the line. */ for (;;) { @@ -795,11 +809,13 @@ load_line (FILE * input, char **pbuf, int *pbuflen) /* Pad lines to the selected line length in fixed form. */ if (gfc_current_form == FORM_FIXED - && gfc_option.fixed_line_length > 0 + && gfc_option.fixed_line_length != 0 && !preprocessor_flag && c != EOF) - while (i++ < gfc_option.fixed_line_length) - *buffer++ = ' '; + { + while (i++ < maxlen) + *buffer++ = ' '; + } *buffer = '\0'; *pbuflen = buflen; @@ -1055,7 +1071,7 @@ load_file (const char *filename, bool initial) line = NULL; line_len = 0; - for (;;) + for (;;) { int trunc = load_line (input, &line, &line_len); diff --git a/gcc/fortran/simplify.c b/gcc/fortran/simplify.c index b6931f112e1..894903bdd2e 100644 --- a/gcc/fortran/simplify.c +++ b/gcc/fortran/simplify.c @@ -1,6 +1,6 @@ /* Simplify intrinsic functions at compile-time. - Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, - Inc. + Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software + Foundation, Inc. Contributed by Andy Vaught & Katherine Holcomb This file is part of GCC. @@ -662,7 +662,7 @@ gfc_simplify_char (gfc_expr * e, gfc_expr * k) if (e->expr_type != EXPR_CONSTANT) return NULL; - if (gfc_extract_int (e, &c) != NULL || c < 0 || c > 255) + if (gfc_extract_int (e, &c) != NULL || c < 0 || c > UCHAR_MAX) { gfc_error ("Bad character in CHAR function at %L", &e->where); return &gfc_bad_expr; @@ -920,11 +920,13 @@ gfc_expr * gfc_simplify_dim (gfc_expr * x, gfc_expr * y) { gfc_expr *result; + int kind; if (x->expr_type != EXPR_CONSTANT || y->expr_type != EXPR_CONSTANT) return NULL; - result = gfc_constant_result (x->ts.type, x->ts.kind, &x->where); + kind = x->ts.kind > y->ts.kind ? x->ts.kind : y->ts.kind; + result = gfc_constant_result (x->ts.type, kind, &x->where); switch (x->ts.type) { @@ -1346,6 +1348,9 @@ gfc_simplify_ibset (gfc_expr * x, gfc_expr * y) result = gfc_copy_expr (x); mpz_setbit (result->value.integer, pos); + + twos_complement (result->value.integer, gfc_integer_kinds[k].bit_size); + return range_check (result, "IBSET"); } @@ -1365,9 +1370,9 @@ gfc_simplify_ichar (gfc_expr * e) return &gfc_bad_expr; } - index = (int) e->value.character.string[0]; + index = (unsigned char) e->value.character.string[0]; - if (index < CHAR_MIN || index > CHAR_MAX) + if (index < 0 || index > UCHAR_MAX) { gfc_error ("Argument of ICHAR at %L out of range of this processor", &e->where); @@ -2250,11 +2255,13 @@ gfc_simplify_mod (gfc_expr * a, gfc_expr * p) { gfc_expr *result; mpfr_t quot, iquot, term; + int kind; if (a->expr_type != EXPR_CONSTANT || p->expr_type != EXPR_CONSTANT) return NULL; - result = gfc_constant_result (a->ts.type, a->ts.kind, &a->where); + kind = a->ts.kind > p->ts.kind ? a->ts.kind : p->ts.kind; + result = gfc_constant_result (a->ts.type, kind, &a->where); switch (a->ts.type) { @@ -2278,7 +2285,7 @@ gfc_simplify_mod (gfc_expr * a, gfc_expr * p) return &gfc_bad_expr; } - gfc_set_model_kind (a->ts.kind); + gfc_set_model_kind (kind); mpfr_init (quot); mpfr_init (iquot); mpfr_init (term); @@ -2306,11 +2313,13 @@ gfc_simplify_modulo (gfc_expr * a, gfc_expr * p) { gfc_expr *result; mpfr_t quot, iquot, term; + int kind; if (a->expr_type != EXPR_CONSTANT || p->expr_type != EXPR_CONSTANT) return NULL; - result = gfc_constant_result (a->ts.type, a->ts.kind, &a->where); + kind = a->ts.kind > p->ts.kind ? a->ts.kind : p->ts.kind; + result = gfc_constant_result (a->ts.type, kind, &a->where); switch (a->ts.type) { @@ -2336,7 +2345,7 @@ gfc_simplify_modulo (gfc_expr * a, gfc_expr * p) return &gfc_bad_expr; } - gfc_set_model_kind (a->ts.kind); + gfc_set_model_kind (kind); mpfr_init (quot); mpfr_init (iquot); mpfr_init (term); @@ -2508,6 +2517,8 @@ gfc_simplify_not (gfc_expr * e) mpz_and (result->value.integer, result->value.integer, gfc_integer_kinds[i].max_int); + twos_complement (result->value.integer, gfc_integer_kinds[i].bit_size); + return range_check (result, "NOT"); } diff --git a/gcc/fortran/symbol.c b/gcc/fortran/symbol.c index 6274ea919a1..5f97b54c09e 100644 --- a/gcc/fortran/symbol.c +++ b/gcc/fortran/symbol.c @@ -1471,21 +1471,25 @@ gfc_get_component_attr (symbol_attribute * attr, gfc_component * c) occurs. */ void -gfc_free_st_label (gfc_st_label * l) +gfc_free_st_label (gfc_st_label * label) { - if (l == NULL) + if (label == NULL) return; - if (l->prev) - (l->prev->next = l->next); + if (label->prev) + label->prev->next = label->next; - if (l->next) - (l->next->prev = l->prev); + if (label->next) + label->next->prev = label->prev; - if (l->format != NULL) - gfc_free_expr (l->format); - gfc_free (l); + if (gfc_current_ns->st_labels == label) + gfc_current_ns->st_labels = label->next; + + if (label->format != NULL) + gfc_free_expr (label->format); + + gfc_free (label); } /* Free a whole list of gfc_st_label structures. */ @@ -2305,6 +2309,21 @@ free_sym_tree (gfc_symtree * sym_tree) } +/* Free a derived type list. */ + +static void +gfc_free_dt_list (gfc_dt_list * dt) +{ + gfc_dt_list *n; + + for (; dt; dt = n) + { + n = dt->next; + gfc_free (dt); + } +} + + /* Free a namespace structure and everything below it. Interface lists associated with intrinsic operators are not freed. These are taken care of when a specific name is freed. */ @@ -2341,6 +2360,8 @@ gfc_free_namespace (gfc_namespace * ns) gfc_free_equiv (ns->equiv); + gfc_free_dt_list (ns->derived_types); + for (i = GFC_INTRINSIC_BEGIN; i != GFC_INTRINSIC_END; i++) gfc_free_interface (ns->operator[i]); diff --git a/gcc/fortran/trans-array.c b/gcc/fortran/trans-array.c index 72669f8ac3f..dccafcc4ee0 100644 --- a/gcc/fortran/trans-array.c +++ b/gcc/fortran/trans-array.c @@ -188,7 +188,7 @@ gfc_conv_descriptor_data_addr (tree desc) gcc_assert (DATA_FIELD == 0); t = build3 (COMPONENT_REF, TREE_TYPE (field), desc, field, NULL_TREE); - return gfc_build_addr_expr (NULL, t); + return build_fold_addr_expr (t); } tree @@ -519,7 +519,7 @@ gfc_trans_allocate_array_storage (stmtblock_t * pre, stmtblock_t * post, tmp = build_array_type (gfc_get_element_type (TREE_TYPE (desc)), tmp); tmp = gfc_create_var (tmp, "A"); - tmp = gfc_build_addr_expr (NULL, tmp); + tmp = build_fold_addr_expr (tmp); gfc_conv_descriptor_data_set (pre, desc, tmp); } else @@ -533,7 +533,7 @@ gfc_trans_allocate_array_storage (stmtblock_t * pre, stmtblock_t * post, tmp = gfor_fndecl_internal_malloc64; else gcc_unreachable (); - tmp = gfc_build_function_call (tmp, args); + tmp = build_function_call_expr (tmp, args); tmp = gfc_evaluate_now (tmp, pre); gfc_conv_descriptor_data_set (pre, desc, tmp); } @@ -551,7 +551,7 @@ gfc_trans_allocate_array_storage (stmtblock_t * pre, stmtblock_t * post, tmp = gfc_conv_descriptor_data_get (desc); tmp = fold_convert (pvoid_type_node, tmp); tmp = gfc_chainon_list (NULL_TREE, tmp); - tmp = gfc_build_function_call (gfor_fndecl_internal_free, tmp); + tmp = build_function_call_expr (gfor_fndecl_internal_free, tmp); gfc_add_expr_to_block (post, tmp); } } @@ -673,6 +673,95 @@ gfc_trans_allocate_temp_array (stmtblock_t * pre, stmtblock_t * post, } +/* Generate code to transpose array EXPR by creating a new descriptor + in which the dimension specifications have been reversed. */ + +void +gfc_conv_array_transpose (gfc_se * se, gfc_expr * expr) +{ + tree dest, src, dest_index, src_index; + gfc_loopinfo *loop; + gfc_ss_info *dest_info, *src_info; + gfc_ss *dest_ss, *src_ss; + gfc_se src_se; + int n; + + loop = se->loop; + + src_ss = gfc_walk_expr (expr); + dest_ss = se->ss; + + src_info = &src_ss->data.info; + dest_info = &dest_ss->data.info; + + /* Get a descriptor for EXPR. */ + gfc_init_se (&src_se, NULL); + gfc_conv_expr_descriptor (&src_se, expr, src_ss); + gfc_add_block_to_block (&se->pre, &src_se.pre); + gfc_add_block_to_block (&se->post, &src_se.post); + src = src_se.expr; + + /* Allocate a new descriptor for the return value. */ + dest = gfc_create_var (TREE_TYPE (src), "atmp"); + dest_info->descriptor = dest; + se->expr = dest; + + /* Copy across the dtype field. */ + gfc_add_modify_expr (&se->pre, + gfc_conv_descriptor_dtype (dest), + gfc_conv_descriptor_dtype (src)); + + /* Copy the dimension information, renumbering dimension 1 to 0 and + 0 to 1. */ + gcc_assert (dest_info->dimen == 2); + gcc_assert (src_info->dimen == 2); + for (n = 0; n < 2; n++) + { + dest_info->delta[n] = integer_zero_node; + dest_info->start[n] = integer_zero_node; + dest_info->stride[n] = integer_one_node; + dest_info->dim[n] = n; + + dest_index = gfc_rank_cst[n]; + src_index = gfc_rank_cst[1 - n]; + + gfc_add_modify_expr (&se->pre, + gfc_conv_descriptor_stride (dest, dest_index), + gfc_conv_descriptor_stride (src, src_index)); + + gfc_add_modify_expr (&se->pre, + gfc_conv_descriptor_lbound (dest, dest_index), + gfc_conv_descriptor_lbound (src, src_index)); + + gfc_add_modify_expr (&se->pre, + gfc_conv_descriptor_ubound (dest, dest_index), + gfc_conv_descriptor_ubound (src, src_index)); + + if (!loop->to[n]) + { + gcc_assert (integer_zerop (loop->from[n])); + loop->to[n] = build2 (MINUS_EXPR, gfc_array_index_type, + gfc_conv_descriptor_ubound (dest, dest_index), + gfc_conv_descriptor_lbound (dest, dest_index)); + } + } + + /* Copy the data pointer. */ + dest_info->data = gfc_conv_descriptor_data_get (src); + gfc_conv_descriptor_data_set (&se->pre, dest, dest_info->data); + + /* Copy the offset. This is not changed by transposition: the top-left + element is still at the same offset as before. */ + dest_info->offset = gfc_conv_descriptor_offset (src); + gfc_add_modify_expr (&se->pre, + gfc_conv_descriptor_offset (dest), + dest_info->offset); + + if (dest_info->dimen > loop->temp_dim) + loop->temp_dim = dest_info->dimen; +} + + /* Return the number of iterations in a loop that starts at START, ends at END, and has step STEP. */ @@ -729,7 +818,7 @@ gfc_grow_array (stmtblock_t * pblock, tree desc, tree extra) gcc_unreachable (); /* Set the new data pointer. */ - tmp = gfc_build_function_call (tmp, args); + tmp = build_function_call_expr (tmp, args); gfc_conv_descriptor_data_set (pblock, desc, tmp); } @@ -843,7 +932,7 @@ gfc_trans_array_ctor_element (stmtblock_t * pblock, tree desc, gfc_conv_expr (se, expr); /* Store the value. */ - tmp = gfc_build_indirect_ref (gfc_conv_descriptor_data_get (desc)); + tmp = build_fold_indirect_ref (gfc_conv_descriptor_data_get (desc)); tmp = gfc_build_array_ref (tmp, offset); if (expr->ts.type == BT_CHARACTER) { @@ -864,7 +953,7 @@ gfc_trans_array_ctor_element (stmtblock_t * pblock, tree desc, args = gfc_chainon_list (args, se->expr); args = gfc_chainon_list (args, se->string_length); tmp = built_in_decls[BUILT_IN_MEMCPY]; - tmp = gfc_build_function_call (tmp, args); + tmp = build_function_call_expr (tmp, args); gfc_add_expr_to_block (&se->pre, tmp); } } @@ -1068,17 +1157,17 @@ gfc_trans_array_constructor_value (stmtblock_t * pblock, tree type, /* Use BUILTIN_MEMCPY to assign the values. */ tmp = gfc_conv_descriptor_data_get (desc); - tmp = gfc_build_indirect_ref (tmp); + tmp = build_fold_indirect_ref (tmp); tmp = gfc_build_array_ref (tmp, *poffset); - tmp = gfc_build_addr_expr (NULL, tmp); - init = gfc_build_addr_expr (NULL, init); + tmp = build_fold_addr_expr (tmp); + init = build_fold_addr_expr (init); size = TREE_INT_CST_LOW (TYPE_SIZE_UNIT (type)); bound = build_int_cst (NULL_TREE, n * size); tmp = gfc_chainon_list (NULL_TREE, tmp); tmp = gfc_chainon_list (tmp, init); tmp = gfc_chainon_list (tmp, bound); - tmp = gfc_build_function_call (built_in_decls[BUILT_IN_MEMCPY], + tmp = build_function_call_expr (built_in_decls[BUILT_IN_MEMCPY], tmp); gfc_add_expr_to_block (&body, tmp); @@ -1581,7 +1670,7 @@ gfc_conv_array_data (tree descriptor) else { /* Descriptorless arrays. */ - return gfc_build_addr_expr (NULL, descriptor); + return build_fold_addr_expr (descriptor); } } else @@ -1738,7 +1827,7 @@ gfc_conv_array_index_offset (gfc_se * se, gfc_ss_info * info, int dim, int i, index, gfc_conv_array_stride (desc, 0)); /* Read the vector to get an index into info->descriptor. */ - data = gfc_build_indirect_ref (gfc_conv_array_data (desc)); + data = build_fold_indirect_ref (gfc_conv_array_data (desc)); index = gfc_build_array_ref (data, index); index = gfc_evaluate_now (index, &se->pre); @@ -1802,7 +1891,7 @@ gfc_conv_scalarized_array_ref (gfc_se * se, gfc_array_ref * ar) dimensions. */ index = fold_build2 (PLUS_EXPR, gfc_array_index_type, index, info->offset); - tmp = gfc_build_indirect_ref (info->data); + tmp = build_fold_indirect_ref (info->data); se->expr = gfc_build_array_ref (tmp, index); } @@ -1891,7 +1980,7 @@ gfc_conv_array_ref (gfc_se * se, gfc_array_ref * ar) /* Access the calculated element. */ tmp = gfc_conv_array_data (se->expr); - tmp = gfc_build_indirect_ref (tmp); + tmp = build_fold_indirect_ref (tmp); se->expr = gfc_build_array_ref (tmp, index); } @@ -2957,7 +3046,7 @@ gfc_array_allocate (gfc_se * se, gfc_ref * ref, tree pstat) tmp = gfc_chainon_list (NULL_TREE, pointer); tmp = gfc_chainon_list (tmp, size); tmp = gfc_chainon_list (tmp, pstat); - tmp = gfc_build_function_call (allocate, tmp); + tmp = build_function_call_expr (allocate, tmp); gfc_add_expr_to_block (&se->pre, tmp); tmp = gfc_conv_descriptor_offset (se->expr); @@ -2984,7 +3073,7 @@ gfc_array_deallocate (tree descriptor, tree pstat) /* Parameter is the address of the data component. */ tmp = gfc_chainon_list (NULL_TREE, var); tmp = gfc_chainon_list (tmp, pstat); - tmp = gfc_build_function_call (gfor_fndecl_deallocate, tmp); + tmp = build_function_call_expr (gfor_fndecl_deallocate, tmp); gfc_add_expr_to_block (&block, tmp); return gfc_finish_block (&block); @@ -3263,7 +3352,7 @@ gfc_trans_auto_array_allocation (tree decl, gfc_symbol * sym, tree fnbody) fndecl = gfor_fndecl_internal_malloc64; else gcc_unreachable (); - tmp = gfc_build_function_call (fndecl, tmp); + tmp = build_function_call_expr (fndecl, tmp); tmp = fold (convert (TREE_TYPE (decl), tmp)); gfc_add_modify_expr (&block, decl, tmp); @@ -3280,7 +3369,7 @@ gfc_trans_auto_array_allocation (tree decl, gfc_symbol * sym, tree fnbody) /* Free the temporary. */ tmp = convert (pvoid_type_node, decl); tmp = gfc_chainon_list (NULL_TREE, tmp); - tmp = gfc_build_function_call (gfor_fndecl_internal_free, tmp); + tmp = build_function_call_expr (gfor_fndecl_internal_free, tmp); gfc_add_expr_to_block (&block, tmp); return gfc_finish_block (&block); @@ -3390,7 +3479,7 @@ gfc_trans_dummy_array_bias (gfc_symbol * sym, tree tmpdesc, tree body) type = TREE_TYPE (tmpdesc); gcc_assert (GFC_ARRAY_TYPE_P (type)); dumdesc = GFC_DECL_SAVED_DESCRIPTOR (tmpdesc); - dumdesc = gfc_build_indirect_ref (dumdesc); + dumdesc = build_fold_indirect_ref (dumdesc); gfc_start_block (&block); if (sym->ts.type == BT_CHARACTER @@ -3441,7 +3530,7 @@ gfc_trans_dummy_array_bias (gfc_symbol * sym, tree tmpdesc, tree body) /* A library call to repack the array if necessary. */ tmp = GFC_DECL_SAVED_DESCRIPTOR (tmpdesc); tmp = gfc_chainon_list (NULL_TREE, tmp); - stmt_unpacked = gfc_build_function_call (gfor_fndecl_in_pack, tmp); + stmt_unpacked = build_function_call_expr (gfor_fndecl_in_pack, tmp); stride = gfc_index_one_node; } @@ -3603,19 +3692,19 @@ gfc_trans_dummy_array_bias (gfc_symbol * sym, tree tmpdesc, tree body) /* Copy the data back. */ tmp = gfc_chainon_list (NULL_TREE, dumdesc); tmp = gfc_chainon_list (tmp, tmpdesc); - tmp = gfc_build_function_call (gfor_fndecl_in_unpack, tmp); + tmp = build_function_call_expr (gfor_fndecl_in_unpack, tmp); gfc_add_expr_to_block (&cleanup, tmp); } /* Free the temporary. */ tmp = gfc_chainon_list (NULL_TREE, tmpdesc); - tmp = gfc_build_function_call (gfor_fndecl_internal_free, tmp); + tmp = build_function_call_expr (gfor_fndecl_internal_free, tmp); gfc_add_expr_to_block (&cleanup, tmp); stmt = gfc_finish_block (&cleanup); /* Only do the cleanup if the array was repacked. */ - tmp = gfc_build_indirect_ref (dumdesc); + tmp = build_fold_indirect_ref (dumdesc); tmp = gfc_conv_descriptor_data_get (tmp); tmp = build2 (NE_EXPR, boolean_type_node, tmp, tmpdesc); stmt = build3_v (COND_EXPR, tmp, stmt, build_empty_stmt ()); @@ -3738,7 +3827,7 @@ gfc_conv_expr_descriptor (gfc_se * se, gfc_expr * expr, gfc_ss * ss) { /* We pass full arrays directly. This means that pointers and allocatable arrays should also work. */ - se->expr = gfc_build_addr_expr (NULL_TREE, desc); + se->expr = build_fold_addr_expr (desc); } else { @@ -3769,7 +3858,7 @@ gfc_conv_expr_descriptor (gfc_se * se, gfc_expr * expr, gfc_ss * ss) /* For pointer assignments pass the descriptor directly. */ se->ss = secss; - se->expr = gfc_build_addr_expr (NULL, se->expr); + se->expr = build_fold_addr_expr (se->expr); gfc_conv_expr (se, expr); return; } @@ -3869,7 +3958,7 @@ gfc_conv_expr_descriptor (gfc_se * se, gfc_expr * expr, gfc_ss * ss) if (expr->ts.type == BT_CHARACTER) { gfc_conv_expr (&rse, expr); - rse.expr = gfc_build_indirect_ref (rse.expr); + rse.expr = build_fold_indirect_ref (rse.expr); } else gfc_conv_expr_val (&rse, expr); @@ -4027,7 +4116,7 @@ gfc_conv_expr_descriptor (gfc_se * se, gfc_expr * expr, gfc_ss * ss) /* Point the data pointer at the first element in the section. */ tmp = gfc_conv_array_data (desc); - tmp = gfc_build_indirect_ref (tmp); + tmp = build_fold_indirect_ref (tmp); tmp = gfc_build_array_ref (tmp, offset); offset = gfc_build_addr_expr (gfc_array_dataptr_type (desc), tmp); gfc_conv_descriptor_data_set (&loop.pre, parm, offset); @@ -4052,7 +4141,7 @@ gfc_conv_expr_descriptor (gfc_se * se, gfc_expr * expr, gfc_ss * ss) { /* Get a pointer to the new descriptor. */ if (se->want_pointer) - se->expr = gfc_build_addr_expr (NULL, desc); + se->expr = build_fold_addr_expr (desc); else se->expr = desc; } @@ -4095,7 +4184,7 @@ gfc_conv_array_parameter (gfc_se * se, gfc_expr * expr, gfc_ss * ss, int g77) if (sym->attr.dummy || POINTER_TYPE_P (TREE_TYPE (tmp))) se->expr = tmp; else - se->expr = gfc_build_addr_expr (NULL, tmp); + se->expr = build_fold_addr_expr (tmp); return; } if (sym->attr.allocatable) @@ -4113,7 +4202,7 @@ gfc_conv_array_parameter (gfc_se * se, gfc_expr * expr, gfc_ss * ss, int g77) desc = se->expr; /* Repack the array. */ tmp = gfc_chainon_list (NULL_TREE, desc); - ptr = gfc_build_function_call (gfor_fndecl_in_pack, tmp); + ptr = build_function_call_expr (gfor_fndecl_in_pack, tmp); ptr = gfc_evaluate_now (ptr, &se->pre); se->expr = ptr; @@ -4122,13 +4211,13 @@ gfc_conv_array_parameter (gfc_se * se, gfc_expr * expr, gfc_ss * ss, int g77) /* Copy the data back. */ tmp = gfc_chainon_list (NULL_TREE, desc); tmp = gfc_chainon_list (tmp, ptr); - tmp = gfc_build_function_call (gfor_fndecl_in_unpack, tmp); + tmp = build_function_call_expr (gfor_fndecl_in_unpack, tmp); gfc_add_expr_to_block (&block, tmp); /* Free the temporary. */ tmp = convert (pvoid_type_node, ptr); tmp = gfc_chainon_list (NULL_TREE, tmp); - tmp = gfc_build_function_call (gfor_fndecl_internal_free, tmp); + tmp = build_function_call_expr (gfor_fndecl_internal_free, tmp); gfc_add_expr_to_block (&block, tmp); stmt = gfc_finish_block (&block); @@ -4136,7 +4225,7 @@ gfc_conv_array_parameter (gfc_se * se, gfc_expr * expr, gfc_ss * ss, int g77) gfc_init_block (&block); /* Only if it was repacked. This code needs to be executed before the loop cleanup code. */ - tmp = gfc_build_indirect_ref (desc); + tmp = build_fold_indirect_ref (desc); tmp = gfc_conv_array_data (tmp); tmp = build2 (NE_EXPR, boolean_type_node, ptr, tmp); tmp = build3_v (COND_EXPR, tmp, stmt, build_empty_stmt ()); @@ -4170,7 +4259,9 @@ gfc_trans_deferred_array (gfc_symbol * sym, tree body) gfc_init_block (&fnblock); - gcc_assert (TREE_CODE (sym->backend_decl) == VAR_DECL); + gcc_assert (TREE_CODE (sym->backend_decl) == VAR_DECL + || TREE_CODE (sym->backend_decl) == PARM_DECL); + if (sym->ts.type == BT_CHARACTER && !INTEGER_CST_P (sym->ts.cl->backend_decl)) gfc_trans_init_string_length (sym->ts.cl, &fnblock); @@ -4435,7 +4526,7 @@ gfc_walk_op_expr (gfc_ss * ss, gfc_expr * expr) /* Reverse a SS chain. */ -static gfc_ss * +gfc_ss * gfc_reverse_ss (gfc_ss * ss) { gfc_ss *next; @@ -4461,10 +4552,9 @@ gfc_reverse_ss (gfc_ss * ss) /* Walk the arguments of an elemental function. */ gfc_ss * -gfc_walk_elemental_function_args (gfc_ss * ss, gfc_expr * expr, +gfc_walk_elemental_function_args (gfc_ss * ss, gfc_actual_arglist *arg, gfc_ss_type type) { - gfc_actual_arglist *arg; int scalar; gfc_ss *head; gfc_ss *tail; @@ -4473,7 +4563,7 @@ gfc_walk_elemental_function_args (gfc_ss * ss, gfc_expr * expr, head = gfc_ss_terminator; tail = NULL; scalar = 1; - for (arg = expr->value.function.actual; arg; arg = arg->next) + for (; arg; arg = arg->next) { if (!arg->expr) continue; @@ -4550,7 +4640,8 @@ gfc_walk_function_expr (gfc_ss * ss, gfc_expr * expr) /* Walk the parameters of an elemental function. For now we always pass by reference. */ if (sym->attr.elemental) - return gfc_walk_elemental_function_args (ss, expr, GFC_SS_REFERENCE); + return gfc_walk_elemental_function_args (ss, expr->value.function.actual, + GFC_SS_REFERENCE); /* Scalar functions are OK as these are evaluated outside the scalarization loop. Pass back and let the caller deal with it. */ diff --git a/gcc/fortran/trans-array.h b/gcc/fortran/trans-array.h index af990a9061c..564e6490a26 100644 --- a/gcc/fortran/trans-array.h +++ b/gcc/fortran/trans-array.h @@ -48,11 +48,14 @@ void gfc_trans_static_array_pointer (gfc_symbol *); /* Generate scalarization information for an expression. */ gfc_ss *gfc_walk_expr (gfc_expr *); -/* Walk the arguments of an intrinsic function. */ -gfc_ss *gfc_walk_elemental_function_args (gfc_ss *, gfc_expr *, gfc_ss_type); +/* Walk the arguments of an elemental function. */ +gfc_ss *gfc_walk_elemental_function_args (gfc_ss *, gfc_actual_arglist *, + gfc_ss_type); /* Walk an intrinsic function. */ gfc_ss *gfc_walk_intrinsic_function (gfc_ss *, gfc_expr *, gfc_intrinsic_sym *); +/* Reverse the order of an SS chain. */ +gfc_ss *gfc_reverse_ss (gfc_ss *); /* Free the SS associated with a loop. */ void gfc_cleanup_loop (gfc_loopinfo *); @@ -91,6 +94,8 @@ void gfc_conv_tmp_ref (gfc_se *); void gfc_conv_expr_descriptor (gfc_se *, gfc_expr *, gfc_ss *); /* Convert an array for passing as an actual function parameter. */ void gfc_conv_array_parameter (gfc_se *, gfc_expr *, gfc_ss *, int); +/* Evaluate and transpose a matrix expression. */ +void gfc_conv_array_transpose (gfc_se *, gfc_expr *); /* These work with both descriptors and descriptorless arrays. */ tree gfc_conv_array_data (tree); @@ -112,8 +117,6 @@ tree gfc_conv_descriptor_ubound (tree, tree); /* Dependency checking for WHERE and FORALL. */ int gfc_check_dependency (gfc_expr *, gfc_expr *, gfc_expr **, int); -/* Dependency checking for function calls. */ -int gfc_check_fncall_dependency (gfc_expr *, gfc_expr *); /* Add pre-loop scalarization code for intrinsic functions which require special handling. */ diff --git a/gcc/fortran/trans-decl.c b/gcc/fortran/trans-decl.c index 37e9db8d0b6..a3b5d98b446 100644 --- a/gcc/fortran/trans-decl.c +++ b/gcc/fortran/trans-decl.c @@ -368,7 +368,7 @@ gfc_finish_cray_pointee (tree decl, gfc_symbol *sym) /* Parameters need to be dereferenced. */ if (sym->cp_pointer->attr.dummy) - ptr_decl = gfc_build_indirect_ref (ptr_decl); + ptr_decl = build_fold_indirect_ref (ptr_decl); /* Check to see if we're dealing with a variable-sized array. */ if (sym->attr.dimension @@ -382,7 +382,7 @@ gfc_finish_cray_pointee (tree decl, gfc_symbol *sym) { ptr_decl = convert (build_pointer_type (TREE_TYPE (decl)), ptr_decl); - value = gfc_build_indirect_ref (ptr_decl); + value = build_fold_indirect_ref (ptr_decl); } SET_DECL_VALUE_EXPR (decl, value); @@ -809,7 +809,9 @@ tree gfc_get_symbol_decl (gfc_symbol * sym) { tree decl; + tree etype = NULL_TREE; tree length = NULL_TREE; + tree tmp = NULL_TREE; int byref; gcc_assert (sym->attr.referenced); @@ -848,6 +850,21 @@ gfc_get_symbol_decl (gfc_symbol * sym) gfc_defer_symbol_init (sym); } } + + /* Set the element size of automatic and assumed character length + length, dummy, pointer arrays. */ + if (sym->attr.pointer && sym->attr.dummy + && sym->attr.dimension) + { + tmp = build_fold_indirect_ref (sym->backend_decl); + etype = gfc_get_element_type (TREE_TYPE (tmp)); + if (TYPE_SIZE_UNIT (etype) == NULL_TREE) + { + tmp = TYPE_SIZE_UNIT (gfc_character1_type_node); + tmp = fold_convert (TREE_TYPE (tmp), sym->ts.cl->backend_decl); + TYPE_SIZE_UNIT (etype) = tmp; + } + } } /* Use a copy of the descriptor for dummy arrays. */ @@ -1076,7 +1093,7 @@ gfc_get_extern_function_decl (gfc_symbol * sym) sense. */ if (sym->attr.pure || sym->attr.elemental) { - if (sym->attr.function) + if (sym->attr.function && !gfc_return_by_reference (sym)) DECL_IS_PURE (fndecl) = 1; /* TODO: check if pure SUBROUTINEs don't have INTENT(OUT) parameters and don't use alternate returns (is this @@ -1528,7 +1545,7 @@ build_entry_thunks (gfc_namespace * ns) args = nreverse (args); args = chainon (args, nreverse (string_args)); tmp = ns->proc_name->backend_decl; - tmp = gfc_build_function_call (tmp, args); + tmp = build_function_call_expr (tmp, args); if (ns->proc_name->attr.mixed_entry_master) { tree union_decl, field; @@ -2541,9 +2558,6 @@ gfc_generate_function_code (gfc_namespace * ns) trans_function_start (sym); - /* Will be created as needed. */ - current_fake_result_decl = NULL_TREE; - gfc_start_block (&block); if (ns->entries && ns->proc_name->ts.type == BT_CHARACTER) @@ -2565,7 +2579,9 @@ gfc_generate_function_code (gfc_namespace * ns) gfc_generate_contained_functions (ns); generate_local_vars (ns); - + + /* Will be created as needed. */ + current_fake_result_decl = NULL_TREE; current_function_return_label = NULL; /* Now generate the code for the body of this function. */ @@ -2585,7 +2601,7 @@ gfc_generate_function_code (gfc_namespace * ns) arglist = gfc_chainon_list (arglist, build_int_cst (gfc_int4_type_node, gfc_option.allow_std)); - tmp = gfc_build_function_call (gfor_fndecl_set_std, arglist); + tmp = build_function_call_expr (gfor_fndecl_set_std, arglist); gfc_add_expr_to_block (&body, tmp); } @@ -2600,7 +2616,7 @@ gfc_generate_function_code (gfc_namespace * ns) arglist = gfc_chainon_list (NULL_TREE, build_int_cst (gfc_c_int_type_node, gfc_option.fpe)); - tmp = gfc_build_function_call (gfor_fndecl_set_fpe, arglist); + tmp = build_function_call_expr (gfor_fndecl_set_fpe, arglist); gfc_add_expr_to_block (&body, tmp); } @@ -2747,7 +2763,7 @@ gfc_generate_constructors (void) for (; gfc_static_ctors; gfc_static_ctors = TREE_CHAIN (gfc_static_ctors)) { tmp = - gfc_build_function_call (TREE_VALUE (gfc_static_ctors), NULL_TREE); + build_function_call_expr (TREE_VALUE (gfc_static_ctors), NULL_TREE); DECL_SAVED_TREE (fndecl) = build_stmt (EXPR_STMT, tmp); } diff --git a/gcc/fortran/trans-expr.c b/gcc/fortran/trans-expr.c index f911487030b..8aac6e01c01 100644 --- a/gcc/fortran/trans-expr.c +++ b/gcc/fortran/trans-expr.c @@ -1,5 +1,5 @@ /* Expression translation - Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc. + Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. Contributed by Paul Brook and Steven Bosscher @@ -232,7 +232,7 @@ gfc_conv_substring (gfc_se * se, gfc_ref * ref, int kind) if (TYPE_STRING_FLAG (TREE_TYPE (se->expr))) tmp = se->expr; else - tmp = gfc_build_indirect_ref (se->expr); + tmp = build_fold_indirect_ref (se->expr); tmp = gfc_build_array_ref (tmp, start.expr); se->expr = gfc_build_addr_expr (type, tmp); } @@ -246,12 +246,11 @@ gfc_conv_substring (gfc_se * se, gfc_ref * ref, int kind) gfc_conv_expr_type (&end, ref->u.ss.end, gfc_charlen_type_node); gfc_add_block_to_block (&se->pre, &end.pre); } - tmp = - build2 (MINUS_EXPR, gfc_charlen_type_node, - fold_convert (gfc_charlen_type_node, integer_one_node), - start.expr); - tmp = build2 (PLUS_EXPR, gfc_charlen_type_node, end.expr, tmp); - se->string_length = fold (tmp); + tmp = fold_build2 (MINUS_EXPR, gfc_charlen_type_node, + build_int_cst (gfc_charlen_type_node, 1), + start.expr); + tmp = fold_build2 (PLUS_EXPR, gfc_charlen_type_node, end.expr, tmp); + se->string_length = tmp; } @@ -285,7 +284,7 @@ gfc_conv_component_ref (gfc_se * se, gfc_ref * ref) } if (c->pointer && c->dimension == 0 && c->ts.type != BT_CHARACTER) - se->expr = gfc_build_indirect_ref (se->expr); + se->expr = build_fold_indirect_ref (se->expr); } @@ -356,7 +355,7 @@ gfc_conv_variable (gfc_se * se, gfc_expr * expr) if (!sym->attr.dummy) { gcc_assert (TREE_CODE (se->expr) == FUNCTION_DECL); - se->expr = gfc_build_addr_expr (NULL, se->expr); + se->expr = build_fold_addr_expr (se->expr); } return; } @@ -373,19 +372,19 @@ gfc_conv_variable (gfc_se * se, gfc_expr * expr) && (sym->attr.dummy || sym->attr.function || sym->attr.result)) - se->expr = gfc_build_indirect_ref (se->expr); + se->expr = build_fold_indirect_ref (se->expr); } else { /* Dereference non-character scalar dummy arguments. */ if (sym->attr.dummy && !sym->attr.dimension) - se->expr = gfc_build_indirect_ref (se->expr); + se->expr = build_fold_indirect_ref (se->expr); /* Dereference scalar hidden result. */ if (gfc_option.flag_f2c && sym->ts.type == BT_COMPLEX && (sym->attr.function || sym->attr.result) && !sym->attr.dimension && !sym->attr.pointer) - se->expr = gfc_build_indirect_ref (se->expr); + se->expr = build_fold_indirect_ref (se->expr); /* Dereference non-character pointer variables. These must be dummies, results, or scalars. */ @@ -394,7 +393,7 @@ gfc_conv_variable (gfc_se * se, gfc_expr * expr) || sym->attr.function || sym->attr.result || !sym->attr.dimension)) - se->expr = gfc_build_indirect_ref (se->expr); + se->expr = build_fold_indirect_ref (se->expr); } ref = expr->ref; @@ -452,7 +451,7 @@ gfc_conv_variable (gfc_se * se, gfc_expr * expr) if (expr->ts.type == BT_CHARACTER) gfc_conv_string_parameter (se); else - se->expr = gfc_build_addr_expr (NULL, se->expr); + se->expr = build_fold_addr_expr (se->expr); } } @@ -799,7 +798,7 @@ gfc_conv_power_op (gfc_se * se, gfc_expr * expr) tmp = gfc_chainon_list (NULL_TREE, lse.expr); tmp = gfc_chainon_list (tmp, rse.expr); - se->expr = fold (gfc_build_function_call (fndecl, tmp)); + se->expr = build_function_call_expr (fndecl, tmp); } @@ -829,14 +828,14 @@ gfc_conv_string_tmp (gfc_se * se, tree type, tree len) /* Allocate a temporary to hold the result. */ var = gfc_create_var (type, "pstr"); args = gfc_chainon_list (NULL_TREE, len); - tmp = gfc_build_function_call (gfor_fndecl_internal_malloc, args); + tmp = build_function_call_expr (gfor_fndecl_internal_malloc, args); tmp = convert (type, tmp); gfc_add_modify_expr (&se->pre, var, tmp); /* Free the temporary afterwards. */ tmp = convert (pvoid_type_node, var); args = gfc_chainon_list (NULL_TREE, tmp); - tmp = gfc_build_function_call (gfor_fndecl_internal_free, args); + tmp = build_function_call_expr (gfor_fndecl_internal_free, args); gfc_add_expr_to_block (&se->post, tmp); } @@ -891,7 +890,7 @@ gfc_conv_concat_op (gfc_se * se, gfc_expr * expr) args = gfc_chainon_list (args, lse.expr); args = gfc_chainon_list (args, rse.string_length); args = gfc_chainon_list (args, rse.expr); - tmp = gfc_build_function_call (gfor_fndecl_concat_string, args); + tmp = build_function_call_expr (gfor_fndecl_concat_string, args); gfc_add_expr_to_block (&se->pre, tmp); /* Add the cleanup for the operands. */ @@ -902,7 +901,6 @@ gfc_conv_concat_op (gfc_se * se, gfc_expr * expr) se->string_length = len; } - /* Translates an op expression. Common (binary) cases are handled by this function, others are passed on. Recursion is used in either case. We use the fact that (op1.ts == op2.ts) (except for the power @@ -1044,23 +1042,15 @@ gfc_conv_expr_op (gfc_se * se, gfc_expr * expr) gfc_conv_expr (&rse, expr->value.op.op2); gfc_add_block_to_block (&se->pre, &rse.pre); - /* For string comparisons we generate a library call, and compare the return - value with 0. */ if (checkstring) { gfc_conv_string_parameter (&lse); gfc_conv_string_parameter (&rse); - tmp = NULL_TREE; - tmp = gfc_chainon_list (tmp, lse.string_length); - tmp = gfc_chainon_list (tmp, lse.expr); - tmp = gfc_chainon_list (tmp, rse.string_length); - tmp = gfc_chainon_list (tmp, rse.expr); - - /* Build a call for the comparison. */ - lse.expr = gfc_build_function_call (gfor_fndecl_compare_string, tmp); - gfc_add_block_to_block (&lse.post, &rse.post); + lse.expr = gfc_build_compare_string (lse.string_length, lse.expr, + rse.string_length, rse.expr); rse.expr = integer_zero_node; + gfc_add_block_to_block (&lse.post, &rse.post); } type = gfc_typenode_for_spec (&expr->ts); @@ -1079,6 +1069,63 @@ gfc_conv_expr_op (gfc_se * se, gfc_expr * expr) gfc_add_block_to_block (&se->post, &lse.post); } +/* If a string's length is one, we convert it to a single character. */ + +static tree +gfc_to_single_character (tree len, tree str) +{ + gcc_assert (POINTER_TYPE_P (TREE_TYPE (str))); + + if (INTEGER_CST_P (len) && TREE_INT_CST_LOW (len) == 1 + && TREE_INT_CST_HIGH (len) == 0) + { + str = fold_convert (pchar_type_node, str); + return build_fold_indirect_ref (str); + } + + return NULL_TREE; +} + +/* Compare two strings. If they are all single characters, the result is the + subtraction of them. Otherwise, we build a library call. */ + +tree +gfc_build_compare_string (tree len1, tree str1, tree len2, tree str2) +{ + tree sc1; + tree sc2; + tree type; + tree tmp; + + gcc_assert (POINTER_TYPE_P (TREE_TYPE (str1))); + gcc_assert (POINTER_TYPE_P (TREE_TYPE (str2))); + + type = gfc_get_int_type (gfc_default_integer_kind); + + sc1 = gfc_to_single_character (len1, str1); + sc2 = gfc_to_single_character (len2, str2); + + /* Deal with single character specially. */ + if (sc1 != NULL_TREE && sc2 != NULL_TREE) + { + sc1 = fold_convert (type, sc1); + sc2 = fold_convert (type, sc2); + tmp = fold_build2 (MINUS_EXPR, type, sc1, sc2); + } + else + { + tmp = NULL_TREE; + tmp = gfc_chainon_list (tmp, len1); + tmp = gfc_chainon_list (tmp, str1); + tmp = gfc_chainon_list (tmp, len2); + tmp = gfc_chainon_list (tmp, str2); + + /* Build a call for the comparison. */ + tmp = build_function_call_expr (gfor_fndecl_compare_string, tmp); + } + + return tmp; +} static void gfc_conv_function_val (gfc_se * se, gfc_symbol * sym) @@ -1100,7 +1147,7 @@ gfc_conv_function_val (gfc_se * se, gfc_symbol * sym) if (!POINTER_TYPE_P (TREE_TYPE (tmp))) { gcc_assert (TREE_CODE (tmp) == FUNCTION_DECL); - tmp = gfc_build_addr_expr (NULL, tmp); + tmp = build_fold_addr_expr (tmp); } } se->expr = tmp; @@ -1292,12 +1339,12 @@ gfc_add_interface_mapping (gfc_interface_mapping * mapping, value = fold_convert (tmp, se->expr); if (sym->attr.pointer) - value = gfc_build_indirect_ref (value); + value = build_fold_indirect_ref (value); } /* If the argument is a scalar or a pointer to an array, dereference it. */ else if (!sym->attr.dimension || sym->attr.pointer) - value = gfc_build_indirect_ref (se->expr); + value = build_fold_indirect_ref (se->expr); /* If the argument is an array descriptor, use it to determine information about the actual argument's shape. */ @@ -1305,7 +1352,7 @@ gfc_add_interface_mapping (gfc_interface_mapping * mapping, && GFC_DESCRIPTOR_TYPE_P (TREE_TYPE (TREE_TYPE (se->expr)))) { /* Get the actual argument's descriptor. */ - desc = gfc_build_indirect_ref (se->expr); + desc = build_fold_indirect_ref (se->expr); /* Create the replacement variable. */ tmp = gfc_conv_descriptor_data_get (desc); @@ -1591,7 +1638,7 @@ gfc_conv_function_call (gfc_se * se, gfc_symbol * sym, /* Scalar pointer dummy args require an extra level of indirection. The null pointer already contains this level of indirection. */ - parmse.expr = gfc_build_addr_expr (NULL, parmse.expr); + parmse.expr = build_fold_addr_expr (parmse.expr); } } else @@ -1675,7 +1722,7 @@ gfc_conv_function_call (gfc_se * se, gfc_symbol * sym, /* Pass the temporary as the first argument. */ tmp = info->descriptor; - tmp = gfc_build_addr_expr (NULL, tmp); + tmp = build_fold_addr_expr (tmp); retargs = gfc_chainon_list (retargs, tmp); } else if (ts.type == BT_CHARACTER) @@ -1697,7 +1744,7 @@ gfc_conv_function_call (gfc_se * se, gfc_symbol * sym, var = gfc_create_var (build_pointer_type (tmp), "pstr"); /* Provide an address expression for the function arguments. */ - var = gfc_build_addr_expr (NULL, var); + var = build_fold_addr_expr (var); } else var = gfc_conv_string_tmp (se, type, len); @@ -1709,7 +1756,7 @@ gfc_conv_function_call (gfc_se * se, gfc_symbol * sym, gcc_assert (gfc_option.flag_f2c && ts.type == BT_COMPLEX); type = gfc_get_complex_type (ts.kind); - var = gfc_build_addr_expr (NULL, gfc_create_var (type, "cmplx")); + var = build_fold_addr_expr (gfc_create_var (type, "cmplx")); retargs = gfc_chainon_list (retargs, var); } @@ -1737,7 +1784,7 @@ gfc_conv_function_call (gfc_se * se, gfc_symbol * sym, TREE_TYPE (sym->backend_decl) = build_function_type (integer_type_node, TYPE_ARG_TYPES (TREE_TYPE (sym->backend_decl))); - se->expr = gfc_build_addr_expr (NULL, sym->backend_decl); + se->expr = build_fold_addr_expr (sym->backend_decl); } fntype = TREE_TYPE (TREE_TYPE (se->expr)); @@ -1749,7 +1796,7 @@ gfc_conv_function_call (gfc_se * se, gfc_symbol * sym, x = f() where f is pointer valued, we have to dereference the result. */ if (!se->want_pointer && !byref && sym->attr.pointer) - se->expr = gfc_build_indirect_ref (se->expr); + se->expr = build_fold_indirect_ref (se->expr); /* f2c calling conventions require a scalar default real function to return a double precision result. Convert this back to default @@ -1794,7 +1841,7 @@ gfc_conv_function_call (gfc_se * se, gfc_symbol * sym, { /* Dereference for character pointer results. */ if (sym->attr.pointer || sym->attr.allocatable) - se->expr = gfc_build_indirect_ref (var); + se->expr = build_fold_indirect_ref (var); else se->expr = var; @@ -1803,7 +1850,7 @@ gfc_conv_function_call (gfc_se * se, gfc_symbol * sym, else { gcc_assert (sym->ts.type == BT_COMPLEX && gfc_option.flag_f2c); - se->expr = gfc_build_indirect_ref (var); + se->expr = build_fold_indirect_ref (var); } } } @@ -1819,13 +1866,24 @@ gfc_trans_string_copy (stmtblock_t * block, tree dlen, tree dest, tree slen, tree src) { tree tmp; + tree dsc; + tree ssc; + + /* Deal with single character specially. */ + dsc = gfc_to_single_character (dlen, dest); + ssc = gfc_to_single_character (slen, src); + if (dsc != NULL_TREE && ssc != NULL_TREE) + { + gfc_add_modify_expr (block, dsc, ssc); + return; + } tmp = NULL_TREE; tmp = gfc_chainon_list (tmp, dlen); tmp = gfc_chainon_list (tmp, dest); tmp = gfc_chainon_list (tmp, slen); tmp = gfc_chainon_list (tmp, src); - tmp = gfc_build_function_call (gfor_fndecl_copy_string, tmp); + tmp = build_function_call_expr (gfor_fndecl_copy_string, tmp); gfc_add_expr_to_block (block, tmp); } @@ -2438,7 +2496,7 @@ gfc_conv_expr_reference (gfc_se * se, gfc_expr * expr) gfc_add_block_to_block (&se->pre, &se->post); /* Take the address of that value. */ - se->expr = gfc_build_addr_expr (NULL, var); + se->expr = build_fold_addr_expr (var); } @@ -2627,7 +2685,9 @@ gfc_trans_arrayfunc_assign (gfc_expr * expr1, gfc_expr * expr2) } /* Check for a dependency. */ - if (gfc_check_fncall_dependency (expr1, expr2)) + if (gfc_check_fncall_dependency (expr1, INTENT_OUT, + expr2->value.function.esym, + expr2->value.function.actual)) return NULL; /* The frontend doesn't seem to bother filling in expr->symtree for intrinsic diff --git a/gcc/fortran/trans-intrinsic.c b/gcc/fortran/trans-intrinsic.c index 8dd54d9e8ac..a5113044048 100644 --- a/gcc/fortran/trans-intrinsic.c +++ b/gcc/fortran/trans-intrinsic.c @@ -1,5 +1,5 @@ /* Intrinsic translation - Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc. + Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. Contributed by Paul Brook and Steven Bosscher @@ -387,7 +387,7 @@ gfc_conv_intrinsic_aint (gfc_se * se, gfc_expr * expr, enum tree_code op) if (n != END_BUILTINS) { tmp = built_in_decls[n]; - se->expr = gfc_build_function_call (tmp, arg); + se->expr = build_function_call_expr (tmp, arg); return; } @@ -641,7 +641,7 @@ gfc_conv_intrinsic_lib_function (gfc_se * se, gfc_expr * expr) /* Get the decl and generate the call. */ args = gfc_conv_intrinsic_function_args (se, expr); fndecl = gfc_get_intrinsic_lib_fndecl (m, expr); - se->expr = gfc_build_function_call (fndecl, args); + se->expr = build_function_call_expr (fndecl, args); } /* Generate code for EXPONENT(X) intrinsic function. */ @@ -673,7 +673,7 @@ gfc_conv_intrinsic_exponent (gfc_se * se, gfc_expr * expr) gcc_unreachable (); } - se->expr = gfc_build_function_call (fndecl, args); + se->expr = build_function_call_expr (fndecl, args); } /* Evaluate a single upper or lower bound. */ @@ -795,7 +795,7 @@ gfc_conv_intrinsic_abs (gfc_se * se, gfc_expr * expr) default: gcc_unreachable (); } - se->expr = fold (gfc_build_function_call (built_in_decls[n], args)); + se->expr = build_function_call_expr (built_in_decls[n], args); break; default: @@ -961,7 +961,7 @@ gfc_conv_intrinsic_sign (gfc_se * se, gfc_expr * expr) default: gcc_unreachable (); } - se->expr = fold (gfc_build_function_call (tmp, arg)); + se->expr = build_function_call_expr (tmp, arg); return; } @@ -1053,18 +1053,18 @@ gfc_conv_intrinsic_ctime (gfc_se * se, gfc_expr * expr) len = gfc_create_var (gfc_int8_type_node, "len"); tmp = gfc_conv_intrinsic_function_args (se, expr); - arglist = gfc_chainon_list (NULL_TREE, gfc_build_addr_expr (NULL, var)); - arglist = gfc_chainon_list (arglist, gfc_build_addr_expr (NULL, len)); + arglist = gfc_chainon_list (NULL_TREE, build_fold_addr_expr (var)); + arglist = gfc_chainon_list (arglist, build_fold_addr_expr (len)); arglist = chainon (arglist, tmp); - tmp = gfc_build_function_call (gfor_fndecl_ctime, arglist); + tmp = build_function_call_expr (gfor_fndecl_ctime, arglist); gfc_add_expr_to_block (&se->pre, tmp); /* Free the temporary afterwards, if necessary. */ cond = build2 (GT_EXPR, boolean_type_node, len, build_int_cst (TREE_TYPE (len), 0)); arglist = gfc_chainon_list (NULL_TREE, var); - tmp = gfc_build_function_call (gfor_fndecl_internal_free, arglist); + tmp = build_function_call_expr (gfor_fndecl_internal_free, arglist); tmp = build3_v (COND_EXPR, cond, tmp, build_empty_stmt ()); gfc_add_expr_to_block (&se->post, tmp); @@ -1089,18 +1089,18 @@ gfc_conv_intrinsic_fdate (gfc_se * se, gfc_expr * expr) len = gfc_create_var (gfc_int4_type_node, "len"); tmp = gfc_conv_intrinsic_function_args (se, expr); - arglist = gfc_chainon_list (NULL_TREE, gfc_build_addr_expr (NULL, var)); - arglist = gfc_chainon_list (arglist, gfc_build_addr_expr (NULL, len)); + arglist = gfc_chainon_list (NULL_TREE, build_fold_addr_expr (var)); + arglist = gfc_chainon_list (arglist, build_fold_addr_expr (len)); arglist = chainon (arglist, tmp); - tmp = gfc_build_function_call (gfor_fndecl_fdate, arglist); + tmp = build_function_call_expr (gfor_fndecl_fdate, arglist); gfc_add_expr_to_block (&se->pre, tmp); /* Free the temporary afterwards, if necessary. */ cond = build2 (GT_EXPR, boolean_type_node, len, build_int_cst (TREE_TYPE (len), 0)); arglist = gfc_chainon_list (NULL_TREE, var); - tmp = gfc_build_function_call (gfor_fndecl_internal_free, arglist); + tmp = build_function_call_expr (gfor_fndecl_internal_free, arglist); tmp = build3_v (COND_EXPR, cond, tmp, build_empty_stmt ()); gfc_add_expr_to_block (&se->post, tmp); @@ -1127,18 +1127,18 @@ gfc_conv_intrinsic_ttynam (gfc_se * se, gfc_expr * expr) len = gfc_create_var (gfc_int4_type_node, "len"); tmp = gfc_conv_intrinsic_function_args (se, expr); - arglist = gfc_chainon_list (NULL_TREE, gfc_build_addr_expr (NULL, var)); - arglist = gfc_chainon_list (arglist, gfc_build_addr_expr (NULL, len)); + arglist = gfc_chainon_list (NULL_TREE, build_fold_addr_expr (var)); + arglist = gfc_chainon_list (arglist, build_fold_addr_expr (len)); arglist = chainon (arglist, tmp); - tmp = gfc_build_function_call (gfor_fndecl_ttynam, arglist); + tmp = build_function_call_expr (gfor_fndecl_ttynam, arglist); gfc_add_expr_to_block (&se->pre, tmp); /* Free the temporary afterwards, if necessary. */ cond = build2 (GT_EXPR, boolean_type_node, len, build_int_cst (TREE_TYPE (len), 0)); arglist = gfc_chainon_list (NULL_TREE, var); - tmp = gfc_build_function_call (gfor_fndecl_internal_free, arglist); + tmp = build_function_call_expr (gfor_fndecl_internal_free, arglist); tmp = build3_v (COND_EXPR, cond, tmp, build_empty_stmt ()); gfc_add_expr_to_block (&se->post, tmp); @@ -2039,7 +2039,7 @@ gfc_conv_intrinsic_ishftc (gfc_se * se, gfc_expr * expr) default: gcc_unreachable (); } - se->expr = gfc_build_function_call (tmp, arg); + se->expr = build_function_call_expr (tmp, arg); /* Convert the result back to the original type, if we extended the first argument's width above. */ if (expr->ts.kind < 4) @@ -2129,7 +2129,7 @@ gfc_conv_intrinsic_len_trim (gfc_se * se, gfc_expr * expr) args = gfc_conv_intrinsic_function_args (se, expr); type = gfc_typenode_for_spec (&expr->ts); - se->expr = gfc_build_function_call (gfor_fndecl_string_len_trim, args); + se->expr = build_function_call_expr (gfor_fndecl_string_len_trim, args); se->expr = convert (type, se->expr); } @@ -2160,7 +2160,7 @@ gfc_conv_intrinsic_index (gfc_se * se, gfc_expr * expr) TREE_VALUE (back) = convert (logical4_type_node, TREE_VALUE (back)); } - se->expr = gfc_build_function_call (gfor_fndecl_string_index, args); + se->expr = build_function_call_expr (gfor_fndecl_string_index, args); se->expr = convert (type, se->expr); } @@ -2177,7 +2177,7 @@ gfc_conv_intrinsic_ichar (gfc_se * se, gfc_expr * expr) arg = build1 (NOP_EXPR, pchar_type_node, arg); type = gfc_typenode_for_spec (&expr->ts); - se->expr = gfc_build_indirect_ref (arg); + se->expr = build_fold_indirect_ref (arg); se->expr = convert (type, se->expr); } @@ -2254,7 +2254,7 @@ gfc_conv_intrinsic_size (gfc_se * se, gfc_expr * expr) else fndecl = gfor_fndecl_size0; - se->expr = gfc_build_function_call (fndecl, args); + se->expr = build_function_call_expr (fndecl, args); type = gfc_typenode_for_spec (&expr->ts); se->expr = convert (type, se->expr); } @@ -2267,13 +2267,17 @@ gfc_conv_intrinsic_strcmp (gfc_se * se, gfc_expr * expr, int op) { tree type; tree args; + tree arg2; args = gfc_conv_intrinsic_function_args (se, expr); - /* Build a call for the comparison. */ - se->expr = gfc_build_function_call (gfor_fndecl_compare_string, args); + arg2 = TREE_CHAIN (TREE_CHAIN (args)); + + se->expr = gfc_build_compare_string (TREE_VALUE (args), + TREE_VALUE (TREE_CHAIN (args)), TREE_VALUE (arg2), + TREE_VALUE (TREE_CHAIN (arg2))); type = gfc_typenode_for_spec (&expr->ts); - se->expr = build2 (op, type, se->expr, + se->expr = fold_build2 (op, type, se->expr, build_int_cst (TREE_TYPE (se->expr), 0)); } @@ -2294,7 +2298,7 @@ gfc_conv_intrinsic_adjust (gfc_se * se, gfc_expr * expr, tree fndecl) var = gfc_conv_string_tmp (se, type, len); args = tree_cons (NULL_TREE, var, args); - tmp = gfc_build_function_call (fndecl, args); + tmp = build_function_call_expr (fndecl, args); gfc_add_expr_to_block (&se->pre, tmp); se->expr = var; se->string_length = len; @@ -2341,7 +2345,7 @@ gfc_conv_intrinsic_transfer (gfc_se * se, gfc_expr * expr) } else { - se->expr = gfc_build_indirect_ref (ptr); + se->expr = build_fold_indirect_ref (ptr); } } @@ -2444,7 +2448,7 @@ gfc_conv_associated (gfc_se *se, gfc_expr *expr) gfc_add_block_to_block (&se->post, &arg2se.post); args = gfc_chainon_list (args, arg2se.expr); fndecl = gfor_fndecl_associated; - se->expr = gfc_build_function_call (fndecl, args); + se->expr = build_function_call_expr (fndecl, args); } } se->expr = convert (gfc_typenode_for_spec (&expr->ts), se->expr); @@ -2477,7 +2481,7 @@ gfc_conv_intrinsic_scan (gfc_se * se, gfc_expr * expr) TREE_VALUE (back) = convert (logical4_type_node, TREE_VALUE (back)); } - se->expr = gfc_build_function_call (gfor_fndecl_string_scan, args); + se->expr = build_function_call_expr (gfor_fndecl_string_scan, args); se->expr = convert (type, se->expr); } @@ -2510,7 +2514,7 @@ gfc_conv_intrinsic_verify (gfc_se * se, gfc_expr * expr) TREE_VALUE (back) = convert (logical4_type_node, TREE_VALUE (back)); } - se->expr = gfc_build_function_call (gfor_fndecl_string_verify, args); + se->expr = build_function_call_expr (gfor_fndecl_string_verify, args); se->expr = convert (type, se->expr); } @@ -2601,7 +2605,7 @@ call_builtin_clz (tree result_type, tree op0) gcc_unreachable (); parms = tree_cons (NULL, op0, NULL); - call = gfc_build_function_call (fn, parms); + call = build_function_call_expr (fn, parms); return convert (result_type, call); } @@ -2721,9 +2725,9 @@ gfc_conv_intrinsic_si_kind (gfc_se * se, gfc_expr * expr) args = gfc_conv_intrinsic_function_args (se, expr); args = TREE_VALUE (args); - args = gfc_build_addr_expr (NULL, args); + args = build_fold_addr_expr (args); args = tree_cons (NULL_TREE, args, NULL_TREE); - se->expr = gfc_build_function_call (gfor_fndecl_si_kind, args); + se->expr = build_function_call_expr (gfor_fndecl_si_kind, args); } /* Generate code for SELECTED_REAL_KIND (P, R) intrinsic function. */ @@ -2750,7 +2754,7 @@ gfc_conv_intrinsic_sr_kind (gfc_se * se, gfc_expr * expr) gfc_add_block_to_block (&se->post, &argse.post); args = gfc_chainon_list (args, argse.expr); } - se->expr = gfc_build_function_call (gfor_fndecl_sr_kind, args); + se->expr = build_function_call_expr (gfor_fndecl_sr_kind, args); } @@ -2776,18 +2780,18 @@ gfc_conv_intrinsic_trim (gfc_se * se, gfc_expr * expr) len = gfc_create_var (gfc_int4_type_node, "len"); tmp = gfc_conv_intrinsic_function_args (se, expr); - arglist = gfc_chainon_list (arglist, gfc_build_addr_expr (NULL, len)); + arglist = gfc_chainon_list (arglist, build_fold_addr_expr (len)); arglist = gfc_chainon_list (arglist, addr); arglist = chainon (arglist, tmp); - tmp = gfc_build_function_call (gfor_fndecl_string_trim, arglist); + tmp = build_function_call_expr (gfor_fndecl_string_trim, arglist); gfc_add_expr_to_block (&se->pre, tmp); /* Free the temporary afterwards, if necessary. */ cond = build2 (GT_EXPR, boolean_type_node, len, build_int_cst (TREE_TYPE (len), 0)); arglist = gfc_chainon_list (NULL_TREE, var); - tmp = gfc_build_function_call (gfor_fndecl_internal_free, arglist); + tmp = build_function_call_expr (gfor_fndecl_internal_free, arglist); tmp = build3_v (COND_EXPR, cond, tmp, build_empty_stmt ()); gfc_add_expr_to_block (&se->post, tmp); @@ -2821,7 +2825,7 @@ gfc_conv_intrinsic_repeat (gfc_se * se, gfc_expr * expr) arglist = NULL_TREE; arglist = gfc_chainon_list (arglist, var); arglist = chainon (arglist, args); - tmp = gfc_build_function_call (gfor_fndecl_string_repeat, arglist); + tmp = build_function_call_expr (gfor_fndecl_string_repeat, arglist); gfc_add_expr_to_block (&se->pre, tmp); se->expr = var; @@ -2840,7 +2844,7 @@ gfc_conv_intrinsic_iargc (gfc_se * se, gfc_expr * expr) /* Call the library function. This always returns an INTEGER(4). */ fndecl = gfor_fndecl_iargc; - tmp = gfc_build_function_call (fndecl, NULL_TREE); + tmp = build_function_call_expr (fndecl, NULL_TREE); /* Convert it to the required type. */ type = gfc_typenode_for_spec (&expr->ts); @@ -2894,7 +2898,7 @@ gfc_conv_intrinsic_function (gfc_se * se, gfc_expr * expr) name = &expr->value.function.name[2]; - if (expr->rank > 0) + if (expr->rank > 0 && !expr->inline_noncopying_intrinsic) { lib = gfc_is_intrinsic_libcall (expr); if (lib != 0) @@ -3119,6 +3123,16 @@ gfc_conv_intrinsic_function (gfc_se * se, gfc_expr * expr) gfc_conv_intrinsic_bound (se, expr, 0); break; + case GFC_ISYM_TRANSPOSE: + if (se->ss && se->ss->useflags) + { + gfc_conv_tmp_array_ref (se); + gfc_advance_se_ss_chain (se); + } + else + gfc_conv_array_transpose (se, expr->value.function.actual->expr); + break; + case GFC_ISYM_LEN: gfc_conv_intrinsic_len (se, expr); break; @@ -3369,7 +3383,7 @@ gfc_walk_intrinsic_function (gfc_ss * ss, gfc_expr * expr, gcc_assert (isym); if (isym->elemental) - return gfc_walk_elemental_function_args (ss, expr, GFC_SS_SCALAR); + return gfc_walk_elemental_function_args (ss, expr->value.function.actual, GFC_SS_SCALAR); if (expr->rank == 0) return ss; diff --git a/gcc/fortran/trans-io.c b/gcc/fortran/trans-io.c index 720ff5858e0..24b7bc944ed 100644 --- a/gcc/fortran/trans-io.c +++ b/gcc/fortran/trans-io.c @@ -160,7 +160,7 @@ gfc_build_st_parameter (enum ioparam_type ptype, tree *types) gcc_assert (len <= sizeof (name) - sizeof ("__st_parameter_")); memcpy (name, "__st_parameter_", sizeof ("__st_parameter_")); memcpy (name + sizeof ("__st_parameter_") - 1, st_parameter[ptype].name, - len); + len + 1); TYPE_NAME (t) = get_identifier (name); for (type = 0, p = st_parameter_field; type < IOPARM_field_num; type++, p++) @@ -414,7 +414,7 @@ set_parameter_ref (stmtblock_t *block, stmtblock_t *postblock, if (TYPE_MODE (TREE_TYPE (se.expr)) == TYPE_MODE (TREE_TYPE (TREE_TYPE (p->field)))) addr = convert (TREE_TYPE (p->field), - gfc_build_addr_expr (NULL, se.expr)); + build_fold_addr_expr (se.expr)); else { /* The type used by the library has different size @@ -423,7 +423,7 @@ set_parameter_ref (stmtblock_t *block, stmtblock_t *postblock, tree tmpvar = gfc_create_var (TREE_TYPE (TREE_TYPE (p->field)), st_parameter_field[type].name); - addr = gfc_build_addr_expr (NULL, tmpvar); + addr = build_fold_addr_expr (tmpvar); tmp = convert (TREE_TYPE (se.expr), tmpvar); gfc_add_modify_expr (postblock, se.expr, tmp); } @@ -491,7 +491,7 @@ gfc_convert_array_to_string (gfc_se * se, gfc_expr * e) { size = fold_build2 (MINUS_EXPR, gfc_array_index_type, size, TREE_OPERAND (se->expr, 1)); - se->expr = gfc_build_addr_expr (NULL, se->expr); + se->expr = build_fold_addr_expr (se->expr); } tmp = TYPE_SIZE_UNIT (gfc_get_element_type (type)); @@ -791,11 +791,15 @@ gfc_trans_open (gfc_code * code) if (p->err) mask |= IOPARM_common_err; + if (p->convert) + mask |= set_string (&block, &post_block, var, IOPARM_open_convert, + p->convert); + set_parameter_const (&block, var, IOPARM_common_flags, mask); - tmp = gfc_build_addr_expr (NULL_TREE, var); + tmp = build_fold_addr_expr (var); tmp = gfc_chainon_list (NULL_TREE, tmp); - tmp = gfc_build_function_call (iocall[IOCALL_OPEN], tmp); + tmp = build_function_call_expr (iocall[IOCALL_OPEN], tmp); gfc_add_expr_to_block (&block, tmp); gfc_add_block_to_block (&block, &post_block); @@ -846,9 +850,9 @@ gfc_trans_close (gfc_code * code) set_parameter_const (&block, var, IOPARM_common_flags, mask); - tmp = gfc_build_addr_expr (NULL_TREE, var); + tmp = build_fold_addr_expr (var); tmp = gfc_chainon_list (NULL_TREE, tmp); - tmp = gfc_build_function_call (iocall[IOCALL_CLOSE], tmp); + tmp = build_function_call_expr (iocall[IOCALL_CLOSE], tmp); gfc_add_expr_to_block (&block, tmp); gfc_add_block_to_block (&block, &post_block); @@ -897,9 +901,9 @@ build_filepos (tree function, gfc_code * code) set_parameter_const (&block, var, IOPARM_common_flags, mask); - tmp = gfc_build_addr_expr (NULL_TREE, var); + tmp = build_fold_addr_expr (var); tmp = gfc_chainon_list (NULL_TREE, tmp); - tmp = gfc_build_function_call (function, tmp); + tmp = build_function_call_expr (function, tmp); gfc_add_expr_to_block (&block, tmp); gfc_add_block_to_block (&block, &post_block); @@ -1073,11 +1077,15 @@ gfc_trans_inquire (gfc_code * code) if (p->err) mask |= IOPARM_common_err; + if (p->convert) + mask |= set_string (&block, &post_block, var, IOPARM_inquire_convert, + p->convert); + set_parameter_const (&block, var, IOPARM_common_flags, mask); - tmp = gfc_build_addr_expr (NULL_TREE, var); + tmp = build_fold_addr_expr (var); tmp = gfc_chainon_list (NULL_TREE, tmp); - tmp = gfc_build_function_call (iocall[IOCALL_INQUIRE], tmp); + tmp = build_function_call_expr (iocall[IOCALL_INQUIRE], tmp); gfc_add_expr_to_block (&block, tmp); gfc_add_block_to_block (&block, &post_block); @@ -1156,7 +1164,7 @@ nml_get_addr_expr (gfc_symbol * sym, gfc_component * c, dummy_arg_flagged = POINTER_TYPE_P (TREE_TYPE(tmp)); - itmp = (dummy_arg_flagged) ? gfc_build_indirect_ref (tmp) : tmp; + itmp = (dummy_arg_flagged) ? build_fold_indirect_ref (tmp) : tmp; /* If an array, set flag and use indirect ref. if built. */ @@ -1183,12 +1191,12 @@ nml_get_addr_expr (gfc_symbol * sym, gfc_component * c, /* Now build the address expression. */ - tmp = gfc_build_addr_expr (NULL, tmp); + tmp = build_fold_addr_expr (tmp); /* If scalar dummy, resolve indirect reference now. */ if (dummy_arg_flagged && !array_flagged) - tmp = gfc_build_indirect_ref (tmp); + tmp = build_fold_indirect_ref (tmp); gcc_assert (tmp && POINTER_TYPE_P (TREE_TYPE (tmp))); @@ -1279,7 +1287,7 @@ transfer_namelist_element (stmtblock_t * block, const char * var_name, The call for the scalar part transfers: (address, name, type, kind or string_length, dtype) */ - dt_parm_addr = gfc_build_addr_expr (NULL_TREE, dt_parm); + dt_parm_addr = build_fold_addr_expr (dt_parm); NML_FIRST_ARG (dt_parm_addr); NML_ADD_ARG (addr_expr); NML_ADD_ARG (string); @@ -1291,7 +1299,7 @@ transfer_namelist_element (stmtblock_t * block, const char * var_name, NML_ADD_ARG (convert (gfc_charlen_type_node, integer_zero_node)); NML_ADD_ARG (dtype); - tmp = gfc_build_function_call (iocall[IOCALL_SET_NML_VAL], args); + tmp = build_function_call_expr (iocall[IOCALL_SET_NML_VAL], args); gfc_add_expr_to_block (block, tmp); /* If the object is an array, transfer rank times: @@ -1304,7 +1312,7 @@ transfer_namelist_element (stmtblock_t * block, const char * var_name, NML_ADD_ARG (GFC_TYPE_ARRAY_STRIDE (dt, n_dim)); NML_ADD_ARG (GFC_TYPE_ARRAY_LBOUND (dt, n_dim)); NML_ADD_ARG (GFC_TYPE_ARRAY_UBOUND (dt, n_dim)); - tmp = gfc_build_function_call (iocall[IOCALL_SET_NML_VAL_DIM], args); + tmp = build_function_call_expr (iocall[IOCALL_SET_NML_VAL_DIM], args); gfc_add_expr_to_block (block, tmp); } @@ -1314,7 +1322,7 @@ transfer_namelist_element (stmtblock_t * block, const char * var_name, /* Provide the RECORD_TYPE to build component references. */ - tree expr = gfc_build_indirect_ref (addr_expr); + tree expr = build_fold_indirect_ref (addr_expr); for (cmp = ts->derived->components; cmp; cmp = cmp->next) { @@ -1457,9 +1465,9 @@ build_dt (tree function, gfc_code * code) else set_parameter_const (&block, var, IOPARM_common_flags, mask); - tmp = gfc_build_addr_expr (NULL_TREE, var); + tmp = build_fold_addr_expr (var); tmp = gfc_chainon_list (NULL_TREE, tmp); - tmp = gfc_build_function_call (function, tmp); + tmp = build_function_call_expr (function, tmp); gfc_add_expr_to_block (&block, tmp); gfc_add_block_to_block (&block, &post_block); @@ -1536,9 +1544,9 @@ gfc_trans_dt_end (gfc_code * code) gcc_unreachable (); } - tmp = gfc_build_addr_expr (NULL_TREE, dt_parm); + tmp = build_fold_addr_expr (dt_parm); tmp = gfc_chainon_list (NULL_TREE, tmp); - tmp = gfc_build_function_call (function, tmp); + tmp = build_function_call_expr (function, tmp); gfc_add_expr_to_block (&block, tmp); gfc_add_block_to_block (&block, dt_post_end_block); gfc_init_block (dt_post_end_block); @@ -1621,7 +1629,7 @@ transfer_array_component (tree expr, gfc_component * cm) /* Now se.expr contains an element of the array. Take the address and pass it to the IO routines. */ - tmp = gfc_build_addr_expr (NULL, se.expr); + tmp = build_fold_addr_expr (se.expr); transfer_expr (&se, &cm->ts, tmp); /* We are done now with the loop body. Wrap up the scalarizer and @@ -1684,7 +1692,7 @@ transfer_expr (gfc_se * se, gfc_typespec * ts, tree addr_expr) arg2 = se->string_length; else { - tmp = gfc_build_indirect_ref (addr_expr); + tmp = build_fold_indirect_ref (addr_expr); gcc_assert (TREE_CODE (TREE_TYPE (tmp)) == ARRAY_TYPE); arg2 = TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (tmp))); } @@ -1694,7 +1702,7 @@ transfer_expr (gfc_se * se, gfc_typespec * ts, tree addr_expr) case BT_DERIVED: /* Recurse into the elements of the derived type. */ expr = gfc_evaluate_now (addr_expr, &se->pre); - expr = gfc_build_indirect_ref (expr); + expr = build_fold_indirect_ref (expr); for (c = ts->derived->components; c; c = c->next) { @@ -1712,7 +1720,7 @@ transfer_expr (gfc_se * se, gfc_typespec * ts, tree addr_expr) else { if (!c->pointer) - tmp = gfc_build_addr_expr (NULL, tmp); + tmp = build_fold_addr_expr (tmp); transfer_expr (se, &c->ts, tmp); } } @@ -1722,12 +1730,12 @@ transfer_expr (gfc_se * se, gfc_typespec * ts, tree addr_expr) internal_error ("Bad IO basetype (%d)", ts->type); } - tmp = gfc_build_addr_expr (NULL_TREE, dt_parm); + tmp = build_fold_addr_expr (dt_parm); args = gfc_chainon_list (NULL_TREE, tmp); args = gfc_chainon_list (args, addr_expr); args = gfc_chainon_list (args, arg2); - tmp = gfc_build_function_call (function, args); + tmp = build_function_call_expr (function, args); gfc_add_expr_to_block (&se->pre, tmp); gfc_add_block_to_block (&se->pre, &se->post); @@ -1749,12 +1757,12 @@ transfer_array_desc (gfc_se * se, gfc_typespec * ts, tree addr_expr) kind_arg = build_int_cst (NULL_TREE, ts->kind); - tmp = gfc_build_addr_expr (NULL_TREE, dt_parm); + tmp = build_fold_addr_expr (dt_parm); args = gfc_chainon_list (NULL_TREE, tmp); args = gfc_chainon_list (args, addr_expr); args = gfc_chainon_list (args, kind_arg); args = gfc_chainon_list (args, charlen_arg); - tmp = gfc_build_function_call (iocall[IOCALL_X_ARRAY], args); + tmp = build_function_call_expr (iocall[IOCALL_X_ARRAY], args); gfc_add_expr_to_block (&se->pre, tmp); gfc_add_block_to_block (&se->pre, &se->post); } @@ -1768,6 +1776,7 @@ gfc_trans_transfer (gfc_code * code) stmtblock_t block, body; gfc_loopinfo loop; gfc_expr *expr; + gfc_ref *ref; gfc_ss *ss; gfc_se se; tree tmp; @@ -1778,6 +1787,7 @@ gfc_trans_transfer (gfc_code * code) expr = code->expr; ss = gfc_walk_expr (expr); + ref = NULL; gfc_init_se (&se, NULL); if (ss == gfc_ss_terminator) @@ -1788,33 +1798,23 @@ gfc_trans_transfer (gfc_code * code) } else { - /* Transfer an array. There are 3 options: - 1) An array of an intrinsic type. This is handled by transfering - the descriptor to the library. - 2) A derived type containing an array. Scalarized by the frontend. - 3) An array of derived type. Scalarized by the frontend. - */ - if (expr->ts.type != BT_DERIVED) + /* Transfer an array. If it is an array of an intrinsic + type, pass the descriptor to the library. Otherwise + scalarize the transfer. */ + if (expr->ref) + { + for (ref = expr->ref; ref && ref->type != REF_ARRAY; + ref = ref->next); + gcc_assert (ref->type == REF_ARRAY); + } + + if (expr->ts.type != BT_DERIVED && ref && ref->next == NULL) { /* Get the descriptor. */ gfc_conv_expr_descriptor (&se, expr, ss); - /* If it's not an array of derived type, transfer the array - descriptor to the library. */ - tmp = gfc_get_dtype (TREE_TYPE (se.expr)); - if (((TREE_INT_CST_LOW (tmp) & GFC_DTYPE_TYPE_MASK) - >> GFC_DTYPE_TYPE_SHIFT) != GFC_DTYPE_DERIVED) - { - tmp = gfc_build_addr_expr (NULL, se.expr); - transfer_array_desc (&se, &expr->ts, tmp); - goto finish_block_label; - } - else - { - /* Cleanup the mess getting the descriptor caused. */ - expr = code->expr; - ss = gfc_walk_expr (expr); - gfc_init_se (&se, NULL); - } + tmp = build_fold_addr_expr (se.expr); + transfer_array_desc (&se, &expr->ts, tmp); + goto finish_block_label; } /* Initialize the scalarizer. */ diff --git a/gcc/fortran/trans-stmt.c b/gcc/fortran/trans-stmt.c index f0fefdc3580..df93db618b2 100644 --- a/gcc/fortran/trans-stmt.c +++ b/gcc/fortran/trans-stmt.c @@ -209,6 +209,7 @@ tree gfc_trans_call (gfc_code * code) { gfc_se se; + gfc_ss * ss; int has_alternate_specifier; /* A CALL starts a new block because the actual arguments may have to @@ -218,28 +219,81 @@ gfc_trans_call (gfc_code * code) gcc_assert (code->resolved_sym); - /* Translate the call. */ - has_alternate_specifier - = gfc_conv_function_call (&se, code->resolved_sym, code->ext.actual); + ss = gfc_ss_terminator; + if (code->resolved_sym->attr.elemental) + ss = gfc_walk_elemental_function_args (ss, code->ext.actual, GFC_SS_REFERENCE); - /* A subroutine without side-effect, by definition, does nothing! */ - TREE_SIDE_EFFECTS (se.expr) = 1; - - /* Chain the pieces together and return the block. */ - if (has_alternate_specifier) + /* Is not an elemental subroutine call with array valued arguments. */ + if (ss == gfc_ss_terminator) { - gfc_code *select_code; - gfc_symbol *sym; - select_code = code->next; - gcc_assert(select_code->op == EXEC_SELECT); - sym = select_code->expr->symtree->n.sym; - se.expr = convert (gfc_typenode_for_spec (&sym->ts), se.expr); - gfc_add_modify_expr (&se.pre, sym->backend_decl, se.expr); + + /* Translate the call. */ + has_alternate_specifier + = gfc_conv_function_call (&se, code->resolved_sym, code->ext.actual); + + /* A subroutine without side-effect, by definition, does nothing! */ + TREE_SIDE_EFFECTS (se.expr) = 1; + + /* Chain the pieces together and return the block. */ + if (has_alternate_specifier) + { + gfc_code *select_code; + gfc_symbol *sym; + select_code = code->next; + gcc_assert(select_code->op == EXEC_SELECT); + sym = select_code->expr->symtree->n.sym; + se.expr = convert (gfc_typenode_for_spec (&sym->ts), se.expr); + gfc_add_modify_expr (&se.pre, sym->backend_decl, se.expr); + } + else + gfc_add_expr_to_block (&se.pre, se.expr); + + gfc_add_block_to_block (&se.pre, &se.post); } + else - gfc_add_expr_to_block (&se.pre, se.expr); + { + /* An elemental subroutine call with array valued arguments has + to be scalarized. */ + gfc_loopinfo loop; + stmtblock_t body; + stmtblock_t block; + gfc_se loopse; + + /* gfc_walk_elemental_function_args renders the ss chain in the + reverse order to the actual argument order. */ + ss = gfc_reverse_ss (ss); + + /* Initialize the loop. */ + gfc_init_se (&loopse, NULL); + gfc_init_loopinfo (&loop); + gfc_add_ss_to_loop (&loop, ss); + + gfc_conv_ss_startstride (&loop); + gfc_conv_loop_setup (&loop); + gfc_mark_ss_chain_used (ss, 1); + + /* Generate the loop body. */ + gfc_start_scalarized_body (&loop, &body); + gfc_init_block (&block); + gfc_copy_loopinfo_to_se (&loopse, &loop); + loopse.ss = ss; + + /* Add the subroutine call to the block. */ + gfc_conv_function_call (&loopse, code->resolved_sym, code->ext.actual); + gfc_add_expr_to_block (&loopse.pre, loopse.expr); + + gfc_add_block_to_block (&block, &loopse.pre); + gfc_add_block_to_block (&block, &loopse.post); + + /* Finish up the loop block and the loop. */ + gfc_add_expr_to_block (&body, gfc_finish_block (&block)); + gfc_trans_scalarizing_loops (&loop, &body); + gfc_add_block_to_block (&se.pre, &loop.pre); + gfc_add_block_to_block (&se.pre, &loop.post); + gfc_cleanup_loop (&loop); + } - gfc_add_block_to_block (&se.pre, &se.post); return gfc_finish_block (&se.pre); } @@ -317,7 +371,7 @@ gfc_trans_pause (gfc_code * code) fndecl = gfor_fndecl_pause_string; } - tmp = gfc_build_function_call (fndecl, args); + tmp = build_function_call_expr (fndecl, args); gfc_add_expr_to_block (&se.pre, tmp); gfc_add_block_to_block (&se.pre, &se.post); @@ -357,7 +411,7 @@ gfc_trans_stop (gfc_code * code) fndecl = gfor_fndecl_stop_string; } - tmp = gfc_build_function_call (fndecl, args); + tmp = build_function_call_expr (fndecl, args); gfc_add_expr_to_block (&se.pre, tmp); gfc_add_block_to_block (&se.pre, &se.post); @@ -1283,7 +1337,7 @@ gfc_trans_character_select (gfc_code *code) gfc_add_block_to_block (&block, &se.pre); - tmp = gfc_build_function_call (gfor_fndecl_select_string, args); + tmp = build_function_call_expr (gfor_fndecl_select_string, args); tmp = build1 (GOTO_EXPR, void_type_node, tmp); gfc_add_expr_to_block (&block, tmp); @@ -1471,7 +1525,7 @@ gfc_trans_nested_forall_loop (forall_info * nested_forall_info, tree body, { /* If a mask was specified make the assignment conditional. */ if (pmask) - tmp = gfc_build_indirect_ref (mask); + tmp = build_fold_indirect_ref (mask); else tmp = mask; tmp = gfc_build_array_ref (tmp, maskindex); @@ -1534,7 +1588,7 @@ gfc_do_allocate (tree bytesize, tree size, tree * pdata, stmtblock_t * pblock, tmp = gfor_fndecl_internal_malloc64; else gcc_unreachable (); - tmp = gfc_build_function_call (tmp, args); + tmp = build_function_call_expr (tmp, args); tmp = convert (TREE_TYPE (tmpvar), tmp); gfc_add_modify_expr (pblock, tmpvar, tmp); } @@ -1890,7 +1944,7 @@ allocate_temp_for_forall_nest_1 (tree type, tree size, stmtblock_t * block, temp1 = gfc_do_allocate (bytesize, size, ptemp1, block, type); if (*ptemp1) - tmp = gfc_build_indirect_ref (temp1); + tmp = build_fold_indirect_ref (temp1); else tmp = temp1; @@ -2019,7 +2073,7 @@ gfc_trans_assign_need_temp (gfc_expr * expr1, gfc_expr * expr2, tree wheremask, { /* Free the temporary. */ tmp = gfc_chainon_list (NULL_TREE, ptemp1); - tmp = gfc_build_function_call (gfor_fndecl_internal_free, tmp); + tmp = build_function_call_expr (gfor_fndecl_internal_free, tmp); gfc_add_expr_to_block (block, tmp); } } @@ -2068,7 +2122,8 @@ gfc_trans_pointer_assign_need_temp (gfc_expr * expr1, gfc_expr * expr2, rse.want_pointer = 1; gfc_conv_expr (&rse, expr2); gfc_add_block_to_block (&body, &rse.pre); - gfc_add_modify_expr (&body, lse.expr, rse.expr); + gfc_add_modify_expr (&body, lse.expr, + fold_convert (TREE_TYPE (lse.expr), rse.expr)); gfc_add_block_to_block (&body, &rse.post); /* Increment count. */ @@ -2177,7 +2232,7 @@ gfc_trans_pointer_assign_need_temp (gfc_expr * expr1, gfc_expr * expr2, if (ptemp1) { tmp = gfc_chainon_list (NULL_TREE, ptemp1); - tmp = gfc_build_function_call (gfor_fndecl_internal_free, tmp); + tmp = build_function_call_expr (gfor_fndecl_internal_free, tmp); gfc_add_expr_to_block (block, tmp); } } @@ -2404,7 +2459,7 @@ gfc_trans_forall_1 (gfc_code * code, forall_info * nested_forall_info) se.expr = convert (smallest_boolean_type_node, se.expr); if (pmask) - tmp = gfc_build_indirect_ref (mask); + tmp = build_fold_indirect_ref (mask); else tmp = mask; tmp = gfc_build_array_ref (tmp, maskindex); @@ -2468,7 +2523,7 @@ gfc_trans_forall_1 (gfc_code * code, forall_info * nested_forall_info) /* Free the temporary. */ args = gfc_chainon_list (NULL_TREE, temp->temporary); - tmp = gfc_build_function_call (gfor_fndecl_internal_free, args); + tmp = build_function_call_expr (gfor_fndecl_internal_free, args); gfc_add_expr_to_block (&block, tmp); p = temp; @@ -2501,6 +2556,14 @@ gfc_trans_forall_1 (gfc_code * code, forall_info * nested_forall_info) gfc_add_expr_to_block (&block, tmp); break; + /* Explicit subroutine calls are prevented by the frontend but interface + assignments can legitimately produce them. */ + case EXEC_CALL: + assign = gfc_trans_call (c); + tmp = gfc_trans_nested_forall_loop (nested_forall_info, assign, 1, 1); + gfc_add_expr_to_block (&block, tmp); + break; + default: gcc_unreachable (); } @@ -2524,7 +2587,7 @@ gfc_trans_forall_1 (gfc_code * code, forall_info * nested_forall_info) { /* Free the temporary for the mask. */ tmp = gfc_chainon_list (NULL_TREE, pmask); - tmp = gfc_build_function_call (gfor_fndecl_internal_free, tmp); + tmp = build_function_call_expr (gfor_fndecl_internal_free, tmp); gfc_add_expr_to_block (&block, tmp); } if (maskindex) @@ -3068,7 +3131,7 @@ gfc_trans_where (gfc_code * code) while (temp) { args = gfc_chainon_list (NULL_TREE, temp->temporary); - tmp = gfc_build_function_call (gfor_fndecl_internal_free, args); + tmp = build_function_call_expr (gfor_fndecl_internal_free, args); gfc_add_expr_to_block (&block, tmp); p = temp; @@ -3135,7 +3198,7 @@ gfc_trans_allocate (gfc_code * code) tree gfc_int4_type_node = gfc_get_int_type (4); stat = gfc_create_var (gfc_int4_type_node, "stat"); - pstat = gfc_build_addr_expr (NULL, stat); + pstat = build_fold_addr_expr (stat); error_label = gfc_build_label_decl (NULL_TREE); TREE_USED (error_label) = 1; @@ -3185,7 +3248,7 @@ gfc_trans_allocate (gfc_code * code) parm = gfc_chainon_list (NULL_TREE, val); parm = gfc_chainon_list (parm, tmp); parm = gfc_chainon_list (parm, pstat); - tmp = gfc_build_function_call (gfor_fndecl_allocate, parm); + tmp = build_function_call_expr (gfor_fndecl_allocate, parm); gfc_add_expr_to_block (&se.pre, tmp); if (code->expr) @@ -3253,11 +3316,11 @@ gfc_trans_deallocate (gfc_code * code) /* Variable used with the library call. */ stat = gfc_create_var (gfc_int4_type_node, "stat"); - pstat = gfc_build_addr_expr (NULL, stat); + pstat = build_fold_addr_expr (stat); /* Running total of possible deallocation failures. */ astat = gfc_create_var (gfc_int4_type_node, "astat"); - apstat = gfc_build_addr_expr (NULL, astat); + apstat = build_fold_addr_expr (astat); /* Initialize astat to 0. */ gfc_add_modify_expr (&block, astat, build_int_cst (TREE_TYPE (astat), 0)); @@ -3291,7 +3354,7 @@ gfc_trans_deallocate (gfc_code * code) parm = gfc_chainon_list (NULL_TREE, var); parm = gfc_chainon_list (parm, pstat); - tmp = gfc_build_function_call (gfor_fndecl_deallocate, parm); + tmp = build_function_call_expr (gfor_fndecl_deallocate, parm); } gfc_add_expr_to_block (&se.pre, tmp); diff --git a/gcc/fortran/trans-types.c b/gcc/fortran/trans-types.c index 6aaf81a5b4c..fcdef6a0c0e 100644 --- a/gcc/fortran/trans-types.c +++ b/gcc/fortran/trans-types.c @@ -1395,13 +1395,57 @@ gfc_add_field_to_struct (tree *fieldlist, tree context, } -/* Build a tree node for a derived type. */ +/* Copy the backend_decl and component backend_decls if + the two derived type symbols are "equal", as described + in 4.4.2 and resolved by gfc_compare_derived_types. */ + +static int +copy_dt_decls_ifequal (gfc_symbol *from, gfc_symbol *to) +{ + gfc_component *to_cm; + gfc_component *from_cm; + + if (from->backend_decl == NULL + || !gfc_compare_derived_types (from, to)) + return 0; + + to->backend_decl = from->backend_decl; + + to_cm = to->components; + from_cm = from->components; + + /* Copy the component declarations. If a component is itself + a derived type, we need a copy of its component declarations. + This is done by recursing into gfc_get_derived_type and + ensures that the component's component declarations have + been built. If it is a character, we need the character + length, as well. */ + for (; to_cm; to_cm = to_cm->next, from_cm = from_cm->next) + { + to_cm->backend_decl = from_cm->backend_decl; + if (from_cm->ts.type == BT_DERIVED) + gfc_get_derived_type (to_cm->ts.derived); + + else if (from_cm->ts.type == BT_CHARACTER) + to_cm->ts.cl->backend_decl = from_cm->ts.cl->backend_decl; + } + + return 1; +} + + +/* Build a tree node for a derived type. If there are equal + derived types, with different local names, these are built + at the same time. If an equal derived type has been built + in a parent namespace, this is used. */ static tree gfc_get_derived_type (gfc_symbol * derived) { tree typenode, field, field_type, fieldlist; gfc_component *c; + gfc_dt_list *dt; + gfc_namespace * ns; gcc_assert (derived && derived->attr.flavor == FL_DERIVED); @@ -1417,6 +1461,29 @@ gfc_get_derived_type (gfc_symbol * derived) } else { + /* In a module, if an equal derived type is already available in the + specification block, use its backend declaration and those of its + components, rather than building anew so that potential dummy and + actual arguments use the same TREE_TYPE. Non-module structures, + need to be built, if found, because the order of visits to the + namespaces is different. */ + + for (ns = derived->ns->parent; ns; ns = ns->parent) + { + for (dt = ns->derived_types; dt; dt = dt->next) + { + if (derived->module == NULL + && dt->derived->backend_decl == NULL + && gfc_compare_derived_types (dt->derived, derived)) + gfc_get_derived_type (dt->derived); + + if (copy_dt_decls_ifequal (dt->derived, derived)) + break; + } + if (derived->backend_decl) + goto other_equal_dts; + } + /* We see this derived type first time, so build the type node. */ typenode = make_node (RECORD_TYPE); TYPE_NAME (typenode) = get_identifier (derived->name); @@ -1495,9 +1562,16 @@ gfc_get_derived_type (gfc_symbol * derived) derived->backend_decl = typenode; - return typenode; +other_equal_dts: + /* Add this backend_decl to all the other, equal derived types and + their components in this namespace. */ + for (dt = derived->ns->derived_types; dt; dt = dt->next) + copy_dt_decls_ifequal (derived, dt->derived); + + return derived->backend_decl; } - + + int gfc_return_by_reference (gfc_symbol * sym) { diff --git a/gcc/fortran/trans.c b/gcc/fortran/trans.c index a3c3ddc48fb..26fd37d4998 100644 --- a/gcc/fortran/trans.c +++ b/gcc/fortran/trans.c @@ -282,22 +282,6 @@ gfc_build_addr_expr (tree type, tree t) } -/* Build an INDIRECT_REF with its natural type. */ - -tree -gfc_build_indirect_ref (tree t) -{ - tree type = TREE_TYPE (t); - gcc_assert (POINTER_TYPE_P (type)); - type = TREE_TYPE (type); - - if (TREE_CODE (t) == ADDR_EXPR) - return TREE_OPERAND (t, 0); - else - return build1 (INDIRECT_REF, type, t); -} - - /* Build an ARRAY_REF with its natural type. */ tree @@ -314,24 +298,6 @@ gfc_build_array_ref (tree base, tree offset) } -/* Given a function declaration FNDECL and an argument list ARGLIST, - build a CALL_EXPR. */ - -tree -gfc_build_function_call (tree fndecl, tree arglist) -{ - tree fn; - tree call; - - fn = gfc_build_addr_expr (NULL, fndecl); - call = build3 (CALL_EXPR, TREE_TYPE (TREE_TYPE (fndecl)), - fn, arglist, NULL); - TREE_SIDE_EFFECTS (call) = 1; - - return call; -} - - /* Generate a runtime error if COND is true. */ void @@ -363,7 +329,7 @@ gfc_trans_runtime_check (tree cond, tree msg, stmtblock_t * pblock) tmp = build_int_cst (NULL_TREE, input_line); args = gfc_chainon_list (args, tmp); - tmp = gfc_build_function_call (gfor_fndecl_runtime_error, args); + tmp = build_function_call_expr (gfor_fndecl_runtime_error, args); gfc_add_expr_to_block (&block, tmp); body = gfc_finish_block (&block); @@ -377,7 +343,7 @@ gfc_trans_runtime_check (tree cond, tree msg, stmtblock_t * pblock) /* Tell the compiler that this isn't likely. */ tmp = gfc_chainon_list (NULL_TREE, cond); tmp = gfc_chainon_list (tmp, integer_zero_node); - cond = gfc_build_function_call (built_in_decls[BUILT_IN_EXPECT], tmp); + cond = build_function_call_expr (built_in_decls[BUILT_IN_EXPECT], tmp); tmp = build3_v (COND_EXPR, cond, body, build_empty_stmt ()); gfc_add_expr_to_block (pblock, tmp); @@ -395,7 +361,8 @@ gfc_add_expr_to_block (stmtblock_t * block, tree expr) if (expr == NULL_TREE || IS_EMPTY_STMT (expr)) return; - if (TREE_CODE (expr) != STATEMENT_LIST) + if (TREE_CODE (expr) != STATEMENT_LIST + && TREE_CODE_CLASS (TREE_CODE (expr)) != tcc_statement) expr = fold (expr); if (block->head) diff --git a/gcc/fortran/trans.h b/gcc/fortran/trans.h index 02fc2759609..e4f998a9690 100644 --- a/gcc/fortran/trans.h +++ b/gcc/fortran/trans.h @@ -1,5 +1,5 @@ /* Header for code translation functions - Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc. + Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. Contributed by Paul Brook This file is part of GCC. @@ -268,6 +268,9 @@ void gfc_make_safe_expr (gfc_se * se); /* Makes sure se is suitable for passing as a function string parameter. */ void gfc_conv_string_parameter (gfc_se * se); +/* Compare two strings. */ +tree gfc_build_compare_string (tree, tree, tree, tree); + /* Add an item to the end of TREE_LIST. */ tree gfc_chainon_list (tree, tree); @@ -345,15 +348,9 @@ tree gfc_get_extern_function_decl (gfc_symbol *); /* Return the decl for a function. */ tree gfc_get_function_decl (gfc_symbol *); -/* Build a CALL_EXPR. */ -tree gfc_build_function_call (tree, tree); - /* Build an ADDR_EXPR. */ tree gfc_build_addr_expr (tree, tree); -/* Build an INDIRECT_REF. */ -tree gfc_build_indirect_ref (tree); - /* Build an ARRAY_REF. */ tree gfc_build_array_ref (tree, tree); @@ -576,7 +573,7 @@ struct lang_decl GTY(()) #define gfc_todo_error(args...) fatal_error("gfc_todo: Not Implemented: " args) /* Build an expression with void type. */ -#define build1_v(code, arg) build(code, void_type_node, arg) +#define build1_v(code, arg) build1(code, void_type_node, arg) #define build2_v(code, arg1, arg2) build2(code, void_type_node, \ arg1, arg2) #define build3_v(code, arg1, arg2, arg3) build3(code, void_type_node, \ diff --git a/gcc/function.c b/gcc/function.c index dc5d0c53d47..25bc7b70f45 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -1590,6 +1590,22 @@ instantiate_decl (rtx x) for_each_rtx (&XEXP (x, 0), instantiate_virtual_regs_in_rtx, NULL); } +/* Helper for instantiate_decls called via walk_tree: Process all decls + in the given DECL_VALUE_EXPR. */ + +static tree +instantiate_expr (tree *tp, int *walk_subtrees, void *data ATTRIBUTE_UNUSED) +{ + tree t = *tp; + if (! EXPR_P (t)) + { + *walk_subtrees = 0; + if (DECL_P (t) && DECL_RTL_SET_P (t)) + instantiate_decl (DECL_RTL (t)); + } + return NULL; +} + /* Subroutine of instantiate_decls: Process all decls in the given BLOCK node and all its subblocks. */ @@ -1599,8 +1615,15 @@ instantiate_decls_1 (tree let) tree t; for (t = BLOCK_VARS (let); t; t = TREE_CHAIN (t)) - if (DECL_RTL_SET_P (t)) - instantiate_decl (DECL_RTL (t)); + { + if (DECL_RTL_SET_P (t)) + instantiate_decl (DECL_RTL (t)); + if (TREE_CODE (t) == VAR_DECL && DECL_HAS_VALUE_EXPR_P (t)) + { + tree v = DECL_VALUE_EXPR (t); + walk_tree (&v, instantiate_expr, NULL, NULL); + } + } /* Process all subblocks. */ for (t = BLOCK_SUBBLOCKS (let); t; t = TREE_CHAIN (t)) @@ -1620,6 +1643,11 @@ instantiate_decls (tree fndecl) { instantiate_decl (DECL_RTL (decl)); instantiate_decl (DECL_INCOMING_RTL (decl)); + if (DECL_HAS_VALUE_EXPR_P (decl)) + { + tree v = DECL_VALUE_EXPR (decl); + walk_tree (&v, instantiate_expr, NULL, NULL); + } } /* Now process all variables defined in the function or its subblocks. */ @@ -4383,14 +4411,6 @@ expand_function_end (void) clear_pending_stack_adjust (); do_pending_stack_adjust (); - /* @@@ This is a kludge. We want to ensure that instructions that - may trap are not moved into the epilogue by scheduling, because - we don't always emit unwind information for the epilogue. - However, not all machine descriptions define a blockage insn, so - emit an ASM_INPUT to act as one. */ - if (flag_non_call_exceptions) - emit_insn (gen_rtx_ASM_INPUT (VOIDmode, "")); - /* Mark the end of the function body. If control reaches this insn, the function can drop through without returning a value. */ @@ -4422,10 +4442,23 @@ expand_function_end (void) /* Output the label for the actual return from the function. */ emit_label (return_label); - /* Let except.c know where it should emit the call to unregister - the function context for sjlj exceptions. */ - if (flag_exceptions && USING_SJLJ_EXCEPTIONS) - sjlj_emit_function_exit_after (get_last_insn ()); + if (USING_SJLJ_EXCEPTIONS) + { + /* Let except.c know where it should emit the call to unregister + the function context for sjlj exceptions. */ + if (flag_exceptions) + sjlj_emit_function_exit_after (get_last_insn ()); + } + else + { + /* @@@ This is a kludge. We want to ensure that instructions that + may trap are not moved into the epilogue by scheduling, because + we don't always emit unwind information for the epilogue. + However, not all machine descriptions define a blockage insn, so + emit an ASM_INPUT to act as one. */ + if (flag_non_call_exceptions) + emit_insn (gen_rtx_ASM_INPUT (VOIDmode, "")); + } /* If this is an implementation of throw, do what's necessary to communicate between __builtin_eh_return and the epilogue. */ @@ -5300,7 +5333,8 @@ thread_prologue_and_epilogue_insns (rtx f ATTRIBUTE_UNUSED) fixup_fallthru_exit_predecessor. */ cfg_layout_initialize (0); FOR_EACH_BB (cur_bb) - if (cur_bb->index >= 0 && cur_bb->next_bb->index >= 0) + if (cur_bb->index >= NUM_FIXED_BLOCKS + && cur_bb->next_bb->index >= NUM_FIXED_BLOCKS) cur_bb->aux = cur_bb->next_bb; cfg_layout_finalize (); } diff --git a/gcc/gcc.c b/gcc/gcc.c index 6f4b65b2e50..56f12901fef 100644 --- a/gcc/gcc.c +++ b/gcc/gcc.c @@ -287,10 +287,12 @@ static char *load_specs (const char *); static void read_specs (const char *, int); static void set_spec (const char *, const char *); static struct compiler *lookup_compiler (const char *, size_t, const char *); -static char *build_search_list (struct path_prefix *, const char *, int); -static void putenv_from_prefixes (struct path_prefix *, const char *); +static char *build_search_list (const struct path_prefix *, const char *, + bool, bool); +static void putenv_from_prefixes (const struct path_prefix *, const char *, + bool); static int access_check (const char *, int); -static char *find_a_file (struct path_prefix *, const char *, int, int); +static char *find_a_file (const struct path_prefix *, const char *, int, bool); static void add_prefix (struct path_prefix *, const char *, const char *, int, int, int); static void add_sysrooted_prefix (struct path_prefix *, const char *, @@ -313,13 +315,12 @@ static const char *eval_spec_function (const char *, const char *); static const char *handle_spec_function (const char *); static char *save_string (const char *, int); static void set_collect_gcc_options (void); -static void do_spec_path (struct prefix_list *, const char *, int, int, int, const char *, const char *); static int do_spec_1 (const char *, int, const char *); static int do_spec_2 (const char *); static void do_option_spec (const char *, const char *); static void do_self_spec (const char *); static const char *find_file (const char *); -static int is_directory (const char *, const char *, int); +static int is_directory (const char *, bool); static const char *validate_switches (const char *); static void validate_all_switches (void); static inline void validate_switches_from_spec (const char *); @@ -1600,25 +1601,30 @@ init_gcc_specs (struct obstack *obstack, const char *shared_name, { char *buf; - buf = concat ("%{static|static-libgcc:", static_name, " ", eh_name, - "}%{!static:%{!static-libgcc:", + buf = concat ("%{static|static-libgcc:", static_name, " ", eh_name, "}" + "%{!static:%{!static-libgcc:" #if USE_LD_AS_NEEDED - "%{!shared-libgcc:", static_name, - " --as-needed ", shared_name, " --no-as-needed}" - "%{shared-libgcc:", shared_name, "%{!shared: ", static_name, - "}", + "%{!shared-libgcc:", + static_name, " --as-needed ", shared_name, " --no-as-needed" + "}" + "%{shared-libgcc:", + shared_name, "%{!shared: ", static_name, "}" + "}" #else - "%{!shared:%{!shared-libgcc:", static_name, " ", - eh_name, "}%{shared-libgcc:", shared_name, " ", - static_name, "}}%{shared:", + "%{!shared:" + "%{!shared-libgcc:", static_name, " ", eh_name, "}" + "%{shared-libgcc:", shared_name, " ", static_name, "}" + "}" #ifdef LINK_EH_SPEC - "%{shared-libgcc:", shared_name, - "}%{!shared-libgcc:", static_name, "}", + "%{shared:" + "%{shared-libgcc:", shared_name, "}" + "%{!shared-libgcc:", static_name, "}" + "}" #else - shared_name, + "%{shared:", shared_name, "}" #endif #endif - "}}}", NULL); + "}}", NULL); obstack_grow (obstack, buf, strlen (buf)); free (buf); @@ -2036,7 +2042,7 @@ read_specs (const char *filename, int main_p) (long) (p1 - buffer + 1)); p[-2] = '\0'; - new_filename = find_a_file (&startfile_prefixes, p1, R_OK, 0); + new_filename = find_a_file (&startfile_prefixes, p1, R_OK, true); read_specs (new_filename ? new_filename : p1, FALSE); continue; } @@ -2055,7 +2061,7 @@ read_specs (const char *filename, int main_p) (long) (p1 - buffer + 1)); p[-2] = '\0'; - new_filename = find_a_file (&startfile_prefixes, p1, R_OK, 0); + new_filename = find_a_file (&startfile_prefixes, p1, R_OK, true); if (new_filename) read_specs (new_filename, FALSE); else if (verbose_flag) @@ -2352,65 +2358,214 @@ clear_failure_queue (void) failure_delete_queue = 0; } -/* Build a list of search directories from PATHS. - PREFIX is a string to prepend to the list. - If CHECK_DIR_P is nonzero we ensure the directory exists. - This is used mostly by putenv_from_prefixes so we use `collect_obstack'. - It is also used by the --print-search-dirs flag. */ - -static char * -build_search_list (struct path_prefix *paths, const char *prefix, - int check_dir_p) +/* Call CALLBACK for each path in PATHS, breaking out early if CALLBACK + returns non-NULL. + If DO_MULTI is true iterate over the paths twice, first with multilib + suffix then without, otherwise iterate over the paths once without + adding a multilib suffix. When DO_MULTI is true, some attempt is made + to avoid visiting the same path twice, but we could do better. For + instance, /usr/lib/../lib is considered different from /usr/lib. + At least EXTRA_SPACE chars past the end of the path passed to + CALLBACK are available for use by the callback. + CALLBACK_INFO allows extra parameters to be passed to CALLBACK. + + Returns the value returned by CALLBACK. */ + +static void * +for_each_path (const struct path_prefix *paths, + bool do_multi, + size_t extra_space, + void *(*callback) (char *, void *), + void *callback_info) { - int suffix_len = (machine_suffix) ? strlen (machine_suffix) : 0; - int just_suffix_len - = (just_machine_suffix) ? strlen (just_machine_suffix) : 0; - int first_time = TRUE; - struct prefix_list *pprefix; - - obstack_grow (&collect_obstack, prefix, strlen (prefix)); - obstack_1grow (&collect_obstack, '='); - - for (pprefix = paths->plist; pprefix != 0; pprefix = pprefix->next) + struct prefix_list *pl; + const char *multi_dir = NULL; + const char *multi_os_dir = NULL; + const char *multi_suffix; + const char *just_multi_suffix; + char *path = NULL; + void *ret = NULL; + bool skip_multi_dir = false; + bool skip_multi_os_dir = false; + + multi_suffix = machine_suffix; + just_multi_suffix = just_machine_suffix; + if (do_multi && multilib_dir && strcmp (multilib_dir, ".") != 0) { - int len = strlen (pprefix->prefix); + multi_dir = concat (multilib_dir, dir_separator_str, NULL); + multi_suffix = concat (multi_suffix, multi_dir, NULL); + just_multi_suffix = concat (just_multi_suffix, multi_dir, NULL); + } + if (do_multi && multilib_os_dir && strcmp (multilib_os_dir, ".") != 0) + multi_os_dir = concat (multilib_os_dir, dir_separator_str, NULL); - if (machine_suffix - && (! check_dir_p - || is_directory (pprefix->prefix, machine_suffix, 0))) + while (1) + { + size_t multi_dir_len = 0; + size_t multi_os_dir_len = 0; + size_t suffix_len; + size_t just_suffix_len; + size_t len; + + if (multi_dir) + multi_dir_len = strlen (multi_dir); + if (multi_os_dir) + multi_os_dir_len = strlen (multi_os_dir); + suffix_len = strlen (multi_suffix); + just_suffix_len = strlen (just_multi_suffix); + + if (path == NULL) { - if (!first_time) - obstack_1grow (&collect_obstack, PATH_SEPARATOR); - - first_time = FALSE; - obstack_grow (&collect_obstack, pprefix->prefix, len); - obstack_grow (&collect_obstack, machine_suffix, suffix_len); + len = paths->max_len + extra_space + 1; + if (suffix_len > multi_os_dir_len) + len += suffix_len; + else + len += multi_os_dir_len; + path = xmalloc (len); } - if (just_machine_suffix - && pprefix->require_machine_suffix == 2 - && (! check_dir_p - || is_directory (pprefix->prefix, just_machine_suffix, 0))) + for (pl = paths->plist; pl != 0; pl = pl->next) { - if (! first_time) - obstack_1grow (&collect_obstack, PATH_SEPARATOR); + len = strlen (pl->prefix); + memcpy (path, pl->prefix, len); - first_time = FALSE; - obstack_grow (&collect_obstack, pprefix->prefix, len); - obstack_grow (&collect_obstack, just_machine_suffix, - just_suffix_len); + /* Look first in MACHINE/VERSION subdirectory. */ + if (!skip_multi_dir) + { + memcpy (path + len, multi_suffix, suffix_len + 1); + ret = callback (path, callback_info); + if (ret) + break; + } + + /* Some paths are tried with just the machine (ie. target) + subdir. This is used for finding as, ld, etc. */ + if (!skip_multi_dir + && pl->require_machine_suffix == 2) + { + memcpy (path + len, just_multi_suffix, just_suffix_len + 1); + ret = callback (path, callback_info); + if (ret) + break; + } + + /* Now try the base path. */ + if (!pl->require_machine_suffix + && !(pl->os_multilib ? skip_multi_os_dir : skip_multi_dir)) + { + const char *this_multi; + size_t this_multi_len; + + if (pl->os_multilib) + { + this_multi = multi_os_dir; + this_multi_len = multi_os_dir_len; + } + else + { + this_multi = multi_dir; + this_multi_len = multi_dir_len; + } + + if (this_multi_len) + memcpy (path + len, this_multi, this_multi_len + 1); + else + path[len] = '\0'; + + ret = callback (path, callback_info); + if (ret) + break; + } } + if (pl) + break; - if (! pprefix->require_machine_suffix) - { - if (! first_time) - obstack_1grow (&collect_obstack, PATH_SEPARATOR); + if (multi_dir == NULL && multi_os_dir == NULL) + break; - first_time = FALSE; - obstack_grow (&collect_obstack, pprefix->prefix, len); + /* Run through the paths again, this time without multilibs. + Don't repeat any we have already seen. */ + if (multi_dir) + { + free ((char *) multi_dir); + multi_dir = NULL; + free ((char *) multi_suffix); + multi_suffix = machine_suffix; + free ((char *) just_multi_suffix); + just_multi_suffix = just_machine_suffix; + } + else + skip_multi_dir = true; + if (multi_os_dir) + { + free ((char *) multi_os_dir); + multi_os_dir = NULL; } + else + skip_multi_os_dir = true; } + if (multi_dir) + { + free ((char *) multi_dir); + free ((char *) multi_suffix); + free ((char *) just_multi_suffix); + } + if (multi_os_dir) + free ((char *) multi_os_dir); + if (ret != path) + free (path); + return ret; +} + +/* Callback for build_search_list. Adds path to obstack being built. */ + +struct add_to_obstack_info { + struct obstack *ob; + bool check_dir; + bool first_time; +}; + +static void * +add_to_obstack (char *path, void *data) +{ + struct add_to_obstack_info *info = data; + + if (info->check_dir && !is_directory (path, false)) + return NULL; + + if (!info->first_time) + obstack_1grow (info->ob, PATH_SEPARATOR); + + obstack_grow (info->ob, path, strlen (path)); + + info->first_time = false; + return NULL; +} + +/* Build a list of search directories from PATHS. + PREFIX is a string to prepend to the list. + If CHECK_DIR_P is true we ensure the directory exists. + If DO_MULTI is true, multilib paths are output first, then + non-multilib paths. + This is used mostly by putenv_from_prefixes so we use `collect_obstack'. + It is also used by the --print-search-dirs flag. */ + +static char * +build_search_list (const struct path_prefix *paths, const char *prefix, + bool check_dir, bool do_multi) +{ + struct add_to_obstack_info info; + + info.ob = &collect_obstack; + info.check_dir = check_dir; + info.first_time = true; + + obstack_grow (&collect_obstack, prefix, strlen (prefix)); + obstack_1grow (&collect_obstack, '='); + + for_each_path (paths, do_multi, 0, add_to_obstack, &info); + obstack_1grow (&collect_obstack, '\0'); return XOBFINISH (&collect_obstack, char *); } @@ -2419,9 +2574,10 @@ build_search_list (struct path_prefix *paths, const char *prefix, for collect. */ static void -putenv_from_prefixes (struct path_prefix *paths, const char *env_var) +putenv_from_prefixes (const struct path_prefix *paths, const char *env_var, + bool do_multi) { - putenv (build_search_list (paths, env_var, 1)); + putenv (build_search_list (paths, env_var, true, do_multi)); } /* Check whether NAME can be accessed in MODE. This is like access, @@ -2442,20 +2598,53 @@ access_check (const char *name, int mode) return access (name, mode); } +/* Callback for find_a_file. Appends the file name to the directory + path. If the resulting file exists in the right mode, return the + full pathname to the file. */ + +struct file_at_path_info { + const char *name; + const char *suffix; + int name_len; + int suffix_len; + int mode; +}; + +static void * +file_at_path (char *path, void *data) +{ + struct file_at_path_info *info = data; + size_t len = strlen (path); + + memcpy (path + len, info->name, info->name_len); + len += info->name_len; + + /* Some systems have a suffix for executable files. + So try appending that first. */ + if (info->suffix_len) + { + memcpy (path + len, info->suffix, info->suffix_len + 1); + if (access_check (path, info->mode) == 0) + return path; + } + + path[len] = '\0'; + if (access_check (path, info->mode) == 0) + return path; + + return NULL; +} + /* Search for NAME using the prefix list PREFIXES. MODE is passed to - access to check permissions. + access to check permissions. If DO_MULTI is true, search multilib + paths then non-multilib paths, otherwise do not search multilib paths. Return 0 if not found, otherwise return its name, allocated with malloc. */ static char * -find_a_file (struct path_prefix *pprefix, const char *name, int mode, - int multilib) +find_a_file (const struct path_prefix *pprefix, const char *name, int mode, + bool do_multi) { - char *temp; - const char *const file_suffix = - ((mode & X_OK) != 0 ? HOST_EXECUTABLE_SUFFIX : ""); - struct prefix_list *pl; - int len = pprefix->max_len + strlen (name) + strlen (file_suffix) + 1; - const char *multilib_name, *multilib_os_name; + struct file_at_path_info info; #ifdef DEFAULT_ASSEMBLER if (! strcmp (name, "as") && access (DEFAULT_ASSEMBLER, mode) == 0) @@ -2467,112 +2656,24 @@ find_a_file (struct path_prefix *pprefix, const char *name, int mode, return xstrdup (DEFAULT_LINKER); #endif - if (machine_suffix) - len += strlen (machine_suffix); - - multilib_name = name; - multilib_os_name = name; - if (multilib && multilib_os_dir) - { - int len1 = multilib_dir ? strlen (multilib_dir) + 1 : 0; - int len2 = strlen (multilib_os_dir) + 1; - - len += len1 > len2 ? len1 : len2; - if (multilib_dir) - multilib_name = ACONCAT ((multilib_dir, dir_separator_str, name, - NULL)); - if (strcmp (multilib_os_dir, ".") != 0) - multilib_os_name = ACONCAT ((multilib_os_dir, dir_separator_str, name, - NULL)); - } - - temp = xmalloc (len); - /* Determine the filename to execute (special case for absolute paths). */ if (IS_ABSOLUTE_PATH (name)) { if (access (name, mode) == 0) - { - strcpy (temp, name); - return temp; - } - } - else - for (pl = pprefix->plist; pl; pl = pl->next) - { - const char *this_name - = pl->os_multilib ? multilib_os_name : multilib_name; + return xstrdup (name); - if (machine_suffix) - { - /* Some systems have a suffix for executable files. - So try appending that first. */ - if (file_suffix[0] != 0) - { - strcpy (temp, pl->prefix); - strcat (temp, machine_suffix); - strcat (temp, multilib_name); - strcat (temp, file_suffix); - if (access_check (temp, mode) == 0) - return temp; - } - - /* Now try just the multilib_name. */ - strcpy (temp, pl->prefix); - strcat (temp, machine_suffix); - strcat (temp, multilib_name); - if (access_check (temp, mode) == 0) - return temp; - } - - /* Certain prefixes are tried with just the machine type, - not the version. This is used for finding as, ld, etc. */ - if (just_machine_suffix && pl->require_machine_suffix == 2) - { - /* Some systems have a suffix for executable files. - So try appending that first. */ - if (file_suffix[0] != 0) - { - strcpy (temp, pl->prefix); - strcat (temp, just_machine_suffix); - strcat (temp, multilib_name); - strcat (temp, file_suffix); - if (access_check (temp, mode) == 0) - return temp; - } - - strcpy (temp, pl->prefix); - strcat (temp, just_machine_suffix); - strcat (temp, multilib_name); - if (access_check (temp, mode) == 0) - return temp; - } - - /* Certain prefixes can't be used without the machine suffix - when the machine or version is explicitly specified. */ - if (! pl->require_machine_suffix) - { - /* Some systems have a suffix for executable files. - So try appending that first. */ - if (file_suffix[0] != 0) - { - strcpy (temp, pl->prefix); - strcat (temp, this_name); - strcat (temp, file_suffix); - if (access_check (temp, mode) == 0) - return temp; - } + return NULL; + } - strcpy (temp, pl->prefix); - strcat (temp, this_name); - if (access_check (temp, mode) == 0) - return temp; - } - } + info.name = name; + info.suffix = (mode & X_OK) != 0 ? HOST_EXECUTABLE_SUFFIX : ""; + info.name_len = strlen (info.name); + info.suffix_len = strlen (info.suffix); + info.mode = mode; - free (temp); - return 0; + return for_each_path (pprefix, do_multi, info.name_len + info.suffix_len, + file_at_path, &info); } /* Ranking of prefixes in the sort list. -B prefixes are put before @@ -2691,7 +2792,7 @@ execute (void) commands[0].prog = argbuf[0]; /* first command. */ commands[0].argv = &argbuf[0]; - string = find_a_file (&exec_prefixes, commands[0].prog, X_OK, 0); + string = find_a_file (&exec_prefixes, commands[0].prog, X_OK, false); if (string) commands[0].argv[0] = string; @@ -2706,7 +2807,7 @@ execute (void) commands[n_commands].prog = argbuf[i + 1]; commands[n_commands].argv = &argbuf[i + 1]; string = find_a_file (&exec_prefixes, commands[n_commands].prog, - X_OK, 0); + X_OK, false); if (string) commands[n_commands].argv[0] = string; n_commands++; @@ -2871,7 +2972,10 @@ execute (void) we would otherwise have succeeded. */ if (WTERMSIG (status) == SIGPIPE && (signal_count || greatest_status >= MIN_FATAL_STATUS)) - ; + { + signal_count++; + ret_code = -1; + } else #endif fatal ("\ @@ -2880,8 +2984,6 @@ Please submit a full bug report.\n\ See %s for instructions.", strsignal (WTERMSIG (status)), commands[i].prog, bug_report_url); - signal_count++; - ret_code = -1; } else if (WIFEXITED (status) && WEXITSTATUS (status) >= MIN_FATAL_STATUS) @@ -3643,7 +3745,7 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n" if appending a directory separator actually makes a valid directory name. */ if (! IS_DIR_SEPARATOR (value [len - 1]) - && is_directory (value, "", 0)) + && is_directory (value, false)) { char *tmp = xmalloc (len + 2); strcpy (tmp, value); @@ -4391,108 +4493,55 @@ do_self_spec (const char *spec) } } -void -do_spec_path (struct prefix_list *pl, const char *option, - int omit_if_relative, int separate_options, - int only_subdir, - const char *dir_for_machine_suffix, - const char *dir_for_no_suffix) +/* Callback for processing %D and %I specs. */ + +struct spec_path_info { + const char *option; + const char *append; + size_t append_len; + bool omit_relative; + bool separate_options; +}; + +static void * +spec_path (char *path, void *data) { - static size_t bufsize = 0; - static char *buffer; - int idx; - bool multilib_p = false; - - /* Used on systems which record the specified -L dirs - and use them to search for dynamic linking. */ - /* Relative directories always come from -B, - and it is better not to use them for searching - at run time. In particular, stage1 loses. */ - if (omit_if_relative - && !IS_ABSOLUTE_PATH (pl->prefix)) - return; + struct spec_path_info *info = data; + size_t len = 0; + char save = 0; + + if (info->omit_relative && !IS_ABSOLUTE_PATH (path)) + return NULL; - /* Try subdirectory if there is one. */ - if (machine_suffix && dir_for_machine_suffix) + if (info->append_len != 0) { - if (strlen (pl->prefix) + strlen (machine_suffix) - >= bufsize) - bufsize = (strlen (pl->prefix) - + strlen (machine_suffix)) * 2 + 1; - buffer = xrealloc (buffer, bufsize); - strcpy (buffer, pl->prefix); - strcat (buffer, machine_suffix); - if (is_directory (buffer, dir_for_machine_suffix, 1)) - { - multilib_p = true; - do_spec_1 (option, separate_options, NULL); - if (separate_options) - do_spec_1 (" ", 0, NULL); - do_spec_1 (buffer, 1, NULL); - do_spec_1 (dir_for_machine_suffix, 1, NULL); - /* Make this a separate argument. */ - do_spec_1 (" ", 0, NULL); - } - } - if (!pl->require_machine_suffix && dir_for_no_suffix) - { - if (is_directory (pl->prefix, dir_for_no_suffix, 1)) - { - multilib_p = true; - do_spec_1 (option, separate_options, NULL); - if (separate_options) - do_spec_1 (" ", 0, NULL); - do_spec_1 (pl->prefix, 1, NULL); - do_spec_1 (dir_for_no_suffix, 1, NULL); - /* Make this a separate argument. */ - do_spec_1 (" ", 0, NULL); - } + len = strlen (path); + memcpy (path + len, info->append, info->append_len + 1); } - if (only_subdir || multilib_p) - return; + if (!is_directory (path, true)) + return NULL; - if (machine_suffix) + do_spec_1 (info->option, 1, NULL); + if (info->separate_options) + do_spec_1 (" ", 0, NULL); + + if (info->append_len == 0) { - if (is_directory (pl->prefix, machine_suffix, 1)) - { - do_spec_1 (option, separate_options, NULL); - if (separate_options) - do_spec_1 (" ", 0, NULL); - do_spec_1 (pl->prefix, 1, NULL); - /* Remove slash from machine_suffix. */ - if (strlen (machine_suffix) >= bufsize) - bufsize = strlen (machine_suffix) * 2 + 1; - buffer = xrealloc (buffer, bufsize); - strcpy (buffer, machine_suffix); - idx = strlen (buffer); - if (IS_DIR_SEPARATOR (buffer[idx - 1])) - buffer[idx - 1] = 0; - do_spec_1 (buffer, 1, NULL); - /* Make this a separate argument. */ - do_spec_1 (" ", 0, NULL); - } - } - if (!pl->require_machine_suffix) - { - if (is_directory (pl->prefix, "", 1)) - { - do_spec_1 (option, separate_options, NULL); - if (separate_options) - do_spec_1 (" ", 0, NULL); - /* Remove slash from pl->prefix. */ - if (strlen (pl->prefix) >= bufsize) - bufsize = strlen (pl->prefix) * 2 + 1; - buffer = xrealloc (buffer, bufsize); - strcpy (buffer, pl->prefix); - idx = strlen (buffer); - if (IS_DIR_SEPARATOR (buffer[idx - 1])) - buffer[idx - 1] = 0; - do_spec_1 (buffer, 1, NULL); - /* Make this a separate argument. */ - do_spec_1 (" ", 0, NULL); - } + len = strlen (path); + save = path[len - 1]; + if (IS_DIR_SEPARATOR (path[len - 1])) + path[len - 1] = '\0'; } + + do_spec_1 (path, 1, NULL); + do_spec_1 (" ", 0, NULL); + + /* Must not damage the original path. */ + if (info->append_len == 0) + path[len - 1] = save; + + return NULL; } /* Process the sub-spec SPEC as a portion of a larger spec. @@ -4630,23 +4679,23 @@ do_spec_1 (const char *spec, int inswitch, const char *soft_matched_part) that we search for startfiles. */ case 'D': { - struct prefix_list *pl = startfile_prefixes.plist; + struct spec_path_info info; - for (; pl; pl = pl->next) - { - const char *no_suffix_multilib_dir; - - no_suffix_multilib_dir = pl->os_multilib ? multilib_os_dir - : multilib_dir; - /* Do not separate options, include non-multilibbed variant. */ - do_spec_path (pl, "-L", + info.option = "-L"; + info.append_len = 0; #ifdef RELATIVE_PREFIX_NOT_LINKDIR - 1, + /* Used on systems which record the specified -L dirs + and use them to search for dynamic linking. + Relative directories always come from -B, + and it is better not to use them for searching + at run time. In particular, stage1 loses. */ + info.omit_relative = true; #else - 0, + info.omit_relative = false; #endif - 0, 0, multilib_dir, no_suffix_multilib_dir); - } + info.separate_options = false; + + for_each_path (&startfile_prefixes, true, 0, spec_path, &info); } break; @@ -4883,7 +4932,7 @@ do_spec_1 (const char *spec, int inswitch, const char *soft_matched_part) case 'I': { - struct prefix_list *pl = include_prefixes.plist; + struct spec_path_info info; if (gcc_exec_prefix) { @@ -4906,9 +4955,14 @@ do_spec_1 (const char *spec, int inswitch, const char *soft_matched_part) do_spec_1 (" ", 0, NULL); } - for (; pl; pl = pl->next) - /* Separate options, don't include non-suffixed variant. */ - do_spec_path (pl, "-isystem", 0, 1, 1, "include", "include"); + info.option = "-isystem"; + info.append = "include"; + info.append_len = strlen (info.append); + info.omit_relative = false; + info.separate_options = true; + + for_each_path (&include_prefixes, false, info.append_len, + spec_path, &info); } break; @@ -5894,48 +5948,27 @@ give_switch (int switchnum, int omit_first_word) static const char * find_file (const char *name) { - char *newname; - - /* Try multilib_dir if it is defined. */ - if (multilib_os_dir != NULL) - { - newname = find_a_file (&startfile_prefixes, name, R_OK, 1); - - /* If we don't find it in the multi library dir, then fall - through and look for it in the normal places. */ - if (newname != NULL) - return newname; - } - - newname = find_a_file (&startfile_prefixes, name, R_OK, 0); + char *newname = find_a_file (&startfile_prefixes, name, R_OK, true); return newname ? newname : name; } /* Determine whether a directory exists. If LINKER, return 0 for - certain fixed names not needed by the linker. If not LINKER, it is - only important to return 0 if the host machine has a small ARG_MAX - limit. */ + certain fixed names not needed by the linker. */ static int -is_directory (const char *path1, const char *path2, int linker) +is_directory (const char *path1, bool linker) { - int len1 = strlen (path1); - int len2 = strlen (path2); - char *path = alloca (3 + len1 + len2); + int len1; + char *path; char *cp; struct stat st; -#ifndef SMALL_ARG_MAX - if (! linker) - return 1; -#endif - - /* Construct the path from the two parts. Ensure the string ends with "/.". - The resulting path will be a directory even if the given path is a - symbolic link. */ + /* Ensure the string ends with "/.". The resulting path will be a + directory even if the given path is a symbolic link. */ + len1 = strlen (path1); + path = alloca (3 + len1); memcpy (path, path1, len1); - memcpy (path + len1, path2, len2); - cp = path + len1 + len2; + cp = path + len1; if (!IS_DIR_SEPARATOR (cp[-1])) *cp++ = DIR_SEPARATOR; *cp++ = '.'; @@ -5943,13 +5976,13 @@ is_directory (const char *path1, const char *path2, int linker) /* Exclude directories that the linker is known to search. */ if (linker + && IS_DIR_SEPARATOR (path[0]) && ((cp - path == 6 - && strcmp (path, concat (dir_separator_str, "lib", - dir_separator_str, ".", NULL)) == 0) + && strncmp (path + 1, "lib", 3) == 0) || (cp - path == 10 - && strcmp (path, concat (dir_separator_str, "usr", - dir_separator_str, "lib", - dir_separator_str, ".", NULL)) == 0))) + && strncmp (path + 1, "usr", 3) == 0 + && IS_DIR_SEPARATOR (path[4]) + && strncmp (path + 5, "lib", 3) == 0))) return 0; return (stat (path, &st) >= 0 && S_ISDIR (st.st_mode)); @@ -6010,10 +6043,10 @@ fatal_error (int signum) kill (getpid (), signum); } -extern int main (int, const char **); +extern int main (int, char **); int -main (int argc, const char **argv) +main (int argc, char **argv) { size_t i; int value; @@ -6126,7 +6159,7 @@ main (int argc, const char **argv) Make a table of specified input files (infiles, n_infiles). Decode switches that are handled locally. */ - process_command (argc, argv); + process_command (argc, (const char **) argv); /* Initialize the vector of specs to just the default. This means one element containing 0s, as a terminator. */ @@ -6141,7 +6174,7 @@ main (int argc, const char **argv) spec_version, dir_separator_str, NULL); just_machine_suffix = concat (spec_machine, dir_separator_str, NULL); - specs_file = find_a_file (&startfile_prefixes, "specs", R_OK, 0); + specs_file = find_a_file (&startfile_prefixes, "specs", R_OK, true); /* Read the specs file unless it is a default one. */ if (specs_file != 0 && strcmp (specs_file, "specs")) read_specs (specs_file, TRUE); @@ -6277,7 +6310,7 @@ main (int argc, const char **argv) for (uptr = user_specs_head; uptr; uptr = uptr->next) { char *filename = find_a_file (&startfile_prefixes, uptr->filename, - R_OK, 0); + R_OK, true); read_specs (filename ? filename : uptr->filename, FALSE); } @@ -6306,8 +6339,10 @@ main (int argc, const char **argv) if (print_search_dirs) { printf (_("install: %s%s\n"), standard_exec_prefix, machine_suffix); - printf (_("programs: %s\n"), build_search_list (&exec_prefixes, "", 0)); - printf (_("libraries: %s\n"), build_search_list (&startfile_prefixes, "", 0)); + printf (_("programs: %s\n"), + build_search_list (&exec_prefixes, "", false, false)); + printf (_("libraries: %s\n"), + build_search_list (&startfile_prefixes, "", false, true)); return (0); } @@ -6624,14 +6659,14 @@ main (int argc, const char **argv) /* We'll use ld if we can't find collect2. */ if (! strcmp (linker_name_spec, "collect2")) { - char *s = find_a_file (&exec_prefixes, "collect2", X_OK, 0); + char *s = find_a_file (&exec_prefixes, "collect2", X_OK, false); if (s == NULL) linker_name_spec = "ld"; } /* Rebuild the COMPILER_PATH and LIBRARY_PATH environment variables for collect. */ - putenv_from_prefixes (&exec_prefixes, "COMPILER_PATH"); - putenv_from_prefixes (&startfile_prefixes, LIBRARY_PATH_ENV); + putenv_from_prefixes (&exec_prefixes, "COMPILER_PATH", false); + putenv_from_prefixes (&startfile_prefixes, LIBRARY_PATH_ENV, true); value = do_spec (link_command_spec); if (value < 0) diff --git a/gcc/gcse.c b/gcc/gcse.c index 2c74574b449..290f70ecada 100644 --- a/gcc/gcse.c +++ b/gcc/gcse.c @@ -660,7 +660,7 @@ static bool is_too_expensive (const char *); F is the first instruction in the function. Return nonzero if a change is mode. */ -int +static int gcse_main (rtx f ATTRIBUTE_UNUSED, FILE *file) { int changed, pass; @@ -691,7 +691,8 @@ gcse_main (rtx f ATTRIBUTE_UNUSED, FILE *file) dump_flow_info (file); /* Return if there's nothing to do, or it is too expensive. */ - if (n_basic_blocks <= 1 || is_too_expensive (_("GCSE disabled"))) + if (n_basic_blocks <= NUM_FIXED_BLOCKS + 1 + || is_too_expensive (_("GCSE disabled"))) return 0; gcc_obstack_init (&gcse_obstack); @@ -1700,10 +1701,15 @@ hash_scan_set (rtx pat, rtx insn, struct hash_table *table) unsigned int regno = REGNO (dest); rtx tmp; - /* If this is a single set and we are doing constant propagation, - see if a REG_NOTE shows this equivalent to a constant. */ - if (table->set_p && (note = find_reg_equal_equiv_note (insn)) != 0 - && gcse_constant_p (XEXP (note, 0))) + /* See if a REG_NOTE shows this equivalent to a simpler expression. + This allows us to do a single GCSE pass and still eliminate + redundant constants, addresses or other expressions that are + constructed with multiple instructions. */ + note = find_reg_equal_equiv_note (insn); + if (note != 0 + && (table->set_p + ? gcse_constant_p (XEXP (note, 0)) + : want_to_gcse_p (XEXP (note, 0)))) src = XEXP (note, 0), pat = gen_rtx_SET (VOIDmode, dest, src); /* Only record sets of pseudo-regs in the hash table. */ @@ -1724,8 +1730,7 @@ hash_scan_set (rtx pat, rtx insn, struct hash_table *table) REG_EQUIV notes and if the argument slot is used somewhere explicitly, it means address of parameter has been taken, so we should not extend the lifetime of the pseudo. */ - && ((note = find_reg_note (insn, REG_EQUIV, NULL_RTX)) == 0 - || ! MEM_P (XEXP (note, 0)))) + && (note == NULL_RTX || ! MEM_P (XEXP (note, 0)))) { /* An expression is not anticipatable if its operands are modified before this insn or if this is not the only SET in @@ -4214,7 +4219,7 @@ pre_insert_copy_insn (struct expr *expr, rtx insn) int regno = REGNO (reg); int indx = expr->bitmap_index; rtx pat = PATTERN (insn); - rtx set, new_insn; + rtx set, first_set, new_insn; rtx old_reg; int i; @@ -4228,17 +4233,29 @@ pre_insert_copy_insn (struct expr *expr, rtx insn) case PARALLEL: /* Search through the parallel looking for the set whose source was the expression that we're interested in. */ + first_set = NULL_RTX; set = NULL_RTX; for (i = 0; i < XVECLEN (pat, 0); i++) { rtx x = XVECEXP (pat, 0, i); - if (GET_CODE (x) == SET - && expr_equiv_p (SET_SRC (x), expr->expr)) + if (GET_CODE (x) == SET) { - set = x; - break; + /* If the source was a REG_EQUAL or REG_EQUIV note, we + may not find an equivalent expression, but in this + case the PARALLEL will have a single set. */ + if (first_set == NULL_RTX) + first_set = x; + if (expr_equiv_p (SET_SRC (x), expr->expr)) + { + set = x; + break; + } } } + + gcc_assert (first_set); + if (set == NULL_RTX) + set = first_set; break; default: @@ -5647,6 +5664,14 @@ find_moveable_store (rtx insn, int *regs_set_before, int *regs_set_after) if (find_reg_note (insn, REG_EH_REGION, NULL_RTX)) return; + /* Make sure that the SET_SRC of this store insns can be assigned to + a register, or we will fail later on in replace_store_insn, which + assumes that we can do this. But sometimes the target machine has + oddities like MEM read-modify-write instruction. See for example + PR24257. */ + if (!can_assign_to_reg_p (SET_SRC (set))) + return; + ptr = ldst_entry (dest); if (!ptr->pattern_regs) ptr->pattern_regs = extract_mentioned_regs (dest); @@ -6493,7 +6518,7 @@ store_motion (void) /* Entry point for jump bypassing optimization pass. */ -int +static int bypass_jumps (FILE *file) { int changed; @@ -6515,7 +6540,8 @@ bypass_jumps (FILE *file) dump_flow_info (file); /* Return if there's nothing to do, or it is too expensive. */ - if (n_basic_blocks <= 1 || is_too_expensive (_ ("jump bypassing disabled"))) + if (n_basic_blocks <= NUM_FIXED_BLOCKS + 1 + || is_too_expensive (_ ("jump bypassing disabled"))) return 0; gcc_obstack_init (&gcse_obstack); diff --git a/gcc/gengtype.c b/gcc/gengtype.c index eb3c0c13487..704f7739d90 100644 --- a/gcc/gengtype.c +++ b/gcc/gengtype.c @@ -1080,7 +1080,7 @@ open_base_files (void) "hard-reg-set.h", "basic-block.h", "cselib.h", "insn-addr.h", "optabs.h", "libfuncs.h", "debug.h", "ggc.h", "cgraph.h", "tree-flow.h", "reload.h", "cpp-id-data.h", "tree-chrec.h", - "except.h", NULL + "except.h", "output.h", NULL }; const char *const *ifp; outf_p gtype_desc_c; diff --git a/gcc/genmodes.c b/gcc/genmodes.c index 142dde4e737..d8ba5df0148 100644 --- a/gcc/genmodes.c +++ b/gcc/genmodes.c @@ -60,7 +60,7 @@ struct mode_data unsigned int bytesize; /* storage size in addressable units */ unsigned int ncomponents; /* number of subunits */ unsigned int alignment; /* mode alignment */ - const char *format; /* floating point format - MODE_FLOAT only */ + const char *format; /* floating point format - float modes only */ struct mode_data *component; /* mode of components */ struct mode_data *wider; /* next wider mode */ @@ -72,6 +72,7 @@ struct mode_data const char *file; /* file and line of definition, */ unsigned int line; /* for error reporting */ + unsigned int counter; /* Rank ordering of modes */ }; static struct mode_data *modes[MAX_MODE_CLASS]; @@ -82,7 +83,7 @@ static const struct mode_data blank_mode = { 0, "", MAX_MODE_CLASS, -1U, -1U, -1U, -1U, 0, 0, 0, 0, 0, 0, - "", 0 + "", 0, 0 }; static htab_t modes_by_name; @@ -146,6 +147,7 @@ new_mode (enum mode_class cl, const char *name, const char *file, unsigned int line) { struct mode_data *m; + static unsigned int count = 0; m = find_mode (name); if (m) @@ -163,6 +165,7 @@ new_mode (enum mode_class cl, const char *name, if (file) m->file = trim_filename (file); m->line = line; + m->counter = count++; m->next = modes[cl]; modes[cl] = m; @@ -323,11 +326,12 @@ complete_mode (struct mode_data *m) case MODE_INT: case MODE_FLOAT: + case MODE_DECIMAL_FLOAT: /* A scalar mode must have a byte size, may have a bit size, and must not have components. A float mode must have a format. */ validate_mode (m, OPTIONAL, SET, UNSET, UNSET, - m->cl == MODE_FLOAT ? SET : UNSET); + m->cl != MODE_INT ? SET : UNSET); m->ncomponents = 1; m->component = 0; @@ -429,17 +433,22 @@ make_complex_modes (enum mode_class cl, This inconsistency should be eliminated. */ if (cl == MODE_FLOAT) { - char *p; + char *p, *q = 0; strncpy (buf, m->name, sizeof buf); p = strchr (buf, 'F'); if (p == 0) + q = strchr (buf, 'D'); + if (p == 0 && q == 0) { - error ("%s:%d: float mode \"%s\" has no 'F'", + error ("%s:%d: float mode \"%s\" has no 'F' or 'D'", m->file, m->line, m->name); continue; } - *p = 'C'; + if (p != 0) + *p = 'C'; + else + snprintf (buf, sizeof buf, "C%s", m->name); } else snprintf (buf, sizeof buf, "C%s", m->name); @@ -540,6 +549,23 @@ make_float_mode (const char *name, m->format = format; } +#define DECIMAL_FLOAT_MODE(N, Y, F) \ + FRACTIONAL_DECIMAL_FLOAT_MODE (N, -1U, Y, F) +#define FRACTIONAL_DECIMAL_FLOAT_MODE(N, B, Y, F) \ + make_decimal_float_mode (#N, B, Y, #F, __FILE__, __LINE__) + +static void +make_decimal_float_mode (const char *name, + unsigned int precision, unsigned int bytesize, + const char *format, + const char *file, unsigned int line) +{ + struct mode_data *m = new_mode (MODE_DECIMAL_FLOAT, name, file, line); + m->bytesize = bytesize; + m->precision = precision; + m->format = format; +} + #define RESET_FLOAT_FORMAT(N, F) \ reset_float_format (#N, #F, __FILE__, __LINE__) static void ATTRIBUTE_UNUSED @@ -552,9 +578,9 @@ reset_float_format (const char *name, const char *format, error ("%s:%d: no mode \"%s\"", file, line, name); return; } - if (m->cl != MODE_FLOAT) + if (m->cl != MODE_FLOAT && m->cl != MODE_DECIMAL_FLOAT) { - error ("%s:%d: mode \"%s\" is not class FLOAT", file, line, name); + error ("%s:%d: mode \"%s\" is not a FLOAT class", file, line, name); return; } m->format = format; @@ -675,7 +701,12 @@ cmp_modes (const void *a, const void *b) return -1; if (!m->component && !n->component) - return 0; + { + if (m->counter < n->counter) + return -1; + else + return 1; + } if (m->component->bytesize > n->component->bytesize) return 1; @@ -687,7 +718,10 @@ cmp_modes (const void *a, const void *b) else if (m->component->precision < n->component->precision) return -1; - return 0; + if (m->counter < n->counter) + return -1; + else + return 1; } static void @@ -1083,15 +1117,24 @@ emit_real_format_for_mode (void) format); #else print_decl ("struct real_format *\n", "real_format_for_mode", - "MAX_MODE_FLOAT - MIN_MODE_FLOAT + 1"); + "MAX_MODE_FLOAT - MIN_MODE_FLOAT + 1 " + "+ MAX_MODE_DECIMAL_FLOAT - MIN_MODE_DECIMAL_FLOAT + 1"); #endif + /* The beginning of the table is entries for float modes. */ for (m = modes[MODE_FLOAT]; m; m = m->next) if (!strcmp (m->format, "0")) tagged_printf ("%s", m->format, m->name); else tagged_printf ("&%s", m->format, m->name); + /* The end of the table is entries for decimal float modes. */ + for (m = modes[MODE_DECIMAL_FLOAT]; m; m = m->next) + if (!strcmp (m->format, "0")) + tagged_printf ("%s", m->format, m->name); + else + tagged_printf ("&%s", m->format, m->name); + print_closer (); } diff --git a/gcc/genopinit.c b/gcc/genopinit.c index 0c4a397667e..ec8076b8206 100644 --- a/gcc/genopinit.c +++ b/gcc/genopinit.c @@ -304,7 +304,9 @@ gen_insn (rtx insn) || mode_class[i] == MODE_INT || mode_class[i] == MODE_PARTIAL_INT || mode_class[i] == MODE_VECTOR_INT) - && (! force_float || mode_class[i] == MODE_FLOAT + && (! force_float + || mode_class[i] == MODE_FLOAT + || mode_class[i] == MODE_DECIMAL_FLOAT || mode_class[i] == MODE_COMPLEX_FLOAT || mode_class[i] == MODE_VECTOR_FLOAT)) break; diff --git a/gcc/genpreds.c b/gcc/genpreds.c index 1a737146d1a..dd044f771e4 100644 --- a/gcc/genpreds.c +++ b/gcc/genpreds.c @@ -43,7 +43,7 @@ process_define_predicate (rtx defn) return; } - pred = xcalloc (sizeof (struct pred_data), 1); + pred = XCNEW (struct pred_data); pred->name = XSTR (defn, 0); pred->exp = XEXP (defn, 1); pred->c_block = XSTR (defn, 2); diff --git a/gcc/gensupport.c b/gcc/gensupport.c index 5e29e4418eb..644b3b920a3 100644 --- a/gcc/gensupport.c +++ b/gcc/gensupport.c @@ -1200,7 +1200,7 @@ lookup_predicate (const char *name) { struct pred_data key; key.name = name; - return htab_find (predicate_table, &key); + return (struct pred_data *) htab_find (predicate_table, &key); } void @@ -1268,7 +1268,7 @@ init_predicate_table (void) for (i = 0; i < NUM_KNOWN_STD_PREDS; i++) { - pred = xcalloc (sizeof (struct pred_data), 1); + pred = XCNEW (struct pred_data); pred->name = std_preds[i].name; pred->special = std_preds[i].special; diff --git a/gcc/ggc.h b/gcc/ggc.h index d6b2ea833b7..d6e2303de81 100644 --- a/gcc/ggc.h +++ b/gcc/ggc.h @@ -231,6 +231,7 @@ extern void dump_ggc_loc_statistics (void); #define GGC_CNEWVEC(T, N) ((T *) ggc_alloc_cleared ((N) * sizeof(T))) #define GGC_NEWVAR(T, S) ((T *) ggc_alloc ((S))) #define GGC_CNEWVAR(T, S) ((T *) ggc_alloc_cleared ((S))) +#define GGC_RESIZEVEC(T, P, N) ((T *) ggc_realloc ((P), (N) * sizeof (T))) #define ggc_alloc_rtvec(NELT) \ ((rtvec) ggc_alloc_zone (sizeof (struct rtvec_def) + ((NELT) - 1) \ diff --git a/gcc/gimple-low.c b/gcc/gimple-low.c index 5c7c27f7e13..de0f6f24ead 100644 --- a/gcc/gimple-low.c +++ b/gcc/gimple-low.c @@ -55,7 +55,6 @@ static void lower_stmt (tree_stmt_iterator *, struct lower_data *); static void lower_bind_expr (tree_stmt_iterator *, struct lower_data *); static void lower_cond_expr (tree_stmt_iterator *, struct lower_data *); static void lower_return_expr (tree_stmt_iterator *, struct lower_data *); -static bool expand_var_p (tree); /* Lowers the body of current_function_decl. */ @@ -91,7 +90,7 @@ lower_function_body (void) && (data.return_statements == NULL || TREE_OPERAND (TREE_VALUE (data.return_statements), 0) != NULL)) { - x = build (RETURN_EXPR, void_type_node, NULL); + x = build1 (RETURN_EXPR, void_type_node, NULL); SET_EXPR_LOCATION (x, cfun->function_end_locus); tsi_link_after (&i, x, TSI_CONTINUE_LINKING); } @@ -100,7 +99,7 @@ lower_function_body (void) at the end of the function. */ for (t = data.return_statements ; t ; t = TREE_CHAIN (t)) { - x = build (LABEL_EXPR, void_type_node, TREE_PURPOSE (t)); + x = build1 (LABEL_EXPR, void_type_node, TREE_PURPOSE (t)); tsi_link_after (&i, x, TSI_CONTINUE_LINKING); /* Remove the line number from the representative return statement. @@ -503,7 +502,7 @@ lower_return_expr (tree_stmt_iterator *tsi, struct lower_data *data) /* Generate a goto statement and remove the return statement. */ found: - t = build (GOTO_EXPR, void_type_node, label); + t = build1 (GOTO_EXPR, void_type_node, label); SET_EXPR_LOCUS (t, EXPR_LOCUS (stmt)); tsi_link_before (tsi, t, TSI_SAME_STMT); tsi_delink (tsi); @@ -533,82 +532,6 @@ record_vars (tree vars) } } -/* Check whether to expand a variable VAR. */ - -static bool -expand_var_p (tree var) -{ - struct var_ann_d *ann; - - if (TREE_CODE (var) != VAR_DECL) - return true; - - /* Leave statics and externals alone. */ - if (TREE_STATIC (var) || DECL_EXTERNAL (var)) - return true; - - /* Remove all unused local variables. */ - ann = var_ann (var); - if (!ann || !ann->used) - return false; - - return true; -} - -/* Throw away variables that are unused. */ - -static void -remove_useless_vars (void) -{ - tree var, *cell; - FILE *df = NULL; - - if (dump_file && (dump_flags & TDF_DETAILS)) - { - df = dump_file; - fputs ("Discarding as unused:\n", df); - } - - for (cell = &cfun->unexpanded_var_list; *cell; ) - { - var = TREE_VALUE (*cell); - - if (!expand_var_p (var)) - { - if (df) - { - fputs (" ", df); - print_generic_expr (df, var, dump_flags); - fputc ('\n', df); - } - - *cell = TREE_CHAIN (*cell); - continue; - } - - cell = &TREE_CHAIN (*cell); - } - - if (df) - fputc ('\n', df); -} - -struct tree_opt_pass pass_remove_useless_vars = -{ - "vars", /* name */ - NULL, /* gate */ - remove_useless_vars, /* execute */ - NULL, /* sub */ - NULL, /* next */ - 0, /* static_pass_number */ - 0, /* tv_id */ - 0, /* properties_required */ - 0, /* properties_provided */ - 0, /* properties_destroyed */ - 0, /* todo_flags_start */ - TODO_dump_func, /* todo_flags_finish */ - 0 /* letter */ -}; /* Mark BLOCK used if it has a used variable in it, then recurse over its subblocks. */ diff --git a/gcc/gimplify.c b/gcc/gimplify.c index b35904d1441..3bb5d4327a4 100644 --- a/gcc/gimplify.c +++ b/gcc/gimplify.c @@ -473,7 +473,7 @@ lookup_tmp_var (tree val, bool is_formal) slot = htab_find_slot (gimplify_ctxp->temp_htab, (void *)&elt, INSERT); if (*slot == NULL) { - elt_p = xmalloc (sizeof (*elt_p)); + elt_p = XNEW (elt_t); elt_p->val = val; elt_p->temp = ret = create_tmp_from_val (val); *slot = (void *) elt_p; @@ -533,7 +533,7 @@ internal_get_tmp_var (tree val, tree *pre_p, tree *post_p, bool is_formal) if (TREE_CODE (TREE_TYPE (t)) == COMPLEX_TYPE) DECL_COMPLEX_GIMPLE_REG_P (t) = 1; - mod = build (MODIFY_EXPR, TREE_TYPE (t), t, val); + mod = build2 (MODIFY_EXPR, TREE_TYPE (t), t, val); if (EXPR_HAS_LOCATION (val)) SET_EXPR_LOCUS (mod, EXPR_LOCUS (val)); @@ -796,10 +796,10 @@ gimple_build_eh_filter (tree body, tree allowed, tree failure) tree t; /* FIXME should the allowed types go in TREE_TYPE? */ - t = build (EH_FILTER_EXPR, void_type_node, allowed, NULL_TREE); + t = build2 (EH_FILTER_EXPR, void_type_node, allowed, NULL_TREE); append_to_statement_list (failure, &EH_FILTER_FAILURE (t)); - t = build (TRY_CATCH_EXPR, void_type_node, NULL_TREE, t); + t = build2 (TRY_CATCH_EXPR, void_type_node, NULL_TREE, t); append_to_statement_list (body, &TREE_OPERAND (t, 0)); return t; @@ -866,7 +866,7 @@ voidify_wrapper_expr (tree wrapper, tree temp) { tree ptr = TREE_OPERAND (*p, 0); temp = create_tmp_var (TREE_TYPE (ptr), "retval"); - *p = build (MODIFY_EXPR, TREE_TYPE (ptr), temp, ptr); + *p = build2 (MODIFY_EXPR, TREE_TYPE (ptr), temp, ptr); temp = build1 (INDIRECT_REF, TREE_TYPE (TREE_TYPE (temp)), temp); /* If this is a BIND_EXPR for a const inline function, it might not have TREE_SIDE_EFFECTS set. That is no longer accurate. */ @@ -876,7 +876,7 @@ voidify_wrapper_expr (tree wrapper, tree temp) { if (!temp) temp = create_tmp_var (TREE_TYPE (wrapper), "retval"); - *p = build (MODIFY_EXPR, TREE_TYPE (temp), temp, *p); + *p = build2 (MODIFY_EXPR, TREE_TYPE (temp), temp, *p); TREE_SIDE_EFFECTS (wrapper) = 1; } @@ -900,7 +900,7 @@ build_stack_save_restore (tree *save, tree *restore) NULL_TREE); tmp_var = create_tmp_var (ptr_type_node, "saved_stack"); - *save = build (MODIFY_EXPR, ptr_type_node, tmp_var, save_call); + *save = build2 (MODIFY_EXPR, ptr_type_node, tmp_var, save_call); *restore = build_function_call_expr (implicit_built_in_decls[BUILT_IN_STACK_RESTORE], tree_cons (NULL_TREE, tmp_var, NULL_TREE)); @@ -947,8 +947,8 @@ gimplify_bind_expr (tree *expr_p, tree temp, tree *pre_p) format of the emitted code: see mx_register_decls(). */ build_stack_save_restore (&stack_save, &stack_restore); - t = build (TRY_FINALLY_EXPR, void_type_node, - BIND_EXPR_BODY (bind_expr), NULL_TREE); + t = build2 (TRY_FINALLY_EXPR, void_type_node, + BIND_EXPR_BODY (bind_expr), NULL_TREE); append_to_statement_list (stack_restore, &TREE_OPERAND (t, 1)); BIND_EXPR_BODY (bind_expr) = NULL_TREE; @@ -1038,7 +1038,7 @@ gimplify_return_expr (tree stmt, tree *pre_p) if (result == result_decl) ret_expr = result; else - ret_expr = build (MODIFY_EXPR, TREE_TYPE (result), result_decl, result); + ret_expr = build2 (MODIFY_EXPR, TREE_TYPE (result), result_decl, result); TREE_OPERAND (stmt, 0) = ret_expr; return GS_ALL_DONE; @@ -1107,7 +1107,7 @@ gimplify_decl_expr (tree *stmt_p) if (!TREE_STATIC (decl)) { DECL_INITIAL (decl) = NULL_TREE; - init = build (MODIFY_EXPR, void_type_node, decl, init); + init = build2 (MODIFY_EXPR, void_type_node, decl, init); gimplify_and_add (init, stmt_p); } else @@ -1253,11 +1253,11 @@ gimplify_switch_expr (tree *expr_p, tree *pre_p) { /* If the switch has no default label, add one, so that we jump around the switch body. */ - default_case = build (CASE_LABEL_EXPR, void_type_node, NULL_TREE, - NULL_TREE, create_artificial_label ()); + default_case = build3 (CASE_LABEL_EXPR, void_type_node, NULL_TREE, + NULL_TREE, create_artificial_label ()); append_to_statement_list (SWITCH_BODY (switch_expr), pre_p); - *expr_p = build (LABEL_EXPR, void_type_node, - CASE_LABEL (default_case)); + *expr_p = build1 (LABEL_EXPR, void_type_node, + CASE_LABEL (default_case)); } else *expr_p = SWITCH_BODY (switch_expr); @@ -1285,7 +1285,7 @@ gimplify_case_label_expr (tree *expr_p) gcc_assert (gimplify_ctxp->case_labels); VEC_safe_push (tree, heap, gimplify_ctxp->case_labels, expr); - *expr_p = build (LABEL_EXPR, void_type_node, CASE_LABEL (expr)); + *expr_p = build1 (LABEL_EXPR, void_type_node, CASE_LABEL (expr)); return GS_ALL_DONE; } @@ -1319,7 +1319,7 @@ gimplify_exit_expr (tree *expr_p) tree expr; expr = build_and_jump (&gimplify_ctxp->exit_label); - expr = build (COND_EXPR, void_type_node, cond, expr, NULL_TREE); + expr = build3 (COND_EXPR, void_type_node, cond, expr, NULL_TREE); *expr_p = expr; return GS_OK; @@ -1759,8 +1759,8 @@ gimplify_self_mod_expr (tree *expr_p, tree *pre_p, tree *post_p, return ret; } - t1 = build (arith_code, TREE_TYPE (*expr_p), lhs, rhs); - t1 = build (MODIFY_EXPR, TREE_TYPE (lvalue), lvalue, t1); + t1 = build2 (arith_code, TREE_TYPE (*expr_p), lhs, rhs); + t1 = build2 (MODIFY_EXPR, TREE_TYPE (lvalue), lvalue, t1); if (postfix) { @@ -2007,17 +2007,17 @@ shortcut_cond_r (tree pred, tree *true_label_p, tree *false_label_p) if (b) goto yes; else goto no; else if (c) goto yes; else goto no; */ - expr = build (COND_EXPR, void_type_node, TREE_OPERAND (pred, 0), - shortcut_cond_r (TREE_OPERAND (pred, 1), true_label_p, - false_label_p), - shortcut_cond_r (TREE_OPERAND (pred, 2), true_label_p, - false_label_p)); + expr = build3 (COND_EXPR, void_type_node, TREE_OPERAND (pred, 0), + shortcut_cond_r (TREE_OPERAND (pred, 1), true_label_p, + false_label_p), + shortcut_cond_r (TREE_OPERAND (pred, 2), true_label_p, + false_label_p)); } else { - expr = build (COND_EXPR, void_type_node, pred, - build_and_jump (true_label_p), - build_and_jump (false_label_p)); + expr = build3 (COND_EXPR, void_type_node, pred, + build_and_jump (true_label_p), + build_and_jump (false_label_p)); } if (local_label) @@ -2052,7 +2052,7 @@ shortcut_cond_expr (tree expr) then_ = shortcut_cond_expr (expr); then_se = then_ && TREE_SIDE_EFFECTS (then_); pred = TREE_OPERAND (pred, 0); - expr = build (COND_EXPR, void_type_node, pred, then_, NULL_TREE); + expr = build3 (COND_EXPR, void_type_node, pred, then_, NULL_TREE); } } if (!then_se) @@ -2067,7 +2067,7 @@ shortcut_cond_expr (tree expr) else_ = shortcut_cond_expr (expr); else_se = else_ && TREE_SIDE_EFFECTS (else_); pred = TREE_OPERAND (pred, 0); - expr = build (COND_EXPR, void_type_node, pred, NULL_TREE, else_); + expr = build3 (COND_EXPR, void_type_node, pred, NULL_TREE, else_); } } @@ -2282,8 +2282,8 @@ gimplify_cond_expr (tree *expr_p, tree *pre_p, tree *post_p, tree target, tmp2 = tmp = create_tmp_var (type, "iftmp"); - expr = build (COND_EXPR, void_type_node, TREE_OPERAND (expr, 0), - TREE_OPERAND (expr, 1), TREE_OPERAND (expr, 2)); + expr = build3 (COND_EXPR, void_type_node, TREE_OPERAND (expr, 0), + TREE_OPERAND (expr, 1), TREE_OPERAND (expr, 2)); result = build_fold_indirect_ref (tmp); ret = GS_ALL_DONE; @@ -2293,12 +2293,12 @@ gimplify_cond_expr (tree *expr_p, tree *pre_p, tree *post_p, tree target, if this branch is void; in C++ it can be, if it's a throw. */ if (TREE_TYPE (TREE_OPERAND (expr, 1)) != void_type_node) TREE_OPERAND (expr, 1) - = build (MODIFY_EXPR, void_type_node, tmp, TREE_OPERAND (expr, 1)); + = build2 (MODIFY_EXPR, void_type_node, tmp, TREE_OPERAND (expr, 1)); /* Build the else clause, 't1 = b;'. */ if (TREE_TYPE (TREE_OPERAND (expr, 2)) != void_type_node) TREE_OPERAND (expr, 2) - = build (MODIFY_EXPR, void_type_node, tmp2, TREE_OPERAND (expr, 2)); + = build2 (MODIFY_EXPR, void_type_node, tmp2, TREE_OPERAND (expr, 2)); TREE_TYPE (expr) = void_type_node; recalculate_side_effects (expr); @@ -2712,14 +2712,14 @@ gimplify_init_ctor_eval (tree object, VEC(constructor_elt,gc) *elts, if (array_elt_type) { - cref = build (ARRAY_REF, array_elt_type, unshare_expr (object), - purpose, NULL_TREE, NULL_TREE); + cref = build4 (ARRAY_REF, array_elt_type, unshare_expr (object), + purpose, NULL_TREE, NULL_TREE); } else { gcc_assert (TREE_CODE (purpose) == FIELD_DECL); - cref = build (COMPONENT_REF, TREE_TYPE (purpose), - unshare_expr (object), purpose, NULL_TREE); + cref = build3 (COMPONENT_REF, TREE_TYPE (purpose), + unshare_expr (object), purpose, NULL_TREE); } if (TREE_CODE (value) == CONSTRUCTOR @@ -2728,7 +2728,7 @@ gimplify_init_ctor_eval (tree object, VEC(constructor_elt,gc) *elts, pre_p, cleared); else { - init = build (MODIFY_EXPR, TREE_TYPE (cref), cref, value); + init = build2 (MODIFY_EXPR, TREE_TYPE (cref), cref, value); gimplify_and_add (init, pre_p); } } @@ -2946,7 +2946,7 @@ gimplify_init_constructor (tree *expr_p, tree *pre_p, } else { - ctor = build (COMPLEX_EXPR, type, r, i); + ctor = build2 (COMPLEX_EXPR, type, r, i); TREE_OPERAND (*expr_p, 1) = ctor; ret = gimplify_expr (&TREE_OPERAND (*expr_p, 1), pre_p, post_p, rhs_predicate_for (TREE_OPERAND (*expr_p, 0)), @@ -3377,7 +3377,7 @@ gimplify_variable_sized_compare (tree *expr_p) t = implicit_built_in_decls[BUILT_IN_MEMCMP]; t = build_function_call_expr (t, args); *expr_p - = build (TREE_CODE (*expr_p), TREE_TYPE (*expr_p), t, integer_zero_node); + = build2 (TREE_CODE (*expr_p), TREE_TYPE (*expr_p), t, integer_zero_node); return GS_OK; } @@ -3400,9 +3400,9 @@ gimplify_boolean_expr (tree *expr_p) /* Preserve the original type of the expression. */ tree type = TREE_TYPE (*expr_p); - *expr_p = build (COND_EXPR, type, *expr_p, - convert (type, boolean_true_node), - convert (type, boolean_false_node)); + *expr_p = build3 (COND_EXPR, type, *expr_p, + convert (type, boolean_true_node), + convert (type, boolean_false_node)); return GS_OK; } @@ -3611,7 +3611,7 @@ gimplify_addr_expr (tree *expr_p, tree *pre_p, tree *post_p) /* Make sure TREE_INVARIANT, TREE_CONSTANT, and TREE_SIDE_EFFECTS is set properly. */ - recompute_tree_invarant_for_addr_expr (expr); + recompute_tree_invariant_for_addr_expr (expr); /* Mark the RHS addressable. */ lang_hooks.mark_addressable (TREE_OPERAND (expr, 0)); @@ -3705,7 +3705,7 @@ gimplify_asm_expr (tree *expr_p, tree *pre_p, tree *post_p) break; } - str = alloca (len); + str = (char *) alloca (len); for (beg = p + 1, dst = str;;) { const char *tem; @@ -3847,7 +3847,7 @@ gimplify_cleanup_point_expr (tree *expr_p, tree *pre_p) code = TRY_FINALLY_EXPR; sl = tsi_split_statement_list_after (&iter); - tfe = build (code, void_type_node, sl, NULL_TREE); + tfe = build2 (code, void_type_node, sl, NULL_TREE); append_to_statement_list (TREE_OPERAND (wce, 0), &TREE_OPERAND (tfe, 1)); *wce_p = tfe; @@ -3908,12 +3908,12 @@ gimple_push_cleanup (tree var, tree cleanup, bool eh_only, tree *pre_p) */ tree flag = create_tmp_var (boolean_type_node, "cleanup"); - tree ffalse = build (MODIFY_EXPR, void_type_node, flag, - boolean_false_node); - tree ftrue = build (MODIFY_EXPR, void_type_node, flag, - boolean_true_node); - cleanup = build (COND_EXPR, void_type_node, flag, cleanup, NULL); - wce = build (WITH_CLEANUP_EXPR, void_type_node, cleanup); + tree ffalse = build2 (MODIFY_EXPR, void_type_node, flag, + boolean_false_node); + tree ftrue = build2 (MODIFY_EXPR, void_type_node, flag, + boolean_true_node); + cleanup = build3 (COND_EXPR, void_type_node, flag, cleanup, NULL); + wce = build1 (WITH_CLEANUP_EXPR, void_type_node, cleanup); append_to_statement_list (ffalse, &gimplify_ctxp->conditional_cleanups); append_to_statement_list (wce, &gimplify_ctxp->conditional_cleanups); append_to_statement_list (ftrue, pre_p); @@ -3925,7 +3925,7 @@ gimple_push_cleanup (tree var, tree cleanup, bool eh_only, tree *pre_p) } else { - wce = build (WITH_CLEANUP_EXPR, void_type_node, cleanup); + wce = build1 (WITH_CLEANUP_EXPR, void_type_node, cleanup); CLEANUP_EH_ONLY (wce) = eh_only; append_to_statement_list (wce, pre_p); } @@ -3961,7 +3961,7 @@ gimplify_target_expr (tree *expr_p, tree *pre_p, tree *post_p) gimplify_bind_expr (&init, temp, pre_p); if (init != temp) { - init = build (MODIFY_EXPR, void_type_node, temp, init); + init = build2 (MODIFY_EXPR, void_type_node, temp, init); ret = gimplify_expr (&init, pre_p, post_p, is_gimple_stmt, fb_none); } @@ -4562,7 +4562,7 @@ gimplify_expr (tree *expr_p, tree *pre_p, tree *post_p, given a TREE_ADDRESSABLE type. */ tree tmp = create_tmp_var_raw (type, "vol"); gimple_add_tmp_var (tmp); - *expr_p = build (MODIFY_EXPR, type, tmp, *expr_p); + *expr_p = build2 (MODIFY_EXPR, type, tmp, *expr_p); } else /* We can't do anything useful with a volatile reference to @@ -4912,8 +4912,8 @@ gimplify_body (tree *body_p, tree fndecl, bool do_parms) /* If there isn't an outer BIND_EXPR, add one. */ if (TREE_CODE (body) != BIND_EXPR) { - tree b = build (BIND_EXPR, void_type_node, NULL_TREE, - NULL_TREE, NULL_TREE); + tree b = build3 (BIND_EXPR, void_type_node, NULL_TREE, + NULL_TREE, NULL_TREE); TREE_SIDE_EFFECTS (b) = 1; append_to_statement_list_force (body, &BIND_EXPR_BODY (b)); body = b; @@ -4983,7 +4983,7 @@ gimplify_function_tree (tree fndecl) { tree tf, x, bind; - tf = build (TRY_FINALLY_EXPR, void_type_node, NULL, NULL); + tf = build2 (TRY_FINALLY_EXPR, void_type_node, NULL, NULL); TREE_SIDE_EFFECTS (tf) = 1; x = DECL_SAVED_TREE (fndecl); append_to_statement_list (x, &TREE_OPERAND (tf, 0)); @@ -4991,7 +4991,7 @@ gimplify_function_tree (tree fndecl) x = build_function_call_expr (x, NULL); append_to_statement_list (x, &TREE_OPERAND (tf, 1)); - bind = build (BIND_EXPR, void_type_node, NULL, NULL, NULL); + bind = build3 (BIND_EXPR, void_type_node, NULL, NULL, NULL); TREE_SIDE_EFFECTS (bind) = 1; x = implicit_built_in_decls[BUILT_IN_PROFILE_FUNC_ENTER]; x = build_function_call_expr (x, NULL); @@ -5029,7 +5029,7 @@ force_gimple_operand (tree expr, tree *stmts, bool simple, tree var) gimplify_ctxp->into_ssa = in_ssa_p; if (var) - expr = build (MODIFY_EXPR, TREE_TYPE (var), var, expr); + expr = build2 (MODIFY_EXPR, TREE_TYPE (var), var, expr); ret = gimplify_expr (&expr, stmts, NULL, gimple_test_f, fb_rvalue); diff --git a/gcc/ginclude/decfloat.h b/gcc/ginclude/decfloat.h new file mode 100644 index 00000000000..fbf13463316 --- /dev/null +++ b/gcc/ginclude/decfloat.h @@ -0,0 +1,108 @@ +/* Copyright (C) 2005 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, 51 Franklin Street, Fifth Floor, +Boston, MA 02110-1301, USA. */ + +/* As a special exception, if you include this header file into source + files compiled by GCC, this header file does not by itself cause + the resulting executable to be covered by the GNU General Public + License. This exception does not however invalidate any other + reasons why the executable file might be covered by the GNU General + Public License. */ + +/* + * Draft C Extension to support decimal floating-pointing arithmetic: + * Characteristics of decimal floating types + */ + +#ifndef _DECFLOAT_H___ +#define _DECFLOAT_H___ + +/* Number of base-FLT_RADIX digits in the significand, p. */ +#undef DEC32_MANT_DIG +#undef DEC64_MANT_DIG +#undef DEC128_MANT_DIG +#define DEC32_MANT_DIG __DEC32_MANT_DIG__ +#define DEC64_MANT_DIG __DEC64_MANT_DIG__ +#define DEC128_MANT_DIG __DEC128_MANT_DIG__ + +/* Minimum exponent. */ +#undef DEC32_MIN_EXP +#undef DEC64_MIN_EXP +#undef DEC128_MIN_EXP +#define DEC32_MIN_EXP __DEC32_MIN_EXP__ +#define DEC64_MIN_EXP __DEC64_MIN_EXP__ +#define DEC128_MIN_EXP __DEC128_MIN_EXP__ + +/* Maximum exponent. */ +#undef DEC32_MAX_EXP +#undef DEC64_MAX_EXP +#undef DEC128_MAX_EXP +#define DEC32_MAX_EXP __DEC32_MAX_EXP__ +#define DEC64_MAX_EXP __DEC64_MAX_EXP__ +#define DEC128_MAX_EXP __DEC128_MAX_EXP__ + +/* Maximum representable finite decimal floating-point number + (there are 6, 15, and 33 9s after the decimal points respectively). */ +#undef DEC32_MAX +#undef DEC64_MAX +#undef DEC128_MAX +#define DEC32_MAX __DEC32_MAX__ +#define DEC64_MAX __DEC64_MAX__ +#define DEC128_MAX __DEC128_MAX__ + +/* The difference between 1 and the least value greater than 1 that is + representable in the given floating point type. */ +#undef DEC32_EPSILON +#undef DEC64_EPSILON +#undef DEC128_EPSILON +#define DEC32_EPSILON __DEC32_EPSILON__ +#define DEC64_EPSILON __DEC64_EPSILON__ +#define DEC128_EPSILON __DEC128_EPSILON__ + +/* Minimum normalized positive floating-point number. */ +#undef DEC32_MIN +#undef DEC64_MIN +#undef DEC128_MIN +#define DEC32_MIN __DEC32_MIN__ +#define DEC64_MIN __DEC64_MIN__ +#define DEC128_MIN __DEC128_MIN__ + +/* Minimum denormalized positive floating-point number. */ +#undef DEC32_DEN +#undef DEC64_DEN +#undef DEC128_DEN +#define DEC32_DEN __DEC32_MIN__ +#define DEC64_DEN __DEC64_MIN__ +#define DEC128_DEN __DEC128_MIN__ + +/* The floating-point expression evaluation method. + -1 indeterminate + 0 evaluate all operations and constants just to the range and + precision of the type + 1 evaluate operations and constants of type _Decimal32 + and _Decimal64 to the range and precision of the _Decimal64 + type, evaluate _Decimal128 operations and constants to the + range and precision of the _Decimal128 type; + 2 evaluate all operations and constants to the range and + precision of the _Decimal128 type. +*/ + +#undef DECFLT_EVAL_METHOD +#define DECFLT_EVAL_METHOD __DECFLT_EVAL_METHOD__ + +#endif /* _DECFLOAT_H___ */ diff --git a/gcc/global.c b/gcc/global.c index d4e2b773559..e88e1012a5e 100644 --- a/gcc/global.c +++ b/gcc/global.c @@ -621,7 +621,7 @@ global_alloc (FILE *file) #if 0 /* We need to eliminate regs even if there is no rtl code, for the sake of debugging information. */ - if (n_basic_blocks > 0) + if (n_basic_blocks > NUM_FIXED_BLOCKS) #endif { build_insn_chain (get_insns ()); @@ -2281,9 +2281,9 @@ set_up_bb_rts_numbers (void) int i; int *rts_order; - rts_order = xmalloc (sizeof (int) * n_basic_blocks); - flow_reverse_top_sort_order_compute (rts_order); - for (i = 0; i < n_basic_blocks; i++) + rts_order = xmalloc (sizeof (int) * (n_basic_blocks - NUM_FIXED_BLOCKS)); + post_order_compute (rts_order, false); + for (i = 0; i < n_basic_blocks - NUM_FIXED_BLOCKS; i++) BB_INFO_BY_INDEX (rts_order [i])->rts_number = i; free (rts_order); } @@ -2301,9 +2301,6 @@ rpost_cmp (const void *bb1, const void *bb2) /* Temporary bitmap used for live_pavin, live_pavout calculation. */ static bitmap temp_bitmap; -DEF_VEC_P(basic_block); -DEF_VEC_ALLOC_P(basic_block,heap); - /* The function calculates partial register availability according to the following equations: diff --git a/gcc/gthr-dce.h b/gcc/gthr-dce.h index 517f5a30443..fe4bba769d9 100644 --- a/gcc/gthr-dce.h +++ b/gcc/gthr-dce.h @@ -64,7 +64,7 @@ typedef pthread_mutex_t __gthread_recursive_mutex_t; #if SUPPORTS_WEAK && GTHREAD_USE_WEAK # define __gthrw(name) \ - extern __typeof(name) __gthrw_ ## name __attribute__ ((__weakref__(#name))) + static __typeof(name) __gthrw_ ## name __attribute__ ((__weakref__(#name))) #else # define __gthrw_asmname(cname) __gthrw_asmnamep (__USER_LABEL_PREFIX__, cname) # define __gthrw_asmnamep(prefix, cname) __gthrw_string (prefix) cname diff --git a/gcc/gthr-posix.h b/gcc/gthr-posix.h index d022c9f1b79..e36a76d19ab 100644 --- a/gcc/gthr-posix.h +++ b/gcc/gthr-posix.h @@ -60,7 +60,7 @@ typedef pthread_mutex_t __gthread_recursive_mutex_t; #if SUPPORTS_WEAK && GTHREAD_USE_WEAK # define __gthrw(name) \ - extern __typeof(name) __gthrw_ ## name __attribute__ ((__weakref__(#name))) + static __typeof(name) __gthrw_ ## name __attribute__ ((__weakref__(#name))) #else # define __gthrw_asmname(cname) __gthrw_asmnamep (__USER_LABEL_PREFIX__, cname) # define __gthrw_asmnamep(prefix, cname) __gthrw_string (prefix) cname diff --git a/gcc/gthr-posix95.h b/gcc/gthr-posix95.h index 71661eb8091..f4ee09fb028 100644 --- a/gcc/gthr-posix95.h +++ b/gcc/gthr-posix95.h @@ -58,7 +58,7 @@ typedef struct { #if SUPPORTS_WEAK && GTHREAD_USE_WEAK # define __gthrw(name) \ - extern __typeof(name) __gthrw_ ## name __attribute__ ((__weakref__(#name))) + static __typeof(name) __gthrw_ ## name __attribute__ ((__weakref__(#name))) #else # define __gthrw_asmname(cname) __gthrw_asmnamep (__USER_LABEL_PREFIX__, cname) # define __gthrw_asmnamep(prefix, cname) __gthrw_string (prefix) cname diff --git a/gcc/gthr-solaris.h b/gcc/gthr-solaris.h index 01757dc006d..b0ceba6d1c4 100644 --- a/gcc/gthr-solaris.h +++ b/gcc/gthr-solaris.h @@ -58,7 +58,7 @@ typedef struct { #if SUPPORTS_WEAK && GTHREAD_USE_WEAK # define __gthrw(name) \ - extern __typeof(name) __gthrw_ ## name __attribute__ ((__weakref__(#name))) + static __typeof(name) __gthrw_ ## name __attribute__ ((__weakref__(#name))) #else # define __gthrw_asmname(cname) __gthrw_asmnamep (__USER_LABEL_PREFIX__, cname) # define __gthrw_asmnamep(prefix, cname) __gthrw_string (prefix) cname diff --git a/gcc/gthr-tpf.h b/gcc/gthr-tpf.h index d54a6c80171..f797a49671f 100644 --- a/gcc/gthr-tpf.h +++ b/gcc/gthr-tpf.h @@ -70,7 +70,7 @@ typedef pthread_mutex_t __gthread_recursive_mutex_t; #if SUPPORTS_WEAK && GTHREAD_USE_WEAK # define __gthrw(name) \ - extern __typeof(name) __gthrw_ ## name __attribute__ ((__weakref__(#name))) + static __typeof(name) __gthrw_ ## name __attribute__ ((__weakref__(#name))) #else # define __gthrw_asmname(cname) __gthrw_asmnamep (__USER_LABEL_PREFIX__, cname) # define __gthrw_asmnamep(prefix, cname) __gthrw_string (prefix) cname diff --git a/gcc/ifcvt.c b/gcc/ifcvt.c index e7eec87bfc1..d72b86d976e 100644 --- a/gcc/ifcvt.c +++ b/gcc/ifcvt.c @@ -2016,6 +2016,52 @@ noce_get_condition (rtx jump, rtx *earliest) NULL_RTX, false, true); } +/* Initialize for a simple IF-THEN or IF-THEN-ELSE block. We will not + be using conditional execution. Set some fields of IF_INFO based + on CE_INFO: test_bb, cond, jump, cond_earliest. Return TRUE if + things look OK. */ + +static int +noce_init_if_info (struct ce_if_block *ce_info, struct noce_if_info *if_info) +{ + basic_block test_bb = ce_info->test_bb; + rtx cond, jump; + + /* If test is comprised of && or || elements, don't handle it unless + it is the special case of && elements without an ELSE block. */ + if (ce_info->num_multiple_test_blocks) + { + if (ce_info->else_bb || !ce_info->and_and_p) + return FALSE; + + ce_info->test_bb = test_bb = ce_info->last_test_bb; + ce_info->num_multiple_test_blocks = 0; + ce_info->num_and_and_blocks = 0; + ce_info->num_or_or_blocks = 0; + } + + /* If this is not a standard conditional jump, we can't parse it. */ + jump = BB_END (test_bb); + cond = noce_get_condition (jump, &if_info->cond_earliest); + if (!cond) + return FALSE; + + /* If the conditional jump is more than just a conditional + jump, then we can not do if-conversion on this block. */ + if (! onlyjump_p (jump)) + return FALSE; + + /* We must be comparing objects whose modes imply the size. */ + if (GET_MODE (XEXP (cond, 0)) == BLKmode) + return FALSE; + + if_info->test_bb = test_bb; + if_info->cond = cond; + if_info->jump = jump; + + return TRUE; +} + /* Return true if OP is ok for if-then-else processing. */ static int @@ -2111,33 +2157,11 @@ noce_process_if_block (struct ce_if_block * ce_info) ??? For future expansion, look for multiple X in such patterns. */ - /* If test is comprised of && or || elements, don't handle it unless it is - the special case of && elements without an ELSE block. */ - if (ce_info->num_multiple_test_blocks) - { - if (else_bb || ! ce_info->and_and_p) - return FALSE; - - ce_info->test_bb = test_bb = ce_info->last_test_bb; - ce_info->num_multiple_test_blocks = 0; - ce_info->num_and_and_blocks = 0; - ce_info->num_or_or_blocks = 0; - } - - /* If this is not a standard conditional jump, we can't parse it. */ - jump = BB_END (test_bb); - cond = noce_get_condition (jump, &if_info.cond_earliest); - if (! cond) - return FALSE; - - /* If the conditional jump is more than just a conditional - jump, then we can not do if-conversion on this block. */ - if (! onlyjump_p (jump)) + if (!noce_init_if_info (ce_info, &if_info)) return FALSE; - /* We must be comparing objects whose modes imply the size. */ - if (GET_MODE (XEXP (cond, 0)) == BLKmode) - return FALSE; + cond = if_info.cond; + jump = if_info.jump; /* Look for one of the potential sets. */ insn_a = first_active_insn (then_bb); @@ -2216,9 +2240,6 @@ noce_process_if_block (struct ce_if_block * ce_info) return FALSE; /* Set up the info block for our subroutines. */ - if_info.test_bb = test_bb; - if_info.cond = cond; - if_info.jump = jump; if_info.insn_a = insn_a; if_info.insn_b = insn_b; if_info.x = x; @@ -2340,6 +2361,235 @@ noce_process_if_block (struct ce_if_block * ce_info) return TRUE; } + +/* Check whether a block is suitable for conditional move conversion. + Every insn must be a simple set of a register to a constant or a + register. For each assignment, store the value in the array VALS, + indexed by register number. COND is the condition we will + test. */ + +static int +check_cond_move_block (basic_block bb, rtx *vals, rtx cond) +{ + rtx insn; + + FOR_BB_INSNS (bb, insn) + { + rtx set, dest, src; + + if (!INSN_P (insn) || JUMP_P (insn)) + continue; + set = single_set (insn); + if (!set) + return FALSE; + + dest = SET_DEST (set); + src = SET_SRC (set); + if (!REG_P (dest) + || (SMALL_REGISTER_CLASSES && HARD_REGISTER_P (dest))) + return false; + + if (!CONSTANT_P (src) && !register_operand (src, VOIDmode)) + return FALSE; + + if (side_effects_p (src) || side_effects_p (dest)) + return FALSE; + + if (may_trap_p (src) || may_trap_p (dest)) + return FALSE; + + /* Don't try to handle this if the destination register was + modified earlier in the block. */ + if (vals[REGNO (dest)] != NULL) + return FALSE; + + /* Don't try to handle this if the condition uses the + destination register. */ + if (reg_overlap_mentioned_p (dest, cond)) + return FALSE; + + vals[REGNO (dest)] = src; + + /* Don't try to handle this if the source register is modified + later in the block. */ + if (!CONSTANT_P (src) + && modified_between_p (src, insn, NEXT_INSN (BB_END (bb)))) + return FALSE; + } + + return TRUE; +} + +/* Given a simple IF-THEN or IF-THEN-ELSE block, attempt to convert it + using only conditional moves. Return TRUE if we were successful at + converting the block. */ + +static int +cond_move_process_if_block (struct ce_if_block *ce_info) +{ + basic_block then_bb = ce_info->then_bb; + basic_block else_bb = ce_info->else_bb; + struct noce_if_info if_info; + rtx jump, cond, insn, seq, cond_arg0, cond_arg1, loc_insn; + int max_reg, size, c, i; + rtx *then_vals; + rtx *else_vals; + enum rtx_code code; + + if (!HAVE_conditional_move || no_new_pseudos) + return FALSE; + + memset (&if_info, 0, sizeof if_info); + + if (!noce_init_if_info (ce_info, &if_info)) + return FALSE; + + cond = if_info.cond; + jump = if_info.jump; + + /* Build a mapping for each block to the value used for each + register. */ + max_reg = max_reg_num (); + size = (max_reg + 1) * sizeof (rtx); + then_vals = (rtx *) alloca (size); + else_vals = (rtx *) alloca (size); + memset (then_vals, 0, size); + memset (else_vals, 0, size); + + /* Make sure the blocks are suitable. */ + if (!check_cond_move_block (then_bb, then_vals, cond) + || (else_bb && !check_cond_move_block (else_bb, else_vals, cond))) + return FALSE; + + /* Make sure the blocks can be used together. If the same register + is set in both blocks, and is not set to a constant in both + cases, then both blocks must set it to the same register. We + have already verified that if it is set to a register, that the + source register does not change after the assignment. Also count + the number of registers set in only one of the blocks. */ + c = 0; + for (i = 0; i <= max_reg; ++i) + { + if (!then_vals[i] && !else_vals[i]) + continue; + + if (!then_vals[i] || !else_vals[i]) + ++c; + else + { + if (!CONSTANT_P (then_vals[i]) + && !CONSTANT_P (else_vals[i]) + && !rtx_equal_p (then_vals[i], else_vals[i])) + return FALSE; + } + } + + /* Make sure it is reasonable to convert this block. What matters + is the number of assignments currently made in only one of the + branches, since if we convert we are going to always execute + them. */ + if (c > MAX_CONDITIONAL_EXECUTE) + return FALSE; + + /* Emit the conditional moves. First do the then block, then do + anything left in the else blocks. */ + + code = GET_CODE (cond); + cond_arg0 = XEXP (cond, 0); + cond_arg1 = XEXP (cond, 1); + + start_sequence (); + + FOR_BB_INSNS (then_bb, insn) + { + rtx set, target, dest, t, e; + unsigned int regno; + + if (!INSN_P (insn) || JUMP_P (insn)) + continue; + set = single_set (insn); + gcc_assert (set && REG_P (SET_DEST (set))); + + dest = SET_DEST (set); + regno = REGNO (dest); + t = then_vals[regno]; + e = else_vals[regno]; + gcc_assert (t); + if (!e) + e = dest; + target = noce_emit_cmove (&if_info, dest, code, cond_arg0, cond_arg1, + t, e); + if (!target) + { + end_sequence (); + return FALSE; + } + + if (target != dest) + noce_emit_move_insn (dest, target); + } + + if (else_bb) + { + FOR_BB_INSNS (else_bb, insn) + { + rtx set, target, dest; + unsigned int regno; + + if (!INSN_P (insn) || JUMP_P (insn)) + continue; + set = single_set (insn); + gcc_assert (set && REG_P (SET_DEST (set))); + + dest = SET_DEST (set); + regno = REGNO (dest); + + /* If this register was set in the then block, we already + handled this case above. */ + if (then_vals[regno]) + continue; + gcc_assert (else_vals[regno]); + + target = noce_emit_cmove (&if_info, dest, code, cond_arg0, cond_arg1, + dest, else_vals[regno]); + if (!target) + { + end_sequence (); + return FALSE; + } + + if (target != dest) + noce_emit_move_insn (dest, target); + } + } + + seq = end_ifcvt_sequence (&if_info); + if (!seq) + return FALSE; + + loc_insn = first_active_insn (then_bb); + if (!loc_insn) + { + loc_insn = first_active_insn (else_bb); + gcc_assert (loc_insn); + } + emit_insn_before_setloc (seq, jump, INSN_LOCATOR (loc_insn)); + + FOR_BB_INSNS (then_bb, insn) + if (INSN_P (insn) && !JUMP_P (insn)) + delete_insn (insn); + if (else_bb) + { + FOR_BB_INSNS (else_bb, insn) + if (INSN_P (insn) && !JUMP_P (insn)) + delete_insn (insn); + } + delete_insn (jump); + + merge_if_block (ce_info); + + return TRUE; +} /* Attempt to convert an IF-THEN or IF-THEN-ELSE block into straight line code. Return true if successful. */ @@ -2351,6 +2601,10 @@ process_if_block (struct ce_if_block * ce_info) && noce_process_if_block (ce_info)) return TRUE; + if (HAVE_conditional_move + && cond_move_process_if_block (ce_info)) + return TRUE; + if (HAVE_conditional_execution && reload_completed) { /* If we have && and || tests, try to first handle combining the && and @@ -3135,7 +3389,7 @@ find_if_case_1 (basic_block test_bb, edge then_edge, edge else_edge) if (new_bb) { new_bb->index = then_bb_index; - BASIC_BLOCK (then_bb_index) = new_bb; + SET_BASIC_BLOCK (then_bb_index, new_bb); /* Since the fallthru edge was redirected from test_bb to new_bb, we need to ensure that new_bb is in the same partition as test bb (you can not fall through across section boundaries). */ @@ -3194,14 +3448,14 @@ find_if_case_2 (basic_block test_bb, edge then_edge, edge else_edge) return FALSE; /* THEN is not EXIT. */ - if (then_bb->index < 0) + if (then_bb->index < NUM_FIXED_BLOCKS) return FALSE; /* ELSE is predicted or SUCC(ELSE) postdominates THEN. */ note = find_reg_note (BB_END (test_bb), REG_BR_PROB, NULL_RTX); if (note && INTVAL (XEXP (note, 0)) >= REG_BR_PROB_BASE / 2) ; - else if (else_succ->dest->index < 0 + else if (else_succ->dest->index < NUM_FIXED_BLOCKS || dominated_by_p (CDI_POST_DOMINATORS, then_bb, else_succ->dest)) ; diff --git a/gcc/ipa-inline.c b/gcc/ipa-inline.c index b6d6095abc5..a163db0fbaa 100644 --- a/gcc/ipa-inline.c +++ b/gcc/ipa-inline.c @@ -115,24 +115,26 @@ cgraph_estimate_size_after_inlining (int times, struct cgraph_node *to, void cgraph_clone_inlined_nodes (struct cgraph_edge *e, bool duplicate, bool update_original) { - struct cgraph_node *n; - - /* We may eliminate the need for out-of-line copy to be output. In that - case just go ahead and re-use it. */ - if (!e->callee->callers->next_caller - && (!e->callee->needed || DECL_EXTERNAL (e->callee->decl)) - && duplicate - && flag_unit_at_a_time) + if (duplicate) { - gcc_assert (!e->callee->global.inlined_to); - if (!DECL_EXTERNAL (e->callee->decl)) - overall_insns -= e->callee->global.insns, nfunctions_inlined++; - duplicate = 0; - } - else if (duplicate) - { - n = cgraph_clone_node (e->callee, e->count, e->loop_nest, update_original); - cgraph_redirect_edge_callee (e, n); + /* We may eliminate the need for out-of-line copy to be output. + In that case just go ahead and re-use it. */ + if (!e->callee->callers->next_caller + && !e->callee->needed + && flag_unit_at_a_time) + { + gcc_assert (!e->callee->global.inlined_to); + if (DECL_SAVED_TREE (e->callee->decl)) + overall_insns -= e->callee->global.insns, nfunctions_inlined++; + duplicate = false; + } + else + { + struct cgraph_node *n; + n = cgraph_clone_node (e->callee, e->count, e->loop_nest, + update_original); + cgraph_redirect_edge_callee (e, n); + } } if (e->caller->global.inlined_to) diff --git a/gcc/ipa-reference.c b/gcc/ipa-reference.c index 531705226a5..ec8d3b8e595 100644 --- a/gcc/ipa-reference.c +++ b/gcc/ipa-reference.c @@ -111,7 +111,7 @@ tree memory_identifier_string; static inline ipa_reference_vars_info_t get_reference_vars_info_from_cgraph (struct cgraph_node * node) { - return get_var_ann (node->decl)->reference_vars_info; + return get_function_ann (node->decl)->reference_vars_info; } /* Get a bitmap that contains all of the locally referenced static @@ -119,7 +119,7 @@ get_reference_vars_info_from_cgraph (struct cgraph_node * node) static ipa_reference_local_vars_info_t get_local_reference_vars_info (tree fn) { - ipa_reference_vars_info_t info = get_var_ann (fn)->reference_vars_info; + ipa_reference_vars_info_t info = get_function_ann (fn)->reference_vars_info; if (info) return info->local; @@ -134,7 +134,7 @@ get_local_reference_vars_info (tree fn) static ipa_reference_global_vars_info_t get_global_reference_vars_info (tree fn) { - ipa_reference_vars_info_t info = get_var_ann (fn)->reference_vars_info; + ipa_reference_vars_info_t info = get_function_ann (fn)->reference_vars_info; if (info) return info->global; @@ -790,7 +790,7 @@ analyze_function (struct cgraph_node *fn) tree decl = fn->decl; /* Add the info to the tree's annotation. */ - get_var_ann (fn->decl)->reference_vars_info = info; + get_function_ann (fn->decl)->reference_vars_info = info; info->local = l; l->statics_read = BITMAP_ALLOC (&ipa_obstack); @@ -874,8 +874,8 @@ clean_function (struct cgraph_node *fn) } - free (get_var_ann (fn->decl)->reference_vars_info); - get_var_ann (fn->decl)->reference_vars_info = NULL; + free (get_function_ann (fn->decl)->reference_vars_info); + get_function_ann (fn->decl)->reference_vars_info = NULL; } diff --git a/gcc/ipa-type-escape.c b/gcc/ipa-type-escape.c index 5f0bb4d43d8..9e10dbb3d6b 100644 --- a/gcc/ipa-type-escape.c +++ b/gcc/ipa-type-escape.c @@ -1360,13 +1360,10 @@ analyze_variable (struct cgraph_varpool_node *vnode) if (vnode->externally_visible) mark_interesting_type (type, FULL_ESCAPE); - if (TREE_CODE (global) == VAR_DECL) - { - if (DECL_INITIAL (global)) - walk_tree (&DECL_INITIAL (global), scan_for_refs, - NULL, visited_nodes); - } - else abort(); + gcc_assert (TREE_CODE (global) == VAR_DECL); + + if (DECL_INITIAL (global)) + walk_tree (&DECL_INITIAL (global), scan_for_refs, NULL, visited_nodes); } /* This is the main routine for finding the reference patterns for diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index 093fc8fb089..b310af7fb55 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -1,3 +1,97 @@ +2006-01-06 Tom Tromey + + * gcj.texi (Arrays): Added more documentation for + JvNewObjectArray. + (Primitive types): Correct information about primitive classes. + (Reference types): New node. + (Index): New node. + +2005-12-16 Alexandre Oliva + + * jcf-parse.c (set_source_filename): Set the decl source location + even when returning early. + +2005-12-15 Tom Tromey + Andrew Haley + + PR java/25429 + * parse.y (resolve_expression_name): Don't generate accessor + methods for constant fields. + +2005-12-13 Andrew Haley + + PR java/25366 + PR java/25368 + * class.c (maybe_layout_super_class): Update current_class before + calling do_resolve_class. + +2005-12-12 H.J. Lu + + PR java/25330 + * jcf-write.c (write_classfile): Use PID in temporary class + file. Save/restore errno when reporting error. + +2005-12-10 Terry Laurenzo + + PR java/9861 + * mangle.c (mangle_method_decl): Mangle Java methods by prepending 'J' + to bare_function_type and including the return type + * builtins.c (initialize_builtins) : Change builtin mangled name + constants to conform to new mangling scheme + +2005-12-08 Andrew Haley + + PR libgcj/25265 + * java-tree.h (enum java_tree_index): Add JTI_SOFT_NOSUCHFIELD_NODE. + (soft_abstractmethod_node): New. + * expr.c (build_field_ref): Add in-line check for missing field. + * decl.c (java_init_decl_processing): Add soft_nosuchfield_node. + +2005-12-07 Rafael Ávila de Espíndola + + * Make-lang.in (java.all.build, java.install-normal): Remove. + +2005-12-07 Rafael Ávila de Espíndola + + * Make-lang.in: Remove all dependencies on s-gtype, except for + gt-java-parse.h. + +2005-12-07 Richard Sandiford + + * class.c (build_utf8_ref, emit_register_classes): Use + switch_to_section and get_section. + +2005-12-06 Tom Tromey + + PR java/25283: + * parse.y (patch_new_array_init): Revert previous patch. + (lookup_method_invoke): Use size-less array type when creating an + anonymous constructor. + +2005-12-05 Tom Tromey + + * parse.y (patch_new_array_init): Don't set length on array. + +2005-12-02 Richard Guenther + + * java-gimplify.c (java_gimplify_labeled_block_expr): Use + buildN instead of build. + * class.c (finish_class): Likewise. + * expr.c (java_create_object): Likewise. + +2005-11-28 Tom Tromey + + PR java/18278: + * expr.c (build_jni_stub): Unwrap the return value. + * java-tree.h (soft_unwrapjni_node): New define. + (enum java_tree_index): Added JTI_SOFT_UNWRAPJNI_NODE. + * decl.c (java_init_decl_processing): Initialize + soft_unwrapjni_node. + +2005-11-24 Bryce McKinlay + + * gcj.texi (gij options): Add -Xss documentation. + 2005-11-08 Wil Mahan PR java/23617 diff --git a/gcc/java/ChangeLog.tree-ssa b/gcc/java/ChangeLog.tree-ssa index 81081a52860..7cca7ce7e89 100644 --- a/gcc/java/ChangeLog.tree-ssa +++ b/gcc/java/ChangeLog.tree-ssa @@ -5,7 +5,7 @@ (java_gimplify_new_array_init): Set the DECL_CONTEXT of array and tmp to current_function_decl. - + 2004-04-13 Diego Novillo * expr.c (build_expr_wfl): Don't check type nodes for @@ -32,9 +32,9 @@ 2004-01-29 Richard Henderson - PR java/12906 - * decl.c (maybe_pushlevels): Careful with TREE_CHAIN when - registering decls with push_jvm_slot. + PR java/12906 + * decl.c (maybe_pushlevels): Careful with TREE_CHAIN when + registering decls with push_jvm_slot. 2003-12-10 Diego Novillo @@ -56,8 +56,8 @@ 2003-11-31 Richard Henderson - * jcf-parse.c (java_parse_file): Finalize cgraph after emitting - class tables. + * jcf-parse.c (java_parse_file): Finalize cgraph after emitting + class tables. 2003-11-24 Richard Henderson @@ -132,8 +132,8 @@ 2003-10-13 Richard Henderson - * expr.c (build_java_jsr): Don't emit LABEL_EXPR or - load_type_state here. + * expr.c (build_java_jsr): Don't emit LABEL_EXPR or + load_type_state here. 2003-10-12 Richard Henderson @@ -178,18 +178,18 @@ 2003-10-01 Richard Henderson - * decl.c (end_java_method): Invoke remove_useless_stmts_and_vars - and lower_eh_constructs. - * parse.y (source_end_java_method): Likewise. + * decl.c (end_java_method): Invoke remove_useless_stmts_and_vars + and lower_eh_constructs. + * parse.y (source_end_java_method): Likewise. 2003-09-24 Jason Merrill * decl.c, jcf-parse.c, jcf-write.c, parse.h, parse.y, resource.c: Revert from TREE_LOCUS to DECL_SOURCE_LOCATION. - + 2003-09-18 Richard Henderson - * lang.c (java_estimate_num_insns): Take an expr, not a decl. + * lang.c (java_estimate_num_insns): Take an expr, not a decl. 2003-08-12 Diego Novillo @@ -219,11 +219,11 @@ (java_stack_dup): Replace emit_move_insn with java_add_stmt. (build_java_athrow): Replace expand_expr_stmt with java_add_stmt. (build_java_jsr): Replace emit_jump with java_add_stmt (build (GOTO_EXPR)) - (build_java_ret): Replace expand_computed_goto with + (build_java_ret): Replace expand_computed_goto with java_add_stmt (build (GOTO_EXPR)) (expand_java_arraystore): Replace expand_assignment with java_add_stmt. - (expand_java_return): Replace expand_return with + (expand_java_return): Replace expand_return with java_add_stmt (build (RETURN_EXPR)) (expand_load_internal): Remove layout_decl, DECL_REGISTER, expand_decl, and expand_decl_init. Instead, add the local @@ -232,7 +232,7 @@ java_add_stmt. (expand_compare): Replace expand_cond with java_add_stmt(build (COND_EXPR)) - (expand_java_goto): Replace expand_goto with + (expand_java_goto): Replace expand_goto with java_add_stmt (build (GOTO_EXPR)) (expand_invoke): Replace expand_expr_stmt with java_add_stmt. (build_jni_stub): Generate a BIND_EXPR to hold the block we've @@ -241,7 +241,7 @@ java_add_stmt. (java_expand_expr): Abort. No-one should call this function any more. - (expand_byte_code): Replace expand_label with + (expand_byte_code): Replace expand_label with java_add_stmt (build (LABEL_EXPR)) (process_jvm_instruction): Replace build (JAVA_EXC_OBJ_EXPR) with build_exception_object_ref. Replace expand_assignment with diff --git a/gcc/java/Make-lang.in b/gcc/java/Make-lang.in index 458d65b80eb..8cecf4f702a 100644 --- a/gcc/java/Make-lang.in +++ b/gcc/java/Make-lang.in @@ -26,8 +26,8 @@ # 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.all.cross, foo.start.encap, foo.rest.encap, +# 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 @@ -95,10 +95,7 @@ $(srcdir)/java/keyword.h: $(srcdir)/java/keyword.gperf exit 1; } ; \ mv -f k$$$$.h keyword.h) -gt-java-class.h gt-java-constants.h gt-java-decl.h : s-gtype ; @true -gt-java-expr.h gt-java-jcf-parse.h gt-java-jcf-write.h : s-gtype ; @true -gt-java-lang.h gt-java-mangle.h gt-java-parse.h : s-gtype ; @true -gt-java-builtins.h gtype-java.h gt-java-resource.h : s-gtype ; @true +gt-java-parse.h : s-gtype ; @true # Executables built by this Makefile: JAVA_OBJS = java/parse.o java/class.o java/decl.o java/expr.o \ @@ -163,7 +160,6 @@ jvgenmain$(exeext): $(JVGENMAIN_OBJS) $(LIBDEPS) # # Build hooks: -java.all.build: $(GCJ)$(exeext) java.all.cross: $(GCJ)-cross$(exeext) java.start.encap: $(GCJ)$(exeext) java.rest.encap: @@ -197,9 +193,6 @@ check-java : # jc1, gcj, jvgenmain, and gcjh are installed elsewhere as part # of $(COMPILERS). -# Nothing to do here. -java.install-normal: - # Install gcj as well as the target-independent tools. # For a native build, we special-case gcjh and also install # its explicitly-prefixed variant. This allows us to write diff --git a/gcc/java/builtins.c b/gcc/java/builtins.c index 2ea9e578784..ff6da981a0e 100644 --- a/gcc/java/builtins.c +++ b/gcc/java/builtins.c @@ -194,43 +194,43 @@ initialize_builtins (void) float_ftype_float_float, "fmodf", BUILTIN_CONST); define_builtin (BUILT_IN_ACOS, "__builtin_acos", - double_ftype_double, "_ZN4java4lang4Math4acosEd", + double_ftype_double, "_ZN4java4lang4Math4acosEJdd", BUILTIN_CONST); define_builtin (BUILT_IN_ASIN, "__builtin_asin", - double_ftype_double, "_ZN4java4lang4Math4asinEd", + double_ftype_double, "_ZN4java4lang4Math4asinEJdd", BUILTIN_CONST); define_builtin (BUILT_IN_ATAN, "__builtin_atan", - double_ftype_double, "_ZN4java4lang4Math4atanEd", + double_ftype_double, "_ZN4java4lang4Math4atanEJdd", BUILTIN_CONST); define_builtin (BUILT_IN_ATAN2, "__builtin_atan2", - double_ftype_double_double, "_ZN4java4lang4Math5atan2Edd", + double_ftype_double_double, "_ZN4java4lang4Math5atan2EJddd", BUILTIN_CONST); define_builtin (BUILT_IN_CEIL, "__builtin_ceil", - double_ftype_double, "_ZN4java4lang4Math4ceilEd", + double_ftype_double, "_ZN4java4lang4Math4ceilEJdd", BUILTIN_CONST); define_builtin (BUILT_IN_COS, "__builtin_cos", - double_ftype_double, "_ZN4java4lang4Math3cosEd", + double_ftype_double, "_ZN4java4lang4Math3cosEJdd", BUILTIN_CONST); define_builtin (BUILT_IN_EXP, "__builtin_exp", - double_ftype_double, "_ZN4java4lang4Math3expEd", + double_ftype_double, "_ZN4java4lang4Math3expEJdd", BUILTIN_CONST); define_builtin (BUILT_IN_FLOOR, "__builtin_floor", - double_ftype_double, "_ZN4java4lang4Math5floorEd", + double_ftype_double, "_ZN4java4lang4Math5floorEJdd", BUILTIN_CONST); define_builtin (BUILT_IN_LOG, "__builtin_log", - double_ftype_double, "_ZN4java4lang4Math3logEd", + double_ftype_double, "_ZN4java4lang4Math3logEJdd", BUILTIN_CONST); define_builtin (BUILT_IN_POW, "__builtin_pow", - double_ftype_double_double, "_ZN4java4lang4Math3powEdd", + double_ftype_double_double, "_ZN4java4lang4Math3powEJddd", BUILTIN_CONST); define_builtin (BUILT_IN_SIN, "__builtin_sin", - double_ftype_double, "_ZN4java4lang4Math3sinEd", + double_ftype_double, "_ZN4java4lang4Math3sinEJdd", BUILTIN_CONST); define_builtin (BUILT_IN_SQRT, "__builtin_sqrt", - double_ftype_double, "_ZN4java4lang4Math4sqrtEd", + double_ftype_double, "_ZN4java4lang4Math4sqrtEJdd", BUILTIN_CONST); define_builtin (BUILT_IN_TAN, "__builtin_tan", - double_ftype_double, "_ZN4java4lang4Math3tanEd", + double_ftype_double, "_ZN4java4lang4Math3tanEJdd", BUILTIN_CONST); t = tree_cons (NULL_TREE, boolean_type_node, end_params_node); diff --git a/gcc/java/class.c b/gcc/java/class.c index eb9ea71fdb5..ff2c1eb5128 100644 --- a/gcc/java/class.c +++ b/gcc/java/class.c @@ -915,7 +915,7 @@ build_utf8_ref (tree name) int flags = (SECTION_OVERRIDE | SECTION_MERGE | (SECTION_ENTSIZE & decl_size)); sprintf (buf, ".rodata.jutf8.%d", decl_size); - named_section_flags (buf, flags); + switch_to_section (get_section (buf, flags, NULL)); DECL_SECTION_NAME (decl) = build_string (strlen (buf), buf); } } @@ -1917,7 +1917,7 @@ finish_class (void) tree verify_method = TYPE_VERIFY_METHOD (output_class); DECL_SAVED_TREE (verify_method) = add_stmt_to_compound (DECL_SAVED_TREE (verify_method), void_type_node, - build (RETURN_EXPR, void_type_node, NULL)); + build1 (RETURN_EXPR, void_type_node, NULL)); java_genericize (verify_method); cgraph_finalize_function (verify_method, false); TYPE_ASSERTIONS (current_class) = NULL; @@ -2085,6 +2085,9 @@ maybe_layout_super_class (tree super_class, tree this_class) we give it one. */ tree this_wrap = NULL_TREE; + /* Set the correct context for class resolution. */ + current_class = this_class; + if (this_class) { tree this_decl = TYPE_NAME (this_class); @@ -2434,7 +2437,7 @@ emit_register_classes (tree *list_p) int i; #ifdef JCR_SECTION_NAME - named_section_flags (JCR_SECTION_NAME, SECTION_WRITE); + switch_to_section (get_section (JCR_SECTION_NAME, SECTION_WRITE, NULL)); #else /* A target has defined TARGET_USE_JCR_SECTION, but doesn't have a JCR_SECTION_NAME. */ diff --git a/gcc/java/decl.c b/gcc/java/decl.c index 480eba2208f..65fa4c621f8 100644 --- a/gcc/java/decl.c +++ b/gcc/java/decl.c @@ -1116,6 +1116,15 @@ java_init_decl_processing (void) TREE_THIS_VOLATILE (soft_abstractmethod_node) = 1; TREE_SIDE_EFFECTS (soft_abstractmethod_node) = 1; + soft_nosuchfield_node + = builtin_function ("_Jv_ThrowNoSuchFieldError", + build_function_type (void_type_node, endlink), + 0, NOT_BUILT_IN, NULL, NULL_TREE); + /* Mark soft_nosuchfield_node as a `noreturn' function with side + effects. */ + TREE_THIS_VOLATILE (soft_nosuchfield_node) = 1; + TREE_SIDE_EFFECTS (soft_nosuchfield_node) = 1; + t = tree_cons (NULL_TREE, class_ptr_type, tree_cons (NULL_TREE, object_ptr_type_node, endlink)); soft_checkcast_node @@ -1169,6 +1178,12 @@ java_init_decl_processing (void) build_function_type (void_type_node, t), 0, NOT_BUILT_IN, NULL, NULL_TREE); + t = tree_cons (NULL_TREE, object_ptr_type_node, endlink); + soft_unwrapjni_node + = builtin_function ("_Jv_UnwrapJNIweakReference", + build_function_type (object_ptr_type_node, t), + 0, NOT_BUILT_IN, NULL, NULL_TREE); + t = tree_cons (NULL_TREE, int_type_node, tree_cons (NULL_TREE, int_type_node, endlink)); soft_idiv_node diff --git a/gcc/java/expr.c b/gcc/java/expr.c index a21e1513d6e..e7b299245a1 100644 --- a/gcc/java/expr.c +++ b/gcc/java/expr.c @@ -1312,10 +1312,10 @@ java_create_object (tree type) ? alloc_object_node : alloc_no_finalizer_node); - return build (CALL_EXPR, promote_type (type), - build_address_of (alloc_node), - build_tree_list (NULL_TREE, build_class_ref (type)), - NULL_TREE); + return build3 (CALL_EXPR, promote_type (type), + build_address_of (alloc_node), + build_tree_list (NULL_TREE, build_class_ref (type)), + NULL_TREE); } static void @@ -1703,6 +1703,17 @@ build_field_ref (tree self_value, tree self_class, tree name) NULL_TREE, NULL_TREE); tree address; + if (DECL_CONTEXT (field_decl) != output_class) + field_offset + = build3 (COND_EXPR, TREE_TYPE (field_offset), + build2 (EQ_EXPR, boolean_type_node, + field_offset, integer_zero_node), + build3 (CALL_EXPR, void_type_node, + build_address_of (soft_nosuchfield_node), + build_tree_list (NULL_TREE, otable_index), + NULL_TREE), + field_offset); + field_offset = fold (convert (sizetype, field_offset)); address = fold_build2 (PLUS_EXPR, @@ -2558,8 +2569,17 @@ build_jni_stub (tree method) /* If the JNI call returned a result, capture it here. If we had to unwrap JNI object results, we would do that here. */ if (res_var != NULL_TREE) - call = build2 (MODIFY_EXPR, TREE_TYPE (TREE_TYPE (method)), - res_var, call); + { + /* If the call returns an object, it may return a JNI weak + reference, in which case we must unwrap it. */ + if (! JPRIMITIVE_TYPE_P (TREE_TYPE (TREE_TYPE (method)))) + call = build3 (CALL_EXPR, TREE_TYPE (TREE_TYPE (method)), + build_address_of (soft_unwrapjni_node), + build_tree_list (NULL_TREE, call), + NULL_TREE); + call = build2 (MODIFY_EXPR, TREE_TYPE (TREE_TYPE (method)), + res_var, call); + } TREE_SIDE_EFFECTS (call) = 1; CAN_COMPLETE_NORMALLY (call) = 1; diff --git a/gcc/java/gcj.texi b/gcc/java/gcj.texi index 142671eb852..84e0e167288 100644 --- a/gcc/java/gcj.texi +++ b/gcc/java/gcj.texi @@ -2,6 +2,13 @@ @setfilename gcj.info @settitle Guide to GNU gcj +@c Merge the standard indexes into a single one. +@syncodeindex fn cp +@syncodeindex vr cp +@syncodeindex ky cp +@syncodeindex pg cp +@syncodeindex tp cp + @include gcc-common.texi @c Note: When reading this manual you'll find lots of strange @@ -124,6 +131,7 @@ files and object files, and it can read both Java source code and * About CNI:: Description of the Compiled Native Interface * System properties:: Modifying runtime behavior of the libgcj library * Resources:: Where to look for more information +* Index:: Index. @end menu @@ -1111,6 +1119,9 @@ Set the initial heap size. @item -Xmx@var{size} Set the maximum heap size. + +@item -Xss@var{size} +Set the thread stack size. @end table Unrecognized @code{-X} options are ignored, for compatibility with @@ -1423,7 +1434,8 @@ alternative to the standard JNI (Java Native Interface). @menu * Basic concepts:: Introduction to using CNI@. * Packages:: How packages are mapped to C++. -* Primitive types:: Handling Java types in C++. +* Primitive types:: Handling primitive Java types in C++. +* Reference types:: Handling Java reference types in C++. * Interfaces:: How Java interfaces map to C++. * Objects and Classes:: C++ and Java classes. * Class Initialization:: How objects are initialized. @@ -1620,7 +1632,7 @@ to avoid disappointment. @subsection Reference types associated with primitive types In Java each primitive type has an associated reference type, -e.g.: @code{boolean} has an associated @code{java.lang.Boolean} class. +e.g.: @code{boolean} has an associated @code{java.lang.Boolean.TYPE} class. In order to make working with such classes easier GCJ provides the macro @code{JvPrimClass}: @@ -1634,6 +1646,41 @@ JvPrimClass(void) @result{} java.lang.Void.TYPE @end deffn +@node Reference types +@section Reference types + +A Java reference type is treated as a class in C++. Classes and +interfaces are handled this way. A Java reference is translated to a +C++ pointer, so for instance a Java @code{java.lang.String} becomes, +in C++, @code{java::lang::String *}. + +CNI provides a few built-in typedefs for the most common classes: +@multitable @columnfractions .30 .25 .60 +@item @strong{Java type} @tab @strong{C++ typename} @tab @strong{Description} +@item @code{java.lang.Object} @tab @code{jobject} @tab Object type +@item @code{java.lang.String} @tab @code{jstring} @tab String type +@item @code{java.lang.Class} @tab @code{jclass} @tab Class type +@end multitable +@cindex jobject +@cindex jstring +@cindex jclass + +Every Java class or interface has a corresponding @code{Class} +instance. These can be accessed in CNI via the static @code{class$} +field of a class. The @code{class$} field is of type @code{Class} +(and not @code{Class *}), so you will typically take the address of +it. +@cindex class$ + +Here is how you can refer to the class of @code{String}, which in +Java would be written @code{String.class}: + +@example +using namespace java::lang; +doSomething (&String::class$); +@end example + + @node Interfaces @section Interfaces @@ -1893,10 +1940,17 @@ The name of this function may change in the future. @deftypefun jobjectArray JvNewObjectArray (jsize @var{length}, jclass @var{klass}, jobject @var{init}) -Here @code{klass} is the type of elements of the array and +This creates a new array whose elements have reference type. +@code{klass} is the type of elements of the array and @code{init} is the initial value put into every slot in the array. @end deftypefun +@example +using namespace java::lang; +JArray *array + = (JArray *) JvNewObjectArray(length, &String::class$, NULL); +@end example + @subsection Creating arrays @@ -2758,4 +2812,10 @@ a free software Java class library test suite which is being written because the JCK is not free. See @uref{http://sources.redhat.com/mauve/} for more information. + +@node Index +@unnumbered Index + +@printindex cp + @bye diff --git a/gcc/java/java-gimplify.c b/gcc/java/java-gimplify.c index e5d7a4377d9..6c1a366698f 100644 --- a/gcc/java/java-gimplify.c +++ b/gcc/java/java-gimplify.c @@ -186,9 +186,9 @@ java_gimplify_labeled_block_expr (tree expr) tree t; DECL_CONTEXT (label) = current_function_decl; - t = build (LABEL_EXPR, void_type_node, label); + t = build1 (LABEL_EXPR, void_type_node, label); if (body != NULL_TREE) - t = build (COMPOUND_EXPR, void_type_node, body, t); + t = build2 (COMPOUND_EXPR, void_type_node, body, t); return t; } diff --git a/gcc/java/java-tree.h b/gcc/java/java-tree.h index 658da38d39a..d421b514a46 100644 --- a/gcc/java/java-tree.h +++ b/gcc/java/java-tree.h @@ -386,6 +386,7 @@ enum java_tree_index JTI_SOFT_BADARRAYINDEX_NODE, JTI_SOFT_NULLPOINTER_NODE, JTI_SOFT_ABSTRACTMETHOD_NODE, + JTI_SOFT_NOSUCHFIELD_NODE, JTI_SOFT_CHECKARRAYSTORE_NODE, JTI_SOFT_MONITORENTER_NODE, JTI_SOFT_MONITOREXIT_NODE, @@ -394,6 +395,7 @@ enum java_tree_index JTI_SOFT_LOOKUPJNIMETHOD_NODE, JTI_SOFT_GETJNIENVNEWFRAME_NODE, JTI_SOFT_JNIPOPSYSTEMFRAME_NODE, + JTI_SOFT_UNWRAPJNI_NODE, JTI_SOFT_FMOD_NODE, JTI_SOFT_IDIV_NODE, JTI_SOFT_IREM_NODE, @@ -647,6 +649,8 @@ extern GTY(()) tree java_global_trees[JTI_MAX]; java_global_trees[JTI_SOFT_NULLPOINTER_NODE] #define soft_abstractmethod_node \ java_global_trees[JTI_SOFT_ABSTRACTMETHOD_NODE] +#define soft_nosuchfield_node \ + java_global_trees[JTI_SOFT_NOSUCHFIELD_NODE] #define soft_checkarraystore_node \ java_global_trees[JTI_SOFT_CHECKARRAYSTORE_NODE] #define soft_monitorenter_node \ @@ -663,6 +667,8 @@ extern GTY(()) tree java_global_trees[JTI_MAX]; java_global_trees[JTI_SOFT_GETJNIENVNEWFRAME_NODE] #define soft_jnipopsystemframe_node \ java_global_trees[JTI_SOFT_JNIPOPSYSTEMFRAME_NODE] +#define soft_unwrapjni_node \ + java_global_trees[JTI_SOFT_UNWRAPJNI_NODE] #define soft_fmod_node \ java_global_trees[JTI_SOFT_FMOD_NODE] #define soft_idiv_node \ diff --git a/gcc/java/jcf-parse.c b/gcc/java/jcf-parse.c index 5d22f88d843..4bc12f4d98a 100644 --- a/gcc/java/jcf-parse.c +++ b/gcc/java/jcf-parse.c @@ -142,7 +142,13 @@ set_source_filename (JCF *jcf, int index) && strcmp (sfname, old_filename + old_len - new_len) == 0 && (old_filename[old_len - new_len - 1] == '/' || old_filename[old_len - new_len - 1] == '\\')) - return; + { +#ifndef USE_MAPPED_LOCATION + DECL_SOURCE_LOCATION (TYPE_NAME (current_class)) = input_location; + file_start_location = input_location; +#endif + return; + } } if (strchr (sfname, '/') == NULL && strchr (sfname, '\\') == NULL) { diff --git a/gcc/java/jcf-write.c b/gcc/java/jcf-write.c index 45764995143..caf57d1e8bc 100644 --- a/gcc/java/jcf-write.c +++ b/gcc/java/jcf-write.c @@ -3522,11 +3522,15 @@ write_classfile (tree clas) { FILE *stream; char *temporary_file_name; + char pid [sizeof (long) * 2 + 2]; - /* The .class file is initially written to a ".tmp" file so that + /* The .class file is initially written to a ".PID" file so that if multiple instances of the compiler are running at once - they do not see partially formed class files. */ - temporary_file_name = concat (class_file_name, ".tmp", NULL); + they do not see partially formed class files nor override + each other, which may happen in libjava with parallel build. + */ + sprintf (pid, ".%lx", (unsigned long) getpid ()); + temporary_file_name = concat (class_file_name, pid, NULL); stream = fopen (temporary_file_name, "wb"); if (stream == NULL) fatal_error ("can't open %s for writing: %m", temporary_file_name); @@ -3548,7 +3552,9 @@ write_classfile (tree clas) if (rename (temporary_file_name, class_file_name) == -1) { + int errno_saved = errno; remove (temporary_file_name); + errno = errno_saved; fatal_error ("can't create %s: %m", class_file_name); } free (temporary_file_name); diff --git a/gcc/java/mangle.c b/gcc/java/mangle.c index e8df917e423..372c9466c63 100644 --- a/gcc/java/mangle.c +++ b/gcc/java/mangle.c @@ -188,6 +188,14 @@ mangle_method_decl (tree mdecl) if (TREE_CODE (TREE_TYPE (mdecl)) == METHOD_TYPE) arglist = TREE_CHAIN (arglist); + /* Output literal 'J' and mangle the return type IF not a + constructor. */ + if (!ID_INIT_P (method_name)) + { + obstack_1grow (mangle_obstack, 'J'); + mangle_type(TREE_TYPE(TREE_TYPE(mdecl))); + } + /* No arguments is easy. We shortcut it. */ if (arglist == end_params_node) obstack_1grow (mangle_obstack, 'v'); diff --git a/gcc/java/parse.y b/gcc/java/parse.y index 555541c4bd4..a467ff15a79 100644 --- a/gcc/java/parse.y +++ b/gcc/java/parse.y @@ -9584,8 +9584,15 @@ resolve_expression_name (tree id, tree *orig) /* If we're processing an inner class and we're trying to access a field belonging to an outer class, build - the access to the field. */ - if (nested_member_access_p (current_class, decl)) + the access to the field. + As usual, we have to treat initialized static final + variables as a special case. */ + if (nested_member_access_p (current_class, decl) + && ! (JDECL_P (decl) && CLASS_FINAL_VARIABLE_P (decl) + && DECL_INITIAL (decl) != NULL_TREE + && (JSTRING_TYPE_P (TREE_TYPE (decl)) + || JNUMERIC_TYPE_P (TREE_TYPE (decl))) + && TREE_CONSTANT (DECL_INITIAL (decl)))) { if (!fs && CLASS_STATIC (TYPE_NAME (current_class))) { @@ -11204,6 +11211,17 @@ lookup_method_invoke (int lc, tree cl, tree class, tree name, tree arg_list) /* And promoted */ if (TREE_CODE (current_arg) == RECORD_TYPE) current_arg = promote_type (current_arg); + /* If we're building an anonymous constructor call, and one of + the arguments has array type, cast it to a size-less array + type. This prevents us from getting a strange gcj-specific + "sized array" signature in the constructor's signature. */ + if (lc && ANONYMOUS_CLASS_P (class) + && TREE_CODE (current_arg) == POINTER_TYPE + && TYPE_ARRAY_P (TREE_TYPE (current_arg))) + { + tree elt = TYPE_ARRAY_ELEMENT (TREE_TYPE (current_arg)); + current_arg = build_pointer_type (build_java_array_type (elt, -1)); + } atl = tree_cons (NULL_TREE, current_arg, atl); } diff --git a/gcc/lambda-code.c b/gcc/lambda-code.c index 2d6db22cced..c19ea6cfa54 100644 --- a/gcc/lambda-code.c +++ b/gcc/lambda-code.c @@ -1434,8 +1434,8 @@ gcc_loop_to_lambda_loop (struct loop *loop, int depth, ubound = gcc_tree_to_linear_expression (depth, uboundvar, outerinductionvars, *invariants, extra); - uboundresult = build (PLUS_EXPR, TREE_TYPE (uboundvar), uboundvar, - build_int_cst (TREE_TYPE (uboundvar), extra)); + uboundresult = build2 (PLUS_EXPR, TREE_TYPE (uboundvar), uboundvar, + build_int_cst (TREE_TYPE (uboundvar), extra)); VEC_safe_push (tree, heap, *uboundvars, uboundresult); VEC_safe_push (tree, heap, *lboundvars, lboundvar); VEC_safe_push (int, heap, *steps, stepint); @@ -1576,7 +1576,7 @@ lbv_to_gcc_expression (lambda_body_vector lbv, add_referenced_tmp_var (resvar); /* Start at 0. */ - stmt = build (MODIFY_EXPR, void_type_node, resvar, integer_zero_node); + stmt = build2 (MODIFY_EXPR, void_type_node, resvar, integer_zero_node); name = make_ssa_name (resvar, stmt); TREE_OPERAND (stmt, 0) = name; tsi = tsi_last (stmts); @@ -1591,8 +1591,8 @@ lbv_to_gcc_expression (lambda_body_vector lbv, /* newname = coefficient * induction_variable */ coeffmult = build_int_cst (type, LBV_COEFFICIENTS (lbv)[i]); - stmt = build (MODIFY_EXPR, void_type_node, resvar, - fold_build2 (MULT_EXPR, type, iv, coeffmult)); + stmt = build2 (MODIFY_EXPR, void_type_node, resvar, + fold_build2 (MULT_EXPR, type, iv, coeffmult)); newname = make_ssa_name (resvar, stmt); TREE_OPERAND (stmt, 0) = newname; @@ -1601,8 +1601,8 @@ lbv_to_gcc_expression (lambda_body_vector lbv, tsi_link_after (&tsi, stmt, TSI_CONTINUE_LINKING); /* name = name + newname */ - stmt = build (MODIFY_EXPR, void_type_node, resvar, - build (PLUS_EXPR, type, name, newname)); + stmt = build2 (MODIFY_EXPR, void_type_node, resvar, + build2 (PLUS_EXPR, type, name, newname)); name = make_ssa_name (resvar, stmt); TREE_OPERAND (stmt, 0) = name; fold_stmt (&stmt); @@ -1616,8 +1616,8 @@ lbv_to_gcc_expression (lambda_body_vector lbv, if (LBV_DENOMINATOR (lbv) != 1) { tree denominator = build_int_cst (type, LBV_DENOMINATOR (lbv)); - stmt = build (MODIFY_EXPR, void_type_node, resvar, - build (CEIL_DIV_EXPR, type, name, denominator)); + stmt = build2 (MODIFY_EXPR, void_type_node, resvar, + build2 (CEIL_DIV_EXPR, type, name, denominator)); name = make_ssa_name (resvar, stmt); TREE_OPERAND (stmt, 0) = name; fold_stmt (&stmt); @@ -1667,7 +1667,7 @@ lle_to_gcc_expression (lambda_linear_expression lle, for (; lle != NULL; lle = LLE_NEXT (lle)) { /* Start at name = 0. */ - stmt = build (MODIFY_EXPR, void_type_node, resvar, integer_zero_node); + stmt = build2 (MODIFY_EXPR, void_type_node, resvar, integer_zero_node); name = make_ssa_name (resvar, stmt); TREE_OPERAND (stmt, 0) = name; fold_stmt (&stmt); @@ -1698,7 +1698,7 @@ lle_to_gcc_expression (lambda_linear_expression lle, } /* newname = mult */ - stmt = build (MODIFY_EXPR, void_type_node, resvar, mult); + stmt = build2 (MODIFY_EXPR, void_type_node, resvar, mult); newname = make_ssa_name (resvar, stmt); TREE_OPERAND (stmt, 0) = newname; fold_stmt (&stmt); @@ -1706,8 +1706,8 @@ lle_to_gcc_expression (lambda_linear_expression lle, tsi_link_after (&tsi, stmt, TSI_CONTINUE_LINKING); /* name = name + newname */ - stmt = build (MODIFY_EXPR, void_type_node, resvar, - build (PLUS_EXPR, type, name, newname)); + stmt = build2 (MODIFY_EXPR, void_type_node, resvar, + build2 (PLUS_EXPR, type, name, newname)); name = make_ssa_name (resvar, stmt); TREE_OPERAND (stmt, 0) = name; fold_stmt (&stmt); @@ -1739,7 +1739,7 @@ lle_to_gcc_expression (lambda_linear_expression lle, } /* newname = mult */ - stmt = build (MODIFY_EXPR, void_type_node, resvar, mult); + stmt = build2 (MODIFY_EXPR, void_type_node, resvar, mult); newname = make_ssa_name (resvar, stmt); TREE_OPERAND (stmt, 0) = newname; fold_stmt (&stmt); @@ -1747,8 +1747,8 @@ lle_to_gcc_expression (lambda_linear_expression lle, tsi_link_after (&tsi, stmt, TSI_CONTINUE_LINKING); /* name = name + newname */ - stmt = build (MODIFY_EXPR, void_type_node, resvar, - build (PLUS_EXPR, type, name, newname)); + stmt = build2 (MODIFY_EXPR, void_type_node, resvar, + build2 (PLUS_EXPR, type, name, newname)); name = make_ssa_name (resvar, stmt); TREE_OPERAND (stmt, 0) = name; fold_stmt (&stmt); @@ -1761,9 +1761,9 @@ lle_to_gcc_expression (lambda_linear_expression lle, name = name + constant. */ if (LLE_CONSTANT (lle) != 0) { - stmt = build (MODIFY_EXPR, void_type_node, resvar, - build (PLUS_EXPR, type, name, - build_int_cst (type, LLE_CONSTANT (lle)))); + stmt = build2 (MODIFY_EXPR, void_type_node, resvar, + build2 (PLUS_EXPR, type, name, + build_int_cst (type, LLE_CONSTANT (lle)))); name = make_ssa_name (resvar, stmt); TREE_OPERAND (stmt, 0) = name; fold_stmt (&stmt); @@ -1775,9 +1775,9 @@ lle_to_gcc_expression (lambda_linear_expression lle, name = name + linear offset. */ if (LLE_CONSTANT (offset) != 0) { - stmt = build (MODIFY_EXPR, void_type_node, resvar, - build (PLUS_EXPR, type, name, - build_int_cst (type, LLE_CONSTANT (offset)))); + stmt = build2 (MODIFY_EXPR, void_type_node, resvar, + build2 (PLUS_EXPR, type, name, + build_int_cst (type, LLE_CONSTANT (offset)))); name = make_ssa_name (resvar, stmt); TREE_OPERAND (stmt, 0) = name; fold_stmt (&stmt); @@ -1789,9 +1789,9 @@ lle_to_gcc_expression (lambda_linear_expression lle, if (LLE_DENOMINATOR (lle) != 1) { stmt = build_int_cst (type, LLE_DENOMINATOR (lle)); - stmt = build (wrap == MAX_EXPR ? CEIL_DIV_EXPR : FLOOR_DIV_EXPR, - type, name, stmt); - stmt = build (MODIFY_EXPR, void_type_node, resvar, stmt); + stmt = build2 (wrap == MAX_EXPR ? CEIL_DIV_EXPR : FLOOR_DIV_EXPR, + type, name, stmt); + stmt = build2 (MODIFY_EXPR, void_type_node, resvar, stmt); /* name = {ceil, floor}(name/denominator) */ name = make_ssa_name (resvar, stmt); @@ -1811,8 +1811,8 @@ lle_to_gcc_expression (lambda_linear_expression lle, { tree op1 = VEC_index (tree, results, 0); tree op2 = VEC_index (tree, results, 1); - stmt = build (MODIFY_EXPR, void_type_node, resvar, - build (wrap, type, op1, op2)); + stmt = build2 (MODIFY_EXPR, void_type_node, resvar, + build2 (wrap, type, op1, op2)); name = make_ssa_name (resvar, stmt); TREE_OPERAND (stmt, 0) = name; tsi = tsi_last (stmts); @@ -1927,10 +1927,10 @@ lambda_loopnest_to_gcc_loopnest (struct loop *old_loopnest, dominate the block containing the exit condition. So we simply create our own incremented iv to use in the new exit test, and let redundancy elimination sort it out. */ - inc_stmt = build (PLUS_EXPR, type, - ivvar, build_int_cst (type, LL_STEP (newloop))); - inc_stmt = build (MODIFY_EXPR, void_type_node, SSA_NAME_VAR (ivvar), - inc_stmt); + inc_stmt = build2 (PLUS_EXPR, type, + ivvar, build_int_cst (type, LL_STEP (newloop))); + inc_stmt = build2 (MODIFY_EXPR, void_type_node, SSA_NAME_VAR (ivvar), + inc_stmt); ivvarinced = make_ssa_name (SSA_NAME_VAR (ivvar), inc_stmt); TREE_OPERAND (inc_stmt, 0) = ivvarinced; bsi = bsi_for_stmt (exitcond); @@ -1948,9 +1948,9 @@ lambda_loopnest_to_gcc_loopnest (struct loop *old_loopnest, if (exit->flags & EDGE_FALSE_VALUE) testtype = swap_tree_comparison (testtype); - COND_EXPR_COND (exitcond) = build (testtype, - boolean_type_node, - newupperbound, ivvarinced); + COND_EXPR_COND (exitcond) = build2 (testtype, + boolean_type_node, + newupperbound, ivvarinced); update_stmt (exitcond); VEC_replace (tree, new_ivs, i, ivvar); @@ -2201,23 +2201,20 @@ exit_phi_for_loop_p (struct loop *loop, tree stmt) return true; } -/* Return true if STMT can be put back into INNER, a loop by moving it to the - beginning of that loop. */ +/* Return true if STMT can be put back into the loop INNER, by + copying it to the beginning of that loop and changing the uses. */ static bool can_put_in_inner_loop (struct loop *inner, tree stmt) { imm_use_iterator imm_iter; use_operand_p use_p; - basic_block use_bb = NULL; gcc_assert (TREE_CODE (stmt) == MODIFY_EXPR); if (!ZERO_SSA_OPERANDS (stmt, SSA_OP_ALL_VIRTUALS) || !expr_invariant_in_loop_p (inner, TREE_OPERAND (stmt, 1))) return false; - /* We require that the basic block of all uses be the same, or the use be an - exit phi. */ FOR_EACH_IMM_USE_FAST (use_p, imm_iter, TREE_OPERAND (stmt, 0)) { if (!exit_phi_for_loop_p (inner, USE_STMT (use_p))) @@ -2226,17 +2223,39 @@ can_put_in_inner_loop (struct loop *inner, tree stmt) if (!flow_bb_inside_loop_p (inner, immbb)) return false; - if (use_bb == NULL) - use_bb = immbb; - else if (immbb != use_bb) + } + } + return true; +} + +/* Return true if STMT can be put *after* the inner loop of LOOP. */ +static bool +can_put_after_inner_loop (struct loop *loop, tree stmt) +{ + imm_use_iterator imm_iter; + use_operand_p use_p; + + if (!ZERO_SSA_OPERANDS (stmt, SSA_OP_ALL_VIRTUALS)) + return false; + + FOR_EACH_IMM_USE_FAST (use_p, imm_iter, TREE_OPERAND (stmt, 0)) + { + if (!exit_phi_for_loop_p (loop, USE_STMT (use_p))) + { + basic_block immbb = bb_for_stmt (USE_STMT (use_p)); + + if (!dominated_by_p (CDI_DOMINATORS, + immbb, + loop->inner->header) + && !can_put_in_inner_loop (loop->inner, stmt)) return false; } } return true; - } + /* Return TRUE if LOOP is an imperfect nest that we can convert to a perfect one. LOOPIVS is a vector of induction variables, one per loop. ATM, we only handle imperfect nests of depth 2, where all of the statements @@ -2277,18 +2296,20 @@ can_convert_to_perfect_nest (struct loop *loop, if (stmt_uses_op (stmt, iv)) goto fail; - /* If this is a simple operation like a cast that is invariant - in the inner loop, only used there, and we can place it - there, then it's not going to hurt us. - This means that we will propagate casts and other cheap - invariant operations *back* - into the inner loop if we can interchange the loop, on the - theory that we are going to gain a lot more by interchanging - the loop than we are by leaving some invariant code there for - some other pass to clean up. */ + /* If this is a simple operation like a cast that is + invariant in the inner loop, or after the inner loop, + then see if we can place it back where it came from. + This means that we will propagate casts and other + cheap invariant operations *back* into or after + the inner loop if we can interchange the loop, on the + theory that we are going to gain a lot more by + interchanging the loop than we are by leaving some + invariant code there for some other pass to clean + up. */ if (TREE_CODE (stmt) == MODIFY_EXPR && is_gimple_cast (TREE_OPERAND (stmt, 1)) - && can_put_in_inner_loop (loop->inner, stmt)) + && (can_put_in_inner_loop (loop->inner, stmt) + || can_put_after_inner_loop (loop, stmt))) continue; /* Otherwise, if the bb of a statement we care about isn't @@ -2424,11 +2445,11 @@ perfect_nestify (struct loops *loops, make_edge (headerbb, bodybb, EDGE_FALLTHRU); then_label = build1 (GOTO_EXPR, void_type_node, tree_block_label (latchbb)); else_label = build1 (GOTO_EXPR, void_type_node, tree_block_label (olddest)); - cond_stmt = build (COND_EXPR, void_type_node, - build (NE_EXPR, boolean_type_node, - integer_one_node, - integer_zero_node), - then_label, else_label); + cond_stmt = build3 (COND_EXPR, void_type_node, + build2 (NE_EXPR, boolean_type_node, + integer_one_node, + integer_zero_node), + then_label, else_label); bsi = bsi_start (bodybb); bsi_insert_after (&bsi, cond_stmt, BSI_NEW_STMT); e = make_edge (bodybb, olddest, EDGE_FALSE_VALUE); @@ -2464,8 +2485,8 @@ perfect_nestify (struct loops *loops, exit_condition = get_loop_exit_condition (newloop); uboundvar = create_tmp_var (integer_type_node, "uboundvar"); add_referenced_tmp_var (uboundvar); - stmt = build (MODIFY_EXPR, void_type_node, uboundvar, - VEC_index (tree, ubounds, 0)); + stmt = build2 (MODIFY_EXPR, void_type_node, uboundvar, + VEC_index (tree, ubounds, 0)); uboundvar = make_ssa_name (uboundvar, stmt); TREE_OPERAND (stmt, 0) = uboundvar; @@ -2474,10 +2495,10 @@ perfect_nestify (struct loops *loops, else bsi_insert_before (&bsi, stmt, BSI_SAME_STMT); update_stmt (stmt); - COND_EXPR_COND (exit_condition) = build (GE_EXPR, - boolean_type_node, - uboundvar, - ivvarinced); + COND_EXPR_COND (exit_condition) = build2 (GE_EXPR, + boolean_type_node, + uboundvar, + ivvarinced); update_stmt (exit_condition); bbs = get_loop_body_in_dom_order (loop); /* Now move the statements, and replace the induction variable in the moved @@ -2515,23 +2536,33 @@ perfect_nestify (struct loops *loops, bsi_prev (&bsi); continue; } - /* Move this statement back into the inner loop. - This looks a bit confusing, but we are really just - finding the first non-exit phi use and moving the - statement to the beginning of that use's basic - block. */ + + /* Make copies of this statement to put it back next + to its uses. */ FOR_EACH_IMM_USE_SAFE (use_p, imm_iter, TREE_OPERAND (stmt, 0)) { tree imm_stmt = USE_STMT (use_p); if (!exit_phi_for_loop_p (loop->inner, imm_stmt)) { - block_stmt_iterator tobsi = bsi_after_labels (bb_for_stmt (imm_stmt)); - bsi_move_after (&bsi, &tobsi); - update_stmt (stmt); - BREAK_FROM_SAFE_IMM_USE (imm_iter); + block_stmt_iterator tobsi; + tree newname; + tree newstmt; + + newstmt = unshare_expr (stmt); + tobsi = bsi_after_labels (bb_for_stmt (imm_stmt)); + newname = TREE_OPERAND (newstmt, 0); + newname = SSA_NAME_VAR (newname); + newname = make_ssa_name (newname, newstmt); + TREE_OPERAND (newstmt, 0) = newname; + SET_USE (use_p, TREE_OPERAND (newstmt, 0)); + bsi_insert_after (&tobsi, newstmt, BSI_SAME_STMT); + update_stmt (newstmt); + update_stmt (imm_stmt); } } + if (!bsi_end_p (bsi)) + bsi_prev (&bsi); } } else diff --git a/gcc/lambda.h b/gcc/lambda.h index 418cb041ca9..817f084351a 100644 --- a/gcc/lambda.h +++ b/gcc/lambda.h @@ -226,7 +226,7 @@ static inline void print_lambda_vector (FILE *, lambda_vector, int); static inline lambda_vector lambda_vector_new (int size) { - return ggc_alloc_cleared (size * sizeof(int)); + return GGC_CNEWVEC (int, size); } diff --git a/gcc/langhooks.h b/gcc/langhooks.h index cdb547c7cf3..3d97c9362cb 100644 --- a/gcc/langhooks.h +++ b/gcc/langhooks.h @@ -415,7 +415,7 @@ struct lang_hooks /* Used to set up the tree_contains_structure array for a frontend. */ void (*init_ts) (void); - /* Called by recompute_tree_invarant_for_addr_expr to go from EXPR + /* Called by recompute_tree_invariant_for_addr_expr to go from EXPR to a contained expression or DECL, possibly updating *TC, *TI or *SE if in the process TREE_CONSTANT, TREE_INVARIANT or TREE_SIDE_EFFECTS need updating. */ diff --git a/gcc/lcm.c b/gcc/lcm.c index 000e530a2ad..63910050df0 100644 --- a/gcc/lcm.c +++ b/gcc/lcm.c @@ -122,8 +122,8 @@ compute_antinout_edge (sbitmap *antloc, sbitmap *transp, sbitmap *antin, } qin = worklist; - qend = &worklist[n_basic_blocks]; - qlen = n_basic_blocks; + qend = &worklist[n_basic_blocks - NUM_FIXED_BLOCKS]; + qlen = n_basic_blocks - NUM_FIXED_BLOCKS; /* Mark blocks which are predecessors of the exit block so that we can easily identify them below. */ @@ -260,7 +260,7 @@ compute_laterin (struct edge_list *edge_list, sbitmap *earliest, list if they were not already on the list. So the size is bounded by the number of basic blocks. */ qin = qout = worklist - = xmalloc (sizeof (basic_block) * (n_basic_blocks + 1)); + = xmalloc (sizeof (basic_block) * n_basic_blocks); /* Initialize a mapping from each edge to its index. */ for (i = 0; i < num_edges; i++) @@ -294,11 +294,10 @@ compute_laterin (struct edge_list *edge_list, sbitmap *earliest, } /* Note that we do not use the last allocated element for our queue, - as EXIT_BLOCK is never inserted into it. In fact the above allocation - of n_basic_blocks + 1 elements is not necessary. */ + as EXIT_BLOCK is never inserted into it. */ qin = worklist; - qend = &worklist[n_basic_blocks]; - qlen = n_basic_blocks; + qend = &worklist[n_basic_blocks - NUM_FIXED_BLOCKS]; + qlen = n_basic_blocks - NUM_FIXED_BLOCKS; /* Iterate until the worklist is empty. */ while (qlen) @@ -485,7 +484,8 @@ compute_available (sbitmap *avloc, sbitmap *kill, sbitmap *avout, /* Allocate a worklist array/queue. Entries are only added to the list if they were not already on the list. So the size is bounded by the number of basic blocks. */ - qin = qout = worklist = xmalloc (sizeof (basic_block) * n_basic_blocks); + qin = qout = worklist = + xmalloc (sizeof (basic_block) * (n_basic_blocks - NUM_FIXED_BLOCKS)); /* We want a maximal solution. */ sbitmap_vector_ones (avout, last_basic_block); @@ -499,8 +499,8 @@ compute_available (sbitmap *avloc, sbitmap *kill, sbitmap *avout, } qin = worklist; - qend = &worklist[n_basic_blocks]; - qlen = n_basic_blocks; + qend = &worklist[n_basic_blocks - NUM_FIXED_BLOCKS]; + qlen = n_basic_blocks - NUM_FIXED_BLOCKS; /* Mark blocks which are successors of the entry block so that we can easily identify them below. */ diff --git a/gcc/libgcc2.c b/gcc/libgcc2.c index 94f4b30006a..03cc448cab3 100644 --- a/gcc/libgcc2.c +++ b/gcc/libgcc2.c @@ -744,7 +744,7 @@ const UQItype __popcount_tab[256] = int __popcountSI2 (UWtype x) { - UWtype i, ret = 0; + int i, ret = 0; for (i = 0; i < W_TYPE_SIZE; i += 8) ret += __popcount_tab[(x >> i) & 0xff]; @@ -758,7 +758,7 @@ __popcountSI2 (UWtype x) int __popcountDI2 (UDWtype x) { - UWtype i, ret = 0; + int i, ret = 0; for (i = 0; i < 2*W_TYPE_SIZE; i += 8) ret += __popcount_tab[(x >> i) & 0xff]; @@ -1316,6 +1316,9 @@ __fixsfdi (SFtype a) XFtype __floatdixf (DWtype u) { +#if W_TYPE_SIZE > XF_SIZE +# error +#endif XFtype d = (Wtype) (u >> W_TYPE_SIZE); d *= Wtype_MAXp1_F; d += (UWtype)u; @@ -1327,6 +1330,9 @@ __floatdixf (DWtype u) XFtype __floatundixf (UDWtype u) { +#if W_TYPE_SIZE > XF_SIZE +# error +#endif XFtype d = (UWtype) (u >> W_TYPE_SIZE); d *= Wtype_MAXp1_F; d += (UWtype)u; @@ -1338,6 +1344,9 @@ __floatundixf (UDWtype u) TFtype __floatditf (DWtype u) { +#if W_TYPE_SIZE > TF_SIZE +# error +#endif TFtype d = (Wtype) (u >> W_TYPE_SIZE); d *= Wtype_MAXp1_F; d += (UWtype)u; @@ -1349,93 +1358,91 @@ __floatditf (DWtype u) TFtype __floatunditf (UDWtype u) { - TFtype d = (UWtype) (u >> W_TYPE_SIZE); - d *= Wtype_MAXp1_F; - d += (UWtype)u; - return d; -} -#endif - -#if defined(L_floatdidf) && LIBGCC2_HAS_DF_MODE -DFtype -__floatdidf (DWtype u) -{ - DFtype d = (Wtype) (u >> W_TYPE_SIZE); - d *= Wtype_MAXp1_F; - d += (UWtype)u; - return d; -} +#if W_TYPE_SIZE > TF_SIZE +# error #endif - -#if defined(L_floatundidf) && LIBGCC2_HAS_DF_MODE -DFtype -__floatundidf (UDWtype u) -{ - DFtype d = (UWtype) (u >> W_TYPE_SIZE); + TFtype d = (UWtype) (u >> W_TYPE_SIZE); d *= Wtype_MAXp1_F; d += (UWtype)u; return d; } #endif -#if defined(L_floatdisf) && LIBGCC2_HAS_SF_MODE +#if (defined(L_floatdisf) && LIBGCC2_HAS_SF_MODE) \ + || (defined(L_floatdidf) && LIBGCC2_HAS_DF_MODE) #define DI_SIZE (W_TYPE_SIZE * 2) -#define SF_SIZE FLT_MANT_DIG +#define F_MODE_OK(SIZE) (SIZE < DI_SIZE && SIZE > (DI_SIZE - SIZE + FSSIZE)) +#if defined(L_floatdisf) +#define FUNC __floatdisf +#define FSTYPE SFtype +#define FSSIZE SF_SIZE +#else +#define FUNC __floatdidf +#define FSTYPE DFtype +#define FSSIZE DF_SIZE +#endif -SFtype -__floatdisf (DWtype u) +FSTYPE +FUNC (DWtype u) { -#if SF_SIZE >= W_TYPE_SIZE +#if FSSIZE >= W_TYPE_SIZE /* When the word size is small, we never get any rounding error. */ - SFtype f = (Wtype) (u >> W_TYPE_SIZE); + FSTYPE f = (Wtype) (u >> W_TYPE_SIZE); f *= Wtype_MAXp1_F; f += (UWtype)u; return f; -#elif LIBGCC2_HAS_DF_MODE - -#if LIBGCC2_DOUBLE_TYPE_SIZE == 64 -#define DF_SIZE DBL_MANT_DIG -#elif LIBGCC2_LONG_DOUBLE_TYPE_SIZE == 64 -#define DF_SIZE LDBL_MANT_DIG +#elif (LIBGCC2_HAS_DF_MODE && F_MODE_OK (DF_SIZE)) \ + || (LIBGCC2_HAS_XF_MODE && F_MODE_OK (XF_SIZE)) \ + || (LIBGCC2_HAS_TF_MODE && F_MODE_OK (TF_SIZE)) + +#if (LIBGCC2_HAS_DF_MODE && F_MODE_OK (DF_SIZE)) +# define FSIZE DF_SIZE +# define FTYPE DFtype +#elif (LIBGCC2_HAS_XF_MODE && F_MODE_OK (XF_SIZE)) +# define FSIZE XF_SIZE +# define FTYPE XFtype +#elif (LIBGCC2_HAS_TF_MODE && F_MODE_OK (TF_SIZE)) +# define FSIZE TF_SIZE +# define FTYPE TFtype #else # error #endif -#define REP_BIT ((UDWtype) 1 << (DI_SIZE - DF_SIZE)) +#define REP_BIT ((UDWtype) 1 << (DI_SIZE - FSIZE)) /* Protect against double-rounding error. Represent any low-order bits, that might be truncated by a bit that won't be lost. The bit can go in anywhere below the rounding position - of the SFmode. A fixed mask and bit position handles all usual - configurations. It doesn't handle the case of 128-bit DImode, however. */ - if (DF_SIZE < DI_SIZE - && DF_SIZE > (DI_SIZE - DF_SIZE + SF_SIZE)) + of the FSTYPE. A fixed mask and bit position handles all usual + configurations. */ + if (! (- ((DWtype) 1 << FSIZE) < u + && u < ((DWtype) 1 << FSIZE))) { - if (! (- ((DWtype) 1 << DF_SIZE) < u - && u < ((DWtype) 1 << DF_SIZE))) + if ((UDWtype) u & (REP_BIT - 1)) { - if ((UDWtype) u & (REP_BIT - 1)) - { - u &= ~ (REP_BIT - 1); - u |= REP_BIT; - } + u &= ~ (REP_BIT - 1); + u |= REP_BIT; } } - /* Do the calculation in DFmode so that we don't lose any of the - precision of the high word while multiplying it. */ - DFtype f = (Wtype) (u >> W_TYPE_SIZE); + /* Do the calculation in a wider type so that we don't lose any of + the precision of the high word while multiplying it. */ + FTYPE f = (Wtype) (u >> W_TYPE_SIZE); f *= Wtype_MAXp1_F; f += (UWtype)u; - return (SFtype) f; + return (FSTYPE) f; #else - /* Finally, the word size is larger than the number of bits in SFmode, - and we've got no DFmode. The only way to avoid double rounding is - to special case the extraction. */ +#if FSSIZE >= W_TYPE_SIZE - 2 +# error +#endif + /* Finally, the word size is larger than the number of bits in the + required FSTYPE, and we've got no suitable wider type. The only + way to avoid double rounding is to special case the + extraction. */ /* If there are no high bits set, fall back to one conversion. */ if ((Wtype)u == u) - return (SFtype)(Wtype)u; + return (FSTYPE)(Wtype)u; /* Otherwise, find the power of two. */ Wtype hi = u >> W_TYPE_SIZE; @@ -1447,82 +1454,99 @@ __floatdisf (DWtype u) /* No leading bits means u == minimum. */ if (count == 0) - return -(Wtype_MAXp1_F * Wtype_MAXp1_F / 2); + return -(Wtype_MAXp1_F * (Wtype_MAXp1_F / 2)); - shift = W_TYPE_SIZE - count; + shift = 1 + W_TYPE_SIZE - count; /* Shift down the most significant bits. */ hi = u >> shift; /* If we lost any nonzero bits, set the lsb to ensure correct rounding. */ - if (u & ((1 << shift) - 1)) + if (u & (((DWtype)1 << shift) - 1)) hi |= 1; /* Convert the one word of data, and rescale. */ - SFtype f = hi; - f *= (UWtype)1 << shift; + FSTYPE f = hi; + f *= (UDWtype)1 << shift; return f; #endif } #endif -#if defined(L_floatundisf) && LIBGCC2_HAS_SF_MODE +#if (defined(L_floatundisf) && LIBGCC2_HAS_SF_MODE) \ + || (defined(L_floatundidf) && LIBGCC2_HAS_DF_MODE) #define DI_SIZE (W_TYPE_SIZE * 2) -#define SF_SIZE FLT_MANT_DIG +#define F_MODE_OK(SIZE) (SIZE < DI_SIZE && SIZE > (DI_SIZE - SIZE + FSSIZE)) +#if defined(L_floatundisf) +#define FUNC __floatundisf +#define FSTYPE SFtype +#define FSSIZE SF_SIZE +#else +#define FUNC __floatundidf +#define FSTYPE DFtype +#define FSSIZE DF_SIZE +#endif -SFtype -__floatundisf (UDWtype u) +FSTYPE +FUNC (UDWtype u) { -#if SF_SIZE >= W_TYPE_SIZE +#if FSSIZE >= W_TYPE_SIZE /* When the word size is small, we never get any rounding error. */ - SFtype f = (UWtype) (u >> W_TYPE_SIZE); + FSTYPE f = (UWtype) (u >> W_TYPE_SIZE); f *= Wtype_MAXp1_F; f += (UWtype)u; return f; -#elif LIBGCC2_HAS_DF_MODE - -#if LIBGCC2_DOUBLE_TYPE_SIZE == 64 -#define DF_SIZE DBL_MANT_DIG -#elif LIBGCC2_LONG_DOUBLE_TYPE_SIZE == 64 -#define DF_SIZE LDBL_MANT_DIG +#elif (LIBGCC2_HAS_DF_MODE && F_MODE_OK (DF_SIZE)) \ + || (LIBGCC2_HAS_XF_MODE && F_MODE_OK (XF_SIZE)) \ + || (LIBGCC2_HAS_TF_MODE && F_MODE_OK (TF_SIZE)) + +#if (LIBGCC2_HAS_DF_MODE && F_MODE_OK (DF_SIZE)) +# define FSIZE DF_SIZE +# define FTYPE DFtype +#elif (LIBGCC2_HAS_XF_MODE && F_MODE_OK (XF_SIZE)) +# define FSIZE XF_SIZE +# define FTYPE XFtype +#elif (LIBGCC2_HAS_TF_MODE && F_MODE_OK (TF_SIZE)) +# define FSIZE TF_SIZE +# define FTYPE TFtype #else # error #endif -#define REP_BIT ((UDWtype) 1 << (DI_SIZE - DF_SIZE)) +#define REP_BIT ((UDWtype) 1 << (DI_SIZE - FSIZE)) /* Protect against double-rounding error. Represent any low-order bits, that might be truncated by a bit that won't be lost. The bit can go in anywhere below the rounding position - of the SFmode. A fixed mask and bit position handles all usual - configurations. It doesn't handle the case of 128-bit DImode, however. */ - if (DF_SIZE < DI_SIZE - && DF_SIZE > (DI_SIZE - DF_SIZE + SF_SIZE)) + of the FSTYPE. A fixed mask and bit position handles all usual + configurations. */ + if (u >= ((UDWtype) 1 << FSIZE)) { - if (u >= ((UDWtype) 1 << DF_SIZE)) + if ((UDWtype) u & (REP_BIT - 1)) { - if ((UDWtype) u & (REP_BIT - 1)) - { - u &= ~ (REP_BIT - 1); - u |= REP_BIT; - } + u &= ~ (REP_BIT - 1); + u |= REP_BIT; } } - /* Do the calculation in DFmode so that we don't lose any of the - precision of the high word while multiplying it. */ - DFtype f = (UWtype) (u >> W_TYPE_SIZE); + /* Do the calculation in a wider type so that we don't lose any of + the precision of the high word while multiplying it. */ + FTYPE f = (UWtype) (u >> W_TYPE_SIZE); f *= Wtype_MAXp1_F; f += (UWtype)u; - return (SFtype) f; + return (FSTYPE) f; #else - /* Finally, the word size is larger than the number of bits in SFmode, - and we've got no DFmode. The only way to avoid double rounding is - to special case the extraction. */ +#if FSSIZE == W_TYPE_SIZE - 1 +# error +#endif + /* Finally, the word size is larger than the number of bits in the + required FSTYPE, and we've got no suitable wider type. The only + way to avoid double rounding is to special case the + extraction. */ /* If there are no high bits set, fall back to one conversion. */ if ((UWtype)u == u) - return (SFtype)(UWtype)u; + return (FSTYPE)(UWtype)u; /* Otherwise, find the power of two. */ UWtype hi = u >> W_TYPE_SIZE; @@ -1536,12 +1560,12 @@ __floatundisf (UDWtype u) hi = u >> shift; /* If we lost any nonzero bits, set the lsb to ensure correct rounding. */ - if (u & ((1 << shift) - 1)) + if (u & (((UDWtype)1 << shift) - 1)) hi |= 1; /* Convert the one word of data, and rescale. */ - SFtype f = hi; - f *= (UWtype)1 << shift; + FSTYPE f = hi; + f *= (UDWtype)1 << shift; return f; #endif } diff --git a/gcc/libgcc2.h b/gcc/libgcc2.h index 11a1d9a3ff8..f8056d66e14 100644 --- a/gcc/libgcc2.h +++ b/gcc/libgcc2.h @@ -79,6 +79,44 @@ extern short int __get_eh_table_version (struct exception_descriptor *); (BITS_PER_UNIT == 8 && LIBGCC2_LONG_DOUBLE_TYPE_SIZE == 128) #endif +#ifndef SF_SIZE +#if LIBGCC2_HAS_SF_MODE +#define SF_SIZE FLT_MANT_DIG +#else +#define SF_SIZE 0 +#endif +#endif + +#ifndef DF_SIZE +#if LIBGCC2_HAS_DF_MODE +#if LIBGCC2_DOUBLE_TYPE_SIZE == 64 +#define DF_SIZE DBL_MANT_DIG +#elif LIBGCC2_LONG_DOUBLE_TYPE_SIZE == 64 +#define DF_SIZE LDBL_MANT_DIG +#else +#define DF_SIZE 0 +#endif +#else +#define DF_SIZE 0 +#endif +#endif + +#ifndef XF_SIZE +#if LIBGCC2_HAS_XF_MODE +#define XF_SIZE LDBL_MANT_DIG +#else +#define XF_SIZE 0 +#endif +#endif + +#ifndef TF_SIZE +#if LIBGCC2_HAS_TF_MODE +#define TF_SIZE LDBL_MANT_DIG +#else +#define TF_SIZE 0 +#endif +#endif + #ifndef MIN_UNITS_PER_WORD #define MIN_UNITS_PER_WORD UNITS_PER_WORD #endif diff --git a/gcc/libgcov.c b/gcc/libgcov.c index de44d911f01..494759e6bed 100644 --- a/gcc/libgcov.c +++ b/gcc/libgcov.c @@ -218,7 +218,7 @@ gcov_exit (void) prefix_length = 0; /* Allocate and initialize the filename scratch space. */ - gi_filename = alloca (prefix_length + gcov_max_filename + 1); + gi_filename = (char *) alloca (prefix_length + gcov_max_filename + 1); if (prefix_length) memcpy (gi_filename, gcov_prefix, prefix_length); gi_filename_up = gi_filename + prefix_length; @@ -786,7 +786,7 @@ __gcov_execl (const char *path, const char *arg, ...) length++; va_end (ap); - args = alloca (length * sizeof (void *)); + args = (char **) alloca (length * sizeof (void *)); args[0] = (char *) arg; for (i = 1; i < length; i++) args[i] = va_arg (aq, char *); @@ -817,7 +817,7 @@ __gcov_execlp (const char *path, const char *arg, ...) length++; va_end (ap); - args = alloca (length * sizeof (void *)); + args = (char **) alloca (length * sizeof (void *)); args[0] = (char *) arg; for (i = 1; i < length; i++) args[i] = va_arg (aq, char *); @@ -849,7 +849,7 @@ __gcov_execle (const char *path, const char *arg, ...) length++; va_end (ap); - args = alloca (length * sizeof (void *)); + args = (char **) alloca (length * sizeof (void *)); args[0] = (char *) arg; for (i = 1; i < length; i++) args[i] = va_arg (aq, char *); diff --git a/gcc/longlong.h b/gcc/longlong.h index f713f75b6e5..cdcabed6a40 100644 --- a/gcc/longlong.h +++ b/gcc/longlong.h @@ -639,7 +639,9 @@ UDItype __umulsidi3 (USItype, USItype); || defined (__powerpc__) /* gcc */ \ || defined (__POWERPC__) /* BEOS */ \ || defined (__ppc__) /* Darwin */ \ - || defined (PPC) /* GNU/Linux, SysV */ \ + || (defined (PPC) && ! defined (CPU_FAMILY)) /* gcc 2.7.x GNU&SysV */ \ + || (defined (PPC) && defined (CPU_FAMILY) /* VxWorks */ \ + && CPU_FAMILY == PPC) \ ) && W_TYPE_SIZE == 32 #define add_ssaaaa(sh, sl, ah, al, bh, bl) \ do { \ @@ -677,7 +679,10 @@ UDItype __umulsidi3 (USItype, USItype); __asm__ ("{cntlz|cntlzw} %0,%1" : "=r" (count) : "r" (x)) #define COUNT_LEADING_ZEROS_0 32 #if defined (_ARCH_PPC) || defined (__powerpc__) || defined (__POWERPC__) \ - || defined (__ppc__) || defined (PPC) + || defined (__ppc__) \ + || (defined (PPC) && ! defined (CPU_FAMILY)) /* gcc 2.7.x GNU&SysV */ \ + || (defined (PPC) && defined (CPU_FAMILY) /* VxWorks */ \ + && CPU_FAMILY == PPC) #define umul_ppmm(ph, pl, m0, m1) \ do { \ USItype __m0 = (m0), __m1 = (m1); \ diff --git a/gcc/loop-doloop.c b/gcc/loop-doloop.c index 280abddb24d..3fcb79d9dc1 100644 --- a/gcc/loop-doloop.c +++ b/gcc/loop-doloop.c @@ -244,14 +244,18 @@ add_test (rtx cond, basic_block bb, basic_block dest) do_compare_rtx_and_jump (op0, op1, code, 0, mode, NULL_RTX, NULL_RTX, label); jump = get_last_insn (); - JUMP_LABEL (jump) = label; + /* It is possible for the jump to be optimized out. */ + if (JUMP_P (jump)) + { + JUMP_LABEL (jump) = label; - /* The jump is supposed to handle an unlikely special case. */ - REG_NOTES (jump) - = gen_rtx_EXPR_LIST (REG_BR_PROB, - const0_rtx, REG_NOTES (jump)); + /* The jump is supposed to handle an unlikely special case. */ + REG_NOTES (jump) + = gen_rtx_EXPR_LIST (REG_BR_PROB, + const0_rtx, REG_NOTES (jump)); - LABEL_NUSES (label)++; + LABEL_NUSES (label)++; + } seq = get_insns (); end_sequence (); diff --git a/gcc/loop-invariant.c b/gcc/loop-invariant.c index 8fe549b6b04..96d216e2672 100644 --- a/gcc/loop-invariant.c +++ b/gcc/loop-invariant.c @@ -1,28 +1,28 @@ -/* Rtl-level loop invariant motion. - Copyright (C) 2004, 2005 Free Software Foundation, Inc. - +/* RTL-level loop invariant motion. + Copyright (C) 2004, 2005, 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* This implements the loop invariant motion pass. It is very simple - (no calls, libcalls, etc.). This should be sufficient to cleanup things like - address arithmetics -- other more complicated invariants should be + (no calls, libcalls, etc.). This should be sufficient to cleanup things + like address arithmetics -- other more complicated invariants should be eliminated on tree level either in tree-ssa-loop-im.c or in tree-ssa-pre.c. - + We proceed loop by loop -- it is simpler than trying to handle things globally and should not lose much. First we inspect all sets inside loop and create a dependency graph on insns (saying "to move this insn, you must @@ -31,7 +31,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA We then need to determine what to move. We estimate the number of registers used and move as many invariants as possible while we still have enough free registers. We prefer the expensive invariants. - + Then we move the selected invariants out of the loop, creating a new temporaries for them if necessary. */ @@ -46,10 +46,12 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA #include "basic-block.h" #include "cfgloop.h" #include "expr.h" +#include "recog.h" #include "output.h" #include "function.h" #include "flags.h" #include "df.h" +#include "hashtab.h" /* The data stored for the loop. */ @@ -88,8 +90,12 @@ struct invariant /* The number of the invariant. */ unsigned invno; - /* Whether we already processed the invariant. */ - bool processed; + /* The number of the invariant with the same value. */ + unsigned eqto; + + /* If we moved the invariant out of the loop, the register that contains its + value. */ + rtx reg; /* The definition of the invariant. */ struct def *def; @@ -103,7 +109,7 @@ struct invariant /* Whether to move the invariant. */ bool move; - /* Cost if the invariant. */ + /* Cost of the invariant. */ unsigned cost; /* The invariants it depends on. */ @@ -114,6 +120,23 @@ struct invariant unsigned stamp; }; +/* Entry for hash table of invariant expressions. */ + +struct invariant_expr_entry +{ + /* The invariant. */ + struct invariant *inv; + + /* Its value. */ + rtx expr; + + /* Its mode. */ + enum machine_mode mode; + + /* Its hash. */ + hashval_t hash; +}; + /* The actual stamp for marking already visited invariants during determining costs of movements. */ @@ -128,6 +151,10 @@ DEF_VEC_ALLOC_P(invariant_p, heap); static VEC(invariant_p,heap) *invariants; +/* The dataflow object. */ + +static struct df *df = NULL; + /* Test for possibility of invariantness of X. */ static bool @@ -195,6 +222,269 @@ check_maybe_invariant (rtx x) return true; } +/* Returns the invariant definition for USE, or NULL if USE is not + invariant. */ + +static struct invariant * +invariant_for_use (struct df_ref *use) +{ + struct df_link *defs; + struct df_ref *def; + basic_block bb = BLOCK_FOR_INSN (use->insn), def_bb; + + defs = DF_REF_CHAIN (use); + if (!defs || defs->next) + return NULL; + def = defs->ref; + if (!DF_REF_DATA (def)) + return NULL; + + def_bb = DF_REF_BB (def); + if (!dominated_by_p (CDI_DOMINATORS, bb, def_bb)) + return NULL; + return DF_REF_DATA (def); +} + +/* Computes hash value for invariant expression X in INSN. */ + +static hashval_t +hash_invariant_expr_1 (rtx insn, rtx x) +{ + enum rtx_code code = GET_CODE (x); + int i, j; + const char *fmt; + hashval_t val = code; + int do_not_record_p; + struct df_ref *use; + struct invariant *inv; + + switch (code) + { + case CONST_INT: + case CONST_DOUBLE: + case SYMBOL_REF: + case CONST: + case LABEL_REF: + return hash_rtx (x, GET_MODE (x), &do_not_record_p, NULL, false); + + case REG: + use = df_find_use (df, insn, x); + if (!use) + return hash_rtx (x, GET_MODE (x), &do_not_record_p, NULL, false); + inv = invariant_for_use (use); + if (!inv) + return hash_rtx (x, GET_MODE (x), &do_not_record_p, NULL, false); + + gcc_assert (inv->eqto != ~0u); + return inv->eqto; + + default: + break; + } + + fmt = GET_RTX_FORMAT (code); + for (i = GET_RTX_LENGTH (code) - 1; i >= 0; i--) + { + if (fmt[i] == 'e') + val ^= hash_invariant_expr_1 (insn, XEXP (x, i)); + else if (fmt[i] == 'E') + { + for (j = 0; j < XVECLEN (x, i); j++) + val ^= hash_invariant_expr_1 (insn, XVECEXP (x, i, j)); + } + } + + return val; +} + +/* Returns true if the invariant expressions E1 and E2 used in insns INSN1 + and INSN2 have always the same value. */ + +static bool +invariant_expr_equal_p (rtx insn1, rtx e1, rtx insn2, rtx e2) +{ + enum rtx_code code = GET_CODE (e1); + int i, j; + const char *fmt; + struct df_ref *use1, *use2; + struct invariant *inv1 = NULL, *inv2 = NULL; + rtx sub1, sub2; + + /* If mode of only one of the operands is VOIDmode, it is not equivalent to + the other one. If both are VOIDmode, we rely on the caller of this + function to verify that their modes are the same. */ + if (code != GET_CODE (e2) || GET_MODE (e1) != GET_MODE (e2)) + return false; + + switch (code) + { + case CONST_INT: + case CONST_DOUBLE: + case SYMBOL_REF: + case CONST: + case LABEL_REF: + return rtx_equal_p (e1, e2); + + case REG: + use1 = df_find_use (df, insn1, e1); + use2 = df_find_use (df, insn2, e2); + if (use1) + inv1 = invariant_for_use (use1); + if (use2) + inv2 = invariant_for_use (use2); + + if (!inv1 && !inv2) + return rtx_equal_p (e1, e2); + + if (!inv1 || !inv2) + return false; + + gcc_assert (inv1->eqto != ~0u); + gcc_assert (inv2->eqto != ~0u); + return inv1->eqto == inv2->eqto; + + default: + break; + } + + fmt = GET_RTX_FORMAT (code); + for (i = GET_RTX_LENGTH (code) - 1; i >= 0; i--) + { + if (fmt[i] == 'e') + { + sub1 = XEXP (e1, i); + sub2 = XEXP (e2, i); + + if (!invariant_expr_equal_p (insn1, sub1, insn2, sub2)) + return false; + } + + else if (fmt[i] == 'E') + { + if (XVECLEN (e1, i) != XVECLEN (e2, i)) + return false; + + for (j = 0; j < XVECLEN (e1, i); j++) + { + sub1 = XVECEXP (e1, i, j); + sub2 = XVECEXP (e2, i, j); + + if (!invariant_expr_equal_p (insn1, sub1, insn2, sub2)) + return false; + } + } + } + + return true; +} + +/* Returns hash value for invariant expression entry E. */ + +static hashval_t +hash_invariant_expr (const void *e) +{ + const struct invariant_expr_entry *entry = e; + + return entry->hash; +} + +/* Compares invariant expression entries E1 and E2. */ + +static int +eq_invariant_expr (const void *e1, const void *e2) +{ + const struct invariant_expr_entry *entry1 = e1; + const struct invariant_expr_entry *entry2 = e2; + + if (entry1->mode != entry2->mode) + return 0; + + return invariant_expr_equal_p (entry1->inv->insn, entry1->expr, + entry2->inv->insn, entry2->expr); +} + +/* Checks whether invariant with value EXPR in machine mode MODE is + recorded in EQ. If this is the case, return the invariant. Otherwise + insert INV to the table for this expression and return INV. */ + +static struct invariant * +find_or_insert_inv (htab_t eq, rtx expr, enum machine_mode mode, + struct invariant *inv) +{ + hashval_t hash = hash_invariant_expr_1 (inv->insn, expr); + struct invariant_expr_entry *entry; + struct invariant_expr_entry pentry; + PTR *slot; + + pentry.expr = expr; + pentry.inv = inv; + pentry.mode = mode; + slot = htab_find_slot_with_hash (eq, &pentry, hash, INSERT); + entry = *slot; + + if (entry) + return entry->inv; + + entry = xmalloc (sizeof (struct invariant_expr_entry)); + entry->inv = inv; + entry->expr = expr; + entry->mode = mode; + entry->hash = hash; + *slot = entry; + + return inv; +} + +/* Finds invariants identical to INV and records the equivalence. EQ is the + hash table of the invariants. */ + +static void +find_identical_invariants (htab_t eq, struct invariant *inv) +{ + unsigned depno; + bitmap_iterator bi; + struct invariant *dep; + rtx expr, set; + enum machine_mode mode; + + if (inv->eqto != ~0u) + return; + + EXECUTE_IF_SET_IN_BITMAP (inv->depends_on, 0, depno, bi) + { + dep = VEC_index (invariant_p, invariants, depno); + find_identical_invariants (eq, dep); + } + + set = single_set (inv->insn); + expr = SET_SRC (set); + mode = GET_MODE (expr); + if (mode == VOIDmode) + mode = GET_MODE (SET_DEST (set)); + inv->eqto = find_or_insert_inv (eq, expr, mode, inv)->invno; + + if (dump_file && inv->eqto != inv->invno) + fprintf (dump_file, + "Invariant %d is equivalent to invariant %d.\n ", + inv->invno, inv->eqto); +} + +/* Find invariants with the same value and record the equivalences. */ + +static void +merge_identical_invariants (void) +{ + unsigned i; + struct invariant *inv; + htab_t eq = htab_create (VEC_length (invariant_p, invariants), + hash_invariant_expr, eq_invariant_expr, free); + + for (i = 0; VEC_iterate (invariant_p, invariants, i, inv); i++) + find_identical_invariants (eq, inv); + + htab_delete (eq); +} + /* Determines the basic blocks inside LOOP that are always executed and stores their bitmap to ALWAYS_REACHED. MAY_EXIT is a bitmap of basic blocks that may either exit the loop, or contain the call that @@ -259,7 +549,7 @@ find_exits (struct loop *loop, basic_block *body, } continue; } - + /* Use the data stored for the subloop to decide whether we may exit through it. It is sufficient to do this for header of the loop, as other basic blocks inside it must be dominated by it. */ @@ -298,11 +588,11 @@ may_assign_reg_p (rtx x) || REGNO_REG_CLASS (REGNO (x)) != NO_REGS)); } -/* Finds definitions that may correspond to invariants in LOOP with body BODY. - DF is the dataflow object. */ +/* Finds definitions that may correspond to invariants in LOOP with body + BODY. */ static void -find_defs (struct loop *loop, basic_block *body, struct df *df) +find_defs (struct loop *loop, basic_block *body) { unsigned i; bitmap blocks = BITMAP_ALLOC (NULL); @@ -310,15 +600,17 @@ find_defs (struct loop *loop, basic_block *body, struct df *df) for (i = 0; i < loop->num_nodes; i++) bitmap_set_bit (blocks, body[i]->index); - df_analyze_subcfg (df, blocks, DF_UD_CHAIN | DF_HARD_REGS | DF_EQUIV_NOTES); + df_set_blocks (df, blocks); + df_analyze (df); BITMAP_FREE (blocks); } /* Creates a new invariant for definition DEF in INSN, depending on invariants in DEPENDS_ON. ALWAYS_EXECUTED is true if the insn is always executed, - unless the program ends due to a function call. */ + unless the program ends due to a function call. The newly created invariant + is returned. */ -static void +static struct invariant * create_new_invariant (struct def *def, rtx insn, bitmap depends_on, bool always_executed) { @@ -337,11 +629,12 @@ create_new_invariant (struct def *def, rtx insn, bitmap depends_on, inv->cost = rtx_cost (SET_SRC (set), SET); inv->move = false; - inv->processed = false; + inv->reg = NULL_RTX; inv->stamp = 0; inv->insn = insn; inv->invno = VEC_length (invariant_p, invariants); + inv->eqto = ~0u; if (def) def->invno = inv->invno; VEC_safe_push (invariant_p, heap, invariants, inv); @@ -353,6 +646,8 @@ create_new_invariant (struct def *def, rtx insn, bitmap depends_on, INSN_UID (insn), inv->invno, inv->cost); dump_bitmap (dump_file, inv->depends_on); } + + return inv; } /* Record USE at DEF. */ @@ -374,20 +669,19 @@ record_use (struct def *def, rtx *use, rtx insn) } /* Finds the invariants INSN depends on and store them to the DEPENDS_ON - bitmap. DF is the dataflow object. */ + bitmap. */ static bool -check_dependencies (rtx insn, struct df *df, bitmap depends_on) +check_dependencies (rtx insn, bitmap depends_on) { - struct df_link *uses, *defs; - struct ref *use, *def; + struct df_link *defs; + struct df_ref *use, *def; basic_block bb = BLOCK_FOR_INSN (insn), def_bb; struct def *def_data; - - for (uses = DF_INSN_USES (df, insn); uses; uses = uses->next) - { - use = uses->ref; + struct invariant *inv; + for (use = DF_INSN_GET (df, insn)->uses; use; use = use->next_ref) + { defs = DF_REF_CHAIN (use); if (!defs) continue; @@ -396,11 +690,17 @@ check_dependencies (rtx insn, struct df *df, bitmap depends_on) return false; def = defs->ref; - def_data = DF_REF_DATA (def); - if (!def_data) + inv = DF_REF_DATA (def); + if (!inv) return false; + def_data = inv->def; + gcc_assert (def_data != NULL); + def_bb = DF_REF_BB (def); + /* Note that in case bb == def_bb, we know that the definition dominates + insn, because def has DF_REF_DATA defined and we process the insns + in the basic block bb sequentially. */ if (!dominated_by_p (CDI_DOMINATORS, bb, def_bb)) return false; @@ -412,25 +712,24 @@ check_dependencies (rtx insn, struct df *df, bitmap depends_on) /* Finds invariant in INSN. ALWAYS_REACHED is true if the insn is always executed. ALWAYS_EXECUTED is true if the insn is always executed, - unless the program ends due to a function call. DF is the dataflow - object. */ + unless the program ends due to a function call. */ static void -find_invariant_insn (rtx insn, bool always_reached, bool always_executed, - struct df *df) +find_invariant_insn (rtx insn, bool always_reached, bool always_executed) { - struct ref *ref; + struct df_ref *ref; struct def *def; bitmap depends_on; rtx set, dest; bool simple = true; + struct invariant *inv; /* Until we get rid of LIBCALLS. */ if (find_reg_note (insn, REG_RETVAL, NULL_RTX) || find_reg_note (insn, REG_LIBCALL, NULL_RTX) || find_reg_note (insn, REG_NO_CONFLICT, NULL_RTX)) return; - + set = single_set (insn); if (!set) return; @@ -456,74 +755,60 @@ find_invariant_insn (rtx insn, bool always_reached, bool always_executed, } depends_on = BITMAP_ALLOC (NULL); - if (!check_dependencies (insn, df, depends_on)) + if (!check_dependencies (insn, depends_on)) { BITMAP_FREE (depends_on); return; } if (simple) - { - ref = df_find_def (df, insn, dest); - def = xcalloc (1, sizeof (struct def)); - DF_REF_DATA (ref) = def; - } + def = xcalloc (1, sizeof (struct def)); else def = NULL; - create_new_invariant (def, insn, depends_on, always_executed); + inv = create_new_invariant (def, insn, depends_on, always_executed); + + if (simple) + { + ref = df_find_def (df, insn, dest); + DF_REF_DATA (ref) = inv; + } } -/* Record registers used in INSN that have a unique invariant definition. - DF is the dataflow object. */ +/* Record registers used in INSN that have a unique invariant definition. */ static void -record_uses (rtx insn, struct df *df) +record_uses (rtx insn) { - struct df_link *uses, *defs; - struct ref *use, *def; - basic_block bb = BLOCK_FOR_INSN (insn), def_bb; - - for (uses = DF_INSN_USES (df, insn); uses; uses = uses->next) - { - use = uses->ref; - - defs = DF_REF_CHAIN (use); - if (!defs || defs->next) - continue; - def = defs->ref; - if (!DF_REF_DATA (def)) - continue; - - def_bb = DF_REF_BB (def); - if (!dominated_by_p (CDI_DOMINATORS, bb, def_bb)) - continue; + struct df_ref *use; + struct invariant *inv; - record_use (DF_REF_DATA (def), DF_REF_LOC (use), DF_REF_INSN (use)); + for (use = DF_INSN_GET (df, insn)->uses; use; use = use->next_ref) + { + inv = invariant_for_use (use); + if (inv) + record_use (inv->def, DF_REF_LOC (use), DF_REF_INSN (use)); } } /* Finds invariants in INSN. ALWAYS_REACHED is true if the insn is always executed. ALWAYS_EXECUTED is true if the insn is always executed, - unless the program ends due to a function call. DF is the dataflow - object. */ + unless the program ends due to a function call. */ static void -find_invariants_insn (rtx insn, bool always_reached, bool always_executed, - struct df *df) +find_invariants_insn (rtx insn, bool always_reached, bool always_executed) { - find_invariant_insn (insn, always_reached, always_executed, df); - record_uses (insn, df); + find_invariant_insn (insn, always_reached, always_executed); + record_uses (insn); } /* Finds invariants in basic block BB. ALWAYS_REACHED is true if the basic block is always executed. ALWAYS_EXECUTED is true if the basic block is always executed, unless the program ends due to a function - call. DF is the dataflow object. */ + call. */ static void -find_invariants_bb (basic_block bb, bool always_reached, bool always_executed, - struct df *df) +find_invariants_bb (basic_block bb, bool always_reached, bool always_executed) { rtx insn; @@ -532,7 +817,7 @@ find_invariants_bb (basic_block bb, bool always_reached, bool always_executed, if (!INSN_P (insn)) continue; - find_invariants_insn (insn, always_reached, always_executed, df); + find_invariants_insn (insn, always_reached, always_executed); if (always_reached && CALL_P (insn) @@ -544,26 +829,24 @@ find_invariants_bb (basic_block bb, bool always_reached, bool always_executed, /* Finds invariants in LOOP with body BODY. ALWAYS_REACHED is the bitmap of basic blocks in BODY that are always executed. ALWAYS_EXECUTED is the bitmap of basic blocks in BODY that are always executed unless the program - ends due to a function call. DF is the dataflow object. */ + ends due to a function call. */ static void find_invariants_body (struct loop *loop, basic_block *body, - bitmap always_reached, bitmap always_executed, - struct df *df) + bitmap always_reached, bitmap always_executed) { unsigned i; for (i = 0; i < loop->num_nodes; i++) find_invariants_bb (body[i], bitmap_bit_p (always_reached, i), - bitmap_bit_p (always_executed, i), - df); + bitmap_bit_p (always_executed, i)); } -/* Finds invariants in LOOP. DF is the dataflow object. */ +/* Finds invariants in LOOP. */ static void -find_invariants (struct loop *loop, struct df *df) +find_invariants (struct loop *loop) { bitmap may_exit = BITMAP_ALLOC (NULL); bitmap always_reached = BITMAP_ALLOC (NULL); @@ -575,8 +858,9 @@ find_invariants (struct loop *loop, struct df *df) compute_always_reached (loop, body, may_exit, always_reached); compute_always_reached (loop, body, has_exit, always_executed); - find_defs (loop, body, df); - find_invariants_body (loop, body, always_reached, always_executed, df); + find_defs (loop, body); + find_invariants_body (loop, body, always_reached, always_executed); + merge_identical_invariants (); BITMAP_FREE (always_reached); BITMAP_FREE (always_executed); @@ -611,6 +895,9 @@ get_inv_cost (struct invariant *inv, int *comp_cost, unsigned *regs_needed) struct invariant *dep; bitmap_iterator bi; + /* Find the representative of the class of the equivalent invariants. */ + inv = VEC_index (invariant_p, invariants, inv->eqto); + *comp_cost = 0; *regs_needed = 0; if (inv->move @@ -687,6 +974,10 @@ best_gain_for_invariant (struct invariant **best, unsigned *regs_needed, if (inv->move) continue; + /* Only consider the "representatives" of equivalent invariants. */ + if (inv->eqto != inv->invno) + continue; + again = gain_for_invariant (inv, &aregs_needed, new_regs, regs_used, n_inv_uses); if (again > gain) @@ -708,6 +999,9 @@ set_move_mark (unsigned invno) struct invariant *inv = VEC_index (invariant_p, invariants, invno); bitmap_iterator bi; + /* Find the representative of the class of the equivalent invariants. */ + inv = VEC_index (invariant_p, invariants, inv->eqto); + if (inv->move) return; inv->move = true; @@ -721,13 +1015,14 @@ set_move_mark (unsigned invno) } } -/* Determines which invariants to move. DF is the dataflow object. */ +/* Determines which invariants to move. */ static void -find_invariants_to_move (struct df *df) +find_invariants_to_move (void) { unsigned i, regs_used, n_inv_uses, regs_needed = 0, new_regs; struct invariant *inv = NULL; + unsigned int n_regs = DF_REG_SIZE (df); if (!VEC_length (invariant_p, invariants)) return; @@ -740,7 +1035,7 @@ find_invariants_to_move (struct df *df) here to stand for induction variables etc. that we do not detect. */ regs_used = 2; - for (i = 0; i < df->n_regs; i++) + for (i = 0; i < n_regs; i++) { if (!DF_REGNO_FIRST_DEF (df, i) && DF_REGNO_LAST_USE (df, i)) { @@ -764,83 +1059,91 @@ find_invariants_to_move (struct df *df) } } -/* Move invariant INVNO out of the LOOP. DF is the dataflow object. */ +/* Move invariant INVNO out of the LOOP. */ static void -move_invariant_reg (struct loop *loop, unsigned invno, struct df *df) +move_invariant_reg (struct loop *loop, unsigned invno) { struct invariant *inv = VEC_index (invariant_p, invariants, invno); + struct invariant *repr = VEC_index (invariant_p, invariants, inv->eqto); unsigned i; basic_block preheader = loop_preheader_edge (loop)->src; rtx reg, set; struct use *use; bitmap_iterator bi; - if (inv->processed) + if (inv->reg + || !repr->move) return; - inv->processed = true; - if (inv->depends_on) + /* If this is a representative of the class of equivalent invariants, + really move the invariant. Otherwise just replace its use with + the register used for the representative. */ + if (inv == repr) { - EXECUTE_IF_SET_IN_BITMAP (inv->depends_on, 0, i, bi) + if (inv->depends_on) { - move_invariant_reg (loop, i, df); + EXECUTE_IF_SET_IN_BITMAP (inv->depends_on, 0, i, bi) + { + move_invariant_reg (loop, i); + } } - } - /* Move the set out of the loop. If the set is always executed (we could - omit this condition if we know that the register is unused outside of the - loop, but it does not seem worth finding out) and it has no uses that - would not be dominated by it, we may just move it (TODO). Otherwise we - need to create a temporary register. */ - set = single_set (inv->insn); - reg = gen_reg_rtx (GET_MODE (SET_DEST (set))); - df_pattern_emit_after (df, gen_move_insn (SET_DEST (set), reg), - BLOCK_FOR_INSN (inv->insn), inv->insn); - - /* If the SET_DEST of the invariant insn is a reg, we can just move - the insn out of the loop. Otherwise, we have to use gen_move_insn - to let emit_move_insn produce a valid instruction stream. */ - if (REG_P (SET_DEST (set))) - { - SET_DEST (set) = reg; - reorder_insns (inv->insn, inv->insn, BB_END (preheader)); - df_insn_modify (df, preheader, inv->insn); + /* Move the set out of the loop. If the set is always executed (we could + omit this condition if we know that the register is unused outside of the + loop, but it does not seem worth finding out) and it has no uses that + would not be dominated by it, we may just move it (TODO). Otherwise we + need to create a temporary register. */ + set = single_set (inv->insn); + reg = gen_reg_rtx (GET_MODE (SET_DEST (set))); + emit_insn_after (gen_move_insn (SET_DEST (set), reg), inv->insn); + + /* If the SET_DEST of the invariant insn is a reg, we can just move + the insn out of the loop. Otherwise, we have to use gen_move_insn + to let emit_move_insn produce a valid instruction stream. */ + if (REG_P (SET_DEST (set))) + { + SET_DEST (set) = reg; + reorder_insns (inv->insn, inv->insn, BB_END (preheader)); + } + else + { + emit_insn_after (gen_move_insn (reg, SET_SRC (set)), BB_END (preheader)); + delete_insn (inv->insn); + } } else { - df_pattern_emit_after (df, gen_move_insn (reg, SET_SRC (set)), - preheader, BB_END (preheader)); - df_insn_delete (df, BLOCK_FOR_INSN (inv->insn), inv->insn); + move_invariant_reg (loop, repr->invno); + reg = repr->reg; + set = single_set (inv->insn); + emit_insn_after (gen_move_insn (SET_DEST (set), reg), inv->insn); + delete_insn (inv->insn); } + inv->reg = reg; + /* Replace the uses we know to be dominated. It saves work for copy propagation, and also it is necessary so that dependent invariants are computed right. */ if (inv->def) { for (use = inv->def->uses; use; use = use->next) - { - *use->pos = reg; - df_insn_modify (df, BLOCK_FOR_INSN (use->insn), use->insn); - } + *use->pos = reg; } } /* Move selected invariant out of the LOOP. Newly created regs are marked - in TEMPORARY_REGS. DF is the dataflow object. */ + in TEMPORARY_REGS. */ static void -move_invariants (struct loop *loop, struct df *df) +move_invariants (struct loop *loop) { struct invariant *inv; unsigned i; for (i = 0; VEC_iterate (invariant_p, invariants, i, inv); i++) - { - if (inv->move) - move_invariant_reg (loop, i, df); - } + move_invariant_reg (loop, i); } /* Initializes invariant motion data. */ @@ -853,28 +1156,31 @@ init_inv_motion_data (void) invariants = VEC_alloc (invariant_p, heap, 100); } -/* Frees the data allocated by invariant motion. DF is the dataflow - object. */ +/* Frees the data allocated by invariant motion. */ static void -free_inv_motion_data (struct df *df) +free_inv_motion_data (void) { unsigned i; struct def *def; struct invariant *inv; - for (i = 0; i < df->n_defs; i++) + for (i = 0; i < DF_DEFS_SIZE (df); i++) { - if (!df->defs[i]) + struct df_ref * ref = DF_DEFS_GET (df, i); + if (!ref) continue; - def = DF_REF_DATA (df->defs[i]); - if (!def) + inv = DF_REF_DATA (ref); + if (!inv) continue; + def = inv->def; + gcc_assert (def != NULL); + free_use_list (def->uses); free (def); - DF_REF_DATA (df->defs[i]) = NULL; + DF_REF_DATA (ref) = NULL; } for (i = 0; VEC_iterate (invariant_p, invariants, i, inv); i++) @@ -885,18 +1191,18 @@ free_inv_motion_data (struct df *df) VEC_free (invariant_p, heap, invariants); } -/* Move the invariants out of the LOOP. DF is the dataflow object. */ +/* Move the invariants out of the LOOP. */ static void -move_single_loop_invariants (struct loop *loop, struct df *df) +move_single_loop_invariants (struct loop *loop) { init_inv_motion_data (); - find_invariants (loop, df); - find_invariants_to_move (df); - move_invariants (loop, df); + find_invariants (loop); + find_invariants_to_move (); + move_invariants (loop); - free_inv_motion_data (df); + free_inv_motion_data (); } /* Releases the auxiliary data for LOOP. */ @@ -917,8 +1223,10 @@ move_loop_invariants (struct loops *loops) { struct loop *loop; unsigned i; - struct df *df = df_init (); + df = df_init (DF_HARD_REGS | DF_EQUIV_NOTES); + df_chain_add_problem (df, DF_UD_CHAIN); + /* Process the loops, innermost first. */ loop = loops->tree_root; while (loop->inner) @@ -926,7 +1234,7 @@ move_loop_invariants (struct loops *loops) while (loop != loops->tree_root) { - move_single_loop_invariants (loop, df); + move_single_loop_invariants (loop); if (loop->next) { @@ -943,6 +1251,7 @@ move_loop_invariants (struct loops *loops) free_loop_data (loops->parray[i]); df_finish (df); + df = NULL; #ifdef ENABLE_CHECKING verify_flow_info (); diff --git a/gcc/loop-unswitch.c b/gcc/loop-unswitch.c index d7487305017..8a71f72fd53 100644 --- a/gcc/loop-unswitch.c +++ b/gcc/loop-unswitch.c @@ -426,8 +426,11 @@ unswitch_loop (struct loops *loops, struct loop *loop, basic_block unswitch_on, sbitmap_zero (zero_bitmap); if (!duplicate_loop_to_header_edge (loop, entry, loops, 1, zero_bitmap, NULL, NULL, NULL, 0)) - return NULL; - free (zero_bitmap); + { + sbitmap_free (zero_bitmap); + return NULL; + } + sbitmap_free (zero_bitmap); entry->flags |= irred_flag; /* Record the block with condition we unswitch on. */ diff --git a/gcc/loop.c b/gcc/loop.c index 6475eaf2e3c..1964ba3f5b2 100644 --- a/gcc/loop.c +++ b/gcc/loop.c @@ -6475,6 +6475,17 @@ strength_reduce (struct loop *loop, int flags) v->ignore = 1; bl->all_reduced = 0; } + else if (!v->always_computable + && (may_trap_or_fault_p (v->add_val) + || may_trap_or_fault_p (v->mult_val))) + { + if (loop_dump_stream) + fprintf (loop_dump_stream, + "giv of insn %d: not always computable.\n", + INSN_UID (v->insn)); + v->ignore = 1; + bl->all_reduced = 0; + } else { /* Check that we can increment the reduced giv without a diff --git a/gcc/machmode.def b/gcc/machmode.def index 46895214e07..ffb675d14f0 100644 --- a/gcc/machmode.def +++ b/gcc/machmode.def @@ -87,6 +87,10 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA using floating point format FORMAT. All of the bits of its representation are significant. + DECIMAL FLOAT_MODE (MODE, BYTESIZE); + declares MODE to be of class DECIMAL_FLOAT and BYTESIZE bytes + wide. All of the bits of its representation are significant. + FRACTIONAL_FLOAT_MODE (MODE, PRECISION, BYTESIZE, FORMAT); declares MODE to be of class FLOAT, BYTESIZE bytes wide in storage, but with only PRECISION significant bits, using @@ -186,6 +190,11 @@ CC_MODE (CC); COMPLEX_MODES (INT); COMPLEX_MODES (FLOAT); +/* Decimal floating point modes. */ +DECIMAL_FLOAT_MODE (SD, 4, decimal_single_format); +DECIMAL_FLOAT_MODE (DD, 8, decimal_double_format); +DECIMAL_FLOAT_MODE (TD, 16, decimal_quad_format); + /* The symbol Pmode stands for one of the above machine modes (usually SImode). The tm.h file specifies which one. It is not a distinct mode. */ diff --git a/gcc/machmode.h b/gcc/machmode.h index 7f5633c1a04..3948fc9388b 100644 --- a/gcc/machmode.h +++ b/gcc/machmode.h @@ -54,6 +54,7 @@ extern const unsigned char mode_class[NUM_MACHINE_MODES]; /* Nonzero if MODE is a floating-point mode. */ #define FLOAT_MODE_P(MODE) \ (GET_MODE_CLASS (MODE) == MODE_FLOAT \ + || GET_MODE_CLASS (MODE) == MODE_DECIMAL_FLOAT \ || GET_MODE_CLASS (MODE) == MODE_COMPLEX_FLOAT \ || GET_MODE_CLASS (MODE) == MODE_VECTOR_FLOAT) @@ -74,7 +75,19 @@ extern const unsigned char mode_class[NUM_MACHINE_MODES]; /* Nonzero if MODE is a scalar floating point mode. */ #define SCALAR_FLOAT_MODE_P(MODE) \ - (GET_MODE_CLASS (MODE) == MODE_FLOAT) + (GET_MODE_CLASS (MODE) == MODE_FLOAT \ + || GET_MODE_CLASS (MODE) == MODE_DECIMAL_FLOAT) + +/* Nonzero if MODE is a decimal floating point mode. */ +#define DECIMAL_FLOAT_MODE_P(MODE) \ + (GET_MODE_CLASS (MODE) == MODE_DECIMAL_FLOAT) + +/* Nonzero if CLASS modes can be widened. */ +#define CLASS_HAS_WIDER_MODES_P(CLASS) \ + (CLASS == MODE_INT \ + || CLASS == MODE_FLOAT \ + || CLASS == MODE_DECIMAL_FLOAT \ + || CLASS == MODE_COMPLEX_FLOAT) /* Get the size in bytes and bits of an object of mode MODE. */ diff --git a/gcc/mklibgcc.in b/gcc/mklibgcc.in index 816e301023b..ba853636ac7 100644 --- a/gcc/mklibgcc.in +++ b/gcc/mklibgcc.in @@ -313,95 +313,41 @@ for ml in $MULTILIBS; do # Build software floating point functions. # - if [ "$FPBIT" ]; then - for name in $FPBIT_FUNCS; do - if [ "$libgcc_s_so" ]; then - out="libgcc/${dir}/${name}${objext}" - outS="libgcc/${dir}/${name}_s${objext}" - - echo $outS: $FPBIT $fpbit_c_dep - echo " $gcc_s_compile" -DFINE_GRAINED_LIBRARIES $flags -DL$name \ - -c $FPBIT -o $outS - - echo $out: $FPBIT $fpbit_c_dep - echo " $gcc_compile" -DFINE_GRAINED_LIBRARIES $flags -DL$name \ - '$(vis_hide)' -c $FPBIT -o $out - - echo $libgcc_a: $out - echo $libgcc_s_so: $outS - if [ "$SHLIB_MKMAP" ]; then - echo libgcc/${dir}/libgcc.map: $outS - fi - else - out="libgcc/${dir}/${name}${objext}" - echo $out: $FPBIT $fpbit_c_dep - echo " $gcc_compile" -DFINE_GRAINED_LIBRARIES $flags -DL$name \ - -c $FPBIT -o $out - - echo $libgcc_a: $out - fi - done - fi - - if [ "$DPBIT" ]; then - for name in $DPBIT_FUNCS; do - if [ "$libgcc_s_so" ]; then - out="libgcc/${dir}/${name}${objext}" - outS="libgcc/${dir}/${name}_s${objext}" - - echo $outS: $DPBIT $fpbit_c_dep - echo " $gcc_s_compile" -DFINE_GRAINED_LIBRARIES $flags -DL$name \ - -c $DPBIT -o $outS - - echo $out: $DPBIT $fpbit_c_dep - echo " $gcc_compile" -DFINE_GRAINED_LIBRARIES $flags -DL$name \ - '$(vis_hide)' -c $DPBIT -o $out - - echo $libgcc_a: $out - echo $libgcc_s_so: $outS - if [ "$SHLIB_MKMAP" ]; then - echo libgcc/${dir}/libgcc.map: $outS - fi - else - out="libgcc/${dir}/${name}${objext}" - echo $out: $DPBIT $fpbit_c_dep - echo " $gcc_compile" -DFINE_GRAINED_LIBRARIES $flags -DL$name \ - -c $DPBIT -o $out - - echo $libgcc_a: $out + for fpbit_var in FPBIT DPBIT TPBIT ; do + fpfuncs_var="${fpbit_var}_FUNCS" + eval fpbit=\$$fpbit_var + eval fpfuncs=\$$fpfuncs_var + + if [ "$fpbit" ] ; then + for name in $fpfuncs; do + if [ "$libgcc_s_so" ]; then + out="libgcc/${dir}/${name}${objext}" + outS="libgcc/${dir}/${name}_s${objext}" + + echo $outS: $fpbit $fpbit_c_dep + echo " $gcc_s_compile" -DFINE_GRAINED_LIBRARIES $flags -DL$name \ + -c $fpbit -o $outS + + echo $out: $fpbit $fpbit_c_dep + echo " $gcc_compile" -DFINE_GRAINED_LIBRARIES $flags -DL$name \ + '$(vis_hide)' -c $fpbit -o $out + + echo $libgcc_a: $out + echo $libgcc_s_so: $outS + if [ "$SHLIB_MKMAP" ]; then + echo libgcc/${dir}/libgcc.map: $outS + fi + else + out="libgcc/${dir}/${name}${objext}" + echo $out: $fpbit $fpbit_c_dep + echo " $gcc_compile" -DFINE_GRAINED_LIBRARIES $flags -DL$name \ + -c $fpbit -o $out + + echo $libgcc_a: $out + fi + done fi - done - fi - - if [ "$TPBIT" ]; then - for name in $TPBIT_FUNCS; do - if [ "$libgcc_s_so" ]; then - out="libgcc/${dir}/${name}${objext}" - outS="libgcc/${dir}/${name}_s${objext}" - - echo $outS: $TPBIT $fpbit_c_dep - echo " $gcc_s_compile" -DFINE_GRAINED_LIBRARIES $flags -DL$name \ - -c $TPBIT -o $outS - - echo $out: $TPBIT $fpbit_c_dep - echo " $gcc_compile" -DFINE_GRAINED_LIBRARIES $flags -DL$name \ - '$(vis_hide)' -c $TPBIT -o $out - - echo $libgcc_a: $out - echo $libgcc_s_so: $outS - if [ "$SHLIB_MKMAP" ]; then - echo libgcc/${dir}/libgcc.map: $outS - fi - else - out="libgcc/${dir}/${name}${objext}" - echo $out: $TPBIT $fpbit_c_dep - echo " $gcc_compile" -DFINE_GRAINED_LIBRARIES $flags -DL$name \ - -c $TPBIT -o $out - - echo $libgcc_a: $out - fi - done - fi + done for file in $LIB2ADD; do name=`echo $file | sed -e 's/[.][cS]$//' -e 's/[.]asm$//'` diff --git a/gcc/mode-classes.def b/gcc/mode-classes.def index 08f679ea78f..7fc7a9b3c80 100644 --- a/gcc/mode-classes.def +++ b/gcc/mode-classes.def @@ -25,6 +25,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA DEF_MODE_CLASS (MODE_INT), /* integer */ \ DEF_MODE_CLASS (MODE_PARTIAL_INT), /* integer with padding bits */ \ DEF_MODE_CLASS (MODE_FLOAT), /* floating point */ \ + DEF_MODE_CLASS (MODE_DECIMAL_FLOAT), /* decimal floating point */ \ DEF_MODE_CLASS (MODE_COMPLEX_INT), /* complex numbers */ \ DEF_MODE_CLASS (MODE_COMPLEX_FLOAT), \ DEF_MODE_CLASS (MODE_VECTOR_INT), /* SIMD vectors */ \ diff --git a/gcc/modulo-sched.c b/gcc/modulo-sched.c index ed06fc46620..a669bb87fdd 100644 --- a/gcc/modulo-sched.c +++ b/gcc/modulo-sched.c @@ -1,5 +1,5 @@ /* Swing Modulo Scheduling implementation. - Copyright (C) 2004, 2005 + Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc. Contributed by Ayal Zaks and Mustafa Hagog @@ -976,8 +976,11 @@ sms_schedule (FILE *dump_file) sched_init (NULL); /* Init Data Flow analysis, to be used in interloop dep calculation. */ - df = df_init (); - df_analyze (df, 0, DF_ALL); + df = df_init (DF_HARD_REGS | DF_EQUIV_NOTES | DF_SUBREGS); + df_rd_add_problem (df); + df_ru_add_problem (df); + df_chain_add_problem (df, DF_DU_CHAIN | DF_UD_CHAIN); + df_analyze (df); /* Allocate memory to hold the DDG array one entry for each loop. We use loop->num as index into this array. */ @@ -1091,6 +1094,7 @@ sms_schedule (FILE *dump_file) /* Release Data Flow analysis data structures. */ df_finish (df); + df = NULL; /* We don't want to perform SMS on new loops - created by versioning. */ num_loops = loops->num; @@ -2536,7 +2540,6 @@ rest_of_handle_sms (void) { #ifdef INSN_SCHEDULING basic_block bb; - sbitmap blocks; /* We want to be able to create new pseudos. */ no_new_pseudos = 0; @@ -2547,9 +2550,7 @@ rest_of_handle_sms (void) /* Update the life information, because we add pseudos. */ max_regno = max_reg_num (); allocate_reg_info (max_regno, FALSE, FALSE); - blocks = sbitmap_alloc (last_basic_block); - sbitmap_ones (blocks); - update_life_info (blocks, UPDATE_LIFE_GLOBAL_RM_NOTES, + update_life_info (NULL, UPDATE_LIFE_GLOBAL_RM_NOTES, (PROP_DEATH_NOTES | PROP_REG_INFO | PROP_KILL_DEAD_CODE diff --git a/gcc/objc/ChangeLog b/gcc/objc/ChangeLog index 7418b0bc69d..466ff50ca26 100644 --- a/gcc/objc/ChangeLog +++ b/gcc/objc/ChangeLog @@ -1,3 +1,30 @@ +2005-12-14 Andrew Pinski + + PR objc/25360 + * objc/objc-act.c (encode_type): Encode Complex types as 'j' followed + by the inner type. + +2005-12-12 Andrew Pinski + + PR objc/25348 + * objc-act.c (encode_array): Handle arrays to zero sized types. + +2005-12-07 Rafael Ávila de Espíndola + + * Make-lang.in (objc.all.build, objc.install-normal): Remove. + +2005-12-07 Rafael Ávila de Espíndola + + * Make-lang.in: Remove all dependencies on s-gtype. + +2005-12-02 Richard Guenther + + * objc-act.c (objc_build_exc_ptr, next_sjlj_build_enter_and_setjmp + next_sjlj_build_exc_extract, next_sjlj_build_catch_list, + next_sjlj_build_try_catch_finally, objc_begin_catch_clause, + build_objc_method_call, objc_rewrite_function_call): Use buildN + instead of build. + 2005-10-20 Geoffrey Keating * objc-act.c (synth_module_prologue): Clear TREE_NOTHROW @@ -5,7 +32,7 @@ 2005-10-17 Andreas Krebbel - * objc-act.c (objc_build_component_ref): Adjust call to + * objc-act.c (objc_build_component_ref): Adjust call to finish_class_member_access_expr due to a changed prototype. 2005-08-31 Andrew Pinski @@ -34,7 +61,7 @@ instead of build_constructor. 2005-07-08 Daniel Berlin - + * objc-act.c (objc_push_parm): DECL_ARG_TYPE_AS_WRITTEN is removed. * objc-act.h (KEYWORD_ARG_NAME): Use decl_non_common. @@ -339,7 +366,7 @@ * objc-act.c (objc_finish_file): In ObjC++ mode, set at_eof before calling instantiate_pending_templates. - + 2005-01-26 Alexander Malmberg PR objc/18862 @@ -415,7 +442,7 @@ (objc_types_are_equivalent): Check TYPE_HAS_OBJC_INFO(...) before accessing TYPE_OBJC_PROTOCOL_LIST. * objc-act.h (OBJC_INFO_SLOT_ELTS, TYPE_OBJC_INFO, INIT_TYPE_OBJC_INFO, - DUP_TYPE_OBJC_INFO, ALLOC_OBJC_TYPE_LANG_SPECIFIC, + DUP_TYPE_OBJC_INFO, ALLOC_OBJC_TYPE_LANG_SPECIFIC, SIZEOF_OBJC_TYPE_LANG_SPECIFIC): New macros. (TYPE_OBJC_INTERFACE): Replaces TREE_STATIC_INSTANCE and now points to an actual @interface; stored in TYPE_LANG_SPECIFIC(...). diff --git a/gcc/objc/Make-lang.in b/gcc/objc/Make-lang.in index ed22bd6c116..f9ba3d66a92 100644 --- a/gcc/objc/Make-lang.in +++ b/gcc/objc/Make-lang.in @@ -22,8 +22,8 @@ # 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.all.cross, foo.start.encap, foo.rest.encap, +# 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 @@ -81,13 +81,9 @@ objc/objc-act.o : objc/objc-act.c \ objc.srcextra: -gtype-objc.h : s-gtype ; @true -gt-objc-objc-act.h : s-gtype ; @true - # # Build hooks: -objc.all.build: objc.all.cross: objc.start.encap: objc.rest.encap: @@ -106,8 +102,6 @@ lang_checks += check-objc # Install hooks: # cc1obj is installed elsewhere as part of $(COMPILERS). -objc.install-normal: - objc.install-common: objc.install-man: diff --git a/gcc/objc/objc-act.c b/gcc/objc/objc-act.c index f889c22e767..526dec6144b 100644 --- a/gcc/objc/objc-act.c +++ b/gcc/objc/objc-act.c @@ -3485,7 +3485,7 @@ objc_build_exc_ptr (void) return var; } else - return build (EXC_PTR_EXPR, objc_object_type); + return build0 (EXC_PTR_EXPR, objc_object_type); } /* Build "objc_exception_try_exit(&_stack)". */ @@ -3533,10 +3533,10 @@ next_sjlj_build_enter_and_setjmp (void) t = tree_cons (NULL, t, NULL); sj = build_function_call (objc_setjmp_decl, t); - cond = build (COMPOUND_EXPR, TREE_TYPE (sj), enter, sj); + cond = build2 (COMPOUND_EXPR, TREE_TYPE (sj), enter, sj); cond = c_common_truthvalue_conversion (cond); - return build (COND_EXPR, void_type_node, cond, NULL, NULL); + return build3 (COND_EXPR, void_type_node, cond, NULL, NULL); } /* Build @@ -3552,7 +3552,7 @@ next_sjlj_build_exc_extract (tree decl) t = tree_cons (NULL, t, NULL); t = build_function_call (objc_exception_extract_decl, t); t = convert (TREE_TYPE (decl), t); - t = build (MODIFY_EXPR, void_type_node, decl, t); + t = build2 (MODIFY_EXPR, void_type_node, decl, t); return t; } @@ -3603,7 +3603,7 @@ next_sjlj_build_catch_list (void) t = build_function_call (objc_exception_match_decl, args); cond = c_common_truthvalue_conversion (t); } - t = build (COND_EXPR, void_type_node, cond, body, NULL); + t = build3 (COND_EXPR, void_type_node, cond, body, NULL); SET_EXPR_LOCUS (t, EXPR_LOCUS (stmt)); *last = t; @@ -3613,8 +3613,8 @@ next_sjlj_build_catch_list (void) if (!saw_id) { - t = build (MODIFY_EXPR, void_type_node, cur_try_context->rethrow_decl, - cur_try_context->caught_decl); + t = build2 (MODIFY_EXPR, void_type_node, cur_try_context->rethrow_decl, + cur_try_context->caught_decl); SET_EXPR_LOCATION (t, cur_try_context->end_catch_locus); append_to_statement_list (t, last); @@ -3679,18 +3679,18 @@ next_sjlj_build_try_catch_finally (void) TREE_CHAIN (rethrow_decl) = stack_decl; /* Build the outermost variable binding level. */ - bind = build (BIND_EXPR, void_type_node, rethrow_decl, NULL, NULL); + bind = build3 (BIND_EXPR, void_type_node, rethrow_decl, NULL, NULL); SET_EXPR_LOCATION (bind, cur_try_context->try_locus); TREE_SIDE_EFFECTS (bind) = 1; /* Initialize rethrow_decl. */ - t = build (MODIFY_EXPR, void_type_node, rethrow_decl, - convert (objc_object_type, null_pointer_node)); + t = build2 (MODIFY_EXPR, void_type_node, rethrow_decl, + convert (objc_object_type, null_pointer_node)); SET_EXPR_LOCATION (t, cur_try_context->try_locus); append_to_statement_list (t, &BIND_EXPR_BODY (bind)); /* Build the outermost TRY_FINALLY_EXPR. */ - try_fin = build (TRY_FINALLY_EXPR, void_type_node, NULL, NULL); + try_fin = build2 (TRY_FINALLY_EXPR, void_type_node, NULL, NULL); SET_EXPR_LOCATION (try_fin, cur_try_context->try_locus); TREE_SIDE_EFFECTS (try_fin) = 1; append_to_statement_list (try_fin, &BIND_EXPR_BODY (bind)); @@ -3824,7 +3824,7 @@ objc_begin_catch_clause (tree decl) /* Initialize the decl from the EXC_PTR_EXPR we get from the runtime. */ t = objc_build_exc_ptr (); t = convert (TREE_TYPE (decl), t); - t = build (MODIFY_EXPR, void_type_node, decl, t); + t = build2 (MODIFY_EXPR, void_type_node, decl, t); add_stmt (t); } @@ -6540,7 +6540,7 @@ build_objc_method_call (int super_flag, tree method_prototype, /* ??? Selector is not at this point something we can use inside the compiler itself. Set it to garbage for the nonce. */ - t = build (OBJ_TYPE_REF, sender_cast, method, lookup_object, size_zero_node); + t = build3 (OBJ_TYPE_REF, sender_cast, method, lookup_object, size_zero_node); return build_function_call (t, method_params); } @@ -7920,9 +7920,12 @@ encode_array (tree type, int curtype, int format) return; } - sprintf (buffer, "[" HOST_WIDE_INT_PRINT_DEC, - (TREE_INT_CST_LOW (an_int_cst) - / TREE_INT_CST_LOW (TYPE_SIZE (array_of)))); + if (TREE_INT_CST_LOW (TYPE_SIZE (array_of)) == 0) + sprintf (buffer, "[" HOST_WIDE_INT_PRINT_DEC, (HOST_WIDE_INT)0); + else + sprintf (buffer, "[" HOST_WIDE_INT_PRINT_DEC, + TREE_INT_CST_LOW (an_int_cst) + / TREE_INT_CST_LOW (TYPE_SIZE (array_of))); obstack_grow (&util_obstack, buffer, strlen (buffer)); encode_type (array_of, curtype, format); @@ -8116,6 +8119,12 @@ encode_type (tree type, int curtype, int format) else if (code == FUNCTION_TYPE) /* '?' */ obstack_1grow (&util_obstack, '?'); + + else if (code == COMPLEX_TYPE) + { + obstack_1grow (&util_obstack, 'j'); + encode_type (TREE_TYPE (type), curtype, format); + } } static void @@ -9428,9 +9437,9 @@ objc_rewrite_function_call (tree function, tree params) && TREE_CODE (TREE_OPERAND (TREE_OPERAND (function, 0), 0)) == FUNCTION_DECL) { - function = build (OBJ_TYPE_REF, TREE_TYPE (function), - TREE_OPERAND (function, 0), - TREE_VALUE (params), size_zero_node); + function = build3 (OBJ_TYPE_REF, TREE_TYPE (function), + TREE_OPERAND (function, 0), + TREE_VALUE (params), size_zero_node); } return function; diff --git a/gcc/objcp/ChangeLog b/gcc/objcp/ChangeLog index c89d3be736f..676245c43f0 100644 --- a/gcc/objcp/ChangeLog +++ b/gcc/objcp/ChangeLog @@ -1,3 +1,15 @@ +2005-12-14 Andrew Pinski + + * Make-lang.in (objcp/objcp-decl.o): Add depends on $(EXPR_H). + +2005-12-07 Rafael Ávila de Espíndola + + * Make-lang.in (obj-c++.all.build, obj-c++.install-normal): Remove. + +2005-12-07 Rafael Ávila de Espíndola + + * Make-lang.in: Remove all dependencies on s-gtype. + 2005-11-22 Andrew Pinski * objcp-decl.c (objcp_lookup_name): Remove. diff --git a/gcc/objcp/Make-lang.in b/gcc/objcp/Make-lang.in index f2057289742..ef04ebbac4f 100644 --- a/gcc/objcp/Make-lang.in +++ b/gcc/objcp/Make-lang.in @@ -22,8 +22,8 @@ # 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.all.cross, foo.start.encap, foo.rest.encap, +# 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 @@ -75,7 +75,7 @@ objcp/objcp-lang.o : objcp/objcp-lang.c \ objcp/objcp-decl.o : objcp/objcp-decl.c \ $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) $(C_TREE_H) \ toplev.h $(GGC_H) c-pragma.h input.h flags.h output.h objc/objc-act.h \ - objcp/objcp-decl.h tree-gimple.h + objcp/objcp-decl.h tree-gimple.h $(EXPR_H) # The following must be an explicit rule; please keep in sync with the implicit # one in Makefile.in. @@ -89,12 +89,9 @@ objcp/objcp-act.o : objc/objc-act.c \ po-generated: -gtype-objcp.h : s-gtype ; @true - # # Build hooks: -obj-c++.all.build: obj-c++.all.cross: obj-c++.start.encap: obj-c++.rest.encap: @@ -113,8 +110,6 @@ lang_checks += check-obj-c++ # Install hooks: # cc1objplus is installed elsewhere as part of $(COMPILERS). -obj-c++.install-normal: - obj-c++.install-common: obj-c++.install-man: diff --git a/gcc/optabs.c b/gcc/optabs.c index 9b90d4701d0..5a87ac0335a 100644 --- a/gcc/optabs.c +++ b/gcc/optabs.c @@ -1,6 +1,6 @@ /* Expand the basic unary and binary arithmetic operations, for GNU compiler. Copyright (C) 1987, 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998, - 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. + 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This file is part of GCC. @@ -427,9 +427,14 @@ simplify_expand_binop (enum machine_mode mode, optab binoptab, enum optab_methods methods) { if (CONSTANT_P (op0) && CONSTANT_P (op1)) - return simplify_gen_binary (binoptab->code, mode, op0, op1); - else - return expand_binop (mode, binoptab, op0, op1, target, unsignedp, methods); + { + rtx x = simplify_binary_operation (binoptab->code, mode, op0, op1); + + if (x) + return x; + } + + return expand_binop (mode, binoptab, op0, op1, target, unsignedp, methods); } /* Like simplify_expand_binop, but always put the result in TARGET. @@ -998,6 +1003,30 @@ expand_simple_binop (enum machine_mode mode, enum rtx_code code, rtx op0, return expand_binop (mode, binop, op0, op1, target, unsignedp, methods); } +/* Return whether OP0 and OP1 should be swapped when expanding a commutative + binop. Order them according to commutative_operand_precedence and, if + possible, try to put TARGET or a pseudo first. */ +static bool +swap_commutative_operands_with_target (rtx target, rtx op0, rtx op1) +{ + int op0_prec = commutative_operand_precedence (op0); + int op1_prec = commutative_operand_precedence (op1); + + if (op0_prec < op1_prec) + return true; + + if (op0_prec > op1_prec) + return false; + + /* With equal precedence, both orders are ok, but it is better if the + first operand is TARGET, or if both TARGET and OP0 are pseudos. */ + if (target == 0 || REG_P (target)) + return (REG_P (op1) && !REG_P (op0)) || target == op1; + else + return rtx_equal_p (op1, target); +} + + /* Generate code to perform an operation specified by BINOPTAB on operands OP0 and OP1, with result having machine-mode MODE. @@ -1073,12 +1102,7 @@ expand_binop (enum machine_mode mode, optab binoptab, rtx op0, rtx op1, { commutative_op = 1; - if (((target == 0 || REG_P (target)) - ? ((REG_P (op1) - && !REG_P (op0)) - || target == op1) - : rtx_equal_p (op1, target)) - || GET_CODE (op0) == CONST_INT) + if (swap_commutative_operands_with_target (target, op0, op1)) { temp = op1; op1 = op0; @@ -1192,7 +1216,8 @@ expand_binop (enum machine_mode mode, optab binoptab, rtx op0, rtx op1, /* If this is a multiply, see if we can do a widening operation that takes operands of this mode and makes a wider mode. */ - if (binoptab == smul_optab && GET_MODE_WIDER_MODE (mode) != VOIDmode + if (binoptab == smul_optab + && GET_MODE_WIDER_MODE (mode) != VOIDmode && (((unsignedp ? umul_widen_optab : smul_widen_optab) ->handlers[(int) GET_MODE_WIDER_MODE (mode)].insn_code) != CODE_FOR_nothing)) @@ -1216,9 +1241,10 @@ expand_binop (enum machine_mode mode, optab binoptab, rtx op0, rtx op1, can open-code the operation. Check for a widening multiply at the wider mode as well. */ - if ((class == MODE_INT || class == MODE_FLOAT || class == MODE_COMPLEX_FLOAT) + if (CLASS_HAS_WIDER_MODES_P (class) && methods != OPTAB_DIRECT && methods != OPTAB_LIB) - for (wider_mode = GET_MODE_WIDER_MODE (mode); wider_mode != VOIDmode; + for (wider_mode = GET_MODE_WIDER_MODE (mode); + wider_mode != VOIDmode; wider_mode = GET_MODE_WIDER_MODE (wider_mode)) { if (binoptab->handlers[(int) wider_mode].insn_code != CODE_FOR_nothing @@ -1399,7 +1425,7 @@ expand_binop (enum machine_mode mode, optab binoptab, rtx op0, rtx op1, && ashl_optab->handlers[(int) word_mode].insn_code != CODE_FOR_nothing && lshr_optab->handlers[(int) word_mode].insn_code != CODE_FOR_nothing) { - rtx insns, equiv_value; + rtx insns; rtx into_target, outof_target; rtx into_input, outof_input; rtx inter; @@ -1499,20 +1525,12 @@ expand_binop (enum machine_mode mode, optab binoptab, rtx op0, rtx op1, if (inter != 0) { - if (binoptab->code != UNKNOWN) - equiv_value = gen_rtx_fmt_ee (binoptab->code, mode, op0, op1); - else - equiv_value = 0; - - /* We can't make this a no conflict block if this is a word swap, - because the word swap case fails if the input and output values - are in the same register. */ - if (shift_count != BITS_PER_WORD) - emit_no_conflict_block (insns, target, op0, op1, equiv_value); - else - emit_insn (insns); - - + /* One may be tempted to wrap the insns in a REG_NO_CONFLICT + block to help the register allocator a bit. But a multi-word + rotate will need all the input bits when setting the output + bits, so there clearly is a conflict between the input and + output registers. So we can't use a no-conflict block here. */ + emit_insn (insns); return target; } } @@ -1747,9 +1765,10 @@ expand_binop (enum machine_mode mode, optab binoptab, rtx op0, rtx op1, /* Look for a wider mode of the same class for which it appears we can do the operation. */ - if (class == MODE_INT || class == MODE_FLOAT || class == MODE_COMPLEX_FLOAT) + if (CLASS_HAS_WIDER_MODES_P (class)) { - for (wider_mode = GET_MODE_WIDER_MODE (mode); wider_mode != VOIDmode; + for (wider_mode = GET_MODE_WIDER_MODE (mode); + wider_mode != VOIDmode; wider_mode = GET_MODE_WIDER_MODE (wider_mode)) { if ((binoptab->handlers[(int) wider_mode].insn_code @@ -1921,9 +1940,10 @@ expand_twoval_unop (optab unoptab, rtx op0, rtx targ0, rtx targ1, /* It can't be done in this mode. Can we do it in a wider mode? */ - if (class == MODE_INT || class == MODE_FLOAT || class == MODE_COMPLEX_FLOAT) + if (CLASS_HAS_WIDER_MODES_P (class)) { - for (wider_mode = GET_MODE_WIDER_MODE (mode); wider_mode != VOIDmode; + for (wider_mode = GET_MODE_WIDER_MODE (mode); + wider_mode != VOIDmode; wider_mode = GET_MODE_WIDER_MODE (wider_mode)) { if (unoptab->handlers[(int) wider_mode].insn_code @@ -2043,9 +2063,10 @@ expand_twoval_binop (optab binoptab, rtx op0, rtx op1, rtx targ0, rtx targ1, /* It can't be done in this mode. Can we do it in a wider mode? */ - if (class == MODE_INT || class == MODE_FLOAT || class == MODE_COMPLEX_FLOAT) + if (CLASS_HAS_WIDER_MODES_P (class)) { - for (wider_mode = GET_MODE_WIDER_MODE (mode); wider_mode != VOIDmode; + for (wider_mode = GET_MODE_WIDER_MODE (mode); + wider_mode != VOIDmode; wider_mode = GET_MODE_WIDER_MODE (wider_mode)) { if (binoptab->handlers[(int) wider_mode].insn_code @@ -2142,10 +2163,11 @@ static rtx widen_clz (enum machine_mode mode, rtx op0, rtx target) { enum mode_class class = GET_MODE_CLASS (mode); - if (class == MODE_INT || class == MODE_FLOAT || class == MODE_COMPLEX_FLOAT) + if (CLASS_HAS_WIDER_MODES_P (class)) { enum machine_mode wider_mode; - for (wider_mode = GET_MODE_WIDER_MODE (mode); wider_mode != VOIDmode; + for (wider_mode = GET_MODE_WIDER_MODE (mode); + wider_mode != VOIDmode; wider_mode = GET_MODE_WIDER_MODE (wider_mode)) { if (clz_optab->handlers[(int) wider_mode].insn_code @@ -2180,7 +2202,7 @@ static rtx expand_parity (enum machine_mode mode, rtx op0, rtx target) { enum mode_class class = GET_MODE_CLASS (mode); - if (class == MODE_INT || class == MODE_FLOAT || class == MODE_COMPLEX_FLOAT) + if (CLASS_HAS_WIDER_MODES_P (class)) { enum machine_mode wider_mode; for (wider_mode = mode; wider_mode != VOIDmode; @@ -2412,8 +2434,9 @@ expand_unop (enum machine_mode mode, optab unoptab, rtx op0, rtx target, goto try_libcall; } - if (class == MODE_INT || class == MODE_FLOAT || class == MODE_COMPLEX_FLOAT) - for (wider_mode = GET_MODE_WIDER_MODE (mode); wider_mode != VOIDmode; + if (CLASS_HAS_WIDER_MODES_P (class)) + for (wider_mode = GET_MODE_WIDER_MODE (mode); + wider_mode != VOIDmode; wider_mode = GET_MODE_WIDER_MODE (wider_mode)) { if (unoptab->handlers[(int) wider_mode].insn_code != CODE_FOR_nothing) @@ -2551,9 +2574,10 @@ expand_unop (enum machine_mode mode, optab unoptab, rtx op0, rtx target, /* It can't be done in this mode. Can we do it in a wider mode? */ - if (class == MODE_INT || class == MODE_FLOAT || class == MODE_COMPLEX_FLOAT) + if (CLASS_HAS_WIDER_MODES_P (class)) { - for (wider_mode = GET_MODE_WIDER_MODE (mode); wider_mode != VOIDmode; + for (wider_mode = GET_MODE_WIDER_MODE (mode); + wider_mode != VOIDmode; wider_mode = GET_MODE_WIDER_MODE (wider_mode)) { if ((unoptab->handlers[(int) wider_mode].insn_code @@ -3416,9 +3440,6 @@ prepare_cmp_insn (rtx *px, rtx *py, enum rtx_code *pcomparison, rtx size, enum machine_mode mode = *pmode; rtx x = *px, y = *py; int unsignedp = *punsignedp; - enum mode_class class; - - class = GET_MODE_CLASS (mode); /* If we are inside an appropriately-short loop and we are optimizing, force expensive constants into a register. */ @@ -3523,7 +3544,7 @@ prepare_cmp_insn (rtx *px, rtx *py, enum rtx_code *pcomparison, rtx size, /* Handle a lib call just for the mode we are using. */ - if (cmp_optab->handlers[(int) mode].libfunc && class != MODE_FLOAT) + if (cmp_optab->handlers[(int) mode].libfunc && !SCALAR_FLOAT_MODE_P (mode)) { rtx libfunc = cmp_optab->handlers[(int) mode].libfunc; rtx result; @@ -3636,8 +3657,7 @@ emit_cmp_and_jump_insn_1 (rtx x, rtx y, enum machine_mode mode, return; } - if (class != MODE_INT && class != MODE_FLOAT - && class != MODE_COMPLEX_FLOAT) + if (!CLASS_HAS_WIDER_MODES_P (class)) break; wider_mode = GET_MODE_WIDER_MODE (wider_mode); @@ -3723,7 +3743,9 @@ prepare_float_lib_cmp (rtx *px, rtx *py, enum rtx_code *pcomparison, rtx libfunc = 0; bool reversed_p = false; - for (mode = orig_mode; mode != VOIDmode; mode = GET_MODE_WIDER_MODE (mode)) + for (mode = orig_mode; + mode != VOIDmode; + mode = GET_MODE_WIDER_MODE (mode)) { if ((libfunc = code_to_optab[comparison]->handlers[mode].libfunc)) break; @@ -4358,9 +4380,10 @@ expand_float (rtx to, rtx from, int unsignedp) } } - /* Unsigned integer, and no way to convert directly. - Convert as signed, then conditionally adjust the result. */ - if (unsignedp && can_do_signed) + /* Unsigned integer, and no way to convert directly. For binary + floating point modes, convert as signed, then conditionally adjust + the result. */ + if (unsignedp && can_do_signed && !DECIMAL_FLOAT_MODE_P (GET_MODE (to))) { rtx label = gen_label_rtx (); rtx temp; @@ -4820,6 +4843,8 @@ static void init_floating_libfuncs (optab optable, const char *opname, int suffix) { init_libfuncs (optable, MIN_MODE_FLOAT, MAX_MODE_FLOAT, opname, suffix); + init_libfuncs (optable, MIN_MODE_DECIMAL_FLOAT, MAX_MODE_DECIMAL_FLOAT, + opname, suffix); } /* Initialize the libfunc fields of an entire group of entries of an @@ -5166,9 +5191,7 @@ init_optabs (void) sync_lock_test_and_set[i] = CODE_FOR_nothing; sync_lock_release[i] = CODE_FOR_nothing; -#ifdef HAVE_SECONDARY_RELOADS reload_in_optab[i] = reload_out_optab[i] = CODE_FOR_nothing; -#endif } /* Fill in the optabs with the insns we support. */ @@ -5239,16 +5262,32 @@ init_optabs (void) /* Conversions. */ init_interclass_conv_libfuncs (sfloat_optab, "float", MODE_INT, MODE_FLOAT); + init_interclass_conv_libfuncs (sfloat_optab, "float", + MODE_INT, MODE_DECIMAL_FLOAT); init_interclass_conv_libfuncs (ufloat_optab, "floatun", MODE_INT, MODE_FLOAT); + init_interclass_conv_libfuncs (ufloat_optab, "floatun", + MODE_INT, MODE_DECIMAL_FLOAT); init_interclass_conv_libfuncs (sfix_optab, "fix", MODE_FLOAT, MODE_INT); + init_interclass_conv_libfuncs (sfix_optab, "fix", + MODE_DECIMAL_FLOAT, MODE_INT); init_interclass_conv_libfuncs (ufix_optab, "fixuns", MODE_FLOAT, MODE_INT); + init_interclass_conv_libfuncs (ufix_optab, "fixuns", + MODE_DECIMAL_FLOAT, MODE_INT); + init_interclass_conv_libfuncs (ufloat_optab, "floatuns", + MODE_INT, MODE_DECIMAL_FLOAT); /* sext_optab is also used for FLOAT_EXTEND. */ init_intraclass_conv_libfuncs (sext_optab, "extend", MODE_FLOAT, true); + init_intraclass_conv_libfuncs (sext_optab, "extend", MODE_DECIMAL_FLOAT, true); + init_interclass_conv_libfuncs (sext_optab, "extend", MODE_FLOAT, MODE_DECIMAL_FLOAT); + init_interclass_conv_libfuncs (sext_optab, "extend", MODE_DECIMAL_FLOAT, MODE_FLOAT); init_intraclass_conv_libfuncs (trunc_optab, "trunc", MODE_FLOAT, false); + init_intraclass_conv_libfuncs (trunc_optab, "trunc", MODE_DECIMAL_FLOAT, false); + init_interclass_conv_libfuncs (trunc_optab, "trunc", MODE_FLOAT, MODE_DECIMAL_FLOAT); + init_interclass_conv_libfuncs (trunc_optab, "trunc", MODE_DECIMAL_FLOAT, MODE_FLOAT); /* Use cabs for double complex abs, since systems generally have cabs. Don't define any libcall for float complex, so that cabs will be used. */ @@ -5534,13 +5573,13 @@ expand_vec_cond_expr (tree vec_cond_expr, rtx target) cc_op1 = XEXP (comparison, 1); /* Expand both operands and force them in reg, if required. */ rtx_op1 = expand_expr (TREE_OPERAND (vec_cond_expr, 1), - NULL_RTX, VOIDmode, 1); + NULL_RTX, VOIDmode, EXPAND_NORMAL); if (!insn_data[icode].operand[1].predicate (rtx_op1, mode) && mode != VOIDmode) rtx_op1 = force_reg (mode, rtx_op1); rtx_op2 = expand_expr (TREE_OPERAND (vec_cond_expr, 2), - NULL_RTX, VOIDmode, 1); + NULL_RTX, VOIDmode, EXPAND_NORMAL); if (!insn_data[icode].operand[2].predicate (rtx_op2, mode) && mode != VOIDmode) rtx_op2 = force_reg (mode, rtx_op2); diff --git a/gcc/opts.c b/gcc/opts.c index 06994b11027..e06367fabfd 100644 --- a/gcc/opts.c +++ b/gcc/opts.c @@ -676,7 +676,8 @@ decode_options (unsigned int argc, const char **argv) /* The optimization to partition hot and cold basic blocks into separate sections of the .o and executable files does not work (currently) - with exception handling. If flag_exceptions is turned on we need to + with exception handling. This is because there is no support for + generating unwind info. If flag_exceptions is turned on we need to turn off the partitioning optimization. */ if (flag_exceptions && flag_reorder_blocks_and_partition) @@ -687,8 +688,24 @@ decode_options (unsigned int argc, const char **argv) flag_reorder_blocks = 1; } + /* If user requested unwind info, then turn off the partitioning + optimization. */ + + if (flag_unwind_tables && ! targetm.unwind_tables_default + && flag_reorder_blocks_and_partition) + { + inform ("-freorder-blocks-and-partition does not support unwind info"); + flag_reorder_blocks_and_partition = 0; + flag_reorder_blocks = 1; + } + + /* If the target requested unwind info, then turn off the partitioning + optimization with a different message. Likewise, if the target does not + support named sections. */ + if (flag_reorder_blocks_and_partition - && !targetm.have_named_sections) + && (!targetm.have_named_sections + || (flag_unwind_tables && targetm.unwind_tables_default))) { inform ("-freorder-blocks-and-partition does not work on this architecture"); diff --git a/gcc/output.h b/gcc/output.h index 3cb091fcf93..d4fad194bb5 100644 --- a/gcc/output.h +++ b/gcc/output.h @@ -23,9 +23,6 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA #ifndef GCC_OUTPUT_H #define GCC_OUTPUT_H -/* Compute branch alignments based on frequency information in the CFG. */ -extern void compute_alignments (void); - /* Initialize data in final at the beginning of a compilation. */ extern void init_final (const char *); @@ -153,77 +150,6 @@ extern int regno_clobbered_at_setjmp (int); /* Functions in varasm.c. */ -/* Tell assembler to switch to text section. */ -extern void text_section (void); - -/* Tell assembler to switch to unlikely-to-be-executed text section. */ -extern void unlikely_text_section (void); - -/* Tell assembler to switch to data section. */ -extern void data_section (void); - -/* Tell assembler to switch to read-only data section. This is normally - the text section. */ -extern void readonly_data_section (void); - -/* Determine if we're in the text section. */ -extern int in_text_section (void); - -/* Determine if we're in the unlikely-to-be-executed text section. */ -extern int in_unlikely_text_section (void); - -#ifdef CTORS_SECTION_ASM_OP -extern void ctors_section (void); -#endif - -#ifdef DTORS_SECTION_ASM_OP -extern void dtors_section (void); -#endif - -#ifdef BSS_SECTION_ASM_OP -extern void bss_section (void); -#endif - -#ifdef INIT_SECTION_ASM_OP -extern void init_section (void); -#endif - -#ifdef FINI_SECTION_ASM_OP -extern void fini_section (void); -#endif - -#ifdef EXPORTS_SECTION_ASM_OP -extern void exports_section (void); -#endif - -#ifdef DRECTVE_SECTION_ASM_OP -extern void drectve_section (void); -#endif - -#ifdef SDATA_SECTION_ASM_OP -extern void sdata_section (void); -#endif - -/* Tell assembler to change to section NAME for DECL. - If DECL is NULL, just switch to section NAME. - If NAME is NULL, get the name from DECL. - If RELOC is 1, the initializer for DECL contains relocs. */ -extern void named_section (tree, const char *, int); - -/* Tell assembler to switch to the section for function DECL. */ -extern void function_section (tree); - -/* Tell assembler to switch to the most recently used text section. */ -extern void current_function_section (tree); - -/* Tell assembler to switch to the section for string merging. */ -extern void mergeable_string_section (tree, unsigned HOST_WIDE_INT, - unsigned int); - -/* Tell assembler to switch to the section for constant merging. */ -extern void mergeable_constant_section (enum machine_mode, - unsigned HOST_WIDE_INT, unsigned int); - /* Declare DECL to be a weak symbol. */ extern void declare_weak (tree); /* Merge weak status. */ @@ -438,27 +364,6 @@ extern rtx this_is_asm_operands; extern int size_directive_output; extern tree last_assemble_variable_decl; -enum in_section { no_section, in_text, in_unlikely_executed_text, in_data, - in_named -#ifdef BSS_SECTION_ASM_OP - , in_bss -#endif -#ifdef CTORS_SECTION_ASM_OP - , in_ctors -#endif -#ifdef DTORS_SECTION_ASM_OP - , in_dtors -#endif -#ifdef READONLY_DATA_SECTION_ASM_OP - , in_readonly_data -#endif -#ifdef EXTRA_SECTIONS - , EXTRA_SECTIONS -#endif -}; - -extern const char *last_text_section_name; -extern enum in_section last_text_section; extern bool first_function_block_is_cold; /* Decide whether DECL needs to be in a writable section. @@ -476,14 +381,6 @@ extern const char *user_label_prefix; /* Default target function prologue and epilogue assembler output. */ extern void default_function_pro_epilogue (FILE *, HOST_WIDE_INT); -/* Tell assembler to switch to the section for the exception table. */ -extern void default_exception_section (void); - -/* Tell assembler to switch to the section for the EH frames. */ -extern void named_section_eh_frame_section (void); -extern void collect2_eh_frame_section (void); -extern void default_eh_frame_section (void); - /* Default target hook that outputs nothing to a stream. */ extern void no_asm_to_stream (FILE *); @@ -502,7 +399,9 @@ extern void no_asm_to_stream (FILE *); #define SECTION_OVERRIDE 0x20000 /* allow override of default flags */ #define SECTION_TLS 0x40000 /* contains thread-local storage */ #define SECTION_NOTYPE 0x80000 /* don't output @progbits */ -#define SECTION_MACH_DEP 0x100000 /* subsequent bits reserved for target */ +#define SECTION_DECLARED 0x100000 /* section has been used */ +#define SECTION_NAMED 0x200000 /* section has a name */ +#define SECTION_MACH_DEP 0x400000 /* subsequent bits reserved for target */ /* A helper function for default_elf_select_section and default_elf_unique_section. Categorizes the DECL. */ @@ -541,12 +440,79 @@ enum section_category SECCAT_TBSS }; +/* Information that is provided by all instances of the section type. */ +struct section_common GTY(()) { + /* The set of SECTION_* flags that apply to this section. */ + unsigned int flags; +}; + +/* Information that is provided by named sections. */ +struct named_section GTY(()) { + struct section_common common; + + /* The name of the section. */ + const char *name; + + /* If nonnull, the VAR_DECL or FUNCTION_DECL with which the + section is associated. */ + tree decl; +}; + +/* A callback that writes the assembly code for switching to an unnamed + section. The argument provides callback-specific data. */ +typedef void (*unnamed_section_callback) (const void *); + +/* Information that is provided by unnamed sections. */ +struct unnamed_section GTY(()) { + struct section_common common; + + /* The callback used to switch to the section, and the data that + should be passed to the callback. */ + unnamed_section_callback GTY ((skip)) callback; + const void *GTY ((skip)) data; + + /* The next entry in the chain of unnamed sections. */ + section *next; +}; + +/* Information about a section, which may be named or unnamed. */ +union section GTY ((desc ("(%h).common.flags & SECTION_NAMED"))) +{ + struct section_common GTY ((skip)) common; + struct named_section GTY ((tag ("SECTION_NAMED"))) named; + struct unnamed_section GTY ((tag ("0"))) unnamed; +}; + +/* Special well-known sections. */ +extern GTY(()) section *text_section; +extern GTY(()) section *data_section; +extern GTY(()) section *readonly_data_section; +extern GTY(()) section *sdata_section; +extern GTY(()) section *ctors_section; +extern GTY(()) section *dtors_section; +extern GTY(()) section *bss_section; +extern GTY(()) section *sbss_section; +extern GTY(()) section *exception_section; +extern GTY(()) section *eh_frame_section; + +extern GTY(()) section *in_section; +extern GTY(()) bool in_cold_section_p; + +extern section *get_unnamed_section (unsigned int, void (*) (const void *), + const void *); +extern section *get_section (const char *, unsigned int, tree); +extern section *get_named_section (tree, const char *, int); +extern section *mergeable_constant_section (enum machine_mode, + unsigned HOST_WIDE_INT, + unsigned int); +extern section *function_section (tree); +extern section *unlikely_text_section (void); +extern section *current_function_section (void); + +extern bool unlikely_text_section_p (section *); +extern void switch_to_section (section *); +extern void output_section_asm_op (const void *); -extern bool set_named_section_flags (const char *, unsigned int); -#define named_section_flags(NAME, FLAGS) \ - named_section_real((NAME), (FLAGS), /*decl=*/NULL_TREE) -extern void named_section_real (const char *, unsigned int, tree); -extern bool named_section_first_declaration (const char *); extern unsigned int default_section_type_flags (tree, const char *, int); extern unsigned int default_section_type_flags_1 (tree, const char *, int, int); @@ -563,24 +529,28 @@ extern void default_stabs_asm_out_constructor (rtx, int); extern void default_named_section_asm_out_constructor (rtx, int); extern void default_ctor_section_asm_out_constructor (rtx, int); -extern void default_select_section (tree, int, unsigned HOST_WIDE_INT); -extern void default_elf_select_section (tree, int, unsigned HOST_WIDE_INT); -extern void default_elf_select_section_1 (tree, int, - unsigned HOST_WIDE_INT, int); +extern section *default_select_section (tree, int, + unsigned HOST_WIDE_INT); +extern section *default_elf_select_section (tree, int, + unsigned HOST_WIDE_INT); +extern section *default_elf_select_section_1 (tree, int, + unsigned HOST_WIDE_INT, + int); extern void default_unique_section (tree, int); extern void default_unique_section_1 (tree, int, int); -extern void default_function_rodata_section (tree); -extern void default_no_function_rodata_section (tree); -extern void default_select_rtx_section (enum machine_mode, rtx, - unsigned HOST_WIDE_INT); -extern void default_elf_select_rtx_section (enum machine_mode, rtx, +extern section *default_function_rodata_section (tree); +extern section *default_no_function_rodata_section (tree); +extern section *default_select_rtx_section (enum machine_mode, rtx, unsigned HOST_WIDE_INT); +extern section *default_elf_select_rtx_section (enum machine_mode, rtx, + unsigned HOST_WIDE_INT); extern void default_encode_section_info (tree, rtx, int); extern const char *default_strip_name_encoding (const char *); extern bool default_binds_local_p (tree); extern bool default_binds_local_p_1 (tree, int); extern void default_globalize_label (FILE *, const char *); extern void default_emit_unwind_label (FILE *, tree, int, int); +extern void default_emit_except_table_label (FILE *); extern void default_internal_label (FILE *, const char *, unsigned long); extern void default_file_start (void); extern void file_end_indicate_exec_stack (void); diff --git a/gcc/params.def b/gcc/params.def index f585c39dd98..33fa4441cde 100644 --- a/gcc/params.def +++ b/gcc/params.def @@ -47,7 +47,14 @@ DEFPARAM (PARAM_SALIAS_MAX_IMPLICIT_FIELDS, "salias-max-implicit-fields", "The maximum number of fields in a structure variable without direct structure accesses that GCC will attempt to track separately", 5, 0, 0) - + +/* The maximum number of array elements structure aliasing will decompose + an array for. The default is 4. */ +DEFPARAM (PARAM_SALIAS_MAX_ARRAY_ELEMENTS, + "salias-max-array-elements", + "The maximum number of elements in an array for wich we track its elements separately", + 4, 0, 0) + /* The maximum structure size at which the scalar replacement of aggregates (SRA) pass will perform block copies. The default value, 0, implies that GCC will select the most appropriate size @@ -321,7 +328,7 @@ DEFPARAM(HOT_BB_FREQUENCY_FRACTION, the other loops cold that is not usually the case. So we need to artificially flatten the profile. - We need to cut the maximal predicted iterations to large enought iterations + We need to cut the maximal predicted iterations to large enough iterations so the loop appears important, but safely within HOT_BB_COUNT_FRACTION range. */ diff --git a/gcc/params.h b/gcc/params.h index 6c9f7d6cca3..f64193982b4 100644 --- a/gcc/params.h +++ b/gcc/params.h @@ -91,6 +91,8 @@ typedef enum compiler_param /* Macros for the various parameters. */ #define SALIAS_MAX_IMPLICIT_FIELDS \ PARAM_VALUE (PARAM_SALIAS_MAX_IMPLICIT_FIELDS) +#define SALIAS_MAX_ARRAY_ELEMENTS \ + PARAM_VALUE (PARAM_SALIAS_MAX_ARRAY_ELEMENTS) #define SRA_MAX_STRUCTURE_SIZE \ PARAM_VALUE (PARAM_SRA_MAX_STRUCTURE_SIZE) #define SRA_MAX_STRUCTURE_COUNT \ diff --git a/gcc/passes.c b/gcc/passes.c index 517617ee365..690cc9a957e 100644 --- a/gcc/passes.c +++ b/gcc/passes.c @@ -508,7 +508,6 @@ init_optimization_passes (void) NEXT_PASS (pass_all_early_optimizations); NEXT_PASS (pass_may_alias); NEXT_PASS (pass_return_slot); - NEXT_PASS (pass_eliminate_useless_stores); /* Initial scalar cleanups. */ NEXT_PASS (pass_ccp); @@ -548,6 +547,7 @@ init_optimization_passes (void) propagate away the degenerate PHI nodes. */ NEXT_PASS (pass_phi_only_copy_prop); + NEXT_PASS (pass_reassoc); NEXT_PASS (pass_dce); NEXT_PASS (pass_dse); NEXT_PASS (pass_may_alias); @@ -561,12 +561,13 @@ init_optimization_passes (void) we add may_alias right after fold builtins which can create arbitrary GIMPLE. */ NEXT_PASS (pass_may_alias); - NEXT_PASS (pass_cse_reciprocals); NEXT_PASS (pass_split_crit_edges); - NEXT_PASS (pass_reassoc); NEXT_PASS (pass_pre); + NEXT_PASS (pass_may_alias); NEXT_PASS (pass_sink_code); NEXT_PASS (pass_tree_loop); + NEXT_PASS (pass_cse_reciprocals); + NEXT_PASS (pass_reassoc); NEXT_PASS (pass_dominator); /* The only copy propagation opportunities left after DOM @@ -595,7 +596,6 @@ init_optimization_passes (void) NEXT_PASS (pass_uncprop); NEXT_PASS (pass_del_ssa); NEXT_PASS (pass_nrv); - NEXT_PASS (pass_remove_useless_vars); NEXT_PASS (pass_mark_used_blocks); NEXT_PASS (pass_cleanup_cfg_post_optimizing); *p = NULL; @@ -711,7 +711,6 @@ init_optimization_passes (void) } static unsigned int last_verified; - static void execute_todo (struct tree_opt_pass *pass, unsigned int flags, bool use_required) { @@ -747,6 +746,9 @@ execute_todo (struct tree_opt_pass *pass, unsigned int flags, bool use_required) update_ssa (update_flags); } + if (flags & TODO_remove_unused_locals) + remove_unused_locals (); + if ((flags & TODO_dump_func) && dump_file && current_function_decl) { diff --git a/gcc/po/ChangeLog b/gcc/po/ChangeLog index e0ae04bfc89..67f088592a4 100644 --- a/gcc/po/ChangeLog +++ b/gcc/po/ChangeLog @@ -1,3 +1,28 @@ +2006-01-06 Joseph S. Myers + + * de.po: Update. + +2006-01-03 Joseph S. Myers + + * zh_CN.po: Update. + +2005-12-16 Joseph S. Myers + + * zh_CN.po: Update. + +2005-12-15 Joseph S. Myers + + * nl.po: Update. + +2005-12-03 Joseph S. Myers + + * zh_CN.po: Update. + +2005-12-01 Joseph S. Myers + + * be.po, ca.po, da.po, de.po, el.po, es.po, fr.po, ja.po, nl.po, + rw.po, sv.po, tr.po, zh_CN.po: Update. + 2005-11-20 Joseph S. Myers * gcc.pot: Regenerate. diff --git a/gcc/po/be.po b/gcc/po/be.po index 9839450b1e8..2e3d22be207 100644 --- a/gcc/po/be.po +++ b/gcc/po/be.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: gcc 3.1\n" "Report-Msgid-Bugs-To: http://gcc.gnu.org/bugs.html\n" -"POT-Creation-Date: 2005-07-07 10:51-0700\n" +"POT-Creation-Date: 2005-11-20 16:33+0000\n" "PO-Revision-Date: 2002-05-17 15:54+0200\n" "Last-Translator: Ales Nyakhaychyk \n" "Language-Team: Belarusian \n" @@ -14,262 +14,262 @@ msgstr "" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -#: c-decl.c:3701 +#: c-decl.c:3715 msgid "" msgstr "" -#: c-format.c:345 c-format.c:369 +#: c-format.c:343 c-format.c:367 #, fuzzy msgid "' ' flag" msgstr "'0' флаг" -#: c-format.c:345 c-format.c:369 +#: c-format.c:343 c-format.c:367 msgid "the ' ' printf flag" msgstr "" -#: c-format.c:346 c-format.c:370 c-format.c:408 c-format.c:465 +#: c-format.c:344 c-format.c:368 c-format.c:402 c-format.c:414 c-format.c:471 #, fuzzy msgid "'+' flag" msgstr "'0' флаг" -#: c-format.c:346 c-format.c:370 c-format.c:408 +#: c-format.c:344 c-format.c:368 c-format.c:402 c-format.c:414 msgid "the '+' printf flag" msgstr "" -#: c-format.c:347 c-format.c:371 c-format.c:409 c-format.c:441 +#: c-format.c:345 c-format.c:369 c-format.c:415 c-format.c:447 #, fuzzy msgid "'#' flag" msgstr "'0' флаг" -#: c-format.c:347 c-format.c:371 c-format.c:409 +#: c-format.c:345 c-format.c:369 c-format.c:415 msgid "the '#' printf flag" msgstr "" -#: c-format.c:348 c-format.c:372 c-format.c:439 +#: c-format.c:346 c-format.c:370 c-format.c:445 #, fuzzy msgid "'0' flag" msgstr "'0' флаг" -#: c-format.c:348 c-format.c:372 +#: c-format.c:346 c-format.c:370 msgid "the '0' printf flag" msgstr "" -#: c-format.c:349 c-format.c:373 c-format.c:438 c-format.c:468 +#: c-format.c:347 c-format.c:371 c-format.c:444 c-format.c:474 #, fuzzy msgid "'-' flag" msgstr "'0' флаг" -#: c-format.c:349 c-format.c:373 +#: c-format.c:347 c-format.c:371 msgid "the '-' printf flag" msgstr "" -#: c-format.c:350 c-format.c:422 +#: c-format.c:348 c-format.c:428 #, fuzzy msgid "''' flag" msgstr "'0' флаг" -#: c-format.c:350 +#: c-format.c:348 msgid "the ''' printf flag" msgstr "" -#: c-format.c:351 c-format.c:423 +#: c-format.c:349 c-format.c:429 #, fuzzy msgid "'I' flag" msgstr "'0' флаг" -#: c-format.c:351 +#: c-format.c:349 msgid "the 'I' printf flag" msgstr "" -#: c-format.c:352 c-format.c:374 c-format.c:420 c-format.c:442 c-format.c:469 -#: c-format.c:1531 config/sol2-c.c:46 +#: c-format.c:350 c-format.c:372 c-format.c:426 c-format.c:448 c-format.c:475 +#: c-format.c:1601 config/sol2-c.c:46 msgid "field width" msgstr "" -#: c-format.c:352 c-format.c:374 config/sol2-c.c:46 +#: c-format.c:350 c-format.c:372 config/sol2-c.c:46 msgid "field width in printf format" msgstr "" -#: c-format.c:353 c-format.c:375 c-format.c:399 c-format.c:411 +#: c-format.c:351 c-format.c:373 c-format.c:404 c-format.c:417 msgid "precision" msgstr "" -#: c-format.c:353 c-format.c:375 c-format.c:399 c-format.c:411 +#: c-format.c:351 c-format.c:373 c-format.c:404 c-format.c:417 msgid "precision in printf format" msgstr "" -#: c-format.c:354 c-format.c:376 c-format.c:400 c-format.c:412 c-format.c:421 -#: c-format.c:472 config/sol2-c.c:47 +#: c-format.c:352 c-format.c:374 c-format.c:405 c-format.c:418 c-format.c:427 +#: c-format.c:478 config/sol2-c.c:47 msgid "length modifier" msgstr "" -#: c-format.c:354 c-format.c:376 c-format.c:400 c-format.c:412 +#: c-format.c:352 c-format.c:374 c-format.c:405 c-format.c:418 #: config/sol2-c.c:47 msgid "length modifier in printf format" msgstr "" -#: c-format.c:398 c-format.c:410 +#: c-format.c:403 c-format.c:416 #, fuzzy msgid "'q' flag" msgstr "'0' флаг" -#: c-format.c:398 c-format.c:410 +#: c-format.c:403 c-format.c:416 msgid "the 'q' diagnostic flag" msgstr "" -#: c-format.c:418 +#: c-format.c:424 msgid "assignment suppression" msgstr "" -#: c-format.c:418 +#: c-format.c:424 msgid "the assignment suppression scanf feature" msgstr "" -#: c-format.c:419 +#: c-format.c:425 #, fuzzy msgid "'a' flag" msgstr "'0' флаг" -#: c-format.c:419 +#: c-format.c:425 msgid "the 'a' scanf flag" msgstr "" -#: c-format.c:420 +#: c-format.c:426 msgid "field width in scanf format" msgstr "" -#: c-format.c:421 +#: c-format.c:427 msgid "length modifier in scanf format" msgstr "" -#: c-format.c:422 +#: c-format.c:428 msgid "the ''' scanf flag" msgstr "" -#: c-format.c:423 +#: c-format.c:429 msgid "the 'I' scanf flag" msgstr "" -#: c-format.c:437 +#: c-format.c:443 #, fuzzy msgid "'_' flag" msgstr "'0' флаг" -#: c-format.c:437 +#: c-format.c:443 msgid "the '_' strftime flag" msgstr "" -#: c-format.c:438 +#: c-format.c:444 msgid "the '-' strftime flag" msgstr "" -#: c-format.c:439 +#: c-format.c:445 msgid "the '0' strftime flag" msgstr "" -#: c-format.c:440 c-format.c:464 +#: c-format.c:446 c-format.c:470 #, fuzzy msgid "'^' flag" msgstr "'0' флаг" -#: c-format.c:440 +#: c-format.c:446 msgid "the '^' strftime flag" msgstr "" -#: c-format.c:441 +#: c-format.c:447 msgid "the '#' strftime flag" msgstr "" -#: c-format.c:442 +#: c-format.c:448 msgid "field width in strftime format" msgstr "" -#: c-format.c:443 +#: c-format.c:449 #, fuzzy msgid "'E' modifier" msgstr "'O' мадыфікатар" -#: c-format.c:443 +#: c-format.c:449 msgid "the 'E' strftime modifier" msgstr "" -#: c-format.c:444 +#: c-format.c:450 #, fuzzy msgid "'O' modifier" msgstr "'O' мадыфікатар" -#: c-format.c:444 +#: c-format.c:450 msgid "the 'O' strftime modifier" msgstr "" -#: c-format.c:445 +#: c-format.c:451 #, fuzzy msgid "the 'O' modifier" msgstr "'O' мадыфікатар" -#: c-format.c:463 +#: c-format.c:469 msgid "fill character" msgstr "" -#: c-format.c:463 +#: c-format.c:469 msgid "fill character in strfmon format" msgstr "" -#: c-format.c:464 +#: c-format.c:470 msgid "the '^' strfmon flag" msgstr "" -#: c-format.c:465 +#: c-format.c:471 msgid "the '+' strfmon flag" msgstr "" -#: c-format.c:466 +#: c-format.c:472 #, fuzzy msgid "'(' flag" msgstr "'0' флаг" -#: c-format.c:466 +#: c-format.c:472 msgid "the '(' strfmon flag" msgstr "" -#: c-format.c:467 +#: c-format.c:473 #, fuzzy msgid "'!' flag" msgstr "'0' флаг" -#: c-format.c:467 +#: c-format.c:473 msgid "the '!' strfmon flag" msgstr "" -#: c-format.c:468 +#: c-format.c:474 msgid "the '-' strfmon flag" msgstr "" -#: c-format.c:469 +#: c-format.c:475 msgid "field width in strfmon format" msgstr "" -#: c-format.c:470 +#: c-format.c:476 msgid "left precision" msgstr "" -#: c-format.c:470 +#: c-format.c:476 msgid "left precision in strfmon format" msgstr "" -#: c-format.c:471 +#: c-format.c:477 msgid "right precision" msgstr "" -#: c-format.c:471 +#: c-format.c:477 msgid "right precision in strfmon format" msgstr "" -#: c-format.c:472 +#: c-format.c:478 msgid "length modifier in strfmon format" msgstr "" -#: c-format.c:1633 +#: c-format.c:1703 msgid "field precision" msgstr "" @@ -303,91 +303,53 @@ msgstr "" msgid "End of search list.\n" msgstr "" -#: c-opts.c:1296 +#: c-opts.c:1329 msgid "" msgstr "" -#: c-opts.c:1311 +#: c-opts.c:1345 msgid "" msgstr "" -#. Depending on the version of Bison used to compile this grammar, -#. it may issue generic diagnostics spelled "syntax error" or -#. "parse error". To prevent this from changing the translation -#. template randomly, we list all the variants of this particular -#. diagnostic here. Translators: there is no fine distinction -#. between diagnostics with "syntax error" in them, and diagnostics -#. with "parse error" in them. It's okay to give them both the same -#. translation. -#: c-parse.y:54 c-parse.c:5385 c-parse.y:2955 gengtype-yacc.c:1606 -msgid "syntax error" -msgstr "сінтаксічная памылка" - -#: c-parse.c:2157 c-parse.y:2959 gengtype-yacc.c:560 -#, fuzzy -msgid "syntax error: cannot back up" -msgstr "сінтаксічная памылка" - -#: c-parse.c:5381 c-parse.y:2957 gengtype-yacc.c:1602 -msgid "syntax error; also virtual memory exhausted" -msgstr "" - -#: c-parse.c:5506 gengtype-yacc.c:1727 -msgid "parser stack overflow" -msgstr "" - -#: c-parse.y:2956 -msgid "parse error" -msgstr "граматычная памылка" - -#: c-parse.y:2958 -msgid "parse error; also virtual memory exhausted" -msgstr "" - -#: c-parse.y:2960 -#, fuzzy -msgid "parse error: cannot back up" -msgstr "сінтаксічная памылка" - -#: c-typeck.c:2077 c-typeck.c:4346 c-typeck.c:4348 c-typeck.c:4356 -#: c-typeck.c:4381 c-typeck.c:5771 +#: c-typeck.c:2226 c-typeck.c:4613 c-typeck.c:4615 c-typeck.c:4623 +#: c-typeck.c:4653 c-typeck.c:6032 msgid "initializer element is not constant" msgstr "" -#: c-typeck.c:4152 +#: c-typeck.c:4419 msgid "array initialized from parenthesized string constant" msgstr "" -#: c-typeck.c:4216 cp/typeck2.c:703 +#: c-typeck.c:4479 cp/typeck2.c:672 #, gcc-internal-format msgid "char-array initialized from wide string" msgstr "" -#: c-typeck.c:4221 +#: c-typeck.c:4484 msgid "wchar_t-array initialized from non-wide string" msgstr "" -#: c-typeck.c:4239 cp/typeck2.c:725 +#: c-typeck.c:4502 cp/typeck2.c:692 #, gcc-internal-format msgid "initializer-string for array of chars is too long" msgstr "" -#: c-typeck.c:4245 +#: c-typeck.c:4508 msgid "array of inappropriate type initialized from string constant" msgstr "" #. ??? This should not be an error when inlining calls to #. unprototyped functions. -#: c-typeck.c:4306 c-typeck.c:3804 cp/typeck.c:1393 +#: c-typeck.c:4572 c-typeck.c:4071 cp/typeck.c:1398 #, gcc-internal-format msgid "invalid use of non-lvalue array" msgstr "" -#: c-typeck.c:4329 +#: c-typeck.c:4596 msgid "array initialized from non-constant array expression" msgstr "" -#: c-typeck.c:4388 c-typeck.c:5775 +#: c-typeck.c:4660 c-typeck.c:6036 #, gcc-internal-format msgid "initializer element is not computable at load time" msgstr "" @@ -396,324 +358,270 @@ msgstr "" #. of VLAs themselves count as VLAs, it does not make #. sense to permit them to be initialized given that #. ordinary VLAs may not be initialized. -#: c-typeck.c:4399 c-decl.c:3138 c-decl.c:3153 +#: c-typeck.c:4671 c-decl.c:3152 c-decl.c:3167 #, gcc-internal-format msgid "variable-sized object may not be initialized" msgstr "" -#: c-typeck.c:4403 cp/typeck2.c:804 -#, gcc-internal-format +#: c-typeck.c:4675 msgid "invalid initializer" msgstr "нерэчаісны ініцыялізатар" -#: c-typeck.c:4877 +#: c-typeck.c:5149 msgid "extra brace group at end of initializer" msgstr "" -#: c-typeck.c:4897 cp/decl.c:4368 -#, gcc-internal-format +#: c-typeck.c:5169 msgid "missing braces around initializer" msgstr "" -#: c-typeck.c:4958 +#: c-typeck.c:5230 msgid "braces around scalar initializer" msgstr "" -#: c-typeck.c:5015 +#: c-typeck.c:5287 msgid "initialization of flexible array member in a nested context" msgstr "" -#: c-typeck.c:5017 +#: c-typeck.c:5289 msgid "initialization of a flexible array member" msgstr "" -#: c-typeck.c:5044 +#: c-typeck.c:5316 msgid "missing initializer" msgstr "прапушчан ініцыялізатар" -#: c-typeck.c:5066 +#: c-typeck.c:5338 msgid "empty scalar initializer" msgstr "" -#: c-typeck.c:5071 +#: c-typeck.c:5343 msgid "extra elements in scalar initializer" msgstr "" -#: c-typeck.c:5175 c-typeck.c:5250 +#: c-typeck.c:5447 c-typeck.c:5507 msgid "array index in non-array initializer" msgstr "" -#: c-typeck.c:5180 c-typeck.c:5303 +#: c-typeck.c:5452 c-typeck.c:5560 msgid "field name not in record or union initializer" msgstr "" -#: c-typeck.c:5226 +#: c-typeck.c:5498 #, fuzzy msgid "array index in initializer not of integer type" msgstr "\"%s\" мае незавершаны тып" -#: c-typeck.c:5246 c-typeck.c:5248 +#: c-typeck.c:5503 c-typeck.c:5505 msgid "nonconstant array index in initializer" msgstr "" -#: c-typeck.c:5252 c-typeck.c:5255 +#: c-typeck.c:5509 c-typeck.c:5512 msgid "array index in initializer exceeds array bounds" msgstr "" -#: c-typeck.c:5266 +#: c-typeck.c:5523 msgid "empty index range in initializer" msgstr "" -#: c-typeck.c:5275 +#: c-typeck.c:5532 msgid "array index range in initializer exceeds array bounds" msgstr "" -#: c-typeck.c:5351 c-typeck.c:5372 c-typeck.c:5838 +#: c-typeck.c:5607 c-typeck.c:5628 c-typeck.c:6100 msgid "initialized field with side-effects overwritten" msgstr "" -#: c-typeck.c:6047 +#: c-typeck.c:6308 msgid "excess elements in char array initializer" msgstr "" -#: c-typeck.c:6054 c-typeck.c:6100 +#: c-typeck.c:6315 c-typeck.c:6361 msgid "excess elements in struct initializer" msgstr "" -#: c-typeck.c:6115 +#: c-typeck.c:6376 msgid "non-static initialization of a flexible array member" msgstr "" -#: c-typeck.c:6183 +#: c-typeck.c:6444 msgid "excess elements in union initializer" msgstr "" -#: c-typeck.c:6269 +#: c-typeck.c:6531 msgid "excess elements in array initializer" msgstr "" -#: c-typeck.c:6299 +#: c-typeck.c:6561 msgid "excess elements in vector initializer" msgstr "" -#: c-typeck.c:6323 +#: c-typeck.c:6585 msgid "excess elements in scalar initializer" msgstr "" -#: cfgrtl.c:2140 +#: cfgrtl.c:2129 msgid "flow control insn inside a basic block" msgstr "" -#: cfgrtl.c:2212 +#: cfgrtl.c:2207 msgid "wrong insn in the fallthru edge" msgstr "" -#: cfgrtl.c:2254 +#: cfgrtl.c:2249 msgid "insn outside basic block" msgstr "" -#: cfgrtl.c:2261 +#: cfgrtl.c:2256 msgid "return not followed by barrier" msgstr "" -#: cgraph.c:282 +#: cgraph.c:300 ipa-inline.c:294 msgid "function body not available" msgstr "" -#: cgraph.c:284 cgraphunit.c:662 +#: cgraph.c:302 cgraphunit.c:594 msgid "redefined extern inline functions are not considered for inlining" msgstr "" -#: cgraph.c:287 cgraphunit.c:667 +#: cgraph.c:305 cgraphunit.c:599 #, fuzzy msgid "function not considered for inlining" msgstr "віртуальныя функцыі не могуць быць сяброўскімі" -#: cgraph.c:289 cgraphunit.c:665 +#: cgraph.c:307 cgraphunit.c:597 ipa-inline.c:287 msgid "function not inlinable" msgstr "" -#: cgraphunit.c:1201 -msgid "--param large-function-growth limit reached" -msgstr "" - -#: cgraphunit.c:1238 -msgid "recursive inlining" -msgstr "" - -#: cgraphunit.c:1403 cgraphunit.c:1655 -msgid "--param max-inline-insns-single limit reached" -msgstr "" - -#: cgraphunit.c:1427 -msgid "--param max-inline-insns-single limit reached after inlining into the callee" -msgstr "" - -#: cgraphunit.c:1477 -msgid "--param inline-unit-growth limit reached" -msgstr "" - -#: collect2.c:402 gcc.c:6736 +#: collect2.c:373 gcc.c:6765 #, fuzzy, c-format msgid "internal gcc abort in %s, at %s:%d" msgstr "спынена ў %s, ля %s:%d" -#: collect2.c:898 +#: collect2.c:872 #, c-format msgid "no arguments" msgstr "няма аргументаў" -#: collect2.c:1271 collect2.c:1419 collect2.c:1454 +#: collect2.c:1246 collect2.c:1394 collect2.c:1429 #, c-format msgid "fopen %s" msgstr "" -#: collect2.c:1274 collect2.c:1424 collect2.c:1457 +#: collect2.c:1249 collect2.c:1399 collect2.c:1432 #, c-format msgid "fclose %s" msgstr "" -#: collect2.c:1283 +#: collect2.c:1258 #, c-format msgid "collect2 version %s" msgstr "" -#: collect2.c:1373 +#: collect2.c:1348 #, c-format msgid "%d constructor(s) found\n" msgstr "%d канструктар(аў) знойдзен(а)\n" -#: collect2.c:1374 +#: collect2.c:1349 #, c-format msgid "%d destructor(s) found\n" msgstr "%d дэструктар(аў) знойдзен(а)\n" -#: collect2.c:1375 +#: collect2.c:1350 #, c-format msgid "%d frame table(s) found\n" msgstr "" -#: collect2.c:1560 +#: collect2.c:1487 +#, c-format +msgid "can't get program status" +msgstr "" + +#: collect2.c:1537 #, c-format msgid "[cannot find %s]" msgstr "[нельга знайсці %s]" -#: collect2.c:1575 +#: collect2.c:1552 #, fuzzy, c-format msgid "cannot find '%s'" msgstr "нельга знайсці \"%s\"" -#: collect2.c:1586 collect2.c:1589 +#: collect2.c:1556 collect2.c:2045 collect2.c:2200 gcc.c:2809 #, c-format -msgid "redirecting stdout: %s" -msgstr "перанакіраванне stdout: %s" +msgid "pex_init failed" +msgstr "" -#: collect2.c:1628 +#: collect2.c:1591 #, c-format msgid "[Leaving %s]\n" msgstr "" -#: collect2.c:1848 +#: collect2.c:1811 #, c-format msgid "" "\n" "write_c_file - output name is %s, prefix is %s\n" msgstr "" -#: collect2.c:2052 +#: collect2.c:2019 #, fuzzy, c-format msgid "cannot find 'nm'" msgstr "нельга знайсці \"nm\"" -#: collect2.c:2062 collect2.c:2228 -#, c-format -msgid "pipe" -msgstr "канвеер" - -#: collect2.c:2066 collect2.c:2232 -#, c-format -msgid "fdopen" -msgstr "" - -#: collect2.c:2092 collect2.c:2258 -#, c-format -msgid "dup2 %d 1" -msgstr "" - -#: collect2.c:2095 collect2.c:2098 collect2.c:2111 collect2.c:2261 -#: collect2.c:2264 collect2.c:2277 -#, c-format -msgid "close %d" -msgstr "" - -#: collect2.c:2101 collect2.c:2267 -#, c-format -msgid "execv %s" -msgstr "" +#: collect2.c:2066 +#, fuzzy, c-format +msgid "can't open nm output" +msgstr "немагчыма адчыніць файл уводу `%s'" -#: collect2.c:2155 +#: collect2.c:2110 #, c-format msgid "init function found in object %s" msgstr "" -#: collect2.c:2163 +#: collect2.c:2118 #, c-format msgid "fini function found in object %s" msgstr "" -#: collect2.c:2186 collect2.c:2316 -#, c-format -msgid "fclose" -msgstr "" +#: collect2.c:2221 +#, fuzzy, c-format +msgid "can't open ldd output" +msgstr "немагчыма адчыніць файл уводу `%s'" -#: collect2.c:2280 +#: collect2.c:2224 #, c-format msgid "" "\n" "ldd output with constructors/destructors.\n" msgstr "" -#: collect2.c:2295 +#: collect2.c:2239 #, c-format msgid "dynamic dependency %s not found" msgstr "" -#: collect2.c:2307 +#: collect2.c:2251 #, c-format msgid "unable to open dynamic dependency '%s'" msgstr "" -#: collect2.c:2466 +#: collect2.c:2407 #, c-format msgid "%s: not a COFF file" msgstr "" -#: collect2.c:2586 +#: collect2.c:2527 #, c-format msgid "%s: cannot open as COFF file" msgstr "" -#: collect2.c:2644 +#: collect2.c:2585 #, fuzzy, c-format msgid "library lib%s not found" msgstr "Бібліятэка lib%s не знойдзена" -#: combine.c:12516 -#, c-format -msgid "" -";; Combiner statistics: %d attempts, %d substitutions (%d requiring new space),\n" -";; %d successes.\n" -"\n" -msgstr "" - -#: combine.c:12525 -#, c-format -msgid "" -"\n" -";; Combiner totals: %d attempts, %d substitutions (%d requiring new space),\n" -";; %d successes.\n" -msgstr "" - #: cppspec.c:106 #, c-format msgid "\"%s\" is not a valid option to the preprocessor" @@ -724,22 +632,17 @@ msgstr "" msgid "too many input files" msgstr "вельмі шмат уваходзячых файлаў" -#: cse.c:6812 -#, c-format -msgid ";; Processing block from %d to %d, %d sets.\n" -msgstr "" - -#: diagnostic.c:168 +#: diagnostic.c:186 #, c-format msgid "%s:%d: confused by earlier errors, bailing out\n" msgstr "" -#: diagnostic.c:228 +#: diagnostic.c:246 #, fuzzy, c-format msgid "compilation terminated due to -Wfatal-errors.\n" msgstr "кампіляцыя завершана.\n" -#: diagnostic.c:237 +#: diagnostic.c:255 #, c-format msgid "" "Please submit a full bug report,\n" @@ -747,55 +650,55 @@ msgid "" "See %s for instructions.\n" msgstr "" -#: diagnostic.c:246 +#: diagnostic.c:264 #, c-format msgid "compilation terminated.\n" msgstr "кампіляцыя завершана.\n" -#: diagnostic.c:537 +#: diagnostic.c:583 #, c-format msgid "Internal compiler error: Error reporting routines re-entered.\n" msgstr "" -#: final.c:1062 +#: final.c:1110 msgid "negative insn length" msgstr "" -#: final.c:2508 +#: final.c:2467 msgid "could not split insn" msgstr "" -#: final.c:2857 +#: final.c:2816 #, fuzzy msgid "invalid 'asm': " msgstr "нерэчаісная маска" -#: final.c:3040 +#: final.c:2999 #, c-format msgid "nested assembly dialect alternatives" msgstr "" -#: final.c:3057 final.c:3069 +#: final.c:3016 final.c:3028 #, c-format msgid "unterminated assembly dialect alternative" msgstr "" -#: final.c:3116 +#: final.c:3075 #, c-format msgid "operand number missing after %%-letter" msgstr "" -#: final.c:3119 final.c:3160 +#: final.c:3078 final.c:3119 #, c-format msgid "operand number out of range" msgstr "" -#: final.c:3179 +#: final.c:3138 #, c-format msgid "invalid %%-code" msgstr "нерэчаісны %%-код" -#: final.c:3209 +#: final.c:3168 #, c-format msgid "'%%l' operand isn't a label" msgstr "" @@ -806,109 +709,118 @@ msgstr "" #. handle them. #. We can't handle floating point constants; #. PRINT_OPERAND must handle them. -#: final.c:3311 vmsdbgout.c:488 config/i386/i386.c:5960 -#: config/pdp11/pdp11.c:1690 +#: final.c:3269 vmsdbgout.c:487 config/i386/i386.c:6606 +#: config/pdp11/pdp11.c:1700 #, c-format msgid "floating constant misused" msgstr "" -#: final.c:3367 vmsdbgout.c:545 config/i386/i386.c:6038 -#: config/pdp11/pdp11.c:1737 +#: final.c:3325 vmsdbgout.c:544 config/i386/i386.c:6682 +#: config/pdp11/pdp11.c:1747 #, c-format msgid "invalid expression as operand" msgstr "" -#: flow.c:1689 +#: flow.c:1699 msgid "Attempt to delete prologue/epilogue insn:" msgstr "" -#: gcc.c:1632 +#: gcc.c:1641 #, c-format msgid "Using built-in specs.\n" msgstr "" -#: gcc.c:1815 +#: gcc.c:1824 #, c-format msgid "" "Setting spec %s to '%s'\n" "\n" msgstr "" -#: gcc.c:1924 +#: gcc.c:1939 #, c-format msgid "Reading specs from %s\n" msgstr "" -#: gcc.c:2020 gcc.c:2039 +#: gcc.c:2035 gcc.c:2054 #, c-format msgid "specs %%include syntax malformed after %ld characters" msgstr "" -#: gcc.c:2047 +#: gcc.c:2062 #, fuzzy, c-format msgid "could not find specs file %s\n" msgstr "не магу знайсці крыніцу %s\n" -#: gcc.c:2064 gcc.c:2072 gcc.c:2081 gcc.c:2090 +#: gcc.c:2079 gcc.c:2087 gcc.c:2096 gcc.c:2105 #, c-format msgid "specs %%rename syntax malformed after %ld characters" msgstr "" -#: gcc.c:2099 +#: gcc.c:2114 #, c-format msgid "specs %s spec was not found to be renamed" msgstr "" -#: gcc.c:2106 +#: gcc.c:2121 #, c-format msgid "%s: attempt to rename spec '%s' to already defined spec '%s'" msgstr "" -#: gcc.c:2111 +#: gcc.c:2126 #, c-format msgid "rename spec %s to %s\n" msgstr "" -#: gcc.c:2113 +#: gcc.c:2128 #, c-format msgid "" "spec is '%s'\n" "\n" msgstr "" -#: gcc.c:2126 +#: gcc.c:2141 #, c-format msgid "specs unknown %% command after %ld characters" msgstr "" -#: gcc.c:2137 gcc.c:2150 +#: gcc.c:2152 gcc.c:2165 #, c-format msgid "specs file malformed after %ld characters" msgstr "" -#: gcc.c:2203 +#: gcc.c:2218 #, c-format msgid "spec file has no spec for linking" msgstr "" -#: gcc.c:2625 +#: gcc.c:2640 #, c-format msgid "system path '%s' is not absolute" msgstr "" -#: gcc.c:2688 +#: gcc.c:2703 #, c-format msgid "-pipe not supported" msgstr "-pipe не падтрымліваецца" -#: gcc.c:2750 +#: gcc.c:2765 #, c-format msgid "" "\n" "Go ahead? (y or n) " msgstr "" -#: gcc.c:2875 +#: gcc.c:2848 +msgid "failed to get exit status" +msgstr "" + +#: gcc.c:2854 +#, fuzzy +msgid "failed to get process times" +msgstr "не знойдзен клас \"%s\"" + +#: gcc.c:2877 #, c-format msgid "" "Internal error: %s (program %s)\n" @@ -916,165 +828,171 @@ msgid "" "See %s for instructions." msgstr "" -#: gcc.c:2893 +#: gcc.c:2905 #, c-format msgid "# %s %.2f %.2f\n" msgstr "# %s %.2f %.2f\n" -#: gcc.c:3023 +#: gcc.c:3041 #, c-format msgid "Usage: %s [options] file...\n" msgstr "Выкарыстанне: %s [выбары] файл...\n" -#: gcc.c:3024 +#: gcc.c:3042 msgid "Options:\n" msgstr "Выбары:\n" -#: gcc.c:3026 +#: gcc.c:3044 msgid " -pass-exit-codes Exit with highest error code from a phase\n" msgstr "" -#: gcc.c:3027 +#: gcc.c:3045 msgid " --help Display this information\n" msgstr " --help Адлюстраваць гэту інфармацыю\n" -#: gcc.c:3028 +#: gcc.c:3046 msgid " --target-help Display target specific command line options\n" msgstr "" -#: gcc.c:3030 +#: gcc.c:3048 msgid " (Use '-v --help' to display command line options of sub-processes)\n" msgstr "" -#: gcc.c:3031 +#: gcc.c:3049 msgid " -dumpspecs Display all of the built in spec strings\n" msgstr "" -#: gcc.c:3032 +#: gcc.c:3050 msgid " -dumpversion Display the version of the compiler\n" msgstr " -dumpversion Адлюстраваць версію кампілятара\n" -#: gcc.c:3033 +#: gcc.c:3051 msgid " -dumpmachine Display the compiler's target processor\n" msgstr "" -#: gcc.c:3034 +#: gcc.c:3052 msgid " -print-search-dirs Display the directories in the compiler's search path\n" msgstr "" -#: gcc.c:3035 +#: gcc.c:3053 msgid " -print-libgcc-file-name Display the name of the compiler's companion library\n" msgstr "" -#: gcc.c:3036 +#: gcc.c:3054 msgid " -print-file-name= Display the full path to library \n" msgstr "" -#: gcc.c:3037 +#: gcc.c:3055 msgid " -print-prog-name= Display the full path to compiler component \n" msgstr "" -#: gcc.c:3038 +#: gcc.c:3056 msgid " -print-multi-directory Display the root directory for versions of libgcc\n" msgstr "" -#: gcc.c:3039 +#: gcc.c:3057 msgid "" " -print-multi-lib Display the mapping between command line options and\n" " multiple library search directories\n" msgstr "" -#: gcc.c:3042 +#: gcc.c:3060 msgid " -print-multi-os-directory Display the relative path to OS libraries\n" msgstr "" -#: gcc.c:3043 +#: gcc.c:3061 msgid " -Wa, Pass comma-separated on to the assembler\n" msgstr "" -#: gcc.c:3044 +#: gcc.c:3062 msgid " -Wp, Pass comma-separated on to the preprocessor\n" msgstr "" -#: gcc.c:3045 +#: gcc.c:3063 msgid " -Wl, Pass comma-separated on to the linker\n" msgstr "" -#: gcc.c:3046 +#: gcc.c:3064 msgid " -Xassembler Pass on to the assembler\n" msgstr "" -#: gcc.c:3047 +#: gcc.c:3065 msgid " -Xpreprocessor Pass on to the preprocessor\n" msgstr "" -#: gcc.c:3048 +#: gcc.c:3066 msgid " -Xlinker Pass on to the linker\n" msgstr "" -#: gcc.c:3049 +#: gcc.c:3067 #, fuzzy msgid " -combine Pass multiple source files to compiler at once\n" msgstr " -o <файл> Памясціць вывад у <файл>\n" -#: gcc.c:3050 +#: gcc.c:3068 msgid " -save-temps Do not delete intermediate files\n" msgstr "" -#: gcc.c:3051 +#: gcc.c:3069 msgid " -pipe Use pipes rather than intermediate files\n" msgstr "" -#: gcc.c:3052 +#: gcc.c:3070 msgid " -time Time the execution of each subprocess\n" msgstr "" -#: gcc.c:3053 +#: gcc.c:3071 #, fuzzy msgid " -specs= Override built-in specs with the contents of \n" msgstr " -o <файл> Памясціць вывад у <файл>\n" -#: gcc.c:3054 +#: gcc.c:3072 msgid " -std= Assume that the input sources are for \n" msgstr "" -#: gcc.c:3055 +#: gcc.c:3073 +msgid "" +" --sysroot= Use as the root directory for headers\n" +" for headers and libraries\n" +msgstr "" + +#: gcc.c:3076 msgid " -B Add to the compiler's search paths\n" msgstr "" -#: gcc.c:3056 +#: gcc.c:3077 msgid " -b Run gcc for target , if installed\n" msgstr "" -#: gcc.c:3057 +#: gcc.c:3078 msgid " -V Run gcc version number , if installed\n" msgstr "" -#: gcc.c:3058 +#: gcc.c:3079 msgid " -v Display the programs invoked by the compiler\n" msgstr "" -#: gcc.c:3059 +#: gcc.c:3080 msgid " -### Like -v but options quoted and commands not executed\n" msgstr "" -#: gcc.c:3060 +#: gcc.c:3081 msgid " -E Preprocess only; do not compile, assemble or link\n" msgstr "" -#: gcc.c:3061 +#: gcc.c:3082 msgid " -S Compile only; do not assemble or link\n" msgstr "" -#: gcc.c:3062 +#: gcc.c:3083 msgid " -c Compile and assemble, but do not link\n" msgstr "" -#: gcc.c:3063 +#: gcc.c:3084 msgid " -o Place the output into \n" msgstr " -o <файл> Памясціць вывад у <файл>\n" -#: gcc.c:3064 +#: gcc.c:3085 msgid "" " -x Specify the language of the following input files\n" " Permissible languages include: c c++ assembler none\n" @@ -1082,7 +1000,7 @@ msgid "" " guessing the language based on the file's extension\n" msgstr "" -#: gcc.c:3071 +#: gcc.c:3092 #, c-format msgid "" "\n" @@ -1091,28 +1009,28 @@ msgid "" " other options on to these processes the -W options must be used.\n" msgstr "" -#: gcc.c:3191 +#: gcc.c:3215 #, c-format msgid "'-%c' option must have argument" msgstr "" -#: gcc.c:3213 +#: gcc.c:3237 #, c-format msgid "couldn't run '%s': %s" msgstr "" #. translate_options () has turned --version into -fversion. -#: gcc.c:3398 +#: gcc.c:3422 #, c-format msgid "%s (GCC) %s\n" msgstr "" -#: gcc.c:3400 gcov.c:415 java/gjavah.c:2400 java/jcf-dump.c:916 -#: java/jv-scan.c:128 +#: gcc.c:3424 gcov.c:415 fortran/gfortranspec.c:351 java/gjavah.c:2406 +#: java/jcf-dump.c:931 java/jv-scan.c:129 msgid "(C)" msgstr "" -#: gcc.c:3401 java/gjavah.c:2401 java/jcf-dump.c:917 java/jv-scan.c:129 +#: gcc.c:3425 java/gjavah.c:2407 java/jcf-dump.c:932 java/jv-scan.c:130 #, c-format msgid "" "This is free software; see the source for copying conditions. There is NO\n" @@ -1120,143 +1038,143 @@ msgid "" "\n" msgstr "" -#: gcc.c:3502 +#: gcc.c:3526 #, fuzzy, c-format msgid "argument to '-Xlinker' is missing" msgstr "аргумент для \"-x\" прапушчан" -#: gcc.c:3510 +#: gcc.c:3534 #, fuzzy, c-format msgid "argument to '-Xpreprocessor' is missing" msgstr "аргумент для \"-%s\" прапушчан" -#: gcc.c:3517 +#: gcc.c:3541 #, fuzzy, c-format msgid "argument to '-Xassembler' is missing" msgstr "аргумент для \"-x\" прапушчан" -#: gcc.c:3524 +#: gcc.c:3548 #, fuzzy, c-format msgid "argument to '-l' is missing" msgstr "аргумент для \"-x\" прапушчан" -#: gcc.c:3545 +#: gcc.c:3569 #, fuzzy, c-format msgid "argument to '-specs' is missing" msgstr "аргумент для \"-%s\" прапушчан" -#: gcc.c:3559 +#: gcc.c:3583 #, fuzzy, c-format msgid "argument to '-specs=' is missing" msgstr "аргумент для \"-%s\" прапушчан" -#: gcc.c:3596 +#: gcc.c:3621 #, c-format msgid "'-%c' must come at the start of the command line" msgstr "" -#: gcc.c:3605 +#: gcc.c:3630 #, fuzzy, c-format msgid "argument to '-B' is missing" msgstr "аргумент для \"-x\" прапушчан" -#: gcc.c:3994 +#: gcc.c:4016 #, fuzzy, c-format msgid "argument to '-x' is missing" msgstr "аргумент для \"-x\" прапушчан" -#: gcc.c:4022 +#: gcc.c:4044 #, fuzzy, c-format msgid "argument to '-%s' is missing" msgstr "аргумент для \"-%s\" прапушчан" -#: gcc.c:4360 +#: gcc.c:4382 #, c-format msgid "switch '%s' does not start with '-'" msgstr "" -#: gcc.c:4587 +#: gcc.c:4612 #, c-format msgid "spec '%s' invalid" msgstr "" -#: gcc.c:4653 +#: gcc.c:4678 #, c-format msgid "%s\n" msgstr "%s\n" -#: gcc.c:4726 +#: gcc.c:4751 #, fuzzy, c-format msgid "spec '%s' has invalid '%%0%c'" msgstr "бітавае поле \"%s\" мае нерэчаісны тып" -#: gcc.c:4923 +#: gcc.c:4948 #, fuzzy, c-format msgid "spec '%s' has invalid '%%W%c" msgstr "бітавае поле \"%s\" мае нерэчаісны тып" -#: gcc.c:4954 +#: gcc.c:4979 #, fuzzy, c-format msgid "spec '%s' has invalid '%%x%c'" msgstr "бітавае поле \"%s\" мае нерэчаісны тып" -#: gcc.c:5176 +#: gcc.c:5201 #, c-format msgid "Processing spec %c%s%c, which is '%s'\n" msgstr "" -#: gcc.c:5318 +#: gcc.c:5343 #, fuzzy, c-format msgid "unknown spec function '%s'" msgstr "невядомы рэжым машыны \"%s\"" -#: gcc.c:5337 +#: gcc.c:5362 #, fuzzy, c-format msgid "error in args to spec function '%s'" msgstr "вельмі шмат аргумэнтаў у функцыі `%s'" -#: gcc.c:5385 +#: gcc.c:5410 #, c-format msgid "malformed spec function name" msgstr "" #. ) -#: gcc.c:5388 +#: gcc.c:5413 #, fuzzy, c-format msgid "no arguments for spec function" msgstr "не хапае аргументаў у функцыі" -#: gcc.c:5407 +#: gcc.c:5432 #, c-format msgid "malformed spec function arguments" msgstr "" -#: gcc.c:5646 +#: gcc.c:5671 #, c-format msgid "braced spec '%s' is invalid at '%c'" msgstr "" -#: gcc.c:5734 +#: gcc.c:5759 #, c-format msgid "braced spec body '%s' is invalid" msgstr "" -#: gcc.c:6272 +#: gcc.c:6306 #, c-format msgid "install: %s%s\n" msgstr "" -#: gcc.c:6273 +#: gcc.c:6307 #, c-format msgid "programs: %s\n" msgstr "праграмы: %s\n" -#: gcc.c:6274 +#: gcc.c:6308 #, c-format msgid "libraries: %s\n" msgstr "бібліятэкі: %s\n" -#: gcc.c:6331 +#: gcc.c:6365 #, c-format msgid "" "\n" @@ -1265,61 +1183,86 @@ msgstr "" "\n" "Інструкцыі для паведамленняў аб памылках глядзіце тут:\n" -#: gcc.c:6347 +#: gcc.c:6381 #, fuzzy, c-format msgid "Target: %s\n" msgstr "бібліятэкі: %s\n" -#: gcc.c:6348 +#: gcc.c:6382 #, c-format msgid "Configured with: %s\n" msgstr "" -#: gcc.c:6362 +#: gcc.c:6396 #, c-format msgid "Thread model: %s\n" msgstr "" -#: gcc.c:6373 +#: gcc.c:6407 #, c-format msgid "gcc version %s\n" msgstr "версія gcc %s\n" -#: gcc.c:6375 +#: gcc.c:6409 #, c-format msgid "gcc driver version %s executing gcc version %s\n" msgstr "" -#: gcc.c:6383 +#: gcc.c:6417 #, fuzzy, c-format msgid "no input files" msgstr "няма ўваходзячых файлаў" -#: gcc.c:6463 +#: gcc.c:6466 +#, c-format +msgid "cannot specify -o with -c or -S with multiple files" +msgstr "" + +#: gcc.c:6500 #, fuzzy, c-format msgid "spec '%s' is invalid" msgstr "параметр \"%s\" ініцыялізаваны" -#: gcc.c:6936 +#: gcc.c:6965 #, fuzzy, c-format msgid "multilib spec '%s' is invalid" msgstr "параметр \"%s\" ініцыялізаваны" -#: gcc.c:7128 +#: gcc.c:7157 #, c-format msgid "multilib exclusions '%s' is invalid" msgstr "" -#: gcc.c:7186 gcc.c:7327 +#: gcc.c:7215 gcc.c:7356 #, fuzzy, c-format msgid "multilib select '%s' is invalid" msgstr "параметр \"%s\" ініцыялізаваны" -#: gcc.c:7365 +#: gcc.c:7394 #, c-format msgid "multilib exclusion '%s' is invalid" msgstr "" +#: gcc.c:7653 gcc.c:7658 +#, fuzzy, c-format +msgid "invalid version number `%s'" +msgstr "нявернае выкарыстанне \"restict\"" + +#: gcc.c:7701 +#, fuzzy, c-format +msgid "too few arguments to %%:version-compare" +msgstr "не хапае аргументаў у функцыі" + +#: gcc.c:7707 +#, fuzzy, c-format +msgid "too many arguments to %%:version-compare" +msgstr "вельмі шмат аргументаў у функцыі" + +#: gcc.c:7748 +#, c-format +msgid "unknown operator '%s' in %%:version-compare" +msgstr "" + #: gcov.c:388 #, c-format msgid "" @@ -1422,7 +1365,7 @@ msgstr "" msgid "%s:no functions found\n" msgstr "не знойдзена\n" -#: gcov.c:528 gcov.c:556 +#: gcov.c:528 gcov.c:556 fortran/dump-parse-tree.c:68 #, fuzzy, c-format msgid "\n" msgstr ":\n" @@ -1610,15 +1553,71 @@ msgid "%s:source file is newer than graph file '%s'\n" msgstr "" #. Return if there's nothing to do, or it is too expensive. -#: gcse.c:689 +#: gcse.c:694 msgid "GCSE disabled" msgstr "" #. Return if there's nothing to do, or it is too expensive. -#: gcse.c:6474 +#: gcse.c:6518 msgid "jump bypassing disabled" msgstr "" +#: gengtype-yacc.c:602 java/parse-scan.c:1988 java/parse-scan.y:1375 +#: java/parse.c:2981 java/parse.y:16475 +#, fuzzy +msgid "syntax error: cannot back up" +msgstr "сінтаксічная памылка" + +#. Each stack pointer address is followed by the size of the +#. data in use in that stack, in bytes. This used to be a +#. conditional around just the two extra args, but that might +#. be undefined if yyoverflow is a macro. +#: gengtype-yacc.c:1085 gengtype-yacc.c:1846 java/parse-scan.c:2471 +#: java/parse-scan.c:3359 java/parse.c:3464 java/parse.c:6451 +msgid "memory exhausted" +msgstr "" + +#. This is so xgettext sees the translatable formats that are +#. constructed on the fly. +#: gengtype-yacc.c:1653 java/parse-scan.c:3166 java/parse.c:6258 +#, fuzzy, c-format +msgid "syntax error, unexpected %s" +msgstr "сінтаксічная памылка" + +#: gengtype-yacc.c:1654 java/parse-scan.c:3167 java/parse.c:6259 +#, c-format +msgid "syntax error, unexpected %s, expecting %s" +msgstr "" + +#: gengtype-yacc.c:1655 java/parse-scan.c:3168 java/parse.c:6260 +#, c-format +msgid "syntax error, unexpected %s, expecting %s or %s" +msgstr "" + +#: gengtype-yacc.c:1656 java/parse-scan.c:3169 java/parse.c:6261 +#, c-format +msgid "syntax error, unexpected %s, expecting %s or %s or %s" +msgstr "" + +#: gengtype-yacc.c:1657 java/parse-scan.c:3170 java/parse.c:6262 +#, c-format +msgid "syntax error, unexpected %s, expecting %s or %s or %s or %s" +msgstr "" + +#. Depending on the version of Bison used to compile this grammar, +#. it may issue generic diagnostics spelled "syntax error" or +#. "parse error". To prevent this from changing the translation +#. template randomly, we list all the variants of this particular +#. diagnostic here. Translators: there is no fine distinction +#. between diagnostics with "syntax error" in them, and diagnostics +#. with "parse error" in them. It's okay to give them both the same +#. translation. +#: gengtype-yacc.c:1732 gengtype-yacc.c:1738 java/parse-scan.c:3245 +#: java/parse-scan.c:3251 java/parse-scan.y:1371 java/parse.c:6337 +#: java/parse.c:6343 java/parse.y:16471 +msgid "syntax error" +msgstr "сінтаксічная памылка" + #. Opening quotation mark. #: intl.c:58 msgid "`" @@ -1629,68 +1628,115 @@ msgstr "" msgid "'" msgstr "" -#: langhooks.c:516 +#: ipa-inline.c:273 +msgid "--param large-function-growth limit reached" +msgstr "" + +#: ipa-inline.c:303 +msgid "--param max-inline-insns-single limit reached" +msgstr "" + +#: ipa-inline.c:312 +msgid "--param max-inline-insns-auto limit reached" +msgstr "" + +#: ipa-inline.c:338 ipa-inline.c:764 +msgid "recursive inlining" +msgstr "" + +#: ipa-inline.c:777 +msgid "call is unlikely" +msgstr "" + +#: ipa-inline.c:848 +msgid "--param inline-unit-growth limit reached" +msgstr "" + +#: langhooks.c:507 msgid "At top level:" msgstr "" -#: langhooks.c:521 +#: langhooks.c:512 #, fuzzy, c-format msgid "In member function %qs:" msgstr "у функцыі \"%s\":" -#: langhooks.c:525 +#: langhooks.c:516 #, fuzzy, c-format msgid "In function %qs:" msgstr "у функцыі \"%s\":" +#: loop-iv.c:2709 tree-ssa-loop-niter.c:1026 +msgid "assuming that the loop is not infinite" +msgstr "" + +#: loop-iv.c:2710 tree-ssa-loop-niter.c:1027 +msgid "cannot optimize possibly infinite loops" +msgstr "" + +#: loop-iv.c:2718 tree-ssa-loop-niter.c:1031 +msgid "assuming that the loop counter does not overflow" +msgstr "" + +#: loop-iv.c:2719 tree-ssa-loop-niter.c:1032 +msgid "cannot optimize loop, the loop counter may overflow" +msgstr "" + #. What to print when a switch has no documentation. -#: opts.c:89 +#: opts.c:90 msgid "This switch lacks documentation" msgstr "" -#: opts.c:1183 +#: opts.c:1210 +#, c-format +msgid "" +"\n" +"Target specific options:\n" +msgstr "" + +#: opts.c:1231 msgid "The following options are language-independent:\n" msgstr "" -#: opts.c:1190 +#: opts.c:1238 #, c-format msgid "" "The %s front end recognizes the following options:\n" "\n" msgstr "" -#: opts.c:1204 +#: opts.c:1251 msgid "The --param option recognizes the following as parameters:\n" msgstr "" -#: protoize.c:582 +#: protoize.c:583 #, fuzzy, c-format msgid "%s: error writing file '%s': %s\n" msgstr "" "\n" "%s: памылка чытаньня файла ўводу `%s': %s\n" -#: protoize.c:626 +#: protoize.c:627 #, c-format msgid "%s: usage '%s [ -VqfnkN ] [ -i ] [ filename ... ]'\n" msgstr "" -#: protoize.c:629 +#: protoize.c:630 #, c-format msgid "%s: usage '%s [ -VqfnkNlgC ] [ -B ] [ filename ... ]'\n" msgstr "" -#: protoize.c:735 +#: protoize.c:731 #, fuzzy, c-format msgid "%s: warning: no read access for file '%s'\n" msgstr "%s: увага: файл \"%s\" ужо запісан у \"%s\"\n" -#: protoize.c:743 +#: protoize.c:739 #, fuzzy, c-format msgid "%s: warning: no write access for file '%s'\n" msgstr "%s: %d: увага: няма знешняга (extern) абвяшчэння для \"%s\"\n" -#: protoize.c:751 +#: protoize.c:747 #, fuzzy, c-format msgid "%s: warning: no write access for dir containing '%s'\n" msgstr "%s: %d: увага: няма знешняга (extern) абвяшчэння для \"%s\"\n" @@ -1698,239 +1744,239 @@ msgstr "%s: %d: увага: няма знешняга (extern) абвяшчэн #. Catch cases like /.. where we try to backup to a #. point above the absolute root of the logical file #. system. -#: protoize.c:1138 +#: protoize.c:1134 #, c-format msgid "%s: invalid file name: %s\n" msgstr "" -#: protoize.c:1286 +#: protoize.c:1282 #, c-format msgid "%s: %s: can't get status: %s\n" msgstr "" -#: protoize.c:1307 +#: protoize.c:1303 #, c-format msgid "" "\n" "%s: fatal error: aux info file corrupted at line %d\n" msgstr "" -#: protoize.c:1636 +#: protoize.c:1632 #, fuzzy, c-format msgid "%s:%d: declaration of function '%s' takes different forms\n" msgstr "няма папярэдняга аб'яўлення для \"%s\"" -#: protoize.c:1891 +#: protoize.c:1887 #, fuzzy, c-format msgid "%s: compiling '%s'\n" msgstr "%s: кампілюецца \"%s\"\n" -#: protoize.c:1914 +#: protoize.c:1910 #, c-format msgid "%s: wait: %s\n" msgstr "" -#: protoize.c:1919 +#: protoize.c:1915 #, c-format msgid "%s: subprocess got fatal signal %d\n" msgstr "" -#: protoize.c:1927 +#: protoize.c:1923 #, c-format msgid "%s: %s exited with status %d\n" msgstr "" -#: protoize.c:1976 +#: protoize.c:1972 #, c-format msgid "%s: warning: missing SYSCALLS file '%s'\n" msgstr "" -#: protoize.c:1985 protoize.c:2014 +#: protoize.c:1981 protoize.c:2010 #, fuzzy, c-format msgid "%s: can't read aux info file '%s': %s\n" msgstr "%s: немагчыма зьмяніць рэжым файла `%s': %s\n" -#: protoize.c:2030 protoize.c:2058 +#: protoize.c:2026 protoize.c:2054 #, fuzzy, c-format msgid "%s: can't get status of aux info file '%s': %s\n" msgstr "%s: немагчыма зьмяніць рэжым файла `%s': %s\n" -#: protoize.c:2086 +#: protoize.c:2082 #, fuzzy, c-format msgid "%s: can't open aux info file '%s' for reading: %s\n" msgstr "%s: немагчыма адчыніць файл `%s' для чытаньня: %s\n" -#: protoize.c:2104 +#: protoize.c:2100 #, fuzzy, c-format msgid "%s: error reading aux info file '%s': %s\n" msgstr "" "\n" "%s: памылка чытаньня файла ўводу `%s': %s\n" -#: protoize.c:2117 +#: protoize.c:2113 #, fuzzy, c-format msgid "%s: error closing aux info file '%s': %s\n" msgstr "" "\n" "%s: памылка чытаньня файла ўводу `%s': %s\n" -#: protoize.c:2133 +#: protoize.c:2129 #, fuzzy, c-format msgid "%s: can't delete aux info file '%s': %s\n" msgstr "%s: немагчыма знішчыць файл \"%s\": %s\n" -#: protoize.c:2215 protoize.c:4185 +#: protoize.c:2211 protoize.c:4180 #, fuzzy, c-format msgid "%s: can't delete file '%s': %s\n" msgstr "%s: немагчыма знішчыць файл \"%s\": %s\n" -#: protoize.c:2293 +#: protoize.c:2289 #, fuzzy, c-format msgid "%s: warning: can't rename file '%s' to '%s': %s\n" msgstr "%s: немагчыма знішчыць файл \"%s\": %s\n" -#: protoize.c:2415 +#: protoize.c:2411 #, c-format msgid "%s: conflicting extern definitions of '%s'\n" msgstr "" -#: protoize.c:2419 +#: protoize.c:2415 #, c-format msgid "%s: declarations of '%s' will not be converted\n" msgstr "" -#: protoize.c:2421 +#: protoize.c:2417 #, c-format msgid "%s: conflict list for '%s' follows:\n" msgstr "" -#: protoize.c:2454 +#: protoize.c:2450 #, c-format msgid "%s: warning: using formals list from %s(%d) for function '%s'\n" msgstr "" -#: protoize.c:2494 +#: protoize.c:2490 #, c-format msgid "%s: %d: '%s' used but missing from SYSCALLS\n" msgstr "" -#: protoize.c:2500 +#: protoize.c:2496 #, fuzzy, c-format msgid "%s: %d: warning: no extern definition for '%s'\n" msgstr "%s: %d: увага: няма знешняга (extern) абвяшчэння для \"%s\"\n" -#: protoize.c:2530 +#: protoize.c:2526 #, fuzzy, c-format msgid "%s: warning: no static definition for '%s' in file '%s'\n" msgstr "%s: %d: увага: няма знешняга (extern) абвяшчэння для \"%s\"\n" -#: protoize.c:2536 +#: protoize.c:2532 #, c-format msgid "%s: multiple static defs of '%s' in file '%s'\n" msgstr "" -#: protoize.c:2706 protoize.c:2709 +#: protoize.c:2702 protoize.c:2705 #, c-format msgid "%s: %d: warning: source too confusing\n" msgstr "" -#: protoize.c:2905 +#: protoize.c:2900 #, c-format msgid "%s: %d: warning: varargs function declaration not converted\n" msgstr "" -#: protoize.c:2920 +#: protoize.c:2915 #, fuzzy, c-format msgid "%s: declaration of function '%s' not converted\n" msgstr "няма папярэдняга аб'яўлення для \"%s\"" -#: protoize.c:3043 +#: protoize.c:3038 #, fuzzy, c-format msgid "%s: warning: too many parameter lists in declaration of '%s'\n" msgstr "%s: %d: увага: няма знешняга (extern) абвяшчэння для \"%s\"\n" -#: protoize.c:3064 +#: protoize.c:3059 #, fuzzy, c-format msgid "" "\n" "%s: warning: too few parameter lists in declaration of '%s'\n" msgstr "%s: %d: увага: няма знешняга (extern) абвяшчэння для \"%s\"\n" -#: protoize.c:3160 +#: protoize.c:3155 #, fuzzy, c-format msgid "%s: %d: warning: found '%s' but expected '%s'\n" msgstr "%s: %d: увага: няма знешняга (extern) абвяшчэння для \"%s\"\n" -#: protoize.c:3335 +#: protoize.c:3330 #, fuzzy, c-format msgid "%s: local declaration for function '%s' not inserted\n" msgstr "няма папярэдняга аб'яўлення для \"%s\"" -#: protoize.c:3362 +#: protoize.c:3357 #, c-format msgid "" "\n" "%s: %d: warning: can't add declaration of '%s' into macro call\n" msgstr "" -#: protoize.c:3434 +#: protoize.c:3429 #, c-format msgid "%s: global declarations for file '%s' not inserted\n" msgstr "" -#: protoize.c:3523 protoize.c:3553 +#: protoize.c:3518 protoize.c:3548 #, c-format msgid "%s: definition of function '%s' not converted\n" msgstr "" -#: protoize.c:3542 +#: protoize.c:3537 #, c-format msgid "%s: %d: warning: definition of %s not converted\n" msgstr "" -#: protoize.c:3868 +#: protoize.c:3863 #, c-format msgid "%s: found definition of '%s' at %s(%d)\n" msgstr "" #. If we make it here, then we did not know about this #. function definition. -#: protoize.c:3884 +#: protoize.c:3879 #, c-format msgid "%s: %d: warning: '%s' excluded by preprocessing\n" msgstr "" -#: protoize.c:3887 +#: protoize.c:3882 #, c-format msgid "%s: function definition not converted\n" msgstr "" -#: protoize.c:3945 +#: protoize.c:3940 #, c-format msgid "%s: '%s' not converted\n" msgstr "" -#: protoize.c:3953 +#: protoize.c:3948 #, fuzzy, c-format msgid "%s: would convert file '%s'\n" msgstr "%s: немагчыма знішчыць файл \"%s\": %s\n" -#: protoize.c:3956 +#: protoize.c:3951 #, fuzzy, c-format msgid "%s: converting file '%s'\n" msgstr "%s: немагчыма знішчыць файл \"%s\": %s\n" -#: protoize.c:3966 +#: protoize.c:3961 #, fuzzy, c-format msgid "%s: can't get status for file '%s': %s\n" msgstr "%s: немагчыма зьмяніць рэжым файла `%s': %s\n" -#: protoize.c:4008 +#: protoize.c:4003 #, fuzzy, c-format msgid "%s: can't open file '%s' for reading: %s\n" msgstr "%s: немагчыма адчыніць файл `%s' для чытаньня: %s\n" -#: protoize.c:4023 +#: protoize.c:4018 #, fuzzy, c-format msgid "" "\n" @@ -1939,60 +1985,64 @@ msgstr "" "\n" "%s: памылка чытаньня файла ўводу `%s': %s\n" -#: protoize.c:4057 +#: protoize.c:4052 #, fuzzy, c-format msgid "%s: can't create/open clean file '%s': %s\n" msgstr "%s: немагчыма зьмяніць рэжым файла `%s': %s\n" -#: protoize.c:4162 +#: protoize.c:4157 #, fuzzy, c-format msgid "%s: warning: file '%s' already saved in '%s'\n" msgstr "%s: увага: файл \"%s\" ужо запісан у \"%s\"\n" -#: protoize.c:4170 +#: protoize.c:4165 #, fuzzy, c-format msgid "%s: can't link file '%s' to '%s': %s\n" msgstr "%s: немагчыма знішчыць файл \"%s\": %s\n" -#: protoize.c:4200 +#: protoize.c:4195 #, fuzzy, c-format msgid "%s: can't create/open output file '%s': %s\n" msgstr "%s: немагчыма зьмяніць рэжым файла `%s': %s\n" -#: protoize.c:4233 +#: protoize.c:4228 #, fuzzy, c-format msgid "%s: can't change mode of file '%s': %s\n" msgstr "%s: немагчыма зьмяніць рэжым файла `%s': %s\n" -#: protoize.c:4409 +#: protoize.c:4404 #, c-format msgid "%s: cannot get working directory: %s\n" msgstr "" -#: protoize.c:4507 +#: protoize.c:4502 #, c-format msgid "%s: input file names must have .c suffixes: %s\n" msgstr "%s: файл уводу павінен мець суфікс .c: %s\n" -#: reload.c:3720 +#: reload.c:3730 msgid "unable to generate reloads for:" msgstr "" -#: reload1.c:1878 +#: reload1.c:1901 msgid "this is the insn:" msgstr "" #. It's the compiler's fault. -#: reload1.c:4997 +#: reload1.c:5088 #, fuzzy msgid "could not find a spill register" msgstr "Не выкарыстоўваць рэгістра sb" #. It's the compiler's fault. -#: reload1.c:6628 +#: reload1.c:6722 msgid "VOIDmode on an output" msgstr "" +#: reload1.c:7692 +msgid "Failure trying to reload:" +msgstr "" + #: rtl-error.c:128 #, fuzzy msgid "unrecognizable insn:" @@ -2002,113 +2052,103 @@ msgstr "нераспазнаны выбар \"-%s\"" msgid "insn does not satisfy its constraints:" msgstr "" -#: timevar.c:401 +#: timevar.c:412 msgid "" "\n" "Execution times (seconds)\n" msgstr "" #. Print total time. -#: timevar.c:451 +#: timevar.c:470 msgid " TOTAL :" msgstr "" -#: timevar.c:479 +#: timevar.c:499 #, c-format msgid "time in %s: %ld.%06ld (%ld%%)\n" msgstr "" -#: tlink.c:381 +#: tlink.c:384 #, c-format msgid "collect: reading %s\n" msgstr "" -#: tlink.c:525 +#: tlink.c:478 +#, c-format +msgid "removing .rpo file" +msgstr "" + +#: tlink.c:480 +#, c-format +msgid "renaming .rpo file" +msgstr "" + +#: tlink.c:534 #, c-format msgid "collect: recompiling %s\n" msgstr "" -#: tlink.c:705 +#: tlink.c:714 #, c-format msgid "collect: tweaking %s in %s\n" msgstr "" -#: tlink.c:751 +#: tlink.c:764 #, c-format msgid "collect: relinking\n" msgstr "" -#: toplev.c:606 +#: toplev.c:582 #, fuzzy, c-format msgid "unrecoverable error" msgstr "унутраная памылка" -#: toplev.c:1086 -#, c-format +#: toplev.c:1114 +#, fuzzy, c-format msgid "" -"\n" -"Target specific options:\n" +"%s%s%s version %s (%s)\n" +"%s\tcompiled by GNU C version %s.\n" msgstr "" +"%s%s%s версія %s (%s)\n" +"%s\tзкампілявана GNU C версія %s.\n" +"%s%s%s версія %s (%s) зкампілявана CC.\n" -#: toplev.c:1100 toplev.c:1119 +#: toplev.c:1116 #, c-format -msgid " -m%-23s [undocumented]\n" +msgid "%s%s%s version %s (%s) compiled by CC.\n" msgstr "" -#: toplev.c:1128 -#, c-format -msgid "" -"\n" -"There are undocumented target specific options as well.\n" -msgstr "" - -#: toplev.c:1130 -#, c-format -msgid " They exist, but they are not documented.\n" -msgstr "" - -#: toplev.c:1251 -#, c-format -msgid "" -"%s%s%s version %s (%s)\n" -"%s\tcompiled by GNU C version %s.\n" -"%s%s%s version %s (%s) compiled by CC.\n" -msgstr "" -"%s%s%s версія %s (%s)\n" -"%s\tзкампілявана GNU C версія %s.\n" -"%s%s%s версія %s (%s) зкампілявана CC.\n" - -#: toplev.c:1258 +#: toplev.c:1120 #, c-format msgid "%s%sGGC heuristics: --param ggc-min-expand=%d --param ggc-min-heapsize=%d\n" msgstr "" -#: toplev.c:1310 +#: toplev.c:1182 msgid "options passed: " msgstr "" -#: toplev.c:1339 +#: toplev.c:1211 msgid "options enabled: " msgstr "выбары ўключаны:" -#: toplev.c:1491 config/sh/sh.c:7334 -msgid "created and used with different settings of -fpic" +#: toplev.c:1330 +#, c-format +msgid "created and used with differing settings of '%s'" msgstr "" -#: toplev.c:1493 config/sh/sh.c:7336 -msgid "created and used with different settings of -fpie" +#: toplev.c:1332 +msgid "out of memory" msgstr "" -#: toplev.c:1544 config/sh/sh.c:7386 -#, c-format -msgid "created and used with differing settings of '-m%s'" +#: toplev.c:1347 +msgid "created and used with different settings of -fpic" msgstr "" -#: toplev.c:1547 config/sh/sh.c:7389 -msgid "out of memory" +#: toplev.c:1349 +msgid "created and used with different settings of -fpie" msgstr "" -#: tree-inline.c:1565 +#: tree-inline.c:2013 msgid "originally indirect function call not considered for inlining" msgstr "" @@ -2151,5985 +2191,6949 @@ msgstr "" msgid "debug: " msgstr "" -#: params.def:44 -msgid "The maximum structure size (in bytes) at which GCC will do block copies" +#: params.def:48 +msgid "The maximum number of fields in a structure variable without direct structure accesses that GCC will attempt to track separately" +msgstr "" + +#: params.def:57 +msgid "The maximum structure size (in bytes) for which GCC will use by-element copies" +msgstr "" + +#: params.def:66 +msgid "The maximum number of structure fields for which GCC will use by-element copies" msgstr "" -#: params.def:54 +#: params.def:78 msgid "The threshold ratio between instantiated fields and the total structure size" msgstr "" -#: params.def:71 +#: params.def:95 msgid "The maximum number of instructions in a single function eligible for inlining" msgstr "" -#: params.def:83 +#: params.def:107 msgid "The maximum number of instructions when automatically inlining" msgstr "" -#: params.def:88 +#: params.def:112 msgid "The maximum number of instructions inline function can grow to via recursive inlining" msgstr "" -#: params.def:93 +#: params.def:117 msgid "The maximum number of instructions non-inline function can grow to via recursive inlining" msgstr "" -#: params.def:98 +#: params.def:122 msgid "The maximum depth of recursive inlining for inline functions" msgstr "" -#: params.def:103 +#: params.def:127 msgid "The maximum depth of recursive inlining for non-inline functions" msgstr "" -#: params.def:110 -msgid "If -fvariable-expansion-in-unroller is used, the maximum number of times that an individual variable will be expanded during loop unrolling" +#: params.def:132 +msgid "Inline recursively only when the probability of call being executed exceeds the parameter" +msgstr "" + +#: params.def:139 +msgid "If -fvariable-expansion-in-unroller is used, the maximum number of times that an individual variable will be expanded during loop unrolling" msgstr "" -#: params.def:123 +#: params.def:150 msgid "The maximum number of instructions to consider to fill a delay slot" msgstr "" -#: params.def:134 +#: params.def:161 msgid "The maximum number of instructions to consider to find accurate live register information" msgstr "" -#: params.def:144 +#: params.def:171 msgid "The maximum length of scheduling's pending operations list" msgstr "" -#: params.def:149 +#: params.def:176 msgid "The size of function body to be considered large" msgstr "" -#: params.def:153 +#: params.def:180 msgid "Maximal growth due to inlining of large function (in percent)" msgstr "" -#: params.def:157 +#: params.def:184 +msgid "The size of translation unit to be considered large" +msgstr "" + +#: params.def:188 msgid "how much can given compilation unit grow because of the inlining (in percent)" msgstr "" -#: params.def:161 -msgid "expense of call operation relative to ordinary aritmetic operations" +#: params.def:192 +msgid "expense of call operation relative to ordinary arithmetic operations" msgstr "" -#: params.def:168 +#: params.def:199 msgid "The maximum amount of memory to be allocated by GCSE" msgstr "" -#: params.def:173 +#: params.def:204 msgid "The maximum number of passes to make when doing GCSE" msgstr "" -#: params.def:183 -msgid "The threshold ratio for performing partial redundancy elimination after reload." +#: params.def:214 +msgid "The threshold ratio for performing partial redundancy elimination after reload" msgstr "" -#: params.def:190 -msgid "The threshold ratio of critical edges execution count that permit performing redundancy elimination after reload." +#: params.def:221 +msgid "The threshold ratio of critical edges execution count that permit performing redundancy elimination after reload" msgstr "" -#: params.def:201 +#: params.def:232 msgid "The maximum number of instructions to consider to unroll in a loop" msgstr "" -#: params.def:207 +#: params.def:238 msgid "The maximum number of instructions to consider to unroll in a loop on average" msgstr "" -#: params.def:212 +#: params.def:243 msgid "The maximum number of unrollings of a single loop" msgstr "" -#: params.def:217 +#: params.def:248 msgid "The maximum number of insns of a peeled loop" msgstr "" -#: params.def:222 +#: params.def:253 msgid "The maximum number of peelings of a single loop" msgstr "" -#: params.def:227 +#: params.def:258 msgid "The maximum number of insns of a completely peeled loop" msgstr "" -#: params.def:232 +#: params.def:263 msgid "The maximum number of peelings of a single loop that is peeled completely" msgstr "" -#: params.def:237 +#: params.def:268 msgid "The maximum number of insns of a peeled loop that rolls only once" msgstr "" -#: params.def:243 +#: params.def:274 msgid "The maximum number of insns of an unswitched loop" msgstr "" -#: params.def:248 +#: params.def:279 msgid "The maximum number of unswitchings in a single loop" msgstr "" -#: params.def:255 +#: params.def:286 msgid "Bound on the number of iterations the brute force # of iterations analysis algorithm evaluates" msgstr "" -#: params.def:260 +#: params.def:291 msgid "Maximum number of loops to perform swing modulo scheduling on (mainly for debugging)" msgstr "" -#: params.def:266 +#: params.def:297 msgid "A factor for tuning the upper bound that swing modulo scheduler uses for scheduling a loop" msgstr "" -#: params.def:270 -msgid "The number of cycles the swing modulo scheduler considers when \t checking conflicts using DFA" +#: params.def:301 +msgid "The number of cycles the swing modulo scheduler considers when checking conflicts using DFA" msgstr "" -#: params.def:275 +#: params.def:305 msgid "A threshold on the average loop count considered by the swing modulo scheduler" msgstr "" -#: params.def:280 +#: params.def:310 msgid "Select fraction of the maximal count of repetitions of basic block in program given basic block needs to have to be considered hot" msgstr "" -#: params.def:284 +#: params.def:314 msgid "Select fraction of the maximal frequency of executions of basic block in function given basic block needs to have to be considered hot" msgstr "" -#: params.def:288 +#: params.def:330 +msgid "The maximum number of loop iterations we predict statically" +msgstr "" + +#: params.def:334 msgid "The percentage of function, weighted by execution frequency, that must be covered by trace formation. Used when profile feedback is available" msgstr "" -#: params.def:292 +#: params.def:338 msgid "The percentage of function, weighted by execution frequency, that must be covered by trace formation. Used when profile feedback is not available" msgstr "" -#: params.def:296 +#: params.def:342 msgid "Maximal code growth caused by tail duplication (in percent)" msgstr "" -#: params.def:300 +#: params.def:346 msgid "Stop reverse growth if the reverse probability of best edge is less than this threshold (in percent)" msgstr "" -#: params.def:304 +#: params.def:350 msgid "Stop forward growth if the probability of best edge is less than this threshold (in percent). Used when profile feedback is available" msgstr "" -#: params.def:308 +#: params.def:354 msgid "Stop forward growth if the probability of best edge is less than this threshold (in percent). Used when profile feedback is not available" msgstr "" -#: params.def:314 +#: params.def:360 msgid "The maximum number of incoming edges to consider for crossjumping" msgstr "" -#: params.def:320 +#: params.def:366 msgid "The minimum number of matching instructions to consider for crossjumping" msgstr "" -#: params.def:326 +#: params.def:372 +msgid "The maximum expansion factor when copying basic blocks" +msgstr "" + +#: params.def:378 msgid "The maximum number of insns to duplicate when unfactoring computed gotos" msgstr "" -#: params.def:332 +#: params.def:384 msgid "The maximum length of path considered in cse" msgstr "" -#: params.def:339 +#: params.def:388 +msgid "The maximum instructions CSE process before flushing" +msgstr "" + +#: params.def:395 msgid "The minimum cost of an expensive expression in the loop invariant motion" msgstr "" -#: params.def:348 +#: params.def:404 msgid "Bound on number of candidates below that all candidates are considered in iv optimizations" msgstr "" -#: params.def:356 +#: params.def:412 msgid "Bound on number of iv uses in loop optimized in iv optimizations" msgstr "" -#: params.def:364 +#: params.def:420 msgid "If number of candidates in the set is smaller, we always try to remove unused ivs during its optimization" msgstr "" -#: params.def:369 +#: params.def:425 msgid "Bound on size of expressions used in the scalar evolutions analyzer" msgstr "" -#: params.def:376 +#: params.def:430 +msgid "Bound on number of runtime checks inserted by the vectorizer's loop versioning" +msgstr "" + +#: params.def:437 msgid "Given N calls and V call-clobbered vars in a function. Use .GLOBAL_VAR if NxV is larger than this limit" msgstr "" -#: params.def:381 +#: params.def:442 msgid "The maximum memory locations recorded by cselib" msgstr "" -#: params.def:394 +#: params.def:446 +msgid "The maximum memory locations recorded by flow" +msgstr "" + +#: params.def:459 msgid "Minimum heap expansion to trigger garbage collection, as a percentage of the total size of the heap" msgstr "" -#: params.def:399 +#: params.def:464 msgid "Minimum heap size before we start collecting garbage, in kilobytes" msgstr "" -#: params.def:407 +#: params.def:472 msgid "The maximum number of instructions to search backward when looking for equivalent reload" msgstr "" -#: params.def:412 -msgid "The maximum number of virtual operands allowed to represent aliases before triggering alias grouping." +#: params.def:477 +msgid "The maximum number of virtual operands allowed to represent aliases before triggering alias grouping" msgstr "" -#: params.def:417 +#: params.def:482 msgid "The maximum number of blocks in a region to be considered for interblock scheduling" msgstr "" -#: params.def:422 +#: params.def:487 msgid "The maximum number of insns in a region to be considered for interblock scheduling" msgstr "" -#: params.def:427 +#: params.def:492 +msgid "The minimum probability of reaching a source block for interblock speculative scheduling" +msgstr "" + +#: params.def:497 msgid "The maximum number of RTL nodes that can be recorded as combiner's last value" msgstr "" -#: params.def:435 +#: params.def:505 msgid "The upper bound for sharing integer constants" msgstr "" -#: config/darwin.h:155 -msgid "Set sizeof(bool) to 1" +#: params.def:524 +msgid "Minimum number of virtual mappings to consider switching to full virtual renames" msgstr "" -#: config/darwin.h:157 -#, fuzzy -msgid "Generate code suitable for fast turn around debugging" -msgstr "Стварыць код для DLL" - -#: config/darwin.h:159 -#, fuzzy -msgid "Don't generate code suitable for fast turn around debugging" -msgstr "Не генерыраваць сімвальныя інструкцыі" - -#: config/lynx.h:137 -#, fuzzy -msgid "Use shared libraries" -msgstr "Выкарыстоўваць апаратную плаваючую кропку" +#: params.def:529 +msgid "Ratio between virtual mappings and virtual symbols to do full virtual renames" +msgstr "" -#: config/lynx.h:138 -msgid "Support multi-threading" +#: params.def:534 +msgid "The lower bound for a buffer to be considered for stack smashing protection" msgstr "" -#: config/lynx.h:139 -msgid "Support legacy multi-threading" +#: params.def:552 +msgid "Maximum number of statements allowed in a block that needs to be duplicated when threading jumps" msgstr "" -#: config/alpha/alpha.c:4748 +#: config/alpha/alpha.c:5069 #, c-format msgid "invalid %%H value" msgstr "нерэчаіснае значэньне %%H" -#: config/alpha/alpha.c:4769 config/bfin/bfin.c:1031 +#: config/alpha/alpha.c:5090 config/bfin/bfin.c:1181 #, fuzzy, c-format msgid "invalid %%J value" msgstr "дрэннае %%Q значэнне" -#: config/alpha/alpha.c:4799 config/ia64/ia64.c:4252 +#: config/alpha/alpha.c:5120 config/ia64/ia64.c:4597 #, c-format msgid "invalid %%r value" msgstr "нерэчаіснае значэньне %%r" -#: config/alpha/alpha.c:4809 config/rs6000/rs6000.c:10956 -#: config/xtensa/xtensa.c:1951 +#: config/alpha/alpha.c:5130 config/rs6000/rs6000.c:10385 +#: config/xtensa/xtensa.c:1691 #, c-format msgid "invalid %%R value" msgstr "нерэчаіснае значэньне %%R" -#: config/alpha/alpha.c:4815 config/rs6000/rs6000.c:10875 -#: config/xtensa/xtensa.c:1918 +#: config/alpha/alpha.c:5136 config/rs6000/rs6000.c:10304 +#: config/xtensa/xtensa.c:1658 #, c-format msgid "invalid %%N value" msgstr "нерэчаіснае значэньне %%N" -#: config/alpha/alpha.c:4823 config/rs6000/rs6000.c:10903 +#: config/alpha/alpha.c:5144 config/rs6000/rs6000.c:10332 #, c-format msgid "invalid %%P value" msgstr "нерэчаіснае значэньне %%P" -#: config/alpha/alpha.c:4831 +#: config/alpha/alpha.c:5152 #, c-format msgid "invalid %%h value" msgstr "нерэчаіснае значэньне %%h" -#: config/alpha/alpha.c:4839 config/xtensa/xtensa.c:1944 +#: config/alpha/alpha.c:5160 config/xtensa/xtensa.c:1684 #, c-format msgid "invalid %%L value" msgstr "нерэчаіснае значэньне %%L" -#: config/alpha/alpha.c:4878 config/rs6000/rs6000.c:10857 +#: config/alpha/alpha.c:5199 config/rs6000/rs6000.c:10286 #, c-format msgid "invalid %%m value" msgstr "нерэчаіснае значэньне %%m" -#: config/alpha/alpha.c:4886 config/rs6000/rs6000.c:10865 +#: config/alpha/alpha.c:5207 config/rs6000/rs6000.c:10294 #, c-format msgid "invalid %%M value" msgstr "нерэчаіснае значэньне %%M" -#: config/alpha/alpha.c:4930 +#: config/alpha/alpha.c:5251 #, c-format msgid "invalid %%U value" msgstr "нерэчаіснае значэньне %%U" -#: config/alpha/alpha.c:4942 config/alpha/alpha.c:4956 -#: config/rs6000/rs6000.c:10964 +#: config/alpha/alpha.c:5263 config/alpha/alpha.c:5277 +#: config/rs6000/rs6000.c:10393 #, c-format msgid "invalid %%s value" msgstr "нерэчаіснае значэньне %%v" -#: config/alpha/alpha.c:4979 +#: config/alpha/alpha.c:5300 #, c-format msgid "invalid %%C value" msgstr "нерэчаіснае значэньне %%C" -#: config/alpha/alpha.c:5016 config/rs6000/rs6000.c:10695 -#: config/rs6000/rs6000.c:10714 +#: config/alpha/alpha.c:5337 config/rs6000/rs6000.c:10125 +#: config/rs6000/rs6000.c:10143 #, c-format msgid "invalid %%E value" msgstr "нерэчаіснае значэньне %%E" -#: config/alpha/alpha.c:5041 config/alpha/alpha.c:5089 +#: config/alpha/alpha.c:5362 config/alpha/alpha.c:5410 #, c-format msgid "unknown relocation unspec" msgstr "" -#: config/alpha/alpha.c:5050 config/rs6000/rs6000.c:11282 +#: config/alpha/alpha.c:5371 config/crx/crx.c:1082 +#: config/rs6000/rs6000.c:10706 #, c-format msgid "invalid %%xn code" msgstr "нерэчаіснае значэньне %%xn" -#. 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. -#. WARNING: Do not mark empty strings for translation, as calling -#. gettext on an empty string does NOT return an empty -#. string. -#. 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. -#: config/alpha/alpha.h:293 config/i386/i386.h:335 config/i386/i386.h:337 -#: config/i386/i386.h:339 config/ns32k/ns32k.h:140 config/s390/s390.h:134 -#: config/sparc/sparc.h:625 config/sparc/sparc.h:630 -msgid "Use hardware fp" -msgstr "Выкарыстоўваць апаратную плаваючую кропку" - -#: config/alpha/alpha.h:294 config/i386/i386.h:336 config/i386/i386.h:338 -#: config/sparc/sparc.h:627 config/sparc/sparc.h:632 -msgid "Do not use hardware fp" -msgstr "Не выкарыстоўваць апаратную плаваючую кропку" - -#: config/alpha/alpha.h:295 -msgid "Use fp registers" -msgstr "" - -#: config/alpha/alpha.h:297 -msgid "Do not use fp registers" -msgstr "" - -#: config/alpha/alpha.h:298 -msgid "Do not assume GAS" -msgstr "" - -#: config/alpha/alpha.h:299 -msgid "Assume GAS" -msgstr "" - -#: config/alpha/alpha.h:301 -msgid "Request IEEE-conformant math library routines (OSF/1)" -msgstr "" - -#: config/alpha/alpha.h:303 -msgid "Emit IEEE-conformant code, without inexact exceptions" -msgstr "" - -#: config/alpha/alpha.h:305 -msgid "Emit IEEE-conformant code, with inexact exceptions" -msgstr "" - -#: config/alpha/alpha.h:307 -msgid "Do not emit complex integer constants to read-only memory" -msgstr "" - -#: config/alpha/alpha.h:308 -msgid "Use VAX fp" -msgstr "" - -#: config/alpha/alpha.h:309 -msgid "Do not use VAX fp" -msgstr "" - -#: config/alpha/alpha.h:310 -msgid "Emit code for the byte/word ISA extension" -msgstr "" - -#: config/alpha/alpha.h:313 -msgid "Emit code for the motion video ISA extension" -msgstr "" - -#: config/alpha/alpha.h:316 -msgid "Emit code for the fp move and sqrt ISA extension" -msgstr "" - -#: config/alpha/alpha.h:318 -msgid "Emit code for the counting ISA extension" -msgstr "" - -#: config/alpha/alpha.h:321 -msgid "Emit code using explicit relocation directives" -msgstr "" - -#: config/alpha/alpha.h:324 -msgid "Emit 16-bit relocations to the small data areas" -msgstr "" - -#: config/alpha/alpha.h:326 -msgid "Emit 32-bit relocations to the small data areas" -msgstr "" - -#: config/alpha/alpha.h:328 -msgid "Emit direct branches to local functions" -msgstr "" - -#: config/alpha/alpha.h:331 -msgid "Emit rdval instead of rduniq for thread pointer" -msgstr "" - -#: config/alpha/alpha.h:333 -msgid "Use 128-bit long double" -msgstr "" - -#: config/alpha/alpha.h:335 -#, fuzzy -msgid "Use 64-bit long double" -msgstr "Выкарыстоўваць 64-х бітны float" - -#. For -mcpu= -#. For -mtune= -#. For -mfp-rounding-mode=[n|m|c|d] -#. For -mfp-trap-mode=[n|u|su|sui] -#. For -mtrap-precision=[p|f|i] -#. For -mmemory-latency= -#. For -mtls-size= -#: config/alpha/alpha.h:364 -msgid "Use features of and schedule given CPU" -msgstr "" - -#: config/alpha/alpha.h:366 -msgid "Schedule given CPU" -msgstr "" - -#: config/alpha/alpha.h:368 -msgid "Control the generated fp rounding mode" -msgstr "" - -#: config/alpha/alpha.h:370 -msgid "Control the IEEE trap mode" -msgstr "" - -#: config/alpha/alpha.h:372 -msgid "Control the precision given to fp exceptions" -msgstr "" - -#: config/alpha/alpha.h:374 -msgid "Tune expected memory latency" -msgstr "" - -#: config/alpha/alpha.h:376 config/ia64/ia64.h:278 config/rs6000/sysv4.h:90 -msgid "Specify bit size of immediate TLS offsets" -msgstr "" - -#: config/arc/arc.c:1739 config/m32r/m32r.c:2141 +#: config/arc/arc.c:1726 config/m32r/m32r.c:1805 #, fuzzy, c-format msgid "invalid operand to %%R code" msgstr "нерэчаісны %%-код" -#: config/arc/arc.c:1771 config/m32r/m32r.c:2164 +#: config/arc/arc.c:1758 config/m32r/m32r.c:1828 #, fuzzy, c-format msgid "invalid operand to %%H/%%L code" msgstr "нерэчаісны %%-код" -#: config/arc/arc.c:1794 config/m32r/m32r.c:2235 +#: config/arc/arc.c:1780 config/m32r/m32r.c:1899 #, fuzzy, c-format msgid "invalid operand to %%U code" msgstr "нерэчаісны %%-код" -#: config/arc/arc.c:1805 +#: config/arc/arc.c:1791 #, fuzzy, c-format msgid "invalid operand to %%V code" msgstr "нерэчаісны %%-код" #. Unknown flag. #. Undocumented flag. -#: config/arc/arc.c:1812 config/m32r/m32r.c:2262 config/sparc/sparc.c:7517 +#: config/arc/arc.c:1798 config/m32r/m32r.c:1926 config/sparc/sparc.c:6802 #, c-format msgid "invalid operand output code" msgstr "" -#: config/arm/arm.c:10466 config/arm/arm.c:10484 +#: config/arm/arm.c:10904 config/arm/arm.c:10922 #, fuzzy, c-format msgid "predicated Thumb instruction" msgstr "нявернае выкарыстанне \"restict\"" -#: config/arm/arm.c:10472 +#: config/arm/arm.c:10910 #, c-format msgid "predicated instruction in conditional sequence" msgstr "" -#: config/arm/arm.c:10580 config/arm/arm.c:10590 config/arm/arm.c:10600 -#: config/arm/arm.c:10626 config/arm/arm.c:10644 config/arm/arm.c:10679 -#: config/arm/arm.c:10698 config/arm/arm.c:10713 config/arm/arm.c:10739 -#: config/arm/arm.c:10746 config/arm/arm.c:10753 +#: config/arm/arm.c:11018 config/arm/arm.c:11028 config/arm/arm.c:11038 +#: config/arm/arm.c:11064 config/arm/arm.c:11082 config/arm/arm.c:11117 +#: config/arm/arm.c:11136 config/arm/arm.c:11151 config/arm/arm.c:11177 +#: config/arm/arm.c:11184 config/arm/arm.c:11191 #, fuzzy, c-format msgid "invalid operand for code '%c'" msgstr "Нерэчаісны выбар \"%s\"" -#: config/arm/arm.c:10639 +#: config/arm/arm.c:11077 #, c-format msgid "instruction never exectued" msgstr "" -#: config/arm/arm.c:10764 +#: config/arm/arm.c:11202 #, fuzzy, c-format msgid "missing operand" msgstr "прапушчан ініцыялізатар" -#: config/arm/arm.h:318 -msgid "Generate APCS conformant stack frames" +#: config/avr/avr.c:1116 +msgid "bad address, not (reg+disp):" msgstr "" -#: config/arm/arm.h:321 -msgid "Store function names in object code" +#: config/avr/avr.c:1123 +msgid "bad address, not post_inc or pre_dec:" msgstr "" -#: config/arm/arm.h:327 -msgid "Pass FP arguments in FP registers" +#: config/avr/avr.c:1134 +msgid "internal compiler error. Bad address:" msgstr "" -#: config/arm/arm.h:330 -msgid "Generate re-entrant, PIC code" +#: config/avr/avr.c:1147 +msgid "internal compiler error. Unknown mode:" msgstr "" -#: config/arm/arm.h:333 -msgid "Assume target CPU is configured as big endian" -msgstr "" +#: config/avr/avr.c:1770 config/avr/avr.c:2453 +#, fuzzy +msgid "invalid insn:" +msgstr "Нерэчаісны выбар %s" -#: config/arm/arm.h:335 -msgid "Assume target CPU is configured as little endian" +#: config/avr/avr.c:1804 config/avr/avr.c:1890 config/avr/avr.c:1939 +#: config/avr/avr.c:1967 config/avr/avr.c:2062 config/avr/avr.c:2231 +#: config/avr/avr.c:2487 config/avr/avr.c:2599 +msgid "incorrect insn:" msgstr "" -#: config/arm/arm.h:337 -msgid "Assume big endian bytes, little endian words" +#: config/avr/avr.c:1986 config/avr/avr.c:2147 config/avr/avr.c:2302 +#: config/avr/avr.c:2665 +msgid "unknown move insn:" msgstr "" -#: config/arm/arm.h:339 -msgid "Support calls between Thumb and ARM instruction sets" +#: config/avr/avr.c:2895 +msgid "bad shift insn:" msgstr "" -#: config/arm/arm.h:342 -msgid "Generate a call to abort if a noreturn function returns" +#: config/avr/avr.c:3011 config/avr/avr.c:3459 config/avr/avr.c:3845 +msgid "internal compiler error. Incorrect shift:" msgstr "" -#: config/arm/arm.h:345 -msgid "Do not move instructions into a function's prologue" +#: config/bfin/bfin.c:1143 +#, c-format +msgid "invalid %%j value" msgstr "" -#: config/arm/arm.h:348 -msgid "Do not load the PIC register in function prologues" +#: config/bfin/bfin.c:1262 +#, fuzzy, c-format +msgid "invalid const_double operand" +msgstr "нерэчаісны %%c аперанд" + +#: config/c4x/c4x.c:1584 +msgid "using CONST_DOUBLE for address" msgstr "" -#: config/arm/arm.h:351 -msgid "Generate call insns as indirect calls, if necessary" +#: config/c4x/c4x.c:1722 +msgid "c4x_address_cost: Invalid addressing mode" msgstr "" -#: config/arm/arm.h:354 -msgid "Compile for the Thumb not the ARM" +#: config/c4x/c4x.c:1857 +#, c-format +msgid "c4x_print_operand: %%L inconsistency" msgstr "" -#: config/arm/arm.h:358 -msgid "Thumb: Generate (non-leaf) stack frames even if not needed" +#: config/c4x/c4x.c:1863 +#, c-format +msgid "c4x_print_operand: %%N inconsistency" msgstr "" -#: config/arm/arm.h:361 -msgid "Thumb: Generate (leaf) stack frames even if not needed" +#: config/c4x/c4x.c:1904 +#, c-format +msgid "c4x_print_operand: %%O inconsistency" msgstr "" -#: config/arm/arm.h:364 -msgid "Thumb: Assume non-static functions may be called from ARM code" +#: config/c4x/c4x.c:1999 +msgid "c4x_print_operand: Bad operand case" msgstr "" -#: config/arm/arm.h:368 -msgid "Thumb: Assume function pointers may go to non-Thumb aware code" +#: config/c4x/c4x.c:2040 +msgid "c4x_print_operand_address: Bad post_modify" msgstr "" -#: config/arm/arm.h:372 -msgid "Cirrus: Place NOPs to avoid invalid instruction combinations" +#: config/c4x/c4x.c:2062 +msgid "c4x_print_operand_address: Bad pre_modify" msgstr "" -#: config/arm/arm.h:374 -msgid "Cirrus: Do not break up invalid instruction combinations with NOPs" +#: config/c4x/c4x.c:2110 config/c4x/c4x.c:2122 config/c4x/c4x.c:2137 +msgid "c4x_print_operand_address: Bad operand case" msgstr "" -#: config/arm/arm.h:382 -msgid "Specify the name of the target CPU" +#: config/c4x/c4x.c:2388 +msgid "c4x_rptb_insert: Cannot find start label" msgstr "" -#: config/arm/arm.h:384 -msgid "Specify the name of the target architecture" +#: config/c4x/c4x.c:2990 +msgid "invalid indirect memory address" msgstr "" -#: config/arm/arm.h:389 -msgid "Specify the name of the target floating point hardware/format" +#: config/c4x/c4x.c:3079 +msgid "invalid indirect (S) memory address" msgstr "" -#: config/arm/arm.h:391 -msgid "Specify if floating point hardware should be used" +#: config/c4x/c4x.c:3414 +msgid "c4x_valid_operands: Internal error" msgstr "" -#: config/arm/arm.h:393 -msgid "Specify the minimum bit alignment of structures" +#: config/c4x/c4x.c:3853 +msgid "c4x_operand_subword: invalid mode" msgstr "" -#: config/arm/arm.h:395 -msgid "Specify the register to be used for PIC addressing" +#: config/c4x/c4x.c:3856 +msgid "c4x_operand_subword: invalid operand" msgstr "" -#: config/arm/arm.h:396 config/mips/mips.h:792 -msgid "Specify an ABI" +#. We could handle these with some difficulty. +#. e.g., *p-- => *(p-=2); *(p+1). +#: config/c4x/c4x.c:3882 +msgid "c4x_operand_subword: invalid autoincrement" msgstr "" -#: config/arm/arm.h:398 -msgid "Alias for -mfloat-abi=soft" +#: config/c4x/c4x.c:3888 +msgid "c4x_operand_subword: invalid address" msgstr "" -#: config/arm/arm.h:400 -msgid "Alias for -mfloat-abi=hard" +#: config/c4x/c4x.c:3899 +msgid "c4x_operand_subword: address not offsettable" msgstr "" -#: config/arm/pe.h:59 -msgid "Ignore dllimport attribute for functions" +#: config/c4x/c4x.c:4101 +msgid "c4x_rptb_rpts_p: Repeat block top label moved" msgstr "" -#: config/avr/avr.c:1117 -msgid "bad address, not (reg+disp):" +#. Use `%s' to print the string in case there are any escape +#. characters in the message. +#: config/cris/cris.c:492 fortran/dump-parse-tree.c:84 +#: fortran/dump-parse-tree.c:416 fortran/dump-parse-tree.c:744 c-typeck.c:4372 +#: c-typeck.c:4387 c-typeck.c:4402 final.c:2821 final.c:2823 gcc.c:4664 +#: loop-iv.c:2711 loop-iv.c:2720 rtl-error.c:113 toplev.c:586 +#: tree-ssa-loop-niter.c:1037 cp/parser.c:1963 cp/typeck.c:4274 +#: java/expr.c:402 java/parse.y:5005 +#, gcc-internal-format +msgid "%s" msgstr "" -#: config/avr/avr.c:1124 -msgid "bad address, not post_inc or pre_dec:" +#: config/cris/cris.c:544 +msgid "unexpected index-type in cris_print_index" msgstr "" -#: config/avr/avr.c:1135 -msgid "internal compiler error. Bad address:" +#: config/cris/cris.c:558 +msgid "unexpected base-type in cris_print_base" msgstr "" -#: config/avr/avr.c:1148 -msgid "internal compiler error. Unknown mode:" +#: config/cris/cris.c:674 +msgid "invalid operand for 'b' modifier" msgstr "" -#: config/avr/avr.c:1771 config/avr/avr.c:2454 +#: config/cris/cris.c:691 #, fuzzy -msgid "invalid insn:" -msgstr "Нерэчаісны выбар %s" +msgid "invalid operand for 'o' modifier" +msgstr "нерэчаісны %%-код" -#: config/avr/avr.c:1805 config/avr/avr.c:1891 config/avr/avr.c:1940 -#: config/avr/avr.c:1968 config/avr/avr.c:2063 config/avr/avr.c:2232 -#: config/avr/avr.c:2488 config/avr/avr.c:2600 -msgid "incorrect insn:" -msgstr "" +#: config/cris/cris.c:710 +#, fuzzy +msgid "invalid operand for 'O' modifier" +msgstr "нерэчаісны %%-код" -#: config/avr/avr.c:1987 config/avr/avr.c:2148 config/avr/avr.c:2303 -#: config/avr/avr.c:2666 -msgid "unknown move insn:" +#: config/cris/cris.c:743 +msgid "invalid operand for 'p' modifier" msgstr "" -#: config/avr/avr.c:2896 -msgid "bad shift insn:" +#: config/cris/cris.c:782 +msgid "invalid operand for 'z' modifier" msgstr "" -#: config/avr/avr.c:3012 config/avr/avr.c:3460 config/avr/avr.c:3846 -msgid "internal compiler error. Incorrect shift:" +#: config/cris/cris.c:836 config/cris/cris.c:866 +msgid "invalid operand for 'H' modifier" msgstr "" -#: config/avr/avr.h:73 -msgid "Assume int to be 8 bit integer" +#: config/cris/cris.c:842 +msgid "bad register" msgstr "" -#: config/avr/avr.h:75 -msgid "Change the stack pointer without disabling interrupts" +#: config/cris/cris.c:880 +msgid "invalid operand for 'e' modifier" msgstr "" -#: config/avr/avr.h:77 -msgid "Use subroutines for function prologue/epilogue" +#: config/cris/cris.c:897 +msgid "invalid operand for 'm' modifier" msgstr "" -#: config/avr/avr.h:79 -msgid "Change only the low 8 bits of the stack pointer" +#: config/cris/cris.c:922 +msgid "invalid operand for 'A' modifier" msgstr "" -#: config/avr/avr.h:81 -msgid "Do not generate tablejump insns" +#: config/cris/cris.c:945 +msgid "invalid operand for 'D' modifier" msgstr "" -#: config/avr/avr.h:83 -msgid "Use rjmp/rcall (limited range) on >8K devices" +#: config/cris/cris.c:959 +msgid "invalid operand for 'T' modifier" msgstr "" -#: config/avr/avr.h:85 -msgid "Output instruction sizes to the asm file" +#: config/cris/cris.c:968 +msgid "invalid operand modifier letter" msgstr "" -#: config/avr/avr.h:102 -msgid "Specify the initial stack address" +#: config/cris/cris.c:1025 +msgid "unexpected multiplicative operand" msgstr "" -#: config/avr/avr.h:103 -msgid "Specify the MCU name" +#: config/cris/cris.c:1045 +msgid "unexpected operand" msgstr "" -#: config/bfin/bfin.c:993 -#, c-format -msgid "invalid %%j value" -msgstr "" +#: config/cris/cris.c:1078 config/cris/cris.c:1088 +msgid "unrecognized address" +msgstr "нераспазнаны адрас" -#: config/bfin/bfin.c:1113 -#, fuzzy, c-format -msgid "invalid const_double operand" -msgstr "нерэчаісны %%c аперанд" +#: config/cris/cris.c:2014 +#, fuzzy +msgid "unrecognized supposed constant" +msgstr "нераспазнаны выбар \"-%s\"" -#: config/c4x/c4x.c:1598 -msgid "using CONST_DOUBLE for address" +#: config/cris/cris.c:2370 config/cris/cris.c:2415 +msgid "unexpected side-effects in address" msgstr "" -#: config/c4x/c4x.c:1736 -msgid "c4x_address_cost: Invalid addressing mode" +#. Can't possibly get a GOT-needing-fixup for a function-call, +#. right? +#: config/cris/cris.c:3173 +msgid "Unidentifiable call op" msgstr "" -#: config/c4x/c4x.c:1871 +#: config/cris/cris.c:3208 #, c-format -msgid "c4x_print_operand: %%L inconsistency" +msgid "PIC register isn't set up" msgstr "" -#: config/c4x/c4x.c:1877 +#: config/fr30/fr30.c:464 #, c-format -msgid "c4x_print_operand: %%N inconsistency" +msgid "fr30_print_operand_address: unhandled address" msgstr "" -#: config/c4x/c4x.c:1918 +#: config/fr30/fr30.c:488 #, c-format -msgid "c4x_print_operand: %%O inconsistency" +msgid "fr30_print_operand: unrecognized %%p code" msgstr "" -#: config/c4x/c4x.c:2013 -msgid "c4x_print_operand: Bad operand case" +#: config/fr30/fr30.c:508 +#, c-format +msgid "fr30_print_operand: unrecognized %%b code" msgstr "" -#: config/c4x/c4x.c:2054 -msgid "c4x_print_operand_address: Bad post_modify" +#: config/fr30/fr30.c:529 +#, c-format +msgid "fr30_print_operand: unrecognized %%B code" msgstr "" -#: config/c4x/c4x.c:2076 -msgid "c4x_print_operand_address: Bad pre_modify" +#: config/fr30/fr30.c:537 +#, c-format +msgid "fr30_print_operand: invalid operand to %%A code" msgstr "" -#: config/c4x/c4x.c:2124 config/c4x/c4x.c:2136 config/c4x/c4x.c:2151 -msgid "c4x_print_operand_address: Bad operand case" +#: config/fr30/fr30.c:554 +#, c-format +msgid "fr30_print_operand: invalid %%x code" msgstr "" -#: config/c4x/c4x.c:2402 -msgid "c4x_rptb_insert: Cannot find start label" +#: config/fr30/fr30.c:561 +#, c-format +msgid "fr30_print_operand: invalid %%F code" msgstr "" -#: config/c4x/c4x.c:3317 config/c4x/c4x.c:3335 -msgid "mode not QImode" +#: config/fr30/fr30.c:578 +#, c-format +msgid "fr30_print_operand: unknown code" msgstr "" -#: config/c4x/c4x.c:3405 -msgid "invalid indirect memory address" +#: config/fr30/fr30.c:606 config/fr30/fr30.c:615 config/fr30/fr30.c:626 +#: config/fr30/fr30.c:639 +#, c-format +msgid "fr30_print_operand: unhandled MEM" msgstr "" -#: config/c4x/c4x.c:3494 -msgid "invalid indirect (S) memory address" +#: config/frv/frv.c:2541 +msgid "bad insn to frv_print_operand_address:" msgstr "" -#: config/c4x/c4x.c:3829 -msgid "c4x_valid_operands: Internal error" +#: config/frv/frv.c:2552 +msgid "bad register to frv_print_operand_memory_reference_reg:" msgstr "" -#: config/c4x/c4x.c:4268 -msgid "c4x_operand_subword: invalid mode" +#: config/frv/frv.c:2591 config/frv/frv.c:2601 config/frv/frv.c:2610 +#: config/frv/frv.c:2631 config/frv/frv.c:2636 +msgid "bad insn to frv_print_operand_memory_reference:" msgstr "" -#: config/c4x/c4x.c:4271 -msgid "c4x_operand_subword: invalid operand" +#: config/frv/frv.c:2722 +#, c-format +msgid "bad condition code" msgstr "" -#. We could handle these with some difficulty. -#. e.g., *p-- => *(p-=2); *(p+1). -#: config/c4x/c4x.c:4297 -msgid "c4x_operand_subword: invalid autoincrement" +#: config/frv/frv.c:2797 +msgid "bad insn in frv_print_operand, bad const_double" msgstr "" -#: config/c4x/c4x.c:4303 -msgid "c4x_operand_subword: invalid address" +#: config/frv/frv.c:2858 +msgid "bad insn to frv_print_operand, 'e' modifier:" msgstr "" -#: config/c4x/c4x.c:4314 -msgid "c4x_operand_subword: address not offsettable" +#: config/frv/frv.c:2866 +msgid "bad insn to frv_print_operand, 'F' modifier:" msgstr "" -#: config/c4x/c4x.c:4524 -msgid "c4x_rptb_rpts_p: Repeat block top label moved\n" -msgstr "" - -#. Target compilation option flags. -#. Small memory model. -#. Use 24-bit MPYI for C3x. -#. Fast fixing of floats. -#. Allow use of RPTS. -#. Emit C3x code. -#. Be compatible with TI assembler. -#. Be paranoid about DP reg. in ISRs. -#. Pass arguments on stack. -#. Enable features under development. -#. Enable repeat block. -#. Use BK as general register. -#. Use decrement and branch for C3x. -#. Enable debugging of GCC. -#. Force constants into registers. -#. Allow unsigned loop counters. -#. Force op0 and op1 to be same. -#. Save all 40 bits for floats. -#. Allow parallel insns. -#. Allow MPY||ADD, MPY||SUB insns. -#. Assume mem refs possibly aliased. -#. Emit C30 code. -#. Emit C31 code. -#. Emit C32 code. -#. Emit C33 code. -#. Emit C40 code. -#. Emit C44 code. -#. Run-time compilation parameters selecting different hardware subsets. -#. -#. Macro to define tables used to set the flags. -#. This is a list in braces of triplets in braces, -#. each pair being { "NAME", VALUE, "DESCRIPTION" } -#. where VALUE is the bits to set or minus the bits to clear. -#. An empty string NAME is used to identify the default VALUE. -#: config/c4x/c4x.h:158 -msgid "Small memory model" +#: config/frv/frv.c:2882 +msgid "bad insn to frv_print_operand, 'f' modifier:" msgstr "" -#: config/c4x/c4x.h:160 -msgid "Big memory model" +#: config/frv/frv.c:2896 +msgid "bad insn to frv_print_operand, 'g' modifier:" msgstr "" -#: config/c4x/c4x.h:162 -msgid "Use MPYI instruction for C3x" +#: config/frv/frv.c:2944 +msgid "bad insn to frv_print_operand, 'L' modifier:" msgstr "" -#: config/c4x/c4x.h:164 -msgid "Do not use MPYI instruction for C3x" +#: config/frv/frv.c:2957 +msgid "bad insn to frv_print_operand, 'M/N' modifier:" msgstr "" -#: config/c4x/c4x.h:166 -msgid "Use fast but approximate float to integer conversion" +#: config/frv/frv.c:2978 +msgid "bad insn to frv_print_operand, 'O' modifier:" msgstr "" -#: config/c4x/c4x.h:168 -msgid "Use slow but accurate float to integer conversion" +#: config/frv/frv.c:2996 +msgid "bad insn to frv_print_operand, P modifier:" msgstr "" -#: config/c4x/c4x.h:170 -msgid "Enable use of RTPS instruction" +#: config/frv/frv.c:3016 +msgid "bad insn in frv_print_operand, z case" msgstr "" -#: config/c4x/c4x.h:172 -msgid "Disable use of RTPS instruction" +#: config/frv/frv.c:3047 +msgid "bad insn in frv_print_operand, 0 case" msgstr "" -#: config/c4x/c4x.h:174 -msgid "Enable use of RTPB instruction" +#: config/frv/frv.c:3052 +msgid "frv_print_operand: unknown code" msgstr "" -#: config/c4x/c4x.h:176 -msgid "Disable use of RTPB instruction" +#: config/frv/frv.c:4421 +msgid "bad output_move_single operand" msgstr "" -#: config/c4x/c4x.h:178 -msgid "Generate code for C30 CPU" +#: config/frv/frv.c:4548 +msgid "bad output_move_double operand" msgstr "" -#: config/c4x/c4x.h:180 -msgid "Generate code for C31 CPU" +#: config/frv/frv.c:4690 +msgid "bad output_condmove_single operand" msgstr "" -#: config/c4x/c4x.h:182 -msgid "Generate code for C32 CPU" +#. 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 +#: config/frv/frv.h:329 +#, c-format +msgid " (frv)" msgstr "" -#: config/c4x/c4x.h:184 -msgid "Generate code for C33 CPU" +#: config/i386/i386.c:6676 +#, c-format +msgid "invalid UNSPEC as operand" msgstr "" -#: config/c4x/c4x.h:186 -msgid "Generate code for C40 CPU" +#: config/i386/i386.c:7258 +#, c-format +msgid "operand is neither a constant nor a condition code, invalid operand code 'c'" msgstr "" -#: config/c4x/c4x.h:188 -msgid "Generate code for C44 CPU" -msgstr "" +#: config/i386/i386.c:7311 +#, fuzzy, c-format +msgid "invalid operand code '%c'" +msgstr "Нерэчаісны выбар \"%s\"" -#: config/c4x/c4x.h:190 -msgid "Emit code compatible with TI tools" -msgstr "" +#: config/i386/i386.c:7354 +#, fuzzy, c-format +msgid "invalid constraints for operand" +msgstr "нерэчаісны %%c аперанд" -#: config/c4x/c4x.h:192 -msgid "Emit code to use GAS extensions" -msgstr "" +#: config/i386/i386.c:12948 +#, fuzzy +msgid "unknown insn mode" +msgstr "невядомы рэжым машыны \"%s\"" -#: config/c4x/c4x.h:194 config/c4x/c4x.h:198 -msgid "Save DP across ISR in small memory model" +#. If the environment variable DJDIR is not defined, then DJGPP is not installed correctly and GCC will quickly become confused with the default prefix settings. Report the problem now so the user doesn't receive deceptive "file not found" error messages later. +#. DJDIR is automatically defined by the DJGPP environment config file pointed to by the environment variable DJGPP. Examine DJGPP to try and figure out what's wrong. +#: config/i386/xm-djgpp.h:62 +#, c-format +msgid "environment variable DJGPP not defined" msgstr "" -#: config/c4x/c4x.h:196 config/c4x/c4x.h:200 -msgid "Don't save DP across ISR in small memory model" +#: config/i386/xm-djgpp.h:64 +#, c-format +msgid "environment variable DJGPP points to missing file '%s'" msgstr "" -#: config/c4x/c4x.h:202 -msgid "Pass arguments on the stack" +#: config/i386/xm-djgpp.h:67 +#, c-format +msgid "environment variable DJGPP points to corrupt file '%s'" msgstr "" -#: config/c4x/c4x.h:204 -msgid "Pass arguments in registers" +#: config/ia64/ia64.c:4647 +#, c-format +msgid "ia64_print_operand: unknown code" msgstr "" -#: config/c4x/c4x.h:206 -msgid "Enable new features under development" -msgstr "" +#: config/ia64/ia64.c:8918 +#, fuzzy +msgid "invalid conversion from %<__fpreg%>" +msgstr "нерэчаісны рэжым для gen_tst_reg" -#: config/c4x/c4x.h:208 -msgid "Disable new features under development" -msgstr "" +#: config/ia64/ia64.c:8921 +#, fuzzy +msgid "invalid conversion to %<__fpreg%>" +msgstr "нерэчаісны %%-код" -#: config/c4x/c4x.h:210 -msgid "Use the BK register as a general purpose register" -msgstr "" +#: config/ia64/ia64.c:8934 config/ia64/ia64.c:8945 +#, fuzzy +msgid "invalid operation on %<__fpreg%>" +msgstr "нерэчаісны %%-код" -#: config/c4x/c4x.h:212 -msgid "Do not allocate BK register" -msgstr "" +#: config/iq2000/iq2000.c:3125 +#, fuzzy, c-format +msgid "invalid %%P operand" +msgstr "нерэчаісны %%-код" -#: config/c4x/c4x.h:214 -msgid "Enable use of DB instruction" +#: config/iq2000/iq2000.c:3133 config/rs6000/rs6000.c:10322 +#, c-format +msgid "invalid %%p value" msgstr "" -#: config/c4x/c4x.h:216 -msgid "Disable use of DB instruction" +#: config/iq2000/iq2000.c:3189 config/mips/mips.c:5532 +#, c-format +msgid "invalid use of %%d, %%x, or %%X" msgstr "" -#: config/c4x/c4x.h:218 -msgid "Enable debugging" -msgstr "" +#: config/m32r/m32r.c:1775 +#, fuzzy, c-format +msgid "invalid operand to %%s code" +msgstr "нерэчаісны %%-код" -#: config/c4x/c4x.h:220 -msgid "Disable debugging" -msgstr "" +#: config/m32r/m32r.c:1782 +#, fuzzy, c-format +msgid "invalid operand to %%p code" +msgstr "нерэчаісны %%-код" -#: config/c4x/c4x.h:222 -msgid "Force constants into registers to improve hoisting" +#: config/m32r/m32r.c:1837 +msgid "bad insn for 'A'" msgstr "" -#: config/c4x/c4x.h:224 -msgid "Don't force constants into registers" -msgstr "" +#: config/m32r/m32r.c:1884 +#, fuzzy, c-format +msgid "invalid operand to %%T/%%B code" +msgstr "нерэчаісны %%-код" -#: config/c4x/c4x.h:226 -msgid "Force RTL generation to emit valid 3 operand insns" -msgstr "" +#: config/m32r/m32r.c:1907 +#, fuzzy, c-format +msgid "invalid operand to %%N code" +msgstr "нерэчаісны %%-код" -#: config/c4x/c4x.h:228 -msgid "Allow RTL generation to emit invalid 3 operand insns" +#: config/m32r/m32r.c:1940 +msgid "pre-increment address is not a register" msgstr "" -#: config/c4x/c4x.h:230 -msgid "Allow unsigned iteration counts for RPTB/DB" +#: config/m32r/m32r.c:1947 +msgid "pre-decrement address is not a register" msgstr "" -#: config/c4x/c4x.h:232 -msgid "Disallow unsigned iteration counts for RPTB/DB" +#: config/m32r/m32r.c:1954 +msgid "post-increment address is not a register" msgstr "" -#: config/c4x/c4x.h:234 -msgid "Preserve all 40 bits of FP reg across call" -msgstr "" +#: config/m32r/m32r.c:2030 config/m32r/m32r.c:2044 +#: config/rs6000/rs6000.c:17547 +msgid "bad address" +msgstr "дрэнны адрас" -#: config/c4x/c4x.h:236 -msgid "Only preserve 32 bits of FP reg across call" -msgstr "" +#: config/m32r/m32r.c:2049 +#, fuzzy +msgid "lo_sum not of register" +msgstr "Не выкарыстоўваць рэгістра sb" -#: config/c4x/c4x.h:238 -msgid "Enable parallel instructions" +#. !!!! SCz wrong here. +#: config/m68hc11/m68hc11.c:3189 config/m68hc11/m68hc11.c:3567 +msgid "move insn not handled" msgstr "" -#: config/c4x/c4x.h:240 -msgid "Disable parallel instructions" +#: config/m68hc11/m68hc11.c:3413 config/m68hc11/m68hc11.c:3497 +#: config/m68hc11/m68hc11.c:3770 +msgid "invalid register in the move instruction" msgstr "" -#: config/c4x/c4x.h:242 -msgid "Enable MPY||ADD and MPY||SUB instructions" +#: config/m68hc11/m68hc11.c:3447 +msgid "invalid operand in the instruction" msgstr "" -#: config/c4x/c4x.h:244 -msgid "Disable MPY||ADD and MPY||SUB instructions" -msgstr "" +#: config/m68hc11/m68hc11.c:3744 +#, fuzzy +msgid "invalid register in the instruction" +msgstr "нявернае выкарыстанне \"restict\"" -#: config/c4x/c4x.h:246 -msgid "Assume that pointers may be aliased" +#: config/m68hc11/m68hc11.c:3777 +msgid "operand 1 must be a hard register" msgstr "" -#: config/c4x/c4x.h:248 -msgid "Assume that pointers not aliased" -msgstr "" +#: config/m68hc11/m68hc11.c:3791 +#, fuzzy +msgid "invalid rotate insn" +msgstr "Нерэчаісны выбар %s" -#: config/c4x/c4x.h:322 -msgid "Specify maximum number of iterations for RPTS" +#: config/m68hc11/m68hc11.c:4215 +msgid "registers IX, IY and Z used in the same INSN" msgstr "" -#: config/c4x/c4x.h:324 -msgid "Select CPU to generate code for" +#: config/m68hc11/m68hc11.c:4552 config/m68hc11/m68hc11.c:4852 +msgid "cannot do z-register replacement" msgstr "" -#. Use `%s' to print the string in case there are any escape -#. characters in the message. -#: config/cris/cris.c:578 c-typeck.c:4105 c-typeck.c:4120 c-typeck.c:4135 -#: final.c:2862 final.c:2864 gcc.c:4639 rtl-error.c:113 toplev.c:610 -#: cp/parser.c:1894 cp/typeck.c:4167 java/expr.c:409 java/verify.c:1539 -#: java/verify.c:1540 java/verify.c:1559 -#, gcc-internal-format -msgid "%s" +#: config/m68hc11/m68hc11.c:4915 +msgid "invalid Z register replacement for insn" msgstr "" -#: config/cris/cris.c:630 -msgid "unexpected index-type in cris_print_index" +#: config/mips/mips.c:5200 +msgid "mips_debugger_offset called with non stack/frame/arg pointer" msgstr "" -#: config/cris/cris.c:644 -msgid "unexpected base-type in cris_print_base" +#: config/mips/mips.c:5410 +#, c-format +msgid "PRINT_OPERAND, invalid insn for %%C" msgstr "" -#: config/cris/cris.c:1342 -msgid "invalid operand for 'b' modifier" +#: config/mips/mips.c:5427 +#, c-format +msgid "PRINT_OPERAND, invalid insn for %%N" msgstr "" -#: config/cris/cris.c:1355 -msgid "invalid operand for 'v' modifier" +#: config/mips/mips.c:5436 +#, c-format +msgid "PRINT_OPERAND, invalid insn for %%F" msgstr "" -#: config/cris/cris.c:1365 -msgid "invalid operand for 'P' modifier" +#: config/mips/mips.c:5445 +#, c-format +msgid "PRINT_OPERAND, invalid insn for %%W" msgstr "" -#: config/cris/cris.c:1372 -msgid "invalid operand for 'p' modifier" -msgstr "" +#: config/mips/mips.c:5466 +#, fuzzy, c-format +msgid "invalid %%Y value" +msgstr "дрэннае %%Q значэнне" -#: config/cris/cris.c:1411 -msgid "invalid operand for 'z' modifier" +#: config/mips/mips.c:5483 config/mips/mips.c:5491 +#, c-format +msgid "PRINT_OPERAND, invalid insn for %%q" msgstr "" -#: config/cris/cris.c:1459 config/cris/cris.c:1489 -msgid "invalid operand for 'H' modifier" +#: config/mips/mips.c:5560 +msgid "PRINT_OPERAND, invalid operand for relocation" msgstr "" -#: config/cris/cris.c:1465 -msgid "bad register" +#: config/mmix/mmix.c:1468 config/mmix/mmix.c:1598 +msgid "MMIX Internal: Expected a CONST_INT, not this" msgstr "" -#: config/cris/cris.c:1503 -msgid "invalid operand for 'e' modifier" +#: config/mmix/mmix.c:1547 +msgid "MMIX Internal: Bad value for 'm', not a CONST_INT" msgstr "" -#: config/cris/cris.c:1520 -msgid "invalid operand for 'm' modifier" +#: config/mmix/mmix.c:1566 +msgid "MMIX Internal: Expected a register, not this" msgstr "" -#: config/cris/cris.c:1545 -msgid "invalid operand for 'A' modifier" +#: config/mmix/mmix.c:1576 +msgid "MMIX Internal: Expected a constant, not this" msgstr "" -#: config/cris/cris.c:1553 -msgid "invalid operand for 'D' modifier" +#. We need the original here. +#: config/mmix/mmix.c:1660 +msgid "MMIX Internal: Cannot decode this operand" msgstr "" -#: config/cris/cris.c:1567 -msgid "invalid operand for 'T' modifier" +#: config/mmix/mmix.c:1717 +msgid "MMIX Internal: This is not a recognized address" msgstr "" -#: config/cris/cris.c:1576 -msgid "invalid operand modifier letter" +#: config/mmix/mmix.c:2650 +msgid "MMIX Internal: Trying to output invalidly reversed condition:" msgstr "" -#: config/cris/cris.c:1632 -msgid "unexpected multiplicative operand" +#: config/mmix/mmix.c:2657 +msgid "MMIX Internal: What's the CC of this?" msgstr "" -#: config/cris/cris.c:1652 -msgid "unexpected operand" +#: config/mmix/mmix.c:2661 +msgid "MMIX Internal: What is the CC of this?" msgstr "" -#: config/cris/cris.c:1685 config/cris/cris.c:1695 -msgid "unrecognized address" -msgstr "нераспазнаны адрас" +#: config/mmix/mmix.c:2725 +msgid "MMIX Internal: This is not a constant:" +msgstr "" -#: config/cris/cris.c:2498 config/cris/cris.c:2559 -#, fuzzy -msgid "unrecognized supposed constant" -msgstr "нераспазнаны выбар \"-%s\"" +#: config/ms1/ms1.c:302 +msgid "ms1_final_prescan_insn, invalid insn #1" +msgstr "" -#: config/cris/cris.c:2603 -msgid "unrecognized supposed constant in cris_global_pic_symbol" +#: config/ms1/ms1.c:373 +msgid "PRINT_OPERAND_ADDRESS, 2 regs" msgstr "" -#: config/cris/cris.c:2894 config/cris/cris.c:2939 -msgid "unexpected side-effects in address" +#: config/ms1/ms1.c:397 +msgid "PRINT_OPERAND_ADDRESS, invalid insn #1" msgstr "" -#: config/cris/cris.c:3008 -msgid "unexpected PIC symbol" +#: config/rs6000/host-darwin.c:83 +#, c-format +msgid "Out of stack space.\n" msgstr "" -#: config/cris/cris.c:3012 +#: config/rs6000/host-darwin.c:104 #, c-format -msgid "PIC register isn't set up" +msgid "Try running '%s' in the shell to raise its limit.\n" msgstr "" -#: config/cris/aout.h:85 -msgid "Compile for the MMU-less Etrax 100-based elinux system" +#: config/rs6000/rs6000.c:10152 +#, c-format +msgid "invalid %%f value" msgstr "" -#: config/cris/aout.h:92 -msgid "For elinux, request a specified stack-size for this program" +#: config/rs6000/rs6000.c:10161 +#, c-format +msgid "invalid %%F value" msgstr "" -#: config/cris/cris.h:354 -msgid "Work around bug in multiplication instruction" +#: config/rs6000/rs6000.c:10170 +#, c-format +msgid "invalid %%G value" msgstr "" -#. No "no-etrax" as it does not really imply any model. On the other hand, "etrax" implies the common (and large) subset matching all models. -#: config/cris/cris.h:360 -msgid "Compile for ETRAX 4 (CRIS v3)" +#: config/rs6000/rs6000.c:10205 +#, c-format +msgid "invalid %%j code" msgstr "" -#: config/cris/cris.h:365 -msgid "Compile for ETRAX 100 (CRIS v8)" +#: config/rs6000/rs6000.c:10215 +#, c-format +msgid "invalid %%J code" msgstr "" -#: config/cris/cris.h:369 -msgid "Emit verbose debug information in assembly code" +#: config/rs6000/rs6000.c:10225 +#, c-format +msgid "invalid %%k value" msgstr "" -#: config/cris/cris.h:372 -#, fuzzy -msgid "Do not use condition codes from normal instructions" -msgstr "Не генерыраваць сімвальныя інструкцыі" - -#: config/cris/cris.h:376 -msgid "Do not emit addressing modes with side-effect assignment" +#: config/rs6000/rs6000.c:10245 config/xtensa/xtensa.c:1677 +#, c-format +msgid "invalid %%K value" msgstr "" -#: config/cris/cris.h:379 -msgid "Do not tune stack alignment" -msgstr "" +#: config/rs6000/rs6000.c:10312 +#, c-format +msgid "invalid %%O value" +msgstr "нерэчаіснае значэньне %%O" -#: config/cris/cris.h:382 -msgid "Do not tune writable data alignment" +#: config/rs6000/rs6000.c:10359 +#, c-format +msgid "invalid %%q value" msgstr "" -#: config/cris/cris.h:385 -msgid "Do not tune code and read-only data alignment" +#: config/rs6000/rs6000.c:10403 +#, c-format +msgid "invalid %%S value" msgstr "" -#: config/cris/cris.h:394 -msgid "Align code and data to 32 bits" +#: config/rs6000/rs6000.c:10443 +#, c-format +msgid "invalid %%T value" msgstr "" -#: config/cris/cris.h:407 -msgid "Don't align items in code or data" +#: config/rs6000/rs6000.c:10453 +#, c-format +msgid "invalid %%u value" msgstr "" -#: config/cris/cris.h:410 -msgid "Do not emit function prologue or epilogue" +#: config/rs6000/rs6000.c:10462 config/xtensa/xtensa.c:1647 +#, c-format +msgid "invalid %%v value" msgstr "" -#. We have to handle this m-option here since we can't wash it off in both CC1_SPEC and CC1PLUS_SPEC. -#: config/cris/cris.h:414 -msgid "Use the most feature-enabling options allowed by other options" -msgstr "" +#: config/rs6000/rs6000.c:19064 +#, fuzzy +msgid "AltiVec argument passed to unprototyped function" +msgstr "не хапае аргументаў у функцыі" -#. We must call it "override-" since calling it "no-" will cause gcc.c to forget it, if there's a "later" -mbest-lib-options. Kludgy, but needed for some multilibbed files. -#: config/cris/cris.h:420 -msgid "Override -mbest-lib-options" +#: config/s390/s390.c:4175 +#, fuzzy, c-format +msgid "cannot decompose address" +msgstr "невядомая назва рэгістра: %s" + +#: config/s390/s390.c:4385 +msgid "UNKNOWN in print_operand !?" msgstr "" -#: config/cris/cris.h:452 -#, fuzzy -msgid "Generate code for the specified chip or CPU version" -msgstr "Генерыраваць код для дадзенага ЦП" +#: config/sh/sh.c:768 +#, fuzzy, c-format +msgid "invalid operand to %%R" +msgstr "нерэчаісны %%-код" -#: config/cris/cris.h:454 -msgid "Tune alignment for the specified chip or CPU version" +#: config/sh/sh.c:795 +#, fuzzy, c-format +msgid "invalid operand to %%S" +msgstr "нерэчаісны %%-код" + +#: config/sh/sh.c:7661 +msgid "created and used with different architectures / ABIs" msgstr "" -#: config/cris/cris.h:456 -msgid "Warn when a stackframe is larger than the specified size" +#: config/sh/sh.c:7663 +msgid "created and used with different ABIs" msgstr "" -#: config/cris/linux.h:69 -msgid "Together with -fpic and -fPIC, do not use GOTPLT references" +#: config/sh/sh.c:7665 +msgid "created and used with different endianness" msgstr "" -#: config/fr30/fr30.c:468 +#: config/sparc/sparc.c:6610 config/sparc/sparc.c:6616 #, c-format -msgid "fr30_print_operand_address: unhandled address" -msgstr "" +msgid "invalid %%Y operand" +msgstr "нерэчаісны %%Y аперанд" -#: config/fr30/fr30.c:492 +#: config/sparc/sparc.c:6686 #, c-format -msgid "fr30_print_operand: unrecognized %%p code" -msgstr "" +msgid "invalid %%A operand" +msgstr "нерэчаісны %%A аперанд" -#: config/fr30/fr30.c:512 +#: config/sparc/sparc.c:6696 #, c-format -msgid "fr30_print_operand: unrecognized %%b code" -msgstr "" +msgid "invalid %%B operand" +msgstr "нерэчаісны %%B аперанд" -#: config/fr30/fr30.c:533 +#: config/sparc/sparc.c:6735 #, c-format -msgid "fr30_print_operand: unrecognized %%B code" -msgstr "" +msgid "invalid %%c operand" +msgstr "нерэчаісны %%c аперанд" -#: config/fr30/fr30.c:541 +#: config/sparc/sparc.c:6736 #, c-format -msgid "fr30_print_operand: invalid operand to %%A code" -msgstr "" +msgid "invalid %%C operand" +msgstr "нерэчаісны %%C аперанд" -#: config/fr30/fr30.c:558 +#: config/sparc/sparc.c:6757 #, c-format -msgid "fr30_print_operand: invalid %%x code" -msgstr "" +msgid "invalid %%d operand" +msgstr "нерэчаісны %%d аперанд" -#: config/fr30/fr30.c:565 +#: config/sparc/sparc.c:6758 #, c-format -msgid "fr30_print_operand: invalid %%F code" -msgstr "" +msgid "invalid %%D operand" +msgstr "нерэчаісны %%D аперанд" -#: config/fr30/fr30.c:582 +#: config/sparc/sparc.c:6774 #, c-format -msgid "fr30_print_operand: unknown code" -msgstr "" +msgid "invalid %%f operand" +msgstr "нерэчаісны %%f аперанд" + +#: config/sparc/sparc.c:6788 +#, fuzzy, c-format +msgid "invalid %%s operand" +msgstr "нерэчаісны %%f аперанд" -#: config/fr30/fr30.c:611 config/fr30/fr30.c:620 config/fr30/fr30.c:631 -#: config/fr30/fr30.c:644 +#: config/sparc/sparc.c:6842 #, c-format -msgid "fr30_print_operand: unhandled MEM" +msgid "long long constant not a valid immediate operand" msgstr "" -#: config/fr30/fr30.h:64 -msgid "Assume small address space" +#: config/sparc/sparc.c:6845 +#, c-format +msgid "floating point constant not a valid immediate operand" msgstr "" -#: config/frv/frv.c:2539 -msgid "Bad insn to frv_print_operand_address:" -msgstr "" +#: config/stormy16/stormy16.c:1764 config/stormy16/stormy16.c:1835 +#, fuzzy, c-format +msgid "'B' operand is not constant" +msgstr "тып параметра \"%s\" не аб'яўлены" -#: config/frv/frv.c:2550 -msgid "Bad register to frv_print_operand_memory_reference_reg:" +#: config/stormy16/stormy16.c:1791 +#, c-format +msgid "'B' operand has multiple bits set" msgstr "" -#: config/frv/frv.c:2589 config/frv/frv.c:2599 config/frv/frv.c:2608 -#: config/frv/frv.c:2629 config/frv/frv.c:2634 -msgid "Bad insn to frv_print_operand_memory_reference:" -msgstr "" +#: config/stormy16/stormy16.c:1817 +#, fuzzy, c-format +msgid "'o' operand is not constant" +msgstr "тып параметра \"%s\" не аб'яўлены" -#: config/frv/frv.c:2721 +#: config/stormy16/stormy16.c:1849 #, c-format -msgid "bad condition code" +msgid "xstormy16_print_operand: unknown code" msgstr "" -#: config/frv/frv.c:2796 -msgid "Bad insn in frv_print_operand, bad const_double" +#: config/v850/v850.c:360 +msgid "const_double_split got a bad insn:" msgstr "" -#: config/frv/frv.c:2857 -msgid "Bad insn to frv_print_operand, 'e' modifier:" +#: config/v850/v850.c:924 +msgid "output_move_single:" msgstr "" -#: config/frv/frv.c:2865 -msgid "Bad insn to frv_print_operand, 'F' modifier:" +#: config/xtensa/xtensa.c:748 config/xtensa/xtensa.c:780 +#: config/xtensa/xtensa.c:789 +msgid "bad test" msgstr "" -#: config/frv/frv.c:2881 -msgid "Bad insn to frv_print_operand, 'f' modifier:" -msgstr "" +#: config/xtensa/xtensa.c:1635 +#, fuzzy, c-format +msgid "invalid %%D value" +msgstr "дрэннае %%Q значэнне" + +#: config/xtensa/xtensa.c:1672 +msgid "invalid mask" +msgstr "нерэчаісная маска" + +#: config/xtensa/xtensa.c:1698 +#, fuzzy, c-format +msgid "invalid %%x value" +msgstr "нерэчаіснае значэньне %%x/X" + +#: config/xtensa/xtensa.c:1705 +#, fuzzy, c-format +msgid "invalid %%d value" +msgstr "дрэннае %%Q значэнне" + +#: config/xtensa/xtensa.c:1726 config/xtensa/xtensa.c:1736 +#, fuzzy, c-format +msgid "invalid %%t/%%b value" +msgstr "дрэннае %%Q значэнне" + +#: config/xtensa/xtensa.c:1778 +msgid "invalid address" +msgstr "нерэчаісны адрас" + +#: config/xtensa/xtensa.c:1803 +#, fuzzy +msgid "no register in address" +msgstr "невядомая назва рэгістра: %s" -#: config/frv/frv.c:2895 -msgid "Bad insn to frv_print_operand, 'g' modifier:" +#: config/xtensa/xtensa.c:1811 +msgid "address offset not a constant" msgstr "" -#: config/frv/frv.c:2943 -msgid "Bad insn to frv_print_operand, 'L' modifier:" +#: cp/call.c:2444 +msgid "candidates are:" msgstr "" -#: config/frv/frv.c:2956 -msgid "Bad insn to frv_print_operand, 'M/N' modifier:" +#: cp/call.c:6216 +msgid "candidate 1:" msgstr "" -#: config/frv/frv.c:2977 -msgid "Bad insn to frv_print_operand, 'O' modifier:" +#: cp/call.c:6217 +msgid "candidate 2:" msgstr "" -#: config/frv/frv.c:2995 -msgid "Bad insn to frv_print_operand, P modifier:" +#: cp/decl2.c:695 +msgid "candidates are: %+#D" msgstr "" -#: config/frv/frv.c:3015 -msgid "Bad insn in frv_print_operand, z case" +#: cp/decl2.c:697 +msgid "candidate is: %+#D" msgstr "" -#: config/frv/frv.c:3046 -msgid "Bad insn in frv_print_operand, 0 case" +#: cp/g++spec.c:238 java/jvspec.c:417 +#, fuzzy, c-format +msgid "argument to '%s' missing\n" +msgstr "аргумент для \"%s\" прапушчан" + +#: fortran/arith.c:141 +msgid "Arithmetic OK at %L" msgstr "" -#: config/frv/frv.c:3051 -msgid "frv_print_operand: unknown code" +#: fortran/arith.c:144 +msgid "Arithmetic overflow at %L" msgstr "" -#: config/frv/frv.c:5944 -msgid "Bad output_move_single operand" +#: fortran/arith.c:147 +msgid "Arithmetic underflow at %L" msgstr "" -#: config/frv/frv.c:6071 -msgid "Bad output_move_double operand" +#: fortran/arith.c:150 +msgid "Arithmetic NaN at %L" msgstr "" -#: config/frv/frv.c:6213 -msgid "Bad output_condmove_single operand" +#: fortran/arith.c:153 +msgid "Division by zero at %L" msgstr "" -#. 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 -#: config/frv/frv.h:550 -#, c-format -msgid " (frv)" +#: fortran/arith.c:156 +msgid "Array operands are incommensurate at %L" msgstr "" -#. 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. -#: config/h8300/h8300.h:159 -#, fuzzy -msgid "Generate H8S code" -msgstr "Стварыць код для DLL" +#: fortran/arith.c:160 +msgid "Integer outside symmetric range implied by Standard Fortran at %L" +msgstr "" -#: config/h8300/h8300.h:160 +#: fortran/arith.c:1384 #, fuzzy -msgid "Do not generate H8S code" -msgstr "Не ствараць код для 68851" +msgid "Elemental binary operation" +msgstr "прапушчан ініцыялізатар" -#: config/h8300/h8300.h:161 -#, fuzzy -msgid "Generate H8SX code" -msgstr "Стварыць код для DLL" +#: fortran/arith.c:1914 +#, no-c-format +msgid "Arithmetic OK converting %s to %s at %L" +msgstr "" -#: config/h8300/h8300.h:162 -#, fuzzy -msgid "Do not generate H8SX code" -msgstr "Не ствараць код для 68851" +#: fortran/arith.c:1918 +#, no-c-format +msgid "Arithmetic overflow converting %s to %s at %L" +msgstr "" -#: config/h8300/h8300.h:163 -msgid "Generate H8S/2600 code" +#: fortran/arith.c:1922 +#, no-c-format +msgid "Arithmetic underflow converting %s to %s at %L" msgstr "" -#: config/h8300/h8300.h:164 -#, fuzzy -msgid "Do not generate H8S/2600 code" -msgstr "Стварыць код для DLL" +#: fortran/arith.c:1926 +#, no-c-format +msgid "Arithmetic NaN converting %s to %s at %L" +msgstr "" -#: config/h8300/h8300.h:165 -msgid "Make integers 32 bits wide" +#: fortran/arith.c:1930 +#, no-c-format +msgid "Division by zero converting %s to %s at %L" msgstr "" -#: config/h8300/h8300.h:168 -msgid "Use registers for argument passing" +#: fortran/arith.c:1934 +#, no-c-format +msgid "Array operands are incommensurate converting %s to %s at %L" msgstr "" -#: config/h8300/h8300.h:170 -msgid "Do not use registers for argument passing" +#: fortran/arith.c:1938 +#, no-c-format +msgid "Integer outside symmetric range implied by Standard Fortran converting %s to %s at %L" msgstr "" -#: config/h8300/h8300.h:172 -msgid "Consider access to byte sized memory slow" +#: fortran/arith.c:2271 fortran/arith.c:2306 fortran/arith.c:2343 +#: fortran/arith.c:2393 +#, fuzzy, no-c-format +msgid "The Hollerith constant at %L is too long to convert to %s" +msgstr "сімвальная канстанта вельмі доўгая" + +#: fortran/arith.c:2439 +#, no-c-format +msgid "Enumerator exceeds the C integer type at %C" msgstr "" -#: config/h8300/h8300.h:173 -msgid "Enable linker relaxing" +#: fortran/array.c:97 +#, no-c-format +msgid "Expected array subscript at %C" msgstr "" -#: config/h8300/h8300.h:174 -msgid "Generate H8/300H code" +#: fortran/array.c:124 +#, no-c-format +msgid "Expected array subscript stride at %C" msgstr "" -#: config/h8300/h8300.h:175 -msgid "Enable the normal mode" +#: fortran/array.c:167 +#, no-c-format +msgid "Invalid form of array reference at %C" msgstr "" -#: config/h8300/h8300.h:176 -msgid "Do not generate H8/300H code" +#: fortran/array.c:172 +#, no-c-format +msgid "Array reference at %C cannot have more than %d dimensions" msgstr "" -#: config/h8300/h8300.h:177 -msgid "Use H8/300 alignment rules" +#: fortran/array.c:224 +#, no-c-format +msgid "Variable '%s' at %L in this context must be constant" msgstr "" -#: config/i386/i386.c:6032 -#, c-format -msgid "invalid UNSPEC as operand" +#: fortran/array.c:300 +#, no-c-format +msgid "Expected expression in array specification at %C" msgstr "" -#: config/i386/i386.c:6601 -#, c-format -msgid "operand is neither a constant nor a condition code, invalid operand code 'c'" +#: fortran/array.c:379 +#, no-c-format +msgid "Bad array specification for an explicitly shaped array at %C" msgstr "" -#: config/i386/i386.c:6654 -#, fuzzy, c-format -msgid "invalid operand code '%c'" -msgstr "Нерэчаісны выбар \"%s\"" +#: fortran/array.c:390 +#, no-c-format +msgid "Bad array specification for assumed shape array at %C" +msgstr "" -#: config/i386/i386.c:6697 -#, fuzzy, c-format -msgid "invalid constraints for operand" -msgstr "нерэчаісны %%c аперанд" +#: fortran/array.c:403 +#, no-c-format +msgid "Bad specification for deferred shape array at %C" +msgstr "" -#: config/i386/i386.c:11977 -#, fuzzy -msgid "unknown insn mode" -msgstr "невядомы рэжым машыны \"%s\"" +#: fortran/array.c:407 +#, no-c-format +msgid "Bad specification for assumed size array at %C" +msgstr "" -#: config/i386/cygming.h:61 -msgid "Use the Cygwin interface" +#: fortran/array.c:416 +#, no-c-format +msgid "Expected another dimension in array declaration at %C" msgstr "" -#: config/i386/cygming.h:62 -msgid "Use the Mingw32 interface" +#: fortran/array.c:422 +#, no-c-format +msgid "Array specification at %C has more than %d dimensions" msgstr "" -#: config/i386/cygming.h:63 -msgid "Create GUI application" -msgstr "Стварыць GUI прыдатак" +#: fortran/array.c:627 +#, fuzzy, no-c-format +msgid "duplicated initializer" +msgstr "нерэчаісны ініцыялізатар" -#: config/i386/cygming.h:64 -msgid "Don't set Windows defines" +#: fortran/array.c:720 +#, no-c-format +msgid "DO-iterator '%s' at %L is inside iterator of the same name" msgstr "" -#: config/i386/cygming.h:65 -msgid "Set Windows defines" +#: fortran/array.c:822 fortran/array.c:931 +#, no-c-format +msgid "Syntax error in array constructor at %C" msgstr "" -#: config/i386/cygming.h:66 -msgid "Create console application" -msgstr "Стварыць кансольны прыдатак" - -#: config/i386/cygming.h:67 -msgid "Generate code for a DLL" -msgstr "Стварыць код для DLL" +#: fortran/array.c:877 +#, no-c-format +msgid "New in Fortran 2003: [...] style array constructors at %C" +msgstr "" -#: config/i386/cygming.h:69 -msgid "Ignore dllimport for functions" +#: fortran/array.c:891 +#, no-c-format +msgid "Empty array constructor at %C is not allowed" msgstr "" -#: config/i386/cygming.h:71 -msgid "Use Mingw-specific thread support" +#: fortran/array.c:976 +#, no-c-format +msgid "Element in %s array constructor at %L is %s" msgstr "" -#. Deprecated. -#. Deprecated. -#. Deprecated. -#. Deprecated. -#. Deprecated. -#. Deprecated. -#: config/i386/i386.h:347 -msgid "Alternate calling convention" +#: fortran/array.c:1305 +#, no-c-format +msgid "Iterator step at %L cannot be zero" msgstr "" -#: config/i386/i386.h:349 config/m68k/m68k.h:336 config/ns32k/ns32k.h:144 -msgid "Use normal calling convention" +#: fortran/check.c:44 +#, no-c-format +msgid "'%s' argument of '%s' intrinsic at %L must be %s" msgstr "" -#: config/i386/i386.h:351 -msgid "Align some doubles on dword boundary" +#: fortran/check.c:60 +#, no-c-format +msgid "'%s' argument of '%s' intrinsic at %L must be a numeric type" msgstr "" -#: config/i386/i386.h:353 -msgid "Align doubles on word boundary" +#: fortran/check.c:75 fortran/check.c:640 fortran/check.c:650 +#, no-c-format +msgid "'%s' argument of '%s' intrinsic at %L must be INTEGER or REAL" msgstr "" -#: config/i386/i386.h:355 -msgid "Uninitialized locals in .bss" +#: fortran/check.c:92 +#, no-c-format +msgid "'%s' argument of '%s' intrinsic at %L must be REAL or COMPLEX" msgstr "" -#: config/i386/i386.h:357 -msgid "Uninitialized locals in .data" +#: fortran/check.c:118 +#, fuzzy, no-c-format +msgid "'%s' argument of '%s' intrinsic at %L must be a constant" +msgstr "аргумент `__builtin_args_info' павінен быць канстантай" + +#: fortran/check.c:126 +#, fuzzy, no-c-format +msgid "Invalid kind for %s at %L" +msgstr "`%E' - нерэчаісная нязьменная тыпу string" + +#: fortran/check.c:146 +#, no-c-format +msgid "'%s' argument of '%s' intrinsic at %L must be double precision" msgstr "" -#: config/i386/i386.h:359 config/m68k/linux.h:42 config/ns32k/ns32k.h:167 -msgid "Use IEEE math for fp comparisons" +#: fortran/check.c:163 +#, no-c-format +msgid "'%s' argument of '%s' intrinsic at %L must be a logical array" msgstr "" -#: config/i386/i386.h:361 config/ns32k/ns32k.h:169 -msgid "Do not use IEEE math for fp comparisons" +#: fortran/check.c:180 +#, no-c-format +msgid "'%s' argument of '%s' intrinsic at %L must be an array" msgstr "" -#: config/i386/i386.h:363 -msgid "Return values of functions in FPU registers" +#: fortran/check.c:195 +#, no-c-format +msgid "'%s' argument of '%s' intrinsic at %L must be a scalar" msgstr "" -#: config/i386/i386.h:365 -msgid "Do not return values of functions in FPU registers" +#: fortran/check.c:210 +#, no-c-format +msgid "'%s' argument of '%s' intrinsic at %L must be the same type and kind as '%s'" msgstr "" -#: config/i386/i386.h:367 -msgid "Do not generate sin, cos, sqrt for FPU" +#: fortran/check.c:225 +#, no-c-format +msgid "'%s' argument of '%s' intrinsic at %L must be of rank %d" msgstr "" -#: config/i386/i386.h:369 -msgid "Generate sin, cos, sqrt for FPU" +#: fortran/check.c:239 +#, no-c-format +msgid "'%s' argument of '%s' intrinsic at %L must not be OPTIONAL" msgstr "" -#: config/i386/i386.h:371 -msgid "Omit the frame pointer in leaf functions" +#: fortran/check.c:259 +#, no-c-format +msgid "'%s' argument of '%s' intrinsic at %L must be of kind %d" msgstr "" -#: config/i386/i386.h:374 -msgid "Enable stack probing" +#: fortran/check.c:280 +#, no-c-format +msgid "'%s' argument of '%s' intrinsic at %L cannot be INTENT(IN)" msgstr "" -#. undocumented -#. undocumented -#: config/i386/i386.h:379 -msgid "Align destination of the string operations" +#: fortran/check.c:286 +#, no-c-format +msgid "'%s' argument of '%s' intrinsic at %L must be a variable" msgstr "" -#: config/i386/i386.h:381 -msgid "Do not align destination of the string operations" +#: fortran/check.c:311 +#, no-c-format +msgid "Missing DIM parameter in intrinsic '%s' at %L" msgstr "" -#: config/i386/i386.h:383 -msgid "Inline all known string operations" +#: fortran/check.c:348 +#, no-c-format +msgid "'dim' argument of '%s' intrinsic at %L is not a valid dimension index" msgstr "" -#: config/i386/i386.h:385 -msgid "Do not inline all known string operations" +#: fortran/check.c:434 +#, no-c-format +msgid "'%s' argument of '%s' intrinsic at %L must be ALLOCATABLE" msgstr "" -#: config/i386/i386.h:387 config/i386/i386.h:391 -msgid "Use push instructions to save outgoing arguments" +#: fortran/check.c:473 fortran/check.c:1619 +#, no-c-format +msgid "'%s' argument of '%s' intrinsic at %L must be a POINTER" msgstr "" -#: config/i386/i386.h:389 config/i386/i386.h:393 -msgid "Do not use push instructions to save outgoing arguments" +#: fortran/check.c:485 +#, no-c-format +msgid "NULL pointer at %L is not permitted as actual argument of '%s' intrinsic function" msgstr "" -#: config/i386/i386.h:395 -msgid "Support MMX built-in functions" +#: fortran/check.c:494 +#, no-c-format +msgid "'%s' argument of '%s' intrinsic at %L must be a POINTER or a TARGET" msgstr "" -#: config/i386/i386.h:397 -msgid "Do not support MMX built-in functions" +#: fortran/check.c:510 +#, no-c-format +msgid "Array section with a vector subscript at %L shall not be the target of a pointer" msgstr "" -#: config/i386/i386.h:399 -msgid "Support 3DNow! built-in functions" +#: fortran/check.c:620 fortran/check.c:722 +#, no-c-format +msgid "'%s' argument of '%s' intrinsic at %L must not be present if 'x' is COMPLEX" msgstr "" -#: config/i386/i386.h:401 -msgid "Do not support 3DNow! built-in functions" +#: fortran/check.c:771 fortran/check.c:1423 fortran/check.c:1431 +#, no-c-format +msgid "'%s' argument of '%s' intrinsic at %L must be numeric or LOGICAL" msgstr "" -#: config/i386/i386.h:403 -msgid "Support MMX and SSE built-in functions and code generation" +#: fortran/check.c:920 fortran/check.c:1055 fortran/check.c:1118 +#: fortran/check.c:1343 +#, no-c-format +msgid "Extension: Different type kinds at %L" msgstr "" -#: config/i386/i386.h:405 -msgid "Do not support MMX and SSE built-in functions and code generation" +#: fortran/check.c:1025 +#, fuzzy, no-c-format +msgid "Argument of %s at %L must be of length one" +msgstr "першым аргументам \"%s\" павінен быць \"int\"" + +#: fortran/check.c:1077 +#, no-c-format +msgid "'%s' argument of '%s' intrinsic at %L must be the same kind as '%s'" msgstr "" -#: config/i386/i386.h:407 -msgid "Support MMX, SSE and SSE2 built-in functions and code generation" +#: fortran/check.c:1192 +#, no-c-format +msgid "'%s' argument of '%s' intrinsic at %L must be a non-derived type" msgstr "" -#: config/i386/i386.h:409 -msgid "Do not support MMX, SSE and SSE2 built-in functions and code generation" +#: fortran/check.c:1315 +#, no-c-format +msgid "Intrinsic '%s' at %L must have at least two arguments" msgstr "" -#: config/i386/i386.h:411 -msgid "Support MMX, SSE, SSE2 and SSE3 built-in functions and code generation" +#: fortran/check.c:1349 +#, no-c-format +msgid "'a%d' argument of '%s' intrinsic at %L must be %s(%d)" msgstr "" -#: config/i386/i386.h:413 -msgid "Do not support MMX, SSE, SSE2 and SSE3 built-in functions and code generation" +#: fortran/check.c:1374 +#, no-c-format +msgid "'a1' argument of '%s' intrinsic at %L must be INTEGER or REAL" msgstr "" -#: config/i386/i386.h:415 -msgid "sizeof(long double) is 16" +#: fortran/check.c:1452 +#, no-c-format +msgid "'%s' argument of '%s' intrinsic at %L must be of rank 1 or 2" msgstr "" -#: config/i386/i386.h:417 -msgid "sizeof(long double) is 12" +#: fortran/check.c:1640 +#, no-c-format +msgid "'%s' argument of '%s' intrinsic at %L must be conformable with '%s' argument" msgstr "" -#: config/i386/i386.h:419 -msgid "Generate 64bit x86-64 code" +#: fortran/check.c:1667 +#, no-c-format +msgid "'%s' argument of '%s' intrinsic at %L must be of type REAL or COMPLEX" msgstr "" -#: config/i386/i386.h:421 -msgid "Generate 32bit i386 code" +#: fortran/check.c:1688 +#, no-c-format +msgid "'%s' argument of '%s' intrinsic at %L must be of a dummy variable" msgstr "" -#: config/i386/i386.h:423 -msgid "Use native (MS) bitfield layout" +#: fortran/check.c:1696 +#, no-c-format +msgid "'%s' argument of '%s' intrinsic at %L must be of an OPTIONAL dummy variable" msgstr "" -#: config/i386/i386.h:425 -msgid "Use gcc default bitfield layout" +#: fortran/check.c:1812 +#, no-c-format +msgid "'shape' argument of 'reshape' intrinsic at %L must be an array of constant size" msgstr "" -#: config/i386/i386.h:427 -msgid "Use red-zone in the x86-64 code" +#: fortran/check.c:1822 +#, no-c-format +msgid "'shape' argument of 'reshape' intrinsic at %L has more than %d elements" msgstr "" -#: config/i386/i386.h:429 -msgid "Do not use red-zone in the x86-64 code" +#: fortran/check.c:1910 +#, fuzzy, no-c-format +msgid "Missing arguments to %s intrinsic at %L" +msgstr "аргумент для \"%s\" прапушчан" + +#: fortran/check.c:1951 +#, no-c-format +msgid "'source' argument of 'shape' intrinsic at %L must not be an assumed size array" msgstr "" -#: config/i386/i386.h:431 -#, c-format -msgid "Use direct references against %gs when accessing tls data" +#: fortran/check.c:2013 +#, fuzzy, no-c-format +msgid "'%s' argument of '%s' intrinsic at %L must be less than rank %d" +msgstr "памер \"%s\" больш чам %d байт" + +#: fortran/check.c:2470 fortran/check.c:2490 +#, fuzzy, no-c-format +msgid "Too many arguments to %s at %L" +msgstr "вельмі шмат аргументаў у функцыі \"%s\"" + +#: fortran/check.c:2618 fortran/check.c:2980 fortran/check.c:3004 +#, no-c-format +msgid "'%s' argument of '%s' intrinsic at %L must be INTEGER or PROCEDURE" msgstr "" -#: config/i386/i386.h:433 -#, c-format -msgid "Do not use direct references against %gs when accessing tls data" +#: fortran/check.c:3051 fortran/check.c:3059 +#, no-c-format +msgid "'%s' argument of '%s' intrinsic at %L must be INTEGER or LOGICAL" msgstr "" -#. This macro is similar to `TARGET_SWITCHES' but defines names of -#. command options that have values. Its definition is an -#. initializer with a subgrouping for each command option. -#. -#. Each subgrouping contains a string constant, that defines the -#. fixed part of the option name, and the address of a variable. The -#. variable, type `char *', is set to the variable part of the given -#. option if the fixed part matches. The actual option name is made -#. by appending `-m' to the specified name. -#: config/i386/i386.h:471 config/ia64/ia64.h:280 config/rs6000/rs6000.h:453 -#: config/s390/s390.h:158 config/sparc/sparc.h:720 -msgid "Schedule code for given CPU" +#: fortran/check.c:3066 +#, no-c-format +msgid "'%s' and '%s' arguments of '%s' intrinsic at %L must have the same type" msgstr "" -#: config/i386/i386.h:473 -msgid "Generate floating point mathematics using given instruction set" +#: fortran/data.c:63 +#, no-c-format +msgid "non-constant array in DATA statement %L." msgstr "" -#: config/i386/i386.h:475 config/s390/s390.h:160 -msgid "Generate code for given CPU" -msgstr "Генерыраваць код для дадзенага ЦП" +#: fortran/data.c:327 +#, fuzzy, no-c-format +msgid "Extension: re-initialization of '%s' at %L" +msgstr "ініцыялізацыя" -#: config/i386/i386.h:477 -msgid "Number of registers used to pass integer arguments" +#: fortran/decl.c:208 +#, no-c-format +msgid "Host associated variable '%s' may not be in the DATA statement at %C." msgstr "" -#: config/i386/i386.h:479 -msgid "Loop code aligned to this power of 2" +#: fortran/decl.c:215 +#, no-c-format +msgid "Extension: initialization of common block variable '%s' in DATA statement at %C" msgstr "" -#: config/i386/i386.h:481 -msgid "Jump targets are aligned to this power of 2" +#: fortran/decl.c:301 +#, no-c-format +msgid "Symbol '%s' must be a PARAMETER in DATA statement at %C" msgstr "" -#: config/i386/i386.h:483 -msgid "Function starts are aligned to this power of 2" +#: fortran/decl.c:408 +#, no-c-format +msgid "Initialization at %C is not allowed in a PURE procedure" msgstr "" -#: config/i386/i386.h:486 -msgid "Attempt to keep stack aligned to this power of 2" +#: fortran/decl.c:455 +#, no-c-format +msgid "DATA statement at %C is not allowed in a PURE procedure" msgstr "" -#: config/i386/i386.h:488 -msgid "Branches are this expensive (1-5, arbitrary units)" +#: fortran/decl.c:483 +#, no-c-format +msgid "Bad INTENT specification at %C" msgstr "" -#: config/i386/i386.h:490 -msgid "Use given x86-64 code model" +#: fortran/decl.c:547 +#, no-c-format +msgid "Syntax error in character length specification at %C" msgstr "" -#. Undocumented. -#. Undocumented. -#: config/i386/i386.h:496 -msgid "Use given assembler dialect" -msgstr "Выкарыстоўвываць зададзены дыялект асэмблера" - -#: config/i386/i386.h:498 -#, fuzzy -msgid "Use given thread-local storage dialect" -msgstr "Выкарыстоўвываць зададзены дыялект асэмблера" - -#: config/i386/sco5.h:290 -msgid "Generate ELF output" -msgstr "Стварыць ELF-вывад" - -#. If the environment variable DJDIR is not defined, then DJGPP is not installed correctly and GCC will quickly become confused with the default prefix settings. Report the problem now so the user doesn't receive deceptive "file not found" error messages later. -#. DJDIR is automatically defined by the DJGPP environment config file pointed to by the environment variable DJGPP. Examine DJGPP to try and figure out what's wrong. -#: config/i386/xm-djgpp.h:62 -#, c-format -msgid "environment variable DJGPP not defined" +#: fortran/decl.c:779 +#, no-c-format +msgid "Initializer not allowed for PARAMETER '%s' at %C" msgstr "" -#: config/i386/xm-djgpp.h:64 -#, c-format -msgid "environment variable DJGPP points to missing file '%s'" +#: fortran/decl.c:788 +#, no-c-format +msgid "Initializer not allowed for COMMON variable '%s' at %C" msgstr "" -#: config/i386/xm-djgpp.h:67 -#, c-format -msgid "environment variable DJGPP points to corrupt file '%s'" -msgstr "" +#: fortran/decl.c:798 +#, fuzzy, no-c-format +msgid "PARAMETER at %L is missing an initializer" +msgstr "прапушчан ініцыялізатар" -#. 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. -#: config/i860/i860.h:60 -msgid "Generate code which uses the FPU" +#: fortran/decl.c:809 +#, no-c-format +msgid "Variable '%s' at %C with an initializer already appears in a DATA statement" msgstr "" -#: config/i860/i860.h:61 config/i860/i860.h:62 -msgid "Do not generate code which uses the FPU" +#: fortran/decl.c:887 +#, no-c-format +msgid "Component at %C must have the POINTER attribute" msgstr "" -#: config/ia64/ia64.c:4302 -#, c-format -msgid "ia64_print_operand: unknown code" +#: fortran/decl.c:896 +#, no-c-format +msgid "Array component of structure at %C must have explicit or deferred shape" msgstr "" -#. 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. -#: config/ia64/ia64.h:178 -msgid "Generate big endian code" +#: fortran/decl.c:925 +#, no-c-format +msgid "Pointer array component of structure at %C must have a deferred shape" msgstr "" -#: config/ia64/ia64.h:180 config/mcore/mcore.h:146 -msgid "Generate little endian code" +#: fortran/decl.c:935 +#, no-c-format +msgid "Array component of structure at %C must have an explicit shape" msgstr "" -#: config/ia64/ia64.h:182 -msgid "Generate code for GNU as" -msgstr "Генерыраваць код для GNU as" - -#: config/ia64/ia64.h:184 -msgid "Generate code for Intel as" -msgstr "Генерыраваць код для Intel as" - -#: config/ia64/ia64.h:186 -msgid "Generate code for GNU ld" -msgstr "Генерыраваць код для GNU ld" - -#: config/ia64/ia64.h:188 -msgid "Generate code for Intel ld" -msgstr "Генерыраваць код для Intel ld" - -#: config/ia64/ia64.h:190 -msgid "Generate code without GP reg" -msgstr "Генерыраваць код без GP reg" - -#: config/ia64/ia64.h:192 -msgid "Emit stop bits before and after volatile extended asms" +#: fortran/decl.c:961 +#, no-c-format +msgid "NULL() initialization at %C is ambiguous" msgstr "" -#: config/ia64/ia64.h:194 -msgid "Don't emit stop bits before and after volatile extended asms" +#: fortran/decl.c:1028 +#, no-c-format +msgid "Enumerator cannot be array at %C" msgstr "" -#: config/ia64/ia64.h:196 -msgid "Use in/loc/out register names" +#: fortran/decl.c:1089 fortran/decl.c:3297 +#, no-c-format +msgid "Duplicate array spec for Cray pointee at %C." msgstr "" -#: config/ia64/ia64.h:198 -msgid "Disable use of sdata/scommon/sbss" +#: fortran/decl.c:1141 +#, no-c-format +msgid "Function name '%s' not allowed at %C" msgstr "" -#: config/ia64/ia64.h:200 -msgid "Enable use of sdata/scommon/sbss" +#: fortran/decl.c:1157 +#, no-c-format +msgid "Extension: Old-style initialization at %C" msgstr "" -#: config/ia64/ia64.h:202 -msgid "gp is constant (but save/restore gp on indirect calls)" +#: fortran/decl.c:1173 +#, no-c-format +msgid "Initialization at %C isn't for a pointer variable" msgstr "" -#: config/ia64/ia64.h:204 -msgid "Generate self-relocatable code" +#: fortran/decl.c:1181 +#, no-c-format +msgid "Pointer initialization requires a NULL at %C" msgstr "" -#: config/ia64/ia64.h:206 -msgid "Generate inline floating point division, optimize for latency" +#: fortran/decl.c:1188 +#, no-c-format +msgid "Initialization of pointer at %C is not allowed in a PURE procedure" msgstr "" -#: config/ia64/ia64.h:208 -msgid "Generate inline floating point division, optimize for throughput" +#: fortran/decl.c:1204 +#, no-c-format +msgid "Pointer initialization at %C requires '=>', not '='" msgstr "" -#: config/ia64/ia64.h:211 -msgid "Do not inline floating point division" +#: fortran/decl.c:1212 +#, no-c-format +msgid "Expected an initialization expression at %C" msgstr "" -#: config/ia64/ia64.h:213 -msgid "Generate inline integer division, optimize for latency" +#: fortran/decl.c:1219 +#, no-c-format +msgid "Initialization of variable at %C is not allowed in a PURE procedure" msgstr "" -#: config/ia64/ia64.h:215 -msgid "Generate inline integer division, optimize for throughput" +#: fortran/decl.c:1241 +#, no-c-format +msgid "ENUMERATOR %L not initialized with integer expression" msgstr "" -#: config/ia64/ia64.h:217 -msgid "Do not inline integer division" -msgstr "" +#: fortran/decl.c:1298 +#, fuzzy, no-c-format +msgid "Old-style kind %d not supported for type %s at %C" +msgstr "атрыбуты секцыі не падтрымліваюцца для гэтай мэты" -#: config/ia64/ia64.h:219 -msgid "Generate inline square root, optimize for latency" +#: fortran/decl.c:1334 +#, no-c-format +msgid "Expected initialization expression at %C" msgstr "" -#: config/ia64/ia64.h:221 -msgid "Generate inline square root, optimize for throughput" +#: fortran/decl.c:1340 +#, no-c-format +msgid "Expected scalar initialization expression at %C" msgstr "" -#: config/ia64/ia64.h:223 -msgid "Do not inline square root" -msgstr "" +#: fortran/decl.c:1358 +#, fuzzy, no-c-format +msgid "Kind %d not supported for type %s at %C" +msgstr "атрыбуты секцыі не падтрымліваюцца для гэтай мэты" -#: config/ia64/ia64.h:225 -msgid "Enable Dwarf 2 line debug info via GNU as" +#: fortran/decl.c:1367 +#, no-c-format +msgid "Missing right paren at %C" msgstr "" -#: config/ia64/ia64.h:227 -msgid "Disable Dwarf 2 line debug info via GNU as" +#: fortran/decl.c:1456 fortran/decl.c:1499 +#, no-c-format +msgid "Kind %d is not a CHARACTER kind at %C" msgstr "" -#: config/ia64/ia64.h:229 -msgid "Enable earlier placing stop bits for better scheduling" +#: fortran/decl.c:1493 +#, no-c-format +msgid "Syntax error in CHARACTER declaration at %C" msgstr "" -#: config/ia64/ia64.h:231 -msgid "Disable earlier placing stop bits" +#: fortran/decl.c:1554 +#, no-c-format +msgid "Extension: BYTE type at %C" msgstr "" -#: config/ia64/ia64.h:276 -msgid "Specify range of registers to make fixed" +#: fortran/decl.c:1560 +#, no-c-format +msgid "BYTE type used at %C is not available on the target machine" msgstr "" -#: config/ip2k/ip2k.c:1087 -#, fuzzy -msgid "bad operand" -msgstr "нерэчаісны %%f аперанд" - -#: config/iq2000/iq2000.c:3383 -#, fuzzy, c-format -msgid "invalid %%P operand" -msgstr "нерэчаісны %%-код" +#: fortran/decl.c:1628 +#, fuzzy, no-c-format +msgid "Type name '%s' at %C is ambiguous" +msgstr "памер \"%s\" - %d байт" -#: config/iq2000/iq2000.c:3391 config/rs6000/rs6000.c:10893 -#, c-format -msgid "invalid %%p value" +#: fortran/decl.c:1694 +#, no-c-format +msgid "Missing character range in IMPLICIT at %C" msgstr "" -#: config/iq2000/iq2000.c:3455 config/mips/mips.c:4962 -#, c-format -msgid "invalid use of %%d, %%x, or %%X" +#: fortran/decl.c:1740 +#, no-c-format +msgid "Letters must be in alphabetic order in IMPLICIT statement at %C" msgstr "" -#: config/iq2000/iq2000.h:72 config/mn10300/mn10300.h:74 -msgid "No default crt0.o" +#: fortran/decl.c:1794 +#, no-c-format +msgid "Empty IMPLICIT statement at %C" msgstr "" -#: config/iq2000/iq2000.h:74 -msgid "Use GP relative sdata/sbss sections" +#: fortran/decl.c:1958 +#, no-c-format +msgid "Enumerator cannot have attributes %C" msgstr "" -#: config/iq2000/iq2000.h:76 -msgid "Don't use GP relative sdata/sbss sections" +#: fortran/decl.c:1971 +#, no-c-format +msgid "Missing dimension specification at %C" msgstr "" -#: config/iq2000/iq2000.h:78 config/mips/mips.h:593 -msgid "Use ROM instead of RAM" +#: fortran/decl.c:2053 +#, no-c-format +msgid "Duplicate %s attribute at %L" msgstr "" -#: config/iq2000/iq2000.h:80 config/mips/mips.h:595 -msgid "Don't use ROM instead of RAM" +#: fortran/decl.c:2070 +#, no-c-format +msgid "Attribute at %L is not allowed in a TYPE definition" msgstr "" -#: config/iq2000/iq2000.h:82 config/mips/mips.h:597 -msgid "Put uninitialized constants in ROM (needs -membedded-data)" +#: fortran/decl.c:2084 +#, no-c-format +msgid "%s attribute at %L is not allowed outside of a MODULE" msgstr "" -#: config/iq2000/iq2000.h:84 config/mips/mips.h:599 -msgid "Don't put uninitialized constants in ROM" +#. Now we have an error, which we signal, and then fix up +#. because the knock-on is plain and simple confusing. +#: fortran/decl.c:2222 +#, no-c-format +msgid "Derived type at %C has not been previously defined and so cannot appear in a derived type definition." msgstr "" -#: config/iq2000/iq2000.h:106 config/mips/mips.h:788 -msgid "Specify CPU for scheduling purposes" +#: fortran/decl.c:2252 +#, no-c-format +msgid "Syntax error in data declaration at %C" msgstr "" -#: config/iq2000/iq2000.h:108 config/mips/mips.h:790 -msgid "Specify CPU for code generation purposes" +#: fortran/decl.c:2398 +#, no-c-format +msgid "Name '%s' at %C is the name of the procedure" msgstr "" -#: config/m32r/m32r.c:2111 -#, fuzzy, c-format -msgid "invalid operand to %%s code" -msgstr "нерэчаісны %%-код" - -#: config/m32r/m32r.c:2118 -#, fuzzy, c-format -msgid "invalid operand to %%p code" -msgstr "нерэчаісны %%-код" - -#: config/m32r/m32r.c:2173 -msgid "bad insn for 'A'" +#: fortran/decl.c:2410 +#, no-c-format +msgid "Unexpected junk in formal argument list at %C" msgstr "" -#: config/m32r/m32r.c:2220 -#, fuzzy, c-format -msgid "invalid operand to %%T/%%B code" -msgstr "нерэчаісны %%-код" - -#: config/m32r/m32r.c:2243 -#, fuzzy, c-format -msgid "invalid operand to %%N code" -msgstr "нерэчаісны %%-код" - -#: config/m32r/m32r.c:2276 -msgid "pre-increment address is not a register" +#: fortran/decl.c:2428 +#, no-c-format +msgid "Duplicate symbol '%s' in formal argument list at %C" msgstr "" -#: config/m32r/m32r.c:2283 -msgid "pre-decrement address is not a register" +#: fortran/decl.c:2471 +#, no-c-format +msgid "Unexpected junk following RESULT variable at %C" msgstr "" -#: config/m32r/m32r.c:2290 -msgid "post-increment address is not a register" +#: fortran/decl.c:2478 +#, no-c-format +msgid "RESULT variable at %C must be different than function name" msgstr "" -#: config/m32r/m32r.c:2366 config/m32r/m32r.c:2382 -#: config/rs6000/rs6000.c:17609 -msgid "bad address" -msgstr "дрэнны адрас" +#: fortran/decl.c:2533 +#, no-c-format +msgid "Expected formal argument list in function definition at %C" +msgstr "" -#: config/m32r/m32r.c:2387 -#, fuzzy -msgid "lo_sum not of register" -msgstr "Не выкарыстоўваць рэгістра sb" +#: fortran/decl.c:2544 +#, fuzzy, no-c-format +msgid "Unexpected junk after function declaration at %C" +msgstr "секцыя \"%s\" канфліктуе з папярэдняй дэкларацыяй" -#. { "relax", TARGET_RELAX_MASK, "" }, { "no-relax", -TARGET_RELAX_MASK, "" }, -#: config/m32r/m32r.h:283 -msgid "Display compile time statistics" +#: fortran/decl.c:2565 +#, no-c-format +msgid "Function '%s' at %C already has a type of %s" msgstr "" -#: config/m32r/m32r.h:285 -msgid "Align all loops to 32 byte boundary" +#: fortran/decl.c:2613 +#, no-c-format +msgid "ENTRY statement at %C cannot appear within a PROGRAM" msgstr "" -#: config/m32r/m32r.h:288 -msgid "Only issue one instruction per cycle" +#: fortran/decl.c:2616 +#, no-c-format +msgid "ENTRY statement at %C cannot appear within a MODULE" msgstr "" -#: config/m32r/m32r.h:291 -msgid "Prefer branches over conditional execution" +#: fortran/decl.c:2620 +#, no-c-format +msgid "ENTRY statement at %C cannot appear within a BLOCK DATA" msgstr "" -#: config/m32r/m32r.h:312 -msgid "Code size: small, medium or large" +#: fortran/decl.c:2624 +#, no-c-format +msgid "ENTRY statement at %C cannot appear within an INTERFACE" msgstr "" -#: config/m32r/m32r.h:314 -msgid "Small data area: none, sdata, use" +#: fortran/decl.c:2628 +#, no-c-format +msgid "ENTRY statement at %C cannot appear within a DERIVED TYPE block" msgstr "" -#: config/m32r/m32r.h:316 config/mips/mips.h:796 -msgid "Don't call any cache flush functions" +#: fortran/decl.c:2633 +#, no-c-format +msgid "ENTRY statement at %C cannot appear within an IF-THEN block" msgstr "" -#: config/m32r/m32r.h:318 config/mips/mips.h:798 -msgid "Specify cache flush function" +#: fortran/decl.c:2637 +#, no-c-format +msgid "ENTRY statement at %C cannot appear within a DO block" msgstr "" -#: config/m32r/m32r.h:320 -msgid "Don't call any cache flush trap" +#: fortran/decl.c:2641 +#, no-c-format +msgid "ENTRY statement at %C cannot appear within a SELECT block" msgstr "" -#: config/m32r/m32r.h:322 -msgid "Specify cache flush trap number" +#: fortran/decl.c:2645 +#, no-c-format +msgid "ENTRY statement at %C cannot appear within a FORALL block" msgstr "" -#. !!!! SCz wrong here. -#: config/m68hc11/m68hc11.c:3432 config/m68hc11/m68hc11.c:3809 -msgid "move insn not handled" +#: fortran/decl.c:2649 +#, no-c-format +msgid "ENTRY statement at %C cannot appear within a WHERE block" msgstr "" -#: config/m68hc11/m68hc11.c:3656 config/m68hc11/m68hc11.c:3740 -#: config/m68hc11/m68hc11.c:4012 -msgid "invalid register in the move instruction" +#: fortran/decl.c:2653 +#, no-c-format +msgid "ENTRY statement at %C cannot appear within a contained subprogram" msgstr "" -#: config/m68hc11/m68hc11.c:3690 -msgid "invalid operand in the instruction" +#: fortran/decl.c:2666 +#, no-c-format +msgid "ENTRY statement at %C cannot appear in a contained procedure" msgstr "" -#: config/m68hc11/m68hc11.c:3986 -#, fuzzy -msgid "invalid register in the instruction" -msgstr "нявернае выкарыстанне \"restict\"" - -#: config/m68hc11/m68hc11.c:4019 -msgid "operand 1 must be a hard register" +#: fortran/decl.c:2741 +#, no-c-format +msgid "RESULT attribute required in ENTRY statement at %C" msgstr "" -#: config/m68hc11/m68hc11.c:4033 -#, fuzzy -msgid "invalid rotate insn" -msgstr "Нерэчаісны выбар %s" - -#: config/m68hc11/m68hc11.c:4457 -msgid "registers IX, IY and Z used in the same INSN" +#: fortran/decl.c:2982 +#, no-c-format +msgid "Unexpected END statement at %C" msgstr "" -#: config/m68hc11/m68hc11.c:4794 config/m68hc11/m68hc11.c:5094 -msgid "cannot do z-register replacement" +#. We would have required END [something] +#: fortran/decl.c:2991 +#, no-c-format +msgid "%s statement expected at %L" msgstr "" -#: config/m68hc11/m68hc11.c:5159 -msgid "invalid Z register replacement for insn" +#: fortran/decl.c:3002 +#, no-c-format +msgid "Expecting %s statement at %C" msgstr "" -#. 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. -#: config/m68hc11/m68hc11.h:179 -msgid "Compile with 16-bit integer mode" +#: fortran/decl.c:3016 +#, no-c-format +msgid "Expected block name of '%s' in %s statement at %C" msgstr "" -#: config/m68hc11/m68hc11.h:181 -msgid "Compile with 32-bit integer mode" +#: fortran/decl.c:3032 +#, no-c-format +msgid "Expected terminating name at %C" msgstr "" -#: config/m68hc11/m68hc11.h:183 -msgid "Auto pre/post decrement increment allowed" +#: fortran/decl.c:3041 +#, no-c-format +msgid "Expected label '%s' for %s statement at %C" msgstr "" -#: config/m68hc11/m68hc11.h:185 -msgid "Auto pre/post decrement increment not allowed" +#: fortran/decl.c:3096 +#, no-c-format +msgid "Missing array specification at %L in DIMENSION statement" msgstr "" -#: config/m68hc11/m68hc11.h:187 -msgid "Min/max instructions allowed" +#: fortran/decl.c:3105 +#, no-c-format +msgid "Array specification must be deferred at %L" msgstr "" -#: config/m68hc11/m68hc11.h:189 -msgid "Min/max instructions not allowed" +#: fortran/decl.c:3176 +#, no-c-format +msgid "Unexpected character in variable list at %C" msgstr "" -#: config/m68hc11/m68hc11.h:191 -msgid "Use call and rtc for function calls and returns" +#: fortran/decl.c:3213 +#, no-c-format +msgid "Expected '(' at %C" msgstr "" -#: config/m68hc11/m68hc11.h:193 -msgid "Use jsr and rts for function calls and returns" +#: fortran/decl.c:3227 fortran/decl.c:3268 +#, no-c-format +msgid "Expected variable name at %C" msgstr "" -#: config/m68hc11/m68hc11.h:195 -msgid "Do not use direct addressing mode for soft registers" +#: fortran/decl.c:3243 +#, no-c-format +msgid "Cray pointer at %C must be an integer." msgstr "" -#: config/m68hc11/m68hc11.h:197 -msgid "Use direct addressing mode for soft registers" +#: fortran/decl.c:3247 +#, no-c-format +msgid "Cray pointer at %C has %d bytes of precision; memory addresses require %d bytes." msgstr "" -#: config/m68hc11/m68hc11.h:199 config/m68hc11/m68hc11.h:205 -msgid "Compile for a 68HC11" +#: fortran/decl.c:3254 +#, no-c-format +msgid "Expected \",\" at %C" msgstr "" -#: config/m68hc11/m68hc11.h:201 config/m68hc11/m68hc11.h:207 -msgid "Compile for a 68HC12" +#: fortran/decl.c:3317 +#, no-c-format +msgid "Expected \")\" at %C" msgstr "" -#: config/m68hc11/m68hc11.h:203 config/m68hc11/m68hc11.h:209 -msgid "Compile for a 68HCS12" +#: fortran/decl.c:3329 +#, no-c-format +msgid "Expected \",\" or end of statement at %C" msgstr "" -#. This macro is similar to `TARGET_SWITCHES' but defines names of -#. command options that have values. Its definition is an -#. initializer with a subgrouping for each command option. -#. -#. Each subgrouping contains a string constant, that defines the -#. fixed part of the option name, and the address of a variable. The -#. variable, type `char *', is set to the variable part of the given -#. option if the fixed part matches. The actual option name is made -#. by appending `-m' to the specified name. -#: config/m68hc11/m68hc11.h:223 -msgid "Specify the register allocation order" +#: fortran/decl.c:3394 +#, no-c-format +msgid "Cray pointer declaration at %C requires -fcray-pointer flag." msgstr "" -#: config/m68hc11/m68hc11.h:225 -msgid "Indicate the number of soft registers available" +#: fortran/decl.c:3492 +#, no-c-format +msgid "Access specification of the %s operator at %C has already been specified" msgstr "" -#: config/m68k/m68k.h:240 config/m68k/m68k.h:242 -msgid "Generate code for a 68020" -msgstr "Ствараць код для 68020" - -#: config/m68k/m68k.h:247 config/m68k/m68k.h:250 -msgid "Generate code for a 68000" -msgstr "Ствараць код для 68000" - -#: config/m68k/m68k.h:252 -msgid "Use the bit-field instructions" +#: fortran/decl.c:3510 +#, no-c-format +msgid "Access specification of the .%s. operator at %C has already been specified" msgstr "" -#: config/m68k/m68k.h:254 -#, fuzzy -msgid "Do not use the bit-field instructions" -msgstr "Не генерыраваць сімвальныя інструкцыі" - -#: config/m68k/m68k.h:256 -msgid "Consider type 'int' to be 16 bits wide" +#: fortran/decl.c:3597 +#, no-c-format +msgid "Expected variable name at %C in PARAMETER statement" msgstr "" -#: config/m68k/m68k.h:258 -msgid "Consider type 'int' to be 32 bits wide" +#: fortran/decl.c:3604 +#, no-c-format +msgid "Expected = sign in PARAMETER statement at %C" msgstr "" -#: config/m68k/m68k.h:261 -msgid "Generate code with library calls for floating point" +#: fortran/decl.c:3610 +#, no-c-format +msgid "Expected expression at %C in PARAMETER statement" msgstr "" -#: config/m68k/m68k.h:263 -msgid "Generate code for a 68040, without any new instructions" +#: fortran/decl.c:3668 +#, no-c-format +msgid "Unexpected characters in PARAMETER statement at %C" msgstr "" -#: config/m68k/m68k.h:266 -msgid "Generate code for a 68060, without any new instructions" +#: fortran/decl.c:3693 +#, no-c-format +msgid "Blanket SAVE statement at %C follows previous SAVE statement" msgstr "" -#: config/m68k/m68k.h:270 -msgid "Generate code for a 68030" -msgstr "Ствараць код для 68030" - -#: config/m68k/m68k.h:273 -msgid "Generate code for a 68040" -msgstr "Ствараць код для 68040" - -#: config/m68k/m68k.h:277 -msgid "Generate code for a 68060" -msgstr "Ствараць код для 68060" - -#: config/m68k/m68k.h:282 -msgid "Generate code for a 520X" -msgstr "Ствараць код для 520X" - -#: config/m68k/m68k.h:286 -#, fuzzy -msgid "Generate code for a 5206e" -msgstr "Ствараць код для 520X" - -#: config/m68k/m68k.h:290 -#, fuzzy -msgid "Generate code for a 528x" -msgstr "Ствараць код для 520X" - -#: config/m68k/m68k.h:294 -#, fuzzy -msgid "Generate code for a 5307" -msgstr "Ствараць код для 520X" - -#: config/m68k/m68k.h:298 -#, fuzzy -msgid "Generate code for a 5407" -msgstr "Ствараць код для 520X" - -#: config/m68k/m68k.h:301 -msgid "Generate code for a 68851" -msgstr "Ствараць код для 68851" - -#: config/m68k/m68k.h:303 -msgid "Do no generate code for a 68851" -msgstr "Не ствараць код для 68851" - -#: config/m68k/m68k.h:306 -msgid "Generate code for a 68302" -msgstr "Ствараць код для 68302" - -#: config/m68k/m68k.h:309 -msgid "Generate code for a 68332" -msgstr "Ствараць код для 68332" - -#: config/m68k/m68k.h:313 -msgid "Generate code for a cpu32" -msgstr "Ствараць код для цп32" - -#: config/m68k/m68k.h:316 -msgid "Align variables on a 32-bit boundary" +#: fortran/decl.c:3706 +#, no-c-format +msgid "SAVE statement at %C follows blanket SAVE statement" msgstr "" -#: config/m68k/m68k.h:318 -msgid "Align variables on a 16-bit boundary" +#: fortran/decl.c:3752 +#, no-c-format +msgid "Syntax error in SAVE statement at %C" msgstr "" -#: config/m68k/m68k.h:320 -msgid "Enable separate data segment" +#: fortran/decl.c:3773 +#, no-c-format +msgid "MODULE PROCEDURE at %C must be in a generic module interface" msgstr "" -#: config/m68k/m68k.h:322 -msgid "Disable separate data segment" +#: fortran/decl.c:3833 +#, no-c-format +msgid "Derived type at %C can only be PRIVATE within a MODULE" msgstr "" -#: config/m68k/m68k.h:324 -msgid "Enable ID based shared library" +#: fortran/decl.c:3846 +#, no-c-format +msgid "Derived type at %C can only be PUBLIC within a MODULE" msgstr "" -#: config/m68k/m68k.h:326 -msgid "Disable ID based shared library" +#: fortran/decl.c:3857 +#, no-c-format +msgid "Expected :: in TYPE definition at %C" msgstr "" -#: config/m68k/m68k.h:328 -msgid "Generate pc-relative code" +#: fortran/decl.c:3874 +#, no-c-format +msgid "Type name '%s' at %C cannot be the same as an intrinsic type" msgstr "" -#: config/m68k/m68k.h:330 -msgid "Do not use unaligned memory references" +#: fortran/decl.c:3884 +#, no-c-format +msgid "Derived type name '%s' at %C already has a basic type of %s" msgstr "" -#: config/m68k/m68k.h:332 -msgid "Use unaligned memory references" +#: fortran/decl.c:3901 +#, no-c-format +msgid "Derived type definition of '%s' at %C has already been defined" msgstr "" -#: config/m68k/m68k.h:334 -msgid "Use different calling convention using 'rtd'" +#: fortran/decl.c:3935 +#, no-c-format +msgid "Cray Pointee at %C cannot be assumed shape array" msgstr "" -#. TARGET_DEFAULT is defined in m68k-none.h, netbsd.h, etc. -#: config/m68k/m68k.h:344 -msgid "ID of shared library to build" +#: fortran/decl.c:3956 +#, no-c-format +msgid "New in Fortran 2003: ENUM AND ENUMERATOR at %C" msgstr "" -#: config/mcore/mcore.h:113 -msgid "Inline constants if it can be done in 2 insns or less" +#: fortran/decl.c:3980 +#, no-c-format +msgid "ENUM definition statement expected before %C" msgstr "" -#: config/mcore/mcore.h:115 -msgid "Inline constants if it only takes 1 instruction" +#: fortran/decl.c:4013 +#, no-c-format +msgid "Syntax error in ENUMERATOR definition at %C" msgstr "" -#: config/mcore/mcore.h:117 -msgid "Set maximum alignment to 4" +#: fortran/dump-parse-tree.c:53 +#, c-format +msgid "%-5d " msgstr "" -#: config/mcore/mcore.h:119 -msgid "Set maximum alignment to 8" +#: fortran/dump-parse-tree.c:55 +#, c-format +msgid " " msgstr "" -#: config/mcore/mcore.h:123 -msgid "Do not use the divide instruction" +#: fortran/dump-parse-tree.c:79 fortran/dump-parse-tree.c:594 +#, c-format +msgid "(%s " msgstr "" -#: config/mcore/mcore.h:127 -msgid "Do not arbitrary sized immediates in bit operations" +#: fortran/dump-parse-tree.c:92 fortran/dump-parse-tree.c:841 +#: fortran/dump-parse-tree.c:878 fortran/dump-parse-tree.c:888 +#, c-format +msgid "%d" msgstr "" -#: config/mcore/mcore.h:129 -msgid "Always treat bit-field as int-sized" +#: fortran/dump-parse-tree.c:96 fortran/dump-parse-tree.c:123 +#: fortran/dump-parse-tree.c:166 fortran/dump-parse-tree.c:403 +#: fortran/dump-parse-tree.c:495 fortran/dump-parse-tree.c:581 +#: fortran/dump-parse-tree.c:602 +#, c-format +msgid ")" msgstr "" -#: config/mcore/mcore.h:133 -msgid "Force functions to be aligned to a 4 byte boundary" +#: fortran/dump-parse-tree.c:106 fortran/dump-parse-tree.c:421 +#, c-format +msgid "(" msgstr "" -#: config/mcore/mcore.h:135 -msgid "Force functions to be aligned to a 2 byte boundary" +#: fortran/dump-parse-tree.c:112 +#, fuzzy, c-format +msgid "%s = " +msgstr "%s: %s: " + +#: fortran/dump-parse-tree.c:116 +#, c-format +msgid "(arg not-present)" msgstr "" -#: config/mcore/mcore.h:137 -msgid "Emit call graph information" +#: fortran/dump-parse-tree.c:120 fortran/dump-parse-tree.c:397 +#: fortran/dump-parse-tree.c:491 +#, c-format +msgid " " msgstr "" -#: config/mcore/mcore.h:141 -msgid "Prefer word accesses over byte accesses" +#: fortran/dump-parse-tree.c:137 fortran/dump-parse-tree.c:312 +#, c-format +msgid "()" msgstr "" -#: config/mcore/mcore.h:152 -msgid "Generate code for the M*Core M340" +#: fortran/dump-parse-tree.c:141 +#, c-format +msgid "(%d" msgstr "" -#: config/mcore/mcore.h:165 -msgid "Maximum amount for a single stack increment operation" +#: fortran/dump-parse-tree.c:155 +#, fuzzy, c-format +msgid " %s " +msgstr "%s: %s: " + +#: fortran/dump-parse-tree.c:182 +#, c-format +msgid "FULL" msgstr "" -#: config/mips/mips.c:4647 -msgid "mips_debugger_offset called with non stack/frame/arg pointer" +#: fortran/dump-parse-tree.c:213 fortran/dump-parse-tree.c:222 +#: fortran/dump-parse-tree.c:297 +#, c-format +msgid " , " msgstr "" -#: config/mips/mips.c:4856 +#: fortran/dump-parse-tree.c:227 #, c-format -msgid "PRINT_OPERAND, invalid insn for %%C" +msgid "UNKNOWN" msgstr "" -#: config/mips/mips.c:4873 +#: fortran/dump-parse-tree.c:252 #, c-format -msgid "PRINT_OPERAND, invalid insn for %%N" +msgid " %% %s" msgstr "" -#: config/mips/mips.c:4882 +#: fortran/dump-parse-tree.c:324 fortran/dump-parse-tree.c:381 #, c-format -msgid "PRINT_OPERAND, invalid insn for %%F" +msgid "''" msgstr "" -#: config/mips/mips.c:4891 +#: fortran/dump-parse-tree.c:326 #, c-format -msgid "PRINT_OPERAND, invalid insn for %%W" +msgid "%c" msgstr "" -#: config/mips/mips.c:4912 +#: fortran/dump-parse-tree.c:333 #, fuzzy, c-format -msgid "invalid %%Y value" -msgstr "дрэннае %%Q значэнне" +msgid "%s(" +msgstr "%s\n" -#: config/mips/mips.c:4990 -msgid "PRINT_OPERAND, invalid operand for relocation" +#: fortran/dump-parse-tree.c:339 +#, c-format +msgid "(/ " msgstr "" -#. Target CPU builtins. -#. Everyone but IRIX defines this to mips. -#. We do this here because __mips is defined below and so we can't use builtin_define_std. -#. Treat _R3000 and _R4000 like register-size defines, which is how they've historically been used. -#. Macros dependent on the C dialect. -#. Bizarre, but needed at least for Irix. -#. 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. -#: config/mips/mips.h:541 -msgid "Use 64-bit int type" +#: fortran/dump-parse-tree.c:341 +#, c-format +msgid " /)" msgstr "" -#: config/mips/mips.h:543 -msgid "Use 64-bit long type" +#: fortran/dump-parse-tree.c:347 +#, c-format +msgid "NULL()" msgstr "" -#: config/mips/mips.h:545 -msgid "Use 32-bit long type" +#: fortran/dump-parse-tree.c:357 fortran/dump-parse-tree.c:370 +#: fortran/dump-parse-tree.c:395 fortran/dump-parse-tree.c:401 +#, c-format +msgid "_%d" msgstr "" -#: config/mips/mips.h:547 -msgid "Optimize lui/addiu address loads" +#: fortran/dump-parse-tree.c:362 +#, c-format +msgid ".true." msgstr "" -#: config/mips/mips.h:549 -msgid "Don't optimize lui/addiu address loads" +#: fortran/dump-parse-tree.c:364 +#, c-format +msgid ".false." msgstr "" -#: config/mips/mips.h:551 -msgid "Use GNU as (now ignored)" +#: fortran/dump-parse-tree.c:391 +#, c-format +msgid "(complex " msgstr "" -#: config/mips/mips.h:553 config/mips/mips.h:555 -msgid "Use GP relative sdata/sbss sections (now ignored)" +#: fortran/dump-parse-tree.c:407 +#, c-format +msgid "???" msgstr "" -#: config/mips/mips.h:557 config/mips/mips.h:559 -msgid "Don't use GP relative sdata/sbss sections (now ignored)" -msgstr "" +#: fortran/dump-parse-tree.c:415 fortran/dump-parse-tree.c:698 +#, fuzzy, c-format +msgid "%s:" +msgstr "%s\n" -#: config/mips/mips.h:561 -#, fuzzy -msgid "Output compiler statistics (now ignored)" -msgstr "Вывесці статыстыку капілятара" +#: fortran/dump-parse-tree.c:425 +#, c-format +msgid "U+ " +msgstr "" -#: config/mips/mips.h:563 -msgid "Don't output compiler statistics" -msgstr "Не выводзіць статыстыку кампілятара" +#: fortran/dump-parse-tree.c:428 +#, c-format +msgid "U- " +msgstr "" -#: config/mips/mips.h:565 -msgid "Don't optimize block moves" +#: fortran/dump-parse-tree.c:431 +#, c-format +msgid "+ " msgstr "" -#: config/mips/mips.h:567 -msgid "Optimize block moves" +#: fortran/dump-parse-tree.c:434 +#, c-format +msgid "- " msgstr "" -#: config/mips/mips.h:569 -msgid "Use mips-tfile asm postpass" +#: fortran/dump-parse-tree.c:437 +#, c-format +msgid "* " msgstr "" -#: config/mips/mips.h:571 -msgid "Don't use mips-tfile asm postpass" +#: fortran/dump-parse-tree.c:440 +#, c-format +msgid "/ " msgstr "" -#: config/mips/mips.h:573 config/pa/pa.h:288 -msgid "Use software floating point" +#: fortran/dump-parse-tree.c:443 +#, c-format +msgid "** " msgstr "" -#. Macro to define tables used to set the flags. -#. This is a list in braces of triplets in braces, -#. each triplet being { "NAME", VALUE, DOC } -#. where VALUE is the bits to set or minus the bits to clear and DOC -#. is the documentation for --help (NULL if intentionally undocumented). -#. An empty string NAME is used to identify the default VALUE. -#: config/mips/mips.h:575 config/pdp11/pdp11.h:61 config/rs6000/rs6000.h:329 -msgid "Use hardware floating point" -msgstr "Выкарыстоўваць апаратную \"плаваючую кропку\"" +#: fortran/dump-parse-tree.c:446 +#, c-format +msgid "// " +msgstr "" -#: config/mips/mips.h:577 -msgid "Use 64-bit FP registers" -msgstr "Выкарыстоўваць 64-бітныя FP-рэгістры" +#: fortran/dump-parse-tree.c:449 +#, c-format +msgid "AND " +msgstr "" -#: config/mips/mips.h:579 -msgid "Use 32-bit FP registers" -msgstr "Выкарыстоўваць 32-бітныя FP-рэгістры" +#: fortran/dump-parse-tree.c:452 +#, c-format +msgid "OR " +msgstr "" -#: config/mips/mips.h:581 -msgid "Use 64-bit general registers" -msgstr "Выкарыстоўваць 64-бітныя галоўныя рэгістры" +#: fortran/dump-parse-tree.c:455 +#, c-format +msgid "EQV " +msgstr "" -#: config/mips/mips.h:583 -msgid "Use 32-bit general registers" -msgstr "Выкарыстоўваць 32-бітныя галоўныя рэгістры" +#: fortran/dump-parse-tree.c:458 +#, c-format +msgid "NEQV " +msgstr "" -#: config/mips/mips.h:585 -msgid "Use Irix PIC" -msgstr "Выкарыстоўваць Irix PIC" +#: fortran/dump-parse-tree.c:461 +#, c-format +msgid "= " +msgstr "" -#: config/mips/mips.h:587 -msgid "Don't use Irix PIC" -msgstr "Не выкарыстоўваць Irix PIC" +#: fortran/dump-parse-tree.c:464 +#, c-format +msgid "<> " +msgstr "" -#: config/mips/mips.h:589 -msgid "Use indirect calls" +#: fortran/dump-parse-tree.c:467 +#, c-format +msgid "> " msgstr "" -#: config/mips/mips.h:591 -msgid "Don't use indirect calls" +#: fortran/dump-parse-tree.c:470 +#, c-format +msgid ">= " msgstr "" -#: config/mips/mips.h:601 -msgid "Use big-endian byte order" +#: fortran/dump-parse-tree.c:473 +#, c-format +msgid "< " msgstr "" -#: config/mips/mips.h:603 -msgid "Use little-endian byte order" +#: fortran/dump-parse-tree.c:476 +#, c-format +msgid "<= " msgstr "" -#: config/mips/mips.h:605 -msgid "Use single (32-bit) FP only" +#: fortran/dump-parse-tree.c:479 +#, c-format +msgid "NOT " msgstr "" -#: config/mips/mips.h:607 -msgid "Don't use single (32-bit) FP only" +#: fortran/dump-parse-tree.c:501 +#, fuzzy, c-format +msgid "%s[" +msgstr "%s\n" + +#: fortran/dump-parse-tree.c:507 +#, c-format +msgid "%s[[" msgstr "" -#: config/mips/mips.h:609 config/mips/mips.h:611 -#, fuzzy -msgid "Use paired-single floating point instructions" -msgstr "Выкарыстоўваць апаратную \"плаваючую кропку\"" +#: fortran/dump-parse-tree.c:528 +#, fuzzy, c-format +msgid "(%s %s %s %s" +msgstr "%s: %s: " -#: config/mips/mips.h:613 config/mips/mips.h:615 -msgid "Use MIPS-3D instructions" +#: fortran/dump-parse-tree.c:534 +#, c-format +msgid " ALLOCATABLE" msgstr "" -#: config/mips/mips.h:617 -msgid "Use multiply accumulate" +#: fortran/dump-parse-tree.c:536 fortran/dump-parse-tree.c:599 +#, c-format +msgid " DIMENSION" msgstr "" -#: config/mips/mips.h:619 -msgid "Don't use multiply accumulate" +#: fortran/dump-parse-tree.c:538 +#, c-format +msgid " EXTERNAL" msgstr "" -#: config/mips/mips.h:621 -msgid "Don't generate fused multiply/add instructions" +#: fortran/dump-parse-tree.c:540 +#, c-format +msgid " INTRINSIC" msgstr "" -#: config/mips/mips.h:623 config/rs6000/rs6000.h:345 -msgid "Generate fused multiply/add instructions" +#: fortran/dump-parse-tree.c:542 +#, c-format +msgid " OPTIONAL" msgstr "" -#: config/mips/mips.h:625 -msgid "Perform VR4130-specific alignment optimizations" +#: fortran/dump-parse-tree.c:544 fortran/dump-parse-tree.c:597 +#, c-format +msgid " POINTER" msgstr "" -#: config/mips/mips.h:627 -msgid "Don't perform VR4130-specific alignment optimizations" +#: fortran/dump-parse-tree.c:546 +#, c-format +msgid " SAVE" msgstr "" -#: config/mips/mips.h:629 -msgid "Work around early 4300 hardware bug" +#: fortran/dump-parse-tree.c:548 +#, c-format +msgid " TARGET" msgstr "" -#: config/mips/mips.h:631 -msgid "Don't work around early 4300 hardware bug" +#: fortran/dump-parse-tree.c:550 +#, c-format +msgid " DUMMY" msgstr "" -#: config/mips/mips.h:633 -msgid "Work around errata for early SB-1 revision 2 cores" +#: fortran/dump-parse-tree.c:552 +#, c-format +msgid " RESULT" msgstr "" -#: config/mips/mips.h:635 -msgid "Don't work around errata for early SB-1 revision 2 cores" +#: fortran/dump-parse-tree.c:554 +#, c-format +msgid " ENTRY" msgstr "" -#: config/mips/mips.h:637 -msgid "Work around R4000 errata" +#: fortran/dump-parse-tree.c:557 +#, c-format +msgid " DATA" msgstr "" -#: config/mips/mips.h:639 -msgid "Don't work around R4000 errata" +#: fortran/dump-parse-tree.c:559 +#, c-format +msgid " USE-ASSOC" msgstr "" -#: config/mips/mips.h:641 -msgid "Work around R4400 errata" +#: fortran/dump-parse-tree.c:561 +#, c-format +msgid " IN-NAMELIST" msgstr "" -#: config/mips/mips.h:643 -msgid "Don't work around R4400 errata" +#: fortran/dump-parse-tree.c:563 +#, c-format +msgid " IN-COMMON" msgstr "" -#: config/mips/mips.h:645 -msgid "Work around certain VR4120 errata" +#: fortran/dump-parse-tree.c:566 +#, c-format +msgid " FUNCTION" msgstr "" -#: config/mips/mips.h:647 -msgid "Don't work around certain VR4120 errata" +#: fortran/dump-parse-tree.c:568 +#, c-format +msgid " SUBROUTINE" msgstr "" -#: config/mips/mips.h:649 -msgid "Trap on integer divide by zero" +#: fortran/dump-parse-tree.c:570 +#, c-format +msgid " IMPLICIT-TYPE" msgstr "" -#: config/mips/mips.h:651 -msgid "Don't trap on integer divide by zero" +#: fortran/dump-parse-tree.c:573 +#, c-format +msgid " SEQUENCE" msgstr "" -#: config/mips/mips.h:653 -msgid "Use trap to check for integer divide by zero" +#: fortran/dump-parse-tree.c:575 +#, c-format +msgid " ELEMENTAL" msgstr "" -#: config/mips/mips.h:655 -msgid "Use break to check for integer divide by zero" +#: fortran/dump-parse-tree.c:577 +#, c-format +msgid " PURE" msgstr "" -#: config/mips/mips.h:657 -msgid "Use Branch Likely instructions, overriding default for arch" +#: fortran/dump-parse-tree.c:579 +#, c-format +msgid " RECURSIVE" msgstr "" -#: config/mips/mips.h:659 -msgid "Don't use Branch Likely instructions, overriding default for arch" +#: fortran/dump-parse-tree.c:625 +#, c-format +msgid "symbol %s " msgstr "" -#: config/mips/mips.h:661 -msgid "Use NewABI-style %reloc() assembly operators" +#: fortran/dump-parse-tree.c:632 +#, c-format +msgid "value: " msgstr "" -#: config/mips/mips.h:663 -msgid "Use assembler macros instead of relocation operators" +#: fortran/dump-parse-tree.c:639 +#, c-format +msgid "Array spec:" msgstr "" -#: config/mips/mips.h:665 -#, fuzzy -msgid "Generate mips16 code" -msgstr "Стварыць код для DLL" +#: fortran/dump-parse-tree.c:646 +#, c-format +msgid "Generic interfaces:" +msgstr "" -#: config/mips/mips.h:667 -#, fuzzy -msgid "Generate normal-mode code" -msgstr "Генерыраваць код для GNU ld" +#: fortran/dump-parse-tree.c:648 fortran/dump-parse-tree.c:672 +#: fortran/dump-parse-tree.c:701 fortran/dump-parse-tree.c:1041 +#: fortran/dump-parse-tree.c:1047 fortran/dump-parse-tree.c:1517 +#, c-format +msgid " %s" +msgstr "" -#: config/mips/mips.h:669 -msgid "Lift restrictions on GOT size" +#: fortran/dump-parse-tree.c:654 +#, c-format +msgid "result: %s" msgstr "" -#: config/mips/mips.h:671 -msgid "Do not lift restrictions on GOT size" +#: fortran/dump-parse-tree.c:660 +#, c-format +msgid "components: " msgstr "" -#: config/mips/mips.h:673 -#, fuzzy -msgid "FP exceptions are enabled" -msgstr "выбары ўключаны:" +#: fortran/dump-parse-tree.c:667 +#, c-format +msgid "Formal arglist:" +msgstr "" -#: config/mips/mips.h:675 -#, fuzzy -msgid "FP exceptions are not enabled" -msgstr "выбары ўключаны:" +#: fortran/dump-parse-tree.c:674 +#, c-format +msgid " [Alt Return]" +msgstr "" -#: config/mips/mips.h:677 -msgid "Assume all symbols have 32-bit values" +#: fortran/dump-parse-tree.c:681 +#, c-format +msgid "Formal namespace" msgstr "" -#: config/mips/mips.h:679 -#, fuzzy -msgid "Don't assume all symbols have 32-bit values" -msgstr "Не ўжываць сімвалічныя назва рэгістраў" +#: fortran/dump-parse-tree.c:739 +#, c-format +msgid "common: /%s/ " +msgstr "" -#: config/mips/mips.h:794 -msgid "Specify a Standard MIPS ISA" +#: fortran/dump-parse-tree.c:747 fortran/dump-parse-tree.c:1453 +#, c-format +msgid ", " msgstr "" -#: config/mips/mips.h:800 -msgid "Work around VR4130 mflo/mfhi errata" +#: fortran/dump-parse-tree.c:760 +#, c-format +msgid "symtree: %s Ambig %d" msgstr "" -#: config/mmix/mmix.c:1471 config/mmix/mmix.c:1601 -msgid "MMIX Internal: Expected a CONST_INT, not this" +#: fortran/dump-parse-tree.c:763 +#, fuzzy, c-format +msgid " from namespace %s" +msgstr "невядомы рэжым машыны \"%s\"" + +#: fortran/dump-parse-tree.c:807 +#, c-format +msgid "NOP" msgstr "" -#: config/mmix/mmix.c:1550 -msgid "MMIX Internal: Bad value for 'm', not a CONST_INT" +#: fortran/dump-parse-tree.c:811 +#, c-format +msgid "CONTINUE" msgstr "" -#: config/mmix/mmix.c:1569 -msgid "MMIX Internal: Expected a register, not this" +#: fortran/dump-parse-tree.c:815 +#, c-format +msgid "ENTRY %s" msgstr "" -#: config/mmix/mmix.c:1579 -msgid "MMIX Internal: Expected a constant, not this" +#: fortran/dump-parse-tree.c:819 +#, c-format +msgid "ASSIGN " msgstr "" -#. We need the original here. -#: config/mmix/mmix.c:1663 -msgid "MMIX Internal: Cannot decode this operand" +#: fortran/dump-parse-tree.c:826 +#, c-format +msgid "LABEL ASSIGN " msgstr "" -#: config/mmix/mmix.c:1720 -msgid "MMIX Internal: This is not a recognized address" +#: fortran/dump-parse-tree.c:828 +#, c-format +msgid " %d" msgstr "" -#: config/mmix/mmix.c:2786 -msgid "MMIX Internal: Trying to output invalidly reversed condition:" +#: fortran/dump-parse-tree.c:832 +#, c-format +msgid "POINTER ASSIGN " msgstr "" -#: config/mmix/mmix.c:2793 -msgid "MMIX Internal: What's the CC of this?" +#: fortran/dump-parse-tree.c:839 +#, c-format +msgid "GOTO " msgstr "" -#: config/mmix/mmix.c:2797 -msgid "MMIX Internal: What is the CC of this?" +#: fortran/dump-parse-tree.c:848 +#, c-format +msgid ", (" msgstr "" -#: config/mmix/mmix.c:2867 -msgid "MMIX Internal: This is not a constant:" +#: fortran/dump-parse-tree.c:862 +#, c-format +msgid "CALL %s " msgstr "" -#: config/mmix/mmix.h:132 -msgid "Set start-address of the program" +#: fortran/dump-parse-tree.c:867 +#, c-format +msgid "RETURN " msgstr "" -#: config/mmix/mmix.h:134 -msgid "Set start-address of data" +#: fortran/dump-parse-tree.c:873 +#, c-format +msgid "PAUSE " msgstr "" -#. FIXME: Provide a way to *load* the epsilon register. -#: config/mmix/mmix.h:198 -msgid "For intrinsics library: pass all parameters in registers" +#: fortran/dump-parse-tree.c:883 +#, c-format +msgid "STOP " msgstr "" -#: config/mmix/mmix.h:201 -msgid "Use register stack for parameters and return value" +#: fortran/dump-parse-tree.c:893 fortran/dump-parse-tree.c:901 +#, c-format +msgid "IF " msgstr "" -#: config/mmix/mmix.h:203 -msgid "Use call-clobbered registers for parameters and return value" +#: fortran/dump-parse-tree.c:895 +#, c-format +msgid " %d, %d, %d" msgstr "" -#: config/mmix/mmix.h:205 -msgid "Use epsilon-respecting floating point compare instructions" +#: fortran/dump-parse-tree.c:912 +#, c-format +msgid "ELSE\n" msgstr "" -#: config/mmix/mmix.h:208 -msgid "Use zero-extending memory loads, not sign-extending ones" +#: fortran/dump-parse-tree.c:915 +#, c-format +msgid "ELSE IF " msgstr "" -#: config/mmix/mmix.h:211 -msgid "Generate divide results with reminder having the same sign as the divisor (not the dividend)" +#: fortran/dump-parse-tree.c:925 +#, c-format +msgid "ENDIF" msgstr "" -#: config/mmix/mmix.h:215 -msgid "Prepend global symbols with \":\" (for use with PREFIX)" +#: fortran/dump-parse-tree.c:930 +#, c-format +msgid "SELECT CASE " msgstr "" -#: config/mmix/mmix.h:217 -msgid "Do not provide a default start-address 0x100 of the program" +#: fortran/dump-parse-tree.c:938 +#, c-format +msgid "CASE " msgstr "" -#: config/mmix/mmix.h:219 -msgid "Link to emit program in ELF format (rather than mmo)" +#: fortran/dump-parse-tree.c:954 +#, c-format +msgid "END SELECT" msgstr "" -#: config/mmix/mmix.h:221 -msgid "Use P-mnemonics for branches statically predicted as taken" +#: fortran/dump-parse-tree.c:958 +#, c-format +msgid "WHERE " msgstr "" -#: config/mmix/mmix.h:223 -msgid "Don't use P-mnemonics for branches" +#: fortran/dump-parse-tree.c:969 +#, c-format +msgid "ELSE WHERE " msgstr "" -#: config/mmix/mmix.h:225 -msgid "Use addresses that allocate global registers" +#: fortran/dump-parse-tree.c:976 +#, c-format +msgid "END WHERE" msgstr "" -#: config/mmix/mmix.h:227 -msgid "Do not use addresses that allocate global registers" +#: fortran/dump-parse-tree.c:981 +#, c-format +msgid "FORALL " msgstr "" -#: config/mmix/mmix.h:229 -msgid "Generate a single exit point for each function" +#: fortran/dump-parse-tree.c:1006 +#, c-format +msgid "END FORALL" msgstr "" -#: config/mmix/mmix.h:231 -#, fuzzy -msgid "Do not generate a single exit point for each function" -msgstr "Не генерыраваць сімвальныя інструкцыі" +#: fortran/dump-parse-tree.c:1010 +#, c-format +msgid "DO " +msgstr "" -#: config/mn10300/linux.h:45 config/mn10300/mn10300.h:71 -msgid "Target the AM33 processor" -msgstr "Мэта - AM33 працэсар" +#: fortran/dump-parse-tree.c:1024 fortran/dump-parse-tree.c:1035 +#, c-format +msgid "END DO" +msgstr "" -#: config/mn10300/linux.h:46 config/mn10300/mn10300.h:75 -#, fuzzy -msgid "Target the AM33/2.0 processor" -msgstr "Мэта - AM33 працэсар" +#: fortran/dump-parse-tree.c:1028 +#, c-format +msgid "DO WHILE " +msgstr "" -#: config/mn10300/linux.h:47 config/mn10300/mn10300.h:78 -msgid "Enable linker relaxations" +#: fortran/dump-parse-tree.c:1039 +#, c-format +msgid "CYCLE" msgstr "" -#: config/mn10300/mn10300.h:69 -msgid "Work around hardware multiply bug" +#: fortran/dump-parse-tree.c:1045 +#, c-format +msgid "EXIT" msgstr "" -#: config/mn10300/mn10300.h:70 -msgid "Do not work around hardware multiply bug" +#: fortran/dump-parse-tree.c:1051 +#, c-format +msgid "ALLOCATE " msgstr "" -#: config/ns32k/ns32k.h:142 config/s390/s390.h:135 -msgid "Don't use hardware fp" -msgstr "Не выкарыстоўваць апаратную fp" +#: fortran/dump-parse-tree.c:1054 fortran/dump-parse-tree.c:1070 +#, c-format +msgid " STAT=" +msgstr "" -#: config/ns32k/ns32k.h:143 -msgid "Alternative calling convention" +#: fortran/dump-parse-tree.c:1067 +#, c-format +msgid "DEALLOCATE " msgstr "" -#: config/ns32k/ns32k.h:145 -msgid "Pass some arguments in registers" +#: fortran/dump-parse-tree.c:1083 +#, c-format +msgid "OPEN" msgstr "" -#: config/ns32k/ns32k.h:146 -msgid "Pass all arguments on stack" +#: fortran/dump-parse-tree.c:1088 fortran/dump-parse-tree.c:1162 +#: fortran/dump-parse-tree.c:1204 fortran/dump-parse-tree.c:1227 +#: fortran/dump-parse-tree.c:1373 +#, c-format +msgid " UNIT=" msgstr "" -#: config/ns32k/ns32k.h:147 -msgid "Optimize for 32532 cpu" -msgstr "Аптымізаваць для 32532 ЦП" +#: fortran/dump-parse-tree.c:1093 fortran/dump-parse-tree.c:1167 +#: fortran/dump-parse-tree.c:1209 fortran/dump-parse-tree.c:1238 +#: fortran/dump-parse-tree.c:1390 +#, c-format +msgid " IOMSG=" +msgstr "" -#: config/ns32k/ns32k.h:148 -msgid "Optimize for 32332 cpu" -msgstr "Аптымізаваць для 32332 ЦП" +#: fortran/dump-parse-tree.c:1098 fortran/dump-parse-tree.c:1172 +#: fortran/dump-parse-tree.c:1214 fortran/dump-parse-tree.c:1243 +#: fortran/dump-parse-tree.c:1395 +#, c-format +msgid " IOSTAT=" +msgstr "" -#: config/ns32k/ns32k.h:150 -msgid "Optimize for 32032" -msgstr "Аптымізаваць для 32032 ЦП" +#: fortran/dump-parse-tree.c:1103 fortran/dump-parse-tree.c:1232 +#, c-format +msgid " FILE=" +msgstr "" -#: config/ns32k/ns32k.h:152 -msgid "Register sb is zero. Use for absolute addressing" +#: fortran/dump-parse-tree.c:1108 fortran/dump-parse-tree.c:1177 +#, c-format +msgid " STATUS=" msgstr "" -#: config/ns32k/ns32k.h:153 -msgid "Do not use register sb" -msgstr "Не выкарыстоўваць рэгістра sb" +#: fortran/dump-parse-tree.c:1113 fortran/dump-parse-tree.c:1273 +#, c-format +msgid " ACCESS=" +msgstr "" -#: config/ns32k/ns32k.h:155 -msgid "Use bit-field instructions" +#: fortran/dump-parse-tree.c:1118 fortran/dump-parse-tree.c:1289 +#, c-format +msgid " FORM=" msgstr "" -#: config/ns32k/ns32k.h:157 -#, fuzzy -msgid "Do not use bit-field instructions" -msgstr "Не генерыраваць сімвальныя інструкцыі" +#: fortran/dump-parse-tree.c:1123 fortran/dump-parse-tree.c:1304 +#, c-format +msgid " RECL=" +msgstr "" -#: config/ns32k/ns32k.h:158 -msgid "Generate code for high memory" +#: fortran/dump-parse-tree.c:1128 fortran/dump-parse-tree.c:1314 +#, c-format +msgid " BLANK=" msgstr "" -#: config/ns32k/ns32k.h:159 -msgid "Generate code for low memory" +#: fortran/dump-parse-tree.c:1133 fortran/dump-parse-tree.c:1319 +#, c-format +msgid " POSITION=" msgstr "" -#: config/ns32k/ns32k.h:160 -msgid "32381 fpu" +#: fortran/dump-parse-tree.c:1138 fortran/dump-parse-tree.c:1324 +#, c-format +msgid " ACTION=" msgstr "" -#: config/ns32k/ns32k.h:162 -msgid "Use multiply-accumulate fp instructions" +#: fortran/dump-parse-tree.c:1143 fortran/dump-parse-tree.c:1344 +#, c-format +msgid " DELIM=" msgstr "" -#: config/ns32k/ns32k.h:164 -msgid "Do not use multiply-accumulate fp instructions" +#: fortran/dump-parse-tree.c:1148 fortran/dump-parse-tree.c:1349 +#, c-format +msgid " PAD=" msgstr "" -#: config/ns32k/ns32k.h:165 -msgid "\"Small register classes\" kludge" +#: fortran/dump-parse-tree.c:1152 fortran/dump-parse-tree.c:1181 +#: fortran/dump-parse-tree.c:1218 fortran/dump-parse-tree.c:1354 +#: fortran/dump-parse-tree.c:1426 +#, c-format +msgid " ERR=%d" msgstr "" -#: config/ns32k/ns32k.h:166 -msgid "No \"Small register classes\" kludge" +#: fortran/dump-parse-tree.c:1157 +#, c-format +msgid "CLOSE" msgstr "" -#: config/pa/pa-hpux.h:96 config/pa/pa64-hpux.h:26 -#, fuzzy -msgid "Generate cpp defines for server IO" -msgstr "Генерыраваць код для дадзенага ЦП" +#: fortran/dump-parse-tree.c:1185 +#, c-format +msgid "BACKSPACE" +msgstr "" -#: config/pa/pa-hpux.h:97 config/pa/pa64-hpux.h:28 -#, fuzzy -msgid "Generate cpp defines for workstation IO" -msgstr "Стварыць код для DLL" +#: fortran/dump-parse-tree.c:1189 +#, c-format +msgid "ENDFILE" +msgstr "" -#: config/pa/pa-hpux10.h:84 -msgid "" -"Specify UNIX standard for predefines and linking.\n" -"Supported value is 93." +#: fortran/dump-parse-tree.c:1193 +#, c-format +msgid "REWIND" msgstr "" -#: config/pa/pa-hpux1010.h:28 config/pa/pa-hpux11.h:102 -msgid "" -"Specify UNIX standard for predefines and linking.\n" -"Supported values are 93 and 95." +#: fortran/dump-parse-tree.c:1197 +#, c-format +msgid "FLUSH" msgstr "" -#: config/pa/pa-hpux1111.h:28 -msgid "" -"Specify UNIX standard for predefines and linking.\n" -"Supported values are 93, 95 and 98." +#: fortran/dump-parse-tree.c:1222 +#, c-format +msgid "INQUIRE" msgstr "" -#. Macro to define tables used to set the flags. This is a -#. list in braces of target switches with each switch being -#. { "NAME", VALUE, "HELP_STRING" }. VALUE is the bits to set, -#. or minus the bits to clear. An empty string NAME is used to -#. identify the default VALUE. Do not mark empty strings for -#. translation. -#: config/pa/pa.h:254 config/pa/pa.h:260 -#, fuzzy -msgid "Generate PA1.1 code" -msgstr "Стварыць код для DLL" +#: fortran/dump-parse-tree.c:1248 +#, c-format +msgid " EXIST=" +msgstr "" -#: config/pa/pa.h:256 config/pa/pa.h:258 -#, fuzzy -msgid "Generate PA1.0 code" -msgstr "Стварыць код для DLL" +#: fortran/dump-parse-tree.c:1253 +#, c-format +msgid " OPENED=" +msgstr "" -#: config/pa/pa.h:262 -msgid "Generate PA2.0 code (requires binutils 2.10 or later)" +#: fortran/dump-parse-tree.c:1258 +#, c-format +msgid " NUMBER=" msgstr "" -#: config/pa/pa.h:264 -msgid "Disable FP regs" +#: fortran/dump-parse-tree.c:1263 +#, c-format +msgid " NAMED=" msgstr "" -#: config/pa/pa.h:266 -#, fuzzy -msgid "Do not disable FP regs" -msgstr "Не выкарыстоўваць рэгістра sb" - -#: config/pa/pa.h:268 -msgid "Disable space regs" +#: fortran/dump-parse-tree.c:1268 +#, c-format +msgid " NAME=" msgstr "" -#: config/pa/pa.h:270 -msgid "Do not disable space regs" +#: fortran/dump-parse-tree.c:1278 +#, c-format +msgid " SEQUENTIAL=" msgstr "" -#: config/pa/pa.h:272 -msgid "Put jumps in call delay slots" +#: fortran/dump-parse-tree.c:1284 +#, c-format +msgid " DIRECT=" msgstr "" -#: config/pa/pa.h:274 -msgid "Do not put jumps in call delay slots" +#: fortran/dump-parse-tree.c:1294 +#, c-format +msgid " FORMATTED" msgstr "" -#: config/pa/pa.h:276 -#, fuzzy -msgid "Disable indexed addressing" -msgstr "нерэчаісны адрас" - -#: config/pa/pa.h:278 -#, fuzzy -msgid "Do not disable indexed addressing" -msgstr "невядомая назва рэгістра: %s" - -#: config/pa/pa.h:280 -msgid "Use portable calling conventions" +#: fortran/dump-parse-tree.c:1299 +#, c-format +msgid " UNFORMATTED=" msgstr "" -#: config/pa/pa.h:282 -#, fuzzy -msgid "Do not use portable calling conventions" -msgstr "Не генерыраваць сімвальныя інструкцыі" - -#: config/pa/pa.h:284 -msgid "Assume code will be assembled by GAS" +#: fortran/dump-parse-tree.c:1309 +#, c-format +msgid " NEXTREC=" msgstr "" -#: config/pa/pa.h:286 -msgid "Do not assume code will be assembled by GAS" +#: fortran/dump-parse-tree.c:1329 +#, c-format +msgid " READ=" msgstr "" -#: config/pa/pa.h:290 -#, fuzzy -msgid "Do not use software floating point" -msgstr "Выкарыстоўваць апаратную \"плаваючую кропку\"" - -#: config/pa/pa.h:292 -msgid "Emit long load/store sequences" +#: fortran/dump-parse-tree.c:1334 +#, c-format +msgid " WRITE=" msgstr "" -#: config/pa/pa.h:294 -msgid "Do not emit long load/store sequences" +#: fortran/dump-parse-tree.c:1339 +#, c-format +msgid " READWRITE=" msgstr "" -#: config/pa/pa.h:296 -#, fuzzy -msgid "Generate fast indirect calls" -msgstr "Генерыраваць код для Intel as" +#: fortran/dump-parse-tree.c:1358 +#, c-format +msgid "IOLENGTH " +msgstr "" -#: config/pa/pa.h:298 -#, fuzzy -msgid "Do not generate fast indirect calls" -msgstr "Не генерыраваць сімвальныя інструкцыі" +#: fortran/dump-parse-tree.c:1363 +#, c-format +msgid "READ" +msgstr "" -#: config/pa/pa.h:300 -#, fuzzy -msgid "Generate code for huge switch statements" -msgstr "Генерыраваць код для Intel as" +#: fortran/dump-parse-tree.c:1367 +#, c-format +msgid "WRITE" +msgstr "" -#: config/pa/pa.h:302 -#, fuzzy -msgid "Do not generate code for huge switch statements" -msgstr "Генерыраваць код для Intel as" +#: fortran/dump-parse-tree.c:1379 +#, c-format +msgid " FMT=" +msgstr "" -#: config/pa/pa.h:304 -#, fuzzy -msgid "Always generate long calls" -msgstr "Генерыраваць код для Intel as" +#: fortran/dump-parse-tree.c:1384 +#, c-format +msgid " FMT=%d" +msgstr "" -#: config/pa/pa.h:306 -msgid "Generate long calls only when needed" +#: fortran/dump-parse-tree.c:1386 +#, c-format +msgid " NML=%s" msgstr "" -#: config/pa/pa.h:308 -#, fuzzy -msgid "Enable linker optimizations" -msgstr "Уключаць SSA аптымізацыю" +#: fortran/dump-parse-tree.c:1400 +#, c-format +msgid " SIZE=" +msgstr "" -#: config/pa/pa.h:332 -msgid "" -"Specify PA-RISC architecture for code generation.\n" -"Values are 1.0, 1.1 and 2.0." +#: fortran/dump-parse-tree.c:1405 +#, c-format +msgid " REC=" msgstr "" -#: config/pa/pa.h:335 -msgid "Specify range of registers to make fixed." +#: fortran/dump-parse-tree.c:1410 +#, c-format +msgid " ADVANCE=" msgstr "" -#: config/pa/pa.h:337 -msgid "Specify CPU for scheduling purposes." +#: fortran/dump-parse-tree.c:1417 +#, c-format +msgid "TRANSFER " msgstr "" -#: config/pa/pa64-hpux.h:30 -msgid "Assume code will be linked by GNU ld" +#: fortran/dump-parse-tree.c:1422 +#, c-format +msgid "DT_END" msgstr "" -#: config/pa/pa64-hpux.h:32 -msgid "Assume code will be linked by HP ld" +#: fortran/dump-parse-tree.c:1428 +#, c-format +msgid " END=%d" msgstr "" -#: config/pdp11/pdp11.h:62 config/rs6000/rs6000.h:331 -msgid "Do not use hardware floating point" +#: fortran/dump-parse-tree.c:1430 +#, c-format +msgid " EOR=%d" msgstr "" -#. return float result in ac0 -#: config/pdp11/pdp11.h:64 -msgid "Return floating point results in ac0" +#: fortran/dump-parse-tree.c:1447 +#, c-format +msgid "Equivalence: " msgstr "" -#: config/pdp11/pdp11.h:65 -msgid "Return floating point results in memory" +#: fortran/dump-parse-tree.c:1473 +#, c-format +msgid "Namespace:" msgstr "" -#. is 11/40 -#: config/pdp11/pdp11.h:67 -msgid "Generate code for an 11/40" +#: fortran/dump-parse-tree.c:1487 +#, c-format +msgid " %c-%c: " msgstr "" -#. is 11/45 -#: config/pdp11/pdp11.h:70 -msgid "Generate code for an 11/45" +#: fortran/dump-parse-tree.c:1489 +#, fuzzy, c-format +msgid " %c: " +msgstr "%s: %s: " + +#: fortran/dump-parse-tree.c:1498 +#, c-format +msgid "procedure name = %s" msgstr "" -#. is 11/10 -#: config/pdp11/pdp11.h:73 -msgid "Generate code for an 11/10" +#: fortran/dump-parse-tree.c:1514 +#, fuzzy, c-format +msgid "Operator interfaces for %s:" msgstr "" +"\n" +" Выбары для %s:\n" -#. use movmemhi for bcopy -#. use 32 bit for int -#: config/pdp11/pdp11.h:78 config/pdp11/pdp11.h:79 -msgid "Use 32 bit int" -msgstr "Выкарыстоўваць 32-х бітны int" +#: fortran/dump-parse-tree.c:1523 +#, fuzzy, c-format +msgid "User operators:\n" +msgstr "нераспазнаны аператар %s" -#: config/pdp11/pdp11.h:80 config/pdp11/pdp11.h:81 -msgid "Use 16 bit int" -msgstr "Выкарыстоўваць 16-ці бітны int" +#: fortran/dump-parse-tree.c:1539 +#, c-format +msgid "CONTAINS\n" +msgstr "" -#. use 32 bit for float -#: config/pdp11/pdp11.h:83 config/pdp11/pdp11.h:84 -msgid "Use 32 bit float" -msgstr "Выкарыстоўваць 32-х бітны float" +#: fortran/error.c:137 +#, fuzzy, no-c-format +msgid "In file %s:%d\n" +msgstr "У файле уключаным з %s:%d" -#: config/pdp11/pdp11.h:85 config/pdp11/pdp11.h:86 -msgid "Use 64 bit float" -msgstr "Выкарыстоўваць 64-х бітны float" +#: fortran/error.c:152 +#, fuzzy, no-c-format +msgid " Included at %s:%d\n" +msgstr "У файле уключаным з %s:%d" -#. allow abshi pattern? - can trigger "optimizations" which make code SLOW! -#. is branching expensive - on a PDP, it's actually really cheap -#. this is just to play around and check what code gcc generates -#. split instruction and data memory? -#: config/pdp11/pdp11.h:95 -msgid "Target has split I&D" -msgstr "" +#: fortran/error.c:204 +#, fuzzy, no-c-format +msgid "\n" +msgstr "ініцыялізацыя" + +#: fortran/error.c:479 fortran/error.c:519 fortran/error.c:545 +#, fuzzy +msgid "Warning:" +msgstr "увага:" -#: config/pdp11/pdp11.h:96 -msgid "Target does not have split I&D" +#: fortran/error.c:521 fortran/error.c:595 fortran/error.c:619 +msgid "Error:" msgstr "" -#. UNIX assembler syntax? -#: config/pdp11/pdp11.h:98 -msgid "Use UNIX assembler syntax" -msgstr "Выкарыстоўваць UNIX-сінтакс для асэмблера" +#: fortran/error.c:640 +#, fuzzy +msgid "Fatal Error:" +msgstr "унутраная памылка" -#: config/pdp11/pdp11.h:99 -msgid "Use DEC assembler syntax" -msgstr "Выкарыстоўваць DEC-сінтакс для асэмблера" +#: fortran/error.c:659 +#, fuzzy, no-c-format +msgid "Internal Error at (1):" +msgstr "унутраная памылка" -#: config/rs6000/host-darwin.c:83 +#: fortran/expr.c:258 #, c-format -msgid "Out of stack space.\n" +msgid "Constant expression required at %C" msgstr "" -#: config/rs6000/host-darwin.c:104 +#: fortran/expr.c:261 #, c-format -msgid "Try running '%s' in the shell to raise its limit.\n" +msgid "Integer expression required at %C" msgstr "" -#: config/rs6000/rs6000.c:10723 +#: fortran/expr.c:266 #, c-format -msgid "invalid %%f value" +msgid "Integer value too large in expression at %C" msgstr "" -#: config/rs6000/rs6000.c:10732 -#, c-format -msgid "invalid %%F value" +#: fortran/expr.c:1273 +#, no-c-format +msgid "Numeric or CHARACTER operands are required in expression at %L" msgstr "" -#: config/rs6000/rs6000.c:10741 -#, c-format -msgid "invalid %%G value" +#: fortran/expr.c:1293 +#, no-c-format +msgid "Exponent at %L must be INTEGER for an initialization expression" msgstr "" -#: config/rs6000/rs6000.c:10776 -#, c-format -msgid "invalid %%j code" +#: fortran/expr.c:1306 +#, no-c-format +msgid "Concatenation operator in expression at %L must have two CHARACTER operands" msgstr "" -#: config/rs6000/rs6000.c:10786 -#, c-format -msgid "invalid %%J code" +#: fortran/expr.c:1313 +#, no-c-format +msgid "Concat operator at %L must concatenate strings of the same kind" msgstr "" -#: config/rs6000/rs6000.c:10796 -#, c-format -msgid "invalid %%k value" +#: fortran/expr.c:1323 +#, no-c-format +msgid ".NOT. operator in expression at %L must have a LOGICAL operand" msgstr "" -#: config/rs6000/rs6000.c:10816 config/xtensa/xtensa.c:1937 -#, c-format -msgid "invalid %%K value" +#: fortran/expr.c:1339 +#, no-c-format +msgid "LOGICAL operands are required in expression at %L" msgstr "" -#: config/rs6000/rs6000.c:10883 -#, c-format -msgid "invalid %%O value" -msgstr "нерэчаіснае значэньне %%O" - -#: config/rs6000/rs6000.c:10930 -#, c-format -msgid "invalid %%q value" +#: fortran/expr.c:1347 +#, no-c-format +msgid "Only intrinsic operators can be used in expression at %L" msgstr "" -#: config/rs6000/rs6000.c:10974 -#, c-format -msgid "invalid %%S value" +#: fortran/expr.c:1355 +#, no-c-format +msgid "Numeric operands are required in expression at %L" msgstr "" -#: config/rs6000/rs6000.c:11016 -#, c-format -msgid "invalid %%T value" +#: fortran/expr.c:1459 +#, no-c-format +msgid "Function '%s' in initialization expression at %L must be an intrinsic function" msgstr "" -#: config/rs6000/rs6000.c:11026 -#, c-format -msgid "invalid %%u value" +#: fortran/expr.c:1481 +#, no-c-format +msgid "Variable '%s' at %L cannot appear in an initialization expression" msgstr "" -#: config/rs6000/rs6000.c:11035 config/xtensa/xtensa.c:1907 -#, c-format -msgid "invalid %%v value" +#: fortran/expr.c:1603 +#, no-c-format +msgid "Specification function '%s' at %L cannot be a statement function" msgstr "" -#: config/rs6000/aix.h:204 -msgid "Conform more closely to IBM XLC semantics" +#: fortran/expr.c:1610 +#, no-c-format +msgid "Specification function '%s' at %L cannot be an internal function" msgstr "" -#: config/rs6000/aix.h:206 -msgid "Default GCC semantics that differ from IBM XLC" +#: fortran/expr.c:1617 +#, no-c-format +msgid "Specification function '%s' at %L must be PURE" msgstr "" -#: config/rs6000/aix41.h:28 config/rs6000/aix43.h:32 config/rs6000/aix51.h:31 -#: config/rs6000/aix52.h:31 -msgid "Support message passing with the Parallel Environment" +#: fortran/expr.c:1624 +#, no-c-format +msgid "Specification function '%s' at %L cannot be RECURSIVE" msgstr "" -#: config/rs6000/aix43.h:28 config/rs6000/aix51.h:27 config/rs6000/aix52.h:27 -msgid "Compile for 64-bit pointers" +#: fortran/expr.c:1681 +#, no-c-format +msgid "Dummy argument '%s' at %L cannot be OPTIONAL" msgstr "" -#: config/rs6000/aix43.h:30 config/rs6000/aix51.h:29 config/rs6000/aix52.h:29 -msgid "Compile for 32-bit pointers" +#: fortran/expr.c:1688 +#, no-c-format +msgid "Dummy argument '%s' at %L cannot be INTENT(OUT)" msgstr "" -#: config/rs6000/darwin.h:69 config/rs6000/sysv4.h:153 -#, fuzzy -msgid "Generate 64-bit code" -msgstr "Стварыць код для DLL" - -#: config/rs6000/darwin.h:71 config/rs6000/sysv4.h:155 -#, fuzzy -msgid "Generate 32-bit code" -msgstr "Стварыць код для DLL" +#: fortran/expr.c:1708 +#, no-c-format +msgid "Variable '%s' cannot appear in the expression at %L" +msgstr "" -#: config/rs6000/darwin.h:73 -msgid "Generate code suitable for executables (NOT shared libs)" +#: fortran/expr.c:1754 +#, no-c-format +msgid "Expression at %L must be of INTEGER type" msgstr "" -#: config/rs6000/linux64.h:221 -msgid "Call mcount for profiling before a function prologue" +#: fortran/expr.c:1760 +#, no-c-format +msgid "Expression at %L must be scalar" msgstr "" -#: config/rs6000/linux64.h:223 -msgid "Call mcount for profiling after a function prologue" +#: fortran/expr.c:1788 +#, no-c-format +msgid "Incompatible ranks in %s at %L" msgstr "" -#. Run-time compilation parameters selecting different hardware subsets. -#. -#. 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. -#: config/rs6000/rs6000.h:277 -msgid "Use POWER instruction set" +#: fortran/expr.c:1802 +#, no-c-format +msgid "%s at %L has different shape on dimension %d (%d/%d)" msgstr "" -#: config/rs6000/rs6000.h:280 -msgid "Use POWER2 instruction set" +#: fortran/expr.c:1835 +#, no-c-format +msgid "Can't assign to INTENT(IN) variable '%s' at %L" msgstr "" -#: config/rs6000/rs6000.h:282 -msgid "Do not use POWER2 instruction set" +#: fortran/expr.c:1842 +#, no-c-format +msgid "Incompatible ranks %d and %d in assignment at %L" msgstr "" -#: config/rs6000/rs6000.h:285 -msgid "Do not use POWER instruction set" +#: fortran/expr.c:1849 +#, no-c-format +msgid "Variable type is UNKNOWN in assignment at %L" msgstr "" -#: config/rs6000/rs6000.h:287 -msgid "Use PowerPC instruction set" +#: fortran/expr.c:1856 +#, no-c-format +msgid "NULL appears on right-hand side in assignment at %L" msgstr "" -#: config/rs6000/rs6000.h:290 -msgid "Do not use PowerPC instruction set" +#: fortran/expr.c:1866 +#, no-c-format +msgid "Vector assignment to assumed-size Cray Pointee at %L is illegal." msgstr "" -#: config/rs6000/rs6000.h:292 -msgid "Use PowerPC General Purpose group optional instructions" +#: fortran/expr.c:1875 +#, no-c-format +msgid "POINTER valued function appears on right-hand side of assignment at %L" msgstr "" -#: config/rs6000/rs6000.h:294 -#, fuzzy -msgid "Do not use PowerPC General Purpose group optional instructions" -msgstr "Не генерыраваць сімвальныя інструкцыі" +#: fortran/expr.c:1880 +msgid "Array assignment" +msgstr "" -#: config/rs6000/rs6000.h:296 -msgid "Use PowerPC Graphics group optional instructions" +#: fortran/expr.c:1897 +#, no-c-format +msgid "Incompatible types in assignment at %L, %s to %s" msgstr "" -#: config/rs6000/rs6000.h:298 -#, fuzzy -msgid "Do not use PowerPC Graphics group optional instructions" -msgstr "Не генерыраваць сімвальныя інструкцыі" +#: fortran/expr.c:1920 +#, no-c-format +msgid "Pointer assignment target is not a POINTER at %L" +msgstr "" -#: config/rs6000/rs6000.h:300 -msgid "Use PowerPC-64 instruction set" +#: fortran/expr.c:1928 +#, no-c-format +msgid "Pointer assignment to non-POINTER at %L" msgstr "" -#: config/rs6000/rs6000.h:302 -#, fuzzy -msgid "Do not use PowerPC-64 instruction set" -msgstr "Не генерыраваць сімвальныя інструкцыі" +#: fortran/expr.c:1936 +#, no-c-format +msgid "Bad pointer object in PURE procedure at %L" +msgstr "" -#: config/rs6000/rs6000.h:304 -msgid "Use AltiVec instructions" +#: fortran/expr.c:1949 +#, no-c-format +msgid "Different types in pointer assignment at %L" msgstr "" -#: config/rs6000/rs6000.h:306 -#, fuzzy -msgid "Do not use AltiVec instructions" -msgstr "Не выкарыстоўваць інструкцыі AltiVec" +#: fortran/expr.c:1956 +#, no-c-format +msgid "Different kind type parameters in pointer assignment at %L" +msgstr "" -#: config/rs6000/rs6000.h:308 -msgid "Use new mnemonics for PowerPC architecture" +#: fortran/expr.c:1964 +#, no-c-format +msgid "Pointer assignment target is neither TARGET nor POINTER at %L" msgstr "" -#: config/rs6000/rs6000.h:310 -msgid "Use old mnemonics for PowerPC architecture" +#: fortran/expr.c:1971 +#, no-c-format +msgid "Bad target in pointer assignment in PURE procedure at %L" msgstr "" -#: config/rs6000/rs6000.h:313 -msgid "Put everything in the regular TOC" +#: fortran/expr.c:1977 +#, no-c-format +msgid "Unequal ranks %d and %d in pointer assignment at %L" msgstr "" -#: config/rs6000/rs6000.h:315 -msgid "Place floating point constants in TOC" +#: fortran/expr.c:1984 +#, no-c-format +msgid "Pointer assignment with vector subscript on rhs at %L" msgstr "" -#: config/rs6000/rs6000.h:317 -msgid "Do not place floating point constants in TOC" +#: fortran/gfortranspec.c:232 +#, c-format +msgid "overflowed output arg list for '%s'" msgstr "" -#: config/rs6000/rs6000.h:319 -msgid "Place symbol+offset constants in TOC" +#: fortran/gfortranspec.c:352 +#, c-format +msgid "" +"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" +"\n" msgstr "" -#: config/rs6000/rs6000.h:321 -msgid "Do not place symbol+offset constants in TOC" +#: fortran/gfortranspec.c:374 +#, fuzzy, c-format +msgid "argument to '%s' missing" +msgstr "аргумент для \"%s\" прапушчан" + +#: fortran/gfortranspec.c:378 +#, c-format +msgid "no input files; unwilling to write output files" msgstr "" -#: config/rs6000/rs6000.h:327 -msgid "Place variable addresses in the regular TOC" +#: fortran/gfortranspec.c:530 +#, fuzzy, c-format +msgid "Driving:" +msgstr "увага:" + +#: fortran/interface.c:175 +#, no-c-format +msgid "Syntax error in generic specification at %C" msgstr "" -#: config/rs6000/rs6000.h:333 -msgid "Generate load/store multiple instructions" +#: fortran/interface.c:204 +#, no-c-format +msgid "Syntax error: Trailing garbage in INTERFACE statement at %C" msgstr "" -#: config/rs6000/rs6000.h:335 -msgid "Do not generate load/store multiple instructions" +#: fortran/interface.c:262 +#, no-c-format +msgid "Syntax error: Trailing garbage in END INTERFACE statement at %C" msgstr "" -#: config/rs6000/rs6000.h:337 -msgid "Generate string instructions for block moves" +#: fortran/interface.c:273 +#, no-c-format +msgid "Expected a nameless interface at %C" msgstr "" -#: config/rs6000/rs6000.h:339 -msgid "Do not generate string instructions for block moves" +#: fortran/interface.c:284 +#, no-c-format +msgid "Expected 'END INTERFACE ASSIGNMENT (=)' at %C" msgstr "" -#: config/rs6000/rs6000.h:341 -msgid "Generate load/store with update instructions" +#: fortran/interface.c:286 +#, no-c-format +msgid "Expecting 'END INTERFACE OPERATOR (%s)' at %C" msgstr "" -#: config/rs6000/rs6000.h:343 -msgid "Do not generate load/store with update instructions" +#: fortran/interface.c:300 +#, no-c-format +msgid "Expecting 'END INTERFACE OPERATOR (.%s.)' at %C" msgstr "" -#: config/rs6000/rs6000.h:347 -#, fuzzy -msgid "Do not generate fused multiply/add instructions" -msgstr "Не генерыраваць сімвальныя інструкцыі" +#: fortran/interface.c:311 +#, no-c-format +msgid "Expecting 'END INTERFACE %s' at %C" +msgstr "" -#: config/rs6000/rs6000.h:351 -msgid "Do not schedule the start and end of the procedure" +#: fortran/interface.c:509 +#, no-c-format +msgid "Assignment operator interface at %L must be a SUBROUTINE" msgstr "" -#: config/rs6000/rs6000.h:357 -msgid "Return all structures in memory (AIX default)" +#: fortran/interface.c:518 +#, no-c-format +msgid "Intrinsic operator interface at %L must be a FUNCTION" msgstr "" -#: config/rs6000/rs6000.h:359 -msgid "Return small structures in registers (SVR4 default)" +#: fortran/interface.c:605 +#, no-c-format +msgid "First argument of defined assignment at %L must be INTENT(IN) or INTENT(INOUT)" msgstr "" -#: config/rs6000/rs6000.h:365 -#, fuzzy -msgid "Generate single field mfcr instruction" -msgstr "Не генерыраваць сімвальныя інструкцыі" +#: fortran/interface.c:609 +#, no-c-format +msgid "Second argument of defined assignment at %L must be INTENT(IN)" +msgstr "" -#: config/rs6000/rs6000.h:367 -#, fuzzy -msgid "Do not generate single field mfcr instruction" -msgstr "Не генерыраваць сімвальныя інструкцыі" +#: fortran/interface.c:615 +#, no-c-format +msgid "First argument of operator interface at %L must be INTENT(IN)" +msgstr "" -#: config/rs6000/rs6000.h:451 config/sparc/sparc.h:718 -msgid "Use features of and schedule code for given CPU" +#: fortran/interface.c:619 +#, no-c-format +msgid "Second argument of operator interface at %L must be INTENT(IN)" msgstr "" -#: config/rs6000/rs6000.h:454 -msgid "Enable debug output" +#: fortran/interface.c:626 +#, no-c-format +msgid "Operator interface at %L conflicts with intrinsic interface" msgstr "" -#: config/rs6000/rs6000.h:456 -msgid "Select full, part, or no traceback table" +#: fortran/interface.c:631 +#, no-c-format +msgid "Operator interface at %L has the wrong number of arguments" msgstr "" -#: config/rs6000/rs6000.h:457 -msgid "Specify ABI to use" +#: fortran/interface.c:880 +#, no-c-format +msgid "Procedure '%s' in %s at %L is neither function nor subroutine" msgstr "" -#: config/rs6000/rs6000.h:459 -msgid "Specify size of long double (64 or 128 bits)" +#: fortran/interface.c:934 +#, no-c-format +msgid "Ambiguous interfaces '%s' and '%s' in %s at %L" msgstr "" -#: config/rs6000/rs6000.h:461 -msgid "Specify yes/no if isel instructions should be generated" +#: fortran/interface.c:1183 +#, no-c-format +msgid "Keyword argument '%s' at %L is not in the procedure" msgstr "" -#: config/rs6000/rs6000.h:463 -msgid "Specify yes/no if SPE SIMD instructions should be generated" +#: fortran/interface.c:1192 +#, no-c-format +msgid "Keyword argument '%s' at %L is already associated with another actual argument" msgstr "" -#: config/rs6000/rs6000.h:465 -msgid "Specify yes/no if using floating point in the GPRs" +#: fortran/interface.c:1202 +#, no-c-format +msgid "More actual than formal arguments in procedure call at %L" msgstr "" -#: config/rs6000/rs6000.h:467 -msgid "Specify yes/no if VRSAVE instructions should be generated for AltiVec" +#: fortran/interface.c:1215 +#, no-c-format +msgid "Missing alternate return spec in subroutine call at %L" msgstr "" -#: config/rs6000/rs6000.h:469 -msgid "Avoid all range limits on call instructions" +#: fortran/interface.c:1224 +#, no-c-format +msgid "Unexpected alternate return spec in subroutine call at %L" msgstr "" -#: config/rs6000/rs6000.h:472 -msgid "Warn about deprecated 'vector long ...' AltiVec type usage" +#: fortran/interface.c:1233 +#, no-c-format +msgid "Type/rank mismatch in argument '%s' at %L" msgstr "" -#: config/rs6000/rs6000.h:475 -msgid "Determine which dependences between insns are considered costly" +#: fortran/interface.c:1248 +#, no-c-format +msgid "Actual argument for '%s' cannot be an assumed-size array at %L" msgstr "" -#: config/rs6000/rs6000.h:477 -msgid "Specify which post scheduling nop insertion scheme to apply" +#: fortran/interface.c:1257 +#, fuzzy, no-c-format +msgid "Actual argument for '%s' must be a pointer at %L" +msgstr "першым аргументам \"%s\" павінен быць \"int\"" + +#: fortran/interface.c:1278 +#, no-c-format +msgid "Missing actual argument for argument '%s' at %L" msgstr "" -#: config/rs6000/rs6000.h:479 -msgid "Specify alignment of structure fields default/natural" +#: fortran/interface.c:1463 +#, no-c-format +msgid "Same actual argument associated with INTENT(%s) argument '%s' and INTENT(%s) argument '%s' at %L" msgstr "" -#: config/rs6000/rs6000.h:481 -msgid "Specify scheduling priority for dispatch slot restricted insns" +#: fortran/interface.c:1504 +#, no-c-format +msgid "Procedure argument at %L is INTENT(IN) while interface specifies INTENT(%s)" msgstr "" -#: config/rs6000/sysv4.h:87 -msgid "Select ABI calling convention" +#: fortran/interface.c:1515 +#, no-c-format +msgid "Procedure argument at %L is local to a PURE procedure and is passed to an INTENT(%s) argument" msgstr "" -#: config/rs6000/sysv4.h:88 -msgid "Select method for sdata handling" +#: fortran/interface.c:1524 +#, no-c-format +msgid "Procedure argument at %L is local to a PURE procedure and has the POINTER attribute" msgstr "" -#: config/rs6000/sysv4.h:100 -msgid "Align to the base type of the bit-field" +#: fortran/interface.c:1545 +#, no-c-format +msgid "Procedure '%s' called with an implicit interface at %L" msgstr "" -#: config/rs6000/sysv4.h:102 -msgid "Don't align to the base type of the bit-field" +#: fortran/interface.c:1711 +#, no-c-format +msgid "Function '%s' called in lieu of an operator at %L must be PURE" msgstr "" -#: config/rs6000/sysv4.h:104 -msgid "Don't assume that unaligned accesses are handled by the system" +#: fortran/interface.c:1776 +#, no-c-format +msgid "Subroutine '%s' called in lieu of assignment at %L must be PURE" msgstr "" -#: config/rs6000/sysv4.h:106 -msgid "Assume that unaligned accesses are handled by the system" +#: fortran/interface.c:1798 +#, no-c-format +msgid "Entity '%s' at %C is already present in the interface" msgstr "" -#: config/rs6000/sysv4.h:108 config/rs6000/sysv4.h:112 -msgid "Produce code relocatable at runtime" +#: fortran/intrinsic.c:2715 +#, fuzzy, no-c-format +msgid "Too many arguments in call to '%s' at %L" +msgstr "вельмі шмат аргументаў у функцыі \"%s\"" + +#: fortran/intrinsic.c:2729 +#, no-c-format +msgid "Can't find keyword named '%s' in call to '%s' at %L" msgstr "" -#: config/rs6000/sysv4.h:110 config/rs6000/sysv4.h:114 -msgid "Don't produce code relocatable at runtime" +#: fortran/intrinsic.c:2736 +#, no-c-format +msgid "Argument '%s' is appears twice in call to '%s' at %L" msgstr "" -#: config/rs6000/sysv4.h:116 config/rs6000/sysv4.h:118 -msgid "Produce little endian code" +#: fortran/intrinsic.c:2750 +#, no-c-format +msgid "Missing actual argument '%s' in call to '%s' at %L" msgstr "" -#: config/rs6000/sysv4.h:120 config/rs6000/sysv4.h:122 -msgid "Produce big endian code" +#: fortran/intrinsic.c:2809 +#, no-c-format +msgid "Type of argument '%s' in call to '%s' at %L should be %s, not %s" msgstr "" -#: config/rs6000/sysv4.h:123 config/rs6000/sysv4.h:124 -#: config/rs6000/sysv4.h:125 config/rs6000/sysv4.h:126 -#: config/rs6000/sysv4.h:127 config/rs6000/sysv4.h:128 -#: config/rs6000/sysv4.h:138 config/rs6000/sysv4.h:139 -#: config/rs6000/sysv4.h:151 config/rs6000/sysv4.h:157 -msgid "no description yet" +#: fortran/intrinsic.c:3113 +#, no-c-format +msgid "Ranks of arguments to elemental intrinsic '%s' differ at %L" msgstr "" -#: config/rs6000/sysv4.h:129 -msgid "Use EABI" +#: fortran/intrinsic.c:3159 +#, no-c-format +msgid "Intrinsic '%s' at %L is not included in the selected standard" msgstr "" -#: config/rs6000/sysv4.h:130 -msgid "Don't use EABI" -msgstr "Не выкарыстоўваць EABI" +#: fortran/intrinsic.c:3262 +#, no-c-format +msgid "Extension: Evaluation of nonstandard initialization expression at %L" +msgstr "" -#: config/rs6000/sysv4.h:133 -msgid "Do not allow bit-fields to cross word boundaries" +#: fortran/intrinsic.c:3322 +#, no-c-format +msgid "Subroutine call to intrinsic '%s' at %L is not PURE" msgstr "" -#: config/rs6000/sysv4.h:135 -msgid "Use alternate register names" -msgstr "Выкарыстоўвываць альтэрнатыўныя назвы рэгістраў" +#: fortran/intrinsic.c:3397 +#, no-c-format +msgid "Extension: Conversion from %s to %s at %L" +msgstr "" -#: config/rs6000/sysv4.h:137 -msgid "Don't use alternate register names" -msgstr "Не выкарыстоўвываць альтэрнатыўныя назвы рэгістраў" +#: fortran/intrinsic.c:3400 +#, fuzzy, no-c-format +msgid "Conversion from %s to %s at %L" +msgstr "пераўтварэньне з `%T' у `%T'" -#: config/rs6000/sysv4.h:141 -msgid "Link with libsim.a, libc.a and sim-crt0.o" +#: fortran/intrinsic.c:3437 +#, no-c-format +msgid "Can't convert %s to %s at %L" msgstr "" -#: config/rs6000/sysv4.h:143 -msgid "Link with libads.a, libc.a and crt0.o" +#: fortran/io.c:404 +msgid "Positive width required" msgstr "" -#: config/rs6000/sysv4.h:145 -msgid "Link with libyk.a, libc.a and crt0.o" +#: fortran/io.c:405 +msgid "Period required" msgstr "" -#: config/rs6000/sysv4.h:147 -msgid "Link with libmvme.a, libc.a and crt0.o" +#: fortran/io.c:406 +msgid "Nonnegative width required" msgstr "" -#: config/rs6000/sysv4.h:149 -msgid "Set the PPC_EMB bit in the ELF flags header" +#: fortran/io.c:407 +msgid "Unexpected element" msgstr "" -#: config/rs6000/sysv4.h:150 -msgid "Use the WindISS simulator" +#: fortran/io.c:408 +msgid "Unexpected end of format string" msgstr "" -#: config/s390/s390.c:4313 -#, c-format -msgid "Cannot decompose address." +#: fortran/io.c:425 +msgid "Missing leading left parenthesis" msgstr "" -#: config/s390/s390.c:4505 -msgid "UNKNOWN in print_operand !?" +#: fortran/io.c:463 +msgid "Expected P edit descriptor" msgstr "" -#: config/s390/s390.h:136 -msgid "Use bras for executable < 64k" +#. P requires a prior number. +#: fortran/io.c:471 +msgid "P descriptor requires leading scale factor" msgstr "" -#: config/s390/s390.h:137 -#, fuzzy -msgid "Don't use bras" -msgstr "Не выкарыстоўваць Irix PIC" - -#: config/s390/s390.h:138 -msgid "Additional debug prints" +#. X requires a prior number if we're being pedantic. +#: fortran/io.c:476 +#, no-c-format +msgid "Extension: X descriptor requires leading space count at %C" msgstr "" -#: config/s390/s390.h:139 -msgid "Don't print additional debug prints" +#: fortran/io.c:496 +#, no-c-format +msgid "Extension: $ descriptor at %C" msgstr "" -#: config/s390/s390.h:140 -msgid "64 bit ABI" +#: fortran/io.c:501 +msgid "$ must be the last specifier" msgstr "" -#: config/s390/s390.h:141 -msgid "31 bit ABI" +#: fortran/io.c:546 +msgid "Repeat count cannot follow P descriptor" msgstr "" -#: config/s390/s390.h:142 -msgid "z/Architecture" +#: fortran/io.c:609 +msgid "Positive exponent width required" msgstr "" -#: config/s390/s390.h:143 -msgid "ESA/390 architecture" +#: fortran/io.c:710 fortran/io.c:762 +#, no-c-format +msgid "Extension: Missing comma at %C" msgstr "" -#: config/s390/s390.h:144 -msgid "mvcle use" +#: fortran/io.c:777 fortran/io.c:780 +#, no-c-format +msgid "%s in format string at %C" msgstr "" -#: config/s390/s390.h:145 -msgid "mvc&ex" +#: fortran/io.c:820 +#, no-c-format +msgid "Missing format label at %C" msgstr "" -#: config/s390/s390.h:146 -msgid "Enable tpf OS tracing code" +#: fortran/io.c:878 fortran/io.c:902 +#, fuzzy, no-c-format +msgid "Duplicate %s specification at %C" +msgstr "няма папярэдняга аб'яўлення для \"%s\"" + +#: fortran/io.c:909 +#, no-c-format +msgid "Variable tag cannot be INTENT(IN) at %C" msgstr "" -#: config/s390/s390.h:147 -msgid "Disable tpf OS tracing code" +#: fortran/io.c:916 +#, no-c-format +msgid "Variable tag cannot be assigned in PURE procedure at %C" msgstr "" -#: config/s390/s390.h:148 -#, fuzzy -msgid "Disable fused multiply/add instructions" -msgstr "Не генерыраваць сімвальныя інструкцыі" +#: fortran/io.c:953 +#, fuzzy, no-c-format +msgid "Duplicate %s label specification at %C" +msgstr "паўторнае абвяшчэньне адмеціны `%s'" -#: config/s390/s390.h:149 -#, fuzzy -msgid "Enable fused multiply/add instructions" -msgstr "Не генерыраваць сімвальныя інструкцыі" +#: fortran/io.c:975 +#, no-c-format +msgid "%s tag at %L must be of type %s" +msgstr "" -#: config/s390/s390.h:150 -msgid "Maintain backchain pointer" +#: fortran/io.c:986 +#, no-c-format +msgid "Constant expression in FORMAT tag at %L must be of type default CHARACTER" msgstr "" -#: config/s390/s390.h:151 -msgid "Don't maintain backchain pointer" +#: fortran/io.c:999 +#, no-c-format +msgid "%s tag at %L must be of type %s or %s" msgstr "" -#: config/s390/s390.h:152 -msgid "Use packed stack layout" +#: fortran/io.c:1007 +#, no-c-format +msgid "Obsolete: ASSIGNED variable in FORMAT tag at %L" msgstr "" -#: config/s390/s390.h:153 -msgid "Don't use packed stack layout" +#: fortran/io.c:1012 +#, no-c-format +msgid "Variable '%s' at %L has not been assigned a format label" msgstr "" -#: config/s390/s390.h:162 -msgid "Warn if a single function's framesize exceeds the given framesize" +#: fortran/io.c:1027 +#, no-c-format +msgid "Extension: Character array in FORMAT tag at %L" msgstr "" -#: config/s390/s390.h:165 -msgid "Warn if a function uses alloca or creates an array with dynamic size" +#: fortran/io.c:1034 +#, no-c-format +msgid "Extension: Non-character in FORMAT tag at %L" msgstr "" -#: config/s390/s390.h:168 -msgid "Emit extra code in the function prologue in order to trap if the stacksize exceeds the given limit" +#: fortran/io.c:1045 +#, no-c-format +msgid "%s tag at %L must be scalar" msgstr "" -#: config/s390/s390.h:171 -msgid "Set the max. number of bytes which has to be left to stack size before a trap instruction is triggered" +#: fortran/io.c:1050 +#, no-c-format +msgid "Fortran 2003: IOMSG tag at %L" msgstr "" -#: config/sparc/sparc.c:7325 config/sparc/sparc.c:7331 -#, c-format -msgid "invalid %%Y operand" -msgstr "нерэчаісны %%Y аперанд" +#: fortran/io.c:1214 +#, no-c-format +msgid "OPEN statement not allowed in PURE procedure at %C" +msgstr "" -#: config/sparc/sparc.c:7401 -#, c-format -msgid "invalid %%A operand" -msgstr "нерэчаісны %%A аперанд" +#: fortran/io.c:1322 +#, no-c-format +msgid "CLOSE statement not allowed in PURE procedure at %C" +msgstr "" -#: config/sparc/sparc.c:7411 -#, c-format -msgid "invalid %%B operand" -msgstr "нерэчаісны %%B аперанд" +#: fortran/io.c:1448 fortran/match.c:1441 +#, no-c-format +msgid "%s statement not allowed in PURE procedure at %C" +msgstr "" -#: config/sparc/sparc.c:7450 -#, c-format -msgid "invalid %%c operand" -msgstr "нерэчаісны %%c аперанд" +#: fortran/io.c:1508 +#, no-c-format +msgid "Fortran 2003: FLUSH statement at %C" +msgstr "" -#: config/sparc/sparc.c:7451 -#, c-format -msgid "invalid %%C operand" -msgstr "нерэчаісны %%C аперанд" +#: fortran/io.c:1568 +#, no-c-format +msgid "Duplicate UNIT specification at %C" +msgstr "" -#: config/sparc/sparc.c:7472 -#, c-format -msgid "invalid %%d operand" -msgstr "нерэчаісны %%d аперанд" +#: fortran/io.c:1624 +#, fuzzy, no-c-format +msgid "Duplicate format specification at %C" +msgstr "няма папярэдняга аб'яўлення для \"%s\"" -#: config/sparc/sparc.c:7473 -#, c-format -msgid "invalid %%D operand" -msgstr "нерэчаісны %%D аперанд" +#: fortran/io.c:1641 +#, no-c-format +msgid "Symbol '%s' in namelist '%s' is INTENT(IN) at %C" +msgstr "" -#: config/sparc/sparc.c:7489 -#, c-format -msgid "invalid %%f operand" -msgstr "нерэчаісны %%f аперанд" +#: fortran/io.c:1677 +#, fuzzy, no-c-format +msgid "Duplicate NML specification at %C" +msgstr "няма папярэдняга аб'яўлення для \"%s\"" -#: config/sparc/sparc.c:7503 -#, fuzzy, c-format -msgid "invalid %%s operand" -msgstr "нерэчаісны %%f аперанд" +#: fortran/io.c:1686 +#, no-c-format +msgid "Symbol '%s' at %C must be a NAMELIST group name" +msgstr "" -#: config/sparc/sparc.c:7557 -#, c-format -msgid "long long constant not a valid immediate operand" +#: fortran/io.c:1722 +#, no-c-format +msgid "END tag at %C not allowed in output statement" msgstr "" -#: config/sparc/sparc.c:7560 -#, c-format -msgid "floating point constant not a valid immediate operand" +#: fortran/io.c:1782 +#, no-c-format +msgid "UNIT specification at %L must be an INTEGER expression or a CHARACTER variable" msgstr "" -#: config/sparc/freebsd.h:77 config/sparc/linux.h:91 -#: config/sparc/linux64.h:111 config/sparc/netbsd-elf.h:201 -msgid "Use 64 bit long doubles" +#: fortran/io.c:1792 +#, no-c-format +msgid "Internal unit with vector subscript at %L" msgstr "" -#: config/sparc/freebsd.h:78 config/sparc/linux.h:92 -#: config/sparc/linux64.h:112 config/sparc/netbsd-elf.h:202 -msgid "Use 128 bit long doubles" +#: fortran/io.c:1799 +#, no-c-format +msgid "REC tag at %L is incompatible with internal file" msgstr "" -#: config/sparc/sp64-elf.h:87 -msgid "Generate code for big endian" +#: fortran/io.c:1806 +#, no-c-format +msgid "Internal file at %L is incompatible with namelist" msgstr "" -#: config/sparc/sp64-elf.h:88 -msgid "Generate code for little endian" +#: fortran/io.c:1813 +#, no-c-format +msgid "ADVANCE tag at %L is incompatible with internal file" msgstr "" -#: config/sparc/sp86x-elf.h:61 -msgid "Use little-endian byte order for data" +#: fortran/io.c:1823 +#, no-c-format +msgid "REC tag at %L is incompatible with END tag" msgstr "" -#: config/sparc/sparc.h:635 -msgid "Assume possible double misalignment" +#: fortran/io.c:1831 +#, no-c-format +msgid "END tag at %L is incompatible with list directed format (*)" msgstr "" -#: config/sparc/sparc.h:637 -msgid "Assume all doubles are aligned" +#: fortran/io.c:1838 +#, no-c-format +msgid "REC tag at %L is incompatible with namelist" msgstr "" -#: config/sparc/sparc.h:639 -msgid "Pass -assert pure-text to linker" +#: fortran/io.c:1846 +#, no-c-format +msgid "ADVANCE tag at %L is incompatible with list directed format (*)" msgstr "" -#: config/sparc/sparc.h:641 -msgid "Do not pass -assert pure-text to linker" +#: fortran/io.c:1853 +#, no-c-format +msgid "EOR tag at %L requires an ADVANCE tag" msgstr "" -#: config/sparc/sparc.h:643 -msgid "Use ABI reserved registers" +#: fortran/io.c:1859 +#, no-c-format +msgid "SIZE tag at %L requires an ADVANCE tag" msgstr "" -#: config/sparc/sparc.h:645 -msgid "Do not use ABI reserved registers" +#: fortran/io.c:1879 +#, fuzzy, no-c-format +msgid "FORMAT label %d at %L not defined" +msgstr "адмеціна `%s' выкарыстоўвываецца, але ня вызначана" + +#: fortran/io.c:2000 +#, no-c-format +msgid "Syntax error in I/O iterator at %C" msgstr "" -#: config/sparc/sparc.h:647 -msgid "Use hardware quad fp instructions" +#: fortran/io.c:2031 +#, no-c-format +msgid "Expected variable in READ statement at %C" msgstr "" -#: config/sparc/sparc.h:649 -msgid "Do not use hardware quad fp instructions" +#: fortran/io.c:2037 +#, no-c-format +msgid "Expected expression in %s statement at %C" msgstr "" -#: config/sparc/sparc.h:651 -msgid "Compile for v8plus ABI" +#: fortran/io.c:2048 +#, no-c-format +msgid "Variable '%s' in input list at %C cannot be INTENT(IN)" msgstr "" -#: config/sparc/sparc.h:653 -msgid "Do not compile for v8plus ABI" +#: fortran/io.c:2057 +#, no-c-format +msgid "Cannot read to variable '%s' in PURE procedure at %C" msgstr "" -#: config/sparc/sparc.h:655 -msgid "Utilize Visual Instruction Set" +#: fortran/io.c:2074 +#, no-c-format +msgid "Cannot write to internal file unit '%s' at %C inside a PURE procedure" msgstr "" -#: config/sparc/sparc.h:657 -msgid "Do not utilize Visual Instruction Set" +#. A general purpose syntax error. +#: fortran/io.c:2134 fortran/io.c:2363 fortran/gfortran.h:1629 +#, no-c-format +msgid "Syntax error in %s statement at %C" msgstr "" -#: config/sparc/sparc.h:659 -msgid "Pointers are 64-bit" +#: fortran/io.c:2191 +#, no-c-format +msgid "PRINT namelist at %C is an extension" msgstr "" -#: config/sparc/sparc.h:661 -msgid "Pointers are 32-bit" +#: fortran/io.c:2199 +#, no-c-format +msgid "Namelist followed by I/O list at %C" msgstr "" -#: config/sparc/sparc.h:663 -msgid "Use 32-bit ABI" +#: fortran/io.c:2305 +#, no-c-format +msgid "Extension: Comma before output item list at %C is an extension" msgstr "" -#: config/sparc/sparc.h:665 -msgid "Use 64-bit ABI" +#: fortran/io.c:2314 +#, no-c-format +msgid "Expected comma in I/O list at %C" msgstr "" -#: config/sparc/sparc.h:667 -msgid "Use stack bias" +#: fortran/io.c:2332 +#, no-c-format +msgid "Internal file '%s' at %L is INTENT(IN)" msgstr "" -#: config/sparc/sparc.h:669 -msgid "Do not use stack bias" +#: fortran/io.c:2348 +#, no-c-format +msgid "io-unit in %s statement at %C must be an internal file in a PURE procedure" msgstr "" -#: config/sparc/sparc.h:671 -msgid "Use structs on stronger alignment for double-word copies" +#: fortran/io.c:2395 +#, no-c-format +msgid "PRINT statement at %C not allowed within PURE procedure" msgstr "" -#: config/sparc/sparc.h:673 -msgid "Do not use structs on stronger alignment for double-word copies" +#: fortran/io.c:2534 fortran/io.c:2582 +#, no-c-format +msgid "INQUIRE statement not allowed in PURE procedure at %C" msgstr "" -#: config/sparc/sparc.h:675 -msgid "Optimize tail call instructions in assembler and linker" +#: fortran/io.c:2558 +#, no-c-format +msgid "IOLENGTH tag invalid in INQUIRE statement at %C" msgstr "" -#: config/sparc/sparc.h:677 -msgid "Do not optimize tail call instructions in assembler or linker" +#: fortran/io.c:2568 +#, no-c-format +msgid "INQUIRE statement at %L cannot contain both FILE and UNIT specifiers" msgstr "" -#: config/sparc/sparc.h:722 -msgid "Use given SPARC code model" +#: fortran/io.c:2575 +#, no-c-format +msgid "INQUIRE statement at %L requires either FILE or UNIT specifier" msgstr "" -#: config/stormy16/stormy16.c:1921 config/stormy16/stormy16.c:1992 -#, fuzzy, c-format -msgid "'B' operand is not constant" -msgstr "тып параметра \"%s\" не аб'яўлены" +#: fortran/match.c:175 +#, no-c-format +msgid "Integer too large at %C" +msgstr "" -#: config/stormy16/stormy16.c:1948 -#, c-format -msgid "'B' operand has multiple bits set" +#: fortran/match.c:238 +#, no-c-format +msgid "Statement label at %C is out of range" msgstr "" -#: config/stormy16/stormy16.c:1974 -#, fuzzy, c-format -msgid "'o' operand is not constant" -msgstr "тып параметра \"%s\" не аб'яўлены" +#: fortran/match.c:263 +#, fuzzy, no-c-format +msgid "Label name '%s' at %C is ambiguous" +msgstr "памер \"%s\" - %d байт" -#: config/stormy16/stormy16.c:2006 -#, c-format -msgid "xstormy16_print_operand: unknown code" +#: fortran/match.c:269 +#, fuzzy, no-c-format +msgid "Duplicate construct label '%s' at %C" +msgstr "паўтарэнне \"%s\"" + +#: fortran/match.c:393 +#, no-c-format +msgid "Name at %C is too long" msgstr "" -#: config/v850/v850.c:339 -msgid "const_double_split got a bad insn:" +#: fortran/match.c:510 +#, no-c-format +msgid "Loop variable at %C cannot be a sub-component" msgstr "" -#: config/v850/v850.c:904 -msgid "output_move_single:" +#: fortran/match.c:516 +#, no-c-format +msgid "Loop variable '%s' at %C cannot be INTENT(IN)" msgstr "" -#. 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. -#: config/v850/v850.h:174 -msgid "Support Green Hills ABI" +#: fortran/match.c:523 +#, no-c-format +msgid "Loop variable at %C cannot have the POINTER attribute" msgstr "" -#: config/v850/v850.h:177 -msgid "Prohibit PC relative function calls" +#: fortran/match.c:553 +#, no-c-format +msgid "Expected a step value in iterator at %C" msgstr "" -#: config/v850/v850.h:180 -msgid "Reuse r30 on a per function basis" +#: fortran/match.c:565 +#, no-c-format +msgid "Syntax error in iterator at %C" msgstr "" -#: config/v850/v850.h:183 -msgid "Use stubs for function prologues" +#: fortran/match.c:801 +#, no-c-format +msgid "Invalid form of PROGRAM statement at %C" msgstr "" -#: config/v850/v850.h:186 -msgid "Same as: -mep -mprolog-function" +#: fortran/match.c:835 +#, no-c-format +msgid "Cannot assign to a PARAMETER variable at %C" msgstr "" -#: config/v850/v850.h:187 -msgid "Enable backend debugging" +#: fortran/match.c:924 fortran/match.c:1000 +#, no-c-format +msgid "Obsolete: arithmetic IF statement at %C" msgstr "" -#: config/v850/v850.h:189 -msgid "Compile for the v850 processor" +#: fortran/match.c:971 +#, no-c-format +msgid "Syntax error in IF-expression at %C" msgstr "" -#: config/v850/v850.h:191 -#, fuzzy -msgid "Compile for v850e1 processor" -msgstr "Аптымізацыя для F930 працэсараў" +#: fortran/match.c:983 +#, no-c-format +msgid "Block label not appropriate for arithmetic IF statement at %C" +msgstr "" -#. Make sure that the other bits are cleared. -#: config/v850/v850.h:193 -#, fuzzy -msgid "Compile for v850e processor" -msgstr "Аптымізацыя для F930 працэсараў" +#: fortran/match.c:1025 +#, no-c-format +msgid "Block label is not appropriate IF statement at %C" +msgstr "" -#. Make sure that the other bits are cleared. -#: config/v850/v850.h:195 -#, fuzzy -msgid "Enable the use of the short load instructions" -msgstr "Не генерыраваць сімвальныя інструкцыі" +#: fortran/match.c:1096 +#, no-c-format +msgid "Unclassifiable statement in IF-clause at %C" +msgstr "" -#: config/v850/v850.h:198 -#, fuzzy -msgid "Do not use the callt instruction" -msgstr "Не генерыраваць сімвальныя інструкцыі" +#: fortran/match.c:1103 +#, no-c-format +msgid "Syntax error in IF-clause at %C" +msgstr "" -#: config/v850/v850.h:205 -#, fuzzy -msgid "Do not use registers r2 and r5" -msgstr "Не выкарыстоўваць рэгістра sb" +#: fortran/match.c:1147 +#, no-c-format +msgid "Unexpected junk after ELSE statement at %C" +msgstr "" -#: config/v850/v850.h:207 -msgid "Enforce strict alignment" +#: fortran/match.c:1153 fortran/match.c:1188 +#, no-c-format +msgid "Label '%s' at %C doesn't match IF label '%s'" msgstr "" -#: config/v850/v850.h:210 -msgid "Use 4 byte entries in switch tables" +#: fortran/match.c:1182 +#, no-c-format +msgid "Unexpected junk after ELSE IF statement at %C" msgstr "" -#: config/v850/v850.h:236 -msgid "Set the max size of data eligible for the TDA area" +#: fortran/match.c:1345 +#, no-c-format +msgid "Name '%s' in %s statement at %C is not a loop name" msgstr "" -#: config/v850/v850.h:239 -msgid "Set the max size of data eligible for the SDA area" +#: fortran/match.c:1360 +#, no-c-format +msgid "%s statement at %C is not within a loop" msgstr "" -#: config/v850/v850.h:242 -msgid "Set the max size of data eligible for the ZDA area" +#: fortran/match.c:1363 +#, no-c-format +msgid "%s statement at %C is not within loop '%s'" msgstr "" -#: config/xtensa/xtensa.c:1014 config/xtensa/xtensa.c:1046 -#: config/xtensa/xtensa.c:1055 -msgid "bad test" +#: fortran/match.c:1419 +#, no-c-format +msgid "STOP code out of range at %C" msgstr "" -#: config/xtensa/xtensa.c:1895 -#, fuzzy, c-format -msgid "invalid %%D value" -msgstr "дрэннае %%Q значэнне" +#: fortran/match.c:1472 +#, no-c-format +msgid "Obsolete: PAUSE statement at %C" +msgstr "" -#: config/xtensa/xtensa.c:1932 -msgid "invalid mask" -msgstr "нерэчаісная маска" +#: fortran/match.c:1521 +#, no-c-format +msgid "Obsolete: ASSIGN statement at %C" +msgstr "" -#: config/xtensa/xtensa.c:1958 -#, fuzzy, c-format -msgid "invalid %%x value" -msgstr "нерэчаіснае значэньне %%x/X" +#: fortran/match.c:1567 +#, no-c-format +msgid "Obsolete: Assigned GOTO statement at %C" +msgstr "" -#: config/xtensa/xtensa.c:1965 -#, fuzzy, c-format -msgid "invalid %%d value" -msgstr "дрэннае %%Q значэнне" +#: fortran/match.c:1614 fortran/match.c:1666 +#, no-c-format +msgid "Statement label list in GOTO at %C cannot be empty" +msgstr "" -#: config/xtensa/xtensa.c:1986 config/xtensa/xtensa.c:1996 -#, fuzzy, c-format -msgid "invalid %%t/%%b value" -msgstr "дрэннае %%Q значэнне" +#: fortran/match.c:1750 +#, no-c-format +msgid "Bad allocate-object in ALLOCATE statement at %C for a PURE procedure" +msgstr "" -#: config/xtensa/xtensa.c:2038 -msgid "invalid address" -msgstr "нерэчаісны адрас" +#: fortran/match.c:1770 +#, no-c-format +msgid "STAT variable '%s' of ALLOCATE statement at %C cannot be INTENT(IN)" +msgstr "" -#: config/xtensa/xtensa.c:2063 -#, fuzzy -msgid "no register in address" -msgstr "невядомая назва рэгістра: %s" +#: fortran/match.c:1778 +#, no-c-format +msgid "Illegal STAT variable in ALLOCATE statement at %C for a PURE procedure" +msgstr "" -#: config/xtensa/xtensa.c:2071 -msgid "address offset not a constant" +#: fortran/match.c:1785 fortran/match.c:1951 +#, no-c-format +msgid "STAT expression at %C must be a variable" msgstr "" -#: config/xtensa/xtensa.h:79 -msgid "Use CONST16 instruction to load constants" +#: fortran/match.c:1840 +#, no-c-format +msgid "Illegal variable in NULLIFY at %C for a PURE procedure" msgstr "" -#: config/xtensa/xtensa.h:81 -msgid "Use PC-relative L32R instruction to load constants" +#: fortran/match.c:1918 +#, no-c-format +msgid "Illegal deallocate-expression in DEALLOCATE at %C for a PURE procedure" msgstr "" -#: config/xtensa/xtensa.h:83 -msgid "Disable fused multiply/add and multiply/subtract FP instructions" +#: fortran/match.c:1937 +#, no-c-format +msgid "STAT variable '%s' of DEALLOCATE statement at %C cannot be INTENT(IN)" msgstr "" -#: config/xtensa/xtensa.h:85 -msgid "Enable fused multiply/add and multiply/subtract FP instructions" +#: fortran/match.c:1944 +#, no-c-format +msgid "Illegal STAT variable in DEALLOCATE statement at %C for a PURE procedure" msgstr "" -#: config/xtensa/xtensa.h:87 -msgid "Intersperse literal pools with code in the text section" +#: fortran/match.c:1993 +#, no-c-format +msgid "Alternate RETURN statement at %C is only allowed within a SUBROUTINE" msgstr "" -#: config/xtensa/xtensa.h:89 -msgid "Put literal pools in a separate literal section" +#: fortran/match.c:2024 +#, no-c-format +msgid "Extension: RETURN statement in main program at %C" msgstr "" -#: config/xtensa/xtensa.h:91 -msgid "Automatically align branch targets to reduce branch penalties" +#: fortran/match.c:2219 +#, no-c-format +msgid "Syntax error in common block name at %C" msgstr "" -#: config/xtensa/xtensa.h:93 -msgid "Do not automatically align branch targets" +#: fortran/match.c:2284 +#, no-c-format +msgid "Symbol '%s' at %C is already in a COMMON block" msgstr "" -#: config/xtensa/xtensa.h:95 -msgid "Use indirect CALLXn instructions for large programs" +#: fortran/match.c:2296 +#, no-c-format +msgid "Previously initialized symbol '%s' in blank COMMON block at %C" msgstr "" -#: config/xtensa/xtensa.h:97 -msgid "Use direct CALLn instructions for fast calls" +#: fortran/match.c:2299 +#, no-c-format +msgid "Previously initialized symbol '%s' in COMMON block '%s' at %C" msgstr "" -#: cp/call.c:2428 -msgid "candidates are:" +#: fortran/match.c:2311 +#, no-c-format +msgid "Derived type variable in COMMON at %C does not have the SEQUENCE attribute" msgstr "" -#: cp/call.c:6186 -msgid "candidate 1:" +#: fortran/match.c:2334 +#, no-c-format +msgid "Array specification for symbol '%s' in COMMON at %C must be explicit" msgstr "" -#: cp/call.c:6187 -msgid "candidate 2:" +#: fortran/match.c:2345 +#, no-c-format +msgid "Symbol '%s' in COMMON at %C cannot be a POINTER array" msgstr "" -#: cp/g++spec.c:238 java/jvspec.c:417 -#, fuzzy, c-format -msgid "argument to '%s' missing\n" -msgstr "аргумент для \"%s\" прапушчан" +#: fortran/match.c:2377 +#, no-c-format +msgid "Symbol '%s', in COMMON block '%s' at %C is being indirectly equivalenced to another COMMON block '%s'" +msgstr "" -#: fortran/gfortranspec.c:231 -#, c-format -msgid "overflowed output arg list for '%s'" +#: fortran/match.c:2487 +#, no-c-format +msgid "Namelist group name '%s' at %C already has a basic type of %s" msgstr "" -#: fortran/gfortranspec.c:375 -#, fuzzy, c-format -msgid "argument to '%s' missing" -msgstr "аргумент для \"%s\" прапушчан" +#: fortran/match.c:2627 +#, no-c-format +msgid "Derived type component %C is not a permitted EQUIVALENCE member" +msgstr "" -#: fortran/gfortranspec.c:379 -#, c-format -msgid "no input files; unwilling to write output files" +#: fortran/match.c:2636 +#, no-c-format +msgid "Array reference in EQUIVALENCE at %C cannot be an array section" msgstr "" -#. FIXME: i18n bug here. Order of prints should not be -#. fixed. -#: java/gjavah.c:910 -#, fuzzy, c-format -msgid "ignored method '" -msgstr "у метадзе \"%s\":" +#: fortran/match.c:2672 +#, no-c-format +msgid "Attempt to indirectly overlap COMMON blocks %s and %s by EQUIVALENCE at %C" +msgstr "" -#: java/gjavah.c:912 -#, c-format -msgid "' marked virtual\n" +#: fortran/match.c:2824 +#, fuzzy, no-c-format +msgid "Statement function at %L is recursive" +msgstr "метка \"%s\" вызначана, але не выкарыстоўваецца" + +#: fortran/match.c:2914 +#, no-c-format +msgid "Expected initialization expression in CASE at %C" msgstr "" -#: java/gjavah.c:2350 -#, c-format -msgid "Try '" +#: fortran/match.c:2941 +#, no-c-format +msgid "Expected case name of '%s' at %C" msgstr "" -#: java/gjavah.c:2350 -#, c-format -msgid " --help' for more information.\n" +#: fortran/match.c:2985 +#, no-c-format +msgid "Unexpected CASE statement at %C" msgstr "" -#: java/gjavah.c:2357 -#, c-format -msgid "Usage: " +#: fortran/match.c:3037 +#, no-c-format +msgid "Syntax error in CASE-specification at %C" msgstr "" -#: java/gjavah.c:2357 -#, c-format -msgid "" -" [OPTION]... CLASS...\n" -"\n" +#: fortran/match.c:3157 +#, no-c-format +msgid "ELSEWHERE statement at %C not enclosed in WHERE block" msgstr "" -#: java/gjavah.c:2358 -#, c-format -msgid "" -"Generate C or C++ header files from .class files\n" -"\n" +#: fortran/match.c:3188 +#, no-c-format +msgid "Label '%s' at %C doesn't match WHERE label '%s'" msgstr "" -#: java/gjavah.c:2359 -#, fuzzy, c-format -msgid " -stubs Generate an implementation stub file\n" -msgstr " -o <файл> Памясціць вывад у <файл>\n" +#: fortran/match.c:3283 +#, no-c-format +msgid "Syntax error in FORALL iterator at %C" +msgstr "" -#: java/gjavah.c:2360 +#: fortran/matchexp.c:29 #, c-format -msgid " -jni Generate a JNI header or stub\n" +msgid "Syntax error in expression at %C" msgstr "" -#: java/gjavah.c:2361 -#, fuzzy, c-format -msgid " -force Always overwrite output files\n" -msgstr " -o <файл> Памясціць вывад у <файл>\n" +#: fortran/matchexp.c:73 +#, no-c-format +msgid "Bad character '%c' in OPERATOR name at %C" +msgstr "" -#: java/gjavah.c:2362 -#, fuzzy, c-format -msgid " -old Unused compatibility option\n" -msgstr " --help Адлюстраваць гэту інфармацыю\n" +#: fortran/matchexp.c:81 +#, fuzzy, no-c-format +msgid "The name '%s' cannot be used as a defined operator at %C" +msgstr "\"%s\" звычайна функцыя" -#: java/gjavah.c:2363 -#, fuzzy, c-format -msgid " -trace Unused compatibility option\n" -msgstr " --help Адлюстраваць гэту інфармацыю\n" +#: fortran/matchexp.c:156 +#, no-c-format +msgid "Expected a right parenthesis in expression at %C" +msgstr "" -#: java/gjavah.c:2364 -#, c-format -msgid " -J OPTION Unused compatibility option\n" +#: fortran/matchexp.c:278 +#, no-c-format +msgid "Expected exponent in expression at %C" msgstr "" -#: java/gjavah.c:2366 -#, c-format -msgid " -add TEXT Insert TEXT into class body\n" +#: fortran/matchexp.c:314 fortran/matchexp.c:418 +#, no-c-format +msgid "Extension: Unary operator following arithmetic operator (use parentheses) at %C" msgstr "" -#: java/gjavah.c:2367 -#, c-format -msgid " -append TEXT Insert TEXT after class declaration\n" +#: fortran/misc.c:42 +#, no-c-format +msgid "Out of memory-- malloc() failed" msgstr "" -#: java/gjavah.c:2368 -#, c-format -msgid " -friend TEXT Insert TEXT as 'friend' declaration\n" +#: fortran/module.c:529 +#, no-c-format +msgid "Missing generic specification in USE statement at %C" msgstr "" -#: java/gjavah.c:2369 -#, c-format -msgid " -prepend TEXT Insert TEXT before start of class\n" +#: fortran/module.c:837 +#, no-c-format +msgid "Reading module %s at line %d column %d: %s" msgstr "" -#: java/gjavah.c:2371 java/jcf-dump.c:897 -#, c-format -msgid " --classpath PATH Set path to find .class files\n" +#: fortran/module.c:841 +#, no-c-format +msgid "Writing module %s at line %d column %d: %s" msgstr "" -#: java/gjavah.c:2372 java/jcf-dump.c:898 -#, c-format -msgid " -IDIR Append directory to class path\n" +#: fortran/module.c:845 +#, no-c-format +msgid "Module %s at line %d column %d: %s" msgstr "" -#: java/gjavah.c:2373 java/jcf-dump.c:899 -#, c-format -msgid " --bootclasspath PATH Override built-in class path\n" +#: fortran/module.c:887 +msgid "Unexpected EOF" msgstr "" -#: java/gjavah.c:2374 java/jcf-dump.c:900 -#, c-format -msgid " --extdirs PATH Set extensions directory path\n" +#: fortran/module.c:919 +msgid "Unexpected end of module in string constant" msgstr "" -#: java/gjavah.c:2375 -#, c-format -msgid " -d DIRECTORY Set output directory name\n" +#: fortran/module.c:973 +msgid "Integer overflow" msgstr "" -#: java/gjavah.c:2376 java/jcf-dump.c:901 java/jv-scan.c:114 -#, fuzzy, c-format -msgid " -o FILE Set output file name\n" -msgstr " -o <файл> Памясціць вывад у <файл>\n" +#: fortran/module.c:1004 +msgid "Name too long" +msgstr "" -#: java/gjavah.c:2377 -#, c-format -msgid " -td DIRECTORY Set temporary directory name\n" +#: fortran/module.c:1111 +msgid "Bad name" msgstr "" -#: java/gjavah.c:2379 java/jcf-dump.c:903 java/jv-scan.c:116 -#, fuzzy, c-format -msgid " --help Print this help, then exit\n" -msgstr " --help Адлюстраваць гэту інфармацыю\n" +#: fortran/module.c:1155 +msgid "Expected name" +msgstr "" -#: java/gjavah.c:2380 java/jcf-dump.c:904 java/jv-scan.c:117 -#, fuzzy, c-format -msgid " --version Print version number, then exit\n" -msgstr " -dumpversion Адлюстраваць версію кампілятара\n" +#: fortran/module.c:1158 +msgid "Expected left parenthesis" +msgstr "" -#: java/gjavah.c:2381 java/jcf-dump.c:905 -#, fuzzy, c-format -msgid " -v, --verbose Print extra information while running\n" -msgstr " -dumpversion Адлюстраваць версію кампілятара\n" +#: fortran/module.c:1161 +msgid "Expected right parenthesis" +msgstr "" -#: java/gjavah.c:2383 -#, c-format -msgid "" -" -M Print all dependencies to stdout;\n" -" suppress ordinary output\n" +#: fortran/module.c:1164 +msgid "Expected integer" msgstr "" -#: java/gjavah.c:2385 -#, c-format -msgid "" -" -MM Print non-system dependencies to stdout;\n" -" suppress ordinary output\n" +#: fortran/module.c:1167 +msgid "Expected string" msgstr "" -#: java/gjavah.c:2387 -#, fuzzy, c-format -msgid " -MD Print all dependencies to stdout\n" -msgstr " --help Адлюстраваць гэту інфармацыю\n" +#: fortran/module.c:1191 +msgid "find_enum(): Enum not found" +msgstr "" -#: java/gjavah.c:2388 -#, fuzzy, c-format -msgid " -MMD Print non-system dependencies to stdout\n" -msgstr " --help Адлюстраваць гэту інфармацыю\n" - -#: java/gjavah.c:2391 java/jcf-dump.c:907 java/jv-scan.c:119 -#, fuzzy, c-format -msgid "" -"For bug reporting instructions, please see:\n" -"%s.\n" -msgstr "" -"\n" -"Інструкцыі для паведамленняў аб памылках глядзіце тут:\n" - -#: java/gjavah.c:2568 -#, fuzzy, c-format -msgid "Processing %s\n" -msgstr "версія gcc %s\n" +#: fortran/module.c:1206 +#, fuzzy, no-c-format +msgid "Error writing modules file: %s" +msgstr "памылка запісу ў %s" -#: java/gjavah.c:2578 -#, c-format -msgid "Found in %s\n" +#: fortran/module.c:1565 +msgid "Expected attribute bit name" msgstr "" -#: java/jcf-dump.c:814 -#, c-format -msgid "Not a valid Java .class file.\n" +#: fortran/module.c:2322 +msgid "Expected integer string" msgstr "" -#: java/jcf-dump.c:820 -#, c-format -msgid "error while parsing constant pool\n" +#: fortran/module.c:2326 +msgid "Error converting integer" msgstr "" -#: java/jcf-dump.c:826 java/jcf-parse.c:749 -#, gcc-internal-format -msgid "error in constant pool entry #%d\n" +#: fortran/module.c:2349 +msgid "Expected real string" msgstr "" -#: java/jcf-dump.c:836 -#, c-format -msgid "error while parsing fields\n" +#: fortran/module.c:2495 +msgid "Expected expression type" msgstr "" -#: java/jcf-dump.c:842 -#, fuzzy, c-format -msgid "error while parsing methods\n" -msgstr "памылка запісу ў %s" +#: fortran/module.c:2540 +#, fuzzy +msgid "Bad operator" +msgstr "невыкарыстаемы параметр \"%s\"" -#: java/jcf-dump.c:848 -#, c-format -msgid "error while parsing final attributes\n" +#: fortran/module.c:2626 +msgid "Bad type in constant expression" msgstr "" -#: java/jcf-dump.c:885 -#, c-format -msgid "Try 'jcf-dump --help' for more information.\n" +#: fortran/module.c:2663 +#, no-c-format +msgid "Namelist %s cannot be renamed by USE association to %s." msgstr "" -#: java/jcf-dump.c:892 -#, c-format -msgid "" -"Usage: jcf-dump [OPTION]... CLASS...\n" -"\n" +#: fortran/module.c:3331 +#, no-c-format +msgid "Symbol '%s' referenced at %L not found in module '%s'" msgstr "" -#: java/jcf-dump.c:893 -#, c-format -msgid "" -"Display contents of a class file in readable form.\n" -"\n" +#: fortran/module.c:3339 +#, no-c-format +msgid "User operator '%s' referenced at %L not found in module '%s'" msgstr "" -#: java/jcf-dump.c:894 -#, fuzzy, c-format -msgid " -c Disassemble method bodies\n" -msgstr " --help Адлюстраваць гэту інфармацыю\n" +#: fortran/module.c:3345 +#, no-c-format +msgid "Intrinsic operator '%s' referenced at %L not found in module '%s'" +msgstr "" -#: java/jcf-dump.c:895 -#, fuzzy, c-format -msgid " --javap Generate output in 'javap' format\n" -msgstr " --help Адлюстраваць гэту інфармацыю\n" +#: fortran/module.c:3700 +#, fuzzy, no-c-format +msgid "Can't open module file '%s' for writing at %C: %s" +msgstr "%s: немагчыма адчыніць файл `%s' для чытаньня: %s\n" -#: java/jcf-dump.c:935 java/jcf-dump.c:1003 -#, c-format -msgid "jcf-dump: no classes specified\n" -msgstr "" +#: fortran/module.c:3725 +#, fuzzy, no-c-format +msgid "Error writing module file '%s' for writing: %s" +msgstr "%s: немагчыма адчыніць файл `%s' для чытаньня: %s\n" -#: java/jcf-dump.c:1023 -#, fuzzy, c-format -msgid "Cannot open '%s' for output.\n" -msgstr "немагчыма адчыніць %s для запісу" +#: fortran/module.c:3746 +#, fuzzy, no-c-format +msgid "Can't open module file '%s' for reading at %C: %s" +msgstr "%s: немагчыма адчыніць файл `%s' для чытаньня: %s\n" -#: java/jcf-dump.c:1069 -#, c-format -msgid "bad format of .zip/.jar archive\n" +#: fortran/module.c:3760 +msgid "Unexpected end of module" msgstr "" -#: java/jcf-dump.c:1187 -#, c-format -msgid "Bad byte codes.\n" +#: fortran/module.c:3768 +#, no-c-format +msgid "Can't USE the same module we're building!" msgstr "" -#: java/jv-scan.c:99 -#, c-format -msgid "Try 'jv-scan --help' for more information.\n" +#: fortran/options.c:212 +#, no-c-format +msgid "Reading file '%s' as free form." msgstr "" -#: java/jv-scan.c:106 -#, c-format -msgid "" -"Usage: jv-scan [OPTION]... FILE...\n" -"\n" +#: fortran/options.c:222 +#, no-c-format +msgid "'-fd-lines-as-comments' has no effect in free form." msgstr "" -#: java/jv-scan.c:107 -#, c-format -msgid "" -"Print useful information read from Java source files.\n" -"\n" +#: fortran/options.c:225 +#, no-c-format +msgid "'-fd-lines-as-code' has no effect in free form." msgstr "" -#: java/jv-scan.c:108 +#: fortran/options.c:290 #, c-format -msgid " --no-assert Don't recognize the assert keyword\n" +msgid "gfortran: Only one -M option allowed\n" msgstr "" -#: java/jv-scan.c:109 +#: fortran/options.c:296 #, c-format -msgid " --complexity Print cyclomatic complexity of input file\n" +msgid "gfortran: Directory required after -M\n" msgstr "" -#: java/jv-scan.c:110 -#, c-format -msgid " --encoding NAME Specify encoding of input file\n" +#: fortran/options.c:336 +#, no-c-format +msgid "Argument to -ffpe-trap is not valid: %s" msgstr "" -#: java/jv-scan.c:111 -#, c-format -msgid " --print-main Print name of class containing 'main'\n" +#: fortran/options.c:468 +#, no-c-format +msgid "Fixed line length must be at least seven." msgstr "" -#: java/jv-scan.c:112 -#, c-format -msgid " --list-class List all classes defined in file\n" +#: fortran/options.c:474 +#, no-c-format +msgid "Maximum supported idenitifier length is %d" msgstr "" -#: java/jv-scan.c:113 -#, c-format -msgid " --list-filename Print input filename when listing class names\n" +#: fortran/options.c:481 +#, no-c-format +msgid "Argument to -fqkind isn't a valid real kind" msgstr "" -#: java/jv-scan.c:256 -#, fuzzy, c-format -msgid "%s: error: " -msgstr "граматычная памылка" +#: fortran/parse.c:294 +#, no-c-format +msgid "Unclassifiable statement at %C" +msgstr "" -#: java/jv-scan.c:268 -#, c-format -msgid "%s: warning: " -msgstr "%s: увага: " +#. Skip the bad statement label. +#: fortran/parse.c:329 +#, no-c-format +msgid "Ignoring bad statement label at %C" +msgstr "" -#: java/jvgenmain.c:48 -#, c-format -msgid "Usage: %s [OPTIONS]... CLASSNAMEmain [OUTFILE]\n" +#: fortran/parse.c:340 +#, no-c-format +msgid "Ignoring statement label of zero at %C" msgstr "" -#: java/jvgenmain.c:101 -#, fuzzy, c-format -msgid "%s: Cannot open output file: %s\n" -msgstr "немагчыма адчыніць файл уводу `%s'" +#: fortran/parse.c:350 +#, no-c-format +msgid "Ignoring statement label in empty statement at %C" +msgstr "" -#: java/jvgenmain.c:138 -#, fuzzy, c-format -msgid "%s: Failed to close output file %s\n" -msgstr "немагчыма зачыніць уваходзячы файл %s" +#: fortran/parse.c:412 +#, fuzzy, no-c-format +msgid "Non-numeric character in statement label at %C" +msgstr "пустая сімвальная канстанта" -#: java/jvspec.c:420 -#, c-format -msgid "can't specify '-D' without '--main'\n" +#: fortran/parse.c:420 +#, no-c-format +msgid "Zero is not a valid statement label at %C" msgstr "" -#: java/jvspec.c:423 -#, fuzzy, c-format -msgid "'%s' is not a valid class name" -msgstr "\"%s\" - гэта не пачатак дэкларацыі" - -#: java/jvspec.c:429 -#, c-format -msgid "--resource requires -o" +#: fortran/parse.c:439 +#, no-c-format +msgid "Bad continuation line at %C" msgstr "" -#: java/jvspec.c:443 -#, c-format -msgid "cannot specify both -C and -o" +#: fortran/parse.c:466 +#, no-c-format +msgid "Statement label in blank line will be ignored at %C" msgstr "" -#: java/jvspec.c:455 -#, c-format -msgid "cannot create temporary file" -msgstr "немагчыма стварыць часовы файл" +#: fortran/parse.c:491 +#, no-c-format +msgid "Line truncated at %C" +msgstr "" -#: java/jvspec.c:483 -#, c-format -msgid "using both @FILE with multiple files not implemented" +#: fortran/parse.c:664 +#, no-c-format +msgid "FORMAT statement at %L does not have a statement label" msgstr "" -#: java/jvspec.c:534 -#, c-format -msgid "cannot specify 'main' class when not linking" +#: fortran/parse.c:736 +msgid "arithmetic IF" msgstr "" -#: options.c:881 +#: fortran/parse.c:742 #, fuzzy -msgid "Display this information" -msgstr " --help Адлюстраваць гэту інфармацыю\n" +msgid "attribute declaration" +msgstr "Нерэчаіснае абвяшчэнне" + +#: fortran/parse.c:772 +#, fuzzy +msgid "data declaration" +msgstr "пустое абвяшчэньне" -#: options.c:887 -msgid "--param =\tSet parameter to value. See below for a complete list of parameters" +#: fortran/parse.c:781 +#, fuzzy +msgid "derived type declaration" +msgstr "пустое абвяшчэньне" + +#: fortran/parse.c:860 +msgid "block IF" msgstr "" -#: options.c:896 -msgid "-A=\tAssert the to . Putting '-' before disables the to " +#: fortran/parse.c:869 +msgid "implied END DO" msgstr "" -#: options.c:899 -#, fuzzy -msgid "Do not discard comments" -msgstr "незавершаныя каментарыі" +#: fortran/parse.c:936 +msgid "assignment" +msgstr "" -#: options.c:902 -msgid "Do not discard comments in macro expansions" +#: fortran/parse.c:939 +msgid "pointer assignment" msgstr "" -#: options.c:905 -msgid "-D[=]\tDefine a with as its value. If just is given, is taken to be 1" +#: fortran/parse.c:948 +msgid "simple IF" msgstr "" -#: options.c:911 -msgid "-F \tAdd to the end of the main framework include path" +#: fortran/parse.c:1085 +#, no-c-format +msgid "Unexpected %s statement at %C" msgstr "" -#: options.c:914 -msgid "-G\tPut global and static data smaller than bytes into a special section (on some targets)" +#: fortran/parse.c:1217 +#, no-c-format +msgid "%s statement at %C cannot follow %s statement at %L" msgstr "" -#: options.c:917 -msgid "Print the name of header files as they are used" +#: fortran/parse.c:1234 +#, no-c-format +msgid "Unexpected end of file in '%s'" msgstr "" -#: options.c:920 -msgid "-I \tAdd to the end of the main include path" +#: fortran/parse.c:1287 +#, no-c-format +msgid "Derived type definition at %C has no components" msgstr "" -#: options.c:923 -msgid "Generate make dependencies" +#: fortran/parse.c:1298 +#, no-c-format +msgid "PRIVATE statement in TYPE at %C must be inside a MODULE" msgstr "" -#: options.c:926 -msgid "Generate make dependencies and compile" +#: fortran/parse.c:1305 +#, no-c-format +msgid "PRIVATE statement at %C must precede structure components" msgstr "" -#: options.c:929 -msgid "-MF \tWrite dependency output to the given file" +#: fortran/parse.c:1313 +#, no-c-format +msgid "Duplicate PRIVATE statement at %C" msgstr "" -#: options.c:932 -msgid "Treat missing header files as generated files" +#: fortran/parse.c:1325 +#, no-c-format +msgid "SEQUENCE statement at %C must precede structure components" msgstr "" -#: options.c:935 -msgid "Like -M but ignore system header files" +#: fortran/parse.c:1332 +#, no-c-format +msgid "SEQUENCE attribute at %C already specified in TYPE statement" msgstr "" -#: options.c:938 -msgid "Like -MD but ignore system header files" +#: fortran/parse.c:1337 +#, no-c-format +msgid "Duplicate SEQUENCE statement at %C" msgstr "" -#: options.c:941 -#, fuzzy -msgid "Generate phony targets for all headers" -msgstr "Генерыраваць код для Intel as" +#: fortran/parse.c:1361 +#, no-c-format +msgid "Component %s of SEQUENCE type declared at %C does not have the SEQUENCE attribute" +msgstr "" -#: options.c:944 -msgid "-MQ \tAdd a MAKE-quoted target" +#: fortran/parse.c:1406 +#, no-c-format +msgid "ENUM declaration at %C has no ENUMERATORS" msgstr "" -#: options.c:947 -msgid "-MT \tAdd an unquoted target" +#: fortran/parse.c:1480 +#, no-c-format +msgid "Unexpected %s statement in INTERFACE block at %C" msgstr "" -#: options.c:950 -msgid "-O\tSet optimization level to " +#: fortran/parse.c:1507 +#, no-c-format +msgid "SUBROUTINE at %C does not belong in a generic function interface" msgstr "" -#: options.c:953 -#, fuzzy -msgid "Optimize for space rather than speed" -msgstr "Аптымізацыя для SparcLite працэсараў" +#: fortran/parse.c:1512 +#, no-c-format +msgid "FUNCTION at %C does not belong in a generic subroutine interface" +msgstr "" -#: options.c:956 -#, fuzzy -msgid "Do not generate #line directives" -msgstr "Не генерыраваць сімвальныя інструкцыі" +#: fortran/parse.c:1529 +#, no-c-format +msgid "Unexpected %s statement at %C in INTERFACE body" +msgstr "" -#: options.c:959 -msgid "-U\tUndefine " +#: fortran/parse.c:1601 +#, no-c-format +msgid "%s statement must appear in a MODULE" msgstr "" -#: options.c:962 -msgid "This switch is deprecated; use -Wextra instead" +#: fortran/parse.c:1608 +#, no-c-format +msgid "%s statement at %C follows another accessibility specification" msgstr "" -#: options.c:965 -msgid "Warn about things that will change when compiling with an ABI-compliant compiler" +#: fortran/parse.c:1685 +#, no-c-format +msgid "ELSEWHERE statement at %C follows previous unmasked ELSEWHERE" msgstr "" -#: options.c:968 -msgid "Warn about returning structures, unions or arrays" +#: fortran/parse.c:1706 +#, no-c-format +msgid "Unexpected %s statement in WHERE block at %C" msgstr "" -#: options.c:971 -msgid "Enable most warning messages" +#: fortran/parse.c:1766 +#, no-c-format +msgid "Unexpected %s statement in FORALL block at %C" msgstr "" -#: options.c:974 -msgid "Warn about casting functions to incompatible types" +#: fortran/parse.c:1818 +#, no-c-format +msgid "ELSE IF statement at %C cannot follow ELSE statement at %L" msgstr "" -#: options.c:977 -msgid "Warn about pointer casts which increase alignment" +#: fortran/parse.c:1836 +#, no-c-format +msgid "Duplicate ELSE statements at %L and %C" msgstr "" -#: options.c:980 -msgid "Warn about casts which discard qualifiers" +#: fortran/parse.c:1898 +#, no-c-format +msgid "Expected a CASE or END SELECT statement following SELECT CASE at %C" msgstr "" -#: options.c:983 -msgid "Warn about subscripts whose type is \"char\"" +#: fortran/parse.c:1956 +#, no-c-format +msgid "Variable '%s' at %C cannot be redefined inside loop beginning at %L" msgstr "" -#: options.c:986 -msgid "Warn about possibly nested block comments, and C++ comments spanning more than one physical line" +#: fortran/parse.c:1991 +#, no-c-format +msgid "End of nonblock DO statement at %C is within another block" msgstr "" -#: options.c:989 -msgid "Synonym for -Wcomment" +#: fortran/parse.c:2000 +#, no-c-format +msgid "End of nonblock DO statement at %C is interwoven with another DO loop" msgstr "" -#: options.c:992 -msgid "Warn about possibly confusing type conversions" +#: fortran/parse.c:2050 +#, no-c-format +msgid "Statement label in ENDDO at %C doesn't match DO label" msgstr "" -#: options.c:995 -msgid "Warn when all constructors and destructors are private" +#: fortran/parse.c:2107 +#, no-c-format +msgid "%s statement at %C cannot terminate a non-block DO loop" msgstr "" -#: options.c:998 -msgid "Warn when a declaration is found after a statement" +#: fortran/parse.c:2246 +#, no-c-format +msgid "Contained procedure '%s' at %C is already ambiguous" msgstr "" -#: options.c:1001 -msgid "Warn about deprecated compiler features" +#: fortran/parse.c:2297 +#, no-c-format +msgid "Unexpected %s statement in CONTAINS section at %C" msgstr "" -#: options.c:1004 -msgid "Warn about uses of __attribute__((deprecated)) declarations" +#: fortran/parse.c:2382 +#, no-c-format +msgid "CONTAINS statement at %C is already in a contained program unit" msgstr "" -#: options.c:1007 -msgid "Warn when an optimization pass is disabled" +#: fortran/parse.c:2431 +#, no-c-format +msgid "Global name '%s' at %L is already being used as a %s at %L" msgstr "" -#: options.c:1010 -msgid "Warn about compile-time integer division by zero" +#: fortran/parse.c:2452 +#, no-c-format +msgid "Blank BLOCK DATA at %C conflicts with prior BLOCK DATA at %L" msgstr "" -#: options.c:1013 -msgid "Warn about violations of Effective C++ style rules" +#: fortran/parse.c:2476 +#, no-c-format +msgid "Unexpected %s statement in BLOCK DATA at %C" msgstr "" -#: options.c:1016 -msgid "Warn about stray tokens after #elif and #endif" +#: fortran/parse.c:2518 +#, no-c-format +msgid "Unexpected %s statement in MODULE at %C" msgstr "" -#: options.c:1019 -msgid "Treat all warnings as errors" +#. If we see a duplicate main program, shut down. If the second +#. instance is an implied main program, ie data decls or executable +#. statements, we're in for lots of errors. +#: fortran/parse.c:2694 +#, no-c-format +msgid "Two main PROGRAMs at %L and %C" msgstr "" -#: options.c:1022 -#, fuzzy -msgid "Make implicit function declarations an error" -msgstr "секцыя \"%s\" канфліктуе з папярэдняй дэкларацыяй" +#: fortran/primary.c:89 +#, fuzzy, no-c-format +msgid "Missing kind-parameter at %C" +msgstr "нерэчаісны тып парамэтра `%T'" -#: options.c:1025 -msgid "Print extra (possibly unwanted) warnings" +#: fortran/primary.c:212 +#, no-c-format +msgid "Integer kind %d at %C not available" msgstr "" -#: options.c:1028 -msgid "Exit on the first error occurred" +#: fortran/primary.c:220 +#, no-c-format +msgid "Integer too big for its kind at %C" msgstr "" -#: options.c:1031 -msgid "Warn if testing floating point numbers for equality" +#: fortran/primary.c:250 +#, no-c-format +msgid "Extension: Hollerith constant at %C" msgstr "" -#: options.c:1034 -msgid "Warn about printf/scanf/strftime/strfmon format string anomalies" +#: fortran/primary.c:262 +#, no-c-format +msgid "Invalid Hollerith constant: %L must contain at least one character" msgstr "" -#: options.c:1037 -#, fuzzy -msgid "Warn if passing too many arguments to a function for its format string" -msgstr "вельмі шмат аргумэнтаў у функцыі `%s'" +#: fortran/primary.c:268 +#, no-c-format +msgid "Invalid Hollerith constant: Interger kind at %L should be default" +msgstr "" -#: options.c:1040 -msgid "Warn about format strings that are not literals" +#: fortran/primary.c:340 +#, no-c-format +msgid "Extension: Hexadecimal constant at %C uses non-standard syntax." msgstr "" -#: options.c:1043 -msgid "Warn about possible security problems with format functions" +#: fortran/primary.c:353 +#, no-c-format +msgid "Empty set of digits in binary constant at %C" msgstr "" -#: options.c:1046 -msgid "Warn about strftime formats yielding 2-digit years" +#: fortran/primary.c:356 +#, no-c-format +msgid "Empty set of digits in octal constant at %C" msgstr "" -#: options.c:1049 -msgid "Warn about zero-length formats" +#: fortran/primary.c:359 +#, no-c-format +msgid "Empty set of digits in hexadecimal constant at %C" msgstr "" -#: options.c:1058 -msgid "Warn about implicit function declarations" +#: fortran/primary.c:372 +#, fuzzy, no-c-format +msgid "Illegal character in binary constant at %C" +msgstr "пустая сімвальная канстанта" + +#: fortran/primary.c:375 +#, fuzzy, no-c-format +msgid "Illegal character in octal constant at %C" +msgstr "пустая сімвальная канстанта" + +#: fortran/primary.c:378 +#, fuzzy, no-c-format +msgid "Illegal character in hexadecimal constant at %C" +msgstr "пустая сімвальная канстанта" + +#: fortran/primary.c:407 +#, no-c-format +msgid "Integer too big for integer kind %i at %C" msgstr "" -#: options.c:1061 -msgid "Warn when a declaration does not specify a type" +#: fortran/primary.c:508 +#, no-c-format +msgid "Missing exponent in real number at %C" msgstr "" -#: options.c:1064 -msgid "Deprecated. This switch has no effect." +#: fortran/primary.c:565 +#, no-c-format +msgid "Real number at %C has a 'd' exponent and an explicit kind" msgstr "" -#: options.c:1067 -msgid "Warn about variables which are initialized to themselves." +#: fortran/primary.c:575 +#, no-c-format +msgid "Real number at %C has a 'q' exponent and an explicit kind" msgstr "" -#: options.c:1070 -msgid "Warn when an inlined function cannot be inlined" +#: fortran/primary.c:587 +#, no-c-format +msgid "Invalid real kind %d at %C" msgstr "" -#: options.c:1073 -msgid "Warn about invalid uses of the \"offsetof\" macro" +#: fortran/primary.c:601 +#, no-c-format +msgid "Real constant overflows its kind at %C" msgstr "" -#: options.c:1076 -msgid "Warn about PCH files that are found but not used" +#: fortran/primary.c:606 +#, no-c-format +msgid "Real constant underflows its kind at %C" msgstr "" -#: options.c:1079 -msgid "-Wlarger-than-\tWarn if an object is larger than bytes" +#: fortran/primary.c:698 +#, no-c-format +msgid "Syntax error in SUBSTRING specification at %C" msgstr "" -#: options.c:1082 -msgid "Do not warn about using \"long long\" when -pedantic" +#: fortran/primary.c:930 +#, no-c-format +msgid "Invalid kind %d for CHARACTER constant at %C" msgstr "" -#: options.c:1085 -#, fuzzy -msgid "Warn about suspicious declarations of \"main\"" -msgstr "няма папярэдняга аб'яўлення для \"%s\"" +#: fortran/primary.c:951 +#, fuzzy, no-c-format +msgid "Unterminated character constant beginning at %C" +msgstr "сімвальная канстанта вельмі доўгая" -#: options.c:1088 -msgid "Warn about possibly missing braces around initializers" +#: fortran/primary.c:1018 +#, no-c-format +msgid "Bad kind for logical constant at %C" msgstr "" -#: options.c:1091 -#, fuzzy -msgid "Warn about global functions without previous declarations" -msgstr "секцыя \"%s\" канфліктуе з папярэдняй дэкларацыяй" +#: fortran/primary.c:1053 +#, no-c-format +msgid "Expected PARAMETER symbol in complex constant at %C" +msgstr "" -#: options.c:1094 -msgid "Warn about missing fields in struct initializers" +#: fortran/primary.c:1059 +#, no-c-format +msgid "Numeric PARAMETER required in complex constant at %C" msgstr "" -#: options.c:1097 -msgid "Warn about functions which might be candidates for format attributes" +#: fortran/primary.c:1065 +#, no-c-format +msgid "Scalar PARAMETER required in complex constant at %C" msgstr "" -#: options.c:1100 -msgid "Warn about user-specified include directories that do not exist" +#: fortran/primary.c:1095 +#, no-c-format +msgid "Error converting PARAMETER constant in complex constant at %C" msgstr "" -#: options.c:1103 -msgid "Warn about functions which might be candidates for __attribute__((noreturn))" +#: fortran/primary.c:1222 +#, no-c-format +msgid "Syntax error in COMPLEX constant at %C" msgstr "" -#: options.c:1106 -msgid "Warn about global functions without prototypes" +#: fortran/primary.c:1404 +#, no-c-format +msgid "Keyword '%s' at %C has already appeared in the current argument list" msgstr "" -#: options.c:1109 -#, fuzzy -msgid "Warn about use of multi-character character constants" -msgstr "мнагасімвальная сімвальная канстанта" +#: fortran/primary.c:1461 +#, no-c-format +msgid "Expected alternate return label at %C" +msgstr "" -#: options.c:1112 -msgid "Warn about \"extern\" declarations not at file scope" +#: fortran/primary.c:1480 +#, no-c-format +msgid "Missing keyword name in actual argument list at %C" msgstr "" -#: options.c:1115 -msgid "Warn when non-templatized friend functions are declared within a template" +#: fortran/primary.c:1516 +#, no-c-format +msgid "Syntax error in argument list at %C" msgstr "" -#: options.c:1118 -msgid "Warn about non-virtual destructors" +#: fortran/primary.c:1603 +#, no-c-format +msgid "Expected structure component name at %C" msgstr "" -#: options.c:1121 -msgid "Warn about NULL being passed to argument slots marked as requiring non-NULL" +#: fortran/primary.c:1841 +#, no-c-format +msgid "Too many components in structure constructor at %C" msgstr "" -#: options.c:1124 -msgid "Warn if a C-style cast is used in a program" +#: fortran/primary.c:1856 +#, no-c-format +msgid "Too few components in structure constructor at %C" msgstr "" -#: options.c:1127 -msgid "Warn if an old-style parameter definition is used" +#: fortran/primary.c:1874 +#, no-c-format +msgid "Syntax error in structure constructor at %C" msgstr "" -#: options.c:1130 -msgid "Warn about overloaded virtual function names" +#: fortran/primary.c:1987 +#, no-c-format +msgid "Unexpected use of subroutine name '%s' at %C" msgstr "" -#: options.c:1133 -msgid "Warn when the packed attribute has no effect on struct layout" +#: fortran/primary.c:2018 +#, fuzzy, no-c-format +msgid "Statement function '%s' requires argument list at %C" +msgstr "метка \"%s\" вызначана, але не выкарыстоўваецца" + +#: fortran/primary.c:2021 +#, no-c-format +msgid "Function '%s' requires an argument list at %C" msgstr "" -#: options.c:1136 -msgid "Warn when padding is required to align structure members" +#: fortran/primary.c:2175 +#, fuzzy, no-c-format +msgid "Missing argument list in function '%s' at %C" +msgstr "аргумент для \"%s\" прапушчан" + +#: fortran/primary.c:2203 +#, no-c-format +msgid "Symbol at %C is not appropriate for an expression" msgstr "" -#: options.c:1139 -msgid "Warn about possibly missing parentheses" +#: fortran/primary.c:2273 +#, no-c-format +msgid "Expected VARIABLE at %C" msgstr "" -#: options.c:1142 -msgid "Warn when converting the type of pointers to member functions" +#: fortran/resolve.c:101 +#, no-c-format +msgid "Alternate return specifier in elemental subroutine '%s' at %L is not allowed" msgstr "" -#: options.c:1145 -msgid "Warn about function pointer arithmetic" +#: fortran/resolve.c:105 +#, no-c-format +msgid "Alternate return specifier in function '%s' at %L is not allowed" msgstr "" -#: options.c:1148 -msgid "Warn when a pointer differs in signedness in an assignment." +#: fortran/resolve.c:119 +#, no-c-format +msgid "Dummy procedure '%s' of PURE procedure at %L must also be PURE" msgstr "" -#: options.c:1151 -msgid "Warn if inherited methods are unimplemented" +#: fortran/resolve.c:127 +#, no-c-format +msgid "Dummy procedure at %L not allowed in ELEMENTAL procedure" msgstr "" -#: options.c:1154 -msgid "Warn about multiple declarations of the same object" +#: fortran/resolve.c:181 +#, no-c-format +msgid "Argument '%s' of pure function '%s' at %L must be INTENT(IN)" msgstr "" -#: options.c:1157 -msgid "Warn when the compiler reorders code" +#: fortran/resolve.c:189 +#, no-c-format +msgid "Argument '%s' of pure subroutine '%s' at %L must have its INTENT specified" msgstr "" -#: options.c:1160 -msgid "Warn whenever a function's return type defaults to \"int\" (C), or about inconsistent return types (C++)" +#: fortran/resolve.c:200 +#, no-c-format +msgid "Argument '%s' of elemental procedure at %L must be scalar" msgstr "" -#: options.c:1163 -msgid "Warn if a selector has multiple methods" +#: fortran/resolve.c:208 +#, no-c-format +msgid "Argument '%s' of elemental procedure at %L cannot have the POINTER attribute" msgstr "" -#: options.c:1166 -msgid "Warn about possible violations of sequence point rules" +#: fortran/resolve.c:220 +#, no-c-format +msgid "Argument '%s' of statement function at %L must be scalar" msgstr "" -#: options.c:1169 -msgid "Warn when one local variable shadows another" +#: fortran/resolve.c:231 +#, no-c-format +msgid "Character-valued argument '%s' of statement function at %L must has constant length" msgstr "" -#: options.c:1172 -msgid "Warn about signed-unsigned comparisons" +#: fortran/resolve.c:292 +#, no-c-format +msgid "Contained function '%s' at %L has no IMPLICIT type" msgstr "" -#: options.c:1175 -msgid "Warn when overload promotes from unsigned to signed" +#: fortran/resolve.c:437 +#, no-c-format +msgid "FUNCTION result %s can't be an array in FUNCTION %s at %L" msgstr "" -#: options.c:1178 options.c:1181 -msgid "Warn about code which might break strict aliasing rules" +#: fortran/resolve.c:441 +#, no-c-format +msgid "ENTRY result %s can't be an array in FUNCTION %s at %L" msgstr "" -#: options.c:1184 -msgid "Warn about uncasted NULL used as sentinel" +#: fortran/resolve.c:448 +#, no-c-format +msgid "FUNCTION result %s can't be a POINTER in FUNCTION %s at %L" msgstr "" -#: options.c:1187 -#, fuzzy -msgid "Warn about unprototyped function declarations" -msgstr "няма папярэдняга аб'яўлення для \"%s\"" - -#: options.c:1190 -msgid "Warn about enumerated switches, with no default, missing a case" +#: fortran/resolve.c:452 +#, no-c-format +msgid "ENTRY result %s can't be a POINTER in FUNCTION %s at %L" msgstr "" -#: options.c:1193 -msgid "Warn about enumerated switches missing a \"default:\" statement" +#: fortran/resolve.c:490 +#, no-c-format +msgid "FUNCTION result %s can't be of type %s in FUNCTION %s at %L" msgstr "" -#: options.c:1196 -msgid "Warn about all enumerated switches missing a specific case" +#: fortran/resolve.c:495 +#, no-c-format +msgid "ENTRY result %s can't be of type %s in FUNCTION %s at %L" msgstr "" -#: options.c:1199 -msgid "Warn when synthesis behavior differs from Cfront" +#: fortran/resolve.c:710 fortran/resolve.c:3347 fortran/resolve.c:3998 +#, no-c-format +msgid "Label %d referenced at %L is never defined" msgstr "" -#: options.c:1202 -msgid "Do not suppress warnings from system headers" -msgstr "" +#: fortran/resolve.c:737 +#, fuzzy, no-c-format +msgid "Statement function '%s' at %L is not allowed as an actual argument" +msgstr "метка \"%s\" вызначана, але не выкарыстоўваецца" -#: options.c:1205 -msgid "Warn about features not present in traditional C" +#: fortran/resolve.c:760 +#, fuzzy, no-c-format +msgid "Symbol '%s' at %L is ambiguous" +msgstr "памер \"%s\" - %d байт" + +#: fortran/resolve.c:859 +#, no-c-format +msgid "Generic function '%s' at %L is not an intrinsic function" msgstr "" -#: options.c:1208 -msgid "Warn if trigraphs are encountered that might affect the meaning of the program" +#: fortran/resolve.c:869 +#, no-c-format +msgid "Generic function '%s' at %L is not consistent with a specific intrinsic interface" msgstr "" -#: options.c:1211 -msgid "Warn about @selector()s without previously declared methods" +#: fortran/resolve.c:907 +#, no-c-format +msgid "Function '%s' at %L is INTRINSIC but is not compatible with an intrinsic" msgstr "" -#: options.c:1214 -msgid "Warn if an undefined macro is used in an #if directive" +#: fortran/resolve.c:953 +#, no-c-format +msgid "Unable to resolve the specific function '%s' at %L" msgstr "" -#: options.c:1217 -msgid "Warn about uninitialized automatic variables" +#: fortran/resolve.c:1009 fortran/resolve.c:5363 +#, no-c-format +msgid "Function '%s' at %L has no IMPLICIT type" msgstr "" -#: options.c:1220 -msgid "Warn about unrecognized pragmas" +#: fortran/resolve.c:1128 +#, no-c-format +msgid "Function reference to '%s' at %L is inside a FORALL block" msgstr "" -#: options.c:1223 -msgid "Warn about code that will never be executed" +#: fortran/resolve.c:1134 +#, no-c-format +msgid "Function reference to '%s' at %L is to a non-PURE procedure within a PURE procedure" msgstr "" -#: options.c:1226 -msgid "Enable all -Wunused- warnings" +#: fortran/resolve.c:1154 +#, no-c-format +msgid "Subroutine call to '%s' in FORALL block at %L is not PURE" msgstr "" -#: options.c:1229 -msgid "Warn when a function is unused" +#: fortran/resolve.c:1157 +#, no-c-format +msgid "Subroutine call to '%s' at %L is not PURE" msgstr "" -#: options.c:1232 -msgid "Warn when a label is unused" +#: fortran/resolve.c:1219 +#, no-c-format +msgid "Generic subroutine '%s' at %L is not an intrinsic subroutine" msgstr "" -#: options.c:1235 -msgid "Warn about macros defined in the main file that are not used" +#: fortran/resolve.c:1228 +#, no-c-format +msgid "Generic subroutine '%s' at %L is not consistent with an intrinsic subroutine interface" msgstr "" -#: options.c:1238 -msgid "Warn when a function parameter is unused" +#: fortran/resolve.c:1263 +#, no-c-format +msgid "Subroutine '%s' at %L is INTRINSIC but is not compatible with an intrinsic" msgstr "" -#: options.c:1241 -msgid "Warn when an expression value is unused" +#: fortran/resolve.c:1306 +#, no-c-format +msgid "Unable to resolve the specific subroutine '%s' at %L" msgstr "" -#: options.c:1244 -msgid "Warn when a variable is unused" +#: fortran/resolve.c:1406 +#, no-c-format +msgid "Shapes for operands at %L and %L are not conformable" msgstr "" -#: options.c:1247 -msgid "Do not warn about using variadic macros when -pedantic" +#: fortran/resolve.c:1462 +#, c-format +msgid "Operand of unary numeric operator '%s' at %%L is %s" msgstr "" -#: options.c:1250 -msgid "Give strings the type \"array of char\"" +#: fortran/resolve.c:1478 +#, c-format +msgid "Operands of binary numeric operator '%s' at %%L are %s/%s" msgstr "" -#: options.c:1253 -msgid "A synonym for -std=c89 (for C) or -std=c++98 (for C++)." +#: fortran/resolve.c:1492 +#, c-format +msgid "Operands of string concatenation operator at %%L are %s/%s" msgstr "" -#: options.c:1256 -msgid "-aux-info \tEmit declaration information into " +#: fortran/resolve.c:1511 +#, c-format +msgid "Operands of logical operator '%s' at %%L are %s/%s" msgstr "" -#: options.c:1268 -msgid "-d\tEnable dumps from specific passes of the compiler" +#: fortran/resolve.c:1525 +#, c-format +msgid "Operand of .NOT. operator at %%L is %s" msgstr "" -#: options.c:1271 -msgid "-dumpbase \tSet the file basename to be used for dumps" +#: fortran/resolve.c:1535 +msgid "COMPLEX quantities cannot be compared at %L" msgstr "" -#: options.c:1274 -msgid "Generate position-independent code if possible (large mode)" +#: fortran/resolve.c:1561 +#, c-format +msgid "Logicals at %%L must be compared with %s instead of %s" msgstr "" -#: options.c:1277 -msgid "Generate position-independent code for executables if possible (large mode)" +#: fortran/resolve.c:1566 +#, c-format +msgid "Operands of comparison operator '%s' at %%L are %s/%s" msgstr "" -#: options.c:1283 -msgid "Enforce class member access control semantics" +#: fortran/resolve.c:1574 +#, c-format +msgid "Operand of user operator '%s' at %%L is %s" msgstr "" -#: options.c:1286 -msgid "Align the start of functions" +#: fortran/resolve.c:1577 +#, c-format +msgid "Operands of user operator '%s' at %%L are %s/%s" msgstr "" -#: options.c:1292 -msgid "Align labels which are only reached by jumping" +#: fortran/resolve.c:1645 +#, no-c-format +msgid "Inconsistent ranks for operator at %L and %L" msgstr "" -#: options.c:1298 -msgid "Align all labels" +#: fortran/resolve.c:1767 +#, no-c-format +msgid "Illegal stride of zero at %L" msgstr "" -#: options.c:1304 -msgid "Align the start of loops" +#: fortran/resolve.c:1788 +#, no-c-format +msgid "Array reference at %L is out of bounds" msgstr "" -#: options.c:1313 -msgid "Change when template instances are emitted" +#: fortran/resolve.c:1809 +#, no-c-format +msgid "Rightmost upper bound of assumed size array section not specified at %L" msgstr "" -#: options.c:1316 -msgid "Specify that arguments may alias each other and globals" +#: fortran/resolve.c:1819 +#, no-c-format +msgid "Rank mismatch in array reference at %L (%d/%d)" msgstr "" -#: options.c:1319 -msgid "Assume arguments may alias globals but not each other" +#: fortran/resolve.c:1847 +#, no-c-format +msgid "Array index at %L must be scalar" msgstr "" -#: options.c:1322 -msgid "Assume arguments alias neither each other nor globals" +#: fortran/resolve.c:1853 +#, no-c-format +msgid "Array index at %L must be of INTEGER type" msgstr "" -#: options.c:1325 -msgid "Recognize the \"asm\" keyword" +#: fortran/resolve.c:1859 +#, no-c-format +msgid "Extension: REAL array index at %L" msgstr "" -#: options.c:1328 -msgid "Generate unwind tables that are exact at each instruction boundary" +#: fortran/resolve.c:1888 +#, fuzzy, no-c-format +msgid "Argument dim at %L must be scalar" +msgstr "першым аргументам \"%s\" павінен быць \"int\"" + +#: fortran/resolve.c:1894 +#, no-c-format +msgid "Argument dim at %L must be of INTEGER type" msgstr "" -#: options.c:1331 -#, fuzzy -msgid "Generate code to check bounds before indexing arrays" -msgstr "Генерыраваць код для Intel as" +#: fortran/resolve.c:1996 +#, fuzzy, no-c-format +msgid "Array index at %L is an array of rank %d" +msgstr "памер масіва \"%s\" вельмі вялікі" -#: options.c:1334 -msgid "Replace add, compare, branch with branch on count register" +#: fortran/resolve.c:2034 +#, no-c-format +msgid "Substring start index at %L must be of type INTEGER" msgstr "" -#: options.c:1337 -msgid "Use profiling information for branch probabilities" +#: fortran/resolve.c:2041 +#, no-c-format +msgid "Substring start index at %L must be scalar" msgstr "" -#: options.c:1340 -msgid "Perform branch target load optimization before prologue / epilogue threading" +#: fortran/resolve.c:2048 +#, no-c-format +msgid "Substring start index at %L is less than one" msgstr "" -#: options.c:1343 -msgid "Perform branch target load optimization after prologue / epilogue threading" +#: fortran/resolve.c:2061 +#, no-c-format +msgid "Substring end index at %L must be of type INTEGER" msgstr "" -#: options.c:1346 -msgid "Restrict target load migration not to re-use registers in any basic block" +#: fortran/resolve.c:2068 +#, no-c-format +msgid "Substring end index at %L must be scalar" msgstr "" -#: options.c:1349 -#, fuzzy -msgid "Recognize built-in functions" -msgstr "Не генерыраваць сімвальныя інструкцыі" +#: fortran/resolve.c:2076 +#, no-c-format +msgid "Substring end index at %L is out of bounds" +msgstr "" -#: options.c:1355 -msgid "-fcall-saved-\tMark as being preserved across functions" +#: fortran/resolve.c:2150 +#, no-c-format +msgid "Component to the right of a part reference with nonzero rank must not have the POINTER attribute at %L" msgstr "" -#: options.c:1358 -msgid "-fcall-used-\tMark as being corrupted by function calls" +#: fortran/resolve.c:2169 +#, no-c-format +msgid "Two or more part references with nonzero rank must not be specified at %L" msgstr "" -#: options.c:1361 -msgid "Save registers around function calls" +#: fortran/resolve.c:2395 +#, no-c-format +msgid "%s at %L must be a scalar" msgstr "" -#: options.c:1364 -msgid "Check the return value of new" +#: fortran/resolve.c:2403 +#, no-c-format +msgid "%s at %L must be INTEGER or REAL" msgstr "" -#: options.c:1367 -msgid "Do not put uninitialized globals in the common section" +#: fortran/resolve.c:2406 +#, no-c-format +msgid "%s at %L must be INTEGER" msgstr "" -#: options.c:1370 -msgid "Allow the arguments of the '?' operator to have different types" +#: fortran/resolve.c:2422 +#, no-c-format +msgid "Obsolete: REAL DO loop iterator at %L" msgstr "" -#: options.c:1373 -msgid "Reduce the size of object files" +#: fortran/resolve.c:2431 +#, no-c-format +msgid "Cannot assign to loop variable in PURE procedure at %L" msgstr "" -#: options.c:1376 -msgid "Make string literals \"const char[]\" not \"char[]\"" +#: fortran/resolve.c:2455 +#, no-c-format +msgid "Step expression in DO loop at %L cannot be zero" msgstr "" -#: options.c:1379 -msgid "-fconst-string-class=\tUse class for constant strings" +#: fortran/resolve.c:2488 +#, no-c-format +msgid "FORALL Iteration variable at %L must be INTEGER" msgstr "" -#: options.c:1382 -msgid "Perform a register copy-propagation optimization pass" +#: fortran/resolve.c:2493 +#, no-c-format +msgid "FORALL start expression at %L must be INTEGER" msgstr "" -#: options.c:1385 -msgid "Perform cross-jumping optimization" +#: fortran/resolve.c:2500 +#, no-c-format +msgid "FORALL end expression at %L must be INTEGER" msgstr "" -#: options.c:1388 -msgid "When running CSE, follow jumps to their targets" +#: fortran/resolve.c:2507 +#, no-c-format +msgid "FORALL Stride expression at %L must be INTEGER" msgstr "" -#: options.c:1391 -msgid "When running CSE, follow conditional jumps" +#: fortran/resolve.c:2604 +#, no-c-format +msgid "Expression in DEALLOCATE statement at %L must be ALLOCATABLE or a POINTER" msgstr "" -#: options.c:1394 -msgid "Omit range reduction step when performing complex division" +#: fortran/resolve.c:2704 +#, no-c-format +msgid "Expression in ALLOCATE statement at %L must be ALLOCATABLE or a POINTER" msgstr "" -#: options.c:1397 -msgid "Place data items into their own section" +#: fortran/resolve.c:2729 +#, no-c-format +msgid "Array specification required in ALLOCATE statement at %L" msgstr "" -#: options.c:1400 -#, fuzzy -msgid "Inline member functions by default" -msgstr "у функцыі \"%s\":" +#: fortran/resolve.c:2758 +#, no-c-format +msgid "Bad array specification in ALLOCATE statement at %L" +msgstr "" -#: options.c:1403 -msgid "Defer popping functions args from stack until later" +#. The cases overlap, or they are the same +#. element in the list. Either way, we must +#. issue an error and get the next case from P. +#. FIXME: Sort P and Q by line number. +#: fortran/resolve.c:2914 +#, no-c-format +msgid "CASE label at %L overlaps with CASE label at %L" msgstr "" -#: options.c:1406 -msgid "Attempt to fill delay slots of branch instructions" +#: fortran/resolve.c:2965 +#, no-c-format +msgid "Expression in CASE statement at %L must be of type %s" msgstr "" -#: options.c:1409 -msgid "Delete useless null pointer checks" +#: fortran/resolve.c:2976 +#, no-c-format +msgid "Expression in CASE statement at %L must be kind %d" msgstr "" -#: options.c:1412 -msgid "-fdiagnostics-show-location=[once|every-line]\tHow often to emit source location at the beginning of line-wrapped diagnostics" +#: fortran/resolve.c:2988 +#, no-c-format +msgid "Expression in CASE statement at %L must be scalar" msgstr "" -#: options.c:1415 -msgid "Permit '$' as an identifier character" +#: fortran/resolve.c:3034 +#, no-c-format +msgid "Selection expression in computed GOTO statement at %L must be a scalar integer expression" msgstr "" -#: options.c:1418 -msgid "-fdump-\tDump various compiler internals to a file" +#: fortran/resolve.c:3052 +#, no-c-format +msgid "Argument of SELECT statement at %L cannot be %s" msgstr "" -#: options.c:1421 -msgid "Suppress output of instruction numbers and line number notes in debugging dumps" +#: fortran/resolve.c:3061 +#, no-c-format +msgid "Argument of SELECT statement at %L must be a scalar expression" msgstr "" -#: options.c:1427 -msgid "Perform DWARF2 duplicate elimination" +#: fortran/resolve.c:3125 +#, no-c-format +msgid "The DEFAULT CASE at %L cannot be followed by a second DEFAULT CASE at %L" msgstr "" -#: options.c:1430 options.c:1433 -msgid "Perform unused type elimination in debug info" +#: fortran/resolve.c:3152 +#, no-c-format +msgid "Logical range in CASE statement at %L is not allowed" msgstr "" -#: options.c:1436 -#, fuzzy -msgid "Generate code to check exception specifications" -msgstr "\"%s\" не абвешчан (першае выкарыстанне ў гэтай функцыі)" +#: fortran/resolve.c:3163 +#, no-c-format +msgid "Range specification at %L can never be matched" +msgstr "" -#: options.c:1442 -msgid "Enable exception handling" -msgstr "Уключыць апрацоўку выключэньняў" +#: fortran/resolve.c:3266 +#, no-c-format +msgid "Logical SELECT CASE block at %L has more that two cases" +msgstr "" -#: options.c:1445 -msgid "-fexec-charset=\tConvert all strings and character constants to character set " +#: fortran/resolve.c:3304 +#, no-c-format +msgid "Data transfer element at %L cannot have POINTER components" msgstr "" -#: options.c:1448 -msgid "Perform a number of minor, expensive optimizations" +#: fortran/resolve.c:3311 +#, no-c-format +msgid "Data transfer element at %L cannot have PRIVATE components" msgstr "" -#: options.c:1457 -msgid "Assume no NaNs or infinities are generated" +#: fortran/resolve.c:3320 +#, no-c-format +msgid "Data transfer element at %L cannot be a full reference to an assumed-size array" msgstr "" -#: options.c:1460 -msgid "-ffixed-\tMark as being unavailable to the compiler" +#: fortran/resolve.c:3354 +#, no-c-format +msgid "Statement at %L is not a valid branch target statement for the branch statement at %L" msgstr "" -#: options.c:1469 -msgid "Don't allocate floats and doubles in extended-precision registers" +#: fortran/resolve.c:3363 +#, no-c-format +msgid "Branch at %L causes an infinite loop" msgstr "" -#: options.c:1472 -msgid "Scope of for-init-statement variables is local to the loop" +#. still nothing, so illegal. +#: fortran/resolve.c:3393 +#, no-c-format +msgid "Label at %L is not in the same block as the GOTO statement at %L" msgstr "" -#: options.c:1475 -msgid "Copy memory address constants into registers before use" +#: fortran/resolve.c:3409 +#, no-c-format +msgid "Obsolete: GOTO at %L jumps to END of construct at %L" msgstr "" -#: options.c:1478 -msgid "Copy memory operands into registers before use" +#: fortran/resolve.c:3483 +#, no-c-format +msgid "WHERE mask at %L has inconsistent shape" msgstr "" -#: options.c:1481 -msgid "Do not assume that standard C libraries and \"main\" exist" +#: fortran/resolve.c:3499 +#, no-c-format +msgid "WHERE assignment target at %L has inconsistent shape" msgstr "" -#: options.c:1484 -msgid "Allow function addresses to be held in registers" +#: fortran/resolve.c:3509 fortran/resolve.c:3708 +#, no-c-format +msgid "Unsupported statement inside WHERE at %L" msgstr "" -#: options.c:1487 -#, fuzzy -msgid "Place each function into its own section" -msgstr "адзін раз для кожнай функцыі, дзе ён з'яўляецца.)" +#: fortran/resolve.c:3585 +#, no-c-format +msgid "expresion reference type error at %L" +msgstr "" -#: options.c:1490 -msgid "Perform global common subexpression elimination" +#: fortran/resolve.c:3617 +#, no-c-format +msgid "Unsupported statement while finding forall index in expression" msgstr "" -#: options.c:1493 -msgid "Perform global common subexpression elimination after register allocation" +#: fortran/resolve.c:3664 +#, no-c-format +msgid "Assignment to a FORALL index variable at %L" msgstr "" -#: options.c:1496 -msgid "Perform redundant load after store elimination in global common subexpression" +#: fortran/resolve.c:3672 +#, no-c-format +msgid "The FORALL with index '%s' cause more than one assignment to this object at %L" msgstr "" -#: options.c:1499 -msgid "Perform enhanced load motion during global common subexpression elimination" +#: fortran/resolve.c:3799 +#, no-c-format +msgid "An outer FORALL construct already has an index with this name %L" msgstr "" -#: options.c:1502 -msgid "Perform store motion after global common subexpression elimination" +#: fortran/resolve.c:3811 fortran/resolve.c:3814 fortran/resolve.c:3817 +#, no-c-format +msgid "A FORALL index must not appear in a limit or stride expression in the same FORALL at %L" msgstr "" -#: options.c:1505 -msgid "Recognize GNU-defined keywords" +#: fortran/resolve.c:3860 +#, no-c-format +msgid "ELSE IF clause at %L requires a scalar LOGICAL expression" msgstr "" -#: options.c:1508 -msgid "Generate code for GNU runtime environment" +#: fortran/resolve.c:3870 +#, no-c-format +msgid "WHERE/ELSEWHERE clause at %L requires a LOGICAL array" msgstr "" -#: options.c:1511 -msgid "Enable guessing of branch probabilities" +#: fortran/resolve.c:3948 +#, no-c-format +msgid "ASSIGNED GOTO statement at %L requires an INTEGER variable" msgstr "" -#: options.c:1523 -msgid "Assume normal C execution environment" +#: fortran/resolve.c:3951 +#, no-c-format +msgid "Variable '%s' has not been assigned a target label at %L" msgstr "" -#: options.c:1526 -msgid "Enable support for huge objects" +#: fortran/resolve.c:3961 +#, no-c-format +msgid "Alternate RETURN statement at %L requires an INTEGER return specifier" msgstr "" -#: options.c:1529 -msgid "Process #ident directives" +#: fortran/resolve.c:3977 +#, no-c-format +msgid "Cannot assign to variable '%s' in PURE procedure at %L" msgstr "" -#: options.c:1532 -msgid "Perform conversion of conditional jumps to branchless equivalents" +#: fortran/resolve.c:3986 +#, no-c-format +msgid "Right side of assignment at %L is a derived type containing a POINTER in a PURE procedure" msgstr "" -#: options.c:1535 -msgid "Perform conversion of conditional jumps to conditional execution" +#: fortran/resolve.c:4006 +#, no-c-format +msgid "ASSIGN statement at %L requires a scalar default INTEGER variable" msgstr "" -#: options.c:1538 -msgid "Export functions even if they can be inlined" +#: fortran/resolve.c:4021 +#, no-c-format +msgid "Arithmetic IF statement at %L requires a numeric expression" msgstr "" -#: options.c:1541 -#, fuzzy -msgid "Emit implicit instantiations of inline templates" -msgstr "паўторнае абвяшчэнне меткі \"%s\"" +#: fortran/resolve.c:4033 +#, no-c-format +msgid "IF clause at %L requires a scalar LOGICAL expression" +msgstr "" -#: options.c:1544 -#, fuzzy -msgid "Emit implicit instantiations of templates" -msgstr "паўторнае абвяшчэнне меткі \"%s\"" +#: fortran/resolve.c:4059 +#, no-c-format +msgid "Exit condition of DO WHILE loop at %L must be a scalar LOGICAL expression" +msgstr "" -#: options.c:1547 -msgid "Do not generate .size directives" +#: fortran/resolve.c:4066 +#, no-c-format +msgid "STAT tag in ALLOCATE statement at %L must be of type INTEGER" msgstr "" -#: options.c:1550 -msgid "Pay attention to the \"inline\" keyword" +#: fortran/resolve.c:4078 +#, no-c-format +msgid "STAT tag in DEALLOCATE statement at %L must be of type INTEGER" msgstr "" -#: options.c:1553 -msgid "Integrate simple functions into their callers" +#: fortran/resolve.c:4144 +#, no-c-format +msgid "FORALL mask clause at %L requires a LOGICAL expression" msgstr "" -#: options.c:1559 -msgid "-finline-limit=\tLimit the size of inlined functions to " +#: fortran/resolve.c:4267 +#, no-c-format +msgid "Assumed size array at %L must be a dummy argument" msgstr "" -#: options.c:1562 -msgid "-finput-charset=\tSpecify the default character set for source files." +#: fortran/resolve.c:4270 +#, no-c-format +msgid "Assumed shape array at %L must be a dummy argument" msgstr "" -#: options.c:1565 -msgid "Instrument function entry and exit with profiling calls" +#: fortran/resolve.c:4280 +#, no-c-format +msgid "Parameter array '%s' at %L cannot be automatic or assumed shape" msgstr "" -#: options.c:1568 -msgid "Optimize induction variables on trees" +#: fortran/resolve.c:4296 +#, no-c-format +msgid "Module array '%s' at %L cannot be automatic or assumed shape" msgstr "" -#: options.c:1571 -msgid "Generate code for functions even if they are fully inlined" +#: fortran/resolve.c:4308 +#, no-c-format +msgid "Entity with assumed character length at %L must be a dummy argument or a PARAMETER" msgstr "" -#: options.c:1574 -msgid "Emit static const variables even if they are not used" +#: fortran/resolve.c:4320 +#, no-c-format +msgid "Implicitly typed PARAMETER '%s' at %L doesn't match a later IMPLICIT type" msgstr "" -#: options.c:1580 -msgid "Give external symbols a leading underscore" +#: fortran/resolve.c:4330 +#, no-c-format +msgid "Incompatible derived type in PARAMETER at %L" msgstr "" -#: options.c:1583 -#, fuzzy -msgid "Perform loop optimizations" -msgstr "Уключаць SSA аптымізацыю" +#: fortran/resolve.c:4341 +#, no-c-format +msgid "Symbol at %L is not a DUMMY variable" +msgstr "" -#: options.c:1586 -msgid "Perform loop optimizations using the new loop optimizer" +#: fortran/resolve.c:4352 +#, no-c-format +msgid "Character-valued statement function '%s' at %L must have constant length" msgstr "" -#: options.c:1589 -msgid "Set errno after built-in math functions" +#: fortran/resolve.c:4370 +#, no-c-format +msgid "The derived type '%s' at %L is of type '%s', which has not been defined." msgstr "" -#: options.c:1592 -msgid "Report on permanent memory allocation" +#: fortran/resolve.c:4391 +#, no-c-format +msgid "The component '%s' is a PRIVATE type and cannot be a component of '%s', which is PUBLIC at %L" msgstr "" -#: options.c:1595 -msgid "Attempt to merge identical constants and constant variables" +#: fortran/resolve.c:4411 +#, no-c-format +msgid "The INTENT(OUT) dummy argument '%s' at %L is ASSUMED SIZE and so cannot have a default initializer" msgstr "" -#: options.c:1598 -msgid "Attempt to merge identical constants across compilation units" +#: fortran/resolve.c:4433 +#, no-c-format +msgid "'%s' is a PRIVATE type and cannot be a dummy argument of '%s', which is PUBLIC at %L" msgstr "" -#: options.c:1601 -msgid "-fmessage-length=\tLimit diagnostics to characters per line. 0 suppresses line-wrapping" +#: fortran/resolve.c:4453 +#, no-c-format +msgid "Allocatable array '%s' at %L must have a deferred shape" msgstr "" -#: options.c:1604 -msgid "Perform SMS based modulo scheduling before the first scheduling pass" +#: fortran/resolve.c:4456 +#, no-c-format +msgid "Scalar object '%s' at %L may not be ALLOCATABLE" msgstr "" -#: options.c:1607 -msgid "Move loop invariant computations out of loops" +#: fortran/resolve.c:4463 +#, no-c-format +msgid "Array pointer '%s' at %L must have a deferred shape" msgstr "" -#: options.c:1610 -msgid "Don't warn about uses of Microsoft extensions" +#: fortran/resolve.c:4474 +#, no-c-format +msgid "Array '%s' at %L cannot have a deferred shape" msgstr "" -#: options.c:1613 -msgid "Add mudflap bounds-checking instrumentation for single-threaded program." +#: fortran/resolve.c:4509 +#, no-c-format +msgid "Allocatable '%s' at %L cannot have an initializer" msgstr "" -#: options.c:1616 -msgid "Ignore read operations when inserting mudflap instrumentation." +#: fortran/resolve.c:4512 +#, no-c-format +msgid "External '%s' at %L cannot have an initializer" msgstr "" -#: options.c:1619 -msgid "Add mudflap bounds-checking instrumentation for multi-threaded program." +#: fortran/resolve.c:4515 +#, no-c-format +msgid "Dummy '%s' at %L cannot have an initializer" msgstr "" -#: options.c:1628 -msgid "Generate code for NeXT (Apple Mac OS X) runtime environment" +#: fortran/resolve.c:4518 +#, no-c-format +msgid "Intrinsic '%s' at %L cannot have an initializer" msgstr "" -#: options.c:1631 -msgid "Assume that receivers of Objective-C messages may be nil" +#: fortran/resolve.c:4521 +#, no-c-format +msgid "Function result '%s' at %L cannot have an initializer" msgstr "" -#: options.c:1634 -msgid "Support synchronous non-call exceptions" +#: fortran/resolve.c:4524 +#, no-c-format +msgid "Automatic array '%s' at %L cannot have an initializer" msgstr "" -#: options.c:1643 -msgid "Enable Objective-C exception and synchronization syntax" +#: fortran/resolve.c:4547 +#, no-c-format +msgid "PRIVATE symbol '%s' cannot be member of PUBLIC namelist at %L" msgstr "" -#: options.c:1646 -#, fuzzy -msgid "Enable Objective-C setjmp exception handling runtime" -msgstr "Уключыць апрацоўку выключэньняў" +#: fortran/resolve.c:4559 +#, no-c-format +msgid "External object '%s' at %L may not have an initializer" +msgstr "" -#: options.c:1649 -msgid "When possible do not generate stack frames" +#: fortran/resolve.c:4572 +#, no-c-format +msgid "Intrinsic at %L does not exist" msgstr "" -#: options.c:1652 -msgid "Recognize C++ kewords like \"compl\" and \"xor\"" +#: fortran/resolve.c:4684 +#, no-c-format +msgid "Nonconstant array section at %L in DATA statement" msgstr "" -#: options.c:1655 -msgid "Do the full register move optimization pass" +#: fortran/resolve.c:4697 +#, no-c-format +msgid "DATA statement at %L has more variables than values" msgstr "" -#: options.c:1658 -msgid "Optimize sibling and tail recursive calls" +#: fortran/resolve.c:4895 +#, no-c-format +msgid "DATA statement at %L has more values than variables" msgstr "" -#: options.c:1661 -#, fuzzy -msgid "Enable optional diagnostics" -msgstr "Уключаць SSA аптымізацыю" +#: fortran/resolve.c:4977 +#, fuzzy, no-c-format +msgid "Label %d at %L defined but not used" +msgstr "адмеціна `%s' вызначана, але ня выкарыстоўваецца" -#: options.c:1664 -msgid "Pack structure members together without holes" -msgstr "" +#: fortran/resolve.c:4982 +#, fuzzy, no-c-format +msgid "Label %d at %L defined but cannot be used" +msgstr "адмеціна `%s' вызначана, але ня выкарыстоўваецца" -#: options.c:1667 -msgid "-fpack-struct=\tSet initial maximum structure member alignment" +#: fortran/resolve.c:5066 +#, no-c-format +msgid "Derived type variable '%s' at %L must have SEQUENCE attribute to be an EQUIVALENCE object" msgstr "" -#: options.c:1670 -msgid "Return small aggregates in memory, not registers" +#: fortran/resolve.c:5081 +#, no-c-format +msgid "Derived type variable '%s' at %L with pointer component(s) cannot be an EQUIVALENCE object" msgstr "" -#: options.c:1676 -msgid "Look for and use PCH files even when preprocessing" +#: fortran/resolve.c:5088 +#, no-c-format +msgid "Derived type variable '%s' at %L with default initializer cannot be an EQUIVALENCE object" msgstr "" -#: options.c:1679 -msgid "Perform loop peeling" +#: fortran/resolve.c:5189 +#, no-c-format +msgid "Syntax error in EQUIVALENCE statement at %L" msgstr "" -#: options.c:1682 -msgid "Enable machine specific peephole optimizations" +#: fortran/resolve.c:5206 +#, no-c-format +msgid "Initialized objects '%s' and '%s' cannot both be in the EQUIVALENCE statement at %L" msgstr "" -#: options.c:1685 -msgid "Enable an RTL peephole pass before sched2" +#: fortran/resolve.c:5220 +#, no-c-format +msgid "Common block member '%s' at %L cannot be an EQUIVALENCE object in the pure procedure '%s'" msgstr "" -#: options.c:1688 -msgid "Downgrade conformance errors to warnings" +#: fortran/resolve.c:5229 +#, no-c-format +msgid "Named constant '%s' at %L cannot be an EQUIVALENCE object" msgstr "" -#: options.c:1691 -msgid "Generate position-independent code if possible (small mode)" +#: fortran/resolve.c:5308 +#, no-c-format +msgid "Array '%s' at %L with non-constant bounds cannot be an EQUIVALENCE object" msgstr "" -#: options.c:1694 -msgid "Generate position-independent code for executables if possible (small mode)" +#: fortran/resolve.c:5319 +#, no-c-format +msgid "Structure component '%s' at %L cannot be an EQUIVALENCE object" msgstr "" -#: options.c:1697 -msgid "Generate prefetch instructions, if available, for arrays in loops" +#: fortran/resolve.c:5330 +#, no-c-format +msgid "Substring at %L has length zero" msgstr "" -#: options.c:1700 -msgid "Treat the input file as already preprocessed" +#: fortran/resolve.c:5376 +#, no-c-format +msgid "ENTRY '%s' at %L has no IMPLICIT type" msgstr "" -#: options.c:1703 -msgid "Enable basic program profiling code" +#: fortran/resolve.c:5412 +#, no-c-format +msgid "Contained procedure '%s' at %L of a PURE procedure must also be PURE" msgstr "" -#: options.c:1706 -msgid "Insert arc-based program profiling code" -msgstr "" +#: fortran/scanner.c:928 +#, fuzzy, no-c-format +msgid "%s:%d: file %s left but not entered" +msgstr "адмеціна `%s' выкарыстоўвываецца, але ня вызначана" -#: options.c:1709 -msgid "Enable common options for generating profile info for profile feedback directed optimizations" +#: fortran/scanner.c:951 +#, no-c-format +msgid "%s:%d: Illegal preprocessor directive" msgstr "" -#: options.c:1712 -msgid "Enable common options for performing profile feedback directed optimizations" +#: fortran/scanner.c:1026 +#, no-c-format +msgid "File '%s' is being included recursively" msgstr "" -#: options.c:1715 -msgid "Insert code to profile values of expressions" +#: fortran/scanner.c:1035 +#, fuzzy, no-c-format +msgid "Can't open file '%s'" +msgstr "немагу адчыніць файл \"%s\"" + +#: fortran/scanner.c:1044 +#, fuzzy, no-c-format +msgid "Can't open included file '%s'" +msgstr "немагчыма адчыніць файл уводу `%s'" + +#: fortran/scanner.c:1133 +#, fuzzy, c-format +msgid "%s:%3d %s\n" +msgstr "%s: %s: " + +#: fortran/simplify.c:101 +#, no-c-format +msgid "Result of %s overflows its kind at %L" msgstr "" -#: options.c:1721 -msgid "-frandom-seed=\tMake compile reproducible using " +#: fortran/simplify.c:120 +#, no-c-format +msgid "KIND parameter of %s at %L must be an initialization expression" msgstr "" -#: options.c:1724 -#, fuzzy -msgid "Return small aggregates in registers" -msgstr "Не выкарыстоўваць рэгістра sb" +#: fortran/simplify.c:130 +#, fuzzy, no-c-format +msgid "Invalid KIND parameter of %s at %L" +msgstr "нерэчаісны парамэтр `%s'" -#: options.c:1727 -msgid "Enables a register move optimization" +#: fortran/simplify.c:227 +#, no-c-format +msgid "Extended ASCII not implemented: argument of ACHAR at %L must be between 0 and 127" msgstr "" -#: options.c:1730 -msgid "Perform a register renaming optimization pass" +#: fortran/simplify.c:254 +#, no-c-format +msgid "Argument of ACOS at %L must be between -1 and 1" msgstr "" -#: options.c:1733 -msgid "Reorder basic blocks to improve code placement" +#: fortran/simplify.c:276 +#, no-c-format +msgid "Argument of ACOSH at %L must not be less than 1" msgstr "" -#: options.c:1736 -msgid "Reorder basic blocks and partition into hot and cold sections" +#: fortran/simplify.c:503 +#, no-c-format +msgid "Argument of ASIN at %L must be between -1 and 1" msgstr "" -#: options.c:1739 -msgid "Reorder functions to improve code placement" +#: fortran/simplify.c:559 +#, no-c-format +msgid "Argument of ATANH at %L must be inside the range -1 to 1" msgstr "" -#: options.c:1742 -msgid "Used in Fix-and-Continue mode to indicate that object files may be swapped in at runtime" +#: fortran/simplify.c:585 +#, no-c-format +msgid "If first argument of ATAN2 %L is zero, then the second argument must not be zero" msgstr "" -#: options.c:1745 -msgid "Enable automatic template instantiation" +#: fortran/simplify.c:667 +#, no-c-format +msgid "Bad character in CHAR function at %L" msgstr "" -#: options.c:1748 -msgid "Add a common subexpression elimination pass after loop optimizations" +#: fortran/simplify.c:1193 +#, no-c-format +msgid "Argument of IACHAR at %L must be of length one" msgstr "" -#: options.c:1751 -msgid "Run the loop optimizer twice" +#: fortran/simplify.c:1233 +#, fuzzy, no-c-format +msgid "Invalid second argument of IBCLR at %L" +msgstr "нявернае выкарыстанне \"restict\"" + +#: fortran/simplify.c:1241 +#, no-c-format +msgid "Second argument of IBCLR exceeds bit size at %L" msgstr "" -#: options.c:1754 -msgid "Enable/Disable the traditional scheduling in loops that already passed modulo scheduling" +#: fortran/simplify.c:1268 +#, fuzzy, no-c-format +msgid "Invalid second argument of IBITS at %L" +msgstr "нявернае выкарыстанне \"restict\"" + +#: fortran/simplify.c:1274 +#, fuzzy, no-c-format +msgid "Invalid third argument of IBITS at %L" +msgstr "нявернае выкарыстанне \"restict\"" + +#: fortran/simplify.c:1285 +#, no-c-format +msgid "Sum of second and third arguments of IBITS exceeds bit size at %L" msgstr "" -#: options.c:1757 -msgid "Disable optimizations that assume default FP rounding behavior" +#: fortran/simplify.c:1333 +#, fuzzy, no-c-format +msgid "Invalid second argument of IBSET at %L" +msgstr "нявернае выкарыстанне \"restict\"" + +#: fortran/simplify.c:1341 +#, no-c-format +msgid "Second argument of IBSET exceeds bit size at %L" msgstr "" -#: options.c:1760 -msgid "Generate run time type descriptor information" +#: fortran/simplify.c:1364 +#, no-c-format +msgid "Argument of ICHAR at %L must be of length one" msgstr "" -#: options.c:1763 -msgid "Enable scheduling across basic blocks" +#: fortran/simplify.c:1372 +#, no-c-format +msgid "Argument of ICHAR at %L out of range of this processor" msgstr "" -#: options.c:1766 -msgid "Allow speculative motion of non-loads" +#: fortran/simplify.c:1580 +#, no-c-format +msgid "Argument of INT at %L is not a valid type" msgstr "" -#: options.c:1769 -msgid "Allow speculative motion of some loads" +#: fortran/simplify.c:1657 +#, fuzzy, no-c-format +msgid "Invalid second argument of ISHFT at %L" +msgstr "нявернае выкарыстанне \"restict\"" + +#: fortran/simplify.c:1673 +#, no-c-format +msgid "Magnitude of second argument of ISHFT exceeds bit size at %L" msgstr "" -#: options.c:1772 -msgid "Allow speculative motion of more loads" +#: fortran/simplify.c:1737 +#, fuzzy, no-c-format +msgid "Invalid second argument of ISHFTC at %L" +msgstr "нявернае выкарыстанне \"restict\"" + +#: fortran/simplify.c:1747 +#, fuzzy, no-c-format +msgid "Invalid third argument of ISHFTC at %L" +msgstr "нявернае выкарыстанне \"restict\"" + +#: fortran/simplify.c:1762 +#, no-c-format +msgid "Magnitude of second argument of ISHFTC exceeds third argument at %L" msgstr "" -#: options.c:1775 -msgid "Allow premature scheduling of queued insns" +#: fortran/simplify.c:1832 +#, no-c-format +msgid "Argument of KIND at %L is a DERIVED type" msgstr "" -#: options.c:1778 -msgid "Set dependence distance checking in premature scheduling of queued insns" +#: fortran/simplify.c:1903 +#, no-c-format +msgid "DIM argument at %L is out of bounds" msgstr "" -#: options.c:1781 -msgid "-fsched-stalled-insns-dep=\tSet dependence distance checking in premature scheduling of queued insns" +#: fortran/simplify.c:2033 +#, no-c-format +msgid "Argument of LOG at %L cannot be less than or equal to zero" msgstr "" -#: options.c:1784 -msgid "-fsched-stalled-insns=\tSet number of queued insns that can be prematurely scheduled" +#: fortran/simplify.c:2046 +#, no-c-format +msgid "Complex argument of LOG at %L cannot be zero" msgstr "" -#: options.c:1787 -msgid "-fsched-verbose=\tSet the verbosity level of the scheduler" +#: fortran/simplify.c:2090 +#, no-c-format +msgid "Argument of LOG10 at %L cannot be less than or equal to zero" msgstr "" -#: options.c:1790 -msgid "If scheduling post reload, do superblock scheduling" +#. Result is processor-dependent. +#: fortran/simplify.c:2265 +#, no-c-format +msgid "Second argument MOD at %L is zero" msgstr "" -#: options.c:1793 -msgid "If scheduling post reload, do trace scheduling" +#. Result is processor-dependent. +#: fortran/simplify.c:2276 +#, fuzzy, no-c-format +msgid "Second argument of MOD at %L is zero" +msgstr "другім аргументам \"%s\" павінен быць \"char **\"" + +#. Result is processor-dependent. This processor just opts +#. to not handle it at all. +#. Result is processor-dependent. +#: fortran/simplify.c:2322 fortran/simplify.c:2334 +#, no-c-format +msgid "Second argument of MODULO at %L is zero" msgstr "" -#: options.c:1796 -msgid "Reschedule instructions before register allocation" +#: fortran/simplify.c:2391 +#, no-c-format +msgid "Second argument of NEAREST at %L may not be zero" msgstr "" -#: options.c:1799 -msgid "Reschedule instructions after register allocation" +#: fortran/simplify.c:2699 +#, fuzzy, no-c-format +msgid "Invalid second argument of REPEAT at %L" +msgstr "нявернае выкарыстанне \"restict\"" + +#: fortran/simplify.c:2773 +#, fuzzy, no-c-format +msgid "Integer too large in shape specification at %L" +msgstr "няма папярэдняга аб'яўлення для \"%s\"" + +#: fortran/simplify.c:2783 +#, no-c-format +msgid "Too many dimensions in shape specification for RESHAPE at %L" msgstr "" -#: options.c:1802 -msgid "Mark data as shared rather than private" +#: fortran/simplify.c:2791 +#, no-c-format +msgid "Shape specification at %L cannot be negative" msgstr "" -#: options.c:1805 -msgid "Use the same size for double as for float" +#: fortran/simplify.c:2801 +#, no-c-format +msgid "Shape specification at %L cannot be the null array" msgstr "" -#: options.c:1808 -msgid "Use the narrowest integer type possible for enumeration types" +#: fortran/simplify.c:2825 +#, no-c-format +msgid "ORDER parameter of RESHAPE at %L is not the same size as SHAPE parameter" msgstr "" -#: options.c:1811 -msgid "Force the underlying type for \"wchar_t\" to be \"unsigned short\"" +#: fortran/simplify.c:2832 +#, no-c-format +msgid "Error in ORDER parameter of RESHAPE at %L" msgstr "" -#: options.c:1817 -msgid "Disable optimizations observable by IEEE signaling NaNs" +#: fortran/simplify.c:2842 +#, no-c-format +msgid "ORDER parameter of RESHAPE at %L is out of range" msgstr "" -#: options.c:1820 -msgid "When \"signed\" or \"unsigned\" is not given make the bitfield signed" +#: fortran/simplify.c:2851 +#, no-c-format +msgid "Invalid permutation in ORDER parameter at %L" msgstr "" -#: options.c:1823 -msgid "Make \"char\" signed by default" +#: fortran/simplify.c:2908 +#, no-c-format +msgid "PAD parameter required for short SOURCE parameter at %L" msgstr "" -#: options.c:1826 -msgid "Convert floating point constants to single precision constants" +#: fortran/simplify.c:3042 +#, no-c-format +msgid "Result of SCALE overflows its kind at %L" msgstr "" -#: options.c:1829 -msgid "Use value profiling for speculative prefetching" +#: fortran/simplify.c:3623 +#, no-c-format +msgid "Argument of SQRT at %L has a negative value" msgstr "" -#: options.c:1832 -msgid "Split lifetimes of induction variables when loops are unrolled." +#: fortran/symbol.c:111 +#, no-c-format +msgid "Duplicate IMPLICIT NONE statement at %C" msgstr "" -#: options.c:1838 -msgid "Insert stack checking code into the program" -msgstr "Уключаць код правэркі стэку ў праграму" +#: fortran/symbol.c:151 +#, no-c-format +msgid "Letter '%c' already set in IMPLICIT statement at %C" +msgstr "" -#: options.c:1844 -msgid "-fstack-limit-register=\tTrap if the stack goes past " +#: fortran/symbol.c:173 +#, no-c-format +msgid "Cannot specify IMPLICIT at %C after IMPLICIT NONE" msgstr "" -#: options.c:1847 -msgid "-fstack-limit-symbol=\tTrap if the stack goes past symbol " +#: fortran/symbol.c:184 +#, no-c-format +msgid "Letter %c already has an IMPLICIT type at %C" msgstr "" -#: options.c:1850 -msgid "Display statistics accumulated during compilation" +#: fortran/symbol.c:232 +#, no-c-format +msgid "Symbol '%s' at %L has no IMPLICIT type" msgstr "" -#: options.c:1853 -msgid "Perform strength reduction optimizations" +#: fortran/symbol.c:304 +#, no-c-format +msgid "%s attribute not allowed in BLOCK DATA program unit at %L" msgstr "" -#: options.c:1856 -msgid "Assume strict aliasing rules apply" +#: fortran/symbol.c:497 fortran/symbol.c:976 +#, fuzzy, no-c-format +msgid "%s attribute conflicts with %s attribute at %L" +msgstr "\"%s\" атрыбут ігнарыруецца" + +#: fortran/symbol.c:500 +#, no-c-format +msgid "%s attribute conflicts with %s attribute in '%s' at %L" msgstr "" -#: options.c:1862 -msgid "Check for syntax errors, then stop" +#: fortran/symbol.c:542 +#, no-c-format +msgid "Cannot change attributes of USE-associated symbol at %L" msgstr "" -#: options.c:1865 -msgid "-ftabstop=\tDistance between tab stops for column reporting" +#: fortran/symbol.c:545 +#, no-c-format +msgid "Cannot change attributes of USE-associated symbol %s at %L" msgstr "" -#: options.c:1868 -msgid "-ftemplate-depth-\tSpecify maximum template instantiation depth" +#: fortran/symbol.c:567 +#, no-c-format +msgid "Cannot change attributes of symbol at %L after it has been used" msgstr "" -#: options.c:1871 -msgid "Create data files needed by \"gcov\"" +#: fortran/symbol.c:583 +#, no-c-format +msgid "Duplicate %s attribute specified at %L" msgstr "" -#: options.c:1877 -msgid "Perform jump threading optimizations" +#: fortran/symbol.c:712 +#, no-c-format +msgid "Cray Pointee at %L appears in multiple pointer() statements." msgstr "" -#: options.c:1880 -msgid "-fno-threadsafe-statics\tDo not generate thread-safe code for initializing local statics." +#: fortran/symbol.c:744 +#, no-c-format +msgid "SAVE attribute at %L cannot be specified in a PURE procedure" msgstr "" -#: options.c:1883 -msgid "Report the time taken by each compiler pass" +#: fortran/symbol.c:752 +#, no-c-format +msgid "Duplicate SAVE attribute specified at %L" msgstr "" -#: options.c:1886 -msgid "-ftls-model=[global-dynamic|local-dynamic|initial-exec|local-exec]\tSet the default thread-local storage code generation model" +#: fortran/symbol.c:1006 +#, no-c-format +msgid "%s procedure at %L is already declared as %s procedure" msgstr "" -#: options.c:1889 -msgid "Perform superblock formation via tail duplication" +#: fortran/symbol.c:1041 +#, no-c-format +msgid "INTENT (%s) conflicts with INTENT(%s) at %L" msgstr "" -#: options.c:1892 -msgid "Assume floating-point operations can trap" +#: fortran/symbol.c:1064 +#, no-c-format +msgid "ACCESS specification at %L was already specified" msgstr "" -#: options.c:1895 -msgid "Trap for signed overflow in addition, subtraction and multiplication" +#: fortran/symbol.c:1084 +#, no-c-format +msgid "Symbol '%s' at %L already has an explicit interface" msgstr "" -#: options.c:1898 -msgid "Use tree-ssa based implementation of profiling" +#: fortran/symbol.c:1112 +#, no-c-format +msgid "Symbol '%s' at %L already has basic type of %s" msgstr "" -#: options.c:1901 -#, fuzzy -msgid "Enable SSA-CCP optimization on trees" -msgstr "Уключаць SSA аптымізацыю" - -#: options.c:1904 -msgid "Enable loop header copying on trees" -msgstr "" - -#: options.c:1907 -msgid "Coalesce memory temporaries in the SSA->normal pass" +#: fortran/symbol.c:1124 +#, no-c-format +msgid "Symbol '%s' at %L cannot have a type" msgstr "" -#: options.c:1910 -msgid "Replace SSA temporaries with better names in copies." +#: fortran/symbol.c:1262 +#, no-c-format +msgid "Component '%s' at %C already declared at %L" msgstr "" -#: options.c:1913 -#, fuzzy -msgid "Enable SSA dead code elimination optimization on trees" -msgstr "Уключаць SSA аптымізацыю" - -#: options.c:1916 -#, fuzzy -msgid "Enable dominator optimizations" -msgstr "Уключаць SSA аптымізацыю" - -#: options.c:1919 -#, fuzzy -msgid "Enable dead store elimination" -msgstr "Уключаць SSA аптымізацыю" +#: fortran/symbol.c:1340 +#, fuzzy, no-c-format +msgid "Symbol '%s' at %C is ambiguous" +msgstr "памер \"%s\" - %d байт" -#: options.c:1922 -msgid "Enable Full Redundancy Elimination (FRE) on trees" +#: fortran/symbol.c:1380 +#, no-c-format +msgid "Derived type '%s' at %C is being used before it is defined" msgstr "" -#: options.c:1925 -msgid "Enable loop invariant motion on trees" +#: fortran/symbol.c:1408 +#, no-c-format +msgid "'%s' at %C is not a member of the '%s' structure" msgstr "" -#: options.c:1928 -msgid "Create canonical induction variables in loops" +#: fortran/symbol.c:1414 +#, no-c-format +msgid "Component '%s' at %C is a PRIVATE component of '%s'" msgstr "" -#: options.c:1931 -msgid "Enable linear loop transforms on trees" +#: fortran/symbol.c:1554 +#, no-c-format +msgid "Duplicate statement label %d at %L and %L" msgstr "" -#: options.c:1934 -#, fuzzy -msgid "Enable loop optimizations on tree level" -msgstr "Уключаць SSA аптымізацыю" - -#: options.c:1937 -msgid "Perform live range splitting during the SSA->normal pass." +#: fortran/symbol.c:1564 +#, no-c-format +msgid "Label %d at %C already referenced as branch target" msgstr "" -#: options.c:1940 -#, fuzzy -msgid "Enable SSA-PRE optimization on trees" -msgstr "Уключаць SSA аптымізацыю" - -#: options.c:1943 -msgid "Perform scalar replacement of aggregates" +#: fortran/symbol.c:1573 +#, no-c-format +msgid "Label %d at %C already referenced as a format label" msgstr "" -#: options.c:1946 -msgid "Replace temporary expressions in the SSA->normal pass" +#: fortran/symbol.c:1615 +#, no-c-format +msgid "Label %d at %C previously used as a FORMAT label" msgstr "" -#: options.c:1949 -#, fuzzy -msgid "Enable loop vectorization on trees" -msgstr "Уключаць SSA аптымізацыю" - -#: options.c:1952 -msgid "-ftree-vectorizer-verbose=\tSet the verbosity level of the vectorizer" +#: fortran/symbol.c:1623 +#, no-c-format +msgid "Label %d at %C previously used as branch target" msgstr "" -#: options.c:1955 -msgid "Compile whole compilation unit at a time" +#: fortran/symbol.c:1876 +#, no-c-format +msgid "Name '%s' at %C is an ambiguous reference to '%s' from module '%s'" msgstr "" -#: options.c:1958 -msgid "Perform loop unrolling for all loops" +#: fortran/symbol.c:1879 +#, no-c-format +msgid "Name '%s' at %C is an ambiguous reference to '%s' from current program unit" msgstr "" -#: options.c:1961 -msgid "Perform loop unrolling when iteration count is known" +#. Symbol is from another namespace. +#: fortran/symbol.c:2016 +#, no-c-format +msgid "Symbol '%s' at %C has already been host associated" msgstr "" -#: options.c:1964 -msgid "Allow math optimizations that may violate IEEE or ISO standards" +#: fortran/trans-common.c:331 +#, no-c-format +msgid "Named COMMON block '%s' at %L shall be of the same size" msgstr "" -#: options.c:1967 -msgid "When \"signed\" or \"unsigned\" is not given make the bitfield unsigned" +#: fortran/trans-common.c:629 +#, no-c-format +msgid "Bad array reference at %L" msgstr "" -#: options.c:1970 -msgid "Make \"char\" unsigned by default" +#: fortran/trans-common.c:637 +#, no-c-format +msgid "Illegal reference type at %L as EQUIVALENCE object" msgstr "" -#: options.c:1973 -msgid "Perform loop unswitching" +#: fortran/trans-common.c:677 +#, no-c-format +msgid "Inconsistent equivalence rules involving '%s' at %L and '%s' at %L" msgstr "" -#: options.c:1976 -msgid "Just generate unwind tables for exception handling" +#. Aligning this field would misalign a previous field. +#: fortran/trans-common.c:799 +#, no-c-format +msgid "The equivalence set for variable '%s' declared at %L violates alignment requirents" msgstr "" -#: options.c:1979 -msgid "Use __cxa_atexit to register destructors" +#: fortran/trans-common.c:864 +#, no-c-format +msgid "Equivalence for '%s' does not match ordering of COMMON '%s' at %L" msgstr "" -#: options.c:1982 -msgid "Perform variable tracking" +#: fortran/trans-common.c:879 +#, no-c-format +msgid "The equivalence set for '%s' cause an invalid extension to COMMON '%s' at %L" msgstr "" -#: options.c:1985 -msgid "Apply variable expansion when loops are unrolled." +#. The required offset conflicts with previous alignment +#. requirements. Insert padding immediately before this +#. segment. +#: fortran/trans-common.c:890 +#, no-c-format +msgid "Padding of %d bytes required before '%s' in COMMON '%s' at %L" msgstr "" -#: options.c:1988 -msgid "Add extra commentary to assembler output" +#: fortran/trans-common.c:916 +#, no-c-format +msgid "COMMON '%s' at %L requires %d bytes of padding at start" msgstr "" -#: options.c:1991 -msgid "Marks all inlined methods as having hidden visibility" +#: fortran/trans-const.c:158 +msgid "Array bound mismatch" msgstr "" -#: options.c:1994 -msgid "-fvisibility=[default|internal|hidden|protected]\tSet the default symbol visibility" +#: fortran/trans-const.c:161 +msgid "Array reference out of bounds" msgstr "" -#: options.c:1997 -msgid "Use expression value profiles in optimizations" +#: fortran/trans-const.c:164 +msgid "Incorrect function return value" msgstr "" -#: options.c:2000 -msgid "Discard unused virtual functions" +#: fortran/trans-decl.c:437 +#, no-c-format +msgid "storage size not known" msgstr "" -#: options.c:2003 -msgid "Implement vtables using thunks" -msgstr "" +#: fortran/trans-decl.c:444 +#, fuzzy, no-c-format +msgid "storage size not constant" +msgstr "тып параметра \"%s\" не аб'яўлены" -#: options.c:2006 -msgid "Emit common-like symbols as weak symbols" +#: fortran/trans-io.c:476 +msgid "Assigned label is not a format label" msgstr "" -#: options.c:2009 -msgid "Construct webs and split unrelated uses of single variable" +#: fortran/trans-io.c:876 +#, no-c-format +msgid "INQUIRE statement at %L cannot contain both FILE and UNIT specifiers." msgstr "" -#: options.c:2012 -msgid "-fwide-exec-charset=\tConvert all wide strings and character constants to character set " +#: fortran/trans-stmt.c:163 +msgid "Assigned label is not a target label" msgstr "" -#: options.c:2015 -msgid "Generate a #line directive pointing at the current working directory" +#. Check the label list. +#: fortran/trans-stmt.c:179 +msgid "Assigned label is not in the list" msgstr "" -#: options.c:2018 -msgid "Assume signed arithmetic overflow wraps around" +#: fortran/trans-stmt.c:265 +#, no-c-format +msgid "An alternate return at %L without a * dummy argument" msgstr "" -#: options.c:2021 -msgid "Emit cross referencing information" -msgstr "" +#. FIXME: i18n bug here. Order of prints should not be +#. fixed. +#: java/gjavah.c:916 +#, fuzzy, c-format +msgid "ignored method '" +msgstr "у метадзе \"%s\":" -#: options.c:2024 -msgid "Put zero initialized data in the bss section" +#: java/gjavah.c:918 +#, c-format +msgid "' marked virtual\n" msgstr "" -#: options.c:2027 -msgid "Generate lazy class lookup (via objc_getClass()) for use in Zero-Link mode" +#: java/gjavah.c:2356 +#, c-format +msgid "Try '" msgstr "" -#: options.c:2030 -#, fuzzy -msgid "Generate debug information in default format" -msgstr "Генерыраваць код для Intel as" - -#: options.c:2033 -msgid "Generate debug information in COFF format" +#: java/gjavah.c:2356 +#, c-format +msgid " --help' for more information.\n" msgstr "" -#: options.c:2036 -msgid "Generate debug information in DWARF v2 format" +#: java/gjavah.c:2363 +#, c-format +msgid "Usage: " msgstr "" -#: options.c:2039 -msgid "Dump declarations to a .decl file" +#: java/gjavah.c:2363 +#, c-format +msgid "" +" [OPTION]... CLASS...\n" +"\n" msgstr "" -#: options.c:2042 -msgid "Generate debug information in default extended format" +#: java/gjavah.c:2364 +#, c-format +msgid "" +"Generate C or C++ header files from .class files\n" +"\n" msgstr "" -#: options.c:2045 -#, fuzzy -msgid "Generate debug information in STABS format" -msgstr "Стварыць код для DLL" +#: java/gjavah.c:2365 +#, fuzzy, c-format +msgid " -stubs Generate an implementation stub file\n" +msgstr " -o <файл> Памясціць вывад у <файл>\n" -#: options.c:2048 -msgid "Generate debug information in extended STABS format" +#: java/gjavah.c:2366 +#, c-format +msgid " -jni Generate a JNI header or stub\n" msgstr "" -#: options.c:2051 -#, fuzzy -msgid "Generate debug information in VMS format" -msgstr "Стварыць код для DLL" - -#: options.c:2054 -msgid "Generate debug information in XCOFF format" -msgstr "" +#: java/gjavah.c:2367 +#, fuzzy, c-format +msgid " -force Always overwrite output files\n" +msgstr " -o <файл> Памясціць вывад у <файл>\n" -#: options.c:2057 -msgid "Generate debug information in extended XCOFF format" -msgstr "" +#: java/gjavah.c:2368 +#, fuzzy, c-format +msgid " -old Unused compatibility option\n" +msgstr " --help Адлюстраваць гэту інфармацыю\n" -#: options.c:2060 -msgid "-idirafter \tAdd to the end of the system include path" -msgstr "" +#: java/gjavah.c:2369 +#, fuzzy, c-format +msgid " -trace Unused compatibility option\n" +msgstr " --help Адлюстраваць гэту інфармацыю\n" -#: options.c:2063 -msgid "-imacros \tAccept definition of macros in " +#: java/gjavah.c:2370 +#, c-format +msgid " -J OPTION Unused compatibility option\n" msgstr "" -#: options.c:2066 -msgid "-include \tInclude the contents of before other files" +#: java/gjavah.c:2372 +#, c-format +msgid " -add TEXT Insert TEXT into class body\n" msgstr "" -#: options.c:2069 -msgid "-iprefix \tSpecify as a prefix for next two options" +#: java/gjavah.c:2373 +#, c-format +msgid " -append TEXT Insert TEXT after class declaration\n" msgstr "" -#: options.c:2072 -msgid "-iquote \tAdd to the end of the quote include path" +#: java/gjavah.c:2374 +#, c-format +msgid " -friend TEXT Insert TEXT as 'friend' declaration\n" msgstr "" -#: options.c:2075 -msgid "-isysroot \tSet to be the system root directory" +#: java/gjavah.c:2375 +#, c-format +msgid " -prepend TEXT Insert TEXT before start of class\n" msgstr "" -#: options.c:2078 -msgid "-isystem \tAdd to the start of the system include path" +#: java/gjavah.c:2377 java/jcf-dump.c:912 +#, c-format +msgid " --classpath PATH Set path to find .class files\n" msgstr "" -#: options.c:2081 -msgid "-iwithprefix \tAdd to the end of the system include path" +#: java/gjavah.c:2378 java/jcf-dump.c:913 +#, c-format +msgid " -IDIR Append directory to class path\n" msgstr "" -#: options.c:2084 -msgid "-iwithprefixbefore \tAdd to the end of the main include path" +#: java/gjavah.c:2379 java/jcf-dump.c:914 +#, c-format +msgid " --bootclasspath PATH Override built-in class path\n" msgstr "" -#: options.c:2096 -msgid "Do not search standard system include directories (those specified with -isystem will still be used)" +#: java/gjavah.c:2380 java/jcf-dump.c:915 +#, c-format +msgid " --extdirs PATH Set extensions directory path\n" msgstr "" -#: options.c:2099 -msgid "Do not search standard system include directories for C++" +#: java/gjavah.c:2381 +#, c-format +msgid " -d DIRECTORY Set output directory name\n" msgstr "" -#: options.c:2102 -#, fuzzy -msgid "-o \tPlace output into " +#: java/gjavah.c:2382 java/jcf-dump.c:916 java/jv-scan.c:115 +#, fuzzy, c-format +msgid " -o FILE Set output file name\n" msgstr " -o <файл> Памясціць вывад у <файл>\n" -#: options.c:2105 -#, fuzzy -msgid "Enable function profiling" -msgstr "Уключыць апрацоўку выключэньняў" - -#: options.c:2108 -msgid "Issue warnings needed for strict compliance to the standard" +#: java/gjavah.c:2383 +#, c-format +msgid " -td DIRECTORY Set temporary directory name\n" msgstr "" -#: options.c:2111 -msgid "Like -pedantic but issue them as errors" -msgstr "" +#: java/gjavah.c:2385 java/jcf-dump.c:918 java/jv-scan.c:117 +#, fuzzy, c-format +msgid " --help Print this help, then exit\n" +msgstr " --help Адлюстраваць гэту інфармацыю\n" -#: options.c:2114 -msgid "Generate C header of platform-specific features" -msgstr "" +#: java/gjavah.c:2386 java/jcf-dump.c:919 java/jv-scan.c:118 +#, fuzzy, c-format +msgid " --version Print version number, then exit\n" +msgstr " -dumpversion Адлюстраваць версію кампілятара\n" -#: options.c:2117 -msgid "Do not display functions compiled or elapsed time" -msgstr "" +#: java/gjavah.c:2387 java/jcf-dump.c:920 +#, fuzzy, c-format +msgid " -v, --verbose Print extra information while running\n" +msgstr " -dumpversion Адлюстраваць версію кампілятара\n" -#: options.c:2120 -msgid "Remap file names when including files" +#: java/gjavah.c:2389 +#, c-format +msgid "" +" -M Print all dependencies to stdout;\n" +" suppress ordinary output\n" msgstr "" -#: options.c:2123 -msgid "Conform to the ISO 1998 C++ standard" +#: java/gjavah.c:2391 +#, c-format +msgid "" +" -MM Print non-system dependencies to stdout;\n" +" suppress ordinary output\n" msgstr "" -#: options.c:2126 options.c:2147 -msgid "Conform to the ISO 1990 C standard" -msgstr "" +#: java/gjavah.c:2393 +#, fuzzy, c-format +msgid " -MD Print all dependencies to stdout\n" +msgstr " --help Адлюстраваць гэту інфармацыю\n" -#: options.c:2129 options.c:2153 -msgid "Conform to the ISO 1999 C standard" -msgstr "" +#: java/gjavah.c:2394 +#, fuzzy, c-format +msgid " -MMD Print non-system dependencies to stdout\n" +msgstr " --help Адлюстраваць гэту інфармацыю\n" -#: options.c:2132 -msgid "Deprecated in favor of -std=c99" +#: java/gjavah.c:2397 java/jcf-dump.c:922 java/jv-scan.c:120 +#, fuzzy, c-format +msgid "" +"For bug reporting instructions, please see:\n" +"%s.\n" msgstr "" +"\n" +"Інструкцыі для паведамленняў аб памылках глядзіце тут:\n" -#: options.c:2135 -msgid "Conform to the ISO 1998 C++ standard with GNU extensions" -msgstr "" +#: java/gjavah.c:2581 +#, fuzzy, c-format +msgid "Processing %s\n" +msgstr "версія gcc %s\n" -#: options.c:2138 -msgid "Conform to the ISO 1990 C standard with GNU extensions" +#: java/gjavah.c:2591 +#, c-format +msgid "Found in %s\n" msgstr "" -#: options.c:2141 -msgid "Conform to the ISO 1999 C standard with GNU extensions" +#: java/jcf-dump.c:829 +#, c-format +msgid "Not a valid Java .class file.\n" msgstr "" -#: options.c:2144 -msgid "Deprecated in favor of -std=gnu99" +#: java/jcf-dump.c:835 +#, c-format +msgid "error while parsing constant pool\n" msgstr "" -#: options.c:2150 -msgid "Conform to the ISO 1990 C standard as amended in 1994" +#: java/jcf-dump.c:841 java/jcf-parse.c:753 +#, gcc-internal-format +msgid "error in constant pool entry #%d\n" msgstr "" -#: options.c:2156 -msgid "Deprecated in favor of -std=iso9899:1999" +#: java/jcf-dump.c:851 +#, c-format +msgid "error while parsing fields\n" msgstr "" -#: options.c:2159 -msgid "Enable traditional preprocessing" -msgstr "" +#: java/jcf-dump.c:857 +#, fuzzy, c-format +msgid "error while parsing methods\n" +msgstr "памылка запісу ў %s" -#: options.c:2162 -msgid "-trigraphs\tSupport ISO C trigraphs" +#: java/jcf-dump.c:863 +#, c-format +msgid "error while parsing final attributes\n" msgstr "" -#: options.c:2165 -msgid "Do not predefine system-specific and GCC-specific macros" +#: java/jcf-dump.c:900 +#, c-format +msgid "Try 'jcf-dump --help' for more information.\n" msgstr "" -#: options.c:2168 -msgid "Enable verbose output" +#: java/jcf-dump.c:907 +#, c-format +msgid "" +"Usage: jcf-dump [OPTION]... CLASS...\n" +"\n" msgstr "" -#: options.c:2171 -msgid "Display the compiler's version" +#: java/jcf-dump.c:908 +#, c-format +msgid "" +"Display contents of a class file in readable form.\n" +"\n" msgstr "" -#: options.c:2174 -#, fuzzy -msgid "Suppress warnings" -msgstr "%s: увага: " +#: java/jcf-dump.c:909 +#, fuzzy, c-format +msgid " -c Disassemble method bodies\n" +msgstr " --help Адлюстраваць гэту інфармацыю\n" -#: config/vax/vax.h:50 config/vax/vax.h:51 -msgid "profiling not supported with -mg\n" +#: java/jcf-dump.c:910 +#, fuzzy, c-format +msgid " --javap Generate output in 'javap' format\n" +msgstr " --help Адлюстраваць гэту інфармацыю\n" + +#: java/jcf-dump.c:950 java/jcf-dump.c:1018 +#, c-format +msgid "jcf-dump: no classes specified\n" +msgstr "" + +#: java/jcf-dump.c:1038 +#, fuzzy, c-format +msgid "Cannot open '%s' for output.\n" +msgstr "немагчыма адчыніць %s для запісу" + +#: java/jcf-dump.c:1084 +#, c-format +msgid "bad format of .zip/.jar archive\n" +msgstr "" + +#: java/jcf-dump.c:1202 +#, c-format +msgid "Bad byte codes.\n" +msgstr "" + +#: java/jv-scan.c:100 +#, c-format +msgid "Try 'jv-scan --help' for more information.\n" +msgstr "" + +#: java/jv-scan.c:107 +#, c-format +msgid "" +"Usage: jv-scan [OPTION]... FILE...\n" +"\n" +msgstr "" + +#: java/jv-scan.c:108 +#, c-format +msgid "" +"Print useful information read from Java source files.\n" +"\n" +msgstr "" + +#: java/jv-scan.c:109 +#, c-format +msgid " --no-assert Don't recognize the assert keyword\n" +msgstr "" + +#: java/jv-scan.c:110 +#, c-format +msgid " --complexity Print cyclomatic complexity of input file\n" +msgstr "" + +#: java/jv-scan.c:111 +#, c-format +msgid " --encoding NAME Specify encoding of input file\n" +msgstr "" + +#: java/jv-scan.c:112 +#, c-format +msgid " --print-main Print name of class containing 'main'\n" +msgstr "" + +#: java/jv-scan.c:113 +#, c-format +msgid " --list-class List all classes defined in file\n" +msgstr "" + +#: java/jv-scan.c:114 +#, c-format +msgid " --list-filename Print input filename when listing class names\n" +msgstr "" + +#: java/jv-scan.c:257 +#, fuzzy, c-format +msgid "%s: error: " +msgstr "граматычная памылка" + +#: java/jv-scan.c:269 java/jv-scan.c:280 +#, c-format +msgid "%s: warning: " +msgstr "%s: увага: " + +#: java/jvgenmain.c:48 +#, c-format +msgid "Usage: %s [OPTIONS]... CLASSNAMEmain [OUTFILE]\n" +msgstr "" + +#: java/jvgenmain.c:101 +#, fuzzy, c-format +msgid "%s: Cannot open output file: %s\n" +msgstr "немагчыма адчыніць файл уводу `%s'" + +#: java/jvgenmain.c:138 +#, fuzzy, c-format +msgid "%s: Failed to close output file %s\n" +msgstr "немагчыма зачыніць уваходзячы файл %s" + +#: java/jvspec.c:420 +#, c-format +msgid "can't specify '-D' without '--main'\n" +msgstr "" + +#: java/jvspec.c:423 +#, fuzzy, c-format +msgid "'%s' is not a valid class name" +msgstr "\"%s\" - гэта не пачатак дэкларацыі" + +#: java/jvspec.c:429 +#, c-format +msgid "--resource requires -o" +msgstr "" + +#: java/jvspec.c:443 +#, c-format +msgid "cannot specify both -C and -o" +msgstr "" + +#: java/jvspec.c:455 +#, c-format +msgid "cannot create temporary file" +msgstr "немагчыма стварыць часовы файл" + +#: java/jvspec.c:483 +#, c-format +msgid "using both @FILE with multiple files not implemented" +msgstr "" + +#: java/jvspec.c:546 +#, c-format +msgid "cannot specify 'main' class when not linking" +msgstr "" + +#: java/parse-scan.y:879 java/parse.y:961 java/parse.y:1307 java/parse.y:1369 +#: java/parse.y:1577 java/parse.y:1800 java/parse.y:1809 java/parse.y:1820 +#: java/parse.y:1831 java/parse.y:1843 java/parse.y:1858 java/parse.y:1875 +#: java/parse.y:1877 java/parse.y:1958 java/parse.y:2135 java/parse.y:2204 +#: java/parse.y:2368 java/parse.y:2381 java/parse.y:2388 java/parse.y:2395 +#: java/parse.y:2406 java/parse.y:2408 java/parse.y:2446 java/parse.y:2448 +#: java/parse.y:2450 java/parse.y:2471 java/parse.y:2473 java/parse.y:2475 +#: java/parse.y:2491 java/parse.y:2493 java/parse.y:2514 java/parse.y:2516 +#: java/parse.y:2518 java/parse.y:2546 java/parse.y:2548 java/parse.y:2550 +#: java/parse.y:2552 java/parse.y:2570 java/parse.y:2572 java/parse.y:2583 +#: java/parse.y:2594 java/parse.y:2605 java/parse.y:2616 java/parse.y:2627 +#: java/parse.y:2640 java/parse.y:2644 java/parse.y:2646 java/parse.y:2659 +msgid "Missing term" +msgstr "" + +#: java/parse-scan.y:881 java/parse.y:741 java/parse.y:779 java/parse.y:804 +#: java/parse.y:982 java/parse.y:1343 java/parse.y:1553 java/parse.y:1555 +#: java/parse.y:1785 java/parse.y:1811 java/parse.y:1822 java/parse.y:1833 +#: java/parse.y:1845 java/parse.y:1860 +msgid "';' expected" +msgstr "" + +#: java/parse-scan.y:1372 java/parse.y:16472 +msgid "parse error" +msgstr "граматычная памылка" + +#: java/parse-scan.y:1373 java/parse.y:16473 +msgid "syntax error; also virtual memory exhausted" +msgstr "" + +#: java/parse-scan.y:1374 java/parse.y:16474 +msgid "parse error; also virtual memory exhausted" +msgstr "" + +#: java/parse-scan.y:1376 java/parse.y:16476 +#, fuzzy +msgid "parse error: cannot back up" +msgstr "сінтаксічная памылка" + +#: java/parse.y:739 java/parse.y:777 +msgid "Missing name" +msgstr "Прапушчана назва" + +#: java/parse.y:802 +msgid "'*' expected" +msgstr "" + +#: java/parse.y:816 +msgid "Class or interface declaration expected" +msgstr "" + +#: java/parse.y:853 java/parse.y:855 +msgid "Missing class name" +msgstr "Прапушчана назва класа" + +#: java/parse.y:858 java/parse.y:862 java/parse.y:870 java/parse.y:1022 +#: java/parse.y:1288 java/parse.y:1290 java/parse.y:1620 java/parse.y:1871 +#: java/parse.y:1903 java/parse.y:1965 +msgid "'{' expected" +msgstr "" + +#: java/parse.y:872 +msgid "Missing super class name" +msgstr "" + +#: java/parse.y:882 java/parse.y:898 +msgid "Missing interface name" +msgstr "" + +#: java/parse.y:976 +msgid "Missing variable initializer" +msgstr "" + +#: java/parse.y:993 +msgid "Invalid declaration" +msgstr "Нерэчаіснае абвяшчэнне" + +#: java/parse.y:996 java/parse.y:1086 java/parse.y:2150 java/parse.y:2179 +#: java/parse.y:2201 java/parse.y:2205 java/parse.y:2240 java/parse.y:2319 +#: java/parse.y:2329 java/parse.y:2339 +msgid "']' expected" +msgstr "" + +#: java/parse.y:1000 +msgid "Unbalanced ']'" +msgstr "" + +#: java/parse.y:1036 +msgid "Invalid method declaration, method name required" +msgstr "" + +#: java/parse.y:1042 java/parse.y:1048 java/parse.y:1054 java/parse.y:2053 +msgid "Identifier expected" +msgstr "" + +#: java/parse.y:1060 java/parse.y:4738 +#, gcc-internal-format +msgid "Invalid method declaration, return type required" +msgstr "" + +#: java/parse.y:1084 java/parse.y:1533 java/parse.y:1540 java/parse.y:1549 +#: java/parse.y:1551 java/parse.y:1579 java/parse.y:1688 java/parse.y:1995 +#: java/parse.y:2048 +msgid "')' expected" +msgstr "" + +#: java/parse.y:1100 +msgid "Missing formal parameter term" +msgstr "" + +#: java/parse.y:1115 java/parse.y:1120 +msgid "Missing identifier" +msgstr "Прапушчан ідэнтыфікатар" + +#: java/parse.y:1140 java/parse.y:1149 +msgid "Missing class type term" +msgstr "" + +#: java/parse.y:1305 +msgid "Invalid interface type" +msgstr "" + +#: java/parse.y:1493 java/parse.y:1667 java/parse.y:1669 +msgid "':' expected" +msgstr "" + +#: java/parse.y:1519 java/parse.y:1524 java/parse.y:1529 +msgid "Invalid expression statement" +msgstr "" + +#: java/parse.y:1547 java/parse.y:1575 java/parse.y:1616 java/parse.y:1684 +#: java/parse.y:1752 java/parse.y:1873 java/parse.y:1951 java/parse.y:2042 +#: java/parse.y:2044 java/parse.y:2057 java/parse.y:2300 java/parse.y:2302 +msgid "'(' expected" +msgstr "" + +#: java/parse.y:1618 +msgid "Missing term or ')'" +msgstr "" + +#: java/parse.y:1665 +msgid "Missing or invalid constant expression" +msgstr "" + +#: java/parse.y:1686 +msgid "Missing term and ')' expected" +msgstr "" + +#: java/parse.y:1725 +msgid "Invalid control expression" +msgstr "" + +#: java/parse.y:1727 java/parse.y:1729 +msgid "Invalid update expression" +msgstr "" + +#: java/parse.y:1754 +msgid "Invalid init statement" +msgstr "" + +#: java/parse.y:1954 +msgid "Missing term or ')' expected" +msgstr "" + +#: java/parse.y:1997 +msgid "'class' or 'this' expected" +msgstr "" + +#: java/parse.y:1999 java/parse.y:2001 +msgid "'class' expected" +msgstr "" + +#: java/parse.y:2046 +msgid "')' or term expected" +msgstr "" + +#: java/parse.y:2148 java/parse.y:2177 +msgid "'[' expected" +msgstr "" + +#: java/parse.y:2255 +msgid "Field expected" +msgstr "" + +#: java/parse.y:2314 java/parse.y:2324 java/parse.y:2334 +msgid "Missing term and ']' expected" +msgstr "" + +#: java/parse.y:2439 +msgid "']' expected, invalid type expression" +msgstr "" + +#: java/parse.y:2442 +msgid "Invalid type expression" +msgstr "" + +#: java/parse.y:2554 +msgid "Invalid reference type" +msgstr "" + +#: java/parse.y:3025 +msgid "Constructor invocation must be first thing in a constructor" +msgstr "" + +#: java/parse.y:3027 +msgid "Only constructors can invoke constructors" msgstr "" #: config/i386/nwld.h:34 @@ -8137,14060 +9141,19857 @@ msgstr "" msgid "Static linking is not supported.\n" msgstr "-pipe не падтрымліваецца" -#: config/arm/arm.h:153 -msgid "-msoft-float and -mhard_float may not be used together" +#: config/mcore/mcore.h:57 +msgid "the m210 does not have little endian support" msgstr "" -#: config/arm/arm.h:155 -msgid "-mbig-endian and -mlittle-endian may not be used together" +#: config/i386/sco5.h:189 +#, fuzzy +msgid "-pg not supported on this platform" +msgstr "атрыбуты секцыі не падтрымліваюцца для гэтай мэты" + +#: config/i386/sco5.h:190 +msgid "-p and -pp specified - pick one" msgstr "" -#: java/jvspec.c:80 gcc.c:790 ada/lang-specs.h:34 -msgid "-pg and -fomit-frame-pointer are incompatible" +#: config/i386/sco5.h:264 +msgid "-G and -static are mutually exclusive" msgstr "" -#: config/rs6000/darwin.h:130 -msgid " conflicting code gen style switches are used" +#: config/darwin.h:239 +msgid "-current_version only allowed with -dynamiclib" msgstr "" -#: treelang/lang-specs.h:53 -msgid "-pg or -p and -fomit-frame-pointer are incompatible" +#: config/darwin.h:241 +msgid "-install_name only allowed with -dynamiclib" msgstr "" -#: config/mcore/mcore.h:57 -msgid "the m210 does not have little endian support" +#: config/darwin.h:246 +msgid "-bundle not allowed with -dynamiclib" msgstr "" -#: config/mips/mips.h:1140 config/arc/arc.h:63 -msgid "may not use both -EB and -EL" +#: config/darwin.h:247 +msgid "-bundle_loader not allowed with -dynamiclib" msgstr "" -#: config/mips/r3900.h:35 -msgid "-mhard-float not supported" -msgstr "-mhard-float не падтрымліваецца" +#: config/darwin.h:248 +msgid "-client_name not allowed with -dynamiclib" +msgstr "" -#: config/mips/r3900.h:37 -msgid "-msingle-float and -msoft-float cannot both be specified" +#: config/darwin.h:253 +msgid "-force_flat_namespace not allowed with -dynamiclib" msgstr "" -#: config/sparc/sol2-bi.h:167 config/sparc/sol2-bi.h:172 -#: config/sparc/sol2-gld-bi.h:17 config/sparc/sol2-gld-bi.h:22 -#, fuzzy -msgid "does not support multilib" -msgstr "%s не падтрымлівае %s" +#: config/darwin.h:255 +msgid "-keep_private_externs not allowed with -dynamiclib" +msgstr "" + +#: config/darwin.h:256 +msgid "-private_bundle not allowed with -dynamiclib" +msgstr "" + +#: config/rs6000/darwin.h:105 +msgid " conflicting code gen style switches are used" +msgstr "" + +#: config/vxworks.h:66 +msgid "-Xbind-now and -Xbind-lazy are incompatible" +msgstr "" + +#: config/arm/arm.h:141 +msgid "-msoft-float and -mhard_float may not be used together" +msgstr "" + +#: config/arm/arm.h:143 +msgid "-mbig-endian and -mlittle-endian may not be used together" +msgstr "" + +#: java/jvspec.c:80 ada/lang-specs.h:34 gcc.c:794 +msgid "-pg and -fomit-frame-pointer are incompatible" +msgstr "" + +#: ada/lang-specs.h:35 +msgid "-c or -S required for Ada" +msgstr "" + +#: config/sparc/linux64.h:206 config/sparc/linux64.h:217 +#: config/sparc/netbsd-elf.h:126 config/sparc/netbsd-elf.h:145 +#: config/sparc/sol2-bi.h:195 config/sparc/sol2-bi.h:205 +msgid "may not use both -m32 and -m64" +msgstr "" + +#: config/sparc/sol2-bi.h:167 config/sparc/sol2-bi.h:172 +#: config/sparc/sol2-gld-bi.h:17 config/sparc/sol2-gld-bi.h:22 +#, fuzzy +msgid "does not support multilib" +msgstr "%s не падтрымлівае %s" + +#: config/s390/tpf.h:125 +#, fuzzy +msgid "static is not supported on TPF-OS" +msgstr "-pipe не падтрымліваецца" + +#: config/mips/mips.h:849 config/arc/arc.h:62 +msgid "may not use both -EB and -EL" +msgstr "" + +#: config/lynx.h:71 +msgid "cannot use mthreads and mlegacy-threads together" +msgstr "" + +#: config/lynx.h:96 +msgid "cannot use mshared and static together" +msgstr "" + +#: config/mips/r3900.h:35 +msgid "-mhard-float not supported" +msgstr "-mhard-float не падтрымліваецца" + +#: config/mips/r3900.h:37 +msgid "-msingle-float and -msoft-float cannot both be specified" +msgstr "" + +#: java/lang-specs.h:34 +msgid "-fjni and -femit-class-files are incompatible" +msgstr "" + +#: java/lang-specs.h:35 +msgid "-fjni and -femit-class-file are incompatible" +msgstr "" + +#: java/lang-specs.h:36 java/lang-specs.h:37 +msgid "-femit-class-file should used along with -fsyntax-only" +msgstr "" + +#: config/sh/sh.h:460 +#, fuzzy +msgid "SH2a does not support little-endian" +msgstr "%s не падтрымлівае %s" + +#: config/i386/mingw32.h:58 config/i386/cygwin.h:70 +msgid "shared and mdll are not compatible" +msgstr "" + +#: gcc.c:767 +msgid "GCC does not support -C or -CC without -E" +msgstr "" + +#: gcc.c:961 +msgid "-E or -x required when input is from standard input" +msgstr "" + +#: config/vax/netbsd-elf.h:42 +msgid "the -shared option is not currently supported for VAX ELF" +msgstr "" + +#: config/vax/vax.h:50 config/vax/vax.h:51 +msgid "profiling not supported with -mg\n" +msgstr "" + +#: config/i386/cygwin.h:29 +msgid "mno-cygwin and mno-win32 are not compatible" +msgstr "" + +#: java/lang.opt:66 +msgid "Warn if a deprecated compiler feature, class, method, or field is used" +msgstr "" + +#: java/lang.opt:70 +msgid "Warn if deprecated empty statements are found" +msgstr "" + +#: java/lang.opt:74 +msgid "Warn if .class files are out of date" +msgstr "" + +#: java/lang.opt:78 +msgid "Warn if modifiers are specified when not necessary" +msgstr "" + +#: java/lang.opt:82 +msgid "Deprecated; use --classpath instead" +msgstr "" + +#: java/lang.opt:86 +msgid "Permit the use of the assert keyword" +msgstr "" + +#: java/lang.opt:108 +msgid "Replace system path" +msgstr "" + +#: java/lang.opt:112 +#, fuzzy +msgid "Generate checks for references to NULL" +msgstr "Стварыць код для DLL" + +#: java/lang.opt:116 +msgid "Set class path" +msgstr "" + +#: java/lang.opt:123 +msgid "Output a class file" +msgstr "" + +#: java/lang.opt:127 +msgid "Alias for -femit-class-file" +msgstr "" + +#: java/lang.opt:131 +msgid "Choose input encoding (defaults from your locale)" +msgstr "" + +#: java/lang.opt:135 +msgid "Set the extension directory path" +msgstr "" + +#: java/lang.opt:139 +msgid "Input file is a file with a list of filenames to compile" +msgstr "" + +#: java/lang.opt:143 +msgid "Always check for non gcj generated classes archives" +msgstr "" + +#: java/lang.opt:147 +msgid "Assume the runtime uses a hash table to map an object to its synchronization structure" +msgstr "" + +#: java/lang.opt:151 +msgid "Use offset tables for virtual method calls" +msgstr "" + +#: java/lang.opt:158 +msgid "Assume native functions are implemented using JNI" +msgstr "" + +#: java/lang.opt:162 +msgid "Enable optimization of static class initialization code" +msgstr "" + +#: java/lang.opt:169 +msgid "Enable assignability checks for stores into object arrays" +msgstr "" + +#: java/lang.opt:173 +#, fuzzy +msgid "Generate code for the Boehm GC" +msgstr "Генерыраваць код для Intel as" + +#: java/lang.opt:177 +msgid "Call a library routine to do integer divisions" +msgstr "" + +#: java/lang.opt:181 +msgid "Generated should be loaded by bootstrap loader" +msgstr "" + +#: ada/lang.opt:74 +msgid "Specify options to GNAT" +msgstr "" + +#: fortran/lang.opt:30 +msgid "Add a directory for INCLUDE and MODULE searching" +msgstr "" + +#: fortran/lang.opt:34 +msgid "Put MODULE files in 'directory'" +msgstr "" + +#: fortran/lang.opt:42 +msgid "Warn about possible aliasing of dummy arguments" +msgstr "" + +#: fortran/lang.opt:46 +msgid "Warn about implicit conversion" +msgstr "" + +#: fortran/lang.opt:50 +msgid "Warn about calls with implicit interface" +msgstr "" + +#: fortran/lang.opt:54 +msgid "Warn about truncated source lines" +msgstr "" + +#: fortran/lang.opt:58 +msgid "Warn about usage of non-standard intrinsics" +msgstr "" + +#: fortran/lang.opt:62 +msgid "Warn about \"suspicious\" constructs" +msgstr "" + +#: fortran/lang.opt:66 +msgid "Warn about underflow of numerical constant expressions" +msgstr "" + +#: fortran/lang.opt:70 common.opt:162 +msgid "Warn when a label is unused" +msgstr "" + +#: fortran/lang.opt:74 +msgid "Do not treat local variables and COMMON blocks as if they were named in SAVE statements" +msgstr "" + +#: fortran/lang.opt:78 +msgid "Specify that backslash in string introduces an escape character" +msgstr "" + +#: fortran/lang.opt:82 +msgid "Set the default double precision kind to an 8 byte wide type" +msgstr "" + +#: fortran/lang.opt:86 +msgid "Set the default integer kind to an 8 byte wide type" +msgstr "" + +#: fortran/lang.opt:90 +msgid "Set the default real kind to an 8 byte wide type" +msgstr "" + +#: fortran/lang.opt:94 +msgid "Ignore 'D' in column one in fixed form" +msgstr "" + +#: fortran/lang.opt:98 +msgid "Treat lines with 'D' in column one as comments" +msgstr "" + +#: fortran/lang.opt:102 +msgid "Allow dollar signs in entity names" +msgstr "" + +#: fortran/lang.opt:106 +msgid "Display the code tree after parsing" +msgstr "" + +#: fortran/lang.opt:110 +msgid "Use f2c calling convention" +msgstr "" + +#: fortran/lang.opt:114 +msgid "Assume that the source file is fixed form" +msgstr "" + +#: fortran/lang.opt:118 +msgid "Assume that the source file is free form" +msgstr "" + +#: fortran/lang.opt:122 +msgid "Append underscores to externally visible names" +msgstr "" + +#: fortran/lang.opt:126 +msgid "Use the Cray Pointer extension" +msgstr "" + +#: fortran/lang.opt:130 +msgid "Append a second underscore if the name already contains an underscore" +msgstr "" + +#: fortran/lang.opt:134 +msgid "Specify that no implicit typing is allowed, unless overridden by explicit IMPLICIT statements" +msgstr "" + +#: fortran/lang.opt:138 +msgid "Allow arbitrary character line width in fixed mode" +msgstr "" + +#: fortran/lang.opt:142 +msgid "Use n as character line width in fixed mode" +msgstr "" + +#: fortran/lang.opt:146 +#, fuzzy +msgid "Maximum identifier length" +msgstr "Прапушчан ідэнтыфікатар" + +#: fortran/lang.opt:150 +msgid "Size in bytes of the largest array that will be put on the stack" +msgstr "" + +#: fortran/lang.opt:154 +msgid "Set default accessibility of module entities to PRIVATE" +msgstr "" + +#: fortran/lang.opt:158 +msgid "Don't generate code, just do syntax and semantics checking" +msgstr "" + +#: fortran/lang.opt:162 +msgid "Try to layout derived types as compact as possible" +msgstr "" + +#: fortran/lang.opt:166 +msgid "Copy array sections into a contiguous block on procedure entry" +msgstr "" + +#: fortran/lang.opt:170 +msgid "Set the kind for a real with the 'q' exponent to 'n'" +msgstr "" + +#: fortran/lang.opt:174 +msgid "Stop on following floating point exceptions" +msgstr "" + +#: fortran/lang.opt:178 +msgid "Conform to the ISO Fortran 95 standard" +msgstr "" + +#: fortran/lang.opt:182 +msgid "Conform to the ISO Fortran 2003 standard" +msgstr "" + +#: fortran/lang.opt:186 +msgid "Conform nothing in particular" +msgstr "" + +#: fortran/lang.opt:190 +msgid "Accept extensions to support legacy code" +msgstr "" + +#: fortran/lang.opt:194 c.opt:661 +msgid "Use the narrowest integer type possible for enumeration types" +msgstr "" + +#: treelang/lang.opt:30 +msgid "Trace lexical analysis" +msgstr "" + +#: treelang/lang.opt:34 +#, fuzzy +msgid "Trace the parsing process" +msgstr "Мэта - AM33 працэсар" + +#: config/alpha/alpha.opt:24 config/i386/i386.opt:186 +msgid "Do not use hardware fp" +msgstr "Не выкарыстоўваць апаратную плаваючую кропку" + +#: config/alpha/alpha.opt:28 +msgid "Use fp registers" +msgstr "" + +#: config/alpha/alpha.opt:32 +msgid "Assume GAS" +msgstr "" + +#: config/alpha/alpha.opt:36 +msgid "Do not assume GAS" +msgstr "" + +#: config/alpha/alpha.opt:40 +msgid "Request IEEE-conformant math library routines (OSF/1)" +msgstr "" + +#: config/alpha/alpha.opt:44 +msgid "Emit IEEE-conformant code, without inexact exceptions" +msgstr "" + +#: config/alpha/alpha.opt:51 +msgid "Do not emit complex integer constants to read-only memory" +msgstr "" + +#: config/alpha/alpha.opt:55 +msgid "Use VAX fp" +msgstr "" + +#: config/alpha/alpha.opt:59 +msgid "Do not use VAX fp" +msgstr "" + +#: config/alpha/alpha.opt:63 +msgid "Emit code for the byte/word ISA extension" +msgstr "" + +#: config/alpha/alpha.opt:67 +msgid "Emit code for the motion video ISA extension" +msgstr "" + +#: config/alpha/alpha.opt:71 +msgid "Emit code for the fp move and sqrt ISA extension" +msgstr "" + +#: config/alpha/alpha.opt:75 +msgid "Emit code for the counting ISA extension" +msgstr "" + +#: config/alpha/alpha.opt:79 +msgid "Emit code using explicit relocation directives" +msgstr "" + +#: config/alpha/alpha.opt:83 +msgid "Emit 16-bit relocations to the small data areas" +msgstr "" + +#: config/alpha/alpha.opt:87 +msgid "Emit 32-bit relocations to the small data areas" +msgstr "" + +#: config/alpha/alpha.opt:91 +msgid "Emit direct branches to local functions" +msgstr "" + +#: config/alpha/alpha.opt:95 +msgid "Emit indirect branches to local functions" +msgstr "" + +#: config/alpha/alpha.opt:99 +msgid "Emit rdval instead of rduniq for thread pointer" +msgstr "" + +#: config/alpha/alpha.opt:103 config/sparc/long-double-switch.opt:24 +msgid "Use 128-bit long double" +msgstr "" + +#: config/alpha/alpha.opt:107 config/sparc/long-double-switch.opt:28 +#, fuzzy +msgid "Use 64-bit long double" +msgstr "Выкарыстоўваць 64-х бітны float" + +#: config/alpha/alpha.opt:111 +msgid "Use features of and schedule given CPU" +msgstr "" + +#: config/alpha/alpha.opt:115 +msgid "Schedule given CPU" +msgstr "" + +#: config/alpha/alpha.opt:119 +msgid "Control the generated fp rounding mode" +msgstr "" + +#: config/alpha/alpha.opt:123 +msgid "Control the IEEE trap mode" +msgstr "" + +#: config/alpha/alpha.opt:127 +msgid "Control the precision given to fp exceptions" +msgstr "" + +#: config/alpha/alpha.opt:131 +msgid "Tune expected memory latency" +msgstr "" + +#: config/alpha/alpha.opt:135 config/ia64/ia64.opt:93 +#: config/rs6000/sysv4.opt:33 +msgid "Specify bit size of immediate TLS offsets" +msgstr "" + +#: config/frv/frv.opt:24 +msgid "Use 4 media accumulators" +msgstr "" + +#: config/frv/frv.opt:28 +msgid "Use 8 media accumulators" +msgstr "" + +#: config/frv/frv.opt:32 +#, fuzzy +msgid "Enable label alignment optimizations" +msgstr "Уключаць SSA аптымізацыю" + +#: config/frv/frv.opt:36 +msgid "Dynamically allocate cc registers" +msgstr "" + +#: config/frv/frv.opt:43 +msgid "Set the cost of branches" +msgstr "" + +#: config/frv/frv.opt:47 +msgid "Enable conditional execution other than moves/scc" +msgstr "" + +#: config/frv/frv.opt:51 +msgid "Change the maximum length of conditionally-executed sequences" +msgstr "" + +#: config/frv/frv.opt:55 +msgid "Change the number of temporary registers that are available to conditionally-executed sequences" +msgstr "" + +#: config/frv/frv.opt:59 +msgid "Enable conditional moves" +msgstr "" + +#: config/frv/frv.opt:63 +msgid "Set the target CPU type" +msgstr "" + +#: config/frv/frv.opt:85 +#, fuzzy +msgid "Use fp double instructions" +msgstr "Не выкарыстоўваць інструкцыі AltiVec" + +#: config/frv/frv.opt:89 +msgid "Change the ABI to allow double word insns" +msgstr "" + +#: config/frv/frv.opt:93 +msgid "Enable Function Descriptor PIC mode" +msgstr "" + +#: config/frv/frv.opt:97 +msgid "Just use icc0/fcc0" +msgstr "" + +#: config/frv/frv.opt:101 +msgid "Only use 32 FPRs" +msgstr "" + +#: config/frv/frv.opt:105 +msgid "Use 64 FPRs" +msgstr "" + +#: config/frv/frv.opt:109 +msgid "Only use 32 GPRs" +msgstr "" + +#: config/frv/frv.opt:113 +msgid "Use 64 GPRs" +msgstr "" + +#: config/frv/frv.opt:117 +msgid "Enable use of GPREL for read-only data in FDPIC" +msgstr "" + +#: config/frv/frv.opt:121 config/rs6000/rs6000.opt:93 +#: config/pdp11/pdp11.opt:72 +msgid "Use hardware floating point" +msgstr "Выкарыстоўваць апаратную \"плаваючую кропку\"" + +#: config/frv/frv.opt:125 +msgid "Enable inlining of PLT in function calls" +msgstr "" + +#: config/frv/frv.opt:129 +msgid "Enable PIC support for building libraries" +msgstr "" + +#: config/frv/frv.opt:133 +msgid "Follow the EABI linkage requirements" +msgstr "" + +#: config/frv/frv.opt:137 +msgid "Disallow direct calls to global functions" +msgstr "" + +#: config/frv/frv.opt:141 +#, fuzzy +msgid "Use media instructions" +msgstr "Не генерыраваць сімвальныя інструкцыі" + +#: config/frv/frv.opt:145 +msgid "Use multiply add/subtract instructions" +msgstr "" + +#: config/frv/frv.opt:149 +msgid "Enable optimizing &&/|| in conditional execution" +msgstr "" + +#: config/frv/frv.opt:153 +msgid "Enable nested conditional execution optimizations" +msgstr "" + +#: config/frv/frv.opt:158 +msgid "Do not mark ABI switches in e_flags" +msgstr "" + +#: config/frv/frv.opt:162 +msgid "Remove redundant membars" +msgstr "" + +#: config/frv/frv.opt:166 +msgid "Pack VLIW instructions" +msgstr "" + +#: config/frv/frv.opt:170 +msgid "Enable setting GPRs to the result of comparisons" +msgstr "" + +#: config/frv/frv.opt:174 +msgid "Change the amount of scheduler lookahead" +msgstr "" + +#: config/frv/frv.opt:178 config/pa/pa.opt:105 +msgid "Use software floating point" +msgstr "" + +#: config/frv/frv.opt:182 +msgid "Assume a large TLS segment" +msgstr "" + +#: config/frv/frv.opt:186 +msgid "Do not assume a large TLS segment" +msgstr "" + +#: config/frv/frv.opt:191 +msgid "Cause gas to print tomcat statistics" +msgstr "" + +#: config/frv/frv.opt:196 +msgid "Link with the library-pic libraries" +msgstr "" + +#: config/frv/frv.opt:200 +msgid "Allow branches to be packed with other instructions" +msgstr "" + +#: config/mn10300/mn10300.opt:24 +msgid "Target the AM33 processor" +msgstr "Мэта - AM33 працэсар" + +#: config/mn10300/mn10300.opt:28 +#, fuzzy +msgid "Target the AM33/2.0 processor" +msgstr "Мэта - AM33 працэсар" + +#: config/mn10300/mn10300.opt:32 +msgid "Work around hardware multiply bug" +msgstr "" + +#: config/mn10300/mn10300.opt:37 +msgid "Enable linker relaxations" +msgstr "" + +#: config/mn10300/mn10300.opt:41 +msgid "Return pointers in both a0 and d0" +msgstr "" + +#: config/s390/tpf.opt:24 +msgid "Enable TPF-OS tracing code" +msgstr "" + +#: config/s390/tpf.opt:28 +msgid "Specify main object for TPF-OS" +msgstr "" + +#: config/s390/s390.opt:24 +msgid "31 bit ABI" +msgstr "" + +#: config/s390/s390.opt:28 +msgid "64 bit ABI" +msgstr "" + +#: config/s390/s390.opt:32 config/i386/i386.opt:80 +msgid "Generate code for given CPU" +msgstr "Генерыраваць код для дадзенага ЦП" + +#: config/s390/s390.opt:36 +msgid "Maintain backchain pointer" +msgstr "" + +#: config/s390/s390.opt:40 +msgid "Additional debug prints" +msgstr "" + +#: config/s390/s390.opt:44 +msgid "ESA/390 architecture" +msgstr "" + +#: config/s390/s390.opt:48 +#, fuzzy +msgid "Enable fused multiply/add instructions" +msgstr "Не генерыраваць сімвальныя інструкцыі" + +#: config/s390/s390.opt:52 config/i386/i386.opt:48 config/i386/i386.opt:118 +msgid "Use hardware fp" +msgstr "Выкарыстоўваць апаратную плаваючую кропку" + +#: config/s390/s390.opt:56 +msgid "Use packed stack layout" +msgstr "" + +#: config/s390/s390.opt:60 +msgid "Use bras for executable < 64k" +msgstr "" + +#: config/s390/s390.opt:64 +msgid "Don't use hardware fp" +msgstr "Не выкарыстоўваць апаратную fp" + +#: config/s390/s390.opt:68 +msgid "Set the max. number of bytes which has to be left to stack size before a trap instruction is triggered" +msgstr "" + +#: config/s390/s390.opt:72 +msgid "Emit extra code in the function prologue in order to trap if the stack size exceeds the given limit" +msgstr "" + +#: config/s390/s390.opt:76 config/ia64/ia64.opt:97 config/sparc/sparc.opt:96 +#: config/i386/i386.opt:222 config/rs6000/rs6000.opt:203 +msgid "Schedule code for given CPU" +msgstr "" + +#: config/s390/s390.opt:80 +msgid "mvcle use" +msgstr "" + +#: config/s390/s390.opt:84 +msgid "Warn if a function uses alloca or creates an array with dynamic size" +msgstr "" + +#: config/s390/s390.opt:88 +msgid "Warn if a single function's framesize exceeds the given framesize" +msgstr "" + +#: config/s390/s390.opt:92 +msgid "z/Architecture" +msgstr "" + +#: config/ia64/ilp32.opt:3 +#, fuzzy +msgid "Generate ILP32 code" +msgstr "Стварыць ELF-вывад" + +#: config/ia64/ilp32.opt:7 +#, fuzzy +msgid "Generate LP64 code" +msgstr "Стварыць ELF-вывад" + +#: config/ia64/ia64.opt:3 +msgid "Generate big endian code" +msgstr "" + +#: config/ia64/ia64.opt:7 +msgid "Generate little endian code" +msgstr "" + +#: config/ia64/ia64.opt:11 +msgid "Generate code for GNU as" +msgstr "Генерыраваць код для GNU as" + +#: config/ia64/ia64.opt:15 +msgid "Generate code for GNU ld" +msgstr "Генерыраваць код для GNU ld" + +#: config/ia64/ia64.opt:19 +msgid "Emit stop bits before and after volatile extended asms" +msgstr "" + +#: config/ia64/ia64.opt:23 +msgid "Use in/loc/out register names" +msgstr "" + +#: config/ia64/ia64.opt:30 +msgid "Enable use of sdata/scommon/sbss" +msgstr "" + +#: config/ia64/ia64.opt:34 +msgid "Generate code without GP reg" +msgstr "Генерыраваць код без GP reg" + +#: config/ia64/ia64.opt:38 +msgid "gp is constant (but save/restore gp on indirect calls)" +msgstr "" + +#: config/ia64/ia64.opt:42 +msgid "Generate self-relocatable code" +msgstr "" + +#: config/ia64/ia64.opt:46 +msgid "Generate inline floating point division, optimize for latency" +msgstr "" + +#: config/ia64/ia64.opt:50 +msgid "Generate inline floating point division, optimize for throughput" +msgstr "" + +#: config/ia64/ia64.opt:57 +msgid "Generate inline integer division, optimize for latency" +msgstr "" + +#: config/ia64/ia64.opt:61 +msgid "Generate inline integer division, optimize for throughput" +msgstr "" + +#: config/ia64/ia64.opt:65 +msgid "Do not inline integer division" +msgstr "" + +#: config/ia64/ia64.opt:69 +msgid "Generate inline square root, optimize for latency" +msgstr "" + +#: config/ia64/ia64.opt:73 +msgid "Generate inline square root, optimize for throughput" +msgstr "" + +#: config/ia64/ia64.opt:77 +msgid "Do not inline square root" +msgstr "" + +#: config/ia64/ia64.opt:81 +msgid "Enable Dwarf 2 line debug info via GNU as" +msgstr "" + +#: config/ia64/ia64.opt:85 +msgid "Enable earlier placing stop bits for better scheduling" +msgstr "" + +#: config/ia64/ia64.opt:89 config/pa/pa.opt:52 +msgid "Specify range of registers to make fixed" +msgstr "" + +#: config/m32c/m32c.opt:25 config/ms1/ms1.opt:32 +msgid "Use simulator runtime" +msgstr "" + +#: config/m32c/m32c.opt:29 +msgid "Compile code for R8C variants" +msgstr "" + +#: config/m32c/m32c.opt:33 +msgid "Compile code for M16C variants" +msgstr "" + +#: config/m32c/m32c.opt:37 +msgid "Compile code for M32CM variants" +msgstr "" + +#: config/m32c/m32c.opt:41 +msgid "Compile code for M32C variants" +msgstr "" + +#: config/m32c/m32c.opt:45 +msgid "Number of memreg bytes (default: 16, range: 0..16)" +msgstr "" + +#: config/sparc/little-endian.opt:24 +#, fuzzy +msgid "Generate code for little-endian" +msgstr "Генерыраваць код для Intel ld" + +#: config/sparc/little-endian.opt:28 +#, fuzzy +msgid "Generate code for big-endian" +msgstr "Генерыраваць код для дадзенага ЦП" + +#: config/sparc/sparc.opt:24 config/sparc/sparc.opt:28 +#, fuzzy +msgid "Use hardware FP" +msgstr "Выкарыстоўваць апаратную плаваючую кропку" + +#: config/sparc/sparc.opt:32 +#, fuzzy +msgid "Do not use hardware FP" +msgstr "Не выкарыстоўваць апаратную плаваючую кропку" + +#: config/sparc/sparc.opt:36 +msgid "Assume possible double misalignment" +msgstr "" + +#: config/sparc/sparc.opt:40 +msgid "Pass -assert pure-text to linker" +msgstr "" + +#: config/sparc/sparc.opt:44 +msgid "Use ABI reserved registers" +msgstr "" + +#: config/sparc/sparc.opt:48 +#, fuzzy +msgid "Use hardware quad FP instructions" +msgstr "Выкарыстоўваць апаратную \"плаваючую кропку\"" + +#: config/sparc/sparc.opt:52 +msgid "Do not use hardware quad fp instructions" +msgstr "" + +#: config/sparc/sparc.opt:56 +msgid "Compile for V8+ ABI" +msgstr "" + +#: config/sparc/sparc.opt:60 +msgid "Use UltraSPARC Visual Instruction Set extensions" +msgstr "" + +#: config/sparc/sparc.opt:64 +msgid "Pointers are 64-bit" +msgstr "" + +#: config/sparc/sparc.opt:68 +msgid "Pointers are 32-bit" +msgstr "" + +#: config/sparc/sparc.opt:72 +msgid "Use 64-bit ABI" +msgstr "" + +#: config/sparc/sparc.opt:76 +msgid "Use 32-bit ABI" +msgstr "" + +#: config/sparc/sparc.opt:80 +msgid "Use stack bias" +msgstr "" + +#: config/sparc/sparc.opt:84 +msgid "Use structs on stronger alignment for double-word copies" +msgstr "" + +#: config/sparc/sparc.opt:88 +msgid "Optimize tail call instructions in assembler and linker" +msgstr "" + +#: config/sparc/sparc.opt:92 config/rs6000/rs6000.opt:199 +msgid "Use features of and schedule code for given CPU" +msgstr "" + +#: config/sparc/sparc.opt:100 +msgid "Use given SPARC-V9 code model" +msgstr "" + +#: config/m32r/m32r.opt:24 +msgid "Compile for the m32rx" +msgstr "" + +#: config/m32r/m32r.opt:28 +msgid "Compile for the m32r2" +msgstr "" + +#: config/m32r/m32r.opt:32 +msgid "Compile for the m32r" +msgstr "" + +#: config/m32r/m32r.opt:36 +msgid "Align all loops to 32 byte boundary" +msgstr "" + +#: config/m32r/m32r.opt:40 +msgid "Prefer branches over conditional execution" +msgstr "" + +#: config/m32r/m32r.opt:44 +msgid "Give branches their default cost" +msgstr "" + +#: config/m32r/m32r.opt:48 +msgid "Display compile time statistics" +msgstr "" + +#: config/m32r/m32r.opt:52 +msgid "Specify cache flush function" +msgstr "" + +#: config/m32r/m32r.opt:56 +msgid "Specify cache flush trap number" +msgstr "" + +#: config/m32r/m32r.opt:60 +msgid "Only issue one instruction per cycle" +msgstr "" + +#: config/m32r/m32r.opt:64 +msgid "Allow two instructions to be issued per cycle" +msgstr "" + +#: config/m32r/m32r.opt:68 +msgid "Code size: small, medium or large" +msgstr "" + +#: config/m32r/m32r.opt:72 +msgid "Don't call any cache flush functions" +msgstr "" + +#: config/m32r/m32r.opt:76 +msgid "Don't call any cache flush trap" +msgstr "" + +#: config/m32r/m32r.opt:83 +msgid "Small data area: none, sdata, use" +msgstr "" + +#: config/m68k/m68k.opt:24 +msgid "Generate code for a 520X" +msgstr "Ствараць код для 520X" + +#: config/m68k/m68k.opt:28 +#, fuzzy +msgid "Generate code for a 5206e" +msgstr "Ствараць код для 520X" + +#: config/m68k/m68k.opt:32 +#, fuzzy +msgid "Generate code for a 528x" +msgstr "Ствараць код для 520X" + +#: config/m68k/m68k.opt:36 +#, fuzzy +msgid "Generate code for a 5307" +msgstr "Ствараць код для 520X" + +#: config/m68k/m68k.opt:40 +#, fuzzy +msgid "Generate code for a 5407" +msgstr "Ствараць код для 520X" + +#: config/m68k/m68k.opt:44 config/m68k/m68k.opt:97 +msgid "Generate code for a 68000" +msgstr "Ствараць код для 68000" + +#: config/m68k/m68k.opt:48 config/m68k/m68k.opt:101 +msgid "Generate code for a 68020" +msgstr "Ствараць код для 68020" + +#: config/m68k/m68k.opt:52 +msgid "Generate code for a 68040, without any new instructions" +msgstr "" + +#: config/m68k/m68k.opt:56 +msgid "Generate code for a 68060, without any new instructions" +msgstr "" + +#: config/m68k/m68k.opt:60 +msgid "Generate code for a 68030" +msgstr "Ствараць код для 68030" + +#: config/m68k/m68k.opt:64 +msgid "Generate code for a 68040" +msgstr "Ствараць код для 68040" + +#: config/m68k/m68k.opt:68 +msgid "Generate code for a 68060" +msgstr "Ствараць код для 68060" + +#: config/m68k/m68k.opt:72 +msgid "Generate code for a 68302" +msgstr "Ствараць код для 68302" + +#: config/m68k/m68k.opt:76 +msgid "Generate code for a 68332" +msgstr "Ствараць код для 68332" + +#: config/m68k/m68k.opt:81 +msgid "Generate code for a 68851" +msgstr "Ствараць код для 68851" + +#: config/m68k/m68k.opt:85 +msgid "Generate code that uses 68881 floating-point instructions" +msgstr "" + +#: config/m68k/m68k.opt:89 +msgid "Align variables on a 32-bit boundary" +msgstr "" + +#: config/m68k/m68k.opt:93 +msgid "Use the bit-field instructions" +msgstr "" + +#: config/m68k/m68k.opt:105 +msgid "Generate code for a cpu32" +msgstr "Ствараць код для цп32" + +#: config/m68k/m68k.opt:109 +msgid "Enable ID based shared library" +msgstr "" + +#: config/m68k/m68k.opt:113 +#, fuzzy +msgid "Do not use the bit-field instructions" +msgstr "Не генерыраваць сімвальныя інструкцыі" + +#: config/m68k/m68k.opt:117 +msgid "Use normal calling convention" +msgstr "" + +#: config/m68k/m68k.opt:121 +msgid "Consider type 'int' to be 32 bits wide" +msgstr "" + +#: config/m68k/m68k.opt:125 +msgid "Generate pc-relative code" +msgstr "" + +#: config/m68k/m68k.opt:129 +msgid "Use different calling convention using 'rtd'" +msgstr "" + +#: config/m68k/m68k.opt:133 +msgid "Enable separate data segment" +msgstr "" + +#: config/m68k/m68k.opt:137 config/bfin/bfin.opt:45 +msgid "ID of shared library to build" +msgstr "" + +#: config/m68k/m68k.opt:141 +msgid "Consider type 'int' to be 16 bits wide" +msgstr "" + +#: config/m68k/m68k.opt:145 +msgid "Generate code with library calls for floating point" +msgstr "" + +#: config/m68k/m68k.opt:149 +msgid "Do not use unaligned memory references" +msgstr "" + +#: config/m68k/ieee.opt:25 config/i386/i386.opt:122 +msgid "Use IEEE math for fp comparisons" +msgstr "" + +#: config/i386/djgpp.opt:26 +msgid "Ignored (obsolete)" +msgstr "" + +#: config/i386/i386.opt:24 +msgid "sizeof(long double) is 16" +msgstr "" + +#: config/i386/i386.opt:28 +msgid "Generate 32bit i386 code" +msgstr "" + +#: config/i386/i386.opt:36 +msgid "Support 3DNow! built-in functions" +msgstr "" + +#: config/i386/i386.opt:44 +msgid "Generate 64bit x86-64 code" +msgstr "" + +#: config/i386/i386.opt:52 +msgid "sizeof(long double) is 12" +msgstr "" + +#: config/i386/i386.opt:56 +msgid "Reserve space for outgoing arguments in the function prologue" +msgstr "" + +#: config/i386/i386.opt:60 +msgid "Align some doubles on dword boundary" +msgstr "" + +#: config/i386/i386.opt:64 +msgid "Function starts are aligned to this power of 2" +msgstr "" + +#: config/i386/i386.opt:68 +msgid "Jump targets are aligned to this power of 2" +msgstr "" + +#: config/i386/i386.opt:72 +msgid "Loop code aligned to this power of 2" +msgstr "" + +#: config/i386/i386.opt:76 +msgid "Align destination of the string operations" +msgstr "" + +#: config/i386/i386.opt:84 +msgid "Use given assembler dialect" +msgstr "Выкарыстоўвываць зададзены дыялект асэмблера" + +#: config/i386/i386.opt:88 +msgid "Branches are this expensive (1-5, arbitrary units)" +msgstr "" + +#: config/i386/i386.opt:92 +msgid "Data greater than given threshold will go into .ldata section in x86-64 medium model" +msgstr "" + +#: config/i386/i386.opt:96 +msgid "Use given x86-64 code model" +msgstr "" + +#: config/i386/i386.opt:106 +msgid "Generate sin, cos, sqrt for FPU" +msgstr "" + +#: config/i386/i386.opt:110 +msgid "Return values of functions in FPU registers" +msgstr "" + +#: config/i386/i386.opt:114 +msgid "Generate floating point mathematics using given instruction set" +msgstr "" + +#: config/i386/i386.opt:126 +msgid "Inline all known string operations" +msgstr "" + +#: config/i386/i386.opt:134 +msgid "Support MMX built-in functions" +msgstr "" + +#: config/i386/i386.opt:138 +msgid "Use native (MS) bitfield layout" +msgstr "" + +#: config/i386/i386.opt:154 +msgid "Omit the frame pointer in leaf functions" +msgstr "" + +#: config/i386/i386.opt:166 +msgid "Attempt to keep stack aligned to this power of 2" +msgstr "" + +#: config/i386/i386.opt:170 +msgid "Use push instructions to save outgoing arguments" +msgstr "" + +#: config/i386/i386.opt:174 +msgid "Use red-zone in the x86-64 code" +msgstr "" + +#: config/i386/i386.opt:178 +msgid "Number of registers used to pass integer arguments" +msgstr "" + +#: config/i386/i386.opt:182 +msgid "Alternate calling convention" +msgstr "" + +#: config/i386/i386.opt:190 +msgid "Support MMX and SSE built-in functions and code generation" +msgstr "" + +#: config/i386/i386.opt:194 +msgid "Support MMX, SSE and SSE2 built-in functions and code generation" +msgstr "" + +#: config/i386/i386.opt:198 +msgid "Support MMX, SSE, SSE2 and SSE3 built-in functions and code generation" +msgstr "" + +#: config/i386/i386.opt:202 +msgid "Use SSE register passing conventions for SF and DF mode" +msgstr "" + +#: config/i386/i386.opt:206 +msgid "Uninitialized locals in .bss" +msgstr "" + +#: config/i386/i386.opt:210 +msgid "Enable stack probing" +msgstr "" + +#: config/i386/i386.opt:214 +#, fuzzy +msgid "Use given thread-local storage dialect" +msgstr "Выкарыстоўвываць зададзены дыялект асэмблера" + +#: config/i386/i386.opt:218 +#, c-format +msgid "Use direct references against %gs when accessing tls data" +msgstr "" + +#: config/i386/cygming.opt:24 +msgid "Create console application" +msgstr "Стварыць кансольны прыдатак" + +#: config/i386/cygming.opt:28 +msgid "Use the Cygwin interface" +msgstr "" + +#: config/i386/cygming.opt:32 +msgid "Generate code for a DLL" +msgstr "Стварыць код для DLL" + +#: config/i386/cygming.opt:36 +msgid "Ignore dllimport for functions" +msgstr "" + +#: config/i386/cygming.opt:40 +msgid "Use Mingw-specific thread support" +msgstr "" + +#: config/i386/cygming.opt:44 +msgid "Set Windows defines" +msgstr "" + +#: config/i386/cygming.opt:48 +msgid "Create GUI application" +msgstr "Стварыць GUI прыдатак" + +#: config/i386/sco5.opt:25 +msgid "Generate ELF output" +msgstr "Стварыць ELF-вывад" + +#: config/rs6000/aix41.opt:25 config/rs6000/aix64.opt:33 +msgid "Support message passing with the Parallel Environment" +msgstr "" + +#: config/rs6000/aix.opt:25 config/rs6000/rs6000.opt:128 +msgid "Conform more closely to IBM XLC semantics" +msgstr "" + +#: config/rs6000/darwin.opt:25 config/rs6000/sysv4.opt:133 +#, fuzzy +msgid "Generate 64-bit code" +msgstr "Стварыць код для DLL" + +#: config/rs6000/darwin.opt:29 config/rs6000/sysv4.opt:137 +#, fuzzy +msgid "Generate 32-bit code" +msgstr "Стварыць код для DLL" + +#: config/rs6000/darwin.opt:33 +msgid "Generate code suitable for executables (NOT shared libs)" +msgstr "" + +#: config/rs6000/rs6000.opt:25 +msgid "Use POWER instruction set" +msgstr "" + +#: config/rs6000/rs6000.opt:29 +msgid "Do not use POWER instruction set" +msgstr "" + +#: config/rs6000/rs6000.opt:33 +msgid "Use POWER2 instruction set" +msgstr "" + +#: config/rs6000/rs6000.opt:37 +msgid "Use PowerPC instruction set" +msgstr "" + +#: config/rs6000/rs6000.opt:41 +msgid "Do not use PowerPC instruction set" +msgstr "" + +#: config/rs6000/rs6000.opt:45 +msgid "Use PowerPC-64 instruction set" +msgstr "" + +#: config/rs6000/rs6000.opt:49 +msgid "Use PowerPC General Purpose group optional instructions" +msgstr "" + +#: config/rs6000/rs6000.opt:53 +msgid "Use PowerPC Graphics group optional instructions" +msgstr "" + +#: config/rs6000/rs6000.opt:57 +msgid "Use PowerPC V2.01 single field mfcr instruction" +msgstr "" + +#: config/rs6000/rs6000.opt:61 +msgid "Use PowerPC V2.02 popcntb instruction" +msgstr "" + +#: config/rs6000/rs6000.opt:65 +msgid "Use PowerPC V2.02 floating point rounding instructions" +msgstr "" + +#: config/rs6000/rs6000.opt:69 +msgid "Use AltiVec instructions" +msgstr "" + +#: config/rs6000/rs6000.opt:73 +msgid "Generate load/store multiple instructions" +msgstr "" + +#: config/rs6000/rs6000.opt:77 +msgid "Generate string instructions for block moves" +msgstr "" + +#: config/rs6000/rs6000.opt:81 +msgid "Use new mnemonics for PowerPC architecture" +msgstr "" + +#: config/rs6000/rs6000.opt:85 +msgid "Use old mnemonics for PowerPC architecture" +msgstr "" + +#: config/rs6000/rs6000.opt:89 config/pdp11/pdp11.opt:84 +msgid "Do not use hardware floating point" +msgstr "" + +#: config/rs6000/rs6000.opt:97 +msgid "Do not generate load/store with update instructions" +msgstr "" + +#: config/rs6000/rs6000.opt:101 +msgid "Generate load/store with update instructions" +msgstr "" + +#: config/rs6000/rs6000.opt:105 +#, fuzzy +msgid "Do not generate fused multiply/add instructions" +msgstr "Не генерыраваць сімвальныя інструкцыі" + +#: config/rs6000/rs6000.opt:109 +msgid "Generate fused multiply/add instructions" +msgstr "" + +#: config/rs6000/rs6000.opt:113 +msgid "Schedule the start and end of the procedure" +msgstr "" + +#: config/rs6000/rs6000.opt:120 +msgid "Return all structures in memory (AIX default)" +msgstr "" + +#: config/rs6000/rs6000.opt:124 +msgid "Return small structures in registers (SVR4 default)" +msgstr "" + +#: config/rs6000/rs6000.opt:132 +msgid "Generate software floating point divide for better throughput" +msgstr "" + +#: config/rs6000/rs6000.opt:136 +msgid "Do not place floating point constants in TOC" +msgstr "" + +#: config/rs6000/rs6000.opt:140 +msgid "Place floating point constants in TOC" +msgstr "" + +#: config/rs6000/rs6000.opt:144 +msgid "Do not place symbol+offset constants in TOC" +msgstr "" + +#: config/rs6000/rs6000.opt:148 +msgid "Place symbol+offset constants in TOC" +msgstr "" + +#: config/rs6000/rs6000.opt:159 +msgid "Use only one TOC entry per procedure" +msgstr "" + +#: config/rs6000/rs6000.opt:163 +msgid "Put everything in the regular TOC" +msgstr "" + +#: config/rs6000/rs6000.opt:167 +msgid "Generate VRSAVE instructions when generating AltiVec code" +msgstr "" + +#: config/rs6000/rs6000.opt:171 +msgid "Deprecated option. Use -mvrsave/-mno-vrsave instead" +msgstr "" + +#: config/rs6000/rs6000.opt:175 +#, fuzzy +msgid "Generate isel instructions" +msgstr "Не генерыраваць сімвальныя інструкцыі" + +#: config/rs6000/rs6000.opt:179 +msgid "Deprecated option. Use -misel/-mno-isel instead" +msgstr "" + +#: config/rs6000/rs6000.opt:183 +msgid "Generate SPE SIMD instructions on E500" +msgstr "" + +#: config/rs6000/rs6000.opt:187 +msgid "Deprecated option. Use -mspe/-mno-spe instead" +msgstr "" + +#: config/rs6000/rs6000.opt:191 +msgid "Enable debug output" +msgstr "" + +#: config/rs6000/rs6000.opt:195 +msgid "Specify ABI to use" +msgstr "" + +#: config/rs6000/rs6000.opt:207 +msgid "Select full, part, or no traceback table" +msgstr "" + +#: config/rs6000/rs6000.opt:211 +msgid "Avoid all range limits on call instructions" +msgstr "" + +#: config/rs6000/rs6000.opt:215 +msgid "Warn about deprecated 'vector long ...' AltiVec type usage" +msgstr "" + +#: config/rs6000/rs6000.opt:219 +#, fuzzy +msgid "Select GPR floating point method" +msgstr "перапаўненьне плаваючай кропкі" + +#: config/rs6000/rs6000.opt:223 +msgid "Specify size of long double (64 or 128 bits)" +msgstr "" + +#: config/rs6000/rs6000.opt:227 +msgid "Determine which dependences between insns are considered costly" +msgstr "" + +#: config/rs6000/rs6000.opt:231 +msgid "Specify which post scheduling nop insertion scheme to apply" +msgstr "" + +#: config/rs6000/rs6000.opt:235 +msgid "Specify alignment of structure fields default/natural" +msgstr "" + +#: config/rs6000/rs6000.opt:239 +msgid "Specify scheduling priority for dispatch slot restricted insns" +msgstr "" + +#: config/rs6000/aix64.opt:25 +msgid "Compile for 64-bit pointers" +msgstr "" + +#: config/rs6000/aix64.opt:29 +msgid "Compile for 32-bit pointers" +msgstr "" + +#: config/rs6000/linux64.opt:25 +msgid "Call mcount for profiling before a function prologue" +msgstr "" + +#: config/rs6000/sysv4.opt:25 +msgid "Select ABI calling convention" +msgstr "" + +#: config/rs6000/sysv4.opt:29 +msgid "Select method for sdata handling" +msgstr "" + +#: config/rs6000/sysv4.opt:37 config/rs6000/sysv4.opt:41 +msgid "Align to the base type of the bit-field" +msgstr "" + +#: config/rs6000/sysv4.opt:46 config/rs6000/sysv4.opt:50 +msgid "Produce code relocatable at runtime" +msgstr "" + +#: config/rs6000/sysv4.opt:54 config/rs6000/sysv4.opt:58 +msgid "Produce little endian code" +msgstr "" + +#: config/rs6000/sysv4.opt:62 config/rs6000/sysv4.opt:66 +msgid "Produce big endian code" +msgstr "" + +#: config/rs6000/sysv4.opt:71 config/rs6000/sysv4.opt:75 +#: config/rs6000/sysv4.opt:84 config/rs6000/sysv4.opt:101 +#: config/rs6000/sysv4.opt:129 config/rs6000/sysv4.opt:141 +msgid "no description yet" +msgstr "" + +#: config/rs6000/sysv4.opt:79 +msgid "Assume all variable arg functions are prototyped" +msgstr "" + +#: config/rs6000/sysv4.opt:88 +msgid "Use EABI" +msgstr "" + +#: config/rs6000/sysv4.opt:92 +msgid "Allow bit-fields to cross word boundaries" +msgstr "" + +#: config/rs6000/sysv4.opt:96 +msgid "Use alternate register names" +msgstr "Выкарыстоўвываць альтэрнатыўныя назвы рэгістраў" + +#: config/rs6000/sysv4.opt:105 +msgid "Link with libsim.a, libc.a and sim-crt0.o" +msgstr "" + +#: config/rs6000/sysv4.opt:109 +msgid "Link with libads.a, libc.a and crt0.o" +msgstr "" + +#: config/rs6000/sysv4.opt:113 +msgid "Link with libyk.a, libc.a and crt0.o" +msgstr "" + +#: config/rs6000/sysv4.opt:117 +msgid "Link with libmvme.a, libc.a and crt0.o" +msgstr "" + +#: config/rs6000/sysv4.opt:121 +msgid "Set the PPC_EMB bit in the ELF flags header" +msgstr "" + +#: config/rs6000/sysv4.opt:125 +msgid "Use the WindISS simulator" +msgstr "" + +#: config/rs6000/sysv4.opt:145 +#, fuzzy +msgid "Generate code to use a non-exec PLT and GOT" +msgstr "Стварыць код для DLL" + +#: config/rs6000/sysv4.opt:149 +#, fuzzy +msgid "Generate code for old exec BSS PLT" +msgstr "Стварыць код для DLL" + +#: config/ms1/ms1.opt:24 +#, fuzzy +msgid "Generate multiply instructions" +msgstr "Не выкарыстоўваць інструкцыі AltiVec" + +#: config/ms1/ms1.opt:28 +msgid "Use byte loads and stores when generating code." +msgstr "" + +#: config/ms1/ms1.opt:36 +msgid "Do not include crt0.o in the startup files" +msgstr "" + +#: config/ms1/ms1.opt:40 config/ms1/ms1.opt:44 config/ms1/ms1.opt:48 +#: config/ms1/ms1.opt:52 config/ms1/ms1.opt:56 +msgid "Internal debug switch" +msgstr "" + +#: config/ms1/ms1.opt:60 config/iq2000/iq2000.opt:24 +msgid "Specify CPU for code generation purposes" +msgstr "" + +#: config/mcore/mcore.opt:24 +#, fuzzy +msgid "Generate code for the M*Core M210" +msgstr "Генерыраваць код для Intel as" + +#: config/mcore/mcore.opt:28 +msgid "Generate code for the M*Core M340" +msgstr "" + +#: config/mcore/mcore.opt:32 +msgid "Set maximum alignment to 4" +msgstr "" + +#: config/mcore/mcore.opt:36 +msgid "Force functions to be aligned to a 4 byte boundary" +msgstr "" + +#: config/mcore/mcore.opt:40 +msgid "Set maximum alignment to 8" +msgstr "" + +#: config/mcore/mcore.opt:44 +msgid "Generate big-endian code" +msgstr "" + +#: config/mcore/mcore.opt:48 +msgid "Emit call graph information" +msgstr "" + +#: config/mcore/mcore.opt:52 +#, fuzzy +msgid "Use the divide instruction" +msgstr "Не генерыраваць сімвальныя інструкцыі" + +#: config/mcore/mcore.opt:56 +msgid "Inline constants if it can be done in 2 insns or less" +msgstr "" + +#: config/mcore/mcore.opt:60 +msgid "Generate little-endian code" +msgstr "" + +#: config/mcore/mcore.opt:68 +msgid "Use arbitrary sized immediates in bit operations" +msgstr "" + +#: config/mcore/mcore.opt:72 +msgid "Prefer word accesses over byte accesses" +msgstr "" + +#: config/mcore/mcore.opt:76 +msgid "Set the maximum amount for a single stack increment operation" +msgstr "" + +#: config/mcore/mcore.opt:80 +msgid "Always treat bitfields as int-sized" +msgstr "" + +#: config/arc/arc.opt:33 +msgid "Prepend the name of the cpu to all public symbol names" +msgstr "" + +#: config/arc/arc.opt:43 +msgid "Compile code for ARC variant CPU" +msgstr "" + +#: config/arc/arc.opt:47 +msgid "Put functions in SECTION" +msgstr "" + +#: config/arc/arc.opt:51 +msgid "Put data in SECTION" +msgstr "" + +#: config/arc/arc.opt:55 +msgid "Put read-only data in SECTION" +msgstr "" + +#: config/sh/sh.opt:45 +#, fuzzy +msgid "Generate SH1 code" +msgstr "Стварыць код для DLL" + +#: config/sh/sh.opt:49 +#, fuzzy +msgid "Generate SH2 code" +msgstr "Стварыць код для DLL" + +#: config/sh/sh.opt:53 +#, fuzzy +msgid "Generate SH2a code" +msgstr "Стварыць код для DLL" + +#: config/sh/sh.opt:57 +msgid "Generate SH2a FPU-less code" +msgstr "" + +#: config/sh/sh.opt:61 +msgid "Generate default single-precision SH2a code" +msgstr "" + +#: config/sh/sh.opt:65 +msgid "Generate only single-precision SH2a code" +msgstr "" + +#: config/sh/sh.opt:69 +#, fuzzy +msgid "Generate SH2e code" +msgstr "Стварыць код для DLL" + +#: config/sh/sh.opt:73 +#, fuzzy +msgid "Generate SH3 code" +msgstr "Стварыць код для DLL" + +#: config/sh/sh.opt:77 +#, fuzzy +msgid "Generate SH3e code" +msgstr "Стварыць код для DLL" + +#: config/sh/sh.opt:81 +#, fuzzy +msgid "Generate SH4 code" +msgstr "Стварыць код для DLL" + +#: config/sh/sh.opt:85 +msgid "Generate SH4 FPU-less code" +msgstr "" + +#: config/sh/sh.opt:89 +msgid "Generate default single-precision SH4 code" +msgstr "" + +#: config/sh/sh.opt:93 +msgid "Generate only single-precision SH4 code" +msgstr "" + +#: config/sh/sh.opt:97 +#, fuzzy +msgid "Generate SH4a code" +msgstr "Стварыць код для DLL" + +#: config/sh/sh.opt:101 +msgid "Generate SH4a FPU-less code" +msgstr "" + +#: config/sh/sh.opt:105 +msgid "Generate default single-precision SH4a code" +msgstr "" + +#: config/sh/sh.opt:109 +msgid "Generate only single-precision SH4a code" +msgstr "" + +#: config/sh/sh.opt:113 +msgid "Generate SH4al-dsp code" +msgstr "" + +#: config/sh/sh.opt:117 +msgid "Generate 32-bit SHmedia code" +msgstr "" + +#: config/sh/sh.opt:121 +msgid "Generate 32-bit FPU-less SHmedia code" +msgstr "" + +#: config/sh/sh.opt:125 +msgid "Generate 64-bit SHmedia code" +msgstr "" + +#: config/sh/sh.opt:129 +msgid "Generate 64-bit FPU-less SHmedia code" +msgstr "" + +#: config/sh/sh.opt:133 +msgid "Generate SHcompact code" +msgstr "" + +#: config/sh/sh.opt:137 +msgid "Generate FPU-less SHcompact code" +msgstr "" + +#: config/sh/sh.opt:141 +msgid "Throttle unrolling to avoid thrashing target registers unless the unroll benefit outweighs this" +msgstr "" + +#: config/sh/sh.opt:145 +#, fuzzy +msgid "Generate code in big endian mode" +msgstr "Генерыраваць код для дадзенага ЦП" + +#: config/sh/sh.opt:149 +msgid "Generate 32-bit offsets in switch tables" +msgstr "" + +#: config/sh/sh.opt:153 +msgid "Enable SH5 cut2 workaround" +msgstr "" + +#: config/sh/sh.opt:157 +msgid "Align doubles at 64-bit boundaries" +msgstr "" + +#: config/sh/sh.opt:161 +msgid "Division strategy, one of: call, call2, fp, inv, inv:minlat, inv20u, inv20l, inv:call, inv:call2, inv:fp" +msgstr "" + +#: config/sh/sh.opt:165 +msgid "Specify name for 32 bit signed division function" +msgstr "" + +#: config/sh/sh.opt:172 +msgid "Cost to assume for gettr insn" +msgstr "" + +#: config/sh/sh.opt:176 config/sh/sh.opt:222 +msgid "Follow Renesas (formerly Hitachi) / SuperH calling conventions" +msgstr "" + +#: config/sh/sh.opt:180 +msgid "Increase the IEEE compliance for floating-point code" +msgstr "" + +#: config/sh/sh.opt:184 +msgid "Enable the use of the indexed addressing mode for SHmedia32/SHcompact" +msgstr "" + +#: config/sh/sh.opt:188 +msgid "Assume symbols might be invalid" +msgstr "" + +#: config/sh/sh.opt:192 +msgid "Annotate assembler instructions with estimated addresses" +msgstr "" + +#: config/sh/sh.opt:196 +#, fuzzy +msgid "Generate code in little endian mode" +msgstr "Генерыраваць код без GP reg" + +#: config/sh/sh.opt:200 +msgid "Mark MAC register as call-clobbered" +msgstr "" + +#: config/sh/sh.opt:206 +msgid "Make structs a multiple of 4 bytes (warning: ABI altered)" +msgstr "" + +#: config/sh/sh.opt:210 +msgid "Emit function-calls using global offset table when generating PIC" +msgstr "" + +#: config/sh/sh.opt:214 +msgid "Assume pt* instructions won't trap" +msgstr "" + +#: config/sh/sh.opt:218 +msgid "Shorten address references during linking" +msgstr "" + +#: config/sh/sh.opt:226 +msgid "Deprecated. Use -Os instead" +msgstr "" + +#: config/sh/sh.opt:230 +msgid "Cost to assume for a multiply insn" +msgstr "" + +#: config/sh/sh.opt:234 +msgid "Generate library function call to invalidate instruction cache entries after fixing trampoline" +msgstr "" + +#: config/arm/arm.opt:24 +msgid "Specify an ABI" +msgstr "" + +#: config/arm/arm.opt:28 +msgid "Generate a call to abort if a noreturn function returns" +msgstr "" + +#: config/arm/arm.opt:35 +msgid "Pass FP arguments in FP registers" +msgstr "" + +#: config/arm/arm.opt:39 +msgid "Generate APCS conformant stack frames" +msgstr "" + +#: config/arm/arm.opt:43 +msgid "Generate re-entrant, PIC code" +msgstr "" + +#: config/arm/arm.opt:50 +msgid "Specify the name of the target architecture" +msgstr "" + +#: config/arm/arm.opt:57 +msgid "Assume target CPU is configured as big endian" +msgstr "" + +#: config/arm/arm.opt:61 +msgid "Thumb: Assume non-static functions may be called from ARM code" +msgstr "" + +#: config/arm/arm.opt:65 +msgid "Thumb: Assume function pointers may go to non-Thumb aware code" +msgstr "" + +#: config/arm/arm.opt:69 +msgid "Cirrus: Place NOPs to avoid invalid instruction combinations" +msgstr "" + +#: config/arm/arm.opt:73 +msgid "Specify the name of the target CPU" +msgstr "" + +#: config/arm/arm.opt:77 +msgid "Specify if floating point hardware should be used" +msgstr "" + +#: config/arm/arm.opt:91 +msgid "Specify the name of the target floating point hardware/format" +msgstr "" + +#: config/arm/arm.opt:95 +msgid "Alias for -mfloat-abi=hard" +msgstr "" + +#: config/arm/arm.opt:99 +msgid "Assume target CPU is configured as little endian" +msgstr "" + +#: config/arm/arm.opt:103 +msgid "Generate call insns as indirect calls, if necessary" +msgstr "" + +#: config/arm/arm.opt:107 +msgid "Specify the register to be used for PIC addressing" +msgstr "" + +#: config/arm/arm.opt:111 +msgid "Store function names in object code" +msgstr "" + +#: config/arm/arm.opt:115 +msgid "Permit scheduling of a function's prologue sequence" +msgstr "" + +#: config/arm/arm.opt:119 +msgid "Do not load the PIC register in function prologues" +msgstr "" + +#: config/arm/arm.opt:123 +msgid "Alias for -mfloat-abi=soft" +msgstr "" + +#: config/arm/arm.opt:127 +msgid "Specify the minimum bit alignment of structures" +msgstr "" + +#: config/arm/arm.opt:131 +msgid "Compile for the Thumb not the ARM" +msgstr "" + +#: config/arm/arm.opt:135 +msgid "Support calls between Thumb and ARM instruction sets" +msgstr "" + +#: config/arm/arm.opt:139 +msgid "Specify how to access the thread pointer" +msgstr "" + +#: config/arm/arm.opt:143 +msgid "Thumb: Generate (non-leaf) stack frames even if not needed" +msgstr "" + +#: config/arm/arm.opt:147 +msgid "Thumb: Generate (leaf) stack frames even if not needed" +msgstr "" + +#: config/arm/arm.opt:151 +#, fuzzy +msgid "Tune code for the given processor" +msgstr "Генерыраваць код для дадзенага ЦП" + +#: config/arm/arm.opt:155 +msgid "Assume big endian bytes, little endian words" +msgstr "" + +#: config/arm/pe.opt:24 +msgid "Ignore dllimport attribute for functions" +msgstr "" + +#: config/pdp11/pdp11.opt:24 +msgid "Generate code for an 11/10" +msgstr "" + +#: config/pdp11/pdp11.opt:28 +msgid "Generate code for an 11/40" +msgstr "" + +#: config/pdp11/pdp11.opt:32 +msgid "Generate code for an 11/45" +msgstr "" + +#: config/pdp11/pdp11.opt:36 +#, fuzzy +msgid "Use 16-bit abs patterns" +msgstr "Выкарыстоўваць 64-бітныя FP-рэгістры" + +#: config/pdp11/pdp11.opt:40 +msgid "Return floating-point results in ac0 (fr0 in Unix assembler syntax)" +msgstr "" + +#: config/pdp11/pdp11.opt:44 +msgid "Do not use inline patterns for copying memory" +msgstr "" + +#: config/pdp11/pdp11.opt:48 +msgid "Use inline patterns for copying memory" +msgstr "" + +#: config/pdp11/pdp11.opt:52 +msgid "Do not pretend that branches are expensive" +msgstr "" + +#: config/pdp11/pdp11.opt:56 +msgid "Pretend that branches are expensive" +msgstr "" + +#: config/pdp11/pdp11.opt:60 +#, fuzzy +msgid "Use the DEC assembler syntax" +msgstr "Выкарыстоўваць DEC-сінтакс для асэмблера" + +#: config/pdp11/pdp11.opt:64 +msgid "Use 32 bit float" +msgstr "Выкарыстоўваць 32-х бітны float" + +#: config/pdp11/pdp11.opt:68 +msgid "Use 64 bit float" +msgstr "Выкарыстоўваць 64-х бітны float" + +#: config/pdp11/pdp11.opt:76 +msgid "Use 16 bit int" +msgstr "Выкарыстоўваць 16-ці бітны int" + +#: config/pdp11/pdp11.opt:80 +msgid "Use 32 bit int" +msgstr "Выкарыстоўваць 32-х бітны int" + +#: config/pdp11/pdp11.opt:88 +msgid "Target has split I&D" +msgstr "" + +#: config/pdp11/pdp11.opt:92 +msgid "Use UNIX assembler syntax" +msgstr "Выкарыстоўваць UNIX-сінтакс для асэмблера" + +#: config/avr/avr.opt:24 +msgid "Use subroutines for function prologues and epilogues" +msgstr "" + +#: config/avr/avr.opt:28 +msgid "Select the target MCU" +msgstr "" + +#: config/avr/avr.opt:35 +msgid "Use STACK as the initial value of the stack pointer" +msgstr "" + +#: config/avr/avr.opt:39 +#, fuzzy +msgid "Use an 8-bit 'int' type" +msgstr "Выкарыстоўваць 32-х бітны int" + +#: config/avr/avr.opt:43 +msgid "Change the stack pointer without disabling interrupts" +msgstr "" + +#: config/avr/avr.opt:47 +msgid "Do not generate tablejump insns" +msgstr "" + +#: config/avr/avr.opt:57 +msgid "Use rjmp/rcall (limited range) on >8K devices" +msgstr "" + +#: config/avr/avr.opt:61 +msgid "Output instruction sizes to the asm file" +msgstr "" + +#: config/avr/avr.opt:65 +msgid "Change only the low 8 bits of the stack pointer" +msgstr "" + +#: config/crx/crx.opt:24 +#, fuzzy +msgid "Support multiply accumulate instructions" +msgstr "Не выкарыстоўваць інструкцыі AltiVec" + +#: config/crx/crx.opt:28 +#, fuzzy +msgid "Do not use push to store function arguments" +msgstr "Не генерыраваць сімвальныя інструкцыі" + +#: config/crx/crx.opt:32 +msgid "Restrict doloop to the given nesting level" +msgstr "" + +#: config/c4x/c4x.opt:24 +msgid "Generate code for C30 CPU" +msgstr "" + +#: config/c4x/c4x.opt:28 +msgid "Generate code for C31 CPU" +msgstr "" + +#: config/c4x/c4x.opt:32 +msgid "Generate code for C32 CPU" +msgstr "" + +#: config/c4x/c4x.opt:36 +msgid "Generate code for C33 CPU" +msgstr "" + +#: config/c4x/c4x.opt:40 +msgid "Generate code for C40 CPU" +msgstr "" + +#: config/c4x/c4x.opt:44 +msgid "Generate code for C44 CPU" +msgstr "" + +#: config/c4x/c4x.opt:48 +msgid "Assume that pointers may be aliased" +msgstr "" + +#: config/c4x/c4x.opt:52 +msgid "Big memory model" +msgstr "" + +#: config/c4x/c4x.opt:56 +msgid "Use the BK register as a general purpose register" +msgstr "" + +#: config/c4x/c4x.opt:60 +#, fuzzy +msgid "Generate code for CPU" +msgstr "Генерыраваць код для дадзенага ЦП" + +#: config/c4x/c4x.opt:64 +msgid "Enable use of DB instruction" +msgstr "" + +#: config/c4x/c4x.opt:68 +msgid "Enable debugging" +msgstr "" + +#: config/c4x/c4x.opt:72 +msgid "Enable new features under development" +msgstr "" + +#: config/c4x/c4x.opt:76 +msgid "Use fast but approximate float to integer conversion" +msgstr "" + +#: config/c4x/c4x.opt:80 +msgid "Force RTL generation to emit valid 3 operand insns" +msgstr "" + +#: config/c4x/c4x.opt:84 +msgid "Force constants into registers to improve hoisting" +msgstr "" + +#: config/c4x/c4x.opt:88 config/c4x/c4x.opt:112 +msgid "Save DP across ISR in small memory model" +msgstr "" + +#: config/c4x/c4x.opt:92 +msgid "Allow unsigned iteration counts for RPTB/DB" +msgstr "" + +#: config/c4x/c4x.opt:96 +msgid "Pass arguments on the stack" +msgstr "" + +#: config/c4x/c4x.opt:100 +msgid "Use MPYI instruction for C3x" +msgstr "" + +#: config/c4x/c4x.opt:104 +msgid "Enable parallel instructions" +msgstr "" + +#: config/c4x/c4x.opt:108 +msgid "Enable MPY||ADD and MPY||SUB instructions" +msgstr "" + +#: config/c4x/c4x.opt:116 +msgid "Preserve all 40 bits of FP reg across call" +msgstr "" + +#: config/c4x/c4x.opt:120 +msgid "Pass arguments in registers" +msgstr "" + +#: config/c4x/c4x.opt:124 +msgid "Enable use of RTPB instruction" +msgstr "" + +#: config/c4x/c4x.opt:128 +msgid "Enable use of RTPS instruction" +msgstr "" + +#: config/c4x/c4x.opt:132 +msgid "Set the maximum number of iterations for RPTS to N" +msgstr "" + +#: config/c4x/c4x.opt:136 +msgid "Small memory model" +msgstr "" + +#: config/c4x/c4x.opt:140 +msgid "Emit code compatible with TI tools" +msgstr "" + +#: config/pa/pa-hpux.opt:24 +#, fuzzy +msgid "Generate cpp defines for server IO" +msgstr "Генерыраваць код для дадзенага ЦП" + +#: config/pa/pa-hpux.opt:28 config/pa/pa-hpux1010.opt:24 +#: config/pa/pa-hpux1111.opt:24 +msgid "Specify UNIX standard for predefines and linking" +msgstr "" + +#: config/pa/pa-hpux.opt:32 +#, fuzzy +msgid "Generate cpp defines for workstation IO" +msgstr "Стварыць код для DLL" + +#: config/pa/pa.opt:24 config/pa/pa.opt:77 config/pa/pa.opt:85 +#, fuzzy +msgid "Generate PA1.0 code" +msgstr "Стварыць код для DLL" + +#: config/pa/pa.opt:28 config/pa/pa.opt:89 config/pa/pa.opt:109 +#, fuzzy +msgid "Generate PA1.1 code" +msgstr "Стварыць код для DLL" + +#: config/pa/pa.opt:32 config/pa/pa.opt:93 +msgid "Generate PA2.0 code (requires binutils 2.10 or later)" +msgstr "" + +#: config/pa/pa.opt:36 +#, fuzzy +msgid "Generate code for huge switch statements" +msgstr "Генерыраваць код для Intel as" + +#: config/pa/pa.opt:40 +msgid "Disable FP regs" +msgstr "" + +#: config/pa/pa.opt:44 +#, fuzzy +msgid "Disable indexed addressing" +msgstr "нерэчаісны адрас" + +#: config/pa/pa.opt:48 +#, fuzzy +msgid "Generate fast indirect calls" +msgstr "Генерыраваць код для Intel as" + +#: config/pa/pa.opt:56 +msgid "Assume code will be assembled by GAS" +msgstr "" + +#: config/pa/pa.opt:60 +msgid "Put jumps in call delay slots" +msgstr "" + +#: config/pa/pa.opt:65 +#, fuzzy +msgid "Enable linker optimizations" +msgstr "Уключаць SSA аптымізацыю" + +#: config/pa/pa.opt:69 +#, fuzzy +msgid "Always generate long calls" +msgstr "Генерыраваць код для Intel as" + +#: config/pa/pa.opt:73 +msgid "Emit long load/store sequences" +msgstr "" + +#: config/pa/pa.opt:81 +msgid "Disable space regs" +msgstr "" + +#: config/pa/pa.opt:97 +msgid "Use portable calling conventions" +msgstr "" + +#: config/pa/pa.opt:101 +msgid "Specify CPU for scheduling purposes. Valid arguments are 700, 7100, 7100LC, 7200, 7300, and 8000" +msgstr "" + +#: config/pa/pa.opt:113 +msgid "Do not disable space regs" +msgstr "" + +#: config/pa/pa64-hpux.opt:24 +msgid "Assume code will be linked by GNU ld" +msgstr "" + +#: config/pa/pa64-hpux.opt:28 +msgid "Assume code will be linked by HP ld" +msgstr "" + +#: config/xtensa/xtensa.opt:24 +msgid "Use CONST16 instruction to load constants" +msgstr "" + +#: config/xtensa/xtensa.opt:28 +msgid "Enable fused multiply/add and multiply/subtract FP instructions" +msgstr "" + +#: config/xtensa/xtensa.opt:32 +msgid "Use indirect CALLXn instructions for large programs" +msgstr "" + +#: config/xtensa/xtensa.opt:36 +msgid "Automatically align branch targets to reduce branch penalties" +msgstr "" + +#: config/xtensa/xtensa.opt:40 +msgid "Intersperse literal pools with code in the text section" +msgstr "" + +#: config/stormy16/stormy16.opt:25 +msgid "Provide libraries for the simulator" +msgstr "" + +#: config/mips/mips.opt:24 +#, fuzzy +msgid "Generate code that conforms to the given ABI" +msgstr "Генерыраваць код для дадзенага ЦП" + +#: config/mips/mips.opt:28 +#, fuzzy +msgid "Use SVR4-style PIC" +msgstr "Выкарыстоўваць OSF PIC" + +#: config/mips/mips.opt:32 +msgid "Use PMC-style 'mad' instructions" +msgstr "" + +#: config/mips/mips.opt:36 +#, fuzzy +msgid "Generate code for the given ISA" +msgstr "Генерыраваць код для дадзенага ЦП" + +#: config/mips/mips.opt:40 +msgid "Use Branch Likely instructions, overriding the architecture default" +msgstr "" + +#: config/mips/mips.opt:44 +msgid "Trap on integer divide by zero" +msgstr "" + +#: config/mips/mips.opt:48 +msgid "Use branch-and-break sequences to check for integer divide by zero" +msgstr "" + +#: config/mips/mips.opt:52 +msgid "Use trap instructions to check for integer divide by zero" +msgstr "" + +#: config/mips/mips.opt:56 +msgid "Allow hardware floating-point instructions to cover both 32-bit and 64-bit operations" +msgstr "" + +#: config/mips/mips.opt:60 +msgid "Use MIPS-DSP instructions" +msgstr "" + +#: config/mips/mips.opt:70 +msgid "Use big-endian byte order" +msgstr "" + +#: config/mips/mips.opt:74 +msgid "Use little-endian byte order" +msgstr "" + +#: config/mips/mips.opt:78 config/iq2000/iq2000.opt:32 +msgid "Use ROM instead of RAM" +msgstr "" + +#: config/mips/mips.opt:82 +msgid "Use NewABI-style %reloc() assembly operators" +msgstr "" + +#: config/mips/mips.opt:86 +msgid "Work around certain R4000 errata" +msgstr "" + +#: config/mips/mips.opt:90 +msgid "Work around certain R4400 errata" +msgstr "" + +#: config/mips/mips.opt:94 +msgid "Work around errata for early SB-1 revision 2 cores" +msgstr "" + +#: config/mips/mips.opt:98 +msgid "Work around certain VR4120 errata" +msgstr "" + +#: config/mips/mips.opt:102 +msgid "Work around VR4130 mflo/mfhi errata" +msgstr "" + +#: config/mips/mips.opt:106 +msgid "Work around an early 4300 hardware bug" +msgstr "" + +#: config/mips/mips.opt:110 +#, fuzzy +msgid "FP exceptions are enabled" +msgstr "выбары ўключаны:" + +#: config/mips/mips.opt:114 +#, fuzzy +msgid "Use 32-bit floating-point registers" +msgstr "Выкарыстоўваць 32-бітныя галоўныя рэгістры" + +#: config/mips/mips.opt:118 +#, fuzzy +msgid "Use 64-bit floating-point registers" +msgstr "Выкарыстоўваць 64-бітныя галоўныя рэгістры" + +#: config/mips/mips.opt:122 +msgid "Use FUNC to flush the cache before calling stack trampolines" +msgstr "" + +#: config/mips/mips.opt:126 +msgid "Generate floating-point multiply-add instructions" +msgstr "" + +#: config/mips/mips.opt:130 +msgid "Use 32-bit general registers" +msgstr "Выкарыстоўваць 32-бітныя галоўныя рэгістры" + +#: config/mips/mips.opt:134 +msgid "Use 64-bit general registers" +msgstr "Выкарыстоўваць 64-бітныя галоўныя рэгістры" + +#: config/mips/mips.opt:138 +#, fuzzy +msgid "Allow the use of hardware floating-point instructions" +msgstr "Выкарыстоўваць апаратную \"плаваючую кропку\"" + +#: config/mips/mips.opt:142 +#, fuzzy +msgid "Generate code for ISA level N" +msgstr "Генерыраваць код для Intel as" + +#: config/mips/mips.opt:146 +#, fuzzy +msgid "Generate mips16 code" +msgstr "Стварыць код для DLL" + +#: config/mips/mips.opt:150 +msgid "Use MIPS-3D instructions" +msgstr "" + +#: config/mips/mips.opt:154 +msgid "Use indirect calls" +msgstr "" + +#: config/mips/mips.opt:158 +#, fuzzy +msgid "Use a 32-bit long type" +msgstr "Выкарыстоўваць 32-х бітны float" + +#: config/mips/mips.opt:162 +#, fuzzy +msgid "Use a 64-bit long type" +msgstr "Выкарыстоўваць 64-х бітны float" + +#: config/mips/mips.opt:166 +msgid "Don't optimize block moves" +msgstr "" + +#: config/mips/mips.opt:170 +msgid "Use the mips-tfile postpass" +msgstr "" + +#: config/mips/mips.opt:174 +msgid "Do not use a cache-flushing function before calling stack trampolines" +msgstr "" + +#: config/mips/mips.opt:178 +#, fuzzy +msgid "Generate normal-mode code" +msgstr "Генерыраваць код для GNU ld" + +#: config/mips/mips.opt:182 +#, fuzzy +msgid "Do not use MIPS-3D instructions" +msgstr "Не генерыраваць сімвальныя інструкцыі" + +#: config/mips/mips.opt:186 +#, fuzzy +msgid "Use paired-single floating-point instructions" +msgstr "Выкарыстоўваць апаратную \"плаваючую кропку\"" + +#: config/mips/mips.opt:190 +msgid "Restrict the use of hardware floating-point instructions to 32-bit operations" +msgstr "" + +#: config/mips/mips.opt:194 +msgid "Prevent the use of all hardware floating-point instructions" +msgstr "" + +#: config/mips/mips.opt:198 +msgid "Optimize lui/addiu address loads" +msgstr "" + +#: config/mips/mips.opt:202 +msgid "Assume all symbols have 32-bit values" +msgstr "" + +#: config/mips/mips.opt:206 +msgid "Optimize the output for PROCESSOR" +msgstr "" + +#: config/mips/mips.opt:210 config/iq2000/iq2000.opt:45 +msgid "Put uninitialized constants in ROM (needs -membedded-data)" +msgstr "" + +#: config/mips/mips.opt:214 +msgid "Perform VR4130-specific alignment optimizations" +msgstr "" + +#: config/mips/mips.opt:218 +msgid "Lift restrictions on GOT size" +msgstr "" + +#: config/fr30/fr30.opt:24 +msgid "Assume small address space" +msgstr "" + +#: config/m68hc11/m68hc11.opt:24 config/m68hc11/m68hc11.opt:32 +msgid "Compile for a 68HC11" +msgstr "" + +#: config/m68hc11/m68hc11.opt:28 config/m68hc11/m68hc11.opt:36 +msgid "Compile for a 68HC12" +msgstr "" + +#: config/m68hc11/m68hc11.opt:42 config/m68hc11/m68hc11.opt:46 +msgid "Compile for a 68HCS12" +msgstr "" + +#: config/m68hc11/m68hc11.opt:50 +msgid "Auto pre/post decrement increment allowed" +msgstr "" + +#: config/m68hc11/m68hc11.opt:54 +msgid "Min/max instructions allowed" +msgstr "" + +#: config/m68hc11/m68hc11.opt:58 +msgid "Use call and rtc for function calls and returns" +msgstr "" + +#: config/m68hc11/m68hc11.opt:62 +msgid "Auto pre/post decrement increment not allowed" +msgstr "" + +#: config/m68hc11/m68hc11.opt:66 +msgid "Use jsr and rts for function calls and returns" +msgstr "" + +#: config/m68hc11/m68hc11.opt:70 +msgid "Min/max instructions not allowed" +msgstr "" + +#: config/m68hc11/m68hc11.opt:74 +msgid "Use direct addressing mode for soft registers" +msgstr "" + +#: config/m68hc11/m68hc11.opt:78 +msgid "Compile with 32-bit integer mode" +msgstr "" + +#: config/m68hc11/m68hc11.opt:83 +msgid "Specify the register allocation order" +msgstr "" + +#: config/m68hc11/m68hc11.opt:87 +msgid "Do not use direct addressing mode for soft registers" +msgstr "" + +#: config/m68hc11/m68hc11.opt:91 +msgid "Compile with 16-bit integer mode" +msgstr "" + +#: config/m68hc11/m68hc11.opt:95 +msgid "Indicate the number of soft registers available" +msgstr "" + +#: config/vax/vax.opt:24 config/vax/vax.opt:28 +msgid "Target DFLOAT double precision code" +msgstr "" + +#: config/vax/vax.opt:32 config/vax/vax.opt:36 +msgid "Generate GFLOAT double precision code" +msgstr "" + +#: config/vax/vax.opt:40 +#, fuzzy +msgid "Generate code for GNU assembler (gas)" +msgstr "Генерыраваць код для GNU as" + +#: config/vax/vax.opt:44 +#, fuzzy +msgid "Generate code for UNIX assembler" +msgstr "Генерыраваць код для GNU as" + +#: config/vax/vax.opt:48 +msgid "Use VAXC structure conventions" +msgstr "" + +#: config/cris/linux.opt:28 +msgid "Together with -fpic and -fPIC, do not use GOTPLT references" +msgstr "" + +#: config/cris/cris.opt:46 +msgid "Work around bug in multiplication instruction" +msgstr "" + +#: config/cris/cris.opt:52 +msgid "Compile for ETRAX 4 (CRIS v3)" +msgstr "" + +#: config/cris/cris.opt:57 +msgid "Compile for ETRAX 100 (CRIS v8)" +msgstr "" + +#: config/cris/cris.opt:65 +msgid "Emit verbose debug information in assembly code" +msgstr "" + +#: config/cris/cris.opt:72 +#, fuzzy +msgid "Do not use condition codes from normal instructions" +msgstr "Не генерыраваць сімвальныя інструкцыі" + +#: config/cris/cris.opt:81 +msgid "Do not emit addressing modes with side-effect assignment" +msgstr "" + +#: config/cris/cris.opt:90 +msgid "Do not tune stack alignment" +msgstr "" + +#: config/cris/cris.opt:99 +msgid "Do not tune writable data alignment" +msgstr "" + +#: config/cris/cris.opt:108 +msgid "Do not tune code and read-only data alignment" +msgstr "" + +#: config/cris/cris.opt:117 +msgid "Align code and data to 32 bits" +msgstr "" + +#: config/cris/cris.opt:134 +msgid "Don't align items in code or data" +msgstr "" + +#: config/cris/cris.opt:143 +msgid "Do not emit function prologue or epilogue" +msgstr "" + +#: config/cris/cris.opt:150 +msgid "Use the most feature-enabling options allowed by other options" +msgstr "" + +#: config/cris/cris.opt:159 +msgid "Override -mbest-lib-options" +msgstr "" + +#: config/cris/cris.opt:166 +#, fuzzy +msgid "Generate code for the specified chip or CPU version" +msgstr "Генерыраваць код для дадзенага ЦП" + +#: config/cris/cris.opt:170 +msgid "Tune alignment for the specified chip or CPU version" +msgstr "" + +#: config/cris/cris.opt:174 +msgid "Warn when a stackframe is larger than the specified size" +msgstr "" + +#: config/cris/aout.opt:28 +msgid "Compile for the MMU-less Etrax 100-based elinux system" +msgstr "" + +#: config/cris/aout.opt:34 +msgid "For elinux, request a specified stack-size for this program" +msgstr "" + +#: config/h8300/h8300.opt:24 +#, fuzzy +msgid "Generate H8S code" +msgstr "Стварыць код для DLL" + +#: config/h8300/h8300.opt:28 +#, fuzzy +msgid "Generate H8SX code" +msgstr "Стварыць код для DLL" + +#: config/h8300/h8300.opt:32 +msgid "Generate H8S/2600 code" +msgstr "" + +#: config/h8300/h8300.opt:36 +msgid "Make integers 32 bits wide" +msgstr "" + +#: config/h8300/h8300.opt:43 +msgid "Use registers for argument passing" +msgstr "" + +#: config/h8300/h8300.opt:47 +msgid "Consider access to byte sized memory slow" +msgstr "" + +#: config/h8300/h8300.opt:51 +msgid "Enable linker relaxing" +msgstr "" + +#: config/h8300/h8300.opt:55 +msgid "Generate H8/300H code" +msgstr "" + +#: config/h8300/h8300.opt:59 +msgid "Enable the normal mode" +msgstr "" + +#: config/h8300/h8300.opt:63 +msgid "Use H8/300 alignment rules" +msgstr "" + +#: config/v850/v850.opt:24 +#, fuzzy +msgid "Use registers r2 and r5" +msgstr "невядомая назва рэгістра: %s" + +#: config/v850/v850.opt:28 +msgid "Use 4 byte entries in switch tables" +msgstr "" + +#: config/v850/v850.opt:32 +msgid "Enable backend debugging" +msgstr "" + +#: config/v850/v850.opt:36 +#, fuzzy +msgid "Do not use the callt instruction" +msgstr "Не генерыраваць сімвальныя інструкцыі" + +#: config/v850/v850.opt:40 +msgid "Reuse r30 on a per function basis" +msgstr "" + +#: config/v850/v850.opt:44 +msgid "Support Green Hills ABI" +msgstr "" + +#: config/v850/v850.opt:48 +msgid "Prohibit PC relative function calls" +msgstr "" + +#: config/v850/v850.opt:52 +msgid "Use stubs for function prologues" +msgstr "" + +#: config/v850/v850.opt:56 +msgid "Set the max size of data eligible for the SDA area" +msgstr "" + +#: config/v850/v850.opt:60 +#, fuzzy +msgid "Enable the use of the short load instructions" +msgstr "Не генерыраваць сімвальныя інструкцыі" + +#: config/v850/v850.opt:64 +msgid "Same as: -mep -mprolog-function" +msgstr "" + +#: config/v850/v850.opt:68 +msgid "Set the max size of data eligible for the TDA area" +msgstr "" + +#: config/v850/v850.opt:72 +msgid "Enforce strict alignment" +msgstr "" + +#: config/v850/v850.opt:79 +msgid "Compile for the v850 processor" +msgstr "" + +#: config/v850/v850.opt:83 +#, fuzzy +msgid "Compile for the v850e processor" +msgstr "Аптымізацыя для F930 працэсараў" + +#: config/v850/v850.opt:87 +#, fuzzy +msgid "Compile for the v850e1 processor" +msgstr "Аптымізацыя для F930 працэсараў" + +#: config/v850/v850.opt:91 +msgid "Set the max size of data eligible for the ZDA area" +msgstr "" + +#: config/mmix/mmix.opt:25 +msgid "For intrinsics library: pass all parameters in registers" +msgstr "" + +#: config/mmix/mmix.opt:29 +msgid "Use register stack for parameters and return value" +msgstr "" + +#: config/mmix/mmix.opt:33 +msgid "Use call-clobbered registers for parameters and return value" +msgstr "" + +#: config/mmix/mmix.opt:38 +msgid "Use epsilon-respecting floating point compare instructions" +msgstr "" + +#: config/mmix/mmix.opt:42 +msgid "Use zero-extending memory loads, not sign-extending ones" +msgstr "" + +#: config/mmix/mmix.opt:46 +msgid "Generate divide results with reminder having the same sign as the divisor (not the dividend)" +msgstr "" + +#: config/mmix/mmix.opt:50 +msgid "Prepend global symbols with \":\" (for use with PREFIX)" +msgstr "" + +#: config/mmix/mmix.opt:54 +msgid "Do not provide a default start-address 0x100 of the program" +msgstr "" + +#: config/mmix/mmix.opt:58 +msgid "Link to emit program in ELF format (rather than mmo)" +msgstr "" + +#: config/mmix/mmix.opt:62 +msgid "Use P-mnemonics for branches statically predicted as taken" +msgstr "" + +#: config/mmix/mmix.opt:66 +msgid "Don't use P-mnemonics for branches" +msgstr "" + +#: config/mmix/mmix.opt:80 +msgid "Use addresses that allocate global registers" +msgstr "" + +#: config/mmix/mmix.opt:84 +msgid "Do not use addresses that allocate global registers" +msgstr "" + +#: config/mmix/mmix.opt:88 +msgid "Generate a single exit point for each function" +msgstr "" + +#: config/mmix/mmix.opt:92 +#, fuzzy +msgid "Do not generate a single exit point for each function" +msgstr "Не генерыраваць сімвальныя інструкцыі" + +#: config/mmix/mmix.opt:96 +msgid "Set start-address of the program" +msgstr "" + +#: config/mmix/mmix.opt:100 +msgid "Set start-address of data" +msgstr "" + +#: config/iq2000/iq2000.opt:28 +msgid "Specify CPU for scheduling purposes" +msgstr "" + +#: config/iq2000/iq2000.opt:36 +msgid "Use GP relative sdata/sbss sections" +msgstr "" + +#: config/iq2000/iq2000.opt:41 +msgid "No default crt0.o" +msgstr "" + +#: config/bfin/bfin.opt:24 +msgid "Omit frame pointer for leaf functions" +msgstr "" + +#: config/bfin/bfin.opt:28 +msgid "Program is entirely located in low 64k of memory" +msgstr "" + +#: config/bfin/bfin.opt:32 +msgid "Work around a hardware anomaly by adding a number of NOPs before a" +msgstr "" + +#: config/bfin/bfin.opt:37 +msgid "Avoid speculative loads to work around a hardware anomaly." +msgstr "" + +#: config/bfin/bfin.opt:41 +msgid "Enabled ID based shared library" +msgstr "" + +#: config/bfin/bfin.opt:49 +msgid "Avoid generating pc-relative calls; use indirection" +msgstr "" + +#: config/vxworks.opt:25 +msgid "Assume the VxWorks RTP environment" +msgstr "" + +#: config/vxworks.opt:32 +msgid "Assume the VxWorks vThreads environment" +msgstr "" + +#: config/darwin.opt:24 +#, fuzzy +msgid "Generate code suitable for fast turn around debugging" +msgstr "Стварыць код для DLL" + +#: config/darwin.opt:28 +msgid "The earliest MacOS X version on which this program will run" +msgstr "" + +#: config/darwin.opt:32 +msgid "Set sizeof(bool) to 1" +msgstr "" + +#: config/lynx.opt:24 +msgid "Support legacy multi-threading" +msgstr "" + +#: config/lynx.opt:28 +#, fuzzy +msgid "Use shared libraries" +msgstr "Выкарыстоўваць апаратную плаваючую кропку" + +#: config/lynx.opt:32 +msgid "Support multi-threading" +msgstr "" + +#: c.opt:42 +msgid "Assert the to . Putting '-' before disables the to " +msgstr "" + +#: c.opt:46 +#, fuzzy +msgid "Do not discard comments" +msgstr "незавершаныя каментарыі" + +#: c.opt:50 +msgid "Do not discard comments in macro expansions" +msgstr "" + +#: c.opt:54 +msgid "Define a with as its value. If just is given, is taken to be 1" +msgstr "" + +#: c.opt:61 +msgid "Add to the end of the main framework include path" +msgstr "" + +#: c.opt:65 +msgid "Print the name of header files as they are used" +msgstr "" + +#: c.opt:69 c.opt:782 +msgid "Add to the end of the main include path" +msgstr "" + +#: c.opt:73 +msgid "Generate make dependencies" +msgstr "" + +#: c.opt:77 +msgid "Generate make dependencies and compile" +msgstr "" + +#: c.opt:81 +msgid "Write dependency output to the given file" +msgstr "" + +#: c.opt:85 +msgid "Treat missing header files as generated files" +msgstr "" + +#: c.opt:89 +msgid "Like -M but ignore system header files" +msgstr "" + +#: c.opt:93 +msgid "Like -MD but ignore system header files" +msgstr "" + +#: c.opt:97 +#, fuzzy +msgid "Generate phony targets for all headers" +msgstr "Генерыраваць код для Intel as" + +#: c.opt:101 +msgid "Add a MAKE-quoted target" +msgstr "" + +#: c.opt:105 +msgid "Add an unquoted target" +msgstr "" + +#: c.opt:109 +#, fuzzy +msgid "Do not generate #line directives" +msgstr "Не генерыраваць сімвальныя інструкцыі" + +#: c.opt:113 +msgid "Undefine " +msgstr "" + +#: c.opt:117 +msgid "Warn about things that will change when compiling with an ABI-compliant compiler" +msgstr "" + +#: c.opt:121 +msgid "Enable most warning messages" +msgstr "" + +#: c.opt:125 +msgid "Warn whenever an Objective-C assignment is being intercepted by the garbage collector" +msgstr "" + +#: c.opt:129 +msgid "Warn about casting functions to incompatible types" +msgstr "" + +#: c.opt:133 +msgid "Warn about C constructs that are not in the common subset of C and C++" +msgstr "" + +#: c.opt:138 +msgid "Warn about casts which discard qualifiers" +msgstr "" + +#: c.opt:142 +msgid "Warn about subscripts whose type is \"char\"" +msgstr "" + +#: c.opt:146 +msgid "Warn about possibly nested block comments, and C++ comments spanning more than one physical line" +msgstr "" + +#: c.opt:150 +msgid "Synonym for -Wcomment" +msgstr "" + +#: c.opt:154 +msgid "Warn about possibly confusing type conversions" +msgstr "" + +#: c.opt:158 +msgid "Warn when all constructors and destructors are private" +msgstr "" + +#: c.opt:162 +msgid "Warn when a declaration is found after a statement" +msgstr "" + +#: c.opt:166 +msgid "Warn about deprecated compiler features" +msgstr "" + +#: c.opt:170 +msgid "Warn about compile-time integer division by zero" +msgstr "" + +#: c.opt:174 +msgid "Warn about violations of Effective C++ style rules" +msgstr "" + +#: c.opt:178 +msgid "Warn about stray tokens after #elif and #endif" +msgstr "" + +#: c.opt:186 +#, fuzzy +msgid "Make implicit function declarations an error" +msgstr "секцыя \"%s\" канфліктуе з папярэдняй дэкларацыяй" + +#: c.opt:190 +msgid "Warn if testing floating point numbers for equality" +msgstr "" + +#: c.opt:194 +msgid "Warn about printf/scanf/strftime/strfmon format string anomalies" +msgstr "" + +#: c.opt:198 +#, fuzzy +msgid "Warn if passing too many arguments to a function for its format string" +msgstr "вельмі шмат аргумэнтаў у функцыі `%s'" + +#: c.opt:202 +msgid "Warn about format strings that are not literals" +msgstr "" + +#: c.opt:206 +msgid "Warn about possible security problems with format functions" +msgstr "" + +#: c.opt:210 +msgid "Warn about strftime formats yielding 2-digit years" +msgstr "" + +#: c.opt:214 +msgid "Warn about zero-length formats" +msgstr "" + +#: c.opt:221 +msgid "Warn about variables which are initialized to themselves" +msgstr "" + +#: c.opt:228 +msgid "Warn about implicit function declarations" +msgstr "" + +#: c.opt:232 +msgid "Warn when a declaration does not specify a type" +msgstr "" + +#: c.opt:236 +msgid "Deprecated. This switch has no effect" +msgstr "" + +#: c.opt:240 +msgid "Warn when there is a cast to a pointer from an integer of a different size" +msgstr "" + +#: c.opt:244 +msgid "Warn about invalid uses of the \"offsetof\" macro" +msgstr "" + +#: c.opt:248 +msgid "Warn about PCH files that are found but not used" +msgstr "" + +#: c.opt:252 +msgid "Do not warn about using \"long long\" when -pedantic" +msgstr "" + +#: c.opt:256 +#, fuzzy +msgid "Warn about suspicious declarations of \"main\"" +msgstr "няма папярэдняга аб'яўлення для \"%s\"" + +#: c.opt:260 +msgid "Warn about possibly missing braces around initializers" +msgstr "" + +#: c.opt:264 +#, fuzzy +msgid "Warn about global functions without previous declarations" +msgstr "секцыя \"%s\" канфліктуе з папярэдняй дэкларацыяй" + +#: c.opt:268 +msgid "Warn about missing fields in struct initializers" +msgstr "" + +#: c.opt:272 +msgid "Warn about functions which might be candidates for format attributes" +msgstr "" + +#: c.opt:276 +msgid "Warn about user-specified include directories that do not exist" +msgstr "" + +#: c.opt:280 +msgid "Warn about global functions without prototypes" +msgstr "" + +#: c.opt:284 +#, fuzzy +msgid "Warn about use of multi-character character constants" +msgstr "мнагасімвальная сімвальная канстанта" + +#: c.opt:288 +msgid "Warn about \"extern\" declarations not at file scope" +msgstr "" + +#: c.opt:292 +msgid "Warn when non-templatized friend functions are declared within a template" +msgstr "" + +#: c.opt:296 +msgid "Warn about non-virtual destructors" +msgstr "" + +#: c.opt:300 +msgid "Warn about NULL being passed to argument slots marked as requiring non-NULL" +msgstr "" + +#: c.opt:304 +msgid "Warn about non-normalised Unicode strings" +msgstr "" + +#: c.opt:308 +msgid "Warn if a C-style cast is used in a program" +msgstr "" + +#: c.opt:312 +msgid "Warn if an old-style parameter definition is used" +msgstr "" + +#: c.opt:316 +msgid "Warn about overloaded virtual function names" +msgstr "" + +#: c.opt:320 +msgid "Warn about possibly missing parentheses" +msgstr "" + +#: c.opt:324 +msgid "Warn when converting the type of pointers to member functions" +msgstr "" + +#: c.opt:328 +msgid "Warn about function pointer arithmetic" +msgstr "" + +#: c.opt:332 +msgid "Warn when a pointer is cast to an integer of a different size" +msgstr "" + +#: c.opt:336 +msgid "Warn about misuses of pragmas" +msgstr "" + +#: c.opt:340 +msgid "Warn if inherited methods are unimplemented" +msgstr "" + +#: c.opt:344 +msgid "Warn about multiple declarations of the same object" +msgstr "" + +#: c.opt:348 +msgid "Warn when the compiler reorders code" +msgstr "" + +#: c.opt:352 +msgid "Warn whenever a function's return type defaults to \"int\" (C), or about inconsistent return types (C++)" +msgstr "" + +#: c.opt:356 +msgid "Warn if a selector has multiple methods" +msgstr "" + +#: c.opt:360 +msgid "Warn about possible violations of sequence point rules" +msgstr "" + +#: c.opt:364 +msgid "Warn about signed-unsigned comparisons" +msgstr "" + +#: c.opt:368 +msgid "Warn when overload promotes from unsigned to signed" +msgstr "" + +#: c.opt:372 +msgid "Warn about uncasted NULL used as sentinel" +msgstr "" + +#: c.opt:376 +#, fuzzy +msgid "Warn about unprototyped function declarations" +msgstr "няма папярэдняга аб'яўлення для \"%s\"" + +#: c.opt:380 +msgid "Warn if type signatures of candidate methods do not match exactly" +msgstr "" + +#: c.opt:384 +msgid "Warn when synthesis behavior differs from Cfront" +msgstr "" + +#: c.opt:388 common.opt:142 +msgid "Do not suppress warnings from system headers" +msgstr "" + +#: c.opt:392 +msgid "Warn about features not present in traditional C" +msgstr "" + +#: c.opt:396 +msgid "Warn if trigraphs are encountered that might affect the meaning of the program" +msgstr "" + +#: c.opt:400 +msgid "Warn about @selector()s without previously declared methods" +msgstr "" + +#: c.opt:404 +msgid "Warn if an undefined macro is used in an #if directive" +msgstr "" + +#: c.opt:408 +msgid "Warn about unrecognized pragmas" +msgstr "" + +#: c.opt:412 +msgid "Warn about macros defined in the main file that are not used" +msgstr "" + +#: c.opt:416 +msgid "Do not warn about using variadic macros when -pedantic" +msgstr "" + +#: c.opt:420 +msgid "Give strings the type \"array of char\"" +msgstr "" + +#: c.opt:424 +msgid "Warn when a pointer differs in signedness in an assignment" +msgstr "" + +#: c.opt:428 +msgid "A synonym for -std=c89 (for C) or -std=c++98 (for C++)" +msgstr "" + +#: c.opt:436 +msgid "Enforce class member access control semantics" +msgstr "" + +#: c.opt:443 +msgid "Change when template instances are emitted" +msgstr "" + +#: c.opt:447 +msgid "Recognize the \"asm\" keyword" +msgstr "" + +#: c.opt:451 +#, fuzzy +msgid "Recognize built-in functions" +msgstr "Не генерыраваць сімвальныя інструкцыі" + +#: c.opt:458 +msgid "Check the return value of new" +msgstr "" + +#: c.opt:462 +msgid "Allow the arguments of the '?' operator to have different types" +msgstr "" + +#: c.opt:466 +msgid "Reduce the size of object files" +msgstr "" + +#: c.opt:470 +msgid "Make string literals \"const char[]\" not \"char[]\"" +msgstr "" + +#: c.opt:474 +msgid "Use class for constant strings" +msgstr "" + +#: c.opt:478 +#, fuzzy +msgid "Inline member functions by default" +msgstr "у функцыі \"%s\":" + +#: c.opt:482 +msgid "Permit '$' as an identifier character" +msgstr "" + +#: c.opt:489 +#, fuzzy +msgid "Generate code to check exception specifications" +msgstr "\"%s\" не абвешчан (першае выкарыстанне ў гэтай функцыі)" + +#: c.opt:496 +msgid "Convert all strings and character constants to character set " +msgstr "" + +#: c.opt:500 +msgid "Permit universal character names (\\u and \\U) in identifiers" +msgstr "" + +#: c.opt:504 +msgid "Specify the default character set for source files" +msgstr "" + +#: c.opt:521 +msgid "Scope of for-init-statement variables is local to the loop" +msgstr "" + +#: c.opt:525 +msgid "Do not assume that standard C libraries and \"main\" exist" +msgstr "" + +#: c.opt:529 +msgid "Recognize GNU-defined keywords" +msgstr "" + +#: c.opt:533 +msgid "Generate code for GNU runtime environment" +msgstr "" + +#: c.opt:546 +msgid "Assume normal C execution environment" +msgstr "" + +#: c.opt:550 +msgid "Enable support for huge objects" +msgstr "" + +#: c.opt:554 +msgid "Export functions even if they can be inlined" +msgstr "" + +#: c.opt:558 +#, fuzzy +msgid "Emit implicit instantiations of inline templates" +msgstr "паўторнае абвяшчэнне меткі \"%s\"" + +#: c.opt:562 +#, fuzzy +msgid "Emit implicit instantiations of templates" +msgstr "паўторнае абвяшчэнне меткі \"%s\"" + +#: c.opt:566 +msgid "Inject friend functions into enclosing namespace" +msgstr "" + +#: c.opt:573 +msgid "Don't warn about uses of Microsoft extensions" +msgstr "" + +#: c.opt:583 +msgid "Generate code for NeXT (Apple Mac OS X) runtime environment" +msgstr "" + +#: c.opt:587 +msgid "Assume that receivers of Objective-C messages may be nil" +msgstr "" + +#: c.opt:599 +msgid "Generate special Objective-C methods to initialize/destroy non-POD C++ ivars, if needed" +msgstr "" + +#: c.opt:603 +msgid "Allow fast jumps to the message dispatcher" +msgstr "" + +#: c.opt:609 +msgid "Enable Objective-C exception and synchronization syntax" +msgstr "" + +#: c.opt:613 +msgid "Enable garbage collection (GC) in Objective-C/Objective-C++ programs" +msgstr "" + +#: c.opt:618 +#, fuzzy +msgid "Enable Objective-C setjmp exception handling runtime" +msgstr "Уключыць апрацоўку выключэньняў" + +#: c.opt:622 +msgid "Recognize C++ kewords like \"compl\" and \"xor\"" +msgstr "" + +#: c.opt:626 +#, fuzzy +msgid "Enable optional diagnostics" +msgstr "Уключаць SSA аптымізацыю" + +#: c.opt:633 +msgid "Look for and use PCH files even when preprocessing" +msgstr "" + +#: c.opt:637 +msgid "Downgrade conformance errors to warnings" +msgstr "" + +#: c.opt:641 +msgid "Treat the input file as already preprocessed" +msgstr "" + +#: c.opt:645 +msgid "Used in Fix-and-Continue mode to indicate that object files may be swapped in at runtime" +msgstr "" + +#: c.opt:649 +msgid "Enable automatic template instantiation" +msgstr "" + +#: c.opt:653 +msgid "Generate run time type descriptor information" +msgstr "" + +#: c.opt:657 +msgid "Use the same size for double as for float" +msgstr "" + +#: c.opt:665 +msgid "Force the underlying type for \"wchar_t\" to be \"unsigned short\"" +msgstr "" + +#: c.opt:669 +msgid "When \"signed\" or \"unsigned\" is not given make the bitfield signed" +msgstr "" + +#: c.opt:673 +msgid "Make \"char\" signed by default" +msgstr "" + +#: c.opt:680 +msgid "Display statistics accumulated during compilation" +msgstr "" + +#: c.opt:687 +msgid "Distance between tab stops for column reporting" +msgstr "" + +#: c.opt:691 +msgid "Specify maximum template instantiation depth" +msgstr "" + +#: c.opt:698 +#, fuzzy +msgid "Do not generate thread-safe code for initializing local statics" +msgstr "Генерыраваць код для Intel as" + +#: c.opt:702 +msgid "When \"signed\" or \"unsigned\" is not given make the bitfield unsigned" +msgstr "" + +#: c.opt:706 +msgid "Make \"char\" unsigned by default" +msgstr "" + +#: c.opt:710 +msgid "Use __cxa_atexit to register destructors" +msgstr "" + +#: c.opt:714 +msgid "Marks all inlined methods as having hidden visibility" +msgstr "" + +#: c.opt:718 +msgid "Discard unused virtual functions" +msgstr "" + +#: c.opt:722 +msgid "Implement vtables using thunks" +msgstr "" + +#: c.opt:726 +msgid "Emit common-like symbols as weak symbols" +msgstr "" + +#: c.opt:730 +msgid "Convert all wide strings and character constants to character set " +msgstr "" + +#: c.opt:734 +msgid "Generate a #line directive pointing at the current working directory" +msgstr "" + +#: c.opt:738 +msgid "Emit cross referencing information" +msgstr "" + +#: c.opt:742 +msgid "Generate lazy class lookup (via objc_getClass()) for use in Zero-Link mode" +msgstr "" + +#: c.opt:746 +msgid "Dump declarations to a .decl file" +msgstr "" + +#: c.opt:750 c.opt:778 +msgid "Add to the end of the system include path" +msgstr "" + +#: c.opt:754 +msgid "Accept definition of macros in " +msgstr "" + +#: c.opt:758 +msgid "Include the contents of before other files" +msgstr "" + +#: c.opt:762 +msgid "Specify as a prefix for next two options" +msgstr "" + +#: c.opt:766 +msgid "Set to be the system root directory" +msgstr "" + +#: c.opt:770 +msgid "Add to the start of the system include path" +msgstr "" + +#: c.opt:774 +msgid "Add to the end of the quote include path" +msgstr "" + +#: c.opt:795 +msgid "Do not search standard system include directories (those specified with -isystem will still be used)" +msgstr "" + +#: c.opt:799 +msgid "Do not search standard system include directories for C++" +msgstr "" + +#: c.opt:815 +msgid "Generate C header of platform-specific features" +msgstr "" + +#: c.opt:819 +msgid "Print a checksum of the executable for PCH validity checking, and stop" +msgstr "" + +#: c.opt:823 +msgid "Remap file names when including files" +msgstr "" + +#: c.opt:827 +msgid "Conform to the ISO 1998 C++ standard" +msgstr "" + +#: c.opt:831 c.opt:859 +msgid "Conform to the ISO 1990 C standard" +msgstr "" + +#: c.opt:835 c.opt:867 +msgid "Conform to the ISO 1999 C standard" +msgstr "" + +#: c.opt:839 +msgid "Deprecated in favor of -std=c99" +msgstr "" + +#: c.opt:843 +msgid "Conform to the ISO 1998 C++ standard with GNU extensions" +msgstr "" + +#: c.opt:847 +msgid "Conform to the ISO 1990 C standard with GNU extensions" +msgstr "" + +#: c.opt:851 +msgid "Conform to the ISO 1999 C standard with GNU extensions" +msgstr "" + +#: c.opt:855 +msgid "Deprecated in favor of -std=gnu99" +msgstr "" + +#: c.opt:863 +msgid "Conform to the ISO 1990 C standard as amended in 1994" +msgstr "" + +#: c.opt:871 +msgid "Deprecated in favor of -std=iso9899:1999" +msgstr "" + +#: c.opt:875 +msgid "Enable traditional preprocessing" +msgstr "" + +#: c.opt:879 +msgid "Support ISO C trigraphs" +msgstr "" + +#: c.opt:883 +msgid "Do not predefine system-specific and GCC-specific macros" +msgstr "" + +#: c.opt:887 +msgid "Enable verbose output" +msgstr "" + +#: common.opt:28 +#, fuzzy +msgid "Display this information" +msgstr " --help Адлюстраваць гэту інфармацыю\n" + +#: common.opt:32 +msgid "Set parameter to value. See below for a complete list of parameters" +msgstr "" + +#: common.opt:42 +msgid "Put global and static data smaller than bytes into a special section (on some targets)" +msgstr "" + +#: common.opt:46 +#, fuzzy +msgid "Set optimization level to " +msgstr "аптымізацыя уключана" + +#: common.opt:50 +#, fuzzy +msgid "Optimize for space rather than speed" +msgstr "Аптымізацыя для SparcLite працэсараў" + +#: common.opt:54 +msgid "This switch is deprecated; use -Wextra instead" +msgstr "" + +#: common.opt:58 +msgid "Warn about returning structures, unions or arrays" +msgstr "" + +#: common.opt:62 +msgid "Warn about inappropriate attribute usage" +msgstr "" + +#: common.opt:66 +msgid "Warn about pointer casts which increase alignment" +msgstr "" + +#: common.opt:70 +msgid "Warn about uses of __attribute__((deprecated)) declarations" +msgstr "" + +#: common.opt:74 +msgid "Warn when an optimization pass is disabled" +msgstr "" + +#: common.opt:78 +msgid "Treat all warnings as errors" +msgstr "" + +#: common.opt:82 +msgid "Print extra (possibly unwanted) warnings" +msgstr "" + +#: common.opt:86 +msgid "Exit on the first error occurred" +msgstr "" + +#: common.opt:90 +msgid "Warn when an inlined function cannot be inlined" +msgstr "" + +#: common.opt:94 +#, fuzzy +msgid "Warn if an object is larger than bytes" +msgstr "памер \"%s\" больш чам %d байт" + +#: common.opt:98 +msgid "Warn if the loop cannot be optimized due to nontrivial assumptions." +msgstr "" + +#: common.opt:102 +msgid "Warn about functions which might be candidates for __attribute__((noreturn))" +msgstr "" + +#: common.opt:106 +msgid "Warn when the packed attribute has no effect on struct layout" +msgstr "" + +#: common.opt:110 +msgid "Warn when padding is required to align structure members" +msgstr "" + +#: common.opt:114 +msgid "Warn when one local variable shadows another" +msgstr "" + +#: common.opt:118 +msgid "Warn when not issuing stack smashing protection for some reason" +msgstr "" + +#: common.opt:122 common.opt:126 +msgid "Warn about code which might break strict aliasing rules" +msgstr "" + +#: common.opt:130 +msgid "Warn about enumerated switches, with no default, missing a case" +msgstr "" + +#: common.opt:134 +msgid "Warn about enumerated switches missing a \"default:\" statement" +msgstr "" + +#: common.opt:138 +msgid "Warn about all enumerated switches missing a specific case" +msgstr "" + +#: common.opt:146 +msgid "Warn about uninitialized automatic variables" +msgstr "" + +#: common.opt:150 +msgid "Warn about code that will never be executed" +msgstr "" + +#: common.opt:154 +msgid "Enable all -Wunused- warnings" +msgstr "" + +#: common.opt:158 +msgid "Warn when a function is unused" +msgstr "" + +#: common.opt:166 +msgid "Warn when a function parameter is unused" +msgstr "" + +#: common.opt:170 +msgid "Warn when an expression value is unused" +msgstr "" + +#: common.opt:174 +msgid "Warn when a variable is unused" +msgstr "" + +#: common.opt:178 +msgid "Warn when a register variable is declared volatile" +msgstr "" + +#: common.opt:182 +msgid "Emit declaration information into " +msgstr "" + +#: common.opt:195 +msgid "Enable dumps from specific passes of the compiler" +msgstr "" + +#: common.opt:199 +msgid "Set the file basename to be used for dumps" +msgstr "" + +#: common.opt:217 +msgid "Align the start of functions" +msgstr "" + +#: common.opt:224 +msgid "Align labels which are only reached by jumping" +msgstr "" + +#: common.opt:231 +msgid "Align all labels" +msgstr "" + +#: common.opt:238 +msgid "Align the start of loops" +msgstr "" + +#: common.opt:251 +msgid "Specify that arguments may alias each other and globals" +msgstr "" + +#: common.opt:255 +msgid "Assume arguments may alias globals but not each other" +msgstr "" + +#: common.opt:259 +msgid "Assume arguments alias neither each other nor globals" +msgstr "" + +#: common.opt:263 +msgid "Generate unwind tables that are exact at each instruction boundary" +msgstr "" + +#: common.opt:271 +#, fuzzy +msgid "Generate code to check bounds before indexing arrays" +msgstr "Генерыраваць код для Intel as" + +#: common.opt:275 +msgid "Replace add, compare, branch with branch on count register" +msgstr "" + +#: common.opt:279 +msgid "Use profiling information for branch probabilities" +msgstr "" + +#: common.opt:283 +msgid "Perform branch target load optimization before prologue / epilogue threading" +msgstr "" + +#: common.opt:287 +msgid "Perform branch target load optimization after prologue / epilogue threading" +msgstr "" + +#: common.opt:291 +msgid "Restrict target load migration not to re-use registers in any basic block" +msgstr "" + +#: common.opt:295 +msgid "Mark as being preserved across functions" +msgstr "" + +#: common.opt:299 +msgid "Mark as being corrupted by function calls" +msgstr "" + +#: common.opt:306 +msgid "Save registers around function calls" +msgstr "" + +#: common.opt:310 +msgid "Do not put uninitialized globals in the common section" +msgstr "" + +#: common.opt:314 +msgid "Perform a register copy-propagation optimization pass" +msgstr "" + +#: common.opt:318 +msgid "Perform cross-jumping optimization" +msgstr "" + +#: common.opt:322 +msgid "When running CSE, follow jumps to their targets" +msgstr "" + +#: common.opt:326 +msgid "When running CSE, follow conditional jumps" +msgstr "" + +#: common.opt:330 +msgid "Omit range reduction step when performing complex division" +msgstr "" + +#: common.opt:334 +msgid "Place data items into their own section" +msgstr "" + +#: common.opt:340 +msgid "Defer popping functions args from stack until later" +msgstr "" + +#: common.opt:344 +msgid "Attempt to fill delay slots of branch instructions" +msgstr "" + +#: common.opt:348 +msgid "Delete useless null pointer checks" +msgstr "" + +#: common.opt:352 +msgid "How often to emit source location at the beginning of line-wrapped diagnostics" +msgstr "" + +#: common.opt:356 +msgid "Amend appropriate diagnostic messages with the command line option that controls them" +msgstr "" + +#: common.opt:360 +msgid "Dump various compiler internals to a file" +msgstr "" + +#: common.opt:364 +msgid "Suppress output of instruction numbers and line number notes in debugging dumps" +msgstr "" + +#: common.opt:368 +msgid "Perform early inlining" +msgstr "" + +#: common.opt:372 +msgid "Perform DWARF2 duplicate elimination" +msgstr "" + +#: common.opt:376 common.opt:380 +msgid "Perform unused type elimination in debug info" +msgstr "" + +#: common.opt:384 +msgid "Enable exception handling" +msgstr "Уключыць апрацоўку выключэньняў" + +#: common.opt:388 +msgid "Perform a number of minor, expensive optimizations" +msgstr "" + +#: common.opt:395 +msgid "Assume no NaNs or infinities are generated" +msgstr "" + +#: common.opt:399 +msgid "Mark as being unavailable to the compiler" +msgstr "" + +#: common.opt:403 +msgid "Don't allocate floats and doubles in extended-precision registers" +msgstr "" + +#: common.opt:409 +msgid "Copy memory address constants into registers before use" +msgstr "" + +#: common.opt:415 +msgid "Copy memory operands into registers before use" +msgstr "" + +#: common.opt:422 +msgid "Allow function addresses to be held in registers" +msgstr "" + +#: common.opt:426 +#, fuzzy +msgid "Place each function into its own section" +msgstr "адзін раз для кожнай функцыі, дзе ён з'яўляецца.)" + +#: common.opt:430 +msgid "Perform global common subexpression elimination" +msgstr "" + +#: common.opt:434 +msgid "Perform enhanced load motion during global common subexpression elimination" +msgstr "" + +#: common.opt:438 +msgid "Perform store motion after global common subexpression elimination" +msgstr "" + +#: common.opt:442 +msgid "Perform redundant load after store elimination in global common subexpression" +msgstr "" + +#: common.opt:447 +msgid "Perform global common subexpression elimination after register allocation" +msgstr "" + +#: common.opt:452 +msgid "Enable guessing of branch probabilities" +msgstr "" + +#: common.opt:460 +msgid "Process #ident directives" +msgstr "" + +#: common.opt:464 +msgid "Perform conversion of conditional jumps to branchless equivalents" +msgstr "" + +#: common.opt:468 +msgid "Perform conversion of conditional jumps to conditional execution" +msgstr "" + +#: common.opt:476 +msgid "Do not generate .size directives" +msgstr "" + +#: common.opt:485 +msgid "Pay attention to the \"inline\" keyword" +msgstr "" + +#: common.opt:489 +msgid "Integrate simple functions into their callers" +msgstr "" + +#: common.opt:493 +msgid "Integrate functions called once into their callers" +msgstr "" + +#: common.opt:500 +msgid "Limit the size of inlined functions to " +msgstr "" + +#: common.opt:504 +msgid "Instrument function entry and exit with profiling calls" +msgstr "" + +#: common.opt:508 +msgid "Perform Interprocedural constant propagation" +msgstr "" + +#: common.opt:512 +msgid "Discover pure and const functions" +msgstr "" + +#: common.opt:516 +msgid "Discover readonly and non addressable static variables" +msgstr "" + +#: common.opt:520 +msgid "Type based escape and alias analysis" +msgstr "" + +#: common.opt:524 +msgid "Optimize induction variables on trees" +msgstr "" + +#: common.opt:528 +msgid "Use jump tables for sufficiently large switch statements" +msgstr "" + +#: common.opt:532 +msgid "Generate code for functions even if they are fully inlined" +msgstr "" + +#: common.opt:536 +msgid "Emit static const variables even if they are not used" +msgstr "" + +#: common.opt:540 +msgid "Give external symbols a leading underscore" +msgstr "" + +#: common.opt:544 +#, fuzzy +msgid "Perform loop optimizations" +msgstr "Уключаць SSA аптымізацыю" + +#: common.opt:548 +msgid "Perform loop optimizations using the new loop optimizer" +msgstr "" + +#: common.opt:552 +msgid "Set errno after built-in math functions" +msgstr "" + +#: common.opt:556 +msgid "Report on permanent memory allocation" +msgstr "" + +#: common.opt:563 +msgid "Attempt to merge identical constants and constant variables" +msgstr "" + +#: common.opt:567 +msgid "Attempt to merge identical constants across compilation units" +msgstr "" + +#: common.opt:571 +msgid "Limit diagnostics to characters per line. 0 suppresses line-wrapping" +msgstr "" + +#: common.opt:575 +msgid "Perform SMS based modulo scheduling before the first scheduling pass" +msgstr "" + +#: common.opt:579 +msgid "Move loop invariant computations out of loops" +msgstr "" + +#: common.opt:583 +msgid "Add mudflap bounds-checking instrumentation for single-threaded program" +msgstr "" + +#: common.opt:587 +msgid "Add mudflap bounds-checking instrumentation for multi-threaded program" +msgstr "" + +#: common.opt:591 +msgid "Ignore read operations when inserting mudflap instrumentation" +msgstr "" + +#: common.opt:595 +msgid "Enable/Disable the traditional scheduling in loops that already passed modulo scheduling" +msgstr "" + +#: common.opt:599 +msgid "Support synchronous non-call exceptions" +msgstr "" + +#: common.opt:603 +msgid "When possible do not generate stack frames" +msgstr "" + +#: common.opt:607 +msgid "Do the full register move optimization pass" +msgstr "" + +#: common.opt:611 +msgid "Optimize sibling and tail recursive calls" +msgstr "" + +#: common.opt:615 +msgid "Pack structure members together without holes" +msgstr "" + +#: common.opt:619 +msgid "Set initial maximum structure member alignment" +msgstr "" + +#: common.opt:623 +msgid "Return small aggregates in memory, not registers" +msgstr "" + +#: common.opt:627 +msgid "Perform loop peeling" +msgstr "" + +#: common.opt:631 +msgid "Enable machine specific peephole optimizations" +msgstr "" + +#: common.opt:635 +msgid "Enable an RTL peephole pass before sched2" +msgstr "" + +#: common.opt:639 +msgid "Generate position-independent code if possible (large mode)" +msgstr "" + +#: common.opt:643 +msgid "Generate position-independent code for executables if possible (large mode)" +msgstr "" + +#: common.opt:647 +msgid "Generate position-independent code if possible (small mode)" +msgstr "" + +#: common.opt:651 +msgid "Generate position-independent code for executables if possible (small mode)" +msgstr "" + +#: common.opt:655 +msgid "Generate prefetch instructions, if available, for arrays in loops" +msgstr "" + +#: common.opt:659 +msgid "Enable basic program profiling code" +msgstr "" + +#: common.opt:663 +msgid "Insert arc-based program profiling code" +msgstr "" + +#: common.opt:667 +msgid "Enable common options for generating profile info for profile feedback directed optimizations" +msgstr "" + +#: common.opt:671 +msgid "Enable common options for performing profile feedback directed optimizations" +msgstr "" + +#: common.opt:675 +msgid "Insert code to profile values of expressions" +msgstr "" + +#: common.opt:682 +msgid "Make compile reproducible using " +msgstr "" + +#: common.opt:686 +#, fuzzy +msgid "Return small aggregates in registers" +msgstr "Не выкарыстоўваць рэгістра sb" + +#: common.opt:690 +msgid "Enables a register move optimization" +msgstr "" + +#: common.opt:694 +msgid "Perform a register renaming optimization pass" +msgstr "" + +#: common.opt:698 +msgid "Reorder basic blocks to improve code placement" +msgstr "" + +#: common.opt:702 +msgid "Reorder basic blocks and partition into hot and cold sections" +msgstr "" + +#: common.opt:706 +msgid "Reorder functions to improve code placement" +msgstr "" + +#: common.opt:710 +msgid "Add a common subexpression elimination pass after loop optimizations" +msgstr "" + +#: common.opt:714 +msgid "Run the loop optimizer twice" +msgstr "" + +#: common.opt:718 +msgid "Disable optimizations that assume default FP rounding behavior" +msgstr "" + +#: common.opt:722 +msgid "Enable scheduling across basic blocks" +msgstr "" + +#: common.opt:726 +msgid "Allow speculative motion of non-loads" +msgstr "" + +#: common.opt:730 +msgid "Allow speculative motion of some loads" +msgstr "" + +#: common.opt:734 +msgid "Allow speculative motion of more loads" +msgstr "" + +#: common.opt:738 +msgid "Set the verbosity level of the scheduler" +msgstr "" + +#: common.opt:742 +msgid "If scheduling post reload, do superblock scheduling" +msgstr "" + +#: common.opt:746 +msgid "If scheduling post reload, do trace scheduling" +msgstr "" + +#: common.opt:750 +msgid "Reschedule instructions before register allocation" +msgstr "" + +#: common.opt:754 +msgid "Reschedule instructions after register allocation" +msgstr "" + +#: common.opt:760 +msgid "Allow premature scheduling of queued insns" +msgstr "" + +#: common.opt:764 +msgid "Set number of queued insns that can be prematurely scheduled" +msgstr "" + +#: common.opt:772 common.opt:776 +msgid "Set dependence distance checking in premature scheduling of queued insns" +msgstr "" + +#: common.opt:780 +msgid "Mark data as shared rather than private" +msgstr "" + +#: common.opt:784 +msgid "Show column numbers in diagnostics, when available. Default on" +msgstr "" + +#: common.opt:788 +msgid "Disable optimizations observable by IEEE signaling NaNs" +msgstr "" + +#: common.opt:792 +msgid "Convert floating point constants to single precision constants" +msgstr "" + +#: common.opt:796 +msgid "Split lifetimes of induction variables when loops are unrolled" +msgstr "" + +#: common.opt:800 +msgid "Apply variable expansion when loops are unrolled" +msgstr "" + +#: common.opt:806 +msgid "Insert stack checking code into the program" +msgstr "Уключаць код правэркі стэку ў праграму" + +#: common.opt:813 +msgid "Trap if the stack goes past " +msgstr "" + +#: common.opt:817 +msgid "Trap if the stack goes past symbol " +msgstr "" + +#: common.opt:821 +msgid "Use propolice as a stack protection method" +msgstr "" + +#: common.opt:825 +msgid "Use a stack protection method for every function" +msgstr "" + +#: common.opt:829 +msgid "Perform strength reduction optimizations" +msgstr "" + +#: common.opt:837 +msgid "Assume strict aliasing rules apply" +msgstr "" + +#: common.opt:841 +msgid "Check for syntax errors, then stop" +msgstr "" + +#: common.opt:845 +msgid "Create data files needed by \"gcov\"" +msgstr "" + +#: common.opt:849 +msgid "Perform jump threading optimizations" +msgstr "" + +#: common.opt:853 +msgid "Report the time taken by each compiler pass" +msgstr "" + +#: common.opt:857 +msgid "Set the default thread-local storage code generation model" +msgstr "" + +#: common.opt:861 +msgid "Perform superblock formation via tail duplication" +msgstr "" + +#: common.opt:868 +msgid "Assume floating-point operations can trap" +msgstr "" + +#: common.opt:872 +msgid "Trap for signed overflow in addition, subtraction and multiplication" +msgstr "" + +#: common.opt:876 +#, fuzzy +msgid "Enable SSA-CCP optimization on trees" +msgstr "Уключаць SSA аптымізацыю" + +#: common.opt:880 +#, fuzzy +msgid "Enable SSA-CCP optimization for stores and loads" +msgstr "Уключаць SSA аптымізацыю" + +#: common.opt:884 +msgid "Enable loop header copying on trees" +msgstr "" + +#: common.opt:888 +msgid "Coalesce memory temporaries in the SSA->normal pass" +msgstr "" + +#: common.opt:892 +msgid "Replace SSA temporaries with better names in copies" +msgstr "" + +#: common.opt:896 +msgid "Enable copy propagation on trees" +msgstr "" + +#: common.opt:900 +msgid "Enable copy propagation for stores and loads" +msgstr "" + +#: common.opt:904 +#, fuzzy +msgid "Enable SSA dead code elimination optimization on trees" +msgstr "Уключаць SSA аптымізацыю" + +#: common.opt:908 +#, fuzzy +msgid "Enable dominator optimizations" +msgstr "Уключаць SSA аптымізацыю" + +#: common.opt:912 +#, fuzzy +msgid "Enable dead store elimination" +msgstr "Уключаць SSA аптымізацыю" + +#: common.opt:916 +msgid "Enable Full Redundancy Elimination (FRE) on trees" +msgstr "" + +#: common.opt:920 +msgid "Enable loop invariant motion on trees" +msgstr "" + +#: common.opt:924 +msgid "Enable linear loop transforms on trees" +msgstr "" + +#: common.opt:928 +msgid "Create canonical induction variables in loops" +msgstr "" + +#: common.opt:932 +#, fuzzy +msgid "Enable loop optimizations on tree level" +msgstr "Уключаць SSA аптымізацыю" + +#: common.opt:936 +#, fuzzy +msgid "Enable SSA-PRE optimization on trees" +msgstr "Уключаць SSA аптымізацыю" + +#: common.opt:940 +msgid "Perform structural alias analysis" +msgstr "" + +#: common.opt:944 +#, fuzzy +msgid "Enable SSA code sinking on trees" +msgstr "Уключаць SSA аптымізацыю" + +#: common.opt:948 +msgid "Perform scalar replacement of aggregates" +msgstr "" + +#: common.opt:952 +msgid "Replace temporary expressions in the SSA->normal pass" +msgstr "" + +#: common.opt:956 +msgid "Perform live range splitting during the SSA->normal pass" +msgstr "" + +#: common.opt:960 +msgid "Perform Value Range Propagation on trees" +msgstr "" + +#: common.opt:964 +msgid "Compile whole compilation unit at a time" +msgstr "" + +#: common.opt:968 +msgid "Perform loop unrolling when iteration count is known" +msgstr "" + +#: common.opt:972 +msgid "Perform loop unrolling for all loops" +msgstr "" + +#: common.opt:979 +msgid "Allow loop optimizations to assume that the loops behave in normal way" +msgstr "" + +#: common.opt:987 +msgid "Allow math optimizations that may violate IEEE or ISO standards" +msgstr "" + +#: common.opt:991 +msgid "Perform loop unswitching" +msgstr "" + +#: common.opt:995 +msgid "Just generate unwind tables for exception handling" +msgstr "" + +#: common.opt:999 +msgid "Perform variable tracking" +msgstr "" + +#: common.opt:1003 +#, fuzzy +msgid "Enable loop vectorization on trees" +msgstr "Уключаць SSA аптымізацыю" + +#: common.opt:1007 +msgid "Enable loop versioning when doing loop vectorization on trees" +msgstr "" + +#: common.opt:1011 +msgid "Set the verbosity level of the vectorizer" +msgstr "" + +#: common.opt:1021 +msgid "Add extra commentary to assembler output" +msgstr "" + +#: common.opt:1025 +msgid "Set the default symbol visibility" +msgstr "" + +#: common.opt:1030 +msgid "Use expression value profiles in optimizations" +msgstr "" + +#: common.opt:1034 +msgid "Construct webs and split unrelated uses of single variable" +msgstr "" + +#: common.opt:1038 +msgid "Perform whole program optimizations" +msgstr "" + +#: common.opt:1042 +msgid "Assume signed arithmetic overflow wraps around" +msgstr "" + +#: common.opt:1046 +msgid "Put zero initialized data in the bss section" +msgstr "" + +#: common.opt:1050 +#, fuzzy +msgid "Generate debug information in default format" +msgstr "Генерыраваць код для Intel as" + +#: common.opt:1054 +msgid "Generate debug information in COFF format" +msgstr "" + +#: common.opt:1058 +msgid "Generate debug information in DWARF v2 format" +msgstr "" + +#: common.opt:1062 +msgid "Generate debug information in default extended format" +msgstr "" + +#: common.opt:1066 +#, fuzzy +msgid "Generate debug information in STABS format" +msgstr "Стварыць код для DLL" + +#: common.opt:1070 +msgid "Generate debug information in extended STABS format" +msgstr "" + +#: common.opt:1074 +#, fuzzy +msgid "Generate debug information in VMS format" +msgstr "Стварыць код для DLL" + +#: common.opt:1078 +msgid "Generate debug information in XCOFF format" +msgstr "" + +#: common.opt:1082 +msgid "Generate debug information in extended XCOFF format" +msgstr "" + +#: common.opt:1086 +#, fuzzy +msgid "Place output into " +msgstr " -o <файл> Памясціць вывад у <файл>\n" + +#: common.opt:1090 +#, fuzzy +msgid "Enable function profiling" +msgstr "Уключыць апрацоўку выключэньняў" + +#: common.opt:1094 +msgid "Issue warnings needed for strict compliance to the standard" +msgstr "" + +#: common.opt:1098 +msgid "Like -pedantic but issue them as errors" +msgstr "" + +#: common.opt:1102 +msgid "Do not display functions compiled or elapsed time" +msgstr "" + +#: common.opt:1106 +msgid "Display the compiler's version" +msgstr "" + +#: common.opt:1110 +#, fuzzy +msgid "Suppress warnings" +msgstr "%s: увага: " + +#: attribs.c:175 +#, fuzzy, gcc-internal-format +msgid "%qs attribute directive ignored" +msgstr "\"%s\" атрыбут ігнарыруецца" + +#: attribs.c:183 +#, fuzzy, gcc-internal-format +msgid "wrong number of arguments specified for %qs attribute" +msgstr "памылковая колькасьць аргументаў, зададзеных для атрыбута `%s'" + +#: attribs.c:200 +#, fuzzy, gcc-internal-format +msgid "%qs attribute does not apply to types" +msgstr "\"%s\" звычайна функцыя" + +#: attribs.c:247 +#, fuzzy, gcc-internal-format +msgid "%qs attribute only applies to function types" +msgstr "\"%s\" звычайна функцыя" + +#: bb-reorder.c:1872 +#, gcc-internal-format +msgid "multiple hot/cold transitions found (bb %i)" +msgstr "" + +#: bt-load.c:1504 +#, gcc-internal-format +msgid "branch target register load optimization is not intended to be run twice" +msgstr "" + +#: builtins.c:366 +#, gcc-internal-format +msgid "offset outside bounds of constant string" +msgstr "" + +#: builtins.c:966 +#, fuzzy, gcc-internal-format +msgid "second argument to %<__builtin_prefetch%> must be a constant" +msgstr "аргумент `__builtin_args_info' павінен быць канстантай" + +#: builtins.c:973 +#, fuzzy, gcc-internal-format +msgid "invalid second argument to %<__builtin_prefetch%>; using zero" +msgstr "аргумент `__builtin_args_info' павінен быць канстантай" + +#: builtins.c:981 +#, fuzzy, gcc-internal-format +msgid "third argument to %<__builtin_prefetch%> must be a constant" +msgstr "аргумент `__builtin_args_info' павінен быць канстантай" + +#: builtins.c:988 +#, fuzzy, gcc-internal-format +msgid "invalid third argument to %<__builtin_prefetch%>; using zero" +msgstr "аргумент `__builtin_args_info' павінен быць канстантай" + +#: builtins.c:4078 +#, fuzzy, gcc-internal-format +msgid "argument of %<__builtin_args_info%> must be constant" +msgstr "аргумент `__builtin_args_info' павінен быць канстантай" + +#: builtins.c:4084 +#, fuzzy, gcc-internal-format +msgid "argument of %<__builtin_args_info%> out of range" +msgstr "аргумент `__builtin_args_info' выйшаў за межы" + +#: builtins.c:4090 +#, fuzzy, gcc-internal-format +msgid "missing argument in %<__builtin_args_info%>" +msgstr "прапушчан аргумент у `__builtin_args_info'" + +#: builtins.c:4186 gimplify.c:1883 +#, fuzzy, gcc-internal-format +msgid "too few arguments to function %" +msgstr "нехапае аргументаў у функцыі \"%s\"" + +#: builtins.c:4349 +#, gcc-internal-format +msgid "first argument to % not of type %" +msgstr "" + +#. Unfortunately, this is merely undefined, rather than a constraint +#. violation, so we cannot make this an error. If this call is never +#. executed, the program is still strictly conforming. +#: builtins.c:4363 +#, gcc-internal-format +msgid "%qT is promoted to %qT when passed through %<...%>" +msgstr "" + +#: builtins.c:4368 +#, gcc-internal-format +msgid "(so you should pass %qT not %qT to %)" +msgstr "" + +#. We can, however, treat "undefined" any way we please. +#. Call abort to encourage the user to fix the program. +#: builtins.c:4374 c-typeck.c:2186 +#, gcc-internal-format +msgid "if this code is reached, the program will abort" +msgstr "" + +#: builtins.c:4493 +#, gcc-internal-format +msgid "invalid argument to %<__builtin_frame_address%>" +msgstr "" + +#: builtins.c:4495 +#, gcc-internal-format +msgid "invalid argument to %<__builtin_return_address%>" +msgstr "" + +#: builtins.c:4508 +#, gcc-internal-format +msgid "unsupported argument to %<__builtin_frame_address%>" +msgstr "" + +#: builtins.c:4510 +#, gcc-internal-format +msgid "unsupported argument to %<__builtin_return_address%>" +msgstr "" + +#: builtins.c:4613 +#, fuzzy, gcc-internal-format +msgid "second argument to %<__builtin_expect%> must be a constant" +msgstr "аргумент `__builtin_args_info' павінен быць канстантай" + +#: builtins.c:6075 +#, gcc-internal-format +msgid "%<__builtin_longjmp%> second argument must be 1" +msgstr "" + +#: builtins.c:6639 +#, fuzzy, gcc-internal-format +msgid "target format does not support infinity" +msgstr "ISO C не падтрымлівае комлексныя цэлалікавыя тыпы" + +#: builtins.c:8481 builtins.c:8575 +#, fuzzy, gcc-internal-format +msgid "too few arguments to function %qs" +msgstr "нехапае аргументаў у функцыі \"%s\"" + +#: builtins.c:8487 builtins.c:8581 +#, fuzzy, gcc-internal-format +msgid "too many arguments to function %qs" +msgstr "вельмі шмат аргумэнтаў у функцыі `%s'" + +#: builtins.c:8493 builtins.c:8606 +#, fuzzy, gcc-internal-format +msgid "non-floating-point argument to function %qs" +msgstr "вельмі шмат аргумэнтаў у функцыі `%s'" + +#: builtins.c:9700 +#, fuzzy, gcc-internal-format +msgid "% used in function with fixed args" +msgstr "" +"`va_start' выкарыстоўвываецца ў функцыі з нязьменнай\n" +" колькасьцю аргументаў" + +#. Evidently an out of date version of ; can't validate +#. va_start's second argument, but can still work as intended. +#: builtins.c:9707 +#, fuzzy, gcc-internal-format +msgid "%<__builtin_next_arg%> called without an argument" +msgstr "\"__buitin_next_arg\" выклікаецца без аргумента" + +#: builtins.c:9722 +#, gcc-internal-format +msgid "% used with too many arguments" +msgstr "" + +#. FIXME: Sometimes with the tree optimizers we can get the +#. not the last argument even though the user used the last +#. argument. We just warn and set the arg to be the last +#. argument so that we will get wrong-code because of +#. it. +#: builtins.c:9742 +#, gcc-internal-format +msgid "second parameter of % not last named argument" +msgstr "" + +#: builtins.c:9851 +#, fuzzy, gcc-internal-format +msgid "%Hfirst argument of %D must be a pointer, second integer constant" +msgstr "аргумент `__builtin_args_info' павінен быць канстантай" + +#: builtins.c:9864 +#, gcc-internal-format +msgid "%Hlast argument of %D is not integer constant between 0 and 3" +msgstr "" + +#: builtins.c:9910 builtins.c:10063 builtins.c:10128 +#, gcc-internal-format +msgid "%Hcall to %D will always overflow destination buffer" +msgstr "" + +#: c-common.c:831 +#, fuzzy, gcc-internal-format +msgid "%qD is not defined outside of function scope" +msgstr "\"%s\" не абвешчан (першае выкарыстанне ў гэтай функцыі)" + +#: c-common.c:852 +#, gcc-internal-format +msgid "string length %qd is greater than the length %qd ISO C%d compilers are required to support" +msgstr "" + +#: c-common.c:893 +#, gcc-internal-format +msgid "overflow in constant expression" +msgstr "" + +#: c-common.c:913 +#, gcc-internal-format +msgid "integer overflow in expression" +msgstr "" + +#: c-common.c:922 +#, gcc-internal-format +msgid "floating point overflow in expression" +msgstr "" + +#: c-common.c:928 +#, gcc-internal-format +msgid "vector overflow in expression" +msgstr "" + +#. This detects cases like converting -129 or 256 to unsigned char. +#: c-common.c:950 +#, gcc-internal-format +msgid "large integer implicitly truncated to unsigned type" +msgstr "" + +#: c-common.c:953 +#, gcc-internal-format +msgid "negative integer implicitly converted to unsigned type" +msgstr "" + +#: c-common.c:1013 +#, gcc-internal-format +msgid "overflow in implicit constant conversion" +msgstr "" + +#: c-common.c:1149 +#, gcc-internal-format +msgid "operation on %qE may be undefined" +msgstr "" + +#: c-common.c:1435 +#, gcc-internal-format +msgid "case label does not reduce to an integer constant" +msgstr "" + +#: c-common.c:1475 +#, gcc-internal-format +msgid "case label value is less than minimum value for type" +msgstr "" + +#: c-common.c:1483 +#, gcc-internal-format +msgid "case label value exceeds maximum value for type" +msgstr "" + +#: c-common.c:1491 +#, gcc-internal-format +msgid "lower value in case label range less than minimum value for type" +msgstr "" + +#: c-common.c:1500 +#, gcc-internal-format +msgid "upper value in case label range exceeds maximum value for type" +msgstr "" + +#: c-common.c:1840 +#, gcc-internal-format +msgid "invalid truth-value expression" +msgstr "" + +#: c-common.c:1888 +#, gcc-internal-format +msgid "invalid operands to binary %s" +msgstr "" + +#: c-common.c:2123 +#, gcc-internal-format +msgid "comparison is always false due to limited range of data type" +msgstr "" + +#: c-common.c:2125 +#, gcc-internal-format +msgid "comparison is always true due to limited range of data type" +msgstr "" + +#: c-common.c:2195 +#, gcc-internal-format +msgid "comparison of unsigned expression >= 0 is always true" +msgstr "" + +#: c-common.c:2204 +#, gcc-internal-format +msgid "comparison of unsigned expression < 0 is always false" +msgstr "" + +#: c-common.c:2246 +#, gcc-internal-format +msgid "pointer of type % used in arithmetic" +msgstr "" + +#: c-common.c:2252 +#, gcc-internal-format +msgid "pointer to a function used in arithmetic" +msgstr "" + +#: c-common.c:2258 +#, gcc-internal-format +msgid "pointer to member function used in arithmetic" +msgstr "" + +#. Common Ada/Pascal programmer's mistake. We always warn +#. about this since it is so bad. +#: c-common.c:2384 +#, gcc-internal-format +msgid "the address of %qD, will always evaluate as %" +msgstr "" + +#: c-common.c:2481 +#, gcc-internal-format +msgid "suggest parentheses around assignment used as truth value" +msgstr "" + +#: c-common.c:2549 c-common.c:2589 +#, fuzzy, gcc-internal-format +msgid "invalid use of %" +msgstr "нявернае выкарыстанне \"restict\"" + +#: c-common.c:2805 +#, fuzzy, gcc-internal-format +msgid "invalid application of % to a function type" +msgstr "Нерэчаісны выбар \"%s\"" + +#: c-common.c:2815 +#, gcc-internal-format +msgid "invalid application of %qs to a void type" +msgstr "" + +#: c-common.c:2821 +#, fuzzy, gcc-internal-format +msgid "invalid application of %qs to incomplete type %qT " +msgstr "\"%s\" мае незавершаны тып" + +#: c-common.c:2862 +#, gcc-internal-format +msgid "%<__alignof%> applied to a bit-field" +msgstr "" + +#: c-common.c:3393 +#, fuzzy, gcc-internal-format +msgid "cannot disable built-in function %qs" +msgstr "не магу ініцыялізаваць сяброўскую функцыю \"%s\"" + +#: c-common.c:3581 +#, gcc-internal-format +msgid "pointers are not permitted as case values" +msgstr "" + +#: c-common.c:3587 +#, gcc-internal-format +msgid "range expressions in switch statements are non-standard" +msgstr "" + +#: c-common.c:3613 +#, gcc-internal-format +msgid "empty range specified" +msgstr "" + +#: c-common.c:3673 +#, gcc-internal-format +msgid "duplicate (or overlapping) case value" +msgstr "" + +#: c-common.c:3674 +#, gcc-internal-format +msgid "%Jthis is the first entry overlapping that value" +msgstr "" + +#: c-common.c:3678 +#, gcc-internal-format +msgid "duplicate case value" +msgstr "" + +#: c-common.c:3679 +#, fuzzy, gcc-internal-format +msgid "%Jpreviously used here" +msgstr "папярэдняе вызначэньне" + +#: c-common.c:3683 +#, gcc-internal-format +msgid "multiple default labels in one switch" +msgstr "" + +#: c-common.c:3684 +#, gcc-internal-format +msgid "%Jthis is the first default label" +msgstr "" + +#: c-common.c:3733 +#, gcc-internal-format +msgid "%Jcase value %qs not in enumerated type" +msgstr "" + +#: c-common.c:3736 +#, gcc-internal-format +msgid "%Jcase value %qs not in enumerated type %qT" +msgstr "" + +#: c-common.c:3793 +#, gcc-internal-format +msgid "%Hswitch missing default case" +msgstr "" + +#. Warn if there are enumerators that don't correspond to +#. case expressions. +#: c-common.c:3853 +#, gcc-internal-format +msgid "%Henumeration value %qE not handled in switch" +msgstr "" + +#: c-common.c:3880 +#, fuzzy, gcc-internal-format +msgid "taking the address of a label is non-standard" +msgstr "ISO C не дазваляе пусты ізыходны файл" + +#: c-common.c:4049 c-common.c:4068 c-common.c:4086 c-common.c:4113 +#: c-common.c:4132 c-common.c:4155 c-common.c:4176 c-common.c:4201 +#: c-common.c:4227 c-common.c:4275 c-common.c:4302 c-common.c:4353 +#: c-common.c:4378 c-common.c:4406 c-common.c:4425 c-common.c:4757 +#: c-common.c:4822 c-common.c:4918 c-common.c:4984 c-common.c:5002 +#: c-common.c:5048 c-common.c:5118 c-common.c:5142 c-common.c:5429 +#: c-common.c:5452 c-common.c:5491 +#, fuzzy, gcc-internal-format +msgid "%qE attribute ignored" +msgstr "\"%s\" атрыбут ігнарыруецца" + +#: c-common.c:4256 +#, gcc-internal-format +msgid "%qE attribute have effect only on public objects" +msgstr "" + +#: c-common.c:4463 +#, fuzzy, gcc-internal-format +msgid "unknown machine mode %qs" +msgstr "невядомы рэжым машыны \"%s\"" + +#: c-common.c:4483 +#, gcc-internal-format +msgid "specifying vector types with __attribute__ ((mode)) is deprecated" +msgstr "" + +#: c-common.c:4486 +#, gcc-internal-format +msgid "use __attribute__ ((vector_size)) instead" +msgstr "" + +#: c-common.c:4495 +#, fuzzy, gcc-internal-format +msgid "unable to emulate %qs" +msgstr "немагу адчыніць файл \"%s\"" + +#: c-common.c:4505 +#, fuzzy, gcc-internal-format +msgid "invalid pointer mode %qs" +msgstr "Нерэчаісны выбар \"%s\"" + +#: c-common.c:4520 +#, fuzzy, gcc-internal-format +msgid "no data type for mode %qs" +msgstr "няма тыпа дадзеных для рэжыма \"%s\"" + +#: c-common.c:4530 +#, gcc-internal-format +msgid "cannot use mode %qs for enumeral types" +msgstr "" + +#: c-common.c:4557 +#, fuzzy, gcc-internal-format +msgid "mode %qs applied to inappropriate type" +msgstr "\"%s\" мае незавершаны тып" + +#: c-common.c:4588 +#, fuzzy, gcc-internal-format +msgid "%Jsection attribute cannot be specified for local variables" +msgstr "атрыбуты секцыі не падтрымліваюцца для гэтай мэты" + +#: c-common.c:4599 +#, fuzzy, gcc-internal-format +msgid "section of %q+D conflicts with previous declaration" +msgstr "секцыя \"%s\" канфліктуе з папярэдняй дэкларацыяй" + +#: c-common.c:4608 +#, fuzzy, gcc-internal-format +msgid "section attribute not allowed for %q+D" +msgstr "атрыбуты секцыі не падтрымліваюцца для гэтай мэты" + +#: c-common.c:4614 +#, fuzzy, gcc-internal-format +msgid "%Jsection attributes are not supported for this target" +msgstr "атрыбуты секцыі не падтрымліваюцца для гэтай мэты" + +#: c-common.c:4646 +#, gcc-internal-format +msgid "requested alignment is not a constant" +msgstr "" + +#: c-common.c:4651 +#, gcc-internal-format +msgid "requested alignment is not a power of 2" +msgstr "" + +#: c-common.c:4656 +#, gcc-internal-format +msgid "requested alignment is too large" +msgstr "" + +#: c-common.c:4682 +#, gcc-internal-format +msgid "alignment may not be specified for %q+D" +msgstr "" + +#: c-common.c:4720 +#, gcc-internal-format +msgid "%q+D defined both normally and as an alias" +msgstr "" + +#: c-common.c:4736 +#, fuzzy, gcc-internal-format +msgid "alias argument not a string" +msgstr "аргумент для \"%s\" прапушчан" + +#: c-common.c:4787 +#, gcc-internal-format +msgid "%Jweakref attribute must appear before alias attribute" +msgstr "" + +#: c-common.c:4815 +#, fuzzy, gcc-internal-format +msgid "%qE attribute ignored on non-class types" +msgstr "\"%s\" атрыбут ігнарыруецца" + +#: c-common.c:4828 +#, fuzzy, gcc-internal-format +msgid "visibility argument not a string" +msgstr "аргумент для \"%s\" прапушчан" + +#: c-common.c:4840 +#, fuzzy, gcc-internal-format +msgid "%qE attribute ignored on types" +msgstr "\"%s\" атрыбут ігнарыруецца" + +#: c-common.c:4855 +#, gcc-internal-format +msgid "visibility argument must be one of \"default\", \"hidden\", \"protected\" or \"internal\"" +msgstr "" + +#: c-common.c:4926 +#, fuzzy, gcc-internal-format +msgid "tls_model argument not a string" +msgstr "не хапае аргументаў у функцыі" + +#: c-common.c:4939 +#, gcc-internal-format +msgid "tls_model argument must be one of \"local-exec\", \"initial-exec\", \"local-dynamic\" or \"global-dynamic\"" +msgstr "" + +#: c-common.c:4958 c-common.c:5022 +#, fuzzy, gcc-internal-format +msgid "%J%qE attribute applies only to functions" +msgstr "\"%s\" звычайна функцыя" + +#: c-common.c:4963 c-common.c:5027 +#, gcc-internal-format +msgid "%Jcan%'t set %qE attribute after definition" +msgstr "" + +#: c-common.c:5116 +#, fuzzy, gcc-internal-format +msgid "%qE attribute ignored for %qE" +msgstr "\"%s\" атрыбут ігнарыруецца" + +#: c-common.c:5171 +#, fuzzy, gcc-internal-format +msgid "invalid vector type for attribute %qE" +msgstr "нявернае выкарыстанне \"restict\"" + +#: c-common.c:5179 +#, gcc-internal-format +msgid "number of components of the vector not a power of two" +msgstr "" + +#: c-common.c:5207 +#, gcc-internal-format +msgid "nonnull attribute without arguments on a non-prototype" +msgstr "" + +#: c-common.c:5222 +#, gcc-internal-format +msgid "nonnull argument has invalid operand number (argument %lu)" +msgstr "" + +#: c-common.c:5241 +#, gcc-internal-format +msgid "nonnull argument with out-of-range operand number (argument %lu, operand %lu)" +msgstr "" + +#: c-common.c:5249 +#, gcc-internal-format +msgid "nonnull argument references non-pointer operand (argument %lu, operand %lu)" +msgstr "" + +#: c-common.c:5312 c-common.c:5335 +#, fuzzy, gcc-internal-format +msgid "not enough variable arguments to fit a sentinel" +msgstr "не хапае аргументаў у функцыі" + +#: c-common.c:5356 +#, gcc-internal-format +msgid "missing sentinel in function call" +msgstr "" + +#: c-common.c:5398 +#, gcc-internal-format +msgid "null argument where non-null required (argument %lu)" +msgstr "" + +#: c-common.c:5463 +#, gcc-internal-format +msgid "cleanup argument not an identifier" +msgstr "" + +#: c-common.c:5470 +#, fuzzy, gcc-internal-format +msgid "cleanup argument not a function" +msgstr "вельмі шмат аргументаў у функцыі" + +#: c-common.c:5509 +#, gcc-internal-format +msgid "%qE attribute requires prototypes with named arguments" +msgstr "" + +#: c-common.c:5520 +#, fuzzy, gcc-internal-format +msgid "%qE attribute only applies to variadic functions" +msgstr "\"%s\" звычайна функцыя" + +#: c-common.c:5531 +#, fuzzy, gcc-internal-format +msgid "requested position is not an integer constant" +msgstr "аргумент `__builtin_args_info' павінен быць канстантай" + +#: c-common.c:5538 +#, gcc-internal-format +msgid "requested position is less than zero" +msgstr "" + +#: c-common.c:5840 +#, gcc-internal-format +msgid "%Hignoring return value of %qD, declared with attribute warn_unused_result" +msgstr "" + +#: c-common.c:5844 +#, gcc-internal-format +msgid "%Hignoring return value of function declared with attribute warn_unused_result" +msgstr "" + +#: c-common.c:5904 cp/typeck.c:4239 +#, fuzzy, gcc-internal-format +msgid "attempt to take address of bit-field structure member %qD" +msgstr "не магу атрымаць адрас бітавага поля \"%s\"" + +#: c-common.c:5951 +#, gcc-internal-format +msgid "invalid lvalue in assignment" +msgstr "" + +#: c-common.c:5954 +#, fuzzy, gcc-internal-format +msgid "invalid lvalue in increment" +msgstr "Нерэчаісны выбар \"%s\"" + +#: c-common.c:5957 +#, fuzzy, gcc-internal-format +msgid "invalid lvalue in decrement" +msgstr "Нерэчаісны выбар %s" + +#: c-common.c:5960 +#, gcc-internal-format +msgid "invalid lvalue in unary %<&%>" +msgstr "" + +#: c-common.c:5963 +#, gcc-internal-format +msgid "invalid lvalue in asm statement" +msgstr "" + +#: c-common.c:6091 c-common.c:6140 c-typeck.c:2444 +#, fuzzy, gcc-internal-format +msgid "too few arguments to function %qE" +msgstr "не хапае аргументаў у функцыі" + +#. ??? This should not be an error when inlining calls to +#. unprototyped functions. +#: c-common.c:6108 c-typeck.c:4117 +#, gcc-internal-format +msgid "incompatible type for argument %d of %qE" +msgstr "" + +#. Except for passing an argument to an unprototyped function, +#. this is a constraint violation. When passing an argument to +#. an unprototyped function, it is compile-time undefined; +#. making it a constraint in that case was rejected in +#. DR#252. +#: c-convert.c:96 c-typeck.c:1597 c-typeck.c:3758 cp/typeck.c:1372 +#: cp/typeck.c:5986 fortran/convert.c:89 treelang/tree-convert.c:79 +#, gcc-internal-format +msgid "void value not ignored as it ought to be" +msgstr "" + +#: c-convert.c:134 fortran/convert.c:122 java/typeck.c:154 +#: treelang/tree-convert.c:105 +#, gcc-internal-format +msgid "conversion to non-scalar type requested" +msgstr "" + +#: c-decl.c:564 +#, gcc-internal-format +msgid "array %q+D assumed to have one element" +msgstr "" + +#: c-decl.c:669 +#, gcc-internal-format +msgid "GCC supports only %u nested scopes" +msgstr "" + +#: c-decl.c:755 cp/decl.c:355 java/decl.c:1685 +#, fuzzy, gcc-internal-format +msgid "label %q+D used but not defined" +msgstr "адмеціна `%D' выкарыстоўвываецца, але ня вызначана" + +#: c-decl.c:761 cp/decl.c:366 java/decl.c:1690 +#, fuzzy, gcc-internal-format +msgid "label %q+D defined but not used" +msgstr "адмеціна `%D' вызначана, але не выкарыстоўваецца" + +#: c-decl.c:763 +#, fuzzy, gcc-internal-format +msgid "label %q+D declared but not defined" +msgstr "адмеціна `%D' выкарыстоўвываецца, але ня вызначана" + +#: c-decl.c:798 +#, fuzzy, gcc-internal-format +msgid "nested function %q+D declared but never defined" +msgstr "\"%s\" не абвешчан (першае выкарыстанне ў гэтай функцыі)" + +#: c-decl.c:812 cp/decl.c:560 +#, fuzzy, gcc-internal-format +msgid "unused variable %q+D" +msgstr "невыкарыстоўваемая пераменная \"%s\"" + +#: c-decl.c:816 +#, gcc-internal-format +msgid "type of array %q+D completed incompatibly with implicit initialization" +msgstr "" + +#: c-decl.c:1050 +#, gcc-internal-format +msgid "a parameter list with an ellipsis can%'t match an empty parameter name list declaration" +msgstr "" + +#: c-decl.c:1057 +#, gcc-internal-format +msgid "an argument type that has a default promotion can%'t match an empty parameter name list declaration" +msgstr "" + +#: c-decl.c:1092 +#, gcc-internal-format +msgid "prototype for %q+D declares more arguments than previous old-style definition" +msgstr "" + +#: c-decl.c:1098 +#, gcc-internal-format +msgid "prototype for %q+D declares fewer arguments than previous old-style definition" +msgstr "" + +#: c-decl.c:1107 +#, gcc-internal-format +msgid "prototype for %q+D declares argument %d with incompatible type" +msgstr "" + +#. If we get here, no errors were found, but do issue a warning +#. for this poor-style construct. +#: c-decl.c:1120 +#, gcc-internal-format +msgid "prototype for %q+D follows non-prototype definition" +msgstr "" + +#: c-decl.c:1135 +#, fuzzy, gcc-internal-format +msgid "previous definition of %q+D was here" +msgstr "папярэдняе вызначэньне" + +#: c-decl.c:1137 +#, fuzzy, gcc-internal-format +msgid "previous implicit declaration of %q+D was here" +msgstr "няма папярэдняга аб'яўлення для \"%s\"" + +#: c-decl.c:1139 +#, fuzzy, gcc-internal-format +msgid "previous declaration of %q+D was here" +msgstr "няма папярэдняга аб'яўлення для \"%s\"" + +#: c-decl.c:1179 +#, gcc-internal-format +msgid "%q+D redeclared as different kind of symbol" +msgstr "" + +#: c-decl.c:1183 +#, fuzzy, gcc-internal-format +msgid "built-in function %q+D declared as non-function" +msgstr "\"%s\" не абвешчан (першае выкарыстанне ў гэтай функцыі)" + +#: c-decl.c:1186 c-decl.c:1302 c-decl.c:1926 +#, fuzzy, gcc-internal-format +msgid "declaration of %q+D shadows a built-in function" +msgstr "не магу ініцыялізаваць сяброўскую функцыю \"%s\"" + +#: c-decl.c:1195 +#, fuzzy, gcc-internal-format +msgid "redeclaration of enumerator %q+D" +msgstr "абвяшчэньне шаблёну `%#D'" + +#. If types don't match for a built-in, throw away the +#. built-in. No point in calling locate_old_decl here, it +#. won't print anything. +#: c-decl.c:1216 +#, fuzzy, gcc-internal-format +msgid "conflicting types for built-in function %q+D" +msgstr "паўторнае абвяшчэнне меткі \"%s\"" + +#: c-decl.c:1240 c-decl.c:1253 c-decl.c:1263 +#, gcc-internal-format +msgid "conflicting types for %q+D" +msgstr "" + +#: c-decl.c:1261 +#, gcc-internal-format +msgid "conflicting type qualifiers for %q+D" +msgstr "" + +#. Allow OLDDECL to continue in use. +#: c-decl.c:1278 +#, fuzzy, gcc-internal-format +msgid "redefinition of typedef %q+D" +msgstr "перанакіраванне stdout: %s" + +#: c-decl.c:1326 c-decl.c:1404 +#, fuzzy, gcc-internal-format +msgid "redefinition of %q+D" +msgstr "перанакіраванне stdout: %s" + +#: c-decl.c:1361 c-decl.c:1442 +#, gcc-internal-format +msgid "static declaration of %q+D follows non-static declaration" +msgstr "" + +#: c-decl.c:1371 c-decl.c:1378 c-decl.c:1431 c-decl.c:1439 +#, gcc-internal-format +msgid "non-static declaration of %q+D follows static declaration" +msgstr "" + +#: c-decl.c:1391 +#, gcc-internal-format +msgid "thread-local declaration of %q+D follows non-thread-local declaration" +msgstr "" + +#: c-decl.c:1394 +#, gcc-internal-format +msgid "non-thread-local declaration of %q+D follows thread-local declaration" +msgstr "" + +#: c-decl.c:1424 +#, fuzzy, gcc-internal-format +msgid "extern declaration of %q+D follows declaration with no linkage" +msgstr "няма папярэдняга аб'яўлення для \"%s\"" + +#: c-decl.c:1460 +#, gcc-internal-format +msgid "declaration of %q+D with no linkage follows extern declaration" +msgstr "" + +#: c-decl.c:1466 +#, fuzzy, gcc-internal-format +msgid "redeclaration of %q+D with no linkage" +msgstr "няма папярэдняга аб'яўлення для \"%s\"" + +#: c-decl.c:1480 +#, gcc-internal-format +msgid "redeclaration of %q+D with different visibility (old visibility preserved)" +msgstr "" + +#: c-decl.c:1491 +#, fuzzy, gcc-internal-format +msgid "inline declaration of %qD follows declaration with attribute noinline" +msgstr "няма папярэдняга аб'яўлення для \"%s\"" + +#: c-decl.c:1498 +#, fuzzy, gcc-internal-format +msgid "declaration of %q+D with attribute noinline follows inline declaration " +msgstr "няма папярэдняга аб'яўлення для \"%s\"" + +#: c-decl.c:1513 +#, gcc-internal-format +msgid "%q+D declared inline after being called" +msgstr "" + +#: c-decl.c:1518 +#, fuzzy, gcc-internal-format +msgid "%q+D declared inline after its definition" +msgstr "\"%s\" не абвешчан (першае выкарыстанне ў гэтай функцыі)" + +#: c-decl.c:1537 +#, fuzzy, gcc-internal-format +msgid "redefinition of parameter %q+D" +msgstr "перанакіраванне stdout: %s" + +#: c-decl.c:1564 +#, fuzzy, gcc-internal-format +msgid "redundant redeclaration of %q+D" +msgstr "Нерэчаіснае абвяшчэнне" + +#: c-decl.c:1913 +#, fuzzy, gcc-internal-format +msgid "declaration of %q+D shadows previous non-variable" +msgstr "секцыя \"%s\" канфліктуе з папярэдняй дэкларацыяй" -#: config/sparc/sol2-bi.h:195 config/sparc/sol2-bi.h:205 -#: config/sparc/linux64.h:211 config/sparc/linux64.h:222 -#: config/sparc/netbsd-elf.h:126 config/sparc/netbsd-elf.h:145 -msgid "may not use both -m32 and -m64" +#: c-decl.c:1918 +#, gcc-internal-format +msgid "declaration of %q+D shadows a parameter" msgstr "" -#: gcc.c:763 -msgid "GCC does not support -C or -CC without -E" +#: c-decl.c:1921 +#, gcc-internal-format +msgid "declaration of %q+D shadows a global declaration" msgstr "" -#: gcc.c:957 -msgid "-E or -x required when input is from standard input" -msgstr "" +#: c-decl.c:1931 +#, fuzzy, gcc-internal-format +msgid "declaration of %q+D shadows a previous local" +msgstr "секцыя \"%s\" канфліктуе з папярэдняй дэкларацыяй" -#: config/i386/cygwin.h:29 -msgid "mno-cygwin and mno-win32 are not compatible" -msgstr "" +#: c-decl.c:1934 cp/name-lookup.c:953 cp/name-lookup.c:984 +#: cp/name-lookup.c:992 +#, fuzzy, gcc-internal-format +msgid "%Jshadowed declaration is here" +msgstr "няма папярэдняга аб'яўлення для \"%s\"" -#: config/i386/cygwin.h:70 config/i386/mingw32.h:58 -msgid "shared and mdll are not compatible" -msgstr "" +#: c-decl.c:2134 +#, fuzzy, gcc-internal-format +msgid "nested extern declaration of %qD" +msgstr "пустое абвяшчэнне" -#: config/vax/netbsd-elf.h:42 -msgid "The -shared option is not currently supported for VAX ELF." -msgstr "" +#: c-decl.c:2303 +#, fuzzy, gcc-internal-format +msgid "implicit declaration of function %qE" +msgstr "няма папярэдняга аб'яўлення для \"%s\"" -#: config/i386/sco5.h:189 -#, fuzzy -msgid "-pg not supported on this platform" -msgstr "атрыбуты секцыі не падтрымліваюцца для гэтай мэты" +#: c-decl.c:2364 +#, fuzzy, gcc-internal-format +msgid "incompatible implicit declaration of built-in function %qD" +msgstr "няма папярэдняга аб'яўлення для \"%s\"" -#: config/i386/sco5.h:190 -msgid "-p and -pp specified - pick one" -msgstr "" +#: c-decl.c:2373 +#, fuzzy, gcc-internal-format +msgid "incompatible implicit declaration of function %qD" +msgstr "няма папярэдняга аб'яўлення для \"%s\"" -#: config/i386/sco5.h:264 -msgid "-G and -static are mutually exclusive" -msgstr "" +#: c-decl.c:2426 +#, fuzzy, gcc-internal-format +msgid "%H%qE undeclared here (not in a function)" +msgstr "\"%s\" не абвешчан (першае выкарыстанне ў гэтай функцыі)" -#: java/lang-specs.h:34 -msgid "-fjni and -femit-class-files are incompatible" -msgstr "" +#: c-decl.c:2431 +#, fuzzy, gcc-internal-format +msgid "%H%qE undeclared (first use in this function)" +msgstr "\"%s\" не абвешчан (першае выкарыстанне ў гэтай функцыі)" -#: java/lang-specs.h:35 -msgid "-fjni and -femit-class-file are incompatible" -msgstr "" +#: c-decl.c:2435 +#, fuzzy, gcc-internal-format +msgid "%H(Each undeclared identifier is reported only once" +msgstr "(Аб кожным неабвешчаным ідэнтыфікатары паведамляецца" -#: java/lang-specs.h:36 java/lang-specs.h:37 -msgid "-femit-class-file should used along with -fsyntax-only" -msgstr "" +#: c-decl.c:2436 +#, fuzzy, gcc-internal-format +msgid "%Hfor each function it appears in.)" +msgstr "адзін раз для кожнай функцыі, дзе ён з'яўляецца.)" -#: ada/lang-specs.h:35 -msgid "-c or -S required for Ada" +#: c-decl.c:2474 cp/decl.c:2131 +#, gcc-internal-format +msgid "label %qE referenced outside of any function" msgstr "" -#: config/sh/sh.h:685 -#, fuzzy -msgid "SH2a does not support little-endian" -msgstr "%s не падтрымлівае %s" +#: c-decl.c:2516 +#, fuzzy, gcc-internal-format +msgid "duplicate label declaration %qE" +msgstr "паўторнае абвяшчэньне адмеціны `%s'" -#: config/darwin.h:251 -msgid "-current_version only allowed with -dynamiclib" +#: c-decl.c:2552 +#, fuzzy, gcc-internal-format +msgid "%Hduplicate label %qD" +msgstr "паўтарэнне \"%s\"" + +#: c-decl.c:2562 +#, gcc-internal-format +msgid "%Jjump into statement expression" msgstr "" -#: config/darwin.h:253 -msgid "-install_name only allowed with -dynamiclib" +#: c-decl.c:2564 +#, gcc-internal-format +msgid "%Jjump into scope of identifier with variably modified type" msgstr "" -#: config/darwin.h:258 -msgid "-bundle not allowed with -dynamiclib" +#: c-decl.c:2579 +#, gcc-internal-format +msgid "%Htraditional C lacks a separate namespace for labels, identifier %qE conflicts" msgstr "" -#: config/darwin.h:259 -msgid "-bundle_loader not allowed with -dynamiclib" +#: c-decl.c:2654 +#, gcc-internal-format +msgid "%H%qE defined as wrong kind of tag" msgstr "" -#: config/darwin.h:260 -msgid "-client_name not allowed with -dynamiclib" +#: c-decl.c:2869 +#, gcc-internal-format +msgid "unnamed struct/union that defines no instances" msgstr "" -#: config/darwin.h:265 -msgid "-force_flat_namespace not allowed with -dynamiclib" +#: c-decl.c:2877 +#, gcc-internal-format +msgid "empty declaration with storage class specifier does not redeclare tag" msgstr "" -#: config/darwin.h:267 -msgid "-keep_private_externs not allowed with -dynamiclib" +#: c-decl.c:2888 +#, gcc-internal-format +msgid "empty declaration with type qualifier does not redeclare tag" msgstr "" -#: config/darwin.h:268 -msgid "-private_bundle not allowed with -dynamiclib" +#: c-decl.c:2909 c-decl.c:2916 +#, fuzzy, gcc-internal-format +msgid "useless type name in empty declaration" +msgstr "паўторнае абвяшчэнне меткі \"%s\"" + +#: c-decl.c:2924 +#, fuzzy, gcc-internal-format +msgid "% in empty declaration" +msgstr "пустое абвяшчэньне" + +#: c-decl.c:2930 +#, gcc-internal-format +msgid "% in file-scope empty declaration" msgstr "" -#: config/lynx.h:71 -msgid "Cannot use mthreads and mlegacy-threads together." +#: c-decl.c:2936 +#, gcc-internal-format +msgid "% in file-scope empty declaration" msgstr "" -#: config/lynx.h:96 -msgid "Cannot use mshared and static together." +#: c-decl.c:2942 +#, fuzzy, gcc-internal-format +msgid "useless storage class specifier in empty declaration" +msgstr "паўторнае абвяшчэнне меткі \"%s\"" + +#: c-decl.c:2948 +#, gcc-internal-format +msgid "useless %<__thread%> in empty declaration" msgstr "" -#: attribs.c:175 +#: c-decl.c:2956 #, fuzzy, gcc-internal-format -msgid "%qs attribute directive ignored" -msgstr "\"%s\" атрыбут ігнарыруецца" +msgid "useless type qualifier in empty declaration" +msgstr "паўторнае абвяшчэнне меткі \"%s\"" -#: attribs.c:183 +#: c-decl.c:2963 c-parser.c:1157 +#, gcc-internal-format +msgid "empty declaration" +msgstr "пустое абвяшчэньне" + +#: c-decl.c:3029 #, fuzzy, gcc-internal-format -msgid "wrong number of arguments specified for %qs attribute" -msgstr "памылковая колькасьць аргументаў, зададзеных для атрыбута `%s'" +msgid "ISO C90 does not support % or type qualifiers in parameter array declarators" +msgstr "ISO C89 не падтрымлівае \"long long\"" -#: attribs.c:200 +#: c-decl.c:3032 #, fuzzy, gcc-internal-format -msgid "%qs attribute does not apply to types" -msgstr "\"%s\" звычайна функцыя" +msgid "ISO C90 does not support %<[*]%> array declarators" +msgstr "ISO C89 не падтрымлівае \"long long\"" -#: attribs.c:246 +#: c-decl.c:3035 #, fuzzy, gcc-internal-format -msgid "%qs attribute only applies to function types" -msgstr "\"%s\" звычайна функцыя" +msgid "GCC does not yet properly implement %<[*]%> array declarators" +msgstr "ISO C89 не падтрымлівае \"long long\"" -#: builtins.c:341 +#: c-decl.c:3054 #, gcc-internal-format -msgid "offset outside bounds of constant string" +msgid "static or type qualifiers in abstract declarator" msgstr "" -#: builtins.c:928 +#: c-decl.c:3113 #, fuzzy, gcc-internal-format -msgid "second argument to %<__builtin_prefetch%> must be a constant" -msgstr "аргумент `__builtin_args_info' павінен быць канстантай" +msgid "%q+D is usually a function" +msgstr "`%s' - звычайна функцыя" -#: builtins.c:935 +#: c-decl.c:3122 cp/decl.c:3702 cp/decl2.c:838 #, fuzzy, gcc-internal-format -msgid "invalid second argument to %<__builtin_prefetch%>; using zero" -msgstr "аргумент `__builtin_args_info' павінен быць канстантай" +msgid "typedef %qD is initialized (use __typeof__ instead)" +msgstr "параметр \"%s\" ініцыялізаваны" -#: builtins.c:943 -#, fuzzy, gcc-internal-format -msgid "third argument to %<__builtin_prefetch%> must be a constant" -msgstr "аргумент `__builtin_args_info' павінен быць канстантай" +#: c-decl.c:3127 +#, gcc-internal-format +msgid "function %qD is initialized like a variable" +msgstr "" -#: builtins.c:950 +#. DECL_INITIAL in a PARM_DECL is really DECL_ARG_TYPE. +#: c-decl.c:3133 #, fuzzy, gcc-internal-format -msgid "invalid third argument to %<__builtin_prefetch%>; using zero" -msgstr "аргумент `__builtin_args_info' павінен быць канстантай" +msgid "parameter %qD is initialized" +msgstr "параметр \"%s\" ініцыялізаваны" -#: builtins.c:3815 +#: c-decl.c:3158 #, fuzzy, gcc-internal-format -msgid "argument of %<__builtin_args_info%> must be constant" -msgstr "аргумент `__builtin_args_info' павінен быць канстантай" +msgid "variable %qD has initializer but incomplete type" +msgstr "\"%s\" мае незавершаны тып" -#: builtins.c:3821 +#: c-decl.c:3234 c-decl.c:5858 cp/decl.c:3741 cp/decl.c:10148 #, fuzzy, gcc-internal-format -msgid "argument of %<__builtin_args_info%> out of range" -msgstr "аргумент `__builtin_args_info' выйшаў за межы" +msgid "inline function %q+D given attribute noinline" +msgstr "няма папярэдняга аб'яўлення для \"%s\"" + +#: c-decl.c:3306 +#, gcc-internal-format +msgid "initializer fails to determine size of %q+D" +msgstr "" -#: builtins.c:3827 +#: c-decl.c:3311 #, fuzzy, gcc-internal-format -msgid "missing argument in %<__builtin_args_info%>" -msgstr "прапушчан аргумент у `__builtin_args_info'" +msgid "array size missing in %q+D" +msgstr "прапушчан памер масіва ў `%D'" -#: builtins.c:3923 gimplify.c:1761 +#: c-decl.c:3323 #, fuzzy, gcc-internal-format -msgid "too few arguments to function %" -msgstr "нехапае аргументаў у функцыі \"%s\"" +msgid "zero or negative size array %q+D" +msgstr "нулявы памер масіва `%D'" -#: builtins.c:4086 +#: c-decl.c:3375 varasm.c:1646 #, gcc-internal-format -msgid "first argument to % not of type %" +msgid "storage size of %q+D isn%'t known" msgstr "" -#. Unfortunately, this is merely undefined, rather than a constraint -#. violation, so we cannot make this an error. If this call is never -#. executed, the program is still strictly conforming. -#: builtins.c:4100 +#: c-decl.c:3385 +#, fuzzy, gcc-internal-format +msgid "storage size of %q+D isn%'t constant" +msgstr "тып параметра \"%s\" не аб'яўлены" + +#: c-decl.c:3432 #, gcc-internal-format -msgid "%qT is promoted to %qT when passed through %<...%>" +msgid "ignoring asm-specifier for non-static local variable %q+D" msgstr "" -#: builtins.c:4105 +#: c-decl.c:3460 fortran/f95-lang.c:667 #, gcc-internal-format -msgid "(so you should pass %qT not %qT to %)" +msgid "cannot put object with volatile field into register" msgstr "" -#. We can, however, treat "undefined" any way we please. -#. Call abort to encourage the user to fix the program. -#: builtins.c:4111 c-typeck.c:2034 +#: c-decl.c:3595 #, gcc-internal-format -msgid "if this code is reached, the program will abort" +msgid "ISO C forbids forward parameter declarations" msgstr "" -#: builtins.c:4229 +#: c-decl.c:3722 +#, fuzzy, gcc-internal-format +msgid "bit-field %qs width not an integer constant" +msgstr "бітавае поле \"%s\" мае нерэчаісны тып" + +#: c-decl.c:3730 #, gcc-internal-format -msgid "invalid argument to %<__builtin_frame_address%>" +msgid "negative width in bit-field %qs" msgstr "" -#: builtins.c:4231 +#: c-decl.c:3735 #, gcc-internal-format -msgid "invalid argument to %<__builtin_return_address%>" +msgid "zero width for bit-field %qs" msgstr "" -#: builtins.c:4244 +#: c-decl.c:3745 +#, fuzzy, gcc-internal-format +msgid "bit-field %qs has invalid type" +msgstr "бітавае поле \"%s\" мае нерэчаісны тып" + +#: c-decl.c:3754 #, gcc-internal-format -msgid "unsupported argument to %<__builtin_frame_address%>" +msgid "type of bit-field %qs is a GCC extension" msgstr "" -#: builtins.c:4246 +#: c-decl.c:3763 #, gcc-internal-format -msgid "unsupported argument to %<__builtin_return_address%>" +msgid "width of %qs exceeds its type" msgstr "" -#: builtins.c:4349 -#, fuzzy, gcc-internal-format -msgid "second argument to %<__builtin_expect%> must be a constant" -msgstr "аргумент `__builtin_args_info' павінен быць канстантай" - -#: builtins.c:5606 +#: c-decl.c:3776 #, gcc-internal-format -msgid "%<__builtin_longjmp%> second argument must be 1" +msgid "%qs is narrower than values of its type" msgstr "" -#: builtins.c:5965 -#, fuzzy, gcc-internal-format -msgid "target format does not support infinity" -msgstr "ISO C не падтрымлівае комлексныя цэлалікавыя тыпы" +#: c-decl.c:3925 +#, gcc-internal-format +msgid "type defaults to % in declaration of %qs" +msgstr "" -#: builtins.c:7722 builtins.c:7817 +#: c-decl.c:3953 #, fuzzy, gcc-internal-format -msgid "too few arguments to function %qs" -msgstr "нехапае аргументаў у функцыі \"%s\"" +msgid "duplicate %" +msgstr "паўтарэнне \"const\"" -#: builtins.c:7728 builtins.c:7823 +#: c-decl.c:3955 #, fuzzy, gcc-internal-format -msgid "too many arguments to function %qs" -msgstr "вельмі шмат аргумэнтаў у функцыі `%s'" +msgid "duplicate %" +msgstr "паўтарэнне \"restrict\"" -#: builtins.c:7734 builtins.c:7848 +#: c-decl.c:3957 #, fuzzy, gcc-internal-format -msgid "non-floating-point argument to function %qs" -msgstr "вельмі шмат аргумэнтаў у функцыі `%s'" +msgid "duplicate %" +msgstr "паўтарэнне \"volatile\"" -#: builtins.c:8934 -#, fuzzy, gcc-internal-format -msgid "% used in function with fixed args" +#: c-decl.c:3976 +#, gcc-internal-format +msgid "function definition declared %" msgstr "" -"`va_start' выкарыстоўвываецца ў функцыі з нязьменнай\n" -" колькасьцю аргументаў" -#. Evidently an out of date version of ; can't validate -#. va_start's second argument, but can still work as intended. -#: builtins.c:8941 +#: c-decl.c:3978 #, fuzzy, gcc-internal-format -msgid "%<__builtin_next_arg%> called without an argument" -msgstr "\"__buitin_next_arg\" выклікаецца без аргумента" - -#: builtins.c:8956 -#, gcc-internal-format -msgid "% used with too many arguments" -msgstr "" +msgid "function definition declared %" +msgstr "віртуальныя функцыі не могуць быць сяброўскімі" -#. FIXME: Sometimes with the tree optimizers we can get the -#. not the last argument even though the user used the last -#. argument. We just warn and set the arg to be the last -#. argument so that we will get wrong-code because of -#. it. -#: builtins.c:8976 +#: c-decl.c:3980 #, gcc-internal-format -msgid "second parameter of % not last named argument" +msgid "function definition declared %" msgstr "" -#: c-common.c:832 +#: c-decl.c:3982 #, fuzzy, gcc-internal-format -msgid "%qD is not defined outside of function scope" -msgstr "\"%s\" не абвешчан (першае выкарыстанне ў гэтай функцыі)" +msgid "function definition declared %<__thread%>" +msgstr "віртуальныя функцыі не могуць быць сяброўскімі" -#: c-common.c:853 +#: c-decl.c:3998 #, gcc-internal-format -msgid "string length %qd is greater than the length %qd ISO C%d compilers are required to support" +msgid "storage class specified for structure field %qs" msgstr "" -#: c-common.c:894 +#: c-decl.c:4002 cp/decl.c:7207 #, gcc-internal-format -msgid "overflow in constant expression" +msgid "storage class specified for parameter %qs" msgstr "" -#: c-common.c:914 +#: c-decl.c:4005 cp/decl.c:7209 #, gcc-internal-format -msgid "integer overflow in expression" +msgid "storage class specified for typename" msgstr "" -#: c-common.c:923 +#: c-decl.c:4018 cp/decl.c:7226 #, gcc-internal-format -msgid "floating point overflow in expression" +msgid "%qs initialized and declared %" msgstr "" -#: c-common.c:929 +#: c-decl.c:4020 cp/decl.c:7229 #, gcc-internal-format -msgid "vector overflow in expression" +msgid "%qs has both % and initializer" msgstr "" -#. This detects cases like converting -129 or 256 to unsigned char. -#: c-common.c:951 +#: c-decl.c:4025 #, gcc-internal-format -msgid "large integer implicitly truncated to unsigned type" +msgid "file-scope declaration of %qs specifies %" msgstr "" -#: c-common.c:953 +#: c-decl.c:4027 #, gcc-internal-format -msgid "negative integer implicitly converted to unsigned type" +msgid "file-scope declaration of %qs specifies %" msgstr "" -#: c-common.c:1011 +#: c-decl.c:4032 cp/decl.c:7233 #, gcc-internal-format -msgid "overflow in implicit constant conversion" +msgid "nested function %qs declared %" msgstr "" -#: c-common.c:1147 +#: c-decl.c:4035 cp/decl.c:7243 #, gcc-internal-format -msgid "operation on %qs may be undefined" +msgid "function-scope %qs implicitly auto and declared %<__thread%>" msgstr "" -#: c-common.c:1431 +#. Only the innermost declarator (making a parameter be of +#. array type which is converted to pointer type) +#. may have static or type qualifiers. +#: c-decl.c:4082 c-decl.c:4276 #, gcc-internal-format -msgid "case label does not reduce to an integer constant" +msgid "static or type qualifiers in non-parameter array declarator" msgstr "" -#: c-common.c:1474 +#: c-decl.c:4128 #, gcc-internal-format -msgid "case label value is less than minimum value for type" +msgid "declaration of %qs as array of voids" msgstr "" -#: c-common.c:1482 +#: c-decl.c:4134 #, gcc-internal-format -msgid "case label value exceeds maximum value for type" +msgid "declaration of %qs as array of functions" msgstr "" -#: c-common.c:1490 +#: c-decl.c:4139 +#, fuzzy, gcc-internal-format +msgid "invalid use of structure with flexible array member" +msgstr "нявернае выкарыстанне \"restict\"" + +#: c-decl.c:4159 +#, fuzzy, gcc-internal-format +msgid "size of array %qs has non-integer type" +msgstr "памер масіва \"%s\" адмоўны" + +#: c-decl.c:4164 +#, fuzzy, gcc-internal-format +msgid "ISO C forbids zero-size array %qs" +msgstr "ISO C не дазваляе дэкларацыі метак (label)" + +#: c-decl.c:4171 +#, fuzzy, gcc-internal-format +msgid "size of array %qs is negative" +msgstr "памер масіва \"%s\" адмоўны" + +#: c-decl.c:4185 #, gcc-internal-format -msgid "lower value in case label range less than minimum value for type" +msgid "ISO C90 forbids array %qs whose size can%'t be evaluated" msgstr "" -#: c-common.c:1499 +#: c-decl.c:4189 +#, fuzzy, gcc-internal-format +msgid "ISO C90 forbids variable-size array %qs" +msgstr "ISO C не дазваляе дэкларацыі метак (label)" + +#: c-decl.c:4229 c-decl.c:4398 cp/decl.c:7665 +#, fuzzy, gcc-internal-format +msgid "size of array %qs is too large" +msgstr "памер масіва \"%s\" вельмі вялікі" + +#: c-decl.c:4240 +#, fuzzy, gcc-internal-format +msgid "ISO C90 does not support flexible array members" +msgstr "ISO C89 не падтрымлівае комлексныя тыпы" + +#: c-decl.c:4250 #, gcc-internal-format -msgid "upper value in case label range exceeds maximum value for type" +msgid "array type has incomplete element type" msgstr "" -#: c-common.c:1839 +#: c-decl.c:4308 cp/decl.c:7334 +#, fuzzy, gcc-internal-format +msgid "%qs declared as function returning a function" +msgstr "\"%s\" не абвешчан (першае выкарыстанне ў гэтай функцыі)" + +#: c-decl.c:4313 cp/decl.c:7339 #, gcc-internal-format -msgid "invalid truth-value expression" +msgid "%qs declared as function returning an array" msgstr "" -#: c-common.c:1887 +#: c-decl.c:4333 +#, fuzzy, gcc-internal-format +msgid "function definition has qualified void return type" +msgstr "функцыя не вяртае тып string" + +#: c-decl.c:4336 #, gcc-internal-format -msgid "invalid operands to binary %s" +msgid "type qualifiers ignored on function return type" msgstr "" -#: c-common.c:2122 +#: c-decl.c:4365 c-decl.c:4411 c-decl.c:4506 c-decl.c:4596 #, gcc-internal-format -msgid "comparison is always false due to limited range of data type" +msgid "ISO C forbids qualified function types" msgstr "" -#: c-common.c:2124 +#: c-decl.c:4419 #, gcc-internal-format -msgid "comparison is always true due to limited range of data type" +msgid "typedef %q+D declared %" msgstr "" -#: c-common.c:2194 +#: c-decl.c:4449 #, gcc-internal-format -msgid "comparison of unsigned expression >= 0 is always true" +msgid "ISO C forbids const or volatile function types" msgstr "" -#: c-common.c:2203 +#: c-decl.c:4469 +#, fuzzy, gcc-internal-format +msgid "variable or field %qs declared void" +msgstr "тып параметра \"%s\" не аб'яўлены" + +#: c-decl.c:4499 #, gcc-internal-format -msgid "comparison of unsigned expression < 0 is always false" +msgid "attributes in parameter array declarator ignored" msgstr "" -#: c-common.c:2245 +#: c-decl.c:4533 +#, fuzzy, gcc-internal-format +msgid "parameter %q+D declared %" +msgstr "тып параметра \"%s\" не аб'яўлены" + +#: c-decl.c:4546 +#, fuzzy, gcc-internal-format +msgid "field %qs declared as a function" +msgstr "\"%s\" не абвешчан (першае выкарыстанне ў гэтай функцыі)" + +#: c-decl.c:4552 +#, fuzzy, gcc-internal-format +msgid "field %qs has incomplete type" +msgstr "\"%s\" мае незавершаны тып" + +#: c-decl.c:4566 c-decl.c:4578 c-decl.c:4582 +#, fuzzy, gcc-internal-format +msgid "invalid storage class for function %qs" +msgstr "Нерэчаісны выбар \"%s\"" + +#: c-decl.c:4602 #, gcc-internal-format -msgid "pointer of type % used in arithmetic" +msgid "% function returns non-void value" msgstr "" -#: c-common.c:2251 +#: c-decl.c:4630 +#, fuzzy, gcc-internal-format +msgid "cannot inline function %" +msgstr "не магу ініцыялізаваць сяброўскую функцыю \"%s\"" + +#: c-decl.c:4677 #, gcc-internal-format -msgid "pointer to a function used in arithmetic" +msgid "variable previously declared % redeclared %" msgstr "" -#: c-common.c:2257 +#: c-decl.c:4687 #, gcc-internal-format -msgid "pointer to member function used in arithmetic" +msgid "variable %q+D declared %" msgstr "" -#. Common Ada/Pascal programmer's mistake. We always warn -#. about this since it is so bad. -#: c-common.c:2381 +#. A mere warning is sure to result in improper semantics +#. at runtime. Don't bother to allow this to compile. +#. A mere warning is sure to result in improper +#. semantics at runtime. Don't bother to allow this to +#. compile. +#: c-decl.c:4717 cp/decl.c:6094 cp/decl.c:8255 +#, fuzzy, gcc-internal-format +msgid "thread-local storage not supported for this target" +msgstr "атрыбуты секцыі не падтрымліваюцца для гэтай мэты" + +#: c-decl.c:4782 c-decl.c:5937 #, gcc-internal-format -msgid "the address of %qD, will always evaluate as %" +msgid "function declaration isn%'t a prototype" msgstr "" -#: c-common.c:2477 +#: c-decl.c:4790 #, gcc-internal-format -msgid "suggest parentheses around assignment used as truth value" +msgid "parameter names (without types) in function declaration" msgstr "" -#: c-common.c:2545 c-common.c:2585 +#: c-decl.c:4823 #, fuzzy, gcc-internal-format -msgid "invalid use of %" -msgstr "нявернае выкарыстанне \"restict\"" +msgid "parameter %u (%q+D) has incomplete type" +msgstr "\"%s\" мае незавершаны тып" -#: c-common.c:2801 +#: c-decl.c:4826 #, fuzzy, gcc-internal-format -msgid "invalid application of % to a function type" -msgstr "Нерэчаісны выбар \"%s\"" +msgid "%Jparameter %u has incomplete type" +msgstr "\"%s\" мае незавершаны тып" -#: c-common.c:2811 -#, gcc-internal-format -msgid "invalid application of %qs to a void type" -msgstr "" +#: c-decl.c:4835 +#, fuzzy, gcc-internal-format +msgid "parameter %u (%q+D) has void type" +msgstr "тып параметра \"%s\" не аб'яўлены" -#: c-common.c:2817 +#: c-decl.c:4838 #, fuzzy, gcc-internal-format -msgid "invalid application of %qs to incomplete type %qT " -msgstr "\"%s\" мае незавершаны тып" +msgid "%Jparameter %u has void type" +msgstr "тып параметра \"%s\" не аб'яўлены" -#: c-common.c:2858 +#: c-decl.c:4898 #, gcc-internal-format -msgid "%<__alignof%> applied to a bit-field" +msgid "% as only parameter may not be qualified" msgstr "" -#: c-common.c:3330 +#: c-decl.c:4902 c-decl.c:4936 #, fuzzy, gcc-internal-format -msgid "cannot disable built-in function %qs" -msgstr "не магу ініцыялізаваць сяброўскую функцыю \"%s\"" +msgid "% must be the only parameter" +msgstr "нявернае выкарыстанне \"restict\"" -#: c-common.c:3520 +#: c-decl.c:4930 #, gcc-internal-format -msgid "pointers are not permitted as case values" +msgid "parameter %q+D has just a forward declaration" msgstr "" -#: c-common.c:3524 +#. The %s will be one of 'struct', 'union', or 'enum'. +#: c-decl.c:4975 #, gcc-internal-format -msgid "range expressions in switch statements are non-standard" +msgid "%<%s %E%> declared inside parameter list" msgstr "" -#: c-common.c:3549 +#. The %s will be one of 'struct', 'union', or 'enum'. +#: c-decl.c:4979 #, gcc-internal-format -msgid "empty range specified" +msgid "anonymous %s declared inside parameter list" msgstr "" -#: c-common.c:3608 +#: c-decl.c:4984 #, gcc-internal-format -msgid "duplicate (or overlapping) case value" +msgid "its scope is only this definition or declaration, which is probably not what you want" msgstr "" -#: c-common.c:3609 +#: c-decl.c:5117 +#, fuzzy, gcc-internal-format +msgid "redefinition of %" +msgstr "перанакіраванне stdout: %s" + +#: c-decl.c:5119 +#, fuzzy, gcc-internal-format +msgid "redefinition of %" +msgstr "перанакіраванне stdout: %s" + +#: c-decl.c:5124 +#, fuzzy, gcc-internal-format +msgid "nested redefinition of %" +msgstr "перанакіраванне stdout: %s" + +#: c-decl.c:5126 +#, fuzzy, gcc-internal-format +msgid "nested redefinition of %" +msgstr "перанакіраванне stdout: %s" + +#: c-decl.c:5197 cp/decl.c:3502 #, gcc-internal-format -msgid "%Jthis is the first entry overlapping that value" +msgid "declaration does not declare anything" msgstr "" -#: c-common.c:3613 +#: c-decl.c:5201 +#, fuzzy, gcc-internal-format +msgid "ISO C doesn%'t support unnamed structs/unions" +msgstr "ISO C не падтрымлівае комлексныя цэлалікавыя тыпы" + +#: c-decl.c:5244 c-decl.c:5260 +#, fuzzy, gcc-internal-format +msgid "duplicate member %q+D" +msgstr "паўтарэнне \"%s\"" + +#: c-decl.c:5299 #, gcc-internal-format -msgid "duplicate case value" +msgid "union has no named members" msgstr "" -#: c-common.c:3614 -#, fuzzy, gcc-internal-format -msgid "%Jpreviously used here" -msgstr "папярэдняе вызначэньне" +#: c-decl.c:5301 +#, gcc-internal-format +msgid "union has no members" +msgstr "" -#: c-common.c:3618 +#: c-decl.c:5306 #, gcc-internal-format -msgid "multiple default labels in one switch" +msgid "struct has no named members" msgstr "" -#: c-common.c:3619 +#: c-decl.c:5308 #, gcc-internal-format -msgid "%Jthis is the first default label" +msgid "struct has no members" msgstr "" -#: c-common.c:3668 +#: c-decl.c:5365 #, gcc-internal-format -msgid "%Jcase value %qs not in enumerated type" +msgid "%Jflexible array member in union" msgstr "" -#: c-common.c:3671 +#: c-decl.c:5370 #, gcc-internal-format -msgid "%Jcase value %qs not in enumerated type %qT" +msgid "%Jflexible array member not at end of struct" msgstr "" -#: c-common.c:3738 +#: c-decl.c:5375 #, gcc-internal-format -msgid "%Hswitch missing default case" +msgid "%Jflexible array member in otherwise empty struct" msgstr "" -#. Warn if there are enumerators that don't correspond to -#. case expressions. -#: c-common.c:3772 +#: c-decl.c:5382 +#, fuzzy, gcc-internal-format +msgid "%Jinvalid use of structure with flexible array member" +msgstr "нявернае выкарыстанне \"restict\"" + +#: c-decl.c:5493 #, gcc-internal-format -msgid "%Henumeration value %qE not handled in switch" +msgid "union cannot be made transparent" msgstr "" -#: c-common.c:3799 +#: c-decl.c:5564 #, fuzzy, gcc-internal-format -msgid "taking the address of a label is non-standard" -msgstr "ISO C не дазваляе пусты ізыходны файл" +msgid "nested redefinition of %" +msgstr "перанакіраванне stdout: %s" -#: c-common.c:3968 c-common.c:3987 c-common.c:4005 c-common.c:4032 -#: c-common.c:4051 c-common.c:4074 c-common.c:4098 c-common.c:4124 -#: c-common.c:4158 c-common.c:4202 c-common.c:4230 c-common.c:4258 -#: c-common.c:4277 c-common.c:4608 c-common.c:4639 c-common.c:4731 -#: c-common.c:4798 c-common.c:4844 c-common.c:4902 c-common.c:4931 -#: c-common.c:5217 c-common.c:5240 c-common.c:5279 tree.c:3258 -#: config/darwin.c:1236 config/arm/arm.c:2713 config/arm/arm.c:2740 -#: config/avr/avr.c:4657 config/h8300/h8300.c:5779 config/h8300/h8300.c:5802 -#: config/i386/i386.c:1732 config/i386/i386.c:15735 config/ia64/ia64.c:528 -#: config/ip2k/ip2k.c:3164 config/m68hc11/m68hc11.c:1323 -#: config/sh/symbian.c:414 config/sh/symbian.c:421 +#. This enum is a named one that has been declared already. +#: c-decl.c:5571 #, fuzzy, gcc-internal-format -msgid "%qs attribute ignored" -msgstr "\"%s\" атрыбут ігнарыруецца" +msgid "redeclaration of %" +msgstr "абвяшчэньне шаблёну `%#D'" + +#: c-decl.c:5634 +#, gcc-internal-format +msgid "enumeration values exceed range of largest integer" +msgstr "" + +#: c-decl.c:5651 +#, gcc-internal-format +msgid "specified mode too small for enumeral values" +msgstr "" -#: c-common.c:4315 +#: c-decl.c:5747 #, fuzzy, gcc-internal-format -msgid "unknown machine mode %qs" -msgstr "невядомы рэжым машыны \"%s\"" +msgid "enumerator value for %qE is not an integer constant" +msgstr "памер масіва \"%s\" адмоўны" -#: c-common.c:4335 +#: c-decl.c:5764 #, gcc-internal-format -msgid "specifying vector types with __attribute__ ((mode)) is deprecated" +msgid "overflow in enumeration values" msgstr "" -#: c-common.c:4337 +#: c-decl.c:5769 #, gcc-internal-format -msgid "use __attribute__ ((vector_size)) instead" +msgid "ISO C restricts enumerator values to range of %" +msgstr "" + +#: c-decl.c:5865 +#, gcc-internal-format +msgid "return type is an incomplete type" msgstr "" -#: c-common.c:4346 +#: c-decl.c:5873 #, fuzzy, gcc-internal-format -msgid "unable to emulate %qs" -msgstr "немагу адчыніць файл \"%s\"" +msgid "return type defaults to %" +msgstr "вяртаемы тып \"%s\" не \"int\"" -#: c-common.c:4356 +#: c-decl.c:5944 #, fuzzy, gcc-internal-format -msgid "invalid pointer mode %qs" -msgstr "Нерэчаісны выбар \"%s\"" +msgid "no previous prototype for %q+D" +msgstr "няма папярэдняга прататыпа для \"%s\"" -#: c-common.c:4371 +#: c-decl.c:5953 #, fuzzy, gcc-internal-format -msgid "no data type for mode %qs" -msgstr "няма тыпа дадзеных для рэжыма \"%s\"" +msgid "%q+D was used with no prototype before its definition" +msgstr "\"%s\" не абвешчан (першае выкарыстанне ў гэтай функцыі)" -#: c-common.c:4381 -#, gcc-internal-format -msgid "cannot use mode %qs for enumeral types" -msgstr "" +#: c-decl.c:5959 +#, fuzzy, gcc-internal-format +msgid "no previous declaration for %q+D" +msgstr "няма папярэдняга аб'яўлення для \"%s\"" -#: c-common.c:4405 +#: c-decl.c:5969 #, fuzzy, gcc-internal-format -msgid "mode %qs applied to inappropriate type" -msgstr "\"%s\" мае незавершаны тып" +msgid "%q+D was used with no declaration before its definition" +msgstr "\"%s\" не абвешчан (першае выкарыстанне ў гэтай функцыі)" -#: c-common.c:4436 +#: c-decl.c:6001 c-decl.c:6518 #, fuzzy, gcc-internal-format -msgid "%Jsection attribute cannot be specified for local variables" -msgstr "атрыбуты секцыі не падтрымліваюцца для гэтай мэты" +msgid "return type of %q+D is not %" +msgstr "вяртаемы тып \"%s\" не \"int\"" -#: c-common.c:4447 +#: c-decl.c:6016 #, fuzzy, gcc-internal-format -msgid "%Jsection of %qD conflicts with previous declaration" -msgstr "секцыя \"%s\" канфліктуе з папярэдняй дэкларацыяй" +msgid "first argument of %q+D should be %" +msgstr "першым аргументам \"%s\" павінен быць \"int\"" -#: c-common.c:4456 +#: c-decl.c:6024 #, fuzzy, gcc-internal-format -msgid "%Jsection attribute not allowed for %qD" -msgstr "атрыбуты секцыі не падтрымліваюцца для гэтай мэты" +msgid "second argument of %q+D should be %" +msgstr "другім аргументам \"%s\" павінен быць \"char **\"" + +#: c-decl.c:6033 +#, fuzzy, gcc-internal-format +msgid "third argument of %q+D should probably be %" +msgstr "другім аргументам \"%s\" павінен быць \"char **\"" + +#: c-decl.c:6043 +#, gcc-internal-format +msgid "%q+D takes only zero or two arguments" +msgstr "" -#: c-common.c:4462 +#: c-decl.c:6046 #, fuzzy, gcc-internal-format -msgid "%Jsection attributes are not supported for this target" -msgstr "атрыбуты секцыі не падтрымліваюцца для гэтай мэты" +msgid "%q+D is normally a non-static function" +msgstr "`%s' - звычайна функцыя" -#: c-common.c:4500 +#: c-decl.c:6092 #, gcc-internal-format -msgid "requested alignment is not a constant" +msgid "%Jold-style parameter declarations in prototyped function definition" msgstr "" -#: c-common.c:4505 +#: c-decl.c:6106 #, gcc-internal-format -msgid "requested alignment is not a power of 2" +msgid "%Jtraditional C rejects ISO C style function definitions" msgstr "" -#: c-common.c:4510 +#: c-decl.c:6122 +#, fuzzy, gcc-internal-format +msgid "%Jparameter name omitted" +msgstr "тып параметра \"%s\" не аб'яўлены" + +#: c-decl.c:6156 #, gcc-internal-format -msgid "requested alignment is too large" +msgid "%Jold-style function definition" msgstr "" -#: c-common.c:4536 +#: c-decl.c:6165 #, gcc-internal-format -msgid "%Jalignment may not be specified for %qD" +msgid "%Jparameter name missing from parameter list" msgstr "" -#: c-common.c:4574 +#: c-decl.c:6176 #, gcc-internal-format -msgid "%J%qD defined both normally and as an alias" +msgid "%q+D declared as a non-parameter" msgstr "" -#: c-common.c:4590 +#: c-decl.c:6181 #, fuzzy, gcc-internal-format -msgid "alias argument not a string" -msgstr "аргумент для \"%s\" прапушчан" - -#: c-common.c:4632 -#, fuzzy, gcc-internal-format -msgid "%qs attribute ignored on non-class types" -msgstr "\"%s\" атрыбут ігнарыруецца" - -#: c-common.c:4645 -#, fuzzy, gcc-internal-format -msgid "visibility argument not a string" -msgstr "аргумент для \"%s\" прапушчан" +msgid "multiple parameters named %q+D" +msgstr "невыкарыстаемы параметр \"%s\"" -#: c-common.c:4657 +#: c-decl.c:6189 #, fuzzy, gcc-internal-format -msgid "%qE attribute ignored on types" -msgstr "\"%s\" атрыбут ігнарыруецца" +msgid "parameter %q+D declared with void type" +msgstr "тып параметра \"%s\" не аб'яўлены" -#: c-common.c:4672 +#: c-decl.c:6206 c-decl.c:6208 #, gcc-internal-format -msgid "visibility argument must be one of \"default\", \"hidden\", \"protected\" or \"internal\"" +msgid "type of %q+D defaults to %" msgstr "" -#: c-common.c:4741 +#: c-decl.c:6227 #, fuzzy, gcc-internal-format -msgid "tls_model argument not a string" -msgstr "не хапае аргументаў у функцыі" +msgid "parameter %q+D has incomplete type" +msgstr "\"%s\" мае незавершаны тып" -#: c-common.c:4750 +#: c-decl.c:6233 #, gcc-internal-format -msgid "tls_model argument must be one of \"local-exec\", \"initial-exec\", \"local-dynamic\" or \"global-dynamic\"" +msgid "declaration for parameter %q+D but no such parameter" msgstr "" -#: c-common.c:4772 c-common.c:4818 -#, fuzzy, gcc-internal-format -msgid "%J%qE attribute applies only to functions" -msgstr "\"%s\" звычайна функцыя" - -#: c-common.c:4777 c-common.c:4823 +#: c-decl.c:6283 #, gcc-internal-format -msgid "%Jcan%'t set %qE attribute after definition" +msgid "number of arguments doesn%'t match built-in prototype" msgstr "" -#: c-common.c:4899 +#: c-decl.c:6287 #, fuzzy, gcc-internal-format -msgid "%qs attribute ignored for %qs" -msgstr "\"%s\" атрыбут ігнарыруецца" +msgid "number of arguments doesn%'t match prototype" +msgstr "памылковая колькасьць аргументаў, зададзеных для атрыбута `%s'" -#: c-common.c:4960 +#: c-decl.c:6288 c-decl.c:6328 c-decl.c:6341 #, fuzzy, gcc-internal-format -msgid "invalid vector type for attribute %qs" -msgstr "нявернае выкарыстанне \"restict\"" +msgid "%Hprototype declaration" +msgstr "пустое абвяшчэньне" -#: c-common.c:4969 +#: c-decl.c:6322 #, gcc-internal-format -msgid "number of components of the vector not a power of two" +msgid "promoted argument %qD doesn%'t match built-in prototype" msgstr "" -#: c-common.c:4997 +#: c-decl.c:6326 #, gcc-internal-format -msgid "nonnull attribute without arguments on a non-prototype" +msgid "promoted argument %qD doesn%'t match prototype" msgstr "" -#: c-common.c:5012 +#: c-decl.c:6336 #, gcc-internal-format -msgid "nonnull argument has invalid operand number (argument %lu)" +msgid "argument %qD doesn%'t match built-in prototype" msgstr "" -#: c-common.c:5031 +#: c-decl.c:6340 #, gcc-internal-format -msgid "nonnull argument with out-of-range operand number (argument %lu, operand %lu)" +msgid "argument %qD doesn%'t match prototype" msgstr "" -#: c-common.c:5039 +#: c-decl.c:6563 cp/decl.c:10942 #, gcc-internal-format -msgid "nonnull argument references non-pointer operand (argument %lu, operand %lu)" +msgid "no return statement in function returning non-void" msgstr "" -#: c-common.c:5094 c-common.c:5138 +#: c-decl.c:6572 #, gcc-internal-format -msgid "missing sentinel in function call" +msgid "this function may return with or without a value" msgstr "" -#: c-common.c:5117 -#, fuzzy, gcc-internal-format -msgid "not enough arguments to fit a sentinel" -msgstr "не хапае аргументаў у функцыі" - -#: c-common.c:5180 +#. If we get here, declarations have been used in a for loop without +#. the C99 for loop scope. This doesn't make much sense, so don't +#. allow it. +#: c-decl.c:6665 #, gcc-internal-format -msgid "null argument where non-null required (argument %lu)" +msgid "% loop initial declaration used outside C99 mode" msgstr "" -#: c-common.c:5251 +#: c-decl.c:6694 #, gcc-internal-format -msgid "cleanup argument not an identifier" +msgid "declaration of static variable %q+D in % loop initial declaration" msgstr "" -#: c-common.c:5258 -#, fuzzy, gcc-internal-format -msgid "cleanup argument not a function" -msgstr "вельмі шмат аргументаў у функцыі" - -#: c-common.c:5296 +#: c-decl.c:6697 #, gcc-internal-format -msgid "%qs attribute requires prototypes with named arguments" +msgid "declaration of % variable %q+D in % loop initial declaration" msgstr "" -#: c-common.c:5307 -#, fuzzy, gcc-internal-format -msgid "%qs attribute only applies to variadic functions" -msgstr "\"%s\" звычайна функцыя" - -#: c-common.c:5320 -#, fuzzy, gcc-internal-format -msgid "requested position is not an integer constant" -msgstr "аргумент `__builtin_args_info' павінен быць канстантай" +#: c-decl.c:6702 +#, gcc-internal-format +msgid "% declared in % loop initial declaration" +msgstr "" -#: c-common.c:5327 +#: c-decl.c:6706 #, gcc-internal-format -msgid "requested position is less than zero" +msgid "% declared in % loop initial declaration" msgstr "" -#: c-common.c:5633 +#: c-decl.c:6710 #, gcc-internal-format -msgid "%Hignoring return value of %qD, declared with attribute warn_unused_result" +msgid "% declared in % loop initial declaration" msgstr "" -#: c-common.c:5637 +#: c-decl.c:6714 #, gcc-internal-format -msgid "%Hignoring return value of function declared with attribute warn_unused_result" +msgid "declaration of non-variable %q+D in % loop initial declaration" msgstr "" -#: c-common.c:5697 +#: c-decl.c:6998 c-decl.c:7149 c-decl.c:7359 #, fuzzy, gcc-internal-format -msgid "attempt to take address of bit-field structure member %qs" -msgstr "не магу атрымаць адрас бітавага поля \"%s\"" +msgid "duplicate %qE" +msgstr "паўтарэньне `%s'" -#: c-common.c:5749 +#: c-decl.c:7021 c-decl.c:7158 c-decl.c:7261 #, gcc-internal-format -msgid "invalid lvalue in assignment" +msgid "two or more data types in declaration specifiers" msgstr "" -#: c-common.c:5752 -#, fuzzy, gcc-internal-format -msgid "invalid lvalue in increment" -msgstr "Нерэчаісны выбар \"%s\"" - -#: c-common.c:5755 +#: c-decl.c:7033 cp/decl.c:6897 #, fuzzy, gcc-internal-format -msgid "invalid lvalue in decrement" -msgstr "Нерэчаісны выбар %s" +msgid "% is too long for GCC" +msgstr "`long long long' - вельмі доўга для GCC" -#: c-common.c:5758 +#: c-decl.c:7040 c-decl.c:7232 #, gcc-internal-format -msgid "invalid lvalue in unary %<&%>" +msgid "both % and % in declaration specifiers" msgstr "" -#: c-common.c:5761 +#: c-decl.c:7046 +#, fuzzy, gcc-internal-format +msgid "ISO C90 does not support %" +msgstr "ISO C89 не падтрымлівае `long long'" + +#: c-decl.c:7051 c-decl.c:7071 #, gcc-internal-format -msgid "invalid lvalue in asm statement" +msgid "both % and % in declaration specifiers" msgstr "" -#. Except for passing an argument to an unprototyped function, -#. this is a constraint violation. When passing an argument to -#. an unprototyped function, it is compile-time undefined; -#. making it a constraint in that case was rejected in -#. DR#252. -#: c-convert.c:83 c-typeck.c:1441 c-typeck.c:3545 cp/typeck.c:1367 -#: cp/typeck.c:5840 fortran/convert.c:89 treelang/tree-convert.c:79 +#: c-decl.c:7054 c-decl.c:7165 #, gcc-internal-format -msgid "void value not ignored as it ought to be" +msgid "both % and % in declaration specifiers" msgstr "" -#: c-convert.c:121 fortran/convert.c:122 java/typeck.c:156 -#: treelang/tree-convert.c:105 +#: c-decl.c:7057 c-decl.c:7184 #, gcc-internal-format -msgid "conversion to non-scalar type requested" +msgid "both % and %<_Bool%> in declaration specifiers" msgstr "" -#: c-decl.c:538 +#: c-decl.c:7060 c-decl.c:7203 #, gcc-internal-format -msgid "%Jarray %qD assumed to have one element" +msgid "both % and % in declaration specifiers" msgstr "" -#: c-decl.c:651 +#: c-decl.c:7063 c-decl.c:7216 #, gcc-internal-format -msgid "GCC supports only %u nested scopes" +msgid "both % and % in declaration specifiers" msgstr "" -#: c-decl.c:737 -#, fuzzy, gcc-internal-format -msgid "%Jlabel %qD used but not defined" -msgstr "адмеціна `%D' выкарыстоўвываецца, але ня вызначана" - -#: c-decl.c:743 -#, fuzzy, gcc-internal-format -msgid "%Jlabel %qD defined but not used" -msgstr "адмеціна `%D' вызначана, але не выкарыстоўваецца" - -#: c-decl.c:745 -#, fuzzy, gcc-internal-format -msgid "%Jlabel %qD declared but not defined" -msgstr "адмеціна `%D' выкарыстоўвываецца, але ня вызначана" - -#: c-decl.c:780 -#, fuzzy, gcc-internal-format -msgid "%Jnested function %qD declared but never defined" -msgstr "\"%s\" не абвешчан (першае выкарыстанне ў гэтай функцыі)" - -#: c-decl.c:794 cp/decl.c:568 -#, fuzzy, gcc-internal-format -msgid "%Junused variable %qD" -msgstr "невыкарыстоўваемая пераменная \"%s\"" - -#: c-decl.c:798 +#: c-decl.c:7074 c-decl.c:7168 #, gcc-internal-format -msgid "%Jtype of array %qD completed incompatibly with implicit initialization" +msgid "both % and % in declaration specifiers" msgstr "" -#: c-decl.c:1032 +#: c-decl.c:7077 c-decl.c:7187 #, gcc-internal-format -msgid "a parameter list with an ellipsis can%'t match an empty parameter name list declaration" +msgid "both % and %<_Bool%> in declaration specifiers" msgstr "" -#: c-decl.c:1039 +#: c-decl.c:7080 c-decl.c:7206 #, gcc-internal-format -msgid "an argument type that has a default promotion can%'t match an empty parameter name list declaration" +msgid "both % and % in declaration specifiers" msgstr "" -#: c-decl.c:1074 +#: c-decl.c:7083 c-decl.c:7219 #, gcc-internal-format -msgid "%Jprototype for %qD declares more arguments than previous old-style definition" +msgid "both % and % in declaration specifiers" msgstr "" -#: c-decl.c:1080 +#: c-decl.c:7086 c-decl.c:7235 #, gcc-internal-format -msgid "%Jprototype for %qD declares fewer arguments than previous old-style definition" +msgid "both % and % in declaration specifiers" msgstr "" -#: c-decl.c:1089 +#: c-decl.c:7094 c-decl.c:7114 #, gcc-internal-format -msgid "%Jprototype for %qD declares argument %d with incompatible type" +msgid "both % and % in declaration specifiers" msgstr "" -#. If we get here, no errors were found, but do issue a warning -#. for this poor-style construct. -#: c-decl.c:1102 +#: c-decl.c:7097 c-decl.c:7171 #, gcc-internal-format -msgid "%Jprototype for %qD follows non-prototype definition" +msgid "both % and % in declaration specifiers" msgstr "" -#: c-decl.c:1117 -#, fuzzy, gcc-internal-format -msgid "%Jprevious definition of %qD was here" -msgstr "папярэдняе вызначэньне" - -#: c-decl.c:1119 -#, fuzzy, gcc-internal-format -msgid "%Jprevious implicit declaration of %qD was here" -msgstr "няма папярэдняга аб'яўлення для \"%s\"" - -#: c-decl.c:1121 -#, fuzzy, gcc-internal-format -msgid "%Jprevious declaration of %qD was here" -msgstr "няма папярэдняга аб'яўлення для \"%s\"" - -#: c-decl.c:1158 +#: c-decl.c:7100 c-decl.c:7190 #, gcc-internal-format -msgid "%J%qD redeclared as different kind of symbol" +msgid "both % and %<_Bool%> in declaration specifiers" msgstr "" -#: c-decl.c:1163 -#, fuzzy, gcc-internal-format -msgid "%Jbuilt-in function %qD declared as non-function" -msgstr "\"%s\" не абвешчан (першае выкарыстанне ў гэтай функцыі)" - -#: c-decl.c:1166 c-decl.c:1282 c-decl.c:1901 -#, fuzzy, gcc-internal-format -msgid "%Jdeclaration of %qD shadows a built-in function" -msgstr "не магу ініцыялізаваць сяброўскую функцыю \"%s\"" - -#: c-decl.c:1175 -#, fuzzy, gcc-internal-format -msgid "%Jredeclaration of enumerator %qD" -msgstr "абвяшчэньне шаблёну `%#D'" - -#. If types don't match for a built-in, throw away the -#. built-in. No point in calling locate_old_decl here, it -#. won't print anything. -#: c-decl.c:1196 -#, fuzzy, gcc-internal-format -msgid "%Jconflicting types for built-in function %qD" -msgstr "паўторнае абвяшчэнне меткі \"%s\"" - -#: c-decl.c:1220 c-decl.c:1233 c-decl.c:1243 +#: c-decl.c:7103 c-decl.c:7222 #, gcc-internal-format -msgid "%Jconflicting types for %qD" +msgid "both % and % in declaration specifiers" msgstr "" -#: c-decl.c:1241 +#: c-decl.c:7106 c-decl.c:7238 #, gcc-internal-format -msgid "%J conflicting type qualifiers for %qD" +msgid "both % and % in declaration specifiers" msgstr "" -#. Allow OLDDECL to continue in use. -#: c-decl.c:1258 -#, fuzzy, gcc-internal-format -msgid "%Jredefinition of typedef %qD" -msgstr "перанакіраванне stdout: %s" - -#: c-decl.c:1300 c-decl.c:1310 c-decl.c:1323 c-decl.c:1405 -#, fuzzy, gcc-internal-format -msgid "%Jredefinition of %qD" -msgstr "перанакіраванне stdout: %s" - -#: c-decl.c:1362 c-decl.c:1443 +#: c-decl.c:7117 c-decl.c:7174 #, gcc-internal-format -msgid "%Jstatic declaration of %qD follows non-static declaration" +msgid "both % and % in declaration specifiers" msgstr "" -#: c-decl.c:1372 c-decl.c:1379 c-decl.c:1432 c-decl.c:1440 +#: c-decl.c:7120 c-decl.c:7193 #, gcc-internal-format -msgid "%Jnon-static declaration of %qD follows static declaration" +msgid "both % and %<_Bool%> in declaration specifiers" msgstr "" -#: c-decl.c:1392 +#: c-decl.c:7123 c-decl.c:7225 #, gcc-internal-format -msgid "%Jthread-local declaration of %qD follows non-thread-local declaration" +msgid "both % and % in declaration specifiers" msgstr "" -#: c-decl.c:1395 +#: c-decl.c:7126 c-decl.c:7241 #, gcc-internal-format -msgid "%Jnon-thread-local declaration of %qD follows thread-local declaration" +msgid "both % and % in declaration specifiers" msgstr "" -#: c-decl.c:1425 +#: c-decl.c:7134 #, fuzzy, gcc-internal-format -msgid "%Jextern declaration of %qD follows declaration with no linkage" -msgstr "няма папярэдняга аб'яўлення для \"%s\"" +msgid "ISO C90 does not support complex types" +msgstr "ISO C89 не падтрымлівае комлексныя тыпы" -#: c-decl.c:1461 +#: c-decl.c:7136 c-decl.c:7177 #, gcc-internal-format -msgid "%Jdeclaration of %qD with no linkage follows extern declaration" +msgid "both % and % in declaration specifiers" msgstr "" -#: c-decl.c:1467 -#, fuzzy, gcc-internal-format -msgid "%Jredeclaration of %qD with no linkage" -msgstr "няма папярэдняга аб'яўлення для \"%s\"" - -#: c-decl.c:1481 +#: c-decl.c:7139 c-decl.c:7196 #, gcc-internal-format -msgid "%Jredeclaration of %qD with different visibility (old visibility preserved)" +msgid "both % and %<_Bool%> in declaration specifiers" msgstr "" -#: c-decl.c:1492 -#, fuzzy, gcc-internal-format -msgid "%Jinline declaration of %qD follows declaration with attribute noinline" -msgstr "няма папярэдняга аб'яўлення для \"%s\"" +#: c-decl.c:7278 +#, gcc-internal-format +msgid "%qE fails to be a typedef or built in type" +msgstr "" -#: c-decl.c:1499 +#: c-decl.c:7310 #, fuzzy, gcc-internal-format -msgid "%Jdeclaration of %qD with attribute noinline follows inline declaration " -msgstr "няма папярэдняга аб'яўлення для \"%s\"" +msgid "%qE is not at beginning of declaration" +msgstr "\"%s\" - гэта не пачатак дэкларацыі" -#: c-decl.c:1514 +#: c-decl.c:7324 #, gcc-internal-format -msgid "%J%qD declared inline after being called" +msgid "%<__thread%> used with %" msgstr "" -#: c-decl.c:1520 -#, fuzzy, gcc-internal-format -msgid "%J%qD declared inline after its definition" -msgstr "\"%s\" не абвешчан (першае выкарыстанне ў гэтай функцыі)" +#: c-decl.c:7326 +#, gcc-internal-format +msgid "%<__thread%> used with %" +msgstr "" -#: c-decl.c:1540 -#, fuzzy, gcc-internal-format -msgid "%Jredefinition of parameter %qD" -msgstr "перанакіраванне stdout: %s" +#: c-decl.c:7328 +#, gcc-internal-format +msgid "%<__thread%> used with %" +msgstr "" -#: c-decl.c:1564 -#, fuzzy, gcc-internal-format -msgid "%Jredundant redeclaration of %qD" -msgstr "Нерэчаіснае абвяшчэнне" +#: c-decl.c:7339 cp/parser.c:7361 +#, gcc-internal-format +msgid "%<__thread%> before %" +msgstr "" -#: c-decl.c:1888 -#, fuzzy, gcc-internal-format -msgid "%Jdeclaration of %qD shadows previous non-variable" -msgstr "секцыя \"%s\" канфліктуе з папярэдняй дэкларацыяй" +#: c-decl.c:7348 cp/parser.c:7351 +#, gcc-internal-format +msgid "%<__thread%> before %" +msgstr "" -#: c-decl.c:1893 +#: c-decl.c:7364 #, gcc-internal-format -msgid "%Jdeclaration of %qD shadows a parameter" +msgid "multiple storage classes in declaration specifiers" msgstr "" -#: c-decl.c:1896 +#: c-decl.c:7371 #, gcc-internal-format -msgid "%Jdeclaration of %qD shadows a global declaration" +msgid "%<__thread%> used with %qE" msgstr "" -#: c-decl.c:1906 +#: c-decl.c:7425 #, fuzzy, gcc-internal-format -msgid "%Jdeclaration of %qD shadows a previous local" -msgstr "секцыя \"%s\" канфліктуе з папярэдняй дэкларацыяй" +msgid "ISO C does not support plain % meaning %" +msgstr "ISO C не падтрымлівае просты \"complex\" у значэнні \"double complex\"" -#: c-decl.c:1909 cp/name-lookup.c:942 cp/name-lookup.c:973 -#: cp/name-lookup.c:981 -#, fuzzy, gcc-internal-format -msgid "%Jshadowed declaration is here" -msgstr "няма папярэдняга аб'яўлення для \"%s\"" +#: c-decl.c:7470 c-decl.c:7496 +#, gcc-internal-format +msgid "ISO C does not support complex integer types" +msgstr "ISO C не падтрымлівае комлексныя цэлалікавыя тыпы" -#: c-decl.c:2110 +#: c-decl.c:7570 toplev.c:821 #, fuzzy, gcc-internal-format -msgid "nested extern declaration of %qD" -msgstr "пустое абвяшчэнне" +msgid "%q+F used but never defined" +msgstr "адмеціна `%s' выкарыстоўвываецца, але ня вызначана" -#: c-decl.c:2278 -#, fuzzy, gcc-internal-format -msgid "implicit declaration of function %qE" -msgstr "няма папярэдняга аб'яўлення для \"%s\"" +#: c-format.c:97 c-format.c:206 +#, gcc-internal-format +msgid "format string has invalid operand number" +msgstr "" -#: c-decl.c:2339 -#, fuzzy, gcc-internal-format -msgid "incompatible implicit declaration of built-in function %qD" -msgstr "няма папярэдняга аб'яўлення для \"%s\"" +#: c-format.c:114 +#, gcc-internal-format +msgid "function does not return string type" +msgstr "функцыя не вяртае тып string" -#: c-decl.c:2348 +#: c-format.c:143 #, fuzzy, gcc-internal-format -msgid "incompatible implicit declaration of function %qD" -msgstr "няма папярэдняга аб'яўлення для \"%s\"" +msgid "format string argument not a string type" +msgstr "функцыя не вяртае тып string" -#: c-decl.c:2401 -#, fuzzy, gcc-internal-format -msgid "%qE undeclared here (not in a function)" -msgstr "\"%s\" не абвешчан (першае выкарыстанне ў гэтай функцыі)" +#: c-format.c:186 +#, gcc-internal-format +msgid "unrecognized format specifier" +msgstr "" -#: c-decl.c:2406 -#, fuzzy, gcc-internal-format -msgid "%qE undeclared (first use in this function)" -msgstr "\"%s\" не абвешчан (першае выкарыстанне ў гэтай функцыі)" +#: c-format.c:198 +#, gcc-internal-format +msgid "%qE is an unrecognized format function type" +msgstr "" -#: c-decl.c:2410 +#: c-format.c:212 #, gcc-internal-format -msgid "(Each undeclared identifier is reported only once" -msgstr "(Аб кожным неабвешчаным ідэнтыфікатары паведамляецца" +msgid "%<...%> has invalid operand number" +msgstr "" -#: c-decl.c:2411 +#: c-format.c:219 #, gcc-internal-format -msgid "for each function it appears in.)" -msgstr "адзін раз для кожнай функцыі, дзе ён з'яўляецца.)" +msgid "format string argument follows the args to be formatted" +msgstr "" -#: c-decl.c:2449 +#: c-format.c:899 #, gcc-internal-format -msgid "label %qs referenced outside of any function" +msgid "function might be possible candidate for %qs format attribute" msgstr "" -#: c-decl.c:2492 -#, fuzzy, gcc-internal-format -msgid "duplicate label declaration %qs" -msgstr "паўторнае абвяшчэньне адмеціны `%s'" +#: c-format.c:991 c-format.c:1012 c-format.c:2026 +#, gcc-internal-format +msgid "missing $ operand number in format" +msgstr "" -#: c-decl.c:2528 -#, fuzzy, gcc-internal-format -msgid "%Hduplicate label %qD" -msgstr "паўтарэнне \"%s\"" +#: c-format.c:1021 +#, gcc-internal-format +msgid "%s does not support %%n$ operand number formats" +msgstr "" -#: c-decl.c:2538 +#: c-format.c:1028 #, gcc-internal-format -msgid "%Jjump into statement expression" +msgid "operand number out of range in format" msgstr "" -#: c-decl.c:2540 +#: c-format.c:1051 #, gcc-internal-format -msgid "%Jjump into scope of identifier with variably modified type" +msgid "format argument %d used more than once in %s format" msgstr "" -#: c-decl.c:2555 +#: c-format.c:1083 #, gcc-internal-format -msgid "%Htraditional C lacks a separate namespace for labels, identifier %qs conflicts" +msgid "$ operand number used after format without operand number" msgstr "" -#: c-decl.c:2631 +#: c-format.c:1114 #, gcc-internal-format -msgid "%H%qs defined as wrong kind of tag" +msgid "format argument %d unused before used argument %d in $-style format" msgstr "" -#: c-decl.c:2855 +#: c-format.c:1209 #, gcc-internal-format -msgid "unnamed struct/union that defines no instances" +msgid "format not a string literal, format string not checked" msgstr "" -#: c-decl.c:2863 +#: c-format.c:1224 c-format.c:1227 #, gcc-internal-format -msgid "empty declaration with storage class specifier does not redeclare tag" +msgid "format not a string literal and no format arguments" msgstr "" -#: c-decl.c:2874 +#: c-format.c:1230 #, gcc-internal-format -msgid "empty declaration with type qualifier does not redeclare tag" +msgid "format not a string literal, argument types not checked" msgstr "" -#: c-decl.c:2895 c-decl.c:2902 -#, fuzzy, gcc-internal-format -msgid "useless type name in empty declaration" -msgstr "паўторнае абвяшчэнне меткі \"%s\"" +#: c-format.c:1243 +#, gcc-internal-format +msgid "too many arguments for format" +msgstr "" -#: c-decl.c:2910 -#, fuzzy, gcc-internal-format -msgid "% in empty declaration" -msgstr "пустое абвяшчэньне" +#: c-format.c:1246 +#, gcc-internal-format +msgid "unused arguments in $-style format" +msgstr "" -#: c-decl.c:2916 +#: c-format.c:1249 #, gcc-internal-format -msgid "% in file-scope empty declaration" +msgid "zero-length %s format string" msgstr "" -#: c-decl.c:2922 +#: c-format.c:1253 #, gcc-internal-format -msgid "% in file-scope empty declaration" +msgid "format is a wide character string" msgstr "" -#: c-decl.c:2928 -#, fuzzy, gcc-internal-format -msgid "useless storage class specifier in empty declaration" -msgstr "паўторнае абвяшчэнне меткі \"%s\"" +#: c-format.c:1256 +#, gcc-internal-format +msgid "unterminated format string" +msgstr "" -#: c-decl.c:2934 +#: c-format.c:1470 #, gcc-internal-format -msgid "useless %<__thread%> in empty declaration" +msgid "embedded %<\\0%> in format" msgstr "" -#: c-decl.c:2942 -#, fuzzy, gcc-internal-format -msgid "useless type qualifier in empty declaration" -msgstr "паўторнае абвяшчэнне меткі \"%s\"" +#: c-format.c:1485 +#, gcc-internal-format +msgid "spurious trailing %<%%%> in format" +msgstr "" -#: c-decl.c:2949 c-parse.y:781 c-parse.y:783 +#: c-format.c:1529 c-format.c:1774 #, gcc-internal-format -msgid "empty declaration" -msgstr "пустое абвяшчэньне" +msgid "repeated %s in format" +msgstr "" -#: c-decl.c:3015 -#, fuzzy, gcc-internal-format -msgid "ISO C90 does not support % or type qualifiers in parameter array declarators" -msgstr "ISO C89 не падтрымлівае \"long long\"" +#: c-format.c:1542 +#, gcc-internal-format +msgid "missing fill character at end of strfmon format" +msgstr "" -#: c-decl.c:3018 -#, fuzzy, gcc-internal-format -msgid "ISO C90 does not support %<[*]%> array declarators" -msgstr "ISO C89 не падтрымлівае \"long long\"" +#: c-format.c:1586 c-format.c:1688 c-format.c:1973 c-format.c:2038 +#, gcc-internal-format +msgid "too few arguments for format" +msgstr "" -#: c-decl.c:3021 -#, fuzzy, gcc-internal-format -msgid "GCC does not yet properly implement %<[*]%> array declarators" -msgstr "ISO C89 не падтрымлівае \"long long\"" +#: c-format.c:1627 +#, gcc-internal-format +msgid "zero width in %s format" +msgstr "" -#: c-decl.c:3040 +#: c-format.c:1645 #, gcc-internal-format -msgid "static or type qualifiers in abstract declarator" +msgid "empty left precision in %s format" msgstr "" -#: c-decl.c:3099 -#, fuzzy, gcc-internal-format -msgid "%J%qD is usually a function" -msgstr "`%s' - звычайна функцыя" +#: c-format.c:1718 +#, gcc-internal-format +msgid "empty precision in %s format" +msgstr "" -#: c-decl.c:3108 cp/decl.c:3625 cp/decl2.c:850 +#: c-format.c:1758 #, fuzzy, gcc-internal-format -msgid "typedef %qD is initialized (use __typeof__ instead)" -msgstr "параметр \"%s\" ініцыялізаваны" +msgid "%s does not support the %qs %s length modifier" +msgstr "%s не падтрымлівае %s" -#: c-decl.c:3113 +#: c-format.c:1808 #, gcc-internal-format -msgid "function %qD is initialized like a variable" +msgid "conversion lacks type at end of format" msgstr "" -#. DECL_INITIAL in a PARM_DECL is really DECL_ARG_TYPE. -#: c-decl.c:3119 -#, fuzzy, gcc-internal-format -msgid "parameter %qD is initialized" -msgstr "параметр \"%s\" ініцыялізаваны" +#: c-format.c:1819 +#, gcc-internal-format +msgid "unknown conversion type character %qc in format" +msgstr "" -#: c-decl.c:3144 -#, fuzzy, gcc-internal-format -msgid "variable %qD has initializer but incomplete type" -msgstr "\"%s\" мае незавершаны тып" +#: c-format.c:1822 +#, gcc-internal-format +msgid "unknown conversion type character 0x%x in format" +msgstr "" -#: c-decl.c:3220 c-decl.c:5815 cp/decl.c:3664 cp/decl.c:9893 +#: c-format.c:1829 #, fuzzy, gcc-internal-format -msgid "%Jinline function %qD given attribute noinline" -msgstr "няма папярэдняга аб'яўлення для \"%s\"" +msgid "%s does not support the %<%%%c%> %s format" +msgstr "%s не падтрымлівае %s" -#: c-decl.c:3291 +#: c-format.c:1845 #, gcc-internal-format -msgid "%Jinitializer fails to determine size of %qD" +msgid "%s used with %<%%%c%> %s format" msgstr "" -#: c-decl.c:3296 -#, fuzzy, gcc-internal-format -msgid "%Jarray size missing in %qD" -msgstr "прапушчан памер масіва ў `%D'" +#: c-format.c:1854 +#, gcc-internal-format +msgid "%s does not support %s" +msgstr "%s не падтрымлівае %s" -#: c-decl.c:3308 +#: c-format.c:1864 #, fuzzy, gcc-internal-format -msgid "%Jzero or negative size array %qD" -msgstr "нулявы памер масіва `%D'" +msgid "%s does not support %s with the %<%%%c%> %s format" +msgstr "%s не падтрымлівае %s" -#: c-decl.c:3360 varasm.c:1556 +#: c-format.c:1898 #, gcc-internal-format -msgid "%Jstorage size of %qD isn%'t known" +msgid "%s ignored with %s and %<%%%c%> %s format" msgstr "" -#: c-decl.c:3370 -#, fuzzy, gcc-internal-format -msgid "%Jstorage size of %qD isn%'t constant" -msgstr "тып параметра \"%s\" не аб'яўлены" +#: c-format.c:1902 +#, gcc-internal-format +msgid "%s ignored with %s in %s format" +msgstr "" -#: c-decl.c:3417 +#: c-format.c:1909 #, gcc-internal-format -msgid "%Jignoring asm-specifier for non-static local variable %qD" +msgid "use of %s and %s together with %<%%%c%> %s format" msgstr "" -#: c-decl.c:3447 fortran/f95-lang.c:646 +#: c-format.c:1913 #, gcc-internal-format -msgid "cannot put object with volatile field into register" +msgid "use of %s and %s together in %s format" msgstr "" -#: c-decl.c:3581 +#: c-format.c:1932 #, gcc-internal-format -msgid "ISO C forbids forward parameter declarations" +msgid "%<%%%c%> yields only last 2 digits of year in some locales" msgstr "" -#: c-decl.c:3711 -#, fuzzy, gcc-internal-format -msgid "bit-field %qs width not an integer constant" -msgstr "бітавае поле \"%s\" мае нерэчаісны тып" +#: c-format.c:1935 +#, gcc-internal-format +msgid "%<%%%c%> yields only last 2 digits of year" +msgstr "" -#: c-decl.c:3719 +#. The end of the format string was reached. +#: c-format.c:1952 #, gcc-internal-format -msgid "negative width in bit-field %qs" +msgid "no closing %<]%> for %<%%[%> format" msgstr "" -#: c-decl.c:3724 +#: c-format.c:1966 #, gcc-internal-format -msgid "zero width for bit-field %qs" +msgid "use of %qs length modifier with %qc type character" msgstr "" -#: c-decl.c:3734 +#: c-format.c:1988 #, fuzzy, gcc-internal-format -msgid "bit-field %qs has invalid type" -msgstr "бітавае поле \"%s\" мае нерэчаісны тып" +msgid "%s does not support the %<%%%s%c%> %s format" +msgstr "%s не падтрымлівае %s" -#: c-decl.c:3743 +#: c-format.c:2005 #, gcc-internal-format -msgid "type of bit-field %qs is a GCC extension" +msgid "operand number specified with suppressed assignment" msgstr "" -#: c-decl.c:3752 +#: c-format.c:2008 #, gcc-internal-format -msgid "width of %qs exceeds its type" +msgid "operand number specified for format taking no argument" msgstr "" -#: c-decl.c:3765 +#: c-format.c:2151 #, gcc-internal-format -msgid "%qs is narrower than values of its type" +msgid "writing through null pointer (argument %d)" msgstr "" -#: c-decl.c:3890 +#: c-format.c:2159 #, gcc-internal-format -msgid "type defaults to % in declaration of %qs" +msgid "reading through null pointer (argument %d)" msgstr "" -#: c-decl.c:3918 -#, fuzzy, gcc-internal-format -msgid "duplicate %" -msgstr "паўтарэнне \"const\"" - -#: c-decl.c:3920 -#, fuzzy, gcc-internal-format -msgid "duplicate %" -msgstr "паўтарэнне \"restrict\"" - -#: c-decl.c:3922 -#, fuzzy, gcc-internal-format -msgid "duplicate %" -msgstr "паўтарэнне \"volatile\"" - -#: c-decl.c:3941 +#: c-format.c:2179 #, gcc-internal-format -msgid "function definition declared %" +msgid "writing into constant object (argument %d)" msgstr "" -#: c-decl.c:3943 -#, fuzzy, gcc-internal-format -msgid "function definition declared %" -msgstr "віртуальныя функцыі не могуць быць сяброўскімі" +#: c-format.c:2190 +#, gcc-internal-format +msgid "extra type qualifiers in format argument (argument %d)" +msgstr "" -#: c-decl.c:3945 +#: c-format.c:2301 #, gcc-internal-format -msgid "function definition declared %" +msgid "%s should have type %<%s%s%>, but argument %d has type %qT" msgstr "" -#: c-decl.c:3947 -#, fuzzy, gcc-internal-format -msgid "function definition declared %<__thread%>" -msgstr "віртуальныя функцыі не могуць быць сяброўскімі" +#: c-format.c:2305 +#, gcc-internal-format +msgid "format %q.*s expects type %<%s%s%>, but argument %d has type %qT" +msgstr "" -#: c-decl.c:3963 +#: c-format.c:2313 #, gcc-internal-format -msgid "storage class specified for structure field %qs" +msgid "%s should have type %<%T%s%>, but argument %d has type %qT" msgstr "" -#: c-decl.c:3967 cp/decl.c:6974 +#: c-format.c:2317 #, gcc-internal-format -msgid "storage class specified for parameter %qs" +msgid "format %q.*s expects type %<%T%s%>, but argument %d has type %qT" msgstr "" -#: c-decl.c:3970 cp/decl.c:6976 +#: c-format.c:2376 c-format.c:2382 c-format.c:2532 #, gcc-internal-format -msgid "storage class specified for typename" +msgid "%<__gcc_host_wide_int__%> is not defined as a type" msgstr "" -#: c-decl.c:3983 cp/decl.c:6993 +#: c-format.c:2389 c-format.c:2542 #, gcc-internal-format -msgid "%qs initialized and declared %" +msgid "%<__gcc_host_wide_int__%> is not defined as % or %" msgstr "" -#: c-decl.c:3985 cp/decl.c:6996 +#: c-format.c:2438 #, gcc-internal-format -msgid "%qs has both % and initializer" +msgid "% is not defined as a type" msgstr "" -#: c-decl.c:3990 +#: c-format.c:2491 #, gcc-internal-format -msgid "file-scope declaration of %qs specifies %" +msgid "% is not defined as a type" msgstr "" -#: c-decl.c:3992 +#: c-format.c:2508 #, gcc-internal-format -msgid "file-scope declaration of %qs specifies %" +msgid "% is not defined as a type" msgstr "" -#: c-decl.c:3997 cp/decl.c:7000 +#: c-format.c:2513 #, gcc-internal-format -msgid "nested function %qs declared %" +msgid "% is not defined as a pointer type" msgstr "" -#: c-decl.c:4000 cp/decl.c:7010 +#: c-format.c:2724 #, gcc-internal-format -msgid "function-scope %qs implicitly auto and declared %<__thread%>" +msgid "args to be formatted is not %<...%>" msgstr "" -#. Only the innermost declarator (making a parameter be of -#. array type which is converted to pointer type) -#. may have static or type qualifiers. -#: c-decl.c:4047 c-decl.c:4237 +#: c-format.c:2733 #, gcc-internal-format -msgid "static or type qualifiers in non-parameter array declarator" +msgid "strftime formats cannot format arguments" msgstr "" -#: c-decl.c:4093 +#: c-lex.c:254 #, gcc-internal-format -msgid "declaration of %qs as array of voids" +msgid "badly nested C headers from preprocessor" msgstr "" -#: c-decl.c:4099 +#: c-lex.c:302 #, gcc-internal-format -msgid "declaration of %qs as array of functions" +msgid "%Hignoring #pragma %s %s" msgstr "" -#: c-decl.c:4104 -#, fuzzy, gcc-internal-format -msgid "invalid use of structure with flexible array member" -msgstr "нявернае выкарыстанне \"restict\"" +#. ... or not. +#: c-lex.c:412 +#, gcc-internal-format +msgid "%Hstray %<@%> in program" +msgstr "" -#: c-decl.c:4124 +#: c-lex.c:426 #, fuzzy, gcc-internal-format -msgid "size of array %qs has non-integer type" -msgstr "памер масіва \"%s\" адмоўны" +msgid "stray %qs in program" +msgstr "У праграме" -#: c-decl.c:4129 -#, fuzzy, gcc-internal-format -msgid "ISO C forbids zero-size array %qs" -msgstr "ISO C не дазваляе дэкларацыі метак (label)" +#: c-lex.c:436 +#, gcc-internal-format +msgid "missing terminating %c character" +msgstr "прапушчан завяршаючы сімвал %c" -#: c-decl.c:4136 +#: c-lex.c:438 #, fuzzy, gcc-internal-format -msgid "size of array %qs is negative" -msgstr "памер масіва \"%s\" адмоўны" +msgid "stray %qc in program" +msgstr "У праграме" -#: c-decl.c:4150 +#: c-lex.c:440 #, gcc-internal-format -msgid "ISO C90 forbids array %qs whose size can%'t be evaluated" +msgid "stray %<\\%o%> in program" msgstr "" -#: c-decl.c:4154 -#, fuzzy, gcc-internal-format -msgid "ISO C90 forbids variable-size array %qs" -msgstr "ISO C не дазваляе дэкларацыі метак (label)" - -#: c-decl.c:4193 c-decl.c:4357 cp/decl.c:7431 -#, fuzzy, gcc-internal-format -msgid "size of array %qs is too large" -msgstr "памер масіва \"%s\" вельмі вялікі" - -#: c-decl.c:4204 -#, fuzzy, gcc-internal-format -msgid "ISO C90 does not support flexible array members" -msgstr "ISO C89 не падтрымлівае комлексныя тыпы" +#: c-lex.c:601 +#, gcc-internal-format +msgid "this decimal constant is unsigned only in ISO C90" +msgstr "" -#: c-decl.c:4214 +#: c-lex.c:605 #, gcc-internal-format -msgid "array type has incomplete element type" +msgid "this decimal constant would be unsigned in ISO C90" msgstr "" -#: c-decl.c:4269 cp/decl.c:7101 -#, fuzzy, gcc-internal-format -msgid "%qs declared as function returning a function" -msgstr "\"%s\" не абвешчан (першае выкарыстанне ў гэтай функцыі)" +#: c-lex.c:621 +#, gcc-internal-format +msgid "integer constant is too large for %qs type" +msgstr "" -#: c-decl.c:4274 cp/decl.c:7106 +#: c-lex.c:687 #, gcc-internal-format -msgid "%qs declared as function returning an array" +msgid "floating constant exceeds range of %<%s%>" msgstr "" -#: c-decl.c:4294 -#, fuzzy, gcc-internal-format -msgid "function definition has qualified void return type" -msgstr "функцыя не вяртае тып string" - -#: c-decl.c:4296 +#: c-lex.c:770 #, gcc-internal-format -msgid "type qualifiers ignored on function return type" +msgid "traditional C rejects string constant concatenation" msgstr "" -#: c-decl.c:4325 c-decl.c:4370 c-decl.c:4464 c-decl.c:4555 +#: c-objc-common.c:81 #, gcc-internal-format -msgid "ISO C forbids qualified function types" +msgid "function %q+F can never be inlined because it is suppressed using -fno-inline" msgstr "" -#: c-decl.c:4378 +#: c-objc-common.c:91 #, gcc-internal-format -msgid "%Jtypedef %qD declared %" +msgid "function %q+F can never be inlined because it might not be bound within this unit of translation" msgstr "" -#: c-decl.c:4408 +#: c-objc-common.c:99 #, gcc-internal-format -msgid "ISO C forbids const or volatile function types" +msgid "function %q+F can never be inlined because it uses attributes conflicting with inlining" msgstr "" -#: c-decl.c:4428 +#: c-opts.c:147 #, fuzzy, gcc-internal-format -msgid "variable or field %qs declared void" -msgstr "тып параметра \"%s\" не аб'яўлены" +msgid "no class name specified with %qs" +msgstr "не зададзены ўваходзячыя файлы" -#: c-decl.c:4457 -#, gcc-internal-format -msgid "attributes in parameter array declarator ignored" -msgstr "" +#: c-opts.c:151 +#, fuzzy, gcc-internal-format +msgid "assertion missing after %qs" +msgstr "аргумент для \"%s\" прапушчан" -#: c-decl.c:4492 +#: c-opts.c:156 #, fuzzy, gcc-internal-format -msgid "%Jparameter %qD declared %" -msgstr "тып параметра \"%s\" не аб'яўлены" +msgid "macro name missing after %qs" +msgstr "аргумент для \"%s\" прапушчан" -#: c-decl.c:4505 +#: c-opts.c:165 #, fuzzy, gcc-internal-format -msgid "field %qs declared as a function" -msgstr "\"%s\" не абвешчан (першае выкарыстанне ў гэтай функцыі)" +msgid "missing path after %qs" +msgstr "аргумент для \"%s\" прапушчан" -#: c-decl.c:4511 +#: c-opts.c:174 #, fuzzy, gcc-internal-format -msgid "field %qs has incomplete type" -msgstr "\"%s\" мае незавершаны тып" +msgid "missing filename after %qs" +msgstr "прапушчан прабел пасля нумара \"%.*s\"" -#: c-decl.c:4525 c-decl.c:4537 c-decl.c:4541 +#: c-opts.c:179 #, fuzzy, gcc-internal-format -msgid "invalid storage class for function %qs" -msgstr "Нерэчаісны выбар \"%s\"" +msgid "missing makefile target after %qs" +msgstr "прапушчан прабел пасля нумара \"%.*s\"" -#: c-decl.c:4561 +#: c-opts.c:319 #, gcc-internal-format -msgid "% function returns non-void value" +msgid "-I- specified twice" msgstr "" -#: c-decl.c:4589 -#, fuzzy, gcc-internal-format -msgid "cannot inline function %" -msgstr "не магу ініцыялізаваць сяброўскую функцыю \"%s\"" - -#: c-decl.c:4636 +#: c-opts.c:322 #, gcc-internal-format -msgid "variable previously declared % redeclared %" +msgid "obsolete option -I- used, please use -iquote instead" msgstr "" -#: c-decl.c:4645 +#: c-opts.c:489 +#, fuzzy, gcc-internal-format +msgid "argument %qs to %<-Wnormalized%> not recognized" +msgstr "мова %s не распазнана" + +#: c-opts.c:573 +#, fuzzy, gcc-internal-format +msgid "switch %qs is no longer supported" +msgstr "-pipe не падтрымліваецца." + +#: c-opts.c:683 #, gcc-internal-format -msgid "%Jvariable %qD declared %" +msgid "-fhandle-exceptions has been renamed -fexceptions (and is now on by default)" msgstr "" -#. A mere warning is sure to result in improper semantics -#. at runtime. Don't bother to allow this to compile. -#: c-decl.c:4676 cp/decl.c:5864 +#: c-opts.c:865 #, fuzzy, gcc-internal-format -msgid "thread-local storage not supported for this target" -msgstr "атрыбуты секцыі не падтрымліваюцца для гэтай мэты" +msgid "output filename specified twice" +msgstr "не зададзены ўваходзячыя файлы" -#: c-decl.c:4738 c-decl.c:5892 +#: c-opts.c:1002 #, gcc-internal-format -msgid "function declaration isn%'t a prototype" +msgid "-Wformat-y2k ignored without -Wformat" msgstr "" -#: c-decl.c:4746 +#: c-opts.c:1004 #, gcc-internal-format -msgid "parameter names (without types) in function declaration" +msgid "-Wformat-extra-args ignored without -Wformat" msgstr "" -#: c-decl.c:4779 -#, fuzzy, gcc-internal-format -msgid "%Jparameter %u (%qD) has incomplete type" -msgstr "\"%s\" мае незавершаны тып" - -#: c-decl.c:4782 -#, fuzzy, gcc-internal-format -msgid "%Jparameter %u has incomplete type" -msgstr "\"%s\" мае незавершаны тып" - -#: c-decl.c:4791 -#, fuzzy, gcc-internal-format -msgid "%Jparameter %u (%qD) has void type" -msgstr "тып параметра \"%s\" не аб'яўлены" +#: c-opts.c:1006 +#, gcc-internal-format +msgid "-Wformat-zero-length ignored without -Wformat" +msgstr "" -#: c-decl.c:4794 -#, fuzzy, gcc-internal-format -msgid "%Jparameter %u has void type" -msgstr "тып параметра \"%s\" не аб'яўлены" +#: c-opts.c:1008 +#, gcc-internal-format +msgid "-Wformat-nonliteral ignored without -Wformat" +msgstr "" -#: c-decl.c:4851 +#: c-opts.c:1010 #, gcc-internal-format -msgid "% as only parameter may not be qualified" +msgid "-Wformat-security ignored without -Wformat" msgstr "" -#: c-decl.c:4855 c-decl.c:4890 +#: c-opts.c:1030 #, fuzzy, gcc-internal-format -msgid "% must be the only parameter" -msgstr "нявернае выкарыстанне \"restict\"" +msgid "opening output file %s: %m" +msgstr "немагчыма адчыніць файл уводу `%s'" -#: c-decl.c:4883 +#: c-opts.c:1035 #, gcc-internal-format -msgid "%Jparameter %qD has just a forward declaration" +msgid "too many filenames given. Type %s --help for usage" msgstr "" -#. The %s will be one of 'struct', 'union', or 'enum'. -#: c-decl.c:4929 +#: c-opts.c:1121 #, gcc-internal-format -msgid "%<%s %E%> declared inside parameter list" +msgid "YYDEBUG was not defined at build time, -dy ignored" msgstr "" -#. The %s will be one of 'struct', 'union', or 'enum'. -#: c-decl.c:4933 +#: c-opts.c:1167 #, gcc-internal-format -msgid "anonymous %s declared inside parameter list" +msgid "opening dependency file %s: %m" msgstr "" -#: c-decl.c:4938 +#: c-opts.c:1177 #, gcc-internal-format -msgid "its scope is only this definition or declaration, which is probably not what you want" +msgid "closing dependency file %s: %m" msgstr "" -#: c-decl.c:5071 +#: c-opts.c:1180 #, fuzzy, gcc-internal-format -msgid "redefinition of %" -msgstr "перанакіраванне stdout: %s" +msgid "when writing output to %s: %m" +msgstr "памылка запісу ў %s" -#: c-decl.c:5073 -#, fuzzy, gcc-internal-format -msgid "redefinition of %" -msgstr "перанакіраванне stdout: %s" +#: c-opts.c:1260 +#, gcc-internal-format +msgid "to generate dependencies you must specify either -M or -MM" +msgstr "" -#: c-decl.c:5078 -#, fuzzy, gcc-internal-format -msgid "nested redefinition of %" -msgstr "перанакіраванне stdout: %s" +#: c-opts.c:1428 +#, gcc-internal-format +msgid "too late for # directive to set debug directory" +msgstr "" -#: c-decl.c:5081 -#, fuzzy, gcc-internal-format -msgid "nested redefinition of %" -msgstr "перанакіраванне stdout: %s" +#: c-parser.c:969 +#, gcc-internal-format +msgid "ISO C forbids an empty source file" +msgstr "ISO C не дазваляе пусты ізыходны файл" -#: c-decl.c:5153 cp/decl.c:3422 +#: c-parser.c:1054 c-parser.c:5762 #, gcc-internal-format -msgid "declaration does not declare anything" +msgid "ISO C does not allow extra %<;%> outside of a function" msgstr "" -#: c-decl.c:5157 -#, fuzzy, gcc-internal-format -msgid "ISO C doesn%'t support unnamed structs/unions" -msgstr "ISO C не падтрымлівае комлексныя цэлалікавыя тыпы" - -#: c-decl.c:5200 c-decl.c:5216 +#: c-parser.c:1145 #, fuzzy, gcc-internal-format -msgid "%Jduplicate member %qD" -msgstr "паўтарэнне \"%s\"" +msgid "expected declaration specifiers" +msgstr "пустое абвяшчэньне" -#: c-decl.c:5255 +#: c-parser.c:1193 #, gcc-internal-format -msgid "union has no named members" +msgid "data definition has no type or storage class" msgstr "" -#: c-decl.c:5257 +#: c-parser.c:1247 #, gcc-internal-format -msgid "union has no members" +msgid "expected %<,%> or %<;%>" msgstr "" -#: c-decl.c:5262 +#. This can appear in many cases looking nothing like a +#. function definition, so we don't give a more specific +#. error suggesting there was one. +#: c-parser.c:1254 c-parser.c:1271 #, gcc-internal-format -msgid "struct has no named members" +msgid "expected %<=%>, %<,%>, %<;%>, % or %<__attribute__%>" msgstr "" -#: c-decl.c:5264 +#: c-parser.c:1263 #, gcc-internal-format -msgid "struct has no members" +msgid "ISO C forbids nested functions" msgstr "" -#: c-decl.c:5321 +#: c-parser.c:1609 c-parser.c:2372 c-parser.c:2981 c-parser.c:3222 +#: c-parser.c:4009 c-parser.c:4590 c-parser.c:4980 c-parser.c:5000 +#: c-parser.c:5115 c-parser.c:5261 c-parser.c:5278 c-parser.c:5410 +#: c-parser.c:5422 c-parser.c:5447 c-parser.c:5575 c-parser.c:5604 +#: c-parser.c:5612 c-parser.c:5640 c-parser.c:5654 c-parser.c:5867 +#: c-parser.c:5966 #, gcc-internal-format -msgid "%Jflexible array member in union" +msgid "expected identifier" msgstr "" -#: c-decl.c:5326 +#: c-parser.c:1635 cp/parser.c:10194 #, gcc-internal-format -msgid "%Jflexible array member not at end of struct" +msgid "comma at end of enumerator list" msgstr "" -#: c-decl.c:5331 +#: c-parser.c:1641 #, gcc-internal-format -msgid "%Jflexible array member in otherwise empty struct" +msgid "expected %<,%> or %<}%>" msgstr "" -#: c-decl.c:5338 -#, fuzzy, gcc-internal-format -msgid "%Jinvalid use of structure with flexible array member" -msgstr "нявернае выкарыстанне \"restict\"" - -#: c-decl.c:5446 +#: c-parser.c:1655 c-parser.c:1825 c-parser.c:5729 #, gcc-internal-format -msgid "union cannot be made transparent" +msgid "expected %<{%>" msgstr "" -#: c-decl.c:5517 -#, fuzzy, gcc-internal-format -msgid "nested redefinition of %" -msgstr "перанакіраванне stdout: %s" - -#. This enum is a named one that has been declared already. -#: c-decl.c:5524 -#, fuzzy, gcc-internal-format -msgid "redeclaration of %" -msgstr "абвяшчэньне шаблёну `%#D'" - -#: c-decl.c:5587 +#: c-parser.c:1664 #, gcc-internal-format -msgid "enumeration values exceed range of largest integer" +msgid "ISO C forbids forward references to % types" msgstr "" -#: c-decl.c:5604 +#: c-parser.c:1767 #, gcc-internal-format -msgid "specified mode too small for enumeral values" +msgid "expected class name" msgstr "" -#: c-decl.c:5704 -#, fuzzy, gcc-internal-format -msgid "enumerator value for %qE is not an integer constant" -msgstr "памер масіва \"%s\" адмоўны" - -#: c-decl.c:5721 +#: c-parser.c:1786 c-parser.c:5514 #, gcc-internal-format -msgid "overflow in enumeration values" +msgid "extra semicolon in struct or union specified" msgstr "" -#: c-decl.c:5726 +#: c-parser.c:1808 #, gcc-internal-format -msgid "ISO C restricts enumerator values to range of %" +msgid "no semicolon at end of struct or union" msgstr "" -#: c-decl.c:5821 +#: c-parser.c:1811 #, gcc-internal-format -msgid "return type is an incomplete type" +msgid "expected %<;%>" msgstr "" -#: c-decl.c:5829 -#, fuzzy, gcc-internal-format -msgid "return type defaults to %" -msgstr "вяртаемы тып \"%s\" не \"int\"" - -#: c-decl.c:5899 -#, fuzzy, gcc-internal-format -msgid "%Jno previous prototype for %qD" -msgstr "няма папярэдняга прататыпа для \"%s\"" - -#: c-decl.c:5907 -#, fuzzy, gcc-internal-format -msgid "%J%qD was used with no prototype before its definition" -msgstr "\"%s\" не абвешчан (першае выкарыстанне ў гэтай функцыі)" - -#: c-decl.c:5914 -#, fuzzy, gcc-internal-format -msgid "%Jno previous declaration for %qD" -msgstr "няма папярэдняга аб'яўлення для \"%s\"" - -#: c-decl.c:5922 -#, fuzzy, gcc-internal-format -msgid "%J%qD was used with no declaration before its definition" -msgstr "\"%s\" не абвешчан (першае выкарыстанне ў гэтай функцыі)" - -#: c-decl.c:5955 c-decl.c:6472 -#, fuzzy, gcc-internal-format -msgid "%Jreturn type of %qD is not %" -msgstr "вяртаемы тып \"%s\" не \"int\"" - -#: c-decl.c:5970 -#, fuzzy, gcc-internal-format -msgid "%Jfirst argument of %qD should be %" -msgstr "першым аргументам \"%s\" павінен быць \"int\"" - -#: c-decl.c:5979 -#, fuzzy, gcc-internal-format -msgid "%Jsecond argument of %qD should be %" -msgstr "другім аргументам \"%s\" павінен быць \"char **\"" +#: c-parser.c:1888 c-parser.c:2815 +#, gcc-internal-format +msgid "expected specifier-qualifier-list" +msgstr "" -#: c-decl.c:5988 -#, fuzzy, gcc-internal-format -msgid "%Jthird argument of %qD should probably be %" -msgstr "другім аргументам \"%s\" павінен быць \"char **\"" +#: c-parser.c:1898 +#, gcc-internal-format +msgid "ISO C forbids member declarations with no members" +msgstr "" -#: c-decl.c:5998 +#: c-parser.c:1967 #, gcc-internal-format -msgid "%J%qD takes only zero or two arguments" +msgid "expected %<,%>, %<;%> or %<}%>" msgstr "" -#: c-decl.c:6001 -#, fuzzy, gcc-internal-format -msgid "%J%qD is normally a non-static function" -msgstr "`%s' - звычайна функцыя" +#: c-parser.c:1974 +#, gcc-internal-format +msgid "expected %<:%>, %<,%>, %<;%>, %<}%> or %<__attribute__%>" +msgstr "" -#: c-decl.c:6047 +#: c-parser.c:2023 #, gcc-internal-format -msgid "%Jold-style parameter declarations in prototyped function definition" +msgid "% applied to a bit-field" msgstr "" -#: c-decl.c:6060 +#: c-parser.c:2242 #, gcc-internal-format -msgid "%Jtraditional C rejects ISO C style function definitions" +msgid "expected identifier or %<(%>" msgstr "" -#: c-decl.c:6072 -#, fuzzy, gcc-internal-format -msgid "%Jparameter name omitted" -msgstr "тып параметра \"%s\" не аб'яўлены" +#: c-parser.c:2435 +#, gcc-internal-format +msgid "ISO C requires a named argument before %<...%>" +msgstr "" -#: c-decl.c:6112 +#: c-parser.c:2537 #, gcc-internal-format -msgid "%Jold-style function definition" +msgid "expected declaration specifiers or %<...%>" msgstr "" -#: c-decl.c:6120 +#: c-parser.c:2587 #, gcc-internal-format -msgid "%Jparameter name missing from parameter list" +msgid "wide string literal in %" msgstr "" -#: c-decl.c:6131 +#: c-parser.c:2593 #, gcc-internal-format -msgid "%J%qD declared as a non-parameter" +msgid "expected string literal" msgstr "" -#: c-decl.c:6136 -#, fuzzy, gcc-internal-format -msgid "%Jmultiple parameters named %qD" -msgstr "невыкарыстаемы параметр \"%s\"" +#: c-parser.c:2907 +#, gcc-internal-format +msgid "ISO C forbids empty initializer braces" +msgstr "" -#: c-decl.c:6144 -#, fuzzy, gcc-internal-format -msgid "%Jparameter %qD declared with void type" -msgstr "тып параметра \"%s\" не аб'яўлены" +#: c-parser.c:2952 +#, gcc-internal-format +msgid "obsolete use of designated initializer with %<:%>" +msgstr "" -#: c-decl.c:6159 c-decl.c:6161 +#: c-parser.c:3075 #, gcc-internal-format -msgid "%Jtype of %qD defaults to %" +msgid "ISO C forbids specifying range of elements to initialize" msgstr "" -#: c-decl.c:6180 -#, fuzzy, gcc-internal-format -msgid "%Jparameter %qD has incomplete type" -msgstr "\"%s\" мае незавершаны тып" +#: c-parser.c:3088 +#, gcc-internal-format +msgid "ISO C90 forbids specifying subobject to initialize" +msgstr "" -#: c-decl.c:6186 +#: c-parser.c:3096 #, gcc-internal-format -msgid "%Jdeclaration for parameter %qD but no such parameter" +msgid "obsolete use of designated initializer without %<=%>" msgstr "" -#: c-decl.c:6237 +#: c-parser.c:3104 #, gcc-internal-format -msgid "number of arguments doesn%'t match built-in prototype" +msgid "expected %<=%>" msgstr "" -#: c-decl.c:6241 +#: c-parser.c:3241 +#, gcc-internal-format +msgid "ISO C forbids label declarations" +msgstr "ISO C не дазваляе дэкларацыі метак (label)" + +#: c-parser.c:3246 c-parser.c:3255 #, fuzzy, gcc-internal-format -msgid "number of arguments doesn%'t match prototype" -msgstr "памылковая колькасьць аргументаў, зададзеных для атрыбута `%s'" +msgid "expected declaration or statement" +msgstr "паўторнае абвяшчэнне меткі \"%s\"" -#: c-decl.c:6242 c-decl.c:6282 c-decl.c:6295 +#: c-parser.c:3275 c-parser.c:3303 #, fuzzy, gcc-internal-format -msgid "%Hprototype declaration" -msgstr "пустое абвяшчэньне" +msgid "%HISO C90 forbids mixed declarations and code" +msgstr "ISO C не дазваляе дэкларацыі метак (label)" -#: c-decl.c:6276 +#: c-parser.c:3319 #, gcc-internal-format -msgid "promoted argument %qD doesn%'t match built-in prototype" +msgid "label at end of compound statement" msgstr "" -#: c-decl.c:6280 +#: c-parser.c:3362 #, gcc-internal-format -msgid "promoted argument %qD doesn%'t match prototype" +msgid "expected %<:%> or %<...%>" msgstr "" -#: c-decl.c:6290 +#: c-parser.c:3498 #, gcc-internal-format -msgid "argument %qD doesn%'t match built-in prototype" +msgid "expected identifier or %<*%>" msgstr "" -#: c-decl.c:6294 +#. Avoid infinite loop in error recovery: +#. c_parser_skip_until_found stops at a closing nesting +#. delimiter without consuming it, but here we need to consume +#. it to proceed further. +#: c-parser.c:3560 #, gcc-internal-format -msgid "argument %qD doesn%'t match prototype" +msgid "expected statement" msgstr "" -#: c-decl.c:6505 cp/decl.c:10659 +#: c-parser.c:3894 #, gcc-internal-format -msgid "no return statement in function returning non-void" +msgid "%E qualifier ignored on asm" msgstr "" -#: c-decl.c:6512 +#: c-parser.c:4174 #, gcc-internal-format -msgid "this function may return with or without a value" +msgid "ISO C forbids omitting the middle term of a ?: expression" msgstr "" -#. If we get here, declarations have been used in a for loop without -#. the C99 for loop scope. This doesn't make much sense, so don't -#. allow it. -#: c-decl.c:6605 +#: c-parser.c:4560 #, gcc-internal-format -msgid "% loop initial declaration used outside C99 mode" +msgid "traditional C rejects the unary plus operator" msgstr "" -#: c-decl.c:6634 +#: c-parser.c:4673 #, gcc-internal-format -msgid "%Jdeclaration of static variable %qD in % loop initial declaration" +msgid "% applied to a bit-field" msgstr "" -#: c-decl.c:6637 +#: c-parser.c:4816 c-parser.c:5157 c-parser.c:5179 #, gcc-internal-format -msgid "%Jdeclaration of % variable %qD in % loop initial declaration" +msgid "expected expression" msgstr "" -#: c-decl.c:6642 +#: c-parser.c:4842 #, gcc-internal-format -msgid "% declared in % loop initial declaration" +msgid "braced-group within expression allowed only inside a function" msgstr "" -#: c-decl.c:6646 +#: c-parser.c:4856 #, gcc-internal-format -msgid "% declared in % loop initial declaration" +msgid "ISO C forbids braced-groups within expressions" msgstr "" -#: c-decl.c:6650 -#, gcc-internal-format -msgid "% declared in % loop initial declaration" -msgstr "" +#: c-parser.c:5039 +#, fuzzy, gcc-internal-format +msgid "first argument to %<__builtin_choose_expr%> not a constant" +msgstr "аргумент `__builtin_args_info' павінен быць канстантай" -#: c-decl.c:6654 +#: c-parser.c:5206 #, gcc-internal-format -msgid "%Jdeclaration of non-variable %qD in % loop initial declaration" +msgid "compound literal has variable size" msgstr "" -#: c-decl.c:6943 c-decl.c:7092 c-decl.c:7303 cp/decl.c:6691 +#: c-parser.c:5214 #, fuzzy, gcc-internal-format -msgid "duplicate %qs" -msgstr "паўтарэньне `%s'" +msgid "ISO C90 forbids compound literals" +msgstr "ISO C не падтрымлівае \"goto *expr;\"" -#: c-decl.c:6964 c-decl.c:7101 c-decl.c:7204 +#: c-parser.c:5725 #, gcc-internal-format -msgid "two or more data types in declaration specifiers" +msgid "extra semicolon in method definition specified" msgstr "" -#: c-decl.c:6976 cp/decl.c:6667 +#: c-pch.c:132 #, fuzzy, gcc-internal-format -msgid "% is too long for GCC" -msgstr "`long long long' - вельмі доўга для GCC" +msgid "can%'t create precompiled header %s: %m" +msgstr "немагчыма стварыць дырэкторыю \"%s\"" + +#: c-pch.c:153 +#, fuzzy, gcc-internal-format +msgid "can%'t write to %s: %m" +msgstr "не магу запісаць ў %s" -#: c-decl.c:6983 c-decl.c:7175 +#: c-pch.c:159 #, gcc-internal-format -msgid "both % and % in declaration specifiers" +msgid "%qs is not a valid output file" msgstr "" -#: c-decl.c:6989 +#: c-pch.c:188 c-pch.c:203 c-pch.c:217 #, fuzzy, gcc-internal-format -msgid "ISO C90 does not support %" -msgstr "ISO C89 не падтрымлівае `long long'" +msgid "can%'t write %s: %m" +msgstr "немагчыма адчыніць %s" + +#: c-pch.c:193 c-pch.c:210 +#, fuzzy, gcc-internal-format +msgid "can%'t seek in %s: %m" +msgstr "немагчыма адчыніць %s" -#: c-decl.c:6994 c-decl.c:7014 +#: c-pch.c:201 c-pch.c:243 c-pch.c:283 c-pch.c:334 +#, fuzzy, gcc-internal-format +msgid "can%'t read %s: %m" +msgstr "не магу прачытаць з %s" + +#: c-pch.c:452 #, gcc-internal-format -msgid "both % and % in declaration specifiers" +msgid "malformed #pragma GCC pch_preprocess, ignored" msgstr "" -#: c-decl.c:6997 c-decl.c:7108 +#: c-pch.c:458 #, gcc-internal-format -msgid "both % and % in declaration specifiers" +msgid "pch_preprocess pragma should only be used with -fpreprocessed" msgstr "" -#: c-decl.c:7000 c-decl.c:7127 +#: c-pch.c:459 #, gcc-internal-format -msgid "both % and %<_Bool%> in declaration specifiers" +msgid "use #include instead" msgstr "" -#: c-decl.c:7003 c-decl.c:7146 +#: c-pch.c:467 +#, fuzzy, gcc-internal-format +msgid "%s: couldn%'t open PCH file: %m" +msgstr "Немагчыма адчыніць файл з дадзенымі %s.\n" + +#: c-pch.c:472 #, gcc-internal-format -msgid "both % and % in declaration specifiers" +msgid "use -Winvalid-pch for more information" msgstr "" -#: c-decl.c:7006 c-decl.c:7159 +#: c-pch.c:473 #, gcc-internal-format -msgid "both % and % in declaration specifiers" +msgid "%s: PCH file was invalid" msgstr "" -#: c-decl.c:7017 c-decl.c:7111 +#: c-pragma.c:101 #, gcc-internal-format -msgid "both % and % in declaration specifiers" +msgid "#pragma pack (pop) encountered without matching #pragma pack (push)" msgstr "" -#: c-decl.c:7020 c-decl.c:7130 +#: c-pragma.c:114 #, gcc-internal-format -msgid "both % and %<_Bool%> in declaration specifiers" +msgid "#pragma pack(pop, %s) encountered without matching #pragma pack(push, %s)" msgstr "" -#: c-decl.c:7023 c-decl.c:7149 +#: c-pragma.c:128 +#, fuzzy, gcc-internal-format +msgid "#pragma pack(push[, id], ) is not supported on this target" +msgstr "атрыбуты секцыі не падтрымліваюцца для гэтай мэты" + +#: c-pragma.c:130 +#, fuzzy, gcc-internal-format +msgid "#pragma pack(pop[, id], ) is not supported on this target" +msgstr "атрыбуты секцыі не падтрымліваюцца для гэтай мэты" + +#: c-pragma.c:151 #, gcc-internal-format -msgid "both % and % in declaration specifiers" +msgid "missing %<(%> after %<#pragma pack%> - ignored" msgstr "" -#: c-decl.c:7026 c-decl.c:7162 +#: c-pragma.c:164 c-pragma.c:204 #, gcc-internal-format -msgid "both % and % in declaration specifiers" +msgid "malformed %<#pragma pack%> - ignored" msgstr "" -#: c-decl.c:7029 c-decl.c:7178 +#: c-pragma.c:169 +#, fuzzy, gcc-internal-format +msgid "malformed %<#pragma pack(push[, id][, ])%> - ignored" +msgstr "атрыбуты секцыі не падтрымліваюцца для гэтай мэты" + +#: c-pragma.c:171 #, gcc-internal-format -msgid "both % and % in declaration specifiers" +msgid "malformed %<#pragma pack(pop[, id])%> - ignored" msgstr "" -#: c-decl.c:7037 c-decl.c:7057 +#: c-pragma.c:180 #, gcc-internal-format -msgid "both % and % in declaration specifiers" +msgid "unknown action %qs for %<#pragma pack%> - ignored" msgstr "" -#: c-decl.c:7040 c-decl.c:7114 +#: c-pragma.c:207 #, gcc-internal-format -msgid "both % and % in declaration specifiers" +msgid "junk at end of %<#pragma pack%>" msgstr "" -#: c-decl.c:7043 c-decl.c:7133 +#: c-pragma.c:210 #, gcc-internal-format -msgid "both % and %<_Bool%> in declaration specifiers" +msgid "#pragma pack has no effect with -fpack-struct - ignored" msgstr "" -#: c-decl.c:7046 c-decl.c:7165 +#: c-pragma.c:230 #, gcc-internal-format -msgid "both % and % in declaration specifiers" +msgid "alignment must be a small power of two, not %d" msgstr "" -#: c-decl.c:7049 c-decl.c:7181 +#: c-pragma.c:263 #, gcc-internal-format -msgid "both % and % in declaration specifiers" +msgid "applying #pragma weak %q+D after first use results in unspecified behavior" msgstr "" -#: c-decl.c:7060 c-decl.c:7117 +#: c-pragma.c:337 c-pragma.c:342 #, gcc-internal-format -msgid "both % and % in declaration specifiers" +msgid "malformed #pragma weak, ignored" msgstr "" -#: c-decl.c:7063 c-decl.c:7136 +#: c-pragma.c:346 #, gcc-internal-format -msgid "both % and %<_Bool%> in declaration specifiers" +msgid "junk at end of #pragma weak" msgstr "" -#: c-decl.c:7066 c-decl.c:7168 +#: c-pragma.c:414 c-pragma.c:416 #, gcc-internal-format -msgid "both % and % in declaration specifiers" +msgid "malformed #pragma redefine_extname, ignored" msgstr "" -#: c-decl.c:7069 c-decl.c:7184 +#: c-pragma.c:419 #, gcc-internal-format -msgid "both % and % in declaration specifiers" +msgid "junk at end of #pragma redefine_extname" msgstr "" -#: c-decl.c:7077 +#: c-pragma.c:425 #, fuzzy, gcc-internal-format -msgid "ISO C90 does not support complex types" -msgstr "ISO C89 не падтрымлівае комлексныя тыпы" +msgid "#pragma redefine_extname not supported on this target" +msgstr "__buitin_saveregs не падтрымліваецца гэтай мэтай" + +#: c-pragma.c:442 c-pragma.c:529 +#, fuzzy, gcc-internal-format +msgid "#pragma redefine_extname ignored due to conflict with previous rename" +msgstr "секцыя \"%s\" канфліктуе з папярэдняй дэкларацыяй" -#: c-decl.c:7079 c-decl.c:7120 +#: c-pragma.c:465 #, gcc-internal-format -msgid "both % and % in declaration specifiers" +msgid "#pragma redefine_extname ignored due to conflict with previous #pragma redefine_extname" msgstr "" -#: c-decl.c:7082 c-decl.c:7139 +#: c-pragma.c:484 #, gcc-internal-format -msgid "both % and %<_Bool%> in declaration specifiers" +msgid "malformed #pragma extern_prefix, ignored" msgstr "" -#: c-decl.c:7221 +#: c-pragma.c:487 #, gcc-internal-format -msgid "%qs fails to be a typedef or built in type" +msgid "junk at end of #pragma extern_prefix" msgstr "" -#: c-decl.c:7253 +#: c-pragma.c:494 #, fuzzy, gcc-internal-format -msgid "%qs is not at beginning of declaration" -msgstr "\"%s\" - гэта не пачатак дэкларацыі" +msgid "#pragma extern_prefix not supported on this target" +msgstr "__buitin_saveregs не падтрымліваецца гэтай мэтай" + +#: c-pragma.c:520 +#, fuzzy, gcc-internal-format +msgid "asm declaration ignored due to conflict with previous rename" +msgstr "секцыя \"%s\" канфліктуе з папярэдняй дэкларацыяй" -#: c-decl.c:7268 +#: c-pragma.c:551 #, gcc-internal-format -msgid "%<__thread%> used with %" +msgid "#pragma redefine_extname ignored due to conflict with __asm__ declaration" msgstr "" -#: c-decl.c:7270 +#: c-pragma.c:616 #, gcc-internal-format -msgid "%<__thread%> used with %" +msgid "#pragma GCC visibility must be followed by push or pop" msgstr "" -#: c-decl.c:7272 +#: c-pragma.c:623 #, gcc-internal-format -msgid "%<__thread%> used with %" +msgid "no matching push for %<#pragma GCC visibility pop%>" msgstr "" -#: c-decl.c:7283 cp/parser.c:7271 +#: c-pragma.c:635 c-pragma.c:661 #, gcc-internal-format -msgid "%<__thread%> before %" +msgid "missing %<(%> after %<#pragma GCC visibility push%> - ignored" msgstr "" -#: c-decl.c:7292 cp/parser.c:7261 +#: c-pragma.c:639 #, gcc-internal-format -msgid "%<__thread%> before %" +msgid "malformed #pragma GCC visibility push" msgstr "" -#: c-decl.c:7308 +#: c-pragma.c:656 #, gcc-internal-format -msgid "multiple storage classes in declaration specifiers" +msgid "#pragma GCC visibility push() must specify default, internal, hidden or protected" msgstr "" -#: c-decl.c:7315 +#: c-pragma.c:665 #, gcc-internal-format -msgid "%<__thread%> used with %qs" +msgid "junk at end of %<#pragma GCC visibility%>" msgstr "" -#: c-decl.c:7369 +#: c-typeck.c:157 #, fuzzy, gcc-internal-format -msgid "ISO C does not support plain % meaning %" -msgstr "ISO C не падтрымлівае просты \"complex\" у значэнні \"double complex\"" +msgid "%qD has an incomplete type" +msgstr "\"%s\" мае незавершаны тып" -#: c-decl.c:7414 c-decl.c:7440 +#: c-typeck.c:178 cp/call.c:2696 #, gcc-internal-format -msgid "ISO C does not support complex integer types" -msgstr "ISO C не падтрымлівае комлексныя цэлалікавыя тыпы" - -#: c-decl.c:7515 toplev.c:850 -#, fuzzy, gcc-internal-format -msgid "%J%qF used but never defined" -msgstr "адмеціна `%D' выкарыстоўвываецца, але ня вызначана" +msgid "invalid use of void expression" +msgstr "" -#: c-format.c:96 c-format.c:209 +#: c-typeck.c:186 #, gcc-internal-format -msgid "format string has invalid operand number" +msgid "invalid use of flexible array member" msgstr "" -#: c-format.c:113 +#: c-typeck.c:192 #, gcc-internal-format -msgid "function does not return string type" -msgstr "функцыя не вяртае тып string" +msgid "invalid use of array with unspecified bounds" +msgstr "" -#: c-format.c:142 +#: c-typeck.c:200 #, fuzzy, gcc-internal-format -msgid "format string argument not a string type" -msgstr "функцыя не вяртае тып string" +msgid "invalid use of undefined type %<%s %E%>" +msgstr "нявернае выкарыстанне \"restict\"" + +#. If this type has a typedef-name, the TYPE_NAME is a TYPE_DECL. +#: c-typeck.c:204 +#, fuzzy, gcc-internal-format +msgid "invalid use of incomplete typedef %qD" +msgstr "нявернае выкарыстанне \"restict\"" -#: c-format.c:190 +#: c-typeck.c:431 c-typeck.c:456 #, gcc-internal-format -msgid "unrecognized format specifier" +msgid "function types not truly compatible in ISO C" msgstr "" -#: c-format.c:202 +#: c-typeck.c:858 #, gcc-internal-format -msgid "%qs is an unrecognized format function type" +msgid "types are not quite compatible" msgstr "" -#: c-format.c:215 +#: c-typeck.c:1176 #, gcc-internal-format -msgid "%<...%> has invalid operand number" +msgid "function return types not compatible due to %" msgstr "" -#: c-format.c:222 +#: c-typeck.c:1335 c-typeck.c:2629 #, gcc-internal-format -msgid "format string argument follows the args to be formatted" +msgid "arithmetic on pointer to an incomplete type" msgstr "" -#: c-format.c:840 +#: c-typeck.c:1726 #, gcc-internal-format -msgid "function might be possible candidate for %qs format attribute" +msgid "%qT has no member named %qE" msgstr "" -#: c-format.c:931 c-format.c:952 c-format.c:1947 +#: c-typeck.c:1761 #, gcc-internal-format -msgid "missing $ operand number in format" +msgid "request for member %qE in something not a structure or union" msgstr "" -#: c-format.c:961 +#: c-typeck.c:1792 #, gcc-internal-format -msgid "%s does not support %%n$ operand number formats" +msgid "dereferencing pointer to incomplete type" msgstr "" -#: c-format.c:968 +#: c-typeck.c:1796 #, gcc-internal-format -msgid "operand number out of range in format" +msgid "dereferencing % pointer" msgstr "" -#: c-format.c:991 +#: c-typeck.c:1813 cp/typeck.c:2198 +#, fuzzy, gcc-internal-format +msgid "invalid type argument of %qs" +msgstr "нявернае выкарыстанне \"restict\"" + +#: c-typeck.c:1841 cp/typeck.c:2349 #, gcc-internal-format -msgid "format argument %d used more than once in %s format" +msgid "subscripted value is neither array nor pointer" msgstr "" -#: c-format.c:1023 +#: c-typeck.c:1852 cp/typeck.c:2268 cp/typeck.c:2354 #, gcc-internal-format -msgid "$ operand number used after format without operand number" +msgid "array subscript is not an integer" msgstr "" -#: c-format.c:1053 +#: c-typeck.c:1858 #, gcc-internal-format -msgid "format argument %d unused before used argument %d in $-style format" +msgid "subscripted value is pointer to function" msgstr "" -#: c-format.c:1148 +#: c-typeck.c:1871 cp/typeck.c:2264 #, gcc-internal-format -msgid "format not a string literal, format string not checked" +msgid "array subscript has type %" msgstr "" -#: c-format.c:1162 +#: c-typeck.c:1911 +#, fuzzy, gcc-internal-format +msgid "ISO C forbids subscripting % array" +msgstr "ISO C не дазваляе дэкларацыі метак (label)" + +#: c-typeck.c:1913 +#, fuzzy, gcc-internal-format +msgid "ISO C90 forbids subscripting non-lvalue array" +msgstr "ISO C не дазваляе дэкларацыі метак (label)" + +#: c-typeck.c:2155 +#, fuzzy, gcc-internal-format +msgid "called object %qE is not a function" +msgstr "`%D' - гэта ня функцыя," + +#. This situation leads to run-time undefined behavior. We can't, +#. therefore, simply error unless we can prove that all possible +#. executions of the program must execute the code. +#: c-typeck.c:2182 #, gcc-internal-format -msgid "format not a string literal and no format arguments" +msgid "function called through a non-compatible type" msgstr "" -#: c-format.c:1164 +#: c-typeck.c:2289 +#, fuzzy, gcc-internal-format +msgid "too many arguments to function %qE" +msgstr "вельмі шмат аргументаў у функцыі" + +#: c-typeck.c:2310 #, gcc-internal-format -msgid "format not a string literal, argument types not checked" +msgid "type of formal parameter %d is incomplete" msgstr "" -#: c-format.c:1177 +#: c-typeck.c:2323 #, gcc-internal-format -msgid "too many arguments for format" +msgid "passing argument %d of %qE as integer rather than floating due to prototype" msgstr "" -#: c-format.c:1180 +#: c-typeck.c:2328 #, gcc-internal-format -msgid "unused arguments in $-style format" +msgid "passing argument %d of %qE as integer rather than complex due to prototype" msgstr "" -#: c-format.c:1183 +#: c-typeck.c:2333 #, gcc-internal-format -msgid "zero-length %s format string" +msgid "passing argument %d of %qE as complex rather than floating due to prototype" msgstr "" -#: c-format.c:1187 +#: c-typeck.c:2338 #, gcc-internal-format -msgid "format is a wide character string" +msgid "passing argument %d of %qE as floating rather than integer due to prototype" msgstr "" -#: c-format.c:1190 +#: c-typeck.c:2343 #, gcc-internal-format -msgid "unterminated format string" +msgid "passing argument %d of %qE as complex rather than integer due to prototype" msgstr "" -#: c-format.c:1400 +#: c-typeck.c:2348 #, gcc-internal-format -msgid "embedded %<\\0%> in format" +msgid "passing argument %d of %qE as floating rather than complex due to prototype" msgstr "" -#: c-format.c:1415 +#: c-typeck.c:2360 #, gcc-internal-format -msgid "spurious trailing %<%%%> in format" +msgid "passing argument %d of %qE as % rather than % due to prototype" msgstr "" -#: c-format.c:1459 c-format.c:1703 +#: c-typeck.c:2380 #, gcc-internal-format -msgid "repeated %s in format" +msgid "passing argument %d of %qE with different width due to prototype" msgstr "" -#: c-format.c:1472 +#: c-typeck.c:2403 #, gcc-internal-format -msgid "missing fill character at end of strfmon format" +msgid "passing argument %d of %qE as unsigned due to prototype" msgstr "" -#: c-format.c:1516 c-format.c:1618 c-format.c:1897 c-format.c:1959 +#: c-typeck.c:2407 #, gcc-internal-format -msgid "too few arguments for format" +msgid "passing argument %d of %qE as signed due to prototype" msgstr "" -#: c-format.c:1557 +#: c-typeck.c:2497 #, gcc-internal-format -msgid "zero width in %s format" +msgid "suggest parentheses around + or - inside shift" msgstr "" -#: c-format.c:1575 +#: c-typeck.c:2505 #, gcc-internal-format -msgid "empty left precision in %s format" +msgid "suggest parentheses around && within ||" msgstr "" -#: c-format.c:1648 +#: c-typeck.c:2515 #, gcc-internal-format -msgid "empty precision in %s format" +msgid "suggest parentheses around arithmetic in operand of |" msgstr "" -#: c-format.c:1687 -#, fuzzy, gcc-internal-format -msgid "%s does not support the %qs %s length modifier" -msgstr "%s не падтрымлівае %s" - -#: c-format.c:1737 +#: c-typeck.c:2520 #, gcc-internal-format -msgid "conversion lacks type at end of format" +msgid "suggest parentheses around comparison in operand of |" msgstr "" -#: c-format.c:1748 +#: c-typeck.c:2530 #, gcc-internal-format -msgid "unknown conversion type character %qc in format" +msgid "suggest parentheses around arithmetic in operand of ^" msgstr "" -#: c-format.c:1751 +#: c-typeck.c:2535 #, gcc-internal-format -msgid "unknown conversion type character 0x%x in format" +msgid "suggest parentheses around comparison in operand of ^" msgstr "" -#: c-format.c:1758 -#, fuzzy, gcc-internal-format -msgid "%s does not support the %<%%%c%> %s format" -msgstr "%s не падтрымлівае %s" +#: c-typeck.c:2543 +#, gcc-internal-format +msgid "suggest parentheses around + or - in operand of &" +msgstr "" -#: c-format.c:1774 +#: c-typeck.c:2548 #, gcc-internal-format -msgid "%s used with %<%%%c%> %s format" +msgid "suggest parentheses around comparison in operand of &" msgstr "" -#: c-format.c:1783 +#: c-typeck.c:2554 #, gcc-internal-format -msgid "%s does not support %s" -msgstr "%s не падтрымлівае %s" +msgid "comparisons like X<=Y<=Z do not have their mathematical meaning" +msgstr "" -#: c-format.c:1792 -#, fuzzy, gcc-internal-format -msgid "%s does not support %s with the %<%%%c%> %s format" -msgstr "%s не падтрымлівае %s" +#: c-typeck.c:2581 +#, gcc-internal-format +msgid "pointer of type % used in subtraction" +msgstr "" -#: c-format.c:1825 +#: c-typeck.c:2583 #, gcc-internal-format -msgid "%s ignored with %s and %<%%%c%> %s format" +msgid "pointer to a function used in subtraction" msgstr "" -#: c-format.c:1829 +#: c-typeck.c:2680 #, gcc-internal-format -msgid "%s ignored with %s in %s format" +msgid "wrong type argument to unary plus" msgstr "" -#: c-format.c:1835 +#: c-typeck.c:2693 #, gcc-internal-format -msgid "use of %s and %s together with %<%%%c%> %s format" +msgid "wrong type argument to unary minus" msgstr "" -#: c-format.c:1839 +#: c-typeck.c:2710 +#, fuzzy, gcc-internal-format +msgid "ISO C does not support %<~%> for complex conjugation" +msgstr "ISO C89 не падтрымлівае комлексныя тыпы" + +#: c-typeck.c:2716 #, gcc-internal-format -msgid "use of %s and %s together in %s format" +msgid "wrong type argument to bit-complement" msgstr "" -#: c-format.c:1858 +#: c-typeck.c:2724 #, gcc-internal-format -msgid "%<%%%c%> yields only last 2 digits of year in some locales" +msgid "wrong type argument to abs" msgstr "" -#: c-format.c:1861 +#: c-typeck.c:2736 #, gcc-internal-format -msgid "%<%%%c%> yields only last 2 digits of year" +msgid "wrong type argument to conjugation" msgstr "" -#. The end of the format string was reached. -#: c-format.c:1877 +#: c-typeck.c:2748 #, gcc-internal-format -msgid "no closing %<]%> for %<%%[%> format" +msgid "wrong type argument to unary exclamation mark" msgstr "" -#: c-format.c:1890 -#, gcc-internal-format -msgid "use of %qs length modifier with %qc type character" -msgstr "" +#: c-typeck.c:2785 +#, fuzzy, gcc-internal-format +msgid "ISO C does not support %<++%> and %<--%> on complex types" +msgstr "ISO C не падтрымлівае \"++\" і \"--\" для тыпу complex" -#: c-format.c:1911 +#: c-typeck.c:2801 c-typeck.c:2833 #, fuzzy, gcc-internal-format -msgid "%s does not support the %<%%%s%c%> %s format" -msgstr "%s не падтрымлівае %s" +msgid "wrong type argument to increment" +msgstr "не хапае аргументаў у функцыі" -#: c-format.c:1928 +#: c-typeck.c:2803 c-typeck.c:2835 #, gcc-internal-format -msgid "operand number specified with suppressed assignment" +msgid "wrong type argument to decrement" msgstr "" -#: c-format.c:1930 +#: c-typeck.c:2824 #, gcc-internal-format -msgid "operand number specified for format taking no argument" +msgid "increment of pointer to unknown structure" msgstr "" -#: c-format.c:2072 +#: c-typeck.c:2826 #, gcc-internal-format -msgid "writing through null pointer (argument %d)" +msgid "decrement of pointer to unknown structure" msgstr "" -#: c-format.c:2080 +#: c-typeck.c:2998 #, gcc-internal-format -msgid "reading through null pointer (argument %d)" +msgid "assignment of read-only member %qD" msgstr "" -#: c-format.c:2100 +#: c-typeck.c:2999 #, gcc-internal-format -msgid "writing into constant object (argument %d)" +msgid "increment of read-only member %qD" msgstr "" -#: c-format.c:2111 +#: c-typeck.c:3000 #, gcc-internal-format -msgid "extra type qualifiers in format argument (argument %d)" +msgid "decrement of read-only member %qD" msgstr "" -#: c-format.c:2222 +#: c-typeck.c:3001 #, gcc-internal-format -msgid "%s should have type %<%s%s%>, but argument %d has type %qT" +msgid "read-only member %qD used as % output" msgstr "" -#: c-format.c:2225 +#: c-typeck.c:3005 #, gcc-internal-format -msgid "format %q.*s expects type %<%s%s%>, but argument %d has type %qT" +msgid "assignment of read-only variable %qD" msgstr "" -#: c-format.c:2232 +#: c-typeck.c:3006 #, gcc-internal-format -msgid "%s should have type %<%T%s%>, but argument %d has type %qT" +msgid "increment of read-only variable %qD" msgstr "" -#: c-format.c:2235 +#: c-typeck.c:3007 #, gcc-internal-format -msgid "format %q.*s expects type %<%T%s%>, but argument %d has type %qT" +msgid "decrement of read-only variable %qD" msgstr "" -#: c-format.c:2294 c-format.c:2300 c-format.c:2401 +#: c-typeck.c:3008 #, gcc-internal-format -msgid "%<__gcc_host_wide_int__%> is not defined as a type" +msgid "read-only variable %qD used as % output" msgstr "" -#: c-format.c:2307 c-format.c:2411 +#: c-typeck.c:3011 #, gcc-internal-format -msgid "%<__gcc_host_wide_int__%> is not defined as % or %" +msgid "assignment of read-only location" msgstr "" -#: c-format.c:2360 +#: c-typeck.c:3012 #, gcc-internal-format -msgid "% is not defined as a type" +msgid "increment of read-only location" msgstr "" -#: c-format.c:2377 +#: c-typeck.c:3013 #, gcc-internal-format -msgid "% is not defined as a type" +msgid "decrement of read-only location" msgstr "" -#: c-format.c:2382 +#: c-typeck.c:3014 #, gcc-internal-format -msgid "% is not defined as a pointer type" +msgid "read-only location used as % output" msgstr "" -#: c-format.c:2568 +#: c-typeck.c:3049 +#, fuzzy, gcc-internal-format +msgid "cannot take address of bit-field %qD" +msgstr "не магу атрымаць адрас бітавага поля \"%s\"" + +#: c-typeck.c:3077 #, gcc-internal-format -msgid "args to be formatted is not %<...%>" +msgid "global register variable %qD used in nested function" msgstr "" -#: c-format.c:2577 +#: c-typeck.c:3080 #, gcc-internal-format -msgid "strftime formats cannot format arguments" +msgid "register variable %qD used in nested function" msgstr "" -#: c-gimplify.c:237 +#: c-typeck.c:3085 #, gcc-internal-format -msgid "statement with no effect" +msgid "address of global register variable %qD requested" msgstr "" -#: c-gimplify.c:315 c-typeck.c:6976 cp/parser.c:6592 +#: c-typeck.c:3087 #, gcc-internal-format -msgid "break statement not within loop or switch" +msgid "address of register variable %qD requested" msgstr "" -#: c-gimplify.c:317 +#: c-typeck.c:3133 #, gcc-internal-format -msgid "continue statement not within loop or switch" +msgid "non-lvalue array in conditional expression" msgstr "" -#: c-lex.c:259 +#: c-typeck.c:3177 #, gcc-internal-format -msgid "badly nested C headers from preprocessor" +msgid "signed and unsigned type in conditional expression" msgstr "" -#: c-lex.c:307 +#: c-typeck.c:3184 #, gcc-internal-format -msgid "%Hignoring #pragma %s %s" +msgid "ISO C forbids conditional expr with only one void side" msgstr "" -#. ... or not. -#: c-lex.c:411 +#: c-typeck.c:3200 c-typeck.c:3208 #, gcc-internal-format -msgid "%Hstray %<@%> in program" +msgid "ISO C forbids conditional expr between % and function pointer" msgstr "" -#: c-lex.c:425 -#, fuzzy, gcc-internal-format -msgid "stray %qs in program" -msgstr "У праграме" - -#: c-lex.c:435 +#: c-typeck.c:3215 #, gcc-internal-format -msgid "missing terminating %c character" -msgstr "прапушчан завяршаючы сімвал %c" - -#: c-lex.c:437 -#, fuzzy, gcc-internal-format -msgid "stray %qc in program" -msgstr "У праграме" +msgid "pointer type mismatch in conditional expression" +msgstr "" -#: c-lex.c:439 +#: c-typeck.c:3222 c-typeck.c:3232 #, gcc-internal-format -msgid "stray %<\\%o%> in program" +msgid "pointer/integer type mismatch in conditional expression" msgstr "" -#: c-lex.c:599 +#: c-typeck.c:3246 #, gcc-internal-format -msgid "this decimal constant is unsigned only in ISO C90" +msgid "type mismatch in conditional expression" msgstr "" -#: c-lex.c:602 +#: c-typeck.c:3286 #, gcc-internal-format -msgid "this decimal constant would be unsigned in ISO C90" +msgid "left-hand operand of comma expression has no effect" msgstr "" -#: c-lex.c:618 +#: c-typeck.c:3320 #, gcc-internal-format -msgid "integer constant is too large for %qs type" +msgid "cast specifies array type" msgstr "" -#: c-lex.c:684 +#: c-typeck.c:3326 #, gcc-internal-format -msgid "floating constant exceeds range of %<%s%>" +msgid "cast specifies function type" msgstr "" -#: c-lex.c:766 +#: c-typeck.c:3336 #, gcc-internal-format -msgid "traditional C rejects string constant concatenation" +msgid "ISO C forbids casting nonscalar to the same type" msgstr "" -#: c-objc-common.c:80 +#: c-typeck.c:3353 #, gcc-internal-format -msgid "%Jfunction %qF can never be inlined because it is suppressed using -fno-inline" +msgid "ISO C forbids casts to union type" msgstr "" -#: c-objc-common.c:90 +#: c-typeck.c:3361 #, gcc-internal-format -msgid "%Jfunction %qF can never be inlined because it might not be bound within this unit of translation" +msgid "cast to union type from type not present in union" msgstr "" -#: c-objc-common.c:98 +#: c-typeck.c:3407 #, gcc-internal-format -msgid "%Jfunction %qF can never be inlined because it uses attributes conflicting with inlining" +msgid "cast adds new qualifiers to function type" msgstr "" -#: c-objc-common.c:244 +#. There are qualifiers present in IN_OTYPE that are not +#. present in IN_TYPE. +#: c-typeck.c:3412 #, gcc-internal-format -msgid "used array that cannot be converted to pointer where scalar is required" +msgid "cast discards qualifiers from pointer target type" msgstr "" -#: c-objc-common.c:248 +#: c-typeck.c:3428 #, gcc-internal-format -msgid "used struct type value where scalar is required" +msgid "cast increases required alignment of target type" msgstr "" -#: c-objc-common.c:252 +#: c-typeck.c:3435 #, gcc-internal-format -msgid "used union type value where scalar is required" +msgid "cast from pointer to integer of different size" msgstr "" -#: c-opts.c:144 -#, fuzzy, gcc-internal-format -msgid "no class name specified with %qs" -msgstr "не зададзены ўваходзячыя файлы" - -#: c-opts.c:148 -#, fuzzy, gcc-internal-format -msgid "assertion missing after %qs" -msgstr "аргумент для \"%s\" прапушчан" - -#: c-opts.c:153 -#, fuzzy, gcc-internal-format -msgid "macro name missing after %qs" -msgstr "аргумент для \"%s\" прапушчан" - -#: c-opts.c:162 -#, fuzzy, gcc-internal-format -msgid "missing path after %qs" -msgstr "аргумент для \"%s\" прапушчан" - -#: c-opts.c:171 -#, fuzzy, gcc-internal-format -msgid "missing filename after %qs" -msgstr "прапушчан прабел пасля нумара \"%.*s\"" - -#: c-opts.c:176 -#, fuzzy, gcc-internal-format -msgid "missing makefile target after %qs" -msgstr "прапушчан прабел пасля нумара \"%.*s\"" - -#: c-opts.c:303 +#: c-typeck.c:3439 #, gcc-internal-format -msgid "-I- specified twice" +msgid "cast from function call of type %qT to non-matching type %qT" msgstr "" -#: c-opts.c:306 +#: c-typeck.c:3447 #, gcc-internal-format -msgid "obsolete option -I- used, please use -iquote instead" +msgid "cast to pointer from integer of different size" msgstr "" -#: c-opts.c:544 -#, fuzzy, gcc-internal-format -msgid "switch %qs is no longer supported" -msgstr "-pipe не падтрымліваецца." - -#: c-opts.c:657 +#: c-typeck.c:3461 #, gcc-internal-format -msgid "-fhandle-exceptions has been renamed -fexceptions (and is now on by default)" +msgid "type-punning to incomplete type might break strict-aliasing rules" msgstr "" -#: c-opts.c:843 -#, fuzzy, gcc-internal-format -msgid "output filename specified twice" -msgstr "не зададзены ўваходзячыя файлы" - -#: c-opts.c:973 +#: c-typeck.c:3469 #, gcc-internal-format -msgid "-Wformat-y2k ignored without -Wformat" +msgid "dereferencing type-punned pointer will break strict-aliasing rules" msgstr "" -#: c-opts.c:975 +#: c-typeck.c:3473 #, gcc-internal-format -msgid "-Wformat-extra-args ignored without -Wformat" +msgid "dereferencing type-punned pointer might break strict-aliasing rules" msgstr "" -#: c-opts.c:977 +#: c-typeck.c:3486 #, gcc-internal-format -msgid "-Wformat-zero-length ignored without -Wformat" +msgid "ISO C forbids conversion of function pointer to object pointer type" msgstr "" -#: c-opts.c:979 +#: c-typeck.c:3495 #, gcc-internal-format -msgid "-Wformat-nonliteral ignored without -Wformat" +msgid "ISO C forbids conversion of object pointer to function pointer type" msgstr "" -#: c-opts.c:981 +#: c-typeck.c:3769 #, gcc-internal-format -msgid "-Wformat-security ignored without -Wformat" +msgid "cannot pass rvalue to reference parameter" msgstr "" -#: c-opts.c:983 +#: c-typeck.c:3876 c-typeck.c:4044 #, gcc-internal-format -msgid "-Wmissing-format-attribute ignored without -Wformat" +msgid "passing argument %d of %qE makes qualified function pointer from unqualified" msgstr "" -#: c-opts.c:1002 -#, fuzzy, gcc-internal-format -msgid "opening output file %s: %m" -msgstr "немагчыма адчыніць файл уводу `%s'" - -#: c-opts.c:1007 +#: c-typeck.c:3879 c-typeck.c:4047 #, gcc-internal-format -msgid "too many filenames given. Type %s --help for usage" +msgid "assignment makes qualified function pointer from unqualified" msgstr "" -#: c-opts.c:1090 +#: c-typeck.c:3882 c-typeck.c:4049 #, gcc-internal-format -msgid "YYDEBUG was not defined at build time, -dy ignored" +msgid "initialization makes qualified function pointer from unqualified" msgstr "" -#: c-opts.c:1136 +#: c-typeck.c:3885 c-typeck.c:4051 #, gcc-internal-format -msgid "opening dependency file %s: %m" +msgid "return makes qualified function pointer from unqualified" msgstr "" -#: c-opts.c:1146 +#: c-typeck.c:3889 c-typeck.c:4011 #, gcc-internal-format -msgid "closing dependency file %s: %m" +msgid "passing argument %d of %qE discards qualifiers from pointer target type" msgstr "" -#: c-opts.c:1149 -#, fuzzy, gcc-internal-format -msgid "when writing output to %s: %m" -msgstr "памылка запісу ў %s" - -#: c-opts.c:1229 +#: c-typeck.c:3891 c-typeck.c:4013 #, gcc-internal-format -msgid "to generate dependencies you must specify either -M or -MM" +msgid "assignment discards qualifiers from pointer target type" msgstr "" -#: c-opts.c:1394 +#: c-typeck.c:3893 c-typeck.c:4015 #, gcc-internal-format -msgid "too late for # directive to set debug directory" +msgid "initialization discards qualifiers from pointer target type" msgstr "" -#: c-parse.y:343 +#: c-typeck.c:3895 c-typeck.c:4017 #, gcc-internal-format -msgid "ISO C forbids an empty source file" -msgstr "ISO C не дазваляе пусты ізыходны файл" +msgid "return discards qualifiers from pointer target type" +msgstr "" -#: c-parse.y:376 +#: c-typeck.c:3902 #, gcc-internal-format -msgid "data definition has no type or storage class" +msgid "ISO C prohibits argument conversion to union type" msgstr "" -#: c-parse.y:388 +#: c-typeck.c:3937 #, gcc-internal-format -msgid "ISO C does not allow extra %<;%> outside of a function" +msgid "request for implicit conversion from %qT to %qT not permitted in C++" msgstr "" -#: c-parse.y:445 +#: c-typeck.c:3950 #, gcc-internal-format -msgid "traditional C rejects the unary plus operator" +msgid "argument %d of %qE might be a candidate for a format attribute" msgstr "" -#: c-parse.y:498 +#: c-typeck.c:3956 #, gcc-internal-format -msgid "% applied to a bit-field" +msgid "assignment left-hand side might be a candidate for a format attribute" msgstr "" -#: c-parse.y:595 +#: c-typeck.c:3961 #, gcc-internal-format -msgid "ISO C forbids omitting the middle term of a ?: expression" +msgid "initialization left-hand side might be a candidate for a format attribute" msgstr "" -#: c-parse.y:636 +#: c-typeck.c:3966 #, gcc-internal-format -msgid "compound literal has variable size" +msgid "return type might be a candidate for a format attribute" msgstr "" -#: c-parse.y:648 -#, fuzzy, gcc-internal-format -msgid "ISO C90 forbids compound literals" -msgstr "ISO C не падтрымлівае \"goto *expr;\"" - -#: c-parse.y:661 +#: c-typeck.c:3991 #, gcc-internal-format -msgid "ISO C forbids braced-groups within expressions" +msgid "ISO C forbids passing argument %d of %qE between function pointer and %" msgstr "" -#: c-parse.y:697 -#, fuzzy, gcc-internal-format -msgid "first argument to %<__builtin_choose_expr%> not a constant" -msgstr "аргумент `__builtin_args_info' павінен быць канстантай" - -#: c-parse.y:1224 +#: c-typeck.c:3994 #, gcc-internal-format -msgid "% applied to a bit-field" +msgid "ISO C forbids assignment between function pointer and %" msgstr "" -#: c-parse.y:1372 +#: c-typeck.c:3996 #, gcc-internal-format -msgid "ISO C forbids empty initializer braces" +msgid "ISO C forbids initialization between function pointer and %" msgstr "" -#: c-parse.y:1386 +#: c-typeck.c:3998 #, gcc-internal-format -msgid "ISO C90 forbids specifying subobject to initialize" +msgid "ISO C forbids return between function pointer and %" msgstr "" -#: c-parse.y:1389 +#: c-typeck.c:4027 #, gcc-internal-format -msgid "obsolete use of designated initializer without %<=%>" +msgid "pointer targets in passing argument %d of %qE differ in signedness" msgstr "" -#: c-parse.y:1393 +#: c-typeck.c:4029 #, gcc-internal-format -msgid "obsolete use of designated initializer with %<:%>" +msgid "pointer targets in assignment differ in signedness" msgstr "" -#: c-parse.y:1424 +#: c-typeck.c:4031 #, gcc-internal-format -msgid "ISO C forbids specifying range of elements to initialize" +msgid "pointer targets in initialization differ in signedness" msgstr "" -#: c-parse.y:1432 c-parse.y:1462 +#: c-typeck.c:4033 #, gcc-internal-format -msgid "ISO C forbids nested functions" +msgid "pointer targets in return differ in signedness" msgstr "" -#: c-parse.y:1637 +#: c-typeck.c:4058 #, gcc-internal-format -msgid "ISO C forbids forward references to % types" +msgid "passing argument %d of %qE from incompatible pointer type" msgstr "" -#: c-parse.y:1649 cp/parser.c:10039 +#: c-typeck.c:4060 #, gcc-internal-format -msgid "comma at end of enumerator list" +msgid "assignment from incompatible pointer type" msgstr "" -#: c-parse.y:1669 +#: c-typeck.c:4061 #, gcc-internal-format -msgid "no semicolon at end of struct or union" +msgid "initialization from incompatible pointer type" msgstr "" -#: c-parse.y:1678 +#: c-typeck.c:4063 #, gcc-internal-format -msgid "extra semicolon in struct or union specified" +msgid "return from incompatible pointer type" msgstr "" -#: c-parse.y:1698 +#: c-typeck.c:4085 #, gcc-internal-format -msgid "ISO C forbids member declarations with no members" +msgid "passing argument %d of %qE makes pointer from integer without a cast" msgstr "" -#: c-parse.y:1864 +#: c-typeck.c:4087 #, gcc-internal-format -msgid "label at end of compound statement" +msgid "assignment makes pointer from integer without a cast" msgstr "" -#: c-parse.y:1883 -#, fuzzy, gcc-internal-format -msgid "ISO C90 forbids mixed declarations and code" -msgstr "ISO C не дазваляе дэкларацыі метак (label)" - -#: c-parse.y:1923 +#: c-typeck.c:4089 #, gcc-internal-format -msgid "ISO C forbids label declarations" -msgstr "ISO C не дазваляе дэкларацыі метак (label)" +msgid "initialization makes pointer from integer without a cast" +msgstr "" -#: c-parse.y:1967 +#: c-typeck.c:4091 #, gcc-internal-format -msgid "braced-group within expression allowed only inside a function" +msgid "return makes pointer from integer without a cast" msgstr "" -#: c-parse.y:2263 +#: c-typeck.c:4098 #, gcc-internal-format -msgid "%E qualifier ignored on asm" +msgid "passing argument %d of %qE makes integer from pointer without a cast" msgstr "" -#: c-parse.y:2309 +#: c-typeck.c:4100 #, gcc-internal-format -msgid "wide string literal in %" +msgid "assignment makes integer from pointer without a cast" msgstr "" -#: c-parse.y:2371 +#: c-typeck.c:4102 #, gcc-internal-format -msgid "ISO C requires a named argument before %<...%>" +msgid "initialization makes integer from pointer without a cast" msgstr "" -#: c-parse.y:2877 -#, fuzzy, gcc-internal-format -msgid "syntax error at %qs token" -msgstr "сінтаксічная памылка" - -#: c-pch.c:130 -#, fuzzy, gcc-internal-format -msgid "can%'t create precompiled header %s: %m" -msgstr "немагчыма стварыць дырэкторыю \"%s\"" - -#: c-pch.c:158 -#, fuzzy, gcc-internal-format -msgid "can%'t write to %s: %m" -msgstr "не магу запісаць ў %s" - -#: c-pch.c:164 +#: c-typeck.c:4104 #, gcc-internal-format -msgid "%qs is not a valid output file" +msgid "return makes integer from pointer without a cast" msgstr "" -#: c-pch.c:193 c-pch.c:208 c-pch.c:222 -#, fuzzy, gcc-internal-format -msgid "can%'t write %s: %m" -msgstr "немагчыма адчыніць %s" - -#: c-pch.c:198 c-pch.c:215 -#, fuzzy, gcc-internal-format -msgid "can%'t seek in %s: %m" -msgstr "немагчыма адчыніць %s" - -#: c-pch.c:206 c-pch.c:248 c-pch.c:276 c-pch.c:281 c-pch.c:365 -#, fuzzy, gcc-internal-format -msgid "can%'t read %s: %m" -msgstr "не магу прачытаць з %s" - -#: c-pch.c:483 +#: c-typeck.c:4120 #, gcc-internal-format -msgid "malformed #pragma GCC pch_preprocess, ignored" +msgid "incompatible types in assignment" msgstr "" -#: c-pch.c:489 +#: c-typeck.c:4123 +#, fuzzy, gcc-internal-format +msgid "incompatible types in initialization" +msgstr "нерэчаісны ініцыялізатар" + +#: c-typeck.c:4126 #, gcc-internal-format -msgid "pch_preprocess pragma should only be used with -fpreprocessed" +msgid "incompatible types in return" msgstr "" -#: c-pch.c:490 +#: c-typeck.c:4207 #, gcc-internal-format -msgid "use #include instead" +msgid "traditional C rejects automatic aggregate initialization" msgstr "" -#: c-pch.c:498 +#: c-typeck.c:4375 c-typeck.c:4390 c-typeck.c:4405 #, fuzzy, gcc-internal-format -msgid "%s: couldn%'t open PCH file: %m\n" -msgstr "Немагчыма адчыніць файл з дадзенымі %s.\n" +msgid "(near initialization for %qs)" +msgstr "ініцыялізацыя" -#: c-pch.c:503 +#: c-typeck.c:4942 cp/decl.c:4597 #, gcc-internal-format -msgid "use -Winvalid-pch for more information" +msgid "opaque vector types cannot be initialized" msgstr "" -#: c-pch.c:504 +#: c-typeck.c:5572 #, gcc-internal-format -msgid "%s: PCH file was invalid" +msgid "unknown field %qE specified in initializer" msgstr "" -#: c-pragma.c:99 +#: c-typeck.c:6466 #, gcc-internal-format -msgid "#pragma pack (pop) encountered without matching #pragma pack (push)" +msgid "traditional C rejects initialization of unions" msgstr "" -#: c-pragma.c:112 +#: c-typeck.c:6774 #, gcc-internal-format -msgid "#pragma pack(pop, %s) encountered without matching #pragma pack(push, %s)" +msgid "jump into statement expression" +msgstr "" + +#: c-typeck.c:6780 +#, gcc-internal-format +msgid "jump into scope of identifier with variably modified type" msgstr "" -#: c-pragma.c:126 +#: c-typeck.c:6817 #, fuzzy, gcc-internal-format -msgid "#pragma pack(push[, id], ) is not supported on this target" -msgstr "атрыбуты секцыі не падтрымліваюцца для гэтай мэты" +msgid "ISO C forbids %" +msgstr "ISO C не падтрымлівае \"goto *expr;\"" -#: c-pragma.c:128 +#: c-typeck.c:6832 cp/typeck.c:6234 #, fuzzy, gcc-internal-format -msgid "#pragma pack(pop[, id], ) is not supported on this target" -msgstr "атрыбуты секцыі не падтрымліваюцца для гэтай мэты" +msgid "function declared % has a % statement" +msgstr "функцыя не вяртае тып string" -#: c-pragma.c:149 +#: c-typeck.c:6840 #, gcc-internal-format -msgid "missing %<(%> after %<#pragma pack%> - ignored" +msgid "% with no value, in function returning non-void" msgstr "" -#: c-pragma.c:162 c-pragma.c:202 +#: c-typeck.c:6849 #, gcc-internal-format -msgid "malformed %<#pragma pack%> - ignored" +msgid "% with a value, in function returning void" msgstr "" -#: c-pragma.c:167 -#, fuzzy, gcc-internal-format -msgid "malformed %<#pragma pack(push[, id][, ])%> - ignored" -msgstr "атрыбуты секцыі не падтрымліваюцца для гэтай мэты" - -#: c-pragma.c:169 +#: c-typeck.c:6906 #, gcc-internal-format -msgid "malformed %<#pragma pack(pop[, id])%> - ignored" +msgid "function returns address of local variable" msgstr "" -#: c-pragma.c:178 +#: c-typeck.c:6979 cp/semantics.c:908 #, gcc-internal-format -msgid "unknown action %qs for %<#pragma pack%> - ignored" +msgid "switch quantity not an integer" msgstr "" -#: c-pragma.c:205 +#: c-typeck.c:6990 #, gcc-internal-format -msgid "junk at end of %<#pragma pack%>" +msgid "% switch expression not converted to % in ISO C" msgstr "" -#: c-pragma.c:208 +#: c-typeck.c:7031 #, gcc-internal-format -msgid "#pragma pack has no effect with -fpack-struct - ignored" +msgid "case label in statement expression not containing enclosing switch statement" msgstr "" -#: c-pragma.c:228 +#: c-typeck.c:7034 #, gcc-internal-format -msgid "alignment must be a small power of two, not %d" +msgid "% label in statement expression not containing enclosing switch statement" msgstr "" -#: c-pragma.c:261 +#: c-typeck.c:7040 #, gcc-internal-format -msgid "%Japplying #pragma weak %qD after first use results in unspecified behavior" +msgid "case label in scope of identifier with variably modified type not containing enclosing switch statement" msgstr "" -#: c-pragma.c:335 c-pragma.c:340 +#: c-typeck.c:7043 #, gcc-internal-format -msgid "malformed #pragma weak, ignored" +msgid "% label in scope of identifier with variably modified type not containing enclosing switch statement" msgstr "" -#: c-pragma.c:344 +#: c-typeck.c:7047 cp/parser.c:6185 #, gcc-internal-format -msgid "junk at end of #pragma weak" +msgid "case label not within a switch statement" msgstr "" -#: c-pragma.c:412 c-pragma.c:414 +#: c-typeck.c:7049 #, gcc-internal-format -msgid "malformed #pragma redefine_extname, ignored" +msgid "% label not within a switch statement" msgstr "" -#: c-pragma.c:417 +#: c-typeck.c:7126 #, gcc-internal-format -msgid "junk at end of #pragma redefine_extname" +msgid "%Hsuggest explicit braces to avoid ambiguous %" msgstr "" -#: c-pragma.c:422 +#: c-typeck.c:7145 #, fuzzy, gcc-internal-format -msgid "#pragma redefine_extname not supported on this target" -msgstr "__buitin_saveregs не падтрымліваецца гэтай мэтай" +msgid "%Hempty body in an if-statement" +msgstr "пустое цела ў else-выражэнні" -#: c-pragma.c:439 c-pragma.c:525 +#: c-typeck.c:7154 #, fuzzy, gcc-internal-format -msgid "#pragma redefine_extname ignored due to conflict with previous rename" -msgstr "секцыя \"%s\" канфліктуе з папярэдняй дэкларацыяй" - -#: c-pragma.c:462 -#, gcc-internal-format -msgid "#pragma redefine_extname ignored due to conflict with previous #pragma redefine_extname" -msgstr "" +msgid "%Hempty body in an else-statement" +msgstr "пустое цела ў else-выражэнні" -#: c-pragma.c:481 +#: c-typeck.c:7263 cp/cp-gimplify.c:118 cp/parser.c:6677 #, gcc-internal-format -msgid "malformed #pragma extern_prefix, ignored" +msgid "break statement not within loop or switch" msgstr "" -#: c-pragma.c:484 +#: c-typeck.c:7265 cp/parser.c:6688 #, gcc-internal-format -msgid "junk at end of #pragma extern_prefix" +msgid "continue statement not within a loop" msgstr "" -#: c-pragma.c:490 -#, fuzzy, gcc-internal-format -msgid "#pragma extern_prefix not supported on this target" -msgstr "__buitin_saveregs не падтрымліваецца гэтай мэтай" - -#: c-pragma.c:516 -#, fuzzy, gcc-internal-format -msgid "asm declaration ignored due to conflict with previous rename" -msgstr "секцыя \"%s\" канфліктуе з папярэдняй дэкларацыяй" - -#: c-pragma.c:547 +#: c-typeck.c:7285 #, gcc-internal-format -msgid "#pragma redefine_extname ignored due to conflict with __asm__ declaration" +msgid "%Hstatement with no effect" msgstr "" -#: c-pragma.c:607 +#: c-typeck.c:7307 #, gcc-internal-format -msgid "#pragma GCC visibility must be followed by push or pop" +msgid "expression statement has incomplete type" msgstr "" -#: c-pragma.c:614 +#: c-typeck.c:7765 c-typeck.c:7806 #, gcc-internal-format -msgid "No matching push for %<#pragma GCC visibility pop%>" +msgid "division by zero" msgstr "" -#: c-pragma.c:625 c-pragma.c:654 +#: c-typeck.c:7851 cp/typeck.c:3037 #, gcc-internal-format -msgid "missing %<(%> after %<#pragma GCC visibility push%> - ignored" +msgid "right shift count is negative" msgstr "" -#: c-pragma.c:629 +#: c-typeck.c:7858 cp/typeck.c:3043 #, gcc-internal-format -msgid "malformed #pragma GCC visibility push" +msgid "right shift count >= width of type" msgstr "" -#: c-pragma.c:633 +#: c-typeck.c:7879 cp/typeck.c:3062 #, gcc-internal-format -msgid "No more than sixteen #pragma GCC visibility pushes allowed at once" +msgid "left shift count is negative" msgstr "" -#: c-pragma.c:649 +#: c-typeck.c:7882 cp/typeck.c:3064 #, gcc-internal-format -msgid "#pragma GCC visibility push() must specify default, internal, hidden or protected" +msgid "left shift count >= width of type" msgstr "" -#: c-pragma.c:658 +#: c-typeck.c:7900 cp/typeck.c:3099 #, gcc-internal-format -msgid "junk at end of %<#pragma GCC visibility%>" +msgid "comparing floating point with == or != is unsafe" msgstr "" -#: c-typeck.c:142 +#: c-typeck.c:7924 c-typeck.c:7931 #, fuzzy, gcc-internal-format -msgid "%qs has an incomplete type" -msgstr "\"%s\" мае незавершаны тып" +msgid "ISO C forbids comparison of % with function pointer" +msgstr "ISO C не дазваляе дэкларацыі метак (label)" -#: c-typeck.c:164 cp/call.c:2679 +#: c-typeck.c:7937 c-typeck.c:7983 #, gcc-internal-format -msgid "invalid use of void expression" +msgid "comparison of distinct pointer types lacks a cast" msgstr "" -#: c-typeck.c:172 +#: c-typeck.c:7951 c-typeck.c:7956 c-typeck.c:8003 c-typeck.c:8008 #, gcc-internal-format -msgid "invalid use of flexible array member" +msgid "comparison between pointer and integer" msgstr "" -#: c-typeck.c:178 +#: c-typeck.c:7975 #, gcc-internal-format -msgid "invalid use of array with unspecified bounds" +msgid "comparison of complete and incomplete pointers" msgstr "" -#: c-typeck.c:186 -#, fuzzy, gcc-internal-format -msgid "invalid use of undefined type %<%s %s%>" -msgstr "нявернае выкарыстанне \"restict\"" - -#. If this type has a typedef-name, the TYPE_NAME is a TYPE_DECL. -#: c-typeck.c:190 -#, fuzzy, gcc-internal-format -msgid "invalid use of incomplete typedef %qs" -msgstr "нявернае выкарыстанне \"restict\"" - -#: c-typeck.c:397 c-typeck.c:422 +#: c-typeck.c:7978 #, gcc-internal-format -msgid "function types not truly compatible in ISO C" +msgid "ISO C forbids ordered comparisons of pointers to functions" msgstr "" -#: c-typeck.c:806 +#: c-typeck.c:7991 c-typeck.c:7998 #, gcc-internal-format -msgid "types are not quite compatible" +msgid "ordered comparison of pointer with integer zero" msgstr "" -#: c-typeck.c:1048 +#: c-typeck.c:8228 #, gcc-internal-format -msgid "function return types not compatible due to %" +msgid "comparison between signed and unsigned" msgstr "" -#: c-typeck.c:1207 c-typeck.c:2456 +#: c-typeck.c:8274 cp/typeck.c:3522 #, gcc-internal-format -msgid "arithmetic on pointer to an incomplete type" +msgid "comparison of promoted ~unsigned with constant" msgstr "" -#: c-typeck.c:1570 +#: c-typeck.c:8282 cp/typeck.c:3530 #, gcc-internal-format -msgid "%qT has no member named %qs" +msgid "comparison of promoted ~unsigned with unsigned" msgstr "" -#: c-typeck.c:1606 +#: c-typeck.c:8340 #, gcc-internal-format -msgid "request for member %qs in something not a structure or union" +msgid "used array that cannot be converted to pointer where scalar is required" msgstr "" -#: c-typeck.c:1640 +#: c-typeck.c:8344 #, gcc-internal-format -msgid "dereferencing pointer to incomplete type" +msgid "used struct type value where scalar is required" msgstr "" -#: c-typeck.c:1644 +#: c-typeck.c:8348 #, gcc-internal-format -msgid "dereferencing % pointer" +msgid "used union type value where scalar is required" msgstr "" -#: c-typeck.c:1661 cp/typeck.c:2125 -#, fuzzy, gcc-internal-format -msgid "invalid type argument of %qs" -msgstr "нявернае выкарыстанне \"restict\"" - -#: c-typeck.c:1689 cp/typeck.c:2276 +#: calls.c:1929 #, gcc-internal-format -msgid "subscripted value is neither array nor pointer" +msgid "function call has aggregate value" msgstr "" -#: c-typeck.c:1700 cp/typeck.c:2195 cp/typeck.c:2281 +#: cfgexpand.c:1558 #, gcc-internal-format -msgid "array subscript is not an integer" +msgid "not protecting local variables: variable length buffer" msgstr "" -#: c-typeck.c:1706 +#: cfgexpand.c:1560 #, gcc-internal-format -msgid "subscripted value is pointer to function" +msgid "not protecting function: no buffer at least %d bytes long" msgstr "" -#: c-typeck.c:1719 cp/typeck.c:2191 +#: cfghooks.c:90 #, gcc-internal-format -msgid "array subscript has type %" +msgid "bb %d on wrong place" msgstr "" -#: c-typeck.c:1759 -#, fuzzy, gcc-internal-format -msgid "ISO C forbids subscripting % array" -msgstr "ISO C не дазваляе дэкларацыі метак (label)" - -#: c-typeck.c:1761 -#, fuzzy, gcc-internal-format -msgid "ISO C90 forbids subscripting non-lvalue array" -msgstr "ISO C не дазваляе дэкларацыі метак (label)" - -#: c-typeck.c:1998 -#, fuzzy, gcc-internal-format -msgid "called object %qE is not a function" -msgstr "`%D' - гэта ня функцыя," - -#. This situation leads to run-time undefined behavior. We can't, -#. therefore, simply error unless we can prove that all possible -#. executions of the program must execute the code. -#: c-typeck.c:2030 +#: cfghooks.c:96 #, gcc-internal-format -msgid "function called through a non-compatible type" +msgid "prev_bb of %d should be %d, not %d" msgstr "" -#: c-typeck.c:2138 -#, fuzzy, gcc-internal-format -msgid "too many arguments to function %qE" -msgstr "вельмі шмат аргументаў у функцыі" - -#: c-typeck.c:2165 +#: cfghooks.c:113 #, gcc-internal-format -msgid "type of formal parameter %d is incomplete" +msgid "verify_flow_info: Wrong count of block %i %i" msgstr "" -#: c-typeck.c:2178 +#: cfghooks.c:119 #, gcc-internal-format -msgid "passing argument %d of %qE as integer rather than floating due to prototype" +msgid "verify_flow_info: Wrong frequency of block %i %i" msgstr "" -#: c-typeck.c:2183 +#: cfghooks.c:127 #, gcc-internal-format -msgid "passing argument %d of %qE as integer rather than complex due to prototype" +msgid "verify_flow_info: Duplicate edge %i->%i" msgstr "" -#: c-typeck.c:2188 +#: cfghooks.c:133 #, gcc-internal-format -msgid "passing argument %d of %qE as complex rather than floating due to prototype" +msgid "verify_flow_info: Wrong probability of edge %i->%i %i" msgstr "" -#: c-typeck.c:2193 +#: cfghooks.c:139 #, gcc-internal-format -msgid "passing argument %d of %qE as floating rather than integer due to prototype" +msgid "verify_flow_info: Wrong count of edge %i->%i %i" msgstr "" -#: c-typeck.c:2198 +#: cfghooks.c:151 #, gcc-internal-format -msgid "passing argument %d of %qE as complex rather than integer due to prototype" +msgid "verify_flow_info: Basic block %d succ edge is corrupted" msgstr "" -#: c-typeck.c:2203 +#: cfghooks.c:165 cfgrtl.c:2045 #, gcc-internal-format -msgid "passing argument %d of %qE as floating rather than complex due to prototype" +msgid "wrong amount of branch edges after unconditional jump %i" msgstr "" -#: c-typeck.c:2215 +#: cfghooks.c:173 cfghooks.c:184 #, gcc-internal-format -msgid "passing argument %d of %qE as % rather than % due to prototype" +msgid "basic block %d pred edge is corrupted" msgstr "" -#: c-typeck.c:2235 +#: cfghooks.c:185 #, gcc-internal-format -msgid "passing argument %d of %qE with different width due to prototype" +msgid "its dest_idx should be %d, not %d" msgstr "" -#: c-typeck.c:2262 +#: cfghooks.c:214 #, gcc-internal-format -msgid "passing argument %d of %qE as unsigned due to prototype" +msgid "basic block %i edge lists are corrupted" msgstr "" -#: c-typeck.c:2265 +#: cfghooks.c:227 #, gcc-internal-format -msgid "passing argument %d of %qE as signed due to prototype" +msgid "verify_flow_info failed" msgstr "" -#: c-typeck.c:2296 +#: cfghooks.c:288 #, fuzzy, gcc-internal-format -msgid "too few arguments to function %qE" -msgstr "не хапае аргументаў у функцыі" +msgid "%s does not support redirect_edge_and_branch" +msgstr "%s не падтрымлівае %s" -#: c-typeck.c:2332 +#: cfghooks.c:306 #, gcc-internal-format -msgid "suggest parentheses around + or - inside shift" +msgid "%s does not support redirect_edge_and_branch_force" msgstr "" -#: c-typeck.c:2339 -#, gcc-internal-format -msgid "suggest parentheses around && within ||" -msgstr "" +#: cfghooks.c:324 +#, fuzzy, gcc-internal-format +msgid "%s does not support split_block" +msgstr "%s не падтрымлівае %s" -#: c-typeck.c:2348 -#, gcc-internal-format -msgid "suggest parentheses around arithmetic in operand of |" -msgstr "" +#: cfghooks.c:360 +#, fuzzy, gcc-internal-format +msgid "%s does not support move_block_after" +msgstr "%s не падтрымлівае %s" -#: c-typeck.c:2352 -#, gcc-internal-format -msgid "suggest parentheses around comparison in operand of |" -msgstr "" +#: cfghooks.c:373 +#, fuzzy, gcc-internal-format +msgid "%s does not support delete_basic_block" +msgstr "%s не падтрымлівае %s" + +#: cfghooks.c:405 +#, fuzzy, gcc-internal-format +msgid "%s does not support split_edge" +msgstr "%s не падтрымлівае %s" + +#: cfghooks.c:466 +#, fuzzy, gcc-internal-format +msgid "%s does not support create_basic_block" +msgstr "%s не падтрымлівае %s" + +#: cfghooks.c:494 +#, fuzzy, gcc-internal-format +msgid "%s does not support can_merge_blocks_p" +msgstr "%s не падтрымлівае %s" + +#: cfghooks.c:505 +#, fuzzy, gcc-internal-format +msgid "%s does not support predict_edge" +msgstr "%s не падтрымлівае %s" + +#: cfghooks.c:514 +#, fuzzy, gcc-internal-format +msgid "%s does not support predicted_by_p" +msgstr "%s не падтрымлівае %s" + +#: cfghooks.c:528 +#, fuzzy, gcc-internal-format +msgid "%s does not support merge_blocks" +msgstr "%s не падтрымлівае %s" + +#: cfghooks.c:573 +#, fuzzy, gcc-internal-format +msgid "%s does not support make_forwarder_block" +msgstr "%s не падтрымлівае %s" + +#: cfghooks.c:678 +#, fuzzy, gcc-internal-format +msgid "%s does not support can_duplicate_block_p" +msgstr "%s не падтрымлівае %s" + +#: cfghooks.c:706 +#, fuzzy, gcc-internal-format +msgid "%s does not support duplicate_block" +msgstr "%s не падтрымлівае %s" + +#: cfghooks.c:774 +#, fuzzy, gcc-internal-format +msgid "%s does not support block_ends_with_call_p" +msgstr "%s не падтрымлівае %s" + +#: cfghooks.c:785 +#, fuzzy, gcc-internal-format +msgid "%s does not support block_ends_with_condjump_p" +msgstr "%s не падтрымлівае %s" + +#: cfghooks.c:803 +#, fuzzy, gcc-internal-format +msgid "%s does not support flow_call_edges_add" +msgstr "%s не падтрымлівае %s" -#: c-typeck.c:2361 +#: cfgloop.c:1088 #, gcc-internal-format -msgid "suggest parentheses around arithmetic in operand of ^" +msgid "size of loop %d should be %d, not %d" msgstr "" -#: c-typeck.c:2365 +#: cfgloop.c:1105 #, gcc-internal-format -msgid "suggest parentheses around comparison in operand of ^" +msgid "bb %d do not belong to loop %d" msgstr "" -#: c-typeck.c:2372 +#: cfgloop.c:1122 #, gcc-internal-format -msgid "suggest parentheses around + or - in operand of &" +msgid "loop %d's header does not have exactly 2 entries" msgstr "" -#: c-typeck.c:2376 +#: cfgloop.c:1129 #, gcc-internal-format -msgid "suggest parentheses around comparison in operand of &" +msgid "loop %d's latch does not have exactly 1 successor" msgstr "" -#: c-typeck.c:2382 +#: cfgloop.c:1134 #, gcc-internal-format -msgid "comparisons like X<=Y<=Z do not have their mathematical meaning" +msgid "loop %d's latch does not have header as successor" msgstr "" -#: c-typeck.c:2408 +#: cfgloop.c:1139 #, gcc-internal-format -msgid "pointer of type % used in subtraction" +msgid "loop %d's latch does not belong directly to it" msgstr "" -#: c-typeck.c:2410 +#: cfgloop.c:1145 #, gcc-internal-format -msgid "pointer to a function used in subtraction" +msgid "loop %d's header does not belong directly to it" msgstr "" -#: c-typeck.c:2499 +#: cfgloop.c:1151 #, gcc-internal-format -msgid "wrong type argument to unary plus" +msgid "loop %d's latch is marked as part of irreducible region" msgstr "" -#: c-typeck.c:2512 +#: cfgloop.c:1184 #, gcc-internal-format -msgid "wrong type argument to unary minus" +msgid "basic block %d should be marked irreducible" msgstr "" -#: c-typeck.c:2529 -#, fuzzy, gcc-internal-format -msgid "ISO C does not support %<~%> for complex conjugation" -msgstr "ISO C89 не падтрымлівае комлексныя тыпы" - -#: c-typeck.c:2535 +#: cfgloop.c:1190 #, gcc-internal-format -msgid "wrong type argument to bit-complement" +msgid "basic block %d should not be marked irreducible" msgstr "" -#: c-typeck.c:2543 +#: cfgloop.c:1198 #, gcc-internal-format -msgid "wrong type argument to abs" +msgid "edge from %d to %d should be marked irreducible" msgstr "" -#: c-typeck.c:2555 +#: cfgloop.c:1205 #, gcc-internal-format -msgid "wrong type argument to conjugation" +msgid "edge from %d to %d should not be marked irreducible" msgstr "" -#: c-typeck.c:2569 +#: cfgloop.c:1240 #, gcc-internal-format -msgid "wrong type argument to unary exclamation mark" +msgid "wrong single exit %d->%d recorded for loop %d" msgstr "" -#: c-typeck.c:2606 -#, fuzzy, gcc-internal-format -msgid "ISO C does not support %<++%> and %<--%> on complex types" -msgstr "ISO C не падтрымлівае \"++\" і \"--\" для тыпу complex" - -#: c-typeck.c:2622 c-typeck.c:2654 -#, fuzzy, gcc-internal-format -msgid "wrong type argument to increment" -msgstr "не хапае аргументаў у функцыі" - -#: c-typeck.c:2624 c-typeck.c:2656 +#: cfgloop.c:1244 #, gcc-internal-format -msgid "wrong type argument to decrement" +msgid "right exit is %d->%d" msgstr "" -#: c-typeck.c:2645 +#: cfgloop.c:1261 #, gcc-internal-format -msgid "increment of pointer to unknown structure" +msgid "single exit not recorded for loop %d" msgstr "" -#: c-typeck.c:2647 +#: cfgloop.c:1268 #, gcc-internal-format -msgid "decrement of pointer to unknown structure" +msgid "loop %d should not have single exit (%d -> %d)" msgstr "" -#: c-typeck.c:2817 +#: cfgrtl.c:1931 #, gcc-internal-format -msgid "assignment of read-only member %qs" +msgid "BB_RTL flag not set for block %d" msgstr "" -#: c-typeck.c:2818 +#: cfgrtl.c:1937 #, gcc-internal-format -msgid "increment of read-only member %qs" +msgid "end insn %d for block %d not found in the insn stream" msgstr "" -#: c-typeck.c:2819 +#: cfgrtl.c:1951 #, gcc-internal-format -msgid "decrement of read-only member %qs" +msgid "insn %d is in multiple basic blocks (%d and %d)" msgstr "" -#: c-typeck.c:2823 +#: cfgrtl.c:1963 #, gcc-internal-format -msgid "assignment of read-only variable %qs" +msgid "head insn %d for block %d not found in the insn stream" msgstr "" -#: c-typeck.c:2824 +#: cfgrtl.c:1987 #, gcc-internal-format -msgid "increment of read-only variable %qs" +msgid "verify_flow_info: REG_BR_PROB does not match cfg %wi %i" msgstr "" -#: c-typeck.c:2825 +#: cfgrtl.c:2002 #, gcc-internal-format -msgid "decrement of read-only variable %qs" +msgid "fallthru edge crosses section boundary (bb %i)" msgstr "" -#: c-typeck.c:2828 +#: cfgrtl.c:2027 #, gcc-internal-format -msgid "assignment of read-only location" +msgid "missing REG_EH_REGION note in the end of bb %i" msgstr "" -#: c-typeck.c:2829 +#: cfgrtl.c:2035 #, gcc-internal-format -msgid "increment of read-only location" +msgid "too many outgoing branch edges from bb %i" msgstr "" -#: c-typeck.c:2830 +#: cfgrtl.c:2040 #, gcc-internal-format -msgid "decrement of read-only location" +msgid "fallthru edge after unconditional jump %i" msgstr "" -#: c-typeck.c:2849 -#, fuzzy, gcc-internal-format -msgid "cannot take address of bit-field %qD" -msgstr "не магу атрымаць адрас бітавага поля \"%s\"" - -#: c-typeck.c:2877 +#: cfgrtl.c:2051 #, gcc-internal-format -msgid "global register variable %qD used in nested function" +msgid "wrong amount of branch edges after conditional jump %i" msgstr "" -#: c-typeck.c:2880 +#: cfgrtl.c:2056 #, gcc-internal-format -msgid "register variable %qD used in nested function" +msgid "call edges for non-call insn in bb %i" msgstr "" -#: c-typeck.c:2885 +#: cfgrtl.c:2065 #, gcc-internal-format -msgid "address of global register variable %qD requested" +msgid "abnormal edges for no purpose in bb %i" msgstr "" -#: c-typeck.c:2887 +#: cfgrtl.c:2077 #, gcc-internal-format -msgid "address of register variable %qD requested" +msgid "insn %d inside basic block %d but block_for_insn is NULL" msgstr "" -#: c-typeck.c:2935 +#: cfgrtl.c:2081 #, gcc-internal-format -msgid "non-lvalue array in conditional expression" +msgid "insn %d inside basic block %d but block_for_insn is %i" msgstr "" -#: c-typeck.c:2979 +#: cfgrtl.c:2095 cfgrtl.c:2105 #, gcc-internal-format -msgid "signed and unsigned type in conditional expression" +msgid "NOTE_INSN_BASIC_BLOCK is missing for block %d" msgstr "" -#: c-typeck.c:2986 +#: cfgrtl.c:2118 #, gcc-internal-format -msgid "ISO C forbids conditional expr with only one void side" +msgid "NOTE_INSN_BASIC_BLOCK %d in middle of basic block %d" msgstr "" -#: c-typeck.c:3002 c-typeck.c:3010 +#: cfgrtl.c:2128 #, gcc-internal-format -msgid "ISO C forbids conditional expr between % and function pointer" +msgid "in basic block %d:" msgstr "" -#: c-typeck.c:3017 +#: cfgrtl.c:2165 #, gcc-internal-format -msgid "pointer type mismatch in conditional expression" +msgid "bb prediction set for block %i, but it is not used in RTL land" msgstr "" -#: c-typeck.c:3024 c-typeck.c:3034 +#: cfgrtl.c:2183 #, gcc-internal-format -msgid "pointer/integer type mismatch in conditional expression" +msgid "missing barrier after block %i" msgstr "" -#: c-typeck.c:3048 +#: cfgrtl.c:2196 #, gcc-internal-format -msgid "type mismatch in conditional expression" +msgid "verify_flow_info: Incorrect blocks for fallthru %i->%i" msgstr "" -#: c-typeck.c:3094 +#: cfgrtl.c:2205 #, gcc-internal-format -msgid "left-hand operand of comma expression has no effect" +msgid "verify_flow_info: Incorrect fallthru %i->%i" msgstr "" -#: c-typeck.c:3128 +#: cfgrtl.c:2224 #, gcc-internal-format -msgid "cast specifies array type" +msgid "basic blocks not laid down consecutively" msgstr "" -#: c-typeck.c:3134 +#: cfgrtl.c:2263 #, gcc-internal-format -msgid "cast specifies function type" +msgid "number of bb notes in insn chain (%d) != n_basic_blocks (%d)" msgstr "" -#: c-typeck.c:3144 +#: cgraph.c:763 #, gcc-internal-format -msgid "ISO C forbids casting nonscalar to the same type" +msgid "%D renamed after being referenced in assembly" msgstr "" -#: c-typeck.c:3162 +#: cgraphunit.c:664 #, gcc-internal-format -msgid "ISO C forbids casts to union type" +msgid "aux field set for edge %s->%s" msgstr "" -#: c-typeck.c:3171 +#: cgraphunit.c:670 #, gcc-internal-format -msgid "cast to union type from type not present in union" +msgid "Execution count is negative" msgstr "" -#: c-typeck.c:3222 +#: cgraphunit.c:677 #, gcc-internal-format -msgid "cast adds new qualifiers to function type" +msgid "caller edge count is negative" msgstr "" -#. There are qualifiers present in IN_OTYPE that are not -#. present in IN_TYPE. -#: c-typeck.c:3227 +#: cgraphunit.c:686 #, gcc-internal-format -msgid "cast discards qualifiers from pointer target type" +msgid "inlined_to pointer is wrong" msgstr "" -#: c-typeck.c:3242 +#: cgraphunit.c:691 #, gcc-internal-format -msgid "cast increases required alignment of target type" +msgid "multiple inline callers" msgstr "" -#: c-typeck.c:3248 +#: cgraphunit.c:698 #, gcc-internal-format -msgid "cast from pointer to integer of different size" +msgid "inlined_to pointer set for noninline callers" msgstr "" -#: c-typeck.c:3253 +#: cgraphunit.c:704 #, gcc-internal-format -msgid "cast from function call of type %qT to non-matching type %qT" +msgid "inlined_to pointer is set but no predecesors found" msgstr "" -#: c-typeck.c:3261 +#: cgraphunit.c:709 #, gcc-internal-format -msgid "cast to pointer from integer of different size" +msgid "inlined_to pointer refers to itself" msgstr "" -#: c-typeck.c:3273 +#: cgraphunit.c:719 #, gcc-internal-format -msgid "type-punning to incomplete type might break strict-aliasing rules" +msgid "node not found in DECL_ASSEMBLER_NAME hash" msgstr "" -#: c-typeck.c:3280 +#: cgraphunit.c:747 #, gcc-internal-format -msgid "dereferencing type-punned pointer will break strict-aliasing rules" +msgid "shared call_stmt:" msgstr "" -#: c-typeck.c:3283 -#, gcc-internal-format -msgid "dereferencing type-punned pointer might break strict-aliasing rules" -msgstr "" +#: cgraphunit.c:753 +#, fuzzy, gcc-internal-format +msgid "edge points to wrong declaration:" +msgstr "\"%s\" - гэта не пачатак дэкларацыі" -#: c-typeck.c:3295 +#: cgraphunit.c:762 #, gcc-internal-format -msgid "ISO C forbids conversion of function pointer to object pointer type" +msgid "missing callgraph edge for call stmt:" msgstr "" -#: c-typeck.c:3304 +#: cgraphunit.c:779 #, gcc-internal-format -msgid "ISO C forbids conversion of object pointer to function pointer type" +msgid "edge %s->%s has no corresponding call_stmt" msgstr "" -#: c-typeck.c:3556 +#: cgraphunit.c:791 #, gcc-internal-format -msgid "cannot pass rvalue to reference parameter" +msgid "verify_cgraph_node failed" msgstr "" -#: c-typeck.c:3665 c-typeck.c:3780 +#: cgraphunit.c:1028 #, gcc-internal-format -msgid "passing argument %d of %qE makes qualified function pointer from unqualified" +msgid "failed to reclaim unneeded function" msgstr "" -#: c-typeck.c:3668 c-typeck.c:3783 +#: cgraphunit.c:1308 #, gcc-internal-format -msgid "assignment makes qualified function pointer from unqualified" +msgid "nodes with no released memory found" msgstr "" -#: c-typeck.c:3671 c-typeck.c:3785 -#, gcc-internal-format -msgid "initialization makes qualified function pointer from unqualified" -msgstr "" +#: collect2.c:1172 +#, fuzzy, gcc-internal-format +msgid "unknown demangling style '%s'" +msgstr "невядомы рэжым машыны \"%s\"" -#: c-typeck.c:3674 c-typeck.c:3787 +#: collect2.c:1495 #, gcc-internal-format -msgid "return makes qualified function pointer from unqualified" +msgid "%s terminated with signal %d [%s]%s" msgstr "" -#: c-typeck.c:3678 c-typeck.c:3748 +#: collect2.c:1513 #, gcc-internal-format -msgid "passing argument %d of %qE discards qualifiers from pointer target type" +msgid "%s returned %d exit status" msgstr "" -#: c-typeck.c:3680 c-typeck.c:3750 -#, gcc-internal-format -msgid "assignment discards qualifiers from pointer target type" -msgstr "" +#: collect2.c:2175 +#, fuzzy, gcc-internal-format +msgid "cannot find 'ldd'" +msgstr "не магу знайсці \"ldd\"" -#: c-typeck.c:3682 c-typeck.c:3752 +#: convert.c:65 #, gcc-internal-format -msgid "initialization discards qualifiers from pointer target type" +msgid "cannot convert to a pointer type" msgstr "" -#: c-typeck.c:3684 c-typeck.c:3754 +#: convert.c:304 #, gcc-internal-format -msgid "return discards qualifiers from pointer target type" +msgid "pointer value used where a floating point value was expected" msgstr "" -#: c-typeck.c:3689 +#: convert.c:308 #, gcc-internal-format -msgid "ISO C prohibits argument conversion to union type" +msgid "aggregate value used where a float was expected" msgstr "" -#: c-typeck.c:3733 +#: convert.c:333 #, gcc-internal-format -msgid "ISO C forbids passing argument %d of %qE between function pointer and %" +msgid "conversion to incomplete type" msgstr "" -#: c-typeck.c:3736 +#: convert.c:678 convert.c:754 #, gcc-internal-format -msgid "ISO C forbids assignment between function pointer and %" +msgid "can't convert between vector values of different size" msgstr "" -#: c-typeck.c:3738 +#: convert.c:684 #, gcc-internal-format -msgid "ISO C forbids initialization between function pointer and %" +msgid "aggregate value used where an integer was expected" msgstr "" -#: c-typeck.c:3740 +#: convert.c:734 #, gcc-internal-format -msgid "ISO C forbids return between function pointer and %" +msgid "pointer value used where a complex was expected" msgstr "" -#: c-typeck.c:3763 +#: convert.c:738 #, gcc-internal-format -msgid "pointer targets in passing argument %d of %qE differ in signedness" +msgid "aggregate value used where a complex was expected" msgstr "" -#: c-typeck.c:3765 +#: convert.c:760 #, gcc-internal-format -msgid "pointer targets in assignment differ in signedness" +msgid "can't convert value to a vector" msgstr "" -#: c-typeck.c:3767 +#: coverage.c:183 #, gcc-internal-format -msgid "pointer targets in initialization differ in signedness" +msgid "%qs is not a gcov data file" msgstr "" -#: c-typeck.c:3769 +#: coverage.c:194 #, gcc-internal-format -msgid "pointer targets in return differ in signedness" +msgid "%qs is version %q.*s, expected version %q.*s" msgstr "" -#: c-typeck.c:3792 +#: coverage.c:274 coverage.c:282 #, gcc-internal-format -msgid "passing argument %d of %qE from incompatible pointer type" +msgid "coverage mismatch for function %u while reading execution counters" msgstr "" -#: c-typeck.c:3794 +#: coverage.c:276 coverage.c:359 #, gcc-internal-format -msgid "assignment from incompatible pointer type" +msgid "checksum is %x instead of %x" msgstr "" -#: c-typeck.c:3795 +#: coverage.c:284 coverage.c:367 #, gcc-internal-format -msgid "initialization from incompatible pointer type" +msgid "number of counters is %d instead of %d" msgstr "" -#: c-typeck.c:3797 +#: coverage.c:290 #, gcc-internal-format -msgid "return from incompatible pointer type" +msgid "cannot merge separate %s counters for function %u" msgstr "" -#: c-typeck.c:3818 +#: coverage.c:311 #, gcc-internal-format -msgid "passing argument %d of %qE makes pointer from integer without a cast" +msgid "%qs has overflowed" msgstr "" -#: c-typeck.c:3820 +#: coverage.c:311 #, gcc-internal-format -msgid "assignment makes pointer from integer without a cast" +msgid "%qs is corrupted" msgstr "" -#: c-typeck.c:3822 +#: coverage.c:348 #, gcc-internal-format -msgid "initialization makes pointer from integer without a cast" +msgid "no coverage for function %qs found" msgstr "" -#: c-typeck.c:3824 +#: coverage.c:356 coverage.c:364 #, gcc-internal-format -msgid "return makes pointer from integer without a cast" +msgid "coverage mismatch for function %qs while reading counter %qs" msgstr "" -#: c-typeck.c:3831 -#, gcc-internal-format -msgid "passing argument %d of %qE makes integer from pointer without a cast" -msgstr "" +#: coverage.c:529 +#, fuzzy, gcc-internal-format +msgid "cannot open %s" +msgstr "немагчыма адчыніць %s" + +#: coverage.c:564 +#, fuzzy, gcc-internal-format +msgid "error writing %qs" +msgstr "памылка запісу ў %s" + +#: diagnostic.c:602 +#, fuzzy, gcc-internal-format +msgid "in %s, at %s:%d" +msgstr "спынена ў %s, ля %s:%d" -#: c-typeck.c:3833 +#: dominance.c:855 #, gcc-internal-format -msgid "assignment makes integer from pointer without a cast" +msgid "dominator of %d status unknown" msgstr "" -#: c-typeck.c:3835 +#: dominance.c:857 #, gcc-internal-format -msgid "initialization makes integer from pointer without a cast" +msgid "dominator of %d should be %d, not %d" msgstr "" -#: c-typeck.c:3837 +#: dominance.c:869 #, gcc-internal-format -msgid "return makes integer from pointer without a cast" +msgid "ENTRY does not dominate bb %d" msgstr "" -#. ??? This should not be an error when inlining calls to -#. unprototyped functions. -#: c-typeck.c:3850 +#: dwarf2out.c:3526 #, gcc-internal-format -msgid "incompatible type for argument %d of %qE" +msgid "DW_LOC_OP %s not implemented" msgstr "" -#: c-typeck.c:3853 +#: emit-rtl.c:2266 +#, fuzzy, gcc-internal-format +msgid "invalid rtl sharing found in the insn" +msgstr "Нерэчаісны выбар %s" + +#: emit-rtl.c:2268 #, gcc-internal-format -msgid "incompatible types in assignment" +msgid "shared rtx" msgstr "" -#: c-typeck.c:3856 +#: emit-rtl.c:2270 flow.c:492 flow.c:517 flow.c:539 #, fuzzy, gcc-internal-format -msgid "incompatible types in initialization" -msgstr "нерэчаісны ініцыялізатар" +msgid "internal consistency failure" +msgstr "унутраная памылка" -#: c-typeck.c:3859 +#: emit-rtl.c:3334 #, gcc-internal-format -msgid "incompatible types in return" +msgid "ICE: emit_insn used where emit_jump_insn needed:\n" msgstr "" -#: c-typeck.c:3940 +#: errors.c:133 java/jv-scan.c:289 #, gcc-internal-format -msgid "traditional C rejects automatic aggregate initialization" +msgid "abort in %s, at %s:%d" +msgstr "спынена ў %s, ля %s:%d" + +#: except.c:338 +#, gcc-internal-format +msgid "exception handling disabled, use -fexceptions to enable" msgstr "" -#: c-typeck.c:4108 c-typeck.c:4123 c-typeck.c:4138 +#: except.c:2786 #, fuzzy, gcc-internal-format -msgid "(near initialization for %qs)" -msgstr "ініцыялізацыя" +msgid "argument of %<__builtin_eh_return_regno%> must be constant" +msgstr "аргумент `__builtin_args_info' павінен быць канстантай" -#: c-typeck.c:4670 cp/decl.c:4453 +#: except.c:2917 #, gcc-internal-format -msgid "opaque vector types cannot be initialized" +msgid "__builtin_eh_return not supported on this target" msgstr "" -#: c-typeck.c:5315 +#: except.c:3771 except.c:3780 #, gcc-internal-format -msgid "unknown field %qs specified in initializer" +msgid "region_array is corrupted for region %i" msgstr "" -#: c-typeck.c:6205 +#: except.c:3785 #, gcc-internal-format -msgid "traditional C rejects initialization of unions" +msgid "outer block of region %i is wrong" msgstr "" -#: c-typeck.c:6511 +#: except.c:3790 #, gcc-internal-format -msgid "jump into statement expression" +msgid "region %i may contain throw and is contained in region that may not" msgstr "" -#: c-typeck.c:6517 +#: except.c:3796 #, gcc-internal-format -msgid "jump into scope of identifier with variably modified type" +msgid "negative nesting depth of region %i" msgstr "" -#: c-typeck.c:6554 -#, fuzzy, gcc-internal-format -msgid "ISO C forbids %" -msgstr "ISO C не падтрымлівае \"goto *expr;\"" - -#: c-typeck.c:6568 cp/typeck.c:6047 -#, fuzzy, gcc-internal-format -msgid "function declared % has a % statement" -msgstr "функцыя не вяртае тып string" - -#: c-typeck.c:6575 +#: except.c:3816 #, gcc-internal-format -msgid "% with no value, in function returning non-void" +msgid "tree list ends on depth %i" msgstr "" -#: c-typeck.c:6582 +#: except.c:3821 #, gcc-internal-format -msgid "% with a value, in function returning void" +msgid "array does not match the region tree" msgstr "" -#: c-typeck.c:6639 +#: except.c:3827 #, gcc-internal-format -msgid "function returns address of local variable" +msgid "verify_eh_tree failed" msgstr "" -#: c-typeck.c:6710 cp/semantics.c:879 +#: explow.c:1212 #, gcc-internal-format -msgid "switch quantity not an integer" +msgid "stack limits not supported on this target" msgstr "" -#: c-typeck.c:6721 +#: fold-const.c:3328 fold-const.c:3339 #, gcc-internal-format -msgid "% switch expression not converted to % in ISO C" +msgid "comparison is always %d due to width of bit-field" msgstr "" -#: c-typeck.c:6762 +#: fold-const.c:4940 fold-const.c:4955 #, gcc-internal-format -msgid "case label in statement expression not containing enclosing switch statement" +msgid "comparison is always %d" msgstr "" -#: c-typeck.c:6765 +#: fold-const.c:5084 #, gcc-internal-format -msgid "% label in statement expression not containing enclosing switch statement" +msgid "% of unmatched not-equal tests is always 1" msgstr "" -#: c-typeck.c:6771 +#: fold-const.c:5089 #, gcc-internal-format -msgid "case label in scope of identifier with variably modified type not containing enclosing switch statement" +msgid "% of mutually exclusive equal-tests is always 0" msgstr "" -#: c-typeck.c:6774 +#: fold-const.c:10301 #, gcc-internal-format -msgid "% label in scope of identifier with variably modified type not containing enclosing switch statement" +msgid "fold check: original tree changed by fold" msgstr "" -#: c-typeck.c:6778 cp/parser.c:6100 +#: function.c:491 +#, fuzzy, gcc-internal-format +msgid "%Jtotal size of local objects too large" +msgstr "памер масіва \"%s\" вельмі вялікі" + +#: function.c:838 varasm.c:1674 +#, fuzzy, gcc-internal-format +msgid "size of variable %q+D is too large" +msgstr "памер масіва \"%s\" вельмі вялікі" + +#: function.c:1548 +#, fuzzy, gcc-internal-format +msgid "impossible constraint in %" +msgstr "немагчымы апэратар '%s'" + +#: function.c:3478 #, gcc-internal-format -msgid "case label not within a switch statement" +msgid "variable %q+D might be clobbered by % or %" msgstr "" -#: c-typeck.c:6780 +#: function.c:3499 #, gcc-internal-format -msgid "% label not within a switch statement" +msgid "argument %q+D might be clobbered by % or %" msgstr "" -#: c-typeck.c:6849 +#: function.c:3894 #, gcc-internal-format -msgid "%Hsuggest explicit braces to avoid ambiguous %" +msgid "function returns an aggregate" msgstr "" -#: c-typeck.c:6859 -#, fuzzy, gcc-internal-format -msgid "%Hempty body in an if-statement" -msgstr "пустое цела ў else-выражэнні" - -#: c-typeck.c:6867 +#: function.c:4286 #, fuzzy, gcc-internal-format -msgid "%Hempty body in an else-statement" -msgstr "пустое цела ў else-выражэнні" +msgid "unused parameter %q+D" +msgstr "невыкарыстаемы параметр \"%s\"" -#: c-typeck.c:6978 cp/parser.c:6603 +#: gcc.c:1243 #, gcc-internal-format -msgid "continue statement not within a loop" +msgid "ambiguous abbreviation %s" msgstr "" -#: c-typeck.c:6998 -#, gcc-internal-format -msgid "%Hstatement with no effect" -msgstr "" +#: gcc.c:1270 +#, fuzzy, gcc-internal-format +msgid "incomplete '%s' option" +msgstr "аргумент для \"%s\" прапушчан" + +#: gcc.c:1281 +#, fuzzy, gcc-internal-format +msgid "missing argument to '%s' option" +msgstr "аргумент для \"%s\" прапушчан" + +#: gcc.c:1294 +#, fuzzy, gcc-internal-format +msgid "extraneous argument to '%s' option" +msgstr "аргумент для \"%s\" прапушчан" -#: c-typeck.c:7027 +#: gcc.c:3804 #, gcc-internal-format -msgid "expression statement has incomplete type" +msgid "warning: -pipe ignored because -save-temps specified" msgstr "" -#: c-typeck.c:7466 c-typeck.c:7505 +#: gcc.c:4105 #, gcc-internal-format -msgid "division by zero" +msgid "warning: '-x %s' after last input file has no effect" msgstr "" -#: c-typeck.c:7550 cp/typeck.c:2952 +#. Catch the case where a spec string contains something like +#. '%{foo:%*}'. i.e. there is no * in the pattern on the left +#. hand side of the :. +#: gcc.c:5174 #, gcc-internal-format -msgid "right shift count is negative" +msgid "spec failure: '%%*' has not been initialized by pattern match" msgstr "" -#: c-typeck.c:7557 cp/typeck.c:2958 +#: gcc.c:5183 #, gcc-internal-format -msgid "right shift count >= width of type" +msgid "warning: use of obsolete %%[ operator in specs" msgstr "" -#: c-typeck.c:7578 cp/typeck.c:2977 -#, gcc-internal-format -msgid "left shift count is negative" -msgstr "" +#: gcc.c:5264 +#, fuzzy, gcc-internal-format +msgid "spec failure: unrecognized spec option '%c'" +msgstr "нераспазнаны выбар \"-%s\"" -#: c-typeck.c:7581 cp/typeck.c:2979 +#: gcc.c:6188 #, gcc-internal-format -msgid "left shift count >= width of type" +msgid "spec failure: more than one arg to SYSROOT_SUFFIX_SPEC" msgstr "" -#: c-typeck.c:7598 cp/typeck.c:3014 +#: gcc.c:6211 #, gcc-internal-format -msgid "comparing floating point with == or != is unsafe" +msgid "spec failure: more than one arg to SYSROOT_HEADERS_SUFFIX_SPEC" msgstr "" -#: c-typeck.c:7622 c-typeck.c:7629 +#: gcc.c:6300 #, fuzzy, gcc-internal-format -msgid "ISO C forbids comparison of % with function pointer" -msgstr "ISO C не дазваляе дэкларацыі метак (label)" +msgid "unrecognized option '-%s'" +msgstr "нераспазнаны выбар \"-%s\"" -#: c-typeck.c:7633 c-typeck.c:7679 +#: gcc.c:6491 gcc.c:6554 #, gcc-internal-format -msgid "comparison of distinct pointer types lacks a cast" -msgstr "" +msgid "%s: %s compiler not installed on this system" +msgstr "%s: %s кампілятар не ўсталяваны на гэтай сістэме" -#: c-typeck.c:7647 c-typeck.c:7652 c-typeck.c:7699 c-typeck.c:7704 +#: gcc.c:6646 #, gcc-internal-format -msgid "comparison between pointer and integer" +msgid "%s: linker input file unused because linking not done" msgstr "" -#: c-typeck.c:7671 +#: gcc.c:6686 #, gcc-internal-format -msgid "comparison of complete and incomplete pointers" -msgstr "" +msgid "language %s not recognized" +msgstr "мова %s не распазнана" -#: c-typeck.c:7674 +#: gcc.c:6757 #, gcc-internal-format -msgid "ISO C forbids ordered comparisons of pointers to functions" +msgid "%s: %s" msgstr "" -#: c-typeck.c:7687 c-typeck.c:7694 +#: gcse.c:6579 #, gcc-internal-format -msgid "ordered comparison of pointer with integer zero" +msgid "%s: %d basic blocks and %d edges/basic block" msgstr "" -#: c-typeck.c:7915 +#: gcse.c:6592 #, gcc-internal-format -msgid "comparison between signed and unsigned" +msgid "%s: %d basic blocks and %d registers" msgstr "" -#: c-typeck.c:7961 cp/typeck.c:3421 -#, gcc-internal-format -msgid "comparison of promoted ~unsigned with constant" -msgstr "" +#: ggc-common.c:404 ggc-common.c:412 ggc-common.c:480 ggc-common.c:499 +#: ggc-page.c:2110 ggc-page.c:2141 ggc-page.c:2148 ggc-zone.c:2291 +#: ggc-zone.c:2306 +#, fuzzy, gcc-internal-format +msgid "can't write PCH file: %m" +msgstr "не магу запісаць ў %s" -#: c-typeck.c:7969 cp/typeck.c:3429 -#, gcc-internal-format -msgid "comparison of promoted ~unsigned with unsigned" -msgstr "" +#: ggc-common.c:492 config/i386/host-cygwin.c:58 +#, fuzzy, gcc-internal-format +msgid "can't get position in PCH file: %m" +msgstr "немагчыма зачыніць уваходзячы файл %s" -#: calls.c:1934 -#, gcc-internal-format -msgid "function call has aggregate value" -msgstr "" +#: ggc-common.c:502 +#, fuzzy, gcc-internal-format +msgid "can't write padding to PCH file: %m" +msgstr "не магу запісаць ў %s" -#: cfghooks.c:90 -#, gcc-internal-format -msgid "bb %d on wrong place" -msgstr "" +#: ggc-common.c:557 ggc-common.c:565 ggc-common.c:572 ggc-common.c:575 +#: ggc-common.c:585 ggc-common.c:588 ggc-page.c:2235 ggc-zone.c:2325 +#, fuzzy, gcc-internal-format +msgid "can't read PCH file: %m" +msgstr "не магу прачытаць з %s" -#: cfghooks.c:96 +#: ggc-common.c:580 #, gcc-internal-format -msgid "prev_bb of %d should be %d, not %d" +msgid "had to relocate PCH" msgstr "" -#: cfghooks.c:113 +#: ggc-page.c:1448 #, gcc-internal-format -msgid "verify_flow_info: Wrong count of block %i %i" +msgid "open /dev/zero: %m" msgstr "" -#: cfghooks.c:119 -#, gcc-internal-format -msgid "verify_flow_info: Wrong frequency of block %i %i" -msgstr "" +#: ggc-page.c:2126 ggc-page.c:2132 +#, fuzzy, gcc-internal-format +msgid "can't write PCH file" +msgstr "не магу запісаць ў %s" -#: cfghooks.c:127 -#, gcc-internal-format -msgid "verify_flow_info: Duplicate edge %i->%i" -msgstr "" +#: ggc-zone.c:2288 ggc-zone.c:2299 +#, fuzzy, gcc-internal-format +msgid "can't seek PCH file: %m" +msgstr "немагчыма зачыніць уваходзячы файл %s" -#: cfghooks.c:133 -#, gcc-internal-format -msgid "verify_flow_info: Wrong probability of edge %i->%i %i" -msgstr "" +#: ggc-zone.c:2302 +#, fuzzy, gcc-internal-format +msgid "can't write PCH fle: %m" +msgstr "не магу запісаць ў %s" -#: cfghooks.c:139 +#: gimple-low.c:202 #, gcc-internal-format -msgid "verify_flow_info: Wrong count of edge %i->%i %i" +msgid "unexpected node" msgstr "" -#: cfghooks.c:151 +#: gimplify.c:3662 #, gcc-internal-format -msgid "verify_flow_info: Basic block %d succ edge is corrupted" +msgid "invalid lvalue in asm output %d" msgstr "" -#: cfghooks.c:165 cfgrtl.c:2056 +#: gimplify.c:3774 #, gcc-internal-format -msgid "Wrong amount of branch edges after unconditional jump %i" +msgid "memory input %d is not directly addressable" msgstr "" -#: cfghooks.c:173 cfghooks.c:184 +#: gimplify.c:4646 #, gcc-internal-format -msgid "basic block %d pred edge is corrupted" +msgid "gimplification failed" msgstr "" -#: cfghooks.c:185 -#, gcc-internal-format -msgid "its dest_idx should be %d, not %d" -msgstr "" +#: global.c:376 global.c:389 global.c:403 +#, fuzzy, gcc-internal-format +msgid "%s cannot be used in asm here" +msgstr "\"%s\" звычайна функцыя" -#: cfghooks.c:214 -#, gcc-internal-format -msgid "basic block %i edge lists are corrupted" -msgstr "" +#: graph.c:403 java/jcf-parse.c:1080 java/jcf-parse.c:1215 java/lex.c:1855 +#: objc/objc-act.c:501 +#, fuzzy, gcc-internal-format +msgid "can't open %s: %m" +msgstr "немагчыма адчыніць %s" -#: cfghooks.c:228 +#: haifa-sched.c:182 #, gcc-internal-format -msgid "verify_flow_info failed" +msgid "fix_sched_param: unknown param: %s" msgstr "" -#: cfghooks.c:289 +#. Eventually this should become a hard error IMO. +#: opts.c:261 #, gcc-internal-format -msgid "%s does not support redirect_edge_and_branch." +msgid "command line option \"%s\" is valid for %s but not for %s" msgstr "" -#: cfghooks.c:307 +#: opts.c:315 #, gcc-internal-format -msgid "%s does not support redirect_edge_and_branch_force." +msgid "command line option %qs is not supported by this configuration" msgstr "" -#: cfghooks.c:325 +#: opts.c:359 #, fuzzy, gcc-internal-format -msgid "%s does not support split_block." -msgstr "%s не падтрымлівае %s" +msgid "missing argument to \"%s\"" +msgstr "аргумент для \"%s\" прапушчан" -#: cfghooks.c:361 +#: opts.c:369 #, fuzzy, gcc-internal-format -msgid "%s does not support move_block_after." -msgstr "%s не падтрымлівае %s" +msgid "argument to \"%s\" should be a non-negative integer" +msgstr "першым аргументам \"%s\" павінен быць \"int\"" -#: cfghooks.c:374 +#: opts.c:457 #, fuzzy, gcc-internal-format -msgid "%s does not support delete_basic_block." -msgstr "%s не падтрымлівае %s" +msgid "unrecognized command line option \"%s\"" +msgstr "Нераспазнаны выбар \"%s\"" -#: cfghooks.c:406 -#, fuzzy, gcc-internal-format -msgid "%s does not support split_edge." -msgstr "%s не падтрымлівае %s" +#: opts.c:670 +#, gcc-internal-format +msgid "-Wuninitialized is not supported without -O" +msgstr "" -#: cfghooks.c:467 -#, fuzzy, gcc-internal-format -msgid "%s does not support create_basic_block." -msgstr "%s не падтрымлівае %s" +#: opts.c:684 +#, gcc-internal-format +msgid "-freorder-blocks-and-partition does not work with exceptions" +msgstr "" -#: cfghooks.c:495 -#, fuzzy, gcc-internal-format -msgid "%s does not support can_merge_blocks_p." -msgstr "%s не падтрымлівае %s" +#: opts.c:693 +#, gcc-internal-format +msgid "-freorder-blocks-and-partition does not work on this architecture" +msgstr "" -#: cfghooks.c:506 -#, fuzzy, gcc-internal-format -msgid "%s does not support predict_edge." -msgstr "%s не падтрымлівае %s" +#: opts.c:861 +#, gcc-internal-format +msgid "structure alignment must be a small power of two, not %d" +msgstr "" -#: cfghooks.c:515 +#: opts.c:919 #, fuzzy, gcc-internal-format -msgid "%s does not support predicted_by_p." -msgstr "%s не падтрымлівае %s" +msgid "unrecognized visibility value \"%s\"" +msgstr "нераспазнаная назва сэкцыі \"%s\"" -#: cfghooks.c:529 +#: opts.c:967 #, fuzzy, gcc-internal-format -msgid "%s does not support merge_blocks." -msgstr "%s не падтрымлівае %s" +msgid "unrecognized register name \"%s\"" +msgstr "нераспазнаная назва сэкцыі \"%s\"" -#: cfghooks.c:575 +#: opts.c:991 #, fuzzy, gcc-internal-format -msgid "%s does not support make_forwarder_block." -msgstr "%s не падтрымлівае %s" +msgid "unknown tls-model \"%s\"" +msgstr "невядомы рэжым машыны \"%s\"" -#: cfghooks.c:680 -#, fuzzy, gcc-internal-format -msgid "%s does not support can_duplicate_block_p." -msgstr "%s не падтрымлівае %s" +#: opts.c:1041 +#, gcc-internal-format +msgid "-f[no-]force-mem is nop and option will be removed in 4.2" +msgstr "" -#: cfghooks.c:707 -#, fuzzy, gcc-internal-format -msgid "%s does not support duplicate_block." -msgstr "%s не падтрымлівае %s" +#: opts.c:1064 +#, gcc-internal-format +msgid "%s: --param arguments should be of the form NAME=VALUE" +msgstr "" -#: cfghooks.c:773 +#: opts.c:1069 #, fuzzy, gcc-internal-format -msgid "%s does not support block_ends_with_call_p" -msgstr "%s не падтрымлівае %s" +msgid "invalid --param value %qs" +msgstr "нерэчаісны выбар --param : %s" -#: cfghooks.c:784 +#: opts.c:1166 #, fuzzy, gcc-internal-format -msgid "%s does not support block_ends_with_condjump_p" -msgstr "%s не падтрымлівае %s" +msgid "target system does not support debug output" +msgstr "ISO C не падтрымлівае комлексныя цэлалікавыя тыпы" -#: cfghooks.c:802 +#: opts.c:1173 #, fuzzy, gcc-internal-format -msgid "%s does not support flow_call_edges_add" -msgstr "%s не падтрымлівае %s" - -#: cfgloop.c:1312 -#, gcc-internal-format -msgid "Size of loop %d should be %d, not %d." -msgstr "" - -#: cfgloop.c:1329 -#, gcc-internal-format -msgid "Bb %d do not belong to loop %d." -msgstr "" +msgid "debug format \"%s\" conflicts with prior selection" +msgstr "секцыя \"%s\" канфліктуе з папярэдняй дэкларацыяй" -#: cfgloop.c:1346 -#, gcc-internal-format -msgid "Loop %d's header does not have exactly 2 entries." -msgstr "" +#: opts.c:1189 +#, fuzzy, gcc-internal-format +msgid "unrecognised debug output level \"%s\"" +msgstr "нераспазнаная назва сэкцыі \"%s\"" -#: cfgloop.c:1353 +#: opts.c:1191 #, gcc-internal-format -msgid "Loop %d's latch does not have exactly 1 successor." +msgid "debug output level %s is too high" msgstr "" -#: cfgloop.c:1358 -#, gcc-internal-format -msgid "Loop %d's latch does not have header as successor." -msgstr "" +#: params.c:71 +#, fuzzy, gcc-internal-format +msgid "minimum value of parameter %qs is %u" +msgstr "нерэчаісны парамэтр `%s'" -#: cfgloop.c:1363 +#: params.c:76 #, gcc-internal-format -msgid "Loop %d's latch does not belong directly to it." +msgid "maximum value of parameter %qs is %u" msgstr "" -#: cfgloop.c:1369 -#, gcc-internal-format -msgid "Loop %d's header does not belong directly to it." -msgstr "" +#. If we didn't find this parameter, issue an error message. +#: params.c:85 +#, fuzzy, gcc-internal-format +msgid "invalid parameter %qs" +msgstr "нерэчаісны парамэтр `%s'" -#: cfgloop.c:1375 +#: profile.c:287 #, gcc-internal-format -msgid "Loop %d's latch is marked as part of irreducible region." +msgid "corrupted profile info: run_max * runs < sum_max" msgstr "" -#: cfgloop.c:1408 +#: profile.c:293 #, gcc-internal-format -msgid "Basic block %d should be marked irreducible." +msgid "corrupted profile info: sum_all is smaller than sum_max" msgstr "" -#: cfgloop.c:1414 +#: profile.c:338 #, gcc-internal-format -msgid "Basic block %d should not be marked irreducible." +msgid "corrupted profile info: edge from %i to %i exceeds maximal count" msgstr "" -#: cfgloop.c:1422 +#: profile.c:503 #, gcc-internal-format -msgid "Edge from %d to %d should be marked irreducible." +msgid "corrupted profile info: number of iterations for basic block %d thought to be %i" msgstr "" -#: cfgloop.c:1429 +#: profile.c:524 #, gcc-internal-format -msgid "Edge from %d to %d should not be marked irreducible." +msgid "corrupted profile info: number of executions for edge %d-%d thought to be %i" msgstr "" -#: cfgloop.c:1464 +#: reg-stack.c:526 #, gcc-internal-format -msgid "Wrong single exit %d->%d recorded for loop %d." +msgid "output constraint %d must specify a single register" msgstr "" -#: cfgloop.c:1468 +#: reg-stack.c:536 #, gcc-internal-format -msgid "Right exit is %d->%d." +msgid "output constraint %d cannot be specified together with \"%s\" clobber" msgstr "" -#: cfgloop.c:1485 +#: reg-stack.c:559 #, gcc-internal-format -msgid "Single exit not recorded for loop %d." +msgid "output regs must be grouped at top of stack" msgstr "" -#: cfgloop.c:1492 +#: reg-stack.c:596 #, gcc-internal-format -msgid "Loop %d should not have single exit (%d -> %d)." +msgid "implicitly popped regs must be grouped at top of stack" msgstr "" -#: cfgrtl.c:1948 +#: reg-stack.c:615 #, gcc-internal-format -msgid "end insn %d for block %d not found in the insn stream" +msgid "output operand %d must use %<&%> constraint" msgstr "" -#: cfgrtl.c:1962 +#: regclass.c:766 #, gcc-internal-format -msgid "insn %d is in multiple basic blocks (%d and %d)" +msgid "can't use '%s' as a %s register" msgstr "" -#: cfgrtl.c:1974 +#: regclass.c:781 config/ia64/ia64.c:5035 config/ia64/ia64.c:5042 +#: config/pa/pa.c:339 config/pa/pa.c:346 #, gcc-internal-format -msgid "head insn %d for block %d not found in the insn stream" -msgstr "" +msgid "unknown register name: %s" +msgstr "невядомая назва рэгістра: %s" -#: cfgrtl.c:1998 +#: regclass.c:791 #, gcc-internal-format -msgid "verify_flow_info: REG_BR_PROB does not match cfg %wi %i" +msgid "global register variable follows a function definition" msgstr "" -#: cfgrtl.c:2013 +#: regclass.c:795 #, gcc-internal-format -msgid "Fallthru edge crosses section boundary (bb %i)" +msgid "register used for two global register variables" msgstr "" -#: cfgrtl.c:2038 +#: regclass.c:800 #, gcc-internal-format -msgid "Missing REG_EH_REGION note in the end of bb %i" +msgid "call-clobbered register used for global register variable" msgstr "" -#: cfgrtl.c:2046 +#: regrename.c:1893 #, gcc-internal-format -msgid "Too many outgoing branch edges from bb %i" +msgid "validate_value_data: [%u] Bad next_regno for empty chain (%u)" msgstr "" -#: cfgrtl.c:2051 +#: regrename.c:1905 #, gcc-internal-format -msgid "Fallthru edge after unconditional jump %i" +msgid "validate_value_data: Loop in regno chain (%u)" msgstr "" -#: cfgrtl.c:2062 +#: regrename.c:1908 #, gcc-internal-format -msgid "Wrong amount of branch edges after conditional jump %i" +msgid "validate_value_data: [%u] Bad oldest_regno (%u)" msgstr "" -#: cfgrtl.c:2067 +#: regrename.c:1920 #, gcc-internal-format -msgid "Call edges for non-call insn in bb %i" +msgid "validate_value_data: [%u] Non-empty reg in chain (%s %u %i)" msgstr "" -#: cfgrtl.c:2076 +#: reload.c:1270 #, gcc-internal-format -msgid "Abnormal edges for no purpose in bb %i" +msgid "cannot reload integer constant operand in %" msgstr "" -#: cfgrtl.c:2088 +#: reload.c:1293 #, gcc-internal-format -msgid "insn %d inside basic block %d but block_for_insn is NULL" +msgid "impossible register constraint in %" msgstr "" -#: cfgrtl.c:2092 +#: reload.c:3560 #, gcc-internal-format -msgid "insn %d inside basic block %d but block_for_insn is %i" +msgid "%<&%> constraint used with no register class" msgstr "" -#: cfgrtl.c:2106 cfgrtl.c:2116 +#: reload.c:3731 reload.c:3963 #, gcc-internal-format -msgid "NOTE_INSN_BASIC_BLOCK is missing for block %d" +msgid "inconsistent operand constraints in an %" msgstr "" -#: cfgrtl.c:2129 +#: reload1.c:1235 #, gcc-internal-format -msgid "NOTE_INSN_BASIC_BLOCK %d in middle of basic block %d" +msgid "frame size too large for reliable stack checking" msgstr "" -#: cfgrtl.c:2139 +#: reload1.c:1238 #, gcc-internal-format -msgid "in basic block %d:" +msgid "try reducing the number of local variables" msgstr "" -#: cfgrtl.c:2188 +#: reload1.c:1894 #, gcc-internal-format -msgid "missing barrier after block %i" +msgid "can't find a register in class %qs while reloading %" msgstr "" -#: cfgrtl.c:2201 +#: reload1.c:1899 #, gcc-internal-format -msgid "verify_flow_info: Incorrect blocks for fallthru %i->%i" +msgid "unable to find a register to spill in class %qs" msgstr "" -#: cfgrtl.c:2210 +#: reload1.c:3969 #, gcc-internal-format -msgid "verify_flow_info: Incorrect fallthru %i->%i" +msgid "% operand requires impossible reload" msgstr "" -#: cfgrtl.c:2229 +#: reload1.c:5093 #, gcc-internal-format -msgid "basic blocks not laid down consecutively" +msgid "% operand constraint incompatible with operand size" msgstr "" -#: cfgrtl.c:2268 +#: reload1.c:6723 #, gcc-internal-format -msgid "number of bb notes in insn chain (%d) != n_basic_blocks (%d)" +msgid "output operand is constant in %" msgstr "" -#: cgraph.c:673 +#: rtl.c:474 #, gcc-internal-format -msgid "%D renamed after being referenced in assembly" +msgid "RTL check: access of elt %d of '%s' with last elt %d in %s, at %s:%d" msgstr "" -#: cgraphunit.c:513 +#: rtl.c:484 #, gcc-internal-format -msgid "Shared call_expr:" +msgid "RTL check: expected elt %d type '%c', have '%c' (rtx %s) in %s, at %s:%d" msgstr "" -#: cgraphunit.c:519 -#, fuzzy, gcc-internal-format -msgid "Edge points to wrong declaration:" -msgstr "гэта папярэдняе абвяшчэньне" - -#: cgraphunit.c:528 +#: rtl.c:494 #, gcc-internal-format -msgid "Missing callgraph edge for call expr:" +msgid "RTL check: expected elt %d type '%c' or '%c', have '%c' (rtx %s) in %s, at %s:%d" msgstr "" -#: cgraphunit.c:554 +#: rtl.c:503 #, gcc-internal-format -msgid "Aux field set for edge %s->%s" +msgid "RTL check: expected code '%s', have '%s' in %s, at %s:%d" msgstr "" -#: cgraphunit.c:566 +#: rtl.c:513 #, gcc-internal-format -msgid "Inlined_to pointer is wrong" +msgid "RTL check: expected code '%s' or '%s', have '%s' in %s, at %s:%d" msgstr "" -#: cgraphunit.c:571 +#: rtl.c:539 #, gcc-internal-format -msgid "Multiple inline callers" +msgid "RTL check: access of elt %d of vector with last elt %d in %s, at %s:%d" msgstr "" -#: cgraphunit.c:578 +#: rtl.c:550 #, gcc-internal-format -msgid "Inlined_to pointer set for noninline callers" +msgid "RTL flag check: %s used with unexpected rtx code '%s' in %s, at %s:%d" msgstr "" -#: cgraphunit.c:584 +#: stmt.c:317 #, gcc-internal-format -msgid "Inlined_to pointer is set but no predecesors found" +msgid "output operand constraint lacks %<=%>" msgstr "" -#: cgraphunit.c:589 +#: stmt.c:332 #, gcc-internal-format -msgid "Inlined_to pointer reffers to itself" +msgid "output constraint %qc for operand %d is not at the beginning" msgstr "" -#: cgraphunit.c:599 +#: stmt.c:355 #, gcc-internal-format -msgid "Node not found in DECL_ASSEMBLER_NAME hash" +msgid "operand constraint contains incorrectly positioned %<+%> or %<=%>" msgstr "" -#: cgraphunit.c:613 +#: stmt.c:362 stmt.c:461 #, gcc-internal-format -msgid "Edge %s->%s has no corresponding call_expr" +msgid "%<%%%> constraint used with last operand" msgstr "" -#: cgraphunit.c:624 +#: stmt.c:381 #, gcc-internal-format -msgid "verify_cgraph_node failed." +msgid "matching constraint not valid in output operand" msgstr "" -#: cgraphunit.c:810 +#: stmt.c:452 #, gcc-internal-format -msgid "failed to reclaim unneeded function" +msgid "input operand constraint contains %qc" msgstr "" -#: cgraphunit.c:1829 +#: stmt.c:494 #, gcc-internal-format -msgid "Nodes with no released memory found." +msgid "matching constraint references invalid operand number" msgstr "" -#: collect2.c:1197 +#: stmt.c:532 #, fuzzy, gcc-internal-format -msgid "unknown demangling style '%s'" -msgstr "невядомы рэжым машыны \"%s\"" +msgid "invalid punctuation %qc in constraint" +msgstr "`%E' - нерэчаісная нязьменная тыпу string" -#: collect2.c:1517 +#: stmt.c:556 #, gcc-internal-format -msgid "%s terminated with signal %d [%s]%s" +msgid "matching constraint does not allow a register" msgstr "" -#: collect2.c:1535 +#: stmt.c:598 #, gcc-internal-format -msgid "%s returned %d exit status" +msgid "asm-specifier for variable %qs conflicts with asm clobber list" msgstr "" -#: collect2.c:2219 +#: stmt.c:686 #, fuzzy, gcc-internal-format -msgid "cannot find 'ldd'" -msgstr "не магу знайсці \"ldd\"" +msgid "unknown register name %qs in %" +msgstr "невядомая назва рэгістра: %s" -#: convert.c:69 +#: stmt.c:694 #, gcc-internal-format -msgid "cannot convert to a pointer type" +msgid "PIC register %qs clobbered in %" msgstr "" -#: convert.c:302 +#: stmt.c:741 #, gcc-internal-format -msgid "pointer value used where a floating point value was expected" +msgid "more than %d operands in %" msgstr "" -#: convert.c:306 +#: stmt.c:804 #, gcc-internal-format -msgid "aggregate value used where a float was expected" +msgid "output number %d not directly addressable" msgstr "" -#: convert.c:331 +#: stmt.c:883 #, gcc-internal-format -msgid "conversion to incomplete type" +msgid "asm operand %d probably doesn%'t match constraints" msgstr "" -#: convert.c:660 convert.c:736 +#: stmt.c:893 #, gcc-internal-format -msgid "can't convert between vector values of different size" +msgid "use of memory input without lvalue in asm operand %d is deprecated" msgstr "" -#: convert.c:666 -#, gcc-internal-format -msgid "aggregate value used where an integer was expected" -msgstr "" +#: stmt.c:1040 +#, fuzzy, gcc-internal-format +msgid "asm clobber conflict with output operand" +msgstr "секцыя \"%s\" канфліктуе з папярэдняй дэкларацыяй" -#: convert.c:716 -#, gcc-internal-format -msgid "pointer value used where a complex was expected" -msgstr "" +#: stmt.c:1045 +#, fuzzy, gcc-internal-format +msgid "asm clobber conflict with input operand" +msgstr "секцыя \"%s\" канфліктуе з папярэдняй дэкларацыяй" -#: convert.c:720 -#, gcc-internal-format -msgid "aggregate value used where a complex was expected" -msgstr "" +#: stmt.c:1122 +#, fuzzy, gcc-internal-format +msgid "too many alternatives in %" +msgstr "вельмі шмат аргументаў у функцыі \"%s\"" -#: convert.c:742 +#: stmt.c:1134 #, gcc-internal-format -msgid "can't convert value to a vector" +msgid "operand constraints for % differ in number of alternatives" msgstr "" -#: coverage.c:168 -#, gcc-internal-format -msgid "%qs is not a gcov data file" -msgstr "" +#: stmt.c:1187 +#, fuzzy, gcc-internal-format +msgid "duplicate asm operand name %qs" +msgstr "паўторнае абвяшчэнне меткі \"%s\"" -#: coverage.c:179 +#: stmt.c:1285 #, gcc-internal-format -msgid "%qs is version %q.*s, expected version %q.*s" +msgid "missing close brace for named operand" msgstr "" -#: coverage.c:259 coverage.c:267 +#: stmt.c:1313 +#, fuzzy, gcc-internal-format +msgid "undefined named operand %qs" +msgstr "нераспазнаны аператар %s" + +#: stmt.c:1457 #, gcc-internal-format -msgid "coverage mismatch for function %u while reading execution counters." +msgid "%Hvalue computed is not used" msgstr "" -#: coverage.c:261 coverage.c:344 +#: stor-layout.c:149 #, gcc-internal-format -msgid "checksum is %x instead of %x" +msgid "type size can%'t be explicitly evaluated" msgstr "" -#: coverage.c:269 coverage.c:352 +#: stor-layout.c:151 #, gcc-internal-format -msgid "number of counters is %d instead of %d" +msgid "variable-size type declared outside of any function" msgstr "" -#: coverage.c:275 +#: stor-layout.c:455 +#, fuzzy, gcc-internal-format +msgid "size of %q+D is %d bytes" +msgstr "памер \"%s\" - %d байт" + +#: stor-layout.c:457 +#, fuzzy, gcc-internal-format +msgid "size of %q+D is larger than %wd bytes" +msgstr "памер \"%s\" больш чам %d байт" + +#: stor-layout.c:865 #, gcc-internal-format -msgid "cannot merge separate %s counters for function %u" +msgid "packed attribute causes inefficient alignment for %q+D" msgstr "" -#: coverage.c:296 +#: stor-layout.c:868 #, gcc-internal-format -msgid "%qs has overflowed" +msgid "packed attribute is unnecessary for %q+D" msgstr "" -#: coverage.c:296 +#. No, we need to skip space before this field. +#. Bump the cumulative size to multiple of field alignment. +#: stor-layout.c:883 #, gcc-internal-format -msgid "%qs is corrupted" +msgid "padding struct to align %q+D" msgstr "" -#: coverage.c:333 +#: stor-layout.c:1282 #, gcc-internal-format -msgid "no coverage for function %qs found." +msgid "padding struct size to alignment boundary" msgstr "" -#: coverage.c:341 coverage.c:349 +#: stor-layout.c:1312 #, gcc-internal-format -msgid "coverage mismatch for function %qs while reading counter %qs." +msgid "packed attribute causes inefficient alignment for %qs" msgstr "" -#: coverage.c:532 -#, fuzzy, gcc-internal-format -msgid "cannot open %s" -msgstr "немагчыма адчыніць %s" - -#: coverage.c:567 -#, fuzzy, gcc-internal-format -msgid "error writing %qs" -msgstr "памылка запісу ў %s" - -#: diagnostic.c:556 +#: stor-layout.c:1316 #, fuzzy, gcc-internal-format -msgid "in %s, at %s:%d" -msgstr "спынена ў %s, ля %s:%d" +msgid "packed attribute is unnecessary for %qs" +msgstr "\"%s\" атрыбут ігнарыруецца" -#: dominance.c:834 +#: stor-layout.c:1322 #, gcc-internal-format -msgid "dominator of %d status unknown" +msgid "packed attribute causes inefficient alignment" msgstr "" -#: dominance.c:836 +#: stor-layout.c:1324 #, gcc-internal-format -msgid "dominator of %d should be %d, not %d" +msgid "packed attribute is unnecessary" msgstr "" -#: dominance.c:848 +#: stor-layout.c:1835 #, gcc-internal-format -msgid "ENTRY does not dominate bb %d" +msgid "alignment of array elements is greater than element size" msgstr "" -#: dwarf2out.c:3395 +#: targhooks.c:98 #, gcc-internal-format -msgid "DW_LOC_OP %s not implemented\n" -msgstr "" - -#: emit-rtl.c:2232 -#, fuzzy, gcc-internal-format -msgid "Invalid rtl sharing found in the insn" -msgstr "нявернае выкарыстанне \"restict\"" +msgid "__builtin_saveregs not supported by this target" +msgstr "__buitin_saveregs не падтрымліваецца гэтай мэтай" -#: emit-rtl.c:2234 +#: tlink.c:484 #, gcc-internal-format -msgid "Shared rtx" +msgid "repository file '%s' does not contain command-line arguments" msgstr "" -#: emit-rtl.c:2236 +#: tlink.c:705 #, gcc-internal-format -msgid "Internal consistency failure" +msgid "'%s' was assigned to '%s', but was not defined during recompilation, or vice versa" msgstr "" -#: emit-rtl.c:3301 +#: tlink.c:775 #, gcc-internal-format -msgid "ICE: emit_insn used where emit_jump_insn needed:\n" +msgid "ld returned %d exit status" msgstr "" -#: errors.c:133 java/jv-scan.c:277 -#, gcc-internal-format -msgid "abort in %s, at %s:%d" -msgstr "спынена ў %s, ля %s:%d" +#: toplev.c:512 +#, fuzzy, gcc-internal-format +msgid "invalid option argument %qs" +msgstr "Нерэчаісны выбар \"%s\"" -#: except.c:340 +#: toplev.c:602 #, gcc-internal-format -msgid "exception handling disabled, use -fexceptions to enable" +msgid "getting core file size maximum limit: %m" msgstr "" -#: except.c:2577 -#, fuzzy, gcc-internal-format -msgid "argument of %<__builtin_eh_return_regno%> must be constant" -msgstr "аргумент `__builtin_args_info' павінен быць канстантай" - -#: except.c:2708 +#: toplev.c:605 #, gcc-internal-format -msgid "__builtin_eh_return not supported on this target" +msgid "setting core file size limit to maximum: %m" msgstr "" -#: explow.c:1301 +#: toplev.c:823 #, gcc-internal-format -msgid "stack limits not supported on this target" +msgid "%q+F declared % but never defined" msgstr "" -#: flow.c:494 flow.c:518 flow.c:540 +#: toplev.c:848 #, fuzzy, gcc-internal-format -msgid "internal consistency failure" -msgstr "унутраная памылка" +msgid "%q+D defined but not used" +msgstr "адмеціна `%D' вызначана, але не выкарыстоўваецца" -#: fold-const.c:3232 fold-const.c:3243 +#: toplev.c:891 toplev.c:915 #, gcc-internal-format -msgid "comparison is always %d due to width of bit-field" +msgid "%qs is deprecated (declared at %s:%d)" msgstr "" -#: fold-const.c:4807 fold-const.c:4822 +#: toplev.c:919 #, gcc-internal-format -msgid "comparison is always %d" +msgid "type is deprecated (declared at %s:%d)" msgstr "" -#: fold-const.c:4951 +#: toplev.c:925 #, gcc-internal-format -msgid "% of unmatched not-equal tests is always 1" +msgid "%qs is deprecated" msgstr "" -#: fold-const.c:4956 +#: toplev.c:927 #, gcc-internal-format -msgid "% of mutually exclusive equal-tests is always 0" +msgid "type is deprecated" msgstr "" -#: fold-const.c:9926 +#: toplev.c:1094 #, gcc-internal-format -msgid "fold check: original tree changed by fold" +msgid "unrecognized gcc debugging option: %c" msgstr "" -#: function.c:832 varasm.c:1584 +#: toplev.c:1247 #, fuzzy, gcc-internal-format -msgid "%Jsize of variable %qD is too large" -msgstr "памер масіва \"%s\" вельмі вялікі" +msgid "can%'t open %s for writing: %m" +msgstr "немагчыма адчыніць %s для запісу" -#: function.c:1443 -#, fuzzy, gcc-internal-format -msgid "impossible constraint in %" -msgstr "немагчымы апэратар '%s'" +#: toplev.c:1591 +#, gcc-internal-format +msgid "instruction scheduling not supported on this target machine" +msgstr "" -#: function.c:3614 +#: toplev.c:1595 #, gcc-internal-format -msgid "%Jvariable %qD might be clobbered by % or %" +msgid "this target machine does not have delayed branches" msgstr "" -#: function.c:3635 +#: toplev.c:1609 #, gcc-internal-format -msgid "%Jargument %qD might be clobbered by % or %" +msgid "-f%sleading-underscore not supported on this target machine" msgstr "" -#: function.c:4026 +#: toplev.c:1682 #, gcc-internal-format -msgid "function returns an aggregate" +msgid "target system does not support the \"%s\" debug format" msgstr "" -#: function.c:4349 -#, fuzzy, gcc-internal-format -msgid "%Junused parameter %qD" -msgstr "невыкарыстаемы параметр \"%s\"" +#: toplev.c:1694 +#, gcc-internal-format +msgid "variable tracking requested, but useless unless producing debug info" +msgstr "" -#: gcc.c:1237 +#: toplev.c:1697 #, gcc-internal-format -msgid "ambiguous abbreviation %s" +msgid "variable tracking requested, but not supported by this debug format" msgstr "" -#: gcc.c:1264 +#: toplev.c:1717 #, fuzzy, gcc-internal-format -msgid "incomplete '%s' option" -msgstr "аргумент для \"%s\" прапушчан" +msgid "can%'t open %s: %m" +msgstr "немагчыма адчыніць %s" -#: gcc.c:1275 +#: toplev.c:1724 #, fuzzy, gcc-internal-format -msgid "missing argument to '%s' option" -msgstr "аргумент для \"%s\" прапушчан" +msgid "-ffunction-sections not supported for this target" +msgstr "атрыбуты секцыі не падтрымліваюцца для гэтай мэты" -#: gcc.c:1288 +#: toplev.c:1729 #, fuzzy, gcc-internal-format -msgid "extraneous argument to '%s' option" -msgstr "аргумент для \"%s\" прапушчан" +msgid "-fdata-sections not supported for this target" +msgstr "атрыбуты секцыі не падтрымліваюцца для гэтай мэты" -#: gcc.c:3778 +#: toplev.c:1736 #, gcc-internal-format -msgid "warning: -pipe ignored because -save-temps specified" +msgid "-ffunction-sections disabled; it makes profiling impossible" msgstr "" -#: gcc.c:3782 -#, gcc-internal-format -msgid "warning: -pipe ignored because -time specified" -msgstr "" +#: toplev.c:1743 +#, fuzzy, gcc-internal-format +msgid "-fprefetch-loop-arrays not supported for this target" +msgstr "атрыбуты секцыі не падтрымліваюцца для гэтай мэты" -#: gcc.c:4083 +#: toplev.c:1749 #, gcc-internal-format -msgid "warning: '-x %s' after last input file has no effect" +msgid "-fprefetch-loop-arrays not supported for this target (try -march switches)" msgstr "" -#. Catch the case where a spec string contains something like -#. '%{foo:%*}'. i.e. there is no * in the pattern on the left -#. hand side of the :. -#: gcc.c:5149 +#: toplev.c:1758 #, gcc-internal-format -msgid "spec failure: '%%*' has not been initialized by pattern match" +msgid "-fprefetch-loop-arrays is not supported with -Os" msgstr "" -#: gcc.c:5158 +#: toplev.c:1764 #, gcc-internal-format -msgid "warning: use of obsolete %%[ operator in specs" +msgid "-ffunction-sections may affect debugging on some targets" msgstr "" -#: gcc.c:5239 +#: toplev.c:1779 #, fuzzy, gcc-internal-format -msgid "spec failure: unrecognized spec option '%c'" -msgstr "нераспазнаны выбар \"-%s\"" +msgid "-fstack-protector not supported for this target" +msgstr "атрыбуты секцыі не падтрымліваюцца для гэтай мэты" -#: gcc.c:6163 +#: toplev.c:1792 #, gcc-internal-format -msgid "spec failure: more than one arg to SYSROOT_SUFFIX_SPEC." +msgid "unwind tables currently requires a frame pointer for correctness" msgstr "" -#: gcc.c:6173 -#, gcc-internal-format -msgid "spec failure: more than one arg to SYSROOT_HEADERS_SUFFIX_SPEC." -msgstr "" +#: toplev.c:1897 +#, fuzzy, gcc-internal-format +msgid "error writing to %s: %m" +msgstr "памылка запісу ў %s" -#: gcc.c:6266 +#: toplev.c:1899 java/jcf-parse.c:1099 java/jcf-write.c:3539 #, fuzzy, gcc-internal-format -msgid "unrecognized option '-%s'" -msgstr "нераспазнаны выбар \"-%s\"" +msgid "error closing %s: %m" +msgstr "памылка запісу ў %s" -#: gcc.c:6454 gcc.c:6517 +#: tree-cfg.c:1422 tree-cfg.c:2060 tree-cfg.c:2063 #, gcc-internal-format -msgid "%s: %s compiler not installed on this system" -msgstr "%s: %s кампілятар не ўсталяваны на гэтай сістэме" +msgid "%Hwill never be executed" +msgstr "" -#: gcc.c:6599 +#: tree-cfg.c:3149 #, gcc-internal-format -msgid "%s: linker input file unused because linking not done" +msgid "SSA name in freelist but still referenced" msgstr "" -#: gcc.c:6639 +#: tree-cfg.c:3158 #, gcc-internal-format -msgid "language %s not recognized" -msgstr "мова %s не распазнана" +msgid "ASSERT_EXPR with an always-false condition" +msgstr "" -#: gcc.c:6710 +#: tree-cfg.c:3168 #, gcc-internal-format -msgid "%s: %s" +msgid "GIMPLE register modified with BIT_FIELD_REF" msgstr "" -#: gcse.c:6535 +#: tree-cfg.c:3203 #, gcc-internal-format -msgid "%s: %d basic blocks and %d edges/basic block" +msgid "invariant not recomputed when ADDR_EXPR changed" msgstr "" -#: gcse.c:6548 +#: tree-cfg.c:3209 #, gcc-internal-format -msgid "%s: %d basic blocks and %d registers" +msgid "constant not recomputed when ADDR_EXPR changed" msgstr "" -#: ggc-common.c:397 ggc-common.c:405 ggc-common.c:473 ggc-common.c:494 -#: ggc-page.c:2209 ggc-page.c:2240 ggc-page.c:2247 ggc-zone.c:1582 -#: ggc-zone.c:1588 ggc-zone.c:1597 -#, fuzzy, gcc-internal-format -msgid "can't write PCH file: %m" -msgstr "не магу запісаць ў %s" - -#: ggc-common.c:487 config/i386/host-cygwin.c:58 -#, fuzzy, gcc-internal-format -msgid "can't get position in PCH file: %m" -msgstr "немагчыма зачыніць уваходзячы файл %s" - -#: ggc-common.c:497 -#, fuzzy, gcc-internal-format -msgid "can't write padding to PCH file: %m" -msgstr "не магу запісаць ў %s" - -#: ggc-common.c:550 ggc-common.c:558 ggc-common.c:565 ggc-common.c:568 -#: ggc-common.c:578 ggc-common.c:581 ggc-page.c:2334 ggc-zone.c:1607 -#, fuzzy, gcc-internal-format -msgid "can't read PCH file: %m" -msgstr "не магу прачытаць з %s" +#: tree-cfg.c:3214 +#, gcc-internal-format +msgid "side effects not recomputed when ADDR_EXPR changed" +msgstr "" -#: ggc-common.c:573 +#: tree-cfg.c:3230 #, gcc-internal-format -msgid "had to relocate PCH" +msgid "address taken, but ADDRESSABLE bit not set" msgstr "" -#: ggc-page.c:1454 +#: tree-cfg.c:3240 #, gcc-internal-format -msgid "open /dev/zero: %m" +msgid "non-boolean used in condition" msgstr "" -#: ggc-page.c:2225 ggc-page.c:2231 +#: tree-cfg.c:3245 #, fuzzy, gcc-internal-format -msgid "can't write PCH file" -msgstr "не магу запісаць ў %s" +msgid "invalid conditional operand" +msgstr "нерэчаісны %%d аперанд" + +#: tree-cfg.c:3300 +#, gcc-internal-format +msgid "invalid reference prefix" +msgstr "" -#: gimple-low.c:203 +#: tree-cfg.c:3365 #, gcc-internal-format -msgid "unexpected node" +msgid "is not a valid GIMPLE statement" msgstr "" -#: gimplify.c:3345 +#: tree-cfg.c:3385 #, gcc-internal-format -msgid "invalid lvalue in asm output %d" +msgid "statement marked for throw, but doesn%'t" msgstr "" -#: gimplify.c:3457 +#: tree-cfg.c:3390 #, gcc-internal-format -msgid "memory input %d is not directly addressable" +msgid "statement marked for throw in middle of block" msgstr "" -#: gimplify.c:4331 +#: tree-cfg.c:3485 #, gcc-internal-format -msgid "gimplification failed" +msgid "bb_for_stmt (phi) is set to a wrong basic block" msgstr "" -#: global.c:371 global.c:384 global.c:398 -#, fuzzy, gcc-internal-format -msgid "%s cannot be used in asm here" -msgstr "\"%s\" звычайна функцыя" - -#: graph.c:403 passes.c:131 java/jcf-parse.c:1047 java/jcf-parse.c:1194 -#: java/lex.c:1846 objc/objc-act.c:552 -#, fuzzy, gcc-internal-format -msgid "can't open %s: %m" -msgstr "немагчыма адчыніць %s" - -#: haifa-sched.c:182 +#: tree-cfg.c:3500 #, gcc-internal-format -msgid "fix_sched_param: unknown param: %s" +msgid "PHI def is not a GIMPLE value" msgstr "" -#. Eventually this should become a hard error IMO. -#: opts.c:259 +#: tree-cfg.c:3516 tree-cfg.c:3539 #, gcc-internal-format -msgid "command line option \"%s\" is valid for %s but not for %s" +msgid "incorrect sharing of tree nodes" msgstr "" -#: opts.c:347 -#, fuzzy, gcc-internal-format -msgid "missing argument to \"%s\"" -msgstr "аргумент для \"%s\" прапушчан" - -#: opts.c:357 -#, fuzzy, gcc-internal-format -msgid "argument to \"%s\" should be a non-negative integer" -msgstr "першым аргументам \"%s\" павінен быць \"int\"" - -#: opts.c:426 -#, fuzzy, gcc-internal-format -msgid "unrecognized command line option \"%s\"" -msgstr "Нераспазнаны выбар \"%s\"" - -#: opts.c:634 +#: tree-cfg.c:3530 #, gcc-internal-format -msgid "-Wuninitialized is not supported without -O" +msgid "bb_for_stmt (stmt) is set to a wrong basic block" msgstr "" -#: opts.c:648 +#: tree-cfg.c:3548 #, gcc-internal-format -msgid "-freorder-blocks-and-partition does not work with exceptions" +msgid "verify_stmts failed" msgstr "" -#: opts.c:661 +#: tree-cfg.c:3569 #, gcc-internal-format -msgid "-freorder-blocks-and-partition does not work with -g (currently)" +msgid "ENTRY_BLOCK has a statement list associated with it" msgstr "" -#: opts.c:821 +#: tree-cfg.c:3575 #, gcc-internal-format -msgid "structure alignment must be a small power of two, not %d" +msgid "EXIT_BLOCK has a statement list associated with it" msgstr "" -#: opts.c:886 -#, fuzzy, gcc-internal-format -msgid "unrecognised visibility value \"%s\"" -msgstr "нераспазнаная назва сэкцыі \"%s\"" - -#: opts.c:938 -#, fuzzy, gcc-internal-format -msgid "unrecognized register name \"%s\"" -msgstr "нераспазнаная назва сэкцыі \"%s\"" - -#: opts.c:962 -#, fuzzy, gcc-internal-format -msgid "unknown tls-model \"%s\"" -msgstr "невядомы рэжым машыны \"%s\"" - -#: opts.c:1037 +#: tree-cfg.c:3582 #, gcc-internal-format -msgid "%s: --param arguments should be of the form NAME=VALUE" +msgid "fallthru to exit from bb %d" msgstr "" -#: opts.c:1042 -#, fuzzy, gcc-internal-format -msgid "invalid --param value %qs" -msgstr "нерэчаісны выбар --param : %s" - -#: opts.c:1139 -#, fuzzy, gcc-internal-format -msgid "target system does not support debug output" -msgstr "ISO C не падтрымлівае комлексныя цэлалікавыя тыпы" - -#: opts.c:1146 -#, fuzzy, gcc-internal-format -msgid "debug format \"%s\" conflicts with prior selection" -msgstr "секцыя \"%s\" канфліктуе з папярэдняй дэкларацыяй" - -#: opts.c:1162 -#, fuzzy, gcc-internal-format -msgid "unrecognised debug output level \"%s\"" -msgstr "нераспазнаная назва сэкцыі \"%s\"" - -#: opts.c:1164 +#: tree-cfg.c:3604 #, gcc-internal-format -msgid "debug output level %s is too high" +msgid "nonlocal label %s is not first in a sequence of labels in bb %d" msgstr "" -#: params.c:72 -#, fuzzy, gcc-internal-format -msgid "minimum value of parameter %qs is %u" -msgstr "нерэчаісны парамэтр `%s'" - -#: params.c:77 +#: tree-cfg.c:3613 #, gcc-internal-format -msgid "maximum value of parameter %qs is %u" +msgid "label %s to block does not match in bb %d" msgstr "" -#. If we didn't find this parameter, issue an error message. -#: params.c:86 -#, fuzzy, gcc-internal-format -msgid "invalid parameter %qs" -msgstr "нерэчаісны парамэтр `%s'" +#: tree-cfg.c:3622 +#, gcc-internal-format +msgid "label %s has incorrect context in bb %d" +msgstr "" -#: passes.c:1210 +#: tree-cfg.c:3636 #, gcc-internal-format -msgid "branch target register load optimization is not intended to be run twice" +msgid "control flow in the middle of basic block %d" msgstr "" -#: profile.c:284 +#: tree-cfg.c:3646 #, gcc-internal-format -msgid "corrupted profile info: run_max * runs < sum_max" +msgid "label %s in the middle of basic block %d" msgstr "" -#: profile.c:290 +#: tree-cfg.c:3665 #, gcc-internal-format -msgid "corrupted profile info: sum_all is smaller than sum_max" +msgid "fallthru edge after a control statement in bb %d" msgstr "" -#: profile.c:335 +#: tree-cfg.c:3680 #, gcc-internal-format -msgid "corrupted profile info: edge from %i to %i exceeds maximal count" +msgid "structured COND_EXPR at the end of bb %d" msgstr "" -#: profile.c:503 +#: tree-cfg.c:3693 tree-cfg.c:3731 tree-cfg.c:3744 tree-cfg.c:3815 #, gcc-internal-format -msgid "corrupted profile info: number of iterations for basic block %d thought to be %i" +msgid "wrong outgoing edge flags at end of bb %d" msgstr "" -#: profile.c:524 +#: tree-cfg.c:3701 #, gcc-internal-format -msgid "corrupted profile info: number of executions for edge %d-%d thought to be %i" +msgid "% label does not match edge at end of bb %d" msgstr "" -#: reg-stack.c:622 +#: tree-cfg.c:3709 #, gcc-internal-format -msgid "output constraint %d must specify a single register" +msgid "% label does not match edge at end of bb %d" msgstr "" -#: reg-stack.c:632 +#: tree-cfg.c:3719 #, gcc-internal-format -msgid "output constraint %d cannot be specified together with \"%s\" clobber" +msgid "explicit goto at end of bb %d" msgstr "" -#: reg-stack.c:655 +#: tree-cfg.c:3749 #, gcc-internal-format -msgid "output regs must be grouped at top of stack" +msgid "return edge does not point to exit in bb %d" msgstr "" -#: reg-stack.c:692 +#: tree-cfg.c:3782 #, gcc-internal-format -msgid "implicitly popped regs must be grouped at top of stack" +msgid "found default case not at end of case vector" msgstr "" -#: reg-stack.c:711 +#: tree-cfg.c:3788 +#, fuzzy, gcc-internal-format +msgid "case labels not sorted:" +msgstr "-pipe не падтрымліваецца" + +#: tree-cfg.c:3799 #, gcc-internal-format -msgid "output operand %d must use %<&%> constraint" +msgid "no default case found at end of case vector" msgstr "" -#: regclass.c:766 +#: tree-cfg.c:3807 #, gcc-internal-format -msgid "can't use '%s' as a %s register" +msgid "extra outgoing edge %d->%d" msgstr "" -#: regclass.c:781 config/ia64/ia64.c:4687 config/ia64/ia64.c:4694 -#: config/pa/pa.c:342 config/pa/pa.c:349 +#: tree-cfg.c:3829 +#, fuzzy, gcc-internal-format +msgid "missing edge %i->%i" +msgstr "прапушчана поле '%s' у '%s'" + +#: tree-cfg.c:5123 tree-cfg.c:5127 #, gcc-internal-format -msgid "unknown register name: %s" -msgstr "невядомая назва рэгістра: %s" +msgid "%H% function does return" +msgstr "" -#: regclass.c:791 +#: tree-cfg.c:5149 tree-cfg.c:5154 #, gcc-internal-format -msgid "global register variable follows a function definition" +msgid "%Hcontrol reaches end of non-void function" msgstr "" -#: regclass.c:795 +#: tree-cfg.c:5214 #, gcc-internal-format -msgid "register used for two global register variables" +msgid "%Jfunction might be possible candidate for attribute %" msgstr "" -#: regclass.c:800 +#: tree-dump.c:856 +#, fuzzy, gcc-internal-format +msgid "could not open dump file %qs: %s" +msgstr "Немагчыма адчыніць файл з дадзенымі %s.\n" + +#: tree-dump.c:987 #, gcc-internal-format -msgid "call-clobbered register used for global register variable" +msgid "ignoring unknown option %q.*s in %<-fdump-%s%>" msgstr "" -#: regrename.c:1872 +#: tree-eh.c:1767 +#, fuzzy, gcc-internal-format +msgid "EH edge %i->%i is missing" +msgstr "аргумент для \"-%s\" прапушчан" + +#: tree-eh.c:1772 #, gcc-internal-format -msgid "validate_value_data: [%u] Bad next_regno for empty chain (%u)" +msgid "EH edge %i->%i miss EH flag" msgstr "" -#: regrename.c:1884 +#. ??? might not be mistake. +#: tree-eh.c:1778 #, gcc-internal-format -msgid "validate_value_data: Loop in regno chain (%u)" +msgid "EH edge %i->%i has duplicated regions" msgstr "" -#: regrename.c:1887 +#: tree-eh.c:1812 #, gcc-internal-format -msgid "validate_value_data: [%u] Bad oldest_regno (%u)" +msgid "BB %i can not throw but has EH edges" msgstr "" -#: regrename.c:1899 +#: tree-eh.c:1819 #, gcc-internal-format -msgid "validate_value_data: [%u] Non-empty reg in chain (%s %u %i)" +msgid "BB %i last statement has incorrectly set region" msgstr "" -#: reload.c:1270 +#: tree-eh.c:1830 #, gcc-internal-format -msgid "cannot reload integer constant operand in %" +msgid "unnecessary EH edge %i->%i" msgstr "" -#: reload.c:1293 +#: tree-inline.c:1373 #, gcc-internal-format -msgid "impossible register constraint in %" +msgid "function %q+F can never be inlined because it uses alloca (override using the always_inline attribute)" msgstr "" -#: reload.c:3550 +#: tree-inline.c:1385 #, gcc-internal-format -msgid "%<&%> constraint used with no register class" +msgid "function %q+F can never be inlined because it uses setjmp" msgstr "" -#: reload.c:3721 reload.c:3953 +#: tree-inline.c:1399 #, gcc-internal-format -msgid "inconsistent operand constraints in an %" +msgid "function %q+F can never be inlined because it uses variable argument lists" msgstr "" -#: reload1.c:1217 +#: tree-inline.c:1410 #, gcc-internal-format -msgid "frame size too large for reliable stack checking" +msgid "function %q+F can never be inlined because it uses setjmp-longjmp exception handling" msgstr "" -#: reload1.c:1220 +#: tree-inline.c:1417 #, gcc-internal-format -msgid "try reducing the number of local variables" +msgid "function %q+F can never be inlined because it uses non-local goto" msgstr "" -#: reload1.c:1871 +#: tree-inline.c:1428 #, gcc-internal-format -msgid "can't find a register in class %qs while reloading %" +msgid "function %q+F can never be inlined because it uses __builtin_return or __builtin_apply_args" msgstr "" -#: reload1.c:1876 +#: tree-inline.c:1447 #, gcc-internal-format -msgid "unable to find a register to spill in class %qs" +msgid "function %q+F can never be inlined because it contains a computed goto" msgstr "" -#: reload1.c:3878 +#: tree-inline.c:1461 #, gcc-internal-format -msgid "% operand requires impossible reload" +msgid "function %q+F can never be inlined because it receives a non-local goto" msgstr "" -#: reload1.c:5002 +#: tree-inline.c:1486 #, gcc-internal-format -msgid "% operand constraint incompatible with operand size" +msgid "function %q+F can never be inlined because it uses variable sized variables" msgstr "" -#: reload1.c:6629 +#: tree-inline.c:2025 tree-inline.c:2035 #, gcc-internal-format -msgid "output operand is constant in %" +msgid "inlining failed in call to %q+F: %s" msgstr "" -#: rtl.c:471 +#: tree-inline.c:2026 tree-inline.c:2037 #, gcc-internal-format -msgid "RTL check: access of elt %d of '%s' with last elt %d in %s, at %s:%d" +msgid "called from here" +msgstr "выклікана адсюль" + +#: tree-mudflap.c:847 +#, gcc-internal-format +msgid "mudflap checking not yet implemented for ARRAY_RANGE_REF" msgstr "" -#: rtl.c:481 +#: tree-mudflap.c:1038 #, gcc-internal-format -msgid "RTL check: expected elt %d type '%c', have '%c' (rtx %s) in %s, at %s:%d" +msgid "mudflap cannot track %qs in stub function" msgstr "" -#: rtl.c:491 +#: tree-mudflap.c:1265 #, gcc-internal-format -msgid "RTL check: expected elt %d type '%c' or '%c', have '%c' (rtx %s) in %s, at %s:%d" +msgid "mudflap cannot track unknown size extern %qs" msgstr "" -#: rtl.c:500 +#: tree-nomudflap.c:51 +#, fuzzy, gcc-internal-format +msgid "mudflap: this language is not supported" +msgstr "-pipe не падтрымліваецца" + +#: tree-optimize.c:478 +#, fuzzy, gcc-internal-format +msgid "size of return value of %q+D is %u bytes" +msgstr "памер вяртаемага значэння \"%s\" %u байт" + +#: tree-optimize.c:481 +#, fuzzy, gcc-internal-format +msgid "size of return value of %q+D is larger than %wd bytes" +msgstr "памер вяртаемага значэння \"%s\" больш чым %d байт" + +#: tree-outof-ssa.c:614 tree-outof-ssa.c:629 tree-outof-ssa.c:643 +#: tree-outof-ssa.c:665 tree-outof-ssa.c:1120 tree-outof-ssa.c:1872 +#: tree-ssa-live.c:429 tree-ssa-live.c:1835 #, gcc-internal-format -msgid "RTL check: expected code '%s', have '%s' in %s, at %s:%d" +msgid "SSA corruption" msgstr "" -#: rtl.c:510 +#: tree-outof-ssa.c:2287 #, gcc-internal-format -msgid "RTL check: expected code '%s' or '%s', have '%s' in %s, at %s:%d" +msgid " Pending stmts not issued on PRED edge (%d, %d)\n" msgstr "" -#: rtl.c:521 +#: tree-outof-ssa.c:2293 #, gcc-internal-format -msgid "RTL check: access of elt %d of vector with last elt %d in %s, at %s:%d" +msgid " Pending stmts not issued on SUCC edge (%d, %d)\n" msgstr "" -#: rtl.c:532 +#: tree-outof-ssa.c:2300 #, gcc-internal-format -msgid "RTL flag check: %s used with unexpected rtx code '%s' in %s, at %s:%d" +msgid " Pending stmts not issued on ENTRY edge (%d, %d)\n" msgstr "" -#: stmt.c:317 +#: tree-outof-ssa.c:2306 #, gcc-internal-format -msgid "output operand constraint lacks %<=%>" +msgid " Pending stmts not issued on EXIT edge (%d, %d)\n" msgstr "" -#: stmt.c:332 +#: tree-profile.c:216 +#, fuzzy, gcc-internal-format +msgid "unimplemented functionality" +msgstr "вельмі шмат аргументаў у функцыі" + +#: tree-ssa-loop-niter.c:1035 #, gcc-internal-format -msgid "output constraint %qc for operand %d is not at the beginning" +msgid "%H%s" msgstr "" -#: stmt.c:355 +#: tree-ssa-operands.c:1328 #, gcc-internal-format -msgid "operand constraint contains incorrectly positioned %<+%> or %<=%>" +msgid "internal error" +msgstr "унутраная памылка" + +#: tree-ssa.c:111 +#, gcc-internal-format +msgid "expected an SSA_NAME object" msgstr "" -#: stmt.c:362 stmt.c:461 +#: tree-ssa.c:117 #, gcc-internal-format -msgid "%<%%%> constraint used with last operand" +msgid "type mismatch between an SSA_NAME and its symbol" msgstr "" -#: stmt.c:381 +#: tree-ssa.c:123 #, gcc-internal-format -msgid "matching constraint not valid in output operand" +msgid "found an SSA_NAME that had been released into the free pool" msgstr "" -#: stmt.c:452 +#: tree-ssa.c:129 #, gcc-internal-format -msgid "input operand constraint contains %qc" +msgid "found a virtual definition for a GIMPLE register" msgstr "" -#: stmt.c:494 +#: tree-ssa.c:135 #, gcc-internal-format -msgid "matching constraint references invalid operand number" +msgid "found a real definition for a non-register" msgstr "" -#: stmt.c:532 -#, fuzzy, gcc-internal-format -msgid "invalid punctuation %qc in constraint" -msgstr "`%E' - нерэчаісная нязьменная тыпу string" +#: tree-ssa.c:142 +#, gcc-internal-format +msgid "found real variable when subvariables should have appeared" +msgstr "" -#: stmt.c:556 +#: tree-ssa.c:171 #, gcc-internal-format -msgid "matching constraint does not allow a register" +msgid "SSA_NAME created in two different blocks %i and %i" msgstr "" -#: stmt.c:584 +#: tree-ssa.c:180 #, gcc-internal-format -msgid "asm-specifier for variable %qs conflicts with asm clobber list" +msgid "SSA_NAME_DEF_STMT is wrong" msgstr "" -#: stmt.c:673 +#: tree-ssa.c:238 #, fuzzy, gcc-internal-format -msgid "unknown register name %qs in %" -msgstr "невядомая назва рэгістра: %s" +msgid "missing definition" +msgstr "прапушчан ініцыялізатар" -#: stmt.c:681 +#: tree-ssa.c:244 #, gcc-internal-format -msgid "PIC register %qs clobbered in %" +msgid "definition in block %i does not dominate use in block %i" msgstr "" -#: stmt.c:728 +#: tree-ssa.c:252 #, gcc-internal-format -msgid "more than %d operands in %" +msgid "definition in block %i follows the use" msgstr "" -#: stmt.c:791 +#: tree-ssa.c:259 #, gcc-internal-format -msgid "output number %d not directly addressable" +msgid "SSA_NAME_OCCURS_IN_ABNORMAL_PHI should be set" msgstr "" -#: stmt.c:870 +#: tree-ssa.c:267 #, gcc-internal-format -msgid "asm operand %d probably doesn%'t match constraints" +msgid "no immediate_use list" msgstr "" -#: stmt.c:880 +#: tree-ssa.c:279 #, gcc-internal-format -msgid "use of memory input without lvalue in asm operand %d is deprecated" +msgid "wrong immediate use list" msgstr "" -#: stmt.c:1027 -#, fuzzy, gcc-internal-format -msgid "asm clobber conflict with output operand" -msgstr "секцыя \"%s\" канфліктуе з папярэдняй дэкларацыяй" - -#: stmt.c:1032 -#, fuzzy, gcc-internal-format -msgid "asm clobber conflict with input operand" -msgstr "секцыя \"%s\" канфліктуе з папярэдняй дэкларацыяй" - -#: stmt.c:1109 -#, fuzzy, gcc-internal-format -msgid "too many alternatives in %" -msgstr "вельмі шмат аргументаў у функцыі \"%s\"" - -#: stmt.c:1121 +#: tree-ssa.c:312 #, gcc-internal-format -msgid "operand constraints for % differ in number of alternatives" +msgid "incoming edge count does not match number of PHI arguments" msgstr "" -#: stmt.c:1174 +#: tree-ssa.c:327 #, fuzzy, gcc-internal-format -msgid "duplicate asm operand name %qs" -msgstr "паўторнае абвяшчэнне меткі \"%s\"" +msgid "PHI argument is missing for edge %d->%d" +msgstr "аргумент для \"%s\" прапушчан" -#: stmt.c:1272 +#: tree-ssa.c:336 #, gcc-internal-format -msgid "missing close brace for named operand" +msgid "PHI argument is not SSA_NAME, or invariant" msgstr "" -#: stmt.c:1300 -#, fuzzy, gcc-internal-format -msgid "undefined named operand %qs" -msgstr "нераспазнаны аператар %s" +#: tree-ssa.c:348 +#, gcc-internal-format +msgid "wrong edge %d->%d for PHI argument" +msgstr "" -#: stmt.c:1465 +#: tree-ssa.c:397 #, gcc-internal-format -msgid "%Hvalue computed is not used" +msgid "non-addressable variable inside an alias set" msgstr "" -#: stor-layout.c:152 +#: tree-ssa.c:413 #, gcc-internal-format -msgid "type size can%'t be explicitly evaluated" +msgid "addressable variable that is an alias tag but is not in any alias set" msgstr "" -#: stor-layout.c:154 +#: tree-ssa.c:423 #, gcc-internal-format -msgid "variable-size type declared outside of any function" +msgid "verify_flow_insensitive_alias_info failed" msgstr "" -#: stor-layout.c:458 -#, fuzzy, gcc-internal-format -msgid "%Jsize of %qD is %d bytes" -msgstr "памер \"%s\" - %d байт" +#: tree-ssa.c:465 +#, gcc-internal-format +msgid "dereferenced pointers should have a name or a type tag" +msgstr "" -#: stor-layout.c:460 -#, fuzzy, gcc-internal-format -msgid "%Jsize of %qD is larger than %d bytes" -msgstr "памер \"%s\" больш чам %d байт" +#: tree-ssa.c:472 +#, gcc-internal-format +msgid "pointers with a memory tag, should have points-to sets" +msgstr "" -#: stor-layout.c:844 +#: tree-ssa.c:480 #, gcc-internal-format -msgid "%Jpacked attribute causes inefficient alignment for %qD" +msgid "pointer escapes but its name tag is not call-clobbered" msgstr "" -#: stor-layout.c:847 +#: tree-ssa.c:489 #, gcc-internal-format -msgid "%Jpacked attribute is unnecessary for %qD" +msgid "verify_flow_sensitive_alias_info failed" msgstr "" -#: stor-layout.c:863 +#: tree-ssa.c:566 #, gcc-internal-format -msgid "%Jpadding struct to align %qD" +msgid "alias set of a pointer's type tag should be a superset of the corresponding name tag" msgstr "" -#: stor-layout.c:1205 +#: tree-ssa.c:582 #, gcc-internal-format -msgid "padding struct size to alignment boundary" +msgid "two different pointers with identical points-to sets but different name tags" msgstr "" -#: stor-layout.c:1235 +#: tree-ssa.c:614 #, gcc-internal-format -msgid "packed attribute causes inefficient alignment for %qs" +msgid "verify_name_tags failed" msgstr "" -#: stor-layout.c:1238 -#, fuzzy, gcc-internal-format -msgid "packed attribute is unnecessary for %qs" -msgstr "\"%s\" атрыбут ігнарыруецца" +#: tree-ssa.c:685 +#, gcc-internal-format +msgid "AUX pointer initialized for edge %d->%d" +msgstr "" -#: stor-layout.c:1243 +#: tree-ssa.c:708 #, gcc-internal-format -msgid "packed attribute causes inefficient alignment" +msgid "stmt (%p) marked modified after optimization pass : " msgstr "" -#: stor-layout.c:1245 +#: tree-ssa.c:726 #, gcc-internal-format -msgid "packed attribute is unnecessary" +msgid "statement makes a memory store, but has no V_MAY_DEFS nor V_MUST_DEFS" msgstr "" -#: targhooks.c:96 +#: tree-ssa.c:737 #, gcc-internal-format -msgid "__builtin_saveregs not supported by this target" -msgstr "__buitin_saveregs не падтрымліваецца гэтай мэтай" +msgid "statement makes aliased stores, but has no V_MAY_DEFS" +msgstr "" -#: tlink.c:475 +#: tree-ssa.c:776 #, gcc-internal-format -msgid "repository file '%s' does not contain command-line arguments" +msgid "verify_ssa failed" msgstr "" -#: tlink.c:696 +#. We only do data flow with SSA_NAMEs, so that's all we +#. can warn about. +#: tree-ssa.c:1163 +#, fuzzy, gcc-internal-format +msgid "%H%qD is used uninitialized in this function" +msgstr "\"%s\" не абвешчан (першае выкарыстанне ў гэтай функцыі)" + +#: tree-ssa.c:1201 #, gcc-internal-format -msgid "'%s' was assigned to '%s', but was not defined during recompilation, or vice versa" +msgid "%H%qD may be used uninitialized in this function" msgstr "" -#: tlink.c:760 +#: tree-vect-transform.c:561 +#, fuzzy, gcc-internal-format +msgid "no support for induction" +msgstr "непадтрымліваемая версія" + +#: tree.c:3495 #, gcc-internal-format -msgid "ld returned %d exit status" +msgid "%q+D already declared with dllexport attribute: dllimport ignored" msgstr "" -#: toplev.c:469 +#: tree.c:3507 #, gcc-internal-format -msgid "%s " +msgid "%q+D redeclared without dllimport attribute after being referenced with dll linkage" msgstr "" -#: toplev.c:471 +#: tree.c:3523 config/i386/winnt-cxx.c:70 #, gcc-internal-format -msgid " %s" +msgid "%q+D redeclared without dllimport attribute: previous dllimport ignored" msgstr "" -#: toplev.c:536 +#: tree.c:3575 config/darwin.c:1209 config/arm/arm.c:2888 +#: config/arm/arm.c:2916 config/avr/avr.c:4656 config/h8300/h8300.c:5282 +#: config/h8300/h8300.c:5306 config/i386/i386.c:2057 config/i386/i386.c:16691 +#: config/ia64/ia64.c:533 config/m68hc11/m68hc11.c:1118 +#: config/sh/symbian.c:409 config/sh/symbian.c:416 #, fuzzy, gcc-internal-format -msgid "invalid option argument %qs" -msgstr "Нерэчаісны выбар \"%s\"" +msgid "%qs attribute ignored" +msgstr "\"%s\" атрыбут ігнарыруецца" -#: toplev.c:626 +#: tree.c:3594 #, gcc-internal-format -msgid "getting core file size maximum limit: %m" +msgid "inline function %q+D declared as dllimport: attribute ignored" msgstr "" -#: toplev.c:629 +#: tree.c:3602 #, gcc-internal-format -msgid "setting core file size limit to maximum: %m" +msgid "function %q+D definition is marked dllimport" msgstr "" -#: toplev.c:852 +#: tree.c:3610 config/sh/symbian.c:431 #, gcc-internal-format -msgid "%J%qF declared % but never defined" +msgid "variable %q+D definition is marked dllimport" msgstr "" -#: toplev.c:878 -#, fuzzy, gcc-internal-format -msgid "%J%qD defined but not used" -msgstr "адмеціна `%D' вызначана, але не выкарыстоўваецца" - -#: toplev.c:901 toplev.c:924 +#: tree.c:3633 config/sh/symbian.c:506 #, gcc-internal-format -msgid "%qs is deprecated (declared at %s:%d)" +msgid "external linkage required for symbol %q+D because of %qs attribute" msgstr "" -#: toplev.c:927 +#: tree.c:5045 #, gcc-internal-format -msgid "type is deprecated (declared at %s:%d)" +msgid "arrays of functions are not meaningful" msgstr "" -#: toplev.c:933 +#: tree.c:5097 #, gcc-internal-format -msgid "%qs is deprecated" +msgid "function return type cannot be function" msgstr "" -#: toplev.c:935 +#: tree.c:5997 #, gcc-internal-format -msgid "type is deprecated" +msgid "tree check: %s, have %s in %s, at %s:%d" msgstr "" -#: toplev.c:1174 +#: tree.c:6034 #, gcc-internal-format -msgid "unrecognized gcc debugging option: %c" +msgid "tree check: expected none of %s, have %s in %s, at %s:%d" msgstr "" -#. Handle -mfix-and-continue. -#: toplev.c:1236 config/rs6000/rs6000.c:1409 config/rs6000/rs6000.c:1420 -#: config/rs6000/darwin.h:106 -#, fuzzy, gcc-internal-format -msgid "invalid option %qs" -msgstr "Нерэчаісны выбар %s" - -#: toplev.c:1413 -#, fuzzy, gcc-internal-format -msgid "can%'t open %s for writing: %m" -msgstr "немагчыма адчыніць %s для запісу" - -#: toplev.c:1758 +#: tree.c:6047 #, gcc-internal-format -msgid "instruction scheduling not supported on this target machine" +msgid "tree check: expected class %qs, have %qs (%s) in %s, at %s:%d" msgstr "" -#: toplev.c:1762 +#: tree.c:6072 #, gcc-internal-format -msgid "this target machine does not have delayed branches" +msgid "tree check: expected tree that contains %qs structure, have %qs in %s, at %s:%d" msgstr "" -#: toplev.c:1766 +#: tree.c:6086 #, gcc-internal-format -msgid "value-based profiling not yet implemented in trees." +msgid "tree check: accessed elt %d of tree_vec with %d elts in %s, at %s:%d" msgstr "" -#: toplev.c:1779 +#: tree.c:6098 #, gcc-internal-format -msgid "-f%sleading-underscore not supported on this target machine" +msgid "tree check: accessed elt %d of phi_node with %d elts in %s, at %s:%d" msgstr "" -#: toplev.c:1853 +#: tree.c:6110 #, gcc-internal-format -msgid "target system does not support the \"%s\" debug format" +msgid "tree check: accessed operand %d of %s with %d operands in %s, at %s:%d" msgstr "" -#: toplev.c:1865 +#: value-prof.c:101 #, gcc-internal-format -msgid "variable tracking requested, but useless unless producing debug info" +msgid "%HCorrupted value profile: %s profiler overall count (%d) does not match BB count (%d)" msgstr "" -#: toplev.c:1868 +#: varasm.c:470 #, gcc-internal-format -msgid "variable tracking requested, but not supported by this debug format" +msgid "%+D causes a section type conflict" msgstr "" -#: toplev.c:1888 -#, fuzzy, gcc-internal-format -msgid "can%'t open %s: %m" -msgstr "немагчыма адчыніць %s" - -#: toplev.c:1895 -#, fuzzy, gcc-internal-format -msgid "-ffunction-sections not supported for this target" -msgstr "атрыбуты секцыі не падтрымліваюцца для гэтай мэты" - -#: toplev.c:1900 -#, fuzzy, gcc-internal-format -msgid "-fdata-sections not supported for this target" -msgstr "атрыбуты секцыі не падтрымліваюцца для гэтай мэты" - -#: toplev.c:1907 +#: varasm.c:930 varasm.c:938 #, gcc-internal-format -msgid "-ffunction-sections disabled; it makes profiling impossible" +msgid "register name not specified for %q+D" msgstr "" -#: toplev.c:1914 +#: varasm.c:940 #, fuzzy, gcc-internal-format -msgid "-fprefetch-loop-arrays not supported for this target" -msgstr "атрыбуты секцыі не падтрымліваюцца для гэтай мэты" +msgid "invalid register name for %q+D" +msgstr "нерэчаісная назва рэгістра `%s'" -#: toplev.c:1920 -#, fuzzy, gcc-internal-format -msgid "-fspeculative-prefetching not supported for this target" -msgstr "атрыбуты секцыі не падтрымліваюцца для гэтай мэты" +#: varasm.c:942 +#, gcc-internal-format +msgid "data type of %q+D isn%'t suitable for a register" +msgstr "" -#: toplev.c:1926 +#: varasm.c:945 #, gcc-internal-format -msgid "-fprefetch-loop-arrays not supported for this target (try -march switches)" +msgid "register specified for %q+D isn%'t suitable for data type" msgstr "" -#: toplev.c:1932 -#, fuzzy, gcc-internal-format -msgid "-fspeculative-prefetching not supported for this target (try -march switches)" -msgstr "атрыбуты секцыі не падтрымліваюцца для гэтай мэты" +#: varasm.c:955 +#, gcc-internal-format +msgid "global register variable has initial value" +msgstr "" -#: toplev.c:1941 +#: varasm.c:959 #, gcc-internal-format -msgid "-fprefetch-loop-arrays is not supported with -Os" +msgid "optimization may eliminate reads and/or writes to register variables" msgstr "" -#: toplev.c:1947 +#: varasm.c:997 #, gcc-internal-format -msgid "-ffunction-sections may affect debugging on some targets" +msgid "register name given for non-register variable %q+D" msgstr "" -#: toplev.c:2059 +#: varasm.c:1074 #, fuzzy, gcc-internal-format -msgid "error writing to %s: %m" -msgstr "памылка запісу ў %s" +msgid "global destructors not supported on this target" +msgstr "__buitin_saveregs не падтрымліваецца гэтай мэтай" -#: toplev.c:2061 java/jcf-parse.c:1066 java/jcf-write.c:3537 +#: varasm.c:1135 #, fuzzy, gcc-internal-format -msgid "error closing %s: %m" -msgstr "памылка запісу ў %s" +msgid "global constructors not supported on this target" +msgstr "атрыбуты секцыі не падтрымліваюцца для гэтай мэты" -#: tree-cfg.c:1355 tree-cfg.c:2073 tree-cfg.c:2075 +#: varasm.c:1697 #, gcc-internal-format -msgid "%Hwill never be executed" +msgid "alignment of %q+D is greater than maximum object file alignment. Using %d" msgstr "" -#: tree-cfg.c:3280 +#: varasm.c:1736 #, gcc-internal-format -msgid "SSA name in freelist but still referenced" +msgid "thread-local COMMON data not implemented" msgstr "" -#: tree-cfg.c:3290 +#: varasm.c:1761 #, gcc-internal-format -msgid "GIMPLE register modified with BIT_FIELD_REF" +msgid "requested alignment for %q+D is greater than implemented alignment of %wu" msgstr "" -#: tree-cfg.c:3318 +#: varasm.c:3919 #, gcc-internal-format -msgid "address taken, but ADDRESSABLE bit not set" +msgid "no-op convert from %wd to %wd bytes in initializer" msgstr "" -#: tree-cfg.c:3327 +#: varasm.c:3963 #, gcc-internal-format -msgid "non-boolean used in condition" +msgid "initializer for integer value is too complicated" msgstr "" -#: tree-cfg.c:3382 +#: varasm.c:3968 #, gcc-internal-format -msgid "Invalid reference prefix." +msgid "initializer for floating value is not a floating constant" msgstr "" -#: tree-cfg.c:3447 -#, gcc-internal-format -msgid "Is not a valid GIMPLE statement." -msgstr "" +#: varasm.c:4237 +#, fuzzy, gcc-internal-format +msgid "invalid initial value for member %qs" +msgstr "нявернае выкарыстанне \"restict\"" -#: tree-cfg.c:3467 +#: varasm.c:4437 varasm.c:4481 #, gcc-internal-format -msgid "Statement marked for throw, but doesn%'t." +msgid "weak declaration of %q+D must precede definition" msgstr "" -#: tree-cfg.c:3472 +#: varasm.c:4445 #, gcc-internal-format -msgid "Statement marked for throw in middle of block." +msgid "weak declaration of %q+D after first use results in unspecified behavior" msgstr "" -#: tree-cfg.c:3576 +#: varasm.c:4479 #, gcc-internal-format -msgid "PHI def is not a GIMPLE value" +msgid "weak declaration of %q+D must be public" msgstr "" -#: tree-cfg.c:3592 tree-cfg.c:3608 +#: varasm.c:4488 #, gcc-internal-format -msgid "Incorrect sharing of tree nodes" +msgid "weak declaration of %q+D not supported" msgstr "" -#: tree-cfg.c:3617 +#: varasm.c:4518 #, gcc-internal-format -msgid "verify_stmts failed." +msgid "only weak aliases are supported in this configuration" msgstr "" -#: tree-cfg.c:3638 -#, gcc-internal-format -msgid "ENTRY_BLOCK has a statement list associated with it\n" -msgstr "" +#: varasm.c:4748 +#, fuzzy, gcc-internal-format +msgid "%Jweakref is not supported in this configuration" +msgstr "атрыбуты секцыі не падтрымліваюцца для гэтай мэты" -#: tree-cfg.c:3644 +#: varasm.c:4821 #, gcc-internal-format -msgid "EXIT_BLOCK has a statement list associated with it\n" +msgid "%q+D aliased to undefined symbol %qs" msgstr "" -#: tree-cfg.c:3651 +#: varasm.c:4826 #, gcc-internal-format -msgid "Fallthru to exit from bb %d\n" +msgid "%q+D aliased to external symbol %qs" msgstr "" -#: tree-cfg.c:3673 +#: varasm.c:4865 #, gcc-internal-format -msgid "Nonlocal label %s is not first in a sequence of labels in bb %d" +msgid "weakref %q+D ultimately targets itself" msgstr "" -#: tree-cfg.c:3682 -#, gcc-internal-format -msgid "Label %s to block does not match in bb %d\n" -msgstr "" +#: varasm.c:4878 +#, fuzzy, gcc-internal-format +msgid "%Jalias definitions not supported in this configuration" +msgstr "атрыбуты секцыі не падтрымліваюцца для гэтай мэты" -#: tree-cfg.c:3691 +#: varasm.c:4883 #, gcc-internal-format -msgid "Label %s has incorrect context in bb %d\n" +msgid "%Jonly weak aliases are supported in this configuration" msgstr "" -#: tree-cfg.c:3705 -#, gcc-internal-format -msgid "Control flow in the middle of basic block %d\n" -msgstr "" +#: varasm.c:4940 +#, fuzzy, gcc-internal-format +msgid "visibility attribute not supported in this configuration; ignored" +msgstr "атрыбуты секцыі не падтрымліваюцца для гэтай мэты" -#: tree-cfg.c:3715 +#: varray.c:207 #, gcc-internal-format -msgid "Label %s in the middle of basic block %d\n" +msgid "virtual array %s[%lu]: element %lu out of bounds in %s, at %s:%d" msgstr "" -#: tree-cfg.c:3732 +#: varray.c:217 #, gcc-internal-format -msgid "Fallthru edge after a control statement in bb %d \n" +msgid "underflowed virtual array %s in %s, at %s:%d" msgstr "" -#: tree-cfg.c:3747 +#: vec.c:153 #, gcc-internal-format -msgid "Structured COND_EXPR at the end of bb %d\n" +msgid "vector %s %s domain error, in %s at %s:%u" msgstr "" -#: tree-cfg.c:3760 tree-cfg.c:3798 tree-cfg.c:3810 tree-cfg.c:3881 +#. Print an error message for unrecognized stab codes. +#: xcoffout.c:187 #, gcc-internal-format -msgid "Wrong outgoing edge flags at end of bb %d\n" +msgid "no sclass for %s stab (0x%x)" msgstr "" -#: tree-cfg.c:3768 +#: config/darwin-c.c:86 #, gcc-internal-format -msgid "% label does not match edge at end of bb %d\n" +msgid "too many #pragma options align=reset" msgstr "" -#: tree-cfg.c:3776 +#: config/darwin-c.c:106 config/darwin-c.c:109 config/darwin-c.c:111 +#: config/darwin-c.c:113 #, gcc-internal-format -msgid "% label does not match edge at end of bb %d\n" +msgid "malformed '#pragma options', ignoring" msgstr "" -#: tree-cfg.c:3786 +#: config/darwin-c.c:116 #, gcc-internal-format -msgid "Explicit goto at end of bb %d\n" +msgid "junk at end of '#pragma options'" msgstr "" -#: tree-cfg.c:3815 +#: config/darwin-c.c:126 #, gcc-internal-format -msgid "Return edge does not point to exit in bb %d\n" +msgid "malformed '#pragma options align={mac68k|power|reset}', ignoring" msgstr "" -#: tree-cfg.c:3848 +#: config/darwin-c.c:138 #, gcc-internal-format -msgid "Found default case not at end of case vector" +msgid "missing '(' after '#pragma unused', ignoring" msgstr "" -#: tree-cfg.c:3854 +#: config/darwin-c.c:156 #, gcc-internal-format -msgid "" -"Case labels not sorted:\n" -" " +msgid "missing ')' after '#pragma unused', ignoring" msgstr "" -#: tree-cfg.c:3865 +#: config/darwin-c.c:159 #, gcc-internal-format -msgid "No default case found at end of case vector" +msgid "junk at end of '#pragma unused'" msgstr "" -#: tree-cfg.c:3873 +#: config/darwin-c.c:385 #, gcc-internal-format -msgid "Extra outgoing edge %d->%d\n" +msgid "subframework include %s conflicts with framework include" msgstr "" -#: tree-cfg.c:3895 -#, fuzzy, gcc-internal-format -msgid "Missing edge %i->%i" -msgstr "Прапушчан ідэнтыфікатар" - -#: tree-cfg.c:5698 +#: config/darwin-c.c:577 #, gcc-internal-format -msgid "%Jfunction might be possible candidate for attribute %" +msgid "Unknown value %qs of -mmacosx-version-min" msgstr "" -#: tree-cfg.c:5725 tree-cfg.c:5729 +#: config/darwin.c:1323 #, gcc-internal-format -msgid "%H% function does return" +msgid "internal and protected visibility attributes not supported in this configuration; ignored" msgstr "" -#: tree-cfg.c:5750 tree-cfg.c:5755 +#: config/host-darwin.c:63 #, gcc-internal-format -msgid "%Hcontrol reaches end of non-void function" +msgid "couldn't unmap pch_address_space: %m" msgstr "" -#: tree-dump.c:849 -#, fuzzy, gcc-internal-format -msgid "could not open dump file %qs: %s" -msgstr "Немагчыма адчыніць файл з дадзенымі %s.\n" - -#: tree-dump.c:965 +#: config/sol2-c.c:94 config/sol2-c.c:110 #, gcc-internal-format -msgid "ignoring unknown option %q.*s in %<-fdump-%s%>" +msgid "malformed %<#pragma align%>, ignoring" msgstr "" -#: tree-inline.c:974 +#: config/sol2-c.c:103 #, gcc-internal-format -msgid "%Jfunction %qF can never be inlined because it uses alloca (override using the always_inline attribute)" +msgid "invalid alignment for %<#pragma align%>, ignoring" msgstr "" -#: tree-inline.c:986 +#: config/sol2-c.c:118 #, gcc-internal-format -msgid "%Jfunction %qF can never be inlined because it uses setjmp" +msgid "%<#pragma align%> must appear before the declaration of %D, ignoring" msgstr "" -#: tree-inline.c:1000 +#: config/sol2-c.c:130 config/sol2-c.c:142 #, gcc-internal-format -msgid "%Jfunction %qF can never be inlined because it uses variable argument lists" +msgid "malformed %<#pragma align%>" msgstr "" -#: tree-inline.c:1011 +#: config/sol2-c.c:137 #, gcc-internal-format -msgid "%Jfunction %qF can never be inlined because it uses setjmp-longjmp exception handling" +msgid "junk at end of %<#pragma align%>" msgstr "" -#: tree-inline.c:1018 +#: config/sol2-c.c:158 config/sol2-c.c:165 #, gcc-internal-format -msgid "%Jfunction %qF can never be inlined because it uses non-local goto" +msgid "malformed %<#pragma init%>, ignoring" msgstr "" -#: tree-inline.c:1029 +#: config/sol2-c.c:188 config/sol2-c.c:200 #, gcc-internal-format -msgid "%Jfunction %qF can never be inlined because it uses __builtin_return or __builtin_apply_args" +msgid "malformed %<#pragma init%>" msgstr "" -#: tree-inline.c:1048 +#: config/sol2-c.c:195 #, gcc-internal-format -msgid "%Jfunction %qF can never be inlined because it contains a computed goto" +msgid "junk at end of %<#pragma init%>" msgstr "" -#: tree-inline.c:1062 +#: config/sol2-c.c:216 config/sol2-c.c:223 #, gcc-internal-format -msgid "%Jfunction %qF can never be inlined because it receives a non-local goto" +msgid "malformed %<#pragma fini%>, ignoring" msgstr "" -#: tree-inline.c:1087 +#: config/sol2-c.c:246 config/sol2-c.c:258 #, gcc-internal-format -msgid "%Jfunction %qF can never be inlined because it uses variable sized variables" +msgid "malformed %<#pragma fini%>" msgstr "" -#: tree-inline.c:1575 tree-inline.c:1583 +#: config/sol2-c.c:253 #, gcc-internal-format -msgid "%Jinlining failed in call to %qF: %s" +msgid "junk at end of %<#pragma fini%>" msgstr "" -#: tree-inline.c:1576 tree-inline.c:1584 -#, gcc-internal-format -msgid "called from here" -msgstr "выклікана адсюль" - -#: tree-inline.c:1698 +#: config/sol2.c:54 #, gcc-internal-format -msgid "control may reach end of non-void function %qD being inlined" +msgid "ignoring %<#pragma align%> for explicitly aligned %q+D" msgstr "" -#: tree-mudflap.c:857 +#. Mach-O supports 'weak imports', and 'weak definitions' in coalesced +#. sections. machopic_select_section ensures that weak variables go in +#. coalesced sections. Weak aliases (or any other kind of aliases) are +#. not supported. Weak symbols that aren't visible outside the .s file +#. are not supported. +#: config/darwin.h:395 +#, fuzzy, gcc-internal-format +msgid "alias definitions not supported in Mach-O; ignored" +msgstr "-pipe не падтрымліваецца" + +#. No profiling. +#: config/vx-common.h:83 #, gcc-internal-format -msgid "mudflap checking not yet implemented for ARRAY_RANGE_REF" +msgid "profiler support for VxWorks" msgstr "" -#: tree-mudflap.c:1048 +#: config/windiss.h:37 #, gcc-internal-format -msgid "mudflap cannot track %qs in stub function" +msgid "profiler support for WindISS" msgstr "" -#: tree-mudflap.c:1279 +#: config/alpha/alpha.c:231 config/rs6000/rs6000.c:1570 #, gcc-internal-format -msgid "mudflap cannot track unknown size extern %qs" +msgid "bad value %qs for -mtls-size switch" msgstr "" -#: tree-nomudflap.c:51 -#, fuzzy, gcc-internal-format -msgid "mudflap: this language is not supported" -msgstr "-pipe не падтрымліваецца" - -#: tree-optimize.c:718 +#: config/alpha/alpha.c:270 #, fuzzy, gcc-internal-format -msgid "%Jsize of return value of %qD is %u bytes" -msgstr "памер вяртаемага значэння \"%s\" %u байт" +msgid "-f%s ignored for Unicos/Mk (not supported)" +msgstr "-pipe не падтрымліваецца." -#: tree-optimize.c:721 +#: config/alpha/alpha.c:294 #, fuzzy, gcc-internal-format -msgid "%Jsize of return value of %qD is larger than %wd bytes" -msgstr "памер вяртаемага значэння \"%s\" больш чым %d байт" +msgid "-mieee not supported on Unicos/Mk" +msgstr "-pipe не падтрымліваецца" -#: tree-outof-ssa.c:610 tree-outof-ssa.c:625 tree-outof-ssa.c:639 -#: tree-outof-ssa.c:661 tree-outof-ssa.c:1029 tree-outof-ssa.c:1865 -#: tree-ssa-live.c:417 tree-ssa-live.c:1799 +#: config/alpha/alpha.c:305 #, gcc-internal-format -msgid "SSA corruption" +msgid "-mieee-with-inexact not supported on Unicos/Mk" msgstr "" -#: tree-outof-ssa.c:2270 +#: config/alpha/alpha.c:322 #, gcc-internal-format -msgid " Pending stmts not issued on PRED edge (%d, %d)\n" +msgid "bad value %qs for -mtrap-precision switch" msgstr "" -#: tree-outof-ssa.c:2276 +#: config/alpha/alpha.c:336 #, gcc-internal-format -msgid " Pending stmts not issued on SUCC edge (%d, %d)\n" +msgid "bad value %qs for -mfp-rounding-mode switch" msgstr "" -#: tree-outof-ssa.c:2283 +#: config/alpha/alpha.c:351 #, gcc-internal-format -msgid " Pending stmts not issued on ENTRY edge (%d, %d)\n" +msgid "bad value %qs for -mfp-trap-mode switch" msgstr "" -#: tree-outof-ssa.c:2289 +#: config/alpha/alpha.c:365 config/alpha/alpha.c:377 #, gcc-internal-format -msgid " Pending stmts not issued on EXIT edge (%d, %d)\n" +msgid "bad value %qs for -mcpu switch" msgstr "" -#: tree-profile.c:111 tree-profile.c:127 tree-profile.c:143 tree-profile.c:160 -#, fuzzy, gcc-internal-format -msgid "unimplemented functionality" -msgstr "вельмі шмат аргументаў у функцыі" - -#: tree-ssa-operands.c:1277 +#: config/alpha/alpha.c:384 #, gcc-internal-format -msgid "internal error" -msgstr "унутраная памылка" +msgid "trap mode not supported on Unicos/Mk" +msgstr "" -#: tree-ssa.c:113 +#: config/alpha/alpha.c:391 #, gcc-internal-format -msgid "Expected an SSA_NAME object" +msgid "fp software completion requires -mtrap-precision=i" msgstr "" -#: tree-ssa.c:119 +#: config/alpha/alpha.c:407 #, gcc-internal-format -msgid "Type mismatch between an SSA_NAME and its symbol." +msgid "rounding mode not supported for VAX floats" msgstr "" -#: tree-ssa.c:125 +#: config/alpha/alpha.c:412 #, gcc-internal-format -msgid "Found an SSA_NAME that had been released into the free pool" +msgid "trap mode not supported for VAX floats" msgstr "" -#: tree-ssa.c:131 +#: config/alpha/alpha.c:416 #, gcc-internal-format -msgid "Found a virtual definition for a GIMPLE register" +msgid "128-bit long double not supported for VAX floats" msgstr "" -#: tree-ssa.c:137 +#: config/alpha/alpha.c:444 #, gcc-internal-format -msgid "Found a real definition for a non-register" +msgid "L%d cache latency unknown for %s" msgstr "" -#: tree-ssa.c:166 +#: config/alpha/alpha.c:459 #, gcc-internal-format -msgid "SSA_NAME created in two different blocks %i and %i" +msgid "bad value %qs for -mmemory-latency" msgstr "" -#: tree-ssa.c:175 +#: config/alpha/alpha.c:6551 config/alpha/alpha.c:6554 config/s390/s390.c:7796 +#: config/s390/s390.c:7799 #, gcc-internal-format -msgid "SSA_NAME_DEF_STMT is wrong" +msgid "bad builtin fcode" msgstr "" -#: tree-ssa.c:227 +#: config/arc/arc.c:390 #, fuzzy, gcc-internal-format -msgid "Missing definition" -msgstr "Прапушчан ідэнтыфікатар" +msgid "argument of %qs attribute is not a string constant" +msgstr "аргумент `__builtin_args_info' павінен быць канстантай" -#: tree-ssa.c:233 -#, gcc-internal-format -msgid "Definition in block %i does not dominate use in block %i" -msgstr "" +#: config/arc/arc.c:398 +#, fuzzy, gcc-internal-format +msgid "argument of %qs attribute is not \"ilink1\" or \"ilink2\"" +msgstr "аргумент `__builtin_args_info' павінен быць канстантай" -#: tree-ssa.c:241 +#: config/arm/arm.c:912 #, gcc-internal-format -msgid "Definition in block %i follows the use" +msgid "switch -mcpu=%s conflicts with -march= switch" msgstr "" -#: tree-ssa.c:248 +#: config/arm/arm.c:922 config/rs6000/rs6000.c:1226 config/sparc/sparc.c:698 #, gcc-internal-format -msgid "SSA_NAME_OCCURS_IN_ABNORMAL_PHI should be set" +msgid "bad value (%s) for %s switch" msgstr "" -#: tree-ssa.c:280 +#: config/arm/arm.c:1032 #, gcc-internal-format -msgid "Incoming edge count does not match number of PHI arguments\n" +msgid "target CPU does not support interworking" msgstr "" -#: tree-ssa.c:293 +#: config/arm/arm.c:1038 #, fuzzy, gcc-internal-format -msgid "PHI argument is missing for edge %d->%d\n" -msgstr "аргумент для \"%s\" прапушчан" +msgid "target CPU does not support THUMB instructions" +msgstr "ISO C не падтрымлівае комлексныя цэлалікавыя тыпы" -#: tree-ssa.c:302 +#: config/arm/arm.c:1056 #, gcc-internal-format -msgid "PHI argument is not SSA_NAME, or invariant" +msgid "enabling backtrace support is only meaningful when compiling for the Thumb" msgstr "" -#: tree-ssa.c:314 +#: config/arm/arm.c:1059 #, gcc-internal-format -msgid "Wrong edge %d->%d for PHI argument\n" +msgid "enabling callee interworking support is only meaningful when compiling for the Thumb" msgstr "" -#: tree-ssa.c:364 +#: config/arm/arm.c:1062 #, gcc-internal-format -msgid "Non-addressable variable inside an alias set." +msgid "enabling caller interworking support is only meaningful when compiling for the Thumb" msgstr "" -#: tree-ssa.c:382 +#: config/arm/arm.c:1066 #, gcc-internal-format -msgid "Addressable variable that is an alias tag but is not in any alias set." +msgid "-mapcs-stack-check incompatible with -mno-apcs-frame" msgstr "" -#: tree-ssa.c:392 +#: config/arm/arm.c:1074 #, gcc-internal-format -msgid "verify_flow_insensitive_alias_info failed." +msgid "-fpic and -mapcs-reent are incompatible" msgstr "" -#: tree-ssa.c:434 +#: config/arm/arm.c:1077 #, gcc-internal-format -msgid "Dereferenced pointers should have a name or a type tag" +msgid "APCS reentrant code not supported. Ignored" msgstr "" -#: tree-ssa.c:442 +#: config/arm/arm.c:1085 #, gcc-internal-format -msgid "Pointers with a memory tag, should have points-to sets or point to malloc" +msgid "-g with -mno-apcs-frame may not give sensible debugging" msgstr "" -#: tree-ssa.c:450 +#: config/arm/arm.c:1093 #, gcc-internal-format -msgid "Pointer escapes but its name tag is not call-clobbered." +msgid "passing floating point arguments in fp regs not yet supported" msgstr "" -#: tree-ssa.c:459 -#, gcc-internal-format -msgid "verify_flow_sensitive_alias_info failed." -msgstr "" +#: config/arm/arm.c:1135 +#, fuzzy, gcc-internal-format +msgid "invalid ABI option: -mabi=%s" +msgstr "Нерэчаісны выбар %s" -#: tree-ssa.c:535 +#: config/arm/arm.c:1141 #, gcc-internal-format -msgid "Alias set of a pointer's type tag should be a superset of the corresponding name tag" +msgid "iwmmxt requires an AAPCS compatible ABI for proper operation" msgstr "" -#: tree-ssa.c:551 +#: config/arm/arm.c:1144 #, gcc-internal-format -msgid "Two different pointers with identical points-to sets but different name tags" +msgid "iwmmxt abi requires an iwmmxt capable cpu" msgstr "" -#: tree-ssa.c:580 +#: config/arm/arm.c:1154 #, gcc-internal-format -msgid "verify_name_tags failed" +msgid "invalid floating point emulation option: -mfpe=%s" msgstr "" -#: tree-ssa.c:647 -#, gcc-internal-format -msgid "AUX pointer initialized for edge %d->%d\n" -msgstr "" +#: config/arm/arm.c:1171 +#, fuzzy, gcc-internal-format +msgid "invalid floating point option: -mfpu=%s" +msgstr "нерэчаісны выбар --param : %s" -#: tree-ssa.c:672 +#: config/arm/arm.c:1211 #, gcc-internal-format -msgid "Statement makes aliased stores, but has no V_MAY_DEFS" +msgid "invalid floating point abi: -mfloat-abi=%s" msgstr "" -#: tree-ssa.c:710 +#: config/arm/arm.c:1218 #, gcc-internal-format -msgid "verify_ssa failed." +msgid "-mfloat-abi=hard and VFP" msgstr "" -#: tree-ssa.c:1379 +#: config/arm/arm.c:1241 #, fuzzy, gcc-internal-format -msgid "%H%qD is used uninitialized in this function" -msgstr "\"%s\" не абвешчан (першае выкарыстанне ў гэтай функцыі)" +msgid "invalid thread pointer option: -mtp=%s" +msgstr "нерэчаісны выбар --param : %s" -#: tree-ssa.c:1404 +#: config/arm/arm.c:1254 #, gcc-internal-format -msgid "%H%qD may be used uninitialized in this function" +msgid "can not use -mtp=cp15 with -mthumb" msgstr "" -#: tree-vect-transform.c:598 +#: config/arm/arm.c:1268 #, gcc-internal-format -msgid "no support for reduction/induction" +msgid "structure size boundary can only be set to %s" msgstr "" -#: tree-vect-transform.c:624 -#, fuzzy, gcc-internal-format -msgid "unsupported defining stmt" -msgstr "непадтрымліваемая версія" - -#: tree.c:3276 +#: config/arm/arm.c:1277 #, gcc-internal-format -msgid "%Jfunction %qD definition is marked dllimport." +msgid "-mpic-register= is useless without -fpic" msgstr "" -#: tree.c:3284 +#: config/arm/arm.c:1284 #, gcc-internal-format -msgid "%Jvariable %qD definition is marked dllimport." +msgid "unable to use '%s' for PIC register" msgstr "" -#: tree.c:3304 +#: config/arm/arm.c:2856 config/arm/arm.c:2874 config/avr/avr.c:4676 +#: config/bfin/bfin.c:2723 config/c4x/c4x.c:4076 config/h8300/h8300.c:5258 +#: config/i386/i386.c:2021 config/m68hc11/m68hc11.c:1155 +#: config/m68k/m68k.c:376 config/mcore/mcore.c:3032 config/ms1/ms1.c:1285 +#: config/rs6000/rs6000.c:17343 config/sh/sh.c:7529 config/sh/sh.c:7550 +#: config/sh/sh.c:7585 config/stormy16/stormy16.c:2241 config/v850/v850.c:2111 +#, fuzzy, gcc-internal-format +msgid "%qs attribute only applies to functions" +msgstr "\"%s\" звычайна функцыя" + +#: config/arm/arm.c:11995 #, gcc-internal-format -msgid "%Jexternal linkage required for symbol %qD because of %qs attribute." +msgid "unable to compute real location of stacked parameter" msgstr "" -#: tree.c:4457 +#. @@@ better error message +#: config/arm/arm.c:12640 config/arm/arm.c:12677 #, gcc-internal-format -msgid "arrays of functions are not meaningful" +msgid "selector must be an immediate" msgstr "" -#: tree.c:4509 +#. @@@ better error message +#: config/arm/arm.c:12720 config/i386/i386.c:15465 config/i386/i386.c:15499 #, gcc-internal-format -msgid "function return type cannot be function" +msgid "mask must be an immediate" msgstr "" -#: tree.c:5412 +#: config/arm/arm.c:13379 #, gcc-internal-format -msgid "invalid initializer for bit string" +msgid "no low registers available for popping high registers" msgstr "" -#: tree.c:5496 +#: config/arm/arm.c:13603 #, gcc-internal-format -msgid "tree check: %s, have %s in %s, at %s:%d" +msgid "interrupt Service Routines cannot be coded in Thumb mode" msgstr "" -#: tree.c:5533 +#: config/arm/pe.c:165 config/mcore/mcore.c:2898 #, gcc-internal-format -msgid "tree check: expected none of %s, have %s in %s, at %s:%d" +msgid "initialized variable %q+D is marked dllimport" msgstr "" -#: tree.c:5546 +#: config/arm/pe.c:174 #, gcc-internal-format -msgid "tree check: expected class %qs, have %qs (%s) in %s, at %s:%d" +msgid "static variable %q+D is marked dllimport" msgstr "" -#: tree.c:5560 +#: config/avr/avr.c:531 #, gcc-internal-format -msgid "tree check: accessed elt %d of tree_vec with %d elts in %s, at %s:%d" +msgid "large frame pointer change (%d) with -mtiny-stack" msgstr "" -#: tree.c:5572 +#: config/avr/avr.c:4649 #, gcc-internal-format -msgid "tree check: accessed elt %d of phi_node with %d elts in %s, at %s:%d" +msgid "only initialized variables can be placed into program memory area" msgstr "" -#: tree.c:5584 +#: config/avr/avr.c:4693 #, gcc-internal-format -msgid "tree check: accessed operand %d of %s with %d operands in %s, at %s:%d" +msgid "%qs appears to be a misspelled interrupt handler" msgstr "" -#: varasm.c:477 +#: config/avr/avr.c:4701 #, gcc-internal-format -msgid "%J%D causes a section type conflict" +msgid "%qs appears to be a misspelled signal handler" msgstr "" -#: varasm.c:910 +#: config/avr/avr.c:4770 #, gcc-internal-format -msgid "%Jregister name not specified for %qD" +msgid "only uninitialized variables can be placed in the .noinit section" msgstr "" -#: varasm.c:912 -#, fuzzy, gcc-internal-format -msgid "%Jinvalid register name for %qD" -msgstr "нерэчаісная назва рэгістра `%s'" - -#: varasm.c:914 +#: config/avr/avr.c:4784 #, gcc-internal-format -msgid "%Jdata type of %qD isn%'t suitable for a register" +msgid "MCU %qs supported for assembler only" msgstr "" -#: varasm.c:917 +#: config/avr/avr.h:713 #, gcc-internal-format -msgid "%Jregister specified for %qD isn%'t suitable for data type" +msgid "trampolines not supported" msgstr "" -#: varasm.c:927 +#: config/bfin/bfin.c:1805 config/m68k/m68k.c:294 #, gcc-internal-format -msgid "global register variable has initial value" +msgid "-mshared-library-id=%s is not between 0 and %d" msgstr "" -#: varasm.c:930 +#: config/bfin/bfin.c:1825 #, gcc-internal-format -msgid "volatile register variables don%'t work as you might wish" +msgid "-mshared-library-id= specified without -mid-shared-library" msgstr "" -#: varasm.c:968 +#: config/bfin/bfin.c:2728 #, gcc-internal-format -msgid "%Jregister name given for non-register variable %qD" +msgid "multiple function type attributes specified" msgstr "" -#: varasm.c:1046 -#, fuzzy, gcc-internal-format -msgid "global destructors not supported on this target" -msgstr "__buitin_saveregs не падтрымліваецца гэтай мэтай" - -#: varasm.c:1107 +#: config/bfin/bfin.c:2784 #, fuzzy, gcc-internal-format -msgid "global constructors not supported on this target" -msgstr "атрыбуты секцыі не падтрымліваюцца для гэтай мэты" +msgid "`%s' attribute only applies to functions" +msgstr "\"%s\" звычайна функцыя" -#: varasm.c:1607 +#: config/bfin/bfin.c:2795 #, gcc-internal-format -msgid "%Jalignment of %qD is greater than maximum object file alignment. Using %d" +msgid "can't apply both longcall and shortcall attributes to the same function" msgstr "" -#: varasm.c:1646 +#: config/c4x/c4x-c.c:72 #, gcc-internal-format -msgid "thread-local COMMON data not implemented" +msgid "missing '(' after '#pragma %s' - ignored" msgstr "" -#: varasm.c:1671 +#: config/c4x/c4x-c.c:75 #, gcc-internal-format -msgid "%Jrequested alignment for %qD is greater than implemented alignment of %d" +msgid "missing function name in '#pragma %s' - ignored" msgstr "" -#: varasm.c:3791 +#: config/c4x/c4x-c.c:80 #, gcc-internal-format -msgid "initializer for integer value is too complicated" +msgid "malformed '#pragma %s' - ignored" msgstr "" -#: varasm.c:3796 +#: config/c4x/c4x-c.c:82 #, gcc-internal-format -msgid "initializer for floating value is not a floating constant" +msgid "missing section name in '#pragma %s' - ignored" msgstr "" -#: varasm.c:4065 -#, fuzzy, gcc-internal-format -msgid "invalid initial value for member %qs" -msgstr "нявернае выкарыстанне \"restict\"" - -#: varasm.c:4266 varasm.c:4310 +#: config/c4x/c4x-c.c:87 #, gcc-internal-format -msgid "%Jweak declaration of %qD must precede definition" +msgid "missing ')' for '#pragma %s' - ignored" msgstr "" -#: varasm.c:4274 +#: config/c4x/c4x-c.c:90 #, gcc-internal-format -msgid "%Jweak declaration of %qD after first use results in unspecified behavior" +msgid "junk at end of '#pragma %s'" msgstr "" -#: varasm.c:4308 +#: config/c4x/c4x.c:860 #, gcc-internal-format -msgid "%Jweak declaration of %qD must be public" +msgid "ISR %s requires %d words of local vars, max is 32767" msgstr "" -#: varasm.c:4317 +#. This function is for retrieving a part of an instruction name for +#. an operator, for immediate output. If that ever happens for +#. MULT, we need to apply TARGET_MUL_BUG in the caller. Make sure +#. we notice. +#: config/cris/cris.c:435 #, gcc-internal-format -msgid "%Jweak declaration of %qD not supported" +msgid "MULT case in cris_op_str" msgstr "" -#: varasm.c:4346 -#, gcc-internal-format -msgid "only weak aliases are supported in this configuration" -msgstr "" +#: config/cris/cris.c:813 +#, fuzzy, gcc-internal-format +msgid "invalid use of ':' modifier" +msgstr "нерэчаіснае выкарыстаньне `::'" -#: varasm.c:4510 +#: config/cris/cris.c:979 #, gcc-internal-format -msgid "%J%qD aliased to undefined symbol %qE" -msgstr "" +msgid "internal error: bad register: %d" +msgstr "унутраная памылка: дрэнны рэгістр: %d" -#: varasm.c:4513 +#: config/cris/cris.c:1521 #, gcc-internal-format -msgid "%J%qD aliased to external symbol %qE" +msgid "internal error: sideeffect-insn affecting main effect" msgstr "" -#: varasm.c:4544 -#, fuzzy, gcc-internal-format -msgid "%Jalias definitions not supported in this configuration" -msgstr "атрыбуты секцыі не падтрымліваюцца для гэтай мэты" - -#: varasm.c:4549 +#: config/cris/cris.c:1545 #, gcc-internal-format -msgid "%Jonly weak aliases are supported in this configuration" +msgid "unknown cc_attr value" msgstr "" -#: varasm.c:4607 -#, fuzzy, gcc-internal-format -msgid "visibility attribute not supported in this configuration; ignored" -msgstr "атрыбуты секцыі не падтрымліваюцца для гэтай мэты" - -#: varray.c:203 +#. If we get here, the caller got its initial tests wrong. +#: config/cris/cris.c:1896 #, gcc-internal-format -msgid "virtual array %s[%lu]: element %lu out of bounds in %s, at %s:%d" +msgid "internal error: cris_side_effect_mode_ok with bad operands" msgstr "" -#: varray.c:213 +#: config/cris/cris.c:2099 #, gcc-internal-format -msgid "underflowed virtual array %s in %s, at %s:%d" +msgid "-max-stackframe=%d is not usable, not between 0 and %d" msgstr "" -#: vec.c:146 +#: config/cris/cris.c:2127 #, gcc-internal-format -msgid "vector %s %s domain error, in %s at %s:%u" +msgid "unknown CRIS version specification in -march= or -mcpu= : %s" msgstr "" -#. Print an error message for unrecognized stab codes. -#: xcoffout.c:187 +#: config/cris/cris.c:2163 #, gcc-internal-format -msgid "no sclass for %s stab (0x%x)\n" +msgid "unknown CRIS cpu version specification in -mtune= : %s" msgstr "" -#: config/darwin-c.c:84 +#: config/cris/cris.c:2181 #, gcc-internal-format -msgid "too many #pragma options align=reset" +msgid "-fPIC and -fpic are not supported in this configuration" msgstr "" -#: config/darwin-c.c:104 config/darwin-c.c:107 config/darwin-c.c:109 -#: config/darwin-c.c:111 +#: config/cris/cris.c:2196 #, gcc-internal-format -msgid "malformed '#pragma options', ignoring" +msgid "that particular -g option is invalid with -maout and -melinux" msgstr "" -#: config/darwin-c.c:114 +#: config/cris/cris.c:2390 #, gcc-internal-format -msgid "junk at end of '#pragma options'" +msgid "Unknown src" msgstr "" -#: config/darwin-c.c:124 -#, gcc-internal-format -msgid "malformed '#pragma options align={mac68k|power|reset}', ignoring" -msgstr "" +#: config/cris/cris.c:2432 +#, fuzzy, gcc-internal-format +msgid "Unknown dest" +msgstr "невядомы рэжым машыны \"%s\"" -#: config/darwin-c.c:136 +#: config/cris/cris.c:2717 #, gcc-internal-format -msgid "missing '(' after '#pragma unused', ignoring" +msgid "stackframe too big: %d bytes" msgstr "" -#: config/darwin-c.c:154 +#: config/cris/cris.c:3133 config/cris/cris.c:3160 #, gcc-internal-format -msgid "missing ')' after '#pragma unused', ignoring" +msgid "expand_binop failed in movsi got" msgstr "" -#: config/darwin-c.c:157 +#: config/cris/cris.c:3225 #, gcc-internal-format -msgid "junk at end of '#pragma unused'" +msgid "emitting PIC operand, but PIC register isn't set up" msgstr "" -#: config/darwin-c.c:367 +#. Definitions for GCC. Part of the machine description for CRIS. +#. Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 +#. Free Software Foundation, Inc. +#. Contributed by Axis Communications. Written by Hans-Peter Nilsson. +#. +#. 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, 51 Franklin Street, Fifth Floor, +#. Boston, MA 02110-1301, USA. +#. After the first "Node:" comment comes all preprocessor directives and +#. attached declarations described in the info files, the "Using and +#. Porting GCC" manual (uapgcc), in the same order as found in the "Target +#. macros" section in the gcc-2.9x CVS edition of 2000-03-17. FIXME: Not +#. really, but needs an update anyway. +#. +#. There is no generic copy-of-uapgcc comment, you'll have to see uapgcc +#. for that. If applicable, there is a CRIS-specific comment. The order +#. of macro definitions follow the order in the manual. Every section in +#. the manual (node in the info pages) has an introductory `Node: +#. ' comment. If no macros are defined for a section, only +#. the section-comment is present. +#. Note that other header files (e.g. config/elfos.h, config/linux.h, +#. config/cris/linux.h and config/cris/aout.h) are responsible for lots of +#. settings not repeated below. This file contains general CRIS +#. definitions and definitions for the cris-*-elf subtarget. +#. We don't want to use gcc_assert for everything, as that can be +#. compiled out. +#: config/cris/cris.h:44 +#, gcc-internal-format +msgid "CRIS-port assertion failed: " +msgstr "" + +#. Node: Caller Saves +#. (no definitions) +#. Node: Function entry +#. See cris.c for TARGET_ASM_FUNCTION_PROLOGUE and +#. TARGET_ASM_FUNCTION_EPILOGUE. +#. Node: Profiling +#: config/cris/cris.h:867 #, gcc-internal-format -msgid "subframework include %s conflicts with framework include" +msgid "no FUNCTION_PROFILER for CRIS" msgstr "" -#: config/darwin.c:1350 +#: config/crx/crx.h:355 #, gcc-internal-format -msgid "internal and protected visibility attributes not supported in this configuration; ignored" +msgid "Profiler support for CRX" msgstr "" -#: config/sol2-c.c:94 config/sol2-c.c:110 +#: config/crx/crx.h:366 #, gcc-internal-format -msgid "malformed %<#pragma align%>, ignoring" +msgid "Trampoline support for CRX" msgstr "" -#: config/sol2-c.c:103 +#: config/frv/frv.c:8623 #, gcc-internal-format -msgid "invalid alignment for %<#pragma align%>, ignoring" +msgid "accumulator is not a constant integer" msgstr "" -#: config/sol2-c.c:118 +#: config/frv/frv.c:8628 #, gcc-internal-format -msgid "%<#pragma align%> must appear before the declaration of %D, ignoring" +msgid "accumulator number is out of bounds" msgstr "" -#: config/sol2-c.c:130 config/sol2-c.c:142 +#: config/frv/frv.c:8639 #, gcc-internal-format -msgid "malformed %<#pragma align%>" +msgid "inappropriate accumulator for %qs" msgstr "" -#: config/sol2-c.c:137 +#: config/frv/frv.c:8717 +#, fuzzy, gcc-internal-format +msgid "invalid IACC argument" +msgstr "нерэчаіснае значэньне %%C" + +#: config/frv/frv.c:8740 #, gcc-internal-format -msgid "junk at end of %<#pragma align%>" +msgid "%qs expects a constant argument" msgstr "" -#: config/sol2-c.c:158 config/sol2-c.c:165 +#: config/frv/frv.c:8745 #, gcc-internal-format -msgid "malformed %<#pragma init%>, ignoring" +msgid "constant argument out of range for %qs" msgstr "" -#: config/sol2-c.c:188 config/sol2-c.c:200 +#: config/frv/frv.c:9227 #, gcc-internal-format -msgid "malformed %<#pragma init%>" +msgid "media functions are not available unless -mmedia is used" msgstr "" -#: config/sol2-c.c:195 +#: config/frv/frv.c:9239 #, gcc-internal-format -msgid "junk at end of %<#pragma init%>" +msgid "this media function is only available on the fr500" msgstr "" -#: config/sol2-c.c:216 config/sol2-c.c:223 +#: config/frv/frv.c:9267 #, gcc-internal-format -msgid "malformed %<#pragma fini%>, ignoring" +msgid "this media function is only available on the fr400 and fr550" msgstr "" -#: config/sol2-c.c:246 config/sol2-c.c:258 +#: config/frv/frv.c:9286 #, gcc-internal-format -msgid "malformed %<#pragma fini%>" +msgid "this builtin function is only available on the fr405 and fr450" msgstr "" -#: config/sol2-c.c:253 +#: config/frv/frv.c:9295 #, gcc-internal-format -msgid "junk at end of %<#pragma fini%>" +msgid "this builtin function is only available on the fr500 and fr550" msgstr "" -#: config/sol2.c:54 +#: config/frv/frv.c:9307 #, gcc-internal-format -msgid "%Jignoring %<#pragma align%> for explicitly aligned %<%D%>" +msgid "this builtin function is only available on the fr450" msgstr "" -#. Mach-O supports 'weak imports', and 'weak definitions' in coalesced -#. sections. machopic_select_section ensures that weak variables go in -#. coalesced sections. Weak aliases (or any other kind of aliases) are -#. not supported. Weak symbols that aren't visible outside the .s file -#. are not supported. -#: config/darwin.h:395 +#: config/h8300/h8300.c:331 #, fuzzy, gcc-internal-format -msgid "alias definitions not supported in Mach-O; ignored" -msgstr "-pipe не падтрымліваецца" +msgid "-ms2600 is used without -ms" +msgstr "-ms2600 ужываецца без -ms." -#: config/windiss.h:37 -#, gcc-internal-format -msgid "profiler support for WindISS" -msgstr "" +#: config/h8300/h8300.c:337 +#, fuzzy, gcc-internal-format +msgid "-mn is used without -mh or -ms" +msgstr "-ms2600 ужываецца без -ms." -#: config/alpha/alpha.c:254 +#: config/i386/host-cygwin.c:65 #, fuzzy, gcc-internal-format -msgid "-f%s ignored for Unicos/Mk (not supported)" -msgstr "-pipe не падтрымліваецца." +msgid "can't extend PCH file: %m" +msgstr "немагчыма стварыць часовы файл" -#: config/alpha/alpha.c:278 +#: config/i386/host-cygwin.c:76 #, fuzzy, gcc-internal-format -msgid "-mieee not supported on Unicos/Mk" -msgstr "-pipe не падтрымліваецца" +msgid "can't set position in PCH file: %m" +msgstr "немагчыма зачыніць уваходзячы файл %s" -#: config/alpha/alpha.c:289 +#: config/i386/i386.c:1322 #, gcc-internal-format -msgid "-mieee-with-inexact not supported on Unicos/Mk" +msgid "code model %s not supported in PIC mode" msgstr "" -#: config/alpha/alpha.c:306 +#: config/i386/i386.c:1330 config/sparc/sparc.c:662 #, gcc-internal-format -msgid "bad value %qs for -mtrap-precision switch" +msgid "bad value (%s) for -mcmodel= switch" msgstr "" -#: config/alpha/alpha.c:320 +#: config/i386/i386.c:1346 #, gcc-internal-format -msgid "bad value %qs for -mfp-rounding-mode switch" +msgid "bad value (%s) for -masm= switch" msgstr "" -#: config/alpha/alpha.c:335 -#, gcc-internal-format -msgid "bad value %qs for -mfp-trap-mode switch" -msgstr "" +#: config/i386/i386.c:1349 +#, fuzzy, gcc-internal-format +msgid "code model %qs not supported in the %s bit mode" +msgstr "__buitin_saveregs не падтрымліваецца гэтай мэтай" -#: config/alpha/alpha.c:347 config/rs6000/rs6000.c:1729 +#: config/i386/i386.c:1352 #, gcc-internal-format -msgid "bad value %qs for -mtls-size switch" +msgid "code model % not supported yet" msgstr "" -#: config/alpha/alpha.c:366 config/alpha/alpha.c:378 +#: config/i386/i386.c:1354 #, gcc-internal-format -msgid "bad value %qs for -mcpu switch" +msgid "%i-bit mode not compiled in" msgstr "" -#: config/alpha/alpha.c:385 +#: config/i386/i386.c:1384 config/i386/i386.c:1408 +#, fuzzy, gcc-internal-format +msgid "CPU you selected does not support x86-64 instruction set" +msgstr "ISO C не падтрымлівае комлексныя цэлалікавыя тыпы" + +#: config/i386/i386.c:1390 config/ms1/ms1.c:811 #, gcc-internal-format -msgid "trap mode not supported on Unicos/Mk" +msgid "bad value (%s) for -march= switch" msgstr "" -#: config/alpha/alpha.c:392 +#: config/i386/i386.c:1421 #, gcc-internal-format -msgid "fp software completion requires -mtrap-precision=i" +msgid "bad value (%s) for -mtune= switch" msgstr "" -#: config/alpha/alpha.c:408 +#: config/i386/i386.c:1438 #, gcc-internal-format -msgid "rounding mode not supported for VAX floats" +msgid "-mregparm=%d is not between 0 and %d" msgstr "" -#: config/alpha/alpha.c:413 +#: config/i386/i386.c:1451 #, gcc-internal-format -msgid "trap mode not supported for VAX floats" +msgid "-malign-loops is obsolete, use -falign-loops" msgstr "" -#: config/alpha/alpha.c:417 +#: config/i386/i386.c:1456 config/i386/i386.c:1469 config/i386/i386.c:1482 #, gcc-internal-format -msgid "128-bit long double not supported for VAX floats" +msgid "-malign-loops=%d is not between 0 and %d" msgstr "" -#: config/alpha/alpha.c:445 +#: config/i386/i386.c:1464 #, gcc-internal-format -msgid "L%d cache latency unknown for %s" +msgid "-malign-jumps is obsolete, use -falign-jumps" msgstr "" -#: config/alpha/alpha.c:460 +#: config/i386/i386.c:1477 #, gcc-internal-format -msgid "bad value %qs for -mmemory-latency" +msgid "-malign-functions is obsolete, use -falign-functions" msgstr "" -#: config/alpha/alpha.c:6034 config/alpha/alpha.c:6037 config/s390/s390.c:8023 -#: config/s390/s390.c:8026 +#: config/i386/i386.c:1515 #, gcc-internal-format -msgid "bad builtin fcode" +msgid "-mpreferred-stack-boundary=%d is not between %d and 12" msgstr "" -#: config/arc/arc.c:172 +#: config/i386/i386.c:1527 #, gcc-internal-format -msgid "bad value (%s) for -mcpu switch" +msgid "-mbranch-cost=%d is not between 0 and 5" msgstr "" -#: config/arc/arc.c:394 -#, fuzzy, gcc-internal-format -msgid "argument of %qs attribute is not a string constant" -msgstr "аргумент `__builtin_args_info' павінен быць канстантай" - -#: config/arc/arc.c:401 -#, fuzzy, gcc-internal-format -msgid "argument of %qs attribute is not \"ilink1\" or \"ilink2\"" -msgstr "аргумент `__builtin_args_info' павінен быць канстантай" - -#: config/arm/arm.c:808 +#: config/i386/i386.c:1535 #, gcc-internal-format -msgid "switch -mcpu=%s conflicts with -march= switch" +msgid "-mlarge-data-threshold=%d is negative" msgstr "" -#: config/arm/arm.c:818 config/rs6000/rs6000.c:1239 config/sparc/sparc.c:653 +#: config/i386/i386.c:1547 #, gcc-internal-format -msgid "bad value (%s) for %s switch" +msgid "bad value (%s) for -mtls-dialect= switch" msgstr "" -#: config/arm/arm.c:931 +#: config/i386/i386.c:1594 #, gcc-internal-format -msgid "target CPU does not support interworking" +msgid "-malign-double makes no sense in the 64bit mode" msgstr "" -#: config/arm/arm.c:937 -#, fuzzy, gcc-internal-format -msgid "target CPU does not support THUMB instructions" -msgstr "ISO C не падтрымлівае комлексныя цэлалікавыя тыпы" - -#: config/arm/arm.c:951 +#: config/i386/i386.c:1596 #, gcc-internal-format -msgid "enabling backtrace support is only meaningful when compiling for the Thumb" +msgid "-mrtd calling convention not supported in the 64bit mode" msgstr "" -#: config/arm/arm.c:954 +#: config/i386/i386.c:1616 #, gcc-internal-format -msgid "enabling callee interworking support is only meaningful when compiling for the Thumb" +msgid "-msseregparm used without SSE enabled" msgstr "" -#: config/arm/arm.c:957 +#: config/i386/i386.c:1628 config/i386/i386.c:1639 #, gcc-internal-format -msgid "enabling caller interworking support is only meaningful when compiling for the Thumb" +msgid "SSE instruction set disabled, using 387 arithmetics" msgstr "" -#: config/arm/arm.c:961 +#: config/i386/i386.c:1644 #, gcc-internal-format -msgid "-mapcs-stack-check incompatible with -mno-apcs-frame" +msgid "387 instruction set disabled, using SSE arithmetics" msgstr "" -#: config/arm/arm.c:969 +#: config/i386/i386.c:1651 #, gcc-internal-format -msgid "-fpic and -mapcs-reent are incompatible" +msgid "bad value (%s) for -mfpmath= switch" msgstr "" -#: config/arm/arm.c:972 +#: config/i386/i386.c:1673 #, gcc-internal-format -msgid "APCS reentrant code not supported. Ignored" +msgid "unwind tables currently require either a frame pointer or -maccumulate-outgoing-args for correctness" msgstr "" -#: config/arm/arm.c:980 +#: config/i386/i386.c:2034 config/i386/i386.c:2076 #, gcc-internal-format -msgid "-g with -mno-apcs-frame may not give sensible debugging" +msgid "fastcall and regparm attributes are not compatible" msgstr "" -#: config/arm/arm.c:988 +#: config/i386/i386.c:2041 #, gcc-internal-format -msgid "passing floating point arguments in fp regs not yet supported" +msgid "%qs attribute requires an integer constant argument" msgstr "" -#: config/arm/arm.c:1030 +#: config/i386/i386.c:2047 #, fuzzy, gcc-internal-format -msgid "invalid ABI option: -mabi=%s" -msgstr "Нерэчаісны выбар %s" +msgid "argument to %qs attribute larger than %d" +msgstr "памер \"%s\" больш чам %d байт" -#: config/arm/arm.c:1036 +#: config/i386/i386.c:2068 config/i386/i386.c:2103 #, gcc-internal-format -msgid "iwmmxt requires an AAPCS compatible ABI for proper operation" +msgid "fastcall and cdecl attributes are not compatible" msgstr "" -#: config/arm/arm.c:1039 +#: config/i386/i386.c:2072 #, gcc-internal-format -msgid "iwmmxt abi requires an iwmmxt capable cpu" +msgid "fastcall and stdcall attributes are not compatible" msgstr "" -#: config/arm/arm.c:1049 +#: config/i386/i386.c:2086 config/i386/i386.c:2099 #, gcc-internal-format -msgid "invalid floating point emulation option: -mfpe=%s" +msgid "stdcall and cdecl attributes are not compatible" msgstr "" -#: config/arm/arm.c:1066 -#, fuzzy, gcc-internal-format -msgid "invalid floating point option: -mfpu=%s" -msgstr "нерэчаісны выбар --param : %s" - -#: config/arm/arm.c:1107 +#: config/i386/i386.c:2090 #, gcc-internal-format -msgid "invalid floating point abi: -mfloat-abi=%s" +msgid "stdcall and fastcall attributes are not compatible" msgstr "" -#: config/arm/arm.c:1122 +#: config/i386/i386.c:2225 #, gcc-internal-format -msgid "-mfloat-abi=hard and VFP" +msgid "Calling %qD with attribute sseregparm without SSE/SSE2 enabled" msgstr "" -#: config/arm/arm.c:1148 +#: config/i386/i386.c:2228 #, gcc-internal-format -msgid "structure size boundary can only be set to %s" +msgid "Calling %qT with attribute sseregparm without SSE/SSE2 enabled" msgstr "" -#: config/arm/arm.c:1157 +#: config/i386/i386.c:2953 #, gcc-internal-format -msgid "-mpic-register= is useless without -fpic" +msgid "SSE register return with SSE disabled" msgstr "" -#: config/arm/arm.c:1164 +#: config/i386/i386.c:2955 #, gcc-internal-format -msgid "unable to use '%s' for PIC register" +msgid "SSE register argument with SSE disabled" msgstr "" -#: config/arm/arm.c:2681 config/arm/arm.c:2699 config/avr/avr.c:4676 -#: config/bfin/bfin.c:2547 config/c4x/c4x.c:4499 config/h8300/h8300.c:5755 -#: config/i386/i386.c:1704 config/i386/i386.c:1750 config/ip2k/ip2k.c:3182 -#: config/m68hc11/m68hc11.c:1359 config/m68k/m68k.c:288 -#: config/mcore/mcore.c:3379 config/ns32k/ns32k.c:1073 -#: config/rs6000/rs6000.c:17404 config/sh/sh.c:7188 config/sh/sh.c:7209 -#: config/sh/sh.c:7244 config/stormy16/stormy16.c:2413 config/v850/v850.c:2210 -#, fuzzy, gcc-internal-format -msgid "%qs attribute only applies to functions" -msgstr "\"%s\" звычайна функцыя" - -#: config/arm/arm.c:11530 +#: config/i386/i386.c:3270 #, gcc-internal-format -msgid "unable to compute real location of stacked parameter" +msgid "SSE vector argument without SSE enabled changes the ABI" msgstr "" -#. @@@ better error message -#: config/arm/arm.c:12163 config/arm/arm.c:12200 +#: config/i386/i386.c:3287 #, gcc-internal-format -msgid "selector must be an immediate" +msgid "MMX vector argument without MMX enabled changes the ABI" msgstr "" -#. @@@ better error message -#: config/arm/arm.c:12243 config/i386/i386.c:14504 config/i386/i386.c:14538 +#: config/i386/i386.c:3553 #, gcc-internal-format -msgid "mask must be an immediate" +msgid "SSE vector return without SSE enabled changes the ABI" msgstr "" -#: config/arm/arm.c:12919 +#: config/i386/i386.c:3563 #, gcc-internal-format -msgid "no low registers available for popping high registers" +msgid "MMX vector return without MMX enabled changes the ABI" msgstr "" -#: config/arm/arm.c:13137 +#: config/i386/i386.c:6923 #, gcc-internal-format -msgid "interrupt Service Routines cannot be coded in Thumb mode" +msgid "extended registers have no high halves" msgstr "" -#: config/arm/pe.c:171 config/mcore/mcore.c:3245 +#: config/i386/i386.c:6938 #, gcc-internal-format -msgid "%Jinitialized variable '%D' is marked dllimport" +msgid "unsupported operand size for extended register" msgstr "" -#: config/arm/pe.c:180 +#: config/i386/i386.c:15193 config/rs6000/rs6000.c:7128 #, gcc-internal-format -msgid "%Jstatic variable '%D' is marked dllimport" +msgid "selector must be an integer constant in the range 0..%wi" msgstr "" -#: config/avr/avr.c:532 +#: config/i386/i386.c:15531 #, gcc-internal-format -msgid "large frame pointer change (%d) with -mtiny-stack" +msgid "shift must be an immediate" msgstr "" -#: config/avr/avr.c:4650 config/ip2k/ip2k.c:3157 -#, gcc-internal-format -msgid "only initialized variables can be placed into program memory area" -msgstr "" +#: config/i386/i386.c:16701 +#, fuzzy, gcc-internal-format +msgid "%qs incompatible attribute ignored" +msgstr "\"%s\" атрыбут ігнарыруецца" -#: config/avr/avr.c:4693 +#: config/i386/winnt-cxx.c:74 #, gcc-internal-format -msgid "`%s' appears to be a misspelled interrupt handler" +msgid "key method %q+D of dllimport'd class defined" msgstr "" -#: config/avr/avr.c:4701 +#: config/i386/winnt-cxx.c:95 config/sh/symbian.c:173 #, gcc-internal-format -msgid "`%s' appears to be a misspelled signal handler" +msgid "definition of static data member %q+D of dllimport'd class" msgstr "" -#: config/avr/avr.c:4770 +#: config/i386/winnt.c:74 +#, fuzzy, gcc-internal-format +msgid "%qs attribute only applies to variables" +msgstr "\"%s\" атрыбут ігнарыруецца" + +#: config/i386/winnt.c:103 #, gcc-internal-format -msgid "only uninitialized variables can be placed in the .noinit section" +msgid "%qs attribute applies only to initialized variables with external linkage" msgstr "" -#: config/avr/avr.c:4784 +#: config/i386/winnt.c:214 #, gcc-internal-format -msgid "MCU %qs supported for assembler only" +msgid "inconsistent dll linkage for %q+D, dllexport assumed" msgstr "" -#: config/avr/avr.h:766 +#: config/i386/winnt.c:254 config/sh/symbian.c:273 #, gcc-internal-format -msgid "trampolines not supported" +msgid "%qs declared as both exported to and imported from a DLL" msgstr "" -#: config/bfin/bfin.c:1728 config/m68k/m68k.c:216 +#: config/i386/winnt.c:549 #, gcc-internal-format -msgid "-mshared-library-id= specified without -mid-shared-library" +msgid "%q+D causes a section type conflict" msgstr "" -#: config/bfin/bfin.c:1731 config/m68k/m68k.c:219 +#: config/i386/cygming.h:166 #, gcc-internal-format -msgid "-mshared-library-id=%d is not between 0 and %d" +msgid "-f%s ignored for target (all code is position independent)" msgstr "" -#: config/bfin/bfin.c:2552 +#: config/i386/djgpp.h:181 #, gcc-internal-format -msgid "multiple function type attributes specified" +msgid "-mbnu210 is ignored (option is obsolete)" msgstr "" -#: config/c4x/c4x-c.c:71 +#: config/i386/i386-interix.h:257 +#, fuzzy, gcc-internal-format +msgid "ms-bitfields not supported for objc" +msgstr "-pipe не падтрымліваецца" + +#: config/ia64/ia64-c.c:52 #, gcc-internal-format -msgid "missing '(' after '#pragma %s' - ignored" +msgid "malformed #pragma builtin" msgstr "" -#: config/c4x/c4x-c.c:74 +#: config/ia64/ia64.c:501 config/m32r/m32r.c:373 +#, fuzzy, gcc-internal-format +msgid "invalid argument of %qs attribute" +msgstr "нявернае выкарыстанне \"restict\"" + +#: config/ia64/ia64.c:513 #, gcc-internal-format -msgid "missing function name in '#pragma %s' - ignored" +msgid "%Jan address area attribute cannot be specified for local variables" msgstr "" -#: config/c4x/c4x-c.c:79 +#: config/ia64/ia64.c:520 +#, fuzzy, gcc-internal-format +msgid "address area of %q+D conflicts with previous declaration" +msgstr "секцыя \"%s\" канфліктуе з папярэдняй дэкларацыяй" + +#: config/ia64/ia64.c:527 +#, fuzzy, gcc-internal-format +msgid "%Jaddress area attribute cannot be specified for functions" +msgstr "\"%s\" звычайна функцыя" + +#: config/ia64/ia64.c:5023 config/pa/pa.c:327 #, gcc-internal-format -msgid "malformed '#pragma %s' - ignored" +msgid "value of -mfixed-range must have form REG1-REG2" msgstr "" -#: config/c4x/c4x-c.c:81 +#: config/ia64/ia64.c:5050 config/pa/pa.c:354 #, gcc-internal-format -msgid "missing section name in '#pragma %s' - ignored" +msgid "%s-%s is an empty range" msgstr "" -#: config/c4x/c4x-c.c:86 +#: config/ia64/ia64.c:5078 #, gcc-internal-format -msgid "missing ')' for '#pragma %s' - ignored" +msgid "bad value %<%s%> for -mtls-size= switch" msgstr "" -#: config/c4x/c4x-c.c:89 +#: config/ia64/ia64.c:5106 #, gcc-internal-format -msgid "junk at end of '#pragma %s'" +msgid "bad value %<%s%> for -mtune= switch" msgstr "" -#: config/c4x/c4x.c:312 +#: config/ia64/ia64.c:5125 #, gcc-internal-format -msgid "unknown CPU version %d, using 40.\n" +msgid "not yet implemented: latency-optimized inline square root" msgstr "" -#: config/c4x/c4x.c:874 +#: config/iq2000/iq2000.c:1808 #, gcc-internal-format -msgid "ISR %s requires %d words of local vars, max is 32767" +msgid "gp_offset (%ld) or end_offset (%ld) is less than zero" msgstr "" -#: config/cris/cris.c:945 +#: config/iq2000/iq2000.c:2589 +#, fuzzy, gcc-internal-format +msgid "argument %qd is not a constant" +msgstr "аргумент `__builtin_args_info' павінен быць канстантай" + +#: config/iq2000/iq2000.c:2892 config/ms1/ms1.c:352 +#: config/xtensa/xtensa.c:1773 #, gcc-internal-format -msgid "stackframe too big: %d bytes" +msgid "PRINT_OPERAND_ADDRESS, null pointer" msgstr "" -#: config/cris/cris.c:1256 +#: config/iq2000/iq2000.c:3047 #, gcc-internal-format -msgid "allocated but unused delay list in epilogue" +msgid "PRINT_OPERAND: Unknown punctuation '%c'" msgstr "" -#: config/cris/cris.c:1266 +#: config/iq2000/iq2000.c:3056 config/mips/mips.c:5390 +#: config/xtensa/xtensa.c:1627 #, gcc-internal-format -msgid "unexpected function type needing stack adjustment for __builtin_eh_return" +msgid "PRINT_OPERAND null pointer" msgstr "" -#: config/cris/cris.c:1584 +#: config/m32c/m32c-pragma.c:64 #, gcc-internal-format -msgid "internal error: bad register: %d" -msgstr "унутраная памылка: дрэнны рэгістр: %d" +msgid "junk at end of #pragma GCC memregs [0..16]" +msgstr "" -#: config/cris/cris.c:2048 +#: config/m32c/m32c-pragma.c:71 #, gcc-internal-format -msgid "internal error: sideeffect-insn affecting main effect" +msgid "#pragma GCC memregs must precede any function decls" msgstr "" -#. If we get here, the caller got its initial tests wrong. -#: config/cris/cris.c:2421 +#: config/m32c/m32c-pragma.c:82 config/m32c/m32c-pragma.c:89 #, gcc-internal-format -msgid "internal error: cris_side_effect_mode_ok with bad operands" +msgid "#pragma GCC memregs takes a number [0..16]" msgstr "" -#: config/cris/cris.c:2622 +#: config/m32c/m32c.c:412 +#, fuzzy, gcc-internal-format +msgid "invalid target memregs value '%d'" +msgstr "нерэчаісны тып парамэтра `%T'" + +#: config/m68hc11/m68hc11.c:279 #, gcc-internal-format -msgid "-max-stackframe=%d is not usable, not between 0 and %d" +msgid "-f%s ignored for 68HC11/68HC12 (not supported)" msgstr "" -#: config/cris/cris.c:2650 +#: config/m68hc11/m68hc11.c:1240 #, gcc-internal-format -msgid "unknown CRIS version specification in -march= or -mcpu= : %s" +msgid "% and % attributes are not compatible, ignoring %" msgstr "" -#: config/cris/cris.c:2686 +#: config/m68hc11/m68hc11.c:1247 #, gcc-internal-format -msgid "unknown CRIS cpu version specification in -mtune= : %s" +msgid "% attribute is already used" msgstr "" -#: config/cris/cris.c:2704 +#: config/m68k/m68k.c:321 #, gcc-internal-format -msgid "-fPIC and -fpic are not supported in this configuration" +msgid "cannot specify both -msep-data and -mid-shared-library" msgstr "" -#: config/cris/cris.c:2719 +#: config/m68k/m68k.c:333 #, gcc-internal-format -msgid "that particular -g option is invalid with -maout and -melinux" +msgid "-fPIC is not currently supported on the 68000 or 68010" msgstr "" -#: config/cris/cris.c:3033 +#: config/m68k/m68k.c:640 config/rs6000/rs6000.c:13614 #, gcc-internal-format -msgid "emitting PIC operand, but PIC register isn't set up" +msgid "stack limit expression is not supported" msgstr "" -#. Node: Profiling -#: config/cris/cris.h:1016 +#: config/mips/mips.c:4584 #, gcc-internal-format -msgid "no FUNCTION_PROFILER for CRIS" +msgid "-%s conflicts with the other architecture options, which specify a %s processor" msgstr "" -#: config/frv/frv.c:576 config/frv/frv.c:603 +#: config/mips/mips.c:4600 #, gcc-internal-format -msgid "Unknown cpu: -mcpu=%s" +msgid "-march=%s is not compatible with the selected ABI" msgstr "" -#: config/frv/frv.c:9774 +#: config/mips/mips.c:4618 #, gcc-internal-format -msgid "accumulator is not a constant integer" +msgid "-mgp64 used with a 32-bit processor" msgstr "" -#: config/frv/frv.c:9779 +#: config/mips/mips.c:4620 #, gcc-internal-format -msgid "accumulator number is out of bounds" +msgid "-mgp32 used with a 64-bit ABI" msgstr "" -#: config/frv/frv.c:9790 +#: config/mips/mips.c:4622 #, gcc-internal-format -msgid "inappropriate accumulator for %qs" +msgid "-mgp64 used with a 32-bit ABI" msgstr "" -#: config/frv/frv.c:9856 +#: config/mips/mips.c:4640 config/mips/mips.c:4642 config/mips/mips.c:4644 +#: config/mips/mips.c:4720 #, fuzzy, gcc-internal-format -msgid "invalid IACC argument" -msgstr "нерэчаіснае значэньне %%C" +msgid "unsupported combination: %s" +msgstr "непадтрымліваемая версія" -#: config/frv/frv.c:9879 +#: config/mips/mips.c:4715 #, gcc-internal-format -msgid "%qs expects a constant argument" +msgid "generation of Branch Likely instructions enabled, but not supported by architecture" msgstr "" -#: config/frv/frv.c:9884 +#: config/mips/mips.c:4732 #, gcc-internal-format -msgid "constant argument out of range for %qs" +msgid "-G is incompatible with PIC code which is the default" msgstr "" -#: config/frv/frv.c:10319 +#: config/mips/mips.c:4799 #, gcc-internal-format -msgid "media functions are not available unless -mmedia is used" +msgid "-mips3d requires -mpaired-single" msgstr "" -#: config/frv/frv.c:10331 +#: config/mips/mips.c:4808 #, gcc-internal-format -msgid "this media function is only available on the fr500" +msgid "-mips3d/-mpaired-single must be used with -mfp64 -mhard-float" msgstr "" -#: config/frv/frv.c:10359 +#: config/mips/mips.c:4813 #, gcc-internal-format -msgid "this media function is only available on the fr400 and fr550" +msgid "-mips3d/-mpaired-single must be used with -mips64" msgstr "" -#: config/frv/frv.c:10378 +#: config/mips/mips.c:4816 #, gcc-internal-format -msgid "this builtin function is only available on the fr405 and fr450" +msgid "-mips16 and -mdsp cannot be used together" msgstr "" -#: config/frv/frv.c:10387 +#: config/mips/mips.c:5327 #, gcc-internal-format -msgid "this builtin function is only available on the fr500 and fr550" +msgid "internal error: %%) found without a %%( in assembler pattern" msgstr "" -#: config/frv/frv.c:10399 +#: config/mips/mips.c:5341 #, gcc-internal-format -msgid "this builtin function is only available on the fr450" +msgid "internal error: %%] found without a %%[ in assembler pattern" msgstr "" -#: config/h8300/h8300.c:358 -#, fuzzy, gcc-internal-format -msgid "-ms2600 is used without -ms" -msgstr "-ms2600 ужываецца без -ms." - -#: config/h8300/h8300.c:364 -#, fuzzy, gcc-internal-format -msgid "-mn is used without -mh or -ms" -msgstr "-ms2600 ужываецца без -ms." - -#: config/i386/host-cygwin.c:65 -#, fuzzy, gcc-internal-format -msgid "can't extend PCH file: %m" -msgstr "немагчыма стварыць часовы файл" +#: config/mips/mips.c:5354 +#, gcc-internal-format +msgid "internal error: %%> found without a %%< in assembler pattern" +msgstr "" -#: config/i386/host-cygwin.c:76 -#, fuzzy, gcc-internal-format -msgid "can't set position in PCH file: %m" -msgstr "немагчыма зачыніць уваходзячы файл %s" +#: config/mips/mips.c:5367 +#, gcc-internal-format +msgid "internal error: %%} found without a %%{ in assembler pattern" +msgstr "" -#: config/i386/i386.c:1242 +#: config/mips/mips.c:5381 #, gcc-internal-format -msgid "code model %s not supported in PIC mode" +msgid "PRINT_OPERAND: unknown punctuation '%c'" msgstr "" -#: config/i386/i386.c:1252 config/sparc/sparc.c:616 +#: config/mips/mips.c:8144 #, gcc-internal-format -msgid "bad value (%s) for -mcmodel= switch" +msgid "cannot handle inconsistent calls to %qs" msgstr "" -#: config/i386/i386.c:1267 +#: config/mips/mips.c:9543 #, gcc-internal-format -msgid "bad value (%s) for -masm= switch" +msgid "the cpu name must be lower case" msgstr "" -#: config/i386/i386.c:1270 +#: config/mips/mips.c:10209 #, fuzzy, gcc-internal-format -msgid "code model %qs not supported in the %s bit mode" -msgstr "__buitin_saveregs не падтрымліваецца гэтай мэтай" +msgid "invalid argument to builtin function" +msgstr "вельмі шмат аргументаў у функцыі" -#: config/i386/i386.c:1273 +#. Output assembler code to FILE to increment profiler label # LABELNO +#. for profiling a function entry. +#: config/mips/mips.h:2106 #, gcc-internal-format -msgid "code model % not supported yet" +msgid "mips16 function profiling" msgstr "" -#: config/i386/i386.c:1275 -#, gcc-internal-format -msgid "%i-bit mode not compiled in" -msgstr "" +#: config/mmix/mmix.c:227 +#, fuzzy, gcc-internal-format +msgid "-f%s not supported: ignored" +msgstr "-pipe не падтрымліваецца" -#: config/i386/i386.c:1305 config/i386/i386.c:1329 +#: config/mmix/mmix.c:655 #, fuzzy, gcc-internal-format -msgid "CPU you selected does not support x86-64 instruction set" -msgstr "ISO C не падтрымлівае комлексныя цэлалікавыя тыпы" +msgid "support for mode %qs" +msgstr "няма тыпа дадзеных для рэжыма \"%s\"" -#: config/i386/i386.c:1311 config/iq2000/iq2000.c:1673 +#: config/mmix/mmix.c:669 #, gcc-internal-format -msgid "bad value (%s) for -march= switch" +msgid "too large function value type, needs %d registers, have only %d registers for this" msgstr "" -#: config/i386/i386.c:1342 +#: config/mmix/mmix.c:839 #, gcc-internal-format -msgid "bad value (%s) for -mtune= switch" +msgid "function_profiler support for MMIX" msgstr "" -#: config/i386/i386.c:1359 +#: config/mmix/mmix.c:861 #, gcc-internal-format -msgid "-mregparm=%d is not between 0 and %d" +msgid "MMIX Internal: Last named vararg would not fit in a register" msgstr "" -#: config/i386/i386.c:1372 +#: config/mmix/mmix.c:1476 config/mmix/mmix.c:1500 config/mmix/mmix.c:1616 #, gcc-internal-format -msgid "-malign-loops is obsolete, use -falign-loops" +msgid "MMIX Internal: Bad register: %d" msgstr "" -#: config/i386/i386.c:1377 config/i386/i386.c:1390 config/i386/i386.c:1403 +#. Presumably there's a missing case above if we get here. +#: config/mmix/mmix.c:1608 #, gcc-internal-format -msgid "-malign-loops=%d is not between 0 and %d" +msgid "MMIX Internal: Missing %qc case in mmix_print_operand" msgstr "" -#: config/i386/i386.c:1385 +#: config/mmix/mmix.c:1894 #, gcc-internal-format -msgid "-malign-jumps is obsolete, use -falign-jumps" +msgid "stack frame not a multiple of 8 bytes: %wd" msgstr "" -#: config/i386/i386.c:1398 +#: config/mmix/mmix.c:2130 #, gcc-internal-format -msgid "-malign-functions is obsolete, use -falign-functions" +msgid "stack frame not a multiple of octabyte: %wd" msgstr "" -#: config/i386/i386.c:1436 +#: config/mmix/mmix.c:2470 config/mmix/mmix.c:2534 #, gcc-internal-format -msgid "-mpreferred-stack-boundary=%d is not between %d and 12" +msgid "MMIX Internal: %s is not a shiftable int" msgstr "" -#: config/i386/i386.c:1448 +#: config/ms1/ms1.c:315 #, gcc-internal-format -msgid "-mbranch-cost=%d is not between 0 and 5" +msgid "info pointer NULL" msgstr "" -#: config/i386/i386.c:1460 +#: config/pa/pa.c:459 #, gcc-internal-format -msgid "bad value (%s) for -mtls-dialect= switch" +msgid "PIC code generation is not supported in the portable runtime model" msgstr "" -#: config/i386/i386.c:1507 +#: config/pa/pa.c:464 #, gcc-internal-format -msgid "-malign-double makes no sense in the 64bit mode" +msgid "PIC code generation is not compatible with fast indirect calls" msgstr "" -#: config/i386/i386.c:1509 +#: config/pa/pa.c:469 #, gcc-internal-format -msgid "-mrtd calling convention not supported in the 64bit mode" +msgid "-g is only supported when using GAS on this processor," msgstr "" -#: config/i386/i386.c:1538 config/i386/i386.c:1549 +#: config/pa/pa.c:470 #, gcc-internal-format -msgid "SSE instruction set disabled, using 387 arithmetics" +msgid "-g option disabled" msgstr "" -#: config/i386/i386.c:1554 +#: config/pa/pa.c:7996 #, gcc-internal-format -msgid "387 instruction set disabled, using SSE arithmetics" +msgid "alignment (%u) for %s exceeds maximum alignment for global common data. Using %u" msgstr "" -#: config/i386/i386.c:1561 +#: config/pa/pa-hpux11.h:85 #, gcc-internal-format -msgid "bad value (%s) for -mfpmath= switch" +msgid "-munix=98 option required for C89 Amendment 1 features.\n" msgstr "" -#: config/i386/i386.c:1714 config/i386/i386.c:1725 +#: config/rs6000/host-darwin.c:52 #, gcc-internal-format -msgid "fastcall and stdcall attributes are not compatible" +msgid "Segmentation Fault (code)" msgstr "" -#: config/i386/i386.c:1718 config/i386/i386.c:1774 +#: config/rs6000/host-darwin.c:117 #, gcc-internal-format -msgid "fastcall and regparm attributes are not compatible" +msgid "Segmentation Fault" msgstr "" -#: config/i386/i386.c:1761 +#: config/rs6000/host-darwin.c:131 #, gcc-internal-format -msgid "%qs attribute requires an integer constant argument" +msgid "While setting up signal stack: %m" msgstr "" -#: config/i386/i386.c:1767 -#, fuzzy, gcc-internal-format -msgid "argument to %qs attribute larger than %d" -msgstr "памер \"%s\" больш чам %d байт" +#: config/rs6000/host-darwin.c:137 +#, gcc-internal-format +msgid "While setting up signal handler: %m" +msgstr "" -#: config/i386/i386.c:2565 +#. Handle the machine specific pragma longcall. Its syntax is +#. +#. # pragma longcall ( TOGGLE ) +#. +#. where TOGGLE is either 0 or 1. +#. +#. rs6000_default_long_calls is set to the value of TOGGLE, changing +#. whether or not new function declarations receive a longcall +#. attribute by default. +#: config/rs6000/rs6000-c.c:53 #, gcc-internal-format -msgid "SSE register return with SSE disabled" +msgid "ignoring malformed #pragma longcall" msgstr "" -#: config/i386/i386.c:2567 +#: config/rs6000/rs6000-c.c:66 +#, fuzzy, gcc-internal-format +msgid "missing open paren" +msgstr "Прапушчана назва" + +#: config/rs6000/rs6000-c.c:68 +#, fuzzy, gcc-internal-format +msgid "missing number" +msgstr "Прапушчана назва" + +#: config/rs6000/rs6000-c.c:70 +#, fuzzy, gcc-internal-format +msgid "missing close paren" +msgstr "Прапушчана назва класа" + +#: config/rs6000/rs6000-c.c:73 #, gcc-internal-format -msgid "SSE register argument with SSE disabled" +msgid "number must be 0 or 1" msgstr "" -#: config/i386/i386.c:2867 +#: config/rs6000/rs6000-c.c:76 #, gcc-internal-format -msgid "SSE vector argument without SSE enabled changes the ABI" +msgid "junk at end of #pragma longcall" msgstr "" -#: config/i386/i386.c:2884 +#: config/rs6000/rs6000-c.c:2530 #, gcc-internal-format -msgid "MMX vector argument without MMX enabled changes the ABI" +msgid "passing arg %d of %qE discards qualifiers frompointer target type" msgstr "" -#: config/i386/i386.c:3132 +#: config/rs6000/rs6000-c.c:2573 +#, fuzzy, gcc-internal-format +msgid "invalid parameter combination for AltiVec intrinsic" +msgstr "нявернае выкарыстанне \"restict\"" + +#: config/rs6000/rs6000.c:1250 #, gcc-internal-format -msgid "SSE vector return without SSE enabled changes the ABI" +msgid "-mmultiple is not supported on little endian systems" msgstr "" -#: config/i386/i386.c:6270 +#: config/rs6000/rs6000.c:1257 #, gcc-internal-format -msgid "extended registers have no high halves" +msgid "-mstring is not supported on little endian systems" msgstr "" -#: config/i386/i386.c:6285 +#: config/rs6000/rs6000.c:1271 #, gcc-internal-format -msgid "unsupported operand size for extended register" +msgid "unknown -mdebug-%s switch" msgstr "" -#: config/i386/i386.c:14232 +#: config/rs6000/rs6000.c:1283 #, gcc-internal-format -msgid "selector must be an integer constant in the range 0..%i" +msgid "unknown -mtraceback arg %qs; expecting %, % or %" msgstr "" -#: config/i386/i386.c:14570 +#: config/rs6000/rs6000.c:1324 #, gcc-internal-format -msgid "shift must be an immediate" +msgid "AltiVec and E500 instructions cannot coexist" msgstr "" -#: config/i386/i386.c:15744 -#, fuzzy, gcc-internal-format -msgid "%qs incompatible attribute ignored" -msgstr "\"%s\" атрыбут ігнарыруецца" - -#: config/i386/winnt.c:74 +#: config/rs6000/rs6000.c:1553 #, fuzzy, gcc-internal-format -msgid "%qs attribute only applies to variables" -msgstr "\"%s\" атрыбут ігнарыруецца" +msgid "unknown -m%s= option specified: '%s'" +msgstr "невядомы рэжым машыны \"%s\"" -#: config/i386/winnt.c:172 +#: config/rs6000/rs6000.c:1758 #, gcc-internal-format -msgid "%Jfunction '%D' is defined after prior declaration as dllimport: attribute ignored" +msgid "not configured for ABI: '%s'" msgstr "" -#: config/i386/winnt.c:183 +#: config/rs6000/rs6000.c:1768 #, gcc-internal-format -msgid "%Jinline function '%D' is declared as dllimport: attribute ignored." +msgid "Using darwin64 ABI" msgstr "" -#: config/i386/winnt.c:195 +#: config/rs6000/rs6000.c:1773 #, gcc-internal-format -msgid "%Jdefinition of static data member '%D' of dllimport'd class." +msgid "Using old darwin ABI" msgstr "" -#: config/i386/winnt.c:255 -#, gcc-internal-format -msgid "%Jinconsistent dll linkage for '%D', dllexport assumed." -msgstr "" +#: config/rs6000/rs6000.c:1778 +#, fuzzy, gcc-internal-format +msgid "unknown ABI specified: '%s'" +msgstr "невядомы рэжым машыны \"%s\"" -#: config/i386/winnt.c:299 config/sh/symbian.c:279 -#, gcc-internal-format -msgid "%qs declared as both exported to and imported from a DLL" -msgstr "" +#: config/rs6000/rs6000.c:1805 +#, fuzzy, gcc-internal-format +msgid "invalid option for -mfloat-gprs: '%s'" +msgstr "Нерэчаісны выбар \"%s\"" -#: config/i386/winnt.c:308 +#: config/rs6000/rs6000.c:1815 #, gcc-internal-format -msgid "%Jfailure in redeclaration of '%D': dllimport'd symbol lacks external linkage." +msgid "Unknown switch -mlong-double-%s" msgstr "" -#: config/i386/winnt.c:447 +#: config/rs6000/rs6000.c:1836 #, gcc-internal-format -msgid "%J'%D' defined locally after being referenced with dllimport linkage" +msgid "-malign-power is not supported for 64-bit Darwin; it is incompatible with the installed C and C++ libraries" msgstr "" -#: config/i386/winnt.c:450 +#: config/rs6000/rs6000.c:1844 +#, fuzzy, gcc-internal-format +msgid "unknown -malign-XXXXX option specified: '%s'" +msgstr "невядомы рэжым машыны \"%s\"" + +#: config/rs6000/rs6000.c:4201 #, gcc-internal-format -msgid "%J'%D' redeclared without dllimport attribute after being referenced with dllimport linkage" +msgid "GCC vector returned by reference: non-standard ABI extension with no compatibility guarantee" msgstr "" -#: config/i386/winnt.c:617 +#: config/rs6000/rs6000.c:4274 #, gcc-internal-format -msgid "%J'%D' causes a section type conflict" +msgid "cannot return value in vector register because altivec instructions are disabled, use -maltivec to enable them" msgstr "" -#: config/i386/cygming.h:185 +#: config/rs6000/rs6000.c:4520 #, gcc-internal-format -msgid "-f%s ignored for target (all code is position independent)" +msgid "cannot pass argument in vector register because altivec instructions are disabled, use -maltivec to enable them" msgstr "" -#: config/i386/djgpp.h:191 +#: config/rs6000/rs6000.c:5373 #, gcc-internal-format -msgid "-mbnu210 is ignored (option is obsolete)" +msgid "GCC vector passed by reference: non-standard ABI extension with no compatibility guarantee" msgstr "" -#: config/i386/i386-interix.h:257 +#: config/rs6000/rs6000.c:6542 #, fuzzy, gcc-internal-format -msgid "ms-bitfields not supported for objc" -msgstr "-pipe не падтрымліваецца" +msgid "argument 1 must be a 5-bit signed literal" +msgstr "першым аргументам \"%s\" павінен быць \"int\"" -#: config/ia64/ia64-c.c:52 -#, gcc-internal-format -msgid "malformed #pragma builtin" -msgstr "" +#: config/rs6000/rs6000.c:6645 config/rs6000/rs6000.c:7439 +#, fuzzy, gcc-internal-format +msgid "argument 2 must be a 5-bit unsigned literal" +msgstr "першым аргументам \"%s\" павінен быць \"int\"" -#: config/ia64/ia64.c:496 config/m32r/m32r.c:360 +#: config/rs6000/rs6000.c:6685 #, fuzzy, gcc-internal-format -msgid "invalid argument of %qs attribute" -msgstr "нявернае выкарыстанне \"restict\"" +msgid "argument 1 of __builtin_altivec_predicate must be a constant" +msgstr "аргумент `__builtin_args_info' павінен быць канстантай" -#: config/ia64/ia64.c:508 -#, gcc-internal-format -msgid "%Jan address area attribute cannot be specified for local variables" -msgstr "" +#: config/rs6000/rs6000.c:6738 +#, fuzzy, gcc-internal-format +msgid "argument 1 of __builtin_altivec_predicate is out of range" +msgstr "аргумент `__builtin_args_info' выйшаў за межы" -#: config/ia64/ia64.c:515 +#: config/rs6000/rs6000.c:6900 #, fuzzy, gcc-internal-format -msgid "%Jaddress area of '%s' conflicts with previous declaration" -msgstr "секцыя \"%s\" канфліктуе з папярэдняй дэкларацыяй" +msgid "argument 3 must be a 4-bit unsigned literal" +msgstr "першым аргументам \"%s\" павінен быць \"int\"" -#: config/ia64/ia64.c:522 +#: config/rs6000/rs6000.c:7072 #, fuzzy, gcc-internal-format -msgid "%Jaddress area attribute cannot be specified for functions" -msgstr "\"%s\" звычайна функцыя" +msgid "argument to %qs must be a 2-bit unsigned literal" +msgstr "першым аргументам \"%s\" павінен быць \"int\"" -#: config/ia64/ia64.c:4675 config/pa/pa.c:330 +#: config/rs6000/rs6000.c:7216 #, gcc-internal-format -msgid "value of -mfixed-range must have form REG1-REG2" +msgid "unresolved overload for Altivec builtin %qF" msgstr "" -#: config/ia64/ia64.c:4702 config/pa/pa.c:357 -#, gcc-internal-format -msgid "%s-%s is an empty range" -msgstr "" +#: config/rs6000/rs6000.c:7298 +#, fuzzy, gcc-internal-format +msgid "argument to dss must be a 2-bit unsigned literal" +msgstr "першым аргументам \"%s\" павінен быць \"int\"" -#: config/ia64/ia64.c:4753 -#, gcc-internal-format -msgid "cannot optimize floating point division for both latency and throughput" -msgstr "" +#: config/rs6000/rs6000.c:7559 +#, fuzzy, gcc-internal-format +msgid "argument 1 of __builtin_spe_predicate must be a constant" +msgstr "аргумент `__builtin_args_info' павінен быць канстантай" -#: config/ia64/ia64.c:4770 -#, gcc-internal-format -msgid "cannot optimize integer division for both latency and throughput" -msgstr "" +#: config/rs6000/rs6000.c:7631 +#, fuzzy, gcc-internal-format +msgid "argument 1 of __builtin_spe_predicate is out of range" +msgstr "аргумент `__builtin_args_info' выйшаў за межы" -#: config/ia64/ia64.c:4787 -#, gcc-internal-format -msgid "cannot optimize square root for both latency and throughput" -msgstr "" +#: config/rs6000/rs6000.c:13577 +#, fuzzy, gcc-internal-format +msgid "stack frame too large" +msgstr "%s - вельмі вялікі" -#: config/ia64/ia64.c:4801 +#: config/rs6000/rs6000.c:16137 #, gcc-internal-format -msgid "not yet implemented: latency-optimized inline square root" +msgid "no profiling of 64-bit code for this ABI" msgstr "" -#: config/ia64/ia64.c:4813 +#: config/rs6000/rs6000.c:17246 #, gcc-internal-format -msgid "bad value (%s) for -mtls-size= switch" +msgid "use of % in AltiVec types is invalid for 64-bit code" msgstr "" -#: config/ia64/ia64.c:4829 +#: config/rs6000/rs6000.c:17248 #, gcc-internal-format -msgid "bad value (%s) for -tune= switch" +msgid "use of % in AltiVec types is deprecated; use %" msgstr "" -#: config/iq2000/iq2000.c:1649 +#: config/rs6000/rs6000.c:17252 #, gcc-internal-format -msgid "bad value (%s) for -mcpu= switch" +msgid "use of % in AltiVec types is invalid" msgstr "" -#: config/iq2000/iq2000.c:1678 -#, fuzzy, gcc-internal-format -msgid "The compiler does not support -march=%s." -msgstr "%s не падтрымлівае %s" - -#: config/iq2000/iq2000.c:2065 +#: config/rs6000/rs6000.c:17254 #, gcc-internal-format -msgid "gp_offset (%ld) or end_offset (%ld) is less than zero." +msgid "use of % in AltiVec types is invalid" msgstr "" -#: config/iq2000/iq2000.c:2847 -#, fuzzy, gcc-internal-format -msgid "argument %qd is not a constant" -msgstr "аргумент `__builtin_args_info' павінен быць канстантай" - -#: config/iq2000/iq2000.c:3150 config/xtensa/xtensa.c:2033 +#: config/rs6000/rs6000.c:17256 #, gcc-internal-format -msgid "PRINT_OPERAND_ADDRESS, null pointer" +msgid "use of % in AltiVec types is invalid" msgstr "" -#: config/iq2000/iq2000.c:3305 +#: config/rs6000/rs6000.c:17258 #, gcc-internal-format -msgid "PRINT_OPERAND: Unknown punctuation '%c'" +msgid "use of boolean types in AltiVec types is invalid" msgstr "" -#: config/iq2000/iq2000.c:3314 config/mips/mips.c:4836 -#: config/xtensa/xtensa.c:1887 +#: config/rs6000/rs6000.c:17260 #, gcc-internal-format -msgid "PRINT_OPERAND null pointer" +msgid "use of % in AltiVec types is invalid" msgstr "" -#: config/m32r/m32r.c:178 +#: config/rs6000/aix43.h:39 config/rs6000/aix51.h:38 config/rs6000/aix52.h:38 #, gcc-internal-format -msgid "bad value (%s) for -mmodel switch" +msgid "-maix64 and POWER architecture are incompatible" msgstr "" -#: config/m32r/m32r.c:187 +#: config/rs6000/aix43.h:44 config/rs6000/aix51.h:43 config/rs6000/aix52.h:43 #, gcc-internal-format -msgid "bad value (%s) for -msdata switch" +msgid "-maix64 requires PowerPC64 architecture remain enabled" msgstr "" -#: config/m32r/m32r.c:194 +#: config/rs6000/aix43.h:48 config/rs6000/aix51.h:47 config/rs6000/aix52.h:47 #, gcc-internal-format -msgid "bad value (%s) for -flush-trap=n (0= and % attributes are not compatible, ignoring %" -msgstr "" +#. Darwin doesn't support -fpic. +#: config/rs6000/darwin.h:81 +#, fuzzy, gcc-internal-format +msgid "-fpic is not supported; -fPIC assumed" +msgstr "-pipe не падтрымліваецца" -#: config/m68hc11/m68hc11.c:1450 +#: config/rs6000/darwin.h:88 #, gcc-internal-format -msgid "% attribute is already used" +msgid "-m64 requires PowerPC64 architecture, enabling" msgstr "" -#: config/m68k/m68k.c:233 -#, gcc-internal-format -msgid "cannot specify both -msep-data and -mid-shared-library" -msgstr "" +#. See note below. +#. if (!rs6000_explicit_options.long_double) +#. rs6000_long_double_type_size = 128; +#: config/rs6000/eabispe.h:45 config/rs6000/linuxspe.h:62 +#, fuzzy, gcc-internal-format +msgid "-m64 not supported in this configuration" +msgstr "-pipe не падтрымліваецца" -#: config/m68k/m68k.c:245 +#: config/rs6000/linux64.h:109 #, gcc-internal-format -msgid "-fPIC is not currently supported on the 68000 or 68010\n" +msgid "-m64 requires a PowerPC64 cpu" msgstr "" -#: config/m68k/m68k.c:547 config/rs6000/rs6000.c:13736 +#. Definitions for __builtin_return_address and __builtin_frame_address. +#. __builtin_return_address (0) should give link register (65), enable +#. this. +#. This should be uncommented, so that the link register is used, but +#. currently this would result in unmatched insns and spilling fixed +#. registers so we'll leave it for another day. When these problems are +#. taken care of one additional fetch will be necessary in RETURN_ADDR_RTX. +#. (mrs) +#. #define RETURN_ADDR_IN_PREVIOUS_FRAME +#. Number of bytes into the frame return addresses can be found. See +#. rs6000_stack_info in rs6000.c for more information on how the different +#. abi's store the return address. +#: config/rs6000/rs6000.h:1590 #, gcc-internal-format -msgid "stack limit expression is not supported" +msgid "RETURN_ADDRESS_OFFSET not supported" msgstr "" -#: config/mcore/mcore.c:2992 -#, fuzzy, gcc-internal-format -msgid "invalid option %<-mstack-increment=%s%>" -msgstr "Нерэчаісны выбар \"%s\"" - -#: config/mips/mips.c:4026 +#. Sometimes certain combinations of command options do not make sense +#. on a particular target machine. You can define a macro +#. `OVERRIDE_OPTIONS' to take account of this. This macro, if +#. defined, is executed once just after all the command options have +#. been parsed. +#. +#. The macro SUBTARGET_OVERRIDE_OPTIONS is provided for subtargets, to +#. get control. +#: config/rs6000/sysv4.h:130 #, gcc-internal-format -msgid "bad value (%s) for -mabi= switch" +msgid "bad value for -mcall-%s" msgstr "" -#: config/mips/mips.c:4049 +#: config/rs6000/sysv4.h:146 #, gcc-internal-format -msgid "-mips%s conflicts with the other architecture options, which specify a MIPS%d processor" +msgid "bad value for -msdata=%s" msgstr "" -#: config/mips/mips.c:4068 +#: config/rs6000/sysv4.h:163 #, gcc-internal-format -msgid "-march=%s is not compatible with the selected ABI" +msgid "-mrelocatable and -msdata=%s are incompatible" msgstr "" -#: config/mips/mips.c:4083 +#: config/rs6000/sysv4.h:172 #, gcc-internal-format -msgid "-mgp64 used with a 32-bit processor" +msgid "-f%s and -msdata=%s are incompatible" msgstr "" -#: config/mips/mips.c:4085 +#: config/rs6000/sysv4.h:181 #, gcc-internal-format -msgid "-mgp32 used with a 64-bit ABI" +msgid "-msdata=%s and -mcall-%s are incompatible" msgstr "" -#: config/mips/mips.c:4087 +#: config/rs6000/sysv4.h:190 #, gcc-internal-format -msgid "-mgp64 used with a 32-bit ABI" +msgid "-mrelocatable and -mno-minimal-toc are incompatible" msgstr "" -#: config/mips/mips.c:4105 config/mips/mips.c:4107 config/mips/mips.c:4109 -#: config/mips/mips.c:4196 -#, fuzzy, gcc-internal-format -msgid "unsupported combination: %s" -msgstr "непадтрымліваемая версія" - -#: config/mips/mips.c:4137 +#: config/rs6000/sysv4.h:196 #, gcc-internal-format -msgid "-mint64 is a deprecated option" +msgid "-mrelocatable and -mcall-%s are incompatible" msgstr "" -#: config/mips/mips.c:4140 -#, fuzzy, gcc-internal-format -msgid "unrecognized option %<-mfix-vr4130%s%>" -msgstr "нераспазнаны выбар \"-%s\"" - -#: config/mips/mips.c:4191 +#: config/rs6000/sysv4.h:203 #, gcc-internal-format -msgid "generation of Branch Likely instructions enabled, but not supported by architecture" +msgid "-fPIC and -mcall-%s are incompatible" msgstr "" -#: config/mips/mips.c:4208 +#: config/rs6000/sysv4.h:210 #, gcc-internal-format -msgid "-G is incompatible with PIC code which is the default" +msgid "-mcall-aixdesc must be big endian" msgstr "" -#: config/mips/mips.c:4275 +#: config/rs6000/sysv4.h:215 #, gcc-internal-format -msgid "-mips3d requires -mpaired-single" +msgid "-msecure-plt not supported by your assembler" msgstr "" -#: config/mips/mips.c:4284 -#, gcc-internal-format -msgid "-mips3d/-mpaired-single must be used with -mfp64 -mhard-float" -msgstr "" +#: config/rs6000/sysv4.h:230 +#, fuzzy, gcc-internal-format +msgid "-m%s not supported in this configuration" +msgstr "-pipe не падтрымліваецца" -#: config/mips/mips.c:4289 +#: config/s390/s390.c:1319 #, gcc-internal-format -msgid "-mips3d/-mpaired-single must be used with -mips64" +msgid "stack guard value must be an exact power of 2" msgstr "" -#: config/mips/mips.c:4773 +#: config/s390/s390.c:1326 #, gcc-internal-format -msgid "internal error: %%) found without a %%( in assembler pattern" +msgid "stack size must be an exact power of 2" msgstr "" -#: config/mips/mips.c:4787 -#, gcc-internal-format -msgid "internal error: %%] found without a %%[ in assembler pattern" -msgstr "" +#: config/s390/s390.c:1371 +#, fuzzy, gcc-internal-format +msgid "z/Architecture mode not supported on %s" +msgstr "-pipe не падтрымліваецца" -#: config/mips/mips.c:4800 +#: config/s390/s390.c:1373 #, gcc-internal-format -msgid "internal error: %%> found without a %%< in assembler pattern" +msgid "64-bit ABI not supported in ESA/390 mode" msgstr "" -#: config/mips/mips.c:4813 +#: config/s390/s390.c:1384 #, gcc-internal-format -msgid "internal error: %%} found without a %%{ in assembler pattern" +msgid "-mbackchain -mpacked-stack -mhard-float are not supported in combination" msgstr "" -#: config/mips/mips.c:4827 +#: config/s390/s390.c:1390 #, gcc-internal-format -msgid "PRINT_OPERAND: unknown punctuation '%c'" +msgid "-mstack-size implies use of -mstack-guard" msgstr "" -#: config/mips/mips.c:7587 +#: config/s390/s390.c:1392 #, gcc-internal-format -msgid "cannot handle inconsistent calls to %qs" +msgid "stack size must be greater than the stack guard value" msgstr "" -#: config/mips/mips.c:8987 +#: config/s390/s390.c:1394 #, gcc-internal-format -msgid "the cpu name must be lower case" +msgid "stack size must not be greater than 64k" msgstr "" -#: config/mips/mips.c:9009 +#: config/s390/s390.c:1397 #, gcc-internal-format -msgid "bad value (%s) for %s" +msgid "-mstack-guard implies use of -mstack-size" msgstr "" -#. Output assembler code to FILE to increment profiler label # LABELNO -#. for profiling a function entry. -#: config/mips/mips.h:2334 +#: config/s390/s390.c:6253 #, gcc-internal-format -msgid "mips16 function profiling" +msgid "total size of local variables exceeds architecture limit" msgstr "" -#: config/mmix/mmix.c:229 -#, fuzzy, gcc-internal-format -msgid "-f%s not supported: ignored" -msgstr "-pipe не падтрымліваецца" - -#: config/mmix/mmix.c:657 +#: config/s390/s390.c:6840 #, fuzzy, gcc-internal-format -msgid "support for mode %qs" -msgstr "няма тыпа дадзеных для рэжыма \"%s\"" +msgid "frame size of %qs is " +msgstr "памер \"%s\" - %d байт" -#: config/mmix/mmix.c:671 +#: config/s390/s390.c:6840 #, gcc-internal-format -msgid "too large function value type, needs %d registers, have only %d registers for this" +msgid " bytes" msgstr "" -#: config/mmix/mmix.c:841 +#: config/s390/s390.c:6844 #, gcc-internal-format -msgid "function_profiler support for MMIX" +msgid "%qs uses dynamic stack allocation" msgstr "" -#: config/mmix/mmix.c:863 -#, gcc-internal-format -msgid "MMIX Internal: Last named vararg would not fit in a register" -msgstr "" +#: config/sh/sh.c:6486 +#, fuzzy, gcc-internal-format +msgid "__builtin_saveregs not supported by this subtarget" +msgstr "__buitin_saveregs не падтрымліваецца гэтай мэтай" -#: config/mmix/mmix.c:1479 config/mmix/mmix.c:1503 config/mmix/mmix.c:1619 +#: config/sh/sh.c:7535 #, gcc-internal-format -msgid "MMIX Internal: Bad register: %d" +msgid "attribute interrupt_handler is not compatible with -m5-compact" msgstr "" -#. Presumably there's a missing case above if we get here. -#: config/mmix/mmix.c:1611 -#, gcc-internal-format -msgid "MMIX Internal: Missing %qc case in mmix_print_operand" -msgstr "" +#. The sp_switch attribute only has meaning for interrupt functions. +#. The trap_exit attribute only has meaning for interrupt functions. +#: config/sh/sh.c:7557 config/sh/sh.c:7592 +#, fuzzy, gcc-internal-format +msgid "%qs attribute only applies to interrupt functions" +msgstr "\"%s\" звычайна функцыя" + +#. The argument must be a constant string. +#: config/sh/sh.c:7564 +#, fuzzy, gcc-internal-format +msgid "%qs attribute argument not a string constant" +msgstr "аргумент `__builtin_args_info' павінен быць канстантай" -#: config/mmix/mmix.c:1897 -#, gcc-internal-format -msgid "stack frame not a multiple of 8 bytes: %d" -msgstr "" +#. The argument must be a constant integer. +#: config/sh/sh.c:7599 +#, fuzzy, gcc-internal-format +msgid "%qs attribute argument not an integer constant" +msgstr "аргумент `__builtin_args_info' павінен быць канстантай" -#: config/mmix/mmix.c:2133 +#: config/sh/sh.c:9655 #, gcc-internal-format -msgid "stack frame not a multiple of octabyte: %d" +msgid "r0 needs to be available as a call-clobbered register" msgstr "" -#: config/mmix/mmix.c:2606 config/mmix/mmix.c:2670 +#: config/sh/sh.c:9676 #, gcc-internal-format -msgid "MMIX Internal: %s is not a shiftable int" +msgid "Need a second call-clobbered general purpose register" msgstr "" -#: config/pa/pa.c:418 +#: config/sh/sh.c:9684 #, gcc-internal-format -msgid "" -"unknown -mschedule= option (%s).\n" -"Valid options are 700, 7100, 7100LC, 7200, 7300, and 8000\n" +msgid "Need a call-clobbered target register" msgstr "" -#: config/pa/pa.c:443 +#: config/sh/symbian.c:147 #, gcc-internal-format -msgid "" -"unknown -march= option (%s).\n" -"Valid options are 1.0, 1.1, and 2.0\n" +msgid "function %q+D is defined after prior declaration as dllimport: attribute ignored" msgstr "" -#: config/pa/pa.c:463 +#: config/sh/symbian.c:159 #, gcc-internal-format -msgid "" -"unknown -munix= option (%s).\n" -"Valid options are 93, 95 and 98.\n" +msgid "inline function %q+D is declared as dllimport: attribute ignored" msgstr "" -#: config/pa/pa.c:468 +#: config/sh/symbian.c:280 #, gcc-internal-format -msgid "" -"unknown -munix= option (%s).\n" -"Valid options are 93 and 95.\n" +msgid "failure in redeclaration of %q+D: dllimport'd symbol lacks external linkage" msgstr "" -#: config/pa/pa.c:472 +#: config/sh/symbian.c:326 #, gcc-internal-format -msgid "" -"unknown -munix= option (%s).\n" -"Valid option is 93.\n" +msgid "%s %q+D %s after being referenced with dllimport linkage" msgstr "" -#: config/pa/pa.c:489 +#: config/sh/symbian.c:892 cp/tree.c:2334 #, gcc-internal-format -msgid "PIC code generation is not supported in the portable runtime model\n" +msgid "lang_* check: failed in %s, at %s:%d" msgstr "" -#: config/pa/pa.c:494 +#. FIXME +#: config/sh/netbsd-elf.h:95 #, gcc-internal-format -msgid "PIC code generation is not compatible with fast indirect calls\n" +msgid "unimplemented-shmedia profiling" msgstr "" -#: config/pa/pa.c:499 +#. There are no delay slots on SHmedia. +#. Relaxation isn't yet supported for SHmedia +#. After reload, if conversion does little good but can cause ICEs: - find_if_block doesn't do anything for SH because we don't have conditional execution patterns. (We use conditional move patterns, which are handled differently, and only before reload). - find_cond_trap doesn't do anything for the SH because we #. don't have conditional traps. - find_if_case_1 uses redirect_edge_and_branch_force in the only path that does an optimization, and this causes an ICE when branch targets are in registers. - find_if_case_2 doesn't do anything for the SHmedia after reload except when it can redirect a tablejump - and that's rather rare. +#. -fprofile-arcs needs a working libgcov . In unified tree configurations with newlib, this requires to configure with --with-newlib --with-headers. But there is no way to check here we have a working libgcov, so just assume that we have. +#: config/sh/sh.h:611 +#, fuzzy, gcc-internal-format +msgid "profiling is still experimental for this target" +msgstr "__buitin_saveregs не падтрымліваецца гэтай мэтай" + +#. Only the sh64-elf assembler fully supports .quad properly. +#. User supplied - leave it alone. +#. The debugging information is sufficient, but gdb doesn't implement this yet +#. Never run scheduling before reload, since that can break global alloc, and generates slower code anyway due to the pressure on R0. +#. Enable sched1 for SH4; ready queue will be reordered by the target hooks when pressure is high. We can not do this for SH3 and lower as they give spill failures for R0. +#. ??? Current exception handling places basic block boundaries after call_insns. It causes the high pressure on R0 and gives spill failures for R0 in reload. See PR 22553 and the thread on gcc-patches . +#: config/sh/sh.h:676 #, gcc-internal-format -msgid "-g is only supported when using GAS on this processor," +msgid "ignoring -fschedule-insns because of exception handling bug" msgstr "" -#: config/pa/pa.c:500 +#: config/sparc/sparc.c:635 #, gcc-internal-format -msgid "-g option disabled" +msgid "%s is not supported by this configuration" msgstr "" -#: config/pa/pa.c:8348 +#: config/sparc/sparc.c:642 #, gcc-internal-format -msgid "alignment (%u) for %s exceeds maximum alignment for global common data. Using %u" +msgid "-mlong-double-64 not allowed with -m64" msgstr "" -#: config/pa/pa-hpux11.h:85 +#: config/sparc/sparc.c:667 #, gcc-internal-format -msgid "-munix=98 option required for C89 Amendment 1 features.\n" +msgid "-mcmodel= is not supported on 32 bit systems" msgstr "" -#: config/rs6000/host-darwin.c:52 +#: config/stormy16/stormy16.c:497 #, gcc-internal-format -msgid "Segmentation Fault (code)" +msgid "constant halfword load operand out of range" msgstr "" -#: config/rs6000/host-darwin.c:117 +#: config/stormy16/stormy16.c:507 #, gcc-internal-format -msgid "Segmentation Fault" +msgid "constant arithmetic operand out of range" msgstr "" -#: config/rs6000/host-darwin.c:131 +#: config/stormy16/stormy16.c:1108 #, gcc-internal-format -msgid "While setting up signal stack: %m" +msgid "local variable memory requirements exceed capacity" msgstr "" -#: config/rs6000/host-darwin.c:137 +#: config/stormy16/stormy16.c:1274 #, gcc-internal-format -msgid "While setting up signal handler: %m" +msgid "function_profiler support" msgstr "" -#: config/rs6000/host-darwin.c:181 +#: config/stormy16/stormy16.c:1363 #, gcc-internal-format -msgid "couldn't unmap pch_address_space: %m\n" +msgid "cannot use va_start in interrupt function" msgstr "" -#. Handle the machine specific pragma longcall. Its syntax is -#. -#. # pragma longcall ( TOGGLE ) -#. -#. where TOGGLE is either 0 or 1. -#. -#. rs6000_default_long_calls is set to the value of TOGGLE, changing -#. whether or not new function declarations receive a longcall -#. attribute by default. -#: config/rs6000/rs6000-c.c:46 +#: config/stormy16/stormy16.c:1895 #, gcc-internal-format -msgid "ignoring malformed #pragma longcall" +msgid "switch statement of size %lu entries too large" msgstr "" -#: config/rs6000/rs6000-c.c:59 -#, fuzzy, gcc-internal-format -msgid "missing open paren" -msgstr "Прапушчана назва" - -#: config/rs6000/rs6000-c.c:61 -#, fuzzy, gcc-internal-format -msgid "missing number" -msgstr "Прапушчана назва" - -#: config/rs6000/rs6000-c.c:63 +#: config/stormy16/stormy16.c:2263 #, fuzzy, gcc-internal-format -msgid "missing close paren" -msgstr "Прапушчана назва класа" +msgid "%<__BELOW100__%> attribute only applies to variables" +msgstr "\"%s\" атрыбут ігнарыруецца" -#: config/rs6000/rs6000-c.c:66 +#: config/stormy16/stormy16.c:2270 #, gcc-internal-format -msgid "number must be 0 or 1" +msgid "__BELOW100__ attribute not allowed with auto storage class" msgstr "" -#: config/rs6000/rs6000-c.c:69 +#: config/v850/v850-c.c:67 #, gcc-internal-format -msgid "junk at end of #pragma longcall" +msgid "#pragma GHS endXXXX found without previous startXXX" msgstr "" -#: config/rs6000/rs6000.c:1263 +#: config/v850/v850-c.c:70 #, gcc-internal-format -msgid "-mmultiple is not supported on little endian systems" +msgid "#pragma GHS endXXX does not match previous startXXX" msgstr "" -#: config/rs6000/rs6000.c:1270 +#: config/v850/v850-c.c:96 #, gcc-internal-format -msgid "-mstring is not supported on little endian systems" +msgid "cannot set interrupt attribute: no current function" msgstr "" -#: config/rs6000/rs6000.c:1284 +#: config/v850/v850-c.c:104 #, gcc-internal-format -msgid "unknown -mdebug-%s switch" +msgid "cannot set interrupt attribute: no such identifier" msgstr "" -#: config/rs6000/rs6000.c:1296 +#: config/v850/v850-c.c:149 #, gcc-internal-format -msgid "unknown -mtraceback arg %qs; expecting %, % or %" +msgid "junk at end of #pragma ghs section" msgstr "" -#: config/rs6000/rs6000.c:1307 +#: config/v850/v850-c.c:166 #, gcc-internal-format -msgid "Unknown switch -mlong-double-%s" -msgstr "" +msgid "unrecognized section name \"%s\"" +msgstr "нераспазнаная назва сэкцыі \"%s\"" -#: config/rs6000/rs6000.c:1363 +#: config/v850/v850-c.c:181 #, gcc-internal-format -msgid "AltiVec and E500 instructions cannot coexist" +msgid "malformed #pragma ghs section" msgstr "" -#: config/rs6000/rs6000.c:1631 -#, fuzzy, gcc-internal-format -msgid "unknown -m%s= option specified: '%s'" -msgstr "невядомы рэжым машыны \"%s\"" - -#: config/rs6000/rs6000.c:1652 +#: config/v850/v850-c.c:200 #, gcc-internal-format -msgid "not configured for ABI: '%s'" +msgid "junk at end of #pragma ghs interrupt" msgstr "" -#: config/rs6000/rs6000.c:1660 +#: config/v850/v850-c.c:211 #, gcc-internal-format -msgid "Using darwin64 ABI" +msgid "junk at end of #pragma ghs starttda" msgstr "" -#: config/rs6000/rs6000.c:1665 +#: config/v850/v850-c.c:222 #, gcc-internal-format -msgid "Using old darwin ABI" +msgid "junk at end of #pragma ghs startsda" msgstr "" -#: config/rs6000/rs6000.c:1671 -#, fuzzy, gcc-internal-format -msgid "unknown ABI specified: '%s'" -msgstr "невядомы рэжым машыны \"%s\"" - -#: config/rs6000/rs6000.c:1688 -#, fuzzy, gcc-internal-format -msgid "invalid option for -mfloat-gprs" -msgstr "Нерэчаісны выбар \"%s\"" - -#: config/rs6000/rs6000.c:1704 +#: config/v850/v850-c.c:233 #, gcc-internal-format -msgid "-malign-power is not supported for 64-bit Darwin; it is incompatible with the installed C and C++ libraries" +msgid "junk at end of #pragma ghs startzda" msgstr "" -#: config/rs6000/rs6000.c:1711 -#, fuzzy, gcc-internal-format -msgid "unknown -malign-XXXXX option specified: '%s'" -msgstr "невядомы рэжым машыны \"%s\"" - -#: config/rs6000/rs6000.c:4789 +#: config/v850/v850-c.c:244 #, gcc-internal-format -msgid "GCC vector returned by reference: non-standard ABI extension with no compatibility guarantee" +msgid "junk at end of #pragma ghs endtda" msgstr "" -#: config/rs6000/rs6000.c:4862 +#: config/v850/v850-c.c:255 #, gcc-internal-format -msgid "Cannot return value in vector register because altivec instructions are disabled, use -maltivec to enable them." +msgid "junk at end of #pragma ghs endsda" msgstr "" -#: config/rs6000/rs6000.c:5094 +#: config/v850/v850-c.c:266 #, gcc-internal-format -msgid "Cannot pass argument in vector register because altivec instructions are disabled, use -maltivec to enable them." +msgid "junk at end of #pragma ghs endzda" msgstr "" -#: config/rs6000/rs6000.c:5957 +#: config/v850/v850.c:172 #, gcc-internal-format -msgid "GCC vector passed by reference: non-standard ABI extension with no compatibility guarantee" +msgid "value passed to %<-m%s%> is too large" msgstr "" -#: config/rs6000/rs6000.c:6852 -#, fuzzy, gcc-internal-format -msgid "argument 1 must be a 5-bit signed literal" -msgstr "першым аргументам \"%s\" павінен быць \"int\"" - -#: config/rs6000/rs6000.c:6955 config/rs6000/rs6000.c:7625 -#, fuzzy, gcc-internal-format -msgid "argument 2 must be a 5-bit unsigned literal" -msgstr "першым аргументам \"%s\" павінен быць \"int\"" - -#: config/rs6000/rs6000.c:6995 -#, fuzzy, gcc-internal-format -msgid "argument 1 of __builtin_altivec_predicate must be a constant" -msgstr "аргумент `__builtin_args_info' павінен быць канстантай" - -#: config/rs6000/rs6000.c:7049 -#, fuzzy, gcc-internal-format -msgid "argument 1 of __builtin_altivec_predicate is out of range" -msgstr "аргумент `__builtin_args_info' выйшаў за межы" - -#: config/rs6000/rs6000.c:7211 -#, fuzzy, gcc-internal-format -msgid "argument 3 must be a 4-bit unsigned literal" -msgstr "першым аргументам \"%s\" павінен быць \"int\"" - -#: config/rs6000/rs6000.c:7383 -#, fuzzy, gcc-internal-format -msgid "argument to %qs must be a 2-bit unsigned literal" -msgstr "першым аргументам \"%s\" павінен быць \"int\"" - -#: config/rs6000/rs6000.c:7496 -#, fuzzy, gcc-internal-format -msgid "argument to dss must be a 2-bit unsigned literal" -msgstr "першым аргументам \"%s\" павінен быць \"int\"" - -#: config/rs6000/rs6000.c:7511 +#: config/v850/v850.c:2147 #, gcc-internal-format -msgid "invalid parameter combination for %qs AltiVec intrinsic" +msgid "%Jdata area attributes cannot be specified for local variables" msgstr "" -#: config/rs6000/rs6000.c:7745 -#, fuzzy, gcc-internal-format -msgid "argument 1 of __builtin_spe_predicate must be a constant" -msgstr "аргумент `__builtin_args_info' павінен быць канстантай" - -#: config/rs6000/rs6000.c:7818 -#, fuzzy, gcc-internal-format -msgid "argument 1 of __builtin_spe_predicate is out of range" -msgstr "аргумент `__builtin_args_info' выйшаў за межы" - -#: config/rs6000/rs6000.c:13699 +#: config/v850/v850.c:2158 #, fuzzy, gcc-internal-format -msgid "stack frame too large" -msgstr "%s - вельмі вялікі" - -#: config/rs6000/rs6000.c:16217 -#, gcc-internal-format -msgid "no profiling of 64-bit code for this ABI" -msgstr "" - -#: config/rs6000/rs6000.c:17307 -#, gcc-internal-format -msgid "use of % in AltiVec types is invalid for 64-bit code" -msgstr "" +msgid "data area of %q+D conflicts with previous declaration" +msgstr "секцыя \"%s\" канфліктуе з папярэдняй дэкларацыяй" -#: config/rs6000/rs6000.c:17309 +#: config/v850/v850.c:2288 #, gcc-internal-format -msgid "use of % in AltiVec types is deprecated; use %" +msgid "bogus JR construction: %d" msgstr "" -#: config/rs6000/rs6000.c:17313 +#: config/v850/v850.c:2306 config/v850/v850.c:2415 #, gcc-internal-format -msgid "use of % in AltiVec types is invalid" +msgid "bad amount of stack space removal: %d" msgstr "" -#: config/rs6000/rs6000.c:17315 +#: config/v850/v850.c:2395 #, gcc-internal-format -msgid "use of % in AltiVec types is invalid" +msgid "bogus JARL construction: %d\n" msgstr "" -#: config/rs6000/rs6000.c:17317 +#: config/v850/v850.c:2694 #, gcc-internal-format -msgid "use of % in AltiVec types is invalid" +msgid "bogus DISPOSE construction: %d" msgstr "" -#: config/rs6000/rs6000.c:17319 +#: config/v850/v850.c:2713 #, gcc-internal-format -msgid "use of boolean types in AltiVec types is invalid" +msgid "too much stack space to dispose of: %d" msgstr "" -#: config/rs6000/rs6000.c:17321 +#: config/v850/v850.c:2815 #, gcc-internal-format -msgid "use of % in AltiVec types is invalid" +msgid "bogus PREPEARE construction: %d" msgstr "" -#: config/rs6000/aix43.h:49 config/rs6000/aix51.h:48 config/rs6000/aix52.h:48 +#: config/v850/v850.c:2834 #, gcc-internal-format -msgid "-maix64 and POWER architecture are incompatible" +msgid "too much stack space to prepare: %d" msgstr "" -#: config/rs6000/aix43.h:54 config/rs6000/aix51.h:53 config/rs6000/aix52.h:53 +#: config/xtensa/xtensa.c:1505 #, gcc-internal-format -msgid "-maix64 requires PowerPC64 architecture remain enabled" +msgid "boolean registers required for the floating-point option" msgstr "" -#: config/rs6000/aix43.h:58 config/rs6000/aix51.h:57 config/rs6000/aix52.h:57 -#, gcc-internal-format -msgid "-maix64 required: 64-bit computation with 32-bit addressing not yet supported" -msgstr "" +#: config/xtensa/xtensa.c:1551 +#, fuzzy, gcc-internal-format +msgid "-f%s is not supported with CONST16 instructions" +msgstr "ISO C не падтрымлівае комлексныя цэлалікавыя тыпы" -#. The Darwin ABI always includes AltiVec, can't be (validly) turned -#. off. -#: config/rs6000/darwin.h:89 +#: config/xtensa/xtensa.c:1556 #, gcc-internal-format -msgid "-mdynamic-no-pic overrides -fpic or -fPIC" +msgid "PIC is required but not supported with CONST16 instructions" msgstr "" -#. Darwin doesn't support -fpic. -#: config/rs6000/darwin.h:95 -#, fuzzy, gcc-internal-format -msgid "-fpic is not supported; -fPIC assumed" -msgstr "-pipe не падтрымліваецца" - -#: config/rs6000/darwin.h:113 +#: config/xtensa/xtensa.c:2414 #, gcc-internal-format -msgid "-m64 requires PowerPC64 architecture, enabling" +msgid "only uninitialized variables can be placed in a .bss section" msgstr "" -#. See note below. -#. if (rs6000_long_double_size_string == NULL) -#. rs6000_long_double_type_size = 128; -#: config/rs6000/eabispe.h:45 config/rs6000/linuxspe.h:62 +#: ada/misc.c:262 #, fuzzy, gcc-internal-format -msgid "-m64 not supported in this configuration" -msgstr "-pipe не падтрымліваецца" +msgid "missing argument to \"-%s\"" +msgstr "аргумент для \"%s\" прапушчан" -#: config/rs6000/linux64.h:109 +#: ada/misc.c:303 #, gcc-internal-format -msgid "-m64 requires a PowerPC64 cpu" +msgid "%<-gnat%> misspelled as %<-gant%>" msgstr "" -#. Definitions for __builtin_return_address and __builtin_frame_address. -#. __builtin_return_address (0) should give link register (65), enable -#. this. -#. This should be uncommented, so that the link register is used, but -#. currently this would result in unmatched insns and spilling fixed -#. registers so we'll leave it for another day. When these problems are -#. taken care of one additional fetch will be necessary in RETURN_ADDR_RTX. -#. (mrs) -#. #define RETURN_ADDR_IN_PREVIOUS_FRAME -#. Number of bytes into the frame return addresses can be found. See -#. rs6000_stack_info in rs6000.c for more information on how the different -#. abi's store the return address. -#: config/rs6000/rs6000.h:1833 +#: cp/call.c:289 #, gcc-internal-format -msgid "RETURN_ADDRESS_OFFSET not supported" +msgid "unable to call pointer to member function here" msgstr "" -#. Sometimes certain combinations of command options do not make sense -#. on a particular target machine. You can define a macro -#. `OVERRIDE_OPTIONS' to take account of this. This macro, if -#. defined, is executed once just after all the command options have -#. been parsed. -#. -#. The macro SUBTARGET_OVERRIDE_OPTIONS is provided for subtargets, to -#. get control. -#: config/rs6000/sysv4.h:219 +#: cp/call.c:2392 #, gcc-internal-format -msgid "bad value for -mcall-%s" +msgid "%s %D(%T, %T, %T) " msgstr "" -#: config/rs6000/sysv4.h:235 +#: cp/call.c:2397 #, gcc-internal-format -msgid "bad value for -msdata=%s" +msgid "%s %D(%T, %T) " msgstr "" -#: config/rs6000/sysv4.h:252 +#: cp/call.c:2401 #, gcc-internal-format -msgid "-mrelocatable and -msdata=%s are incompatible" +msgid "%s %D(%T) " msgstr "" -#: config/rs6000/sysv4.h:261 +#: cp/call.c:2405 #, gcc-internal-format -msgid "-f%s and -msdata=%s are incompatible" +msgid "%s %T " msgstr "" -#: config/rs6000/sysv4.h:270 +#: cp/call.c:2407 #, gcc-internal-format -msgid "-msdata=%s and -mcall-%s are incompatible" +msgid "%s %+#D " msgstr "" -#: config/rs6000/sysv4.h:279 +#: cp/call.c:2409 cp/pt.c:1324 #, gcc-internal-format -msgid "-mrelocatable and -mno-minimal-toc are incompatible" +msgid "%s %+#D" msgstr "" -#: config/rs6000/sysv4.h:285 -#, gcc-internal-format -msgid "-mrelocatable and -mcall-%s are incompatible" -msgstr "" +#: cp/call.c:2631 +#, fuzzy, gcc-internal-format +msgid "conversion from %qT to %qT is ambiguous" +msgstr "пераўтварэньне з `%T' у `%T'" -#: config/rs6000/sysv4.h:292 +#: cp/call.c:2782 cp/call.c:2800 cp/call.c:2858 #, gcc-internal-format -msgid "-fPIC and -mcall-%s are incompatible" +msgid "no matching function for call to %<%D(%A)%>" msgstr "" -#: config/rs6000/sysv4.h:299 +#: cp/call.c:2803 cp/call.c:2861 #, gcc-internal-format -msgid "-mcall-aixdesc must be big endian" +msgid "call of overloaded %<%D(%A)%> is ambiguous" msgstr "" -#: config/rs6000/sysv4.h:314 -#, fuzzy, gcc-internal-format -msgid "-m%s not supported in this configuration" -msgstr "-pipe не падтрымліваецца" - -#: config/s390/s390.c:1406 +#. It's no good looking for an overloaded operator() on a +#. pointer-to-member-function. +#: cp/call.c:2929 #, gcc-internal-format -msgid "Unknown cpu used in -march=%s." +msgid "pointer-to-member function %E cannot be called without an object; consider using .* or ->*" msgstr "" -#: config/s390/s390.c:1425 +#: cp/call.c:3003 #, gcc-internal-format -msgid "Unknown cpu used in -mtune=%s." +msgid "no match for call to %<(%T) (%A)%>" msgstr "" -#: config/s390/s390.c:1430 +#: cp/call.c:3012 #, fuzzy, gcc-internal-format -msgid "z/Architecture mode not supported on %s." -msgstr "-pipe не падтрымліваецца" +msgid "call of %<(%T) (%A)%> is ambiguous" +msgstr "памер \"%s\" - %d байт" -#: config/s390/s390.c:1432 +#: cp/call.c:3050 #, gcc-internal-format -msgid "64-bit ABI not supported in ESA/390 mode." +msgid "%s for ternary % in %<%E ? %E : %E%>" msgstr "" -#: config/s390/s390.c:1443 +#: cp/call.c:3056 #, gcc-internal-format -msgid "-mbackchain -mpacked-stack -mhard-float are not supported in combination." +msgid "%s for % in %<%E%s%>" msgstr "" -#: config/s390/s390.c:1450 +#: cp/call.c:3060 #, gcc-internal-format -msgid "invalid value for -mwarn-framesize" -msgstr "" - -#: config/s390/s390.c:1460 -#, fuzzy, gcc-internal-format -msgid "invalid value for -mstack-size" -msgstr "нявернае выкарыстанне \"restict\"" +msgid "%s for % in %<%E[%E]%>" +msgstr "" -#: config/s390/s390.c:1463 +#: cp/call.c:3065 #, gcc-internal-format -msgid "stack size must be an exact power of 2" +msgid "%s for %qs in %<%s %E%>" msgstr "" -#: config/s390/s390.c:1469 +#: cp/call.c:3070 #, gcc-internal-format -msgid "invalid value for -mstack-guard" +msgid "%s for % in %<%E %s %E%>" msgstr "" -#: config/s390/s390.c:1472 +#: cp/call.c:3073 #, gcc-internal-format -msgid "stack size must be greater than the stack guard value" +msgid "%s for % in %<%s%E%>" msgstr "" -#: config/s390/s390.c:1475 +#: cp/call.c:3165 #, gcc-internal-format -msgid "stack guard value must be an exact power of 2" +msgid "ISO C++ forbids omitting the middle term of a ?: expression" msgstr "" -#: config/s390/s390.c:1478 +#: cp/call.c:3242 #, gcc-internal-format -msgid "-mstack-size implies use of -mstack-guard" +msgid "%qE has type % and is not a throw-expression" msgstr "" -#: config/s390/s390.c:1482 +#: cp/call.c:3281 cp/call.c:3491 #, gcc-internal-format -msgid "-mstack-guard implies use of -mstack-size" +msgid "operands to ?: have different types" msgstr "" -#: config/s390/s390.c:6542 +#: cp/call.c:3445 #, gcc-internal-format -msgid "Total size of local variables exceeds architecture limit." +msgid "enumeral mismatch in conditional expression: %qT vs %qT" msgstr "" -#: config/s390/s390.c:7078 -#, fuzzy, gcc-internal-format -msgid "frame size of %qs is " -msgstr "памер \"%s\" - %d байт" - -#: config/s390/s390.c:7078 +#: cp/call.c:3452 #, gcc-internal-format -msgid " bytes" +msgid "enumeral and non-enumeral type in conditional expression" msgstr "" -#: config/s390/s390.c:7082 +#: cp/call.c:3746 #, gcc-internal-format -msgid "%qs uses dynamic stack allocation" +msgid "no %<%D(int)%> declared for postfix %qs, trying prefix operator instead" msgstr "" -#: config/sh/sh.c:6201 -#, fuzzy, gcc-internal-format -msgid "__builtin_saveregs not supported by this subtarget" -msgstr "__buitin_saveregs не падтрымліваецца гэтай мэтай" - -#: config/sh/sh.c:7194 +#: cp/call.c:3819 #, gcc-internal-format -msgid "attribute interrupt_handler is not compatible with -m5-compact" +msgid "comparison between %q#T and %q#T" msgstr "" -#. The sp_switch attribute only has meaning for interrupt functions. -#. The trap_exit attribute only has meaning for interrupt functions. -#: config/sh/sh.c:7216 config/sh/sh.c:7251 -#, fuzzy, gcc-internal-format -msgid "%qs attribute only applies to interrupt functions" -msgstr "\"%s\" звычайна функцыя" - -#. The argument must be a constant string. -#: config/sh/sh.c:7223 -#, fuzzy, gcc-internal-format -msgid "%qs attribute argument not a string constant" -msgstr "аргумент `__builtin_args_info' павінен быць канстантай" - -#. The argument must be a constant integer. -#: config/sh/sh.c:7258 +#: cp/call.c:4078 #, fuzzy, gcc-internal-format -msgid "%qs attribute argument not an integer constant" -msgstr "аргумент `__builtin_args_info' павінен быць канстантай" +msgid "no suitable % for %qT" +msgstr "немагчымы апэратар '%s'" -#: config/sh/symbian.c:147 +#: cp/call.c:4095 #, gcc-internal-format -msgid "%H function '%D' is defined after prior declaration as dllimport: attribute ignored" +msgid "%q+#D is private" msgstr "" -#: config/sh/symbian.c:158 +#: cp/call.c:4097 #, gcc-internal-format -msgid "%Hinline function '%D' is declared as dllimport: attribute ignored." +msgid "%q+#D is protected" msgstr "" -#: config/sh/symbian.c:171 +#: cp/call.c:4099 #, gcc-internal-format -msgid "%Hdefinition of static data member '%D' of dllimport'd class." +msgid "%q+#D is inaccessible" msgstr "" -#: config/sh/symbian.c:286 +#: cp/call.c:4100 #, gcc-internal-format -msgid "%Hfailure in redeclaration of '%D': dllimport'd symbol lacks external linkage." +msgid "within this context" msgstr "" -#: config/sh/symbian.c:332 +#: cp/call.c:4189 cp/cvt.c:264 +#, fuzzy, gcc-internal-format +msgid "invalid conversion from %qT to %qT" +msgstr "пераўтварэньне з `%T' у `%T'" + +#: cp/call.c:4191 #, gcc-internal-format -msgid "%H%s '%D' %s after being referenced with dllimport linkage." +msgid " initializing argument %P of %qD" msgstr "" -#: config/sh/symbian.c:436 +#: cp/call.c:4203 #, gcc-internal-format -msgid "%Hvariable %qD definition is marked dllimport." +msgid "passing NULL to non-pointer argument %P of %qD" msgstr "" -#: config/sh/symbian.c:511 +#: cp/call.c:4206 #, gcc-internal-format -msgid "%Hexternal linkage required for symbol '%D' because of '%s' attribute." +msgid "converting to non-pointer type %qT from NULL" msgstr "" -#: config/sh/symbian.c:892 cp/tree.c:2277 +#: cp/call.c:4214 #, gcc-internal-format -msgid "lang_* check: failed in %s, at %s:%d" +msgid "passing %qT for argument %P to %qD" msgstr "" -#. There are no delay slots on SHmedia. -#. Relaxation isn't yet supported for SHmedia -#. -fprofile-arcs needs a working libgcov . In unified tree configurations with newlib, this requires to configure with --with-newlib --with-headers. But there is no way to check here we have a working libgcov, so just assume that we have. -#: config/sh/sh.h:754 +#: cp/call.c:4217 #, fuzzy, gcc-internal-format -msgid "Profiling is not supported on this target." -msgstr "__buitin_saveregs не падтрымліваецца гэтай мэтай" +msgid "converting to %qT from %qT" +msgstr "пераўтварэньне з `%T' у `%T'" + +#: cp/call.c:4356 +#, fuzzy, gcc-internal-format +msgid "cannot bind bitfield %qE to %qT" +msgstr "не магу ініцыялізаваць сяброўскую функцыю \"%s\"" -#: config/sparc/sparc.c:589 +#: cp/call.c:4359 cp/call.c:4375 #, gcc-internal-format -msgid "%s is not supported by this configuration" +msgid "cannot bind packed field %qE to %qT" msgstr "" -#: config/sparc/sparc.c:596 +#: cp/call.c:4362 +#, fuzzy, gcc-internal-format +msgid "cannot bind rvalue %qE to %qT" +msgstr "не магу ініцыялізаваць сяброўскую функцыю \"%s\"" + +#: cp/call.c:4476 #, gcc-internal-format -msgid "-mlong-double-64 not allowed with -m64" +msgid "cannot pass objects of non-POD type %q#T through %<...%>; call will abort at runtime" msgstr "" -#: config/sparc/sparc.c:621 +#. Undefined behavior [expr.call] 5.2.2/7. +#: cp/call.c:4502 #, gcc-internal-format -msgid "-mcmodel= is not supported on 32 bit systems" +msgid "cannot receive objects of non-POD type %q#T through %<...%>; call will abort at runtime" msgstr "" -#: config/stormy16/stormy16.c:528 +#: cp/call.c:4545 #, gcc-internal-format -msgid "Constant halfword load operand out of range." +msgid "the default argument for parameter %d of %qD has not yet been parsed" msgstr "" -#: config/stormy16/stormy16.c:538 +#: cp/call.c:4624 #, gcc-internal-format -msgid "Constant arithmetic operand out of range." +msgid "argument of function call might be a candidate for a format attribute" msgstr "" -#: config/stormy16/stormy16.c:1224 +#: cp/call.c:4761 #, gcc-internal-format -msgid "Local variable memory requirements exceed capacity." +msgid "passing %qT as % argument of %q#D discards qualifiers" msgstr "" -#: config/stormy16/stormy16.c:1390 +#: cp/call.c:4780 #, gcc-internal-format -msgid "function_profiler support" +msgid "%qT is not an accessible base of %qT" msgstr "" -#: config/stormy16/stormy16.c:1479 +#: cp/call.c:5030 #, gcc-internal-format -msgid "cannot use va_start in interrupt function" +msgid "could not find class$ field in java interface type %qT" msgstr "" -#: config/stormy16/stormy16.c:2052 +#: cp/call.c:5267 #, gcc-internal-format -msgid "switch statement of size %lu entries too large" +msgid "call to non-function %qD" msgstr "" -#: config/stormy16/stormy16.c:2434 -#, fuzzy, gcc-internal-format -msgid "%<__BELOW100__%> attribute only applies to variables" -msgstr "\"%s\" атрыбут ігнарыруецца" - -#: config/stormy16/stormy16.c:2441 +#: cp/call.c:5389 #, gcc-internal-format -msgid "__BELOW100__ attribute not allowed with auto storage class." +msgid "no matching function for call to %<%T::%s(%A)%#V%>" msgstr "" -#: config/v850/v850-c.c:67 +#: cp/call.c:5407 #, gcc-internal-format -msgid "#pragma GHS endXXXX found without previous startXXX" +msgid "call of overloaded %<%s(%A)%> is ambiguous" msgstr "" -#: config/v850/v850-c.c:69 +#: cp/call.c:5431 #, gcc-internal-format -msgid "#pragma GHS endXXX does not match previous startXXX" +msgid "cannot call member function %qD without object" msgstr "" -#: config/v850/v850-c.c:94 +#: cp/call.c:6036 #, gcc-internal-format -msgid "cannot set interrupt attribute: no current function" +msgid "passing %qT chooses %qT over %qT" msgstr "" -#: config/v850/v850-c.c:102 +#: cp/call.c:6038 cp/name-lookup.c:4228 #, gcc-internal-format -msgid "cannot set interrupt attribute: no such identifier" +msgid " in call to %qD" msgstr "" -#: config/v850/v850-c.c:147 +#: cp/call.c:6095 #, gcc-internal-format -msgid "junk at end of #pragma ghs section" +msgid "choosing %qD over %qD" msgstr "" -#: config/v850/v850-c.c:164 +#: cp/call.c:6096 +#, fuzzy, gcc-internal-format +msgid " for conversion from %qT to %qT" +msgstr "пераўтварэньне з `%T' у `%T'" + +#: cp/call.c:6098 #, gcc-internal-format -msgid "unrecognized section name \"%s\"" -msgstr "нераспазнаная назва сэкцыі \"%s\"" +msgid " because conversion sequence for the argument is better" +msgstr "" -#: config/v850/v850-c.c:179 +#: cp/call.c:6212 #, gcc-internal-format -msgid "malformed #pragma ghs section" +msgid "ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second:" msgstr "" -#: config/v850/v850-c.c:198 +#: cp/call.c:6356 #, gcc-internal-format -msgid "junk at end of #pragma ghs interrupt" +msgid "could not convert %qE to %qT" msgstr "" -#: config/v850/v850-c.c:209 +#: cp/call.c:6488 #, gcc-internal-format -msgid "junk at end of #pragma ghs starttda" +msgid "invalid initialization of non-const reference of type %qT from a temporary of type %qT" msgstr "" -#: config/v850/v850-c.c:220 +#: cp/call.c:6492 #, gcc-internal-format -msgid "junk at end of #pragma ghs startsda" +msgid "invalid initialization of reference of type %qT from expression of type %qT" msgstr "" -#: config/v850/v850-c.c:231 +#: cp/class.c:277 #, gcc-internal-format -msgid "junk at end of #pragma ghs startzda" +msgid "cannot convert from base %qT to derived type %qT via virtual base %qT" msgstr "" -#: config/v850/v850-c.c:242 +#: cp/class.c:933 #, gcc-internal-format -msgid "junk at end of #pragma ghs endtda" +msgid "Java class %qT cannot have a destructor" msgstr "" -#: config/v850/v850-c.c:253 +#: cp/class.c:935 #, gcc-internal-format -msgid "junk at end of #pragma ghs endsda" +msgid "Java class %qT cannot have an implicit non-trivial destructor" msgstr "" -#: config/v850/v850-c.c:264 +#: cp/class.c:1036 +#, fuzzy, gcc-internal-format +msgid "repeated using declaration %q+D" +msgstr "пустое абвяшчэнне" + +#: cp/class.c:1038 +#, fuzzy, gcc-internal-format +msgid "using declaration %q+D conflicts with a previous using declaration" +msgstr "секцыя \"%s\" канфліктуе з папярэдняй дэкларацыяй" + +#: cp/class.c:1043 #, gcc-internal-format -msgid "junk at end of #pragma ghs endzda" +msgid "%q+#D cannot be overloaded" msgstr "" -#: config/v850/v850.c:168 +#: cp/class.c:1044 #, gcc-internal-format -msgid "%s=%s is not numeric" +msgid "with %q+#D" msgstr "" -#: config/v850/v850.c:175 +#: cp/class.c:1100 #, gcc-internal-format -msgid "%s=%s is too large" -msgstr "%s=%s вельмі вялікі" +msgid "conflicting access specifications for method %q+D, ignored" +msgstr "" -#: config/v850/v850.c:2246 +#: cp/class.c:1103 #, gcc-internal-format -msgid "%Jdata area attributes cannot be specified for local variables" +msgid "conflicting access specifications for field %qE, ignored" msgstr "" -#: config/v850/v850.c:2257 +#: cp/class.c:1164 cp/class.c:1172 #, fuzzy, gcc-internal-format -msgid "%Jdata area of '%D' conflicts with previous declaration" -msgstr "секцыя \"%s\" канфліктуе з папярэдняй дэкларацыяй" +msgid "%q+D invalid in %q#T" +msgstr "Нерэчаісны выбар \"%s\"" -#: config/v850/v850.c:2456 +#: cp/class.c:1165 #, gcc-internal-format -msgid "bogus JR construction: %d\n" +msgid " because of local method %q+#D with same name" msgstr "" -#: config/v850/v850.c:2477 config/v850/v850.c:2680 +#: cp/class.c:1173 #, gcc-internal-format -msgid "bad amount of stack space removal: %d" +msgid " because of local member %q+#D with same name" msgstr "" -#: config/v850/v850.c:2656 +#: cp/class.c:1215 #, gcc-internal-format -msgid "bogus JARL construction: %d\n" +msgid "base class %q#T has a non-virtual destructor" +msgstr "" + +#: cp/class.c:1529 +#, gcc-internal-format +msgid "all member functions in class %qT are private" msgstr "" -#: config/v850/v850.c:3026 +#: cp/class.c:1540 #, gcc-internal-format -msgid "Bogus DISPOSE construction: %d\n" +msgid "%q#T only defines a private destructor and has no friends" msgstr "" -#: config/v850/v850.c:3048 +#: cp/class.c:1583 #, gcc-internal-format -msgid "Too much stack space to dispose of: %d" +msgid "%q#T only defines private constructors and has no friends" msgstr "" -#: config/v850/v850.c:3221 +#: cp/class.c:1976 #, gcc-internal-format -msgid "Bogus PREPEARE construction: %d\n" +msgid "no unique final overrider for %qD in %qT" msgstr "" -#: config/v850/v850.c:3243 +#. Here we know it is a hider, and no overrider exists. +#: cp/class.c:2395 #, gcc-internal-format -msgid "Too much stack space to prepare: %d" +msgid "%q+D was hidden" msgstr "" -#: config/xtensa/xtensa.c:1774 +#: cp/class.c:2396 #, gcc-internal-format -msgid "boolean registers required for the floating-point option" +msgid " by %q+D" msgstr "" -#: config/xtensa/xtensa.c:1820 -#, fuzzy, gcc-internal-format -msgid "-f%s is not supported with CONST16 instructions" -msgstr "ISO C не падтрымлівае комлексныя цэлалікавыя тыпы" +#: cp/class.c:2437 cp/decl2.c:1083 +#, gcc-internal-format +msgid "%q+#D invalid; an anonymous union can only have non-static data members" +msgstr "" -#: config/xtensa/xtensa.c:1825 +#: cp/class.c:2443 cp/decl2.c:1089 #, gcc-internal-format -msgid "PIC is required but not supported with CONST16 instructions" +msgid "private member %q+#D in anonymous union" msgstr "" -#: config/xtensa/xtensa.c:2672 +#: cp/class.c:2445 cp/decl2.c:1091 #, gcc-internal-format -msgid "only uninitialized variables can be placed in a .bss section" +msgid "protected member %q+#D in anonymous union" msgstr "" -#: ada/misc.c:257 +#: cp/class.c:2611 #, fuzzy, gcc-internal-format -msgid "missing argument to \"-%s\"" -msgstr "аргумент для \"%s\" прапушчан" +msgid "bit-field %q+#D with non-integral type" +msgstr "бітавае поле \"%s\" мае нерэчаісны тып" + +#: cp/class.c:2628 +#, fuzzy, gcc-internal-format +msgid "bit-field %q+D width not an integer constant" +msgstr "бітавае поле \"%s\" мае нерэчаісны тып" -#: ada/misc.c:298 +#: cp/class.c:2633 #, gcc-internal-format -msgid "%<-gnat%> misspelled as %<-gant%>" +msgid "negative width in bit-field %q+D" msgstr "" -#: cp/call.c:288 +#: cp/class.c:2638 #, gcc-internal-format -msgid "unable to call pointer to member function here" +msgid "zero width for bit-field %q+D" msgstr "" -#: cp/call.c:2376 +#: cp/class.c:2644 #, gcc-internal-format -msgid "%s %D(%T, %T, %T) " +msgid "width of %q+D exceeds its type" msgstr "" -#: cp/call.c:2381 +#: cp/class.c:2653 #, gcc-internal-format -msgid "%s %D(%T, %T) " +msgid "%q+D is too small to hold all values of %q#T" msgstr "" -#: cp/call.c:2385 +#: cp/class.c:2712 #, gcc-internal-format -msgid "%s %D(%T) " +msgid "member %q+#D with constructor not allowed in union" msgstr "" -#: cp/call.c:2389 +#: cp/class.c:2715 #, gcc-internal-format -msgid "%s %T " +msgid "member %q+#D with destructor not allowed in union" msgstr "" -#: cp/call.c:2391 +#: cp/class.c:2717 #, gcc-internal-format -msgid "%J%s %+#D " +msgid "member %q+#D with copy assignment operator not allowed in union" msgstr "" -#: cp/call.c:2393 +#: cp/class.c:2740 #, gcc-internal-format -msgid "%J%s %+#D" +msgid "multiple fields in union %qT initialized" msgstr "" -#: cp/call.c:2614 -#, fuzzy, gcc-internal-format -msgid "conversion from %qT to %qT is ambiguous" -msgstr "пераўтварэньне з `%T' у `%T'" - -#: cp/call.c:2767 cp/call.c:2825 +#: cp/class.c:2802 #, gcc-internal-format -msgid "no matching function for call to %<%D(%A)%>" +msgid "ignoring packed attribute on unpacked non-POD field %q+#D" msgstr "" -#: cp/call.c:2770 cp/call.c:2828 +#: cp/class.c:2862 #, gcc-internal-format -msgid "call of overloaded %<%D(%A)%> is ambiguous" +msgid "%q+D may not be static because it is a member of a union" msgstr "" -#. It's no good looking for an overloaded operator() on a -#. pointer-to-member-function. -#: cp/call.c:2896 +#: cp/class.c:2867 #, gcc-internal-format -msgid "pointer-to-member function %E cannot be called without an object; consider using .* or ->*" +msgid "%q+D may not have reference type %qT because it is a member of a union" msgstr "" -#: cp/call.c:2965 +#: cp/class.c:2876 #, gcc-internal-format -msgid "no match for call to %<(%T) (%A)%>" +msgid "field %q+D in local class cannot be static" msgstr "" -#: cp/call.c:2974 +#: cp/class.c:2882 #, fuzzy, gcc-internal-format -msgid "call of %<(%T) (%A)%> is ambiguous" -msgstr "памер \"%s\" - %d байт" +msgid "field %q+D invalidly declared function type" +msgstr "бітавае поле \"%s\" мае нерэчаісны тып" -#: cp/call.c:3012 +#: cp/class.c:2888 +#, fuzzy, gcc-internal-format +msgid "field %q+D invalidly declared method type" +msgstr "бітавае поле \"%s\" мае нерэчаісны тып" + +#: cp/class.c:2920 #, gcc-internal-format -msgid "%s for ternary % in %<%E ? %E : %E%>" +msgid "non-static reference %q+#D in class without a constructor" msgstr "" -#: cp/call.c:3018 +#: cp/class.c:2967 #, gcc-internal-format -msgid "%s for % in %<%E%s%>" +msgid "non-static const member %q+#D in class without a constructor" msgstr "" -#: cp/call.c:3022 +#: cp/class.c:2982 #, gcc-internal-format -msgid "%s for % in %<%E[%E]%>" +msgid "field %q+#D with same name as class" msgstr "" -#: cp/call.c:3027 +#: cp/class.c:3015 #, gcc-internal-format -msgid "%s for %qs in %<%s %E%>" +msgid "%q#T has pointer data members" msgstr "" -#: cp/call.c:3032 +#: cp/class.c:3019 #, gcc-internal-format -msgid "%s for % in %<%E %s %E%>" +msgid " but does not override %<%T(const %T&)%>" msgstr "" -#: cp/call.c:3035 +#: cp/class.c:3021 #, gcc-internal-format -msgid "%s for % in %<%s%E%>" +msgid " or %" msgstr "" -#: cp/call.c:3125 +#: cp/class.c:3024 #, gcc-internal-format -msgid "ISO C++ forbids omitting the middle term of a ?: expression" +msgid " but does not override %" msgstr "" -#: cp/call.c:3202 +#: cp/class.c:3480 #, gcc-internal-format -msgid "%qE has type % and is not a throw-expression" +msgid "offset of empty base %qT may not be ABI-compliant and maychange in a future version of GCC" msgstr "" -#: cp/call.c:3241 cp/call.c:3451 +#: cp/class.c:3592 #, gcc-internal-format -msgid "operands to ?: have different types" +msgid "class %qT will be considered nearly empty in a future version of GCC" msgstr "" -#: cp/call.c:3405 +#: cp/class.c:3674 +#, fuzzy, gcc-internal-format +msgid "initializer specified for non-virtual method %q+D" +msgstr "не магу ініцыялізаваць сяброўскую функцыю \"%s\"" + +#: cp/class.c:4336 #, gcc-internal-format -msgid "enumeral mismatch in conditional expression: %qT vs %qT" +msgid "offset of virtual base %qT is not ABI-compliant and may change in a future version of GCC" msgstr "" -#: cp/call.c:3412 +#: cp/class.c:4435 #, gcc-internal-format -msgid "enumeral and non-enumeral type in conditional expression" +msgid "direct base %qT inaccessible in %qT due to ambiguity" msgstr "" -#: cp/call.c:3706 +#: cp/class.c:4447 #, gcc-internal-format -msgid "no %<%D(int)%> declared for postfix %qs, trying prefix operator instead" +msgid "virtual base %qT inaccessible in %qT due to ambiguity" msgstr "" -#: cp/call.c:3779 +#: cp/class.c:4624 #, gcc-internal-format -msgid "comparison between %q#T and %q#T" +msgid "size assigned to %qT may not be ABI-compliant and may change in a future version of GCC" msgstr "" -#: cp/call.c:4038 -#, fuzzy, gcc-internal-format -msgid "no suitable % for %qT" -msgstr "немагчымы апэратар '%s'" - -#: cp/call.c:4055 +#. Versions of G++ before G++ 3.4 did not reset the +#. DECL_MODE. +#: cp/class.c:4663 #, gcc-internal-format -msgid "%q+#D is private" +msgid "the offset of %qD may not be ABI-compliant and may change in a future version of GCC" msgstr "" -#: cp/call.c:4057 +#: cp/class.c:4691 #, gcc-internal-format -msgid "%q+#D is protected" +msgid "offset of %q+D is not ABI-compliant and may change in a future version of GCC" msgstr "" -#: cp/call.c:4059 +#: cp/class.c:4700 #, gcc-internal-format -msgid "%q+#D is inaccessible" +msgid "%q+D contains empty classes which may cause base classes to be placed at different locations in a future version of GCC" msgstr "" -#: cp/call.c:4060 +#: cp/class.c:4759 #, gcc-internal-format -msgid "within this context" +msgid "layout of classes derived from empty class %qT may change in a future version of GCC" msgstr "" -#: cp/call.c:4149 cp/cvt.c:263 +#: cp/class.c:4905 cp/parser.c:13111 #, fuzzy, gcc-internal-format -msgid "invalid conversion from %qT to %qT" -msgstr "пераўтварэньне з `%T' у `%T'" +msgid "redefinition of %q#T" +msgstr "папярэдняе вызначэньне `%#T'" -#: cp/call.c:4151 +#: cp/class.c:5055 #, gcc-internal-format -msgid " initializing argument %P of %qD" +msgid "%q#T has virtual functions but non-virtual destructor" msgstr "" -#: cp/call.c:4163 +#: cp/class.c:5157 #, gcc-internal-format -msgid "passing NULL to non-pointer argument %P of %qD" +msgid "trying to finish struct, but kicked out due to previous parse errors" msgstr "" -#: cp/call.c:4166 +#: cp/class.c:5574 +#, fuzzy, gcc-internal-format +msgid "language string %<\"%E\"%> not recognized" +msgstr "мова %s не распазнана" + +#: cp/class.c:5660 #, gcc-internal-format -msgid "converting to non-pointer type %qT from NULL" +msgid "cannot resolve overloaded function %qD based on conversion to type %qT" msgstr "" -#: cp/call.c:4174 +#: cp/class.c:5787 #, gcc-internal-format -msgid "passing %qT for argument %P to %qD" +msgid "no matches converting function %qD to type %q#T" msgstr "" -#: cp/call.c:4177 +#: cp/class.c:5810 +#, gcc-internal-format +msgid "converting overloaded function %qD to type %q#T is ambiguous" +msgstr "" + +#: cp/class.c:5836 #, fuzzy, gcc-internal-format -msgid "converting to %qT from %qT" -msgstr "пераўтварэньне з `%T' у `%T'" +msgid "assuming pointer to member %qD" +msgstr "прапушчан ініцыялізатар" -#: cp/call.c:4186 +#: cp/class.c:5839 #, gcc-internal-format -msgid "passing negative value %qE for argument %P to %qD" +msgid "(a pointer to member can only be formed with %<&%E%>)" msgstr "" -#: cp/call.c:4189 +#: cp/class.c:5884 cp/class.c:5915 cp/class.c:6067 cp/class.c:6074 #, gcc-internal-format -msgid "converting negative value %qE to %qT" +msgid "not enough type information" msgstr "" -#: cp/call.c:4331 -#, fuzzy, gcc-internal-format -msgid "cannot bind bitfield %qE to %qT" -msgstr "не магу ініцыялізаваць сяброўскую функцыю \"%s\"" +#: cp/class.c:5901 +#, gcc-internal-format +msgid "argument of type %qT does not match %qT" +msgstr "" -#: cp/call.c:4334 cp/call.c:4350 +#: cp/class.c:6051 #, gcc-internal-format -msgid "cannot bind packed field %qE to %qT" +msgid "invalid operation on uninstantiated type" msgstr "" -#: cp/call.c:4337 +#. [basic.scope.class] +#. +#. A name N used in a class S shall refer to the same declaration +#. in its context and when re-evaluated in the completed scope of +#. S. +#: cp/class.c:6288 cp/decl.c:1136 cp/name-lookup.c:508 #, fuzzy, gcc-internal-format -msgid "cannot bind rvalue %qE to %qT" -msgstr "не магу ініцыялізаваць сяброўскую функцыю \"%s\"" +msgid "declaration of %q#D" +msgstr "абвяшчэньне `%#D'" -#: cp/call.c:4446 +#: cp/class.c:6289 #, gcc-internal-format -msgid "cannot pass objects of non-POD type %q#T through %<...%>; call will abort at runtime" +msgid "changes meaning of %qD from %q+#D" msgstr "" -#. Undefined behavior [expr.call] 5.2.2/7. -#: cp/call.c:4472 +#: cp/cp-gimplify.c:120 #, gcc-internal-format -msgid "cannot receive objects of non-POD type %q#T through %<...%>; call will abort at runtime" +msgid "continue statement not within loop or switch" msgstr "" -#: cp/call.c:4515 +#: cp/cp-gimplify.c:365 #, gcc-internal-format -msgid "the default argument for parameter %d of %qD has not yet been parsed" +msgid "statement with no effect" msgstr "" -#: cp/call.c:4720 -#, gcc-internal-format -msgid "passing %qT as % argument of %q#D discards qualifiers" -msgstr "" +#: cp/cvt.c:91 +#, fuzzy, gcc-internal-format +msgid "can't convert from incomplete type %qT to %qT" +msgstr "\"%s\" мае незавершаны тып" -#: cp/call.c:4739 +#: cp/cvt.c:100 #, gcc-internal-format -msgid "%qT is not an accessible base of %qT" +msgid "conversion of %qE from %qT to %qT is ambiguous" msgstr "" -#: cp/call.c:4989 +#: cp/cvt.c:169 cp/cvt.c:238 cp/cvt.c:285 #, gcc-internal-format -msgid "could not find class$ field in java interface type %qT" +msgid "cannot convert %qE from type %qT to type %qT" msgstr "" -#: cp/call.c:5249 +#: cp/cvt.c:198 cp/cvt.c:202 #, gcc-internal-format -msgid "call to non-function %qD" +msgid "pointer to member cast from %qT to %qT is via virtual base" msgstr "" -#: cp/call.c:5274 +#: cp/cvt.c:498 #, gcc-internal-format -msgid "request for member %qD in %qE, which is of non-aggregate type %qT" +msgid "conversion from %qT to %qT discards qualifiers" msgstr "" -#: cp/call.c:5353 +#: cp/cvt.c:516 cp/typeck.c:4960 #, gcc-internal-format -msgid "no matching function for call to %<%T::%s(%A)%#V%>" +msgid "casting %qT to %qT does not dereference pointer" msgstr "" -#: cp/call.c:5371 +#: cp/cvt.c:543 +#, fuzzy, gcc-internal-format +msgid "cannot convert type %qT to type %qT" +msgstr "\"%s\" мае незавершаны тып" + +#: cp/cvt.c:679 +#, fuzzy, gcc-internal-format +msgid "conversion from %q#T to %q#T" +msgstr "пераўтварэньне з `%T' у `%T'" + +#: cp/cvt.c:691 cp/cvt.c:711 #, gcc-internal-format -msgid "call of overloaded %<%s(%A)%> is ambiguous" +msgid "%q#T used where a %qT was expected" msgstr "" -#: cp/call.c:5395 +#: cp/cvt.c:726 #, gcc-internal-format -msgid "cannot call member function %qD without object" +msgid "%q#T used where a floating point value was expected" msgstr "" -#: cp/call.c:6000 +#: cp/cvt.c:773 #, gcc-internal-format -msgid "passing %qT chooses %qT over %qT" +msgid "conversion from %qT to non-scalar type %qT requested" msgstr "" -#: cp/call.c:6002 cp/name-lookup.c:4126 +#: cp/cvt.c:807 #, gcc-internal-format -msgid " in call to %qD" +msgid "pseudo-destructor is not called" msgstr "" -#: cp/call.c:6059 +#: cp/cvt.c:866 #, gcc-internal-format -msgid "choosing %qD over %qD" +msgid "object of incomplete type %qT will not be accessed in %s" msgstr "" -#: cp/call.c:6060 -#, fuzzy, gcc-internal-format -msgid " for conversion from %qT to %qT" -msgstr "пераўтварэньне з `%T' у `%T'" - -#: cp/call.c:6062 +#: cp/cvt.c:869 #, gcc-internal-format -msgid " because conversion sequence for the argument is better" +msgid "object of type %qT will not be accessed in %s" msgstr "" -#: cp/call.c:6182 +#: cp/cvt.c:885 #, gcc-internal-format -msgid "ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second:" +msgid "object %qE of incomplete type %qT will not be accessed in %s" msgstr "" -#: cp/call.c:6323 +#. [over.over] enumerates the places where we can take the address +#. of an overloaded function, and this is not one of them. +#: cp/cvt.c:901 #, gcc-internal-format -msgid "could not convert %qE to %qT" +msgid "%s cannot resolve address of overloaded function" msgstr "" -#: cp/call.c:6454 +#. Only warn when there is no &. +#: cp/cvt.c:907 #, gcc-internal-format -msgid "invalid initialization of non-const reference of type %qT from a temporary of type %qT" +msgid "%s is a reference, not call, to function %qE" msgstr "" -#: cp/call.c:6458 +#: cp/cvt.c:921 #, gcc-internal-format -msgid "invalid initialization of reference of type %qT from expression of type %qT" +msgid "%s has no effect" msgstr "" -#: cp/class.c:273 +#: cp/cvt.c:953 #, gcc-internal-format -msgid "cannot convert from base %qT to derived type %qT via virtual base %qT" +msgid "value computed is not used" msgstr "" -#: cp/class.c:930 +#: cp/cvt.c:1061 #, gcc-internal-format -msgid "Java class %qT cannot have a destructor" +msgid "converting NULL to non-pointer type" msgstr "" -#: cp/class.c:932 +#: cp/cvt.c:1134 #, gcc-internal-format -msgid "Java class %qT cannot have an implicit non-trivial destructor" +msgid "ambiguous default type conversion from %qT" msgstr "" -#: cp/class.c:1032 +#: cp/cvt.c:1136 #, gcc-internal-format -msgid "%q#D and %q#D cannot be overloaded" +msgid " candidate conversions include %qD and %qD" msgstr "" -#: cp/class.c:1089 +#: cp/decl.c:1003 #, gcc-internal-format -msgid "conflicting access specifications for method %qD, ignored" +msgid "%qD was declared % and later %" msgstr "" -#: cp/class.c:1092 +#: cp/decl.c:1004 cp/decl.c:1508 objc/objc-act.c:2920 objc/objc-act.c:7487 +#, fuzzy, gcc-internal-format +msgid "previous declaration of %q+D" +msgstr "папярэдняе абвяшчэньне `%D'" + +#: cp/decl.c:1037 #, gcc-internal-format -msgid "conflicting access specifications for field %qE, ignored" +msgid "declaration of %qF throws different exceptions" msgstr "" -#: cp/class.c:1142 +#: cp/decl.c:1038 #, fuzzy, gcc-internal-format -msgid "%qD names constructor" -msgstr "У канструкцыі" +msgid "from previous declaration %q+F" +msgstr "няма папярэдняга аб'яўлення для \"%s\"" -#: cp/class.c:1147 +#: cp/decl.c:1089 #, fuzzy, gcc-internal-format -msgid "%qD invalid in %qT" -msgstr "Нерэчаісны выбар \"%s\"" +msgid "function %q+D redeclared as inline" +msgstr "\"%s\" не абвешчан (першае выкарыстанне ў гэтай функцыі)" -#: cp/class.c:1155 -#, gcc-internal-format -msgid "no members matching %qD in %q#T" -msgstr "" +#: cp/decl.c:1091 +#, fuzzy, gcc-internal-format +msgid "previous declaration of %q+D with attribute noinline" +msgstr "няма папярэдняга аб'яўлення для \"%s\"" -#: cp/class.c:1187 cp/class.c:1195 +#: cp/decl.c:1098 #, fuzzy, gcc-internal-format -msgid "%qD invalid in %q#T" -msgstr "Нерэчаісны выбар \"%s\"" +msgid "function %q+D redeclared with attribute noinline" +msgstr "\"%s\" не абвешчан (першае выкарыстанне ў гэтай функцыі)" + +#: cp/decl.c:1100 +#, fuzzy, gcc-internal-format +msgid "previous declaration of %q+D was inline" +msgstr "няма папярэдняга аб'яўлення для \"%s\"" + +#: cp/decl.c:1123 cp/decl.c:1196 +#, fuzzy, gcc-internal-format +msgid "shadowing %s function %q#D" +msgstr "у функцыі \"%s\":" -#: cp/class.c:1188 +#: cp/decl.c:1132 #, gcc-internal-format -msgid " because of local method %q#D with same name" +msgid "library function %q#D redeclared as non-function %q#D" msgstr "" -#: cp/class.c:1196 +#: cp/decl.c:1137 +#, fuzzy, gcc-internal-format +msgid "conflicts with built-in declaration %q#D" +msgstr "паўторнае абвяшчэнне меткі \"%s\"" + +#: cp/decl.c:1191 cp/decl.c:1300 cp/decl.c:1316 +#, fuzzy, gcc-internal-format +msgid "new declaration %q#D" +msgstr "новае абвяшчэньне `%#D'" + +#: cp/decl.c:1192 +#, fuzzy, gcc-internal-format +msgid "ambiguates built-in declaration %q#D" +msgstr "паўторнае абвяшчэнне меткі \"%s\"" + +#: cp/decl.c:1264 #, gcc-internal-format -msgid " because of local member %q#D with same name" +msgid "%q#D redeclared as different kind of symbol" msgstr "" -#: cp/class.c:1238 +#: cp/decl.c:1267 +#, fuzzy, gcc-internal-format +msgid "previous declaration of %q+#D" +msgstr "папярэдняе абвяшчэньне `%#D'" + +#: cp/decl.c:1286 +#, fuzzy, gcc-internal-format +msgid "declaration of template %q#D" +msgstr "абвяшчэньне шаблёну `%#D'" + +#: cp/decl.c:1287 cp/name-lookup.c:509 +#, fuzzy, gcc-internal-format +msgid "conflicts with previous declaration %q+#D" +msgstr "канфлікт з папярэднім абвяшчэньнем `%#D'" + +#: cp/decl.c:1301 cp/decl.c:1317 +#, fuzzy, gcc-internal-format +msgid "ambiguates old declaration %q+#D" +msgstr "паўторнае абвяшчэнне меткі \"%s\"" + +#: cp/decl.c:1309 +#, fuzzy, gcc-internal-format +msgid "declaration of C function %q#D conflicts with" +msgstr "няма папярэдняга аб'яўлення для \"%s\"" + +#: cp/decl.c:1311 +#, fuzzy, gcc-internal-format +msgid "previous declaration %q+#D here" +msgstr "няма папярэдняга аб'яўлення для \"%s\"" + +#: cp/decl.c:1324 +#, fuzzy, gcc-internal-format +msgid "conflicting declaration %q#D" +msgstr "паўторнае абвяшчэнне меткі \"%s\"" + +#: cp/decl.c:1325 +#, fuzzy, gcc-internal-format +msgid "%q+D has a previous declaration as %q#D" +msgstr "няма папярэдняга аб'яўлення для \"%s\"" + +#. [namespace.alias] +#. +#. A namespace-name or namespace-alias shall not be declared as +#. the name of any other entity in the same declarative region. +#. A namespace-name defined at global scope shall not be +#. declared as the name of any other entity in any global scope +#. of the program. +#: cp/decl.c:1377 +#, fuzzy, gcc-internal-format +msgid "declaration of namespace %qD conflicts with" +msgstr "абвяшчэньне шаблёну `%#D'" + +#: cp/decl.c:1378 +#, fuzzy, gcc-internal-format +msgid "previous declaration of namespace %q+D here" +msgstr "няма папярэдняга аб'яўлення для \"%s\"" + +#: cp/decl.c:1389 +#, fuzzy, gcc-internal-format +msgid "%q+#D previously defined here" +msgstr "папярэдняе вызначэньне" + +#: cp/decl.c:1390 +#, fuzzy, gcc-internal-format +msgid "%q+#D previously declared here" +msgstr "няма папярэдняга аб'яўлення для \"%s\"" + +#. Prototype decl follows defn w/o prototype. +#: cp/decl.c:1399 +#, fuzzy, gcc-internal-format +msgid "prototype for %q+#D" +msgstr "няма папярэдняга прататыпа для \"%s\"" + +#: cp/decl.c:1400 +#, fuzzy, gcc-internal-format +msgid "%Jfollows non-prototype definition here" +msgstr "папярэдняе вызначэньне" + +#: cp/decl.c:1412 +#, fuzzy, gcc-internal-format +msgid "previous declaration of %q+#D with %qL linkage" +msgstr "няма папярэдняга аб'яўлення для \"%s\"" + +#: cp/decl.c:1414 +#, fuzzy, gcc-internal-format +msgid "conflicts with new declaration with %qL linkage" +msgstr "секцыя \"%s\" канфліктуе з папярэдняй дэкларацыяй" + +#: cp/decl.c:1437 cp/decl.c:1443 +#, fuzzy, gcc-internal-format +msgid "default argument given for parameter %d of %q#D" +msgstr "нехапае аргументаў у функцыі \"%s\"" + +#: cp/decl.c:1439 cp/decl.c:1445 +#, fuzzy, gcc-internal-format +msgid "after previous specification in %q+#D" +msgstr "няма папярэдняга аб'яўлення для \"%s\"" + +#: cp/decl.c:1454 #, gcc-internal-format -msgid "base class %q#T has a non-virtual destructor" +msgid "%q#D was used before it was declared inline" msgstr "" -#: cp/class.c:1552 +#: cp/decl.c:1455 +#, fuzzy, gcc-internal-format +msgid "%Jprevious non-inline declaration here" +msgstr "няма папярэдняга аб'яўлення для \"%s\"" + +#: cp/decl.c:1507 +#, fuzzy, gcc-internal-format +msgid "redundant redeclaration of %qD in same scope" +msgstr "паўторнае абвяшчэнне меткі \"%s\"" + +#. From [temp.expl.spec]: +#. +#. If a template, a member template or the member of a class +#. template is explicitly specialized then that +#. specialization shall be declared before the first use of +#. that specialization that would cause an implicit +#. instantiation to take place, in every translation unit in +#. which such a use occurs. +#: cp/decl.c:1756 +#, fuzzy, gcc-internal-format +msgid "explicit specialization of %qD after first use" +msgstr "ініцыялізацыя" + +#: cp/decl.c:1835 #, gcc-internal-format -msgid "all member functions in class %qT are private" +msgid "%q+D: visibility attribute ignored because it" msgstr "" -#: cp/class.c:1563 +#: cp/decl.c:1837 +#, fuzzy, gcc-internal-format +msgid "%Jconflicts with previous declaration here" +msgstr "канфлікт з папярэднім абвяшчэньнем `%#D'" + +#: cp/decl.c:2227 cp/decl.c:2249 +#, fuzzy, gcc-internal-format +msgid "jump to label %qD" +msgstr "паўтарэнне \"%s\"" + +#: cp/decl.c:2229 cp/decl.c:2251 #, gcc-internal-format -msgid "%q#T only defines a private destructor and has no friends" +msgid "jump to case label" msgstr "" -#: cp/class.c:1603 +#: cp/decl.c:2232 cp/decl.c:2254 +#, fuzzy, gcc-internal-format +msgid "%H from here" +msgstr " адсюль" + +#: cp/decl.c:2237 +#, fuzzy, gcc-internal-format +msgid " crosses initialization of %q+#D" +msgstr "ініцыялізацыя" + +#: cp/decl.c:2239 cp/decl.c:2353 #, gcc-internal-format -msgid "%q#T only defines private constructors and has no friends" +msgid " enters scope of non-POD %q+#D" msgstr "" -#: cp/class.c:1936 +#: cp/decl.c:2258 cp/decl.c:2357 #, gcc-internal-format -msgid "no unique final overrider for %qD in %qT" +msgid " enters try block" msgstr "" -#. Here we know it is a hider, and no overrider exists. -#: cp/class.c:2414 +#: cp/decl.c:2260 cp/decl.c:2359 #, gcc-internal-format -msgid "%qD was hidden" +msgid " enters catch block" msgstr "" -#: cp/class.c:2415 +#: cp/decl.c:2337 +#, fuzzy, gcc-internal-format +msgid "jump to label %q+D" +msgstr "паўтарэнне \"%s\"" + +#: cp/decl.c:2338 #, gcc-internal-format -msgid " by %qD" -msgstr "" +msgid " from here" +msgstr " адсюль" -#: cp/class.c:2456 cp/decl2.c:1100 +#. Can't skip init of __exception_info. +#: cp/decl.c:2349 #, gcc-internal-format -msgid "%q#D invalid; an anonymous union can only have non-static data members" +msgid "%J enters catch block" msgstr "" -#: cp/class.c:2463 cp/decl2.c:1107 +#: cp/decl.c:2351 +#, fuzzy, gcc-internal-format +msgid " skips initialization of %q+#D" +msgstr "ініцыялізацыя" + +#: cp/decl.c:2385 #, gcc-internal-format -msgid "private member %q#D in anonymous union" +msgid "label named wchar_t" msgstr "" -#: cp/class.c:2466 cp/decl2.c:1109 +#: cp/decl.c:2388 +#, fuzzy, gcc-internal-format +msgid "duplicate label %qD" +msgstr "паўтарэнне \"%s\"" + +#: cp/decl.c:2644 cp/parser.c:3636 +#, fuzzy, gcc-internal-format +msgid "%qD used without template parameters" +msgstr "нявернае выкарыстанне \"restict\"" + +#: cp/decl.c:2661 cp/decl.c:2752 #, gcc-internal-format -msgid "protected member %q#D in anonymous union" +msgid "no class template named %q#T in %q#T" msgstr "" -#: cp/class.c:2633 +#: cp/decl.c:2682 cp/decl.c:2692 cp/decl.c:2712 #, fuzzy, gcc-internal-format -msgid "bit-field %q#D with non-integral type" -msgstr "бітавае поле \"%s\" мае нерэчаісны тып" +msgid "no type named %q#T in %q#T" +msgstr "вяртаемы тып \"%s\" не \"int\"" + +#: cp/decl.c:2761 +#, fuzzy, gcc-internal-format +msgid "template parameters do not match template" +msgstr "віртуальныя функцыі не могуць быць сяброўскімі" -#: cp/class.c:2650 +#: cp/decl.c:2762 cp/friend.c:317 cp/friend.c:325 #, fuzzy, gcc-internal-format -msgid "bit-field %qD width not an integer constant" -msgstr "бітавае поле \"%s\" мае нерэчаісны тып" +msgid "%q+D declared here" +msgstr "\"%s\" не абвешчан (першае выкарыстанне ў гэтай функцыі)" -#: cp/class.c:2656 +#: cp/decl.c:3435 #, gcc-internal-format -msgid "negative width in bit-field %qD" +msgid "%Jan anonymous union cannot have function members" msgstr "" -#: cp/class.c:2661 +#: cp/decl.c:3453 #, gcc-internal-format -msgid "zero width for bit-field %qD" +msgid "member %q+#D with constructor not allowed in anonymous aggregate" msgstr "" -#: cp/class.c:2667 +#: cp/decl.c:3456 #, gcc-internal-format -msgid "width of %qD exceeds its type" +msgid "member %q+#D with destructor not allowed in anonymous aggregate" msgstr "" -#: cp/class.c:2676 +#: cp/decl.c:3459 #, gcc-internal-format -msgid "%qD is too small to hold all values of %q#T" +msgid "member %q+#D with copy assignment operator not allowed in anonymous aggregate" msgstr "" -#: cp/class.c:2736 +#: cp/decl.c:3484 #, gcc-internal-format -msgid "member %q#D with constructor not allowed in union" +msgid "multiple types in one declaration" msgstr "" -#: cp/class.c:2739 -#, gcc-internal-format -msgid "member %q#D with destructor not allowed in union" -msgstr "" +#: cp/decl.c:3488 +#, fuzzy, gcc-internal-format +msgid "redeclaration of C++ built-in type %qT" +msgstr "няма папярэдняга аб'яўлення для \"%s\"" -#: cp/class.c:2742 +#: cp/decl.c:3525 #, gcc-internal-format -msgid "member %q#D with copy assignment operator not allowed in union" +msgid "missing type-name in typedef-declaration" msgstr "" -#: cp/class.c:2765 +#: cp/decl.c:3533 #, gcc-internal-format -msgid "multiple fields in union %qT initialized" +msgid "ISO C++ prohibits anonymous structs" msgstr "" -#: cp/class.c:2826 +#: cp/decl.c:3540 +#, fuzzy, gcc-internal-format +msgid "%qs can only be specified for functions" +msgstr "\"%s\" звычайна функцыя" + +#: cp/decl.c:3546 #, gcc-internal-format -msgid "ignoring packed attribute on unpacked non-POD field %q#D" +msgid "% can only be specified inside a class" msgstr "" -#: cp/class.c:2886 +#: cp/decl.c:3548 #, gcc-internal-format -msgid "%qD may not be static because it is a member of a union" +msgid "% can only be specified for constructors" msgstr "" -#: cp/class.c:2891 +#: cp/decl.c:3550 #, gcc-internal-format -msgid "%qD may not have reference type %qT because it is a member of a union" +msgid "a storage class can only be specified for objects and functions" msgstr "" -#: cp/class.c:2900 +#: cp/decl.c:3556 #, gcc-internal-format -msgid "field %qD in local class cannot be static" +msgid "qualifiers can only be specified for objects and functions" msgstr "" -#: cp/class.c:2906 -#, fuzzy, gcc-internal-format -msgid "field %qD invalidly declared function type" -msgstr "бітавае поле \"%s\" мае нерэчаісны тып" - -#: cp/class.c:2912 +#: cp/decl.c:3586 #, fuzzy, gcc-internal-format -msgid "field %qD invalidly declared method type" -msgstr "бітавае поле \"%s\" мае нерэчаісны тып" +msgid "attribute ignored in declaration of %q+#T" +msgstr "няма папярэдняга аб'яўлення для \"%s\"" -#: cp/class.c:2944 +#: cp/decl.c:3587 #, gcc-internal-format -msgid "non-static reference %q#D in class without a constructor" +msgid "attribute for %q+#T must follow the %qs keyword" msgstr "" -#: cp/class.c:2991 +#: cp/decl.c:3707 #, gcc-internal-format -msgid "non-static const member %q#D in class without a constructor" +msgid "function %q#D is initialized like a variable" msgstr "" -#: cp/class.c:3006 +#: cp/decl.c:3719 #, gcc-internal-format -msgid "field %q#D with same name as class" +msgid "declaration of %q#D has % and is initialized" msgstr "" -#: cp/class.c:3039 +#: cp/decl.c:3749 #, gcc-internal-format -msgid "%q#T has pointer data members" +msgid "%q#D is not a static member of %q#T" msgstr "" -#: cp/class.c:3043 +#: cp/decl.c:3755 #, gcc-internal-format -msgid " but does not override %<%T(const %T&)%>" +msgid "ISO C++ does not permit %<%T::%D%> to be defined as %<%T::%D%>" msgstr "" -#: cp/class.c:3045 +#: cp/decl.c:3764 #, gcc-internal-format -msgid " or %" +msgid "template header not allowed in member definition of explicitly specialized class" msgstr "" -#: cp/class.c:3048 -#, gcc-internal-format -msgid " but does not override %" -msgstr "" +#: cp/decl.c:3773 +#, fuzzy, gcc-internal-format +msgid "duplicate initialization of %qD" +msgstr "паўторнае абвяшчэнне меткі \"%s\"" -#: cp/class.c:3481 +#: cp/decl.c:3812 #, gcc-internal-format -msgid "offset of empty base %qT may not be ABI-compliant and maychange in a future version of GCC" +msgid "declaration of %q#D outside of class is not definition" msgstr "" -#: cp/class.c:3593 -#, gcc-internal-format -msgid "class %qT will be considered nearly empty in a future version of GCC" -msgstr "" +#: cp/decl.c:3861 +#, fuzzy, gcc-internal-format +msgid "variable %q#D has initializer but incomplete type" +msgstr "\"%s\" мае незавершаны тып" -#: cp/class.c:3675 +#: cp/decl.c:3868 cp/decl.c:4564 #, fuzzy, gcc-internal-format -msgid "initializer specified for non-virtual method %qD" -msgstr "не магу ініцыялізаваць сяброўскую функцыю \"%s\"" +msgid "elements of array %q#D have incomplete type" +msgstr "\"%s\" мае незавершаны тып" -#: cp/class.c:4338 +#: cp/decl.c:3884 #, gcc-internal-format -msgid "offset of virtual base %qT is not ABI-compliant and may change in a future version of GCC" +msgid "aggregate %q#D has incomplete type and cannot be defined" msgstr "" -#: cp/class.c:4437 +#: cp/decl.c:3934 #, gcc-internal-format -msgid "direct base %qT inaccessible in %qT due to ambiguity" +msgid "%qD declared as reference but not initialized" msgstr "" -#: cp/class.c:4449 +#: cp/decl.c:3940 #, gcc-internal-format -msgid "virtual base %qT inaccessible in %qT due to ambiguity" +msgid "ISO C++ forbids use of initializer list to initialize reference %qD" msgstr "" -#: cp/class.c:4626 -#, gcc-internal-format -msgid "size assigned to %qT may not be ABI-compliant and may change in a future version of GCC" -msgstr "" +#: cp/decl.c:3966 +#, fuzzy, gcc-internal-format +msgid "cannot initialize %qT from %qT" +msgstr "не магу ініцыялізаваць сяброўскую функцыю \"%s\"" -#. Versions of G++ before G++ 3.4 did not reset the -#. DECL_MODE. -#: cp/class.c:4665 +#: cp/decl.c:3999 #, gcc-internal-format -msgid "the offset of %qD may not be ABI-compliant and may change in a future version of GCC" +msgid "initializer fails to determine size of %qD" msgstr "" -#: cp/class.c:4688 -#, gcc-internal-format -msgid "offset of %qD is not ABI-compliant and may change in a future version of GCC" -msgstr "" +#: cp/decl.c:4004 +#, fuzzy, gcc-internal-format +msgid "array size missing in %qD" +msgstr "прапушчан памер масіва ў `%D'" -#: cp/class.c:4698 -#, gcc-internal-format -msgid "%qD contains empty classes which may cause base classes to be placed at different locations in a future version of GCC" -msgstr "" +#: cp/decl.c:4014 +#, fuzzy, gcc-internal-format +msgid "zero-size array %qD" +msgstr "нулявы памер масіва `%D'" -#: cp/class.c:4758 +#. An automatic variable with an incomplete type: that is an error. +#. Don't talk about array types here, since we took care of that +#. message in grokdeclarator. +#: cp/decl.c:4050 #, gcc-internal-format -msgid "layout of classes derived from empty class %qT may change in a future version of GCC" +msgid "storage size of %qD isn't known" msgstr "" -#: cp/class.c:4899 cp/parser.c:12930 +#: cp/decl.c:4072 #, fuzzy, gcc-internal-format -msgid "redefinition of %q#T" -msgstr "папярэдняе вызначэньне `%#T'" +msgid "storage size of %qD isn't constant" +msgstr "тып параметра \"%s\" не аб'яўлены" -#: cp/class.c:5049 +#: cp/decl.c:4127 #, gcc-internal-format -msgid "%q#T has virtual functions but non-virtual destructor" +msgid "sorry: semantics of inline function static data %q+#D are wrong (you'll wind up with multiple copies)" msgstr "" -#: cp/class.c:5146 +#: cp/decl.c:4130 #, gcc-internal-format -msgid "trying to finish struct, but kicked out due to previous parse errors" +msgid "%J you can work around this by removing the initializer" msgstr "" -#: cp/class.c:5562 +#: cp/decl.c:4157 #, fuzzy, gcc-internal-format -msgid "language string %<\"%E\"%> not recognized" -msgstr "мова %s не распазнана" - -#: cp/class.c:5649 -#, gcc-internal-format -msgid "cannot resolve overloaded function %qD based on conversion to type %qT" -msgstr "" - -#: cp/class.c:5774 -#, gcc-internal-format -msgid "no matches converting function %qD to type %q#T" -msgstr "" +msgid "uninitialized const %qD" +msgstr "не магу ініцыялізаваць сяброўскую функцыю \"%s\"" -#: cp/class.c:5797 +#: cp/decl.c:4228 #, gcc-internal-format -msgid "converting overloaded function %qD to type %q#T is ambiguous" +msgid "name %qD used in a GNU-style designated initializer for an array" msgstr "" -#: cp/class.c:5823 +#: cp/decl.c:4275 #, fuzzy, gcc-internal-format -msgid "assuming pointer to member %qD" -msgstr "прапушчан ініцыялізатар" +msgid "invalid type %qT as initializer for a vector of type %qT" +msgstr "нерэчаісны ініцыялізатар" -#: cp/class.c:5826 +#: cp/decl.c:4317 #, gcc-internal-format -msgid "(a pointer to member can only be formed with %<&%E%>)" +msgid "initializer for %qT must be brace-enclosed" msgstr "" -#: cp/class.c:5871 cp/class.c:5902 cp/class.c:6054 cp/class.c:6061 +#: cp/decl.c:4332 #, gcc-internal-format -msgid "not enough type information" +msgid "ISO C++ does not allow designated initializers" msgstr "" -#: cp/class.c:5888 +#: cp/decl.c:4337 #, gcc-internal-format -msgid "argument of type %qT does not match %qT" +msgid "%qT has no non-static data member named %qD" msgstr "" -#: cp/class.c:6038 -#, gcc-internal-format -msgid "invalid operation on uninstantiated type" -msgstr "" +#: cp/decl.c:4386 +#, fuzzy, gcc-internal-format +msgid "braces around scalar initializer for type %qT" +msgstr "не магу ініцыялізаваць сяброўскую функцыю \"%s\"" -#. [basic.scope.class] -#. -#. A name N used in a class S shall refer to the same declaration -#. in its context and when re-evaluated in the completed scope of -#. S. -#: cp/class.c:6275 cp/decl.c:1102 cp/name-lookup.c:508 cp/pt.c:2206 +#: cp/decl.c:4464 #, fuzzy, gcc-internal-format -msgid "declaration of %q#D" -msgstr "абвяшчэньне `%#D'" +msgid "missing braces around initializer for %qT" +msgstr "не магу ініцыялізаваць сяброўскую функцыю \"%s\"" + +#: cp/decl.c:4520 +#, fuzzy, gcc-internal-format +msgid "too many initializers for %qT" +msgstr "не магу ініцыялізаваць сяброўскую функцыю \"%s\"" -#: cp/class.c:6276 +#: cp/decl.c:4558 #, gcc-internal-format -msgid "changes meaning of %qD from %q+#D" +msgid "variable-sized object %qD may not be initialized" msgstr "" -#: cp/cvt.c:90 +#: cp/decl.c:4569 #, fuzzy, gcc-internal-format -msgid "can't convert from incomplete type %qT to %qT" +msgid "%qD has incomplete type" msgstr "\"%s\" мае незавершаны тып" -#: cp/cvt.c:99 +#: cp/decl.c:4616 #, gcc-internal-format -msgid "conversion of %qE from %qT to %qT is ambiguous" +msgid "%qD must be initialized by constructor, not by %<{...}%>" msgstr "" -#: cp/cvt.c:168 cp/cvt.c:237 cp/cvt.c:284 +#: cp/decl.c:4652 #, gcc-internal-format -msgid "cannot convert %qE from type %qT to type %qT" +msgid "array %qD initialized by parenthesized string literal %qE" msgstr "" -#: cp/cvt.c:197 cp/cvt.c:201 -#, gcc-internal-format -msgid "pointer to member cast from %qT to %qT is via virtual base" -msgstr "" +#: cp/decl.c:4667 +#, fuzzy, gcc-internal-format +msgid "structure %qD with uninitialized const members" +msgstr "параметр \"%s\" ініцыялізаваны" -#: cp/cvt.c:497 -#, gcc-internal-format -msgid "conversion from %qT to %qT discards qualifiers" -msgstr "" +#: cp/decl.c:4669 +#, fuzzy, gcc-internal-format +msgid "structure %qD with uninitialized reference members" +msgstr "параметр \"%s\" ініцыялізаваны" -#: cp/cvt.c:515 cp/typeck.c:4833 +#: cp/decl.c:4871 #, gcc-internal-format -msgid "casting %qT to %qT does not dereference pointer" +msgid "assignment (not initialization) in declaration" msgstr "" -#: cp/cvt.c:542 +#: cp/decl.c:4888 #, fuzzy, gcc-internal-format -msgid "cannot convert type %qT to type %qT" -msgstr "\"%s\" мае незавершаны тып" +msgid "cannot initialize %qD to namespace %qD" +msgstr "не магу ініцыялізаваць сяброўскую функцыю \"%s\"" -#: cp/cvt.c:670 +#: cp/decl.c:4929 #, fuzzy, gcc-internal-format -msgid "conversion from %q#T to %q#T" -msgstr "пераўтварэньне з `%T' у `%T'" +msgid "shadowing previous type declaration of %q#D" +msgstr "няма папярэдняга аб'яўлення для \"%s\"" -#: cp/cvt.c:682 cp/cvt.c:702 +#: cp/decl.c:4959 #, gcc-internal-format -msgid "%q#T used where a %qT was expected" +msgid "%qD cannot be thread-local because it has non-POD type %qT" msgstr "" -#: cp/cvt.c:717 +#: cp/decl.c:4976 #, gcc-internal-format -msgid "%q#T used where a floating point value was expected" +msgid "%qD is thread-local and so cannot be dynamically initialized" msgstr "" -#: cp/cvt.c:764 +#: cp/decl.c:4994 #, gcc-internal-format -msgid "conversion from %qT to non-scalar type %qT requested" +msgid "%qD cannot be initialized by a non-constant expression when being declared" msgstr "" -#: cp/cvt.c:798 +#: cp/decl.c:5584 #, gcc-internal-format -msgid "pseudo-destructor is not called" +msgid "destructor for alien class %qT cannot be a member" msgstr "" -#: cp/cvt.c:857 +#: cp/decl.c:5586 #, gcc-internal-format -msgid "object of incomplete type %qT will not be accessed in %s" +msgid "constructor for alien class %qT cannot be a member" msgstr "" -#: cp/cvt.c:860 +#: cp/decl.c:5607 #, gcc-internal-format -msgid "object of type %qT will not be accessed in %s" +msgid "%qD declared as a % %s" msgstr "" -#: cp/cvt.c:876 +#: cp/decl.c:5609 #, gcc-internal-format -msgid "object %qE of incomplete type %qT will not be accessed in %s" +msgid "%qD declared as an % %s" msgstr "" -#. [over.over] enumerates the places where we can take the address -#. of an overloaded function, and this is not one of them. -#: cp/cvt.c:892 +#: cp/decl.c:5611 #, gcc-internal-format -msgid "%s cannot resolve address of overloaded function" +msgid "% and % function specifiers on %qD invalid in %s declaration" msgstr "" -#. Only warn when there is no &. -#: cp/cvt.c:898 +#: cp/decl.c:5615 #, gcc-internal-format -msgid "%s is a reference, not call, to function %qE" +msgid "%q+D declared as a friend" msgstr "" -#: cp/cvt.c:909 +#: cp/decl.c:5621 +#, fuzzy, gcc-internal-format +msgid "%q+D declared with an exception specification" +msgstr "\"%s\" не абвешчан (першае выкарыстанне ў гэтай функцыі)" + +#: cp/decl.c:5655 #, gcc-internal-format -msgid "%s has no effect" +msgid "definition of %qD is not in namespace enclosing %qT" msgstr "" -#: cp/cvt.c:941 +#: cp/decl.c:5715 +#, fuzzy, gcc-internal-format +msgid "defining explicit specialization %qD in friend declaration" +msgstr "ініцыялізацыя" + +#. Something like `template friend void f()'. +#: cp/decl.c:5725 +#, fuzzy, gcc-internal-format +msgid "invalid use of template-id %qD in declaration of primary template" +msgstr "нявернае выкарыстанне \"restict\"" + +#: cp/decl.c:5755 #, gcc-internal-format -msgid "value computed is not used" +msgid "default arguments are not allowed in declaration of friend template specialization %qD" msgstr "" -#: cp/cvt.c:1049 +#: cp/decl.c:5763 #, gcc-internal-format -msgid "converting NULL to non-pointer type" +msgid "% is not allowed in declaration of friend template specialization %qD" msgstr "" -#: cp/cvt.c:1121 +#: cp/decl.c:5806 #, gcc-internal-format -msgid "ambiguous default type conversion from %qT" +msgid "cannot declare %<::main%> to be a template" msgstr "" -#: cp/cvt.c:1123 +#: cp/decl.c:5808 #, gcc-internal-format -msgid " candidate conversions include %qD and %qD" +msgid "cannot declare %<::main%> to be inline" msgstr "" -#: cp/decl.c:361 -#, fuzzy, gcc-internal-format -msgid "label %qD used but not defined" -msgstr "адмеціна `%D' выкарыстоўвываецца, але ня вызначана" - -#: cp/decl.c:372 -#, fuzzy, gcc-internal-format -msgid "label %qD defined but not used" -msgstr "адмеціна `%D' вызначана, але не выкарыстоўваецца" - -#: cp/decl.c:1009 +#: cp/decl.c:5810 #, gcc-internal-format -msgid "%qD was declared % and later %" +msgid "cannot declare %<::main%> to be static" msgstr "" -#: cp/decl.c:1010 cp/decl.c:1475 -#, fuzzy, gcc-internal-format -msgid "previous declaration of %qD" -msgstr "папярэдняе абвяшчэньне `%D'" - -#: cp/decl.c:1058 -#, fuzzy, gcc-internal-format -msgid "%Jfunction %qD redeclared as inline" -msgstr "\"%s\" не абвешчан (першае выкарыстанне ў гэтай функцыі)" - -#: cp/decl.c:1059 -#, fuzzy, gcc-internal-format -msgid "%Jprevious declaration of %qD with attribute noinline" -msgstr "няма папярэдняга аб'яўлення для \"%s\"" - -#: cp/decl.c:1066 -#, fuzzy, gcc-internal-format -msgid "%Jfunction %qD redeclared with attribute noinline" -msgstr "\"%s\" не абвешчан (першае выкарыстанне ў гэтай функцыі)" - -#: cp/decl.c:1068 -#, fuzzy, gcc-internal-format -msgid "%Jprevious declaration of %qD was inline" -msgstr "няма папярэдняга аб'яўлення для \"%s\"" - -#: cp/decl.c:1089 cp/decl.c:1160 +#: cp/decl.c:5816 #, fuzzy, gcc-internal-format -msgid "shadowing %s function %q#D" -msgstr "у функцыі \"%s\":" +msgid "%<::main%> must return %" +msgstr "`main' павінна вяртаць `int'" -#: cp/decl.c:1098 +#: cp/decl.c:5848 #, gcc-internal-format -msgid "library function %q#D redeclared as non-function %q#D" +msgid "non-local function %q#D uses anonymous type" msgstr "" -#: cp/decl.c:1103 -#, fuzzy, gcc-internal-format -msgid "conflicts with built-in declaration %q#D" -msgstr "паўторнае абвяшчэнне меткі \"%s\"" - -#: cp/decl.c:1155 cp/decl.c:1264 cp/decl.c:1280 -#, fuzzy, gcc-internal-format -msgid "new declaration %q#D" -msgstr "новае абвяшчэньне `%#D'" - -#: cp/decl.c:1156 -#, fuzzy, gcc-internal-format -msgid "ambiguates built-in declaration %q#D" -msgstr "паўторнае абвяшчэнне меткі \"%s\"" - -#: cp/decl.c:1227 +#: cp/decl.c:5851 cp/decl.c:6121 #, gcc-internal-format -msgid "%q#D redeclared as different kind of symbol" +msgid "%q+#D does not refer to the unqualified type, so it is not used for linkage" msgstr "" -#: cp/decl.c:1230 -#, fuzzy, gcc-internal-format -msgid "previous declaration of %q#D" -msgstr "папярэдняе абвяшчэньне `%#D'" - -#: cp/decl.c:1249 -#, fuzzy, gcc-internal-format -msgid "declaration of template %q#D" -msgstr "абвяшчэньне шаблёну `%#D'" - -#: cp/decl.c:1250 cp/name-lookup.c:509 -#, fuzzy, gcc-internal-format -msgid "conflicts with previous declaration %q#D" -msgstr "канфлікт з папярэднім абвяшчэньнем `%#D'" +#: cp/decl.c:5857 +#, gcc-internal-format +msgid "non-local function %q#D uses local type %qT" +msgstr "" -#: cp/decl.c:1265 cp/decl.c:1281 +#: cp/decl.c:5880 #, fuzzy, gcc-internal-format -msgid "ambiguates old declaration %q#D" -msgstr "паўторнае абвяшчэнне меткі \"%s\"" +msgid "%smember function %qD cannot have cv-qualifier" +msgstr "віртуальныя функцыі не могуць быць сяброўскімі" -#: cp/decl.c:1273 -#, fuzzy, gcc-internal-format -msgid "declaration of C function %q#D conflicts with" -msgstr "няма папярэдняга аб'яўлення для \"%s\"" +#: cp/decl.c:5949 +#, gcc-internal-format +msgid "definition of implicitly-declared %qD" +msgstr "" -#: cp/decl.c:1275 -#, fuzzy, gcc-internal-format -msgid "previous declaration %q#D here" -msgstr "няма папярэдняга аб'яўлення для \"%s\"" +#: cp/decl.c:5969 cp/decl2.c:704 +#, gcc-internal-format +msgid "no %q#D member function declared in class %qT" +msgstr "" -#: cp/decl.c:1288 -#, fuzzy, gcc-internal-format -msgid "conflicting declaration %q#D" -msgstr "паўторнае абвяшчэнне меткі \"%s\"" +#. DRs 132, 319 and 389 seem to indicate types with +#. no linkage can only be used to declare extern "C" +#. entities. Since it's not always an error in the +#. ISO C++ 90 Standard, we only issue a warning. +#: cp/decl.c:6118 +#, gcc-internal-format +msgid "non-local variable %q#D uses anonymous type" +msgstr "" -#: cp/decl.c:1289 -#, fuzzy, gcc-internal-format -msgid "%qD has a previous declaration as %q#D" -msgstr "няма папярэдняга аб'яўлення для \"%s\"" +#: cp/decl.c:6127 +#, gcc-internal-format +msgid "non-local variable %q#D uses local type %qT" +msgstr "" -#. [namespace.alias] -#. -#. A namespace-name or namespace-alias shall not be declared as -#. the name of any other entity in the same declarative region. -#. A namespace-name defined at global scope shall not be -#. declared as the name of any other entity in any global scope -#. of the program. -#: cp/decl.c:1342 -#, fuzzy, gcc-internal-format -msgid "declaration of namespace %qD conflicts with" -msgstr "абвяшчэньне шаблёну `%#D'" +#: cp/decl.c:6244 +#, gcc-internal-format +msgid "invalid in-class initialization of static data member of non-integral type %qT" +msgstr "" -#: cp/decl.c:1343 -#, fuzzy, gcc-internal-format -msgid "previous declaration of namespace %qD here" -msgstr "няма папярэдняга аб'яўлення для \"%s\"" +#: cp/decl.c:6254 +#, gcc-internal-format +msgid "ISO C++ forbids in-class initialization of non-const static member %qD" +msgstr "" -#: cp/decl.c:1355 -#, fuzzy, gcc-internal-format -msgid "%q#D previously defined here" -msgstr "папярэдняе вызначэньне" +#: cp/decl.c:6258 +#, gcc-internal-format +msgid "ISO C++ forbids initialization of member constant %qD of non-integral type %qT" +msgstr "" -#: cp/decl.c:1356 +#: cp/decl.c:6278 #, fuzzy, gcc-internal-format -msgid "%q#D previously declared here" -msgstr "няма папярэдняга аб'яўлення для \"%s\"" +msgid "size of array %qD has non-integral type %qT" +msgstr "памер масіва `%D' не цэлалікавы тып" -#. Prototype decl follows defn w/o prototype. -#: cp/decl.c:1365 +#: cp/decl.c:6280 #, fuzzy, gcc-internal-format -msgid "prototype for %q#D" -msgstr "няма папярэдняга прататыпа для \"%s\"" +msgid "size of array has non-integral type %qT" +msgstr "памер масіва \"%s\" адмоўны" -#: cp/decl.c:1366 +#: cp/decl.c:6316 #, fuzzy, gcc-internal-format -msgid "%Jfollows non-prototype definition here" -msgstr "папярэдняе вызначэньне" +msgid "size of array %qD is negative" +msgstr "памер масіва `%D' - адмоўны" -#: cp/decl.c:1378 -#, fuzzy, gcc-internal-format -msgid "previous declaration of %q#D with %qL linkage" -msgstr "няма папярэдняга аб'яўлення для \"%s\"" +#: cp/decl.c:6318 +#, gcc-internal-format +msgid "size of array is negative" +msgstr "адмоўны памер масіва " -#: cp/decl.c:1380 +#: cp/decl.c:6326 #, fuzzy, gcc-internal-format -msgid "conflicts with new declaration with %qL linkage" -msgstr "секцыя \"%s\" канфліктуе з папярэдняй дэкларацыяй" +msgid "ISO C++ forbids zero-size array %qD" +msgstr "ISO C не дазваляе дэкларацыі метак (label)" -#: cp/decl.c:1403 cp/decl.c:1410 +#: cp/decl.c:6328 #, fuzzy, gcc-internal-format -msgid "default argument given for parameter %d of %q#D" -msgstr "нехапае аргументаў у функцыі \"%s\"" +msgid "ISO C++ forbids zero-size array" +msgstr "ISO C не дазваляе дэкларацыі метак (label)" -#: cp/decl.c:1405 cp/decl.c:1412 +#: cp/decl.c:6335 #, fuzzy, gcc-internal-format -msgid "after previous specification in %q#D" -msgstr "няма папярэдняга аб'яўлення для \"%s\"" +msgid "size of array %qD is not an integral constant-expression" +msgstr "памер масіва \"%s\" адмоўны" -#: cp/decl.c:1421 +#: cp/decl.c:6338 #, gcc-internal-format -msgid "%q#D was used before it was declared inline" +msgid "size of array is not an integral constant-expression" msgstr "" -#: cp/decl.c:1422 +#: cp/decl.c:6343 #, fuzzy, gcc-internal-format -msgid "%Jprevious non-inline declaration here" -msgstr "няма папярэдняга аб'яўлення для \"%s\"" +msgid "ISO C++ forbids variable-size array %qD" +msgstr "ISO C не дазваляе дэкларацыі метак (label)" -#: cp/decl.c:1474 +#: cp/decl.c:6345 #, fuzzy, gcc-internal-format -msgid "redundant redeclaration of %qD in same scope" -msgstr "паўторнае абвяшчэнне меткі \"%s\"" +msgid "ISO C++ forbids variable-size array" +msgstr "ISO C не дазваляе дэкларацыі метак (label)" -#: cp/decl.c:1568 +#: cp/decl.c:6375 #, gcc-internal-format -msgid "declaration of %qF throws different exceptions" +msgid "overflow in array dimension" msgstr "" -#: cp/decl.c:1570 -#, fuzzy, gcc-internal-format -msgid "than previous declaration %qF" -msgstr "няма папярэдняга аб'яўлення для \"%s\"" - -#. From [temp.expl.spec]: -#. -#. If a template, a member template or the member of a class -#. template is explicitly specialized then that -#. specialization shall be declared before the first use of -#. that specialization that would cause an implicit -#. instantiation to take place, in every translation unit in -#. which such a use occurs. -#: cp/decl.c:1731 +#: cp/decl.c:6449 #, fuzzy, gcc-internal-format -msgid "explicit specialization of %qD after first use" -msgstr "ініцыялізацыя" +msgid "declaration of %qD as %s" +msgstr "абвяшчэньне `%#D'" -#: cp/decl.c:1810 +#: cp/decl.c:6451 #, gcc-internal-format -msgid "%J%qD: visibility attribute ignored because it" +msgid "creating %s" msgstr "" -#: cp/decl.c:1812 -#, fuzzy, gcc-internal-format -msgid "%Jconflicts with previous declaration here" -msgstr "канфлікт з папярэднім абвяшчэньнем `%#D'" - -#: cp/decl.c:2056 +#: cp/decl.c:6463 #, gcc-internal-format -msgid "label %qE referenced outside of any function" +msgid "declaration of %qD as multidimensional array must have bounds for all dimensions except the first" msgstr "" -#: cp/decl.c:2152 cp/decl.c:2176 cp/decl.c:2264 -#, fuzzy, gcc-internal-format -msgid "jump to label %qD" -msgstr "паўтарэнне \"%s\"" - -#: cp/decl.c:2154 cp/decl.c:2178 +#: cp/decl.c:6467 #, gcc-internal-format -msgid "jump to case label" +msgid "multidimensional array must have bounds for all dimensions except the first" msgstr "" -#: cp/decl.c:2157 cp/decl.c:2181 -#, fuzzy, gcc-internal-format -msgid "%H from here" -msgstr " адсюль" - -#: cp/decl.c:2162 -#, fuzzy, gcc-internal-format -msgid " crosses initialization of %q#D" -msgstr "ініцыялізацыя" - -#: cp/decl.c:2165 cp/decl.c:2280 +#: cp/decl.c:6502 #, gcc-internal-format -msgid " enters scope of non-POD %q#D" +msgid "return type specification for constructor invalid" msgstr "" -#: cp/decl.c:2185 cp/decl.c:2284 +#: cp/decl.c:6512 #, gcc-internal-format -msgid " enters try block" +msgid "return type specification for destructor invalid" msgstr "" -#: cp/decl.c:2187 cp/decl.c:2286 +#: cp/decl.c:6525 #, gcc-internal-format -msgid " enters catch block" +msgid "operator %qT declared to return %qT" msgstr "" -#: cp/decl.c:2265 +#: cp/decl.c:6527 #, gcc-internal-format -msgid " from here" -msgstr " адсюль" +msgid "return type specified for %" +msgstr "" -#. Can't skip init of __exception_info. -#: cp/decl.c:2276 +#: cp/decl.c:6549 #, gcc-internal-format -msgid "%J enters catch block" +msgid "unnamed variable or field declared void" msgstr "" -#: cp/decl.c:2278 +#: cp/decl.c:6553 #, fuzzy, gcc-internal-format -msgid " skips initialization of %q#D" -msgstr "ініцыялізацыя" +msgid "variable or field %qE declared void" +msgstr "тып параметра \"%s\" не аб'яўлены" -#: cp/decl.c:2312 +#: cp/decl.c:6556 #, gcc-internal-format -msgid "label named wchar_t" +msgid "variable or field declared void" +msgstr "" + +#: cp/decl.c:6711 +#, gcc-internal-format +msgid "type %qT is not derived from type %qT" msgstr "" -#: cp/decl.c:2315 +#: cp/decl.c:6731 cp/decl.c:6823 cp/decl.c:7948 #, fuzzy, gcc-internal-format -msgid "duplicate label %qD" -msgstr "паўтарэнне \"%s\"" +msgid "declaration of %qD as non-function" +msgstr "няма папярэдняга аб'яўлення для \"%s\"" -#: cp/decl.c:2563 cp/parser.c:3525 +#: cp/decl.c:6737 #, fuzzy, gcc-internal-format -msgid "%qD used without template parameters" -msgstr "нявернае выкарыстанне \"restict\"" +msgid "declaration of %qD as non-member" +msgstr "абвяшчэньне `%#D'" -#: cp/decl.c:2580 cp/decl.c:2671 +#: cp/decl.c:6767 #, gcc-internal-format -msgid "no class template named %q#T in %q#T" +msgid "declarator-id missing; using reserved word %qD" msgstr "" -#: cp/decl.c:2601 cp/decl.c:2611 cp/decl.c:2631 +#: cp/decl.c:6856 #, fuzzy, gcc-internal-format -msgid "no type named %q#T in %q#T" -msgstr "вяртаемы тып \"%s\" не \"int\"" +msgid "two or more data types in declaration of %qs" +msgstr "пустое абвяшчэнне" -#: cp/decl.c:2680 +#: cp/decl.c:6899 #, fuzzy, gcc-internal-format -msgid "template parameters do not match template" -msgstr "віртуальныя функцыі не могуць быць сяброўскімі" +msgid "ISO C++ does not support %" +msgstr "ISO C++ не падтрымлівае \"long long\"" -#: cp/decl.c:2681 cp/friend.c:317 cp/friend.c:325 +#: cp/decl.c:6921 #, fuzzy, gcc-internal-format -msgid "%qD declared here" -msgstr "\"%s\" не абвешчан (першае выкарыстанне ў гэтай функцыі)" +msgid "duplicate %qs" +msgstr "паўтарэньне `%s'" -#: cp/decl.c:3352 -#, gcc-internal-format -msgid "%Jan anonymous union cannot have function members" -msgstr "" +#: cp/decl.c:6959 cp/decl.c:6961 +#, fuzzy, gcc-internal-format +msgid "ISO C++ forbids declaration of %qs with no type" +msgstr "ISO C не дазваляе дэкларацыі метак (label)" -#: cp/decl.c:3370 +#: cp/decl.c:6986 +#, fuzzy, gcc-internal-format +msgid "short, signed or unsigned invalid for %qs" +msgstr "long, short, signed ці unsigned нерэчаісны для \"%s\"" + +#: cp/decl.c:6988 +#, fuzzy, gcc-internal-format +msgid "long, short, signed or unsigned invalid for %qs" +msgstr "long, short, signed ці unsigned нерэчаісны для \"%s\"" + +#: cp/decl.c:6990 #, gcc-internal-format -msgid "member %q#D with constructor not allowed in anonymous aggregate" +msgid "long and short specified together for %qs" msgstr "" -#: cp/decl.c:3374 +#: cp/decl.c:6992 #, gcc-internal-format -msgid "member %q#D with destructor not allowed in anonymous aggregate" +msgid "long or short specified with char for %qs" msgstr "" -#: cp/decl.c:3378 +#: cp/decl.c:6994 #, gcc-internal-format -msgid "member %q#D with copy assignment operator not allowed in anonymous aggregate" +msgid "long or short specified with floating type for %qs" msgstr "" -#: cp/decl.c:3404 +#: cp/decl.c:6996 #, gcc-internal-format -msgid "multiple types in one declaration" +msgid "signed and unsigned given together for %qs" msgstr "" -#: cp/decl.c:3408 +#: cp/decl.c:7002 #, fuzzy, gcc-internal-format -msgid "redeclaration of C++ built-in type %qT" -msgstr "няма папярэдняга аб'яўлення для \"%s\"" +msgid "long, short, signed or unsigned used invalidly for %qs" +msgstr "long, short, signed ці unsigned нерэчаісны для \"%s\"" -#: cp/decl.c:3445 -#, gcc-internal-format -msgid "missing type-name in typedef-declaration" -msgstr "" +#: cp/decl.c:7067 +#, fuzzy, gcc-internal-format +msgid "complex invalid for %qs" +msgstr "complex нерэчаісны для \"%s\"" -#: cp/decl.c:3453 +#: cp/decl.c:7096 #, gcc-internal-format -msgid "ISO C++ prohibits anonymous structs" +msgid "qualifiers are not allowed on declaration of %" msgstr "" -#: cp/decl.c:3460 +#: cp/decl.c:7108 cp/typeck.c:6605 #, fuzzy, gcc-internal-format -msgid "%qs can only be specified for functions" -msgstr "\"%s\" звычайна функцыя" +msgid "ignoring %qV qualifiers added to function type %qT" +msgstr "Нерэчаісны выбар \"%s\"" -#: cp/decl.c:3466 +#: cp/decl.c:7131 #, gcc-internal-format -msgid "% can only be specified inside a class" +msgid "member %qD cannot be declared both virtual and static" msgstr "" -#: cp/decl.c:3468 +#: cp/decl.c:7138 +#, fuzzy, gcc-internal-format +msgid "%<%T::%D%> is not a valid declarator" +msgstr "\"%s\" - гэта не пачатак дэкларацыі" + +#: cp/decl.c:7146 #, gcc-internal-format -msgid "% can only be specified for constructors" +msgid "typedef declaration invalid in parameter declaration" msgstr "" -#: cp/decl.c:3470 +#: cp/decl.c:7150 #, gcc-internal-format -msgid "a storage class can only be specified for objects and functions" +msgid "storage class specifiers invalid in parameter declarations" msgstr "" -#: cp/decl.c:3476 +#: cp/decl.c:7157 #, gcc-internal-format -msgid "qualifiers can only be specified for objects and functions" +msgid "virtual outside class declaration" msgstr "" -#: cp/decl.c:3506 +#: cp/decl.c:7171 cp/decl.c:7180 #, fuzzy, gcc-internal-format -msgid "attribute ignored in declaration of %q#T" -msgstr "няма папярэдняга аб'яўлення для \"%s\"" +msgid "multiple storage classes in declaration of %qs" +msgstr "паўторнае абвяшчэньне адмеціны `%s'" -#: cp/decl.c:3507 +#: cp/decl.c:7203 #, gcc-internal-format -msgid "attribute for %q#T must follow the %qs keyword" +msgid "storage class specified for %qs" msgstr "" -#: cp/decl.c:3630 +#: cp/decl.c:7237 #, gcc-internal-format -msgid "function %q#D is initialized like a variable" +msgid "top-level declaration of %qs specifies %" msgstr "" -#: cp/decl.c:3642 +#: cp/decl.c:7249 #, gcc-internal-format -msgid "declaration of %q#D has % and is initialized" +msgid "storage class specifiers invalid in friend function declarations" msgstr "" -#: cp/decl.c:3672 +#: cp/decl.c:7375 #, gcc-internal-format -msgid "%q#D is not a static member of %q#T" +msgid "destructor cannot be static member function" msgstr "" -#: cp/decl.c:3678 +#: cp/decl.c:7378 #, gcc-internal-format -msgid "ISO C++ does not permit %<%T::%D%> to be defined as %<%T::%D%>" +msgid "destructors may not be cv-qualified" msgstr "" -#: cp/decl.c:3687 +#: cp/decl.c:7398 #, gcc-internal-format -msgid "template header not allowed in member definition of explicitly specialized class" +msgid "constructor cannot be static member function" msgstr "" -#: cp/decl.c:3695 -#, fuzzy, gcc-internal-format -msgid "duplicate initialization of %qD" -msgstr "паўторнае абвяшчэнне меткі \"%s\"" - -#: cp/decl.c:3733 +#: cp/decl.c:7401 #, gcc-internal-format -msgid "declaration of %q#D outside of class is not definition" +msgid "constructors cannot be declared virtual" msgstr "" -#: cp/decl.c:3782 -#, fuzzy, gcc-internal-format -msgid "variable %q#D has initializer but incomplete type" -msgstr "\"%s\" мае незавершаны тып" - -#: cp/decl.c:3789 cp/decl.c:4413 -#, fuzzy, gcc-internal-format -msgid "elements of array %q#D have incomplete type" -msgstr "\"%s\" мае незавершаны тып" - -#: cp/decl.c:3805 +#: cp/decl.c:7406 #, gcc-internal-format -msgid "aggregate %q#D has incomplete type and cannot be defined" +msgid "constructors may not be cv-qualified" msgstr "" -#: cp/decl.c:3855 +#: cp/decl.c:7426 +#, fuzzy, gcc-internal-format +msgid "can't initialize friend function %qs" +msgstr "не магу ініцыялізаваць сяброўскую функцыю \"%s\"" + +#. Cannot be both friend and virtual. +#: cp/decl.c:7430 #, gcc-internal-format -msgid "%qD declared as reference but not initialized" -msgstr "" +msgid "virtual functions cannot be friends" +msgstr "віртуальныя функцыі не могуць быць сяброўскімі" -#: cp/decl.c:3861 +#: cp/decl.c:7434 #, gcc-internal-format -msgid "ISO C++ forbids use of initializer list to initialize reference %qD" +msgid "friend declaration not in class definition" msgstr "" -#: cp/decl.c:3887 +#: cp/decl.c:7436 #, fuzzy, gcc-internal-format -msgid "cannot initialize %qT from %qT" +msgid "can't define friend function %qs in a local class definition" msgstr "не магу ініцыялізаваць сяброўскую функцыю \"%s\"" -#: cp/decl.c:3920 +#: cp/decl.c:7449 #, gcc-internal-format -msgid "initializer fails to determine size of %qD" +msgid "destructors may not have parameters" msgstr "" -#: cp/decl.c:3925 +#: cp/decl.c:7468 cp/decl.c:7475 #, fuzzy, gcc-internal-format -msgid "array size missing in %qD" -msgstr "прапушчан памер масіва ў `%D'" +msgid "cannot declare reference to %q#T" +msgstr "Не магу знайсці файл для класа %s." -#: cp/decl.c:3935 +#: cp/decl.c:7469 #, fuzzy, gcc-internal-format -msgid "zero-size array %qD" -msgstr "нулявы памер масіва `%D'" +msgid "cannot declare pointer to %q#T" +msgstr "\"%s\" мае незавершаны тып" -#. An automatic variable with an incomplete type: that is an error. -#. Don't talk about array types here, since we took care of that -#. message in grokdeclarator. -#: cp/decl.c:3974 +#: cp/decl.c:7477 #, gcc-internal-format -msgid "storage size of %qD isn't known" +msgid "cannot declare pointer to %q#T member" msgstr "" -#: cp/decl.c:3996 -#, fuzzy, gcc-internal-format -msgid "storage size of %qD isn't constant" -msgstr "тып параметра \"%s\" не аб'яўлены" - -#: cp/decl.c:4051 +#: cp/decl.c:7516 #, gcc-internal-format -msgid "sorry: semantics of inline function static data %q#D are wrong (you'll wind up with multiple copies)" +msgid "%qD is a namespace" msgstr "" -#: cp/decl.c:4054 +#: cp/decl.c:7555 #, gcc-internal-format -msgid "%J you can work around this by removing the initializer" +msgid "template-id %qD used as a declarator" msgstr "" -#: cp/decl.c:4081 -#, fuzzy, gcc-internal-format -msgid "uninitialized const %qD" -msgstr "не магу ініцыялізаваць сяброўскую функцыю \"%s\"" +#: cp/decl.c:7603 +#, gcc-internal-format +msgid "extra qualification %<%T::%> on member %qs" +msgstr "" -#: cp/decl.c:4146 +#: cp/decl.c:7621 #, gcc-internal-format -msgid "name %qD used in a GNU-style designated initializer for an array" +msgid "cannot declare member function %<%T::%s%> within %<%T%>" msgstr "" -#: cp/decl.c:4217 +#: cp/decl.c:7636 #, gcc-internal-format -msgid "brace-enclosed initializer used to initialize %qT" +msgid "cannot declare member %<%T::%s%> within %qT" msgstr "" -#: cp/decl.c:4282 +#: cp/decl.c:7676 #, gcc-internal-format -msgid "initializer for %qT must be brace-enclosed" +msgid "data member may not have variably modified type %qT" msgstr "" -#: cp/decl.c:4298 +#: cp/decl.c:7678 #, gcc-internal-format -msgid "ISO C++ does not allow designated initializers" +msgid "parameter may not have variably modified type %qT" msgstr "" -#: cp/decl.c:4302 +#. [dcl.fct.spec] The explicit specifier shall only be used in +#. declarations of constructors within a class definition. +#: cp/decl.c:7686 #, gcc-internal-format -msgid "%qT has no non-static data member named %qD" +msgid "only declarations of constructors can be %" msgstr "" -#: cp/decl.c:4366 +#: cp/decl.c:7694 #, fuzzy, gcc-internal-format -msgid "too many initializers for %qT" -msgstr "не магу ініцыялізаваць сяброўскую функцыю \"%s\"" +msgid "non-member %qs cannot be declared %" +msgstr "віртуальныя функцыі не могуць быць сяброўскімі" -#: cp/decl.c:4407 +#: cp/decl.c:7699 #, gcc-internal-format -msgid "variable-sized object %qD may not be initialized" +msgid "non-object member %qs cannot be declared %" msgstr "" -#: cp/decl.c:4418 +#: cp/decl.c:7705 #, fuzzy, gcc-internal-format -msgid "%qD has incomplete type" -msgstr "\"%s\" мае незавершаны тып" +msgid "function %qs cannot be declared %" +msgstr "віртуальныя функцыі не могуць быць сяброўскімі" + +#: cp/decl.c:7710 +#, fuzzy, gcc-internal-format +msgid "static %qs cannot be declared %" +msgstr "віртуальныя функцыі не могуць быць сяброўскімі" + +#: cp/decl.c:7715 +#, fuzzy, gcc-internal-format +msgid "const %qs cannot be declared %" +msgstr "віртуальныя функцыі не могуць быць сяброўскімі" -#: cp/decl.c:4472 +#: cp/decl.c:7735 #, gcc-internal-format -msgid "%qD must be initialized by constructor, not by %<{...}%>" +msgid "%Jtypedef name may not be a nested-name-specifier" msgstr "" -#: cp/decl.c:4508 +#: cp/decl.c:7751 #, gcc-internal-format -msgid "array %qD initialized by parenthesized string literal %qE" +msgid "ISO C++ forbids nested type %qD with same name as enclosing class" msgstr "" -#: cp/decl.c:4523 -#, fuzzy, gcc-internal-format -msgid "structure %qD with uninitialized const members" -msgstr "параметр \"%s\" ініцыялізаваны" - -#: cp/decl.c:4525 +#: cp/decl.c:7850 #, fuzzy, gcc-internal-format -msgid "structure %qD with uninitialized reference members" -msgstr "параметр \"%s\" ініцыялізаваны" +msgid "qualified function types cannot be used to declare %s functions" +msgstr "віртуальныя функцыі не могуць быць сяброўскімі" -#: cp/decl.c:4725 +#: cp/decl.c:7876 #, gcc-internal-format -msgid "assignment (not initialization) in declaration" +msgid "type qualifiers specified for friend class declaration" msgstr "" -#: cp/decl.c:4742 +#: cp/decl.c:7881 #, fuzzy, gcc-internal-format -msgid "cannot initialize %qD to namespace %qD" -msgstr "не магу ініцыялізаваць сяброўскую функцыю \"%s\"" +msgid "% specified for friend class declaration" +msgstr "паўторнае абвяшчэнне меткі \"%s\"" -#: cp/decl.c:4783 +#: cp/decl.c:7889 #, fuzzy, gcc-internal-format -msgid "shadowing previous type declaration of %q#D" -msgstr "няма папярэдняга аб'яўлення для \"%s\"" +msgid "template parameters cannot be friends" +msgstr "віртуальныя функцыі не могуць быць сяброўскімі" -#: cp/decl.c:4817 +#: cp/decl.c:7891 #, gcc-internal-format -msgid "%qD cannot be thread-local because it has non-POD type %qT" +msgid "friend declaration requires class-key, i.e. %" msgstr "" -#: cp/decl.c:4832 +#: cp/decl.c:7895 #, gcc-internal-format -msgid "%qD is thread-local and so cannot be dynamically initialized" +msgid "friend declaration requires class-key, i.e. %" msgstr "" -#: cp/decl.c:5391 +#: cp/decl.c:7908 #, gcc-internal-format -msgid "destructor for alien class %qT cannot be a member" +msgid "trying to make class %qT a friend of global scope" msgstr "" -#: cp/decl.c:5393 +#: cp/decl.c:7919 #, gcc-internal-format -msgid "constructor for alien class %qT cannot be a member" +msgid "invalid qualifiers on non-member function type" msgstr "" -#: cp/decl.c:5414 +#: cp/decl.c:7938 #, gcc-internal-format -msgid "%qD declared as a % %s" +msgid "abstract declarator %qT used as declaration" msgstr "" -#: cp/decl.c:5416 -#, gcc-internal-format -msgid "%qD declared as an % %s" -msgstr "" +#: cp/decl.c:7963 +#, fuzzy, gcc-internal-format +msgid "cannot use %<::%> in parameter declaration" +msgstr "Не магу знайсці дэкларацыю пратакола для \"%s\"" -#: cp/decl.c:5418 -#, gcc-internal-format -msgid "% and % function specifiers on %qD invalid in %s declaration" -msgstr "" +#. Something like struct S { int N::j; }; +#: cp/decl.c:8008 +#, fuzzy, gcc-internal-format +msgid "invalid use of %<::%>" +msgstr "нерэчаіснае выкарыстаньне `::'" -#: cp/decl.c:5422 +#: cp/decl.c:8023 #, gcc-internal-format -msgid "%qD declared as a friend" +msgid "can't make %qD into a method -- not in a class" msgstr "" -#: cp/decl.c:5428 +#: cp/decl.c:8032 #, fuzzy, gcc-internal-format -msgid "%qD declared with an exception specification" +msgid "function %qD declared virtual inside a union" msgstr "\"%s\" не абвешчан (першае выкарыстанне ў гэтай функцыі)" -#: cp/decl.c:5514 +#: cp/decl.c:8041 #, gcc-internal-format -msgid "cannot declare %<::main%> to be a template" +msgid "%qD cannot be declared virtual, since it is always static" msgstr "" -#: cp/decl.c:5516 +#: cp/decl.c:8059 #, gcc-internal-format -msgid "cannot declare %<::main%> to be inline" +msgid "expected qualified name in friend declaration for destructor %qD" msgstr "" -#: cp/decl.c:5518 +#: cp/decl.c:8069 +#, fuzzy, gcc-internal-format +msgid "declaration of %qD as member of %qT" +msgstr "абвяшчэньне шаблёну `%#D'" + +#: cp/decl.c:8145 +#, fuzzy, gcc-internal-format +msgid "field %qD has incomplete type" +msgstr "\"%s\" мае незавершаны тып" + +#: cp/decl.c:8147 +#, fuzzy, gcc-internal-format +msgid "name %qT has incomplete type" +msgstr "\"%s\" мае незавершаны тып" + +#: cp/decl.c:8156 +#, fuzzy, gcc-internal-format +msgid " in instantiation of template %qT" +msgstr "абвяшчэньне шаблёну `%#D'" + +#: cp/decl.c:8166 +#, fuzzy, gcc-internal-format +msgid "%qE is neither function nor member function; cannot be declared friend" +msgstr "віртуальныя функцыі не могуць быць сяброўскімі" + +#: cp/decl.c:8177 #, gcc-internal-format -msgid "cannot declare %<::main%> to be static" +msgid "member functions are implicitly friends of their class" msgstr "" -#: cp/decl.c:5522 +#. An attempt is being made to initialize a non-static +#. member. But, from [class.mem]: +#. +#. 4 A member-declarator can contain a +#. constant-initializer only if it declares a static +#. member (_class.static_) of integral or enumeration +#. type, see _class.static.data_. +#. +#. This used to be relatively common practice, but +#. the rest of the compiler does not correctly +#. handle the initialization unless the member is +#. static so we make it static below. +#: cp/decl.c:8217 #, fuzzy, gcc-internal-format -msgid "%<::main%> must return %" -msgstr "`main' павінна вяртаць `int'" +msgid "ISO C++ forbids initialization of member %qD" +msgstr "ініцыялізацыя" -#: cp/decl.c:5552 +#: cp/decl.c:8219 #, gcc-internal-format -msgid "non-local function %q#D uses anonymous type" +msgid "making %qD static" msgstr "" -#: cp/decl.c:5555 cp/decl.c:5891 +#: cp/decl.c:8288 #, gcc-internal-format -msgid "%q#D does not refer to the unqualified type, so it is not used for linkage" +msgid "storage class % invalid for function %qs" msgstr "" -#: cp/decl.c:5561 +#: cp/decl.c:8290 #, gcc-internal-format -msgid "non-local function %q#D uses local type %qT" +msgid "storage class % invalid for function %qs" msgstr "" -#: cp/decl.c:5584 -#, fuzzy, gcc-internal-format -msgid "%smember function %qD cannot have cv-qualifier" -msgstr "віртуальныя функцыі не могуць быць сяброўскімі" - -#: cp/decl.c:5608 -#, fuzzy, gcc-internal-format -msgid "defining explicit specialization %qD in friend declaration" -msgstr "ініцыялізацыя" - -#. Something like `template friend void f()'. -#: cp/decl.c:5618 -#, fuzzy, gcc-internal-format -msgid "invalid use of template-id %qD in declaration of primary template" -msgstr "нявернае выкарыстанне \"restict\"" - -#: cp/decl.c:5646 +#: cp/decl.c:8292 #, gcc-internal-format -msgid "default arguments are not allowed in declaration of friend template specialization %qD" +msgid "storage class %<__thread%> invalid for function %qs" msgstr "" -#: cp/decl.c:5654 +#: cp/decl.c:8303 #, gcc-internal-format -msgid "% is not allowed in declaration of friend template specialization %qD" +msgid "% specified invalid for function %qs declared out of global scope" msgstr "" -#: cp/decl.c:5720 +#: cp/decl.c:8306 #, gcc-internal-format -msgid "definition of implicitly-declared %qD" +msgid "% specifier invalid for function %qs declared out of global scope" msgstr "" -#: cp/decl.c:5740 cp/decl2.c:712 +#: cp/decl.c:8314 #, gcc-internal-format -msgid "no %q#D member function declared in class %qT" +msgid "virtual non-class function %qs" msgstr "" -#. DRs 132, 319 and 389 seem to indicate types with -#. no linkage can only be used to declare extern "C" -#. entities. Since it's not always an error in the -#. ISO C++ 90 Standard, we only issue a warning. -#: cp/decl.c:5888 +#: cp/decl.c:8345 #, gcc-internal-format -msgid "non-local variable %q#D uses anonymous type" +msgid "cannot declare member function %qD to have static linkage" msgstr "" -#: cp/decl.c:5897 +#. FIXME need arm citation +#: cp/decl.c:8352 #, gcc-internal-format -msgid "non-local variable %q#D uses local type %qT" +msgid "cannot declare static function inside another function" msgstr "" -#: cp/decl.c:6014 +#: cp/decl.c:8381 #, gcc-internal-format -msgid "invalid in-class initialization of static data member of non-integral type %qT" +msgid "% may not be used when defining (as opposed to declaring) a static data member" msgstr "" -#: cp/decl.c:6024 +#: cp/decl.c:8388 #, gcc-internal-format -msgid "ISO C++ forbids in-class initialization of non-const static member %qD" +msgid "static member %qD declared %" msgstr "" -#: cp/decl.c:6028 +#: cp/decl.c:8393 #, gcc-internal-format -msgid "ISO C++ forbids initialization of member constant %qD of non-integral type %qT" +msgid "cannot explicitly declare member %q#D to have extern linkage" msgstr "" -#: cp/decl.c:6048 +#: cp/decl.c:8531 #, fuzzy, gcc-internal-format -msgid "size of array %qD has non-integral type %qT" -msgstr "памер масіва `%D' не цэлалікавы тып" +msgid "default argument for %q#D has type %qT" +msgstr "звычайны аргумэнт для `%#D' мае тып `%T'" -#: cp/decl.c:6050 +#: cp/decl.c:8534 #, fuzzy, gcc-internal-format -msgid "size of array has non-integral type %qT" -msgstr "памер масіва \"%s\" адмоўны" +msgid "default argument for parameter of type %qT has type %qT" +msgstr "звычайны аргумэнт для `%#D' мае тып `%T'" -#: cp/decl.c:6086 +#: cp/decl.c:8551 #, fuzzy, gcc-internal-format -msgid "size of array %qD is negative" -msgstr "памер масіва `%D' - адмоўны" +msgid "default argument %qE uses local variable %qD" +msgstr "нехапае аргументаў у функцыі \"%s\"" + +#: cp/decl.c:8619 +#, fuzzy, gcc-internal-format +msgid "parameter %qD invalidly declared method type" +msgstr "тып параметра \"%s\" не аб'яўлены" -#: cp/decl.c:6088 +#: cp/decl.c:8643 #, gcc-internal-format -msgid "size of array is negative" -msgstr "адмоўны памер масіва " +msgid "parameter %qD includes %s to array of unknown bound %qT" +msgstr "" -#: cp/decl.c:6096 -#, fuzzy, gcc-internal-format -msgid "ISO C++ forbids zero-size array %qD" -msgstr "ISO C не дазваляе дэкларацыі метак (label)" +#. [class.copy] +#. +#. A declaration of a constructor for a class X is ill-formed if +#. its first parameter is of type (optionally cv-qualified) X +#. and either there are no other parameters or else all other +#. parameters have default arguments. +#. +#. We *don't* complain about member template instantiations that +#. have this form, though; they can occur as we try to decide +#. what constructor to use during overload resolution. Since +#. overload resolution will never prefer such a constructor to +#. the non-template copy constructor (which is either explicitly +#. or implicitly defined), there's no need to worry about their +#. existence. Theoretically, they should never even be +#. instantiated, but that's hard to forestall. +#: cp/decl.c:8802 +#, gcc-internal-format +msgid "invalid constructor; you probably meant %<%T (const %T&)%>" +msgstr "" -#: cp/decl.c:6098 +#: cp/decl.c:8921 #, fuzzy, gcc-internal-format -msgid "ISO C++ forbids zero-size array" -msgstr "ISO C не дазваляе дэкларацыі метак (label)" +msgid "%qD may not be declared within a namespace" +msgstr "\"%s\" не абвешчан (першае выкарыстанне ў гэтай функцыі)" -#: cp/decl.c:6105 +#: cp/decl.c:8923 #, fuzzy, gcc-internal-format -msgid "size of array %qD is not an integral constant-expression" -msgstr "памер масіва \"%s\" адмоўны" +msgid "%qD may not be declared as static" +msgstr "\"%s\" не абвешчан (першае выкарыстанне ў гэтай функцыі)" -#: cp/decl.c:6108 +#: cp/decl.c:8944 #, gcc-internal-format -msgid "size of array is not an integral constant-expression" +msgid "%qD must be a nonstatic member function" msgstr "" -#: cp/decl.c:6113 -#, fuzzy, gcc-internal-format -msgid "ISO C++ forbids variable-size array %qD" -msgstr "ISO C не дазваляе дэкларацыі метак (label)" - -#: cp/decl.c:6115 -#, fuzzy, gcc-internal-format -msgid "ISO C++ forbids variable-size array" -msgstr "ISO C не дазваляе дэкларацыі метак (label)" +#: cp/decl.c:8953 +#, gcc-internal-format +msgid "%qD must be either a non-static member function or a non-member function" +msgstr "" -#: cp/decl.c:6145 +#: cp/decl.c:8973 #, gcc-internal-format -msgid "overflow in array dimension" +msgid "%qD must have an argument of class or enumerated type" msgstr "" -#: cp/decl.c:6219 -#, fuzzy, gcc-internal-format -msgid "declaration of %qD as %s" -msgstr "абвяшчэньне `%#D'" +#: cp/decl.c:9014 +#, gcc-internal-format +msgid "conversion to %s%s will never use a type conversion operator" +msgstr "" -#: cp/decl.c:6221 +#. 13.4.0.3 +#: cp/decl.c:9021 #, gcc-internal-format -msgid "creating %s" +msgid "ISO C++ prohibits overloading operator ?:" msgstr "" -#: cp/decl.c:6233 +#: cp/decl.c:9071 #, gcc-internal-format -msgid "declaration of %qD as multidimensional array must have bounds for all dimensions except the first" +msgid "postfix %qD must take % as its argument" msgstr "" -#: cp/decl.c:6237 +#: cp/decl.c:9075 #, gcc-internal-format -msgid "multidimensional array must have bounds for all dimensions except the first" +msgid "postfix %qD must take % as its second argument" msgstr "" -#: cp/decl.c:6272 +#: cp/decl.c:9082 #, gcc-internal-format -msgid "return type specification for constructor invalid" +msgid "%qD must take either zero or one argument" msgstr "" -#: cp/decl.c:6282 +#: cp/decl.c:9084 #, gcc-internal-format -msgid "return type specification for destructor invalid" +msgid "%qD must take either one or two arguments" msgstr "" -#: cp/decl.c:6295 +#: cp/decl.c:9105 #, gcc-internal-format -msgid "operator %qT declared to return %qT" +msgid "prefix %qD should return %qT" msgstr "" -#: cp/decl.c:6297 +#: cp/decl.c:9111 #, gcc-internal-format -msgid "return type specified for %" +msgid "postfix %qD should return %qT" msgstr "" -#: cp/decl.c:6319 +#: cp/decl.c:9120 #, gcc-internal-format -msgid "unnamed variable or field declared void" +msgid "%qD must take %" msgstr "" -#: cp/decl.c:6323 -#, fuzzy, gcc-internal-format -msgid "variable or field %qE declared void" -msgstr "тып параметра \"%s\" не аб'яўлены" +#: cp/decl.c:9122 cp/decl.c:9130 +#, gcc-internal-format +msgid "%qD must take exactly one argument" +msgstr "" -#: cp/decl.c:6326 +#: cp/decl.c:9132 #, gcc-internal-format -msgid "variable or field declared void" +msgid "%qD must take exactly two arguments" msgstr "" -#: cp/decl.c:6481 +#: cp/decl.c:9140 #, gcc-internal-format -msgid "type %qT is not derived from type %qT" +msgid "user-defined %qD always evaluates both arguments" +msgstr "" + +#: cp/decl.c:9154 +#, gcc-internal-format +msgid "%qD should return by value" msgstr "" -#: cp/decl.c:6501 cp/decl.c:6593 cp/decl.c:7714 +#: cp/decl.c:9166 cp/decl.c:9169 #, fuzzy, gcc-internal-format -msgid "declaration of %qD as non-function" -msgstr "няма папярэдняга аб'яўлення для \"%s\"" +msgid "%qD cannot have default arguments" +msgstr "нехапае аргументаў у функцыі \"%s\"" -#: cp/decl.c:6507 +#: cp/decl.c:9226 #, fuzzy, gcc-internal-format -msgid "declaration of %qD as non-member" -msgstr "абвяшчэньне `%#D'" +msgid "using template type parameter %qT after %qs" +msgstr "нявернае выкарыстанне \"restict\"" -#: cp/decl.c:6537 +#: cp/decl.c:9241 #, gcc-internal-format -msgid "declarator-id missing; using reserved word %qD" +msgid "using typedef-name %qD after %qs" msgstr "" -#: cp/decl.c:6626 +#: cp/decl.c:9242 #, fuzzy, gcc-internal-format -msgid "two or more data types in declaration of %qs" -msgstr "пустое абвяшчэнне" +msgid "%q+D has a previous declaration here" +msgstr "гэта папярэдняе абвяшчэньне" + +#: cp/decl.c:9250 +#, gcc-internal-format +msgid "%qT referred to as %qs" +msgstr "" -#: cp/decl.c:6669 +#: cp/decl.c:9251 cp/decl.c:9258 #, fuzzy, gcc-internal-format -msgid "ISO C++ does not support %" -msgstr "ISO C++ не падтрымлівае \"long long\"" +msgid "%q+T has a previous declaration here" +msgstr "гэта папярэдняе абвяшчэньне" + +#: cp/decl.c:9257 +#, gcc-internal-format +msgid "%qT referred to as enum" +msgstr "" -#: cp/decl.c:6729 cp/decl.c:6731 +#. If a class template appears as elaborated type specifier +#. without a template header such as: +#. +#. template class C {}; +#. void f(class C); // No template header here +#. +#. then the required template argument is missing. +#: cp/decl.c:9272 #, fuzzy, gcc-internal-format -msgid "ISO C++ forbids declaration of %qs with no type" -msgstr "ISO C не дазваляе дэкларацыі метак (label)" +msgid "template argument required for %<%s %T%>" +msgstr "параметр \"%s\" ініцыялізаваны" + +#: cp/decl.c:9320 cp/name-lookup.c:2629 +#, gcc-internal-format +msgid "%qD has the same name as the class in which it is declared" +msgstr "" -#: cp/decl.c:6756 +#: cp/decl.c:9458 #, fuzzy, gcc-internal-format -msgid "short, signed or unsigned invalid for %qs" -msgstr "long, short, signed ці unsigned нерэчаісны для \"%s\"" +msgid "use of enum %q#D without previous declaration" +msgstr "секцыя \"%s\" канфліктуе з папярэдняй дэкларацыяй" -#: cp/decl.c:6758 +#: cp/decl.c:9476 #, fuzzy, gcc-internal-format -msgid "long, short, signed or unsigned invalid for %qs" -msgstr "long, short, signed ці unsigned нерэчаісны для \"%s\"" +msgid "redeclaration of %qT as a non-template" +msgstr "абвяшчэньне шаблёну `%#D'" -#: cp/decl.c:6760 +#: cp/decl.c:9583 #, gcc-internal-format -msgid "long and short specified together for %qs" +msgid "derived union %qT invalid" msgstr "" -#: cp/decl.c:6762 +#: cp/decl.c:9589 #, gcc-internal-format -msgid "long or short specified with char for %qs" +msgid "Java class %qT cannot have multiple bases" msgstr "" -#: cp/decl.c:6764 +#: cp/decl.c:9597 #, gcc-internal-format -msgid "long or short specified with floating type for %qs" +msgid "Java class %qT cannot have virtual bases" msgstr "" -#: cp/decl.c:6766 +#: cp/decl.c:9616 #, gcc-internal-format -msgid "signed and unsigned given together for %qs" +msgid "base type %qT fails to be a struct or class type" msgstr "" -#: cp/decl.c:6772 -#, fuzzy, gcc-internal-format -msgid "long, short, signed or unsigned used invalidly for %qs" -msgstr "long, short, signed ці unsigned нерэчаісны для \"%s\"" - -#: cp/decl.c:6837 -#, fuzzy, gcc-internal-format -msgid "complex invalid for %qs" -msgstr "complex нерэчаісны для \"%s\"" - -#: cp/decl.c:6866 +#: cp/decl.c:9649 #, gcc-internal-format -msgid "qualifiers are not allowed on declaration of %" +msgid "recursive type %qT undefined" msgstr "" -#: cp/decl.c:6878 cp/typeck.c:6402 +#: cp/decl.c:9651 #, fuzzy, gcc-internal-format -msgid "ignoring %qV qualifiers added to function type %qT" -msgstr "Нерэчаісны выбар \"%s\"" +msgid "duplicate base type %qT invalid" +msgstr "паўтарэнне \"restrict\"" -#: cp/decl.c:6901 -#, gcc-internal-format -msgid "member %qD cannot be declared both virtual and static" -msgstr "" +#: cp/decl.c:9721 +#, fuzzy, gcc-internal-format +msgid "multiple definition of %q#T" +msgstr "папярэдняе вызначэньне `%#T'" -#: cp/decl.c:6908 +#: cp/decl.c:9722 #, fuzzy, gcc-internal-format -msgid "%<%T::%D%> is not a valid declarator" -msgstr "\"%s\" - гэта не пачатак дэкларацыі" +msgid "%Jprevious definition here" +msgstr "папярэдняе вызначэньне" -#: cp/decl.c:6916 +#. DR 377 +#. +#. IF no integral type can represent all the enumerator values, the +#. enumeration is ill-formed. +#: cp/decl.c:9861 #, gcc-internal-format -msgid "typedef declaration invalid in parameter declaration" +msgid "no integral type can represent all of the enumerator values for %qT" msgstr "" -#: cp/decl.c:6920 +#: cp/decl.c:9972 #, gcc-internal-format -msgid "storage class specifiers invalid in parameter declarations" +msgid "enumerator value for %qD not integer constant" msgstr "" -#: cp/decl.c:6927 +#: cp/decl.c:10000 #, gcc-internal-format -msgid "virtual outside class declaration" +msgid "overflow in enumeration values at %qD" msgstr "" -#: cp/decl.c:6940 cp/decl.c:6947 +#: cp/decl.c:10075 #, fuzzy, gcc-internal-format -msgid "multiple storage classes in declaration of %qs" -msgstr "паўторнае абвяшчэньне адмеціны `%s'" +msgid "return type %q#T is incomplete" +msgstr "вяртаемы тып \"%s\" не \"int\"" -#: cp/decl.c:6970 +#: cp/decl.c:10185 cp/typeck.c:6352 #, gcc-internal-format -msgid "storage class specified for %qs" +msgid "% should return a reference to %<*this%>" msgstr "" -#: cp/decl.c:7004 +#: cp/decl.c:10520 +#, fuzzy, gcc-internal-format +msgid "parameter %qD declared void" +msgstr "тып параметра \"%s\" не аб'яўлены" + +#: cp/decl.c:11030 +#, fuzzy, gcc-internal-format +msgid "invalid member function declaration" +msgstr "паўторнае абвяшчэнне меткі \"%s\"" + +#: cp/decl.c:11045 +#, fuzzy, gcc-internal-format +msgid "%qD is already defined in class %qT" +msgstr "не знойдзен клас \"%s\"" + +#: cp/decl.c:11255 #, gcc-internal-format -msgid "top-level declaration of %qs specifies %" +msgid "static member function %q#D declared with type qualifiers" msgstr "" -#: cp/decl.c:7016 +#: cp/decl2.c:271 #, gcc-internal-format -msgid "storage class specifiers invalid in friend function declarations" +msgid "name missing for member function" msgstr "" -#: cp/decl.c:7142 +#: cp/decl2.c:364 cp/decl2.c:378 #, gcc-internal-format -msgid "destructor cannot be static member function" +msgid "ambiguous conversion for array subscript" msgstr "" -#: cp/decl.c:7145 +#: cp/decl2.c:372 #, gcc-internal-format -msgid "destructors may not be cv-qualified" +msgid "invalid types %<%T[%T]%> for array subscript" msgstr "" -#: cp/decl.c:7165 +#: cp/decl2.c:415 #, gcc-internal-format -msgid "constructor cannot be static member function" +msgid "deleting array %q#D" msgstr "" -#: cp/decl.c:7168 +#: cp/decl2.c:421 #, gcc-internal-format -msgid "constructors cannot be declared virtual" +msgid "type %q#T argument given to %, expected pointer" msgstr "" -#: cp/decl.c:7173 +#: cp/decl2.c:433 #, gcc-internal-format -msgid "constructors may not be cv-qualified" +msgid "cannot delete a function. Only pointer-to-objects are valid arguments to %" msgstr "" -#: cp/decl.c:7193 +#: cp/decl2.c:441 #, fuzzy, gcc-internal-format -msgid "can't initialize friend function %qs" -msgstr "не магу ініцыялізаваць сяброўскую функцыю \"%s\"" +msgid "deleting %qT is undefined" +msgstr "метка \"%s\" ужываецца, але не вызначана" -#. Cannot be both friend and virtual. -#: cp/decl.c:7197 -#, gcc-internal-format -msgid "virtual functions cannot be friends" -msgstr "віртуальныя функцыі не могуць быць сяброўскімі" +#. 14.5.2.2 [temp.mem] +#. +#. A local class shall not have member templates. +#: cp/decl2.c:477 +#, fuzzy, gcc-internal-format +msgid "invalid declaration of member template %q#D in local class" +msgstr "абвяшчэньне шаблёну `%#D'" -#: cp/decl.c:7201 +#: cp/decl2.c:486 +#, fuzzy, gcc-internal-format +msgid "invalid use of % in template declaration of %q#D" +msgstr "паўторнае абвяшчэнне меткі \"%s\"" + +#: cp/decl2.c:496 cp/pt.c:3020 +#, fuzzy, gcc-internal-format +msgid "template declaration of %q#D" +msgstr "пустое абвяшчэнне" + +#: cp/decl2.c:545 #, gcc-internal-format -msgid "friend declaration not in class definition" +msgid "Java method %qD has non-Java return type %qT" msgstr "" -#: cp/decl.c:7203 -#, fuzzy, gcc-internal-format -msgid "can't define friend function %qs in a local class definition" -msgstr "не магу ініцыялізаваць сяброўскую функцыю \"%s\"" +#: cp/decl2.c:561 +#, gcc-internal-format +msgid "Java method %qD has non-Java parameter type %qT" +msgstr "" -#: cp/decl.c:7216 +#: cp/decl2.c:666 #, gcc-internal-format -msgid "destructors may not have parameters" +msgid "prototype for %q#D does not match any in class %qT" msgstr "" -#: cp/decl.c:7235 cp/decl.c:7242 -#, fuzzy, gcc-internal-format -msgid "cannot declare reference to %q#T" -msgstr "Не магу знайсці файл для класа %s." +#: cp/decl2.c:763 +#, gcc-internal-format +msgid "local class %q#T shall not have static data member %q#D" +msgstr "" -#: cp/decl.c:7236 -#, fuzzy, gcc-internal-format -msgid "cannot declare pointer to %q#T" -msgstr "\"%s\" мае незавершаны тып" +#: cp/decl2.c:771 +#, gcc-internal-format +msgid "initializer invalid for static member with constructor" +msgstr "" -#: cp/decl.c:7244 +#: cp/decl2.c:774 #, gcc-internal-format -msgid "cannot declare pointer to %q#T member" +msgid "(an out of class initialization is required)" msgstr "" -#: cp/decl.c:7283 +#: cp/decl2.c:855 #, gcc-internal-format -msgid "%qD is a namespace" +msgid "member %qD conflicts with virtual function table field name" msgstr "" -#: cp/decl.c:7322 +#: cp/decl2.c:874 #, gcc-internal-format -msgid "template-id %qD used as a declarator" +msgid "applying attributes to template parameters is not implemented" msgstr "" -#: cp/decl.c:7369 +#: cp/decl2.c:884 +#, fuzzy, gcc-internal-format +msgid "%qD is already defined in %qT" +msgstr "не знойдзен клас \"%s\"" + +#: cp/decl2.c:905 +#, fuzzy, gcc-internal-format +msgid "initializer specified for static member function %qD" +msgstr "не магу ініцыялізаваць сяброўскую функцыю \"%s\"" + +#: cp/decl2.c:928 #, gcc-internal-format -msgid "extra qualification %<%T::%> on member %qs ignored" +msgid "field initializer is not constant" msgstr "" -#: cp/decl.c:7388 +#: cp/decl2.c:955 #, gcc-internal-format -msgid "cannot declare member function %<%T::%s%> within %<%T%>" +msgid "% specifiers are not permitted on non-static data members" msgstr "" -#: cp/decl.c:7403 +#: cp/decl2.c:1001 +#, fuzzy, gcc-internal-format +msgid "cannot declare %qD to be a bit-field type" +msgstr "не магу атрымаць адрас бітавага поля \"%s\"" + +#: cp/decl2.c:1011 +#, fuzzy, gcc-internal-format +msgid "cannot declare bit-field %qD with function type" +msgstr "не магу ініцыялізаваць сяброўскую функцыю \"%s\"" + +#: cp/decl2.c:1018 +#, fuzzy, gcc-internal-format +msgid "%qD is already defined in the class %qT" +msgstr "не знойдзен клас \"%s\"" + +#: cp/decl2.c:1025 +#, fuzzy, gcc-internal-format +msgid "static member %qD cannot be a bit-field" +msgstr "віртуальныя функцыі не могуць быць сяброўскімі" + +#: cp/decl2.c:1070 #, gcc-internal-format -msgid "cannot declare member %<%T::%s%> within %qT" +msgid "anonymous struct not inside named type" msgstr "" -#: cp/decl.c:7442 +#: cp/decl2.c:1153 #, gcc-internal-format -msgid "data member may not have variably modified type %qT" +msgid "namespace-scope anonymous aggregates must be static" msgstr "" -#: cp/decl.c:7444 +#: cp/decl2.c:1160 #, gcc-internal-format -msgid "parameter may not have variably modified type %qT" +msgid "anonymous union with no members" msgstr "" -#. [dcl.fct.spec] The explicit specifier shall only be used in -#. declarations of constructors within a class definition. -#: cp/decl.c:7452 +#: cp/decl2.c:1196 #, gcc-internal-format -msgid "only declarations of constructors can be %" +msgid "% must return type %qT" msgstr "" -#: cp/decl.c:7460 -#, fuzzy, gcc-internal-format -msgid "non-member %qs cannot be declared %" -msgstr "віртуальныя функцыі не могуць быць сяброўскімі" +#: cp/decl2.c:1205 +#, gcc-internal-format +msgid "% takes type % (%qT) as first parameter" +msgstr "" -#: cp/decl.c:7465 +#: cp/decl2.c:1234 #, gcc-internal-format -msgid "non-object member %qs cannot be declared %" +msgid "% must return type %qT" msgstr "" -#: cp/decl.c:7471 -#, fuzzy, gcc-internal-format -msgid "function %qs cannot be declared %" -msgstr "віртуальныя функцыі не могуць быць сяброўскімі" +#: cp/decl2.c:1243 +#, gcc-internal-format +msgid "% takes type %qT as first parameter" +msgstr "" -#: cp/decl.c:7476 +#: cp/decl2.c:3076 #, fuzzy, gcc-internal-format -msgid "static %qs cannot be declared %" -msgstr "віртуальныя функцыі не могуць быць сяброўскімі" +msgid "inline function %q+D used but never defined" +msgstr "адмеціна `%D' выкарыстоўвываецца, але ня вызначана" -#: cp/decl.c:7481 +#: cp/decl2.c:3230 #, fuzzy, gcc-internal-format -msgid "const %qs cannot be declared %" -msgstr "віртуальныя функцыі не могуць быць сяброўскімі" +msgid "default argument missing for parameter %P of %q+#D" +msgstr "аргумент для \"%s\" прапушчан" -#: cp/decl.c:7501 +#. Can't throw a reference. +#: cp/except.c:267 #, gcc-internal-format -msgid "%Jtypedef name may not be a nested-name-specifier" +msgid "type %qT is disallowed in Java % or %" msgstr "" -#: cp/decl.c:7517 +#: cp/except.c:278 #, gcc-internal-format -msgid "ISO C++ forbids nested type %qD with same name as enclosing class" +msgid "call to Java % or % with % undefined" msgstr "" -#: cp/decl.c:7616 -#, fuzzy, gcc-internal-format -msgid "qualified function types cannot be used to declare %s functions" -msgstr "віртуальныя функцыі не могуць быць сяброўскімі" +#. Thrown object must be a Throwable. +#: cp/except.c:285 +#, gcc-internal-format +msgid "type %qT is not derived from %" +msgstr "" -#: cp/decl.c:7642 +#: cp/except.c:348 #, gcc-internal-format -msgid "type qualifiers specified for friend class declaration" +msgid "mixing C++ and Java catches in a single translation unit" msgstr "" -#: cp/decl.c:7647 -#, fuzzy, gcc-internal-format -msgid "% specified for friend class declaration" -msgstr "паўторнае абвяшчэнне меткі \"%s\"" +#: cp/except.c:607 +#, gcc-internal-format +msgid "throwing NULL, which has integral, not pointer type" +msgstr "" -#: cp/decl.c:7655 -#, fuzzy, gcc-internal-format -msgid "template parameters cannot be friends" -msgstr "віртуальныя функцыі не могуць быць сяброўскімі" +#: cp/except.c:630 cp/init.c:1923 +#, gcc-internal-format +msgid "%qD should never be overloaded" +msgstr "" -#: cp/decl.c:7657 +#: cp/except.c:697 #, gcc-internal-format -msgid "friend declaration requires class-key, i.e. %" +msgid " in thrown expression" msgstr "" -#: cp/decl.c:7661 +#: cp/except.c:844 #, gcc-internal-format -msgid "friend declaration requires class-key, i.e. %" +msgid "expression %qE of abstract class type %qT cannot be used in throw-expression" msgstr "" -#: cp/decl.c:7674 +#: cp/except.c:929 #, gcc-internal-format -msgid "trying to make class %qT a friend of global scope" +msgid "%Hexception of type %qT will be caught" msgstr "" -#: cp/decl.c:7685 +#: cp/except.c:931 #, gcc-internal-format -msgid "invalid qualifiers on non-member function type" +msgid "%H by earlier handler for %qT" msgstr "" -#: cp/decl.c:7704 +#: cp/except.c:961 #, gcc-internal-format -msgid "abstract declarator %qT used as declaration" +msgid "%H%<...%> handler must be the last handler for its try block" msgstr "" -#: cp/decl.c:7729 +#: cp/friend.c:152 #, fuzzy, gcc-internal-format -msgid "cannot use %<::%> in parameter declaration" -msgstr "Не магу знайсці дэкларацыю пратакола для \"%s\"" +msgid "%qD is already a friend of class %qT" +msgstr "не знойдзен клас \"%s\"" -#. Something like struct S { int N::j; }; -#: cp/decl.c:7774 +#: cp/friend.c:228 #, fuzzy, gcc-internal-format -msgid "invalid use of %<::%>" -msgstr "нерэчаіснае выкарыстаньне `::'" +msgid "invalid type %qT declared %" +msgstr "тып параметра \"%s\" не аб'яўлены" -#: cp/decl.c:7789 +#. [temp.friend] +#. Friend declarations shall not declare partial +#. specializations. +#. template friend class T::X; +#. [temp.friend] +#. Friend declarations shall not declare partial +#. specializations. +#: cp/friend.c:244 cp/friend.c:274 #, gcc-internal-format -msgid "can't make %qD into a method -- not in a class" +msgid "partial specialization %qT declared %" msgstr "" -#: cp/decl.c:7798 -#, fuzzy, gcc-internal-format -msgid "function %qD declared virtual inside a union" -msgstr "\"%s\" не абвешчан (першае выкарыстанне ў гэтай функцыі)" - -#: cp/decl.c:7807 +#: cp/friend.c:252 #, gcc-internal-format -msgid "%qD cannot be declared virtual, since it is always static" +msgid "class %qT is implicitly friends with itself" msgstr "" -#: cp/decl.c:7825 -#, fuzzy, gcc-internal-format -msgid "declaration of %qD as member of %qT" -msgstr "абвяшчэньне шаблёну `%#D'" - -#: cp/decl.c:7901 +#: cp/friend.c:310 #, fuzzy, gcc-internal-format -msgid "field %qD has incomplete type" +msgid "%qT is not a member of %qT" msgstr "\"%s\" мае незавершаны тып" -#: cp/decl.c:7903 +#: cp/friend.c:315 #, fuzzy, gcc-internal-format -msgid "name %qT has incomplete type" +msgid "%qT is not a member class template of %qT" msgstr "\"%s\" мае незавершаны тып" -#: cp/decl.c:7912 +#: cp/friend.c:323 +#, gcc-internal-format +msgid "%qT is not a nested class of %qT" +msgstr "" + +#. template friend class T; +#: cp/friend.c:336 #, fuzzy, gcc-internal-format -msgid " in instantiation of template %qT" -msgstr "абвяшчэньне шаблёну `%#D'" +msgid "template parameter type %qT declared %" +msgstr "тып параметра \"%s\" не аб'яўлены" -#: cp/decl.c:7922 +#. template friend class A; where A is not a template +#: cp/friend.c:342 #, fuzzy, gcc-internal-format -msgid "%qE is neither function nor member function; cannot be declared friend" -msgstr "віртуальныя функцыі не могуць быць сяброўскімі" +msgid "%q#T is not a template" +msgstr "\"%s\" мае незавершаны тып" -#: cp/decl.c:7933 -#, gcc-internal-format -msgid "member functions are implicitly friends of their class" -msgstr "" +#: cp/friend.c:364 +#, fuzzy, gcc-internal-format +msgid "%qD is already a friend of %qT" +msgstr "не знойдзен клас \"%s\"" -#. An attempt is being made to initialize a non-static -#. member. But, from [class.mem]: -#. -#. 4 A member-declarator can contain a -#. constant-initializer only if it declares a static -#. member (_class.static_) of integral or enumeration -#. type, see _class.static.data_. -#. -#. This used to be relatively common practice, but -#. the rest of the compiler does not correctly -#. handle the initialization unless the member is -#. static so we make it static below. -#: cp/decl.c:7973 +#: cp/friend.c:373 #, fuzzy, gcc-internal-format -msgid "ISO C++ forbids initialization of member %qD" -msgstr "ініцыялізацыя" +msgid "%qT is already a friend of %qT" +msgstr "не знойдзен клас \"%s\"" -#: cp/decl.c:7975 +#: cp/friend.c:497 #, gcc-internal-format -msgid "making %qD static" +msgid "member %qD declared as friend before type %qT defined" msgstr "" -#: cp/decl.c:8033 +#: cp/friend.c:553 #, gcc-internal-format -msgid "storage class % invalid for function %qs" +msgid "friend declaration %q#D declares a non-template function" msgstr "" -#: cp/decl.c:8035 +#: cp/friend.c:557 #, gcc-internal-format -msgid "storage class % invalid for function %qs" +msgid "(if this is not what you intended, make sure the function template has already been declared and add <> after the function name here) -Wno-non-template-friend disables this warning" msgstr "" -#: cp/decl.c:8037 +#: cp/init.c:327 +#, fuzzy, gcc-internal-format +msgid "%J%qD should be initialized in the member initialization list" +msgstr "нерэчаісны ініцыялізатар" + +#: cp/init.c:375 #, gcc-internal-format -msgid "storage class %<__thread%> invalid for function %qs" +msgid "%Jdefault-initialization of %q#D, which has reference type" msgstr "" -#: cp/decl.c:8048 +#: cp/init.c:381 +#, fuzzy, gcc-internal-format +msgid "%Juninitialized reference member %qD" +msgstr "прапушчан ініцыялізатар" + +#: cp/init.c:384 #, gcc-internal-format -msgid "% specified invalid for function %qs declared out of global scope" +msgid "%Juninitialized member %qD with % type %qT" msgstr "" -#: cp/decl.c:8051 +#: cp/init.c:527 #, gcc-internal-format -msgid "% specifier invalid for function %qs declared out of global scope" +msgid "%q+D will be initialized after" msgstr "" -#: cp/decl.c:8059 +#: cp/init.c:530 +#, fuzzy, gcc-internal-format +msgid "base %qT will be initialized after" +msgstr "Клас \"%s\" ужо існуе" + +#: cp/init.c:533 #, gcc-internal-format -msgid "virtual non-class function %qs" +msgid " %q+#D" msgstr "" -#: cp/decl.c:8090 +#: cp/init.c:535 #, gcc-internal-format -msgid "cannot declare member function %qD to have static linkage" +msgid " base %qT" msgstr "" -#. FIXME need arm citation -#: cp/decl.c:8097 +#: cp/init.c:536 +#, fuzzy, gcc-internal-format +msgid "%J when initialized here" +msgstr "параметр \"%s\" ініцыялізаваны" + +#: cp/init.c:552 +#, fuzzy, gcc-internal-format +msgid "%Jmultiple initializations given for %qD" +msgstr "ініцыялізацыя" + +#: cp/init.c:555 #, gcc-internal-format -msgid "cannot declare static function inside another function" +msgid "%Jmultiple initializations given for base %qT" msgstr "" -#: cp/decl.c:8126 +#: cp/init.c:622 #, gcc-internal-format -msgid "% may not be used when defining (as opposed to declaring) a static data member" +msgid "%Jinitializations for multiple members of %qT" msgstr "" -#: cp/decl.c:8133 +#: cp/init.c:684 #, gcc-internal-format -msgid "static member %qD declared %" +msgid "%Jbase class %q#T should be explicitly initialized in the copy constructor" msgstr "" -#: cp/decl.c:8138 +#: cp/init.c:908 cp/init.c:927 #, gcc-internal-format -msgid "cannot explicitly declare member %q#D to have extern linkage" +msgid "class %qT does not have any field named %qD" msgstr "" -#: cp/decl.c:8281 -#, fuzzy, gcc-internal-format -msgid "default argument for %q#D has type %qT" -msgstr "звычайны аргумэнт для `%#D' мае тып `%T'" - -#: cp/decl.c:8284 -#, fuzzy, gcc-internal-format -msgid "default argument for parameter of type %qT has type %qT" -msgstr "звычайны аргумэнт для `%#D' мае тып `%T'" - -#: cp/decl.c:8301 -#, fuzzy, gcc-internal-format -msgid "default argument %qE uses local variable %qD" -msgstr "нехапае аргументаў у функцыі \"%s\"" - -#: cp/decl.c:8369 -#, fuzzy, gcc-internal-format -msgid "parameter %qD invalidly declared method type" -msgstr "тып параметра \"%s\" не аб'яўлены" - -#: cp/decl.c:8393 +#: cp/init.c:914 #, gcc-internal-format -msgid "parameter %qD includes %s to array of unknown bound %qT" +msgid "%q#D is a static data member; it can only be initialized at its definition" msgstr "" -#. [class.copy] -#. -#. A declaration of a constructor for a class X is ill-formed if -#. its first parameter is of type (optionally cv-qualified) X -#. and either there are no other parameters or else all other -#. parameters have default arguments. -#. -#. We *don't* complain about member template instantiations that -#. have this form, though; they can occur as we try to decide -#. what constructor to use during overload resolution. Since -#. overload resolution will never prefer such a constructor to -#. the non-template copy constructor (which is either explicitly -#. or implicitly defined), there's no need to worry about their -#. existence. Theoretically, they should never even be -#. instantiated, but that's hard to forestall. -#: cp/decl.c:8552 +#: cp/init.c:921 #, gcc-internal-format -msgid "invalid constructor; you probably meant %<%T (const %T&)%>" +msgid "%q#D is not a non-static data member of %qT" msgstr "" -#: cp/decl.c:8676 -#, fuzzy, gcc-internal-format -msgid "%qD may not be declared within a namespace" -msgstr "\"%s\" не абвешчан (першае выкарыстанне ў гэтай функцыі)" - -#: cp/decl.c:8678 -#, fuzzy, gcc-internal-format -msgid "%qD may not be declared as static" -msgstr "\"%s\" не абвешчан (першае выкарыстанне ў гэтай функцыі)" - -#: cp/decl.c:8698 +#: cp/init.c:960 #, gcc-internal-format -msgid "%qD must be a nonstatic member function" +msgid "unnamed initializer for %qT, which has no base classes" msgstr "" -#: cp/decl.c:8704 +#: cp/init.c:968 #, gcc-internal-format -msgid "%qD must be either a non-static member function or a non-member function" +msgid "unnamed initializer for %qT, which uses multiple inheritance" msgstr "" -#: cp/decl.c:8722 +#: cp/init.c:1014 #, gcc-internal-format -msgid "%qD must have an argument of class or enumerated type" +msgid "%qD is both a direct base and an indirect virtual base" msgstr "" -#: cp/decl.c:8763 +#: cp/init.c:1022 #, gcc-internal-format -msgid "conversion to %s%s will never use a type conversion operator" +msgid "type %qD is not a direct or virtual base of %qT" msgstr "" -#. 13.4.0.3 -#: cp/decl.c:8770 +#: cp/init.c:1025 #, gcc-internal-format -msgid "ISO C++ prohibits overloading operator ?:" +msgid "type %qD is not a direct base of %qT" msgstr "" -#: cp/decl.c:8820 +#: cp/init.c:1105 +#, fuzzy, gcc-internal-format +msgid "bad array initializer" +msgstr "нерэчаісны ініцыялізатар" + +#: cp/init.c:1305 +#, fuzzy, gcc-internal-format +msgid "%qT is not an aggregate type" +msgstr "\"%s\" мае незавершаны тып" + +#: cp/init.c:1398 #, gcc-internal-format -msgid "postfix %qD must take % as its argument" +msgid "qualified type %qT does not match destructor name %<~%T%>" msgstr "" -#: cp/decl.c:8824 +#: cp/init.c:1406 #, gcc-internal-format -msgid "postfix %qD must take % as its second argument" +msgid "incomplete type %qT does not have member %qD" msgstr "" -#: cp/decl.c:8831 -#, gcc-internal-format -msgid "%qD must take either zero or one argument" -msgstr "" +#: cp/init.c:1425 +#, fuzzy, gcc-internal-format +msgid "%qD is not a member of type %qT" +msgstr "\"%s\" мае незавершаны тып" + +#: cp/init.c:1444 +#, fuzzy, gcc-internal-format +msgid "invalid pointer to bit-field %qD" +msgstr "нявернае выкарыстанне \"restict\"" + +#: cp/init.c:1546 +#, fuzzy, gcc-internal-format +msgid "invalid use of non-static member function %qD" +msgstr "нявернае выкарыстанне \"restict\"" + +#: cp/init.c:1552 +#, fuzzy, gcc-internal-format +msgid "invalid use of non-static data member %qD" +msgstr "нявернае выкарыстанне \"restict\"" -#: cp/decl.c:8833 +#: cp/init.c:1681 #, gcc-internal-format -msgid "%qD must take either one or two arguments" +msgid "size in array new must have integral type" msgstr "" -#: cp/decl.c:8854 +#: cp/init.c:1684 #, gcc-internal-format -msgid "prefix %qD should return %qT" +msgid "zero size array reserves no space" msgstr "" -#: cp/decl.c:8860 +#: cp/init.c:1692 #, gcc-internal-format -msgid "postfix %qD should return %qT" +msgid "new cannot be applied to a reference type" msgstr "" -#: cp/decl.c:8869 +#: cp/init.c:1698 #, gcc-internal-format -msgid "%qD must take %" +msgid "new cannot be applied to a function type" msgstr "" -#: cp/decl.c:8871 cp/decl.c:8879 +#: cp/init.c:1730 #, gcc-internal-format -msgid "%qD must take exactly one argument" +msgid "call to Java constructor, while % undefined" msgstr "" -#: cp/decl.c:8881 -#, gcc-internal-format -msgid "%qD must take exactly two arguments" -msgstr "" +#: cp/init.c:1746 +#, fuzzy, gcc-internal-format +msgid "can't find class$" +msgstr "Не магу знайсці клас \"%s\"" -#: cp/decl.c:8889 +#: cp/init.c:1874 #, gcc-internal-format -msgid "user-defined %qD always evaluates both arguments" +msgid "invalid type % for new" msgstr "" -#: cp/decl.c:8903 +#: cp/init.c:1884 +#, fuzzy, gcc-internal-format +msgid "uninitialized const in % of %q#T" +msgstr "не магу ініцыялізаваць сяброўскую функцыю \"%s\"" + +#: cp/init.c:1918 #, gcc-internal-format -msgid "%qD should return by value" +msgid "call to Java constructor with %qs undefined" msgstr "" -#: cp/decl.c:8915 cp/decl.c:8918 +#: cp/init.c:1958 #, fuzzy, gcc-internal-format -msgid "%qD cannot have default arguments" -msgstr "нехапае аргументаў у функцыі \"%s\"" +msgid "no suitable %qD found in class %qT" +msgstr "поле \"%s\" не знойдзена ў класе" -#: cp/decl.c:8976 +#: cp/init.c:1963 #, fuzzy, gcc-internal-format -msgid "using template type parameter %qT after %qs" -msgstr "нявернае выкарыстанне \"restict\"" +msgid "request for member %qD is ambiguous" +msgstr "памер \"%s\" - %d байт" -#: cp/decl.c:8991 +#: cp/init.c:2103 #, gcc-internal-format -msgid "using typedef-name %qD after %qs" +msgid "ISO C++ forbids initialization in array new" msgstr "" -#: cp/decl.c:8992 -#, fuzzy, gcc-internal-format -msgid "%qD has a previous declaration here" -msgstr "гэта папярэдняе абвяшчэньне" - -#: cp/decl.c:9000 +#: cp/init.c:2591 #, gcc-internal-format -msgid "%qT referred to as %qs" +msgid "initializer ends prematurely" msgstr "" -#: cp/decl.c:9001 cp/decl.c:9009 -#, fuzzy, gcc-internal-format -msgid "%qT has a previous declaration here" -msgstr "гэта папярэдняе абвяшчэньне" - -#: cp/decl.c:9008 +#: cp/init.c:2646 #, gcc-internal-format -msgid "%qT referred to as enum" +msgid "cannot initialize multi-dimensional array with initializer" msgstr "" -#. If a class template appears as elaborated type specifier -#. without a template header such as: -#. -#. template class C {}; -#. void f(class C); // No template header here -#. -#. then the required template argument is missing. -#: cp/decl.c:9023 -#, fuzzy, gcc-internal-format -msgid "template argument required for %<%s %T%>" -msgstr "параметр \"%s\" ініцыялізаваны" - -#: cp/decl.c:9071 cp/name-lookup.c:2602 +#: cp/init.c:2807 #, gcc-internal-format -msgid "%qD has the same name as the class in which it is declared" +msgid "possible problem detected in invocation of delete operator:" msgstr "" -#: cp/decl.c:9209 -#, fuzzy, gcc-internal-format -msgid "use of enum %q#D without previous declaration" -msgstr "секцыя \"%s\" канфліктуе з папярэдняй дэкларацыяй" +#: cp/init.c:2810 +#, gcc-internal-format +msgid "neither the destructor nor the class-specific operator delete will be called, even if they are declared when the class is defined." +msgstr "" -#: cp/decl.c:9227 -#, fuzzy, gcc-internal-format -msgid "redeclaration of %qT as a non-template" -msgstr "абвяшчэньне шаблёну `%#D'" +#: cp/init.c:2831 +#, gcc-internal-format +msgid "unknown array size in delete" +msgstr "" -#: cp/decl.c:9334 +#: cp/init.c:3064 #, gcc-internal-format -msgid "derived union %qT invalid" +msgid "type to vector delete is neither pointer or array type" msgstr "" -#: cp/decl.c:9340 +#: cp/lex.c:468 #, gcc-internal-format -msgid "Java class %qT cannot have multiple bases" +msgid "junk at end of #pragma %s" msgstr "" -#: cp/decl.c:9348 +#: cp/lex.c:475 #, gcc-internal-format -msgid "Java class %qT cannot have virtual bases" +msgid "invalid #pragma %s" msgstr "" -#: cp/decl.c:9367 +#: cp/lex.c:483 #, gcc-internal-format -msgid "base type %qT fails to be a struct or class type" +msgid "#pragma vtable no longer supported" msgstr "" -#: cp/decl.c:9400 +#: cp/lex.c:562 #, gcc-internal-format -msgid "recursive type %qT undefined" +msgid "#pragma implementation for %qs appears after file is included" msgstr "" -#: cp/decl.c:9402 -#, fuzzy, gcc-internal-format -msgid "duplicate base type %qT invalid" -msgstr "паўтарэнне \"restrict\"" +#: cp/lex.c:587 +#, gcc-internal-format +msgid "junk at end of #pragma GCC java_exceptions" +msgstr "" -#: cp/decl.c:9472 +#: cp/lex.c:601 #, fuzzy, gcc-internal-format -msgid "multiple definition of %q#T" -msgstr "папярэдняе вызначэньне `%#T'" +msgid "%qD not defined" +msgstr "YYDEBUG не вызначан." -#: cp/decl.c:9473 +#: cp/lex.c:605 #, fuzzy, gcc-internal-format -msgid "%Jprevious definition here" -msgstr "папярэдняе вызначэньне" +msgid "%qD was not declared in this scope" +msgstr "\"%s\" не абвешчан (першае выкарыстанне ў гэтай функцыі)" -#. DR 377 +#. In a template, it is invalid to write "f()" or "f(3)" if no +#. declaration of "f" is available. Historically, G++ and most +#. other compilers accepted that usage since they deferred all name +#. lookup until instantiation time rather than doing unqualified +#. name lookup at template definition time; explain to the user what +#. is going wrong. #. -#. IF no integral type can represent all the enumerator values, the -#. enumeration is ill-formed. -#: cp/decl.c:9610 +#. Note that we have the exact wording of the following message in +#. the manual (trouble.texi, node "Name lookup"), so they need to +#. be kept in synch. +#: cp/lex.c:642 #, gcc-internal-format -msgid "no integral type can represent all of the enumerator values for %qT" +msgid "there are no arguments to %qD that depend on a template parameter, so a declaration of %qD must be available" msgstr "" -#: cp/decl.c:9716 +#: cp/lex.c:651 #, gcc-internal-format -msgid "enumerator value for %qD not integer constant" +msgid "(if you use %<-fpermissive%>, G++ will accept your code, but allowing the use of an undeclared name is deprecated)" msgstr "" -#: cp/decl.c:9743 +#: cp/mangle.c:2139 #, gcc-internal-format -msgid "overflow in enumeration values at %qD" +msgid "call_expr cannot be mangled due to a defect in the C++ ABI" msgstr "" -#: cp/decl.c:9814 -#, fuzzy, gcc-internal-format -msgid "return type %q#T is incomplete" -msgstr "вяртаемы тып \"%s\" не \"int\"" - -#: cp/decl.c:9930 cp/typeck.c:6161 +#: cp/mangle.c:2147 #, gcc-internal-format -msgid "% should return a reference to %<*this%>" +msgid "zero-operand casts cannot be mangled due to a defect in the C++ ABI" msgstr "" -#: cp/decl.c:10258 -#, fuzzy, gcc-internal-format -msgid "parameter %qD declared void" -msgstr "тып параметра \"%s\" не аб'яўлены" - -#: cp/decl.c:10747 -#, fuzzy, gcc-internal-format -msgid "invalid member function declaration" -msgstr "паўторнае абвяшчэнне меткі \"%s\"" - -#: cp/decl.c:10762 -#, fuzzy, gcc-internal-format -msgid "%qD is already defined in class %qT" -msgstr "не знойдзен клас \"%s\"" - -#: cp/decl.c:10972 +#: cp/mangle.c:2197 #, gcc-internal-format -msgid "static member function %q#D declared with type qualifiers" +msgid "omitted middle operand to % operand cannot be mangled" msgstr "" -#: cp/decl2.c:279 +#: cp/mangle.c:2507 #, gcc-internal-format -msgid "name missing for member function" +msgid "the mangled name of %qD will change in a future version of GCC" msgstr "" -#: cp/decl2.c:372 cp/decl2.c:386 +#: cp/method.c:457 #, gcc-internal-format -msgid "ambiguous conversion for array subscript" +msgid "generic thunk code fails for method %q#D which uses %<...%>" msgstr "" -#: cp/decl2.c:380 +#: cp/method.c:693 #, gcc-internal-format -msgid "invalid types %<%T[%T]%> for array subscript" +msgid "non-static const member %q#D, can't use default assignment operator" msgstr "" -#: cp/decl2.c:423 +#: cp/method.c:699 #, gcc-internal-format -msgid "deleting array %q#D" +msgid "non-static reference member %q#D, can't use default assignment operator" msgstr "" -#: cp/decl2.c:429 +#: cp/method.c:811 #, gcc-internal-format -msgid "type %q#T argument given to %, expected pointer" +msgid "%Hsynthesized method %qD first required here " msgstr "" -#: cp/decl2.c:441 +#: cp/method.c:1140 #, gcc-internal-format -msgid "cannot delete a function. Only pointer-to-objects are valid arguments to %" +msgid "vtable layout for class %qT may not be ABI-compliantand may change in a future version of GCC due to implicit virtual destructor" msgstr "" -#: cp/decl2.c:449 +#: cp/name-lookup.c:694 #, fuzzy, gcc-internal-format -msgid "deleting %qT is undefined" -msgstr "метка \"%s\" ужываецца, але не вызначана" +msgid "redeclaration of % as %qT" +msgstr "няма папярэдняга аб'яўлення для \"%s\"" -#. 14.5.2.2 [temp.mem] +#. A redeclaration of main, but not a duplicate of the +#. previous one. #. -#. A local class shall not have member templates. -#: cp/decl2.c:485 +#. [basic.start.main] +#. +#. This function shall not be overloaded. +#: cp/name-lookup.c:726 #, fuzzy, gcc-internal-format -msgid "invalid declaration of member template %q#D in local class" -msgstr "абвяшчэньне шаблёну `%#D'" +msgid "invalid redeclaration of %q+D" +msgstr "Нерэчаіснае абвяшчэнне" -#: cp/decl2.c:494 +#: cp/name-lookup.c:727 #, fuzzy, gcc-internal-format -msgid "invalid use of % in template declaration of %q#D" -msgstr "паўторнае абвяшчэнне меткі \"%s\"" +msgid "as %qD" +msgstr "як `%D'" -#: cp/decl2.c:504 cp/pt.c:2973 +#: cp/name-lookup.c:815 #, fuzzy, gcc-internal-format -msgid "template declaration of %q#D" +msgid "type mismatch with previous external decl of %q#D" +msgstr "няма папярэдняга аб'яўлення для \"%s\"" + +#: cp/name-lookup.c:816 +#, fuzzy, gcc-internal-format +msgid "previous external decl of %q+#D" +msgstr "няма папярэдняга аб'яўлення для \"%s\"" + +#: cp/name-lookup.c:907 +#, fuzzy, gcc-internal-format +msgid "extern declaration of %q#D doesn't match" msgstr "пустое абвяшчэнне" -#: cp/decl2.c:553 +#: cp/name-lookup.c:908 +#, fuzzy, gcc-internal-format +msgid "global declaration %q+#D" +msgstr "паўторнае абвяшчэнне меткі \"%s\"" + +#: cp/name-lookup.c:945 cp/name-lookup.c:952 +#, fuzzy, gcc-internal-format +msgid "declaration of %q#D shadows a parameter" +msgstr "абвяшчэньне `%#D'" + +#. Location of previous decl is not useful in this case. +#: cp/name-lookup.c:977 #, gcc-internal-format -msgid "Java method %qD has non-Java return type %qT" +msgid "declaration of %qD shadows a member of 'this'" +msgstr "" + +#: cp/name-lookup.c:983 +#, fuzzy, gcc-internal-format +msgid "declaration of %qD shadows a previous local" +msgstr "секцыя \"%s\" канфліктуе з папярэдняй дэкларацыяй" + +#: cp/name-lookup.c:990 +#, gcc-internal-format +msgid "declaration of %qD shadows a global declaration" msgstr "" -#: cp/decl2.c:569 +#: cp/name-lookup.c:1116 #, gcc-internal-format -msgid "Java method %qD has non-Java parameter type %qT" +msgid "name lookup of %qD changed" msgstr "" -#: cp/decl2.c:674 +#: cp/name-lookup.c:1117 #, gcc-internal-format -msgid "prototype for %q#D does not match any in class %qT" +msgid " matches this %q+D under ISO standard rules" msgstr "" -#: cp/decl2.c:775 +#: cp/name-lookup.c:1119 #, gcc-internal-format -msgid "local class %q#T shall not have static data member %q#D" +msgid " matches this %q+D under old rules" msgstr "" -#: cp/decl2.c:783 +#: cp/name-lookup.c:1137 cp/name-lookup.c:1145 #, gcc-internal-format -msgid "initializer invalid for static member with constructor" +msgid "name lookup of %qD changed for new ISO % scoping" msgstr "" -#: cp/decl2.c:786 +#: cp/name-lookup.c:1139 #, gcc-internal-format -msgid "(an out of class initialization is required)" +msgid " cannot use obsolete binding at %q+D because it has a destructor" msgstr "" -#: cp/decl2.c:867 +#: cp/name-lookup.c:1147 #, gcc-internal-format -msgid "member %qD conflicts with virtual function table field name" +msgid " using obsolete binding at %q+D" msgstr "" -#: cp/decl2.c:886 +#: cp/name-lookup.c:1200 #, gcc-internal-format -msgid "applying attributes to template parameters is not implemented" +msgid "%s %s(%E) %p %d\n" msgstr "" -#: cp/decl2.c:896 +#: cp/name-lookup.c:1203 #, fuzzy, gcc-internal-format -msgid "%qD is already defined in %qT" -msgstr "не знойдзен клас \"%s\"" +msgid "%s %s %p %d\n" +msgstr "%s: %s: " -#: cp/decl2.c:944 +#: cp/name-lookup.c:1329 #, gcc-internal-format -msgid "field initializer is not constant" +msgid "XXX is_class_level != (current_scope == class_scope)\n" msgstr "" -#: cp/decl2.c:972 -#, gcc-internal-format -msgid "% specifiers are not permitted on non-static data members" -msgstr "" +#: cp/name-lookup.c:1887 +#, fuzzy, gcc-internal-format +msgid "%q#D hides constructor for %q#T" +msgstr "дэструктару неабходны \"%#D\"" -#: cp/decl2.c:1018 +#: cp/name-lookup.c:1903 #, fuzzy, gcc-internal-format -msgid "cannot declare %qD to be a bit-field type" -msgstr "не магу атрымаць адрас бітавага поля \"%s\"" +msgid "%q#D conflicts with previous using declaration %q#D" +msgstr "секцыя \"%s\" канфліктуе з папярэдняй дэкларацыяй" -#: cp/decl2.c:1028 +#: cp/name-lookup.c:1923 #, fuzzy, gcc-internal-format -msgid "cannot declare bit-field %qD with function type" -msgstr "не магу ініцыялізаваць сяброўскую функцыю \"%s\"" +msgid "previous non-function declaration %q+#D" +msgstr "няма папярэдняга аб'яўлення для \"%s\"" -#: cp/decl2.c:1035 +#: cp/name-lookup.c:1924 #, fuzzy, gcc-internal-format -msgid "%qD is already defined in the class %qT" -msgstr "не знойдзен клас \"%s\"" +msgid "conflicts with function declaration %q#D" +msgstr "секцыя \"%s\" канфліктуе з папярэдняй дэкларацыяй" -#: cp/decl2.c:1042 +#. It's a nested name with template parameter dependent scope. +#. This can only be using-declaration for class member. +#: cp/name-lookup.c:2002 cp/name-lookup.c:2027 #, fuzzy, gcc-internal-format -msgid "static member %qD cannot be a bit-field" -msgstr "віртуальныя функцыі не могуць быць сяброўскімі" +msgid "%qT is not a namespace" +msgstr "\"%s\" мае незавершаны тып" -#: cp/decl2.c:1087 +#. 7.3.3/5 +#. A using-declaration shall not name a template-id. +#: cp/name-lookup.c:2012 #, gcc-internal-format -msgid "anonymous struct not inside named type" +msgid "a using-declaration cannot specify a template-id. Try %" msgstr "" -#: cp/decl2.c:1164 +#: cp/name-lookup.c:2019 +#, fuzzy, gcc-internal-format +msgid "namespace %qD not allowed in using-declaration" +msgstr "\"%s\" - гэта не пачатак дэкларацыі" + +#: cp/name-lookup.c:2055 +#, fuzzy, gcc-internal-format +msgid "%qD not declared" +msgstr "YYDEBUG не вызначан." + +#: cp/name-lookup.c:2076 cp/name-lookup.c:2113 cp/name-lookup.c:2147 +#, fuzzy, gcc-internal-format +msgid "%qD is already declared in this scope" +msgstr "\"%s\" не абвешчан (першае выкарыстанне ў гэтай функцыі)" + +#: cp/name-lookup.c:2153 #, gcc-internal-format -msgid "namespace-scope anonymous aggregates must be static" +msgid "using declaration %qD introduced ambiguous type %qT" msgstr "" -#: cp/decl2.c:1171 +#: cp/name-lookup.c:2727 #, gcc-internal-format -msgid "anonymous union with no members" +msgid "using-declaration for non-member at class scope" msgstr "" -#: cp/decl2.c:1207 +#: cp/name-lookup.c:2753 #, gcc-internal-format -msgid "% must return type %qT" +msgid "%<%T::%D%> names destructor" msgstr "" -#: cp/decl2.c:1216 +#: cp/name-lookup.c:2758 #, gcc-internal-format -msgid "% takes type % (%qT) as first parameter" +msgid "%<%T::%D%> names constructor" msgstr "" -#: cp/decl2.c:1245 +#: cp/name-lookup.c:2763 +#, fuzzy, gcc-internal-format +msgid "%<%T::%D%> names constructor in %qT" +msgstr "дэструктару неабходны \"%#D\"" + +#: cp/name-lookup.c:2779 #, gcc-internal-format -msgid "% must return type %qT" +msgid "no members matching %<%T::%D%> in %q#T" msgstr "" -#: cp/decl2.c:1254 +#: cp/name-lookup.c:2848 #, gcc-internal-format -msgid "% takes type %qT as first parameter" +msgid "declaration of %qD not in a namespace surrounding %qD" msgstr "" -#: cp/decl2.c:3017 -#, fuzzy, gcc-internal-format -msgid "inline function %qD used but never defined" -msgstr "адмеціна `%D' выкарыстоўвываецца, але ня вызначана" - -#: cp/decl2.c:3165 +#: cp/name-lookup.c:2856 #, fuzzy, gcc-internal-format -msgid "default argument missing for parameter %P of %q+#D" -msgstr "аргумент для \"%s\" прапушчан" +msgid "explicit qualification in declaration of %qD" +msgstr "паўторнае абвяшчэнне меткі \"%s\"" -#. damn ICE suppression -#: cp/error.c:2371 +#: cp/name-lookup.c:2896 #, gcc-internal-format -msgid "unexpected letter %qc in locate_error\n" +msgid "%qD should have been declared inside %qD" msgstr "" -#. Can't throw a reference. -#: cp/except.c:262 -#, gcc-internal-format -msgid "type %qT is disallowed in Java % or %" -msgstr "" +#: cp/name-lookup.c:2958 +#, fuzzy, gcc-internal-format +msgid "namespace alias %qD not allowed here, assuming %qD" +msgstr "\"%s\" - гэта не пачатак дэкларацыі" -#: cp/except.c:273 +#: cp/name-lookup.c:3265 #, gcc-internal-format -msgid "call to Java % or % with % undefined" +msgid "strong using only meaningful at namespace scope" msgstr "" -#. Thrown object must be a Throwable. -#: cp/except.c:280 +#: cp/name-lookup.c:3272 +#, fuzzy, gcc-internal-format +msgid "%qD attribute directive ignored" +msgstr "\"%s\" атрыбут ігнарыруецца" + +#: cp/name-lookup.c:3422 #, gcc-internal-format -msgid "type %qT is not derived from %" +msgid "%qD denotes an ambiguous type" msgstr "" -#: cp/except.c:343 +#: cp/name-lookup.c:3423 +#, fuzzy, gcc-internal-format +msgid "%J first type here" +msgstr " адсюль" + +#: cp/name-lookup.c:3424 #, gcc-internal-format -msgid "mixing C++ and Java catches in a single translation unit" +msgid "%J other type here" msgstr "" -#: cp/except.c:602 +#. This happens for A::B where B is a template, and there are no +#. template arguments. +#: cp/name-lookup.c:3534 cp/parser.c:4475 cp/typeck.c:1807 +#, fuzzy, gcc-internal-format +msgid "invalid use of %qD" +msgstr "нерэчаіснае выкарыстаньне `%D'" + +#: cp/name-lookup.c:3574 +#, fuzzy, gcc-internal-format +msgid "%<%D::%D%> is not a template" +msgstr "\"%s\" мае незавершаны тып" + +#: cp/name-lookup.c:3589 +#, fuzzy, gcc-internal-format +msgid "%qD undeclared in namespace %qD" +msgstr "невядомы рэжым машыны \"%s\"" + +#: cp/name-lookup.c:4226 +#, fuzzy, gcc-internal-format +msgid "%q+D is not a function," +msgstr "`%D' - гэта ня функцыя," + +#: cp/name-lookup.c:4227 #, gcc-internal-format -msgid "throwing NULL, which has integral, not pointer type" +msgid " conflict with %q+D" msgstr "" -#: cp/except.c:625 cp/init.c:1887 +#: cp/name-lookup.c:5059 #, gcc-internal-format -msgid "%qD should never be overloaded" +msgid "XXX entering pop_everything ()\n" msgstr "" -#: cp/except.c:692 +#: cp/name-lookup.c:5068 #, gcc-internal-format -msgid " in thrown expression" +msgid "XXX leaving pop_everything ()\n" msgstr "" -#: cp/except.c:836 +#: cp/parser.c:1866 #, gcc-internal-format -msgid "expression %qE of abstract class type %qT cannot be used in throw-expression" +msgid "minimum/maximum operators are deprecated" msgstr "" -#: cp/except.c:921 +#: cp/parser.c:1886 +#, fuzzy, gcc-internal-format +msgid "%<#pragma%> is not allowed here" +msgstr "Клас \"%s\" ужо існуе" + +#: cp/parser.c:1915 #, gcc-internal-format -msgid "%Hexception of type %qT will be caught" +msgid "%<%D::%D%> has not been declared" msgstr "" -#: cp/except.c:923 +#: cp/parser.c:1918 cp/semantics.c:2387 #, gcc-internal-format -msgid "%H by earlier handler for %qT" +msgid "%<::%D%> has not been declared" msgstr "" -#: cp/except.c:953 +#: cp/parser.c:1921 #, gcc-internal-format -msgid "%H%<...%> handler must be the last handler for its try block" +msgid "request for member %qD in non-class type %qT" msgstr "" -#: cp/friend.c:152 +#: cp/parser.c:1924 #, fuzzy, gcc-internal-format -msgid "%qD is already a friend of class %qT" -msgstr "не знойдзен клас \"%s\"" +msgid "%<%T::%D%> has not been declared" +msgstr "\"%s\" - гэта не пачатак дэкларацыі" -#: cp/friend.c:228 +#: cp/parser.c:1927 #, fuzzy, gcc-internal-format -msgid "invalid type %qT declared %" -msgstr "тып параметра \"%s\" не аб'яўлены" +msgid "%qD has not been declared" +msgstr "\"%s\" не абвешчан (першае выкарыстанне ў гэтай функцыі)" -#. [temp.friend] -#. Friend declarations shall not declare partial -#. specializations. -#. template friend class T::X; -#. [temp.friend] -#. Friend declarations shall not declare partial -#. specializations. -#: cp/friend.c:244 cp/friend.c:274 +#: cp/parser.c:1930 #, gcc-internal-format -msgid "partial specialization %qT declared %" +msgid "%<%D::%D%> %s" msgstr "" -#: cp/friend.c:252 +#: cp/parser.c:1932 #, gcc-internal-format -msgid "class %qT is implicitly friends with itself" +msgid "%<::%D%> %s" msgstr "" -#: cp/friend.c:310 +#: cp/parser.c:1934 +#, gcc-internal-format +msgid "%qD %s" +msgstr "" + +#: cp/parser.c:1986 +#, gcc-internal-format +msgid "new types may not be defined in a return type" +msgstr "" + +#: cp/parser.c:1987 #, fuzzy, gcc-internal-format -msgid "%qT is not a member of %qT" -msgstr "\"%s\" мае незавершаны тып" +msgid "(perhaps a semicolon is missing after the definition of %qT)" +msgstr "Не магу знайсці дэкларацыю інтэрфейса для \"%s\"" -#: cp/friend.c:315 +#: cp/parser.c:2006 cp/parser.c:3680 cp/pt.c:4396 #, fuzzy, gcc-internal-format -msgid "%qT is not a member class template of %qT" +msgid "%qT is not a template" msgstr "\"%s\" мае незавершаны тып" -#: cp/friend.c:323 -#, gcc-internal-format -msgid "%qT is not a nested class of %qT" -msgstr "" +#: cp/parser.c:2008 +#, fuzzy, gcc-internal-format +msgid "%qE is not a template" +msgstr "\"%s\" мае незавершаны тып" -#. template friend class T; -#: cp/friend.c:336 +#: cp/parser.c:2010 #, fuzzy, gcc-internal-format -msgid "template parameter type %qT declared %" -msgstr "тып параметра \"%s\" не аб'яўлены" +msgid "invalid template-id" +msgstr "Нерэчаісны выбар %s" -#. template friend class A; where A is not a template -#: cp/friend.c:342 +#: cp/parser.c:2039 #, fuzzy, gcc-internal-format -msgid "%q#T is not a template" -msgstr "\"%s\" мае незавершаны тып" +msgid "%s cannot appear in a constant-expression" +msgstr "памер масіва \"%s\" адмоўны" -#: cp/friend.c:364 +#: cp/parser.c:2064 #, fuzzy, gcc-internal-format -msgid "%qD is already a friend of %qT" -msgstr "не знойдзен клас \"%s\"" +msgid "invalid use of template-name %qE without an argument list" +msgstr "нявернае выкарыстанне \"restict\"" -#: cp/friend.c:373 +#. Issue an error message. +#: cp/parser.c:2069 #, fuzzy, gcc-internal-format -msgid "%qT is already a friend of %qT" -msgstr "не знойдзен клас \"%s\"" +msgid "%qE does not name a type" +msgstr "\"%s\" мае незавершаны тып" -#: cp/friend.c:497 +#: cp/parser.c:2101 #, gcc-internal-format -msgid "member %qD declared as friend before type %qT defined" +msgid "(perhaps % was intended)" msgstr "" -#: cp/friend.c:553 +#: cp/parser.c:2116 #, gcc-internal-format -msgid "friend declaration %q#D declares a non-template function" +msgid "%qE in namespace %qE does not name a type" msgstr "" -#: cp/friend.c:557 +#: cp/parser.c:2119 #, gcc-internal-format -msgid "(if this is not what you intended, make sure the function template has already been declared and add <> after the function name here) -Wno-non-template-friend disables this warning" +msgid "%qE in class %qT does not name a type" msgstr "" -#: cp/init.c:326 -#, fuzzy, gcc-internal-format -msgid "%J%qD should be initialized in the member initialization list" -msgstr "нерэчаісны ініцыялізатар" +#: cp/parser.c:2839 +#, gcc-internal-format +msgid "ISO C++ forbids braced-groups within expressions" +msgstr "" -#: cp/init.c:373 +#: cp/parser.c:2848 #, gcc-internal-format -msgid "%Jdefault-initialization of %q#D, which has reference type" +msgid "statement-expressions are allowed only inside functions" msgstr "" -#: cp/init.c:379 +#: cp/parser.c:2899 #, fuzzy, gcc-internal-format -msgid "%Juninitialized reference member %qD" -msgstr "прапушчан ініцыялізатар" +msgid "% may not be used in this context" +msgstr "\"%s\" не абвешчан (першае выкарыстанне ў гэтай функцыі)" -#: cp/init.c:382 +#: cp/parser.c:3050 #, gcc-internal-format -msgid "%Juninitialized member %qD with % type %qT" +msgid "local variable %qD may not appear in this context" msgstr "" -#: cp/init.c:525 +#: cp/parser.c:3430 #, gcc-internal-format -msgid "%qD will be initialized after" +msgid "typedef-name %qD used as destructor declarator" msgstr "" -#: cp/init.c:528 +#: cp/parser.c:3639 cp/parser.c:12562 cp/parser.c:14693 #, fuzzy, gcc-internal-format -msgid "base %qT will be initialized after" -msgstr "Клас \"%s\" ужо існуе" - -#: cp/init.c:531 -#, gcc-internal-format -msgid " %q#D" -msgstr "" +msgid "reference to %qD is ambiguous" +msgstr "памер \"%s\" - %d байт" -#: cp/init.c:533 -#, gcc-internal-format -msgid " base %qT" -msgstr "" +#: cp/parser.c:3681 cp/typeck.c:1878 cp/typeck.c:1898 +#, fuzzy, gcc-internal-format +msgid "%qD is not a template" +msgstr "\"%s\" мае незавершаны тып" -#: cp/init.c:534 +#: cp/parser.c:4068 #, fuzzy, gcc-internal-format -msgid "%J when initialized here" -msgstr "параметр \"%s\" ініцыялізаваны" +msgid "ISO C++ forbids compound-literals" +msgstr "ISO C не дазваляе дэкларацыі метак (label)" -#: cp/init.c:550 +#: cp/parser.c:4400 #, fuzzy, gcc-internal-format -msgid "%Jmultiple initializations given for %qD" -msgstr "ініцыялізацыя" +msgid "%qE does not have class type" +msgstr "\"%s\" мае незавершаны тып" -#: cp/init.c:553 +#: cp/parser.c:4999 #, gcc-internal-format -msgid "%Jmultiple initializations given for base %qT" +msgid "array bound forbidden after parenthesized type-id" msgstr "" -#: cp/init.c:620 +#: cp/parser.c:5000 #, gcc-internal-format -msgid "%Jinitializations for multiple members of %qT" +msgid "try removing the parentheses around the type-id" msgstr "" -#: cp/init.c:682 +#: cp/parser.c:5202 #, gcc-internal-format -msgid "%Jbase class %q#T should be explicitly initialized in the copy constructor" +msgid "expression in new-declarator must have integral or enumeration type" msgstr "" -#: cp/init.c:906 cp/init.c:925 +#: cp/parser.c:5391 #, gcc-internal-format -msgid "class %qT does not have any field named %qD" +msgid "use of old-style cast" msgstr "" -#: cp/init.c:912 +#: cp/parser.c:6175 #, gcc-internal-format -msgid "%q#D is a static data member; it can only be initialized at its definition" +msgid "case label %qE not within a switch statement" msgstr "" -#: cp/init.c:919 +#: cp/parser.c:6719 #, gcc-internal-format -msgid "%q#D is not a non-static data member of %qT" +msgid "ISO C++ forbids computed gotos" msgstr "" -#: cp/init.c:958 +#: cp/parser.c:6844 #, gcc-internal-format -msgid "unnamed initializer for %qT, which has no base classes" +msgid "extra %<;%>" msgstr "" -#: cp/init.c:966 +#: cp/parser.c:7168 #, gcc-internal-format -msgid "unnamed initializer for %qT, which uses multiple inheritance" +msgid "mixing declarations and function-definitions is forbidden" msgstr "" -#: cp/init.c:1012 +#: cp/parser.c:7299 +#, fuzzy, gcc-internal-format +msgid "duplicate %" +msgstr "паўтарэньне `%s'" + +#: cp/parser.c:7468 +#, fuzzy, gcc-internal-format +msgid "class definition may not be declared a friend" +msgstr "віртуальныя функцыі не могуць быць сяброўскімі" + +#: cp/parser.c:7782 #, gcc-internal-format -msgid "%qD is both a direct base and an indirect virtual base" +msgid "only constructors take base initializers" msgstr "" -#: cp/init.c:1020 +#: cp/parser.c:7833 #, gcc-internal-format -msgid "type %qD is not a direct or virtual base of %qT" +msgid "anachronistic old-style base class initializer" msgstr "" -#: cp/init.c:1023 +#: cp/parser.c:7875 #, gcc-internal-format -msgid "type %qD is not a direct base of %qT" +msgid "keyword % not allowed in this context (a qualified member initializer is implicitly a type)" msgstr "" -#: cp/init.c:1103 -#, fuzzy, gcc-internal-format -msgid "bad array initializer" -msgstr "нерэчаісны ініцыялізатар" - -#: cp/init.c:1302 -#, fuzzy, gcc-internal-format -msgid "%qT is not an aggregate type" -msgstr "\"%s\" мае незавершаны тып" - -#: cp/init.c:1394 +#. Warn that we do not support `export'. +#: cp/parser.c:8241 #, gcc-internal-format -msgid "qualified type %qT does not match destructor name %<~%T%>" +msgid "keyword % not implemented, and will be ignored" msgstr "" -#: cp/init.c:1402 +#. Otherwise, emit an error about the invalid digraph, but continue +#. parsing because we got our argument list. +#: cp/parser.c:8614 #, gcc-internal-format -msgid "incomplete type %qT does not have member %qD" +msgid "%<<::%> cannot begin a template-argument list" msgstr "" -#: cp/init.c:1421 -#, fuzzy, gcc-internal-format -msgid "%qD is not a member of type %qT" -msgstr "\"%s\" мае незавершаны тып" +#: cp/parser.c:8615 +#, gcc-internal-format +msgid "%<<:%> is an alternate spelling for %<[%>. Insert whitespace between %<<%> and %<::%>" +msgstr "" -#: cp/init.c:1440 -#, fuzzy, gcc-internal-format -msgid "invalid pointer to bit-field %qD" -msgstr "нявернае выкарыстанне \"restict\"" +#: cp/parser.c:8622 +#, gcc-internal-format +msgid "(if you use -fpermissive G++ will accept your code)" +msgstr "" -#: cp/init.c:1542 -#, fuzzy, gcc-internal-format -msgid "invalid use of non-static member function %qD" -msgstr "нявернае выкарыстанне \"restict\"" +#: cp/parser.c:8686 +#, gcc-internal-format +msgid "parse error in template argument list" +msgstr "" -#: cp/init.c:1548 cp/semantics.c:1321 -#, fuzzy, gcc-internal-format -msgid "invalid use of non-static data member %qD" -msgstr "нявернае выкарыстанне \"restict\"" +#. Explain what went wrong. +#: cp/parser.c:8799 +#, gcc-internal-format +msgid "non-template %qD used as template" +msgstr "" -#: cp/init.c:1645 +#: cp/parser.c:8800 #, gcc-internal-format -msgid "size in array new must have integral type" +msgid "use %<%T::template %D%> to indicate that it is a template" msgstr "" -#: cp/init.c:1648 +#: cp/parser.c:9313 #, gcc-internal-format -msgid "zero size array reserves no space" +msgid "template specialization with C linkage" msgstr "" -#: cp/init.c:1656 +#: cp/parser.c:9419 cp/parser.c:15322 +#, fuzzy, gcc-internal-format +msgid "template declaration of %qs" +msgstr "пустое абвяшчэнне" + +#: cp/parser.c:9892 #, gcc-internal-format -msgid "new cannot be applied to a reference type" +msgid "using % outside of template" msgstr "" -#: cp/init.c:1662 +#: cp/parser.c:10089 #, gcc-internal-format -msgid "new cannot be applied to a function type" +msgid "type attributes are honored only at type definition" msgstr "" -#: cp/init.c:1694 +#: cp/parser.c:10286 +#, fuzzy, gcc-internal-format +msgid "%qD is not a namespace-name" +msgstr "`%D' - гэта ня функцыя," + +#. [namespace.udecl] +#. +#. A using declaration shall not name a template-id. +#: cp/parser.c:10476 +#, fuzzy, gcc-internal-format +msgid "a template-id may not appear in a using-declaration" +msgstr "\"%s\" - гэта не пачатак дэкларацыі" + +#: cp/parser.c:10806 #, gcc-internal-format -msgid "call to Java constructor, while % undefined" +msgid "an asm-specification is not allowed on a function-definition" msgstr "" -#: cp/init.c:1710 +#: cp/parser.c:10808 #, fuzzy, gcc-internal-format -msgid "can't find class$" -msgstr "Не магу знайсці клас \"%s\"" +msgid "attributes are not allowed on a function-definition" +msgstr "\"%s\" - гэта не пачатак дэкларацыі" -#: cp/init.c:1838 +#: cp/parser.c:10940 #, gcc-internal-format -msgid "invalid type % for new" +msgid "attributes after parenthesized initializer ignored" msgstr "" -#: cp/init.c:1848 +#: cp/parser.c:11325 #, fuzzy, gcc-internal-format -msgid "uninitialized const in % of %q#T" -msgstr "не магу ініцыялізаваць сяброўскую функцыю \"%s\"" +msgid "array bound is not an integer constant" +msgstr "памер масіва \"%s\" адмоўны" + +#: cp/parser.c:11395 +#, fuzzy, gcc-internal-format +msgid "%<%T::%D%> is not a type" +msgstr "\"%s\" мае незавершаны тып" + +#: cp/parser.c:11438 +#, fuzzy, gcc-internal-format +msgid "invalid use of constructor as a template" +msgstr "нявернае выкарыстанне \"restict\"" -#: cp/init.c:1882 +#: cp/parser.c:11439 #, gcc-internal-format -msgid "call to Java constructor with %qs undefined" +msgid "use %<%T::%D%> instead of %<%T::%T%> to name the constructor in a qualified name" msgstr "" -#: cp/init.c:1922 +#: cp/parser.c:11627 #, fuzzy, gcc-internal-format -msgid "request for member %qD is ambiguous" -msgstr "памер \"%s\" - %d байт" +msgid "duplicate cv-qualifier" +msgstr "паўтарэнне \"volatile\"" -#: cp/init.c:2055 +#: cp/parser.c:12159 +#, fuzzy, gcc-internal-format +msgid "file ends in default argument" +msgstr "нехапае аргументаў у функцыі \"%s\"" + +#: cp/parser.c:12221 #, gcc-internal-format -msgid "ISO C++ forbids initialization in array new" +msgid "deprecated use of default argument for parameter of non-function" msgstr "" -#: cp/init.c:2530 +#: cp/parser.c:12224 #, gcc-internal-format -msgid "initializer ends prematurely" +msgid "default arguments are only permitted for function parameters" msgstr "" -#: cp/init.c:2583 +#: cp/parser.c:12984 +#, fuzzy, gcc-internal-format +msgid "invalid class name in declaration of %qD" +msgstr "Нерэчаіснае абвяшчэнне" + +#: cp/parser.c:12995 #, gcc-internal-format -msgid "cannot initialize multi-dimensional array with initializer" +msgid "declaration of %qD in %qD which does not enclose %qD" msgstr "" -#: cp/init.c:2738 +#: cp/parser.c:13008 #, gcc-internal-format -msgid "possible problem detected in invocation of delete operator:" +msgid "extra qualification ignored" msgstr "" -#: cp/init.c:2741 +#: cp/parser.c:13019 +#, fuzzy, gcc-internal-format +msgid "an explicit specialization must be preceded by %