Patchwork Deal with #ident without

login
register
mail settings
Submitter Steven Bosscher
Date June 7, 2012, 10:09 a.m.
Message ID <CABu31nN_nto64TAuw=CVGEYK6c+keA0w-tFjJ65cWWqxXmEu-g@mail.gmail.com>
Download mbox | patch
Permalink /patch/163581/
State New
Headers show

Comments

Steven Bosscher - June 7, 2012, 10:09 a.m.
On Thu, Jun 7, 2012 at 8:16 AM, Andreas Schwab <schwab@linux-m68k.org> wrote:
> Steven Bosscher <stevenb.gcc@gmail.com> 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
Andreas Schwab - June 7, 2012, 10:42 a.m.
Steven Bosscher <stevenb.gcc@gmail.com> writes:

> I am not sure what you mean with misplaced.

A nested @deftypefn doesn't look right.  Try make info.  You need to add
a @hook in tm.texi.in at the right place (output_ident has nothing to do
with anchors).

Andreas.
Steven Bosscher - June 7, 2012, 11:17 a.m.
On Thu, Jun 7, 2012 at 12:42 PM, Andreas Schwab <schwab@linux-m68k.org> wrote:
> Steven Bosscher <stevenb.gcc@gmail.com> writes:
>
>> I am not sure what you mean with misplaced.
>
> A nested @deftypefn doesn't look right.  Try make info.  You need to add
> a @hook in tm.texi.in at the right place (output_ident has nothing to do
> with anchors).

Ah, I see. So it should be something like the attached. I'll test
this. Thanks for the help!

Ciao!
Steven

Patch

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