Skip to content

Commit 2f1fa17

Browse files
authored
Merge pull request #84 from riscv-software-src/isa-string-fix-issue83
isa string checks for crypto fixed
2 parents ab596eb + df29f37 commit 2f1fa17

File tree

6 files changed

+82
-15
lines changed

6 files changed

+82
-15
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
44

5+
## [2.16.0] - 2022-07-20
6+
7+
- fixed overlap checks for crypto extensions
8+
- removing K and P extension strings from regex
9+
510
## [2.15.1] - 2022-06-18
611

712
- added missing Z extensions from Kcrypto

CONTRIBUTING.rst

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
.. See LICENSE.incore for details
2+
3+
.. highlight:: shell
4+
5+
============
6+
Contributing
7+
============
8+
9+
Contributions are welcome, and they are greatly appreciated and credit will always be given.
10+
11+
You can contribute in many ways:
12+
13+
Types of Contributions
14+
----------------------
15+
16+
Report Bugs
17+
~~~~~~~~~~~
18+
19+
Report bugs at https://github.com/riscv-software-src/riscv-config/issues/ .
20+
21+
Submit Feedback
22+
~~~~~~~~~~~~~~~
23+
24+
The best way to send feedback is to file an issue at https://github.com/riscv-software-src/riscv-config/issues/.
25+
26+
If you are proposing a feature:
27+
28+
* Explain in detail how it would work.
29+
* Keep the scope as narrow as possible, to make it easier to implement.
30+
* Remember that this is a volunteer-driven project, and that contributions
31+
are welcome :)
32+
33+
Get Started!
34+
------------
35+
36+
Ready to contribute? Here's how to set up `riscv_config` for local development.
37+
38+
1. Fork the `riscv_config` repo on GitHub.
39+
2. Clone your fork locally::
40+
41+
$ git clone https://github.com/riscv-software-src/riscv-config.git
42+
43+
3. Create an issue and WIP merge request that creates a working branch for you::
44+
45+
$ git checkout -b name-of-your-bugfix-or-feature
46+
47+
Now you can make your changes locally.
48+
49+
50+
5. Commit your changes and push your branch to GitLab::
51+
52+
$ git add .
53+
$ git commit -m "Your detailed description of your changes."
54+
$ git push origin name-of-your-bugfix-or-feature
55+
56+
6. Submit a merge request through the GitHub website.
57+
58+
Deploying
59+
---------
60+
61+
A reminder for the maintainers on how to deploy.
62+
Make sure all your changes are committed.
63+
Then run::
64+
65+
$ bumpversion --no-tag --config-file setup.cfg patch # possible: major / minor / patch
66+
$ git push origin name-of-your-branch
67+

riscv_config/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
from pkgutil import extend_path
22
__path__ = extend_path(__path__, __name__)
3-
__version__ = '2.15.1'
3+
__version__ = '2.16.0'

riscv_config/constants.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@
77
debug_schema = os.path.join(root, 'schemas/schema_debug.yaml')
88
platform_schema = os.path.join(root, 'schemas/schema_platform.yaml')
99
isa_regex = \
10-
re.compile("^RV(32|64|128)[IE]+[ABCDEFGHJKLMNPQSTUVX]*(Zicbom|Zicbop|Zicboz|Zicsr|Zifencei|Zihintpause|Zam|Ztso|Zba|Zbb|Zbc|Zbe|Zbf|Zbkb|Zbkc|Zbkx|Zbm|Zbp|Zbr|Zbs|Zbt|Zk|Zkn|Zknd|Zkne|Zknh|Zkr|Zks|Zksed|Zksh|Zkt|Zmmul|Svnapot){,1}(_Zicbom){,1}(_Zicbop){,1}(_Zicboz){,1}(_Zicsr){,1}(_Zifencei){,1}(_Zihintpause){,1}(_Zmmul){,1}(_Zam){,1}(_Zba){,1}(_Zbb){,1}(_Zbc){,1}(_Zbe){,1}(_Zbf){,1}(_Zbkb){,1}(_Zbkc){,1}(_Zbkx){,1}(_Zbm){,1}(_Zbp){,1}(_Zbr){,1}(_Zbs){,1}(_Zbt){,1}(Zk){,1}(_Zkn){,1}(_Zknd){,1}(_Zkne){,1}(Zknh){,1}(_Zkr){,1}(_Zks){,1}(_Zksed){,1}(_Zksh){,1}(_Zkt){,1}(_Ztso){,1}(_Svnapot){,1}$")
10+
re.compile("^RV(32|64|128)[IE]+[ACDEFGHJLMNPQSTUVX]*(Zicbom|Zicbop|Zicboz|Zicsr|Zifencei|Zihintpause|Zam|Ztso|Zba|Zbb|Zbc|Zbe|Zbf|Zbkb|Zbkc|Zbkx|Zbm|Zbp|Zbr|Zbs|Zbt|Zk|Zkn|Zknd|Zkne|Zknh|Zkr|Zks|Zksed|Zksh|Zkt|Zmmul|Svnapot){,1}(_Zicbom){,1}(_Zicbop){,1}(_Zicboz){,1}(_Zicsr){,1}(_Zifencei){,1}(_Zihintpause){,1}(_Zmmul){,1}(_Zam){,1}(_Zba){,1}(_Zbb){,1}(_Zbc){,1}(_Zbe){,1}(_Zbf){,1}(_Zbkb){,1}(_Zbkc){,1}(_Zbkx){,1}(_Zbm){,1}(_Zbp){,1}(_Zbr){,1}(_Zbs){,1}(_Zbt){,1}(Zk){,1}(_Zkn){,1}(_Zknd){,1}(_Zkne){,1}(Zknh){,1}(_Zkr){,1}(_Zks){,1}(_Zksed){,1}(_Zksh){,1}(_Zkt){,1}(_Ztso){,1}(_Svnapot){,1}$")

