Lines Matching refs:inst
253 bool VerifyInstruction(const Instruction* inst, uint32_t code_offset);
327 …bool CheckSignaturePolymorphicReceiver(const Instruction* inst) REQUIRES_SHARED(Locks::mutator_loc…
402 void VerifyNewArray(const Instruction* inst, bool is_filled, bool is_range)
413 void VerifyAGet(const Instruction* inst, const RegType& insn_type,
417 void VerifyAPut(const Instruction* inst, const RegType& insn_type,
429 void VerifyISFieldAccess(const Instruction* inst, const RegType& insn_type,
477 ArtMethod* VerifyInvocationArgs(const Instruction* inst, MethodType method_type, bool is_range)
482 void VerifyInvocationArgsUnresolvedMethod(const Instruction* inst, MethodType method_type,
487 ArtMethod* VerifyInvocationArgsFromIterator(T* it, const Instruction* inst,
572 uint16_t GetMethodIdxOfInvoke(const Instruction* inst)
575 uint16_t GetFieldIdxOfFieldAccess(const Instruction* inst, bool is_static)
728 for (const DexInstructionPcPair& inst : code_item_accessor_) { in FindLocksAtDexPc() local
729 if (inst->Opcode() == Instruction::MONITOR_ENTER) { in FindLocksAtDexPc()
1027 for (const DexInstructionPcPair& inst : code_item_accessor_) { in VerifyInstructions() local
1028 const uint32_t dex_pc = inst.DexPc(); in VerifyInstructions()
1029 if (!VerifyInstruction<kAllowRuntimeOnlyInstructions>(&inst.Inst(), dex_pc)) { in VerifyInstructions()
1036 if (inst->IsBranch()) { in VerifyInstructions()
1045 } else if (inst->IsSwitch() || inst->IsThrow()) { in VerifyInstructions()
1047 } else if (inst->IsReturn()) { in VerifyInstructions()
1056 bool MethodVerifier<kVerifierDebug>::VerifyInstruction(const Instruction* inst, in VerifyInstruction() argument
1058 if (Instruction::kHaveExperimentalInstructions && UNLIKELY(inst->IsExperimental())) { in VerifyInstruction()
1070 switch (inst->GetVerifyTypeArgumentA()) { in VerifyInstruction()
1072 result = result && CheckRegisterIndex(inst->VRegA()); in VerifyInstruction()
1075 result = result && CheckWideRegisterIndex(inst->VRegA()); in VerifyInstruction()
1078 switch (inst->GetVerifyTypeArgumentB()) { in VerifyInstruction()
1080 result = result && CheckRegisterIndex(inst->VRegB()); in VerifyInstruction()
1083 result = result && CheckFieldIndex(inst->VRegB()); in VerifyInstruction()
1086 result = result && CheckMethodIndex(inst->VRegB()); in VerifyInstruction()
1089 result = result && CheckNewInstance(dex::TypeIndex(inst->VRegB())); in VerifyInstruction()
1092 result = result && CheckStringIndex(inst->VRegB()); in VerifyInstruction()
1095 result = result && CheckTypeIndex(dex::TypeIndex(inst->VRegB())); in VerifyInstruction()
1098 result = result && CheckWideRegisterIndex(inst->VRegB()); in VerifyInstruction()
1101 result = result && CheckCallSiteIndex(inst->VRegB()); in VerifyInstruction()
1104 result = result && CheckMethodHandleIndex(inst->VRegB()); in VerifyInstruction()
1107 result = result && CheckPrototypeIndex(inst->VRegB()); in VerifyInstruction()
1110 switch (inst->GetVerifyTypeArgumentC()) { in VerifyInstruction()
1112 result = result && CheckRegisterIndex(inst->VRegC()); in VerifyInstruction()
1115 result = result && CheckFieldIndex(inst->VRegC()); in VerifyInstruction()
1118 result = result && CheckNewArray(dex::TypeIndex(inst->VRegC())); in VerifyInstruction()
1121 result = result && CheckTypeIndex(dex::TypeIndex(inst->VRegC())); in VerifyInstruction()
1124 result = result && CheckWideRegisterIndex(inst->VRegC()); in VerifyInstruction()
1127 switch (inst->GetVerifyTypeArgumentH()) { in VerifyInstruction()
1129 result = result && CheckPrototypeIndex(inst->VRegH()); in VerifyInstruction()
1132 switch (inst->GetVerifyExtraFlags()) { in VerifyInstruction()
1146 uint32_t v_a = dchecked_integral_cast<uint32_t>(inst->VRegA()); in VerifyInstruction()
1147 if ((inst->GetVerifyExtraFlags() == Instruction::kVerifyVarArgNonZero && v_a == 0) || in VerifyInstruction()
1155 inst->GetVarArgs(args); in VerifyInstruction()
1162 if (inst->GetVerifyExtraFlags() == Instruction::kVerifyVarArgRangeNonZero && in VerifyInstruction()
1163 inst->VRegA() <= 0) { in VerifyInstruction()
1164 Fail(VERIFY_ERROR_BAD_CLASS_HARD) << "invalid arg count (" << inst->VRegA() << ") in " in VerifyInstruction()
1168 result = result && CheckVarArgRangeRegs(inst->VRegA(), inst->VRegC()); in VerifyInstruction()
1171 Fail(VERIFY_ERROR_BAD_CLASS_HARD) << "unexpected opcode " << inst->Name(); in VerifyInstruction()
1175 if (!kAllowRuntimeOnlyInstructions && inst->GetVerifyIsRuntimeOnly()) { in VerifyInstruction()
1176 Fail(VERIFY_ERROR_BAD_CLASS_HARD) << "opcode only expected at runtime " << inst->Name(); in VerifyInstruction()
1633 for (const DexInstructionPcPair& inst : code_item_accessor_) { in Dump() local
1634 const size_t dex_pc = inst.DexPc(); in Dump()
1648 vios->Stream() << inst->DumpHex(5) << " "; in Dump()
1650 vios->Stream() << inst->DumpString(dex_file_) << "\n"; in Dump()
1907 for (const DexInstructionPcPair& inst : code_item_accessor_) { in CodeFlowVerifyMethod() local
1908 const uint32_t insn_idx = inst.DexPc(); in CodeFlowVerifyMethod()
2037 const Instruction* inst = Instruction::At(insns); in CodeFlowVerifyInstruction() local
2038 int opcode_flags = Instruction::FlagsOf(inst->Opcode()); in CodeFlowVerifyInstruction()
2044 LogVerifyInfo() << "Processing " << inst->DumpString(dex_file_) << std::endl in CodeFlowVerifyInstruction()
2069 switch (inst->Opcode()) { in CodeFlowVerifyInstruction()
2076 if (inst->VRegA_10x() != 0) { in CodeFlowVerifyInstruction()
2082 work_line_->CopyRegister1(this, inst->VRegA_12x(), inst->VRegB_12x(), kTypeCategory1nr); in CodeFlowVerifyInstruction()
2085 work_line_->CopyRegister1(this, inst->VRegA_22x(), inst->VRegB_22x(), kTypeCategory1nr); in CodeFlowVerifyInstruction()
2088 work_line_->CopyRegister1(this, inst->VRegA_32x(), inst->VRegB_32x(), kTypeCategory1nr); in CodeFlowVerifyInstruction()
2091 work_line_->CopyRegister2(this, inst->VRegA_12x(), inst->VRegB_12x()); in CodeFlowVerifyInstruction()
2094 work_line_->CopyRegister2(this, inst->VRegA_22x(), inst->VRegB_22x()); in CodeFlowVerifyInstruction()
2097 work_line_->CopyRegister2(this, inst->VRegA_32x(), inst->VRegB_32x()); in CodeFlowVerifyInstruction()
2100 work_line_->CopyRegister1(this, inst->VRegA_12x(), inst->VRegB_12x(), kTypeCategoryRef); in CodeFlowVerifyInstruction()
2103 work_line_->CopyRegister1(this, inst->VRegA_22x(), inst->VRegB_22x(), kTypeCategoryRef); in CodeFlowVerifyInstruction()
2106 work_line_->CopyRegister1(this, inst->VRegA_32x(), inst->VRegB_32x(), kTypeCategoryRef); in CodeFlowVerifyInstruction()
2121 work_line_->CopyResultRegister1(this, inst->VRegA_11x(), false); in CodeFlowVerifyInstruction()
2124 work_line_->CopyResultRegister2(this, inst->VRegA_11x()); in CodeFlowVerifyInstruction()
2127 work_line_->CopyResultRegister1(this, inst->VRegA_11x(), true); in CodeFlowVerifyInstruction()
2142 work_line_->SetRegisterType<LockOp::kClear>(this, inst->VRegA_11x(), res_type); in CodeFlowVerifyInstruction()
2162 const uint32_t vregA = inst->VRegA_11x(); in CodeFlowVerifyInstruction()
2185 const uint32_t vregA = inst->VRegA_11x(); in CodeFlowVerifyInstruction()
2202 const uint32_t vregA = inst->VRegA_11x(); in CodeFlowVerifyInstruction()
2245 int32_t val = static_cast<int32_t>(inst->VRegB_11n() << 28) >> 28; in CodeFlowVerifyInstruction()
2247 this, inst->VRegA_11n(), DetermineCat1Constant(val, need_precise_constants_)); in CodeFlowVerifyInstruction()
2251 int16_t val = static_cast<int16_t>(inst->VRegB_21s()); in CodeFlowVerifyInstruction()
2253 this, inst->VRegA_21s(), DetermineCat1Constant(val, need_precise_constants_)); in CodeFlowVerifyInstruction()
2257 int32_t val = inst->VRegB_31i(); in CodeFlowVerifyInstruction()
2259 this, inst->VRegA_31i(), DetermineCat1Constant(val, need_precise_constants_)); in CodeFlowVerifyInstruction()
2263 int32_t val = static_cast<int32_t>(inst->VRegB_21h() << 16); in CodeFlowVerifyInstruction()
2265 this, inst->VRegA_21h(), DetermineCat1Constant(val, need_precise_constants_)); in CodeFlowVerifyInstruction()
2270 int64_t val = static_cast<int16_t>(inst->VRegB_21s()); in CodeFlowVerifyInstruction()
2273 work_line_->SetRegisterTypeWide(this, inst->VRegA_21s(), lo, hi); in CodeFlowVerifyInstruction()
2277 int64_t val = static_cast<int32_t>(inst->VRegB_31i()); in CodeFlowVerifyInstruction()
2280 work_line_->SetRegisterTypeWide(this, inst->VRegA_31i(), lo, hi); in CodeFlowVerifyInstruction()
2284 int64_t val = inst->VRegB_51l(); in CodeFlowVerifyInstruction()
2287 work_line_->SetRegisterTypeWide(this, inst->VRegA_51l(), lo, hi); in CodeFlowVerifyInstruction()
2291 int64_t val = static_cast<uint64_t>(inst->VRegB_21h()) << 48; in CodeFlowVerifyInstruction()
2294 work_line_->SetRegisterTypeWide(this, inst->VRegA_21h(), lo, hi); in CodeFlowVerifyInstruction()
2299 this, inst->VRegA_21c(), reg_types_.JavaLangString()); in CodeFlowVerifyInstruction()
2303 this, inst->VRegA_31c(), reg_types_.JavaLangString()); in CodeFlowVerifyInstruction()
2308 const RegType& res_type = ResolveClass<CheckAccess::kYes>(dex::TypeIndex(inst->VRegB_21c())); in CodeFlowVerifyInstruction()
2311 this, inst->VRegA_21c(), res_type.IsConflict() ? res_type in CodeFlowVerifyInstruction()
2317 this, inst->VRegA_21c(), reg_types_.JavaLangInvokeMethodHandle()); in CodeFlowVerifyInstruction()
2321 this, inst->VRegA_21c(), reg_types_.JavaLangInvokeMethodType()); in CodeFlowVerifyInstruction()
2324 work_line_->PushMonitor(this, inst->VRegA_11x(), work_insn_idx_); in CodeFlowVerifyInstruction()
2337 if (prev_inst.VRegB() == inst->VRegA_11x()) { in CodeFlowVerifyInstruction()
2372 if (prev_inst.VRegA() == inst->VRegA_11x()) { in CodeFlowVerifyInstruction()
2375 inst->VRegA_11x(), in CodeFlowVerifyInstruction()
2377 } else if (prev2_inst.VRegA() == inst->VRegA_11x()) { in CodeFlowVerifyInstruction()
2380 inst->VRegA_11x(), in CodeFlowVerifyInstruction()
2413 work_line_->PopMonitor(this, inst->VRegA_11x()); in CodeFlowVerifyInstruction()
2424 const bool is_checkcast = (inst->Opcode() == Instruction::CHECK_CAST); in CodeFlowVerifyInstruction()
2425 const dex::TypeIndex type_idx((is_checkcast) ? inst->VRegB_21c() : inst->VRegC_22c()); in CodeFlowVerifyInstruction()
2441 inst->VRegA_22c(), in CodeFlowVerifyInstruction()
2447 uint32_t orig_type_reg = (is_checkcast) ? inst->VRegA_21c() : inst->VRegB_22c(); in CodeFlowVerifyInstruction()
2471 work_line_->SetRegisterType<LockOp::kKeep>(this, inst->VRegA_21c(), res_type); in CodeFlowVerifyInstruction()
2474 inst->VRegA_22c(), in CodeFlowVerifyInstruction()
2481 const RegType& res_type = work_line_->GetRegisterType(this, inst->VRegB_12x()); in CodeFlowVerifyInstruction()
2488 inst->VRegA_12x(), in CodeFlowVerifyInstruction()
2497 const RegType& res_type = ResolveClass<CheckAccess::kYes>(dex::TypeIndex(inst->VRegB_21c())); in CodeFlowVerifyInstruction()
2514 work_line_->SetRegisterType<LockOp::kClear>(this, inst->VRegA_21c(), uninit_type); in CodeFlowVerifyInstruction()
2518 VerifyNewArray(inst, false, false); in CodeFlowVerifyInstruction()
2521 VerifyNewArray(inst, true, false); in CodeFlowVerifyInstruction()
2525 VerifyNewArray(inst, true, true); in CodeFlowVerifyInstruction()
2530 if (!work_line_->VerifyRegisterType(this, inst->VRegB_23x(), reg_types_.Float())) { in CodeFlowVerifyInstruction()
2533 if (!work_line_->VerifyRegisterType(this, inst->VRegC_23x(), reg_types_.Float())) { in CodeFlowVerifyInstruction()
2536 work_line_->SetRegisterType<LockOp::kClear>(this, inst->VRegA_23x(), reg_types_.Integer()); in CodeFlowVerifyInstruction()
2540 if (!work_line_->VerifyRegisterTypeWide(this, inst->VRegB_23x(), reg_types_.DoubleLo(), in CodeFlowVerifyInstruction()
2544 if (!work_line_->VerifyRegisterTypeWide(this, inst->VRegC_23x(), reg_types_.DoubleLo(), in CodeFlowVerifyInstruction()
2548 work_line_->SetRegisterType<LockOp::kClear>(this, inst->VRegA_23x(), reg_types_.Integer()); in CodeFlowVerifyInstruction()
2551 if (!work_line_->VerifyRegisterTypeWide(this, inst->VRegB_23x(), reg_types_.LongLo(), in CodeFlowVerifyInstruction()
2555 if (!work_line_->VerifyRegisterTypeWide(this, inst->VRegC_23x(), reg_types_.LongLo(), in CodeFlowVerifyInstruction()
2559 work_line_->SetRegisterType<LockOp::kClear>(this, inst->VRegA_23x(), reg_types_.Integer()); in CodeFlowVerifyInstruction()
2562 const RegType& res_type = work_line_->GetRegisterType(this, inst->VRegA_11x()); in CodeFlowVerifyInstruction()
2584 work_line_->VerifyRegisterType(this, inst->VRegA_31t(), reg_types_.Integer()); in CodeFlowVerifyInstruction()
2589 const RegType& array_type = work_line_->GetRegisterType(this, inst->VRegA_31t()); in CodeFlowVerifyInstruction()
2629 const RegType& reg_type1 = work_line_->GetRegisterType(this, inst->VRegA_22t()); in CodeFlowVerifyInstruction()
2630 const RegType& reg_type2 = work_line_->GetRegisterType(this, inst->VRegB_22t()); in CodeFlowVerifyInstruction()
2649 const RegType& reg_type1 = work_line_->GetRegisterType(this, inst->VRegA_22t()); in CodeFlowVerifyInstruction()
2650 const RegType& reg_type2 = work_line_->GetRegisterType(this, inst->VRegB_22t()); in CodeFlowVerifyInstruction()
2659 const RegType& reg_type = work_line_->GetRegisterType(this, inst->VRegA_21t()); in CodeFlowVerifyInstruction()
2697 (inst->VRegA_21t() == instance_of_inst.VRegA_22c()) && in CodeFlowVerifyInstruction()
2723 if (inst->Opcode() == Instruction::IF_EQZ) { in CodeFlowVerifyInstruction()
2779 const RegType& reg_type = work_line_->GetRegisterType(this, inst->VRegA_21t()); in CodeFlowVerifyInstruction()
2787 VerifyAGet(inst, reg_types_.Boolean(), true); in CodeFlowVerifyInstruction()
2790 VerifyAGet(inst, reg_types_.Byte(), true); in CodeFlowVerifyInstruction()
2793 VerifyAGet(inst, reg_types_.Char(), true); in CodeFlowVerifyInstruction()
2796 VerifyAGet(inst, reg_types_.Short(), true); in CodeFlowVerifyInstruction()
2799 VerifyAGet(inst, reg_types_.Integer(), true); in CodeFlowVerifyInstruction()
2802 VerifyAGet(inst, reg_types_.LongLo(), true); in CodeFlowVerifyInstruction()
2805 VerifyAGet(inst, reg_types_.JavaLangObject(false), false); in CodeFlowVerifyInstruction()
2809 VerifyAPut(inst, reg_types_.Boolean(), true); in CodeFlowVerifyInstruction()
2812 VerifyAPut(inst, reg_types_.Byte(), true); in CodeFlowVerifyInstruction()
2815 VerifyAPut(inst, reg_types_.Char(), true); in CodeFlowVerifyInstruction()
2818 VerifyAPut(inst, reg_types_.Short(), true); in CodeFlowVerifyInstruction()
2821 VerifyAPut(inst, reg_types_.Integer(), true); in CodeFlowVerifyInstruction()
2824 VerifyAPut(inst, reg_types_.LongLo(), true); in CodeFlowVerifyInstruction()
2827 VerifyAPut(inst, reg_types_.JavaLangObject(false), false); in CodeFlowVerifyInstruction()
2832 VerifyISFieldAccess<FieldAccessType::kAccGet>(inst, reg_types_.Boolean(), true, false); in CodeFlowVerifyInstruction()
2836 VerifyISFieldAccess<FieldAccessType::kAccGet>(inst, reg_types_.Byte(), true, false); in CodeFlowVerifyInstruction()
2840 VerifyISFieldAccess<FieldAccessType::kAccGet>(inst, reg_types_.Char(), true, false); in CodeFlowVerifyInstruction()
2844 VerifyISFieldAccess<FieldAccessType::kAccGet>(inst, reg_types_.Short(), true, false); in CodeFlowVerifyInstruction()
2848 VerifyISFieldAccess<FieldAccessType::kAccGet>(inst, reg_types_.Integer(), true, false); in CodeFlowVerifyInstruction()
2852 VerifyISFieldAccess<FieldAccessType::kAccGet>(inst, reg_types_.LongLo(), true, false); in CodeFlowVerifyInstruction()
2856 VerifyISFieldAccess<FieldAccessType::kAccGet>(inst, reg_types_.JavaLangObject(false), false, in CodeFlowVerifyInstruction()
2862 VerifyISFieldAccess<FieldAccessType::kAccPut>(inst, reg_types_.Boolean(), true, false); in CodeFlowVerifyInstruction()
2866 VerifyISFieldAccess<FieldAccessType::kAccPut>(inst, reg_types_.Byte(), true, false); in CodeFlowVerifyInstruction()
2870 VerifyISFieldAccess<FieldAccessType::kAccPut>(inst, reg_types_.Char(), true, false); in CodeFlowVerifyInstruction()
2874 VerifyISFieldAccess<FieldAccessType::kAccPut>(inst, reg_types_.Short(), true, false); in CodeFlowVerifyInstruction()
2878 VerifyISFieldAccess<FieldAccessType::kAccPut>(inst, reg_types_.Integer(), true, false); in CodeFlowVerifyInstruction()
2882 VerifyISFieldAccess<FieldAccessType::kAccPut>(inst, reg_types_.LongLo(), true, false); in CodeFlowVerifyInstruction()
2886 VerifyISFieldAccess<FieldAccessType::kAccPut>(inst, reg_types_.JavaLangObject(false), false, in CodeFlowVerifyInstruction()
2891 VerifyISFieldAccess<FieldAccessType::kAccGet>(inst, reg_types_.Boolean(), true, true); in CodeFlowVerifyInstruction()
2894 VerifyISFieldAccess<FieldAccessType::kAccGet>(inst, reg_types_.Byte(), true, true); in CodeFlowVerifyInstruction()
2897 VerifyISFieldAccess<FieldAccessType::kAccGet>(inst, reg_types_.Char(), true, true); in CodeFlowVerifyInstruction()
2900 VerifyISFieldAccess<FieldAccessType::kAccGet>(inst, reg_types_.Short(), true, true); in CodeFlowVerifyInstruction()
2903 VerifyISFieldAccess<FieldAccessType::kAccGet>(inst, reg_types_.Integer(), true, true); in CodeFlowVerifyInstruction()
2906 VerifyISFieldAccess<FieldAccessType::kAccGet>(inst, reg_types_.LongLo(), true, true); in CodeFlowVerifyInstruction()
2909 VerifyISFieldAccess<FieldAccessType::kAccGet>(inst, reg_types_.JavaLangObject(false), false, in CodeFlowVerifyInstruction()
2914 VerifyISFieldAccess<FieldAccessType::kAccPut>(inst, reg_types_.Boolean(), true, true); in CodeFlowVerifyInstruction()
2917 VerifyISFieldAccess<FieldAccessType::kAccPut>(inst, reg_types_.Byte(), true, true); in CodeFlowVerifyInstruction()
2920 VerifyISFieldAccess<FieldAccessType::kAccPut>(inst, reg_types_.Char(), true, true); in CodeFlowVerifyInstruction()
2923 VerifyISFieldAccess<FieldAccessType::kAccPut>(inst, reg_types_.Short(), true, true); in CodeFlowVerifyInstruction()
2926 VerifyISFieldAccess<FieldAccessType::kAccPut>(inst, reg_types_.Integer(), true, true); in CodeFlowVerifyInstruction()
2929 VerifyISFieldAccess<FieldAccessType::kAccPut>(inst, reg_types_.LongLo(), true, true); in CodeFlowVerifyInstruction()
2932 VerifyISFieldAccess<FieldAccessType::kAccPut>(inst, reg_types_.JavaLangObject(false), false, in CodeFlowVerifyInstruction()
2942 bool is_range = (inst->Opcode() == Instruction::INVOKE_VIRTUAL_RANGE || in CodeFlowVerifyInstruction()
2943 inst->Opcode() == Instruction::INVOKE_SUPER_RANGE || in CodeFlowVerifyInstruction()
2944 inst->Opcode() == Instruction::INVOKE_VIRTUAL_RANGE_QUICK); in CodeFlowVerifyInstruction()
2945 bool is_super = (inst->Opcode() == Instruction::INVOKE_SUPER || in CodeFlowVerifyInstruction()
2946 inst->Opcode() == Instruction::INVOKE_SUPER_RANGE); in CodeFlowVerifyInstruction()
2948 ArtMethod* called_method = VerifyInvocationArgs(inst, type, is_range); in CodeFlowVerifyInstruction()
2964 uint32_t method_idx = GetMethodIdxOfInvoke(inst); in CodeFlowVerifyInstruction()
2981 bool is_range = (inst->Opcode() == Instruction::INVOKE_DIRECT_RANGE); in CodeFlowVerifyInstruction()
2982 ArtMethod* called_method = VerifyInvocationArgs(inst, METHOD_DIRECT, is_range); in CodeFlowVerifyInstruction()
2987 uint32_t method_idx = (is_range) ? inst->VRegB_3rc() : inst->VRegB_35c(); in CodeFlowVerifyInstruction()
3016 const RegType& this_type = work_line_->GetInvocationThis(this, inst); in CodeFlowVerifyInstruction()
3063 bool is_range = (inst->Opcode() == Instruction::INVOKE_STATIC_RANGE); in CodeFlowVerifyInstruction()
3064 ArtMethod* called_method = VerifyInvocationArgs(inst, METHOD_STATIC, is_range); in CodeFlowVerifyInstruction()
3067 uint32_t method_idx = (is_range) ? inst->VRegB_3rc() : inst->VRegB_35c(); in CodeFlowVerifyInstruction()
3088 bool is_range = (inst->Opcode() == Instruction::INVOKE_INTERFACE_RANGE); in CodeFlowVerifyInstruction()
3089 ArtMethod* abs_method = VerifyInvocationArgs(inst, METHOD_INTERFACE, is_range); in CodeFlowVerifyInstruction()
3101 const RegType& this_type = work_line_->GetInvocationThis(this, inst); in CodeFlowVerifyInstruction()
3124 uint32_t method_idx = (is_range) ? inst->VRegB_3rc() : inst->VRegB_35c(); in CodeFlowVerifyInstruction()
3145 bool is_range = (inst->Opcode() == Instruction::INVOKE_POLYMORPHIC_RANGE); in CodeFlowVerifyInstruction()
3146 ArtMethod* called_method = VerifyInvocationArgs(inst, METHOD_POLYMORPHIC, is_range); in CodeFlowVerifyInstruction()
3158 !CheckSignaturePolymorphicReceiver(inst)) { in CodeFlowVerifyInstruction()
3162 const uint16_t vRegH = (is_range) ? inst->VRegH_4rcc() : inst->VRegH_45cc(); in CodeFlowVerifyInstruction()
3179 bool is_range = (inst->Opcode() == Instruction::INVOKE_CUSTOM_RANGE); in CodeFlowVerifyInstruction()
3182 const uint32_t call_site_idx = is_range ? inst->VRegB_3rc() : inst->VRegB_35c(); in CodeFlowVerifyInstruction()
3195 VerifyInvocationArgsFromIterator(¶m_it, inst, METHOD_STATIC, is_range, nullptr); in CodeFlowVerifyInstruction()
3211 work_line_->CheckUnaryOp(this, inst, reg_types_.Integer(), reg_types_.Integer()); in CodeFlowVerifyInstruction()
3215 work_line_->CheckUnaryOpWide(this, inst, reg_types_.LongLo(), reg_types_.LongHi(), in CodeFlowVerifyInstruction()
3219 work_line_->CheckUnaryOp(this, inst, reg_types_.Float(), reg_types_.Float()); in CodeFlowVerifyInstruction()
3222 work_line_->CheckUnaryOpWide(this, inst, reg_types_.DoubleLo(), reg_types_.DoubleHi(), in CodeFlowVerifyInstruction()
3226 work_line_->CheckUnaryOpToWide(this, inst, reg_types_.LongLo(), reg_types_.LongHi(), in CodeFlowVerifyInstruction()
3230 work_line_->CheckUnaryOp(this, inst, reg_types_.Float(), reg_types_.Integer()); in CodeFlowVerifyInstruction()
3233 work_line_->CheckUnaryOpToWide(this, inst, reg_types_.DoubleLo(), reg_types_.DoubleHi(), in CodeFlowVerifyInstruction()
3237 work_line_->CheckUnaryOpFromWide(this, inst, reg_types_.Integer(), in CodeFlowVerifyInstruction()
3241 work_line_->CheckUnaryOpFromWide(this, inst, reg_types_.Float(), in CodeFlowVerifyInstruction()
3245 work_line_->CheckUnaryOpWide(this, inst, reg_types_.DoubleLo(), reg_types_.DoubleHi(), in CodeFlowVerifyInstruction()
3249 work_line_->CheckUnaryOp(this, inst, reg_types_.Integer(), reg_types_.Float()); in CodeFlowVerifyInstruction()
3252 work_line_->CheckUnaryOpToWide(this, inst, reg_types_.LongLo(), reg_types_.LongHi(), in CodeFlowVerifyInstruction()
3256 work_line_->CheckUnaryOpToWide(this, inst, reg_types_.DoubleLo(), reg_types_.DoubleHi(), in CodeFlowVerifyInstruction()
3260 work_line_->CheckUnaryOpFromWide(this, inst, reg_types_.Integer(), in CodeFlowVerifyInstruction()
3264 work_line_->CheckUnaryOpWide(this, inst, reg_types_.LongLo(), reg_types_.LongHi(), in CodeFlowVerifyInstruction()
3268 work_line_->CheckUnaryOpFromWide(this, inst, reg_types_.Float(), in CodeFlowVerifyInstruction()
3272 work_line_->CheckUnaryOp(this, inst, reg_types_.Byte(), reg_types_.Integer()); in CodeFlowVerifyInstruction()
3275 work_line_->CheckUnaryOp(this, inst, reg_types_.Char(), reg_types_.Integer()); in CodeFlowVerifyInstruction()
3278 work_line_->CheckUnaryOp(this, inst, reg_types_.Short(), reg_types_.Integer()); in CodeFlowVerifyInstruction()
3289 work_line_->CheckBinaryOp(this, inst, reg_types_.Integer(), reg_types_.Integer(), in CodeFlowVerifyInstruction()
3295 work_line_->CheckBinaryOp(this, inst, reg_types_.Integer(), reg_types_.Integer(), in CodeFlowVerifyInstruction()
3306 work_line_->CheckBinaryOpWide(this, inst, reg_types_.LongLo(), reg_types_.LongHi(), in CodeFlowVerifyInstruction()
3314 work_line_->CheckBinaryOpWideShift(this, inst, reg_types_.LongLo(), reg_types_.LongHi(), in CodeFlowVerifyInstruction()
3322 work_line_->CheckBinaryOp(this, inst, reg_types_.Float(), reg_types_.Float(), in CodeFlowVerifyInstruction()
3330 work_line_->CheckBinaryOpWide(this, inst, reg_types_.DoubleLo(), reg_types_.DoubleHi(), in CodeFlowVerifyInstruction()
3341 work_line_->CheckBinaryOp2addr(this, inst, reg_types_.Integer(), reg_types_.Integer(), in CodeFlowVerifyInstruction()
3347 work_line_->CheckBinaryOp2addr(this, inst, reg_types_.Integer(), reg_types_.Integer(), in CodeFlowVerifyInstruction()
3351 work_line_->CheckBinaryOp2addr(this, inst, reg_types_.Integer(), reg_types_.Integer(), in CodeFlowVerifyInstruction()
3362 work_line_->CheckBinaryOp2addrWide(this, inst, reg_types_.LongLo(), reg_types_.LongHi(), in CodeFlowVerifyInstruction()
3369 work_line_->CheckBinaryOp2addrWideShift(this, inst, reg_types_.LongLo(), reg_types_.LongHi(), in CodeFlowVerifyInstruction()
3377 work_line_->CheckBinaryOp2addr(this, inst, reg_types_.Float(), reg_types_.Float(), in CodeFlowVerifyInstruction()
3385 work_line_->CheckBinaryOp2addrWide(this, inst, reg_types_.DoubleLo(), reg_types_.DoubleHi(), in CodeFlowVerifyInstruction()
3394 work_line_->CheckLiteralOp(this, inst, reg_types_.Integer(), reg_types_.Integer(), false, in CodeFlowVerifyInstruction()
3400 work_line_->CheckLiteralOp(this, inst, reg_types_.Integer(), reg_types_.Integer(), true, in CodeFlowVerifyInstruction()
3411 work_line_->CheckLiteralOp(this, inst, reg_types_.Integer(), reg_types_.Integer(), false, in CodeFlowVerifyInstruction()
3417 work_line_->CheckLiteralOp(this, inst, reg_types_.Integer(), reg_types_.Integer(), true, in CodeFlowVerifyInstruction()
3459 Fail(VERIFY_ERROR_BAD_CLASS_HARD) << "Unexpected opcode " << inst->DumpString(dex_file_); in CodeFlowVerifyInstruction()
3483 info_messages_ << "Rejecting opcode " << inst->DumpString(dex_file_); in CodeFlowVerifyInstruction()
3632 if (inst->Opcode() != Instruction::MONITOR_ENTER || work_line_->MonitorStackDepth() != 1) { in CodeFlowVerifyInstruction()
3646 DCHECK_EQ(&code_item_accessor_.InstructionAt(work_insn_idx_), inst); in CodeFlowVerifyInstruction()
3647 uint32_t next_insn_idx = work_insn_idx_ + inst->SizeInCodeUnits(); in CodeFlowVerifyInstruction()
3695 DCHECK_EQ(&code_item_accessor_.InstructionAt(work_insn_idx_), inst); in CodeFlowVerifyInstruction()
3696 *start_guess = work_insn_idx_ + inst->SizeInCodeUnits(); in CodeFlowVerifyInstruction()
3971 T* it, const Instruction* inst, MethodType method_type, bool is_range, ArtMethod* res_method) { in VerifyInvocationArgsFromIterator() argument
3972 DCHECK_EQ(!is_range, inst->HasVarArgs()); in VerifyInvocationArgsFromIterator()
3977 const size_t expected_args = inst->VRegA(); in VerifyInvocationArgsFromIterator()
3994 const RegType& actual_arg_type = work_line_->GetInvocationThis(this, inst); in VerifyInvocationArgsFromIterator()
4008 const uint32_t method_idx = GetMethodIdxOfInvoke(inst); in VerifyInvocationArgsFromIterator()
4030 const uint32_t method_idx = GetMethodIdxOfInvoke(inst); in VerifyInvocationArgsFromIterator()
4054 inst->GetVarArgs(arg); in VerifyInvocationArgsFromIterator()
4059 Fail(VERIFY_ERROR_BAD_CLASS_HARD) << "Rejecting invocation, expected " << inst->VRegA() << in VerifyInvocationArgsFromIterator()
4075 uint32_t get_reg = is_range ? inst->VRegC() + static_cast<uint32_t>(sig_registers) : in VerifyInvocationArgsFromIterator()
4118 void MethodVerifier<kVerifierDebug>::VerifyInvocationArgsUnresolvedMethod(const Instruction* inst, in VerifyInvocationArgsUnresolvedMethod() argument
4124 const uint32_t method_idx = GetMethodIdxOfInvoke(inst); in VerifyInvocationArgsUnresolvedMethod()
4127 VerifyInvocationArgsFromIterator(&it, inst, method_type, is_range, nullptr); in VerifyInvocationArgsUnresolvedMethod()
4213 const Instruction* inst, MethodType method_type, bool is_range) { in VerifyInvocationArgs() argument
4216 const uint32_t method_idx = GetMethodIdxOfInvoke(inst); in VerifyInvocationArgs()
4221 VerifyInvocationArgsUnresolvedMethod(inst, method_type, is_range); in VerifyInvocationArgs()
4281 dex::ProtoIndex proto_idx(inst->VRegH()); in VerifyInvocationArgs()
4283 return VerifyInvocationArgsFromIterator(&it, inst, method_type, is_range, res_method); in VerifyInvocationArgs()
4287 return VerifyInvocationArgsFromIterator(&it, inst, method_type, is_range, res_method); in VerifyInvocationArgs()
4342 bool MethodVerifier<kVerifierDebug>::CheckSignaturePolymorphicReceiver(const Instruction* inst) { in CheckSignaturePolymorphicReceiver() argument
4343 const RegType& this_type = work_line_->GetInvocationThis(this, inst); in CheckSignaturePolymorphicReceiver()
4377 uint16_t MethodVerifier<kVerifierDebug>::GetMethodIdxOfInvoke(const Instruction* inst) { in GetMethodIdxOfInvoke() argument
4378 switch (inst->Opcode()) { in GetMethodIdxOfInvoke()
4389 return inst->VRegB(); in GetMethodIdxOfInvoke()
4395 uint16_t MethodVerifier<kVerifierDebug>::GetFieldIdxOfFieldAccess(const Instruction* inst, in GetFieldIdxOfFieldAccess() argument
4398 return inst->VRegB_21c(); in GetFieldIdxOfFieldAccess()
4399 } else if (inst->IsQuickened()) { in GetFieldIdxOfFieldAccess()
4406 return inst->VRegC_22c(); in GetFieldIdxOfFieldAccess()
4411 void MethodVerifier<kVerifierDebug>::VerifyNewArray(const Instruction* inst, in VerifyNewArray() argument
4416 DCHECK_EQ(inst->Opcode(), Instruction::NEW_ARRAY); in VerifyNewArray()
4417 type_idx = dex::TypeIndex(inst->VRegC_22c()); in VerifyNewArray()
4419 DCHECK_EQ(inst->Opcode(), Instruction::FILLED_NEW_ARRAY); in VerifyNewArray()
4420 type_idx = dex::TypeIndex(inst->VRegB_35c()); in VerifyNewArray()
4422 DCHECK_EQ(inst->Opcode(), Instruction::FILLED_NEW_ARRAY_RANGE); in VerifyNewArray()
4423 type_idx = dex::TypeIndex(inst->VRegB_3rc()); in VerifyNewArray()
4434 work_line_->VerifyRegisterType(this, inst->VRegB_22c(), reg_types_.Integer()); in VerifyNewArray()
4437 work_line_->SetRegisterType<LockOp::kClear>(this, inst->VRegA_22c(), precise_type); in VerifyNewArray()
4443 uint32_t arg_count = (is_range) ? inst->VRegA_3rc() : inst->VRegA_35c(); in VerifyNewArray()
4446 inst->GetVarArgs(arg); in VerifyNewArray()
4449 uint32_t get_reg = is_range ? inst->VRegC_3rc() + ui : arg[ui]; in VerifyNewArray()
4463 void MethodVerifier<kVerifierDebug>::VerifyAGet(const Instruction* inst, in VerifyAGet() argument
4466 const RegType& index_type = work_line_->GetRegisterType(this, inst->VRegC_23x()); in VerifyAGet()
4470 const RegType& array_type = work_line_->GetRegisterType(this, inst->VRegB_23x()); in VerifyAGet()
4475 work_line_->SetRegisterType<LockOp::kClear>(this, inst->VRegA_23x(), reg_types_.Null()); in VerifyAGet()
4480 this, inst->VRegA_23x(), DetermineCat1Constant(1, need_precise_constants_)); in VerifyAGet()
4484 work_line_->SetRegisterType<LockOp::kClear>(this, inst->VRegA_23x(), insn_type); in VerifyAGet()
4487 work_line_->SetRegisterTypeWide(this, inst->VRegA_23x(), in VerifyAGet()
4503 inst->VRegA_23x(), in VerifyAGet()
4525 work_line_->SetRegisterType<LockOp::kClear>(this, inst->VRegA_23x(), component_type); in VerifyAGet()
4527 work_line_->SetRegisterTypeWide(this, inst->VRegA_23x(), component_type, in VerifyAGet()
4589 void MethodVerifier<kVerifierDebug>::VerifyAPut(const Instruction* inst, in VerifyAPut() argument
4592 const RegType& index_type = work_line_->GetRegisterType(this, inst->VRegC_23x()); in VerifyAPut()
4596 const RegType& array_type = work_line_->GetRegisterType(this, inst->VRegB_23x()); in VerifyAPut()
4606 const RegType& value_type = work_line_->GetRegisterType(this, inst->VRegA_23x()); in VerifyAPut()
4617 work_line_->VerifyRegisterType(this, inst->VRegA_23x(), *modified_reg_type); in VerifyAPut()
4631 const uint32_t vregA = inst->VRegA_23x(); in VerifyAPut()
4788 void MethodVerifier<kVerifierDebug>::VerifyISFieldAccess(const Instruction* inst, in VerifyISFieldAccess() argument
4792 uint32_t field_idx = GetFieldIdxOfFieldAccess(inst, is_static); in VerifyISFieldAccess()
4797 const RegType& object_type = work_line_->GetRegisterType(this, inst->VRegB_22c()); in VerifyISFieldAccess()
4879 const uint32_t vregA = (is_static) ? inst->VRegA_21c() : inst->VRegA_22c(); in VerifyISFieldAccess()
5473 const Instruction& inst = code_item_accessor_.InstructionAt(work_insn_idx_); in Fail() local
5474 int opcode_flags = Instruction::FlagsOf(inst.Opcode()); in Fail()