This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]