IL语法

IL语法

.Flags部分可设置
1.可访问性

  • privatescope: 该方法不能被引用。
  • private: 该方法只能被自身及其嵌套类型调用。
  • famandassem: 该方法只能被当前程序集内部的继承类型调用。(internal and protected)
  • assembly: 该方法只能被程序集内部成员调用。
  • family: 该方法只能被继承类型调用。
  • famorassem: 该方法可以被程序集内部成员或外部继承类型调用。(internal or protected)
  • public: 公共方法。

2. Contract

  • static: 静态方法。
  • final: 不能被 override 的方法。
  • virtual: 虚方法,不能和 static 同时使用。
  • hidebysig: 该方法对继承类型隐藏。该标记仅提供给编译器使用,但会被 CLR 忽略。

3. Vitual method table (v-table) control flags

  • newslot: 必须和 virtual 一起使用,添加该关键字的虚方法不会 override 基类中同名(含签名)虚方法,而是在 v-table 中创建一个新槽(new slot)。

4. Implementation

  • abstract: 抽象方法,不提供实现代码。其 RVA = 0,任何拥有抽象方法的类型必须添加 abstract 成为抽象类型。
  • specialname: 该方法名有特殊含义,如 .cctor、.ctor 等。
  • pinvokeimpl: 该方法是非托管方法,通过 P/Invoke 封装调用。

5. Reserved

  • rtspecialname: 该方法拥有 CLR 内部使用的特殊名称,必须和 specialname 一起使用。

. Implementation Flags

1. Code type

  • cil: 该方法由 CIL (common intermediate language) 实现。(默认)
  • native: 该方法由 native code 实现。
  • runtime: 该方法由 CLR 自动生成。只有 mscorlib.dll 中的某些方法带有此标记。

2. Code management

  • managed: 托管代码。(默认)
  • unmanaged: 非托管代码,必须和 native 一起使用。

3. Implementation and interoperability

  • internalcall: 内部使用标记。
  • synchronized: 指示 JIT 自动为其插入同步代码,以保证多线程调用安全。在 C# 中我们为方法添加 [MethodImpl(MethodImplOptions.Synchronized)] 特性时,编译器就会为该方法添加该标记。对于实例方法而言,自动插入代码会锁定实例对象引用;而静态方法,会锁定其所在类型的静态类型对象(System.Type)。
  • noinlining: 禁止内联(inline)调用。

 

部分CIL 操作码

操作码                                           作用

add, sub, mul, div, rem                   用于两个数加减乘除求模

add, or, not, xor                            用于在两个值上进行二进制操作

ceq, cgt, clt                                   用不同的方法比较两个在栈上的值,ceq:是否相等;cgt:是否大约;clt:是否小于

box, unbox                                   在引用类型和值类型之间转换

ret                                                退出方法和返回一个值

beq, bgt, ble, blt, switch                 控制方法中的条件分支,beg:如果相等就中止到代码标签;bgt:如果大于就中止到代码标签;

                                                   ble:如果小于等于就中止到代码标签;blt:如果小于就中止到代码标签;

                                                   所有的分支控制操作码都需要给出一个CIL代码标签作为条件为真的跳转目的

br.s                                             (无条件)中止到代码标签

call                                               调用一个成员

nearer, newobj                              在内存中创建一个新的数组或新的对象类型

主要的入栈CIL操作码  (ld 加载)

操作码                                           作用

ldarg (及多个变化形式)                     加载方法的参数到栈中。除了泛型ldarg(需要一个索引作为参数),还有后其他很多的变化形式。

                                                   eg. 有个数字后缀的ldarg操作码来指定需要加载的参数。同时还有很多ldarg的变化形式允许加载

                                                   指定的数据类型(ldarg_i4, 加载int32)和值(ldarg_i4_5 加载一个值为5的int32)

ldc (及多个变化形式)                      加载一个常数到栈中

ldfld (及多个变化形式)                      加载一个对象实例的成员到栈中

