Skip to content

Opcodes

Find an instruction’s stack effect, behavior, and operand below. F1 shows the same help in the terminal. The stack column reads pops then pushes, using the abbreviations ILAsm uses: i for int32 or native int, i8 for int64, r4 and r8 for floats, ref for an object reference, 1 for any single value, and … when the count depends on the operand.

Opcode Stack Operand
add 1 1 → 1 none
add.ovf 1 1 → 1 none
add.ovf.un 1 1 → 1 none
and 1 1 → 1 none
arglist → i none
beq 1 1 → label
beq.s 1 1 → label
bge 1 1 → label
bge.s 1 1 → label
bge.un 1 1 → label
bge.un.s 1 1 → label
bgt 1 1 → label
bgt.s 1 1 → label
bgt.un 1 1 → label
bgt.un.s 1 1 → label
ble 1 1 → label
ble.s 1 1 → label
ble.un 1 1 → label
ble.un.s 1 1 → label
blt 1 1 → label
blt.s 1 1 → label
blt.un 1 1 → label
blt.un.s 1 1 → label
bne.un 1 1 → label
bne.un.s 1 1 → label
box 1 → ref type
br → label
br.s → label
break → none
brfalse i → label
brfalse.s i → label
brtrue i → label
brtrue.s i → label
call … → … method
calli … → … signature
callvirt … → … method
castclass ref → ref type
ceq 1 1 → i none
cgt 1 1 → i none
cgt.un 1 1 → i none
ckfinite 1 → r8 none
clt 1 1 → i none
clt.un 1 1 → i none
constrained. → type
conv.i 1 → i none
conv.i1 1 → i none
conv.i2 1 → i none
conv.i4 1 → i none
conv.i8 1 → i8 none
conv.ovf.i 1 → i none
conv.ovf.i.un 1 → i none
conv.ovf.i1 1 → i none
conv.ovf.i1.un 1 → i none
conv.ovf.i2 1 → i none
conv.ovf.i2.un 1 → i none
conv.ovf.i4 1 → i none
conv.ovf.i4.un 1 → i none
conv.ovf.i8 1 → i8 none
conv.ovf.i8.un 1 → i8 none
conv.ovf.u 1 → i none
conv.ovf.u.un 1 → i none
conv.ovf.u1 1 → i none
conv.ovf.u1.un 1 → i none
conv.ovf.u2 1 → i none
conv.ovf.u2.un 1 → i none
conv.ovf.u4 1 → i none
conv.ovf.u4.un 1 → i none
conv.ovf.u8 1 → i8 none
conv.ovf.u8.un 1 → i8 none
conv.r.un 1 → r8 none
conv.r4 1 → r4 none
conv.r8 1 → r8 none
conv.u 1 → i none
conv.u1 1 → i none
conv.u2 1 → i none
conv.u4 1 → i none
conv.u8 1 → i8 none
cpblk i i i → none
cpobj i i → type
div 1 1 → 1 none
div.un 1 1 → 1 none
dup 1 → 1 1 none
endfilter i → none
endfinally → none
initblk i i i → none
initobj i → type
isinst ref → i type
jmp → method
ldarg → 1 local or argument
ldarg.0 → 1 none
ldarg.1 → 1 none
ldarg.2 → 1 none
ldarg.3 → 1 none
ldarg.s → 1 local or argument
ldarga → i local or argument
ldarga.s → i local or argument
ldc.i4 → i int32
ldc.i4.0 → i none
ldc.i4.1 → i none
ldc.i4.2 → i none
ldc.i4.3 → i none
ldc.i4.4 → i none
ldc.i4.5 → i none
ldc.i4.6 → i none
ldc.i4.7 → i none
ldc.i4.8 → i none
ldc.i4.m1 → i none
ldc.i4.s → i int8
ldc.i8 → i8 int64
ldc.r4 → r4 float32
ldc.r8 → r8 float64
ldelem ref i → 1 type
ldelem.i ref i → i none
ldelem.i1 ref i → i none
ldelem.i2 ref i → i none
ldelem.i4 ref i → i none
ldelem.i8 ref i → i8 none
ldelem.r4 ref i → r4 none
ldelem.r8 ref i → r8 none
ldelem.ref ref i → ref none
ldelem.u1 ref i → i none
ldelem.u2 ref i → i none
ldelem.u4 ref i → i none
ldelema ref i → i type
ldfld ref → 1 field
ldflda ref → i field
ldftn → i method
ldind.i i → i none
ldind.i1 i → i none
ldind.i2 i → i none
ldind.i4 i → i none
ldind.i8 i → i8 none
ldind.r4 i → r4 none
ldind.r8 i → r8 none
ldind.ref i → ref none
ldind.u1 i → i none
ldind.u2 i → i none
ldind.u4 i → i none
ldlen ref → i none
ldloc → 1 local or argument
ldloc.0 → 1 none
ldloc.1 → 1 none
ldloc.2 → 1 none
ldloc.3 → 1 none
ldloc.s → 1 local or argument
ldloca → i local or argument
ldloca.s → i local or argument
ldnull → ref none
ldobj i → 1 type
ldsfld → 1 field
ldsflda → i field
ldstr → ref string
ldtoken → i token
ldvirtftn ref → i method
leave → label
leave.s → label
localloc i → i none
mkrefany i → 1 type
mul 1 1 → 1 none
mul.ovf 1 1 → 1 none
mul.ovf.un 1 1 → 1 none
neg 1 → 1 none
newarr i → ref type
newobj … → ref method
no. → mask
nop → none
not 1 → 1 none
or 1 1 → 1 none
pop 1 → none
readonly. → none
refanytype 1 → i none
refanyval 1 → i type
rem 1 1 → 1 none
rem.un 1 1 → 1 none
ret … → none
rethrow → none
shl 1 1 → 1 none
shr 1 1 → 1 none
shr.un 1 1 → 1 none
sizeof → i type
starg 1 → local or argument
starg.s 1 → local or argument
stelem ref i 1 → type
stelem.i ref i i → none
stelem.i1 ref i i → none
stelem.i2 ref i i → none
stelem.i4 ref i i → none
stelem.i8 ref i i8 → none
stelem.r4 ref i r4 → none
stelem.r8 ref i r8 → none
stelem.ref ref i ref → none
stfld ref 1 → field
stind.i i i → none
stind.i1 i i → none
stind.i2 i i → none
stind.i4 i i → none
stind.i8 i i8 → none
stind.r4 i r4 → none
stind.r8 i r8 → none
stind.ref i i → none
stloc 1 → local or argument
stloc.0 1 → none
stloc.1 1 → none
stloc.2 1 → none
stloc.3 1 → none
stloc.s 1 → local or argument
stobj i 1 → type
stsfld 1 → field
sub 1 1 → 1 none
sub.ovf 1 1 → 1 none
sub.ovf.un 1 1 → 1 none
switch i → labels
tail. → none
throw ref → none
unaligned. → int8
unbox ref → i type
unbox.any ref → 1 type
volatile. → none
xor 1 1 → 1 none

