]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
PR 10173
authorNick Clifton <nickc@redhat.com>
Mon, 15 Jun 2009 15:24:52 +0000 (15:24 +0000)
committerNick Clifton <nickc@redhat.com>
Mon, 15 Jun 2009 15:24:52 +0000 (15:24 +0000)
        * cr16-dis.c (print_arg): Avoid printing the 0x prefix twice.

opcodes/ChangeLog
opcodes/cr16-dis.c

index 93d5d0205da410aecaf81507e0a899ffdc4bc2dd..5fd7db07162c97d81f0d4bca15d6c6834a0475a5 100644 (file)
@@ -1,3 +1,8 @@
+2009-06-15  Nick Clifton  <nickc@redhat.com>
+
+       PR 10173
+       * cr16-dis.c (print_arg): Avoid printing the 0x prefix twice.
+
 2009-06-15  Nick Clifton  <nickc@redhat.com>
 
        PR 10263
index 2627141d0faef76941bbb6976e6d2a8d1ec41766..3a31d926b95332080c10dd4bbb84c160b5876f7b 100644 (file)
@@ -1,5 +1,5 @@
 /* Disassembler code for CR16.
-   Copyright 2007, 2008 Free Software Foundation, Inc.
+   Copyright 2007, 2008, 2009  Free Software Foundation, Inc.
    Contributed by M R Swami Reddy (MR.Swami.Reddy@nsc.com).
 
    This file is part of GAS, GDB and the GNU binutils.
@@ -678,7 +678,9 @@ print_arg (argument *a, bfd_vma memaddr, struct disassemble_info *info)
       if ((!IS_INSN_TYPE (CSTBIT_INS)) && (!IS_INSN_TYPE (LD_STOR_INS)))
        (sign_flag) ? func (stream, "%s", "*-"): func (stream, "%s","*+");
 
-      func (stream, "%s", "0x");
+      /* PR 10173: Avoid printing the 0x prefix twice.  */
+      if (info->num_symbols > 0)
+       func (stream, "%s", "0x");
       number = ((relative ? memaddr : 0) +
                (sign_flag ? ((- a->constant) & 0xffffffe) : a->constant));