Enum cranelift_codegen::ir::condcodes::FloatCC [−][src]
pub enum FloatCC { Ordered, Unordered, Equal, NotEqual, OrderedNotEqual, UnorderedOrEqual, LessThan, LessThanOrEqual, GreaterThan, GreaterThanOrEqual, UnorderedOrLessThan, UnorderedOrLessThanOrEqual, UnorderedOrGreaterThan, UnorderedOrGreaterThanOrEqual, }
Condition code for comparing floating point numbers.
This condition code is used by the fcmp
instruction to compare floating point values. Two
IEEE floating point values relate in exactly one of four ways:
UN
- unordered when either value is NaN.EQ
- equal numerical value.LT
-x
is less thany
.GT
-x
is greater thany
.
Note that 0.0
and -0.0
relate as EQ
because they both represent the number 0.
The condition codes described here are used to produce a single boolean value from the
comparison. The 14 condition codes here cover every possible combination of the relation above
except the impossible !UN & !EQ & !LT & !GT
and the always true UN | EQ | LT | GT
.
Variants
Ordered
EQ | LT | GT
Unordered
UN
Equal
EQ
NotEqual
The C '!=' operator is the inverse of '==': NotEqual
.
UN | LT | GT
OrderedNotEqual
LT | GT
UnorderedOrEqual
UN | EQ
LessThan
LT
LessThanOrEqual
LT | EQ
GreaterThan
GT
GreaterThanOrEqual
GT | EQ
UnorderedOrLessThan
UN | LT
UnorderedOrLessThanOrEqual
UN | LT | EQ
UnorderedOrGreaterThan
UN | GT
UnorderedOrGreaterThanOrEqual
UN | GT | EQ
Trait Implementations
impl Clone for FloatCC
[src]
impl Clone for FloatCC
fn clone(&self) -> FloatCC
[src]
fn clone(&self) -> FloatCC
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Copy for FloatCC
[src]
impl Copy for FloatCC
impl PartialEq for FloatCC
[src]
impl PartialEq for FloatCC
fn eq(&self, other: &FloatCC) -> bool
[src]
fn eq(&self, other: &FloatCC) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
fn ne(&self, other: &Rhs) -> bool
This method tests for !=
.
impl Eq for FloatCC
[src]
impl Eq for FloatCC
impl Debug for FloatCC
[src]
impl Debug for FloatCC
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Hash for FloatCC
[src]
impl Hash for FloatCC
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl CondCode for FloatCC
[src]
impl CondCode for FloatCC
fn inverse(self) -> Self
[src]
fn inverse(self) -> Self
Get the inverse condition code of self
. Read more
fn reverse(self) -> Self
[src]
fn reverse(self) -> Self
Get the reversed condition code for self
. Read more
impl Display for FloatCC
[src]
impl Display for FloatCC
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl FromStr for FloatCC
[src]
impl FromStr for FloatCC