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

impl Display for FloatCC
[src]

impl Debug for FloatCC
[src]

impl PartialEq<FloatCC> for FloatCC
[src]

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests for !=.

impl Eq for FloatCC
[src]

impl FromStr for FloatCC
[src]

type Err = ()

The associated error which can be returned from parsing.

impl Hash for FloatCC
[src]

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl Clone for FloatCC
[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl Send for FloatCC

impl Sync for FloatCC

Blanket Implementations

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> From for T
[src]

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

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

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

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

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

type Owned = T

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