diff options
author | John David Anglin <danglin@gcc.gnu.org> | 2017-07-09 13:48:04 -0400 |
---|---|---|
committer | John David Anglin <danglin@gcc.gnu.org> | 2017-07-09 13:48:04 -0400 |
commit | 7023e6db9950f9a2addc073fe504d12146680f02 (patch) | |
tree | d03997be874f5bc70eb723f74e87d2fc8ab9402b | |
parent | 218bb835cd0c7b4e3c068d0657efd3dae2551166 (diff) | |
download | glibc-7023e6db9950f9a2addc073fe504d12146680f02.zip glibc-7023e6db9950f9a2addc073fe504d12146680f02.tar.gz glibc-7023e6db9950f9a2addc073fe504d12146680f02.tar.bz2 |
Fix BZ #21049.
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | sysdeps/hppa/__longjmp.c | 11 |
2 files changed, 13 insertions, 4 deletions
@@ -1,3 +1,9 @@ +2017-07-09 Helge Deller <deller@gmx.de> + + [BZ #21049] + * sysdeps/hppa/__longjmp.c (__longjmp): Move call to CHECK_SP + up to avoid clobbering r26. + 2017-07-08 Andreas Schwab <schwab@linux-m68k.org> * scripts/build-many-glibcs.py (Glibc.build_glibc): Also build diff --git a/sysdeps/hppa/__longjmp.c b/sysdeps/hppa/__longjmp.c index a7eefc7..438db01 100644 --- a/sysdeps/hppa/__longjmp.c +++ b/sysdeps/hppa/__longjmp.c @@ -24,15 +24,16 @@ void __longjmp (__jmp_buf env, int val) { +#ifdef CHECK_SP + CHECK_SP (env[0].__jmp_buf.__sp); +#endif + + { /* We must use one of the non-callee saves registers for env. */ register unsigned long r26 asm ("r26") = (unsigned long)&env[0]; register unsigned long r25 asm ("r25") = (unsigned long)(val == 0 ? 1 : val); -#ifdef CHECK_SP - CHECK_SP (env[0].__jmp_buf.__sp); -#endif - asm volatile( /* Set return value. */ "copy %0, %%r28\n\t" @@ -79,6 +80,8 @@ __longjmp (__jmp_buf env, int val) : /* No outputs. */ : "r" (r25), "r" (r26) : /* No point in clobbers. */ ); + } + /* Avoid `volatile function does return' warnings. */ for (;;); } |