Lines Matching refs:instruction

110   explicit BoundsCheckSlowPathMIPS64(HBoundsCheck* instruction) : SlowPathCodeMIPS64(instruction) {}
146 explicit DivZeroCheckSlowPathMIPS64(HDivZeroCheck* instruction) : SlowPathCodeMIPS64(instruction) {}
216 // The instruction where this slow path is happening.
231 explicit LoadStringSlowPathMIPS64(HLoadString* instruction) : SlowPathCodeMIPS64(instruction) {}
292 SuspendCheckSlowPathMIPS64(HSuspendCheck* instruction, HBasicBlock* successor)
293 : SlowPathCodeMIPS64(instruction), successor_(successor) {}
331 explicit TypeCheckSlowPathMIPS64(HInstruction* instruction) : SlowPathCodeMIPS64(instruction) {}
382 explicit DeoptimizationSlowPathMIPS64(HDeoptimize* instruction)
383 : SlowPathCodeMIPS64(instruction) {}
958 HInstruction* instruction,
962 instruction,
968 HInstruction* instruction,
971 ValidateInvokeRuntime(instruction, slow_path);
976 RecordPcInfo(instruction, dex_pc, slow_path);
992 void InstructionCodeGeneratorMIPS64::GenerateSuspendCheck(HSuspendCheck* instruction,
995 new (GetGraph()->GetArena()) SuspendCheckSlowPathMIPS64(instruction, successor);
1018 void LocationsBuilderMIPS64::HandleBinaryOp(HBinaryOperation* instruction) {
1019 DCHECK_EQ(instruction->InputCount(), 2U);
1020 LocationSummary* locations = new (GetGraph()->GetArena()) LocationSummary(instruction);
1021 Primitive::Type type = instruction->GetResultType();
1026 HInstruction* right = instruction->InputAt(1);
1030 if (instruction->IsAnd() || instruction->IsOr() || instruction->IsXor()) {
1032 } else if (instruction->IsAdd()) {
1035 DCHECK(instruction->IsSub());
1055 LOG(FATAL) << "Unexpected " << instruction->DebugName() << " type " << type;
1059 void InstructionCodeGeneratorMIPS64::HandleBinaryOp(HBinaryOperation* instruction) {
1060 Primitive::Type type = instruction->GetType();
1061 LocationSummary* locations = instruction->GetLocations();
1079 if (instruction->IsAnd()) {
1084 } else if (instruction->IsOr()) {
1089 } else if (instruction->IsXor()) {
1094 } else if (instruction->IsAdd()) {
1107 DCHECK(instruction->IsSub());
1127 if (instruction->IsAdd()) {
1132 } else if (instruction->IsSub()) {
1258 void LocationsBuilderMIPS64::VisitAdd(HAdd* instruction) {
1259 HandleBinaryOp(instruction);
1262 void InstructionCodeGeneratorMIPS64::VisitAdd(HAdd* instruction) {
1263 HandleBinaryOp(instruction);
1266 void LocationsBuilderMIPS64::VisitAnd(HAnd* instruction) {
1267 HandleBinaryOp(instruction);
1270 void InstructionCodeGeneratorMIPS64::VisitAnd(HAnd* instruction) {
1271 HandleBinaryOp(instruction);
1274 void LocationsBuilderMIPS64::VisitArrayGet(HArrayGet* instruction) {
1276 new (GetGraph()->GetArena()) LocationSummary(instruction, LocationSummary::kNoCall);
1278 locations->SetInAt(1, Location::RegisterOrConstant(instruction->InputAt(1)));
1279 if (Primitive::IsFloatingPointType(instruction->GetType())) {
1286 void InstructionCodeGeneratorMIPS64::VisitArrayGet(HArrayGet* instruction) {
1287 LocationSummary* locations = instruction->GetLocations();
1290 Primitive::Type type = instruction->GetType();
1415 LOG(FATAL) << "Unreachable type " << instruction->GetType();
1418 codegen_->MaybeRecordImplicitNullCheck(instruction);
1421 void LocationsBuilderMIPS64::VisitArrayLength(HArrayLength* instruction) {
1422 LocationSummary* locations = new (GetGraph()->GetArena()) LocationSummary(instruction);
1427 void InstructionCodeGeneratorMIPS64::VisitArrayLength(HArrayLength* instruction) {
1428 LocationSummary* locations = instruction->GetLocations();
1433 codegen_->MaybeRecordImplicitNullCheck(instruction);
1436 void LocationsBuilderMIPS64::VisitArraySet(HArraySet* instruction) {
1437 bool needs_runtime_call = instruction->NeedsTypeCheck();
1439 instruction,
1448 locations->SetInAt(1, Location::RegisterOrConstant(instruction->InputAt(1)));
1449 if (Primitive::IsFloatingPointType(instruction->InputAt(2)->GetType())) {
1457 void InstructionCodeGeneratorMIPS64::VisitArraySet(HArraySet* instruction) {
1458 LocationSummary* locations = instruction->GetLocations();
1461 Primitive::Type value_type = instruction->GetComponentType();
1464 CodeGenerator::StoreNeedsWriteBarrier(value_type, instruction->GetValue());
1513 codegen_->MaybeRecordImplicitNullCheck(instruction);
1516 codegen_->MarkGCCard(obj, value, instruction->GetValueCanBeNull());
1521 instruction,
1522 instruction->GetDexPc(),
1577 LOG(FATAL) << "Unreachable type " << instruction->GetType();
1583 codegen_->MaybeRecordImplicitNullCheck(instruction);
1587 void LocationsBuilderMIPS64::VisitBoundsCheck(HBoundsCheck* instruction) {
1588 LocationSummary::CallKind call_kind = instruction->CanThrowIntoCatchBlock()
1591 LocationSummary* locations = new (GetGraph()->GetArena()) LocationSummary(instruction, call_kind);
1594 if (instruction->HasUses()) {
1599 void InstructionCodeGeneratorMIPS64::VisitBoundsCheck(HBoundsCheck* instruction) {
1600 LocationSummary* locations = instruction->GetLocations();
1602 new (GetGraph()->GetArena()) BoundsCheckSlowPathMIPS64(instruction);
1614 void LocationsBuilderMIPS64::VisitCheckCast(HCheckCast* instruction) {
1616 instruction,
1624 void InstructionCodeGeneratorMIPS64::VisitCheckCast(HCheckCast* instruction) {
1625 LocationSummary* locations = instruction->GetLocations();
1631 new (GetGraph()->GetArena()) TypeCheckSlowPathMIPS64(instruction);
1692 void InstructionCodeGeneratorMIPS64::VisitCompare(HCompare* instruction) {
1693 LocationSummary* locations = instruction->GetLocations();
1695 Primitive::Type in_type = instruction->InputAt(0)->GetType();
1741 if (instruction->IsGtBias()) {
1763 if (instruction->IsGtBias()) {
1783 void LocationsBuilderMIPS64::HandleCondition(HCondition* instruction) {
1784 LocationSummary* locations = new (GetGraph()->GetArena()) LocationSummary(instruction);
1785 switch (instruction->InputAt(0)->GetType()) {
1789 locations->SetInAt(1, Location::RegisterOrConstant(instruction->InputAt(1)));
1798 if (!instruction->IsEmittedAtUseSite()) {
1803 void InstructionCodeGeneratorMIPS64::HandleCondition(HCondition* instruction) {
1804 if (instruction->IsEmittedAtUseSite()) {
1808 Primitive::Type type = instruction->InputAt(0)->GetType();
1809 LocationSummary* locations = instruction->GetLocations();
1816 GenerateIntLongCompare(instruction->GetCondition(), /* is64bit */ false, locations);
1819 GenerateIntLongCompare(instruction->GetCondition(), /* is64bit */ true, locations);
1825 GenerateFpCompareAndBranch(instruction->GetCondition(),
1826 instruction->IsGtBias(),
1846 void InstructionCodeGeneratorMIPS64::DivRemOneOrMinusOne(HBinaryOperation* instruction) {
1847 DCHECK(instruction->IsDiv() || instruction->IsRem());
1848 Primitive::Type type = instruction->GetResultType();
1850 LocationSummary* locations = instruction->GetLocations();
1859 if (instruction->IsRem()) {
1875 void InstructionCodeGeneratorMIPS64::DivRemByPowerOfTwo(HBinaryOperation* instruction) {
1876 DCHECK(instruction->IsDiv() || instruction->IsRem());
1877 Primitive::Type type = instruction->GetResultType();
1879 LocationSummary* locations = instruction->GetLocations();
1889 if (instruction->IsDiv()) {
1979 void InstructionCodeGeneratorMIPS64::GenerateDivRemWithAnyConstant(HBinaryOperation* instruction) {
1980 DCHECK(instruction->IsDiv() || instruction->IsRem());
1982 LocationSummary* locations = instruction->GetLocations();
1990 Primitive::Type type = instruction->GetResultType();
2014 if (instruction->IsDiv()) {
2040 if (instruction->IsDiv()) {
2053 void InstructionCodeGeneratorMIPS64::GenerateDivRemIntegral(HBinaryOperation* instruction) {
2054 DCHECK(instruction->IsDiv() || instruction->IsRem());
2055 Primitive::Type type = instruction->GetResultType();
2058 LocationSummary* locations = instruction->GetLocations();
2067 DivRemOneOrMinusOne(instruction);
2069 DivRemByPowerOfTwo(instruction);
2072 GenerateDivRemWithAnyConstant(instruction);
2077 if (instruction->IsDiv()) {
2114 void InstructionCodeGeneratorMIPS64::VisitDiv(HDiv* instruction) {
2115 Primitive::Type type = instruction->GetType();
2116 LocationSummary* locations = instruction->GetLocations();
2121 GenerateDivRemIntegral(instruction);
2139 void LocationsBuilderMIPS64::VisitDivZeroCheck(HDivZeroCheck* instruction) {
2140 LocationSummary::CallKind call_kind = instruction->CanThrowIntoCatchBlock()
2143 LocationSummary* locations = new (GetGraph()->GetArena()) LocationSummary(instruction, call_kind);
2144 locations->SetInAt(0, Location::RegisterOrConstant(instruction->InputAt(0)));
2145 if (instruction->HasUses()) {
2150 void InstructionCodeGeneratorMIPS64::VisitDivZeroCheck(HDivZeroCheck* instruction) {
2152 new (GetGraph()->GetArena()) DivZeroCheckSlowPathMIPS64(instruction);
2154 Location value = instruction->GetLocations()->InAt(0);
2156 Primitive::Type type = instruction->GetType();
2293 // only the slt instruction but no sge.
2305 // only the slti instruction but no sgti.
2316 // only the slt instruction but no sle.
2339 // only the sltu instruction but no sgeu.
2357 // only the sltiu instruction but no sgtiu.
2368 // only the sltu instruction but no sleu.
2564 void InstructionCodeGeneratorMIPS64::GenerateTestAndBranch(HInstruction* instruction,
2568 HInstruction* cond = instruction->InputAt(condition_input_index);
2597 // The condition instruction has been materialized, compare the output to 0.
2598 Location cond_val = instruction->GetLocations()->InAt(condition_input_index);
2606 // The condition instruction has not been materialized, use its inputs as
2712 void LocationsBuilderMIPS64::HandleFieldGet(HInstruction* instruction,
2715 new (GetGraph()->GetArena()) LocationSummary(instruction, LocationSummary::kNoCall);
2717 if (Primitive::IsFloatingPointType(instruction->GetType())) {
2724 void InstructionCodeGeneratorMIPS64::HandleFieldGet(HInstruction* instruction,
2727 LocationSummary* locations = instruction->GetLocations();
2768 codegen_->MaybeRecordImplicitNullCheck(instruction);
2772 void LocationsBuilderMIPS64::HandleFieldSet(HInstruction* instruction,
2775 new (GetGraph()->GetArena()) LocationSummary(instruction, LocationSummary::kNoCall);
2777 if (Primitive::IsFloatingPointType(instruction->InputAt(1)->GetType())) {
2784 void InstructionCodeGeneratorMIPS64::HandleFieldSet(HInstruction* instruction,
2788 LocationSummary* locations = instruction->GetLocations();
2823 codegen_->MaybeRecordImplicitNullCheck(instruction);
2825 if (CodeGenerator::StoreNeedsWriteBarrier(type, instruction->InputAt(1))) {
2832 void LocationsBuilderMIPS64::VisitInstanceFieldGet(HInstanceFieldGet* instruction) {
2833 HandleFieldGet(instruction, instruction->GetFieldInfo());
2836 void InstructionCodeGeneratorMIPS64::VisitInstanceFieldGet(HInstanceFieldGet* instruction) {
2837 HandleFieldGet(instruction, instruction->GetFieldInfo());
2840 void LocationsBuilderMIPS64::VisitInstanceFieldSet(HInstanceFieldSet* instruction) {
2841 HandleFieldSet(instruction, instruction->GetFieldInfo());
2844 void InstructionCodeGeneratorMIPS64::VisitInstanceFieldSet(HInstanceFieldSet* instruction) {
2845 HandleFieldSet(instruction, instruction->GetFieldInfo(), instruction->GetValueCanBeNull());
2848 void LocationsBuilderMIPS64::VisitInstanceOf(HInstanceOf* instruction) {
2850 instruction->IsExactCheck() ? LocationSummary::kNoCall : LocationSummary::kCallOnSlowPath;
2851 LocationSummary* locations = new (GetGraph()->GetArena()) LocationSummary(instruction, call_kind);
2859 void InstructionCodeGeneratorMIPS64::VisitInstanceOf(HInstanceOf* instruction) {
2860 LocationSummary* locations = instruction->GetLocations();
2874 if (instruction->IsExactCheck()) {
2882 new (GetGraph()->GetArena()) TypeCheckSlowPathMIPS64(instruction);
3298 void LocationsBuilderMIPS64::VisitMonitorOperation(HMonitorOperation* instruction) {
3300 new (GetGraph()->GetArena()) LocationSummary(instruction, LocationSummary::kCall);
3305 void InstructionCodeGeneratorMIPS64::VisitMonitorOperation(HMonitorOperation* instruction) {
3306 codegen_->InvokeRuntime(instruction->IsEnter()
3309 instruction,
3310 instruction->GetDexPc(),
3312 if (instruction->IsEnter()) {
3342 void InstructionCodeGeneratorMIPS64::VisitMul(HMul* instruction) {
3343 Primitive::Type type = instruction->GetType();
3344 LocationSummary* locations = instruction->GetLocations();
3395 void InstructionCodeGeneratorMIPS64::VisitNeg(HNeg* instruction) {
3396 Primitive::Type type = instruction->GetType();
3397 LocationSummary* locations = instruction->GetLocations();
3425 void LocationsBuilderMIPS64::VisitNewArray(HNewArray* instruction) {
3427 new (GetGraph()->GetArena()) LocationSummary(instruction, LocationSummary::kCall);
3435 void InstructionCodeGeneratorMIPS64::VisitNewArray(HNewArray* instruction) {
3436 LocationSummary* locations = instruction->GetLocations();
3438 __ LoadConst32(locations->GetTemp(0).AsRegister<GpuRegister>(), instruction->GetTypeIndex());
3439 codegen_->InvokeRuntime(instruction->GetEntrypoint(),
3440 instruction,
3441 instruction->GetDexPc(),
3446 void LocationsBuilderMIPS64::VisitNewInstance(HNewInstance* instruction) {
3448 new (GetGraph()->GetArena()) LocationSummary(instruction, LocationSummary::kCall);
3450 if (instruction->IsStringAlloc()) {
3459 void InstructionCodeGeneratorMIPS64::VisitNewInstance(HNewInstance* instruction) {
3460 if (instruction->IsStringAlloc()) {
3462 GpuRegister temp = instruction->GetLocations()->GetTemp(0).AsRegister<GpuRegister>();
3469 codegen_->RecordPcInfo(instruction, instruction->GetDexPc());
3471 codegen_->InvokeRuntime(instruction->GetEntrypoint(),
3472 instruction,
3473 instruction->GetDexPc(),
3479 void LocationsBuilderMIPS64::VisitNot(HNot* instruction) {
3480 LocationSummary* locations = new (GetGraph()->GetArena()) LocationSummary(instruction);
3485 void InstructionCodeGeneratorMIPS64::VisitNot(HNot* instruction) {
3486 Primitive::Type type = instruction->GetType();
3487 LocationSummary* locations = instruction->GetLocations();
3499 LOG(FATAL) << "Unexpected type for not operation " << instruction->GetResultType();
3503 void LocationsBuilderMIPS64::VisitBooleanNot(HBooleanNot* instruction) {
3504 LocationSummary* locations = new (GetGraph()->GetArena()) LocationSummary(instruction);
3509 void InstructionCodeGeneratorMIPS64::VisitBooleanNot(HBooleanNot* instruction) {
3510 LocationSummary* locations = instruction->GetLocations();
3516 void LocationsBuilderMIPS64::VisitNullCheck(HNullCheck* instruction) {
3517 LocationSummary::CallKind call_kind = instruction->CanThrowIntoCatchBlock()
3520 LocationSummary* locations = new (GetGraph()->GetArena()) LocationSummary(instruction, call_kind);
3522 if (instruction->HasUses()) {
3527 void CodeGeneratorMIPS64::GenerateImplicitNullCheck(HNullCheck* instruction) {
3528 if (CanMoveNullCheckToUser(instruction)) {
3531 Location obj = instruction->GetLocations()->InAt(0);
3534 RecordPcInfo(instruction, instruction->GetDexPc());
3537 void CodeGeneratorMIPS64::GenerateExplicitNullCheck(HNullCheck* instruction) {
3538 SlowPathCodeMIPS64* slow_path = new (GetGraph()->GetArena()) NullCheckSlowPathMIPS64(instruction);
3541 Location obj = instruction->GetLocations()->InAt(0);
3546 void InstructionCodeGeneratorMIPS64::VisitNullCheck(HNullCheck* instruction) {
3547 codegen_->GenerateNullCheck(instruction);
3550 void LocationsBuilderMIPS64::VisitOr(HOr* instruction) {
3551 HandleBinaryOp(instruction);
3554 void InstructionCodeGeneratorMIPS64::VisitOr(HOr* instruction) {
3555 HandleBinaryOp(instruction);
3558 void LocationsBuilderMIPS64::VisitParallelMove(HParallelMove* instruction ATTRIBUTE_UNUSED) {
3562 void InstructionCodeGeneratorMIPS64::VisitParallelMove(HParallelMove* instruction) {
3563 codegen_->GetMoveResolver()->EmitNativeCode(instruction);
3566 void LocationsBuilderMIPS64::VisitParameterValue(HParameterValue* instruction) {
3567 LocationSummary* locations = new (GetGraph()->GetArena()) LocationSummary(instruction);
3568 Location location = parameter_visitor_.GetNextLocation(instruction->GetType());
3577 void InstructionCodeGeneratorMIPS64::VisitParameterValue(HParameterValue* instruction
3582 void LocationsBuilderMIPS64::VisitCurrentMethod(HCurrentMethod* instruction) {
3584 new (GetGraph()->GetArena()) LocationSummary(instruction, LocationSummary::kNoCall);
3588 void InstructionCodeGeneratorMIPS64::VisitCurrentMethod(HCurrentMethod* instruction
3593 void LocationsBuilderMIPS64::VisitPhi(HPhi* instruction) {
3594 LocationSummary* locations = new (GetGraph()->GetArena()) LocationSummary(instruction);
3595 for (size_t i = 0, e = instruction->InputCount(); i < e; ++i) {
3601 void InstructionCodeGeneratorMIPS64::VisitPhi(HPhi* instruction ATTRIBUTE_UNUSED) {
3633 void InstructionCodeGeneratorMIPS64::VisitRem(HRem* instruction) {
3634 Primitive::Type type = instruction->GetType();
3639 GenerateDivRemIntegral(instruction);
3646 codegen_->InvokeRuntime(entry_offset, instruction, instruction->GetDexPc(), nullptr);
3709 void LocationsBuilderMIPS64::VisitSub(HSub* instruction) {
3710 HandleBinaryOp(instruction);
3713 void InstructionCodeGeneratorMIPS64::VisitSub(HSub* instruction) {
3714 HandleBinaryOp(instruction);
3717 void LocationsBuilderMIPS64::VisitStaticFieldGet(HStaticFieldGet* instruction) {
3718 HandleFieldGet(instruction, instruction->GetFieldInfo());
3721 void InstructionCodeGeneratorMIPS64::VisitStaticFieldGet(HStaticFieldGet* instruction) {
3722 HandleFieldGet(instruction, instruction->GetFieldInfo());
3725 void LocationsBuilderMIPS64::VisitStaticFieldSet(HStaticFieldSet* instruction) {
3726 HandleFieldSet(instruction, instruction->GetFieldInfo());
3729 void InstructionCodeGeneratorMIPS64::VisitStaticFieldSet(HStaticFieldSet* instruction) {
3730 HandleFieldSet(instruction, instruction->GetFieldInfo(), instruction->GetValueCanBeNull());
3734 HUnresolvedInstanceFieldGet* instruction) {
3737 instruction, instruction->GetFieldType(), calling_convention);
3741 HUnresolvedInstanceFieldGet* instruction) {
3743 codegen_->GenerateUnresolvedFieldAccess(instruction,
3744 instruction->GetFieldType(),
3745 instruction->GetFieldIndex(),
3746 instruction->GetDexPc(),
3751 HUnresolvedInstanceFieldSet* instruction) {
3754 instruction, instruction->GetFieldType(), calling_convention);
3758 HUnresolvedInstanceFieldSet* instruction) {
3760 codegen_->GenerateUnresolvedFieldAccess(instruction,
3761 instruction->GetFieldType(),
3762 instruction->GetFieldIndex(),
3763 instruction->GetDexPc(),
3768 HUnresolvedStaticFieldGet* instruction) {
3771 instruction, instruction->GetFieldType(), calling_convention);
3775 HUnresolvedStaticFieldGet* instruction) {
3777 codegen_->GenerateUnresolvedFieldAccess(instruction,
3778 instruction->GetFieldType(),
3779 instruction->GetFieldIndex(),
3780 instruction->GetDexPc(),
3785 HUnresolvedStaticFieldSet* instruction) {
3788 instruction, instruction->GetFieldType(), calling_convention);
3792 HUnresolvedStaticFieldSet* instruction) {
3794 codegen_->GenerateUnresolvedFieldAccess(instruction,
3795 instruction->GetFieldType(),
3796 instruction->GetFieldIndex(),
3797 instruction->GetDexPc(),
3801 void LocationsBuilderMIPS64::VisitSuspendCheck(HSuspendCheck* instruction) {
3802 new (GetGraph()->GetArena()) LocationSummary(instruction, LocationSummary::kCallOnSlowPath);
3805 void InstructionCodeGeneratorMIPS64::VisitSuspendCheck(HSuspendCheck* instruction) {
3806 HBasicBlock* block = instruction->GetBlock();
3808 DCHECK(block->GetLoopInformation()->GetSuspendCheck() == instruction);
3812 if (block->IsEntryBlock() && instruction->GetNext()->IsGoto()) {
3816 GenerateSuspendCheck(instruction, nullptr);
3819 void LocationsBuilderMIPS64::VisitThrow(HThrow* instruction) {
3821 new (GetGraph()->GetArena()) LocationSummary(instruction, LocationSummary::kCall);
3826 void InstructionCodeGeneratorMIPS64::VisitThrow(HThrow* instruction) {
3828 instruction,
3829 instruction->GetDexPc(),
3932 // When NAN2008=0 (R2 and before), the truncate instruction produces the maximum positive
3937 // When NAN2008=1 (R6), the truncate instruction caps the output at the minimum/maximum
3942 // So, NAN2008 affects handling of negative values and NaNs by the truncate instruction.
3945 // instruction, the reason being that the emulator implements NAN2008=0 on MIPS64R6,
3951 // instruction, which will handle such an input the same way irrespective of NAN2008.
3956 // truncate instruction for MIPS64R6.
4032 void LocationsBuilderMIPS64::VisitXor(HXor* instruction) {
4033 HandleBinaryOp(instruction);
4036 void InstructionCodeGeneratorMIPS64::VisitXor(HXor* instruction) {
4037 HandleBinaryOp(instruction);
4040 void LocationsBuilderMIPS64::VisitBoundType(HBoundType* instruction ATTRIBUTE_UNUSED) {
4045 void InstructionCodeGeneratorMIPS64::VisitBoundType(HBoundType* instruction ATTRIBUTE_UNUSED) {
4154 // this case, index >= num_entries must be true. So that we can save one branch instruction.