summaryrefslogtreecommitdiff
path: root/gcc/varasm.c
diff options
context:
space:
mode:
authoraesok <aesok@138bc75d-0d04-0410-961f-82ee72b054a4>2010-06-15 21:01:57 +0000
committeraesok <aesok@138bc75d-0d04-0410-961f-82ee72b054a4>2010-06-15 21:01:57 +0000
commit427eb1388947d71bba9b9be18f6a6c4c72fe87d8 (patch)
tree17306d02a0afd6f48b81bff1a4163e2b152c10be /gcc/varasm.c
parent523ff179e33d73d02e56f81fd940ee8b6929e735 (diff)
downloadgcc-427eb1388947d71bba9b9be18f6a6c4c72fe87d8.tar.gz
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@160811 138bc75d-0d04-0410-961f-82ee72b054a4
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 e02126b07d7..8ef41e3264b 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