pub enum Inst {
Show 73 variants Nop { len: u8, }, AluRmiR { size: OperandSize, op: AluRmiROpcode, src1: Gpr, src2: GprMemImm, dst: WritableGpr, }, AluRM { size: OperandSize, op: AluRmiROpcode, src1_dst: SyntheticAmode, src2: Gpr, }, AluRmRVex { size: OperandSize, op: AluRmROpcode, src1: Gpr, src2: Gpr, dst: WritableGpr, }, UnaryRmR { size: OperandSize, op: UnaryRmROpcode, src: GprMem, dst: WritableGpr, }, Not { size: OperandSize, src: Gpr, dst: WritableGpr, }, Neg { size: OperandSize, src: Gpr, dst: WritableGpr, }, Div { size: OperandSize, signed: bool, divisor: GprMem, dividend_lo: Gpr, dividend_hi: Gpr, dst_quotient: WritableGpr, dst_remainder: WritableGpr, }, MulHi { size: OperandSize, signed: bool, src1: Gpr, src2: GprMem, dst_lo: WritableGpr, dst_hi: WritableGpr, }, CheckedDivOrRemSeq { kind: DivOrRemKind, size: OperandSize, dividend_lo: Gpr, dividend_hi: Gpr, divisor: Gpr, dst_quotient: WritableGpr, dst_remainder: WritableGpr, tmp: OptionWritableGpr, }, SignExtendData { size: OperandSize, src: Gpr, dst: WritableGpr, }, Imm { dst_size: OperandSize, simm64: u64, dst: WritableGpr, }, MovRR { size: OperandSize, src: Gpr, dst: WritableGpr, }, MovFromPReg { src: PReg, dst: WritableGpr, }, MovToPReg { src: Gpr, dst: PReg, }, MovzxRmR { ext_mode: ExtMode, src: GprMem, dst: WritableGpr, }, Mov64MR { src: SyntheticAmode, dst: WritableGpr, }, LoadEffectiveAddress { addr: SyntheticAmode, dst: WritableGpr, }, MovsxRmR { ext_mode: ExtMode, src: GprMem, dst: WritableGpr, }, MovImmM { size: OperandSize, simm64: u64, dst: SyntheticAmode, }, MovRM { size: OperandSize, src: Gpr, dst: SyntheticAmode, }, ShiftR { size: OperandSize, kind: ShiftKind, src: Gpr, num_bits: Imm8Gpr, dst: WritableGpr, }, XmmRmiReg { opcode: SseOpcode, src1: Xmm, src2: XmmMemImm, dst: WritableXmm, }, CmpRmiR { size: OperandSize, opcode: CmpOpcode, src: GprMemImm, dst: Gpr, }, Setcc { cc: CC, dst: WritableGpr, }, Bswap { size: OperandSize, src: Gpr, dst: WritableGpr, }, Cmove { size: OperandSize, cc: CC, consequent: GprMem, alternative: Gpr, dst: WritableGpr, }, XmmCmove { ty: Type, cc: CC, consequent: XmmMem, alternative: Xmm, dst: WritableXmm, }, Push64 { src: GprMemImm, }, Pop64 { dst: WritableGpr, }, StackProbeLoop { tmp: Writable<Reg>, frame_size: u32, guard_size: u32, }, XmmRmR { op: SseOpcode, src1: Xmm, src2: XmmMem, dst: WritableXmm, }, XmmRmRBlend { op: SseOpcode, src1: Xmm, src2: XmmMem, mask: Xmm, dst: WritableXmm, }, XmmRmRVex { op: AvxOpcode, src1: Xmm, src2: Xmm, src3: XmmMem, dst: WritableXmm, }, XmmRmREvex { op: Avx512Opcode, src1: XmmMem, src2: Xmm, dst: WritableXmm, }, XmmRmREvex3 { op: Avx512Opcode, src1: XmmMem, src2: Xmm, src3: Xmm, dst: WritableXmm, }, XmmUnaryRmR { op: SseOpcode, src: XmmMem, dst: WritableXmm, }, XmmUnaryRmRImm { op: SseOpcode, src: XmmMem, imm: u8, dst: WritableXmm, }, XmmUnaryRmREvex { op: Avx512Opcode, src: XmmMem, dst: WritableXmm, }, XmmMovRM { op: SseOpcode, src: Reg, dst: SyntheticAmode, }, XmmToGpr { op: SseOpcode, src: Xmm, dst: WritableGpr, dst_size: OperandSize, }, GprToXmm { op: SseOpcode, src: GprMem, dst: WritableXmm, src_size: OperandSize, }, CvtUint64ToFloatSeq { dst_size: OperandSize, src: Gpr, dst: WritableXmm, tmp_gpr1: WritableGpr, tmp_gpr2: WritableGpr, }, CvtFloatToSintSeq { dst_size: OperandSize, src_size: OperandSize, is_saturating: bool, src: Xmm, dst: WritableGpr, tmp_gpr: WritableGpr, tmp_xmm: WritableXmm, }, CvtFloatToUintSeq { dst_size: OperandSize, src_size: OperandSize, is_saturating: bool, src: Xmm, dst: WritableGpr, tmp_gpr: WritableGpr, tmp_xmm: WritableXmm, tmp_xmm2: WritableXmm, }, XmmMinMaxSeq { size: OperandSize, is_min: bool, lhs: Xmm, rhs: Xmm, dst: WritableXmm, }, XmmCmpRmR { op: SseOpcode, src: XmmMem, dst: Xmm, }, XmmRmRImm { op: SseOpcode, src1: Reg, src2: RegMem, dst: Writable<Reg>, imm: u8, size: OperandSize, }, CallKnown { dest: ExternalName, info: Box<CallInfo>, }, CallUnknown { dest: RegMem, info: Box<CallInfo>, }, Args { args: Vec<ArgPair>, }, Ret { rets: Vec<RetPair>, }, 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<SmallVec<[MachLabel; 4]>>, }, 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, }, LockCmpxchg { ty: Type, replacement: Reg, expected: Reg, mem: SyntheticAmode, dst_old: Writable<Reg>, }, AtomicRmwSeq { ty: Type, op: MachAtomicRmwOp, mem: SyntheticAmode, operand: Reg, temp: Writable<Reg>, dst_old: Writable<Reg>, }, Fence { kind: FenceKind, }, VirtualSPOffsetAdj { offset: i64, }, XmmUninitializedValue { dst: WritableXmm, }, ElfTlsGetAddr { symbol: ExternalName, dst: WritableGpr, }, MachOTlsGetAddr { symbol: ExternalName, dst: WritableGpr, }, CoffTlsGetAddr { symbol: ExternalName, dst: WritableGpr, tmp: WritableGpr, }, Unwind { inst: UnwindInst, }, DummyUse { reg: Reg, },
}
Expand description

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

