Commit 3f388b42 by Geoff Keating Committed by Geoffrey Keating

dwarf2.h (DW_CFA_GNU_negative_offset_extended): New constant.

* dwarf2.h (DW_CFA_GNU_negative_offset_extended): New constant.
* dwarf2out.c (dwarf_cfi_name): Print name of new constant.
(reg_save): Use DW_CFA_GNU_negative_offset_extended when needed.
(output_cfi): Handle output of DW_CFA_GNU_negative_offset_extended.
* frame.c (execute_cfa_insn): Handle
DW_CFA_GNU_negative_offset_extended.

From-SVN: r31858
parent 5568fb48
2000-02-08 Geoff Keating <geoffk@cygnus.com>
* dwarf2.h (DW_CFA_GNU_negative_offset_extended): New constant.
* dwarf2out.c (dwarf_cfi_name): Print name of new constant.
(reg_save): Use DW_CFA_GNU_negative_offset_extended when needed.
(output_cfi): Handle output of DW_CFA_GNU_negative_offset_extended.
* frame.c (execute_cfa_insn): Handle
DW_CFA_GNU_negative_offset_extended.
2000-02-08 Richard Henderson <rth@cygnus.com> 2000-02-08 Richard Henderson <rth@cygnus.com>
* flow.c (tidy_fallthru_edges): Split out from ... * flow.c (tidy_fallthru_edges): Split out from ...
......
/* Declarations and definitions of codes relating to the DWARF2 symbolic /* Declarations and definitions of codes relating to the DWARF2 symbolic
debugging information format. debugging information format.
Copyright (C) 1992, 1993, 1995, 1996, 1997 Free Software Foundation, Inc. Copyright (C) 1992, 1993, 1995, 1996, 1997, 2000
Free Software Foundation, Inc.
Contributed by Gary Funck (gary@intrepid.com). Derived from the Contributed by Gary Funck (gary@intrepid.com). Derived from the
DWARF 1 implementation written by Ron Guilmette (rfg@monkeys.com). DWARF 1 implementation written by Ron Guilmette (rfg@monkeys.com).
...@@ -501,7 +502,8 @@ enum dwarf_call_frame_info ...@@ -501,7 +502,8 @@ enum dwarf_call_frame_info
/* GNU extensions */ /* GNU extensions */
DW_CFA_GNU_window_save = 0x2d, DW_CFA_GNU_window_save = 0x2d,
DW_CFA_GNU_args_size = 0x2e DW_CFA_GNU_args_size = 0x2e,
DW_CFA_GNU_negative_offset_extended = 0x2f
}; };
#define DW_CIE_ID 0xffffffff #define DW_CIE_ID 0xffffffff
......
...@@ -643,6 +643,8 @@ dwarf_cfi_name (cfi_opc) ...@@ -643,6 +643,8 @@ dwarf_cfi_name (cfi_opc)
return "DW_CFA_GNU_window_save"; return "DW_CFA_GNU_window_save";
case DW_CFA_GNU_args_size: case DW_CFA_GNU_args_size:
return "DW_CFA_GNU_args_size"; return "DW_CFA_GNU_args_size";
case DW_CFA_GNU_negative_offset_extended:
return "DW_CFA_GNU_negative_offset_extended";
default: default:
return "DW_CFA_<unknown>"; return "DW_CFA_<unknown>";
...@@ -872,7 +874,10 @@ reg_save (label, reg, sreg, offset) ...@@ -872,7 +874,10 @@ reg_save (label, reg, sreg, offset)
offset /= DWARF_CIE_DATA_ALIGNMENT; offset /= DWARF_CIE_DATA_ALIGNMENT;
if (offset < 0) if (offset < 0)
abort (); {
cfi->dw_cfi_opc = DW_CFA_GNU_negative_offset_extended;
offset = -offset;
}
cfi->dw_cfi_oprnd2.dw_cfi_offset = offset; cfi->dw_cfi_oprnd2.dw_cfi_offset = offset;
} }
else else
...@@ -1559,6 +1564,7 @@ output_cfi (cfi, fde) ...@@ -1559,6 +1564,7 @@ output_cfi (cfi, fde)
break; break;
#endif #endif
case DW_CFA_offset_extended: case DW_CFA_offset_extended:
case DW_CFA_GNU_negative_offset_extended:
case DW_CFA_def_cfa: case DW_CFA_def_cfa:
output_uleb128 (cfi->dw_cfi_oprnd1.dw_cfi_reg_num); output_uleb128 (cfi->dw_cfi_oprnd1.dw_cfi_reg_num);
fputc ('\n', asm_out_file); fputc ('\n', asm_out_file);
......
...@@ -795,6 +795,14 @@ execute_cfa_insn (void *p, struct frame_state_internal *state, ...@@ -795,6 +795,14 @@ execute_cfa_insn (void *p, struct frame_state_internal *state,
state->s.args_size = offset; state->s.args_size = offset;
break; break;
case DW_CFA_GNU_negative_offset_extended:
p = decode_uleb128 (p, &reg);
p = decode_uleb128 (p, &offset);
offset *= info->data_align;
state->s.saved[reg] = REG_SAVED_OFFSET;
state->s.reg_or_offset[reg] = -offset;
break;
default: default:
abort (); abort ();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment