You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[release/9.0] [mono][mini] Interlocked.CompareExchange and Interlocked.Exchange intrinsics for small types and enums (#106897)
* [mono][mini][arm64] Interlocked.CompareExchange for byte/sbyte
* rewrite cas_i1 with zext cmp and sign ext result
* [sample] fixup HelloWorld to work with full aot
* [mini][llvm] support OP_ATOMIC_CAS_U1
* [mini][amd64] support OP_ATOMIC_CAS_U1
* [mini][wasm] support OP_ATOMIC_CAS_U1 in LLVM AOT
* make intrinsic must-expand on arm64,amd64,wasm on mono
* [interp] MINT_MONO_CMPXCHG_U1
also add mono_atomic_cas_u8 utility function
* [mini] CompareExchange(i16/u16)
* [mono] must expand CompareExchange(i16/u16)
* [interp] Interlocked.CompareExchange(u16/i16)
* fix gcc intrinsics build
* fix amd64 supported ops
* [mini] zext unsigned CAS results for small types
* [interp] signed small CAS ops
* HACK: fix x64 crashes?
maybe we can't actually do a 1 or 2 byte move from RAX ?
* [amd64] fixup 8- and 16-bit cmpxchg encoding
* fix operand order
* ok to always emit rex?
* Apply suggestions from code review
fixup u16 win32 atomic
* [interp] remove if guarding a switch
* Interlocked.Exchange u1/i1/u2/i2 interp,llvm,amd64,arm64
* fix windows build
* [amd64] give u2 CMPXCHG and XCHG one more byte
for the 16-bit addressing prefix
* If jiterpreter is engaged before the thread is fully initialized, just fail to allocate a table index and generate a warning. This shouldn't happen in prod anyway
Implement cmpxchg atomics natively in jiterpreter
Remove unnecessary jiterp cas helpers
Do cmpxchg result fixups as needed
Add runtime option for jiterpreter atomics
Implement atomic exchanges in the jiterpreter
* Interlocked.Exchange(int) for interp and jiterp
---------
Co-authored-by: Aleksey Kliger <alklig@microsoft.com>
Co-authored-by: Aleksey Kliger <aleksey@lambdageek.org>
Co-authored-by: Katelyn Gadd <kg@luminance.org>
Co-authored-by: Jeff Schwartz <jeffschw@microsoft.com>
0 commit comments