ldloc (及多个变化形式)                      加载一个本地变量到栈中

ldobj                                            获得一个堆对象的所有数据,并将它们放置到栈中

ldstr                                             加载一个字符串数据到栈中

主要的弹出栈操作码 (st 存储)

操作码                                           作用

pop                                              删除当前栈顶的值,但是并不影响存储的值

starg                                            存储栈顶的值到给出方法的参数,根据索引确定这个参数

stloc (及多个变化形式)                      弹出当前栈顶的值并存储在一个本地变量列表中,根据所以确定这个参数

stobj                                            从栈中复制一个特定的类型到指定的内存地址

stfld                                             用从栈中获得的值替换对象成员的值

 

 

Opcode

Instruction

Description

Type of instruction

0x00

nop

Do nothing (Noperation).

Base instruction

0x01

break

Inform a debugger that a breakpoint has been reached.

Base instruction

0x02

ldarg.0

Load argument 0 onto the stack.

Base instruction

0x03

ldarg.1

Load argument 1 onto the stack.

Base instruction

0x04

ldarg.2

Load argument 2 onto the stack.

Base instruction

0x05

ldarg.3

Load argument 3 onto the stack.

Base instruction

0x06

ldloc.0

Load local variable 0 onto stack.

Base instruction

0x07

ldloc.1

Load local variable 1 onto stack.

Base instruction

0x08

ldloc.2

Load local variable 2 onto stack.

Base instruction

0x09

ldloc.3

Load local variable 3 onto stack.

Base instruction

0x0A

stloc.0

Pop a value from stack into local variable 0.

Base instruction

0x0B

stloc.1

Pop a value from stack into local variable 1.

Base instruction

0x0C

stloc.2

Pop a value from stack into local variable 2.

Base instruction

0x0D

stloc.3

Pop a value from stack into local variable 3.

Base instruction

0x0E

ldarg.s <uint8 (num)>

Load argument numbered num onto the stack, short form.

Base instruction

0x0F

ldarga.s <uint8 (argNum)>

Fetch the address of argument argNum, short form.

Base instruction

0x10

starg.s <uint8 (num)>

Store value to the argument numbered num, short form.

Base instruction

0x11

ldloc.s <uint8 (indx)>

Load local variable of index indx onto stack, short form.

Base instruction

0x12

ldloca.s <uint8 (indx)>

Load address of local variable with index indx, short form.

Base instruction

0x13

stloc.s <uint8 (indx)>

Pop a value from stack into local variable indx, short form.

Base instruction

0x14

ldnull

Push a null reference on the stack.

Base instruction

0x15

ldc.i4.m1

Push -1 onto the stack as int32.

Base instruction

0x15

ldc.i4.M1

Push -1 of type int32 onto the stack as int32 (alias for ldc.i4.m1).

Base instruction

0x16

ldc.i4.0

Push 0 onto the stack as int32.

Base instruction

0x17

ldc.i4.1

Push 1 onto the stack as int32.

Base instruction

0x18

ldc.i4.2

Push 2 onto the stack as int32.

Base instruction

0x19

ldc.i4.3

Push 3 onto the stack as int32.

Base instruction

0x1A

ldc.i4.4

Push 4 onto the stack as int32.

Base instruction

0x1B

ldc.i4.5

Push 5 onto the stack as int32.

Base instruction

0x1C

ldc.i4.6

Push 6 onto the stack as int32.

Base instruction

0x1D

ldc.i4.7

Push 7 onto the stack as int32.

Base instruction

0x1E

ldc.i4.8

Push 8 onto the stack as int32.

Base instruction

0x1F

ldc.i4.s <int8 (num)>

Push num onto the stack as int32, short form.

Base instruction

0x20

ldc.i4 <int32 (num)>

Push num of type int32 onto the stack as int32.

Base instruction

0x21

ldc.i8 <int64 (num)>

Push num of type int64 onto the stack as int64.

Base instruction

0x22

ldc.r4 <float32 (num)>

