cranelift::prelude::isa::x64

Enum Inst

pub enum Inst {
Show 109 variants Nop { len: u8, }, AluRmiR { size: OperandSize, op: AluRmiROpcode, src1: Gpr, src2: GprMemImm, dst: Writable<Gpr>, }, AluRM { size: OperandSize, op: AluRmiROpcode, src1_dst: SyntheticAmode, src2: Gpr, lock: bool, }, AluRmRVex { size: OperandSize, op: AluRmROpcode, src1: Gpr, src2: GprMem, dst: Writable<Gpr>, }, AluConstOp { op: AluRmiROpcode, size: OperandSize, dst: Writable<Gpr>, }, UnaryRmR { size: OperandSize, op: UnaryRmROpcode, src: GprMem, dst: Writable<Gpr>, }, UnaryRmRVex { size: OperandSize, op: UnaryRmRVexOpcode, src: GprMem, dst: Writable<Gpr>, }, UnaryRmRImmVex { size: OperandSize, op: UnaryRmRImmVexOpcode, src: GprMem, dst: Writable<Gpr>, imm: u8, }, Not { size: OperandSize, src: Gpr, dst: Writable<Gpr>, }, Neg { size: OperandSize, src: Gpr, dst: Writable<Gpr>, }, Div { size: OperandSize, sign: DivSignedness, trap: TrapCode, divisor: GprMem, dividend_lo: Gpr, dividend_hi: Gpr, dst_quotient: Writable<Gpr>, dst_remainder: Writable<Gpr>, }, Div8 { sign: DivSignedness, trap: TrapCode, divisor: GprMem, dividend: Gpr, dst: Writable<Gpr>, }, Mul { size: OperandSize, signed: bool, src1: Gpr, src2: GprMem, dst_lo: Writable<Gpr>, dst_hi: Writable<Gpr>, }, MulX { size: OperandSize, src1: Gpr, src2: GprMem, dst_lo: Writable<Gpr>, dst_hi: Writable<Gpr>, }, Mul8 { signed: bool, src1: Gpr, src2: GprMem, dst: Writable<Gpr>, }, IMul { size: OperandSize, src1: Gpr, src2: GprMem, dst: Writable<Gpr>, }, IMulImm { size: OperandSize, src1: GprMem, src2: i32, dst: Writable<Gpr>, }, CheckedSRemSeq { size: OperandSize, dividend_lo: Gpr, dividend_hi: Gpr, divisor: Gpr, dst_quotient: Writable<Gpr>, dst_remainder: Writable<Gpr>, }, CheckedSRemSeq8 { dividend: Gpr, divisor: Gpr, dst: Writable<Gpr>, }, SignExtendData { size: OperandSize, src: Gpr, dst: Writable<Gpr>, }, Imm { dst_size: OperandSize, simm64: u64, dst: Writable<Gpr>, }, MovRR { size: OperandSize, src: Gpr, dst: Writable<Gpr>, }, MovFromPReg { src: PReg, dst: Writable<Gpr>, }, MovToPReg { src: Gpr, dst: PReg, }, MovzxRmR { ext_mode: ExtMode, src: GprMem, dst: Writable<Gpr>, }, Mov64MR { src: SyntheticAmode, dst: Writable<Gpr>, }, LoadEffectiveAddress { addr: SyntheticAmode, dst: Writable<Gpr>, size: OperandSize, }, MovsxRmR { ext_mode: ExtMode, src: GprMem, dst: Writable<Gpr>, }, MovImmM { size: OperandSize, simm32: i32, dst: SyntheticAmode, }, MovRM { size: OperandSize, src: Gpr, dst: SyntheticAmode, }, ShiftR { size: OperandSize, kind: ShiftKind, src: Gpr, num_bits: Imm8Gpr, dst: Writable<Gpr>, }, XmmRmiReg { opcode: SseOpcode, src1: Xmm, src2: XmmMemAlignedImm, dst: Writable<Xmm>, }, CmpRmiR { size: OperandSize, opcode: CmpOpcode, src1: Gpr, src2: GprMemImm, }, Setcc { cc: CC, dst: Writable<Gpr>, }, Bswap { size: OperandSize, src: Gpr, dst: Writable<Gpr>, }, Cmove { size: OperandSize, cc: CC, consequent: GprMem, alternative: Gpr, dst: Writable<Gpr>, }, XmmCmove { ty: Type, cc: CC, consequent: Xmm, alternative: Xmm, dst: Writable<Xmm>, }, Push64 { src: GprMemImm, }, Pop64 { dst: Writable<Gpr>, }, StackProbeLoop { tmp: Writable<Reg>, frame_size: u32, guard_size: u32, }, XmmRmR { op: SseOpcode, src1: Xmm, src2: XmmMemAligned, dst: Writable<Xmm>, }, XmmRmRUnaligned { op: SseOpcode, src1: Xmm, src2: XmmMem, dst: Writable<Xmm>, }, XmmRmRBlend { op: SseOpcode, src1: Xmm, src2: XmmMemAligned, mask: Xmm, dst: Writable<Xmm>, }, XmmRmiRVex { op: AvxOpcode, src1: Xmm, src2: XmmMemImm, dst: Writable<Xmm>, }, XmmRmRImmVex { op: AvxOpcode, src1: Xmm, src2: XmmMem, dst: Writable<Xmm>, imm: u8, }, XmmVexPinsr { op: AvxOpcode, src1: Xmm, src2: GprMem, dst: Writable<Xmm>, imm: u8, }, XmmRmRVex3 { op: AvxOpcode, src1: Xmm, src2: Xmm, src3: XmmMem, dst: Writable<Xmm>, }, XmmRmRBlendVex { op: AvxOpcode, src1: Xmm, src2: XmmMem, mask: Xmm, dst: Writable<Xmm>, }, XmmUnaryRmRVex { op: AvxOpcode, src: XmmMem, dst: Writable<Xmm>, }, XmmUnaryRmRImmVex { op: AvxOpcode, src: XmmMem, dst: Writable<Xmm>, imm: u8, }, XmmMovRMVex { op: AvxOpcode, src: Xmm, dst: SyntheticAmode, }, XmmMovRMImmVex { op: AvxOpcode, src: Xmm, dst: SyntheticAmode, imm: u8, }, XmmToGprImmVex { op: AvxOpcode, src: Xmm, dst: Writable<Gpr>, imm: u8, }, GprToXmmVex { op: AvxOpcode, src: GprMem, dst: Writable<Xmm>, src_size: OperandSize, }, XmmToGprVex { op: AvxOpcode, src: Xmm, dst: Writable<Gpr>, dst_size: OperandSize, }, XmmCmpRmRVex { op: AvxOpcode, src1: Xmm, src2: XmmMem, }, XmmRmREvex { op: Avx512Opcode, src1: Xmm, src2: XmmMem, dst: Writable<Xmm>, }, XmmUnaryRmRImmEvex { op: Avx512Opcode, src: XmmMem, dst: Writable<Xmm>, imm: u8, }, XmmRmREvex3 { op: Avx512Opcode, src1: Xmm, src2: Xmm, src3: XmmMem, dst: Writable<Xmm>, }, XmmUnaryRmR { op: SseOpcode, src: XmmMemAligned, dst: Writable<Xmm>, }, XmmUnaryRmRUnaligned { op: SseOpcode, src: XmmMem, dst: Writable<Xmm>, }, XmmUnaryRmRImm { op: SseOpcode, src: XmmMemAligned, imm: u8, dst: Writable<Xmm>, }, XmmUnaryRmREvex { op: Avx512Opcode, src: XmmMem, dst: Writable<Xmm>, }, XmmMovRM { op: SseOpcode, src: Xmm, dst: SyntheticAmode, }, XmmMovRMImm { op: SseOpcode, src: Xmm, dst: SyntheticAmode, imm: u8, }, XmmToGpr { op: SseOpcode, src: Xmm, dst: Writable<Gpr>, dst_size: OperandSize, }, XmmToGprImm { op: SseOpcode, src: Xmm, dst: Writable<Gpr>, imm: u8, }, GprToXmm { op: SseOpcode, src: GprMem, dst: Writable<Xmm>, src_size: OperandSize, }, CvtIntToFloat { op: SseOpcode, src1: Xmm, src2: GprMem, dst: Writable<Xmm>, src2_size: OperandSize, }, CvtIntToFloatVex { op: AvxOpcode, src1: Xmm, src2: GprMem, dst: Writable<Xmm>, src2_size: OperandSize, }, CvtUint64ToFloatSeq { dst_size: OperandSize, src: Gpr, dst: Writable<Xmm>, tmp_gpr1: Writable<Gpr>, tmp_gpr2: Writable<Gpr>, }, CvtFloatToSintSeq { dst_size: OperandSize, src_size: OperandSize, is_saturating: bool, src: Xmm, dst: Writable<Gpr>, tmp_gpr: Writable<Gpr>, tmp_xmm: Writable<Xmm>, }, CvtFloatToUintSeq { dst_size: OperandSize, src_size: OperandSize, is_saturating: bool, src: Xmm, dst: Writable<Gpr>, tmp_gpr: Writable<Gpr>, tmp_xmm: Writable<Xmm>, tmp_xmm2: Writable<Xmm>, }, XmmMinMaxSeq { size: OperandSize, is_min: bool, lhs: Xmm, rhs: Xmm, dst: Writable<Xmm>, }, XmmCmpRmR { op: SseOpcode, src1: Xmm, src2: XmmMemAligned, }, XmmRmRImm { op: SseOpcode, src1: Reg, src2: RegMem, dst: Writable<Reg>, imm: u8, size: OperandSize, }, CallKnown { info: Box<CallInfo<ExternalName>>, }, CallUnknown { info: Box<CallInfo<RegMem>>, }, ReturnCallKnown { info: Box<ReturnCallInfo<ExternalName>>, }, ReturnCallUnknown { info: Box<ReturnCallInfo<Reg>>, }, Args { args: Vec<ArgPair>, }, Rets { rets: Vec<RetPair>, }, Ret { stack_bytes_to_pop: u32, }, StackSwitchBasic { store_context_ptr: Gpr, load_context_ptr: Gpr, in_payload0: Gpr, out_payload0: Writable<Gpr>, }, JmpKnown { dst: MachLabel, }, JmpIf { cc: CC, taken: MachLabel, }, JmpCond { cc: CC, taken: MachLabel, not_taken: MachLabel, }, JmpTableSeq { idx: Reg, tmp1: Writable<Reg>, tmp2: Writable<Reg>, default_target: MachLabel, targets: Box<Vec<MachLabel>>, }, JmpUnknown { target: RegMem, }, TrapIf { cc: CC, trap_code: TrapCode, }, TrapIfAnd { cc1: CC, cc2: CC, trap_code: TrapCode, }, TrapIfOr { cc1: CC, cc2: CC, trap_code: TrapCode, }, Hlt, Ud2 { trap_code: TrapCode, }, LoadExtName { dst: Writable<Reg>, name: Box<ExternalName>, offset: i64, distance: RelocDistance, }, LockCmpxchg { ty: Type, replacement: Reg, expected: Reg, mem: SyntheticAmode, dst_old: Writable<Reg>, }, LockCmpxchg16b { replacement_low: Reg, replacement_high: Reg, expected_low: Reg, expected_high: Reg, mem: Box<SyntheticAmode>, dst_old_low: Writable<Reg>, dst_old_high: Writable<Reg>, }, LockXadd { size: OperandSize, operand: Reg, mem: SyntheticAmode, dst_old: Writable<Reg>, }, Xchg { size: OperandSize, operand: Reg, mem: SyntheticAmode, dst_old: Writable<Reg>, }, AtomicRmwSeq { ty: Type, op: AtomicRmwSeqOp, mem: SyntheticAmode, operand: Reg, temp: Writable<Reg>, dst_old: Writable<Reg>, }, Atomic128RmwSeq { op: Atomic128RmwSeqOp, mem: Box<SyntheticAmode>, operand_low: Reg, operand_high: Reg, temp_low: Writable<Reg>, temp_high: Writable<Reg>, dst_old_low: Writable<Reg>, dst_old_high: Writable<Reg>, }, Atomic128XchgSeq { mem: SyntheticAmode, operand_low: Reg, operand_high: Reg, dst_old_low: Writable<Reg>, dst_old_high: Writable<Reg>, }, Fence { kind: FenceKind, }, XmmUninitializedValue { dst: Writable<Xmm>, }, ElfTlsGetAddr { symbol: ExternalName, dst: Writable<Gpr>, }, MachOTlsGetAddr { symbol: ExternalName, dst: Writable<Gpr>, }, CoffTlsGetAddr { symbol: ExternalName, dst: Writable<Gpr>, tmp: Writable<Gpr>, }, Unwind { inst: UnwindInst, }, DummyUse { reg: Reg, },
}
Expand description

