frame.c: Include gansidecl.h for PROTO.

* 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.
Update m68k patch from Andreas.

From-SVN: r15740
This commit is contained in:
Andreas Schwab 1997-09-27 03:58:57 +00:00 committed by Jeff Law
parent 407cb092e3
commit a7cc7f29f4
5 changed files with 69 additions and 7 deletions

View File

@ -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.

View File

@ -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)
{

View File

@ -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));

View File

@ -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 *));

View File

@ -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>