public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Tsukasa OI <research_trasio@irq.a4lg.com>
To: Tsukasa OI <research_trasio@irq.a4lg.com>,
	Nelson Chu <nelson@rivosinc.com>,
	Kito Cheng <kito.cheng@sifive.com>,
	Palmer Dabbelt <palmer@dabbelt.com>
Cc: binutils@sourceware.org
Subject: [PATCH 12/12] RISC-V: Combine/enhance 'Zk*'/'Zbk*' extension tests
Date: Sat,  5 Nov 2022 12:29:18 +0000	[thread overview]
Message-ID: <f1c5589ab606b74eeac98e3dafd4a7903450d3b2.1667651354.git.research_trasio@irq.a4lg.com> (raw)
In-Reply-To: <cover.1667651354.git.research_trasio@irq.a4lg.com>

This commit combines tests for 'Zk*' and 'Zbk*' extensions and adds
"no required extension" testcases based on new test utilities.  It also
contains minor tidying (such as using different registers per operand).

gas/ChangeLog:

	* testsuite/gas/riscv/zbk-ext.s: Combine zbkb-{32,64}.s, zbkc.s
	and zbkx.s.  Use different register per operand.
	* testsuite/gas/riscv/zbk-ext-32.d: Combine zbk[bcx]-32.d.
	Reflect zbk-ext.s changes.
	* testsuite/gas/riscv/zbk-ext-64.d: Combine zbk[bcx]-64.d.
	Reflect zbk-ext.s changes.
	* testsuite/gas/riscv/zbk-ext-32-noalias.d: New test based on the
	concept of zbkb-32-na.d and the code based on zbk-ext-32.d.
	* testsuite/gas/riscv/zbk-ext-64-noalias.d: Likewise but new.
	* testsuite/gas/riscv/zbk-ext-32-noarch.d: New test.
	* testsuite/gas/riscv/zbk-ext-32-noarch.l: Likewise.
	* testsuite/gas/riscv/zbk-ext-64-noarch.d: New test.
	* testsuite/gas/riscv/zbk-ext-64-noarch.l: Likewise.
	* testsuite/gas/riscv/zk-ext-32.s: Combine zkn*-32.s, zksed.s
	and zksh.s.  Use different register per operand.
	* testsuite/gas/riscv/zk-ext-32.d: Combine zk[ns]*-32.d.
	Reflect zk-ext-32.s changes.
	* testsuite/gas/riscv/zk-ext-64.s: Combine zkn*-64.s, zksed.s
	and zksh.s.  Use different register per operand.
	* testsuite/gas/riscv/zk-ext-64.d: Combine zk[ns]*-64.d.
	Reflect zk-ext-64.s changes.
	* testsuite/gas/riscv/zk-ext-32-noarch.d: New test.
	* testsuite/gas/riscv/zk-ext-32-noarch.l: Likewise.
	* testsuite/gas/riscv/zk-ext-64-noarch.d: New test.
	* testsuite/gas/riscv/zk-ext-64-noarch.l: Likewise.
	* testsuite/gas/riscv/zkt.d: Separate test for the 'Zkt' extension
	whether this extension is supported through -march.
	* testsuite/gas/riscv/k-ext.s: Removed as duplicate.
	* testsuite/gas/riscv/k-ext.d: Removed as duplicate.
	* testsuite/gas/riscv/k-ext-64.s: Removed as duplicate.
	* testsuite/gas/riscv/k-ext-64.d: Removed as duplicate.
	* testsuite/gas/riscv/zbkb-32.s: Removed.
	* testsuite/gas/riscv/zbkb-32.d: Removed.
	* testsuite/gas/riscv/zbkb-32-na.d: Removed.
	* testsuite/gas/riscv/zbkb-64.s: Removed.
	* testsuite/gas/riscv/zbkb-64.d: Removed.
	* testsuite/gas/riscv/zbkc.s: Removed.
	* testsuite/gas/riscv/zbkc-32.d: Removed.
	* testsuite/gas/riscv/zbkc-64.d: Removed.
	* testsuite/gas/riscv/zbkx.s: Removed.
	* testsuite/gas/riscv/zbkx-32.d: Removed.
	* testsuite/gas/riscv/zbkx-64.d: Removed.
	* testsuite/gas/riscv/zknd-32.s: Removed.
	* testsuite/gas/riscv/zknd-32.d: Removed.
	* testsuite/gas/riscv/zknd-64.s: Removed.
	* testsuite/gas/riscv/zknd-64.d: Removed.
	* testsuite/gas/riscv/zkne-32.s: Removed.
	* testsuite/gas/riscv/zkne-32.d: Removed.
	* testsuite/gas/riscv/zkne-64.s: Removed.
	* testsuite/gas/riscv/zkne-64.d: Removed.
	* testsuite/gas/riscv/zknh-32.s: Removed.
	* testsuite/gas/riscv/zknh-32.d: Removed.
	* testsuite/gas/riscv/zknh-64.s: Removed.
	* testsuite/gas/riscv/zknh-64.d: Removed.
	* testsuite/gas/riscv/zksed.s: Removed.
	* testsuite/gas/riscv/zksed-32.d: Removed.
	* testsuite/gas/riscv/zksed-64.d: Removed.
	* testsuite/gas/riscv/zksh.s: Removed.
	* testsuite/gas/riscv/zksh-32.d: Removed.
	* testsuite/gas/riscv/zksh-64.d: Removed.
---
 gas/testsuite/gas/riscv/k-ext-64.d           | 47 --------------------
 gas/testsuite/gas/riscv/k-ext-64.s           | 38 ----------------
 gas/testsuite/gas/riscv/k-ext.d              | 44 ------------------
 gas/testsuite/gas/riscv/k-ext.s              | 35 ---------------
 gas/testsuite/gas/riscv/zbk-ext-32-noalias.d | 26 +++++++++++
 gas/testsuite/gas/riscv/zbk-ext-32-noarch.d  |  3 ++
 gas/testsuite/gas/riscv/zbk-ext-32-noarch.l  | 21 +++++++++
 gas/testsuite/gas/riscv/zbk-ext-32.d         | 26 +++++++++++
 gas/testsuite/gas/riscv/zbk-ext-64-noalias.d | 28 ++++++++++++
 gas/testsuite/gas/riscv/zbk-ext-64-noarch.d  |  3 ++
 gas/testsuite/gas/riscv/zbk-ext-64-noarch.l  | 21 +++++++++
 gas/testsuite/gas/riscv/zbk-ext-64.d         | 28 ++++++++++++
 gas/testsuite/gas/riscv/zbk-ext.s            | 37 +++++++++++++++
 gas/testsuite/gas/riscv/zbkb-32-na.d         | 23 ----------
 gas/testsuite/gas/riscv/zbkb-32.d            | 22 ---------
 gas/testsuite/gas/riscv/zbkb-32.s            | 13 ------
 gas/testsuite/gas/riscv/zbkb-64.d            | 24 ----------
 gas/testsuite/gas/riscv/zbkb-64.s            | 15 -------
 gas/testsuite/gas/riscv/zbkc-32.d            | 12 -----
 gas/testsuite/gas/riscv/zbkc-64.d            | 12 -----
 gas/testsuite/gas/riscv/zbkc.s               |  3 --
 gas/testsuite/gas/riscv/zbkx-32.d            | 12 -----
 gas/testsuite/gas/riscv/zbkx-64.d            | 12 -----
 gas/testsuite/gas/riscv/zbkx.s               |  3 --
 gas/testsuite/gas/riscv/zk-ext-32-noarch.d   |  3 ++
 gas/testsuite/gas/riscv/zk-ext-32-noarch.l   | 20 +++++++++
 gas/testsuite/gas/riscv/zk-ext-32.d          | 28 ++++++++++++
 gas/testsuite/gas/riscv/zk-ext-32.s          | 41 +++++++++++++++++
 gas/testsuite/gas/riscv/zk-ext-64-noarch.d   |  3 ++
 gas/testsuite/gas/riscv/zk-ext-64-noarch.l   | 23 ++++++++++
 gas/testsuite/gas/riscv/zk-ext-64.d          | 31 +++++++++++++
 gas/testsuite/gas/riscv/zk-ext-64.s          | 44 ++++++++++++++++++
 gas/testsuite/gas/riscv/zknd-32.d            | 12 -----
 gas/testsuite/gas/riscv/zknd-32.s            |  3 --
 gas/testsuite/gas/riscv/zknd-64.d            | 15 -------
 gas/testsuite/gas/riscv/zknd-64.s            |  6 ---
 gas/testsuite/gas/riscv/zkne-32.d            | 12 -----
 gas/testsuite/gas/riscv/zkne-32.s            |  3 --
 gas/testsuite/gas/riscv/zkne-64.d            | 14 ------
 gas/testsuite/gas/riscv/zkne-64.s            |  5 ---
 gas/testsuite/gas/riscv/zknh-32.d            | 20 ---------
 gas/testsuite/gas/riscv/zknh-32.s            | 11 -----
 gas/testsuite/gas/riscv/zknh-64.d            | 18 --------
 gas/testsuite/gas/riscv/zknh-64.s            |  9 ----
 gas/testsuite/gas/riscv/zksed-32.d           | 12 -----
 gas/testsuite/gas/riscv/zksed-64.d           | 12 -----
 gas/testsuite/gas/riscv/zksed.s              |  3 --
 gas/testsuite/gas/riscv/zksh-32.d            | 12 -----
 gas/testsuite/gas/riscv/zksh-64.d            | 12 -----
 gas/testsuite/gas/riscv/zksh.s               |  3 --
 gas/testsuite/gas/riscv/zkt.d                |  5 +++
 51 files changed, 391 insertions(+), 497 deletions(-)
 delete mode 100644 gas/testsuite/gas/riscv/k-ext-64.d
 delete mode 100644 gas/testsuite/gas/riscv/k-ext-64.s
 delete mode 100644 gas/testsuite/gas/riscv/k-ext.d
 delete mode 100644 gas/testsuite/gas/riscv/k-ext.s
 create mode 100644 gas/testsuite/gas/riscv/zbk-ext-32-noalias.d
 create mode 100644 gas/testsuite/gas/riscv/zbk-ext-32-noarch.d
 create mode 100644 gas/testsuite/gas/riscv/zbk-ext-32-noarch.l
 create mode 100644 gas/testsuite/gas/riscv/zbk-ext-32.d
 create mode 100644 gas/testsuite/gas/riscv/zbk-ext-64-noalias.d
 create mode 100644 gas/testsuite/gas/riscv/zbk-ext-64-noarch.d
 create mode 100644 gas/testsuite/gas/riscv/zbk-ext-64-noarch.l
 create mode 100644 gas/testsuite/gas/riscv/zbk-ext-64.d
 create mode 100644 gas/testsuite/gas/riscv/zbk-ext.s
 delete mode 100644 gas/testsuite/gas/riscv/zbkb-32-na.d
 delete mode 100644 gas/testsuite/gas/riscv/zbkb-32.d
 delete mode 100644 gas/testsuite/gas/riscv/zbkb-32.s
 delete mode 100644 gas/testsuite/gas/riscv/zbkb-64.d
 delete mode 100644 gas/testsuite/gas/riscv/zbkb-64.s
 delete mode 100644 gas/testsuite/gas/riscv/zbkc-32.d
 delete mode 100644 gas/testsuite/gas/riscv/zbkc-64.d
 delete mode 100644 gas/testsuite/gas/riscv/zbkc.s
 delete mode 100644 gas/testsuite/gas/riscv/zbkx-32.d
 delete mode 100644 gas/testsuite/gas/riscv/zbkx-64.d
 delete mode 100644 gas/testsuite/gas/riscv/zbkx.s
 create mode 100644 gas/testsuite/gas/riscv/zk-ext-32-noarch.d
 create mode 100644 gas/testsuite/gas/riscv/zk-ext-32-noarch.l
 create mode 100644 gas/testsuite/gas/riscv/zk-ext-32.d
 create mode 100644 gas/testsuite/gas/riscv/zk-ext-32.s
 create mode 100644 gas/testsuite/gas/riscv/zk-ext-64-noarch.d
 create mode 100644 gas/testsuite/gas/riscv/zk-ext-64-noarch.l
 create mode 100644 gas/testsuite/gas/riscv/zk-ext-64.d
 create mode 100644 gas/testsuite/gas/riscv/zk-ext-64.s
 delete mode 100644 gas/testsuite/gas/riscv/zknd-32.d
 delete mode 100644 gas/testsuite/gas/riscv/zknd-32.s
 delete mode 100644 gas/testsuite/gas/riscv/zknd-64.d
 delete mode 100644 gas/testsuite/gas/riscv/zknd-64.s
 delete mode 100644 gas/testsuite/gas/riscv/zkne-32.d
 delete mode 100644 gas/testsuite/gas/riscv/zkne-32.s
 delete mode 100644 gas/testsuite/gas/riscv/zkne-64.d
 delete mode 100644 gas/testsuite/gas/riscv/zkne-64.s
 delete mode 100644 gas/testsuite/gas/riscv/zknh-32.d
 delete mode 100644 gas/testsuite/gas/riscv/zknh-32.s
 delete mode 100644 gas/testsuite/gas/riscv/zknh-64.d
 delete mode 100644 gas/testsuite/gas/riscv/zknh-64.s
 delete mode 100644 gas/testsuite/gas/riscv/zksed-32.d
 delete mode 100644 gas/testsuite/gas/riscv/zksed-64.d
 delete mode 100644 gas/testsuite/gas/riscv/zksed.s
 delete mode 100644 gas/testsuite/gas/riscv/zksh-32.d
 delete mode 100644 gas/testsuite/gas/riscv/zksh-64.d
 delete mode 100644 gas/testsuite/gas/riscv/zksh.s
 create mode 100644 gas/testsuite/gas/riscv/zkt.d

