aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc
diff options
context:
space:
mode:
authorBen Cheng <bccheng@google.com>2014-04-22 13:33:12 -0700
committerBen Cheng <bccheng@google.com>2014-04-22 13:33:12 -0700
commite3cc64dec20832769406aa38cde83c7dd4194bf4 (patch)
treeef8e39be37cfe0cb69d850043b7924389ff17164 /gcc-4.9/gcc
parentf33c7b3122b1d7950efa88067c9a156229ba647b (diff)
downloadtoolchain_gcc-e3cc64dec20832769406aa38cde83c7dd4194bf4.tar.gz
toolchain_gcc-e3cc64dec20832769406aa38cde83c7dd4194bf4.tar.bz2
toolchain_gcc-e3cc64dec20832769406aa38cde83c7dd4194bf4.zip
[4.9] GCC 4.9.0 official release refresh
Change-Id: Ic99a7da8b44b789a48aeec93b33e93944d6e6767
Diffstat (limited to 'gcc-4.9/gcc')
-rw-r--r--gcc-4.9/gcc/ChangeLog977
-rw-r--r--gcc-4.9/gcc/DATESTAMP2
-rw-r--r--gcc-4.9/gcc/DEV-PHASE1
-rw-r--r--gcc-4.9/gcc/Makefile.in20
-rw-r--r--gcc-4.9/gcc/ada/ChangeLog57
-rw-r--r--gcc-4.9/gcc/ada/gcc-interface/Makefile.in18
-rw-r--r--gcc-4.9/gcc/ada/s-intman-android.adb331
-rw-r--r--gcc-4.9/gcc/ada/s-linux-alpha.ads28
-rw-r--r--gcc-4.9/gcc/ada/s-linux-android.ads128
-rw-r--r--gcc-4.9/gcc/ada/s-linux-hppa.ads26
-rw-r--r--gcc-4.9/gcc/ada/s-linux-mipsel.ads26
-rw-r--r--gcc-4.9/gcc/ada/s-linux-sparc.ads28
-rw-r--r--gcc-4.9/gcc/ada/s-linux-x32.ads21
-rw-r--r--gcc-4.9/gcc/ada/s-linux.ads26
-rw-r--r--gcc-4.9/gcc/ada/s-osinte-android.ads24
-rw-r--r--gcc-4.9/gcc/ada/s-osinte-hpux.ads4
-rw-r--r--gcc-4.9/gcc/ada/s-osinte-kfreebsd-gnu.ads4
-rw-r--r--gcc-4.9/gcc/ada/s-osinte-linux.ads15
-rw-r--r--gcc-4.9/gcc/ada/s-osinte-posix.adb7
-rw-r--r--gcc-4.9/gcc/ada/s-osinte-solaris-posix.ads4
-rw-r--r--gcc-4.9/gcc/ada/s-osinte-x32.adb110
-rw-r--r--gcc-4.9/gcc/ada/s-osprim-x32.adb8
-rw-r--r--gcc-4.9/gcc/ada/s-taprop-linux.adb4
-rw-r--r--gcc-4.9/gcc/ada/sigtramp-armdroid.c161
-rw-r--r--gcc-4.9/gcc/ada/sigtramp.h25
-rw-r--r--gcc-4.9/gcc/ada/system-linux-alpha.ads10
-rw-r--r--gcc-4.9/gcc/ada/system-linux-mips.ads3
-rw-r--r--gcc-4.9/gcc/ada/system-linux-mips64el.ads3
-rw-r--r--gcc-4.9/gcc/ada/system-linux-mipsel.ads3
-rw-r--r--gcc-4.9/gcc/ada/system-linux-s390.ads10
-rw-r--r--gcc-4.9/gcc/ada/system-linux-s390x.ads10
-rw-r--r--gcc-4.9/gcc/ada/system-linux-sparc.ads10
-rw-r--r--gcc-4.9/gcc/ada/system-linux-sparcv9.ads10
-rw-r--r--gcc-4.9/gcc/ada/system-rtems.ads8
-rw-r--r--gcc-4.9/gcc/ada/system-vxworks-arm.ads10
-rw-r--r--gcc-4.9/gcc/c-family/ChangeLog36
-rw-r--r--gcc-4.9/gcc/c-family/c-common.c1
-rw-r--r--gcc-4.9/gcc/c-family/c-common.h2
-rw-r--r--gcc-4.9/gcc/c-family/c-ubsan.c13
-rw-r--r--gcc-4.9/gcc/c-family/c.opt2
-rw-r--r--gcc-4.9/gcc/c-family/cilk.c1
-rw-r--r--gcc-4.9/gcc/c/ChangeLog27
-rw-r--r--gcc-4.9/gcc/c/c-array-notation.c21
-rw-r--r--gcc-4.9/gcc/c/c-decl.c4
-rw-r--r--gcc-4.9/gcc/c/c-parser.c5
-rw-r--r--gcc-4.9/gcc/c/c-tree.h2
-rw-r--r--gcc-4.9/gcc/c/c-typeck.c42
-rw-r--r--gcc-4.9/gcc/cgraph.c62
-rw-r--r--gcc-4.9/gcc/cgraph.h2
-rw-r--r--gcc-4.9/gcc/cgraphclones.c339
-rw-r--r--gcc-4.9/gcc/cif-code.def4
-rw-r--r--gcc-4.9/gcc/combine.c25
-rw-r--r--gcc-4.9/gcc/common.opt4
-rw-r--r--gcc-4.9/gcc/config/aarch64/aarch64-simd.md4
-rw-r--r--gcc-4.9/gcc/config/aarch64/aarch64.c72
-rw-r--r--gcc-4.9/gcc/config/arm/aarch-common-protos.h1
-rw-r--r--gcc-4.9/gcc/config/arm/aarch-common.c36
-rw-r--r--gcc-4.9/gcc/config/arm/arm.c46
-rw-r--r--gcc-4.9/gcc/config/arm/arm.h13
-rw-r--r--gcc-4.9/gcc/config/arm/arm.md121
-rw-r--r--gcc-4.9/gcc/config/arm/cortex-a53.md60
-rw-r--r--gcc-4.9/gcc/config/arm/iterators.md4
-rw-r--r--gcc-4.9/gcc/config/arm/predicates.md8
-rw-r--r--gcc-4.9/gcc/config/arm/t-aprofile3
-rw-r--r--gcc-4.9/gcc/config/arm/types.md105
-rw-r--r--gcc-4.9/gcc/config/avr/avr-arch.h62
-rw-r--r--gcc-4.9/gcc/config/avr/avr-c.c5
-rw-r--r--gcc-4.9/gcc/config/avr/avr-devices.c6
-rw-r--r--gcc-4.9/gcc/config/avr/avr-mcus.def519
-rw-r--r--gcc-4.9/gcc/config/avr/avr.c2
-rw-r--r--gcc-4.9/gcc/config/avr/avr.h5
-rw-r--r--gcc-4.9/gcc/config/avr/avr.md2
-rw-r--r--gcc-4.9/gcc/config/avr/driver-avr.c6
-rw-r--r--gcc-4.9/gcc/config/avr/genmultilib.awk14
-rw-r--r--gcc-4.9/gcc/config/elfos.h2
-rw-r--r--gcc-4.9/gcc/config/i386/avx512fintrin.h83
-rw-r--r--gcc-4.9/gcc/config/i386/bmiintrin.h48
-rw-r--r--gcc-4.9/gcc/config/i386/constraints.md7
-rw-r--r--gcc-4.9/gcc/config/i386/i386.c6
-rw-r--r--gcc-4.9/gcc/config/i386/i386.md176
-rw-r--r--gcc-4.9/gcc/config/i386/predicates.md14
-rw-r--r--gcc-4.9/gcc/config/i386/sse.md207
-rw-r--r--gcc-4.9/gcc/config/mips/netbsd.h4
-rw-r--r--gcc-4.9/gcc/config/moxie/moxie.h4
-rw-r--r--gcc-4.9/gcc/config/moxie/moxie.md50
-rw-r--r--gcc-4.9/gcc/config/nios2/linux.h11
-rw-r--r--gcc-4.9/gcc/config/nios2/nios2.c33
-rw-r--r--gcc-4.9/gcc/config/nios2/nios2.md2
-rw-r--r--gcc-4.9/gcc/config/pa/pa.c20
-rw-r--r--gcc-4.9/gcc/config/rl78/rl78-expand.md17
-rw-r--r--gcc-4.9/gcc/config/rs6000/altivec.h6
-rw-r--r--gcc-4.9/gcc/config/rs6000/altivec.md12
-rw-r--r--gcc-4.9/gcc/config/rs6000/constraints.md5
-rw-r--r--gcc-4.9/gcc/config/rs6000/predicates.md8
-rw-r--r--gcc-4.9/gcc/config/rs6000/rs6000-builtin.def2
-rw-r--r--gcc-4.9/gcc/config/rs6000/rs6000-c.c6
-rw-r--r--gcc-4.9/gcc/config/rs6000/rs6000.c32
-rw-r--r--gcc-4.9/gcc/config/rs6000/rs6000.h4
-rw-r--r--gcc-4.9/gcc/config/rs6000/rs6000.md7
-rw-r--r--gcc-4.9/gcc/config/rs6000/vsx.md145
-rw-r--r--gcc-4.9/gcc/config/s390/s390.c9
-rw-r--r--gcc-4.9/gcc/config/s390/s390.md15
-rw-r--r--gcc-4.9/gcc/config/spu/spu.c2
-rw-r--r--gcc-4.9/gcc/config/spu/spu.md8
-rw-r--r--gcc-4.9/gcc/cp/ChangeLog165
-rw-r--r--gcc-4.9/gcc/cp/ChangeLog-20084
-rw-r--r--gcc-4.9/gcc/cp/ChangeLog-201020
-rw-r--r--gcc-4.9/gcc/cp/ChangeLog-20112
-rw-r--r--gcc-4.9/gcc/cp/ChangeLog-20122
-rw-r--r--gcc-4.9/gcc/cp/Make-lang.in2
-rw-r--r--gcc-4.9/gcc/cp/call.c3
-rw-r--r--gcc-4.9/gcc/cp/class.c121
-rw-r--r--gcc-4.9/gcc/cp/decl.c72
-rw-r--r--gcc-4.9/gcc/cp/decl2.c5
-rw-r--r--gcc-4.9/gcc/cp/error.c7
-rw-r--r--gcc-4.9/gcc/cp/init.c35
-rw-r--r--gcc-4.9/gcc/cp/mangle.c23
-rw-r--r--gcc-4.9/gcc/cp/method.c16
-rw-r--r--gcc-4.9/gcc/cp/name-lookup.c8
-rw-r--r--gcc-4.9/gcc/cp/name-lookup.h9
-rw-r--r--gcc-4.9/gcc/cp/parser.c56
-rw-r--r--gcc-4.9/gcc/cp/pt.c139
-rw-r--r--gcc-4.9/gcc/cp/search.c16
-rw-r--r--gcc-4.9/gcc/cp/semantics.c19
-rw-r--r--gcc-4.9/gcc/cp/tree.c12
-rw-r--r--gcc-4.9/gcc/cp/typeck.c8
-rw-r--r--gcc-4.9/gcc/cp/typeck2.c15
-rw-r--r--gcc-4.9/gcc/cse.c7
-rw-r--r--gcc-4.9/gcc/cselib.c2
-rw-r--r--gcc-4.9/gcc/doc/aot-compile.1209
-rw-r--r--gcc-4.9/gcc/doc/bugreport.texi6
-rw-r--r--gcc-4.9/gcc/doc/contrib.texi3
-rw-r--r--gcc-4.9/gcc/doc/cpp.11046
-rw-r--r--gcc-4.9/gcc/doc/cpp.info5602
-rw-r--r--gcc-4.9/gcc/doc/cppinternals.info1029
-rw-r--r--gcc-4.9/gcc/doc/extend.texi66
-rw-r--r--gcc-4.9/gcc/doc/fsf-funding.7193
-rw-r--r--gcc-4.9/gcc/doc/g++.121501
-rw-r--r--gcc-4.9/gcc/doc/gc-analyze.1231
-rw-r--r--gcc-4.9/gcc/doc/gcc.121501
-rw-r--r--gcc-4.9/gcc/doc/gcc.info56908
-rw-r--r--gcc-4.9/gcc/doc/gcc.texi2
-rw-r--r--gcc-4.9/gcc/doc/gccinstall.info4679
-rw-r--r--gcc-4.9/gcc/doc/gccint.info50307
-rw-r--r--gcc-4.9/gcc/doc/gcj-dbtool.1247
-rw-r--r--gcc-4.9/gcc/doc/gcj.1593
-rw-r--r--gcc-4.9/gcc/doc/gcj.info3653
-rw-r--r--gcc-4.9/gcc/doc/gcov.1733
-rw-r--r--gcc-4.9/gcc/doc/generic.texi4
-rw-r--r--gcc-4.9/gcc/doc/gfdl.71
-rw-r--r--gcc-4.9/gcc/doc/gfortran.11411
-rw-r--r--gcc-4.9/gcc/doc/gij.1295
-rw-r--r--gcc-4.9/gcc/doc/gpl.7850
-rw-r--r--gcc-4.9/gcc/doc/grmic.1222
-rw-r--r--gcc-4.9/gcc/doc/install.texi18
-rw-r--r--gcc-4.9/gcc/doc/invoke.texi82
-rw-r--r--gcc-4.9/gcc/doc/jcf-dump.1217
-rw-r--r--gcc-4.9/gcc/doc/jv-convert.1210
-rw-r--r--gcc-4.9/gcc/doc/md.texi3
-rw-r--r--gcc-4.9/gcc/doc/rebuild-gcj-db.1181
-rw-r--r--gcc-4.9/gcc/doc/sourcebuild.texi4
-rw-r--r--gcc-4.9/gcc/dojump.c11
-rw-r--r--gcc-4.9/gcc/dwarf2out.c12
-rw-r--r--gcc-4.9/gcc/explow.c5
-rw-r--r--gcc-4.9/gcc/expr.c17
-rw-r--r--gcc-4.9/gcc/fortran/ChangeLog66
-rw-r--r--gcc-4.9/gcc/fortran/check.c4
-rw-r--r--gcc-4.9/gcc/fortran/class.c4
-rw-r--r--gcc-4.9/gcc/fortran/frontend-passes.c27
-rw-r--r--gcc-4.9/gcc/fortran/gfortran.info18449
-rw-r--r--gcc-4.9/gcc/fortran/gfortran.texi13
-rw-r--r--gcc-4.9/gcc/fortran/intrinsic.texi52
-rw-r--r--gcc-4.9/gcc/fortran/trans-array.c14
-rw-r--r--gcc-4.9/gcc/fortran/trans-expr.c14
-rw-r--r--gcc-4.9/gcc/fortran/trans-intrinsic.c2
-rw-r--r--gcc-4.9/gcc/fortran/trans-stmt.c6
-rw-r--r--gcc-4.9/gcc/fortran/trans-types.c26
-rw-r--r--gcc-4.9/gcc/fortran/trans.h4
-rw-r--r--gcc-4.9/gcc/gcc.c9
-rw-r--r--gcc-4.9/gcc/gcse.c71
-rw-r--r--gcc-4.9/gcc/gengtype-lex.c2897
-rw-r--r--gcc-4.9/gcc/gimple-expr.c18
-rw-r--r--gcc-4.9/gcc/gimple-expr.h1
-rw-r--r--gcc-4.9/gcc/gimple-fold.c84
-rw-r--r--gcc-4.9/gcc/gimple-low.c10
-rw-r--r--gcc-4.9/gcc/gimple-ssa-strength-reduction.c4
-rw-r--r--gcc-4.9/gcc/gimple.c5
-rw-r--r--gcc-4.9/gcc/gimple.h3
-rw-r--r--gcc-4.9/gcc/gimplify-me.c2
-rw-r--r--gcc-4.9/gcc/gimplify.c19
-rw-r--r--gcc-4.9/gcc/gimplify.h1
-rw-r--r--gcc-4.9/gcc/go/ChangeLog4
-rw-r--r--gcc-4.9/gcc/go/gofrontend/expressions.cc8
-rw-r--r--gcc-4.9/gcc/graphite-scop-detection.c18
-rw-r--r--gcc-4.9/gcc/graphite-sese-to-poly.c1
-rw-r--r--gcc-4.9/gcc/haifa-sched.c6
-rw-r--r--gcc-4.9/gcc/ipa-cp.c24
-rw-r--r--gcc-4.9/gcc/ipa-devirt.c43
-rw-r--r--gcc-4.9/gcc/ipa-inline-analysis.c151
-rw-r--r--gcc-4.9/gcc/ipa-inline-transform.c2
-rw-r--r--gcc-4.9/gcc/ipa-inline.c95
-rw-r--r--gcc-4.9/gcc/ipa-inline.h6
-rw-r--r--gcc-4.9/gcc/ipa-pure-const.c72
-rw-r--r--gcc-4.9/gcc/ipa.c23
-rw-r--r--gcc-4.9/gcc/ira-color.c2
-rw-r--r--gcc-4.9/gcc/java/ChangeLog4
-rw-r--r--gcc-4.9/gcc/lra-assigns.c157
-rw-r--r--gcc-4.9/gcc/lra-constraints.c57
-rw-r--r--gcc-4.9/gcc/lto-cgraph.c12
-rw-r--r--gcc-4.9/gcc/lto-streamer-in.c3
-rw-r--r--gcc-4.9/gcc/lto-streamer-out.c16
-rw-r--r--gcc-4.9/gcc/lto-wrapper.c2
-rw-r--r--gcc-4.9/gcc/lto/ChangeLog4
-rw-r--r--gcc-4.9/gcc/mode-switching.c10
-rw-r--r--gcc-4.9/gcc/objc/ChangeLog4
-rw-r--r--gcc-4.9/gcc/objcp/ChangeLog4
-rw-r--r--gcc-4.9/gcc/omp-low.c15
-rw-r--r--gcc-4.9/gcc/optabs.c9
-rw-r--r--gcc-4.9/gcc/po/ChangeLog8
-rw-r--r--gcc-4.9/gcc/po/be.gmobin0 -> 10532 bytes
-rw-r--r--gcc-4.9/gcc/po/da.gmobin0 -> 137513 bytes
-rw-r--r--gcc-4.9/gcc/po/de.gmobin0 -> 1197941 bytes
-rw-r--r--gcc-4.9/gcc/po/el.gmobin0 -> 11733 bytes
-rw-r--r--gcc-4.9/gcc/po/es.gmobin0 -> 1129927 bytes
-rw-r--r--gcc-4.9/gcc/po/fi.gmobin0 -> 253499 bytes
-rw-r--r--gcc-4.9/gcc/po/fr.gmobin0 -> 198110 bytes
-rw-r--r--gcc-4.9/gcc/po/hr.gmobin0 -> 16065 bytes
-rw-r--r--gcc-4.9/gcc/po/id.gmobin0 -> 666820 bytes
-rw-r--r--gcc-4.9/gcc/po/ja.gmobin0 -> 493928 bytes
-rw-r--r--gcc-4.9/gcc/po/nl.gmobin0 -> 95067 bytes
-rw-r--r--gcc-4.9/gcc/po/ru.gmobin0 -> 505514 bytes
-rw-r--r--gcc-4.9/gcc/po/sr.gmobin0 -> 652078 bytes
-rw-r--r--gcc-4.9/gcc/po/sv.gmobin0 -> 1298864 bytes
-rw-r--r--gcc-4.9/gcc/po/sv.po920
-rw-r--r--gcc-4.9/gcc/po/tr.gmobin0 -> 465450 bytes
-rw-r--r--gcc-4.9/gcc/po/vi.gmobin0 -> 461464 bytes
-rw-r--r--gcc-4.9/gcc/po/zh_CN.gmobin0 -> 791208 bytes
-rw-r--r--gcc-4.9/gcc/po/zh_TW.gmobin0 -> 387769 bytes
-rw-r--r--gcc-4.9/gcc/real.c3
-rw-r--r--gcc-4.9/gcc/recog.c75
-rw-r--r--gcc-4.9/gcc/rtlanal.c42
-rw-r--r--gcc-4.9/gcc/testsuite/ChangeLog618
-rw-r--r--gcc-4.9/gcc/testsuite/ChangeLog-20082
-rw-r--r--gcc-4.9/gcc/testsuite/ChangeLog-201016
-rw-r--r--gcc-4.9/gcc/testsuite/c-c++-common/cilk-plus/CK/invalid_spawns.c1
-rw-r--r--gcc-4.9/gcc/testsuite/c-c++-common/cilk-plus/CK/pr60469.c15
-rw-r--r--gcc-4.9/gcc/testsuite/c-c++-common/pr60689.c10
-rw-r--r--gcc-4.9/gcc/testsuite/c-c++-common/ubsan/pr60636.c15
-rw-r--r--gcc-4.9/gcc/testsuite/g++.dg/abi/abi-tag3.C7
-rw-r--r--gcc-4.9/gcc/testsuite/g++.dg/abi/abi-tag6.C25
-rw-r--r--gcc-4.9/gcc/testsuite/g++.dg/abi/abi-tag7.C9
-rw-r--r--gcc-4.9/gcc/testsuite/g++.dg/abi/thunk6.C19
-rw-r--r--gcc-4.9/gcc/testsuite/g++.dg/cilk-plus/cilk-plus.exp89
-rw-r--r--gcc-4.9/gcc/testsuite/g++.dg/cpp0x/auto42.C9
-rw-r--r--gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-ice15.C12
-rw-r--r--gcc-4.9/gcc/testsuite/g++.dg/cpp0x/defaulted2.C2
-rw-r--r--gcc-4.9/gcc/testsuite/g++.dg/cpp0x/initlist81.C25
-rw-r--r--gcc-4.9/gcc/testsuite/g++.dg/cpp0x/initlist82.C20
-rw-r--r--gcc-4.9/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-uneval.C2
-rw-r--r--gcc-4.9/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-uneval2.C7
-rw-r--r--gcc-4.9/gcc/testsuite/g++.dg/cpp0x/pr31439.C2
-rw-r--r--gcc-4.9/gcc/testsuite/g++.dg/cpp0x/variadic154.C8
-rw-r--r--gcc-4.9/gcc/testsuite/g++.dg/cpp0x/variadic155.C4
-rw-r--r--gcc-4.9/gcc/testsuite/g++.dg/cpp0x/variadic156.C6
-rw-r--r--gcc-4.9/gcc/testsuite/g++.dg/cpp0x/vt-33964.C2
-rw-r--r--gcc-4.9/gcc/testsuite/g++.dg/cpp1y/auto-fn25.C3
-rw-r--r--gcc-4.9/gcc/testsuite/g++.dg/cpp1y/pr60573.C28
-rw-r--r--gcc-4.9/gcc/testsuite/g++.dg/cpp1y/pr60626.C7
-rw-r--r--gcc-4.9/gcc/testsuite/g++.dg/ext/vla14.C23
-rw-r--r--gcc-4.9/gcc/testsuite/g++.dg/ext/vla15.C20
-rw-r--r--gcc-4.9/gcc/testsuite/g++.dg/gomp/pr60682.C44
-rw-r--r--gcc-4.9/gcc/testsuite/g++.dg/init/const10.C33
-rw-r--r--gcc-4.9/gcc/testsuite/g++.dg/init/const11.C29
-rw-r--r--gcc-4.9/gcc/testsuite/g++.dg/init/ctor4-1.C21
-rw-r--r--gcc-4.9/gcc/testsuite/g++.dg/init/ctor4.C8
-rw-r--r--gcc-4.9/gcc/testsuite/g++.dg/init/ctor8.C2
-rw-r--r--gcc-4.9/gcc/testsuite/g++.dg/init/pr25811.C90
-rw-r--r--gcc-4.9/gcc/testsuite/g++.dg/init/pr29043.C17
-rw-r--r--gcc-4.9/gcc/testsuite/g++.dg/init/pr43719.C60
-rw-r--r--gcc-4.9/gcc/testsuite/g++.dg/init/pr44086.C4
-rw-r--r--gcc-4.9/gcc/testsuite/g++.dg/init/uninitialized1.C6
-rw-r--r--gcc-4.9/gcc/testsuite/g++.dg/ipa/devirt-21.C2
-rw-r--r--gcc-4.9/gcc/testsuite/g++.dg/ipa/devirt-23.C2
-rw-r--r--gcc-4.9/gcc/testsuite/g++.dg/ipa/pr60600.C34
-rw-r--r--gcc-4.9/gcc/testsuite/g++.dg/ipa/pr60640-1.C50
-rw-r--r--gcc-4.9/gcc/testsuite/g++.dg/ipa/pr60640-2.C15
-rw-r--r--gcc-4.9/gcc/testsuite/g++.dg/ipa/pr60640-3.C81
-rw-r--r--gcc-4.9/gcc/testsuite/g++.dg/ipa/pr60640-4.C85
-rw-r--r--gcc-4.9/gcc/testsuite/g++.dg/lto/pr60567_0.C23
-rw-r--r--gcc-4.9/gcc/testsuite/g++.dg/opt/pr56999.C1
-rw-r--r--gcc-4.9/gcc/testsuite/g++.dg/pr49718.C3
-rw-r--r--gcc-4.9/gcc/testsuite/g++.dg/template/crash119.C8
-rw-r--r--gcc-4.9/gcc/testsuite/g++.dg/template/crash97.C2
-rw-r--r--gcc-4.9/gcc/testsuite/g++.dg/template/crash98.C2
-rw-r--r--gcc-4.9/gcc/testsuite/g++.dg/template/partial5.C4
-rw-r--r--gcc-4.9/gcc/testsuite/g++.dg/torture/pr60315.C19
-rw-r--r--gcc-4.9/gcc/testsuite/g++.dg/torture/pr60609.C252
-rw-r--r--gcc-4.9/gcc/testsuite/g++.dg/torture/pr60648.C70
-rw-r--r--gcc-4.9/gcc/testsuite/g++.dg/torture/pr60659.C58
-rw-r--r--gcc-4.9/gcc/testsuite/g++.dg/torture/pr60746.C23
-rw-r--r--gcc-4.9/gcc/testsuite/g++.dg/torture/pr60750.C21
-rw-r--r--gcc-4.9/gcc/testsuite/g++.dg/vect/pr60729.cc10
-rw-r--r--gcc-4.9/gcc/testsuite/g++.dg/warn/Wnvdtor-2.C30
-rw-r--r--gcc-4.9/gcc/testsuite/g++.dg/warn/Wnvdtor-3.C75
-rw-r--r--gcc-4.9/gcc/testsuite/g++.dg/warn/Wnvdtor-4.C75
-rw-r--r--gcc-4.9/gcc/testsuite/g++.dg/warn/Wnvdtor.C1
-rw-r--r--gcc-4.9/gcc/testsuite/g++.dg/warn/Wreturn-local-addr-2.C11
-rw-r--r--gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/overload21.C2
-rw-r--r--gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/init5.C4
-rw-r--r--gcc-4.9/gcc/testsuite/g++.old-deja/g++.robertl/eb121.C2
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr28865.c2
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr60556.c8
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr60655-1.c31
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr60655-2.c30
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.c-torture/execute/20140326-1.c10
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/atomic/stdatomic-flag.c2
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/attr-weakref-1.c4
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/builtin-bswap-6.c5
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/builtin-bswap-6a.c44
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/builtin-bswap-7.c4
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/builtin-bswap-7a.c44
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/cilk-plus/cilk-plus.exp76
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/graphite/pr60740.c16
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/graphite/pr60785.c27
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/lto/pr55113_0.c3
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/lto/pr59626_0.c15
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/lto/pr59626_1.c4
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/pr45416.c2
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/pr59940.c3
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/pr60647-1.c26
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/pr60647-2.c26
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/pr60704.c14
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/pr60797.c8
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/predict-8.c12
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/torture/pr53922.c1
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/torture/pr60092.c4
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/torture/pr60733.c36
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/torture/pr60766.c15
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/20040517-1.c5
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-4.c3
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/ssa-ifcombine-13.c4
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/vect/pr60505.c12
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/vect/pr60656.c47
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/aarch64/pr60034.c10
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/aarch64/pr60580_1.c45
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/aarch64/pr60675.C277
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/aarch64/pr60697.c638
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/aarch64/test_fp_attribute_1.c26
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/aarch64/test_fp_attribute_2.c26
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/arm/pr60650-2.c37
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/arm/pr60650.c41
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/arm/pr60657.c13
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/arm/pr60663.c11
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/avr/dev-specific-rmw.c13
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/387-3.c2
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/387-4.c2
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/avx2-vpaddb-3.c2
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/avx2-vpaddd-3.c2
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/avx2-vpaddq-3.c2
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/avx2-vpaddw-3.c2
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/avx2-vpand-3.c2
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/avx2-vpmulld-3.c2
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/avx2-vpmullw-3.c2
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/avx2-vpsrad-3.c2
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/avx2-vpsraw-3.c2
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/avx2-vpsrld-3.c2
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/avx2-vpsrlw-3.c2
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/avx2-vpsubb-3.c2
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/avx2-vpsubd-3.c2
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/avx2-vpsubq-3.c2
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/avx2-vpsubw-3.c2
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/avx256-unaligned-load-1.c2
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/avx256-unaligned-load-2.c2
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/avx256-unaligned-load-4.c2
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/avx256-unaligned-store-1.c2
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/avx256-unaligned-store-2.c2
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/avx256-unaligned-store-4.c2
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/avx512f-vshuff32x4-2.c2
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/avx512f-vshuff64x2-2.c2
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/avx512f-vshufi32x4-2.c2
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/avx512f-vshufi64x2-2.c2
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/bmi-1.c32
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/bmi-2.c32
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/fma4-builtin.c2
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/fma4-fma-2.c2
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/fma4-fma.c2
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/fma4-vector-2.c2
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/fma4-vector.c2
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/funcspec-2.c1
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/funcspec-3.c1
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/funcspec-9.c1
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/isa-1.c1
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/l_fma_double_1.c2
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/l_fma_double_2.c2
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/l_fma_double_3.c2
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/l_fma_double_4.c2
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/l_fma_double_5.c2
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/l_fma_double_6.c2
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/l_fma_float_1.c2
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/l_fma_float_2.c2
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/l_fma_float_3.c2
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/l_fma_float_4.c2
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/l_fma_float_5.c2
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/l_fma_float_6.c2
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/memcpy-strategy-1.c1
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/memcpy-strategy-2.c1
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/memcpy-vector_loop-1.c1
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/memcpy-vector_loop-2.c1
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/memset-vector_loop-1.c1
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/memset-vector_loop-2.c1
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/pr27971.c2
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/pr30970.c2
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/pr42542-4a.c2
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/pr59390.c2
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/pr60693.c13
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/pr60700.c59
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/sse2-init-v2di-2.c1
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/ssetype-1.c1
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/ssetype-2.c1
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/ssetype-5.c1
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/powerpc/atomic_load_store-p8.c22
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/powerpc/p8vector-vbpermq.c27
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/powerpc/pr60676.c128
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/powerpc/vsx-extract-1.c16
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/powerpc/vsx-extract-2.c17
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/powerpc/vsx-extract-3.c17
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/s390/20140327-1.c10
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/s390/htm-builtins-compile-1.c16
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/s390/htm-nofloat-1.c54
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/s390/htm-nofloat-compile-1.c12
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/s390/s390.exp10
-rw-r--r--gcc-4.9/gcc/testsuite/gfortran.dg/arrayio_13.f9014
-rw-r--r--gcc-4.9/gcc/testsuite/gfortran.dg/associate_15.f9040
-rw-r--r--gcc-4.9/gcc/testsuite/gfortran.dg/class_nameclash.f9039
-rw-r--r--gcc-4.9/gcc/testsuite/gfortran.dg/finalize_24.f9028
-rw-r--r--gcc-4.9/gcc/testsuite/gfortran.dg/fmt_en.f9031
-rw-r--r--gcc-4.9/gcc/testsuite/gfortran.dg/lto/pr60635_0.f9016
-rw-r--r--gcc-4.9/gcc/testsuite/gfortran.dg/lto/pr60635_1.c14
-rw-r--r--gcc-4.9/gcc/testsuite/gfortran.dg/unlimited_polymorphic_17.f9051
-rw-r--r--gcc-4.9/gcc/testsuite/gfortran.dg/warn_conversion_4.f906
-rw-r--r--gcc-4.9/gcc/testsuite/gfortran.dg/where_4.f9018
-rw-r--r--gcc-4.9/gcc/testsuite/gnat.dg/opt33.adb41
-rw-r--r--gcc-4.9/gcc/testsuite/gnat.dg/test_raise_from_pure.adb2
-rw-r--r--gcc-4.9/gcc/testsuite/lib/cilk-plus-dg.exp104
-rw-r--r--gcc-4.9/gcc/testsuite/lib/gcc-dg.exp1
-rw-r--r--gcc-4.9/gcc/testsuite/lib/prune.exp2
-rw-r--r--gcc-4.9/gcc/testsuite/lib/target-supports.exp32
-rw-r--r--gcc-4.9/gcc/tree-cfgcleanup.c3
-rw-r--r--gcc-4.9/gcc/tree-inline.c1
-rw-r--r--gcc-4.9/gcc/tree-pretty-print.c25
-rw-r--r--gcc-4.9/gcc/tree-sra.c38
-rw-r--r--gcc-4.9/gcc/tree-ssa-loop-ivopts.c9
-rw-r--r--gcc-4.9/gcc/tree-ssa-operands.c6
-rw-r--r--gcc-4.9/gcc/tree-ssanames.c2
-rw-r--r--gcc-4.9/gcc/tree-streamer-out.c8
-rw-r--r--gcc-4.9/gcc/tree-streamer.c31
-rw-r--r--gcc-4.9/gcc/tree-streamer.h5
-rw-r--r--gcc-4.9/gcc/tree-vect-loop.c21
-rw-r--r--gcc-4.9/gcc/tree-vect-stmts.c16
-rw-r--r--gcc-4.9/gcc/tree-vectorizer.h6
-rw-r--r--gcc-4.9/gcc/tree-vrp.c57
-rw-r--r--gcc-4.9/gcc/ubsan.c35
-rw-r--r--gcc-4.9/gcc/ubsan.h2
-rw-r--r--gcc-4.9/gcc/varasm.c2
464 files changed, 203763 insertions, 2671 deletions
diff --git a/gcc-4.9/gcc/ChangeLog b/gcc-4.9/gcc/ChangeLog
index 3741b54df..c0f56a156 100644
--- a/gcc-4.9/gcc/ChangeLog
+++ b/gcc-4.9/gcc/ChangeLog
@@ -1,3 +1,926 @@
+2014-04-22 Release Manager
+
+ * GCC 4.9.0 released.
+
+2014-04-18 Richard Henderson <rth@redhat.com>
+
+ * config/aarch64/aarch64.c (aarch64_register_move_cost): Pass a mode
+ to GET_MODE_SIZE, not a reg_class_t.
+
+2014-04-17 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/60847
+ Forward port from 4.8 branch
+ 2013-07-19 Kirill Yukhin <kirill.yukhin@intel.com>
+
+ * config/i386/bmiintrin.h (_blsi_u32): New.
+ (_blsi_u64): Ditto.
+ (_blsr_u32): Ditto.
+ (_blsr_u64): Ditto.
+ (_blsmsk_u32): Ditto.
+ (_blsmsk_u64): Ditto.
+ (_tzcnt_u32): Ditto.
+ (_tzcnt_u64): Ditto.
+
+2014-04-15 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ PR target/60839
+ Revert the following patch
+
+ 2014-04-02 Michael Meissner <meissner@linux.vnet.ibm.com>
+
+ PR target/60735
+ * config/rs6000/rs6000.c (rs6000_hard_regno_mode_ok): If we have
+ software floating point or no floating point registers, do not
+ allow any type in the FPRs. Eliminate a test for SPE SIMD types
+ in GPRs that occurs after we tested for GPRs that would never be
+ true.
+
+ * config/rs6000/rs6000.md (mov<mode>_softfloat32, FMOVE64):
+ Rewrite tests to use TARGET_DOUBLE_FLOAT and TARGET_E500_DOUBLE,
+ since the FMOVE64 type is DFmode/DDmode. If TARGET_E500_DOUBLE,
+ specifically allow DDmode, since that does not use the SPE SIMD
+ instructions.
+
+2014-04-15 Jakub Jelinek <jakub@redhat.com>
+
+ PR plugins/59335
+ * Makefile.in (PLUGIN_HEADERS): Add various headers that have been
+ added in 4.9.
+
+2014-04-14 Yufeng Zhang <yufeng.zhang@arm.com>
+
+ * doc/invoke.texi (free): Document AArch64.
+
+2013-04-11 Jakub Jelinek <jakub@redhat.com>
+
+ * DEV-PHASE: Set to prerelease.
+
+2014-04-11 Tobias Burnus <burnus@net-b.de>
+
+ PR other/59055
+ * doc/bugreport.texi (Bugs): Remove nodes pointing to the
+ nirvana.
+ * doc/gcc.texi (Service): Update description in the @menu
+ * doc/invoke.texi (Option Summary): Remove misplaced and
+ duplicated @menu.
+
+2014-04-11 Steve Ellcey <sellcey@mips.com>
+ Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/60556
+ * expr.c (convert_move): Use emit_store_flag_force instead of
+ emit_store_flag. Pass lowpart_mode instead of VOIDmode as 5th
+ argument to it.
+
+2014-04-11 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/60797
+ * varasm.c (assemble_alias): Avoid endless error reporting
+ recursion by setting TREE_ASM_WRITTEN.
+
+2014-04-11 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
+
+ * config/s390/s390.md: Add a splitter for NOT rtx.
+
+2014-04-11 Jakub Jelinek <jakub@redhat.com>
+
+ PR rtl-optimization/60663
+ * cse.c (cse_insn): Set src_volatile on ASM_OPERANDS in
+ PARALLEL.
+
+2014-04-10 Jan Hubicka <hubicka@ucw.cz>
+ Jakub Jelinek <jakub@redhat.com>
+
+ PR lto/60567
+ * ipa.c (function_and_variable_visibility): Copy forced_by_abi flag from
+ decl_node to node.
+
+2014-04-10 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
+
+ PR debug/60655
+ * config/arm/arm.c (TARGET_CONST_NOT_OK_FOR_DEBUG_P): Define
+ (arm_const_not_ok_for_debug_p): Reject MINUS with SYM_REF's
+ ameliorating the cases where it can be.
+
+2014-04-09 David Edelsohn <dje.gcc@gmail.com>
+
+ Revert
+ 2014-04-08 Pat Haugen <pthaugen@us.ibm.com>
+
+ * config/rs6000/sync.md (AINT mode_iterator): Move definition.
+ (loadsync_<mode>): Change mode.
+ (load_quadpti, store_quadpti): New.
+ (atomic_load<mode>, atomic_store<mode>): Add support for TI mode.
+ * config/rs6000/rs6000.md (unspec enum): Add UNSPEC_LSQ.
+ * config/rs6000/predicates.md (quad_memory_operand): !TARGET_SYNC_TI.
+
+2014-04-09 Cong Hou <congh@google.com>
+
+ PR testsuite/60773
+ * doc/sourcebuild.texi (vect_widen_mult_si_to_di_pattern): Add
+ documentation.
+
+2014-04-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ * config/rs6000/rs6000.c (rs6000_expand_vector_set): Use vnand
+ instead of vnor to exploit possible fusion opportunity in the
+ future.
+ (altivec_expand_vec_perm_const_le): Likewise.
+
+2014-04-08 Pat Haugen <pthaugen@us.ibm.com>
+
+ * config/rs6000/sync.md (AINT mode_iterator): Move definition.
+ (loadsync_<mode>): Change mode.
+ (load_quadpti, store_quadpti): New.
+ (atomic_load<mode>, atomic_store<mode>): Add support for TI mode.
+ * config/rs6000/rs6000.md (unspec enum): Add UNSPEC_LSQ.
+
+2014-04-08 Richard Sandiford <rdsandiford@googlemail.com>
+
+ PR target/60763
+ * config/rs6000/vsx.md (vsx_xscvdpspn_scalar): Change input to DImode.
+ * config/rs6000/rs6000.md (reload_vsx_from_gprsf): Update accordingly.
+ Use gen_rtx_REG rather than simplify_gen_subreg for op0_di.
+
+2014-04-08 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/60706
+ * tree-pretty-print.c (pp_double_int): For HWI32 hosts with
+ a 64bit widest int print double-int similar to on HWI64 hosts.
+
+2014-04-08 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/60785
+ * graphite-sese-to-poly.c (rewrite_phi_out_of_ssa): Treat
+ default defs properly.
+
+2014-04-08 Nathan Sidwell <nathan@codesourcery.com>
+
+ * doc/invoke (Wnon-virtual-dtor): Update to match implementation.
+ (Weffc++): Likewise.
+
+2014-04-07 Jan Hubicka <hubcika@ucw.cz>
+
+ * ipa-devirt.c (maybe_record_node): When node is not recorded,
+ set completep to false rather than true.
+
+2014-04-07 Douglas B Rupp <rupp@adacore.com>
+
+ PR target/60504
+ * config/arm/arm.h (ASM_PREFERRED_EH_DATA_FORMAT): Expose from
+ ARM_TARGET2_DWARF_FORMAT.
+
+2014-04-07 Charles Baylis <charles.baylis@linaro.org>
+
+ PR target/60609
+ * config/arm/arm.h (ASM_OUTPUT_CASE_END): Remove.
+ (LABEL_ALIGN_AFTER_BARRIER): Align barriers which occur after
+ ADDR_DIFF_VEC.
+
+2014-04-07 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/60766
+ * tree-ssa-loop-ivopts.c (cand_value_at): Compute in an unsigned type.
+ (may_eliminate_iv): Convert cand_value_at result to desired type.
+
+2014-04-07 Jason Merrill <jason@redhat.com>
+
+ PR c++/60731
+ * common.opt (-fno-gnu-unique): Add.
+ * config/elfos.h (USE_GNU_UNIQUE_OBJECT): Check it.
+
+2014-04-07 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ * haifa-sched.c: Fix outdated function reference and minor
+ grammar errors in introductory comment.
+
+2014-04-07 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/60750
+ * tree-ssa-operands.c (maybe_add_call_vops): Also add VDEFs
+ for noreturn calls.
+ * tree-cfgcleanup.c (fixup_noreturn_call): Do not remove VDEFs.
+
+2014-04-06 John David Anglin <danglin@gcc.gnu.org>
+
+ PR debug/55794
+ * config/pa/pa.c (pa_output_function_epilogue): Skip address and code
+ size accounting for thunks.
+ (pa_asm_output_mi_thunk): Use final_start_function() and
+ final_end_function() to output function start and end directives.
+
+2014-04-05 Pitchumani Sivanupandi <Pitchumani.S@atmel.com>
+
+ * config/avr/avr-arch.h (avr_mcu_t): Add dev_attribute field to have device
+ specific ISA/ feature information. Remove short_sp and errata_skip ds.
+ Add avr_device_specific_features enum to have device specific info.
+ * config/avr/avr-c.c (avr_cpu_cpp_builtins): use dev_attribute to check
+ errata_skip. Add __AVR_ISA_RMW__ builtin macro if RMW ISA available.
+ * config/avr/avr-devices.c (avr_mcu_types): Update AVR_MCU macro for
+ updated device specific info.
+ * config/avr/avr-mcus.def: Merge device specific details to
+ dev_attribute field.
+ * config/avr/avr.c (avr_2word_insn_p): use dev_attribute field to check
+ errata_skip.
+ * config/avr/avr.h (AVR_HAVE_8BIT_SP): same for short sp info.
+ * config/avr/driver-avr.c (avr_device_to_as): Pass -mrmw option to
+ assembler if RMW isa supported by current device.
+ * config/avr/genmultilib.awk: Update as device info structure changed.
+ * doc/invoke.texi: Add info for __AVR_ISA_RMW__ builtin macro
+
+2014-04-04 Cong Hou <congh@google.com>
+
+ PR tree-optimization/60656
+ * tree-vect-stmts.c (supportable_widening_operation):
+ Fix a bug that elements in a vector with vect_used_by_reduction
+ property are incorrectly reordered when the operation on it is not
+ consistant with the one in reduction operation.
+
+2014-04-04 John David Anglin <danglin@gcc.gnu.org>
+
+ PR rtl-optimization/60155
+ * gcse.c (record_set_data): New function.
+ (single_set_gcse): New function.
+ (gcse_emit_move_after): Use single_set_gcse instead of single_set.
+ (hoist_code): Likewise.
+ (get_pressure_class_and_nregs): Likewise.
+
+2014-04-04 Eric Botcazou <ebotcazou@adacore.com>
+
+ * explow.c (probe_stack_range): Emit a final optimization blockage.
+
+2014-04-04 Anthony Green <green@moxielogic.com>
+
+ * config/moxie/moxie.md (zero_extendqisi2, zero_extendhisi2): Fix
+ typos.
+
+2014-04-04 Jan Hubicka <hubicka@ucw.cz>
+
+ PR ipa/59626
+ * lto-cgraph.c (input_overwrite_node): Check that partitioning
+ flags are set only during streaming.
+ * ipa.c (process_references, walk_polymorphic_call_targets,
+ symtab_remove_unreachable_nodes): Drop bodies of always inline
+ after early inlining.
+ (symtab_remove_unreachable_nodes): Remove always_inline attribute.
+
+2014-04-04 Jakub Jelinek <jakub@redhat.com>
+ Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
+
+ PR debug/60655
+ * dwarf2out.c (const_ok_for_output_1): Reject expressions
+ containing a NOT.
+
+2014-04-04 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ PR bootstrap/60743
+ * config/arm/cortex-a53.md (cortex_a53_fdivs): Reduce reservation
+ duration.
+ (cortex_a53_fdivd): Likewise.
+
+2014-04-04 Martin Jambor <mjambor@suse.cz>
+
+ PR ipa/60640
+ * cgraph.h (cgraph_clone_node): New parameter added to declaration.
+ Adjust all callers.
+ * cgraph.c (clone_of_p): Also return true if thunks match.
+ (verify_edge_corresponds_to_fndecl): Removed extraneous call to
+ cgraph_function_or_thunk_node and an obsolete comment.
+ * cgraphclones.c (build_function_type_skip_args): Moved upwards in the
+ file.
+ (build_function_decl_skip_args): Likewise.
+ (set_new_clone_decl_and_node_flags): New function.
+ (duplicate_thunk_for_node): Likewise.
+ (redirect_edge_duplicating_thunks): Likewise.
+ (cgraph_clone_node): New parameter args_to_skip, pass it to
+ redirect_edge_duplicating_thunks which is called instead of
+ cgraph_redirect_edge_callee.
+ (cgraph_create_virtual_clone): Pass args_to_skip to cgraph_clone_node,
+ moved setting of a lot of flags to set_new_clone_decl_and_node_flags.
+
+2014-04-04 Jeff Law <law@redhat.com>
+
+ PR target/60657
+ * config/arm/predicates.md (const_int_I_operand): New predicate.
+ (const_int_M_operand): Similarly.
+ * config/arm/arm.md (insv_zero): Use const_int_M_operand instead of
+ const_int_operand.
+ (insv_t2, extv_reg, extzv_t2): Likewise.
+ (load_multiple_with_writeback): Similarly for const_int_I_operand.
+ (pop_multiple_with_writeback_and_return): Likewise.
+ (vfp_pop_multiple_with_writeback): Likewise
+
+2014-04-04 Richard Biener <rguenther@suse.de>
+
+ PR ipa/60746
+ * tree-ssanames.c (make_ssa_name_fn): Fix assert.
+ * gimple.c (gimple_set_bb): Avoid ICEing for NULL cfun for
+ non-GIMPLE_LABELs.
+ * gimplify.h (gimple_add_tmp_var_fn): Declare.
+ * gimplify.c (gimple_add_tmp_var_fn): New function.
+ * gimple-expr.h (create_tmp_reg_fn): Declare.
+ * gimple-expr.c (create_tmp_reg_fn): New function.
+ * gimple-low.c (record_vars_into): Don't change cfun.
+ * cgraph.c (cgraph_redirect_edge_call_stmt_to_callee): Fix
+ code generation without cfun.
+
+2014-04-04 Thomas Schwinge <thomas@codesourcery.com>
+
+ PR bootstrap/60719
+ * Makefile.in (install-driver): Fix shell scripting.
+
+2014-04-03 Cong Hou <congh@google.com>
+
+ PR tree-optimization/60505
+ * tree-vectorizer.h (struct _stmt_vec_info): Add th field as the
+ threshold of number of iterations below which no vectorization will be
+ done.
+ * tree-vect-loop.c (new_loop_vec_info):
+ Initialize LOOP_VINFO_COST_MODEL_THRESHOLD.
+ * tree-vect-loop.c (vect_analyze_loop_operations):
+ Set LOOP_VINFO_COST_MODEL_THRESHOLD.
+ * tree-vect-loop.c (vect_transform_loop):
+ Use LOOP_VINFO_COST_MODEL_THRESHOLD.
+ * tree-vect-loop.c (vect_analyze_loop_2): Check the maximum number
+ of iterations of the loop and see if we should build the epilogue.
+
+2014-04-03 Richard Biener <rguenther@suse.de>
+
+ * tree-streamer.h (struct streamer_tree_cache_d): Add next_idx
+ member.
+ (streamer_tree_cache_create): Adjust.
+ * tree-streamer.c (streamer_tree_cache_add_to_node_array): Adjust
+ to allow optional nodes array.
+ (streamer_tree_cache_insert_1): Use next_idx to assign idx.
+ (streamer_tree_cache_append): Likewise.
+ (streamer_tree_cache_create): Create nodes array optionally
+ as specified by parameter.
+ * lto-streamer-out.c (create_output_block): Avoid maintaining
+ the node array in the writer cache.
+ (DFS_write_tree): Remove assertion.
+ (produce_asm_for_decls): Free the out decl state hash table
+ early.
+ * lto-streamer-in.c (lto_data_in_create): Adjust for
+ streamer_tree_cache_create prototype change.
+
+2014-04-03 Richard Biener <rguenther@suse.de>
+
+ * tree-streamer-out.c (streamer_write_chain): Do not temporarily
+ set TREE_CHAIN to NULL_TREE.
+
+2014-04-03 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/60740
+ * graphite-scop-detection.c (stmt_simple_for_scop_p): Iterate
+ over all GIMPLE_COND operands.
+
+2014-04-03 Nathan Sidwell <nathan@codesourcery.com>
+
+ * doc/invoke.texi (Wnon-virtual-dtor): Adjust documentation.
+ (Weffc++): Remove Scott's numbering, merge lists and reference
+ Wnon-virtual-dtor.
+
+ c-family/
+
+ cp/
+ * class.c (accessible_nvdtor_p): New.
+ (check_bases): Don't check base destructor here ...
+ (check_bases_and_members): ... check them here. Trigger on
+ Wnon-virtual-dtor flag.
+ (finish_struct_1): Use accessible_nvdtor_p.
+
+ testsuite/
+ * g++.dg/warn/Wnvdtor.C: Add non-polymorphic case.
+ * g++.dg/warn/Wnvdtor-2.C: New.
+ * g++.dg/warn/Wnvdtor-3.C: New.
+ * g++.dg/warn/Wnvdtor-4.C: New.
+ * g++.dg/warn/Weff1.C: Delete.
+ * g++.old-deja/g++.benjamin/15309-1.C: Delete.
+ * g++.old-deja/g++.benjamin/15309-2.C: Delete.
+
+2014-04-03 Nick Clifton <nickc@redhat.com>
+
+ * config/rl78/rl78-expand.md (movqi): Handle (SUBREG (SYMBOL_REF))
+ properly.
+
+2014-04-03 Martin Jambor <mjambor@suse.cz>
+
+ * ipa-cp.c (ipcp_verify_propagated_values): Also dump symtab and
+ mention gcc_unreachable before failing.
+ * ipa.c (symtab_remove_unreachable_nodes): Also print order of
+ removed symbols.
+
+2014-04-02 Jan Hubicka <hubicka@ucw.cz>
+
+ PR ipa/60659
+ * ipa-devirt.c (get_polymorphic_call_info): Do not ICE on type inconsistent
+ code and instead mark the context inconsistent.
+ (possible_polymorphic_call_targets): For inconsistent contexts
+ return empty complete list.
+
+2014-04-02 Anthony Green <green@moxielogic.com>
+
+ * config/moxie/moxie.md (zero_extendqisi2, zero_extendhisi2)
+ (extendqisi2, extendhisi2): Define.
+ * config/moxie/moxie.h (DEFAULT_SIGNED_CHAR): Change to 0.
+ (WCHAR_TYPE): Change to unsigned int.
+
+2014-04-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ PR tree-optimization/60733
+ * gimple-ssa-strength-reduction.c (ncd_with_phi): Change required
+ insertion point for PHI candidates to be the end of the feeding
+ block for the PHI argument.
+
+2014-04-02 Vladimir Makarov <vmakarov@redhat.com>
+
+ PR rtl-optimization/60650
+ * lra-constraints.c (process_alt_operands): Decrease reject for
+ earlyclobber matching.
+
+2014-04-02 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
+
+ * config/s390/s390.c (s390_expand_insv): Use GET_MODE_BITSIZE.
+
+2014-04-02 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
+
+ * config/spu/spu.c (pad_bb): Do not crash when the last
+ insn is CODE_FOR_blockage.
+
+2014-04-02 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
+
+ * config/spu/spu.md ("insv"): Fail if bitoffset+bitsize
+ lies outside the target mode.
+
+2014-04-02 Michael Meissner <meissner@linux.vnet.ibm.com>
+
+ PR target/60735
+ * config/rs6000/rs6000.c (rs6000_hard_regno_mode_ok): If we have
+ software floating point or no floating point registers, do not
+ allow any type in the FPRs. Eliminate a test for SPE SIMD types
+ in GPRs that occurs after we tested for GPRs that would never be
+ true.
+
+ * config/rs6000/rs6000.md (mov<mode>_softfloat32, FMOVE64):
+ Rewrite tests to use TARGET_DOUBLE_FLOAT and TARGET_E500_DOUBLE,
+ since the FMOVE64 type is DFmode/DDmode. If TARGET_E500_DOUBLE,
+ specifically allow DDmode, since that does not use the SPE SIMD
+ instructions.
+
+2014-04-02 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/60729
+ * optabs.c (expand_abs_nojump): Honor flag_trapv only for
+ MODE_INTs. Properly use negv_optab.
+ (expand_abs): Likewise.
+
+2014-04-02 Richard Biener <rguenther@suse.de>
+
+ PR bootstrap/60719
+ * Makefile.in (install-driver): Guard extra installs with special
+ names properly.
+
+2014-04-01 Michael Meissner <meissner@linux.vnet.ibm.com>
+
+ * doc/extend.texi (PowerPC AltiVec/VSX Built-in Functions):
+ Document vec_vgbbd.
+
+2014-04-01 Richard Henderson <rth@redhat.com>
+
+ PR target/60704
+ * config/i386/i386.md (*float<SWI48><MODEF>2_sse): Leave the second
+ alternative enabled before register allocation.
+
+2014-04-01 Chung-Lin Tang <cltang@codesourcery.com>
+
+ * config/nios2/nios2.md (unspec): Remove UNSPEC_TLS, UNSPEC_TLS_LDM.
+ * config/nios2/nios2.c (nios2_function_profiler): Fix addi operand
+ typo.
+ (nios2_large_got_address): Remove unneeded 'sym' parameter.
+ (nios2_got_address): Update nios2_large_got_address call site.
+ (nios2_delegitimize_address): New function.
+ (TARGET_DELEGITIMIZE_ADDRESS): Define to nios2_delegitimize_address.
+ * config/nios2/linux.h (GLIBC_DYNAMIC_LINKER): Define.
+ (LINK_SPEC): Specify dynamic linker using GNU_USER_DYNAMIC_LINKER.
+
+2014-04-01 Martin Husemann <martin@duskware.de>
+
+ * config/mips/netbsd.h (TARGET_OS_CPP_BUILTINS): Define __mips_o32
+ for -mabi=32.
+
+2014-04-01 Richard Sandiford <rdsandiford@googlemail.com>
+
+ PR rtl-optimization/60604
+ * recog.c (general_operand): Incorporate REG_CANNOT_CHANGE_MODE_P
+ check from register_operand.
+ (register_operand): Redefine in terms of general_operand.
+ (nonmemory_operand): Use register_operand for the non-constant cases.
+
+2014-04-01 Richard Biener <rguenther@suse.de>
+
+ * gimple.h (struct gimple_statement_base): Align subcode to
+ 16 bits.
+
+2014-04-01 Sebastian Huber <sebastian.huber@embedded-brains.de>
+
+ * doc/invoke.texi (mapp-regs): Clarify.
+
+2014-03-31 Ulrich Drepper <drepper@gmail.com>
+
+ * config/i386/avx512fintrin.h (__v32hi): Define type.
+ (__v64qi): Likewise.
+ (_mm512_set1_epi8): Define.
+ (_mm512_set1_epi16): Define.
+ (_mm512_set4_epi32): Define.
+ (_mm512_set4_epi64): Define.
+ (_mm512_set4_pd): Define.
+ (_mm512_set4_ps): Define.
+ (_mm512_setr4_epi64): Define.
+ (_mm512_setr4_epi32): Define.
+ (_mm512_setr4_pd): Define.
+ (_mm512_setr4_ps): Define.
+ (_mm512_setzero_epi32): Define.
+
+2014-03-31 Martin Jambor <mjambor@suse.cz>
+
+ PR middle-end/60647
+ * tree-sra.c (callsite_has_enough_arguments_p): Renamed to
+ callsite_arguments_match_p. Updated all callers. Also check types of
+ corresponding formal parameters and actual arguments.
+ (not_all_callers_have_enough_arguments_p) Renamed to
+ some_callers_have_mismatched_arguments_p.
+
+2014-03-31 Yuri Rumyantsev <ysrumyan@gmail.com>
+
+ * tree-inline.c (copy_loops): Add missed copy of 'safelen'.
+
+2014-03-31 Kugan Vivekanandarajah <kuganv@linaro.org>
+
+ PR target/60034
+ * aarch64/aarch64.c (aarch64_classify_address): Fix alignment for
+ section anchor.
+
+2014-03-30 Uros Bizjak <ubizjak@gmail.com>
+
+ * config/i386/sse.md (FMAMODE_NOVF512): New mode iterator.
+ (<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name><round_name>):
+ Split out
+ <sd_mask_codefor>fma_fmadd_<VF_512:mode><sd_maskz_name><round_name>.
+ Use FMAMODE_NOVF512 mode iterator.
+ (<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name><round_name>): Ditto.
+ (<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name><round_name>): Ditto.
+ (<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name><round_name>): Ditto.
+ (<sd_mask_codefor>fma_fmaddsub_<mode><sd_maskz_name><round_name>):
+ Split out
+ <sd_mask_codefor>fma_fmaddsub_<VF_512:mode><sd_maskz_name><round_name>.
+ Use VF_128_256 mode iterator.
+ (<sd_mask_codefor>fma_fmsubadd_<mode><sd_maskz_name><round_name>):
+ Ditto.
+
+2014-03-28 Jan Hubicka <hubicka@ucw.cz>
+
+ * cgraph.c (cgraph_redirect_edge_call_stmt_to_callee): Clear
+ static chain if needed.
+
+2014-03-28 Vladimir Makarov <vmakarov@redhat.com>
+
+ PR target/60697
+ * lra-constraints.c (index_part_to_reg): New.
+ (process_address): Use it.
+
+2014-03-27 Jeff Law <law@redhat.com>
+ Jakub Jelinek <jakub@redhat.com>
+
+ PR target/60648
+ * expr.c (do_tablejump): Use simplify_gen_binary rather than
+ gen_rtx_{PLUS,MULT} to build up the address expression.
+
+ * i386/i386.c (ix86_legitimize_address): Use copy_addr_to_reg to avoid
+ creating non-canonical RTL.
+
+2014-03-28 Jan Hubicka <hubicka@ucw.cz>
+
+ PR ipa/60243
+ * ipa-inline.c (want_inline_small_function_p): Short circuit large
+ functions; reorganize to make cheap checks first.
+ (inline_small_functions): Do not estimate growth when dumping;
+ it is expensive.
+ * ipa-inline.h (inline_summary): Add min_size.
+ (growth_likely_positive): New function.
+ * ipa-inline-analysis.c (dump_inline_summary): Add min_size.
+ (set_cond_stmt_execution_predicate): Cleanup.
+ (estimate_edge_size_and_time): Compute min_size.
+ (estimate_calls_size_and_time): Likewise.
+ (estimate_node_size_and_time): Likewise.
+ (inline_update_overall_summary): Update min_size.
+ (do_estimate_edge_time): Likewise.
+ (do_estimate_edge_size): Update.
+ (do_estimate_edge_hints): Update.
+ (growth_likely_positive): New function.
+
+2014-03-28 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/60693
+ * config/i386/i386.c (ix86_copy_addr_to_reg): Call copy_addr_to_reg
+ also if addr has VOIDmode.
+
+2014-03-28 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ * config/arm/aarch-common.c (aarch_crypto_can_dual_issue): New.
+ * config/arm/aarch-common-protos.h (aarch_crypto_can_dual_issue):
+ Declare extern.
+ * config/arm/cortex-a53.md: Add reservations and bypass for crypto
+ instructions as well as AdvancedSIMD loads.
+
+2014-03-28 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
+ Use crypto_aese type.
+ (aarch64_crypto_aes<aesmc_op>v16qi): Use crypto_aesmc type.
+ * config/arm/arm.md (is_neon_type): Replace crypto_aes with
+ crypto_aese, crypto_aesmc. Move to types.md.
+ * config/arm/types.md (crypto_aes): Split into crypto_aese,
+ crypto_aesmc.
+ * config/arm/iterators.md (crypto_type): Likewise.
+
+2014-03-28 Jan Hubicka <hubicka@ucw.cz>
+
+ * cgraph.c: Include expr.h and tree-dfa.h.
+ (cgraph_redirect_edge_call_stmt_to_callee): If call in noreturn;
+ remove LHS.
+
+2014-03-28 Vladimir Makarov <vmakarov@redhat.com>
+
+ PR target/60675
+ * lra-assigns.c (find_hard_regno_for): Remove unavailable hard
+ regs from checking multi-reg pseudos.
+
+2014-03-28 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
+
+ * config/arm/t-aprofile (MULTILIB_MATCHES): Correct A12 rule.
+
+2014-03-28 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
+
+ * config/rs6000/rs6000.c (fusion_gpr_load_p): Refuse optimization
+ if it would clobber the stack pointer, even temporarily.
+
+2014-03-28 Eric Botcazou <ebotcazou@adacore.com>
+
+ * mode-switching.c: Make small adjustments to the top comment.
+
+2014-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
+
+ * config/rs6000/constraints.md (wD constraint): New constraint to
+ match the constant integer to get the top DImode/DFmode out of a
+ vector in a VSX register.
+
+ * config/rs6000/predicates.md (vsx_scalar_64bit): New predicate to
+ match the constant integer to get the top DImode/DFmode out of a
+ vector in a VSX register.
+
+ * config/rs6000/rs6000-builtins.def (VBPERMQ): Add vbpermq builtin
+ for ISA 2.07.
+
+ * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
+ vbpermq builtins.
+
+ * config/rs6000/rs6000.c (rs6000_debug_reg_global): If
+ -mdebug=reg, print value of VECTOR_ELEMENT_SCALAR_64BIT.
+
+ * config/rs6000/vsx.md (vsx_extract_<mode>, V2DI/V2DF modes):
+ Optimize vec_extract of 64-bit values, where the value being
+ extracted is in the top word, where we can use scalar
+ instructions. Add direct move and store support. Combine the big
+ endian/little endian vector select load support into a single insn.
+ (vsx_extract_<mode>_internal1): Likewise.
+ (vsx_extract_<mode>_internal2): Likewise.
+ (vsx_extract_<mode>_load): Likewise.
+ (vsx_extract_<mode>_store): Likewise.
+ (vsx_extract_<mode>_zero): Delete, big and little endian insns are
+ combined into vsx_extract_<mode>_load.
+ (vsx_extract_<mode>_one_le): Likewise.
+
+ * config/rs6000/rs6000.h (VECTOR_ELEMENT_SCALAR_64BIT): Macro to
+ define the top 64-bit vector element.
+
+ * doc/md.texi (PowerPC and IBM RS6000 constraints): Document wD
+ constraint.
+
+ * doc/extend.texi (PowerPC AltiVec/VSX Built-in Functions):
+ Document vec_vbpermq builtin.
+
+ PR target/60672
+ * config/rs6000/altivec.h (vec_xxsldwi): Add missing define to
+ enable use of xxsldwi and xxpermdi builtin functions.
+ (vec_xxpermdi): Likewise.
+
+ * doc/extend.texi (PowerPC AltiVec/VSX Built-in Functions):
+ Document use of vec_xxsldwi and vec_xxpermdi builtins.
+
+2014-03-27 Vladimir Makarov <vmakarov@redhat.com>
+
+ PR rtl-optimization/60650
+ * lra-assign.c (find_hard_regno_for, spill_for): Add parameter
+ first_p. Use it.
+ (find_spills_for): New.
+ (assign_by_spills): Pass the new parameter to find_hard_regno_for.
+ Spill all pseudos on the second iteration.
+
+2014-03-27 Marek Polacek <polacek@redhat.com>
+
+ PR c/50347
+ * doc/extend.texi (ffs Builtins): Change unsigned types to signed
+ types.
+
+2014-03-27 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
+
+ * config/s390/s390.c (s390_can_use_return_insn): Check for
+ call-saved FPRs on 31 bit.
+
+2014-03-27 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/60682
+ * omp-low.c (lower_omp_1): For gimple_clobber_p stmts,
+ if they need regimplification, just drop them instead of
+ calling gimple_regimplify_operands on them.
+
+2014-03-27 Marcus Shawcroft <marcus.shawcroft@arm.com>
+
+ PR target/60580
+ * config/aarch64/aarch64.c (faked_omit_frame_pointer): Remove.
+ (aarch64_frame_pointer_required): Adjust logic.
+ (aarch64_can_eliminate): Adjust logic.
+ (aarch64_override_options_after_change): Adjust logic.
+
+2014-03-27 Dehao Chen <dehao@google.com>
+
+ * ipa-inline.c (early_inliner): Update node's inline info.
+
+2014-03-26 Dehao Chen <dehao@google.com>
+
+ * dojump.c (do_compare_rtx_and_jump): Sets correct probability for
+ compiler inserted conditional jumps for NAN float check.
+
+2014-03-26 Jakub Jelinek <jakub@redhat.com>
+
+ * ubsan.h (ubsan_create_data): Change second argument's type
+ to const location_t *.
+ * ubsan.c (ubsan_source_location): If xloc.file is NULL, set it to
+ _("<unknown>").
+ (ubsan_create_data): Change second argument to const location_t *PLOC.
+ Create Loc field whenever PLOC is non-NULL.
+ (ubsan_instrument_unreachable, ubsan_expand_null_ifn,
+ ubsan_build_overflow_builtin, instrument_bool_enum_load): Adjust
+ callers.
+
+ PR other/59545
+ * real.c (real_to_integer2): Change type of low to UHWI.
+
+2014-03-26 Tobias Burnus <burnus@net-b.de>
+
+ * gcc.c (LINK_COMMAND_SPEC): Use libcilkrts.spec for -fcilkplus.
+ (CILK_SELF_SPECS): New define.
+ (driver_self_specs): Use it.
+
+2014-03-26 Richard Biener <rguenther@suse.de>
+
+ * tree-pretty-print.c (percent_K_format): Implement special
+ case for LTO and its stripped down BLOCK tree.
+
+2014-03-26 Jakub Jelinek <jakub@redhat.com>
+
+ PR sanitizer/60636
+ * ubsan.c (instrument_si_overflow): Instrument ABS_EXPR.
+
+ * tree-vrp.c (simplify_internal_call_using_ranges): If only
+ one range is range_int_cst_p, but not both, at least optimize
+ addition/subtraction of 0 and multiplication by 0 or 1.
+ * gimple-fold.c (gimple_fold_call): Fold
+ IFN_UBSAN_CHECK_{ADD,SUB,MUL}.
+ (gimple_fold_stmt_to_constant_1): If both op0 and op1 aren't
+ INTEGER_CSTs, try to fold at least x * 0 and y - y.
+
+2014-03-26 Eric Botcazou <ebotcazou@adacore.com>
+
+ PR rtl-optimization/60452
+ * rtlanal.c (rtx_addr_can_trap_p_1): Fix head comment.
+ <case REG>: Return 1 for invalid offsets from the frame pointer.
+
+2014-03-26 Marek Polacek <polacek@redhat.com>
+
+ PR c/37428
+ * doc/extend.texi (C Extensions): Mention variable-length arrays in
+ a structure/union.
+
+2014-03-26 Marek Polacek <polacek@redhat.com>
+
+ PR c/39525
+ * doc/extend.texi (Designated Inits): Describe what happens to omitted
+ field members.
+
+2014-03-26 Marek Polacek <polacek@redhat.com>
+
+ PR other/59545
+ * ira-color.c (update_conflict_hard_regno_costs): Perform the
+ multiplication in unsigned type.
+
+2014-03-26 Chung-Ju Wu <jasonwucj@gmail.com>
+
+ * doc/install.texi: Document nds32le-*-elf and nds32be-*-elf.
+
+2014-03-26 Chung-Ju Wu <jasonwucj@gmail.com>
+
+ * doc/contrib.texi: Add myself as Andes nds32 port contributor.
+
+2014-03-25 Jan Hubicka <hubicka@ucw.cz>
+
+ PR ipa/60315
+ * cif-code.def (UNREACHABLE) New code.
+ * ipa-inline.c (inline_small_functions): Skip edges to
+ __builtlin_unreachable.
+ (estimate_edge_growth): Allow edges to __builtlin_unreachable.
+ * ipa-inline-analysis.c (edge_set_predicate): Redirect edges with false
+ predicate to __bulitin_unreachable.
+ (set_cond_stmt_execution_predicate): Fix issue when
+ invert_tree_comparison returns ERROR_MARK.
+ * ipa-pure-const.c (propagate_pure_const, propagate_nothrow): Do not
+ propagate to inline clones.
+ * cgraph.c (verify_edge_corresponds_to_fndecl): Allow redirection
+ to unreachable.
+ * ipa-cp.c (create_specialized_node): Be ready for new node to appear.
+ * cgraphclones.c (cgraph_clone_node): If call destination is already
+ ureachable, do not redirect it back.
+ * tree-inline.c (fold_marked_statements): Hanlde calls becoming
+ unreachable.
+
+2014-03-25 Jan Hubicka <hubicka@ucw.cz>
+
+ * ipa-pure-const.c (propagate_pure_const, propagate_nothrow):
+ Do not modify inline clones.
+
+2014-03-25 Jakub Jelinek <jakub@redhat.com>
+
+ * config/i386/i386.md (general_sext_operand): New mode attr.
+ (addv<mode>4, subv<mode>4, mulv<mode>4): If operands[2] is CONST_INT,
+ don't generate (sign_extend (const_int)).
+ (*addv<mode>4, *subv<mode>4, *mulv<mode>4): Disallow CONST_INT_P
+ operands[2]. Use We constraint instead of <i> and
+ <general_sext_operand> predicate instead of <general_operand>.
+ (*addv<mode>4_1, *subv<mode>4_1, *mulv<mode>4_1): New insns.
+ * config/i386/constraints.md (We): New constraint.
+ * config/i386/predicates.md (x86_64_sext_operand,
+ sext_operand): New predicates.
+
+2014-03-25 Martin Jambor <mjambor@suse.cz>
+
+ PR ipa/60600
+ * ipa-cp.c (ipa_get_indirect_edge_target_1): Redirect type
+ inconsistent devirtualizations to __builtin_unreachable.
+
+2014-03-25 Marek Polacek <polacek@redhat.com>
+
+ PR c/35449
+ * doc/extend.texi (Example of asm with clobbered asm reg): Fix typo.
+
+2014-03-25 Alan Lawrence <alan.lawrence@arm.com>
+
+ * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Reverse
+ order of elements for big-endian.
+
+2014-03-25 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/60635
+ * gimplify-me.c (gimple_regimplify_operands): Update the
+ re-gimplifed stmt.
+
+2014-03-25 Martin Jambor <mjambor@suse.cz>
+
+ PR ipa/59176
+ * lto-cgraph.c (lto_output_node): Stream body_removed flag.
+ (lto_output_varpool_node): Likewise.
+ (input_overwrite_node): Likewise.
+ (input_varpool_node): Likewise.
+
+2014-03-25 Richard Biener <rguenther@suse.de>
+
+ * lto-wrapper.c (merge_and_complain): Handle OPT_fPIE like OPT_fpie.
+ (run_gcc): Likewise.
+
+2014-03-25 Jakub Jelinek <jakub@redhat.com>
+
+ * combine.c (simplify_compare_const): Add MODE argument.
+ Handle mode_width 0 as very large mode_width.
+ (try_combine, simplify_comparison): Adjust callers.
+
+ * cselib.c (cselib_hash_rtx): Perform addition in unsigned
+ type to avoid signed integer overflow.
+ * explow.c (plus_constant): Likewise.
+
+2014-03-25 Dominik Vogt <vogt@linux.vnet.ibm.com>
+
+ * doc/generic.texi: Correct typos.
+
2014-03-24 Tobias Burnus <burnus@net-b.de>
* doc/invoke.texi (-flto): Expand section about
@@ -206,15 +1129,12 @@
2014-03-18 Basile Starynkevitch <basile@starynkevitch.net>
- * plugin.def: Improve comment for PLUGIN_INCLUDE_FILE.
- * doc/plugins.texi (Plugin callbacks): Mention
- PLUGIN_INCLUDE_FILE.
- Italicize plugin event names in description. Explain that
- PLUGIN_PRAGMAS has no sense for lto1. Explain
- PLUGIN_INCLUDE_FILE.
- Remind that no GCC functions should be called after
- PLUGIN_FINISH.
- Explain what pragmas with expansion are.
+ * plugin.def: Improve comment for PLUGIN_INCLUDE_FILE.
+ * doc/plugins.texi (Plugin callbacks): Mention PLUGIN_INCLUDE_FILE.
+ Italicize plugin event names in description. Explain that
+ PLUGIN_PRAGMAS has no sense for lto1. Explain PLUGIN_INCLUDE_FILE.
+ Remind that no GCC functions should be called after PLUGIN_FINISH.
+ Explain what pragmas with expansion are.
2014-03-18 Martin Liska <mliska@suse.cz>
@@ -450,7 +1370,7 @@
(splitters for the fop_* register patterns): Remove.
(fscalexf4_i387): Rename from *fscalexf4_i387.
(ldexpxf3): Use gen_floatsixf2 and gen_fscalexf4_i387.
-
+
2014-03-13 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/59779
@@ -471,8 +1391,7 @@
2014-03-13 Cesar Philippidis <cesar@codesourcery.com>
- * lto-wrapper.c (maybe_unlink_file): Suppress diagnostic
- messages.
+ * lto-wrapper.c (maybe_unlink_file): Suppress diagnostic messages.
2014-03-13 Jakub Jelinek <jakub@redhat.com>
@@ -870,11 +1789,11 @@
optimization levels.
(run_gcc): And pass it through to the link options.
-2014-03-06 Alexandre Oliva <aoliva@redhat.com>
+2014-03-06 Alexandre Oliva <aoliva@redhat.com>
PR debug/60381
Revert:
- 2014-02-28 Alexandre Oliva <aoliva@redhat.com>
+ 2014-02-28 Alexandre Oliva <aoliva@redhat.com>
PR debug/59992
* cselib.c (remove_useless_values): Skip to avoid quadratic
behavior if the condition moved from...
@@ -1084,7 +2003,7 @@
and latches. Also honor LOOPS_MAY_HAVE_MULTIPLE_LATCHES.
(remove_forwarder_block): Properly update the latch of a loop.
-2014-02-28 Alexandre Oliva <aoliva@redhat.com>
+2014-02-28 Alexandre Oliva <aoliva@redhat.com>
PR debug/59992
* cselib.c (cselib_hasher::equal): Special-case VALUE lookup.
@@ -1095,14 +2014,14 @@
(cselib_finish): Release it.
(dump_cselib_table): Dump it.
-2014-02-28 Alexandre Oliva <aoliva@redhat.com>
+2014-02-28 Alexandre Oliva <aoliva@redhat.com>
PR debug/59992
* cselib.c (remove_useless_values): Skip to avoid quadratic
behavior if the condition moved from...
(cselib_process_insn): ... here holds.
-2014-02-28 Alexandre Oliva <aoliva@redhat.com>
+2014-02-28 Alexandre Oliva <aoliva@redhat.com>
PR debug/57232
* var-tracking.c (vt_initialize): Apply the same condition to
@@ -1377,22 +2296,22 @@
(sched_rgn_init): ... here.
(schedule_region): Check for SCHED_PRESSURE_NONE earlier.
-2014-02-23 David Holsgrove <david.holsgrove@xilinx.com>
+2014-02-23 David Holsgrove <david.holsgrove@xilinx.com>
* config/microblaze/microblaze.md: Correct ashrsi_reg / lshrsi_reg
names.
-2014-02-23 Edgar E. Iglesias <edgar.iglesias@xilinx.com>
+2014-02-23 Edgar E. Iglesias <edgar.iglesias@xilinx.com>
* config/microblaze/microblaze.h: Remove SECONDARY_MEMORY_NEEDED
definition.
-2014-02-23 David Holsgrove <david.holsgrove@xilinx.com>
+2014-02-23 David Holsgrove <david.holsgrove@xilinx.com>
* /config/microblaze/microblaze.c: Add microblaze_asm_output_mi_thunk,
define TARGET_ASM_OUTPUT_MI_THUNK and TARGET_ASM_CAN_OUTPUT_MI_THUNK.
-2014-02-23 David Holsgrove <david.holsgrove@xilinx.com>
+2014-02-23 David Holsgrove <david.holsgrove@xilinx.com>
* config/microblaze/predicates.md: Add cmp_op predicate.
* config/microblaze/microblaze.md: Add branch_compare instruction
@@ -2105,16 +3024,16 @@
* config.gcc (i[34567]86-*-solaris2* | x86_64-*-solaris2.1[0-9]*,
*-*-solaris2.9*): Use it.
-2014-02-10 Nagaraju Mekala <nagaraju.mekala@xilinx.com>
+2014-02-10 Nagaraju Mekala <nagaraju.mekala@xilinx.com>
* config/microblaze/microblaze.md: Add movsi4_rev insn pattern.
* config/microblaze/predicates.md: Add reg_or_mem_operand predicate.
-2014-02-10 Nagaraju Mekala <nagaraju.mekala@xilinx.com>
+2014-02-10 Nagaraju Mekala <nagaraju.mekala@xilinx.com>
* config/microblaze/microblaze.c: Extend mcpu version format
-2014-02-10 David Holsgrove <david.holsgrove@xilinx.com>
+2014-02-10 David Holsgrove <david.holsgrove@xilinx.com>
* config/microblaze/microblaze.h: Define SIZE_TYPE and PTRDIFF_TYPE.
@@ -3137,7 +4056,7 @@
* README.Portability: Fix typo.
-2014-01-30 David Holsgrove <david.holsgrove@xilinx.com>
+2014-01-30 David Holsgrove <david.holsgrove@xilinx.com>
* config/microblaze/microblaze.md(cstoresf4, cbranchsf4): Replace
comparison_operator with ordered_comparison_operator.
@@ -3887,7 +4806,7 @@
* config/aarch64/aarch64.md (UNSPEC_LD1): New unspec definition.
(UNSPEC_ST1): Likewise.
-2014-01-23 David Holsgrove <david.holsgrove@xilinx.com>
+2014-01-23 David Holsgrove <david.holsgrove@xilinx.com>
* config/microblaze/microblaze.md: Add trap insn and attribute
@@ -3943,7 +4862,7 @@
* config/mips/mips.c (mips_reorg_process_insns): Check which asm
operands have been referenced when recording LO_SUM references.
-2014-01-22 David Holsgrove <david.holsgrove@xilinx.com>
+2014-01-22 David Holsgrove <david.holsgrove@xilinx.com>
* config/microblaze/microblaze.md: Correct bswaphi2 insn.
@@ -4217,7 +5136,7 @@
(ipcp_edge_removal_hook): New function.
(ipcp_driver): Register ipcp_edge_removal_hook.
-2014-01-17 Andrew Pinski <apinski@cavium.com>
+2014-01-17 Andrew Pinski <apinski@cavium.com>
Steve Ellcey <sellcey@mips.com>
PR target/59462
@@ -5092,7 +6011,7 @@
one successor with a block with no successors, remove any BARRIER
after the second block.
-2014-01-07 Dan Xio Qiang <ziyan01@163.com>
+2014-01-07 Dan Xio Qiang <ziyan01@163.com>
* hw-doloop.c (reorg_loops): Release the bitmap obstack.
diff --git a/gcc-4.9/gcc/DATESTAMP b/gcc-4.9/gcc/DATESTAMP
index 5b49f7fbd..50894d115 100644
--- a/gcc-4.9/gcc/DATESTAMP
+++ b/gcc-4.9/gcc/DATESTAMP
@@ -1 +1 @@
-20140324
+20140422
diff --git a/gcc-4.9/gcc/DEV-PHASE b/gcc-4.9/gcc/DEV-PHASE
index 9839eb208..e69de29bb 100644
--- a/gcc-4.9/gcc/DEV-PHASE
+++ b/gcc-4.9/gcc/DEV-PHASE
@@ -1 +0,0 @@
-experimental
diff --git a/gcc-4.9/gcc/Makefile.in b/gcc-4.9/gcc/Makefile.in
index 30a717e73..d1ab22f19 100644
--- a/gcc-4.9/gcc/Makefile.in
+++ b/gcc-4.9/gcc/Makefile.in
@@ -3125,7 +3125,14 @@ PLUGIN_HEADERS = $(TREE_H) $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
version.h stringpool.h gimplify.h gimple-iterator.h gimple-ssa.h \
fold-const.h tree-cfg.h tree-into-ssa.h tree-ssanames.h print-tree.h \
varasm.h context.h tree-phinodes.h stor-layout.h ssa-iterators.h \
- $(RESOURCE_H) tree-cfgcleanup.h
+ $(RESOURCE_H) tree-cfgcleanup.h attribs.h calls.h cfgexpand.h \
+ diagnostic-color.h gcc-symtab.h gimple-builder.h gimple-low.h \
+ gimple-walk.h gimplify-me.h pass_manager.h print-rtl.h stmt.h \
+ tree-dfa.h tree-hasher.h tree-nested.h tree-object-size.h tree-outof-ssa.h \
+ tree-parloops.h tree-ssa-address.h tree-ssa-coalesce.h tree-ssa-dom.h \
+ tree-ssa-loop.h tree-ssa-loop-ivopts.h tree-ssa-loop-manip.h \
+ tree-ssa-loop-niter.h tree-ssa-ter.h tree-ssa-threadedge.h \
+ tree-ssa-threadupdate.h
# generate the 'build fragment' b-header-vars
s-header-vars: Makefile
@@ -3205,10 +3212,13 @@ install-common: native lang.install-common installdirs
install-driver: installdirs xgcc$(exeext)
-rm -f $(DESTDIR)$(bindir)/$(GCC_INSTALL_NAME)$(exeext)
-$(INSTALL_PROGRAM) xgcc$(exeext) $(DESTDIR)$(bindir)/$(GCC_INSTALL_NAME)$(exeext)
- -rm -f $(DESTDIR)$(bindir)/$(target_noncanonical)-gcc-$(version)$(exeext)
- -( cd $(DESTDIR)$(bindir) && \
- $(LN) $(GCC_INSTALL_NAME)$(exeext) $(target_noncanonical)-gcc-$(version)$(exeext) )
- -if [ ! -f gcc-cross$(exeext) ] ; then \
+ -if [ "$(GCC_INSTALL_NAME)" != "$(target_noncanonical)-gcc-$(version)" ]; then \
+ rm -f $(DESTDIR)$(bindir)/$(target_noncanonical)-gcc-$(version)$(exeext); \
+ ( cd $(DESTDIR)$(bindir) && \
+ $(LN) $(GCC_INSTALL_NAME)$(exeext) $(target_noncanonical)-gcc-$(version)$(exeext) ); \
+ fi
+ -if [ ! -f gcc-cross$(exeext) ] \
+ && [ "$(GCC_INSTALL_NAME)" != "$(GCC_TARGET_INSTALL_NAME)" ]; then \
rm -f $(DESTDIR)$(bindir)/$(target_noncanonical)-gcc-tmp$(exeext); \
( cd $(DESTDIR)$(bindir) && \
$(LN) $(GCC_INSTALL_NAME)$(exeext) $(target_noncanonical)-gcc-tmp$(exeext) && \
diff --git a/gcc-4.9/gcc/ada/ChangeLog b/gcc-4.9/gcc/ada/ChangeLog
index 6a2726ef6..b4d3e7769 100644
--- a/gcc-4.9/gcc/ada/ChangeLog
+++ b/gcc-4.9/gcc/ada/ChangeLog
@@ -1,3 +1,60 @@
+2014-04-22 Release Manager
+
+ * GCC 4.9.0 released.
+
+2014-04-09 Eric Botcazou <ebotcazou@adacore.com>
+ Svante Signell <svante.signell@gmail.com>
+
+ PR ada/54040
+ PR ada/59346
+ * s-osinte-x32.adb: New file.
+ * s-linux.ads (Time): New section.
+ * s-linux-alpha.ads (Time): Likewise.
+ * s-linux-android.ads (Time: Likewise.
+ * s-linux-hppa.ads (Time): Likewise.
+ * s-linux-mipsel.ads (Time): Likewise.
+ * s-linux-sparc.ads (Time): Likewise.
+ * s-linux-x32.ads (Time): Likewise.
+ * s-osprim-x32.ads (timespec): Adjust.
+ (Clock): Likewise.
+ (To_Timespec): Likewise.
+ * s-osinte-linux.ads (Time): Define local subtypes for those defined
+ in System.Linux.
+ * s-taprop-linux.adb (Monotonic_Clock): Do not define timeval.
+ * s-osinte-hpux.ads (timespec): Revert POSIX breakage.
+ * s-osinte-kfreebsd-gnu.ads (timespec): Likewise.
+ * s-osinte-solaris-posix.ads (timespec): Likewise.
+ * s-osinte-posix.adb (To_Timespec): Likewise.
+ * gcc-interface/Makefile.in (x32/Linux): Use s-osinte-x32.adb.
+
+2014-04-08 Eric Botcazou <ebotcazou@adacore.com>
+
+ PR ada/60411
+ * gcc-interface/Makefile.in (arm% linux-android): Switch to EHABI.
+ * s-linux-android.ads: New file.
+ * s-intman-android.adb: Likewise.
+ * s-osinte-android.ads: Adjust.
+ * sigtramp-armdroid.c: Likewise.
+ * sigtramp.h: Add Android support.
+
+2014-04-07 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc-interface/Makefile.in (alpha-vms): Add missing line.
+
+2014-03-30 Eric Botcazou <ebotcazou@adacore.com>
+
+ PR ada/60703
+ * system-linux-alpha.ads: Adjust for Ada 2005.
+ * system-linux-mips.ads: Likewise.
+ * system-linux-mips64el.ads: Likewise.
+ * system-linux-mipsel.ads: Likewise.
+ * system-linux-s390.ads: Likewise.
+ * system-linux-s390x.ads: Likewise.
+ * system-linux-sparc.ads: Likewise.
+ * system-linux-sparcv9.ads: Likewise.
+ * system-rtems.ads: Likewise.
+ * system-vxworks-arm.ads: Likewise.
+
2014-03-16 Andreas Schwab <schwab@linux-m68k.org>
PR ada/39172
diff --git a/gcc-4.9/gcc/ada/gcc-interface/Makefile.in b/gcc-4.9/gcc/ada/gcc-interface/Makefile.in
index 352d6550c..9af1967ce 100644
--- a/gcc-4.9/gcc/ada/gcc-interface/Makefile.in
+++ b/gcc-4.9/gcc/ada/gcc-interface/Makefile.in
@@ -536,7 +536,7 @@ ifeq ($(strip $(filter-out powerpc% wrs vxworks,$(target_cpu) $(target_vendor) $
# System.Stack_Checking.Operations is not needed on VxWorks 6 as it leads to
# an undefined symbol when building a dynamic shared library. To alleviate
# this problem and distinguish this case, we use the THREAD_KIND and include
- # the package only in kernel mode.
+ # the package only in default mode.
ifeq ($(strip $(filter-out default,$(THREAD_KIND))),)
LIBGNAT_TARGET_PAIRS += \
@@ -1045,15 +1045,17 @@ ifeq ($(strip $(filter-out arm% linux-androideabi,$(target_cpu) $(target_os))),)
LIBGNAT_TARGET_PAIRS = \
a-intnam.ads<a-intnam-linux.ads \
s-inmaop.adb<s-inmaop-posix.adb \
- s-intman.adb<s-intman-posix.adb \
- s-linux.ads<s-linux.ads \
+ s-intman.adb<s-intman-android.adb \
+ s-linux.ads<s-linux-android.ads \
s-osinte.adb<s-osinte-android.adb \
s-osinte.ads<s-osinte-android.ads \
s-osprim.adb<s-osprim-posix.adb \
s-taprop.adb<s-taprop-posix.adb \
- s-taspri.ads<s-taspri-posix-noaltstack.ads \
+ s-taspri.ads<s-taspri-posix.ads \
s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
system.ads<system-linux-armel.ads \
+ a-exexpr.adb<a-exexpr-gcc.adb \
+ s-excmac.ads<s-excmac-arm.ads \
$(DUMMY_SOCKETS_TARGET_PAIRS)
TOOLS_TARGET_PAIRS = \
@@ -1062,7 +1064,9 @@ ifeq ($(strip $(filter-out arm% linux-androideabi,$(target_cpu) $(target_os))),)
GNATRTL_SOCKETS_OBJS =
EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
- EH_MECHANISM=
+ EXTRA_LIBGNAT_OBJS+=raise-gcc.o sigtramp-armdroid.o
+ EXTRA_GNATRTL_NONTASKING_OBJS+=g-cppexc.o s-excmac.o
+ EH_MECHANISM=-arm
THREADSLIB =
GNATLIB_SHARED = gnatlib-shared-dual
LIBRARY_VERSION := $(LIB_VERSION)
@@ -1615,6 +1619,7 @@ ifeq ($(strip $(filter-out alpha64 ia64 dec hp vms% openvms% alphavms%,$(target_
$(ATOMICS_BUILTINS_TARGET_PAIRS)
EXTRA_LIBGNAT_SRCS+=tb-alvms.c
+ override GNATRTL_ALTIVEC_OBJS=
TOOLS_TARGET_PAIRS= \
mlib-tgt-specific.adb<mlib-tgt-specific-vms-alpha.adb \
@@ -2234,7 +2239,7 @@ ifeq ($(strip $(filter-out %x32 linux%,$(target_cpu) $(target_os))),)
s-linux.ads<s-linux-x32.ads \
s-mudido.adb<s-mudido-affinity.adb \
s-osinte.ads<s-osinte-linux.ads \
- s-osinte.adb<s-osinte-posix.adb \
+ s-osinte.adb<s-osinte-x32.adb \
s-osprim.adb<s-osprim-x32.adb \
s-taprop.adb<s-taprop-linux.adb \
s-tasinf.ads<s-tasinf-linux.ads \
@@ -3063,6 +3068,7 @@ mkdir.o : mkdir.c
socket.o : socket.c gsocket.h
sysdep.o : sysdep.c
raise.o : raise.c raise.h
+sigtramp-armdroid.o : sigtramp-armdroid.c sigtramp.h
sigtramp-armvxw.o : sigtramp-armvxw.c sigtramp.h
sigtramp-ppcvxw.o : sigtramp-ppcvxw.c sigtramp.h
terminals.o : terminals.c
diff --git a/gcc-4.9/gcc/ada/s-intman-android.adb b/gcc-4.9/gcc/ada/s-intman-android.adb
new file mode 100644
index 000000000..30a980e3e
--- /dev/null
+++ b/gcc-4.9/gcc/ada/s-intman-android.adb
@@ -0,0 +1,331 @@
+------------------------------------------------------------------------------
+-- --
+-- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS --
+-- --
+-- S Y S T E M . I N T E R R U P T _ M A N A G E M E N T --
+-- --
+-- B o d y --
+-- --
+-- Copyright (C) 2014, Free Software Foundation, Inc. --
+-- --
+-- GNARL 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 3, 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. --
+-- --
+-- As a special exception under Section 7 of GPL version 3, you are granted --
+-- additional permissions described in the GCC Runtime Library Exception, --
+-- version 3.1, as published by the Free Software Foundation. --
+-- --
+-- In particular, you can freely distribute your programs built with the --
+-- GNAT Pro compiler, including any required library run-time units, using --
+-- any licensing terms of your choosing. See the AdaCore Software License --
+-- for full details. --
+-- --
+-- GNARL was developed by the GNARL team at Florida State University. --
+-- Extensive contributions were provided by Ada Core Technologies, Inc. --
+-- --
+------------------------------------------------------------------------------
+
+-- This is the Android version of this package
+
+-- Make a careful study of all signals available under the OS, to see which
+-- need to be reserved, kept always unmasked, or kept always unmasked. Be on
+-- the lookout for special signals that may be used by the thread library.
+
+-- Since this is a multi target file, the signal <-> exception mapping
+-- is simple minded. If you need a more precise and target specific
+-- signal handling, create a new s-intman.adb that will fit your needs.
+
+-- This file assumes that:
+
+-- SIGFPE, SIGILL, SIGSEGV and SIGBUS exist. They are mapped as follows:
+-- SIGPFE => Constraint_Error
+-- SIGILL => Program_Error
+-- SIGSEGV => Storage_Error
+-- SIGBUS => Storage_Error
+
+-- SIGINT exists and will be kept unmasked unless the pragma
+-- Unreserve_All_Interrupts is specified anywhere in the application.
+
+-- System.OS_Interface contains the following:
+-- SIGADAABORT: the signal that will be used to abort tasks.
+-- Unmasked: the OS specific set of signals that should be unmasked in
+-- all the threads. SIGADAABORT is unmasked by
+-- default
+-- Reserved: the OS specific set of signals that are reserved.
+
+with System.Task_Primitives;
+
+package body System.Interrupt_Management is
+
+ use Interfaces.C;
+ use System.OS_Interface;
+
+ type Interrupt_List is array (Interrupt_ID range <>) of Interrupt_ID;
+ Exception_Interrupts : constant Interrupt_List :=
+ (SIGFPE, SIGILL, SIGSEGV, SIGBUS);
+
+ Unreserve_All_Interrupts : Interfaces.C.int;
+ pragma Import
+ (C, Unreserve_All_Interrupts, "__gl_unreserve_all_interrupts");
+
+ -----------------------
+ -- Local Subprograms --
+ -----------------------
+
+ procedure Signal_Trampoline
+ (signo : Signal;
+ siginfo : System.Address;
+ ucontext : System.Address;
+ handler : System.Address);
+ pragma Import (C, Signal_Trampoline, "__gnat_sigtramp");
+ -- Pass the real handler to a speical function that handles unwinding by
+ -- skipping over the kernel signal frame (which doesn't contain any unwind
+ -- information).
+
+ function State (Int : Interrupt_ID) return Character;
+ pragma Import (C, State, "__gnat_get_interrupt_state");
+ -- Get interrupt state. Defined in init.c The input argument is the
+ -- interrupt number, and the result is one of the following:
+
+ procedure Map_Signal
+ (signo : Signal;
+ siginfo : System.Address;
+ ucontext : System.Address);
+ -- This function identifies the Ada exception to be raised using the
+ -- information when the system received a synchronous signal.
+
+----------------
+-- Map_Signal --
+----------------
+
+ procedure Map_Signal
+ (signo : Signal;
+ siginfo : System.Address;
+ ucontext : System.Address)
+ is
+ pragma Unreferenced (siginfo);
+ pragma Unreferenced (ucontext);
+
+ begin
+
+ -- Check that treatment of exception propagation here is consistent with
+ -- treatment of the abort signal in System.Task_Primitives.Operations.
+
+ case signo is
+ when SIGFPE =>
+ raise Constraint_Error;
+ when SIGILL =>
+ raise Program_Error;
+ when SIGSEGV =>
+ raise Storage_Error;
+ when SIGBUS =>
+ raise Storage_Error;
+ when others =>
+ null;
+ end case;
+ end Map_Signal;
+
+----------------------
+-- Notify_Exception --
+----------------------
+
+ User : constant Character := 'u';
+ Runtime : constant Character := 'r';
+ Default : constant Character := 's';
+ -- 'n' this interrupt not set by any Interrupt_State pragma
+ -- 'u' Interrupt_State pragma set state to User
+ -- 'r' Interrupt_State pragma set state to Runtime
+ -- 's' Interrupt_State pragma set state to System (use "default"
+ -- system handler)
+
+ procedure Notify_Exception
+ (signo : Signal;
+ siginfo : System.Address;
+ ucontext : System.Address);
+ -- This function is the signal handler and calls a trampoline subprogram
+ -- that adjusts the unwind information so the ARM unwinder can find it's
+ -- way back to the context of the originating subprogram. Compare with
+ -- __gnat_error_handler for non-tasking programs.
+
+ ----------------------
+ -- Notify_Exception --
+ ----------------------
+
+ Signal_Mask : aliased sigset_t;
+ -- The set of signals handled by Notify_Exception
+
+ procedure Notify_Exception
+ (signo : Signal;
+ siginfo : System.Address;
+ ucontext : System.Address)
+ is
+ Result : Interfaces.C.int;
+
+ begin
+ -- With the __builtin_longjmp, the signal mask is not restored, so we
+ -- need to restore it explicitly. ??? We don't use __builtin_longjmp
+ -- anymore, so do we still need this? */
+
+ Result := pthread_sigmask (SIG_UNBLOCK, Signal_Mask'Access, null);
+ pragma Assert (Result = 0);
+
+ -- Perform the necessary context adjustments prior to calling the
+ -- trampoline subprogram with the "real" signal handler.
+
+ Adjust_Context_For_Raise (signo, ucontext);
+
+ Signal_Trampoline (signo, siginfo, ucontext, Map_Signal'Address);
+ end Notify_Exception;
+
+ ----------------
+ -- Initialize --
+ ----------------
+
+ Initialized : Boolean := False;
+
+ procedure Initialize is
+ act : aliased struct_sigaction;
+ old_act : aliased struct_sigaction;
+ Result : System.OS_Interface.int;
+
+ Use_Alternate_Stack : constant Boolean :=
+ System.Task_Primitives.Alternate_Stack_Size /= 0;
+ -- Whether to use an alternate signal stack for stack overflows
+
+ begin
+ if Initialized then
+ return;
+ end if;
+
+ Initialized := True;
+
+ -- Need to call pthread_init very early because it is doing signal
+ -- initializations.
+
+ pthread_init;
+
+ Abort_Task_Interrupt := SIGADAABORT;
+
+ act.sa_handler := Notify_Exception'Address;
+
+ -- Setting SA_SIGINFO asks the kernel to pass more than just the signal
+ -- number argument to the handler when it is called. The set of extra
+ -- parameters includes a pointer to the interrupted context, which the
+ -- ZCX propagation scheme needs.
+
+ -- Most man pages for sigaction mention that sa_sigaction should be set
+ -- instead of sa_handler when SA_SIGINFO is on. In practice, the two
+ -- fields are actually union'ed and located at the same offset.
+
+ -- On some targets, we set sa_flags to SA_NODEFER so that during the
+ -- handler execution we do not change the Signal_Mask to be masked for
+ -- the Signal.
+
+ -- This is a temporary fix to the problem that the Signal_Mask is not
+ -- restored after the exception (longjmp) from the handler. The right
+ -- fix should be made in sigsetjmp so that we save the Signal_Set and
+ -- restore it after a longjmp.
+
+ -- We set SA_NODEFER to be compatible with what is done in
+ -- __gnat_error_handler.
+
+ Result := sigemptyset (Signal_Mask'Access);
+ pragma Assert (Result = 0);
+
+ -- Add signals that map to Ada exceptions to the mask
+
+ for J in Exception_Interrupts'Range loop
+ if State (Exception_Interrupts (J)) /= Default then
+ Result :=
+ sigaddset
+ (Signal_Mask'Access, Signal (Exception_Interrupts (J)));
+ pragma Assert (Result = 0);
+ end if;
+ end loop;
+
+ act.sa_mask := Signal_Mask;
+
+ pragma Assert (Keep_Unmasked = (Interrupt_ID'Range => False));
+ pragma Assert (Reserve = (Interrupt_ID'Range => False));
+
+ -- Process state of exception signals
+
+ for J in Exception_Interrupts'Range loop
+ if State (Exception_Interrupts (J)) /= User then
+ Keep_Unmasked (Exception_Interrupts (J)) := True;
+ Reserve (Exception_Interrupts (J)) := True;
+
+ if State (Exception_Interrupts (J)) /= Default then
+ act.sa_flags := SA_NODEFER + SA_RESTART + SA_SIGINFO;
+
+ if Use_Alternate_Stack
+ and then Exception_Interrupts (J) = SIGSEGV
+ then
+ act.sa_flags := act.sa_flags + SA_ONSTACK;
+ end if;
+
+ Result :=
+ sigaction
+ (Signal (Exception_Interrupts (J)), act'Unchecked_Access,
+ old_act'Unchecked_Access);
+ pragma Assert (Result = 0);
+ end if;
+ end if;
+ end loop;
+
+ if State (Abort_Task_Interrupt) /= User then
+ Keep_Unmasked (Abort_Task_Interrupt) := True;
+ Reserve (Abort_Task_Interrupt) := True;
+ end if;
+
+ -- Set SIGINT to unmasked state as long as it is not in "User" state.
+ -- Check for Unreserve_All_Interrupts last.
+
+ if State (SIGINT) /= User then
+ Keep_Unmasked (SIGINT) := True;
+ Reserve (SIGINT) := True;
+ end if;
+
+ -- Check all signals for state that requires keeping them unmasked and
+ -- reserved.
+
+ for J in Interrupt_ID'Range loop
+ if State (J) = Default or else State (J) = Runtime then
+ Keep_Unmasked (J) := True;
+ Reserve (J) := True;
+ end if;
+ end loop;
+
+ -- Add the set of signals that must always be unmasked for this target
+
+ for J in Unmasked'Range loop
+ Keep_Unmasked (Interrupt_ID (Unmasked (J))) := True;
+ Reserve (Interrupt_ID (Unmasked (J))) := True;
+ end loop;
+
+ -- Add target-specific reserved signals
+
+ for J in Reserved'Range loop
+ Reserve (Interrupt_ID (Reserved (J))) := True;
+ end loop;
+
+ -- Process pragma Unreserve_All_Interrupts. This overrides any settings
+ -- due to pragma Interrupt_State:
+
+ if Unreserve_All_Interrupts /= 0 then
+ Keep_Unmasked (SIGINT) := False;
+ Reserve (SIGINT) := False;
+ end if;
+
+ -- We do not really have Signal 0. We just use this value to identify
+ -- non-existent signals (see s-intnam.ads). Therefore, Signal should not
+ -- be used in all signal related operations hence mark it as reserved.
+
+ Reserve (0) := True;
+ end Initialize;
+
+end System.Interrupt_Management;
diff --git a/gcc-4.9/gcc/ada/s-linux-alpha.ads b/gcc-4.9/gcc/ada/s-linux-alpha.ads
index 1a9f37acd..e1c97ad9a 100644
--- a/gcc-4.9/gcc/ada/s-linux-alpha.ads
+++ b/gcc-4.9/gcc/ada/s-linux-alpha.ads
@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
--- Copyright (C) 2009-2011, Free Software Foundation, Inc. --
+-- Copyright (C) 2009-2014, Free Software Foundation, Inc. --
-- --
-- GNARL 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,14 +35,30 @@
-- PLEASE DO NOT add any with-clauses to this package or remove the pragma
-- Preelaborate. This package is designed to be a bottom-level (leaf) package.
+with Interfaces.C;
+
package System.Linux is
pragma Preelaborate;
- ------------
- -- time_t --
- ------------
-
- type time_t is new Long_Integer;
+ ----------
+ -- Time --
+ ----------
+
+ subtype long is Interfaces.C.long;
+ subtype suseconds_t is Interfaces.C.long;
+ subtype time_t is Interfaces.C.long;
+
+ type timespec is record
+ tv_sec : time_t;
+ tv_nsec : long;
+ end record;
+ pragma Convention (C, timespec);
+
+ type timeval is record
+ tv_sec : time_t;
+ tv_usec : suseconds_t;
+ end record;
+ pragma Convention (C, timeval);
-----------
-- Errno --
diff --git a/gcc-4.9/gcc/ada/s-linux-android.ads b/gcc-4.9/gcc/ada/s-linux-android.ads
new file mode 100644
index 000000000..85c421039
--- /dev/null
+++ b/gcc-4.9/gcc/ada/s-linux-android.ads
@@ -0,0 +1,128 @@
+------------------------------------------------------------------------------
+-- --
+-- GNU ADA RUN-TIME LIBRARY (GNARL) COMPONENTS --
+-- --
+-- S Y S T E M . L I N U X --
+-- --
+-- S p e c --
+-- --
+-- Copyright (C) 2014, Free Software Foundation, Inc. --
+-- --
+-- GNARL 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 3, 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. --
+-- --
+-- As a special exception under Section 7 of GPL version 3, you are granted --
+-- additional permissions described in the GCC Runtime Library Exception, --
+-- version 3.1, as published by the Free Software Foundation. --
+-- --
+-- In particular, you can freely distribute your programs built with the --
+-- GNAT Pro compiler, including any required library run-time units, using --
+-- any licensing terms of your choosing. See the AdaCore Software License --
+-- for full details. --
+-- --
+-- --
+------------------------------------------------------------------------------
+
+-- This is the Android version of this package
+
+-- This package encapsulates cpu specific differences between implementations
+-- of GNU/Linux, in order to share s-osinte-linux.ads.
+
+-- PLEASE DO NOT add any with-clauses to this package or remove the pragma
+-- Preelaborate. This package is designed to be a bottom-level (leaf) package
+
+with Interfaces.C;
+
+package System.Linux is
+ pragma Preelaborate;
+
+ ----------
+ -- Time --
+ ----------
+
+ subtype long is Interfaces.C.long;
+ subtype suseconds_t is Interfaces.C.long;
+ subtype time_t is Interfaces.C.long;
+
+ type timespec is record
+ tv_sec : time_t;
+ tv_nsec : long;
+ end record;
+ pragma Convention (C, timespec);
+
+ type timeval is record
+ tv_sec : time_t;
+ tv_usec : suseconds_t;
+ end record;
+ pragma Convention (C, timeval);
+
+ -----------
+ -- Errno --
+ -----------
+
+ EAGAIN : constant := 11;
+ EINTR : constant := 4;
+ EINVAL : constant := 22;
+ ENOMEM : constant := 12;
+ EPERM : constant := 1;
+ ETIMEDOUT : constant := 110;
+
+ -------------
+ -- Signals --
+ -------------
+
+ SIGHUP : constant := 1; -- hangup
+ SIGINT : constant := 2; -- interrupt (rubout)
+ SIGQUIT : constant := 3; -- quit (ASCD FS)
+ SIGILL : constant := 4; -- illegal instruction (not reset)
+ SIGTRAP : constant := 5; -- trace trap (not reset)
+ SIGIOT : constant := 6; -- IOT instruction
+ SIGABRT : constant := 6; -- used by abort, replace SIGIOT in the future
+ SIGFPE : constant := 8; -- floating point exception
+ SIGKILL : constant := 9; -- kill (cannot be caught or ignored)
+ SIGBUS : constant := 7; -- bus error
+ SIGSEGV : constant := 11; -- segmentation violation
+ SIGPIPE : constant := 13; -- write on a pipe with no one to read it
+ SIGALRM : constant := 14; -- alarm clock
+ SIGTERM : constant := 15; -- software termination signal from kill
+ SIGUSR1 : constant := 10; -- user defined signal 1
+ SIGUSR2 : constant := 12; -- user defined signal 2
+ SIGCLD : constant := 17; -- alias for SIGCHLD
+ SIGCHLD : constant := 17; -- child status change
+ SIGPWR : constant := 30; -- power-fail restart
+ SIGWINCH : constant := 28; -- window size change
+ SIGURG : constant := 23; -- urgent condition on IO channel
+ SIGPOLL : constant := 29; -- pollable event occurred
+ SIGIO : constant := 29; -- I/O now possible (4.2 BSD)
+ SIGLOST : constant := 29; -- File lock lost
+ SIGSTOP : constant := 19; -- stop (cannot be caught or ignored)
+ SIGTSTP : constant := 20; -- user stop requested from tty
+ SIGCONT : constant := 18; -- stopped process has been continued
+ SIGTTIN : constant := 21; -- background tty read attempted
+ SIGTTOU : constant := 22; -- background tty write attempted
+ SIGVTALRM : constant := 26; -- virtual timer expired
+ SIGPROF : constant := 27; -- profiling timer expired
+ SIGXCPU : constant := 24; -- CPU time limit exceeded
+ SIGXFSZ : constant := 25; -- filesize limit exceeded
+ SIGUNUSED : constant := 31; -- unused signal (GNU/Linux)
+ SIGSTKFLT : constant := 16; -- coprocessor stack fault (Linux)
+ SIGLTHRRES : constant := 32; -- GNU/LinuxThreads restart signal
+ SIGLTHRCAN : constant := 33; -- GNU/LinuxThreads cancel signal
+ SIGLTHRDBG : constant := 34; -- GNU/LinuxThreads debugger signal
+
+ -- struct_sigaction offsets
+
+ sa_handler_pos : constant := 0;
+ sa_mask_pos : constant := Standard'Address_Size / 8;
+ sa_flags_pos : constant := 4 + sa_mask_pos;
+
+ SA_SIGINFO : constant := 16#00000004#;
+ SA_ONSTACK : constant := 16#08000000#;
+ SA_RESTART : constant := 16#10000000#;
+ SA_NODEFER : constant := 16#40000000#;
+
+end System.Linux;
diff --git a/gcc-4.9/gcc/ada/s-linux-hppa.ads b/gcc-4.9/gcc/ada/s-linux-hppa.ads
index 904615049..8f7d81175 100644
--- a/gcc-4.9/gcc/ada/s-linux-hppa.ads
+++ b/gcc-4.9/gcc/ada/s-linux-hppa.ads
@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
--- Copyright (C) 2008-2011, Free Software Foundation, Inc. --
+-- Copyright (C) 2008-2014, Free Software Foundation, Inc. --
-- --
-- GNARL 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,14 +35,30 @@
-- PLEASE DO NOT add any with-clauses to this package or remove the pragma
-- Preelaborate. This package is designed to be a bottom-level (leaf) package.
+with Interfaces.C;
+
package System.Linux is
pragma Preelaborate;
- ------------
- -- time_t --
- ------------
+ ----------
+ -- Time --
+ ----------
+
+ subtype long is Interfaces.C.long;
+ subtype suseconds_t is Interfaces.C.long;
+ subtype time_t is Interfaces.C.long;
+
+ type timespec is record
+ tv_sec : time_t;
+ tv_nsec : long;
+ end record;
+ pragma Convention (C, timespec);
- type time_t is new Long_Integer;
+ type timeval is record
+ tv_sec : time_t;
+ tv_usec : suseconds_t;
+ end record;
+ pragma Convention (C, timeval);
-----------
-- Errno --
diff --git a/gcc-4.9/gcc/ada/s-linux-mipsel.ads b/gcc-4.9/gcc/ada/s-linux-mipsel.ads
index 028ea7c0b..1799a557a 100644
--- a/gcc-4.9/gcc/ada/s-linux-mipsel.ads
+++ b/gcc-4.9/gcc/ada/s-linux-mipsel.ads
@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
--- Copyright (C) 2009-2011, Free Software Foundation, Inc. --
+-- Copyright (C) 2009-2014, Free Software Foundation, Inc. --
-- --
-- GNARL 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- --
@@ -34,14 +34,30 @@
-- PLEASE DO NOT add any with-clauses to this package or remove the pragma
-- Preelaborate. This package is designed to be a bottom-level (leaf) package
+with Interfaces.C;
+
package System.Linux is
pragma Preelaborate;
- ------------
- -- time_t --
- ------------
+ ----------
+ -- Time --
+ ----------
+
+ subtype long is Interfaces.C.long;
+ subtype suseconds_t is Interfaces.C.long;
+ subtype time_t is Interfaces.C.long;
+
+ type timespec is record
+ tv_sec : time_t;
+ tv_nsec : long;
+ end record;
+ pragma Convention (C, timespec);
- type time_t is new Long_Integer;
+ type timeval is record
+ tv_sec : time_t;
+ tv_usec : suseconds_t;
+ end record;
+ pragma Convention (C, timeval);
-----------
-- Errno --
diff --git a/gcc-4.9/gcc/ada/s-linux-sparc.ads b/gcc-4.9/gcc/ada/s-linux-sparc.ads
index db3b4ea79..ae813e6b3 100644
--- a/gcc-4.9/gcc/ada/s-linux-sparc.ads
+++ b/gcc-4.9/gcc/ada/s-linux-sparc.ads
@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
--- Copyright (C) 2009-2011, Free Software Foundation, Inc. --
+-- Copyright (C) 2009-2014, Free Software Foundation, Inc. --
-- --
-- GNARL 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,14 +35,30 @@
-- PLEASE DO NOT add any with-clauses to this package or remove the pragma
-- Preelaborate. This package is designed to be a bottom-level (leaf) package
+with Interfaces.C;
+
package System.Linux is
pragma Preelaborate;
- ------------
- -- time_t --
- ------------
-
- type time_t is new Long_Integer;
+ ----------
+ -- Time --
+ ----------
+
+ subtype long is Interfaces.C.long;
+ subtype suseconds_t is Interfaces.C.long;
+ subtype time_t is Interfaces.C.long;
+
+ type timespec is record
+ tv_sec : time_t;
+ tv_nsec : long;
+ end record;
+ pragma Convention (C, timespec);
+
+ type timeval is record
+ tv_sec : time_t;
+ tv_usec : suseconds_t;
+ end record;
+ pragma Convention (C, timeval);
-----------
-- Errno --
diff --git a/gcc-4.9/gcc/ada/s-linux-x32.ads b/gcc-4.9/gcc/ada/s-linux-x32.ads
index 9dc0e830d..1b2d46edd 100644
--- a/gcc-4.9/gcc/ada/s-linux-x32.ads
+++ b/gcc-4.9/gcc/ada/s-linux-x32.ads
@@ -6,7 +6,8 @@
-- --
-- S p e c --
-- --
--- Copyright (C) 2013, Free Software Foundation, Inc. --
+-- Copyright (C) 2013-2014, Free Software Foundation, Inc. --
+--
-- --
-- GNARL 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- --
@@ -38,12 +39,24 @@
package System.Linux is
pragma Preelaborate;
- ------------
- -- time_t --
- ------------
+ ----------
+ -- Time --
+ ----------
type time_t is new Long_Long_Integer;
+ type timespec is record
+ tv_sec : time_t;
+ tv_nsec : Long_Long_Integer;
+ end record;
+ pragma Convention (C, timespec);
+
+ type timeval is record
+ tv_sec : time_t;
+ tv_usec : Long_Long_Integer;
+ end record;
+ pragma Convention (C, timeval);
+
-----------
-- Errno --
-----------
diff --git a/gcc-4.9/gcc/ada/s-linux.ads b/gcc-4.9/gcc/ada/s-linux.ads
index 2339e29e0..8a49e8c89 100644
--- a/gcc-4.9/gcc/ada/s-linux.ads
+++ b/gcc-4.9/gcc/ada/s-linux.ads
@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
--- Copyright (C) 2008-2011, Free Software Foundation, Inc. --
+-- Copyright (C) 2008-2014, Free Software Foundation, Inc. --
-- --
-- GNARL 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,14 +35,30 @@
-- PLEASE DO NOT add any with-clauses to this package or remove the pragma
-- Preelaborate. This package is designed to be a bottom-level (leaf) package
+with Interfaces.C;
+
package System.Linux is
pragma Preelaborate;
- ------------
- -- time_t --
- ------------
+ ----------
+ -- Time --
+ ----------
+
+ subtype long is Interfaces.C.long;
+ subtype suseconds_t is Interfaces.C.long;
+ subtype time_t is Interfaces.C.long;
+
+ type timespec is record
+ tv_sec : time_t;
+ tv_nsec : long;
+ end record;
+ pragma Convention (C, timespec);
- type time_t is new Long_Integer;
+ type timeval is record
+ tv_sec : time_t;
+ tv_usec : suseconds_t;
+ end record;
+ pragma Convention (C, timeval);
-----------
-- Errno --
diff --git a/gcc-4.9/gcc/ada/s-osinte-android.ads b/gcc-4.9/gcc/ada/s-osinte-android.ads
index 2b94f3f05..310c598d7 100644
--- a/gcc-4.9/gcc/ada/s-osinte-android.ads
+++ b/gcc-4.9/gcc/ada/s-osinte-android.ads
@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
--- Copyright (C) 1995-2013, Free Software Foundation, Inc. --
+-- Copyright (C) 1995-2014, 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- --
@@ -75,7 +75,7 @@ package System.OS_Interface is
-- Signals --
-------------
- Max_Interrupt : constant := 63;
+ Max_Interrupt : constant := 31;
type Signal is new int range 0 .. Max_Interrupt;
for Signal'Size use int'Size;
@@ -114,9 +114,6 @@ package System.OS_Interface is
SIGXFSZ : constant := System.Linux.SIGXFSZ;
SIGUNUSED : constant := System.Linux.SIGUNUSED;
SIGSTKFLT : constant := System.Linux.SIGSTKFLT;
- SIGLTHRRES : constant := System.Linux.SIGLTHRRES;
- SIGLTHRCAN : constant := System.Linux.SIGLTHRCAN;
- SIGLTHRDBG : constant := System.Linux.SIGLTHRDBG;
SIGADAABORT : constant := SIGABRT;
-- Change this to use another signal for task abort. SIGTERM might be a
@@ -138,13 +135,9 @@ package System.OS_Interface is
SIGPROF,
-- To avoid confusing the profiler
- SIGKILL, SIGSTOP,
+ SIGKILL, SIGSTOP);
-- These two signals actually can't be masked (POSIX won't allow it)
- SIGLTHRRES, SIGLTHRCAN, SIGLTHRDBG);
- -- These three signals are used by GNU/LinuxThreads starting from glibc
- -- 2.1 (future 2.2).
-
Reserved : constant Signal_Set := (SIGVTALRM, SIGUNUSED);
-- Not clear why these two signals are reserved. Perhaps they are not
-- supported by this version of GNU/Linux ???
@@ -187,6 +180,8 @@ package System.OS_Interface is
SA_SIGINFO : constant := System.Linux.SA_SIGINFO;
SA_ONSTACK : constant := System.Linux.SA_ONSTACK;
+ SA_NODEFER : constant := System.Linux.SA_NODEFER;
+ SA_RESTART : constant := System.Linux.SA_RESTART;
SIG_BLOCK : constant := 0;
SIG_UNBLOCK : constant := 1;
@@ -580,17 +575,16 @@ package System.OS_Interface is
private
- type sigset_t is
- -- array (0 .. OS_Constants.SIZEOF_sigset - 1) of unsigned_char;
- array (1 .. 127) of unsigned_char;
+ type sigset_t is new Interfaces.C.unsigned_long;
pragma Convention (C, sigset_t);
for sigset_t'Alignment use Interfaces.C.unsigned_long'Alignment;
pragma Warnings (Off);
for struct_sigaction use record
sa_handler at Linux.sa_handler_pos range 0 .. Standard'Address_Size - 1;
- sa_mask at Linux.sa_mask_pos range 0 .. 1023;
- sa_flags at Linux.sa_flags_pos range 0 .. Standard'Address_Size - 1;
+ sa_mask at Linux.sa_mask_pos range 0 .. sigset_t'Size - 1;
+ sa_flags at Linux.sa_flags_pos
+ range 0 .. Interfaces.C.unsigned_long'Size - 1;
end record;
-- We intentionally leave sa_restorer unspecified and let the compiler
-- append it after the last field, so disable corresponding warning.
diff --git a/gcc-4.9/gcc/ada/s-osinte-hpux.ads b/gcc-4.9/gcc/ada/s-osinte-hpux.ads
index 396844c68..6beb05018 100644
--- a/gcc-4.9/gcc/ada/s-osinte-hpux.ads
+++ b/gcc-4.9/gcc/ada/s-osinte-hpux.ads
@@ -7,7 +7,7 @@
-- S p e c --
-- --
-- Copyright (C) 1991-1994, Florida State University --
--- Copyright (C) 1995-2013, Free Software Foundation, Inc. --
+-- Copyright (C) 1995-2014, 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- --
@@ -522,7 +522,7 @@ private
type timespec is record
tv_sec : time_t;
- tv_nsec : time_t;
+ tv_nsec : long;
end record;
pragma Convention (C, timespec);
diff --git a/gcc-4.9/gcc/ada/s-osinte-kfreebsd-gnu.ads b/gcc-4.9/gcc/ada/s-osinte-kfreebsd-gnu.ads
index f57fe9fea..be46c2e53 100644
--- a/gcc-4.9/gcc/ada/s-osinte-kfreebsd-gnu.ads
+++ b/gcc-4.9/gcc/ada/s-osinte-kfreebsd-gnu.ads
@@ -7,7 +7,7 @@
-- S p e c --
-- --
-- Copyright (C) 1991-1994, Florida State University --
--- Copyright (C) 1995-2013, Free Software Foundation, Inc. --
+-- Copyright (C) 1995-2014, 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- --
@@ -492,7 +492,7 @@ private
type timespec is record
tv_sec : time_t;
- tv_nsec : time_t;
+ tv_nsec : long;
end record;
pragma Convention (C, timespec);
diff --git a/gcc-4.9/gcc/ada/s-osinte-linux.ads b/gcc-4.9/gcc/ada/s-osinte-linux.ads
index 3f8df80c0..15a351ac1 100644
--- a/gcc-4.9/gcc/ada/s-osinte-linux.ads
+++ b/gcc-4.9/gcc/ada/s-osinte-linux.ads
@@ -7,7 +7,7 @@
-- S p e c --
-- --
-- Copyright (C) 1991-1994, Florida State University --
--- Copyright (C) 1995-2013, Free Software Foundation, Inc. --
+-- Copyright (C) 1995-2014, 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- --
@@ -217,8 +217,9 @@ package System.OS_Interface is
-- Time --
----------
- type timespec is private;
- type time_t is private;
+ subtype time_t is System.Linux.time_t;
+ subtype timespec is System.Linux.timespec;
+ subtype timeval is System.Linux.timeval;
function To_Duration (TS : timespec) return Duration;
pragma Inline (To_Duration);
@@ -598,14 +599,6 @@ private
type pid_t is new int;
- type time_t is new System.Linux.time_t;
-
- type timespec is record
- tv_sec : time_t;
- tv_nsec : time_t;
- end record;
- pragma Convention (C, timespec);
-
type unsigned_long_long_t is mod 2 ** 64;
-- Local type only used to get the alignment of this type below
diff --git a/gcc-4.9/gcc/ada/s-osinte-posix.adb b/gcc-4.9/gcc/ada/s-osinte-posix.adb
index 402ddcb61..6bcc72235 100644
--- a/gcc-4.9/gcc/ada/s-osinte-posix.adb
+++ b/gcc-4.9/gcc/ada/s-osinte-posix.adb
@@ -7,7 +7,7 @@
-- B o d y --
-- --
-- Copyright (C) 1991-1994, Florida State University --
--- Copyright (C) 1995-2010, AdaCore --
+-- Copyright (C) 1995-2014, AdaCore --
-- --
-- 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- --
@@ -30,8 +30,7 @@
-- --
------------------------------------------------------------------------------
--- This is a GNU/LinuxThreads, Solaris pthread and HP-UX pthread version
--- of this package.
+-- This version is for POSIX-like operating systems
pragma Polling (Off);
-- Turn off polling, we do not want ATC polling to take place during
@@ -104,7 +103,7 @@ package body System.OS_Interface is
end if;
return timespec'(tv_sec => S,
- tv_nsec => time_t (Long_Long_Integer (F * 10#1#E9)));
+ tv_nsec => long (Long_Long_Integer (F * 10#1#E9)));
end To_Timespec;
end System.OS_Interface;
diff --git a/gcc-4.9/gcc/ada/s-osinte-solaris-posix.ads b/gcc-4.9/gcc/ada/s-osinte-solaris-posix.ads
index 7aa20f115..0859b8d7b 100644
--- a/gcc-4.9/gcc/ada/s-osinte-solaris-posix.ads
+++ b/gcc-4.9/gcc/ada/s-osinte-solaris-posix.ads
@@ -7,7 +7,7 @@
-- S p e c --
-- --
-- Copyright (C) 1991-1994, Florida State University --
--- Copyright (C) 1995-2013, Free Software Foundation, Inc. --
+-- Copyright (C) 1995-2014, 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- --
@@ -513,7 +513,7 @@ private
type timespec is record
tv_sec : time_t;
- tv_nsec : time_t;
+ tv_nsec : long;
end record;
pragma Convention (C, timespec);
diff --git a/gcc-4.9/gcc/ada/s-osinte-x32.adb b/gcc-4.9/gcc/ada/s-osinte-x32.adb
new file mode 100644
index 000000000..467970b96
--- /dev/null
+++ b/gcc-4.9/gcc/ada/s-osinte-x32.adb
@@ -0,0 +1,110 @@
+------------------------------------------------------------------------------
+-- --
+-- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS --
+-- --
+-- S Y S T E M . O S _ I N T E R F A C E --
+-- --
+-- B o d y --
+-- --
+-- Copyright (C) 1991-1994, Florida State University --
+-- Copyright (C) 1995-2014, AdaCore --
+-- --
+-- 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 3, 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. --
+-- --
+-- As a special exception under Section 7 of GPL version 3, you are granted --
+-- additional permissions described in the GCC Runtime Library Exception, --
+-- version 3.1, as published by the Free Software Foundation. --
+-- --
+-- You should have received a copy of the GNU General Public License and --
+-- a copy of the GCC Runtime Library Exception along with this program; --
+-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
+-- <http://www.gnu.org/licenses/>. --
+-- --
+-- GNARL was developed by the GNARL team at Florida State University. --
+-- Extensive contributions were provided by Ada Core Technologies, Inc. --
+-- --
+------------------------------------------------------------------------------
+
+-- This version is for Linux/x32
+
+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.
+
+-- This package encapsulates all direct interfaces to OS services
+-- that are needed by children of System.
+
+with Interfaces.C; use Interfaces.C;
+package body System.OS_Interface is
+
+ --------------------
+ -- Get_Stack_Base --
+ --------------------
+
+ function Get_Stack_Base (thread : pthread_t) return Address is
+ pragma Warnings (Off, thread);
+
+ begin
+ return Null_Address;
+ end Get_Stack_Base;
+
+ ------------------
+ -- pthread_init --
+ ------------------
+
+ procedure pthread_init is
+ begin
+ null;
+ end pthread_init;
+
+ -----------------
+ -- To_Duration --
+ -----------------
+
+ function To_Duration (TS : timespec) return Duration is
+ begin
+ return Duration (TS.tv_sec) + Duration (TS.tv_nsec) / 10#1#E9;
+ end To_Duration;
+
+ ------------------------
+ -- To_Target_Priority --
+ ------------------------
+
+ function To_Target_Priority
+ (Prio : System.Any_Priority) return Interfaces.C.int
+ is
+ begin
+ return Interfaces.C.int (Prio);
+ end To_Target_Priority;
+
+ -----------------
+ -- To_Timespec --
+ -----------------
+
+ function To_Timespec (D : Duration) return timespec is
+ S : time_t;
+ F : Duration;
+
+ use type System.Linux.time_t;
+ begin
+ S := time_t (Long_Long_Integer (D));
+ F := D - Duration (S);
+
+ -- If F has negative value due to a round-up, adjust for positive F
+ -- value.
+
+ if F < 0.0 then
+ S := S - 1;
+ F := F + 1.0;
+ end if;
+
+ return timespec'(tv_sec => S,
+ tv_nsec => Long_Long_Integer (F * 10#1#E9));
+ end To_Timespec;
+
+end System.OS_Interface;
diff --git a/gcc-4.9/gcc/ada/s-osprim-x32.adb b/gcc-4.9/gcc/ada/s-osprim-x32.adb
index 5d4964a27..e0c020c78 100644
--- a/gcc-4.9/gcc/ada/s-osprim-x32.adb
+++ b/gcc-4.9/gcc/ada/s-osprim-x32.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 2013, Free Software Foundation, Inc. --
+-- Copyright (C) 2013-2014, Free Software Foundation, Inc. --
-- --
-- GNARL 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- --
@@ -42,7 +42,7 @@ package body System.OS_Primitives is
type timespec is record
tv_sec : time_t;
- tv_nsec : time_t;
+ tv_nsec : Long_Long_Integer;
end record;
pragma Convention (C, timespec);
@@ -54,7 +54,7 @@ package body System.OS_Primitives is
-----------
function Clock return Duration is
- type timeval is array (1 .. 2) of time_t;
+ type timeval is array (1 .. 2) of Long_Long_Integer;
procedure timeval_to_duration
(T : not null access timeval;
@@ -118,7 +118,7 @@ package body System.OS_Primitives is
return
timespec'(tv_sec => S,
- tv_nsec => time_t (Long_Long_Integer (F * 10#1#E9)));
+ tv_nsec => Long_Long_Integer (F * 10#1#E9));
end To_Timespec;
-----------------
diff --git a/gcc-4.9/gcc/ada/s-taprop-linux.adb b/gcc-4.9/gcc/ada/s-taprop-linux.adb
index 515850a68..5aa384ba1 100644
--- a/gcc-4.9/gcc/ada/s-taprop-linux.adb
+++ b/gcc-4.9/gcc/ada/s-taprop-linux.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2012, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2014, Free Software Foundation, Inc. --
-- --
-- GNARL 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- --
@@ -627,8 +627,6 @@ package body System.Task_Primitives.Operations is
function Monotonic_Clock return Duration is
use Interfaces;
- type timeval is array (1 .. 2) of System.OS_Interface.time_t;
-
procedure timeval_to_duration
(T : not null access timeval;
sec : not null access C.long;
diff --git a/gcc-4.9/gcc/ada/sigtramp-armdroid.c b/gcc-4.9/gcc/ada/sigtramp-armdroid.c
new file mode 100644
index 000000000..fb522dfcd
--- /dev/null
+++ b/gcc-4.9/gcc/ada/sigtramp-armdroid.c
@@ -0,0 +1,161 @@
+/****************************************************************************
+ * *
+ * GNAT COMPILER COMPONENTS *
+ * *
+ * S I G T R A M P *
+ * *
+ * Asm Implementation File *
+ * *
+ * Copyright (C) 2014, 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 3, 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. *
+ * *
+ * As a special exception under Section 7 of GPL version 3, you are granted *
+ * additional permissions described in the GCC Runtime Library Exception, *
+ * version 3.1, as published by the Free Software Foundation. *
+ * *
+ * In particular, you can freely distribute your programs built with the *
+ * GNAT Pro compiler, including any required library run-time units, using *
+ * any licensing terms of your choosing. See the AdaCore Software License *
+ * for full details. *
+ * *
+ * GNAT was originally developed by the GNAT team at New York University. *
+ * Extensive contributions were provided by Ada Core Technologies Inc. *
+ * *
+ ****************************************************************************/
+
+/******************************************************
+ * ARM-Android version of the __gnat_sigtramp service *
+ ******************************************************/
+
+#include "sigtramp.h"
+/* See sigtramp.h for a general explanation of functionality. */
+
+/* ----------------------
+ -- General comments --
+ ----------------------
+
+ Stubs are generated from toplevel asms,
+ The general idea is to establish CFA as the sigcontext
+ and state where to find the registers as offsets from there.
+
+ We support stubs for VxWorks and Android, providing unwind info for
+ common registers. We might need variants with support for floating
+ point or altivec registers as well at some point.
+
+ For Android it would be simpler to write this in Asm since there's only
+ one variant, but to keep it looking like the VxWorks stubs,
+ C is the choice for our toplevel interface.
+
+ Note that the registers we "restore" here are those to which we have
+ direct access through the system sigcontext structure, which includes
+ only a partial set of the non-volatiles ABI-wise. */
+
+/* -----------------------------------------
+ -- Protypes for our internal asm stubs --
+ -----------------------------------------
+
+ The registers are expected to be at SIGCONTEXT + 12 (reference the
+ sicontext structure in asm/sigcontext.h which describes the first
+ 3 * 4byte fields.) Even though our symbols will remain local, the
+ prototype claims "extern" and not "static" to prevent compiler complaints
+ about a symbol used but never defined. */
+
+/* sigtramp stub providing unwind info for common registers. */
+
+extern void __gnat_sigtramp_common
+ (int signo, void *siginfo, void *sigcontext,
+ __sigtramphandler_t * handler);
+
+void __gnat_sigtramp (int signo, void *si, void *sc,
+ __sigtramphandler_t * handler)
+ __attribute__((optimize(2)));
+
+void __gnat_sigtramp (int signo, void *si, void *ucontext,
+ __sigtramphandler_t * handler)
+{
+ struct sigcontext *mcontext = &((ucontext_t *) ucontext)->uc_mcontext;
+
+ __gnat_sigtramp_common (signo, si, mcontext, handler);
+}
+
+/* asm string construction helpers. */
+
+#define STR(TEXT) #TEXT
+/* stringify expanded TEXT, surrounding it with double quotes. */
+
+#define S(E) STR(E)
+/* stringify E, which will resolve as text but may contain macros
+ still to be expanded. */
+
+/* asm (TEXT) outputs <tab>TEXT. These facilitate the output of
+ multiline contents: */
+#define TAB(S) "\t" S
+#define CR(S) S "\n"
+
+#undef TCR
+#define TCR(S) TAB(CR(S))
+
+/* Trampoline body block
+ --------------------- */
+
+#define SIGTRAMP_BODY \
+CR("") \
+TCR("# Allocate frame and also save r2 which is the argument register") \
+TCR("# containing the sigcontext, so that we can restore it during") \
+TCR("# unwinding and thereby load the rest of the desired context.") \
+TCR("stmfd sp!, {r2, r3, lr}") \
+TCR("# The unwinder undo's these operations in reverse order so starting") \
+TCR("# from bottom, restore r2 from the current vsp location, move r2 into") \
+TCR("# the vsp, add 12 bytes to get the start of the register save area") \
+TCR("# then restore the 15 general purpose registers of the frame which") \
+TCR("# raised the signal.") \
+TCR(".save {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, r12, r13, r14, r15}") \
+TCR(".pad #12") \
+TCR(".movsp r2") \
+TCR(".save {r2}") \
+TCR("# Call the real handler. The signo, siginfo and sigcontext") \
+TCR("# arguments are the same as those we received in r0, r1 and r2.") \
+TCR("blx r3") \
+TCR("# Restore our callee-saved items, release our frame and return") \
+TCR("# (should never get here!).") \
+TCR("ldmfd sp, {r2, r3, pc}")
+
+/* Symbol definition block
+ ----------------------- */
+
+#define SIGTRAMP_START(SYM) \
+CR("# " S(SYM) " unwind trampoline") \
+TCR(".type " S(SYM) ", %function") \
+CR("") \
+CR(S(SYM) ":") \
+TCR(".fnstart")
+
+/* Symbol termination block
+ ------------------------ */
+
+#define SIGTRAMP_END(SYM) \
+CR(".fnend") \
+TCR(".size " S(SYM) ", .-" S(SYM))
+
+/*----------------------------
+ -- And now, the real code --
+ ---------------------------- */
+
+/* Text section start. The compiler isn't aware of that switch. */
+
+asm (".text\n"
+ TCR(".align 2"));
+
+/* sigtramp stub for common registers. */
+
+#define TRAMP_COMMON __gnat_sigtramp_common
+
+asm (SIGTRAMP_START(TRAMP_COMMON));
+asm (SIGTRAMP_BODY);
+asm (SIGTRAMP_END(TRAMP_COMMON));
diff --git a/gcc-4.9/gcc/ada/sigtramp.h b/gcc-4.9/gcc/ada/sigtramp.h
index cf5f4707e..7419e1725 100644
--- a/gcc-4.9/gcc/ada/sigtramp.h
+++ b/gcc-4.9/gcc/ada/sigtramp.h
@@ -6,7 +6,7 @@
* *
* C Header File *
* *
- * Copyright (C) 2011-2013, Free Software Foundation, Inc. *
+ * Copyright (C) 2011-2014, 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- *
@@ -41,10 +41,29 @@
extern "C" {
#endif
- typedef void sighandler_t (int signo, void *siginfo, void *sigcontext);
+#ifdef __ANDROID__
+#include <stdlib.h>
+#include <asm/signal.h>
+#include <asm/sigcontext.h>
+
+/* Android SDK doesn't define these structs */
+typedef struct sigcontext mcontext_t;
+
+typedef struct ucontext
+ {
+ unsigned long uc_flags;
+ struct ucontext *uc_link;
+ stack_t uc_stack;
+ mcontext_t uc_mcontext;
+} ucontext_t;
+#endif
+
+ /* This typedef signature sometimes conflicts with the sighandler_t from
+ system headers so call it something unique. */
+ typedef void __sigtramphandler_t (int signo, void *siginfo, void *sigcontext);
void __gnat_sigtramp (int signo, void *siginfo, void *sigcontext,
- sighandler_t * handler);
+ __sigtramphandler_t * handler);
/* To be called from an established signal handler. Setup the DWARF CFI
bits letting unwinders walk through the signal frame up into the
diff --git a/gcc-4.9/gcc/ada/system-linux-alpha.ads b/gcc-4.9/gcc/ada/system-linux-alpha.ads
index 5d8450204..044ab3e1c 100644
--- a/gcc-4.9/gcc/ada/system-linux-alpha.ads
+++ b/gcc-4.9/gcc/ada/system-linux-alpha.ads
@@ -7,7 +7,7 @@
-- S p e c --
-- (GNU-Linux/alpha Version) --
-- --
--- Copyright (C) 1992-2012, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2014, 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 --
@@ -35,9 +35,10 @@
------------------------------------------------------------------------------
package System is
-pragma Pure (System);
--- Note that we take advantage of the implementation permission to
--- make this unit Pure instead of Preelaborable, see RM 13.7(36)
+ pragma Pure;
+ -- Note that we take advantage of the implementation permission to make
+ -- this unit Pure instead of Preelaborable; see RM 13.7.1(15). In Ada
+ -- 2005, this is Pure in any case (AI-362).
type Name is (SYSTEM_NAME_GNAT);
System_Name : constant Name := SYSTEM_NAME_GNAT;
@@ -61,6 +62,7 @@ pragma Pure (System);
-- Storage-related Declarations
type Address is private;
+ pragma Preelaborable_Initialization (Address);
Null_Address : constant Address;
Storage_Unit : constant := 8;
diff --git a/gcc-4.9/gcc/ada/system-linux-mips.ads b/gcc-4.9/gcc/ada/system-linux-mips.ads
index 18f449563..08724650d 100644
--- a/gcc-4.9/gcc/ada/system-linux-mips.ads
+++ b/gcc-4.9/gcc/ada/system-linux-mips.ads
@@ -7,7 +7,7 @@
-- S p e c --
-- (GNU-Linux/MIPS Version) --
-- --
--- Copyright (C) 1992-2012, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2014, 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 --
@@ -62,6 +62,7 @@ package System is
-- Storage-related Declarations
type Address is private;
+ pragma Preelaborable_Initialization (Address);
Null_Address : constant Address;
Storage_Unit : constant := 8;
diff --git a/gcc-4.9/gcc/ada/system-linux-mips64el.ads b/gcc-4.9/gcc/ada/system-linux-mips64el.ads
index 85a0f41c3..5c8cad177 100644
--- a/gcc-4.9/gcc/ada/system-linux-mips64el.ads
+++ b/gcc-4.9/gcc/ada/system-linux-mips64el.ads
@@ -7,7 +7,7 @@
-- S p e c --
-- (GNU-Linux/MIPS64EL Version) --
-- --
--- Copyright (C) 1992-2012, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2014, 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 --
@@ -62,6 +62,7 @@ package System is
-- Storage-related Declarations
type Address is private;
+ pragma Preelaborable_Initialization (Address);
Null_Address : constant Address;
Storage_Unit : constant := 8;
diff --git a/gcc-4.9/gcc/ada/system-linux-mipsel.ads b/gcc-4.9/gcc/ada/system-linux-mipsel.ads
index c700048b8..e6d56fb82 100644
--- a/gcc-4.9/gcc/ada/system-linux-mipsel.ads
+++ b/gcc-4.9/gcc/ada/system-linux-mipsel.ads
@@ -7,7 +7,7 @@
-- S p e c --
-- (GNU-Linux/MIPSEL Version) --
-- --
--- Copyright (C) 1992-2012, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2014, 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 --
@@ -62,6 +62,7 @@ package System is
-- Storage-related Declarations
type Address is private;
+ pragma Preelaborable_Initialization (Address);
Null_Address : constant Address;
Storage_Unit : constant := 8;
diff --git a/gcc-4.9/gcc/ada/system-linux-s390.ads b/gcc-4.9/gcc/ada/system-linux-s390.ads
index 28107a0b4..e240d2e48 100644
--- a/gcc-4.9/gcc/ada/system-linux-s390.ads
+++ b/gcc-4.9/gcc/ada/system-linux-s390.ads
@@ -7,7 +7,7 @@
-- S p e c --
-- (GNU-Linux/s390 Version) --
-- --
--- Copyright (C) 1992-2012, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2014, 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 --
@@ -35,9 +35,10 @@
------------------------------------------------------------------------------
package System is
-pragma Pure (System);
--- Note that we take advantage of the implementation permission to
--- make this unit Pure instead of Preelaborable, see RM 13.7(36)
+ pragma Pure;
+ -- Note that we take advantage of the implementation permission to make
+ -- this unit Pure instead of Preelaborable; see RM 13.7.1(15). In Ada
+ -- 2005, this is Pure in any case (AI-362).
type Name is (SYSTEM_NAME_GNAT);
System_Name : constant Name := SYSTEM_NAME_GNAT;
@@ -61,6 +62,7 @@ pragma Pure (System);
-- Storage-related Declarations
type Address is private;
+ pragma Preelaborable_Initialization (Address);
Null_Address : constant Address;
Storage_Unit : constant := 8;
diff --git a/gcc-4.9/gcc/ada/system-linux-s390x.ads b/gcc-4.9/gcc/ada/system-linux-s390x.ads
index 135b5a3b1..19d2180ff 100644
--- a/gcc-4.9/gcc/ada/system-linux-s390x.ads
+++ b/gcc-4.9/gcc/ada/system-linux-s390x.ads
@@ -7,7 +7,7 @@
-- S p e c --
-- (GNU-Linux/s390x Version) --
-- --
--- Copyright (C) 1992-2012, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2014, 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 --
@@ -35,9 +35,10 @@
------------------------------------------------------------------------------
package System is
-pragma Pure (System);
--- Note that we take advantage of the implementation permission to
--- make this unit Pure instead of Preelaborable, see RM 13.7(36)
+ pragma Pure;
+ -- Note that we take advantage of the implementation permission to make
+ -- this unit Pure instead of Preelaborable; see RM 13.7.1(15). In Ada
+ -- 2005, this is Pure in any case (AI-362).
type Name is (SYSTEM_NAME_GNAT);
System_Name : constant Name := SYSTEM_NAME_GNAT;
@@ -61,6 +62,7 @@ pragma Pure (System);
-- Storage-related Declarations
type Address is private;
+ pragma Preelaborable_Initialization (Address);
Null_Address : constant Address;
Storage_Unit : constant := 8;
diff --git a/gcc-4.9/gcc/ada/system-linux-sparc.ads b/gcc-4.9/gcc/ada/system-linux-sparc.ads
index ff93463cf..6fde138ea 100644
--- a/gcc-4.9/gcc/ada/system-linux-sparc.ads
+++ b/gcc-4.9/gcc/ada/system-linux-sparc.ads
@@ -7,7 +7,7 @@
-- S p e c --
-- (GNU/Linux-SPARC Version) --
-- --
--- Copyright (C) 1992-2012, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2014, 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 --
@@ -35,9 +35,10 @@
------------------------------------------------------------------------------
package System is
-pragma Pure (System);
--- Note that we take advantage of the implementation permission to
--- make this unit Pure instead of Preelaborable, see RM 13.7(36)
+ pragma Pure;
+ -- Note that we take advantage of the implementation permission to make
+ -- this unit Pure instead of Preelaborable; see RM 13.7.1(15). In Ada
+ -- 2005, this is Pure in any case (AI-362).
type Name is (SYSTEM_NAME_GNAT);
System_Name : constant Name := SYSTEM_NAME_GNAT;
@@ -61,6 +62,7 @@ pragma Pure (System);
-- Storage-related Declarations
type Address is private;
+ pragma Preelaborable_Initialization (Address);
Null_Address : constant Address;
Storage_Unit : constant := 8;
diff --git a/gcc-4.9/gcc/ada/system-linux-sparcv9.ads b/gcc-4.9/gcc/ada/system-linux-sparcv9.ads
index 14d89f929..5b7598f3e 100644
--- a/gcc-4.9/gcc/ada/system-linux-sparcv9.ads
+++ b/gcc-4.9/gcc/ada/system-linux-sparcv9.ads
@@ -7,7 +7,7 @@
-- S p e c --
-- (GNU/Linux-SPARCV9 Version) --
-- --
--- Copyright (C) 1992-2011, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2014, 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 --
@@ -35,9 +35,10 @@
------------------------------------------------------------------------------
package System is
-pragma Pure (System);
--- Note that we take advantage of the implementation permission to
--- make this unit Pure instead of Preelaborable, see RM 13.7(36)
+ pragma Pure;
+ -- Note that we take advantage of the implementation permission to make
+ -- this unit Pure instead of Preelaborable; see RM 13.7.1(15). In Ada
+ -- 2005, this is Pure in any case (AI-362).
type Name is (SYSTEM_NAME_GNAT);
System_Name : constant Name := SYSTEM_NAME_GNAT;
@@ -61,6 +62,7 @@ pragma Pure (System);
-- Storage-related Declarations
type Address is private;
+ pragma Preelaborable_Initialization (Address);
Null_Address : constant Address;
Storage_Unit : constant := 8;
diff --git a/gcc-4.9/gcc/ada/system-rtems.ads b/gcc-4.9/gcc/ada/system-rtems.ads
index 3cab22abf..50bf7ac64 100644
--- a/gcc-4.9/gcc/ada/system-rtems.ads
+++ b/gcc-4.9/gcc/ada/system-rtems.ads
@@ -7,7 +7,7 @@
-- S p e c --
-- (Compiler Version) --
-- --
--- Copyright (C) 1992-2011 Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2014 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 --
@@ -34,9 +34,8 @@
-- --
------------------------------------------------------------------------------
--- This version of System is a RTEMS version that is used in building
--- the compiler. This is based as closely as possible on the generic
--- version with the following exceptions:
+-- This version is for RTEMS. It is based as closely as possible on the
+-- generic version with the following exceptions:
-- + priority definitions
package System is
@@ -67,6 +66,7 @@ package System is
-- Storage-related Declarations
type Address is private;
+ pragma Preelaborable_Initialization (Address);
Null_Address : constant Address;
Storage_Unit : constant := Standard'Storage_Unit;
diff --git a/gcc-4.9/gcc/ada/system-vxworks-arm.ads b/gcc-4.9/gcc/ada/system-vxworks-arm.ads
index 60a41e1b2..e7418a8a5 100644
--- a/gcc-4.9/gcc/ada/system-vxworks-arm.ads
+++ b/gcc-4.9/gcc/ada/system-vxworks-arm.ads
@@ -7,7 +7,7 @@
-- S p e c --
-- (VxWorks Version ARM) --
-- --
--- Copyright (C) 1992-2013, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2014, 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 --
@@ -35,10 +35,10 @@
------------------------------------------------------------------------------
package System is
-pragma Pure (System);
--- Note that we take advantage of the implementation permission to make this
--- unit Pure instead of Preelaborable; see RM 13.7.1(15). In Ada 2005, this is
--- Pure in any case (AI-362).
+ pragma Pure;
+ -- Note that we take advantage of the implementation permission to make
+ -- this unit Pure instead of Preelaborable; see RM 13.7.1(15). In Ada
+ -- 2005, this is Pure in any case (AI-362).
type Name is (SYSTEM_NAME_GNAT);
System_Name : constant Name := SYSTEM_NAME_GNAT;
diff --git a/gcc-4.9/gcc/c-family/ChangeLog b/gcc-4.9/gcc/c-family/ChangeLog
index 536b4fc4c..805ba9ca8 100644
--- a/gcc-4.9/gcc/c-family/ChangeLog
+++ b/gcc-4.9/gcc/c-family/ChangeLog
@@ -1,3 +1,39 @@
+2014-04-22 Release Manager
+
+ * GCC 4.9.0 released.
+
+2014-04-15 Igor Zamyatin <igor.zamyatin@intel.com>
+
+ PR middle-end/60467
+ * cilk.c (cilk_set_spawn_marker): Remove FUNCTION_DECL
+ as possible argument for Cilk_spawn.
+
+2014-04-08 Marek Polacek <polacek@redhat.com>
+
+ PR sanitizer/60745
+ * c-ubsan.c: Include asan.h.
+ (ubsan_instrument_return): Call initialize_sanitizer_builtins.
+
+2014-04-03 Nathan Sidwell <nathan@codesourcery.com>
+
+ * c.opt (Wnon-virtual-dtor): Auto set when Weffc++.
+
+2014-04-02 Marek Polacek <polacek@redhat.com>
+
+ * c-common.h (c_expand_expr): Remove declaration.
+
+2014-03-28 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/60689
+ * c-common.c (add_atomic_size_parameter): When creating new
+ params vector, push the size argument first.
+
+2014-03-26 Jakub Jelinek <jakub@redhat.com>
+
+ * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
+ ubsan_instrument_vla, ubsan_instrument_return): Adjust
+ ubsan_create_data callers.
+
2014-03-22 Jakub Jelinek <jakub@redhat.com>
PR debug/60603
diff --git a/gcc-4.9/gcc/c-family/c-common.c b/gcc-4.9/gcc/c-family/c-common.c
index abd96fbe9..03731b4b8 100644
--- a/gcc-4.9/gcc/c-family/c-common.c
+++ b/gcc-4.9/gcc/c-family/c-common.c
@@ -10453,6 +10453,7 @@ add_atomic_size_parameter (unsigned n, location_t loc, tree function,
len = params->length ();
vec_alloc (v, len + 1);
+ v->quick_push (build_int_cst (size_type_node, n));
for (z = 0; z < len; z++)
v->quick_push ((*params)[z]);
f = build_function_call_vec (loc, vNULL, function, v, NULL);
diff --git a/gcc-4.9/gcc/c-family/c-common.h b/gcc-4.9/gcc/c-family/c-common.h
index 1099b1089..24959d83e 100644
--- a/gcc-4.9/gcc/c-family/c-common.h
+++ b/gcc-4.9/gcc/c-family/c-common.h
@@ -928,8 +928,6 @@ extern bool vector_targets_convertible_p (const_tree t1, const_tree t2);
extern bool vector_types_convertible_p (const_tree t1, const_tree t2, bool emit_lax_note);
extern tree c_build_vec_perm_expr (location_t, tree, tree, tree, bool = true);
-extern rtx c_expand_expr (tree, rtx, enum machine_mode, int, rtx *);
-
extern void init_c_lex (void);
extern void c_cpp_builtins (cpp_reader *);
diff --git a/gcc-4.9/gcc/c-family/c-ubsan.c b/gcc-4.9/gcc/c-family/c-ubsan.c
index 610c010bd..e89ebc187 100644
--- a/gcc-4.9/gcc/c-family/c-ubsan.c
+++ b/gcc-4.9/gcc/c-family/c-ubsan.c
@@ -29,6 +29,7 @@ along with GCC; see the file COPYING3. If not see
#include "ubsan.h"
#include "c-family/c-common.h"
#include "c-family/c-ubsan.h"
+#include "asan.h"
/* Instrument division by zero and INT_MIN / -1. If not instrumenting,
return NULL_TREE. */
@@ -73,7 +74,7 @@ ubsan_instrument_division (location_t loc, tree op0, tree op1)
make sure it gets evaluated before the condition. */
t = fold_build2 (COMPOUND_EXPR, TREE_TYPE (t), op0, t);
tree data = ubsan_create_data ("__ubsan_overflow_data",
- loc, NULL,
+ &loc, NULL,
ubsan_type_descriptor (type, false),
NULL_TREE);
data = build_fold_addr_expr_loc (loc, data);
@@ -142,7 +143,7 @@ ubsan_instrument_shift (location_t loc, enum tree_code code,
make sure it gets evaluated before the condition. */
t = fold_build2 (COMPOUND_EXPR, TREE_TYPE (t), op0, t);
tree data = ubsan_create_data ("__ubsan_shift_data",
- loc, NULL,
+ &loc, NULL,
ubsan_type_descriptor (type0, false),
ubsan_type_descriptor (type1, false),
NULL_TREE);
@@ -169,7 +170,7 @@ ubsan_instrument_vla (location_t loc, tree size)
t = fold_build2 (LE_EXPR, boolean_type_node, size, build_int_cst (type, 0));
tree data = ubsan_create_data ("__ubsan_vla_data",
- loc, NULL,
+ &loc, NULL,
ubsan_type_descriptor (type, false),
NULL_TREE);
data = build_fold_addr_expr_loc (loc, data);
@@ -185,7 +186,11 @@ ubsan_instrument_vla (location_t loc, tree size)
tree
ubsan_instrument_return (location_t loc)
{
- tree data = ubsan_create_data ("__ubsan_missing_return_data", loc,
+ /* It is possible that PCH zapped table with definitions of sanitizer
+ builtins. Reinitialize them if needed. */
+ initialize_sanitizer_builtins ();
+
+ tree data = ubsan_create_data ("__ubsan_missing_return_data", &loc,
NULL, NULL_TREE);
tree t = builtin_decl_explicit (BUILT_IN_UBSAN_HANDLE_MISSING_RETURN);
return build_call_expr_loc (loc, t, 1, build_fold_addr_expr_loc (loc, data));
diff --git a/gcc-4.9/gcc/c-family/c.opt b/gcc-4.9/gcc/c-family/c.opt
index 7d0a2cd4a..2abf66cb7 100644
--- a/gcc-4.9/gcc/c-family/c.opt
+++ b/gcc-4.9/gcc/c-family/c.opt
@@ -569,7 +569,7 @@ C++ ObjC++ Var(warn_nontemplate_friend) Init(1) Warning
Warn when non-templatized friend functions are declared within a template
Wnon-virtual-dtor
-C++ ObjC++ Var(warn_nonvdtor) Warning
+C++ ObjC++ Var(warn_nonvdtor) Warning LangEnabledBy(C++ ObjC++,Weffc++)
Warn about non-virtual destructors
Wnonnull
diff --git a/gcc-4.9/gcc/c-family/cilk.c b/gcc-4.9/gcc/c-family/cilk.c
index 6a7bf4f1e..bf549ad17 100644
--- a/gcc-4.9/gcc/c-family/cilk.c
+++ b/gcc-4.9/gcc/c-family/cilk.c
@@ -99,7 +99,6 @@ cilk_set_spawn_marker (location_t loc, tree fcall)
it. */
return false;
else if (TREE_CODE (fcall) != CALL_EXPR
- && TREE_CODE (fcall) != FUNCTION_DECL
/* In C++, TARGET_EXPR is generated when we have an overloaded
'=' operator. */
&& TREE_CODE (fcall) != TARGET_EXPR)
diff --git a/gcc-4.9/gcc/c/ChangeLog b/gcc-4.9/gcc/c/ChangeLog
index b39b7d654..f5e7179e9 100644
--- a/gcc-4.9/gcc/c/ChangeLog
+++ b/gcc-4.9/gcc/c/ChangeLog
@@ -1,3 +1,30 @@
+2014-04-22 Release Manager
+
+ * GCC 4.9.0 released.
+
+2014-04-15 Igor Zamyatin <igor.zamyatin@intel.com>
+
+ PR middle-end/60469
+ * c-array-notation.c (fix_builtin_array_notation_fn): Use
+ create_tmp_var instead build_decl for creating temps.
+ (build_array_notation_expr): Likewise.
+ (fix_conditional_array_notations_1): Likewise.
+ (fix_array_notation_expr): Likewise.
+ (fix_array_notation_call_expr): Likewise.
+
+2014-03-28 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/60689
+ * c-tree.h (c_build_function_call_vec): New prototype.
+ * c-typeck.c (build_function_call_vec): Don't call
+ resolve_overloaded_builtin here.
+ (c_build_function_call_vec): New wrapper function around
+ build_function_call_vec. Call resolve_overloaded_builtin here.
+ (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
+ Call c_build_function_call_vec instead of build_function_call_vec.
+ * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
+ * c-decl.c (finish_decl): Likewise.
+
2014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR c/55383
diff --git a/gcc-4.9/gcc/c/c-array-notation.c b/gcc-4.9/gcc/c/c-array-notation.c
index 6a5631c3b..0ac6ba8e1 100644
--- a/gcc-4.9/gcc/c/c-array-notation.c
+++ b/gcc-4.9/gcc/c/c-array-notation.c
@@ -70,6 +70,7 @@
#include "coretypes.h"
#include "tree.h"
#include "c-tree.h"
+#include "gimple-expr.h"
#include "tree-iterator.h"
#include "opts.h"
#include "c-family/c-common.h"
@@ -282,8 +283,7 @@ fix_builtin_array_notation_fn (tree an_builtin_fn, tree *new_var)
for (ii = 0; ii < rank; ii++)
{
- an_loop_info[ii].var = build_decl (location, VAR_DECL, NULL_TREE,
- integer_type_node);
+ an_loop_info[ii].var = create_tmp_var (integer_type_node, NULL);
an_loop_info[ii].ind_init =
build_modify_expr (location, an_loop_info[ii].var,
TREE_TYPE (an_loop_info[ii].var), NOP_EXPR,
@@ -781,8 +781,8 @@ build_array_notation_expr (location_t location, tree lhs, tree lhs_origtype,
for (ii = 0; ii < lhs_rank; ii++)
if (lhs_an_info[0][ii].is_vector)
{
- lhs_an_loop_info[ii].var = build_decl (location, VAR_DECL, NULL_TREE,
- integer_type_node);
+ lhs_an_loop_info[ii].var = create_tmp_var (integer_type_node,
+ NULL);
lhs_an_loop_info[ii].ind_init = build_modify_expr
(location, lhs_an_loop_info[ii].var,
TREE_TYPE (lhs_an_loop_info[ii].var), NOP_EXPR,
@@ -793,8 +793,8 @@ build_array_notation_expr (location_t location, tree lhs, tree lhs_origtype,
{
/* When we have a polynomial, we assume that the indices are of type
integer. */
- rhs_an_loop_info[ii].var = build_decl (location, VAR_DECL, NULL_TREE,
- integer_type_node);
+ rhs_an_loop_info[ii].var = create_tmp_var (integer_type_node,
+ NULL);
rhs_an_loop_info[ii].ind_init = build_modify_expr
(location, rhs_an_loop_info[ii].var,
TREE_TYPE (rhs_an_loop_info[ii].var), NOP_EXPR,
@@ -970,8 +970,7 @@ fix_conditional_array_notations_1 (tree stmt)
cilkplus_extract_an_triplets (array_list, list_size, rank, &an_info);
for (ii = 0; ii < rank; ii++)
{
- an_loop_info[ii].var = build_decl (location, VAR_DECL, NULL_TREE,
- integer_type_node);
+ an_loop_info[ii].var = create_tmp_var (integer_type_node, NULL);
an_loop_info[ii].ind_init =
build_modify_expr (location, an_loop_info[ii].var,
TREE_TYPE (an_loop_info[ii].var), NOP_EXPR,
@@ -1067,8 +1066,7 @@ fix_array_notation_expr (location_t location, enum tree_code code,
loop_init = push_stmt_list ();
for (ii = 0; ii < rank; ii++)
{
- an_loop_info[ii].var = build_decl (location, VAR_DECL, NULL_TREE,
- integer_type_node);
+ an_loop_info[ii].var = create_tmp_var (integer_type_node, NULL);
an_loop_info[ii].ind_init =
build_modify_expr (location, an_loop_info[ii].var,
TREE_TYPE (an_loop_info[ii].var), NOP_EXPR,
@@ -1163,8 +1161,7 @@ fix_array_notation_call_expr (tree arg)
}
for (ii = 0; ii < rank; ii++)
{
- an_loop_info[ii].var = build_decl (location, VAR_DECL, NULL_TREE,
- integer_type_node);
+ an_loop_info[ii].var = create_tmp_var (integer_type_node, NULL);
an_loop_info[ii].ind_init =
build_modify_expr (location, an_loop_info[ii].var,
TREE_TYPE (an_loop_info[ii].var), NOP_EXPR, location,
diff --git a/gcc-4.9/gcc/c/c-decl.c b/gcc-4.9/gcc/c/c-decl.c
index 2c41bf2ce..df84980e3 100644
--- a/gcc-4.9/gcc/c/c-decl.c
+++ b/gcc-4.9/gcc/c/c-decl.c
@@ -4568,8 +4568,8 @@ finish_decl (tree decl, location_t init_loc, tree init,
cleanup = build_unary_op (input_location, ADDR_EXPR, decl, 0);
vec_alloc (v, 1);
v->quick_push (cleanup);
- cleanup = build_function_call_vec (DECL_SOURCE_LOCATION (decl),
- vNULL, cleanup_decl, v, NULL);
+ cleanup = c_build_function_call_vec (DECL_SOURCE_LOCATION (decl),
+ vNULL, cleanup_decl, v, NULL);
vec_free (v);
/* Don't warn about decl unused; the cleanup uses it. */
diff --git a/gcc-4.9/gcc/c/c-parser.c b/gcc-4.9/gcc/c/c-parser.c
index d0d35c577..5653e49f4 100644
--- a/gcc-4.9/gcc/c/c-parser.c
+++ b/gcc-4.9/gcc/c/c-parser.c
@@ -7703,8 +7703,9 @@ c_parser_postfix_expression_after_primary (c_parser *parser,
expr.value, exprlist,
sizeof_arg,
sizeof_ptr_memacc_comptypes);
- expr.value = build_function_call_vec (expr_loc, arg_loc, expr.value,
- exprlist, origtypes);
+ expr.value
+ = c_build_function_call_vec (expr_loc, arg_loc, expr.value,
+ exprlist, origtypes);
expr.original_code = ERROR_MARK;
if (TREE_CODE (expr.value) == INTEGER_CST
&& TREE_CODE (orig_expr.value) == FUNCTION_DECL
diff --git a/gcc-4.9/gcc/c/c-tree.h b/gcc-4.9/gcc/c/c-tree.h
index 84d5e0b08..85df8858d 100644
--- a/gcc-4.9/gcc/c/c-tree.h
+++ b/gcc-4.9/gcc/c/c-tree.h
@@ -643,6 +643,8 @@ extern tree c_finish_omp_clauses (tree);
extern tree c_build_va_arg (location_t, tree, tree);
extern tree c_finish_transaction (location_t, tree, int);
extern bool c_tree_equal (tree, tree);
+extern tree c_build_function_call_vec (location_t, vec<location_t>, tree,
+ vec<tree, va_gc> *, vec<tree, va_gc> *);
/* Set to 0 at beginning of a function definition, set to 1 if
a return statement that specifies a return value is seen. */
diff --git a/gcc-4.9/gcc/c/c-typeck.c b/gcc-4.9/gcc/c/c-typeck.c
index 0bfc12bea..65aad4565 100644
--- a/gcc-4.9/gcc/c/c-typeck.c
+++ b/gcc-4.9/gcc/c/c-typeck.c
@@ -2016,7 +2016,7 @@ convert_lvalue_to_rvalue (location_t loc, struct c_expr exp,
params->quick_push (expr_addr);
params->quick_push (tmp_addr);
params->quick_push (seq_cst);
- func_call = build_function_call_vec (loc, vNULL, fndecl, params, NULL);
+ func_call = c_build_function_call_vec (loc, vNULL, fndecl, params, NULL);
/* EXPR is always read. */
mark_exp_read (exp.value);
@@ -2801,7 +2801,7 @@ build_function_call (location_t loc, tree function, tree params)
vec_alloc (v, list_length (params));
for (; params; params = TREE_CHAIN (params))
v->quick_push (TREE_VALUE (params));
- ret = build_function_call_vec (loc, vNULL, function, v, NULL);
+ ret = c_build_function_call_vec (loc, vNULL, function, v, NULL);
vec_free (v);
return ret;
}
@@ -2840,14 +2840,6 @@ build_function_call_vec (location_t loc, vec<location_t> arg_loc,
/* Convert anything with function type to a pointer-to-function. */
if (TREE_CODE (function) == FUNCTION_DECL)
{
- /* Implement type-directed function overloading for builtins.
- resolve_overloaded_builtin and targetm.resolve_overloaded_builtin
- handle all the type checking. The result is a complete expression
- that implements this function call. */
- tem = resolve_overloaded_builtin (loc, function, params);
- if (tem)
- return tem;
-
name = DECL_NAME (function);
if (flag_tm)
@@ -2970,6 +2962,30 @@ build_function_call_vec (location_t loc, vec<location_t> arg_loc,
}
return require_complete_type (result);
}
+
+/* Like build_function_call_vec, but call also resolve_overloaded_builtin. */
+
+tree
+c_build_function_call_vec (location_t loc, vec<location_t> arg_loc,
+ tree function, vec<tree, va_gc> *params,
+ vec<tree, va_gc> *origtypes)
+{
+ /* Strip NON_LVALUE_EXPRs, etc., since we aren't using as an lvalue. */
+ STRIP_TYPE_NOPS (function);
+
+ /* Convert anything with function type to a pointer-to-function. */
+ if (TREE_CODE (function) == FUNCTION_DECL)
+ {
+ /* Implement type-directed function overloading for builtins.
+ resolve_overloaded_builtin and targetm.resolve_overloaded_builtin
+ handle all the type checking. The result is a complete expression
+ that implements this function call. */
+ tree tem = resolve_overloaded_builtin (loc, function, params);
+ if (tem)
+ return tem;
+ }
+ return build_function_call_vec (loc, arg_loc, function, params, origtypes);
+}
/* Convert the argument expressions in the vector VALUES
to the types in the list TYPELIST.
@@ -3634,7 +3650,7 @@ build_atomic_assign (location_t loc, tree lhs, enum tree_code modifycode,
params->quick_push (lhs_addr);
params->quick_push (rhs);
params->quick_push (seq_cst);
- func_call = build_function_call_vec (loc, vNULL, fndecl, params, NULL);
+ func_call = c_build_function_call_vec (loc, vNULL, fndecl, params, NULL);
add_stmt (func_call);
/* Finish the compound statement. */
@@ -3666,7 +3682,7 @@ build_atomic_assign (location_t loc, tree lhs, enum tree_code modifycode,
params->quick_push (lhs_addr);
params->quick_push (old_addr);
params->quick_push (seq_cst);
- func_call = build_function_call_vec (loc, vNULL, fndecl, params, NULL);
+ func_call = c_build_function_call_vec (loc, vNULL, fndecl, params, NULL);
add_stmt (func_call);
params->truncate (0);
@@ -3705,7 +3721,7 @@ build_atomic_assign (location_t loc, tree lhs, enum tree_code modifycode,
params->quick_push (integer_zero_node);
params->quick_push (seq_cst);
params->quick_push (seq_cst);
- func_call = build_function_call_vec (loc, vNULL, fndecl, params, NULL);
+ func_call = c_build_function_call_vec (loc, vNULL, fndecl, params, NULL);
goto_stmt = build1 (GOTO_EXPR, void_type_node, done_decl);
SET_EXPR_LOCATION (goto_stmt, loc);
diff --git a/gcc-4.9/gcc/cgraph.c b/gcc-4.9/gcc/cgraph.c
index abfd63c99..be3661af6 100644
--- a/gcc-4.9/gcc/cgraph.c
+++ b/gcc-4.9/gcc/cgraph.c
@@ -61,6 +61,8 @@ along with GCC; see the file COPYING3. If not see
#include "ipa-inline.h"
#include "cfgloop.h"
#include "gimple-pretty-print.h"
+#include "expr.h"
+#include "tree-dfa.h"
/* FIXME: Only for PROP_loops, but cgraph shouldn't have to know about this. */
#include "tree-pass.h"
@@ -1329,6 +1331,7 @@ gimple
cgraph_redirect_edge_call_stmt_to_callee (struct cgraph_edge *e)
{
tree decl = gimple_call_fndecl (e->call_stmt);
+ tree lhs = gimple_call_lhs (e->call_stmt);
gimple new_stmt;
gimple_stmt_iterator gsi;
#ifdef ENABLE_CHECKING
@@ -1471,6 +1474,31 @@ cgraph_redirect_edge_call_stmt_to_callee (struct cgraph_edge *e)
update_stmt_fn (DECL_STRUCT_FUNCTION (e->caller->decl), new_stmt);
}
+ /* If the call becomes noreturn, remove the lhs. */
+ if (lhs && (gimple_call_flags (new_stmt) & ECF_NORETURN))
+ {
+ if (TREE_CODE (lhs) == SSA_NAME)
+ {
+ tree var = create_tmp_reg_fn (DECL_STRUCT_FUNCTION (e->caller->decl),
+ TREE_TYPE (lhs), NULL);
+ var = get_or_create_ssa_default_def
+ (DECL_STRUCT_FUNCTION (e->caller->decl), var);
+ gimple set_stmt = gimple_build_assign (lhs, var);
+ gsi = gsi_for_stmt (new_stmt);
+ gsi_insert_before_without_update (&gsi, set_stmt, GSI_SAME_STMT);
+ update_stmt_fn (DECL_STRUCT_FUNCTION (e->caller->decl), set_stmt);
+ }
+ gimple_call_set_lhs (new_stmt, NULL_TREE);
+ update_stmt_fn (DECL_STRUCT_FUNCTION (e->caller->decl), new_stmt);
+ }
+
+ /* If new callee has no static chain, remove it. */
+ if (gimple_call_chain (new_stmt) && !DECL_STATIC_CHAIN (e->callee->decl))
+ {
+ gimple_call_set_chain (new_stmt, NULL);
+ update_stmt_fn (DECL_STRUCT_FUNCTION (e->caller->decl), new_stmt);
+ }
+
cgraph_set_call_stmt_including_clones (e->caller, e->call_stmt, new_stmt, false);
if (cgraph_dump_file)
@@ -2516,12 +2544,34 @@ collect_callers_of_node (struct cgraph_node *node)
return redirect_callers;
}
-/* Return TRUE if NODE2 is equivalent to NODE or its clone. */
+/* Return TRUE if NODE2 a clone of NODE or is equivalent to it. */
+
static bool
clone_of_p (struct cgraph_node *node, struct cgraph_node *node2)
{
+ bool skipped_thunk = false;
node = cgraph_function_or_thunk_node (node, NULL);
node2 = cgraph_function_or_thunk_node (node2, NULL);
+
+ /* There are no virtual clones of thunks so check former_clone_of or if we
+ might have skipped thunks because this adjustments are no longer
+ necessary. */
+ while (node->thunk.thunk_p)
+ {
+ if (node2->former_clone_of == node->decl)
+ return true;
+ if (!node->thunk.this_adjusting)
+ return false;
+ node = cgraph_function_or_thunk_node (node->callees->callee, NULL);
+ skipped_thunk = true;
+ }
+
+ if (skipped_thunk
+ && (!node2->clone_of
+ || !node2->clone.args_to_skip
+ || !bitmap_bit_p (node2->clone.args_to_skip, 0)))
+ return false;
+
while (node != node2 && node2)
node2 = node2->clone_of;
return node2 != NULL;
@@ -2612,13 +2662,17 @@ verify_edge_corresponds_to_fndecl (struct cgraph_edge *e, tree decl)
|| node->in_other_partition
|| e->callee->in_other_partition)
return false;
+
+ /* Optimizers can redirect unreachable calls or calls triggering undefined
+ behaviour to builtin_unreachable. */
+ if (DECL_BUILT_IN_CLASS (e->callee->decl) == BUILT_IN_NORMAL
+ && DECL_FUNCTION_CODE (e->callee->decl) == BUILT_IN_UNREACHABLE)
+ return false;
node = cgraph_function_or_thunk_node (node, NULL);
if (e->callee->former_clone_of != node->decl
- /* IPA-CP sometimes redirect edge to clone and then back to the former
- function. This ping-pong has to go, eventually. */
&& (node != cgraph_function_or_thunk_node (e->callee, NULL))
- && !clone_of_p (cgraph_function_or_thunk_node (node, NULL), e->callee))
+ && !clone_of_p (node, e->callee))
return true;
else
return false;
diff --git a/gcc-4.9/gcc/cgraph.h b/gcc-4.9/gcc/cgraph.h
index 59d9ce668..15310d888 100644
--- a/gcc-4.9/gcc/cgraph.h
+++ b/gcc-4.9/gcc/cgraph.h
@@ -890,7 +890,7 @@ struct cgraph_edge * cgraph_clone_edge (struct cgraph_edge *,
unsigned, gcov_type, int, bool);
struct cgraph_node * cgraph_clone_node (struct cgraph_node *, tree, gcov_type,
int, bool, vec<cgraph_edge_p>,
- bool, struct cgraph_node *);
+ bool, struct cgraph_node *, bitmap);
tree clone_function_name (tree decl, const char *);
struct cgraph_node * cgraph_create_virtual_clone (struct cgraph_node *old_node,
vec<cgraph_edge_p>,
diff --git a/gcc-4.9/gcc/cgraphclones.c b/gcc-4.9/gcc/cgraphclones.c
index ca69033dd..257939cb0 100644
--- a/gcc-4.9/gcc/cgraphclones.c
+++ b/gcc-4.9/gcc/cgraphclones.c
@@ -168,6 +168,212 @@ cgraph_clone_edge (struct cgraph_edge *e, struct cgraph_node *n,
return new_edge;
}
+/* Build variant of function type ORIG_TYPE skipping ARGS_TO_SKIP and the
+ return value if SKIP_RETURN is true. */
+
+static tree
+build_function_type_skip_args (tree orig_type, bitmap args_to_skip,
+ bool skip_return)
+{
+ tree new_type = NULL;
+ tree args, new_args = NULL, t;
+ tree new_reversed;
+ int i = 0;
+
+ for (args = TYPE_ARG_TYPES (orig_type); args && args != void_list_node;
+ args = TREE_CHAIN (args), i++)
+ if (!args_to_skip || !bitmap_bit_p (args_to_skip, i))
+ new_args = tree_cons (NULL_TREE, TREE_VALUE (args), new_args);
+
+ new_reversed = nreverse (new_args);
+ if (args)
+ {
+ if (new_reversed)
+ TREE_CHAIN (new_args) = void_list_node;
+ else
+ new_reversed = void_list_node;
+ }
+
+ /* Use copy_node to preserve as much as possible from original type
+ (debug info, attribute lists etc.)
+ Exception is METHOD_TYPEs must have THIS argument.
+ When we are asked to remove it, we need to build new FUNCTION_TYPE
+ instead. */
+ if (TREE_CODE (orig_type) != METHOD_TYPE
+ || !args_to_skip
+ || !bitmap_bit_p (args_to_skip, 0))
+ {
+ new_type = build_distinct_type_copy (orig_type);
+ TYPE_ARG_TYPES (new_type) = new_reversed;
+ }
+ else
+ {
+ new_type
+ = build_distinct_type_copy (build_function_type (TREE_TYPE (orig_type),
+ new_reversed));
+ TYPE_CONTEXT (new_type) = TYPE_CONTEXT (orig_type);
+ }
+
+ if (skip_return)
+ TREE_TYPE (new_type) = void_type_node;
+
+ /* This is a new type, not a copy of an old type. Need to reassociate
+ variants. We can handle everything except the main variant lazily. */
+ t = TYPE_MAIN_VARIANT (orig_type);
+ if (t != orig_type)
+ {
+ t = build_function_type_skip_args (t, args_to_skip, skip_return);
+ TYPE_MAIN_VARIANT (new_type) = t;
+ TYPE_NEXT_VARIANT (new_type) = TYPE_NEXT_VARIANT (t);
+ TYPE_NEXT_VARIANT (t) = new_type;
+ }
+ else
+ {
+ TYPE_MAIN_VARIANT (new_type) = new_type;
+ TYPE_NEXT_VARIANT (new_type) = NULL;
+ }
+
+ return new_type;
+}
+
+/* Build variant of function decl ORIG_DECL skipping ARGS_TO_SKIP and the
+ return value if SKIP_RETURN is true.
+
+ Arguments from DECL_ARGUMENTS list can't be removed now, since they are
+ linked by TREE_CHAIN directly. The caller is responsible for eliminating
+ them when they are being duplicated (i.e. copy_arguments_for_versioning). */
+
+static tree
+build_function_decl_skip_args (tree orig_decl, bitmap args_to_skip,
+ bool skip_return)
+{
+ tree new_decl = copy_node (orig_decl);
+ tree new_type;
+
+ new_type = TREE_TYPE (orig_decl);
+ if (prototype_p (new_type)
+ || (skip_return && !VOID_TYPE_P (TREE_TYPE (new_type))))
+ new_type
+ = build_function_type_skip_args (new_type, args_to_skip, skip_return);
+ TREE_TYPE (new_decl) = new_type;
+
+ /* For declarations setting DECL_VINDEX (i.e. methods)
+ we expect first argument to be THIS pointer. */
+ if (args_to_skip && bitmap_bit_p (args_to_skip, 0))
+ DECL_VINDEX (new_decl) = NULL_TREE;
+
+ /* When signature changes, we need to clear builtin info. */
+ if (DECL_BUILT_IN (new_decl)
+ && args_to_skip
+ && !bitmap_empty_p (args_to_skip))
+ {
+ DECL_BUILT_IN_CLASS (new_decl) = NOT_BUILT_IN;
+ DECL_FUNCTION_CODE (new_decl) = (enum built_in_function) 0;
+ }
+ /* The FE might have information and assumptions about the other
+ arguments. */
+ DECL_LANG_SPECIFIC (new_decl) = NULL;
+ return new_decl;
+}
+
+/* Set flags of NEW_NODE and its decl. NEW_NODE is a newly created private
+ clone or its thunk. */
+
+static void
+set_new_clone_decl_and_node_flags (cgraph_node *new_node)
+{
+ DECL_EXTERNAL (new_node->decl) = 0;
+ DECL_COMDAT_GROUP (new_node->decl) = 0;
+ TREE_PUBLIC (new_node->decl) = 0;
+ DECL_COMDAT (new_node->decl) = 0;
+ DECL_WEAK (new_node->decl) = 0;
+ DECL_VIRTUAL_P (new_node->decl) = 0;
+ DECL_STATIC_CONSTRUCTOR (new_node->decl) = 0;
+ DECL_STATIC_DESTRUCTOR (new_node->decl) = 0;
+
+ new_node->externally_visible = 0;
+ new_node->local.local = 1;
+ new_node->lowered = true;
+}
+
+/* Duplicate thunk THUNK if necessary but make it to refer to NODE.
+ ARGS_TO_SKIP, if non-NULL, determines which parameters should be omitted.
+ Function can return NODE if no thunk is necessary, which can happen when
+ thunk is this_adjusting but we are removing this parameter. */
+
+static cgraph_node *
+duplicate_thunk_for_node (cgraph_node *thunk, cgraph_node *node,
+ bitmap args_to_skip)
+{
+ cgraph_node *new_thunk, *thunk_of;
+ thunk_of = cgraph_function_or_thunk_node (thunk->callees->callee);
+
+ if (thunk_of->thunk.thunk_p)
+ node = duplicate_thunk_for_node (thunk_of, node, args_to_skip);
+
+ struct cgraph_edge *cs;
+ for (cs = node->callers; cs; cs = cs->next_caller)
+ if (cs->caller->thunk.thunk_p
+ && cs->caller->thunk.this_adjusting == thunk->thunk.this_adjusting
+ && cs->caller->thunk.fixed_offset == thunk->thunk.fixed_offset
+ && cs->caller->thunk.virtual_offset_p == thunk->thunk.virtual_offset_p
+ && cs->caller->thunk.virtual_value == thunk->thunk.virtual_value)
+ return cs->caller;
+
+ tree new_decl;
+ if (!args_to_skip)
+ new_decl = copy_node (thunk->decl);
+ else
+ {
+ /* We do not need to duplicate this_adjusting thunks if we have removed
+ this. */
+ if (thunk->thunk.this_adjusting
+ && bitmap_bit_p (args_to_skip, 0))
+ return node;
+
+ new_decl = build_function_decl_skip_args (thunk->decl, args_to_skip,
+ false);
+ }
+ gcc_checking_assert (!DECL_STRUCT_FUNCTION (new_decl));
+ gcc_checking_assert (!DECL_INITIAL (new_decl));
+ gcc_checking_assert (!DECL_RESULT (new_decl));
+ gcc_checking_assert (!DECL_RTL_SET_P (new_decl));
+
+ DECL_NAME (new_decl) = clone_function_name (thunk->decl, "artificial_thunk");
+ SET_DECL_ASSEMBLER_NAME (new_decl, DECL_NAME (new_decl));
+ DECL_SECTION_NAME (new_decl) = NULL;
+
+ new_thunk = cgraph_create_node (new_decl);
+ set_new_clone_decl_and_node_flags (new_thunk);
+ new_thunk->definition = true;
+ new_thunk->thunk = thunk->thunk;
+ new_thunk->unique_name = in_lto_p;
+ new_thunk->former_clone_of = thunk->decl;
+
+ struct cgraph_edge *e = cgraph_create_edge (new_thunk, node, NULL, 0,
+ CGRAPH_FREQ_BASE);
+ e->call_stmt_cannot_inline_p = true;
+ cgraph_call_edge_duplication_hooks (thunk->callees, e);
+ if (!expand_thunk (new_thunk, false))
+ new_thunk->analyzed = true;
+ cgraph_call_node_duplication_hooks (thunk, new_thunk);
+ return new_thunk;
+}
+
+/* If E does not lead to a thunk, simply redirect it to N. Otherwise create
+ one or more equivalent thunks for N and redirect E to the first in the
+ chain. */
+
+void
+redirect_edge_duplicating_thunks (struct cgraph_edge *e, struct cgraph_node *n,
+ bitmap args_to_skip)
+{
+ cgraph_node *orig_to = cgraph_function_or_thunk_node (e->callee);
+ if (orig_to->thunk.thunk_p)
+ n = duplicate_thunk_for_node (orig_to, n, args_to_skip);
+
+ cgraph_redirect_edge_callee (e, n);
+}
/* Create node representing clone of N executed COUNT times. Decrease
the execution counts from original node too.
@@ -190,7 +396,8 @@ cgraph_clone_node (struct cgraph_node *n, tree decl, gcov_type count, int freq,
bool update_original,
vec<cgraph_edge_p> redirect_callers,
bool call_duplication_hook,
- struct cgraph_node *new_inlined_to)
+ struct cgraph_node *new_inlined_to,
+ bitmap args_to_skip)
{
struct cgraph_node *new_node = cgraph_create_empty_node ();
struct cgraph_edge *e;
@@ -238,8 +445,12 @@ cgraph_clone_node (struct cgraph_node *n, tree decl, gcov_type count, int freq,
FOR_EACH_VEC_ELT (redirect_callers, i, e)
{
/* Redirect calls to the old version node to point to its new
- version. */
- cgraph_redirect_edge_callee (e, new_node);
+ version. The only exception is when the edge was proved to
+ be unreachable during the clonning procedure. */
+ if (!e->callee
+ || DECL_BUILT_IN_CLASS (e->callee->decl) != BUILT_IN_NORMAL
+ || DECL_FUNCTION_CODE (e->callee->decl) != BUILT_IN_UNREACHABLE)
+ redirect_edge_duplicating_thunks (e, new_node, args_to_skip);
}
@@ -288,114 +499,6 @@ clone_function_name (tree decl, const char *suffix)
return get_identifier (tmp_name);
}
-/* Build variant of function type ORIG_TYPE skipping ARGS_TO_SKIP and the
- return value if SKIP_RETURN is true. */
-
-static tree
-build_function_type_skip_args (tree orig_type, bitmap args_to_skip,
- bool skip_return)
-{
- tree new_type = NULL;
- tree args, new_args = NULL, t;
- tree new_reversed;
- int i = 0;
-
- for (args = TYPE_ARG_TYPES (orig_type); args && args != void_list_node;
- args = TREE_CHAIN (args), i++)
- if (!args_to_skip || !bitmap_bit_p (args_to_skip, i))
- new_args = tree_cons (NULL_TREE, TREE_VALUE (args), new_args);
-
- new_reversed = nreverse (new_args);
- if (args)
- {
- if (new_reversed)
- TREE_CHAIN (new_args) = void_list_node;
- else
- new_reversed = void_list_node;
- }
-
- /* Use copy_node to preserve as much as possible from original type
- (debug info, attribute lists etc.)
- Exception is METHOD_TYPEs must have THIS argument.
- When we are asked to remove it, we need to build new FUNCTION_TYPE
- instead. */
- if (TREE_CODE (orig_type) != METHOD_TYPE
- || !args_to_skip
- || !bitmap_bit_p (args_to_skip, 0))
- {
- new_type = build_distinct_type_copy (orig_type);
- TYPE_ARG_TYPES (new_type) = new_reversed;
- }
- else
- {
- new_type
- = build_distinct_type_copy (build_function_type (TREE_TYPE (orig_type),
- new_reversed));
- TYPE_CONTEXT (new_type) = TYPE_CONTEXT (orig_type);
- }
-
- if (skip_return)
- TREE_TYPE (new_type) = void_type_node;
-
- /* This is a new type, not a copy of an old type. Need to reassociate
- variants. We can handle everything except the main variant lazily. */
- t = TYPE_MAIN_VARIANT (orig_type);
- if (t != orig_type)
- {
- t = build_function_type_skip_args (t, args_to_skip, skip_return);
- TYPE_MAIN_VARIANT (new_type) = t;
- TYPE_NEXT_VARIANT (new_type) = TYPE_NEXT_VARIANT (t);
- TYPE_NEXT_VARIANT (t) = new_type;
- }
- else
- {
- TYPE_MAIN_VARIANT (new_type) = new_type;
- TYPE_NEXT_VARIANT (new_type) = NULL;
- }
-
- return new_type;
-}
-
-/* Build variant of function decl ORIG_DECL skipping ARGS_TO_SKIP and the
- return value if SKIP_RETURN is true.
-
- Arguments from DECL_ARGUMENTS list can't be removed now, since they are
- linked by TREE_CHAIN directly. The caller is responsible for eliminating
- them when they are being duplicated (i.e. copy_arguments_for_versioning). */
-
-static tree
-build_function_decl_skip_args (tree orig_decl, bitmap args_to_skip,
- bool skip_return)
-{
- tree new_decl = copy_node (orig_decl);
- tree new_type;
-
- new_type = TREE_TYPE (orig_decl);
- if (prototype_p (new_type)
- || (skip_return && !VOID_TYPE_P (TREE_TYPE (new_type))))
- new_type
- = build_function_type_skip_args (new_type, args_to_skip, skip_return);
- TREE_TYPE (new_decl) = new_type;
-
- /* For declarations setting DECL_VINDEX (i.e. methods)
- we expect first argument to be THIS pointer. */
- if (args_to_skip && bitmap_bit_p (args_to_skip, 0))
- DECL_VINDEX (new_decl) = NULL_TREE;
-
- /* When signature changes, we need to clear builtin info. */
- if (DECL_BUILT_IN (new_decl)
- && args_to_skip
- && !bitmap_empty_p (args_to_skip))
- {
- DECL_BUILT_IN_CLASS (new_decl) = NOT_BUILT_IN;
- DECL_FUNCTION_CODE (new_decl) = (enum built_in_function) 0;
- }
- /* The FE might have information and assumptions about the other
- arguments. */
- DECL_LANG_SPECIFIC (new_decl) = NULL;
- return new_decl;
-}
-
/* Create callgraph node clone with new declaration. The actual body will
be copied later at compilation stage.
@@ -449,22 +552,15 @@ cgraph_create_virtual_clone (struct cgraph_node *old_node,
new_node = cgraph_clone_node (old_node, new_decl, old_node->count,
CGRAPH_FREQ_BASE, false,
- redirect_callers, false, NULL);
+ redirect_callers, false, NULL, args_to_skip);
/* Update the properties.
Make clone visible only within this translation unit. Make sure
that is not weak also.
??? We cannot use COMDAT linkage because there is no
ABI support for this. */
- DECL_EXTERNAL (new_node->decl) = 0;
if (DECL_ONE_ONLY (old_decl))
DECL_SECTION_NAME (new_node->decl) = NULL;
- DECL_COMDAT_GROUP (new_node->decl) = 0;
- TREE_PUBLIC (new_node->decl) = 0;
- DECL_COMDAT (new_node->decl) = 0;
- DECL_WEAK (new_node->decl) = 0;
- DECL_VIRTUAL_P (new_node->decl) = 0;
- DECL_STATIC_CONSTRUCTOR (new_node->decl) = 0;
- DECL_STATIC_DESTRUCTOR (new_node->decl) = 0;
+ set_new_clone_decl_and_node_flags (new_node);
new_node->clone.tree_map = tree_map;
new_node->clone.args_to_skip = args_to_skip;
@@ -504,9 +600,6 @@ cgraph_create_virtual_clone (struct cgraph_node *old_node,
}
else
new_node->clone.combined_args_to_skip = args_to_skip;
- new_node->externally_visible = 0;
- new_node->local.local = 1;
- new_node->lowered = true;
cgraph_call_node_duplication_hooks (old_node, new_node);
diff --git a/gcc-4.9/gcc/cif-code.def b/gcc-4.9/gcc/cif-code.def
index 71f3e39a6..ce64d96b6 100644
--- a/gcc-4.9/gcc/cif-code.def
+++ b/gcc-4.9/gcc/cif-code.def
@@ -127,3 +127,7 @@ DEFCIFCODE(USES_COMDAT_LOCAL, CIF_FINAL_NORMAL,
/* We can't inline because of mismatched caller/callee attributes. */
DEFCIFCODE(ATTRIBUTE_MISMATCH, CIF_FINAL_NORMAL,
N_("function attribute mismatch"))
+
+/* We proved that the call is unreachable. */
+DEFCIFCODE(UNREACHABLE, CIF_FINAL_NORMAL,
+ N_("unreachable"))
diff --git a/gcc-4.9/gcc/combine.c b/gcc-4.9/gcc/combine.c
index fc473b63f..f7a279e86 100644
--- a/gcc-4.9/gcc/combine.c
+++ b/gcc-4.9/gcc/combine.c
@@ -446,7 +446,8 @@ 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_compare_const (enum rtx_code, rtx, rtx *);
+static enum rtx_code simplify_compare_const (enum rtx_code, enum machine_mode,
+ rtx, 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);
@@ -2949,7 +2950,7 @@ try_combine (rtx i3, rtx i2, rtx i1, rtx i0, int *new_direct_jump_p,
{
compare_code = orig_compare_code = GET_CODE (*cc_use_loc);
compare_code = simplify_compare_const (compare_code,
- op0, &op1);
+ GET_MODE (i2dest), op0, &op1);
target_canonicalize_comparison (&compare_code, &op0, &op1, 1);
}
@@ -10817,9 +10818,9 @@ gen_lowpart_for_combine (enum machine_mode omode, rtx x)
*POP1 may be updated. */
static enum rtx_code
-simplify_compare_const (enum rtx_code code, rtx op0, rtx *pop1)
+simplify_compare_const (enum rtx_code code, enum machine_mode mode,
+ rtx op0, rtx *pop1)
{
- enum machine_mode mode = GET_MODE (op0);
unsigned int mode_width = GET_MODE_PRECISION (mode);
HOST_WIDE_INT const_op = INTVAL (*pop1);
@@ -10835,7 +10836,7 @@ simplify_compare_const (enum rtx_code code, rtx op0, rtx *pop1)
if (const_op
&& (code == EQ || code == NE || code == GE || code == GEU
|| code == LT || code == LTU)
- && mode_width <= HOST_BITS_PER_WIDE_INT
+ && mode_width - 1 < HOST_BITS_PER_WIDE_INT
&& exact_log2 (const_op & GET_MODE_MASK (mode)) >= 0
&& (nonzero_bits (op0, mode)
== (unsigned HOST_WIDE_INT) (const_op & GET_MODE_MASK (mode))))
@@ -10882,7 +10883,7 @@ simplify_compare_const (enum rtx_code code, rtx op0, rtx *pop1)
/* If we are doing a <= 0 comparison on a value known to have
a zero sign bit, we can replace this with == 0. */
else if (const_op == 0
- && mode_width <= HOST_BITS_PER_WIDE_INT
+ && mode_width - 1 < HOST_BITS_PER_WIDE_INT
&& (nonzero_bits (op0, mode)
& ((unsigned HOST_WIDE_INT) 1 << (mode_width - 1)))
== 0)
@@ -10911,7 +10912,7 @@ simplify_compare_const (enum rtx_code code, rtx op0, rtx *pop1)
/* If we are doing a > 0 comparison on a value known to have
a zero sign bit, we can replace this with != 0. */
else if (const_op == 0
- && mode_width <= HOST_BITS_PER_WIDE_INT
+ && mode_width - 1 < HOST_BITS_PER_WIDE_INT
&& (nonzero_bits (op0, mode)
& ((unsigned HOST_WIDE_INT) 1 << (mode_width - 1)))
== 0)
@@ -10927,7 +10928,7 @@ simplify_compare_const (enum rtx_code code, rtx op0, rtx *pop1)
/* ... fall through ... */
}
/* (unsigned) < 0x80000000 is equivalent to >= 0. */
- else if (mode_width <= HOST_BITS_PER_WIDE_INT
+ else if (mode_width - 1 < HOST_BITS_PER_WIDE_INT
&& (unsigned HOST_WIDE_INT) const_op
== (unsigned HOST_WIDE_INT) 1 << (mode_width - 1))
{
@@ -10943,7 +10944,7 @@ simplify_compare_const (enum rtx_code code, rtx op0, rtx *pop1)
if (const_op == 0)
code = EQ;
/* (unsigned) <= 0x7fffffff is equivalent to >= 0. */
- else if (mode_width <= HOST_BITS_PER_WIDE_INT
+ else if (mode_width - 1 < HOST_BITS_PER_WIDE_INT
&& (unsigned HOST_WIDE_INT) const_op
== ((unsigned HOST_WIDE_INT) 1 << (mode_width - 1)) - 1)
{
@@ -10962,7 +10963,7 @@ simplify_compare_const (enum rtx_code code, rtx op0, rtx *pop1)
}
/* (unsigned) >= 0x80000000 is equivalent to < 0. */
- else if (mode_width <= HOST_BITS_PER_WIDE_INT
+ else if (mode_width - 1 < HOST_BITS_PER_WIDE_INT
&& (unsigned HOST_WIDE_INT) const_op
== (unsigned HOST_WIDE_INT) 1 << (mode_width - 1))
{
@@ -10978,7 +10979,7 @@ simplify_compare_const (enum rtx_code code, rtx op0, rtx *pop1)
if (const_op == 0)
code = NE;
/* (unsigned) > 0x7fffffff is equivalent to < 0. */
- else if (mode_width <= HOST_BITS_PER_WIDE_INT
+ else if (mode_width - 1 < HOST_BITS_PER_WIDE_INT
&& (unsigned HOST_WIDE_INT) const_op
== ((unsigned HOST_WIDE_INT) 1 << (mode_width - 1)) - 1)
{
@@ -11185,7 +11186,7 @@ simplify_comparison (enum rtx_code code, rtx *pop0, rtx *pop1)
/* Try to simplify the compare to constant, possibly changing the
comparison op, and/or changing op1 to zero. */
- code = simplify_compare_const (code, op0, &op1);
+ code = simplify_compare_const (code, mode, op0, &op1);
const_op = INTVAL (op1);
/* Compute some predicates to simplify code below. */
diff --git a/gcc-4.9/gcc/common.opt b/gcc-4.9/gcc/common.opt
index 62c72f0d2..2259f29d1 100644
--- a/gcc-4.9/gcc/common.opt
+++ b/gcc-4.9/gcc/common.opt
@@ -1267,6 +1267,10 @@ fgnu-tm
Common Report Var(flag_tm)
Enable support for GNU transactional memory
+fgnu-unique
+Common Report Var(flag_gnu_unique) Init(1)
+Use STB_GNU_UNIQUE if supported by the assembler
+
floop-flatten
Common Ignore
Does nothing. Preserved for backward compatibility.
diff --git a/gcc-4.9/gcc/config/aarch64/aarch64-simd.md b/gcc-4.9/gcc/config/aarch64/aarch64-simd.md
index 6048d605c..73aee2c3d 100644
--- a/gcc-4.9/gcc/config/aarch64/aarch64-simd.md
+++ b/gcc-4.9/gcc/config/aarch64/aarch64-simd.md
@@ -4250,7 +4250,7 @@
CRYPTO_AES))]
"TARGET_SIMD && TARGET_CRYPTO"
"aes<aes_op>\\t%0.16b, %2.16b"
- [(set_attr "type" "crypto_aes")]
+ [(set_attr "type" "crypto_aese")]
)
(define_insn "aarch64_crypto_aes<aesmc_op>v16qi"
@@ -4259,7 +4259,7 @@
CRYPTO_AESMC))]
"TARGET_SIMD && TARGET_CRYPTO"
"aes<aesmc_op>\\t%0.16b, %1.16b"
- [(set_attr "type" "crypto_aes")]
+ [(set_attr "type" "crypto_aesmc")]
)
;; sha1
diff --git a/gcc-4.9/gcc/config/aarch64/aarch64.c b/gcc-4.9/gcc/config/aarch64/aarch64.c
index ebd58c007..7b6c2b38e 100644
--- a/gcc-4.9/gcc/config/aarch64/aarch64.c
+++ b/gcc-4.9/gcc/config/aarch64/aarch64.c
@@ -315,10 +315,6 @@ static GTY(()) int gty_dummy;
#define AARCH64_NUM_BITMASKS 5334
static unsigned HOST_WIDE_INT aarch64_bitmasks[AARCH64_NUM_BITMASKS];
-/* Did we set flag_omit_frame_pointer just so
- aarch64_frame_pointer_required would be called? */
-static bool faked_omit_frame_pointer;
-
typedef enum aarch64_cond_code
{
AARCH64_EQ = 0, AARCH64_NE, AARCH64_CS, AARCH64_CC, AARCH64_MI, AARCH64_PL,
@@ -1694,17 +1690,15 @@ aarch64_frame_pointer_required (void)
if (cfun->calls_alloca)
return true;
- /* We may have turned flag_omit_frame_pointer on in order to have this
- function called; if we did, we also set the 'faked_omit_frame_pointer' flag
- and we'll check it here.
- If we really did set flag_omit_frame_pointer normally, then we return false
- (no frame pointer required) in all cases. */
+ /* In aarch64_override_options_after_change
+ flag_omit_leaf_frame_pointer turns off the frame pointer by
+ default. Turn it back on now if we've not got a leaf
+ function. */
+ if (flag_omit_leaf_frame_pointer
+ && (!crtl->is_leaf || df_regs_ever_live_p (LR_REGNUM)))
+ return true;
- if (flag_omit_frame_pointer && !faked_omit_frame_pointer)
- return false;
- else if (flag_omit_leaf_frame_pointer)
- return !crtl->is_leaf || df_regs_ever_live_p (LR_REGNUM);
- return true;
+ return false;
}
/* Mark the registers that need to be saved by the callee and calculate
@@ -3202,6 +3196,9 @@ aarch64_classify_address (struct aarch64_address_info *info,
}
else if (SYMBOL_REF_DECL (sym))
align = DECL_ALIGN (SYMBOL_REF_DECL (sym));
+ else if (SYMBOL_REF_HAS_BLOCK_INFO_P (sym)
+ && SYMBOL_REF_BLOCK (sym) != NULL)
+ align = SYMBOL_REF_BLOCK (sym)->alignment;
else
align = BITS_PER_UNIT;
@@ -4132,23 +4129,8 @@ aarch64_can_eliminate (const int from, const int to)
return true;
if (from == FRAME_POINTER_REGNUM && to == HARD_FRAME_POINTER_REGNUM)
return true;
- return false;
- }
- else
- {
- /* If we decided that we didn't need a leaf frame pointer but then used
- LR in the function, then we'll want a frame pointer after all, so
- prevent this elimination to ensure a frame pointer is used.
-
- NOTE: the original value of flag_omit_frame_pointer gets trashed
- IFF flag_omit_leaf_frame_pointer is true, so we check the value
- of faked_omit_frame_pointer here (which is true when we always
- wish to keep non-leaf frame pointers but only wish to keep leaf frame
- pointers when LR is clobbered). */
- if (to == STACK_POINTER_REGNUM
- && df_regs_ever_live_p (LR_REGNUM)
- && faked_omit_frame_pointer)
- return false;
+
+ return false;
}
return true;
@@ -4865,9 +4847,11 @@ aarch64_address_cost (rtx x ATTRIBUTE_UNUSED,
}
static int
-aarch64_register_move_cost (enum machine_mode mode ATTRIBUTE_UNUSED,
- reg_class_t from, reg_class_t to)
+aarch64_register_move_cost (enum machine_mode mode,
+ reg_class_t from_i, reg_class_t to_i)
{
+ enum reg_class from = (enum reg_class) from_i;
+ enum reg_class to = (enum reg_class) to_i;
const struct cpu_regmove_cost *regmove_cost
= aarch64_tune_params->regmove_cost;
@@ -4893,8 +4877,7 @@ aarch64_register_move_cost (enum machine_mode mode ATTRIBUTE_UNUSED,
secondary reload. A general register is used as a scratch to move
the upper DI value and the lower DI value is moved directly,
hence the cost is the sum of three moves. */
-
- if (! TARGET_SIMD && GET_MODE_SIZE (from) == 128 && GET_MODE_SIZE (to) == 128)
+ if (! TARGET_SIMD && GET_MODE_SIZE (mode) == 128)
return regmove_cost->GP2FP + regmove_cost->FP2GP + regmove_cost->FP2FP;
return regmove_cost->FP2FP;
@@ -5278,17 +5261,10 @@ aarch64_override_options (void)
static void
aarch64_override_options_after_change (void)
{
- faked_omit_frame_pointer = false;
-
- /* To omit leaf frame pointers, we need to turn flag_omit_frame_pointer on so
- that aarch64_frame_pointer_required will be called. We need to remember
- whether flag_omit_frame_pointer was turned on normally or just faked. */
-
- if (flag_omit_leaf_frame_pointer && !flag_omit_frame_pointer)
- {
- flag_omit_frame_pointer = true;
- faked_omit_frame_pointer = true;
- }
+ if (flag_omit_frame_pointer)
+ flag_omit_leaf_frame_pointer = false;
+ else if (flag_omit_leaf_frame_pointer)
+ flag_omit_frame_pointer = true;
}
static struct machine_function *
@@ -6566,7 +6542,9 @@ aarch64_simd_valid_immediate (rtx op, enum machine_mode mode, bool inverse,
/* Splat vector constant out into a byte vector. */
for (i = 0; i < n_elts; i++)
{
- rtx el = CONST_VECTOR_ELT (op, i);
+ /* The vector is provided in gcc endian-neutral fashion. For aarch64_be,
+ it must be laid out in the vector register in reverse order. */
+ rtx el = CONST_VECTOR_ELT (op, BYTES_BIG_ENDIAN ? (n_elts - 1 - i) : i);
unsigned HOST_WIDE_INT elpart;
unsigned int part, parts;
diff --git a/gcc-4.9/gcc/config/arm/aarch-common-protos.h b/gcc-4.9/gcc/config/arm/aarch-common-protos.h
index a5ff6b4f9..3e6e2429f 100644
--- a/gcc-4.9/gcc/config/arm/aarch-common-protos.h
+++ b/gcc-4.9/gcc/config/arm/aarch-common-protos.h
@@ -23,6 +23,7 @@
#ifndef GCC_AARCH_COMMON_PROTOS_H
#define GCC_AARCH_COMMON_PROTOS_H
+extern int aarch_crypto_can_dual_issue (rtx, rtx);
extern int arm_early_load_addr_dep (rtx, rtx);
extern int arm_early_store_addr_dep (rtx, rtx);
extern int arm_mac_accumulator_is_mul_result (rtx, rtx);
diff --git a/gcc-4.9/gcc/config/arm/aarch-common.c b/gcc-4.9/gcc/config/arm/aarch-common.c
index c11f7e954..af8fc9996 100644
--- a/gcc-4.9/gcc/config/arm/aarch-common.c
+++ b/gcc-4.9/gcc/config/arm/aarch-common.c
@@ -31,6 +31,42 @@
#include "c-family/c-common.h"
#include "rtl.h"
+/* In ARMv8-A there's a general expectation that AESE/AESMC
+ and AESD/AESIMC sequences of the form:
+
+ AESE Vn, _
+ AESMC Vn, Vn
+
+ will issue both instructions in a single cycle on super-scalar
+ implementations. This function identifies such pairs. */
+
+int
+aarch_crypto_can_dual_issue (rtx producer, rtx consumer)
+{
+ rtx producer_src, consumer_src;
+
+ producer = single_set (producer);
+ consumer = single_set (consumer);
+
+ producer_src = producer ? SET_SRC (producer) : NULL;
+ consumer_src = consumer ? SET_SRC (consumer) : NULL;
+
+ if (producer_src && consumer_src
+ && GET_CODE (producer_src) == UNSPEC && GET_CODE (consumer_src) == UNSPEC
+ && ((XINT (producer_src, 1) == UNSPEC_AESE
+ && XINT (consumer_src, 1) == UNSPEC_AESMC)
+ || (XINT (producer_src, 1) == UNSPEC_AESD
+ && XINT (consumer_src, 1) == UNSPEC_AESIMC)))
+ {
+ unsigned int regno = REGNO (SET_DEST (producer));
+
+ return REGNO (SET_DEST (consumer)) == regno
+ && REGNO (XVECEXP (consumer_src, 0, 0)) == regno;
+ }
+
+ return 0;
+}
+
typedef struct
{
rtx_code search_code;
diff --git a/gcc-4.9/gcc/config/arm/arm.c b/gcc-4.9/gcc/config/arm/arm.c
index 0240cc70e..e5cf50366 100644
--- a/gcc-4.9/gcc/config/arm/arm.c
+++ b/gcc-4.9/gcc/config/arm/arm.c
@@ -72,6 +72,7 @@ struct four_ints
};
/* Forward function declarations. */
+static bool arm_const_not_ok_for_debug_p (rtx);
static bool arm_lra_p (void);
static bool arm_needs_doubleword_align (enum machine_mode, const_tree);
static int arm_compute_static_chain_stack_bytes (void);
@@ -674,6 +675,9 @@ static const struct attribute_spec arm_attribute_table[] =
#undef TARGET_CAN_USE_DOLOOP_P
#define TARGET_CAN_USE_DOLOOP_P can_use_doloop_if_innermost
+#undef TARGET_CONST_NOT_OK_FOR_DEBUG_P
+#define TARGET_CONST_NOT_OK_FOR_DEBUG_P arm_const_not_ok_for_debug_p
+
struct gcc_target targetm = TARGET_INITIALIZER;
/* Obstack for minipool constant handling. */
@@ -31116,4 +31120,46 @@ arm_asan_shadow_offset (void)
return (unsigned HOST_WIDE_INT) 1 << 29;
}
+
+/* This is a temporary fix for PR60655. Ideally we need
+ to handle most of these cases in the generic part but
+ currently we reject minus (..) (sym_ref). We try to
+ ameliorate the case with minus (sym_ref1) (sym_ref2)
+ where they are in the same section. */
+
+static bool
+arm_const_not_ok_for_debug_p (rtx p)
+{
+ tree decl_op0 = NULL;
+ tree decl_op1 = NULL;
+
+ if (GET_CODE (p) == MINUS)
+ {
+ if (GET_CODE (XEXP (p, 1)) == SYMBOL_REF)
+ {
+ decl_op1 = SYMBOL_REF_DECL (XEXP (p, 1));
+ if (decl_op1
+ && GET_CODE (XEXP (p, 0)) == SYMBOL_REF
+ && (decl_op0 = SYMBOL_REF_DECL (XEXP (p, 0))))
+ {
+ if ((TREE_CODE (decl_op1) == VAR_DECL
+ || TREE_CODE (decl_op1) == CONST_DECL)
+ && (TREE_CODE (decl_op0) == VAR_DECL
+ || TREE_CODE (decl_op0) == CONST_DECL))
+ return (get_variable_section (decl_op1, false)
+ != get_variable_section (decl_op0, false));
+
+ if (TREE_CODE (decl_op1) == LABEL_DECL
+ && TREE_CODE (decl_op0) == LABEL_DECL)
+ return (DECL_CONTEXT (decl_op1)
+ != DECL_CONTEXT (decl_op0));
+ }
+
+ return true;
+ }
+ }
+
+ return false;
+}
+
#include "gt-arm.h"
diff --git a/gcc-4.9/gcc/config/arm/arm.h b/gcc-4.9/gcc/config/arm/arm.h
index 7ca47a7ec..597e69c6e 100644
--- a/gcc-4.9/gcc/config/arm/arm.h
+++ b/gcc-4.9/gcc/config/arm/arm.h
@@ -937,13 +937,13 @@ extern int arm_arch_crc;
#ifndef ARM_TARGET2_DWARF_FORMAT
#define ARM_TARGET2_DWARF_FORMAT DW_EH_PE_pcrel
+#endif
/* ttype entries (the only interesting data references used)
use TARGET2 relocations. */
#define ASM_PREFERRED_EH_DATA_FORMAT(code, data) \
(((code) == 0 && (data) == 1 && ARM_UNWIND_INFO) ? ARM_TARGET2_DWARF_FORMAT \
: DW_EH_PE_absptr)
-#endif
/* The native (Norcroft) Pascal compiler for the ARM passes the static chain
as an invisible last argument (possible since varargs don't exist in
@@ -2194,14 +2194,9 @@ extern int making_const_table;
#undef ASM_OUTPUT_BEFORE_CASE_LABEL
#define ASM_OUTPUT_BEFORE_CASE_LABEL(FILE, PREFIX, NUM, TABLE) /* Empty. */
-/* Make sure subsequent insns are aligned after a TBB. */
-#define ASM_OUTPUT_CASE_END(FILE, NUM, JUMPTABLE) \
- do \
- { \
- if (GET_MODE (PATTERN (JUMPTABLE)) == QImode) \
- ASM_OUTPUT_ALIGN (FILE, 1); \
- } \
- while (0)
+#define LABEL_ALIGN_AFTER_BARRIER(LABEL) \
+ (GET_CODE (PATTERN (prev_active_insn (LABEL))) == ADDR_DIFF_VEC \
+ ? 1 : 0)
#define ARM_DECLARE_FUNCTION_NAME(STREAM, NAME, DECL) \
do \
diff --git a/gcc-4.9/gcc/config/arm/arm.md b/gcc-4.9/gcc/config/arm/arm.md
index 2ddda0208..4b81ee272 100644
--- a/gcc-4.9/gcc/config/arm/arm.md
+++ b/gcc-4.9/gcc/config/arm/arm.md
@@ -262,105 +262,6 @@
; initialized by arm_option_override()
(define_attr "ldsched" "no,yes" (const (symbol_ref "arm_ld_sched")))
-; YES if the "type" attribute assigned to the insn denotes an
-; Advanced SIMD instruction, NO otherwise.
-(define_attr "is_neon_type" "yes,no"
- (if_then_else (eq_attr "type"
- "neon_add, neon_add_q, neon_add_widen, neon_add_long,\
- neon_qadd, neon_qadd_q, neon_add_halve, neon_add_halve_q,\
- neon_add_halve_narrow_q,\
- neon_sub, neon_sub_q, neon_sub_widen, neon_sub_long, neon_qsub,\
- neon_qsub_q, neon_sub_halve, neon_sub_halve_q,\
- neon_sub_halve_narrow_q,\
- neon_abs, neon_abs_q, neon_neg, neon_neg_q, neon_qneg,\
- neon_qneg_q, neon_qabs, neon_qabs_q, neon_abd, neon_abd_q,\
- neon_abd_long, neon_minmax, neon_minmax_q, neon_compare,\
- neon_compare_q, neon_compare_zero, neon_compare_zero_q,\
- neon_arith_acc, neon_arith_acc_q, neon_reduc_add,\
- neon_reduc_add_q, neon_reduc_add_long, neon_reduc_add_acc,\
- neon_reduc_add_acc_q, neon_reduc_minmax, neon_reduc_minmax_q,\
- neon_logic, neon_logic_q, neon_tst, neon_tst_q,\
- neon_shift_imm, neon_shift_imm_q, neon_shift_imm_narrow_q,\
- neon_shift_imm_long, neon_shift_reg, neon_shift_reg_q,\
- neon_shift_acc, neon_shift_acc_q, neon_sat_shift_imm,\
- neon_sat_shift_imm_q, neon_sat_shift_imm_narrow_q,\
- neon_sat_shift_reg, neon_sat_shift_reg_q,\
- neon_ins, neon_ins_q, neon_move, neon_move_q, neon_move_narrow_q,\
- neon_permute, neon_permute_q, neon_zip, neon_zip_q, neon_tbl1,\
- neon_tbl1_q, neon_tbl2, neon_tbl2_q, neon_tbl3, neon_tbl3_q,\
- neon_tbl4, neon_tbl4_q, neon_bsl, neon_bsl_q, neon_cls,\
- neon_cls_q, neon_cnt, neon_cnt_q, neon_dup, neon_dup_q,\
- neon_ext, neon_ext_q, neon_rbit, neon_rbit_q,\
- neon_rev, neon_rev_q, neon_mul_b, neon_mul_b_q, neon_mul_h,\
- neon_mul_h_q, neon_mul_s, neon_mul_s_q, neon_mul_b_long,\
- neon_mul_h_long, neon_mul_s_long, neon_mul_d_long, neon_mul_h_scalar,\
- neon_mul_h_scalar_q, neon_mul_s_scalar, neon_mul_s_scalar_q,\
- neon_mul_h_scalar_long, neon_mul_s_scalar_long, neon_sat_mul_b,\
- neon_sat_mul_b_q, neon_sat_mul_h, neon_sat_mul_h_q,\
- neon_sat_mul_s, neon_sat_mul_s_q, neon_sat_mul_b_long,\
- neon_sat_mul_h_long, neon_sat_mul_s_long, neon_sat_mul_h_scalar,\
- neon_sat_mul_h_scalar_q, neon_sat_mul_s_scalar,\
- neon_sat_mul_s_scalar_q, neon_sat_mul_h_scalar_long,\
- neon_sat_mul_s_scalar_long, neon_mla_b, neon_mla_b_q, neon_mla_h,\
- neon_mla_h_q, neon_mla_s, neon_mla_s_q, neon_mla_b_long,\
- neon_mla_h_long, neon_mla_s_long, neon_mla_h_scalar,\
- neon_mla_h_scalar_q, neon_mla_s_scalar, neon_mla_s_scalar_q,\
- neon_mla_h_scalar_long, neon_mla_s_scalar_long,\
- neon_sat_mla_b_long, neon_sat_mla_h_long,\
- neon_sat_mla_s_long, neon_sat_mla_h_scalar_long,\
- neon_sat_mla_s_scalar_long,\
- neon_to_gp, neon_to_gp_q, neon_from_gp, neon_from_gp_q,\
- neon_ldr, neon_load1_1reg, neon_load1_1reg_q, neon_load1_2reg,\
- neon_load1_2reg_q, neon_load1_3reg, neon_load1_3reg_q,\
- neon_load1_4reg, neon_load1_4reg_q, neon_load1_all_lanes,\
- neon_load1_all_lanes_q, neon_load1_one_lane, neon_load1_one_lane_q,\
- neon_load2_2reg, neon_load2_2reg_q, neon_load2_4reg,\
- neon_load2_4reg_q, neon_load2_all_lanes, neon_load2_all_lanes_q,\
- neon_load2_one_lane, neon_load2_one_lane_q,\
- neon_load3_3reg, neon_load3_3reg_q, neon_load3_all_lanes,\
- neon_load3_all_lanes_q, neon_load3_one_lane, neon_load3_one_lane_q,\
- neon_load4_4reg, neon_load4_4reg_q, neon_load4_all_lanes,\
- neon_load4_all_lanes_q, neon_load4_one_lane, neon_load4_one_lane_q,\
- neon_str, neon_store1_1reg, neon_store1_1reg_q, neon_store1_2reg,\
- neon_store1_2reg_q, neon_store1_3reg, neon_store1_3reg_q,\
- neon_store1_4reg, neon_store1_4reg_q, neon_store1_one_lane,\
- neon_store1_one_lane_q, neon_store2_2reg, neon_store2_2reg_q,\
- neon_store2_4reg, neon_store2_4reg_q, neon_store2_one_lane,\
- neon_store2_one_lane_q, neon_store3_3reg, neon_store3_3reg_q,\
- neon_store3_one_lane, neon_store3_one_lane_q, neon_store4_4reg,\
- neon_store4_4reg_q, neon_store4_one_lane, neon_store4_one_lane_q,\
- neon_fp_abd_s, neon_fp_abd_s_q, neon_fp_abd_d, neon_fp_abd_d_q,\
- neon_fp_addsub_s, neon_fp_addsub_s_q, neon_fp_addsub_d,\
- neon_fp_addsub_d_q, neon_fp_compare_s, neon_fp_compare_s_q,\
- neon_fp_compare_d, neon_fp_compare_d_q, neon_fp_minmax_s,\
- neon_fp_minmax_s_q, neon_fp_minmax_d, neon_fp_minmax_d_q,\
- neon_fp_reduc_add_s, neon_fp_reduc_add_s_q, neon_fp_reduc_add_d,\
- neon_fp_reduc_add_d_q, neon_fp_reduc_minmax_s,
- neon_fp_reduc_minmax_s_q, neon_fp_reduc_minmax_d,\
- neon_fp_reduc_minmax_d_q,\
- neon_fp_cvt_narrow_s_q, neon_fp_cvt_narrow_d_q,\
- neon_fp_cvt_widen_h, neon_fp_cvt_widen_s, neon_fp_to_int_s,\
- neon_fp_to_int_s_q, neon_int_to_fp_s, neon_int_to_fp_s_q,\
- neon_fp_round_s, neon_fp_round_s_q, neon_fp_recpe_s,\
- neon_fp_recpe_s_q,\
- neon_fp_recpe_d, neon_fp_recpe_d_q, neon_fp_recps_s,\
- neon_fp_recps_s_q, neon_fp_recps_d, neon_fp_recps_d_q,\
- neon_fp_recpx_s, neon_fp_recpx_s_q, neon_fp_recpx_d,\
- neon_fp_recpx_d_q, neon_fp_rsqrte_s, neon_fp_rsqrte_s_q,\
- neon_fp_rsqrte_d, neon_fp_rsqrte_d_q, neon_fp_rsqrts_s,\
- neon_fp_rsqrts_s_q, neon_fp_rsqrts_d, neon_fp_rsqrts_d_q,\
- neon_fp_mul_s, neon_fp_mul_s_q, neon_fp_mul_s_scalar,\
- neon_fp_mul_s_scalar_q, neon_fp_mul_d, neon_fp_mul_d_q,\
- neon_fp_mul_d_scalar_q, neon_fp_mla_s, neon_fp_mla_s_q,\
- neon_fp_mla_s_scalar, neon_fp_mla_s_scalar_q, neon_fp_mla_d,\
- neon_fp_mla_d_q, neon_fp_mla_d_scalar_q, neon_fp_sqrt_s,\
- neon_fp_sqrt_s_q, neon_fp_sqrt_d, neon_fp_sqrt_d_q,\
- neon_fp_div_s, neon_fp_div_s_q, neon_fp_div_d, neon_fp_div_d_q, crypto_aes,\
- crypto_sha1_xor, crypto_sha1_fast, crypto_sha1_slow, crypto_sha256_fast,\
- crypto_sha256_slow")
- (const_string "yes")
- (const_string "no")))
-
; condition codes: this one is used by final_prescan_insn to speed up
; conditionalizing instructions. It saves having to scan the rtl to see if
; it uses or alters the condition codes.
@@ -2883,8 +2784,8 @@
(define_insn "insv_zero"
[(set (zero_extract:SI (match_operand:SI 0 "s_register_operand" "+r")
- (match_operand:SI 1 "const_int_operand" "M")
- (match_operand:SI 2 "const_int_operand" "M"))
+ (match_operand:SI 1 "const_int_M_operand" "M")
+ (match_operand:SI 2 "const_int_M_operand" "M"))
(const_int 0))]
"arm_arch_thumb2"
"bfc%?\t%0, %2, %1"
@@ -2896,8 +2797,8 @@
(define_insn "insv_t2"
[(set (zero_extract:SI (match_operand:SI 0 "s_register_operand" "+r")
- (match_operand:SI 1 "const_int_operand" "M")
- (match_operand:SI 2 "const_int_operand" "M"))
+ (match_operand:SI 1 "const_int_M_operand" "M")
+ (match_operand:SI 2 "const_int_M_operand" "M"))
(match_operand:SI 3 "s_register_operand" "r"))]
"arm_arch_thumb2"
"bfi%?\t%0, %3, %2, %1"
@@ -4579,8 +4480,8 @@
(define_insn "*extv_reg"
[(set (match_operand:SI 0 "s_register_operand" "=r")
(sign_extract:SI (match_operand:SI 1 "s_register_operand" "r")
- (match_operand:SI 2 "const_int_operand" "M")
- (match_operand:SI 3 "const_int_operand" "M")))]
+ (match_operand:SI 2 "const_int_M_operand" "M")
+ (match_operand:SI 3 "const_int_M_operand" "M")))]
"arm_arch_thumb2"
"sbfx%?\t%0, %1, %3, %2"
[(set_attr "length" "4")
@@ -4592,8 +4493,8 @@
(define_insn "extzv_t2"
[(set (match_operand:SI 0 "s_register_operand" "=r")
(zero_extract:SI (match_operand:SI 1 "s_register_operand" "r")
- (match_operand:SI 2 "const_int_operand" "M")
- (match_operand:SI 3 "const_int_operand" "M")))]
+ (match_operand:SI 2 "const_int_M_operand" "M")
+ (match_operand:SI 3 "const_int_M_operand" "M")))]
"arm_arch_thumb2"
"ubfx%?\t%0, %1, %3, %2"
[(set_attr "length" "4")
@@ -12172,7 +12073,7 @@
[(match_parallel 0 "load_multiple_operation"
[(set (match_operand:SI 1 "s_register_operand" "+rk")
(plus:SI (match_dup 1)
- (match_operand:SI 2 "const_int_operand" "I")))
+ (match_operand:SI 2 "const_int_I_operand" "I")))
(set (match_operand:SI 3 "s_register_operand" "=rk")
(mem:SI (match_dup 1)))
])]
@@ -12201,7 +12102,7 @@
[(return)
(set (match_operand:SI 1 "s_register_operand" "+rk")
(plus:SI (match_dup 1)
- (match_operand:SI 2 "const_int_operand" "I")))
+ (match_operand:SI 2 "const_int_I_operand" "I")))
(set (match_operand:SI 3 "s_register_operand" "=rk")
(mem:SI (match_dup 1)))
])]
@@ -12254,7 +12155,7 @@
[(match_parallel 0 "pop_multiple_fp"
[(set (match_operand:SI 1 "s_register_operand" "+rk")
(plus:SI (match_dup 1)
- (match_operand:SI 2 "const_int_operand" "I")))
+ (match_operand:SI 2 "const_int_I_operand" "I")))
(set (match_operand:DF 3 "vfp_hard_register_operand" "")
(mem:DF (match_dup 1)))])]
"TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP"
diff --git a/gcc-4.9/gcc/config/arm/cortex-a53.md b/gcc-4.9/gcc/config/arm/cortex-a53.md
index deae8eba5..a629bd61d 100644
--- a/gcc-4.9/gcc/config/arm/cortex-a53.md
+++ b/gcc-4.9/gcc/config/arm/cortex-a53.md
@@ -61,6 +61,11 @@
(define_cpu_unit "cortex_a53_fp_div_sqrt" "cortex_a53")
+;; The Advanced SIMD pipelines.
+
+(define_cpu_unit "cortex_a53_simd0" "cortex_a53")
+(define_cpu_unit "cortex_a53_simd1" "cortex_a53")
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ALU instructions.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -240,12 +245,45 @@
(define_insn_reservation "cortex_a53_fdivs" 14
(and (eq_attr "tune" "cortexa53")
(eq_attr "type" "fdivs, fsqrts"))
- "cortex_a53_slot0, cortex_a53_fp_div_sqrt * 13")
+ "cortex_a53_slot0, cortex_a53_fp_div_sqrt * 5")
(define_insn_reservation "cortex_a53_fdivd" 29
(and (eq_attr "tune" "cortexa53")
(eq_attr "type" "fdivd, fsqrtd"))
- "cortex_a53_slot0, cortex_a53_fp_div_sqrt * 28")
+ "cortex_a53_slot0, cortex_a53_fp_div_sqrt * 8")
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; ARMv8-A Cryptographic extensions.
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(define_insn_reservation "cortex_a53_crypto_aese" 2
+ (and (eq_attr "tune" "cortexa53")
+ (eq_attr "type" "crypto_aese"))
+ "cortex_a53_simd0")
+
+(define_insn_reservation "cortex_a53_crypto_aesmc" 2
+ (and (eq_attr "tune" "cortexa53")
+ (eq_attr "type" "crypto_aesmc"))
+ "cortex_a53_simd0 | cortex_a53_simd1")
+
+(define_insn_reservation "cortex_a53_crypto_sha1_fast" 2
+ (and (eq_attr "tune" "cortexa53")
+ (eq_attr "type" "crypto_sha1_fast, crypto_sha256_fast"))
+ "cortex_a53_simd0")
+
+(define_insn_reservation "cortex_a53_crypto_sha1_xor" 3
+ (and (eq_attr "tune" "cortexa53")
+ (eq_attr "type" "crypto_sha1_xor"))
+ "cortex_a53_simd0")
+
+(define_insn_reservation "cortex_a53_crypto_sha_slow" 5
+ (and (eq_attr "tune" "cortexa53")
+ (eq_attr "type" "crypto_sha1_slow, crypto_sha256_slow"))
+ "cortex_a53_simd0")
+
+(define_bypass 0 "cortex_a53_crypto_aese"
+ "cortex_a53_crypto_aesmc"
+ "aarch_crypto_can_dual_issue")
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; VFP to/from core transfers.
@@ -284,6 +322,16 @@
(eq_attr "type" "f_loadd"))
"cortex_a53_slot0")
+(define_insn_reservation "cortex_a53_f_load_2reg" 5
+ (and (eq_attr "tune" "cortexa53")
+ (eq_attr "type" "neon_load2_2reg_q"))
+ "(cortex_a53_slot_any+cortex_a53_ls)*2")
+
+(define_insn_reservation "cortex_a53_f_loadq" 5
+ (and (eq_attr "tune" "cortexa53")
+ (eq_attr "type" "neon_load1_1reg_q"))
+ "cortex_a53_slot_any+cortex_a53_ls")
+
(define_insn_reservation "cortex_a53_f_stores" 0
(and (eq_attr "tune" "cortexa53")
(eq_attr "type" "f_stores"))
@@ -307,3 +355,11 @@
cortex_a53_fdivs, cortex_a53_fdivd,\
cortex_a53_f2r")
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; Crude Advanced SIMD approximation.
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(define_insn_reservation "cortex_53_advsimd" 4
+ (and (eq_attr "tune" "cortexa53")
+ (eq_attr "is_neon_type" "yes"))
+ "cortex_a53_simd0")
diff --git a/gcc-4.9/gcc/config/arm/iterators.md b/gcc-4.9/gcc/config/arm/iterators.md
index 33e09e4ce..aebab9340 100644
--- a/gcc-4.9/gcc/config/arm/iterators.md
+++ b/gcc-4.9/gcc/config/arm/iterators.md
@@ -551,8 +551,8 @@
(UNSPEC_SHA256SU1 "sha256su1")])
(define_int_attr crypto_type
- [(UNSPEC_AESE "crypto_aes") (UNSPEC_AESD "crypto_aes")
- (UNSPEC_AESMC "crypto_aes") (UNSPEC_AESIMC "crypto_aes")
+ [(UNSPEC_AESE "crypto_aese") (UNSPEC_AESD "crypto_aese")
+ (UNSPEC_AESMC "crypto_aesmc") (UNSPEC_AESIMC "crypto_aesmc")
(UNSPEC_SHA1C "crypto_sha1_slow") (UNSPEC_SHA1P "crypto_sha1_slow")
(UNSPEC_SHA1M "crypto_sha1_slow") (UNSPEC_SHA1SU1 "crypto_sha1_fast")
(UNSPEC_SHA1SU0 "crypto_sha1_xor") (UNSPEC_SHA256H "crypto_sha256_slow")
diff --git a/gcc-4.9/gcc/config/arm/predicates.md b/gcc-4.9/gcc/config/arm/predicates.md
index ce5c9a830..6273e8820 100644
--- a/gcc-4.9/gcc/config/arm/predicates.md
+++ b/gcc-4.9/gcc/config/arm/predicates.md
@@ -153,6 +153,14 @@
(ior (match_operand 0 "arm_rhs_operand")
(match_operand 0 "memory_operand")))
+(define_predicate "const_int_I_operand"
+ (and (match_operand 0 "const_int_operand")
+ (match_test "satisfies_constraint_I (op)")))
+
+(define_predicate "const_int_M_operand"
+ (and (match_operand 0 "const_int_operand")
+ (match_test "satisfies_constraint_M (op)")))
+
;; This doesn't have to do much because the constant is already checked
;; in the shift_operator predicate.
(define_predicate "shift_amount_operand"
diff --git a/gcc-4.9/gcc/config/arm/t-aprofile b/gcc-4.9/gcc/config/arm/t-aprofile
index b968711c1..ff9e2e1b3 100644
--- a/gcc-4.9/gcc/config/arm/t-aprofile
+++ b/gcc-4.9/gcc/config/arm/t-aprofile
@@ -81,7 +81,8 @@ MULTILIB_EXCEPTIONS += *march=armv7ve/*mfpu=neon-fp-armv8*
MULTILIB_MATCHES += march?armv7-a=mcpu?cortex-a8
MULTILIB_MATCHES += march?armv7-a=mcpu?cortex-a9
MULTILIB_MATCHES += march?armv7-a=mcpu?cortex-a5
-MULTILIB_MATCHES += march?armv7ve=mcpu?cortex-a15=mcpu?cortex-a12
+MULTILIB_MATCHES += march?armv7ve=mcpu?cortex-a15
+MULTILIB_MATCHES += march?armv7ve=mcpu?cortex-a12
MULTILIB_MATCHES += march?armv7ve=mcpu?cortex-a15.cortex-a7
MULTILIB_MATCHES += march?armv8-a=mcpu?cortex-a53
MULTILIB_MATCHES += march?armv8-a=mcpu?cortex-a57
diff --git a/gcc-4.9/gcc/config/arm/types.md b/gcc-4.9/gcc/config/arm/types.md
index cc39cd11f..efbf7a753 100644
--- a/gcc-4.9/gcc/config/arm/types.md
+++ b/gcc-4.9/gcc/config/arm/types.md
@@ -524,7 +524,8 @@
;
; The classification below is for Crypto instructions.
;
-; crypto_aes
+; crypto_aese
+; crypto_aesmc
; crypto_sha1_xor
; crypto_sha1_fast
; crypto_sha1_slow
@@ -1051,7 +1052,8 @@
neon_fp_div_d,\
neon_fp_div_d_q,\
\
- crypto_aes,\
+ crypto_aese,\
+ crypto_aesmc,\
crypto_sha1_xor,\
crypto_sha1_fast,\
crypto_sha1_slow,\
@@ -1075,3 +1077,102 @@
"smlalxy,umull,umulls,umaal,umlal,umlals,smull,smulls,smlal,smlals")
(const_string "yes")
(const_string "no")))
+
+; YES if the "type" attribute assigned to the insn denotes an
+; Advanced SIMD instruction, NO otherwise.
+(define_attr "is_neon_type" "yes,no"
+ (if_then_else (eq_attr "type"
+ "neon_add, neon_add_q, neon_add_widen, neon_add_long,\
+ neon_qadd, neon_qadd_q, neon_add_halve, neon_add_halve_q,\
+ neon_add_halve_narrow_q,\
+ neon_sub, neon_sub_q, neon_sub_widen, neon_sub_long, neon_qsub,\
+ neon_qsub_q, neon_sub_halve, neon_sub_halve_q,\
+ neon_sub_halve_narrow_q,\
+ neon_abs, neon_abs_q, neon_neg, neon_neg_q, neon_qneg,\
+ neon_qneg_q, neon_qabs, neon_qabs_q, neon_abd, neon_abd_q,\
+ neon_abd_long, neon_minmax, neon_minmax_q, neon_compare,\
+ neon_compare_q, neon_compare_zero, neon_compare_zero_q,\
+ neon_arith_acc, neon_arith_acc_q, neon_reduc_add,\
+ neon_reduc_add_q, neon_reduc_add_long, neon_reduc_add_acc,\
+ neon_reduc_add_acc_q, neon_reduc_minmax, neon_reduc_minmax_q,\
+ neon_logic, neon_logic_q, neon_tst, neon_tst_q,\
+ neon_shift_imm, neon_shift_imm_q, neon_shift_imm_narrow_q,\
+ neon_shift_imm_long, neon_shift_reg, neon_shift_reg_q,\
+ neon_shift_acc, neon_shift_acc_q, neon_sat_shift_imm,\
+ neon_sat_shift_imm_q, neon_sat_shift_imm_narrow_q,\
+ neon_sat_shift_reg, neon_sat_shift_reg_q,\
+ neon_ins, neon_ins_q, neon_move, neon_move_q, neon_move_narrow_q,\
+ neon_permute, neon_permute_q, neon_zip, neon_zip_q, neon_tbl1,\
+ neon_tbl1_q, neon_tbl2, neon_tbl2_q, neon_tbl3, neon_tbl3_q,\
+ neon_tbl4, neon_tbl4_q, neon_bsl, neon_bsl_q, neon_cls,\
+ neon_cls_q, neon_cnt, neon_cnt_q, neon_dup, neon_dup_q,\
+ neon_ext, neon_ext_q, neon_rbit, neon_rbit_q,\
+ neon_rev, neon_rev_q, neon_mul_b, neon_mul_b_q, neon_mul_h,\
+ neon_mul_h_q, neon_mul_s, neon_mul_s_q, neon_mul_b_long,\
+ neon_mul_h_long, neon_mul_s_long, neon_mul_d_long, neon_mul_h_scalar,\
+ neon_mul_h_scalar_q, neon_mul_s_scalar, neon_mul_s_scalar_q,\
+ neon_mul_h_scalar_long, neon_mul_s_scalar_long, neon_sat_mul_b,\
+ neon_sat_mul_b_q, neon_sat_mul_h, neon_sat_mul_h_q,\
+ neon_sat_mul_s, neon_sat_mul_s_q, neon_sat_mul_b_long,\
+ neon_sat_mul_h_long, neon_sat_mul_s_long, neon_sat_mul_h_scalar,\
+ neon_sat_mul_h_scalar_q, neon_sat_mul_s_scalar,\
+ neon_sat_mul_s_scalar_q, neon_sat_mul_h_scalar_long,\
+ neon_sat_mul_s_scalar_long, neon_mla_b, neon_mla_b_q, neon_mla_h,\
+ neon_mla_h_q, neon_mla_s, neon_mla_s_q, neon_mla_b_long,\
+ neon_mla_h_long, neon_mla_s_long, neon_mla_h_scalar,\
+ neon_mla_h_scalar_q, neon_mla_s_scalar, neon_mla_s_scalar_q,\
+ neon_mla_h_scalar_long, neon_mla_s_scalar_long,\
+ neon_sat_mla_b_long, neon_sat_mla_h_long,\
+ neon_sat_mla_s_long, neon_sat_mla_h_scalar_long,\
+ neon_sat_mla_s_scalar_long,\
+ neon_to_gp, neon_to_gp_q, neon_from_gp, neon_from_gp_q,\
+ neon_ldr, neon_load1_1reg, neon_load1_1reg_q, neon_load1_2reg,\
+ neon_load1_2reg_q, neon_load1_3reg, neon_load1_3reg_q,\
+ neon_load1_4reg, neon_load1_4reg_q, neon_load1_all_lanes,\
+ neon_load1_all_lanes_q, neon_load1_one_lane, neon_load1_one_lane_q,\
+ neon_load2_2reg, neon_load2_2reg_q, neon_load2_4reg,\
+ neon_load2_4reg_q, neon_load2_all_lanes, neon_load2_all_lanes_q,\
+ neon_load2_one_lane, neon_load2_one_lane_q,\
+ neon_load3_3reg, neon_load3_3reg_q, neon_load3_all_lanes,\
+ neon_load3_all_lanes_q, neon_load3_one_lane, neon_load3_one_lane_q,\
+ neon_load4_4reg, neon_load4_4reg_q, neon_load4_all_lanes,\
+ neon_load4_all_lanes_q, neon_load4_one_lane, neon_load4_one_lane_q,\
+ neon_str, neon_store1_1reg, neon_store1_1reg_q, neon_store1_2reg,\
+ neon_store1_2reg_q, neon_store1_3reg, neon_store1_3reg_q,\
+ neon_store1_4reg, neon_store1_4reg_q, neon_store1_one_lane,\
+ neon_store1_one_lane_q, neon_store2_2reg, neon_store2_2reg_q,\
+ neon_store2_4reg, neon_store2_4reg_q, neon_store2_one_lane,\
+ neon_store2_one_lane_q, neon_store3_3reg, neon_store3_3reg_q,\
+ neon_store3_one_lane, neon_store3_one_lane_q, neon_store4_4reg,\
+ neon_store4_4reg_q, neon_store4_one_lane, neon_store4_one_lane_q,\
+ neon_fp_abd_s, neon_fp_abd_s_q, neon_fp_abd_d, neon_fp_abd_d_q,\
+ neon_fp_addsub_s, neon_fp_addsub_s_q, neon_fp_addsub_d,\
+ neon_fp_addsub_d_q, neon_fp_compare_s, neon_fp_compare_s_q,\
+ neon_fp_compare_d, neon_fp_compare_d_q, neon_fp_minmax_s,\
+ neon_fp_minmax_s_q, neon_fp_minmax_d, neon_fp_minmax_d_q,\
+ neon_fp_reduc_add_s, neon_fp_reduc_add_s_q, neon_fp_reduc_add_d,\
+ neon_fp_reduc_add_d_q, neon_fp_reduc_minmax_s,
+ neon_fp_reduc_minmax_s_q, neon_fp_reduc_minmax_d,\
+ neon_fp_reduc_minmax_d_q,\
+ neon_fp_cvt_narrow_s_q, neon_fp_cvt_narrow_d_q,\
+ neon_fp_cvt_widen_h, neon_fp_cvt_widen_s, neon_fp_to_int_s,\
+ neon_fp_to_int_s_q, neon_int_to_fp_s, neon_int_to_fp_s_q,\
+ neon_fp_round_s, neon_fp_round_s_q, neon_fp_recpe_s,\
+ neon_fp_recpe_s_q,\
+ neon_fp_recpe_d, neon_fp_recpe_d_q, neon_fp_recps_s,\
+ neon_fp_recps_s_q, neon_fp_recps_d, neon_fp_recps_d_q,\
+ neon_fp_recpx_s, neon_fp_recpx_s_q, neon_fp_recpx_d,\
+ neon_fp_recpx_d_q, neon_fp_rsqrte_s, neon_fp_rsqrte_s_q,\
+ neon_fp_rsqrte_d, neon_fp_rsqrte_d_q, neon_fp_rsqrts_s,\
+ neon_fp_rsqrts_s_q, neon_fp_rsqrts_d, neon_fp_rsqrts_d_q,\
+ neon_fp_mul_s, neon_fp_mul_s_q, neon_fp_mul_s_scalar,\
+ neon_fp_mul_s_scalar_q, neon_fp_mul_d, neon_fp_mul_d_q,\
+ neon_fp_mul_d_scalar_q, neon_fp_mla_s, neon_fp_mla_s_q,\
+ neon_fp_mla_s_scalar, neon_fp_mla_s_scalar_q, neon_fp_mla_d,\
+ neon_fp_mla_d_q, neon_fp_mla_d_scalar_q, neon_fp_sqrt_s,\
+ neon_fp_sqrt_s_q, neon_fp_sqrt_d, neon_fp_sqrt_d_q,\
+ neon_fp_div_s, neon_fp_div_s_q, neon_fp_div_d, neon_fp_div_d_q, crypto_aese,\
+ crypto_aesmc, crypto_sha1_xor, crypto_sha1_fast, crypto_sha1_slow,\
+ crypto_sha256_fast, crypto_sha256_slow")
+ (const_string "yes")
+ (const_string "no")))
diff --git a/gcc-4.9/gcc/config/avr/avr-arch.h b/gcc-4.9/gcc/config/avr/avr-arch.h
index 6357e997c..b3c7cc085 100644
--- a/gcc-4.9/gcc/config/avr/avr-arch.h
+++ b/gcc-4.9/gcc/config/avr/avr-arch.h
@@ -100,32 +100,12 @@ typedef struct
/* Index in avr_arch_types[]. */
enum avr_arch arch;
+ /* device specific feature */
+ int dev_attribute;
+
/* Must lie outside user's namespace. NULL == no macro. */
const char *const macro;
- /* Stack pointer have 8 bits width. */
- int short_sp;
-
- /* Some AVR devices have a core erratum when skipping a 2-word instruction.
- Skip instructions are: SBRC, SBRS, SBIC, SBIS, CPSE.
- Problems will occur with return address is IRQ executes during the
- skip sequence.
-
- A support ticket from Atmel returned the following information:
-
- Subject: (ATTicket:644469) On AVR skip-bug core Erratum
- From: avr@atmel.com Date: 2011-07-27
- (Please keep the subject when replying to this mail)
-
- This errata exists only in AT90S8515 and ATmega103 devices.
-
- For information please refer the following respective errata links
- http://www.atmel.com/dyn/resources/prod_documents/doc2494.pdf
- http://www.atmel.com/dyn/resources/prod_documents/doc1436.pdf */
-
- /* Core Erratum: Must not skip 2-word instruction. */
- int errata_skip;
-
/* Start of data section. */
int data_section_start;
@@ -136,6 +116,42 @@ typedef struct
const char *const library_name;
} avr_mcu_t;
+/* AVR device specific features.
+
+AVR_ISA_RMW
+ Only few avr devices have Read-Modify-Write (RMW) instructions
+ (XCH, LAC, LAS and LAT)
+
+AVR_SHORT_SP
+ Stack Pointer has only 8 bit width.
+ The device / multilib has an 8-bit stack pointer (no SPH).
+
+AVR_ERRATA_SKIP
+ Some AVR devices have a core erratum when skipping a 2-word instruction.
+ Skip instructions are: SBRC, SBRS, SBIC, SBIS, CPSE.
+ Problems will occur with return address is IRQ executes during the
+ skip sequence.
+
+ A support ticket from Atmel returned the following information:
+
+ Subject: (ATTicket:644469) On AVR skip-bug core Erratum
+ From: avr@atmel.com Date: 2011-07-27
+ (Please keep the subject when replying to this mail)
+
+ This errata exists only in AT90S8515 and ATmega103 devices.
+
+ For information please refer the following respective errata links
+ http://www.atmel.com/dyn/resources/prod_documents/doc2494.pdf
+ http://www.atmel.com/dyn/resources/prod_documents/doc1436.pdf */
+
+enum avr_device_specific_features
+{
+ AVR_ISA_NONE,
+ AVR_ISA_RMW = 0x1, /* device has RMW instructions. */
+ AVR_SHORT_SP = 0x2, /* Stack Pointer has 8 bits width. */
+ AVR_ERRATA_SKIP = 0x4 /* device has a core erratum. */
+};
+
/* Map architecture to its texinfo string. */
typedef struct
diff --git a/gcc-4.9/gcc/config/avr/avr-c.c b/gcc-4.9/gcc/config/avr/avr-c.c
index 101d28092..c6a2f1f94 100644
--- a/gcc-4.9/gcc/config/avr/avr-c.c
+++ b/gcc-4.9/gcc/config/avr/avr-c.c
@@ -347,7 +347,7 @@ avr_cpu_cpp_builtins (struct cpp_reader *pfile)
if (TARGET_NO_INTERRUPTS)
cpp_define (pfile, "__NO_INTERRUPTS__");
- if (avr_current_device->errata_skip)
+ if (avr_current_device->dev_attribute & AVR_ERRATA_SKIP)
{
cpp_define (pfile, "__AVR_ERRATA_SKIP__");
@@ -355,6 +355,9 @@ avr_cpu_cpp_builtins (struct cpp_reader *pfile)
cpp_define (pfile, "__AVR_ERRATA_SKIP_JMP_CALL__");
}
+ if (avr_current_device->dev_attribute & AVR_ISA_RMW)
+ cpp_define (pfile, "__AVR_ISA_RMW__");
+
cpp_define_formatted (pfile, "__AVR_SFR_OFFSET__=0x%x",
avr_current_arch->sfr_offset);
diff --git a/gcc-4.9/gcc/config/avr/avr-devices.c b/gcc-4.9/gcc/config/avr/avr-devices.c
index 177f1961f..2485cad65 100644
--- a/gcc-4.9/gcc/config/avr/avr-devices.c
+++ b/gcc-4.9/gcc/config/avr/avr-devices.c
@@ -104,11 +104,11 @@ avr_texinfo[] =
const avr_mcu_t
avr_mcu_types[] =
{
-#define AVR_MCU(NAME, ARCH, MACRO, SP8, ERR_SKIP, DATA_SEC, N_FLASH, LIBNAME)\
- { NAME, ARCH, MACRO, SP8, ERR_SKIP, DATA_SEC, N_FLASH, LIBNAME },
+#define AVR_MCU(NAME, ARCH, DEV_ATTRIBUTE, MACRO, DATA_SEC, N_FLASH, LIBNAME)\
+ { NAME, ARCH, DEV_ATTRIBUTE, MACRO, DATA_SEC, N_FLASH, LIBNAME },
#include "avr-mcus.def"
#undef AVR_MCU
/* End of list. */
- { NULL, ARCH_UNKNOWN, NULL, 0, 0, 0, 0, NULL }
+ { NULL, ARCH_UNKNOWN, AVR_ISA_NONE, NULL, 0, 0, NULL }
};
diff --git a/gcc-4.9/gcc/config/avr/avr-mcus.def b/gcc-4.9/gcc/config/avr/avr-mcus.def
index d068f5e80..3cf2fcd41 100644
--- a/gcc-4.9/gcc/config/avr/avr-mcus.def
+++ b/gcc-4.9/gcc/config/avr/avr-mcus.def
@@ -33,291 +33,288 @@
Before including this file, define a macro:
- AVR_MCU (NAME, ARCH, MACRO, SHORT_SP, ERRATA_SKIP, DATA_SEC, N_FLASH,
- LIBRARY_NAME)
+ AVR_MCU (NAME, ARCH, DEV_ATTRIBUTE, MACRO, DATA_SEC, N_FLASH, LIBRARY_NAME)
where the arguments are the fields of avr_mcu_t:
- NAME Accept -mmcu=<NAME>
+ NAME Accept -mmcu=<NAME>
- ARCH Specifies the multilib variant together with SHORT_SP
+ ARCH Specifies the multilib variant together with SHORT_SP
- MACRO If NULL, this is a core and not a device. If non-NULL,
- supply respective built-in macro.
+ DEV_ATTRIBUTE Specifies the device specific features
+ - additional ISA, short SP, errata skip etc.,
- SHORT_SP The device / multilib has an 8-bit stack pointer (no SPH).
+ MACRO If NULL, this is a core and not a device. If non-NULL,
+ supply respective built-in macro.
- ERRATA_SKIP Apply work-around for the "skip 32-bit instruction"
- silicon bug: Don't skip 32-bit instrctions.
+ DATA_SEC First address of SRAM, used in -Tdata= by the driver.
- DATA_SEC First address of SRAM, used in -Tdata= by the driver.
+ N_FLASH Number of 64 KiB flash segments, rounded up.
- N_FLASH Number of 64 KiB flash segments, rounded up.
-
- LIBRARY_NAME Used by the driver to linke startup code from avr-libc
- as of crt<LIBRARY_NAME>.o
+ LIBRARY_NAME Used by the driver to linke startup code from avr-libc
+ as of crt<LIBRARY_NAME>.o
"avr2" must be first for the "0" default to work as intended. */
/* Classic, <= 8K. */
-AVR_MCU ("avr2", ARCH_AVR2, NULL, 0, 1, 0x0060, 6, "s8515")
-AVR_MCU ("at90s2313", ARCH_AVR2, "__AVR_AT90S2313__", 1, 0, 0x0060, 1, "s2313")
-AVR_MCU ("at90s2323", ARCH_AVR2, "__AVR_AT90S2323__", 1, 0, 0x0060, 1, "s2323")
-AVR_MCU ("at90s2333", ARCH_AVR2, "__AVR_AT90S2333__", 1, 0, 0x0060, 1, "s2333")
-AVR_MCU ("at90s2343", ARCH_AVR2, "__AVR_AT90S2343__", 1, 0, 0x0060, 1, "s2343")
-AVR_MCU ("attiny22", ARCH_AVR2, "__AVR_ATtiny22__", 1, 0, 0x0060, 1, "tn22")
-AVR_MCU ("attiny26", ARCH_AVR2, "__AVR_ATtiny26__", 1, 0, 0x0060, 1, "tn26")
-AVR_MCU ("at90s4414", ARCH_AVR2, "__AVR_AT90S4414__", 0, 0, 0x0060, 1, "s4414")
-AVR_MCU ("at90s4433", ARCH_AVR2, "__AVR_AT90S4433__", 1, 0, 0x0060, 1, "s4433")
-AVR_MCU ("at90s4434", ARCH_AVR2, "__AVR_AT90S4434__", 0, 0, 0x0060, 1, "s4434")
-AVR_MCU ("at90s8515", ARCH_AVR2, "__AVR_AT90S8515__", 0, 1, 0x0060, 1, "s8515")
-AVR_MCU ("at90c8534", ARCH_AVR2, "__AVR_AT90C8534__", 0, 0, 0x0060, 1, "c8534")
-AVR_MCU ("at90s8535", ARCH_AVR2, "__AVR_AT90S8535__", 0, 0, 0x0060, 1, "s8535")
+AVR_MCU ("avr2", ARCH_AVR2, AVR_ERRATA_SKIP, NULL, 0x0060, 6, "s8515")
+AVR_MCU ("at90s2313", ARCH_AVR2, AVR_SHORT_SP, "__AVR_AT90S2313__", 0x0060, 1, "s2313")
+AVR_MCU ("at90s2323", ARCH_AVR2, AVR_SHORT_SP, "__AVR_AT90S2323__", 0x0060, 1, "s2323")
+AVR_MCU ("at90s2333", ARCH_AVR2, AVR_SHORT_SP, "__AVR_AT90S2333__", 0x0060, 1, "s2333")
+AVR_MCU ("at90s2343", ARCH_AVR2, AVR_SHORT_SP, "__AVR_AT90S2343__", 0x0060, 1, "s2343")
+AVR_MCU ("attiny22", ARCH_AVR2, AVR_SHORT_SP, "__AVR_ATtiny22__", 0x0060, 1, "tn22")
+AVR_MCU ("attiny26", ARCH_AVR2, AVR_SHORT_SP, "__AVR_ATtiny26__", 0x0060, 1, "tn26")
+AVR_MCU ("at90s4414", ARCH_AVR2, AVR_ISA_NONE, "__AVR_AT90S4414__", 0x0060, 1, "s4414")
+AVR_MCU ("at90s4433", ARCH_AVR2, AVR_SHORT_SP, "__AVR_AT90S4433__", 0x0060, 1, "s4433")
+AVR_MCU ("at90s4434", ARCH_AVR2, AVR_ISA_NONE, "__AVR_AT90S4434__", 0x0060, 1, "s4434")
+AVR_MCU ("at90s8515", ARCH_AVR2, AVR_ERRATA_SKIP, "__AVR_AT90S8515__", 0x0060, 1, "s8515")
+AVR_MCU ("at90c8534", ARCH_AVR2, AVR_ISA_NONE, "__AVR_AT90C8534__", 0x0060, 1, "c8534")
+AVR_MCU ("at90s8535", ARCH_AVR2, AVR_ISA_NONE, "__AVR_AT90S8535__", 0x0060, 1, "s8535")
/* Classic + MOVW, <= 8K. */
-AVR_MCU ("avr25", ARCH_AVR25, NULL, 0, 0, 0x0060, 1, "tn85")
-AVR_MCU ("ata6289", ARCH_AVR25, "__AVR_ATA6289__", 0, 0, 0x0100, 1, "a6289")
-AVR_MCU ("ata5272", ARCH_AVR25, "__AVR_ATA5272__", 0, 0, 0x0100, 1, "a5272")
-AVR_MCU ("attiny13", ARCH_AVR25, "__AVR_ATtiny13__", 1, 0, 0x0060, 1, "tn13")
-AVR_MCU ("attiny13a", ARCH_AVR25, "__AVR_ATtiny13A__", 1, 0, 0x0060, 1, "tn13a")
-AVR_MCU ("attiny2313", ARCH_AVR25, "__AVR_ATtiny2313__", 1, 0, 0x0060, 1, "tn2313")
-AVR_MCU ("attiny2313a", ARCH_AVR25, "__AVR_ATtiny2313A__", 1, 0, 0x0060, 1, "tn2313a")
-AVR_MCU ("attiny24", ARCH_AVR25, "__AVR_ATtiny24__", 1, 0, 0x0060, 1, "tn24")
-AVR_MCU ("attiny24a", ARCH_AVR25, "__AVR_ATtiny24A__", 1, 0, 0x0060, 1, "tn24a")
-AVR_MCU ("attiny4313", ARCH_AVR25, "__AVR_ATtiny4313__", 0, 0, 0x0060, 1, "tn4313")
-AVR_MCU ("attiny44", ARCH_AVR25, "__AVR_ATtiny44__", 0, 0, 0x0060, 1, "tn44")
-AVR_MCU ("attiny44a", ARCH_AVR25, "__AVR_ATtiny44A__", 0, 0, 0x0060, 1, "tn44a")
-AVR_MCU ("attiny84", ARCH_AVR25, "__AVR_ATtiny84__", 0, 0, 0x0060, 1, "tn84")
-AVR_MCU ("attiny84a", ARCH_AVR25, "__AVR_ATtiny84A__", 0, 0, 0x0060, 1, "tn84")
-AVR_MCU ("attiny25", ARCH_AVR25, "__AVR_ATtiny25__", 1, 0, 0x0060, 1, "tn25")
-AVR_MCU ("attiny45", ARCH_AVR25, "__AVR_ATtiny45__", 0, 0, 0x0060, 1, "tn45")
-AVR_MCU ("attiny85", ARCH_AVR25, "__AVR_ATtiny85__", 0, 0, 0x0060, 1, "tn85")
-AVR_MCU ("attiny261", ARCH_AVR25, "__AVR_ATtiny261__", 1, 0, 0x0060, 1, "tn261")
-AVR_MCU ("attiny261a", ARCH_AVR25, "__AVR_ATtiny261A__", 1, 0, 0x0060, 1, "tn261a")
-AVR_MCU ("attiny461", ARCH_AVR25, "__AVR_ATtiny461__", 0, 0, 0x0060, 1, "tn461")
-AVR_MCU ("attiny461a", ARCH_AVR25, "__AVR_ATtiny461A__", 0, 0, 0x0060, 1, "tn461a")
-AVR_MCU ("attiny861", ARCH_AVR25, "__AVR_ATtiny861__", 0, 0, 0x0060, 1, "tn861")
-AVR_MCU ("attiny861a", ARCH_AVR25, "__AVR_ATtiny861A__", 0, 0, 0x0060, 1, "tn861a")
-AVR_MCU ("attiny43u", ARCH_AVR25, "__AVR_ATtiny43U__", 0, 0, 0x0060, 1, "tn43u")
-AVR_MCU ("attiny87", ARCH_AVR25, "__AVR_ATtiny87__", 0, 0, 0x0100, 1, "tn87")
-AVR_MCU ("attiny48", ARCH_AVR25, "__AVR_ATtiny48__", 0, 0, 0x0100, 1, "tn48")
-AVR_MCU ("attiny88", ARCH_AVR25, "__AVR_ATtiny88__", 0, 0, 0x0100, 1, "tn88")
-AVR_MCU ("at86rf401", ARCH_AVR25, "__AVR_AT86RF401__", 0, 0, 0x0060, 1, "86401")
+AVR_MCU ("avr25", ARCH_AVR25, AVR_ISA_NONE, NULL, 0x0060, 1, "tn85")
+AVR_MCU ("ata6289", ARCH_AVR25, AVR_ISA_NONE, "__AVR_ATA6289__", 0x0100, 1, "a6289")
+AVR_MCU ("ata5272", ARCH_AVR25, AVR_ISA_NONE, "__AVR_ATA5272__", 0x0100, 1, "a5272")
+AVR_MCU ("attiny13", ARCH_AVR25, AVR_SHORT_SP, "__AVR_ATtiny13__", 0x0060, 1, "tn13")
+AVR_MCU ("attiny13a", ARCH_AVR25, AVR_SHORT_SP, "__AVR_ATtiny13A__", 0x0060, 1, "tn13a")
+AVR_MCU ("attiny2313", ARCH_AVR25, AVR_SHORT_SP, "__AVR_ATtiny2313__", 0x0060, 1, "tn2313")
+AVR_MCU ("attiny2313a", ARCH_AVR25, AVR_SHORT_SP, "__AVR_ATtiny2313A__", 0x0060, 1, "tn2313a")
+AVR_MCU ("attiny24", ARCH_AVR25, AVR_SHORT_SP, "__AVR_ATtiny24__", 0x0060, 1, "tn24")
+AVR_MCU ("attiny24a", ARCH_AVR25, AVR_SHORT_SP, "__AVR_ATtiny24A__", 0x0060, 1, "tn24a")
+AVR_MCU ("attiny4313", ARCH_AVR25, AVR_ISA_NONE, "__AVR_ATtiny4313__", 0x0060, 1, "tn4313")
+AVR_MCU ("attiny44", ARCH_AVR25, AVR_ISA_NONE, "__AVR_ATtiny44__", 0x0060, 1, "tn44")
+AVR_MCU ("attiny44a", ARCH_AVR25, AVR_ISA_NONE, "__AVR_ATtiny44A__", 0x0060, 1, "tn44a")
+AVR_MCU ("attiny84", ARCH_AVR25, AVR_ISA_NONE, "__AVR_ATtiny84__", 0x0060, 1, "tn84")
+AVR_MCU ("attiny84a", ARCH_AVR25, AVR_ISA_NONE, "__AVR_ATtiny84A__", 0x0060, 1, "tn84")
+AVR_MCU ("attiny25", ARCH_AVR25, AVR_SHORT_SP, "__AVR_ATtiny25__", 0x0060, 1, "tn25")
+AVR_MCU ("attiny45", ARCH_AVR25, AVR_ISA_NONE, "__AVR_ATtiny45__", 0x0060, 1, "tn45")
+AVR_MCU ("attiny85", ARCH_AVR25, AVR_ISA_NONE, "__AVR_ATtiny85__", 0x0060, 1, "tn85")
+AVR_MCU ("attiny261", ARCH_AVR25, AVR_SHORT_SP, "__AVR_ATtiny261__", 0x0060, 1, "tn261")
+AVR_MCU ("attiny261a", ARCH_AVR25, AVR_SHORT_SP, "__AVR_ATtiny261A__", 0x0060, 1, "tn261a")
+AVR_MCU ("attiny461", ARCH_AVR25, AVR_ISA_NONE, "__AVR_ATtiny461__", 0x0060, 1, "tn461")
+AVR_MCU ("attiny461a", ARCH_AVR25, AVR_ISA_NONE, "__AVR_ATtiny461A__", 0x0060, 1, "tn461a")
+AVR_MCU ("attiny861", ARCH_AVR25, AVR_ISA_NONE, "__AVR_ATtiny861__", 0x0060, 1, "tn861")
+AVR_MCU ("attiny861a", ARCH_AVR25, AVR_ISA_NONE, "__AVR_ATtiny861A__", 0x0060, 1, "tn861a")
+AVR_MCU ("attiny43u", ARCH_AVR25, AVR_ISA_NONE, "__AVR_ATtiny43U__", 0x0060, 1, "tn43u")
+AVR_MCU ("attiny87", ARCH_AVR25, AVR_ISA_NONE, "__AVR_ATtiny87__", 0x0100, 1, "tn87")
+AVR_MCU ("attiny48", ARCH_AVR25, AVR_ISA_NONE, "__AVR_ATtiny48__", 0x0100, 1, "tn48")
+AVR_MCU ("attiny88", ARCH_AVR25, AVR_ISA_NONE, "__AVR_ATtiny88__", 0x0100, 1, "tn88")
+AVR_MCU ("at86rf401", ARCH_AVR25, AVR_ISA_NONE, "__AVR_AT86RF401__", 0x0060, 1, "86401")
/* Classic, > 8K, <= 64K. */
-AVR_MCU ("avr3", ARCH_AVR3, NULL, 0, 0, 0x0060, 1, "43355")
-AVR_MCU ("at43usb355", ARCH_AVR3, "__AVR_AT43USB355__", 0, 0, 0x0060, 1, "43355")
-AVR_MCU ("at76c711", ARCH_AVR3, "__AVR_AT76C711__", 0, 0, 0x0060, 1, "76711")
+AVR_MCU ("avr3", ARCH_AVR3, AVR_ISA_NONE, NULL, 0x0060, 1, "43355")
+AVR_MCU ("at43usb355", ARCH_AVR3, AVR_ISA_NONE, "__AVR_AT43USB355__", 0x0060, 1, "43355")
+AVR_MCU ("at76c711", ARCH_AVR3, AVR_ISA_NONE, "__AVR_AT76C711__", 0x0060, 1, "76711")
/* Classic, == 128K. */
-AVR_MCU ("avr31", ARCH_AVR31, NULL, 0, 1, 0x0060, 2, "m103")
-AVR_MCU ("atmega103", ARCH_AVR31, "__AVR_ATmega103__", 0, 1, 0x0060, 2, "m103")
-AVR_MCU ("at43usb320", ARCH_AVR31, "__AVR_AT43USB320__", 0, 0, 0x0060, 2, "43320")
+AVR_MCU ("avr31", ARCH_AVR31, AVR_ERRATA_SKIP, NULL, 0x0060, 2, "m103")
+AVR_MCU ("atmega103", ARCH_AVR31, AVR_ERRATA_SKIP, "__AVR_ATmega103__", 0x0060, 2, "m103")
+AVR_MCU ("at43usb320", ARCH_AVR31, AVR_ISA_NONE, "__AVR_AT43USB320__", 0x0060, 2, "43320")
/* Classic + MOVW + JMP/CALL. */
-AVR_MCU ("avr35", ARCH_AVR35, NULL, 0, 0, 0x0100, 1, "usb162")
-AVR_MCU ("ata5505", ARCH_AVR35, "__AVR_ATA5505__", 0, 0, 0x0100, 1, "a5505")
-AVR_MCU ("at90usb82", ARCH_AVR35, "__AVR_AT90USB82__", 0, 0, 0x0100, 1, "usb82")
-AVR_MCU ("at90usb162", ARCH_AVR35, "__AVR_AT90USB162__", 0, 0, 0x0100, 1, "usb162")
-AVR_MCU ("atmega8u2", ARCH_AVR35, "__AVR_ATmega8U2__", 0, 0, 0x0100, 1, "m8u2")
-AVR_MCU ("atmega16u2", ARCH_AVR35, "__AVR_ATmega16U2__", 0, 0, 0x0100, 1, "m16u2")
-AVR_MCU ("atmega32u2", ARCH_AVR35, "__AVR_ATmega32U2__", 0, 0, 0x0100, 1, "m32u2")
-AVR_MCU ("attiny167", ARCH_AVR35, "__AVR_ATtiny167__", 0, 0, 0x0100, 1, "tn167")
-AVR_MCU ("attiny1634", ARCH_AVR35, "__AVR_ATtiny1634__", 0, 0, 0x0100, 1, "tn1634")
+AVR_MCU ("avr35", ARCH_AVR35, AVR_ISA_NONE, NULL, 0x0100, 1, "usb162")
+AVR_MCU ("ata5505", ARCH_AVR35, AVR_ISA_NONE, "__AVR_ATA5505__", 0x0100, 1, "a5505")
+AVR_MCU ("at90usb82", ARCH_AVR35, AVR_ISA_NONE, "__AVR_AT90USB82__", 0x0100, 1, "usb82")
+AVR_MCU ("at90usb162", ARCH_AVR35, AVR_ISA_NONE, "__AVR_AT90USB162__", 0x0100, 1, "usb162")
+AVR_MCU ("atmega8u2", ARCH_AVR35, AVR_ISA_NONE, "__AVR_ATmega8U2__", 0x0100, 1, "m8u2")
+AVR_MCU ("atmega16u2", ARCH_AVR35, AVR_ISA_NONE, "__AVR_ATmega16U2__", 0x0100, 1, "m16u2")
+AVR_MCU ("atmega32u2", ARCH_AVR35, AVR_ISA_NONE, "__AVR_ATmega32U2__", 0x0100, 1, "m32u2")
+AVR_MCU ("attiny167", ARCH_AVR35, AVR_ISA_NONE, "__AVR_ATtiny167__", 0x0100, 1, "tn167")
+AVR_MCU ("attiny1634", ARCH_AVR35, AVR_ISA_NONE, "__AVR_ATtiny1634__", 0x0100, 1, "tn1634")
/* Enhanced, <= 8K. */
-AVR_MCU ("avr4", ARCH_AVR4, NULL, 0, 0, 0x0060, 1, "m8")
-AVR_MCU ("ata6285", ARCH_AVR4, "__AVR_ATA6285__", 0, 0, 0x0100, 1, "a6285")
-AVR_MCU ("ata6286", ARCH_AVR4, "__AVR_ATA6286__", 0, 0, 0x0100, 1, "a6286")
-AVR_MCU ("atmega8", ARCH_AVR4, "__AVR_ATmega8__", 0, 0, 0x0060, 1, "m8")
-AVR_MCU ("atmega8a", ARCH_AVR4, "__AVR_ATmega8A__", 0, 0, 0x0060, 1, "m8a")
-AVR_MCU ("atmega48", ARCH_AVR4, "__AVR_ATmega48__", 0, 0, 0x0100, 1, "m48")
-AVR_MCU ("atmega48a", ARCH_AVR4, "__AVR_ATmega48A__", 0, 0, 0x0100, 1, "m48a")
-AVR_MCU ("atmega48p", ARCH_AVR4, "__AVR_ATmega48P__", 0, 0, 0x0100, 1, "m48p")
-AVR_MCU ("atmega48pa", ARCH_AVR4, "__AVR_ATmega48PA__", 0, 0, 0x0100, 1, "m48pa")
-AVR_MCU ("atmega88", ARCH_AVR4, "__AVR_ATmega88__", 0, 0, 0x0100, 1, "m88")
-AVR_MCU ("atmega88a", ARCH_AVR4, "__AVR_ATmega88A__", 0, 0, 0x0100, 1, "m88a")
-AVR_MCU ("atmega88p", ARCH_AVR4, "__AVR_ATmega88P__", 0, 0, 0x0100, 1, "m88p")
-AVR_MCU ("atmega88pa", ARCH_AVR4, "__AVR_ATmega88PA__", 0, 0, 0x0100, 1, "m88pa")
-AVR_MCU ("atmega8515", ARCH_AVR4, "__AVR_ATmega8515__", 0, 0, 0x0060, 1, "m8515")
-AVR_MCU ("atmega8535", ARCH_AVR4, "__AVR_ATmega8535__", 0, 0, 0x0060, 1, "m8535")
-AVR_MCU ("atmega8hva", ARCH_AVR4, "__AVR_ATmega8HVA__", 0, 0, 0x0100, 1, "m8hva")
-AVR_MCU ("at90pwm1", ARCH_AVR4, "__AVR_AT90PWM1__", 0, 0, 0x0100, 1, "90pwm1")
-AVR_MCU ("at90pwm2", ARCH_AVR4, "__AVR_AT90PWM2__", 0, 0, 0x0100, 1, "90pwm2")
-AVR_MCU ("at90pwm2b", ARCH_AVR4, "__AVR_AT90PWM2B__", 0, 0, 0x0100, 1, "90pwm2b")
-AVR_MCU ("at90pwm3", ARCH_AVR4, "__AVR_AT90PWM3__", 0, 0, 0x0100, 1, "90pwm3")
-AVR_MCU ("at90pwm3b", ARCH_AVR4, "__AVR_AT90PWM3B__", 0, 0, 0x0100, 1, "90pwm3b")
-AVR_MCU ("at90pwm81", ARCH_AVR4, "__AVR_AT90PWM81__", 0, 0, 0x0100, 1, "90pwm81")
+AVR_MCU ("avr4", ARCH_AVR4, AVR_ISA_NONE, NULL, 0x0060, 1, "m8")
+AVR_MCU ("ata6285", ARCH_AVR4, AVR_ISA_NONE, "__AVR_ATA6285__", 0x0100, 1, "a6285")
+AVR_MCU ("ata6286", ARCH_AVR4, AVR_ISA_NONE, "__AVR_ATA6286__", 0x0100, 1, "a6286")
+AVR_MCU ("atmega8", ARCH_AVR4, AVR_ISA_NONE, "__AVR_ATmega8__", 0x0060, 1, "m8")
+AVR_MCU ("atmega8a", ARCH_AVR4, AVR_ISA_NONE, "__AVR_ATmega8A__", 0x0060, 1, "m8a")
+AVR_MCU ("atmega48", ARCH_AVR4, AVR_ISA_NONE, "__AVR_ATmega48__", 0x0100, 1, "m48")
+AVR_MCU ("atmega48a", ARCH_AVR4, AVR_ISA_NONE, "__AVR_ATmega48A__", 0x0100, 1, "m48a")
+AVR_MCU ("atmega48p", ARCH_AVR4, AVR_ISA_NONE, "__AVR_ATmega48P__", 0x0100, 1, "m48p")
+AVR_MCU ("atmega48pa", ARCH_AVR4, AVR_ISA_NONE, "__AVR_ATmega48PA__", 0x0100, 1, "m48pa")
+AVR_MCU ("atmega88", ARCH_AVR4, AVR_ISA_NONE, "__AVR_ATmega88__", 0x0100, 1, "m88")
+AVR_MCU ("atmega88a", ARCH_AVR4, AVR_ISA_NONE, "__AVR_ATmega88A__", 0x0100, 1, "m88a")
+AVR_MCU ("atmega88p", ARCH_AVR4, AVR_ISA_NONE, "__AVR_ATmega88P__", 0x0100, 1, "m88p")
+AVR_MCU ("atmega88pa", ARCH_AVR4, AVR_ISA_NONE, "__AVR_ATmega88PA__", 0x0100, 1, "m88pa")
+AVR_MCU ("atmega8515", ARCH_AVR4, AVR_ISA_NONE, "__AVR_ATmega8515__", 0x0060, 1, "m8515")
+AVR_MCU ("atmega8535", ARCH_AVR4, AVR_ISA_NONE, "__AVR_ATmega8535__", 0x0060, 1, "m8535")
+AVR_MCU ("atmega8hva", ARCH_AVR4, AVR_ISA_NONE, "__AVR_ATmega8HVA__", 0x0100, 1, "m8hva")
+AVR_MCU ("at90pwm1", ARCH_AVR4, AVR_ISA_NONE, "__AVR_AT90PWM1__", 0x0100, 1, "90pwm1")
+AVR_MCU ("at90pwm2", ARCH_AVR4, AVR_ISA_NONE, "__AVR_AT90PWM2__", 0x0100, 1, "90pwm2")
+AVR_MCU ("at90pwm2b", ARCH_AVR4, AVR_ISA_NONE, "__AVR_AT90PWM2B__", 0x0100, 1, "90pwm2b")
+AVR_MCU ("at90pwm3", ARCH_AVR4, AVR_ISA_NONE, "__AVR_AT90PWM3__", 0x0100, 1, "90pwm3")
+AVR_MCU ("at90pwm3b", ARCH_AVR4, AVR_ISA_NONE, "__AVR_AT90PWM3B__", 0x0100, 1, "90pwm3b")
+AVR_MCU ("at90pwm81", ARCH_AVR4, AVR_ISA_NONE, "__AVR_AT90PWM81__", 0x0100, 1, "90pwm81")
/* Enhanced, > 8K, <= 64K. */
-AVR_MCU ("avr5", ARCH_AVR5, NULL, 0, 0, 0x0060, 1, "m16")
-AVR_MCU ("ata5790", ARCH_AVR5, "__AVR_ATA5790__", 0, 0, 0x0100, 1, "a5790")
-AVR_MCU ("ata5790n", ARCH_AVR5, "__AVR_ATA5790N__", 0, 0, 0x0100, 1, "a5790n")
-AVR_MCU ("ata5795", ARCH_AVR5, "__AVR_ATA5795__", 0, 0, 0x0100, 1, "a5795")
-AVR_MCU ("atmega16", ARCH_AVR5, "__AVR_ATmega16__", 0, 0, 0x0060, 1, "m16")
-AVR_MCU ("atmega16a", ARCH_AVR5, "__AVR_ATmega16A__", 0, 0, 0x0060, 1, "m16a")
-AVR_MCU ("atmega161", ARCH_AVR5, "__AVR_ATmega161__", 0, 0, 0x0060, 1, "m161")
-AVR_MCU ("atmega162", ARCH_AVR5, "__AVR_ATmega162__", 0, 0, 0x0100, 1, "m162")
-AVR_MCU ("atmega163", ARCH_AVR5, "__AVR_ATmega163__", 0, 0, 0x0060, 1, "m163")
-AVR_MCU ("atmega164a", ARCH_AVR5, "__AVR_ATmega164A__", 0, 0, 0x0100, 1, "m164a")
-AVR_MCU ("atmega164p", ARCH_AVR5, "__AVR_ATmega164P__", 0, 0, 0x0100, 1, "m164p")
-AVR_MCU ("atmega164pa", ARCH_AVR5, "__AVR_ATmega164PA__", 0, 0, 0x0100, 1, "m164pa")
-AVR_MCU ("atmega165", ARCH_AVR5, "__AVR_ATmega165__", 0, 0, 0x0100, 1, "m165")
-AVR_MCU ("atmega165a", ARCH_AVR5, "__AVR_ATmega165A__", 0, 0, 0x0100, 1, "m165a")
-AVR_MCU ("atmega165p", ARCH_AVR5, "__AVR_ATmega165P__", 0, 0, 0x0100, 1, "m165p")
-AVR_MCU ("atmega165pa", ARCH_AVR5, "__AVR_ATmega165PA__", 0, 0, 0x0100, 1, "m165pa")
-AVR_MCU ("atmega168", ARCH_AVR5, "__AVR_ATmega168__", 0, 0, 0x0100, 1, "m168")
-AVR_MCU ("atmega168a", ARCH_AVR5, "__AVR_ATmega168A__", 0, 0, 0x0100, 1, "m168a")
-AVR_MCU ("atmega168p", ARCH_AVR5, "__AVR_ATmega168P__", 0, 0, 0x0100, 1, "m168p")
-AVR_MCU ("atmega168pa", ARCH_AVR5, "__AVR_ATmega168PA__", 0, 0, 0x0100, 1, "m168pa")
-AVR_MCU ("atmega169", ARCH_AVR5, "__AVR_ATmega169__", 0, 0, 0x0100, 1, "m169")
-AVR_MCU ("atmega169a", ARCH_AVR5, "__AVR_ATmega169A__", 0, 0, 0x0100, 1, "m169a")
-AVR_MCU ("atmega169p", ARCH_AVR5, "__AVR_ATmega169P__", 0, 0, 0x0100, 1, "m169p")
-AVR_MCU ("atmega169pa", ARCH_AVR5, "__AVR_ATmega169PA__", 0, 0, 0x0100, 1, "m169pa")
-AVR_MCU ("atmega16hvb", ARCH_AVR5, "__AVR_ATmega16HVB__", 0, 0, 0x0100, 1, "m16hvb")
-AVR_MCU ("atmega16hvbrevb", ARCH_AVR5, "__AVR_ATmega16HVBREVB__", 0, 0, 0x0100, 1, "m16hvbrevb")
-AVR_MCU ("atmega16m1", ARCH_AVR5, "__AVR_ATmega16M1__", 0, 0, 0x0100, 1, "m16m1")
-AVR_MCU ("atmega16u4", ARCH_AVR5, "__AVR_ATmega16U4__", 0, 0, 0x0100, 1, "m16u4")
-AVR_MCU ("atmega26hvg", ARCH_AVR5, "__AVR_ATmega26HVG__", 0, 0, 0x0100, 1, "m26hvg")
-AVR_MCU ("atmega32a", ARCH_AVR5, "__AVR_ATmega32A__", 0, 0, 0x0060, 1, "m32a")
-AVR_MCU ("atmega32", ARCH_AVR5, "__AVR_ATmega32__", 0, 0, 0x0060, 1, "m32")
-AVR_MCU ("atmega323", ARCH_AVR5, "__AVR_ATmega323__", 0, 0, 0x0060, 1, "m323")
-AVR_MCU ("atmega324a", ARCH_AVR5, "__AVR_ATmega324A__", 0, 0, 0x0100, 1, "m324a")
-AVR_MCU ("atmega324p", ARCH_AVR5, "__AVR_ATmega324P__", 0, 0, 0x0100, 1, "m324p")
-AVR_MCU ("atmega324pa", ARCH_AVR5, "__AVR_ATmega324PA__", 0, 0, 0x0100, 1, "m324pa")
-AVR_MCU ("atmega325", ARCH_AVR5, "__AVR_ATmega325__", 0, 0, 0x0100, 1, "m325")
-AVR_MCU ("atmega325a", ARCH_AVR5, "__AVR_ATmega325A__", 0, 0, 0x0100, 1, "m325a")
-AVR_MCU ("atmega325p", ARCH_AVR5, "__AVR_ATmega325P__", 0, 0, 0x0100, 1, "m325p")
-AVR_MCU ("atmega3250", ARCH_AVR5, "__AVR_ATmega3250__", 0, 0, 0x0100, 1, "m3250")
-AVR_MCU ("atmega3250a", ARCH_AVR5, "__AVR_ATmega3250A__", 0, 0, 0x0100, 1, "m3250a")
-AVR_MCU ("atmega3250p", ARCH_AVR5, "__AVR_ATmega3250P__", 0, 0, 0x0100, 1, "m3250p")
-AVR_MCU ("atmega3250pa", ARCH_AVR5, "__AVR_ATmega3250PA__", 0, 0, 0x0100, 1, "m3250pa")
-AVR_MCU ("atmega328", ARCH_AVR5, "__AVR_ATmega328__", 0, 0, 0x0100, 1, "m328")
-AVR_MCU ("atmega328p", ARCH_AVR5, "__AVR_ATmega328P__", 0, 0, 0x0100, 1, "m328p")
-AVR_MCU ("atmega329", ARCH_AVR5, "__AVR_ATmega329__", 0, 0, 0x0100, 1, "m329")
-AVR_MCU ("atmega329a", ARCH_AVR5, "__AVR_ATmega329A__", 0, 0, 0x0100, 1, "m329a")
-AVR_MCU ("atmega329p", ARCH_AVR5, "__AVR_ATmega329P__", 0, 0, 0x0100, 1, "m329p")
-AVR_MCU ("atmega329pa", ARCH_AVR5, "__AVR_ATmega329PA__", 0, 0, 0x0100, 1, "m329pa")
-AVR_MCU ("atmega3290", ARCH_AVR5, "__AVR_ATmega3290__", 0, 0, 0x0100, 1, "m3290")
-AVR_MCU ("atmega3290a", ARCH_AVR5, "__AVR_ATmega3290A__", 0, 0, 0x0100, 1, "m3290a")
-AVR_MCU ("atmega3290p", ARCH_AVR5, "__AVR_ATmega3290P__", 0, 0, 0x0100, 1, "m3290p")
-AVR_MCU ("atmega3290pa", ARCH_AVR5, "__AVR_ATmega3290PA__", 0, 0, 0x0100, 1, "m3290pa")
-AVR_MCU ("atmega32c1", ARCH_AVR5, "__AVR_ATmega32C1__", 0, 0, 0x0100, 1, "m32c1")
-AVR_MCU ("atmega32m1", ARCH_AVR5, "__AVR_ATmega32M1__", 0, 0, 0x0100, 1, "m32m1")
-AVR_MCU ("atmega32u4", ARCH_AVR5, "__AVR_ATmega32U4__", 0, 0, 0x0100, 1, "m32u4")
-AVR_MCU ("atmega32u6", ARCH_AVR5, "__AVR_ATmega32U6__", 0, 0, 0x0100, 1, "m32u6")
-AVR_MCU ("atmega406", ARCH_AVR5, "__AVR_ATmega406__", 0, 0, 0x0100, 1, "m406")
-AVR_MCU ("atmega64", ARCH_AVR5, "__AVR_ATmega64__", 0, 0, 0x0100, 1, "m64")
-AVR_MCU ("atmega64a", ARCH_AVR5, "__AVR_ATmega64A__", 0, 0, 0x0100, 1, "m64a")
-AVR_MCU ("atmega640", ARCH_AVR5, "__AVR_ATmega640__", 0, 0, 0x0200, 1, "m640")
-AVR_MCU ("atmega644", ARCH_AVR5, "__AVR_ATmega644__", 0, 0, 0x0100, 1, "m644")
-AVR_MCU ("atmega644a", ARCH_AVR5, "__AVR_ATmega644A__", 0, 0, 0x0100, 1, "m644a")
-AVR_MCU ("atmega644p", ARCH_AVR5, "__AVR_ATmega644P__", 0, 0, 0x0100, 1, "m644p")
-AVR_MCU ("atmega644pa", ARCH_AVR5, "__AVR_ATmega644PA__", 0, 0, 0x0100, 1, "m644pa")
-AVR_MCU ("atmega645", ARCH_AVR5, "__AVR_ATmega645__", 0, 0, 0x0100, 1, "m645")
-AVR_MCU ("atmega645a", ARCH_AVR5, "__AVR_ATmega645A__", 0, 0, 0x0100, 1, "m645a")
-AVR_MCU ("atmega645p", ARCH_AVR5, "__AVR_ATmega645P__", 0, 0, 0x0100, 1, "m645p")
-AVR_MCU ("atmega6450", ARCH_AVR5, "__AVR_ATmega6450__", 0, 0, 0x0100, 1, "m6450")
-AVR_MCU ("atmega6450a", ARCH_AVR5, "__AVR_ATmega6450A__", 0, 0, 0x0100, 1, "m6450a")
-AVR_MCU ("atmega6450p", ARCH_AVR5, "__AVR_ATmega6450P__", 0, 0, 0x0100, 1, "m6450p")
-AVR_MCU ("atmega649", ARCH_AVR5, "__AVR_ATmega649__", 0, 0, 0x0100, 1, "m649")
-AVR_MCU ("atmega649a", ARCH_AVR5, "__AVR_ATmega649A__", 0, 0, 0x0100, 1, "m649a")
-AVR_MCU ("atmega649p", ARCH_AVR5, "__AVR_ATmega649P__", 0, 0, 0x0100, 1, "m649p")
-AVR_MCU ("atmega6490", ARCH_AVR5, "__AVR_ATmega6490__", 0, 0, 0x0100, 1, "m6490")
-AVR_MCU ("atmega16hva", ARCH_AVR5, "__AVR_ATmega16HVA__", 0, 0, 0x0100, 1, "m16hva")
-AVR_MCU ("atmega16hva2", ARCH_AVR5, "__AVR_ATmega16HVA2__", 0, 0, 0x0100, 1, "m16hva2")
-AVR_MCU ("atmega32hvb", ARCH_AVR5, "__AVR_ATmega32HVB__", 0, 0, 0x0100, 1, "m32hvb")
-AVR_MCU ("atmega6490a", ARCH_AVR5, "__AVR_ATmega6490A__", 0, 0, 0x0100, 1, "m6490a")
-AVR_MCU ("atmega6490p", ARCH_AVR5, "__AVR_ATmega6490P__", 0, 0, 0x0100, 1, "m6490p")
-AVR_MCU ("atmega64c1", ARCH_AVR5, "__AVR_ATmega64C1__", 0, 0, 0x0100, 1, "m64c1")
-AVR_MCU ("atmega64m1", ARCH_AVR5, "__AVR_ATmega64M1__", 0, 0, 0x0100, 1, "m64m1")
-AVR_MCU ("atmega64hve", ARCH_AVR5, "__AVR_ATmega64HVE__", 0, 0, 0x0100, 1, "m64hve")
-AVR_MCU ("atmega64rfa2", ARCH_AVR5, "__AVR_ATmega64RFA2__", 0, 0, 0x0200, 1, "m64rfa2")
-AVR_MCU ("atmega64rfr2", ARCH_AVR5, "__AVR_ATmega64RFR2__", 0, 0, 0x0200, 1, "m64rfr2")
-AVR_MCU ("atmega32hvbrevb", ARCH_AVR5, "__AVR_ATmega32HVBREVB__", 0, 0, 0x0100, 1, "m32hvbrevb")
-AVR_MCU ("atmega48hvf", ARCH_AVR5, "__AVR_ATmega48HVF__", 0, 0, 0x0100, 1, "m48hvf")
-AVR_MCU ("at90can32", ARCH_AVR5, "__AVR_AT90CAN32__", 0, 0, 0x0100, 1, "can32")
-AVR_MCU ("at90can64", ARCH_AVR5, "__AVR_AT90CAN64__", 0, 0, 0x0100, 1, "can64")
-AVR_MCU ("at90pwm161", ARCH_AVR5, "__AVR_AT90PWM161__", 0, 0, 0x0100, 1, "90pwm161")
-AVR_MCU ("at90pwm216", ARCH_AVR5, "__AVR_AT90PWM216__", 0, 0, 0x0100, 1, "90pwm216")
-AVR_MCU ("at90pwm316", ARCH_AVR5, "__AVR_AT90PWM316__", 0, 0, 0x0100, 1, "90pwm316")
-AVR_MCU ("at90scr100", ARCH_AVR5, "__AVR_AT90SCR100__", 0, 0, 0x0100, 1, "90scr100")
-AVR_MCU ("at90usb646", ARCH_AVR5, "__AVR_AT90USB646__", 0, 0, 0x0100, 1, "usb646")
-AVR_MCU ("at90usb647", ARCH_AVR5, "__AVR_AT90USB647__", 0, 0, 0x0100, 1, "usb647")
-AVR_MCU ("at94k", ARCH_AVR5, "__AVR_AT94K__", 0, 0, 0x0060, 1, "at94k")
-AVR_MCU ("m3000", ARCH_AVR5, "__AVR_M3000__", 0, 0, 0x1000, 1, "m3000")
+AVR_MCU ("avr5", ARCH_AVR5, AVR_ISA_NONE, NULL, 0x0060, 1, "m16")
+AVR_MCU ("ata5790", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATA5790__", 0x0100, 1, "a5790")
+AVR_MCU ("ata5790n", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATA5790N__", 0x0100, 1, "a5790n")
+AVR_MCU ("ata5795", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATA5795__", 0x0100, 1, "a5795")
+AVR_MCU ("atmega16", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega16__", 0x0060, 1, "m16")
+AVR_MCU ("atmega16a", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega16A__", 0x0060, 1, "m16a")
+AVR_MCU ("atmega161", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega161__", 0x0060, 1, "m161")
+AVR_MCU ("atmega162", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega162__", 0x0100, 1, "m162")
+AVR_MCU ("atmega163", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega163__", 0x0060, 1, "m163")
+AVR_MCU ("atmega164a", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega164A__", 0x0100, 1, "m164a")
+AVR_MCU ("atmega164p", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega164P__", 0x0100, 1, "m164p")
+AVR_MCU ("atmega164pa", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega164PA__", 0x0100, 1, "m164pa")
+AVR_MCU ("atmega165", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega165__", 0x0100, 1, "m165")
+AVR_MCU ("atmega165a", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega165A__", 0x0100, 1, "m165a")
+AVR_MCU ("atmega165p", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega165P__", 0x0100, 1, "m165p")
+AVR_MCU ("atmega165pa", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega165PA__", 0x0100, 1, "m165pa")
+AVR_MCU ("atmega168", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega168__", 0x0100, 1, "m168")
+AVR_MCU ("atmega168a", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega168A__", 0x0100, 1, "m168a")
+AVR_MCU ("atmega168p", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega168P__", 0x0100, 1, "m168p")
+AVR_MCU ("atmega168pa", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega168PA__", 0x0100, 1, "m168pa")
+AVR_MCU ("atmega169", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega169__", 0x0100, 1, "m169")
+AVR_MCU ("atmega169a", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega169A__", 0x0100, 1, "m169a")
+AVR_MCU ("atmega169p", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega169P__", 0x0100, 1, "m169p")
+AVR_MCU ("atmega169pa", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega169PA__", 0x0100, 1, "m169pa")
+AVR_MCU ("atmega16hvb", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega16HVB__", 0x0100, 1, "m16hvb")
+AVR_MCU ("atmega16hvbrevb", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega16HVBREVB__", 0x0100, 1, "m16hvbrevb")
+AVR_MCU ("atmega16m1", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega16M1__", 0x0100, 1, "m16m1")
+AVR_MCU ("atmega16u4", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega16U4__", 0x0100, 1, "m16u4")
+AVR_MCU ("atmega26hvg", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega26HVG__", 0x0100, 1, "m26hvg")
+AVR_MCU ("atmega32a", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega32A__", 0x0060, 1, "m32a")
+AVR_MCU ("atmega32", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega32__", 0x0060, 1, "m32")
+AVR_MCU ("atmega323", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega323__", 0x0060, 1, "m323")
+AVR_MCU ("atmega324a", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega324A__", 0x0100, 1, "m324a")
+AVR_MCU ("atmega324p", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega324P__", 0x0100, 1, "m324p")
+AVR_MCU ("atmega324pa", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega324PA__", 0x0100, 1, "m324pa")
+AVR_MCU ("atmega325", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega325__", 0x0100, 1, "m325")
+AVR_MCU ("atmega325a", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega325A__", 0x0100, 1, "m325a")
+AVR_MCU ("atmega325p", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega325P__", 0x0100, 1, "m325p")
+AVR_MCU ("atmega3250", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega3250__", 0x0100, 1, "m3250")
+AVR_MCU ("atmega3250a", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega3250A__", 0x0100, 1, "m3250a")
+AVR_MCU ("atmega3250p", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega3250P__", 0x0100, 1, "m3250p")
+AVR_MCU ("atmega3250pa", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega3250PA__", 0x0100, 1, "m3250pa")
+AVR_MCU ("atmega328", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega328__", 0x0100, 1, "m328")
+AVR_MCU ("atmega328p", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega328P__", 0x0100, 1, "m328p")
+AVR_MCU ("atmega329", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega329__", 0x0100, 1, "m329")
+AVR_MCU ("atmega329a", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega329A__", 0x0100, 1, "m329a")
+AVR_MCU ("atmega329p", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega329P__", 0x0100, 1, "m329p")
+AVR_MCU ("atmega329pa", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega329PA__", 0x0100, 1, "m329pa")
+AVR_MCU ("atmega3290", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega3290__", 0x0100, 1, "m3290")
+AVR_MCU ("atmega3290a", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega3290A__", 0x0100, 1, "m3290a")
+AVR_MCU ("atmega3290p", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega3290P__", 0x0100, 1, "m3290p")
+AVR_MCU ("atmega3290pa", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega3290PA__", 0x0100, 1, "m3290pa")
+AVR_MCU ("atmega32c1", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega32C1__", 0x0100, 1, "m32c1")
+AVR_MCU ("atmega32m1", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega32M1__", 0x0100, 1, "m32m1")
+AVR_MCU ("atmega32u4", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega32U4__", 0x0100, 1, "m32u4")
+AVR_MCU ("atmega32u6", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega32U6__", 0x0100, 1, "m32u6")
+AVR_MCU ("atmega406", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega406__", 0x0100, 1, "m406")
+AVR_MCU ("atmega64", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega64__", 0x0100, 1, "m64")
+AVR_MCU ("atmega64a", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega64A__", 0x0100, 1, "m64a")
+AVR_MCU ("atmega640", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega640__", 0x0200, 1, "m640")
+AVR_MCU ("atmega644", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega644__", 0x0100, 1, "m644")
+AVR_MCU ("atmega644a", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega644A__", 0x0100, 1, "m644a")
+AVR_MCU ("atmega644p", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega644P__", 0x0100, 1, "m644p")
+AVR_MCU ("atmega644pa", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega644PA__", 0x0100, 1, "m644pa")
+AVR_MCU ("atmega645", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega645__", 0x0100, 1, "m645")
+AVR_MCU ("atmega645a", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega645A__", 0x0100, 1, "m645a")
+AVR_MCU ("atmega645p", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega645P__", 0x0100, 1, "m645p")
+AVR_MCU ("atmega6450", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega6450__", 0x0100, 1, "m6450")
+AVR_MCU ("atmega6450a", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega6450A__", 0x0100, 1, "m6450a")
+AVR_MCU ("atmega6450p", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega6450P__", 0x0100, 1, "m6450p")
+AVR_MCU ("atmega649", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega649__", 0x0100, 1, "m649")
+AVR_MCU ("atmega649a", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega649A__", 0x0100, 1, "m649a")
+AVR_MCU ("atmega649p", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega649P__", 0x0100, 1, "m649p")
+AVR_MCU ("atmega6490", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega6490__", 0x0100, 1, "m6490")
+AVR_MCU ("atmega16hva", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega16HVA__", 0x0100, 1, "m16hva")
+AVR_MCU ("atmega16hva2", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega16HVA2__", 0x0100, 1, "m16hva2")
+AVR_MCU ("atmega32hvb", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega32HVB__", 0x0100, 1, "m32hvb")
+AVR_MCU ("atmega6490a", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega6490A__", 0x0100, 1, "m6490a")
+AVR_MCU ("atmega6490p", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega6490P__", 0x0100, 1, "m6490p")
+AVR_MCU ("atmega64c1", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega64C1__", 0x0100, 1, "m64c1")
+AVR_MCU ("atmega64m1", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega64M1__", 0x0100, 1, "m64m1")
+AVR_MCU ("atmega64hve", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega64HVE__", 0x0100, 1, "m64hve")
+AVR_MCU ("atmega64rfa2", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega64RFA2__", 0x0200, 1, "m64rfa2")
+AVR_MCU ("atmega64rfr2", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega64RFR2__", 0x0200, 1, "m64rfr2")
+AVR_MCU ("atmega32hvbrevb", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega32HVBREVB__", 0x0100, 1, "m32hvbrevb")
+AVR_MCU ("atmega48hvf", ARCH_AVR5, AVR_ISA_NONE, "__AVR_ATmega48HVF__", 0x0100, 1, "m48hvf")
+AVR_MCU ("at90can32", ARCH_AVR5, AVR_ISA_NONE, "__AVR_AT90CAN32__", 0x0100, 1, "can32")
+AVR_MCU ("at90can64", ARCH_AVR5, AVR_ISA_NONE, "__AVR_AT90CAN64__", 0x0100, 1, "can64")
+AVR_MCU ("at90pwm161", ARCH_AVR5, AVR_ISA_NONE, "__AVR_AT90PWM161__", 0x0100, 1, "90pwm161")
+AVR_MCU ("at90pwm216", ARCH_AVR5, AVR_ISA_NONE, "__AVR_AT90PWM216__", 0x0100, 1, "90pwm216")
+AVR_MCU ("at90pwm316", ARCH_AVR5, AVR_ISA_NONE, "__AVR_AT90PWM316__", 0x0100, 1, "90pwm316")
+AVR_MCU ("at90scr100", ARCH_AVR5, AVR_ISA_NONE, "__AVR_AT90SCR100__", 0x0100, 1, "90scr100")
+AVR_MCU ("at90usb646", ARCH_AVR5, AVR_ISA_NONE, "__AVR_AT90USB646__", 0x0100, 1, "usb646")
+AVR_MCU ("at90usb647", ARCH_AVR5, AVR_ISA_NONE, "__AVR_AT90USB647__", 0x0100, 1, "usb647")
+AVR_MCU ("at94k", ARCH_AVR5, AVR_ISA_NONE, "__AVR_AT94K__", 0x0060, 1, "at94k")
+AVR_MCU ("m3000", ARCH_AVR5, AVR_ISA_NONE, "__AVR_M3000__", 0x1000, 1, "m3000")
/* Enhanced, == 128K. */
-AVR_MCU ("avr51", ARCH_AVR51, NULL, 0, 0, 0x0100, 2, "m128")
-AVR_MCU ("atmega128", ARCH_AVR51, "__AVR_ATmega128__", 0, 0, 0x0100, 2, "m128")
-AVR_MCU ("atmega128a", ARCH_AVR51, "__AVR_ATmega128A__", 0, 0, 0x0100, 2, "m128a")
-AVR_MCU ("atmega1280", ARCH_AVR51, "__AVR_ATmega1280__", 0, 0, 0x0200, 2, "m1280")
-AVR_MCU ("atmega1281", ARCH_AVR51, "__AVR_ATmega1281__", 0, 0, 0x0200, 2, "m1281")
-AVR_MCU ("atmega1284", ARCH_AVR51, "__AVR_ATmega1284__", 0, 0, 0x0100, 2, "m1284")
-AVR_MCU ("atmega1284p", ARCH_AVR51, "__AVR_ATmega1284P__", 0, 0, 0x0100, 2, "m1284p")
-AVR_MCU ("atmega128rfa1", ARCH_AVR51, "__AVR_ATmega128RFA1__", 0, 0, 0x0200, 2, "m128rfa1")
-AVR_MCU ("at90can128", ARCH_AVR51, "__AVR_AT90CAN128__", 0, 0, 0x0100, 2, "can128")
-AVR_MCU ("at90usb1286", ARCH_AVR51, "__AVR_AT90USB1286__", 0, 0, 0x0100, 2, "usb1286")
-AVR_MCU ("at90usb1287", ARCH_AVR51, "__AVR_AT90USB1287__", 0, 0, 0x0100, 2, "usb1287")
+AVR_MCU ("avr51", ARCH_AVR51, AVR_ISA_NONE, NULL, 0x0100, 2, "m128")
+AVR_MCU ("atmega128", ARCH_AVR51, AVR_ISA_NONE, "__AVR_ATmega128__", 0x0100, 2, "m128")
+AVR_MCU ("atmega128a", ARCH_AVR51, AVR_ISA_NONE, "__AVR_ATmega128A__", 0x0100, 2, "m128a")
+AVR_MCU ("atmega1280", ARCH_AVR51, AVR_ISA_NONE, "__AVR_ATmega1280__", 0x0200, 2, "m1280")
+AVR_MCU ("atmega1281", ARCH_AVR51, AVR_ISA_NONE, "__AVR_ATmega1281__", 0x0200, 2, "m1281")
+AVR_MCU ("atmega1284", ARCH_AVR51, AVR_ISA_NONE, "__AVR_ATmega1284__", 0x0100, 2, "m1284")
+AVR_MCU ("atmega1284p", ARCH_AVR51, AVR_ISA_NONE, "__AVR_ATmega1284P__", 0x0100, 2, "m1284p")
+AVR_MCU ("atmega128rfa1", ARCH_AVR51, AVR_ISA_NONE, "__AVR_ATmega128RFA1__", 0x0200, 2, "m128rfa1")
+AVR_MCU ("at90can128", ARCH_AVR51, AVR_ISA_NONE, "__AVR_AT90CAN128__", 0x0100, 2, "can128")
+AVR_MCU ("at90usb1286", ARCH_AVR51, AVR_ISA_NONE, "__AVR_AT90USB1286__", 0x0100, 2, "usb1286")
+AVR_MCU ("at90usb1287", ARCH_AVR51, AVR_ISA_NONE, "__AVR_AT90USB1287__", 0x0100, 2, "usb1287")
/* 3-Byte PC. */
-AVR_MCU ("avr6", ARCH_AVR6, NULL, 0, 0, 0x0200, 4, "m2561")
-AVR_MCU ("atmega2560", ARCH_AVR6, "__AVR_ATmega2560__", 0, 0, 0x0200, 4, "m2560")
-AVR_MCU ("atmega2561", ARCH_AVR6, "__AVR_ATmega2561__", 0, 0, 0x0200, 4, "m2561")
+AVR_MCU ("avr6", ARCH_AVR6, AVR_ISA_NONE, NULL, 0x0200, 4, "m2561")
+AVR_MCU ("atmega2560", ARCH_AVR6, AVR_ISA_NONE, "__AVR_ATmega2560__", 0x0200, 4, "m2560")
+AVR_MCU ("atmega2561", ARCH_AVR6, AVR_ISA_NONE, "__AVR_ATmega2561__", 0x0200, 4, "m2561")
/* Xmega, 16K <= Flash < 64K, RAM <= 64K */
-AVR_MCU ("avrxmega2", ARCH_AVRXMEGA2, NULL, 0, 0, 0x2000, 1, "x32a4")
-AVR_MCU ("atxmega16a4", ARCH_AVRXMEGA2, "__AVR_ATxmega16A4__", 0, 0, 0x2000, 1, "x16a4")
-AVR_MCU ("atxmega16d4", ARCH_AVRXMEGA2, "__AVR_ATxmega16D4__", 0, 0, 0x2000, 1, "x16d4")
-AVR_MCU ("atxmega32a4", ARCH_AVRXMEGA2, "__AVR_ATxmega32A4__", 0, 0, 0x2000, 1, "x32a4")
-AVR_MCU ("atxmega32d4", ARCH_AVRXMEGA2, "__AVR_ATxmega32D4__", 0, 0, 0x2000, 1, "x32d4")
-AVR_MCU ("atxmega32x1", ARCH_AVRXMEGA2, "__AVR_ATxmega32X1__", 0, 0, 0x2000, 1, "x32x1")
-AVR_MCU ("atmxt112sl", ARCH_AVRXMEGA2, "__AVR_ATMXT112SL__", 0, 0, 0x2000, 1, "mxt112sl")
-AVR_MCU ("atmxt224", ARCH_AVRXMEGA2, "__AVR_ATMXT224__", 0, 0, 0x2000, 1, "mxt224")
-AVR_MCU ("atmxt224e", ARCH_AVRXMEGA2, "__AVR_ATMXT224E__", 0, 0, 0x2000, 1, "mxt224e")
-AVR_MCU ("atmxt336s", ARCH_AVRXMEGA2, "__AVR_ATMXT336S__", 0, 0, 0x2000, 1, "mxt336s")
-AVR_MCU ("atxmega16a4u", ARCH_AVRXMEGA2, "__AVR_ATxmega16A4U__", 0, 0, 0x2000, 1, "x16a4u")
-AVR_MCU ("atxmega16c4", ARCH_AVRXMEGA2, "__AVR_ATxmega16C4__", 0, 0, 0x2000, 1, "x16c4")
-AVR_MCU ("atxmega32a4u", ARCH_AVRXMEGA2, "__AVR_ATxmega32A4U__", 0, 0, 0x2000, 1, "x32a4u")
-AVR_MCU ("atxmega32c4", ARCH_AVRXMEGA2, "__AVR_ATxmega32C4__", 0, 0, 0x2000, 1, "x32c4")
-AVR_MCU ("atxmega32e5", ARCH_AVRXMEGA2, "__AVR_ATxmega32E5__", 0, 0, 0x2000, 1, "x32e5")
+AVR_MCU ("avrxmega2", ARCH_AVRXMEGA2, AVR_ISA_NONE, NULL, 0x2000, 1, "x32a4")
+AVR_MCU ("atxmega16a4", ARCH_AVRXMEGA2, AVR_ISA_NONE, "__AVR_ATxmega16A4__", 0x2000, 1, "x16a4")
+AVR_MCU ("atxmega16d4", ARCH_AVRXMEGA2, AVR_ISA_NONE, "__AVR_ATxmega16D4__", 0x2000, 1, "x16d4")
+AVR_MCU ("atxmega32a4", ARCH_AVRXMEGA2, AVR_ISA_NONE, "__AVR_ATxmega32A4__", 0x2000, 1, "x32a4")
+AVR_MCU ("atxmega32d4", ARCH_AVRXMEGA2, AVR_ISA_NONE, "__AVR_ATxmega32D4__", 0x2000, 1, "x32d4")
+AVR_MCU ("atxmega32x1", ARCH_AVRXMEGA2, AVR_ISA_NONE, "__AVR_ATxmega32X1__", 0x2000, 1, "x32x1")
+AVR_MCU ("atmxt112sl", ARCH_AVRXMEGA2, AVR_ISA_NONE, "__AVR_ATMXT112SL__", 0x2000, 1, "mxt112sl")
+AVR_MCU ("atmxt224", ARCH_AVRXMEGA2, AVR_ISA_NONE, "__AVR_ATMXT224__", 0x2000, 1, "mxt224")
+AVR_MCU ("atmxt224e", ARCH_AVRXMEGA2, AVR_ISA_NONE, "__AVR_ATMXT224E__", 0x2000, 1, "mxt224e")
+AVR_MCU ("atmxt336s", ARCH_AVRXMEGA2, AVR_ISA_NONE, "__AVR_ATMXT336S__", 0x2000, 1, "mxt336s")
+AVR_MCU ("atxmega16a4u", ARCH_AVRXMEGA2, AVR_ISA_RMW, "__AVR_ATxmega16A4U__", 0x2000, 1, "x16a4u")
+AVR_MCU ("atxmega16c4", ARCH_AVRXMEGA2, AVR_ISA_RMW, "__AVR_ATxmega16C4__", 0x2000, 1, "x16c4")
+AVR_MCU ("atxmega32a4u", ARCH_AVRXMEGA2, AVR_ISA_RMW, "__AVR_ATxmega32A4U__", 0x2000, 1, "x32a4u")
+AVR_MCU ("atxmega32c4", ARCH_AVRXMEGA2, AVR_ISA_RMW, "__AVR_ATxmega32C4__", 0x2000, 1, "x32c4")
+AVR_MCU ("atxmega32e5", ARCH_AVRXMEGA2, AVR_ISA_NONE, "__AVR_ATxmega32E5__", 0x2000, 1, "x32e5")
/* Xmega, 64K < Flash <= 128K, RAM <= 64K */
-AVR_MCU ("avrxmega4", ARCH_AVRXMEGA4, NULL, 0, 0, 0x2000, 2, "x64a4")
-AVR_MCU ("atxmega64a3", ARCH_AVRXMEGA4, "__AVR_ATxmega64A3__", 0, 0, 0x2000, 2, "x64a3")
-AVR_MCU ("atxmega64d3", ARCH_AVRXMEGA4, "__AVR_ATxmega64D3__", 0, 0, 0x2000, 2, "x64d3")
-AVR_MCU ("atxmega64a3u", ARCH_AVRXMEGA4, "__AVR_ATxmega64A3U__", 0, 0, 0x2000, 2, "x64a3u")
-AVR_MCU ("atxmega64a4u", ARCH_AVRXMEGA4, "__AVR_ATxmega64A4U__", 0, 0, 0x2000, 2, "x64a4u")
-AVR_MCU ("atxmega64b1", ARCH_AVRXMEGA4, "__AVR_ATxmega64B1__", 0, 0, 0x2000, 2, "x64b1")
-AVR_MCU ("atxmega64b3", ARCH_AVRXMEGA4, "__AVR_ATxmega64B3__", 0, 0, 0x2000, 2, "x64b3")
-AVR_MCU ("atxmega64c3", ARCH_AVRXMEGA4, "__AVR_ATxmega64C3__", 0, 0, 0x2000, 2, "x64c3")
-AVR_MCU ("atxmega64d4", ARCH_AVRXMEGA4, "__AVR_ATxmega64D4__", 0, 0, 0x2000, 2, "x64d4")
+AVR_MCU ("avrxmega4", ARCH_AVRXMEGA4, AVR_ISA_NONE, NULL, 0x2000, 2, "x64a4")
+AVR_MCU ("atxmega64a3", ARCH_AVRXMEGA4, AVR_ISA_NONE, "__AVR_ATxmega64A3__", 0x2000, 2, "x64a3")
+AVR_MCU ("atxmega64d3", ARCH_AVRXMEGA4, AVR_ISA_NONE, "__AVR_ATxmega64D3__", 0x2000, 2, "x64d3")
+AVR_MCU ("atxmega64a3u", ARCH_AVRXMEGA4, AVR_ISA_RMW, "__AVR_ATxmega64A3U__", 0x2000, 2, "x64a3u")
+AVR_MCU ("atxmega64a4u", ARCH_AVRXMEGA4, AVR_ISA_RMW, "__AVR_ATxmega64A4U__", 0x2000, 2, "x64a4u")
+AVR_MCU ("atxmega64b1", ARCH_AVRXMEGA4, AVR_ISA_RMW, "__AVR_ATxmega64B1__", 0x2000, 2, "x64b1")
+AVR_MCU ("atxmega64b3", ARCH_AVRXMEGA4, AVR_ISA_RMW, "__AVR_ATxmega64B3__", 0x2000, 2, "x64b3")
+AVR_MCU ("atxmega64c3", ARCH_AVRXMEGA4, AVR_ISA_RMW, "__AVR_ATxmega64C3__", 0x2000, 2, "x64c3")
+AVR_MCU ("atxmega64d4", ARCH_AVRXMEGA4, AVR_ISA_NONE, "__AVR_ATxmega64D4__", 0x2000, 2, "x64d4")
/* Xmega, 64K < Flash <= 128K, RAM > 64K */
-AVR_MCU ("avrxmega5", ARCH_AVRXMEGA5, NULL, 0, 0, 0x2000, 2, "x64a1")
-AVR_MCU ("atxmega64a1", ARCH_AVRXMEGA5, "__AVR_ATxmega64A1__", 0, 0, 0x2000, 2, "x64a1")
-AVR_MCU ("atxmega64a1u", ARCH_AVRXMEGA5, "__AVR_ATxmega64A1U__", 0, 0, 0x2000, 2, "x64a1u")
+AVR_MCU ("avrxmega5", ARCH_AVRXMEGA5, AVR_ISA_NONE, NULL, 0x2000, 2, "x64a1")
+AVR_MCU ("atxmega64a1", ARCH_AVRXMEGA5, AVR_ISA_NONE, "__AVR_ATxmega64A1__", 0x2000, 2, "x64a1")
+AVR_MCU ("atxmega64a1u", ARCH_AVRXMEGA5, AVR_ISA_RMW, "__AVR_ATxmega64A1U__", 0x2000, 2, "x64a1u")
/* Xmega, 128K < Flash, RAM <= 64K */
-AVR_MCU ("avrxmega6", ARCH_AVRXMEGA6, NULL, 0, 0, 0x2000, 6, "x128a3")
-AVR_MCU ("atxmega128a3", ARCH_AVRXMEGA6, "__AVR_ATxmega128A3__", 0, 0, 0x2000, 3, "x128a3")
-AVR_MCU ("atxmega128d3", ARCH_AVRXMEGA6, "__AVR_ATxmega128D3__", 0, 0, 0x2000, 3, "x128d3")
-AVR_MCU ("atxmega192a3", ARCH_AVRXMEGA6, "__AVR_ATxmega192A3__", 0, 0, 0x2000, 4, "x192a3")
-AVR_MCU ("atxmega192d3", ARCH_AVRXMEGA6, "__AVR_ATxmega192D3__", 0, 0, 0x2000, 4, "x192d3")
-AVR_MCU ("atxmega256a3", ARCH_AVRXMEGA6, "__AVR_ATxmega256A3__", 0, 0, 0x2000, 5, "x256a3")
-AVR_MCU ("atxmega256a3b", ARCH_AVRXMEGA6, "__AVR_ATxmega256A3B__", 0, 0, 0x2000, 5, "x256a3b")
-AVR_MCU ("atxmega256a3bu", ARCH_AVRXMEGA6, "__AVR_ATxmega256A3BU__", 0, 0, 0x2000, 5, "x256a3bu")
-AVR_MCU ("atxmega256d3", ARCH_AVRXMEGA6, "__AVR_ATxmega256D3__", 0, 0, 0x2000, 5, "x256d3")
-AVR_MCU ("atxmega128a3u", ARCH_AVRXMEGA6, "__AVR_ATxmega128A3U__", 0, 0, 0x2000, 3, "x128a3u")
-AVR_MCU ("atxmega128b1", ARCH_AVRXMEGA6, "__AVR_ATxmega128B1__", 0, 0, 0x2000, 3, "x128b1")
-AVR_MCU ("atxmega128b3", ARCH_AVRXMEGA6, "__AVR_ATxmega128B3__", 0, 0, 0x2000, 3, "x128b3")
-AVR_MCU ("atxmega128c3", ARCH_AVRXMEGA6, "__AVR_ATxmega128C3__", 0, 0, 0x2000, 3, "x128c3")
-AVR_MCU ("atxmega128d4", ARCH_AVRXMEGA6, "__AVR_ATxmega128D4__", 0, 0, 0x2000, 3, "x128d4")
-AVR_MCU ("atmxt540s", ARCH_AVRXMEGA6, "__AVR_ATMXT540S__", 0, 0, 0x2000, 2, "mxt540s")
-AVR_MCU ("atmxt540sreva", ARCH_AVRXMEGA6, "__AVR_ATMXT540SREVA__", 0, 0, 0x2000, 2, "mxt540sreva")
-AVR_MCU ("atxmega192a3u", ARCH_AVRXMEGA6, "__AVR_ATxmega192A3U__", 0, 0, 0x2000, 4, "x192a3u")
-AVR_MCU ("atxmega192c3", ARCH_AVRXMEGA6, "__AVR_ATxmega192C3__", 0, 0, 0x2000, 4, "x192c3")
-AVR_MCU ("atxmega256a3u", ARCH_AVRXMEGA6, "__AVR_ATxmega256A3U__", 0, 0, 0x2000, 5, "x256a3u")
-AVR_MCU ("atxmega256c3", ARCH_AVRXMEGA6, "__AVR_ATxmega256C3__", 0, 0, 0x2000, 5, "x256c3")
-AVR_MCU ("atxmega384c3", ARCH_AVRXMEGA6, "__AVR_ATxmega384C3__", 0, 0, 0x2000, 6, "x384c3")
-AVR_MCU ("atxmega384d3", ARCH_AVRXMEGA6, "__AVR_ATxmega384D3__", 0, 0, 0x2000, 6, "x384d3")
+AVR_MCU ("avrxmega6", ARCH_AVRXMEGA6, AVR_ISA_NONE, NULL, 0x2000, 6, "x128a3")
+AVR_MCU ("atxmega128a3", ARCH_AVRXMEGA6, AVR_ISA_NONE, "__AVR_ATxmega128A3__", 0x2000, 3, "x128a3")
+AVR_MCU ("atxmega128d3", ARCH_AVRXMEGA6, AVR_ISA_NONE, "__AVR_ATxmega128D3__", 0x2000, 3, "x128d3")
+AVR_MCU ("atxmega192a3", ARCH_AVRXMEGA6, AVR_ISA_NONE, "__AVR_ATxmega192A3__", 0x2000, 4, "x192a3")
+AVR_MCU ("atxmega192d3", ARCH_AVRXMEGA6, AVR_ISA_NONE, "__AVR_ATxmega192D3__", 0x2000, 4, "x192d3")
+AVR_MCU ("atxmega256a3", ARCH_AVRXMEGA6, AVR_ISA_NONE, "__AVR_ATxmega256A3__", 0x2000, 5, "x256a3")
+AVR_MCU ("atxmega256a3b", ARCH_AVRXMEGA6, AVR_ISA_NONE, "__AVR_ATxmega256A3B__", 0x2000, 5, "x256a3b")
+AVR_MCU ("atxmega256a3bu", ARCH_AVRXMEGA6, AVR_ISA_NONE, "__AVR_ATxmega258A3BU__", 0x2000, 5, "x256a3bu")
+AVR_MCU ("atxmega256d3", ARCH_AVRXMEGA6, AVR_ISA_NONE, "__AVR_ATxmega256D3__", 0x2000, 5, "x256d3")
+AVR_MCU ("atxmega128a3u", ARCH_AVRXMEGA6, AVR_ISA_RMW, "__AVR_ATxmega128A3U__", 0x2000, 3, "x128a3u")
+AVR_MCU ("atxmega128b1", ARCH_AVRXMEGA6, AVR_ISA_RMW, "__AVR_ATxmega128B1__", 0x2000, 3, "x128b1")
+AVR_MCU ("atxmega128b3", ARCH_AVRXMEGA6, AVR_ISA_RMW, "__AVR_ATxmega128B3__", 0x2000, 3, "x128b3")
+AVR_MCU ("atxmega128c3", ARCH_AVRXMEGA6, AVR_ISA_RMW, "__AVR_ATxmega128C3__", 0x2000, 3, "x128c3")
+AVR_MCU ("atxmega128d4", ARCH_AVRXMEGA6, AVR_ISA_NONE, "__AVR_ATxmega128D4__", 0x2000, 3, "x128d4")
+AVR_MCU ("atmxt540s", ARCH_AVRXMEGA6, AVR_ISA_NONE, "__AVR_ATMXT540S__", 0x2000, 2, "mxt540s")
+AVR_MCU ("atmxt540sreva", ARCH_AVRXMEGA6, AVR_ISA_NONE, "__AVR_ATMXT540SREVA__", 0x2000, 2, "mxt540sreva")
+AVR_MCU ("atxmega192a3u", ARCH_AVRXMEGA6, AVR_ISA_RMW, "__AVR_ATxmega192A3U__", 0x2000, 4, "x192a3u")
+AVR_MCU ("atxmega192c3", ARCH_AVRXMEGA6, AVR_ISA_RMW, "__AVR_ATxmega192C3__", 0x2000, 4, "x192c3")
+AVR_MCU ("atxmega256a3u", ARCH_AVRXMEGA6, AVR_ISA_RMW, "__AVR_ATxmega256A3U__", 0x2000, 5, "x256a3u")
+AVR_MCU ("atxmega256c3", ARCH_AVRXMEGA6, AVR_ISA_RMW, "__AVR_ATxmega256C3__", 0x2000, 5, "x256c3")
+AVR_MCU ("atxmega384c3", ARCH_AVRXMEGA6, AVR_ISA_RMW, "__AVR_ATxmega384C3__", 0x2000, 6, "x384c3")
+AVR_MCU ("atxmega384d3", ARCH_AVRXMEGA6, AVR_ISA_NONE, "__AVR_ATxmega384D3__", 0x2000, 6, "x384d3")
/* Xmega, 128K < Flash, RAM > 64K RAM. */
-AVR_MCU ("avrxmega7", ARCH_AVRXMEGA7, NULL, 0, 0, 0x2000, 3, "x128a1")
-AVR_MCU ("atxmega128a1", ARCH_AVRXMEGA7, "__AVR_ATxmega128A1__", 0, 0, 0x2000, 3, "x128a1")
-AVR_MCU ("atxmega128a1u", ARCH_AVRXMEGA7, "__AVR_ATxmega128A1U__", 0, 0, 0x2000, 3, "x128a1u")
-AVR_MCU ("atxmega128a4u", ARCH_AVRXMEGA7, "__AVR_ATxmega128A4U__", 0, 0, 0x2000, 3, "x128a4u")
+AVR_MCU ("avrxmega7", ARCH_AVRXMEGA7, AVR_ISA_NONE, NULL, 0x2000, 3, "x128a1")
+AVR_MCU ("atxmega128a1", ARCH_AVRXMEGA7, AVR_ISA_NONE, "__AVR_ATxmega128A1__", 0x2000, 3, "x128a1")
+AVR_MCU ("atxmega128a1u", ARCH_AVRXMEGA7, AVR_ISA_RMW, "__AVR_ATxmega128A1U__", 0x2000, 3, "x128a1u")
+AVR_MCU ("atxmega128a4u", ARCH_AVRXMEGA7, AVR_ISA_RMW, "__AVR_ATxmega128A4U__", 0x2000, 3, "x128a4u")
/* Assembler only. */
-AVR_MCU ("avr1", ARCH_AVR1, NULL, 0, 0, 0x0060, 1, "s1200")
-AVR_MCU ("at90s1200", ARCH_AVR1, "__AVR_AT90S1200__", 0, 0, 0x0060, 1, "s1200")
-AVR_MCU ("attiny11", ARCH_AVR1, "__AVR_ATtiny11__", 0, 0, 0x0060, 1, "tn11")
-AVR_MCU ("attiny12", ARCH_AVR1, "__AVR_ATtiny12__", 0, 0, 0x0060, 1, "tn12")
-AVR_MCU ("attiny15", ARCH_AVR1, "__AVR_ATtiny15__", 0, 0, 0x0060, 1, "tn15")
-AVR_MCU ("attiny28", ARCH_AVR1, "__AVR_ATtiny28__", 0, 0, 0x0060, 1, "tn28")
+AVR_MCU ("avr1", ARCH_AVR1, AVR_ISA_NONE, NULL, 0x0060, 1, "s1200")
+AVR_MCU ("at90s1200", ARCH_AVR1, AVR_ISA_NONE, "__AVR_AT90S1200__", 0x0060, 1, "s1200")
+AVR_MCU ("attiny11", ARCH_AVR1, AVR_ISA_NONE, "__AVR_ATtiny11__", 0x0060, 1, "tn11")
+AVR_MCU ("attiny12", ARCH_AVR1, AVR_ISA_NONE, "__AVR_ATtiny12__", 0x0060, 1, "tn12")
+AVR_MCU ("attiny15", ARCH_AVR1, AVR_ISA_NONE, "__AVR_ATtiny15__", 0x0060, 1, "tn15")
+AVR_MCU ("attiny28", ARCH_AVR1, AVR_ISA_NONE, "__AVR_ATtiny28__", 0x0060, 1, "tn28")
diff --git a/gcc-4.9/gcc/config/avr/avr.c b/gcc-4.9/gcc/config/avr/avr.c
index 8ca7de0b3..99644ec92 100644
--- a/gcc-4.9/gcc/config/avr/avr.c
+++ b/gcc-4.9/gcc/config/avr/avr.c
@@ -10120,7 +10120,7 @@ test_hard_reg_class (enum reg_class rclass, rtx x)
static bool
avr_2word_insn_p (rtx insn)
{
- if (avr_current_device->errata_skip
+ if ((avr_current_device->dev_attribute & AVR_ERRATA_SKIP)
|| !insn
|| 2 != get_attr_length (insn))
{
diff --git a/gcc-4.9/gcc/config/avr/avr.h b/gcc-4.9/gcc/config/avr/avr.h
index 74be83c8a..78434ec5e 100644
--- a/gcc-4.9/gcc/config/avr/avr.h
+++ b/gcc-4.9/gcc/config/avr/avr.h
@@ -88,8 +88,9 @@ enum
__AVR_HAVE_8BIT_SP__ and __AVR_HAVE_16BIT_SP__. During multilib generation
there is always __AVR_SP8__ == __AVR_HAVE_8BIT_SP__. */
-#define AVR_HAVE_8BIT_SP \
- (avr_current_device->short_sp || TARGET_TINY_STACK || avr_sp8)
+#define AVR_HAVE_8BIT_SP \
+ ((avr_current_device->dev_attribute & AVR_SHORT_SP) || \
+ TARGET_TINY_STACK || avr_sp8)
#define AVR_HAVE_SPH (!avr_sp8)
diff --git a/gcc-4.9/gcc/config/avr/avr.md b/gcc-4.9/gcc/config/avr/avr.md
index f2d8605cd..d7baa4a83 100644
--- a/gcc-4.9/gcc/config/avr/avr.md
+++ b/gcc-4.9/gcc/config/avr/avr.md
@@ -5342,7 +5342,7 @@
(label_ref (match_operand 0 "" ""))
(pc)))]
"!AVR_HAVE_JMP_CALL
- || !avr_current_device->errata_skip"
+ || !(avr_current_device->dev_attribute & AVR_ERRATA_SKIP)"
{
if (operands[2] == CONST0_RTX (<MODE>mode))
operands[2] = zero_reg_rtx;
diff --git a/gcc-4.9/gcc/config/avr/driver-avr.c b/gcc-4.9/gcc/config/avr/driver-avr.c
index cb5dd1d1d..76c8b3980 100644
--- a/gcc-4.9/gcc/config/avr/driver-avr.c
+++ b/gcc-4.9/gcc/config/avr/driver-avr.c
@@ -59,8 +59,8 @@ avr_device_to_as (int argc, const char **argv)
avr_set_current_device (argv[0]);
return concat ("-mmcu=", avr_current_arch->arch_name,
- avr_current_device->errata_skip ? "" : " -mno-skip-bug",
- NULL);
+ avr_current_device->dev_attribute & AVR_ERRATA_SKIP ? "" : " -mno-skip-bug",
+ avr_current_device->dev_attribute & AVR_ISA_RMW ? " -mrmw" : "", NULL);
}
/* Returns command line parameters to pass to ld. */
@@ -144,7 +144,7 @@ avr_device_to_sp8 (int argc, const char **argv)
|| avr_current_device->arch == ARCH_AVR25))
return "";
- return avr_current_device->short_sp
+ return (avr_current_device->dev_attribute & AVR_SHORT_SP)
? "-msp8"
: "%<msp8";
}
diff --git a/gcc-4.9/gcc/config/avr/genmultilib.awk b/gcc-4.9/gcc/config/avr/genmultilib.awk
index 90e5e5cfd..1dfeabbee 100644
--- a/gcc-4.9/gcc/config/avr/genmultilib.awk
+++ b/gcc-4.9/gcc/config/avr/genmultilib.awk
@@ -86,7 +86,7 @@ BEGIN {
name = $2
gsub ("\"", "", name)
- if ($4 == "NULL")
+ if ($5 == "NULL")
{
core = name
@@ -106,7 +106,17 @@ BEGIN {
if (core == "avr1")
next
- tiny_stack[name] = $5
+ # split device specific feature list
+ n = split($4,dev_attribute,"|")
+
+ # set tiny_stack false by default
+ tiny_stack[name] = 0
+ for (i=1; i <= n; i++)
+ if (dev_attribute[i] == "AVR_SHORT_SP") {
+ tiny_stack[name] = 1
+ break
+ }
+
mcu[n_mcu] = name
n_mcu++
option[name] = "mmcu=" name
diff --git a/gcc-4.9/gcc/config/elfos.h b/gcc-4.9/gcc/config/elfos.h
index 1fce7011b..c1d555312 100644
--- a/gcc-4.9/gcc/config/elfos.h
+++ b/gcc-4.9/gcc/config/elfos.h
@@ -287,7 +287,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
/* Write the extra assembler code needed to declare an object properly. */
#ifdef HAVE_GAS_GNU_UNIQUE_OBJECT
-#define USE_GNU_UNIQUE_OBJECT 1
+#define USE_GNU_UNIQUE_OBJECT flag_gnu_unique
#else
#define USE_GNU_UNIQUE_OBJECT 0
#endif
diff --git a/gcc-4.9/gcc/config/i386/avx512fintrin.h b/gcc-4.9/gcc/config/i386/avx512fintrin.h
index 960286618..314895ad7 100644
--- a/gcc-4.9/gcc/config/i386/avx512fintrin.h
+++ b/gcc-4.9/gcc/config/i386/avx512fintrin.h
@@ -39,6 +39,8 @@ typedef double __v8df __attribute__ ((__vector_size__ (64)));
typedef float __v16sf __attribute__ ((__vector_size__ (64)));
typedef long long __v8di __attribute__ ((__vector_size__ (64)));
typedef int __v16si __attribute__ ((__vector_size__ (64)));
+typedef short __v32hi __attribute__ ((__vector_size__ (64)));
+typedef char __v64qi __attribute__ ((__vector_size__ (64)));
/* The Intel API is flexible enough that we must allow aliasing with other
vector types, and their scalar components. */
@@ -130,6 +132,32 @@ _mm512_undefined_si512 (void)
return __Y;
}
+extern __inline __m512i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_set1_epi8 (char __A)
+{
+ return __extension__ (__m512i)(__v64qi)
+ { __A, __A, __A, __A, __A, __A, __A, __A,
+ __A, __A, __A, __A, __A, __A, __A, __A,
+ __A, __A, __A, __A, __A, __A, __A, __A,
+ __A, __A, __A, __A, __A, __A, __A, __A,
+ __A, __A, __A, __A, __A, __A, __A, __A,
+ __A, __A, __A, __A, __A, __A, __A, __A,
+ __A, __A, __A, __A, __A, __A, __A, __A,
+ __A, __A, __A, __A, __A, __A, __A, __A };
+}
+
+extern __inline __m512i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_set1_epi16 (short __A)
+{
+ return __extension__ (__m512i)(__v32hi)
+ { __A, __A, __A, __A, __A, __A, __A, __A,
+ __A, __A, __A, __A, __A, __A, __A, __A,
+ __A, __A, __A, __A, __A, __A, __A, __A,
+ __A, __A, __A, __A, __A, __A, __A, __A };
+}
+
extern __inline __m512d
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
_mm512_set1_pd (double __A)
@@ -152,6 +180,54 @@ _mm512_set1_ps (float __A)
(__mmask16) -1);
}
+/* Create the vector [A B C D A B C D A B C D A B C D]. */
+extern __inline __m512i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_set4_epi32 (int __A, int __B, int __C, int __D)
+{
+ return __extension__ (__m512i)(__v16si)
+ { __D, __C, __B, __A, __D, __C, __B, __A,
+ __D, __C, __B, __A, __D, __C, __B, __A };
+}
+
+extern __inline __m512i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_set4_epi64 (long long __A, long long __B, long long __C,
+ long long __D)
+{
+ return __extension__ (__m512i) (__v8di)
+ { __D, __C, __B, __A, __D, __C, __B, __A };
+}
+
+extern __inline __m512d
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_set4_pd (double __A, double __B, double __C, double __D)
+{
+ return __extension__ (__m512d)
+ { __D, __C, __B, __A, __D, __C, __B, __A };
+}
+
+extern __inline __m512
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_set4_ps (float __A, float __B, float __C, float __D)
+{
+ return __extension__ (__m512)
+ { __D, __C, __B, __A, __D, __C, __B, __A,
+ __D, __C, __B, __A, __D, __C, __B, __A };
+}
+
+#define _mm512_setr4_epi64(e0,e1,e2,e3) \
+ _mm512_set4_epi64(e3,e2,e1,e0)
+
+#define _mm512_setr4_epi32(e0,e1,e2,e3) \
+ _mm512_set4_epi32(e3,e2,e1,e0)
+
+#define _mm512_setr4_pd(e0,e1,e2,e3) \
+ _mm512_set4_pd(e3,e2,e1,e0)
+
+#define _mm512_setr4_ps(e0,e1,e2,e3) \
+ _mm512_set4_ps(e3,e2,e1,e0)
+
extern __inline __m512
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
_mm512_setzero_ps (void)
@@ -169,6 +245,13 @@ _mm512_setzero_pd (void)
extern __inline __m512i
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_setzero_epi32 (void)
+{
+ return __extension__ (__m512i)(__v8di){ 0, 0, 0, 0, 0, 0, 0, 0 };
+}
+
+extern __inline __m512i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
_mm512_setzero_si512 (void)
{
return __extension__ (__m512i)(__v8di){ 0, 0, 0, 0, 0, 0, 0, 0 };
diff --git a/gcc-4.9/gcc/config/i386/bmiintrin.h b/gcc-4.9/gcc/config/i386/bmiintrin.h
index b86adf179..b2d7c60ea 100644
--- a/gcc-4.9/gcc/config/i386/bmiintrin.h
+++ b/gcc-4.9/gcc/config/i386/bmiintrin.h
@@ -40,7 +40,6 @@ __tzcnt_u16 (unsigned short __X)
return __builtin_ctzs (__X);
}
-
extern __inline unsigned int __attribute__((__gnu_inline__, __always_inline__, __artificial__))
__andn_u32 (unsigned int __X, unsigned int __Y)
{
@@ -66,17 +65,34 @@ __blsi_u32 (unsigned int __X)
}
extern __inline unsigned int __attribute__((__gnu_inline__, __always_inline__, __artificial__))
+_blsi_u32 (unsigned int __X)
+{
+ return __blsi_u32 (__X);
+}
+
+extern __inline unsigned int __attribute__((__gnu_inline__, __always_inline__, __artificial__))
__blsmsk_u32 (unsigned int __X)
{
return __X ^ (__X - 1);
}
extern __inline unsigned int __attribute__((__gnu_inline__, __always_inline__, __artificial__))
+_blsmsk_u32 (unsigned int __X)
+{
+ return __blsmsk_u32 (__X);
+}
+
+extern __inline unsigned int __attribute__((__gnu_inline__, __always_inline__, __artificial__))
__blsr_u32 (unsigned int __X)
{
return __X & (__X - 1);
}
+extern __inline unsigned int __attribute__((__gnu_inline__, __always_inline__, __artificial__))
+_blsr_u32 (unsigned int __X)
+{
+ return __blsr_u32 (__X);
+}
extern __inline unsigned int __attribute__((__gnu_inline__, __always_inline__, __artificial__))
__tzcnt_u32 (unsigned int __X)
@@ -84,6 +100,12 @@ __tzcnt_u32 (unsigned int __X)
return __builtin_ctz (__X);
}
+extern __inline unsigned int __attribute__((__gnu_inline__, __always_inline__, __artificial__))
+_tzcnt_u32 (unsigned int __X)
+{
+ return __builtin_ctz (__X);
+}
+
#ifdef __x86_64__
extern __inline unsigned long long __attribute__((__gnu_inline__, __always_inline__, __artificial__))
@@ -111,23 +133,47 @@ __blsi_u64 (unsigned long long __X)
}
extern __inline unsigned long long __attribute__((__gnu_inline__, __always_inline__, __artificial__))
+_blsi_u64 (unsigned long long __X)
+{
+ return __blsi_u64 (__X);
+}
+
+extern __inline unsigned long long __attribute__((__gnu_inline__, __always_inline__, __artificial__))
__blsmsk_u64 (unsigned long long __X)
{
return __X ^ (__X - 1);
}
extern __inline unsigned long long __attribute__((__gnu_inline__, __always_inline__, __artificial__))
+_blsmsk_u64 (unsigned long long __X)
+{
+ return __blsmsk_u64 (__X);
+}
+
+extern __inline unsigned long long __attribute__((__gnu_inline__, __always_inline__, __artificial__))
__blsr_u64 (unsigned long long __X)
{
return __X & (__X - 1);
}
extern __inline unsigned long long __attribute__((__gnu_inline__, __always_inline__, __artificial__))
+_blsr_u64 (unsigned long long __X)
+{
+ return __blsr_u64 (__X);
+}
+
+extern __inline unsigned long long __attribute__((__gnu_inline__, __always_inline__, __artificial__))
__tzcnt_u64 (unsigned long long __X)
{
return __builtin_ctzll (__X);
}
+extern __inline unsigned long long __attribute__((__gnu_inline__, __always_inline__, __artificial__))
+_tzcnt_u64 (unsigned long long __X)
+{
+ return __builtin_ctzll (__X);
+}
+
#endif /* __x86_64__ */
#ifdef __DISABLE_BMI__
diff --git a/gcc-4.9/gcc/config/i386/constraints.md b/gcc-4.9/gcc/config/i386/constraints.md
index 65335f128..567e70564 100644
--- a/gcc-4.9/gcc/config/i386/constraints.md
+++ b/gcc-4.9/gcc/config/i386/constraints.md
@@ -220,6 +220,13 @@
;; We use W prefix to denote any number of
;; constant-or-symbol-reference constraints
+(define_constraint "We"
+ "32-bit signed integer constant, or a symbolic reference known
+ to fit that range (for sign-extending conversion operations that
+ require non-VOIDmode immediate operands)."
+ (and (match_operand 0 "x86_64_immediate_operand")
+ (match_test "GET_MODE (op) != VOIDmode")))
+
(define_constraint "Wz"
"32-bit unsigned integer constant, or a symbolic reference known
to fit that range (for zero-extending conversion operations that
diff --git a/gcc-4.9/gcc/config/i386/i386.c b/gcc-4.9/gcc/config/i386/i386.c
index 842be686d..3eefe4ac5 100644
--- a/gcc-4.9/gcc/config/i386/i386.c
+++ b/gcc-4.9/gcc/config/i386/i386.c
@@ -13925,13 +13925,13 @@ ix86_legitimize_address (rtx x, rtx oldx ATTRIBUTE_UNUSED,
if (GET_CODE (XEXP (x, 0)) == MULT)
{
changed = 1;
- XEXP (x, 0) = force_operand (XEXP (x, 0), 0);
+ XEXP (x, 0) = copy_addr_to_reg (XEXP (x, 0));
}
if (GET_CODE (XEXP (x, 1)) == MULT)
{
changed = 1;
- XEXP (x, 1) = force_operand (XEXP (x, 1), 0);
+ XEXP (x, 1) = copy_addr_to_reg (XEXP (x, 1));
}
if (changed
@@ -22755,7 +22755,7 @@ counter_mode (rtx count_exp)
static rtx
ix86_copy_addr_to_reg (rtx addr)
{
- if (GET_MODE (addr) == Pmode)
+ if (GET_MODE (addr) == Pmode || GET_MODE (addr) == VOIDmode)
return copy_addr_to_reg (addr);
else
{
diff --git a/gcc-4.9/gcc/config/i386/i386.md b/gcc-4.9/gcc/config/i386/i386.md
index 4a8b46388..25e2e93e3 100644
--- a/gcc-4.9/gcc/config/i386/i386.md
+++ b/gcc-4.9/gcc/config/i386/i386.md
@@ -971,6 +971,15 @@
(DI "x86_64_general_operand")
(TI "x86_64_general_operand")])
+;; General sign extend operand predicate for integer modes,
+;; which disallows VOIDmode operands and thus it is suitable
+;; for use inside sign_extend.
+(define_mode_attr general_sext_operand
+ [(QI "sext_operand")
+ (HI "sext_operand")
+ (SI "x86_64_sext_operand")
+ (DI "x86_64_sext_operand")])
+
;; General sign/zero extend operand predicate for integer modes.
(define_mode_attr general_szext_operand
[(QI "general_operand")
@@ -4730,8 +4739,13 @@
&& X87_ENABLE_FLOAT (<MODEF:MODE>mode,
<SWI48:MODE>mode)")
(eq_attr "alternative" "1")
+ /* ??? For sched1 we need constrain_operands to be able to
+ select an alternative. Leave this enabled before RA. */
(symbol_ref "TARGET_INTER_UNIT_CONVERSIONS
- || optimize_function_for_size_p (cfun)")
+ || optimize_function_for_size_p (cfun)
+ || !(reload_completed
+ || reload_in_progress
+ || lra_in_progress)")
]
(symbol_ref "true")))
])
@@ -5821,10 +5835,11 @@
(eq:CCO (plus:<DWI>
(sign_extend:<DWI>
(match_operand:SWI 1 "nonimmediate_operand"))
- (sign_extend:<DWI>
- (match_operand:SWI 2 "<general_operand>")))
+ (match_dup 4))
(sign_extend:<DWI>
- (plus:SWI (match_dup 1) (match_dup 2)))))
+ (plus:SWI (match_dup 1)
+ (match_operand:SWI 2
+ "<general_operand>")))))
(set (match_operand:SWI 0 "register_operand")
(plus:SWI (match_dup 1) (match_dup 2)))])
(set (pc) (if_then_else
@@ -5832,7 +5847,13 @@
(label_ref (match_operand 3))
(pc)))]
""
- "ix86_fixup_binary_operands_no_copy (PLUS, <MODE>mode, operands);")
+{
+ ix86_fixup_binary_operands_no_copy (PLUS, <MODE>mode, operands);
+ if (CONST_INT_P (operands[2]))
+ operands[4] = operands[2];
+ else
+ operands[4] = gen_rtx_SIGN_EXTEND (<DWI>mode, operands[2]);
+})
(define_insn "*addv<mode>4"
[(set (reg:CCO FLAGS_REG)
@@ -5840,7 +5861,8 @@
(sign_extend:<DWI>
(match_operand:SWI 1 "nonimmediate_operand" "%0,0"))
(sign_extend:<DWI>
- (match_operand:SWI 2 "<general_operand>" "<g>,<r><i>")))
+ (match_operand:SWI 2 "<general_sext_operand>"
+ "<r>mWe,<r>We")))
(sign_extend:<DWI>
(plus:SWI (match_dup 1) (match_dup 2)))))
(set (match_operand:SWI 0 "nonimmediate_operand" "=<r>,<r>m")
@@ -5850,6 +5872,31 @@
[(set_attr "type" "alu")
(set_attr "mode" "<MODE>")])
+(define_insn "*addv<mode>4_1"
+ [(set (reg:CCO FLAGS_REG)
+ (eq:CCO (plus:<DWI>
+ (sign_extend:<DWI>
+ (match_operand:SWI 1 "nonimmediate_operand" "0"))
+ (match_operand:<DWI> 3 "const_int_operand" "i"))
+ (sign_extend:<DWI>
+ (plus:SWI (match_dup 1)
+ (match_operand:SWI 2 "x86_64_immediate_operand"
+ "<i>")))))
+ (set (match_operand:SWI 0 "nonimmediate_operand" "=<r>m")
+ (plus:SWI (match_dup 1) (match_dup 2)))]
+ "ix86_binary_operator_ok (PLUS, <MODE>mode, operands)
+ && CONST_INT_P (operands[2])
+ && INTVAL (operands[2]) == INTVAL (operands[3])"
+ "add{<imodesuffix>}\t{%2, %0|%0, %2}"
+ [(set_attr "type" "alu")
+ (set_attr "mode" "<MODE>")
+ (set (attr "length_immediate")
+ (cond [(match_test "IN_RANGE (INTVAL (operands[2]), -128, 127)")
+ (const_string "1")
+ (match_test "<MODE_SIZE> == 8")
+ (const_string "4")]
+ (const_string "<MODE_SIZE>")))])
+
;; The lea patterns for modes less than 32 bits need to be matched by
;; several insns converted to real lea by splitters.
@@ -6093,10 +6140,11 @@
(eq:CCO (minus:<DWI>
(sign_extend:<DWI>
(match_operand:SWI 1 "nonimmediate_operand"))
- (sign_extend:<DWI>
- (match_operand:SWI 2 "<general_operand>")))
+ (match_dup 4))
(sign_extend:<DWI>
- (minus:SWI (match_dup 1) (match_dup 2)))))
+ (minus:SWI (match_dup 1)
+ (match_operand:SWI 2
+ "<general_operand>")))))
(set (match_operand:SWI 0 "register_operand")
(minus:SWI (match_dup 1) (match_dup 2)))])
(set (pc) (if_then_else
@@ -6104,7 +6152,13 @@
(label_ref (match_operand 3))
(pc)))]
""
- "ix86_fixup_binary_operands_no_copy (MINUS, <MODE>mode, operands);")
+{
+ ix86_fixup_binary_operands_no_copy (MINUS, <MODE>mode, operands);
+ if (CONST_INT_P (operands[2]))
+ operands[4] = operands[2];
+ else
+ operands[4] = gen_rtx_SIGN_EXTEND (<DWI>mode, operands[2]);
+})
(define_insn "*subv<mode>4"
[(set (reg:CCO FLAGS_REG)
@@ -6112,7 +6166,8 @@
(sign_extend:<DWI>
(match_operand:SWI 1 "nonimmediate_operand" "0,0"))
(sign_extend:<DWI>
- (match_operand:SWI 2 "<general_operand>" "<r><i>,<r>m")))
+ (match_operand:SWI 2 "<general_sext_operand>"
+ "<r>We,<r>m")))
(sign_extend:<DWI>
(minus:SWI (match_dup 1) (match_dup 2)))))
(set (match_operand:SWI 0 "nonimmediate_operand" "=<r>m,<r>")
@@ -6122,6 +6177,31 @@
[(set_attr "type" "alu")
(set_attr "mode" "<MODE>")])
+(define_insn "*subv<mode>4_1"
+ [(set (reg:CCO FLAGS_REG)
+ (eq:CCO (minus:<DWI>
+ (sign_extend:<DWI>
+ (match_operand:SWI 1 "nonimmediate_operand" "0"))
+ (match_operand:<DWI> 3 "const_int_operand" "i"))
+ (sign_extend:<DWI>
+ (minus:SWI (match_dup 1)
+ (match_operand:SWI 2 "x86_64_immediate_operand"
+ "<i>")))))
+ (set (match_operand:SWI 0 "nonimmediate_operand" "=<r>m")
+ (minus:SWI (match_dup 1) (match_dup 2)))]
+ "ix86_binary_operator_ok (MINUS, <MODE>mode, operands)
+ && CONST_INT_P (operands[2])
+ && INTVAL (operands[2]) == INTVAL (operands[3])"
+ "sub{<imodesuffix>}\t{%2, %0|%0, %2}"
+ [(set_attr "type" "alu")
+ (set_attr "mode" "<MODE>")
+ (set (attr "length_immediate")
+ (cond [(match_test "IN_RANGE (INTVAL (operands[2]), -128, 127)")
+ (const_string "1")
+ (match_test "<MODE_SIZE> == 8")
+ (const_string "4")]
+ (const_string "<MODE_SIZE>")))])
+
(define_insn "*sub<mode>_3"
[(set (reg FLAGS_REG)
(compare (match_operand:SWI 1 "nonimmediate_operand" "0,0")
@@ -6442,52 +6522,98 @@
(eq:CCO (mult:<DWI>
(sign_extend:<DWI>
(match_operand:SWI48 1 "register_operand"))
- (sign_extend:<DWI>
- (match_operand:SWI48 2 "<general_operand>")))
+ (match_dup 4))
(sign_extend:<DWI>
- (mult:SWI48 (match_dup 1) (match_dup 2)))))
+ (mult:SWI48 (match_dup 1)
+ (match_operand:SWI48 2
+ "<general_operand>")))))
(set (match_operand:SWI48 0 "register_operand")
(mult:SWI48 (match_dup 1) (match_dup 2)))])
(set (pc) (if_then_else
(eq (reg:CCO FLAGS_REG) (const_int 0))
(label_ref (match_operand 3))
- (pc)))])
+ (pc)))]
+ ""
+{
+ if (CONST_INT_P (operands[2]))
+ operands[4] = operands[2];
+ else
+ operands[4] = gen_rtx_SIGN_EXTEND (<DWI>mode, operands[2]);
+})
(define_insn "*mulv<mode>4"
[(set (reg:CCO FLAGS_REG)
(eq:CCO (mult:<DWI>
(sign_extend:<DWI>
- (match_operand:SWI 1 "nonimmediate_operand" "%rm,rm,0"))
+ (match_operand:SWI48 1 "nonimmediate_operand" "%rm,0"))
(sign_extend:<DWI>
- (match_operand:SWI 2 "<general_operand>" "K,<i>,mr")))
+ (match_operand:SWI48 2 "<general_sext_operand>"
+ "We,mr")))
(sign_extend:<DWI>
- (mult:SWI (match_dup 1) (match_dup 2)))))
- (set (match_operand:SWI 0 "register_operand" "=r,r,r")
- (mult:SWI (match_dup 1) (match_dup 2)))]
+ (mult:SWI48 (match_dup 1) (match_dup 2)))))
+ (set (match_operand:SWI48 0 "register_operand" "=r,r")
+ (mult:SWI48 (match_dup 1) (match_dup 2)))]
"!(MEM_P (operands[1]) && MEM_P (operands[2]))"
"@
imul{<imodesuffix>}\t{%2, %1, %0|%0, %1, %2}
- imul{<imodesuffix>}\t{%2, %1, %0|%0, %1, %2}
imul{<imodesuffix>}\t{%2, %0|%0, %2}"
[(set_attr "type" "imul")
- (set_attr "prefix_0f" "0,0,1")
+ (set_attr "prefix_0f" "0,1")
(set (attr "athlon_decode")
(cond [(eq_attr "cpu" "athlon")
(const_string "vector")
- (eq_attr "alternative" "1")
+ (eq_attr "alternative" "0")
(const_string "vector")
- (and (eq_attr "alternative" "2")
+ (and (eq_attr "alternative" "1")
(match_operand 1 "memory_operand"))
(const_string "vector")]
(const_string "direct")))
(set (attr "amdfam10_decode")
- (cond [(and (eq_attr "alternative" "0,1")
+ (cond [(and (eq_attr "alternative" "1")
(match_operand 1 "memory_operand"))
(const_string "vector")]
(const_string "direct")))
(set_attr "bdver1_decode" "direct")
(set_attr "mode" "<MODE>")])
+(define_insn "*mulv<mode>4_1"
+ [(set (reg:CCO FLAGS_REG)
+ (eq:CCO (mult:<DWI>
+ (sign_extend:<DWI>
+ (match_operand:SWI48 1 "nonimmediate_operand" "rm,rm"))
+ (match_operand:<DWI> 3 "const_int_operand" "K,i"))
+ (sign_extend:<DWI>
+ (mult:SWI48 (match_dup 1)
+ (match_operand:SWI 2 "x86_64_immediate_operand"
+ "K,<i>")))))
+ (set (match_operand:SWI48 0 "register_operand" "=r,r")
+ (mult:SWI48 (match_dup 1) (match_dup 2)))]
+ "!(MEM_P (operands[1]) && MEM_P (operands[2]))
+ && CONST_INT_P (operands[2])
+ && INTVAL (operands[2]) == INTVAL (operands[3])"
+ "@
+ imul{<imodesuffix>}\t{%2, %1, %0|%0, %1, %2}
+ imul{<imodesuffix>}\t{%2, %1, %0|%0, %1, %2}"
+ [(set_attr "type" "imul")
+ (set (attr "athlon_decode")
+ (cond [(eq_attr "cpu" "athlon")
+ (const_string "vector")
+ (eq_attr "alternative" "1")
+ (const_string "vector")]
+ (const_string "direct")))
+ (set (attr "amdfam10_decode")
+ (cond [(match_operand 1 "memory_operand")
+ (const_string "vector")]
+ (const_string "direct")))
+ (set_attr "bdver1_decode" "direct")
+ (set_attr "mode" "<MODE>")
+ (set (attr "length_immediate")
+ (cond [(match_test "IN_RANGE (INTVAL (operands[2]), -128, 127)")
+ (const_string "1")
+ (match_test "<MODE_SIZE> == 8")
+ (const_string "4")]
+ (const_string "<MODE_SIZE>")))])
+
(define_expand "<u>mul<mode><dwi>3"
[(parallel [(set (match_operand:<DWI> 0 "register_operand")
(mult:<DWI>
diff --git a/gcc-4.9/gcc/config/i386/predicates.md b/gcc-4.9/gcc/config/i386/predicates.md
index 0492241fd..2ef138424 100644
--- a/gcc-4.9/gcc/config/i386/predicates.md
+++ b/gcc-4.9/gcc/config/i386/predicates.md
@@ -338,6 +338,20 @@
(match_operand 0 "x86_64_immediate_operand"))
(match_operand 0 "general_operand")))
+;; Return true if OP is non-VOIDmode general operand representable
+;; on x86_64. This predicate is used in sign-extending conversion
+;; operations that require non-VOIDmode immediate operands.
+(define_predicate "x86_64_sext_operand"
+ (and (match_test "GET_MODE (op) != VOIDmode")
+ (match_operand 0 "x86_64_general_operand")))
+
+;; Return true if OP is non-VOIDmode general operand. This predicate
+;; is used in sign-extending conversion operations that require
+;; non-VOIDmode immediate operands.
+(define_predicate "sext_operand"
+ (and (match_test "GET_MODE (op) != VOIDmode")
+ (match_operand 0 "general_operand")))
+
;; Return true if OP is representable on x86_64 as zero-extended operand.
;; This predicate is used in zero-extending conversion operations that
;; require non-VOIDmode immediate operands.
diff --git a/gcc-4.9/gcc/config/i386/sse.md b/gcc-4.9/gcc/config/i386/sse.md
index f30b27e86..72a4d6d07 100644
--- a/gcc-4.9/gcc/config/i386/sse.md
+++ b/gcc-4.9/gcc/config/i386/sse.md
@@ -2712,50 +2712,46 @@
(fma:FMAMODEM
(match_operand:FMAMODEM 1 "nonimmediate_operand")
(match_operand:FMAMODEM 2 "nonimmediate_operand")
- (match_operand:FMAMODEM 3 "nonimmediate_operand")))]
- "")
+ (match_operand:FMAMODEM 3 "nonimmediate_operand")))])
(define_expand "fms<mode>4"
[(set (match_operand:FMAMODEM 0 "register_operand")
(fma:FMAMODEM
(match_operand:FMAMODEM 1 "nonimmediate_operand")
(match_operand:FMAMODEM 2 "nonimmediate_operand")
- (neg:FMAMODEM (match_operand:FMAMODEM 3 "nonimmediate_operand"))))]
- "")
+ (neg:FMAMODEM (match_operand:FMAMODEM 3 "nonimmediate_operand"))))])
(define_expand "fnma<mode>4"
[(set (match_operand:FMAMODEM 0 "register_operand")
(fma:FMAMODEM
(neg:FMAMODEM (match_operand:FMAMODEM 1 "nonimmediate_operand"))
(match_operand:FMAMODEM 2 "nonimmediate_operand")
- (match_operand:FMAMODEM 3 "nonimmediate_operand")))]
- "")
+ (match_operand:FMAMODEM 3 "nonimmediate_operand")))])
(define_expand "fnms<mode>4"
[(set (match_operand:FMAMODEM 0 "register_operand")
(fma:FMAMODEM
(neg:FMAMODEM (match_operand:FMAMODEM 1 "nonimmediate_operand"))
(match_operand:FMAMODEM 2 "nonimmediate_operand")
- (neg:FMAMODEM (match_operand:FMAMODEM 3 "nonimmediate_operand"))))]
- "")
+ (neg:FMAMODEM (match_operand:FMAMODEM 3 "nonimmediate_operand"))))])
;; The builtins for intrinsics are not constrained by SSE math enabled.
-(define_mode_iterator FMAMODE [(SF "TARGET_FMA || TARGET_FMA4 || TARGET_AVX512F")
- (DF "TARGET_FMA || TARGET_FMA4 || TARGET_AVX512F")
- (V4SF "TARGET_FMA || TARGET_FMA4")
- (V2DF "TARGET_FMA || TARGET_FMA4")
- (V8SF "TARGET_FMA || TARGET_FMA4")
- (V4DF "TARGET_FMA || TARGET_FMA4")
- (V16SF "TARGET_AVX512F")
- (V8DF "TARGET_AVX512F")])
+(define_mode_iterator FMAMODE
+ [(SF "TARGET_FMA || TARGET_FMA4 || TARGET_AVX512F")
+ (DF "TARGET_FMA || TARGET_FMA4 || TARGET_AVX512F")
+ (V4SF "TARGET_FMA || TARGET_FMA4")
+ (V2DF "TARGET_FMA || TARGET_FMA4")
+ (V8SF "TARGET_FMA || TARGET_FMA4")
+ (V4DF "TARGET_FMA || TARGET_FMA4")
+ (V16SF "TARGET_AVX512F")
+ (V8DF "TARGET_AVX512F")])
(define_expand "fma4i_fmadd_<mode>"
[(set (match_operand:FMAMODE 0 "register_operand")
(fma:FMAMODE
(match_operand:FMAMODE 1 "nonimmediate_operand")
(match_operand:FMAMODE 2 "nonimmediate_operand")
- (match_operand:FMAMODE 3 "nonimmediate_operand")))]
- "")
+ (match_operand:FMAMODE 3 "nonimmediate_operand")))])
(define_expand "avx512f_fmadd_<mode>_maskz<round_expand_name>"
[(match_operand:VF_512 0 "register_operand")
@@ -2771,12 +2767,20 @@
DONE;
})
+(define_mode_iterator FMAMODE_NOVF512
+ [(SF "TARGET_FMA || TARGET_FMA4 || TARGET_AVX512F")
+ (DF "TARGET_FMA || TARGET_FMA4 || TARGET_AVX512F")
+ (V4SF "TARGET_FMA || TARGET_FMA4")
+ (V2DF "TARGET_FMA || TARGET_FMA4")
+ (V8SF "TARGET_FMA || TARGET_FMA4")
+ (V4DF "TARGET_FMA || TARGET_FMA4")])
+
(define_insn "<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name><round_name>"
- [(set (match_operand:FMAMODE 0 "register_operand" "=v,v,v,x,x")
- (fma:FMAMODE
- (match_operand:FMAMODE 1 "<round_nimm_predicate>" "%0,0,v,x,x")
- (match_operand:FMAMODE 2 "<round_nimm_predicate>" "<round_constraint>,v,<round_constraint>,x,m")
- (match_operand:FMAMODE 3 "<round_nimm_predicate>" "v,<round_constraint>,0,xm,x")))]
+ [(set (match_operand:FMAMODE_NOVF512 0 "register_operand" "=v,v,v,x,x")
+ (fma:FMAMODE_NOVF512
+ (match_operand:FMAMODE_NOVF512 1 "<round_nimm_predicate>" "%0,0,v,x,x")
+ (match_operand:FMAMODE_NOVF512 2 "<round_nimm_predicate>" "<round_constraint>,v,<round_constraint>,x,m")
+ (match_operand:FMAMODE_NOVF512 3 "<round_nimm_predicate>" "v,<round_constraint>,0,xm,x")))]
"<sd_mask_mode512bit_condition> && <round_mode512bit_condition>"
"@
vfmadd132<ssemodesuffix>\t{<round_sd_mask_op4>%2, %3, %0<sd_mask_op4>|%0<sd_mask_op4>, %3, %2<round_sd_mask_op4>}
@@ -2788,6 +2792,21 @@
(set_attr "type" "ssemuladd")
(set_attr "mode" "<MODE>")])
+(define_insn "<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name><round_name>"
+ [(set (match_operand:VF_512 0 "register_operand" "=v,v,v")
+ (fma:VF_512
+ (match_operand:VF_512 1 "<round_nimm_predicate>" "%0,0,v")
+ (match_operand:VF_512 2 "<round_nimm_predicate>" "<round_constraint>,v,<round_constraint>")
+ (match_operand:VF_512 3 "<round_nimm_predicate>" "v,<round_constraint>,0")))]
+ "<sd_mask_mode512bit_condition> && <round_mode512bit_condition>"
+ "@
+ vfmadd132<ssemodesuffix>\t{<round_sd_mask_op4>%2, %3, %0<sd_mask_op4>|%0<sd_mask_op4>, %3, %2<round_sd_mask_op4>}
+ vfmadd213<ssemodesuffix>\t{<round_sd_mask_op4>%3, %2, %0<sd_mask_op4>|%0<sd_mask_op4>, %2, %3<round_sd_mask_op4>}
+ vfmadd231<ssemodesuffix>\t{<round_sd_mask_op4>%2, %1, %0<sd_mask_op4>|%0<sd_mask_op4>, %1, %2<round_sd_mask_op4>}"
+ [(set_attr "isa" "fma_avx512f,fma_avx512f,fma_avx512f")
+ (set_attr "type" "ssemuladd")
+ (set_attr "mode" "<MODE>")])
+
(define_insn "avx512f_fmadd_<mode>_mask<round_name>"
[(set (match_operand:VF_512 0 "register_operand" "=v,v")
(vec_merge:VF_512
@@ -2821,12 +2840,12 @@
(set_attr "mode" "<MODE>")])
(define_insn "<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name><round_name>"
- [(set (match_operand:FMAMODE 0 "register_operand" "=v,v,v,x,x")
- (fma:FMAMODE
- (match_operand:FMAMODE 1 "<round_nimm_predicate>" "%0, 0, v, x,x")
- (match_operand:FMAMODE 2 "<round_nimm_predicate>" "<round_constraint>,v,<round_constraint>,x,m")
- (neg:FMAMODE
- (match_operand:FMAMODE 3 "<round_nimm_predicate>" "v,<round_constraint>,0,xm,x"))))]
+ [(set (match_operand:FMAMODE_NOVF512 0 "register_operand" "=v,v,v,x,x")
+ (fma:FMAMODE_NOVF512
+ (match_operand:FMAMODE_NOVF512 1 "<round_nimm_predicate>" "%0,0,v,x,x")
+ (match_operand:FMAMODE_NOVF512 2 "<round_nimm_predicate>" "<round_constraint>,v,<round_constraint>,x,m")
+ (neg:FMAMODE_NOVF512
+ (match_operand:FMAMODE_NOVF512 3 "<round_nimm_predicate>" "v,<round_constraint>,0,xm,x"))))]
"<sd_mask_mode512bit_condition> && <round_mode512bit_condition>"
"@
vfmsub132<ssemodesuffix>\t{<round_sd_mask_op4>%2, %3, %0<sd_mask_op4>|%0<sd_mask_op4>, %3, %2<round_sd_mask_op4>}
@@ -2838,6 +2857,22 @@
(set_attr "type" "ssemuladd")
(set_attr "mode" "<MODE>")])
+(define_insn "<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name><round_name>"
+ [(set (match_operand:VF_512 0 "register_operand" "=v,v,v")
+ (fma:VF_512
+ (match_operand:VF_512 1 "<round_nimm_predicate>" "%0,0,v")
+ (match_operand:VF_512 2 "<round_nimm_predicate>" "<round_constraint>,v,<round_constraint>")
+ (neg:VF_512
+ (match_operand:VF_512 3 "<round_nimm_predicate>" "v,<round_constraint>,0"))))]
+ "<sd_mask_mode512bit_condition> && <round_mode512bit_condition>"
+ "@
+ vfmsub132<ssemodesuffix>\t{<round_sd_mask_op4>%2, %3, %0<sd_mask_op4>|%0<sd_mask_op4>, %3, %2<round_sd_mask_op4>}
+ vfmsub213<ssemodesuffix>\t{<round_sd_mask_op4>%3, %2, %0<sd_mask_op4>|%0<sd_mask_op4>, %2, %3<round_sd_mask_op4>}
+ vfmsub231<ssemodesuffix>\t{<round_sd_mask_op4>%2, %1, %0<sd_mask_op4>|%0<sd_mask_op4>, %1, %2<round_sd_mask_op4>}"
+ [(set_attr "isa" "fma_avx512f,fma_avx512f,fma_avx512f")
+ (set_attr "type" "ssemuladd")
+ (set_attr "mode" "<MODE>")])
+
(define_insn "avx512f_fmsub_<mode>_mask<round_name>"
[(set (match_operand:VF_512 0 "register_operand" "=v,v")
(vec_merge:VF_512
@@ -2873,12 +2908,12 @@
(set_attr "mode" "<MODE>")])
(define_insn "<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name><round_name>"
- [(set (match_operand:FMAMODE 0 "register_operand" "=v,v,v,x,x")
- (fma:FMAMODE
- (neg:FMAMODE
- (match_operand:FMAMODE 1 "<round_nimm_predicate>" "%0,0,v,x,x"))
- (match_operand:FMAMODE 2 "<round_nimm_predicate>" "<round_constraint>,v,<round_constraint>,x,m")
- (match_operand:FMAMODE 3 "<round_nimm_predicate>" "v,<round_constraint>,0,xm,x")))]
+ [(set (match_operand:FMAMODE_NOVF512 0 "register_operand" "=v,v,v,x,x")
+ (fma:FMAMODE_NOVF512
+ (neg:FMAMODE_NOVF512
+ (match_operand:FMAMODE_NOVF512 1 "<round_nimm_predicate>" "%0,0,v,x,x"))
+ (match_operand:FMAMODE_NOVF512 2 "<round_nimm_predicate>" "<round_constraint>,v,<round_constraint>,x,m")
+ (match_operand:FMAMODE_NOVF512 3 "<round_nimm_predicate>" "v,<round_constraint>,0,xm,x")))]
"<sd_mask_mode512bit_condition> && <round_mode512bit_condition>"
"@
vfnmadd132<ssemodesuffix>\t{<round_sd_mask_op4>%2, %3, %0<sd_mask_op4>|%0<sd_mask_op4>, %3, %2<round_sd_mask_op4>}
@@ -2890,6 +2925,22 @@
(set_attr "type" "ssemuladd")
(set_attr "mode" "<MODE>")])
+(define_insn "<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name><round_name>"
+ [(set (match_operand:VF_512 0 "register_operand" "=v,v,v")
+ (fma:VF_512
+ (neg:VF_512
+ (match_operand:VF_512 1 "<round_nimm_predicate>" "%0,0,v"))
+ (match_operand:VF_512 2 "<round_nimm_predicate>" "<round_constraint>,v,<round_constraint>")
+ (match_operand:VF_512 3 "<round_nimm_predicate>" "v,<round_constraint>,0")))]
+ "<sd_mask_mode512bit_condition> && <round_mode512bit_condition>"
+ "@
+ vfnmadd132<ssemodesuffix>\t{<round_sd_mask_op4>%2, %3, %0<sd_mask_op4>|%0<sd_mask_op4>, %3, %2<round_sd_mask_op4>}
+ vfnmadd213<ssemodesuffix>\t{<round_sd_mask_op4>%3, %2, %0<sd_mask_op4>|%0<sd_mask_op4>, %2, %3<round_sd_mask_op4>}
+ vfnmadd231<ssemodesuffix>\t{<round_sd_mask_op4>%2, %1, %0<sd_mask_op4>|%0<sd_mask_op4>, %1, %2<round_sd_mask_op4>}"
+ [(set_attr "isa" "fma_avx512f,fma_avx512f,fma_avx512f")
+ (set_attr "type" "ssemuladd")
+ (set_attr "mode" "<MODE>")])
+
(define_insn "avx512f_fnmadd_<mode>_mask<round_name>"
[(set (match_operand:VF_512 0 "register_operand" "=v,v")
(vec_merge:VF_512
@@ -2925,13 +2976,13 @@
(set_attr "mode" "<MODE>")])
(define_insn "<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name><round_name>"
- [(set (match_operand:FMAMODE 0 "register_operand" "=v,v,v,x,x")
- (fma:FMAMODE
- (neg:FMAMODE
- (match_operand:FMAMODE 1 "<round_nimm_predicate>" "%0,0,v,x,x"))
- (match_operand:FMAMODE 2 "<round_nimm_predicate>" "<round_constraint>,v,<round_constraint>,x,m")
- (neg:FMAMODE
- (match_operand:FMAMODE 3 "<round_nimm_predicate>" "v,<round_constraint>,0,xm,x"))))]
+ [(set (match_operand:FMAMODE_NOVF512 0 "register_operand" "=v,v,v,x,x")
+ (fma:FMAMODE_NOVF512
+ (neg:FMAMODE_NOVF512
+ (match_operand:FMAMODE_NOVF512 1 "<round_nimm_predicate>" "%0,0,v,x,x"))
+ (match_operand:FMAMODE_NOVF512 2 "<round_nimm_predicate>" "<round_constraint>,v,<round_constraint>,x,m")
+ (neg:FMAMODE_NOVF512
+ (match_operand:FMAMODE_NOVF512 3 "<round_nimm_predicate>" "v,<round_constraint>,0,xm,x"))))]
"<sd_mask_mode512bit_condition> && <round_mode512bit_condition>"
"@
vfnmsub132<ssemodesuffix>\t{<round_sd_mask_op4>%2, %3, %0<sd_mask_op4>|%0<sd_mask_op4>, %3, %2<round_sd_mask_op4>}
@@ -2943,6 +2994,23 @@
(set_attr "type" "ssemuladd")
(set_attr "mode" "<MODE>")])
+(define_insn "<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name><round_name>"
+ [(set (match_operand:VF_512 0 "register_operand" "=v,v,v")
+ (fma:VF_512
+ (neg:VF_512
+ (match_operand:VF_512 1 "<round_nimm_predicate>" "%0,0,v"))
+ (match_operand:VF_512 2 "<round_nimm_predicate>" "<round_constraint>,v,<round_constraint>")
+ (neg:VF_512
+ (match_operand:VF_512 3 "<round_nimm_predicate>" "v,<round_constraint>,0"))))]
+ "<sd_mask_mode512bit_condition> && <round_mode512bit_condition>"
+ "@
+ vfnmsub132<ssemodesuffix>\t{<round_sd_mask_op4>%2, %3, %0<sd_mask_op4>|%0<sd_mask_op4>, %3, %2<round_sd_mask_op4>}
+ vfnmsub213<ssemodesuffix>\t{<round_sd_mask_op4>%3, %2, %0<sd_mask_op4>|%0<sd_mask_op4>, %2, %3<round_sd_mask_op4>}
+ vfnmsub231<ssemodesuffix>\t{<round_sd_mask_op4>%2, %1, %0<sd_mask_op4>|%0<sd_mask_op4>, %1, %2<round_sd_mask_op4>}"
+ [(set_attr "isa" "fma_avx512f,fma_avx512f,fma_avx512f")
+ (set_attr "type" "ssemuladd")
+ (set_attr "mode" "<MODE>")])
+
(define_insn "avx512f_fnmsub_<mode>_mask<round_name>"
[(set (match_operand:VF_512 0 "register_operand" "=v,v")
(vec_merge:VF_512
@@ -3014,11 +3082,11 @@
})
(define_insn "<sd_mask_codefor>fma_fmaddsub_<mode><sd_maskz_name><round_name>"
- [(set (match_operand:VF 0 "register_operand" "=v,v,v,x,x")
- (unspec:VF
- [(match_operand:VF 1 "<round_nimm_predicate>" "%0,0,v,x,x")
- (match_operand:VF 2 "<round_nimm_predicate>" "<round_constraint>,v,<round_constraint>,x,m")
- (match_operand:VF 3 "<round_nimm_predicate>" "v,<round_constraint>,0,xm,x")]
+ [(set (match_operand:VF_128_256 0 "register_operand" "=v,v,v,x,x")
+ (unspec:VF_128_256
+ [(match_operand:VF_128_256 1 "<round_nimm_predicate>" "%0,0,v,x,x")
+ (match_operand:VF_128_256 2 "<round_nimm_predicate>" "<round_constraint>,v,<round_constraint>,x,m")
+ (match_operand:VF_128_256 3 "<round_nimm_predicate>" "v,<round_constraint>,0,xm,x")]
UNSPEC_FMADDSUB))]
"(TARGET_FMA || TARGET_FMA4 || TARGET_AVX512F) && <sd_mask_mode512bit_condition> && <round_mode512bit_condition>"
"@
@@ -3031,6 +3099,22 @@
(set_attr "type" "ssemuladd")
(set_attr "mode" "<MODE>")])
+(define_insn "<sd_mask_codefor>fma_fmaddsub_<mode><sd_maskz_name><round_name>"
+ [(set (match_operand:VF_512 0 "register_operand" "=v,v,v")
+ (unspec:VF_512
+ [(match_operand:VF_512 1 "<round_nimm_predicate>" "%0,0,v")
+ (match_operand:VF_512 2 "<round_nimm_predicate>" "<round_constraint>,v,<round_constraint>")
+ (match_operand:VF_512 3 "<round_nimm_predicate>" "v,<round_constraint>,0")]
+ UNSPEC_FMADDSUB))]
+ "TARGET_AVX512F && <sd_mask_mode512bit_condition> && <round_mode512bit_condition>"
+ "@
+ vfmaddsub132<ssemodesuffix>\t{<round_sd_mask_op4>%2, %3, %0<sd_mask_op4>|%0<sd_mask_op4>, %3, %2<round_sd_mask_op4>}
+ vfmaddsub213<ssemodesuffix>\t{<round_sd_mask_op4>%3, %2, %0<sd_mask_op4>|%0<sd_mask_op4>, %2, %3<round_sd_mask_op4>}
+ vfmaddsub231<ssemodesuffix>\t{<round_sd_mask_op4>%2, %1, %0<sd_mask_op4>|%0<sd_mask_op4>, %1, %2<round_sd_mask_op4>}"
+ [(set_attr "isa" "fma_avx512f,fma_avx512f,fma_avx512f")
+ (set_attr "type" "ssemuladd")
+ (set_attr "mode" "<MODE>")])
+
(define_insn "avx512f_fmaddsub_<mode>_mask<round_name>"
[(set (match_operand:VF_512 0 "register_operand" "=v,v")
(vec_merge:VF_512
@@ -3066,12 +3150,12 @@
(set_attr "mode" "<MODE>")])
(define_insn "<sd_mask_codefor>fma_fmsubadd_<mode><sd_maskz_name><round_name>"
- [(set (match_operand:VF 0 "register_operand" "=v,v,v,x,x")
- (unspec:VF
- [(match_operand:VF 1 "<round_nimm_predicate>" "%0,0,v,x,x")
- (match_operand:VF 2 "<round_nimm_predicate>" "<round_constraint>,v,<round_constraint>,x,m")
- (neg:VF
- (match_operand:VF 3 "<round_nimm_predicate>" "v,<round_constraint>,0,xm,x"))]
+ [(set (match_operand:VF_128_256 0 "register_operand" "=v,v,v,x,x")
+ (unspec:VF_128_256
+ [(match_operand:VF_128_256 1 "<round_nimm_predicate>" "%0,0,v,x,x")
+ (match_operand:VF_128_256 2 "<round_nimm_predicate>" "<round_constraint>,v,<round_constraint>,x,m")
+ (neg:VF_128_256
+ (match_operand:VF_128_256 3 "<round_nimm_predicate>" "v,<round_constraint>,0,xm,x"))]
UNSPEC_FMADDSUB))]
"(TARGET_FMA || TARGET_FMA4 || TARGET_AVX512F) && <sd_mask_mode512bit_condition> && <round_mode512bit_condition>"
"@
@@ -3084,6 +3168,23 @@
(set_attr "type" "ssemuladd")
(set_attr "mode" "<MODE>")])
+(define_insn "<sd_mask_codefor>fma_fmsubadd_<mode><sd_maskz_name><round_name>"
+ [(set (match_operand:VF_512 0 "register_operand" "=v,v,v")
+ (unspec:VF_512
+ [(match_operand:VF_512 1 "<round_nimm_predicate>" "%0,0,v")
+ (match_operand:VF_512 2 "<round_nimm_predicate>" "<round_constraint>,v,<round_constraint>")
+ (neg:VF_512
+ (match_operand:VF_512 3 "<round_nimm_predicate>" "v,<round_constraint>,0"))]
+ UNSPEC_FMADDSUB))]
+ "TARGET_AVX512F && <sd_mask_mode512bit_condition> && <round_mode512bit_condition>"
+ "@
+ vfmsubadd132<ssemodesuffix>\t{<round_sd_mask_op4>%2, %3, %0<sd_mask_op4>|%0<sd_mask_op4>, %3, %2<round_sd_mask_op4>}
+ vfmsubadd213<ssemodesuffix>\t{<round_sd_mask_op4>%3, %2, %0<sd_mask_op4>|%0<sd_mask_op4>, %2, %3<round_sd_mask_op4>}
+ vfmsubadd231<ssemodesuffix>\t{<round_sd_mask_op4>%2, %1, %0<sd_mask_op4>|%0<sd_mask_op4>, %1, %2<round_sd_mask_op4>}"
+ [(set_attr "isa" "fma_avx512f,fma_avx512f,fma_avx512f")
+ (set_attr "type" "ssemuladd")
+ (set_attr "mode" "<MODE>")])
+
(define_insn "avx512f_fmsubadd_<mode>_mask<round_name>"
[(set (match_operand:VF_512 0 "register_operand" "=v,v")
(vec_merge:VF_512
diff --git a/gcc-4.9/gcc/config/mips/netbsd.h b/gcc-4.9/gcc/config/mips/netbsd.h
index 0313345fd..efa28869b 100644
--- a/gcc-4.9/gcc/config/mips/netbsd.h
+++ b/gcc-4.9/gcc/config/mips/netbsd.h
@@ -32,7 +32,9 @@ along with GCC; see the file COPYING3. If not see
if (TARGET_ABICALLS) \
builtin_define ("__ABICALLS__"); \
\
- if (mips_abi == ABI_EABI) \
+ if (mips_abi == ABI_32) \
+ builtin_define ("__mips_o32"); \
+ else if (mips_abi == ABI_EABI) \
builtin_define ("__mips_eabi"); \
else if (mips_abi == ABI_N32) \
builtin_define ("__mips_n32"); \
diff --git a/gcc-4.9/gcc/config/moxie/moxie.h b/gcc-4.9/gcc/config/moxie/moxie.h
index 5379a4311..3a01dbab4 100644
--- a/gcc-4.9/gcc/config/moxie/moxie.h
+++ b/gcc-4.9/gcc/config/moxie/moxie.h
@@ -59,7 +59,7 @@
#define DOUBLE_TYPE_SIZE 64
#define LONG_DOUBLE_TYPE_SIZE 64
-#define DEFAULT_SIGNED_CHAR 1
+#define DEFAULT_SIGNED_CHAR 0
#undef SIZE_TYPE
#define SIZE_TYPE "unsigned int"
@@ -68,7 +68,7 @@
#define PTRDIFF_TYPE "int"
#undef WCHAR_TYPE
-#define WCHAR_TYPE "long int"
+#define WCHAR_TYPE "unsigned int"
#undef WCHAR_TYPE_SIZE
#define WCHAR_TYPE_SIZE BITS_PER_WORD
diff --git a/gcc-4.9/gcc/config/moxie/moxie.md b/gcc-4.9/gcc/config/moxie/moxie.md
index 713f9b65d..793cac3f8 100644
--- a/gcc-4.9/gcc/config/moxie/moxie.md
+++ b/gcc-4.9/gcc/config/moxie/moxie.md
@@ -239,6 +239,56 @@
ldo.l %0, %1"
[(set_attr "length" "2,2,6,2,6,2,6,6,6")])
+(define_insn_and_split "zero_extendqisi2"
+ [(set (match_operand:SI 0 "register_operand" "=r,r,r,r")
+ (zero_extend:SI (match_operand:QI 1 "nonimmediate_operand" "0,W,A,B")))]
+ ""
+ "@
+ ;
+ ld.b %0, %1
+ lda.b %0, %1
+ ldo.b %0, %1"
+ "reload_completed"
+ [(set (match_dup 2) (match_dup 1))
+ (set (match_dup 0) (zero_extend:SI (match_dup 2)))]
+{
+ operands[2] = gen_lowpart (QImode, operands[0]);
+}
+ [(set_attr "length" "0,2,6,6")])
+
+(define_insn_and_split "zero_extendhisi2"
+ [(set (match_operand:SI 0 "register_operand" "=r,r,r,r")
+ (zero_extend:SI (match_operand:HI 1 "nonimmediate_operand" "0,W,A,B")))]
+ ""
+ "@
+ ;
+ ld.s %0, %1
+ lda.s %0, %1
+ ldo.s %0, %1"
+ "reload_completed"
+ [(set (match_dup 2) (match_dup 1))
+ (set (match_dup 0) (zero_extend:SI (match_dup 2)))]
+{
+ operands[2] = gen_lowpart (HImode, operands[0]);
+}
+ [(set_attr "length" "0,2,6,6")])
+
+(define_insn "extendqisi2"
+ [(set (match_operand:SI 0 "register_operand" "=r")
+ (sign_extend:SI (match_operand:QI 1 "nonimmediate_operand" "r")))]
+ ""
+ "@
+ sex.b %0, %1"
+ [(set_attr "length" "2")])
+
+(define_insn "extendhisi2"
+ [(set (match_operand:SI 0 "register_operand" "=r")
+ (sign_extend:SI (match_operand:HI 1 "nonimmediate_operand" "r")))]
+ ""
+ "@
+ sex.s %0, %1"
+ [(set_attr "length" "2")])
+
(define_expand "movqi"
[(set (match_operand:QI 0 "general_operand" "")
(match_operand:QI 1 "general_operand" ""))]
diff --git a/gcc-4.9/gcc/config/nios2/linux.h b/gcc-4.9/gcc/config/nios2/linux.h
index 47976f85b..3e77ca6c9 100644
--- a/gcc-4.9/gcc/config/nios2/linux.h
+++ b/gcc-4.9/gcc/config/nios2/linux.h
@@ -26,11 +26,16 @@
} \
while (0)
+#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-nios2.so.1"
+
#undef LINK_SPEC
#define LINK_SPEC LINK_SPEC_ENDIAN \
- " %{shared:-shared} \
- %{static:-Bstatic} \
- %{rdynamic:-export-dynamic}"
+ "%{shared:-shared} \
+ %{!shared: \
+ %{!static: \
+ %{rdynamic:-export-dynamic} \
+ -dynamic-linker " GNU_USER_DYNAMIC_LINKER "} \
+ %{static:-static}}"
/* This toolchain implements the ABI for Linux Systems documented in the
Nios II Processor Reference Handbook. */
diff --git a/gcc-4.9/gcc/config/nios2/nios2.c b/gcc-4.9/gcc/config/nios2/nios2.c
index edf9a618b..cdd2e6bc9 100644
--- a/gcc-4.9/gcc/config/nios2/nios2.c
+++ b/gcc-4.9/gcc/config/nios2/nios2.c
@@ -695,7 +695,7 @@ nios2_function_profiler (FILE *file, int labelno ATTRIBUTE_UNUSED)
fprintf (file, "\taddi\tr3, r3, %%lo(_gp_got - 1b)\n");
fprintf (file, "\tadd\tr2, r2, r3\n");
fprintf (file, "\tmovhi\tr3, %%call_hiadj(_mcount)\n");
- fprintf (file, "\taddi\tr3, %%call_lo(_mcount)\n");
+ fprintf (file, "\taddi\tr3, r3, %%call_lo(_mcount)\n");
fprintf (file, "\tadd\tr3, r2, r3\n");
fprintf (file, "\tldw\tr2, 0(r3)\n");
fprintf (file, "\tcallr\tr2\n");
@@ -1183,7 +1183,7 @@ nios2_unspec_offset (rtx loc, int unspec)
/* Generate GOT pointer based address with large offset. */
static rtx
-nios2_large_got_address (rtx sym, rtx offset)
+nios2_large_got_address (rtx offset)
{
rtx addr = gen_reg_rtx (Pmode);
emit_insn (gen_add3_insn (addr, pic_offset_table_rtx,
@@ -1199,7 +1199,7 @@ nios2_got_address (rtx loc, int unspec)
crtl->uses_pic_offset_table = 1;
if (nios2_large_offset_p (unspec))
- return nios2_large_got_address (loc, offset);
+ return nios2_large_got_address (offset);
return gen_rtx_PLUS (Pmode, pic_offset_table_rtx, offset);
}
@@ -1805,6 +1805,30 @@ nios2_legitimize_address (rtx x, rtx oldx ATTRIBUTE_UNUSED,
return x;
}
+static rtx
+nios2_delegitimize_address (rtx x)
+{
+ x = delegitimize_mem_from_attrs (x);
+
+ if (GET_CODE (x) == CONST && GET_CODE (XEXP (x, 0)) == UNSPEC)
+ {
+ switch (XINT (XEXP (x, 0), 1))
+ {
+ case UNSPEC_PIC_SYM:
+ case UNSPEC_PIC_CALL_SYM:
+ case UNSPEC_PIC_GOTOFF_SYM:
+ case UNSPEC_ADD_TLS_GD:
+ case UNSPEC_ADD_TLS_LDM:
+ case UNSPEC_LOAD_TLS_IE:
+ case UNSPEC_ADD_TLS_LE:
+ x = XVECEXP (XEXP (x, 0), 0, 0);
+ gcc_assert (GET_CODE (x) == SYMBOL_REF);
+ break;
+ }
+ }
+ return x;
+}
+
/* Main expander function for RTL moves. */
int
nios2_emit_move_sequence (rtx *operands, enum machine_mode mode)
@@ -3259,6 +3283,9 @@ nios2_merge_decl_attributes (tree olddecl, tree newdecl)
#undef TARGET_LEGITIMIZE_ADDRESS
#define TARGET_LEGITIMIZE_ADDRESS nios2_legitimize_address
+#undef TARGET_DELEGITIMIZE_ADDRESS
+#define TARGET_DELEGITIMIZE_ADDRESS nios2_delegitimize_address
+
#undef TARGET_LEGITIMATE_ADDRESS_P
#define TARGET_LEGITIMATE_ADDRESS_P nios2_legitimate_address_p
diff --git a/gcc-4.9/gcc/config/nios2/nios2.md b/gcc-4.9/gcc/config/nios2/nios2.md
index b5b599ece..929d61e1f 100644
--- a/gcc-4.9/gcc/config/nios2/nios2.md
+++ b/gcc-4.9/gcc/config/nios2/nios2.md
@@ -74,8 +74,6 @@
UNSPEC_PIC_SYM
UNSPEC_PIC_CALL_SYM
UNSPEC_PIC_GOTOFF_SYM
- UNSPEC_TLS
- UNSPEC_TLS_LDM
UNSPEC_LOAD_TLS_IE
UNSPEC_ADD_TLS_LE
UNSPEC_ADD_TLS_GD
diff --git a/gcc-4.9/gcc/config/pa/pa.c b/gcc-4.9/gcc/config/pa/pa.c
index fb698d20d..871e4e5c6 100644
--- a/gcc-4.9/gcc/config/pa/pa.c
+++ b/gcc-4.9/gcc/config/pa/pa.c
@@ -4187,13 +4187,17 @@ pa_output_function_epilogue (FILE *file, HOST_WIDE_INT size ATTRIBUTE_UNUSED)
if (TARGET_SOM && TARGET_GAS)
{
- /* We done with this subspace except possibly for some additional
+ /* We are 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;
}
+ /* Thunks do their own accounting. */
+ if (cfun->is_thunk)
+ return;
+
if (INSN_ADDRESSES_SET_P ())
{
insn = get_last_nonnote_insn ();
@@ -8259,8 +8263,7 @@ pa_asm_output_mi_thunk (FILE *file, tree thunk_fndecl, HOST_WIDE_INT delta,
xoperands[1] = XEXP (DECL_RTL (thunk_fndecl), 0);
xoperands[2] = GEN_INT (delta);
- ASM_OUTPUT_LABEL (file, XSTR (xoperands[1], 0));
- fprintf (file, "\t.PROC\n\t.CALLINFO FRAME=0,NO_CALLS\n\t.ENTRY\n");
+ final_start_function (emit_barrier (), file, 1);
/* Output the thunk. We know that the function is in the same
translation unit (i.e., the same space) as the thunk, and that
@@ -8466,16 +8469,7 @@ 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;
- }
+ final_end_function ();
if (TARGET_SOM && flag_pic && TREE_PUBLIC (function))
{
diff --git a/gcc-4.9/gcc/config/rl78/rl78-expand.md b/gcc-4.9/gcc/config/rl78/rl78-expand.md
index f794d7cb1..f61e444b5 100644
--- a/gcc-4.9/gcc/config/rl78/rl78-expand.md
+++ b/gcc-4.9/gcc/config/rl78/rl78-expand.md
@@ -30,18 +30,23 @@
if (rl78_far_p (operands[0]) && rl78_far_p (operands[1]))
operands[1] = copy_to_mode_reg (QImode, operands[1]);
- /* FIXME: Not sure how GCC can generate (SUBREG (SYMBOL_REF)),
- but it does. Since this makes no sense, reject it here. */
+ /* GCC can generate (SUBREG (SYMBOL_REF)) when it has to store a symbol
+ into a bitfield, or a packed ordinary field. We can handle this
+ provided that the destination is a register. If not, then load the
+ source into a register first. */
if (GET_CODE (operands[1]) == SUBREG
- && GET_CODE (XEXP (operands[1], 0)) == SYMBOL_REF)
- FAIL;
+ && GET_CODE (XEXP (operands[1], 0)) == SYMBOL_REF
+ && ! REG_P (operands[0]))
+ operands[1] = copy_to_mode_reg (QImode, operands[1]);
+
/* Similarly for (SUBREG (CONST (PLUS (SYMBOL_REF)))).
cf. g++.dg/abi/packed.C. */
if (GET_CODE (operands[1]) == SUBREG
&& GET_CODE (XEXP (operands[1], 0)) == CONST
&& GET_CODE (XEXP (XEXP (operands[1], 0), 0)) == PLUS
- && GET_CODE (XEXP (XEXP (XEXP (operands[1], 0), 0), 0)) == SYMBOL_REF)
- FAIL;
+ && GET_CODE (XEXP (XEXP (XEXP (operands[1], 0), 0), 0)) == SYMBOL_REF
+ && ! REG_P (operands[0]))
+ operands[1] = copy_to_mode_reg (QImode, operands[1]);
if (CONST_INT_P (operands[1]) && ! IN_RANGE (INTVAL (operands[1]), (-1 << 8) + 1, (1 << 8) - 1))
FAIL;
diff --git a/gcc-4.9/gcc/config/rs6000/altivec.h b/gcc-4.9/gcc/config/rs6000/altivec.h
index 49c250c84..129cf6fa1 100644
--- a/gcc-4.9/gcc/config/rs6000/altivec.h
+++ b/gcc-4.9/gcc/config/rs6000/altivec.h
@@ -319,6 +319,11 @@
#define vec_sqrt __builtin_vec_sqrt
#define vec_vsx_ld __builtin_vec_vsx_ld
#define vec_vsx_st __builtin_vec_vsx_st
+
+/* Note, xxsldi and xxpermdi were added as __builtin_vsx_<xxx> functions
+ instead of __builtin_vec_<xxx> */
+#define vec_xxsldwi __builtin_vsx_xxsldwi
+#define vec_xxpermdi __builtin_vsx_xxpermdi
#endif
#ifdef _ARCH_PWR8
@@ -329,6 +334,7 @@
#define vec_vaddcuq __builtin_vec_vaddcuq
#define vec_vaddudm __builtin_vec_vaddudm
#define vec_vadduqm __builtin_vec_vadduqm
+#define vec_vbpermq __builtin_vec_vbpermq
#define vec_vclz __builtin_vec_vclz
#define vec_vclzb __builtin_vec_vclzb
#define vec_vclzd __builtin_vec_vclzd
diff --git a/gcc-4.9/gcc/config/rs6000/altivec.md b/gcc-4.9/gcc/config/rs6000/altivec.md
index faa88d007..674cb40bf 100644
--- a/gcc-4.9/gcc/config/rs6000/altivec.md
+++ b/gcc-4.9/gcc/config/rs6000/altivec.md
@@ -142,6 +142,7 @@
UNSPEC_VSUBCUQ
UNSPEC_VSUBEUQM
UNSPEC_VSUBECUQ
+ UNSPEC_VBPERMQ
])
(define_c_enum "unspecv"
@@ -3322,3 +3323,14 @@
[(set_attr "length" "4")
(set_attr "type" "vecsimple")])
+;; We use V2DI as the output type to simplify converting the permute
+;; bits into an integer
+(define_insn "altivec_vbpermq"
+ [(set (match_operand:V2DI 0 "register_operand" "=v")
+ (unspec:V2DI [(match_operand:V16QI 1 "register_operand" "v")
+ (match_operand:V16QI 2 "register_operand" "v")]
+ UNSPEC_VBPERMQ))]
+ "TARGET_P8_VECTOR"
+ "vbpermq %0,%1,%2"
+ [(set_attr "length" "4")
+ (set_attr "type" "vecsimple")])
diff --git a/gcc-4.9/gcc/config/rs6000/constraints.md b/gcc-4.9/gcc/config/rs6000/constraints.md
index 50fb101e8..9d6a3bbe7 100644
--- a/gcc-4.9/gcc/config/rs6000/constraints.md
+++ b/gcc-4.9/gcc/config/rs6000/constraints.md
@@ -106,6 +106,11 @@
(define_register_constraint "wz" "rs6000_constraints[RS6000_CONSTRAINT_wz]"
"Floating point register if the LFIWZX instruction is enabled or NO_REGS.")
+(define_constraint "wD"
+ "Int constant that is the element number of the 64-bit scalar in a vector."
+ (and (match_code "const_int")
+ (match_test "TARGET_VSX && (ival == VECTOR_ELEMENT_SCALAR_64BIT)")))
+
;; Lq/stq validates the address for load/store quad
(define_memory_constraint "wQ"
"Memory operand suitable for the load/store quad instructions"
diff --git a/gcc-4.9/gcc/config/rs6000/predicates.md b/gcc-4.9/gcc/config/rs6000/predicates.md
index 7b1121ddb..28f4f5d98 100644
--- a/gcc-4.9/gcc/config/rs6000/predicates.md
+++ b/gcc-4.9/gcc/config/rs6000/predicates.md
@@ -981,6 +981,14 @@
(ior (match_operand 0 "zero_fp_constant")
(match_operand 0 "reg_or_mem_operand")))
+;; Return 1 if the operand is a CONST_INT and it is the element for 64-bit
+;; data types inside of a vector that scalar instructions operate on
+(define_predicate "vsx_scalar_64bit"
+ (match_code "const_int")
+{
+ return (INTVAL (op) == VECTOR_ELEMENT_SCALAR_64BIT);
+})
+
;; Return 1 if the operand is a general register or memory operand without
;; pre_inc or pre_dec or pre_modify, which produces invalid form of PowerPC
;; lwa instruction.
diff --git a/gcc-4.9/gcc/config/rs6000/rs6000-builtin.def b/gcc-4.9/gcc/config/rs6000/rs6000-builtin.def
index 9226035a3..83351691f 100644
--- a/gcc-4.9/gcc/config/rs6000/rs6000-builtin.def
+++ b/gcc-4.9/gcc/config/rs6000/rs6000-builtin.def
@@ -1374,6 +1374,7 @@ BU_P8V_AV_2 (VMINUD, "vminud", CONST, uminv2di3)
BU_P8V_AV_2 (VMAXUD, "vmaxud", CONST, umaxv2di3)
BU_P8V_AV_2 (VMRGEW, "vmrgew", CONST, p8_vmrgew)
BU_P8V_AV_2 (VMRGOW, "vmrgow", CONST, p8_vmrgow)
+BU_P8V_AV_2 (VBPERMQ, "vbpermq", CONST, altivec_vbpermq)
BU_P8V_AV_2 (VPKUDUM, "vpkudum", CONST, altivec_vpkudum)
BU_P8V_AV_2 (VPKSDSS, "vpksdss", CONST, altivec_vpksdss)
BU_P8V_AV_2 (VPKUDUS, "vpkudus", CONST, altivec_vpkudus)
@@ -1448,6 +1449,7 @@ BU_P8V_OVERLOAD_2 (ORC, "orc")
BU_P8V_OVERLOAD_2 (VADDCUQ, "vaddcuq")
BU_P8V_OVERLOAD_2 (VADDUDM, "vaddudm")
BU_P8V_OVERLOAD_2 (VADDUQM, "vadduqm")
+BU_P8V_OVERLOAD_2 (VBPERMQ, "vbpermq")
BU_P8V_OVERLOAD_2 (VMAXSD, "vmaxsd")
BU_P8V_OVERLOAD_2 (VMAXUD, "vmaxud")
BU_P8V_OVERLOAD_2 (VMINSD, "vminsd")
diff --git a/gcc-4.9/gcc/config/rs6000/rs6000-c.c b/gcc-4.9/gcc/config/rs6000/rs6000-c.c
index 0f1dafc5a..46c4a9d8c 100644
--- a/gcc-4.9/gcc/config/rs6000/rs6000-c.c
+++ b/gcc-4.9/gcc/config/rs6000/rs6000-c.c
@@ -3778,6 +3778,12 @@ const struct altivec_builtin_types altivec_overloaded_builtins[] = {
RS6000_BTI_unsigned_V1TI, RS6000_BTI_unsigned_V1TI,
RS6000_BTI_unsigned_V1TI, 0 },
+ { P8V_BUILTIN_VEC_VBPERMQ, P8V_BUILTIN_VBPERMQ,
+ RS6000_BTI_V2DI, RS6000_BTI_V16QI, RS6000_BTI_V16QI, 0 },
+ { P8V_BUILTIN_VEC_VBPERMQ, P8V_BUILTIN_VBPERMQ,
+ RS6000_BTI_unsigned_V2DI, RS6000_BTI_unsigned_V16QI,
+ RS6000_BTI_unsigned_V16QI, 0 },
+
{ P8V_BUILTIN_VEC_VCLZ, P8V_BUILTIN_VCLZB,
RS6000_BTI_V16QI, RS6000_BTI_V16QI, 0, 0 },
{ P8V_BUILTIN_VEC_VCLZ, P8V_BUILTIN_VCLZB,
diff --git a/gcc-4.9/gcc/config/rs6000/rs6000.c b/gcc-4.9/gcc/config/rs6000/rs6000.c
index fc837352c..494efc562 100644
--- a/gcc-4.9/gcc/config/rs6000/rs6000.c
+++ b/gcc-4.9/gcc/config/rs6000/rs6000.c
@@ -2310,6 +2310,10 @@ rs6000_debug_reg_global (void)
(int)END_BUILTINS);
fprintf (stderr, DEBUG_FMT_D, "Number of rs6000 builtins",
(int)RS6000_BUILTIN_COUNT);
+
+ if (TARGET_VSX)
+ fprintf (stderr, DEBUG_FMT_D, "VSX easy 64-bit scalar element",
+ (int)VECTOR_ELEMENT_SCALAR_64BIT);
}
@@ -5632,11 +5636,15 @@ rs6000_expand_vector_set (rtx target, rtx val, int elt)
UNSPEC_VPERM);
else
{
- /* Invert selector. */
+ /* Invert selector. We prefer to generate VNAND on P8 so
+ that future fusion opportunities can kick in, but must
+ generate VNOR elsewhere. */
rtx notx = gen_rtx_NOT (V16QImode, force_reg (V16QImode, x));
- rtx andx = gen_rtx_AND (V16QImode, notx, notx);
+ rtx iorx = (TARGET_P8_VECTOR
+ ? gen_rtx_IOR (V16QImode, notx, notx)
+ : gen_rtx_AND (V16QImode, notx, notx));
rtx tmp = gen_reg_rtx (V16QImode);
- emit_move_insn (tmp, andx);
+ emit_insn (gen_rtx_SET (VOIDmode, tmp, iorx));
/* Permute with operands reversed and adjusted selector. */
x = gen_rtx_UNSPEC (mode, gen_rtvec (3, reg, target, tmp),
@@ -30209,12 +30217,12 @@ altivec_expand_vec_perm_const_le (rtx operands[4])
/* Similarly to altivec_expand_vec_perm_const_le, we must adjust the
permute control vector. But here it's not a constant, so we must
- generate a vector NOR to do the adjustment. */
+ generate a vector NAND or NOR to do the adjustment. */
void
altivec_expand_vec_perm_le (rtx operands[4])
{
- rtx notx, andx, unspec;
+ rtx notx, iorx, unspec;
rtx target = operands[0];
rtx op0 = operands[1];
rtx op1 = operands[2];
@@ -30233,10 +30241,13 @@ altivec_expand_vec_perm_le (rtx operands[4])
if (!REG_P (target))
tmp = gen_reg_rtx (mode);
- /* Invert the selector with a VNOR. */
+ /* Invert the selector with a VNAND if available, else a VNOR.
+ The VNAND is preferred for future fusion opportunities. */
notx = gen_rtx_NOT (V16QImode, sel);
- andx = gen_rtx_AND (V16QImode, notx, notx);
- emit_move_insn (norreg, andx);
+ iorx = (TARGET_P8_VECTOR
+ ? gen_rtx_IOR (V16QImode, notx, notx)
+ : gen_rtx_AND (V16QImode, notx, notx));
+ emit_insn (gen_rtx_SET (VOIDmode, norreg, iorx));
/* Permute with operands reversed and adjusted selector. */
unspec = gen_rtx_UNSPEC (mode, gen_rtvec (3, op1, op0, norreg),
@@ -32519,6 +32530,11 @@ fusion_gpr_load_p (rtx *operands, bool peep2_p)
if (!peep2_reg_dead_p (2, addis_reg))
return false;
+
+ /* If the target register being loaded is the stack pointer, we must
+ avoid loading any other value into it, even temporarily. */
+ if (REG_P (target) && REGNO (target) == STACK_POINTER_REGNUM)
+ return false;
}
base_reg = XEXP (addr, 0);
diff --git a/gcc-4.9/gcc/config/rs6000/rs6000.h b/gcc-4.9/gcc/config/rs6000/rs6000.h
index a6afb6c37..9ec3647fe 100644
--- a/gcc-4.9/gcc/config/rs6000/rs6000.h
+++ b/gcc-4.9/gcc/config/rs6000/rs6000.h
@@ -477,6 +477,10 @@ extern int rs6000_vector_align[];
#define VECTOR_ELT_ORDER_BIG \
(BYTES_BIG_ENDIAN || (rs6000_altivec_element_order == 2))
+/* Element number of the 64-bit value in a 128-bit vector that can be accessed
+ with scalar instructions. */
+#define VECTOR_ELEMENT_SCALAR_64BIT ((BYTES_BIG_ENDIAN) ? 0 : 1)
+
/* Alignment options for fields in structures for sub-targets following
AIX-like ABI.
ALIGN_POWER word-aligns FP doubles (default AIX ABI).
diff --git a/gcc-4.9/gcc/config/rs6000/rs6000.md b/gcc-4.9/gcc/config/rs6000/rs6000.md
index 4bab9591e..64c9e7c10 100644
--- a/gcc-4.9/gcc/config/rs6000/rs6000.md
+++ b/gcc-4.9/gcc/config/rs6000/rs6000.md
@@ -10028,13 +10028,16 @@
rtx op0 = operands[0];
rtx op1 = operands[1];
rtx op2 = operands[2];
- rtx op0_di = simplify_gen_subreg (DImode, op0, SFmode, 0);
+ /* Also use the destination register to hold the unconverted DImode value.
+ This is conceptually a separate value from OP0, so we use gen_rtx_REG
+ rather than simplify_gen_subreg. */
+ rtx op0_di = gen_rtx_REG (DImode, REGNO (op0));
rtx op1_di = simplify_gen_subreg (DImode, op1, SFmode, 0);
/* Move SF value to upper 32-bits for xscvspdpn. */
emit_insn (gen_ashldi3 (op2, op1_di, GEN_INT (32)));
emit_move_insn (op0_di, op2);
- emit_insn (gen_vsx_xscvspdpn_directmove (op0, op0));
+ emit_insn (gen_vsx_xscvspdpn_directmove (op0, op0_di));
DONE;
}
[(set_attr "length" "8")
diff --git a/gcc-4.9/gcc/config/rs6000/vsx.md b/gcc-4.9/gcc/config/rs6000/vsx.md
index 93c8c3b29..d83cdc3df 100644
--- a/gcc-4.9/gcc/config/rs6000/vsx.md
+++ b/gcc-4.9/gcc/config/rs6000/vsx.md
@@ -1223,7 +1223,7 @@
;; Used by direct move to move a SFmode value from GPR to VSX register
(define_insn "vsx_xscvspdpn_directmove"
[(set (match_operand:SF 0 "vsx_register_operand" "=wa")
- (unspec:SF [(match_operand:SF 1 "vsx_register_operand" "wa")]
+ (unspec:SF [(match_operand:DI 1 "vsx_register_operand" "wa")]
UNSPEC_VSX_CVSPDPN))]
"TARGET_XSCVSPDPN"
"xscvspdpn %x0,%x1"
@@ -1531,52 +1531,129 @@
[(set_attr "type" "vecperm")])
;; Extract a DF/DI element from V2DF/V2DI
-(define_insn "vsx_extract_<mode>"
- [(set (match_operand:<VS_scalar> 0 "vsx_register_operand" "=ws,d,?wa")
- (vec_select:<VS_scalar> (match_operand:VSX_D 1 "vsx_register_operand" "wd,wd,wa")
+(define_expand "vsx_extract_<mode>"
+ [(set (match_operand:<VS_scalar> 0 "register_operand" "")
+ (vec_select:<VS_scalar> (match_operand:VSX_D 1 "register_operand" "")
(parallel
- [(match_operand:QI 2 "u5bit_cint_operand" "i,i,i")])))]
+ [(match_operand:QI 2 "u5bit_cint_operand" "")])))]
"VECTOR_MEM_VSX_P (<MODE>mode)"
+ "")
+
+;; Optimize cases were we can do a simple or direct move.
+;; Or see if we can avoid doing the move at all
+(define_insn "*vsx_extract_<mode>_internal1"
+ [(set (match_operand:<VS_scalar> 0 "register_operand" "=d,ws,?wa,r")
+ (vec_select:<VS_scalar>
+ (match_operand:VSX_D 1 "register_operand" "d,wd,wa,wm")
+ (parallel
+ [(match_operand:QI 2 "vsx_scalar_64bit" "wD,wD,wD,wD")])))]
+ "VECTOR_MEM_VSX_P (<MODE>mode) && TARGET_POWERPC64 && TARGET_DIRECT_MOVE"
+{
+ int op0_regno = REGNO (operands[0]);
+ int op1_regno = REGNO (operands[1]);
+
+ if (op0_regno == op1_regno)
+ return "nop";
+
+ if (INT_REGNO_P (op0_regno))
+ return "mfvsrd %0,%x1";
+
+ if (FP_REGNO_P (op0_regno) && FP_REGNO_P (op1_regno))
+ return "fmr %0,%1";
+
+ return "xxlor %x0,%x1,%x1";
+}
+ [(set_attr "type" "fp,vecsimple,vecsimple,mftgpr")
+ (set_attr "length" "4")])
+
+(define_insn "*vsx_extract_<mode>_internal2"
+ [(set (match_operand:<VS_scalar> 0 "vsx_register_operand" "=d,ws,ws,?wa")
+ (vec_select:<VS_scalar>
+ (match_operand:VSX_D 1 "vsx_register_operand" "d,wd,wd,wa")
+ (parallel [(match_operand:QI 2 "u5bit_cint_operand" "wD,wD,i,i")])))]
+ "VECTOR_MEM_VSX_P (<MODE>mode)
+ && (!TARGET_POWERPC64 || !TARGET_DIRECT_MOVE
+ || INTVAL (operands[2]) != VECTOR_ELEMENT_SCALAR_64BIT)"
{
int fldDM;
gcc_assert (UINTVAL (operands[2]) <= 1);
+
+ if (INTVAL (operands[2]) == VECTOR_ELEMENT_SCALAR_64BIT)
+ {
+ int op0_regno = REGNO (operands[0]);
+ int op1_regno = REGNO (operands[1]);
+
+ if (op0_regno == op1_regno)
+ return "nop";
+
+ if (FP_REGNO_P (op0_regno) && FP_REGNO_P (op1_regno))
+ return "fmr %0,%1";
+
+ return "xxlor %x0,%x1,%x1";
+ }
+
fldDM = INTVAL (operands[2]) << 1;
if (!BYTES_BIG_ENDIAN)
fldDM = 3 - fldDM;
operands[3] = GEN_INT (fldDM);
- return \"xxpermdi %x0,%x1,%x1,%3\";
+ return "xxpermdi %x0,%x1,%x1,%3";
}
- [(set_attr "type" "vecperm")])
+ [(set_attr "type" "fp,vecsimple,vecperm,vecperm")
+ (set_attr "length" "4")])
-;; Optimize extracting element 0 from memory
-(define_insn "*vsx_extract_<mode>_zero"
- [(set (match_operand:<VS_scalar> 0 "vsx_register_operand" "=ws,d,?wa")
+;; Optimize extracting a single scalar element from memory if the scalar is in
+;; the correct location to use a single load.
+(define_insn "*vsx_extract_<mode>_load"
+ [(set (match_operand:<VS_scalar> 0 "register_operand" "=d,wv,wr")
(vec_select:<VS_scalar>
- (match_operand:VSX_D 1 "indexed_or_indirect_operand" "Z,Z,Z")
- (parallel [(const_int 0)])))]
- "VECTOR_MEM_VSX_P (<MODE>mode) && WORDS_BIG_ENDIAN"
- "lxsd%U1x %x0,%y1"
- [(set (attr "type")
- (if_then_else
- (match_test "update_indexed_address_mem (operands[1], VOIDmode)")
- (const_string "fpload_ux")
- (const_string "fpload")))
- (set_attr "length" "4")])
-
-;; Optimize extracting element 1 from memory for little endian
-(define_insn "*vsx_extract_<mode>_one_le"
- [(set (match_operand:<VS_scalar> 0 "vsx_register_operand" "=ws,d,?wa")
+ (match_operand:VSX_D 1 "memory_operand" "m,Z,m")
+ (parallel [(match_operand:QI 2 "vsx_scalar_64bit" "wD,wD,wD")])))]
+ "VECTOR_MEM_VSX_P (<MODE>mode)"
+ "@
+ lfd%U1%X1 %0,%1
+ lxsd%U1x %x0,%y1
+ ld%U1%X1 %0,%1"
+ [(set_attr_alternative "type"
+ [(if_then_else
+ (match_test "update_indexed_address_mem (operands[1], VOIDmode)")
+ (const_string "fpload_ux")
+ (if_then_else
+ (match_test "update_address_mem (operands[1], VOIDmode)")
+ (const_string "fpload_u")
+ (const_string "fpload")))
+ (const_string "fpload")
+ (if_then_else
+ (match_test "update_indexed_address_mem (operands[1], VOIDmode)")
+ (const_string "load_ux")
+ (if_then_else
+ (match_test "update_address_mem (operands[1], VOIDmode)")
+ (const_string "load_u")
+ (const_string "load")))])
+ (set_attr "length" "4")])
+
+;; Optimize storing a single scalar element that is the right location to
+;; memory
+(define_insn "*vsx_extract_<mode>_store"
+ [(set (match_operand:<VS_scalar> 0 "memory_operand" "=m,Z,?Z")
(vec_select:<VS_scalar>
- (match_operand:VSX_D 1 "indexed_or_indirect_operand" "Z,Z,Z")
- (parallel [(const_int 1)])))]
- "VECTOR_MEM_VSX_P (<MODE>mode) && !WORDS_BIG_ENDIAN"
- "lxsd%U1x %x0,%y1"
- [(set (attr "type")
- (if_then_else
- (match_test "update_indexed_address_mem (operands[1], VOIDmode)")
- (const_string "fpload_ux")
- (const_string "fpload")))
- (set_attr "length" "4")])
+ (match_operand:VSX_D 1 "register_operand" "d,wd,wa")
+ (parallel [(match_operand:QI 2 "vsx_scalar_64bit" "wD,wD,wD")])))]
+ "VECTOR_MEM_VSX_P (<MODE>mode)"
+ "@
+ stfd%U0%X0 %1,%0
+ stxsd%U0x %x1,%y0
+ stxsd%U0x %x1,%y0"
+ [(set_attr_alternative "type"
+ [(if_then_else
+ (match_test "update_indexed_address_mem (operands[0], VOIDmode)")
+ (const_string "fpstore_ux")
+ (if_then_else
+ (match_test "update_address_mem (operands[0], VOIDmode)")
+ (const_string "fpstore_u")
+ (const_string "fpstore")))
+ (const_string "fpstore")
+ (const_string "fpstore")])
+ (set_attr "length" "4")])
;; Extract a SF element from V4SF
(define_insn_and_split "vsx_extract_v4sf"
diff --git a/gcc-4.9/gcc/config/s390/s390.c b/gcc-4.9/gcc/config/s390/s390.c
index 7a79286c9..aac8de848 100644
--- a/gcc-4.9/gcc/config/s390/s390.c
+++ b/gcc-4.9/gcc/config/s390/s390.c
@@ -4613,7 +4613,7 @@ s390_expand_insv (rtx dest, rtx op1, rtx op2, rtx src)
int smode_bsize, mode_bsize;
rtx op, clobber;
- if (bitsize + bitpos > GET_MODE_SIZE (mode))
+ if (bitsize + bitpos > GET_MODE_BITSIZE (mode))
return false;
/* Generate INSERT IMMEDIATE (IILL et al). */
@@ -9225,6 +9225,13 @@ s390_can_use_return_insn (void)
if (cfun_gpr_save_slot (i))
return false;
+ /* For 31 bit this is not covered by the frame_size check below
+ since f4, f6 are saved in the register save area without needing
+ additional stack space. */
+ if (!TARGET_64BIT
+ && (cfun_fpr_save_p (FPR4_REGNUM) || cfun_fpr_save_p (FPR6_REGNUM)))
+ return false;
+
if (cfun->machine->base_reg
&& !call_really_used_regs[REGNO (cfun->machine->base_reg)])
return false;
diff --git a/gcc-4.9/gcc/config/s390/s390.md b/gcc-4.9/gcc/config/s390/s390.md
index 7d9d1ad7e..b17c1fac8 100644
--- a/gcc-4.9/gcc/config/s390/s390.md
+++ b/gcc-4.9/gcc/config/s390/s390.md
@@ -7001,6 +7001,21 @@
""
"s390_expand_logical_operator (XOR, <MODE>mode, operands); DONE;")
+; Combine replaces (xor (x) (const_int -1)) with (not (x)) when doing
+; simplifications. So its better to have something matching.
+(define_split
+ [(set (match_operand:INT 0 "nonimmediate_operand" "")
+ (not:INT (match_operand:INT 1 "nonimmediate_operand" "")))]
+ ""
+ [(parallel
+ [(set (match_dup 0) (xor:INT (match_dup 1) (match_dup 2)))
+ (clobber (reg:CC CC_REGNUM))])]
+{
+ operands[2] = constm1_rtx;
+ if (!s390_logical_operator_ok_p (operands))
+ FAIL;
+})
+
;
; xordi3 instruction pattern(s).
;
diff --git a/gcc-4.9/gcc/config/spu/spu.c b/gcc-4.9/gcc/config/spu/spu.c
index 302d7e06b..88e3f5e59 100644
--- a/gcc-4.9/gcc/config/spu/spu.c
+++ b/gcc-4.9/gcc/config/spu/spu.c
@@ -2064,7 +2064,7 @@ pad_bb(void)
}
hbr_insn = insn;
}
- if (INSN_CODE (insn) == CODE_FOR_blockage)
+ if (INSN_CODE (insn) == CODE_FOR_blockage && next_insn)
{
if (GET_MODE (insn) == TImode)
PUT_MODE (next_insn, TImode);
diff --git a/gcc-4.9/gcc/config/spu/spu.md b/gcc-4.9/gcc/config/spu/spu.md
index 228b22859..3ac4bfc0b 100644
--- a/gcc-4.9/gcc/config/spu/spu.md
+++ b/gcc-4.9/gcc/config/spu/spu.md
@@ -2851,7 +2851,13 @@
(match_operand:SI 2 "const_int_operand" ""))
(match_operand 3 "nonmemory_operand" ""))]
""
- { spu_expand_insv(operands); DONE; })
+ {
+ if (INTVAL (operands[1]) + INTVAL (operands[2])
+ > GET_MODE_BITSIZE (GET_MODE (operands[0])))
+ FAIL;
+ spu_expand_insv(operands);
+ DONE;
+ })
;; Simplify a number of patterns that get generated by extv, extzv,
;; insv, and loads.
diff --git a/gcc-4.9/gcc/cp/ChangeLog b/gcc-4.9/gcc/cp/ChangeLog
index e0229906d..f95944b9b 100644
--- a/gcc-4.9/gcc/cp/ChangeLog
+++ b/gcc-4.9/gcc/cp/ChangeLog
@@ -1,3 +1,168 @@
+2014-04-22 Release Manager
+
+ * GCC 4.9.0 released.
+
+2014-04-15 Jakub Jelinek <jakub@redhat.com>
+
+ PR plugins/59335
+ * Make-lang.h (CP_PLUGIN_HEADERS): Add type-utils.h.
+
+2014-04-10 Richard Biener <rguenther@suse.de>
+ Jakub Jelinek <jakub@redhat.com>
+
+ PR ipa/60761
+ * error.c (dump_decl) <case FUNCTION_DECL>: If
+ DECL_LANG_SPECIFIC is NULL, but DECL_ABSTRACT_ORIGIN is not,
+ recurse on DECL_ABSTRACT_ORIGIN instead of printing
+ <built-in>.
+
+2014-04-09 Fabien Chêne <fabien@gcc.gnu.org>
+
+ * pt.c (check_template_variable): Check for the return of pedwarn
+ before emitting a note.
+ * parser.c (cp_parser_lambda_introducer): Likewise.
+
+2014-04-08 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/59115
+ * pt.c (process_template_parm): For an invalid non-type parameter
+ only set TREE_TYPE to error_mark_node.
+ (push_inline_template_parms_recursive, comp_template_parms,
+ redeclare_class_template, coerce_template_template_parm,
+ coerce_template_template_parms, unify): Use error_operand_p.
+
+2014-04-08 Nathan Sidwell <nathan@codesourcery.com>
+
+ * class.c (check_bases_and_members): Warn about non-virtual dtors
+ in public bases only. Check warn_ecpp before complaining about
+ non-polymorphic bases.
+
+2014-04-04 Fabien Chêne <fabien@gcc.gnu.org>
+
+ * decl.c (duplicate_decls): Check for the return of warning_at
+ before emitting a note.
+ (warn_misplaced_attr_for_class_type): Likewise.
+ (check_tag_decl): Likewise.
+
+2014-04-04 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/58207
+ * semantics.c (sort_constexpr_mem_initializers): Robustify loop.
+
+2014-04-04 Patrick Palka <patrick@parcs.ath.cx>
+
+ PR c++/44613
+ * semantics.c (add_stmt): Set STATEMENT_LIST_HAS_LABEL.
+ * decl.c (cp_finish_decl): Create a new BIND_EXPR before
+ instantiating a variable-sized type.
+
+ PR c++/21113
+ * decl.c (decl_jump_unsafe): Consider variably-modified decls.
+
+2014-04-04 Fabien Chêne <fabien@gcc.gnu.org>
+
+ * class.c (find_abi_tags_r): Check for the return of warning
+ before emitting a note.
+ (one_inherited_ctor): Likewise.
+
+2014-04-04 Fabien Chêne <fabien@gcc.gnu.org>
+
+ * decl.c (duplicate_decls): Check for the return of permerror
+ before emitting a note.
+
+2014-04-03 Nathan Sidwell <nathan@codesourcery.com>
+
+ * class.c (accessible_nvdtor_p): New.
+ (check_bases): Don't check base destructor here ...
+ (check_bases_and_members): ... check them here. Trigger on
+ Wnon-virtual-dtor flag.
+ (finish_struct_1): Use accessible_nvdtor_p.
+
+2014-04-01 Jason Merrill <jason@redhat.com>
+
+ * pt.c (process_partial_specialization): Say "not deducible"
+ rather than "not used". Use inform.
+
+ PR c++/60374
+ * pt.c (coerce_template_parms): Check that the pack expansion
+ pattern works with the first matching parameter.
+
+2014-04-01 Fabien Chêne <fabien@gcc.gnu.org>
+
+ * init.c (perform_member_init): Homogenize uninitialized
+ diagnostics.
+
+2014-04-01 Jason Merrill <jason@redhat.com>
+
+ PR c++/60708
+ * call.c (build_array_conv): Call complete_type.
+
+ PR c++/60713
+ * typeck2.c (PICFLAG_SIDE_EFFECTS): New.
+ (picflag_from_initializer): Return it.
+ (process_init_constructor): Handle it.
+
+ PR c++/60642
+ * decl2.c (is_late_template_attribute): Don't defer abi_tag.
+ * mangle.c (write_unqualified_name): Fix abi_tag on templates.
+ * pt.c (get_template_info): Handle NAMESPACE_DECL.
+ (most_general_template): Handle more kinds of template.
+ * tree.c (handle_abi_tag_attribute): Ignore abi_tag on template
+ instantiations and specializations.
+
+2014-03-31 Patrick Palka <patrick@parcs.ath.cx>
+
+ PR c++/44859
+ * typeck.c (maybe_warn_about_returning_address_of_local): Unwrap
+ COMPONENT_REFs and ARRAY_REFs sooner.
+
+2014-03-29 Adam Butcher <adam@jessamine.co.uk>
+
+ PR c++/60626
+ * parser.c (cp_parser_init_declarator): Handle erroneous generic type
+ usage in non-functions with pushed scope.
+
+2014-03-28 Adam Butcher <adam@jessamine.co.uk>
+
+ PR c++/60573
+ * name-lookup.h (cp_binding_level): New transient field defining_class_p
+ to indicate whether a scope is in the process of defining a class.
+ * semantics.c (begin_class_definition): Set defining_class_p.
+ * name-lookup.c (leave_scope): Reset defining_class_p.
+ * parser.c (synthesize_implicit_template_parm): Use cp_binding_level::
+ defining_class_p rather than TYPE_BEING_DEFINED as the predicate for
+ unwinding to class-defining scope to handle the erroneous definition of
+ a generic function of an arbitrarily nested class within an enclosing
+ class.
+
+2014-03-26 Fabien Chêne <fabien@gcc.gnu.org>
+
+ PR c++/52369
+ * method.c (walk_field_subobs): Improve the diagnostic
+ locations for both REFERENCE_TYPEs and non-static const members.
+ * init.c (diagnose_uninitialized_cst_or_ref_member): Use %q#D
+ instead of %qD to be consistent with the c++11 diagnostic.
+
+2014-03-25 Jason Merrill <jason@redhat.com>
+
+ PR c++/60566
+ PR c++/58678
+ * class.c (build_vtbl_initializer): Handle abstract dtors here.
+ * search.c (get_pure_virtuals): Not here.
+
+ PR c++/60375
+ * parser.c (cp_parser_lambda_expression): Don't parse the body of
+ a lambda in unevaluated context.
+
+ PR c++/60628
+ * decl.c (create_array_type_for_decl): Complain about array of auto.
+
+2014-03-25 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/60331
+ * semantics.c (potential_constant_expression_1): Handle
+ DECL_EXPR.
+
2014-03-24 Adam Butcher <adam@jessamine.co.uk>
PR c++/60627
diff --git a/gcc-4.9/gcc/cp/ChangeLog-2008 b/gcc-4.9/gcc/cp/ChangeLog-2008
index 5a69a5d20..83fd123a7 100644
--- a/gcc-4.9/gcc/cp/ChangeLog-2008
+++ b/gcc-4.9/gcc/cp/ChangeLog-2008
@@ -307,8 +307,8 @@
* g++spec.c (LIBSTDCXX_STATIC): New.
(lang_spec_driver): Use LIBSTDCXX_STATIC when not
shared_libgcc.
-
-2008-11-05 Fabien Chene <fabien.chene@gmail.com>
+
+2008-11-05 Fabien Chêne <fabien@gcc.gnu.org>
PR c++/32519
* cp-tree.h: Fix DECL_NONSTATIC_MEMBER_P to handle member template
diff --git a/gcc-4.9/gcc/cp/ChangeLog-2010 b/gcc-4.9/gcc/cp/ChangeLog-2010
index 5f563157c..e706b7cb8 100644
--- a/gcc-4.9/gcc/cp/ChangeLog-2010
+++ b/gcc-4.9/gcc/cp/ChangeLog-2010
@@ -3127,13 +3127,13 @@
* typeck.c (cp_build_modify_expr): Complain about assignment to
array from init list.
-2010-05-10 Fabien Chêne <fabien.chene@gmail.com>
+2010-05-10 Fabien Chêne <fabien@gcc.gnu.org>
PR c++/43719
- * decl.c (check_initializer): strip array type before checking for
+ * decl.c (check_initializer): Strip array type before checking for
uninitialized const or ref members.
-2010-05-07 Fabien Chêne <fabien.chene@gmail.com>
+2010-05-07 Fabien Chêne <fabien@gcc.gnu.org>
PR c++/43951
* init.c (diagnose_uninitialized_cst_or_ref_member_1): Returns the
@@ -3258,12 +3258,12 @@
PR c++/43779
* typeck.c (warn_args_num): New function.
(convert_arguments): Use warn_args_num to print the diagnostic
- messages.
+ messages.
-2010-04-29 Fabien Chêne <fabien.chene@gmail.com>
+2010-04-29 Fabien Chêne <fabien@gcc.gnu.org>
PR c++/43890
- * init.c (diagnose_uninitialized_cst_or_ref_member): check for
+ * init.c (diagnose_uninitialized_cst_or_ref_member): Check for
user-provided constructor while recursing.
2010-04-28 Manuel López-Ibáñez <manu@gcc.gnu.org>
@@ -3277,10 +3277,10 @@
* init.c (perform_member_init): Check CLASS_TYPE_P.
-2010-04-27 Fabien Chêne <fabien.chene@gmail.com>
+2010-04-27 Fabien Chêne <fabien@gcc.gnu.org>
PR c++/29043
- * init.c (perform_member_init): check for uninitialized const or
+ * init.c (perform_member_init): Check for uninitialized const or
reference members, including array types.
2010-04-24 Jason Merrill <jason@redhat.com>
@@ -3331,7 +3331,7 @@
convert_like_real.
* cp-tree.h: Adjust.
-2010-04-27 Fabien Chêne <fabien.chene@gmail.com>
+2010-04-27 Fabien Chêne <fabien@gcc.gnu.org>
Jason Merrill <jason@redhat.com>
PR c++/42844
@@ -3403,7 +3403,7 @@
* call.c (type_decays_to): Call cv_unqualified for non-class type.
-2010-04-12 Fabien Chene <fabien.chene@gmail.com>
+2010-04-12 Fabien Chêne <fabien@gcc.gnu.org>>
PR c++/25811
* cp-tree.h (diagnose_uninitialized_cst_or_ref_member): Declare.
diff --git a/gcc-4.9/gcc/cp/ChangeLog-2011 b/gcc-4.9/gcc/cp/ChangeLog-2011
index 506598965..02dde6e78 100644
--- a/gcc-4.9/gcc/cp/ChangeLog-2011
+++ b/gcc-4.9/gcc/cp/ChangeLog-2011
@@ -3511,7 +3511,7 @@
2011-05-07 Fabien Chêne <fabien@gcc.gnu.org>
PR c++/48859
- * init.c (diagnose_uninitialized_cst_or_ref_member_1): stop the
+ * init.c (diagnose_uninitialized_cst_or_ref_member_1): Stop the
recursion if there is user defined constructor.
2011-05-09 Jason Merrill <jason@redhat.com>
diff --git a/gcc-4.9/gcc/cp/ChangeLog-2012 b/gcc-4.9/gcc/cp/ChangeLog-2012
index a57051ebf..e63a3f79d 100644
--- a/gcc-4.9/gcc/cp/ChangeLog-2012
+++ b/gcc-4.9/gcc/cp/ChangeLog-2012
@@ -2716,7 +2716,7 @@
2012-02-16 Fabien Chêne <fabien@gcc.gnu.org>
PR c++/52126
- * decl.c (xref_basetypes): call dependent_scope_p instead of
+ * decl.c (xref_basetypes): Call dependent_scope_p instead of
dependent_type_p.
2012-02-16 Jason Merrill <jason@redhat.com>
diff --git a/gcc-4.9/gcc/cp/Make-lang.in b/gcc-4.9/gcc/cp/Make-lang.in
index 5480c4eae..bd1c1d78f 100644
--- a/gcc-4.9/gcc/cp/Make-lang.in
+++ b/gcc-4.9/gcc/cp/Make-lang.in
@@ -39,7 +39,7 @@ CXX_INSTALL_NAME := $(shell echo c++|sed '$(program_transform_name)')
GXX_INSTALL_NAME := $(shell echo g++|sed '$(program_transform_name)')
CXX_TARGET_INSTALL_NAME := $(target_noncanonical)-$(shell echo c++|sed '$(program_transform_name)')
GXX_TARGET_INSTALL_NAME := $(target_noncanonical)-$(shell echo g++|sed '$(program_transform_name)')
-CP_PLUGIN_HEADERS := cp-tree.h cxx-pretty-print.h name-lookup.h
+CP_PLUGIN_HEADERS := cp-tree.h cxx-pretty-print.h name-lookup.h type-utils.h
#
# Define the names for selecting c++ in LANGUAGES.
diff --git a/gcc-4.9/gcc/cp/call.c b/gcc-4.9/gcc/cp/call.c
index 9a0e3b5a1..98469e9e4 100644
--- a/gcc-4.9/gcc/cp/call.c
+++ b/gcc-4.9/gcc/cp/call.c
@@ -948,6 +948,9 @@ build_array_conv (tree type, tree ctor, int flags, tsubst_flags_t complain)
bool user = false;
enum conversion_rank rank = cr_exact;
+ /* We might need to propagate the size from the element to the array. */
+ complete_type (type);
+
if (TYPE_DOMAIN (type)
&& !variably_modified_type_p (TYPE_DOMAIN (type), NULL_TREE))
{
diff --git a/gcc-4.9/gcc/cp/class.c b/gcc-4.9/gcc/cp/class.c
index b46391be1..334bfd5ee 100644
--- a/gcc-4.9/gcc/cp/class.c
+++ b/gcc-4.9/gcc/cp/class.c
@@ -149,6 +149,7 @@ static tree *build_base_field (record_layout_info, tree, splay_tree, tree *);
static void build_base_fields (record_layout_info, splay_tree, tree *);
static void check_methods (tree);
static void remove_zero_width_bit_fields (tree);
+static bool accessible_nvdtor_p (tree);
static void check_bases (tree, int *, int *);
static void check_bases_and_members (tree);
static tree create_vtable_ptr (tree, tree *);
@@ -1384,19 +1385,21 @@ find_abi_tags_r (tree *tp, int *walk_subtrees, void *data)
/* Otherwise we're diagnosing missing tags. */
else if (TYPE_P (p->subob))
{
- warning (OPT_Wabi_tag, "%qT does not have the %E abi tag "
- "that base %qT has", p->t, tag, p->subob);
- inform (location_of (p->subob), "%qT declared here",
- p->subob);
+ if (warning (OPT_Wabi_tag, "%qT does not have the %E abi tag "
+ "that base %qT has", p->t, tag, p->subob))
+ inform (location_of (p->subob), "%qT declared here",
+ p->subob);
}
else
{
- warning (OPT_Wabi_tag, "%qT does not have the %E abi tag "
- "that %qT (used in the type of %qD) has",
- p->t, tag, *tp, p->subob);
- inform (location_of (p->subob), "%qD declared here",
- p->subob);
- inform (location_of (*tp), "%qT declared here", *tp);
+ if (warning (OPT_Wabi_tag, "%qT does not have the %E abi tag "
+ "that %qT (used in the type of %qD) has",
+ p->t, tag, *tp, p->subob))
+ {
+ inform (location_of (p->subob), "%qD declared here",
+ p->subob);
+ inform (location_of (*tp), "%qT declared here", *tp);
+ }
}
}
}
@@ -1476,6 +1479,33 @@ inherit_targ_abi_tags (tree t)
mark_type_abi_tags (t, false);
}
+/* Return true, iff class T has a non-virtual destructor that is
+ accessible from outside the class heirarchy (i.e. is public, or
+ there's a suitable friend. */
+
+static bool
+accessible_nvdtor_p (tree t)
+{
+ tree dtor = CLASSTYPE_DESTRUCTORS (t);
+
+ /* An implicitly declared destructor is always public. And,
+ if it were virtual, we would have created it by now. */
+ if (!dtor)
+ return true;
+
+ if (DECL_VINDEX (dtor))
+ return false; /* Virtual */
+
+ if (!TREE_PRIVATE (dtor) && !TREE_PROTECTED (dtor))
+ return true; /* Public */
+
+ if (CLASSTYPE_FRIEND_CLASSES (t)
+ || DECL_FRIENDLIST (TYPE_MAIN_DECL (t)))
+ return true; /* Has friends */
+
+ return false;
+}
+
/* Run through the base classes of T, updating CANT_HAVE_CONST_CTOR_P,
and NO_CONST_ASN_REF_P. Also set flag bits in T based on
properties of the bases. */
@@ -1512,13 +1542,6 @@ check_bases (tree t,
if (!CLASSTYPE_LITERAL_P (basetype))
CLASSTYPE_LITERAL_P (t) = false;
- /* Effective C++ rule 14. We only need to check TYPE_POLYMORPHIC_P
- here because the case of virtual functions but non-virtual
- dtor is handled in finish_struct_1. */
- if (!TYPE_POLYMORPHIC_P (basetype))
- warning (OPT_Weffc__,
- "base class %q#T has a non-virtual destructor", basetype);
-
/* If the base class doesn't have copy constructors or
assignment operators that take const references, then the
derived class cannot have such a member automatically
@@ -3062,9 +3085,9 @@ one_inherited_ctor (tree ctor, tree t)
one_inheriting_sig (t, ctor, new_parms, i);
if (parms == NULL_TREE)
{
- warning (OPT_Winherited_variadic_ctor,
- "the ellipsis in %qD is not inherited", ctor);
- inform (DECL_SOURCE_LOCATION (ctor), "%qD declared here", ctor);
+ if (warning (OPT_Winherited_variadic_ctor,
+ "the ellipsis in %qD is not inherited", ctor))
+ inform (DECL_SOURCE_LOCATION (ctor), "%qD declared here", ctor);
}
}
@@ -5547,6 +5570,30 @@ check_bases_and_members (tree t)
TYPE_HAS_COMPLEX_MOVE_ASSIGN (t) |= TYPE_CONTAINS_VPTR_P (t);
TYPE_HAS_COMPLEX_DFLT (t) |= TYPE_CONTAINS_VPTR_P (t);
+ /* Warn if a public base of a polymorphic type has an accessible
+ non-virtual destructor. It is only now that we know the class is
+ polymorphic. Although a polymorphic base will have a already
+ been diagnosed during its definition, we warn on use too. */
+ if (TYPE_POLYMORPHIC_P (t) && warn_nonvdtor)
+ {
+ tree binfo = TYPE_BINFO (t);
+ vec<tree, va_gc> *accesses = BINFO_BASE_ACCESSES (binfo);
+ tree base_binfo;
+ unsigned i;
+
+ for (i = 0; BINFO_BASE_ITERATE (binfo, i, base_binfo); i++)
+ {
+ tree basetype = TREE_TYPE (base_binfo);
+
+ if ((*accesses)[i] == access_public_node
+ && (TYPE_POLYMORPHIC_P (basetype) || warn_ecpp)
+ && accessible_nvdtor_p (basetype))
+ warning (OPT_Wnon_virtual_dtor,
+ "base class %q#T has accessible non-virtual destructor",
+ basetype);
+ }
+ }
+
/* If the class has no user-declared constructor, but does have
non-static const or reference data members that can never be
initialized, issue a warning. */
@@ -6597,25 +6644,11 @@ finish_struct_1 (tree t)
/* This warning does not make sense for Java classes, since they
cannot have destructors. */
- if (!TYPE_FOR_JAVA (t) && warn_nonvdtor && TYPE_POLYMORPHIC_P (t))
- {
- tree dtor;
-
- dtor = CLASSTYPE_DESTRUCTORS (t);
- if (/* An implicitly declared destructor is always public. And,
- if it were virtual, we would have created it by now. */
- !dtor
- || (!DECL_VINDEX (dtor)
- && (/* public non-virtual */
- (!TREE_PRIVATE (dtor) && !TREE_PROTECTED (dtor))
- || (/* non-public non-virtual with friends */
- (TREE_PRIVATE (dtor) || TREE_PROTECTED (dtor))
- && (CLASSTYPE_FRIEND_CLASSES (t)
- || DECL_FRIENDLIST (TYPE_MAIN_DECL (t)))))))
- warning (OPT_Wnon_virtual_dtor,
- "%q#T has virtual functions and accessible"
- " non-virtual destructor", t);
- }
+ if (!TYPE_FOR_JAVA (t) && warn_nonvdtor
+ && TYPE_POLYMORPHIC_P (t) && accessible_nvdtor_p (t))
+ warning (OPT_Wnon_virtual_dtor,
+ "%q#T has virtual functions and accessible"
+ " non-virtual destructor", t);
complete_vars (t);
@@ -9017,6 +9050,16 @@ build_vtbl_initializer (tree binfo,
if (!TARGET_VTABLE_USES_DESCRIPTORS)
init = fold_convert (vfunc_ptr_type_node,
build_fold_addr_expr (fn));
+ /* Don't refer to a virtual destructor from a constructor
+ vtable or a vtable for an abstract class, since destroying
+ an object under construction is undefined behavior and we
+ don't want it to be considered a candidate for speculative
+ devirtualization. But do create the thunk for ABI
+ compliance. */
+ if (DECL_DESTRUCTOR_P (fn_original)
+ && (CLASSTYPE_PURE_VIRTUALS (DECL_CONTEXT (fn_original))
+ || orig_binfo != binfo))
+ init = size_zero_node;
}
}
diff --git a/gcc-4.9/gcc/cp/decl.c b/gcc-4.9/gcc/cp/decl.c
index c912ffcb5..340059442 100644
--- a/gcc-4.9/gcc/cp/decl.c
+++ b/gcc-4.9/gcc/cp/decl.c
@@ -1648,10 +1648,10 @@ duplicate_decls (tree newdecl, tree olddecl, bool newdecl_is_friend)
&& prototype_p (TREE_TYPE (newdecl)))
{
/* Prototype decl follows defn w/o prototype. */
- warning_at (DECL_SOURCE_LOCATION (newdecl), 0,
- "prototype specified for %q#D", newdecl);
- inform (DECL_SOURCE_LOCATION (olddecl),
- "previous non-prototype definition here");
+ if (warning_at (DECL_SOURCE_LOCATION (newdecl), 0,
+ "prototype specified for %q#D", newdecl))
+ inform (DECL_SOURCE_LOCATION (olddecl),
+ "previous non-prototype definition here");
}
else if (VAR_OR_FUNCTION_DECL_P (olddecl)
&& DECL_LANGUAGE (newdecl) != DECL_LANGUAGE (olddecl))
@@ -1737,9 +1737,9 @@ duplicate_decls (tree newdecl, tree olddecl, bool newdecl_is_friend)
if (permerror (input_location,
"default argument given for parameter "
"%d of %q#D", i, newdecl))
- permerror (DECL_SOURCE_LOCATION (olddecl),
- "previous specification in %q#D here",
- olddecl);
+ inform (DECL_SOURCE_LOCATION (olddecl),
+ "previous specification in %q#D here",
+ olddecl);
}
else
{
@@ -2785,12 +2785,11 @@ decl_jump_unsafe (tree decl)
|| type == error_mark_node)
return 0;
- type = strip_array_types (type);
-
- if (DECL_NONTRIVIALLY_INITIALIZED_P (decl))
+ if (DECL_NONTRIVIALLY_INITIALIZED_P (decl)
+ || variably_modified_type_p (type, NULL_TREE))
return 2;
- if (TYPE_HAS_NONTRIVIAL_DESTRUCTOR (TREE_TYPE (decl)))
+ if (TYPE_HAS_NONTRIVIAL_DESTRUCTOR (type))
return 1;
return 0;
@@ -4242,12 +4241,12 @@ warn_misplaced_attr_for_class_type (source_location location,
{
gcc_assert (OVERLOAD_TYPE_P (class_type));
- warning_at (location, OPT_Wattributes,
- "attribute ignored in declaration "
- "of %q#T", class_type);
- inform (location,
- "attribute for %q#T must follow the %qs keyword",
- class_type, class_key_or_enum_as_string (class_type));
+ if (warning_at (location, OPT_Wattributes,
+ "attribute ignored in declaration "
+ "of %q#T", class_type))
+ inform (location,
+ "attribute for %q#T must follow the %qs keyword",
+ class_type, class_key_or_enum_as_string (class_type));
}
/* Make sure that a declaration with no declarator is well-formed, i.e.
@@ -4374,12 +4373,12 @@ check_tag_decl (cp_decl_specifier_seq *declspecs,
No attribute-specifier-seq shall appertain to an explicit
instantiation. */
{
- warning_at (loc, OPT_Wattributes,
- "attribute ignored in explicit instantiation %q#T",
- declared_type);
- inform (loc,
- "no attribute can be applied to "
- "an explicit instantiation");
+ if (warning_at (loc, OPT_Wattributes,
+ "attribute ignored in explicit instantiation %q#T",
+ declared_type))
+ inform (loc,
+ "no attribute can be applied to "
+ "an explicit instantiation");
}
else
warn_misplaced_attr_for_class_type (loc, declared_type);
@@ -6441,7 +6440,24 @@ cp_finish_decl (tree decl, tree init, bool init_const_expr_p,
after the call to check_initializer so that the DECL_EXPR for a
reference temp is added before the DECL_EXPR for the reference itself. */
if (DECL_FUNCTION_SCOPE_P (decl))
- add_decl_expr (decl);
+ {
+ /* If we're building a variable sized type, and we might be
+ reachable other than via the top of the current binding
+ level, then create a new BIND_EXPR so that we deallocate
+ the object at the right time. */
+ if (VAR_P (decl)
+ && DECL_SIZE (decl)
+ && !TREE_CONSTANT (DECL_SIZE (decl))
+ && STATEMENT_LIST_HAS_LABEL (cur_stmt_list))
+ {
+ tree bind;
+ bind = build3 (BIND_EXPR, void_type_node, NULL, NULL, NULL);
+ TREE_SIDE_EFFECTS (bind) = 1;
+ add_stmt (bind);
+ BIND_EXPR_BODY (bind) = push_stmt_list ();
+ }
+ add_decl_expr (decl);
+ }
/* Let the middle end know about variables and functions -- but not
static data members in uninstantiated class templates. */
@@ -8534,6 +8550,14 @@ create_array_type_for_decl (tree name, tree type, tree size)
&& (flag_iso || warn_vla > 0))
pedwarn (input_location, OPT_Wvla, "array of array of runtime bound");
+ /* 8.3.4p1: ...if the type of the identifier of D contains the auto
+ type-specifier, the program is ill-formed. */
+ if (type_uses_auto (type))
+ {
+ error ("%qD declared as array of %qT", name, type);
+ return error_mark_node;
+ }
+
/* Figure out the index type for the array. */
if (size)
itype = compute_array_index_type (name, size, tf_warning_or_error);
diff --git a/gcc-4.9/gcc/cp/decl2.c b/gcc-4.9/gcc/cp/decl2.c
index dfc532d5b..6c52e53bc 100644
--- a/gcc-4.9/gcc/cp/decl2.c
+++ b/gcc-4.9/gcc/cp/decl2.c
@@ -1169,8 +1169,9 @@ is_late_template_attribute (tree attr, tree decl)
/* Also defer most attributes on dependent types. This is not
necessary in all cases, but is the better default. */
else if (dependent_type_p (type)
- /* But attribute visibility specifically works on
- templates. */
+ /* But attributes abi_tag and visibility specifically apply
+ to templates. */
+ && !is_attribute_p ("abi_tag", name)
&& !is_attribute_p ("visibility", name))
return true;
else
diff --git a/gcc-4.9/gcc/cp/error.c b/gcc-4.9/gcc/cp/error.c
index 454feb519..699d5458a 100644
--- a/gcc-4.9/gcc/cp/error.c
+++ b/gcc-4.9/gcc/cp/error.c
@@ -1145,7 +1145,12 @@ dump_decl (cxx_pretty_printer *pp, tree t, int flags)
case FUNCTION_DECL:
if (! DECL_LANG_SPECIFIC (t))
- pp_string (pp, M_("<built-in>"));
+ {
+ if (DECL_ABSTRACT_ORIGIN (t))
+ dump_decl (pp, DECL_ABSTRACT_ORIGIN (t), flags);
+ else
+ pp_string (pp, M_("<built-in>"));
+ }
else if (DECL_GLOBAL_CTOR_P (t) || DECL_GLOBAL_DTOR_P (t))
dump_global_iord (pp, t);
else
diff --git a/gcc-4.9/gcc/cp/init.c b/gcc-4.9/gcc/cp/init.c
index a2549575a..1a1f6c0fe 100644
--- a/gcc-4.9/gcc/cp/init.c
+++ b/gcc-4.9/gcc/cp/init.c
@@ -694,11 +694,14 @@ perform_member_init (tree member, tree init)
if (CP_TYPE_CONST_P (type)
&& init == NULL_TREE
&& default_init_uninitialized_part (type))
- /* TYPE_NEEDS_CONSTRUCTING can be set just because we have a
- vtable; still give this diagnostic. */
- permerror (DECL_SOURCE_LOCATION (current_function_decl),
- "uninitialized member %qD with %<const%> type %qT",
- member, type);
+ {
+ /* TYPE_NEEDS_CONSTRUCTING can be set just because we have a
+ vtable; still give this diagnostic. */
+ if (permerror (DECL_SOURCE_LOCATION (current_function_decl),
+ "uninitialized const member in %q#T", type))
+ inform (DECL_SOURCE_LOCATION (member),
+ "%q#D should be initialized", member );
+ }
finish_expr_stmt (build_aggr_init (decl, init, flags,
tf_warning_or_error));
}
@@ -710,13 +713,19 @@ perform_member_init (tree member, tree init)
tree core_type;
/* member traversal: note it leaves init NULL */
if (TREE_CODE (type) == REFERENCE_TYPE)
- permerror (DECL_SOURCE_LOCATION (current_function_decl),
- "uninitialized reference member %qD",
- member);
+ {
+ if (permerror (DECL_SOURCE_LOCATION (current_function_decl),
+ "uninitialized reference member in %q#T", type))
+ inform (DECL_SOURCE_LOCATION (member),
+ "%q#D should be initialized", member);
+ }
else if (CP_TYPE_CONST_P (type))
- permerror (DECL_SOURCE_LOCATION (current_function_decl),
- "uninitialized member %qD with %<const%> type %qT",
- member, type);
+ {
+ if (permerror (DECL_SOURCE_LOCATION (current_function_decl),
+ "uninitialized const member in %q#T", type))
+ inform (DECL_SOURCE_LOCATION (member),
+ "%q#D should be initialized", member );
+ }
core_type = strip_array_types (type);
@@ -2157,7 +2166,7 @@ diagnose_uninitialized_cst_or_ref_member_1 (tree type, tree origin,
"of %q#T", DECL_CONTEXT (field), origin);
}
inform (DECL_SOURCE_LOCATION (field),
- "%qD should be initialized", field);
+ "%q#D should be initialized", field);
}
}
@@ -2185,7 +2194,7 @@ diagnose_uninitialized_cst_or_ref_member_1 (tree type, tree origin,
"of %q#T", DECL_CONTEXT (field), origin);
}
inform (DECL_SOURCE_LOCATION (field),
- "%qD should be initialized", field);
+ "%q#D should be initialized", field);
}
}
diff --git a/gcc-4.9/gcc/cp/mangle.c b/gcc-4.9/gcc/cp/mangle.c
index 251edb14d..da82dd6ac 100644
--- a/gcc-4.9/gcc/cp/mangle.c
+++ b/gcc-4.9/gcc/cp/mangle.c
@@ -180,7 +180,7 @@ static void write_unscoped_template_name (const tree);
static void write_nested_name (const tree);
static void write_prefix (const tree);
static void write_template_prefix (const tree);
-static void write_unqualified_name (const tree);
+static void write_unqualified_name (tree);
static void write_conversion_operator_name (const tree);
static void write_source_name (tree);
static void write_literal_operator_name (tree);
@@ -1195,7 +1195,7 @@ write_unqualified_id (tree identifier)
}
static void
-write_unqualified_name (const tree decl)
+write_unqualified_name (tree decl)
{
MANGLE_TRACE_TREE ("unqualified-name", decl);
@@ -1280,10 +1280,21 @@ write_unqualified_name (const tree decl)
write_source_name (DECL_NAME (decl));
}
- tree attrs = (TREE_CODE (decl) == TYPE_DECL
- ? TYPE_ATTRIBUTES (TREE_TYPE (decl))
- : DECL_ATTRIBUTES (decl));
- write_abi_tags (lookup_attribute ("abi_tag", attrs));
+ /* We use the ABI tags from the primary template, ignoring tags on any
+ specializations. This is necessary because C++ doesn't require a
+ specialization to be declared before it is used unless the use
+ requires a complete type, but we need to get the tags right on
+ incomplete types as well. */
+ if (tree tmpl = most_general_template (decl))
+ decl = DECL_TEMPLATE_RESULT (tmpl);
+ /* Don't crash on an unbound class template. */
+ if (decl)
+ {
+ tree attrs = (TREE_CODE (decl) == TYPE_DECL
+ ? TYPE_ATTRIBUTES (TREE_TYPE (decl))
+ : DECL_ATTRIBUTES (decl));
+ write_abi_tags (lookup_attribute ("abi_tag", attrs));
+ }
}
/* Write the unqualified-name for a conversion operator to TYPE. */
diff --git a/gcc-4.9/gcc/cp/method.c b/gcc-4.9/gcc/cp/method.c
index d72b564a4..11bff7f45 100644
--- a/gcc-4.9/gcc/cp/method.c
+++ b/gcc-4.9/gcc/cp/method.c
@@ -1110,15 +1110,23 @@ walk_field_subobs (tree fields, tree fnname, special_function_kind sfk,
&& default_init_uninitialized_part (mem_type))
{
if (diag)
- error ("uninitialized non-static const member %q#D",
- field);
+ {
+ error ("uninitialized const member in %q#T",
+ current_class_type);
+ inform (DECL_SOURCE_LOCATION (field),
+ "%q#D should be initialized", field);
+ }
bad = true;
}
else if (TREE_CODE (mem_type) == REFERENCE_TYPE)
{
if (diag)
- error ("uninitialized non-static reference member %q#D",
- field);
+ {
+ error ("uninitialized reference member in %q#T",
+ current_class_type);
+ inform (DECL_SOURCE_LOCATION (field),
+ "%q#D should be initialized", field);
+ }
bad = true;
}
diff --git a/gcc-4.9/gcc/cp/name-lookup.c b/gcc-4.9/gcc/cp/name-lookup.c
index 53f14f3ee..0137c3f4a 100644
--- a/gcc-4.9/gcc/cp/name-lookup.c
+++ b/gcc-4.9/gcc/cp/name-lookup.c
@@ -1630,10 +1630,14 @@ leave_scope (void)
free_binding_level = scope;
}
- /* Find the innermost enclosing class scope, and reset
- CLASS_BINDING_LEVEL appropriately. */
if (scope->kind == sk_class)
{
+ /* Reset DEFINING_CLASS_P to allow for reuse of a
+ class-defining scope in a non-defining context. */
+ scope->defining_class_p = 0;
+
+ /* Find the innermost enclosing class scope, and reset
+ CLASS_BINDING_LEVEL appropriately. */
class_binding_level = NULL;
for (scope = current_binding_level; scope; scope = scope->level_chain)
if (scope->kind == sk_class)
diff --git a/gcc-4.9/gcc/cp/name-lookup.h b/gcc-4.9/gcc/cp/name-lookup.h
index a63442f85..40e0338ca 100644
--- a/gcc-4.9/gcc/cp/name-lookup.h
+++ b/gcc-4.9/gcc/cp/name-lookup.h
@@ -255,7 +255,14 @@ struct GTY(()) cp_binding_level {
unsigned more_cleanups_ok : 1;
unsigned have_cleanups : 1;
- /* 24 bits left to fill a 32-bit word. */
+ /* Transient state set if this scope is of sk_class kind
+ and is in the process of defining 'this_entity'. Reset
+ on leaving the class definition to allow for the scope
+ to be subsequently re-used as a non-defining scope for
+ 'this_entity'. */
+ unsigned defining_class_p : 1;
+
+ /* 23 bits left to fill a 32-bit word. */
};
/* The binding level currently in effect. */
diff --git a/gcc-4.9/gcc/cp/parser.c b/gcc-4.9/gcc/cp/parser.c
index 4ca08a13d..f386eed27 100644
--- a/gcc-4.9/gcc/cp/parser.c
+++ b/gcc-4.9/gcc/cp/parser.c
@@ -8718,14 +8718,17 @@ cp_parser_lambda_expression (cp_parser* parser)
{
tree lambda_expr = build_lambda_expr ();
tree type;
- bool ok;
+ bool ok = true;
LAMBDA_EXPR_LOCATION (lambda_expr)
= cp_lexer_peek_token (parser->lexer)->location;
if (cp_unevaluated_operand)
- error_at (LAMBDA_EXPR_LOCATION (lambda_expr),
- "lambda-expression in unevaluated context");
+ {
+ error_at (LAMBDA_EXPR_LOCATION (lambda_expr),
+ "lambda-expression in unevaluated context");
+ ok = false;
+ }
/* We may be in the middle of deferred access check. Disable
it now. */
@@ -8770,12 +8773,15 @@ cp_parser_lambda_expression (cp_parser* parser)
/* By virtue of defining a local class, a lambda expression has access to
the private variables of enclosing classes. */
- ok = cp_parser_lambda_declarator_opt (parser, lambda_expr);
+ ok &= cp_parser_lambda_declarator_opt (parser, lambda_expr);
if (ok)
cp_parser_lambda_body (parser, lambda_expr);
else if (cp_parser_require (parser, CPP_OPEN_BRACE, RT_OPEN_BRACE))
- cp_parser_skip_to_end_of_block_or_statement (parser);
+ {
+ if (cp_parser_skip_to_closing_brace (parser))
+ cp_lexer_consume_token (parser->lexer);
+ }
/* The capture list was built up in reverse order; fix that now. */
LAMBDA_EXPR_CAPTURE_LIST (lambda_expr)
@@ -8955,10 +8961,10 @@ cp_parser_lambda_introducer (cp_parser* parser, tree lambda_expr)
if (VAR_P (capture_init_expr)
&& decl_storage_duration (capture_init_expr) != dk_auto)
{
- pedwarn (capture_token->location, 0, "capture of variable "
- "%qD with non-automatic storage duration",
- capture_init_expr);
- inform (0, "%q+#D declared here", capture_init_expr);
+ if (pedwarn (capture_token->location, 0, "capture of variable "
+ "%qD with non-automatic storage duration",
+ capture_init_expr))
+ inform (0, "%q+#D declared here", capture_init_expr);
continue;
}
@@ -16823,7 +16829,14 @@ cp_parser_init_declarator (cp_parser* parser,
been issued. */
if (parser->fully_implicit_function_template_p)
if (!function_declarator_p (declarator))
- finish_fully_implicit_template (parser, /*member_decl_opt=*/0);
+ {
+ if (pushed_scope)
+ {
+ pop_scope (pushed_scope);
+ pushed_scope = 0;
+ }
+ finish_fully_implicit_template (parser, /*member_decl_opt=*/0);
+ }
/* For an in-class declaration, use `grokfield' to create the
declaration. */
@@ -31993,7 +32006,7 @@ synthesize_implicit_template_parm (cp_parser *parser)
{
/* If not defining a class, then any class scope is a scope level in
an out-of-line member definition. In this case simply wind back
- beyond the first such scope to inject the template argument list.
+ beyond the first such scope to inject the template parameter list.
Otherwise wind back to the class being defined. The latter can
occur in class member friend declarations such as:
@@ -32004,12 +32017,23 @@ synthesize_implicit_template_parm (cp_parser *parser)
friend void A::foo (auto);
};
- The template argument list synthesized for the friend declaration
- must be injected in the scope of 'B', just beyond the scope of 'A'
- introduced by 'A::'. */
+ The template parameter list synthesized for the friend declaration
+ must be injected in the scope of 'B'. This can also occur in
+ erroneous cases such as:
+
+ struct A {
+ struct B {
+ void foo (auto);
+ };
+ void B::foo (auto) {}
+ };
+
+ Here the attempted definition of 'B::foo' within 'A' is ill-formed
+ but, nevertheless, the template parameter list synthesized for the
+ declarator should be injected into the scope of 'A' as if the
+ ill-formed template was specified explicitly. */
- while (scope->kind == sk_class
- && !TYPE_BEING_DEFINED (scope->this_entity))
+ while (scope->kind == sk_class && !scope->defining_class_p)
{
parent_scope = scope;
scope = scope->level_chain;
diff --git a/gcc-4.9/gcc/cp/pt.c b/gcc-4.9/gcc/cp/pt.c
index c791d031a..318c32507 100644
--- a/gcc-4.9/gcc/cp/pt.c
+++ b/gcc-4.9/gcc/cp/pt.c
@@ -320,6 +320,9 @@ get_template_info (const_tree t)
if (!t || t == error_mark_node)
return NULL;
+ if (TREE_CODE (t) == NAMESPACE_DECL)
+ return NULL;
+
if (DECL_P (t) && DECL_LANG_SPECIFIC (t))
tinfo = DECL_TEMPLATE_INFO (t);
@@ -411,7 +414,7 @@ push_inline_template_parms_recursive (tree parmlist, int levels)
{
tree parm = TREE_VALUE (TREE_VEC_ELT (parms, i));
- if (parm == error_mark_node)
+ if (error_operand_p (parm))
continue;
gcc_assert (DECL_P (parm));
@@ -2301,10 +2304,10 @@ check_template_variable (tree decl)
"%qD is not a static data member of a class template", decl);
else if (template_header_count > wanted)
{
- pedwarn (DECL_SOURCE_LOCATION (decl), 0,
- "too many template headers for %D (should be %d)",
- decl, wanted);
- if (CLASSTYPE_TEMPLATE_SPECIALIZATION (ctx))
+ bool warned = pedwarn (DECL_SOURCE_LOCATION (decl), 0,
+ "too many template headers for %D (should be %d)",
+ decl, wanted);
+ if (warned && CLASSTYPE_TEMPLATE_SPECIALIZATION (ctx))
inform (DECL_SOURCE_LOCATION (decl),
"members of an explicitly specialized class are defined "
"without a template header");
@@ -2826,7 +2829,7 @@ comp_template_parms (const_tree parms1, const_tree parms2)
/* If either of the template parameters are invalid, assume
they match for the sake of error recovery. */
- if (parm1 == error_mark_node || parm2 == error_mark_node)
+ if (error_operand_p (parm1) || error_operand_p (parm2))
return 1;
if (TREE_CODE (parm1) != TREE_CODE (parm2))
@@ -3637,11 +3640,7 @@ reduce_template_parm_level (tree index, tree type, int levels, tree args,
to the LIST being built. This new parameter is a non-type
parameter iff IS_NON_TYPE is true. This new parameter is a
parameter pack iff IS_PARAMETER_PACK is true. The location of PARM
- is in PARM_LOC. NUM_TEMPLATE_PARMS is the size of the template
- parameter list PARM belongs to. This is used used to create a
- proper canonical type for the type of PARM that is to be created,
- iff PARM is a type. If the size is not known, this parameter shall
- be set to 0. */
+ is in PARM_LOC. */
tree
process_template_parm (tree list, location_t parm_loc, tree parm,
@@ -3649,7 +3648,6 @@ process_template_parm (tree list, location_t parm_loc, tree parm,
{
tree decl = 0;
tree defval;
- tree err_parm_list;
int idx = 0;
gcc_assert (TREE_CODE (parm) == TREE_LIST);
@@ -3670,8 +3668,6 @@ process_template_parm (tree list, location_t parm_loc, tree parm,
++idx;
}
- else
- idx = 0;
if (is_non_type)
{
@@ -3679,39 +3675,29 @@ process_template_parm (tree list, location_t parm_loc, tree parm,
SET_DECL_TEMPLATE_PARM_P (parm);
- if (TREE_TYPE (parm) == error_mark_node)
- {
- err_parm_list = build_tree_list (defval, parm);
- TREE_VALUE (err_parm_list) = error_mark_node;
- return chainon (list, err_parm_list);
- }
- else
- {
- /* [temp.param]
-
- The top-level cv-qualifiers on the template-parameter are
- ignored when determining its type. */
- TREE_TYPE (parm) = TYPE_MAIN_VARIANT (TREE_TYPE (parm));
- if (invalid_nontype_parm_type_p (TREE_TYPE (parm), 1))
- {
- err_parm_list = build_tree_list (defval, parm);
- TREE_VALUE (err_parm_list) = error_mark_node;
- return chainon (list, err_parm_list);
- }
+ if (TREE_TYPE (parm) != error_mark_node)
+ {
+ /* [temp.param]
+
+ The top-level cv-qualifiers on the template-parameter are
+ ignored when determining its type. */
+ TREE_TYPE (parm) = TYPE_MAIN_VARIANT (TREE_TYPE (parm));
+ if (invalid_nontype_parm_type_p (TREE_TYPE (parm), 1))
+ TREE_TYPE (parm) = error_mark_node;
+ else if (uses_parameter_packs (TREE_TYPE (parm))
+ && !is_parameter_pack
+ /* If we're in a nested template parameter list, the template
+ template parameter could be a parameter pack. */
+ && processing_template_parmlist == 1)
+ {
+ /* This template parameter is not a parameter pack, but it
+ should be. Complain about "bare" parameter packs. */
+ check_for_bare_parameter_packs (TREE_TYPE (parm));
- if (uses_parameter_packs (TREE_TYPE (parm)) && !is_parameter_pack
- /* If we're in a nested template parameter list, the template
- template parameter could be a parameter pack. */
- && processing_template_parmlist == 1)
- {
- /* This template parameter is not a parameter pack, but it
- should be. Complain about "bare" parameter packs. */
- check_for_bare_parameter_packs (TREE_TYPE (parm));
-
- /* Recover by calling this a parameter pack. */
- is_parameter_pack = true;
- }
- }
+ /* Recover by calling this a parameter pack. */
+ is_parameter_pack = true;
+ }
+ }
/* A template parameter is not modifiable. */
TREE_CONSTANT (parm) = 1;
@@ -4136,15 +4122,17 @@ process_partial_specialization (tree decl)
for (i = 0; i < ntparms; ++i)
if (tpd.parms[i] == 0)
{
- /* One of the template parms was not used in the
+ /* One of the template parms was not used in a deduced context in the
specialization. */
if (!did_error_intro)
{
- error ("template parameters not used in partial specialization:");
+ error ("template parameters not deducible in "
+ "partial specialization:");
did_error_intro = true;
}
- error (" %qD", TREE_VALUE (TREE_VEC_ELT (inner_parms, i)));
+ inform (input_location, " %qD",
+ TREE_VALUE (TREE_VEC_ELT (inner_parms, i)));
}
if (did_error_intro)
@@ -5122,7 +5110,7 @@ redeclare_class_template (tree type, tree parms)
continue;
tmpl_parm = TREE_VALUE (TREE_VEC_ELT (tmpl_parms, i));
- if (tmpl_parm == error_mark_node)
+ if (error_operand_p (tmpl_parm))
return false;
parm = TREE_VALUE (TREE_VEC_ELT (parms, i));
@@ -6082,8 +6070,8 @@ coerce_template_template_parm (tree parm,
tree in_decl,
tree outer_args)
{
- if (arg == NULL_TREE || arg == error_mark_node
- || parm == NULL_TREE || parm == error_mark_node)
+ if (arg == NULL_TREE || error_operand_p (arg)
+ || parm == NULL_TREE || error_operand_p (parm))
return 0;
if (TREE_CODE (arg) != TREE_CODE (parm))
@@ -6176,7 +6164,7 @@ coerce_template_template_parms (tree parm_parms,
{
parm = TREE_VALUE (TREE_VEC_ELT (parm_parms, nparms - 1));
- if (parm == error_mark_node)
+ if (error_operand_p (parm))
return 0;
switch (TREE_CODE (parm))
@@ -6930,6 +6918,26 @@ coerce_template_parms (tree parms,
{
if (PACK_EXPANSION_P (arg))
{
+ /* "If every valid specialization of a variadic template
+ requires an empty template parameter pack, the template is
+ ill-formed, no diagnostic required." So check that the
+ pattern works with this parameter. */
+ tree pattern = PACK_EXPANSION_PATTERN (arg);
+ tree conv = convert_template_argument (TREE_VALUE (parm),
+ pattern, new_args,
+ complain, parm_idx,
+ in_decl);
+ if (conv == error_mark_node)
+ {
+ inform (input_location, "so any instantiation with a "
+ "non-empty parameter pack would be ill-formed");
+ ++lost;
+ }
+ else if (TYPE_P (conv) && !TYPE_P (pattern))
+ /* Recover from missing typename. */
+ TREE_VEC_ELT (inner_args, arg_idx)
+ = make_pack_expansion (conv);
+
/* We don't know how many args we have yet, just
use the unconverted ones for now. */
new_inner_args = inner_args;
@@ -17492,7 +17500,7 @@ unify (tree tparms, tree targs, tree parm, tree arg, int strict,
case TEMPLATE_TEMPLATE_PARM:
case BOUND_TEMPLATE_TEMPLATE_PARM:
tparm = TREE_VALUE (TREE_VEC_ELT (tparms, 0));
- if (tparm == error_mark_node)
+ if (error_operand_p (tparm))
return unify_invalid (explain_p);
if (TEMPLATE_TYPE_LEVEL (parm)
@@ -17510,7 +17518,7 @@ unify (tree tparms, tree targs, tree parm, tree arg, int strict,
idx = TEMPLATE_TYPE_IDX (parm);
targ = TREE_VEC_ELT (INNERMOST_TEMPLATE_ARGS (targs), idx);
tparm = TREE_VALUE (TREE_VEC_ELT (tparms, idx));
- if (tparm == error_mark_node)
+ if (error_operand_p (tparm))
return unify_invalid (explain_p);
/* Check for mixed types and values. */
@@ -17693,7 +17701,7 @@ unify (tree tparms, tree targs, tree parm, tree arg, int strict,
case TEMPLATE_PARM_INDEX:
tparm = TREE_VALUE (TREE_VEC_ELT (tparms, 0));
- if (tparm == error_mark_node)
+ if (error_operand_p (tparm))
return unify_invalid (explain_p);
if (TEMPLATE_PARM_LEVEL (parm)
@@ -18758,23 +18766,18 @@ most_specialized_instantiation (tree templates)
tree
most_general_template (tree decl)
{
- /* If DECL is a FUNCTION_DECL, find the TEMPLATE_DECL of which it is
- an immediate specialization. */
- if (TREE_CODE (decl) == FUNCTION_DECL)
+ if (TREE_CODE (decl) != TEMPLATE_DECL)
{
- if (DECL_TEMPLATE_INFO (decl)) {
- decl = DECL_TI_TEMPLATE (decl);
-
- /* The DECL_TI_TEMPLATE can be an IDENTIFIER_NODE for a
- template friend. */
- if (TREE_CODE (decl) != TEMPLATE_DECL)
- return NULL_TREE;
- } else
+ if (tree tinfo = get_template_info (decl))
+ decl = TI_TEMPLATE (tinfo);
+ /* The TI_TEMPLATE can be an IDENTIFIER_NODE for a
+ template friend, or a FIELD_DECL for a capture pack. */
+ if (TREE_CODE (decl) != TEMPLATE_DECL)
return NULL_TREE;
}
/* Look for more and more general templates. */
- while (DECL_TEMPLATE_INFO (decl))
+ while (DECL_LANG_SPECIFIC (decl) && DECL_TEMPLATE_INFO (decl))
{
/* The DECL_TI_TEMPLATE can be an IDENTIFIER_NODE in some cases.
(See cp-tree.h for details.) */
diff --git a/gcc-4.9/gcc/cp/search.c b/gcc-4.9/gcc/cp/search.c
index d99e18215..c3eed90f6 100644
--- a/gcc-4.9/gcc/cp/search.c
+++ b/gcc-4.9/gcc/cp/search.c
@@ -2115,22 +2115,6 @@ get_pure_virtuals (tree type)
which it is a primary base will contain vtable entries for the
pure virtuals in the base class. */
dfs_walk_once (TYPE_BINFO (type), NULL, dfs_get_pure_virtuals, type);
-
- /* Treat a virtual destructor in an abstract class as pure even if it
- isn't declared as pure; there is no way it would be called through the
- vtable except during construction, which causes undefined behavior. */
- if (CLASSTYPE_PURE_VIRTUALS (type)
- && TYPE_HAS_NONTRIVIAL_DESTRUCTOR (type))
- {
- tree dtor = CLASSTYPE_DESTRUCTORS (type);
- if (dtor && DECL_VIRTUAL_P (dtor) && !DECL_PURE_VIRTUAL_P (dtor))
- {
- tree clone;
- DECL_PURE_VIRTUAL_P (dtor) = true;
- FOR_EACH_CLONE (clone, dtor)
- DECL_PURE_VIRTUAL_P (clone) = true;
- }
- }
}
/* Debug info for C++ classes can get very large; try to avoid
diff --git a/gcc-4.9/gcc/cp/semantics.c b/gcc-4.9/gcc/cp/semantics.c
index 886fbb88b..3619e271d 100644
--- a/gcc-4.9/gcc/cp/semantics.c
+++ b/gcc-4.9/gcc/cp/semantics.c
@@ -386,6 +386,9 @@ add_stmt (tree t)
STMT_IS_FULL_EXPR_P (t) = stmts_are_full_exprs_p ();
}
+ if (code == LABEL_EXPR || code == CASE_LABEL_EXPR)
+ STATEMENT_LIST_HAS_LABEL (cur_stmt_list) = 1;
+
/* Add T to the statement-tree. Non-side-effect statements need to be
recorded during statement expressions. */
gcc_checking_assert (!stmt_list_stack->is_empty ());
@@ -2777,6 +2780,7 @@ begin_class_definition (tree t)
maybe_process_partial_specialization (t);
pushclass (t);
TYPE_BEING_DEFINED (t) = 1;
+ class_binding_level->defining_class_p = 1;
if (flag_pack_struct)
{
@@ -7716,8 +7720,8 @@ sort_constexpr_mem_initializers (tree type, vec<constructor_elt, va_gc> *v)
{
tree pri = CLASSTYPE_PRIMARY_BINFO (type);
tree field_type;
- constructor_elt elt;
- int i;
+ unsigned i;
+ constructor_elt *ce;
if (pri)
field_type = BINFO_TYPE (pri);
@@ -7728,14 +7732,14 @@ sort_constexpr_mem_initializers (tree type, vec<constructor_elt, va_gc> *v)
/* Find the element for the primary base or vptr and move it to the
beginning of the vec. */
- vec<constructor_elt, va_gc> &vref = *v;
- for (i = 0; ; ++i)
- if (TREE_TYPE (vref[i].index) == field_type)
+ for (i = 0; vec_safe_iterate (v, i, &ce); ++i)
+ if (TREE_TYPE (ce->index) == field_type)
break;
- if (i > 0)
+ if (i > 0 && i < vec_safe_length (v))
{
- elt = vref[i];
+ vec<constructor_elt, va_gc> &vref = *v;
+ constructor_elt elt = vref[i];
for (; i > 0; --i)
vref[i] = vref[i-1];
vref[0] = elt;
@@ -10253,6 +10257,7 @@ potential_constant_expression_1 (tree t, bool want_rval, tsubst_flags_t flags)
case DO_STMT:
case FOR_STMT:
case WHILE_STMT:
+ case DECL_EXPR:
if (flags & tf_error)
error ("expression %qE is not a constant-expression", t);
return false;
diff --git a/gcc-4.9/gcc/cp/tree.c b/gcc-4.9/gcc/cp/tree.c
index 5567253a6..3429d2396 100644
--- a/gcc-4.9/gcc/cp/tree.c
+++ b/gcc-4.9/gcc/cp/tree.c
@@ -3364,6 +3364,18 @@ handle_abi_tag_attribute (tree* node, tree name, tree args,
name, *node);
goto fail;
}
+ else if (CLASSTYPE_TEMPLATE_INSTANTIATION (*node))
+ {
+ warning (OPT_Wattributes, "ignoring %qE attribute applied to "
+ "template instantiation %qT", name, *node);
+ goto fail;
+ }
+ else if (CLASSTYPE_TEMPLATE_SPECIALIZATION (*node))
+ {
+ warning (OPT_Wattributes, "ignoring %qE attribute applied to "
+ "template specialization %qT", name, *node);
+ goto fail;
+ }
tree attributes = TYPE_ATTRIBUTES (*node);
tree decl = TYPE_NAME (*node);
diff --git a/gcc-4.9/gcc/cp/typeck.c b/gcc-4.9/gcc/cp/typeck.c
index 559f19b55..9a80727dd 100644
--- a/gcc-4.9/gcc/cp/typeck.c
+++ b/gcc-4.9/gcc/cp/typeck.c
@@ -8283,6 +8283,10 @@ maybe_warn_about_returning_address_of_local (tree retval)
return;
whats_returned = TREE_OPERAND (whats_returned, 0);
+ while (TREE_CODE (whats_returned) == COMPONENT_REF
+ || TREE_CODE (whats_returned) == ARRAY_REF)
+ whats_returned = TREE_OPERAND (whats_returned, 0);
+
if (TREE_CODE (valtype) == REFERENCE_TYPE)
{
if (TREE_CODE (whats_returned) == AGGR_INIT_EXPR
@@ -8300,10 +8304,6 @@ maybe_warn_about_returning_address_of_local (tree retval)
}
}
- while (TREE_CODE (whats_returned) == COMPONENT_REF
- || TREE_CODE (whats_returned) == ARRAY_REF)
- whats_returned = TREE_OPERAND (whats_returned, 0);
-
if (DECL_P (whats_returned)
&& DECL_NAME (whats_returned)
&& DECL_FUNCTION_SCOPE_P (whats_returned)
diff --git a/gcc-4.9/gcc/cp/typeck2.c b/gcc-4.9/gcc/cp/typeck2.c
index bd21ad8c3..68e518a5c 100644
--- a/gcc-4.9/gcc/cp/typeck2.c
+++ b/gcc-4.9/gcc/cp/typeck2.c
@@ -1103,6 +1103,7 @@ digest_init_flags (tree type, tree init, int flags)
#define PICFLAG_ERRONEOUS 1
#define PICFLAG_NOT_ALL_CONSTANT 2
#define PICFLAG_NOT_ALL_SIMPLE 4
+#define PICFLAG_SIDE_EFFECTS 8
/* Given an initializer INIT, return the flag (PICFLAG_*) which better
describe it. */
@@ -1113,7 +1114,12 @@ picflag_from_initializer (tree init)
if (init == error_mark_node)
return PICFLAG_ERRONEOUS;
else if (!TREE_CONSTANT (init))
- return PICFLAG_NOT_ALL_CONSTANT;
+ {
+ if (TREE_SIDE_EFFECTS (init))
+ return PICFLAG_SIDE_EFFECTS;
+ else
+ return PICFLAG_NOT_ALL_CONSTANT;
+ }
else if (!initializer_constant_valid_p (init, TREE_TYPE (init)))
return PICFLAG_NOT_ALL_SIMPLE;
return 0;
@@ -1493,7 +1499,12 @@ process_init_constructor (tree type, tree init, tsubst_flags_t complain)
TREE_TYPE (init) = type;
if (TREE_CODE (type) == ARRAY_TYPE && TYPE_DOMAIN (type) == NULL_TREE)
cp_complete_array_type (&TREE_TYPE (init), init, /*do_default=*/0);
- if (flags & PICFLAG_NOT_ALL_CONSTANT)
+ if (flags & PICFLAG_SIDE_EFFECTS)
+ {
+ TREE_CONSTANT (init) = false;
+ TREE_SIDE_EFFECTS (init) = true;
+ }
+ else if (flags & PICFLAG_NOT_ALL_CONSTANT)
/* Make sure TREE_CONSTANT isn't set from build_constructor. */
TREE_CONSTANT (init) = false;
else
diff --git a/gcc-4.9/gcc/cse.c b/gcc-4.9/gcc/cse.c
index 852d13ebf..b8223f7a3 100644
--- a/gcc-4.9/gcc/cse.c
+++ b/gcc-4.9/gcc/cse.c
@@ -4642,6 +4642,13 @@ cse_insn (rtx insn)
&& REGNO (dest) >= FIRST_PSEUDO_REGISTER)
sets[i].src_volatile = 1;
+ /* Also do not record result of a non-volatile inline asm with
+ more than one result or with clobbers, we do not want CSE to
+ break the inline asm apart. */
+ else if (GET_CODE (src) == ASM_OPERANDS
+ && GET_CODE (x) == PARALLEL)
+ sets[i].src_volatile = 1;
+
#if 0
/* It is no longer clear why we used to do this, but it doesn't
appear to still be needed. So let's try without it since this
diff --git a/gcc-4.9/gcc/cselib.c b/gcc-4.9/gcc/cselib.c
index 26bcbe077..7918b2be8 100644
--- a/gcc-4.9/gcc/cselib.c
+++ b/gcc-4.9/gcc/cselib.c
@@ -1137,7 +1137,7 @@ cselib_hash_rtx (rtx x, int create, enum machine_mode memmode)
return hash ? hash : (unsigned int) ENTRY_VALUE;
case CONST_INT:
- hash += ((unsigned) CONST_INT << 7) + INTVAL (x);
+ hash += ((unsigned) CONST_INT << 7) + UINTVAL (x);
return hash ? hash : (unsigned int) CONST_INT;
case CONST_DOUBLE:
diff --git a/gcc-4.9/gcc/doc/aot-compile.1 b/gcc-4.9/gcc/doc/aot-compile.1
new file mode 100644
index 000000000..1afeb5837
--- /dev/null
+++ b/gcc-4.9/gcc/doc/aot-compile.1
@@ -0,0 +1,209 @@
+.\" Automatically generated by Pod::Man 2.27 (Pod::Simple 3.28)
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Vb \" Begin verbatim text
+.ft CW
+.nf
+.ne \\$1
+..
+.de Ve \" End verbatim text
+.ft R
+.fi
+..
+.\" Set up some character translations and predefined strings. \*(-- will
+.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
+.\" double quote, and \*(R" will give a right double quote. \*(C+ will
+.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
+.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
+.\" nothing in troff, for use with C<>.
+.tr \(*W-
+.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
+.ie n \{\
+. ds -- \(*W-
+. ds PI pi
+. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
+. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
+. ds L" ""
+. ds R" ""
+. ds C` ""
+. ds C' ""
+'br\}
+.el\{\
+. ds -- \|\(em\|
+. ds PI \(*p
+. ds L" ``
+. ds R" ''
+. ds C`
+. ds C'
+'br\}
+.\"
+.\" Escape single quotes in literal strings from groff's Unicode transform.
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
+.\" entries marked with X<> in POD. Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.\"
+.\" Avoid warning from groff about undefined register 'F'.
+.de IX
+..
+.nr rF 0
+.if \n(.g .if rF .nr rF 1
+.if (\n(rF:(\n(.g==0)) \{
+. if \nF \{
+. de IX
+. tm Index:\\$1\t\\n%\t"\\$2"
+..
+. if !\nF==2 \{
+. nr % 0
+. nr F 2
+. \}
+. \}
+.\}
+.rr rF
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear. Run. Save yourself. No user-serviceable parts.
+. \" fudge factors for nroff and troff
+.if n \{\
+. ds #H 0
+. ds #V .8m
+. ds #F .3m
+. ds #[ \f1
+. ds #] \fP
+.\}
+.if t \{\
+. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+. ds #V .6m
+. ds #F 0
+. ds #[ \&
+. ds #] \&
+.\}
+. \" simple accents for nroff and troff
+.if n \{\
+. ds ' \&
+. ds ` \&
+. ds ^ \&
+. ds , \&
+. ds ~ ~
+. ds /
+.\}
+.if t \{\
+. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+. \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+. \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+. \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+. ds : e
+. ds 8 ss
+. ds o a
+. ds d- d\h'-1'\(ga
+. ds D- D\h'-1'\(hy
+. ds th \o'bp'
+. ds Th \o'LP'
+. ds ae ae
+. ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "AOT-COMPILE 1"
+.TH AOT-COMPILE 1 "2014-04-22" "gcc-4.9.0" "GNU"
+.\" For nroff, turn off justification. Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.if n .ad l
+.nh
+.SH "NAME"
+aot\-compile \- Compile bytecode to native and generate databases
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+aot-compile [\fB\s-1OPTION\s0\fR] ... \fI\s-1SRCDIR\s0\fR \fI\s-1DSTDIR\s0\fR
+.PP
+aot-compile [\fB\-M, \-\-make\fR=\fI\s-1PATH\s0\fR] [\fB\-C, \-\-gcj\fR=\fI\s-1PATH\s0\fR]
+ [\fB\-D, \-\-dbtool\fR=\fI\s-1PATH\s0\fR] [\fB\-m, \-\-makeflags\fR=\fI\s-1FLAGS\s0\fR]
+ [\fB\-c, \-\-gcjflags\fR=\fI\s-1FLAGS\s0\fR] [\fB\-l, \-\-ldflags\fR=\fI\s-1FLAGS\s0\fR]
+ [\fB\-e, \-\-exclude\fR=\fI\s-1PATH\s0\fR]
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+\&\f(CW\*(C`aot\-compile\*(C'\fR is a script that searches a directory for Java bytecode
+(as class files, or in jars) and uses \f(CW\*(C`gcj\*(C'\fR to compile it to native
+code and generate the databases from it.
+.SH "OPTIONS"
+.IX Header "OPTIONS"
+.IP "\fB\-M, \-\-make=\fR\fI\s-1PATH\s0\fR" 4
+.IX Item "-M, --make=PATH"
+Specify the path to the \f(CW\*(C`make\*(C'\fR executable to use.
+.IP "\fB\-C, \-\-gcj=\fR\fI\s-1PATH\s0\fR" 4
+.IX Item "-C, --gcj=PATH"
+Specify the path to the \f(CW\*(C`gcj\*(C'\fR executable to use.
+.IP "\fB\-D, \-\-dbtool=\fR\fI\s-1PATH\s0\fR" 4
+.IX Item "-D, --dbtool=PATH"
+Specify the path to the \f(CW\*(C`gcj\-dbtool\*(C'\fR executable to use.
+.IP "\fB\-m, \-\-makeflags=\fR\fI\s-1FLAGS\s0\fR" 4
+.IX Item "-m, --makeflags=FLAGS"
+Specify flags to pass to \f(CW\*(C`make\*(C'\fR during the build.
+.IP "\fB\-c, \-\-gcjflags=\fR\fI\s-1FLAGS\s0\fR" 4
+.IX Item "-c, --gcjflags=FLAGS"
+Specify flags to pass to \f(CW\*(C`gcj\*(C'\fR during compilation, in addition to
+\&'\-fPIC \-findirect\-dispatch \-fjni'.
+.IP "\fB\-l, \-\-ldflags=\fR\fI\s-1FLAGS\s0\fR" 4
+.IX Item "-l, --ldflags=FLAGS"
+Specify flags to pass to \f(CW\*(C`gcj\*(C'\fR during linking, in addition to
+\&'\-Wl,\-Bsymbolic'.
+.IP "\fB\-e, \-\-exclude=\fR\fI\s-1PATH\s0\fR" 4
+.IX Item "-e, --exclude=PATH"
+Do not compile \fI\s-1PATH\s0\fR.
+.SH "SEE ALSO"
+.IX Header "SEE ALSO"
+\&\fIgcc\fR\|(1), \fIgcj\fR\|(1), \fIgcjh\fR\|(1), \fIjcf\-dump\fR\|(1), \fIgfdl\fR\|(7),
+and the Info entries for \fIgcj\fR and \fIgcc\fR.
+.SH "COPYRIGHT"
+.IX Header "COPYRIGHT"
+Copyright (c) 2001\-2014 Free Software Foundation, Inc.
+.PP
+Permission is granted to copy, distribute and/or modify this document
+under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.3 or
+any later version published by the Free Software Foundation; with no
+Invariant Sections, the Front-Cover Texts being (a) (see below), and
+with the Back-Cover Texts being (b) (see below).
+A copy of the license is included in the
+man page \fIgfdl\fR\|(7).
+.PP
+(a) The \s-1FSF\s0's Front-Cover Text is:
+.PP
+.Vb 1
+\& A GNU Manual
+.Ve
+.PP
+(b) The \s-1FSF\s0's Back-Cover Text is:
+.PP
+.Vb 3
+\& You have freedom to copy and modify this GNU Manual, like GNU
+\& software. Copies published by the Free Software Foundation raise
+\& funds for GNU development.
+.Ve
diff --git a/gcc-4.9/gcc/doc/bugreport.texi b/gcc-4.9/gcc/doc/bugreport.texi
index be0352225..e465c24b0 100644
--- a/gcc-4.9/gcc/doc/bugreport.texi
+++ b/gcc-4.9/gcc/doc/bugreport.texi
@@ -16,11 +16,9 @@ report the problem.
@menu
* Criteria: Bug Criteria. Have you really found a bug?
* Reporting: Bug Reporting. How to report a bug effectively.
-* Known: Trouble. Known problems.
-* Help: Service. Where to ask for help.
@end menu
-@node Bug Criteria,Bug Reporting,,Bugs
+@node Bug Criteria
@section Have You Found a Bug?
@cindex bug criteria
@@ -83,7 +81,7 @@ If you are an experienced user of one of the languages GCC supports, your
suggestions for improvement of GCC are welcome in any case.
@end itemize
-@node Bug Reporting,,Bug Criteria,Bugs
+@node Bug Reporting
@section How and where to Report Bugs
@cindex compiler bugs, reporting
diff --git a/gcc-4.9/gcc/doc/contrib.texi b/gcc-4.9/gcc/doc/contrib.texi
index b16fc1ffd..9117f8e29 100644
--- a/gcc-4.9/gcc/doc/contrib.texi
+++ b/gcc-4.9/gcc/doc/contrib.texi
@@ -1050,6 +1050,9 @@ Carlo Wood for various fixes.
Tom Wood for work on the m88k port.
@item
+Chung-Ju Wu for his work on the Andes NDS32 port.
+
+@item
Canqun Yang for work on GNU Fortran.
@item
diff --git a/gcc-4.9/gcc/doc/cpp.1 b/gcc-4.9/gcc/doc/cpp.1
new file mode 100644
index 000000000..0c34e8453
--- /dev/null
+++ b/gcc-4.9/gcc/doc/cpp.1
@@ -0,0 +1,1046 @@
+.\" Automatically generated by Pod::Man 2.27 (Pod::Simple 3.28)
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Vb \" Begin verbatim text
+.ft CW
+.nf
+.ne \\$1
+..
+.de Ve \" End verbatim text
+.ft R
+.fi
+..
+.\" Set up some character translations and predefined strings. \*(-- will
+.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
+.\" double quote, and \*(R" will give a right double quote. \*(C+ will
+.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
+.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
+.\" nothing in troff, for use with C<>.
+.tr \(*W-
+.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
+.ie n \{\
+. ds -- \(*W-
+. ds PI pi
+. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
+. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
+. ds L" ""
+. ds R" ""
+. ds C` ""
+. ds C' ""
+'br\}
+.el\{\
+. ds -- \|\(em\|
+. ds PI \(*p
+. ds L" ``
+. ds R" ''
+. ds C`
+. ds C'
+'br\}
+.\"
+.\" Escape single quotes in literal strings from groff's Unicode transform.
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
+.\" entries marked with X<> in POD. Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.\"
+.\" Avoid warning from groff about undefined register 'F'.
+.de IX
+..
+.nr rF 0
+.if \n(.g .if rF .nr rF 1
+.if (\n(rF:(\n(.g==0)) \{
+. if \nF \{
+. de IX
+. tm Index:\\$1\t\\n%\t"\\$2"
+..
+. if !\nF==2 \{
+. nr % 0
+. nr F 2
+. \}
+. \}
+.\}
+.rr rF
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear. Run. Save yourself. No user-serviceable parts.
+. \" fudge factors for nroff and troff
+.if n \{\
+. ds #H 0
+. ds #V .8m
+. ds #F .3m
+. ds #[ \f1
+. ds #] \fP
+.\}
+.if t \{\
+. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+. ds #V .6m
+. ds #F 0
+. ds #[ \&
+. ds #] \&
+.\}
+. \" simple accents for nroff and troff
+.if n \{\
+. ds ' \&
+. ds ` \&
+. ds ^ \&
+. ds , \&
+. ds ~ ~
+. ds /
+.\}
+.if t \{\
+. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+. \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+. \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+. \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+. ds : e
+. ds 8 ss
+. ds o a
+. ds d- d\h'-1'\(ga
+. ds D- D\h'-1'\(hy
+. ds th \o'bp'
+. ds Th \o'LP'
+. ds ae ae
+. ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "CPP 1"
+.TH CPP 1 "2014-04-22" "gcc-4.9.0" "GNU"
+.\" For nroff, turn off justification. Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.if n .ad l
+.nh
+.SH "NAME"
+cpp \- The C Preprocessor
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+cpp [\fB\-D\fR\fImacro\fR[=\fIdefn\fR]...] [\fB\-U\fR\fImacro\fR]
+ [\fB\-I\fR\fIdir\fR...] [\fB\-iquote\fR\fIdir\fR...]
+ [\fB\-W\fR\fIwarn\fR...]
+ [\fB\-M\fR|\fB\-MM\fR] [\fB\-MG\fR] [\fB\-MF\fR \fIfilename\fR]
+ [\fB\-MP\fR] [\fB\-MQ\fR \fItarget\fR...]
+ [\fB\-MT\fR \fItarget\fR...]
+ [\fB\-P\fR] [\fB\-fno\-working\-directory\fR]
+ [\fB\-x\fR \fIlanguage\fR] [\fB\-std=\fR\fIstandard\fR]
+ \fIinfile\fR \fIoutfile\fR
+.PP
+Only the most useful options are listed here; see below for the remainder.
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+The C preprocessor, often known as \fIcpp\fR, is a \fImacro processor\fR
+that is used automatically by the C compiler to transform your program
+before compilation. It is called a macro processor because it allows
+you to define \fImacros\fR, which are brief abbreviations for longer
+constructs.
+.PP
+The C preprocessor is intended to be used only with C, \*(C+, and
+Objective-C source code. In the past, it has been abused as a general
+text processor. It will choke on input which does not obey C's lexical
+rules. For example, apostrophes will be interpreted as the beginning of
+character constants, and cause errors. Also, you cannot rely on it
+preserving characteristics of the input which are not significant to
+C\-family languages. If a Makefile is preprocessed, all the hard tabs
+will be removed, and the Makefile will not work.
+.PP
+Having said that, you can often get away with using cpp on things which
+are not C. Other Algol-ish programming languages are often safe
+(Pascal, Ada, etc.) So is assembly, with caution. \fB\-traditional\-cpp\fR
+mode preserves more white space, and is otherwise more permissive. Many
+of the problems can be avoided by writing C or \*(C+ style comments
+instead of native language comments, and keeping macros simple.
+.PP
+Wherever possible, you should use a preprocessor geared to the language
+you are writing in. Modern versions of the \s-1GNU\s0 assembler have macro
+facilities. Most high level programming languages have their own
+conditional compilation and inclusion mechanism. If all else fails,
+try a true general text processor, such as \s-1GNU M4.\s0
+.PP
+C preprocessors vary in some details. This manual discusses the \s-1GNU C\s0
+preprocessor, which provides a small superset of the features of \s-1ISO\s0
+Standard C. In its default mode, the \s-1GNU C\s0 preprocessor does not do a
+few things required by the standard. These are features which are
+rarely, if ever, used, and may cause surprising changes to the meaning
+of a program which does not expect them. To get strict \s-1ISO\s0 Standard C,
+you should use the \fB\-std=c90\fR, \fB\-std=c99\fR or
+\&\fB\-std=c11\fR options, depending
+on which version of the standard you want. To get all the mandatory
+diagnostics, you must also use \fB\-pedantic\fR.
+.PP
+This manual describes the behavior of the \s-1ISO\s0 preprocessor. To
+minimize gratuitous differences, where the \s-1ISO\s0 preprocessor's
+behavior does not conflict with traditional semantics, the
+traditional preprocessor should behave the same way. The various
+differences that do exist are detailed in the section \fBTraditional
+Mode\fR.
+.PP
+For clarity, unless noted otherwise, references to \fB\s-1CPP\s0\fR in this
+manual refer to \s-1GNU CPP.\s0
+.SH "OPTIONS"
+.IX Header "OPTIONS"
+The C preprocessor expects two file names as arguments, \fIinfile\fR and
+\&\fIoutfile\fR. The preprocessor reads \fIinfile\fR together with any
+other files it specifies with \fB#include\fR. All the output generated
+by the combined input files is written in \fIoutfile\fR.
+.PP
+Either \fIinfile\fR or \fIoutfile\fR may be \fB\-\fR, which as
+\&\fIinfile\fR means to read from standard input and as \fIoutfile\fR
+means to write to standard output. Also, if either file is omitted, it
+means the same as if \fB\-\fR had been specified for that file.
+.PP
+Unless otherwise noted, or the option ends in \fB=\fR, all options
+which take an argument may have that argument appear either immediately
+after the option, or with a space between option and argument:
+\&\fB\-Ifoo\fR and \fB\-I foo\fR have the same effect.
+.PP
+Many options have multi-letter names; therefore multiple single-letter
+options may \fInot\fR be grouped: \fB\-dM\fR is very different from
+\&\fB\-d\ \-M\fR.
+.IP "\fB\-D\fR \fIname\fR" 4
+.IX Item "-D name"
+Predefine \fIname\fR as a macro, with definition \f(CW1\fR.
+.IP "\fB\-D\fR \fIname\fR\fB=\fR\fIdefinition\fR" 4
+.IX Item "-D name=definition"
+The contents of \fIdefinition\fR are tokenized and processed as if
+they appeared during translation phase three in a \fB#define\fR
+directive. In particular, the definition will be truncated by
+embedded newline characters.
+.Sp
+If you are invoking the preprocessor from a shell or shell-like
+program you may need to use the shell's quoting syntax to protect
+characters such as spaces that have a meaning in the shell syntax.
+.Sp
+If you wish to define a function-like macro on the command line, write
+its argument list with surrounding parentheses before the equals sign
+(if any). Parentheses are meaningful to most shells, so you will need
+to quote the option. With \fBsh\fR and \fBcsh\fR,
+\&\fB\-D'\fR\fIname\fR\fB(\fR\fIargs...\fR\fB)=\fR\fIdefinition\fR\fB'\fR works.
+.Sp
+\&\fB\-D\fR and \fB\-U\fR options are processed in the order they
+are given on the command line. All \fB\-imacros\fR \fIfile\fR and
+\&\fB\-include\fR \fIfile\fR options are processed after all
+\&\fB\-D\fR and \fB\-U\fR options.
+.IP "\fB\-U\fR \fIname\fR" 4
+.IX Item "-U name"
+Cancel any previous definition of \fIname\fR, either built in or
+provided with a \fB\-D\fR option.
+.IP "\fB\-undef\fR" 4
+.IX Item "-undef"
+Do not predefine any system-specific or GCC-specific macros. The
+standard predefined macros remain defined.
+.IP "\fB\-I\fR \fIdir\fR" 4
+.IX Item "-I dir"
+Add the directory \fIdir\fR to the list of directories to be searched
+for header files.
+.Sp
+Directories named by \fB\-I\fR are searched before the standard
+system include directories. If the directory \fIdir\fR is a standard
+system include directory, the option is ignored to ensure that the
+default search order for system directories and the special treatment
+of system headers are not defeated
+\&.
+If \fIdir\fR begins with \f(CW\*(C`=\*(C'\fR, then the \f(CW\*(C`=\*(C'\fR will be replaced
+by the sysroot prefix; see \fB\-\-sysroot\fR and \fB\-isysroot\fR.
+.IP "\fB\-o\fR \fIfile\fR" 4
+.IX Item "-o file"
+Write output to \fIfile\fR. This is the same as specifying \fIfile\fR
+as the second non-option argument to \fBcpp\fR. \fBgcc\fR has a
+different interpretation of a second non-option argument, so you must
+use \fB\-o\fR to specify the output file.
+.IP "\fB\-Wall\fR" 4
+.IX Item "-Wall"
+Turns on all optional warnings which are desirable for normal code.
+At present this is \fB\-Wcomment\fR, \fB\-Wtrigraphs\fR,
+\&\fB\-Wmultichar\fR and a warning about integer promotion causing a
+change of sign in \f(CW\*(C`#if\*(C'\fR expressions. Note that many of the
+preprocessor's warnings are on by default and have no options to
+control them.
+.IP "\fB\-Wcomment\fR" 4
+.IX Item "-Wcomment"
+.PD 0
+.IP "\fB\-Wcomments\fR" 4
+.IX Item "-Wcomments"
+.PD
+Warn whenever a comment-start sequence \fB/*\fR appears in a \fB/*\fR
+comment, or whenever a backslash-newline appears in a \fB//\fR comment.
+(Both forms have the same effect.)
+.IP "\fB\-Wtrigraphs\fR" 4
+.IX Item "-Wtrigraphs"
+Most trigraphs in comments cannot affect the meaning of the program.
+However, a trigraph that would form an escaped newline (\fB??/\fR at
+the end of a line) can, by changing where the comment begins or ends.
+Therefore, only trigraphs that would form escaped newlines produce
+warnings inside a comment.
+.Sp
+This option is implied by \fB\-Wall\fR. If \fB\-Wall\fR is not
+given, this option is still enabled unless trigraphs are enabled. To
+get trigraph conversion without warnings, but get the other
+\&\fB\-Wall\fR warnings, use \fB\-trigraphs \-Wall \-Wno\-trigraphs\fR.
+.IP "\fB\-Wtraditional\fR" 4
+.IX Item "-Wtraditional"
+Warn about certain constructs that behave differently in traditional and
+\&\s-1ISO C. \s0 Also warn about \s-1ISO C\s0 constructs that have no traditional C
+equivalent, and problematic constructs which should be avoided.
+.IP "\fB\-Wundef\fR" 4
+.IX Item "-Wundef"
+Warn whenever an identifier which is not a macro is encountered in an
+\&\fB#if\fR directive, outside of \fBdefined\fR. Such identifiers are
+replaced with zero.
+.IP "\fB\-Wunused\-macros\fR" 4
+.IX Item "-Wunused-macros"
+Warn about macros defined in the main file that are unused. A macro
+is \fIused\fR if it is expanded or tested for existence at least once.
+The preprocessor will also warn if the macro has not been used at the
+time it is redefined or undefined.
+.Sp
+Built-in macros, macros defined on the command line, and macros
+defined in include files are not warned about.
+.Sp
+\&\fINote:\fR If a macro is actually used, but only used in skipped
+conditional blocks, then \s-1CPP\s0 will report it as unused. To avoid the
+warning in such a case, you might improve the scope of the macro's
+definition by, for example, moving it into the first skipped block.
+Alternatively, you could provide a dummy use with something like:
+.Sp
+.Vb 2
+\& #if defined the_macro_causing_the_warning
+\& #endif
+.Ve
+.IP "\fB\-Wendif\-labels\fR" 4
+.IX Item "-Wendif-labels"
+Warn whenever an \fB#else\fR or an \fB#endif\fR are followed by text.
+This usually happens in code of the form
+.Sp
+.Vb 5
+\& #if FOO
+\& ...
+\& #else FOO
+\& ...
+\& #endif FOO
+.Ve
+.Sp
+The second and third \f(CW\*(C`FOO\*(C'\fR should be in comments, but often are not
+in older programs. This warning is on by default.
+.IP "\fB\-Werror\fR" 4
+.IX Item "-Werror"
+Make all warnings into hard errors. Source code which triggers warnings
+will be rejected.
+.IP "\fB\-Wsystem\-headers\fR" 4
+.IX Item "-Wsystem-headers"
+Issue warnings for code in system headers. These are normally unhelpful
+in finding bugs in your own code, therefore suppressed. If you are
+responsible for the system library, you may want to see them.
+.IP "\fB\-w\fR" 4
+.IX Item "-w"
+Suppress all warnings, including those which \s-1GNU CPP\s0 issues by default.
+.IP "\fB\-pedantic\fR" 4
+.IX Item "-pedantic"
+Issue all the mandatory diagnostics listed in the C standard. Some of
+them are left out by default, since they trigger frequently on harmless
+code.
+.IP "\fB\-pedantic\-errors\fR" 4
+.IX Item "-pedantic-errors"
+Issue all the mandatory diagnostics, and make all mandatory diagnostics
+into errors. This includes mandatory diagnostics that \s-1GCC\s0 issues
+without \fB\-pedantic\fR but treats as warnings.
+.IP "\fB\-M\fR" 4
+.IX Item "-M"
+Instead of outputting the result of preprocessing, output a rule
+suitable for \fBmake\fR describing the dependencies of the main
+source file. The preprocessor outputs one \fBmake\fR rule containing
+the object file name for that source file, a colon, and the names of all
+the included files, including those coming from \fB\-include\fR or
+\&\fB\-imacros\fR command line options.
+.Sp
+Unless specified explicitly (with \fB\-MT\fR or \fB\-MQ\fR), the
+object file name consists of the name of the source file with any
+suffix replaced with object file suffix and with any leading directory
+parts removed. If there are many included files then the rule is
+split into several lines using \fB\e\fR\-newline. The rule has no
+commands.
+.Sp
+This option does not suppress the preprocessor's debug output, such as
+\&\fB\-dM\fR. To avoid mixing such debug output with the dependency
+rules you should explicitly specify the dependency output file with
+\&\fB\-MF\fR, or use an environment variable like
+\&\fB\s-1DEPENDENCIES_OUTPUT\s0\fR. Debug output
+will still be sent to the regular output stream as normal.
+.Sp
+Passing \fB\-M\fR to the driver implies \fB\-E\fR, and suppresses
+warnings with an implicit \fB\-w\fR.
+.IP "\fB\-MM\fR" 4
+.IX Item "-MM"
+Like \fB\-M\fR but do not mention header files that are found in
+system header directories, nor header files that are included,
+directly or indirectly, from such a header.
+.Sp
+This implies that the choice of angle brackets or double quotes in an
+\&\fB#include\fR directive does not in itself determine whether that
+header will appear in \fB\-MM\fR dependency output. This is a
+slight change in semantics from \s-1GCC\s0 versions 3.0 and earlier.
+.IP "\fB\-MF\fR \fIfile\fR" 4
+.IX Item "-MF file"
+When used with \fB\-M\fR or \fB\-MM\fR, specifies a
+file to write the dependencies to. If no \fB\-MF\fR switch is given
+the preprocessor sends the rules to the same place it would have sent
+preprocessed output.
+.Sp
+When used with the driver options \fB\-MD\fR or \fB\-MMD\fR,
+\&\fB\-MF\fR overrides the default dependency output file.
+.IP "\fB\-MG\fR" 4
+.IX Item "-MG"
+In conjunction with an option such as \fB\-M\fR requesting
+dependency generation, \fB\-MG\fR assumes missing header files are
+generated files and adds them to the dependency list without raising
+an error. The dependency filename is taken directly from the
+\&\f(CW\*(C`#include\*(C'\fR directive without prepending any path. \fB\-MG\fR
+also suppresses preprocessed output, as a missing header file renders
+this useless.
+.Sp
+This feature is used in automatic updating of makefiles.
+.IP "\fB\-MP\fR" 4
+.IX Item "-MP"
+This option instructs \s-1CPP\s0 to add a phony target for each dependency
+other than the main file, causing each to depend on nothing. These
+dummy rules work around errors \fBmake\fR gives if you remove header
+files without updating the \fIMakefile\fR to match.
+.Sp
+This is typical output:
+.Sp
+.Vb 1
+\& test.o: test.c test.h
+\&
+\& test.h:
+.Ve
+.IP "\fB\-MT\fR \fItarget\fR" 4
+.IX Item "-MT target"
+Change the target of the rule emitted by dependency generation. By
+default \s-1CPP\s0 takes the name of the main input file, deletes any
+directory components and any file suffix such as \fB.c\fR, and
+appends the platform's usual object suffix. The result is the target.
+.Sp
+An \fB\-MT\fR option will set the target to be exactly the string you
+specify. If you want multiple targets, you can specify them as a single
+argument to \fB\-MT\fR, or use multiple \fB\-MT\fR options.
+.Sp
+For example, \fB\-MT\ '$(objpfx)foo.o'\fR might give
+.Sp
+.Vb 1
+\& $(objpfx)foo.o: foo.c
+.Ve
+.IP "\fB\-MQ\fR \fItarget\fR" 4
+.IX Item "-MQ target"
+Same as \fB\-MT\fR, but it quotes any characters which are special to
+Make. \fB\-MQ\ '$(objpfx)foo.o'\fR gives
+.Sp
+.Vb 1
+\& $$(objpfx)foo.o: foo.c
+.Ve
+.Sp
+The default target is automatically quoted, as if it were given with
+\&\fB\-MQ\fR.
+.IP "\fB\-MD\fR" 4
+.IX Item "-MD"
+\&\fB\-MD\fR is equivalent to \fB\-M \-MF\fR \fIfile\fR, except that
+\&\fB\-E\fR is not implied. The driver determines \fIfile\fR based on
+whether an \fB\-o\fR option is given. If it is, the driver uses its
+argument but with a suffix of \fI.d\fR, otherwise it takes the name
+of the input file, removes any directory components and suffix, and
+applies a \fI.d\fR suffix.
+.Sp
+If \fB\-MD\fR is used in conjunction with \fB\-E\fR, any
+\&\fB\-o\fR switch is understood to specify the dependency output file, but if used without \fB\-E\fR, each \fB\-o\fR
+is understood to specify a target object file.
+.Sp
+Since \fB\-E\fR is not implied, \fB\-MD\fR can be used to generate
+a dependency output file as a side-effect of the compilation process.
+.IP "\fB\-MMD\fR" 4
+.IX Item "-MMD"
+Like \fB\-MD\fR except mention only user header files, not system
+header files.
+.IP "\fB\-x c\fR" 4
+.IX Item "-x c"
+.PD 0
+.IP "\fB\-x c++\fR" 4
+.IX Item "-x c++"
+.IP "\fB\-x objective-c\fR" 4
+.IX Item "-x objective-c"
+.IP "\fB\-x assembler-with-cpp\fR" 4
+.IX Item "-x assembler-with-cpp"
+.PD
+Specify the source language: C, \*(C+, Objective-C, or assembly. This has
+nothing to do with standards conformance or extensions; it merely
+selects which base syntax to expect. If you give none of these options,
+cpp will deduce the language from the extension of the source file:
+\&\fB.c\fR, \fB.cc\fR, \fB.m\fR, or \fB.S\fR. Some other common
+extensions for \*(C+ and assembly are also recognized. If cpp does not
+recognize the extension, it will treat the file as C; this is the most
+generic mode.
+.Sp
+\&\fINote:\fR Previous versions of cpp accepted a \fB\-lang\fR option
+which selected both the language and the standards conformance level.
+This option has been removed, because it conflicts with the \fB\-l\fR
+option.
+.IP "\fB\-std=\fR\fIstandard\fR" 4
+.IX Item "-std=standard"
+.PD 0
+.IP "\fB\-ansi\fR" 4
+.IX Item "-ansi"
+.PD
+Specify the standard to which the code should conform. Currently \s-1CPP\s0
+knows about C and \*(C+ standards; others may be added in the future.
+.Sp
+\&\fIstandard\fR
+may be one of:
+.RS 4
+.ie n .IP """c90""" 4
+.el .IP "\f(CWc90\fR" 4
+.IX Item "c90"
+.PD 0
+.ie n .IP """c89""" 4
+.el .IP "\f(CWc89\fR" 4
+.IX Item "c89"
+.ie n .IP """iso9899:1990""" 4
+.el .IP "\f(CWiso9899:1990\fR" 4
+.IX Item "iso9899:1990"
+.PD
+The \s-1ISO C\s0 standard from 1990. \fBc90\fR is the customary shorthand for
+this version of the standard.
+.Sp
+The \fB\-ansi\fR option is equivalent to \fB\-std=c90\fR.
+.ie n .IP """iso9899:199409""" 4
+.el .IP "\f(CWiso9899:199409\fR" 4
+.IX Item "iso9899:199409"
+The 1990 C standard, as amended in 1994.
+.ie n .IP """iso9899:1999""" 4
+.el .IP "\f(CWiso9899:1999\fR" 4
+.IX Item "iso9899:1999"
+.PD 0
+.ie n .IP """c99""" 4
+.el .IP "\f(CWc99\fR" 4
+.IX Item "c99"
+.ie n .IP """iso9899:199x""" 4
+.el .IP "\f(CWiso9899:199x\fR" 4
+.IX Item "iso9899:199x"
+.ie n .IP """c9x""" 4
+.el .IP "\f(CWc9x\fR" 4
+.IX Item "c9x"
+.PD
+The revised \s-1ISO C\s0 standard, published in December 1999. Before
+publication, this was known as C9X.
+.ie n .IP """iso9899:2011""" 4
+.el .IP "\f(CWiso9899:2011\fR" 4
+.IX Item "iso9899:2011"
+.PD 0
+.ie n .IP """c11""" 4
+.el .IP "\f(CWc11\fR" 4
+.IX Item "c11"
+.ie n .IP """c1x""" 4
+.el .IP "\f(CWc1x\fR" 4
+.IX Item "c1x"
+.PD
+The revised \s-1ISO C\s0 standard, published in December 2011. Before
+publication, this was known as C1X.
+.ie n .IP """gnu90""" 4
+.el .IP "\f(CWgnu90\fR" 4
+.IX Item "gnu90"
+.PD 0
+.ie n .IP """gnu89""" 4
+.el .IP "\f(CWgnu89\fR" 4
+.IX Item "gnu89"
+.PD
+The 1990 C standard plus \s-1GNU\s0 extensions. This is the default.
+.ie n .IP """gnu99""" 4
+.el .IP "\f(CWgnu99\fR" 4
+.IX Item "gnu99"
+.PD 0
+.ie n .IP """gnu9x""" 4
+.el .IP "\f(CWgnu9x\fR" 4
+.IX Item "gnu9x"
+.PD
+The 1999 C standard plus \s-1GNU\s0 extensions.
+.ie n .IP """gnu11""" 4
+.el .IP "\f(CWgnu11\fR" 4
+.IX Item "gnu11"
+.PD 0
+.ie n .IP """gnu1x""" 4
+.el .IP "\f(CWgnu1x\fR" 4
+.IX Item "gnu1x"
+.PD
+The 2011 C standard plus \s-1GNU\s0 extensions.
+.ie n .IP """c++98""" 4
+.el .IP "\f(CWc++98\fR" 4
+.IX Item "c++98"
+The 1998 \s-1ISO \*(C+\s0 standard plus amendments.
+.ie n .IP """gnu++98""" 4
+.el .IP "\f(CWgnu++98\fR" 4
+.IX Item "gnu++98"
+The same as \fB\-std=c++98\fR plus \s-1GNU\s0 extensions. This is the
+default for \*(C+ code.
+.RE
+.RS 4
+.RE
+.IP "\fB\-I\-\fR" 4
+.IX Item "-I-"
+Split the include path. Any directories specified with \fB\-I\fR
+options before \fB\-I\-\fR are searched only for headers requested with
+\&\f(CW\*(C`#include\ "\f(CIfile\f(CW"\*(C'\fR; they are not searched for
+\&\f(CW\*(C`#include\ <\f(CIfile\f(CW>\*(C'\fR. If additional directories are
+specified with \fB\-I\fR options after the \fB\-I\-\fR, those
+directories are searched for all \fB#include\fR directives.
+.Sp
+In addition, \fB\-I\-\fR inhibits the use of the directory of the current
+file directory as the first search directory for \f(CW\*(C`#include\ "\f(CIfile\f(CW"\*(C'\fR.
+.Sp
+This option has been deprecated.
+.IP "\fB\-nostdinc\fR" 4
+.IX Item "-nostdinc"
+Do not search the standard system directories for header files.
+Only the directories you have specified with \fB\-I\fR options
+(and the directory of the current file, if appropriate) are searched.
+.IP "\fB\-nostdinc++\fR" 4
+.IX Item "-nostdinc++"
+Do not search for header files in the \*(C+\-specific standard directories,
+but do still search the other standard directories. (This option is
+used when building the \*(C+ library.)
+.IP "\fB\-include\fR \fIfile\fR" 4
+.IX Item "-include file"
+Process \fIfile\fR as if \f(CW\*(C`#include "file"\*(C'\fR appeared as the first
+line of the primary source file. However, the first directory searched
+for \fIfile\fR is the preprocessor's working directory \fIinstead of\fR
+the directory containing the main source file. If not found there, it
+is searched for in the remainder of the \f(CW\*(C`#include "..."\*(C'\fR search
+chain as normal.
+.Sp
+If multiple \fB\-include\fR options are given, the files are included
+in the order they appear on the command line.
+.IP "\fB\-imacros\fR \fIfile\fR" 4
+.IX Item "-imacros file"
+Exactly like \fB\-include\fR, except that any output produced by
+scanning \fIfile\fR is thrown away. Macros it defines remain defined.
+This allows you to acquire all the macros from a header without also
+processing its declarations.
+.Sp
+All files specified by \fB\-imacros\fR are processed before all files
+specified by \fB\-include\fR.
+.IP "\fB\-idirafter\fR \fIdir\fR" 4
+.IX Item "-idirafter dir"
+Search \fIdir\fR for header files, but do it \fIafter\fR all
+directories specified with \fB\-I\fR and the standard system directories
+have been exhausted. \fIdir\fR is treated as a system include directory.
+If \fIdir\fR begins with \f(CW\*(C`=\*(C'\fR, then the \f(CW\*(C`=\*(C'\fR will be replaced
+by the sysroot prefix; see \fB\-\-sysroot\fR and \fB\-isysroot\fR.
+.IP "\fB\-iprefix\fR \fIprefix\fR" 4
+.IX Item "-iprefix prefix"
+Specify \fIprefix\fR as the prefix for subsequent \fB\-iwithprefix\fR
+options. If the prefix represents a directory, you should include the
+final \fB/\fR.
+.IP "\fB\-iwithprefix\fR \fIdir\fR" 4
+.IX Item "-iwithprefix dir"
+.PD 0
+.IP "\fB\-iwithprefixbefore\fR \fIdir\fR" 4
+.IX Item "-iwithprefixbefore dir"
+.PD
+Append \fIdir\fR to the prefix specified previously with
+\&\fB\-iprefix\fR, and add the resulting directory to the include search
+path. \fB\-iwithprefixbefore\fR puts it in the same place \fB\-I\fR
+would; \fB\-iwithprefix\fR puts it where \fB\-idirafter\fR would.
+.IP "\fB\-isysroot\fR \fIdir\fR" 4
+.IX Item "-isysroot dir"
+This option is like the \fB\-\-sysroot\fR option, but applies only to
+header files (except for Darwin targets, where it applies to both header
+files and libraries). See the \fB\-\-sysroot\fR option for more
+information.
+.IP "\fB\-imultilib\fR \fIdir\fR" 4
+.IX Item "-imultilib dir"
+Use \fIdir\fR as a subdirectory of the directory containing
+target-specific \*(C+ headers.
+.IP "\fB\-isystem\fR \fIdir\fR" 4
+.IX Item "-isystem dir"
+Search \fIdir\fR for header files, after all directories specified by
+\&\fB\-I\fR but before the standard system directories. Mark it
+as a system directory, so that it gets the same special treatment as
+is applied to the standard system directories.
+.Sp
+If \fIdir\fR begins with \f(CW\*(C`=\*(C'\fR, then the \f(CW\*(C`=\*(C'\fR will be replaced
+by the sysroot prefix; see \fB\-\-sysroot\fR and \fB\-isysroot\fR.
+.IP "\fB\-iquote\fR \fIdir\fR" 4
+.IX Item "-iquote dir"
+Search \fIdir\fR only for header files requested with
+\&\f(CW\*(C`#include\ "\f(CIfile\f(CW"\*(C'\fR; they are not searched for
+\&\f(CW\*(C`#include\ <\f(CIfile\f(CW>\*(C'\fR, before all directories specified by
+\&\fB\-I\fR and before the standard system directories.
+.Sp
+If \fIdir\fR begins with \f(CW\*(C`=\*(C'\fR, then the \f(CW\*(C`=\*(C'\fR will be replaced
+by the sysroot prefix; see \fB\-\-sysroot\fR and \fB\-isysroot\fR.
+.IP "\fB\-fdirectives\-only\fR" 4
+.IX Item "-fdirectives-only"
+When preprocessing, handle directives, but do not expand macros.
+.Sp
+The option's behavior depends on the \fB\-E\fR and \fB\-fpreprocessed\fR
+options.
+.Sp
+With \fB\-E\fR, preprocessing is limited to the handling of directives
+such as \f(CW\*(C`#define\*(C'\fR, \f(CW\*(C`#ifdef\*(C'\fR, and \f(CW\*(C`#error\*(C'\fR. Other
+preprocessor operations, such as macro expansion and trigraph
+conversion are not performed. In addition, the \fB\-dD\fR option is
+implicitly enabled.
+.Sp
+With \fB\-fpreprocessed\fR, predefinition of command line and most
+builtin macros is disabled. Macros such as \f(CW\*(C`_\|_LINE_\|_\*(C'\fR, which are
+contextually dependent, are handled normally. This enables compilation of
+files previously preprocessed with \f(CW\*(C`\-E \-fdirectives\-only\*(C'\fR.
+.Sp
+With both \fB\-E\fR and \fB\-fpreprocessed\fR, the rules for
+\&\fB\-fpreprocessed\fR take precedence. This enables full preprocessing of
+files previously preprocessed with \f(CW\*(C`\-E \-fdirectives\-only\*(C'\fR.
+.IP "\fB\-fdollars\-in\-identifiers\fR" 4
+.IX Item "-fdollars-in-identifiers"
+Accept \fB$\fR in identifiers.
+.IP "\fB\-fextended\-identifiers\fR" 4
+.IX Item "-fextended-identifiers"
+Accept universal character names in identifiers. This option is
+experimental; in a future version of \s-1GCC,\s0 it will be enabled by
+default for C99 and \*(C+.
+.IP "\fB\-fno\-canonical\-system\-headers\fR" 4
+.IX Item "-fno-canonical-system-headers"
+When preprocessing, do not shorten system header paths with canonicalization.
+.IP "\fB\-fpreprocessed\fR" 4
+.IX Item "-fpreprocessed"
+Indicate to the preprocessor that the input file has already been
+preprocessed. This suppresses things like macro expansion, trigraph
+conversion, escaped newline splicing, and processing of most directives.
+The preprocessor still recognizes and removes comments, so that you can
+pass a file preprocessed with \fB\-C\fR to the compiler without
+problems. In this mode the integrated preprocessor is little more than
+a tokenizer for the front ends.
+.Sp
+\&\fB\-fpreprocessed\fR is implicit if the input file has one of the
+extensions \fB.i\fR, \fB.ii\fR or \fB.mi\fR. These are the
+extensions that \s-1GCC\s0 uses for preprocessed files created by
+\&\fB\-save\-temps\fR.
+.IP "\fB\-ftabstop=\fR\fIwidth\fR" 4
+.IX Item "-ftabstop=width"
+Set the distance between tab stops. This helps the preprocessor report
+correct column numbers in warnings or errors, even if tabs appear on the
+line. If the value is less than 1 or greater than 100, the option is
+ignored. The default is 8.
+.IP "\fB\-fdebug\-cpp\fR" 4
+.IX Item "-fdebug-cpp"
+This option is only useful for debugging \s-1GCC. \s0 When used with
+\&\fB\-E\fR, dumps debugging information about location maps. Every
+token in the output is preceded by the dump of the map its location
+belongs to. The dump of the map holding the location of a token would
+be:
+.Sp
+.Vb 1
+\& {"P":F</file/path>;"F":F</includer/path>;"L":<line_num>;"C":<col_num>;"S":<system_header_p>;"M":<map_address>;"E":<macro_expansion_p>,"loc":<location>}
+.Ve
+.Sp
+When used without \fB\-E\fR, this option has no effect.
+.IP "\fB\-ftrack\-macro\-expansion\fR[\fB=\fR\fIlevel\fR]" 4
+.IX Item "-ftrack-macro-expansion[=level]"
+Track locations of tokens across macro expansions. This allows the
+compiler to emit diagnostic about the current macro expansion stack
+when a compilation error occurs in a macro expansion. Using this
+option makes the preprocessor and the compiler consume more
+memory. The \fIlevel\fR parameter can be used to choose the level of
+precision of token location tracking thus decreasing the memory
+consumption if necessary. Value \fB0\fR of \fIlevel\fR de-activates
+this option just as if no \fB\-ftrack\-macro\-expansion\fR was present
+on the command line. Value \fB1\fR tracks tokens locations in a
+degraded mode for the sake of minimal memory overhead. In this mode
+all tokens resulting from the expansion of an argument of a
+function-like macro have the same location. Value \fB2\fR tracks
+tokens locations completely. This value is the most memory hungry.
+When this option is given no argument, the default parameter value is
+\&\fB2\fR.
+.Sp
+Note that \-ftrack\-macro\-expansion=2 is activated by default.
+.IP "\fB\-fexec\-charset=\fR\fIcharset\fR" 4
+.IX Item "-fexec-charset=charset"
+Set the execution character set, used for string and character
+constants. The default is \s-1UTF\-8. \s0\fIcharset\fR can be any encoding
+supported by the system's \f(CW\*(C`iconv\*(C'\fR library routine.
+.IP "\fB\-fwide\-exec\-charset=\fR\fIcharset\fR" 4
+.IX Item "-fwide-exec-charset=charset"
+Set the wide execution character set, used for wide string and
+character constants. The default is \s-1UTF\-32\s0 or \s-1UTF\-16,\s0 whichever
+corresponds to the width of \f(CW\*(C`wchar_t\*(C'\fR. As with
+\&\fB\-fexec\-charset\fR, \fIcharset\fR can be any encoding supported
+by the system's \f(CW\*(C`iconv\*(C'\fR library routine; however, you will have
+problems with encodings that do not fit exactly in \f(CW\*(C`wchar_t\*(C'\fR.
+.IP "\fB\-finput\-charset=\fR\fIcharset\fR" 4
+.IX Item "-finput-charset=charset"
+Set the input character set, used for translation from the character
+set of the input file to the source character set used by \s-1GCC. \s0 If the
+locale does not specify, or \s-1GCC\s0 cannot get this information from the
+locale, the default is \s-1UTF\-8. \s0 This can be overridden by either the locale
+or this command line option. Currently the command line option takes
+precedence if there's a conflict. \fIcharset\fR can be any encoding
+supported by the system's \f(CW\*(C`iconv\*(C'\fR library routine.
+.IP "\fB\-fworking\-directory\fR" 4
+.IX Item "-fworking-directory"
+Enable generation of linemarkers in the preprocessor output that will
+let the compiler know the current working directory at the time of
+preprocessing. When this option is enabled, the preprocessor will
+emit, after the initial linemarker, a second linemarker with the
+current working directory followed by two slashes. \s-1GCC\s0 will use this
+directory, when it's present in the preprocessed input, as the
+directory emitted as the current working directory in some debugging
+information formats. This option is implicitly enabled if debugging
+information is enabled, but this can be inhibited with the negated
+form \fB\-fno\-working\-directory\fR. If the \fB\-P\fR flag is
+present in the command line, this option has no effect, since no
+\&\f(CW\*(C`#line\*(C'\fR directives are emitted whatsoever.
+.IP "\fB\-fno\-show\-column\fR" 4
+.IX Item "-fno-show-column"
+Do not print column numbers in diagnostics. This may be necessary if
+diagnostics are being scanned by a program that does not understand the
+column numbers, such as \fBdejagnu\fR.
+.IP "\fB\-A\fR \fIpredicate\fR\fB=\fR\fIanswer\fR" 4
+.IX Item "-A predicate=answer"
+Make an assertion with the predicate \fIpredicate\fR and answer
+\&\fIanswer\fR. This form is preferred to the older form \fB\-A\fR
+\&\fIpredicate\fR\fB(\fR\fIanswer\fR\fB)\fR, which is still supported, because
+it does not use shell special characters.
+.IP "\fB\-A \-\fR\fIpredicate\fR\fB=\fR\fIanswer\fR" 4
+.IX Item "-A -predicate=answer"
+Cancel an assertion with the predicate \fIpredicate\fR and answer
+\&\fIanswer\fR.
+.IP "\fB\-dCHARS\fR" 4
+.IX Item "-dCHARS"
+\&\fI\s-1CHARS\s0\fR is a sequence of one or more of the following characters,
+and must not be preceded by a space. Other characters are interpreted
+by the compiler proper, or reserved for future versions of \s-1GCC,\s0 and so
+are silently ignored. If you specify characters whose behavior
+conflicts, the result is undefined.
+.RS 4
+.IP "\fBM\fR" 4
+.IX Item "M"
+Instead of the normal output, generate a list of \fB#define\fR
+directives for all the macros defined during the execution of the
+preprocessor, including predefined macros. This gives you a way of
+finding out what is predefined in your version of the preprocessor.
+Assuming you have no file \fIfoo.h\fR, the command
+.Sp
+.Vb 1
+\& touch foo.h; cpp \-dM foo.h
+.Ve
+.Sp
+will show all the predefined macros.
+.Sp
+If you use \fB\-dM\fR without the \fB\-E\fR option, \fB\-dM\fR is
+interpreted as a synonym for \fB\-fdump\-rtl\-mach\fR.
+.IP "\fBD\fR" 4
+.IX Item "D"
+Like \fBM\fR except in two respects: it does \fInot\fR include the
+predefined macros, and it outputs \fIboth\fR the \fB#define\fR
+directives and the result of preprocessing. Both kinds of output go to
+the standard output file.
+.IP "\fBN\fR" 4
+.IX Item "N"
+Like \fBD\fR, but emit only the macro names, not their expansions.
+.IP "\fBI\fR" 4
+.IX Item "I"
+Output \fB#include\fR directives in addition to the result of
+preprocessing.
+.IP "\fBU\fR" 4
+.IX Item "U"
+Like \fBD\fR except that only macros that are expanded, or whose
+definedness is tested in preprocessor directives, are output; the
+output is delayed until the use or test of the macro; and
+\&\fB#undef\fR directives are also output for macros tested but
+undefined at the time.
+.RE
+.RS 4
+.RE
+.IP "\fB\-P\fR" 4
+.IX Item "-P"
+Inhibit generation of linemarkers in the output from the preprocessor.
+This might be useful when running the preprocessor on something that is
+not C code, and will be sent to a program which might be confused by the
+linemarkers.
+.IP "\fB\-C\fR" 4
+.IX Item "-C"
+Do not discard comments. All comments are passed through to the output
+file, except for comments in processed directives, which are deleted
+along with the directive.
+.Sp
+You should be prepared for side effects when using \fB\-C\fR; it
+causes the preprocessor to treat comments as tokens in their own right.
+For example, comments appearing at the start of what would be a
+directive line have the effect of turning that line into an ordinary
+source line, since the first token on the line is no longer a \fB#\fR.
+.IP "\fB\-CC\fR" 4
+.IX Item "-CC"
+Do not discard comments, including during macro expansion. This is
+like \fB\-C\fR, except that comments contained within macros are
+also passed through to the output file where the macro is expanded.
+.Sp
+In addition to the side-effects of the \fB\-C\fR option, the
+\&\fB\-CC\fR option causes all \*(C+\-style comments inside a macro
+to be converted to C\-style comments. This is to prevent later use
+of that macro from inadvertently commenting out the remainder of
+the source line.
+.Sp
+The \fB\-CC\fR option is generally used to support lint comments.
+.IP "\fB\-traditional\-cpp\fR" 4
+.IX Item "-traditional-cpp"
+Try to imitate the behavior of old-fashioned C preprocessors, as
+opposed to \s-1ISO C\s0 preprocessors.
+.IP "\fB\-trigraphs\fR" 4
+.IX Item "-trigraphs"
+Process trigraph sequences.
+.IP "\fB\-remap\fR" 4
+.IX Item "-remap"
+Enable special code to work around file systems which only permit very
+short file names, such as MS-DOS.
+.IP "\fB\-\-help\fR" 4
+.IX Item "--help"
+.PD 0
+.IP "\fB\-\-target\-help\fR" 4
+.IX Item "--target-help"
+.PD
+Print text describing all the command line options instead of
+preprocessing anything.
+.IP "\fB\-v\fR" 4
+.IX Item "-v"
+Verbose mode. Print out \s-1GNU CPP\s0's version number at the beginning of
+execution, and report the final form of the include path.
+.IP "\fB\-H\fR" 4
+.IX Item "-H"
+Print the name of each header file used, in addition to other normal
+activities. Each name is indented to show how deep in the
+\&\fB#include\fR stack it is. Precompiled header files are also
+printed, even if they are found to be invalid; an invalid precompiled
+header file is printed with \fB...x\fR and a valid one with \fB...!\fR .
+.IP "\fB\-version\fR" 4
+.IX Item "-version"
+.PD 0
+.IP "\fB\-\-version\fR" 4
+.IX Item "--version"
+.PD
+Print out \s-1GNU CPP\s0's version number. With one dash, proceed to
+preprocess as normal. With two dashes, exit immediately.
+.SH "ENVIRONMENT"
+.IX Header "ENVIRONMENT"
+This section describes the environment variables that affect how \s-1CPP\s0
+operates. You can use them to specify directories or prefixes to use
+when searching for include files, or to control dependency output.
+.PP
+Note that you can also specify places to search using options such as
+\&\fB\-I\fR, and control dependency output with options like
+\&\fB\-M\fR. These take precedence over
+environment variables, which in turn take precedence over the
+configuration of \s-1GCC.\s0
+.IP "\fB\s-1CPATH\s0\fR" 4
+.IX Item "CPATH"
+.PD 0
+.IP "\fBC_INCLUDE_PATH\fR" 4
+.IX Item "C_INCLUDE_PATH"
+.IP "\fB\s-1CPLUS_INCLUDE_PATH\s0\fR" 4
+.IX Item "CPLUS_INCLUDE_PATH"
+.IP "\fB\s-1OBJC_INCLUDE_PATH\s0\fR" 4
+.IX Item "OBJC_INCLUDE_PATH"
+.PD
+Each variable's value is a list of directories separated by a special
+character, much like \fB\s-1PATH\s0\fR, in which to look for header files.
+The special character, \f(CW\*(C`PATH_SEPARATOR\*(C'\fR, is target-dependent and
+determined at \s-1GCC\s0 build time. For Microsoft Windows-based targets it is a
+semicolon, and for almost all other targets it is a colon.
+.Sp
+\&\fB\s-1CPATH\s0\fR specifies a list of directories to be searched as if
+specified with \fB\-I\fR, but after any paths given with \fB\-I\fR
+options on the command line. This environment variable is used
+regardless of which language is being preprocessed.
+.Sp
+The remaining environment variables apply only when preprocessing the
+particular language indicated. Each specifies a list of directories
+to be searched as if specified with \fB\-isystem\fR, but after any
+paths given with \fB\-isystem\fR options on the command line.
+.Sp
+In all these variables, an empty element instructs the compiler to
+search its current working directory. Empty elements can appear at the
+beginning or end of a path. For instance, if the value of
+\&\fB\s-1CPATH\s0\fR is \f(CW\*(C`:/special/include\*(C'\fR, that has the same
+effect as \fB\-I.\ \-I/special/include\fR.
+.IP "\fB\s-1DEPENDENCIES_OUTPUT\s0\fR" 4
+.IX Item "DEPENDENCIES_OUTPUT"
+If this variable is set, its value specifies how to output
+dependencies for Make based on the non-system header files processed
+by the compiler. System header files are ignored in the dependency
+output.
+.Sp
+The value of \fB\s-1DEPENDENCIES_OUTPUT\s0\fR can be just a file name, in
+which case the Make rules are written to that file, guessing the target
+name from the source file name. Or the value can have the form
+\&\fIfile\fR\fB \fR\fItarget\fR, in which case the rules are written to
+file \fIfile\fR using \fItarget\fR as the target name.
+.Sp
+In other words, this environment variable is equivalent to combining
+the options \fB\-MM\fR and \fB\-MF\fR,
+with an optional \fB\-MT\fR switch too.
+.IP "\fB\s-1SUNPRO_DEPENDENCIES\s0\fR" 4
+.IX Item "SUNPRO_DEPENDENCIES"
+This variable is the same as \fB\s-1DEPENDENCIES_OUTPUT\s0\fR (see above),
+except that system header files are not ignored, so it implies
+\&\fB\-M\fR rather than \fB\-MM\fR. However, the dependence on the
+main input file is omitted.
+.SH "SEE ALSO"
+.IX Header "SEE ALSO"
+\&\fIgpl\fR\|(7), \fIgfdl\fR\|(7), \fIfsf\-funding\fR\|(7),
+\&\fIgcc\fR\|(1), \fIas\fR\|(1), \fIld\fR\|(1), and the Info entries for \fIcpp\fR, \fIgcc\fR, and
+\&\fIbinutils\fR.
+.SH "COPYRIGHT"
+.IX Header "COPYRIGHT"
+Copyright (c) 1987\-2014 Free Software Foundation, Inc.
+.PP
+Permission is granted to copy, distribute and/or modify this document
+under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.3 or
+any later version published by the Free Software Foundation. A copy of
+the license is included in the
+man page \fIgfdl\fR\|(7).
+This manual contains no Invariant Sections. The Front-Cover Texts are
+(a) (see below), and the Back-Cover Texts are (b) (see below).
+.PP
+(a) The \s-1FSF\s0's Front-Cover Text is:
+.PP
+.Vb 1
+\& A GNU Manual
+.Ve
+.PP
+(b) The \s-1FSF\s0's Back-Cover Text is:
+.PP
+.Vb 3
+\& You have freedom to copy and modify this GNU Manual, like GNU
+\& software. Copies published by the Free Software Foundation raise
+\& funds for GNU development.
+.Ve
diff --git a/gcc-4.9/gcc/doc/cpp.info b/gcc-4.9/gcc/doc/cpp.info
new file mode 100644
index 000000000..dcb300666
--- /dev/null
+++ b/gcc-4.9/gcc/doc/cpp.info
@@ -0,0 +1,5602 @@
+This is cpp.info, produced by makeinfo version 5.1 from cpp.texi.
+
+Copyright (C) 1987-2014 Free Software Foundation, Inc.
+
+ Permission is granted to copy, distribute and/or modify this document
+under the terms of the GNU Free Documentation License, Version 1.3 or
+any later version published by the Free Software Foundation. A copy of
+the license is included in the section entitled "GNU Free Documentation
+License".
+
+ This manual contains no Invariant Sections. The Front-Cover Texts
+are (a) (see below), and the Back-Cover Texts are (b) (see below).
+
+ (a) The FSF's Front-Cover Text is:
+
+ A GNU Manual
+
+ (b) The FSF's Back-Cover Text is:
+
+ You have freedom to copy and modify this GNU Manual, like GNU
+software. Copies published by the Free Software Foundation raise funds
+for GNU development.
+INFO-DIR-SECTION Software development
+START-INFO-DIR-ENTRY
+* Cpp: (cpp). The GNU C preprocessor.
+END-INFO-DIR-ENTRY
+
+
+File: cpp.info, Node: Top, Next: Overview, Up: (dir)
+
+The C Preprocessor
+******************
+
+The C preprocessor implements the macro language used to transform C,
+C++, and Objective-C programs before they are compiled. It can also be
+useful on its own.
+
+* Menu:
+
+* Overview::
+* Header Files::
+* Macros::
+* Conditionals::
+* Diagnostics::
+* Line Control::
+* Pragmas::
+* Other Directives::
+* Preprocessor Output::
+* Traditional Mode::
+* Implementation Details::
+* Invocation::
+* Environment Variables::
+* GNU Free Documentation License::
+* Index of Directives::
+* Option Index::
+* Concept Index::
+
+ -- The Detailed Node Listing --
+
+Overview
+
+* Character sets::
+* Initial processing::
+* Tokenization::
+* The preprocessing language::
+
+Header Files
+
+* Include Syntax::
+* Include Operation::
+* Search Path::
+* Once-Only Headers::
+* Alternatives to Wrapper #ifndef::
+* Computed Includes::
+* Wrapper Headers::
+* System Headers::
+
+Macros
+
+* Object-like Macros::
+* Function-like Macros::
+* Macro Arguments::
+* Stringification::
+* Concatenation::
+* Variadic Macros::
+* Predefined Macros::
+* Undefining and Redefining Macros::
+* Directives Within Macro Arguments::
+* Macro Pitfalls::
+
+Predefined Macros
+
+* Standard Predefined Macros::
+* Common Predefined Macros::
+* System-specific Predefined Macros::
+* C++ Named Operators::
+
+Macro Pitfalls
+
+* Misnesting::
+* Operator Precedence Problems::
+* Swallowing the Semicolon::
+* Duplication of Side Effects::
+* Self-Referential Macros::
+* Argument Prescan::
+* Newlines in Arguments::
+
+Conditionals
+
+* Conditional Uses::
+* Conditional Syntax::
+* Deleted Code::
+
+Conditional Syntax
+
+* Ifdef::
+* If::
+* Defined::
+* Else::
+* Elif::
+
+Implementation Details
+
+* Implementation-defined behavior::
+* Implementation limits::
+* Obsolete Features::
+* Differences from previous versions::
+
+Obsolete Features
+
+* Obsolete Features::
+
+
+ Copyright (C) 1987-2014 Free Software Foundation, Inc.
+
+ Permission is granted to copy, distribute and/or modify this document
+under the terms of the GNU Free Documentation License, Version 1.3 or
+any later version published by the Free Software Foundation. A copy of
+the license is included in the section entitled "GNU Free Documentation
+License".
+
+ This manual contains no Invariant Sections. The Front-Cover Texts
+are (a) (see below), and the Back-Cover Texts are (b) (see below).
+
+ (a) The FSF's Front-Cover Text is:
+
+ A GNU Manual
+
+ (b) The FSF's Back-Cover Text is:
+
+ You have freedom to copy and modify this GNU Manual, like GNU
+software. Copies published by the Free Software Foundation raise funds
+for GNU development.
+
+
+File: cpp.info, Node: Overview, Next: Header Files, Prev: Top, Up: Top
+
+1 Overview
+**********
+
+The C preprocessor, often known as "cpp", is a "macro processor" that is
+used automatically by the C compiler to transform your program before
+compilation. It is called a macro processor because it allows you to
+define "macros", which are brief abbreviations for longer constructs.
+
+ The C preprocessor is intended to be used only with C, C++, and
+Objective-C source code. In the past, it has been abused as a general
+text processor. It will choke on input which does not obey C's lexical
+rules. For example, apostrophes will be interpreted as the beginning of
+character constants, and cause errors. Also, you cannot rely on it
+preserving characteristics of the input which are not significant to
+C-family languages. If a Makefile is preprocessed, all the hard tabs
+will be removed, and the Makefile will not work.
+
+ Having said that, you can often get away with using cpp on things
+which are not C. Other Algol-ish programming languages are often safe
+(Pascal, Ada, etc.) So is assembly, with caution. '-traditional-cpp'
+mode preserves more white space, and is otherwise more permissive. Many
+of the problems can be avoided by writing C or C++ style comments
+instead of native language comments, and keeping macros simple.
+
+ Wherever possible, you should use a preprocessor geared to the
+language you are writing in. Modern versions of the GNU assembler have
+macro facilities. Most high level programming languages have their own
+conditional compilation and inclusion mechanism. If all else fails, try
+a true general text processor, such as GNU M4.
+
+ C preprocessors vary in some details. This manual discusses the GNU
+C preprocessor, which provides a small superset of the features of ISO
+Standard C. In its default mode, the GNU C preprocessor does not do a
+few things required by the standard. These are features which are
+rarely, if ever, used, and may cause surprising changes to the meaning
+of a program which does not expect them. To get strict ISO Standard C,
+you should use the '-std=c90', '-std=c99' or '-std=c11' options,
+depending on which version of the standard you want. To get all the
+mandatory diagnostics, you must also use '-pedantic'. *Note
+Invocation::.
+
+ This manual describes the behavior of the ISO preprocessor. To
+minimize gratuitous differences, where the ISO preprocessor's behavior
+does not conflict with traditional semantics, the traditional
+preprocessor should behave the same way. The various differences that
+do exist are detailed in the section *note Traditional Mode::.
+
+ For clarity, unless noted otherwise, references to 'CPP' in this
+manual refer to GNU CPP.
+
+* Menu:
+
+* Character sets::
+* Initial processing::
+* Tokenization::
+* The preprocessing language::
+
+
+File: cpp.info, Node: Character sets, Next: Initial processing, Up: Overview
+
+1.1 Character sets
+==================
+
+Source code character set processing in C and related languages is
+rather complicated. The C standard discusses two character sets, but
+there are really at least four.
+
+ The files input to CPP might be in any character set at all. CPP's
+very first action, before it even looks for line boundaries, is to
+convert the file into the character set it uses for internal processing.
+That set is what the C standard calls the "source" character set. It
+must be isomorphic with ISO 10646, also known as Unicode. CPP uses the
+UTF-8 encoding of Unicode.
+
+ The character sets of the input files are specified using the
+'-finput-charset=' option.
+
+ All preprocessing work (the subject of the rest of this manual) is
+carried out in the source character set. If you request textual output
+from the preprocessor with the '-E' option, it will be in UTF-8.
+
+ After preprocessing is complete, string and character constants are
+converted again, into the "execution" character set. This character set
+is under control of the user; the default is UTF-8, matching the source
+character set. Wide string and character constants have their own
+character set, which is not called out specifically in the standard.
+Again, it is under control of the user. The default is UTF-16 or
+UTF-32, whichever fits in the target's 'wchar_t' type, in the target
+machine's byte order.(1) Octal and hexadecimal escape sequences do not
+undergo conversion; '\x12' has the value 0x12 regardless of the
+currently selected execution character set. All other escapes are
+replaced by the character in the source character set that they
+represent, then converted to the execution character set, just like
+unescaped characters.
+
+ Unless the experimental '-fextended-identifiers' option is used, GCC
+does not permit the use of characters outside the ASCII range, nor '\u'
+and '\U' escapes, in identifiers. Even with that option, characters
+outside the ASCII range can only be specified with the '\u' and '\U'
+escapes, not used directly in identifiers.
+
+ ---------- Footnotes ----------
+
+ (1) UTF-16 does not meet the requirements of the C standard for a
+wide character set, but the choice of 16-bit 'wchar_t' is enshrined in
+some system ABIs so we cannot fix this.
+
+
+File: cpp.info, Node: Initial processing, Next: Tokenization, Prev: Character sets, Up: Overview
+
+1.2 Initial processing
+======================
+
+The preprocessor performs a series of textual transformations on its
+input. These happen before all other processing. Conceptually, they
+happen in a rigid order, and the entire file is run through each
+transformation before the next one begins. CPP actually does them all
+at once, for performance reasons. These transformations correspond
+roughly to the first three "phases of translation" described in the C
+standard.
+
+ 1. The input file is read into memory and broken into lines.
+
+ Different systems use different conventions to indicate the end of
+ a line. GCC accepts the ASCII control sequences 'LF', 'CR LF' and
+ 'CR' as end-of-line markers. These are the canonical sequences
+ used by Unix, DOS and VMS, and the classic Mac OS (before OSX)
+ respectively. You may therefore safely copy source code written on
+ any of those systems to a different one and use it without
+ conversion. (GCC may lose track of the current line number if a
+ file doesn't consistently use one convention, as sometimes happens
+ when it is edited on computers with different conventions that
+ share a network file system.)
+
+ If the last line of any input file lacks an end-of-line marker, the
+ end of the file is considered to implicitly supply one. The C
+ standard says that this condition provokes undefined behavior, so
+ GCC will emit a warning message.
+
+ 2. If trigraphs are enabled, they are replaced by their corresponding
+ single characters. By default GCC ignores trigraphs, but if you
+ request a strictly conforming mode with the '-std' option, or you
+ specify the '-trigraphs' option, then it converts them.
+
+ These are nine three-character sequences, all starting with '??',
+ that are defined by ISO C to stand for single characters. They
+ permit obsolete systems that lack some of C's punctuation to use C.
+ For example, '??/' stands for '\', so '??/n' is a character
+ constant for a newline.
+
+ Trigraphs are not popular and many compilers implement them
+ incorrectly. Portable code should not rely on trigraphs being
+ either converted or ignored. With '-Wtrigraphs' GCC will warn you
+ when a trigraph may change the meaning of your program if it were
+ converted. *Note Wtrigraphs::.
+
+ In a string constant, you can prevent a sequence of question marks
+ from being confused with a trigraph by inserting a backslash
+ between the question marks, or by separating the string literal at
+ the trigraph and making use of string literal concatenation.
+ "(??\?)" is the string '(???)', not '(?]'. Traditional C compilers
+ do not recognize these idioms.
+
+ The nine trigraphs and their replacements are
+
+ Trigraph: ??( ??) ??< ??> ??= ??/ ??' ??! ??-
+ Replacement: [ ] { } # \ ^ | ~
+
+ 3. Continued lines are merged into one long line.
+
+ A continued line is a line which ends with a backslash, '\'. The
+ backslash is removed and the following line is joined with the
+ current one. No space is inserted, so you may split a line
+ anywhere, even in the middle of a word. (It is generally more
+ readable to split lines only at white space.)
+
+ The trailing backslash on a continued line is commonly referred to
+ as a "backslash-newline".
+
+ If there is white space between a backslash and the end of a line,
+ that is still a continued line. However, as this is usually the
+ result of an editing mistake, and many compilers will not accept it
+ as a continued line, GCC will warn you about it.
+
+ 4. All comments are replaced with single spaces.
+
+ There are two kinds of comments. "Block comments" begin with '/*'
+ and continue until the next '*/'. Block comments do not nest:
+
+ /* this is /* one comment */ text outside comment
+
+ "Line comments" begin with '//' and continue to the end of the
+ current line. Line comments do not nest either, but it does not
+ matter, because they would end in the same place anyway.
+
+ // this is // one comment
+ text outside comment
+
+ It is safe to put line comments inside block comments, or vice versa.
+
+ /* block comment
+ // contains line comment
+ yet more comment
+ */ outside comment
+
+ // line comment /* contains block comment */
+
+ But beware of commenting out one end of a block comment with a line
+comment.
+
+ // l.c. /* block comment begins
+ oops! this isn't a comment anymore */
+
+ Comments are not recognized within string literals. "/* blah */" is
+the string constant '/* blah */', not an empty string.
+
+ Line comments are not in the 1989 edition of the C standard, but they
+are recognized by GCC as an extension. In C++ and in the 1999 edition
+of the C standard, they are an official part of the language.
+
+ Since these transformations happen before all other processing, you
+can split a line mechanically with backslash-newline anywhere. You can
+comment out the end of a line. You can continue a line comment onto the
+next line with backslash-newline. You can even split '/*', '*/', and
+'//' onto multiple lines with backslash-newline. For example:
+
+ /\
+ *
+ */ # /*
+ */ defi\
+ ne FO\
+ O 10\
+ 20
+
+is equivalent to '#define FOO 1020'. All these tricks are extremely
+confusing and should not be used in code intended to be readable.
+
+ There is no way to prevent a backslash at the end of a line from
+being interpreted as a backslash-newline. This cannot affect any
+correct program, however.
+
+
+File: cpp.info, Node: Tokenization, Next: The preprocessing language, Prev: Initial processing, Up: Overview
+
+1.3 Tokenization
+================
+
+After the textual transformations are finished, the input file is
+converted into a sequence of "preprocessing tokens". These mostly
+correspond to the syntactic tokens used by the C compiler, but there are
+a few differences. White space separates tokens; it is not itself a
+token of any kind. Tokens do not have to be separated by white space,
+but it is often necessary to avoid ambiguities.
+
+ When faced with a sequence of characters that has more than one
+possible tokenization, the preprocessor is greedy. It always makes each
+token, starting from the left, as big as possible before moving on to
+the next token. For instance, 'a+++++b' is interpreted as
+'a ++ ++ + b', not as 'a ++ + ++ b', even though the latter tokenization
+could be part of a valid C program and the former could not.
+
+ Once the input file is broken into tokens, the token boundaries never
+change, except when the '##' preprocessing operator is used to paste
+tokens together. *Note Concatenation::. For example,
+
+ #define foo() bar
+ foo()baz
+ ==> bar baz
+ _not_
+ ==> barbaz
+
+ The compiler does not re-tokenize the preprocessor's output. Each
+preprocessing token becomes one compiler token.
+
+ Preprocessing tokens fall into five broad classes: identifiers,
+preprocessing numbers, string literals, punctuators, and other. An
+"identifier" is the same as an identifier in C: any sequence of letters,
+digits, or underscores, which begins with a letter or underscore.
+Keywords of C have no significance to the preprocessor; they are
+ordinary identifiers. You can define a macro whose name is a keyword,
+for instance. The only identifier which can be considered a
+preprocessing keyword is 'defined'. *Note Defined::.
+
+ This is mostly true of other languages which use the C preprocessor.
+However, a few of the keywords of C++ are significant even in the
+preprocessor. *Note C++ Named Operators::.
+
+ In the 1999 C standard, identifiers may contain letters which are not
+part of the "basic source character set", at the implementation's
+discretion (such as accented Latin letters, Greek letters, or Chinese
+ideograms). This may be done with an extended character set, or the
+'\u' and '\U' escape sequences. The implementation of this feature in
+GCC is experimental; such characters are only accepted in the '\u' and
+'\U' forms and only if '-fextended-identifiers' is used.
+
+ As an extension, GCC treats '$' as a letter. This is for
+compatibility with some systems, such as VMS, where '$' is commonly used
+in system-defined function and object names. '$' is not a letter in
+strictly conforming mode, or if you specify the '-$' option. *Note
+Invocation::.
+
+ A "preprocessing number" has a rather bizarre definition. The
+category includes all the normal integer and floating point constants
+one expects of C, but also a number of other things one might not
+initially recognize as a number. Formally, preprocessing numbers begin
+with an optional period, a required decimal digit, and then continue
+with any sequence of letters, digits, underscores, periods, and
+exponents. Exponents are the two-character sequences 'e+', 'e-', 'E+',
+'E-', 'p+', 'p-', 'P+', and 'P-'. (The exponents that begin with 'p' or
+'P' are new to C99. They are used for hexadecimal floating-point
+constants.)
+
+ The purpose of this unusual definition is to isolate the preprocessor
+from the full complexity of numeric constants. It does not have to
+distinguish between lexically valid and invalid floating-point numbers,
+which is complicated. The definition also permits you to split an
+identifier at any position and get exactly two tokens, which can then be
+pasted back together with the '##' operator.
+
+ It's possible for preprocessing numbers to cause programs to be
+misinterpreted. For example, '0xE+12' is a preprocessing number which
+does not translate to any valid numeric constant, therefore a syntax
+error. It does not mean '0xE + 12', which is what you might have
+intended.
+
+ "String literals" are string constants, character constants, and
+header file names (the argument of '#include').(1) String constants and
+character constants are straightforward: "..." or '...'. In either case
+embedded quotes should be escaped with a backslash: '\'' is the
+character constant for '''. There is no limit on the length of a
+character constant, but the value of a character constant that contains
+more than one character is implementation-defined. *Note Implementation
+Details::.
+
+ Header file names either look like string constants, "...", or are
+written with angle brackets instead, <...>. In either case, backslash
+is an ordinary character. There is no way to escape the closing quote
+or angle bracket. The preprocessor looks for the header file in
+different places depending on which form you use. *Note Include
+Operation::.
+
+ No string literal may extend past the end of a line. Older versions
+of GCC accepted multi-line string constants. You may use continued
+lines instead, or string constant concatenation. *Note Differences from
+previous versions::.
+
+ "Punctuators" are all the usual bits of punctuation which are
+meaningful to C and C++. All but three of the punctuation characters in
+ASCII are C punctuators. The exceptions are '@', '$', and '`'. In
+addition, all the two- and three-character operators are punctuators.
+There are also six "digraphs", which the C++ standard calls "alternative
+tokens", which are merely alternate ways to spell other punctuators.
+This is a second attempt to work around missing punctuation in obsolete
+systems. It has no negative side effects, unlike trigraphs, but does
+not cover as much ground. The digraphs and their corresponding normal
+punctuators are:
+
+ Digraph: <% %> <: :> %: %:%:
+ Punctuator: { } [ ] # ##
+
+ Any other single character is considered "other". It is passed on to
+the preprocessor's output unmolested. The C compiler will almost
+certainly reject source code containing "other" tokens. In ASCII, the
+only other characters are '@', '$', '`', and control characters other
+than NUL (all bits zero). (Note that '$' is normally considered a
+letter.) All characters with the high bit set (numeric range 0x7F-0xFF)
+are also "other" in the present implementation. This will change when
+proper support for international character sets is added to GCC.
+
+ NUL is a special case because of the high probability that its
+appearance is accidental, and because it may be invisible to the user
+(many terminals do not display NUL at all). Within comments, NULs are
+silently ignored, just as any other character would be. In running
+text, NUL is considered white space. For example, these two directives
+have the same meaning.
+
+ #define X^@1
+ #define X 1
+
+(where '^@' is ASCII NUL). Within string or character constants, NULs
+are preserved. In the latter two cases the preprocessor emits a warning
+message.
+
+ ---------- Footnotes ----------
+
+ (1) The C standard uses the term "string literal" to refer only to
+what we are calling "string constants".
+
+
+File: cpp.info, Node: The preprocessing language, Prev: Tokenization, Up: Overview
+
+1.4 The preprocessing language
+==============================
+
+After tokenization, the stream of tokens may simply be passed straight
+to the compiler's parser. However, if it contains any operations in the
+"preprocessing language", it will be transformed first. This stage
+corresponds roughly to the standard's "translation phase 4" and is what
+most people think of as the preprocessor's job.
+
+ The preprocessing language consists of "directives" to be executed
+and "macros" to be expanded. Its primary capabilities are:
+
+ * Inclusion of header files. These are files of declarations that
+ can be substituted into your program.
+
+ * Macro expansion. You can define "macros", which are abbreviations
+ for arbitrary fragments of C code. The preprocessor will replace
+ the macros with their definitions throughout the program. Some
+ macros are automatically defined for you.
+
+ * Conditional compilation. You can include or exclude parts of the
+ program according to various conditions.
+
+ * Line control. If you use a program to combine or rearrange source
+ files into an intermediate file which is then compiled, you can use
+ line control to inform the compiler where each source line
+ originally came from.
+
+ * Diagnostics. You can detect problems at compile time and issue
+ errors or warnings.
+
+ There are a few more, less useful, features.
+
+ Except for expansion of predefined macros, all these operations are
+triggered with "preprocessing directives". Preprocessing directives are
+lines in your program that start with '#'. Whitespace is allowed before
+and after the '#'. The '#' is followed by an identifier, the "directive
+name". It specifies the operation to perform. Directives are commonly
+referred to as '#NAME' where NAME is the directive name. For example,
+'#define' is the directive that defines a macro.
+
+ The '#' which begins a directive cannot come from a macro expansion.
+Also, the directive name is not macro expanded. Thus, if 'foo' is
+defined as a macro expanding to 'define', that does not make '#foo' a
+valid preprocessing directive.
+
+ The set of valid directive names is fixed. Programs cannot define
+new preprocessing directives.
+
+ Some directives require arguments; these make up the rest of the
+directive line and must be separated from the directive name by
+whitespace. For example, '#define' must be followed by a macro name and
+the intended expansion of the macro.
+
+ A preprocessing directive cannot cover more than one line. The line
+may, however, be continued with backslash-newline, or by a block comment
+which extends past the end of the line. In either case, when the
+directive is processed, the continuations have already been merged with
+the first line to make one long line.
+
+
+File: cpp.info, Node: Header Files, Next: Macros, Prev: Overview, Up: Top
+
+2 Header Files
+**************
+
+A header file is a file containing C declarations and macro definitions
+(*note Macros::) to be shared between several source files. You request
+the use of a header file in your program by "including" it, with the C
+preprocessing directive '#include'.
+
+ Header files serve two purposes.
+
+ * System header files declare the interfaces to parts of the
+ operating system. You include them in your program to supply the
+ definitions and declarations you need to invoke system calls and
+ libraries.
+
+ * Your own header files contain declarations for interfaces between
+ the source files of your program. Each time you have a group of
+ related declarations and macro definitions all or most of which are
+ needed in several different source files, it is a good idea to
+ create a header file for them.
+
+ Including a header file produces the same results as copying the
+header file into each source file that needs it. Such copying would be
+time-consuming and error-prone. With a header file, the related
+declarations appear in only one place. If they need to be changed, they
+can be changed in one place, and programs that include the header file
+will automatically use the new version when next recompiled. The header
+file eliminates the labor of finding and changing all the copies as well
+as the risk that a failure to find one copy will result in
+inconsistencies within a program.
+
+ In C, the usual convention is to give header files names that end
+with '.h'. It is most portable to use only letters, digits, dashes, and
+underscores in header file names, and at most one dot.
+
+* Menu:
+
+* Include Syntax::
+* Include Operation::
+* Search Path::
+* Once-Only Headers::
+* Alternatives to Wrapper #ifndef::
+* Computed Includes::
+* Wrapper Headers::
+* System Headers::
+
+
+File: cpp.info, Node: Include Syntax, Next: Include Operation, Up: Header Files
+
+2.1 Include Syntax
+==================
+
+Both user and system header files are included using the preprocessing
+directive '#include'. It has two variants:
+
+'#include <FILE>'
+ This variant is used for system header files. It searches for a
+ file named FILE in a standard list of system directories. You can
+ prepend directories to this list with the '-I' option (*note
+ Invocation::).
+
+'#include "FILE"'
+ This variant is used for header files of your own program. It
+ searches for a file named FILE first in the directory containing
+ the current file, then in the quote directories and then the same
+ directories used for '<FILE>'. You can prepend directories to the
+ list of quote directories with the '-iquote' option.
+
+ The argument of '#include', whether delimited with quote marks or
+angle brackets, behaves like a string constant in that comments are not
+recognized, and macro names are not expanded. Thus, '#include <x/*y>'
+specifies inclusion of a system header file named 'x/*y'.
+
+ However, if backslashes occur within FILE, they are considered
+ordinary text characters, not escape characters. None of the character
+escape sequences appropriate to string constants in C are processed.
+Thus, '#include "x\n\\y"' specifies a filename containing three
+backslashes. (Some systems interpret '\' as a pathname separator. All
+of these also interpret '/' the same way. It is most portable to use
+only '/'.)
+
+ It is an error if there is anything (other than comments) on the line
+after the file name.
+
+
+File: cpp.info, Node: Include Operation, Next: Search Path, Prev: Include Syntax, Up: Header Files
+
+2.2 Include Operation
+=====================
+
+The '#include' directive works by directing the C preprocessor to scan
+the specified file as input before continuing with the rest of the
+current file. The output from the preprocessor contains the output
+already generated, followed by the output resulting from the included
+file, followed by the output that comes from the text after the
+'#include' directive. For example, if you have a header file 'header.h'
+as follows,
+
+ char *test (void);
+
+and a main program called 'program.c' that uses the header file, like
+this,
+
+ int x;
+ #include "header.h"
+
+ int
+ main (void)
+ {
+ puts (test ());
+ }
+
+the compiler will see the same token stream as it would if 'program.c'
+read
+
+ int x;
+ char *test (void);
+
+ int
+ main (void)
+ {
+ puts (test ());
+ }
+
+ Included files are not limited to declarations and macro definitions;
+those are merely the typical uses. Any fragment of a C program can be
+included from another file. The include file could even contain the
+beginning of a statement that is concluded in the containing file, or
+the end of a statement that was started in the including file. However,
+an included file must consist of complete tokens. Comments and string
+literals which have not been closed by the end of an included file are
+invalid. For error recovery, they are considered to end at the end of
+the file.
+
+ To avoid confusion, it is best if header files contain only complete
+syntactic units--function declarations or definitions, type
+declarations, etc.
+
+ The line following the '#include' directive is always treated as a
+separate line by the C preprocessor, even if the included file lacks a
+final newline.
+
+
+File: cpp.info, Node: Search Path, Next: Once-Only Headers, Prev: Include Operation, Up: Header Files
+
+2.3 Search Path
+===============
+
+GCC looks in several different places for headers. On a normal Unix
+system, if you do not instruct it otherwise, it will look for headers
+requested with '#include <FILE>' in:
+
+ /usr/local/include
+ LIBDIR/gcc/TARGET/VERSION/include
+ /usr/TARGET/include
+ /usr/include
+
+ For C++ programs, it will also look in
+'LIBDIR/../include/c++/VERSION', first. In the above, TARGET is the
+canonical name of the system GCC was configured to compile code for;
+often but not always the same as the canonical name of the system it
+runs on. VERSION is the version of GCC in use.
+
+ You can add to this list with the '-IDIR' command line option. All
+the directories named by '-I' are searched, in left-to-right order,
+_before_ the default directories. The only exception is when 'dir' is
+already searched by default. In this case, the option is ignored and
+the search order for system directories remains unchanged.
+
+ Duplicate directories are removed from the quote and bracket search
+chains before the two chains are merged to make the final search chain.
+Thus, it is possible for a directory to occur twice in the final search
+chain if it was specified in both the quote and bracket chains.
+
+ You can prevent GCC from searching any of the default directories
+with the '-nostdinc' option. This is useful when you are compiling an
+operating system kernel or some other program that does not use the
+standard C library facilities, or the standard C library itself. '-I'
+options are not ignored as described above when '-nostdinc' is in
+effect.
+
+ GCC looks for headers requested with '#include "FILE"' first in the
+directory containing the current file, then in the directories as
+specified by '-iquote' options, then in the same places it would have
+looked for a header requested with angle brackets. For example, if
+'/usr/include/sys/stat.h' contains '#include "types.h"', GCC looks for
+'types.h' first in '/usr/include/sys', then in its usual search path.
+
+ '#line' (*note Line Control::) does not change GCC's idea of the
+directory containing the current file.
+
+ You may put '-I-' at any point in your list of '-I' options. This
+has two effects. First, directories appearing before the '-I-' in the
+list are searched only for headers requested with quote marks.
+Directories after '-I-' are searched for all headers. Second, the
+directory containing the current file is not searched for anything,
+unless it happens to be one of the directories named by an '-I' switch.
+'-I-' is deprecated, '-iquote' should be used instead.
+
+ '-I. -I-' is not the same as no '-I' options at all, and does not
+cause the same behavior for '<>' includes that '""' includes get with no
+special options. '-I.' searches the compiler's current working
+directory for header files. That may or may not be the same as the
+directory containing the current file.
+
+ If you need to look for headers in a directory named '-', write
+'-I./-'.
+
+ There are several more ways to adjust the header search path. They
+are generally less useful. *Note Invocation::.
+
+
+File: cpp.info, Node: Once-Only Headers, Next: Alternatives to Wrapper #ifndef, Prev: Search Path, Up: Header Files
+
+2.4 Once-Only Headers
+=====================
+
+If a header file happens to be included twice, the compiler will process
+its contents twice. This is very likely to cause an error, e.g. when
+the compiler sees the same structure definition twice. Even if it does
+not, it will certainly waste time.
+
+ The standard way to prevent this is to enclose the entire real
+contents of the file in a conditional, like this:
+
+ /* File foo. */
+ #ifndef FILE_FOO_SEEN
+ #define FILE_FOO_SEEN
+
+ THE ENTIRE FILE
+
+ #endif /* !FILE_FOO_SEEN */
+
+ This construct is commonly known as a "wrapper #ifndef". When the
+header is included again, the conditional will be false, because
+'FILE_FOO_SEEN' is defined. The preprocessor will skip over the entire
+contents of the file, and the compiler will not see it twice.
+
+ CPP optimizes even further. It remembers when a header file has a
+wrapper '#ifndef'. If a subsequent '#include' specifies that header,
+and the macro in the '#ifndef' is still defined, it does not bother to
+rescan the file at all.
+
+ You can put comments outside the wrapper. They will not interfere
+with this optimization.
+
+ The macro 'FILE_FOO_SEEN' is called the "controlling macro" or "guard
+macro". In a user header file, the macro name should not begin with
+'_'. In a system header file, it should begin with '__' to avoid
+conflicts with user programs. In any kind of header file, the macro
+name should contain the name of the file and some additional text, to
+avoid conflicts with other header files.
+
+
+File: cpp.info, Node: Alternatives to Wrapper #ifndef, Next: Computed Includes, Prev: Once-Only Headers, Up: Header Files
+
+2.5 Alternatives to Wrapper #ifndef
+===================================
+
+CPP supports two more ways of indicating that a header file should be
+read only once. Neither one is as portable as a wrapper '#ifndef' and
+we recommend you do not use them in new programs, with the caveat that
+'#import' is standard practice in Objective-C.
+
+ CPP supports a variant of '#include' called '#import' which includes
+a file, but does so at most once. If you use '#import' instead of
+'#include', then you don't need the conditionals inside the header file
+to prevent multiple inclusion of the contents. '#import' is standard in
+Objective-C, but is considered a deprecated extension in C and C++.
+
+ '#import' is not a well designed feature. It requires the users of a
+header file to know that it should only be included once. It is much
+better for the header file's implementor to write the file so that users
+don't need to know this. Using a wrapper '#ifndef' accomplishes this
+goal.
+
+ In the present implementation, a single use of '#import' will prevent
+the file from ever being read again, by either '#import' or '#include'.
+You should not rely on this; do not use both '#import' and '#include' to
+refer to the same header file.
+
+ Another way to prevent a header file from being included more than
+once is with the '#pragma once' directive. If '#pragma once' is seen
+when scanning a header file, that file will never be read again, no
+matter what.
+
+ '#pragma once' does not have the problems that '#import' does, but it
+is not recognized by all preprocessors, so you cannot rely on it in a
+portable program.
+
+
+File: cpp.info, Node: Computed Includes, Next: Wrapper Headers, Prev: Alternatives to Wrapper #ifndef, Up: Header Files
+
+2.6 Computed Includes
+=====================
+
+Sometimes it is necessary to select one of several different header
+files to be included into your program. They might specify
+configuration parameters to be used on different sorts of operating
+systems, for instance. You could do this with a series of conditionals,
+
+ #if SYSTEM_1
+ # include "system_1.h"
+ #elif SYSTEM_2
+ # include "system_2.h"
+ #elif SYSTEM_3
+ ...
+ #endif
+
+ That rapidly becomes tedious. Instead, the preprocessor offers the
+ability to use a macro for the header name. This is called a "computed
+include". Instead of writing a header name as the direct argument of
+'#include', you simply put a macro name there instead:
+
+ #define SYSTEM_H "system_1.h"
+ ...
+ #include SYSTEM_H
+
+'SYSTEM_H' will be expanded, and the preprocessor will look for
+'system_1.h' as if the '#include' had been written that way originally.
+'SYSTEM_H' could be defined by your Makefile with a '-D' option.
+
+ You must be careful when you define the macro. '#define' saves
+tokens, not text. The preprocessor has no way of knowing that the macro
+will be used as the argument of '#include', so it generates ordinary
+tokens, not a header name. This is unlikely to cause problems if you
+use double-quote includes, which are close enough to string constants.
+If you use angle brackets, however, you may have trouble.
+
+ The syntax of a computed include is actually a bit more general than
+the above. If the first non-whitespace character after '#include' is
+not '"' or '<', then the entire line is macro-expanded like running text
+would be.
+
+ If the line expands to a single string constant, the contents of that
+string constant are the file to be included. CPP does not re-examine
+the string for embedded quotes, but neither does it process backslash
+escapes in the string. Therefore
+
+ #define HEADER "a\"b"
+ #include HEADER
+
+looks for a file named 'a\"b'. CPP searches for the file according to
+the rules for double-quoted includes.
+
+ If the line expands to a token stream beginning with a '<' token and
+including a '>' token, then the tokens between the '<' and the first '>'
+are combined to form the filename to be included. Any whitespace
+between tokens is reduced to a single space; then any space after the
+initial '<' is retained, but a trailing space before the closing '>' is
+ignored. CPP searches for the file according to the rules for
+angle-bracket includes.
+
+ In either case, if there are any tokens on the line after the file
+name, an error occurs and the directive is not processed. It is also an
+error if the result of expansion does not match either of the two
+expected forms.
+
+ These rules are implementation-defined behavior according to the C
+standard. To minimize the risk of different compilers interpreting your
+computed includes differently, we recommend you use only a single
+object-like macro which expands to a string constant. This will also
+minimize confusion for people reading your program.
+
+
+File: cpp.info, Node: Wrapper Headers, Next: System Headers, Prev: Computed Includes, Up: Header Files
+
+2.7 Wrapper Headers
+===================
+
+Sometimes it is necessary to adjust the contents of a system-provided
+header file without editing it directly. GCC's 'fixincludes' operation
+does this, for example. One way to do that would be to create a new
+header file with the same name and insert it in the search path before
+the original header. That works fine as long as you're willing to
+replace the old header entirely. But what if you want to refer to the
+old header from the new one?
+
+ You cannot simply include the old header with '#include'. That will
+start from the beginning, and find your new header again. If your
+header is not protected from multiple inclusion (*note Once-Only
+Headers::), it will recurse infinitely and cause a fatal error.
+
+ You could include the old header with an absolute pathname:
+ #include "/usr/include/old-header.h"
+This works, but is not clean; should the system headers ever move, you
+would have to edit the new headers to match.
+
+ There is no way to solve this problem within the C standard, but you
+can use the GNU extension '#include_next'. It means, "Include the
+_next_ file with this name". This directive works like '#include'
+except in searching for the specified file: it starts searching the list
+of header file directories _after_ the directory in which the current
+file was found.
+
+ Suppose you specify '-I /usr/local/include', and the list of
+directories to search also includes '/usr/include'; and suppose both
+directories contain 'signal.h'. Ordinary '#include <signal.h>' finds
+the file under '/usr/local/include'. If that file contains
+'#include_next <signal.h>', it starts searching after that directory,
+and finds the file in '/usr/include'.
+
+ '#include_next' does not distinguish between '<FILE>' and '"FILE"'
+inclusion, nor does it check that the file you specify has the same name
+as the current file. It simply looks for the file named, starting with
+the directory in the search path after the one where the current file
+was found.
+
+ The use of '#include_next' can lead to great confusion. We recommend
+it be used only when there is no other alternative. In particular, it
+should not be used in the headers belonging to a specific program; it
+should be used only to make global corrections along the lines of
+'fixincludes'.
+
+
+File: cpp.info, Node: System Headers, Prev: Wrapper Headers, Up: Header Files
+
+2.8 System Headers
+==================
+
+The header files declaring interfaces to the operating system and
+runtime libraries often cannot be written in strictly conforming C.
+Therefore, GCC gives code found in "system headers" special treatment.
+All warnings, other than those generated by '#warning' (*note
+Diagnostics::), are suppressed while GCC is processing a system header.
+Macros defined in a system header are immune to a few warnings wherever
+they are expanded. This immunity is granted on an ad-hoc basis, when we
+find that a warning generates lots of false positives because of code in
+macros defined in system headers.
+
+ Normally, only the headers found in specific directories are
+considered system headers. These directories are determined when GCC is
+compiled. There are, however, two ways to make normal headers into
+system headers.
+
+ The '-isystem' command line option adds its argument to the list of
+directories to search for headers, just like '-I'. Any headers found in
+that directory will be considered system headers.
+
+ All directories named by '-isystem' are searched _after_ all
+directories named by '-I', no matter what their order was on the command
+line. If the same directory is named by both '-I' and '-isystem', the
+'-I' option is ignored. GCC provides an informative message when this
+occurs if '-v' is used.
+
+ There is also a directive, '#pragma GCC system_header', which tells
+GCC to consider the rest of the current include file a system header, no
+matter where it was found. Code that comes before the '#pragma' in the
+file will not be affected. '#pragma GCC system_header' has no effect in
+the primary source file.
+
+ On very old systems, some of the pre-defined system header
+directories get even more special treatment. GNU C++ considers code in
+headers found in those directories to be surrounded by an 'extern "C"'
+block. There is no way to request this behavior with a '#pragma', or
+from the command line.
+
+
+File: cpp.info, Node: Macros, Next: Conditionals, Prev: Header Files, Up: Top
+
+3 Macros
+********
+
+A "macro" is a fragment of code which has been given a name. Whenever
+the name is used, it is replaced by the contents of the macro. There
+are two kinds of macros. They differ mostly in what they look like when
+they are used. "Object-like" macros resemble data objects when used,
+"function-like" macros resemble function calls.
+
+ You may define any valid identifier as a macro, even if it is a C
+keyword. The preprocessor does not know anything about keywords. This
+can be useful if you wish to hide a keyword such as 'const' from an
+older compiler that does not understand it. However, the preprocessor
+operator 'defined' (*note Defined::) can never be defined as a macro,
+and C++'s named operators (*note C++ Named Operators::) cannot be macros
+when you are compiling C++.
+
+* Menu:
+
+* Object-like Macros::
+* Function-like Macros::
+* Macro Arguments::
+* Stringification::
+* Concatenation::
+* Variadic Macros::
+* Predefined Macros::
+* Undefining and Redefining Macros::
+* Directives Within Macro Arguments::
+* Macro Pitfalls::
+
+
+File: cpp.info, Node: Object-like Macros, Next: Function-like Macros, Up: Macros
+
+3.1 Object-like Macros
+======================
+
+An "object-like macro" is a simple identifier which will be replaced by
+a code fragment. It is called object-like because it looks like a data
+object in code that uses it. They are most commonly used to give
+symbolic names to numeric constants.
+
+ You create macros with the '#define' directive. '#define' is
+followed by the name of the macro and then the token sequence it should
+be an abbreviation for, which is variously referred to as the macro's
+"body", "expansion" or "replacement list". For example,
+
+ #define BUFFER_SIZE 1024
+
+defines a macro named 'BUFFER_SIZE' as an abbreviation for the token
+'1024'. If somewhere after this '#define' directive there comes a C
+statement of the form
+
+ foo = (char *) malloc (BUFFER_SIZE);
+
+then the C preprocessor will recognize and "expand" the macro
+'BUFFER_SIZE'. The C compiler will see the same tokens as it would if
+you had written
+
+ foo = (char *) malloc (1024);
+
+ By convention, macro names are written in uppercase. Programs are
+easier to read when it is possible to tell at a glance which names are
+macros.
+
+ The macro's body ends at the end of the '#define' line. You may
+continue the definition onto multiple lines, if necessary, using
+backslash-newline. When the macro is expanded, however, it will all
+come out on one line. For example,
+
+ #define NUMBERS 1, \
+ 2, \
+ 3
+ int x[] = { NUMBERS };
+ ==> int x[] = { 1, 2, 3 };
+
+The most common visible consequence of this is surprising line numbers
+in error messages.
+
+ There is no restriction on what can go in a macro body provided it
+decomposes into valid preprocessing tokens. Parentheses need not
+balance, and the body need not resemble valid C code. (If it does not,
+you may get error messages from the C compiler when you use the macro.)
+
+ The C preprocessor scans your program sequentially. Macro
+definitions take effect at the place you write them. Therefore, the
+following input to the C preprocessor
+
+ foo = X;
+ #define X 4
+ bar = X;
+
+produces
+
+ foo = X;
+ bar = 4;
+
+ When the preprocessor expands a macro name, the macro's expansion
+replaces the macro invocation, then the expansion is examined for more
+macros to expand. For example,
+
+ #define TABLESIZE BUFSIZE
+ #define BUFSIZE 1024
+ TABLESIZE
+ ==> BUFSIZE
+ ==> 1024
+
+'TABLESIZE' is expanded first to produce 'BUFSIZE', then that macro is
+expanded to produce the final result, '1024'.
+
+ Notice that 'BUFSIZE' was not defined when 'TABLESIZE' was defined.
+The '#define' for 'TABLESIZE' uses exactly the expansion you specify--in
+this case, 'BUFSIZE'--and does not check to see whether it too contains
+macro names. Only when you _use_ 'TABLESIZE' is the result of its
+expansion scanned for more macro names.
+
+ This makes a difference if you change the definition of 'BUFSIZE' at
+some point in the source file. 'TABLESIZE', defined as shown, will
+always expand using the definition of 'BUFSIZE' that is currently in
+effect:
+
+ #define BUFSIZE 1020
+ #define TABLESIZE BUFSIZE
+ #undef BUFSIZE
+ #define BUFSIZE 37
+
+Now 'TABLESIZE' expands (in two stages) to '37'.
+
+ If the expansion of a macro contains its own name, either directly or
+via intermediate macros, it is not expanded again when the expansion is
+examined for more macros. This prevents infinite recursion. *Note
+Self-Referential Macros::, for the precise details.
+
+
+File: cpp.info, Node: Function-like Macros, Next: Macro Arguments, Prev: Object-like Macros, Up: Macros
+
+3.2 Function-like Macros
+========================
+
+You can also define macros whose use looks like a function call. These
+are called "function-like macros". To define a function-like macro, you
+use the same '#define' directive, but you put a pair of parentheses
+immediately after the macro name. For example,
+
+ #define lang_init() c_init()
+ lang_init()
+ ==> c_init()
+
+ A function-like macro is only expanded if its name appears with a
+pair of parentheses after it. If you write just the name, it is left
+alone. This can be useful when you have a function and a macro of the
+same name, and you wish to use the function sometimes.
+
+ extern void foo(void);
+ #define foo() /* optimized inline version */
+ ...
+ foo();
+ funcptr = foo;
+
+ Here the call to 'foo()' will use the macro, but the function pointer
+will get the address of the real function. If the macro were to be
+expanded, it would cause a syntax error.
+
+ If you put spaces between the macro name and the parentheses in the
+macro definition, that does not define a function-like macro, it defines
+an object-like macro whose expansion happens to begin with a pair of
+parentheses.
+
+ #define lang_init () c_init()
+ lang_init()
+ ==> () c_init()()
+
+ The first two pairs of parentheses in this expansion come from the
+macro. The third is the pair that was originally after the macro
+invocation. Since 'lang_init' is an object-like macro, it does not
+consume those parentheses.
+
+
+File: cpp.info, Node: Macro Arguments, Next: Stringification, Prev: Function-like Macros, Up: Macros
+
+3.3 Macro Arguments
+===================
+
+Function-like macros can take "arguments", just like true functions. To
+define a macro that uses arguments, you insert "parameters" between the
+pair of parentheses in the macro definition that make the macro
+function-like. The parameters must be valid C identifiers, separated by
+commas and optionally whitespace.
+
+ To invoke a macro that takes arguments, you write the name of the
+macro followed by a list of "actual arguments" in parentheses, separated
+by commas. The invocation of the macro need not be restricted to a
+single logical line--it can cross as many lines in the source file as
+you wish. The number of arguments you give must match the number of
+parameters in the macro definition. When the macro is expanded, each
+use of a parameter in its body is replaced by the tokens of the
+corresponding argument. (You need not use all of the parameters in the
+macro body.)
+
+ As an example, here is a macro that computes the minimum of two
+numeric values, as it is defined in many C programs, and some uses.
+
+ #define min(X, Y) ((X) < (Y) ? (X) : (Y))
+ x = min(a, b); ==> x = ((a) < (b) ? (a) : (b));
+ y = min(1, 2); ==> y = ((1) < (2) ? (1) : (2));
+ z = min(a + 28, *p); ==> z = ((a + 28) < (*p) ? (a + 28) : (*p));
+
+(In this small example you can already see several of the dangers of
+macro arguments. *Note Macro Pitfalls::, for detailed explanations.)
+
+ Leading and trailing whitespace in each argument is dropped, and all
+whitespace between the tokens of an argument is reduced to a single
+space. Parentheses within each argument must balance; a comma within
+such parentheses does not end the argument. However, there is no
+requirement for square brackets or braces to balance, and they do not
+prevent a comma from separating arguments. Thus,
+
+ macro (array[x = y, x + 1])
+
+passes two arguments to 'macro': 'array[x = y' and 'x + 1]'. If you
+want to supply 'array[x = y, x + 1]' as an argument, you can write it as
+'array[(x = y, x + 1)]', which is equivalent C code.
+
+ All arguments to a macro are completely macro-expanded before they
+are substituted into the macro body. After substitution, the complete
+text is scanned again for macros to expand, including the arguments.
+This rule may seem strange, but it is carefully designed so you need not
+worry about whether any function call is actually a macro invocation.
+You can run into trouble if you try to be too clever, though. *Note
+Argument Prescan::, for detailed discussion.
+
+ For example, 'min (min (a, b), c)' is first expanded to
+
+ min (((a) < (b) ? (a) : (b)), (c))
+
+and then to
+
+ ((((a) < (b) ? (a) : (b))) < (c)
+ ? (((a) < (b) ? (a) : (b)))
+ : (c))
+
+(Line breaks shown here for clarity would not actually be generated.)
+
+ You can leave macro arguments empty; this is not an error to the
+preprocessor (but many macros will then expand to invalid code). You
+cannot leave out arguments entirely; if a macro takes two arguments,
+there must be exactly one comma at the top level of its argument list.
+Here are some silly examples using 'min':
+
+ min(, b) ==> (( ) < (b) ? ( ) : (b))
+ min(a, ) ==> ((a ) < ( ) ? (a ) : ( ))
+ min(,) ==> (( ) < ( ) ? ( ) : ( ))
+ min((,),) ==> (((,)) < ( ) ? ((,)) : ( ))
+
+ min() error-> macro "min" requires 2 arguments, but only 1 given
+ min(,,) error-> macro "min" passed 3 arguments, but takes just 2
+
+ Whitespace is not a preprocessing token, so if a macro 'foo' takes
+one argument, 'foo ()' and 'foo ( )' both supply it an empty argument.
+Previous GNU preprocessor implementations and documentation were
+incorrect on this point, insisting that a function-like macro that takes
+a single argument be passed a space if an empty argument was required.
+
+ Macro parameters appearing inside string literals are not replaced by
+their corresponding actual arguments.
+
+ #define foo(x) x, "x"
+ foo(bar) ==> bar, "x"
+
+
+File: cpp.info, Node: Stringification, Next: Concatenation, Prev: Macro Arguments, Up: Macros
+
+3.4 Stringification
+===================
+
+Sometimes you may want to convert a macro argument into a string
+constant. Parameters are not replaced inside string constants, but you
+can use the '#' preprocessing operator instead. When a macro parameter
+is used with a leading '#', the preprocessor replaces it with the
+literal text of the actual argument, converted to a string constant.
+Unlike normal parameter replacement, the argument is not macro-expanded
+first. This is called "stringification".
+
+ There is no way to combine an argument with surrounding text and
+stringify it all together. Instead, you can write a series of adjacent
+string constants and stringified arguments. The preprocessor will
+replace the stringified arguments with string constants. The C compiler
+will then combine all the adjacent string constants into one long
+string.
+
+ Here is an example of a macro definition that uses stringification:
+
+ #define WARN_IF(EXP) \
+ do { if (EXP) \
+ fprintf (stderr, "Warning: " #EXP "\n"); } \
+ while (0)
+ WARN_IF (x == 0);
+ ==> do { if (x == 0)
+ fprintf (stderr, "Warning: " "x == 0" "\n"); } while (0);
+
+The argument for 'EXP' is substituted once, as-is, into the 'if'
+statement, and once, stringified, into the argument to 'fprintf'. If
+'x' were a macro, it would be expanded in the 'if' statement, but not in
+the string.
+
+ The 'do' and 'while (0)' are a kludge to make it possible to write
+'WARN_IF (ARG);', which the resemblance of 'WARN_IF' to a function would
+make C programmers want to do; see *note Swallowing the Semicolon::.
+
+ Stringification in C involves more than putting double-quote
+characters around the fragment. The preprocessor backslash-escapes the
+quotes surrounding embedded string constants, and all backslashes within
+string and character constants, in order to get a valid C string
+constant with the proper contents. Thus, stringifying 'p = "foo\n";'
+results in "p = \"foo\\n\";". However, backslashes that are not inside
+string or character constants are not duplicated: '\n' by itself
+stringifies to "\n".
+
+ All leading and trailing whitespace in text being stringified is
+ignored. Any sequence of whitespace in the middle of the text is
+converted to a single space in the stringified result. Comments are
+replaced by whitespace long before stringification happens, so they
+never appear in stringified text.
+
+ There is no way to convert a macro argument into a character
+constant.
+
+ If you want to stringify the result of expansion of a macro argument,
+you have to use two levels of macros.
+
+ #define xstr(s) str(s)
+ #define str(s) #s
+ #define foo 4
+ str (foo)
+ ==> "foo"
+ xstr (foo)
+ ==> xstr (4)
+ ==> str (4)
+ ==> "4"
+
+ 's' is stringified when it is used in 'str', so it is not
+macro-expanded first. But 's' is an ordinary argument to 'xstr', so it
+is completely macro-expanded before 'xstr' itself is expanded (*note
+Argument Prescan::). Therefore, by the time 'str' gets to its argument,
+it has already been macro-expanded.
+
+
+File: cpp.info, Node: Concatenation, Next: Variadic Macros, Prev: Stringification, Up: Macros
+
+3.5 Concatenation
+=================
+
+It is often useful to merge two tokens into one while expanding macros.
+This is called "token pasting" or "token concatenation". The '##'
+preprocessing operator performs token pasting. When a macro is
+expanded, the two tokens on either side of each '##' operator are
+combined into a single token, which then replaces the '##' and the two
+original tokens in the macro expansion. Usually both will be
+identifiers, or one will be an identifier and the other a preprocessing
+number. When pasted, they make a longer identifier. This isn't the
+only valid case. It is also possible to concatenate two numbers (or a
+number and a name, such as '1.5' and 'e3') into a number. Also,
+multi-character operators such as '+=' can be formed by token pasting.
+
+ However, two tokens that don't together form a valid token cannot be
+pasted together. For example, you cannot concatenate 'x' with '+' in
+either order. If you try, the preprocessor issues a warning and emits
+the two tokens. Whether it puts white space between the tokens is
+undefined. It is common to find unnecessary uses of '##' in complex
+macros. If you get this warning, it is likely that you can simply
+remove the '##'.
+
+ Both the tokens combined by '##' could come from the macro body, but
+you could just as well write them as one token in the first place.
+Token pasting is most useful when one or both of the tokens comes from a
+macro argument. If either of the tokens next to an '##' is a parameter
+name, it is replaced by its actual argument before '##' executes. As
+with stringification, the actual argument is not macro-expanded first.
+If the argument is empty, that '##' has no effect.
+
+ Keep in mind that the C preprocessor converts comments to whitespace
+before macros are even considered. Therefore, you cannot create a
+comment by concatenating '/' and '*'. You can put as much whitespace
+between '##' and its operands as you like, including comments, and you
+can put comments in arguments that will be concatenated. However, it is
+an error if '##' appears at either end of a macro body.
+
+ Consider a C program that interprets named commands. There probably
+needs to be a table of commands, perhaps an array of structures declared
+as follows:
+
+ struct command
+ {
+ char *name;
+ void (*function) (void);
+ };
+
+ struct command commands[] =
+ {
+ { "quit", quit_command },
+ { "help", help_command },
+ ...
+ };
+
+ It would be cleaner not to have to give each command name twice, once
+in the string constant and once in the function name. A macro which
+takes the name of a command as an argument can make this unnecessary.
+The string constant can be created with stringification, and the
+function name by concatenating the argument with '_command'. Here is
+how it is done:
+
+ #define COMMAND(NAME) { #NAME, NAME ## _command }
+
+ struct command commands[] =
+ {
+ COMMAND (quit),
+ COMMAND (help),
+ ...
+ };
+
+
+File: cpp.info, Node: Variadic Macros, Next: Predefined Macros, Prev: Concatenation, Up: Macros
+
+3.6 Variadic Macros
+===================
+
+A macro can be declared to accept a variable number of arguments much as
+a function can. The syntax for defining the macro is similar to that of
+a function. Here is an example:
+
+ #define eprintf(...) fprintf (stderr, __VA_ARGS__)
+
+ This kind of macro is called "variadic". When the macro is invoked,
+all the tokens in its argument list after the last named argument (this
+macro has none), including any commas, become the "variable argument".
+This sequence of tokens replaces the identifier '__VA_ARGS__' in the
+macro body wherever it appears. Thus, we have this expansion:
+
+ eprintf ("%s:%d: ", input_file, lineno)
+ ==> fprintf (stderr, "%s:%d: ", input_file, lineno)
+
+ The variable argument is completely macro-expanded before it is
+inserted into the macro expansion, just like an ordinary argument. You
+may use the '#' and '##' operators to stringify the variable argument or
+to paste its leading or trailing token with another token. (But see
+below for an important special case for '##'.)
+
+ If your macro is complicated, you may want a more descriptive name
+for the variable argument than '__VA_ARGS__'. CPP permits this, as an
+extension. You may write an argument name immediately before the '...';
+that name is used for the variable argument. The 'eprintf' macro above
+could be written
+
+ #define eprintf(args...) fprintf (stderr, args)
+
+using this extension. You cannot use '__VA_ARGS__' and this extension
+in the same macro.
+
+ You can have named arguments as well as variable arguments in a
+variadic macro. We could define 'eprintf' like this, instead:
+
+ #define eprintf(format, ...) fprintf (stderr, format, __VA_ARGS__)
+
+This formulation looks more descriptive, but unfortunately it is less
+flexible: you must now supply at least one argument after the format
+string. In standard C, you cannot omit the comma separating the named
+argument from the variable arguments. Furthermore, if you leave the
+variable argument empty, you will get a syntax error, because there will
+be an extra comma after the format string.
+
+ eprintf("success!\n", );
+ ==> fprintf(stderr, "success!\n", );
+
+ GNU CPP has a pair of extensions which deal with this problem.
+First, you are allowed to leave the variable argument out entirely:
+
+ eprintf ("success!\n")
+ ==> fprintf(stderr, "success!\n", );
+
+Second, the '##' token paste operator has a special meaning when placed
+between a comma and a variable argument. If you write
+
+ #define eprintf(format, ...) fprintf (stderr, format, ##__VA_ARGS__)
+
+and the variable argument is left out when the 'eprintf' macro is used,
+then the comma before the '##' will be deleted. This does _not_ happen
+if you pass an empty argument, nor does it happen if the token preceding
+'##' is anything other than a comma.
+
+ eprintf ("success!\n")
+ ==> fprintf(stderr, "success!\n");
+
+The above explanation is ambiguous about the case where the only macro
+parameter is a variable arguments parameter, as it is meaningless to try
+to distinguish whether no argument at all is an empty argument or a
+missing argument. In this case the C99 standard is clear that the comma
+must remain, however the existing GCC extension used to swallow the
+comma. So CPP retains the comma when conforming to a specific C
+standard, and drops it otherwise.
+
+ C99 mandates that the only place the identifier '__VA_ARGS__' can
+appear is in the replacement list of a variadic macro. It may not be
+used as a macro name, macro argument name, or within a different type of
+macro. It may also be forbidden in open text; the standard is
+ambiguous. We recommend you avoid using it except for its defined
+purpose.
+
+ Variadic macros are a new feature in C99. GNU CPP has supported them
+for a long time, but only with a named variable argument ('args...', not
+'...' and '__VA_ARGS__'). If you are concerned with portability to
+previous versions of GCC, you should use only named variable arguments.
+On the other hand, if you are concerned with portability to other
+conforming implementations of C99, you should use only '__VA_ARGS__'.
+
+ Previous versions of CPP implemented the comma-deletion extension
+much more generally. We have restricted it in this release to minimize
+the differences from C99. To get the same effect with both this and
+previous versions of GCC, the token preceding the special '##' must be a
+comma, and there must be white space between that comma and whatever
+comes immediately before it:
+
+ #define eprintf(format, args...) fprintf (stderr, format , ##args)
+
+*Note Differences from previous versions::, for the gory details.
+
+
+File: cpp.info, Node: Predefined Macros, Next: Undefining and Redefining Macros, Prev: Variadic Macros, Up: Macros
+
+3.7 Predefined Macros
+=====================
+
+Several object-like macros are predefined; you use them without
+supplying their definitions. They fall into three classes: standard,
+common, and system-specific.
+
+ In C++, there is a fourth category, the named operators. They act
+like predefined macros, but you cannot undefine them.
+
+* Menu:
+
+* Standard Predefined Macros::
+* Common Predefined Macros::
+* System-specific Predefined Macros::
+* C++ Named Operators::
+
+
+File: cpp.info, Node: Standard Predefined Macros, Next: Common Predefined Macros, Up: Predefined Macros
+
+3.7.1 Standard Predefined Macros
+--------------------------------
+
+The standard predefined macros are specified by the relevant language
+standards, so they are available with all compilers that implement those
+standards. Older compilers may not provide all of them. Their names
+all start with double underscores.
+
+'__FILE__'
+ This macro expands to the name of the current input file, in the
+ form of a C string constant. This is the path by which the
+ preprocessor opened the file, not the short name specified in
+ '#include' or as the input file name argument. For example,
+ '"/usr/local/include/myheader.h"' is a possible expansion of this
+ macro.
+
+'__LINE__'
+ This macro expands to the current input line number, in the form of
+ a decimal integer constant. While we call it a predefined macro,
+ it's a pretty strange macro, since its "definition" changes with
+ each new line of source code.
+
+ '__FILE__' and '__LINE__' are useful in generating an error message
+to report an inconsistency detected by the program; the message can
+state the source line at which the inconsistency was detected. For
+example,
+
+ fprintf (stderr, "Internal error: "
+ "negative string length "
+ "%d at %s, line %d.",
+ length, __FILE__, __LINE__);
+
+ An '#include' directive changes the expansions of '__FILE__' and
+'__LINE__' to correspond to the included file. At the end of that file,
+when processing resumes on the input file that contained the '#include'
+directive, the expansions of '__FILE__' and '__LINE__' revert to the
+values they had before the '#include' (but '__LINE__' is then
+incremented by one as processing moves to the line after the
+'#include').
+
+ A '#line' directive changes '__LINE__', and may change '__FILE__' as
+well. *Note Line Control::.
+
+ C99 introduces '__func__', and GCC has provided '__FUNCTION__' for a
+long time. Both of these are strings containing the name of the current
+function (there are slight semantic differences; see the GCC manual).
+Neither of them is a macro; the preprocessor does not know the name of
+the current function. They tend to be useful in conjunction with
+'__FILE__' and '__LINE__', though.
+
+'__DATE__'
+ This macro expands to a string constant that describes the date on
+ which the preprocessor is being run. The string constant contains
+ eleven characters and looks like '"Feb 12 1996"'. If the day of
+ the month is less than 10, it is padded with a space on the left.
+
+ If GCC cannot determine the current date, it will emit a warning
+ message (once per compilation) and '__DATE__' will expand to
+ '"??? ?? ????"'.
+
+'__TIME__'
+ This macro expands to a string constant that describes the time at
+ which the preprocessor is being run. The string constant contains
+ eight characters and looks like '"23:59:01"'.
+
+ If GCC cannot determine the current time, it will emit a warning
+ message (once per compilation) and '__TIME__' will expand to
+ '"??:??:??"'.
+
+'__STDC__'
+ In normal operation, this macro expands to the constant 1, to
+ signify that this compiler conforms to ISO Standard C. If GNU CPP
+ is used with a compiler other than GCC, this is not necessarily
+ true; however, the preprocessor always conforms to the standard
+ unless the '-traditional-cpp' option is used.
+
+ This macro is not defined if the '-traditional-cpp' option is used.
+
+ On some hosts, the system compiler uses a different convention,
+ where '__STDC__' is normally 0, but is 1 if the user specifies
+ strict conformance to the C Standard. CPP follows the host
+ convention when processing system header files, but when processing
+ user files '__STDC__' is always 1. This has been reported to cause
+ problems; for instance, some versions of Solaris provide X Windows
+ headers that expect '__STDC__' to be either undefined or 1. *Note
+ Invocation::.
+
+'__STDC_VERSION__'
+ This macro expands to the C Standard's version number, a long
+ integer constant of the form 'YYYYMML' where YYYY and MM are the
+ year and month of the Standard version. This signifies which
+ version of the C Standard the compiler conforms to. Like
+ '__STDC__', this is not necessarily accurate for the entire
+ implementation, unless GNU CPP is being used with GCC.
+
+ The value '199409L' signifies the 1989 C standard as amended in
+ 1994, which is the current default; the value '199901L' signifies
+ the 1999 revision of the C standard. Support for the 1999 revision
+ is not yet complete.
+
+ This macro is not defined if the '-traditional-cpp' option is used,
+ nor when compiling C++ or Objective-C.
+
+'__STDC_HOSTED__'
+ This macro is defined, with value 1, if the compiler's target is a
+ "hosted environment". A hosted environment has the complete
+ facilities of the standard C library available.
+
+'__cplusplus'
+ This macro is defined when the C++ compiler is in use. You can use
+ '__cplusplus' to test whether a header is compiled by a C compiler
+ or a C++ compiler. This macro is similar to '__STDC_VERSION__', in
+ that it expands to a version number. Depending on the language
+ standard selected, the value of the macro is '199711L', as mandated
+ by the 1998 C++ standard; '201103L', per the 2011 C++ standard; an
+ unspecified value strictly larger than '201103L' for the
+ experimental languages enabled by '-std=c++1y' and '-std=gnu++1y'.
+
+'__OBJC__'
+ This macro is defined, with value 1, when the Objective-C compiler
+ is in use. You can use '__OBJC__' to test whether a header is
+ compiled by a C compiler or an Objective-C compiler.
+
+'__ASSEMBLER__'
+ This macro is defined with value 1 when preprocessing assembly
+ language.
+
+
+File: cpp.info, Node: Common Predefined Macros, Next: System-specific Predefined Macros, Prev: Standard Predefined Macros, Up: Predefined Macros
+
+3.7.2 Common Predefined Macros
+------------------------------
+
+The common predefined macros are GNU C extensions. They are available
+with the same meanings regardless of the machine or operating system on
+which you are using GNU C or GNU Fortran. Their names all start with
+double underscores.
+
+'__COUNTER__'
+ This macro expands to sequential integral values starting from 0.
+ In conjunction with the '##' operator, this provides a convenient
+ means to generate unique identifiers. Care must be taken to ensure
+ that '__COUNTER__' is not expanded prior to inclusion of
+ precompiled headers which use it. Otherwise, the precompiled
+ headers will not be used.
+
+'__GFORTRAN__'
+ The GNU Fortran compiler defines this.
+
+'__GNUC__'
+'__GNUC_MINOR__'
+'__GNUC_PATCHLEVEL__'
+ These macros are defined by all GNU compilers that use the C
+ preprocessor: C, C++, Objective-C and Fortran. Their values are
+ the major version, minor version, and patch level of the compiler,
+ as integer constants. For example, GCC 3.2.1 will define
+ '__GNUC__' to 3, '__GNUC_MINOR__' to 2, and '__GNUC_PATCHLEVEL__'
+ to 1. These macros are also defined if you invoke the preprocessor
+ directly.
+
+ '__GNUC_PATCHLEVEL__' is new to GCC 3.0; it is also present in the
+ widely-used development snapshots leading up to 3.0 (which identify
+ themselves as GCC 2.96 or 2.97, depending on which snapshot you
+ have).
+
+ If all you need to know is whether or not your program is being
+ compiled by GCC, or a non-GCC compiler that claims to accept the
+ GNU C dialects, you can simply test '__GNUC__'. If you need to
+ write code which depends on a specific version, you must be more
+ careful. Each time the minor version is increased, the patch level
+ is reset to zero; each time the major version is increased (which
+ happens rarely), the minor version and patch level are reset. If
+ you wish to use the predefined macros directly in the conditional,
+ you will need to write it like this:
+
+ /* Test for GCC > 3.2.0 */
+ #if __GNUC__ > 3 || \
+ (__GNUC__ == 3 && (__GNUC_MINOR__ > 2 || \
+ (__GNUC_MINOR__ == 2 && \
+ __GNUC_PATCHLEVEL__ > 0))
+
+ Another approach is to use the predefined macros to calculate a
+ single number, then compare that against a threshold:
+
+ #define GCC_VERSION (__GNUC__ * 10000 \
+ + __GNUC_MINOR__ * 100 \
+ + __GNUC_PATCHLEVEL__)
+ ...
+ /* Test for GCC > 3.2.0 */
+ #if GCC_VERSION > 30200
+
+ Many people find this form easier to understand.
+
+'__GNUG__'
+ The GNU C++ compiler defines this. Testing it is equivalent to
+ testing '(__GNUC__ && __cplusplus)'.
+
+'__STRICT_ANSI__'
+ GCC defines this macro if and only if the '-ansi' switch, or a
+ '-std' switch specifying strict conformance to some version of ISO
+ C or ISO C++, was specified when GCC was invoked. It is defined to
+ '1'. This macro exists primarily to direct GNU libc's header files
+ to restrict their definitions to the minimal set found in the 1989
+ C standard.
+
+'__BASE_FILE__'
+ This macro expands to the name of the main input file, in the form
+ of a C string constant. This is the source file that was specified
+ on the command line of the preprocessor or C compiler.
+
+'__INCLUDE_LEVEL__'
+ This macro expands to a decimal integer constant that represents
+ the depth of nesting in include files. The value of this macro is
+ incremented on every '#include' directive and decremented at the
+ end of every included file. It starts out at 0, its value within
+ the base file specified on the command line.
+
+'__ELF__'
+ This macro is defined if the target uses the ELF object format.
+
+'__VERSION__'
+ This macro expands to a string constant which describes the version
+ of the compiler in use. You should not rely on its contents having
+ any particular form, but it can be counted on to contain at least
+ the release number.
+
+'__OPTIMIZE__'
+'__OPTIMIZE_SIZE__'
+'__NO_INLINE__'
+ These macros describe the compilation mode. '__OPTIMIZE__' is
+ defined in all optimizing compilations. '__OPTIMIZE_SIZE__' is
+ defined if the compiler is optimizing for size, not speed.
+ '__NO_INLINE__' is defined if no functions will be inlined into
+ their callers (when not optimizing, or when inlining has been
+ specifically disabled by '-fno-inline').
+
+ These macros cause certain GNU header files to provide optimized
+ definitions, using macros or inline functions, of system library
+ functions. You should not use these macros in any way unless you
+ make sure that programs will execute with the same effect whether
+ or not they are defined. If they are defined, their value is 1.
+
+'__GNUC_GNU_INLINE__'
+ GCC defines this macro if functions declared 'inline' will be
+ handled in GCC's traditional gnu90 mode. Object files will contain
+ externally visible definitions of all functions declared 'inline'
+ without 'extern' or 'static'. They will not contain any
+ definitions of any functions declared 'extern inline'.
+
+'__GNUC_STDC_INLINE__'
+ GCC defines this macro if functions declared 'inline' will be
+ handled according to the ISO C99 standard. Object files will
+ contain externally visible definitions of all functions declared
+ 'extern inline'. They will not contain definitions of any
+ functions declared 'inline' without 'extern'.
+
+ If this macro is defined, GCC supports the 'gnu_inline' function
+ attribute as a way to always get the gnu90 behavior. Support for
+ this and '__GNUC_GNU_INLINE__' was added in GCC 4.1.3. If neither
+ macro is defined, an older version of GCC is being used: 'inline'
+ functions will be compiled in gnu90 mode, and the 'gnu_inline'
+ function attribute will not be recognized.
+
+'__CHAR_UNSIGNED__'
+ GCC defines this macro if and only if the data type 'char' is
+ unsigned on the target machine. It exists to cause the standard
+ header file 'limits.h' to work correctly. You should not use this
+ macro yourself; instead, refer to the standard macros defined in
+ 'limits.h'.
+
+'__WCHAR_UNSIGNED__'
+ Like '__CHAR_UNSIGNED__', this macro is defined if and only if the
+ data type 'wchar_t' is unsigned and the front-end is in C++ mode.
+
+'__REGISTER_PREFIX__'
+ This macro expands to a single token (not a string constant) which
+ is the prefix applied to CPU register names in assembly language
+ for this target. You can use it to write assembly that is usable
+ in multiple environments. For example, in the 'm68k-aout'
+ environment it expands to nothing, but in the 'm68k-coff'
+ environment it expands to a single '%'.
+
+'__USER_LABEL_PREFIX__'
+ This macro expands to a single token which is the prefix applied to
+ user labels (symbols visible to C code) in assembly. For example,
+ in the 'm68k-aout' environment it expands to an '_', but in the
+ 'm68k-coff' environment it expands to nothing.
+
+ This macro will have the correct definition even if
+ '-f(no-)underscores' is in use, but it will not be correct if
+ target-specific options that adjust this prefix are used (e.g. the
+ OSF/rose '-mno-underscores' option).
+
+'__SIZE_TYPE__'
+'__PTRDIFF_TYPE__'
+'__WCHAR_TYPE__'
+'__WINT_TYPE__'
+'__INTMAX_TYPE__'
+'__UINTMAX_TYPE__'
+'__SIG_ATOMIC_TYPE__'
+'__INT8_TYPE__'
+'__INT16_TYPE__'
+'__INT32_TYPE__'
+'__INT64_TYPE__'
+'__UINT8_TYPE__'
+'__UINT16_TYPE__'
+'__UINT32_TYPE__'
+'__UINT64_TYPE__'
+'__INT_LEAST8_TYPE__'
+'__INT_LEAST16_TYPE__'
+'__INT_LEAST32_TYPE__'
+'__INT_LEAST64_TYPE__'
+'__UINT_LEAST8_TYPE__'
+'__UINT_LEAST16_TYPE__'
+'__UINT_LEAST32_TYPE__'
+'__UINT_LEAST64_TYPE__'
+'__INT_FAST8_TYPE__'
+'__INT_FAST16_TYPE__'
+'__INT_FAST32_TYPE__'
+'__INT_FAST64_TYPE__'
+'__UINT_FAST8_TYPE__'
+'__UINT_FAST16_TYPE__'
+'__UINT_FAST32_TYPE__'
+'__UINT_FAST64_TYPE__'
+'__INTPTR_TYPE__'
+'__UINTPTR_TYPE__'
+ These macros are defined to the correct underlying types for the
+ 'size_t', 'ptrdiff_t', 'wchar_t', 'wint_t', 'intmax_t',
+ 'uintmax_t', 'sig_atomic_t', 'int8_t', 'int16_t', 'int32_t',
+ 'int64_t', 'uint8_t', 'uint16_t', 'uint32_t', 'uint64_t',
+ 'int_least8_t', 'int_least16_t', 'int_least32_t', 'int_least64_t',
+ 'uint_least8_t', 'uint_least16_t', 'uint_least32_t',
+ 'uint_least64_t', 'int_fast8_t', 'int_fast16_t', 'int_fast32_t',
+ 'int_fast64_t', 'uint_fast8_t', 'uint_fast16_t', 'uint_fast32_t',
+ 'uint_fast64_t', 'intptr_t', and 'uintptr_t' typedefs,
+ respectively. They exist to make the standard header files
+ 'stddef.h', 'stdint.h', and 'wchar.h' work correctly. You should
+ not use these macros directly; instead, include the appropriate
+ headers and use the typedefs. Some of these macros may not be
+ defined on particular systems if GCC does not provide a 'stdint.h'
+ header on those systems.
+
+'__CHAR_BIT__'
+ Defined to the number of bits used in the representation of the
+ 'char' data type. It exists to make the standard header given
+ numerical limits work correctly. You should not use this macro
+ directly; instead, include the appropriate headers.
+
+'__SCHAR_MAX__'
+'__WCHAR_MAX__'
+'__SHRT_MAX__'
+'__INT_MAX__'
+'__LONG_MAX__'
+'__LONG_LONG_MAX__'
+'__WINT_MAX__'
+'__SIZE_MAX__'
+'__PTRDIFF_MAX__'
+'__INTMAX_MAX__'
+'__UINTMAX_MAX__'
+'__SIG_ATOMIC_MAX__'
+'__INT8_MAX__'
+'__INT16_MAX__'
+'__INT32_MAX__'
+'__INT64_MAX__'
+'__UINT8_MAX__'
+'__UINT16_MAX__'
+'__UINT32_MAX__'
+'__UINT64_MAX__'
+'__INT_LEAST8_MAX__'
+'__INT_LEAST16_MAX__'
+'__INT_LEAST32_MAX__'
+'__INT_LEAST64_MAX__'
+'__UINT_LEAST8_MAX__'
+'__UINT_LEAST16_MAX__'
+'__UINT_LEAST32_MAX__'
+'__UINT_LEAST64_MAX__'
+'__INT_FAST8_MAX__'
+'__INT_FAST16_MAX__'
+'__INT_FAST32_MAX__'
+'__INT_FAST64_MAX__'
+'__UINT_FAST8_MAX__'
+'__UINT_FAST16_MAX__'
+'__UINT_FAST32_MAX__'
+'__UINT_FAST64_MAX__'
+'__INTPTR_MAX__'
+'__UINTPTR_MAX__'
+'__WCHAR_MIN__'
+'__WINT_MIN__'
+'__SIG_ATOMIC_MIN__'
+ Defined to the maximum value of the 'signed char', 'wchar_t',
+ 'signed short', 'signed int', 'signed long', 'signed long long',
+ 'wint_t', 'size_t', 'ptrdiff_t', 'intmax_t', 'uintmax_t',
+ 'sig_atomic_t', 'int8_t', 'int16_t', 'int32_t', 'int64_t',
+ 'uint8_t', 'uint16_t', 'uint32_t', 'uint64_t', 'int_least8_t',
+ 'int_least16_t', 'int_least32_t', 'int_least64_t', 'uint_least8_t',
+ 'uint_least16_t', 'uint_least32_t', 'uint_least64_t',
+ 'int_fast8_t', 'int_fast16_t', 'int_fast32_t', 'int_fast64_t',
+ 'uint_fast8_t', 'uint_fast16_t', 'uint_fast32_t', 'uint_fast64_t',
+ 'intptr_t', and 'uintptr_t' types and to the minimum value of the
+ 'wchar_t', 'wint_t', and 'sig_atomic_t' types respectively. They
+ exist to make the standard header given numerical limits work
+ correctly. You should not use these macros directly; instead,
+ include the appropriate headers. Some of these macros may not be
+ defined on particular systems if GCC does not provide a 'stdint.h'
+ header on those systems.
+
+'__INT8_C'
+'__INT16_C'
+'__INT32_C'
+'__INT64_C'
+'__UINT8_C'
+'__UINT16_C'
+'__UINT32_C'
+'__UINT64_C'
+'__INTMAX_C'
+'__UINTMAX_C'
+ Defined to implementations of the standard 'stdint.h' macros with
+ the same names without the leading '__'. They exist the make the
+ implementation of that header work correctly. You should not use
+ these macros directly; instead, include the appropriate headers.
+ Some of these macros may not be defined on particular systems if
+ GCC does not provide a 'stdint.h' header on those systems.
+
+'__SIZEOF_INT__'
+'__SIZEOF_LONG__'
+'__SIZEOF_LONG_LONG__'
+'__SIZEOF_SHORT__'
+'__SIZEOF_POINTER__'
+'__SIZEOF_FLOAT__'
+'__SIZEOF_DOUBLE__'
+'__SIZEOF_LONG_DOUBLE__'
+'__SIZEOF_SIZE_T__'
+'__SIZEOF_WCHAR_T__'
+'__SIZEOF_WINT_T__'
+'__SIZEOF_PTRDIFF_T__'
+ Defined to the number of bytes of the C standard data types: 'int',
+ 'long', 'long long', 'short', 'void *', 'float', 'double', 'long
+ double', 'size_t', 'wchar_t', 'wint_t' and 'ptrdiff_t'.
+
+'__BYTE_ORDER__'
+'__ORDER_LITTLE_ENDIAN__'
+'__ORDER_BIG_ENDIAN__'
+'__ORDER_PDP_ENDIAN__'
+ '__BYTE_ORDER__' is defined to one of the values
+ '__ORDER_LITTLE_ENDIAN__', '__ORDER_BIG_ENDIAN__', or
+ '__ORDER_PDP_ENDIAN__' to reflect the layout of multi-byte and
+ multi-word quantities in memory. If '__BYTE_ORDER__' is equal to
+ '__ORDER_LITTLE_ENDIAN__' or '__ORDER_BIG_ENDIAN__', then
+ multi-byte and multi-word quantities are laid out identically: the
+ byte (word) at the lowest address is the least significant or most
+ significant byte (word) of the quantity, respectively. If
+ '__BYTE_ORDER__' is equal to '__ORDER_PDP_ENDIAN__', then bytes in
+ 16-bit words are laid out in a little-endian fashion, whereas the
+ 16-bit subwords of a 32-bit quantity are laid out in big-endian
+ fashion.
+
+ You should use these macros for testing like this:
+
+ /* Test for a little-endian machine */
+ #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
+
+'__FLOAT_WORD_ORDER__'
+ '__FLOAT_WORD_ORDER__' is defined to one of the values
+ '__ORDER_LITTLE_ENDIAN__' or '__ORDER_BIG_ENDIAN__' to reflect the
+ layout of the words of multi-word floating-point quantities.
+
+'__DEPRECATED'
+ This macro is defined, with value 1, when compiling a C++ source
+ file with warnings about deprecated constructs enabled. These
+ warnings are enabled by default, but can be disabled with
+ '-Wno-deprecated'.
+
+'__EXCEPTIONS'
+ This macro is defined, with value 1, when compiling a C++ source
+ file with exceptions enabled. If '-fno-exceptions' is used when
+ compiling the file, then this macro is not defined.
+
+'__GXX_RTTI'
+ This macro is defined, with value 1, when compiling a C++ source
+ file with runtime type identification enabled. If '-fno-rtti' is
+ used when compiling the file, then this macro is not defined.
+
+'__USING_SJLJ_EXCEPTIONS__'
+ This macro is defined, with value 1, if the compiler uses the old
+ mechanism based on 'setjmp' and 'longjmp' for exception handling.
+
+'__GXX_EXPERIMENTAL_CXX0X__'
+ This macro is defined when compiling a C++ source file with the
+ option '-std=c++0x' or '-std=gnu++0x'. It indicates that some
+ features likely to be included in C++0x are available. Note that
+ these features are experimental, and may change or be removed in
+ future versions of GCC.
+
+'__GXX_WEAK__'
+ This macro is defined when compiling a C++ source file. It has the
+ value 1 if the compiler will use weak symbols, COMDAT sections, or
+ other similar techniques to collapse symbols with "vague linkage"
+ that are defined in multiple translation units. If the compiler
+ will not collapse such symbols, this macro is defined with value 0.
+ In general, user code should not need to make use of this macro;
+ the purpose of this macro is to ease implementation of the C++
+ runtime library provided with G++.
+
+'__NEXT_RUNTIME__'
+ This macro is defined, with value 1, if (and only if) the NeXT
+ runtime (as in '-fnext-runtime') is in use for Objective-C. If the
+ GNU runtime is used, this macro is not defined, so that you can use
+ this macro to determine which runtime (NeXT or GNU) is being used.
+
+'__LP64__'
+'_LP64'
+ These macros are defined, with value 1, if (and only if) the
+ compilation is for a target where 'long int' and pointer both use
+ 64-bits and 'int' uses 32-bit.
+
+'__SSP__'
+ This macro is defined, with value 1, when '-fstack-protector' is in
+ use.
+
+'__SSP_ALL__'
+ This macro is defined, with value 2, when '-fstack-protector-all'
+ is in use.
+
+'__SSP_STRONG__'
+ This macro is defined, with value 3, when
+ '-fstack-protector-strong' is in use.
+
+'__SANITIZE_ADDRESS__'
+ This macro is defined, with value 1, when '-fsanitize=address' is
+ in use.
+
+'__TIMESTAMP__'
+ This macro expands to a string constant that describes the date and
+ time of the last modification of the current source file. The
+ string constant contains abbreviated day of the week, month, day of
+ the month, time in hh:mm:ss form, year and looks like
+ '"Sun Sep 16 01:03:52 1973"'. If the day of the month is less than
+ 10, it is padded with a space on the left.
+
+ If GCC cannot determine the current date, it will emit a warning
+ message (once per compilation) and '__TIMESTAMP__' will expand to
+ '"??? ??? ?? ??:??:?? ????"'.
+
+'__GCC_HAVE_SYNC_COMPARE_AND_SWAP_1'
+'__GCC_HAVE_SYNC_COMPARE_AND_SWAP_2'
+'__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4'
+'__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8'
+'__GCC_HAVE_SYNC_COMPARE_AND_SWAP_16'
+ These macros are defined when the target processor supports atomic
+ compare and swap operations on operands 1, 2, 4, 8 or 16 bytes in
+ length, respectively.
+
+'__GCC_HAVE_DWARF2_CFI_ASM'
+ This macro is defined when the compiler is emitting Dwarf2 CFI
+ directives to the assembler. When this is defined, it is possible
+ to emit those same directives in inline assembly.
+
+'__FP_FAST_FMA'
+'__FP_FAST_FMAF'
+'__FP_FAST_FMAL'
+ These macros are defined with value 1 if the backend supports the
+ 'fma', 'fmaf', and 'fmal' builtin functions, so that the include
+ file 'math.h' can define the macros 'FP_FAST_FMA', 'FP_FAST_FMAF',
+ and 'FP_FAST_FMAL' for compatibility with the 1999 C standard.
+
+'__GCC_IEC_559'
+ This macro is defined to indicate the intended level of support for
+ IEEE 754 (IEC 60559) floating-point arithmetic. It expands to a
+ nonnegative integer value. If 0, it indicates that the combination
+ of the compiler configuration and the command-line options is not
+ intended to support IEEE 754 arithmetic for 'float' and 'double' as
+ defined in C99 and C11 Annex F (for example, that the standard
+ rounding modes and exceptions are not supported, or that
+ optimizations are enabled that conflict with IEEE 754 semantics).
+ If 1, it indicates that IEEE 754 arithmetic is intended to be
+ supported; this does not mean that all relevant language features
+ are supported by GCC. If 2 or more, it additionally indicates
+ support for IEEE 754-2008 (in particular, that the binary encodings
+ for quiet and signaling NaNs are as specified in IEEE 754-2008).
+
+ This macro does not indicate the default state of command-line
+ options that control optimizations that C99 and C11 permit to be
+ controlled by standard pragmas, where those standards do not
+ require a particular default state. It does not indicate whether
+ optimizations respect signaling NaN semantics (the macro for that
+ is '__SUPPORT_SNAN__'). It does not indicate support for decimal
+ floating point or the IEEE 754 binary16 and binary128 types.
+
+'__GCC_IEC_559_COMPLEX'
+ This macro is defined to indicate the intended level of support for
+ IEEE 754 (IEC 60559) floating-point arithmetic for complex numbers,
+ as defined in C99 and C11 Annex G. It expands to a nonnegative
+ integer value. If 0, it indicates that the combination of the
+ compiler configuration and the command-line options is not intended
+ to support Annex G requirements (for example, because
+ '-fcx-limited-range' was used). If 1 or more, it indicates that it
+ is intended to support those requirements; this does not mean that
+ all relevant language features are supported by GCC.
+
+
+File: cpp.info, Node: System-specific Predefined Macros, Next: C++ Named Operators, Prev: Common Predefined Macros, Up: Predefined Macros
+
+3.7.3 System-specific Predefined Macros
+---------------------------------------
+
+The C preprocessor normally predefines several macros that indicate what
+type of system and machine is in use. They are obviously different on
+each target supported by GCC. This manual, being for all systems and
+machines, cannot tell you what their names are, but you can use 'cpp
+-dM' to see them all. *Note Invocation::. All system-specific
+predefined macros expand to a constant value, so you can test them with
+either '#ifdef' or '#if'.
+
+ The C standard requires that all system-specific macros be part of
+the "reserved namespace". All names which begin with two underscores,
+or an underscore and a capital letter, are reserved for the compiler and
+library to use as they wish. However, historically system-specific
+macros have had names with no special prefix; for instance, it is common
+to find 'unix' defined on Unix systems. For all such macros, GCC
+provides a parallel macro with two underscores added at the beginning
+and the end. If 'unix' is defined, '__unix__' will be defined too.
+There will never be more than two underscores; the parallel of '_mips'
+is '__mips__'.
+
+ When the '-ansi' option, or any '-std' option that requests strict
+conformance, is given to the compiler, all the system-specific
+predefined macros outside the reserved namespace are suppressed. The
+parallel macros, inside the reserved namespace, remain defined.
+
+ We are slowly phasing out all predefined macros which are outside the
+reserved namespace. You should never use them in new programs, and we
+encourage you to correct older code to use the parallel macros whenever
+you find it. We don't recommend you use the system-specific macros that
+are in the reserved namespace, either. It is better in the long run to
+check specifically for features you need, using a tool such as
+'autoconf'.
+
+
+File: cpp.info, Node: C++ Named Operators, Prev: System-specific Predefined Macros, Up: Predefined Macros
+
+3.7.4 C++ Named Operators
+-------------------------
+
+In C++, there are eleven keywords which are simply alternate spellings
+of operators normally written with punctuation. These keywords are
+treated as such even in the preprocessor. They function as operators in
+'#if', and they cannot be defined as macros or poisoned. In C, you can
+request that those keywords take their C++ meaning by including
+'iso646.h'. That header defines each one as a normal object-like macro
+expanding to the appropriate punctuator.
+
+ These are the named operators and their corresponding punctuators:
+
+Named Operator Punctuator
+'and' '&&'
+'and_eq' '&='
+'bitand' '&'
+'bitor' '|'
+'compl' '~'
+'not' '!'
+'not_eq' '!='
+'or' '||'
+'or_eq' '|='
+'xor' '^'
+'xor_eq' '^='
+
+
+File: cpp.info, Node: Undefining and Redefining Macros, Next: Directives Within Macro Arguments, Prev: Predefined Macros, Up: Macros
+
+3.8 Undefining and Redefining Macros
+====================================
+
+If a macro ceases to be useful, it may be "undefined" with the '#undef'
+directive. '#undef' takes a single argument, the name of the macro to
+undefine. You use the bare macro name, even if the macro is
+function-like. It is an error if anything appears on the line after the
+macro name. '#undef' has no effect if the name is not a macro.
+
+ #define FOO 4
+ x = FOO; ==> x = 4;
+ #undef FOO
+ x = FOO; ==> x = FOO;
+
+ Once a macro has been undefined, that identifier may be "redefined"
+as a macro by a subsequent '#define' directive. The new definition need
+not have any resemblance to the old definition.
+
+ However, if an identifier which is currently a macro is redefined,
+then the new definition must be "effectively the same" as the old one.
+Two macro definitions are effectively the same if:
+ * Both are the same type of macro (object- or function-like).
+ * All the tokens of the replacement list are the same.
+ * If there are any parameters, they are the same.
+ * Whitespace appears in the same places in both. It need not be
+ exactly the same amount of whitespace, though. Remember that
+ comments count as whitespace.
+
+These definitions are effectively the same:
+ #define FOUR (2 + 2)
+ #define FOUR (2 + 2)
+ #define FOUR (2 /* two */ + 2)
+but these are not:
+ #define FOUR (2 + 2)
+ #define FOUR ( 2+2 )
+ #define FOUR (2 * 2)
+ #define FOUR(score,and,seven,years,ago) (2 + 2)
+
+ If a macro is redefined with a definition that is not effectively the
+same as the old one, the preprocessor issues a warning and changes the
+macro to use the new definition. If the new definition is effectively
+the same, the redefinition is silently ignored. This allows, for
+instance, two different headers to define a common macro. The
+preprocessor will only complain if the definitions do not match.
+
+
+File: cpp.info, Node: Directives Within Macro Arguments, Next: Macro Pitfalls, Prev: Undefining and Redefining Macros, Up: Macros
+
+3.9 Directives Within Macro Arguments
+=====================================
+
+Occasionally it is convenient to use preprocessor directives within the
+arguments of a macro. The C and C++ standards declare that behavior in
+these cases is undefined.
+
+ Versions of CPP prior to 3.2 would reject such constructs with an
+error message. This was the only syntactic difference between normal
+functions and function-like macros, so it seemed attractive to remove
+this limitation, and people would often be surprised that they could not
+use macros in this way. Moreover, sometimes people would use
+conditional compilation in the argument list to a normal library
+function like 'printf', only to find that after a library upgrade
+'printf' had changed to be a function-like macro, and their code would
+no longer compile. So from version 3.2 we changed CPP to successfully
+process arbitrary directives within macro arguments in exactly the same
+way as it would have processed the directive were the function-like
+macro invocation not present.
+
+ If, within a macro invocation, that macro is redefined, then the new
+definition takes effect in time for argument pre-expansion, but the
+original definition is still used for argument replacement. Here is a
+pathological example:
+
+ #define f(x) x x
+ f (1
+ #undef f
+ #define f 2
+ f)
+
+which expands to
+
+ 1 2 1 2
+
+with the semantics described above.
+
+
+File: cpp.info, Node: Macro Pitfalls, Prev: Directives Within Macro Arguments, Up: Macros
+
+3.10 Macro Pitfalls
+===================
+
+In this section we describe some special rules that apply to macros and
+macro expansion, and point out certain cases in which the rules have
+counter-intuitive consequences that you must watch out for.
+
+* Menu:
+
+* Misnesting::
+* Operator Precedence Problems::
+* Swallowing the Semicolon::
+* Duplication of Side Effects::
+* Self-Referential Macros::
+* Argument Prescan::
+* Newlines in Arguments::
+
+
+File: cpp.info, Node: Misnesting, Next: Operator Precedence Problems, Up: Macro Pitfalls
+
+3.10.1 Misnesting
+-----------------
+
+When a macro is called with arguments, the arguments are substituted
+into the macro body and the result is checked, together with the rest of
+the input file, for more macro calls. It is possible to piece together
+a macro call coming partially from the macro body and partially from the
+arguments. For example,
+
+ #define twice(x) (2*(x))
+ #define call_with_1(x) x(1)
+ call_with_1 (twice)
+ ==> twice(1)
+ ==> (2*(1))
+
+ Macro definitions do not have to have balanced parentheses. By
+writing an unbalanced open parenthesis in a macro body, it is possible
+to create a macro call that begins inside the macro body but ends
+outside of it. For example,
+
+ #define strange(file) fprintf (file, "%s %d",
+ ...<