Internal type MInst: defined at src/isa/x64/inst.isle line 7.

Variants§

§

Nop

Fields

§len: u8
§

AluRmiR

Fields

§src1: Gpr
§dst: Writable<Gpr>
§

AluRM

Fields

§src2: Gpr
§lock: bool
§

AluRmRVex

Fields

§src1: Gpr
§src2: GprMem
§dst: Writable<Gpr>
§

AluConstOp

Fields

§dst: Writable<Gpr>
§

UnaryRmR

Fields

§dst: Writable<Gpr>
§

UnaryRmRVex

Fields

§dst: Writable<Gpr>
§

UnaryRmRImmVex

Fields

§dst: Writable<Gpr>
§imm: u8
§

Not

Fields

§src: Gpr
§dst: Writable<Gpr>
§

Neg

Fields

§src: Gpr
§dst: Writable<Gpr>
§

Div

Fields

§divisor: GprMem
§dividend_lo: Gpr
§dividend_hi: Gpr
§dst_quotient: Writable<Gpr>
§dst_remainder: Writable<Gpr>
§

Div8

Fields

§divisor: GprMem
§dividend: Gpr
§dst: Writable<Gpr>
§

Mul

Fields

§signed: bool
§src1: Gpr
§src2: GprMem
§dst_lo: Writable<Gpr>
§dst_hi: Writable<Gpr>
§

