This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[PATCH] gas: improve architecture mismatch diagnostics in sparc
- From: jose dot marchesi at oracle dot com (Jose E. Marchesi)
- To: binutils at sourceware dot org
- Date: Mon, 12 Sep 2016 10:38:49 +0200
- Subject: [PATCH] gas: improve architecture mismatch diagnostics in sparc
- Authentication-results: sourceware.org; auth=none
gas: improve architecture mismatch diagnostics in sparc
Merely dumping the mnemonic name in "architecture mismatch" errors may
not provide enough information to determine what went wrong, as the same
mnemonic can be used for different variants of an instruction pertaining
to different architecture levels.
This little patch makes the assembler to include the instruction
arguments in the error message.
Tested in sparc-linux-gnu and sparc64-linux-gnu targets.
Ok for master?
gas/ChangeLog:
2016-09-12 Jose E. Marchesi <jose.marchesi@oracle.com>
* config/tc-sparc.c (sparc_ip): Print the instruction arguments
in "architecture mismatch" error messages.
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 11de10f..4c17cf7 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,8 @@
+2016-09-12 Jose E. Marchesi <jose.marchesi@oracle.com>
+
+ * config/tc-sparc.c (sparc_ip): Print the instruction arguments
+ in "architecture mismatch" error messages.
+
2016-08-31 Alan Modra <amodra@gmail.com>
* config/tc-ppc.c (md_assemble): Set sh_flags for VLE. Test
diff --git a/gas/config/tc-sparc.c b/gas/config/tc-sparc.c
index fb3e9fe..41f2fb3 100644
--- a/gas/config/tc-sparc.c
+++ b/gas/config/tc-sparc.c
@@ -3190,7 +3190,7 @@ sparc_ip (char *str, const struct sparc_opcode **pinsn)
++arch;
}
- as_bad (_("Architecture mismatch on \"%s\"."), str);
+ as_bad (_("Architecture mismatch on \"%s %s\"."), str, argsStart);
as_tsktsk (_(" (Requires %s; requested architecture is %s.)"),
required_archs,
sparc_opcode_archs[max_architecture].name);