This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH][SPARC] gas,opcodes: fix hardware capabilities bumping in the sparc assembler.
Hi Alan.
On Tue, Nov 22, 2016 at 01:54:33PM +0100, Jose E. Marchesi wrote:
> > * testsuite/gas/sparc/hwcaps-bump.s: New file.
> > * testsuite/gas/sparc/hwcaps-bump.l: Likewise.
> > * testsuite/gas/sparc/sparc.exp (gas_64_check): Run tests in
> > hwcaps-bump.
Fails on binutils configured for sparc-linux.
Executing on host: sh -c {../as-new -bump
/home/alan/src/binutils-gdb/gas/testsuite/gas/sparc/hwcaps-bump.s
2>&1} /dev/null dump.out (timeout = 300)
spawn [open ...]
/home/alan/src/binutils-gdb/gas/testsuite/gas/sparc/hwcaps-bump.s: Assembler messages:
/home/alan/src/binutils-gdb/gas/testsuite/gas/sparc/hwcaps-bump.s:4:
Error: Architecture mismatch on "wr %g1,%g2,%mcdper".
/home/alan/src/binutils-gdb/gas/testsuite/gas/sparc/hwcaps-bump.s:4:
(Requires v9m; requested architecture is sparclite.)
/home/alan/src/binutils-gdb/gas/testsuite/gas/sparc/hwcaps-bump.s:5:
Error: Architecture mismatch on "wr %g2,0x3,%mwait".
/home/alan/src/binutils-gdb/gas/testsuite/gas/sparc/hwcaps-bump.s:5:
(Requires v9m; requested architecture is sparclite.)
regexp_diff match failure
regexp "^.*hwcaps-bump.s:4: Warning: architecture bumped from "v6" to "v9m" on "wr"$"
line
"/home/alan/src/binutils-gdb/gas/testsuite/gas/sparc/hwcaps-bump.s:4:
Error: Architecture mismatch on "wr %g1,%g2,%mcdper"."
extra lines in dump.out starting with
"^/home/alan/src/binutils-gdb/gas/testsuite/gas/sparc/hwcaps-bump.s:4:
(Requires v9m; requested architecture is sparclite.)$"
EOF from /home/alan/src/binutils-gdb/gas/testsuite/gas/sparc/hwcaps-bump.l
FAIL: sparc hwcaps-bump
Ugh, that is because the gas_64_check procedure includes 32-bit sparc
assemblers with support with 64 bits, but these assemblers still default
to a 32-bit sparc architecture (v6 by default).
I applied the obvious patch below to make sure the test is run with
64-bit objects.
That fixes the testsuite in sparc-linux-gnu targets.
Thanks!
commit 128e85e3ab36b8e30f6612fb50de3cbb4ede6824
Author: Jose E. Marchesi <jose.marchesi@oracle.com>
Date: Wed Nov 23 03:04:17 2016 -0800
gas: run the hwcaps-bump tests with 64-bit sparc objects only.
gas/ChangeLog:
2016-11-23 Jose E. Marchesi <jose.marchesi@oracle.com>
* testsuite/gas/sparc/sparc.exp (gas_64_check): Make sure the
hwcaps-bump test is run with 64-bit objects.
diff --git a/gas/ChangeLog b/gas/ChangeLog
index fc50a3e..2715fcb 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,8 @@
+2016-11-23 Jose E. Marchesi <jose.marchesi@oracle.com>
+
+ * testsuite/gas/sparc/sparc.exp (gas_64_check): Make sure the
+ hwcaps-bump test is run with 64-bit objects.
+
2016-11-23 Kuan-Lin Chen <kuanlinchentw@gmail.com>
* config/tc-riscv.c: Add missing break.
diff --git a/gas/testsuite/gas/sparc/sparc.exp b/gas/testsuite/gas/sparc/sparc.exp
index 1dc8125..8311b7c 100644
--- a/gas/testsuite/gas/sparc/sparc.exp
+++ b/gas/testsuite/gas/sparc/sparc.exp
@@ -90,7 +90,7 @@ if [istarget sparc*-*-*] {
run_dump_test "pcrel64"
run_dump_test "plt64"
run_dump_test "gotop64"
- run_list_test "hwcaps-bump" "-bump"
+ run_list_test "hwcaps-bump" "-64 -bump"
}
run_dump_test "synth"