Lines Matching refs:instruction

99   // There is no dex instruction or HIR that would need the missing conditions
164 // If the offset does not fit in the instruction's immediate field, use an alternate register
222 explicit BoundsCheckSlowPathARM64(HBoundsCheck* instruction) : SlowPathCodeARM64(instruction) {}
254 explicit DivZeroCheckSlowPathARM64(HDivZeroCheck* instruction) : SlowPathCodeARM64(instruction) {}
322 // The instruction where this slow path is happening.
337 explicit LoadStringSlowPathARM64(HLoadString* instruction) : SlowPathCodeARM64(instruction) {}
392 SuspendCheckSlowPathARM64(HSuspendCheck* instruction, HBasicBlock* successor)
393 : SlowPathCodeARM64(instruction), successor_(successor) {}
433 TypeCheckSlowPathARM64(HInstruction* instruction, bool is_fatal)
434 : SlowPathCodeARM64(instruction), is_fatal_(is_fatal) {}
490 explicit DeoptimizationSlowPathARM64(HDeoptimize* instruction)
491 : SlowPathCodeARM64(instruction) {}
512 explicit ArraySetSlowPathARM64(HInstruction* instruction) : SlowPathCodeARM64(instruction) {}
579 ReadBarrierMarkSlowPathARM64(HInstruction* instruction, Location out, Location obj)
580 : SlowPathCodeARM64(instruction), out_(out), obj_(obj) {
598 << "Unexpected instruction in read barrier marking slow path: "
628 ReadBarrierForHeapReferenceSlowPathARM64(HInstruction* instruction,
634 : SlowPathCodeARM64(instruction),
646 // codegen_->GenerateReadBarrierSlow(instruction, out_loc, out_loc, out_loc, offset);
663 << "Unexpected instruction in read barrier for heap reference slow path: "
666 // HArm64IntermediateAddress instruction yet.
810 ReadBarrierForRootSlowPathARM64(HInstruction* instruction, Location out, Location root)
811 : SlowPathCodeARM64(instruction), out_(out), root_(root) {
821 << "Unexpected instruction in read barrier for GC root slow path: "
1316 void CodeGeneratorARM64::LoadAcquire(HInstruction* instruction,
1324 Primitive::Type type = instruction->GetType();
1336 MaybeRecordImplicitNullCheck(instruction);
1342 MaybeRecordImplicitNullCheck(instruction);
1349 MaybeRecordImplicitNullCheck(instruction);
1355 MaybeRecordImplicitNullCheck(instruction);
1365 MaybeRecordImplicitNullCheck(instruction);
1376 MaybeRecordImplicitNullCheck(instruction);
1455 HInstruction* instruction,
1459 instruction,
1465 HInstruction* instruction,
1468 ValidateInvokeRuntime(instruction, slow_path);
1472 RecordPcInfo(instruction, dex_pc, slow_path);
1513 void InstructionCodeGeneratorARM64::GenerateSuspendCheck(HSuspendCheck* instruction,
1516 down_cast<SuspendCheckSlowPathARM64*>(instruction->GetSlowPath());
1518 slow_path = new (GetGraph()->GetArena()) SuspendCheckSlowPathARM64(instruction, successor);
1519 instruction->SetSlowPath(slow_path);
1523 codegen_->ClearSpillSlotsFromLoopPhisInStackMap(instruction);
1600 void LocationsBuilderARM64::HandleFieldGet(HInstruction* instruction) {
1601 DCHECK(instruction->IsInstanceFieldGet() || instruction->IsStaticFieldGet());
1604 kEmitCompilerReadBarrier && (instruction->GetType() == Primitive::kPrimNot);
1606 new (GetGraph()->GetArena()) LocationSummary(instruction,
1611 if (Primitive::IsFloatingPointType(instruction->GetType())) {
1623 void InstructionCodeGeneratorARM64::HandleFieldGet(HInstruction* instruction,
1625 DCHECK(instruction->IsInstanceFieldGet() || instruction->IsStaticFieldGet());
1626 LocationSummary* locations = instruction->GetLocations();
1632 MemOperand field = HeapOperand(InputRegisterAt(instruction, 0), field_info.GetFieldOffset());
1644 instruction,
1658 instruction, OutputCPURegister(instruction), field, /* needs_null_check */ true);
1660 codegen_->Load(field_type, OutputCPURegister(instruction), field);
1661 codegen_->MaybeRecordImplicitNullCheck(instruction);
1667 codegen_->MaybeGenerateReadBarrierSlow(instruction, out, out, base_loc, offset);
1672 void LocationsBuilderARM64::HandleFieldSet(HInstruction* instruction) {
1674 new (GetGraph()->GetArena()) LocationSummary(instruction, LocationSummary::kNoCall);
1676 if (Primitive::IsFloatingPointType(instruction->InputAt(1)->GetType())) {
1683 void InstructionCodeGeneratorARM64::HandleFieldSet(HInstruction* instruction,
1686 DCHECK(instruction->IsInstanceFieldSet() || instruction->IsStaticFieldSet());
1689 Register obj = InputRegisterAt(instruction, 0);
1690 CPURegister value = InputCPURegisterAt(instruction, 1);
1710 codegen_->MaybeRecordImplicitNullCheck(instruction);
1713 codegen_->MaybeRecordImplicitNullCheck(instruction);
1717 if (CodeGenerator::StoreNeedsWriteBarrier(field_type, instruction->InputAt(1))) {
1831 void LocationsBuilderARM64::VisitAdd(HAdd* instruction) {
1832 HandleBinaryOp(instruction);
1835 void InstructionCodeGeneratorARM64::VisitAdd(HAdd* instruction) {
1836 HandleBinaryOp(instruction);
1839 void LocationsBuilderARM64::VisitAnd(HAnd* instruction) {
1840 HandleBinaryOp(instruction);
1843 void InstructionCodeGeneratorARM64::VisitAnd(HAnd* instruction) {
1844 HandleBinaryOp(instruction);
1877 HArm64DataProcWithShifterOp* instruction) {
1878 DCHECK(instruction->GetType() == Primitive::kPrimInt ||
1879 instruction->GetType() == Primitive::kPrimLong);
1881 new (GetGraph()->GetArena()) LocationSummary(instruction, LocationSummary::kNoCall);
1882 if (instruction->GetInstrKind() == HInstruction::kNeg) {
1883 locations->SetInAt(0, Location::ConstantLocation(instruction->InputAt(0)->AsConstant()));
1892 HArm64DataProcWithShifterOp* instruction) {
1893 Primitive::Type type = instruction->GetType();
1894 HInstruction::InstructionKind kind = instruction->GetInstrKind();
1896 Register out = OutputRegister(instruction);
1899 left = InputRegisterAt(instruction, 0);
1903 // conversion) can have a different type from the current instruction's type,
1905 Register right_reg = RegisterFrom(instruction->GetLocations()->InAt(1), type);
1906 int64_t shift_amount = instruction->GetShiftAmount() &
1911 HArm64DataProcWithShifterOp::OpKind op_kind = instruction->GetOpKind();
1920 // the extension as a separate instruction.
1933 DCHECK(instruction->InputAt(0)->AsConstant()->IsArithmeticZero());
1951 void LocationsBuilderARM64::VisitArm64IntermediateAddress(HArm64IntermediateAddress* instruction) {
1953 // HArm64IntermediateAddress instruction yet.
1956 new (GetGraph()->GetArena()) LocationSummary(instruction, LocationSummary::kNoCall);
1958 locations->SetInAt(1, ARM64EncodableConstantOrRegister(instruction->GetOffset(), instruction));
1963 HArm64IntermediateAddress* instruction) {
1965 // HArm64IntermediateAddress instruction yet.
1967 __ Add(OutputRegister(instruction),
1968 InputRegisterAt(instruction, 0),
1969 Operand(InputOperandAt(instruction, 1)));
1979 // Don't allocate register for Mneg instruction.
2026 void LocationsBuilderARM64::VisitArrayGet(HArrayGet* instruction) {
2028 kEmitCompilerReadBarrier && (instruction->GetType() == Primitive::kPrimNot);
2030 new (GetGraph()->GetArena()) LocationSummary(instruction,
2035 locations->SetInAt(1, Location::RegisterOrConstant(instruction->InputAt(1)));
2036 if (Primitive::IsFloatingPointType(instruction->GetType())) {
2048 void InstructionCodeGeneratorARM64::VisitArrayGet(HArrayGet* instruction) {
2049 Primitive::Type type = instruction->GetType();
2050 Register obj = InputRegisterAt(instruction, 0);
2051 LocationSummary* locations = instruction->GetLocations();
2065 // HArm64IntermediateAddress instruction yet.
2066 DCHECK(!instruction->GetArray()->IsArm64IntermediateAddress());
2070 instruction, out, obj.W(), offset, index, temp, /* needs_null_check */ true);
2079 if (instruction->GetArray()->IsArm64IntermediateAddress()) {
2081 // HArm64IntermediateAddress instruction yet.
2084 // input instruction has done it already. See the comment in
2087 HArm64IntermediateAddress* tmp = instruction->GetArray()->AsArm64IntermediateAddress();
2097 codegen_->Load(type, OutputCPURegister(instruction), source);
2098 codegen_->MaybeRecordImplicitNullCheck(instruction);
2106 codegen_->MaybeGenerateReadBarrierSlow(instruction, out, out, obj_loc, offset);
2108 codegen_->MaybeGenerateReadBarrierSlow(instruction, out, out, obj_loc, offset, index);
2114 void LocationsBuilderARM64::VisitArrayLength(HArrayLength* instruction) {
2115 LocationSummary* locations = new (GetGraph()->GetArena()) LocationSummary(instruction);
2120 void InstructionCodeGeneratorARM64::VisitArrayLength(HArrayLength* instruction) {
2122 __ Ldr(OutputRegister(instruction),
2123 HeapOperand(InputRegisterAt(instruction, 0), mirror::Array::LengthOffset()));
2124 codegen_->MaybeRecordImplicitNullCheck(instruction);
2127 void LocationsBuilderARM64::VisitArraySet(HArraySet* instruction) {
2128 Primitive::Type value_type = instruction->GetComponentType();
2130 bool may_need_runtime_call_for_type_check = instruction->NeedsTypeCheck();
2134 instruction,
2139 locations->SetInAt(1, Location::RegisterOrConstant(instruction->InputAt(1)));
2147 void InstructionCodeGeneratorARM64::VisitArraySet(HArraySet* instruction) {
2148 Primitive::Type value_type = instruction->GetComponentType();
2149 LocationSummary* locations = instruction->GetLocations();
2150 bool may_need_runtime_call_for_type_check = instruction->NeedsTypeCheck();
2152 CodeGenerator::StoreNeedsWriteBarrier(value_type, instruction->GetValue());
2154 Register array = InputRegisterAt(instruction, 0);
2155 CPURegister value = InputCPURegisterAt(instruction, 2);
2171 if (instruction->GetArray()->IsArm64IntermediateAddress()) {
2173 // HArm64IntermediateAddress instruction yet.
2176 // input instruction has done it already. See the comment in
2179 HArm64IntermediateAddress* tmp = instruction->GetArray()->AsArm64IntermediateAddress();
2192 codegen_->MaybeRecordImplicitNullCheck(instruction);
2195 DCHECK(!instruction->GetArray()->IsArm64IntermediateAddress());
2218 slow_path = new (GetGraph()->GetArena()) ArraySetSlowPathARM64(instruction);
2220 if (instruction->GetValueCanBeNull()) {
2227 codegen_->MaybeRecordImplicitNullCheck(instruction);
2240 // instruction, temp_loc, temp_loc, temp2_loc, component_offset);
2245 // instruction, temp2_loc, temp2_loc, value_loc, class_offset, temp_loc);
2263 codegen_->MaybeRecordImplicitNullCheck(instruction);
2274 if (instruction->StaticTypeOfArrayIsObjectArray()) {
2308 codegen_->MaybeRecordImplicitNullCheck(instruction);
2312 codegen_->MarkGCCard(array, value.W(), instruction->GetValueCanBeNull());
2324 void LocationsBuilderARM64::VisitBoundsCheck(HBoundsCheck* instruction) {
2325 LocationSummary::CallKind call_kind = instruction->CanThrowIntoCatchBlock()
2328 LocationSummary* locations = new (GetGraph()->GetArena()) LocationSummary(instruction, call_kind);
2330 locations->SetInAt(1, ARM64EncodableConstantOrRegister(instruction->InputAt(1), instruction));
2331 if (instruction->HasUses()) {
2336 void InstructionCodeGeneratorARM64::VisitBoundsCheck(HBoundsCheck* instruction) {
2338 new (GetGraph()->GetArena()) BoundsCheckSlowPathARM64(instruction);
2341 __ Cmp(InputRegisterAt(instruction, 0), InputOperandAt(instruction, 1));
2367 void InstructionCodeGeneratorARM64::GenerateFcmp(HInstruction* instruction) {
2368 FPRegister lhs_reg = InputFPRegisterAt(instruction, 0);
2369 Location rhs_loc = instruction->GetLocations()->InAt(1);
2372 // an FCMP instruction.
2384 // HCompare instruction, we must handle the -0.0 case with
2389 __ Fcmp(lhs_reg, InputFPRegisterAt(instruction, 1));
2458 void LocationsBuilderARM64::HandleCondition(HCondition* instruction) {
2459 LocationSummary* locations = new (GetGraph()->GetArena()) LocationSummary(instruction);
2461 if (Primitive::IsFloatingPointType(instruction->InputAt(0)->GetType())) {
2464 IsFloatingPointZeroConstant(instruction->InputAt(1))
2465 ? Location::ConstantLocation(instruction->InputAt(1)->AsConstant())
2470 locations->SetInAt(1, ARM64EncodableConstantOrRegister(instruction->InputAt(1), instruction));
2473 if (!instruction->IsEmittedAtUseSite()) {
2478 void InstructionCodeGeneratorARM64::HandleCondition(HCondition* instruction) {
2479 if (instruction->IsEmittedAtUseSite()) {
2483 LocationSummary* locations = instruction->GetLocations();
2484 Register res = RegisterFrom(locations->Out(), instruction->GetType());
2485 IfCondition if_cond = instruction->GetCondition();
2487 if (Primitive::IsFloatingPointType(instruction->InputAt(0)->GetType())) {
2488 GenerateFcmp(instruction);
2489 __ Cset(res, ARM64FPCondition(if_cond, instruction->IsGtBias()));
2492 Register lhs = InputRegisterAt(instruction, 0);
2493 Operand rhs = InputOperandAt(instruction, 1);
2517 void InstructionCodeGeneratorARM64::DivRemOneOrMinusOne(HBinaryOperation* instruction) {
2518 DCHECK(instruction->IsDiv() || instruction->IsRem());
2520 LocationSummary* locations = instruction->GetLocations();
2524 Register out = OutputRegister(instruction);
2525 Register dividend = InputRegisterAt(instruction, 0);
2529 if (instruction->IsRem()) {
2540 void InstructionCodeGeneratorARM64::DivRemByPowerOfTwo(HBinaryOperation* instruction) {
2541 DCHECK(instruction->IsDiv() || instruction->IsRem());
2543 LocationSummary* locations = instruction->GetLocations();
2547 Register out = OutputRegister(instruction);
2548 Register dividend = InputRegisterAt(instruction, 0);
2556 if (instruction->IsDiv()) {
2566 int bits = instruction->GetResultType() == Primitive::kPrimInt ? 32 : 64;
2575 void InstructionCodeGeneratorARM64::GenerateDivRemWithAnyConstant(HBinaryOperation* instruction) {
2576 DCHECK(instruction->IsDiv() || instruction->IsRem());
2578 LocationSummary* locations = instruction->GetLocations();
2582 Register out = OutputRegister(instruction);
2583 Register dividend = InputRegisterAt(instruction, 0);
2586 Primitive::Type type = instruction->GetResultType();
2615 if (instruction->IsDiv()) {
2626 void InstructionCodeGeneratorARM64::GenerateDivRemIntegral(HBinaryOperation* instruction) {
2627 DCHECK(instruction->IsDiv() || instruction->IsRem());
2628 Primitive::Type type = instruction->GetResultType();
2631 LocationSummary* locations = instruction->GetLocations();
2632 Register out = OutputRegister(instruction);
2641 DivRemOneOrMinusOne(instruction);
2643 DivRemByPowerOfTwo(instruction);
2646 GenerateDivRemWithAnyConstant(instruction);
2649 Register dividend = InputRegisterAt(instruction, 0);
2650 Register divisor = InputRegisterAt(instruction, 1);
2651 if (instruction->IsDiv()) {
2703 void LocationsBuilderARM64::VisitDivZeroCheck(HDivZeroCheck* instruction) {
2704 LocationSummary::CallKind call_kind = instruction->CanThrowIntoCatchBlock()
2707 LocationSummary* locations = new (GetGraph()->GetArena()) LocationSummary(instruction, call_kind);
2708 locations->SetInAt(0, Location::RegisterOrConstant(instruction->InputAt(0)));
2709 if (instruction->HasUses()) {
2714 void InstructionCodeGeneratorARM64::VisitDivZeroCheck(HDivZeroCheck* instruction) {
2716 new (GetGraph()->GetArena()) DivZeroCheckSlowPathARM64(instruction);
2718 Location value = instruction->GetLocations()->InAt(0);
2720 Primitive::Type type = instruction->GetType();
2736 __ Cbz(InputRegisterAt(instruction, 0), slow_path->GetEntryLabel());
2806 void InstructionCodeGeneratorARM64::GenerateTestAndBranch(HInstruction* instruction,
2813 HInstruction* cond = instruction->InputAt(condition_input_index);
2842 // The condition instruction has been materialized, compare the output to 0.
2843 Location cond_val = instruction->GetLocations()->InAt(condition_input_index);
2846 __ Cbz(InputRegisterAt(instruction, condition_input_index), false_target);
2848 __ Cbnz(InputRegisterAt(instruction, condition_input_index), true_target);
2851 // The condition instruction has not been materialized, use its inputs as
3034 // Condition codes set from previous instruction.
3083 void LocationsBuilderARM64::VisitInstanceFieldGet(HInstanceFieldGet* instruction) {
3084 HandleFieldGet(instruction);
3087 void InstructionCodeGeneratorARM64::VisitInstanceFieldGet(HInstanceFieldGet* instruction) {
3088 HandleFieldGet(instruction, instruction->GetFieldInfo());
3091 void LocationsBuilderARM64::VisitInstanceFieldSet(HInstanceFieldSet* instruction) {
3092 HandleFieldSet(instruction);
3095 void InstructionCodeGeneratorARM64::VisitInstanceFieldSet(HInstanceFieldSet* instruction) {
3096 HandleFieldSet(instruction, instruction->GetFieldInfo(), instruction->GetValueCanBeNull());
3107 void LocationsBuilderARM64::VisitInstanceOf(HInstanceOf* instruction) {
3109 TypeCheckKind type_check_kind = instruction->GetTypeCheckKind();
3125 LocationSummary* locations = new (GetGraph()->GetArena()) LocationSummary(instruction, call_kind);
3138 void InstructionCodeGeneratorARM64::VisitInstanceOf(HInstanceOf* instruction) {
3139 TypeCheckKind type_check_kind = instruction->GetTypeCheckKind();
3140 LocationSummary* locations = instruction->GetLocations();
3142 Register obj = InputRegisterAt(instruction, 0);
3143 Register cls = InputRegisterAt(instruction, 1);
3145 Register out = OutputRegister(instruction);
3159 if (instruction->MustDoNullCheck()) {
3164 GenerateReferenceLoadTwoRegisters(instruction, out_loc, obj_loc, class_offset, maybe_temp_loc);
3182 GenerateReferenceLoadOneRegister(instruction, out_loc, super_offset, maybe_temp_loc);
3201 GenerateReferenceLoadOneRegister(instruction, out_loc, super_offset, maybe_temp_loc);
3220 GenerateReferenceLoadOneRegister(instruction, out_loc, component_offset, maybe_temp_loc);
3235 slow_path = new (GetGraph()->GetArena()) TypeCheckSlowPathARM64(instruction,
3256 // HInstanceOf instruction (following the runtime calling
3267 slow_path = new (GetGraph()->GetArena()) TypeCheckSlowPathARM64(instruction,
3292 void LocationsBuilderARM64::VisitCheckCast(HCheckCast* instruction) {
3294 bool throws_into_catch = instruction->CanThrowIntoCatchBlock();
3296 TypeCheckKind type_check_kind = instruction->GetTypeCheckKind();
3313 LocationSummary* locations = new (GetGraph()->GetArena()) LocationSummary(instruction, call_kind);
3325 void InstructionCodeGeneratorARM64::VisitCheckCast(HCheckCast* instruction) {
3326 TypeCheckKind type_check_kind = instruction->GetTypeCheckKind();
3327 LocationSummary* locations = instruction->GetLocations();
3329 Register obj = InputRegisterAt(instruction, 0);
3330 Register cls = InputRegisterAt(instruction, 1);
3346 !instruction->CanThrowIntoCatchBlock();
3348 new (GetGraph()->GetArena()) TypeCheckSlowPathARM64(instruction,
3354 if (instruction->MustDoNullCheck()) {
3359 GenerateReferenceLoadTwoRegisters(instruction, temp_loc, obj_loc, class_offset, maybe_temp2_loc);
3377 GenerateReferenceLoadOneRegister(instruction, temp_loc, super_offset, maybe_temp2_loc);
3390 instruction, temp_loc, obj_loc, class_offset, maybe_temp2_loc);
3407 GenerateReferenceLoadOneRegister(instruction, temp_loc, super_offset, maybe_temp2_loc);
3419 instruction, temp_loc, obj_loc, class_offset, maybe_temp2_loc);
3432 GenerateReferenceLoadOneRegister(instruction, temp_loc, component_offset, maybe_temp2_loc);
3446 instruction, temp_loc, obj_loc, class_offset, maybe_temp2_loc);
3456 instruction, temp_loc, obj_loc, class_offset, maybe_temp2_loc);
3470 // instruction (following the runtime calling convention), which
3610 // For better instruction scheduling we load the direct code pointer before the method pointer.
3705 // LR prepared above for better instruction scheduling.
3978 void InstructionCodeGeneratorARM64::VisitLoadException(HLoadException* instruction) {
3979 __ Ldr(OutputRegister(instruction), GetExceptionTlsAddress());
4137 void LocationsBuilderARM64::VisitMonitorOperation(HMonitorOperation* instruction) {
4139 new (GetGraph()->GetArena()) LocationSummary(instruction, LocationSummary::kCall);
4144 void InstructionCodeGeneratorARM64::VisitMonitorOperation(HMonitorOperation* instruction) {
4145 codegen_->InvokeRuntime(instruction->IsEnter()
4147 instruction,
4148 instruction->GetDexPc(),
4150 if (instruction->IsEnter()) {
4235 void LocationsBuilderARM64::VisitNewArray(HNewArray* instruction) {
4237 new (GetGraph()->GetArena()) LocationSummary(instruction, LocationSummary::kCall);
4245 void InstructionCodeGeneratorARM64::VisitNewArray(HNewArray* instruction) {
4246 LocationSummary* locations = instruction->GetLocations();
4250 __ Mov(type_index, instruction->GetTypeIndex());
4253 codegen_->InvokeRuntime(instruction->GetEntrypoint(),
4254 instruction,
4255 instruction->GetDexPc(),
4260 void LocationsBuilderARM64::VisitNewInstance(HNewInstance* instruction) {
4262 new (GetGraph()->GetArena()) LocationSummary(instruction, LocationSummary::kCall);
4264 if (instruction->IsStringAlloc()) {
4273 void InstructionCodeGeneratorARM64::VisitNewInstance(HNewInstance* instruction) {
4276 if (instruction->IsStringAlloc()) {
4278 Location temp = instruction->GetLocations()->GetTemp(0);
4283 codegen_->RecordPcInfo(instruction, instruction->GetDexPc());
4285 codegen_->InvokeRuntime(instruction->GetEntrypoint(),
4286 instruction,
4287 instruction->GetDexPc(),
4293 void LocationsBuilderARM64::VisitNot(HNot* instruction) {
4294 LocationSummary* locations = new (GetGraph()->GetArena()) LocationSummary(instruction);
4299 void InstructionCodeGeneratorARM64::VisitNot(HNot* instruction) {
4300 switch (instruction->GetResultType()) {
4303 __ Mvn(OutputRegister(instruction), InputOperandAt(instruction, 0));
4307 LOG(FATAL) << "Unexpected type for not operation " << instruction->GetResultType();
4311 void LocationsBuilderARM64::VisitBooleanNot(HBooleanNot* instruction) {
4312 LocationSummary* locations = new (GetGraph()->GetArena()) LocationSummary(instruction);
4317 void InstructionCodeGeneratorARM64::VisitBooleanNot(HBooleanNot* instruction) {
4318 __ Eor(OutputRegister(instruction), InputRegisterAt(instruction, 0), vixl::Operand(1));
4321 void LocationsBuilderARM64::VisitNullCheck(HNullCheck* instruction) {
4322 LocationSummary::CallKind call_kind = instruction->CanThrowIntoCatchBlock()
4325 LocationSummary* locations = new (GetGraph()->GetArena()) LocationSummary(instruction, call_kind);
4327 if (instruction->HasUses()) {
4332 void CodeGeneratorARM64::GenerateImplicitNullCheck(HNullCheck* instruction) {
4333 if (CanMoveNullCheckToUser(instruction)) {
4338 Location obj = instruction->GetLocations()->InAt(0);
4340 RecordPcInfo(instruction, instruction->GetDexPc());
4343 void CodeGeneratorARM64::GenerateExplicitNullCheck(HNullCheck* instruction) {
4344 SlowPathCodeARM64* slow_path = new (GetGraph()->GetArena()) NullCheckSlowPathARM64(instruction);
4347 LocationSummary* locations = instruction->GetLocations();
4350 __ Cbz(RegisterFrom(obj, instruction->InputAt(0)->GetType()), slow_path->GetEntryLabel());
4353 void InstructionCodeGeneratorARM64::VisitNullCheck(HNullCheck* instruction) {
4354 codegen_->GenerateNullCheck(instruction);
4357 void LocationsBuilderARM64::VisitOr(HOr* instruction) {
4358 HandleBinaryOp(instruction);
4361 void InstructionCodeGeneratorARM64::VisitOr(HOr* instruction) {
4362 HandleBinaryOp(instruction);
4365 void LocationsBuilderARM64::VisitParallelMove(HParallelMove* instruction ATTRIBUTE_UNUSED) {
4369 void InstructionCodeGeneratorARM64::VisitParallelMove(HParallelMove* instruction) {
4370 codegen_->GetMoveResolver()->EmitNativeCode(instruction);
4373 void LocationsBuilderARM64::VisitParameterValue(HParameterValue* instruction) {
4374 LocationSummary* locations = new (GetGraph()->GetArena()) LocationSummary(instruction);
4375 Location location = parameter_visitor_.GetNextLocation(instruction->GetType());
4385 HParameterValue* instruction ATTRIBUTE_UNUSED) {
4389 void LocationsBuilderARM64::VisitCurrentMethod(HCurrentMethod* instruction) {
4391 new (GetGraph()->GetArena()) LocationSummary(instruction, LocationSummary::kNoCall);
4396 HCurrentMethod* instruction ATTRIBUTE_UNUSED) {
4400 void LocationsBuilderARM64::VisitPhi(HPhi* instruction) {
4401 LocationSummary* locations = new (GetGraph()->GetArena()) LocationSummary(instruction);
4402 for (size_t i = 0, e = instruction->InputCount(); i < e; ++i) {
4408 void InstructionCodeGeneratorARM64::VisitPhi(HPhi* instruction ATTRIBUTE_UNUSED) {
4478 void LocationsBuilderARM64::VisitReturn(HReturn* instruction) {
4479 LocationSummary* locations = new (GetGraph()->GetArena()) LocationSummary(instruction);
4480 Primitive::Type return_type = instruction->InputAt(0)->GetType();
4484 void InstructionCodeGeneratorARM64::VisitReturn(HReturn* instruction ATTRIBUTE_UNUSED) {
4488 void LocationsBuilderARM64::VisitReturnVoid(HReturnVoid* instruction) {
4489 instruction->SetLocations(nullptr);
4492 void InstructionCodeGeneratorARM64::VisitReturnVoid(HReturnVoid* instruction ATTRIBUTE_UNUSED) {
4520 void LocationsBuilderARM64::VisitSub(HSub* instruction) {
4521 HandleBinaryOp(instruction);
4524 void InstructionCodeGeneratorARM64::VisitSub(HSub* instruction) {
4525 HandleBinaryOp(instruction);
4528 void LocationsBuilderARM64::VisitStaticFieldGet(HStaticFieldGet* instruction) {
4529 HandleFieldGet(instruction);
4532 void InstructionCodeGeneratorARM64::VisitStaticFieldGet(HStaticFieldGet* instruction) {
4533 HandleFieldGet(instruction, instruction->GetFieldInfo());
4536 void LocationsBuilderARM64::VisitStaticFieldSet(HStaticFieldSet* instruction) {
4537 HandleFieldSet(instruction);
4540 void InstructionCodeGeneratorARM64::VisitStaticFieldSet(HStaticFieldSet* instruction) {
4541 HandleFieldSet(instruction, instruction->GetFieldInfo(), instruction->GetValueCanBeNull());
4545 HUnresolvedInstanceFieldGet* instruction) {
4548 instruction, instruction->GetFieldType(), calling_convention);
4552 HUnresolvedInstanceFieldGet* instruction) {
4554 codegen_->GenerateUnresolvedFieldAccess(instruction,
4555 instruction->GetFieldType(),
4556 instruction->GetFieldIndex(),
4557 instruction->GetDexPc(),
4562 HUnresolvedInstanceFieldSet* instruction) {
4565 instruction, instruction->GetFieldType(), calling_convention);
4569 HUnresolvedInstanceFieldSet* instruction) {
4571 codegen_->GenerateUnresolvedFieldAccess(instruction,
4572 instruction->GetFieldType(),
4573 instruction->GetFieldIndex(),
4574 instruction->GetDexPc(),
4579 HUnresolvedStaticFieldGet* instruction) {
4582 instruction, instruction->GetFieldType(), calling_convention);
4586 HUnresolvedStaticFieldGet* instruction) {
4588 codegen_->GenerateUnresolvedFieldAccess(instruction,
4589 instruction->GetFieldType(),
4590 instruction->GetFieldIndex(),
4591 instruction->GetDexPc(),
4596 HUnresolvedStaticFieldSet* instruction) {
4599 instruction, instruction->GetFieldType(), calling_convention);
4603 HUnresolvedStaticFieldSet* instruction) {
4605 codegen_->GenerateUnresolvedFieldAccess(instruction,
4606 instruction->GetFieldType(),
4607 instruction->GetFieldIndex(),
4608 instruction->GetDexPc(),
4612 void LocationsBuilderARM64::VisitSuspendCheck(HSuspendCheck* instruction) {
4613 new (GetGraph()->GetArena()) LocationSummary(instruction, LocationSummary::kCallOnSlowPath);
4616 void InstructionCodeGeneratorARM64::VisitSuspendCheck(HSuspendCheck* instruction) {
4617 HBasicBlock* block = instruction->GetBlock();
4619 DCHECK(block->GetLoopInformation()->GetSuspendCheck() == instruction);
4623 if (block->IsEntryBlock() && instruction->GetNext()->IsGoto()) {
4627 GenerateSuspendCheck(instruction, nullptr);
4630 void LocationsBuilderARM64::VisitThrow(HThrow* instruction) {
4632 new (GetGraph()->GetArena()) LocationSummary(instruction, LocationSummary::kCall);
4637 void InstructionCodeGeneratorARM64::VisitThrow(HThrow* instruction) {
4639 QUICK_ENTRY_POINT(pDeliverException), instruction, instruction->GetDexPc(), nullptr);
4718 void LocationsBuilderARM64::VisitXor(HXor* instruction) {
4719 HandleBinaryOp(instruction);
4722 void InstructionCodeGeneratorARM64::VisitXor(HXor* instruction) {
4723 HandleBinaryOp(instruction);
4726 void LocationsBuilderARM64::VisitBoundType(HBoundType* instruction ATTRIBUTE_UNUSED) {
4731 void InstructionCodeGeneratorARM64::VisitBoundType(HBoundType* instruction ATTRIBUTE_UNUSED) {
4758 // Current instruction id is an upper bound of the number of HIRs in the graph.
4823 void InstructionCodeGeneratorARM64::GenerateReferenceLoadOneRegister(HInstruction* instruction,
4834 codegen_->GenerateFieldLoadWithBakerReadBarrier(instruction,
4849 codegen_->GenerateReadBarrierSlow(instruction, out, out, maybe_temp, offset);
4859 void InstructionCodeGeneratorARM64::GenerateReferenceLoadTwoRegisters(HInstruction* instruction,
4872 codegen_->GenerateFieldLoadWithBakerReadBarrier(instruction,
4883 codegen_->GenerateReadBarrierSlow(instruction, out, out, obj, offset);
4893 void InstructionCodeGeneratorARM64::GenerateGcRootFieldLoad(HInstruction* instruction,
4927 new (GetGraph()->GetArena()) ReadBarrierMarkSlowPathARM64(instruction, root, root);
4949 codegen_->GenerateReadBarrierForRootSlow(instruction, root, root);
4966 void CodeGeneratorARM64::GenerateFieldLoadWithBakerReadBarrier(HInstruction* instruction,
4979 instruction, ref, obj, offset, no_index, temp, needs_null_check, use_load_acquire);
4982 void CodeGeneratorARM64::GenerateArrayLoadWithBakerReadBarrier(HInstruction* instruction,
4999 instruction, ref, obj, data_offset, index, temp, needs_null_check, use_load_acquire);
5002 void CodeGeneratorARM64::GenerateReferenceLoadWithBakerReadBarrier(HInstruction* instruction,
5013 // load, so we shouldn't be using a Load Acquire instruction.
5047 MaybeRecordImplicitNullCheck(instruction);
5091 LoadAcquire(instruction, ref_reg, field, /* needs_null_check */ false);
5102 new (GetGraph()->GetArena()) ReadBarrierMarkSlowPathARM64(instruction, ref, ref);
5112 void CodeGeneratorARM64::GenerateReadBarrierSlow(HInstruction* instruction,
5132 ReadBarrierForHeapReferenceSlowPathARM64(instruction, out, ref, obj, offset, index);
5139 void CodeGeneratorARM64::MaybeGenerateReadBarrierSlow(HInstruction* instruction,
5151 GenerateReadBarrierSlow(instruction, out, ref, obj, offset, index);
5157 void CodeGeneratorARM64::GenerateReadBarrierForRootSlow(HInstruction* instruction,
5167 new (GetGraph()->GetArena()) ReadBarrierForRootSlowPathARM64(instruction, out, root);
5174 void LocationsBuilderARM64::VisitClassTableGet(HClassTableGet* instruction) {
5176 new (GetGraph()->GetArena()) LocationSummary(instruction, LocationSummary::kNoCall);
5181 void InstructionCodeGeneratorARM64::VisitClassTableGet(HClassTableGet* instruction) {
5182 LocationSummary* locations = instruction->GetLocations();
5184 if (instruction->GetTableKind() == HClassTableGet::TableKind::kVTable) {
5186 instruction->GetIndex(), kArm64PointerSize).SizeValue();
5189 instruction->GetIndex() % mirror::Class::kImtSize, kArm64PointerSize).Uint32Value();