MulX

Fields

§src1: Gpr
§src2: GprMem
§dst_lo: Writable<Gpr>
§dst_hi: Writable<Gpr>
§

Mul8

Fields

§signed: bool
§src1: Gpr
§src2: GprMem
§dst: Writable<Gpr>
§

IMul

Fields

§src1: Gpr
§src2: GprMem
§dst: Writable<Gpr>
§

IMulImm

Fields

§src1: GprMem
§src2: i32
§dst: Writable<Gpr>
§

CheckedSRemSeq

Fields

§dividend_lo: Gpr
§dividend_hi: Gpr
§divisor: Gpr
§dst_quotient: Writable<Gpr>
§dst_remainder: Writable<Gpr>
§

CheckedSRemSeq8

Fields

§dividend: Gpr
§divisor: Gpr
§dst: Writable<Gpr>
§

SignExtendData

Fields

§src: Gpr
§dst: Writable<Gpr>
§

Imm

Fields

§dst_size: OperandSize
§simm64: u64
§dst: Writable<Gpr>
§

MovRR

Fields

§src: Gpr
§dst: Writable<Gpr>
§

MovFromPReg

Fields

§src: PReg
§dst: Writable<Gpr>
§

MovToPReg

Fields

§src: Gpr
§dst: PReg
§