riscv_config/isa_validator.py

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -71,20 +71,15 @@ def get_extension_list(isa):
7171
if 'S' in extension_list and not 'U' in extension_list:
7272
err_list.append( "S cannot exist without U.")
7373
err = True
74-
if 'Zkg' in extension_list and 'Zbc' in extension_list:
75-
err_list.append( "Zkg being a proper subset of Zbc (from B extension) should be ommitted from the ISA string")
74+
if 'Zkn' in extension_list and ( set(['Zbkb', 'Zbkc', 'Zbkx', 'Zkne', 'Zknd', 'Zknh']) & set(extension_list)):
75+
err_list.append( "Zkn is a superset of Zbkb, Zbkc, Zbkx, Zkne, Zknd, Zknh. In presence of Zkn the subsets must be ignored in the ISA string.")
7676
err = True
77-
if 'Zkb' in extension_list and 'Zbp' in extension_list :
78-
err_list.append( "Zkb being a proper subset of Zbp (from B extension) should be ommitted from the ISA string")
77+
if 'Zks' in extension_list and ( set(['Zbkb', 'Zbkc', 'Zbkx', 'Zksed', 'Zksh']) & set(extension_list) ):
78+
err_list.append( "Zks is a superset of Zbkb, Zbkc, Zbkx, Zksed, Zksh. In presence of Zks the subsets must be ignored in the ISA string.")
7979
err = True
80-
if 'Zks' in extension_list and ( set(['Zkse', 'Zksh','Zkg','Zkb']) & set(extension_list) ):
81-
err_list.append( "Zks is a superset of Zkse, Zksh, Zkg and Zkb. In presence of Zks the subsets must be ignored in the ISA string.")
82-
err = True
83-
if 'Zkn' in extension_list and ( set(['Zkne','Zknd','Zknh','Zkg','Zkb']) & set(extension_list) ):
84-
err_list.append( "Zkn is a superset of Zkne, Zknd, Zknh, Zkg and Zkb, In presence of Zkn the subsets must be ignored in the ISA string")
85-
err = True
86-
if 'K' in extension_list and ( set(['Zkn','Zkr','Zkne','Zknd','Zknh','Zkg','Zkb']) & set(extension_list) ) :
87-
err_list.append( "K is a superset of Zkn and Zkr , In presence of K the subsets must be ignored in the ISA string")
80+
if 'Zk' in extension_list and ( set(['Zbkb', 'Zbkc', 'Zbkx', 'Zkne', 'Zknd',
81+
'Zknh', 'Zkn','Zkr','Zkt']) & set(extension_list)):
82+
err_list.append( "Zkn is a superset of Zbkb, Zbkc, Zbkx, Zkne, Zknd, Zknh, Zkn, Zkt, Zkr. In presence of Zkn the subsets must be ignored in the ISA string.")
8883
err = True
8984
return (extension_list, err, err_list)
9085

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bumpversion]
2-
current_version = 2.15.1
2+
current_version = 2.16.0
33
commit = True
44
tag = True
55

0 commit comments

Comments
 (0)