+2008-07-31 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR debug/36976
+ * dwarf2out.c (dwarf2out_args_size_adjust): New.
+ (dwarf2out_stack_adjust): Use it.
+ (dwarf2out_frame_debug_expr): Likewise.
+
2008-07-31 Richard Guenther <rguenther@suse.de>
PR tree-optimization/36978
static void output_call_frame_info (int);
static void dwarf2out_note_section_used (void);
static void dwarf2out_stack_adjust (rtx, bool);
+static void dwarf2out_args_size_adjust (HOST_WIDE_INT, const char *);
static void flush_queued_reg_saves (void);
static bool clobbers_queued_reg_save (const_rtx);
static void dwarf2out_frame_debug_expr (rtx, const char *);
if (offset == 0)
return;
+ label = dwarf2out_cfi_label ();
+ dwarf2out_args_size_adjust (offset, label);
+}
+
+/* Adjust args_size based on stack adjustment OFFSET. */
+
+static void
+dwarf2out_args_size_adjust (HOST_WIDE_INT offset, const char *label)
+{
if (cfa.reg == STACK_POINTER_REGNUM)
cfa.offset += offset;
+ if (cfa_store.reg == STACK_POINTER_REGNUM)
+ cfa_store.offset += offset;
+
#ifndef STACK_GROWS_DOWNWARD
offset = -offset;
#endif
if (args_size < 0)
args_size = 0;
- label = dwarf2out_cfi_label ();
def_cfa_1 (label, &cfa);
if (flag_asynchronous_unwind_tables)
dwarf2out_args_size (label, args_size);
HOST_WIDE_INT offset = stack_adjust_offset (elem);
if (offset != 0)
- {
- if (cfa.reg == STACK_POINTER_REGNUM)
- cfa.offset += offset;
-
-#ifndef STACK_GROWS_DOWNWARD
- offset = -offset;
-#endif
-
- args_size += offset;
- if (args_size < 0)
- args_size = 0;
-
- def_cfa_1 (label, &cfa);
- if (flag_asynchronous_unwind_tables)
- dwarf2out_args_size (label, args_size);
- }
+ dwarf2out_args_size_adjust (offset, label);
}
}
return;