Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(550)

Unified Diff: opcodes/sparc-dis.c

Issue 124383005: GDB 7.6.50 (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@upstream
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « opcodes/sh-dis.c ('k') | opcodes/sparc-opc.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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. */
« no previous file with comments | « opcodes/sh-dis.c ('k') | opcodes/sparc-opc.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698