diff options
author | Bernd Schmidt <bernds@codesourcery.com> | 2014-11-06 17:19:48 +0000 |
---|---|---|
committer | Bernd Schmidt <bernds@gcc.gnu.org> | 2014-11-06 17:19:48 +0000 |
commit | dc2af904c90c2644c2d8364c68e42264e854ff2a (patch) | |
tree | 4e848cc26ba0119f178b8262c8ae3d830b4ed5bb /gcc | |
parent | 4ad4ebfeae632ead1aa06203690ec7701569bb2f (diff) | |
download | gcc-dc2af904c90c2644c2d8364c68e42264e854ff2a.tar.gz |
Add a new asm hook to print the end of a variable definition.
* target.def (decl_end): New hook.
* varasm.c (assemble_variable_contents, assemble_constant_contents):
Use it.
* doc/tm.texi.in (TARGET_ASM_DECL_END): Add.
* doc/tm.texi: Regenerate.
From-SVN: r217196
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/doc/tm.texi | 5 | ||||
-rw-r--r-- | gcc/doc/tm.texi.in | 2 | ||||
-rw-r--r-- | gcc/target.def | 9 | ||||
-rw-r--r-- | gcc/varasm.c | 3 |
5 files changed, 27 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d8cbe9610cc..1121f3e8564 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2014-11-06 Bernd Schmidt <bernds@codesourcery.com> + + * target.def (decl_end): New hook. + * varasm.c (assemble_variable_contents, assemble_constant_contents): + Use it. + * doc/tm.texi.in (TARGET_ASM_DECL_END): Add. + * doc/tm.texi: Regenerate. + 2014-11-06 Renlin Li <renlin.li@arm.com> * config/aarch64/aarch64.c (aarch64_architecture_version): New. diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi index 1bb31830ce1..7af23e5247a 100644 --- a/gcc/doc/tm.texi +++ b/gcc/doc/tm.texi @@ -7421,6 +7421,11 @@ The default implementation of this hook will use the when the relevant string is @code{NULL}. @end deftypefn +@deftypefn {Target Hook} void TARGET_ASM_DECL_END (void) +Define this hook if the target assembler requires a special marker to +terminate an initialized variable declaration. +@end deftypefn + @deftypefn {Target Hook} bool TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA (FILE *@var{file}, rtx @var{x}) A target hook to recognize @var{rtx} patterns that @code{output_addr_const} can't deal with, and output assembly code to @var{file} corresponding to diff --git a/gcc/doc/tm.texi.in b/gcc/doc/tm.texi.in index bf1595c6a2e..f739fdfee91 100644 --- a/gcc/doc/tm.texi.in +++ b/gcc/doc/tm.texi.in @@ -5193,6 +5193,8 @@ It must not be modified by command-line option processing. @hook TARGET_ASM_INTEGER +@hook TARGET_ASM_DECL_END + @hook TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA @defmac ASM_OUTPUT_ASCII (@var{stream}, @var{ptr}, @var{len}) diff --git a/gcc/target.def b/gcc/target.def index d460516ffe6..4c02c1113d1 100644 --- a/gcc/target.def +++ b/gcc/target.def @@ -127,6 +127,15 @@ when the relevant string is @code{NULL}.", bool, (rtx x, unsigned int size, int aligned_p), default_assemble_integer) +/* Notify the backend that we have completed emitting the data for a + decl. */ +DEFHOOK +(decl_end, + "Define this hook if the target assembler requires a special marker to\n\ +terminate an initialized variable declaration.", + void, (void), + hook_void_void) + /* Output code that will globalize a label. */ DEFHOOK (globalize_label, diff --git a/gcc/varasm.c b/gcc/varasm.c index 40eeb5ed2c2..8d857a4bc9a 100644 --- a/gcc/varasm.c +++ b/gcc/varasm.c @@ -2041,6 +2041,7 @@ assemble_variable_contents (tree decl, const char *name, else /* Leave space for it. */ assemble_zeros (tree_to_uhwi (DECL_SIZE_UNIT (decl))); + targetm.asm_out.decl_end (); } } @@ -3347,6 +3348,8 @@ assemble_constant_contents (tree exp, const char *label, unsigned int align) /* Output the value of EXP. */ output_constant (exp, size, align); + + targetm.asm_out.decl_end (); } /* We must output the constant data referred to by SYMBOL; do so. */ |