-
Notifications
You must be signed in to change notification settings - Fork 7.6k
arch: riscv: Add Zc* compressed instruction extension support #92276
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
base: main
Are you sure you want to change the base?
Conversation
This commit adds the support for the following new Zc* series compressed instruction extensions: Zca - Subset of the C extension without FP loads and stores Zcb - "Simple" instructions Zcd - Double-precision floating-point instructions Zcf - Single-precision floating-point instructions Zcmp - "Complex" instructions for embedded CPUs Zcmt - Table jump instructions for embedded CPUs With the introduction of the Zc* extensions, the C extension now implies the following Zc* extensions: * Zca, always * Zcf if F is specified (RV32 only) * Zcd if D is specified The Zc* extensions that are implied by the C extension are not specified in the GCC `-march` flag because they are redundant and can interfere with the resolution of the correct multi-lib for the selected architecture unless the the alternate mappings for the redundant forms are manually specified. All the implementation details in this commit are based on the Zc* v1.0.0 specification, which is the ratified version. Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
Rebased after #92275 is merged |
|
|
||
# Zcd is implied by C+D | ||
if(CONFIG_RISCV_ISA_EXT_ZCD AND | ||
NOT (CONFIG_RISCV_ISA_EXT_C AND CONFIG_RISCV_ISA_EXT_D)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Checking EXT_D
is redundant since zcd
depends on EXT_D
in Kconfig?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Technically yes; but, we have nothing to lose by being verbose here.
Includes the commits from #92275Please review the last commit ("arch: riscv: Add Zc* compressed instruction extension support") only.