From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lucas Stach Date: Mon, 02 Jul 2012 17:16:08 +0200 Subject: [U-Boot] [PATCH] arm: armv7: add compile option -mno-unaligned-access if available In-Reply-To: References: <1338918451-10126-1-git-send-email-dev@lynxeye.de> <4FCE52FB.3020501@wwwdotorg.org> <1338923180.1377.2.camel@tellur> <20120622111501.21e1fdcc@aari01-12> <4FEA21F5.4080803@gmail.com> <4FEADD13.2040708@kmckk.co.jp> <4FF16CF2.9090808@kmckk.co.jp> Message-ID: <1341242168.1392.2.camel@tellur> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Am Montag, den 02.07.2012, 10:53 +0100 schrieb M?ns Rullg?rd: > Tetsuyuki Kobayashi writes: > > > Recent compiler generates unaligned memory access in armv7 default. > > But current U-Boot does not allow unaligned memory access, so it causes > > data abort exception. > > This patch add compile option "-mno-unaligned-access" if it is available. > > Why not allow unaligned accesses instead? > IMHO, our recent discussion showed that both ways are wrong. "-mno-unaligned-access" works around misaligned data on the software level, while allowing unaligned access does on the hardware level. What we really want is no unaligned access in U-Boot at all. Just because "-mno-unaligned-access" is the default on ARMv5, we should not consider it a gold standard. Thanks, Lucas