Files
binutils-gdb/include/opcode
Nelson Chu 1d458f0843 RISC-V: Support ssctr/smctr extensions with version 1.0.
https://github.com/riscv/riscv-control-transfer-records/releases/tag/v1.0

The privileged spec v1.10 already removed the sfence.vm instruction, and the
encoding of sfence.vm instruction is overlapped with the sctrclr instruction
of ssctr/smctr.  But since the privileged spec v1.10 already removed the
sfence.vm, and we no longer support the privileged spec v1.9.1 for now, we
had to remove the sfence.vm.

bfd/
	* elfxx-riscv.c (riscv_implicit_subsets): Imply zicsr for ssctr/smctr.
	(riscv_supported_std_s_ext): Added ssctr/smctr with version 1.0.
	(riscv_multi_subset_supports): Handle INSN_CLASS for ssctr/smctr.
	(riscv_multi_subset_supports_ext): Likewise.
gas/
	* config/tc-riscv.c (enum riscv_csr_class, riscv_csr_address):
	Added and handle CSR_CLASS_SSCTR and CSR_CLASS_SMCTR.
	(riscv_is_priv_insn): Removed SFENCE_VM check.
	* testsuite/gas/riscv/attribute-14e.d: Removed since sfence.vm is no
	longer supported since privileged spec v1.10.
	* testsuite/gas/riscv/attribute-14.s: Likewise.
	* testsuite/gas/riscv/csr-version-1p10.d: Updated for ssctr/smctr CSRs.
	* 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.s: Likewise.
	* testsuite/gas/riscv/csr-dw-regnums.d: Likewise.
	* testsuite/gas/riscv/csr-dw-regnums.s: Likewise.
	* testsuite/gas/riscv/march-help.l: Updated for ssctr/smctr.
	* testsuite/gas/riscv/smctr-ssctr.d: New testcase for sctr instruction.
	* testsuite/gas/riscv/smctr-ssctr.s: Likewise.
include/
	* opcode/riscv-opc.h: Added encoding macro for sctrclr, but removed
	encoding macro for sfence.vm since encoding conflict.  Added CSR
	numbers for ssctr/smctr CSRs.
	* opcode/riscv.h (enum riscv_insn_class): Added
	INSN_CLASS_SMCTR_OR_SSCTR for sctrclr.
opcodes/
	* riscv-opc.c (riscv_opcodes): Added sctrclr, but removed sfence.vm
	since encoding conflict.
2025-01-17 12:33:08 +08:00
..