diff options
Diffstat (limited to 'gcc/config')
-rw-r--r-- | gcc/config/arm/arm.c | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index bece1f7..622218c 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -26859,7 +26859,7 @@ arm_set_return_address (rtx source, rtx scratch) { arm_stack_offsets *offsets; HOST_WIDE_INT delta; - rtx addr; + rtx addr, mem; unsigned long saved_regs; offsets = arm_get_frame_offsets (); @@ -26889,11 +26889,12 @@ arm_set_return_address (rtx source, rtx scratch) addr = plus_constant (Pmode, addr, delta); } - /* The store needs to be marked as frame related in order to prevent - DSE from deleting it as dead if it is based on fp. */ - rtx insn = emit_move_insn (gen_frame_mem (Pmode, addr), source); - RTX_FRAME_RELATED_P (insn) = 1; - add_reg_note (insn, REG_CFA_RESTORE, gen_rtx_REG (Pmode, LR_REGNUM)); + + /* The store needs to be marked to prevent DSE from deleting + it as dead if it is based on fp. */ + mem = gen_frame_mem (Pmode, addr); + MEM_VOLATILE_P (mem) = true; + emit_move_insn (mem, source); } } @@ -26905,7 +26906,7 @@ thumb_set_return_address (rtx source, rtx scratch) HOST_WIDE_INT delta; HOST_WIDE_INT limit; int reg; - rtx addr; + rtx addr, mem; unsigned long mask; emit_use (source); @@ -26945,11 +26946,11 @@ thumb_set_return_address (rtx source, rtx scratch) else addr = plus_constant (Pmode, addr, delta); - /* The store needs to be marked as frame related in order to prevent - DSE from deleting it as dead if it is based on fp. */ - rtx insn = emit_move_insn (gen_frame_mem (Pmode, addr), source); - RTX_FRAME_RELATED_P (insn) = 1; - add_reg_note (insn, REG_CFA_RESTORE, gen_rtx_REG (Pmode, LR_REGNUM)); + /* The store needs to be marked to prevent DSE from deleting + it as dead if it is based on fp. */ + mem = gen_frame_mem (Pmode, addr); + MEM_VOLATILE_P (mem) = true; + emit_move_insn (mem, source); } else emit_move_insn (gen_rtx_REG (Pmode, LR_REGNUM), source); |