[−][src]Trait rysk_core::register::Register
Operations on a register carried out by system instructions
Required methods
fn sign_extended_byte(byte: u8) -> Self
Create a register with the lower portion set to the byte and the rest set to the msb of the byte
fn zero_extended_byte(byte: u8) -> Self
Create a register with the lower portion set to the byte and the rest set to zeroes
fn sign_extended_half(half: [u8; 2]) -> Self
Create a register with the lower portion set to the half and the rest set to the msb of the half
fn zero_extended_half(half: [u8; 2]) -> Self
Create a register with the lower portion set to the half and the rest set to zeroes
fn sign_extended_word(word: [u8; 4]) -> Self
Create a register with the lower portion set to the word and the rest set to the msb of the word
fn zero_extended_word(word: [u8; 4]) -> Self
Create a register with the lower portion set to the word and the rest set to zeroes
fn sign_extended_double(double: [u8; 8]) -> Self
Create a register with the lower portion set to the double and the rest set to the msb of the double
fn zero_extended_double(double: [u8; 8]) -> Self
Create a register with the lower portion set to the double and the rest set to zeroes
fn byte(self) -> u8
Get the lowest byte
fn half(self) -> [u8; 2]
Get the lowest half
fn word(self) -> [u8; 4]
Get the lowest word
fn double(self) -> [u8; 8]
Get the lowest double
Provided methods
fn add_signed(self, other: Self) -> Self
Add 2 registers with signed arithmetic
fn add_unsigned(self, other: Self) -> Self
Add 2 registers with unsigned arithmetic
fn sub_unsigned(self, other: Self) -> Self
Subtract other from self where both are unsigned
fn shl(self, other: Self) -> Self
Shift left by a certain number of bits
fn shr(self, other: Self) -> Self
Shift right by a certain number of bits
fn sha(self, other: Self) -> Self
Arithmetic shift right by a certain number of bits; shift right, preserving the sign
fn mul(self, other: Self) -> Self
fn mulh(self, other: Self) -> Self
fn mulhu(self, other: Self) -> Self
fn mulhsu(self, other: Self) -> Self
fn div(self, other: Self) -> Self
fn divu(self, other: Self) -> Self
fn rem(self, other: Self) -> Self
fn remu(self, other: Self) -> Self
fn and(self, other: Self) -> Self
Applies the bitwise AND operation to self and other
fn or(self, other: Self) -> Self
Applies the bitwise OR operation to self and other
fn xor(self, other: Self) -> Self
Applies the bitwise XOR operation to self and other
fn not(self) -> Self
Applies the bitwise NOT operation to self
fn eq(self, other: Self) -> bool
Tests if self is equal to other
fn neq(self, other: Self) -> bool
Tests if self is not equal to other
fn lt_signed(self, other: Self) -> bool
Tests if self is less than other where both are interpreted as signed values
fn lt_unsigned(self, other: Self) -> bool
Tests if self is less than other where both are interpreted as unsigned values
fn gte_signed(self, other: Self) -> bool
Tests if self is greater than or equal to other where both are interpreted as signed values
fn gte_unsigned(self, other: Self) -> bool
Tests if self is greater than or equal to other where both are interpreted as unsigned values