Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

[Arm64] JIT generate LSE Atomics #18130

Merged
merged 1 commit into from
Jun 27, 2018

Conversation

sdmaclea
Copy link

When ARMv8.1 LSE Atomics are available, use them to implement
Interlocked operations.

@briansull @BruceForstall @CarolEidt @dotnet/jit-contrib

@sdmaclea sdmaclea force-pushed the PR-ARM64-JIT-Use-LSE-Atomics branch from 93af9b2 to 091206a Compare May 29, 2018 16:06
When ARMv8.1 LSE Atomics are available, use them to implement
Interlocked operations.
@sdmaclea sdmaclea force-pushed the PR-ARM64-JIT-Use-LSE-Atomics branch from 091206a to 55b1acf Compare June 7, 2018 19:01
@sdmaclea
Copy link
Author

sdmaclea commented Jun 7, 2018

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))
Copy link

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?!

Copy link

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

Copy link
Author

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.

Copy link
Author

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

@BruceForstall
Copy link
Member

@briansull you approved this; can it be merged?

@briansull briansull merged commit 6154222 into dotnet:master Jun 27, 2018
@sdmaclea sdmaclea deleted the PR-ARM64-JIT-Use-LSE-Atomics branch June 10, 2021 00:28
picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
…e-LSE-Atomics

[Arm64] JIT generate LSE Atomics

Commit migrated from dotnet/coreclr@6154222
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants