summaryrefslogtreecommitdiffstats
path: root/gcc/dwarf2cfi.c
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2012-06-11 18:04:25 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2012-06-11 18:04:25 +0000
commitdfed30bca14de84e0446cc02f5a27407dbfdc3e1 (patch)
treec4244bf5425b4e2fc33772ca4170bed3b11f550f /gcc/dwarf2cfi.c
parent56b10909303bb85df9deab621503015b7c1f00bb (diff)
downloadppe42-gcc-dfed30bca14de84e0446cc02f5a27407dbfdc3e1.tar.gz
ppe42-gcc-dfed30bca14de84e0446cc02f5a27407dbfdc3e1.zip
* dwarf2cfi.c (scan_trace): Handle annulled branch-taken delay slots.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@188391 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/dwarf2cfi.c')
-rw-r--r--gcc/dwarf2cfi.c24
1 files changed, 19 insertions, 5 deletions
diff --git a/gcc/dwarf2cfi.c b/gcc/dwarf2cfi.c
index bf2d802ffae..3edb6e1250a 100644
--- a/gcc/dwarf2cfi.c
+++ b/gcc/dwarf2cfi.c
@@ -2429,18 +2429,20 @@ scan_trace (dw_trace_info *trace)
elt = XVECEXP (pat, 0, 1);
- /* If ELT is an instruction from target of an annulled branch,
- the effects are for the target only and so the args_size
- and CFA along the current path shouldn't change. */
if (INSN_FROM_TARGET_P (elt))
{
HOST_WIDE_INT restore_args_size;
cfi_vec save_row_reg_save;
+ /* If ELT is an instruction from target of an annulled
+ branch, the effects are for the target only and so
+ the args_size and CFA along the current path
+ shouldn't change. */
add_cfi_insn = NULL;
restore_args_size = cur_trace->end_true_args_size;
cur_cfa = &cur_row->cfa;
- save_row_reg_save = VEC_copy (dw_cfi_ref, gc, cur_row->reg_save);
+ save_row_reg_save
+ = VEC_copy (dw_cfi_ref, gc, cur_row->reg_save);
scan_insn_after (elt);
@@ -2453,8 +2455,20 @@ scan_trace (dw_trace_info *trace)
cur_row->cfa = this_cfa;
cur_row->reg_save = save_row_reg_save;
cur_cfa = &this_cfa;
- continue;
}
+ else
+ {
+ /* If ELT is a annulled branch-taken instruction (i.e.
+ executed only when branch is not taken), the args_size
+ and CFA should not change through the jump. */
+ create_trace_edges (control);
+
+ /* Update and continue with the trace. */
+ add_cfi_insn = insn;
+ scan_insn_after (elt);
+ def_cfa_1 (&this_cfa);
+ }
+ continue;
}
/* The insns in the delay slot should all be considered to happen
OpenPOWER on IntegriCloud