The Android Open Source Project | f6c3871 | 2009-03-03 19:28:47 -0800 | [diff] [blame] | 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 enumeration. |
| 19 | */ |
| 20 | #ifndef _LIBDEX_OPCODE |
| 21 | #define _LIBDEX_OPCODE |
| 22 | |
| 23 | /* |
| 24 | * If you add, delete, or renumber instructions, you need to change things |
| 25 | * in various places. Renumbering really only affects the "unused" opcodes, |
| 26 | * which are given explicit enumeration values to make it easier to find |
| 27 | * the places in the code that need to be updated when making changes -- |
| 28 | * if you replace "OP_UNUSED_2D" and neglect to update a switch statement, |
| 29 | * the compiler will complain about an unknown value. |
| 30 | * |
| 31 | * Opcode definitions and attributes: |
| 32 | * - update the OpCode enum below |
| 33 | * - update the "goto table" definition macro, DEFINE_GOTO_TABLE(), below |
| 34 | * - update the instruction info table generators and (if you changed an |
| 35 | * instruction format) instruction decoder in InstrUtils.c |
| 36 | * - update the instruction format list in InstrUtils.h, if necessary |
| 37 | * - update the parallel definitions in the class dalvik.bytecode.Opcodes |
| 38 | * |
| 39 | * Interpreter: |
| 40 | * - implement/update the instruction in C in mterp/c/... |
| 41 | * - verify new code by running with "dalvik.vm.execution-mode = |
| 42 | * int:portable" or "-Xint:portable" |
| 43 | * - implement/update the instruction in ARM in mterp/armv5/... |
| 44 | * - verify by enabling ARM handler for that instruction in mterp config |
| 45 | * and running int:fast as above |
| 46 | * - repeat for other platforms (x86, ...) |
| 47 | * (see notes in mterp/ReadMe.txt for rebuilding instructions) |
| 48 | * |
| 49 | * Verifier / optimizer: |
| 50 | * - update some stuff in analysis/DexOptimize.c, analysis/DexVerify.c, |
| 51 | * and/or analysis/CodeVerify.c as needed |
| 52 | * - verify by running with verifier enabled (it's on by default) |
| 53 | * |
| 54 | * Tools: |
| 55 | * - update the OpCodeNames table in dexdump/OpCodeNames.c |
| 56 | * - update dexdump/DexDump.c if an instruction format has changed |
| 57 | * |
| 58 | * Note: The Dalvik VM tests (in the tests subdirectory) provide a convenient |
| 59 | * way to test most of the above without doing any rebuilds. In particular, |
| 60 | * test 003-omnibus-opcodes will exercise most of the opcodes. |
| 61 | */ |
| 62 | |
| 63 | /* |
| 64 | * Dalvik opcode list. |
| 65 | */ |
| 66 | typedef enum OpCode { |
| 67 | OP_NOP = 0x00, |
| 68 | |
| 69 | OP_MOVE = 0x01, |
| 70 | OP_MOVE_FROM16 = 0x02, |
| 71 | OP_MOVE_16 = 0x03, |
| 72 | OP_MOVE_WIDE = 0x04, |
| 73 | OP_MOVE_WIDE_FROM16 = 0x05, |
| 74 | OP_MOVE_WIDE_16 = 0x06, |
| 75 | OP_MOVE_OBJECT = 0x07, |
| 76 | OP_MOVE_OBJECT_FROM16 = 0x08, |
| 77 | OP_MOVE_OBJECT_16 = 0x09, |
| 78 | |
| 79 | OP_MOVE_RESULT = 0x0a, |
| 80 | OP_MOVE_RESULT_WIDE = 0x0b, |
| 81 | OP_MOVE_RESULT_OBJECT = 0x0c, |
| 82 | OP_MOVE_EXCEPTION = 0x0d, |
| 83 | |
| 84 | OP_RETURN_VOID = 0x0e, |
| 85 | OP_RETURN = 0x0f, |
| 86 | OP_RETURN_WIDE = 0x10, |
| 87 | OP_RETURN_OBJECT = 0x11, |
| 88 | |
| 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 | |
| 101 | OP_MONITOR_ENTER = 0x1d, |
| 102 | OP_MONITOR_EXIT = 0x1e, |
| 103 | |
| 104 | OP_CHECK_CAST = 0x1f, |
| 105 | OP_INSTANCE_OF = 0x20, |
| 106 | |
| 107 | OP_ARRAY_LENGTH = 0x21, |
| 108 | |
| 109 | OP_NEW_INSTANCE = 0x22, |
| 110 | OP_NEW_ARRAY = 0x23, |
| 111 | |
| 112 | OP_FILLED_NEW_ARRAY = 0x24, |
| 113 | OP_FILLED_NEW_ARRAY_RANGE = 0x25, |
| 114 | OP_FILL_ARRAY_DATA = 0x26, |
| 115 | |
| 116 | OP_THROW = 0x27, |
| 117 | OP_GOTO = 0x28, |
| 118 | OP_GOTO_16 = 0x29, |
| 119 | OP_GOTO_32 = 0x2a, |
| 120 | OP_PACKED_SWITCH = 0x2b, |
| 121 | OP_SPARSE_SWITCH = 0x2c, |
| 122 | |
| 123 | OP_CMPL_FLOAT = 0x2d, |
| 124 | OP_CMPG_FLOAT = 0x2e, |
| 125 | OP_CMPL_DOUBLE = 0x2f, |
| 126 | OP_CMPG_DOUBLE = 0x30, |
| 127 | OP_CMP_LONG = 0x31, |
| 128 | |
| 129 | OP_IF_EQ = 0x32, |
| 130 | OP_IF_NE = 0x33, |
| 131 | OP_IF_LT = 0x34, |
| 132 | OP_IF_GE = 0x35, |
| 133 | OP_IF_GT = 0x36, |
| 134 | OP_IF_LE = 0x37, |
| 135 | OP_IF_EQZ = 0x38, |
| 136 | OP_IF_NEZ = 0x39, |
| 137 | OP_IF_LTZ = 0x3a, |
| 138 | OP_IF_GEZ = 0x3b, |
| 139 | OP_IF_GTZ = 0x3c, |
| 140 | OP_IF_LEZ = 0x3d, |
| 141 | |
| 142 | OP_UNUSED_3E = 0x3e, |
| 143 | OP_UNUSED_3F = 0x3f, |
| 144 | OP_UNUSED_40 = 0x40, |
| 145 | OP_UNUSED_41 = 0x41, |
| 146 | OP_UNUSED_42 = 0x42, |
| 147 | OP_UNUSED_43 = 0x43, |
| 148 | |
| 149 | OP_AGET = 0x44, |
| 150 | OP_AGET_WIDE = 0x45, |
| 151 | OP_AGET_OBJECT = 0x46, |
| 152 | OP_AGET_BOOLEAN = 0x47, |
| 153 | OP_AGET_BYTE = 0x48, |
| 154 | OP_AGET_CHAR = 0x49, |
| 155 | OP_AGET_SHORT = 0x4a, |
| 156 | OP_APUT = 0x4b, |
| 157 | OP_APUT_WIDE = 0x4c, |
| 158 | OP_APUT_OBJECT = 0x4d, |
| 159 | OP_APUT_BOOLEAN = 0x4e, |
| 160 | OP_APUT_BYTE = 0x4f, |
| 161 | OP_APUT_CHAR = 0x50, |
| 162 | OP_APUT_SHORT = 0x51, |
| 163 | |
| 164 | OP_IGET = 0x52, |
| 165 | OP_IGET_WIDE = 0x53, |
| 166 | OP_IGET_OBJECT = 0x54, |
| 167 | OP_IGET_BOOLEAN = 0x55, |
| 168 | OP_IGET_BYTE = 0x56, |
| 169 | OP_IGET_CHAR = 0x57, |
| 170 | OP_IGET_SHORT = 0x58, |
| 171 | OP_IPUT = 0x59, |
| 172 | OP_IPUT_WIDE = 0x5a, |
| 173 | OP_IPUT_OBJECT = 0x5b, |
| 174 | OP_IPUT_BOOLEAN = 0x5c, |
| 175 | OP_IPUT_BYTE = 0x5d, |
| 176 | OP_IPUT_CHAR = 0x5e, |
| 177 | OP_IPUT_SHORT = 0x5f, |
| 178 | |
| 179 | OP_SGET = 0x60, |
| 180 | OP_SGET_WIDE = 0x61, |
| 181 | OP_SGET_OBJECT = 0x62, |
| 182 | OP_SGET_BOOLEAN = 0x63, |
| 183 | OP_SGET_BYTE = 0x64, |
| 184 | OP_SGET_CHAR = 0x65, |
| 185 | OP_SGET_SHORT = 0x66, |
| 186 | OP_SPUT = 0x67, |
| 187 | OP_SPUT_WIDE = 0x68, |
| 188 | OP_SPUT_OBJECT = 0x69, |
| 189 | OP_SPUT_BOOLEAN = 0x6a, |
| 190 | OP_SPUT_BYTE = 0x6b, |
| 191 | OP_SPUT_CHAR = 0x6c, |
| 192 | OP_SPUT_SHORT = 0x6d, |
| 193 | |
| 194 | OP_INVOKE_VIRTUAL = 0x6e, |
| 195 | OP_INVOKE_SUPER = 0x6f, |
| 196 | OP_INVOKE_DIRECT = 0x70, |
| 197 | OP_INVOKE_STATIC = 0x71, |
| 198 | OP_INVOKE_INTERFACE = 0x72, |
| 199 | |
| 200 | OP_UNUSED_73 = 0x73, |
| 201 | |
| 202 | OP_INVOKE_VIRTUAL_RANGE = 0x74, |
| 203 | OP_INVOKE_SUPER_RANGE = 0x75, |
| 204 | OP_INVOKE_DIRECT_RANGE = 0x76, |
| 205 | OP_INVOKE_STATIC_RANGE = 0x77, |
| 206 | OP_INVOKE_INTERFACE_RANGE = 0x78, |
| 207 | |
| 208 | OP_UNUSED_79 = 0x79, |
| 209 | OP_UNUSED_7A = 0x7a, |
| 210 | |
| 211 | OP_NEG_INT = 0x7b, |
| 212 | OP_NOT_INT = 0x7c, |
| 213 | OP_NEG_LONG = 0x7d, |
| 214 | OP_NOT_LONG = 0x7e, |
| 215 | OP_NEG_FLOAT = 0x7f, |
| 216 | OP_NEG_DOUBLE = 0x80, |
| 217 | OP_INT_TO_LONG = 0x81, |
| 218 | OP_INT_TO_FLOAT = 0x82, |
| 219 | OP_INT_TO_DOUBLE = 0x83, |
| 220 | OP_LONG_TO_INT = 0x84, |
| 221 | OP_LONG_TO_FLOAT = 0x85, |
| 222 | OP_LONG_TO_DOUBLE = 0x86, |
| 223 | OP_FLOAT_TO_INT = 0x87, |
| 224 | OP_FLOAT_TO_LONG = 0x88, |
| 225 | OP_FLOAT_TO_DOUBLE = 0x89, |
| 226 | OP_DOUBLE_TO_INT = 0x8a, |
| 227 | OP_DOUBLE_TO_LONG = 0x8b, |
| 228 | OP_DOUBLE_TO_FLOAT = 0x8c, |
| 229 | OP_INT_TO_BYTE = 0x8d, |
| 230 | OP_INT_TO_CHAR = 0x8e, |
| 231 | OP_INT_TO_SHORT = 0x8f, |
| 232 | |
| 233 | OP_ADD_INT = 0x90, |
| 234 | OP_SUB_INT = 0x91, |
| 235 | OP_MUL_INT = 0x92, |
| 236 | OP_DIV_INT = 0x93, |
| 237 | OP_REM_INT = 0x94, |
| 238 | OP_AND_INT = 0x95, |
| 239 | OP_OR_INT = 0x96, |
| 240 | OP_XOR_INT = 0x97, |
| 241 | OP_SHL_INT = 0x98, |
| 242 | OP_SHR_INT = 0x99, |
| 243 | OP_USHR_INT = 0x9a, |
| 244 | |
| 245 | OP_ADD_LONG = 0x9b, |
| 246 | OP_SUB_LONG = 0x9c, |
| 247 | OP_MUL_LONG = 0x9d, |
| 248 | OP_DIV_LONG = 0x9e, |
| 249 | OP_REM_LONG = 0x9f, |
| 250 | OP_AND_LONG = 0xa0, |
| 251 | OP_OR_LONG = 0xa1, |
| 252 | OP_XOR_LONG = 0xa2, |
| 253 | OP_SHL_LONG = 0xa3, |
| 254 | OP_SHR_LONG = 0xa4, |
| 255 | OP_USHR_LONG = 0xa5, |
| 256 | |
| 257 | OP_ADD_FLOAT = 0xa6, |
| 258 | OP_SUB_FLOAT = 0xa7, |
| 259 | OP_MUL_FLOAT = 0xa8, |
| 260 | OP_DIV_FLOAT = 0xa9, |
| 261 | OP_REM_FLOAT = 0xaa, |
| 262 | OP_ADD_DOUBLE = 0xab, |
| 263 | OP_SUB_DOUBLE = 0xac, |
| 264 | OP_MUL_DOUBLE = 0xad, |
| 265 | OP_DIV_DOUBLE = 0xae, |
| 266 | OP_REM_DOUBLE = 0xaf, |
| 267 | |
| 268 | OP_ADD_INT_2ADDR = 0xb0, |
| 269 | OP_SUB_INT_2ADDR = 0xb1, |
| 270 | OP_MUL_INT_2ADDR = 0xb2, |
| 271 | OP_DIV_INT_2ADDR = 0xb3, |
| 272 | OP_REM_INT_2ADDR = 0xb4, |
| 273 | OP_AND_INT_2ADDR = 0xb5, |
| 274 | OP_OR_INT_2ADDR = 0xb6, |
| 275 | OP_XOR_INT_2ADDR = 0xb7, |
| 276 | OP_SHL_INT_2ADDR = 0xb8, |
| 277 | OP_SHR_INT_2ADDR = 0xb9, |
| 278 | OP_USHR_INT_2ADDR = 0xba, |
| 279 | |
| 280 | OP_ADD_LONG_2ADDR = 0xbb, |
| 281 | OP_SUB_LONG_2ADDR = 0xbc, |
| 282 | OP_MUL_LONG_2ADDR = 0xbd, |
| 283 | OP_DIV_LONG_2ADDR = 0xbe, |
| 284 | OP_REM_LONG_2ADDR = 0xbf, |
| 285 | OP_AND_LONG_2ADDR = 0xc0, |
| 286 | OP_OR_LONG_2ADDR = 0xc1, |
| 287 | OP_XOR_LONG_2ADDR = 0xc2, |
| 288 | OP_SHL_LONG_2ADDR = 0xc3, |
| 289 | OP_SHR_LONG_2ADDR = 0xc4, |
| 290 | OP_USHR_LONG_2ADDR = 0xc5, |
| 291 | |
| 292 | OP_ADD_FLOAT_2ADDR = 0xc6, |
| 293 | OP_SUB_FLOAT_2ADDR = 0xc7, |
| 294 | OP_MUL_FLOAT_2ADDR = 0xc8, |
| 295 | OP_DIV_FLOAT_2ADDR = 0xc9, |
| 296 | OP_REM_FLOAT_2ADDR = 0xca, |
| 297 | OP_ADD_DOUBLE_2ADDR = 0xcb, |
| 298 | OP_SUB_DOUBLE_2ADDR = 0xcc, |
| 299 | OP_MUL_DOUBLE_2ADDR = 0xcd, |
| 300 | OP_DIV_DOUBLE_2ADDR = 0xce, |
| 301 | OP_REM_DOUBLE_2ADDR = 0xcf, |
| 302 | |
| 303 | OP_ADD_INT_LIT16 = 0xd0, |
| 304 | OP_RSUB_INT = 0xd1, /* no _LIT16 suffix for this */ |
| 305 | OP_MUL_INT_LIT16 = 0xd2, |
| 306 | OP_DIV_INT_LIT16 = 0xd3, |
| 307 | OP_REM_INT_LIT16 = 0xd4, |
| 308 | OP_AND_INT_LIT16 = 0xd5, |
| 309 | OP_OR_INT_LIT16 = 0xd6, |
| 310 | OP_XOR_INT_LIT16 = 0xd7, |
| 311 | |
| 312 | OP_ADD_INT_LIT8 = 0xd8, |
| 313 | OP_RSUB_INT_LIT8 = 0xd9, |
| 314 | OP_MUL_INT_LIT8 = 0xda, |
| 315 | OP_DIV_INT_LIT8 = 0xdb, |
| 316 | OP_REM_INT_LIT8 = 0xdc, |
| 317 | OP_AND_INT_LIT8 = 0xdd, |
| 318 | OP_OR_INT_LIT8 = 0xde, |
| 319 | OP_XOR_INT_LIT8 = 0xdf, |
| 320 | OP_SHL_INT_LIT8 = 0xe0, |
| 321 | OP_SHR_INT_LIT8 = 0xe1, |
| 322 | OP_USHR_INT_LIT8 = 0xe2, |
| 323 | |
| 324 | OP_UNUSED_E3 = 0xe3, |
| 325 | OP_UNUSED_E4 = 0xe4, |
| 326 | OP_UNUSED_E5 = 0xe5, |
| 327 | OP_UNUSED_E6 = 0xe6, |
| 328 | OP_UNUSED_E7 = 0xe7, |
| 329 | OP_UNUSED_E8 = 0xe8, |
| 330 | OP_UNUSED_E9 = 0xe9, |
| 331 | OP_UNUSED_EA = 0xea, |
| 332 | OP_UNUSED_EB = 0xeb, |
| 333 | OP_UNUSED_EC = 0xec, |
The Android Open Source Project | f6c3871 | 2009-03-03 19:28:47 -0800 | [diff] [blame] | 334 | |
| 335 | /* optimizer output -- these are never generated by "dx" */ |
Andy McFadden | 3a1aedb | 2009-05-07 13:30:23 -0700 | [diff] [blame] | 336 | OP_THROW_VERIFICATION_ERROR = 0xed, |
The Android Open Source Project | f6c3871 | 2009-03-03 19:28:47 -0800 | [diff] [blame] | 337 | OP_EXECUTE_INLINE = 0xee, |
| 338 | OP_UNUSED_EF = 0xef, /* OP_EXECUTE_INLINE_RANGE? */ |
| 339 | |
| 340 | OP_INVOKE_DIRECT_EMPTY = 0xf0, |
| 341 | OP_UNUSED_F1 = 0xf1, /* OP_INVOKE_DIRECT_EMPTY_RANGE? */ |
| 342 | OP_IGET_QUICK = 0xf2, |
| 343 | OP_IGET_WIDE_QUICK = 0xf3, |
| 344 | OP_IGET_OBJECT_QUICK = 0xf4, |
| 345 | OP_IPUT_QUICK = 0xf5, |
| 346 | OP_IPUT_WIDE_QUICK = 0xf6, |
| 347 | OP_IPUT_OBJECT_QUICK = 0xf7, |
| 348 | |
| 349 | OP_INVOKE_VIRTUAL_QUICK = 0xf8, |
| 350 | OP_INVOKE_VIRTUAL_QUICK_RANGE = 0xf9, |
| 351 | OP_INVOKE_SUPER_QUICK = 0xfa, |
| 352 | OP_INVOKE_SUPER_QUICK_RANGE = 0xfb, |
| 353 | OP_UNUSED_FC = 0xfc, /* OP_INVOKE_DIRECT_QUICK? */ |
| 354 | OP_UNUSED_FD = 0xfd, /* OP_INVOKE_DIRECT_QUICK_RANGE? */ |
| 355 | OP_UNUSED_FE = 0xfe, /* OP_INVOKE_INTERFACE_QUICK? */ |
| 356 | OP_UNUSED_FF = 0xff, /* OP_INVOKE_INTERFACE_QUICK_RANGE*/ |
| 357 | } OpCode; |
| 358 | |
| 359 | #define kNumDalvikInstructions 256 |
| 360 | |
| 361 | /* |
| 362 | * Switch-statement signatures are a "NOP" followed by a code. (A true NOP |
| 363 | * is 0x0000.) |
| 364 | */ |
| 365 | #define kPackedSwitchSignature 0x0100 |
| 366 | #define kSparseSwitchSignature 0x0200 |
| 367 | #define kArrayDataSignature 0x0300 |
| 368 | |
| 369 | /* |
| 370 | * Macro used to generate computed goto tables for the C interpreter. |
| 371 | * |
| 372 | * The labels here must match up with the labels in the interpreter |
| 373 | * implementation. There is no direct connection between these and the |
| 374 | * numeric definitions above, but if the two get out of sync strange things |
| 375 | * will happen. |
| 376 | */ |
| 377 | #define DEFINE_GOTO_TABLE(_name) \ |
| 378 | static const void* _name[kNumDalvikInstructions] = { \ |
| 379 | /* 00..0f */ \ |
| 380 | H(OP_NOP), \ |
| 381 | H(OP_MOVE), \ |
| 382 | H(OP_MOVE_FROM16), \ |
| 383 | H(OP_MOVE_16), \ |
| 384 | H(OP_MOVE_WIDE), \ |
| 385 | H(OP_MOVE_WIDE_FROM16), \ |
| 386 | H(OP_MOVE_WIDE_16), \ |
| 387 | H(OP_MOVE_OBJECT), \ |
| 388 | H(OP_MOVE_OBJECT_FROM16), \ |
| 389 | H(OP_MOVE_OBJECT_16), \ |
| 390 | H(OP_MOVE_RESULT), \ |
| 391 | H(OP_MOVE_RESULT_WIDE), \ |
| 392 | H(OP_MOVE_RESULT_OBJECT), \ |
| 393 | H(OP_MOVE_EXCEPTION), \ |
| 394 | H(OP_RETURN_VOID), \ |
| 395 | H(OP_RETURN), \ |
| 396 | /* 10..1f */ \ |
| 397 | H(OP_RETURN_WIDE), \ |
| 398 | H(OP_RETURN_OBJECT), \ |
| 399 | H(OP_CONST_4), \ |
| 400 | H(OP_CONST_16), \ |
| 401 | H(OP_CONST), \ |
| 402 | H(OP_CONST_HIGH16), \ |
| 403 | H(OP_CONST_WIDE_16), \ |
| 404 | H(OP_CONST_WIDE_32), \ |
| 405 | H(OP_CONST_WIDE), \ |
| 406 | H(OP_CONST_WIDE_HIGH16), \ |
| 407 | H(OP_CONST_STRING), \ |
| 408 | H(OP_CONST_STRING_JUMBO), \ |
| 409 | H(OP_CONST_CLASS), \ |
| 410 | H(OP_MONITOR_ENTER), \ |
| 411 | H(OP_MONITOR_EXIT), \ |
| 412 | H(OP_CHECK_CAST), \ |
| 413 | /* 20..2f */ \ |
| 414 | H(OP_INSTANCE_OF), \ |
| 415 | H(OP_ARRAY_LENGTH), \ |
| 416 | H(OP_NEW_INSTANCE), \ |
| 417 | H(OP_NEW_ARRAY), \ |
| 418 | H(OP_FILLED_NEW_ARRAY), \ |
| 419 | H(OP_FILLED_NEW_ARRAY_RANGE), \ |
| 420 | H(OP_FILL_ARRAY_DATA), \ |
| 421 | H(OP_THROW), \ |
| 422 | H(OP_GOTO), \ |
| 423 | H(OP_GOTO_16), \ |
| 424 | H(OP_GOTO_32), \ |
| 425 | H(OP_PACKED_SWITCH), \ |
| 426 | H(OP_SPARSE_SWITCH), \ |
| 427 | H(OP_CMPL_FLOAT), \ |
| 428 | H(OP_CMPG_FLOAT), \ |
| 429 | H(OP_CMPL_DOUBLE), \ |
| 430 | /* 30..3f */ \ |
| 431 | H(OP_CMPG_DOUBLE), \ |
| 432 | H(OP_CMP_LONG), \ |
| 433 | H(OP_IF_EQ), \ |
| 434 | H(OP_IF_NE), \ |
| 435 | H(OP_IF_LT), \ |
| 436 | H(OP_IF_GE), \ |
| 437 | H(OP_IF_GT), \ |
| 438 | H(OP_IF_LE), \ |
| 439 | H(OP_IF_EQZ), \ |
| 440 | H(OP_IF_NEZ), \ |
| 441 | H(OP_IF_LTZ), \ |
| 442 | H(OP_IF_GEZ), \ |
| 443 | H(OP_IF_GTZ), \ |
| 444 | H(OP_IF_LEZ), \ |
| 445 | H(OP_UNUSED_3E), \ |
| 446 | H(OP_UNUSED_3F), \ |
| 447 | /* 40..4f */ \ |
| 448 | H(OP_UNUSED_40), \ |
| 449 | H(OP_UNUSED_41), \ |
| 450 | H(OP_UNUSED_42), \ |
| 451 | H(OP_UNUSED_43), \ |
| 452 | H(OP_AGET), \ |
| 453 | H(OP_AGET_WIDE), \ |
| 454 | H(OP_AGET_OBJECT), \ |
| 455 | H(OP_AGET_BOOLEAN), \ |
| 456 | H(OP_AGET_BYTE), \ |
| 457 | H(OP_AGET_CHAR), \ |
| 458 | H(OP_AGET_SHORT), \ |
| 459 | H(OP_APUT), \ |
| 460 | H(OP_APUT_WIDE), \ |
| 461 | H(OP_APUT_OBJECT), \ |
| 462 | H(OP_APUT_BOOLEAN), \ |
| 463 | H(OP_APUT_BYTE), \ |
| 464 | /* 50..5f */ \ |
| 465 | H(OP_APUT_CHAR), \ |
| 466 | H(OP_APUT_SHORT), \ |
| 467 | H(OP_IGET), \ |
| 468 | H(OP_IGET_WIDE), \ |
| 469 | H(OP_IGET_OBJECT), \ |
| 470 | H(OP_IGET_BOOLEAN), \ |
| 471 | H(OP_IGET_BYTE), \ |
| 472 | H(OP_IGET_CHAR), \ |
| 473 | H(OP_IGET_SHORT), \ |
| 474 | H(OP_IPUT), \ |
| 475 | H(OP_IPUT_WIDE), \ |
| 476 | H(OP_IPUT_OBJECT), \ |
| 477 | H(OP_IPUT_BOOLEAN), \ |
| 478 | H(OP_IPUT_BYTE), \ |
| 479 | H(OP_IPUT_CHAR), \ |
| 480 | H(OP_IPUT_SHORT), \ |
| 481 | /* 60..6f */ \ |
| 482 | H(OP_SGET), \ |
| 483 | H(OP_SGET_WIDE), \ |
| 484 | H(OP_SGET_OBJECT), \ |
| 485 | H(OP_SGET_BOOLEAN), \ |
| 486 | H(OP_SGET_BYTE), \ |
| 487 | H(OP_SGET_CHAR), \ |
| 488 | H(OP_SGET_SHORT), \ |
| 489 | H(OP_SPUT), \ |
| 490 | H(OP_SPUT_WIDE), \ |
| 491 | H(OP_SPUT_OBJECT), \ |
| 492 | H(OP_SPUT_BOOLEAN), \ |
| 493 | H(OP_SPUT_BYTE), \ |
| 494 | H(OP_SPUT_CHAR), \ |
| 495 | H(OP_SPUT_SHORT), \ |
| 496 | H(OP_INVOKE_VIRTUAL), \ |
| 497 | H(OP_INVOKE_SUPER), \ |
| 498 | /* 70..7f */ \ |
| 499 | H(OP_INVOKE_DIRECT), \ |
| 500 | H(OP_INVOKE_STATIC), \ |
| 501 | H(OP_INVOKE_INTERFACE), \ |
| 502 | H(OP_UNUSED_73), \ |
| 503 | H(OP_INVOKE_VIRTUAL_RANGE), \ |
| 504 | H(OP_INVOKE_SUPER_RANGE), \ |
| 505 | H(OP_INVOKE_DIRECT_RANGE), \ |
| 506 | H(OP_INVOKE_STATIC_RANGE), \ |
| 507 | H(OP_INVOKE_INTERFACE_RANGE), \ |
| 508 | H(OP_UNUSED_79), \ |
| 509 | H(OP_UNUSED_7A), \ |
| 510 | H(OP_NEG_INT), \ |
| 511 | H(OP_NOT_INT), \ |
| 512 | H(OP_NEG_LONG), \ |
| 513 | H(OP_NOT_LONG), \ |
| 514 | H(OP_NEG_FLOAT), \ |
| 515 | /* 80..8f */ \ |
| 516 | H(OP_NEG_DOUBLE), \ |
| 517 | H(OP_INT_TO_LONG), \ |
| 518 | H(OP_INT_TO_FLOAT), \ |
| 519 | H(OP_INT_TO_DOUBLE), \ |
| 520 | H(OP_LONG_TO_INT), \ |
| 521 | H(OP_LONG_TO_FLOAT), \ |
| 522 | H(OP_LONG_TO_DOUBLE), \ |
| 523 | H(OP_FLOAT_TO_INT), \ |
| 524 | H(OP_FLOAT_TO_LONG), \ |
| 525 | H(OP_FLOAT_TO_DOUBLE), \ |
| 526 | H(OP_DOUBLE_TO_INT), \ |
| 527 | H(OP_DOUBLE_TO_LONG), \ |
| 528 | H(OP_DOUBLE_TO_FLOAT), \ |
| 529 | H(OP_INT_TO_BYTE), \ |
| 530 | H(OP_INT_TO_CHAR), \ |
| 531 | H(OP_INT_TO_SHORT), \ |
| 532 | /* 90..9f */ \ |
| 533 | H(OP_ADD_INT), \ |
| 534 | H(OP_SUB_INT), \ |
| 535 | H(OP_MUL_INT), \ |
| 536 | H(OP_DIV_INT), \ |
| 537 | H(OP_REM_INT), \ |
| 538 | H(OP_AND_INT), \ |
| 539 | H(OP_OR_INT), \ |
| 540 | H(OP_XOR_INT), \ |
| 541 | H(OP_SHL_INT), \ |
| 542 | H(OP_SHR_INT), \ |
| 543 | H(OP_USHR_INT), \ |
| 544 | H(OP_ADD_LONG), \ |
| 545 | H(OP_SUB_LONG), \ |
| 546 | H(OP_MUL_LONG), \ |
| 547 | H(OP_DIV_LONG), \ |
| 548 | H(OP_REM_LONG), \ |
| 549 | /* a0..af */ \ |
| 550 | H(OP_AND_LONG), \ |
| 551 | H(OP_OR_LONG), \ |
| 552 | H(OP_XOR_LONG), \ |
| 553 | H(OP_SHL_LONG), \ |
| 554 | H(OP_SHR_LONG), \ |
| 555 | H(OP_USHR_LONG), \ |
| 556 | H(OP_ADD_FLOAT), \ |
| 557 | H(OP_SUB_FLOAT), \ |
| 558 | H(OP_MUL_FLOAT), \ |
| 559 | H(OP_DIV_FLOAT), \ |
| 560 | H(OP_REM_FLOAT), \ |
| 561 | H(OP_ADD_DOUBLE), \ |
| 562 | H(OP_SUB_DOUBLE), \ |
| 563 | H(OP_MUL_DOUBLE), \ |
| 564 | H(OP_DIV_DOUBLE), \ |
| 565 | H(OP_REM_DOUBLE), \ |
| 566 | /* b0..bf */ \ |
| 567 | H(OP_ADD_INT_2ADDR), \ |
| 568 | H(OP_SUB_INT_2ADDR), \ |
| 569 | H(OP_MUL_INT_2ADDR), \ |
| 570 | H(OP_DIV_INT_2ADDR), \ |
| 571 | H(OP_REM_INT_2ADDR), \ |
| 572 | H(OP_AND_INT_2ADDR), \ |
| 573 | H(OP_OR_INT_2ADDR), \ |
| 574 | H(OP_XOR_INT_2ADDR), \ |
| 575 | H(OP_SHL_INT_2ADDR), \ |
| 576 | H(OP_SHR_INT_2ADDR), \ |
| 577 | H(OP_USHR_INT_2ADDR), \ |
| 578 | H(OP_ADD_LONG_2ADDR), \ |
| 579 | H(OP_SUB_LONG_2ADDR), \ |
| 580 | H(OP_MUL_LONG_2ADDR), \ |
| 581 | H(OP_DIV_LONG_2ADDR), \ |
| 582 | H(OP_REM_LONG_2ADDR), \ |
| 583 | /* c0..cf */ \ |
| 584 | H(OP_AND_LONG_2ADDR), \ |
| 585 | H(OP_OR_LONG_2ADDR), \ |
| 586 | H(OP_XOR_LONG_2ADDR), \ |
| 587 | H(OP_SHL_LONG_2ADDR), \ |
| 588 | H(OP_SHR_LONG_2ADDR), \ |
| 589 | H(OP_USHR_LONG_2ADDR), \ |
| 590 | H(OP_ADD_FLOAT_2ADDR), \ |
| 591 | H(OP_SUB_FLOAT_2ADDR), \ |
| 592 | H(OP_MUL_FLOAT_2ADDR), \ |
| 593 | H(OP_DIV_FLOAT_2ADDR), \ |
| 594 | H(OP_REM_FLOAT_2ADDR), \ |
| 595 | H(OP_ADD_DOUBLE_2ADDR), \ |
| 596 | H(OP_SUB_DOUBLE_2ADDR), \ |
| 597 | H(OP_MUL_DOUBLE_2ADDR), \ |
| 598 | H(OP_DIV_DOUBLE_2ADDR), \ |
| 599 | H(OP_REM_DOUBLE_2ADDR), \ |
| 600 | /* d0..df */ \ |
| 601 | H(OP_ADD_INT_LIT16), \ |
| 602 | H(OP_RSUB_INT), \ |
| 603 | H(OP_MUL_INT_LIT16), \ |
| 604 | H(OP_DIV_INT_LIT16), \ |
| 605 | H(OP_REM_INT_LIT16), \ |
| 606 | H(OP_AND_INT_LIT16), \ |
| 607 | H(OP_OR_INT_LIT16), \ |
| 608 | H(OP_XOR_INT_LIT16), \ |
| 609 | H(OP_ADD_INT_LIT8), \ |
| 610 | H(OP_RSUB_INT_LIT8), \ |
| 611 | H(OP_MUL_INT_LIT8), \ |
| 612 | H(OP_DIV_INT_LIT8), \ |
| 613 | H(OP_REM_INT_LIT8), \ |
| 614 | H(OP_AND_INT_LIT8), \ |
| 615 | H(OP_OR_INT_LIT8), \ |
| 616 | H(OP_XOR_INT_LIT8), \ |
| 617 | /* e0..ef */ \ |
| 618 | H(OP_SHL_INT_LIT8), \ |
| 619 | H(OP_SHR_INT_LIT8), \ |
| 620 | H(OP_USHR_INT_LIT8), \ |
| 621 | H(OP_UNUSED_E3), \ |
| 622 | H(OP_UNUSED_E4), \ |
| 623 | H(OP_UNUSED_E5), \ |
| 624 | H(OP_UNUSED_E6), \ |
| 625 | H(OP_UNUSED_E7), \ |
| 626 | H(OP_UNUSED_E8), \ |
| 627 | H(OP_UNUSED_E9), \ |
| 628 | H(OP_UNUSED_EA), \ |
| 629 | H(OP_UNUSED_EB), \ |
| 630 | H(OP_UNUSED_EC), \ |
Andy McFadden | 3a1aedb | 2009-05-07 13:30:23 -0700 | [diff] [blame] | 631 | H(OP_THROW_VERIFICATION_ERROR), \ |
The Android Open Source Project | f6c3871 | 2009-03-03 19:28:47 -0800 | [diff] [blame] | 632 | H(OP_EXECUTE_INLINE), \ |
| 633 | H(OP_UNUSED_EF), \ |
| 634 | /* f0..ff */ \ |
| 635 | H(OP_INVOKE_DIRECT_EMPTY), \ |
| 636 | H(OP_UNUSED_F1), \ |
| 637 | H(OP_IGET_QUICK), \ |
| 638 | H(OP_IGET_WIDE_QUICK), \ |
| 639 | H(OP_IGET_OBJECT_QUICK), \ |
| 640 | H(OP_IPUT_QUICK), \ |
| 641 | H(OP_IPUT_WIDE_QUICK), \ |
| 642 | H(OP_IPUT_OBJECT_QUICK), \ |
| 643 | H(OP_INVOKE_VIRTUAL_QUICK), \ |
| 644 | H(OP_INVOKE_VIRTUAL_QUICK_RANGE), \ |
| 645 | H(OP_INVOKE_SUPER_QUICK), \ |
| 646 | H(OP_INVOKE_SUPER_QUICK_RANGE), \ |
| 647 | H(OP_UNUSED_FC), \ |
| 648 | H(OP_UNUSED_FD), \ |
| 649 | H(OP_UNUSED_FE), \ |
| 650 | H(OP_UNUSED_FF), \ |
| 651 | }; |
| 652 | |
| 653 | #endif /*_LIBDEX_OPCODE*/ |