diff --git a/gas/testsuite/gas/riscv/k-ext-64.d b/gas/testsuite/gas/riscv/k-ext-64.d
deleted file mode 100644
index d56e0354a37..00000000000
--- a/gas/testsuite/gas/riscv/k-ext-64.d
+++ /dev/null
@@ -1,47 +0,0 @@
-#as: -march=rv64i_zbkb_zbkc_zbkx_zknd_zkne_zknh_zkr_zksed_zksh_zkt
-#source: k-ext-64.s
-#objdump: -d
-
-.*:[ 	]+file format .*
-
-
-Disassembly of section .text:
-
-0+000 <target>:
-[ 	]+[0-9a-f]+:[ 	]+60c5d533[ 	]+ror[ 	]+a0,a1,a2
-[ 	]+[0-9a-f]+:[ 	]+60c59533[ 	]+rol[ 	]+a0,a1,a2
-[ 	]+[0-9a-f]+:[ 	]+6025d513[ 	]+ror[ 	]+a0,a1,0x2
-[ 	]+[0-9a-f]+:[ 	]+60c5d53b[ 	]+rorw[ 	]+a0,a1,a2
-[ 	]+[0-9a-f]+:[ 	]+60c5953b[ 	]+rolw[ 	]+a0,a1,a2
-[ 	]+[0-9a-f]+:[ 	]+6025d51b[ 	]+rorw[ 	]+a0,a1,0x2
-[ 	]+[0-9a-f]+:[ 	]+40c5f533[ 	]+andn[ 	]+a0,a1,a2
-[ 	]+[0-9a-f]+:[ 	]+40c5e533[ 	]+orn[ 	]+a0,a1,a2
-[ 	]+[0-9a-f]+:[ 	]+40c5c533[ 	]+xnor[ 	]+a0,a1,a2
-[ 	]+[0-9a-f]+:[ 	]+08c5c533[ 	]+pack[ 	]+a0,a1,a2
-[ 	]+[0-9a-f]+:[ 	]+08c5f533[ 	]+packh[ 	]+a0,a1,a2
-[ 	]+[0-9a-f]+:[ 	]+08c5c53b[ 	]+packw[ 	]+a0,a1,a2
-[ 	]+[0-9a-f]+:[ 	]+68755513[ 	]+brev8[ 	]+a0,a0
-[ 	]+[0-9a-f]+:[ 	]+6b855513[ 	]+rev8[ 	]+a0,a0
-[ 	]+[0-9a-f]+:[ 	]+0ac59533[ 	]+clmul[ 	]+a0,a1,a2
-[ 	]+[0-9a-f]+:[ 	]+0ac5b533[ 	]+clmulh[ 	]+a0,a1,a2
-[ 	]+[0-9a-f]+:[ 	]+28c5a533[ 	]+xperm4[ 	]+a0,a1,a2
-[ 	]+[0-9a-f]+:[ 	]+28c5c533[ 	]+xperm8[ 	]+a0,a1,a2
-[ 	]+[0-9a-f]+:[ 	]+3ac58533[ 	]+aes64ds[ 	]+a0,a1,a2
-[ 	]+[0-9a-f]+:[ 	]+3ec58533[ 	]+aes64dsm[ 	]+a0,a1,a2
-[ 	]+[0-9a-f]+:[ 	]+30051513[ 	]+aes64im[ 	]+a0,a0
-[ 	]+[0-9a-f]+:[ 	]+31459513[ 	]+aes64ks1i[ 	]+a0,a1,0x4
-[ 	]+[0-9a-f]+:[ 	]+7ec58533[ 	]+aes64ks2[ 	]+a0,a1,a2
-[ 	]+[0-9a-f]+:[ 	]+32c58533[ 	]+aes64es[ 	]+a0,a1,a2
-[ 	]+[0-9a-f]+:[ 	]+36c58533[ 	]+aes64esm[ 	]+a0,a1,a2
-[ 	]+[0-9a-f]+:[ 	]+10251513[ 	]+sha256sig0[ 	]+a0,a0
-[ 	]+[0-9a-f]+:[ 	]+10351513[ 	]+sha256sig1[ 	]+a0,a0
-[ 	]+[0-9a-f]+:[ 	]+10051513[ 	]+sha256sum0[ 	]+a0,a0
-[ 	]+[0-9a-f]+:[ 	]+10151513[ 	]+sha256sum1[ 	]+a0,a0
-[ 	]+[0-9a-f]+:[ 	]+10651513[ 	]+sha512sig0[ 	]+a0,a0
-[ 	]+[0-9a-f]+:[ 	]+10751513[ 	]+sha512sig1[ 	]+a0,a0
-[ 	]+[0-9a-f]+:[ 	]+10451513[ 	]+sha512sum0[ 	]+a0,a0
-[ 	]+[0-9a-f]+:[ 	]+10551513[ 	]+sha512sum1[ 	]+a0,a0
-[ 	]+[0-9a-f]+:[ 	]+b0c58533[ 	]+sm4ed[ 	]+a0,a1,a2,0x2
-[ 	]+[0-9a-f]+:[ 	]+b4c58533[ 	]+sm4ks[ 	]+a0,a1,a2,0x2
-[ 	]+[0-9a-f]+:[ 	]+10851513[ 	]+sm3p0[ 	]+a0,a0
-[ 	]+[0-9a-f]+:[ 	]+10951513[ 	]+sm3p1[ 	]+a0,a0
diff --git a/gas/testsuite/gas/riscv/k-ext-64.s b/gas/testsuite/gas/riscv/k-ext-64.s
deleted file mode 100644
index 302b82ea005..00000000000
--- a/gas/testsuite/gas/riscv/k-ext-64.s
+++ /dev/null
@@ -1,38 +0,0 @@
-target:
-        ror     a0, a1, a2
-        rol     a0, a1, a2
-        rori    a0, a1, 2
-        rorw    a0, a1, a2
-        rolw    a0, a1, a2
-        roriw   a0, a1, 2
-        andn    a0, a1, a2
-        orn     a0, a1, a2
-        xnor    a0, a1, a2
-        pack    a0, a1, a2
-        packh   a0, a1, a2
-        packw   a0, a1, a2
-        brev8   a0, a0
-        rev8    a0, a0
-        clmul   a0, a1, a2
-        clmulh  a0, a1, a2
-        xperm4  a0, a1, a2
-        xperm8  a0, a1, a2
-        aes64ds     a0, a1, a2
-        aes64dsm    a0, a1, a2
-        aes64im     a0, a0
-        aes64ks1i   a0, a1, 4
-        aes64ks2    a0, a1, a2
-        aes64es     a0, a1, a2
-        aes64esm    a0, a1, a2
-        sha256sig0  a0, a0
-        sha256sig1  a0, a0
-        sha256sum0  a0, a0
-        sha256sum1  a0, a0
-        sha512sig0  a0, a0
-        sha512sig1  a0, a0
-        sha512sum0  a0, a0
-        sha512sum1  a0, a0
-        sm4ed   a0, a1, a2, 2
-        sm4ks   a0, a1, a2, 2
-        sm3p0   a0, a0
-        sm3p1   a0, a0
diff --git a/gas/testsuite/gas/riscv/k-ext.d b/gas/testsuite/gas/riscv/k-ext.d
deleted file mode 100644
index b00a1c959c2..00000000000
--- a/gas/testsuite/gas/riscv/k-ext.d
+++ /dev/null
@@ -1,44 +0,0 @@
-#as: -march=rv32i_zbkb_zbkc_zbkx_zknd_zkne_zknh_zkr_zksed_zksh_zkt
-#source: k-ext.s
-#objdump: -d
-
-.*:[ 	]+file format .*
-
-
-Disassembly of section .text:
-
-0+000 <target>:
-[ 	]+[0-9a-f]+:[ 	]+60c5d533[ 	]+ror[ 	]+a0,a1,a2
-[ 	]+[0-9a-f]+:[ 	]+60c59533[ 	]+rol[ 	]+a0,a1,a2
-[ 	]+[0-9a-f]+:[ 	]+6025d513[ 	]+ror[ 	]+a0,a1,0x2
-[ 	]+[0-9a-f]+:[ 	]+40c5f533[ 	]+andn[ 	]+a0,a1,a2
-[ 	]+[0-9a-f]+:[ 	]+40c5e533[ 	]+orn[ 	]+a0,a1,a2
-[ 	]+[0-9a-f]+:[ 	]+40c5c533[ 	]+xnor[ 	]+a0,a1,a2
-[ 	]+[0-9a-f]+:[ 	]+08c5c533[ 	]+pack[ 	]+a0,a1,a2
-[ 	]+[0-9a-f]+:[ 	]+08c5f533[ 	]+packh[ 	]+a0,a1,a2
-[ 	]+[0-9a-f]+:[ 	]+68755513[ 	]+brev8[ 	]+a0,a0
-[ 	]+[0-9a-f]+:[ 	]+69855513[ 	]+rev8[ 	]+a0,a0
-[ 	]+[0-9a-f]+:[ 	]+08f51513[ 	]+zip[ 	]+a0,a0
-[ 	]+[0-9a-f]+:[ 	]+08f55513[ 	]+unzip[ 	]+a0,a0
-[ 	]+[0-9a-f]+:[ 	]+0ac59533[ 	]+clmul[ 	]+a0,a1,a2
-[ 	]+[0-9a-f]+:[ 	]+0ac5b533[ 	]+clmulh[ 	]+a0,a1,a2
-[ 	]+[0-9a-f]+:[ 	]+28c5a533[ 	]+xperm4[ 	]+a0,a1,a2
-[ 	]+[0-9a-f]+:[ 	]+28c5c533[ 	]+xperm8[ 	]+a0,a1,a2
-[ 	]+[0-9a-f]+:[ 	]+aac58533[ 	]+aes32dsi[ 	]+a0,a1,a2,0x2
-[ 	]+[0-9a-f]+:[ 	]+aec58533[ 	]+aes32dsmi[ 	]+a0,a1,a2,0x2
-[ 	]+[0-9a-f]+:[ 	]+a2c58533[ 	]+aes32esi[ 	]+a0,a1,a2,0x2
-[ 	]+[0-9a-f]+:[ 	]+a6c58533[ 	]+aes32esmi[ 	]+a0,a1,a2,0x2
-[ 	]+[0-9a-f]+:[ 	]+10251513[ 	]+sha256sig0[ 	]+a0,a0
-[ 	]+[0-9a-f]+:[ 	]+10351513[ 	]+sha256sig1[ 	]+a0,a0
-[ 	]+[0-9a-f]+:[ 	]+10051513[ 	]+sha256sum0[ 	]+a0,a0
-[ 	]+[0-9a-f]+:[ 	]+10151513[ 	]+sha256sum1[ 	]+a0,a0
-[ 	]+[0-9a-f]+:[ 	]+5cc58533[ 	]+sha512sig0h[ 	]+a0,a1,a2
-[ 	]+[0-9a-f]+:[ 	]+54c58533[ 	]+sha512sig0l[ 	]+a0,a1,a2
-[ 	]+[0-9a-f]+:[ 	]+5ec58533[ 	]+sha512sig1h[ 	]+a0,a1,a2
-[ 	]+[0-9a-f]+:[ 	]+56c58533[ 	]+sha512sig1l[ 	]+a0,a1,a2
-[ 	]+[0-9a-f]+:[ 	]+50c58533[ 	]+sha512sum0r[ 	]+a0,a1,a2
-[ 	]+[0-9a-f]+:[ 	]+52c58533[ 	]+sha512sum1r[ 	]+a0,a1,a2
-[ 	]+[0-9a-f]+:[ 	]+b0c58533[ 	]+sm4ed[ 	]+a0,a1,a2,0x2
-[ 	]+[0-9a-f]+:[ 	]+b4c58533[ 	]+sm4ks[ 	]+a0,a1,a2,0x2
-[ 	]+[0-9a-f]+:[ 	]+10851513[ 	]+sm3p0[ 	]+a0,a0
-[ 	]+[0-9a-f]+:[ 	]+10951513[ 	]+sm3p1[ 	]+a0,a0
diff --git a/gas/testsuite/gas/riscv/k-ext.s b/gas/testsuite/gas/riscv/k-ext.s
deleted file mode 100644
index 8eb27684710..00000000000
--- a/gas/testsuite/gas/riscv/k-ext.s
+++ /dev/null
@@ -1,35 +0,0 @@
-target:
-        ror     a0, a1, a2
-        rol     a0, a1, a2
-        rori    a0, a1, 2
-        andn    a0, a1, a2
-        orn     a0, a1, a2
-        xnor    a0, a1, a2
-        pack    a0, a1, a2
-        packh   a0, a1, a2
-        brev8   a0, a0
-        rev8    a0, a0
-        zip     a0, a0
-        unzip   a0, a0
-        clmul   a0, a1, a2
-        clmulh  a0, a1, a2
-        xperm4  a0, a1, a2
-        xperm8  a0, a1, a2
-        aes32dsi    a0, a1, a2, 2
-        aes32dsmi   a0, a1, a2, 2
-        aes32esi    a0, a1, a2, 2
-        aes32esmi   a0, a1, a2, 2
-        sha256sig0  a0, a0
-        sha256sig1  a0, a0
-        sha256sum0  a0, a0
-        sha256sum1  a0, a0
-        sha512sig0h    a0, a1, a2
-        sha512sig0l    a0, a1, a2
-        sha512sig1h    a0, a1, a2
-        sha512sig1l    a0, a1, a2
-        sha512sum0r    a0, a1, a2
-        sha512sum1r    a0, a1, a2
-        sm4ed   a0, a1, a2, 2
-        sm4ks   a0, a1, a2, 2
-        sm3p0   a0, a0
-        sm3p1   a0, a0
diff --git a/gas/testsuite/gas/riscv/zbk-ext-32-noalias.d b/gas/testsuite/gas/riscv/zbk-ext-32-noalias.d
new file mode 100644
index 00000000000..bbbd0caefc2
--- /dev/null
+++ b/gas/testsuite/gas/riscv/zbk-ext-32-noalias.d
@@ -0,0 +1,26 @@
+#as: -march=rv32i -I$srcdir/$subdir -defsym XLEN=32
+#source: zbk-ext.s
+#objdump: -d -M no-aliases
+
+.*:[ 	]+file format .*
+
+
+Disassembly of section .text:
+
+0+000 <target>:
+[ 	]+[0-9a-f]+:[ 	]+60c5d533[ 	]+ror[ 		]+a0,a1,a2
+[ 	]+[0-9a-f]+:[ 	]+60c59533[ 	]+rol[ 		]+a0,a1,a2
+[ 	]+[0-9a-f]+:[ 	]+6025d513[ 	]+rori[ 	]+a0,a1,0x2
+[ 	]+[0-9a-f]+:[ 	]+40c5f533[ 	]+andn[ 	]+a0,a1,a2
+[ 	]+[0-9a-f]+:[ 	]+40c5e533[ 	]+orn[ 		]+a0,a1,a2
+[ 	]+[0-9a-f]+:[ 	]+40c5c533[ 	]+xnor[ 	]+a0,a1,a2
+[ 	]+[0-9a-f]+:[ 	]+08c5c533[ 	]+pack[ 	]+a0,a1,a2
+[ 	]+[0-9a-f]+:[ 	]+08c5f533[ 	]+packh[ 	]+a0,a1,a2
+[ 	]+[0-9a-f]+:[ 	]+6875d513[ 	]+brev8[ 	]+a0,a1
+[ 	]+[0-9a-f]+:[ 	]+6985d513[ 	]+rev8[ 	]+a0,a1
+[ 	]+[0-9a-f]+:[ 	]+08f59513[ 	]+zip[ 		]+a0,a1
+[ 	]+[0-9a-f]+:[ 	]+08f5d513[ 	]+unzip[ 	]+a0,a1
+[ 	]+[0-9a-f]+:[ 	]+0ac59533[ 	]+clmul[ 	]+a0,a1,a2
+[ 	]+[0-9a-f]+:[ 	]+0ac5b533[ 	]+clmulh[ 	]+a0,a1,a2
+[ 	]+[0-9a-f]+:[ 	]+28c5a533[ 	]+xperm4[ 	]+a0,a1,a2
+[ 	]+[0-9a-f]+:[ 	]+28c5c533[ 	]+xperm8[ 	]+a0,a1,a2
diff --git a/gas/testsuite/gas/riscv/zbk-ext-32-noarch.d b/gas/testsuite/gas/riscv/zbk-ext-32-noarch.d
new file mode 100644
index 00000000000..be2c8bd653b
--- /dev/null
+++ b/gas/testsuite/gas/riscv/zbk-ext-32-noarch.d
@@ -0,0 +1,3 @@
+#as: -march=rv32i -I$srcdir/$subdir -defsym XLEN=32 -defsym NOARCH=1
+#source: zbk-ext.s
+#error_output: zbk-ext-32-noarch.l
diff --git a/gas/testsuite/gas/riscv/zbk-ext-32-noarch.l b/gas/testsuite/gas/riscv/zbk-ext-32-noarch.l
new file mode 100644
index 00000000000..0a9c603e7db
--- /dev/null
+++ b/gas/testsuite/gas/riscv/zbk-ext-32-noarch.l
@@ -0,0 +1,21 @@
+.*: Assembler messages:
+.*: Error: unrecognized opcode `ror a0,a1,a2', extension `zbb' or `zbkb' required
+.*: Error: unrecognized opcode `rol a0,a1,a2', extension `zbb' or `zbkb' required
+.*: Error: unrecognized opcode `rori a0,a1,2', extension `zbb' or `zbkb' required
+.*: Error: unrecognized opcode `rorw a0,a1,a2'
+.*: Error: unrecognized opcode `rolw a0,a1,a2'
+.*: Error: unrecognized opcode `roriw a0,a1,2'
+.*: Error: unrecognized opcode `andn a0,a1,a2', extension `zbb' or `zbkb' required
+.*: Error: unrecognized opcode `orn a0,a1,a2', extension `zbb' or `zbkb' required
+.*: Error: unrecognized opcode `xnor a0,a1,a2', extension `zbb' or `zbkb' required
+.*: Error: unrecognized opcode `pack a0,a1,a2', extension `zbkb' required
+.*: Error: unrecognized opcode `packh a0,a1,a2', extension `zbkb' required
+.*: Error: unrecognized opcode `packw a0,a1,a2'
+.*: Error: unrecognized opcode `brev8 a0,a1', extension `zbkb' required
+.*: Error: unrecognized opcode `rev8 a0,a1', extension `zbb' or `zbkb' required
+.*: Error: unrecognized opcode `zip a0,a1', extension `zbkb' required
+.*: Error: unrecognized opcode `unzip a0,a1', extension `zbkb' required
+.*: Error: unrecognized opcode `clmul a0,a1,a2', extension `zbc' or `zbkc' required
+.*: Error: unrecognized opcode `clmulh a0,a1,a2', extension `zbc' or `zbkc' required
+.*: Error: unrecognized opcode `xperm4 a0,a1,a2', extension `zbkx' required
+.*: Error: unrecognized opcode `xperm8 a0,a1,a2', extension `zbkx' required
diff --git a/gas/testsuite/gas/riscv/zbk-ext-32.d b/gas/testsuite/gas/riscv/zbk-ext-32.d
new file mode 100644
index 00000000000..05c6fddaef4
--- /dev/null
+++ b/gas/testsuite/gas/riscv/zbk-ext-32.d
@@ -0,0 +1,26 @@
+#as: -march=rv32i -I$srcdir/$subdir -defsym XLEN=32
+#source: zbk-ext.s
+#objdump: -d
+
+.*:[ 	]+file format .*
+
+
+Disassembly of section .text:
+
+0+000 <target>:
+[ 	]+[0-9a-f]+:[ 	]+60c5d533[ 	]+ror[ 		]+a0,a1,a2
+[ 	]+[0-9a-f]+:[ 	]+60c59533[ 	]+rol[ 		]+a0,a1,a2
+[ 	]+[0-9a-f]+:[ 	]+6025d513[ 	]+ror[ 		]+a0,a1,0x2
+[ 	]+[0-9a-f]+:[ 	]+40c5f533[ 	]+andn[ 	]+a0,a1,a2
+[ 	]+[0-9a-f]+:[ 	]+40c5e533[ 	]+orn[ 		]+a0,a1,a2
+[ 	]+[0-9a-f]+:[ 	]+40c5c533[ 	]+xnor[ 	]+a0,a1,a2
+[ 	]+[0-9a-f]+:[ 	]+08c5c533[ 	]+pack[ 	]+a0,a1,a2
+[ 	]+[0-9a-f]+:[ 	]+08c5f533[ 	]+packh[ 	]+a0,a1,a2
+[ 	]+[0-9a-f]+:[ 	]+6875d513[ 	]+brev8[ 	]+a0,a1
+[ 	]+[0-9a-f]+:[ 	]+6985d513[ 	]+rev8[ 	]+a0,a1
+[ 	]+[0-9a-f]+:[ 	]+08f59513[ 	]+zip[ 		]+a0,a1
+[ 	]+[0-9a-f]+:[ 	]+08f5d513[ 	]+unzip[ 	]+a0,a1
+[ 	]+[0-9a-f]+:[ 	]+0ac59533[ 	]+clmul[ 	]+a0,a1,a2
+[ 	]+[0-9a-f]+:[ 	]+0ac5b533[ 	]+clmulh[ 	]+a0,a1,a2
+[ 	]+[0-9a-f]+:[ 	]+28c5a533[ 	]+xperm4[ 	]+a0,a1,a2
+[ 	]+[0-9a-f]+:[ 	]+28c5c533[ 	]+xperm8[ 	]+a0,a1,a2
diff --git a/gas/testsuite/gas/riscv/zbk-ext-64-noalias.d b/gas/testsuite/gas/riscv/zbk-ext-64-noalias.d
new file mode 100644
index 00000000000..03ee8c809b0
--- /dev/null
+++ b/gas/testsuite/gas/riscv/zbk-ext-64-noalias.d
@@ -0,0 +1,28 @@
+#as: -march=rv64i -I$srcdir/$subdir -defsym XLEN=64
+#source: zbk-ext.s
+#objdump: -d -M no-aliases
+
+.*:[ 	]+file format .*
+
+
+Disassembly of section .text:
+
+0+000 <target>:
+[ 	]+[0-9a-f]+:[ 	]+60c5d533[ 	]+ror[ 		]+a0,a1,a2
+[ 	]+[0-9a-f]+:[ 	]+60c59533[ 	]+rol[ 		]+a0,a1,a2
+[ 	]+[0-9a-f]+:[ 	]+6025d513[ 	]+rori[ 	]+a0,a1,0x2
+[ 	]+[0-9a-f]+:[ 	]+60c5d53b[ 	]+rorw[ 	]+a0,a1,a2
+[ 	]+[0-9a-f]+:[ 	]+60c5953b[ 	]+rolw[ 	]+a0,a1,a2
+[ 	]+[0-9a-f]+:[ 	]+6025d51b[ 	]+roriw[ 	]+a0,a1,0x2
+[ 	]+[0-9a-f]+:[ 	]+40c5f533[ 	]+andn[ 	]+a0,a1,a2
+[ 	]+[0-9a-f]+:[ 	]+40c5e533[ 	]+orn[ 		]+a0,a1,a2
+[ 	]+[0-9a-f]+:[ 	]+40c5c533[ 	]+xnor[ 	]+a0,a1,a2
+[ 	]+[0-9a-f]+:[ 	]+08c5c533[ 	]+pack[ 	]+a0,a1,a2
+[ 	]+[0-9a-f]+:[ 	]+08c5f533[ 	]+packh[ 	]+a0,a1,a2
+[ 	]+[0-9a-f]+:[ 	]+08c5c53b[ 	]+packw[ 	]+a0,a1,a2
+[ 	]+[0-9a-f]+:[ 	]+6875d513[ 	]+brev8[ 	]+a0,a1
+[ 	]+[0-9a-f]+:[ 	]+6b85d513[ 	]+rev8[ 	]+a0,a1
+[ 	]+[0-9a-f]+:[ 	]+0ac59533[ 	]+clmul[ 	]+a0,a1,a2
+[ 	]+[0-9a-f]+:[ 	]+0ac5b533[ 	]+clmulh[ 	]+a0,a1,a2
+[ 	]+[0-9a-f]+:[ 	]+28c5a533[ 	]+xperm4[ 	]+a0,a1,a2
+[ 	]+[0-9a-f]+:[ 	]+28c5c533[ 	]+xperm8[ 	]+a0,a1,a2
diff --git a/gas/testsuite/gas/riscv/zbk-ext-64-noarch.d b/gas/testsuite/gas/riscv/zbk-ext-64-noarch.d
new file mode 100644
index 00000000000..de1c854b808
--- /dev/null
+++ b/gas/testsuite/gas/riscv/zbk-ext-64-noarch.d
@@ -0,0 +1,3 @@
+#as: -march=rv64i -I$srcdir/$subdir -defsym XLEN=64 -defsym NOARCH=1
+#source: zbk-ext.s
+#error_output: zbk-ext-64-noarch.l
diff --git a/gas/testsuite/gas/riscv/zbk-ext-64-noarch.l b/gas/testsuite/gas/riscv/zbk-ext-64-noarch.l
new file mode 100644
index 00000000000..e0759ac4b7a
--- /dev/null
+++ b/gas/testsuite/gas/riscv/zbk-ext-64-noarch.l
@@ -0,0 +1,21 @@
+.*: Assembler messages:
+.*: Error: unrecognized opcode `ror a0,a1,a2', extension `zbb' or `zbkb' required
+.*: Error: unrecognized opcode `rol a0,a1,a2', extension `zbb' or `zbkb' required
+.*: Error: unrecognized opcode `rori a0,a1,2', extension `zbb' or `zbkb' required
+.*: Error: unrecognized opcode `rorw a0,a1,a2', extension `zbb' or `zbkb' required
+.*: Error: unrecognized opcode `rolw a0,a1,a2', extension `zbb' or `zbkb' required
+.*: Error: unrecognized opcode `roriw a0,a1,2', extension `zbb' or `zbkb' required
+.*: Error: unrecognized opcode `andn a0,a1,a2', extension `zbb' or `zbkb' required
+.*: Error: unrecognized opcode `orn a0,a1,a2', extension `zbb' or `zbkb' required
+.*: Error: unrecognized opcode `xnor a0,a1,a2', extension `zbb' or `zbkb' required
+.*: Error: unrecognized opcode `pack a0,a1,a2', extension `zbkb' required
+.*: Error: unrecognized opcode `packh a0,a1,a2', extension `zbkb' required
+.*: Error: unrecognized opcode `packw a0,a1,a2', extension `zbkb' required
+.*: Error: unrecognized opcode `brev8 a0,a1', extension `zbkb' required
+.*: Error: unrecognized opcode `rev8 a0,a1', extension `zbb' or `zbkb' required
+.*: Error: unrecognized opcode `zip a0,a1'
+.*: Error: unrecognized opcode `unzip a0,a1'
+.*: Error: unrecognized opcode `clmul a0,a1,a2', extension `zbc' or `zbkc' required
+.*: Error: unrecognized opcode `clmulh a0,a1,a2', extension `zbc' or `zbkc' required
+.*: Error: unrecognized opcode `xperm4 a0,a1,a2', extension `zbkx' required
+.*: Error: unrecognized opcode `xperm8 a0,a1,a2', extension `zbkx' required
diff --git a/gas/testsuite/gas/riscv/zbk-ext-64.d b/gas/testsuite/gas/riscv/zbk-ext-64.d
new file mode 100644
index 00000000000..2c2a0098cac
--- /dev/null
+++ b/gas/testsuite/gas/riscv/zbk-ext-64.d
@@ -0,0 +1,28 @@
+#as: -march=rv64i -I$srcdir/$subdir -defsym XLEN=64
+#source: zbk-ext.s
+#objdump: -d
+
+.*:[ 	]+file format .*
+
+
+Disassembly of section .text:
+
+0+000 <target>:
+[ 	]+[0-9a-f]+:[ 	]+60c5d533[ 	]+ror[ 		]+a0,a1,a2
+[ 	]+[0-9a-f]+:[ 	]+60c59533[ 	]+rol[ 		]+a0,a1,a2
+[ 	]+[0-9a-f]+:[ 	]+6025d513[ 	]+ror[ 		]+a0,a1,0x2
+[ 	]+[0-9a-f]+:[ 	]+60c5d53b[ 	]+rorw[ 	]+a0,a1,a2
+[ 	]+[0-9a-f]+:[ 	]+60c5953b[ 	]+rolw[ 	]+a0,a1,a2
+[ 	]+[0-9a-f]+:[ 	]+6025d51b[ 	]+rorw[ 	]+a0,a1,0x2
+[ 	]+[0-9a-f]+:[ 	]+40c5f533[ 	]+andn[ 	]+a0,a1,a2
+[ 	]+[0-9a-f]+:[ 	]+40c5e533[ 	]+orn[ 		]+a0,a1,a2
+[ 	]+[0-9a-f]+:[ 	]+40c5c533[ 	]+xnor[ 	]+a0,a1,a2
+[ 	]+[0-9a-f]+:[ 	]+08c5c533[ 	]+pack[ 	]+a0,a1,a2
+[ 	]+[0-9a-f]+:[ 	]+08c5f533[ 	]+packh[ 	]+a0,a1,a2
+[ 	]+[0-9a-f]+:[ 	]+08c5c53b[ 	]+packw[ 	]+a0,a1,a2
+[ 	]+[0-9a-f]+:[ 	]+6875d513[ 	]+brev8[ 	]+a0,a1
+[ 	]+[0-9a-f]+:[ 	]+6b85d513[ 	]+rev8[ 	]+a0,a1
+[ 	]+[0-9a-f]+:[ 	]+0ac59533[ 	]+clmul[ 	]+a0,a1,a2
+[ 	]+[0-9a-f]+:[ 	]+0ac5b533[ 	]+clmulh[ 	]+a0,a1,a2
+[ 	]+[0-9a-f]+:[ 	]+28c5a533[ 	]+xperm4[ 	]+a0,a1,a2
+[ 	]+[0-9a-f]+:[ 	]+28c5c533[ 	]+xperm8[ 	]+a0,a1,a2
diff --git a/gas/testsuite/gas/riscv/zbk-ext.s b/gas/testsuite/gas/riscv/zbk-ext.s
new file mode 100644
index 00000000000..d839513d592
--- /dev/null
+++ b/gas/testsuite/gas/riscv/zbk-ext.s
@@ -0,0 +1,37 @@
+.include "testutils.inc"
+
+target:
+	SET_ARCH_START	+zbkb
+	ror	a0, a1, a2
+	rol	a0, a1, a2
+	rori	a0, a1, 2
+.if	XLEN_GE_64
+	rorw	a0, a1, a2
+	rolw	a0, a1, a2
+	roriw	a0, a1, 2
+.endif
+	andn	a0, a1, a2
+	orn	a0, a1, a2
+	xnor	a0, a1, a2
+	pack	a0, a1, a2
+	packh	a0, a1, a2
+.if	XLEN_GE_64
+	packw	a0, a1, a2
+.endif
+	brev8	a0, a1
+	rev8	a0, a1
+.if	XLEN_EQ_32
+	zip	a0, a1
+	unzip	a0, a1
+.endif
+	SET_ARCH_END
+
+	SET_ARCH_START	+zbkc
+	clmul	a0, a1, a2
+	clmulh	a0, a1, a2
+	SET_ARCH_END
+
+	SET_ARCH_START	+zbkx
+	xperm4	a0, a1, a2
+	xperm8	a0, a1, a2
+	SET_ARCH_END
diff --git a/gas/testsuite/gas/riscv/zbkb-32-na.d b/gas/testsuite/gas/riscv/zbkb-32-na.d
deleted file mode 100644
index a7b67ca4468..00000000000
--- a/gas/testsuite/gas/riscv/zbkb-32-na.d
+++ /dev/null
@@ -1,23 +0,0 @@
-#as: -march=rv32i_zbkb
-#source: zbkb-32.s
-#objdump: -d -Mno-aliases
-
-.*:[ 	]+file format .*
-
-
-Disassembly of section .text:
-
-0+000 <target>:
-[ 	]+[0-9a-f]+:[ 	]+60c5d533[ 	]+ror[ 	]+a0,a1,a2
-[ 	]+[0-9a-f]+:[ 	]+60c59533[ 	]+rol[ 	]+a0,a1,a2
-[ 	]+[0-9a-f]+:[ 	]+6025d513[ 	]+rori[ 	]+a0,a1,0x2
-[ 	]+[0-9a-f]+:[ 	]+40c5f533[ 	]+andn[ 	]+a0,a1,a2
-[ 	]+[0-9a-f]+:[ 	]+40c5e533[ 	]+orn[ 	]+a0,a1,a2
-[ 	]+[0-9a-f]+:[ 	]+40c5c533[ 	]+xnor[ 	]+a0,a1,a2
-[ 	]+[0-9a-f]+:[ 	]+08c5c533[ 	]+pack[ 	]+a0,a1,a2
-[ 	]+[0-9a-f]+:[ 	]+08c5f533[ 	]+packh[ 	]+a0,a1,a2
-[ 	]+[0-9a-f]+:[ 	]+68755513[ 	]+brev8[ 	]+a0,a0
-[ 	]+[0-9a-f]+:[ 	]+69855513[ 	]+rev8[ 	]+a0,a0
-[ 	]+[0-9a-f]+:[ 	]+08f51513[ 	]+zip[ 	]+a0,a0
-[ 	]+[0-9a-f]+:[ 	]+08f55513[ 	]+unzip[ 	]+a0,a0
-#pass
diff --git a/gas/testsuite/gas/riscv/zbkb-32.d b/gas/testsuite/gas/riscv/zbkb-32.d
deleted file mode 100644
index 1ab233c7778..00000000000
--- a/gas/testsuite/gas/riscv/zbkb-32.d
+++ /dev/null
@@ -1,22 +0,0 @@
-#as: -march=rv32i_zbkb
-#source: zbkb-32.s
-#objdump: -d
-
-.*:[ 	]+file format .*
-
-
-Disassembly of section .text:
-
-0+000 <target>:
-[ 	]+[0-9a-f]+:[ 	]+60c5d533[ 	]+ror[ 	]+a0,a1,a2
-[ 	]+[0-9a-f]+:[ 	]+60c59533[ 	]+rol[ 	]+a0,a1,a2
-[ 	]+[0-9a-f]+:[ 	]+6025d513[ 	]+ror[ 	]+a0,a1,0x2
-[ 	]+[0-9a-f]+:[ 	]+40c5f533[ 	]+andn[ 	]+a0,a1,a2
-[ 	]+[0-9a-f]+:[ 	]+40c5e533[ 	]+orn[ 	]+a0,a1,a2
-[ 	]+[0-9a-f]+:[ 	]+40c5c533[ 	]+xnor[ 	]+a0,a1,a2
-[ 	]+[0-9a-f]+:[ 	]+08c5c533[ 	]+pack[ 	]+a0,a1,a2
-[ 	]+[0-9a-f]+:[ 	]+08c5f533[ 	]+packh[ 	]+a0,a1,a2
-[ 	]+[0-9a-f]+:[ 	]+68755513[ 	]+brev8[ 	]+a0,a0
-[ 	]+[0-9a-f]+:[ 	]+69855513[ 	]+rev8[ 	]+a0,a0
-[ 	]+[0-9a-f]+:[ 	]+08f51513[ 	]+zip[ 	]+a0,a0
-[ 	]+[0-9a-f]+:[ 	]+08f55513[ 	]+unzip[ 	]+a0,a0
diff --git a/gas/testsuite/gas/riscv/zbkb-32.s b/gas/testsuite/gas/riscv/zbkb-32.s
deleted file mode 100644
index 6f917154517..00000000000
--- a/gas/testsuite/gas/riscv/zbkb-32.s
+++ /dev/null
@@ -1,13 +0,0 @@
-target:
-        ror     a0, a1, a2
-        rol     a0, a1, a2
-        rori    a0, a1, 2
-        andn    a0, a1, a2
-        orn     a0, a1, a2
-        xnor    a0, a1, a2
-        pack    a0, a1, a2
-        packh   a0, a1, a2
-        brev8   a0, a0
-        rev8    a0, a0
-        zip     a0, a0
-        unzip     a0, a0
diff --git a/gas/testsuite/gas/riscv/zbkb-64.d b/gas/testsuite/gas/riscv/zbkb-64.d
deleted file mode 100644
index e942bc6f1f0..00000000000
--- a/gas/testsuite/gas/riscv/zbkb-64.d
+++ /dev/null
@@ -1,24 +0,0 @@
-#as: -march=rv64i_zbkb
-#source: zbkb-64.s
-#objdump: -d
-
-.*:[ 	]+file format .*
-
-
-Disassembly of section .text:
-
-0+000 <target>:
-[ 	]+[0-9a-f]+:[ 	]+60c5d533[ 	]+ror[ 	]+a0,a1,a2
-[ 	]+[0-9a-f]+:[ 	]+60c59533[ 	]+rol[ 	]+a0,a1,a2
-[ 	]+[0-9a-f]+:[ 	]+6025d513[ 	]+ror[ 	]+a0,a1,0x2
-[ 	]+[0-9a-f]+:[ 	]+60c5d53b[ 	]+rorw[ 	]+a0,a1,a2
-[ 	]+[0-9a-f]+:[ 	]+60c5953b[ 	]+rolw[ 	]+a0,a1,a2
-[ 	]+[0-9a-f]+:[ 	]+6025d51b[ 	]+rorw[ 	]+a0,a1,0x2
-[ 	]+[0-9a-f]+:[ 	]+40c5f533[ 	]+andn[ 	]+a0,a1,a2
-[ 	]+[0-9a-f]+:[ 	]+40c5e533[ 	]+orn[ 	]+a0,a1,a2
-[ 	]+[0-9a-f]+:[ 	]+40c5c533[ 	]+xnor[ 	]+a0,a1,a2
-[ 	]+[0-9a-f]+:[ 	]+08c5c533[ 	]+pack[ 	]+a0,a1,a2
-[ 	]+[0-9a-f]+:[ 	]+08c5f533[ 	]+packh[ 	]+a0,a1,a2
-[ 	]+[0-9a-f]+:[ 	]+08c5c53b[ 	]+packw[ 	]+a0,a1,a2
-[ 	]+[0-9a-f]+:[ 	]+68755513[ 	]+brev8[ 	]+a0,a0
-[ 	]+[0-9a-f]+:[ 	]+6b855513[ 	]+rev8[ 	]+a0,a0
diff --git a/gas/testsuite/gas/riscv/zbkb-64.s b/gas/testsuite/gas/riscv/zbkb-64.s
deleted file mode 100644
index b5cf79f890e..00000000000
--- a/gas/testsuite/gas/riscv/zbkb-64.s
+++ /dev/null
@@ -1,15 +0,0 @@
-target:
-        ror     a0, a1, a2
-        rol     a0, a1, a2
-        rori    a0, a1, 2
-        rorw    a0, a1, a2
-        rolw    a0, a1, a2
-        roriw   a0, a1, 2
-        andn    a0, a1, a2
-        orn     a0, a1, a2
-        xnor    a0, a1, a2
-        pack    a0, a1, a2
-        packh   a0, a1, a2
-        packw   a0, a1, a2
-        brev8   a0, a0
-        rev8    a0, a0
diff --git a/gas/testsuite/gas/riscv/zbkc-32.d b/gas/testsuite/gas/riscv/zbkc-32.d
deleted file mode 100644
index 69d89875652..00000000000
--- a/gas/testsuite/gas/riscv/zbkc-32.d
+++ /dev/null
@@ -1,12 +0,0 @@
-#as: -march=rv32i_zbkc
-#source: zbkc.s
-#objdump: -d
-
-.*:[ 	]+file format .*
-
-
-Disassembly of section .text:
-
-0+000 <target>:
-[ 	]+[0-9a-f]+:[ 	]+0ac59533[ 	]+clmul[ 	]+a0,a1,a2
-[ 	]+[0-9a-f]+:[ 	]+0ac5b533[ 	]+clmulh[ 	]+a0,a1,a2
diff --git a/gas/testsuite/gas/riscv/zbkc-64.d b/gas/testsuite/gas/riscv/zbkc-64.d
deleted file mode 100644
index 26cdf7014c9..00000000000
--- a/gas/testsuite/gas/riscv/zbkc-64.d
+++ /dev/null
@@ -1,12 +0,0 @@
-#as: -march=rv64i_zbkc
-#source: zbkc.s
-#objdump: -d
-
-.*:[ 	]+file format .*
-
-
-Disassembly of section .text:
-
-0+000 <target>:
-[ 	]+[0-9a-f]+:[ 	]+0ac59533[ 	]+clmul[ 	]+a0,a1,a2
-[ 	]+[0-9a-f]+:[ 	]+0ac5b533[ 	]+clmulh[ 	]+a0,a1,a2
diff --git a/gas/testsuite/gas/riscv/zbkc.s b/gas/testsuite/gas/riscv/zbkc.s
deleted file mode 100644
index 2a987746e7b..00000000000
--- a/gas/testsuite/gas/riscv/zbkc.s
+++ /dev/null
@@ -1,3 +0,0 @@
-target:
-        clmul   a0, a1, a2
-        clmulh  a0, a1, a2
diff --git a/gas/testsuite/gas/riscv/zbkx-32.d b/gas/testsuite/gas/riscv/zbkx-32.d
deleted file mode 100644
index b1f7fc017bf..00000000000
--- a/gas/testsuite/gas/riscv/zbkx-32.d
+++ /dev/null
@@ -1,12 +0,0 @@
-#as: -march=rv32i_zbkx
-#source: zbkx.s
-#objdump: -d
-
-.*:[ 	]+file format .*
-
-
-Disassembly of section .text:
-
-0+000 <target>:
-[ 	]+[0-9a-f]+:[ 	]+28c5a533[ 	]+xperm4[ 	]+a0,a1,a2
-[ 	]+[0-9a-f]+:[ 	]+28c5c533[ 	]+xperm8[ 	]+a0,a1,a2
diff --git a/gas/testsuite/gas/riscv/zbkx-64.d b/gas/testsuite/gas/riscv/zbkx-64.d
deleted file mode 100644
index 3ab8bf69c75..00000000000
--- a/gas/testsuite/gas/riscv/zbkx-64.d
+++ /dev/null
@@ -1,12 +0,0 @@
-#as: -march=rv64i_zbkx
-#source: zbkx.s
-#objdump: -d
-
-.*:[ 	]+file format .*
-
-
-Disassembly of section .text:
-
-0+000 <target>:
-[ 	]+[0-9a-f]+:[ 	]+28c5a533[ 	]+xperm4[ 	]+a0,a1,a2
-[ 	]+[0-9a-f]+:[ 	]+28c5c533[ 	]+xperm8[ 	]+a0,a1,a2
diff --git a/gas/testsuite/gas/riscv/zbkx.s b/gas/testsuite/gas/riscv/zbkx.s
deleted file mode 100644
index 8c3077105fe..00000000000
--- a/gas/testsuite/gas/riscv/zbkx.s
+++ /dev/null
@@ -1,3 +0,0 @@
-target:
-        xperm4  a0, a1, a2
-        xperm8  a0, a1, a2
diff --git a/gas/testsuite/gas/riscv/zk-ext-32-noarch.d b/gas/testsuite/gas/riscv/zk-ext-32-noarch.d
new file mode 100644
index 00000000000..7a489dedbac
--- /dev/null
+++ b/gas/testsuite/gas/riscv/zk-ext-32-noarch.d
@@ -0,0 +1,3 @@
+#as: -march=rv32i -mcsr-check -I$srcdir/$subdir -defsym NOARCH=1
+#source: zk-ext-32.s
+#error_output: zk-ext-32-noarch.l
diff --git a/gas/testsuite/gas/riscv/zk-ext-32-noarch.l b/gas/testsuite/gas/riscv/zk-ext-32-noarch.l
new file mode 100644
index 00000000000..372dc523276
--- /dev/null
+++ b/gas/testsuite/gas/riscv/zk-ext-32-noarch.l
@@ -0,0 +1,20 @@
+.*: Assembler messages:
+.*: Error: unrecognized opcode `aes32dsi a0,a1,a2,2', extension `zknd' required
+.*: Error: unrecognized opcode `aes32dsmi a0,a1,a2,2', extension `zknd' required
+.*: Error: unrecognized opcode `aes32esi a0,a1,a2,2', extension `zkne' required
+.*: Error: unrecognized opcode `aes32esmi a0,a1,a2,2', extension `zkne' required
+.*: Error: unrecognized opcode `sha256sig0 a0,a1', extension `zknh' required
+.*: Error: unrecognized opcode `sha256sig1 a0,a1', extension `zknh' required
+.*: Error: unrecognized opcode `sha256sum0 a0,a1', extension `zknh' required
+.*: Error: unrecognized opcode `sha256sum1 a0,a1', extension `zknh' required
+.*: Error: unrecognized opcode `sha512sig0h a0,a1,a2', extension `zknh' required
+.*: Error: unrecognized opcode `sha512sig0l a0,a1,a2', extension `zknh' required
+.*: Error: unrecognized opcode `sha512sig1h a0,a1,a2', extension `zknh' required
+.*: Error: unrecognized opcode `sha512sig1l a0,a1,a2', extension `zknh' required
+.*: Error: unrecognized opcode `sha512sum0r a0,a1,a2', extension `zknh' required
+.*: Error: unrecognized opcode `sha512sum1r a0,a1,a2', extension `zknh' required
+.*: Error: unrecognized opcode `sm4ed a0,a1,a2,2', extension `zksed' required
+.*: Error: unrecognized opcode `sm4ks a0,a1,a2,2', extension `zksed' required
+.*: Error: unrecognized opcode `sm3p0 a0,a1', extension `zksh' required
+.*: Error: unrecognized opcode `sm3p1 a0,a1', extension `zksh' required
+.*: Warning: invalid CSR `seed', needs `zkr' extension
diff --git a/gas/testsuite/gas/riscv/zk-ext-32.d b/gas/testsuite/gas/riscv/zk-ext-32.d
new file mode 100644
index 00000000000..03cd158ab43
--- /dev/null
+++ b/gas/testsuite/gas/riscv/zk-ext-32.d
@@ -0,0 +1,28 @@
+#as: -march=rv32i -mcsr-check -I$srcdir/$subdir
+#objdump: -d
+
+.*:[ 	]+file format .*
+
+
+Disassembly of section .text:
+
+0+000 <target>:
+[ 	]+[0-9a-f]+:[ 	]+aac58533[ 	]+aes32dsi[ 	]+a0,a1,a2,0x2
+[ 	]+[0-9a-f]+:[ 	]+aec58533[ 	]+aes32dsmi[ 	]+a0,a1,a2,0x2
+[ 	]+[0-9a-f]+:[ 	]+a2c58533[ 	]+aes32esi[ 	]+a0,a1,a2,0x2
+[ 	]+[0-9a-f]+:[ 	]+a6c58533[ 	]+aes32esmi[ 	]+a0,a1,a2,0x2
+[ 	]+[0-9a-f]+:[ 	]+10259513[ 	]+sha256sig0[ 	]+a0,a1
+[ 	]+[0-9a-f]+:[ 	]+10359513[ 	]+sha256sig1[ 	]+a0,a1
+[ 	]+[0-9a-f]+:[ 	]+10059513[ 	]+sha256sum0[ 	]+a0,a1
+[ 	]+[0-9a-f]+:[ 	]+10159513[ 	]+sha256sum1[ 	]+a0,a1
+[ 	]+[0-9a-f]+:[ 	]+5cc58533[ 	]+sha512sig0h[ 	]+a0,a1,a2
+[ 	]+[0-9a-f]+:[ 	]+54c58533[ 	]+sha512sig0l[ 	]+a0,a1,a2
+[ 	]+[0-9a-f]+:[ 	]+5ec58533[ 	]+sha512sig1h[ 	]+a0,a1,a2
+[ 	]+[0-9a-f]+:[ 	]+56c58533[ 	]+sha512sig1l[ 	]+a0,a1,a2
+[ 	]+[0-9a-f]+:[ 	]+50c58533[ 	]+sha512sum0r[ 	]+a0,a1,a2
+[ 	]+[0-9a-f]+:[ 	]+52c58533[ 	]+sha512sum1r[ 	]+a0,a1,a2
+[ 	]+[0-9a-f]+:[ 	]+b0c58533[ 	]+sm4ed[ 	]+a0,a1,a2,0x2
+[ 	]+[0-9a-f]+:[ 	]+b4c58533[ 	]+sm4ks[ 	]+a0,a1,a2,0x2
+[ 	]+[0-9a-f]+:[ 	]+10859513[ 	]+sm3p0[ 	]+a0,a1
+[ 	]+[0-9a-f]+:[ 	]+10959513[ 	]+sm3p1[ 	]+a0,a1
+[ 	]+[0-9a-f]+:[ 	]+01502573[ 	]+csrr[ 	]+a0,seed
diff --git a/gas/testsuite/gas/riscv/zk-ext-32.s b/gas/testsuite/gas/riscv/zk-ext-32.s
new file mode 100644
index 00000000000..892644c054a
--- /dev/null
+++ b/gas/testsuite/gas/riscv/zk-ext-32.s
@@ -0,0 +1,41 @@
+.include "testutils.inc"
+
+target:
+	SET_ARCH_START	+zknd
+	aes32dsi	a0, a1, a2, 2
+	aes32dsmi	a0, a1, a2, 2
+	SET_ARCH_END
+
+	SET_ARCH_START	+zkne
+	aes32esi	a0, a1, a2, 2
+	aes32esmi	a0, a1, a2, 2
+	SET_ARCH_END
+
+	SET_ARCH_START	+zknh
+	sha256sig0	a0, a1
+	sha256sig1	a0, a1
+	sha256sum0	a0, a1
+	sha256sum1	a0, a1
+	sha512sig0h	a0, a1, a2
+	sha512sig0l	a0, a1, a2
+	sha512sig1h	a0, a1, a2
+	sha512sig1l	a0, a1, a2
+	sha512sum0r	a0, a1, a2
+	sha512sum1r	a0, a1, a2
+	SET_ARCH_END
+
+	SET_ARCH_START	+zksed
+	sm4ed		a0, a1, a2, 2
+	sm4ks		a0, a1, a2, 2
+	SET_ARCH_END
+
+	SET_ARCH_START	+zksh
+	sm3p0		a0, a1
+	sm3p1		a0, a1
+	SET_ARCH_END
+
+	SET_ARCH_START_FORCE	+zicsr
+	SET_ARCH_START		+zkr
+	csrr		a0, seed
+	SET_ARCH_END
+	SET_ARCH_END
diff --git a/gas/testsuite/gas/riscv/zk-ext-64-noarch.d b/gas/testsuite/gas/riscv/zk-ext-64-noarch.d
new file mode 100644
index 00000000000..e83e4b17a81
--- /dev/null
+++ b/gas/testsuite/gas/riscv/zk-ext-64-noarch.d
@@ -0,0 +1,3 @@
+#as: -march=rv64i -mcsr-check -I$srcdir/$subdir -defsym NOARCH=1
+#source: zk-ext-64.s
+#error_output: zk-ext-64-noarch.l
diff --git a/gas/testsuite/gas/riscv/zk-ext-64-noarch.l b/gas/testsuite/gas/riscv/zk-ext-64-noarch.l
new file mode 100644
index 00000000000..38362f54465
--- /dev/null
+++ b/gas/testsuite/gas/riscv/zk-ext-64-noarch.l
@@ -0,0 +1,23 @@
+.*: Assembler messages:
+.*: Error: unrecognized opcode `aes64ds a0,a1,a2', extension `zknd' required
+.*: Error: unrecognized opcode `aes64dsm a0,a1,a2', extension `zknd' required
+.*: Error: unrecognized opcode `aes64im a0,a1', extension `zknd' required
+.*: Error: unrecognized opcode `aes64ks1i a0,a1,4', extension `zknd' or `zkne' required
+.*: Error: unrecognized opcode `aes64ks2 a0,a1,a2', extension `zknd' or `zkne' required
+.*: Error: unrecognized opcode `aes64es a0,a1,a2', extension `zkne' required
+.*: Error: unrecognized opcode `aes64esm a0,a1,a2', extension `zkne' required
+.*: Error: unrecognized opcode `aes64ks1i a0,a1,4', extension `zknd' or `zkne' required
+.*: Error: unrecognized opcode `aes64ks2 a0,a1,a2', extension `zknd' or `zkne' required
+.*: Error: unrecognized opcode `sha256sig0 a0,a1', extension `zknh' required
+.*: Error: unrecognized opcode `sha256sig1 a0,a1', extension `zknh' required
+.*: Error: unrecognized opcode `sha256sum0 a0,a1', extension `zknh' required
+.*: Error: unrecognized opcode `sha256sum1 a0,a1', extension `zknh' required
+.*: Error: unrecognized opcode `sha512sig0 a0,a1', extension `zknh' required
+.*: Error: unrecognized opcode `sha512sig1 a0,a1', extension `zknh' required
+.*: Error: unrecognized opcode `sha512sum0 a0,a1', extension `zknh' required
+.*: Error: unrecognized opcode `sha512sum1 a0,a1', extension `zknh' required
+.*: Error: unrecognized opcode `sm4ed a0,a1,a2,2', extension `zksed' required
+.*: Error: unrecognized opcode `sm4ks a0,a1,a2,2', extension `zksed' required
+.*: Error: unrecognized opcode `sm3p0 a0,a1', extension `zksh' required
+.*: Error: unrecognized opcode `sm3p1 a0,a1', extension `zksh' required
+.*: Warning: invalid CSR `seed', needs `zkr' extension
diff --git a/gas/testsuite/gas/riscv/zk-ext-64.d b/gas/testsuite/gas/riscv/zk-ext-64.d
new file mode 100644
index 00000000000..ee134f6cdf0
--- /dev/null
+++ b/gas/testsuite/gas/riscv/zk-ext-64.d
@@ -0,0 +1,31 @@
+#as: -march=rv64i -mcsr-check -I$srcdir/$subdir
+#objdump: -d
+
+.*:[ 	]+file format .*
+
+
+Disassembly of section .text:
+
+0+000 <target>:
+[ 	]+[0-9a-f]+:[ 	]+3ac58533[ 	]+aes64ds[ 	]+a0,a1,a2
+[ 	]+[0-9a-f]+:[ 	]+3ec58533[ 	]+aes64dsm[ 	]+a0,a1,a2
+[ 	]+[0-9a-f]+:[ 	]+30059513[ 	]+aes64im[ 	]+a0,a1
+[ 	]+[0-9a-f]+:[ 	]+31459513[ 	]+aes64ks1i[ 	]+a0,a1,0x4
+[ 	]+[0-9a-f]+:[ 	]+7ec58533[ 	]+aes64ks2[ 	]+a0,a1,a2
+[ 	]+[0-9a-f]+:[ 	]+32c58533[ 	]+aes64es[ 	]+a0,a1,a2
+[ 	]+[0-9a-f]+:[ 	]+36c58533[ 	]+aes64esm[ 	]+a0,a1,a2
+[ 	]+[0-9a-f]+:[ 	]+31459513[ 	]+aes64ks1i[ 	]+a0,a1,0x4
+[ 	]+[0-9a-f]+:[ 	]+7ec58533[ 	]+aes64ks2[ 	]+a0,a1,a2
+[ 	]+[0-9a-f]+:[ 	]+10259513[ 	]+sha256sig0[ 	]+a0,a1
+[ 	]+[0-9a-f]+:[ 	]+10359513[ 	]+sha256sig1[ 	]+a0,a1
+[ 	]+[0-9a-f]+:[ 	]+10059513[ 	]+sha256sum0[ 	]+a0,a1
+[ 	]+[0-9a-f]+:[ 	]+10159513[ 	]+sha256sum1[ 	]+a0,a1
+[ 	]+[0-9a-f]+:[ 	]+10659513[ 	]+sha512sig0[ 	]+a0,a1
+[ 	]+[0-9a-f]+:[ 	]+10759513[ 	]+sha512sig1[ 	]+a0,a1
+[ 	]+[0-9a-f]+:[ 	]+10459513[ 	]+sha512sum0[ 	]+a0,a1
+[ 	]+[0-9a-f]+:[ 	]+10559513[ 	]+sha512sum1[ 	]+a0,a1
+[ 	]+[0-9a-f]+:[ 	]+b0c58533[ 	]+sm4ed[ 	]+a0,a1,a2,0x2
+[ 	]+[0-9a-f]+:[ 	]+b4c58533[ 	]+sm4ks[ 	]+a0,a1,a2,0x2
+[ 	]+[0-9a-f]+:[ 	]+10859513[ 	]+sm3p0[ 	]+a0,a1
+[ 	]+[0-9a-f]+:[ 	]+10959513[ 	]+sm3p1[ 	]+a0,a1
+[ 	]+[0-9a-f]+:[ 	]+01502573[ 	]+csrr[ 	]+a0,seed
diff --git a/gas/testsuite/gas/riscv/zk-ext-64.s b/gas/testsuite/gas/riscv/zk-ext-64.s
new file mode 100644
index 00000000000..9d8104908a9
--- /dev/null
+++ b/gas/testsuite/gas/riscv/zk-ext-64.s
@@ -0,0 +1,44 @@
+.include "testutils.inc"
+
+target:
+	SET_ARCH_START	+zknd
+	aes64ds		a0, a1, a2
+	aes64dsm	a0, a1, a2
+	aes64im		a0, a1
+	aes64ks1i	a0, a1, 4
+	aes64ks2	a0, a1, a2
+	SET_ARCH_END
+
+	SET_ARCH_START	+zkne
+	aes64es		a0, a1, a2
+	aes64esm	a0, a1, a2
+	aes64ks1i	a0, a1, 4
+	aes64ks2	a0, a1, a2
+	SET_ARCH_END
+
+	SET_ARCH_START	+zknh
+	sha256sig0	a0, a1
+	sha256sig1	a0, a1
+	sha256sum0	a0, a1
+	sha256sum1	a0, a1
+	sha512sig0	a0, a1
+	sha512sig1	a0, a1
+	sha512sum0	a0, a1
+	sha512sum1	a0, a1
+	SET_ARCH_END
+
+	SET_ARCH_START	+zksed
+	sm4ed		a0, a1, a2, 2
+	sm4ks		a0, a1, a2, 2
+	SET_ARCH_END
+
+	SET_ARCH_START	+zksh
+	sm3p0		a0, a1
+	sm3p1		a0, a1
+	SET_ARCH_END
+
+	SET_ARCH_START_FORCE	+zicsr
+	SET_ARCH_START		+zkr
+	csrr		a0, seed
+	SET_ARCH_END
+	SET_ARCH_END
diff --git a/gas/testsuite/gas/riscv/zknd-32.d b/gas/testsuite/gas/riscv/zknd-32.d
deleted file mode 100644
index a6995bf6f1c..00000000000
--- a/gas/testsuite/gas/riscv/zknd-32.d
+++ /dev/null
@@ -1,12 +0,0 @@
-#as: -march=rv32i_zknd
-#source: zknd-32.s
-#objdump: -d
-
-.*:[ 	]+file format .*
-
-
-Disassembly of section .text:
-
-0+000 <target>:
-[ 	]+[0-9a-f]+:[ 	]+aac58533[ 	]+aes32dsi[ 	]+a0,a1,a2,0x2
-[ 	]+[0-9a-f]+:[ 	]+aec58533[ 	]+aes32dsmi[ 	]+a0,a1,a2,0x2
diff --git a/gas/testsuite/gas/riscv/zknd-32.s b/gas/testsuite/gas/riscv/zknd-32.s
deleted file mode 100644
index 0d09badd1c6..00000000000
--- a/gas/testsuite/gas/riscv/zknd-32.s
+++ /dev/null
@@ -1,3 +0,0 @@
-target:
-        aes32dsi    a0, a1, a2, 2
-        aes32dsmi   a0, a1, a2, 2
diff --git a/gas/testsuite/gas/riscv/zknd-64.d b/gas/testsuite/gas/riscv/zknd-64.d
deleted file mode 100644
index ba4c91ceb34..00000000000
--- a/gas/testsuite/gas/riscv/zknd-64.d
+++ /dev/null
@@ -1,15 +0,0 @@
-#as: -march=rv64i_zknd
-#source: zknd-64.s
-#objdump: -d
-
-.*:[ 	]+file format .*
-
-
-Disassembly of section .text:
-
-0+000 <target>:
-[ 	]+[0-9a-f]+:[ 	]+3ac58533[ 	]+aes64ds[ 	]+a0,a1,a2
-[ 	]+[0-9a-f]+:[ 	]+3ec58533[ 	]+aes64dsm[ 	]+a0,a1,a2
-[ 	]+[0-9a-f]+:[ 	]+30051513[ 	]+aes64im[ 	]+a0,a0
-[ 	]+[0-9a-f]+:[ 	]+31459513[ 	]+aes64ks1i[ 	]+a0,a1,0x4
-[ 	]+[0-9a-f]+:[ 	]+7ec58533[ 	]+aes64ks2[ 	]+a0,a1,a2
diff --git a/gas/testsuite/gas/riscv/zknd-64.s b/gas/testsuite/gas/riscv/zknd-64.s
deleted file mode 100644
index 4846e93c16f..00000000000
--- a/gas/testsuite/gas/riscv/zknd-64.s
+++ /dev/null
@@ -1,6 +0,0 @@
-target:
-        aes64ds     a0, a1, a2
-        aes64dsm    a0, a1, a2
-        aes64im     a0, a0
-        aes64ks1i   a0, a1, 4
-        aes64ks2    a0, a1, a2
diff --git a/gas/testsuite/gas/riscv/zkne-32.d b/gas/testsuite/gas/riscv/zkne-32.d
deleted file mode 100644
index 4950e748800..00000000000
--- a/gas/testsuite/gas/riscv/zkne-32.d
+++ /dev/null
@@ -1,12 +0,0 @@
-#as: -march=rv32i_zkne
-#source: zkne-32.s
-#objdump: -d
-
-.*:[ 	]+file format .*
-
-
-Disassembly of section .text:
-
-0+000 <target>:
-[ 	]+[0-9a-f]+:[ 	]+a2c58533[ 	]+aes32esi[ 	]+a0,a1,a2,0x2
-[ 	]+[0-9a-f]+:[ 	]+a6c58533[ 	]+aes32esmi[ 	]+a0,a1,a2,0x2
diff --git a/gas/testsuite/gas/riscv/zkne-32.s b/gas/testsuite/gas/riscv/zkne-32.s
deleted file mode 100644
index f864fc1778b..00000000000
--- a/gas/testsuite/gas/riscv/zkne-32.s
+++ /dev/null
@@ -1,3 +0,0 @@
-target:
-        aes32esi    a0, a1, a2, 2
-        aes32esmi   a0, a1, a2, 2
diff --git a/gas/testsuite/gas/riscv/zkne-64.d b/gas/testsuite/gas/riscv/zkne-64.d
deleted file mode 100644
index 31bc084a807..00000000000
--- a/gas/testsuite/gas/riscv/zkne-64.d
+++ /dev/null
@@ -1,14 +0,0 @@
-#as: -march=rv64i_zkne
-#source: zkne-64.s
-#objdump: -d
-
-.*:[ 	]+file format .*
-
-
-Disassembly of section .text:
-
-0+000 <target>:
-[ 	]+[0-9a-f]+:[ 	]+32c58533[ 	]+aes64es[ 	]+a0,a1,a2
-[ 	]+[0-9a-f]+:[ 	]+36c58533[ 	]+aes64esm[ 	]+a0,a1,a2
-[ 	]+[0-9a-f]+:[ 	]+31459513[ 	]+aes64ks1i[ 	]+a0,a1,0x4
-[ 	]+[0-9a-f]+:[ 	]+7ec58533[ 	]+aes64ks2[ 	]+a0,a1,a2
diff --git a/gas/testsuite/gas/riscv/zkne-64.s b/gas/testsuite/gas/riscv/zkne-64.s
deleted file mode 100644
index 9b5612001af..00000000000
--- a/gas/testsuite/gas/riscv/zkne-64.s
+++ /dev/null
@@ -1,5 +0,0 @@
-target:
-        aes64es     a0, a1, a2
-        aes64esm    a0, a1, a2
-        aes64ks1i   a0, a1, 4
-        aes64ks2    a0, a1, a2
diff --git a/gas/testsuite/gas/riscv/zknh-32.d b/gas/testsuite/gas/riscv/zknh-32.d
deleted file mode 100644
index c8ef70d67f4..00000000000
--- a/gas/testsuite/gas/riscv/zknh-32.d
+++ /dev/null
@@ -1,20 +0,0 @@
-#as: -march=rv32i_zknh
-#source: zknh-32.s
-#objdump: -d
-
-.*:[ 	]+file format .*
-
-
-Disassembly of section .text:
-
-0+000 <target>:
-[ 	]+[0-9a-f]+:[ 	]+10251513[ 	]+sha256sig0[ 	]+a0,a0
-[ 	]+[0-9a-f]+:[ 	]+10351513[ 	]+sha256sig1[ 	]+a0,a0
-[ 	]+[0-9a-f]+:[ 	]+10051513[ 	]+sha256sum0[ 	]+a0,a0
-[ 	]+[0-9a-f]+:[ 	]+10151513[ 	]+sha256sum1[ 	]+a0,a0
-[ 	]+[0-9a-f]+:[ 	]+5cc58533[ 	]+sha512sig0h[ 	]+a0,a1,a2
-[ 	]+[0-9a-f]+:[ 	]+54c58533[ 	]+sha512sig0l[ 	]+a0,a1,a2
-[ 	]+[0-9a-f]+:[ 	]+5ec58533[ 	]+sha512sig1h[ 	]+a0,a1,a2
-[ 	]+[0-9a-f]+:[ 	]+56c58533[ 	]+sha512sig1l[ 	]+a0,a1,a2
-[ 	]+[0-9a-f]+:[ 	]+50c58533[ 	]+sha512sum0r[ 	]+a0,a1,a2
-[ 	]+[0-9a-f]+:[ 	]+52c58533[ 	]+sha512sum1r[ 	]+a0,a1,a2
diff --git a/gas/testsuite/gas/riscv/zknh-32.s b/gas/testsuite/gas/riscv/zknh-32.s
deleted file mode 100644
index dc2cd3c6657..00000000000
--- a/gas/testsuite/gas/riscv/zknh-32.s
+++ /dev/null
@@ -1,11 +0,0 @@
-target:
-        sha256sig0  a0, a0
-        sha256sig1  a0, a0
-        sha256sum0  a0, a0
-        sha256sum1  a0, a0
-        sha512sig0h    a0, a1, a2
-        sha512sig0l    a0, a1, a2
-        sha512sig1h    a0, a1, a2
-        sha512sig1l    a0, a1, a2
-        sha512sum0r    a0, a1, a2
-        sha512sum1r    a0, a1, a2
diff --git a/gas/testsuite/gas/riscv/zknh-64.d b/gas/testsuite/gas/riscv/zknh-64.d
deleted file mode 100644
index b72e31e3547..00000000000
--- a/gas/testsuite/gas/riscv/zknh-64.d
+++ /dev/null
@@ -1,18 +0,0 @@
-#as: -march=rv64i_zknh
-#source: zknh-64.s
-#objdump: -d
-
-.*:[ 	]+file format .*
-
-
-Disassembly of section .text:
-
-0+000 <target>:
-[ 	]+[0-9a-f]+:[ 	]+10251513[ 	]+sha256sig0[ 	]+a0,a0
-[ 	]+[0-9a-f]+:[ 	]+10351513[ 	]+sha256sig1[ 	]+a0,a0
-[ 	]+[0-9a-f]+:[ 	]+10051513[ 	]+sha256sum0[ 	]+a0,a0
-[ 	]+[0-9a-f]+:[ 	]+10151513[ 	]+sha256sum1[ 	]+a0,a0
-[ 	]+[0-9a-f]+:[ 	]+10651513[ 	]+sha512sig0[ 	]+a0,a0
-[ 	]+[0-9a-f]+:[ 	]+10751513[ 	]+sha512sig1[ 	]+a0,a0
-[ 	]+[0-9a-f]+:[ 	]+10451513[ 	]+sha512sum0[ 	]+a0,a0
-[ 	]+[0-9a-f]+:[ 	]+10551513[ 	]+sha512sum1[ 	]+a0,a0
diff --git a/gas/testsuite/gas/riscv/zknh-64.s b/gas/testsuite/gas/riscv/zknh-64.s
deleted file mode 100644
index 897dc0ba32e..00000000000
--- a/gas/testsuite/gas/riscv/zknh-64.s
+++ /dev/null
@@ -1,9 +0,0 @@
-target:
-        sha256sig0  a0, a0
-        sha256sig1  a0, a0
-        sha256sum0  a0, a0
-        sha256sum1  a0, a0
-        sha512sig0  a0, a0
-        sha512sig1  a0, a0
-        sha512sum0  a0, a0
-        sha512sum1  a0, a0
diff --git a/gas/testsuite/gas/riscv/zksed-32.d b/gas/testsuite/gas/riscv/zksed-32.d
deleted file mode 100644
index 3c84c0f31ce..00000000000
--- a/gas/testsuite/gas/riscv/zksed-32.d
+++ /dev/null
@@ -1,12 +0,0 @@
-#as: -march=rv32i_zksed
-#source: zksed.s
-#objdump: -d
-
-.*:[ 	]+file format .*
-
-
-Disassembly of section .text:
-
-0+000 <target>:
-[ 	]+[0-9a-f]+:[ 	]+b0c58533[ 	]+sm4ed[ 	]+a0,a1,a2,0x2
-[ 	]+[0-9a-f]+:[ 	]+b4c58533[ 	]+sm4ks[ 	]+a0,a1,a2,0x2
diff --git a/gas/testsuite/gas/riscv/zksed-64.d b/gas/testsuite/gas/riscv/zksed-64.d
deleted file mode 100644
index 29d828a9009..00000000000
--- a/gas/testsuite/gas/riscv/zksed-64.d
+++ /dev/null
@@ -1,12 +0,0 @@
-#as: -march=rv64i_zksed
-#source: zksed.s
-#objdump: -d
-
-.*:[ 	]+file format .*
-
-
-Disassembly of section .text:
-
-0+000 <target>:
-[ 	]+[0-9a-f]+:[ 	]+b0c58533[ 	]+sm4ed[ 	]+a0,a1,a2,0x2
-[ 	]+[0-9a-f]+:[ 	]+b4c58533[ 	]+sm4ks[ 	]+a0,a1,a2,0x2
diff --git a/gas/testsuite/gas/riscv/zksed.s b/gas/testsuite/gas/riscv/zksed.s
deleted file mode 100644
index ee95c7a8584..00000000000
--- a/gas/testsuite/gas/riscv/zksed.s
+++ /dev/null
@@ -1,3 +0,0 @@
-target:
-        sm4ed   a0, a1, a2, 2
-        sm4ks   a0, a1, a2, 2
diff --git a/gas/testsuite/gas/riscv/zksh-32.d b/gas/testsuite/gas/riscv/zksh-32.d
deleted file mode 100644
index 14ac63d95e6..00000000000
--- a/gas/testsuite/gas/riscv/zksh-32.d
+++ /dev/null
@@ -1,12 +0,0 @@
-#as: -march=rv32i_zksh
-#source: zksh.s
-#objdump: -d
-
-.*:[ 	]+file format .*
-
-
-Disassembly of section .text:
-
-0+000 <target>:
-[ 	]+[0-9a-f]+:[ 	]+10851513[ 	]+sm3p0[ 	]+a0,a0
-[ 	]+[0-9a-f]+:[ 	]+10951513[ 	]+sm3p1[ 	]+a0,a0
diff --git a/gas/testsuite/gas/riscv/zksh-64.d b/gas/testsuite/gas/riscv/zksh-64.d
deleted file mode 100644
index 2d13e38dd37..00000000000
--- a/gas/testsuite/gas/riscv/zksh-64.d
+++ /dev/null
@@ -1,12 +0,0 @@
-#as: -march=rv64i_zksh
-#source: zksh.s
-#objdump: -d
-
-.*:[ 	]+file format .*
-
-
-Disassembly of section .text:
-
-0+000 <target>:
-[ 	]+[0-9a-f]+:[ 	]+10851513[ 	]+sm3p0[ 	]+a0,a0
-[ 	]+[0-9a-f]+:[ 	]+10951513[ 	]+sm3p1[ 	]+a0,a0
diff --git a/gas/testsuite/gas/riscv/zksh.s b/gas/testsuite/gas/riscv/zksh.s
deleted file mode 100644
index b321c26f2b2..00000000000
--- a/gas/testsuite/gas/riscv/zksh.s
+++ /dev/null
@@ -1,3 +0,0 @@
-target:
-        sm3p0   a0, a0
-        sm3p1   a0, a0
diff --git a/gas/testsuite/gas/riscv/zkt.d b/gas/testsuite/gas/riscv/zkt.d
new file mode 100644
index 00000000000..feca41b64fa
--- /dev/null
+++ b/gas/testsuite/gas/riscv/zkt.d
@@ -0,0 +1,5 @@
+#as: -march=rv32i_zkt
+#source: empty.s
+#objdump: -d
+
+#...
-- 
2.37.2


  parent reply	other threads:[~2022-11-05 12:31 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-05 12:29 [PATCH 00/12] RISC-V: Test refinements (Batch 1) Tsukasa OI
2022-11-05 12:29 ` [PATCH 01/12] RISC-V: Remove unnecessary empty matching file Tsukasa OI
2022-11-29  7:38   ` Nelson Chu
2022-11-05 12:29 ` [PATCH 02/12] RISC-V: Tidy disassembler corner case tests Tsukasa OI
2022-11-29  7:48   ` Nelson Chu
2022-11-05 12:29 ` [PATCH 03/12] RISC-V: Tidying related to 'Zfinx' disassembler test Tsukasa OI
2022-11-29  7:50   ` Nelson Chu
2022-11-05 12:29 ` [PATCH 04/12] RISC-V: GAS: Add basic shared test utilities Tsukasa OI
2022-11-29  7:53   ` Nelson Chu
2022-11-05 12:29 ` [PATCH 05/12] RISC-V: Redefine "nop" test Tsukasa OI
2022-11-29  7:58   ` Nelson Chu
2022-11-05 12:29 ` [PATCH 06/12] RISC-V: Reorganize/enhance {sign,zero}-extension instructions Tsukasa OI
2022-11-29  8:10   ` Nelson Chu
2022-11-05 12:29 ` [PATCH 07/12] RISC-V: Combine complex extension error handling tests Tsukasa OI
2022-11-29  8:16   ` Nelson Chu
2022-11-05 12:29 ` [PATCH 08/12] RISC-V: Refine/enhance 'M'/'Zmmul' extension tests Tsukasa OI
2022-11-29  8:23   ` Nelson Chu
2022-11-05 12:29 ` [PATCH 09/12] RISC-V: Combine/enhance 'Zicbo[mz]' " Tsukasa OI
2022-11-29  8:38   ` Nelson Chu
2022-11-05 12:29 ` [PATCH 10/12] RISC-V: Enhance 'Zicbop' testcases Tsukasa OI
2022-11-29  8:51   ` Nelson Chu
2022-11-05 12:29 ` [PATCH 11/12] RISC-V: Reorganize/enhance 'Zb*' extension tests Tsukasa OI
2022-11-29  8:57   ` Nelson Chu
2022-11-05 12:29 ` Tsukasa OI [this message]
2022-11-29  9:00   ` [PATCH 12/12] RISC-V: Combine/enhance 'Zk*'/'Zbk*' " Nelson Chu
2022-11-20  2:28 ` [PING^1][PATCH 00/12] RISC-V: Test refinements (Batch 1) Tsukasa OI

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f1c5589ab606b74eeac98e3dafd4a7903450d3b2.1667651354.git.research_trasio@irq.a4lg.com \
    --to=research_trasio@irq.a4lg.com \
    --cc=binutils@sourceware.org \
    --cc=kito.cheng@sifive.com \
    --cc=nelson@rivosinc.com \
    --cc=palmer@dabbelt.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).