This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PA2.0 bve
- To: gcc-patches at gcc dot gnu dot org
- Subject: PA2.0 bve
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Wed, 22 Sep 1999 14:30:21 -0600
- Reply-To: law at cygnus dot com
PA2.0 has a new "bve" instruction which jumps to an address in a register
that is possibly in a different space/segment.
This capability can reduce the overhead on the return path out of shared
libraries by avoiding a trampoline to do a cross-space branch from the
shared library back to the main executable (or some different shared library).
Wheee. Fun.
* pa.md (return, return_internal): Use bve for PA2.0.
Index: config/pa/pa.md
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/pa/pa.md,v
retrieving revision 1.52
diff -c -3 -p -r1.52 pa.md
*** pa.md 1999/09/22 20:24:45 1.52
--- pa.md 1999/09/22 20:28:37
***************
*** 4498,4504 ****
(define_insn "return"
[(return)]
"hppa_can_use_return_insn_p ()"
! "bv%* %%r0(%%r2)"
[(set_attr "type" "branch")
(set_attr "length" "4")])
--- 4498,4509 ----
(define_insn "return"
[(return)]
"hppa_can_use_return_insn_p ()"
! "*
! {
! if (TARGET_PA_20)
! return \"bve%* (%%r2)\";
! return \"bv%* %%r0(%%r2)\";
! }"
[(set_attr "type" "branch")
(set_attr "length" "4")])
***************
*** 4508,4514 ****
[(use (reg:SI 2))
(return)]
""
! "bv%* %%r0(%%r2)"
[(set_attr "type" "branch")
(set_attr "length" "4")])
--- 4513,4524 ----
[(use (reg:SI 2))
(return)]
""
! "*
! {
! if (TARGET_PA_20)
! return \"bve%* (%%r2)\";
! return \"bv%* %%r0(%%r2)\";
! }"
[(set_attr "type" "branch")
(set_attr "length" "4")])