-
Notifications
You must be signed in to change notification settings - Fork 2.6k
[Arm64] JIT generate LSE Atomics #18130
[Arm64] JIT generate LSE Atomics #18130
Conversation
93af9b2 to
091206a
Compare
When ARMv8.1 LSE Atomics are available, use them to implement Interlocked operations.
091206a to
55b1acf
Compare
|
All 22 checks passed. Merge conflict with #18267 forced a rebase. ping @briansull @BruceForstall @CarolEidt @dotnet/jit-contrib |
| getEmitter()->emitIns_R_R_R(INS_swpal, dataSize, dataReg, targetReg, addrReg); | ||
| break; | ||
| case GT_XADD: | ||
| if ((targetReg == REG_NA) || (targetReg == REG_ZR)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can targetReg really be REG_NA?!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like staddl is the arm64 equivalent of x64's lock add. If you want to support this you need to generate GT_LOCKADD in lowering like it is done on x64. See #18267
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the result is not used, it certainly could be REG_NA/REG_ZR. I doubt lsra and/or lowering will generate this case yet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before the rebase this used to include GT_LOCKADD. I will look at #18267
|
@briansull you approved this; can it be merged? |
…e-LSE-Atomics [Arm64] JIT generate LSE Atomics Commit migrated from dotnet/coreclr@6154222
When ARMv8.1 LSE Atomics are available, use them to implement
Interlocked operations.
@briansull @BruceForstall @CarolEidt @dotnet/jit-contrib