[RFC PATCH 1/6] RISC-V: Add Zvkb ISA extension support
Christoph Müllner
christoph.muellner@vrull.eu
Thu Dec 22 14:23:04 GMT 2022
On Wed, Dec 21, 2022 at 9:50 PM Jeff Law <jeffreyalaw@gmail.com> wrote:
>
>
> On 12/21/22 10:07, Christoph Muellner wrote:
> > From: Christoph Müllner <christoph.muellner@vrull.eu>
> >
> > This commit adds the Zvkb ISA extension instructions, which are part
> > of the vector crypto extensions.
> >
> > Signed-off-by: Christoph Müllner <christoph.muellner@vrull.eu>
> > ---
> > bfd/elfxx-riscv.c | 5 ++++
> > gas/config/tc-riscv.c | 13 ++++++++++
> > gas/testsuite/gas/riscv/zvkb.d | 36 ++++++++++++++++++++++++++++
> > gas/testsuite/gas/riscv/zvkb.s | 28 ++++++++++++++++++++++
> > include/opcode/riscv-opc.h | 44 ++++++++++++++++++++++++++++++++++
> > include/opcode/riscv.h | 5 ++++
> > opcodes/riscv-dis.c | 4 ++++
> > opcodes/riscv-opc.c | 16 +++++++++++++
> > 8 files changed, 151 insertions(+)
> > create mode 100644 gas/testsuite/gas/riscv/zvkb.d
> > create mode 100644 gas/testsuite/gas/riscv/zvkb.s
> It all looks quite sensible to me.
>
>
> > +/* Zvkb instructions. */
> > +#define MATCH_VCLMULVV 0x30002057
> > +#define MASK_VCLMULVV 0xfc00707f
> I'm just going to trust you got these right and that the MATCH value in
> particular might need adjustment if the encodings change.
>
In fact, they changed two days ago (clmul, clmulh, rotl, rotr).
So I had to adjust these before sending the patchset on the list.
When doing so, I rechecked all Zvkb, so I'm quite sure they are good.
>
>
>
> > +DECLARE_INSN(vclmulvv, MATCH_VCLMULVV, MASK_VCLMULVV)
> So IIRC, these are only used in GDB's prologue/epilogue scanning code --
> and we're quite unlikely to ever need any of these instructions for
> prologues/epilogues. I'm guessing convention is to go ahead and add the
> DECLARE_INSN instances for each instruction, even if they aren't likely
> to be show up in a prologue or epilogue?
>
Honestly, I'm not sure what to list here and what not (and I did not see
any policy).
Therefore, in doubt, I always add these.
>
> Jeff
>
More information about the Binutils
mailing list