Commit a3f1cee4 by Uros Bizjak Committed by Uros Bizjak

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
parent 3eb4dbe3
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> 2010-04-14 Michael Meissner <meissner@linux.vnet.ibm.com>
PR middle-end/42694 PR middle-end/42694
......
...@@ -2137,7 +2137,7 @@ df_ref_debug (df_ref ref, FILE *file) ...@@ -2137,7 +2137,7 @@ df_ref_debug (df_ref ref, FILE *file)
fprintf (file, "%c%d ", fprintf (file, "%c%d ",
DF_REF_REG_DEF_P (ref) ? 'd' : 'u', DF_REF_REG_DEF_P (ref) ? 'd' : 'u',
DF_REF_ID (ref)); 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_REGNO (ref),
DF_REF_BBNO (ref), DF_REF_BBNO (ref),
DF_REF_IS_ARTIFICIAL (ref) ? -1 : DF_REF_INSN_UID (ref), DF_REF_IS_ARTIFICIAL (ref) ? -1 : DF_REF_INSN_UID (ref),
......
...@@ -80,14 +80,14 @@ dw2_asm_output_data_raw (int size, unsigned HOST_WIDE_INT value) ...@@ -80,14 +80,14 @@ dw2_asm_output_data_raw (int size, unsigned HOST_WIDE_INT value)
if (BYTES_BIG_ENDIAN) if (BYTES_BIG_ENDIAN)
{ {
for (i = size - 1; i > 0; --i) for (i = size - 1; i > 0; --i)
fprintf (asm_out_file, "0x%x,", bytes[i]); fprintf (asm_out_file, "%#x,", bytes[i]);
fprintf (asm_out_file, "0x%x", bytes[0]); fprintf (asm_out_file, "%#x", bytes[0]);
} }
else else
{ {
for (i = 0; i < size - 1; ++i) for (i = 0; i < size - 1; ++i)
fprintf (asm_out_file, "0x%x,", bytes[i]); fprintf (asm_out_file, "%#x,", bytes[i]);
fprintf (asm_out_file, "0x%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) ...@@ -549,7 +549,7 @@ dw2_asm_output_data_uleb128_raw (unsigned HOST_WIDE_INT value)
/* More bytes to follow. */ /* More bytes to follow. */
byte |= 0x80; byte |= 0x80;
fprintf (asm_out_file, "0x%x", byte); fprintf (asm_out_file, "%#x", byte);
if (value == 0) if (value == 0)
break; break;
fputc (',', asm_out_file); fputc (',', asm_out_file);
...@@ -591,7 +591,7 @@ dw2_asm_output_data_uleb128 (unsigned HOST_WIDE_INT value, ...@@ -591,7 +591,7 @@ dw2_asm_output_data_uleb128 (unsigned HOST_WIDE_INT value,
if (byte_op) if (byte_op)
{ {
fprintf (asm_out_file, "0x%x", byte); fprintf (asm_out_file, "%#x", byte);
if (work != 0) if (work != 0)
fputc (',', asm_out_file); fputc (',', asm_out_file);
} }
...@@ -633,7 +633,7 @@ dw2_asm_output_data_sleb128_raw (HOST_WIDE_INT value) ...@@ -633,7 +633,7 @@ dw2_asm_output_data_sleb128_raw (HOST_WIDE_INT value)
if (more) if (more)
byte |= 0x80; byte |= 0x80;
fprintf (asm_out_file, "0x%x", byte); fprintf (asm_out_file, "%#x", byte);
if (!more) if (!more)
break; break;
fputc (',', asm_out_file); fputc (',', asm_out_file);
...@@ -678,7 +678,7 @@ dw2_asm_output_data_sleb128 (HOST_WIDE_INT value, ...@@ -678,7 +678,7 @@ dw2_asm_output_data_sleb128 (HOST_WIDE_INT value,
if (byte_op) if (byte_op)
{ {
fprintf (asm_out_file, "0x%x", byte); fprintf (asm_out_file, "%#x", byte);
if (more) if (more)
fputc (',', asm_out_file); fputc (',', asm_out_file);
} }
......
...@@ -3051,7 +3051,7 @@ output_cfi (dw_cfi_ref cfi, dw_fde_ref fde, int for_eh) ...@@ -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); 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)), 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); off = div_data_align (cfi->dw_cfi_oprnd2.dw_cfi_offset);
dw2_asm_output_data_uleb128 (off, NULL); dw2_asm_output_data_uleb128 (off, NULL);
} }
...@@ -3059,7 +3059,7 @@ output_cfi (dw_cfi_ref cfi, dw_fde_ref fde, int for_eh) ...@@ -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); 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)), 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 else
{ {
...@@ -3251,7 +3251,7 @@ output_cfi_directive (dw_cfi_ref cfi) ...@@ -3251,7 +3251,7 @@ output_cfi_directive (dw_cfi_ref cfi)
break; break;
case DW_CFA_GNU_args_size: 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); dw2_asm_output_data_uleb128_raw (cfi->dw_cfi_oprnd1.dw_cfi_offset);
if (flag_debug_asm) if (flag_debug_asm)
fprintf (asm_out_file, "\t%s args_size "HOST_WIDE_INT_PRINT_DEC, fprintf (asm_out_file, "\t%s args_size "HOST_WIDE_INT_PRINT_DEC,
...@@ -3265,7 +3265,7 @@ output_cfi_directive (dw_cfi_ref cfi) ...@@ -3265,7 +3265,7 @@ output_cfi_directive (dw_cfi_ref cfi)
case DW_CFA_def_cfa_expression: case DW_CFA_def_cfa_expression:
case DW_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); output_cfa_loc_raw (cfi);
fputc ('\n', asm_out_file); fputc ('\n', asm_out_file);
break; break;
...@@ -3863,7 +3863,7 @@ dwarf2out_do_cfi_startproc (bool second) ...@@ -3863,7 +3863,7 @@ dwarf2out_do_cfi_startproc (bool second)
if (enc & DW_EH_PE_indirect) if (enc & DW_EH_PE_indirect)
ref = dw2_force_const_mem (ref, true); 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); output_addr_const (asm_out_file, ref);
fputc ('\n', asm_out_file); fputc ('\n', asm_out_file);
} }
...@@ -3881,7 +3881,7 @@ dwarf2out_do_cfi_startproc (bool second) ...@@ -3881,7 +3881,7 @@ dwarf2out_do_cfi_startproc (bool second)
if (enc & DW_EH_PE_indirect) if (enc & DW_EH_PE_indirect)
ref = dw2_force_const_mem (ref, true); 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); output_addr_const (asm_out_file, ref);
fputc ('\n', asm_out_file); fputc ('\n', asm_out_file);
} }
...@@ -5175,7 +5175,7 @@ output_loc_sequence_raw (dw_loc_descr_ref loc) ...@@ -5175,7 +5175,7 @@ output_loc_sequence_raw (dw_loc_descr_ref loc)
while (1) while (1)
{ {
/* Output the opcode. */ /* 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); output_loc_operands_raw (loc);
if (!loc->dw_loc_next) if (!loc->dw_loc_next)
...@@ -5221,7 +5221,7 @@ output_cfa_loc_raw (dw_cfi_ref cfi) ...@@ -5221,7 +5221,7 @@ output_cfa_loc_raw (dw_cfi_ref cfi)
if (cfi->dw_cfi_opc == DW_CFA_expression) 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; loc = cfi->dw_cfi_oprnd2.dw_cfi_loc;
} }
else else
...@@ -10424,7 +10424,7 @@ output_die (dw_die_ref die) ...@@ -10424,7 +10424,7 @@ output_die (dw_die_ref die)
if (dwarf_version < 4 && die->die_id.die_symbol) if (dwarf_version < 4 && die->die_id.die_symbol)
output_die_symbol (die); 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, (unsigned long)die->die_offset,
dwarf_tag_name (die->die_tag)); dwarf_tag_name (die->die_tag));
...@@ -10656,7 +10656,7 @@ output_die (dw_die_ref die) ...@@ -10656,7 +10656,7 @@ output_die (dw_die_ref die)
/* Add null byte to terminate sibling list. */ /* Add null byte to terminate sibling list. */
if (die->die_child != NULL) 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); (unsigned long) die->die_offset);
} }
...@@ -11082,7 +11082,7 @@ static void ...@@ -11082,7 +11082,7 @@ static void
output_ranges (void) output_ranges (void)
{ {
unsigned i; unsigned i;
static const char *const start_fmt = "Offset 0x%x"; static const char *const start_fmt = "Offset %#x";
const char *fmt = start_fmt; const char *fmt = start_fmt;
for (i = 0; i < ranges_table_in_use; i++) for (i = 0; i < ranges_table_in_use; i++)
...@@ -11424,7 +11424,7 @@ output_file_names (void) ...@@ -11424,7 +11424,7 @@ output_file_names (void)
dw2_asm_output_nstring (dirs[i].path, dw2_asm_output_nstring (dirs[i].path,
dirs[i].length dirs[i].length
- !DWARF2_DIR_SHOULD_END_WITH_SEPARATOR, - !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"); dw2_asm_output_data (1, 0, "End directory table");
...@@ -11460,7 +11460,7 @@ output_file_names (void) ...@@ -11460,7 +11460,7 @@ output_file_names (void)
files[file_idx].path + dirs[dir_idx].length, ver); files[file_idx].path + dirs[dir_idx].length, ver);
dw2_asm_output_nstring dw2_asm_output_nstring
(filebuf, -1, "File Entry: 0x%x", (unsigned) i + 1); (filebuf, -1, "File Entry: %#x", (unsigned) i + 1);
/* Include directory index. */ /* Include directory index. */
dw2_asm_output_data_uleb128 (dir_idx + idx_offset, NULL); dw2_asm_output_data_uleb128 (dir_idx + idx_offset, NULL);
...@@ -11478,7 +11478,7 @@ output_file_names (void) ...@@ -11478,7 +11478,7 @@ output_file_names (void)
NULL); NULL);
#else #else
dw2_asm_output_nstring (files[file_idx].path + dirs[dir_idx].length, -1, 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. */ /* Include directory index. */
dw2_asm_output_data_uleb128 (dir_idx + idx_offset, NULL); dw2_asm_output_data_uleb128 (dir_idx + idx_offset, NULL);
...@@ -11569,7 +11569,7 @@ output_line_info (void) ...@@ -11569,7 +11569,7 @@ output_line_info (void)
break; 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); opc, n_op_args);
} }
......
...@@ -3323,7 +3323,7 @@ write_test_expr (rtx exp, int flags) ...@@ -3323,7 +3323,7 @@ write_test_expr (rtx exp, int flags)
} }
else else
{ {
printf ("%s((1 << which_alternative) & 0x%x)", printf ("%s((1 << which_alternative) & %#x)",
XINT (exp, 1) ? "!" : "", set); XINT (exp, 1) ? "!" : "", set);
} }
} }
...@@ -3894,7 +3894,7 @@ write_attr_valueq (struct attr_desc *attr, const char *s) ...@@ -3894,7 +3894,7 @@ write_attr_valueq (struct attr_desc *attr, const char *s)
printf ("%d", num); printf ("%d", num);
if (num > 9 || num < 0) if (num > 9 || num < 0)
printf (" /* 0x%x */", num); printf (" /* %#x */", num);
} }
else else
{ {
......
...@@ -236,7 +236,7 @@ print_rtx (const_rtx in_rtx) ...@@ -236,7 +236,7 @@ print_rtx (const_rtx in_rtx)
{ {
int flags = SYMBOL_REF_FLAGS (in_rtx); int flags = SYMBOL_REF_FLAGS (in_rtx);
if (flags) if (flags)
fprintf (outfile, " [flags 0x%x]", flags); fprintf (outfile, " [flags %#x]", flags);
} }
else if (i == 2 && GET_CODE (in_rtx) == SYMBOL_REF) else if (i == 2 && GET_CODE (in_rtx) == SYMBOL_REF)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment