-
Notifications
You must be signed in to change notification settings - Fork 858
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
Zvk disassembler support (on top of PR 1303) #1388
Zvk disassembler support (on top of PR 1303) #1388
Conversation
I am not crazy about the macro duplications, neither between V and the Zvk extensions, nor between the Zvk extensions themselves. Because I followed the V example I undef the macros after each extension, leading to some duplication between extensions. Feedback is appreciated. I wish we could use more functions, but I don't really see how to avoid macros when dealing with identifier generation ( |
riscv/encoding.h
Outdated
#define MATCH_AMOCAS_D 0x2800302f | ||
#define MASK_AMOCAS_D 0xf800707f | ||
#define MATCH_AMOCAS_Q 0x2800402f | ||
#define MASK_AMOCAS_Q 0xf800707f | ||
#define MATCH_AMOCAS_W 0x2800202f | ||
#define MASK_AMOCAS_W 0xf800707f |
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.
I assume those are side effects of the riscv-opcodes
update (and not directly related to vector crypto) ?
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.
Indeed. The encoding update is the one from #1303. It is made from riscv-opcode's master branch at HEAD because the previous encoding update contained commits very close to (at?) HEAD but seemingly not from the master branch or any commit that appears in riscv-opcodes's repo.
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.
With the merge of #1303, those changes disappeared from this PR.
I think the PR should have as base branch the branch of #1303, namely |
d3480fc
to
8471f36
Compare
Add disassembler support for all instructions in Zvk extensions: - Zvbb (bitmanip) - Zvbc (carryless multiplication) - Zvkg (GMAC) - Zvkned (AES) - Zvknha / Zvknhb (SHA-256, SHA-512) - Zvksed (SM4) - Zvksh (SM3) Macros are used to limit code duplication, following the example of the base V extension. Because the V extension undefines some of its macros after their use, there Zvk support does define some similar macros. Co-authored-by: Gianluca Guida <gianluca@rivosinc.com> Signed-off-by: Eric Gouriou <ego@rivosinc.com>
8471f36
to
e1101a1
Compare
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.
Thanks. Auto-merge should do its thing once the PR clears CI.
Oddly, auto-merge took effect before CI passed. Please babysit the CI task and create a fixup PR if there are any failures. |
For the record the new version that got accepted had those changes:
Thanks for the merge! |
Zvk: disassembler support
This is meant to be pulled after #1303 has gone in. Only one commit is relevant and all previous ones will disappear once rebased.
Add disassembler support for all instructions in Zvk extensions:
Macros are used to limit code duplication, following the example
of the base V extension. Because the V extension undefines some
of its macros after their use, there Zvk support does define some
similar macros.
Co-authored-by: Gianluca Guida gianluca@rivosinc.com
Signed-off-by: Eric Gouriou ego@rivosinc.com