gas/testsuite/
[deliverable/binutils-gdb.git] / opcodes / mcore-dis.c
index ba33dd39118f22f127e0037496b0443f9df05adf..ee698ffc4964a5e3123ebe4b9f175989cd90cebe 100644 (file)
@@ -1,19 +1,22 @@
 /* Disassemble Motorola M*Core instructions.
-   Copyright 1993, 1999, 2000, 2002 Free Software Foundation, Inc.
+   Copyright 1993, 1999, 2000, 2001, 2002, 2007 Free Software Foundation, Inc.
 
-This program 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.
+   This file is part of the GNU opcodes library.
 
-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.
+   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 3, or (at your option)
+   any later version.
 
-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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
+   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 "sysdep.h"
 #include <stdio.h>
@@ -198,7 +201,7 @@ print_insn_mcore (memaddr, info)
            if (inst & 0x400)
              val |= 0xFFFFFC00;
 
-           fprintf (stream, "\t0x%x", memaddr + 2 + (val << 1));
+           fprintf (stream, "\t0x%lx", (long)(memaddr + 2 + (val << 1)));
 
            if (strcmp (op->name, "bsr") == 0)
              {
@@ -218,8 +221,8 @@ print_insn_mcore (memaddr, info)
          {
            long val;
            val = (inst & 0x000F);
-           fprintf (stream, "\t%s, 0x%x",
-                    grname[(inst >> 4) & 0xF], memaddr - (val << 1));
+           fprintf (stream, "\t%s, 0x%lx",
+                    grname[(inst >> 4) & 0xF], (long)(memaddr - (val << 1)));
          }
          break;
 
@@ -244,11 +247,11 @@ print_insn_mcore (memaddr, info)
                | (ibytes[2] << 8) | (ibytes[3]);
 
            /* Removed [] around literal value to match ABI syntax 12/95.  */
-           fprintf (stream, "\t%s, 0x%X", grname[(inst >> 8) & 0xF], val);
+           fprintf (stream, "\t%s, 0x%lX", grname[(inst >> 8) & 0xF], val);
 
            if (val == 0)
-             fprintf (stream, "\t// from address pool at 0x%x",
-                      (memaddr + 2 + ((inst & 0xFF) << 2)) & 0xFFFFFFFC);
+             fprintf (stream, "\t// from address pool at 0x%lx",
+                      (long)(memaddr + 2 + ((inst & 0xFF) << 2)) & 0xFFFFFFFC);
          }
          break;
 
@@ -273,7 +276,7 @@ print_insn_mcore (memaddr, info)
                | (ibytes[2] << 8) | (ibytes[3]);
 
            /* Removed [] around literal value to match ABI syntax 12/95.  */
-           fprintf (stream, "\t0x%X", val);
+           fprintf (stream, "\t0x%lX", val);
            /* For jmpi/jsri, we'll try to get a symbol for the target.  */
            if (info->print_address_func && val != 0)
              {
@@ -282,8 +285,8 @@ print_insn_mcore (memaddr, info)
              }
            else
              {
-               fprintf (stream, "\t// from address pool at 0x%x",
-                        (memaddr + 2 + ((inst & 0xFF) << 2)) & 0xFFFFFFFC);
+               fprintf (stream, "\t// from address pool at 0x%lx",
+                        (long)(memaddr + 2 + ((inst & 0xFF) << 2)) & 0xFFFFFFFC);
              }
          }
          break;
This page took 0.024697 seconds and 4 git commands to generate.