aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorJin Ma <jinma@linux.alibaba.com>2023-11-18 15:04:01 +0800
committerNelson Chu <nelson@rivosinc.com>2023-11-23 09:31:34 +0800
commit9aa5dde64d7bad3f405d42ac8c25b91775864178 (patch)
tree9792d5be280e9a9c74d848c0e57a988cb0125c6d /gas
parent6fdd02bb1f5bbeaa4d38b8a39e26ba414a850001 (diff)
downloadbinutils-9aa5dde64d7bad3f405d42ac8c25b91775864178.zip
binutils-9aa5dde64d7bad3f405d42ac8c25b91775864178.tar.gz
binutils-9aa5dde64d7bad3f405d42ac8c25b91775864178.tar.bz2
RISC-V: Add configuration-setting instructions for T-Head VECTOR vendor extension
T-Head has a range of vendor-specific instructions. Therefore it makes sense to group them into smaller chunks in form of vendor extensions. This patch adds configuration-setting instructions for the "XTheadVector" extension. The 'th' prefix and the "XTheadVector" extension are documented in a PR for the RISC-V toolchain conventions ([1]). [1] https://github.com/riscv-non-isa/riscv-toolchain-conventions/pull/19 Co-developed-by: Lifang Xia <lifang_xia@linux.alibaba.com> Co-developed-by: Christoph Müllner <christoph.muellner@vrull.eu> gas/ChangeLog: * testsuite/gas/riscv/x-thead-vector.d: New test. * testsuite/gas/riscv/x-thead-vector.s: New test. opcodes/ChangeLog: * riscv-opc.c: Likewise..
Diffstat (limited to 'gas')
-rw-r--r--gas/testsuite/gas/riscv/x-thead-vector.d12
-rw-r--r--gas/testsuite/gas/riscv/x-thead-vector.s3
2 files changed, 15 insertions, 0 deletions
diff --git a/gas/testsuite/gas/riscv/x-thead-vector.d b/gas/testsuite/gas/riscv/x-thead-vector.d
new file mode 100644
index 0000000..e509ed0
--- /dev/null
+++ b/gas/testsuite/gas/riscv/x-thead-vector.d
@@ -0,0 +1,12 @@
+#as: -march=rv32if_xtheadvector
+#objdump: -dr
+
+.*:[ ]+file format .*
+
+
+Disassembly of section .text:
+
+0+000 <.text>:
+[ ]+[0-9a-f]+:[ ]+80c5f557[ ]+th.vsetvl[ ]+a0,a1,a2
+[ ]+[0-9a-f]+:[ ]+0005f557[ ]+th.vsetvli[ ]+a0,a1,e8,m1,tu,mu
+[ ]+[0-9a-f]+:[ ]+7ff5f557[ ]+th.vsetvli[ ]+a0,a1,2047
diff --git a/gas/testsuite/gas/riscv/x-thead-vector.s b/gas/testsuite/gas/riscv/x-thead-vector.s
index e69de29..ffea0a6 100644
--- a/gas/testsuite/gas/riscv/x-thead-vector.s
+++ b/gas/testsuite/gas/riscv/x-thead-vector.s
@@ -0,0 +1,3 @@
+ th.vsetvl a0, a1, a2
+ th.vsetvli a0, a1, 0
+ th.vsetvli a0, a1, 0x7ff