aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorNelson Chu <nelson.chu@sifive.com>2020-11-21 11:19:58 +0800
committerNelson Chu <nelson.chu@sifive.com>2020-12-01 15:09:26 +0800
commite8d4709e6a5f4e3fad8479b8069c52294be54488 (patch)
tree381e50836b9ebefc2c013651cdf8f68b69cbff7f /gas
parentd541518bec90502134ea6b348cb2d4f3363d1c70 (diff)
downloadgdb-e8d4709e6a5f4e3fad8479b8069c52294be54488.zip
gdb-e8d4709e6a5f4e3fad8479b8069c52294be54488.tar.gz
gdb-e8d4709e6a5f4e3fad8479b8069c52294be54488.tar.bz2
RISC-V: Don't allow any uppercase letter in the arch string.
Although I cannot find any RISC-V specs said that uppercases are not allowed in the arhc string, but seems like it is an established fact both for GNU and LLVM. Therefore, we shouldn't allow the uppercases for the non-standard x extensions, too. bfd/ * elfxx-riscv.c (riscv_parse_subset): ISA string cannot contain any uppercase letter. gas/ * testsuite/gas/riscv/march-fail-uppercase-base.d: Updated. * testsuite/gas/riscv/march-fail-uppercase.l: Updated. * testsuite/gas/riscv/march-fail-uppercase-x.d: New testcase.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog6
-rw-r--r--gas/testsuite/gas/riscv/march-fail-uppercase-base.d2
-rw-r--r--gas/testsuite/gas/riscv/march-fail-uppercase-x.d3
-rw-r--r--gas/testsuite/gas/riscv/march-fail-uppercase.l2
4 files changed, 11 insertions, 2 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 6ab777e..2a2b593 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,5 +1,11 @@
2020-12-01 Nelson Chu <nelson.chu@sifive.com>
+ * testsuite/gas/riscv/march-fail-uppercase-base.d: Updated.
+ * testsuite/gas/riscv/march-fail-uppercase.l: Updated.
+ * testsuite/gas/riscv/march-fail-uppercase-x.d: New testcase.
+
+2020-12-01 Nelson Chu <nelson.chu@sifive.com>
+
(These are new testcases that cover more cases)
* testsuite/gas/riscv/march-fail-base-01.d: The first extension must
be e, i or g.
diff --git a/gas/testsuite/gas/riscv/march-fail-uppercase-base.d b/gas/testsuite/gas/riscv/march-fail-uppercase-base.d
index 74b55ea..8b59585 100644
--- a/gas/testsuite/gas/riscv/march-fail-uppercase-base.d
+++ b/gas/testsuite/gas/riscv/march-fail-uppercase-base.d
@@ -1,3 +1,3 @@
#as: -march=rv32I
#source: empty.s
-#error_output: march-fail-base-01.l
+#error_output: march-fail-uppercase.l
diff --git a/gas/testsuite/gas/riscv/march-fail-uppercase-x.d b/gas/testsuite/gas/riscv/march-fail-uppercase-x.d
new file mode 100644
index 0000000..316351f
--- /dev/null
+++ b/gas/testsuite/gas/riscv/march-fail-uppercase-x.d
@@ -0,0 +1,3 @@
+#as: -march=rv32ic_zicsr_xARGLE
+#source: empty.s
+#error_output: march-fail-uppercase.l
diff --git a/gas/testsuite/gas/riscv/march-fail-uppercase.l b/gas/testsuite/gas/riscv/march-fail-uppercase.l
index 2053135..292c18a 100644
--- a/gas/testsuite/gas/riscv/march-fail-uppercase.l
+++ b/gas/testsuite/gas/riscv/march-fail-uppercase.l
@@ -1,2 +1,2 @@
.*Assembler messages:
-.*Fatal error: .*unknown (standard|z) ISA extension.*
+.*Fatal error: .*ISA string cannot contain uppercase letters