Lines Matching refs:instruction

50   explicit NullCheckSlowPathX86(HNullCheck* instruction) : instruction_(instruction) {}
65 explicit DivZeroCheckSlowPathX86(HDivZeroCheck* instruction) : instruction_(instruction) {}
100 BoundsCheckSlowPathX86(HBoundsCheck* instruction,
103 : instruction_(instruction),
134 SuspendCheckSlowPathX86(HSuspendCheck* instruction, HBasicBlock* successor)
135 : instruction_(instruction), successor_(successor) {}
170 explicit LoadStringSlowPathX86(HLoadString* instruction) : instruction_(instruction) {}
234 // The instruction where this slow path is happening.
249 TypeCheckSlowPathX86(HInstruction* instruction,
253 : instruction_(instruction),
306 explicit DeoptimizationSlowPathX86(HInstruction* instruction)
307 : instruction_(instruction) {}
718 void CodeGeneratorX86::Move(HInstruction* instruction, Location location, HInstruction* move_for) {
719 LocationSummary* locations = instruction->GetLocations();
747 DCHECK_EQ(location.GetConstant(), instruction);
750 } else if (instruction->IsTemporary()) {
751 Location temp_location = GetTemporaryLocation(instruction->AsTemporary());
758 } else if (instruction->IsLoadLocal()) {
759 int slot = GetStackSlot(instruction->AsLoadLocal()->GetLocal());
760 switch (instruction->GetType()) {
777 LOG(FATAL) << "Unimplemented local type " << instruction->GetType();
780 DCHECK((instruction->GetNext() == move_for) || instruction->GetNext()->IsTemporary());
781 switch (instruction->GetType()) {
798 LOG(FATAL) << "Unexpected type " << instruction->GetType();
836 void InstructionCodeGeneratorX86::GenerateTestAndBranch(HInstruction* instruction,
840 HInstruction* cond = instruction->InputAt(0);
859 && cond->AsCondition()->IsBeforeWhenDisregardMoves(instruction);
863 Location lhs = instruction->GetLocations()->InAt(0);
1445 // Processing a Dex `int-to-byte' instruction.
1465 // Processing a Dex `int-to-short' instruction.
1479 // Processing a Dex `long-to-int' instruction.
1485 // Processing a Dex `float-to-int' instruction.
1492 // Processing a Dex `double-to-int' instruction.
1512 // Processing a Dex `int-to-long' instruction.
1519 // Processing a Dex `float-to-long' or 'double-to-long' instruction.
1542 // Processing a Dex `int-to-char' instruction.
1561 // Processing a Dex `int-to-float' instruction.
1567 // Processing a Dex `long-to-float' instruction.
1573 // Processing a Dex `double-to-float' instruction.
1592 // Processing a Dex `int-to-double' instruction.
1598 // Processing a Dex `long-to-double' instruction.
1604 // Processing a Dex `float-to-double' instruction.
1636 // Processing a Dex `int-to-byte' instruction.
1659 // Processing a Dex `int-to-short' instruction.
1680 // Processing a Dex `long-to-int' instruction.
1694 // Processing a Dex `float-to-int' instruction.
1719 // Processing a Dex `double-to-int' instruction.
1757 // Processing a Dex `int-to-long' instruction.
1765 // Processing a Dex `float-to-long' instruction.
1771 // Processing a Dex `double-to-long' instruction.
1789 // Processing a Dex `Process a Dex `int-to-char'' instruction.
1815 // Processing a Dex `int-to-float' instruction.
1820 // Processing a Dex `long-to-float' instruction.
1850 // Processing a Dex `double-to-float' instruction.
1868 // Processing a Dex `int-to-double' instruction.
1873 // Processing a Dex `long-to-double' instruction.
1903 // Processing a Dex `float-to-double' instruction.
2334 void InstructionCodeGeneratorX86::DivRemOneOrMinusOne(HBinaryOperation* instruction) {
2335 DCHECK(instruction->IsDiv() || instruction->IsRem());
2337 LocationSummary* locations = instruction->GetLocations();
2347 if (instruction->IsRem()) {
2358 void InstructionCodeGeneratorX86::DivByPowerOfTwo(HDiv* instruction) {
2359 LocationSummary* locations = instruction->GetLocations();
2381 void InstructionCodeGeneratorX86::GenerateDivRemWithAnyConstant(HBinaryOperation* instruction) {
2382 DCHECK(instruction->IsDiv() || instruction->IsRem());
2384 LocationSummary* locations = instruction->GetLocations();
2392 if (instruction->IsDiv()) {
2402 if (instruction->IsDiv()) {
2449 if (instruction->IsRem()) {
2460 void InstructionCodeGeneratorX86::GenerateDivRemIntegral(HBinaryOperation* instruction) {
2461 DCHECK(instruction->IsDiv() || instruction->IsRem());
2463 LocationSummary* locations = instruction->GetLocations();
2467 bool is_div = instruction->IsDiv();
2469 switch (instruction->GetResultType()) {
2474 if (instruction->InputAt(1)->IsIntConstant()) {
2480 DivRemOneOrMinusOne(instruction);
2482 DivByPowerOfTwo(instruction->AsDiv());
2485 GenerateDivRemWithAnyConstant(instruction);
2525 ? instruction->AsDiv()->GetDexPc()
2526 : instruction->AsRem()->GetDexPc();
2527 codegen_->RecordPcInfo(instruction, dex_pc);
2533 LOG(FATAL) << "Unexpected type for GenerateDivRemIntegral " << instruction->GetResultType();
2674 void LocationsBuilderX86::VisitDivZeroCheck(HDivZeroCheck* instruction) {
2676 new (GetGraph()->GetArena()) LocationSummary(instruction, LocationSummary::kNoCall);
2677 switch (instruction->GetType()) {
2683 locations->SetInAt(0, Location::RegisterOrConstant(instruction->InputAt(0)));
2684 if (!instruction->IsConstant()) {
2690 LOG(FATAL) << "Unexpected type for HDivZeroCheck " << instruction->GetType();
2692 if (instruction->HasUses()) {
2697 void InstructionCodeGeneratorX86::VisitDivZeroCheck(HDivZeroCheck* instruction) {
2698 SlowPathCodeX86* slow_path = new (GetGraph()->GetArena()) DivZeroCheckSlowPathX86(instruction);
2701 LocationSummary* locations = instruction->GetLocations();
2704 switch (instruction->GetType()) {
2735 LOG(FATAL) << "Unexpected type for HDivZeroCheck" << instruction->GetType();
2960 void LocationsBuilderX86::VisitNewInstance(HNewInstance* instruction) {
2962 new (GetGraph()->GetArena()) LocationSummary(instruction, LocationSummary::kCall);
2969 void InstructionCodeGeneratorX86::VisitNewInstance(HNewInstance* instruction) {
2972 __ movl(calling_convention.GetRegisterAt(0), Immediate(instruction->GetTypeIndex()));
2974 __ fs()->call(Address::Absolute(GetThreadOffset<kX86WordSize>(instruction->GetEntrypoint())));
2976 codegen_->RecordPcInfo(instruction, instruction->GetDexPc());
2980 void LocationsBuilderX86::VisitNewArray(HNewArray* instruction) {
2982 new (GetGraph()->GetArena()) LocationSummary(instruction, LocationSummary::kCall);
2990 void InstructionCodeGeneratorX86::VisitNewArray(HNewArray* instruction) {
2993 __ movl(calling_convention.GetRegisterAt(0), Immediate(instruction->GetTypeIndex()));
2995 __ fs()->call(Address::Absolute(GetThreadOffset<kX86WordSize>(instruction->GetEntrypoint())));
2997 codegen_->RecordPcInfo(instruction, instruction->GetDexPc());
3001 void LocationsBuilderX86::VisitParameterValue(HParameterValue* instruction) {
3003 new (GetGraph()->GetArena()) LocationSummary(instruction, LocationSummary::kNoCall);
3004 Location location = parameter_visitor_.GetNextLocation(instruction->GetType());
3013 void InstructionCodeGeneratorX86::VisitParameterValue(HParameterValue* instruction) {
3014 UNUSED(instruction);
3159 void LocationsBuilderX86::VisitPhi(HPhi* instruction) {
3161 new (GetGraph()->GetArena()) LocationSummary(instruction, LocationSummary::kNoCall);
3162 for (size_t i = 0, e = instruction->InputCount(); i < e; ++i) {
3168 void InstructionCodeGeneratorX86::VisitPhi(HPhi* instruction) {
3169 UNUSED(instruction);
3243 void LocationsBuilderX86::HandleFieldGet(HInstruction* instruction, const FieldInfo& field_info) {
3244 DCHECK(instruction->IsInstanceFieldGet() || instruction->IsStaticFieldGet());
3246 new (GetGraph()->GetArena()) LocationSummary(instruction, LocationSummary::kNoCall);
3249 if (Primitive::IsFloatingPointType(instruction->GetType())) {
3255 (instruction->GetType() == Primitive::kPrimLong) ? Location::kOutputOverlap
3267 void InstructionCodeGeneratorX86::HandleFieldGet(HInstruction* instruction,
3269 DCHECK(instruction->IsInstanceFieldGet() || instruction->IsStaticFieldGet());
3271 LocationSummary* locations = instruction->GetLocations();
3309 codegen_->MaybeRecordImplicitNullCheck(instruction);
3316 codegen_->MaybeRecordImplicitNullCheck(instruction);
3339 codegen_->MaybeRecordImplicitNullCheck(instruction);
3347 void LocationsBuilderX86::HandleFieldSet(HInstruction* instruction, const FieldInfo& field_info) {
3348 DCHECK(instruction->IsInstanceFieldSet() || instruction->IsStaticFieldSet());
3351 new (GetGraph()->GetArena()) LocationSummary(instruction, LocationSummary::kNoCall);
3369 if (CodeGenerator::StoreNeedsWriteBarrier(field_type, instruction->InputAt(1))) {
3384 void InstructionCodeGeneratorX86::HandleFieldSet(HInstruction* instruction,
3386 DCHECK(instruction->IsInstanceFieldSet() || instruction->IsStaticFieldSet());
3388 LocationSummary* locations = instruction->GetLocations();
3426 codegen_->MaybeRecordImplicitNullCheck(instruction);
3429 codegen_->MaybeRecordImplicitNullCheck(instruction);
3452 codegen_->MaybeRecordImplicitNullCheck(instruction);
3455 if (CodeGenerator::StoreNeedsWriteBarrier(field_type, instruction->InputAt(1))) {
3466 void LocationsBuilderX86::VisitStaticFieldGet(HStaticFieldGet* instruction) {
3467 HandleFieldGet(instruction, instruction->GetFieldInfo());
3470 void InstructionCodeGeneratorX86::VisitStaticFieldGet(HStaticFieldGet* instruction) {
3471 HandleFieldGet(instruction, instruction->GetFieldInfo());
3474 void LocationsBuilderX86::VisitStaticFieldSet(HStaticFieldSet* instruction) {
3475 HandleFieldSet(instruction, instruction->GetFieldInfo());
3478 void InstructionCodeGeneratorX86::VisitStaticFieldSet(HStaticFieldSet* instruction) {
3479 HandleFieldSet(instruction, instruction->GetFieldInfo());
3482 void LocationsBuilderX86::VisitInstanceFieldSet(HInstanceFieldSet* instruction) {
3483 HandleFieldSet(instruction, instruction->GetFieldInfo());
3486 void InstructionCodeGeneratorX86::VisitInstanceFieldSet(HInstanceFieldSet* instruction) {
3487 HandleFieldSet(instruction, instruction->GetFieldInfo());
3490 void LocationsBuilderX86::VisitInstanceFieldGet(HInstanceFieldGet* instruction) {
3491 HandleFieldGet(instruction, instruction->GetFieldInfo());
3494 void InstructionCodeGeneratorX86::VisitInstanceFieldGet(HInstanceFieldGet* instruction) {
3495 HandleFieldGet(instruction, instruction->GetFieldInfo());
3498 void LocationsBuilderX86::VisitNullCheck(HNullCheck* instruction) {
3500 new (GetGraph()->GetArena()) LocationSummary(instruction, LocationSummary::kNoCall);
3505 if (instruction->HasUses()) {
3510 void InstructionCodeGeneratorX86::GenerateImplicitNullCheck(HNullCheck* instruction) {
3511 if (codegen_->CanMoveNullCheckToUser(instruction)) {
3514 LocationSummary* locations = instruction->GetLocations();
3518 codegen_->RecordPcInfo(instruction, instruction->GetDexPc());
3521 void InstructionCodeGeneratorX86::GenerateExplicitNullCheck(HNullCheck* instruction) {
3522 SlowPathCodeX86* slow_path = new (GetGraph()->GetArena()) NullCheckSlowPathX86(instruction);
3525 LocationSummary* locations = instruction->GetLocations();
3541 void InstructionCodeGeneratorX86::VisitNullCheck(HNullCheck* instruction) {
3543 GenerateImplicitNullCheck(instruction);
3545 GenerateExplicitNullCheck(instruction);
3549 void LocationsBuilderX86::VisitArrayGet(HArrayGet* instruction) {
3551 new (GetGraph()->GetArena()) LocationSummary(instruction, LocationSummary::kNoCall);
3553 locations->SetInAt(1, Location::RegisterOrConstant(instruction->InputAt(1)));
3554 if (Primitive::IsFloatingPointType(instruction->GetType())) {
3560 (instruction->GetType() == Primitive::kPrimLong) ? Location::kOutputOverlap
3565 void InstructionCodeGeneratorX86::VisitArrayGet(HArrayGet* instruction) {
3566 LocationSummary* locations = instruction->GetLocations();
3570 Primitive::Type type = instruction->GetType();
3640 codegen_->MaybeRecordImplicitNullCheck(instruction);
3645 codegen_->MaybeRecordImplicitNullCheck(instruction);
3682 codegen_->MaybeRecordImplicitNullCheck(instruction);
3686 void LocationsBuilderX86::VisitArraySet(HArraySet* instruction) {
3692 Primitive::Type value_type = instruction->GetComponentType();
3694 CodeGenerator::StoreNeedsWriteBarrier(value_type, instruction->GetValue());
3696 bool needs_runtime_call = instruction->NeedsTypeCheck();
3699 instruction,
3714 locations->SetInAt(1, Location::RegisterOrConstant(instruction->InputAt(1)));
3717 locations->SetInAt(2, Location::ByteRegisterOrConstant(EAX, instruction->InputAt(2)));
3721 locations->SetInAt(2, Location::RegisterOrConstant(instruction->InputAt(2)));
3732 void InstructionCodeGeneratorX86::VisitArraySet(HArraySet* instruction) {
3733 LocationSummary* locations = instruction->GetLocations();
3737 Primitive::Type value_type = instruction->GetComponentType();
3740 CodeGenerator::StoreNeedsWriteBarrier(value_type, instruction->GetValue());
3763 codegen_->MaybeRecordImplicitNullCheck(instruction);
3787 codegen_->MaybeRecordImplicitNullCheck(instruction);
3816 codegen_->MaybeRecordImplicitNullCheck(instruction);
3827 codegen_->RecordPcInfo(instruction, instruction->GetDexPc());
3838 codegen_->MaybeRecordImplicitNullCheck(instruction);
3844 codegen_->MaybeRecordImplicitNullCheck(instruction);
3851 codegen_->MaybeRecordImplicitNullCheck(instruction);
3859 codegen_->MaybeRecordImplicitNullCheck(instruction);
3894 LOG(FATAL) << "Unreachable type " << instruction->GetType();
3899 void LocationsBuilderX86::VisitArrayLength(HArrayLength* instruction) {
3900 LocationSummary* locations = new (GetGraph()->GetArena()) LocationSummary(instruction);
3903 instruction->SetLocations(locations);
3906 void InstructionCodeGeneratorX86::VisitArrayLength(HArrayLength* instruction) {
3907 LocationSummary* locations = instruction->GetLocations();
3912 codegen_->MaybeRecordImplicitNullCheck(instruction);
3915 void LocationsBuilderX86::VisitBoundsCheck(HBoundsCheck* instruction) {
3917 new (GetGraph()->GetArena()) LocationSummary(instruction, LocationSummary::kNoCall);
3918 locations->SetInAt(0, Location::RegisterOrConstant(instruction->InputAt(0)));
3919 locations->SetInAt(1, Location::RegisterOrConstant(instruction->InputAt(1)));
3920 if (instruction->HasUses()) {
3925 void InstructionCodeGeneratorX86::VisitBoundsCheck(HBoundsCheck* instruction) {
3926 LocationSummary* locations = instruction->GetLocations();
3930 new (GetGraph()->GetArena()) BoundsCheckSlowPathX86(instruction, index_loc, length_loc);
3974 void LocationsBuilderX86::VisitParallelMove(HParallelMove* instruction) {
3975 UNUSED(instruction);
3979 void InstructionCodeGeneratorX86::VisitParallelMove(HParallelMove* instruction) {
3980 codegen_->GetMoveResolver()->EmitNativeCode(instruction);
3983 void LocationsBuilderX86::VisitSuspendCheck(HSuspendCheck* instruction) {
3984 new (GetGraph()->GetArena()) LocationSummary(instruction, LocationSummary::kCallOnSlowPath);
3987 void InstructionCodeGeneratorX86::VisitSuspendCheck(HSuspendCheck* instruction) {
3988 HBasicBlock* block = instruction->GetBlock();
3990 DCHECK(block->GetLoopInformation()->GetSuspendCheck() == instruction);
3994 if (block->IsEntryBlock() && instruction->GetNext()->IsGoto()) {
3998 GenerateSuspendCheck(instruction, nullptr);
4001 void InstructionCodeGeneratorX86::GenerateSuspendCheck(HSuspendCheck* instruction,
4004 down_cast<SuspendCheckSlowPathX86*>(instruction->GetSlowPath());
4006 slow_path = new (GetGraph()->GetArena()) SuspendCheckSlowPathX86(instruction, successor);
4007 instruction->SetSlowPath(slow_path);
4011 codegen_->ClearSpillSlotsFromLoopPhisInStackMap(instruction);
4361 void LocationsBuilderX86::VisitThrow(HThrow* instruction) {
4363 new (GetGraph()->GetArena()) LocationSummary(instruction, LocationSummary::kCall);
4368 void InstructionCodeGeneratorX86::VisitThrow(HThrow* instruction) {
4370 codegen_->RecordPcInfo(instruction, instruction->GetDexPc());
4373 void LocationsBuilderX86::VisitInstanceOf(HInstanceOf* instruction) {
4374 LocationSummary::CallKind call_kind = instruction->IsClassFinal()
4377 LocationSummary* locations = new (GetGraph()->GetArena()) LocationSummary(instruction, call_kind);
4383 void InstructionCodeGeneratorX86::VisitInstanceOf(HInstanceOf* instruction) {
4384 LocationSummary* locations = instruction->GetLocations();
4394 if (instruction->MustDoNullCheck()) {
4407 if (instruction->IsClassFinal()) {
4416 instruction, locations->InAt(1), locations->Out(), instruction->GetDexPc());
4423 if (instruction->MustDoNullCheck() || instruction->IsClassFinal()) {
4434 void LocationsBuilderX86::VisitCheckCast(HCheckCast* instruction) {
4436 instruction, LocationSummary::kCallOnSlowPath);
4442 void InstructionCodeGeneratorX86::VisitCheckCast(HCheckCast* instruction) {
4443 LocationSummary* locations = instruction->GetLocations();
4449 instruction, locations->InAt(1), locations->GetTemp(0), instruction->GetDexPc());
4453 if (instruction->MustDoNullCheck()) {
4471 void LocationsBuilderX86::VisitMonitorOperation(HMonitorOperation* instruction) {
4473 new (GetGraph()->GetArena()) LocationSummary(instruction, LocationSummary::kCall);
4478 void InstructionCodeGeneratorX86::VisitMonitorOperation(HMonitorOperation* instruction) {
4479 __ fs()->call(Address::Absolute(instruction->IsEnter()
4482 codegen_->RecordPcInfo(instruction, instruction->GetDexPc());
4485 void LocationsBuilderX86::VisitAnd(HAnd* instruction) { HandleBitwiseOperation(instruction); }
4486 void LocationsBuilderX86::VisitOr(HOr* instruction) { HandleBitwiseOperation(instruction); }
4487 void LocationsBuilderX86::VisitXor(HXor* instruction) { HandleBitwiseOperation(instruction); }
4489 void LocationsBuilderX86::HandleBitwiseOperation(HBinaryOperation* instruction) {
4491 new (GetGraph()->GetArena()) LocationSummary(instruction, LocationSummary::kNoCall);
4492 DCHECK(instruction->GetResultType() == Primitive::kPrimInt
4493 || instruction->GetResultType() == Primitive::kPrimLong);
4499 void InstructionCodeGeneratorX86::VisitAnd(HAnd* instruction) {
4500 HandleBitwiseOperation(instruction);
4503 void InstructionCodeGeneratorX86::VisitOr(HOr* instruction) {
4504 HandleBitwiseOperation(instruction);
4507 void InstructionCodeGeneratorX86::VisitXor(HXor* instruction) {
4508 HandleBitwiseOperation(instruction);
4511 void InstructionCodeGeneratorX86::HandleBitwiseOperation(HBinaryOperation* instruction) {
4512 LocationSummary* locations = instruction->GetLocations();
4517 if (instruction->GetResultType() == Primitive::kPrimInt) {
4519 if (instruction->IsAnd()) {
4521 } else if (instruction->IsOr()) {
4524 DCHECK(instruction->IsXor());
4528 if (instruction->IsAnd()) {
4531 } else if (instruction->IsOr()) {
4535 DCHECK(instruction->IsXor());
4540 if (instruction->IsAnd()) {
4542 } else if (instruction->IsOr()) {
4545 DCHECK(instruction->IsXor());
4550 DCHECK_EQ(instruction->GetResultType(), Primitive::kPrimLong);
4552 if (instruction->IsAnd()) {
4555 } else if (instruction->IsOr()) {
4559 DCHECK(instruction->IsXor());
4564 if (instruction->IsAnd()) {
4568 } else if (instruction->IsOr()) {
4573 DCHECK(instruction->IsXor());
4587 if (instruction->IsAnd()) {
4598 } else if (instruction->IsOr()) {
4606 DCHECK(instruction->IsXor());
4618 void LocationsBuilderX86::VisitBoundType(HBoundType* instruction) {
4620 UNUSED(instruction);
4624 void InstructionCodeGeneratorX86::VisitBoundType(HBoundType* instruction) {
4626 UNUSED(instruction);