aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorDavid Edelsohn <dje.gcc@gmail.com>1996-02-26 18:38:33 +0000
committerDavid Edelsohn <dje.gcc@gmail.com>1996-02-26 18:38:33 +0000
commit110b814dbaff397a671fef550ef432a0e0921623 (patch)
treec372e01f971e87c7f467fae0d2161d4c51532c4f /gas
parentd2d7e896d50d22aef792d1f12a4a8d4db5acd0eb (diff)
downloadgdb-110b814dbaff397a671fef550ef432a0e0921623.zip
gdb-110b814dbaff397a671fef550ef432a0e0921623.tar.gz
gdb-110b814dbaff397a671fef550ef432a0e0921623.tar.bz2
* config/tc-sparc.c (sparc_ip): Print all architectures that support
the insn on mismatch.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog5
-rw-r--r--gas/config/tc-sparc.c30
2 files changed, 30 insertions, 5 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 77c1dc0..cdec488 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,8 @@
+Mon Feb 26 10:34:10 1996 Doug Evans <dje@charmed.cygnus.com>
+
+ * config/tc-sparc.c (sparc_ip): Print all architectures that support
+ the insn on mismatch.
+
Fri Feb 23 21:44:39 1996 Rob Savoye <rob@chinadoll.cygnus.com>
* configure.in: Add support for a29-coff.
diff --git a/gas/config/tc-sparc.c b/gas/config/tc-sparc.c
index ad8248b..1c241e6 100644
--- a/gas/config/tc-sparc.c
+++ b/gas/config/tc-sparc.c
@@ -1828,16 +1828,36 @@ sparc_ip (str)
current_architecture = needed_architecture;
}
/* Conflict. */
+ /* ??? This seems to be a bit fragile. What if the next entry in
+ the opcode table is the one we want and it is supported?
+ It is possible to arrange the table today so that this can't
+ happen but what about tomorrow? */
else
{
- enum sparc_opcode_arch_val needed_architecture =
- sparc_ffs (~ SPARC_OPCODE_SUPPORTED (max_architecture)
- & needed_arch_mask);
+ int arch,printed_one_p = 0;
+ char *p;
+ char required_archs[SPARC_OPCODE_ARCH_MAX * 16];
+
+ /* Create a list of the architectures that support the insn. */
+ needed_arch_mask &= ~ SPARC_OPCODE_SUPPORTED (max_architecture);
+ p = required_archs;
+ arch = sparc_ffs (needed_arch_mask);
+ while ((1 << arch) <= needed_arch_mask)
+ {
+ if ((1 << arch) & needed_arch_mask)
+ {
+ if (printed_one_p)
+ *p++ = '|';
+ strcpy (p, sparc_opcode_archs[arch].name);
+ p += strlen (p);
+ printed_one_p = 1;
+ }
+ ++arch;
+ }
- assert (needed_architecture <= SPARC_OPCODE_ARCH_MAX);
as_bad ("Architecture mismatch on \"%s\".", str);
as_tsktsk (" (Requires %s; requested architecture is %s.)",
- sparc_opcode_archs[needed_architecture].name,
+ required_archs,
sparc_opcode_archs[max_architecture].name);
return;
}