-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[release/9.0] [mono][mini] Interlocked.CompareExchange and Interlocke…
…d.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 <[email protected]> Co-authored-by: Aleksey Kliger <[email protected]> Co-authored-by: Katelyn Gadd <[email protected]> Co-authored-by: Jeff Schwartz <[email protected]>
- Loading branch information
1 parent
e107da8
commit 12ecfe7
Showing
24 changed files
with
711 additions
and
104 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.