pub enum CBOperation {
RotateLeft8,
RotateLeft9,
RotateRight8,
RotateRight9,
ShiftLeft,
ShiftRight,
ShiftRightSignExt,
Swap,
TestBit(u8),
SetBit(u8),
ResetBit(u8),
}Expand description
Type of operation performed in a CB prefix opcode.
Variants§
RotateLeft8
8-bit left rotate. Bit 7 goes to both the carry and bit 0.
RotateLeft9
9-bit left rotate. Bit 7 goes to carry and carry goes to bit 0.
RotateRight8
8-bit right rotate. Bit 0 goes to both the carry and bit 7.
RotateRight9
9-bit left rotate. Bit 0 goes to carry and carry goes to bit 7.
ShiftLeft
Shift left. Bit 7 gotes to carry, and 0 fills in Bit 0.
ShiftRight
Shift right. Bit 0 goes to carry, and 0 fills in Bit 7.
ShiftRightSignExt
Shift right with sign-extension. Bit 0 goes to carry, and Bit 7 is copied with its current value.
Swap
Swap the nybbles of the byte.
TestBit(u8)
Check if the given bit (given as an index in range 0..=7) is set in the operand.
SetBit(u8)
Sets the given bit (given as an index in range 0..=7) in the operand.
ResetBit(u8)
Clears the given bit (given as an index in range 0..=7) in the operand.
Trait Implementations§
Source§impl Clone for CBOperation
impl Clone for CBOperation
Source§fn clone(&self) -> CBOperation
fn clone(&self) -> CBOperation
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CBOperation
impl Debug for CBOperation
Source§impl Display for CBOperation
impl Display for CBOperation
Source§impl Ord for CBOperation
impl Ord for CBOperation
Source§fn cmp(&self, other: &CBOperation) -> Ordering
fn cmp(&self, other: &CBOperation) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for CBOperation
impl PartialEq for CBOperation
Source§impl PartialOrd for CBOperation
impl PartialOrd for CBOperation
impl Copy for CBOperation
impl Eq for CBOperation
impl StructuralPartialEq for CBOperation
Auto Trait Implementations§
impl Freeze for CBOperation
impl RefUnwindSafe for CBOperation
impl Send for CBOperation
impl Sync for CBOperation
impl Unpin for CBOperation
impl UnwindSafe for CBOperation
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more