Lines Matching refs:inst
286 bool VerifyInstruction(const Instruction* inst, uint32_t code_offset);
446 …bool CheckSignaturePolymorphicReceiver(const Instruction* inst) REQUIRES_SHARED(Locks::mutator_loc…
522 void VerifyNewArray(const Instruction* inst, bool is_filled, bool is_range)
533 void VerifyAGet(const Instruction* inst, const RegType& insn_type,
537 void VerifyAPut(const Instruction* inst, const RegType& insn_type,
549 void VerifyISFieldAccess(const Instruction* inst, const RegType& insn_type,
597 ArtMethod* VerifyInvocationArgs(const Instruction* inst, MethodType method_type, bool is_range)
602 void VerifyInvocationArgsUnresolvedMethod(const Instruction* inst, MethodType method_type,
607 ArtMethod* VerifyInvocationArgsFromIterator(T* it, const Instruction* inst,
708 uint16_t GetMethodIdxOfInvoke(const Instruction* inst) in GetMethodIdxOfInvoke() argument
710 return inst->VRegB(); in GetMethodIdxOfInvoke()
713 uint16_t GetFieldIdxOfFieldAccess(const Instruction* inst, bool is_static) in GetFieldIdxOfFieldAccess() argument
716 return inst->VRegB_21c(); in GetFieldIdxOfFieldAccess()
718 return inst->VRegC_22c(); in GetFieldIdxOfFieldAccess()
748 bool HandleMoveException(const Instruction* inst) REQUIRES_SHARED(Locks::mutator_lock_);
837 for (const DexInstructionPcPair& inst : code_item_accessor_) { in FindLocksAtDexPc() local
838 if (inst->Opcode() == Instruction::MONITOR_ENTER) { in FindLocksAtDexPc()
1147 for (const DexInstructionPcPair& inst : code_item_accessor_) { in VerifyInstructions() local
1148 const uint32_t dex_pc = inst.DexPc(); in VerifyInstructions()
1149 if (!VerifyInstruction<kAllowRuntimeOnlyInstructions>(&inst.Inst(), dex_pc)) { in VerifyInstructions()
1154 if (inst->IsReturn()) { in VerifyInstructions()
1156 } else if (inst->Opcode() == Instruction::CHECK_CAST) { in VerifyInstructions()
1166 bool MethodVerifier<kVerifierDebug>::VerifyInstruction(const Instruction* inst, in VerifyInstruction() argument
1169 switch (inst->GetVerifyTypeArgumentA()) { in VerifyInstruction()
1171 result = result && CheckRegisterIndex(inst->VRegA()); in VerifyInstruction()
1174 result = result && CheckWideRegisterIndex(inst->VRegA()); in VerifyInstruction()
1177 switch (inst->GetVerifyTypeArgumentB()) { in VerifyInstruction()
1179 result = result && CheckRegisterIndex(inst->VRegB()); in VerifyInstruction()
1182 result = result && CheckFieldIndex(inst->VRegB()); in VerifyInstruction()
1185 result = result && CheckMethodIndex(inst->VRegB()); in VerifyInstruction()
1188 result = result && CheckNewInstance(dex::TypeIndex(inst->VRegB())); in VerifyInstruction()
1191 result = result && CheckStringIndex(inst->VRegB()); in VerifyInstruction()
1194 result = result && CheckTypeIndex(dex::TypeIndex(inst->VRegB())); in VerifyInstruction()
1197 result = result && CheckWideRegisterIndex(inst->VRegB()); in VerifyInstruction()
1200 result = result && CheckCallSiteIndex(inst->VRegB()); in VerifyInstruction()
1203 result = result && CheckMethodHandleIndex(inst->VRegB()); in VerifyInstruction()
1206 result = result && CheckPrototypeIndex(inst->VRegB()); in VerifyInstruction()
1209 switch (inst->GetVerifyTypeArgumentC()) { in VerifyInstruction()
1211 result = result && CheckRegisterIndex(inst->VRegC()); in VerifyInstruction()
1214 result = result && CheckFieldIndex(inst->VRegC()); in VerifyInstruction()
1217 result = result && CheckNewArray(dex::TypeIndex(inst->VRegC())); in VerifyInstruction()
1220 result = result && CheckTypeIndex(dex::TypeIndex(inst->VRegC())); in VerifyInstruction()
1223 result = result && CheckWideRegisterIndex(inst->VRegC()); in VerifyInstruction()
1226 switch (inst->GetVerifyTypeArgumentH()) { in VerifyInstruction()
1228 result = result && CheckPrototypeIndex(inst->VRegH()); in VerifyInstruction()
1231 switch (inst->GetVerifyExtraFlags()) { in VerifyInstruction()
1245 uint32_t v_a = dchecked_integral_cast<uint32_t>(inst->VRegA()); in VerifyInstruction()
1246 if ((inst->GetVerifyExtraFlags() == Instruction::kVerifyVarArgNonZero && v_a == 0) || in VerifyInstruction()
1254 inst->GetVarArgs(args); in VerifyInstruction()
1261 if (inst->GetVerifyExtraFlags() == Instruction::kVerifyVarArgRangeNonZero && in VerifyInstruction()
1262 inst->VRegA() <= 0) { in VerifyInstruction()
1263 Fail(VERIFY_ERROR_BAD_CLASS_HARD) << "invalid arg count (" << inst->VRegA() << ") in " in VerifyInstruction()
1267 result = result && CheckVarArgRangeRegs(inst->VRegA(), inst->VRegC()); in VerifyInstruction()
1270 Fail(VERIFY_ERROR_BAD_CLASS_HARD) << "unexpected opcode " << inst->Name(); in VerifyInstruction()
1274 if (!kAllowRuntimeOnlyInstructions && inst->GetVerifyIsRuntimeOnly()) { in VerifyInstruction()
1275 Fail(VERIFY_ERROR_BAD_CLASS_HARD) << "opcode only expected at runtime " << inst->Name(); in VerifyInstruction()
1607 for (const DexInstructionPcPair& inst : code_item_accessor_) { in Dump() local
1608 const size_t dex_pc = inst.DexPc(); in Dump()
1622 vios->Stream() << inst->DumpHex(5) << " "; in Dump()
1624 vios->Stream() << inst->DumpString(dex_file_) << "\n"; in Dump()
1912 for (const DexInstructionPcPair& inst : code_item_accessor_) { in CodeFlowVerifyMethod() local
1913 const uint32_t insn_idx = inst.DexPc(); in CodeFlowVerifyMethod()
2004 const Instruction* inst = Instruction::At(insns); in CodeFlowVerifyInstruction() local
2005 int opcode_flags = Instruction::FlagsOf(inst->Opcode()); in CodeFlowVerifyInstruction()
2011 LogVerifyInfo() << "Processing " << inst->DumpString(dex_file_) << std::endl in CodeFlowVerifyInstruction()
2022 if (((opcode_flags & Instruction::kThrow) != 0 || IsCompatThrow(inst->Opcode())) && in CodeFlowVerifyInstruction()
2039 switch (inst->Opcode()) { in CodeFlowVerifyInstruction()
2046 if (inst->VRegA_10x() != 0) { in CodeFlowVerifyInstruction()
2052 work_line_->CopyRegister1(this, inst->VRegA_12x(), inst->VRegB_12x(), kTypeCategory1nr); in CodeFlowVerifyInstruction()
2055 work_line_->CopyRegister1(this, inst->VRegA_22x(), inst->VRegB_22x(), kTypeCategory1nr); in CodeFlowVerifyInstruction()
2058 work_line_->CopyRegister1(this, inst->VRegA_32x(), inst->VRegB_32x(), kTypeCategory1nr); in CodeFlowVerifyInstruction()
2061 work_line_->CopyRegister2(this, inst->VRegA_12x(), inst->VRegB_12x()); in CodeFlowVerifyInstruction()
2064 work_line_->CopyRegister2(this, inst->VRegA_22x(), inst->VRegB_22x()); in CodeFlowVerifyInstruction()
2067 work_line_->CopyRegister2(this, inst->VRegA_32x(), inst->VRegB_32x()); in CodeFlowVerifyInstruction()
2070 work_line_->CopyRegister1(this, inst->VRegA_12x(), inst->VRegB_12x(), kTypeCategoryRef); in CodeFlowVerifyInstruction()
2073 work_line_->CopyRegister1(this, inst->VRegA_22x(), inst->VRegB_22x(), kTypeCategoryRef); in CodeFlowVerifyInstruction()
2076 work_line_->CopyRegister1(this, inst->VRegA_32x(), inst->VRegB_32x(), kTypeCategoryRef); in CodeFlowVerifyInstruction()
2091 work_line_->CopyResultRegister1(this, inst->VRegA_11x(), false); in CodeFlowVerifyInstruction()
2094 work_line_->CopyResultRegister2(this, inst->VRegA_11x()); in CodeFlowVerifyInstruction()
2097 work_line_->CopyResultRegister1(this, inst->VRegA_11x(), true); in CodeFlowVerifyInstruction()
2101 if (!HandleMoveException(inst)) { in CodeFlowVerifyInstruction()
2123 const uint32_t vregA = inst->VRegA_11x(); in CodeFlowVerifyInstruction()
2146 const uint32_t vregA = inst->VRegA_11x(); in CodeFlowVerifyInstruction()
2163 const uint32_t vregA = inst->VRegA_11x(); in CodeFlowVerifyInstruction()
2193 int32_t val = static_cast<int32_t>(inst->VRegB_11n() << 28) >> 28; in CodeFlowVerifyInstruction()
2194 work_line_->SetRegisterType<LockOp::kClear>(inst->VRegA_11n(), DetermineCat1Constant(val)); in CodeFlowVerifyInstruction()
2198 int16_t val = static_cast<int16_t>(inst->VRegB_21s()); in CodeFlowVerifyInstruction()
2199 work_line_->SetRegisterType<LockOp::kClear>(inst->VRegA_21s(), DetermineCat1Constant(val)); in CodeFlowVerifyInstruction()
2203 int32_t val = inst->VRegB_31i(); in CodeFlowVerifyInstruction()
2204 work_line_->SetRegisterType<LockOp::kClear>(inst->VRegA_31i(), DetermineCat1Constant(val)); in CodeFlowVerifyInstruction()
2208 int32_t val = static_cast<int32_t>(inst->VRegB_21h() << 16); in CodeFlowVerifyInstruction()
2209 work_line_->SetRegisterType<LockOp::kClear>(inst->VRegA_21h(), DetermineCat1Constant(val)); in CodeFlowVerifyInstruction()
2214 int64_t val = static_cast<int16_t>(inst->VRegB_21s()); in CodeFlowVerifyInstruction()
2217 work_line_->SetRegisterTypeWide(inst->VRegA_21s(), lo, hi); in CodeFlowVerifyInstruction()
2221 int64_t val = static_cast<int32_t>(inst->VRegB_31i()); in CodeFlowVerifyInstruction()
2224 work_line_->SetRegisterTypeWide(inst->VRegA_31i(), lo, hi); in CodeFlowVerifyInstruction()
2228 int64_t val = inst->VRegB_51l(); in CodeFlowVerifyInstruction()
2231 work_line_->SetRegisterTypeWide(inst->VRegA_51l(), lo, hi); in CodeFlowVerifyInstruction()
2235 int64_t val = static_cast<uint64_t>(inst->VRegB_21h()) << 48; in CodeFlowVerifyInstruction()
2238 work_line_->SetRegisterTypeWide(inst->VRegA_21h(), lo, hi); in CodeFlowVerifyInstruction()
2242 work_line_->SetRegisterType<LockOp::kClear>(inst->VRegA_21c(), reg_types_.JavaLangString()); in CodeFlowVerifyInstruction()
2245 work_line_->SetRegisterType<LockOp::kClear>(inst->VRegA_31c(), reg_types_.JavaLangString()); in CodeFlowVerifyInstruction()
2250 const RegType& res_type = ResolveClass<CheckAccess::kYes>(dex::TypeIndex(inst->VRegB_21c())); in CodeFlowVerifyInstruction()
2253 inst->VRegA_21c(), in CodeFlowVerifyInstruction()
2259 inst->VRegA_21c(), reg_types_.JavaLangInvokeMethodHandle()); in CodeFlowVerifyInstruction()
2263 inst->VRegA_21c(), reg_types_.JavaLangInvokeMethodType()); in CodeFlowVerifyInstruction()
2266 work_line_->PushMonitor(this, inst->VRegA_11x(), work_insn_idx_); in CodeFlowVerifyInstruction()
2279 if (prev_inst.VRegB() == inst->VRegA_11x()) { in CodeFlowVerifyInstruction()
2314 if (prev_inst.VRegA() == inst->VRegA_11x()) { in CodeFlowVerifyInstruction()
2317 inst->VRegA_11x(), in CodeFlowVerifyInstruction()
2319 } else if (prev2_inst.VRegA() == inst->VRegA_11x()) { in CodeFlowVerifyInstruction()
2322 inst->VRegA_11x(), in CodeFlowVerifyInstruction()
2355 work_line_->PopMonitor(this, inst->VRegA_11x()); in CodeFlowVerifyInstruction()
2366 const bool is_checkcast = (inst->Opcode() == Instruction::CHECK_CAST); in CodeFlowVerifyInstruction()
2367 const dex::TypeIndex type_idx((is_checkcast) ? inst->VRegB_21c() : inst->VRegC_22c()); in CodeFlowVerifyInstruction()
2382 work_line_->SetRegisterType<LockOp::kClear>(inst->VRegA_22c(), reg_types_.Boolean()); in CodeFlowVerifyInstruction()
2387 uint32_t orig_type_reg = (is_checkcast) ? inst->VRegA_21c() : inst->VRegB_22c(); in CodeFlowVerifyInstruction()
2411 work_line_->SetRegisterType<LockOp::kKeep>(inst->VRegA_21c(), res_type); in CodeFlowVerifyInstruction()
2413 work_line_->SetRegisterType<LockOp::kClear>(inst->VRegA_22c(), reg_types_.Boolean()); in CodeFlowVerifyInstruction()
2419 const RegType& res_type = work_line_->GetRegisterType(this, inst->VRegB_12x()); in CodeFlowVerifyInstruction()
2425 work_line_->SetRegisterType<LockOp::kClear>(inst->VRegA_12x(), reg_types_.Integer()); in CodeFlowVerifyInstruction()
2433 const RegType& res_type = ResolveClass<CheckAccess::kYes>(dex::TypeIndex(inst->VRegB_21c())); in CodeFlowVerifyInstruction()
2450 work_line_->SetRegisterType<LockOp::kClear>(inst->VRegA_21c(), uninit_type); in CodeFlowVerifyInstruction()
2454 VerifyNewArray(inst, false, false); in CodeFlowVerifyInstruction()
2457 VerifyNewArray(inst, true, false); in CodeFlowVerifyInstruction()
2461 VerifyNewArray(inst, true, true); in CodeFlowVerifyInstruction()
2466 if (!work_line_->VerifyRegisterType(this, inst->VRegB_23x(), reg_types_.Float())) { in CodeFlowVerifyInstruction()
2469 if (!work_line_->VerifyRegisterType(this, inst->VRegC_23x(), reg_types_.Float())) { in CodeFlowVerifyInstruction()
2472 work_line_->SetRegisterType<LockOp::kClear>(inst->VRegA_23x(), reg_types_.Integer()); in CodeFlowVerifyInstruction()
2476 if (!work_line_->VerifyRegisterTypeWide(this, inst->VRegB_23x(), reg_types_.DoubleLo(), in CodeFlowVerifyInstruction()
2480 if (!work_line_->VerifyRegisterTypeWide(this, inst->VRegC_23x(), reg_types_.DoubleLo(), in CodeFlowVerifyInstruction()
2484 work_line_->SetRegisterType<LockOp::kClear>(inst->VRegA_23x(), reg_types_.Integer()); in CodeFlowVerifyInstruction()
2487 if (!work_line_->VerifyRegisterTypeWide(this, inst->VRegB_23x(), reg_types_.LongLo(), in CodeFlowVerifyInstruction()
2491 if (!work_line_->VerifyRegisterTypeWide(this, inst->VRegC_23x(), reg_types_.LongLo(), in CodeFlowVerifyInstruction()
2495 work_line_->SetRegisterType<LockOp::kClear>(inst->VRegA_23x(), reg_types_.Integer()); in CodeFlowVerifyInstruction()
2498 const RegType& res_type = work_line_->GetRegisterType(this, inst->VRegA_11x()); in CodeFlowVerifyInstruction()
2521 work_line_->VerifyRegisterType(this, inst->VRegA_31t(), reg_types_.Integer()); in CodeFlowVerifyInstruction()
2526 const RegType& array_type = work_line_->GetRegisterType(this, inst->VRegA_31t()); in CodeFlowVerifyInstruction()
2565 const RegType& reg_type1 = work_line_->GetRegisterType(this, inst->VRegA_22t()); in CodeFlowVerifyInstruction()
2566 const RegType& reg_type2 = work_line_->GetRegisterType(this, inst->VRegB_22t()); in CodeFlowVerifyInstruction()
2585 const RegType& reg_type1 = work_line_->GetRegisterType(this, inst->VRegA_22t()); in CodeFlowVerifyInstruction()
2586 const RegType& reg_type2 = work_line_->GetRegisterType(this, inst->VRegB_22t()); in CodeFlowVerifyInstruction()
2595 const RegType& reg_type = work_line_->GetRegisterType(this, inst->VRegA_21t()); in CodeFlowVerifyInstruction()
2628 (inst->VRegA_21t() == instance_of_inst.VRegA_22c()) && in CodeFlowVerifyInstruction()
2657 if (inst->Opcode() == Instruction::IF_EQZ) { in CodeFlowVerifyInstruction()
2707 const RegType& reg_type = work_line_->GetRegisterType(this, inst->VRegA_21t()); in CodeFlowVerifyInstruction()
2715 VerifyAGet(inst, reg_types_.Boolean(), true); in CodeFlowVerifyInstruction()
2718 VerifyAGet(inst, reg_types_.Byte(), true); in CodeFlowVerifyInstruction()
2721 VerifyAGet(inst, reg_types_.Char(), true); in CodeFlowVerifyInstruction()
2724 VerifyAGet(inst, reg_types_.Short(), true); in CodeFlowVerifyInstruction()
2727 VerifyAGet(inst, reg_types_.Integer(), true); in CodeFlowVerifyInstruction()
2730 VerifyAGet(inst, reg_types_.LongLo(), true); in CodeFlowVerifyInstruction()
2733 VerifyAGet(inst, reg_types_.JavaLangObject(false), false); in CodeFlowVerifyInstruction()
2737 VerifyAPut(inst, reg_types_.Boolean(), true); in CodeFlowVerifyInstruction()
2740 VerifyAPut(inst, reg_types_.Byte(), true); in CodeFlowVerifyInstruction()
2743 VerifyAPut(inst, reg_types_.Char(), true); in CodeFlowVerifyInstruction()
2746 VerifyAPut(inst, reg_types_.Short(), true); in CodeFlowVerifyInstruction()
2749 VerifyAPut(inst, reg_types_.Integer(), true); in CodeFlowVerifyInstruction()
2752 VerifyAPut(inst, reg_types_.LongLo(), true); in CodeFlowVerifyInstruction()
2755 VerifyAPut(inst, reg_types_.JavaLangObject(false), false); in CodeFlowVerifyInstruction()
2759 VerifyISFieldAccess<FieldAccessType::kAccGet>(inst, reg_types_.Boolean(), true, false); in CodeFlowVerifyInstruction()
2762 VerifyISFieldAccess<FieldAccessType::kAccGet>(inst, reg_types_.Byte(), true, false); in CodeFlowVerifyInstruction()
2765 VerifyISFieldAccess<FieldAccessType::kAccGet>(inst, reg_types_.Char(), true, false); in CodeFlowVerifyInstruction()
2768 VerifyISFieldAccess<FieldAccessType::kAccGet>(inst, reg_types_.Short(), true, false); in CodeFlowVerifyInstruction()
2771 VerifyISFieldAccess<FieldAccessType::kAccGet>(inst, reg_types_.Integer(), true, false); in CodeFlowVerifyInstruction()
2774 VerifyISFieldAccess<FieldAccessType::kAccGet>(inst, reg_types_.LongLo(), true, false); in CodeFlowVerifyInstruction()
2777 VerifyISFieldAccess<FieldAccessType::kAccGet>(inst, reg_types_.JavaLangObject(false), false, in CodeFlowVerifyInstruction()
2782 VerifyISFieldAccess<FieldAccessType::kAccPut>(inst, reg_types_.Boolean(), true, false); in CodeFlowVerifyInstruction()
2785 VerifyISFieldAccess<FieldAccessType::kAccPut>(inst, reg_types_.Byte(), true, false); in CodeFlowVerifyInstruction()
2788 VerifyISFieldAccess<FieldAccessType::kAccPut>(inst, reg_types_.Char(), true, false); in CodeFlowVerifyInstruction()
2791 VerifyISFieldAccess<FieldAccessType::kAccPut>(inst, reg_types_.Short(), true, false); in CodeFlowVerifyInstruction()
2794 VerifyISFieldAccess<FieldAccessType::kAccPut>(inst, reg_types_.Integer(), true, false); in CodeFlowVerifyInstruction()
2797 VerifyISFieldAccess<FieldAccessType::kAccPut>(inst, reg_types_.LongLo(), true, false); in CodeFlowVerifyInstruction()
2800 VerifyISFieldAccess<FieldAccessType::kAccPut>(inst, reg_types_.JavaLangObject(false), false, in CodeFlowVerifyInstruction()
2805 VerifyISFieldAccess<FieldAccessType::kAccGet>(inst, reg_types_.Boolean(), true, true); in CodeFlowVerifyInstruction()
2808 VerifyISFieldAccess<FieldAccessType::kAccGet>(inst, reg_types_.Byte(), true, true); in CodeFlowVerifyInstruction()
2811 VerifyISFieldAccess<FieldAccessType::kAccGet>(inst, reg_types_.Char(), true, true); in CodeFlowVerifyInstruction()
2814 VerifyISFieldAccess<FieldAccessType::kAccGet>(inst, reg_types_.Short(), true, true); in CodeFlowVerifyInstruction()
2817 VerifyISFieldAccess<FieldAccessType::kAccGet>(inst, reg_types_.Integer(), true, true); in CodeFlowVerifyInstruction()
2820 VerifyISFieldAccess<FieldAccessType::kAccGet>(inst, reg_types_.LongLo(), true, true); in CodeFlowVerifyInstruction()
2823 VerifyISFieldAccess<FieldAccessType::kAccGet>(inst, reg_types_.JavaLangObject(false), false, in CodeFlowVerifyInstruction()
2828 VerifyISFieldAccess<FieldAccessType::kAccPut>(inst, reg_types_.Boolean(), true, true); in CodeFlowVerifyInstruction()
2831 VerifyISFieldAccess<FieldAccessType::kAccPut>(inst, reg_types_.Byte(), true, true); in CodeFlowVerifyInstruction()
2834 VerifyISFieldAccess<FieldAccessType::kAccPut>(inst, reg_types_.Char(), true, true); in CodeFlowVerifyInstruction()
2837 VerifyISFieldAccess<FieldAccessType::kAccPut>(inst, reg_types_.Short(), true, true); in CodeFlowVerifyInstruction()
2840 VerifyISFieldAccess<FieldAccessType::kAccPut>(inst, reg_types_.Integer(), true, true); in CodeFlowVerifyInstruction()
2843 VerifyISFieldAccess<FieldAccessType::kAccPut>(inst, reg_types_.LongLo(), true, true); in CodeFlowVerifyInstruction()
2846 VerifyISFieldAccess<FieldAccessType::kAccPut>(inst, reg_types_.JavaLangObject(false), false, in CodeFlowVerifyInstruction()
2854 bool is_range = (inst->Opcode() == Instruction::INVOKE_VIRTUAL_RANGE || in CodeFlowVerifyInstruction()
2855 inst->Opcode() == Instruction::INVOKE_SUPER_RANGE); in CodeFlowVerifyInstruction()
2856 bool is_super = (inst->Opcode() == Instruction::INVOKE_SUPER || in CodeFlowVerifyInstruction()
2857 inst->Opcode() == Instruction::INVOKE_SUPER_RANGE); in CodeFlowVerifyInstruction()
2859 ArtMethod* called_method = VerifyInvocationArgs(inst, type, is_range); in CodeFlowVerifyInstruction()
2875 uint32_t method_idx = GetMethodIdxOfInvoke(inst); in CodeFlowVerifyInstruction()
2892 bool is_range = (inst->Opcode() == Instruction::INVOKE_DIRECT_RANGE); in CodeFlowVerifyInstruction()
2893 ArtMethod* called_method = VerifyInvocationArgs(inst, METHOD_DIRECT, is_range); in CodeFlowVerifyInstruction()
2898 uint32_t method_idx = (is_range) ? inst->VRegB_3rc() : inst->VRegB_35c(); in CodeFlowVerifyInstruction()
2927 const RegType& this_type = work_line_->GetInvocationThis(this, inst); in CodeFlowVerifyInstruction()
2972 bool is_range = (inst->Opcode() == Instruction::INVOKE_STATIC_RANGE); in CodeFlowVerifyInstruction()
2973 ArtMethod* called_method = VerifyInvocationArgs(inst, METHOD_STATIC, is_range); in CodeFlowVerifyInstruction()
2976 uint32_t method_idx = (is_range) ? inst->VRegB_3rc() : inst->VRegB_35c(); in CodeFlowVerifyInstruction()
2995 bool is_range = (inst->Opcode() == Instruction::INVOKE_INTERFACE_RANGE); in CodeFlowVerifyInstruction()
2996 ArtMethod* abs_method = VerifyInvocationArgs(inst, METHOD_INTERFACE, is_range); in CodeFlowVerifyInstruction()
3008 const RegType& this_type = work_line_->GetInvocationThis(this, inst); in CodeFlowVerifyInstruction()
3031 uint32_t method_idx = (is_range) ? inst->VRegB_3rc() : inst->VRegB_35c(); in CodeFlowVerifyInstruction()
3050 bool is_range = (inst->Opcode() == Instruction::INVOKE_POLYMORPHIC_RANGE); in CodeFlowVerifyInstruction()
3051 ArtMethod* called_method = VerifyInvocationArgs(inst, METHOD_POLYMORPHIC, is_range); in CodeFlowVerifyInstruction()
3063 !CheckSignaturePolymorphicReceiver(inst)) { in CodeFlowVerifyInstruction()
3067 const uint16_t vRegH = (is_range) ? inst->VRegH_4rcc() : inst->VRegH_45cc(); in CodeFlowVerifyInstruction()
3084 bool is_range = (inst->Opcode() == Instruction::INVOKE_CUSTOM_RANGE); in CodeFlowVerifyInstruction()
3087 const uint32_t call_site_idx = is_range ? inst->VRegB_3rc() : inst->VRegB_35c(); in CodeFlowVerifyInstruction()
3100 VerifyInvocationArgsFromIterator(¶m_it, inst, METHOD_STATIC, is_range, nullptr); in CodeFlowVerifyInstruction()
3116 work_line_->CheckUnaryOp(this, inst, reg_types_.Integer(), reg_types_.Integer()); in CodeFlowVerifyInstruction()
3120 work_line_->CheckUnaryOpWide(this, inst, reg_types_.LongLo(), reg_types_.LongHi(), in CodeFlowVerifyInstruction()
3124 work_line_->CheckUnaryOp(this, inst, reg_types_.Float(), reg_types_.Float()); in CodeFlowVerifyInstruction()
3127 work_line_->CheckUnaryOpWide(this, inst, reg_types_.DoubleLo(), reg_types_.DoubleHi(), in CodeFlowVerifyInstruction()
3131 work_line_->CheckUnaryOpToWide(this, inst, reg_types_.LongLo(), reg_types_.LongHi(), in CodeFlowVerifyInstruction()
3135 work_line_->CheckUnaryOp(this, inst, reg_types_.Float(), reg_types_.Integer()); in CodeFlowVerifyInstruction()
3138 work_line_->CheckUnaryOpToWide(this, inst, reg_types_.DoubleLo(), reg_types_.DoubleHi(), in CodeFlowVerifyInstruction()
3142 work_line_->CheckUnaryOpFromWide(this, inst, reg_types_.Integer(), in CodeFlowVerifyInstruction()
3146 work_line_->CheckUnaryOpFromWide(this, inst, reg_types_.Float(), in CodeFlowVerifyInstruction()
3150 work_line_->CheckUnaryOpWide(this, inst, reg_types_.DoubleLo(), reg_types_.DoubleHi(), in CodeFlowVerifyInstruction()
3154 work_line_->CheckUnaryOp(this, inst, reg_types_.Integer(), reg_types_.Float()); in CodeFlowVerifyInstruction()
3157 work_line_->CheckUnaryOpToWide(this, inst, reg_types_.LongLo(), reg_types_.LongHi(), in CodeFlowVerifyInstruction()
3161 work_line_->CheckUnaryOpToWide(this, inst, reg_types_.DoubleLo(), reg_types_.DoubleHi(), in CodeFlowVerifyInstruction()
3165 work_line_->CheckUnaryOpFromWide(this, inst, reg_types_.Integer(), in CodeFlowVerifyInstruction()
3169 work_line_->CheckUnaryOpWide(this, inst, reg_types_.LongLo(), reg_types_.LongHi(), in CodeFlowVerifyInstruction()
3173 work_line_->CheckUnaryOpFromWide(this, inst, reg_types_.Float(), in CodeFlowVerifyInstruction()
3177 work_line_->CheckUnaryOp(this, inst, reg_types_.Byte(), reg_types_.Integer()); in CodeFlowVerifyInstruction()
3180 work_line_->CheckUnaryOp(this, inst, reg_types_.Char(), reg_types_.Integer()); in CodeFlowVerifyInstruction()
3183 work_line_->CheckUnaryOp(this, inst, reg_types_.Short(), reg_types_.Integer()); in CodeFlowVerifyInstruction()
3194 work_line_->CheckBinaryOp(this, inst, reg_types_.Integer(), reg_types_.Integer(), in CodeFlowVerifyInstruction()
3200 work_line_->CheckBinaryOp(this, inst, reg_types_.Integer(), reg_types_.Integer(), in CodeFlowVerifyInstruction()
3211 work_line_->CheckBinaryOpWide(this, inst, reg_types_.LongLo(), reg_types_.LongHi(), in CodeFlowVerifyInstruction()
3219 work_line_->CheckBinaryOpWideShift(this, inst, reg_types_.LongLo(), reg_types_.LongHi(), in CodeFlowVerifyInstruction()
3227 work_line_->CheckBinaryOp(this, inst, reg_types_.Float(), reg_types_.Float(), in CodeFlowVerifyInstruction()
3235 work_line_->CheckBinaryOpWide(this, inst, reg_types_.DoubleLo(), reg_types_.DoubleHi(), in CodeFlowVerifyInstruction()
3246 work_line_->CheckBinaryOp2addr(this, inst, reg_types_.Integer(), reg_types_.Integer(), in CodeFlowVerifyInstruction()
3252 work_line_->CheckBinaryOp2addr(this, inst, reg_types_.Integer(), reg_types_.Integer(), in CodeFlowVerifyInstruction()
3256 work_line_->CheckBinaryOp2addr(this, inst, reg_types_.Integer(), reg_types_.Integer(), in CodeFlowVerifyInstruction()
3267 work_line_->CheckBinaryOp2addrWide(this, inst, reg_types_.LongLo(), reg_types_.LongHi(), in CodeFlowVerifyInstruction()
3274 work_line_->CheckBinaryOp2addrWideShift(this, inst, reg_types_.LongLo(), reg_types_.LongHi(), in CodeFlowVerifyInstruction()
3282 work_line_->CheckBinaryOp2addr(this, inst, reg_types_.Float(), reg_types_.Float(), in CodeFlowVerifyInstruction()
3290 work_line_->CheckBinaryOp2addrWide(this, inst, reg_types_.DoubleLo(), reg_types_.DoubleHi(), in CodeFlowVerifyInstruction()
3299 work_line_->CheckLiteralOp(this, inst, reg_types_.Integer(), reg_types_.Integer(), false, in CodeFlowVerifyInstruction()
3305 work_line_->CheckLiteralOp(this, inst, reg_types_.Integer(), reg_types_.Integer(), true, in CodeFlowVerifyInstruction()
3316 work_line_->CheckLiteralOp(this, inst, reg_types_.Integer(), reg_types_.Integer(), false, in CodeFlowVerifyInstruction()
3322 work_line_->CheckLiteralOp(this, inst, reg_types_.Integer(), reg_types_.Integer(), true, in CodeFlowVerifyInstruction()
3332 Fail(VERIFY_ERROR_BAD_CLASS_HARD) << "Unexpected opcode " << inst->DumpString(dex_file_); in CodeFlowVerifyInstruction()
3356 info_messages_ << "Rejecting opcode " << inst->DumpString(dex_file_); in CodeFlowVerifyInstruction()
3506 if (inst->Opcode() != Instruction::MONITOR_ENTER || work_line_->MonitorStackDepth() != 1) { in CodeFlowVerifyInstruction()
3520 DCHECK_EQ(&code_item_accessor_.InstructionAt(work_insn_idx_), inst); in CodeFlowVerifyInstruction()
3521 uint32_t next_insn_idx = work_insn_idx_ + inst->SizeInCodeUnits(); in CodeFlowVerifyInstruction()
3569 DCHECK_EQ(&code_item_accessor_.InstructionAt(work_insn_idx_), inst); in CodeFlowVerifyInstruction()
3570 *start_guess = work_insn_idx_ + inst->SizeInCodeUnits(); in CodeFlowVerifyInstruction()
3650 bool MethodVerifier<kVerifierDebug>::HandleMoveException(const Instruction* inst) { in HandleMoveException() argument
3730 work_line_->SetRegisterType<LockOp::kClear>(inst->VRegA_11x(), *result.second); in HandleMoveException()
3876 T* it, const Instruction* inst, MethodType method_type, bool is_range, ArtMethod* res_method) { in VerifyInvocationArgsFromIterator() argument
3877 DCHECK_EQ(!is_range, inst->HasVarArgs()); in VerifyInvocationArgsFromIterator()
3882 const size_t expected_args = inst->VRegA(); in VerifyInvocationArgsFromIterator()
3899 const RegType& actual_arg_type = work_line_->GetInvocationThis(this, inst); in VerifyInvocationArgsFromIterator()
3913 const uint32_t method_idx = GetMethodIdxOfInvoke(inst); in VerifyInvocationArgsFromIterator()
3935 const uint32_t method_idx = GetMethodIdxOfInvoke(inst); in VerifyInvocationArgsFromIterator()
3957 inst->GetVarArgs(arg); in VerifyInvocationArgsFromIterator()
3962 Fail(VERIFY_ERROR_BAD_CLASS_HARD) << "Rejecting invocation, expected " << inst->VRegA() << in VerifyInvocationArgsFromIterator()
3976 uint32_t get_reg = is_range ? inst->VRegC() + static_cast<uint32_t>(sig_registers) : in VerifyInvocationArgsFromIterator()
4019 void MethodVerifier<kVerifierDebug>::VerifyInvocationArgsUnresolvedMethod(const Instruction* inst, in VerifyInvocationArgsUnresolvedMethod() argument
4025 const uint32_t method_idx = GetMethodIdxOfInvoke(inst); in VerifyInvocationArgsUnresolvedMethod()
4028 VerifyInvocationArgsFromIterator(&it, inst, method_type, is_range, nullptr); in VerifyInvocationArgsUnresolvedMethod()
4114 const Instruction* inst, MethodType method_type, bool is_range) { in VerifyInvocationArgs() argument
4117 const uint32_t method_idx = GetMethodIdxOfInvoke(inst); in VerifyInvocationArgs()
4122 VerifyInvocationArgsUnresolvedMethod(inst, method_type, is_range); in VerifyInvocationArgs()
4137 VerifyInvocationArgsUnresolvedMethod(inst, method_type, is_range); in VerifyInvocationArgs()
4144 VerifyInvocationArgsUnresolvedMethod(inst, method_type, is_range); in VerifyInvocationArgs()
4153 VerifyInvocationArgsUnresolvedMethod(inst, method_type, is_range); in VerifyInvocationArgs()
4162 VerifyInvocationArgsUnresolvedMethod(inst, method_type, is_range); in VerifyInvocationArgs()
4172 VerifyInvocationArgsUnresolvedMethod(inst, method_type, is_range); in VerifyInvocationArgs()
4180 dex::ProtoIndex proto_idx(inst->VRegH()); in VerifyInvocationArgs()
4182 return VerifyInvocationArgsFromIterator(&it, inst, method_type, is_range, res_method); in VerifyInvocationArgs()
4186 return VerifyInvocationArgsFromIterator(&it, inst, method_type, is_range, res_method); in VerifyInvocationArgs()
4240 bool MethodVerifier<kVerifierDebug>::CheckSignaturePolymorphicReceiver(const Instruction* inst) { in CheckSignaturePolymorphicReceiver() argument
4241 const RegType& this_type = work_line_->GetInvocationThis(this, inst); in CheckSignaturePolymorphicReceiver()
4274 void MethodVerifier<kVerifierDebug>::VerifyNewArray(const Instruction* inst, in VerifyNewArray() argument
4279 DCHECK_EQ(inst->Opcode(), Instruction::NEW_ARRAY); in VerifyNewArray()
4280 type_idx = dex::TypeIndex(inst->VRegC_22c()); in VerifyNewArray()
4282 DCHECK_EQ(inst->Opcode(), Instruction::FILLED_NEW_ARRAY); in VerifyNewArray()
4283 type_idx = dex::TypeIndex(inst->VRegB_35c()); in VerifyNewArray()
4285 DCHECK_EQ(inst->Opcode(), Instruction::FILLED_NEW_ARRAY_RANGE); in VerifyNewArray()
4286 type_idx = dex::TypeIndex(inst->VRegB_3rc()); in VerifyNewArray()
4297 work_line_->VerifyRegisterType(this, inst->VRegB_22c(), reg_types_.Integer()); in VerifyNewArray()
4300 work_line_->SetRegisterType<LockOp::kClear>(inst->VRegA_22c(), precise_type); in VerifyNewArray()
4306 uint32_t arg_count = (is_range) ? inst->VRegA_3rc() : inst->VRegA_35c(); in VerifyNewArray()
4309 inst->GetVarArgs(arg); in VerifyNewArray()
4312 uint32_t get_reg = is_range ? inst->VRegC_3rc() + ui : arg[ui]; in VerifyNewArray()
4323 void MethodVerifier<kVerifierDebug>::VerifyAGet(const Instruction* inst, in VerifyAGet() argument
4326 const RegType& index_type = work_line_->GetRegisterType(this, inst->VRegC_23x()); in VerifyAGet()
4330 const RegType& array_type = work_line_->GetRegisterType(this, inst->VRegB_23x()); in VerifyAGet()
4335 work_line_->SetRegisterType<LockOp::kClear>(inst->VRegA_23x(), reg_types_.Null()); in VerifyAGet()
4339 work_line_->SetRegisterType<LockOp::kClear>(inst->VRegA_23x(), DetermineCat1Constant(1)); in VerifyAGet()
4343 work_line_->SetRegisterType<LockOp::kClear>(inst->VRegA_23x(), insn_type); in VerifyAGet()
4346 work_line_->SetRegisterTypeWide(inst->VRegA_23x(), in VerifyAGet()
4361 work_line_->SetRegisterType<LockOp::kClear>(inst->VRegA_23x(), in VerifyAGet()
4383 work_line_->SetRegisterType<LockOp::kClear>(inst->VRegA_23x(), component_type); in VerifyAGet()
4385 work_line_->SetRegisterTypeWide(inst->VRegA_23x(), component_type, in VerifyAGet()
4447 void MethodVerifier<kVerifierDebug>::VerifyAPut(const Instruction* inst, in VerifyAPut() argument
4450 const RegType& index_type = work_line_->GetRegisterType(this, inst->VRegC_23x()); in VerifyAPut()
4454 const RegType& array_type = work_line_->GetRegisterType(this, inst->VRegB_23x()); in VerifyAPut()
4464 const RegType& value_type = work_line_->GetRegisterType(this, inst->VRegA_23x()); in VerifyAPut()
4475 work_line_->VerifyRegisterType(this, inst->VRegA_23x(), *modified_reg_type); in VerifyAPut()
4489 const uint32_t vregA = inst->VRegA_23x(); in VerifyAPut()
4641 void MethodVerifier<kVerifierDebug>::VerifyISFieldAccess(const Instruction* inst, in VerifyISFieldAccess() argument
4645 uint32_t field_idx = GetFieldIdxOfFieldAccess(inst, is_static); in VerifyISFieldAccess()
4650 const RegType& object_type = work_line_->GetRegisterType(this, inst->VRegB_22c()); in VerifyISFieldAccess()
4746 const uint32_t vregA = (is_static) ? inst->VRegA_21c() : inst->VRegA_22c(); in VerifyISFieldAccess()
4902 const Instruction& inst = code_item_accessor_.InstructionAt(work_insn_idx_); in PotentiallyMarkRuntimeThrow() local
4903 Instruction::Code opcode = inst.Opcode(); in PotentiallyMarkRuntimeThrow()