aboutsummaryrefslogtreecommitdiff
path: root/gcc/varasm.c
diff options
context:
space:
mode:
authorEric Christopher <echristo@apple.com>2006-01-06 23:16:23 +0000
committerEric Christopher <echristo@gcc.gnu.org>2006-01-06 23:16:23 +0000
commit083cad550da4f24cb393626c74c4b2d144a11e02 (patch)
tree40c29d6ebecee3ad150d3ed86b8de4eacf4f5d3b /gcc/varasm.c
parentfacb553fe47c58844418c15db413a09091895d70 (diff)
downloadgcc-083cad550da4f24cb393626c74c4b2d144a11e02.zip
gcc-083cad550da4f24cb393626c74c4b2d144a11e02.tar.gz
gcc-083cad550da4f24cb393626c74c4b2d144a11e02.tar.bz2
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
Diffstat (limited to 'gcc/varasm.c')
-rw-r--r--gcc/varasm.c76
1 files changed, 42 insertions, 34 deletions
diff --git a/gcc/varasm.c b/gcc/varasm.c
index 5f58bf4..05bfabf 100644
--- a/gcc/varasm.c
+++ b/gcc/varasm.c
@@ -435,10 +435,10 @@ section *
function_section (tree decl)
{
int reloc = 0;
-
+
if (first_function_block_is_cold)
reloc = 1;
-
+
#ifdef USE_SELECT_SECTION_FOR_FUNCTIONS
return targetm.asm_out.select_section (decl, reloc, DECL_ALIGN (decl));
#else
@@ -473,7 +473,7 @@ default_function_rodata_section (tree decl)
{
size_t len = strlen (name) + 3;
char* rname = alloca (len);
-
+
strcpy (rname, ".rodata");
strcat (rname, name + 5);
return get_section (rname, SECTION_LINKONCE, decl);
@@ -720,7 +720,7 @@ make_decl_rtl (tree decl)
|| TREE_PUBLIC (decl)
|| DECL_EXTERNAL (decl)
|| DECL_REGISTER (decl));
-
+
/* And that we were not given a type or a label. */
gcc_assert (TREE_CODE (decl) != TYPE_DECL
&& TREE_CODE (decl) != LABEL_DECL);
@@ -755,11 +755,11 @@ make_decl_rtl (tree decl)
}
name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl));
-
+
if (name[0] != '*' && TREE_CODE (decl) != FUNCTION_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))
{
@@ -1051,7 +1051,7 @@ assemble_start_function (tree decl, const char *fnname)
bool hot_label_written = false;
cfun->unlikely_text_section_name = NULL;
-
+
first_function_block_is_cold = false;
if (flag_reorder_blocks_and_partition)
{
@@ -1115,7 +1115,7 @@ assemble_start_function (tree decl, const char *fnname)
initialize_cold_section_name ();
- if (cfun->unlikely_text_section_name
+ if (cfun->unlikely_text_section_name
&& strcmp (TREE_STRING_POINTER (DECL_SECTION_NAME (decl)),
cfun->unlikely_text_section_name) == 0)
first_function_block_is_cold = true;
@@ -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_section (function_section (decl));
- if (flag_reorder_blocks_and_partition
+ if (flag_reorder_blocks_and_partition
&& !hot_label_written)
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)
}
gcc_assert (!force);
-
+
return false;
}
@@ -2266,13 +2266,13 @@ const_hash_1 (const tree exp)
{
unsigned HOST_WIDE_INT idx;
tree value;
-
+
hi = 5 + int_size_in_bytes (TREE_TYPE (exp));
-
+
FOR_EACH_CONSTRUCTOR_VALUE (CONSTRUCTOR_ELTS (exp), idx, value)
if (value)
hi = hi * 603 + const_hash_1 (value);
-
+
return hi;
}
@@ -2384,7 +2384,7 @@ compare_constant (const tree t1, const tree t2)
{
VEC(constructor_elt, gc) *v1, *v2;
unsigned HOST_WIDE_INT idx;
-
+
typecode = TREE_CODE (TREE_TYPE (t1));
if (typecode != TREE_CODE (TREE_TYPE (t2)))
return 0;
@@ -2432,7 +2432,7 @@ compare_constant (const tree t1, const tree t2)
return 0;
}
}
-
+
return 1;
}
@@ -2520,7 +2520,7 @@ copy_constant (tree exp)
VEC(constructor_elt, gc) *v;
unsigned HOST_WIDE_INT idx;
tree purpose, value;
-
+
v = VEC_alloc(constructor_elt, gc, VEC_length(constructor_elt,
CONSTRUCTOR_ELTS (exp)));
FOR_EACH_CONSTRUCTOR_ELT (CONSTRUCTOR_ELTS (exp), idx, purpose, value)
@@ -2536,7 +2536,7 @@ copy_constant (tree exp)
default:
{
tree t = lang_hooks.expand_constant (exp);
-
+
gcc_assert (t == exp);
return copy_constant (t);
}
@@ -2952,7 +2952,7 @@ force_const_mem (enum machine_mode mode, rtx x)
hash = const_rtx_hash (x);
slot = htab_find_slot_with_hash (pool->const_rtx_htab, &tmp, hash, INSERT);
desc = *slot;
-
+
/* If the constant was already present, return its memory. */
if (desc)
return copy_rtx (desc->mem);
@@ -3087,13 +3087,13 @@ output_constant_pool_2 (enum machine_mode mode, rtx x, unsigned int align)
case MODE_DECIMAL_FLOAT:
{
REAL_VALUE_TYPE r;
-
+
gcc_assert (GET_CODE (x) == CONST_DOUBLE);
REAL_VALUE_FROM_CONST_DOUBLE (r, x);
assemble_real (r, mode, align);
break;
}
-
+
case MODE_INT:
case MODE_PARTIAL_INT:
assemble_integer (x, GET_MODE_SIZE (mode), align, 1);
@@ -3226,7 +3226,7 @@ mark_constant (rtx *current_rtx, void *data)
}
return -1;
-}
+}
/* Look through appropriate parts of INSN, marking all entries in the
constant pool which are actually being used. Entries that are only
@@ -3493,7 +3493,7 @@ initializer_constant_valid_p (tree value, tree endtype)
return null_pointer_node;
/* Taking the address of a nested function involves a trampoline. */
if (TREE_CODE (value) == FUNCTION_DECL
- && ((decl_function_context (value)
+ && ((decl_function_context (value)
&& !DECL_NO_STATIC_CHAIN (value))
|| DECL_DLLIMPORT_P (value)))
return NULL_TREE;
@@ -3828,12 +3828,12 @@ output_constant (tree exp, unsigned HOST_WIDE_INT size, unsigned int align)
tree link;
unsigned int nalign;
enum machine_mode inner;
-
+
inner = TYPE_MODE (TREE_TYPE (TREE_TYPE (exp)));
nalign = MIN (align, GET_MODE_ALIGNMENT (inner));
-
+
elt_size = GET_MODE_SIZE (inner);
-
+
link = TREE_VECTOR_CST_ELTS (exp);
output_constant (TREE_VALUE (link), elt_size, align);
while ((link = TREE_CHAIN (link)) != NULL)
@@ -3961,8 +3961,8 @@ output_constructor (tree exp, unsigned HOST_WIDE_INT size,
#ifdef ASM_COMMENT_START
if (field && flag_verbose_asm)
fprintf (asm_out_file, "%s %s:\n",
- ASM_COMMENT_START,
- DECL_NAME (field)
+ ASM_COMMENT_START,
+ DECL_NAME (field)
? IDENTIFIER_POINTER (DECL_NAME (field))
: "<anonymous>");
#endif
@@ -4543,7 +4543,7 @@ find_decl_and_mark_needed (tree decl, tree target)
cgraph_varpool_mark_needed_node (vnode);
return vnode->decl;
}
- else
+ else
return NULL_TREE;
}
@@ -4938,10 +4938,10 @@ default_section_type_flags_1 (tree decl, const char *name, int reloc,
&& cfun->unlikely_text_section_name
&& strcmp (name, cfun->unlikely_text_section_name) == 0)
flags = SECTION_CODE;
- else if (!decl
+ else if (!decl
&& (!current_function_decl || !cfun)
&& strcmp (name, UNLIKELY_EXECUTED_TEXT_SECTION_NAME) == 0)
- flags = SECTION_CODE;
+ flags = SECTION_CODE;
else
flags = SECTION_WRITE;
@@ -5055,7 +5055,7 @@ default_elf_asm_named_section (const char *name, unsigned int flags,
if (flags & SECTION_ENTSIZE)
fprintf (asm_out_file, ",%d", flags & SECTION_ENTSIZE);
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));
}
@@ -5063,7 +5063,7 @@ default_elf_asm_named_section (const char *name, unsigned int flags,
}
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)
{
char flagchars[8], *f = flagchars;
@@ -5491,7 +5491,7 @@ default_binds_local_p_1 (tree exp, int shlib)
local_p = true;
/* A variable is local if the user has said explicitly that it will
be. */
- else if (DECL_VISIBILITY_SPECIFIED (exp)
+ else if (DECL_VISIBILITY_SPECIFIED (exp)
&& DECL_VISIBILITY (exp) != VISIBILITY_DEFAULT)
local_p = true;
/* Variables defined outside this object might not be local. */
@@ -5552,7 +5552,15 @@ default_emit_unwind_label (FILE * stream ATTRIBUTE_UNUSED,
tree decl ATTRIBUTE_UNUSED,
int for_eh 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