aboutsummaryrefslogtreecommitdiff
path: root/gcc/varasm.c
diff options
context:
space:
mode:
authorAnatoly Sokolov <aesok@post.ru>2010-06-16 01:01:57 +0400
committerAnatoly Sokolov <aesok@gcc.gnu.org>2010-06-16 01:01:57 +0400
commite4f7c48321cb916273e0a77c4924c416921a2c52 (patch)
tree17306d02a0afd6f48b81bff1a4163e2b152c10be /gcc/varasm.c
parentd1a115f895b6bd7658f1222d57d38caec192dbcc (diff)
downloadgcc-e4f7c48321cb916273e0a77c4924c416921a2c52.zip
gcc-e4f7c48321cb916273e0a77c4924c416921a2c52.tar.gz
gcc-e4f7c48321cb916273e0a77c4924c416921a2c52.tar.bz2
* target.h (struct asm_out):Add declare_constant_name field.
* target-def.h (TARGET_ASM_DECLARE_CONSTANT_NAME): Define. (TARGET_INITIALIZER): Use TARGET_ASM_DECLARE_CONSTANT_NAME. * output.h (default_asm_declare_constant_name): Declare. (assemble_label): Update prototype. * varasm.c (assemble_constant_contents): Use targetm.asm_out.declare_constant_name target hook. (assemble_label): Add 'file' argument. (default_asm_declare_constant_name): New function. * system.h (ASM_DECLARE_CONSTANT_NAME): Poison. * doc/tm.texi (ASM_DECLARE_CONSTANT_NAME): Remove. (TARGET_ASM_DECLARE_CONSTANT_NAME): Document it. * config/darwin-protos.h (darwin_asm_declare_constant_name): Declare. * config/darwin.c (darwin_asm_declare_constant_name): New function. (machopic_output_indirection): Update assemble_label argument list. * config/darwin.h (ASM_DECLARE_CONSTANT_NAME): Remove. (TARGET_ASM_DECLARE_CONSTANT_NAME): Define. From-SVN: r160811
Diffstat (limited to 'gcc/varasm.c')
-rw-r--r--gcc/varasm.c22
1 files changed, 14 insertions, 8 deletions
diff --git a/gcc/varasm.c b/gcc/varasm.c
index e02126b..8ef41e3 100644
--- a/gcc/varasm.c
+++ b/gcc/varasm.c
@@ -2461,9 +2461,9 @@ assemble_external_libcall (rtx fun)
/* Assemble a label named NAME. */
void
-assemble_label (const char *name)
+assemble_label (FILE *file, const char *name)
{
- ASM_OUTPUT_LABEL (asm_out_file, name);
+ ASM_OUTPUT_LABEL (file, name);
}
/* Set the symbol_referenced flag for ID. */
@@ -3475,12 +3475,7 @@ assemble_constant_contents (tree exp, const char *label, unsigned int align)
size = get_constant_size (exp);
/* Do any machine/system dependent processing of the constant. */
-#ifdef ASM_DECLARE_CONSTANT_NAME
- ASM_DECLARE_CONSTANT_NAME (asm_out_file, label, exp, size);
-#else
- /* Standard thing is just output label for the constant. */
- ASM_OUTPUT_LABEL (asm_out_file, label);
-#endif /* ASM_DECLARE_CONSTANT_NAME */
+ targetm.asm_out.declare_constant_name (asm_out_file, label, exp, size);
/* Output the value of EXP. */
output_constant (exp, size, align);
@@ -6894,6 +6889,17 @@ default_internal_label (FILE *stream, const char *prefix,
ASM_OUTPUT_INTERNAL_LABEL (stream, buf);
}
+
+/* The default implementation of ASM_DECLARE_CONSTANT_NAME. */
+
+void
+default_asm_declare_constant_name (FILE *file, const char *name,
+ const_tree exp ATTRIBUTE_UNUSED,
+ HOST_WIDE_INT size ATTRIBUTE_UNUSED)
+{
+ assemble_label (file, name);
+}
+
/* This is the default behavior at the beginning of a file. It's
controlled by two other target-hook toggles. */
void