singe_ptx/ast/
instruction.rs1use crate::{
2 ast::{Operand, Span},
3 generated::instruction_set::InstructionOpcode,
4};
5
6#[derive(Debug, Clone, PartialEq)]
7pub struct Instruction {
8 pub span: Span,
9 pub guard: Option<PredicateGuard>,
10 pub opcode: String,
11 pub opcode_kind: Option<InstructionOpcode>,
12 pub modifiers: Vec<String>,
13 pub operands: Vec<Operand>,
14 pub setp_details: Option<SetPredicateDetails>,
15}
16
17#[derive(Debug, Clone, PartialEq)]
18pub struct PredicateGuard {
19 pub span: Span,
20 pub negated: bool,
21 pub register: String,
22}
23
24#[derive(Debug, Clone, PartialEq)]
25pub struct SetPredicateDetails {
26 pub span: Span,
27 pub secondary_destination: Option<Operand>,
28 pub predicate_input_negated: bool,
29}