Skip to content

Commit 425426a

Browse files
edward-joneskito-cheng
authored andcommitted
Tweaks to Tag_RISCV_reserved_register description
- The attribute name is plural now, Tag_RISCV_reserved_registers - Make the distinction between the encoded value and the human readable syntax a bit clearer. - Remove ambiguity from the grammar for the tag based on feedback. - Add possibility for an empty register list to the grammar - Remove the exception allowing merging of two objects files if one includes the tag and the other doesn't
1 parent 628c0b2 commit 425426a

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

riscv-elf.adoc

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -896,7 +896,7 @@ value if the tag number is even.
896896
| Tag_RISCV_priv_spec | 8 | uleb128 | Indicates the major version of the privileged specification.
897897
| Tag_RISCV_priv_spec_minor | 10 | uleb128 | Indicates the minor version of the privileged specification.
898898
| Tag_RISCV_priv_spec_revision | 12 | uleb128 | Indicates the revision version of the privileged specification.
899-
| Tag_RISCV_reserved_register | 14 | uleb128 | Indicates the extra reserved register information.
899+
| Tag_RISCV_reserved_registers | 14 | uleb128 | Indicates the extra reserved register information.
900900
| Reserved for non-standard attribute | >= 32768 | - | -
901901
|===
902902

@@ -943,22 +943,23 @@ Tag_RISCV_priv_spec contains the major/minor/revision version information of
943943
the privileged specification. It will report errors if object files of different
944944
privileged specification versions are merged.
945945

946-
===== Tag_RISCV_reserved_register, 14, uleb128=register bit-vector
946+
===== Tag_RISCV_reserved_registers, 14, uleb128=register bit-vector
947947

948-
Tag_RISCV_reserved_register contains the information about the reserved
949-
registers which are not reserved by ABI, it might reserved by specific
950-
compiler option like `-ffixed-x4` or special purpose ABI variant like
948+
Tag_RISCV_reserved_registers contains the information about the reserved
949+
registers which are not reserved by ABI. Registers might be reserved by specific
950+
compiler option like `-ffixed-x4` or a special purpose ABI variant like
951951
overlay ABI.
952952

953-
Format of Tag_RISCV_reserved_register is a bit-vector, each bit corresponding to
954-
a register, the bit order is same as dwarf register number.
953+
The encoding of Tag_RISCV_reserved_registers is a bit-vector, each bit
954+
corresponding to a register. The bit number for a register is the same as DWARF
955+
register numbers.
956+
955957
First bit is must set, used to distinguish between attribute is unset or having
956958
empty reserved register set.
957959

958-
It will report errors if link object files with different
959-
Tag_RISCV_reserved_register values, but allowed link with object with and
960-
without Tag_RISCV_reserved_register value, the final value will take from the
961-
object which has set Tag_RISCV_reserved_register.
960+
It will report errors if object files are linked with different
961+
Tag_RISCV_reserved_registers values, or if the tag is missing from any object
962+
when the tag is set in at least one linked object.
962963

963964
== Code relaxation
964965

0 commit comments

Comments
 (0)