From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tetsuyuki Kobayashi Date: Fri, 06 Jul 2012 17:04:16 +0900 Subject: [U-Boot] [PATCH] arm: rmobile: Support build with gcc-4.6 or later In-Reply-To: <1341533207-17101-1-git-send-email-nobuhiro.iwamatsu.yj@renesas.com> References: <1341533207-17101-1-git-send-email-nobuhiro.iwamatsu.yj@renesas.com> Message-ID: <4FF69C00.2010207@kmckk.co.jp> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hello, Iwamatsu-san (2012/07/06 9:06), Nobuhiro Iwamatsu wrote: > Latest rmobile code was tested by using old gcc (gcc-4.4). > When we use gcc-4.6 (or later), the build is made, but does not work. > This solves a problem not to work by add -march=armv5 to compiple option > when we built in gcc-4.6 (or later). > I tested by linaro's compiler version 2012.04-20120426. Yes. I know recent gcc causes problem because of unaligned access. There are 2 different proposals, but neither accepted. [PATCH] arm: enable unaligned access on ARMv7 http://lists.denx.de/pipermail/u-boot/2012-June/125754.html [PATCH] arm: armv7: add compile option -mno-unaligned-access if available http://lists.denx.de/pipermail/u-boot/2012-July/127260.html This patch is the third one. > --- a/arch/arm/cpu/armv7/rmobile/lowlevel_init.S > +++ b/arch/arm/cpu/armv7/rmobile/lowlevel_init.S > @@ -49,8 +49,6 @@ wait_interrupt: > str r2, [r1] > > wait_loop: > - wfi > - > ldr r2, [r1, #0xC] > str r2, [r1, #0x10] I know "wfi" instruction causes compile error in -march=armv5. Without this, it works but not so good because 2nd CPU wastes cycles. I wonder, is there any cheat such as ".word 0x...." (putting instruction code directly) or something.