pub enum Inst {
Show 80 variants
Mov {
w: Width,
dst: Op,
src: Op,
patch: bool,
},
Bind(Lbl),
MovZero32 {
dst: Op,
src: Op,
},
Bswap {
w: Width,
dst: Op,
src: Op,
},
Load {
w: Width,
sx: Sx,
dst: Gpr,
addr: Mem,
acquire: bool,
},
Store {
w: Width,
src: Op,
addr: Mem,
},
LoadF {
k: FKind,
dst: Fpr,
addr: Mem,
},
StoreF {
k: FKind,
src: Fpr,
addr: Mem,
},
FMov {
k: FKind,
dst: Fpr,
src: Fpr,
},
LoadV {
dst: Fpr,
addr: Mem,
},
StoreV {
src: Fpr,
addr: Mem,
},
VMov {
dst: Fpr,
src: Fpr,
},
Lea {
w: Width,
dst: Gpr,
src: LeaSrc,
},
Push {
op: Op,
},
Pop {
op: Op,
},
PushV {
src: Fpr,
},
PopV {
dst: Fpr,
},
Peek {
disp: i32,
dst: Gpr,
},
Poke {
disp: i32,
src: Gpr,
},
Add {
w: Width,
op: Alu3,
},
Sub {
w: Width,
op: Alu3,
},
Mul {
w: Width,
op: Alu3,
},
And {
w: Width,
op: Alu3,
},
Or {
w: Width,
op: Alu3,
},
Xor {
w: Width,
op: Alu3,
},
Not {
w: Width,
dst: Op,
},
Neg {
w: Width,
dst: Op,
},
Shift {
w: Width,
op: ShiftOp,
dst: Gpr,
cnt: ShiftCnt,
},
MulImm {
w: Width,
dst: Gpr,
lhs: Gpr,
imm: i64,
},
AluS {
op: AluOp,
w: Width,
alu: Alu3,
},
Adc {
dst: Op,
src: Op,
},
Sbb {
dst: Op,
src: Op,
},
MulWide {
signed: bool,
dst: Gpr,
lhs: Gpr,
rhs: Gpr,
},
MulHigh {
signed: bool,
rhs: Op,
},
DivMod1 {
signed: bool,
w: Width,
divisor: Op,
},
Div3 {
signed: bool,
w: Width,
dst: Gpr,
dvd: Op,
dvs: Op,
},
Rem3 {
signed: bool,
w: Width,
dst: Gpr,
dvd: Op,
dvs: Op,
},
Extend {
from: Width,
to: Width,
sx: Sx,
dst: Gpr,
src: Op,
},
Ctz {
w: Width,
dst: Gpr,
src: Op,
},
Clz {
w: Width,
dst: Gpr,
src: Op,
},
Popcnt {
w: Width,
dst: Gpr,
src: Op,
},
Cqo {
quad: bool,
},
AddShifted {
dst: Gpr,
lhs: Gpr,
rhs: Gpr,
amount: u8,
},
Cmov {
w: Width,
zero: bool,
dst: Gpr,
src: Op,
test: Gpr,
},
VecExtract {
w: Width,
dst: Gpr,
src: Fpr,
lane: u8,
},
Branch {
cc: IntCc,
w: Width,
lhs: Op,
rhs: Op,
target: Lbl,
patch: bool,
},
TestBranch {
w: Width,
value: Op,
mask: Option<Op>,
test: TestKind,
target: Lbl,
patch: bool,
},
OpBranch {
op: FlagAlu,
w: Width,
flag: PredFlag,
args: BranchArgs,
target: Lbl,
patch: bool,
},
FlagBranch {
flag: PredFlag,
target: Lbl,
patch: bool,
},
Jump {
target: Target,
patch: bool,
},
Call {
target: Target,
patch: bool,
},
Ret,
Break,
Nop,
IntSet {
cc: IntCc,
w: Width,
dst: Op,
lhs: Op,
rhs: Op,
},
TestSet {
w: Width,
value: Op,
mask: Option<Op>,
test: TestKind,
dst: Op,
},
FArith {
op: FAlu,
k: FKind,
arith: FArith3,
},
Fma {
op: FmaOp,
k: FKind,
a: Op,
b: Op,
c: Op,
dst: Fpr,
},
FSqrt {
k: FKind,
dst: Fpr,
src: Op,
},
FRound {
k: FKind,
mode: RoundMode,
dst: Fpr,
src: Op,
},
FAbs {
k: FKind,
dst: Fpr,
src: Op,
},
FNeg {
k: FKind,
dst: Fpr,
src: Op,
},
FBit {
or: bool,
k: FKind,
dst: Fpr,
src: Op,
},
CvtFI {
k: FKind,
w: Width,
dst: Gpr,
src: Op,
},
CvtIF {
signed: bool,
from: Width,
k: FKind,
dst: Fpr,
src: Op,
},
CvtFF {
from: FKind,
to: FKind,
dst: Fpr,
src: Op,
},
Bitcast {
dir: BitcastDir,
dst: Op,
src: Op,
},
BranchF {
cc: FCc,
k: FKind,
lhs: Op,
rhs: Op,
target: Lbl,
patch: bool,
},
FSet {
cc: FCc,
k: FKind,
dst: Op,
lhs: Op,
rhs: Op,
},
Fence {
full: bool,
},
Pause,
TlsLoad {
w: Width,
dst: Gpr,
idx: i64,
},
TlsStore {
w: Width,
src: Gpr,
idx: i64,
},
TlsLea {
dst: Gpr,
idx: i64,
},
AtomicRmw {
op: AtomicOp,
w: Width,
a: Op,
b: Op,
},
AtomicCas {
w: Width,
mem: Mem,
src: Gpr,
branch: Option<Lbl>,
},
LoadLinked {
w: Width,
mem: Mem,
dst: Gpr,
},
StoreCond {
w: Width,
status: Gpr,
src: Gpr,
mem: Mem,
},
PairLoad {
w: PairW,
dst1: Op,
dst2: Op,
mem: Mem,
},
PairStore {
w: PairW,
src1: Op,
src2: Op,
mem: Mem,
},
}Variants§
Mov
Bind(Lbl)
MovZero32
Bswap
Load
Store
LoadF
StoreF
FMov
LoadV
StoreV
VMov
Lea
Push
Pop
PushV
PopV
Peek
Poke
Add
Sub
Mul
And
Or
Xor
Not
Neg
Shift
MulImm
AluS
Adc
Sbb
MulWide
MulHigh
DivMod1
Div3
Rem3
Extend
Ctz
Clz
Popcnt
Cqo
AddShifted
Cmov
VecExtract
Branch
TestBranch
OpBranch
FlagBranch
Jump
Call
Ret
Break
Traps. break lowers to int3, brk, or ebreak.
Nop
IntSet
Compares integers and writes 0 or 1 to dst.
TestSet
Tests a value and writes 0 or 1 to dst.
FArith
Runs scalar float arithmetic such as addf through divd.
Fma
Runs a fused multiply-add. dst is op(a, b, c).
FSqrt
FRound
FAbs
FNeg
FBit
Runs bitwise logic on float bits.
CvtFI
Truncates a float to an integer when the value is in range.
Out-of-range results are the backend’s native saturate value.
CvtIF
Converts an integer to a float exactly.
CvtFF
Narrows or widens a float.
Bitcast
Reinterprets bits between integer and float.
BranchF
Compares floats and branches on the result.
FSet
Compares floats and writes 0 or 1.
Fence
Orders memory. memfence is a full barrier and fence is inner-shareable.
Pause
Hints a spin loop. Emits PAUSE on x86 and RISC-V, YIELD on AArch64.
TlsLoad
Loads a thread-local slot into a register.
Slots are 8 bytes wide. Sub-word widths zero-extend, matching
loadb/loadh/loadi.
TlsStore
Stores a register into a thread-local slot.
Only the low w bytes are written; the rest of the slot is
preserved.
TlsLea
Materializes the address of a thread-local slot.
AtomicRmw
Runs an atomic read-modify-write.
AtomicCas
Compares and swaps atomically. The expected value lives in t0.
branch holds the batomicweakcas* target when present.
LoadLinked
Loads linked for a later store-conditional.
StoreCond
Stores conditionally. Writes 0 or 1 to status.
PairLoad
Loads a pair of values from one address.
PairStore
Stores a pair of values to one address.