forked from garbervetsky/analysis-net
-
Notifications
You must be signed in to change notification settings - Fork 0
/
instructions.txt
171 lines (115 loc) · 4.98 KB
/
instructions.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
CIL Instruction Set
> Arithmetic instructions
>> Binary arithmetic instructions
add // add numeric values
add.ovf.<signed> // add integer values with overflow check
sub // subtract numeric values
sub.ovf.<type> // subtract integer values with overflow check
mul // multiply numeric values
mul.ovf.<type> // multiply integer values with overflow check
div // divide numeric values
div.un // divide integer values, unsigned
rem // compute numeric remainder
rem.un // compute integer remainder, unsigned
and // bitwise AND
or // bitwise OR
xor // bitwise XOR
shl // shift integer left
shr // shift integer right
shr.un // shift integer right, unsigned
>> Unary arithmetic instructions
neg // negate
not // bitwise complement
> Branch instructions
>> Conditional branch instructions
beq.<length> // branch on equal
bge.<length> // branch on greater than or equal to
bge.un.<length> // branch on greater than or equal to, unsigned or unordered
bgt.<length> // branch on greater than
bgt.un.<length> // branch on greater than, unsigned or unordered
ble.<length> // branch on less than or equal to
ble.un.<length> // branch on less than or equal to, unsigned or unordered
blt.<length> // branch on less than
blt.un.<length> // branch on less than, unsigned or unordered
bne.un<length> // branch on not equal or unordered
brfalse.<length> // branch on false, null, or zero
brtrue.<length> // branch on non-false or non-null
switch // table switch based on value
>> Unconditional branch instructions
br.<length> // unconditional branch
leave.<length> // exit a protected region of code
ret // return from method
> Call instructions
call // call a method
callvirt // call a method associated, at runtime, with an object
calli // indirect method call
jmp // jump to method
> Compare instructions
ceq // compare equal
cgt // compare greater than
cgt.un // compare greater than, unsigned or unordered
clt // compare less than
clt.un // compare less than, unsigned or unordered
isinst // test if an object is an instance of a class or interface
> Convert instructions
conv.<to type> // data conversion
conv.ovf.<to type> // data conversion with overflow check
conv.ovf.<to type>.un // data conversion with overflow check, unsigned
box // convert a boxable value to its boxed form
castclass // cast an object to a class
unbox // convert boxed value type to its raw form
unbox.any // convert boxed type to value
> Memory instructions
localloc // allocate space in the local dynamic memory pool
initblk // initialize a block of memory to a value
cpblk // copy data from memory to memory
cpobj // copy a value from one address to another
initobj // initialize the value at an address
newarr // create a zero-based, one-dimensional array
newobj // create a new object
> Exception handling instructions
endfilter // end exception handling filter clause
endfinally // end finally or fault clause of an exception block
throw // throw an exception
rethrow // rethrow the current exception
> Load instructions
ldc.<type> // load numeric constant
ldstr // load a literal string
ldnull // load a null pointer
ldarg.<length> // load argument onto the stack
ldloc // load local variable onto the stack
ldind.<type> // load a value indirect onto the stack
ldobj // copy a value from an address to the stack
ldarga.<length> // load argument address
ldloca.<length> // load local variable address
ldftn // load method pointer
ldvirtftn // load virtual method pointer
ldelem // load array element
ldelem.<type> // load array element
ldelema // load array element address
ldfld // load object field
ldflda // load object field address
ldsfld // load class static field
ldsflda // load class static field address
ldlen // load array length
ldtoken // load the runtime representation of a metadata token
> Store instructions
starg.<length> // store to argument
stloc // store to local variable
stind.<type> // store a value indirect from stack
stobj // store a value at an address from stack
stelem // store array element
stelem.<type> // store array element
stfld // store object field
stsfld // store class static field
> Other instructions
arglist // get argument list
break // breakpoint instruction
ckfinite // check for a finite real number
nop // no operation
dup // duplicate the top value of the stack
pop // remove the top element of the stack
mkrefany // push a typed reference on the stack
refanytype // load the type out of a typed reference
refanyval // load the address out of a typed reference
sizeof // load the size, in bytes, of a type