Push num of type float32 onto the stack as F.

Base instruction

0x23

ldc.r8 <float64 (num)>

Push num of type float64 onto the stack as F.

Base instruction

0x25

dup

Duplicate the value on the top of the stack.

Base instruction

0x26

pop

Pop value from the stack.

Base instruction

0x27

jmp <method>

Exit current method and jump to the specified method.

Base instruction

0x28

call <method>

Call method described by method.

Base instruction

0x29

calli <callsitedescr>

Call method indicated on the stack with arguments described by callsitedescr.

Base instruction

0x2A

ret

Return from method, possibly with a value.

Base instruction

0x2B

br.s <int8 (target)>

Branch to target, short form.

Base instruction

0x2C

brfalse.s <int8 (target)>

Branch to target if value is zero (false), short form.

Base instruction

0x2C

brnull.s <int8 (target)>

Branch to target if value is null (alias for brfalse.s), short form.

Base instruction

0x2C

brzero.s <int8 (target)>

Branch to target if value is zero (alias for brfalse.s), short form.

Base instruction

0x2D

brinst.s <int8 (target)>

Branch to target if value is a non-null object reference, short form (alias for brtrue.s).

Base instruction

0x2D

brtrue.s <int8 (target)>

Branch to target if value is non-zero (true), short form.

Base instruction

0x2E

beq.s <int8 (target)>

Branch to target if equal, short form.

Base instruction

0x2F

bge.s <int8 (target)>

Branch to target if greater than orequal to, short form.

Base instruction

0x30

bgt.s <int8 (target)>

Branch to target if greater than, short form.

Base instruction

0x31

ble.s <int8 (target)>

Branch to target if less than or equal to, short form.

Base instruction

0x32

blt.s <int8 (target)>

Branch to target if less than, short form.

Base instruction

0x33

bne.un.s <int8 (target)>

Branch to target if unequal or unordered, short form.

Base instruction

0x34

bge.un.s <int8 (target)>

Branch to target if greater than or equal to (unsigned or unordered), short form

Base instruction

0x35

bgt.un.s <int8 (target)>

Branch to target if greater than (unsigned or unordered), short form.

Base instruction

0x36

ble.un.s <int8 (target)>

Branch to target if less than or equal to (unsigned or unordered), short form

Base instruction

0x37

blt.un.s <int8 (target)>

Branch to target if less than (unsigned or unordered), short form.

Base instruction

0x38

br <int32 (target)>

Branch to target.

Base instruction

0x39

brfalse <int32 (target)>

Branch to target if value is zero (false).

Base instruction

0x39

brnull <int32 (target)>

Branch to target if value is null (alias for brfalse).

Base instruction

0x39

brzero <int32 (target)>

Branch to target if value is zero (alias for brfalse).

Base instruction

0x3A

brinst <int32 (target)>

Branch to target if value is a non-null object reference (alias for brtrue).

Base instruction

0x3A

brtrue <int32 (target)>

Branch to target if value is non-zero (true).

Base instruction

0x3B

beq <int32 (target)>

Branch to target if equal.

Base instruction

0x3C

bge <int32 (target)>

Branch to target if greater than orequal to.

Base instruction

0x3D

bgt <int32 (target)>

Branch to target if greater than.

Base instruction

0x3E

ble <int32 (target)>

Branch to target if less than or equal to.

Base instruction

0x3F

blt <int32 (target)>

Branch to target if less than.

Base instruction

0x40

bne.un <int32 (target)>

Branch to target if unequal or unordered.

Base instruction

0x41

bge.un <int32 (target)>

Branch to target if greater than or equal to (unsigned or unordered).

Base instruction

0x42

bgt.un <int32 (target)>

Branch to target if greater than (unsigned or unordered).

Base instruction

0x43

ble.un <int32 (target)>

Branch to target if less than or equal to (unsigned or unordered).

Base instruction

0x44

blt.un <int32 (target)>

Branch to target if less than (unsigned or unordered).

