Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/gpl3/gcc/dist initial import of GCC 4.8 snapshot 20...



details:   https://anonhg.NetBSD.org/src/rev/36e003cc0880
branches:  trunk
changeset: 332932:36e003cc0880
user:      mrg <mrg%NetBSD.org@localhost>
date:      Sun Oct 12 06:58:16 2014 +0000

description:
initial import of GCC 4.8 snapshot 2014-10-09.  this fixes at
least the below GCC PRs, among many other changes.

it also makes sh3 reasonably useful again.

        c++/60731
        c/61271
        c/61271
        c/61271
        debug/55794
        debug/60655
        debug/61923
        debug/63284
        debug/63342
        inline-asm/63282
        ipa/61986
        ipa/62015
        libobjc/61920
        libobjc/61920
        libstdc++/58962
        libstdc++/60734
        libstdc++/60966
        libstdc++/61946
        libstdc++/63449
        middle-end/61010
        middle-end/61045
        middle-end/62103
        rtl-optimization/57003
        rtl-optimization/60866
        rtl-optimization/60901
        rtl-optimization/61801
        rtl-optimization/62004
        rtl-optimization/62030
        target/49423
        target/52941
        target/61044
        target/61202
        target/61208
        target/61231
        target/61239
        target/61249
        target/61300
        target/61423
        target/61431
        target/61443
        target/61483
        target/61542
        target/61545
        target/61570
        target/61586
        target/61996
        target/62195
        target/62218
        target/63428
        tree-optimization/60196
        tree-optimization/61375
        tree-optimization/61383
        tree-optimization/61452
        tree-optimization/61684
        tree-optimization/61964
        tree-optimization/62073
        tree-optimization/62075
        tree-optimization/63189
        tree-optimization/63341
        tree-optimization/63375

diffstat:

 external/gpl3/gcc/dist/ChangeLog                                                        |    6 +
 external/gpl3/gcc/dist/config/ChangeLog                                                 |    5 +
 external/gpl3/gcc/dist/config/mh-alpha-linux                                            |    3 +
 external/gpl3/gcc/dist/contrib/ChangeLog                                                |    4 +
 external/gpl3/gcc/dist/contrib/gennews                                                  |    2 +-
 external/gpl3/gcc/dist/gcc/BASE-VER                                                     |    2 +-
 external/gpl3/gcc/dist/gcc/DATESTAMP                                                    |    2 +-
 external/gpl3/gcc/dist/gcc/DEV-PHASE                                                    |    1 +
 external/gpl3/gcc/dist/gcc/cgraphunit.c                                                 |    2 +-
 external/gpl3/gcc/dist/gcc/common.opt                                                   |    4 +
 external/gpl3/gcc/dist/gcc/config/aarch64/aarch64-linux.h                               |    2 +
 external/gpl3/gcc/dist/gcc/config/aarch64/aarch64.c                                     |   17 +-
 external/gpl3/gcc/dist/gcc/config/aarch64/aarch64.md                                    |    1 +
 external/gpl3/gcc/dist/gcc/config/aarch64/arm_neon.h                                    |    4 +-
 external/gpl3/gcc/dist/gcc/config/alpha/alpha.c                                         |    6 +
 external/gpl3/gcc/dist/gcc/config/arm/arm-protos.h                                      |    3 +
 external/gpl3/gcc/dist/gcc/config/arm/arm.c                                             |   18 +-
 external/gpl3/gcc/dist/gcc/config/arm/constraints.md                                    |   11 +-
 external/gpl3/gcc/dist/gcc/config/arm/t-rtems-eabi                                      |  124 +++-
 external/gpl3/gcc/dist/gcc/config/avr/avr-fixed.md                                      |    4 +-
 external/gpl3/gcc/dist/gcc/config/avr/avr.h                                             |   14 +-
 external/gpl3/gcc/dist/gcc/config/avr/avr.md                                            |    9 +
 external/gpl3/gcc/dist/gcc/config/elfos.h                                               |    2 +-
 external/gpl3/gcc/dist/gcc/config/i386/i386.md                                          |   83 +-
 external/gpl3/gcc/dist/gcc/config/microblaze/microblaze.md                              |   12 -
 external/gpl3/gcc/dist/gcc/config/microblaze/predicates.md                              |    4 -
 external/gpl3/gcc/dist/gcc/config/rs6000/constraints.md                                 |   16 +-
 external/gpl3/gcc/dist/gcc/config/rs6000/freebsd64.h                                    |    2 +-
 external/gpl3/gcc/dist/gcc/config/rs6000/htm.md                                         |    2 +-
 external/gpl3/gcc/dist/gcc/config/rs6000/linux64.h                                      |    2 +-
 external/gpl3/gcc/dist/gcc/config/rs6000/predicates.md                                  |   85 +-
 external/gpl3/gcc/dist/gcc/config/rs6000/rs6000-builtin.def                             |   21 +-
 external/gpl3/gcc/dist/gcc/config/rs6000/rs6000-c.c                                     |    3 +-
 external/gpl3/gcc/dist/gcc/config/rs6000/rs6000-protos.h                                |    7 +-
 external/gpl3/gcc/dist/gcc/config/rs6000/rs6000.h                                       |   24 +-
 external/gpl3/gcc/dist/gcc/config/rs6000/rs6000.md                                      |  122 +-
 external/gpl3/gcc/dist/gcc/config/rs6000/vsx.md                                         |  362 +++++----
 external/gpl3/gcc/dist/gcc/config/sh/sh.opt                                             |    2 +-
 external/gpl3/gcc/dist/gcc/config/sh/sync.md                                            |   18 +-
 external/gpl3/gcc/dist/gcc/cp/ChangeLog                                                 |   64 +
 external/gpl3/gcc/dist/gcc/cp/call.c                                                    |   24 +-
 external/gpl3/gcc/dist/gcc/cp/friend.c                                                  |    8 +-
 external/gpl3/gcc/dist/gcc/cp/parser.c                                                  |    7 +-
 external/gpl3/gcc/dist/gcc/cp/pt.c                                                      |   47 +-
 external/gpl3/gcc/dist/gcc/cp/semantics.c                                               |    6 +-
 external/gpl3/gcc/dist/gcc/cp/tree.c                                                    |   14 +
 external/gpl3/gcc/dist/gcc/doc/extend.texi                                              |   10 +-
 external/gpl3/gcc/dist/gcc/doc/install.texi                                             |    6 -
 external/gpl3/gcc/dist/gcc/doc/md.texi                                                  |   14 +-
 external/gpl3/gcc/dist/gcc/doc/sourcebuild.texi                                         |    3 +
 external/gpl3/gcc/dist/gcc/doc/tm.texi                                                  |    7 +
 external/gpl3/gcc/dist/gcc/doc/tm.texi.in                                               |    7 +
 external/gpl3/gcc/dist/gcc/double-int.c                                                 |    2 +-
 external/gpl3/gcc/dist/gcc/emit-rtl.c                                                   |    2 +-
 external/gpl3/gcc/dist/gcc/emit-rtl.h                                                   |    3 +
 external/gpl3/gcc/dist/gcc/fold-const.c                                                 |   58 +-
 external/gpl3/gcc/dist/gcc/function.c                                                   |   16 +-
 external/gpl3/gcc/dist/gcc/gimple-fold.c                                                |    4 +-
 external/gpl3/gcc/dist/gcc/haifa-sched.c                                                |    8 +-
 external/gpl3/gcc/dist/gcc/ifcvt.c                                                      |   34 +-
 external/gpl3/gcc/dist/gcc/ipa-cp.c                                                     |   28 +-
 external/gpl3/gcc/dist/gcc/omp-low.c                                                    |    1 -
 external/gpl3/gcc/dist/gcc/regcprop.c                                                   |   12 +-
 external/gpl3/gcc/dist/gcc/sched-deps.c                                                 |    3 +-
 external/gpl3/gcc/dist/gcc/sel-sched-ir.c                                               |   56 +-
 external/gpl3/gcc/dist/gcc/toplev.c                                                     |   13 +-
 external/gpl3/gcc/dist/gcc/tree-cfgcleanup.c                                            |   15 +-
 external/gpl3/gcc/dist/gcc/tree-sra.c                                                   |    5 +
 external/gpl3/gcc/dist/gcc/tree-ssa-ifcombine.c                                         |    7 +-
 external/gpl3/gcc/dist/gcc/tree-ssa-math-opts.c                                         |   81 +-
 external/gpl3/gcc/dist/gcc/tree-ssa-sccvn.c                                             |   93 +-
 external/gpl3/gcc/dist/gcc/tree-ssa-tail-merge.c                                        |   23 +-
 external/gpl3/gcc/dist/gcc/tree-vect-data-refs.c                                        |   28 +-
 external/gpl3/gcc/dist/gcc/tree-vect-loop.c                                             |    3 +-
 external/gpl3/gcc/dist/gcc/tree-vect-patterns.c                                         |    2 +-
 external/gpl3/gcc/dist/gcc/tree-vect-slp.c                                              |    5 +-
 external/gpl3/gcc/dist/gcc/tree-vect-stmts.c                                            |    7 +-
 external/gpl3/gcc/dist/gcc/tree-vectorizer.h                                            |   10 +-
 external/gpl3/gcc/dist/libgcc/ChangeLog                                                 |    5 +
 external/gpl3/gcc/dist/libgcc/config/i386/sfp-machine.h                                 |    2 +-
 external/gpl3/gcc/dist/libobjc/ChangeLog                                                |   13 +
 external/gpl3/gcc/dist/libstdc++-v3/ChangeLog                                           |   81 ++
 external/gpl3/gcc/dist/libstdc++-v3/config/abi/post/hppa-linux-gnu/baseline_symbols.txt |   17 +
 external/gpl3/gcc/dist/libstdc++-v3/doc/html/index.html                                 |    4 +-
 external/gpl3/gcc/dist/libstdc++-v3/doc/html/manual/abi.html                            |    6 +-
 external/gpl3/gcc/dist/libstdc++-v3/doc/html/manual/containers.html                     |   19 +-
 external/gpl3/gcc/dist/libstdc++-v3/doc/html/manual/index.html                          |    4 +-
 external/gpl3/gcc/dist/libstdc++-v3/doc/html/manual/status.html                         |   26 +-
 external/gpl3/gcc/dist/libstdc++-v3/doc/html/manual/std_contents.html                   |    4 +-
 external/gpl3/gcc/dist/libstdc++-v3/doc/xml/manual/containers.xml                       |   25 +-
 external/gpl3/gcc/dist/libstdc++-v3/doc/xml/manual/status_cxx2011.xml                   |   56 +-
 external/gpl3/gcc/dist/libstdc++-v3/include/bits/stl_tree.h                             |    4 +-
 external/gpl3/gcc/dist/libstdc++-v3/include/std/future                                  |   28 +-
 external/gpl3/gcc/dist/libstdc++-v3/include/tr2/bool_set                                |    2 +-
 external/gpl3/gcc/dist/libstdc++-v3/libsupc++/atexit_thread.cc                          |    6 +-
 external/gpl3/gcc/dist/libstdc++-v3/python/libstdcxx/v6/printers.py                     |  108 ++-
 external/gpl3/gcc/dist/libstdc++-v3/scripts/run_doxygen                                 |   11 +-
 97 files changed, 1459 insertions(+), 709 deletions(-)

diffs (truncated from 5189 to 300 lines):

diff -r d75445e29509 -r 36e003cc0880 external/gpl3/gcc/dist/ChangeLog
--- a/external/gpl3/gcc/dist/ChangeLog  Sun Oct 12 06:00:14 2014 +0000
+++ b/external/gpl3/gcc/dist/ChangeLog  Sun Oct 12 06:58:16 2014 +0000
@@ -1,3 +1,9 @@
+2014-07-26  Uros Bizjak  <ubizjak%gmail.com@localhost>
+
+       PR target/47230
+       * configure.ac (alpha*-*-linux*): Use mh-alpha-linux.
+       * configure: Regenerate.
+
 2014-05-22  Release Manager
 
        * GCC 4.8.3 released.
diff -r d75445e29509 -r 36e003cc0880 external/gpl3/gcc/dist/config/ChangeLog
--- a/external/gpl3/gcc/dist/config/ChangeLog   Sun Oct 12 06:00:14 2014 +0000
+++ b/external/gpl3/gcc/dist/config/ChangeLog   Sun Oct 12 06:58:16 2014 +0000
@@ -1,3 +1,8 @@
+2014-07-26  Uros Bizjak  <ubizjak%gmail.com@localhost>
+
+       PR target/47230
+       * mh-alpha-linux: New file.
+
 2014-05-22  Release Manager
 
        * GCC 4.8.3 released.
