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 23:54:54
On Sun, Mar 16, 2003 at 01:41:29PM -0500, Nathan J. Williams wrote:
> Jason Thorpe <thorpej@wasabisystems.com> writes:
> 
> > On Sunday, March 16, 2003, at 02:37  AM, Juergen Hannken-Illjes wrote:
> > 
> > > 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.
> > 
> > Yah, I agree that -mstrict-align should be the default if not specific
> > CPU flag is specified.  But if a CPU that can handle unaligned access
> > is specified, I think we ought to allow unaligned access in that case.
> 
> Why? The performance of unaligned fetches always sucks, even when they
> don't trap. I think we should be going the other way: actively
> preventing, if not forbidding, unaligned data structures even on CPUs
> that don't require alignment, to improve performance.

Just to make it clear: There are only few cases where we can get unaligned
access. All I have seen so far are optimized "memcpy(dst,src,N)" where N is
constant and the alignment of src and dst is unknown.

-- 
Juergen Hannken-Illjes - hannken@eis.cs.tu-bs.de - TU Braunschweig (Germany)