Fix fallout from: [ARM] PR target/70830: Avoid POP-{reglist}^ when returning from...
authorKyrylo Tkachov <kyrylo.tkachov@arm.com>
Thu, 2 Jun 2016 08:54:15 +0000 (08:54 +0000)
committerKyrylo Tkachov <ktkachov@gcc.gnu.org>
Thu, 2 Jun 2016 08:54:15 +0000 (08:54 +0000)
PR target/70830
* config/arm/arm.c (arm_output_multireg_pop): Guard "pop" on update.

From-SVN: r237027

gcc/ChangeLog
gcc/config/arm/arm.c

index d23e27d..23171c5 100644 (file)
@@ -1,3 +1,8 @@
+2016-06-02  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
+
+       PR target/70830
+       * config/arm/arm.c (arm_output_multireg_pop): Guard "pop" on update.
+
 2016-06-02  Segher Boessenkool  <segher@kernel.crashing.org>
 
        * config/rs6000/dfp.md (trunctddd2): Correct the "length" attribute.
index e924090..47d2447 100644 (file)
@@ -17781,10 +17781,8 @@ arm_output_multireg_pop (rtx *operands, bool return_pc, rtx cond, bool reverse,
 
   conditional = reverse ? "%?%D0" : "%?%d0";
   /* Can't use POP if returning from an interrupt.  */
-  if ((regno_base == SP_REGNUM) && !(interrupt_p && return_pc))
-    {
-      sprintf (pattern, "pop%s\t{", conditional);
-    }
+  if ((regno_base == SP_REGNUM) && update && !(interrupt_p && return_pc))
+    sprintf (pattern, "pop%s\t{", conditional);
   else
     {
       /* Output ldmfd when the base register is SP, otherwise output ldmia.