Subject: Re: ARM ELF toolchain patches
To: Charles M. Hannum <root@ihack.net>
From: Richard Earnshaw <rearnsha@buzzard.freeserve.co.uk>
List: port-arm32
Date: 02/22/2001 00:17:17
> 
> I'm more concerned with things like the calling convention, PIC register
> usage, alignment, etc.
> 
> 

I covered most alignment issues in my previous message, with the exception 
that I didn't cover structure member alignments -- I'll look into that 
one, but be warned, the ARM compilers seem to keep changing from what I've 
seen -- ABI compatibility between major toolkit releases doesn't seem to 
be a major issue in the embedded world ;-(

the ATPCS PIC model is quite significantly different from our own, and I'm 
not sure we want to use it.  It does have the advantage that it extends to 
running code out of ROM, but that isn't a major issue for us.  The major 
cost of ATPCS pic model is that it locks down a register at all times if 
shared libraries might be available, since the PIC base register must 
always point to a PIC table, even in non-pic code (so that we can look up 
a new pic table when we move to a new shared lib).

On calling convention, then I think there are small changes that need to 
be made to structure returning; again, I'll check how we compare.  As for 
function argument passing, I think we are OK.  I think we should always 
use a "soft-float" calling convention, even if we enable VFP opcodes.  
This has the advantage of making the code work the same on all platforms 
even if they don't have VFP hardware.  There is possibly a small 
performance loss on VFP enabled machines by doing this (mainly because we 
can pass fewer arguments in registers), but the costs of moving integer 
registers to VFP registers and vice versa are significantly lower on VFP 
than they were on the FPA (where you had to store to memory and then 
reload).

R.