Skip to content

Commit

Permalink
Suppress the special VSD callsite nop marker for NAOT x86 ABI (#105604)
Browse files Browse the repository at this point in the history
* Suppress the special VSD callsite nop marker for NAOT x86 ABI

* Fix JIT format
  • Loading branch information
filipnavara authored Jul 29, 2024
1 parent 0912e94 commit 0027e99
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/coreclr/jit/codegenxarch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6311,7 +6311,7 @@ void CodeGen::genCallInstruction(GenTreeCall* call X86_ARG(target_ssize_t stackA
if (target != nullptr)
{
#ifdef TARGET_X86
if (call->IsVirtualStub() && (call->gtCallType == CT_INDIRECT))
if (call->IsVirtualStub() && (call->gtCallType == CT_INDIRECT) && !compiler->IsTargetAbi(CORINFO_NATIVEAOT_ABI))
{
// On x86, we need to generate a very specific pattern for indirect VSD calls:
//
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/jit/lowerxarch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7829,7 +7829,7 @@ void Lowering::ContainCheckCallOperands(GenTreeCall* call)
//
// Where EAX is also used as an argument to the stub dispatch helper. Make
// sure that the call target address is computed into EAX in this case.
if (call->IsVirtualStub() && (call->gtCallType == CT_INDIRECT))
if (call->IsVirtualStub() && (call->gtCallType == CT_INDIRECT) && !comp->IsTargetAbi(CORINFO_NATIVEAOT_ABI))
{
assert(ctrlExpr->isIndir());
MakeSrcContained(call, ctrlExpr);
Expand Down
3 changes: 2 additions & 1 deletion src/coreclr/jit/lsraxarch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1257,7 +1257,8 @@ int LinearScan::BuildCall(GenTreeCall* call)
ctrlExprCandidates = RBM_INT_CALLEE_TRASH.GetIntRegSet();
}
#ifdef TARGET_X86
else if (call->IsVirtualStub() && (call->gtCallType == CT_INDIRECT))
else if (call->IsVirtualStub() && (call->gtCallType == CT_INDIRECT) &&
!compiler->IsTargetAbi(CORINFO_NATIVEAOT_ABI))
{
// On x86, we need to generate a very specific pattern for indirect VSD calls:
//
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/jit/morph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1981,7 +1981,7 @@ void CallArgs::AddFinalArgsAndDetermineABIInfo(Compiler* comp, GenTreeCall* call
// If/when we change that, the following code needs to be changed to correctly support the (TBD) managed calling
// convention for x86/SSE.

addStubCellArg = call->gtCallType != CT_INDIRECT && comp->IsTargetAbi(CORINFO_NATIVEAOT_ABI);
addStubCellArg = comp->IsTargetAbi(CORINFO_NATIVEAOT_ABI);
#endif

// We are allowed to have a ret buffer argument combined
Expand Down

0 comments on commit 0027e99

Please sign in to comment.