Subject: Re: Strange C compiler code generation
To: Reinoud Zandijk <imago@kabel065011.kabel.utwente.nl>
From: Richard Earnshaw <rearnsha@buzzard.freeserve.co.uk>
List: port-arm32
Date: 02/25/2001 00:37:37
> 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 !

It would be marginally faster (particularly on uncached memory areas), but 
I don't think gcc will let me get at the expansion early enough to do this 
(we really need the compiler to implement a mov_packed<mode> expander).

> 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 ?

Nope, it's the structure size boundary rule; it may be a bug in gcc, that 
linux isn't generating the same code as netbsd for this case.  I'll ask on 
the gcc lists next week.

> Better try it with the new compiler Ben has been working on i guess...

This would change if we moved to padding structures up to a word; and it 
is what we were originally intending to do when moving to ELF. But that 
would make use less compatible with ARM's toolkit (and it also makes 
porting some applications a pain in the butt, since most other machines -- 
particularly x86 --  don't do this).

R.