[klibc] [klibc:master] [PATCH] fix ARM longjmp with zero 'val'.
klibc-bot for Bill Pringlemeir
bpringle at sympatico.ca
Wed Oct 3 09:54:05 PDT 2012
Commit-ID: f05ff116bb9edbbb81d82fa47b78e630ce878470
Gitweb: http://git.kernel.org/?p=libs/klibc/klibc.git;a=commit;h=f05ff116bb9edbbb81d82fa47b78e630ce878470
Author: Bill Pringlemeir <bpringle at sympatico.ca>
AuthorDate: Tue, 2 Oct 2012 13:29:52 -0400
Committer: maximilian attems <max at stro.at>
CommitDate: Wed, 3 Oct 2012 18:41:43 +0200
[klibc] [PATCH] fix ARM longjmp with zero 'val'.
We need to set the condition codes on the ARM. The previous version was
using a left over condition code from the caller. Also, use conditional
execution to eliminate branch and reduce size.
Signed-off-by: Bill Pringlemeir <bpringle at sympatico.ca>
Signed-off-by: maximilian attems <max at stro.at>
---
usr/klibc/arch/arm/setjmp.S | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/usr/klibc/arch/arm/setjmp.S b/usr/klibc/arch/arm/setjmp.S
index 92ffc43..9f96274 100644
--- a/usr/klibc/arch/arm/setjmp.S
+++ b/usr/klibc/arch/arm/setjmp.S
@@ -40,10 +40,9 @@ setjmp:
.type longjmp, #function
longjmp:
ldmia r0, {r4, r5, r6, r7, r8, r9, r10, fp, sp, lr}
- mov r0, r1
- bne 1f
- mov r0, #1
-1: BX(lr)
+ movs r0, r1
+ moveq r0, #1
+ BX(lr)
.size longjmp,.-longjmp
#else /* __thumb__ */
More information about the klibc
mailing list