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 for FloatCC
impl PartialEq for FloatCC
impl Copy for FloatCC
impl Eq for FloatCC
impl StructuralPartialEq for FloatCC
Auto Trait Implementations§
impl Freeze for FloatCC
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> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.