2002-03-15 Chris G. Demetriou <cgd@broadcom.com>
[deliverable/binutils-gdb.git] / opcodes / h8300-dis.c
index 489aa8ccef40a195974fdc180b11db2a11c40731..c521c773fce2fbbefaa83a62dbad859570a62df1 100644 (file)
@@ -1,5 +1,5 @@
 /* Disassemble h8300 instructions.
-   Copyright (C) 1993, 1998, 2000 Free Software Foundation, Inc.
+   Copyright 1993, 1994, 1996, 1998, 2000, 2001 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
@@ -23,6 +23,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 #include "dis-asm.h"
 #include "opintl.h"
 
+static void bfd_h8_disassemble_init PARAMS ((void));
+static unsigned int bfd_h8_disassemble
+  PARAMS ((bfd_vma, disassemble_info *, int));
+
 /* Run through the opcodes and sort them into order to make them easy
    to disassemble.  */
 static void
@@ -58,7 +62,7 @@ bfd_h8_disassemble_init ()
     }
 }
 
-unsigned int
+static unsigned int
 bfd_h8_disassemble (addr, info, mode)
      bfd_vma addr;
      disassemble_info *info;
@@ -87,7 +91,7 @@ bfd_h8_disassemble (addr, info, mode)
   int bit = 0;
   int plen = 0;
   static boolean init = 0;
-  struct h8_opcode *q = h8_opcodes;
+  struct h8_opcode *q;
   char CONST **pregnames = mode != 0 ? lregnames : wregnames;
   int status;
   int l;
@@ -112,13 +116,11 @@ bfd_h8_disassemble (addr, info, mode)
     status = info->read_memory_func (addr + l, data + l, 2, info);
 
   /* Find the exact opcode/arg combo.  */
-  while (q->name)
+  for (q = h8_opcodes; q->name; q++)
     {
-      op_type *nib;
+      op_type *nib = q->data.nib;
       unsigned int len = 0;
 
-      nib = q->data.nib;
-
       while (1)
        {
          op_type looking_for = *nib;
@@ -398,7 +400,7 @@ bfd_h8_disassemble (addr, info, mode)
        }
 
     fail:
-      q++;
+      ;
     }
 
   /* Fell off the end.  */
This page took 0.024946 seconds and 4 git commands to generate.