Module Name: src Committed By: christos Date: Tue May 24 15:42:17 UTC 2016
Modified Files: src/external/gpl3/gcc/dist/gcc/config/arm: arm.c Log Message: 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 To generate a diff of this commit: cvs rdiff -u -r1.1.1.7 -r1.2 src/external/gpl3/gcc/dist/gcc/config/arm/arm.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/external/gpl3/gcc/dist/gcc/config/arm/arm.c diff -u src/external/gpl3/gcc/dist/gcc/config/arm/arm.c:1.1.1.7 src/external/gpl3/gcc/dist/gcc/config/arm/arm.c:1.2 --- src/external/gpl3/gcc/dist/gcc/config/arm/arm.c:1.1.1.7 Sun Jan 24 01:06:27 2016 +++ src/external/gpl3/gcc/dist/gcc/config/arm/arm.c Tue May 24 11:42:17 2016 @@ -15436,6 +15436,17 @@ arm_reload_in_hi (rtx *operands) 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 @@ arm_reload_out_hi (rtx *operands) 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));