df-core.c (df_ref_debug): Change format string placeholder from 0x%x to %#x.

* df-core.c (df_ref_debug): Change format string placeholder
	from 0x%x to %#x.
	* dwarf2asm.c (dw2_asm_output_data_raw,
	dw2_asm_output_data_uleb128_raw, dw2_asm_output_data_uleb128,
	dw2_asm_output_data_sleb128_raw, dw2_asm_output_data_sleb128): Ditto.
	* dwarf2out.c (output_cfi, output_cfi_directive,
	dwarf2out_do_cfi_startproc, output_loc_sequence_raw,
	output_cfa_loc_raw, output_die, output_ranges, output_file_names):
	Ditto.
	* genattrtab.c (write_test_expr, write_attr_valueq): Ditto.
	* print-rtl.c (print_rtx): Ditto.

From-SVN: r158347
This commit is contained in:
Uros Bizjak 2010-04-14 17:08:54 +02:00 committed by Uros Bizjak
parent 3eb4dbe35b
commit a3f1cee4d3
6 changed files with 41 additions and 27 deletions

View File

@ -1,3 +1,17 @@
2010-04-14 Uros Bizjak <ubizjak@gmail.com>
* df-core.c (df_ref_debug): Change format string placeholder
from 0x%x to %#x.
* dwarf2asm.c (dw2_asm_output_data_raw,
dw2_asm_output_data_uleb128_raw, dw2_asm_output_data_uleb128,
dw2_asm_output_data_sleb128_raw, dw2_asm_output_data_sleb128): Ditto.
* dwarf2out.c (output_cfi, output_cfi_directive,
dwarf2out_do_cfi_startproc, output_loc_sequence_raw,
output_cfa_loc_raw, output_die, output_ranges, output_file_names):
Ditto.
* genattrtab.c (write_test_expr, write_attr_valueq): Ditto.
* print-rtl.c (print_rtx): Ditto.
2010-04-14 Michael Meissner <meissner@linux.vnet.ibm.com>
PR middle-end/42694

View File

