Properly report intrinsic fields (dotnet/corertdotnet/coreclr#6602)
authorMichal Strehovský <MichalStrehovsky@users.noreply.github.com>
Thu, 22 Nov 2018 16:01:17 +0000 (17:01 +0100)
committerJan Kotas <jkotas@microsoft.com>
Fri, 30 Nov 2018 06:41:32 +0000 (22:41 -0800)
* Properly report intrinsic fields

We were hitting an assert in RyuJIT because we were reporting IntPtr.Zero as an intrinsic even if we were not trying to `CORINFO_ACCESS_GET`.

I fixed that part and also went ahead to port the rest of getFieldIntrinsic from CoreCLR. We'll need this anyway.

* Add intrinsic fields

Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Commit migrated from https://github.com/dotnet/coreclr/commit/e6e582cfca205692ef4e0cb9300abc6c9abab9e6

src/libraries/System.Private.CoreLib/src/System/BitConverter.cs

index 8a8101d..eedd5af 100644 (file)
@@ -20,8 +20,10 @@ namespace System
         // The value is set to true if the architecture is
         // little endian; false if it is big endian.
 #if BIGENDIAN
+        [Intrinsic]
         public static readonly bool IsLittleEndian /* = false */;
 #else
+        [Intrinsic]
         public static readonly bool IsLittleEndian = true;
 #endif