You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
UNRATIFIED RISC-V: Add Pointer masking extensions and their TENTATIVE CSRs
[DO NOT MERGE]
Until Pointer masking extensions are frozen/ratified and the final version
number is determined, this patch should not be merged upstream. This
commit uses unratified version 0.5(.4) as in the latest PDF documentation
(instead of possible 1.0 after ratification).
This commit adds pointer masking extensions ('Zjpm', 'Smjpm', 'Ssjpm' and
'Smjpmbare16') and its CSRs based on the latest commit of the RISC-V
Pointer Masking draft.
<riscv/riscv-j-extension@4839cc5>
Specification Notes:
'Smjpm', 'Ssjpm' and 'Zjpm' do not depend each other, allowing selection of
per-privilege pointer masking implementation.
Although pointer masking is only available (can be enabled) on RV64, pointer
masking CSRs are accessible from RV32. That is why those extensions are
*not* RV64 only.
***Draft Note***
Because CSR addresses are not fixed yet, this commit uses tentative
addresses (a part of custom CSR space).
bfd/ChangeLog:
* elfxx-riscv.c (riscv_implicit_subsets) Add implications to
'Zicsr'. (riscv_supported_std_z_ext): Add 'Zjpm' extension to
valid 'Z' extension list.
(riscv_supported_std_s_ext): Add 'Smjpm', 'Ssjpm' and 'Smjpmbare16'
extensions to valid 'S' extension list.
gas/ChangeLog:
* config/tc-riscv.c (enum riscv_csr_class): Add CSR classes for
pointer masking extensions. (riscv_csr_address): Add handling for
new CSR classes.
* testsuite/gas/riscv/csr-dw-regnums.d: Add new CSRs.
* testsuite/gas/riscv/csr-dw-regnums.s: Likewise.
* testsuite/gas/riscv/csr.s: Add new CSRs.
* testsuite/gas/riscv/csr-version-1p9p1.d: Likewise.
* testsuite/gas/riscv/csr-version-1p9p1.l: Likewise.
* testsuite/gas/riscv/csr-version-1p10.d: Likewise.
* testsuite/gas/riscv/csr-version-1p10.l: Likewise.
* testsuite/gas/riscv/csr-version-1p11.d: Likewise.
* testsuite/gas/riscv/csr-version-1p11.l: Likewise.
* testsuite/gas/riscv/csr-version-1p12.d: Likewise.
* testsuite/gas/riscv/csr-version-1p12.l: Likewise.
include/ChangeLog:
* opcode/riscv-opc.h (CSR_MPM, CSR_VSPM, CSR_SPM, CSR_UPM): New
CSR macros.
0 commit comments