Skip to content

Conversation

a4lg
Copy link
Owner

@a4lg a4lg commented Aug 8, 2023

@a4lg a4lg added the enhancement New feature or request label Aug 8, 2023
@a4lg a4lg force-pushed the riscv-smcsrind-sscsrind branch 3 times, most recently from a85e8f9 to f91fa2f Compare August 15, 2023 06:37
@a4lg a4lg force-pushed the riscv-smcsrind-sscsrind branch 2 times, most recently from f15c64c to 16eb8bc Compare August 21, 2023 07:26
@a4lg a4lg changed the title Draft Extension: Smcsrind and Sscsrind Extension: Smcsrind and Sscsrind Aug 21, 2023
@a4lg a4lg force-pushed the riscv-smcsrind-sscsrind branch 6 times, most recently from 3837b09 to 5967639 Compare September 7, 2023 09:35
@a4lg a4lg force-pushed the riscv-smcsrind-sscsrind branch 2 times, most recently from 206eb3b to 17f23c1 Compare October 19, 2023 03:17
a4lg added 3 commits October 19, 2023 06:58
This commit adds template for complex CSR error handling (such like
multiple extensions involved).

gas/ChangeLog:

	* config/tc-riscv.c (riscv_csr_address): Add complex CSR error
	handling.
This commit adds indirect CSR access extensions (Smcsrind / Sscsrind) and
their CSRs based on the latest documentation (version 1.0.0-rc2).
<https://github.com/riscv/riscv-indirect-csr-access/releases/tag/v1.0.0-rc2>

Because six CSRs are duplicates of 'Smaia' / 'Ssaia' extensions, it adds
complex CSR handling for those.

bfd/ChangeLog:

	* elfxx-riscv.c (riscv_implicit_subsets): Add implications
	'Smcsrind' / 'Sscsrind' -> 'Zicsr'.
	(riscv_supported_std_s_ext): Add 'Smcsrind' and 'Sscsrind'
	extensions to the valid 'S' extension list.

gas/ChangeLog:

	* config/tc-riscv.c (enum riscv_csr_class): Add CSR classes for
	the 'S[ms]csrind' extensions. (riscv_csr_address): Add handling for
	new CSR classes.
	* testsuite/gas/riscv/csr-dw-regnums.s: Add new CSRs.
	* testsuite/gas/riscv/csr-dw-regnums.d: Likewise.
	* testsuite/gas/riscv/csr.s: Add new CSRs.
	* testsuite/gas/riscv/csr-version-1p9p1.d: Likewise.
	* testsuite/gas/riscv/csr-version-1p10.d: Likewise.
	* testsuite/gas/riscv/csr-version-1p11.d: Likewise.
	* testsuite/gas/riscv/csr-version-1p12.d: Likewise.
	* testsuite/gas/riscv/csr-version-1p9p1.l: Likewise but also change
	the expected error message to reflect 'S[ms]csrind' extensions.
	* testsuite/gas/riscv/csr-version-1p10.l: Ditto.
	* testsuite/gas/riscv/csr-version-1p11.l: Ditto.
	* testsuite/gas/riscv/csr-version-1p12.l: Ditto.

include/ChangeLog:

	* opcode/riscv-opc.h: Recategory miselect, mireg, siselect, sireg,
	vsiselect and vsireg CSRs. (CSR_MIREG2, CSR_MIREG3, CSR_MIREG4,
	CSR_MIREG5, CSR_MIREG6, CSR_SIREG2, CSR_SIREG3, CSR_SIREG4,
	CSR_SIREG5, CSR_SIREG6, CSR_VSIREG2, CSR_VSIREG3, CSR_VSIREG3,
	CSR_VSIREG5, CSR_VSIREG6): Add new.
This commit tests whether the miselect CSR is unlocked by either
'Smaia' or 'Smcsrind' extension.

gas/ChangeLog:

	* testsuite/gas/riscv/csr-complex.s: New test.
	* testsuite/gas/riscv/csr-complex-1.d: Likewise.
	* testsuite/gas/riscv/csr-complex-1.l: Likewise.
	* testsuite/gas/riscv/csr-complex-2.d: Likewise.
	* testsuite/gas/riscv/csr-complex-3.d: Likewise.
@a4lg a4lg force-pushed the riscv-smcsrind-sscsrind branch from 17f23c1 to 3b3d2a5 Compare October 19, 2023 07:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant