[PATCH] ARM: decompressor: clear SCTLR.A bit for v7 cores
js at sig21.net
Mon Nov 5 08:43:26 EST 2012
On Mon, Nov 05, 2012 at 01:02:55PM +0000, Dave Martin wrote:
> On Mon, Nov 05, 2012 at 11:13:46AM +0000, Russell King - ARM Linux wrote:
> > On Mon, Nov 05, 2012 at 10:48:50AM +0000, Dave Martin wrote:
> > > For v7, we should definitely use -munaligned-access where available
> > > (unless it's the default?)
> > No such option on my compiler - according to the manual I have, the only
> > option there is starting -munaligned is on SPARC for -munaligned-doubles.
> OK, I guess that's something backported into the Linaro toolchain I'm
> currently using then. But it seems a good idea to use this if available,
> because it allows the compiler to generate better code in some situations,
> especially for packed struct access.
> > However, I believe GCC does believe that unaligned accesses are fine on
> > V6 and above.
> Possibly, but I've never seen it use them deliberately, prior to the
> -munaligned-access support.
http://gcc.gnu.org/gcc-4.7/changes.html says -munaligned-access is
enabled by default.
I haven't had a chance to try gcc-4.7 yet, but gcc-4.6+linaro
has the option but fails to generate the expected code for ARMv6
while it works for ARMv7. However it does
#define __ARM_FEATURE_UNALIGNED 1
.eabi_attribute 34, 1
This seems to be the commit which introduced unaligned support in gcc:
I cannot figure out why this works for v7 but not for v6.
(I used gcc-4.6.4 20121001 (prerelease) toolchain built with crosstool-NG.)
More information about the linux-arm-kernel