From patchwork Tue Jul 5 18:37:17 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Graf X-Patchwork-Id: 644968 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 3rkXgD0dRwz9sXR for ; Wed, 6 Jul 2016 04:37:27 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 034194BF90; Tue, 5 Jul 2016 20:37:21 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id hAfRN3QK0yNE; Tue, 5 Jul 2016 20:37:21 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 11CF84BB3B; Tue, 5 Jul 2016 20:37:21 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 556A44BB3B for ; Tue, 5 Jul 2016 20:37:18 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id l6W8i4qVPsa8 for ; Tue, 5 Jul 2016 20:37:18 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by theia.denx.de (Postfix) with ESMTPS id 331D44BAEA for ; Tue, 5 Jul 2016 20:37:14 +0200 (CEST) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 97DF9AABC for ; Tue, 5 Jul 2016 18:37:14 +0000 (UTC) From: Alexander Graf To: U-Boot Mailing List Date: Tue, 5 Jul 2016 20:37:17 +0200 Message-Id: <1467743837-185762-1-git-send-email-agraf@suse.de> X-Mailer: git-send-email 1.8.5.6 Subject: [U-Boot] [PATCH] arm: Fix setjmp (again) X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" 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 Tested-by: Tom Rini --- arch/arm/include/asm/setjmp.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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)