This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Patch]: convert ia64-gen.c functions syntax to ANSI-C


Hi,

some functions of opcodes/ia64-gen.c were sill written using K&R syntax.
This patch fix the syntax of these functions.

There were no changes to ia64-asmtab.c when regenerated.

Tristan.

opcodes/
2009-05-29  Tristan Gingold  <gingold@adacore.com>

	* ia64-gen.c (parse_resource_users, print_dependency_table,
	add_dis_table_ent, finish_distable, insert_bit_table_ent,
	add_dis_entry, compact_distree, gen_dis_table, completer_entries_eq,
	get_prefix_len, compute_completer_bits, insert_opcode_dependencies,
	insert_completer_entry, print_completer_entry, print_completer_table,
	opcodes_eq, add_opcode_entry, shrink): Use ANSI C syntax for functions.

Index: ia64-gen.c
===================================================================
RCS file: /cvs/src/src/opcodes/ia64-gen.c,v
retrieving revision 1.26
diff -c -p -r1.26 ia64-gen.c
*** ia64-gen.c	28 Aug 2008 14:07:49 -0000	1.26
--- ia64-gen.c	29 May 2009 10:30:12 -0000
*************** load_insn_classes (void)
*** 694,704 ****
  
  /* Extract the insn classes from the given line.  */
  static void