Base instruction

0x45

switch <uint32, int32, int32 (t1..tN)>

Jump to one of n values.

Base instruction

0x46

ldind.i1

Indirect load value of type int8 as int32 on the stack.

Base instruction

0x47

ldind.u1

Indirect load value of type unsigned int8 as int32 on the stack

Base instruction

0x48

ldind.i2

Indirect load value of type int16 as int32 on the stack.

Base instruction

0x49

ldind.u2

Indirect load value of type unsigned int16 as int32 on the stack

Base instruction

0x4A

ldind.i4

Indirect load value of type int32 as int32 on the stack.

Base instruction

0x4B

ldind.u4

Indirect load value of type unsigned int32 as int32 on the stack

Base instruction

0x4C

ldind.i8

Indirect load value of type int64 as int64 on the stack.

Base instruction

0x4C

ldind.u8

Indirect load value of type unsigned int64 as int64 on the stack (alias for ldind.i8).

Base instruction

0x4D

ldind.i

Indirect load value of type native int as native int on the stack

Base instruction

0x4E

ldind.r4

Indirect load value of type float32 as F on the stack.

Base instruction

0x4F

ldind.r8

Indirect load value of type float64 as F on the stack.

Base instruction

0x50

ldind.ref

Indirect load value of type object ref as O on the stack.

Base instruction

0x51

stind.ref

Store value of type object ref (type O) into memory at address

Base instruction

0x52

stind.i1

Store value of type int8 into memory at address

Base instruction

0x53

stind.i2

Store value of type int16 into memory at address

Base instruction

0x54

stind.i4

Store value of type int32 into memory at address

Base instruction

0x55

stind.i8

Store value of type int64 into memory at address

Base instruction

0x56

stind.r4

Store value of type float32 into memory at address

Base instruction

0x57

stind.r8

Store value of type float64 into memory at address

Base instruction

0x58

add

Add two values, returning a new value.

Base instruction

0x59

sub

Subtract value2 from value1, returning a new value.

Base instruction

0x5A

mul

Multiply values.

Base instruction

0x5B

div

Divide two values to return a quotient or floating-point result.

Base instruction

0x5C

div.un

Divide two values, unsigned, returning a quotient.

Base instruction

0x5D

rem

Remainder when dividing one value by another.

Base instruction

0x5E

rem.un

Remainder when dividing one unsigned value by another.

Base instruction

0x5F

and

Bitwise AND of two integral values, returns an integral value.

Base instruction

0x60

or

Bitwise OR of two integer values, returns an integer.

Base instruction

0x61

xor

Bitwise XOR of integer values, returns an integer.

Base instruction

0x62

shl

Shift an integer left (shifting in zeros), return an integer.

Base instruction

0x63

shr

Shift an integer right (shift in sign), return an integer.

Base instruction

0x64

shr.un

Shift an integer right (shift in zero), return an integer.

Base instruction

0x65

neg

Negate value.

Base instruction

0x66

not

Bitwise complement (logical not).

Base instruction

0x67

conv.i1

Convert to int8, pushing int32 on stack.

Base instruction

0x68

conv.i2

Convert to int16, pushing int32 on stack.

Base instruction

0x69

conv.i4

Convert to int32, pushing int32 on stack.

Base instruction

0x6A

conv.i8

Convert to int64, pushing int64 on stack.

Base instruction

0x6B

conv.r4

Convert to float32, pushing F on stack.

Base instruction

0x6C

conv.r8

Convert to float64, pushing F on stack.

Base instruction

0x6D

conv.u4

Convert to unsigned int32, pushing int32 on stack.

Base instruction

0x6E

conv.u8

Convert to unsigned int64, pushing int64 on stack.

Base instruction

0x6F

callvirt <method>

Call a method associated with an object.

Object model instruction

0x70

cpobj <typeTok>

Copy a value type from src to dest.

Object model instruction

0x71

ldobj <typeTok>

Copy the value stored at address src to the stack.

