From: Tsukasa OI <research_trasio@irq.a4lg.com>
To: Tsukasa OI <research_trasio@irq.a4lg.com>,
Palmer Dabbelt <palmer@dabbelt.com>,
Andrew Waterman <andrew@sifive.com>,
Jim Wilson <jim.wilson.gcc@gmail.com>,
Nelson Chu <nelson@rivosinc.com>,
Kito Cheng <kito.cheng@sifive.com>
Cc: binutils@sourceware.org
Subject: [PATCH] RISC-V: Add "OP_P" to .insn named opcodes
Date: Sat, 12 Aug 2023 01:51:02 +0000 [thread overview]
Message-ID: <59e21b61a95f323f0771e528c23166f110e2e19d.1691805058.git.research_trasio@irq.a4lg.com> (raw)
From: Tsukasa OI <research_trasio@irq.a4lg.com>
This commit adds "OP_P" (OP-P: packed SIMD instruction opcode intended for
the 'P' extension but its use is first approved for the vector cryptography
specification) to .insn opcode name list. Although vector / packed SIMD
instruction encodings are not implemented in `.insn' directive, it will help
future implementation of custom vector / packed SIMD `.insn'.
gas/ChangeLog:
* config/tc-riscv.c (opcode_name_list): Add "OP_P".
* testsuite/gas/riscv/insn.s: Add "OP_P" vector crypto testcase.
* testsuite/gas/riscv/insn.d: Likewise.
* testsuite/gas/riscv/insn-na.d: Likewise.
* testsuite/gas/riscv/insn-dwarf.d: Reflect insn.s update.
---
gas/config/tc-riscv.c | 2 +-
gas/testsuite/gas/riscv/insn-dwarf.d | 43 ++++++++++++++--------------
gas/testsuite/gas/riscv/insn-na.d | 3 +-
gas/testsuite/gas/riscv/insn.d | 3 +-
gas/testsuite/gas/riscv/insn.s | 1 +
5 files changed, 28 insertions(+), 24 deletions(-)
diff --git a/gas/config/tc-riscv.c b/gas/config/tc-riscv.c
index aaf8b9be64fd..64eba22ddf29 100644
--- a/gas/config/tc-riscv.c
+++ b/gas/config/tc-riscv.c
@@ -867,7 +867,7 @@ static const struct opcode_name_t opcode_name_list[] =
/*reserved 0x5b. */
{"JAL", 0x6f},
{"SYSTEM", 0x73},
- /*reserved 0x77. */
+ {"OP_P", 0x77},
{"CUSTOM_3", 0x7b},
/* >80b 0x7f. */
diff --git a/gas/testsuite/gas/riscv/insn-dwarf.d b/gas/testsuite/gas/riscv/insn-dwarf.d
index b8bd42dff18c..53fb85eb4625 100644
--- a/gas/testsuite/gas/riscv/insn-dwarf.d
+++ b/gas/testsuite/gas/riscv/insn-dwarf.d
@@ -60,27 +60,28 @@ insn.s +53 +0x9a.*
insn.s +54 +0x9e.*
insn.s +55 +0xa2.*
insn.s +57 +0xa6.*
-insn.s +59 +0xaa.*
-insn.s +60 +0xac.*
+insn.s +58 +0xaa.*
+insn.s +60 +0xae.*
insn.s +61 +0xb0.*
-insn.s +62 +0xb6.*
-insn.s +63 +0xbe.*
-insn.s +64 +0xc8.*
-insn.s +65 +0xd4.*
-insn.s +66 +0xea.*
-insn.s +67 +0xec.*
+insn.s +62 +0xb4.*
+insn.s +63 +0xba.*
+insn.s +64 +0xc2.*
+insn.s +65 +0xcc.*
+insn.s +66 +0xd8.*
+insn.s +67 +0xee.*
insn.s +68 +0xf0.*
-insn.s +69 +0xf6.*
-insn.s +70 +0xfe.*
-insn.s +71 +0x108.*
-insn.s +72 +0x114.*
-insn.s +74 +0x12a.*
-insn.s +75 +0x134.*
-insn.s +76 +0x13e.*
-insn.s +77 +0x154.*
-insn.s +78 +0x16a.*
-insn.s +79 +0x180.*
-insn.s +80 +0x196.*
-insn.s +81 +0x1ac.*
-insn.s +- +0x1c2
+insn.s +69 +0xf4.*
+insn.s +70 +0xfa.*
+insn.s +71 +0x102.*
+insn.s +72 +0x10c.*
+insn.s +73 +0x118.*
+insn.s +75 +0x12e.*
+insn.s +76 +0x138.*
+insn.s +77 +0x142.*
+insn.s +78 +0x158.*
+insn.s +79 +0x16e.*
+insn.s +80 +0x184.*
+insn.s +81 +0x19a.*
+insn.s +82 +0x1b0.*
+insn.s +- +0x1c6
#pass
diff --git a/gas/testsuite/gas/riscv/insn-na.d b/gas/testsuite/gas/riscv/insn-na.d
index 55bf301656b2..d43f07906fe4 100644
--- a/gas/testsuite/gas/riscv/insn-na.d
+++ b/gas/testsuite/gas/riscv/insn-na.d
@@ -1,4 +1,4 @@
-#as: -march=rv32ifcv
+#as: -march=rv32ifcv_zvkned
#source: insn.s
#objdump: -dw -Mno-aliases
@@ -59,6 +59,7 @@ Disassembly of section .text:
[^:]+:[ ]+00c58533[ ]+add[ ]+a0,a1,a2
[^:]+:[ ]+00c58533[ ]+add[ ]+a0,a1,a2
[^:]+:[ ]+022180d7[ ]+vadd\.vv[ ]+v1,v2,v3
+[^:]+:[ ]+a2402177[ ]+vaesdm\.vv[ ]+v2,v4
[^:]+:[ ]+0001[ ]+c\.addi[ ]+zero,0
[^:]+:[ ]+00000013[ ]+addi[ ]+zero,zero,0
[^:]+:[ ]+001f 0000 0000[ ].*
diff --git a/gas/testsuite/gas/riscv/insn.d b/gas/testsuite/gas/riscv/insn.d
index 89e076d126d0..fc3d0437c1d0 100644
--- a/gas/testsuite/gas/riscv/insn.d
+++ b/gas/testsuite/gas/riscv/insn.d
@@ -1,4 +1,4 @@
-#as: -march=rv32ifcv
+#as: -march=rv32ifcv_zvkned
#objdump: -dr
.*:[ ]+file format .*
@@ -70,6 +70,7 @@ Disassembly of section .text:
[^:]+:[ ]+00c58533[ ]+add[ ]+a0,a1,a2
[^:]+:[ ]+00c58533[ ]+add[ ]+a0,a1,a2
[^:]+:[ ]+022180d7[ ]+vadd\.vv[ ]+v1,v2,v3
+[^:]+:[ ]+a2402177[ ]+vaesdm\.vv[ ]+v2,v4
[^:]+:[ ]+0001[ ]+nop
[^:]+:[ ]+00000013[ ]+nop
[^:]+:[ ]+001f 0000 0000[ ].*
diff --git a/gas/testsuite/gas/riscv/insn.s b/gas/testsuite/gas/riscv/insn.s
index 48db59b14e88..915b7ecc9634 100644
--- a/gas/testsuite/gas/riscv/insn.s
+++ b/gas/testsuite/gas/riscv/insn.s
@@ -55,6 +55,7 @@ target:
.insn r 0x33, 0, 0, fa0, fa1, fa2
.insn r OP_V, 0, 1, x1, x3, x2
+ .insn r OP_P, 2, 0x51, x2, x0, x4
.insn 0x0001
.insn 0x00000013
base-commit: 6a6859cbff7ac3fcf81689c47d19e716e9bbac2a
--
2.41.0
next reply other threads:[~2023-08-12 1:51 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-12 1:51 Tsukasa OI [this message]
2023-08-15 6:22 ` Nelson Chu
2023-08-15 6:25 ` Nelson Chu
2023-08-15 6:28 ` Tsukasa OI
2023-08-15 6:34 ` Nelson Chu
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=59e21b61a95f323f0771e528c23166f110e2e19d.1691805058.git.research_trasio@irq.a4lg.com \
--to=research_trasio@irq.a4lg.com \
--cc=andrew@sifive.com \
--cc=binutils@sourceware.org \
--cc=jim.wilson.gcc@gmail.com \
--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).