]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Fix return pointer save and PIC register restore in __getcontext and
authorJohn David Anglin <danglin@gcc.gnu.org>
Sun, 1 Oct 2017 15:58:04 +0000 (11:58 -0400)
committerJohn David Anglin <danglin@gcc.gnu.org>
Sun, 1 Oct 2017 15:58:04 +0000 (11:58 -0400)
__setcontext on hppa.

* sysdeps/unix/sysv/linux/hppa/getcontext.S (__getcontext): Save return
pointer in frame.
* sysdeps/unix/sysv/linux/hppa/setcontext.S (__setcontext): Likewise.
Correct offset used to restore PIC register.

ChangeLog
sysdeps/unix/sysv/linux/hppa/getcontext.S
sysdeps/unix/sysv/linux/hppa/setcontext.S

index f639d0acb9efa69fd7128f9de5597b51ebd82f85..593ac8395a88c0c09cdd63945d54fb903c691355 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2017-10-01  John David Anglin  <danglin@gcc.gnu.org>
+
+       * sysdeps/unix/sysv/linux/hppa/getcontext.S (__getcontext): Save return
+       pointer in frame.
+       * sysdeps/unix/sysv/linux/hppa/setcontext.S (__setcontext): Likewise.
+       Correct offset used to restore PIC register.
+
 2017-09-30  John David Anglin  <danglin@gcc.gnu.org>
 
        [BZ libc/22165]
index b201d8fda2351d01eeb48b5590a37dc32add2d1f..79a59cd557a0865152f84b7e1a2c80f7775e7e30 100644 (file)
@@ -129,6 +129,8 @@ ENTRY(__getcontext)
        fstds    %fr31, 0(%r1)
 
        /* Prologue */
+       stw     %r2, -20(%sp)
+       .cfi_offset 2, -20
        stwm    %r4, 64(%sp)
        .cfi_def_cfa_offset -64
        .cfi_offset 4, 0
index 92cb204f8d6275e1109197b7aef82a9e4805a101..78357941b3795f8541ae2e3e88ab1301887cf0e8 100644 (file)
@@ -25,6 +25,8 @@
 
 ENTRY(__setcontext)
        /* Prologue */
+       stw     %r2, -20(%sp)
+       .cfi_offset 2, -20
        stwm    %r3, 64(%sp)
        .cfi_def_cfa_offset -64
        .cfi_offset 3, 0
@@ -151,7 +153,7 @@ ENTRY(__setcontext)
        /* Epilogue */
        ldw     -84(%r30), %r2
 #ifdef PIC
-       ldw     -96(%r30), %r19
+       ldw     -32(%r30), %r19
 #endif
        bv      %r0(%r2)
        ldwm    -64(%r30), %r3