From 72cf601ed08e791cf532fdf41b946161d302f629 Mon Sep 17 00:00:00 2001 From: David McCullough Date: Thu, 1 May 2003 05:28:43 +0000 Subject: 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 :-) --- libc/sysdeps/linux/sh/setjmp.S | 6 +++--- 1 file 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 -- cgit v1.2.3