dwarf2asm.c (dw2_assemble_integer): Cast to unsigned HOST_WIDE_INT for hex printing.

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
This commit is contained in:
Doug Kwan 2008-04-15 19:56:20 +00:00 committed by Doug Kwan
parent d98c89de9b
commit 3d57d7cee7
11 changed files with 39 additions and 14 deletions

View 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.

View 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,

View 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))

View 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. */

View 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);
}

View 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);

View 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:

View 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':

View 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:

View 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:

View 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