Appendix C - IL Instruction Set Reference

Appendix C

IL Instruction Set Reference

Instruction Parameter Types

Type

Description

int8

Signed 1-byte integer

uint8

Unsigned 1-byte integer

int32

Signed 4-byte integer

uint32

Unsigned 4-byte integer

int64

Signed 8-byte integer

float32

4-byte floating point number

float64

8-byte floating point number

<Method>

MethodDef or MemberRef token

<Field>

FieldDef or MemberRef token

<Type>

TypeDef, TypeRef, or TypeSpec token

<Signature>

StandAloneSig token

<String>

User-defined string token

Evaluation Stack Types

Type

Description

int32

Signed 4-byte integer

int64

Signed 8-byte integer

Float

80-bit floating point number

&

Managed or unmanaged pointer

o

Object reference

*

Unspecified type

IL Instructions 

Opcode

Name

Parameter(s)

Pop

Push

00

nop

-

-

-

01

break

-

-

-

02

ldarg.0

-

-

*

03

ldarg.1

-

-

*

04

ldarg.2

-

-

*

05

ldarg.3

-

-

*

06

ldloc.0

-

-

*

07

ldloc.1

-

-

*

08

ldloc.2

-

-

*

09

ldloc.3

-

-

*

0A

stloc.0

-

*

-

0B

stloc.1

-

*

-

0C

stloc.2

-

*

-

0D

stloc.3

-

*

-

0E

ldarg.s

uint8

-

*

0F

ldarga.s

uint8

-

&

10

starg.s

uint8

*

-

11

ldloc.s

uint8

-

*

12

ldloca.s

uint8

-

&

13

stloc.s

uint8

*

-

14

ldnull

-

-

&=0

15

ldc.i4.m1ldc.i4.M1

-

-

int32=-1

16

ldc.i4.0

-

-

int32=0

17

ldc.i4.1

-

-

int32=1

18

ldc.i4.2

-

-

int32=2

19

ldc.i4.3

-

-

int32=3

1A

ldc.i4.4

-

-

int32=4

1B

ldc.i4.5

-

-

int32=5

1C

ldc.i4.6

-

-

int32=6

1D

ldc.i4.7

-

-

int32=7

1E

ldc.i4.8

-

-

int32=8

1F

ldc.i4.s

int8

-

int32

20

ldc.i4

int32

-

int32

21

ldc.i8

int64

-

int64

22

ldc.r4

float32

-

Float

23

ldc.r8

float64

-

Float

25

dup

-

*

*,*

26

pop

-

*

-

27

jmp

<Method>

-

-

28

call

<Method>

N arguments

Ret.value

29

calli

<Signature>

N arguments

Ret.value

2A

ret

-

*

-

2B

br.s

int8

-

-

2C

brfalse.sbrnull.sbrzero.s

int8

int32

-

2D

brtrue.sbrinst.s

int8

int32

-

2E

beq.s

int8

*,*

-

2F

bge.s

int8

*,*

-

30

bgt.s

int8

*,*

-

31

ble.s

int8

*,*

-

32

blt.s

int8

*,*

-

33

bne.un.s

int8

*,*

-

34

bge.un.s

int8

*,*

-

35

bgt.un.s

int8

*,*

-

36

ble.un.s

int8

*,*

-

37

blt.un.s

int8

*,*

-

38

br

int32

-

-

39

brfalsebrnullbrzero

int32

int32

-

3A

brtruebrinst

int32

int32

-

3B

beq

int32

*,*

-

3C

bge

int32

*,*

-

3D

bgt

int32

*,*

-

3E

ble

int32

*,*

-

3F

blt

int32

*,*

-

40

bne.un

int32

*,*

-

41

bge.un

int32

*,*

-

42

bgt.un

int32

*,*

-

43

ble.un

int32

*,*

-

44

blt.un

int32

*,*

-

45

switch

(uint32=N) + N(int32)

*,*

-

46

ldind.i1

-

&

int32

47

ldind.u1

-

&

int32

48

ldind.i2

-

&

int32

49

ldind.u2

-

&

int32

4A

ldind.i4

-

&

int32

4B

ldind.u4

-

&

int32

4C

ldind.i8ldind.u8

-

&

int64

4D

ldind.i

-

&

int32

4E

ldind.r4

-

&

Float

4F

ldind.r8

-

&

Float

50

ldind.ref

-

&

&

51

stind.ref

-

&,&

-

52

stind.i1

-

int32,&

-

53

stind.i2

-

int32,&

-

54

stind.i4

-

int32,&

-

55

stind.i8

-

int32,&

-

56

stind.r4

-

Float,&

-

57

stind.r8

-

Float,&

-

58

add

-

*,*

*

59

sub

-

*,*

*

5A

mul

-

*,*

*

5B

div

-

*,*

*

5C

div.un

-

*,*

*

5D

rem

-

*,*

*

5E

rem.un

-

*,*

*

5F

and

-

*,*

*

60

or

-

*,*

*

61

xor

-

*,*

*

62

shl

-

*,*

*

63

shr

-

*,*

*

64

shr.un

-

*,*

*

65

neg

-

*

*

66

not

-

*

*

67

conv.i1

-

*

int32

68

conv.i2

-

*

int32

69

conv.i4

-

*

int32

6A

conv.i8

