public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Tsukasa OI <research_trasio@irq.a4lg.com>
To: Tsukasa OI <research_trasio@irq.a4lg.com>
Cc: binutils@sourceware.org
Subject: [PATCH 3/3] RISC-V: Tests for ISA string handling (underscore)
Date: Wed, 23 Feb 2022 10:47:24 +0900	[thread overview]
Message-ID: <7b3a77e49171179151df91ba8ccaa0b58023090c.1645580829.git.research_trasio@irq.a4lg.com> (raw)
In-Reply-To: <cover.1645580829.git.research_trasio@irq.a4lg.com>

This commit adds invalid ISA string tests containing double underscores
or trailing underscore.

gas/ChangeLog:

	* testsuite/gas/riscv/march-fail-underscore-double-01.d: New
	test for invalid ISA string with double underscores.
	* testsuite/gas/riscv/march-fail-underscore-double-02.d: Likewise.
	* testsuite/gas/riscv/march-fail-underscore-double-03.d: Likewise.
	* testsuite/gas/riscv/march-fail-underscore-double-04.d: Likewise.
	* testsuite/gas/riscv/march-fail-underscore-double-05.d: Likewise.
	* testsuite/gas/riscv/march-fail-underscore-double-06.d: Likewise.
	* testsuite/gas/riscv/march-fail-underscore-double-07.d: Likewise.
	* testsuite/gas/riscv/march-fail-underscore-double-08.d: Likewise.
	* testsuite/gas/riscv/march-fail-underscore-double.l: Likewise.
	* testsuite/gas/riscv/march-fail-underscore-trailing-01.d: New
	test for invalid ISA string with trailing underscore.
	* testsuite/gas/riscv/march-fail-underscore-trailing-02.d: Likewise.
	* testsuite/gas/riscv/march-fail-underscore-trailing-03.d: Likewise.
	* testsuite/gas/riscv/march-fail-underscore-trailing-04.d: Likewise.
	* testsuite/gas/riscv/march-fail-underscore-trailing.l: Likewise.
---
 gas/testsuite/gas/riscv/march-fail-underscore-double-01.d   | 3 +++
 gas/testsuite/gas/riscv/march-fail-underscore-double-02.d   | 3 +++
 gas/testsuite/gas/riscv/march-fail-underscore-double-03.d   | 3 +++
 gas/testsuite/gas/riscv/march-fail-underscore-double-04.d   | 3 +++
 gas/testsuite/gas/riscv/march-fail-underscore-double-05.d   | 3 +++
 gas/testsuite/gas/riscv/march-fail-underscore-double-06.d   | 3 +++
 gas/testsuite/gas/riscv/march-fail-underscore-double-07.d   | 3 +++
 gas/testsuite/gas/riscv/march-fail-underscore-double-08.d   | 3 +++
 gas/testsuite/gas/riscv/march-fail-underscore-double.l      | 2 ++
 gas/testsuite/gas/riscv/march-fail-underscore-trailing-01.d | 3 +++
 gas/testsuite/gas/riscv/march-fail-underscore-trailing-02.d | 3 +++
 gas/testsuite/gas/riscv/march-fail-underscore-trailing-03.d | 3 +++
 gas/testsuite/gas/riscv/march-fail-underscore-trailing-04.d | 3 +++
 gas/testsuite/gas/riscv/march-fail-underscore-trailing.l    | 2 ++
 14 files changed, 40 insertions(+)
 create mode 100644 gas/testsuite/gas/riscv/march-fail-underscore-double-01.d
 create mode 100644 gas/testsuite/gas/riscv/march-fail-underscore-double-02.d
 create mode 100644 gas/testsuite/gas/riscv/march-fail-underscore-double-03.d
 create mode 100644 gas/testsuite/gas/riscv/march-fail-underscore-double-04.d
 create mode 100644 gas/testsuite/gas/riscv/march-fail-underscore-double-05.d
 create mode 100644 gas/testsuite/gas/riscv/march-fail-underscore-double-06.d
 create mode 100644 gas/testsuite/gas/riscv/march-fail-underscore-double-07.d
 create mode 100644 gas/testsuite/gas/riscv/march-fail-underscore-double-08.d
 create mode 100644 gas/testsuite/gas/riscv/march-fail-underscore-double.l
 create mode 100644 gas/testsuite/gas/riscv/march-fail-underscore-trailing-01.d
 create mode 100644 gas/testsuite/gas/riscv/march-fail-underscore-trailing-02.d
 create mode 100644 gas/testsuite/gas/riscv/march-fail-underscore-trailing-03.d
 create mode 100644 gas/testsuite/gas/riscv/march-fail-underscore-trailing-04.d
 create mode 100644 gas/testsuite/gas/riscv/march-fail-underscore-trailing.l

diff --git a/gas/testsuite/gas/riscv/march-fail-underscore-double-01.d b/gas/testsuite/gas/riscv/march-fail-underscore-double-01.d
new file mode 100644
index 00000000000..bc63926d405
--- /dev/null
+++ b/gas/testsuite/gas/riscv/march-fail-underscore-double-01.d
@@ -0,0 +1,3 @@
+#as: -march=rv32i__m
+#source: empty.s
+#error_output: march-fail-underscore-double.l
diff --git a/gas/testsuite/gas/riscv/march-fail-underscore-double-02.d b/gas/testsuite/gas/riscv/march-fail-underscore-double-02.d
new file mode 100644
index 00000000000..c1fab59ac8f
--- /dev/null
+++ b/gas/testsuite/gas/riscv/march-fail-underscore-double-02.d
@@ -0,0 +1,3 @@
+#as: -march=rv32im__zicsr
+#source: empty.s
+#error_output: march-fail-underscore-double.l
diff --git a/gas/testsuite/gas/riscv/march-fail-underscore-double-03.d b/gas/testsuite/gas/riscv/march-fail-underscore-double-03.d
new file mode 100644
index 00000000000..903d5667192
--- /dev/null
+++ b/gas/testsuite/gas/riscv/march-fail-underscore-double-03.d
@@ -0,0 +1,3 @@
+#as: -march=rv32im2__zicsr
+#source: empty.s
+#error_output: march-fail-underscore-double.l
diff --git a/gas/testsuite/gas/riscv/march-fail-underscore-double-04.d b/gas/testsuite/gas/riscv/march-fail-underscore-double-04.d
new file mode 100644
index 00000000000..4e77d313cf3
--- /dev/null
+++ b/gas/testsuite/gas/riscv/march-fail-underscore-double-04.d
@@ -0,0 +1,3 @@
+#as: -march=rv32im2p0__zicsr
+#source: empty.s
+#error_output: march-fail-underscore-double.l
diff --git a/gas/testsuite/gas/riscv/march-fail-underscore-double-05.d b/gas/testsuite/gas/riscv/march-fail-underscore-double-05.d
new file mode 100644
index 00000000000..b85750e68fa
--- /dev/null
+++ b/gas/testsuite/gas/riscv/march-fail-underscore-double-05.d
@@ -0,0 +1,3 @@
+#as: -march=rv32ima_zicsr__zifencei
+#source: empty.s
+#error_output: march-fail-underscore-double.l
diff --git a/gas/testsuite/gas/riscv/march-fail-underscore-double-06.d b/gas/testsuite/gas/riscv/march-fail-underscore-double-06.d
new file mode 100644
index 00000000000..be532aa34b8
--- /dev/null
+++ b/gas/testsuite/gas/riscv/march-fail-underscore-double-06.d
@@ -0,0 +1,3 @@
+#as: -march=rv32ima_zicsr2__zifencei
+#source: empty.s
+#error_output: march-fail-underscore-double.l
diff --git a/gas/testsuite/gas/riscv/march-fail-underscore-double-07.d b/gas/testsuite/gas/riscv/march-fail-underscore-double-07.d
new file mode 100644
index 00000000000..6f7223a7eef
--- /dev/null
+++ b/gas/testsuite/gas/riscv/march-fail-underscore-double-07.d
@@ -0,0 +1,3 @@
+#as: -march=rv32ima_zicsr2p0__zifencei
+#source: empty.s
+#error_output: march-fail-underscore-double.l
diff --git a/gas/testsuite/gas/riscv/march-fail-underscore-double-08.d b/gas/testsuite/gas/riscv/march-fail-underscore-double-08.d
new file mode 100644
index 00000000000..75e3f07be52
--- /dev/null
+++ b/gas/testsuite/gas/riscv/march-fail-underscore-double-08.d
@@ -0,0 +1,3 @@
+#as: -march=rv32imazicsr__zifencei
+#source: empty.s
+#error_output: march-fail-underscore-double.l
diff --git a/gas/testsuite/gas/riscv/march-fail-underscore-double.l b/gas/testsuite/gas/riscv/march-fail-underscore-double.l
new file mode 100644
index 00000000000..aa20f34f4a6
--- /dev/null
+++ b/gas/testsuite/gas/riscv/march-fail-underscore-double.l
@@ -0,0 +1,2 @@
+.*Assembler messages:
+.*Error: .*: double underscores
diff --git a/gas/testsuite/gas/riscv/march-fail-underscore-trailing-01.d b/gas/testsuite/gas/riscv/march-fail-underscore-trailing-01.d
new file mode 100644
index 00000000000..d5b5b0a65d9
--- /dev/null
+++ b/gas/testsuite/gas/riscv/march-fail-underscore-trailing-01.d
@@ -0,0 +1,3 @@
+#as: -march=rv32ima_
+#source: empty.s
+#error_output: march-fail-underscore-trailing.l
diff --git a/gas/testsuite/gas/riscv/march-fail-underscore-trailing-02.d b/gas/testsuite/gas/riscv/march-fail-underscore-trailing-02.d
new file mode 100644
index 00000000000..a0bd12b8335
--- /dev/null
+++ b/gas/testsuite/gas/riscv/march-fail-underscore-trailing-02.d
@@ -0,0 +1,3 @@
+#as: -march=rv32ima_zicsr_
+#source: empty.s
+#error_output: march-fail-underscore-trailing.l
diff --git a/gas/testsuite/gas/riscv/march-fail-underscore-trailing-03.d b/gas/testsuite/gas/riscv/march-fail-underscore-trailing-03.d
new file mode 100644
index 00000000000..7c0f99e4b04
--- /dev/null
+++ b/gas/testsuite/gas/riscv/march-fail-underscore-trailing-03.d
@@ -0,0 +1,3 @@
+#as: -march=rv32ima_zicsr2_
+#source: empty.s
+#error_output: march-fail-underscore-trailing.l
diff --git a/gas/testsuite/gas/riscv/march-fail-underscore-trailing-04.d b/gas/testsuite/gas/riscv/march-fail-underscore-trailing-04.d
new file mode 100644
index 00000000000..c5a1242e9dc
--- /dev/null
+++ b/gas/testsuite/gas/riscv/march-fail-underscore-trailing-04.d
@@ -0,0 +1,3 @@
+#as: -march=rv32ima_zicsr2p0_
+#source: empty.s
+#error_output: march-fail-underscore-trailing.l
diff --git a/gas/testsuite/gas/riscv/march-fail-underscore-trailing.l b/gas/testsuite/gas/riscv/march-fail-underscore-trailing.l
new file mode 100644
index 00000000000..7f9ea0e3c88
--- /dev/null
+++ b/gas/testsuite/gas/riscv/march-fail-underscore-trailing.l
@@ -0,0 +1,2 @@
+.*Assembler messages:
+.*Error: .*: trailing underscore
-- 
2.32.0


      parent reply	other threads:[~2022-02-23  1:47 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-23  1:47 [PATCH 0/3] RISC-V: Make ISA parser stricter (with code clarity improvement) Tsukasa OI
2022-02-23  1:47 ` [PATCH 1/3] RISC-V: Remove a loop in the ISA parser Tsukasa OI
2022-02-25  9:10   ` Nelson Chu
2022-02-23  1:47 ` [PATCH 2/3] RISC-V: Stricter underscore handling for ISA Tsukasa OI
2022-02-25  9:22   ` Nelson Chu
2022-02-25  9:37     ` Kito Cheng
2022-02-25 11:26       ` Andrew Waterman
2022-02-23  1:47 ` Tsukasa OI [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7b3a77e49171179151df91ba8ccaa0b58023090c.1645580829.git.research_trasio@irq.a4lg.com \
    --to=research_trasio@irq.a4lg.com \
    --cc=binutils@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).