From: Tsukasa OI Date: Tue, 27 Dec 2022 03:14:02 +0000 (+0000) Subject: RISC-V: Make T-Head testing pattern more generic X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f9280e396f171759018b0537e3ceeddce204f2bd;p=binutils-gdb.git 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. --- diff --git a/gas/testsuite/gas/riscv/x-thead-ba-fail.l b/gas/testsuite/gas/riscv/x-thead-ba-fail.l index 4bb12e7f642..bfafe4590e5 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 dd4a0df664e..cde1c22ad25 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 c8a7ff4e7f1..200218480c8 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 33cddac856e..4d40f66f399 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 c6bd25c0268..44ca58bbf2c 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 32d98f47501..be396555904 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\)