summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJarret Shook <jashoo@microsoft.com>2019-07-18 21:07:08 -0700
committerKonstantin Baladurin <k.baladurin@samsung.com>2019-09-26 00:24:34 +0300
commit3c712b4edebc46b599319af234484477e5017514 (patch)
tree2bcf8480bfb7e9585c16af8becf68c0fd5a55c52 /src
parentc3cf61b667daa58fbe8fc0a1ee1894c5b32c0221 (diff)
downloadcoreclr-3c712b4edebc46b599319af234484477e5017514.tar.gz
coreclr-3c712b4edebc46b599319af234484477e5017514.tar.bz2
coreclr-3c712b4edebc46b599319af234484477e5017514.zip
Fail to explicitly tail call on x86 unix. (#25032)
* Fail to explicitly tail call on x86 unix. * Correctly return 100 * Correct return value * Add noway assert in morphTailCall to avoid morphing slow tail calls on unix. * Address feedback
Diffstat (limited to 'src')
-rw-r--r--src/jit/morph.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/jit/morph.cpp b/src/jit/morph.cpp
index c087fb069f..5450b4396c 100644
--- a/src/jit/morph.cpp
+++ b/src/jit/morph.cpp
@@ -7351,6 +7351,10 @@ bool Compiler::fgCanFastTailCall(GenTreeCall* callee)
*/
void Compiler::fgMorphTailCall(GenTreeCall* call, void* pfnCopyArgs)
{
+#if defined(_TARGET_UNIX_)
+ noway_assert(!"Slow tail calls not supported on non-Windows platforms.");
+#endif
+
JITDUMP("fgMorphTailCall (before):\n");
DISPTREE(call);
@@ -8275,7 +8279,7 @@ GenTree* Compiler::fgMorphCall(GenTreeCall* call)
}
void* pfnCopyArgs = nullptr;
-#if !defined(_TARGET_X86_)
+#if !defined(_TARGET_X86_) || defined(_TARGET_UNIX_)
if (!canFastTailCall && szFailReason == nullptr)
{
pfnCopyArgs =
@@ -8295,7 +8299,7 @@ GenTree* Compiler::fgMorphCall(GenTreeCall* call)
}
}
}
-#endif // !_TARGET_X86_
+#endif // !defined(_TARGET_X86_) || defined(_TARGET_UNIX_)
if (szFailReason != nullptr)
{