Clean up the arm64 setjmp.
Note that this doesn't address the fact that we don't save/restore the
real-time signals. But it does let us pass the tests we currently fail.
Bug: 16918359
Change-Id: I063a6926164289a71026a412da7f5dd2ca9a74b3
diff --git a/libc/arch-arm/bionic/setjmp.S b/libc/arch-arm/bionic/setjmp.S
index 435ef86..7bf2aed 100644
--- a/libc/arch-arm/bionic/setjmp.S
+++ b/libc/arch-arm/bionic/setjmp.S
@@ -91,7 +91,7 @@
ldr r2, .Lsetjmp_magic
ldr r3, [r0, #(_JB_MAGIC * 4)]
teq r2, r3
- bne botch
+ blne longjmperror
/* Fetch signal mask */
ldr r2, [r0, #(_JB_SIGMASK * 4)]
@@ -127,19 +127,12 @@
/* Validate sp and r14 */
teq sp, #0
teqne r14, #0
- beq botch
+ bleq longjmperror
/* Set return value */
-
mov r0, r1
teq r0, #0x00000000
moveq r0, #0x00000001
bx lr
mov r15, r14
-
- /* validation failed, die die die. */
-botch:
- bl longjmperror
- bl abort
- b . - 8 /* Cannot get here */
END(longjmp)