Skip to content
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

Support march generation without custom extensions #162

Merged
merged 3 commits into from
Jan 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

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

## [3.17.0] - 2024-01-09
- support march generation without custom extensions

## [3.16.0] - 2024-01-03
- use the "hartX" naming for the merged dict
- improve logging statements
Expand Down
2 changes: 1 addition & 1 deletion riscv_config/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from pkgutil import extend_path
__path__ = extend_path(__path__, __name__)
__version__ = '3.16.0'
__version__ = '3.17.0'

9 changes: 8 additions & 1 deletion riscv_config/isa_validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def get_extension_list(isa):

return (extension_list, err, err_list)

def get_march_mabi (isa : str):
def get_march_mabi (isa : str, opt_remove_custom_exts: bool = False):
'''
This function returns the corresponding march and mabi argument values
for RISC-V GCC
Expand Down Expand Up @@ -215,6 +215,13 @@ def get_march_mabi (isa : str):
# add Zbp and Zbt to null_ext if Zbpbo is present
if 'Zbpbo' in ext_list:
null_ext += ['Zbp', 'Zbt']

# remove all custom extensions
for ext in ext_list:
if ext.startswith('X'):
if opt_remove_custom_exts:
ext_list.remove(ext)

# construct march
for ext in ext_list:
if ext not in null_ext:
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 3.16.0
current_version = 3.17.0
commit = True
tag = True

Expand Down
Loading