ckb_vm::instructions

Trait Register

Source
pub trait Register:
    Sized
    + Clone
    + Default
    + Display
    + Not<Output = Self>
    + BitAnd<Output = Self>
    + BitOr<Output = Self>
    + BitXor<Output = Self>
    + Shl<Self, Output = Self>
    + Shr<Self, Output = Self> {
    const BITS: u8;
    const SHIFT_MASK: u8;
Show 52 methods // Required methods fn zero() -> Self; fn one() -> Self; fn min_value() -> Self; fn max_value() -> Self; fn eq(&self, other: &Self) -> Self; fn lt(&self, other: &Self) -> Self; fn lt_s(&self, other: &Self) -> Self; fn logical_not(&self) -> Self; fn cond(&self, true_value: &Self, false_value: &Self) -> Self; fn overflowing_add(&self, rhs: &Self) -> Self; fn overflowing_sub(&self, rhs: &Self) -> Self; fn overflowing_mul(&self, rhs: &Self) -> Self; fn overflowing_div(&self, rhs: &Self) -> Self; fn overflowing_rem(&self, rhs: &Self) -> Self; fn overflowing_div_signed(&self, rhs: &Self) -> Self; fn overflowing_rem_signed(&self, rhs: &Self) -> Self; fn overflowing_mul_high_signed(&self, rhs: &Self) -> Self; fn overflowing_mul_high_unsigned(&self, rhs: &Self) -> Self; fn overflowing_mul_high_signed_unsigned(&self, rhs: &Self) -> Self; fn clz(&self) -> Self; fn ctz(&self) -> Self; fn cpop(&self) -> Self; fn clmul(&self, rhs: &Self) -> Self; fn clmulh(&self, rhs: &Self) -> Self; fn clmulr(&self, rhs: &Self) -> Self; fn orcb(&self) -> Self; fn rev8(&self) -> Self; fn signed_shl(&self, rhs: &Self) -> Self; fn signed_shr(&self, rhs: &Self) -> Self; fn rol(&self, rhs: &Self) -> Self; fn ror(&self, rhs: &Self) -> Self; fn zero_extend(&self, start_bit: &Self) -> Self; fn sign_extend(&self, start_bit: &Self) -> Self; fn to_i8(&self) -> i8; fn to_i16(&self) -> i16; fn to_i32(&self) -> i32; fn to_i64(&self) -> i64; fn to_u8(&self) -> u8; fn to_u16(&self) -> u16; fn to_u32(&self) -> u32; fn to_u64(&self) -> u64; fn from_i8(v: i8) -> Self; fn from_i16(v: i16) -> Self; fn from_i32(v: i32) -> Self; fn from_i64(v: i64) -> Self; fn from_u8(v: u8) -> Self; fn from_u16(v: u16) -> Self; fn from_u32(v: u32) -> Self; fn from_u64(v: u64) -> Self; // Provided methods fn ne(&self, rhs: &Self) -> Self { ... } fn ge(&self, other: &Self) -> Self { ... } fn ge_s(&self, other: &Self) -> Self { ... }
}

Required Associated Constants§

Required Methods§

Source

fn zero() -> Self

Source

fn one() -> Self

Source

fn min_value() -> Self

Source

fn max_value() -> Self

Source

fn eq(&self, other: &Self) -> Self

Source

fn lt(&self, other: &Self) -> Self

Source

fn lt_s(&self, other: &Self) -> Self

Source

fn logical_not(&self) -> Self

Source

fn cond(&self, true_value: &Self, false_value: &Self) -> Self

Source

fn overflowing_add(&self, rhs: &Self) -> Self

Source

fn overflowing_sub(&self, rhs: &Self) -> Self

Source

fn overflowing_mul(&self, rhs: &Self) -> Self

Source

fn overflowing_div(&self, rhs: &Self) -> Self

Source

fn overflowing_rem(&self, rhs: &Self) -> Self

Source

fn overflowing_div_signed(&self, rhs: &Self) -> Self

Source

fn overflowing_rem_signed(&self, rhs: &Self) -> Self

Source

fn overflowing_mul_high_signed(&self, rhs: &Self) -> Self

