aboutsummaryrefslogtreecommitdiff
path: root/gas/testsuite
diff options
context:
space:
mode:
authorJim Wilson <jimw@sifive.com>2018-08-23 13:26:48 -0700
committerJim Wilson <jimw@sifive.com>2018-08-23 13:26:48 -0700
commitbfb218e3e404a6168888df51c03827eacde9ceea (patch)
tree2b4c11ce08696265181b4a21e715a32ca24209e7 /gas/testsuite
parentb0ceb98aec8e1ab610deea9fee9ee75c5911bbc0 (diff)
downloadgdb-bfb218e3e404a6168888df51c03827eacde9ceea.zip
gdb-bfb218e3e404a6168888df51c03827eacde9ceea.tar.gz
gdb-bfb218e3e404a6168888df51c03827eacde9ceea.tar.bz2
RISC-V: Reject empty rouding mode and fence operand.
gas/ 2018-08-23 Kito Cheng <kito@andestech.com> * config/tc-riscv.c (arg_lookup): Checking length before look up. * testsuite/gas/riscv/fence-fail.d: New file. * testsuite/gas/riscv/fence-fail.l: Likewise. * testsuite/gas/riscv/fence-fail.s: Likewise. * testsuite/gas/riscv/rouding-fail.d: Likewise. * testsuite/gas/riscv/rouding-fail.l: Likewise. * testsuite/gas/riscv/rouding-fail.s: Likewise.
Diffstat (limited to 'gas/testsuite')
-rw-r--r--gas/testsuite/gas/riscv/fence-fail.d3
-rw-r--r--gas/testsuite/gas/riscv/fence-fail.l4
-rw-r--r--gas/testsuite/gas/riscv/fence-fail.s4
-rw-r--r--gas/testsuite/gas/riscv/rouding-fail.d3
-rw-r--r--gas/testsuite/gas/riscv/rouding-fail.l3
-rw-r--r--gas/testsuite/gas/riscv/rouding-fail.s3
6 files changed, 20 insertions, 0 deletions
diff --git a/gas/testsuite/gas/riscv/fence-fail.d b/gas/testsuite/gas/riscv/fence-fail.d
new file mode 100644
index 0000000..05b158f
--- /dev/null
+++ b/gas/testsuite/gas/riscv/fence-fail.d
@@ -0,0 +1,3 @@
+#as: -march=rv32i
+#source: fence-fail.s
+#error-output: fence-fail.l
diff --git a/gas/testsuite/gas/riscv/fence-fail.l b/gas/testsuite/gas/riscv/fence-fail.l
new file mode 100644
index 0000000..0d0912d
--- /dev/null
+++ b/gas/testsuite/gas/riscv/fence-fail.l
@@ -0,0 +1,4 @@
+.*: Assembler messages:
+.*: Error: illegal operands `fence ,'
+.*: Error: illegal operands `fence w,'
+.*: Error: illegal operands `fence ,w'
diff --git a/gas/testsuite/gas/riscv/fence-fail.s b/gas/testsuite/gas/riscv/fence-fail.s
new file mode 100644
index 0000000..9ce460e
--- /dev/null
+++ b/gas/testsuite/gas/riscv/fence-fail.s
@@ -0,0 +1,4 @@
+target:
+ fence ,
+ fence w,
+ fence ,w
diff --git a/gas/testsuite/gas/riscv/rouding-fail.d b/gas/testsuite/gas/riscv/rouding-fail.d
new file mode 100644
index 0000000..3544507
--- /dev/null
+++ b/gas/testsuite/gas/riscv/rouding-fail.d
@@ -0,0 +1,3 @@
+#as: -march=rv32ifd
+#source: rouding-fail.s
+#error-output: rouding-fail.l
diff --git a/gas/testsuite/gas/riscv/rouding-fail.l b/gas/testsuite/gas/riscv/rouding-fail.l
new file mode 100644
index 0000000..ea46e7c
--- /dev/null
+++ b/gas/testsuite/gas/riscv/rouding-fail.l
@@ -0,0 +1,3 @@
+.*: Assembler messages:
+.*: Error: illegal operands `fadd.s fa1,fa1,fa1,'
+.*: Error: illegal operands `fadd.d fa1,fa1,fa1,'
diff --git a/gas/testsuite/gas/riscv/rouding-fail.s b/gas/testsuite/gas/riscv/rouding-fail.s
new file mode 100644
index 0000000..d18f53e
--- /dev/null
+++ b/gas/testsuite/gas/riscv/rouding-fail.s
@@ -0,0 +1,3 @@
+target:
+ fadd.s fa1,fa1,fa1,
+ fadd.d fa1,fa1,fa1,