From 114e816e3f80ea999d329d0a187ef1e53348645b Mon Sep 17 00:00:00 2001 From: Kyrylo Tkachov Date: Thu, 2 Jun 2016 08:54:15 +0000 Subject: [PATCH] Fix fallout from: [ARM] PR target/70830: Avoid POP-{reglist}^ when returning from interrupt handlers PR target/70830 * config/arm/arm.c (arm_output_multireg_pop): Guard "pop" on update. From-SVN: r237027 --- gcc/ChangeLog | 5 +++++ gcc/config/arm/arm.c | 6 ++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d23e27dd7ff..23171c578d1 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2016-06-02 Kyrylo Tkachov + + PR target/70830 + * config/arm/arm.c (arm_output_multireg_pop): Guard "pop" on update. + 2016-06-02 Segher Boessenkool * config/rs6000/dfp.md (trunctddd2): Correct the "length" attribute. diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index e9240908ea9..47d2447ed34 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -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. -- 2.30.2