Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add storeStoreFence Opcode for storeStoreFence intrinsic #19298

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jmesyou
Copy link
Contributor

@jmesyou jmesyou commented Apr 11, 2024

This commit adds the storeStoreFence opcode to represent StoreStore barrier semantics for Java. This barrier is provided as a Java class library @IntrinsicCandidate with Unsafe.storeStoreFence(). Code generation functionality is added for each backend where appropriate.

StoreStore barriers in Java prevent the reordering of store operations before and after the barrier. Currently, this barrier is implemented through the storeFence opcode, which provides additional but unneeded reordering guarantees.

The following extensions have been added for each backend which currently handles the storeFence opcode.

Depends on: eclipse/omr#7310

This commit adds the storeStoreFence opcode to represent
StoreStore barrier semantics for Java. This barrier is provided
as a Java class library `@IntrinsicCandidate` with `Unsafe.storeStoreFence()`.
Code generation functionality is added for each backend where appropriate.

StoreStore barriers in Java prevent the reordering of store
operations before and after the barrier. Currently,
this barrier is implemented through the storeFence opcode,
which provides additional but unneeded reordering guarantees.

The following extensions have been added for each backend that
currently handles the storeFence opcode.

- On x86, storeStoreFence is implemented as a `nop`
- On arm64, storeStoreFence is implemented as `dmb ishst`
  see (eclipse-openj9#6332)
- On power, storeStoreFence is implemented with a `lwsync`
- On Z, storeFence is unused, so storeStoreFence is unimplemented.

Signed-off-by: James You <james.you@protonmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant