Hi,

On Thu, 18 Mar 2010, Frank Isamov wrote:

> From the h file:
> 
> #define REG_CLASS_CONTENTS                                              \
>  {
>             \
>    {0x00000000, 0x00000000, 0x00000000}, /* NO_REGS*/          \
>    {0xFFFFFFFF, 0x0000FFFF, 0x00000000}, /* D_REGS*/          \
>    {0x00000000, 0xFFFF0000, 0x0000FFFF}, /* R_REGS*/           \
> 
> ABI requires use of R registers for arguments and return value. Other
> than that all of these instructions are more or less symmetrical in
> sense of using D or R.

If that is so, you're better off not using two different register classes 
at all.  Register classes are there to describe assymetry in the ISA 
register file.  For describing ABI constraints like argument or 
caller-save registers look at FUNCTION_ARG, FUNCTION_ARG_REGNO_P, 
FUNCTION_VALUE_REGNO_P and CALL_USED_REGISTERS (and some friends).

The compiler will e.g. try to make sure to first use call-clobbered 
registers in leaf functions, so that they don't need to be saved/restored 
in the prologue/epilogue.  You don't need register classes to describe 
this.


Ciao,
Michael.

Reply via email to