diff options
author | Richard Kenner <kenner@vlsi1.ultra.nyu.edu> | 2001-03-21 01:14:20 +0000 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 2001-03-20 20:14:20 -0500 |
commit | e26b89960c4af88cf3c1545827209a5bb5bca232 (patch) | |
tree | 52ec6ae0a8243a0880bc08da85897abc323a593f | |
parent | ddd705d182e7ec6e1d5f39a9abb8c572eba5d0bf (diff) | |
download | gcc-e26b89960c4af88cf3c1545827209a5bb5bca232.zip gcc-e26b89960c4af88cf3c1545827209a5bb5bca232.tar.gz gcc-e26b89960c4af88cf3c1545827209a5bb5bca232.tar.bz2 |
rtl.texi (COMPARE): Clarify documentation and reference section on comparisons.
* rtl.texi (COMPARE): Clarify documentation and reference section
on comparisons.
From-SVN: r40681
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/rtl.texi | 24 |
2 files changed, 20 insertions, 9 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 18ff1bb..3bfd0a6 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +Tue Mar 20 20:15:06 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> + + * rtl.texi (COMPARE): Clarify documentation and reference section + on comparisons. + 2001-03-20 Stan Shebs <shebs@apple.com> * objc/objc-act.c (get_static_reference): Use NULL_TREE. diff --git a/gcc/rtl.texi b/gcc/rtl.texi index f75ffcf..cfae3a9 100644 --- a/gcc/rtl.texi +++ b/gcc/rtl.texi @@ -1412,15 +1412,21 @@ of comparison. The result is computed without overflow, as if with infinite precision. Of course, machines can't really subtract with infinite precision. -However, they can pretend to do so when only the sign of the -result will be used, which is the case when the result is stored -in the condition code. And that is the only way this kind of expression -may validly be used: as a value to be stored in the condition codes. - -The mode @var{m} is not related to the modes of @var{x} and @var{y}, -but instead is the mode of the condition code value. If @code{(cc0)} -is used, it is @code{VOIDmode}. Otherwise it is some mode in class -@code{MODE_CC}, often @code{CCmode}. @xref{Condition Code}. +However, they can pretend to do so when only the sign of the result will +be used, which is the case when the result is stored in the condition +code. And that is the @emph{only} way this kind of expression may +validly be used: as a value to be stored in the condition codes, either +@code{(cc0)} or a register. @xref{Comparisons}. + +The mode @var{m} is not related to the modes of @var{x} and @var{y}, but +instead is the mode of the condition code value. If @code{(cc0)} is +used, it is @code{VOIDmode}. Otherwise it is some mode in class +@code{MODE_CC}, often @code{CCmode}. @xref{Condition Code}. If @var{m} +is @code{VOIDmode} or @code{CCmode}, the operation returns sufficient +information (in an unspecified format) so that any comparison operator +can be applied to the result of the @code{COMPARE} operation. For other +modes in class @code{MODE_CC}, the operation only returns a subset of +this information. Normally, @var{x} and @var{y} must have the same mode. Otherwise, @code{compare} is valid only if the mode of @var{x} is in class |