dwarf2asm.c (dw2_assemble_integer): Cast to unsigned HOST_WIDE_INT for hex printing.
authorDoug Kwan <dougkwan@google.com>
Tue, 15 Apr 2008 19:56:20 +0000 (19:56 +0000)
committerDoug Kwan <dougkwan@gcc.gnu.org>
Tue, 15 Apr 2008 19:56:20 +0000 (19:56 +0000)
2008-04-15  Doug Kwan  <dougkwan@google.com>

* dwarf2asm.c (dw2_assemble_integer): Cast to unsigned HOST_WIDE_INT
for hex printing.
* tree-pretty-print.c (dump_generic_node): Ditto.
* final.c (output_addr_const): Ditto.
* dwarf2out.c (output_cfi): Ditto.
* c-pretty-print.c (pp_c_integer_constant): Ditto.
* print-rtl.c (print_rtx): Ditto.
* print-tree.c (print_node_brief, print_node): Ditto.
* c-common.c (match_case_to_enum_1): Ditto.
* sched-vis.c (print_value): Ditto.
* config/i386/i386.c (print_operand): Cast to long unsigned int
for hex printing.

From-SVN: r134331

gcc/ChangeLog
gcc/c-common.c
gcc/c-pretty-print.c
gcc/config/i386/i386.c
gcc/dwarf2asm.c
gcc/dwarf2out.c
gcc/final.c
gcc/print-rtl.c
gcc/print-tree.c
gcc/sched-vis.c
gcc/tree-pretty-print.c

index eae2c9edf72c6608d5030013417b1584615c621b..0295ec08d5e2a9c23acc9418c9ce62aff5615db0 100644 (file)
@@ -1,3 +1,18 @@
+2008-04-15  Doug Kwan  <dougkwan@google.com>
+
+       * dwarf2asm.c (dw2_assemble_integer): Cast to unsigned HOST_WIDE_INT
+       for hex printing.
+       * tree-pretty-print.c (dump_generic_node): Ditto.
+       * final.c (output_addr_const): Ditto.
+       * dwarf2out.c (output_cfi): Ditto.
+       * c-pretty-print.c (pp_c_integer_constant): Ditto.
+       * print-rtl.c (print_rtx): Ditto.
+       * print-tree.c (print_node_brief, print_node): Ditto.
+       * c-common.c (match_case_to_enum_1): Ditto.
+       * sched-vis.c (print_value): Ditto.
+       * config/i386/i386.c (print_operand): Cast to long unsigned int
+       for hex printing.
+
 2008-04-15  Danny Smith  <dannysmith@users.sourceforge.net>
        * libgcc2.c [L_trampoline]: Remove  unnecessary prototype for
        MS Windows VirtualProtect function.
index 7e609deeb50dd816754a28d4e558be1f4063a61a..ceb2f0666c3d6347b4acba21c969adbfb29de99e 100644 (file)
@@ -4332,7 +4332,8 @@ match_case_to_enum_1 (tree key, tree type, tree label)
              -TREE_INT_CST_LOW (key));
   else
     snprintf (buf, sizeof (buf), HOST_WIDE_INT_PRINT_DOUBLE_HEX,
-             TREE_INT_CST_HIGH (key), TREE_INT_CST_LOW (key));
+             (unsigned HOST_WIDE_INT) TREE_INT_CST_HIGH (key),
+             (unsigned HOST_WIDE_INT) TREE_INT_CST_LOW (key));
 
   if (TYPE_NAME (type) == 0)
     warning (warn_switch ? OPT_Wswitch : OPT_Wswitch_enum,
index 39044a3cebd975aeec12e7727d8843b6876f6925..3c2f021846168ed9c55630800ba1edcabad32ce1 100644 (file)
@@ -832,8 +832,8 @@ pp_c_integer_constant (c_pretty_printer *pp, tree i)
          high = ~high + !low;
          low = -low;
        }
