-
Notifications
You must be signed in to change notification settings - Fork 192
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
[ATOMICSABI64]: Alpha Draft of Atomics ABI #256
Conversation
This is the Alpha draft of the ABI for the "C/C++ Atomics Application Binary Interface Standard for the Arm® 64-bit Architecture" This document describes the C/C++ Atomics Application Binary Interface for the Arm 64-bit architecture. This document concerns the valid mappings from C/C++ Atomic Operations to sequences of A64 instructions. This document does not support Armv7. For matters concerning the memory model, please consult §B2 of the Arm Architecture Reference Manual. We focus only on a subset of the C11 atomic operations and their mapping to A64 instructions at the time of writing. More atomics will be added. Co-Authored with Wilco Dijkstra (@Wilco1).
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.
Thanks very much for putting this together. Most of my comments are based on first time reading rather than as a concurrency expert.
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.
LGTM, just added some trivial comments.
Apologies for my delay folks, I think I've addressed everything here now with the new version On the footnote front, I had to use a |
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.
Thanks very much for splitting out the specification and the rationale. I've given both a read through and have some mostly cosmetic comments.
atomicsabi64/atomicsabi64.rst
Outdated
Operations include Thread Fences. | ||
|
||
Shared-Memory Location | ||
A memory location that can be accessed by any Thread of Execution in the |
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.
By any Thread of Execution
do you mean any one thread or all threads?
Intuitively I'd expect shared-memory location to be accessible by more than one Thread of Execution, but not necessarily all.
If I'm write perhaps: "by more than one Thread of Execution"
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.
Fixed, I've changed it to Thread and simplified definitions.
atomicsabi64/atomicsabi64.rst
Outdated
following sub-components. | ||
|
||
* The `Mappings from Atomic Operations to Assembly Sequences`_, which defines | ||
the Mappings from C/C++ atomic operations to sto one of more Assembly |
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.
Typo? to sto
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.
Fixed
atomicsabi64/atomicsabi64.rst
Outdated
+-------------------------------------------------------------------------------------------+ | ||
| Note | | ||
+===========================================================================================+ | ||
| ``*`` Using ``WZR`` or ``XZR`` for the destination register is invalid (Section 4.7). | |
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.
I'm assuming this *
corresponds to the *
on some of the sequences in the table?
I think it would be be good to make this explicit. For example
In the tables below, in sequences with *
Using WZR
...
Alternatively we could do something like note1
or a footnote instead of *
.
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.
Fixed, added before table rather than as a note at end. Normal footnotes didn't work properly, placed at very end of document...
atomicsabi64/atomicsabi64.rst
Outdated
The content of this specification is a draft, and Arm considers the | ||
likelihood of future incompatible changes to be significant. | ||
|
||
All content in this document is at the **Release** quality level. |
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.
This should be **Alpha** quality
I believe.
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.
Thanks Luke and Wilco for your patience with the barrage of comments. Looks like all the reviewers are happy with the current state of the docs right now.
If there are no objections, I'll push this tomorrow.
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.
LGTM thanks very much for all the hard work.
atomicsabi64.pdf
This is the Alpha draft of the ABI for the
"C/C++ Atomics Application Binary Interface Standard for the Arm® 64-bit Architecture"
This document describes the C/C++ Atomics Application Binary Interface for the Arm 64-bit architecture.
This document concerns the valid mappings from C/C++ Atomic Operations to sequences of A64 instructions. This document does not support Armv7.
For matters concerning the memory model, please consult §B2 of the Arm Architecture Reference Manual.
We focus only on a subset of the C11 atomic operations and their mapping to A64 instructions at the time of writing.
More atomics will be added.
Co-Authored with Wilco Dijkstra (@Wilco1).