From: Richard Kenner Date: Sat, 29 Jul 1995 13:15:13 +0000 (-0400) Subject: (gcc_plt_call): Rewrite to avoid the need for being called by _sr4export. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a63c3ebc93509036005ab073202d44ef23d3a4c9;p=gcc.git (gcc_plt_call): Rewrite to avoid the need for being called by _sr4export. (gcc_plt_call): Rewrite to avoid the need for being called by _sr4export. Inline expand $$dyncall to avoid the need for long-call and PIC support. From-SVN: r10194 --- diff --git a/gcc/config/pa/lib2funcs.asm b/gcc/config/pa/lib2funcs.asm index 500483060ba..ea964d3af6f 100644 --- a/gcc/config/pa/lib2funcs.asm +++ b/gcc/config/pa/lib2funcs.asm @@ -1,5 +1,5 @@ ; Subroutines for calling unbound dynamic functions from within GDB for HPPA. -; Copyright (C) 1994 Free Software Foundation, Inc. +; Copyright (C) 1994, 1995 Free Software Foundation, Inc. ; This file is part of GNU CC. @@ -36,12 +36,28 @@ .EXPORT __gcc_plt_call,ENTRY,PRIV_LEV=3,RTNVAL=GR __gcc_plt_call .PROC - .CALLINFO FRAME=64,CALLS,SAVE_RP + .CALLINFO .ENTRY - stw %r2,-8(0,%r30) - bl $$dyncall,%r31 + ; Our return address comes in %r31, not %r2! + stw %r31,-8(0,%r30) + + ; An inline version of dyncall so we don't have to worry + ; about long calls to millicode, PIC and other complexities. + bb,>=,n %r22,30,L$foo + depi 0,31,2,%r22 + ldw 4(%r22),%r19 + ldw 0(%r22),%r22 +L$foo + ldsid (%r22),%r1 + mtsp %r1,%sr0 + ble 0(%sr0,%r22) copy %r31,%r2 ldw -8(0,%r30),%r2 - bv,n 0(%r2) + + ; We're going to be returning to a stack address, so we + ; need to do an intra-space return. + ldsid (%rp),%r1 + mtsp %r1,%sr0 + be,n 0(%sr0,%rp) .EXIT .PROCEND