From patchwork Thu Jun 7 10:09:22 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: Deal with #ident without Date: Thu, 07 Jun 2012 00:09:22 -0000 From: Steven Bosscher X-Patchwork-Id: 163581 Message-Id: To: Andreas Schwab Cc: Michael Eager , Richard Guenther , GCC Patches , hp@gcc.gnu.org, rsandifo@gcc.gnu.org, Nick Clifton , Eric Botcazou On Thu, Jun 7, 2012 at 8:16 AM, Andreas Schwab wrote: > Steven Bosscher writes: > >> Index: doc/tm.texi >> =================================================================== >> --- doc/tm.texi       (revision 188182) >> +++ doc/tm.texi       (working copy) >> @@ -5847,6 +5847,10 @@ value is 0. >>  @end deftypevr >> >>  @deftypefn {Target Hook} void TARGET_ASM_OUTPUT_ANCHOR (rtx @var{x}) >> + >> +@deftypefn {Target Hook} void TARGET_ASM_OUTPUT_IDENT (const char *@var{name}) >> +Generate a string based on @var{name}, suitable for the @samp{#ident}  directive, or the equivalent directive or pragma in non-C-family languages.  If this hook is not defined, nothing is output for the @samp{#ident}  directive. >> +@end deftypefn > > That looks misplaced. Hello, I am not sure what you mean with misplaced. If you mean the position in the file: Can't help that, it comes out of target.def that way. If you mean the text itself, yes, that looks like something I tried in an older iteration of this patch (target hook returning a .ident string). In the following documentation, the "Generate a string" is replaced by "Output a string". Is that better? Otherwise, can you please clarify what you would like to see different here? Thanks, Ciao! Steven Write the assembly code to define section anchor @var{x}, which is a @code{SYMBOL_REF} for which @samp{SYMBOL_REF_ANCHOR_P (@var{x})} is true. The hook is called with the assembly output position set to the beginning @@ -7398,12 +7402,6 @@ of the filename using this macro. @end defmac -@defmac ASM_OUTPUT_IDENT (@var{stream}, @var{string}) -A C statement to output something to the assembler file to handle a -@samp{#ident} directive containing the text @var{string}. If this -macro is not defined, nothing is output for a @samp{#ident} directive. -@end defmac - @deftypefn {Target Hook} void TARGET_ASM_NAMED_SECTION (const char *@var{name}, unsigned int @var{flags}, tree @var{decl}) Output assembly directives to switch to section @var{name}. The section should have attributes as specified by @var{flags}, which is a bit mask Index: doc/tm.texi =================================================================== --- doc/tm.texi (revision 188182) +++ doc/tm.texi (working copy) @@ -5847,6 +5847,10 @@ @end deftypevr @deftypefn {Target Hook} void TARGET_ASM_OUTPUT_ANCHOR (rtx @var{x}) + +@deftypefn {Target Hook} void TARGET_ASM_OUTPUT_IDENT (const char *@var{name}) +Output a string based on @var{name}, suitable for the @samp{#ident} directive, or the equivalent directive or pragma in non-C-family languages. If this hook is not defined, nothing is output for the @samp{#ident} directive. +@end deftypefn