提交 78411a26 编写于 作者: T Tomas

Fix intrinsics treatment in Crossgen2

This change fixes unintentional differences in the treatment of
intrinsics in Crossgen2 compared to Crossgen1 I found while
investigating failures in the regression test b426654. While the
change by itself doesn't fully fix the test, I believe it to be
generally useful towards removing the remaining codegen
differences between the compilers.

Thanks

Tomas
上级 672dd763
......@@ -179,7 +179,7 @@ private CorInfoIntrinsics getIntrinsicID(MethodDesc method, byte* pMustExpand)
if (pMustExpand != null)
*pMustExpand = 0;
Debug.Assert(method.IsIntrinsic);
Debug.Assert(method.IsIntrinsic || method.IsInternalCall);
IntrinsicKey key = new IntrinsicKey();
key.MethodName = method.Name;
......
......@@ -622,8 +622,8 @@ private uint getMethodAttribsInternal(MethodDesc method)
if (method.IsSynchronized)
result |= CorInfoFlag.CORINFO_FLG_SYNCH;
if (method.IsIntrinsic)
result |= CorInfoFlag.CORINFO_FLG_INTRINSIC | CorInfoFlag.CORINFO_FLG_JIT_INTRINSIC;
if (method.IsIntrinsic || method.IsInternalCall)
result |= CorInfoFlag.CORINFO_FLG_INTRINSIC;
if (method.IsVirtual)
result |= CorInfoFlag.CORINFO_FLG_VIRTUAL;
if (method.IsAbstract)
......@@ -712,6 +712,11 @@ private uint getMethodAttribsInternal(MethodDesc method)
}
}
if (method.HasCustomAttribute("System.Runtime.CompilerServices", "IntrinsicAttribute"))
{
result |= CorInfoFlag.CORINFO_FLG_JIT_INTRINSIC;
}
result |= CorInfoFlag.CORINFO_FLG_NOSECURITYWRAP;
return (uint)result;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册