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

PA2.0 bve



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")])
  



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