-
Notifications
You must be signed in to change notification settings - Fork 259
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
wazevo: adds bit count instructions clz, ctz #1635
Conversation
Signed-off-by: Edoardo Vacchi <[email protected]>
Although I am not sure about its correctness, this PR may be a good starting point if you haven't dug into wazevo yet since it is really tiny @ncruces |
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.
Good start!
Next time let's add reference to issue #1496 in the PR description |
Signed-off-by: Edoardo Vacchi <[email protected]>
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.
👍
Signed-off-by: Edoardo Vacchi <[email protected]>
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.
👍
Continues #1496.
This introduces the front-end and back-end for clz, ctz (in terms of rbit+clz).
It originally also introduced popcnt for the front-end, but this requires
VCNT in the backend, which is probably worth its own separate PR.
Contextually, this also introduces a partial implementation for bitRR.
First PR to wazevo, so I am not entirely sure that the generated
code for the SSA and the backend is correct, let me know if there are errors,
I am really figuring out a lot of stuff, including the framework :)
Signed-off-by: Edoardo Vacchi [email protected]