summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid McCullough <davidm@snapgear.com>2003-05-01 05:28:43 +0000
committerDavid McCullough <davidm@snapgear.com>2003-05-01 05:28:43 +0000
commit72cf601ed08e791cf532fdf41b946161d302f629 (patch)
tree416973ced45b651f331f8af2a4a4e989124bbcf1
parentdd7edf2e66c25b0af951a0685e8a7f0f161dc564 (diff)
setjmp was trashing r12 which is bad and can cause apps to crash if they are
using r12. r12 is supposed to be preserved across C function calls. r0-r7 are trashable :-)
-rw-r--r--libc/sysdeps/linux/sh/setjmp.S6
1 files changed, 3 insertions, 3 deletions
diff --git a/libc/sysdeps/linux/sh/setjmp.S b/libc/sysdeps/linux/sh/setjmp.S
index 7d70fba76..bb87ff0fb 100644
--- a/libc/sysdeps/linux/sh/setjmp.S
+++ b/libc/sysdeps/linux/sh/setjmp.S
@@ -78,12 +78,12 @@ __sigsetjmp_intern:
mov.l r8, @-r4
#if defined __HAVE_ELF__ && defined __HAVE_SHARED__
- mov.l .LG, r12
+ mov.l .LG, r2
mova .LG, r0
- add r0, r12
+ add r0, r2
/* Make a tail call to __sigjmp_save; it takes the same args. */
mov.l .L1, r0
- mov.l @(r0,r12),r0
+ mov.l @(r0,r2),r0
jmp @r0
mov r1, r0
.align 2