Enum llhd::ir::InstData [−][src]
pub enum InstData {
Show 16 variants
ConstInt {
opcode: Opcode,
imm: IntValue,
},
ConstTime {
opcode: Opcode,
imm: TimeValue,
},
Array {
opcode: Opcode,
imms: [usize; 1],
args: [Value; 1],
},
Aggregate {
opcode: Opcode,
args: Vec<Value>,
},
Nullary {
opcode: Opcode,
},
Unary {
opcode: Opcode,
args: [Value; 1],
},
Binary {
opcode: Opcode,
args: [Value; 2],
},
Ternary {
opcode: Opcode,
args: [Value; 3],
},
Quaternary {
opcode: Opcode,
args: [Value; 4],
},
Jump {
opcode: Opcode,
bbs: [Block; 1],
},
Phi {
opcode: Opcode,
args: Vec<Value>,
bbs: Vec<Block>,
},
Branch {
opcode: Opcode,
args: [Value; 1],
bbs: [Block; 2],
},
Wait {
opcode: Opcode,
bbs: [Block; 1],
args: Vec<Value>,
},
Call {
opcode: Opcode,
unit: ExtUnit,
ins: u16,
args: Vec<Value>,
},
InsExt {
opcode: Opcode,
args: [Value; 2],
imms: [usize; 2],
},
Reg {
opcode: Opcode,
args: Vec<Value>,
modes: Vec<RegMode>,
},
}
Expand description
An instruction format.
Variants
a = const iN imm
a = const time imm
opcode imm, type x
opcode args
opcode
Fields of Nullary
opcode: Opcode
opcode type x
opcode type x, y
opcode type x, y, z
opcode type x, y, z, w
opcode bb
opcode type [x, bb],*
opcode x, bb0, bb1
opcode bb, args
a = opcode type unit (inputs) -> (outputs)
a = opcode type x, y, imm0, imm1
a = reg type x (, data mode trigger)*
Implementations
Get the arguments of an instruction.
Get the immediates of an instruction.
Get the input arguments of a call instruction.
Get the output arguments of a call instruction.
Get the data arguments of a register instruction.
Get the trigger arguments of a register instruction.
Get the gating arguments of a register instruction.
Get the modes of a register instruction.
Get the register triggers.
Get the BBs of an instruction.
Return the const int constructed by this instruction.
Return the const time constructed by this instruction.
Return the external unit being called or instantiated by this instruction.
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for InstData
impl UnwindSafe for InstData
Blanket Implementations
Mutably borrows from an owned value. Read more