This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: discouraging register use
- From: Richard Henderson <rth at redhat dot com>
- To: DJ Delorie <dj at redhat dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Thu, 30 Dec 2004 22:21:16 -0800
- Subject: Re: discouraging register use
- References: <200412302354.iBUNsiBH002125@greed.delorie.com>
On Thu, Dec 30, 2004 at 06:54:44PM -0500, DJ Delorie wrote:
> Do I have to do something like this? If so, I'm going to have some
> *really* long lines in my md file (for this chip). Or is there some
> other way of changing gcc's register preferences, without precluding
> the registers completely?
>
> [(set (match_operand:SI 0 "" "c,c,?m,?m")
> (plus:SI (match_operand:SI 1 "" "0,0,0,0")
> (match_operand:SI 1 "" "c,?m,c,?m")))]
Yes, that looks plausible. The other way isn't going to work because
you penalize c at the same time as m by using "?cm".
Does it actually work?
r~