diff options
author | Alexander Graf <agraf@suse.de> | 2016-07-05 18:37:17 (GMT) |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2016-07-08 21:16:38 (GMT) |
commit | 0de02de76833cf3adcc0ba2e43cff52e6e18b63f (patch) | |
tree | bbb0ca1a2eeaf54e6323ec17de4b69acd2e29c51 /arch/arm/include | |
parent | 59d07ee08e858bf2c121d0cdc6c8ddd3b26ee5b1 (diff) | |
download | u-boot-fsl-qoriq-0de02de76833cf3adcc0ba2e43cff52e6e18b63f.tar.xz |
arm: Fix setjmp (again)
Commit e677724 (arm: Fix setjmp) added code to fix compilation of the setjmp
code path with thumv1. Unfortunately it missed a constraint that the adr
instruction can only refer to 4 byte aligned offsets.
So this patch adds the required alignment hooks to make compilation
work again even when setjmp doesn't happen to be 4 byte aligned.
Signed-off-by: Alexander Graf <agraf@suse.de>
Tested-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'arch/arm/include')
-rw-r--r-- | arch/arm/include/asm/setjmp.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/arm/include/asm/setjmp.h b/arch/arm/include/asm/setjmp.h index ae738b2..f7b97ef 100644 --- a/arch/arm/include/asm/setjmp.h +++ b/arch/arm/include/asm/setjmp.h @@ -43,6 +43,7 @@ static inline int setjmp(jmp_buf jmp) #else asm volatile( #ifdef CONFIG_SYS_THUMB_BUILD + ".align 2\n" "adr r0, jmp_target\n" "add r0, r0, $1\n" #else @@ -52,7 +53,8 @@ static inline int setjmp(jmp_buf jmp) "mov r2, sp\n" "stm r1!, {r0, r2, r4, r5, r6, r7}\n" "b 2f\n" - "jmp_target: " + ".align 2\n" + "jmp_target: \n" "mov %0, #1\n" "2:\n" : "+l" (r) |