-      sprintf (pp_buffer (pp)->digit_buffer,
-              HOST_WIDE_INT_PRINT_DOUBLE_HEX, high, low);
+      sprintf (pp_buffer (pp)->digit_buffer, HOST_WIDE_INT_PRINT_DOUBLE_HEX, 
+              (unsigned HOST_WIDE_INT) high, (unsigned HOST_WIDE_INT) low);
       pp_string (pp, pp_buffer (pp)->digit_buffer);
     }
   if (TYPE_UNSIGNED (type))
index 6fcbe6637e19cab3b64a695e8bf438c66f8e0ebd..4bb686f818be32d1435b8ef6d1c71e9e3c914d5e 100644 (file)
@@ -9288,7 +9288,7 @@ print_operand (FILE *file, rtx x, int code)
 
       if (ASSEMBLER_DIALECT == ASM_ATT)
        putc ('$', file);
-      fprintf (file, "0x%08lx", l);
+      fprintf (file, "0x%08lx", (long unsigned int) l);
     }
 
   /* These float cases don't actually occur as immediate operands.  */
index 11903fe81a9b0921fcb0237986500484168f475d..552bf170218f3a2a80a9f1e94f55a7a94d088123 100644 (file)
@@ -52,7 +52,8 @@ dw2_assemble_integer (int size, rtx x)
     {
       fputs (op, asm_out_file);
       if (GET_CODE (x) == CONST_INT)
-       fprintf (asm_out_file, HOST_WIDE_INT_PRINT_HEX, INTVAL (x));
+       fprintf (asm_out_file, HOST_WIDE_INT_PRINT_HEX,
+                (unsigned HOST_WIDE_INT) INTVAL (x));
       else
        output_addr_const (asm_out_file, x);
     }
index 2d8736de0fca320f7c4546c26e99e69b83c676b8..49c13d2afe4b5131b7f4e3191262efd1f2bf9d86 100644 (file)
@@ -2116,7 +2116,8 @@ output_cfi (dw_cfi_ref cfi, dw_fde_ref fde, int for_eh)
     dw2_asm_output_data (1, (cfi->dw_cfi_opc
                             | (cfi->dw_cfi_oprnd1.dw_cfi_offset & 0x3f)),
                         "DW_CFA_advance_loc " HOST_WIDE_INT_PRINT_HEX,
-                        cfi->dw_cfi_oprnd1.dw_cfi_offset);
+                        ((unsigned HOST_WIDE_INT)
+                         cfi->dw_cfi_oprnd1.dw_cfi_offset));
   else if (cfi->dw_cfi_opc == DW_CFA_offset)
     {
       r = DWARF2_FRAME_REG_OUT (cfi->dw_cfi_oprnd1.dw_cfi_reg_num, for_eh);
index 981662479258d34ae1692da65a175f0fff2a488a..6d861c76e62f95f800c11c78943b34b621358c0f 100644 (file)
@@ -3416,9 +3416,11 @@ output_addr_const (FILE *file, rtx x)
          /* We can use %d if the number is one word and positive.  */
          if (CONST_DOUBLE_HIGH (x))
            fprintf (file, HOST_WIDE_INT_PRINT_DOUBLE_HEX,
-                    CONST_DOUBLE_HIGH (x), CONST_DOUBLE_LOW (x));
+                    (unsigned HOST_WIDE_INT) CONST_DOUBLE_HIGH (x),
+                    (unsigned HOST_WIDE_INT) CONST_DOUBLE_LOW (x));
          else if (CONST_DOUBLE_LOW (x) < 0)
-           fprintf (file, HOST_WIDE_INT_PRINT_HEX, CONST_DOUBLE_LOW (x));
+           fprintf (file, HOST_WIDE_INT_PRINT_HEX,
+                    (unsigned HOST_WIDE_INT) CONST_DOUBLE_LOW (x));
          else
            fprintf (file, HOST_WIDE_INT_PRINT_DEC, CONST_DOUBLE_LOW (x));
        }
