Print registers not saved in the frame as "<not saved>" instead of "<optimized out>".
[deliverable/binutils-gdb.git] / opcodes / sh64-dis.c
index 0227ab6e17132ca5f08519b0a10bd70a146af342..1480a3dfe835ebc3a9b9aac2f4094893b8d0857f 100644 (file)
@@ -1,24 +1,27 @@
 /* Disassemble SH64 instructions.
-   Copyright 2000, 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
+   Copyright 2000, 2001, 2002, 2003, 2005, 2007, 2012
+   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.  */
+   along with this file; see the file COPYING.  If not, write to the
+   Free Software Foundation, 51 Franklin Street - Fifth Floor, Boston,
+   MA 02110-1301, USA.  */
 
+#include "sysdep.h"
 #include <stdio.h>
-
 #include "dis-asm.h"
-#include "sysdep.h"
 #include "sh64-opc.h"
 #include "libiberty.h"
 /* We need to refer to the ELF header structure.  */
@@ -192,8 +195,6 @@ print_insn_shmedia (bfd_vma memaddr, struct disassemble_info *info)
      can get as .byte:s.  */
   if (status != 0)
     {
-      int i;
-
       for (i = 0; i < 3; i++)
        {
          status = info->read_memory_func (memaddr + i, insn, 1, info);
@@ -224,7 +225,7 @@ print_insn_shmedia (bfd_vma memaddr, struct disassemble_info *info)
   /* FIXME: We should also check register number constraints.  */
   if (op->name == NULL)
     {
-      fprintf_fn (stream, ".long 0x%08x", instruction);
+      fprintf_fn (stream, ".long 0x%08lx", instruction);
       return 4;
     }
 
@@ -312,7 +313,7 @@ print_insn_shmedia (bfd_vma memaddr, struct disassemble_info *info)
          imm = temp & 0x3f;
          if (imm & (unsigned long) 0x20)
            imm |= ~(unsigned long) 0x3f;
-         fprintf_fn (stream, "%d", imm);
+         fprintf_fn (stream, "%ld", imm);
          break;
 
          /* A signed 6-bit number, multiplied by 32 when used.  */
@@ -320,7 +321,7 @@ print_insn_shmedia (bfd_vma memaddr, struct disassemble_info *info)
          imm = temp & 0x3f;
          if (imm & (unsigned long) 0x20)
            imm |= ~(unsigned long) 0x3f;
-         fprintf_fn (stream, "%d", imm * 32);
+         fprintf_fn (stream, "%ld", imm * 32);
          break;
 
          /* A signed 10-bit number, multiplied by 8 when used.  */
@@ -345,7 +346,7 @@ print_insn_shmedia (bfd_vma memaddr, struct disassemble_info *info)
          if (imm & (unsigned long) 0x200)
            imm |= ~(unsigned long) 0x3ff;
          imm <<= by_number;
-         fprintf_fn (stream, "%d", imm);
+         fprintf_fn (stream, "%ld", imm);
          break;
 
          /* A signed 16-bit number.  */
@@ -353,7 +354,7 @@ print_insn_shmedia (bfd_vma memaddr, struct disassemble_info *info)
          imm = temp & 0xffff;
          if (imm & (unsigned long) 0x8000)
            imm |= ~((unsigned long) 0xffff);
-         fprintf_fn (stream, "%d", imm);
+         fprintf_fn (stream, "%ld", imm);
          break;
 
          /* A PC-relative signed 16-bit number, multiplied by 4 when
@@ -370,19 +371,19 @@ print_insn_shmedia (bfd_vma memaddr, struct disassemble_info *info)
          /* An unsigned 5-bit number.  */
        case A_IMMU5:
          imm = temp & 0x1f;
-         fprintf_fn (stream, "%d", imm);
+         fprintf_fn (stream, "%ld", imm);
          break;
 
          /* An unsigned 6-bit number.  */
        case A_IMMU6:
          imm = temp & 0x3f;
-         fprintf_fn (stream, "%d", imm);
+         fprintf_fn (stream, "%ld", imm);
          break;
 
          /* An unsigned 16-bit number.  */
        case A_IMMU16:
          imm = temp & 0xffff;
-         fprintf_fn (stream, "%d", imm);
+         fprintf_fn (stream, "%ld", imm);
          break;
 
        default:
This page took 0.026237 seconds and 4 git commands to generate.