Object model instruction

0x72

ldstr <string>

Push a string object for the literal string.

Object model instruction

0x73

newobj <ctor>

Allocate an uninitialized object or value type and call ctor.

Object model instruction

0x74

castclass <class>

Cast obj to class.

Object model instruction

0x75

isinst <class>

Test if obj is an instance of class, returning null or an instance of that class or interface.

Object model instruction

0x76

conv.r.un

Convert unsigned integer to floating-point, pushing F on stack.

Base instruction

0x79

unbox <valuetype>

Extract a value-type from obj, its boxed representation.

Object model instruction

0x7A

throw

Throw an exception.

Object model instruction

0x7B

ldfld <field>

Push the value of field of object (or value type) obj, onto the stack.

Object model instruction

0x7C

ldflda <field>

Push the address of field of object obj on the stack.

Object model instruction

0x7D

stfld <field>

Replace the value of field of the object obj with value.

Object model instruction

0x7E

ldsfld <field>

Push the value of field on the stack.

Object model instruction

0x7F

ldsflda <field>

Push the address of the static field, field, on the stack.

Object model instruction

0x80

stsfld <field>

Replace the value of field with val.

Object model instruction

0x81

stobj <typeTok>

Store a value of type typeTok at an address.

Object model instruction

0x82

conv.ovf.i1.un

Convert unsigned to an int8 (on the stack as int32) and throw an exception on overflow.

Base instruction

0x83

conv.ovf.i2.un

Convert unsigned to an int16 (on the stack as int32) and throw an exception on overflow.

Base instruction

0x84

conv.ovf.i4.un

Convert unsigned to an int32 (on the stack as int32) and throw an exception on overflow.

Base instruction

0x85

conv.ovf.i8.un

Convert unsigned to an int64 (on the stack as int64) and throw an exception on overflow.

Base instruction

0x86

conv.ovf.u1.un

Convert unsigned to an unsigned int8 (on the stack as int32) and throw an exception on overflow.

Base instruction

0x87

conv.ovf.u2.un

Convert unsigned to an unsigned int16 (on the stack as int32) and throw an exception on overflow.

Base instruction

0x88

conv.ovf.u4.un

Convert unsigned to an unsigned int32 (on the stack as int32) and throw an exception on overflow.

Base instruction

0x89

conv.ovf.u8.un

Convert unsigned to an unsigned int64 (on the stack as int64) and throw an exception on overflow.

Base instruction

0x8A

conv.ovf.i.un

Convert unsigned to a native int (on the stack as native int) and throw an exception on overflow.

Base instruction

0x8B

conv.ovf.u.un

Convert unsigned to a native unsigned int (on the stack as native int) and throw an exception on overflow.

Base instruction

0x8C

box <typeTok>

Convert a boxable value to its boxed form

Object model instruction

0x8D

newarr <etype>

Create a new array with elements of type etype.

Object model instruction

0x8E

ldlen

Push the length (of type native unsigned int) of array on the stack.

Object model instruction

0x8F

ldelema <class>

Load the address of element at index onto the top of the stack.

Object model instruction

0x90

ldelem.i1

Load the element with type int8 at index onto the top of the stack as an int32.

Object model instruction

0x91

ldelem.u1

Load the element with type unsigned int8 at index onto the top of the stack as an int32.

Object model instruction

0x92

ldelem.i2

Load the element with type int16 at index onto the top of the stack as an int32.

Object model instruction

0x93

ldelem.u2

Load the element with type unsigned int16 at index onto the top of the stack as an int32.

Object model instruction

0x94

ldelem.i4

Load the element with type int32 at index onto the top of the stack as an int32.

Object model instruction

0x95

ldelem.u4

Load the element with type unsigned int32 at index onto the top of the stack as an int32.

Object model instruction

0x96

ldelem.i8

Load the element with type int64 at index onto the top of the stack as an int64.

Object model instruction

0x96

ldelem.u8

