diff options
author | Bill Pringlemeir <bpringle@sympatico.ca> | 2012-10-02 13:29:52 -0400 |
---|---|---|
committer | maximilian attems <max@stro.at> | 2012-10-03 18:41:43 +0200 |
commit | f05ff116bb9edbbb81d82fa47b78e630ce878470 (patch) | |
tree | 4dc3cecc686c37922c3a90f80eca17d5d7a93bcf | |
parent | ac8f53aa182d6f423f1833e4bcc8d7d06adda03b (diff) | |
download | klibc-f05ff116bb9edbbb81d82fa47b78e630ce878470.tar.gz |
[klibc] [PATCH] fix ARM longjmp with zero 'val'.klibc-2.0.2
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@sympatico.ca>
Signed-off-by: maximilian attems <max@stro.at>
-rw-r--r-- | 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 92ffc434725b51..9f96274de6d9e7 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__ */ |