Monday, 9 March 2015

Re: [gccsdk] Unaligned loads etc

Hi Theo
Classic example is firefox2. If alignment exceptions are enabled it aborts very early in startup with a ldr from an non word aligned address. Gcc arm seems to default to enabling non alignment for armv7, which is bad news for the imx6. Hence my thwarted attempts to rebuild ff2
Cheers
John

John Ballance
www.MacPCRepair.co.uk or
www.justaskjb.co.uk



-------- Original message --------
From: Theo Markettos
Date:09/03/2015 23:36 (GMT+00:00)
To: gcc@gccsdk.riscos.info
Subject: Re: [gccsdk] Unaligned loads etc

On Sun, Mar 08, 2015 at 01:59:08PM +0000, John Ballance wrote:
> Hi.
>
> I'd appreciate a bit of a pointer.
>
> I'm compiling all sorts of things from the autobuilder tree, but
> would like to make sure that unaligned loads and saves are not
> generated. Whilst current riscos machines can have the alignment
> exception turned off, it isn't good practice to rely on the results
> of a 'bypassed' alignment exception.
>
> It seems logical that there will be a simple flag to add to things,
> but what flag please, and where best to add it.. and on a module by
> module basis, or a whole compile basis?

I think this is one for John, but AFAIAA GCC's default options won't emit
unaligned loads and saves.  That wasn't always the case - before ARMv7 came
along some packages were built unaligned.  The output should be ARMv3 to
ARMv7 safe (ARMv2 is a bit trickier).

Do you have a counterexample of recently-compiled code?

Theo

(apologies for the riscos.info downtime this weekend - it got wedged, I
moved it to a new server, and then had some awkward transatlantic disc
juggling to get everything working which took much longer than expected.
Should all be up and reliable now)

_______________________________________________
GCCSDK mailing list gcc@gccsdk.riscos.info
Bugzilla: http://www.riscos.info/bugzilla/index.cgi
List Info: http://www.riscos.info/mailman/listinfo/gcc
Main Page: http://www.riscos.info/index.php/GCCSDK

No comments:

Post a Comment