add

add

Stack: 1 1 → 1

Adds the two operands. Integer overflow wraps; floating-point overflow produces infinity.

Microsoft reference

add.ovf

add.ovf

Stack: 1 1 → 1

Adds the two operands, throwing OverflowException if the integer result is out of range.

Operands and the result range are signed integers.

Microsoft reference

add.ovf.un

add.ovf.un

Stack: 1 1 → 1

Adds the two operands, throwing OverflowException if the integer result is out of range.

Operands and the result range are unsigned integers.

Microsoft reference

and

and

Stack: 1 1 → 1

Computes the bitwise AND of two integer operands.

Microsoft reference

arglist

arglist

Stack: → i

Pushes a handle to the current variable-argument list; the enclosing method must use vararg.

Microsoft reference

beq

beq label

Stack: 1 1 →

Branches when the operand below the top is equal to the top operand; otherwise falls through.

Integer ordering is signed. Floating-point comparisons involving NaN make the condition false.

Microsoft reference

beq.s

beq.s label

Stack: 1 1 →

Branches when the operand below the top is equal to the top operand; otherwise falls through.

The short form uses a smaller encoded operand; its operation is otherwise the same.

Integer ordering is signed. Floating-point comparisons involving NaN make the condition false.

Microsoft reference

bge

bge label

Stack: 1 1 →

Branches when the operand below the top is greater than or equal to the top operand; otherwise falls through.

Integer ordering is signed. Floating-point comparisons involving NaN make the condition false.

Microsoft reference

bge.s

bge.s label

Stack: 1 1 →

Branches when the operand below the top is greater than or equal to the top operand; otherwise falls through.

The short form uses a smaller encoded operand; its operation is otherwise the same.

Integer ordering is signed. Floating-point comparisons involving NaN make the condition false.

Microsoft reference

bge.un

bge.un label

Stack: 1 1 →

Branches when the operand below the top is greater than or equal to the top operand; otherwise falls through.

Integers are compared as unsigned. Floating-point unordered comparisons (NaN) make the condition true.

Microsoft reference

bge.un.s

bge.un.s label

Stack: 1 1 →

Branches when the operand below the top is greater than or equal to the top operand; otherwise falls through.

The short form uses a smaller encoded operand; its operation is otherwise the same.

Integers are compared as unsigned. Floating-point unordered comparisons (NaN) make the condition true.

Microsoft reference

bgt

bgt label

Stack: 1 1 →

Branches when the operand below the top is greater than the top operand; otherwise falls through.

Integer ordering is signed. Floating-point comparisons involving NaN make the condition false.

Microsoft reference

bgt.s

bgt.s label

Stack: 1 1 →

Branches when the operand below the top is greater than the top operand; otherwise falls through.

The short form uses a smaller encoded operand; its operation is otherwise the same.

Integer ordering is signed. Floating-point comparisons involving NaN make the condition false.

Microsoft reference

bgt.un

bgt.un label

Stack: 1 1 →

Branches when the operand below the top is greater than the top operand; otherwise falls through.

Integers are compared as unsigned. Floating-point unordered comparisons (NaN) make the condition true.

Microsoft reference

bgt.un.s

bgt.un.s label

Stack: 1 1 →

Branches when the operand below the top is greater than the top operand; otherwise falls through.

The short form uses a smaller encoded operand; its operation is otherwise the same.

Integers are compared as unsigned. Floating-point unordered comparisons (NaN) make the condition true.

Microsoft reference

ble

ble label

Stack: 1 1 →

Branches when the operand below the top is less than or equal to the top operand; otherwise falls through.

Integer ordering is signed. Floating-point comparisons involving NaN make the condition false.

Microsoft reference

ble.s

ble.s label

Stack: 1 1 →

Branches when the operand below the top is less than or equal to the top operand; otherwise falls through.

The short form uses a smaller encoded operand; its operation is otherwise the same.

Integer ordering is signed. Floating-point comparisons involving NaN make the condition false.

Microsoft reference

ble.un

ble.un label

Stack: 1 1 →

Branches when the operand below the top is less than or equal to the top operand; otherwise falls through.

Integers are compared as unsigned. Floating-point unordered comparisons (NaN) make the condition true.

Microsoft reference

ble.un.s

ble.un.s label

Stack: 1 1 →

Branches when the operand below the top is less than or equal to the top operand; otherwise falls through.

The short form uses a smaller encoded operand; its operation is otherwise the same.

Integers are compared as unsigned. Floating-point unordered comparisons (NaN) make the condition true.

Microsoft reference

blt

blt label

Stack: 1 1 →

Branches when the operand below the top is less than the top operand; otherwise falls through.

Integer ordering is signed. Floating-point comparisons involving NaN make the condition false.

Microsoft reference

blt.s

blt.s label

Stack: 1 1 →

Branches when the operand below the top is less than the top operand; otherwise falls through.

The short form uses a smaller encoded operand; its operation is otherwise the same.

Integer ordering is signed. Floating-point comparisons involving NaN make the condition false.

Microsoft reference

blt.un

blt.un label

Stack: 1 1 →

Branches when the operand below the top is less than the top operand; otherwise falls through.

Integers are compared as unsigned. Floating-point unordered comparisons (NaN) make the condition true.

Microsoft reference

blt.un.s

blt.un.s label

Stack: 1 1 →

Branches when the operand below the top is less than the top operand; otherwise falls through.

The short form uses a smaller encoded operand; its operation is otherwise the same.

Integers are compared as unsigned. Floating-point unordered comparisons (NaN) make the condition true.

Microsoft reference

bne.un

bne.un label

Stack: 1 1 →

Branches when the operand below the top is not equal to the top operand; otherwise falls through.

Integers are compared as unsigned. Floating-point unordered comparisons (NaN) make the condition true.

Microsoft reference

bne.un.s

bne.un.s label

Stack: 1 1 →

Branches when the operand below the top is not equal to the top operand; otherwise falls through.

The short form uses a smaller encoded operand; its operation is otherwise the same.

Integers are compared as unsigned. Floating-point unordered comparisons (NaN) make the condition true.

Microsoft reference

box

box type

Stack: 1 → ref

Converts a value to its boxed representation; non-nullable value types are copied into an object.