Source

fn overflowing_mul_high_unsigned(&self, rhs: &Self) -> Self

Source

fn overflowing_mul_high_signed_unsigned(&self, rhs: &Self) -> Self

Source

fn clz(&self) -> Self

Source

fn ctz(&self) -> Self

Source

fn cpop(&self) -> Self

Source

fn clmul(&self, rhs: &Self) -> Self

Source

fn clmulh(&self, rhs: &Self) -> Self

Source

fn clmulr(&self, rhs: &Self) -> Self

Source

fn orcb(&self) -> Self

Source

fn rev8(&self) -> Self

Source

fn signed_shl(&self, rhs: &Self) -> Self

Source

fn signed_shr(&self, rhs: &Self) -> Self

Source

fn rol(&self, rhs: &Self) -> Self

Source

fn ror(&self, rhs: &Self) -> Self

Source

fn zero_extend(&self, start_bit: &Self) -> Self

Source

fn sign_extend(&self, start_bit: &Self) -> Self

Source

fn to_i8(&self) -> i8

Source

fn to_i16(&self) -> i16

Source

fn to_i32(&self) -> i32

Source

fn to_i64(&self) -> i64

Source

fn to_u8(&self) -> u8

Source

fn to_u16(&self) -> u16

Source

fn to_u32(&self) -> u32

Source

fn to_u64(&self) -> u64

Source

fn from_i8(v: i8) -> Self

Source

fn from_i16(v: i16) -> Self

Source

fn from_i32(v: i32) -> Self

Source

fn from_i64(v: i64) -> Self

Source

fn from_u8(v: u8) -> Self

Source

fn from_u16(v: u16) -> Self

Source

fn from_u32(v: u32) -> Self

Source

fn from_u64(v: u64) -> Self

Provided Methods§

Source

fn ne(&self, rhs: &Self) -> Self

Source

fn ge(&self, other: &Self) -> Self

Source

fn ge_s(&self, other: &Self) -> Self

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl Register for u32

Source§

const BITS: u8 = 32u8

Source§

const SHIFT_MASK: u8 = 31u8

Source§

fn zero() -> u32

Source§

fn one() -> u32

Source§

fn min_value() -> u32

Source§

fn max_value() -> u32

Source§

fn eq(&self, other: &u32) -> u32

Source§

fn lt(&self, other: &u32) -> u32

Source§

fn lt_s(&self, other: &u32) -> u32

Source§

fn logical_not(&self) -> u32

Source§

fn cond(&self, true_value: &u32, false_value: &u32) -> u32

Source§

fn overflowing_add(&self, rhs: &u32) -> u32

Source§

fn overflowing_sub(&self, rhs: &u32) -> u32

Source§

fn overflowing_mul(&self, rhs: &u32) -> u32

Source§

fn overflowing_div(&self, rhs: &u32) -> u32

Source§

fn overflowing_rem(&self, rhs: &u32) -> u32

Source§

fn overflowing_div_signed(&self, rhs: &u32) -> u32

Source§

fn overflowing_rem_signed(&self, rhs: &u32) -> u32

Source§

fn overflowing_mul_high_signed(&self, rhs: &u32) -> u32

Source§

fn overflowing_mul_high_unsigned(&self, rhs: &u32) -> u32

Source§

fn overflowing_mul_high_signed_unsigned(&self, rhs: &u32) -> u32

Source§

fn signed_shl(&self, rhs: &u32) -> u32

Source§

fn signed_shr(&self, rhs: &u32) -> u32

Source§

fn zero_extend(&self, start_bit: &u32) -> u32

Source§

fn sign_extend(&self, start_bit: &u32) -> u32

Source§

fn clz(&self) -> u32

Source§

fn ctz(&self) -> u32

Source§

fn cpop(&self) -> u32

Source§

fn clmul(&self, rhs: &u32) -> u32

Source§

fn clmulh(&self, rhs: &u32) -> u32

Source§

fn clmulr(&self, rhs: &u32) -> u32

Source§

fn orcb(&self) -> u32

Source§

fn rev8(&self) -> u32

Source§

