[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [COMMIT 9262f38] Remove PARAMS() macro

From: Anthony Liguori
Subject: [Qemu-commits] [COMMIT 9262f38] Remove PARAMS() macro
Date: Fri, 25 Sep 2009 19:59:44 -0000

From: Juan Quintela <address@hidden>

Only two disassemblers (alpha and sh4) were still using it. Just remove its
use there, and its aparations in dis-asm.h

Signed-off-by: Juan Quintela <address@hidden>
Signed-off-by: Blue Swirl <address@hidden>

diff --git a/alpha-dis.c b/alpha-dis.c
index 8e362a1..970da5b 100644
--- a/alpha-dis.c
+++ b/alpha-dis.c
@@ -108,8 +108,8 @@ struct alpha_operand
      string (the operand will be inserted in any case).  If the
      operand value is legal, *ERRMSG will be unchanged (most operands
      can accept any value).  */
-  unsigned (*insert) PARAMS ((unsigned instruction, int op,
-                             const char **errmsg));
+  unsigned (*insert) (unsigned instruction, int op,
+                      const char **errmsg);
   /* Extraction function.  This is used by the disassembler.  To
      extract this operand type from an instruction, check this field.
@@ -128,7 +128,7 @@ struct alpha_operand
      non-zero if this operand type can not actually be extracted from
      this operand (i.e., the instruction does not match).  If the
      operand is valid, *INVALID will not be changed.  */
-  int (*extract) PARAMS ((unsigned instruction, int *invalid));
+  int (*extract) (unsigned instruction, int *invalid);
 /* Elements in the table are retrieved by indexing with values from
@@ -273,23 +273,23 @@ enum bfd_reloc_code_real {
 /* Local insertion and extraction functions */
-static unsigned insert_rba PARAMS((unsigned, int, const char **));
-static unsigned insert_rca PARAMS((unsigned, int, const char **));
-static unsigned insert_za PARAMS((unsigned, int, const char **));
-static unsigned insert_zb PARAMS((unsigned, int, const char **));
-static unsigned insert_zc PARAMS((unsigned, int, const char **));
-static unsigned insert_bdisp PARAMS((unsigned, int, const char **));
-static unsigned insert_jhint PARAMS((unsigned, int, const char **));
-static unsigned insert_ev6hwjhint PARAMS((unsigned, int, const char **));
-static int extract_rba PARAMS((unsigned, int *));
-static int extract_rca PARAMS((unsigned, int *));
-static int extract_za PARAMS((unsigned, int *));
-static int extract_zb PARAMS((unsigned, int *));
-static int extract_zc PARAMS((unsigned, int *));
-static int extract_bdisp PARAMS((unsigned, int *));
-static int extract_jhint PARAMS((unsigned, int *));
-static int extract_ev6hwjhint PARAMS((unsigned, int *));
+static unsigned insert_rba (unsigned, int, const char **);
+static unsigned insert_rca (unsigned, int, const char **);
+static unsigned insert_za (unsigned, int, const char **);
+static unsigned insert_zb (unsigned, int, const char **);
+static unsigned insert_zc (unsigned, int, const char **);
+static unsigned insert_bdisp (unsigned, int, const char **);
+static unsigned insert_jhint (unsigned, int, const char **);
+static unsigned insert_ev6hwjhint (unsigned, int, const char **);
+static int extract_rba (unsigned, int *);
+static int extract_rca (unsigned, int *);
+static int extract_za (unsigned, int *);
+static int extract_zb (unsigned, int *);
+static int extract_zc (unsigned, int *);
+static int extract_bdisp (unsigned, int *);
+static int extract_jhint (unsigned, int *);
+static int extract_ev6hwjhint (unsigned, int *);
 /* The operands table  */
diff --git a/dis-asm.h b/dis-asm.h
index 251c490..1d8f4bd 100644
--- a/dis-asm.h
+++ b/dis-asm.h
@@ -14,7 +14,6 @@
 #include <string.h>
 #include <inttypes.h>
-#define PARAMS(x) x
 typedef void *PTR;
 typedef uint64_t bfd_vma;
 typedef int64_t bfd_signed_vma;
@@ -234,7 +233,7 @@ typedef struct symbol_cache_entry
     } udata;
 } asymbol;