Nullable boxing produces null for no value, otherwise a boxed underlying value; generic behavior depends on the type.

A reference-type operand leaves the reference unchanged.

Microsoft reference

br

br label

Stack: →

Transfers control to the target label without consuming stack values.

Microsoft reference

br.s

br.s label

Stack: →

Transfers control to the target label without consuming stack values.

The short form uses a smaller encoded operand; its operation is otherwise the same.

Microsoft reference

break

break

Stack: →

Signals a breakpoint to the debugger; handling depends on the runtime and debugger.

Microsoft reference

brfalse

brfalse label

Stack: i →

Pops a condition and branches when it is zero or a null reference or pointer.

Microsoft reference

brfalse.s

brfalse.s label

Stack: i →

Pops a condition and branches when it is zero or a null reference or pointer.

The short form uses a smaller encoded operand; its operation is otherwise the same.

Microsoft reference

brtrue

brtrue label

Stack: i →

Pops a condition and branches when it is nonzero or a non-null reference or pointer.

Microsoft reference

brtrue.s

brtrue.s label

Stack: i →

Pops a condition and branches when it is nonzero or a non-null reference or pointer.

The short form uses a smaller encoded operand; its operation is otherwise the same.

Microsoft reference

call

call method

Stack: … → …

Invokes the method named by the operand directly, including an instance or virtual method’s implementation.

Push the receiver first when required, then arguments in signature order; a void return pushes nothing.

An instance call still needs a receiver; call does not itself provide callvirt’s null check.

Microsoft reference

calli

calli signature

Stack: … → …

Calls the function pointer on top of the stack using the supplied calling convention and signature.

Push the receiver first when required, then arguments in signature order; a void return pushes nothing.

Push the function pointer after the receiver and arguments. This operation is unverifiable.

Microsoft reference

callvirt

callvirt method

Stack: … → …

Calls an instance method, using the receiver’s runtime type for virtual or interface dispatch.

Push the receiver first when required, then arguments in signature order; a void return pushes nothing.

Nonvirtual instance methods are also allowed. An ordinary null object receiver throws NullReferenceException.

Microsoft reference

castclass

castclass type

Stack: ref → ref

Checks an object reference against a type, throwing InvalidCastException when incompatible; null stays null.

Microsoft reference

ceq

ceq

Stack: 1 1 → i

Pushes int32 1 when the operand below the top is equal to the top operand; otherwise pushes int32 0.

Integer ordering is signed. Floating-point comparisons involving NaN make the condition false.

Microsoft reference

cgt

cgt

Stack: 1 1 → i

Pushes int32 1 when the operand below the top is greater than the top operand; otherwise pushes int32 0.

Integer ordering is signed. Floating-point comparisons involving NaN make the condition false.

Microsoft reference

cgt.un

cgt.un

Stack: 1 1 → i

Pushes int32 1 when the operand below the top is greater than the top operand; otherwise pushes int32 0.

Integers are compared as unsigned. Floating-point unordered comparisons (NaN) make the condition true.

Object references also support the non-null test against null.

Microsoft reference

ckfinite

ckfinite

Stack: 1 → r8

Checks a floating-point value and throws ArithmeticException for NaN or infinity.

Microsoft reference

clt

clt

Stack: 1 1 → i

Pushes int32 1 when the operand below the top is less than the top operand; otherwise pushes int32 0.

Integer ordering is signed. Floating-point comparisons involving NaN make the condition false.

Microsoft reference

clt.un

clt.un

Stack: 1 1 → i

Pushes int32 1 when the operand below the top is less than the top operand; otherwise pushes int32 0.

Integers are compared as unsigned. Floating-point unordered comparisons (NaN) make the condition true.

Microsoft reference

constrained.

constrained. type

Stack: →

Adapts the following callvirt to a type, or resolves a static virtual interface call or ldftn.

For callvirt, the receiver is a managed pointer to the constrained type; boxing occurs only when required.

For call or ldftn, the target must be a static virtual interface method implemented by the constrained type.

Prefixes attach to the following instruction. Branches must target the first prefix, not the middle of the sequence.

Microsoft reference

conv.i

conv.i

Stack: 1 → i

Converts the top value to native int without an overflow check.

The destination type controls the result; integer sources are interpreted as signed for overflow checks.

Small integers occupy int32 stack slots. Native integers have the current runtime’s pointer width.

Microsoft reference

conv.i1

conv.i1

Stack: 1 → i

Converts the top value to int8 without an overflow check.

The destination type controls the result; integer sources are interpreted as signed for overflow checks.

Small integers occupy int32 stack slots. Native integers have the current runtime’s pointer width.

Microsoft reference

conv.i2

conv.i2

Stack: 1 → i

Converts the top value to int16 without an overflow check.

The destination type controls the result; integer sources are interpreted as signed for overflow checks.

Small integers occupy int32 stack slots. Native integers have the current runtime’s pointer width.

Microsoft reference

conv.i4

conv.i4

Stack: 1 → i

Converts the top value to int32 without an overflow check.

The destination type controls the result; integer sources are interpreted as signed for overflow checks.

Small integers occupy int32 stack slots. Native integers have the current runtime’s pointer width.

Microsoft reference

conv.i8

conv.i8

Stack: 1 → i8

Converts the top value to int64 without an overflow check.

The destination type controls the result; integer sources are interpreted as signed for overflow checks.

Small integers occupy int32 stack slots. Native integers have the current runtime’s pointer width.

Microsoft reference

conv.ovf.i

conv.ovf.i

Stack: 1 → i

Converts the top value to native int, throwing OverflowException if it cannot be represented.

The destination type controls the result; integer sources are interpreted as signed for overflow checks.

Floating-point sources truncate toward zero; .un does not change their interpretation.

Small integers occupy int32 stack slots. Native integers have the current runtime’s pointer width.

Microsoft reference

conv.ovf.i.un

conv.ovf.i.un

Stack: 1 → i

Converts the top value to native int, throwing OverflowException if it cannot be represented.

The source integer is interpreted as unsigned; the destination type is specified separately.

Floating-point sources truncate toward zero; .un does not change their interpretation.

Small integers occupy int32 stack slots. Native integers have the current runtime’s pointer width.

Microsoft reference

conv.ovf.i1

conv.ovf.i1

Stack: 1 → i

Converts the top value to int8, throwing OverflowException if it cannot be represented.

The destination type controls the result; integer sources are interpreted as signed for overflow checks.

Floating-point sources truncate toward zero; .un does not change their interpretation.

Small integers occupy int32 stack slots. Native integers have the current runtime’s pointer width.

Microsoft reference

conv.ovf.i1.un

