Enum BtInstruction
pub enum BtInstruction {
Show 24 variants
Return(Option<BtValue>),
SignExtend {
src: BtValue,
dst: BtValue,
},
ZeroExtend {
src: BtValue,
dst: BtValue,
},
Truncate {
src: BtValue,
dst: BtValue,
},
TruncateTo1Bit {
src: BtValue,
dst: BtValue,
},
ConvertFp {
src: BtValue,
dst: BtValue,
},
FpToSignedInteger {
src: BtValue,
dst: BtValue,
},
FpToUnsignedInteger {
src: BtValue,
dst: BtValue,
},
SignedIntegerToFp {
src: BtValue,
dst: BtValue,
},
UnsignedIntegerToFp {
src: BtValue,
dst: BtValue,
},
Unary {
op: BtUnaryOp,
src: BtValue,
dst: BtValue,
},
Binary {
op: BtBinaryOp,
src1: BtValue,
src2: BtValue,
dst: BtValue,
},
Copy {
src: BtValue,
dst: BtValue,
},
Load {
src_ptr: BtValue,
dst: BtValue,
},
Store {
src: BtValue,
dst_ptr: BtValue,
},
StoreAddress {
src: BtValue,
dst_ptr: BtValue,
},
StoreAtOffset {
src: BtValue,
dst_ptr: BtValue,
dst_offset: usize,
},
AddPtr {
src_ptr: BtValue,
index: BtValue,
scale: usize,
dst_ptr: BtValue,
},
Jump {
target: BtLabelIdentifier,
},
JumpIfZero {
condition: BtValue,
target: BtLabelIdentifier,
},
JumpIfNotZero {
condition: BtValue,
target: BtLabelIdentifier,
},
Label {
id: BtLabelIdentifier,
},
Switch {
controlling_value: BtValue,
cases: Vec<BtSwitchCase>,
default_label: Option<BtLabelIdentifier>,
break_label: BtLabelIdentifier,
},
FunctionCall {
designator: BtValue,
args: Vec<BtValue>,
dst: Option<BtValue>,
},
}Expand description
A BlueTac IR instruction.
Variants§
Return(Option<BtValue>)
SignExtend
ZeroExtend
Truncate
TruncateTo1Bit
ConvertFp
FpToSignedInteger
FpToUnsignedInteger
SignedIntegerToFp
UnsignedIntegerToFp
Unary
Binary
Copy
Load
Store
StoreAddress
StoreAtOffset
AddPtr
Jump
Fields
§
target: BtLabelIdentifierJumpIfZero
JumpIfNotZero
Label
Fields
Switch
Fields
§
cases: Vec<BtSwitchCase>§
default_label: Option<BtLabelIdentifier>§
break_label: BtLabelIdentifierFunctionCall
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BtInstruction
impl RefUnwindSafe for BtInstruction
impl Send for BtInstruction
impl Sync for BtInstruction
impl Unpin for BtInstruction
impl UnwindSafe for BtInstruction
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