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

riscv64: Add bitmanip extension flags #5847

Merged
merged 1 commit into from
Feb 21, 2023

Conversation

afonso360
Copy link
Contributor

@afonso360 afonso360 commented Feb 21, 2023

This PR clarifies our bit manipulation set of ISA flags.

It seems that our current "B" extension is the full set of instructions defined in the Bit-Manipulation spec (pdf). However we should be querying each extension individually since some processors may not implement all of them.

Additionally it may cause confusion with the currently reserved B extension defined in Chapter 19 of the ISA (pdf). These are unrelated and there is no connection between "B" and the various extensions defined in the Bit-Manipulation spec.

As an example, the SiFive U74 implements only a subset of these (Zbb, Zba) so it wouldn't qualify for most of these optimizations previously, despite most of them only needing Zbb.

@afonso360 afonso360 added cranelift Issues related to the Cranelift code generator cranelift:area:riscv64 Issues related to the RISC-V 64 backend. labels Feb 21, 2023
@github-actions github-actions bot added the cranelift:meta Everything related to the meta-language. label Feb 21, 2023
Copy link
Contributor

@jameysharp jameysharp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm taking your word for it regarding which instructions are associated with which extensions. Given that, this looks correct to me!

I especially appreciate that you added descriptions to the has_* flags with a little more detail about what names like bkb actually mean.

@afonso360 afonso360 added this pull request to the merge queue Feb 21, 2023
Merged via the queue into bytecodealliance:main with commit 6e6a103 Feb 21, 2023
@afonso360 afonso360 deleted the riscv-bitmanip-flags branch February 21, 2023 22:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cranelift:area:riscv64 Issues related to the RISC-V 64 backend. cranelift:meta Everything related to the meta-language. cranelift Issues related to the Cranelift code generator
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants