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/gcc/config/arm Fix armv3 segv compili...



details:   https://anonhg.NetBSD.org/src/rev/2a39d9539f3c
branches:  trunk
changeset: 815537:2a39d9539f3c
user:      christos <christos%NetBSD.org@localhost>
date:      Tue May 24 15:42:17 2016 +0000

description:
Fix armv3 segv compiling mDNS.c, from:

    https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62254
    https://gcc.gnu.org/ml/gcc-patches/2016-02/msg01095.html

diffstat:

 external/gpl3/gcc/dist/gcc/config/arm/arm.c |  22 ++++++++++++++++++++++
 1 files changed, 22 insertions(+), 0 deletions(-)

diffs (39 lines):

diff -r 3509d8b95b1d -r 2a39d9539f3c external/gpl3/gcc/dist/gcc/config/arm/arm.c
--- a/external/gpl3/gcc/dist/gcc/config/arm/arm.c       Tue May 24 15:00:45 2016 +0000
+++ b/external/gpl3/gcc/dist/gcc/config/arm/arm.c       Tue May 24 15:42:17 2016 +0000
@@ -15436,6 +15436,17 @@
       else
        /* The slot is out of range, or was dressed up in a SUBREG.  */
        base = reg_equiv_address (REGNO (ref));
+
+      /* PR 62554: If there is no equivalent memory location then just move
+        the value as an SImode register move.  This happens when the target
+        architecure variant does not have an HImode register move.  */
+      if (base == NULL)
+       {
+         gcc_assert (REG_P (operands[0]));
+         emit_insn (gen_movsi (gen_rtx_SUBREG (SImode, operands[0], 0),
+                               gen_rtx_SUBREG (SImode, ref, 0)));
+         return;
+       }
     }
   else
     base = find_replacement (&XEXP (ref, 0));
@@ -15553,6 +15564,17 @@
       else
        /* The slot is out of range, or was dressed up in a SUBREG.  */
        base = reg_equiv_address (REGNO (ref));
+
+      /* PR 62554: If there is no equivalent memory location then just move
+        the value as an SImode register move.  This happens when the target
+        architecure variant does not have an HImode register move.  */
+      if (base == NULL)
+       {
+         gcc_assert (REG_P (operands[0]));
+         emit_insn (gen_movsi (gen_rtx_SUBREG (SImode, operands[0], 0),
+                               gen_rtx_SUBREG (SImode, ref, 0)));
+         return;
+       }
     }
   else
     base = find_replacement (&XEXP (ref, 0));



Home | Main Index | Thread Index | Old Index