Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Optimize virtual call stub for R2R ARM/ARM64 scenarios
  • Loading branch information
kunalspathak committed May 27, 2020
commit cbb1e455f070b8974f19810162aab6fa46358bb5
5 changes: 3 additions & 2 deletions src/coreclr/src/jit/codegenarmarch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2521,11 +2521,12 @@ void CodeGen::genCallInstruction(GenTreeCall* call)
retSize MULTIREG_HAS_SECOND_GC_RET_ONLY_ARG(secondRetSize), ilOffset, target->GetRegNum());
}
#if defined(FEATURE_READYTORUN_COMPILER) && defined(TARGET_ARMARCH)
else if (call->IsR2RRelativeIndir())
else if (call->IsR2RRelativeIndir() || call->IsVirtualStubRelativeIndir())
{
// Generate a direct call to a non-virtual user defined or helper method
assert(callType == CT_HELPER || callType == CT_USER_FUNC);
assert(call->gtEntryPoint.accessType == IAT_PVALUE);
assert(((call->IsR2RRelativeIndir()) && (call->gtEntryPoint.accessType == IAT_PVALUE)) ||
((call->IsVirtualStubRelativeIndir()) && (call->gtEntryPoint.accessType == IAT_VALUE)));
assert(call->gtControlExpr == nullptr);

regNumber tmpReg = call->GetSingleTempReg();
Expand Down
4 changes: 4 additions & 0 deletions src/coreclr/src/jit/lower.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4529,7 +4529,11 @@ GenTree* Lowering::LowerVirtualStubCall(GenTreeCall* call)
}
else
{
#if defined(FEATURE_READYTORUN_COMPILER) && defined(TARGET_ARMARCH)
result = nullptr;
#else
result = Ind(addr);
#endif // defined(FEATURE_READYTORUN_COMPILER) && defined(TARGET_ARMARCH)
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/src/jit/lsraarmarch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ int LinearScan::BuildCall(GenTreeCall* call)
}
}
#if defined(FEATURE_READYTORUN_COMPILER) && defined(TARGET_ARMARCH)
else if (call->IsR2RRelativeIndir())
else if (call->IsR2RRelativeIndir() || call->IsVirtualStubRelativeIndir())
{
buildInternalIntRegisterDefForNode(call);
}
Expand Down