aboutsummaryrefslogtreecommitdiff
path: root/gas/testsuite
diff options
context:
space:
mode:
authorChristoph Müllner <christoph.muellner@vrull.eu>2022-06-28 17:44:57 +0200
committerPhilipp Tomsich <philipp.tomsich@vrull.eu>2022-09-22 18:06:09 +0200
commitf511f80fa3fcaf6bcbe727fb902b8bd5ec8f9c20 (patch)
tree6958b2ab3024e997f728a7811ea0099a5f30df3f /gas/testsuite
parent4041e11db3ec3611921d10150572a92689aa3154 (diff)
downloadgdb-f511f80fa3fcaf6bcbe727fb902b8bd5ec8f9c20.zip
gdb-f511f80fa3fcaf6bcbe727fb902b8bd5ec8f9c20.tar.gz
gdb-f511f80fa3fcaf6bcbe727fb902b8bd5ec8f9c20.tar.bz2
RISC-V: Add T-Head FMemIdx 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 the XTheadFMemIdx extension, a collection of T-Head-specific floating-point memory access instructions. The 'th' prefix and the "XTheadFMemIdx" 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> Signed-off-by: Christoph Müllner <christoph.muellner@vrull.eu>
Diffstat (limited to 'gas/testsuite')
-rw-r--r--gas/testsuite/gas/riscv/x-thead-fmemidx-fail.d3
-rw-r--r--gas/testsuite/gas/riscv/x-thead-fmemidx-fail.l18
-rw-r--r--gas/testsuite/gas/riscv/x-thead-fmemidx-fail.s17
-rw-r--r--gas/testsuite/gas/riscv/x-thead-fmemidx.d25
-rw-r--r--gas/testsuite/gas/riscv/x-thead-fmemidx.s17
5 files changed, 80 insertions, 0 deletions
diff --git a/gas/testsuite/gas/riscv/x-thead-fmemidx-fail.d b/gas/testsuite/gas/riscv/x-thead-fmemidx-fail.d
new file mode 100644
index 0000000..a32e81e
--- /dev/null
+++ b/gas/testsuite/gas/riscv/x-thead-fmemidx-fail.d
@@ -0,0 +1,3 @@
+#as: -march=rv64i_xtheadfmemidx
+#source: x-thead-fmemidx-fail.s
+#error_output: x-thead-fmemidx-fail.l
diff --git a/gas/testsuite/gas/riscv/x-thead-fmemidx-fail.l b/gas/testsuite/gas/riscv/x-thead-fmemidx-fail.l
new file mode 100644
index 0000000..ef28f04
--- /dev/null
+++ b/gas/testsuite/gas/riscv/x-thead-fmemidx-fail.l
@@ -0,0 +1,18 @@
+.*: Assembler messages:
+.*: Error: improper immediate value \(18446744073709551615\)
+.*: Error: improper immediate value \(4\)
+.*: Error: improper immediate value \(18446744073709551615\)
+.*: Error: improper immediate value \(4\)
+.*: Error: improper immediate value \(18446744073709551615\)
+.*: Error: improper immediate value \(4\)
+.*: Error: improper immediate value \(18446744073709551615\)
+.*: Error: improper immediate value \(4\)
+.*: Error: improper immediate value \(18446744073709551615\)
+.*: Error: improper immediate value \(4\)
+.*: Error: improper immediate value \(18446744073709551615\)
+.*: Error: improper immediate value \(4\)
+.*: Error: improper immediate value \(18446744073709551615\)
+.*: Error: improper immediate value \(4\)
+.*: Error: improper immediate value \(18446744073709551615\)
+.*: Error: improper immediate value \(4\)
+
diff --git a/gas/testsuite/gas/riscv/x-thead-fmemidx-fail.s b/gas/testsuite/gas/riscv/x-thead-fmemidx-fail.s
new file mode 100644
index 0000000..e486c6a
--- /dev/null
+++ b/gas/testsuite/gas/riscv/x-thead-fmemidx-fail.s
@@ -0,0 +1,17 @@
+target:
+ th.flrd a0, a1, a2, -1
+ th.flrd a0, a1, a2, 4
+ th.flrw a0, a1, a2, -1
+ th.flrw a0, a1, a2, 4
+ th.flurd a0, a1, a2, -1
+ th.flurd a0, a1, a2, 4
+ th.flurw a0, a1, a2, -1
+ th.flurw a0, a1, a2, 4
+ th.fsrd a0, a1, a2, -1
+ th.fsrd a0, a1, a2, 4
+ th.fsrw a0, a1, a2, -1
+ th.fsrw a0, a1, a2, 4
+ th.fsurd a0, a1, a2, -1
+ th.fsurd a0, a1, a2, 4
+ th.fsurw a0, a1, a2, -1
+ th.fsurw a0, a1, a2, 4
diff --git a/gas/testsuite/gas/riscv/x-thead-fmemidx.d b/gas/testsuite/gas/riscv/x-thead-fmemidx.d
new file mode 100644
index 0000000..dfa477c
--- /dev/null
+++ b/gas/testsuite/gas/riscv/x-thead-fmemidx.d
@@ -0,0 +1,25 @@
+#as: -march=rv64i_xtheadfmemidx
+#source: x-thead-fmemidx.s
+#objdump: -dr
+
+.*:[ ]+file format .*
+
+Disassembly of section .text:
+
+0+000 <target>:
+[ ]+[0-9a-f]+:[ ]+60c5e50b[ ]+th.flrd[ ]+a0,a1,a2,0
+[ ]+[0-9a-f]+:[ ]+66c5e50b[ ]+th.flrd[ ]+a0,a1,a2,3
+[ ]+[0-9a-f]+:[ ]+40c5e50b[ ]+th.flrw[ ]+a0,a1,a2,0
+[ ]+[0-9a-f]+:[ ]+46c5e50b[ ]+th.flrw[ ]+a0,a1,a2,3
+[ ]+[0-9a-f]+:[ ]+70c5e50b[ ]+th.flurd[ ]+a0,a1,a2,0
+[ ]+[0-9a-f]+:[ ]+76c5e50b[ ]+th.flurd[ ]+a0,a1,a2,3
+[ ]+[0-9a-f]+:[ ]+50c5e50b[ ]+th.flurw[ ]+a0,a1,a2,0
+[ ]+[0-9a-f]+:[ ]+56c5e50b[ ]+th.flurw[ ]+a0,a1,a2,3
+[ ]+[0-9a-f]+:[ ]+60c5f50b[ ]+th.fsrd[ ]+a0,a1,a2,0
+[ ]+[0-9a-f]+:[ ]+66c5f50b[ ]+th.fsrd[ ]+a0,a1,a2,3
+[ ]+[0-9a-f]+:[ ]+40c5f50b[ ]+th.fsrw[ ]+a0,a1,a2,0
+[ ]+[0-9a-f]+:[ ]+46c5f50b[ ]+th.fsrw[ ]+a0,a1,a2,3
+[ ]+[0-9a-f]+:[ ]+70c5f50b[ ]+th.fsurd[ ]+a0,a1,a2,0
+[ ]+[0-9a-f]+:[ ]+76c5f50b[ ]+th.fsurd[ ]+a0,a1,a2,3
+[ ]+[0-9a-f]+:[ ]+50c5f50b[ ]+th.fsurw[ ]+a0,a1,a2,0
+[ ]+[0-9a-f]+:[ ]+56c5f50b[ ]+th.fsurw[ ]+a0,a1,a2,3
diff --git a/gas/testsuite/gas/riscv/x-thead-fmemidx.s b/gas/testsuite/gas/riscv/x-thead-fmemidx.s
new file mode 100644
index 0000000..0d70bb7
--- /dev/null
+++ b/gas/testsuite/gas/riscv/x-thead-fmemidx.s
@@ -0,0 +1,17 @@
+target:
+ th.flrd a0, a1, a2, 0
+ th.flrd a0, a1, a2, 3
+ th.flrw a0, a1, a2, 0
+ th.flrw a0, a1, a2, 3
+ th.flurd a0, a1, a2, 0
+ th.flurd a0, a1, a2, 3
+ th.flurw a0, a1, a2, 0
+ th.flurw a0, a1, a2, 3
+ th.fsrd a0, a1, a2, 0
+ th.fsrd a0, a1, a2, 3
+ th.fsrw a0, a1, a2, 0
+ th.fsrw a0, a1, a2, 3
+ th.fsurd a0, a1, a2, 0
+ th.fsurd a0, a1, a2, 3
+ th.fsurw a0, a1, a2, 0
+ th.fsurw a0, a1, a2, 3