! parse_resource_users (ref, usersp, nusersp, notesp)
!   const char *ref;
!   int **usersp;
!   int *nusersp;
!   int **notesp;
  {
    int c;
    char *line = xstrdup (ref);
--- 694,701 ----
  
  /* Extract the insn classes from the given line.  */
  static void
! parse_resource_users (const char *ref, int **usersp, int *nusersp,
!                       int **notesp)
  {
    int c;
    char *line = xstrdup (ref);
*************** lookup_specifier (const char *name)
*** 1504,1510 ****
  }
  
  static void
! print_dependency_table ()
  {
    int i, j;
  
--- 1501,1507 ----
  }
  
  static void
! print_dependency_table (void)
  {
    int i, j;
  
*************** make_bittree_entry (void)
*** 1726,1736 ****
   
  
  static struct disent *
! add_dis_table_ent (which, insn, order, completer_index)
!      struct disent *which;
!      int insn;
!      int order;
!      int completer_index;
  {
    int ci = 0;
    struct disent *ent;
--- 1723,1730 ----
   
  
  static struct disent *
! add_dis_table_ent (struct disent *which, int insn, int order,
!                    int completer_index)
  {
    int ci = 0;
    struct disent *ent;
*************** add_dis_table_ent (which, insn, order, c
*** 1767,1773 ****
  }
  
  static void
! finish_distable ()
  {
    struct disent *ent = disinsntable;
    struct disent *prev = ent;
--- 1761,1767 ----
  }
  
  static void
! finish_distable (void)
  {
    struct disent *ent = disinsntable;
    struct disent *prev = ent;
*************** finish_distable ()
*** 1781,1795 ****
  }
  
  static void
! insert_bit_table_ent (curr_ent, bit, opcode, mask, 
!                       opcodenum, order, completer_index)
!      struct bittree *curr_ent;
!      int bit;
!      ia64_insn opcode; 
!      ia64_insn mask;
!      int opcodenum;
!      int order;
!      int completer_index;
  {
    ia64_insn m;
    int b;
--- 1775,1783 ----
  }
  
  static void
! insert_bit_table_ent (struct bittree *curr_ent, int bit, ia64_insn opcode,
!                       ia64_insn mask, int opcodenum, int order,
!                       int completer_index)
  {
    ia64_insn m;
    int b;
*************** insert_bit_table_ent (curr_ent, bit, opc
*** 1822,1834 ****
  }
  
  static void
! add_dis_entry (first, opcode, mask, opcodenum, ent, completer_index)
!      struct bittree *first;
!      ia64_insn opcode;
!      ia64_insn mask;
!      int opcodenum;
!      struct completer_entry *ent;
!      int completer_index;
  {
    if (completer_index & (1 << 20))
      abort ();
--- 1810,1817 ----
  }
  
  static void
! add_dis_entry (struct bittree *first, ia64_insn opcode, ia64_insn mask,
!                int opcodenum, struct completer_entry *ent, int completer_index)
  {
    if (completer_index & (1 << 20))
      abort ();
*************** add_dis_entry (first, opcode, mask, opco
*** 1852,1859 ****
  
  /* This optimization pass combines multiple "don't care" nodes.  */
  static void
! compact_distree (ent)
!      struct bittree *ent;
  {
  #define IS_SKIP(ent) \
      ((ent->bits[2] !=NULL) \
--- 1835,1841 ----
  
  /* This optimization pass combines multiple "don't care" nodes.  */
  static void
! compact_distree (struct bittree *ent)
  {
  #define IS_SKIP(ent) \
      ((ent->bits[2] !=NULL) \
*************** static int tot_insn_list_len = 0;
*** 1904,1911 ****
  /* Generate the disassembler state machine corresponding to the tree
     in ENT.  */
  static void
! gen_dis_table (ent)
!      struct bittree *ent;
  {
    int x;
    int our_offset = insn_list_len;
--- 1886,1892 ----
  /* Generate the disassembler state machine corresponding to the tree
     in ENT.  */
  static void
! gen_dis_table (struct bittree *ent)
  {
    int x;
    int our_offset = insn_list_len;
*************** static int glisttotlen = 0;
*** 2229,2236 ****
  /* If the completer trees ENT1 and ENT2 are equal, return 1.  */
  
  static int
! completer_entries_eq (ent1, ent2)
!      struct completer_entry *ent1, *ent2;
  {
    while (ent1 != NULL && ent2 != NULL)
      {
--- 2210,2217 ----
  /* If the completer trees ENT1 and ENT2 are equal, return 1.  */
  
  static int
! completer_entries_eq (struct completer_entry *ent1,
!                       struct completer_entry *ent2)
  {
    while (ent1 != NULL && ent2 != NULL)
      {
*************** insert_gclist (struct completer_entry *e
*** 2347,2354 ****
  }
  
  static int
! get_prefix_len (name)
!      const char *name;
  {
    char *c;
  
--- 2328,2334 ----
  }
  
  static int
! get_prefix_len (const char *name)
  {
    char *c;
  
*************** get_prefix_len (name)
*** 2363,2371 ****
  }
  
  static void
! compute_completer_bits (ment, ent)
!      struct main_entry *ment;
!      struct completer_entry *ent;
  {
    while (ent != NULL)
      {
--- 2343,2349 ----
  }
  
  static void
! compute_completer_bits (struct main_entry *ment, struct completer_entry *ent)
  {
    while (ent != NULL)
      {
*************** collapse_redundant_completers (void)
*** 2438,2446 ****
     2) all resources which must be marked in use when this opcode is used
     (regs).  */
  static int
! insert_opcode_dependencies (opc, cmp)
!      struct ia64_opcode *opc;
!      struct completer_entry *cmp ATTRIBUTE_UNUSED;
  {
    /* Note all resources which point to this opcode.  rfi has the most chks
       (79) and cmpxchng has the most regs (54) so 100 here should be enough.  */
--- 2416,2423 ----
     2) all resources which must be marked in use when this opcode is used
     (regs).  */
  static int
! insert_opcode_dependencies (struct ia64_opcode *opc,
!                             struct completer_entry *cmp ATTRIBUTE_UNUSED)
  {
    /* Note all resources which point to this opcode.  rfi has the most chks
       (79) and cmpxchng has the most regs (54) so 100 here should be enough.  */
*************** insert_opcode_dependencies (opc, cmp)
*** 2525,2534 ****
  }
  
  static void
! insert_completer_entry (opc, tabent, order)
!      struct ia64_opcode *opc;
!      struct main_entry *tabent;
!      int order;
  {
    struct completer_entry **ptr = &tabent->completers;
    struct completer_entry *parent = NULL;
--- 2502,2509 ----
  }
  
  static void
! insert_completer_entry (struct ia64_opcode *opc, struct main_entry *tabent,
!                         int order)
  {
    struct completer_entry **ptr = &tabent->completers;
    struct completer_entry *parent = NULL;
*************** insert_completer_entry (opc, tabent, ord
*** 2599,2606 ****
  }
  
  static void
! print_completer_entry (ent)
!      struct completer_entry *ent;
  {
    int moffset = 0;
    ia64_insn mask = ent->mask, bits = ent->bits;
--- 2574,2580 ----
  }
  
  static void
! print_completer_entry (struct completer_entry *ent)
  {
    int moffset = 0;
    ia64_insn mask = ent->mask, bits = ent->bits;
*************** print_completer_entry (ent)
*** 2630,2636 ****
  }
  
  static void
! print_completer_table ()
  {
    int x;
  
--- 2604,2610 ----
  }
  
  static void
! print_completer_table (void)
  {
    int x;
  
*************** print_completer_table ()
*** 2641,2649 ****
  }
  
  static int
! opcodes_eq (opc1, opc2)
!      struct ia64_opcode *opc1;
!      struct ia64_opcode *opc2;
  {
    int x;
    int plen1, plen2;
--- 2615,2621 ----
  }
  
  static int
! opcodes_eq (struct ia64_opcode *opc1, struct ia64_opcode *opc2)
  {
    int x;
    int plen1, plen2;
*************** opcodes_eq (opc1, opc2)
*** 2667,2674 ****
  }
  
  static void
! add_opcode_entry (opc)
!      struct ia64_opcode *opc;
  {
    struct main_entry **place;
    struct string_entry *name;
--- 2639,2645 ----
  }
  
  static void
! add_opcode_entry (struct ia64_opcode *opc)
  {
    struct main_entry **place;
    struct string_entry *name;
*************** print_main_table (void)
*** 2755,2762 ****
  }
  
  static void
! shrink (table)
!      struct ia64_opcode *table;
  {
    int curr_opcode;
  
--- 2726,2732 ----
  }
  
  static void
! shrink (struct ia64_opcode *table)
  {
    int curr_opcode;
  


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]