]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - sysdeps/powerpc/powerpc32/dl-trampoline.S
Prefer https to http for gnu.org and fsf.org URLs
[thirdparty/glibc.git] / sysdeps / powerpc / powerpc32 / dl-trampoline.S
index ea5ce7b45aa18661280d359d029116fdab9fc611..87046b0d154abb18ad53a6901d50dc94ad87888a 100644 (file)
@@ -1,5 +1,5 @@
 /* PLT trampolines.  PPC32 version.
-   Copyright (C) 2005 Free Software Foundation, Inc.
+   Copyright (C) 2005-2019 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -13,9 +13,8 @@
    Lesser General Public License for more details.
 
    You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
 
 #include <sysdep.h>
 
        .globl _dl_runtime_resolve
        .type _dl_runtime_resolve,@function
 _dl_runtime_resolve:
+       cfi_startproc
  # We need to save the registers used to pass parameters, and register 0,
  # which is used by _mcount; the registers are saved in a stack frame.
        stwu r1,-64(r1)
+       cfi_adjust_cfa_offset (64)
        stw r0,12(r1)
        stw r3,16(r1)
        stw r4,20(r1)
@@ -38,7 +39,9 @@ _dl_runtime_resolve:
        mflr r0
  # We also need to save some of the condition register fields
        stw r7,32(r1)
+ # Don't clobber the caller's LRSAVE, it is needed by _mcount.
        stw r0,48(r1)
+       cfi_offset (lr, -16)
        stw r8,36(r1)
        mfcr r0
        stw r9,40(r1)
@@ -64,15 +67,19 @@ _dl_runtime_resolve:
  # ...unwind the stack frame, and jump to the PLT entry we updated.
        addi r1,r1,64
        bctr
+       cfi_endproc
        .size    _dl_runtime_resolve,.-_dl_runtime_resolve
 
+#ifndef PROF
        .align 2
        .globl _dl_prof_resolve
        .type _dl_prof_resolve,@function
 _dl_prof_resolve:
+       cfi_startproc
  # We need to save the registers used to pass parameters, and register 0,
  # which is used by _mcount; the registers are saved in a stack frame.
        stwu r1,-320(r1)
+       cfi_adjust_cfa_offset (320)
        /* Stack layout:
 
          +312   stackframe
@@ -121,12 +128,15 @@ _dl_prof_resolve:
        mflr r5
  # We also need to save some of the condition register fields.
        stw r7,32(r1)
+ # Don't clobber the caller's LRSAVE, it is needed by _mcount.
        stw r5,308(r1)
+       cfi_offset (lr, -12)
        stw r8,36(r1)
        mfcr r0
        stw r9,40(r1)
        stw r10,44(r1)
        stw r0,8(r1)
+#ifndef __NO_FPRS__
  # Save the floating point registers
        stfd fp1,48(r1)
        stfd fp2,56(r1)
@@ -136,6 +146,7 @@ _dl_prof_resolve:
        stfd fp6,88(r1)
        stfd fp7,96(r1)
        stfd fp8,104(r1)
+#endif
  # XXX TODO: store vmx registers
  # Load the extra parameters.
        addi r6,r1,16
@@ -159,6 +170,7 @@ _dl_prof_resolve:
        lwz r4,20(r1)
        lwz r3,16(r1)
         lwz r0,12(r1)
+#ifndef __NO_FPRS__
  # Load the floating point registers.
        lfd fp1,48(r1)
        lfd fp2,56(r1)
@@ -168,7 +180,10 @@ _dl_prof_resolve:
        lfd fp6,88(r1)
        lfd fp7,96(r1)
        lfd fp8,104(r1)
+#endif
  # ...unwind the stack frame, and jump to the PLT entry we updated.
        addi r1,r1,320
        bctr
+       cfi_endproc
        .size    _dl_prof_resolve,.-_dl_prof_resolve
+#endif