Load the element with type unsigned int64 at index onto the top of the stack as an int64 (alias for ldelem.i8).

Object model instruction

0x97

ldelem.i

Load the element with type native int at index onto the top of the stack as a native int.

Object model instruction

0x98

ldelem.r4

Load the element with type float32 at index onto the top of the stack as an F

Object model instruction

0x99

ldelem.r8

Load the element with type float64 at index onto the top of the stack as an F.

Object model instruction

0x9A

ldelem.ref

Load the element at index onto the top of the stack as an O. The type of the O is the same as the element type of the array pushed on the CIL stack.

Object model instruction

0x9B

stelem.i

Replace array element at index with the i value on the stack.

Object model instruction

0x9C

stelem.i1

Replace array element at index with the int8 value on the stack.

Object model instruction

0x9D

stelem.i2

Replace array element at index with the int16 value on the stack.

Object model instruction

0x9E

stelem.i4

Replace array element at index with the int32 value on the stack.

Object model instruction

0x9F

stelem.i8

Replace array element at index with the int64 value on the stack.

Object model instruction

0xA0

stelem.r4

Replace array element at index with the float32 value on the stack.

Object model instruction

0xA1

stelem.r8

Replace array element at index with the float64 value on the stack.

Object model instruction

0xA2

stelem.ref

Replace array element at index with the ref value on the stack.

Object model instruction

0xA3

ldelem <typeTok>

Load the element at index onto the top of the stack.

Object model instruction

0xA4

stelem <typeTok>

Replace array element at index with the value on the stack

Object model instruction

0xA5

unbox.any <typeTok>

Extract a value-type from obj, its boxed representation

Object model instruction

0xB3

conv.ovf.i1

Convert to an int8 (on the stack as int32) and throw an exception on overflow.

Base instruction

0xB4

conv.ovf.u1

Convert to an unsigned int8 (on the stack as int32) and throw an exception on overflow.

Base instruction

0xB5

conv.ovf.i2

Convert to an int16 (on the stack as int32) and throw an exception on overflow.

Base instruction

0xB6

conv.ovf.u2

Convert to an unsigned int16 (on the stack as int32) and throw an exception on overflow.

Base instruction

0xB7

conv.ovf.i4

Convert to an int32 (on the stack as int32) and throw an exception on overflow.

Base instruction

0xB8

conv.ovf.u4

Convert to an unsigned int32 (on the stack as int32) and throw an exception on overflow.

Base instruction

0xB9

conv.ovf.i8

Convert to an int64 (on the stack as int64) and throw an exception on overflow.

Base instruction

0xBA

conv.ovf.u8

Convert to an unsigned int64 (on the stack as int64) and throw an exception on overflow.

Base instruction

0xC2

refanyval <type>

Push the address stored in a typed reference.

Object model instruction

0xC3

ckfinite

Throw ArithmeticException if value is not a finite number.

Base instruction

0xC6

mkrefany <class>

Push a typed reference to ptr of type class onto the stack.

Object model instruction

0xD0

ldtoken <token>

Convert metadata token to its runtime representation.

Object model instruction

0xD1

conv.u2

Convert to unsigned int16, pushing int32 on stack.

Base instruction

0xD2

conv.u1

Convert to unsigned int8, pushing int32 on stack.

Base instruction

0xD3

conv.i

Convert to native int, pushing native int on stack.

Base instruction

0xD4

conv.ovf.i

Convert to a native int (on the stack as native int) and throw an exception on overflow.

Base instruction

0xD5

conv.ovf.u

Convert to a native unsigned int (on the stack as native int) and throw an exception on overflow.

Base instruction

0xD6

add.ovf

Add signed integer values withoverflow check.

Base instruction

0xD7

add.ovf.un

Add unsigned integer values withoverflow check.

Base instruction

0xD8

mul.ovf

Multiply signed integer values. Signed result shall fit in same size

Base instruction

0xD9

mul.ovf.un

Multiply unsigned integer values. Unsigned result shall fit in same size