-

*

int64

6B

conv.r4

-

*

Float

6C

conv.r8

-

*

Float

6D

conv.u4

-

*

int32

6E

conv.u8

-

*

int64

6F

callvirt

<Method>

N arguments

Ret.value

70

cpobj

<

Type

>

&,&

-

71

ldobj

<Type>

&

*

72

ldstr

<String>

-

o

73

newobj

<Method>

N arguments

o

74

castclass

<Type>

o

o

75

isinst

<Type>

o

int32

76

conv.r.un

-

*

Float

79

unbox

<Type>

o

&

7A

throw

-

o

-

7B

ldfld

<Field>

o/&

*

7C

ldflda

<Field>

o/&

&

7D

stfld

<Field>

o/&,*

-

7E

ldsfld

<Field>

-

*

7F

ldsflda

<Field>

-

&

80

stsfld

<Field>

*

-

81

stobj

<Type>

&,*

-

82

conv.ovf.i1.un

-

*

int32

83

conv.ovf.i2.un

-

*

int32

84

conv.ovf.i4.un

-

*

int32

85

conv.ovf.i8.un

-

*

int64

86

conv.ovf.u1.un

-

*

int32

87

conv.ovf.u2.un

-

*

int32

88

conv.ovf.u4.un

-

*

int32

89

conv.ovf.u8.un

-

*

int64

8A

conv.ovf.i.un

-

*

int32

8B

conv.ovf.u.un

-

*

int64

8C

box

<Type>

*

o

8D

newarr

<Type>

int32

o

8E

ldlen

-

o

int32

8F

ldelema

<Type>

int32,o

&

90

ldelem.i1

-

int32,o

int32

91

ldelem.u1

-

int32,o

int32

92

ldelem.i2

-

int32,o

int32

93

ldelem.u2

-

int32,o

int32

94

ldelem.i4

-

int32,o

int32

95

ldelem.u4

-

int32,o

int32

96

ldelem.i8ldelem.u8

-

int32,o

int64

97

ldelem.i

-

int32,o

int32

98

ldelem.r4

-

int32,o

Float

99

ldelem.r8

-

int32,o

Float

9A

ldelem.ref

-

int32,o

o/&

9B

stelem.i

-

int32,int32,o

-

9C

stelem.i1

-

int32,int32,o

-

9D

stelem.i2

-

int32,int32,o

-

9E

stelem.i4

-

int32,int32,o

-

9F

stelem.i8

-

int64,int32,o

-

A0

stelem.r4

-

Float,int32,o

-

A1

stelem.r8

-

Float,int32,o

-

A2

stelem.ref

-

o/&,int32,o

-

B3

conv.ovf.i1

-

*

int32

B4

conv.ovf.u1

-

*

int32

B5

conv.ovf.i2

-

*

int32

B6

conv.ovf.u2

-

*

int32

B7

conv.ovf.i4

-

*

int32

B8

conv.ovf.u4

-

*

int32

B9

conv.ovf.i8

-

*

int64

BA

conv.ovf.u8

-

*

int64

C2

refanyval

<Type>

*

&

C3

ckfinite

-

*

Float

C6

mkrefany

<Type>

&

*

D0

ldtoken

<Type>/ <Field>/ <Method>

-

&

D1

conv.u2

-

*

int32

D2

conv.u1

-

*

int32

D3

conv.i

-

*

int32

D4

conv.ovf.i

-

*

int32

D5

conv.ovf.u

-

*

int32

D6

add.ovf

-

*,*

*

D7

add.ovf.un

-

*,*

*

D8

mul.ovf

-

*,*

*

D9

mul.ovf.un

-

*,*

*

DA

sub.ovf

-

*,*

*

DB

sub.ovf.un

-

*,*

*

DC

endfinallyendfault

-

-

-

DD

leave

int32

-

-

DE

leave.s

int8

-

-

DF

stind.i

-

int32,&

-

E0

conv.u

-

*

int32

FE 00

arglist

-

*

&

FE 01

ceq

-

*,*

int32

FE 02

cgt

-

*,*

int32

FE 03

cgt.un

-

*,*

int32

FE 04

clt

-

*,*

int32

FE 05

clt.un

-

*,*

int32

FE 06

ldftn

<Method>

-

&

FE 07

ldvirtftn

<Method>

o

&

FE 09

ldarg

uint32

-

*

FE 0A

ldarga

uint32

-

&

FE 0B

starg

uint32

*

-

FE 0C

ldloc

uint32

-

*

FE 0D

ldloca

uint32

-

&

FE 0E

stloc

uint32

*

-

FE 0F

localloc

-

int32

&

FE 11

endfilter

-

int32

-

FE 12

unaligned.

uint8

-

-

FE 13

volatile.

-

-

-

FE 14

tail.

-

-

-

FE 15

initobj

<Type>

&

-

FE 17

cpblk

-

int32,&,&

-

FE 18

initblk

-

int32,int32,&

-

FE 1A

rethrow

-

-

-

FE 1C

sizeof

<Type>

-

int32

FE 1D

refanytype

-

*

&



Inside Microsoft. NET IL Assembler
Inside Microsoft .NET IL Assembler
ISBN: 0735615470
EAN: 2147483647
Year: 2005
Pages: 147
Authors: SERGE LIDIN

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net