| Index: opcodes/sparc-dis.c
|
| diff --git a/opcodes/sparc-dis.c b/opcodes/sparc-dis.c
|
| index 73f01d3f44ec05078e829bdd5e0035331c610422..197126cf0649d2199d0e85792fce79f2e464ae2d 100644
|
| --- a/opcodes/sparc-dis.c
|
| +++ b/opcodes/sparc-dis.c
|
| @@ -223,7 +223,8 @@ compute_arch_mask (unsigned long mach)
|
| {
|
| case 0 :
|
| case bfd_mach_sparc :
|
| - return SPARC_OPCODE_ARCH_MASK (SPARC_OPCODE_ARCH_V8);
|
| + return (SPARC_OPCODE_ARCH_MASK (SPARC_OPCODE_ARCH_V8)
|
| + | SPARC_OPCODE_ARCH_MASK (SPARC_OPCODE_ARCH_LEON));
|
| case bfd_mach_sparc_sparclet :
|
| return SPARC_OPCODE_ARCH_MASK (SPARC_OPCODE_ARCH_SPARCLET);
|
| case bfd_mach_sparc_sparclite :
|
| @@ -338,8 +339,17 @@ compare_opcodes (const void * a, const void * b)
|
| i = strcmp (op0->name, op1->name);
|
| if (i)
|
| {
|
| - if (op0->flags & F_ALIAS) /* If they're both aliases, be arbitrary. */
|
| - return i;
|
| + if (op0->flags & F_ALIAS)
|
| + {
|
| + if (op0->flags & F_PREFERRED)
|
| + return -1;
|
| + if (op1->flags & F_PREFERRED)
|
| + return 1;
|
| +
|
| + /* If they're both aliases, and neither is marked as preferred,
|
| + be arbitrary. */
|
| + return i;
|
| + }
|
| else
|
| fprintf (stderr,
|
| /* xgettext:c-format */
|
| @@ -550,7 +560,7 @@ print_insn_sparc (bfd_vma memaddr, disassemble_info *info)
|
| /* Can't do simple format if source and dest are different. */
|
| continue;
|
|
|
| - (*info->fprintf_func) (stream, opcode->name);
|
| + (*info->fprintf_func) (stream, "%s", opcode->name);
|
|
|
| {
|
| const char *s;
|
| @@ -704,7 +714,7 @@ print_insn_sparc (bfd_vma memaddr, disassemble_info *info)
|
| break;
|
|
|
| case ')': /* 5 bit unsigned immediate from RS3. */
|
| - (info->fprintf_func) (stream, "%#x", X_RS3 (insn));
|
| + (info->fprintf_func) (stream, "%#x", (unsigned int) X_RS3 (insn));
|
| break;
|
|
|
| case 'X': /* 5 bit unsigned immediate. */
|
|
|