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 E_FLAGS for the Atomic ABIs #383

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions riscv-elf.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -193,9 +193,9 @@ below.
[cols="1,2,1,1,3,5"]
[width=80%]
|===
| Bit 0 | Bits 1 - 2 | Bit 3 | Bit 4 | Bits 5 - 23 | Bits 24 - 31
| Bit 0 | Bits 1 - 2 | Bit 3 | Bit 4 | Bits 5 - 6 | Bits 7 - 23 | Bits 24 - 31

| RVC | Float ABI | RVE | TSO | *Reserved* | *Non-standard extensions*
| RVC | Float ABI | RVE | TSO | Atomic ABI | *Reserved* | *Non-standard extensions*
|===

+
Expand Down Expand Up @@ -233,7 +233,13 @@ below.
EF_RISCV_TSO (0x0010)::: This bit is set when the binary requires the RVTSO
memory consistency model.

Until such a time that the *Reserved* bits (0x00ffffe0) are allocated by future
EF_RISCV_ATOMIC_A6 (0x0020)::: This bit is set when the binary is compatible
with the A.6 atomic mappings.

EF_RISCV_ATOMIC_A7 (0x0040)::: This bit is set when the binary is compatible
with the A.6 atomic mappings.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"I wrote this before having coffee." => I think you need to change A.6 to A.7 here :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like it's been NAK'd, so whatever ;)


Until such a time that the *Reserved* bits (0x00ffff70) are allocated by future
versions of this specification, they shall not be set by standard software.
Non-standard extensions are free to use bits 24-31 for any purpose. This may
conflict with other non-standard extensions.
Expand Down Expand Up @@ -268,6 +274,9 @@ raise an error.
TSO::: Linker should report errors if object files of different value
for TSO field.

Atomic ABI:::Linker should report errors if incompatible object files are
linked.

NOTE: The static linker may ignore the compatibility checks if all fields in the
`e_flags` are zero and all sections in the input file are non-executable
sections.
Expand Down