diff options
author | Jeff Law <law@gcc.gnu.org> | 1994-11-10 21:38:40 -0700 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 1994-11-10 21:38:40 -0700 |
commit | 105ce113ecb06d477f4ebf875c7f0f1bbc3ea82e (patch) | |
tree | af757e92f212ec89bccd6ce11ff6ddb9ad1cfeb9 | |
parent | 6bb36601f1c5a8f758f29523d514f9e27ee711f8 (diff) | |
download | gcc-105ce113ecb06d477f4ebf875c7f0f1bbc3ea82e.zip gcc-105ce113ecb06d477f4ebf875c7f0f1bbc3ea82e.tar.gz gcc-105ce113ecb06d477f4ebf875c7f0f1bbc3ea82e.tar.bz2 |
* 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
-rw-r--r-- | gcc/config/pa/pa.h | 9 | ||||
-rw-r--r-- | gcc/config/pa/pa.md | 6 |
2 files changed, 15 insertions, 0 deletions
diff --git a/gcc/config/pa/pa.h b/gcc/config/pa/pa.h index cf880af..36b7a84 100644 --- a/gcc/config/pa/pa.h +++ b/gcc/config/pa/pa.h @@ -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}, \ diff --git a/gcc/config/pa/pa.md b/gcc/config/pa/pa.md index 3bb5b07..60459ac 100644 --- a/gcc/config/pa/pa.md +++ b/gcc/config/pa/pa.md @@ -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\"; |