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
if (pMustExpand != null)
*pMustExpand = 0;
- Debug.Assert(method.IsIntrinsic);
+ Debug.Assert(method.IsIntrinsic || method.IsInternalCall);
IntrinsicKey key = new IntrinsicKey();
key.MethodName = method.Name;
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)
}
}
+ if (method.HasCustomAttribute("System.Runtime.CompilerServices", "IntrinsicAttribute"))
+ {
+ result |= CorInfoFlag.CORINFO_FLG_JIT_INTRINSIC;
+ }
+
result |= CorInfoFlag.CORINFO_FLG_NOSECURITYWRAP;
return (uint)result;