gas: improve architecture mismatch diagnostics in sparc
authorJose E. Marchesi <jose.marchesi@oracle.com>
Wed, 14 Sep 2016 14:15:24 +0000 (07:15 -0700)
committerJose E. Marchesi <jose.marchesi@oracle.com>
Wed, 14 Sep 2016 14:15:24 +0000 (07:15 -0700)
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.

gas/ChangeLog:

2016-09-14  Jose E. Marchesi  <jose.marchesi@oracle.com>

* config/tc-sparc.c (sparc_ip): Print the instruction arguments
in "architecture mismatch" error messages.

gas/ChangeLog
gas/config/tc-sparc.c

index 7ee260e35e7edf2f2355747683e5db22f729f5cc..cde5c661ef32e9f2baac3985015a6e718ed155eb 100644 (file)
@@ -1,3 +1,8 @@
+2016-09-14  Jose E. Marchesi  <jose.marchesi@oracle.com>
+
+       * config/tc-sparc.c (sparc_ip): Print the instruction arguments
+       in "architecture mismatch" error messages.
+
 2016-09-14  Jose E. Marchesi  <jose.marchesi@oracle.com>
 
        * config/tc-sparc.c (md_assemble): Detect and warning on
index 2fb3c5ac9e800f7213ba556e8e61fbbdd6d8dd8d..70f5bfb4dd404470ad42cf26ca689808199a7664 100644 (file)
@@ -3224,7 +3224,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);
This page took 0.028774 seconds and 4 git commands to generate.