Enum cranelift_codegen::ir::condcodes::FloatCC
source · pub enum FloatCC {
Show 14 variants
Ordered,
Unordered,
Equal,
NotEqual,
OrderedNotEqual,
UnorderedOrEqual,
LessThan,
LessThanOrEqual,
GreaterThan,
GreaterThanOrEqual,
UnorderedOrLessThan,
UnorderedOrLessThanOrEqual,
UnorderedOrGreaterThan,
UnorderedOrGreaterThanOrEqual,
}
Expand description
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
Implementations§
Trait Implementations§
source§impl PartialEq<FloatCC> for FloatCC
impl PartialEq<FloatCC> for FloatCC
impl Copy for FloatCC
impl Eq for FloatCC
impl StructuralEq for FloatCC
impl StructuralPartialEq for FloatCC
Auto Trait Implementations§
impl RefUnwindSafe for FloatCC
impl Send for FloatCC
impl Sync for FloatCC
impl Unpin for FloatCC
impl UnwindSafe for FloatCC
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CallHasher for Twhere
T: Hash + ?Sized,
impl<T> CallHasher for Twhere T: Hash + ?Sized,
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.