Only hard regs with pseudos considered for save/restore across calls?

Michael Meissner gcc-mail@the-meissners.org
Thu Jun 5 23:12:00 GMT 2003


On Thu, Jun 05, 2003 at 12:46:26PM -0700, Fred Fish wrote:
> In our port we have some hard registers that are essentially allocated when
> the initial RTL is generated and thus never have pseudo registers associated
> with them.  As an example, consider:
> 
>         mat0 = __ADD_M_M (mat0, mat1);
>         __CMPGT_M_M (cc0, mat0, mat1);
>         mat1 = foo (mat0, mat1);
>         mat0 = __SELECTH_M_M (cc0, mat0, mat1);

This is where you want to do something like the x86 port.  You have register
classes that match just that register, and use the normal constraints, etc. to
insure that register is allocated.  However, the problem with cc0 and friends,
is whether you can save/restore cc0 across a call.  The FRV machine for
instance was hard to restore the condition code registers.  I eventually added
code to set a register to -1/0/1 depending on the condition code register, and
then to reload it, I compared that generated value to 0.

-- 
Michael Meissner
email: gnu@the-meissners.org
http://www.the-meissners.org



More information about the Gcc mailing list