This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Commit: ARM: Extend fix for PR 62254
- From: Nick Clifton <nickc at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Wed, 30 Mar 2016 13:48:14 +0100
- Subject: Commit: ARM: Extend fix for PR 62254
- Authentication-results: sourceware.org; auth=none
Hi Guys,
I am applying this patch as a further fix for PR 62254.
In the long run we will hopefully be dropping support for ARM v3 (and
earlier) so this is more in the nature of a plaster than a real fix.
Cheers
Nick
gcc/ChangeLog
2016-03-30 Nick Clifton <nickc@redhat.com>
PR target/62254
* config/arm/arm.c (arm_reload_out_hi): Add code to handle the
case where we are already provided with an SImode SUBREG.
Index: gcc/config/arm/arm.c
===================================================================
--- gcc/config/arm/arm.c (revision 234516)
+++ gcc/config/arm/arm.c (working copy)
@@ -15601,9 +15601,22 @@
architecture variant does not have an HImode register move. */
if (base == NULL)
{
- gcc_assert (REG_P (outval));
- emit_insn (gen_movsi (gen_rtx_SUBREG (SImode, ref, 0),
- gen_rtx_SUBREG (SImode, outval, 0)));
+ gcc_assert (REG_P (outval) || SUBREG_P (outval));
+
+ if (REG_P (outval))
+ {
+ emit_insn (gen_movsi (gen_rtx_SUBREG (SImode, ref, 0),
+ gen_rtx_SUBREG (SImode, outval, 0)));
+ }
+ else /* SUBREG_P (outval) */
+ {
+ if (GET_MODE (SUBREG_REG (outval)) == SImode)
+ emit_insn (gen_movsi (gen_rtx_SUBREG (SImode, ref, 0),
+ SUBREG_REG (outval)));
+ else
+ /* FIXME: Handle other cases ? */
+ gcc_unreachable ();
+ }
return;
}
}