* fr30-opc.c: Regenerate.
authorNick Clifton <nickc@redhat.com>
Wed, 18 Feb 2009 17:13:04 +0000 (17:13 +0000)
committerNick Clifton <nickc@redhat.com>
Wed, 18 Feb 2009 17:13:04 +0000 (17:13 +0000)
        * frv-opc.c: Regenerate.
        * ip2k-opc.c: Regenerate.
        * iq2000-opc.c: Regenerate.
        * lm32-opc.c: Regenerate.
        * m32c-opc.c: Regenerate.
        * m32r-opc.c: Regenerate.
        * mep-opc.c: Regenerate.
        * mt-opc.c: Regenerate.
        * xc16x-opc.c: Regenerate.
        * xstormy16-opc.c: Regenerate.
        * tic54x-dis.c (print_instruction): Avoid compiler warning on
        sprintf call.

        * opc-itab.scm (<>_cgen_init_opcode_table): Avoid compiler warning
        about calling memset with a zero length.

13 files changed:
opcodes/ChangeLog
opcodes/fr30-opc.c
opcodes/frv-opc.c
opcodes/ip2k-opc.c
opcodes/iq2000-opc.c
opcodes/lm32-opc.c
opcodes/m32c-opc.c
opcodes/m32r-opc.c
opcodes/mep-opc.c
opcodes/mt-opc.c
opcodes/tic54x-dis.c
opcodes/xc16x-opc.c
opcodes/xstormy16-opc.c

index 4332d4d..941aff1 100644 (file)
@@ -1,3 +1,19 @@
+2009-02-18  Pierre Muller  <muller@ics.u-strasbg.fr>
+
+       * fr30-opc.c: Regenerate.
+       * frv-opc.c: Regenerate.
+       * ip2k-opc.c: Regenerate.
+       * iq2000-opc.c: Regenerate.
+       * lm32-opc.c: Regenerate.
+       * m32c-opc.c: Regenerate.
+       * m32r-opc.c: Regenerate.
+       * mep-opc.c: Regenerate.
+       * mt-opc.c: Regenerate.
+       * xc16x-opc.c: Regenerate.
+       * xstormy16-opc.c: Regenerate.
+       * tic54x-dis.c (print_instruction): Avoid compiler warning on
+       sprintf call.
+
 2009-02-12  Nathan Sidwell  <nathan@codesourcery.com>
 
        * m68k-opc.c (m68k_opcodes): Add stldsr instruction.
index ca80aaa..6d99258 100644 (file)
@@ -1361,7 +1361,10 @@ fr30_cgen_init_opcode_table (CGEN_CPU_DESC cd)
   const CGEN_OPCODE *oc = & fr30_cgen_macro_insn_opcode_table[0];
   CGEN_INSN *insns = xmalloc (num_macros * sizeof (CGEN_INSN));
 
