Trait ckb_vm::instructions::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

Object Safety§

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