Subject: Re: -mstrict-align on powerpc
To: None <tech-toolchain@netbsd.org>
From: Juergen Hannken-Illjes <hannken@eis.cs.tu-bs.de>
List: tech-toolchain
Date: 03/16/2003 13:05:00
On Sun, Mar 16, 2003 at 10:35:24PM +1100, matthew green wrote:
>
> On Sat, Mar 15, 2003 at 09:25:08PM -0800, Jason Thorpe wrote:
> >
> > On Saturday, March 15, 2003, at 08:09 AM, Juergen Hannken-Illjes wrote:
> >
> > >
> > >Module Name: src
> > >Committed By: hannken
> > >Date: Sat Mar 15 16:09:35 UTC 2003
> > >
> > >Modified Files:
> > > src/gnu/dist/toolchain/gcc/config/rs6000: netbsd.h
> > >
> > >Log Message:
> > >Add -mstrict-align to the CC1 default options.
> > >At least the 403 ports cannot handle unaligned access.
> > >
> > >Discussed with Jason Thorpe and Matt Thomas.
> > >
> >
> > Hm. Maybe what we should do is default to -mstrict-align, but disable
> > -mstrict-align for -mcpu=foo where foo doesn't require strict alignment
> > (e.g. 603, 604, 750, etc.). All of those CPUs can do unaligned access
> > on integer loads/stores, right? Is it only the 403 that actually has
> > the problem? (I honestly can't remember if the 405 can do unaligned
> > access or not...)
>
> From the sources (I have no walnut board) the 405 also traps.
>
> At least 1.6 has a shared/powerpc with X, games and text.
> Therefore the powerpc should use a feature set useable on all cpus.
>
> that's OK; if someone uses -m603 they are doing that themselves
> and it doesn't matter ... i think jason's idea is still useful.
I understand. What about
#define CC1_SPEC "-mno-multiple %{!mcpu*: -mstrict-align}"
to set this flag only when there is no -mXXX?
--
Juergen Hannken-Illjes - hannken@eis.cs.tu-bs.de - TU Braunschweig (Germany)