fn rol(&self, rhs: &u32) -> u32

Source§

fn ror(&self, rhs: &u32) -> u32

Source§

fn to_i8(&self) -> i8

Source§

fn to_i16(&self) -> i16

Source§

fn to_i32(&self) -> i32

Source§

fn to_i64(&self) -> i64

Source§

fn to_u8(&self) -> u8

Source§

fn to_u16(&self) -> u16

Source§

fn to_u32(&self) -> u32

Source§

fn to_u64(&self) -> u64

Source§

fn from_i8(v: i8) -> u32

Source§

fn from_i16(v: i16) -> u32

Source§

fn from_i32(v: i32) -> u32

Source§

fn from_i64(v: i64) -> u32

Source§

fn from_u8(v: u8) -> u32

Source§

fn from_u16(v: u16) -> u32

Source§

fn from_u32(v: u32) -> u32

Source§

fn from_u64(v: u64) -> u32

Source§

impl Register for u64

Source§

const BITS: u8 = 64u8

Source§

const SHIFT_MASK: u8 = 63u8

Source§

fn zero() -> u64

Source§

fn one() -> u64

Source§

fn min_value() -> u64

Source§

fn max_value() -> u64

Source§

fn eq(&self, other: &u64) -> u64

Source§

fn lt(&self, other: &u64) -> u64

Source§

fn lt_s(&self, other: &u64) -> u64

Source§

fn logical_not(&self) -> u64

Source§

fn cond(&self, true_value: &u64, false_value: &u64) -> u64

Source§

fn overflowing_add(&self, rhs: &u64) -> u64

Source§

fn overflowing_sub(&self, rhs: &u64) -> u64

Source§

fn overflowing_mul(&self, rhs: &u64) -> u64

Source§

fn overflowing_div(&self, rhs: &u64) -> u64

Source§

fn overflowing_rem(&self, rhs: &u64) -> u64

Source§

fn overflowing_div_signed(&self, rhs: &u64) -> u64

Source§

fn overflowing_rem_signed(&self, rhs: &u64) -> u64

Source§

fn overflowing_mul_high_signed(&self, rhs: &u64) -> u64

Source§

fn overflowing_mul_high_unsigned(&self, rhs: &u64) -> u64

Source§

fn overflowing_mul_high_signed_unsigned(&self, rhs: &u64) -> u64

Source§

fn signed_shl(&self, rhs: &u64) -> u64

Source§

fn signed_shr(&self, rhs: &u64) -> u64

Source§

fn zero_extend(&self, start_bit: &u64) -> u64

Source§

fn sign_extend(&self, start_bit: &u64) -> u64

Source§

fn clz(&self) -> u64

Source§

fn ctz(&self) -> u64

Source§

fn cpop(&self) -> u64

Source§

fn clmul(&self, rhs: &u64) -> u64

Source§

fn clmulh(&self, rhs: &u64) -> u64

Source§

fn clmulr(&self, rhs: &u64) -> u64

Source§

fn orcb(&self) -> u64

Source§

fn rev8(&self) -> u64

Source§

fn rol(&self, rhs: &u64) -> u64

Source§

fn ror(&self, rhs: &u64) -> u64

Source§

fn to_i8(&self) -> i8

Source§

fn to_i16(&self) -> i16

Source§

fn to_i32(&self) -> i32

Source§

fn to_i64(&self) -> i64

Source§

fn to_u8(&self) -> u8

Source§

fn to_u16(&self) -> u16

Source§

fn to_u32(&self) -> u32

Source§

fn to_u64(&self) -> u64

Source§

fn from_i8(v: i8) -> u64

Source§

fn from_i16(v: i16) -> u64

Source§

fn from_i32(v: i32) -> u64

Source§

fn from_i64(v: i64) -> u64

Source§

fn from_u8(v: u8) -> u64

Source§

fn from_u16(v: u16) -> u64

Source§

fn from_u32(v: u32) -> u64

Source§

fn from_u64(v: u64) -> u64

Implementors§

Source§

impl Register for Value

Source§

const BITS: u8 = 64u8

Source§

const SHIFT_MASK: u8 = 63u8