[NativeAOT] implement Interlocked.ReadMemoryBarrier intrinsic (#86842)
authorVladimir Sadov <vsadov@microsoft.com>
Wed, 31 May 2023 14:24:42 +0000 (07:24 -0700)
committerGitHub <noreply@github.com>
Wed, 31 May 2023 14:24:42 +0000 (07:24 -0700)
commitfbf1f720554daef424edc3ced2e233729a626b4b
treeda8cd568ffb44128ca96d4e1e361afa4b1f2463e
parent1af3c9eb5d97b61f75a387e43d9c9d6a20dd2e23
[NativeAOT] implement Interlocked.ReadMemoryBarrier intrinsic (#86842)

* ReadMemoryBarrier

* remove more literals (use constants)

* missing include for win-arm64

* removed nonintrinsic implementations of ReadMemoryBarrier

* removed nonintrinsic MemoryBarrier()

* unified Interlocked.MemoryBarrier

* added a test for indirect calling Interlocked.MemoryBarrier

* PR feedback

* use no-inlining peoperties

* NoInlining must be with methods (not properties)
15 files changed:
src/coreclr/System.Private.CoreLib/src/System/Threading/Interlocked.CoreCLR.cs
src/coreclr/nativeaot/Runtime/portable.cpp
src/coreclr/nativeaot/Runtime/windows/PalRedhawkInline.h
src/coreclr/nativeaot/System.Private.CoreLib/src/System/Runtime/RuntimeImports.cs
src/coreclr/nativeaot/System.Private.CoreLib/src/System/Threading/Interlocked.cs
src/coreclr/nativeaot/Test.CoreLib/src/System/Runtime/RuntimeImports.cs
src/coreclr/nativeaot/Test.CoreLib/src/System/Threading/Interlocked.cs
src/coreclr/vm/comutilnative.cpp
src/coreclr/vm/comutilnative.h
src/coreclr/vm/ecalllist.h
src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/CastCache.cs
src/libraries/System.Private.CoreLib/src/System/Threading/Interlocked.cs
src/libraries/System.Threading/tests/InterlockedTests.cs
src/libraries/System.Threading/tests/System.Threading.Tests.csproj
src/mono/System.Private.CoreLib/src/System/Threading/Interlocked.Mono.cs