pub enum Control {
If {
else_offset: usize,
end_offset: usize,
},
Loop {
count: u8,
initial: u8,
increment: u8,
end_offset: usize,
},
Repeat {
counts: [u8; 3],
end_offset: usize,
},
Call {
target: usize,
encoded: [u32; 3],
},
Break,
Return,
}Expand description
What a flow-control instruction does.
Variants§
If
IFE: a conditional block.
Fields
Loop
LOOP: the three byte fields of the second operand word are the count (bits 2 to 9), the initial counter value
(10 to 17) and the increment (19 to 26), as RPCS3 and Mesa name them. No program on Tony Hawk’s SHRED disc uses it.
Fields
Repeat
REP: the same three byte fields, which Mesa found always filled with one value (a repeat count) and names
count1, count2 and count3; RPCS3 reads the first as the repeat count. Kept as stored, in that order.
Fields
Call
CAL: a subroutine call. The target is the second operand word without its top bit, a count of 32-bit words as
every other branch offset is (Mesa’s NV40_FP_OP_SUB_OFFSET); it must be an instruction boundary.
Fields
Break
BRK.
Return
RET.
Trait Implementations§
impl Eq for Control
impl StructuralPartialEq for Control
Auto Trait Implementations§
impl Forget for Control
impl Freeze for Control
impl RefUnwindSafe for Control
impl Send for Control
impl Sync for Control
impl Unpin for Control
impl UnsafeUnpin for Control
impl UnwindSafe for Control
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