aboutsummaryrefslogtreecommitdiff
path: root/gas/testsuite
diff options
context:
space:
mode:
Diffstat (limited to 'gas/testsuite')
-rw-r--r--gas/testsuite/gas/riscv/march-help.l1
-rw-r--r--gas/testsuite/gas/riscv/zacas-32.d26
-rw-r--r--gas/testsuite/gas/riscv/zacas-64.d34
-rw-r--r--gas/testsuite/gas/riscv/zacas-fail-32.d3
-rw-r--r--gas/testsuite/gas/riscv/zacas-fail-32.l17
-rw-r--r--gas/testsuite/gas/riscv/zacas-fail-64.d3
-rw-r--r--gas/testsuite/gas/riscv/zacas-fail-64.l9
-rw-r--r--gas/testsuite/gas/riscv/zacas-fail.s17
-rw-r--r--gas/testsuite/gas/riscv/zacas.s27
9 files changed, 137 insertions, 0 deletions
diff --git a/gas/testsuite/gas/riscv/march-help.l b/gas/testsuite/gas/riscv/march-help.l
index d2b9838..e0d597e 100644
--- a/gas/testsuite/gas/riscv/march-help.l
+++ b/gas/testsuite/gas/riscv/march-help.l
@@ -23,6 +23,7 @@ All available -march extensions for RISC-V:
zmmul 1.0
zaamo 1.0
zabha 1.0
+ zacas 1.0
zalrsc 1.0
zawrs 1.0
zfbfmin 1.0
diff --git a/gas/testsuite/gas/riscv/zacas-32.d b/gas/testsuite/gas/riscv/zacas-32.d
new file mode 100644
index 0000000..9f7fabb
--- /dev/null
+++ b/gas/testsuite/gas/riscv/zacas-32.d
@@ -0,0 +1,26 @@
+#as: -march=rv32ia_zacas
+#source: zacas.s
+#objdump: -d
+
+.*:[ ]+file format .*
+
+
+Disassembly of section .text:
+
+0+000 <target>:
+[ ]+[0-9a-f]+:[ ]+28a5252f[ ]+amocas.w[ ]+a0,a0,\(a0\)
+[ ]+[0-9a-f]+:[ ]+28a5252f[ ]+amocas.w[ ]+a0,a0,\(a0\)
+[ ]+[0-9a-f]+:[ ]+2ca5252f[ ]+amocas.w.aq[ ]+a0,a0,\(a0\)
+[ ]+[0-9a-f]+:[ ]+2ca5252f[ ]+amocas.w.aq[ ]+a0,a0,\(a0\)
+[ ]+[0-9a-f]+:[ ]+2aa5252f[ ]+amocas.w.rl[ ]+a0,a0,\(a0\)
+[ ]+[0-9a-f]+:[ ]+2aa5252f[ ]+amocas.w.rl[ ]+a0,a0,\(a0\)
+[ ]+[0-9a-f]+:[ ]+2ea5252f[ ]+amocas.w.aqrl[ ]+a0,a0,\(a0\)
+[ ]+[0-9a-f]+:[ ]+2ea5252f[ ]+amocas.w.aqrl[ ]+a0,a0,\(a0\)
+[ ]+[0-9a-f]+:[ ]+28a5352f[ ]+amocas.d[ ]+a0,a0,\(a0\)
+[ ]+[0-9a-f]+:[ ]+28a5352f[ ]+amocas.d[ ]+a0,a0,\(a0\)
+[ ]+[0-9a-f]+:[ ]+2ca5352f[ ]+amocas.d.aq[ ]+a0,a0,\(a0\)
+[ ]+[0-9a-f]+:[ ]+2ca5352f[ ]+amocas.d.aq[ ]+a0,a0,\(a0\)
+[ ]+[0-9a-f]+:[ ]+2aa5352f[ ]+amocas.d.rl[ ]+a0,a0,\(a0\)
+[ ]+[0-9a-f]+:[ ]+2aa5352f[ ]+amocas.d.rl[ ]+a0,a0,\(a0\)
+[ ]+[0-9a-f]+:[ ]+2ea5352f[ ]+amocas.d.aqrl[ ]+a0,a0,\(a0\)
+[ ]+[0-9a-f]+:[ ]+2ea5352f[ ]+amocas.d.aqrl[ ]+a0,a0,\(a0\)
diff --git a/gas/testsuite/gas/riscv/zacas-64.d b/gas/testsuite/gas/riscv/zacas-64.d
new file mode 100644
index 0000000..3f9113b
--- /dev/null
+++ b/gas/testsuite/gas/riscv/zacas-64.d
@@ -0,0 +1,34 @@
+#as: -march=rv64ia_zacas -defsym rv64=1
+#source: zacas.s
+#objdump: -d
+
+.*:[ ]+file format .*
+
+
+Disassembly of section .text:
+
+0+000 <target>:
+[ ]+[0-9a-f]+:[ ]+28a5252f[ ]+amocas.w[ ]+a0,a0,\(a0\)
+[ ]+[0-9a-f]+:[ ]+28a5252f[ ]+amocas.w[ ]+a0,a0,\(a0\)
+[ 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,\(a0\)
+[ ]+[0-9a-f]+:[ ]+2aa5452f[ ]+amocas.q.rl[ ]+a0,a0,\(a0\)
+[ ]+[0-9a-f]+:[ ]+2aa5452f[ ]+amocas.q.rl[ ]+a0,a0,\(a0\)
+[ ]+[0-9a-f]+:[ ]+2ea5452f[ ]+amocas.q.aqrl[ ]+a0,a0,\(a0\)
+[ ]+[0-9a-f]+:[ ]+2ea5452f[ ]+amocas.q.aqrl[ ]+a0,a0,\(a0\)
diff --git a/gas/testsuite/gas/riscv/zacas-fail-32.d b/gas/testsuite/gas/riscv/zacas-fail-32.d
new file mode 100644
index 0000000..f9cee1c
--- /dev/null
+++ b/gas/testsuite/gas/riscv/zacas-fail-32.d
@@ -0,0 +1,3 @@
+#as: -march=rv32ia_zacas
+#source: zacas-fail.s
+#error_output: zacas-fail-32.l \ No newline at end of file
diff --git a/gas/testsuite/gas/riscv/zacas-fail-32.l b/gas/testsuite/gas/riscv/zacas-fail-32.l
new file mode 100644
index 0000000..ff12bd3
--- /dev/null
+++ b/gas/testsuite/gas/riscv/zacas-fail-32.l
@@ -0,0 +1,17 @@
+.*: Assembler messages:
+.*: Error: illegal operands `amocas.d a1,a0,\(a0\)'
+.*: Error: illegal operands `amocas.d a0,a1,\(a0\)'
+.*: Error: illegal operands `amocas.d.aq a1,a0,\(a0\)'
+.*: Error: illegal operands `amocas.d.aq a0,a1,\(a0\)'
+.*: Error: illegal operands `amocas.d.rl a1,a0,\(a0\)'
+.*: Error: illegal operands `amocas.d.rl a0,a1,\(a0\)'
+.*: Error: illegal operands `amocas.d.aqrl a1,a0,\(a0\)'
+.*: Error: illegal operands `amocas.d.aqrl a0,a1,\(a0\)'
+.*: Error: unrecognized opcode `amocas.q a1,a0,\(a0\)'
+.*: Error: unrecognized opcode `amocas.q a0,a1,\(a0\)'
+.*: Error: unrecognized opcode `amocas.q.aq a1,a0,\(a0\)'
+.*: Error: unrecognized opcode `amocas.q.aq a0,a1,\(a0\)'
+.*: Error: unrecognized opcode `amocas.q.rl a1,a0,\(a0\)'
+.*: Error: unrecognized opcode `amocas.q.rl a0,a1,\(a0\)'
+.*: Error: unrecognized opcode `amocas.q.aqrl a1,a0,\(a0\)'
+.*: Error: unrecognized opcode `amocas.q.aqrl a0,a1,\(a0\)'
diff --git a/gas/testsuite/gas/riscv/zacas-fail-64.d b/gas/testsuite/gas/riscv/zacas-fail-64.d
new file mode 100644
index 0000000..d8413e0
--- /dev/null
+++ b/gas/testsuite/gas/riscv/zacas-fail-64.d
@@ -0,0 +1,3 @@
+#as: -march=rv64ia_zacas
+#source: zacas-fail.s
+#error_output: zacas-fail-64.l \ No newline at end of file
diff --git a/gas/testsuite/gas/riscv/zacas-fail-64.l b/gas/testsuite/gas/riscv/zacas-fail-64.l
new file mode 100644
index 0000000..9ac263d
--- /dev/null
+++ b/gas/testsuite/gas/riscv/zacas-fail-64.l
@@ -0,0 +1,9 @@
+.*: Assembler messages:
+.*: Error: illegal operands `amocas.q a1,a0,\(a0\)'
+.*: Error: illegal operands `amocas.q a0,a1,\(a0\)'
+.*: Error: illegal operands `amocas.q.aq a1,a0,\(a0\)'
+.*: Error: illegal operands `amocas.q.aq a0,a1,\(a0\)'
+.*: Error: illegal operands `amocas.q.rl a1,a0,\(a0\)'
+.*: Error: illegal operands `amocas.q.rl a0,a1,\(a0\)'
+.*: Error: illegal operands `amocas.q.aqrl a1,a0,\(a0\)'
+.*: Error: illegal operands `amocas.q.aqrl a0,a1,\(a0\)'
diff --git a/gas/testsuite/gas/riscv/zacas-fail.s b/gas/testsuite/gas/riscv/zacas-fail.s
new file mode 100644
index 0000000..b1b4ddf
--- /dev/null
+++ b/gas/testsuite/gas/riscv/zacas-fail.s
@@ -0,0 +1,17 @@
+ # rd and rs2 must be even
+ amocas.d a1, a0, (a0)
+ amocas.d a0, a1, (a0)
+ amocas.d.aq a1, a0, (a0)
+ amocas.d.aq a0, a1, (a0)
+ amocas.d.rl a1, a0, (a0)
+ amocas.d.rl a0, a1, (a0)
+ amocas.d.aqrl a1, a0, (a0)
+ amocas.d.aqrl a0, a1, (a0)
+ amocas.q a1, a0, (a0)
+ amocas.q a0, a1, (a0)
+ amocas.q.aq a1, a0, (a0)
+ amocas.q.aq a0, a1, (a0)
+ amocas.q.rl a1, a0, (a0)
+ amocas.q.rl a0, a1, (a0)
+ amocas.q.aqrl a1, a0, (a0)
+ amocas.q.aqrl a0, a1, (a0)
diff --git a/gas/testsuite/gas/riscv/zacas.s b/gas/testsuite/gas/riscv/zacas.s
new file mode 100644
index 0000000..c374ba1
--- /dev/null
+++ b/gas/testsuite/gas/riscv/zacas.s
@@ -0,0 +1,27 @@
+target:
+ amocas.w a0, a0, 0(a0)
+ amocas.w a0, a0, (a0)
+ amocas.w.aq a0, a0, 0(a0)
+ amocas.w.aq a0, a0, (a0)
+ amocas.w.rl a0, a0, 0(a0)
+ amocas.w.rl a0, a0, (a0)
+ amocas.w.aqrl a0, a0, 0(a0)
+ amocas.w.aqrl a0, a0, (a0)
+ amocas.d a0, a0, 0(a0)
+ amocas.d a0, a0, (a0)
+ amocas.d.aq a0, a0, 0(a0)
+ amocas.d.aq a0, a0, (a0)
+ amocas.d.rl a0, a0, 0(a0)
+ amocas.d.rl a0, a0, (a0)
+ amocas.d.aqrl a0, a0, 0(a0)
+ amocas.d.aqrl a0, a0, (a0)
+.ifdef rv64
+ amocas.q a0, a0, 0(a0)
+ amocas.q a0, a0, (a0)
+ amocas.q.aq a0, a0, 0(a0)
+ amocas.q.aq a0, a0, (a0)
+ amocas.q.rl a0, a0, 0(a0)
+ amocas.q.rl a0, a0, (a0)
+ amocas.q.aqrl a0, a0, 0(a0)
+ amocas.q.aqrl a0, a0, (a0)
+.endif