This is the mail archive of the gcc-bugs@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]

[Bug target/30480] New: Redundant TARGET_ASM_EXTERNAL_LIBCALL


From

http://gcc.gnu.org/ml/gcc/2007-01/msg00556.html:

TARGET_ASM_EXTERNAL_LIBCALL is a subset of ASM_OUTPUT_EXTERNAL
which is called by assemble_external_real. Why do we need
TARGET_ASM_EXTERNAL_LIBCALL when there is ASM_OUTPUT_EXTERNAL?

---
@defmac ASM_OUTPUT_EXTERNAL (@var{stream}, @var{decl}, @var{name})
A C statement (sans semicolon) to output to the stdio stream
@var{stream} any text necessary for declaring the name of an external
symbol named @var{name} which is referenced in this compilation but
not defined.  The value of @var{decl} is the tree node for the
declaration.

This macro need not be defined if it does not need to output anything.
The GNU assembler and most Unix assemblers don't require anything.
@end defmac

@deftypefn {Target Hook} void TARGET_ASM_EXTERNAL_LIBCALL (rtx @var{symref})
This target hook is a function to output to @var{asm_out_file} an assembler
pseudo-op to declare a library function name external.  The name of the
library function is given by @var{symref}, which is a @code{symbol_ref}.
@end deftypefn
----

In fact, ia64 uses ASM_OUTPUT_EXTERNAL and mips uses
TARGET_ASM_EXTERNAL_LIBCALL for generating:

.globl foo
.type foo,...

or

.globl foo .text

for calling external function, foo.

> At present, in particular, there are targets which implement
> TARGET_ASM_EXTERNAL_LIBCALL (or ASM_OUTPUT_EXTERNAL_LIBCALL) but don't
> implement ASM_OUTPUT_EXTERNAL, and there are targets which implement
> both but implement them differently.

Many of those targets, if not all, have TARGET_ASM_FILE_END and/or
maintain their own lists of external symbols, which are obsolete
with a properly implemented ASM_OUTPUT_EXTERNAL.

> So any attempt at cleaning this up would have to be done very
> carefully so as to not break anything.


-- 
           Summary: Redundant TARGET_ASM_EXTERNAL_LIBCALL
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: hjl at lucon dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30480


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