1 /* 2 * Copyright (C) 2008 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 /* 18 * Dalvik opcode information. 19 * 20 * IMPORTANT NOTE: The contents of this file are mostly generated 21 * automatically by the opcode-gen tool. Any edits to the generated 22 * sections will get wiped out the next time the tool is run. 23 * 24 * See the file opcode-gen/README.txt for information about updating 25 * opcodes and instruction formats. 26 */ 27 28 #ifndef LIBDEX_DEXOPCODES_H_ 29 #define LIBDEX_DEXOPCODES_H_ 30 31 #include "DexFile.h" 32 33 /* 34 * kMaxOpcodeValue: the highest possible raw (unpacked) opcode value 35 * 36 * kNumPackedOpcodes: the highest possible packed opcode value of a 37 * valid Dalvik opcode, plus one 38 * 39 * TODO: Change this once the rest of the code is prepared to deal with 40 * extended opcodes. 41 */ 42 // BEGIN(libdex-maximum-values); GENERATED AUTOMATICALLY BY opcode-gen 43 #define kMaxOpcodeValue 0xffff 44 #define kNumPackedOpcodes 0x200 45 // END(libdex-maximum-values); GENERATED AUTOMATICALLY BY opcode-gen 46 47 /* 48 * Switch table and array data signatures are a code unit consisting 49 * of "NOP" (0x00) in the low-order byte and a non-zero identifying 50 * code in the high-order byte. (A true NOP is 0x0000.) 51 */ 52 #define kPackedSwitchSignature 0x0100 53 #define kSparseSwitchSignature 0x0200 54 #define kArrayDataSignature 0x0300 55 56 /* 57 * Enumeration of all Dalvik opcodes, where the enumeration value 58 * associated with each is the corresponding packed opcode number. 59 * This is different than the opcode value from the Dalvik bytecode 60 * spec for opcode values >= 0xff; see dexOpcodeFromCodeUnit() below. 61 * 62 * A note about the "breakpoint" opcode. This instruction is special, 63 * in that it should never be seen by anything but the debug 64 * interpreter. During debugging it takes the place of an arbitrary 65 * opcode, which means operations like "tell me the opcode width so I 66 * can find the next instruction" aren't possible. (This is 67 * correctable, but probably not useful.) 68 */ 69 enum Opcode { 70 // BEGIN(libdex-opcode-enum); GENERATED AUTOMATICALLY BY opcode-gen 71 OP_NOP = 0x00, 72 OP_MOVE = 0x01, 73 OP_MOVE_FROM16 = 0x02, 74 OP_MOVE_16 = 0x03, 75 OP_MOVE_WIDE = 0x04, 76 OP_MOVE_WIDE_FROM16 = 0x05, 77 OP_MOVE_WIDE_16 = 0x06, 78 OP_MOVE_OBJECT = 0x07, 79 OP_MOVE_OBJECT_FROM16 = 0x08, 80 OP_MOVE_OBJECT_16 = 0x09, 81 OP_MOVE_RESULT = 0x0a, 82 OP_MOVE_RESULT_WIDE = 0x0b, 83 OP_MOVE_RESULT_OBJECT = 0x0c, 84 OP_MOVE_EXCEPTION = 0x0d, 85 OP_RETURN_VOID = 0x0e, 86 OP_RETURN = 0x0f, 87 OP_RETURN_WIDE = 0x10, 88 OP_RETURN_OBJECT = 0x11, 89 OP_CONST_4 = 0x12, 90 OP_CONST_16 = 0x13, 91 OP_CONST = 0x14, 92 OP_CONST_HIGH16 = 0x15, 93 OP_CONST_WIDE_16 = 0x16, 94 OP_CONST_WIDE_32 = 0x17, 95 OP_CONST_WIDE = 0x18, 96 OP_CONST_WIDE_HIGH16 = 0x19, 97 OP_CONST_STRING = 0x1a, 98 OP_CONST_STRING_JUMBO = 0x1b, 99 OP_CONST_CLASS = 0x1c, 100 OP_MONITOR_ENTER = 0x1d, 101 OP_MONITOR_EXIT = 0x1e, 102 OP_CHECK_CAST = 0x1f, 103 OP_INSTANCE_OF = 0x20, 104 OP_ARRAY_LENGTH = 0x21, 105 OP_NEW_INSTANCE = 0x22, 106 OP_NEW_ARRAY = 0x23, 107 OP_FILLED_NEW_ARRAY = 0x24, 108 OP_FILLED_NEW_ARRAY_RANGE = 0x25, 109 OP_FILL_ARRAY_DATA = 0x26, 110 OP_THROW = 0x27, 111 OP_GOTO = 0x28, 112 OP_GOTO_16 = 0x29, 113 OP_GOTO_32 = 0x2a, 114 OP_PACKED_SWITCH = 0x2b, 115 OP_SPARSE_SWITCH = 0x2c, 116 OP_CMPL_FLOAT = 0x2d, 117 OP_CMPG_FLOAT = 0x2e, 118 OP_CMPL_DOUBLE = 0x2f, 119 OP_CMPG_DOUBLE = 0x30, 120 OP_CMP_LONG = 0x31, 121 OP_IF_EQ = 0x32, 122 OP_IF_NE = 0x33, 123 OP_IF_LT = 0x34, 124 OP_IF_GE = 0x35, 125 OP_IF_GT = 0x36, 126 OP_IF_LE = 0x37, 127 OP_IF_EQZ = 0x38, 128 OP_IF_NEZ = 0x39, 129 OP_IF_LTZ = 0x3a, 130 OP_IF_GEZ = 0x3b, 131 OP_IF_GTZ = 0x3c, 132 OP_IF_LEZ = 0x3d, 133 OP_UNUSED_3E = 0x3e, 134 OP_UNUSED_3F = 0x3f, 135 OP_UNUSED_40 = 0x40, 136 OP_UNUSED_41 = 0x41, 137 OP_UNUSED_42 = 0x42, 138 OP_UNUSED_43 = 0x43, 139 OP_AGET = 0x44, 140 OP_AGET_WIDE = 0x45, 141 OP_AGET_OBJECT = 0x46, 142 OP_AGET_BOOLEAN = 0x47, 143 OP_AGET_BYTE = 0x48, 144 OP_AGET_CHAR = 0x49, 145 OP_AGET_SHORT = 0x4a, 146 OP_APUT = 0x4b, 147 OP_APUT_WIDE = 0x4c, 148 OP_APUT_OBJECT = 0x4d, 149 OP_APUT_BOOLEAN = 0x4e, 150 OP_APUT_BYTE = 0x4f, 151 OP_APUT_CHAR = 0x50, 152 OP_APUT_SHORT = 0x51, 153 OP_IGET = 0x52, 154 OP_IGET_WIDE = 0x53, 155 OP_IGET_OBJECT = 0x54, 156 OP_IGET_BOOLEAN = 0x55, 157 OP_IGET_BYTE = 0x56, 158 OP_IGET_CHAR = 0x57, 159 OP_IGET_SHORT = 0x58, 160 OP_IPUT = 0x59, 161 OP_IPUT_WIDE = 0x5a, 162 OP_IPUT_OBJECT = 0x5b, 163 OP_IPUT_BOOLEAN = 0x5c, 164 OP_IPUT_BYTE = 0x5d, 165 OP_IPUT_CHAR = 0x5e, 166 OP_IPUT_SHORT = 0x5f, 167 OP_SGET = 0x60, 168 OP_SGET_WIDE = 0x61, 169 OP_SGET_OBJECT = 0x62, 170 OP_SGET_BOOLEAN = 0x63, 171 OP_SGET_BYTE = 0x64, 172 OP_SGET_CHAR = 0x65, 173 OP_SGET_SHORT = 0x66, 174 OP_SPUT = 0x67, 175 OP_SPUT_WIDE = 0x68, 176 OP_SPUT_OBJECT = 0x69, 177 OP_SPUT_BOOLEAN = 0x6a, 178 OP_SPUT_BYTE = 0x6b, 179 OP_SPUT_CHAR = 0x6c, 180 OP_SPUT_SHORT = 0x6d, 181 OP_INVOKE_VIRTUAL = 0x6e, 182 OP_INVOKE_SUPER = 0x6f, 183 OP_INVOKE_DIRECT = 0x70, 184 OP_INVOKE_STATIC = 0x71, 185 OP_INVOKE_INTERFACE = 0x72, 186 OP_UNUSED_73 = 0x73, 187 OP_INVOKE_VIRTUAL_RANGE = 0x74, 188 OP_INVOKE_SUPER_RANGE = 0x75, 189 OP_INVOKE_DIRECT_RANGE = 0x76, 190 OP_INVOKE_STATIC_RANGE = 0x77, 191 OP_INVOKE_INTERFACE_RANGE = 0x78, 192 OP_UNUSED_79 = 0x79, 193 OP_UNUSED_7A = 0x7a, 194 OP_NEG_INT = 0x7b, 195 OP_NOT_INT = 0x7c, 196 OP_NEG_LONG = 0x7d, 197 OP_NOT_LONG = 0x7e, 198 OP_NEG_FLOAT = 0x7f, 199 OP_NEG_DOUBLE = 0x80, 200 OP_INT_TO_LONG = 0x81, 201 OP_INT_TO_FLOAT = 0x82, 202 OP_INT_TO_DOUBLE = 0x83, 203 OP_LONG_TO_INT = 0x84, 204 OP_LONG_TO_FLOAT = 0x85, 205 OP_LONG_TO_DOUBLE = 0x86, 206 OP_FLOAT_TO_INT = 0x87, 207 OP_FLOAT_TO_LONG = 0x88, 208 OP_FLOAT_TO_DOUBLE = 0x89, 209 OP_DOUBLE_TO_INT = 0x8a, 210 OP_DOUBLE_TO_LONG = 0x8b, 211 OP_DOUBLE_TO_FLOAT = 0x8c, 212 OP_INT_TO_BYTE = 0x8d, 213 OP_INT_TO_CHAR = 0x8e, 214 OP_INT_TO_SHORT = 0x8f, 215 OP_ADD_INT = 0x90, 216 OP_SUB_INT = 0x91, 217 OP_MUL_INT = 0x92, 218 OP_DIV_INT = 0x93, 219 OP_REM_INT = 0x94, 220 OP_AND_INT = 0x95, 221 OP_OR_INT = 0x96, 222 OP_XOR_INT = 0x97, 223 OP_SHL_INT = 0x98, 224 OP_SHR_INT = 0x99, 225 OP_USHR_INT = 0x9a, 226 OP_ADD_LONG = 0x9b, 227 OP_SUB_LONG = 0x9c, 228 OP_MUL_LONG = 0x9d, 229 OP_DIV_LONG = 0x9e, 230 OP_REM_LONG = 0x9f, 231 OP_AND_LONG = 0xa0, 232 OP_OR_LONG = 0xa1, 233 OP_XOR_LONG = 0xa2, 234 OP_SHL_LONG = 0xa3, 235 OP_SHR_LONG = 0xa4, 236 OP_USHR_LONG = 0xa5, 237 OP_ADD_FLOAT = 0xa6, 238 OP_SUB_FLOAT = 0xa7, 239 OP_MUL_FLOAT = 0xa8, 240 OP_DIV_FLOAT = 0xa9, 241 OP_REM_FLOAT = 0xaa, 242 OP_ADD_DOUBLE = 0xab, 243 OP_SUB_DOUBLE = 0xac, 244 OP_MUL_DOUBLE = 0xad, 245 OP_DIV_DOUBLE = 0xae, 246 OP_REM_DOUBLE = 0xaf, 247 OP_ADD_INT_2ADDR = 0xb0, 248 OP_SUB_INT_2ADDR = 0xb1, 249 OP_MUL_INT_2ADDR = 0xb2, 250 OP_DIV_INT_2ADDR = 0xb3, 251 OP_REM_INT_2ADDR = 0xb4, 252 OP_AND_INT_2ADDR = 0xb5, 253 OP_OR_INT_2ADDR = 0xb6, 254 OP_XOR_INT_2ADDR = 0xb7, 255 OP_SHL_INT_2ADDR = 0xb8, 256 OP_SHR_INT_2ADDR = 0xb9, 257 OP_USHR_INT_2ADDR = 0xba, 258 OP_ADD_LONG_2ADDR = 0xbb, 259 OP_SUB_LONG_2ADDR = 0xbc, 260 OP_MUL_LONG_2ADDR = 0xbd, 261 OP_DIV_LONG_2ADDR = 0xbe, 262 OP_REM_LONG_2ADDR = 0xbf, 263 OP_AND_LONG_2ADDR = 0xc0, 264 OP_OR_LONG_2ADDR = 0xc1, 265 OP_XOR_LONG_2ADDR = 0xc2, 266 OP_SHL_LONG_2ADDR = 0xc3, 267 OP_SHR_LONG_2ADDR = 0xc4, 268 OP_USHR_LONG_2ADDR = 0xc5, 269 OP_ADD_FLOAT_2ADDR = 0xc6, 270 OP_SUB_FLOAT_2ADDR = 0xc7, 271 OP_MUL_FLOAT_2ADDR = 0xc8, 272 OP_DIV_FLOAT_2ADDR = 0xc9, 273 OP_REM_FLOAT_2ADDR = 0xca, 274 OP_ADD_DOUBLE_2ADDR = 0xcb, 275 OP_SUB_DOUBLE_2ADDR = 0xcc, 276 OP_MUL_DOUBLE_2ADDR = 0xcd, 277 OP_DIV_DOUBLE_2ADDR = 0xce, 278 OP_REM_DOUBLE_2ADDR = 0xcf, 279 OP_ADD_INT_LIT16 = 0xd0, 280 OP_RSUB_INT = 0xd1, 281 OP_MUL_INT_LIT16 = 0xd2, 282 OP_DIV_INT_LIT16 = 0xd3, 283 OP_REM_INT_LIT16 = 0xd4, 284 OP_AND_INT_LIT16 = 0xd5, 285 OP_OR_INT_LIT16 = 0xd6, 286 OP_XOR_INT_LIT16 = 0xd7, 287 OP_ADD_INT_LIT8 = 0xd8, 288 OP_RSUB_INT_LIT8 = 0xd9, 289 OP_MUL_INT_LIT8 = 0xda, 290 OP_DIV_INT_LIT8 = 0xdb, 291 OP_REM_INT_LIT8 = 0xdc, 292 OP_AND_INT_LIT8 = 0xdd, 293 OP_OR_INT_LIT8 = 0xde, 294 OP_XOR_INT_LIT8 = 0xdf, 295 OP_SHL_INT_LIT8 = 0xe0, 296 OP_SHR_INT_LIT8 = 0xe1, 297 OP_USHR_INT_LIT8 = 0xe2, 298 OP_IGET_VOLATILE = 0xe3, 299 OP_IPUT_VOLATILE = 0xe4, 300 OP_SGET_VOLATILE = 0xe5, 301 OP_SPUT_VOLATILE = 0xe6, 302 OP_IGET_OBJECT_VOLATILE = 0xe7, 303 OP_IGET_WIDE_VOLATILE = 0xe8, 304 OP_IPUT_WIDE_VOLATILE = 0xe9, 305 OP_SGET_WIDE_VOLATILE = 0xea, 306 OP_SPUT_WIDE_VOLATILE = 0xeb, 307 OP_BREAKPOINT = 0xec, 308 OP_THROW_VERIFICATION_ERROR = 0xed, 309 OP_EXECUTE_INLINE = 0xee, 310 OP_EXECUTE_INLINE_RANGE = 0xef, 311 OP_INVOKE_OBJECT_INIT_RANGE = 0xf0, 312 OP_RETURN_VOID_BARRIER = 0xf1, 313 OP_IGET_QUICK = 0xf2, 314 OP_IGET_WIDE_QUICK = 0xf3, 315 OP_IGET_OBJECT_QUICK = 0xf4, 316 OP_IPUT_QUICK = 0xf5, 317 OP_IPUT_WIDE_QUICK = 0xf6, 318 OP_IPUT_OBJECT_QUICK = 0xf7, 319 OP_INVOKE_VIRTUAL_QUICK = 0xf8, 320 OP_INVOKE_VIRTUAL_QUICK_RANGE = 0xf9, 321 OP_INVOKE_SUPER_QUICK = 0xfa, 322 OP_INVOKE_SUPER_QUICK_RANGE = 0xfb, 323 OP_IPUT_OBJECT_VOLATILE = 0xfc, 324 OP_SGET_OBJECT_VOLATILE = 0xfd, 325 OP_SPUT_OBJECT_VOLATILE = 0xfe, 326 OP_DISPATCH_FF = 0xff, 327 OP_CONST_CLASS_JUMBO = 0x100, 328 OP_CHECK_CAST_JUMBO = 0x101, 329 OP_INSTANCE_OF_JUMBO = 0x102, 330 OP_NEW_INSTANCE_JUMBO = 0x103, 331 OP_NEW_ARRAY_JUMBO = 0x104, 332 OP_FILLED_NEW_ARRAY_JUMBO = 0x105, 333 OP_IGET_JUMBO = 0x106, 334 OP_IGET_WIDE_JUMBO = 0x107, 335 OP_IGET_OBJECT_JUMBO = 0x108, 336 OP_IGET_BOOLEAN_JUMBO = 0x109, 337 OP_IGET_BYTE_JUMBO = 0x10a, 338 OP_IGET_CHAR_JUMBO = 0x10b, 339 OP_IGET_SHORT_JUMBO = 0x10c, 340 OP_IPUT_JUMBO = 0x10d, 341 OP_IPUT_WIDE_JUMBO = 0x10e, 342 OP_IPUT_OBJECT_JUMBO = 0x10f, 343 OP_IPUT_BOOLEAN_JUMBO = 0x110, 344 OP_IPUT_BYTE_JUMBO = 0x111, 345 OP_IPUT_CHAR_JUMBO = 0x112, 346 OP_IPUT_SHORT_JUMBO = 0x113, 347 OP_SGET_JUMBO = 0x114, 348 OP_SGET_WIDE_JUMBO = 0x115, 349 OP_SGET_OBJECT_JUMBO = 0x116, 350 OP_SGET_BOOLEAN_JUMBO = 0x117, 351 OP_SGET_BYTE_JUMBO = 0x118, 352 OP_SGET_CHAR_JUMBO = 0x119, 353 OP_SGET_SHORT_JUMBO = 0x11a, 354 OP_SPUT_JUMBO = 0x11b, 355 OP_SPUT_WIDE_JUMBO = 0x11c, 356 OP_SPUT_OBJECT_JUMBO = 0x11d, 357 OP_SPUT_BOOLEAN_JUMBO = 0x11e, 358 OP_SPUT_BYTE_JUMBO = 0x11f, 359 OP_SPUT_CHAR_JUMBO = 0x120, 360 OP_SPUT_SHORT_JUMBO = 0x121, 361 OP_INVOKE_VIRTUAL_JUMBO = 0x122, 362 OP_INVOKE_SUPER_JUMBO = 0x123, 363 OP_INVOKE_DIRECT_JUMBO = 0x124, 364 OP_INVOKE_STATIC_JUMBO = 0x125, 365 OP_INVOKE_INTERFACE_JUMBO = 0x126, 366 OP_UNUSED_27FF = 0x127, 367 OP_UNUSED_28FF = 0x128, 368 OP_UNUSED_29FF = 0x129, 369 OP_UNUSED_2AFF = 0x12a, 370 OP_UNUSED_2BFF = 0x12b, 371 OP_UNUSED_2CFF = 0x12c, 372 OP_UNUSED_2DFF = 0x12d, 373 OP_UNUSED_2EFF = 0x12e, 374 OP_UNUSED_2FFF = 0x12f, 375 OP_UNUSED_30FF = 0x130, 376 OP_UNUSED_31FF = 0x131, 377 OP_UNUSED_32FF = 0x132, 378 OP_UNUSED_33FF = 0x133, 379 OP_UNUSED_34FF = 0x134, 380 OP_UNUSED_35FF = 0x135, 381 OP_UNUSED_36FF = 0x136, 382 OP_UNUSED_37FF = 0x137, 383 OP_UNUSED_38FF = 0x138, 384 OP_UNUSED_39FF = 0x139, 385 OP_UNUSED_3AFF = 0x13a, 386 OP_UNUSED_3BFF = 0x13b, 387 OP_UNUSED_3CFF = 0x13c, 388 OP_UNUSED_3DFF = 0x13d, 389 OP_UNUSED_3EFF = 0x13e, 390 OP_UNUSED_3FFF = 0x13f, 391 OP_UNUSED_40FF = 0x140, 392 OP_UNUSED_41FF = 0x141, 393 OP_UNUSED_42FF = 0x142, 394 OP_UNUSED_43FF = 0x143, 395 OP_UNUSED_44FF = 0x144, 396 OP_UNUSED_45FF = 0x145, 397 OP_UNUSED_46FF = 0x146, 398 OP_UNUSED_47FF = 0x147, 399 OP_UNUSED_48FF = 0x148, 400 OP_UNUSED_49FF = 0x149, 401 OP_UNUSED_4AFF = 0x14a, 402 OP_UNUSED_4BFF = 0x14b, 403 OP_UNUSED_4CFF = 0x14c, 404 OP_UNUSED_4DFF = 0x14d, 405 OP_UNUSED_4EFF = 0x14e, 406 OP_UNUSED_4FFF = 0x14f, 407 OP_UNUSED_50FF = 0x150, 408 OP_UNUSED_51FF = 0x151, 409 OP_UNUSED_52FF = 0x152, 410 OP_UNUSED_53FF = 0x153, 411 OP_UNUSED_54FF = 0x154, 412 OP_UNUSED_55FF = 0x155, 413 OP_UNUSED_56FF = 0x156, 414 OP_UNUSED_57FF = 0x157, 415 OP_UNUSED_58FF = 0x158, 416 OP_UNUSED_59FF = 0x159, 417 OP_UNUSED_5AFF = 0x15a, 418 OP_UNUSED_5BFF = 0x15b, 419 OP_UNUSED_5CFF = 0x15c, 420 OP_UNUSED_5DFF = 0x15d, 421 OP_UNUSED_5EFF = 0x15e, 422 OP_UNUSED_5FFF = 0x15f, 423 OP_UNUSED_60FF = 0x160, 424 OP_UNUSED_61FF = 0x161, 425 OP_UNUSED_62FF = 0x162, 426 OP_UNUSED_63FF = 0x163, 427 OP_UNUSED_64FF = 0x164, 428 OP_UNUSED_65FF = 0x165, 429 OP_UNUSED_66FF = 0x166, 430 OP_UNUSED_67FF = 0x167, 431 OP_UNUSED_68FF = 0x168, 432 OP_UNUSED_69FF = 0x169, 433 OP_UNUSED_6AFF = 0x16a, 434 OP_UNUSED_6BFF = 0x16b, 435 OP_UNUSED_6CFF = 0x16c, 436 OP_UNUSED_6DFF = 0x16d, 437 OP_UNUSED_6EFF = 0x16e, 438 OP_UNUSED_6FFF = 0x16f, 439 OP_UNUSED_70FF = 0x170, 440 OP_UNUSED_71FF = 0x171, 441 OP_UNUSED_72FF = 0x172, 442 OP_UNUSED_73FF = 0x173, 443 OP_UNUSED_74FF = 0x174, 444 OP_UNUSED_75FF = 0x175, 445 OP_UNUSED_76FF = 0x176, 446 OP_UNUSED_77FF = 0x177, 447 OP_UNUSED_78FF = 0x178, 448 OP_UNUSED_79FF = 0x179, 449 OP_UNUSED_7AFF = 0x17a, 450 OP_UNUSED_7BFF = 0x17b, 451 OP_UNUSED_7CFF = 0x17c, 452 OP_UNUSED_7DFF = 0x17d, 453 OP_UNUSED_7EFF = 0x17e, 454 OP_UNUSED_7FFF = 0x17f, 455 OP_UNUSED_80FF = 0x180, 456 OP_UNUSED_81FF = 0x181, 457 OP_UNUSED_82FF = 0x182, 458 OP_UNUSED_83FF = 0x183, 459 OP_UNUSED_84FF = 0x184, 460 OP_UNUSED_85FF = 0x185, 461 OP_UNUSED_86FF = 0x186, 462 OP_UNUSED_87FF = 0x187, 463 OP_UNUSED_88FF = 0x188, 464 OP_UNUSED_89FF = 0x189, 465 OP_UNUSED_8AFF = 0x18a, 466 OP_UNUSED_8BFF = 0x18b, 467 OP_UNUSED_8CFF = 0x18c, 468 OP_UNUSED_8DFF = 0x18d, 469 OP_UNUSED_8EFF = 0x18e, 470 OP_UNUSED_8FFF = 0x18f, 471 OP_UNUSED_90FF = 0x190, 472 OP_UNUSED_91FF = 0x191, 473 OP_UNUSED_92FF = 0x192, 474 OP_UNUSED_93FF = 0x193, 475 OP_UNUSED_94FF = 0x194, 476 OP_UNUSED_95FF = 0x195, 477 OP_UNUSED_96FF = 0x196, 478 OP_UNUSED_97FF = 0x197, 479 OP_UNUSED_98FF = 0x198, 480 OP_UNUSED_99FF = 0x199, 481 OP_UNUSED_9AFF = 0x19a, 482 OP_UNUSED_9BFF = 0x19b, 483 OP_UNUSED_9CFF = 0x19c, 484 OP_UNUSED_9DFF = 0x19d, 485 OP_UNUSED_9EFF = 0x19e, 486 OP_UNUSED_9FFF = 0x19f, 487 OP_UNUSED_A0FF = 0x1a0, 488 OP_UNUSED_A1FF = 0x1a1, 489 OP_UNUSED_A2FF = 0x1a2, 490 OP_UNUSED_A3FF = 0x1a3, 491 OP_UNUSED_A4FF = 0x1a4, 492 OP_UNUSED_A5FF = 0x1a5, 493 OP_UNUSED_A6FF = 0x1a6, 494 OP_UNUSED_A7FF = 0x1a7, 495 OP_UNUSED_A8FF = 0x1a8, 496 OP_UNUSED_A9FF = 0x1a9, 497 OP_UNUSED_AAFF = 0x1aa, 498 OP_UNUSED_ABFF = 0x1ab, 499 OP_UNUSED_ACFF = 0x1ac, 500 OP_UNUSED_ADFF = 0x1ad, 501 OP_UNUSED_AEFF = 0x1ae, 502 OP_UNUSED_AFFF = 0x1af, 503 OP_UNUSED_B0FF = 0x1b0, 504 OP_UNUSED_B1FF = 0x1b1, 505 OP_UNUSED_B2FF = 0x1b2, 506 OP_UNUSED_B3FF = 0x1b3, 507 OP_UNUSED_B4FF = 0x1b4, 508 OP_UNUSED_B5FF = 0x1b5, 509 OP_UNUSED_B6FF = 0x1b6, 510 OP_UNUSED_B7FF = 0x1b7, 511 OP_UNUSED_B8FF = 0x1b8, 512 OP_UNUSED_B9FF = 0x1b9, 513 OP_UNUSED_BAFF = 0x1ba, 514 OP_UNUSED_BBFF = 0x1bb, 515 OP_UNUSED_BCFF = 0x1bc, 516 OP_UNUSED_BDFF = 0x1bd, 517 OP_UNUSED_BEFF = 0x1be, 518 OP_UNUSED_BFFF = 0x1bf, 519 OP_UNUSED_C0FF = 0x1c0, 520 OP_UNUSED_C1FF = 0x1c1, 521 OP_UNUSED_C2FF = 0x1c2, 522 OP_UNUSED_C3FF = 0x1c3, 523 OP_UNUSED_C4FF = 0x1c4, 524 OP_UNUSED_C5FF = 0x1c5, 525 OP_UNUSED_C6FF = 0x1c6, 526 OP_UNUSED_C7FF = 0x1c7, 527 OP_UNUSED_C8FF = 0x1c8, 528 OP_UNUSED_C9FF = 0x1c9, 529 OP_UNUSED_CAFF = 0x1ca, 530 OP_UNUSED_CBFF = 0x1cb, 531 OP_UNUSED_CCFF = 0x1cc, 532 OP_UNUSED_CDFF = 0x1cd, 533 OP_UNUSED_CEFF = 0x1ce, 534 OP_UNUSED_CFFF = 0x1cf, 535 OP_UNUSED_D0FF = 0x1d0, 536 OP_UNUSED_D1FF = 0x1d1, 537 OP_UNUSED_D2FF = 0x1d2, 538 OP_UNUSED_D3FF = 0x1d3, 539 OP_UNUSED_D4FF = 0x1d4, 540 OP_UNUSED_D5FF = 0x1d5, 541 OP_UNUSED_D6FF = 0x1d6, 542 OP_UNUSED_D7FF = 0x1d7, 543 OP_UNUSED_D8FF = 0x1d8, 544 OP_UNUSED_D9FF = 0x1d9, 545 OP_UNUSED_DAFF = 0x1da, 546 OP_UNUSED_DBFF = 0x1db, 547 OP_UNUSED_DCFF = 0x1dc, 548 OP_UNUSED_DDFF = 0x1dd, 549 OP_UNUSED_DEFF = 0x1de, 550 OP_UNUSED_DFFF = 0x1df, 551 OP_UNUSED_E0FF = 0x1e0, 552 OP_UNUSED_E1FF = 0x1e1, 553 OP_UNUSED_E2FF = 0x1e2, 554 OP_UNUSED_E3FF = 0x1e3, 555 OP_UNUSED_E4FF = 0x1e4, 556 OP_UNUSED_E5FF = 0x1e5, 557 OP_UNUSED_E6FF = 0x1e6, 558 OP_UNUSED_E7FF = 0x1e7, 559 OP_UNUSED_E8FF = 0x1e8, 560 OP_UNUSED_E9FF = 0x1e9, 561 OP_UNUSED_EAFF = 0x1ea, 562 OP_UNUSED_EBFF = 0x1eb, 563 OP_UNUSED_ECFF = 0x1ec, 564 OP_UNUSED_EDFF = 0x1ed, 565 OP_UNUSED_EEFF = 0x1ee, 566 OP_UNUSED_EFFF = 0x1ef, 567 OP_UNUSED_F0FF = 0x1f0, 568 OP_UNUSED_F1FF = 0x1f1, 569 OP_INVOKE_OBJECT_INIT_JUMBO = 0x1f2, 570 OP_IGET_VOLATILE_JUMBO = 0x1f3, 571 OP_IGET_WIDE_VOLATILE_JUMBO = 0x1f4, 572 OP_IGET_OBJECT_VOLATILE_JUMBO = 0x1f5, 573 OP_IPUT_VOLATILE_JUMBO = 0x1f6, 574 OP_IPUT_WIDE_VOLATILE_JUMBO = 0x1f7, 575 OP_IPUT_OBJECT_VOLATILE_JUMBO = 0x1f8, 576 OP_SGET_VOLATILE_JUMBO = 0x1f9, 577 OP_SGET_WIDE_VOLATILE_JUMBO = 0x1fa, 578 OP_SGET_OBJECT_VOLATILE_JUMBO = 0x1fb, 579 OP_SPUT_VOLATILE_JUMBO = 0x1fc, 580 OP_SPUT_WIDE_VOLATILE_JUMBO = 0x1fd, 581 OP_SPUT_OBJECT_VOLATILE_JUMBO = 0x1fe, 582 OP_THROW_VERIFICATION_ERROR_JUMBO = 0x1ff, 583 // END(libdex-opcode-enum) 584 }; 585 586 /* 587 * Macro used to generate a computed goto table for use in implementing 588 * an interpreter in C. 589 */ 590 #define DEFINE_GOTO_TABLE(_name) \ 591 static const void* _name[kNumPackedOpcodes] = { \ 592 /* BEGIN(libdex-goto-table); GENERATED AUTOMATICALLY BY opcode-gen */ \ 593 H(OP_NOP), \ 594 H(OP_MOVE), \ 595 H(OP_MOVE_FROM16), \ 596 H(OP_MOVE_16), \ 597 H(OP_MOVE_WIDE), \ 598 H(OP_MOVE_WIDE_FROM16), \ 599 H(OP_MOVE_WIDE_16), \ 600 H(OP_MOVE_OBJECT), \ 601 H(OP_MOVE_OBJECT_FROM16), \ 602 H(OP_MOVE_OBJECT_16), \ 603 H(OP_MOVE_RESULT), \ 604 H(OP_MOVE_RESULT_WIDE), \ 605 H(OP_MOVE_RESULT_OBJECT), \ 606 H(OP_MOVE_EXCEPTION), \ 607 H(OP_RETURN_VOID), \ 608 H(OP_RETURN), \ 609 H(OP_RETURN_WIDE), \ 610 H(OP_RETURN_OBJECT), \ 611 H(OP_CONST_4), \ 612 H(OP_CONST_16), \ 613 H(OP_CONST), \ 614 H(OP_CONST_HIGH16), \ 615 H(OP_CONST_WIDE_16), \ 616 H(OP_CONST_WIDE_32), \ 617 H(OP_CONST_WIDE), \ 618 H(OP_CONST_WIDE_HIGH16), \ 619 H(OP_CONST_STRING), \ 620 H(OP_CONST_STRING_JUMBO), \ 621 H(OP_CONST_CLASS), \ 622 H(OP_MONITOR_ENTER), \ 623 H(OP_MONITOR_EXIT), \ 624 H(OP_CHECK_CAST), \ 625 H(OP_INSTANCE_OF), \ 626 H(OP_ARRAY_LENGTH), \ 627 H(OP_NEW_INSTANCE), \ 628 H(OP_NEW_ARRAY), \ 629 H(OP_FILLED_NEW_ARRAY), \ 630 H(OP_FILLED_NEW_ARRAY_RANGE), \ 631 H(OP_FILL_ARRAY_DATA), \ 632 H(OP_THROW), \ 633 H(OP_GOTO), \ 634 H(OP_GOTO_16), \ 635 H(OP_GOTO_32), \ 636 H(OP_PACKED_SWITCH), \ 637 H(OP_SPARSE_SWITCH), \ 638 H(OP_CMPL_FLOAT), \ 639 H(OP_CMPG_FLOAT), \ 640 H(OP_CMPL_DOUBLE), \ 641 H(OP_CMPG_DOUBLE), \ 642 H(OP_CMP_LONG), \ 643 H(OP_IF_EQ), \ 644 H(OP_IF_NE), \ 645 H(OP_IF_LT), \ 646 H(OP_IF_GE), \ 647 H(OP_IF_GT), \ 648 H(OP_IF_LE), \ 649 H(OP_IF_EQZ), \ 650 H(OP_IF_NEZ), \ 651 H(OP_IF_LTZ), \ 652 H(OP_IF_GEZ), \ 653 H(OP_IF_GTZ), \ 654 H(OP_IF_LEZ), \ 655 H(OP_UNUSED_3E), \ 656 H(OP_UNUSED_3F), \ 657 H(OP_UNUSED_40), \ 658 H(OP_UNUSED_41), \ 659 H(OP_UNUSED_42), \ 660 H(OP_UNUSED_43), \ 661 H(OP_AGET), \ 662 H(OP_AGET_WIDE), \ 663 H(OP_AGET_OBJECT), \ 664 H(OP_AGET_BOOLEAN), \ 665 H(OP_AGET_BYTE), \ 666 H(OP_AGET_CHAR), \ 667 H(OP_AGET_SHORT), \ 668 H(OP_APUT), \ 669 H(OP_APUT_WIDE), \ 670 H(OP_APUT_OBJECT), \ 671 H(OP_APUT_BOOLEAN), \ 672 H(OP_APUT_BYTE), \ 673 H(OP_APUT_CHAR), \ 674 H(OP_APUT_SHORT), \ 675 H(OP_IGET), \ 676 H(OP_IGET_WIDE), \ 677 H(OP_IGET_OBJECT), \ 678 H(OP_IGET_BOOLEAN), \ 679 H(OP_IGET_BYTE), \ 680 H(OP_IGET_CHAR), \ 681 H(OP_IGET_SHORT), \ 682 H(OP_IPUT), \ 683 H(OP_IPUT_WIDE), \ 684 H(OP_IPUT_OBJECT), \ 685 H(OP_IPUT_BOOLEAN), \ 686 H(OP_IPUT_BYTE), \ 687 H(OP_IPUT_CHAR), \ 688 H(OP_IPUT_SHORT), \ 689 H(OP_SGET), \ 690 H(OP_SGET_WIDE), \ 691 H(OP_SGET_OBJECT), \ 692 H(OP_SGET_BOOLEAN), \ 693 H(OP_SGET_BYTE), \ 694 H(OP_SGET_CHAR), \ 695 H(OP_SGET_SHORT), \ 696 H(OP_SPUT), \ 697 H(OP_SPUT_WIDE), \ 698 H(OP_SPUT_OBJECT), \ 699 H(OP_SPUT_BOOLEAN), \ 700 H(OP_SPUT_BYTE), \ 701 H(OP_SPUT_CHAR), \ 702 H(OP_SPUT_SHORT), \ 703 H(OP_INVOKE_VIRTUAL), \ 704 H(OP_INVOKE_SUPER), \ 705 H(OP_INVOKE_DIRECT), \ 706 H(OP_INVOKE_STATIC), \ 707 H(OP_INVOKE_INTERFACE), \ 708 H(OP_UNUSED_73), \ 709 H(OP_INVOKE_VIRTUAL_RANGE), \ 710 H(OP_INVOKE_SUPER_RANGE), \ 711 H(OP_INVOKE_DIRECT_RANGE), \ 712 H(OP_INVOKE_STATIC_RANGE), \ 713 H(OP_INVOKE_INTERFACE_RANGE), \ 714 H(OP_UNUSED_79), \ 715 H(OP_UNUSED_7A), \ 716 H(OP_NEG_INT), \ 717 H(OP_NOT_INT), \ 718 H(OP_NEG_LONG), \ 719 H(OP_NOT_LONG), \ 720 H(OP_NEG_FLOAT), \ 721 H(OP_NEG_DOUBLE), \ 722 H(OP_INT_TO_LONG), \ 723 H(OP_INT_TO_FLOAT), \ 724 H(OP_INT_TO_DOUBLE), \ 725 H(OP_LONG_TO_INT), \ 726 H(OP_LONG_TO_FLOAT), \ 727 H(OP_LONG_TO_DOUBLE), \ 728 H(OP_FLOAT_TO_INT), \ 729 H(OP_FLOAT_TO_LONG), \ 730 H(OP_FLOAT_TO_DOUBLE), \ 731 H(OP_DOUBLE_TO_INT), \ 732 H(OP_DOUBLE_TO_LONG), \ 733 H(OP_DOUBLE_TO_FLOAT), \ 734 H(OP_INT_TO_BYTE), \ 735 H(OP_INT_TO_CHAR), \ 736 H(OP_INT_TO_SHORT), \ 737 H(OP_ADD_INT), \ 738 H(OP_SUB_INT), \ 739 H(OP_MUL_INT), \ 740 H(OP_DIV_INT), \ 741 H(OP_REM_INT), \ 742 H(OP_AND_INT), \ 743 H(OP_OR_INT), \ 744 H(OP_XOR_INT), \ 745 H(OP_SHL_INT), \ 746 H(OP_SHR_INT), \ 747 H(OP_USHR_INT), \ 748 H(OP_ADD_LONG), \ 749 H(OP_SUB_LONG), \ 750 H(OP_MUL_LONG), \ 751 H(OP_DIV_LONG), \ 752 H(OP_REM_LONG), \ 753 H(OP_AND_LONG), \ 754 H(OP_OR_LONG), \ 755 H(OP_XOR_LONG), \ 756 H(OP_SHL_LONG), \ 757 H(OP_SHR_LONG), \ 758 H(OP_USHR_LONG), \ 759 H(OP_ADD_FLOAT), \ 760 H(OP_SUB_FLOAT), \ 761 H(OP_MUL_FLOAT), \ 762 H(OP_DIV_FLOAT), \ 763 H(OP_REM_FLOAT), \ 764 H(OP_ADD_DOUBLE), \ 765 H(OP_SUB_DOUBLE), \ 766 H(OP_MUL_DOUBLE), \ 767 H(OP_DIV_DOUBLE), \ 768 H(OP_REM_DOUBLE), \ 769 H(OP_ADD_INT_2ADDR), \ 770 H(OP_SUB_INT_2ADDR), \ 771 H(OP_MUL_INT_2ADDR), \ 772 H(OP_DIV_INT_2ADDR), \ 773 H(OP_REM_INT_2ADDR), \ 774 H(OP_AND_INT_2ADDR), \ 775 H(OP_OR_INT_2ADDR), \ 776 H(OP_XOR_INT_2ADDR), \ 777 H(OP_SHL_INT_2ADDR), \ 778 H(OP_SHR_INT_2ADDR), \ 779 H(OP_USHR_INT_2ADDR), \ 780 H(OP_ADD_LONG_2ADDR), \ 781 H(OP_SUB_LONG_2ADDR), \ 782 H(OP_MUL_LONG_2ADDR), \ 783 H(OP_DIV_LONG_2ADDR), \ 784 H(OP_REM_LONG_2ADDR), \ 785 H(OP_AND_LONG_2ADDR), \ 786 H(OP_OR_LONG_2ADDR), \ 787 H(OP_XOR_LONG_2ADDR), \ 788 H(OP_SHL_LONG_2ADDR), \ 789 H(OP_SHR_LONG_2ADDR), \ 790 H(OP_USHR_LONG_2ADDR), \ 791 H(OP_ADD_FLOAT_2ADDR), \ 792 H(OP_SUB_FLOAT_2ADDR), \ 793 H(OP_MUL_FLOAT_2ADDR), \ 794 H(OP_DIV_FLOAT_2ADDR), \ 795 H(OP_REM_FLOAT_2ADDR), \ 796 H(OP_ADD_DOUBLE_2ADDR), \ 797 H(OP_SUB_DOUBLE_2ADDR), \ 798 H(OP_MUL_DOUBLE_2ADDR), \ 799 H(OP_DIV_DOUBLE_2ADDR), \ 800 H(OP_REM_DOUBLE_2ADDR), \ 801 H(OP_ADD_INT_LIT16), \ 802 H(OP_RSUB_INT), \ 803 H(OP_MUL_INT_LIT16), \ 804 H(OP_DIV_INT_LIT16), \ 805 H(OP_REM_INT_LIT16), \ 806 H(OP_AND_INT_LIT16), \ 807 H(OP_OR_INT_LIT16), \ 808 H(OP_XOR_INT_LIT16), \ 809 H(OP_ADD_INT_LIT8), \ 810 H(OP_RSUB_INT_LIT8), \ 811 H(OP_MUL_INT_LIT8), \ 812 H(OP_DIV_INT_LIT8), \ 813 H(OP_REM_INT_LIT8), \ 814 H(OP_AND_INT_LIT8), \ 815 H(OP_OR_INT_LIT8), \ 816 H(OP_XOR_INT_LIT8), \ 817 H(OP_SHL_INT_LIT8), \ 818 H(OP_SHR_INT_LIT8), \ 819 H(OP_USHR_INT_LIT8), \ 820 H(OP_IGET_VOLATILE), \ 821 H(OP_IPUT_VOLATILE), \ 822 H(OP_SGET_VOLATILE), \ 823 H(OP_SPUT_VOLATILE), \ 824 H(OP_IGET_OBJECT_VOLATILE), \ 825 H(OP_IGET_WIDE_VOLATILE), \ 826 H(OP_IPUT_WIDE_VOLATILE), \ 827 H(OP_SGET_WIDE_VOLATILE), \ 828 H(OP_SPUT_WIDE_VOLATILE), \ 829 H(OP_BREAKPOINT), \ 830 H(OP_THROW_VERIFICATION_ERROR), \ 831 H(OP_EXECUTE_INLINE), \ 832 H(OP_EXECUTE_INLINE_RANGE), \ 833 H(OP_INVOKE_OBJECT_INIT_RANGE), \ 834 H(OP_RETURN_VOID_BARRIER), \ 835 H(OP_IGET_QUICK), \ 836 H(OP_IGET_WIDE_QUICK), \ 837 H(OP_IGET_OBJECT_QUICK), \ 838 H(OP_IPUT_QUICK), \ 839 H(OP_IPUT_WIDE_QUICK), \ 840 H(OP_IPUT_OBJECT_QUICK), \ 841 H(OP_INVOKE_VIRTUAL_QUICK), \ 842 H(OP_INVOKE_VIRTUAL_QUICK_RANGE), \ 843 H(OP_INVOKE_SUPER_QUICK), \ 844 H(OP_INVOKE_SUPER_QUICK_RANGE), \ 845 H(OP_IPUT_OBJECT_VOLATILE), \ 846 H(OP_SGET_OBJECT_VOLATILE), \ 847 H(OP_SPUT_OBJECT_VOLATILE), \ 848 H(OP_DISPATCH_FF), \ 849 H(OP_CONST_CLASS_JUMBO), \ 850 H(OP_CHECK_CAST_JUMBO), \ 851 H(OP_INSTANCE_OF_JUMBO), \ 852 H(OP_NEW_INSTANCE_JUMBO), \ 853 H(OP_NEW_ARRAY_JUMBO), \ 854 H(OP_FILLED_NEW_ARRAY_JUMBO), \ 855 H(OP_IGET_JUMBO), \ 856 H(OP_IGET_WIDE_JUMBO), \ 857 H(OP_IGET_OBJECT_JUMBO), \ 858 H(OP_IGET_BOOLEAN_JUMBO), \ 859 H(OP_IGET_BYTE_JUMBO), \ 860 H(OP_IGET_CHAR_JUMBO), \ 861 H(OP_IGET_SHORT_JUMBO), \ 862 H(OP_IPUT_JUMBO), \ 863 H(OP_IPUT_WIDE_JUMBO), \ 864 H(OP_IPUT_OBJECT_JUMBO), \ 865 H(OP_IPUT_BOOLEAN_JUMBO), \ 866 H(OP_IPUT_BYTE_JUMBO), \ 867 H(OP_IPUT_CHAR_JUMBO), \ 868 H(OP_IPUT_SHORT_JUMBO), \ 869 H(OP_SGET_JUMBO), \ 870 H(OP_SGET_WIDE_JUMBO), \ 871 H(OP_SGET_OBJECT_JUMBO), \ 872 H(OP_SGET_BOOLEAN_JUMBO), \ 873 H(OP_SGET_BYTE_JUMBO), \ 874 H(OP_SGET_CHAR_JUMBO), \ 875 H(OP_SGET_SHORT_JUMBO), \ 876 H(OP_SPUT_JUMBO), \ 877 H(OP_SPUT_WIDE_JUMBO), \ 878 H(OP_SPUT_OBJECT_JUMBO), \ 879 H(OP_SPUT_BOOLEAN_JUMBO), \ 880 H(OP_SPUT_BYTE_JUMBO), \ 881 H(OP_SPUT_CHAR_JUMBO), \ 882 H(OP_SPUT_SHORT_JUMBO), \ 883 H(OP_INVOKE_VIRTUAL_JUMBO), \ 884 H(OP_INVOKE_SUPER_JUMBO), \ 885 H(OP_INVOKE_DIRECT_JUMBO), \ 886 H(OP_INVOKE_STATIC_JUMBO), \ 887 H(OP_INVOKE_INTERFACE_JUMBO), \ 888 H(OP_UNUSED_27FF), \ 889 H(OP_UNUSED_28FF), \ 890 H(OP_UNUSED_29FF), \ 891 H(OP_UNUSED_2AFF), \ 892 H(OP_UNUSED_2BFF), \ 893 H(OP_UNUSED_2CFF), \ 894 H(OP_UNUSED_2DFF), \ 895 H(OP_UNUSED_2EFF), \ 896 H(OP_UNUSED_2FFF), \ 897 H(OP_UNUSED_30FF), \ 898 H(OP_UNUSED_31FF), \ 899 H(OP_UNUSED_32FF), \ 900 H(OP_UNUSED_33FF), \ 901 H(OP_UNUSED_34FF), \ 902 H(OP_UNUSED_35FF), \ 903 H(OP_UNUSED_36FF), \ 904 H(OP_UNUSED_37FF), \ 905 H(OP_UNUSED_38FF), \ 906 H(OP_UNUSED_39FF), \ 907 H(OP_UNUSED_3AFF), \ 908 H(OP_UNUSED_3BFF), \ 909 H(OP_UNUSED_3CFF), \ 910 H(OP_UNUSED_3DFF), \ 911 H(OP_UNUSED_3EFF), \ 912 H(OP_UNUSED_3FFF), \ 913 H(OP_UNUSED_40FF), \ 914 H(OP_UNUSED_41FF), \ 915 H(OP_UNUSED_42FF), \ 916 H(OP_UNUSED_43FF), \ 917 H(OP_UNUSED_44FF), \ 918 H(OP_UNUSED_45FF), \ 919 H(OP_UNUSED_46FF), \ 920 H(OP_UNUSED_47FF), \ 921 H(OP_UNUSED_48FF), \ 922 H(OP_UNUSED_49FF), \ 923 H(OP_UNUSED_4AFF), \ 924 H(OP_UNUSED_4BFF), \ 925 H(OP_UNUSED_4CFF), \ 926 H(OP_UNUSED_4DFF), \ 927 H(OP_UNUSED_4EFF), \ 928 H(OP_UNUSED_4FFF), \ 929 H(OP_UNUSED_50FF), \ 930 H(OP_UNUSED_51FF), \ 931 H(OP_UNUSED_52FF), \ 932 H(OP_UNUSED_53FF), \ 933 H(OP_UNUSED_54FF), \ 934 H(OP_UNUSED_55FF), \ 935 H(OP_UNUSED_56FF), \ 936 H(OP_UNUSED_57FF), \ 937 H(OP_UNUSED_58FF), \ 938 H(OP_UNUSED_59FF), \ 939 H(OP_UNUSED_5AFF), \ 940 H(OP_UNUSED_5BFF), \ 941 H(OP_UNUSED_5CFF), \ 942 H(OP_UNUSED_5DFF), \ 943 H(OP_UNUSED_5EFF), \ 944 H(OP_UNUSED_5FFF), \ 945 H(OP_UNUSED_60FF), \ 946 H(OP_UNUSED_61FF), \ 947 H(OP_UNUSED_62FF), \ 948 H(OP_UNUSED_63FF), \ 949 H(OP_UNUSED_64FF), \ 950 H(OP_UNUSED_65FF), \ 951 H(OP_UNUSED_66FF), \ 952 H(OP_UNUSED_67FF), \ 953 H(OP_UNUSED_68FF), \ 954 H(OP_UNUSED_69FF), \ 955 H(OP_UNUSED_6AFF), \ 956 H(OP_UNUSED_6BFF), \ 957 H(OP_UNUSED_6CFF), \ 958 H(OP_UNUSED_6DFF), \ 959 H(OP_UNUSED_6EFF), \ 960 H(OP_UNUSED_6FFF), \ 961 H(OP_UNUSED_70FF), \ 962 H(OP_UNUSED_71FF), \ 963 H(OP_UNUSED_72FF), \ 964 H(OP_UNUSED_73FF), \ 965 H(OP_UNUSED_74FF), \ 966 H(OP_UNUSED_75FF), \ 967 H(OP_UNUSED_76FF), \ 968 H(OP_UNUSED_77FF), \ 969 H(OP_UNUSED_78FF), \ 970 H(OP_UNUSED_79FF), \ 971 H(OP_UNUSED_7AFF), \ 972 H(OP_UNUSED_7BFF), \ 973 H(OP_UNUSED_7CFF), \ 974 H(OP_UNUSED_7DFF), \ 975 H(OP_UNUSED_7EFF), \ 976 H(OP_UNUSED_7FFF), \ 977 H(OP_UNUSED_80FF), \ 978 H(OP_UNUSED_81FF), \ 979 H(OP_UNUSED_82FF), \ 980 H(OP_UNUSED_83FF), \ 981 H(OP_UNUSED_84FF), \ 982 H(OP_UNUSED_85FF), \ 983 H(OP_UNUSED_86FF), \ 984 H(OP_UNUSED_87FF), \ 985 H(OP_UNUSED_88FF), \ 986 H(OP_UNUSED_89FF), \ 987 H(OP_UNUSED_8AFF), \ 988 H(OP_UNUSED_8BFF), \ 989 H(OP_UNUSED_8CFF), \ 990 H(OP_UNUSED_8DFF), \ 991 H(OP_UNUSED_8EFF), \ 992 H(OP_UNUSED_8FFF), \ 993 H(OP_UNUSED_90FF), \ 994 H(OP_UNUSED_91FF), \ 995 H(OP_UNUSED_92FF), \ 996 H(OP_UNUSED_93FF), \ 997 H(OP_UNUSED_94FF), \ 998 H(OP_UNUSED_95FF), \ 999 H(OP_UNUSED_96FF), \ 1000 H(OP_UNUSED_97FF), \ 1001 H(OP_UNUSED_98FF), \ 1002 H(OP_UNUSED_99FF), \ 1003 H(OP_UNUSED_9AFF), \ 1004 H(OP_UNUSED_9BFF), \ 1005 H(OP_UNUSED_9CFF), \ 1006 H(OP_UNUSED_9DFF), \ 1007 H(OP_UNUSED_9EFF), \ 1008 H(OP_UNUSED_9FFF), \ 1009 H(OP_UNUSED_A0FF), \ 1010 H(OP_UNUSED_A1FF), \ 1011 H(OP_UNUSED_A2FF), \ 1012 H(OP_UNUSED_A3FF), \ 1013 H(OP_UNUSED_A4FF), \ 1014 H(OP_UNUSED_A5FF), \ 1015 H(OP_UNUSED_A6FF), \ 1016 H(OP_UNUSED_A7FF), \ 1017 H(OP_UNUSED_A8FF), \ 1018 H(OP_UNUSED_A9FF), \ 1019 H(OP_UNUSED_AAFF), \ 1020 H(OP_UNUSED_ABFF), \ 1021 H(OP_UNUSED_ACFF), \ 1022 H(OP_UNUSED_ADFF), \ 1023 H(OP_UNUSED_AEFF), \ 1024 H(OP_UNUSED_AFFF), \ 1025 H(OP_UNUSED_B0FF), \ 1026 H(OP_UNUSED_B1FF), \ 1027 H(OP_UNUSED_B2FF), \ 1028 H(OP_UNUSED_B3FF), \ 1029 H(OP_UNUSED_B4FF), \ 1030 H(OP_UNUSED_B5FF), \ 1031 H(OP_UNUSED_B6FF), \ 1032 H(OP_UNUSED_B7FF), \ 1033 H(OP_UNUSED_B8FF), \ 1034 H(OP_UNUSED_B9FF), \ 1035 H(OP_UNUSED_BAFF), \ 1036 H(OP_UNUSED_BBFF), \ 1037 H(OP_UNUSED_BCFF), \ 1038 H(OP_UNUSED_BDFF), \ 1039 H(OP_UNUSED_BEFF), \ 1040 H(OP_UNUSED_BFFF), \ 1041 H(OP_UNUSED_C0FF), \ 1042 H(OP_UNUSED_C1FF), \ 1043 H(OP_UNUSED_C2FF), \ 1044 H(OP_UNUSED_C3FF), \ 1045 H(OP_UNUSED_C4FF), \ 1046 H(OP_UNUSED_C5FF), \ 1047 H(OP_UNUSED_C6FF), \ 1048 H(OP_UNUSED_C7FF), \ 1049 H(OP_UNUSED_C8FF), \ 1050 H(OP_UNUSED_C9FF), \ 1051 H(OP_UNUSED_CAFF), \ 1052 H(OP_UNUSED_CBFF), \ 1053 H(OP_UNUSED_CCFF), \ 1054 H(OP_UNUSED_CDFF), \ 1055 H(OP_UNUSED_CEFF), \ 1056 H(OP_UNUSED_CFFF), \ 1057 H(OP_UNUSED_D0FF), \ 1058 H(OP_UNUSED_D1FF), \ 1059 H(OP_UNUSED_D2FF), \ 1060 H(OP_UNUSED_D3FF), \ 1061 H(OP_UNUSED_D4FF), \ 1062 H(OP_UNUSED_D5FF), \ 1063 H(OP_UNUSED_D6FF), \ 1064 H(OP_UNUSED_D7FF), \ 1065 H(OP_UNUSED_D8FF), \ 1066 H(OP_UNUSED_D9FF), \ 1067 H(OP_UNUSED_DAFF), \ 1068 H(OP_UNUSED_DBFF), \ 1069 H(OP_UNUSED_DCFF), \ 1070 H(OP_UNUSED_DDFF), \ 1071 H(OP_UNUSED_DEFF), \ 1072 H(OP_UNUSED_DFFF), \ 1073 H(OP_UNUSED_E0FF), \ 1074 H(OP_UNUSED_E1FF), \ 1075 H(OP_UNUSED_E2FF), \ 1076 H(OP_UNUSED_E3FF), \ 1077 H(OP_UNUSED_E4FF), \ 1078 H(OP_UNUSED_E5FF), \ 1079 H(OP_UNUSED_E6FF), \ 1080 H(OP_UNUSED_E7FF), \ 1081 H(OP_UNUSED_E8FF), \ 1082 H(OP_UNUSED_E9FF), \ 1083 H(OP_UNUSED_EAFF), \ 1084 H(OP_UNUSED_EBFF), \ 1085 H(OP_UNUSED_ECFF), \ 1086 H(OP_UNUSED_EDFF), \ 1087 H(OP_UNUSED_EEFF), \ 1088 H(OP_UNUSED_EFFF), \ 1089 H(OP_UNUSED_F0FF), \ 1090 H(OP_UNUSED_F1FF), \ 1091 H(OP_INVOKE_OBJECT_INIT_JUMBO), \ 1092 H(OP_IGET_VOLATILE_JUMBO), \ 1093 H(OP_IGET_WIDE_VOLATILE_JUMBO), \ 1094 H(OP_IGET_OBJECT_VOLATILE_JUMBO), \ 1095 H(OP_IPUT_VOLATILE_JUMBO), \ 1096 H(OP_IPUT_WIDE_VOLATILE_JUMBO), \ 1097 H(OP_IPUT_OBJECT_VOLATILE_JUMBO), \ 1098 H(OP_SGET_VOLATILE_JUMBO), \ 1099 H(OP_SGET_WIDE_VOLATILE_JUMBO), \ 1100 H(OP_SGET_OBJECT_VOLATILE_JUMBO), \ 1101 H(OP_SPUT_VOLATILE_JUMBO), \ 1102 H(OP_SPUT_WIDE_VOLATILE_JUMBO), \ 1103 H(OP_SPUT_OBJECT_VOLATILE_JUMBO), \ 1104 H(OP_THROW_VERIFICATION_ERROR_JUMBO), \ 1105 /* END(libdex-goto-table) */ \ 1106 }; 1107 1108 /* 1109 * Return the Opcode for a given raw opcode code unit (which may 1110 * include data payload). The packed index is a zero-based index which 1111 * can be used to point into various opcode-related tables. The Dalvik 1112 * opcode space is inherently sparse, in that the opcode unit is 16 1113 * bits wide, but for most opcodes, eight of those bits are for data. 1114 */ 1115 DEX_INLINE Opcode dexOpcodeFromCodeUnit(u2 codeUnit) { 1116 /* 1117 * This will want to become table-driven should the opcode layout 1118 * get more complicated. 1119 * 1120 * Note: This has to match the corresponding code in opcode-gen, so 1121 * that data tables get generated in a consistent way. 1122 */ 1123 int lowByte = codeUnit & 0xff; 1124 if (lowByte != 0xff) { 1125 return (Opcode) lowByte; 1126 } else { 1127 return (Opcode) ((codeUnit >> 8) | 0x100); 1128 } 1129 } 1130 1131 /* 1132 * Return the name of an opcode. 1133 */ 1134 const char* dexGetOpcodeName(Opcode op); 1135 1136 #endif // LIBDEX_DEXOPCODES_H_ 1137