On 09/23/2015 04:48 PM, Dominik Vogt wrote:
On Tue, Sep 22, 2015 at 01:56:15PM -0600, Jeff Law wrote: > Is
there some good reason these aren't hooks?
No, that was just inobservance. New version attached. Would it be
preferrable to initialize the hooks with a NULL pointer and test
the pointer before calling them? (That way the changes to
hooks.[ch] could be dropped.)
There are already several hooks/macros in use for this kind of thing,
have you checked that they are not usable for your purpose? There's
ASM_DECLARE_FUNCTION_NAME, which is used by nvptx for example, and
there's also ASM_OUTPUT_FUNCTION_PREFIX, which is apparently used by
nothing in the current tree. For the end you could use
ASM_DECLARE_FUNCTION_SIZE.
FWIW I prefer the initialization with functions rather than NULL.
Bernd