-
Notifications
You must be signed in to change notification settings - Fork 89
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
Extension subset problem encountered while reusing B ext #81
Comments
|
Hi @ksyx So, my reading of this is that there is no actual problem with the groups, but implementing them in a way that LLVM understands is difficult. Is that right? I'm not an LLVM expert, so I'd suggest you talk to the people who submitted the Bitmanip code to LLVM, or ask in the toolchains and runtimes group for the best way to manage this. I understand crypto is the first / only extension which shares instructions with another extension this way. It sounds like that's simply broken an implementation assumption for some people. We cannot simply re-use the whole set of You could try creating some "pseudo-groups", and each "official" group then enables one or more "pseudo-groups"? For example, here in the GCC/binutils for Bitmanip, the rotate instructions can be enabled by either the I'm sorry I can't give you a direct answer, I hope that gives you some things to investigate? Let me know how you get on and I'll help out as best I can. Thanks, |
|
Thanks a lot for this reply! Yeah there is nothing wrong with the grouping but introduces some problems while implementing. The contexts and resources provided are helpful and I will dig into it. |
|
Hi Ben, |
|
Hi @ksyx
Okay, well that's sort of good news in that maybe there's a solution that can be applied to both. That the problem appears in both places doesn't surprise me.
It sounds like you've got a good understanding of the problem for sure. In terms of fixing it, it'd be reasonable to reach out to the people who did the GCC and LLVM work for bitmanip and see if they have a solution. It would be good to have something that works for people in the future who find themselves in this situation too. Certainly the renaming of Cheers, |
|
Can this issue be closed @ksyx ? |
|
If I understood the status correctly, the Zbk* subextensions has already resolved the problem. Thus this issue could be closed. Thanks. |
We are currently implementing LLVM MC Layer support for K extension and while working on further separating the instructions into corresponding function sets, especially those reused from B extension, we found this relationship with B extension as follows. This indicates that K extension reuses part of but not all of instructions from Zbp and Zbc.

While implementing MC Layer, we need to set a Predicate property for instructions to indicate the features required for this instructions to work, like
HasStdExtZbp,IsRV64, etc. And now we have faced a problem that, if we need to only include those instructions used by K extension, and not use any extra instructions likeshflwfor a random example, we would need to modify the definition file (.tdtablegen file) of B extension to further group those instructions, which is a bit invasive especially considering that theZbcis marked with an asterisk, "means the extensions are expected to be unchanged in the official version". The other solution is to reuse the whole subset ofZbpandZbcinstructions, and this brings redundant instructions used.Which of the solution above (modify B extension / reuse whole set of
ZbpandZbc) is better or any other ideas?The text was updated successfully, but these errors were encountered: