Subject: Re: Another ELF issue
To: David Laight <>
From: Richard Earnshaw <>
List: port-arm
Date: 02/14/2002 18:55:39
> I presume ldrd is ARM v5?  Don't remember it the in ARM v4 book,
> since the default netbsd compile is ARM v3 - this is somewhat moot!

ldrd/strd are new in v5TE.

Just because the default build won't make use of this doesn't mean that 
the ABI shouldn't allow for it.  We want to allow applications that are 
compiled for a restricted set of CPU targets to get most advantage out of 
the system  (... if I know my application will only ever run on an XScale, 
why shouldn't I take advantage of that fact?)

> Mind you I would have expected the ABI to specify that double be
> aligned on 8 byte boundary, and 'complex double' and 'long double'
> on 16 byte (I've forgotten the exact names for these types).
> Not doing so is asking for trouble down the line....
> (I've rarely written any FP in the last 25 years - except an ARM FP
> library! does that count?)

Doing so would break the procedure calling convention in a major way.  
Since doubles would be aligned in memory, the va-args issue would 
effectively force doubles into even-numbered pairs of integer regs.  That 
has nasty consequences which aren't really worth the gain.

> Maybe gcc should issue a warning whenever it misaligns items within
> a structure?  Can it remember which items ought to be aligined?

I don't think that would be sensible either.