Fail to explicitly tail call on x86 unix. (#25032)
[platform/upstream/coreclr.git] / src / jit / morph.cpp
index c087fb0..5450b43 100644 (file)
@@ -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)
         {