[U-Boot] [PATCH] arm: armv7: add compile option -mno-unaligned-access if available
Lucas Stach
dev at lynxeye.de
Mon Jul 2 17:16:08 CEST 2012
Am Montag, den 02.07.2012, 10:53 +0100 schrieb Måns Rullgård:
> Tetsuyuki Kobayashi <koba at kmckk.co.jp> 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
More information about the U-Boot
mailing list