remove dead dwarf-2 code

This commit is contained in:
YamaArashi 2016-04-27 01:38:58 -07:00
parent 9dc75fe3b4
commit 0fd2209ea0
12 changed files with 9 additions and 1530 deletions

View File

@ -22,7 +22,7 @@
srcdir = .
VPATH = $(srcdir)
CFLAGS = -g -std=gnu11
CFLAGS = -g -std=gnu11 -Wunused-function
CC = gcc

View File

@ -122,9 +122,3 @@ do { fprintf (FILE, "\t%s\t", ASM_LONG); \
#define SUPPORTS_WEAK 0
#endif
#endif
/* If we have a definition of INCOMING_RETURN_ADDR_RTX, assume that
the rest of the DWARF 2 frame unwind support is also provided. */
#if !defined (DWARF2_UNWIND_INFO) && defined (INCOMING_RETURN_ADDR_RTX)
#define DWARF2_UNWIND_INFO 1
#endif

File diff suppressed because it is too large Load Diff

View File

@ -32,9 +32,6 @@ extern void dwarf2out_end_block (unsigned);
extern void dwarf2out_label (rtx);
extern void dwarf2out_decl (tree);
extern void dwarf2out_line (char *, unsigned);
extern void dwarf2out_frame_init (void);
extern void dwarf2out_frame_debug (rtx);
extern void dwarf2out_frame_finish (void);
extern void debug_dwarf (void);
struct die_struct;

View File

@ -380,11 +380,9 @@ extern void expand_fixup_region_end (tree);
/* Various hooks for the DWARF 2 __throw routine. */
void expand_builtin_unwind_init (void);
rtx expand_builtin_dwarf_fp_regnum (void);
#ifdef TREE_CODE
rtx expand_builtin_frob_return_addr (tree);
rtx expand_builtin_extract_return_addr (tree);
rtx expand_builtin_dwarf_reg_size (tree, rtx);
void expand_builtin_eh_return (tree, tree, tree);
#endif
void expand_eh_return (void);

View File

@ -152,7 +152,6 @@ static rtx expand_builtin (tree, rtx, rtx,
enum machine_mode, int);
static int apply_args_size (void);
static int apply_result_size (void);
static rtx result_vector (int, rtx);
static rtx expand_builtin_apply_args (void);
static rtx expand_builtin_apply (rtx, rtx, rtx);
static void expand_builtin_return (rtx);
@ -8397,12 +8396,6 @@ expand_builtin(tree exp, rtx target, rtx subtarget, enum machine_mode mode, int
return const0_rtx;
case BUILT_IN_DWARF_CFA:
return virtual_cfa_rtx;
#ifdef DWARF2_UNWIND_INFO
case BUILT_IN_DWARF_FP_REGNUM:
return expand_builtin_dwarf_fp_regnum();
case BUILT_IN_DWARF_REG_SIZE:
return expand_builtin_dwarf_reg_size(TREE_VALUE(arglist), target);
#endif
case BUILT_IN_FROB_RETURN_ADDR:
return expand_builtin_frob_return_addr(TREE_VALUE(arglist));
case BUILT_IN_EXTRACT_RETURN_ADDR:

View File

@ -72,7 +72,7 @@ Boston, MA 02111-1307, USA. */
extern struct obstack *rtl_obstack;
/* END CYGNUS LOCAL */
#if defined (DWARF2_UNWIND_INFO) || defined (DWARF2_DEBUGGING_INFO)
#if defined (DWARF2_DEBUGGING_INFO)
#include "dwarf2out.h"
#endif
@ -1083,10 +1083,8 @@ final_start_function (first, file, optimize)
int optimize;
{
block_depth = 0;
this_is_asm_operands = 0;
/* Initial line number is supposed to be output
before the function's prologue and label
so that the function's address will not appear to be
@ -1095,23 +1093,15 @@ final_start_function (first, file, optimize)
last_linenum = high_block_linenum = high_function_linenum
= NOTE_LINE_NUMBER (first);
#if defined (DWARF2_UNWIND_INFO) || defined (DWARF2_DEBUGGING_INFO)
#if defined (DWARF2_DEBUGGING_INFO)
/* Output DWARF definition of the function. */
if (dwarf2out_do_frame ())
dwarf2out_begin_prologue ();
#endif
/* But only output line number for other debug info types if -g2
or better. */
if (NOTE_LINE_NUMBER (first) != NOTE_INSN_DELETED)
output_source_line (file, first);
#if defined (DWARF2_UNWIND_INFO) && defined (HAVE_prologue)
if (dwarf2out_do_frame ())
dwarf2out_frame_debug (NULL_RTX);
#endif
#ifdef FUNCTION_PROLOGUE
/* First output the function prologue: code to set up the stack frame. */
FUNCTION_PROLOGUE (file, get_frame_size ());
@ -1142,7 +1132,7 @@ final_end_function (first, file, optimize)
#endif
#if defined (DWARF2_UNWIND_INFO) || defined (DWARF2_DEBUGGING_INFO)
#if defined (DWARF2_DEBUGGING_INFO)
if (dwarf2out_do_frame ())
dwarf2out_end_epilogue ();
#endif
@ -1443,12 +1433,6 @@ final_scan_insn (insn, file, optimize, prescan, nopeepholes)
break;
case BARRIER:
#if defined (DWARF2_UNWIND_INFO) && !defined (ACCUMULATE_OUTGOING_ARGS)
/* If we push arguments, we need to check all insns for stack
adjustments. */
if (dwarf2out_do_frame ())
dwarf2out_frame_debug (insn);
#endif
break;
case CODE_LABEL:
@ -1994,11 +1978,6 @@ final_scan_insn (insn, file, optimize, prescan, nopeepholes)
debug_insn = insn;
#if defined (DWARF2_UNWIND_INFO) && !defined (ACCUMULATE_OUTGOING_ARGS)
/* If we push arguments, we want to know where the calls are. */
if (GET_CODE (insn) == CALL_INSN && dwarf2out_do_frame ())
dwarf2out_frame_debug (insn);
#endif
/* If the proper template needs to be chosen by some C code,
run that code and get the real template. */
@ -2046,21 +2025,6 @@ final_scan_insn (insn, file, optimize, prescan, nopeepholes)
output_asm_insn (template, recog_operand);
#if defined (DWARF2_UNWIND_INFO)
#if !defined (ACCUMULATE_OUTGOING_ARGS)
/* If we push arguments, we need to check all insns for stack
adjustments. */
if (GET_CODE (insn) == INSN && dwarf2out_do_frame ())
dwarf2out_frame_debug (insn);
#else
#if defined (HAVE_prologue)
/* If this insn is part of the prologue, emit DWARF v2
call frame info. */
if (RTX_FRAME_RELATED_P (insn) && dwarf2out_do_frame ())
dwarf2out_frame_debug (insn);
#endif
#endif
#endif
#if 0
/* It's not at all clear why we did this and doing so interferes

View File

@ -152,10 +152,6 @@ extern void readonly_data_section (void);
/* Determine if we're in the text section. */
extern int in_text_section (void);
#ifdef EH_FRAME_SECTION_ASM_OP
extern void eh_frame_section (void);
#endif
#ifdef TREE_CODE
/* Tell assembler to change to section NAME for DECL.
If DECL is NULL, just switch to section NAME.

View File

@ -207,7 +207,6 @@ static void emovz (uint16_t *, uint16_t *);
static void einan (uint16_t *);
static int eiisnan (uint16_t *);
static int eiisneg (uint16_t *);
static int eiisinf (uint16_t *);
static int ecmpm (uint16_t *, uint16_t *);
static void eshdn1 (uint16_t *);
static void eshup1 (uint16_t *);
@ -1426,22 +1425,6 @@ eiisneg (x)
return x[0] != 0;
}
/* Return nonzero if exploded e-type X is infinite. */
static int
eiisinf (x)
uint16_t x[];
{
if (eiisnan (x))
return (0);
if ((x[E] & 0x7fff) == 0x7fff)
return (1);
return (0);
}
/* Compare significands of numbers in internal exploded e-type format.
Guard words are included in the comparison.

View File

@ -42,7 +42,7 @@
#include "toplev.h"
#include "expr.h"
#if defined (DWARF2_UNWIND_INFO) || defined (DWARF2_DEBUGGING_INFO)
#if defined (DWARF2_DEBUGGING_INFO)
#include "dwarf2out.h"
#endif
@ -2144,22 +2144,8 @@ compile_file(char *name)
warning("-ffunction-sections may affect debugging on some targets.");
#endif
/* ??? Note: There used to be a conditional here
to call assemble_zeros without fail if DBX_DEBUGGING_INFO is defined.
This was to guarantee separation between gcc_compiled. and
the first function, for the sake of dbx on Suns.
However, having the extra zero here confused the Emacs
code for unexec, and might confuse other programs too.
Therefore, I took out that change.
In future versions we should find another way to solve
that dbx problem. -- rms, 23 May 93. */
/* Initialize DWARF-2. */
/* If dbx symbol table desired, initialize writing it
and output the predefined types. */
#ifdef DWARF2_UNWIND_INFO
if (dwarf2out_do_frame())
dwarf2out_frame_init();
#endif
#ifdef DWARF2_DEBUGGING_INFO
if (write_symbols == DWARF2_DEBUG)
TIMEVAR(symout_time, dwarf2out_init(asm_out_file, main_input_filename));
@ -2364,10 +2350,6 @@ compile_file(char *name)
weak_finish();
#ifdef DWARF2_UNWIND_INFO
if (dwarf2out_do_frame())
dwarf2out_frame_finish();
#endif
#ifdef DWARF2_DEBUGGING_INFO
if (write_symbols == DWARF2_DEBUG)
@ -3965,11 +3947,7 @@ larger_than_lose:;
if (exceptions_via_longjmp == 2)
{
#ifdef DWARF2_UNWIND_INFO
exceptions_via_longjmp = !DWARF2_UNWIND_INFO;
#else
exceptions_via_longjmp = 1;
#endif
}
/* Unrolling all loops implies that standard loop unrolling must also

View File

@ -1986,35 +1986,6 @@ extern tree invert_truthvalue (tree);
extern int dwarf2out_do_frame (void);
/* Generate a new label for the CFI info to refer to. */
extern char *dwarf2out_cfi_label (void);
/* Entry point to update the canonical frame address (CFA). */
extern void dwarf2out_def_cfa (char *, unsigned, long);
/* Add the CFI for saving a register window. */
extern void dwarf2out_window_save (char *);
/* Add a CFI to update the running total of the size of arguments pushed
onto the stack. */
extern void dwarf2out_args_size (char *, long);
/* Entry point for saving a register to the stack. */
extern void dwarf2out_reg_save (char *, unsigned, long);
/* Entry point for saving the return address in the stack. */
extern void dwarf2out_return_save (char *, long);
/* Entry point for saving the return address in a register. */
extern void dwarf2out_return_reg (char *, unsigned);
/* Output a marker (i.e. a label) for the beginning of a function, before
the prologue. */
@ -2281,35 +2252,6 @@ extern tree get_file_function_name (int);
extern int dwarf2out_do_frame (void);
/* Generate a new label for the CFI info to refer to. */
extern char *dwarf2out_cfi_label (void);
/* Entry point to update the canonical frame address (CFA). */
extern void dwarf2out_def_cfa (char *, unsigned, long);
/* Add the CFI for saving a register window. */
extern void dwarf2out_window_save (char *);
/* Add a CFI to update the running total of the size of arguments pushed
onto the stack. */
extern void dwarf2out_args_size (char *, long);
/* Entry point for saving a register to the stack. */
extern void dwarf2out_reg_save (char *, unsigned, long);
/* Entry point for saving the return address in the stack. */
extern void dwarf2out_return_save (char *, long);
/* Entry point for saving the return address in a register. */
extern void dwarf2out_return_reg (char *, unsigned);
/* Output a marker (i.e. a label) for the beginning of a function, before
the prologue. */

View File

@ -156,9 +156,6 @@ static enum in_section { no_section, in_text, in_data, in_named
#ifdef BSS_SECTION_ASM_OP
, in_bss
#endif
#ifdef EH_FRAME_SECTION_ASM_OP
, in_eh_frame
#endif
#ifdef EXTRA_SECTIONS
, EXTRA_SECTIONS
#endif
@ -371,18 +368,6 @@ asm_output_aligned_bss (file, decl, name, size, align)
#endif /* BSS_SECTION_ASM_OP */
#ifdef EH_FRAME_SECTION_ASM_OP
void
eh_frame_section ()
{
if (in_section != in_eh_frame)
{
fprintf (asm_out_file, "%s\n", EH_FRAME_SECTION_ASM_OP);
in_section = in_eh_frame;
}
}
#endif
/* Switch to the section for function DECL.
If DECL is NULL_TREE, switch to the text section.