Home | History | Annotate | Download | only in dex

Lines Matching full:instruction

78           case Instruction::CONST_4:
79 case Instruction::CONST_16:
80 case Instruction::CONST:
83 case Instruction::CONST_HIGH16:
86 case Instruction::CONST_WIDE_16:
87 case Instruction::CONST_WIDE_32:
90 case Instruction::CONST_WIDE:
93 case Instruction::CONST_WIDE_HIGH16:
149 if ((mir->dalvikInsn.opcode == Instruction::MOVE_RESULT) ||
150 (mir->dalvikInsn.opcode == Instruction::MOVE_RESULT_OBJECT) ||
151 (mir->dalvikInsn.opcode == Instruction::MOVE_RESULT_WIDE)) {
206 case Instruction::MOVE:
207 case Instruction::MOVE_OBJECT:
208 case Instruction::MOVE_16:
209 case Instruction::MOVE_OBJECT_16:
210 case Instruction::MOVE_FROM16:
211 case Instruction::MOVE_OBJECT_FROM16:
213 case Instruction::CONST:
214 case Instruction::CONST_4:
215 case Instruction::CONST_16:
217 case Instruction::GOTO:
218 case Instruction::GOTO_16:
219 case Instruction::GOTO_32:
230 static_assert(arraysize(kIfCcZConditionCodes) == Instruction::IF_LEZ - Instruction::IF_EQZ + 1,
233 static constexpr ConditionCode ConditionCodeForIfCcZ(Instruction::Code opcode) {
234 return kIfCcZConditionCodes[opcode - Instruction::IF_EQZ];
237 static_assert(ConditionCodeForIfCcZ(Instruction::IF_EQZ) == kCondEq, "if_eqz ccode");
238 static_assert(ConditionCodeForIfCcZ(Instruction::IF_NEZ) == kCondNe, "if_nez ccode");
239 static_assert(ConditionCodeForIfCcZ(Instruction::IF_LTZ) == kCondLt, "if_ltz ccode");
240 static_assert(ConditionCodeForIfCcZ(Instruction::IF_GEZ) == kCondGe, "if_gez ccode");
241 static_assert(ConditionCodeForIfCcZ(Instruction::IF_GTZ) == kCondGt, "if_gtz ccode");
242 static_assert(ConditionCodeForIfCcZ(Instruction::IF_LEZ) == kCondLe, "if_lez ccode");
445 static bool EvaluateBranch(Instruction::Code opcode, int32_t src1, int32_t src2) {
448 case Instruction::IF_EQ: is_taken = (src1 == src2); break;
449 case Instruction::IF_NE: is_taken = (src1 != src2); break;
450 case Instruction::IF_LT: is_taken = (src1 < src2); break;
451 case Instruction::IF_GE: is_taken = (src1 >= src2); break;
452 case Instruction::IF_GT: is_taken = (src1 > src2); break;
453 case Instruction::IF_LE: is_taken = (src1 <= src2); break;
454 case Instruction::IF_EQZ: is_taken = (src1 == 0); break;
455 case Instruction::IF_NEZ: is_taken = (src1 != 0); break;
456 case Instruction::IF_LTZ: is_taken = (src1 < 0); break;
457 case Instruction::IF_GEZ: is_taken = (src1 >= 0); break;
458 case Instruction::IF_GTZ: is_taken = (src1 > 0); break;
459 case Instruction::IF_LEZ: is_taken = (src1 <= 0); break;
494 Instruction::Code opcode = mir->dalvikInsn.opcode;
496 case Instruction::IF_EQ:
497 case Instruction::IF_NE:
498 case Instruction::IF_LT:
499 case Instruction::IF_GE:
500 case Instruction::IF_GT:
501 case Instruction::IF_LE:
506 case Instruction::IF_EQZ:
507 case Instruction::IF_NEZ:
508 case Instruction::IF_LTZ:
509 case Instruction::IF_GEZ:
510 case Instruction::IF_GTZ:
511 case Instruction::IF_LEZ:
520 mir->dalvikInsn.opcode = Instruction::GOTO;
526 mir->dalvikInsn.opcode = static_cast<Instruction::Code>(kMirOpNop);
538 case Instruction::CMPL_FLOAT:
539 case Instruction::CMPL_DOUBLE:
540 case Instruction::CMPG_FLOAT:
541 case Instruction::CMPG_DOUBLE:
542 case Instruction::CMP_LONG:
555 case Instruction::CMPL_FLOAT:
557 static_cast<Instruction::Code>(kMirOpFusedCmplFloat);
559 case Instruction::CMPL_DOUBLE:
561 static_cast<Instruction::Code>(kMirOpFusedCmplDouble);
563 case Instruction::CMPG_FLOAT:
565 static_cast<Instruction::Code>(kMirOpFusedCmpgFloat);
567 case Instruction::CMPG_DOUBLE:
569 static_cast<Instruction::Code>(kMirOpFusedCmpgDouble);
571 case Instruction::CMP_LONG:
573 static_cast<Instruction::Code>(kMirOpFusedCmpLong);
577 mir->dalvikInsn.opcode = static_cast<Instruction::Code>(kMirOpNop);
587 // Copy in the decoded instruction information for potential SSA re-creation.
647 mir->dalvikInsn.opcode = static_cast<Instruction::Code>(kMirOpSelect);
790 Instruction::Code opcode = prev->last_mir_insn->dalvikInsn.opcode;
792 case Instruction::IF_EQ: opcode = Instruction::IF_NE; break;
793 case Instruction::IF_NE: opcode = Instruction::IF_EQ; break;
794 case Instruction::IF_LT: opcode = Instruction::IF_GE; break;
795 case Instruction::IF_GE: opcode = Instruction
796 case Instruction::IF_GT: opcode = Instruction::IF_LE; break;
797 case Instruction::IF_LE: opcode = Instruction::IF_GT; break;
798 case Instruction::IF_EQZ: opcode = Instruction::IF_NEZ; break;
799 case Instruction::IF_NEZ: opcode = Instruction::IF_EQZ; break;
800 case Instruction::IF_LTZ: opcode = Instruction::IF_GEZ; break;
801 case Instruction::IF_GEZ: opcode = Instruction::IF_LTZ; break;
802 case Instruction::IF_GTZ: opcode = Instruction::IF_LEZ; break;
803 case Instruction::IF_LEZ: opcode = Instruction::IF_GTZ; break;
838 // that kMirOpCheck's throw instruction is first one in the bb_next.
840 // Now move all instructions (throw instruction to last one) from bb_next to bb.
844 // The kMirOpCheck instruction is not needed anymore.
845 mir->dalvikInsn.opcode = static_cast<Instruction::Code>(kMirOpNop);
1004 // Walk through the instruction in the block, updating as necessary
1068 } else if (UNLIKELY(next_mir->dalvikInsn.opcode != Instruction::MOVE_RESULT_OBJECT)) {
1283 // Walk through the instruction in the block, updating as necessary
1522 if (!(mir->dalvikInsn.FlagsOf() & Instruction::kInvoke)) {
1666 Instruction::Code opcode = mir->dalvikInsn.opcode;
1667 if (opcode == Instruction::NEW_INSTANCE) {
1671 mir->dalvikInsn.opcode = Instruction::CONST_4;
1674 } else if ((opcode == Instruction::INVOKE_DIRECT) ||
1675 (opcode == Instruction::INVOKE_DIRECT_RANGE)) {
1680 bool is_range = (opcode == Instruction::INVOKE_DIRECT_RANGE);
1685 mir->dalvikInsn.opcode = Instruction::INVOKE_STATIC;
1690 mir->dalvikInsn.opcode = Instruction::INVOKE_STATIC_RANGE;
1693 // Insert a move-result instruction to the original this pointer reg.
1695 move_result_mir->dalvikInsn.opcode = Instruction::MOVE_RESULT_OBJECT;
1711 move_mir->dalvikInsn.opcode = Instruction::MOVE_OBJECT;
1806 mir->dalvikInsn.opcode = Instruction::GOTO;
1819 if ((mir->dalvikInsn.FlagsOf() & Instruction::kThrow) == 0) {
1851 } else if (mir->dalvikInsn.opcode == Instruction::CHECK_CAST &&
1854 } else if (mir->dalvikInsn.opcode == Instruction::ARRAY_LENGTH ||
1883 add_mir->dalvikInsn.opcode = static_cast<Instruction::Code>(kMirOpMsubLong);
1885 add_mir->dalvikInsn.opcode = static_cast<Instruction::Code>(kMirOpMaddLong);
1889 add_mir->dalvikInsn.opcode = static_cast<Instruction::Code>(kMirOpMsubInt);
1891 add_mir->dalvikInsn.opcode = static_cast<Instruction::Code>(kMirOpMaddInt);
1922 // Copy in the decoded instruction information.
1932 mul_mir->dalvikInsn.opcode = static_cast<Instruction::Code>(kMirOpNop);
1943 Instruction::Code opcode = mir->dalvikInsn.opcode;
1947 case Instruction::MUL_INT:
1948 case Instruction::MUL_INT_2ADDR:
1951 case Instruction::MUL_LONG:
1952 case Instruction::MUL_LONG_2ADDR:
1957 case Instruction::ADD_INT:
1958 case Instruction::ADD_INT_2ADDR:
1961 case Instruction::SUB_INT:
1962 case Instruction::SUB_INT_2ADDR:
1975 case Instruction::ADD_LONG:
1976 Instruction::ADD_LONG_2ADDR:
1979 case Instruction::SUB_LONG:
1980 case Instruction::SUB_LONG_2ADDR: