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 *);
......
...@@ -66,7 +66,7 @@ Boston, MA 02110-1301, USA. */ ...@@ -66,7 +66,7 @@ Boston, MA 02110-1301, USA. */
allows all uses of the old name to forward to the replacement, allows all uses of the old name to forward to the replacement,
including existing function pointers and virtual methods. See including existing function pointers and virtual methods. See
rs6000_emit_prologue for the code that handles the nop insertions. rs6000_emit_prologue for the code that handles the nop insertions.
The added indirection allows gdb to redirect accesses to static The added indirection allows gdb to redirect accesses to static
symbols from the newly loaded translation unit to the existing symbols from the newly loaded translation unit to the existing
symbol, if any. @code{static} symbols are special and are handled by symbol, if any. @code{static} symbols are special and are handled by
...@@ -89,7 +89,7 @@ output_objc_section_asm_op (const void *directive) ...@@ -89,7 +89,7 @@ output_objc_section_asm_op (const void *directive)
if (! been_here) if (! been_here)
{ {
static const enum darwin_section_enum tomark[] = static const enum darwin_section_enum tomark[] =
{ {
/* written, cold -> hot */ /* written, cold -> hot */
objc_cat_cls_meth_section, objc_cat_cls_meth_section,
...@@ -115,7 +115,7 @@ output_objc_section_asm_op (const void *directive) ...@@ -115,7 +115,7 @@ output_objc_section_asm_op (const void *directive)
objc_symbols_section objc_symbols_section
}; };
size_t i; size_t i;
been_here = true; been_here = true;
for (i = 0; i < ARRAY_SIZE (tomark); i++) for (i = 0; i < ARRAY_SIZE (tomark); i++)
switch_to_section (darwin_sections[tomark[i]]); switch_to_section (darwin_sections[tomark[i]]);
...@@ -190,10 +190,10 @@ machopic_classify_symbol (rtx sym_ref) ...@@ -190,10 +190,10 @@ machopic_classify_symbol (rtx sym_ref)
flags = SYMBOL_REF_FLAGS (sym_ref); flags = SYMBOL_REF_FLAGS (sym_ref);
function_p = SYMBOL_REF_FUNCTION_P (sym_ref); function_p = SYMBOL_REF_FUNCTION_P (sym_ref);
if (machopic_symbol_defined_p (sym_ref)) if (machopic_symbol_defined_p (sym_ref))
return (function_p return (function_p
? MACHOPIC_DEFINED_FUNCTION : MACHOPIC_DEFINED_DATA); ? MACHOPIC_DEFINED_FUNCTION : MACHOPIC_DEFINED_DATA);
else else
return (function_p return (function_p
? MACHOPIC_UNDEFINED_FUNCTION : MACHOPIC_UNDEFINED_DATA); ? MACHOPIC_UNDEFINED_FUNCTION : MACHOPIC_UNDEFINED_DATA);
} }
...@@ -256,7 +256,7 @@ void ...@@ -256,7 +256,7 @@ void
machopic_define_symbol (rtx mem) machopic_define_symbol (rtx mem)
{ {
rtx sym_ref; rtx sym_ref;
gcc_assert (GET_CODE (mem) == MEM); gcc_assert (GET_CODE (mem) == MEM);
sym_ref = XEXP (mem, 0); sym_ref = XEXP (mem, 0);
SYMBOL_REF_FLAGS (sym_ref) |= MACHO_SYMBOL_FLAG_DEFINED; SYMBOL_REF_FLAGS (sym_ref) |= MACHO_SYMBOL_FLAG_DEFINED;
...@@ -287,7 +287,7 @@ machopic_function_base_sym (void) ...@@ -287,7 +287,7 @@ machopic_function_base_sym (void)
rtx sym_ref; rtx sym_ref;
sym_ref = gen_rtx_SYMBOL_REF (Pmode, machopic_function_base_name ()); sym_ref = gen_rtx_SYMBOL_REF (Pmode, machopic_function_base_name ());
SYMBOL_REF_FLAGS (sym_ref) SYMBOL_REF_FLAGS (sym_ref)
|= (MACHO_SYMBOL_FLAG_VARIABLE | MACHO_SYMBOL_FLAG_DEFINED); |= (MACHO_SYMBOL_FLAG_VARIABLE | MACHO_SYMBOL_FLAG_DEFINED);
return sym_ref; return sym_ref;
} }
...@@ -344,7 +344,7 @@ typedef struct machopic_indirection GTY (()) ...@@ -344,7 +344,7 @@ typedef struct machopic_indirection GTY (())
/* A table mapping stub names and non-lazy pointer names to /* A table mapping stub names and non-lazy pointer names to
SYMBOL_REFs for the stubbed-to and pointed-to entities. */ SYMBOL_REFs for the stubbed-to and pointed-to entities. */
static GTY ((param_is (struct machopic_indirection))) htab_t static GTY ((param_is (struct machopic_indirection))) htab_t
machopic_indirections; machopic_indirections;
/* Return a hash value for a SLOT in the indirections hash table. */ /* Return a hash value for a SLOT in the indirections hash table. */
...@@ -396,7 +396,7 @@ machopic_indirection_name (rtx sym_ref, bool stub_p) ...@@ -396,7 +396,7 @@ machopic_indirection_name (rtx sym_ref, bool stub_p)
namelen = strlen (name); namelen = strlen (name);
} }
} }
if (name[0] == '*') if (name[0] == '*')
{ {
saw_star = true; saw_star = true;
...@@ -427,11 +427,11 @@ machopic_indirection_name (rtx sym_ref, bool stub_p) ...@@ -427,11 +427,11 @@ machopic_indirection_name (rtx sym_ref, bool stub_p)
sprintf (buffer, "&%sL%s%s%s%s", quote, prefix, name, suffix, quote); sprintf (buffer, "&%sL%s%s%s%s", quote, prefix, name, suffix, quote);
if (!machopic_indirections) if (!machopic_indirections)
machopic_indirections = htab_create_ggc (37, machopic_indirections = htab_create_ggc (37,
machopic_indirection_hash, machopic_indirection_hash,
machopic_indirection_eq, machopic_indirection_eq,
/*htab_del=*/NULL); /*htab_del=*/NULL);
slot = htab_find_slot_with_hash (machopic_indirections, buffer, slot = htab_find_slot_with_hash (machopic_indirections, buffer,
htab_hash_string (buffer), INSERT); htab_hash_string (buffer), INSERT);
if (*slot) if (*slot)
...@@ -447,7 +447,7 @@ machopic_indirection_name (rtx sym_ref, bool stub_p) ...@@ -447,7 +447,7 @@ machopic_indirection_name (rtx sym_ref, bool stub_p)
p->used = false; p->used = false;
*slot = p; *slot = p;
} }
return p->ptr_name; return p->ptr_name;
} }
...@@ -469,15 +469,15 @@ void ...@@ -469,15 +469,15 @@ void
machopic_validate_stub_or_non_lazy_ptr (const char *name) machopic_validate_stub_or_non_lazy_ptr (const char *name)
{ {
machopic_indirection *p; machopic_indirection *p;
p = ((machopic_indirection *) p = ((machopic_indirection *)
(htab_find_with_hash (machopic_indirections, name, (htab_find_with_hash (machopic_indirections, name,
htab_hash_string (name)))); htab_hash_string (name))));
if (p && ! p->used) if (p && ! p->used)
{ {
const char *real_name; const char *real_name;
tree id; tree id;
p->used = true; p->used = true;
/* Do what output_addr_const will do when we actually call it. */ /* Do what output_addr_const will do when we actually call it. */
...@@ -485,7 +485,7 @@ machopic_validate_stub_or_non_lazy_ptr (const char *name) ...@@ -485,7 +485,7 @@ machopic_validate_stub_or_non_lazy_ptr (const char *name)
mark_decl_referenced (SYMBOL_REF_DECL (p->symbol)); mark_decl_referenced (SYMBOL_REF_DECL (p->symbol));
real_name = targetm.strip_name_encoding (XSTR (p->symbol, 0)); real_name = targetm.strip_name_encoding (XSTR (p->symbol, 0));
id = maybe_get_identifier (real_name); id = maybe_get_identifier (real_name);
if (id) if (id)
mark_referenced (id); mark_referenced (id);
...@@ -556,7 +556,7 @@ machopic_indirect_data_reference (rtx orig, rtx reg) ...@@ -556,7 +556,7 @@ machopic_indirect_data_reference (rtx orig, rtx reg)
} }
ptr_ref = (gen_rtx_SYMBOL_REF ptr_ref = (gen_rtx_SYMBOL_REF
(Pmode, (Pmode,
machopic_indirection_name (orig, /*stub_p=*/false))); machopic_indirection_name (orig, /*stub_p=*/false)));
SYMBOL_REF_DECL (ptr_ref) = SYMBOL_REF_DECL (orig); SYMBOL_REF_DECL (ptr_ref) = SYMBOL_REF_DECL (orig);
...@@ -633,17 +633,17 @@ machopic_indirect_call_target (rtx target) ...@@ -633,17 +633,17 @@ machopic_indirect_call_target (rtx target)
if (GET_CODE (target) != MEM) if (GET_CODE (target) != MEM)
return target; return target;
if (MACHOPIC_INDIRECT if (MACHOPIC_INDIRECT
&& GET_CODE (XEXP (target, 0)) == SYMBOL_REF && GET_CODE (XEXP (target, 0)) == SYMBOL_REF
&& !(SYMBOL_REF_FLAGS (XEXP (target, 0)) && !(SYMBOL_REF_FLAGS (XEXP (target, 0))
& MACHO_SYMBOL_FLAG_DEFINED)) & MACHO_SYMBOL_FLAG_DEFINED))
{ {
rtx sym_ref = XEXP (target, 0); rtx sym_ref = XEXP (target, 0);
const char *stub_name = machopic_indirection_name (sym_ref, const char *stub_name = machopic_indirection_name (sym_ref,
/*stub_p=*/true); /*stub_p=*/true);
enum machine_mode mode = GET_MODE (sym_ref); enum machine_mode mode = GET_MODE (sym_ref);
tree decl = SYMBOL_REF_DECL (sym_ref); tree decl = SYMBOL_REF_DECL (sym_ref);
XEXP (target, 0) = gen_rtx_SYMBOL_REF (mode, stub_name); XEXP (target, 0) = gen_rtx_SYMBOL_REF (mode, stub_name);
SYMBOL_REF_DECL (XEXP (target, 0)) = decl; SYMBOL_REF_DECL (XEXP (target, 0)) = decl;
MEM_READONLY_P (target) = 1; MEM_READONLY_P (target) = 1;
...@@ -727,7 +727,7 @@ machopic_legitimize_pic_address (rtx orig, enum machine_mode mode, rtx reg) ...@@ -727,7 +727,7 @@ machopic_legitimize_pic_address (rtx orig, enum machine_mode mode, rtx reg)
rtx mem; rtx mem;
rtx insn; rtx insn;
rtx sum; rtx sum;
sum = gen_rtx_HIGH (Pmode, offset); sum = gen_rtx_HIGH (Pmode, offset);
if (! MACHO_DYNAMIC_NO_PIC_P) if (! MACHO_DYNAMIC_NO_PIC_P)
sum = gen_rtx_PLUS (Pmode, pic_offset_table_rtx, sum); sum = gen_rtx_PLUS (Pmode, pic_offset_table_rtx, sum);
...@@ -735,21 +735,21 @@ machopic_legitimize_pic_address (rtx orig, enum machine_mode mode, rtx reg) ...@@ -735,21 +735,21 @@ machopic_legitimize_pic_address (rtx orig, enum machine_mode mode, rtx reg)
emit_insn (gen_rtx_SET (Pmode, hi_sum_reg, sum)); emit_insn (gen_rtx_SET (Pmode, hi_sum_reg, sum));
mem = gen_const_mem (GET_MODE (orig), mem = gen_const_mem (GET_MODE (orig),
gen_rtx_LO_SUM (Pmode, gen_rtx_LO_SUM (Pmode,
hi_sum_reg, offset)); hi_sum_reg, offset));
insn = emit_insn (gen_rtx_SET (VOIDmode, reg, mem)); insn = emit_insn (gen_rtx_SET (VOIDmode, reg, mem));
REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_EQUAL, pic_ref, REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_EQUAL, pic_ref,
REG_NOTES (insn)); REG_NOTES (insn));
pic_ref = reg; pic_ref = reg;
#else #else
emit_insn (gen_rtx_USE (VOIDmode, emit_insn (gen_rtx_USE (VOIDmode,
gen_rtx_REG (Pmode, gen_rtx_REG (Pmode,
PIC_OFFSET_TABLE_REGNUM))); PIC_OFFSET_TABLE_REGNUM)));
emit_insn (gen_rtx_SET (VOIDmode, reg, emit_insn (gen_rtx_SET (VOIDmode, reg,
gen_rtx_HIGH (Pmode, gen_rtx_HIGH (Pmode,
gen_rtx_CONST (Pmode, gen_rtx_CONST (Pmode,
offset)))); offset))));
emit_insn (gen_rtx_SET (VOIDmode, reg, emit_insn (gen_rtx_SET (VOIDmode, reg,
gen_rtx_LO_SUM (Pmode, reg, gen_rtx_LO_SUM (Pmode, reg,
...@@ -769,7 +769,7 @@ machopic_legitimize_pic_address (rtx orig, enum machine_mode mode, rtx reg) ...@@ -769,7 +769,7 @@ machopic_legitimize_pic_address (rtx orig, enum machine_mode mode, rtx reg)
} }
#if 0 #if 0
emit_insn (gen_rtx_USE (VOIDmode, emit_insn (gen_rtx_USE (VOIDmode,
gen_rtx_REG (Pmode, gen_rtx_REG (Pmode,
PIC_OFFSET_TABLE_REGNUM))); PIC_OFFSET_TABLE_REGNUM)));
#endif #endif
...@@ -807,7 +807,7 @@ machopic_legitimize_pic_address (rtx orig, enum machine_mode mode, rtx reg) ...@@ -807,7 +807,7 @@ machopic_legitimize_pic_address (rtx orig, enum machine_mode mode, rtx reg)
? gen_rtx_HIGH (Pmode, offset) ? gen_rtx_HIGH (Pmode, offset)
: gen_rtx_PLUS (Pmode, : gen_rtx_PLUS (Pmode,
pic_offset_table_rtx, pic_offset_table_rtx,
gen_rtx_HIGH (Pmode, gen_rtx_HIGH (Pmode,
offset)))); offset))));
emit_insn (gen_rtx_SET (VOIDmode, reg, emit_insn (gen_rtx_SET (VOIDmode, reg,
gen_rtx_LO_SUM (Pmode, gen_rtx_LO_SUM (Pmode,
...@@ -929,14 +929,14 @@ machopic_output_indirection (void **slot, void *data) ...@@ -929,14 +929,14 @@ machopic_output_indirection (void **slot, void *data)
rtx symbol; rtx symbol;
const char *sym_name; const char *sym_name;
const char *ptr_name; const char *ptr_name;
if (!p->used) if (!p->used)
return 1; return 1;
symbol = p->symbol; symbol = p->symbol;
sym_name = XSTR (symbol, 0); sym_name = XSTR (symbol, 0);
ptr_name = p->ptr_name; ptr_name = p->ptr_name;
if (p->stub_p) if (p->stub_p)
{ {
char *sym; char *sym;
...@@ -988,11 +988,11 @@ machopic_output_indirection (void **slot, void *data) ...@@ -988,11 +988,11 @@ machopic_output_indirection (void **slot, void *data)
switch_to_section (darwin_sections[machopic_nl_symbol_ptr_section]); switch_to_section (darwin_sections[machopic_nl_symbol_ptr_section]);
assemble_name (asm_out_file, ptr_name); assemble_name (asm_out_file, ptr_name);
fprintf (asm_out_file, ":\n"); fprintf (asm_out_file, ":\n");
fprintf (asm_out_file, "\t.indirect_symbol "); fprintf (asm_out_file, "\t.indirect_symbol ");
assemble_name (asm_out_file, sym_name); assemble_name (asm_out_file, sym_name);
fprintf (asm_out_file, "\n"); fprintf (asm_out_file, "\n");
/* Variables that are marked with MACHO_SYMBOL_STATIC need to /* Variables that are marked with MACHO_SYMBOL_STATIC need to
have their symbol name instead of 0 in the second entry of have their symbol name instead of 0 in the second entry of
the non-lazy symbol pointer data structure when they are the non-lazy symbol pointer data structure when they are
...@@ -1007,7 +1007,7 @@ machopic_output_indirection (void **slot, void *data) ...@@ -1007,7 +1007,7 @@ machopic_output_indirection (void **slot, void *data)
assemble_integer (init, GET_MODE_SIZE (Pmode), assemble_integer (init, GET_MODE_SIZE (Pmode),
GET_MODE_ALIGNMENT (Pmode), 1); GET_MODE_ALIGNMENT (Pmode), 1);
} }
return 1; return 1;
} }
...@@ -1273,14 +1273,14 @@ darwin_globalize_label (FILE *stream, const char *name) ...@@ -1273,14 +1273,14 @@ darwin_globalize_label (FILE *stream, const char *name)
} }
void void
darwin_asm_named_section (const char *name, darwin_asm_named_section (const char *name,
unsigned int flags ATTRIBUTE_UNUSED, unsigned int flags ATTRIBUTE_UNUSED,
tree decl ATTRIBUTE_UNUSED) tree decl ATTRIBUTE_UNUSED)
{ {
fprintf (asm_out_file, "\t.section %s\n", name); fprintf (asm_out_file, "\t.section %s\n", name);
} }
void void
darwin_unique_section (tree decl ATTRIBUTE_UNUSED, int reloc ATTRIBUTE_UNUSED) darwin_unique_section (tree decl ATTRIBUTE_UNUSED, int reloc ATTRIBUTE_UNUSED)
{ {
/* Darwin does not use unique sections. */ /* Darwin does not use unique sections. */
...@@ -1313,12 +1313,12 @@ no_dead_strip (FILE *file, const char *lab) ...@@ -1313,12 +1313,12 @@ no_dead_strip (FILE *file, const char *lab)
fprintf (file, ".no_dead_strip %s\n", lab); fprintf (file, ".no_dead_strip %s\n", lab);
} }
/* Emit a label for an FDE, making it global and/or weak if appropriate. /* Emit a label for an FDE, making it global and/or weak if appropriate.
The third parameter is nonzero if this is for exception handling. The third parameter is nonzero if this is for exception handling.
The fourth parameter is nonzero if this is just a placeholder for an The fourth parameter is nonzero if this is just a placeholder for an
FDE that we are omitting. */ FDE that we are omitting. */
void void
darwin_emit_unwind_label (FILE *file, tree decl, int for_eh, int empty) darwin_emit_unwind_label (FILE *file, tree decl, int for_eh, int empty)
{ {
tree id = DECL_ASSEMBLER_NAME (decl) tree id = DECL_ASSEMBLER_NAME (decl)
...@@ -1377,7 +1377,18 @@ darwin_emit_unwind_label (FILE *file, tree decl, int for_eh, int empty) ...@@ -1377,7 +1377,18 @@ darwin_emit_unwind_label (FILE *file, tree decl, int for_eh, int empty)
free (lab); free (lab);
} }
/* Generate a PC-relative reference to a Mach-O non-lazy-symbol. */ 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. */
void void
darwin_non_lazy_pcrel (FILE *file, rtx addr) darwin_non_lazy_pcrel (FILE *file, rtx addr)
...@@ -1398,7 +1409,7 @@ darwin_non_lazy_pcrel (FILE *file, rtx addr) ...@@ -1398,7 +1409,7 @@ darwin_non_lazy_pcrel (FILE *file, rtx addr)
extern". There is no MACH-O equivalent of ELF's extern". There is no MACH-O equivalent of ELF's
VISIBILITY_INTERNAL or VISIBILITY_PROTECTED. */ VISIBILITY_INTERNAL or VISIBILITY_PROTECTED. */
void void
darwin_assemble_visibility (tree decl, int vis) darwin_assemble_visibility (tree decl, int vis)
{ {
if (vis == VISIBILITY_DEFAULT) if (vis == VISIBILITY_DEFAULT)
......
...@@ -303,8 +303,8 @@ Boston, MA 02110-1301, USA. */ ...@@ -303,8 +303,8 @@ Boston, MA 02110-1301, USA. */
be in a new format, or the fallback routine might be changed; if be in a new format, or the fallback routine might be changed; if
you want to explicitly link against the static version of those you want to explicitly link against the static version of those
routines, because you know you don't need to unwind through system routines, because you know you don't need to unwind through system
libraries, you need to explicitly say -static-libgcc. libraries, you need to explicitly say -static-libgcc.
If it is linked against, it has to be before -lgcc, because it may If it is linked against, it has to be before -lgcc, because it may
need symbols from -lgcc. */ need symbols from -lgcc. */
#undef REAL_LIBGCC_SPEC #undef REAL_LIBGCC_SPEC
...@@ -317,7 +317,7 @@ Boston, MA 02110-1301, USA. */ ...@@ -317,7 +317,7 @@ Boston, MA 02110-1301, USA. */
:%:version-compare(>< 10.3.9 10.5 mmacosx-version-min= -lgcc_s.10.4) \ :%:version-compare(>< 10.3.9 10.5 mmacosx-version-min= -lgcc_s.10.4) \
%:version-compare(>= 10.5 mmacosx-version-min= -lgcc_s.10.5) \ %:version-compare(>= 10.5 mmacosx-version-min= -lgcc_s.10.5) \
-lgcc}" -lgcc}"
/* We specify crt0.o as -lcrt0.o so that ld will search the library path. */ /* We specify crt0.o as -lcrt0.o so that ld will search the library path. */
#undef STARTFILE_SPEC #undef STARTFILE_SPEC
...@@ -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
......
...@@ -1530,7 +1530,7 @@ default is @code{LONG_DOUBLE_TYPE_SIZE}. ...@@ -1530,7 +1530,7 @@ default is @code{LONG_DOUBLE_TYPE_SIZE}.
@end defmac @end defmac
@defmac LIBGCC2_HAS_DF_MODE @defmac LIBGCC2_HAS_DF_MODE
Define this macro if neither @code{LIBGCC2_DOUBLE_TYPE_SIZE} nor Define this macro if neither @code{LIBGCC2_DOUBLE_TYPE_SIZE} nor
@code{LIBGCC2_LONG_DOUBLE_TYPE_SIZE} is @code{LIBGCC2_LONG_DOUBLE_TYPE_SIZE} is
@code{DFmode} but you want @code{DFmode} routines in @file{libgcc2.a} @code{DFmode} but you want @code{DFmode} routines in @file{libgcc2.a}
anyway. If you don't define this and either @code{LIBGCC2_DOUBLE_TYPE_SIZE} anyway. If you don't define this and either @code{LIBGCC2_DOUBLE_TYPE_SIZE}
...@@ -1539,14 +1539,14 @@ otherwise it is 0. ...@@ -1539,14 +1539,14 @@ otherwise it is 0.
@end defmac @end defmac
@defmac LIBGCC2_HAS_XF_MODE @defmac LIBGCC2_HAS_XF_MODE
Define this macro if @code{LIBGCC2_LONG_DOUBLE_TYPE_SIZE} is not Define this macro if @code{LIBGCC2_LONG_DOUBLE_TYPE_SIZE} is not
@code{XFmode} but you want @code{XFmode} routines in @file{libgcc2.a} @code{XFmode} but you want @code{XFmode} routines in @file{libgcc2.a}
anyway. If you don't define this and @code{LIBGCC2_LONG_DOUBLE_TYPE_SIZE} anyway. If you don't define this and @code{LIBGCC2_LONG_DOUBLE_TYPE_SIZE}
is 80 then the default is 1, otherwise it is 0. is 80 then the default is 1, otherwise it is 0.
@end defmac @end defmac
@defmac LIBGCC2_HAS_TF_MODE @defmac LIBGCC2_HAS_TF_MODE
Define this macro if @code{LIBGCC2_LONG_DOUBLE_TYPE_SIZE} is not Define this macro if @code{LIBGCC2_LONG_DOUBLE_TYPE_SIZE} is not
@code{TFmode} but you want @code{TFmode} routines in @file{libgcc2.a} @code{TFmode} but you want @code{TFmode} routines in @file{libgcc2.a}
anyway. If you don't define this and @code{LIBGCC2_LONG_DOUBLE_TYPE_SIZE} anyway. If you don't define this and @code{LIBGCC2_LONG_DOUBLE_TYPE_SIZE}
is 128 then the default is 1, otherwise it is 0. is 128 then the default is 1, otherwise it is 0.
...@@ -2504,7 +2504,7 @@ forwarding logic, you can set @code{sri->extra_cost} to a negative amount. ...@@ -2504,7 +2504,7 @@ forwarding logic, you can set @code{sri->extra_cost} to a negative amount.
@defmac SECONDARY_RELOAD_CLASS (@var{class}, @var{mode}, @var{x}) @defmac SECONDARY_RELOAD_CLASS (@var{class}, @var{mode}, @var{x})
@defmacx SECONDARY_INPUT_RELOAD_CLASS (@var{class}, @var{mode}, @var{x}) @defmacx SECONDARY_INPUT_RELOAD_CLASS (@var{class}, @var{mode}, @var{x})
@defmacx SECONDARY_OUTPUT_RELOAD_CLASS (@var{class}, @var{mode}, @var{x}) @defmacx SECONDARY_OUTPUT_RELOAD_CLASS (@var{class}, @var{mode}, @var{x})
These macros are obsolete, new ports should use the target hook These macros are obsolete, new ports should use the target hook
@code{TARGET_SECONDARY_RELOAD} instead. @code{TARGET_SECONDARY_RELOAD} instead.
These are obsolete macros, replaced by the @code{TARGET_SECONDARY_RELOAD} These are obsolete macros, replaced by the @code{TARGET_SECONDARY_RELOAD}
...@@ -2901,10 +2901,10 @@ machines. See @file{function.c} for details. ...@@ -2901,10 +2901,10 @@ machines. See @file{function.c} for details.
@defmac INITIAL_FRAME_ADDRESS_RTX @defmac INITIAL_FRAME_ADDRESS_RTX
A C expression whose value is RTL representing the address of the initial A C expression whose value is RTL representing the address of the initial
stack frame. This address is passed to @code{RETURN_ADDR_RTX} and stack frame. This address is passed to @code{RETURN_ADDR_RTX} and
@code{DYNAMIC_CHAIN_ADDRESS}. If you don't define this macro, a reasonable @code{DYNAMIC_CHAIN_ADDRESS}. If you don't define this macro, a reasonable
default value will be used. Define this macro in order to make frame pointer default value will be used. Define this macro in order to make frame pointer
elimination work in the presence of @code{__builtin_frame_address (count)} and elimination work in the presence of @code{__builtin_frame_address (count)} and
@code{__builtin_return_address (count)} for @code{count} not equal to zero. @code{__builtin_return_address (count)} for @code{count} not equal to zero.
@end defmac @end defmac
...@@ -3034,7 +3034,7 @@ The final value should conincide with that calculated by ...@@ -3034,7 +3034,7 @@ The final value should conincide with that calculated by
@code{INCOMING_FRAME_SP_OFFSET}. @code{INCOMING_FRAME_SP_OFFSET}.
Normally the CFA is calculated as an offset from the argument pointer, Normally the CFA is calculated as an offset from the argument pointer,
via @code{ARG_POINTER_CFA_OFFSET}, but if the argument pointer is via @code{ARG_POINTER_CFA_OFFSET}, but if the argument pointer is
variable due to the ABI, this may not be possible. If this macro is variable due to the ABI, this may not be possible. If this macro is
defined, it implies that the virtual register instantiation should be defined, it implies that the virtual register instantiation should be
based on the frame pointer instead of the argument pointer. Only one based on the frame pointer instead of the argument pointer. Only one
...@@ -4487,7 +4487,7 @@ may vary greatly between different architectures. ...@@ -4487,7 +4487,7 @@ may vary greatly between different architectures.
@deftypefn {Target Hook} tree TARGET_STACK_PROTECT_GUARD (void) @deftypefn {Target Hook} tree TARGET_STACK_PROTECT_GUARD (void)
This hook returns a @code{DECL} node for the external variable to use This hook returns a @code{DECL} node for the external variable to use
for the stack protection guard. This variable is initialized by the for the stack protection guard. This variable is initialized by the
runtime to some random value and is used to initialize the guard value runtime to some random value and is used to initialize the guard value
that is placed at the top of the local stack frame. The type of this that is placed at the top of the local stack frame. The type of this
variable must be @code{ptr_type_node}. variable must be @code{ptr_type_node}.
...@@ -4502,7 +4502,7 @@ stack protect guard variable has been modified. This expression should ...@@ -4502,7 +4502,7 @@ stack protect guard variable has been modified. This expression should
involve a call to a @code{noreturn} function. involve a call to a @code{noreturn} function.
The default version of this hook invokes a function called The default version of this hook invokes a function called
@samp{__stack_chk_fail}, taking no arguments. This function is @samp{__stack_chk_fail}, taking no arguments. This function is
normally defined in @file{libgcc2.c}. normally defined in @file{libgcc2.c}.
@end deftypefn @end deftypefn
...@@ -5201,7 +5201,7 @@ of TLS symbols for various targets. ...@@ -5201,7 +5201,7 @@ of TLS symbols for various targets.
@deftypefn {Target Hook} tree TARGET_VECTORIZE_BUILTIN_MASK_FOR_LOAD (void) @deftypefn {Target Hook} tree TARGET_VECTORIZE_BUILTIN_MASK_FOR_LOAD (void)
This hook should return the DECL of a function @var{f} that given an This hook should return the DECL of a function @var{f} that given an
address @var{addr} as an argument returns a mask @var{m} that can be address @var{addr} as an argument returns a mask @var{m} that can be
used to extract from two vectors the relevant data that resides in used to extract from two vectors the relevant data that resides in
@var{addr} in case @var{addr} is not properly aligned. @var{addr} in case @var{addr} is not properly aligned.
The autovectrizer, when vectorizing a load operation from an address The autovectrizer, when vectorizing a load operation from an address
...@@ -5212,15 +5212,15 @@ two loaded vectors. The first two arguments to @code{REALIGN_LOAD}, ...@@ -5212,15 +5212,15 @@ two loaded vectors. The first two arguments to @code{REALIGN_LOAD},
@var{v1} and @var{v2}, are the two vectors, each of size @var{VS}, and @var{v1} and @var{v2}, are the two vectors, each of size @var{VS}, and
the third argument, @var{OFF}, defines how the data will be extracted the third argument, @var{OFF}, defines how the data will be extracted
from these two vectors: if @var{OFF} is 0, then the returned vector is from these two vectors: if @var{OFF} is 0, then the returned vector is
@var{v2}; otherwise, the returned vector is composed from the last @var{v2}; otherwise, the returned vector is composed from the last
@var{VS}-@var{OFF} elements of @var{v1} concatenated to the first @var{VS}-@var{OFF} elements of @var{v1} concatenated to the first
@var{OFF} elements of @var{v2}. @var{OFF} elements of @var{v2}.
If this hook is defined, the autovectorizer will generate a call If this hook is defined, the autovectorizer will generate a call
to @var{f} (using the DECL tree that this hook returns) and will to @var{f} (using the DECL tree that this hook returns) and will
use the return value of @var{f} as the argument @var{OFF} to use the return value of @var{f} as the argument @var{OFF} to
@code{REALIGN_LOAD}. Therefore, the mask @var{m} returned by @var{f} @code{REALIGN_LOAD}. Therefore, the mask @var{m} returned by @var{f}
should comply with the semantics expected by @code{REALIGN_LOAD} should comply with the semantics expected by @code{REALIGN_LOAD}
described above. described above.
If this hook is not defined, then @var{addr} will be used as If this hook is not defined, then @var{addr} will be used as
the argument @var{OFF} to @code{REALIGN_LOAD}, in which case the low the argument @var{OFF} to @code{REALIGN_LOAD}, in which case the low
...@@ -6031,7 +6031,7 @@ part of the @code{.init_array} (or equivalent) section. If not ...@@ -6031,7 +6031,7 @@ part of the @code{.init_array} (or equivalent) section. If not
defined, GCC will assume such a section does not exist. Do not define defined, GCC will assume such a section does not exist. Do not define
both this macro and @code{INIT_SECTION_ASM_OP}. both this macro and @code{INIT_SECTION_ASM_OP}.
@end defmac @end defmac
@defmac FINI_ARRAY_SECTION_ASM_OP @defmac FINI_ARRAY_SECTION_ASM_OP
If defined, a C expression whose value is a string, including spacing, If defined, a C expression whose value is a string, including spacing,
containing the assembler operation to identify the following data as containing the assembler operation to identify the following data as
...@@ -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
...@@ -9480,9 +9488,9 @@ low-overhead loop, otherwise return a string why doloop could not be applied. ...@@ -9480,9 +9488,9 @@ low-overhead loop, otherwise return a string why doloop could not be applied.
Many targets use special registers for low-overhead looping. For any Many targets use special registers for low-overhead looping. For any
instruction that clobbers these this function should return a string indicating instruction that clobbers these this function should return a string indicating
the reason why the doloop could not be applied. the reason why the doloop could not be applied.
By default, the RTL loop optimizer does not use a present doloop pattern for By default, the RTL loop optimizer does not use a present doloop pattern for
loops containing function calls or branch on table instructions. loops containing function calls or branch on table instructions.
@end deftypefn @end deftypefn
@defmac MD_CAN_REDIRECT_BRANCH (@var{branch1}, @var{branch2}) @defmac MD_CAN_REDIRECT_BRANCH (@var{branch1}, @var{branch2})
...@@ -9661,8 +9669,8 @@ and ia64. The default is @code{false}. ...@@ -9661,8 +9669,8 @@ and ia64. The default is @code{false}.
@end deftypefn @end deftypefn
@deftypefn {Target Hook} const char *TARGET_INVALID_ARG_FOR_UNPROTOTYPED_FN (tree @var{typelist}, tree @var{funcdecl}, tree @var{val}) @deftypefn {Target Hook} const char *TARGET_INVALID_ARG_FOR_UNPROTOTYPED_FN (tree @var{typelist}, tree @var{funcdecl}, tree @var{val})
If defined, this macro returns the diagnostic message when it is If defined, this macro returns the diagnostic message when it is
illegal to pass argument @var{val} to function @var{funcdecl} illegal to pass argument @var{val} to function @var{funcdecl}
with prototype @var{typelist}. with prototype @var{typelist}.
@end deftypefn @end deftypefn
......
...@@ -134,7 +134,7 @@ struct eh_region GTY(()) ...@@ -134,7 +134,7 @@ struct eh_region GTY(())
/* Each region does exactly one thing. */ /* Each region does exactly one thing. */
enum eh_region_type enum eh_region_type
{ {
ERT_UNKNOWN = 0, ERT_UNKNOWN = 0,
ERT_CLEANUP, ERT_CLEANUP,
ERT_TRY, ERT_TRY,
...@@ -251,7 +251,6 @@ struct eh_status GTY(()) ...@@ -251,7 +251,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 *);
...@@ -442,7 +441,7 @@ init_eh_for_function (void) ...@@ -442,7 +441,7 @@ init_eh_for_function (void)
cfun->eh = ggc_alloc_cleared (sizeof (struct eh_status)); cfun->eh = ggc_alloc_cleared (sizeof (struct eh_status));
} }
/* Routines to generate the exception tree somewhat directly. /* Routines to generate the exception tree somewhat directly.
These are used from tree-eh.c when processing exception related These are used from tree-eh.c when processing exception related
nodes during tree optimization. */ nodes during tree optimization. */
...@@ -738,7 +737,7 @@ remove_unreachable_regions (rtx insns) ...@@ -738,7 +737,7 @@ remove_unreachable_regions (rtx insns)
default: default:
break; break;
} }
if (kill_it) if (kill_it)
remove_eh_handler (r); remove_eh_handler (r);
} }
...@@ -864,11 +863,11 @@ duplicate_eh_region_1 (struct eh_region *o) ...@@ -864,11 +863,11 @@ duplicate_eh_region_1 (struct eh_region *o)
struct eh_region *n = ggc_alloc_cleared (sizeof (struct eh_region)); struct eh_region *n = ggc_alloc_cleared (sizeof (struct eh_region));
*n = *o; *n = *o;
n->region_number = o->region_number + cfun->eh->last_region_number; n->region_number = o->region_number + cfun->eh->last_region_number;
VEC_replace (eh_region, cfun->eh->region_array, n->region_number, n); VEC_replace (eh_region, cfun->eh->region_array, n->region_number, n);
gcc_assert (!o->aka); gcc_assert (!o->aka);
return n; return n;
} }
...@@ -877,7 +876,7 @@ duplicate_eh_region_2 (struct eh_region *o, struct eh_region **n_array, ...@@ -877,7 +876,7 @@ duplicate_eh_region_2 (struct eh_region *o, struct eh_region **n_array,
struct eh_region *prev_try) struct eh_region *prev_try)
{ {
struct eh_region *n = n_array[o->region_number]; struct eh_region *n = n_array[o->region_number];
switch (n->type) switch (n->type)
{ {
case ERT_TRY: case ERT_TRY:
...@@ -886,7 +885,7 @@ duplicate_eh_region_2 (struct eh_region *o, struct eh_region **n_array, ...@@ -886,7 +885,7 @@ duplicate_eh_region_2 (struct eh_region *o, struct eh_region **n_array,
if (o->u.try.last_catch) if (o->u.try.last_catch)
n->u.try.last_catch = n_array[o->u.try.last_catch->region_number]; n->u.try.last_catch = n_array[o->u.try.last_catch->region_number];
break; break;
case ERT_CATCH: case ERT_CATCH:
if (o->u.catch.next_catch) if (o->u.catch.next_catch)
n->u.catch.next_catch = n_array[o->u.catch.next_catch->region_number]; n->u.catch.next_catch = n_array[o->u.catch.next_catch->region_number];
...@@ -900,11 +899,11 @@ duplicate_eh_region_2 (struct eh_region *o, struct eh_region **n_array, ...@@ -900,11 +899,11 @@ duplicate_eh_region_2 (struct eh_region *o, struct eh_region **n_array,
else else
n->u.cleanup.prev_try = prev_try; n->u.cleanup.prev_try = prev_try;
break; break;
default: default:
break; break;
} }
if (o->outer) if (o->outer)
n->outer = n_array[o->outer->region_number]; n->outer = n_array[o->outer->region_number];
if (o->inner) if (o->inner)
...@@ -922,10 +921,10 @@ duplicate_eh_regions (struct function *ifun, duplicate_eh_regions_map map, ...@@ -922,10 +921,10 @@ duplicate_eh_regions (struct function *ifun, duplicate_eh_regions_map map,
int ifun_last_region_number = ifun->eh->last_region_number; int ifun_last_region_number = ifun->eh->last_region_number;
struct eh_region **n_array, *root, *cur, *prev_try; struct eh_region **n_array, *root, *cur, *prev_try;
int i; int i;
if (ifun_last_region_number == 0 || !ifun->eh->region_tree) if (ifun_last_region_number == 0 || !ifun->eh->region_tree)
return 0; return 0;
n_array = xcalloc (ifun_last_region_number + 1, sizeof (*n_array)); n_array = xcalloc (ifun_last_region_number + 1, sizeof (*n_array));
VEC_safe_grow (eh_region, gc, cfun->eh->region_array, VEC_safe_grow (eh_region, gc, cfun->eh->region_array,
cfun->eh->last_region_number + 1 + ifun_last_region_number); cfun->eh->last_region_number + 1 + ifun_last_region_number);
...@@ -936,7 +935,7 @@ duplicate_eh_regions (struct function *ifun, duplicate_eh_regions_map map, ...@@ -936,7 +935,7 @@ duplicate_eh_regions (struct function *ifun, duplicate_eh_regions_map map,
for (i = cfun->eh->last_region_number + 1; for (i = cfun->eh->last_region_number + 1;
i < cfun->eh->last_region_number + 1 + ifun_last_region_number; i++) i < cfun->eh->last_region_number + 1 + ifun_last_region_number; i++)
VEC_replace (eh_region, cfun->eh->region_array, i, 0); VEC_replace (eh_region, cfun->eh->region_array, i, 0);
/* Search for the containing ERT_TRY region to fix up /* Search for the containing ERT_TRY region to fix up
the prev_try short-cuts for ERT_CLEANUP regions. */ the prev_try short-cuts for ERT_CLEANUP regions. */
prev_try = NULL; prev_try = NULL;
...@@ -967,7 +966,7 @@ duplicate_eh_regions (struct function *ifun, duplicate_eh_regions_map map, ...@@ -967,7 +966,7 @@ duplicate_eh_regions (struct function *ifun, duplicate_eh_regions_map map,
continue; continue;
duplicate_eh_region_2 (cur, n_array, prev_try); duplicate_eh_region_2 (cur, n_array, prev_try);
} }
root = n_array[ifun->eh->region_tree->region_number]; root = n_array[ifun->eh->region_tree->region_number];
gcc_assert (root->outer == NULL); gcc_assert (root->outer == NULL);
if (outer_region > 0) if (outer_region > 0)
...@@ -1000,12 +999,12 @@ duplicate_eh_regions (struct function *ifun, duplicate_eh_regions_map map, ...@@ -1000,12 +999,12 @@ duplicate_eh_regions (struct function *ifun, duplicate_eh_regions_map map,
else else
cfun->eh->region_tree = root; cfun->eh->region_tree = root;
} }
free (n_array); free (n_array);
i = cfun->eh->last_region_number; i = cfun->eh->last_region_number;
cfun->eh->last_region_number = i + ifun_last_region_number; cfun->eh->last_region_number = i + ifun_last_region_number;
return i; return i;
} }
...@@ -1268,7 +1267,7 @@ emit_to_new_bb_before (rtx seq, rtx insn) ...@@ -1268,7 +1267,7 @@ emit_to_new_bb_before (rtx seq, rtx insn)
edge_iterator ei; edge_iterator ei;
/* If there happens to be a fallthru edge (possibly created by cleanup_cfg /* If there happens to be a fallthru edge (possibly created by cleanup_cfg
call), we don't want it to go into newly created landing pad or other EH call), we don't want it to go into newly created landing pad or other EH
construct. */ construct. */
for (ei = ei_start (BLOCK_FOR_INSN (insn)->preds); (e = ei_safe_edge (ei)); ) for (ei = ei_start (BLOCK_FOR_INSN (insn)->preds); (e = ei_safe_edge (ei)); )
if (e->flags & EDGE_FALLTHRU) if (e->flags & EDGE_FALLTHRU)
...@@ -1339,7 +1338,7 @@ build_post_landing_pads (void) ...@@ -1339,7 +1338,7 @@ build_post_landing_pads (void)
emit_cmp_and_jump_insns emit_cmp_and_jump_insns
(cfun->eh->filter, (cfun->eh->filter,
GEN_INT (tree_low_cst (TREE_VALUE (flt_node), 0)), GEN_INT (tree_low_cst (TREE_VALUE (flt_node), 0)),
EQ, NULL_RTX, EQ, NULL_RTX,
targetm.eh_return_filter_mode (), 0, c->label); targetm.eh_return_filter_mode (), 0, c->label);
tp_node = TREE_CHAIN (tp_node); tp_node = TREE_CHAIN (tp_node);
...@@ -1372,7 +1371,7 @@ build_post_landing_pads (void) ...@@ -1372,7 +1371,7 @@ build_post_landing_pads (void)
emit_cmp_and_jump_insns (cfun->eh->filter, emit_cmp_and_jump_insns (cfun->eh->filter,
GEN_INT (region->u.allowed.filter), GEN_INT (region->u.allowed.filter),
EQ, NULL_RTX, EQ, NULL_RTX,
targetm.eh_return_filter_mode (), 0, region->label); targetm.eh_return_filter_mode (), 0, region->label);
/* We delay the generation of the _Unwind_Resume until we generate /* We delay the generation of the _Unwind_Resume until we generate
...@@ -1552,7 +1551,7 @@ dw2_build_landing_pads (void) ...@@ -1552,7 +1551,7 @@ dw2_build_landing_pads (void)
emit_move_insn (cfun->eh->exc_ptr, emit_move_insn (cfun->eh->exc_ptr,
gen_rtx_REG (ptr_mode, EH_RETURN_DATA_REGNO (0))); gen_rtx_REG (ptr_mode, EH_RETURN_DATA_REGNO (0)));
emit_move_insn (cfun->eh->filter, emit_move_insn (cfun->eh->filter,
gen_rtx_REG (targetm.eh_return_filter_mode (), gen_rtx_REG (targetm.eh_return_filter_mode (),
EH_RETURN_DATA_REGNO (1))); EH_RETURN_DATA_REGNO (1)));
seq = get_insns (); seq = get_insns ();
...@@ -2451,7 +2450,7 @@ reachable_next_level (struct eh_region *region, tree type_thrown, ...@@ -2451,7 +2450,7 @@ reachable_next_level (struct eh_region *region, tree type_thrown,
/* Here we end our search, since no exceptions may propagate. /* Here we end our search, since no exceptions may propagate.
If we've touched down at some landing pad previous, then the If we've touched down at some landing pad previous, then the
explicit function call we generated may be used. Otherwise explicit function call we generated may be used. Otherwise
the call is made by the runtime. the call is made by the runtime.
Before inlining, do not perform this optimization. We may Before inlining, do not perform this optimization. We may
inline a subroutine that contains handlers, and that will inline a subroutine that contains handlers, and that will
...@@ -3095,7 +3094,7 @@ collect_one_action_chain (htab_t ar_hash, struct eh_region *region) ...@@ -3095,7 +3094,7 @@ collect_one_action_chain (htab_t ar_hash, struct eh_region *region)
Add a cleanup action to the chain to catch these. */ Add a cleanup action to the chain to catch these. */
else if (next <= 0) else if (next <= 0)
next = add_action_record (ar_hash, 0, 0); next = add_action_record (ar_hash, 0, 0);
return add_action_record (ar_hash, region->u.allowed.filter, next); return add_action_record (ar_hash, region->u.allowed.filter, next);
case ERT_MUST_NOT_THROW: case ERT_MUST_NOT_THROW:
...@@ -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);
...@@ -3706,7 +3708,7 @@ get_eh_throw_stmt_table (struct function *fun) ...@@ -3706,7 +3708,7 @@ get_eh_throw_stmt_table (struct function *fun)
} }
/* Dump EH information to OUT. */ /* Dump EH information to OUT. */
void void
dump_eh_tree (FILE *out, struct function *fun) dump_eh_tree (FILE *out, struct function *fun)
{ {
struct eh_region *i; struct eh_region *i;
...@@ -3752,7 +3754,7 @@ dump_eh_tree (FILE *out, struct function *fun) ...@@ -3752,7 +3754,7 @@ dump_eh_tree (FILE *out, struct function *fun)
/* Verify some basic invariants on EH datastructures. Could be extended to /* Verify some basic invariants on EH datastructures. Could be extended to
catch more. */ catch more. */
void void
verify_eh_tree (struct function *fun) verify_eh_tree (struct function *fun)
{ {
struct eh_region *i, *outer = NULL; struct eh_region *i, *outer = NULL;
...@@ -3868,8 +3870,8 @@ rest_of_handle_eh (void) ...@@ -3868,8 +3870,8 @@ rest_of_handle_eh (void)
struct tree_opt_pass pass_rtl_eh = struct tree_opt_pass pass_rtl_eh =
{ {
"eh", /* name */ "eh", /* name */
gate_handle_eh, /* gate */ gate_handle_eh, /* gate */
rest_of_handle_eh, /* execute */ rest_of_handle_eh, /* execute */
NULL, /* sub */ NULL, /* sub */
NULL, /* next */ NULL, /* next */
0, /* static_pass_number */ 0, /* static_pass_number */
......
...@@ -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);
...@@ -373,7 +377,7 @@ struct gcc_target ...@@ -373,7 +377,7 @@ struct gcc_target
/* Fold a target-specific builtin. */ /* Fold a target-specific builtin. */
tree (* fold_builtin) (tree fndecl, tree arglist, bool ignore); tree (* fold_builtin) (tree fndecl, tree arglist, bool ignore);
/* For a vendor-specific fundamental TYPE, return a pointer to /* For a vendor-specific fundamental TYPE, return a pointer to
a statically-allocated string containing the C++ mangling for a statically-allocated string containing the C++ mangling for
TYPE. In all other cases, return NULL. */ TYPE. In all other cases, return NULL. */
...@@ -569,7 +573,7 @@ struct gcc_target ...@@ -569,7 +573,7 @@ struct gcc_target
specified. Use this hook if the target needs to add extra validation specified. Use this hook if the target needs to add extra validation
checks to handle_dll_attribute (). */ checks to handle_dll_attribute (). */
bool (* valid_dllimport_attribute_p) (tree decl); bool (* valid_dllimport_attribute_p) (tree decl);
/* Functions relating to calls - argument passing, returns, etc. */ /* Functions relating to calls - argument passing, returns, etc. */
struct calls { struct calls {
bool (*promote_function_args) (tree fntype); bool (*promote_function_args) (tree fntype);
...@@ -620,7 +624,7 @@ struct gcc_target ...@@ -620,7 +624,7 @@ struct gcc_target
/* Return the diagnostic message string if function without a prototype /* Return the diagnostic message string if function without a prototype
is not allowed for this 'val' argument; NULL otherwise. */ is not allowed for this 'val' argument; NULL otherwise. */
const char *(*invalid_arg_for_unprototyped_fn) (tree typelist, const char *(*invalid_arg_for_unprototyped_fn) (tree typelist,
tree funcdecl, tree val); tree funcdecl, tree val);
/* Return an rtx for the return value location of the function /* Return an rtx for the return value location of the function
...@@ -677,7 +681,7 @@ struct gcc_target ...@@ -677,7 +681,7 @@ struct gcc_target
visibility has been explicitly specified. If the target needs visibility has been explicitly specified. If the target needs
to specify a visibility other than that of the containing class, to specify a visibility other than that of the containing class,
use this hook to set DECL_VISIBILITY and use this hook to set DECL_VISIBILITY and
DECL_VISIBILITY_SPECIFIED. */ DECL_VISIBILITY_SPECIFIED. */
void (*determine_class_data_visibility) (tree decl); void (*determine_class_data_visibility) (tree decl);
/* Returns true (the default) if virtual tables and other /* Returns true (the default) if virtual tables and other
similar implicit class data objects are always COMDAT if they similar implicit class data objects are always COMDAT if they
...@@ -691,7 +695,7 @@ struct gcc_target ...@@ -691,7 +695,7 @@ struct gcc_target
/* TYPE is a C++ class (i.e., RECORD_TYPE or UNION_TYPE) that /* TYPE is a C++ class (i.e., RECORD_TYPE or UNION_TYPE) that
has just been defined. Use this hook to make adjustments to the has just been defined. Use this hook to make adjustments to the
class (eg, tweak visibility or perform any other required class (eg, tweak visibility or perform any other required
target modifications). */ target modifications). */
void (*adjust_class_at_definition) (tree type); void (*adjust_class_at_definition) (tree type);
} cxx; } cxx;
......
...@@ -435,10 +435,10 @@ section * ...@@ -435,10 +435,10 @@ section *
function_section (tree decl) function_section (tree decl)
{ {
int reloc = 0; int reloc = 0;
if (first_function_block_is_cold) if (first_function_block_is_cold)
reloc = 1; reloc = 1;
#ifdef USE_SELECT_SECTION_FOR_FUNCTIONS #ifdef USE_SELECT_SECTION_FOR_FUNCTIONS
return targetm.asm_out.select_section (decl, reloc, DECL_ALIGN (decl)); return targetm.asm_out.select_section (decl, reloc, DECL_ALIGN (decl));
#else #else
...@@ -473,7 +473,7 @@ default_function_rodata_section (tree decl) ...@@ -473,7 +473,7 @@ default_function_rodata_section (tree decl)
{ {
size_t len = strlen (name) + 3; size_t len = strlen (name) + 3;
char* rname = alloca (len); char* rname = alloca (len);
strcpy (rname, ".rodata"); strcpy (rname, ".rodata");
strcat (rname, name + 5); strcat (rname, name + 5);
return get_section (rname, SECTION_LINKONCE, decl); return get_section (rname, SECTION_LINKONCE, decl);
...@@ -720,7 +720,7 @@ make_decl_rtl (tree decl) ...@@ -720,7 +720,7 @@ make_decl_rtl (tree decl)
|| TREE_PUBLIC (decl) || TREE_PUBLIC (decl)
|| DECL_EXTERNAL (decl) || DECL_EXTERNAL (decl)
|| DECL_REGISTER (decl)); || DECL_REGISTER (decl));
/* And that we were not given a type or a label. */ /* And that we were not given a type or a label. */
gcc_assert (TREE_CODE (decl) != TYPE_DECL gcc_assert (TREE_CODE (decl) != TYPE_DECL
&& TREE_CODE (decl) != LABEL_DECL); && TREE_CODE (decl) != LABEL_DECL);
...@@ -755,11 +755,11 @@ make_decl_rtl (tree decl) ...@@ -755,11 +755,11 @@ make_decl_rtl (tree decl)
} }
name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)); name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl));
if (name[0] != '*' && TREE_CODE (decl) != FUNCTION_DECL if (name[0] != '*' && TREE_CODE (decl) != FUNCTION_DECL
&& DECL_REGISTER (decl)) && DECL_REGISTER (decl))
{ {
error ("register name not specified for %q+D", decl); error ("register name not specified for %q+D", decl);
} }
else if (TREE_CODE (decl) != FUNCTION_DECL && DECL_REGISTER (decl)) else if (TREE_CODE (decl) != FUNCTION_DECL && DECL_REGISTER (decl))
{ {
...@@ -1051,7 +1051,7 @@ assemble_start_function (tree decl, const char *fnname) ...@@ -1051,7 +1051,7 @@ assemble_start_function (tree decl, const char *fnname)
bool hot_label_written = false; bool hot_label_written = false;
cfun->unlikely_text_section_name = NULL; cfun->unlikely_text_section_name = NULL;
first_function_block_is_cold = false; first_function_block_is_cold = false;
if (flag_reorder_blocks_and_partition) if (flag_reorder_blocks_and_partition)
{ {
...@@ -1115,7 +1115,7 @@ assemble_start_function (tree decl, const char *fnname) ...@@ -1115,7 +1115,7 @@ assemble_start_function (tree decl, const char *fnname)
initialize_cold_section_name (); initialize_cold_section_name ();
if (cfun->unlikely_text_section_name if (cfun->unlikely_text_section_name
&& strcmp (TREE_STRING_POINTER (DECL_SECTION_NAME (decl)), && strcmp (TREE_STRING_POINTER (DECL_SECTION_NAME (decl)),
cfun->unlikely_text_section_name) == 0) cfun->unlikely_text_section_name) == 0)
first_function_block_is_cold = true; first_function_block_is_cold = true;
...@@ -1126,7 +1126,7 @@ assemble_start_function (tree decl, const char *fnname) ...@@ -1126,7 +1126,7 @@ assemble_start_function (tree decl, const char *fnname)
/* Switch to the correct text section for the start of the function. */ /* Switch to the correct text section for the start of the function. */
switch_to_section (function_section (decl)); switch_to_section (function_section (decl));
if (flag_reorder_blocks_and_partition if (flag_reorder_blocks_and_partition
&& !hot_label_written) && !hot_label_written)
ASM_OUTPUT_LABEL (asm_out_file, cfun->hot_section_label); ASM_OUTPUT_LABEL (asm_out_file, cfun->hot_section_label);
...@@ -2087,7 +2087,7 @@ assemble_integer (rtx x, unsigned int size, unsigned int align, int force) ...@@ -2087,7 +2087,7 @@ assemble_integer (rtx x, unsigned int size, unsigned int align, int force)
} }
gcc_assert (!force); gcc_assert (!force);
return false; return false;
} }
...@@ -2266,13 +2266,13 @@ const_hash_1 (const tree exp) ...@@ -2266,13 +2266,13 @@ const_hash_1 (const tree exp)
{ {
unsigned HOST_WIDE_INT idx; unsigned HOST_WIDE_INT idx;
tree value; tree value;
hi = 5 + int_size_in_bytes (TREE_TYPE (exp)); hi = 5 + int_size_in_bytes (TREE_TYPE (exp));
FOR_EACH_CONSTRUCTOR_VALUE (CONSTRUCTOR_ELTS (exp), idx, value) FOR_EACH_CONSTRUCTOR_VALUE (CONSTRUCTOR_ELTS (exp), idx, value)
if (value) if (value)
hi = hi * 603 + const_hash_1 (value); hi = hi * 603 + const_hash_1 (value);
return hi; return hi;
} }
...@@ -2384,7 +2384,7 @@ compare_constant (const tree t1, const tree t2) ...@@ -2384,7 +2384,7 @@ compare_constant (const tree t1, const tree t2)
{ {
VEC(constructor_elt, gc) *v1, *v2; VEC(constructor_elt, gc) *v1, *v2;
unsigned HOST_WIDE_INT idx; unsigned HOST_WIDE_INT idx;
typecode = TREE_CODE (TREE_TYPE (t1)); typecode = TREE_CODE (TREE_TYPE (t1));
if (typecode != TREE_CODE (TREE_TYPE (t2))) if (typecode != TREE_CODE (TREE_TYPE (t2)))
return 0; return 0;
...@@ -2432,7 +2432,7 @@ compare_constant (const tree t1, const tree t2) ...@@ -2432,7 +2432,7 @@ compare_constant (const tree t1, const tree t2)
return 0; return 0;
} }
} }
return 1; return 1;
} }
...@@ -2520,7 +2520,7 @@ copy_constant (tree exp) ...@@ -2520,7 +2520,7 @@ copy_constant (tree exp)
VEC(constructor_elt, gc) *v; VEC(constructor_elt, gc) *v;
unsigned HOST_WIDE_INT idx; unsigned HOST_WIDE_INT idx;
tree purpose, value; tree purpose, value;
v = VEC_alloc(constructor_elt, gc, VEC_length(constructor_elt, v = VEC_alloc(constructor_elt, gc, VEC_length(constructor_elt,
CONSTRUCTOR_ELTS (exp))); CONSTRUCTOR_ELTS (exp)));
FOR_EACH_CONSTRUCTOR_ELT (CONSTRUCTOR_ELTS (exp), idx, purpose, value) FOR_EACH_CONSTRUCTOR_ELT (CONSTRUCTOR_ELTS (exp), idx, purpose, value)
...@@ -2536,7 +2536,7 @@ copy_constant (tree exp) ...@@ -2536,7 +2536,7 @@ copy_constant (tree exp)
default: default:
{ {
tree t = lang_hooks.expand_constant (exp); tree t = lang_hooks.expand_constant (exp);
gcc_assert (t == exp); gcc_assert (t == exp);
return copy_constant (t); return copy_constant (t);
} }
...@@ -2952,7 +2952,7 @@ force_const_mem (enum machine_mode mode, rtx x) ...@@ -2952,7 +2952,7 @@ force_const_mem (enum machine_mode mode, rtx x)
hash = const_rtx_hash (x); hash = const_rtx_hash (x);
slot = htab_find_slot_with_hash (pool->const_rtx_htab, &tmp, hash, INSERT); slot = htab_find_slot_with_hash (pool->const_rtx_htab, &tmp, hash, INSERT);
desc = *slot; desc = *slot;
/* If the constant was already present, return its memory. */ /* If the constant was already present, return its memory. */
if (desc) if (desc)
return copy_rtx (desc->mem); return copy_rtx (desc->mem);
...@@ -3087,13 +3087,13 @@ output_constant_pool_2 (enum machine_mode mode, rtx x, unsigned int align) ...@@ -3087,13 +3087,13 @@ output_constant_pool_2 (enum machine_mode mode, rtx x, unsigned int align)
case MODE_DECIMAL_FLOAT: case MODE_DECIMAL_FLOAT:
{ {
REAL_VALUE_TYPE r; REAL_VALUE_TYPE r;
gcc_assert (GET_CODE (x) == CONST_DOUBLE); gcc_assert (GET_CODE (x) == CONST_DOUBLE);
REAL_VALUE_FROM_CONST_DOUBLE (r, x); REAL_VALUE_FROM_CONST_DOUBLE (r, x);
assemble_real (r, mode, align); assemble_real (r, mode, align);
break; break;
} }
case MODE_INT: case MODE_INT:
case MODE_PARTIAL_INT: case MODE_PARTIAL_INT:
assemble_integer (x, GET_MODE_SIZE (mode), align, 1); assemble_integer (x, GET_MODE_SIZE (mode), align, 1);
...@@ -3226,7 +3226,7 @@ mark_constant (rtx *current_rtx, void *data) ...@@ -3226,7 +3226,7 @@ mark_constant (rtx *current_rtx, void *data)
} }
return -1; return -1;
} }
/* Look through appropriate parts of INSN, marking all entries in the /* Look through appropriate parts of INSN, marking all entries in the
constant pool which are actually being used. Entries that are only constant pool which are actually being used. Entries that are only
...@@ -3493,7 +3493,7 @@ initializer_constant_valid_p (tree value, tree endtype) ...@@ -3493,7 +3493,7 @@ initializer_constant_valid_p (tree value, tree endtype)
return null_pointer_node; return null_pointer_node;
/* Taking the address of a nested function involves a trampoline. */ /* Taking the address of a nested function involves a trampoline. */
if (TREE_CODE (value) == FUNCTION_DECL if (TREE_CODE (value) == FUNCTION_DECL
&& ((decl_function_context (value) && ((decl_function_context (value)
&& !DECL_NO_STATIC_CHAIN (value)) && !DECL_NO_STATIC_CHAIN (value))
|| DECL_DLLIMPORT_P (value))) || DECL_DLLIMPORT_P (value)))
return NULL_TREE; return NULL_TREE;
...@@ -3828,12 +3828,12 @@ output_constant (tree exp, unsigned HOST_WIDE_INT size, unsigned int align) ...@@ -3828,12 +3828,12 @@ output_constant (tree exp, unsigned HOST_WIDE_INT size, unsigned int align)
tree link; tree link;
unsigned int nalign; unsigned int nalign;
enum machine_mode inner; enum machine_mode inner;
inner = TYPE_MODE (TREE_TYPE (TREE_TYPE (exp))); inner = TYPE_MODE (TREE_TYPE (TREE_TYPE (exp)));
nalign = MIN (align, GET_MODE_ALIGNMENT (inner)); nalign = MIN (align, GET_MODE_ALIGNMENT (inner));
elt_size = GET_MODE_SIZE (inner); elt_size = GET_MODE_SIZE (inner);
link = TREE_VECTOR_CST_ELTS (exp); link = TREE_VECTOR_CST_ELTS (exp);
output_constant (TREE_VALUE (link), elt_size, align); output_constant (TREE_VALUE (link), elt_size, align);
while ((link = TREE_CHAIN (link)) != NULL) while ((link = TREE_CHAIN (link)) != NULL)
...@@ -3961,8 +3961,8 @@ output_constructor (tree exp, unsigned HOST_WIDE_INT size, ...@@ -3961,8 +3961,8 @@ output_constructor (tree exp, unsigned HOST_WIDE_INT size,
#ifdef ASM_COMMENT_START #ifdef ASM_COMMENT_START
if (field && flag_verbose_asm) if (field && flag_verbose_asm)
fprintf (asm_out_file, "%s %s:\n", fprintf (asm_out_file, "%s %s:\n",
ASM_COMMENT_START, ASM_COMMENT_START,
DECL_NAME (field) DECL_NAME (field)
? IDENTIFIER_POINTER (DECL_NAME (field)) ? IDENTIFIER_POINTER (DECL_NAME (field))
: "<anonymous>"); : "<anonymous>");
#endif #endif
...@@ -4543,7 +4543,7 @@ find_decl_and_mark_needed (tree decl, tree target) ...@@ -4543,7 +4543,7 @@ find_decl_and_mark_needed (tree decl, tree target)
cgraph_varpool_mark_needed_node (vnode); cgraph_varpool_mark_needed_node (vnode);
return vnode->decl; return vnode->decl;
} }
else else
return NULL_TREE; return NULL_TREE;
} }
...@@ -4938,10 +4938,10 @@ default_section_type_flags_1 (tree decl, const char *name, int reloc, ...@@ -4938,10 +4938,10 @@ default_section_type_flags_1 (tree decl, const char *name, int reloc,
&& cfun->unlikely_text_section_name && cfun->unlikely_text_section_name
&& strcmp (name, cfun->unlikely_text_section_name) == 0) && strcmp (name, cfun->unlikely_text_section_name) == 0)
flags = SECTION_CODE; flags = SECTION_CODE;
else if (!decl else if (!decl
&& (!current_function_decl || !cfun) && (!current_function_decl || !cfun)
&& strcmp (name, UNLIKELY_EXECUTED_TEXT_SECTION_NAME) == 0) && strcmp (name, UNLIKELY_EXECUTED_TEXT_SECTION_NAME) == 0)
flags = SECTION_CODE; flags = SECTION_CODE;
else else
flags = SECTION_WRITE; flags = SECTION_WRITE;
...@@ -5055,7 +5055,7 @@ default_elf_asm_named_section (const char *name, unsigned int flags, ...@@ -5055,7 +5055,7 @@ default_elf_asm_named_section (const char *name, unsigned int flags,
if (flags & SECTION_ENTSIZE) if (flags & SECTION_ENTSIZE)
fprintf (asm_out_file, ",%d", flags & SECTION_ENTSIZE); fprintf (asm_out_file, ",%d", flags & SECTION_ENTSIZE);
if (HAVE_COMDAT_GROUP && (flags & SECTION_LINKONCE)) if (HAVE_COMDAT_GROUP && (flags & SECTION_LINKONCE))
fprintf (asm_out_file, ",%s,comdat", fprintf (asm_out_file, ",%s,comdat",
lang_hooks.decls.comdat_group (decl)); lang_hooks.decls.comdat_group (decl));
} }
...@@ -5063,7 +5063,7 @@ default_elf_asm_named_section (const char *name, unsigned int flags, ...@@ -5063,7 +5063,7 @@ default_elf_asm_named_section (const char *name, unsigned int flags,
} }
void void
default_coff_asm_named_section (const char *name, unsigned int flags, default_coff_asm_named_section (const char *name, unsigned int flags,
tree decl ATTRIBUTE_UNUSED) tree decl ATTRIBUTE_UNUSED)
{ {
char flagchars[8], *f = flagchars; char flagchars[8], *f = flagchars;
...@@ -5491,7 +5491,7 @@ default_binds_local_p_1 (tree exp, int shlib) ...@@ -5491,7 +5491,7 @@ default_binds_local_p_1 (tree exp, int shlib)
local_p = true; local_p = true;
/* A variable is local if the user has said explicitly that it will /* A variable is local if the user has said explicitly that it will
be. */ be. */
else if (DECL_VISIBILITY_SPECIFIED (exp) else if (DECL_VISIBILITY_SPECIFIED (exp)
&& DECL_VISIBILITY (exp) != VISIBILITY_DEFAULT) && DECL_VISIBILITY (exp) != VISIBILITY_DEFAULT)
local_p = true; local_p = true;
/* Variables defined outside this object might not be local. */ /* Variables defined outside this object might not be local. */
...@@ -5552,7 +5552,15 @@ default_emit_unwind_label (FILE * stream ATTRIBUTE_UNUSED, ...@@ -5552,7 +5552,15 @@ default_emit_unwind_label (FILE * stream ATTRIBUTE_UNUSED,
tree decl ATTRIBUTE_UNUSED, tree decl ATTRIBUTE_UNUSED,
int for_eh ATTRIBUTE_UNUSED, int for_eh ATTRIBUTE_UNUSED,
int empty ATTRIBUTE_UNUSED) int empty 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
......
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