MovzxRmR

Fields

§ext_mode: ExtMode
§dst: Writable<Gpr>
§

Mov64MR

Fields

§dst: Writable<Gpr>
§

LoadEffectiveAddress

Fields

§dst: Writable<Gpr>
§

MovsxRmR

Fields

§ext_mode: ExtMode
§dst: Writable<Gpr>
§

MovImmM

Fields

§simm32: i32
§

MovRM

§

ShiftR

Fields

§src: Gpr
§num_bits: Imm8Gpr
§dst: Writable<Gpr>
§

XmmRmiReg

Fields

§opcode: SseOpcode
§src1: Xmm
§dst: Writable<Xmm>
§

CmpRmiR

Fields

§opcode: CmpOpcode
§src1: Gpr
§

Setcc

Fields

§cc: CC
§dst: Writable<Gpr>
§

Bswap

Fields

§src: Gpr
§dst: Writable<Gpr>
§

Cmove

Fields

§cc: CC
§consequent: GprMem
§alternative: Gpr
§dst: Writable<Gpr>
§

XmmCmove

Fields

§ty: Type
§cc: CC
§consequent: Xmm
§alternative: Xmm
§dst: Writable<Xmm>
§

Push64

Fields

§

Pop64

Fields

§dst: Writable<Gpr>
§

StackProbeLoop

Fields

§tmp: Writable<Reg>
§frame_size: u32
§guard_size: u32
§

XmmRmR

Fields

§src1: Xmm
§dst: Writable<Xmm>
§

XmmRmRUnaligned

Fields

§src1: Xmm
§src2: XmmMem
§dst: Writable<Xmm>
§

XmmRmRBlend

Fields

§src1: Xmm
§mask: Xmm
§dst: Writable<Xmm>
§

