diff options
-rw-r--r-- | gcc/ChangeLog | 10 | ||||
-rw-r--r-- | gcc/config/m68k/m68k.c | 16 | ||||
-rw-r--r-- | gcc/dwarf2.h | 46 | ||||
-rw-r--r-- | gcc/dwarf2out.c | 3 | ||||
-rw-r--r-- | gcc/frame.c | 1 |
5 files changed, 69 insertions, 7 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 993df97020b..13948ef94c7 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -7,6 +7,16 @@ Fri Sep 26 08:54:59 1997 Paul Eggert <eggert@twinsun.com> Fri Sep 26 09:00:13 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> + * frame.c: Include gansidecl.h for PROTO. + * dwarf2out.c: Move inclusion of dwarf2.h down so that PROTO is + defined. Don't declare dwarf2out_cfi_label here. + * dwarf2.h: Add declarations of DWARF2 unwind info support + functions. + * m68k.c: Include dwarf2.h. + (output_function_prologue): Add dwarf2 support. + * m68k.h (INCOMING_RETURN_ADDR_RTX, DWARF_FRAME_REGNUM): New macros. + (INCOMING_FRAME_SP_OFFSET): Likewise. + * integrate.c (expand_inline_function): Make sure there is at least one insn that can be used as an insertion point. diff --git a/gcc/config/m68k/m68k.c b/gcc/config/m68k/m68k.c index e8e08f9cb82..ccf05126cca 100644 --- a/gcc/config/m68k/m68k.c +++ b/gcc/config/m68k/m68k.c @@ -31,6 +31,7 @@ Boston, MA 02111-1307, USA. */ #include "insn-flags.h" #include "output.h" #include "insn-attr.h" +#include "dwarf2.h" /* Needed for use_return_insn. */ #include "flags.h" @@ -215,7 +216,8 @@ output_function_prologue (stream, size) } if (dwarf2out_do_frame ()) { - char *l = (char *) dwarf2out_cfi_label (); + char *l = dwarf2out_cfi_label (); + cfa_store_offset += 4; cfa_offset = cfa_store_offset; dwarf2out_def_cfa (l, FRAME_POINTER_REGNUM, cfa_offset); @@ -312,7 +314,8 @@ output_function_prologue (stream, size) #endif if (dwarf2out_do_frame ()) { - char *l = (char *) dwarf2out_cfi_label (); + char *l = dwarf2out_cfi_label (); + cfa_store_offset += 8; if (! frame_pointer_needed) { @@ -340,8 +343,9 @@ output_function_prologue (stream, size) #endif if (dwarf2out_do_frame ()) { - char *l = (char *) dwarf2out_cfi_label (); + char *l = dwarf2out_cfi_label (); int n_regs; + cfa_store_offset += num_saved_regs * 12; if (! frame_pointer_needed) { @@ -403,7 +407,8 @@ output_function_prologue (stream, size) reg_names[15 - i]); if (dwarf2out_do_frame ()) { - char *l = (char *) dwarf2out_cfi_label (); + char *l = dwarf2out_cfi_label (); + cfa_store_offset += 4; if (! frame_pointer_needed) { @@ -453,8 +458,9 @@ output_function_prologue (stream, size) } if (dwarf2out_do_frame ()) { - char *l = (char *) dwarf2out_cfi_label (); + char *l = dwarf2out_cfi_label (); int n_regs; + cfa_store_offset += num_saved_regs * 4; if (! frame_pointer_needed) { diff --git a/gcc/dwarf2.h b/gcc/dwarf2.h index 4340344c868..993dea774ee 100644 --- a/gcc/dwarf2.h +++ b/gcc/dwarf2.h @@ -543,3 +543,49 @@ enum dwarf_macinfo_record_type DW_MACINFO_end_file = 4, DW_MACINFO_vendor_ext = 255 }; + +/* Interface of the DWARF2 unwind info support. */ + +/* Decide whether we want to emit frame unwind information for the current + translation unit. */ + +extern int dwarf2out_do_frame PROTO((void)); + +/* Generate a new label for the CFI info to refer to. */ + +extern char *dwarf2out_cfi_label PROTO((void)); + +/* Entry point to update the canonical frame address (CFA). */ + +extern void dwarf2out_def_cfa PROTO((char *, unsigned, long)); + +/* Add the CFI for saving a register window. */ + +extern void dwarf2out_window_save PROTO((char *)); + +/* Add a CFI to update the running total of the size of arguments pushed + onto the stack. */ + +extern void dwarf2out_args_size PROTO((char *, long)); + +/* Entry point for saving a register to the stack. */ + +extern void dwarf2out_reg_save PROTO((char *, unsigned, long)); + +/* Entry point for saving the return address in the stack. */ + +extern void dwarf2out_return_save PROTO((char *, long)); + +/* Entry point for saving the return address in a register. */ + +extern void dwarf2out_return_reg PROTO((char *, unsigned)); + +/* Output a marker (i.e. a label) for the beginning of a function, before + the prologue. */ + +extern void dwarf2out_begin_prologue PROTO((void)); + +/* Output a marker (i.e. a label) for the absolute end of the generated + code for a function definition. */ + +extern void dwarf2out_end_epilogue PROTO((void)); diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 46a4692fa8e..56ce82b8e01 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -29,7 +29,6 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "config.h" #include "defaults.h" #include <stdio.h> -#include "dwarf2.h" #include "tree.h" #include "flags.h" #include "rtl.h" @@ -40,6 +39,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "output.h" #include "expr.h" #include "except.h" +#include "dwarf2.h" /* #define NDEBUG 1 */ #include "assert.h" @@ -185,7 +185,6 @@ static unsigned long size_of_uleb128 PROTO((unsigned long)); static unsigned long size_of_sleb128 PROTO((long)); static void output_uleb128 PROTO((unsigned long)); static void output_sleb128 PROTO((long)); -char *dwarf2out_cfi_label PROTO((void)); static void add_fde_cfi PROTO((char *, dw_cfi_ref)); static void lookup_cfa_1 PROTO((dw_cfi_ref, unsigned long *, long *)); diff --git a/gcc/frame.c b/gcc/frame.c index f77f0694d3c..4f0a2bc0cad 100644 --- a/gcc/frame.c +++ b/gcc/frame.c @@ -35,6 +35,7 @@ Boston, MA 02111-1307, USA. */ #include "defaults.h" #ifdef DWARF2_UNWIND_INFO +#include "gansidecl.h" #include "dwarf2.h" #include "frame.h" #include <stddef.h> |