conv.ovf.i1.un

Stack: 1 → i

Converts the top value to int8, throwing OverflowException if it cannot be represented.

The source integer is interpreted as unsigned; the destination type is specified separately.

Floating-point sources truncate toward zero; .un does not change their interpretation.

Small integers occupy int32 stack slots. Native integers have the current runtime’s pointer width.

Microsoft reference

conv.ovf.i2

conv.ovf.i2

Stack: 1 → i

Converts the top value to int16, throwing OverflowException if it cannot be represented.

The destination type controls the result; integer sources are interpreted as signed for overflow checks.

Floating-point sources truncate toward zero; .un does not change their interpretation.

Small integers occupy int32 stack slots. Native integers have the current runtime’s pointer width.

Microsoft reference

conv.ovf.i2.un

conv.ovf.i2.un

Stack: 1 → i

Converts the top value to int16, throwing OverflowException if it cannot be represented.

The source integer is interpreted as unsigned; the destination type is specified separately.

Floating-point sources truncate toward zero; .un does not change their interpretation.

Small integers occupy int32 stack slots. Native integers have the current runtime’s pointer width.

Microsoft reference

conv.ovf.i4

conv.ovf.i4

Stack: 1 → i

Converts the top value to int32, throwing OverflowException if it cannot be represented.

The destination type controls the result; integer sources are interpreted as signed for overflow checks.

Floating-point sources truncate toward zero; .un does not change their interpretation.

Small integers occupy int32 stack slots. Native integers have the current runtime’s pointer width.

Microsoft reference

conv.ovf.i4.un

conv.ovf.i4.un

Stack: 1 → i

Converts the top value to int32, throwing OverflowException if it cannot be represented.

The source integer is interpreted as unsigned; the destination type is specified separately.

Floating-point sources truncate toward zero; .un does not change their interpretation.

Small integers occupy int32 stack slots. Native integers have the current runtime’s pointer width.

Microsoft reference

conv.ovf.i8

conv.ovf.i8

Stack: 1 → i8

Converts the top value to int64, throwing OverflowException if it cannot be represented.

The destination type controls the result; integer sources are interpreted as signed for overflow checks.

Floating-point sources truncate toward zero; .un does not change their interpretation.

Small integers occupy int32 stack slots. Native integers have the current runtime’s pointer width.

Microsoft reference

conv.ovf.i8.un

conv.ovf.i8.un

Stack: 1 → i8

Converts the top value to int64, throwing OverflowException if it cannot be represented.

The source integer is interpreted as unsigned; the destination type is specified separately.

Floating-point sources truncate toward zero; .un does not change their interpretation.

Small integers occupy int32 stack slots. Native integers have the current runtime’s pointer width.

Microsoft reference

conv.ovf.u

conv.ovf.u

Stack: 1 → i

Converts the top value to native uint, throwing OverflowException if it cannot be represented.

The destination type controls the result; integer sources are interpreted as signed for overflow checks.

Floating-point sources truncate toward zero; .un does not change their interpretation.

Small integers occupy int32 stack slots. Native integers have the current runtime’s pointer width.

Microsoft reference

conv.ovf.u.un

conv.ovf.u.un

Stack: 1 → i

Converts the top value to native uint, throwing OverflowException if it cannot be represented.

The source integer is interpreted as unsigned; the destination type is specified separately.

Floating-point sources truncate toward zero; .un does not change their interpretation.

Small integers occupy int32 stack slots. Native integers have the current runtime’s pointer width.

Microsoft reference

conv.ovf.u1

conv.ovf.u1

Stack: 1 → i

Converts the top value to uint8, throwing OverflowException if it cannot be represented.

The destination type controls the result; integer sources are interpreted as signed for overflow checks.

Floating-point sources truncate toward zero; .un does not change their interpretation.

Small integers occupy int32 stack slots. Native integers have the current runtime’s pointer width.

Microsoft reference

conv.ovf.u1.un

conv.ovf.u1.un

Stack: 1 → i

Converts the top value to uint8, throwing OverflowException if it cannot be represented.

The source integer is interpreted as unsigned; the destination type is specified separately.

Floating-point sources truncate toward zero; .un does not change their interpretation.

Small integers occupy int32 stack slots. Native integers have the current runtime’s pointer width.

Microsoft reference

conv.ovf.u2

conv.ovf.u2

Stack: 1 → i

Converts the top value to uint16, throwing OverflowException if it cannot be represented.

The destination type controls the result; integer sources are interpreted as signed for overflow checks.

Floating-point sources truncate toward zero; .un does not change their interpretation.

Small integers occupy int32 stack slots. Native integers have the current runtime’s pointer width.

Microsoft reference

conv.ovf.u2.un

conv.ovf.u2.un

Stack: 1 → i

Converts the top value to uint16, throwing OverflowException if it cannot be represented.

The source integer is interpreted as unsigned; the destination type is specified separately.

Floating-point sources truncate toward zero; .un does not change their interpretation.

Small integers occupy int32 stack slots. Native integers have the current runtime’s pointer width.

Microsoft reference

conv.ovf.u4

conv.ovf.u4

Stack: 1 → i

Converts the top value to uint32, throwing OverflowException if it cannot be represented.

The destination type controls the result; integer sources are interpreted as signed for overflow checks.

Floating-point sources truncate toward zero; .un does not change their interpretation.

Small integers occupy int32 stack slots. Native integers have the current runtime’s pointer width.

Microsoft reference

conv.ovf.u4.un

conv.ovf.u4.un

Stack: 1 → i

Converts the top value to uint32, throwing OverflowException if it cannot be represented.

The source integer is interpreted as unsigned; the destination type is specified separately.

Floating-point sources truncate toward zero; .un does not change their interpretation.

Small integers occupy int32 stack slots. Native integers have the current runtime’s pointer width.

Microsoft reference

conv.ovf.u8

conv.ovf.u8

Stack: 1 → i8

Converts the top value to uint64, throwing OverflowException if it cannot be represented.

The destination type controls the result; integer sources are interpreted as signed for overflow checks.

Floating-point sources truncate toward zero; .un does not change their interpretation.

Small integers occupy int32 stack slots. Native integers have the current runtime’s pointer width.

Microsoft reference

conv.ovf.u8.un

conv.ovf.u8.un

Stack: 1 → i8

Converts the top value to uint64, throwing OverflowException if it cannot be represented.

The source integer is interpreted as unsigned; the destination type is specified separately.

Floating-point sources truncate toward zero; .un does not change their interpretation.

Small integers occupy int32 stack slots. Native integers have the current runtime’s pointer width.

Microsoft reference

conv.r.un

conv.r.un