-typedef int (*fprintf_ftype) PARAMS((FILE*, const char*, ...));
+typedef int (*fprintf_ftype) (FILE*, const char*, ...);
 enum dis_insn_type {
   dis_noninsn,                 /* Not a valid instruction */
@@ -296,19 +295,19 @@ typedef struct disassemble_info {
      INFO is a pointer to this struct.
      Returns an errno value or 0 for success.  */
   int (*read_memory_func)
-    PARAMS ((bfd_vma memaddr, bfd_byte *myaddr, int length,
-            struct disassemble_info *info));
+    (bfd_vma memaddr, bfd_byte *myaddr, int length,
+            struct disassemble_info *info);
   /* Function which should be called if we get an error that we can't
      recover from.  STATUS is the errno value from read_memory_func and
      MEMADDR is the address that we were trying to read.  INFO is a
      pointer to this struct.  */
   void (*memory_error_func)
-    PARAMS ((int status, bfd_vma memaddr, struct disassemble_info *info));
+    (int status, bfd_vma memaddr, struct disassemble_info *info);
   /* Function called to print ADDR.  */
   void (*print_address_func)
-    PARAMS ((bfd_vma addr, struct disassemble_info *info));
+    (bfd_vma addr, struct disassemble_info *info);
   /* Function called to determine if there is a symbol at the given ADDR.
      If there is, the function returns 1, otherwise it returns 0.
@@ -318,7 +317,7 @@ typedef struct disassemble_info {
      address, (normally because there is a symbol associated with
      that address), but sometimes we want to mask out the overlay bits.  */
   int (* symbol_at_address_func)
-    PARAMS ((bfd_vma addr, struct disassemble_info * info));
+    (bfd_vma addr, struct disassemble_info * info);
   /* These are for buffer_read_memory.  */
   bfd_byte *buffer;
@@ -363,49 +362,48 @@ typedef struct disassemble_info {
 /* Standard disassemblers.  Disassemble one instruction at the given
    target address.  Return number of bytes processed.  */
-typedef int (*disassembler_ftype)
-     PARAMS((bfd_vma, disassemble_info *));
-extern int print_insn_big_mips         PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_little_mips      PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_i386             PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_m68k             PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_z8001            PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_z8002            PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_h8300            PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_h8300h           PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_h8300s           PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_h8500            PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_alpha            PARAMS ((bfd_vma, disassemble_info*));
-extern disassembler_ftype arc_get_disassembler PARAMS ((int, int));
-extern int print_insn_arm              PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_sparc            PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_big_a29k         PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_little_a29k      PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_i960             PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_sh               PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_shl              PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_hppa             PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_m32r             PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_m88k             PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_mn10200          PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_mn10300          PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_ns32k            PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_big_powerpc      PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_little_powerpc   PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_rs6000           PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_w65              PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_d10v             PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_v850             PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_tic30            PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_ppc              PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_s390             PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_crisv32           PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_microblaze        PARAMS ((bfd_vma, disassemble_info*));
+typedef int (*disassembler_ftype) (bfd_vma, disassemble_info *);
+extern int print_insn_big_mips         (bfd_vma, disassemble_info*);
+extern int print_insn_little_mips      (bfd_vma, disassemble_info*);
+extern int print_insn_i386             (bfd_vma, disassemble_info*);
+extern int print_insn_m68k             (bfd_vma, disassemble_info*);
+extern int print_insn_z8001            (bfd_vma, disassemble_info*);
+extern int print_insn_z8002            (bfd_vma, disassemble_info*);
+extern int print_insn_h8300            (bfd_vma, disassemble_info*);
+extern int print_insn_h8300h           (bfd_vma, disassemble_info*);
+extern int print_insn_h8300s           (bfd_vma, disassemble_info*);
+extern int print_insn_h8500            (bfd_vma, disassemble_info*);
+extern int print_insn_alpha            (bfd_vma, disassemble_info*);
+extern disassembler_ftype arc_get_disassembler (int, int);
+extern int print_insn_arm              (bfd_vma, disassemble_info*);
+extern int print_insn_sparc            (bfd_vma, disassemble_info*);
+extern int print_insn_big_a29k         (bfd_vma, disassemble_info*);
+extern int print_insn_little_a29k      (bfd_vma, disassemble_info*);
+extern int print_insn_i960             (bfd_vma, disassemble_info*);
+extern int print_insn_sh               (bfd_vma, disassemble_info*);
+extern int print_insn_shl              (bfd_vma, disassemble_info*);
+extern int print_insn_hppa             (bfd_vma, disassemble_info*);
+extern int print_insn_m32r             (bfd_vma, disassemble_info*);
+extern int print_insn_m88k             (bfd_vma, disassemble_info*);
+extern int print_insn_mn10200          (bfd_vma, disassemble_info*);
+extern int print_insn_mn10300          (bfd_vma, disassemble_info*);
+extern int print_insn_ns32k            (bfd_vma, disassemble_info*);
+extern int print_insn_big_powerpc      (bfd_vma, disassemble_info*);
+extern int print_insn_little_powerpc   (bfd_vma, disassemble_info*);
+extern int print_insn_rs6000           (bfd_vma, disassemble_info*);
+extern int print_insn_w65              (bfd_vma, disassemble_info*);
+extern int print_insn_d10v             (bfd_vma, disassemble_info*);
+extern int print_insn_v850             (bfd_vma, disassemble_info*);
+extern int print_insn_tic30            (bfd_vma, disassemble_info*);
+extern int print_insn_ppc              (bfd_vma, disassemble_info*);
+extern int print_insn_s390             (bfd_vma, disassemble_info*);
+extern int print_insn_crisv32           (bfd_vma, disassemble_info*);
+extern int print_insn_microblaze        (bfd_vma, disassemble_info*);
 #if 0
 /* Fetch the disassembler for a given BFD, if that support is available.  */
-extern disassembler_ftype disassembler PARAMS ((bfd *));
+extern disassembler_ftype disassembler (bfd *);
@@ -415,22 +413,20 @@ extern disassembler_ftype disassembler    PARAMS ((bfd 
 /* Here is a function which callers may wish to use for read_memory_func.
    It gets bytes from a buffer.  */
 extern int buffer_read_memory
-  PARAMS ((bfd_vma, bfd_byte *, int, struct disassemble_info *));
+  (bfd_vma, bfd_byte *, int, struct disassemble_info *);
 /* This function goes with buffer_read_memory.
    It prints a message using info->fprintf_func and info->stream.  */
-extern void perror_memory PARAMS ((int, bfd_vma, struct disassemble_info *));
+extern void perror_memory (int, bfd_vma, struct disassemble_info *);
 /* Just print the address in hex.  This is included for completeness even
    though both GDB and objdump provide their own (to print symbolic
    addresses).  */
-extern void generic_print_address
-  PARAMS ((bfd_vma, struct disassemble_info *));
+extern void generic_print_address (bfd_vma, struct disassemble_info *);
 /* Always true.  */
-extern int generic_symbol_at_address
-  PARAMS ((bfd_vma, struct disassemble_info *));
+extern int generic_symbol_at_address (bfd_vma, struct disassemble_info *);
 /* Macro to initialize a disassemble_info struct.  This should be called
    by all applications creating such a struct.  */
diff --git a/sh4-dis.c b/sh4-dis.c
index a9ed5b2..a502a61 100644
--- a/sh4-dis.c
+++ b/sh4-dis.c
@@ -1164,10 +1164,10 @@ const sh_opcode_info sh_table[] =
 static void print_movxy
-  PARAMS ((const sh_opcode_info *, int, int, fprintf_ftype, void *));
-static void print_insn_ddt PARAMS ((int, struct disassemble_info *));
-static void print_dsp_reg PARAMS ((int, fprintf_ftype, void *));
-static void print_insn_ppi PARAMS ((int, struct disassemble_info *));
+  (const sh_opcode_info *, int, int, fprintf_ftype, void *);
+static void print_insn_ddt (int, struct disassemble_info *);
+static void print_dsp_reg (int, fprintf_ftype, void *);
+static void print_insn_ppi (int, struct disassemble_info *);
 static void
 print_movxy (const sh_opcode_info *op, int rn, int rm,

reply via email to

[Prev in Thread] Current Thread [Next in Thread]