if (!impIsTailCallILPattern(tailCall, opcode, codeAddr + sz, codeEndp, isRecursive,
&isCallPopAndRet))
{
-#ifdef _TARGET_AMD64_
+#if !defined(FEATURE_CORECLR) && defined(_TARGET_AMD64_)
BADCODE3("tail call not followed by ret or pop+ret", " at offset %04X",
(IL_OFFSET)(codeAddr - codeBegp));
#else
BADCODE3("tail call not followed by ret", " at offset %04X", (IL_OFFSET)(codeAddr - codeBegp));
-#endif //_TARGET_AMD64_
+#endif // !FEATURE_CORECLR && _TARGET_AMD64_
}
-#ifdef _TARGET_AMD64_
+#if !defined(FEATURE_CORECLR) && defined(_TARGET_AMD64_)
if (isCallPopAndRet)
{
// By breaking here, we let pop and ret opcodes to be
// in fgMorphCall().
break;
}
-#endif //_TARGET_AMD64_
+#endif // !FEATURE_CORECLR && _TARGET_AMD64_
}
else
{
int cntPop = 0;
OPCODE nextOpcode;
-#ifdef _TARGET_AMD64_
+#if !defined(FEATURE_CORECLR) && defined(_TARGET_AMD64_)
do
{
nextOpcode = (OPCODE)getU1LittleEndian(codeAddrOfNextOpcode);
// one pop seen so far.
#else
nextOpcode = (OPCODE)getU1LittleEndian(codeAddrOfNextOpcode);
-#endif
+#endif // !FEATURE_CORECLR && _TARGET_AMD64_
if (isCallPopAndRet)
{
*isCallPopAndRet = (nextOpcode == CEE_RET) && (cntPop == 1);
}
-#ifdef _TARGET_AMD64_
+#if !defined(FEATURE_CORECLR) && defined(_TARGET_AMD64_)
// Jit64 Compat:
// Tail call IL pattern could be either of the following
// 1) call/callvirt/calli + ret
// 2) call/callvirt/calli + pop + ret in a method returning void.
return (nextOpcode == CEE_RET) && ((cntPop == 0) || ((cntPop == 1) && (info.compRetType == TYP_VOID)));
-#else //!_TARGET_AMD64_
+#else
return (nextOpcode == CEE_RET) && (cntPop == 0);
-#endif
+#endif // !FEATURE_CORECLR && _TARGET_AMD64_
}
/*****************************************************************************
// We must have imported a tailcall and jumped to RET
if (prefixFlags & PREFIX_TAILCALL)
{
-#ifndef _TARGET_AMD64_
+#if defined(FEATURE_CORECLR) || !defined(_TARGET_AMD64_)
// Jit64 compat:
// This cannot be asserted on Amd64 since we permit the following IL pattern:
// tail.call
// pop
// ret
assert(verCurrentState.esStackDepth == 0 && impOpcodeIsCallOpcode(opcode));
-#endif
+#endif // FEATURE_CORECLR || !_TARGET_AMD64_
opcode = CEE_RET; // To prevent trying to spill if CALL_SITE_BOUNDARIES
// the call.
GenTreeStmt* nextMorphStmt = fgMorphStmt->gtNextStmt;
-#ifdef _TARGET_AMD64_
+#if !defined(FEATURE_CORECLR) && defined(_TARGET_AMD64_)
// Legacy Jit64 Compat:
// There could be any number of GT_NOPs between tail call and GT_RETURN.
// That is tail call pattern could be one of the following:
fgRemoveStmt(compCurBB, morphStmtToRemove);
}
}
-#endif // _TARGET_AMD64_
+#endif // !FEATURE_CORECLR && _TARGET_AMD64_
// Delete GT_RETURN if any
if (nextMorphStmt != nullptr)
<ExcludeList Include="$(XunitTestBinBase)\Loader\classloader\TypeGeneratorTests\TypeGeneratorTest683\Generated683\*">
<Issue>6707</Issue>
</ExcludeList>
+ <ExcludeList Include="$(XunitTestBinBase)\JIT\Methodical\tailcall_v4\smallFrame\smallFrame.cmd">
+ <Issue>9880</Issue>
+ </ExcludeList>
+ <ExcludeList Include="$(XunitTestBinBase)JIT\opt\Tailcall\TailcallVerifyWithPrefix\TailcallVerifyWithPrefix.cmd">
+ <Issue>9880</Issue>
+ </ExcludeList>
</ItemGroup>
<!-- The following are x86 failures -->
<ExcludeList Include="$(XunitTestBinBase)\GC\LargeMemory\API\gc\suppressfinalize\suppressfinalize.cmd">
<Issue>3392, test is useful to have because it can be run manually when making changes to the GC that can have effects in OOM scenarios, but not appropriate to run on our current test infrastructure.</Issue>
</ExcludeList>
- <ExcludeList Include="$(XunitTestBinBase)\JIT\Methodical\tailcall_v4\smallFrame\smallFrame.cmd">
- <Issue>tail. call pop ret is only supported on amd64</Issue>
- </ExcludeList>
<ExcludeList Include="$(XunitTestBinBase)\JIT\opt\Tailcall\TailcallVerifyWithPrefix\TailcallVerifyWithPrefix.cmd">
<Issue>2420. x86 JIT doesn't support implicit tail call optimization or tail. call pop ret sequence</Issue>
</ExcludeList>
JIT/Methodical/tailcall/_il_dbgpointer_i/_il_dbgpointer_i.sh
JIT/Methodical/tailcall/_il_relpointer/_il_relpointer.sh
JIT/Methodical/tailcall/_il_relpointer_i/_il_relpointer_i.sh
+JIT/Methodical/tailcall_v4/smallFrame/smallFrame.sh
JIT/Methodical/varargs/callconv/gc_ctor_il_d/gc_ctor_il_d.sh
JIT/Methodical/varargs/callconv/gc_ctor_il_r/gc_ctor_il_r.sh
JIT/Methodical/varargs/callconv/val_ctor_il_d/val_ctor_il_d.sh
JIT/Methodical/varargs/seh/filter_il_r/filter_il_r.sh
JIT/opt/Inline/tests/security/security.sh
JIT/opt/Inline/tests/xmodb/xmodb.sh
+JIT/opt/Tailcall/TailcallVerifyWithPrefix/TailcallVerifyWithPrefix.sh
JIT/Regression/clr-x64-JIT/v2.1/b173569/b173569/b173569.sh
JIT/Regression/clr-x64-JIT/v4.0/devdiv374539/DevDiv_374539/DevDiv_374539.sh
JIT/Regression/CLR-x86-EJIT/V1-M12-Beta2/b26323/b26323/b26323.sh