* Fast indirect call support.
* pa.h (TARGET_FAST_INDIRECT_CALLS): New target switch. (TARGET_SWITCHES): Add "fast-indirect-calls" and inverse. * pa.md (call_internal_reg, call_value_internal_reg): Generate appropriate code for TARGET_FAST_INDIRECT_CALLS. From-SVN: r8420
This commit is contained in:
parent
6bb36601f1
commit
105ce113ec
@ -47,6 +47,13 @@ extern int target_flags;
|
||||
|
||||
#define TARGET_DISABLE_FPREGS (target_flags & 2)
|
||||
|
||||
/* Generate code which assumes that calls through function pointers will
|
||||
never cross a space boundary. Such assumptions are generally safe for
|
||||
building kernels and statically linked executables. Code compiled with
|
||||
this option will fail miserably if the executable is dynamically linked
|
||||
or uses nested functions! */
|
||||
#define TARGET_FAST_INDIRECT_CALLS (target_flags & 4)
|
||||
|
||||
/* Allow unconditional jumps in the delay slots of call instructions. */
|
||||
#define TARGET_JUMP_IN_DELAY (target_flags & 8)
|
||||
|
||||
@ -89,6 +96,8 @@ extern int target_flags;
|
||||
{"pa-risc-1-1", 1}, \
|
||||
{"disable-fpregs", 2}, \
|
||||
{"no-disable-fpregs", 2}, \
|
||||
{"fast-indirect-calls", 4}, \
|
||||
{"no-fast-indirect-calls", -4},\
|
||||
{"jump-in-delay", 8}, \
|
||||
{"no-jump-in-delay", -8}, \
|
||||
{"long-calls", 16}, \
|
||||
|
@ -3202,6 +3202,9 @@
|
||||
""
|
||||
"*
|
||||
{
|
||||
if (TARGET_FAST_INDIRECT_CALLS)
|
||||
return \"blr 0,%%r2\;bv,n 0(%r0)\;ldo 4(%%r2),%%r2\";
|
||||
|
||||
/* Yuk! bl may not be able to reach $$dyncall. */
|
||||
if (TARGET_LONG_CALLS)
|
||||
return \"copy %r0,%%r22\;ldil L%%$$dyncall,%%r31\;ldo R%%$$dyncall(%%r31),%%r31\;blr 0,%%r2\;bv,n 0(%%r31)\;nop\";
|
||||
@ -3290,6 +3293,9 @@
|
||||
""
|
||||
"*
|
||||
{
|
||||
if (TARGET_FAST_INDIRECT_CALLS)
|
||||
return \"blr 0,%%r2\;bv,n 0(%r1)\;ldo 4(%%r2),%%r2\";
|
||||
|
||||
/* Yuk! bl may not be able to reach $$dyncall. */
|
||||
if (TARGET_LONG_CALLS)
|
||||
return \"copy %r1,%%r22\;ldil L%%$$dyncall,%%r31\;ldo R%%$$dyncall(%%r31),%%r31\;blr 0,%%r2\;bv,n 0(%%r31)\;nop\";
|
||||
|
Loading…
Reference in New Issue
Block a user