aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux/hppa/setcontext.S
diff options
context:
space:
mode:
authorJohn David Anglin <danglin@gcc.gnu.org>2017-10-01 11:58:04 -0400
committerJohn David Anglin <danglin@gcc.gnu.org>2017-10-01 11:58:04 -0400
commit8da92e722ca66e35003abf64a77ae529f9989e6a (patch)
tree0e56ce3883a28656ff27c9ded225f3a300fd75b1 /sysdeps/unix/sysv/linux/hppa/setcontext.S
parent388784cfddc20ada56d3e52f830d6445b14aa3af (diff)
downloadglibc-8da92e722ca66e35003abf64a77ae529f9989e6a.zip
glibc-8da92e722ca66e35003abf64a77ae529f9989e6a.tar.gz
glibc-8da92e722ca66e35003abf64a77ae529f9989e6a.tar.bz2
Fix return pointer save and PIC register restore in __getcontext and
__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.
Diffstat (limited to 'sysdeps/unix/sysv/linux/hppa/setcontext.S')
-rw-r--r--sysdeps/unix/sysv/linux/hppa/setcontext.S4
1 files changed, 3 insertions, 1 deletions
diff --git a/sysdeps/unix/sysv/linux/hppa/setcontext.S b/sysdeps/unix/sysv/linux/hppa/setcontext.S
index 92cb204..7835794 100644
--- a/sysdeps/unix/sysv/linux/hppa/setcontext.S
+++ b/sysdeps/unix/sysv/linux/hppa/setcontext.S
@@ -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