Commit 083cad55 by Eric Christopher Committed by Eric Christopher

tm.texi (TARGET_ASM_EMIT_EXCEPT_TABLE_LABEL): Document.

2006-01-06  Eric Christopher  <echristo@apple.com>

        * doc/tm.texi (TARGET_ASM_EMIT_EXCEPT_TABLE_LABEL): Document.
        (TARGET_UNWIND_EMIT): Fix spelling.
        * target.h (gcc_target): Add except_table_label.
        * except.c (output_function_exception_table): Use.
        * varasm.c (default_emit_except_table_label): New.
        * target-def.h (TARGET_ASM_EMIT_EXCEPT_TABLE_LABEL): New default
        define.
        (asm_out): Add here.
        * output.h (default_emit_except_table_label): Prototype.
        * config/darwin-protos.h (darwin_emit_except_table_label): Ditto.
        * config/darwin.c (darwin_emit_except_table_label): Define.
        * config/darwin.h (TARGET_ASM_EMIT_EXCEPT_TABLE): Ditto.

From-SVN: r109435
parent facb553f
2006-01-06 Eric Christopher <echristo@apple.com>
* doc/tm.texi (TARGET_ASM_EMIT_EXCEPT_TABLE_LABEL): Document.
(TARGET_UNWIND_EMIT): Fix spelling.
* target.h (gcc_target): Add except_table_label.
* except.c (output_function_exception_table): Use.
* varasm.c (default_emit_except_table_label): New.
* target-def.h (TARGET_ASM_EMIT_EXCEPT_TABLE_LABEL): New default
define.
(asm_out): Add here.
* output.h (default_emit_except_table_label): Prototype.
* config/darwin-protos.h (darwin_emit_except_table_label): Ditto.
* config/darwin.c (darwin_emit_except_table_label): Define.
* config/darwin.h (TARGET_ASM_EMIT_EXCEPT_TABLE): Ditto.
2005-01-06 Zdenek Dvorak <dvorakz@suse.cz> 2005-01-06 Zdenek Dvorak <dvorakz@suse.cz>
PR tree-optimization/18527 PR tree-optimization/18527
...@@ -379,4 +394,3 @@ ...@@ -379,4 +394,3 @@
* config/rs6000/sync.md (sync_compare_and_swap{hi,qi}): New. * config/rs6000/sync.md (sync_compare_and_swap{hi,qi}): New.
(sync_compare_and_swapqhi_internal): New. (sync_compare_and_swapqhi_internal): New.
* config/rs6000/rs6000-protos.h: Declare. * config/rs6000/rs6000-protos.h: Declare.
...@@ -60,6 +60,7 @@ extern void darwin_asm_named_section (const char *, unsigned int, tree); ...@@ -60,6 +60,7 @@ extern void darwin_asm_named_section (const char *, unsigned int, tree);
extern void darwin_non_lazy_pcrel (FILE *, rtx); extern void darwin_non_lazy_pcrel (FILE *, rtx);
extern void darwin_emit_unwind_label (FILE *, tree, int, int); extern void darwin_emit_unwind_label (FILE *, tree, int, int);
extern void darwin_emit_except_table_label (FILE *);
extern void darwin_pragma_ignore (struct cpp_reader *); extern void darwin_pragma_ignore (struct cpp_reader *);
extern void darwin_pragma_options (struct cpp_reader *); extern void darwin_pragma_options (struct cpp_reader *);
......
...@@ -1377,6 +1377,17 @@ darwin_emit_unwind_label (FILE *file, tree decl, int for_eh, int empty) ...@@ -1377,6 +1377,17 @@ darwin_emit_unwind_label (FILE *file, tree decl, int for_eh, int empty)
free (lab); free (lab);
} }
static GTY(()) unsigned long except_table_label_num;
void
darwin_emit_except_table_label (FILE *file)
{
char section_start_label[30];
ASM_GENERATE_INTERNAL_LABEL (section_start_label, "GCC_except_table",
except_table_label_num++);
ASM_OUTPUT_LABEL (file, section_start_label);
}
/* Generate a PC-relative reference to a Mach-O non-lazy-symbol. */ /* Generate a PC-relative reference to a Mach-O non-lazy-symbol. */
void void
......
...@@ -436,6 +436,9 @@ Boston, MA 02110-1301, USA. */ ...@@ -436,6 +436,9 @@ Boston, MA 02110-1301, USA. */
emit a label for an empty FDE. */ emit a label for an empty FDE. */
#define TARGET_ASM_EMIT_UNWIND_LABEL darwin_emit_unwind_label #define TARGET_ASM_EMIT_UNWIND_LABEL darwin_emit_unwind_label
/* Emit a label to separate the exception table. */
#define TARGET_ASM_EMIT_EXCEPT_TABLE_LABEL darwin_emit_except_table_label
/* Our profiling scheme doesn't LP labels and counter words. */ /* Our profiling scheme doesn't LP labels and counter words. */
#define NO_PROFILE_COUNTERS 1 #define NO_PROFILE_COUNTERS 1
......
...@@ -7687,7 +7687,15 @@ true if this is a placeholder label for an omitted FDE@. ...@@ -7687,7 +7687,15 @@ true if this is a placeholder label for an omitted FDE@.
The default is that FDEs are not given nonlocal labels. The default is that FDEs are not given nonlocal labels.
@end deftypefn @end deftypefn
@deftypefn {Taget Hook} void TARGET_UNWIND_EMIT (FILE * @var{stream}, rtx @var{insn}) @deftypefn {Target Hook} void TARGET_ASM_EMIT_EXCEPT_TABLE_LABEL (@var{stream})
This target hook emits a label at the beginning of the exception table.
It should be defined on targets where it is desirable for the table
to be broken up according to function.
The default is that no label is emitted.
@end deftypefn
@deftypefn {Target Hook} void TARGET_UNWIND_EMIT (FILE * @var{stream}, rtx @var{insn})
This target hook emits and assembly directives required to unwind the This target hook emits and assembly directives required to unwind the
given instruction. This is only used when TARGET_UNWIND_INFO is set. given instruction. This is only used when TARGET_UNWIND_INFO is set.
@end deftypefn @end deftypefn
......
...@@ -252,7 +252,6 @@ struct eh_status GTY(()) ...@@ -252,7 +252,6 @@ struct eh_status GTY(())
htab_t GTY((param_is (struct throw_stmt_node))) throw_stmt_table; htab_t GTY((param_is (struct throw_stmt_node))) throw_stmt_table;
}; };
static int t2r_eq (const void *, const void *); static int t2r_eq (const void *, const void *);
static hashval_t t2r_hash (const void *); static hashval_t t2r_hash (const void *);
static void add_type_for_runtime (tree); static void add_type_for_runtime (tree);
...@@ -3539,6 +3538,9 @@ output_function_exception_table (void) ...@@ -3539,6 +3538,9 @@ output_function_exception_table (void)
switch_to_exception_section (); switch_to_exception_section ();
#endif #endif
/* If the target wants a label to begin the table, emit it here. */
targetm.asm_out.except_table_label (asm_out_file);
have_tt_data = (VEC_length (tree, cfun->eh->ttype_data) > 0 have_tt_data = (VEC_length (tree, cfun->eh->ttype_data) > 0
|| VARRAY_ACTIVE_SIZE (cfun->eh->ehspec_data) > 0); || VARRAY_ACTIVE_SIZE (cfun->eh->ehspec_data) > 0);
......
...@@ -550,6 +550,7 @@ extern bool default_binds_local_p (tree); ...@@ -550,6 +550,7 @@ extern bool default_binds_local_p (tree);
extern bool default_binds_local_p_1 (tree, int); extern bool default_binds_local_p_1 (tree, int);
extern void default_globalize_label (FILE *, const char *); extern void default_globalize_label (FILE *, const char *);
extern void default_emit_unwind_label (FILE *, tree, int, int); extern void default_emit_unwind_label (FILE *, tree, int, int);
extern void default_emit_except_table_label (FILE *);
extern void default_internal_label (FILE *, const char *, unsigned long); extern void default_internal_label (FILE *, const char *, unsigned long);
extern void default_file_start (void); extern void default_file_start (void);
extern void file_end_indicate_exec_stack (void); extern void file_end_indicate_exec_stack (void);
......
...@@ -62,6 +62,10 @@ Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ...@@ -62,6 +62,10 @@ Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#define TARGET_ASM_EMIT_UNWIND_LABEL default_emit_unwind_label #define TARGET_ASM_EMIT_UNWIND_LABEL default_emit_unwind_label
#endif #endif
#ifndef TARGET_ASM_EMIT_EXCEPT_TABLE_LABEL
#define TARGET_ASM_EMIT_EXCEPT_TABLE_LABEL default_emit_except_table_label
#endif
#ifndef TARGET_UNWIND_EMIT #ifndef TARGET_UNWIND_EMIT
#define TARGET_UNWIND_EMIT default_unwind_emit #define TARGET_UNWIND_EMIT default_unwind_emit
#endif #endif
...@@ -221,6 +225,7 @@ Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ...@@ -221,6 +225,7 @@ Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
TARGET_ASM_INTEGER, \ TARGET_ASM_INTEGER, \
TARGET_ASM_GLOBALIZE_LABEL, \ TARGET_ASM_GLOBALIZE_LABEL, \
TARGET_ASM_EMIT_UNWIND_LABEL, \ TARGET_ASM_EMIT_UNWIND_LABEL, \
TARGET_ASM_EMIT_EXCEPT_TABLE_LABEL, \
TARGET_UNWIND_EMIT, \ TARGET_UNWIND_EMIT, \
TARGET_ASM_INTERNAL_LABEL, \ TARGET_ASM_INTERNAL_LABEL, \
TARGET_ASM_TTYPE, \ TARGET_ASM_TTYPE, \
......
...@@ -102,6 +102,10 @@ struct gcc_target ...@@ -102,6 +102,10 @@ struct gcc_target
this is only a placeholder for an omitted FDE. */ this is only a placeholder for an omitted FDE. */
void (* unwind_label) (FILE *, tree, int, int); void (* unwind_label) (FILE *, tree, int, int);
/* Output code that will emit a label to divide up the exception
table. */
void (* except_table_label) (FILE *);
/* Emit any directives required to unwind this instruction. */ /* Emit any directives required to unwind this instruction. */
void (* unwind_emit) (FILE *, rtx); void (* unwind_emit) (FILE *, rtx);
......
...@@ -5555,6 +5555,14 @@ default_emit_unwind_label (FILE * stream ATTRIBUTE_UNUSED, ...@@ -5555,6 +5555,14 @@ default_emit_unwind_label (FILE * stream ATTRIBUTE_UNUSED,
{ {
} }
/* Default function to output a label to divide up the exception table.
The default is to do nothing. A target that needs/wants to divide
up the table must provide it's own function to do this. */
void
default_emit_except_table_label (FILE * stream ATTRIBUTE_UNUSED)
{
}
/* This is how to output an internal numbered label where PREFIX is /* This is how to output an internal numbered label where PREFIX is
the class of label and LABELNO is the number within the class. */ the class of label and LABELNO is the number within the class. */
......
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