3.4 PATCH: Provide target hook for ASM_OUTPUT_EXTERNAL_LIBCALL
Richard Henderson
rth@redhat.com
Thu Sep 18 02:16:00 GMT 2003
On Wed, Sep 17, 2003 at 09:25:52PM +0200, Rainer Orth wrote:
> * ASM_OUTPUT_EXTERNAL_LIBCALL is only called once in varasm.c with
> asm_out_file as first arg. Since this is fixed, it might be useful to
> remove the FILE * arg from the target function and always provide it in
> targhooks.c (default_external_libcall)?
Please. I much prefer that the target hooks don't pass FILE*,
but always output to asm_output_file.
> * Before the introduction of the target function, varasm.c
> (assemble_external_libcall) didn't do anything if
> ASM_OUTPUT_EXTERNAL_LIBCALL was undefined. It may set SYMBOL_REF_USED
> (fun) now even for a no-op default_external_libcall. I'm not sure if
> this could cause problems.
grep -r says it won't.
> * This new target function still needs to be documented. How should this
> be done while both ASM_OUTPUT_EXTERNAL_LIBCALL and
> TARGET_ASM_EXTERNAL_LIBCALL exist? At least the former should be marked
> as deprecated.
Don't know.
> * target.h (struct gcc_target): New member external_libcall.
> * target-def.h (TARGET_ASM_EXTERNAL_LIBCALL): Provide default.
> (TARGET_ASM_OUT): Use it.
> * doc/tm.texi (TARGET_ASM_EXTERNAL_LIBCALL): Document.
> * targhooks.c: Convert to ISO C 90.
> (default_external_libcall): New function.
> * targhooks.h (default_external_libcall): Declare.
> * varasm.c (assemble_external_libcall): Use
> targetm.asm_out.external_libcall instead of
> ASM_OUTPUT_EXTERNAL_LIBCALL.
> * config/mips/mips-protos.h [TARGET_IRIX5 || TARGET_IRIX 6]
> (mips_output_external_libcall): Declare.
> * config/mips/mips.c (mips_output_external_libcall): Change
> definition guard.
> Change to match TARGET_ASM_EXTERNAL_LIBCALL.
> Only operate for O32 ABI.
> * config/mips/iris5.h (TARGET_ASM_EXTERNAL_LIBCALL): Define
> instead of ASM_OUTPUT_EXTERNAL_LIBCALL.
> * config/mips/iris6.h (ASM_OUTPUT_EXTERNAL_LIBCALL): Don't undef,
> superceded by TARGET_ASM_EXTERNAL_LIBCALL.
Patch is ok. You don't actually have a tm.texi fragment.
r~
More information about the Gcc-patches
mailing list