@ -2137,7 +2137,7 @@ df_ref_debug (df_ref ref, FILE *file)
fprintf (file, "%c%d ",
DF_REF_REG_DEF_P (ref) ? 'd' : 'u',
DF_REF_ID (ref));
fprintf (file, "reg %d bb %d insn %d flag 0x%x type 0x%x ",
fprintf (file, "reg %d bb %d insn %d flag %#x type %#x ",
DF_REF_REGNO (ref),
DF_REF_BBNO (ref),
DF_REF_IS_ARTIFICIAL (ref) ? -1 : DF_REF_INSN_UID (ref),

View File

@ -80,14 +80,14 @@ dw2_asm_output_data_raw (int size, unsigned HOST_WIDE_INT value)
if (BYTES_BIG_ENDIAN)
{
for (i = size - 1; i > 0; --i)
fprintf (asm_out_file, "0x%x,", bytes[i]);
fprintf (asm_out_file, "0x%x", bytes[0]);
fprintf (asm_out_file, "%#x,", bytes[i]);
fprintf (asm_out_file, "%#x", bytes[0]);
}
else
{
for (i = 0; i < size - 1; ++i)
fprintf (asm_out_file, "0x%x,", bytes[i]);
fprintf (asm_out_file, "0x%x", bytes[i]);
fprintf (asm_out_file, "%#x,", bytes[i]);
fprintf (asm_out_file, "%#x", bytes[i]);
}
}
@ -549,7 +549,7 @@ dw2_asm_output_data_uleb128_raw (unsigned HOST_WIDE_INT value)
/* More bytes to follow. */
byte |= 0x80;
fprintf (asm_out_file, "0x%x", byte);
fprintf (asm_out_file, "%#x", byte);
if (value == 0)
break;
fputc (',', asm_out_file);
@ -591,7 +591,7 @@ dw2_asm_output_data_uleb128 (unsigned HOST_WIDE_INT value,
if (byte_op)
{
fprintf (asm_out_file, "0x%x", byte);
fprintf (asm_out_file, "%#x", byte);
if (work != 0)
fputc (',', asm_out_file);
}
@ -633,7 +633,7 @@ dw2_asm_output_data_sleb128_raw (HOST_WIDE_INT value)
if (more)
byte |= 0x80;
fprintf (asm_out_file, "0x%x", byte);
fprintf (asm_out_file, "%#x", byte);
if (!more)
break;
fputc (',', asm_out_file);
@ -678,7 +678,7 @@ dw2_asm_output_data_sleb128 (HOST_WIDE_INT value,
if (byte_op)
{
fprintf (asm_out_file, "0x%x", byte);
fprintf (asm_out_file, "%#x", byte);
if (more)
fputc (',', asm_out_file);
}

View File

@ -3051,7 +3051,7 @@ output_cfi (dw_cfi_ref cfi, dw_fde_ref fde, int for_eh)
{
r = DWARF2_FRAME_REG_OUT (cfi->dw_cfi_oprnd1.dw_cfi_reg_num, for_eh);
dw2_asm_output_data (1, (cfi->dw_cfi_opc | (r & 0x3f)),
"DW_CFA_offset, column 0x%lx", r);
"DW_CFA_offset, column %#lx", r);
off = div_data_align (cfi->dw_cfi_oprnd2.dw_cfi_offset);
dw2_asm_output_data_uleb128 (off, NULL);
}
@ -3059,7 +3059,7 @@ output_cfi (dw_cfi_ref cfi, dw_fde_ref fde, int for_eh)
{
r = DWARF2_FRAME_REG_OUT (cfi->dw_cfi_oprnd1.dw_cfi_reg_num, for_eh);
dw2_asm_output_data (1, (cfi->dw_cfi_opc | (r & 0x3f)),
"DW_CFA_restore, column 0x%lx", r);
"DW_CFA_restore, column %#lx", r);
}
else
{
@ -3251,7 +3251,7 @@ output_cfi_directive (dw_cfi_ref cfi)
break;
case DW_CFA_GNU_args_size:
fprintf (asm_out_file, "\t.cfi_escape 0x%x,", DW_CFA_GNU_args_size);
fprintf (asm_out_file, "\t.cfi_escape %#x,", DW_CFA_GNU_args_size);
dw2_asm_output_data_uleb128_raw (cfi->dw_cfi_oprnd1.dw_cfi_offset);
if (flag_debug_asm)
fprintf (asm_out_file, "\t%s args_size "HOST_WIDE_INT_PRINT_DEC,
@ -3265,7 +3265,7 @@ output_cfi_directive (dw_cfi_ref cfi)
case DW_CFA_def_cfa_expression:
case DW_CFA_expression:
fprintf (asm_out_file, "\t.cfi_escape 0x%x,", cfi->dw_cfi_opc);
fprintf (asm_out_file, "\t.cfi_escape %#x,", cfi->dw_cfi_opc);
output_cfa_loc_raw (cfi);
fputc ('\n', asm_out_file);
break;
@ -3863,7 +3863,7 @@ dwarf2out_do_cfi_startproc (bool second)
if (enc & DW_EH_PE_indirect)
ref = dw2_force_const_mem (ref, true);
fprintf (asm_out_file, "\t.cfi_personality 0x%x,", enc);
fprintf (asm_out_file, "\t.cfi_personality %#x,", enc);
output_addr_const (asm_out_file, ref);
fputc ('\n', asm_out_file);
}
@ -3881,7 +3881,7 @@ dwarf2out_do_cfi_startproc (bool second)
if (enc & DW_EH_PE_indirect)
ref = dw2_force_const_mem (ref, true);
fprintf (asm_out_file, "\t.cfi_lsda 0x%x,", enc);
fprintf (asm_out_file, "\t.cfi_lsda %#x,", enc);
output_addr_const (asm_out_file, ref);
fputc ('\n', asm_out_file);
}
@ -5175,7 +5175,7 @@ output_loc_sequence_raw (dw_loc_descr_ref loc)
while (1)
{
/* Output the opcode. */
fprintf (asm_out_file, "0x%x", loc->dw_loc_opc);
fprintf (asm_out_file, "%#x", loc->dw_loc_opc);
output_loc_operands_raw (loc);
if (!loc->dw_loc_next)
@ -5221,7 +5221,7 @@ output_cfa_loc_raw (dw_cfi_ref cfi)
if (cfi->dw_cfi_opc == DW_CFA_expression)
{
fprintf (asm_out_file, "0x%x,", cfi->dw_cfi_oprnd1.dw_cfi_reg_num);
fprintf (asm_out_file, "%#x,", cfi->dw_cfi_oprnd1.dw_cfi_reg_num);
loc = cfi->dw_cfi_oprnd2.dw_cfi_loc;
}
else
@ -10424,7 +10424,7 @@ output_die (dw_die_ref die)
if (dwarf_version < 4 && die->die_id.die_symbol)
output_die_symbol (die);
dw2_asm_output_data_uleb128 (die->die_abbrev, "(DIE (0x%lx) %s)",
dw2_asm_output_data_uleb128 (die->die_abbrev, "(DIE (%#lx) %s)",
(unsigned long)die->die_offset,
dwarf_tag_name (die->die_tag));
@ -10656,7 +10656,7 @@ output_die (dw_die_ref die)
/* Add null byte to terminate sibling list. */
if (die->die_child != NULL)
dw2_asm_output_data (1, 0, "end of children of DIE 0x%lx",
dw2_asm_output_data (1, 0, "end of children of DIE %#lx",
(unsigned long) die->die_offset);
}
@ -11082,7 +11082,7 @@ static void
output_ranges (void)
{
unsigned i;
static const char *const start_fmt = "Offset 0x%x";
static const char *const start_fmt = "Offset %#x";
const char *fmt = start_fmt;
for (i = 0; i < ranges_table_in_use; i++)
@ -11424,7 +11424,7 @@ output_file_names (void)
dw2_asm_output_nstring (dirs[i].path,
dirs[i].length
- !DWARF2_DIR_SHOULD_END_WITH_SEPARATOR,
"Directory Entry: 0x%x", i + idx_offset);
"Directory Entry: %#x", i + idx_offset);
dw2_asm_output_data (1, 0, "End directory table");
@ -11460,7 +11460,7 @@ output_file_names (void)
files[file_idx].path + dirs[dir_idx].length, ver);
dw2_asm_output_nstring
(filebuf, -1, "File Entry: 0x%x", (unsigned) i + 1);
(filebuf, -1, "File Entry: %#x", (unsigned) i + 1);
/* Include directory index. */
dw2_asm_output_data_uleb128 (dir_idx + idx_offset, NULL);
@ -11478,7 +11478,7 @@ output_file_names (void)
NULL);
#else
dw2_asm_output_nstring (files[file_idx].path + dirs[dir_idx].length, -1,
"File Entry: 0x%x", (unsigned) i + 1);
"File Entry: %#x", (unsigned) i + 1);
/* Include directory index. */
dw2_asm_output_data_uleb128 (dir_idx + idx_offset, NULL);
@ -11569,7 +11569,7 @@ output_line_info (void)
break;
}
dw2_asm_output_data (1, n_op_args, "opcode: 0x%x has %d args",
dw2_asm_output_data (1, n_op_args, "opcode: %#x has %d args",
opc, n_op_args);
}

View File

@ -3323,7 +3323,7 @@ write_test_expr (rtx exp, int flags)
}
else
{
printf ("%s((1 << which_alternative) & 0x%x)",
printf ("%s((1 << which_alternative) & %#x)",
XINT (exp, 1) ? "!" : "", set);
}
}
@ -3894,7 +3894,7 @@ write_attr_valueq (struct attr_desc *attr, const char *s)
printf ("%d", num);
if (num > 9 || num < 0)
printf (" /* 0x%x */", num);
printf (" /* %#x */", num);
}
else
{

View File

@ -236,7 +236,7 @@ print_rtx (const_rtx in_rtx)
{
int flags = SYMBOL_REF_FLAGS (in_rtx);
if (flags)
fprintf (outfile, " [flags 0x%x]", flags);
fprintf (outfile, " [flags %#x]", flags);
}
else if (i == 2 && GET_CODE (in_rtx) == SYMBOL_REF)
{