Re: Arguments in registers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ravishankar S <ravishankar.s@xxxxxxxxxxx> 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 of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux