Skip to content

Commit 61db257

Browse files
committed
RISC-V: Add "OP_P" to .insn named opcodes
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.
1 parent f9280e3 commit 61db257

File tree

5 files changed

+28
-24
lines changed

5 files changed

+28
-24
lines changed

gas/config/tc-riscv.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -867,7 +867,7 @@ static const struct opcode_name_t opcode_name_list[] =
867867
/*reserved 0x5b. */
868868
{"JAL", 0x6f},
869869
{"SYSTEM", 0x73},
870-
/*reserved 0x77. */
870+
{"OP_P", 0x77},
871871
{"CUSTOM_3", 0x7b},
872872
/* >80b 0x7f. */
873873

gas/testsuite/gas/riscv/insn-dwarf.d

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -60,27 +60,28 @@ insn.s +53 +0x9a.*
6060
insn.s +54 +0x9e.*
6161
insn.s +55 +0xa2.*
6262
insn.s +57 +0xa6.*
63-
insn.s +59 +0xaa.*
64-
insn.s +60 +0xac.*
63+
insn.s +58 +0xaa.*
64+
insn.s +60 +0xae.*
6565
insn.s +61 +0xb0.*
66-
insn.s +62 +0xb6.*
67-
insn.s +63 +0xbe.*
68-
insn.s +64 +0xc8.*
69-
insn.s +65 +0xd4.*
70-
insn.s +66 +0xea.*
71-
insn.s +67 +0xec.*
66+
insn.s +62 +0xb4.*
67+
insn.s +63 +0xba.*
68+
insn.s +64 +0xc2.*
69+
insn.s +65 +0xcc.*
70+
insn.s +66 +0xd8.*
71+
insn.s +67 +0xee.*
7272
insn.s +68 +0xf0.*
73-
insn.s +69 +0xf6.*
74-
insn.s +70 +0xfe.*
75-
insn.s +71 +0x108.*
76-
insn.s +72 +0x114.*
77-
insn.s +74 +0x12a.*
78-
insn.s +75 +0x134.*
79-
insn.s +76 +0x13e.*
80-
insn.s +77 +0x154.*
81-
insn.s +78 +0x16a.*
82-
insn.s +79 +0x180.*
83-
insn.s +80 +0x196.*
84-
insn.s +81 +0x1ac.*
85-
insn.s +- +0x1c2
73+
insn.s +69 +0xf4.*
74+
insn.s +70 +0xfa.*
75+
insn.s +71 +0x102.*
76+
insn.s +72 +0x10c.*
77+
insn.s +73 +0x118.*
78+
insn.s +75 +0x12e.*
79+
insn.s +76 +0x138.*
80+
insn.s +77 +0x142.*
81+
insn.s +78 +0x158.*
82+
insn.s +79 +0x16e.*
83+
insn.s +80 +0x184.*
84+
insn.s +81 +0x19a.*
85+
insn.s +82 +0x1b0.*
86+
insn.s +- +0x1c6
8687
#pass

gas/testsuite/gas/riscv/insn-na.d

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#as: -march=rv32ifcv
1+
#as: -march=rv32ifcv_zvkned
22
#source: insn.s
33
#objdump: -dw -Mno-aliases
44

@@ -59,6 +59,7 @@ Disassembly of section .text:
5959
[^:]+:[ ]+00c58533[ ]+add[ ]+a0,a1,a2
6060
[^:]+:[ ]+00c58533[ ]+add[ ]+a0,a1,a2
6161
[^:]+:[ ]+022180d7[ ]+vadd\.vv[ ]+v1,v2,v3
62+
[^:]+:[ ]+a2402177[ ]+vaesdm\.vv[ ]+v2,v4
6263
[^:]+:[ ]+0001[ ]+c\.addi[ ]+zero,0
6364
[^:]+:[ ]+00000013[ ]+addi[ ]+zero,zero,0
6465
[^:]+:[ ]+001f 0000 0000[ ].*

gas/testsuite/gas/riscv/insn.d

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#as: -march=rv32ifcv
1+
#as: -march=rv32ifcv_zvkned
22
#objdump: -dr
33

44
.*:[ ]+file format .*
@@ -70,6 +70,7 @@ Disassembly of section .text:
7070
[^:]+:[ ]+00c58533[ ]+add[ ]+a0,a1,a2
7171
[^:]+:[ ]+00c58533[ ]+add[ ]+a0,a1,a2
7272
[^:]+:[ ]+022180d7[ ]+vadd\.vv[ ]+v1,v2,v3
73+
[^:]+:[ ]+a2402177[ ]+vaesdm\.vv[ ]+v2,v4
7374
[^:]+:[ ]+0001[ ]+nop
7475
[^:]+:[ ]+00000013[ ]+nop
7576
[^:]+:[ ]+001f 0000 0000[ ].*

gas/testsuite/gas/riscv/insn.s

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ target:
5555
.insn r 0x33, 0, 0, fa0, fa1, fa2
5656

5757
.insn r OP_V, 0, 1, x1, x3, x2
58+
.insn r OP_P, 2, 0x51, x2, x0, x4
5859

5960
.insn 0x0001
6061
.insn 0x00000013

0 commit comments

Comments
 (0)