diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2012-11-14 19:58:48 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2012-11-14 19:58:48 +0000 |
commit | 8feb51341b3967b36fb529bc3f693947cbe4fa37 (patch) | |
tree | b4a89622de268b4d3844c21dca70590236724737 /gnu | |
parent | fd6c72ffc7642e645152de707edcb51e0568b25f (diff) |
Generously sprinkle RTX_FRAME_RELATED_P() in the prologue and epilogue code,
as recommended by the documentation. I have not seen a difference in the
generated code so far, but I'd rather play safe at the moment.
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/usr.bin/gcc/gcc/config/m88k/m88k.c | 38 |
1 files changed, 33 insertions, 5 deletions
diff --git a/gnu/usr.bin/gcc/gcc/config/m88k/m88k.c b/gnu/usr.bin/gcc/gcc/config/m88k/m88k.c index 5fb76f6ccb7..9bc2163e0e0 100644 --- a/gnu/usr.bin/gcc/gcc/config/m88k/m88k.c +++ b/gnu/usr.bin/gcc/gcc/config/m88k/m88k.c @@ -1808,7 +1808,7 @@ output_label (label_number) static rtx emit_add PARAMS ((rtx, rtx, int)); static void preserve_registers PARAMS ((int, int)); -static void emit_ldst PARAMS ((int, int, enum machine_mode, int)); +static void emit_ldst PARAMS ((int, int, enum machine_mode, int, int)); static void output_tdesc PARAMS ((FILE *, int)); static int nregs; @@ -2160,7 +2160,7 @@ preserve_registers (base, store_p) memory ops. */ if (nregs > 2 && !save_regs[FRAME_POINTER_REGNUM]) offset -= 4; - emit_ldst (store_p, 1, SImode, offset); + emit_ldst (store_p, 1, SImode, offset, 1); offset -= 4; base = offset; } @@ -2227,20 +2227,24 @@ preserve_registers (base, store_p) if (mo_ptr->nregs) emit_ldst (store_p, mo_ptr->regno, (mo_ptr->nregs > 1 ? DImode : SImode), - mo_ptr->offset); + mo_ptr->offset, 1); } } static void -emit_ldst (store_p, regno, mode, offset) +emit_ldst (store_p, regno, mode, offset, frame_related) int store_p; int regno; enum machine_mode mode; int offset; + int frame_related; { rtx reg = gen_rtx_REG (mode, regno); rtx mem; + if (frame_related) + start_sequence (); + if (SMALL_INTVAL (offset)) { mem = gen_rtx_MEM (mode, plus_constant (stack_pointer_rtx, offset)); @@ -2261,6 +2265,30 @@ emit_ldst (store_p, regno, mode, offset) emit_move_insn (mem, reg); else emit_move_insn (reg, mem); + + if (frame_related) + { + rtx seq = get_insns(); + rtx insn; + + end_sequence (); + + if (INSN_P (seq)) + { + insn = seq; + while (insn != NULL_RTX) + { + RTX_FRAME_RELATED_P (insn) = 1; + insn = NEXT_INSN (insn); + } + seq = emit_insn (seq); + } + else + { + seq = emit_insn (seq); + RTX_FRAME_RELATED_P (seq) = 1; + } + } } /* Convert the address expression REG to a CFA offset. */ @@ -2536,7 +2564,7 @@ m88k_function_arg_advance (args_so_far, mode, type, named) CUMULATIVE_ARGS *args_so_far; enum machine_mode mode; tree type; - int named; + int named ATTRIBUTE_UNUSED; { int bytes, words; |