Stack: 1 → r8

Converts the top value to floating point without an overflow check.

The source integer is interpreted as unsigned; the destination type is specified separately.

Small integers occupy int32 stack slots. Native integers have the current runtime’s pointer width.

Microsoft reference

conv.r4

conv.r4

Stack: 1 → r4

Converts the top value to float32 without an overflow check.

The destination type controls the result; integer sources are interpreted as signed for overflow checks.

Small integers occupy int32 stack slots. Native integers have the current runtime’s pointer width.

Microsoft reference

conv.r8

conv.r8

Stack: 1 → r8

Converts the top value to float64 without an overflow check.

The destination type controls the result; integer sources are interpreted as signed for overflow checks.

Small integers occupy int32 stack slots. Native integers have the current runtime’s pointer width.

Microsoft reference

conv.u

conv.u

Stack: 1 → i

Converts the top value to native uint without an overflow check.

The destination type controls the result; integer sources are interpreted as signed for overflow checks.

Small integers occupy int32 stack slots. Native integers have the current runtime’s pointer width.

Microsoft reference

conv.u1

conv.u1

Stack: 1 → i

Converts the top value to uint8 without an overflow check.

The destination type controls the result; integer sources are interpreted as signed for overflow checks.

Small integers occupy int32 stack slots. Native integers have the current runtime’s pointer width.

Microsoft reference

conv.u2

conv.u2

Stack: 1 → i

Converts the top value to uint16 without an overflow check.

The destination type controls the result; integer sources are interpreted as signed for overflow checks.

Small integers occupy int32 stack slots. Native integers have the current runtime’s pointer width.

Microsoft reference

conv.u4

conv.u4

Stack: 1 → i

Converts the top value to uint32 without an overflow check.

The destination type controls the result; integer sources are interpreted as signed for overflow checks.

Small integers occupy int32 stack slots. Native integers have the current runtime’s pointer width.

Microsoft reference

conv.u8

conv.u8

Stack: 1 → i8

Converts the top value to uint64 without an overflow check.

The destination type controls the result; integer sources are interpreted as signed for overflow checks.

Small integers occupy int32 stack slots. Native integers have the current runtime’s pointer width.

Microsoft reference

cpblk

cpblk

Stack: i i i →

Copies a byte count from the source address to the destination address; overlapping ranges are unspecified.

Microsoft reference

cpobj

cpobj type

Stack: i i →

Copies the specified type’s value from the source pointer to the destination pointer below it.

Microsoft reference

div

div

Stack: 1 1 → 1

Divides the operand below the top by the top operand; integer division truncates toward zero.

Integer division by zero throws DivideByZeroException.

Floating-point division follows IEEE floating-point rules.

Microsoft reference

div.un

div.un

Stack: 1 1 → 1

Divides the operand below the top by the top operand, interpreting both integers as unsigned.

Integer division by zero throws DivideByZeroException.

Microsoft reference

dup

dup

Stack: 1 → 1 1

Duplicates the top stack value. Both copies retain the same original producer.

Microsoft reference

endfilter

endfilter

Stack: i →

Ends an exception filter; exactly one int32 result chooses rejection (0) or acceptance (1).

Microsoft reference

endfinally

endfinally

Stack: →

Ends a finally or fault handler and resumes the pending exception or leave operation.

Microsoft reference

initblk

initblk

Stack: i i i →

Fills a byte count at the destination address using the low byte of the supplied integer value.

Microsoft reference

initobj

initobj type

Stack: i →

Initializes the addressed storage to the type’s default value without calling a constructor.

Microsoft reference

isinst

isinst type

Stack: ref → i

Tests an object reference against a type, returning the reference on success or null on failure.

Microsoft reference

jmp

jmp method

Stack: →

Transfers directly to a method with a compatible signature, forwarding the current arguments.

Microsoft reference

ldarg

ldarg argument

Stack: → 1

Loads an argument onto the evaluation stack. In instance methods, argument 0 is this.

Microsoft reference

ldarg.0

ldarg.0

Stack: → 1

Loads an argument onto the evaluation stack. In instance methods, argument 0 is this.

Microsoft reference

ldarg.1

ldarg.1

Stack: → 1

Loads an argument onto the evaluation stack. In instance methods, argument 0 is this.

Microsoft reference

ldarg.2

ldarg.2

Stack: → 1

Loads an argument onto the evaluation stack. In instance methods, argument 0 is this.

Microsoft reference

ldarg.3

ldarg.3

Stack: → 1

Loads an argument onto the evaluation stack. In instance methods, argument 0 is this.

Microsoft reference

ldarg.s

ldarg.s argument

Stack: → 1

Loads an argument onto the evaluation stack. In instance methods, argument 0 is this.

The short form uses a smaller encoded operand; its operation is otherwise the same.

Microsoft reference

ldarga

ldarga argument

Stack: → i

Pushes a managed pointer to an argument, allowing access to the argument’s storage.

Microsoft reference

ldarga.s

ldarga.s argument

Stack: → i

Pushes a managed pointer to an argument, allowing access to the argument’s storage.

The short form uses a smaller encoded operand; its operation is otherwise the same.

Microsoft reference

ldc.i4

ldc.i4 value

Stack: → i

Pushes the encoded numeric constant onto the evaluation stack.

Microsoft reference

ldc.i4.0

ldc.i4.0

Stack: → i

Pushes the encoded numeric constant onto the evaluation stack.

Microsoft reference

ldc.i4.1

ldc.i4.1

Stack: → i

Pushes the encoded numeric constant onto the evaluation stack.

Microsoft reference

ldc.i4.2

ldc.i4.2

Stack: → i

Pushes the encoded numeric constant onto the evaluation stack.

Microsoft reference

ldc.i4.3

ldc.i4.3

Stack: → i

Pushes the encoded numeric constant onto the evaluation stack.

Microsoft reference

ldc.i4.4

ldc.i4.4

Stack: → i

Pushes the encoded numeric constant onto the evaluation stack.

Microsoft reference

ldc.i4.5

ldc.i4.5

Stack: → i

Pushes the encoded numeric constant onto the evaluation stack.

Microsoft reference

ldc.i4.6

ldc.i4.6

Stack: → i

Pushes the encoded numeric constant onto the evaluation stack.

Microsoft reference

ldc.i4.7

ldc.i4.7

Stack: → i

Pushes the encoded numeric constant onto the evaluation stack.

Microsoft reference

ldc.i4.8

ldc.i4.8

Stack: → i

Pushes the encoded numeric constant onto the evaluation stack.

Microsoft reference

ldc.i4.m1

ldc.i4.m1

Stack: → i

Pushes the encoded numeric constant onto the evaluation stack.

Microsoft reference

ldc.i4.s

ldc.i4.s value

Stack: → i

Pushes the encoded numeric constant onto the evaluation stack.

The short form uses a smaller encoded operand; its operation is otherwise the same.

Microsoft reference

ldc.i8

ldc.i8 value

Stack: → i8

Pushes the encoded numeric constant onto the evaluation stack.

Microsoft reference

ldc.r4

ldc.r4 value

Stack: → r4

Pushes the encoded numeric constant onto the evaluation stack.

Microsoft reference

ldc.r8

ldc.r8 value

Stack: → r8

Pushes the encoded numeric constant onto the evaluation stack.

Microsoft reference

ldelem

ldelem type

Stack: ref i → 1

Pops an array and index, then loads that element using the specified element type.

The index is int32 or native int; null and bounds checks apply. Small integer loads widen to int32.

Microsoft reference

ldelem.i

ldelem.i

Stack: ref i → i

Pops an array and index, then loads that element using the specified element type.

The index is int32 or native int; null and bounds checks apply. Small integer loads widen to int32.

Microsoft reference

ldelem.i1

ldelem.i1

Stack: ref i → i

Pops an array and index, then loads that element using the specified element type.

The index is int32 or native int; null and bounds checks apply. Small integer loads widen to int32.

Microsoft reference

ldelem.i2

ldelem.i2

Stack: ref i → i

Pops an array and index, then loads that element using the specified element type.

The index is int32 or native int; null and bounds checks apply. Small integer loads widen to int32.

Microsoft reference

ldelem.i4

ldelem.i4

Stack: ref i → i

Pops an array and index, then loads that element using the specified element type.

The index is int32 or native int; null and bounds checks apply. Small integer loads widen to int32.

Microsoft reference

ldelem.i8

ldelem.i8

Stack: ref i → i8

Pops an array and index, then loads that element using the specified element type.

The index is int32 or native int; null and bounds checks apply. Small integer loads widen to int32.

Microsoft reference

ldelem.r4

ldelem.r4

Stack: ref i → r4

Pops an array and index, then loads that element using the specified element type.

The index is int32 or native int; null and bounds checks apply. Small integer loads widen to int32.

Microsoft reference

ldelem.r8

ldelem.r8

Stack: ref i → r8

Pops an array and index, then loads that element using the specified element type.

The index is int32 or native int; null and bounds checks apply. Small integer loads widen to int32.

Microsoft reference

ldelem.ref

ldelem.ref

Stack: ref i → ref

Pops an array and index, then loads that element using the specified element type.

The index is int32 or native int; null and bounds checks apply. Small integer loads widen to int32.

Microsoft reference

ldelem.u1

ldelem.u1

Stack: ref i → i

Pops an array and index, then loads that element using the specified element type.

The index is int32 or native int; null and bounds checks apply. Small integer loads widen to int32.

Microsoft reference

ldelem.u2

ldelem.u2

Stack: ref i → i

Pops an array and index, then loads that element using the specified element type.

The index is int32 or native int; null and bounds checks apply. Small integer loads widen to int32.

Microsoft reference

ldelem.u4

ldelem.u4

Stack: ref i → i

Pops an array and index, then loads that element using the specified element type.

The index is int32 or native int; null and bounds checks apply. Small integer loads widen to int32.

Microsoft reference

ldelema

ldelema type

Stack: ref i → i

Pops an array and index and pushes a managed pointer to that element.

The index is int32 or native int; null and bounds checks apply. Small integer loads widen to int32.

Microsoft reference

ldfld

ldfld field

Stack: ref → 1

Loads the named instance field from the receiver on the stack.

Microsoft reference

ldflda

ldflda field

Stack: ref → i

Pushes a managed pointer to the named instance field’s storage.

Microsoft reference

ldftn

ldftn method

Stack: → i

Pushes a native function pointer to the named method without invoking it.

Microsoft reference

ldind.i

ldind.i

Stack: i → i

Loads a value through a managed or unmanaged pointer using the instruction’s storage type.

Microsoft reference

ldind.i1

ldind.i1

Stack: i → i

Loads a value through a managed or unmanaged pointer using the instruction’s storage type.

Microsoft reference

ldind.i2

ldind.i2

Stack: i → i

Loads a value through a managed or unmanaged pointer using the instruction’s storage type.

Microsoft reference

ldind.i4

ldind.i4

Stack: i → i

Loads a value through a managed or unmanaged pointer using the instruction’s storage type.

Microsoft reference

ldind.i8

ldind.i8

Stack: i → i8

Loads a value through a managed or unmanaged pointer using the instruction’s storage type.

Microsoft reference

ldind.r4

ldind.r4

Stack: i → r4

Loads a value through a managed or unmanaged pointer using the instruction’s storage type.

Microsoft reference

ldind.r8

ldind.r8

Stack: i → r8

Loads a value through a managed or unmanaged pointer using the instruction’s storage type.

Microsoft reference

ldind.ref

ldind.ref

Stack: i → ref

Loads a value through a managed or unmanaged pointer using the instruction’s storage type.

Microsoft reference

ldind.u1

ldind.u1

Stack: i → i

Loads a value through a managed or unmanaged pointer using the instruction’s storage type.

Microsoft reference

ldind.u2

ldind.u2

Stack: i → i

Loads a value through a managed or unmanaged pointer using the instruction’s storage type.

Microsoft reference

ldind.u4

ldind.u4

Stack: i → i

Loads a value through a managed or unmanaged pointer using the instruction’s storage type.

Microsoft reference

ldlen

ldlen

Stack: ref → i

Pops an array reference and pushes its length as an unsigned native integer.

Microsoft reference

ldloc

ldloc local

Stack: → 1

Loads the specified local variable onto the evaluation stack.

Microsoft reference

ldloc.0

ldloc.0

Stack: → 1

Loads the specified local variable onto the evaluation stack.

Microsoft reference

ldloc.1

ldloc.1

Stack: → 1

Loads the specified local variable onto the evaluation stack.

Microsoft reference

ldloc.2

ldloc.2

Stack: → 1

Loads the specified local variable onto the evaluation stack.

Microsoft reference

ldloc.3

ldloc.3

Stack: → 1

Loads the specified local variable onto the evaluation stack.

Microsoft reference

ldloc.s

ldloc.s local

Stack: → 1

Loads the specified local variable onto the evaluation stack.

The short form uses a smaller encoded operand; its operation is otherwise the same.

Microsoft reference

ldloca

ldloca local

Stack: → i

Pushes a managed pointer to a local variable’s storage.

Microsoft reference

ldloca.s

