Lines Matching refs:inst
635 for (const DexInstructionPcPair& inst : code_item_accessor_) { in FindLocksAtDexPc() local
636 if (inst->Opcode() == Instruction::MONITOR_ENTER) { in FindLocksAtDexPc()
850 const Instruction& inst = code_item_accessor_.InstructionAt(work_insn_idx_); in Fail() local
851 int opcode_flags = Instruction::FlagsOf(inst.Opcode()); in Fail()
1023 for (const DexInstructionPcPair& inst : code_item_accessor_) { in VerifyInstructions() local
1024 const uint32_t dex_pc = inst.DexPc(); in VerifyInstructions()
1025 if (!VerifyInstruction<kAllowRuntimeOnlyInstructions>(&inst.Inst(), dex_pc)) { in VerifyInstructions()
1032 if (inst->IsBranch()) { in VerifyInstructions()
1041 } else if (inst->IsSwitch() || inst->IsThrow()) { in VerifyInstructions()
1043 } else if (inst->IsReturn()) { in VerifyInstructions()
1051 bool MethodVerifier::VerifyInstruction(const Instruction* inst, uint32_t code_offset) { in VerifyInstruction() argument
1052 if (Instruction::kHaveExperimentalInstructions && UNLIKELY(inst->IsExperimental())) { in VerifyInstruction()
1064 switch (inst->GetVerifyTypeArgumentA()) { in VerifyInstruction()
1066 result = result && CheckRegisterIndex(inst->VRegA()); in VerifyInstruction()
1069 result = result && CheckWideRegisterIndex(inst->VRegA()); in VerifyInstruction()
1072 switch (inst->GetVerifyTypeArgumentB()) { in VerifyInstruction()
1074 result = result && CheckRegisterIndex(inst->VRegB()); in VerifyInstruction()
1077 result = result && CheckFieldIndex(inst->VRegB()); in VerifyInstruction()
1080 result = result && CheckMethodIndex(inst->VRegB()); in VerifyInstruction()
1083 result = result && CheckNewInstance(dex::TypeIndex(inst->VRegB())); in VerifyInstruction()
1086 result = result && CheckStringIndex(inst->VRegB()); in VerifyInstruction()
1089 result = result && CheckTypeIndex(dex::TypeIndex(inst->VRegB())); in VerifyInstruction()
1092 result = result && CheckWideRegisterIndex(inst->VRegB()); in VerifyInstruction()
1095 result = result && CheckCallSiteIndex(inst->VRegB()); in VerifyInstruction()
1098 result = result && CheckMethodHandleIndex(inst->VRegB()); in VerifyInstruction()
1101 result = result && CheckPrototypeIndex(inst->VRegB()); in VerifyInstruction()
1104 switch (inst->GetVerifyTypeArgumentC()) { in VerifyInstruction()
1106 result = result && CheckRegisterIndex(inst->VRegC()); in VerifyInstruction()
1109 result = result && CheckFieldIndex(inst->VRegC()); in VerifyInstruction()
1112 result = result && CheckNewArray(dex::TypeIndex(inst->VRegC())); in VerifyInstruction()
1115 result = result && CheckTypeIndex(dex::TypeIndex(inst->VRegC())); in VerifyInstruction()
1118 result = result && CheckWideRegisterIndex(inst->VRegC()); in VerifyInstruction()
1121 switch (inst->GetVerifyTypeArgumentH()) { in VerifyInstruction()
1123 result = result && CheckPrototypeIndex(inst->VRegH()); in VerifyInstruction()
1126 switch (inst->GetVerifyExtraFlags()) { in VerifyInstruction()
1140 uint32_t v_a = dchecked_integral_cast<uint32_t>(inst->VRegA()); in VerifyInstruction()
1141 if ((inst->GetVerifyExtraFlags() == Instruction::kVerifyVarArgNonZero && v_a == 0) || in VerifyInstruction()
1149 inst->GetVarArgs(args); in VerifyInstruction()
1156 if (inst->GetVerifyExtraFlags() == Instruction::kVerifyVarArgRangeNonZero && in VerifyInstruction()
1157 inst->VRegA() <= 0) { in VerifyInstruction()
1158 Fail(VERIFY_ERROR_BAD_CLASS_HARD) << "invalid arg count (" << inst->VRegA() << ") in " in VerifyInstruction()
1162 result = result && CheckVarArgRangeRegs(inst->VRegA(), inst->VRegC()); in VerifyInstruction()
1165 Fail(VERIFY_ERROR_BAD_CLASS_HARD) << "unexpected opcode " << inst->Name(); in VerifyInstruction()
1169 if (!kAllowRuntimeOnlyInstructions && inst->GetVerifyIsRuntimeOnly()) { in VerifyInstruction()
1170 Fail(VERIFY_ERROR_BAD_CLASS_HARD) << "opcode only expected at runtime " << inst->Name(); in VerifyInstruction()
1609 for (const DexInstructionPcPair& inst : code_item_accessor_) { in Dump() local
1610 const size_t dex_pc = inst.DexPc(); in Dump()
1624 vios->Stream() << inst->DumpHex(5) << " "; in Dump()
1626 vios->Stream() << inst->DumpString(dex_file_) << "\n"; in Dump()
1881 for (const DexInstructionPcPair& inst : code_item_accessor_) { in CodeFlowVerifyMethod() local
1882 const uint32_t insn_idx = inst.DexPc(); in CodeFlowVerifyMethod()
2009 const Instruction* inst = Instruction::At(insns); in CodeFlowVerifyInstruction() local
2010 int opcode_flags = Instruction::FlagsOf(inst->Opcode()); in CodeFlowVerifyInstruction()
2016 LogVerifyInfo() << "Processing " << inst->DumpString(dex_file_) << "\n" in CodeFlowVerifyInstruction()
2041 switch (inst->Opcode()) { in CodeFlowVerifyInstruction()
2048 if (inst->VRegA_10x() != 0) { in CodeFlowVerifyInstruction()
2054 work_line_->CopyRegister1(this, inst->VRegA_12x(), inst->VRegB_12x(), kTypeCategory1nr); in CodeFlowVerifyInstruction()
2057 work_line_->CopyRegister1(this, inst->VRegA_22x(), inst->VRegB_22x(), kTypeCategory1nr); in CodeFlowVerifyInstruction()
2060 work_line_->CopyRegister1(this, inst->VRegA_32x(), inst->VRegB_32x(), kTypeCategory1nr); in CodeFlowVerifyInstruction()
2063 work_line_->CopyRegister2(this, inst->VRegA_12x(), inst->VRegB_12x()); in CodeFlowVerifyInstruction()
2066 work_line_->CopyRegister2(this, inst->VRegA_22x(), inst->VRegB_22x()); in CodeFlowVerifyInstruction()
2069 work_line_->CopyRegister2(this, inst->VRegA_32x(), inst->VRegB_32x()); in CodeFlowVerifyInstruction()
2072 work_line_->CopyRegister1(this, inst->VRegA_12x(), inst->VRegB_12x(), kTypeCategoryRef); in CodeFlowVerifyInstruction()
2075 work_line_->CopyRegister1(this, inst->VRegA_22x(), inst->VRegB_22x(), kTypeCategoryRef); in CodeFlowVerifyInstruction()
2078 work_line_->CopyRegister1(this, inst->VRegA_32x(), inst->VRegB_32x(), kTypeCategoryRef); in CodeFlowVerifyInstruction()
2093 work_line_->CopyResultRegister1(this, inst->VRegA_11x(), false); in CodeFlowVerifyInstruction()
2096 work_line_->CopyResultRegister2(this, inst->VRegA_11x()); in CodeFlowVerifyInstruction()
2099 work_line_->CopyResultRegister1(this, inst->VRegA_11x(), true); in CodeFlowVerifyInstruction()
2114 work_line_->SetRegisterType<LockOp::kClear>(this, inst->VRegA_11x(), res_type); in CodeFlowVerifyInstruction()
2134 const uint32_t vregA = inst->VRegA_11x(); in CodeFlowVerifyInstruction()
2157 const uint32_t vregA = inst->VRegA_11x(); in CodeFlowVerifyInstruction()
2174 const uint32_t vregA = inst->VRegA_11x(); in CodeFlowVerifyInstruction()
2217 int32_t val = static_cast<int32_t>(inst->VRegB_11n() << 28) >> 28; in CodeFlowVerifyInstruction()
2219 this, inst->VRegA_11n(), DetermineCat1Constant(val, need_precise_constants_)); in CodeFlowVerifyInstruction()
2223 int16_t val = static_cast<int16_t>(inst->VRegB_21s()); in CodeFlowVerifyInstruction()
2225 this, inst->VRegA_21s(), DetermineCat1Constant(val, need_precise_constants_)); in CodeFlowVerifyInstruction()
2229 int32_t val = inst->VRegB_31i(); in CodeFlowVerifyInstruction()
2231 this, inst->VRegA_31i(), DetermineCat1Constant(val, need_precise_constants_)); in CodeFlowVerifyInstruction()
2235 int32_t val = static_cast<int32_t>(inst->VRegB_21h() << 16); in CodeFlowVerifyInstruction()
2237 this, inst->VRegA_21h(), DetermineCat1Constant(val, need_precise_constants_)); in CodeFlowVerifyInstruction()
2242 int64_t val = static_cast<int16_t>(inst->VRegB_21s()); in CodeFlowVerifyInstruction()
2245 work_line_->SetRegisterTypeWide(this, inst->VRegA_21s(), lo, hi); in CodeFlowVerifyInstruction()
2249 int64_t val = static_cast<int32_t>(inst->VRegB_31i()); in CodeFlowVerifyInstruction()
2252 work_line_->SetRegisterTypeWide(this, inst->VRegA_31i(), lo, hi); in CodeFlowVerifyInstruction()
2256 int64_t val = inst->VRegB_51l(); in CodeFlowVerifyInstruction()
2259 work_line_->SetRegisterTypeWide(this, inst->VRegA_51l(), lo, hi); in CodeFlowVerifyInstruction()
2263 int64_t val = static_cast<uint64_t>(inst->VRegB_21h()) << 48; in CodeFlowVerifyInstruction()
2266 work_line_->SetRegisterTypeWide(this, inst->VRegA_21h(), lo, hi); in CodeFlowVerifyInstruction()
2271 this, inst->VRegA_21c(), reg_types_.JavaLangString()); in CodeFlowVerifyInstruction()
2275 this, inst->VRegA_31c(), reg_types_.JavaLangString()); in CodeFlowVerifyInstruction()
2280 const RegType& res_type = ResolveClass<CheckAccess::kYes>(dex::TypeIndex(inst->VRegB_21c())); in CodeFlowVerifyInstruction()
2283 this, inst->VRegA_21c(), res_type.IsConflict() ? res_type in CodeFlowVerifyInstruction()
2289 this, inst->VRegA_21c(), reg_types_.JavaLangInvokeMethodHandle()); in CodeFlowVerifyInstruction()
2295 this, inst->VRegA_21c(), reg_types_.JavaLangInvokeMethodType()); in CodeFlowVerifyInstruction()
2300 work_line_->PushMonitor(this, inst->VRegA_11x(), work_insn_idx_); in CodeFlowVerifyInstruction()
2313 if (prev_inst.VRegB() == inst->VRegA_11x()) { in CodeFlowVerifyInstruction()
2350 work_line_->PopMonitor(this, inst->VRegA_11x()); in CodeFlowVerifyInstruction()
2361 const bool is_checkcast = (inst->Opcode() == Instruction::CHECK_CAST); in CodeFlowVerifyInstruction()
2362 const dex::TypeIndex type_idx((is_checkcast) ? inst->VRegB_21c() : inst->VRegC_22c()); in CodeFlowVerifyInstruction()
2378 inst->VRegA_22c(), in CodeFlowVerifyInstruction()
2384 uint32_t orig_type_reg = (is_checkcast) ? inst->VRegA_21c() : inst->VRegB_22c(); in CodeFlowVerifyInstruction()
2408 work_line_->SetRegisterType<LockOp::kKeep>(this, inst->VRegA_21c(), res_type); in CodeFlowVerifyInstruction()
2411 inst->VRegA_22c(), in CodeFlowVerifyInstruction()
2418 const RegType& res_type = work_line_->GetRegisterType(this, inst->VRegB_12x()); in CodeFlowVerifyInstruction()
2425 inst->VRegA_12x(), in CodeFlowVerifyInstruction()
2434 const RegType& res_type = ResolveClass<CheckAccess::kYes>(dex::TypeIndex(inst->VRegB_21c())); in CodeFlowVerifyInstruction()
2451 work_line_->SetRegisterType<LockOp::kClear>(this, inst->VRegA_21c(), uninit_type); in CodeFlowVerifyInstruction()
2455 VerifyNewArray(inst, false, false); in CodeFlowVerifyInstruction()
2458 VerifyNewArray(inst, true, false); in CodeFlowVerifyInstruction()
2462 VerifyNewArray(inst, true, true); in CodeFlowVerifyInstruction()
2467 if (!work_line_->VerifyRegisterType(this, inst->VRegB_23x(), reg_types_.Float())) { in CodeFlowVerifyInstruction()
2470 if (!work_line_->VerifyRegisterType(this, inst->VRegC_23x(), reg_types_.Float())) { in CodeFlowVerifyInstruction()
2473 work_line_->SetRegisterType<LockOp::kClear>(this, inst->VRegA_23x(), reg_types_.Integer()); in CodeFlowVerifyInstruction()
2477 if (!work_line_->VerifyRegisterTypeWide(this, inst->VRegB_23x(), reg_types_.DoubleLo(), in CodeFlowVerifyInstruction()
2481 if (!work_line_->VerifyRegisterTypeWide(this, inst->VRegC_23x(), reg_types_.DoubleLo(), in CodeFlowVerifyInstruction()
2485 work_line_->SetRegisterType<LockOp::kClear>(this, inst->VRegA_23x(), reg_types_.Integer()); in CodeFlowVerifyInstruction()
2488 if (!work_line_->VerifyRegisterTypeWide(this, inst->VRegB_23x(), reg_types_.LongLo(), in CodeFlowVerifyInstruction()
2492 if (!work_line_->VerifyRegisterTypeWide(this, inst->VRegC_23x(), reg_types_.LongLo(), in CodeFlowVerifyInstruction()
2496 work_line_->SetRegisterType<LockOp::kClear>(this, inst->VRegA_23x(), reg_types_.Integer()); in CodeFlowVerifyInstruction()
2499 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()
2633 (inst->VRegA_21t() == instance_of_inst.VRegA_22c()) && in CodeFlowVerifyInstruction()
2658 if (inst->Opcode() == Instruction::IF_EQZ) { in CodeFlowVerifyInstruction()
2716 const RegType& reg_type = work_line_->GetRegisterType(this, inst->VRegA_21t()); in CodeFlowVerifyInstruction()
2724 VerifyAGet(inst, reg_types_.Boolean(), true); in CodeFlowVerifyInstruction()
2727 VerifyAGet(inst, reg_types_.Byte(), true); in CodeFlowVerifyInstruction()
2730 VerifyAGet(inst, reg_types_.Char(), true); in CodeFlowVerifyInstruction()
2733 VerifyAGet(inst, reg_types_.Short(), true); in CodeFlowVerifyInstruction()
2736 VerifyAGet(inst, reg_types_.Integer(), true); in CodeFlowVerifyInstruction()
2739 VerifyAGet(inst, reg_types_.LongLo(), true); in CodeFlowVerifyInstruction()
2742 VerifyAGet(inst, reg_types_.JavaLangObject(false), false); in CodeFlowVerifyInstruction()
2746 VerifyAPut(inst, reg_types_.Boolean(), true); in CodeFlowVerifyInstruction()
2749 VerifyAPut(inst, reg_types_.Byte(), true); in CodeFlowVerifyInstruction()
2752 VerifyAPut(inst, reg_types_.Char(), true); in CodeFlowVerifyInstruction()
2755 VerifyAPut(inst, reg_types_.Short(), true); in CodeFlowVerifyInstruction()
2758 VerifyAPut(inst, reg_types_.Integer(), true); in CodeFlowVerifyInstruction()
2761 VerifyAPut(inst, reg_types_.LongLo(), true); in CodeFlowVerifyInstruction()
2764 VerifyAPut(inst, reg_types_.JavaLangObject(false), false); in CodeFlowVerifyInstruction()
2769 VerifyISFieldAccess<FieldAccessType::kAccGet>(inst, reg_types_.Boolean(), true, false); in CodeFlowVerifyInstruction()
2773 VerifyISFieldAccess<FieldAccessType::kAccGet>(inst, reg_types_.Byte(), true, false); in CodeFlowVerifyInstruction()
2777 VerifyISFieldAccess<FieldAccessType::kAccGet>(inst, reg_types_.Char(), true, false); in CodeFlowVerifyInstruction()
2781 VerifyISFieldAccess<FieldAccessType::kAccGet>(inst, reg_types_.Short(), true, false); in CodeFlowVerifyInstruction()
2785 VerifyISFieldAccess<FieldAccessType::kAccGet>(inst, reg_types_.Integer(), true, false); in CodeFlowVerifyInstruction()
2789 VerifyISFieldAccess<FieldAccessType::kAccGet>(inst, reg_types_.LongLo(), true, false); in CodeFlowVerifyInstruction()
2793 VerifyISFieldAccess<FieldAccessType::kAccGet>(inst, reg_types_.JavaLangObject(false), false, in CodeFlowVerifyInstruction()
2799 VerifyISFieldAccess<FieldAccessType::kAccPut>(inst, reg_types_.Boolean(), true, false); in CodeFlowVerifyInstruction()
2803 VerifyISFieldAccess<FieldAccessType::kAccPut>(inst, reg_types_.Byte(), true, false); in CodeFlowVerifyInstruction()
2807 VerifyISFieldAccess<FieldAccessType::kAccPut>(inst, reg_types_.Char(), true, false); in CodeFlowVerifyInstruction()
2811 VerifyISFieldAccess<FieldAccessType::kAccPut>(inst, reg_types_.Short(), true, false); in CodeFlowVerifyInstruction()
2815 VerifyISFieldAccess<FieldAccessType::kAccPut>(inst, reg_types_.Integer(), true, false); in CodeFlowVerifyInstruction()
2819 VerifyISFieldAccess<FieldAccessType::kAccPut>(inst, reg_types_.LongLo(), true, false); in CodeFlowVerifyInstruction()
2823 VerifyISFieldAccess<FieldAccessType::kAccPut>(inst, reg_types_.JavaLangObject(false), false, in CodeFlowVerifyInstruction()
2828 VerifyISFieldAccess<FieldAccessType::kAccGet>(inst, reg_types_.Boolean(), true, true); in CodeFlowVerifyInstruction()
2831 VerifyISFieldAccess<FieldAccessType::kAccGet>(inst, reg_types_.Byte(), true, true); in CodeFlowVerifyInstruction()
2834 VerifyISFieldAccess<FieldAccessType::kAccGet>(inst, reg_types_.Char(), true, true); in CodeFlowVerifyInstruction()
2837 VerifyISFieldAccess<FieldAccessType::kAccGet>(inst, reg_types_.Short(), true, true); in CodeFlowVerifyInstruction()
2840 VerifyISFieldAccess<FieldAccessType::kAccGet>(inst, reg_types_.Integer(), true, true); in CodeFlowVerifyInstruction()
2843 VerifyISFieldAccess<FieldAccessType::kAccGet>(inst, reg_types_.LongLo(), true, true); in CodeFlowVerifyInstruction()
2846 VerifyISFieldAccess<FieldAccessType::kAccGet>(inst, reg_types_.JavaLangObject(false), false, in CodeFlowVerifyInstruction()
2851 VerifyISFieldAccess<FieldAccessType::kAccPut>(inst, reg_types_.Boolean(), true, true); in CodeFlowVerifyInstruction()
2854 VerifyISFieldAccess<FieldAccessType::kAccPut>(inst, reg_types_.Byte(), true, true); in CodeFlowVerifyInstruction()
2857 VerifyISFieldAccess<FieldAccessType::kAccPut>(inst, reg_types_.Char(), true, true); in CodeFlowVerifyInstruction()
2860 VerifyISFieldAccess<FieldAccessType::kAccPut>(inst, reg_types_.Short(), true, true); in CodeFlowVerifyInstruction()
2863 VerifyISFieldAccess<FieldAccessType::kAccPut>(inst, reg_types_.Integer(), true, true); in CodeFlowVerifyInstruction()
2866 VerifyISFieldAccess<FieldAccessType::kAccPut>(inst, reg_types_.LongLo(), true, true); in CodeFlowVerifyInstruction()
2869 VerifyISFieldAccess<FieldAccessType::kAccPut>(inst, reg_types_.JavaLangObject(false), false, in CodeFlowVerifyInstruction()
2879 bool is_range = (inst->Opcode() == Instruction::INVOKE_VIRTUAL_RANGE || in CodeFlowVerifyInstruction()
2880 inst->Opcode() == Instruction::INVOKE_SUPER_RANGE || in CodeFlowVerifyInstruction()
2881 inst->Opcode() == Instruction::INVOKE_VIRTUAL_RANGE_QUICK); in CodeFlowVerifyInstruction()
2882 bool is_super = (inst->Opcode() == Instruction::INVOKE_SUPER || in CodeFlowVerifyInstruction()
2883 inst->Opcode() == Instruction::INVOKE_SUPER_RANGE); in CodeFlowVerifyInstruction()
2885 ArtMethod* called_method = VerifyInvocationArgs(inst, type, is_range); in CodeFlowVerifyInstruction()
2901 uint32_t method_idx = GetMethodIdxOfInvoke(inst); in CodeFlowVerifyInstruction()
2918 bool is_range = (inst->Opcode() == Instruction::INVOKE_DIRECT_RANGE); in CodeFlowVerifyInstruction()
2919 ArtMethod* called_method = VerifyInvocationArgs(inst, METHOD_DIRECT, is_range); in CodeFlowVerifyInstruction()
2924 uint32_t method_idx = (is_range) ? inst->VRegB_3rc() : inst->VRegB_35c(); in CodeFlowVerifyInstruction()
2953 const RegType& this_type = work_line_->GetInvocationThis(this, inst); in CodeFlowVerifyInstruction()
2998 bool is_range = (inst->Opcode() == Instruction::INVOKE_STATIC_RANGE); in CodeFlowVerifyInstruction()
2999 ArtMethod* called_method = VerifyInvocationArgs(inst, METHOD_STATIC, is_range); in CodeFlowVerifyInstruction()
3002 uint32_t method_idx = (is_range) ? inst->VRegB_3rc() : inst->VRegB_35c(); in CodeFlowVerifyInstruction()
3021 bool is_range = (inst->Opcode() == Instruction::INVOKE_INTERFACE_RANGE); in CodeFlowVerifyInstruction()
3022 ArtMethod* abs_method = VerifyInvocationArgs(inst, METHOD_INTERFACE, is_range); in CodeFlowVerifyInstruction()
3034 const RegType& this_type = work_line_->GetInvocationThis(this, inst); in CodeFlowVerifyInstruction()
3057 uint32_t method_idx = (is_range) ? inst->VRegB_3rc() : inst->VRegB_35c(); in CodeFlowVerifyInstruction()
3076 bool is_range = (inst->Opcode() == Instruction::INVOKE_POLYMORPHIC_RANGE); in CodeFlowVerifyInstruction()
3077 ArtMethod* called_method = VerifyInvocationArgs(inst, METHOD_POLYMORPHIC, is_range); in CodeFlowVerifyInstruction()
3089 !CheckSignaturePolymorphicReceiver(inst)) { in CodeFlowVerifyInstruction()
3093 const uint32_t proto_idx = (is_range) ? inst->VRegH_4rcc() : inst->VRegH_45cc(); in CodeFlowVerifyInstruction()
3109 bool is_range = (inst->Opcode() == Instruction::INVOKE_CUSTOM_RANGE); in CodeFlowVerifyInstruction()
3112 const uint32_t call_site_idx = is_range ? inst->VRegB_3rc() : inst->VRegB_35c(); in CodeFlowVerifyInstruction()
3128 VerifyInvocationArgsFromIterator(¶m_it, inst, METHOD_STATIC, is_range, nullptr); in CodeFlowVerifyInstruction()
3146 work_line_->CheckUnaryOp(this, inst, reg_types_.Integer(), reg_types_.Integer()); in CodeFlowVerifyInstruction()
3150 work_line_->CheckUnaryOpWide(this, inst, reg_types_.LongLo(), reg_types_.LongHi(), in CodeFlowVerifyInstruction()
3154 work_line_->CheckUnaryOp(this, inst, reg_types_.Float(), reg_types_.Float()); in CodeFlowVerifyInstruction()
3157 work_line_->CheckUnaryOpWide(this, inst, reg_types_.DoubleLo(), reg_types_.DoubleHi(), in CodeFlowVerifyInstruction()
3161 work_line_->CheckUnaryOpToWide(this, inst, reg_types_.LongLo(), reg_types_.LongHi(), in CodeFlowVerifyInstruction()
3165 work_line_->CheckUnaryOp(this, inst, reg_types_.Float(), reg_types_.Integer()); in CodeFlowVerifyInstruction()
3168 work_line_->CheckUnaryOpToWide(this, inst, reg_types_.DoubleLo(), reg_types_.DoubleHi(), in CodeFlowVerifyInstruction()
3172 work_line_->CheckUnaryOpFromWide(this, inst, reg_types_.Integer(), in CodeFlowVerifyInstruction()
3176 work_line_->CheckUnaryOpFromWide(this, inst, reg_types_.Float(), in CodeFlowVerifyInstruction()
3180 work_line_->CheckUnaryOpWide(this, inst, reg_types_.DoubleLo(), reg_types_.DoubleHi(), in CodeFlowVerifyInstruction()
3184 work_line_->CheckUnaryOp(this, inst, reg_types_.Integer(), reg_types_.Float()); in CodeFlowVerifyInstruction()
3187 work_line_->CheckUnaryOpToWide(this, inst, reg_types_.LongLo(), reg_types_.LongHi(), in CodeFlowVerifyInstruction()
3191 work_line_->CheckUnaryOpToWide(this, inst, reg_types_.DoubleLo(), reg_types_.DoubleHi(), in CodeFlowVerifyInstruction()
3195 work_line_->CheckUnaryOpFromWide(this, inst, reg_types_.Integer(), in CodeFlowVerifyInstruction()
3199 work_line_->CheckUnaryOpWide(this, inst, reg_types_.LongLo(), reg_types_.LongHi(), in CodeFlowVerifyInstruction()
3203 work_line_->CheckUnaryOpFromWide(this, inst, reg_types_.Float(), in CodeFlowVerifyInstruction()
3207 work_line_->CheckUnaryOp(this, inst, reg_types_.Byte(), reg_types_.Integer()); in CodeFlowVerifyInstruction()
3210 work_line_->CheckUnaryOp(this, inst, reg_types_.Char(), reg_types_.Integer()); in CodeFlowVerifyInstruction()
3213 work_line_->CheckUnaryOp(this, inst, reg_types_.Short(), reg_types_.Integer()); in CodeFlowVerifyInstruction()
3224 work_line_->CheckBinaryOp(this, inst, reg_types_.Integer(), reg_types_.Integer(), in CodeFlowVerifyInstruction()
3230 work_line_->CheckBinaryOp(this, inst, reg_types_.Integer(), reg_types_.Integer(), in CodeFlowVerifyInstruction()
3241 work_line_->CheckBinaryOpWide(this, inst, reg_types_.LongLo(), reg_types_.LongHi(), in CodeFlowVerifyInstruction()
3249 work_line_->CheckBinaryOpWideShift(this, inst, reg_types_.LongLo(), reg_types_.LongHi(), in CodeFlowVerifyInstruction()
3257 work_line_->CheckBinaryOp(this, inst, reg_types_.Float(), reg_types_.Float(), in CodeFlowVerifyInstruction()
3265 work_line_->CheckBinaryOpWide(this, inst, reg_types_.DoubleLo(), reg_types_.DoubleHi(), in CodeFlowVerifyInstruction()
3276 work_line_->CheckBinaryOp2addr(this, inst, reg_types_.Integer(), reg_types_.Integer(), in CodeFlowVerifyInstruction()
3282 work_line_->CheckBinaryOp2addr(this, inst, reg_types_.Integer(), reg_types_.Integer(), in CodeFlowVerifyInstruction()
3286 work_line_->CheckBinaryOp2addr(this, inst, reg_types_.Integer(), reg_types_.Integer(), in CodeFlowVerifyInstruction()
3297 work_line_->CheckBinaryOp2addrWide(this, inst, reg_types_.LongLo(), reg_types_.LongHi(), in CodeFlowVerifyInstruction()
3304 work_line_->CheckBinaryOp2addrWideShift(this, inst, reg_types_.LongLo(), reg_types_.LongHi(), in CodeFlowVerifyInstruction()
3312 work_line_->CheckBinaryOp2addr(this, inst, reg_types_.Float(), reg_types_.Float(), in CodeFlowVerifyInstruction()
3320 work_line_->CheckBinaryOp2addrWide(this, inst, reg_types_.DoubleLo(), reg_types_.DoubleHi(), in CodeFlowVerifyInstruction()
3329 work_line_->CheckLiteralOp(this, inst, reg_types_.Integer(), reg_types_.Integer(), false, in CodeFlowVerifyInstruction()
3335 work_line_->CheckLiteralOp(this, inst, reg_types_.Integer(), reg_types_.Integer(), true, in CodeFlowVerifyInstruction()
3346 work_line_->CheckLiteralOp(this, inst, reg_types_.Integer(), reg_types_.Integer(), false, in CodeFlowVerifyInstruction()
3352 work_line_->CheckLiteralOp(this, inst, reg_types_.Integer(), reg_types_.Integer(), true, in CodeFlowVerifyInstruction()
3394 Fail(VERIFY_ERROR_BAD_CLASS_HARD) << "Unexpected opcode " << inst->DumpString(dex_file_); in CodeFlowVerifyInstruction()
3418 info_messages_ << "Rejecting opcode " << inst->DumpString(dex_file_); in CodeFlowVerifyInstruction()
3563 if (inst->Opcode() != Instruction::MONITOR_ENTER || work_line_->MonitorStackDepth() != 1) { in CodeFlowVerifyInstruction()
3577 DCHECK_EQ(&code_item_accessor_.InstructionAt(work_insn_idx_), inst); in CodeFlowVerifyInstruction()
3578 uint32_t next_insn_idx = work_insn_idx_ + inst->SizeInCodeUnits(); in CodeFlowVerifyInstruction()
3626 DCHECK_EQ(&code_item_accessor_.InstructionAt(work_insn_idx_), inst); in CodeFlowVerifyInstruction()
3627 *start_guess = work_insn_idx_ + inst->SizeInCodeUnits(); in CodeFlowVerifyInstruction()
3911 T* it, const Instruction* inst, MethodType method_type, bool is_range, ArtMethod* res_method) { in VerifyInvocationArgsFromIterator() argument
3915 const size_t expected_args = inst->VRegA(); in VerifyInvocationArgsFromIterator()
3932 const RegType& actual_arg_type = work_line_->GetInvocationThis(this, inst); in VerifyInvocationArgsFromIterator()
3946 const uint32_t method_idx = GetMethodIdxOfInvoke(inst); in VerifyInvocationArgsFromIterator()
3968 const uint32_t method_idx = GetMethodIdxOfInvoke(inst); in VerifyInvocationArgsFromIterator()
3992 inst->GetVarArgs(arg); in VerifyInvocationArgsFromIterator()
3997 Fail(VERIFY_ERROR_BAD_CLASS_HARD) << "Rejecting invocation, expected " << inst->VRegA() << in VerifyInvocationArgsFromIterator()
4011 uint32_t get_reg = is_range ? inst->VRegC() + static_cast<uint32_t>(sig_registers) : in VerifyInvocationArgsFromIterator()
4053 void MethodVerifier::VerifyInvocationArgsUnresolvedMethod(const Instruction* inst, in VerifyInvocationArgsUnresolvedMethod() argument
4059 const uint32_t method_idx = GetMethodIdxOfInvoke(inst); in VerifyInvocationArgsUnresolvedMethod()
4062 VerifyInvocationArgsFromIterator(&it, inst, method_type, is_range, nullptr); in VerifyInvocationArgsUnresolvedMethod()
4211 const Instruction* inst, MethodType method_type, bool is_range) { in VerifyInvocationArgs() argument
4214 const uint32_t method_idx = GetMethodIdxOfInvoke(inst); in VerifyInvocationArgs()
4219 VerifyInvocationArgsUnresolvedMethod(inst, method_type, is_range); in VerifyInvocationArgs()
4279 DexFileParameterIterator it(*dex_file_, dex_file_->GetProtoId(inst->VRegH())); in VerifyInvocationArgs()
4280 return VerifyInvocationArgsFromIterator(&it, inst, method_type, is_range, res_method); in VerifyInvocationArgs()
4284 return VerifyInvocationArgsFromIterator(&it, inst, method_type, is_range, res_method); in VerifyInvocationArgs()
4337 bool MethodVerifier::CheckSignaturePolymorphicReceiver(const Instruction* inst) { in CheckSignaturePolymorphicReceiver() argument
4338 const RegType& this_type = work_line_->GetInvocationThis(this, inst); in CheckSignaturePolymorphicReceiver()
4367 uint16_t MethodVerifier::GetMethodIdxOfInvoke(const Instruction* inst) { in GetMethodIdxOfInvoke() argument
4368 switch (inst->Opcode()) { in GetMethodIdxOfInvoke()
4379 return inst->VRegB(); in GetMethodIdxOfInvoke()
4384 uint16_t MethodVerifier::GetFieldIdxOfFieldAccess(const Instruction* inst, bool is_static) { in GetFieldIdxOfFieldAccess() argument
4386 return inst->VRegB_21c(); in GetFieldIdxOfFieldAccess()
4387 } else if (inst->IsQuickened()) { in GetFieldIdxOfFieldAccess()
4394 return inst->VRegC_22c(); in GetFieldIdxOfFieldAccess()
4398 void MethodVerifier::VerifyNewArray(const Instruction* inst, bool is_filled, bool is_range) { in VerifyNewArray() argument
4401 DCHECK_EQ(inst->Opcode(), Instruction::NEW_ARRAY); in VerifyNewArray()
4402 type_idx = dex::TypeIndex(inst->VRegC_22c()); in VerifyNewArray()
4404 DCHECK_EQ(inst->Opcode(), Instruction::FILLED_NEW_ARRAY); in VerifyNewArray()
4405 type_idx = dex::TypeIndex(inst->VRegB_35c()); in VerifyNewArray()
4407 DCHECK_EQ(inst->Opcode(), Instruction::FILLED_NEW_ARRAY_RANGE); in VerifyNewArray()
4408 type_idx = dex::TypeIndex(inst->VRegB_3rc()); in VerifyNewArray()
4419 work_line_->VerifyRegisterType(this, inst->VRegB_22c(), reg_types_.Integer()); in VerifyNewArray()
4422 work_line_->SetRegisterType<LockOp::kClear>(this, inst->VRegA_22c(), precise_type); in VerifyNewArray()
4428 uint32_t arg_count = (is_range) ? inst->VRegA_3rc() : inst->VRegA_35c(); in VerifyNewArray()
4431 inst->GetVarArgs(arg); in VerifyNewArray()
4434 uint32_t get_reg = is_range ? inst->VRegC_3rc() + ui : arg[ui]; in VerifyNewArray()
4447 void MethodVerifier::VerifyAGet(const Instruction* inst, in VerifyAGet() argument
4449 const RegType& index_type = work_line_->GetRegisterType(this, inst->VRegC_23x()); in VerifyAGet()
4453 const RegType& array_type = work_line_->GetRegisterType(this, inst->VRegB_23x()); in VerifyAGet()
4458 work_line_->SetRegisterType<LockOp::kClear>(this, inst->VRegA_23x(), reg_types_.Null()); in VerifyAGet()
4463 this, inst->VRegA_23x(), DetermineCat1Constant(1, need_precise_constants_)); in VerifyAGet()
4467 work_line_->SetRegisterType<LockOp::kClear>(this, inst->VRegA_23x(), insn_type); in VerifyAGet()
4470 work_line_->SetRegisterTypeWide(this, inst->VRegA_23x(), in VerifyAGet()
4486 inst->VRegA_23x(), in VerifyAGet()
4508 work_line_->SetRegisterType<LockOp::kClear>(this, inst->VRegA_23x(), component_type); in VerifyAGet()
4510 work_line_->SetRegisterTypeWide(this, inst->VRegA_23x(), component_type, in VerifyAGet()
4569 void MethodVerifier::VerifyAPut(const Instruction* inst, in VerifyAPut() argument
4571 const RegType& index_type = work_line_->GetRegisterType(this, inst->VRegC_23x()); in VerifyAPut()
4575 const RegType& array_type = work_line_->GetRegisterType(this, inst->VRegB_23x()); in VerifyAPut()
4585 const RegType& value_type = work_line_->GetRegisterType(this, inst->VRegA_23x()); in VerifyAPut()
4596 work_line_->VerifyRegisterType(this, inst->VRegA_23x(), *modified_reg_type); in VerifyAPut()
4610 const uint32_t vregA = inst->VRegA_23x(); in VerifyAPut()
4762 void MethodVerifier::VerifyISFieldAccess(const Instruction* inst, const RegType& insn_type, in VerifyISFieldAccess() argument
4764 uint32_t field_idx = GetFieldIdxOfFieldAccess(inst, is_static); in VerifyISFieldAccess()
4769 const RegType& object_type = work_line_->GetRegisterType(this, inst->VRegB_22c()); in VerifyISFieldAccess()
4851 const uint32_t vregA = (is_static) ? inst->VRegA_21c() : inst->VRegA_22c(); in VerifyISFieldAccess()