* cris-dis.c (format_hex): Remove ineffective warning fix.
[deliverable/binutils-gdb.git] / opcodes / a29k-dis.c
index 72959c975d99d9aa528108b26cae40b0a2d7837d..a3090c3e21b0d0e10a539dc6cadcbe80b15a14a4 100644 (file)
@@ -1,5 +1,6 @@
 /* Instruction printing code for the AMD 29000
 /* Instruction printing code for the AMD 29000
-   Copyright (C) 1990, 93, 94, 95, 1998 Free Software Foundation, Inc.
+   Copyright 1990, 1993, 1994, 1995, 1998, 2000, 2001, 2002
+   Free Software Foundation, Inc.
    Contributed by Cygnus Support.  Written by Jim Kingdon.
 
 This file is part of GDB.
    Contributed by Cygnus Support.  Written by Jim Kingdon.
 
 This file is part of GDB.
@@ -18,9 +19,22 @@ 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.  */
 
 along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 
+#include "sysdep.h"
 #include "dis-asm.h"
 #include "opcode/a29k.h"
 
 #include "dis-asm.h"
 #include "opcode/a29k.h"
 
+static void print_general PARAMS ((int, struct disassemble_info *));
+static void print_special PARAMS ((unsigned int, struct disassemble_info *));
+static int is_delayed_branch PARAMS ((int));
+static void find_bytes_little
+  PARAMS ((char *, unsigned char *, unsigned char *, unsigned char *,
+          unsigned char *));
+static void find_bytes_big
+  PARAMS ((char *, unsigned char *, unsigned char *, unsigned char *,
+          unsigned char *));
+static int print_insn PARAMS ((bfd_vma, struct disassemble_info *));
+
+
 /* Print a symbolic representation of a general-purpose
    register number NUM on STREAM.
    NUM is a number as found in the instruction, not as found in
 /* Print a symbolic representation of a general-purpose
    register number NUM on STREAM.
    NUM is a number as found in the instruction, not as found in
@@ -37,7 +51,7 @@ print_general (num, info)
 }
 
 /* Like print_general but a special-purpose register.
 }
 
 /* Like print_general but a special-purpose register.
-   
+
    The mnemonics used by the AMD assembler are not quite the same
    as the ones in the User's Manual.  We use the ones that the
    assembler uses.  */
    The mnemonics used by the AMD assembler are not quite the same
    as the ones in the User's Manual.  We use the ones that the
    assembler uses.  */
@@ -139,7 +153,7 @@ print_insn (memaddr, info)
 
   find_byte_func_type find_byte_func = (find_byte_func_type)info->private_data;
 
 
   find_byte_func_type find_byte_func = (find_byte_func_type)info->private_data;
 
-  struct a29k_opcode CONST * opcode;
+  struct a29k_opcode const * opcode;
 
   {
     int status =
 
   {
     int status =
@@ -169,7 +183,7 @@ print_insn (memaddr, info)
       if (((unsigned long) insn24 << 24) == opcode->opcode)
        {
          char *s;
       if (((unsigned long) insn24 << 24) == opcode->opcode)
        {
          char *s;
-         
+
          (*info->fprintf_func) (info->stream, "%s ", opcode->name);
          for (s = opcode->args; *s != '\0'; ++s)
            {
          (*info->fprintf_func) (info->stream, "%s ", opcode->name);
          for (s = opcode->args; *s != '\0'; ++s)
            {
@@ -178,7 +192,7 @@ print_insn (memaddr, info)
                case 'a':
                  print_general (insn8, info);
                  break;
                case 'a':
                  print_general (insn8, info);
                  break;
-                 
+
                case 'b':
                  print_general (insn0, info);
                  break;
                case 'b':
                  print_general (insn0, info);
                  break;
@@ -279,7 +293,7 @@ print_insn (memaddr, info)
              int errcode;
              char prev_insn[4];
              unsigned char prev_insn0, prev_insn8, prev_insn16, prev_insn24;
              int errcode;
              char prev_insn[4];
              unsigned char prev_insn0, prev_insn8, prev_insn16, prev_insn24;
-             
+
              errcode = (*info->read_memory_func) (memaddr - 4,
                                                   (bfd_byte *) &prev_insn[0],
                                                   4,
              errcode = (*info->read_memory_func) (memaddr - 4,
                                                   (bfd_byte *) &prev_insn[0],
                                                   4,
@@ -289,7 +303,7 @@ print_insn (memaddr, info)
                  /* If it is a delayed branch, we need to look at the
                     instruction before the delayed brach to handle
                     things like
                  /* If it is a delayed branch, we need to look at the
                     instruction before the delayed brach to handle
                     things like
-                    
+
                     const _foo
                     call _printf
                     consth _foo
                     const _foo
                     call _printf
                     consth _foo
@@ -304,7 +318,7 @@ print_insn (memaddr, info)
                                         &prev_insn16, &prev_insn24);
                    }
                }
                                         &prev_insn16, &prev_insn24);
                    }
                }
-                 
+
              /* If there was a problem reading memory, then assume
                 the previous instruction was not const.  */
              if (errcode == 0)
              /* If there was a problem reading memory, then assume
                 the previous instruction was not const.  */
              if (errcode == 0)
This page took 0.027264 seconds and 4 git commands to generate.