XmmRmiRVex

Fields

§src1: Xmm
§dst: Writable<Xmm>
§

XmmRmRImmVex

Fields

§src1: Xmm
§src2: XmmMem
§dst: Writable<Xmm>
§imm: u8
§

XmmVexPinsr

Fields

§src1: Xmm
§src2: GprMem
§dst: Writable<Xmm>
§imm: u8
§

XmmRmRVex3

Fields

§src1: Xmm
§src2: Xmm
§src3: XmmMem
§dst: Writable<Xmm>
§

XmmRmRBlendVex

Fields

§src1: Xmm
§src2: XmmMem
§mask: Xmm
§dst: Writable<Xmm>
§

XmmUnaryRmRVex

Fields

§dst: Writable<Xmm>
§

XmmUnaryRmRImmVex

Fields

§dst: Writable<Xmm>
§imm: u8
§

XmmMovRMVex

§

XmmMovRMImmVex

Fields

§src: Xmm
§imm: u8
§

XmmToGprImmVex

Fields

§src: Xmm
§dst: Writable<Gpr>
§imm: u8
§

GprToXmmVex

Fields

§dst: Writable<Xmm>
§src_size: OperandSize
§

XmmToGprVex

Fields

§src: Xmm
§dst: Writable<Gpr>
§dst_size: OperandSize
§

XmmCmpRmRVex

Fields

§src1: Xmm
§src2: XmmMem
§

XmmRmREvex

Fields

§src1: Xmm
§src2: XmmMem
§dst: Writable<Xmm>
§

XmmUnaryRmRImmEvex

Fields

§dst: Writable<Xmm>
§imm: u8
§

XmmRmREvex3

Fields

§src1: Xmm
§src2: Xmm
§src3: XmmMem
§dst: Writable<Xmm>
§

XmmUnaryRmR

Fields

§dst: Writable<Xmm>
§

XmmUnaryRmRUnaligned

Fields

§dst: Writable<Xmm>
§

XmmUnaryRmRImm

Fields

§imm: u8
§dst: Writable<Xmm>
§

XmmUnaryRmREvex

Fields

§dst: Writable<Xmm>
§

XmmMovRM

§

XmmMovRMImm

Fields

§src: Xmm
§imm: u8
§

XmmToGpr

Fields

§src: Xmm
§dst: Writable<Gpr>
§dst_size: OperandSize
§

XmmToGprImm

Fields

§src: Xmm
§dst: Writable<Gpr>
§imm: u8
§

GprToXmm

Fields

§dst: Writable<Xmm>
§src_size: OperandSize
§

CvtIntToFloat

Fields

§src1: Xmm
§src2: GprMem
§dst: Writable<Xmm>
§src2_size: OperandSize
§

CvtIntToFloatVex

Fields

§src1: Xmm
§src2: GprMem
§dst: Writable<Xmm>
§src2_size: OperandSize
§

CvtUint64ToFloatSeq

Fields

§dst_size: OperandSize
§src: Gpr
§dst: Writable<Xmm>
§tmp_gpr1: Writable<Gpr>
§tmp_gpr2: Writable<Gpr>
§

CvtFloatToSintSeq

Fields

§dst_size: OperandSize
§src_size: OperandSize
§is_saturating: bool
§src: Xmm
§dst: Writable<Gpr>
§tmp_gpr: Writable<Gpr>
§tmp_xmm: Writable<Xmm>
§

CvtFloatToUintSeq

Fields

§dst_size: OperandSize
§src_size: OperandSize
§is_saturating: bool
§src: Xmm
§dst: Writable<Gpr>
§tmp_gpr: Writable<Gpr>
§tmp_xmm: Writable<Xmm>
§tmp_xmm2: Writable<Xmm>
§

XmmMinMaxSeq

Fields

§is_min: bool
§lhs: Xmm
§rhs: Xmm
§dst: Writable<Xmm>
§

XmmCmpRmR

Fields

§src1: Xmm
§

XmmRmRImm

Fields

§src1: Reg
§src2: RegMem
§dst: Writable<Reg>
§imm: u8
§

CallKnown

Fields

§info: Box<CallInfo<ExternalName>>
§

CallUnknown

Fields

§info: Box<CallInfo<RegMem>>
§

ReturnCallKnown

Fields

§info: Box<ReturnCallInfo<ExternalName>>
§

ReturnCallUnknown

Fields

