summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJarret Shook <jashoo@microsoft.com>2020-01-14 10:35:01 -0800
committerAnirudh Agnihotry <anirudhagnihotry098@gmail.com>2020-01-14 10:35:01 -0800
commit593608385d854b2a16631d4df8cf3b43a86c84fe (patch)
treebe6d511bab44b49432d3fd64c1277d6f448dd599 /src
parent719bfcc82f2dd2e27125f834540bff8b35f94894 (diff)
downloadcoreclr-593608385d854b2a16631d4df8cf3b43a86c84fe.tar.gz
coreclr-593608385d854b2a16631d4df8cf3b43a86c84fe.tar.bz2
coreclr-593608385d854b2a16631d4df8cf3b43a86c84fe.zip
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
Diffstat (limited to 'src')
-rw-r--r--src/jit/morph.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/jit/morph.cpp b/src/jit/morph.cpp
index c087fb069f..dfea9e7832 100644
--- a/src/jit/morph.cpp
+++ b/src/jit/morph.cpp
@@ -7047,6 +7047,19 @@ bool Compiler::fgCanFastTailCall(GenTreeCall* callee)
// out-going area required for callee is bounded by caller's fixed argument space.
//
// Note that callee being a vararg method is not a problem since we can account the params being passed.
+ //
+ // We will currently decide to not fast tail call on Windows armarch if the caller or callee is a vararg
+ // method. This is due to the ABI differences for native vararg methods for these platforms. There is
+ // work required to shuffle arguments to the correct locations.
+
+#if (defined(_TARGET_WINDOWS_) && defined(_TARGET_ARM_)) || (defined(_TARGET_WINDOWS_) && defined(_TARGET_ARM64_))
+ if (info.compIsVarArgs || callee->IsVarargs())
+ {
+ reportFastTailCallDecision("Fast tail calls with varargs not supported on Windows ARM/ARM64", 0, 0);
+ return false;
+ }
+#endif // (defined(_TARGET_WINDOWS_) && defined(_TARGET_ARM_)) || defined(_TARGET_WINDOWS_) && defined(_TARGET_ARM64_))
+
unsigned nCallerArgs = info.compArgsCount;
size_t callerArgRegCount = codeGen->intRegState.rsCalleeRegArgCount;