aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorTsukasa OI <research_trasio@irq.a4lg.com>2022-12-27 03:14:02 +0000
committerTsukasa OI <research_trasio@irq.a4lg.com>2023-08-15 06:46:18 +0000
commitf9280e396f171759018b0537e3ceeddce204f2bd (patch)
treed5ddcb77f3af0b193f62e2d4f6c77e4318aa2fbe /gas
parent239af8cbd15cd9ef11e333f9889834665066e4b3 (diff)
downloadfsf-binutils-gdb-f9280e396f171759018b0537e3ceeddce204f2bd.zip
fsf-binutils-gdb-f9280e396f171759018b0537e3ceeddce204f2bd.tar.gz
fsf-binutils-gdb-f9280e396f171759018b0537e3ceeddce204f2bd.tar.bz2
RISC-V: Make T-Head testing pattern more generic
On some T-Head vendor extensions, we test against the constant 18446744073709551615 (2**64-1) to detect invalid immediate errors on -1. However, it heavily depends on the fact that the value used to print immediate value is a 64-bit unsigned type and this constant is not (and should not be) important (we just want to know that -1 is not valid). This commit replaces all such occurrences of 18446744073709551615 with a more generic regular expression. gas/ChangeLog: * testsuite/gas/riscv/x-thead-ba-fail.l: Replace 18446744073709551615 with generic regular expression. * testsuite/gas/riscv/x-thead-bb-fail.l: Likewise. * testsuite/gas/riscv/x-thead-bs-fail.l: Likewise. * testsuite/gas/riscv/x-thead-fmemidx-fail.l: Likewise. * testsuite/gas/riscv/x-thead-memidx-fail.l: Likewise. * testsuite/gas/riscv/x-thead-mempair-fail.l: Likewise.
Diffstat (limited to 'gas')
-rw-r--r--gas/testsuite/gas/riscv/x-thead-ba-fail.l2
-rw-r--r--gas/testsuite/gas/riscv/x-thead-bb-fail.l4
-rw-r--r--gas/testsuite/gas/riscv/x-thead-bs-fail.l2
-rw-r--r--gas/testsuite/gas/riscv/x-thead-fmemidx-fail.l16
-rw-r--r--gas/testsuite/gas/riscv/x-thead-memidx-fail.l6
-rw-r--r--gas/testsuite/gas/riscv/x-thead-mempair-fail.l10
6 files changed, 20 insertions, 20 deletions
diff --git a/gas/testsuite/gas/riscv/x-thead-ba-fail.l b/gas/testsuite/gas/riscv/x-thead-ba-fail.l
index 4bb12e7..bfafe45 100644
--- a/gas/testsuite/gas/riscv/x-thead-ba-fail.l
+++ b/gas/testsuite/gas/riscv/x-thead-ba-fail.l
@@ -1,3 +1,3 @@
.*: Assembler messages:
-.*: Error: improper immediate value \(18446744073709551615\)
+.*: Error: improper immediate value \(-?\d+\)
.*: Error: improper immediate value \(4\)
diff --git a/gas/testsuite/gas/riscv/x-thead-bb-fail.l b/gas/testsuite/gas/riscv/x-thead-bb-fail.l
index dd4a0df..cde1c22 100644
--- a/gas/testsuite/gas/riscv/x-thead-bb-fail.l
+++ b/gas/testsuite/gas/riscv/x-thead-bb-fail.l
@@ -1,7 +1,7 @@
.*: Assembler messages:
-.*: Error: improper immediate value \(18446744073709551615\)
+.*: Error: improper immediate value \(-?\d+\)
.*: Error: improper immediate value \(64\)
-.*: Error: improper immediate value \(18446744073709551615\)
+.*: Error: improper immediate value \(-?\d+\)
.*: Error: improper immediate value \(32\)
.*: Error: illegal operands `th.ext a0,64,62'
.*: Error: illegal operands `th.extu a0,-1,0'
diff --git a/gas/testsuite/gas/riscv/x-thead-bs-fail.l b/gas/testsuite/gas/riscv/x-thead-bs-fail.l
index c8a7ff4..2002184 100644
--- a/gas/testsuite/gas/riscv/x-thead-bs-fail.l
+++ b/gas/testsuite/gas/riscv/x-thead-bs-fail.l
@@ -1,3 +1,3 @@
.*: Assembler messages:
-.*: Error: improper immediate value \(18446744073709551615\)
+.*: Error: improper immediate value \(-?\d+\)
.*: Error: improper immediate value \(64\)
diff --git a/gas/testsuite/gas/riscv/x-thead-fmemidx-fail.l b/gas/testsuite/gas/riscv/x-thead-fmemidx-fail.l
index 33cddac..4d40f66 100644
--- a/gas/testsuite/gas/riscv/x-thead-fmemidx-fail.l
+++ b/gas/testsuite/gas/riscv/x-thead-fmemidx-fail.l
@@ -1,19 +1,19 @@
.*: Assembler messages:
.*: Error: illegal operands `th.flrd a0,a1,a2,0'
-.*: Error: improper immediate value \(18446744073709551615\)
+.*: Error: improper immediate value \(-?\d+\)
.*: Error: improper immediate value \(4\)
-.*: Error: improper immediate value \(18446744073709551615\)
+.*: Error: improper immediate value \(-?\d+\)
.*: Error: improper immediate value \(4\)
-.*: Error: improper immediate value \(18446744073709551615\)
+.*: Error: improper immediate value \(-?\d+\)
.*: Error: improper immediate value \(4\)
-.*: Error: improper immediate value \(18446744073709551615\)
+.*: Error: improper immediate value \(-?\d+\)
.*: Error: improper immediate value \(4\)
-.*: Error: improper immediate value \(18446744073709551615\)
+.*: Error: improper immediate value \(-?\d+\)
.*: Error: improper immediate value \(4\)
-.*: Error: improper immediate value \(18446744073709551615\)
+.*: Error: improper immediate value \(-?\d+\)
.*: Error: improper immediate value \(4\)
-.*: Error: improper immediate value \(18446744073709551615\)
+.*: Error: improper immediate value \(-?\d+\)
.*: Error: improper immediate value \(4\)
-.*: Error: improper immediate value \(18446744073709551615\)
+.*: Error: improper immediate value \(-?\d+\)
.*: Error: improper immediate value \(4\)
diff --git a/gas/testsuite/gas/riscv/x-thead-memidx-fail.l b/gas/testsuite/gas/riscv/x-thead-memidx-fail.l
index c6bd25c..44ca58b 100644
--- a/gas/testsuite/gas/riscv/x-thead-memidx-fail.l
+++ b/gas/testsuite/gas/riscv/x-thead-memidx-fail.l
@@ -1,14 +1,14 @@
.*: Assembler messages:
.*: Error: improper immediate value \(-17\)
-.*: Error: improper immediate value \(18446744073709551615\)
+.*: Error: improper immediate value \(-?\d+\)
.*: Error: improper immediate value \(16\)
.*: Error: improper immediate value \(4\)
.*: Error: illegal operands `th.ldia a0,\(a0\),0,0'
.*: Error: illegal operands `th.ldib a0,\(a0\),0,0'
-.*: Error: improper immediate value \(18446744073709551615\)
+.*: Error: improper immediate value \(-?\d+\)
.*: Error: improper immediate value \(4\)
-.*: Error: improper immediate value \(18446744073709551615\)
+.*: Error: improper immediate value \(-?\d+\)
.*: Error: improper immediate value \(4\)
diff --git a/gas/testsuite/gas/riscv/x-thead-mempair-fail.l b/gas/testsuite/gas/riscv/x-thead-mempair-fail.l
index 32d98f4..be39655 100644
--- a/gas/testsuite/gas/riscv/x-thead-mempair-fail.l
+++ b/gas/testsuite/gas/riscv/x-thead-mempair-fail.l
@@ -5,23 +5,23 @@
.*: Error: illegal operands `th.sdd a0,a1,\(a2\),3'
.*: Error: illegal operands `th.swd a0,a1,\(a2\),0'
-.*: Error: improper immediate value \(18446744073709551615\)
+.*: Error: improper immediate value \(-?\d+\)
.*: Error: improper immediate value \(4\)
.*: Error: unexpected literal \(3\)
-.*: Error: improper immediate value \(18446744073709551615\)
+.*: Error: improper immediate value \(-?\d+\)
.*: Error: improper immediate value \(4\)
.*: Error: unexpected literal \(4\)
-.*: Error: improper immediate value \(18446744073709551615\)
+.*: Error: improper immediate value \(-?\d+\)
.*: Error: improper immediate value \(4\)
.*: Error: unexpected literal \(4\)
-.*: Error: improper immediate value \(18446744073709551615\)
+.*: Error: improper immediate value \(-?\d+\)
.*: Error: improper immediate value \(4\)
.*: Error: unexpected literal \(3\)
-.*: Error: improper immediate value \(18446744073709551615\)
+.*: Error: improper immediate value \(-?\d+\)
.*: Error: improper immediate value \(4\)
.*: Error: unexpected literal \(4\)