]> gcc.gnu.org Git - gcc.git/commitdiff
re PR debug/44694 (Long var tracking compile time of GiNaC tests)
authorJakub Jelinek <jakub@redhat.com>
Thu, 1 Jul 2010 11:11:46 +0000 (13:11 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Thu, 1 Jul 2010 11:11:46 +0000 (13:11 +0200)
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

gcc/ChangeLog
gcc/dwarf2out.c

index e54886b24446e68e14430d39eeea48e58a71232e..e1c6e860651f0d385ba37f764b7f93244b9adaca 100644 (file)
@@ -1,3 +1,9 @@
+2010-07-01  Jakub Jelinek  <jakub@redhat.com>
+
+       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.
+
 2010-07-01  Richard Guenther  <rguenther@suse.de>
 
        * emit-rtl.c (set_mem_attributes_minus_bitpos): Use unsigned
index 3faa175485999a907b2a45695b73b7f2ca84361c..6decc6f050ef8edee7c8760e624b74289d9ba257 100644 (file)
@@ -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)
This page took 0.111367 seconds and 5 git commands to generate.