aboutsummaryrefslogtreecommitdiff
path: root/gdb/sparc-pinsn.c
diff options
context:
space:
mode:
authorStu Grossman <grossman@cygnus>1992-01-30 03:01:00 +0000
committerStu Grossman <grossman@cygnus>1992-01-30 03:01:00 +0000
commit0515163751bed58f8c5023b56362ccfb1dfbe555 (patch)
treed9d896fe5096eb31204ddae4b015c5d20026adac /gdb/sparc-pinsn.c
parent60048a2cee08756a001419952a804a4249dc9c9f (diff)
downloadgdb-0515163751bed58f8c5023b56362ccfb1dfbe555.zip
gdb-0515163751bed58f8c5023b56362ccfb1dfbe555.tar.gz
gdb-0515163751bed58f8c5023b56362ccfb1dfbe555.tar.bz2
* sparc-pinsn.c (compare_opcodes): Make it prefer v6, v7,
cypress, v8 mnemonics in that order.
Diffstat (limited to 'gdb/sparc-pinsn.c')
-rw-r--r--gdb/sparc-pinsn.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/gdb/sparc-pinsn.c b/gdb/sparc-pinsn.c
index 3fddb13..e303393 100644
--- a/gdb/sparc-pinsn.c
+++ b/gdb/sparc-pinsn.c
@@ -438,12 +438,19 @@ compare_opcodes (a, b)
better have the same opcode. This is a sanity check on the table. */
i = strcmp (op0->name, op1->name);
if (i)
+ {
+ /* *** FIXME - There must be a better way to deal with this! */
+ /* We prefer names used in the earliest architecture */
+ if (op0->architecture != op1->architecture)
+ return op0->architecture - op1->architecture;
+
if (op0->flags & F_ALIAS) /* If they're both aliases, be arbitrary. */
- return i;
+ return i;
else
- fprintf (stderr,
- "Internal error: bad sparc-opcode.h: \"%s\" == \"%s\"\n",
- op0->name, op1->name);
+ fprintf (stderr,
+ "Internal error: bad sparc-opcode.h: \"%s\" == \"%s\"\n",
+ op0->name, op1->name);
+ }
/* Fewer arguments are preferred. */
{