Subject: Re: Shared arm26/arm32 user code
To: Ben Harris <bjh21@netbsd.org>
From: Richard Earnshaw <rearnsha@arm.com>
List: port-arm26
Date: 11/25/2000 16:33:33
> > Another thing we need to consider when switching to ELF on arm32 is the 
> > basic alignment we return.  Newer processors with architecture v5 (eg 
> > XScale) have instructions that only work on double-word aligned memory.  
> 
> That'll be fun.  Presumably this won't directly affect code built for
> older CPUs.

Actually it does.  At least, if you ever want to be able to call between 
libraries built for the appropriate architectures.  Consider a portable 
application (apcs-26+32) wanting to use a host-specific C library built to 
the new alignments (built for v5).  If the stack isn't maintained doubly 
aligned at all times, then it wouldn't be possible to use the new 
instructions on any data that might get placed in the stack, even if we 
are in the library.  All memory malloced (or parcelled up by other code) 
must also satisfy the new alignment constraints or you will end up with 
bus errors.

Richard.