Commit 8215347e by Jim Wilson Committed by Jim Wilson

Make ia64 port use tags instead of labels for debug info labels.

	* defaults.h (ASM_OUTPUT_DEBUG_LABEL): New.
	* tm.texi (ASM_OUTPUT_DEBUG_LABEL): Document.
	* dwarf2out.c (dwarf2out_begin_block): Use ASM_OUTPUT_DEBUG_LABEL
	instead of ASM_OUTPUT_INTERNAL_LABEL.
	(dwarf2out_end_block, dwarf2out_label): Likewise.
	* final.c (final_scan_insn, case NOTE_INSN_DELETED_LABEL): Likewise
	* config/ia64/ia64.h (ASM_OUTPUT_DEBUG_LABEL): Define.

From-SVN: r37174
parent 4547105f
2000-10-31 Jim Wilson <wilson@redhat.com>
* defaults.h (ASM_OUTPUT_DEBUG_LABEL): New.
* tm.texi (ASM_OUTPUT_DEBUG_LABEL): Document.
* dwarf2out.c (dwarf2out_begin_block): Use ASM_OUTPUT_DEBUG_LABEL
instead of ASM_OUTPUT_INTERNAL_LABEL.
(dwarf2out_end_block, dwarf2out_label): Likewise.
* final.c (final_scan_insn, case NOTE_INSN_DELETED_LABEL): Likewise
* config/ia64/ia64.h (ASM_OUTPUT_DEBUG_LABEL): Define.
2000-10-31 Richard Henderson <rth@redhat.com> 2000-10-31 Richard Henderson <rth@redhat.com>
* dwarf2out.c (struct dw_loc_descr_struct): Add dw_loc_addr. * dwarf2out.c (struct dw_loc_descr_struct): Add dw_loc_addr.
......
...@@ -2637,6 +2637,18 @@ do { \ ...@@ -2637,6 +2637,18 @@ do { \
#define DWARF2_ASM_LINE_DEBUG_INFO (TARGET_DWARF2_ASM) #define DWARF2_ASM_LINE_DEBUG_INFO (TARGET_DWARF2_ASM)
/* Use tags for debug info labels, so that they don't break instruction
bundles. This also avoids getting spurious DV warnings from the
assembler. This is similar to ASM_OUTPUT_INTERNAL_LABEL, except that we
add brackets around the label. */
#define ASM_OUTPUT_DEBUG_LABEL(FILE, PREFIX, NUM) \
do \
{ \
fprintf (FILE, "[.%s%d:]\n", PREFIX, NUM); \
} \
while (0)
/* Cross Compilation and Floating Point. */ /* Cross Compilation and Floating Point. */
......
...@@ -133,6 +133,15 @@ do { ASM_OUTPUT_LABEL(FILE,LABEL_ALTERNATE_NAME (INSN)); } while (0) ...@@ -133,6 +133,15 @@ do { ASM_OUTPUT_LABEL(FILE,LABEL_ALTERNATE_NAME (INSN)); } while (0)
#define ASM_OUTPUT_LABELREF(FILE,NAME) asm_fprintf ((FILE), "%U%s", (NAME)) #define ASM_OUTPUT_LABELREF(FILE,NAME) asm_fprintf ((FILE), "%U%s", (NAME))
#endif #endif
/* Allow target to print debug info labels specially. This is useful for
VLIW targets, since debug info labels should go into the middle of
instruction bundles instead of breaking them. */
#ifndef ASM_OUTPUT_DEBUG_LABEL
#define ASM_OUTPUT_DEBUG_LABEL(FILE, PREFIX, NUM) \
ASM_OUTPUT_INTERNAL_LABEL (FILE, PREFIX, NUM)
#endif
/* This determines whether or not we support weak symbols. */ /* This determines whether or not we support weak symbols. */
#ifndef SUPPORTS_WEAK #ifndef SUPPORTS_WEAK
#ifdef ASM_WEAKEN_LABEL #ifdef ASM_WEAKEN_LABEL
......
...@@ -10929,7 +10929,7 @@ dwarf2out_begin_block (blocknum) ...@@ -10929,7 +10929,7 @@ dwarf2out_begin_block (blocknum)
register unsigned blocknum; register unsigned blocknum;
{ {
function_section (current_function_decl); function_section (current_function_decl);
ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, BLOCK_BEGIN_LABEL, blocknum); ASM_OUTPUT_DEBUG_LABEL (asm_out_file, BLOCK_BEGIN_LABEL, blocknum);
} }
/* Output a marker (i.e. a label) for the end of the generated code for a /* Output a marker (i.e. a label) for the end of the generated code for a
...@@ -10940,7 +10940,7 @@ dwarf2out_end_block (blocknum) ...@@ -10940,7 +10940,7 @@ dwarf2out_end_block (blocknum)
register unsigned blocknum; register unsigned blocknum;
{ {
function_section (current_function_decl); function_section (current_function_decl);
ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, BLOCK_END_LABEL, blocknum); ASM_OUTPUT_DEBUG_LABEL (asm_out_file, BLOCK_END_LABEL, blocknum);
} }
/* Returns nonzero if it is appropriate not to emit any debugging /* Returns nonzero if it is appropriate not to emit any debugging
...@@ -10975,7 +10975,7 @@ dwarf2out_label (insn) ...@@ -10975,7 +10975,7 @@ dwarf2out_label (insn)
{ {
function_section (current_function_decl); function_section (current_function_decl);
sprintf (label, INSN_LABEL_FMT, current_funcdef_number); sprintf (label, INSN_LABEL_FMT, current_funcdef_number);
ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, label, ASM_OUTPUT_DEBUG_LABEL (asm_out_file, label,
(unsigned) INSN_UID (insn)); (unsigned) INSN_UID (insn));
} }
} }
......
...@@ -2270,7 +2270,7 @@ final_scan_insn (insn, file, optimize, prescan, nopeepholes) ...@@ -2270,7 +2270,7 @@ final_scan_insn (insn, file, optimize, prescan, nopeepholes)
referenced (in the form of having its address taken. */ referenced (in the form of having its address taken. */
/* ??? Figure out how not to do this unconditionally. This /* ??? Figure out how not to do this unconditionally. This
interferes with bundling on LIW targets. */ interferes with bundling on LIW targets. */
ASM_OUTPUT_INTERNAL_LABEL (file, "L", CODE_LABEL_NUMBER (insn)); ASM_OUTPUT_DEBUG_LABEL (file, "L", CODE_LABEL_NUMBER (insn));
if (debug_info_level == DINFO_LEVEL_NORMAL if (debug_info_level == DINFO_LEVEL_NORMAL
|| debug_info_level == DINFO_LEVEL_VERBOSE) || debug_info_level == DINFO_LEVEL_VERBOSE)
......
...@@ -5945,6 +5945,19 @@ The usual definition of this macro is as follows: ...@@ -5945,6 +5945,19 @@ The usual definition of this macro is as follows:
fprintf (@var{stream}, "L%s%d:\n", @var{prefix}, @var{num}) fprintf (@var{stream}, "L%s%d:\n", @var{prefix}, @var{num})
@end example @end example
@findex ASM_OUTPUT_DEBUG_LABEL
@item ASM_OUTPUT_DEBUG_LABEL (@var{stream}, @var{prefix}, @var{num})
A C statement to output to the stdio stream @var{stream} a debug info
label whose name is made from the string @var{prefix} and the number
@var{num}. This is useful for VLIW targets, where debug info labels
may need to be treated differently than branch target labels. On some
systems, branch target labels must be at the beginning of instruction
bundles, but debug info labels can occur in the middle of instruction
bundles.
If this macro is not defined, then @code{ASM_OUTPUT_INTERNAL_LABEL} will be
used.
@findex ASM_OUTPUT_ALTERNATE_LABEL_NAME @findex ASM_OUTPUT_ALTERNATE_LABEL_NAME
@item ASM_OUTPUT_ALTERNATE_LABEL_NAME (@var{stream}, @var{string}) @item ASM_OUTPUT_ALTERNATE_LABEL_NAME (@var{stream}, @var{string})
A C statement to output to the stdio stream @var{stream} the string A C statement to output to the stdio stream @var{stream} the string
......
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