ldloca.s local

Stack: → i

Pushes a managed pointer to a local variable’s storage.

The short form uses a smaller encoded operand; its operation is otherwise the same.

Microsoft reference

ldnull

ldnull

Stack: → ref

Pushes a null object reference, which can be assigned to a reference type.

Microsoft reference

ldobj

ldobj type

Stack: i → 1

Loads a value of the specified type through a pointer.

Microsoft reference

ldsfld

ldsfld field

Stack: → 1

Loads the named static field; no instance receiver is needed.

Microsoft reference

ldsflda

ldsflda field

Stack: → i

Pushes a managed pointer to the named static field’s storage.

Microsoft reference

ldstr

ldstr "text"

Stack: → ref

Pushes the string literal as an object reference.

Microsoft reference

ldtoken

ldtoken type, method, or field

Stack: → i

Pushes a runtime type, method, or field handle for the metadata operand.

Microsoft reference

ldvirtftn

ldvirtftn method

Stack: ref → i

Pops a receiver and obtains the function pointer selected by virtual dispatch without invoking it.

Microsoft reference

leave

leave label

Stack: →

Exits to the target label, empties the evaluation stack, and runs intervening finally handlers.

Microsoft reference

leave.s

leave.s label

Stack: →

Exits to the target label, empties the evaluation stack, and runs intervening finally handlers.

The short form uses a smaller encoded operand; its operation is otherwise the same.

Microsoft reference

localloc

localloc

Stack: i → i

Allocates local memory in the current stack frame and pushes a native pointer to it.

Microsoft reference

mkrefany

mkrefany type

Stack: i → 1

Combines an address and a type token into a typed reference.

Microsoft reference

mul

mul

Stack: 1 1 → 1

Multiplies the two operands. Integer overflow wraps; floating-point overflow produces infinity.

Microsoft reference

mul.ovf

mul.ovf

Stack: 1 1 → 1

Multiplies the two operands, throwing OverflowException if the integer result is out of range.

Operands and the result range are signed integers.

Microsoft reference

mul.ovf.un

mul.ovf.un

Stack: 1 1 → 1

Multiplies the two operands, throwing OverflowException if the integer result is out of range.

Operands and the result range are unsigned integers.

Microsoft reference

neg

neg

Stack: 1 → 1

Negates a numeric value without checking integer overflow.

Microsoft reference

newarr

newarr type

Stack: i → ref

Pops an integer length and creates a zero-based, one-dimensional array of the specified element type.

Microsoft reference

newobj

newobj method

Stack: … → ref

Pops the constructor arguments and creates an initialized object or value; no receiver is supplied.

Push constructor arguments in signature order. A constructor has a void signature, but newobj pushes the instance.

Microsoft reference

no.

no. mask

Stack: →

Permits selected type, range, or null checks on the following instruction to be skipped; skipping is optional.

Mask bits 1, 2, and 4 select type, range, and null checks. Valid targets depend on the selected checks; unverifiable.

Prefixes attach to the following instruction. Branches must target the first prefix, not the middle of the sequence.

Type checks (1): castclass, unbox, ldelema, stelem, stelem.ref.

Range checks (2): ldelem., stelem., ldelema.

Null checks (4): those array operations, ldfld, stfld, callvirt, ldvirtftn.

Every selected check must be valid for the target instruction.

CLI specification

nop

nop

Stack: →

Does nothing and leaves the evaluation stack unchanged.

Microsoft reference

not

not

Stack: 1 → 1

Complements every bit of an integer value.

Microsoft reference

or

or

Stack: 1 1 → 1

Computes the bitwise OR of two integer operands.

Microsoft reference

pop

pop

Stack: 1 →

Discards the top stack value.

Microsoft reference

readonly.

readonly.

Stack: →

Makes ldelema or an array Address call return a managed pointer with controlled mutability.

Suppresses the exact array-element type check, permitting covariant array reads.

Indirect writes through the result are unverifiable; field stores and mutating receiver calls are permitted.

Prefixes attach to the following instruction. Branches must target the first prefix, not the middle of the sequence.

Microsoft reference

refanytype

refanytype

Stack: 1 → i

Extracts the runtime type handle from a typed reference.

Microsoft reference

refanyval

refanyval type

Stack: 1 → i

Extracts an address from a typed reference, checking that its type matches the operand.

Microsoft reference

rem

rem

Stack: 1 1 → 1

Computes the remainder of the operand below the top divided by the top operand.

Integer division by zero throws DivideByZeroException.

Uses a quotient truncated toward zero; floating-point rem differs from Math.IEEERemainder.

Microsoft reference

rem.un

rem.un

Stack: 1 1 → 1

Computes the remainder using unsigned integer operands.

Integer division by zero throws DivideByZeroException.

Microsoft reference

ret

ret

Stack: … →

Returns from the current method. A non-void method requires exactly one assignable return value.

A top-level ilrepl cell may return zero or one value; managed pointers cannot escape the cell.

Microsoft reference

rethrow

rethrow

Stack: →

Rethrows the active exception from within its catch handler, preserving the original exception context.

Microsoft reference

shl

shl

Stack: 1 1 → 1

Shifts the integer below the top to the left by the top value, filling low bits with zero.

Microsoft reference

shr

shr

Stack: 1 1 → 1

Shifts a signed integer right, copying the sign bit into the vacated high bits.

Microsoft reference

shr.un

shr.un

Stack: 1 1 → 1

Shifts an integer right logically, filling the vacated high bits with zero.

Microsoft reference

sizeof

sizeof type

Stack: → i

Pushes the size in bytes of the specified type as int32; it does not consume an instance.

Microsoft reference

starg

starg argument

Stack: 1 →

Pops a value into the specified argument’s storage; its type must be assignable to that argument.

Microsoft reference

starg.s

starg.s argument

Stack: 1 →

Pops a value into the specified argument’s storage; its type must be assignable to that argument.

The short form uses a smaller encoded operand; its operation is otherwise the same.

Microsoft reference

stelem

stelem type

Stack: ref i 1 →

Pops an array, index, and value, then stores the value into that array element.

The index is int32 or native int; null and bounds checks apply. Small integer loads widen to int32.

Microsoft reference

stelem.i

stelem.i

Stack: ref i i →

Pops an array, index, and value, then stores the value into that array element.

The index is int32 or native int; null and bounds checks apply. Small integer loads widen to int32.

Microsoft reference

stelem.i1

stelem.i1

Stack: ref i i →

Pops an array, index, and value, then stores the value into that array element.

The index is int32 or native int; null and bounds checks apply. Small integer loads widen to int32.

Microsoft reference

stelem.i2

