summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJarret Shook <jashoo@microsoft.com>2019-07-19 04:07:08 (GMT)
committerGleb Balykov <g.balykov@samsung.com>2020-03-25 12:29:41 (GMT)
commitcd4e24b64ffdbf309cd077dd6a68c832f63b9661 (patch)
tree9dcdbf65182a360421b172a6ca5bd163cc8219cd /src
parent30e6f2786fb3d80a2b7543304f7765c180cd44d5 (diff)
downloadcoreclr-cd4e24b64ffdbf309cd077dd6a68c832f63b9661.zip
coreclr-cd4e24b64ffdbf309cd077dd6a68c832f63b9661.tar.gz
coreclr-cd4e24b64ffdbf309cd077dd6a68c832f63b9661.tar.bz2
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 5d5d471..afdb3c9 100644
--- a/src/jit/morph.cpp
+++ b/src/jit/morph.cpp
@@ -7364,6 +7364,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);
@@ -8288,7 +8292,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 =
@@ -8308,7 +8312,7 @@ GenTree* Compiler::fgMorphCall(GenTreeCall* call)
}
}
}
-#endif // !_TARGET_X86_
+#endif // !defined(_TARGET_X86_) || defined(_TARGET_UNIX_)
if (szFailReason != nullptr)
{