ip2k.c (function_prologue, [...]): Fix format specifier warnings.
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>
Fri, 16 May 2003 22:05:08 +0000 (22:05 +0000)
committerKaveh Ghazi <ghazi@gcc.gnu.org>
Fri, 16 May 2003 22:05:08 +0000 (22:05 +0000)
* ip2k.c (function_prologue, function_epilogue, print_operand):
Fix format specifier warnings.
* ip2k.md: Likewise.

From-SVN: r66886

gcc/ChangeLog
gcc/config/ip2k/ip2k.c
gcc/config/ip2k/ip2k.md

index df50281a6fc344d66d7147aba117c4a8c32760d8..93c8bc1846ba077660a42a3de72730683d11cb82 100644 (file)
@@ -1,5 +1,9 @@
 2003-05-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
 
+       * ip2k.c (function_prologue, function_epilogue, print_operand):
+       Fix format specifier warnings.
+       * ip2k.md: Likewise.
+
        * i960.c (i960_output_function_prologue, i960_print_operand,
        i960_print_operand_addr): Fix format specifier warnings.
 
index 581479869e842996e399589803b652d57edced26..c8c17ccc3d0b51faa4cb8762ee16d2d93d64d3d9 100644 (file)
@@ -218,7 +218,8 @@ function_prologue (file, size)
      take any action based on the information.  */
 
   prologue_size = 0;
-  fprintf (file, "/* prologue: frame size=%d */\n", size);
+  fprintf (file, "/* prologue: frame size=" HOST_WIDE_INT_PRINT_DEC " */\n",
+          size);
   
   /* Unless we're a leaf we need to save the return PC.  */
 
@@ -344,7 +345,8 @@ function_epilogue (file, size)
 
   leaf_func_p = leaf_function_p ();
   epilogue_size = 0;
-  fprintf (file, "/* epilogue: frame size=%d */\n", size);
+  fprintf (file, "/* epilogue: frame size=" HOST_WIDE_INT_PRINT_DEC " */\n",
+          size);
 
   savelimit = (CHAIN_FRAMES) ? REG_FP : (REG_FP + 2);
   for (reg = 0; reg < savelimit; reg++)
@@ -919,11 +921,11 @@ print_operand (file, x, code)
       switch (code)
        {
         case 'x':
-         fprintf (file, "$%x", INTVAL (x) & 0xffff);
+         fprintf (file, "$%x", (int)(INTVAL (x) & 0xffff));
          break;
 
        case 'b':
-         fprintf (file, "%d", INTVAL (x)); /* bit selector  */
+         fprintf (file, HOST_WIDE_INT_PRINT_DEC, INTVAL (x)); /* bit selector  */
          break;
 
        case 'e':               /* "1 << n" - e.g. "exp"  */
@@ -942,11 +944,11 @@ print_operand (file, x, code)
          break;
 
        case 'H':
-         fprintf (file, "#%d", (INTVAL (x) >> 8) & 0xff);
+         fprintf (file, "#%d", (int)((INTVAL (x) >> 8) & 0xff));
          break;
 
        case 'L':
-         fprintf (file, "#%d", INTVAL (x) & 0xff);
+         fprintf (file, "#%d", (int)(INTVAL (x) & 0xff));
          break;
 
        case 'S':
@@ -962,7 +964,7 @@ print_operand (file, x, code)
          break;
 
        default:
-         fprintf (file, "#%d", INTVAL (x));
+         fprintf (file, "#" HOST_WIDE_INT_PRINT_DEC, INTVAL (x));
        }
       break;
 
index f29d05acb30add8bb730cf401ef7ebadeaf2018c..b4f257980aa0cc5e9741fa6adffa7a6cc0c53bb9 100644 (file)
          /* Constant can just be or-ed in. */
            {
              p += sprintf (p, \"mov\\tw,#$%2.2x\;or\\t%%0,w\",
-                           (INTVAL (operands[3]) << pos) & mask & 0xff);
+                           (int) (INTVAL (operands[3]) << pos) & mask & 0xff);
              return buff;
            }