This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFA: hook doc patch (78/112): TARGET_UNWIND_EMIT


Quoting Gerald Pfeifer <gerald@pfeifer.com>:

On Sat, 16 Jan 2010, Joern Rennecke wrote:
* tm.texi (TARGET_UNWIND_EMIT): Remove space between 'FILE *' and
'@var{stream}.  Remove stray 'and'.

Calling the first parameter stream is a bit inconsistent with other cases, and none of the two implementations (arm and ia64) actually use that. Rather, both have asm_out_file instead, so I wonder whether we should document this?

In any case your patch fixes two real issues, so it is okay for now,

Thanks for the reviews. I'm currently working through them.


though it would be great could you look into the other issue, too.

This goes beyond what I set out here to do. (I.e., making the documentation consistent with target.h and include useful information from the per-member comments).

Moreover, I don't agree with dropping the documentation for the stream/file
parameter at this point.
We need to document the actual signature of the hook function (the actual
formal parameters and return type, to put it a bit paradoxical :-), so
that target hooks can be written that match in type.

So dropping the parameter from the documentation should only be done when it
is removed from the code.
There are some potential advantages to keep the parameter, i.e. using
a function parameter is often cheaper than using a global variable, particularly on hosts where parameters are passed in registers, hosts
which need multiple instructions to construct absolute references (a factor
that is increasing with 64 bit adoption), and on hosts that use PIC code.
Also, if GCC ever goes multi-threaded, asm_out_file might need to be in TLS.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]