stelem.i2

Stack: ref i i →

Pops an array, index, and value, then stores the value into that array element.

The index is int32 or native int; null and bounds checks apply. Small integer loads widen to int32.

Microsoft reference

stelem.i4

stelem.i4

Stack: ref i i →

Pops an array, index, and value, then stores the value into that array element.

The index is int32 or native int; null and bounds checks apply. Small integer loads widen to int32.

Microsoft reference

stelem.i8

stelem.i8

Stack: ref i i8 →

Pops an array, index, and value, then stores the value into that array element.

The index is int32 or native int; null and bounds checks apply. Small integer loads widen to int32.

Microsoft reference

stelem.r4

stelem.r4

Stack: ref i r4 →

Pops an array, index, and value, then stores the value into that array element.

The index is int32 or native int; null and bounds checks apply. Small integer loads widen to int32.

Microsoft reference

stelem.r8

stelem.r8

Stack: ref i r8 →

Pops an array, index, and value, then stores the value into that array element.

The index is int32 or native int; null and bounds checks apply. Small integer loads widen to int32.

Microsoft reference

stelem.ref

stelem.ref

Stack: ref i ref →

Pops an array, index, and value, then stores the value into that array element.

The index is int32 or native int; null and bounds checks apply. Small integer loads widen to int32.

Microsoft reference

stfld

stfld field

Stack: ref 1 →

Pops a receiver and value and stores the value into the named instance field.

Microsoft reference

stind.i

stind.i

Stack: i i →

Stores the top value through the pointer below it using the instruction’s storage type.

Microsoft reference

stind.i1

stind.i1

Stack: i i →

Stores the top value through the pointer below it using the instruction’s storage type.

Microsoft reference

stind.i2

stind.i2

Stack: i i →

Stores the top value through the pointer below it using the instruction’s storage type.

Microsoft reference

stind.i4

stind.i4

Stack: i i →

Stores the top value through the pointer below it using the instruction’s storage type.

Microsoft reference

stind.i8

stind.i8

Stack: i i8 →

Stores the top value through the pointer below it using the instruction’s storage type.

Microsoft reference

stind.r4

stind.r4

Stack: i r4 →

Stores the top value through the pointer below it using the instruction’s storage type.

Microsoft reference

stind.r8

stind.r8

Stack: i r8 →

Stores the top value through the pointer below it using the instruction’s storage type.

Microsoft reference

stind.ref

stind.ref

Stack: i i →

Stores the top value through the pointer below it using the instruction’s storage type.

Microsoft reference

stloc

stloc local

Stack: 1 →

Pops a value into the specified local variable; its type must be assignable to that local.

Microsoft reference

stloc.0

stloc.0

Stack: 1 →

Pops a value into the specified local variable; its type must be assignable to that local.

Microsoft reference

stloc.1

stloc.1

Stack: 1 →

Pops a value into the specified local variable; its type must be assignable to that local.

Microsoft reference

stloc.2

stloc.2

Stack: 1 →

Pops a value into the specified local variable; its type must be assignable to that local.

Microsoft reference

stloc.3

stloc.3

Stack: 1 →

Pops a value into the specified local variable; its type must be assignable to that local.

Microsoft reference

stloc.s

stloc.s local

Stack: 1 →

Pops a value into the specified local variable; its type must be assignable to that local.

The short form uses a smaller encoded operand; its operation is otherwise the same.

Microsoft reference

stobj

stobj type

Stack: i 1 →

Copies the top value of the specified type into the storage addressed below it.

Microsoft reference

stsfld

stsfld field

Stack: 1 →

Pops a value and stores it into the named static field.

Microsoft reference

sub

sub

Stack: 1 1 → 1

Subtracts the top operand from the one below it. Integer overflow wraps; floating-point overflow produces infinity.

Microsoft reference

sub.ovf

sub.ovf

Stack: 1 1 → 1

Subtracts the top operand from the one below it, throwing OverflowException if the integer result is out of range.

Operands and the result range are signed integers.

Microsoft reference

sub.ovf.un

sub.ovf.un

Stack: 1 1 → 1

Subtracts the top operand from the one below it, throwing OverflowException if the integer result is out of range.

Operands and the result range are unsigned integers.

Microsoft reference

switch

switch (label, ...)

Stack: i →

Pops an int32 index and branches to that zero-based entry; an out-of-range index falls through.

Microsoft reference

tail.

tail.

Stack: →

Marks the following call as a tail call, allowing transfer without retaining the current frame.

Prefix call, callvirt, or calli; only its arguments may remain. Follow the call with ret outside protected regions.

Prefixes attach to the following instruction. Branches must target the first prefix, not the middle of the sequence.

Microsoft reference

throw

throw

Stack: ref →

Pops and throws an exception object, transferring control to exception handling.

Microsoft reference

unaligned.

unaligned. 1|2|4

Stack: →

Specifies that the following memory access can rely only on the supplied alignment (1, 2, or 4 bytes).

Applies to indirect loads/stores, instance-field access, ldobj/stobj, cpblk, or initblk.

Prefixes attach to the following instruction. Branches must target the first prefix, not the middle of the sequence.

Microsoft reference

unbox

unbox type

Stack: ref → i

Returns a managed pointer to an unboxed value, allowing access to its storage rather than copying it.

Unboxing checks the boxed type; it does not perform a numeric conversion. A mismatched type throws InvalidCastException.

The result has controlled mutability. Unboxing Nullable can require newly manufactured nullable storage.

Null becomes an empty nullable value for Nullable; a non-nullable value-type operand throws NullReferenceException.

Microsoft reference

unbox.any

unbox.any type

Stack: ref → 1

Extracts a boxed value; for a reference-type operand it performs the same check as castclass.

Nullable boxing produces null for no value, otherwise a boxed underlying value; generic behavior depends on the type.

Unboxing checks the boxed type; it does not perform a numeric conversion. A mismatched type throws InvalidCastException.

Null becomes an empty nullable value for Nullable; a non-nullable value-type operand throws NullReferenceException.

A reference-type operand preserves null. With a generic operand, the actual type determines the operation.

Microsoft reference

volatile.

volatile.

Stack: →

Gives the following memory read acquire semantics or memory write release semantics.

Applies to indirect loads/stores, instance-field access, ldobj/stobj, cpblk, or initblk.

Also applies to ldsfld/stsfld. It does not make an otherwise non-atomic access atomic or replace a lock.

Prefixes attach to the following instruction. Branches must target the first prefix, not the middle of the sequence.

Microsoft reference

xor

xor

Stack: 1 1 → 1

Computes the bitwise exclusive OR of two integer operands.

Microsoft reference