This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: cco question ??
- From: Hans-Peter Nilsson <hp at bitrange dot com>
- To: thomas joseph <thomascanny at yahoo dot co dot nz>
- Cc: <gcc at gcc dot gnu dot org>
- Date: Thu, 30 May 2002 21:54:07 -0400 (EDT)
- Subject: Re: cco question ??
On Wed, 15 May 2002, thomas joseph wrote:
> Hi All,
> Could some body tell me the basic difference between
> cc0 and (reg:mode> for compare instructions. Why are
> we having both of them ?
(Did someone answer this? Well, anyway:)
For ports where condition codes (a compare result) is expressed
as assigned to cc0, it is assumed that there only one
condition-result register, and that most instructions change it
in more or less useful ways. Then you don't have to express the
change for each of those instructions in the port's instruction
patterns. For ports using reg:CC (and other CCmode), only a
minor subset of the instructions change the one-or-more
condition-code registers. Then a change in condition codes need
to be expressed explicitly in the patterns.
You may notice an overlap in this expressiveness; the choice may
depend on other factors. For example, the ix86 port was changed
from cc0 to reg:CC in order to improve schedulability of
instructions.
brgds, H-P