diff -r d75445e29509 -r 36e003cc0880 external/gpl3/gcc/dist/config/mh-alpha-linux
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/external/gpl3/gcc/dist/config/mh-alpha-linux      Sun Oct 12 06:58:16 2014 +0000
@@ -0,0 +1,3 @@
+# Prevent GPREL16 relocation truncation
+LDFLAGS += -Wl,--no-relax
+BOOT_LDFLAGS += -Wl,--no-relax
diff -r d75445e29509 -r 36e003cc0880 external/gpl3/gcc/dist/contrib/ChangeLog
--- a/external/gpl3/gcc/dist/contrib/ChangeLog  Sun Oct 12 06:00:14 2014 +0000
+++ b/external/gpl3/gcc/dist/contrib/ChangeLog  Sun Oct 12 06:58:16 2014 +0000
@@ -1,3 +1,7 @@
+2014-07-07  Richard Biener  <rguenther%suse.de@localhost>
+
+        * gennews: Use gcc-3.0/index.html.
+
 2014-05-22  Release Manager
 
        * GCC 4.8.3 released.
diff -r d75445e29509 -r 36e003cc0880 external/gpl3/gcc/dist/contrib/gennews
--- a/external/gpl3/gcc/dist/contrib/gennews    Sun Oct 12 06:00:14 2014 +0000
+++ b/external/gpl3/gcc/dist/contrib/gennews    Sun Oct 12 06:58:16 2014 +0000
@@ -37,7 +37,7 @@
     gcc-3.3/index.html gcc-3.3/changes.html
     gcc-3.2/index.html gcc-3.2/changes.html
     gcc-3.1/index.html gcc-3.1/changes.html
-    gcc-3.0/gcc-3.0.html gcc-3.0/features.html gcc-3.0/caveats.html
+    gcc-3.0/index.html gcc-3.0/features.html gcc-3.0/caveats.html
     gcc-2.95/index.html gcc-2.95/features.html gcc-2.95/caveats.html
     egcs-1.1/index.html egcs-1.1/features.html egcs-1.1/caveats.html
     egcs-1.0/index.html egcs-1.0/features.html egcs-1.0/caveats.html"
diff -r d75445e29509 -r 36e003cc0880 external/gpl3/gcc/dist/gcc/BASE-VER
--- a/external/gpl3/gcc/dist/gcc/BASE-VER       Sun Oct 12 06:00:14 2014 +0000
+++ b/external/gpl3/gcc/dist/gcc/BASE-VER       Sun Oct 12 06:58:16 2014 +0000
@@ -1,1 +1,1 @@
-4.8.3
+4.8.4
diff -r d75445e29509 -r 36e003cc0880 external/gpl3/gcc/dist/gcc/DATESTAMP
--- a/external/gpl3/gcc/dist/gcc/DATESTAMP      Sun Oct 12 06:00:14 2014 +0000
+++ b/external/gpl3/gcc/dist/gcc/DATESTAMP      Sun Oct 12 06:58:16 2014 +0000
@@ -1,1 +1,1 @@
-20140522
+20141009
diff -r d75445e29509 -r 36e003cc0880 external/gpl3/gcc/dist/gcc/DEV-PHASE
--- a/external/gpl3/gcc/dist/gcc/DEV-PHASE      Sun Oct 12 06:00:14 2014 +0000
+++ b/external/gpl3/gcc/dist/gcc/DEV-PHASE      Sun Oct 12 06:58:16 2014 +0000
@@ -0,0 +1,1 @@
+prerelease
diff -r d75445e29509 -r 36e003cc0880 external/gpl3/gcc/dist/gcc/cgraphunit.c
--- a/external/gpl3/gcc/dist/gcc/cgraphunit.c   Sun Oct 12 06:00:14 2014 +0000
+++ b/external/gpl3/gcc/dist/gcc/cgraphunit.c   Sun Oct 12 06:58:16 2014 +0000
@@ -1097,7 +1097,7 @@
          /* We use local aliases for C++ thunks to force the tailcall
             to bind locally.  This is a hack - to keep it working do
             the following (which is not strictly correct).  */