Variants§

§

Nop

Fields

§len: u8
§

AluRmiR

Fields

§src1: Gpr
§

AluRM

Fields

§src1_dst: SyntheticAmode
§src2: Gpr
§

AluRmRVex

Fields

§src1: Gpr
§src2: Gpr
§

UnaryRmR

§

Not

Fields

§src: Gpr
§

Neg

Fields

§src: Gpr
§

Div

Fields

§signed: bool
§divisor: GprMem
§dividend_lo: Gpr
§dividend_hi: Gpr
§dst_quotient: WritableGpr
§dst_remainder: WritableGpr
§

MulHi

Fields

§signed: bool
§src1: Gpr
§src2: GprMem
§dst_lo: WritableGpr
§dst_hi: WritableGpr
§

CheckedDivOrRemSeq

Fields

§dividend_lo: Gpr
§dividend_hi: Gpr
§divisor: Gpr
§dst_quotient: WritableGpr
§dst_remainder: WritableGpr
§

SignExtendData

Fields

§src: Gpr
§

Imm

Fields

§dst_size: OperandSize
§simm64: u64
§

MovRR

Fields

§src: Gpr
§

MovFromPReg

Fields

§src: PReg
§

MovToPReg

Fields

§src: Gpr
§dst: PReg
§

MovzxRmR

Fields

§ext_mode: ExtMode
§src: GprMem
§

Mov64MR

§

LoadEffectiveAddress

§

MovsxRmR

Fields

§ext_mode: ExtMode
§src: GprMem
§

MovImmM

Fields

§simm64: u64
§

MovRM

Fields

§src: Gpr
§

ShiftR

Fields

§src: Gpr
§num_bits: Imm8Gpr
§

XmmRmiReg

Fields

§opcode: SseOpcode
§src1: Xmm
§

CmpRmiR

Fields

§opcode: CmpOpcode
§dst: Gpr
§

Setcc

Fields

§cc: CC
§

Bswap

Fields

§src: Gpr
§

Cmove

Fields

§cc: CC
§consequent: GprMem
§alternative: Gpr
§

XmmCmove

Fields

§ty: Type
§cc: CC
§consequent: XmmMem
§alternative: Xmm
§

Push64

Fields

§

Pop64

Fields

§

StackProbeLoop

Fields

§frame_size: u32
§guard_size: u32
§

XmmRmR

Fields

§src1: Xmm
§src2: XmmMem
§

XmmRmRBlend

Fields

§src1: Xmm
§src2: XmmMem
§mask: Xmm
§

XmmRmRVex

Fields

§src1: Xmm
§src2: Xmm
§src3: XmmMem
§

XmmRmREvex

Fields

§src1: XmmMem
§src2: Xmm
§

XmmRmREvex3

Fields

§src1: XmmMem
§src2: Xmm
§src3: Xmm
§

XmmUnaryRmR

Fields

§src: XmmMem
§

XmmUnaryRmRImm

Fields

§src: XmmMem
§imm: u8
§

XmmUnaryRmREvex

§

XmmMovRM

Fields

§src: Reg
§

XmmToGpr

Fields

§src: Xmm
§dst_size: OperandSize
§

GprToXmm

Fields

§src: GprMem
§src_size: OperandSize
§

CvtUint64ToFloatSeq

Fields

§dst_size: OperandSize
§src: Gpr
§tmp_gpr1: WritableGpr
§tmp_gpr2: WritableGpr
§

CvtFloatToSintSeq

Fields

§dst_size: OperandSize
§src_size: OperandSize
§is_saturating: bool
§src: Xmm
§tmp_gpr: WritableGpr
§tmp_xmm: WritableXmm
§

CvtFloatToUintSeq

Fields

§dst_size: OperandSize
§src_size: OperandSize
§is_saturating: bool
§src: Xmm
§tmp_gpr: WritableGpr
§tmp_xmm: WritableXmm
§tmp_xmm2: WritableXmm
§

XmmMinMaxSeq

Fields

§is_min: bool
§lhs: Xmm
§rhs: Xmm
§

XmmCmpRmR

Fields

§src: XmmMem
§dst: Xmm
§

XmmRmRImm

Fields

§src1: Reg
§src2: RegMem
§imm: u8
§

CallKnown

Fields

§info: Box<CallInfo>
§

CallUnknown

Fields

§dest: RegMem
§info: Box<CallInfo>
§

Args

Fields

§args: Vec<ArgPair>
§

Ret

Fields

§rets: Vec<RetPair>
§

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<SmallVec<[MachLabel; 4]>>
§

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

§offset: i64
§

LockCmpxchg

Fields

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

AtomicRmwSeq

Fields

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

Fence

Fields

§

VirtualSPOffsetAdj

Fields

§offset: i64
§

XmmUninitializedValue

Fields

§

ElfTlsGetAddr

Fields

§

MachOTlsGetAddr

Fields

§

CoffTlsGetAddr

Fields

§

Unwind

Fields

§

DummyUse

Fields

§reg: Reg

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
The ABI machine spec for this MachInst.
Return the registers referenced by this machine instruction along with the modes of reference (use, def, modify). Read more
If this is a simple move, return the (source, destination) tuple of registers.
Should this instruction be included in the clobber-set?
Is this an unconditional trap?
Is this an “args” pseudoinst?
Is this a terminator (branch or ret)? If so, return its type (ret/uncond/cond) and target if applicable. Read more
Generate a move.
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. Read more
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
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. Read more
Generate a jump to another target. Used during lowering of control flow. Read more
Generate a dummy instruction that will keep a value alive but has no other purpose. Read more
What is the worst-case instruction size emitted by this instruction type?
What is the register class used for reference types (GC-observable pointers)? Can be dependent on compilation flags. Read more
Is this a safepoint?
A label-use kind: a type that describes the types of label references that can occur in an instruction. Read more
Align a basic block offset (from start of function). By default, no alignment occurs. Read more
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. Read more
Persistent state carried across emit invocations.
Constant information used in emit invocations.
Emit the instruction.
Pretty-print the instruction.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.