OSDN Git Service

* config/tc-tic4x.c (tic4x_insn_insert): Add const qualifier to
authornickc <nickc>
Tue, 12 Feb 2008 08:37:06 +0000 (08:37 +0000)
committernickc <nickc>
Tue, 12 Feb 2008 08:37:06 +0000 (08:37 +0000)
  argument.
  (tic4x_insn_add): Likewise.
  (md_begin): Drop cast that was discarding a const qualifier.
  * config/tc-d30v.c (get_reloc): Add const qualifier to op
  argument.
  (build_insn): Drop cast that was discarding a const qualifier.

gas/ChangeLog
gas/config/tc-d30v.c
gas/config/tc-tic4x.c

index c55b192..539b990 100644 (file)
@@ -1,3 +1,13 @@
+2008-02-12  Nick Clifton  <nickc@redhat.com>
+
+       * config/tc-tic4x.c (tic4x_insn_insert): Add const qualifier to
+       argument.
+       (tic4x_insn_add): Likewise.
+       (md_begin): Drop cast that was discarding a const qualifier.
+       * config/tc-d30v.c (get_reloc): Add const qualifier to op
+       argument.
+       (build_insn): Drop cast that was discarding a const qualifier.
+
 2008-02-11  H.J. Lu  <hongjiu.lu@intel.com>
 
        * config/tc-i386.c (cpu_arch): Add .xsave.
index e257f75..4dfa197 100644 (file)
@@ -1,5 +1,5 @@
 /* tc-d30v.c -- Assembler code for the Mitsubishi D30V
-   Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2006, 2007
+   Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2006, 2007, 2008
    Free Software Foundation, Inc.
 
    This file is part of GAS, the GNU Assembler.
@@ -352,7 +352,7 @@ postfix (char *p)
 }
 
 static bfd_reloc_code_real_type
-get_reloc (struct d30v_operand *op, int rel_flag)
+get_reloc (const struct d30v_operand *op, int rel_flag)
 {
   switch (op->bits)
     {
@@ -538,7 +538,7 @@ build_insn (struct d30v_insn *opcode, expressionS *opers)
            as_fatal (_("too many fixups"));
 
          fixups->fix[fixups->fc].reloc =
-           get_reloc ((struct d30v_operand *) &d30v_operand_table[form->operands[i]], op->reloc_flag);
+           get_reloc (d30v_operand_table + form->operands[i], op->reloc_flag);
          fixups->fix[fixups->fc].size = 4;
          fixups->fix[fixups->fc].exp = opers[i];
          fixups->fix[fixups->fc].operand = form->operands[i];
index 3edabc2..4c80c19 100644 (file)
@@ -1,5 +1,5 @@
 /* tc-tic4x.c -- Assemble for the Texas Instruments TMS320C[34]x.
-   Copyright (C) 1997,1998, 2002, 2003, 2005, 2006, 2007
+   Copyright (C) 1997,1998, 2002, 2003, 2005, 2006, 2007, 2008
    Free Software Foundation. Inc.
 
    Contributed by Michael P. Hayes (m.hayes@elec.canterbury.ac.nz)
@@ -186,12 +186,10 @@ static void tic4x_init_regtable
   PARAMS ((void));
 static void tic4x_init_symbols
   PARAMS ((void));
-static int tic4x_inst_insert
-  PARAMS ((tic4x_inst_t *));
+static int tic4x_inst_insert (const tic4x_inst_t *);
 static tic4x_inst_t *tic4x_inst_make
   PARAMS ((char *, unsigned long, char *));
-static int tic4x_inst_add
-  PARAMS ((tic4x_inst_t *));
+static int tic4x_inst_add (const tic4x_inst_t *);
 void tic4x_end
   PARAMS ((void));
 static int tic4x_indirect_parse
@@ -1314,8 +1312,7 @@ tic4x_init_symbols ()
 
 /* Insert a new instruction template into hash table.  */
 static int 
-tic4x_inst_insert (inst)
-     tic4x_inst_t *inst;
+tic4x_inst_insert (const tic4x_inst_t *inst)
 {
   static char prev_name[16];
   const char *retval = NULL;
@@ -1368,8 +1365,7 @@ tic4x_inst_make (name, opcode, args)
 
 /* Add instruction template, creating dynamic templates as required.  */
 static int 
-tic4x_inst_add (insts)
-     tic4x_inst_t *insts;
+tic4x_inst_add (const tic4x_inst_t *insts)
 {
   char *s = insts->name;
   char *d;
@@ -1481,7 +1477,7 @@ md_begin ()
 
   /* Add mnemonics to hash table, expanding conditional mnemonics on fly.  */
   for (i = 0; i < tic4x_num_insts; i++)
-    ok &= tic4x_inst_add ((void *) &tic4x_insts[i]);
+    ok &= tic4x_inst_add (tic4x_insts + i);
 
   /* Create dummy inst to avoid errors accessing end of table.  */
   tic4x_inst_make ("", 0, "");