Lines Matching refs:inst

306   bool VerifyInstruction(const Instruction* inst, uint32_t code_offset);
466 …bool CheckSignaturePolymorphicReceiver(const Instruction* inst) REQUIRES_SHARED(Locks::mutator_loc…
542 void VerifyNewArray(const Instruction* inst, bool is_filled, bool is_range)
553 void VerifyAGet(const Instruction* inst, const RegType& insn_type,
557 void VerifyAPut(const Instruction* inst, const RegType& insn_type,
569 void VerifyISFieldAccess(const Instruction* inst, const RegType& insn_type,
617 ArtMethod* VerifyInvocationArgs(const Instruction* inst, MethodType method_type, bool is_range)
622 void VerifyInvocationArgsUnresolvedMethod(const Instruction* inst, MethodType method_type,
627 ArtMethod* VerifyInvocationArgsFromIterator(T* it, const Instruction* inst,
733 uint16_t GetMethodIdxOfInvoke(const Instruction* inst) in GetMethodIdxOfInvoke() argument
735 switch (inst->Opcode()) { in GetMethodIdxOfInvoke()
746 return inst->VRegB(); in GetMethodIdxOfInvoke()
751 uint16_t GetFieldIdxOfFieldAccess(const Instruction* inst, bool is_static) in GetFieldIdxOfFieldAccess() argument
754 return inst->VRegB_21c(); in GetFieldIdxOfFieldAccess()
755 } else if (inst->IsQuickened()) { in GetFieldIdxOfFieldAccess()
762 return inst->VRegC_22c(); in GetFieldIdxOfFieldAccess()
787 bool HandleMoveException(const Instruction* inst) REQUIRES_SHARED(Locks::mutator_lock_);
888 for (const DexInstructionPcPair& inst : code_item_accessor_) { in FindLocksAtDexPc() local
889 if (inst->Opcode() == Instruction::MONITOR_ENTER) { in FindLocksAtDexPc()
1170 for (const DexInstructionPcPair& inst : code_item_accessor_) { in VerifyInstructions() local
1171 const uint32_t dex_pc = inst.DexPc(); in VerifyInstructions()
1172 if (!VerifyInstruction<kAllowRuntimeOnlyInstructions>(&inst.Inst(), dex_pc)) { in VerifyInstructions()
1177 if (inst->IsReturn()) { in VerifyInstructions()
1179 } else if (inst->Opcode() == Instruction::CHECK_CAST) { in VerifyInstructions()
1189 bool MethodVerifier<kVerifierDebug>::VerifyInstruction(const Instruction* inst, in VerifyInstruction() argument
1191 if (Instruction::kHaveExperimentalInstructions && UNLIKELY(inst->IsExperimental())) { in VerifyInstruction()
1203 switch (inst->GetVerifyTypeArgumentA()) { in VerifyInstruction()
1205 result = result && CheckRegisterIndex(inst->VRegA()); in VerifyInstruction()
1208 result = result && CheckWideRegisterIndex(inst->VRegA()); in VerifyInstruction()
1211 switch (inst->GetVerifyTypeArgumentB()) { in VerifyInstruction()
1213 result = result && CheckRegisterIndex(inst->VRegB()); in VerifyInstruction()
1216 result = result && CheckFieldIndex(inst->VRegB()); in VerifyInstruction()
1219 result = result && CheckMethodIndex(inst->VRegB()); in VerifyInstruction()
1222 result = result && CheckNewInstance(dex::TypeIndex(inst->VRegB())); in VerifyInstruction()
1225 result = result && CheckStringIndex(inst->VRegB()); in VerifyInstruction()
1228 result = result && CheckTypeIndex(dex::TypeIndex(inst->VRegB())); in VerifyInstruction()
1231 result = result && CheckWideRegisterIndex(inst->VRegB()); in VerifyInstruction()
1234 result = result && CheckCallSiteIndex(inst->VRegB()); in VerifyInstruction()
1237 result = result && CheckMethodHandleIndex(inst->VRegB()); in VerifyInstruction()
1240 result = result && CheckPrototypeIndex(inst->VRegB()); in VerifyInstruction()
1243 switch (inst->GetVerifyTypeArgumentC()) { in VerifyInstruction()
1245 result = result && CheckRegisterIndex(inst->VRegC()); in VerifyInstruction()
1248 result = result && CheckFieldIndex(inst->VRegC()); in VerifyInstruction()
1251 result = result && CheckNewArray(dex::TypeIndex(inst->VRegC())); in VerifyInstruction()
1254 result = result && CheckTypeIndex(dex::TypeIndex(inst->VRegC())); in VerifyInstruction()
1257 result = result && CheckWideRegisterIndex(inst->VRegC()); in VerifyInstruction()
1260 switch (inst->GetVerifyTypeArgumentH()) { in VerifyInstruction()
1262 result = result && CheckPrototypeIndex(inst->VRegH()); in VerifyInstruction()
1265 switch (inst->GetVerifyExtraFlags()) { in VerifyInstruction()
1279 uint32_t v_a = dchecked_integral_cast<uint32_t>(inst->VRegA()); in VerifyInstruction()
1280 if ((inst->GetVerifyExtraFlags() == Instruction::kVerifyVarArgNonZero && v_a == 0) || in VerifyInstruction()
1288 inst->GetVarArgs(args); in VerifyInstruction()
1295 if (inst->GetVerifyExtraFlags() == Instruction::kVerifyVarArgRangeNonZero && in VerifyInstruction()
1296 inst->VRegA() <= 0) { in VerifyInstruction()
1297 Fail(VERIFY_ERROR_BAD_CLASS_HARD) << "invalid arg count (" << inst->VRegA() << ") in " in VerifyInstruction()
1301 result = result && CheckVarArgRangeRegs(inst->VRegA(), inst->VRegC()); in VerifyInstruction()
1304 Fail(VERIFY_ERROR_BAD_CLASS_HARD) << "unexpected opcode " << inst->Name(); in VerifyInstruction()
1308 if (!kAllowRuntimeOnlyInstructions && inst->GetVerifyIsRuntimeOnly()) { in VerifyInstruction()
1309 Fail(VERIFY_ERROR_BAD_CLASS_HARD) << "opcode only expected at runtime " << inst->Name(); in VerifyInstruction()
1644 for (const DexInstructionPcPair& inst : code_item_accessor_) { in Dump() local
1645 const size_t dex_pc = inst.DexPc(); in Dump()
1659 vios->Stream() << inst->DumpHex(5) << " "; in Dump()
1661 vios->Stream() << inst->DumpString(dex_file_) << "\n"; in Dump()
1950 for (const DexInstructionPcPair& inst : code_item_accessor_) { in CodeFlowVerifyMethod() local
1951 const uint32_t insn_idx = inst.DexPc(); in CodeFlowVerifyMethod()
2057 const Instruction* inst = Instruction::At(insns); in CodeFlowVerifyInstruction() local
2058 int opcode_flags = Instruction::FlagsOf(inst->Opcode()); in CodeFlowVerifyInstruction()
2064 LogVerifyInfo() << "Processing " << inst->DumpString(dex_file_) << std::endl in CodeFlowVerifyInstruction()
2075 if (((opcode_flags & Instruction::kThrow) != 0 || IsCompatThrow(inst->Opcode())) && in CodeFlowVerifyInstruction()
2092 switch (inst->Opcode()) { in CodeFlowVerifyInstruction()
2099 if (inst->VRegA_10x() != 0) { in CodeFlowVerifyInstruction()
2105 work_line_->CopyRegister1(this, inst->VRegA_12x(), inst->VRegB_12x(), kTypeCategory1nr); in CodeFlowVerifyInstruction()
2108 work_line_->CopyRegister1(this, inst->VRegA_22x(), inst->VRegB_22x(), kTypeCategory1nr); in CodeFlowVerifyInstruction()
2111 work_line_->CopyRegister1(this, inst->VRegA_32x(), inst->VRegB_32x(), kTypeCategory1nr); in CodeFlowVerifyInstruction()
2114 work_line_->CopyRegister2(this, inst->VRegA_12x(), inst->VRegB_12x()); in CodeFlowVerifyInstruction()
2117 work_line_->CopyRegister2(this, inst->VRegA_22x(), inst->VRegB_22x()); in CodeFlowVerifyInstruction()
2120 work_line_->CopyRegister2(this, inst->VRegA_32x(), inst->VRegB_32x()); in CodeFlowVerifyInstruction()
2123 work_line_->CopyRegister1(this, inst->VRegA_12x(), inst->VRegB_12x(), kTypeCategoryRef); in CodeFlowVerifyInstruction()
2126 work_line_->CopyRegister1(this, inst->VRegA_22x(), inst->VRegB_22x(), kTypeCategoryRef); in CodeFlowVerifyInstruction()
2129 work_line_->CopyRegister1(this, inst->VRegA_32x(), inst->VRegB_32x(), kTypeCategoryRef); in CodeFlowVerifyInstruction()
2144 work_line_->CopyResultRegister1(this, inst->VRegA_11x(), false); in CodeFlowVerifyInstruction()
2147 work_line_->CopyResultRegister2(this, inst->VRegA_11x()); in CodeFlowVerifyInstruction()
2150 work_line_->CopyResultRegister1(this, inst->VRegA_11x(), true); in CodeFlowVerifyInstruction()
2154 if (!HandleMoveException(inst)) { in CodeFlowVerifyInstruction()
2176 const uint32_t vregA = inst->VRegA_11x(); in CodeFlowVerifyInstruction()
2199 const uint32_t vregA = inst->VRegA_11x(); in CodeFlowVerifyInstruction()
2216 const uint32_t vregA = inst->VRegA_11x(); in CodeFlowVerifyInstruction()
2259 int32_t val = static_cast<int32_t>(inst->VRegB_11n() << 28) >> 28; in CodeFlowVerifyInstruction()
2261 this, inst->VRegA_11n(), DetermineCat1Constant(val, need_precise_constants_)); in CodeFlowVerifyInstruction()
2265 int16_t val = static_cast<int16_t>(inst->VRegB_21s()); in CodeFlowVerifyInstruction()
2267 this, inst->VRegA_21s(), DetermineCat1Constant(val, need_precise_constants_)); in CodeFlowVerifyInstruction()
2271 int32_t val = inst->VRegB_31i(); in CodeFlowVerifyInstruction()
2273 this, inst->VRegA_31i(), DetermineCat1Constant(val, need_precise_constants_)); in CodeFlowVerifyInstruction()
2277 int32_t val = static_cast<int32_t>(inst->VRegB_21h() << 16); in CodeFlowVerifyInstruction()
2279 this, inst->VRegA_21h(), DetermineCat1Constant(val, need_precise_constants_)); in CodeFlowVerifyInstruction()
2284 int64_t val = static_cast<int16_t>(inst->VRegB_21s()); in CodeFlowVerifyInstruction()
2287 work_line_->SetRegisterTypeWide(this, inst->VRegA_21s(), lo, hi); in CodeFlowVerifyInstruction()
2291 int64_t val = static_cast<int32_t>(inst->VRegB_31i()); in CodeFlowVerifyInstruction()
2294 work_line_->SetRegisterTypeWide(this, inst->VRegA_31i(), lo, hi); in CodeFlowVerifyInstruction()
2298 int64_t val = inst->VRegB_51l(); in CodeFlowVerifyInstruction()
2301 work_line_->SetRegisterTypeWide(this, inst->VRegA_51l(), lo, hi); in CodeFlowVerifyInstruction()
2305 int64_t val = static_cast<uint64_t>(inst->VRegB_21h()) << 48; in CodeFlowVerifyInstruction()
2308 work_line_->SetRegisterTypeWide(this, inst->VRegA_21h(), lo, hi); in CodeFlowVerifyInstruction()
2313 this, inst->VRegA_21c(), reg_types_.JavaLangString()); in CodeFlowVerifyInstruction()
2317 this, inst->VRegA_31c(), reg_types_.JavaLangString()); in CodeFlowVerifyInstruction()
2322 const RegType& res_type = ResolveClass<CheckAccess::kYes>(dex::TypeIndex(inst->VRegB_21c())); in CodeFlowVerifyInstruction()
2325 this, inst->VRegA_21c(), res_type.IsConflict() ? res_type in CodeFlowVerifyInstruction()
2331 this, inst->VRegA_21c(), reg_types_.JavaLangInvokeMethodHandle()); in CodeFlowVerifyInstruction()
2335 this, inst->VRegA_21c(), reg_types_.JavaLangInvokeMethodType()); in CodeFlowVerifyInstruction()
2338 work_line_->PushMonitor(this, inst->VRegA_11x(), work_insn_idx_); in CodeFlowVerifyInstruction()
2351 if (prev_inst.VRegB() == inst->VRegA_11x()) { in CodeFlowVerifyInstruction()
2386 if (prev_inst.VRegA() == inst->VRegA_11x()) { in CodeFlowVerifyInstruction()
2389 inst->VRegA_11x(), in CodeFlowVerifyInstruction()
2391 } else if (prev2_inst.VRegA() == inst->VRegA_11x()) { in CodeFlowVerifyInstruction()
2394 inst->VRegA_11x(), in CodeFlowVerifyInstruction()
2427 work_line_->PopMonitor(this, inst->VRegA_11x()); in CodeFlowVerifyInstruction()
2438 const bool is_checkcast = (inst->Opcode() == Instruction::CHECK_CAST); in CodeFlowVerifyInstruction()
2439 const dex::TypeIndex type_idx((is_checkcast) ? inst->VRegB_21c() : inst->VRegC_22c()); in CodeFlowVerifyInstruction()
2455 inst->VRegA_22c(), in CodeFlowVerifyInstruction()
2461 uint32_t orig_type_reg = (is_checkcast) ? inst->VRegA_21c() : inst->VRegB_22c(); in CodeFlowVerifyInstruction()
2485 work_line_->SetRegisterType<LockOp::kKeep>(this, inst->VRegA_21c(), res_type); in CodeFlowVerifyInstruction()
2488 inst->VRegA_22c(), in CodeFlowVerifyInstruction()
2495 const RegType& res_type = work_line_->GetRegisterType(this, inst->VRegB_12x()); in CodeFlowVerifyInstruction()
2502 inst->VRegA_12x(), in CodeFlowVerifyInstruction()
2511 const RegType& res_type = ResolveClass<CheckAccess::kYes>(dex::TypeIndex(inst->VRegB_21c())); in CodeFlowVerifyInstruction()
2528 work_line_->SetRegisterType<LockOp::kClear>(this, inst->VRegA_21c(), uninit_type); in CodeFlowVerifyInstruction()
2532 VerifyNewArray(inst, false, false); in CodeFlowVerifyInstruction()
2535 VerifyNewArray(inst, true, false); in CodeFlowVerifyInstruction()
2539 VerifyNewArray(inst, true, true); in CodeFlowVerifyInstruction()
2544 if (!work_line_->VerifyRegisterType(this, inst->VRegB_23x(), reg_types_.Float())) { in CodeFlowVerifyInstruction()
2547 if (!work_line_->VerifyRegisterType(this, inst->VRegC_23x(), reg_types_.Float())) { in CodeFlowVerifyInstruction()
2550 work_line_->SetRegisterType<LockOp::kClear>(this, inst->VRegA_23x(), reg_types_.Integer()); in CodeFlowVerifyInstruction()
2554 if (!work_line_->VerifyRegisterTypeWide(this, inst->VRegB_23x(), reg_types_.DoubleLo(), in CodeFlowVerifyInstruction()
2558 if (!work_line_->VerifyRegisterTypeWide(this, inst->VRegC_23x(), reg_types_.DoubleLo(), in CodeFlowVerifyInstruction()
2562 work_line_->SetRegisterType<LockOp::kClear>(this, inst->VRegA_23x(), reg_types_.Integer()); in CodeFlowVerifyInstruction()
2565 if (!work_line_->VerifyRegisterTypeWide(this, inst->VRegB_23x(), reg_types_.LongLo(), in CodeFlowVerifyInstruction()
2569 if (!work_line_->VerifyRegisterTypeWide(this, inst->VRegC_23x(), reg_types_.LongLo(), in CodeFlowVerifyInstruction()
2573 work_line_->SetRegisterType<LockOp::kClear>(this, inst->VRegA_23x(), reg_types_.Integer()); in CodeFlowVerifyInstruction()
2576 const RegType& res_type = work_line_->GetRegisterType(this, inst->VRegA_11x()); in CodeFlowVerifyInstruction()
2598 work_line_->VerifyRegisterType(this, inst->VRegA_31t(), reg_types_.Integer()); in CodeFlowVerifyInstruction()
2603 const RegType& array_type = work_line_->GetRegisterType(this, inst->VRegA_31t()); in CodeFlowVerifyInstruction()
2643 const RegType& reg_type1 = work_line_->GetRegisterType(this, inst->VRegA_22t()); in CodeFlowVerifyInstruction()
2644 const RegType& reg_type2 = work_line_->GetRegisterType(this, inst->VRegB_22t()); in CodeFlowVerifyInstruction()
2663 const RegType& reg_type1 = work_line_->GetRegisterType(this, inst->VRegA_22t()); in CodeFlowVerifyInstruction()
2664 const RegType& reg_type2 = work_line_->GetRegisterType(this, inst->VRegB_22t()); in CodeFlowVerifyInstruction()
2673 const RegType& reg_type = work_line_->GetRegisterType(this, inst->VRegA_21t()); in CodeFlowVerifyInstruction()
2706 (inst->VRegA_21t() == instance_of_inst.VRegA_22c()) && in CodeFlowVerifyInstruction()
2735 if (inst->Opcode() == Instruction::IF_EQZ) { in CodeFlowVerifyInstruction()
2787 const RegType& reg_type = work_line_->GetRegisterType(this, inst->VRegA_21t()); in CodeFlowVerifyInstruction()
2795 VerifyAGet(inst, reg_types_.Boolean(), true); in CodeFlowVerifyInstruction()
2798 VerifyAGet(inst, reg_types_.Byte(), true); in CodeFlowVerifyInstruction()
2801 VerifyAGet(inst, reg_types_.Char(), true); in CodeFlowVerifyInstruction()
2804 VerifyAGet(inst, reg_types_.Short(), true); in CodeFlowVerifyInstruction()
2807 VerifyAGet(inst, reg_types_.Integer(), true); in CodeFlowVerifyInstruction()
2810 VerifyAGet(inst, reg_types_.LongLo(), true); in CodeFlowVerifyInstruction()
2813 VerifyAGet(inst, reg_types_.JavaLangObject(false), false); in CodeFlowVerifyInstruction()
2817 VerifyAPut(inst, reg_types_.Boolean(), true); in CodeFlowVerifyInstruction()
2820 VerifyAPut(inst, reg_types_.Byte(), true); in CodeFlowVerifyInstruction()
2823 VerifyAPut(inst, reg_types_.Char(), true); in CodeFlowVerifyInstruction()
2826 VerifyAPut(inst, reg_types_.Short(), true); in CodeFlowVerifyInstruction()
2829 VerifyAPut(inst, reg_types_.Integer(), true); in CodeFlowVerifyInstruction()
2832 VerifyAPut(inst, reg_types_.LongLo(), true); in CodeFlowVerifyInstruction()
2835 VerifyAPut(inst, reg_types_.JavaLangObject(false), false); in CodeFlowVerifyInstruction()
2840 VerifyISFieldAccess<FieldAccessType::kAccGet>(inst, reg_types_.Boolean(), true, false); in CodeFlowVerifyInstruction()
2844 VerifyISFieldAccess<FieldAccessType::kAccGet>(inst, reg_types_.Byte(), true, false); in CodeFlowVerifyInstruction()
2848 VerifyISFieldAccess<FieldAccessType::kAccGet>(inst, reg_types_.Char(), true, false); in CodeFlowVerifyInstruction()
2852 VerifyISFieldAccess<FieldAccessType::kAccGet>(inst, reg_types_.Short(), true, false); in CodeFlowVerifyInstruction()
2856 VerifyISFieldAccess<FieldAccessType::kAccGet>(inst, reg_types_.Integer(), true, false); in CodeFlowVerifyInstruction()
2860 VerifyISFieldAccess<FieldAccessType::kAccGet>(inst, reg_types_.LongLo(), true, false); in CodeFlowVerifyInstruction()
2864 VerifyISFieldAccess<FieldAccessType::kAccGet>(inst, reg_types_.JavaLangObject(false), false, in CodeFlowVerifyInstruction()
2870 VerifyISFieldAccess<FieldAccessType::kAccPut>(inst, reg_types_.Boolean(), true, false); in CodeFlowVerifyInstruction()
2874 VerifyISFieldAccess<FieldAccessType::kAccPut>(inst, reg_types_.Byte(), true, false); in CodeFlowVerifyInstruction()
2878 VerifyISFieldAccess<FieldAccessType::kAccPut>(inst, reg_types_.Char(), true, false); in CodeFlowVerifyInstruction()
2882 VerifyISFieldAccess<FieldAccessType::kAccPut>(inst, reg_types_.Short(), true, false); in CodeFlowVerifyInstruction()
2886 VerifyISFieldAccess<FieldAccessType::kAccPut>(inst, reg_types_.Integer(), true, false); in CodeFlowVerifyInstruction()
2890 VerifyISFieldAccess<FieldAccessType::kAccPut>(inst, reg_types_.LongLo(), true, false); in CodeFlowVerifyInstruction()
2894 VerifyISFieldAccess<FieldAccessType::kAccPut>(inst, reg_types_.JavaLangObject(false), false, in CodeFlowVerifyInstruction()
2899 VerifyISFieldAccess<FieldAccessType::kAccGet>(inst, reg_types_.Boolean(), true, true); in CodeFlowVerifyInstruction()
2902 VerifyISFieldAccess<FieldAccessType::kAccGet>(inst, reg_types_.Byte(), true, true); in CodeFlowVerifyInstruction()
2905 VerifyISFieldAccess<FieldAccessType::kAccGet>(inst, reg_types_.Char(), true, true); in CodeFlowVerifyInstruction()
2908 VerifyISFieldAccess<FieldAccessType::kAccGet>(inst, reg_types_.Short(), true, true); in CodeFlowVerifyInstruction()
2911 VerifyISFieldAccess<FieldAccessType::kAccGet>(inst, reg_types_.Integer(), true, true); in CodeFlowVerifyInstruction()
2914 VerifyISFieldAccess<FieldAccessType::kAccGet>(inst, reg_types_.LongLo(), true, true); in CodeFlowVerifyInstruction()
2917 VerifyISFieldAccess<FieldAccessType::kAccGet>(inst, reg_types_.JavaLangObject(false), false, in CodeFlowVerifyInstruction()
2922 VerifyISFieldAccess<FieldAccessType::kAccPut>(inst, reg_types_.Boolean(), true, true); in CodeFlowVerifyInstruction()
2925 VerifyISFieldAccess<FieldAccessType::kAccPut>(inst, reg_types_.Byte(), true, true); in CodeFlowVerifyInstruction()
2928 VerifyISFieldAccess<FieldAccessType::kAccPut>(inst, reg_types_.Char(), true, true); in CodeFlowVerifyInstruction()
2931 VerifyISFieldAccess<FieldAccessType::kAccPut>(inst, reg_types_.Short(), true, true); in CodeFlowVerifyInstruction()
2934 VerifyISFieldAccess<FieldAccessType::kAccPut>(inst, reg_types_.Integer(), true, true); in CodeFlowVerifyInstruction()
2937 VerifyISFieldAccess<FieldAccessType::kAccPut>(inst, reg_types_.LongLo(), true, true); in CodeFlowVerifyInstruction()
2940 VerifyISFieldAccess<FieldAccessType::kAccPut>(inst, reg_types_.JavaLangObject(false), false, in CodeFlowVerifyInstruction()
2950 bool is_range = (inst->Opcode() == Instruction::INVOKE_VIRTUAL_RANGE || in CodeFlowVerifyInstruction()
2951 inst->Opcode() == Instruction::INVOKE_SUPER_RANGE || in CodeFlowVerifyInstruction()
2952 inst->Opcode() == Instruction::INVOKE_VIRTUAL_RANGE_QUICK); in CodeFlowVerifyInstruction()
2953 bool is_super = (inst->Opcode() == Instruction::INVOKE_SUPER || in CodeFlowVerifyInstruction()
2954 inst->Opcode() == Instruction::INVOKE_SUPER_RANGE); in CodeFlowVerifyInstruction()
2956 ArtMethod* called_method = VerifyInvocationArgs(inst, type, is_range); in CodeFlowVerifyInstruction()
2972 uint32_t method_idx = GetMethodIdxOfInvoke(inst); in CodeFlowVerifyInstruction()
2989 bool is_range = (inst->Opcode() == Instruction::INVOKE_DIRECT_RANGE); in CodeFlowVerifyInstruction()
2990 ArtMethod* called_method = VerifyInvocationArgs(inst, METHOD_DIRECT, is_range); in CodeFlowVerifyInstruction()
2995 uint32_t method_idx = (is_range) ? inst->VRegB_3rc() : inst->VRegB_35c(); in CodeFlowVerifyInstruction()
3024 const RegType& this_type = work_line_->GetInvocationThis(this, inst); in CodeFlowVerifyInstruction()
3071 bool is_range = (inst->Opcode() == Instruction::INVOKE_STATIC_RANGE); in CodeFlowVerifyInstruction()
3072 ArtMethod* called_method = VerifyInvocationArgs(inst, METHOD_STATIC, is_range); in CodeFlowVerifyInstruction()
3075 uint32_t method_idx = (is_range) ? inst->VRegB_3rc() : inst->VRegB_35c(); in CodeFlowVerifyInstruction()
3096 bool is_range = (inst->Opcode() == Instruction::INVOKE_INTERFACE_RANGE); in CodeFlowVerifyInstruction()
3097 ArtMethod* abs_method = VerifyInvocationArgs(inst, METHOD_INTERFACE, is_range); in CodeFlowVerifyInstruction()
3109 const RegType& this_type = work_line_->GetInvocationThis(this, inst); in CodeFlowVerifyInstruction()
3132 uint32_t method_idx = (is_range) ? inst->VRegB_3rc() : inst->VRegB_35c(); in CodeFlowVerifyInstruction()
3153 bool is_range = (inst->Opcode() == Instruction::INVOKE_POLYMORPHIC_RANGE); in CodeFlowVerifyInstruction()
3154 ArtMethod* called_method = VerifyInvocationArgs(inst, METHOD_POLYMORPHIC, is_range); in CodeFlowVerifyInstruction()
3166 !CheckSignaturePolymorphicReceiver(inst)) { in CodeFlowVerifyInstruction()
3170 const uint16_t vRegH = (is_range) ? inst->VRegH_4rcc() : inst->VRegH_45cc(); in CodeFlowVerifyInstruction()
3187 bool is_range = (inst->Opcode() == Instruction::INVOKE_CUSTOM_RANGE); in CodeFlowVerifyInstruction()
3190 const uint32_t call_site_idx = is_range ? inst->VRegB_3rc() : inst->VRegB_35c(); in CodeFlowVerifyInstruction()
3203 VerifyInvocationArgsFromIterator(&param_it, inst, METHOD_STATIC, is_range, nullptr); in CodeFlowVerifyInstruction()
3219 work_line_->CheckUnaryOp(this, inst, reg_types_.Integer(), reg_types_.Integer()); in CodeFlowVerifyInstruction()
3223 work_line_->CheckUnaryOpWide(this, inst, reg_types_.LongLo(), reg_types_.LongHi(), in CodeFlowVerifyInstruction()
3227 work_line_->CheckUnaryOp(this, inst, reg_types_.Float(), reg_types_.Float()); in CodeFlowVerifyInstruction()
3230 work_line_->CheckUnaryOpWide(this, inst, reg_types_.DoubleLo(), reg_types_.DoubleHi(), in CodeFlowVerifyInstruction()
3234 work_line_->CheckUnaryOpToWide(this, inst, reg_types_.LongLo(), reg_types_.LongHi(), in CodeFlowVerifyInstruction()
3238 work_line_->CheckUnaryOp(this, inst, reg_types_.Float(), reg_types_.Integer()); in CodeFlowVerifyInstruction()
3241 work_line_->CheckUnaryOpToWide(this, inst, reg_types_.DoubleLo(), reg_types_.DoubleHi(), in CodeFlowVerifyInstruction()
3245 work_line_->CheckUnaryOpFromWide(this, inst, reg_types_.Integer(), in CodeFlowVerifyInstruction()
3249 work_line_->CheckUnaryOpFromWide(this, inst, reg_types_.Float(), in CodeFlowVerifyInstruction()
3253 work_line_->CheckUnaryOpWide(this, inst, reg_types_.DoubleLo(), reg_types_.DoubleHi(), in CodeFlowVerifyInstruction()
3257 work_line_->CheckUnaryOp(this, inst, reg_types_.Integer(), reg_types_.Float()); in CodeFlowVerifyInstruction()
3260 work_line_->CheckUnaryOpToWide(this, inst, reg_types_.LongLo(), reg_types_.LongHi(), in CodeFlowVerifyInstruction()
3264 work_line_->CheckUnaryOpToWide(this, inst, reg_types_.DoubleLo(), reg_types_.DoubleHi(), in CodeFlowVerifyInstruction()
3268 work_line_->CheckUnaryOpFromWide(this, inst, reg_types_.Integer(), in CodeFlowVerifyInstruction()
3272 work_line_->CheckUnaryOpWide(this, inst, reg_types_.LongLo(), reg_types_.LongHi(), in CodeFlowVerifyInstruction()
3276 work_line_->CheckUnaryOpFromWide(this, inst, reg_types_.Float(), in CodeFlowVerifyInstruction()
3280 work_line_->CheckUnaryOp(this, inst, reg_types_.Byte(), reg_types_.Integer()); in CodeFlowVerifyInstruction()
3283 work_line_->CheckUnaryOp(this, inst, reg_types_.Char(), reg_types_.Integer()); in CodeFlowVerifyInstruction()
3286 work_line_->CheckUnaryOp(this, inst, reg_types_.Short(), reg_types_.Integer()); in CodeFlowVerifyInstruction()
3297 work_line_->CheckBinaryOp(this, inst, reg_types_.Integer(), reg_types_.Integer(), in CodeFlowVerifyInstruction()
3303 work_line_->CheckBinaryOp(this, inst, reg_types_.Integer(), reg_types_.Integer(), in CodeFlowVerifyInstruction()
3314 work_line_->CheckBinaryOpWide(this, inst, reg_types_.LongLo(), reg_types_.LongHi(), in CodeFlowVerifyInstruction()
3322 work_line_->CheckBinaryOpWideShift(this, inst, reg_types_.LongLo(), reg_types_.LongHi(), in CodeFlowVerifyInstruction()
3330 work_line_->CheckBinaryOp(this, inst, reg_types_.Float(), reg_types_.Float(), in CodeFlowVerifyInstruction()
3338 work_line_->CheckBinaryOpWide(this, inst, reg_types_.DoubleLo(), reg_types_.DoubleHi(), in CodeFlowVerifyInstruction()
3349 work_line_->CheckBinaryOp2addr(this, inst, reg_types_.Integer(), reg_types_.Integer(), in CodeFlowVerifyInstruction()
3355 work_line_->CheckBinaryOp2addr(this, inst, reg_types_.Integer(), reg_types_.Integer(), in CodeFlowVerifyInstruction()
3359 work_line_->CheckBinaryOp2addr(this, inst, reg_types_.Integer(), reg_types_.Integer(), in CodeFlowVerifyInstruction()
3370 work_line_->CheckBinaryOp2addrWide(this, inst, reg_types_.LongLo(), reg_types_.LongHi(), in CodeFlowVerifyInstruction()
3377 work_line_->CheckBinaryOp2addrWideShift(this, inst, reg_types_.LongLo(), reg_types_.LongHi(), in CodeFlowVerifyInstruction()
3385 work_line_->CheckBinaryOp2addr(this, inst, reg_types_.Float(), reg_types_.Float(), in CodeFlowVerifyInstruction()
3393 work_line_->CheckBinaryOp2addrWide(this, inst, reg_types_.DoubleLo(), reg_types_.DoubleHi(), in CodeFlowVerifyInstruction()
3402 work_line_->CheckLiteralOp(this, inst, reg_types_.Integer(), reg_types_.Integer(), false, in CodeFlowVerifyInstruction()
3408 work_line_->CheckLiteralOp(this, inst, reg_types_.Integer(), reg_types_.Integer(), true, in CodeFlowVerifyInstruction()
3419 work_line_->CheckLiteralOp(this, inst, reg_types_.Integer(), reg_types_.Integer(), false, in CodeFlowVerifyInstruction()
3425 work_line_->CheckLiteralOp(this, inst, reg_types_.Integer(), reg_types_.Integer(), true, in CodeFlowVerifyInstruction()
3467 Fail(VERIFY_ERROR_BAD_CLASS_HARD) << "Unexpected opcode " << inst->DumpString(dex_file_); in CodeFlowVerifyInstruction()
3491 info_messages_ << "Rejecting opcode " << inst->DumpString(dex_file_); in CodeFlowVerifyInstruction()
3641 if (inst->Opcode() != Instruction::MONITOR_ENTER || work_line_->MonitorStackDepth() != 1) { in CodeFlowVerifyInstruction()
3655 DCHECK_EQ(&code_item_accessor_.InstructionAt(work_insn_idx_), inst); in CodeFlowVerifyInstruction()
3656 uint32_t next_insn_idx = work_insn_idx_ + inst->SizeInCodeUnits(); in CodeFlowVerifyInstruction()
3704 DCHECK_EQ(&code_item_accessor_.InstructionAt(work_insn_idx_), inst); in CodeFlowVerifyInstruction()
3705 *start_guess = work_insn_idx_ + inst->SizeInCodeUnits(); in CodeFlowVerifyInstruction()
3782 bool MethodVerifier<kVerifierDebug>::HandleMoveException(const Instruction* inst) { in HandleMoveException() argument
3868 work_line_->SetRegisterType<LockOp::kClear>(this, inst->VRegA_11x(), *result.second); in HandleMoveException()
4020 T* it, const Instruction* inst, MethodType method_type, bool is_range, ArtMethod* res_method) { in VerifyInvocationArgsFromIterator() argument
4021 DCHECK_EQ(!is_range, inst->HasVarArgs()); in VerifyInvocationArgsFromIterator()
4026 const size_t expected_args = inst->VRegA(); in VerifyInvocationArgsFromIterator()
4043 const RegType& actual_arg_type = work_line_->GetInvocationThis(this, inst); in VerifyInvocationArgsFromIterator()
4057 const uint32_t method_idx = GetMethodIdxOfInvoke(inst); in VerifyInvocationArgsFromIterator()
4079 const uint32_t method_idx = GetMethodIdxOfInvoke(inst); in VerifyInvocationArgsFromIterator()
4103 inst->GetVarArgs(arg); in VerifyInvocationArgsFromIterator()
4108 Fail(VERIFY_ERROR_BAD_CLASS_HARD) << "Rejecting invocation, expected " << inst->VRegA() << in VerifyInvocationArgsFromIterator()
4124 uint32_t get_reg = is_range ? inst->VRegC() + static_cast<uint32_t>(sig_registers) : in VerifyInvocationArgsFromIterator()
4167 void MethodVerifier<kVerifierDebug>::VerifyInvocationArgsUnresolvedMethod(const Instruction* inst, in VerifyInvocationArgsUnresolvedMethod() argument
4173 const uint32_t method_idx = GetMethodIdxOfInvoke(inst); in VerifyInvocationArgsUnresolvedMethod()
4176 VerifyInvocationArgsFromIterator(&it, inst, method_type, is_range, nullptr); in VerifyInvocationArgsUnresolvedMethod()
4262 const Instruction* inst, MethodType method_type, bool is_range) { in VerifyInvocationArgs() argument
4265 const uint32_t method_idx = GetMethodIdxOfInvoke(inst); in VerifyInvocationArgs()
4270 VerifyInvocationArgsUnresolvedMethod(inst, method_type, is_range); in VerifyInvocationArgs()
4323 dex::ProtoIndex proto_idx(inst->VRegH()); in VerifyInvocationArgs()
4325 return VerifyInvocationArgsFromIterator(&it, inst, method_type, is_range, res_method); in VerifyInvocationArgs()
4329 return VerifyInvocationArgsFromIterator(&it, inst, method_type, is_range, res_method); in VerifyInvocationArgs()
4383 bool MethodVerifier<kVerifierDebug>::CheckSignaturePolymorphicReceiver(const Instruction* inst) { in CheckSignaturePolymorphicReceiver() argument
4384 const RegType& this_type = work_line_->GetInvocationThis(this, inst); in CheckSignaturePolymorphicReceiver()
4417 void MethodVerifier<kVerifierDebug>::VerifyNewArray(const Instruction* inst, in VerifyNewArray() argument
4422 DCHECK_EQ(inst->Opcode(), Instruction::NEW_ARRAY); in VerifyNewArray()
4423 type_idx = dex::TypeIndex(inst->VRegC_22c()); in VerifyNewArray()
4425 DCHECK_EQ(inst->Opcode(), Instruction::FILLED_NEW_ARRAY); in VerifyNewArray()
4426 type_idx = dex::TypeIndex(inst->VRegB_35c()); in VerifyNewArray()
4428 DCHECK_EQ(inst->Opcode(), Instruction::FILLED_NEW_ARRAY_RANGE); in VerifyNewArray()
4429 type_idx = dex::TypeIndex(inst->VRegB_3rc()); in VerifyNewArray()
4440 work_line_->VerifyRegisterType(this, inst->VRegB_22c(), reg_types_.Integer()); in VerifyNewArray()
4443 work_line_->SetRegisterType<LockOp::kClear>(this, inst->VRegA_22c(), precise_type); in VerifyNewArray()
4449 uint32_t arg_count = (is_range) ? inst->VRegA_3rc() : inst->VRegA_35c(); in VerifyNewArray()
4452 inst->GetVarArgs(arg); in VerifyNewArray()
4455 uint32_t get_reg = is_range ? inst->VRegC_3rc() + ui : arg[ui]; in VerifyNewArray()
4469 void MethodVerifier<kVerifierDebug>::VerifyAGet(const Instruction* inst, in VerifyAGet() argument
4472 const RegType& index_type = work_line_->GetRegisterType(this, inst->VRegC_23x()); in VerifyAGet()
4476 const RegType& array_type = work_line_->GetRegisterType(this, inst->VRegB_23x()); in VerifyAGet()
4481 work_line_->SetRegisterType<LockOp::kClear>(this, inst->VRegA_23x(), reg_types_.Null()); in VerifyAGet()
4486 this, inst->VRegA_23x(), DetermineCat1Constant(1, need_precise_constants_)); in VerifyAGet()
4490 work_line_->SetRegisterType<LockOp::kClear>(this, inst->VRegA_23x(), insn_type); in VerifyAGet()
4493 work_line_->SetRegisterTypeWide(this, inst->VRegA_23x(), in VerifyAGet()
4509 inst->VRegA_23x(), in VerifyAGet()
4531 work_line_->SetRegisterType<LockOp::kClear>(this, inst->VRegA_23x(), component_type); in VerifyAGet()
4533 work_line_->SetRegisterTypeWide(this, inst->VRegA_23x(), component_type, in VerifyAGet()
4595 void MethodVerifier<kVerifierDebug>::VerifyAPut(const Instruction* inst, in VerifyAPut() argument
4598 const RegType& index_type = work_line_->GetRegisterType(this, inst->VRegC_23x()); in VerifyAPut()
4602 const RegType& array_type = work_line_->GetRegisterType(this, inst->VRegB_23x()); in VerifyAPut()
4612 const RegType& value_type = work_line_->GetRegisterType(this, inst->VRegA_23x()); in VerifyAPut()
4623 work_line_->VerifyRegisterType(this, inst->VRegA_23x(), *modified_reg_type); in VerifyAPut()
4637 const uint32_t vregA = inst->VRegA_23x(); in VerifyAPut()
4795 void MethodVerifier<kVerifierDebug>::VerifyISFieldAccess(const Instruction* inst, in VerifyISFieldAccess() argument
4799 uint32_t field_idx = GetFieldIdxOfFieldAccess(inst, is_static); in VerifyISFieldAccess()
4804 const RegType& object_type = work_line_->GetRegisterType(this, inst->VRegB_22c()); in VerifyISFieldAccess()
4886 const uint32_t vregA = (is_static) ? inst->VRegA_21c() : inst->VRegA_22c(); in VerifyISFieldAccess()
5555 const Instruction& inst = code_item_accessor_.InstructionAt(work_insn_idx_); in Fail() local
5556 Instruction::Code opcode = inst.Opcode(); in Fail()