§info: Box<ReturnCallInfo<Reg>>
§

Args

Fields

§args: Vec<ArgPair>
§

Rets

Fields

§rets: Vec<RetPair>
§

Ret

Fields

§stack_bytes_to_pop: u32
§

StackSwitchBasic

Fields

§store_context_ptr: Gpr
§load_context_ptr: Gpr
§in_payload0: Gpr
§out_payload0: Writable<Gpr>
§

JmpKnown

Fields

§dst: MachLabel
§

JmpIf

Fields

§cc: CC
§taken: MachLabel
§

JmpCond

Fields

§cc: CC
§taken: MachLabel
§not_taken: MachLabel
§

JmpTableSeq

Fields

§idx: Reg
§tmp1: Writable<Reg>
§tmp2: Writable<Reg>
§default_target: MachLabel
§targets: Box<Vec<MachLabel>>
§

JmpUnknown

Fields

§target: RegMem
§

TrapIf

Fields

§cc: CC
§trap_code: TrapCode
§

TrapIfAnd

Fields

§cc1: CC
§cc2: CC
§trap_code: TrapCode
§

TrapIfOr

Fields

§cc1: CC
§cc2: CC
§trap_code: TrapCode
§

Hlt

§

Ud2

Fields

§trap_code: TrapCode
§

LoadExtName

Fields

§dst: Writable<Reg>
§offset: i64
§distance: RelocDistance
§

LockCmpxchg

Fields

§ty: Type
§replacement: Reg
§expected: Reg
§dst_old: Writable<Reg>
§

LockCmpxchg16b

Fields

§replacement_low: Reg
§replacement_high: Reg
§expected_low: Reg
§expected_high: Reg
§dst_old_low: Writable<Reg>
§dst_old_high: Writable<Reg>
§

LockXadd

Fields

§operand: Reg
§dst_old: Writable<Reg>
§

Xchg

Fields

§operand: Reg
§dst_old: Writable<Reg>
§

AtomicRmwSeq

Fields

§ty: Type
§op: AtomicRmwSeqOp
§operand: Reg
§temp: Writable<Reg>
§dst_old: Writable<Reg>
§

Atomic128RmwSeq

Fields

§op: Atomic128RmwSeqOp
§operand_low: Reg
§operand_high: Reg
§temp_low: Writable<Reg>
§temp_high: Writable<Reg>
§dst_old_low: Writable<Reg>
§dst_old_high: Writable<Reg>
§

Atomic128XchgSeq

Fields

§operand_low: Reg
§operand_high: Reg
§dst_old_low: Writable<Reg>
§dst_old_high: Writable<Reg>
§

Fence

Fields

§

XmmUninitializedValue

Fields

§dst: Writable<Xmm>
§

ElfTlsGetAddr

Fields

§dst: Writable<Gpr>
§

MachOTlsGetAddr

Fields

§dst: Writable<Gpr>
§

CoffTlsGetAddr

Fields

§dst: Writable<Gpr>
§tmp: Writable<Gpr>
§

Unwind

Fields

§

DummyUse

Fields

§reg: Reg

Trait Implementations§

§

impl Clone for MInst

§

fn clone(&self) -> MInst

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for MInst

§

fn fmt(&self, fmt: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl MachInst for MInst

§

const TRAP_OPCODE: &'static [u8] = _

Byte representation of a trap opcode which is inserted by MachBuffer during its defer_trap method.
§

type ABIMachineSpec = X64ABIMachineSpec

The ABI machine spec for this MachInst.
§

type LabelUse = LabelUse

A label-use kind: a type that describes the types of label references that can occur in an instruction.
§

fn get_operands(&mut self, collector: &mut impl OperandVisitor)

Return the registers referenced by this machine instruction along with the modes of reference (use, def, modify).
§

fn is_move(&self) -> Option<(Writable<Reg>, Reg)>

If this is a simple move, return the (source, destination) tuple of registers.
§

fn is_included_in_clobbers(&self) -> bool

Should this instruction be included in the clobber-set?
§

fn is_trap(&self) -> bool

Is this an unconditional trap?
§

fn is_args(&self) -> bool

Is this an “args” pseudoinst?
§

fn is_term(&self) -> MachTerminator

Is this a terminator (branch or ret)? If so, return its type (ret/uncond/cond) and target if applicable.
§

fn is_mem_access(&self) -> bool

Does this instruction access memory?
§

fn gen_move(dst_reg: Writable<Reg>, src_reg: Reg, ty: Type) -> MInst

Generate a move.
§

fn gen_nop(preferred_size: usize) -> MInst

Generate a NOP. The preferred_size parameter allows the caller to request a NOP of that size, or as close to it as possible. The machine backend may return a NOP whose binary encoding is smaller than the preferred size, but must not return a NOP that is larger. However, the instruction must have a nonzero size if preferred_size is nonzero.
§

fn rc_for_type( ty: Type, ) -> Result<(&'static [RegClass], &'static [Type]), CodegenError>

Determine register class(es) to store the given Cranelift type, and the Cranelift type actually stored in the underlying register(s). May return an error if the type isn’t supported by this backend. Read more
§

fn canonical_type_for_rc(rc: RegClass) -> Type

Get an appropriate type that can fully hold a value in a given register class. This may not be the only type that maps to that class, but when used with gen_move() or the ABI trait’s load/spill constructors, it should produce instruction(s) that move the entire register contents.
§

fn gen_jump(label: MachLabel) -> MInst

Generate a jump to another target. Used during lowering of control flow.
§

fn gen_imm_u64(value: u64, dst: Writable<Reg>) -> Option<MInst>

Generate a store of an immediate 64-bit integer to a register. Used by the control plane to generate random instructions.
§

fn gen_imm_f64( value: f64, tmp: Writable<Reg>, dst: Writable<Reg>, ) -> SmallVec<[MInst; 2]>

Generate a store of an immediate 64-bit integer to a register. Used by the control plane to generate random instructions. The tmp register may be used by architectures which don’t support writing immediate values to floating point registers directly.
§

fn gen_dummy_use(reg: Reg) -> MInst

Generate a dummy instruction that will keep a value alive but has no other purpose.
§

fn worst_case_size() -> u32

What is the worst-case instruction size emitted by this instruction type?
§

fn ref_type_regclass(_: &Flags) -> RegClass

What is the register class used for reference types (GC-observable pointers)? Can be dependent on compilation flags.
§

fn is_safepoint(&self) -> bool

Is this a safepoint?
§

fn function_alignment() -> FunctionAlignment

Returns a description of the alignment required for functions for this architecture.
§

fn align_basic_block(offset: u32) -> u32

Align a basic block offset (from start of function). By default, no alignment occurs.
§

fn gen_block_start( _is_indirect_branch_target: bool, _is_forward_edge_cfi_enabled: bool, ) -> Option<Self>

Generate an instruction that must appear at the beginning of a basic block, if any. Note that the return value must not be subject to register allocation.
§

impl MachInstEmit for MInst

§

type State = EmitState

Persistent state carried across emit invocations.
§

type Info = EmitInfo

Constant information used in emit invocations.
§

fn emit( &self, sink: &mut MachBuffer<MInst>, info: &<MInst as MachInstEmit>::Info, state: &mut <MInst as MachInstEmit>::State, )

Emit the instruction.
§

fn pretty_print_inst(&self, _: &mut <MInst as MachInstEmit>::State) -> String

Pretty-print the instruction.
§

impl MachInstEmitState<MInst> for EmitState

§

fn new(abi: &Callee<X64ABIMachineSpec>, ctrl_plane: ControlPlane) -> EmitState

Create a new emission state given the ABI object.
§

fn pre_safepoint(&mut self, user_stack_map: Option<UserStackMap>)

Update the emission state before emitting an instruction that is a safepoint.
§

fn ctrl_plane_mut(&mut self) -> &mut ControlPlane

The emission state holds ownership of a control plane, so it doesn’t have to be passed around explicitly too much. ctrl_plane_mut may be used if temporary access to the control plane is needed by some other function that doesn’t have access to the emission state.
§

fn take_ctrl_plane(self) -> ControlPlane

Used to continue using a control plane after the emission state is not needed anymore.
§

fn frame_layout(&self) -> &FrameLayout

The [FrameLayout] for the function currently being compiled.
§

fn on_new_block(&mut self)

A hook that triggers when first emitting a new block. It is guaranteed to be called before any instructions are emitted.

Auto Trait Implementations§

§

impl Freeze for MInst

§

impl RefUnwindSafe for MInst

§

impl Send for MInst

§

impl Sync for MInst

§

impl Unpin for MInst

§

impl UnwindSafe for MInst

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.