]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
RISC-V: Add OP_VE for .insn
authorKito Cheng <kito.cheng@sifive.com>
Thu, 13 Feb 2025 13:19:20 +0000 (21:19 +0800)
committerNelson Chu <nelson@rivosinc.com>
Fri, 14 Feb 2025 03:30:36 +0000 (11:30 +0800)
OP_VE is the opcode space for crypto vector instructions.

Ref:
https://github.com/riscv/riscv-isa-manual/blob/main/src/vector-crypto.adoc#crypto-vector-cryptographic-instructions

gas/config/tc-riscv.c
gas/doc/c-riscv.texi
gas/testsuite/gas/riscv/insn-dwarf.d
gas/testsuite/gas/riscv/insn-na.d
gas/testsuite/gas/riscv/insn.d
gas/testsuite/gas/riscv/insn.s

index ac1a10aa5e42df5b6c5e7d6c8bcd36e314ea06d1..493c393f5b2730fe8f841da074fa106d655ec9a7 100644 (file)
@@ -898,7 +898,7 @@ static const struct opcode_name_t opcode_name_list[] =
   /*reserved    0x5b.  */
   {"JAL",       0x6f},
   {"SYSTEM",    0x73},
-  /*reserved    0x77.  */
+  {"OP_VE",     0x77},
   {"CUSTOM_3",  0x7b},
   /* >80b       0x7f.  */
 
index 314e28c7503936d292875f6fb4333330659c9220..670d437ec87af1e36b4073c3e58cf1071e35f76a 100644 (file)
@@ -548,6 +548,9 @@ Opcode space for misc instructions.
 @item SYSTEM
 Opcode space for system instructions.
 
+@item OP_VE
+Opcode space for crypto vector instructions.
+
 @item CUSTOM_0
 @item CUSTOM_1
 @item CUSTOM_2
index b8bd42dff18c699d3caa7cbae90c9e327c146aa0..d6c6e6e095ebc69ec6aee1bdb1aad365e571badd 100644 (file)
@@ -82,5 +82,6 @@ insn.s +78 +0x16a.*
 insn.s +79 +0x180.*
 insn.s +80 +0x196.*
 insn.s +81 +0x1ac.*
-insn.s +- +0x1c2
+insn.s +83 +0x1c2.*
+insn.s +- +0x1c6
 #pass
index 55bf301656b2d50fc8543557d1887239a3b4c567..47d12974af94ca271d87f5ff77728d14f9eae32d 100644 (file)
@@ -1,4 +1,4 @@
-#as: -march=rv32ifcv
+#as: -march=rv32ifcv_zvknha
 #source: insn.s
 #objdump: -dw -Mno-aliases
 
@@ -81,3 +81,4 @@ Disassembly of section .text:
 [^:]+:[        ]+607f 33cc 55aa cdef 89ab 4567 0123 3210 7654 ba98 00dc[       ]+\.insn[       ]+22, 0x00dcba98765432100123456789abcdef55aa33cc607f
 [^:]+:[        ]+607f 33cc 55aa cdef 89ab 4567 0123 3210 7654 ba98 fedc[       ]+\.insn[       ]+22, 0xfedcba98765432100123456789abcdef55aa33cc607f
 [^:]+:[        ]+607f 33cc 55aa cdef 89ab 4567 0123 3210 7654 ba98 fedc[       ]+\.insn[       ]+22, 0xfedcba98765432100123456789abcdef55aa33cc607f
+[^:]+:[        ]+ba862277[     ]+vsha2ch\.vv[  ]+v4,v8,v12
index 9411a6b1e19bbc28d01e3210d36c7bc035c4c3aa..7ffb4e254ce616de4097810f3752d0135876ebaa 100644 (file)
@@ -1,4 +1,4 @@
-#as: -march=rv32ifcv
+#as: -march=rv32ifcv_zvknha
 #objdump: -dr
 
 .*:[   ]+file format .*
@@ -114,3 +114,4 @@ Disassembly of section .text:
 [^:]+:[        ]+607f 33cc 55aa cdef[  ]+\.insn[       ]+22, 0xfedcba98765432100123456789abcdef55aa33cc607f
 [^:]+:[        ]+89ab 4567 0123 3210 ?
 [^:]+:[        ]+7654 ba98 fedc ?
+[^:]+:[        ]+ba862277[     ]+vsha2ch\.vv[  ]+v4,v8,v12
index 48db59b14e884ba5caa46e26d40aedf74009fe6e..4f72d5be8f5dbd059ccb51e67ebe6928bdcddb0b 100644 (file)
@@ -79,3 +79,5 @@ target:
        .insn 22, 0x00dcba98765432100123456789abcdef55aa33cc607f
        .insn 0xfedcba98765432100123456789abcdef55aa33cc607f
        .insn 22, 0xfedcba98765432100123456789abcdef55aa33cc607f
+
+       .insn r  OP_VE, 0b010, 0b1011101, x4, x12, x8