diff --git a/riscv-elf.adoc b/riscv-elf.adoc index 77a43cd3..f03d97e3 100644 --- a/riscv-elf.adoc +++ b/riscv-elf.adoc @@ -896,6 +896,7 @@ value if the tag number is even. | Tag_RISCV_priv_spec | 8 | uleb128 | Indicates the major version of the privileged specification. | Tag_RISCV_priv_spec_minor | 10 | uleb128 | Indicates the minor version of the privileged specification. | Tag_RISCV_priv_spec_revision | 12 | uleb128 | Indicates the revision version of the privileged specification. +| Tag_RISCV_reserved_registers | 14 | uleb128 | Indicates the extra reserved register information. | Reserved for non-standard attribute | >= 32768 | - | - |=== @@ -942,6 +943,24 @@ Tag_RISCV_priv_spec contains the major/minor/revision version information of the privileged specification. It will report errors if object files of different privileged specification versions are merged. +===== Tag_RISCV_reserved_registers, 14, uleb128=register bit-vector + +Tag_RISCV_reserved_registers contains the information about the reserved +registers which are not reserved by ABI. Registers might be reserved by specific +compiler option like `-ffixed-x4` or a special purpose ABI variant like +overlay ABI. + +The encoding of Tag_RISCV_reserved_registers is a bit-vector, each bit +corresponding to a register. The bit number for a register is the same as DWARF +register numbers. + +First bit is must set, used to distinguish between attribute is unset or having +empty reserved register set. + +It will report errors if object files are linked with different +Tag_RISCV_reserved_registers values, or if the tag is missing from any object +when the tag is set in at least one linked object. + == Code relaxation At link time, when all the memory objects have been resolved, the code sequence