From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?windows-1252?Q?Andreas_F=E4rber?= Date: Tue, 31 Mar 2015 00:06:29 +0200 Subject: [U-Boot] [PATCH 1/4] ARM: Add ARMv7-M support In-Reply-To: <20150305153236.GS25373@bill-the-cat> References: <1425210282-7887-1-git-send-email-rev13@wp.pl> <1425210282-7887-2-git-send-email-rev13@wp.pl> <20150305153236.GS25373@bill-the-cat> Message-ID: <5519C8E5.2030109@suse.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Am 05.03.2015 um 16:32 schrieb Tom Rini: > On Sun, Mar 01, 2015 at 12:44:39PM +0100, Kamil Lulko wrote: > >> Signed-off-by: Kamil Lulko > [snip] >> diff --git a/arch/arm/lib/crt0.S b/arch/arm/lib/crt0.S > [snip] >> @@ -66,15 +69,30 @@ ENTRY(_main) >> #else >> ldr sp, =(CONFIG_SYS_INIT_SP_ADDR) >> #endif >> +#if defined(CONFIG_CPU_V7M) /* v7M forbids using SP as BIC destination */ >> + mov r3, sp >> + bic r3, r3, #7 >> + mov sp, r3 >> +#else >> bic sp, sp, #7 /* 8-byte alignment for ABI compliance */ >> +#endif > > There's 4 places where this change comes in. Albert, what do you think > about always just doing this in 3 instructions with a comment in the > first instance about v7-M support? I remember running into problems like these when working on STM32F429 support late last year and I adopted some helper macros from Linux, I believe. The same problem existed in U-Boot's private libgcc code. Regards, Andreas -- SUSE Linux GmbH, Maxfeldstr. 5, 90409 N?rnberg, Germany GF: Felix Imend?rffer, Jane Smithard, Jennifer Guild, Dilip Upmanyu, Graham Norton; HRB 21284 (AG N?rnberg) -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: OpenPGP digital signature URL: