Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit 5936083

Browse files
Jarret ShookAnipik
authored andcommitted
This is a point fix for not allowing fast tail calls on windows arm64 for vararg methods (#27963)
* This is a point fix for not allowing fast tail calls on windows arm64 This only affects windows arm and arm64. * Fix build break
1 parent 719bfcc commit 5936083

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/jit/morph.cpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7047,6 +7047,19 @@ bool Compiler::fgCanFastTailCall(GenTreeCall* callee)
70477047
// out-going area required for callee is bounded by caller's fixed argument space.
70487048
//
70497049
// Note that callee being a vararg method is not a problem since we can account the params being passed.
7050+
//
7051+
// We will currently decide to not fast tail call on Windows armarch if the caller or callee is a vararg
7052+
// method. This is due to the ABI differences for native vararg methods for these platforms. There is
7053+
// work required to shuffle arguments to the correct locations.
7054+
7055+
#if (defined(_TARGET_WINDOWS_) && defined(_TARGET_ARM_)) || (defined(_TARGET_WINDOWS_) && defined(_TARGET_ARM64_))
7056+
if (info.compIsVarArgs || callee->IsVarargs())
7057+
{
7058+
reportFastTailCallDecision("Fast tail calls with varargs not supported on Windows ARM/ARM64", 0, 0);
7059+
return false;
7060+
}
7061+
#endif // (defined(_TARGET_WINDOWS_) && defined(_TARGET_ARM_)) || defined(_TARGET_WINDOWS_) && defined(_TARGET_ARM64_))
7062+
70507063
unsigned nCallerArgs = info.compArgsCount;
70517064

70527065
size_t callerArgRegCount = codeGen->intRegState.rsCalleeRegArgCount;

0 commit comments

Comments
 (0)