forked from pigboy1984/smali2java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathOpcodes.java
More file actions
312 lines (274 loc) · 12.4 KB
/
Opcodes.java
File metadata and controls
312 lines (274 loc) · 12.4 KB
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
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
/*
* Copyright (C) 2007 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package dalvik.bytecode;
/**
* This is a list of Dalvik opcodes.
*
* (This was converted from //device/dalvik/libdex/OpCode.h)
*/
public interface Opcodes {
int OP_NOP = 0x00;
int OP_MOVE = 0x01;
int OP_MOVE_FROM16 = 0x02;
int OP_MOVE_16 = 0x03;
int OP_MOVE_WIDE = 0x04;
int OP_MOVE_WIDE_FROM16 = 0x05;
int OP_MOVE_WIDE_16 = 0x06;
int OP_MOVE_OBJECT = 0x07;
int OP_MOVE_OBJECT_FROM16 = 0x08;
int OP_MOVE_OBJECT_16 = 0x09;
int OP_MOVE_RESULT = 0x0a;
int OP_MOVE_RESULT_WIDE = 0x0b;
int OP_MOVE_RESULT_OBJECT = 0x0c;
int OP_MOVE_EXCEPTION = 0x0d;
int OP_RETURN_VOID = 0x0e;
int OP_RETURN = 0x0f;
int OP_RETURN_WIDE = 0x10;
int OP_RETURN_OBJECT = 0x11;
int OP_CONST_4 = 0x12;
int OP_CONST_16 = 0x13;
int OP_CONST = 0x14;
int OP_CONST_HIGH16 = 0x15;
int OP_CONST_WIDE_16 = 0x16;
int OP_CONST_WIDE_32 = 0x17;
int OP_CONST_WIDE = 0x18;
int OP_CONST_WIDE_HIGH16 = 0x19;
int OP_CONST_STRING = 0x1a;
int OP_CONST_STRING_JUMBO = 0x1b;
int OP_CONST_CLASS = 0x1c;
int OP_MONITOR_ENTER = 0x1d;
int OP_MONITOR_EXIT = 0x1e;
int OP_CHECK_CAST = 0x1f;
int OP_INSTANCE_OF = 0x20;
int OP_ARRAY_LENGTH = 0x21;
int OP_NEW_INSTANCE = 0x22;
int OP_NEW_ARRAY = 0x23;
int OP_FILLED_NEW_ARRAY = 0x24;
int OP_FILLED_NEW_ARRAY_RANGE = 0x25;
int OP_FILL_ARRAY_DATA = 0x26;
int OP_THROW = 0x27;
int OP_GOTO = 0x28;
int OP_GOTO_16 = 0x29;
int OP_GOTO_32 = 0x2a;
int OP_PACKED_SWITCH = 0x2b;
int OP_SPARSE_SWITCH = 0x2c;
int OP_CMPL_FLOAT = 0x2d;
int OP_CMPG_FLOAT = 0x2e;
int OP_CMPL_DOUBLE = 0x2f;
int OP_CMPG_DOUBLE = 0x30;
int OP_CMP_LONG = 0x31;
int OP_IF_EQ = 0x32;
int OP_IF_NE = 0x33;
int OP_IF_LT = 0x34;
int OP_IF_GE = 0x35;
int OP_IF_GT = 0x36;
int OP_IF_LE = 0x37;
int OP_IF_EQZ = 0x38;
int OP_IF_NEZ = 0x39;
int OP_IF_LTZ = 0x3a;
int OP_IF_GEZ = 0x3b;
int OP_IF_GTZ = 0x3c;
int OP_IF_LEZ = 0x3d;
/* 3e-43 unused */
int OP_AGET = 0x44;
int OP_AGET_WIDE = 0x45;
int OP_AGET_OBJECT = 0x46;
int OP_AGET_BOOLEAN = 0x47;
int OP_AGET_BYTE = 0x48;
int OP_AGET_CHAR = 0x49;
int OP_AGET_SHORT = 0x4a;
int OP_APUT = 0x4b;
int OP_APUT_WIDE = 0x4c;
int OP_APUT_OBJECT = 0x4d;
int OP_APUT_BOOLEAN = 0x4e;
int OP_APUT_BYTE = 0x4f;
int OP_APUT_CHAR = 0x50;
int OP_APUT_SHORT = 0x51;
int OP_IGET = 0x52;
int OP_IGET_WIDE = 0x53;
int OP_IGET_OBJECT = 0x54;
int OP_IGET_BOOLEAN = 0x55;
int OP_IGET_BYTE = 0x56;
int OP_IGET_CHAR = 0x57;
int OP_IGET_SHORT = 0x58;
int OP_IPUT = 0x59;
int OP_IPUT_WIDE = 0x5a;
int OP_IPUT_OBJECT = 0x5b;
int OP_IPUT_BOOLEAN = 0x5c;
int OP_IPUT_BYTE = 0x5d;
int OP_IPUT_CHAR = 0x5e;
int OP_IPUT_SHORT = 0x5f;
int OP_SGET = 0x60;
int OP_SGET_WIDE = 0x61;
int OP_SGET_OBJECT = 0x62;
int OP_SGET_BOOLEAN = 0x63;
int OP_SGET_BYTE = 0x64;
int OP_SGET_CHAR = 0x65;
int OP_SGET_SHORT = 0x66;
int OP_SPUT = 0x67;
int OP_SPUT_WIDE = 0x68;
int OP_SPUT_OBJECT = 0x69;
int OP_SPUT_BOOLEAN = 0x6a;
int OP_SPUT_BYTE = 0x6b;
int OP_SPUT_CHAR = 0x6c;
int OP_SPUT_SHORT = 0x6d;
int OP_INVOKE_VIRTUAL = 0x6e;
int OP_INVOKE_SUPER = 0x6f;
int OP_INVOKE_DIRECT = 0x70;
int OP_INVOKE_STATIC = 0x71;
int OP_INVOKE_INTERFACE = 0x72;
/* 73 unused */
int OP_INVOKE_VIRTUAL_RANGE = 0x74;
int OP_INVOKE_SUPER_RANGE = 0x75;
int OP_INVOKE_DIRECT_RANGE = 0x76;
int OP_INVOKE_STATIC_RANGE = 0x77;
int OP_INVOKE_INTERFACE_RANGE = 0x78;
/* 79-7a unused */
int OP_NEG_INT = 0x7b;
int OP_NOT_INT = 0x7c;
int OP_NEG_LONG = 0x7d;
int OP_NOT_LONG = 0x7e;
int OP_NEG_FLOAT = 0x7f;
int OP_NEG_DOUBLE = 0x80;
int OP_INT_TO_LONG = 0x81;
int OP_INT_TO_FLOAT = 0x82;
int OP_INT_TO_DOUBLE = 0x83;
int OP_LONG_TO_INT = 0x84;
int OP_LONG_TO_FLOAT = 0x85;
int OP_LONG_TO_DOUBLE = 0x86;
int OP_FLOAT_TO_INT = 0x87;
int OP_FLOAT_TO_LONG = 0x88;
int OP_FLOAT_TO_DOUBLE = 0x89;
int OP_DOUBLE_TO_INT = 0x8a;
int OP_DOUBLE_TO_LONG = 0x8b;
int OP_DOUBLE_TO_FLOAT = 0x8c;
int OP_INT_TO_BYTE = 0x8d;
int OP_INT_TO_CHAR = 0x8e;
int OP_INT_TO_SHORT = 0x8f;
int OP_ADD_INT = 0x90;
int OP_SUB_INT = 0x91;
int OP_MUL_INT = 0x92;
int OP_DIV_INT = 0x93;
int OP_REM_INT = 0x94;
int OP_AND_INT = 0x95;
int OP_OR_INT = 0x96;
int OP_XOR_INT = 0x97;
int OP_SHL_INT = 0x98;
int OP_SHR_INT = 0x99;
int OP_USHR_INT = 0x9a;
int OP_ADD_LONG = 0x9b;
int OP_SUB_LONG = 0x9c;
int OP_MUL_LONG = 0x9d;
int OP_DIV_LONG = 0x9e;
int OP_REM_LONG = 0x9f;
int OP_AND_LONG = 0xa0;
int OP_OR_LONG = 0xa1;
int OP_XOR_LONG = 0xa2;
int OP_SHL_LONG = 0xa3;
int OP_SHR_LONG = 0xa4;
int OP_USHR_LONG = 0xa5;
int OP_ADD_FLOAT = 0xa6;
int OP_SUB_FLOAT = 0xa7;
int OP_MUL_FLOAT = 0xa8;
int OP_DIV_FLOAT = 0xa9;
int OP_REM_FLOAT = 0xaa;
int OP_ADD_DOUBLE = 0xab;
int OP_SUB_DOUBLE = 0xac;
int OP_MUL_DOUBLE = 0xad;
int OP_DIV_DOUBLE = 0xae;
int OP_REM_DOUBLE = 0xaf;
int OP_ADD_INT_2ADDR = 0xb0;
int OP_SUB_INT_2ADDR = 0xb1;
int OP_MUL_INT_2ADDR = 0xb2;
int OP_DIV_INT_2ADDR = 0xb3;
int OP_REM_INT_2ADDR = 0xb4;
int OP_AND_INT_2ADDR = 0xb5;
int OP_OR_INT_2ADDR = 0xb6;
int OP_XOR_INT_2ADDR = 0xb7;
int OP_SHL_INT_2ADDR = 0xb8;
int OP_SHR_INT_2ADDR = 0xb9;
int OP_USHR_INT_2ADDR = 0xba;
int OP_ADD_LONG_2ADDR = 0xbb;
int OP_SUB_LONG_2ADDR = 0xbc;
int OP_MUL_LONG_2ADDR = 0xbd;
int OP_DIV_LONG_2ADDR = 0xbe;
int OP_REM_LONG_2ADDR = 0xbf;
int OP_AND_LONG_2ADDR = 0xc0;
int OP_OR_LONG_2ADDR = 0xc1;
int OP_XOR_LONG_2ADDR = 0xc2;
int OP_SHL_LONG_2ADDR = 0xc3;
int OP_SHR_LONG_2ADDR = 0xc4;
int OP_USHR_LONG_2ADDR = 0xc5;
int OP_ADD_FLOAT_2ADDR = 0xc6;
int OP_SUB_FLOAT_2ADDR = 0xc7;
int OP_MUL_FLOAT_2ADDR = 0xc8;
int OP_DIV_FLOAT_2ADDR = 0xc9;
int OP_REM_FLOAT_2ADDR = 0xca;
int OP_ADD_DOUBLE_2ADDR = 0xcb;
int OP_SUB_DOUBLE_2ADDR = 0xcc;
int OP_MUL_DOUBLE_2ADDR = 0xcd;
int OP_DIV_DOUBLE_2ADDR = 0xce;
int OP_REM_DOUBLE_2ADDR = 0xcf;
int OP_ADD_INT_LIT16 = 0xd0;
int OP_RSUB_INT = 0xd1; /* no _LIT16 suffix for this */
int OP_MUL_INT_LIT16 = 0xd2;
int OP_DIV_INT_LIT16 = 0xd3;
int OP_REM_INT_LIT16 = 0xd4;
int OP_AND_INT_LIT16 = 0xd5;
int OP_OR_INT_LIT16 = 0xd6;
int OP_XOR_INT_LIT16 = 0xd7;
int OP_ADD_INT_LIT8 = 0xd8;
int OP_RSUB_INT_LIT8 = 0xd9;
int OP_MUL_INT_LIT8 = 0xda;
int OP_DIV_INT_LIT8 = 0xdb;
int OP_REM_INT_LIT8 = 0xdc;
int OP_AND_INT_LIT8 = 0xdd;
int OP_OR_INT_LIT8 = 0xde;
int OP_XOR_INT_LIT8 = 0xdf;
int OP_SHL_INT_LIT8 = 0xe0;
int OP_SHR_INT_LIT8 = 0xe1;
int OP_USHR_INT_LIT8 = 0xe2;
/* e3-e7 unused */
/*
* The rest of these are either generated by dexopt for optimized
* code, or inserted by the VM at runtime. They are never generated
* by "dx".
*/
int OP_IGET_WIDE_VOLATILE = 0xe8;
int OP_IPUT_WIDE_VOLATILE = 0xe9;
int OP_SGET_WIDE_VOLATILE = 0xea;
int OP_SPUT_WIDE_VOLATILE = 0xeb;
int OP_BREAKPOINT = 0xec;
int OP_THROW_VERIFICATION_ERROR = 0xed;
int OP_EXECUTE_INLINE = 0xee;
int OP_EXECUTE_INLINE_RANGE = 0xef;
int OP_INVOKE_DIRECT_EMPTY = 0xf0;
/* f1 unused (OP_INVOKE_DIRECT_EMPTY_RANGE?) */
int OP_IGET_QUICK = 0xf2;
int OP_IGET_WIDE_QUICK = 0xf3;
int OP_IGET_OBJECT_QUICK = 0xf4;
int OP_IPUT_QUICK = 0xf5;
int OP_IPUT_WIDE_QUICK = 0xf6;
int OP_IPUT_OBJECT_QUICK = 0xf7;
int OP_INVOKE_VIRTUAL_QUICK = 0xf8;
int OP_INVOKE_VIRTUAL_QUICK_RANGE = 0xf9;
int OP_INVOKE_SUPER_QUICK = 0xfa;
int OP_INVOKE_SUPER_QUICK_RANGE = 0xfb;
/* fc unused (OP_INVOKE_DIRECT_QUICK?) */
/* fd unused (OP_INVOKE_DIRECT_QUICK_RANGE?) */
/* fe unused (OP_INVOKE_INTERFACE_QUICK?) */
/* ff unused (OP_INVOKE_INTERFACE_QUICK_RANGE?) */
}