@@ -3429,7 +3431,8 @@ output_addr_const (FILE *file, rtx x)
       break;
 
     case CONST_FIXED:
-      fprintf (file, HOST_WIDE_INT_PRINT_HEX, CONST_FIXED_VALUE_LOW (x));
+      fprintf (file, HOST_WIDE_INT_PRINT_HEX,
+              (unsigned HOST_WIDE_INT) CONST_FIXED_VALUE_LOW (x));
       break;
 
     case PLUS:
index d77645573f3fbb953d7275a60c63315b5849c71b..2e96bb4d80a7e23158bdf0895a37baad2cbe86d2 100644 (file)
@@ -384,7 +384,7 @@ print_rtx (const_rtx in_rtx)
        fprintf (outfile, HOST_WIDE_INT_PRINT_DEC, XWINT (in_rtx, i));
        if (! flag_simple)
          fprintf (outfile, " [" HOST_WIDE_INT_PRINT_HEX "]",
-                  XWINT (in_rtx, i));
+                  (unsigned HOST_WIDE_INT) XWINT (in_rtx, i));
        break;
 
       case 'i':
index f7097a415d42e3c9862f427e9e02e4d905817034..78fd72ec7c530427f378ac87c922d23f231a6bef 100644 (file)
@@ -127,7 +127,8 @@ print_node_brief (FILE *file, const char *prefix, const_tree node, int indent)
                 -TREE_INT_CST_LOW (node));
       else
        fprintf (file, HOST_WIDE_INT_PRINT_DOUBLE_HEX,
-                TREE_INT_CST_HIGH (node), TREE_INT_CST_LOW (node));
+                (unsigned HOST_WIDE_INT) TREE_INT_CST_HIGH (node),
+                (unsigned HOST_WIDE_INT) TREE_INT_CST_LOW (node));
     }
   if (TREE_CODE (node) == REAL_CST)
     {
@@ -741,7 +742,8 @@ print_node (FILE *file, const char *prefix, tree node, int indent)
                     -TREE_INT_CST_LOW (node));
          else
            fprintf (file, HOST_WIDE_INT_PRINT_DOUBLE_HEX,
-                    TREE_INT_CST_HIGH (node), TREE_INT_CST_LOW (node));
+                    (unsigned HOST_WIDE_INT) TREE_INT_CST_HIGH (node),
+                    (unsigned HOST_WIDE_INT) TREE_INT_CST_LOW (node));
          break;
 
        case REAL_CST:
index 8f4597247e5fe625c745496d2085022ac5c8120a..242791ba9e14d745aca11912ff52a8c7f0177ac4 100644 (file)
@@ -434,7 +434,8 @@ print_value (char *buf, const_rtx x, int verbose)
   switch (GET_CODE (x))
     {
     case CONST_INT:
-      sprintf (t, HOST_WIDE_INT_PRINT_HEX, INTVAL (x));
+      sprintf (t, HOST_WIDE_INT_PRINT_HEX,
+              (unsigned HOST_WIDE_INT) INTVAL (x));
       cur = safe_concat (buf, cur, t);
       break;
     case CONST_DOUBLE:
index 8b5f847e476ae4aa3da08e9473aeb65a1d58f2df..1faeab182dc58746771aa1778eba294cac2c230a 100644 (file)
@@ -784,7 +784,8 @@ dump_generic_node (pretty_printer *buffer, tree node, int spc, int flags,
          /* Would "%x%0*x" or "%x%*0x" get zero-padding on all
             systems?  */
          sprintf (pp_buffer (buffer)->digit_buffer,
-                  HOST_WIDE_INT_PRINT_DOUBLE_HEX, high, low);
+                  HOST_WIDE_INT_PRINT_DOUBLE_HEX,
+                  (unsigned HOST_WIDE_INT) high, low);
          pp_string (buffer, pp_buffer (buffer)->digit_buffer);
        }
       else