Base instruction

0xDA

sub.ovf

Subtract native int from a native int. Signed result shall fit in same size

Base instruction

0xDB

sub.ovf.un

Subtract native unsigned int from a native unsigned int. Unsigned result shall fit in same size.

Base instruction

0xDC

endfault

End fault clause of an exception block.

Base instruction

0xDC

endfinally

End finally clause of an exception block.

Base instruction

0xDD

leave <int32 (target)>

Exit a protected region of code.

Base instruction

0xDE

leave.s <int8 (target)>

Exit a protected region of code, short form.

Base instruction

0xDF

stind.i

Store value of type native int into memory at address

Base instruction

0xE0

conv.u

Convert to native unsigned int, pushing native int on stack.

Base instruction

0xFE 0x00

arglist

Return argument list handle for the current method.

Base instruction

0xFE 0x01

ceq

Push 1 (of type int32) if value1 equals value2, else push 0.

Base instruction

0xFE 0x02

cgt

Push 1 (of type int32) if value1 > value2, else push 0.

Base instruction

0xFE 0x03

cgt.un

Push 1 (of type int32) if value1 > value2, unsigned or unordered, else push 0.

Base instruction

0xFE 0x04

clt

Push 1 (of type int32) if value1 < value2, else push 0.

Base instruction

0xFE 0x05

clt.un

Push 1 (of type int32) if value1 < value2, unsigned or unordered, else push 0.

Base instruction

0xFE 0x06

ldftn <method>

Push a pointer to a method referenced by method, on the stack.

Base instruction

0xFE 0x07

ldvirtftn <method>

Push address of virtual method on the stack.

Object model instruction

0xFE 0x09

ldarg <uint16 (num)>

Load argument numbered num onto the stack.

Base instruction

0xFE 0x0A

ldarga <uint16 (argNum)>

Fetch the address of argument argNum.

Base instruction

0xFE 0x0B

starg <uint16 (num)>

Store value to the argument numbered num.

Base instruction

0xFE 0x0C

ldloc <uint16 (indx)>

Load local variable of index indx onto stack.

Base instruction

0xFE 0x0D

ldloca <uint16 (indx)>

Load address of local variable with index indx.

Base instruction

0xFE 0x0E

stloc <uint16 (indx)>

Pop a value from stack into local variable indx.

Base instruction

0xFE 0x0F

localloc

Allocate space from the local memory pool.

Base instruction

0xFE 0x11

endfilter

End an exception handling filter clause.

Base instruction

0xFE 0x12

unaligned. (alignment)

Subsequent pointer instruction might be unaligned.

Prefix to instruction

0xFE 0x13

volatile.

Subsequent pointer reference isvolatile.

Prefix to instruction

0xFE 0x14

tail.

Subsequent call terminates current method

Prefix to instruction

0xFE 0x15

initobj <typeTok>

Initialize the value at address dest.

Object model instruction

0xFE 0x16

constrained. <thisType>

Call a virtual method on a type constrained to be type T

Prefix to instruction

0xFE 0x17

cpblk

Copy data from memory to memory.

Base instruction

0xFE 0x18

initblk

Set all bytes in a block of memory to a given byte value.

Base instruction

0xFE 0x19

no. {

 typecheck,

 rangecheck,

 nullcheck

 }

The specified fault check(s) normally performed as part of the execution of the subsequent instruction can/shall be skipped.

Prefix to instruction

0xFE 0x1A

rethrow

Rethrow the current exception.

Object model instruction

0xFE 0x1C

sizeof <typeTok>

Push the size, in bytes, of a type as an unsigned int32.

Object model instruction

0xFE 0x1D

refanytype

Push the type token stored in a typed reference.

Object model instruction

0xFE 0x1E

readonly.

Specify that the subsequent array address operation performs no type check at runtime, and that it returns a controlled-mutability managed pointer

Prefix to instruction

 

原文地址:https://www.cnblogs.com/DeeLMind/p/6904613.html