From: Jan Vorlicek Date: Tue, 14 Apr 2015 11:32:51 +0000 (+0200) Subject: Disable JIT_TailCall invocation on Unix X-Git-Tag: accepted/tizen/base/20180629.140029~6850^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0d796e67df3771590b510d87b9799d8d9d280943;p=platform%2Fupstream%2Fcoreclr.git Disable JIT_TailCall invocation on Unix This change prevents jitter from performing tail calls in case the tail call would require a tailcall helper. The reason is that we don't have the JIT_TailCall function implemented for Unix and even if we did, the underlying function to copy the arguments, the StubLinkerCPU::CreateTailCallCopyArgsThunk, would be difficult to port to Unix due to the fact that it assumes that va_list is represented as the parameters being placed in memory one after another while on Unix, it is an opaque structure. Jan Kotas has recommended to disable this kind of tail calls on Unix and create a work item to refactor the way these tail calls are implemented. Besides these Unix specific issues, the current implementation has performance and maintainability issues, according to Jan Kotas. --- diff --git a/src/jit/morph.cpp b/src/jit/morph.cpp index 7f5ca56..37ca4b1 100644 --- a/src/jit/morph.cpp +++ b/src/jit/morph.cpp @@ -5646,7 +5646,11 @@ GenTreePtr Compiler::fgMorphCall(GenTreeCall* call) // fast calls. if (!canFastTailCall) { +#ifndef FEATURE_PAL fgMorphTailCall(call); +#else // FEATURE_PAL + goto NO_TAIL_CALL; +#endif // FEATURE_PAL } // Implementation note : If we optimize tailcall to do a direct jump