Lines Matching refs:instruction

61   explicit NullCheckSlowPathARM(HNullCheck* instruction) : instruction_(instruction) {}
77 explicit DivZeroCheckSlowPathARM(HDivZeroCheck* instruction) : instruction_(instruction) {}
93 SuspendCheckSlowPathARM(HSuspendCheck* instruction, HBasicBlock* successor)
94 : instruction_(instruction), successor_(successor) {}
132 BoundsCheckSlowPathARM(HBoundsCheck* instruction,
135 : instruction_(instruction),
202 // The instruction where this slow path is happening.
217 explicit LoadStringSlowPathARM(HLoadString* instruction) : instruction_(instruction) {}
245 TypeCheckSlowPathARM(HInstruction* instruction,
249 : instruction_(instruction),
298 explicit DeoptimizationSlowPathARM(HInstruction* instruction)
299 : instruction_(instruction) {}
499 // instruction to restore just the PC, so this actually helps both baseline
803 void CodeGeneratorARM::Move(HInstruction* instruction, Location location, HInstruction* move_for) {
804 LocationSummary* locations = instruction->GetLocations();
834 } else if (instruction->IsLoadLocal()) {
835 uint32_t stack_slot = GetStackSlot(instruction->AsLoadLocal()->GetLocal());
836 switch (instruction->GetType()) {
853 LOG(FATAL) << "Unexpected type " << instruction->GetType();
855 } else if (instruction->IsTemporary()) {
856 Location temp_location = GetTemporaryLocation(instruction->AsTemporary());
864 DCHECK((instruction->GetNext() == move_for) || instruction->GetNext()->IsTemporary());
865 switch (instruction->GetType()) {
882 LOG(FATAL) << "Unexpected type " << instruction->GetType();
888 HInstruction* instruction,
893 RecordPcInfo(instruction, dex_pc, slow_path);
894 DCHECK(instruction->IsSuspendCheck()
895 || instruction->IsBoundsCheck()
896 || instruction->IsNullCheck()
897 || instruction->IsDivZeroCheck()
898 || instruction->GetLocations()->CanCall()
936 void InstructionCodeGeneratorARM::GenerateTestAndBranch(HInstruction* instruction,
940 HInstruction* cond = instruction->InputAt(0);
955 DCHECK(instruction->GetLocations()->InAt(0).IsRegister());
956 __ cmp(instruction->GetLocations()->InAt(0).AsRegister<Register>(),
1422 // instruction here, as it does not exist in the Thumb-2
1423 // instruction set. We use the following approach
1478 // Processing a Dex `int-to-byte' instruction.
1496 // Processing a Dex `int-to-short' instruction.
1510 // Processing a Dex `long-to-int' instruction.
1516 // Processing a Dex `float-to-int' instruction.
1523 // Processing a Dex `double-to-int' instruction.
1543 // Processing a Dex `int-to-long' instruction.
1549 // Processing a Dex `float-to-long' instruction.
1558 // Processing a Dex `double-to-long' instruction.
1580 // Processing a Dex `int-to-char' instruction.
1599 // Processing a Dex `int-to-float' instruction.
1605 // Processing a Dex `long-to-float' instruction.
1615 // Processing a Dex `double-to-float' instruction.
1634 // Processing a Dex `int-to-double' instruction.
1640 // Processing a Dex `long-to-double' instruction.
1649 // Processing a Dex `float-to-double' instruction.
1681 // Processing a Dex `int-to-byte' instruction.
1698 // Processing a Dex `int-to-short' instruction.
1711 // Processing a Dex `long-to-int' instruction.
1726 // Processing a Dex `float-to-int' instruction.
1735 // Processing a Dex `double-to-int' instruction.
1758 // Processing a Dex `int-to-long' instruction.
1769 // Processing a Dex `float-to-long' instruction.
1777 // Processing a Dex `double-to-long' instruction.
1797 // Processing a Dex `int-to-char' instruction.
1815 // Processing a Dex `int-to-float' instruction.
1822 // Processing a Dex `long-to-float' instruction.
1844 // this instruction only transfers 8 significant bits of its
1864 // Processing a Dex `double-to-float' instruction.
1883 // Processing a Dex `int-to-double' instruction.
1891 // Processing a Dex `long-to-double' instruction.
1906 // this instruction only transfers 8 significant bits of its
1923 // Processing a Dex `float-to-double' instruction.
2296 // Have hardware divide instruction for int, do it with three instructions.
2403 void LocationsBuilderARM::VisitDivZeroCheck(HDivZeroCheck* instruction) {
2405 new (GetGraph()->GetArena()) LocationSummary(instruction, LocationSummary::kNoCall);
2406 locations->SetInAt(0, Location::RegisterOrConstant(instruction->InputAt(0)));
2407 if (instruction->HasUses()) {
2412 void InstructionCodeGeneratorARM::VisitDivZeroCheck(HDivZeroCheck* instruction) {
2413 SlowPathCodeARM* slow_path = new (GetGraph()->GetArena()) DivZeroCheckSlowPathARM(instruction);
2416 LocationSummary* locations = instruction->GetLocations();
2419 switch (instruction->GetType()) {
2446 LOG(FATAL) << "Unexpected type for HDivZeroCheck " << instruction->GetType();
2599 void LocationsBuilderARM::VisitNewInstance(HNewInstance* instruction) {
2601 new (GetGraph()->GetArena()) LocationSummary(instruction, LocationSummary::kCall);
2608 void InstructionCodeGeneratorARM::VisitNewInstance(HNewInstance* instruction) {
2611 __ LoadImmediate(calling_convention.GetRegisterAt(0), instruction->GetTypeIndex());
2612 codegen_->InvokeRuntime(GetThreadOffset<kArmWordSize>(instruction->GetEntrypoint()).Int32Value(),
2613 instruction,
2614 instruction->GetDexPc(),
2618 void LocationsBuilderARM::VisitNewArray(HNewArray* instruction) {
2620 new (GetGraph()->GetArena()) LocationSummary(instruction, LocationSummary::kCall);
2628 void InstructionCodeGeneratorARM::VisitNewArray(HNewArray* instruction) {
2631 __ LoadImmediate(calling_convention.GetRegisterAt(0), instruction->GetTypeIndex());
2632 codegen_->InvokeRuntime(GetThreadOffset<kArmWordSize>(instruction->GetEntrypoint()).Int32Value(),
2633 instruction,
2634 instruction->GetDexPc(),
2638 void LocationsBuilderARM::VisitParameterValue(HParameterValue* instruction) {
2640 new (GetGraph()->GetArena()) LocationSummary(instruction, LocationSummary::kNoCall);
2641 Location location = parameter_visitor_.GetNextLocation(instruction->GetType());
2650 void InstructionCodeGeneratorARM::VisitParameterValue(HParameterValue* instruction) {
2652 UNUSED(instruction);
2769 void LocationsBuilderARM::VisitPhi(HPhi* instruction) {
2771 new (GetGraph()->GetArena()) LocationSummary(instruction, LocationSummary::kNoCall);
2772 for (size_t i = 0, e = instruction->InputCount(); i < e; ++i) {
2778 void InstructionCodeGeneratorARM::VisitPhi(HPhi* instruction) {
2779 UNUSED(instruction);
2821 HInstruction* instruction) {
2829 // We need a load followed by store. (The address used in a STREX instruction must
2830 // be the same as the address in the most recently executed LDREX instruction.)
2832 codegen_->MaybeRecordImplicitNullCheck(instruction);
2838 void LocationsBuilderARM::HandleFieldSet(HInstruction* instruction, const FieldInfo& field_info) {
2839 DCHECK(instruction->IsInstanceFieldSet() || instruction->IsStaticFieldSet());
2842 new (GetGraph()->GetArena()) LocationSummary(instruction, LocationSummary::kNoCall);
2858 if (CodeGenerator::StoreNeedsWriteBarrier(field_type, instruction->InputAt(1))) {
2879 void InstructionCodeGeneratorARM::HandleFieldSet(HInstruction* instruction,
2881 DCHECK(instruction->IsInstanceFieldSet() || instruction->IsStaticFieldSet());
2883 LocationSummary* locations = instruction->GetLocations();
2922 instruction);
2925 codegen_->MaybeRecordImplicitNullCheck(instruction);
2948 instruction);
2951 codegen_->MaybeRecordImplicitNullCheck(instruction);
2963 codegen_->MaybeRecordImplicitNullCheck(instruction);
2966 if (CodeGenerator::StoreNeedsWriteBarrier(field_type, instruction->InputAt(1))) {
2977 void LocationsBuilderARM::HandleFieldGet(HInstruction* instruction, const FieldInfo& field_info) {
2978 DCHECK(instruction->IsInstanceFieldGet() || instruction->IsStaticFieldGet());
2980 new (GetGraph()->GetArena()) LocationSummary(instruction, LocationSummary::kNoCall);
2988 if (Primitive::IsFloatingPointType(instruction->GetType())) {
3006 void InstructionCodeGeneratorARM::HandleFieldGet(HInstruction* instruction,
3008 DCHECK(instruction->IsInstanceFieldGet() || instruction->IsStaticFieldGet());
3010 LocationSummary* locations = instruction->GetLocations();
3067 codegen_->MaybeRecordImplicitNullCheck(instruction);
3071 codegen_->MaybeRecordImplicitNullCheck(instruction);
3083 codegen_->MaybeRecordImplicitNullCheck(instruction);
3091 void LocationsBuilderARM::VisitInstanceFieldSet(HInstanceFieldSet* instruction) {
3092 HandleFieldSet(instruction, instruction->GetFieldInfo());
3095 void InstructionCodeGeneratorARM::VisitInstanceFieldSet(HInstanceFieldSet* instruction) {
3096 HandleFieldSet(instruction, instruction->GetFieldInfo());
3099 void LocationsBuilderARM::VisitInstanceFieldGet(HInstanceFieldGet* instruction) {
3100 HandleFieldGet(instruction, instruction->GetFieldInfo());
3103 void InstructionCodeGeneratorARM::VisitInstanceFieldGet(HInstanceFieldGet* instruction) {
3104 HandleFieldGet(instruction, instruction->GetFieldInfo());
3107 void LocationsBuilderARM::VisitStaticFieldGet(HStaticFieldGet* instruction) {
3108 HandleFieldGet(instruction, instruction->GetFieldInfo());
3111 void InstructionCodeGeneratorARM::VisitStaticFieldGet(HStaticFieldGet* instruction) {
3112 HandleFieldGet(instruction, instruction->GetFieldInfo());
3115 void LocationsBuilderARM::VisitStaticFieldSet(HStaticFieldSet* instruction) {
3116 HandleFieldSet(instruction, instruction->GetFieldInfo());
3119 void InstructionCodeGeneratorARM::VisitStaticFieldSet(HStaticFieldSet* instruction) {
3120 HandleFieldSet(instruction, instruction->GetFieldInfo());
3123 void LocationsBuilderARM::VisitNullCheck(HNullCheck* instruction) {
3125 new (GetGraph()->GetArena()) LocationSummary(instruction, LocationSummary::kNoCall);
3127 if (instruction->HasUses()) {
3132 void InstructionCodeGeneratorARM::GenerateImplicitNullCheck(HNullCheck* instruction) {
3133 if (codegen_->CanMoveNullCheckToUser(instruction)) {
3136 Location obj = instruction->GetLocations()->InAt(0);
3139 codegen_->RecordPcInfo(instruction, instruction->GetDexPc());
3142 void InstructionCodeGeneratorARM::GenerateExplicitNullCheck(HNullCheck* instruction) {
3143 SlowPathCodeARM* slow_path = new (GetGraph()->GetArena()) NullCheckSlowPathARM(instruction);
3146 LocationSummary* locations = instruction->GetLocations();
3153 void InstructionCodeGeneratorARM::VisitNullCheck(HNullCheck* instruction) {
3155 GenerateImplicitNullCheck(instruction);
3157 GenerateExplicitNullCheck(instruction);
3161 void LocationsBuilderARM::VisitArrayGet(HArrayGet* instruction) {
3163 new (GetGraph()->GetArena()) LocationSummary(instruction, LocationSummary::kNoCall);
3165 locations->SetInAt(1, Location::RegisterOrConstant(instruction->InputAt(1)));
3166 if (Primitive::IsFloatingPointType(instruction->GetType())) {
3173 void InstructionCodeGeneratorARM::VisitArrayGet(HArrayGet* instruction) {
3174 LocationSummary* locations = instruction->GetLocations();
3178 switch (instruction->GetType()) {
3294 LOG(FATAL) << "Unreachable type " << instruction->GetType();
3297 codegen_->MaybeRecordImplicitNullCheck(instruction);
3300 void LocationsBuilderARM::VisitArraySet(HArraySet* instruction) {
3301 Primitive::Type value_type = instruction->GetComponentType();
3304 CodeGenerator::StoreNeedsWriteBarrier(value_type, instruction->GetValue());
3305 bool needs_runtime_call = instruction->NeedsTypeCheck();
3308 instruction, needs_runtime_call ? LocationSummary::kCall : LocationSummary::kNoCall);
3316 locations->SetInAt(1, Location::RegisterOrConstant(instruction->InputAt(1)));
3331 void InstructionCodeGeneratorARM::VisitArraySet(HArraySet* instruction) {
3332 LocationSummary* locations = instruction->GetLocations();
3335 Primitive::Type value_type = instruction->GetComponentType();
3338 CodeGenerator::StoreNeedsWriteBarrier(value_type, instruction->GetValue());
3385 codegen_->MaybeRecordImplicitNullCheck(instruction);
3395 instruction,
3396 instruction->GetDexPc(),
3452 codegen_->MaybeRecordImplicitNullCheck(instruction);
3456 void LocationsBuilderARM::VisitArrayLength(HArrayLength* instruction) {
3458 new (GetGraph()->GetArena()) LocationSummary(instruction, LocationSummary::kNoCall);
3463 void InstructionCodeGeneratorARM::VisitArrayLength(HArrayLength* instruction) {
3464 LocationSummary* locations = instruction->GetLocations();
3469 codegen_->MaybeRecordImplicitNullCheck(instruction);
3472 void LocationsBuilderARM::VisitBoundsCheck(HBoundsCheck* instruction) {
3474 new (GetGraph()->GetArena()) LocationSummary(instruction, LocationSummary::kNoCall);
3477 if (instruction->HasUses()) {
3482 void InstructionCodeGeneratorARM::VisitBoundsCheck(HBoundsCheck* instruction) {
3483 LocationSummary* locations = instruction->GetLocations();
3485 instruction, locations->InAt(0), locations->InAt(1));
3513 void LocationsBuilderARM::VisitParallelMove(HParallelMove* instruction) {
3514 UNUSED(instruction);
3518 void InstructionCodeGeneratorARM::VisitParallelMove(HParallelMove* instruction) {
3519 codegen_->GetMoveResolver()->EmitNativeCode(instruction);
3522 void LocationsBuilderARM::VisitSuspendCheck(HSuspendCheck* instruction) {
3523 new (GetGraph()->GetArena()) LocationSummary(instruction, LocationSummary::kCallOnSlowPath);
3526 void InstructionCodeGeneratorARM::VisitSuspendCheck(HSuspendCheck* instruction) {
3527 HBasicBlock* block = instruction->GetBlock();
3529 DCHECK(block->GetLoopInformation()->GetSuspendCheck() == instruction);
3533 if (block->IsEntryBlock() && instruction->GetNext()->IsGoto()) {
3537 GenerateSuspendCheck(instruction, nullptr);
3540 void InstructionCodeGeneratorARM::GenerateSuspendCheck(HSuspendCheck* instruction,
3543 down_cast<SuspendCheckSlowPathARM*>(instruction->GetSlowPath());
3545 slow_path = new (GetGraph()->GetArena()) SuspendCheckSlowPathARM(instruction, successor);
3546 instruction->SetSlowPath(slow_path);
3550 codegen_->ClearSpillSlotsFromLoopPhisInStackMap(instruction);
3885 void LocationsBuilderARM::VisitThrow(HThrow* instruction) {
3887 new (GetGraph()->GetArena()) LocationSummary(instruction, LocationSummary::kCall);
3892 void InstructionCodeGeneratorARM::VisitThrow(HThrow* instruction) {
3894 QUICK_ENTRY_POINT(pDeliverException), instruction, instruction->GetDexPc(), nullptr);
3897 void LocationsBuilderARM::VisitInstanceOf(HInstanceOf* instruction) {
3898 LocationSummary::CallKind call_kind = instruction->IsClassFinal()
3901 LocationSummary* locations = new (GetGraph()->GetArena()) LocationSummary(instruction, call_kind);
3908 void InstructionCodeGeneratorARM::VisitInstanceOf(HInstanceOf* instruction) {
3909 LocationSummary* locations = instruction->GetLocations();
3919 if (instruction->MustDoNullCheck()) {
3926 if (instruction->IsClassFinal()) {
3935 instruction, locations->InAt(1), locations->Out(), instruction->GetDexPc());
3942 if (instruction->MustDoNullCheck() || instruction->IsClassFinal()) {
3953 void LocationsBuilderARM::VisitCheckCast(HCheckCast* instruction) {
3955 instruction, LocationSummary::kCallOnSlowPath);
3961 void InstructionCodeGeneratorARM::VisitCheckCast(HCheckCast* instruction) {
3962 LocationSummary* locations = instruction->GetLocations();
3969 instruction, locations->InAt(1), locations->GetTemp(0), instruction->GetDexPc());
3973 if (instruction->MustDoNullCheck()) {
3984 void LocationsBuilderARM::VisitMonitorOperation(HMonitorOperation* instruction) {
3986 new (GetGraph()->GetArena()) LocationSummary(instruction, LocationSummary::kCall);
3991 void InstructionCodeGeneratorARM::VisitMonitorOperation(HMonitorOperation* instruction) {
3992 codegen_->InvokeRuntime(instruction->IsEnter()
3994 instruction,
3995 instruction->GetDexPc(),
3999 void LocationsBuilderARM::VisitAnd(HAnd* instruction) { HandleBitwiseOperation(instruction); }
4000 void LocationsBuilderARM::VisitOr(HOr* instruction) { HandleBitwiseOperation(instruction); }
4001 void LocationsBuilderARM::VisitXor(HXor* instruction) { HandleBitwiseOperation(instruction); }
4003 void LocationsBuilderARM::HandleBitwiseOperation(HBinaryOperation* instruction) {
4005 new (GetGraph()->GetArena()) LocationSummary(instruction, LocationSummary::kNoCall);
4006 DCHECK(instruction->GetResultType() == Primitive::kPrimInt
4007 || instruction->GetResultType() == Primitive::kPrimLong);
4013 void InstructionCodeGeneratorARM::VisitAnd(HAnd* instruction) {
4014 HandleBitwiseOperation(instruction);
4017 void InstructionCodeGeneratorARM::VisitOr(HOr* instruction) {
4018 HandleBitwiseOperation(instruction);
4021 void InstructionCodeGeneratorARM::VisitXor(HXor* instruction) {
4022 HandleBitwiseOperation(instruction);
4025 void InstructionCodeGeneratorARM::HandleBitwiseOperation(HBinaryOperation* instruction) {
4026 LocationSummary* locations = instruction->GetLocations();
4028 if (instruction->GetResultType() == Primitive::kPrimInt) {
4032 if (instruction->IsAnd()) {
4034 } else if (instruction->IsOr()) {
4037 DCHECK(instruction->IsXor());
4041 DCHECK_EQ(instruction->GetResultType(), Primitive::kPrimLong);
4045 if (instruction->IsAnd()) {
4052 } else if (instruction->IsOr()) {
4060 DCHECK(instruction->IsXor());
4113 void LocationsBuilderARM::VisitBoundType(HBoundType* instruction) {
4115 UNUSED(instruction);
4119 void InstructionCodeGeneratorARM::VisitBoundType(HBoundType* instruction) {
4121 UNUSED(instruction);