diff options
author | Jakub Jelinek <jakub@redhat.com> | 2010-07-01 13:11:46 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2010-07-01 13:11:46 +0200 |
commit | 3aa05bb6cebdf040fff41f0ff71dbd6025c0a18d (patch) | |
tree | 6579da1567c8fbce75c5f0740cfa440d6aa784ba /gcc/dwarf2out.c | |
parent | e3ccfc8bb56558847d24c2cc1d911c3b31421542 (diff) | |
download | gcc-3aa05bb6cebdf040fff41f0ff71dbd6025c0a18d.zip gcc-3aa05bb6cebdf040fff41f0ff71dbd6025c0a18d.tar.gz gcc-3aa05bb6cebdf040fff41f0ff71dbd6025c0a18d.tar.bz2 |
re PR debug/44694 (Long var tracking compile time of GiNaC tests)
PR debug/44694
* dwarf2out.c (reg_loc_descriptor): For eliminated arg_pointer_rtx
or frame_pointer_rtx use DW_OP_fbreg offset DW_OP_stack_value.
From-SVN: r161662
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r-- | gcc/dwarf2out.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 3faa175..6decc6f 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -12999,6 +12999,26 @@ reg_loc_descriptor (rtx rtl, enum var_init_status initialized) if (REGNO (rtl) >= FIRST_PSEUDO_REGISTER) return 0; + /* We only use "frame base" when we're sure we're talking about the + post-prologue local stack frame. We do this by *not* running + register elimination until this point, and recognizing the special + argument pointer and soft frame pointer rtx's. + Use DW_OP_fbreg offset DW_OP_stack_value in this case. */ + if ((rtl == arg_pointer_rtx || rtl == frame_pointer_rtx) + && eliminate_regs (rtl, VOIDmode, NULL_RTX) != rtl) + { + dw_loc_descr_ref result = NULL; + + if (dwarf_version >= 4 || !dwarf_strict) + { + result = mem_loc_descriptor (rtl, VOIDmode, initialized); + if (result) + add_loc_descr (&result, + new_loc_descr (DW_OP_stack_value, 0, 0)); + } + return result; + } + regs = targetm.dwarf_register_span (rtl); if (hard_regno_nregs[REGNO (rtl)][GET_MODE (rtl)] > 1 || regs) |