Merge branch 'cecil-light'
[mono.git] / mcs / tools / cil-strip / Mono.Cecil.Cil / OpCodeNames.cs
1 //
2 // Copyright (C) 2008 Novell, Inc (http://www.novell.com)
3 //
4 // Permission is hereby granted, free of charge, to any person obtaining
5 // a copy of this software and associated documentation files (the
6 // "Software"), to deal in the Software without restriction, including
7 // without limitation the rights to use, copy, modify, merge, publish,
8 // distribute, sublicense, and/or sell copies of the Software, and to
9 // permit persons to whom the Software is furnished to do so, subject to
10 // the following conditions:
11 //
12 // The above copyright notice and this permission notice shall be
13 // included in all copies or substantial portions of the Software.
14 //
15 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
19 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
20 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 //
23
24 // copy-pasted from /mcs/class/corlib/System.Reflection.Emit/OpCodeNames.cs
25 // added names for "no." and "readonly."
26
27 namespace Mono.Cecil.Cil {
28
29         internal sealed class OpCodeNames {
30
31                 internal static readonly string [] names = {
32                         "nop",
33                         "break",
34                         "ldarg.0",
35                         "ldarg.1",
36                         "ldarg.2",
37                         "ldarg.3",
38                         "ldloc.0",
39                         "ldloc.1",
40                         "ldloc.2",
41                         "ldloc.3",
42                         "stloc.0",
43                         "stloc.1",
44                         "stloc.2",
45                         "stloc.3",
46                         "ldarg.s",
47                         "ldarga.s",
48                         "starg.s",
49                         "ldloc.s",
50                         "ldloca.s",
51                         "stloc.s",
52                         "ldnull",
53                         "ldc.i4.m1",
54                         "ldc.i4.0",
55                         "ldc.i4.1",
56                         "ldc.i4.2",
57                         "ldc.i4.3",
58                         "ldc.i4.4",
59                         "ldc.i4.5",
60                         "ldc.i4.6",
61                         "ldc.i4.7",
62                         "ldc.i4.8",
63                         "ldc.i4.s",
64                         "ldc.i4",
65                         "ldc.i8",
66                         "ldc.r4",
67                         "ldc.r8",
68                         null,
69                         "dup",
70                         "pop",
71                         "jmp",
72                         "call",
73                         "calli",
74                         "ret",
75                         "br.s",
76                         "brfalse.s",
77                         "brtrue.s",
78                         "beq.s",
79                         "bge.s",
80                         "bgt.s",
81                         "ble.s",
82                         "blt.s",
83                         "bne.un.s",
84                         "bge.un.s",
85                         "bgt.un.s",
86                         "ble.un.s",
87                         "blt.un.s",
88                         "br",
89                         "brfalse",
90                         "brtrue",
91                         "beq",
92                         "bge",
93                         "bgt",
94                         "ble",
95                         "blt",
96                         "bne.un",
97                         "bge.un",
98                         "bgt.un",
99                         "ble.un",
100                         "blt.un",
101                         "switch",
102                         "ldind.i1",
103                         "ldind.u1",
104                         "ldind.i2",
105                         "ldind.u2",
106                         "ldind.i4",
107                         "ldind.u4",
108                         "ldind.i8",
109                         "ldind.i",
110                         "ldind.r4",
111                         "ldind.r8",
112                         "ldind.ref",
113                         "stind.ref",
114                         "stind.i1",
115                         "stind.i2",
116                         "stind.i4",
117                         "stind.i8",
118                         "stind.r4",
119                         "stind.r8",
120                         "add",
121                         "sub",
122                         "mul",
123                         "div",
124                         "div.un",
125                         "rem",
126                         "rem.un",
127                         "and",
128                         "or",
129                         "xor",
130                         "shl",
131                         "shr",
132                         "shr.un",
133                         "neg",
134                         "not",
135                         "conv.i1",
136                         "conv.i2",
137                         "conv.i4",
138                         "conv.i8",
139                         "conv.r4",
140                         "conv.r8",
141                         "conv.u4",
142                         "conv.u8",
143                         "callvirt",
144                         "cpobj",
145                         "ldobj",
146                         "ldstr",
147                         "newobj",
148                         "castclass",
149                         "isinst",
150                         "conv.r.un",
151                         null,
152                         null,
153                         "unbox",
154                         "throw",
155                         "ldfld",
156                         "ldflda",
157                         "stfld",
158                         "ldsfld",
159                         "ldsflda",
160                         "stsfld",
161                         "stobj",
162                         "conv.ovf.i1.un",
163                         "conv.ovf.i2.un",
164                         "conv.ovf.i4.un",
165                         "conv.ovf.i8.un",
166                         "conv.ovf.u1.un",
167                         "conv.ovf.u2.un",
168                         "conv.ovf.u4.un",
169                         "conv.ovf.u8.un",
170                         "conv.ovf.i.un",
171                         "conv.ovf.u.un",
172                         "box",
173                         "newarr",
174                         "ldlen",
175                         "ldelema",
176                         "ldelem.i1",
177                         "ldelem.u1",
178                         "ldelem.i2",
179                         "ldelem.u2",
180                         "ldelem.i4",
181                         "ldelem.u4",
182                         "ldelem.i8",
183                         "ldelem.i",
184                         "ldelem.r4",
185                         "ldelem.r8",
186                         "ldelem.ref",
187                         "stelem.i",
188                         "stelem.i1",
189                         "stelem.i2",
190                         "stelem.i4",
191                         "stelem.i8",
192                         "stelem.r4",
193                         "stelem.r8",
194                         "stelem.ref",
195                         "ldelem.any",
196                         "stelem.any",
197                         "unbox.any",
198                         null,
199                         null,
200                         null,
201                         null,
202                         null,
203                         null,
204                         null,
205                         null,
206                         null,
207                         null,
208                         null,
209                         null,
210                         null,
211                         "conv.ovf.i1",
212                         "conv.ovf.u1",
213                         "conv.ovf.i2",
214                         "conv.ovf.u2",
215                         "conv.ovf.i4",
216                         "conv.ovf.u4",
217                         "conv.ovf.i8",
218                         "conv.ovf.u8",
219                         null,
220                         null,
221                         null,
222                         null,
223                         null,
224                         null,
225                         null,
226                         "refanyval",
227                         "ckfinite",
228                         null,
229                         null,
230                         "mkrefany",
231                         null,
232                         null,
233                         null,
234                         null,
235                         null,
236                         null,
237                         null,
238                         null,
239                         null,
240                         "ldtoken",
241                         "conv.u2",
242                         "conv.u1",
243                         "conv.i",
244                         "conv.ovf.i",
245                         "conv.ovf.u",
246                         "add.ovf",
247                         "add.ovf.un",
248                         "mul.ovf",
249                         "mul.ovf.un",
250                         "sub.ovf",
251                         "sub.ovf.un",
252                         "endfinally",
253                         "leave",
254                         "leave.s",
255                         "stind.i",
256                         "conv.u",
257                         null,
258                         null,
259                         null,
260                         null,
261                         null,
262                         null,
263                         null,
264                         null,
265                         null,
266                         null,
267                         null,
268                         null,
269                         null,
270                         null,
271                         null,
272                         null,
273                         null,
274                         null,
275                         null,
276                         null,
277                         null,
278                         null,
279                         null,
280                         "prefix7",
281                         "prefix6",
282                         "prefix5",
283                         "prefix4",
284                         "prefix3",
285                         "prefix2",
286                         "prefix1",
287                         "prefixref",
288                         "arglist",
289                         "ceq",
290                         "cgt",
291                         "cgt.un",
292                         "clt",
293                         "clt.un",
294                         "ldftn",
295                         "ldvirtftn",
296                         null,
297                         "ldarg",
298                         "ldarga",
299                         "starg",
300                         "ldloc",
301                         "ldloca",
302                         "stloc",
303                         "localloc",
304                         null,
305                         "endfilter",
306                         "unaligned.",
307                         "volatile.",
308                         "tail.",
309                         "initobj",
310                         "constrained.",
311                         "cpblk",
312                         "initblk",
313                         "no.",          // added by spouliot to match Cecil existing definitions
314                         "rethrow",
315                         null,
316                         "sizeof",
317                         "refanytype",
318                         "readonly.",    // added by spouliot to match Cecil existing definitions
319                         null,
320                         null,
321                         null,
322                         null,
323                         null,
324                         null,
325                         null,
326                         null,
327                         null,
328                         null,
329                         null,
330                         null,
331                         null,
332                         null,
333                         null,
334                         null,
335                         null,
336                 };
337         }
338 }