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.
.*: Assembler messages:
-.*: Error: improper immediate value \(18446744073709551615\)
+.*: Error: improper immediate value \(-?\d+\)
.*: Error: improper immediate value \(4\)
.*: 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'
.*: Assembler messages:
-.*: Error: improper immediate value \(18446744073709551615\)
+.*: Error: improper immediate value \(-?\d+\)
.*: Error: improper immediate value \(64\)
.*: 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\)
.*: 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\)
.*: 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\)