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 'Zicfiss' extension and its TENTATIVE CSR
[DO NOT MERGE]
Until the 'Zicfiss' extension is frozen/ratified and final version number
is determined, this patch should not be merged upstream. This commit uses
unratified version 0.1 as in the documentation (instead of possible 1.0
after ratification).
This commit adds RISC-V Shadow Stack extension (Zicfiss) and its
CSRs based on the document version 0.1 (latest git revision):
<riscv/riscv-cfi@c6a8311>
**Note**
Because CSR address is not fixed yet, this commit uses tentative one
(a part of custom CSR space).
bfd/ChangeLog:
* elfxx-riscv.c (riscv_implicit_subsets): Add implication 'Zicfiss'
-> 'Zicsr', 'A', 'Zimop' and 'Zcmop'.
(riscv_supported_std_z_ext): Add 'Zicfiss' extension to valid
'Z' extension list.
(riscv_multi_subset_supports): Support new instruction class.
(riscv_multi_subset_supports_ext): Likewise.
gas/ChangeLog:
* config/tc-riscv.c (enum riscv_csr_class): Add new CSR class.
(riscv_csr_address): Add new CSR class handling.
* testsuite/gas/riscv/csr.s: Add new CSR test.
* testsuite/gas/riscv/csr-dw-regnums.s: Likewise.
* testsuite/gas/riscv/csr-dw-regnums.d: 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.
* testsuite/gas/riscv/csr-version-1p9p1.d: Likewise.
* testsuite/gas/riscv/csr-version-1p9p1.l: Likewise.
* testsuite/gas/riscv/zicfiss.s: New test for shadow stack
instructions and its auto-compression.
* testsuite/gas/riscv/zicfiss.d: Likewise.
* testsuite/gas/riscv/zicfiss-na.d: Likewise.
* testsuite/gas/riscv/zicfiss-mop.s: New test for MOP encoding.
* testsuite/gas/riscv/zicfiss-mop.d: Likewise.
* testsuite/gas/riscv/zicfiss-fail.s: New failure test for
shadow stack instructions.
* testsuite/gas/riscv/zicfiss-fail.d: Likewise.
* testsuite/gas/riscv/zicfiss-fail.l: Likewise.
include/ChangeLog:
* opcode/riscv-opc.h (MATCH_SSLOAD, MASK_SSLOAD,
MATCH_SSPOPCHK, MASK_SSPOPCHK, MATCH_SSPINC, MASK_SSPINC,
MATCH_SSPUSH, MASK_SSPUSH, MATCH_SSPRR, MASK_SSPRR,
MATCH_SSAMOSWAP, MASK_SSAMOSWAP,
MATCH_C_SSPUSH, MASK_C_SSPUSH,
MATCH_C_SSPOPCHK, MASK_C_SSPOPCHK): New.
(CSR_SSP): New.
* opcode/riscv.h (enum riscv_insn_class): Add new instruction
class INSN_CLASS_ZICFISS.
opcodes/ChangeLog:
* riscv-opc.c (match_rs1_nonzero, match_rd_eq_1_or_5,
match_rs1_eq_1_or_5, match_rs2_eq_1_or_5): New.
(riscv_opcodes): Add 'Zicfiss' instructions and aliases.
0 commit comments