Commit 2784ed9c by Kai Tietz Committed by Kai Tietz

final.c (final_scan_insn): Replace TARGET_UNWIND_INFO macro check by unwind_emit hook NULL check.

2010-07-08  Kai Tietz  <kai.tietz@onevision.com>

	* final.c (final_scan_insn): Replace
	TARGET_UNWIND_INFO macro check by unwind_emit
	hook NULL check.
	* targhooks.c (default_unwind_emit): Removed.
	* targhooks.h (default_unwind_emit): Likewise.
	* target.def (unwind_emit): Set default value to NULL.

From-SVN: r161972
parent 135a687e
2010-07-08 Kai Tietz <kai.tietz@onevision.com> 2010-07-08 Kai Tietz <kai.tietz@onevision.com>
* final.c (final_scan_insn): Replace
TARGET_UNWIND_INFO macro check by unwind_emit
hook NULL check.
* targhooks.c (default_unwind_emit): Removed.
* targhooks.h (default_unwind_emit): Likewise.
* target.def (unwind_emit): Set default value to NULL.
* config/i386/i386-protos.h (ix86_asm_output_function_label): * config/i386/i386-protos.h (ix86_asm_output_function_label):
New prototype. New prototype.
* config/i386/i386.c (ix86_function_ms_hook_prologue): Check * config/i386/i386.c (ix86_function_ms_hook_prologue): Check
......
...@@ -1850,9 +1850,8 @@ final_scan_insn (rtx insn, FILE *file, int optimize ATTRIBUTE_UNUSED, ...@@ -1850,9 +1850,8 @@ final_scan_insn (rtx insn, FILE *file, int optimize ATTRIBUTE_UNUSED,
break; break;
case NOTE_INSN_BASIC_BLOCK: case NOTE_INSN_BASIC_BLOCK:
#ifdef TARGET_UNWIND_INFO if (targetm.asm_out.unwind_emit)
targetm.asm_out.unwind_emit (asm_out_file, insn); targetm.asm_out.unwind_emit (asm_out_file, insn);
#endif
if (flag_debug_asm) if (flag_debug_asm)
fprintf (asm_out_file, "\t%s basic block %d\n", fprintf (asm_out_file, "\t%s basic block %d\n",
...@@ -2659,12 +2658,11 @@ final_scan_insn (rtx insn, FILE *file, int optimize ATTRIBUTE_UNUSED, ...@@ -2659,12 +2658,11 @@ final_scan_insn (rtx insn, FILE *file, int optimize ATTRIBUTE_UNUSED,
return new_rtx; return new_rtx;
} }
#ifdef TARGET_UNWIND_INFO
/* ??? This will put the directives in the wrong place if /* ??? This will put the directives in the wrong place if
get_insn_template outputs assembly directly. However calling it get_insn_template outputs assembly directly. However calling it
before get_insn_template breaks if the insns is split. */ before get_insn_template breaks if the insns is split. */
targetm.asm_out.unwind_emit (asm_out_file, insn); if (targetm.asm_out.unwind_emit)
#endif targetm.asm_out.unwind_emit (asm_out_file, insn);
if (CALL_P (insn)) if (CALL_P (insn))
{ {
......
...@@ -150,7 +150,7 @@ DEFHOOK ...@@ -150,7 +150,7 @@ DEFHOOK
(unwind_emit, (unwind_emit,
"", "",
void, (FILE *stream, rtx insn), void, (FILE *stream, rtx insn),
default_unwind_emit) NULL)
/* Output an internal label. */ /* Output an internal label. */
DEFHOOK DEFHOOK
......
...@@ -316,16 +316,6 @@ hook_callee_copies_named (CUMULATIVE_ARGS *ca ATTRIBUTE_UNUSED, ...@@ -316,16 +316,6 @@ hook_callee_copies_named (CUMULATIVE_ARGS *ca ATTRIBUTE_UNUSED,
return named; return named;
} }
/* Emit any directives required to unwind this instruction. */
void
default_unwind_emit (FILE * stream ATTRIBUTE_UNUSED,
rtx insn ATTRIBUTE_UNUSED)
{
/* Should never happen. */
gcc_unreachable ();
}
/* Emit to STREAM the assembler syntax for insn operand X. */ /* Emit to STREAM the assembler syntax for insn operand X. */
void void
......
...@@ -62,7 +62,6 @@ extern bool hook_pass_by_reference_must_pass_in_stack ...@@ -62,7 +62,6 @@ extern bool hook_pass_by_reference_must_pass_in_stack
extern bool hook_callee_copies_named extern bool hook_callee_copies_named
(CUMULATIVE_ARGS *ca, enum machine_mode, const_tree, bool); (CUMULATIVE_ARGS *ca, enum machine_mode, const_tree, bool);
extern void default_unwind_emit (FILE *, rtx);
extern void default_print_operand (FILE *, rtx, int); extern void default_print_operand (FILE *, rtx, int);
extern void default_print_operand_address (FILE *, rtx); extern void default_print_operand_address (FILE *, rtx);
extern bool default_print_operand_punct_valid_p (unsigned char); extern bool default_print_operand_punct_valid_p (unsigned char);
......
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