Home | History | Annotate | Download | only in dex

Lines Matching full:instruction

167  * Parse an instruction, return the length of the instruction
170 const Instruction* inst = Instruction::At(code_ptr);
188 MIR* prev = nullptr; // Will be set to instruction before split.
197 // Now insn is at the instruction where we want to split, namely
198 // insn will be the first instruction of the "bottom" block.
199 // Similarly, prev will be the last instruction of the "top" block
306 // Does this containing block start with the desired instruction?
331 * first half of a potentially throwing instruction that has been split into
339 // instruction may have already moved the mapping for dex to bottom_block.
397 const Instruction* monitor_exit = Instruction::At(current_code_item_->insns_ + monitor_exit_offset);
398 DCHECK(monitor_exit->Opcode() == Instruction::MONITOR_EXIT);
400 const Instruction* check_insn = Instruction::At(current_code_item_->insns_ + catch_offset);
401 if (check_insn->Opcode() == Instruction::MOVE_EXCEPTION) {
412 case Instruction::MOVE_WIDE:
415 case Instruction::MOVE_OBJECT:
416 case Instruction::MOVE:
420 case Instruction::MOVE_WIDE_FROM16:
423 case Instruction::MOVE_OBJECT_FROM16:
424 case Instruction::MOVE_FROM16:
428 case Instruction::MOVE_WIDE_16:
431 Instruction::MOVE_OBJECT_16:
432 case Instruction::MOVE_16:
436 case Instruction::GOTO:
437 case Instruction::GOTO_16:
438 case Instruction::GOTO_32:
442 return check_insn->Opcode() == Instruction::MONITOR_EXIT &&
461 case Instruction::GOTO:
462 case Instruction::GOTO_16:
463 case Instruction::GOTO_32:
466 case Instruction::IF_EQ:
467 case Instruction::IF_NE:
468 case Instruction::IF_LT:
469 case Instruction::IF_GE:
470 case Instruction::IF_GT:
471 case Instruction::IF_LE:
475 case Instruction::IF_EQZ:
476 case Instruction::IF_NEZ:
477 case Instruction::IF_LTZ:
478 case Instruction::IF_GEZ:
479 case Instruction::IF_GTZ:
480 case Instruction::IF_LEZ:
496 if (flags & Instruction::kContinue) {
535 if (insn->dalvikInsn.opcode == Instruction::PACKED_SWITCH) {
537 static_cast<int>(Instruction::kPackedSwitchSignature));
553 static_cast<int>(Instruction::kSparseSwitchSignature));
565 (insn->dalvikInsn.opcode == Instruction::PACKED_SWITCH) ? kPackedSwitch : kSparseSwitch;
578 (insn->dalvikInsn.opcode == Instruction::PACKED_SWITCH) ?
601 bool is_throw = (insn->dalvikInsn.opcode == Instruction::THROW);
617 if (insn->dalvikInsn.opcode == Instruction::MONITOR_EXIT &&
670 * Split the potentially-throwing instruction into two parts.
673 * Then, create a new basic block that begins with the throwing instruction
675 * the block_map. If the potentially-throwing instruction is the target of a
677 * basic block containing the work portion of the instruction should
684 * throwing instruction will refer to the original basic block.
692 insn->dalvikInsn.opcode = static_cast<Instruction::Code>(kMirOpCheck);
767 Instruction::Code opcode = insn->dalvikInsn.opcode;
773 int verify_flags = Instruction::VerifyFlagsOf(insn->dalvikInsn.opcode);
787 if (opcode == Instruction::NOP) {
792 if ((following_raw_instruction == Instruction::kSparseSwitchSignature) ||
793 (following_raw_instruction == Instruction::kPackedSwitchSignature) ||
794 (following_raw_instruction == Instruction::kArrayDataSignature)) {
795 width += Instruction::At(code_ptr + 1)->SizeInCodeUnits();
804 // Unreachable instruction, mark for no continuation and end basic block.
805 flags &= ~Instruction::kContinue;
818 if (flags & Instruction::kBranch) {
821 } else if (flags & Instruction::kReturn) {
837 } else if (flags & Instruction::kThrow) {
840 } else if (flags & Instruction::kSwitch) {
844 if (verify_flags & Instruction::kVerifyVarArgRange ||
845 verify_flags & Instruction::kVerifyVarArgRangeNonZero) {
848 * argument ("in") vregs and the rest of its vregs. Handling a range instruction
864 * The next instruction could be the target of a previously parsed
866 * instruction is not an unconditional branch, connect them through
873 if ((cur_block->fall_through == NullBasicBlockId) && (flags & Instruction::kContinue)) {
910 LOG(INFO) << "-C- " << Instruction::Name(static_cast<Instruction::Code>(i))
916 uint64_t MIRGraph::GetDataFlowAttributes(Instruction::Code opcode) {
923 Instruction::Code opcode = mir->dalvikInsn.opcode;
1006 Instruction::Name(mir->dalvikInsn.opcode) :
1089 /* Insert an MIR instruction to the end of a basic block. */
1109 /* Insert a MIR instruction after the specified MIR. */
1141 /* Insert an MIR instruction to the head of a basic block. */
1159 /* Insert a MIR instruction before the specified MIR. */
1307 return; // It is not an extended instruction.
1509 Instruction::Format dalvik_format = Instruction::k10x; // Default to no-operand format.
1511 // Handle special cases that recover the original dalvik instruction.
1515 // Recover the original Dex instruction.
1523 insn.opcode = Instruction::At(current_code_item_->insns_ + mir->offset)->Opcode();
1533 // recovered dalvik instruction, it uses opcode of that instead of the extended one.
1536 dalvik_format = Instruction::FormatOf(insn.opcode);
1538 str.append(Instruction::Name(insn.opcode));
1541 bool show_singles = ((dalvik_format == Instruction::k35c) ||
1542 (dalvik_format == Instruction::k3rc));
1567 case Instruction::k11n: // Add one immediate from vB.
1568 case Instruction::k21s:
1569 case Instruction::k31i:
1570 case Instruction::k21h:
1573 case Instruction::k51l: // Add one wide immediate.
1576 case Instruction::k21c: // One register, one string/type/method index.
1577 case Instruction::k31c:
1580 case Instruction::k22c: // Two registers, one string/type/method index.
1583 case Instruction::k22s: // Add one immediate from vC.
1584 case Instruction::k22b:
1592 if ((flags & Instruction::kBranch) != 0) {
1596 case Instruction::k21t:
1599 case Instruction::k22t:
1602 case Instruction::k10t:
1603 case Instruction::k20t:
1604 case Instruction::k30t:
1747 move_result_mir->dalvikInsn.opcode = static_cast<Instruction::Code>(kMirOpNop);
2217 uint32_t SSARepresentation::GetStartUseIndex(Instruction::Code opcode) {
2223 case Instruction::IPUT:
2224 case Instruction::IPUT_OBJECT:
2225 case Instruction::IPUT_BOOLEAN:
2226 case Instruction::IPUT_BYTE:
2227 case Instruction::IPUT_CHAR:
2228 case Instruction::IPUT_SHORT:
2229 case Instruction::IPUT_QUICK:
2230 case Instruction::IPUT_OBJECT_QUICK:
2231 case Instruction::IPUT_BOOLEAN_QUICK:
2232 case Instruction::IPUT_BYTE_QUICK:
2233 case Instruction::IPUT_CHAR_QUICK:
2234 case Instruction::IPUT_SHORT_QUICK:
2235 case Instruction::APUT:
2236 case Instruction::APUT_OBJECT:
2237 case Instruction::APUT_BOOLEAN:
2238 case Instruction::APUT_BYTE:
2239 case Instruction::APUT_CHAR:
2240 case Instruction::APUT_SHORT:
2241 case Instruction::SPUT:
2242 case Instruction::SPUT_OBJECT:
2243 case Instruction::SPUT_BOOLEAN:
2244 case Instruction::SPUT_BYTE:
2245 case Instruction::SPUT_CHAR:
2246 case Instruction::SPUT_SHORT:
2250 case Instruction::IPUT_WIDE:
2251 case Instruction::IPUT_WIDE_QUICK:
2252 case Instruction::APUT_WIDE:
2253 case Instruction::SPUT_WIDE:
2266 * @brief Given a decoded instruction, it checks whether the instruction
2271 * @return Returns false if the decoded instruction does not represent a constant bytecode.
2281 case Instruction::CONST_4:
2282 case Instruction::CONST_16:
2283 case Instruction::CONST:
2288 case Instruction::CONST_HIGH16:
2293 case Instruction::CONST_WIDE_16:
2294 case Instruction::CONST_WIDE_32:
2299 case Instruction::CONST_WIDE:
2303 case Instruction::CONST_WIDE_HIGH16:
2492 return Instruction::FlagsOf(opcode);
2498 return Instruction::kContinue;
2500 return Instruction::kContinue;
2502 return Instruction::kContinue | Instruction::kBranch;
2504 return Instruction::kContinue | Instruction::kBranch;
2506 return Instruction::kContinue | Instruction::kBranch;
2508 return Instruction::kContinue | Instruction::kBranch;
2510 return Instruction::kContinue | Instruction::kBranch;
2512 return Instruction::kContinue;
2514 return Instruction::kContinue | Instruction::kThrow;
2516 return Instruction::kContinue | Instruction::kThrow;
2518 return Instruction::kContinue | Instruction::kThrow;
2520 return Instruction::kContinue | Instruction::kThrow;
2522 return Instruction::kContinue;
2524 return Instruction::kContinue;
2526 return Instruction::kContinue;
2528 return Instruction::kContinue;
2530 return Instruction::kContinue;
2532 return Instruction::kContinue;
2534 return Instruction::kContinue;
2536 return Instruction::kContinue;
2538 return Instruction::kContinue;
2540 return Instruction::kContinue;
2542 return Instruction::kContinue;
2544 return Instruction::kContinue;
2546 return Instruction::kContinue;
2548 return Instruction::kContinue;
2550 return Instruction::kContinue;
2552 return Instruction::kContinue;
2554 return Instruction::kContinue;
2556 return Instruction::kContinue;
2558 return Instruction::kContinue | Instruction::kThrow;
2560 return Instruction::kContinue | Instruction::kThrow;
2565 return Instruction::kContinue;