Subject: Re: Strange C compiler code generation
To: Richard Earnshaw <rearnsha@buzzard.freeserve.co.uk>
From: Reinoud Zandijk <imago@kabel065011.kabel.utwente.nl>
List: port-arm32
Date: 02/25/2001 01:26:59
Hi Richard and Peter,
On Sun, 25 Feb 2001, Richard Earnshaw wrote:
> #prgama pack(1) means that this structure can appear at *any* address
> (that's part of the definition of a packed structure). That includes odd
> addresses, so the code must be compiled as a set of byte loads and the
> final word built up from the bits. I'm not sure why linux is doing
> differently, but it may well be a bug if it is.
ARM AFAIK suggest loading two words in two registers and then shift them
correctly; this is much faster on high I/B cycle machines i guess !
> Possibly, but it won't change anything, since the code generated is
> correct for the supplied input.
Thats right... maybe there is a small addition in the Lunix variant that
checks at compile time if the structure should be aligned and then changes
it ?
Better try it with the new compiler Ben has been working on i guess...
Cheers,
Reinoud