-  memset (insns, 0, num_macros * sizeof (CGEN_INSN));
+  /* This test has been added to avoid a warning generated
+     if memset is called with a third argument of value zero.  */
+  if (num_macros >= 1)
+    memset (insns, 0, num_macros * sizeof (CGEN_INSN));
   for (i = 0; i < num_macros; ++i)
     {
       insns[i].base = &ib[i];
index e474a0b..f1a20e5 100644 (file)
@@ -6223,7 +6223,10 @@ frv_cgen_init_opcode_table (CGEN_CPU_DESC cd)
   const CGEN_OPCODE *oc = & frv_cgen_macro_insn_opcode_table[0];
   CGEN_INSN *insns = xmalloc (num_macros * sizeof (CGEN_INSN));
 
-  memset (insns, 0, num_macros * sizeof (CGEN_INSN));
+  /* This test has been added to avoid a warning generated
+     if memset is called with a third argument of value zero.  */
+  if (num_macros >= 1)
+    memset (insns, 0, num_macros * sizeof (CGEN_INSN));
   for (i = 0; i < num_macros; ++i)
     {
       insns[i].base = &ib[i];
index 17a6aba..080f560 100644 (file)
@@ -892,7 +892,10 @@ ip2k_cgen_init_opcode_table (CGEN_CPU_DESC cd)
   const CGEN_OPCODE *oc = & ip2k_cgen_macro_insn_opcode_table[0];
   CGEN_INSN *insns = xmalloc (num_macros * sizeof (CGEN_INSN));
 
-  memset (insns, 0, num_macros * sizeof (CGEN_INSN));
+  /* This test has been added to avoid a warning generated
+     if memset is called with a third argument of value zero.  */
+  if (num_macros >= 1)
+    memset (insns, 0, num_macros * sizeof (CGEN_INSN));
   for (i = 0; i < num_macros; ++i)
     {
       insns[i].base = &ib[i];
index c829c71..7d745f5 100644 (file)
@@ -3446,7 +3446,10 @@ iq2000_cgen_init_opcode_table (CGEN_CPU_DESC cd)
   const CGEN_OPCODE *oc = & iq2000_cgen_macro_insn_opcode_table[0];
   CGEN_INSN *insns = xmalloc (num_macros * sizeof (CGEN_INSN));
 
-  memset (insns, 0, num_macros * sizeof (CGEN_INSN));
+  /* This test has been added to avoid a warning generated
+     if memset is called with a third argument of value zero.  */
+  if (num_macros >= 1)
+    memset (insns, 0, num_macros * sizeof (CGEN_INSN));
   for (i = 0; i < num_macros; ++i)
     {
       insns[i].base = &ib[i];
index 1aee5bf..febfb8f 100644 (file)
@@ -844,7 +844,10 @@ lm32_cgen_init_opcode_table (CGEN_CPU_DESC cd)
   const CGEN_OPCODE *oc = & lm32_cgen_macro_insn_opcode_table[0];
   CGEN_INSN *insns = xmalloc (num_macros * sizeof (CGEN_INSN));
 
-  memset (insns, 0, num_macros * sizeof (CGEN_INSN));
+  /* This test has been added to avoid a warning generated
+     if memset is called with a third argument of value zero.  */
+  if (num_macros >= 1)
+    memset (insns, 0, num_macros * sizeof (CGEN_INSN));
   for (i = 0; i < num_macros; ++i)
     {
       insns[i].base = &ib[i];
index 9497896..ff2a72a 100644 (file)
@@ -80213,7 +80213,10 @@ m32c_cgen_init_opcode_table (CGEN_CPU_DESC cd)
   const CGEN_OPCODE *oc = & m32c_cgen_macro_insn_opcode_table[0];
   CGEN_INSN *insns = xmalloc (num_macros * sizeof (CGEN_INSN));
 
-  memset (insns, 0, num_macros * sizeof (CGEN_INSN));
+  /* This test has been added to avoid a warning generated
+     if memset is called with a third argument of value zero.  */
+  if (num_macros >= 1)
+    memset (insns, 0, num_macros * sizeof (CGEN_INSN));
   for (i = 0; i < num_macros; ++i)
     {
       insns[i].base = &ib[i];
index 807cba0..3455b1d 100644 (file)
@@ -1797,7 +1797,10 @@ m32r_cgen_init_opcode_table (CGEN_CPU_DESC cd)
   const CGEN_OPCODE *oc = & m32r_cgen_macro_insn_opcode_table[0];
   CGEN_INSN *insns = xmalloc (num_macros * sizeof (CGEN_INSN));
 
-  memset (insns, 0, num_macros * sizeof (CGEN_INSN));
+  /* This test has been added to avoid a warning generated
+     if memset is called with a third argument of value zero.  */
+  if (num_macros >= 1)
+    memset (insns, 0, num_macros * sizeof (CGEN_INSN));
   for (i = 0; i < num_macros; ++i)
     {
       insns[i].base = &ib[i];
index fd832b0..aa25632 100644 (file)
@@ -2002,7 +2002,10 @@ mep_cgen_init_opcode_table (CGEN_CPU_DESC cd)
   const CGEN_OPCODE *oc = & mep_cgen_macro_insn_opcode_table[0];
   CGEN_INSN *insns = xmalloc (num_macros * sizeof (CGEN_INSN));
 
-  memset (insns, 0, num_macros * sizeof (CGEN_INSN));
+  /* This test has been added to avoid a warning generated
+     if memset is called with a third argument of value zero.  */
+  if (num_macros >= 1)
+    memset (insns, 0, num_macros * sizeof (CGEN_INSN));
   for (i = 0; i < num_macros; ++i)
     {
       insns[i].base = &ib[i];
index f73ca2f..f10d25b 100644 (file)
@@ -915,7 +915,10 @@ mt_cgen_init_opcode_table (CGEN_CPU_DESC cd)
   const CGEN_OPCODE *oc = & mt_cgen_macro_insn_opcode_table[0];
   CGEN_INSN *insns = xmalloc (num_macros * sizeof (CGEN_INSN));
 
-  memset (insns, 0, num_macros * sizeof (CGEN_INSN));
+  /* This test has been added to avoid a warning generated
+     if memset is called with a third argument of value zero.  */
+  if (num_macros >= 1)
+    memset (insns, 0, num_macros * sizeof (CGEN_INSN));
   for (i = 0; i < num_macros; ++i)
     {
       insns[i].base = &ib[i];
index 0b92f90..0b6e7b4 100644 (file)
@@ -380,7 +380,10 @@ print_instruction (info, memaddr, opcode, tm_name, tm_operands, size, ext)
         case OP_CC3:
         {
           const char *code[] = { "eq", "lt", "gt", "neq" };
-          sprintf (operand[i], code[CC3 (opcode)]);
+
+         /* Do not use sprintf with only two parameters as a
+            compiler warning could be generated in such conditions.  */
+         sprintf (operand[i], "%s", code[CC3 (opcode)]);
           info->fprintf_func (info->stream, "%s%s", comma, operand[i]);
           break;
         }
index cc34b0c..394f9a0 100644 (file)
@@ -3041,7 +3041,10 @@ xc16x_cgen_init_opcode_table (CGEN_CPU_DESC cd)
   const CGEN_OPCODE *oc = & xc16x_cgen_macro_insn_opcode_table[0];
   CGEN_INSN *insns = xmalloc (num_macros * sizeof (CGEN_INSN));
 
-  memset (insns, 0, num_macros * sizeof (CGEN_INSN));
+  /* This test has been added to avoid a warning generated
+     if memset is called with a third argument of value zero.  */
+  if (num_macros >= 1)
+    memset (insns, 0, num_macros * sizeof (CGEN_INSN));
   for (i = 0; i < num_macros; ++i)
     {
       insns[i].base = &ib[i];
index 3ac3c22..54b1d41 100644 (file)
@@ -1165,7 +1165,10 @@ xstormy16_cgen_init_opcode_table (CGEN_CPU_DESC cd)
   const CGEN_OPCODE *oc = & xstormy16_cgen_macro_insn_opcode_table[0];
   CGEN_INSN *insns = xmalloc (num_macros * sizeof (CGEN_INSN));
 
-  memset (insns, 0, num_macros * sizeof (CGEN_INSN));
+  /* This test has been added to avoid a warning generated
+     if memset is called with a third argument of value zero.  */
+  if (num_macros >= 1)
+    memset (insns, 0, num_macros * sizeof (CGEN_INSN));
   for (i = 0; i < num_macros; ++i)
     {
       insns[i].base = &ib[i];