Redesign atomic store with hints intrinsics#432
Open
Lukacma wants to merge 3 commits intoARM-software:mainfrom
Open
Redesign atomic store with hints intrinsics#432Lukacma wants to merge 3 commits intoARM-software:mainfrom
Lukacma wants to merge 3 commits intoARM-software:mainfrom
Conversation
| | -------------------- | --------- | --------------------------------------------------------------------------------- | | ||
| | KEEP | 0 | Signals to retain the updated location in the local cache of the updating PE. | | ||
| | STRM | 1 | Signals to not retain the updated location in the local cache of the updating PE. | | ||
| The fourth argument `hint` selects the requested hint. The set of valid |
Contributor
There was a problem hiding this comment.
What will be the behaviour if hint is not valid?
Contributor
Author
There was a problem hiding this comment.
I guess that is undefined behaviour and will be implementation based. For LLVM we will throw error and reject.
| The first argument `ptr` is the location to store to. The second | ||
| argument `data` is the value to be stored. The third argument | ||
| `memory_order` can be one of the memory ordering values supported by | ||
| `atomic_store`: `__ATOMIC_RELAXED`, `__ATOMIC_SEQ_CST`, and |
Contributor
There was a problem hiding this comment.
Do we need to list all the possible memory order :
``__ATOMIC_RELAXED``, ``__ATOMIC_CONSUME``, ``__ATOMIC_ACQUIRE``,
``__ATOMIC_RELEASE``, ``__ATOMIC_ACQ_REL``, and ``__ATOMIC_SEQ_CST`` are
provided, with values corresponding to the enumerators of C11's
Or the ones you are defining is enough? I am asking because this will be a generic intrinsic now. So I am wondering if all the hint will only need these 3 macros.
Contributor
Author
There was a problem hiding this comment.
__ATOMIC_CONSUME and __ATOMIC_ACQUIRE is only for loads. __ATOMIC_ACQ_REL doesn't fit pure store I think and rest are mentioned in spec.
rockdreamer
reviewed
Apr 20, 2026
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This proposal is about redesigning atomic store with hint intrinsics, to make them more easily extensible.
Checklist: (mark with
Xthose which apply)PR (do not bother creating the issue if all you want to do is
fixing the bug yourself).
SPDX-FileCopyrightTextlines on topof any file I have edited. Format is
SPDX-FileCopyrightText: Copyright {year} {entity or name} <{contact informations}>(Please update existing copyright lines if applicable. You can
specify year ranges with hyphen , as in
2017-2019, and usecommas to separate gaps, as in
2018-2020, 2022).Copyrightsection of the sources of thespecification I have edited (this will show up in the text
rendered in the PDF and other output format supported). The
format is the same described in the previous item.
tricky to set up on non-*nix machines). The sequence can be
found in the contribution
guidelines. Don't
worry if you cannot run these scripts on your machine, your
patch will be automatically checked in the Actions of the pull
request.
introduced in this PR in the section Changes for next
release of the section Change Control/Document history
of the document. Create Changes for next release if it does
not exist. Notice that changes that are not modifying the
content and rendering of the specifications (both HTML and PDF)
do not need to be listed.
correctness of the result in the PDF output (please refer to the
instructions on how to build the PDFs
locally).
draftversionis set totruein the YAML headerof the sources of the specifications I have modified.
in the README page of the project.