pub enum CilInstr {
Show 92 variants
Nop,
LdlocS(u16),
StlocS(u16),
LdlocaS(u16),
LdargS(u16),
StargS(u16),
LdargaS(u16),
LdcI4(i32),
LdcI4S(i8),
LdcI4Small(i32),
LdcI8(i64),
LdcR4(f32),
LdcR8(f64),
Ldnull,
Ldstr(String),
Ldsflda(CilFieldRef),
Ldsfld(CilFieldRef),
Stsfld(CilFieldRef),
Add,
AddOvf,
Sub,
SubOvf,
Mul,
MulOvf,
Div,
DivUn,
Rem,
RemUn,
Neg,
And,
Or,
Xor,
Not,
Shl,
Shr,
ShrUn,
Ceq,
Cgt,
CgtUn,
Clt,
CltUn,
Br(String),
Brfalse(String),
Brtrue(String),
Beq(String),
BneUn(String),
Blt(String),
Bgt(String),
Ble(String),
Bge(String),
Switch(Vec<String>),
Ret,
Throw,
Rethrow,
Label(String),
Call(CilMethodRef),
Callvirt(CilMethodRef),
TailCall(CilMethodRef),
Calli(CilCallSig),
Ldftn(CilMethodRef),
Ldvirtftn(CilMethodRef),
Newobj(CilMethodRef),
Ldobj(CilType),
Stobj(CilType),
Ldfld(CilFieldRef),
Stfld(CilFieldRef),
Ldflda(CilFieldRef),
Box_(CilType),
Unbox(CilType),
UnboxAny(CilType),
Isinst(CilType),
Castclass(CilType),
Initobj(CilType),
Sizeof(CilType),
Ldtoken(CilType),
Newarr(CilType),
Ldlen,
Ldelem(CilType),
Stelem(CilType),
Ldelema(CilType),
Dup,
Pop,
ConvI4,
ConvI8,
ConvR4,
ConvR8,
ConvU4,
ConvU8,
LdindI4,
StindI4,
Localloc,
Comment(String),
}Expand description
CIL instruction set.
Covers the major opcodes from ECMA-335 Partition III.
Variants§
Nop
nop — no operation
LdlocS(u16)
ldloc.s <idx> — load local variable
StlocS(u16)
stloc.s <idx> — store local variable
LdlocaS(u16)
ldloca.s <idx> — load address of local
LdargS(u16)
ldarg.s <idx> — load argument
StargS(u16)
starg.s <idx> — store argument
LdargaS(u16)
ldarga.s <idx> — load argument address
LdcI4(i32)
ldc.i4 <val> — load int32 constant
LdcI4S(i8)
ldc.i4.s <val> — load int32 constant (short form, -128..127)
LdcI4Small(i32)
ldc.i4.N — load small int32 (N = 0..8)
LdcI8(i64)
ldc.i8 <val> — load int64 constant
LdcR4(f32)
ldc.r4 <val> — load float32 constant
LdcR8(f64)
ldc.r8 <val> — load float64 constant
Ldnull
ldnull — load null reference
Ldstr(String)
ldstr <s> — load string literal
Ldsflda(CilFieldRef)
ldsflda <field> — load address of static field
Ldsfld(CilFieldRef)
ldsfld <field> — load static field value
Stsfld(CilFieldRef)
stsfld <field> — store static field value
Add
add
AddOvf
add.ovf — checked addition
Sub
sub
SubOvf
sub.ovf — checked subtraction
Mul
mul
MulOvf
mul.ovf — checked multiplication
Div
div
DivUn
div.un — unsigned division
Rem
rem
RemUn
rem.un — unsigned remainder
Neg
neg — negate
And
and
Or
or
Xor
xor
Not
not
Shl
shl — shift left
Shr
shr — shift right (signed)
ShrUn
shr.un — shift right (unsigned)
Ceq
ceq — compare equal (push 1 or 0)
Cgt
cgt
CgtUn
cgt.un
Clt
clt
CltUn
clt.un
Br(String)
br <label>
Brfalse(String)
brfalse <label>
Brtrue(String)
brtrue <label>
Beq(String)
beq <label>
BneUn(String)
bne.un <label>
Blt(String)
blt <label>
Bgt(String)
bgt <label>
Ble(String)
ble <label>
Bge(String)
bge <label>
Switch(Vec<String>)
switch <labels...>
Ret
ret
Throw
throw
Rethrow
rethrow
Label(String)
A label definition point
Call(CilMethodRef)
call <method>
Callvirt(CilMethodRef)
callvirt <method>
TailCall(CilMethodRef)
tail. call <method>
Calli(CilCallSig)
calli <signature>
Ldftn(CilMethodRef)
ldftn <method>
Ldvirtftn(CilMethodRef)
ldvirtftn <method>
Newobj(CilMethodRef)
newobj <ctor>
Ldobj(CilType)
ldobj <type>
Stobj(CilType)
stobj <type>
Ldfld(CilFieldRef)
ldfld <field>
Stfld(CilFieldRef)
stfld <field>
Ldflda(CilFieldRef)
ldflda <field>
Box_(CilType)
box <type>
Unbox(CilType)
unbox <type>
UnboxAny(CilType)
unbox.any <type>
Isinst(CilType)
isinst <type>
Castclass(CilType)
castclass <type>
Initobj(CilType)
initobj <type>
Sizeof(CilType)
sizeof <type>
Ldtoken(CilType)
ldtoken <type>
Newarr(CilType)
newarr <type>
Ldlen
ldlen
Ldelem(CilType)
ldelem <type>
Stelem(CilType)
stelem <type>
Ldelema(CilType)
ldelema <type>
Dup
dup
Pop
pop
ConvI4
conv.i4
ConvI8
conv.i8
ConvR4
conv.r4
ConvR8
conv.r8
ConvU4
conv.u4
ConvU8
conv.u8
LdindI4
ldind.i4
StindI4
stind.i4
Localloc
localloc
Comment(String)
Comment (for IL dump readability)