This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Arguments in registers


Ravishankar S <ravishankar.s@hathway.com> writes:

> But TriCore's EABI specifies separate registers for passing arguments
> and returning values. D2-D3 for returning values and D4-D7 for passing
> arguments. 
> 
> My question is : Will it make a difference from a compiler writer's
> point for this type of calling convention. From experience, will it make
> for a differnce in performance.

It won't make much difference.  There are other architectures with
similar characteristics.  For example, on MIPS arguments are passed in
$4 through $7 or $11 (depending on the ABI), but values are returned
in $2 and $3.

> On the surface, it seems like it does, as there most of functions do not
> return values and most anyway don't return 64 bit values. So reusing the
> registers as PowerPC does may be better. 

The return registers are essentially just caller-saved scratch
registers.

I suppose if you are short on registers you might prefer to have more
callee-saved registers.  But if you have enough registers, it doesn't
matter much either way.

Ian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]