Trait cranelift_codegen::ir::condcodes::CondCode

source ·
pub trait CondCode: Copy {
    // Required methods
    fn complement(self) -> Self;
    fn swap_args(self) -> Self;
}
Expand description

Common traits of condition codes.

Required Methods§

source

fn complement(self) -> Self

Get the complemented condition code of self.

The complemented condition code produces the opposite result for all comparisons. That is, cmp CC, x, y is true if and only if cmp CC.complement(), x, y is false.

source

fn swap_args(self) -> Self

Get the swapped args condition code for self.

The swapped args condition code produces the same result as swapping x and y in the comparison. That is, cmp CC, x, y is the same as cmp CC.swap_args(), y, x.

Object Safety§

This trait is not object safe.

Implementors§