[PATCH v4 0/1] RISC-V: Add SpacemiT vendor extensions xsmtvdot
Mark Zhuang
zhuangqiubin@linux.spacemit.com
Fri Apr 10 15:11:22 GMT 2026
From: Mark Zhuang <mark.zhuang@spacemit.com>
On 10.04.2026 12:25, Jan Beulich wrote:
> Doesn't this file need to be named x-smt-vdot-fail.d, for the test to be
> executed at all? And isn't the real x-smt-vdot-fail.l missing?
I apologize for not catching this before sending. v4 fix it. Thanks.
> Only i8 being tested? (And no invalid i<N> in the -fail test?)
For the SpacemiT K1 chip (X60 core), only i8 is currently implemented
in hardware, so only i8 being tested. In the v4 update, the fail test
has been extended to include invalid i<N>
Although the K1 hardware only supports i8, we retain handling for
i2, i4, and i16 in the patch because the upcoming SpacemiT K3 chip
will utilize them, allowing for code reuse.
We are currently preparing the documentation and patches for K3.
> In a situation like this, with already pretty deep indentation, can I talk
> you into using
>
> if (wi == 3)
> break;
>
> instead?
>
> The scope here then can go away, and indentation can be reduced by 2 levels.
>
> The last of the "break" also looks mis-indented, but the question is
> whether the default: case is needed at all. wi can't take any value other
> than 0...3.
Done. v4 use early break and if/else-if chain to make code cleaner.
Mark Zhuang (1):
RISC-V: Add SpacemiT vendor extensions xsmtvdot
bfd/elfxx-riscv.c | 7 ++
gas/NEWS | 3 +
gas/config/tc-riscv.c | 108 ++++++++++++++++++++++
gas/doc/c-riscv.texi | 7 ++
gas/testsuite/gas/riscv/march-help.l | 1 +
gas/testsuite/gas/riscv/x-smt-vdot-fail.d | 3 +
gas/testsuite/gas/riscv/x-smt-vdot-fail.l | 77 +++++++++++++++
gas/testsuite/gas/riscv/x-smt-vdot-fail.s | 78 ++++++++++++++++
gas/testsuite/gas/riscv/x-smt-vdot.d | 41 ++++++++
gas/testsuite/gas/riscv/x-smt-vdot.s | 33 +++++++
include/opcode/riscv-opc.h | 38 ++++++++
include/opcode/riscv.h | 9 ++
opcodes/riscv-dis.c | 43 +++++++++
opcodes/riscv-opc.c | 23 +++++
14 files changed, 471 insertions(+)
create mode 100644 gas/testsuite/gas/riscv/x-smt-vdot-fail.d
create mode 100644 gas/testsuite/gas/riscv/x-smt-vdot-fail.l
create mode 100644 gas/testsuite/gas/riscv/x-smt-vdot-fail.s
create mode 100644 gas/testsuite/gas/riscv/x-smt-vdot.d
create mode 100644 gas/testsuite/gas/riscv/x-smt-vdot.s
--
2.34.1
More information about the Binutils
mailing list