* config/tc-xtensa.c (insn_labels, free_insn_labels, saved_insn_labels,
[deliverable/binutils-gdb.git] / opcodes / ip2k-dis.c
index 91aaa618ba44fc262ec9909b27e3f2114b33b30c..00e764ccceddbac07e86656b2357cfbd9dce2bd4 100644 (file)
@@ -4,7 +4,8 @@
 THIS FILE IS MACHINE GENERATED WITH CGEN.
 - the resultant file is machine generated, cgen-dis.in isn't
 
-Copyright 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
+Free Software Foundation, Inc.
 
 This file is part of the GNU Binutils and GDB, the GNU debugger.
 
@@ -31,6 +32,7 @@ along with this program; if not, write to the Free Software Foundation, Inc.,
 #include "dis-asm.h"
 #include "bfd.h"
 #include "symcat.h"
+#include "libiberty.h"
 #include "ip2k-desc.h"
 #include "ip2k-opc.h"
 #include "opintl.h"
@@ -39,34 +41,46 @@ along with this program; if not, write to the Free Software Foundation, Inc.,
 #define UNKNOWN_INSN_MSG _("*unknown*")
 
 static void print_normal
-     PARAMS ((CGEN_CPU_DESC, PTR, long, unsigned int, bfd_vma, int));
+  (CGEN_CPU_DESC, void *, long, unsigned int, bfd_vma, int);
 static void print_address
-     PARAMS ((CGEN_CPU_DESC, PTR, bfd_vma, unsigned int, bfd_vma, int));
+  (CGEN_CPU_DESC, void *, bfd_vma, unsigned int, bfd_vma, int);
 static void print_keyword
-     PARAMS ((CGEN_CPU_DESC, PTR, CGEN_KEYWORD *, long, unsigned int));
+  (CGEN_CPU_DESC, void *, CGEN_KEYWORD *, long, unsigned int);
 static void print_insn_normal
-     PARAMS ((CGEN_CPU_DESC, PTR, const CGEN_INSN *, CGEN_FIELDS *,
-             bfd_vma, int));
+  (CGEN_CPU_DESC, void *, const CGEN_INSN *, CGEN_FIELDS *, bfd_vma, int);
 static int print_insn
-     PARAMS ((CGEN_CPU_DESC, bfd_vma,  disassemble_info *, char *, unsigned));
+  (CGEN_CPU_DESC, bfd_vma,  disassemble_info *, char *, unsigned);
 static int default_print_insn
-     PARAMS ((CGEN_CPU_DESC, bfd_vma, disassemble_info *));
+  (CGEN_CPU_DESC, bfd_vma, disassemble_info *);
 static int read_insn
-     PARAMS ((CGEN_CPU_DESC, bfd_vma, disassemble_info *, char *, int,
-             CGEN_EXTRACT_INFO *, unsigned long *));
+  (CGEN_CPU_DESC, bfd_vma, disassemble_info *, char *, int, CGEN_EXTRACT_INFO *,
+   unsigned long *);
 \f
 /* -- disassembler routines inserted here */
 
 /* -- dis.c */
 
+#define PRINT_FUNC_DECL(name) \
+static void name PARAMS ((CGEN_CPU_DESC, PTR, long, unsigned int, bfd_vma, int))
+
+PRINT_FUNC_DECL (print_fr);
+PRINT_FUNC_DECL (print_dollarhex);
+PRINT_FUNC_DECL (print_dollarhex8);
+PRINT_FUNC_DECL (print_dollarhex16);
+PRINT_FUNC_DECL (print_dollarhex_addr16h);
+PRINT_FUNC_DECL (print_dollarhex_addr16l);
+PRINT_FUNC_DECL (print_dollarhex_p);
+PRINT_FUNC_DECL (print_dollarhex_cj);
+PRINT_FUNC_DECL (print_decimal);
+
 static void
 print_fr (cd, dis_info, value, attrs, pc, length)
-     CGEN_CPU_DESC cd;
+     CGEN_CPU_DESC cd ATTRIBUTE_UNUSED;
      PTR dis_info;
      long value;
-     unsigned int attrs;
-     bfd_vma pc;
-     int length;
+     unsigned int attrs ATTRIBUTE_UNUSED;
+     bfd_vma pc ATTRIBUTE_UNUSED;
+     int length ATTRIBUTE_UNUSED;
 {
   disassemble_info *info = (disassemble_info *) dis_info;
   const CGEN_KEYWORD_ENTRY *ke;
@@ -75,33 +89,33 @@ print_fr (cd, dis_info, value, attrs, pc, length)
   long offsetvalue;
 
   if ( value == 0 ) /* This is (IP) */
-  {
+    {
       (*info->fprintf_func) (info->stream, "%s", "(IP)");
       return;
-  }
+    }
 
   offsettest = value >> 7;
   offsetvalue = value & 0x7F;
 
   /* Check to see if first two bits are 10 -> (DP) */
   if ( offsettest == 2 )
-  {
+    {
       if ( offsetvalue == 0 )
-         (*info->fprintf_func) (info->stream, "%s","(DP)");
+       (*info->fprintf_func) (info->stream, "%s","(DP)");
       else
-         (*info->fprintf_func) (info->stream, "$%x%s",offsetvalue, "(DP)");
+       (*info->fprintf_func) (info->stream, "$%x%s",offsetvalue, "(DP)");
       return;
-  }
+    }
 
   /* Check to see if first two bits are 11 -> (SP) */
   if ( offsettest == 3 )
-  {
+    {
       if ( offsetvalue == 0 )
-         (*info->fprintf_func) (info->stream, "%s", "(SP)");
+       (*info->fprintf_func) (info->stream, "%s", "(SP)");
       else
-         (*info->fprintf_func) (info->stream, "$%x%s", offsetvalue,"(SP)");
+       (*info->fprintf_func) (info->stream, "$%x%s", offsetvalue,"(SP)");
       return;
-  }
+    }
 
   /* Attempt to print as a register keyword. */
   ke = cgen_keyword_lookup_value (& ip2k_cgen_opval_register_names, value);
@@ -117,12 +131,12 @@ print_fr (cd, dis_info, value, attrs, pc, length)
 
 static void
 print_dollarhex (cd, dis_info, value, attrs, pc, length)
-     CGEN_CPU_DESC cd;
+     CGEN_CPU_DESC cd ATTRIBUTE_UNUSED;
      PTR dis_info;
      long value;
-     unsigned int attrs;
-     bfd_vma pc;
-     int length;
+     unsigned int attrs ATTRIBUTE_UNUSED;
+     bfd_vma pc ATTRIBUTE_UNUSED;
+     int length ATTRIBUTE_UNUSED;
 {
   disassemble_info *info = (disassemble_info *) dis_info;
 
@@ -131,12 +145,12 @@ print_dollarhex (cd, dis_info, value, attrs, pc, length)
 
 static void
 print_dollarhex8 (cd, dis_info, value, attrs, pc, length)
-     CGEN_CPU_DESC cd;
+     CGEN_CPU_DESC cd ATTRIBUTE_UNUSED;
      PTR dis_info;
      long value;
-     unsigned int attrs;
-     bfd_vma pc;
-     int length;
+     unsigned int attrs ATTRIBUTE_UNUSED;
+     bfd_vma pc ATTRIBUTE_UNUSED;
+     int length ATTRIBUTE_UNUSED;
 {
   disassemble_info *info = (disassemble_info *) dis_info;
 
@@ -145,12 +159,12 @@ print_dollarhex8 (cd, dis_info, value, attrs, pc, length)
 
 static void
 print_dollarhex16 (cd, dis_info, value, attrs, pc, length)
-     CGEN_CPU_DESC cd;
+     CGEN_CPU_DESC cd ATTRIBUTE_UNUSED;
      PTR dis_info;
      long value;
-     unsigned int attrs;
-     bfd_vma pc;
-     int length;
+     unsigned int attrs ATTRIBUTE_UNUSED;
+     bfd_vma pc ATTRIBUTE_UNUSED;
+     int length ATTRIBUTE_UNUSED;
 {
   disassemble_info *info = (disassemble_info *) dis_info;
 
@@ -159,12 +173,12 @@ print_dollarhex16 (cd, dis_info, value, attrs, pc, length)
 
 static void
 print_dollarhex_addr16h (cd, dis_info, value, attrs, pc, length)
-     CGEN_CPU_DESC cd;
+     CGEN_CPU_DESC cd ATTRIBUTE_UNUSED;
      PTR dis_info;
      long value;
-     unsigned int attrs;
-     bfd_vma pc;
-     int length;
+     unsigned int attrs ATTRIBUTE_UNUSED;
+     bfd_vma pc ATTRIBUTE_UNUSED;
+     int length ATTRIBUTE_UNUSED;
 {
   disassemble_info *info = (disassemble_info *) dis_info;
 
@@ -177,12 +191,12 @@ print_dollarhex_addr16h (cd, dis_info, value, attrs, pc, length)
 
 static void
 print_dollarhex_addr16l (cd, dis_info, value, attrs, pc, length)
-     CGEN_CPU_DESC cd;
+     CGEN_CPU_DESC cd ATTRIBUTE_UNUSED;
      PTR dis_info;
      long value;
-     unsigned int attrs;
-     bfd_vma pc;
-     int length;
+     unsigned int attrs ATTRIBUTE_UNUSED;
+     bfd_vma pc ATTRIBUTE_UNUSED;
+     int length ATTRIBUTE_UNUSED;
 {
   disassemble_info *info = (disassemble_info *) dis_info;
 
@@ -191,12 +205,12 @@ print_dollarhex_addr16l (cd, dis_info, value, attrs, pc, length)
 
 static void
 print_dollarhex_p (cd, dis_info, value, attrs, pc, length)
-     CGEN_CPU_DESC cd;
+     CGEN_CPU_DESC cd ATTRIBUTE_UNUSED;
      PTR dis_info;
      long value;
-     unsigned int attrs;
-     bfd_vma pc;
-     int length;
+     unsigned int attrs ATTRIBUTE_UNUSED;
+     bfd_vma pc ATTRIBUTE_UNUSED;
+     int length ATTRIBUTE_UNUSED;
 {
   disassemble_info *info = (disassemble_info *) dis_info;
 
@@ -207,12 +221,12 @@ print_dollarhex_p (cd, dis_info, value, attrs, pc, length)
 
 static void
 print_dollarhex_cj (cd, dis_info, value, attrs, pc, length)
-     CGEN_CPU_DESC cd;
+     CGEN_CPU_DESC cd ATTRIBUTE_UNUSED;
      PTR dis_info;
      long value;
-     unsigned int attrs;
-     bfd_vma pc;
-     int length;
+     unsigned int attrs ATTRIBUTE_UNUSED;
+     bfd_vma pc ATTRIBUTE_UNUSED;
+     int length ATTRIBUTE_UNUSED;
 {
   disassemble_info *info = (disassemble_info *) dis_info;
 
@@ -223,12 +237,12 @@ print_dollarhex_cj (cd, dis_info, value, attrs, pc, length)
 
 static void
 print_decimal (cd, dis_info, value, attrs, pc, length)
-     CGEN_CPU_DESC cd;
+     CGEN_CPU_DESC cd ATTRIBUTE_UNUSED;
      PTR dis_info;
      long value;
-     unsigned int attrs;
-     bfd_vma pc;
-     int length;
+     unsigned int attrs ATTRIBUTE_UNUSED;
+     bfd_vma pc ATTRIBUTE_UNUSED;
+     int length ATTRIBUTE_UNUSED;
 {
   disassemble_info *info = (disassemble_info *) dis_info;
 
@@ -337,13 +351,12 @@ ip2k_cgen_init_dis (cd)
 /* Default print handler.  */
 
 static void
-print_normal (cd, dis_info, value, attrs, pc, length)
-     CGEN_CPU_DESC cd ATTRIBUTE_UNUSED;
-     PTR dis_info;
-     long value;
-     unsigned int attrs;
-     bfd_vma pc ATTRIBUTE_UNUSED;
-     int length ATTRIBUTE_UNUSED;
+print_normal (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
+             void *dis_info,
+             long value,
+             unsigned int attrs,
+             bfd_vma pc ATTRIBUTE_UNUSED,
+             int length ATTRIBUTE_UNUSED)
 {
   disassemble_info *info = (disassemble_info *) dis_info;
 
@@ -363,13 +376,12 @@ print_normal (cd, dis_info, value, attrs, pc, length)
 /* Default address handler.  */
 
 static void
-print_address (cd, dis_info, value, attrs, pc, length)
-     CGEN_CPU_DESC cd ATTRIBUTE_UNUSED;
-     PTR dis_info;
-     bfd_vma value;
-     unsigned int attrs;
-     bfd_vma pc ATTRIBUTE_UNUSED;
-     int length ATTRIBUTE_UNUSED;
+print_address (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
+              void *dis_info,
+              bfd_vma value,
+              unsigned int attrs,
+              bfd_vma pc ATTRIBUTE_UNUSED,
+              int length ATTRIBUTE_UNUSED)
 {
   disassemble_info *info = (disassemble_info *) dis_info;
 
@@ -393,12 +405,11 @@ print_address (cd, dis_info, value, attrs, pc, length)
 /* Keyword print handler.  */
 
 static void
-print_keyword (cd, dis_info, keyword_table, value, attrs)
-     CGEN_CPU_DESC cd ATTRIBUTE_UNUSED;
-     PTR dis_info;
-     CGEN_KEYWORD *keyword_table;
-     long value;
-     unsigned int attrs ATTRIBUTE_UNUSED;
+print_keyword (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
+              void *dis_info,
+              CGEN_KEYWORD *keyword_table,
+              long value,
+              unsigned int attrs ATTRIBUTE_UNUSED)
 {
   disassemble_info *info = (disassemble_info *) dis_info;
   const CGEN_KEYWORD_ENTRY *ke;
@@ -412,17 +423,16 @@ print_keyword (cd, dis_info, keyword_table, value, attrs)
 \f
 /* Default insn printer.
 
-   DIS_INFO is defined as `PTR' so the disassembler needn't know anything
+   DIS_INFO is defined as `void *' so the disassembler needn't know anything
    about disassemble_info.  */
 
 static void
-print_insn_normal (cd, dis_info, insn, fields, pc, length)
-     CGEN_CPU_DESC cd;
-     PTR dis_info;
-     const CGEN_INSN *insn;
-     CGEN_FIELDS *fields;
-     bfd_vma pc;
-     int length;
+print_insn_normal (CGEN_CPU_DESC cd,
+                  void *dis_info,
+                  const CGEN_INSN *insn,
+                  CGEN_FIELDS *fields,
+                  bfd_vma pc,
+                  int length)
 {
   const CGEN_SYNTAX *syntax = CGEN_INSN_SYNTAX (insn);
   disassemble_info *info = (disassemble_info *) dis_info;
@@ -454,14 +464,13 @@ print_insn_normal (cd, dis_info, insn, fields, pc, length)
    Returns 0 if all is well, non-zero otherwise.  */
 
 static int
-read_insn (cd, pc, info, buf, buflen, ex_info, insn_value)
-     CGEN_CPU_DESC cd ATTRIBUTE_UNUSED;
-     bfd_vma pc;
-     disassemble_info *info;
-     char *buf;
-     int buflen;
-     CGEN_EXTRACT_INFO *ex_info;
-     unsigned long *insn_value;
+read_insn (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
+          bfd_vma pc,
+          disassemble_info *info,
+          char *buf,
+          int buflen,
+          CGEN_EXTRACT_INFO *ex_info,
+          unsigned long *insn_value)
 {
   int status = (*info->read_memory_func) (pc, buf, buflen, info);
   if (status != 0)
@@ -485,12 +494,11 @@ read_insn (cd, pc, info, buf, buflen, ex_info, insn_value)
    been called).  */
 
 static int
-print_insn (cd, pc, info, buf, buflen)
-     CGEN_CPU_DESC cd;
-     bfd_vma pc;
-     disassemble_info *info;
-     char *buf;
-     unsigned int buflen;
+print_insn (CGEN_CPU_DESC cd,
+           bfd_vma pc,
+           disassemble_info *info,
+           char *buf,
+           unsigned int buflen)
 {
   CGEN_INSN_INT insn_value;
   const CGEN_INSN_LIST *insn_list;
@@ -595,10 +603,7 @@ print_insn (cd, pc, info, buf, buflen)
 #endif
 
 static int
-default_print_insn (cd, pc, info)
-     CGEN_CPU_DESC cd;
-     bfd_vma pc;
-     disassemble_info *info;
+default_print_insn (CGEN_CPU_DESC cd, bfd_vma pc, disassemble_info *info)
 {
   char buf[CGEN_MAX_INSN_SIZE];
   int buflen;
@@ -637,9 +642,7 @@ typedef struct cpu_desc_list {
 } cpu_desc_list;
 
 int
-print_insn_ip2k (pc, info)
-     bfd_vma pc;
-     disassemble_info *info;
+print_insn_ip2k (bfd_vma pc, disassemble_info *info)
 {
   static cpu_desc_list *cd_list = 0;
   cpu_desc_list *cl = 0;
This page took 0.02997 seconds and 4 git commands to generate.