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 1/2] RISC-V: Reorganize "K"-related subextension tests
Date: Fri, 23 Sep 2022 07:49:16 +0000	[thread overview]
Message-ID: <a41b6493594c0b45da01d591c2b2c29a50c0d6e5.1663919347.git.research_trasio@irq.a4lg.com> (raw)
In-Reply-To: <cover.1663919347.git.research_trasio@irq.a4lg.com>

As all cryptography-related instruction testcases are defined in other
files (zk*.[sd], zbk*.[sd]), there's no need to k-ext{,-64} themselves
except 'Zkt' and 'Zkr'.  Note that accessing seed CSR currently requires
'Zicsr', not just 'Zkr'.  This is being discussed.

After adding them, k-ext{,-64} tests can be safely removed.

Because "K" major extension itself will not be defined, removing these
tests can be useful to avoid confusion related to non-existent
"K"-extension.

gas/ChangeLog:

	* testsuite/gas/riscv/k-ext-64.d: Removed.
	* testsuite/gas/riscv/k-ext-64.s: Removed.
	* testsuite/gas/riscv/k-ext.d: Removed.
	* testsuite/gas/riscv/k-ext.s: Removed.
	* testsuite/gas/riscv/zkr.s: Separate test for
	the 'Zkr' extension.
	* testsuite/gas/riscv/zkr.d: Likewise.
	* testsuite/gas/riscv/zkt.d: Separate test for
	the 'Zkt' extension.
---
 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/zkr.d      | 10 +++++++
 gas/testsuite/gas/riscv/zkr.s      |  2 ++
 gas/testsuite/gas/riscv/zkt.d      |  5 ++++
 7 files changed, 17 insertions(+), 164 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/zkr.d
 create mode 100644 gas/testsuite/gas/riscv/zkr.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 3237c95b199..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[ 	]+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
-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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 57a720b60e3..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[ 	]+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
-[ 	]+[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]+:[ 	]+28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as/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/zkr.d b/gas/testsuite/gas/riscv/zkr.d
new file mode 100644
index 00000000000..4d72c26aac0
--- /dev/null
+++ b/gas/testsuite/gas/riscv/zkr.d
@@ -0,0 +1,10 @@
+#as: -march=rv32i_zicsr_zkr -mcsr-check
+#objdump: -d
+
+.*:[ 	]+file format .*
+
+
+Disassembly of section .text:
+
+0+000 <target>:
+[ 	]+[0-9a-f]+:[ 	]+01502573[ 	]+csrr[ 	]+a0,seed
diff --git a/gas/testsuite/gas/riscv/zkr.s b/gas/testsuite/gas/riscv/zkr.s
new file mode 100644
index 00000000000..96a38fbf49f
--- /dev/null
+++ b/gas/testsuite/gas/riscv/zkr.s
@@ -0,0 +1,2 @@
+target:
+	csrr	a0, seed
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.34.1


  reply	other threads:[~2022-09-23  7:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-23  7:49 [PATCH 0/2] RISC-V: Use only real extension names on testsuite Tsukasa OI
2022-09-23  7:49 ` Tsukasa OI [this message]
2022-09-23  7:49 ` [PATCH 2/2] RISC-V: Reorganize "B"-related subextension tests Tsukasa OI
2022-10-25 14:54 ` [PATCH 0/2] RISC-V: Use only real extension names on testsuite 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=a41b6493594c0b45da01d591c2b2c29a50c0d6e5.1663919347.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).