-         && (! TREE_CODE (target_node->symbol.decl) == FUNCTION_DECL
+         && (TREE_CODE (target_node->symbol.decl) != FUNCTION_DECL
              || ! DECL_VIRTUAL_P (target_node->symbol.decl))
          && ! lookup_attribute ("weakref", DECL_ATTRIBUTES (p->decl)))
        {
diff -r d75445e29509 -r 36e003cc0880 external/gpl3/gcc/dist/gcc/common.opt
--- a/external/gpl3/gcc/dist/gcc/common.opt     Sun Oct 12 06:00:14 2014 +0000
+++ b/external/gpl3/gcc/dist/gcc/common.opt     Sun Oct 12 06:58:16 2014 +0000
@@ -1226,6 +1226,10 @@
 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 -r d75445e29509 -r 36e003cc0880 external/gpl3/gcc/dist/gcc/config/aarch64/aarch64-linux.h
--- a/external/gpl3/gcc/dist/gcc/config/aarch64/aarch64-linux.h Sun Oct 12 06:00:14 2014 +0000
+++ b/external/gpl3/gcc/dist/gcc/config/aarch64/aarch64-linux.h Sun Oct 12 06:58:16 2014 +0000
@@ -43,4 +43,6 @@
     }                                          \
   while (0)
 
+#define TARGET_ASM_FILE_END file_end_indicate_exec_stack
+
 #endif  /* GCC_AARCH64_LINUX_H */
diff -r d75445e29509 -r 36e003cc0880 external/gpl3/gcc/dist/gcc/config/aarch64/aarch64.c
--- a/external/gpl3/gcc/dist/gcc/config/aarch64/aarch64.c       Sun Oct 12 06:00:14 2014 +0000
+++ b/external/gpl3/gcc/dist/gcc/config/aarch64/aarch64.c       Sun Oct 12 06:58:16 2014 +0000
@@ -1201,6 +1201,7 @@
   CUMULATIVE_ARGS *pcum = get_cumulative_args (pcum_v);
   int ncrn, nvrn, nregs;
   bool allocate_ncrn, allocate_nvrn;
+  HOST_WIDE_INT size;
 
   /* We need to do this once per argument.  */
   if (pcum->aapcs_arg_processed)
@@ -1208,6 +1209,11 @@
 
   pcum->aapcs_arg_processed = true;
 
+  /* Size in bytes, rounded to the nearest multiple of 8 bytes.  */
+  size
+    = AARCH64_ROUND_UP (type ? int_size_in_bytes (type) : GET_MODE_SIZE (mode),
+                       UNITS_PER_WORD);
+
   allocate_ncrn = (type) ? !(FLOAT_TYPE_P (type)) : !FLOAT_MODE_P (mode);
   allocate_nvrn = aarch64_vfp_is_call_candidate (pcum_v,
                                                 mode,
@@ -1258,9 +1264,7 @@
     }
 
   ncrn = pcum->aapcs_ncrn;
-  nregs = ((type ? int_size_in_bytes (type) : GET_MODE_SIZE (mode))
-          + UNITS_PER_WORD - 1) / UNITS_PER_WORD;
-
+  nregs = size / UNITS_PER_WORD;
 
   /* C6 - C9.  though the sign and zero extension semantics are
      handled elsewhere.  This is the case where the argument fits
@@ -1309,13 +1313,12 @@
   pcum->aapcs_nextncrn = NUM_ARG_REGS;
 
   /* The argument is passed on stack; record the needed number of words for
-     this argument (we can re-use NREGS) and align the total size if
-     necessary.  */
+     this argument and align the total size if necessary.  */
 on_stack:
-  pcum->aapcs_stack_words = nregs;
+  pcum->aapcs_stack_words = size / UNITS_PER_WORD;
   if (aarch64_function_arg_alignment (mode, type) == 16 * BITS_PER_UNIT)
     pcum->aapcs_stack_size = AARCH64_ROUND_UP (pcum->aapcs_stack_size,
-                                              16 / UNITS_PER_WORD) + 1;
+                                              16 / UNITS_PER_WORD);
   return;
 }
 
diff -r d75445e29509 -r 36e003cc0880 external/gpl3/gcc/dist/gcc/config/aarch64/aarch64.md
--- a/external/gpl3/gcc/dist/gcc/config/aarch64/aarch64.md      Sun Oct 12 06:00:14 2014 +0000
+++ b/external/gpl3/gcc/dist/gcc/config/aarch64/aarch64.md      Sun Oct 12 06:58:16 2014 +0000
@@ -3292,6 +3292,7 @@
         (unspec:DI [(match_operand:DI 0 "aarch64_valid_symref" "S")]
                   UNSPEC_TLSDESC))
    (clobber (reg:DI LR_REGNUM))
+   (clobber (reg:CC CC_REGNUM))
    (clobber (match_scratch:DI 1 "=r"))]
   "TARGET_TLS_DESC"
   "adrp\\tx0, %A0\;ldr\\t%1, [x0, #%L0]\;add\\tx0, x0, %L0\;.tlsdesccall\\t%0\;blr\\t%1"
diff -r d75445e29509 -r 36e003cc0880 external/gpl3/gcc/dist/gcc/config/aarch64/arm_neon.h
--- a/external/gpl3/gcc/dist/gcc/config/aarch64/arm_neon.h      Sun Oct 12 06:00:14 2014 +0000
+++ b/external/gpl3/gcc/dist/gcc/config/aarch64/arm_neon.h      Sun Oct 12 06:58:16 2014 +0000
@@ -13815,7 +13815,7 @@
   int16x4_t result;
   __asm__ ("sqdmulh %0.4h,%1.4h,%2.h[0]"
            : "=w"(result)
-           : "w"(a), "w"(b)
+           : "w"(a), "x"(b)
            : /* No clobbers */);
   return result;
 }
@@ -13837,7 +13837,7 @@
   int16x8_t result;
   __asm__ ("sqdmulh %0.8h,%1.8h,%2.h[0]"
            : "=w"(result)
-           : "w"(a), "w"(b)
+           : "w"(a), "x"(b)
            : /* No clobbers */);
   return result;
 }
diff -r d75445e29509 -r 36e003cc0880 external/gpl3/gcc/dist/gcc/config/alpha/alpha.c
--- a/external/gpl3/gcc/dist/gcc/config/alpha/alpha.c   Sun Oct 12 06:00:14 2014 +0000
+++ b/external/gpl3/gcc/dist/gcc/config/alpha/alpha.c   Sun Oct 12 06:58:16 2014 +0000
@@ -8658,6 +8658,11 @@
                        }
                      break;
 
+                   case BARRIER:
+                     /* __builtin_unreachable can expand to no code at all,
+                        leaving (barrier) RTXes in the instruction stream.  */
+                     goto close_shadow_notrapb;
+
                    case JUMP_INSN:
                    case CALL_INSN:
                    case CODE_LABEL:
@@ -8673,6 +8678,7 @@
                  n = emit_insn_before (gen_trapb (), i);
                  PUT_MODE (n, TImode);
                  PUT_MODE (i, TImode);
+               close_shadow_notrapb:
                  trap_pending = 0;
                  shadow.used.i = 0;
                  shadow.used.fp = 0;
diff -r d75445e29509 -r 36e003cc0880 external/gpl3/gcc/dist/gcc/config/arm/arm-protos.h
--- a/external/gpl3/gcc/dist/gcc/config/arm/arm-protos.h        Sun Oct 12 06:00:14 2014 +0000
+++ b/external/gpl3/gcc/dist/gcc/config/arm/arm-protos.h        Sun Oct 12 06:58:16 2014 +0000
@@ -55,6 +55,7 @@
 extern int legitimate_pic_operand_p (rtx);
 extern rtx legitimize_pic_address (rtx, enum machine_mode, rtx);
 extern rtx legitimize_tls_address (rtx, rtx);
