pub struct Instruction {
pub word: usize,
pub opcode: Opcode,
pub control: u8,
pub coissue: bool,
pub predicate: Option<Source>,
pub destination: Option<Destination>,
pub sources: Vec<Source>,
}Expand description
An instruction: everything but declarations, definitions, comments and END.
Fields§
§word: usizeThe word of the instruction token, counted from the version token.
opcode: OpcodeThe opcode.
control: u8The opcode-specific controls, bits 16 to 23: for tex from pixel 1.4 on 0 texld, 1 texldp (projected) and 2
texldb (biased); for if_comp, break_comp and setp_comp the Comparison; 0 for every other opcode.
coissue: boolThe co-issue flag of a pixel 1.x instruction (bit 30), written + before it.
predicate: Option<Source>The predicate an instruction is predicated on (bit 28 set): the predicate register p0, its swizzle and
Modifier::Not or none. Its token follows the destination’s.
destination: Option<Destination>The destination; None for an opcode that has none. texkill’s is the register it tests.
sources: Vec<Source>The sources, in the order the stream writes them.
Implementations§
Source§impl Instruction
impl Instruction
Sourcepub fn comparison(&self) -> Option<Comparison>
pub fn comparison(&self) -> Option<Comparison>
The comparison of if_comp, break_comp and setp_comp; None for other opcodes.