Skip to content

Commit

Permalink
Apply comment from Hans and Jessica
Browse files Browse the repository at this point in the history
  • Loading branch information
kito-cheng committed Aug 7, 2023
1 parent 8917de3 commit 5ae7805
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions riscv-elf.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -1187,34 +1187,35 @@ file. Its values are defined as follows:
|===
| Value | Symbolic Name | Description

| 0 | UNKNOWN_ATOMIC_ABI | This object use unknown atomic ABI.
| 1 | A6C_ATOMIC_ABI | This object use the A6 classical atomic ABI, which defined in table A.6 in <<riscv-unpriv-20191213>>.
| 2 | A6S_ATOMIC_ABI | This object use the strengthened A6 ABI, which uses the atomic mapping defined by <<Mappings from C/C++ primitives to RISC-V primitives>> and does not rely on note 3 annotated mapping.
| 3 | A7_ATOMIC_ABI | This object use the A7 atomic ABI, which uses the atomic mapping defined by <<Mappings from C/C++ primitives to RISC-V primitives>> and may rely on note 3 annotated mapping.
| 0 | ATOMIC_ABI_UNKNOWN | This object uses unknown atomic ABI.
| 1 | ATOMIC_ABI_A6C | This object uses the A6 classical atomic ABI, which is defined in table A.6 in <<riscv-unpriv-20191213>>.
| 2 | ATOMIC_ABI_A6S | This object uses the strengthened A6 ABI, which uses the atomic mapping defined by <<Mappings from C/C++ primitives to RISC-V primitives>> and does not rely on any note 3 annotated mappings.
| 3 | ATOMIC_ABI_A7 | This object uses the A7 atomic ABI, which uses the atomic mapping defined by <<Mappings from C/C++ primitives to RISC-V primitives>> and may rely on note 3 annotated mappings.
|===

Merge policy:::
The linker should report errors if object files of incompatible atomic ABI
beginning merged, the compatibility rules for atomic ABIs can be found in
are merged; the compatibility rules for atomic ABIs can be found in the
compatibility column in the following table.

[cols="6,2,3"]
[width=100%]
|===
| Input Values | Compatible? | Ouput Value

| UNKNOWN_ATOMIC_ABI and A6C_ATOMIC_ABI | Yes | A6C_ATOMIC_ABI
| UNKNOWN_ATOMIC_ABI and A6S_ATOMIC_ABI | Yes | A6S_ATOMIC_ABI
| UNKNOWN_ATOMIC_ABI and A7_ATOMIC_ABI | Yes | A7_ATOMIC_ABI
| A6C_ATOMIC_ABI and A6S_ATOMIC_ABI | Yes | A6C_ATOMIC_ABI
| A6C_ATOMIC_ABI and A7_ATOMIC_ABI | No | -
| A6S_ATOMIC_ABI and A7_ATOMIC_ABI | Yes | A7_ATOMIC_ABI
| ATOMIC_ABI_UNKNOWN and ATOMIC_ABI_A6C | Yes | ATOMIC_ABI_A6C
| ATOMIC_ABI_UNKNOWN and ATOMIC_ABI_A6S | Yes | ATOMIC_ABI_A6S
| ATOMIC_ABI_UNKNOWN and ATOMIC_ABI_A7 | Yes | ATOMIC_ABI_A7
| ATOMIC_ABI_A6C and ATOMIC_ABI_A6S | Yes | ATOMIC_ABI_A6C
| ATOMIC_ABI_A6C and ATOMIC_ABI_A7 | No | -
| ATOMIC_ABI_A6S and ATOMIC_ABI_A7 | Yes | ATOMIC_ABI_A7
|===

NOTE: Merging object files with the same ABI will result in the same ABI.

NOTE: Program built without A-extension is classified into UNKNOWN_ATOMIC_ABI
now, and we intend to define new value for those case in future.
NOTE: Programs that implement atomic operations without relying in the
A-extension are classified as ATOMIC_ABI_UNKNOWN for now. A new value for those
may be defined in the future.

=== Mapping Symbol

Expand Down

0 comments on commit 5ae7805

Please sign in to comment.