pa-linux.h (TARGET_HAS_STUBS_AND_ELF_SECTIONS): Delete define.
* pa-linux.h (TARGET_HAS_STUBS_AND_ELF_SECTIONS): Delete define. * pa32-linux.h (FUNCTION_OK_FOR_SIBCALL): Delete define. * pa.c (pa_function_ok_for_sibcall): Allow non indirect sibcalls on TARGET_ELF32. Add comment on sibcall issues for TARGET_64BIT. From-SVN: r60377
This commit is contained in:
parent
f9d2de4d0d
commit
11f4312758
@ -1,3 +1,10 @@
|
||||
2002-12-20 John David Anglin <dave.anglin@nrc.gc.ca>
|
||||
|
||||
* pa-linux.h (TARGET_HAS_STUBS_AND_ELF_SECTIONS): Delete define.
|
||||
* pa32-linux.h (FUNCTION_OK_FOR_SIBCALL): Delete define.
|
||||
* pa.c (pa_function_ok_for_sibcall): Allow non indirect sibcalls on
|
||||
TARGET_ELF32. Add comment on sibcall issues for TARGET_64BIT.
|
||||
|
||||
2002-12-20 Kazu Hirata <kazu@cs.umass.edu>
|
||||
|
||||
* config/h8300/h8300-protos.h: Add prototypes for
|
||||
|
@ -167,11 +167,6 @@ Boston, MA 02111-1307, USA. */
|
||||
/* Globalizing directive for a label. */
|
||||
#define GLOBAL_ASM_OP ".globl "
|
||||
|
||||
/* This definition is used inside pa.c to disable all
|
||||
sibcall optimization, because sibcalls, stubs and
|
||||
elf sections don't play well. */
|
||||
#define TARGET_HAS_STUBS_AND_ELF_SECTIONS 1
|
||||
|
||||
/* FIXME: Hacked from the <elfos.h> one so that we avoid multiple
|
||||
labels in a function declaration (since pa.c seems determined to do
|
||||
it differently) */
|
||||
|
@ -6878,14 +6878,26 @@ pa_function_ok_for_sibcall (decl, exp)
|
||||
tree decl;
|
||||
tree exp ATTRIBUTE_UNUSED;
|
||||
{
|
||||
#ifdef TARGET_HAS_STUBS_AND_ELF_SECTIONS
|
||||
/* Sibcalls, stubs, and elf sections don't play well. */
|
||||
return false;
|
||||
#endif
|
||||
/* Sibcalls are ok for TARGET_ELF32 as along as the linker is used in
|
||||
single subspace mode and the call is not indirect. As far as I know,
|
||||
there is no operating system support for the multiple subspace mode.
|
||||
It might be possible to support indirect calls if we didn't use
|
||||
$$dyncall (see the indirect sequence generated in output_call). */
|
||||
if (TARGET_ELF32)
|
||||
return (decl != NULL_TREE);
|
||||
|
||||
/* Sibcalls are not ok because the arg pointer register is not a fixed
|
||||
register. This prevents the sibcall optimization from occuring. In
|
||||
addition, there are problems with stub placement using GNU ld. This
|
||||
is because a normal sibcall branch uses a 17-bit relocation while
|
||||
a regular call branch uses a 22-bit relocation. As a result, more
|
||||
care needs to be taken in the placement of long-branch stubs. */
|
||||
if (TARGET_64BIT)
|
||||
return false;
|
||||
|
||||
return (decl
|
||||
&& ! TARGET_PORTABLE_RUNTIME
|
||||
&& ! TARGET_64BIT
|
||||
&& ! TREE_PUBLIC (decl));
|
||||
&& !TARGET_PORTABLE_RUNTIME
|
||||
&& !TREE_PUBLIC (decl));
|
||||
}
|
||||
|
||||
/* Returns 1 if the 6 operands specified in OPERANDS are suitable for
|
||||
|
@ -22,14 +22,6 @@ Boston, MA 02111-1307, USA. */
|
||||
#undef TARGET_ELF32
|
||||
#define TARGET_ELF32 1
|
||||
|
||||
/* Sibcalls are ok when ld is used in single subspace mode. The
|
||||
multiple subspace mode is not compatible with sibcalls to external
|
||||
functions because the linker generated stubs store the return
|
||||
pointer into the frame. This target does not need multiple
|
||||
subspace stubs, so we allow sibcalls to all functions. */
|
||||
#undef FUNCTION_OK_FOR_SIBCALL
|
||||
#define FUNCTION_OK_FOR_SIBCALL(DECL) 1
|
||||
|
||||
/* The libcall __canonicalize_funcptr_for_compare is referenced in
|
||||
crtend.o and the reference isn't resolved in objects that don't
|
||||
compare function pointers. Thus, we need to play games to provide
|
||||
|
Loading…
Reference in New Issue
Block a user