-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extension: Zicntr
and Zihpm
#102
Open
a4lg
wants to merge
1
commit into
master
Choose a base branch
from
riscv-zicntr-zihpm
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a4lg
force-pushed
the
riscv-zicntr-zihpm
branch
2 times, most recently
from
February 8, 2023 05:34
d1cb1d2
to
2d36a44
Compare
a4lg
force-pushed
the
riscv-zicntr-zihpm
branch
from
February 15, 2023 04:34
2d36a44
to
bd7ed9f
Compare
a4lg
force-pushed
the
riscv-zicntr-zihpm
branch
from
March 16, 2023 03:02
c3acf0e
to
bf0b50a
Compare
a4lg
force-pushed
the
riscv-zicntr-zihpm
branch
5 times, most recently
from
August 3, 2023 05:59
88a6a2a
to
93a4727
Compare
a4lg
force-pushed
the
riscv-zicntr-zihpm
branch
8 times, most recently
from
August 11, 2023 03:56
49246e0
to
cc271b4
Compare
a4lg
force-pushed
the
riscv-zicntr-zihpm
branch
from
August 15, 2023 06:37
cc271b4
to
11d9ed4
Compare
a4lg
force-pushed
the
riscv-zicntr-zihpm
branch
from
August 15, 2023 07:27
11d9ed4
to
94c835e
Compare
a4lg
force-pushed
the
riscv-zicntr-zihpm
branch
4 times, most recently
from
September 7, 2023 09:35
75c034c
to
ae50984
Compare
a4lg
force-pushed
the
riscv-zicntr-zihpm
branch
4 times, most recently
from
October 19, 2023 07:01
1ae2bb7
to
f3c2a5c
Compare
a4lg
force-pushed
the
riscv-zicntr-zihpm
branch
2 times, most recently
from
October 21, 2023 00:44
10fe8f9
to
872554c
Compare
This commit adds support for 'Zicntr' and 'Zihpm' extensions (version 2.0). However, because GNU Binutils handled those as a part of 'I' and there was a time when a ratified specification did split counters from the 'I' extension without separate extension names, we need to take care of possible compatibility issues. So, if a 'Zicntr' pseudoinstruction is used without that extension, it generates not an error but a warning. bfd/ChangeLog: * elfxx-riscv.c (riscv_implicit_subsets): Add implications related to counter extensions. (riscv_supported_std_z_ext): Add 'Zicntr' and 'Zihpm' extensions. Define default versions of 'Zicsr' and 'Zifencei' on the draft ISA because they might be used on the 'E' extension handling. (riscv_is_subset_of_i_2p0): New function. (riscv_parse_add_subset): If a subset of the 'I' extension version 2.0 is being added, check the version of 'I' and allow its version unknown when the 'I' extension version is less than 2.1. (riscv_multi_subset_supports, riscv_multi_subset_supports_ext): Add support for the 'Zicntr' extension with compatibility measure. gas/ChangeLog: * config/tc-riscv.c (enum riscv_csr_class): Add new CSR classes corresponding 'Zicntr' and 'Zihpm' extensions. (riscv_csr_address): Add handling for new CSR classes. (riscv_ip): Raise a warning if a 'Zicntr' pseudoinstruction is used without that extension. * testsuite/gas/riscv/csr-insns-pseudo.s: Rename section names to indicate that the extension 'Zicntr' is needed. * testsuite/gas/riscv/csr-insns-pseudo.d: Add "zicntr" to arch. * testsuite/gas/riscv/csr-insns-pseudo-noalias.d: Likewise. * testsuite/gas/riscv/csr-insns-pseudo-zfinx.d: Likewise. * testsuite/gas/riscv/csr-insns-read-only.d: Likewise. * testsuite/gas/riscv/csr-version-1p9p1.d: Specify versions. * 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: Add warnings regarding 'Zicntr' and 'Zihpm' extension recategorization. * testsuite/gas/riscv/csr-version-1p10.l: Likewise. * testsuite/gas/riscv/csr-version-1p11.l: Likewise. * testsuite/gas/riscv/csr-version-1p12.l: Likewise. * testsuite/gas/riscv/march-imply-i2p0-01.d: 'I' version 2.0 effectively imples 'Zicsr' and 'Zifencei' but should not be reflected to the expanded architectural string. * testsuite/gas/riscv/march-ok-reorder.d: Use 'I' version 2.1 and use other extensions to test proper ordering. * testsuite/gas/riscv/csr-insns-pseudo-nozicntr.d: New test to see warnings are generated when the 'Zicntr' extension is not specified. * testsuite/gas/riscv/csr-insns-pseudo-nozicntr.l: Likewise. include/ChangeLog: * opcode/riscv-opc.h: Recategorize user counter CSRs. * opcode/riscv.h (enum riscv_insn_class): Add INSN_CLASS_ZICNTR for 'Zicntr' pseudoinstructions. opcodes/ChangeLog: * riscv-opc.c (riscv_opcodes): Recategorize counter pseudoinstructions to the 'Zicntr' extension.
a4lg
force-pushed
the
riscv-zicntr-zihpm
branch
from
October 21, 2023 03:44
872554c
to
a155952
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Wiki Page (details): https://github.com/a4lg/binutils-gdb/wiki/riscv_zicntr_zihpm