Fix compile time warnings about comparisons always being false.
[deliverable/binutils-gdb.git] / opcodes / m10300-dis.c
index 158490edea325cfbbd6add0761a09208aaac0bf8..2362518b6234df018c5ee404ab0542399468ecc3 100644 (file)
@@ -1,27 +1,27 @@
 /* Disassemble MN10300 instructions.
-   Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2005
-   Free Software Foundation, Inc.
+   Copyright (C) 1996-2020 Free Software Foundation, Inc.
 
-   This program is free software; you can redistribute it and/or modify
+   This file is part of the GNU opcodes library.
+
+   This library is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
-   (at your option) any later version.
+   the Free Software Foundation; either version 3, or (at your option)
+   any later version.
 
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   It is distributed in the hope that it will be useful, but WITHOUT
+   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+   or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
+   License for more details.
 
    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
    MA 02110-1301, USA.  */
 
-#include <stdio.h>
-
 #include "sysdep.h"
+#include <stdio.h>
 #include "opcode/mn10300.h"
-#include "dis-asm.h"
+#include "disassemble.h"
 #include "opintl.h"
 
 #define HAVE_AM33_2 (info->mach == AM33_2)
@@ -449,7 +449,7 @@ disassemble (bfd_vma memaddr,
                  value = ((insn >> (operand->shift + extra_shift))
                           & ((1 << operand->bits) - 1));
                  if (value == 0)
-                   (*info->fprintf_func) (info->stream, "sp", value);
+                   (*info->fprintf_func) (info->stream, "sp");
                  else
                    (*info->fprintf_func) (info->stream, "xr%d", (int) value);
                }
@@ -577,7 +577,7 @@ disassemble (bfd_vma memaddr,
 
   if (!match)
     /* xgettext:c-format */
-    (*info->fprintf_func) (info->stream, _("unknown\t0x%04x"), insn);
+    (*info->fprintf_func) (info->stream, _("unknown\t0x%04lx"), insn);
 }
 
 int
This page took 0.024679 seconds and 4 git commands to generate.