+extern bool arm_legitimate_address_p (enum machine_mode, rtx, bool);
 extern int arm_legitimate_address_outer_p (enum machine_mode, rtx, RTX_CODE, int);
 extern int thumb_legitimate_offset_p (enum machine_mode, HOST_WIDE_INT);
 extern bool arm_legitimize_reload_address (rtx *, enum machine_mode, int, int,
@@ -286,4 +287,6 @@
 
 extern void arm_emit_eabi_attribute (const char *, int, int);
 
+extern bool arm_is_constant_pool_ref (rtx);
+
 #endif /* ! GCC_ARM_PROTOS_H */
diff -r d75445e29509 -r 36e003cc0880 external/gpl3/gcc/dist/gcc/config/arm/arm.c
--- a/external/gpl3/gcc/dist/gcc/config/arm/arm.c       Sun Oct 12 06:00:14 2014 +0000
+++ b/external/gpl3/gcc/dist/gcc/config/arm/arm.c       Sun Oct 12 06:58:16 2014 +0000
@@ -82,7 +82,6 @@
 static reg_class_t arm_preferred_reload_class (rtx, reg_class_t);
 static rtx thumb_legitimize_address (rtx, rtx, enum machine_mode);
 inline static int thumb1_index_register_rtx_p (rtx, int);
-static bool arm_legitimate_address_p (enum machine_mode, rtx, bool);
 static int thumb_far_jump_used_p (void);
 static bool thumb_force_lr_save (void);
 static unsigned arm_size_return_regs (void);
@@ -24476,9 +24475,13 @@
       fputs (":\n", file);
       if (flag_pic)
        {
-         /* Output ".word .LTHUNKn-7-.LTHUNKPCn".  */
+         /* Output ".word .LTHUNKn-[3,7]-.LTHUNKPCn".  */
          rtx tem = XEXP (DECL_RTL (function), 0);
-         tem = gen_rtx_PLUS (GET_MODE (tem), tem, GEN_INT (-7));
+         /* For TARGET_THUMB1_ONLY the thunk is in Thumb mode, so the PC
+            pipeline offset is four rather than eight.  Adjust the offset
+            accordingly.  */
+         tem = plus_constant (GET_MODE (tem), tem,
+                              TARGET_THUMB1_ONLY ? -3 : -7);
          tem = gen_rtx_MINUS (GET_MODE (tem),
                               tem,
                               gen_rtx_SYMBOL_REF (Pmode,
@@ -27462,4 +27465,13 @@
 
 }
 
+/* return TRUE if x is a reference to a value in a constant pool */
+extern bool
+arm_is_constant_pool_ref (rtx x)
+{
+  return (MEM_P (x)
+         && GET_CODE (XEXP (x, 0)) == SYMBOL_REF
+         && CONSTANT_POOL_ADDRESS_P (XEXP (x, 0)));
+}
+
 #include "gt-arm.h"
diff -r d75445e29509 -r 36e003cc0880 external/gpl3/gcc/dist/gcc/config/arm/constraints.md
--- a/external/gpl3/gcc/dist/gcc/config/arm/constraints.md      Sun Oct 12 06:00:14 2014 +0000
+++ b/external/gpl3/gcc/dist/gcc/config/arm/constraints.md      Sun Oct 12 06:58:16 2014 +0000
@@ -36,7 +36,7 @@
 ;; in Thumb-2 state: Pj, PJ, Ps, Pt, Pu, Pv, Pw, Px, Py
 
 ;; The following memory constraints have been used:
-;; in ARM/Thumb-2 state: Q, Ut, Uv, Uy, Un, Um, Us
+;; in ARM/Thumb-2 state: Q, Uh, Ut, Uv, Uy, Un, Um, Us
 ;; in ARM state: Uq
 ;; in Thumb state: Uu, Uw
 
@@ -310,6 +310,12 @@
   An address valid for loading/storing register exclusive"
  (match_operand 0 "mem_noofs_operand"))
 
+(define_memory_constraint "Uh"
+ "@internal
+  An address suitable for byte and half-word loads which does not point inside a constant pool"
+ (and (match_code "mem")
+      (match_test "arm_legitimate_address_p (GET_MODE (op), XEXP (op, 0), false) && !arm_is_constant_pool_ref (op)")))
+
 (define_memory_constraint "Ut"
  "@internal
   In ARM/Thumb-2 state an address valid for loading/storing opaque structure
@@ -356,7 +362,8 @@
  (and (match_code "mem")



Home | Main Index | Thread Index | Old Index