[][src]Enum cranelift_codegen::ir::condcodes::FloatCC

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:

  1. UN - unordered when either value is NaN.
  2. EQ - equal numerical value.
  3. LT - x is less than y.
  4. GT - x is greater than y.

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 CondCode for FloatCC[src]

impl PartialEq<FloatCC> for FloatCC[src]

impl Eq for FloatCC[src]

impl Hash for FloatCC[src]

impl Display for FloatCC[src]

impl Debug for FloatCC[src]

impl FromStr for FloatCC[src]

type Err = ()

The associated error which can be returned from parsing.

impl Copy for FloatCC[src]

impl Clone for FloatCC[src]

Auto Trait Implementations

impl Unpin for FloatCC

impl Send for FloatCC

impl Sync for FloatCC

impl UnwindSafe for FloatCC

impl RefUnwindSafe for FloatCC

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.