pub trait RegTypewhere
Self: Default + Destruct + From<bool> + From<u8> + From<u16> + From<u32> + Eq + Ord + Add<Output = Self> + AddAssign + Sub<Output = Self> + SubAssign + BitAnd<Output = Self> + BitAndAssign + BitOr<Output = Self> + BitOrAssign + BitXor<Output = Self> + BitXorAssign + Not<Output = Self> + Shl<u8, Output = Self> + Shl<u16, Output = Self> + Shl<u32, Output = Self> + Shl<i32, Output = Self> + Shr<u8, Output = Self> + Shr<u16, Output = Self> + Shr<u32, Output = Self> + Shr<i32, Output = Self> + Display + LowerHex + UpperHex + Debug + Copy + Send + Sync + Sized + 'static,{
const BITS: u8;
// Required methods
fn as_u64(&self) -> u64;
fn truncate_from_u64(value: u64) -> Self;
fn as_i64(&self) -> i64;
fn wrapping_add_signed(&self, offset: i32) -> Self;
}Expand description
Register type.
u32 for RV32 and u64 for RV64.
Required Associated Constants§
Required Methods§
Sourcefn truncate_from_u64(value: u64) -> Self
fn truncate_from_u64(value: u64) -> Self
Convert from u64, truncating to this type’s width
Sourcefn wrapping_add_signed(&self, offset: i32) -> Self
fn wrapping_add_signed(&self, offset: i32) -> Self
Wrapping addition of a signed byte offset, as used for PC-relative control flow
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".