Bläddra i källkod

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 :-)

David McCullough 21 år sedan
förälder
incheckning
72cf601ed0
1 ändrade filer med 3 tillägg och 3 borttagningar
  1. 3 3
      libc/sysdeps/linux/sh/setjmp.S

+ 3 - 3
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