system.h: Define __STDC_FORMAT_MACROS before including inttypes.h.

2014-05-23  Richard Biener  <rguenther@suse.de>

	* system.h: Define __STDC_FORMAT_MACROS before
	including inttypes.h.
	* hwint.h (HOST_WIDEST_INT, HOST_BITS_PER_WIDEST_INT,
	HOST_WIDEST_INT_PRINT, HOST_WIDEST_INT_PRINT_DEC,
	HOST_WIDEST_INT_PRINT_DEC_C, HOST_WIDEST_INT_PRINT_UNSIGNED,
	HOST_WIDEST_INT_PRINT_HEX, HOST_WIDEST_INT_PRINT_DOUBLE_HEX,
	HOST_WIDEST_INT_C): Remove.
	(PRId64, PRIi64, PRIo64, PRIu64, PRIx64, PRIX64): Define
	if C99 inttypes.h is not available.

	* coretypes.h (gcov_type, gcov_type_unsigned): Use [u]int64_t.
	* gcov-io.h (gcov_type, gcov_type_unsigned): Likewise.
	* gcov-io.c (gcov_histo_index): Drop non-64bit hwi case.
	* cfgloop.h (struct niter_desc): Use uint64_t for niter field.
	* bitmap.c (struct bitmap_descriptor_d): Use uint64_t for counters.
	(struct output_info): Likewise.
	(print_statistics): Adjust.
	(dump_bitmap_statistics): Likewise.
	* bt-load.c (migrate_btr_defs): Print with PRId64.
	* cfg.c (dump_edge_info, dump_bb_info): Likewise.
	(MAX_SAFE_MULTIPLIER): Adjust.
	* cfghooks.c (dump_bb_for_graph): Print with PRId64.
	* cgraph.c (cgraph_redirect_edge_call_stmt_to_callee,
	dump_cgraph_node): Likewise.
	* final.c (dump_basic_block_info): Likewise.
	* gcov-dump.c (tag_counters, tag_summary, dump_working_sets): Likewise.
	* gcov.c (format_gcov): Likewise.
	* ipa-cp.c (good_cloning_opportunity_p): Likewise.  Use int64_t
	for calculation.
	(get_clone_agg_value): Use HOST_WIDE_INT for offset.
	* ipa-inline.c (compute_max_insns): Use int64_t for calcuation.
	(inline_small_functions, dump_overall_stats, dump_inline_stats):
	Use PRId64 for dumping.
	* ipa-profile.c (dump_histogram, ipa_profile): Likewise.
	* ira-color.c (struct allocno_hard_regs): Use int64_t for cost.
	(add_allocno_hard_regs): Adjust.
	* loop-doloop.c (doloop_modify): Print using PRId64.
	* loop-iv.c (inverse): Compute in uint64_t.
	(determine_max_iter, iv_number_of_iterations): Likewise.
	* loop-unroll.c (decide_peel_completely, decide_peel_simple):
	Print using PRId64.
	* lto-streamer-out.c (write_symbol): Use uint64_t.
	* mcf.c (CAP_INFINITY): Use int64_t maximum.
	(dump_fixup_edge, create_fixup_graph, cancel_negative_cycle,
	find_max_flow, adjust_cfg_counts): Use int64_t and dump with PRId64.
	* modulo-sched.c (const_iteration_count): Use int64_t.
	(sms_schedule): Dump using PRId64.
	* predict.c (dump_prediction): Likewise.
	* pretty-print.h (pp_widest_integer): Remove.
	* profile.c (get_working_sets, is_edge_inconsistent,
	is_inconsistent, read_profile_edge_counts): Dump using PRId64.
	* tree-pretty-print.c (pp_double_int): Remove case handling
	HOST_BITS_PER_DOUBLE_INT == HOST_BITS_PER_WIDEST_INT.
	* tree-ssa-math-opts.c (struct symbolic_number): Use uint64_t
	and adjust users.
	(pass_optimize_bswap::execute): Remove restriction on hosts.
	* tree-streamer-in.c (streamer_alloc_tree): Use HOST_WIDE_INT.
	* tree-streamer-out.c (streamer_write_tree_header): Likewise.
	* tree.c (widest_int_cst_value): Remove.
	* tree.h (widest_int_cst_value): Likewise.
	* value-prof.c (dump_histogram_value): Print using PRId64.
	* gengtype.c (main): Also inject int64_t.
	* ggc-page.c (struct max_alignment): Use int64_t.
	* alloc-pool.c (struct allocation_object_def): Likewise.
	* ira-conflicts.c (build_conflict_bit_table): Use uint64_t
	for computation.
	* doc/tm.texi.in: Remove reference to HOST_WIDEST_INT.
	* doc/tm.texi: Regenerated.
	* gengtype-lex.l (IWORD): Handle [u]int64_t.
	* config/sh/sh.c (expand_cbranchdi4): Use gcov_type.
	* config/mmix/mmix-protos.h (mmix_intval, mmix_shiftable_wyde_value,
	mmix_output_register_setting): Use [u]int64_t in prototypes.
	* config/mmix/mmix.c (mmix_print_operand, mmix_output_register_setting,
	mmix_shiftable_wyde_value, mmix_output_shiftvalue_op_from_str,
	mmix_output_octa, mmix_output_shifted_value): Adjust.
	(mmix_intval): Adjust.  Remove unreachable case.
	* config/mmix/mmix.md (*nonlocal_goto_receiver_expanded): Use
	int64_t.

	lto/
	* lto.c (lto_parse_hex): Use int64_t.
	(lto_resolution_read): Likewise.

From-SVN: r210931
This commit is contained in:
Richard Biener 2014-05-26 10:42:43 +00:00 committed by Richard Biener
parent 97563bc895
commit a9243bfced
48 changed files with 381 additions and 368 deletions

View File

@ -1,3 +1,83 @@
2014-05-26 Richard Biener <rguenther@suse.de>
* system.h: Define __STDC_FORMAT_MACROS before
including inttypes.h.
* hwint.h (HOST_WIDEST_INT, HOST_BITS_PER_WIDEST_INT,
HOST_WIDEST_INT_PRINT, HOST_WIDEST_INT_PRINT_DEC,
HOST_WIDEST_INT_PRINT_DEC_C, HOST_WIDEST_INT_PRINT_UNSIGNED,
HOST_WIDEST_INT_PRINT_HEX, HOST_WIDEST_INT_PRINT_DOUBLE_HEX,
HOST_WIDEST_INT_C): Remove.
(PRId64, PRIi64, PRIo64, PRIu64, PRIx64, PRIX64): Define
if C99 inttypes.h is not available.
* coretypes.h (gcov_type, gcov_type_unsigned): Use [u]int64_t.
* gcov-io.h (gcov_type, gcov_type_unsigned): Likewise.
* gcov-io.c (gcov_histo_index): Drop non-64bit hwi case.
* cfgloop.h (struct niter_desc): Use uint64_t for niter field.
* bitmap.c (struct bitmap_descriptor_d): Use uint64_t for counters.
(struct output_info): Likewise.
(print_statistics): Adjust.
(dump_bitmap_statistics): Likewise.
* bt-load.c (migrate_btr_defs): Print with PRId64.
* cfg.c (dump_edge_info, dump_bb_info): Likewise.
(MAX_SAFE_MULTIPLIER): Adjust.
* cfghooks.c (dump_bb_for_graph): Print with PRId64.
* cgraph.c (cgraph_redirect_edge_call_stmt_to_callee,
dump_cgraph_node): Likewise.
* final.c (dump_basic_block_info): Likewise.
* gcov-dump.c (tag_counters, tag_summary, dump_working_sets): Likewise.
* gcov.c (format_gcov): Likewise.
* ipa-cp.c (good_cloning_opportunity_p): Likewise. Use int64_t
for calculation.
(get_clone_agg_value): Use HOST_WIDE_INT for offset.
* ipa-inline.c (compute_max_insns): Use int64_t for calcuation.
(inline_small_functions, dump_overall_stats, dump_inline_stats):
Use PRId64 for dumping.
* ipa-profile.c (dump_histogram, ipa_profile): Likewise.
* ira-color.c (struct allocno_hard_regs): Use int64_t for cost.
(add_allocno_hard_regs): Adjust.
* loop-doloop.c (doloop_modify): Print using PRId64.
* loop-iv.c (inverse): Compute in uint64_t.
(determine_max_iter, iv_number_of_iterations): Likewise.
* loop-unroll.c (decide_peel_completely, decide_peel_simple):
Print using PRId64.
* lto-streamer-out.c (write_symbol): Use uint64_t.
* mcf.c (CAP_INFINITY): Use int64_t maximum.
(dump_fixup_edge, create_fixup_graph, cancel_negative_cycle,
find_max_flow, adjust_cfg_counts): Use int64_t and dump with PRId64.
* modulo-sched.c (const_iteration_count): Use int64_t.
(sms_schedule): Dump using PRId64.
* predict.c (dump_prediction): Likewise.
* pretty-print.h (pp_widest_integer): Remove.
* profile.c (get_working_sets, is_edge_inconsistent,
is_inconsistent, read_profile_edge_counts): Dump using PRId64.
* tree-pretty-print.c (pp_double_int): Remove case handling
HOST_BITS_PER_DOUBLE_INT == HOST_BITS_PER_WIDEST_INT.
* tree-ssa-math-opts.c (struct symbolic_number): Use uint64_t
and adjust users.
(pass_optimize_bswap::execute): Remove restriction on hosts.
* tree-streamer-in.c (streamer_alloc_tree): Use HOST_WIDE_INT.
* tree-streamer-out.c (streamer_write_tree_header): Likewise.
* tree.c (widest_int_cst_value): Remove.
* tree.h (widest_int_cst_value): Likewise.
* value-prof.c (dump_histogram_value): Print using PRId64.
* gengtype.c (main): Also inject int64_t.
* ggc-page.c (struct max_alignment): Use int64_t.
* alloc-pool.c (struct allocation_object_def): Likewise.
* ira-conflicts.c (build_conflict_bit_table): Use uint64_t
for computation.
* doc/tm.texi.in: Remove reference to HOST_WIDEST_INT.
* doc/tm.texi: Regenerated.
* gengtype-lex.l (IWORD): Handle [u]int64_t.
* config/sh/sh.c (expand_cbranchdi4): Use gcov_type.
* config/mmix/mmix-protos.h (mmix_intval, mmix_shiftable_wyde_value,
mmix_output_register_setting): Use [u]int64_t in prototypes.
* config/mmix/mmix.c (mmix_print_operand, mmix_output_register_setting,
mmix_shiftable_wyde_value, mmix_output_shiftvalue_op_from_str,
mmix_output_octa, mmix_output_shifted_value): Adjust.
(mmix_intval): Adjust. Remove unreachable case.
* config/mmix/mmix.md (*nonlocal_goto_receiver_expanded): Use
int64_t.
2014-05-26 Richard Biener <rguenther@suse.de>
* configure.ac: Drop __int64 type check. Insist that we

View File

@ -43,7 +43,7 @@ typedef struct allocation_object_def
the allocated object may be even smaller than this structure.
We do not care about alignment for floating-point types. */
char *align_p;
HOST_WIDEST_INT align_i;
int64_t align_i;
} u;
} allocation_object;

View File

@ -34,11 +34,11 @@ struct bitmap_descriptor_d
const char *file;
int line;
int created;
unsigned HOST_WIDEST_INT allocated;
unsigned HOST_WIDEST_INT peak;
unsigned HOST_WIDEST_INT current;
unsigned HOST_WIDEST_INT nsearches;
unsigned HOST_WIDEST_INT search_iter;
uint64_t allocated;
uint64_t peak;
uint64_t current;
uint64_t nsearches;
uint64_t search_iter;
};
typedef struct bitmap_descriptor_d *bitmap_descriptor;
@ -2144,8 +2144,8 @@ bitmap_print (FILE *file, const_bitmap head, const char *prefix,
/* Used to accumulate statistics about bitmap sizes. */
struct output_info
{
unsigned HOST_WIDEST_INT size;
unsigned HOST_WIDEST_INT count;
uint64_t size;
uint64_t count;
};
/* Called via hash_table::traverse. Output bitmap descriptor pointed out by
@ -2165,10 +2165,8 @@ print_statistics (bitmap_descriptor_d **slot, output_info *i)
sprintf (s, "%s:%i (%s)", s1, d->line, d->function);
s[41] = 0;
fprintf (stderr,
"%-41s %9u"
" %15"HOST_WIDEST_INT_PRINT"d %15"HOST_WIDEST_INT_PRINT"d"
" %15"HOST_WIDEST_INT_PRINT"d"
" %10"HOST_WIDEST_INT_PRINT"d %10"HOST_WIDEST_INT_PRINT"d\n",
"%-41s %9u %15"PRId64" %15"PRId64" %15"PRId64
" %10"PRId64" %10"PRId64"\n",
s, d->created,
d->allocated, d->peak, d->current,
d->nsearches, d->search_iter);
@ -2201,7 +2199,7 @@ dump_bitmap_statistics (void)
bitmap_desc_hash.traverse <output_info *, print_statistics> (&info);
fprintf (stderr, "---------------------------------------------------------------------------------\n");
fprintf (stderr,
"%-41s %9"HOST_WIDEST_INT_PRINT"d %15"HOST_WIDEST_INT_PRINT"d\n",
"%-41s %9"PRId64" %15"PRId64"\n",
"Total", info.count, info.size);
fprintf (stderr, "---------------------------------------------------------------------------------\n");
}

View File

@ -1411,9 +1411,9 @@ migrate_btr_defs (enum reg_class btr_class, int allow_callee_save)
{
basic_block bb = BASIC_BLOCK_FOR_FN (cfun, i);
fprintf (dump_file,
"Basic block %d: count = " HOST_WIDEST_INT_PRINT_DEC
"Basic block %d: count = %" PRId64
" loop-depth = %d idom = %d\n",
i, (HOST_WIDEST_INT) bb->count, bb_loop_depth (bb),
i, (int64_t) bb->count, bb_loop_depth (bb),
get_immediate_dominator (CDI_DOMINATORS, bb)->index);
}
}

View File

@ -486,7 +486,7 @@ dump_edge_info (FILE *file, edge e, int flags, int do_succ)
if (e->count && do_details)
{
fputs (" count:", file);
fprintf (file, HOST_WIDEST_INT_PRINT_DEC, e->count);
fprintf (file, "%"PRId64, e->count);
}
if (e->flags && do_details)
@ -734,8 +734,8 @@ dump_bb_info (FILE *outf, basic_block bb, int indent, int flags,
if (flags & TDF_DETAILS)
{
struct function *fun = DECL_STRUCT_FUNCTION (current_function_decl);
fprintf (outf, ", count " HOST_WIDEST_INT_PRINT_DEC,
(HOST_WIDEST_INT) bb->count);
fprintf (outf, ", count " "%"PRId64,
(int64_t) bb->count);
fprintf (outf, ", freq %i", bb->frequency);
if (maybe_hot_bb_p (fun, bb))
fputs (", maybe hot", outf);
@ -961,7 +961,7 @@ scale_bbs_frequencies_int (basic_block *bbs, int nbbs, int num, int den)
/* numbers smaller than this value are safe to multiply without getting
64bit overflow. */
#define MAX_SAFE_MULTIPLIER (1 << (sizeof (HOST_WIDEST_INT) * 4 - 1))
#define MAX_SAFE_MULTIPLIER (1 << (sizeof (int64_t) * 4 - 1))
/* Multiply all frequencies of basic blocks in array BBS of length NBBS
by NUM/DEN, in gcov_type arithmetic. More accurate than previous

View File

@ -310,7 +310,7 @@ dump_bb_for_graph (pretty_printer *pp, basic_block bb)
internal_error ("%s does not support dump_bb_for_graph",
cfg_hooks->name);
if (bb->count)
pp_printf (pp, "COUNT:" HOST_WIDEST_INT_PRINT_DEC, bb->count);
pp_printf (pp, "COUNT:" "%"PRId64, bb->count);
pp_printf (pp, " FREQ:%i |", bb->frequency);
pp_write_text_to_stream (pp);
if (!(dump_flags & TDF_SLIM))

View File

@ -400,7 +400,7 @@ struct GTY(()) niter_desc
bool const_iter;
/* Number of iterations if constant. */
unsigned HOST_WIDEST_INT niter;
uint64_t niter;
/* Assumptions under that the rest of the information is valid. */
rtx assumptions;

View File

@ -1377,12 +1377,12 @@ cgraph_redirect_edge_call_stmt_to_callee (struct cgraph_edge *e)
if (dump_file)
fprintf (dump_file,
"Expanding speculative call of %s/%i -> %s/%i count:"
HOST_WIDEST_INT_PRINT_DEC"\n",
"%"PRId64"\n",
xstrdup (e->caller->name ()),
e->caller->order,
xstrdup (e->callee->name ()),
e->callee->order,
(HOST_WIDEST_INT)e->count);
(int64_t)e->count);
gcc_assert (e2->speculative);
push_cfun (DECL_STRUCT_FUNCTION (e->caller->decl));
new_stmt = gimple_ic (e->call_stmt, cgraph (ref->referred),
@ -1975,8 +1975,8 @@ dump_cgraph_node (FILE *f, struct cgraph_node *node)
fprintf (f, " First run: %i\n", node->tp_first_run);
fprintf (f, " Function flags:");
if (node->count)
fprintf (f, " executed "HOST_WIDEST_INT_PRINT_DEC"x",
(HOST_WIDEST_INT)node->count);
fprintf (f, " executed %"PRId64"x",
(int64_t)node->count);
if (node->origin)
fprintf (f, " nested in: %s", node->origin->asm_name ());
if (gimple_has_body_p (node->decl))
@ -2027,8 +2027,8 @@ dump_cgraph_node (FILE *f, struct cgraph_node *node)
fprintf (f, "%s/%i ", edge->caller->asm_name (),
edge->caller->order);
if (edge->count)
fprintf (f, "("HOST_WIDEST_INT_PRINT_DEC"x) ",
(HOST_WIDEST_INT)edge->count);
fprintf (f, "(%"PRId64"x) ",
(int64_t)edge->count);
if (edge->frequency)
fprintf (f, "(%.2f per call) ",
edge->frequency / (double)CGRAPH_FREQ_BASE);
@ -2054,8 +2054,8 @@ dump_cgraph_node (FILE *f, struct cgraph_node *node)
if (edge->indirect_inlining_edge)
fprintf (f, "(indirect_inlining) ");
if (edge->count)
fprintf (f, "("HOST_WIDEST_INT_PRINT_DEC"x) ",
(HOST_WIDEST_INT)edge->count);
fprintf (f, "(%"PRId64"x) ",
(int64_t)edge->count);
if (edge->frequency)
fprintf (f, "(%.2f per call) ",
edge->frequency / (double)CGRAPH_FREQ_BASE);

View File

@ -39,9 +39,9 @@ extern void mmix_asm_output_reg_push (FILE *, int);
extern void mmix_asm_output_reg_pop (FILE *, int);
extern void mmix_asm_output_skip (FILE *, int);
extern void mmix_asm_output_align (FILE *, int);
extern HOST_WIDEST_INT mmix_intval (const_rtx);
extern int mmix_shiftable_wyde_value (unsigned HOST_WIDEST_INT);
extern void mmix_output_register_setting (FILE *, int, HOST_WIDEST_INT, int);
extern int64_t mmix_intval (const_rtx);
extern int mmix_shiftable_wyde_value (uint64_t);
extern void mmix_output_register_setting (FILE *, int, int64_t, int);
extern int mmix_opposite_regno (int, int);
extern int mmix_local_regno (int);
extern unsigned mmix_dbx_register_number (unsigned);

View File

@ -117,10 +117,10 @@ static int mmix_output_destination_register;
static void mmix_option_override (void);
static void mmix_asm_output_source_filename (FILE *, const char *);
static void mmix_output_shiftvalue_op_from_str
(FILE *, const char *, HOST_WIDEST_INT);
static void mmix_output_shifted_value (FILE *, HOST_WIDEST_INT);
(FILE *, const char *, int64_t);
static void mmix_output_shifted_value (FILE *, int64_t);
static void mmix_output_condition (FILE *, const_rtx, int);
static void mmix_output_octa (FILE *, HOST_WIDEST_INT, int);
static void mmix_output_octa (FILE *, int64_t, int);
static bool mmix_assemble_integer (rtx, unsigned int, int);
static struct machine_function *mmix_init_machine_status (void);
static void mmix_encode_section_info (tree, rtx, int);
@ -1588,25 +1588,25 @@ mmix_print_operand (FILE *stream, rtx x, int code)
output. */
case 'A':
mmix_output_shiftvalue_op_from_str (stream, "ANDN",
~(unsigned HOST_WIDEST_INT)
~(uint64_t)
mmix_intval (x));
return;
case 'i':
mmix_output_shiftvalue_op_from_str (stream, "INC",
(unsigned HOST_WIDEST_INT)
(uint64_t)
mmix_intval (x));
return;
case 'o':
mmix_output_shiftvalue_op_from_str (stream, "OR",
(unsigned HOST_WIDEST_INT)
(uint64_t)
mmix_intval (x));
return;
case 's':
mmix_output_shiftvalue_op_from_str (stream, "SET",
(unsigned HOST_WIDEST_INT)
(uint64_t)
mmix_intval (x));
return;
@ -1628,8 +1628,8 @@ mmix_print_operand (FILE *stream, rtx x, int code)
fatal_insn ("MMIX Internal: Bad value for 'm', not a CONST_INT",
x);
}
fprintf (stream, HOST_WIDEST_INT_PRINT_DEC,
(HOST_WIDEST_INT) (mmix_intval (x) - 1));
fprintf (stream, "%"PRId64,
(int64_t) (mmix_intval (x) - 1));
return;
case 'p':
@ -1667,11 +1667,11 @@ mmix_print_operand (FILE *stream, rtx x, int code)
return;
case 'v':
mmix_output_shifted_value (stream, (HOST_WIDEST_INT) mmix_intval (x));
mmix_output_shifted_value (stream, (int64_t) mmix_intval (x));
return;
case 'V':
mmix_output_shifted_value (stream, (HOST_WIDEST_INT) ~mmix_intval (x));
mmix_output_shifted_value (stream, (int64_t) ~mmix_intval (x));
return;
case 'W':
@ -2294,37 +2294,37 @@ mmix_expand_epilogue (void)
void
mmix_output_register_setting (FILE *stream,
int regno,
HOST_WIDEST_INT value,
int64_t value,
int do_begin_end)
{
if (do_begin_end)
fprintf (stream, "\t");
if (insn_const_int_ok_for_constraint (value, CONSTRAINT_K))
fprintf (stream, "NEGU %s,0," HOST_WIDEST_INT_PRINT_DEC, reg_names[regno], -value);
else if (mmix_shiftable_wyde_value ((unsigned HOST_WIDEST_INT) value))
fprintf (stream, "NEGU %s,0,%"PRId64, reg_names[regno], -value);
else if (mmix_shiftable_wyde_value ((uint64_t) value))
{
/* First, the one-insn cases. */
mmix_output_shiftvalue_op_from_str (stream, "SET",
(unsigned HOST_WIDEST_INT)
(uint64_t)
value);
fprintf (stream, " %s,", reg_names[regno]);
mmix_output_shifted_value (stream, (unsigned HOST_WIDEST_INT) value);
mmix_output_shifted_value (stream, (uint64_t) value);
}
else if (mmix_shiftable_wyde_value (-(unsigned HOST_WIDEST_INT) value))
else if (mmix_shiftable_wyde_value (-(uint64_t) value))
{
/* We do this to get a bit more legible assembly code. The next
alternative is mostly redundant with this. */
mmix_output_shiftvalue_op_from_str (stream, "SET",
-(unsigned HOST_WIDEST_INT)
-(uint64_t)
value);
fprintf (stream, " %s,", reg_names[regno]);
mmix_output_shifted_value (stream, -(unsigned HOST_WIDEST_INT) value);
mmix_output_shifted_value (stream, -(uint64_t) value);
fprintf (stream, "\n\tNEGU %s,0,%s", reg_names[regno],
reg_names[regno]);
}
else if (mmix_shiftable_wyde_value (~(unsigned HOST_WIDEST_INT) value))
else if (mmix_shiftable_wyde_value (~(uint64_t) value))
{
/* Slightly more expensive, the two-insn cases. */
@ -2335,10 +2335,10 @@ mmix_output_register_setting (FILE *stream,
anyone else cares). */
mmix_output_shiftvalue_op_from_str (stream, "SET",
~(unsigned HOST_WIDEST_INT)
~(uint64_t)
value);
fprintf (stream, " %s,", reg_names[regno]);
mmix_output_shifted_value (stream, ~(unsigned HOST_WIDEST_INT) value);
mmix_output_shifted_value (stream, ~(uint64_t) value);
fprintf (stream, "\n\tNOR %s,%s,0", reg_names[regno],
reg_names[regno]);
}
@ -2350,7 +2350,7 @@ mmix_output_register_setting (FILE *stream,
const char *line_begin = "";
int insns = 0;
int i;
HOST_WIDEST_INT tmpvalue = value;
int64_t tmpvalue = value;
/* Compute the number of insns needed to output this constant. */
for (i = 0; i < 4 && tmpvalue != 0; i++)
@ -2405,7 +2405,7 @@ mmix_output_register_setting (FILE *stream,
else return 0. */
int
mmix_shiftable_wyde_value (unsigned HOST_WIDEST_INT value)
mmix_shiftable_wyde_value (uint64_t value)
{
/* Shift by 16 bits per group, stop when we've found two groups with
nonzero bits. */
@ -2487,7 +2487,7 @@ mmix_emit_sp_add (HOST_WIDE_INT offset)
static void
mmix_output_shiftvalue_op_from_str (FILE *stream,
const char *mainop,
HOST_WIDEST_INT value)
int64_t value)
{
static const char *const op_part[] = {"L", "ML", "MH", "H"};
int i;
@ -2495,7 +2495,7 @@ mmix_output_shiftvalue_op_from_str (FILE *stream,
if (! mmix_shiftable_wyde_value (value))
{
char s[sizeof ("0xffffffffffffffff")];
sprintf (s, HOST_WIDEST_INT_PRINT_HEX, value);
sprintf (s, "%#"PRIx64, value);
internal_error ("MMIX Internal: %s is not a shiftable int", s);
}
@ -2518,26 +2518,26 @@ mmix_output_shiftvalue_op_from_str (FILE *stream,
/* Print a 64-bit value, optionally prefixed by assembly pseudo. */
static void
mmix_output_octa (FILE *stream, HOST_WIDEST_INT value, int do_begin_end)
mmix_output_octa (FILE *stream, int64_t value, int do_begin_end)
{
if (do_begin_end)
fprintf (stream, "\tOCTA ");
/* Provide a few alternative output formats depending on the number, to
improve legibility of assembler output. */
if ((value < (HOST_WIDEST_INT) 0 && value > (HOST_WIDEST_INT) -10000)
|| (value >= (HOST_WIDEST_INT) 0 && value <= (HOST_WIDEST_INT) 16384))
if ((value < (int64_t) 0 && value > (int64_t) -10000)
|| (value >= (int64_t) 0 && value <= (int64_t) 16384))
fprintf (stream, "%d", (int) value);
else if (value > (HOST_WIDEST_INT) 0
&& value < ((HOST_WIDEST_INT) 1 << 31) * 2)
else if (value > (int64_t) 0
&& value < ((int64_t) 1 << 31) * 2)
fprintf (stream, "#%x", (unsigned int) value);
else if (sizeof (HOST_WIDE_INT) == sizeof (HOST_WIDEST_INT))
else if (sizeof (HOST_WIDE_INT) == sizeof (int64_t))
/* We need to avoid the not-so-universal "0x" prefix; we need the
pure hex-digits together with the mmixal "#" hex prefix. */
fprintf (stream, "#" HOST_WIDE_INT_PRINT_HEX_PURE,
(HOST_WIDE_INT) value);
else /* Need to avoid the hex output; there's no ...WIDEST...HEX_PURE. */
fprintf (stream, HOST_WIDEST_INT_PRINT_UNSIGNED, value);
fprintf (stream, "%"PRIu64, value);
if (do_begin_end)
fprintf (stream, "\n");
@ -2547,14 +2547,14 @@ mmix_output_octa (FILE *stream, HOST_WIDEST_INT value, int do_begin_end)
be output with an operand). */
static void
mmix_output_shifted_value (FILE *stream, HOST_WIDEST_INT value)
mmix_output_shifted_value (FILE *stream, int64_t value)
{
int i;
if (! mmix_shiftable_wyde_value (value))
{
char s[16+2+1];
sprintf (s, HOST_WIDEST_INT_PRINT_HEX, value);
sprintf (s, "%#"PRIx64, value);
internal_error ("MMIX Internal: %s is not a shiftable int", s);
}
@ -2687,10 +2687,10 @@ mmix_output_condition (FILE *stream, const_rtx x, int reversed)
/* Return the bit-value for a const_int or const_double. */
HOST_WIDEST_INT
int64_t
mmix_intval (const_rtx x)
{
unsigned HOST_WIDEST_INT retval;
uint64_t retval;
if (GET_CODE (x) == CONST_INT)
return INTVAL (x);
@ -2699,22 +2699,7 @@ mmix_intval (const_rtx x)
gcc-2.7.2 is broken. I still want people to be able to use it for
cross-compilation to MMIX. */
if (GET_CODE (x) == CONST_DOUBLE && GET_MODE (x) == VOIDmode)
{
if (sizeof (HOST_WIDE_INT) < sizeof (HOST_WIDEST_INT))
{
retval = (unsigned) CONST_DOUBLE_LOW (x) / 2;
retval *= 2;
retval |= CONST_DOUBLE_LOW (x) & 1;
retval |=
(unsigned HOST_WIDEST_INT) CONST_DOUBLE_HIGH (x)
<< (HOST_BITS_PER_LONG)/2 << (HOST_BITS_PER_LONG)/2;
}
else
retval = CONST_DOUBLE_HIGH (x);
return retval;
}
return CONST_DOUBLE_HIGH (x);
if (GET_CODE (x) == CONST_DOUBLE)
{
@ -2733,9 +2718,9 @@ mmix_intval (const_rtx x)
sign-extended to unsigned long long(!) when they're of
different size (usually 32-bit hosts). */
return
((unsigned HOST_WIDEST_INT) (unsigned long) bits[0]
<< (unsigned HOST_WIDEST_INT) 32U)
| (unsigned HOST_WIDEST_INT) (unsigned long) bits[1];
((uint64_t) (unsigned long) bits[0]
<< (uint64_t) 32U)
| (uint64_t) (unsigned long) bits[1];
}
else if (GET_MODE (x) == SFmode)
{

View File

@ -1168,7 +1168,7 @@ DIVU %1,%1,%2\;GET %0,:rR\;NEGU %2,0,%0\;CSNN %0,$255,%2")
}
else
{
HOST_WIDEST_INT offs = INTVAL (XEXP (operands[1], 1));
int64_t offs = INTVAL (XEXP (operands[1], 1));
offs += MMIX_fp_rO_OFFSET;
if (insn_const_int_ok_for_constraint (offs, CONSTRAINT_I))

View File

@ -2088,12 +2088,11 @@ expand_cbranchdi4 (rtx *operands, enum rtx_code comparison)
lsw_taken_prob = prob ? REG_BR_PROB_BASE : 0;
else
{
gcc_assert (HOST_BITS_PER_WIDEST_INT >= 64);
lsw_taken_prob
= (prob
? (REG_BR_PROB_BASE
- ((HOST_WIDEST_INT) REG_BR_PROB_BASE * rev_prob
/ ((HOST_WIDEST_INT) prob << 32)))
- ((gcov_type) REG_BR_PROB_BASE * rev_prob
/ ((gcov_type) prob << 32)))
: 0);
}
}

View File

@ -43,8 +43,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#ifndef USED_FOR_TARGET
typedef HOST_WIDEST_INT gcov_type;
typedef unsigned HOST_WIDEST_INT gcov_type_unsigned;
typedef int64_t gcov_type;
typedef uint64_t gcov_type_unsigned;
struct bitmap_head;
typedef struct bitmap_head *bitmap;

View File

@ -1057,7 +1057,7 @@ the default value is @code{BIGGEST_ALIGNMENT}.
On systems that use ELF, the default (in @file{config/elfos.h}) is
the largest supported 32-bit ELF section alignment representable on
a 32-bit host e.g. @samp{(((unsigned HOST_WIDEST_INT) 1 << 28) * 8)}.
a 32-bit host e.g. @samp{(((uint64_t) 1 << 28) * 8)}.
On 32-bit ELF the largest supported section alignment in bits is
@samp{(0x80000000 * 8)}, but this is not representable on 32-bit hosts.
@end defmac

View File

@ -1011,7 +1011,7 @@ the default value is @code{BIGGEST_ALIGNMENT}.
On systems that use ELF, the default (in @file{config/elfos.h}) is
the largest supported 32-bit ELF section alignment representable on
a 32-bit host e.g. @samp{(((unsigned HOST_WIDEST_INT) 1 << 28) * 8)}.
a 32-bit host e.g. @samp{(((uint64_t) 1 << 28) * 8)}.
On 32-bit ELF the largest supported section alignment in bits is
@samp{(0x80000000 * 8)}, but this is not representable on 32-bit hosts.
@end defmac

View File

@ -1925,7 +1925,7 @@ dump_basic_block_info (FILE *file, rtx insn, basic_block *start_to_bb,
if (bb->frequency)
fprintf (file, " freq:%d", bb->frequency);
if (bb->count)
fprintf (file, " count:" HOST_WIDEST_INT_PRINT_DEC,
fprintf (file, " count:%"PRId64,
bb->count);
fprintf (file, " seq:%d", (*bb_seqn)++);
fprintf (file, "\n%s PRED:", ASM_COMMENT_START);

View File

@ -444,7 +444,7 @@ tag_counters (const char *filename ATTRIBUTE_UNUSED,
count = gcov_read_counter ();
printf (" ");
printf (HOST_WIDEST_INT_PRINT_DEC, count);
printf ("%"PRId64, count);
}
}
}
@ -467,12 +467,12 @@ tag_summary (const char *filename ATTRIBUTE_UNUSED,
printf ("\t\tcounts=%u, runs=%u",
summary.ctrs[ix].num, summary.ctrs[ix].runs);
printf (", sum_all=" HOST_WIDEST_INT_PRINT_DEC,
(HOST_WIDEST_INT)summary.ctrs[ix].sum_all);
printf (", run_max=" HOST_WIDEST_INT_PRINT_DEC,
(HOST_WIDEST_INT)summary.ctrs[ix].run_max);
printf (", sum_max=" HOST_WIDEST_INT_PRINT_DEC,
(HOST_WIDEST_INT)summary.ctrs[ix].sum_max);
printf (", sum_all=%"PRId64,
(int64_t)summary.ctrs[ix].sum_all);
printf (", run_max=%"PRId64,
(int64_t)summary.ctrs[ix].run_max);
printf (", sum_max=%"PRId64,
(int64_t)summary.ctrs[ix].sum_max);
if (ix != GCOV_COUNTER_ARCS)
continue;
printf ("\n");
@ -486,11 +486,11 @@ tag_summary (const char *filename ATTRIBUTE_UNUSED,
printf ("\n");
print_prefix (filename, 0, 0);
printf ("\t\t%d: num counts=%u, min counter="
HOST_WIDEST_INT_PRINT_DEC ", cum_counter="
HOST_WIDEST_INT_PRINT_DEC,
"%"PRId64 ", cum_counter="
"%"PRId64,
h_ix, histo_bucket->num_counters,
(HOST_WIDEST_INT)histo_bucket->min_value,
(HOST_WIDEST_INT)histo_bucket->cum_value);
(int64_t)histo_bucket->min_value,
(int64_t)histo_bucket->cum_value);
}
if (flag_dump_working_sets)
dump_working_sets (filename, &summary.ctrs[ix]);
@ -522,9 +522,9 @@ dump_working_sets (const char *filename ATTRIBUTE_UNUSED,
printf ("\n");
print_prefix (filename, 0, 0);
printf ("\t\t%u.%02u%%: num counts=%u, min counter="
HOST_WIDEST_INT_PRINT_DEC,
"%"PRId64,
pct / 100, pct - (pct / 100 * 100),
ws_info->num_counters,
(HOST_WIDEST_INT)ws_info->min_counter);
(int64_t)ws_info->min_counter);
}
}

View File

@ -718,20 +718,8 @@ gcov_histo_index (gcov_type value)
r = sizeof (long long) * __CHAR_BIT__ - 1 - __builtin_clzll (v);
#else
/* We use floor_log2 from hwint.c, which takes a HOST_WIDE_INT
that is either 32 or 64 bits, and gcov_type_unsigned may be 64 bits.
Need to check for the case where gcov_type_unsigned is 64 bits
and HOST_WIDE_INT is 32 bits and handle it specially. */
#if HOST_BITS_PER_WIDEST_INT == HOST_BITS_PER_WIDE_INT
that is 64 bits and gcov_type_unsigned is 64 bits. */
r = floor_log2 (v);
#elif HOST_BITS_PER_WIDEST_INT == 2 * HOST_BITS_PER_WIDE_INT
HOST_WIDE_INT hwi_v = v >> HOST_BITS_PER_WIDE_INT;
if (hwi_v)
r = floor_log2 (hwi_v) + HOST_BITS_PER_WIDE_INT;
else
r = floor_log2 ((HOST_WIDE_INT)v);
#else
gcc_unreachable ();
#endif
#endif
}

View File

@ -172,8 +172,8 @@ typedef unsigned gcov_position_t;
/* gcov_type is typedef'd elsewhere for the compiler */
#if IN_GCOV
#define GCOV_LINKAGE static
typedef HOST_WIDEST_INT gcov_type;
typedef unsigned HOST_WIDEST_INT gcov_type_unsigned;
typedef int64_t gcov_type;
typedef uint64_t gcov_type_unsigned;
#if IN_GCOV > 0
#include <sys/types.h>
#endif

View File

@ -1846,7 +1846,7 @@ format_gcov (gcov_type top, gcov_type bottom, int dp)
}
}
else
sprintf (buffer, HOST_WIDEST_INT_PRINT_DEC, (HOST_WIDEST_INT)top);
sprintf (buffer, "%"PRId64, (int64_t)top);
return buffer;
}

View File

@ -52,7 +52,7 @@ update_lineno (const char *l, size_t len)
CID [[:alpha:]_][[:alnum:]_]*
WS [[:space:]]+
HWS [ \t\r\v\f]*
IWORD short|long|(un)?signed|char|int|HOST_WIDE_INT|HOST_WIDEST_INT|bool|size_t|BOOL_BITFIELD|CPPCHAR_SIGNED_T|ino_t|dev_t|HARD_REG_SET
IWORD short|long|(un)?signed|char|int|HOST_WIDE_INT|uint64_t|int64_t|bool|size_t|BOOL_BITFIELD|CPPCHAR_SIGNED_T|ino_t|dev_t|HARD_REG_SET
ITYPE {IWORD}({WS}{IWORD})*
/* Include '::' in identifiers to capture C++ scope qualifiers. */
ID {CID}({HWS}::{HWS}{CID})*

View File

@ -5582,6 +5582,7 @@ main (int argc, char **argv)
POS_HERE (do_scalar_typedef ("double_int", &pos));
POS_HERE (do_scalar_typedef ("offset_int", &pos));
POS_HERE (do_scalar_typedef ("widest_int", &pos));
POS_HERE (do_scalar_typedef ("int64_t", &pos));
POS_HERE (do_scalar_typedef ("uint64_t", &pos));
POS_HERE (do_scalar_typedef ("uint8", &pos));
POS_HERE (do_scalar_typedef ("uintptr_t", &pos));

View File

@ -156,7 +156,7 @@ along with GCC; see the file COPYING3. If not see
struct max_alignment {
char c;
union {
HOST_WIDEST_INT i;
int64_t i;
void *p;
} u;
};

View File

@ -135,17 +135,21 @@ typedef HOST_WIDE_INT __gcc_host_wide_int__;
#define HOST_WIDE_INT_PRINT_HEX "%#" HOST_WIDE_INT_PRINT "x"
#define HOST_WIDE_INT_PRINT_HEX_PURE "%" HOST_WIDE_INT_PRINT "x"
/* Set HOST_WIDEST_INT. This is a 64-bit type. */
#define HOST_WIDEST_INT HOST_WIDE_INT
#define HOST_BITS_PER_WIDEST_INT HOST_BITS_PER_WIDE_INT
#define HOST_WIDEST_INT_PRINT HOST_WIDE_INT_PRINT
#define HOST_WIDEST_INT_PRINT_DEC HOST_WIDE_INT_PRINT_DEC
#define HOST_WIDEST_INT_PRINT_DEC_C HOST_WIDE_INT_PRINT_DEC_C
#define HOST_WIDEST_INT_PRINT_UNSIGNED HOST_WIDE_INT_PRINT_UNSIGNED
#define HOST_WIDEST_INT_PRINT_HEX HOST_WIDE_INT_PRINT_HEX
#define HOST_WIDEST_INT_PRINT_DOUBLE_HEX HOST_WIDE_INT_PRINT_DOUBLE_HEX
#define HOST_WIDEST_INT_C(X) HOST_WIDE_INT (X)
/* Provide C99 <inttypes.h> style format definitions for 64bits. */
#ifndef HAVE_INTTYPES_H
#undef PRId64
#define PRId64 HOST_WIDE_INT_PRINT "d"
#undef PRIi64
#define PRIi64 HOST_WIDE_INT_PRINT "i"
#undef PRIo64
#define PRIo64 HOST_WIDE_INT_PRINT "o"
#undef PRIu64
#define PRIu64 HOST_WIDE_INT_PRINT "u"
#undef PRIx64
#define PRIx64 HOST_WIDE_INT_PRINT "x"
#undef PRIX64
#define PRIX64 HOST_WIDE_INT_PRINT "X"
#endif
/* Define HOST_WIDEST_FAST_INT to the widest integer type supported
efficiently in hardware. (That is, the widest integer type that fits

View File

@ -1748,13 +1748,13 @@ good_cloning_opportunity_p (struct cgraph_node *node, int time_benefit,
if (max_count)
{
int factor = (count_sum * 1000) / max_count;
HOST_WIDEST_INT evaluation = (((HOST_WIDEST_INT) time_benefit * factor)
int64_t evaluation = (((int64_t) time_benefit * factor)
/ size_cost);
if (dump_file && (dump_flags & TDF_DETAILS))
fprintf (dump_file, " good_cloning_opportunity_p (time: %i, "
"size: %i, count_sum: " HOST_WIDE_INT_PRINT_DEC
") -> evaluation: " HOST_WIDEST_INT_PRINT_DEC
") -> evaluation: " "%"PRId64
", threshold: %i\n",
time_benefit, size_cost, (HOST_WIDE_INT) count_sum,
evaluation, PARAM_VALUE (PARAM_IPA_CP_EVAL_THRESHOLD));
@ -1763,13 +1763,13 @@ good_cloning_opportunity_p (struct cgraph_node *node, int time_benefit,
}
else
{
HOST_WIDEST_INT evaluation = (((HOST_WIDEST_INT) time_benefit * freq_sum)
int64_t evaluation = (((int64_t) time_benefit * freq_sum)
/ size_cost);
if (dump_file && (dump_flags & TDF_DETAILS))
fprintf (dump_file, " good_cloning_opportunity_p (time: %i, "
"size: %i, freq_sum: %i) -> evaluation: "
HOST_WIDEST_INT_PRINT_DEC ", threshold: %i\n",
"%"PRId64 ", threshold: %i\n",
time_benefit, size_cost, freq_sum, evaluation,
PARAM_VALUE (PARAM_IPA_CP_EVAL_THRESHOLD));
@ -2459,7 +2459,7 @@ ipcp_edge_removal_hook (struct cgraph_edge *cs, void *)
parameter with the given INDEX. */
static tree
get_clone_agg_value (struct cgraph_node *node, HOST_WIDEST_INT offset,
get_clone_agg_value (struct cgraph_node *node, HOST_WIDE_INT offset,
int index)
{
struct ipa_agg_replacement_value *aggval;

View File

@ -1441,7 +1441,7 @@ compute_max_insns (int insns)
if (max_insns < PARAM_VALUE (PARAM_LARGE_UNIT_INSNS))
max_insns = PARAM_VALUE (PARAM_LARGE_UNIT_INSNS);
return ((HOST_WIDEST_INT) max_insns
return ((int64_t) max_insns
* (100 + PARAM_VALUE (PARAM_INLINE_UNIT_GROWTH)) / 100);
}
@ -1737,7 +1737,7 @@ inline_small_functions (void)
badness,
edge->frequency / (double)CGRAPH_FREQ_BASE);
if (edge->count)
fprintf (dump_file," Called "HOST_WIDEST_INT_PRINT_DEC"x\n",
fprintf (dump_file," Called %"PRId64"x\n",
edge->count);
if (dump_flags & TDF_DETAILS)
edge_badness (edge, true);
@ -2011,7 +2011,7 @@ inline_to_all_callers (struct cgraph_node *node, void *data)
static void
dump_overall_stats (void)
{
HOST_WIDEST_INT sum_weighted = 0, sum = 0;
int64_t sum_weighted = 0, sum = 0;
struct cgraph_node *node;
FOR_EACH_DEFINED_FUNCTION (node)
@ -2023,8 +2023,8 @@ dump_overall_stats (void)
sum_weighted += time * node->count;
}
fprintf (dump_file, "Overall time estimate: "
HOST_WIDEST_INT_PRINT_DEC" weighted by profile: "
HOST_WIDEST_INT_PRINT_DEC"\n", sum, sum_weighted);
"%"PRId64" weighted by profile: "
"%"PRId64"\n", sum, sum_weighted);
}
/* Output some useful stats about inlining. */
@ -2032,13 +2032,13 @@ dump_overall_stats (void)
static void
dump_inline_stats (void)
{
HOST_WIDEST_INT inlined_cnt = 0, inlined_indir_cnt = 0;
HOST_WIDEST_INT inlined_virt_cnt = 0, inlined_virt_indir_cnt = 0;
HOST_WIDEST_INT noninlined_cnt = 0, noninlined_indir_cnt = 0;
HOST_WIDEST_INT noninlined_virt_cnt = 0, noninlined_virt_indir_cnt = 0;
HOST_WIDEST_INT inlined_speculative = 0, inlined_speculative_ply = 0;
HOST_WIDEST_INT indirect_poly_cnt = 0, indirect_cnt = 0;
HOST_WIDEST_INT reason[CIF_N_REASONS][3];
int64_t inlined_cnt = 0, inlined_indir_cnt = 0;
int64_t inlined_virt_cnt = 0, inlined_virt_indir_cnt = 0;
int64_t noninlined_cnt = 0, noninlined_indir_cnt = 0;
int64_t noninlined_virt_cnt = 0, noninlined_virt_indir_cnt = 0;
int64_t inlined_speculative = 0, inlined_speculative_ply = 0;
int64_t indirect_poly_cnt = 0, indirect_cnt = 0;
int64_t reason[CIF_N_REASONS][3];
int i;
struct cgraph_node *node;
@ -2102,31 +2102,31 @@ dump_inline_stats (void)
if (max_count)
{
fprintf (dump_file,
"Inlined " HOST_WIDEST_INT_PRINT_DEC " + speculative "
HOST_WIDEST_INT_PRINT_DEC " + speculative polymorphic "
HOST_WIDEST_INT_PRINT_DEC " + previously indirect "
HOST_WIDEST_INT_PRINT_DEC " + virtual "
HOST_WIDEST_INT_PRINT_DEC " + virtual and previously indirect "
HOST_WIDEST_INT_PRINT_DEC "\n" "Not inlined "
HOST_WIDEST_INT_PRINT_DEC " + previously indirect "
HOST_WIDEST_INT_PRINT_DEC " + virtual "
HOST_WIDEST_INT_PRINT_DEC " + virtual and previously indirect "
HOST_WIDEST_INT_PRINT_DEC " + stil indirect "
HOST_WIDEST_INT_PRINT_DEC " + still indirect polymorphic "
HOST_WIDEST_INT_PRINT_DEC "\n", inlined_cnt,
"Inlined %"PRId64 " + speculative "
"%"PRId64 " + speculative polymorphic "
"%"PRId64 " + previously indirect "
"%"PRId64 " + virtual "
"%"PRId64 " + virtual and previously indirect "
"%"PRId64 "\n" "Not inlined "
"%"PRId64 " + previously indirect "
"%"PRId64 " + virtual "
"%"PRId64 " + virtual and previously indirect "
"%"PRId64 " + stil indirect "
"%"PRId64 " + still indirect polymorphic "
"%"PRId64 "\n", inlined_cnt,
inlined_speculative, inlined_speculative_ply,
inlined_indir_cnt, inlined_virt_cnt, inlined_virt_indir_cnt,
noninlined_cnt, noninlined_indir_cnt, noninlined_virt_cnt,
noninlined_virt_indir_cnt, indirect_cnt, indirect_poly_cnt);
fprintf (dump_file,
"Removed speculations " HOST_WIDEST_INT_PRINT_DEC "\n",
"Removed speculations %"PRId64 "\n",
spec_rem);
}
dump_overall_stats ();
fprintf (dump_file, "\nWhy inlining failed?\n");
for (i = 0; i < CIF_N_REASONS; i++)
if (reason[i][2])
fprintf (dump_file, "%-50s: %8i calls, %8i freq, "HOST_WIDEST_INT_PRINT_DEC" count\n",
fprintf (dump_file, "%-50s: %8i calls, %8i freq, %"PRId64" count\n",
cgraph_inline_failed_string ((cgraph_inline_failed_t) i),
(int) reason[i][2], (int) reason[i][1], reason[i][0]);
}

View File

@ -163,8 +163,8 @@ dump_histogram (FILE *file, vec<histogram_entry *> histogram)
{
cumulated_time += histogram[i]->count * histogram[i]->time;
cumulated_size += histogram[i]->size;
fprintf (file, " "HOST_WIDEST_INT_PRINT_DEC": time:%i (%2.2f) size:%i (%2.2f)\n",
(HOST_WIDEST_INT) histogram[i]->count,
fprintf (file, " %"PRId64": time:%i (%2.2f) size:%i (%2.2f)\n",
(int64_t) histogram[i]->count,
histogram[i]->time,
cumulated_time * 100.0 / overall_time,
histogram[i]->size,
@ -516,8 +516,8 @@ ipa_profile (void)
{
gcov_type min, cumulated_time = 0, cumulated_size = 0;
fprintf (dump_file, "Overall time: "HOST_WIDEST_INT_PRINT_DEC"\n",
(HOST_WIDEST_INT)overall_time);
fprintf (dump_file, "Overall time: %"PRId64"\n",
(int64_t)overall_time);
min = get_hot_bb_threshold ();
for (i = 0; i < (int)histogram.length () && histogram[i]->count >= min;
i++)
@ -525,9 +525,9 @@ ipa_profile (void)
cumulated_time += histogram[i]->count * histogram[i]->time;
cumulated_size += histogram[i]->size;
}
fprintf (dump_file, "GCOV min count: "HOST_WIDEST_INT_PRINT_DEC
fprintf (dump_file, "GCOV min count: %"PRId64
" Time:%3.2f%% Size:%3.2f%%\n",
(HOST_WIDEST_INT)min,
(int64_t)min,
cumulated_time * 100.0 / overall_time,
cumulated_size * 100.0 / overall_size);
}
@ -551,9 +551,9 @@ ipa_profile (void)
cumulated_time += histogram[i]->count * histogram[i]->time;
cumulated_size += histogram[i]->size;
}
fprintf (dump_file, "Determined min count: "HOST_WIDEST_INT_PRINT_DEC
fprintf (dump_file, "Determined min count: %"PRId64
" Time:%3.2f%% Size:%3.2f%%\n",
(HOST_WIDEST_INT)threshold,
(int64_t)threshold,
cumulated_time * 100.0 / overall_time,
cumulated_size * 100.0 / overall_size);
}

View File

@ -53,7 +53,7 @@ struct allocno_hard_regs
HARD_REG_SET set;
/* Overall (spilling) cost of all allocnos with given register
set. */
HOST_WIDEST_INT cost;
int64_t cost;
};
typedef struct allocno_hard_regs_node *allocno_hard_regs_node_t;
@ -254,7 +254,7 @@ init_allocno_hard_regs (void)
/* Add (or update info about) allocno hard registers with SET and
COST. */
static allocno_hard_regs_t
add_allocno_hard_regs (HARD_REG_SET set, HOST_WIDEST_INT cost)
add_allocno_hard_regs (HARD_REG_SET set, int64_t cost)
{
struct allocno_hard_regs temp;
allocno_hard_regs_t hv;
@ -519,7 +519,7 @@ print_hard_regs_subforest (FILE *f, allocno_hard_regs_node_t roots,
fprintf (f, " ");
fprintf (f, "%d:(", node->preorder_num);
print_hard_reg_set (f, node->hard_regs->set, false);
fprintf (f, ")@" HOST_WIDEST_INT_PRINT_DEC "\n", node->hard_regs->cost);
fprintf (f, ")@%"PRId64"\n", node->hard_regs->cost);
print_hard_regs_subforest (f, node->first, level + 1);
}
}

View File

@ -115,8 +115,8 @@ build_conflict_bit_table (void)
= ((OBJECT_MAX (obj) - OBJECT_MIN (obj) + IRA_INT_BITS)
/ IRA_INT_BITS);
allocated_words_num += conflict_bit_vec_words_num;
if ((unsigned HOST_WIDEST_INT) allocated_words_num * sizeof (IRA_INT_TYPE)
> (unsigned HOST_WIDEST_INT) IRA_MAX_CONFLICT_TABLE_SIZE * 1024 * 1024)
if ((uint64_t) allocated_words_num * sizeof (IRA_INT_TYPE)
> (uint64_t) IRA_MAX_CONFLICT_TABLE_SIZE * 1024 * 1024)
{
if (internal_flag_ira_verbose > 0 && ira_dump_file != NULL)
fprintf

View File

@ -417,7 +417,7 @@ doloop_modify (struct loop *loop, struct niter_desc *desc,
{
fprintf (dump_file, "Doloop: Inserting doloop pattern (");
if (desc->const_iter)
fprintf (dump_file, HOST_WIDEST_INT_PRINT_DEC, desc->niter);
fprintf (dump_file, "%"PRId64, desc->niter);
else
fputs ("runtime", dump_file);
fputs (" iterations).\n", dump_file);

View File

@ -1308,12 +1308,12 @@ iv_analysis_done (void)
/* Computes inverse to X modulo (1 << MOD). */
static unsigned HOST_WIDEST_INT
inverse (unsigned HOST_WIDEST_INT x, int mod)
static uint64_t
inverse (uint64_t x, int mod)
{
unsigned HOST_WIDEST_INT mask =
((unsigned HOST_WIDEST_INT) 1 << (mod - 1) << 1) - 1;
unsigned HOST_WIDEST_INT rslt = 1;
uint64_t mask =
((uint64_t) 1 << (mod - 1) << 1) - 1;
uint64_t rslt = 1;
int i;
for (i = 0; i < mod - 1; i++)
@ -2263,13 +2263,13 @@ canonicalize_iv_subregs (struct rtx_iv *iv0, struct rtx_iv *iv1,
a number of fields in DESC already filled in. OLD_NITER is the original
expression for the number of iterations, before we tried to simplify it. */
static unsigned HOST_WIDEST_INT
static uint64_t
determine_max_iter (struct loop *loop, struct niter_desc *desc, rtx old_niter)
{
rtx niter = desc->niter_expr;
rtx mmin, mmax, cmp;
unsigned HOST_WIDEST_INT nmax, inc;
unsigned HOST_WIDEST_INT andmax = 0;
uint64_t nmax, inc;
uint64_t andmax = 0;
/* We used to look for constant operand 0 of AND,
but canonicalization should always make this impossible. */
@ -2312,7 +2312,7 @@ determine_max_iter (struct loop *loop, struct niter_desc *desc, rtx old_niter)
if (andmax)
nmax = MIN (nmax, andmax);
if (dump_file)
fprintf (dump_file, ";; Determined upper bound "HOST_WIDEST_INT_PRINT_DEC".\n",
fprintf (dump_file, ";; Determined upper bound %"PRId64".\n",
nmax);
return nmax;
}
@ -2331,8 +2331,8 @@ iv_number_of_iterations (struct loop *loop, rtx insn, rtx condition,
enum rtx_code cond;
enum machine_mode mode, comp_mode;
rtx mmin, mmax, mode_mmin, mode_mmax;
unsigned HOST_WIDEST_INT s, size, d, inv, max;
HOST_WIDEST_INT up, down, inc, step_val;
uint64_t s, size, d, inv, max;
int64_t up, down, inc, step_val;
int was_sharp = false;
rtx old_niter;
bool step_is_pow2;
@ -2679,7 +2679,7 @@ iv_number_of_iterations (struct loop *loop, rtx insn, rtx condition,
d *= 2;
size--;
}
bound = GEN_INT (((unsigned HOST_WIDEST_INT) 1 << (size - 1 ) << 1) - 1);
bound = GEN_INT (((uint64_t) 1 << (size - 1 ) << 1) - 1);
tmp1 = lowpart_subreg (mode, iv1.base, comp_mode);
tmp = simplify_gen_binary (UMOD, mode, tmp1, gen_int_mode (d, mode));
@ -2833,7 +2833,7 @@ iv_number_of_iterations (struct loop *loop, rtx insn, rtx condition,
if (CONST_INT_P (desc->niter_expr))
{
unsigned HOST_WIDEST_INT val = INTVAL (desc->niter_expr);
uint64_t val = INTVAL (desc->niter_expr);
desc->const_iter = true;
desc->niter = val & GET_MODE_MASK (desc->mode);

View File

@ -548,7 +548,7 @@ decide_peel_completely (struct loop *loop, int flags ATTRIBUTE_UNUSED)
{
fprintf (dump_file,
";; Not peeling loop completely, rolls too much (");
fprintf (dump_file, HOST_WIDEST_INT_PRINT_DEC, desc->niter);
fprintf (dump_file, "%"PRId64, desc->niter);
fprintf (dump_file, " iterations > %d [maximum peelings])\n", npeel);
}
return;
@ -1429,8 +1429,8 @@ decide_peel_simple (struct loop *loop, int flags)
if (dump_file)
{
fprintf (dump_file, ";; Not peeling loop, rolls too much (");
fprintf (dump_file, HOST_WIDEST_INT_PRINT_DEC,
(HOST_WIDEST_INT) (iterations.to_shwi () + 1));
fprintf (dump_file, "%"PRId64,
(int64_t) (iterations.to_shwi () + 1));
fprintf (dump_file, " iterations > %d [maximum peelings])\n",
npeel);
}

View File

@ -2241,7 +2241,7 @@ write_symbol (struct streamer_tree_cache_d *cache,
enum gcc_plugin_symbol_kind kind;
enum gcc_plugin_symbol_visibility visibility;
unsigned slot_num;
unsigned HOST_WIDEST_INT size;
uint64_t size;
const char *comdat;
unsigned char c;

View File

@ -1,3 +1,8 @@
2014-05-26 Richard Biener <rguenther@suse.de>
* lto.c (lto_parse_hex): Use int64_t.
(lto_resolution_read): Likewise.
2014-05-23 Jan Hubicka <hubicka@ucw.cz>
* lto.c (read_cgraph_and_symbols): Grow ggc memory after streaming.

View File

@ -2002,10 +2002,10 @@ lto_read_decls (struct lto_file_decl_data *decl_data, const void *data,
/* Custom version of strtoll, which is not portable. */
static HOST_WIDEST_INT
static int64_t
lto_parse_hex (const char *p)
{
HOST_WIDEST_INT ret = 0;
int64_t ret = 0;
for (; *p != '\0'; ++p)
{
@ -2057,7 +2057,7 @@ lto_resolution_read (splay_tree file_ids, FILE *resolution, lto_file *file)
{
int t;
char offset_p[17];
HOST_WIDEST_INT offset;
int64_t offset;
t = fscanf (resolution, "@0x%16s", offset_p);
if (t != 1)
internal_error ("could not parse file offset");

View File

@ -51,7 +51,7 @@ along with GCC; see the file COPYING3. If not see
#include "dumpfile.h"
/* CAP_INFINITY: Constant to represent infinite capacity. */
#define CAP_INFINITY INTTYPE_MAXIMUM (HOST_WIDEST_INT)
#define CAP_INFINITY INTTYPE_MAXIMUM (int64_t)
/* COST FUNCTION. */
#define K_POS(b) ((b))
@ -203,12 +203,12 @@ dump_fixup_edge (FILE *file, fixup_graph_type *fixup_graph, fixup_edge_p fedge)
if (fedge->type)
{
fprintf (file, "flow/capacity=" HOST_WIDEST_INT_PRINT_DEC "/",
fprintf (file, "flow/capacity=%"PRId64 "/",
fedge->flow);
if (fedge->max_capacity == CAP_INFINITY)
fputs ("+oo,", file);
else
fprintf (file, "" HOST_WIDEST_INT_PRINT_DEC ",", fedge->max_capacity);
fprintf (file, "%"PRId64 ",", fedge->max_capacity);
}
if (fedge->is_rflow_valid)
@ -216,10 +216,10 @@ dump_fixup_edge (FILE *file, fixup_graph_type *fixup_graph, fixup_edge_p fedge)
if (fedge->rflow == CAP_INFINITY)
fputs (" rflow=+oo.", file);
else
fprintf (file, " rflow=" HOST_WIDEST_INT_PRINT_DEC ",", fedge->rflow);
fprintf (file, " rflow=%"PRId64 ",", fedge->rflow);
}
fprintf (file, " cost=" HOST_WIDEST_INT_PRINT_DEC ".", fedge->cost);
fprintf (file, " cost=%"PRId64 ".", fedge->cost);
fprintf (file, "\t(%d->%d)", fedge->src, fedge->dest);
@ -626,9 +626,9 @@ create_fixup_graph (fixup_graph_type *fixup_graph)
if (dump_file)
{
fprintf (dump_file, "\nAdjust supply and demand:\n");
fprintf (dump_file, "supply_value=" HOST_WIDEST_INT_PRINT_DEC "\n",
fprintf (dump_file, "supply_value=%"PRId64 "\n",
supply_value);
fprintf (dump_file, "demand_value=" HOST_WIDEST_INT_PRINT_DEC "\n",
fprintf (dump_file, "demand_value=%"PRId64 "\n",
demand_value);
}
@ -898,10 +898,10 @@ cancel_negative_cycle (fixup_graph_type *fixup_graph,
{
fprintf (dump_file, "%d", cycle[k]);
fprintf (dump_file,
": (" HOST_WIDEST_INT_PRINT_DEC ", " HOST_WIDEST_INT_PRINT_DEC
": (%"PRId64 ", %"PRId64
")\n", sum_cost, cycle_flow);
fprintf (dump_file,
"Augment cycle with " HOST_WIDEST_INT_PRINT_DEC "\n",
"Augment cycle with %"PRId64 "\n",
cycle_flow);
}
@ -1093,10 +1093,10 @@ find_max_flow (fixup_graph_type *fixup_graph, int source, int sink)
fprintf (dump_file, "<-");
}
fprintf (dump_file,
"ENTRY (path_capacity=" HOST_WIDEST_INT_PRINT_DEC ")\n",
"ENTRY (path_capacity=%"PRId64 ")\n",
increment);
fprintf (dump_file,
"Network flow is " HOST_WIDEST_INT_PRINT_DEC ".\n",
"Network flow is %"PRId64 ".\n",
max_flow);
}
}
@ -1133,7 +1133,7 @@ adjust_cfg_counts (fixup_graph_type *fixup_graph)
/* Fixup BB. */
if (dump_file)
fprintf (dump_file,
"BB%d: " HOST_WIDEST_INT_PRINT_DEC "", bb->index, bb->count);
"BB%d: %"PRId64 "", bb->index, bb->count);
pfedge = find_fixup_edge (fixup_graph, i, i + 1);
if (pfedge->flow)
@ -1141,7 +1141,7 @@ adjust_cfg_counts (fixup_graph_type *fixup_graph)
bb->count += pfedge->flow;
if (dump_file)
{
fprintf (dump_file, " + " HOST_WIDEST_INT_PRINT_DEC "(",
fprintf (dump_file, " + %"PRId64 "(",
pfedge->flow);
print_edge (dump_file, fixup_graph, i, i + 1);
fprintf (dump_file, ")");
@ -1156,7 +1156,7 @@ adjust_cfg_counts (fixup_graph_type *fixup_graph)
bb->count -= pfedge_n->flow;
if (dump_file)
{
fprintf (dump_file, " - " HOST_WIDEST_INT_PRINT_DEC "(",
fprintf (dump_file, " - %"PRId64 "(",
pfedge_n->flow);
print_edge (dump_file, fixup_graph, i + 1,
pfedge->norm_vertex_index);
@ -1164,7 +1164,7 @@ adjust_cfg_counts (fixup_graph_type *fixup_graph)
}
}
if (dump_file)
fprintf (dump_file, " = " HOST_WIDEST_INT_PRINT_DEC "\n", bb->count);
fprintf (dump_file, " = %"PRId64 "\n", bb->count);
/* Fixup edge. */
FOR_EACH_EDGE (e, ei, bb->succs)
@ -1175,7 +1175,7 @@ adjust_cfg_counts (fixup_graph_type *fixup_graph)
j = 2 * e->dest->index;
if (dump_file)
fprintf (dump_file, "%d->%d: " HOST_WIDEST_INT_PRINT_DEC "",
fprintf (dump_file, "%d->%d: %"PRId64 "",
bb->index, e->dest->index, e->count);
pfedge = find_fixup_edge (fixup_graph, i + 1, j);
@ -1188,7 +1188,7 @@ adjust_cfg_counts (fixup_graph_type *fixup_graph)
e->count += pfedge->flow;
if (dump_file)
{
fprintf (dump_file, " + " HOST_WIDEST_INT_PRINT_DEC "(",
fprintf (dump_file, " + %"PRId64 "(",
pfedge->flow);
print_edge (dump_file, fixup_graph, i + 1, j);
fprintf (dump_file, ")");
@ -1203,7 +1203,7 @@ adjust_cfg_counts (fixup_graph_type *fixup_graph)
e->count -= pfedge_n->flow;
if (dump_file)
{
fprintf (dump_file, " - " HOST_WIDEST_INT_PRINT_DEC "(",
fprintf (dump_file, " - %"PRId64 "(",
pfedge_n->flow);
print_edge (dump_file, fixup_graph, j,
pfedge->norm_vertex_index);
@ -1223,7 +1223,7 @@ adjust_cfg_counts (fixup_graph_type *fixup_graph)
if (dump_file)
{
fprintf (dump_file, "(self edge)");
fprintf (dump_file, " + " HOST_WIDEST_INT_PRINT_DEC "(",
fprintf (dump_file, " + %"PRId64 "(",
pfedge_n->flow);
print_edge (dump_file, fixup_graph, i + 1,
pfedge->norm_vertex_index);
@ -1234,7 +1234,7 @@ adjust_cfg_counts (fixup_graph_type *fixup_graph)
if (bb->count)
e->probability = REG_BR_PROB_BASE * e->count / bb->count;
if (dump_file)
fprintf (dump_file, " = " HOST_WIDEST_INT_PRINT_DEC "\t(%.1f%%)\n",
fprintf (dump_file, " = %"PRId64 "\t(%.1f%%)\n",
e->count, e->probability * 100.0 / REG_BR_PROB_BASE);
}
}
@ -1287,14 +1287,14 @@ adjust_cfg_counts (fixup_graph_type *fixup_graph)
|| (bb->count != sum_edge_counts (bb->succs)))
{
fprintf (dump_file,
"BB%d(" HOST_WIDEST_INT_PRINT_DEC ") **INVALID**: ",
"BB%d(%"PRId64 ") **INVALID**: ",
bb->index, bb->count);
fprintf (stderr,
"******** BB%d(" HOST_WIDEST_INT_PRINT_DEC
"******** BB%d(%"PRId64
") **INVALID**: \n", bb->index, bb->count);
fprintf (dump_file, "in_edges=" HOST_WIDEST_INT_PRINT_DEC " ",
fprintf (dump_file, "in_edges=%"PRId64 " ",
sum_edge_counts (bb->preds));
fprintf (dump_file, "out_edges=" HOST_WIDEST_INT_PRINT_DEC "\n",
fprintf (dump_file, "out_edges=%"PRId64 "\n",
sum_edge_counts (bb->succs));
}
}

View File

@ -396,7 +396,7 @@ doloop_register_get (rtx head ATTRIBUTE_UNUSED, rtx tail ATTRIBUTE_UNUSED)
this constant. Otherwise return 0. */
static rtx
const_iteration_count (rtx count_reg, basic_block pre_header,
HOST_WIDEST_INT * count)
int64_t * count)
{
rtx insn;
rtx head, tail;
@ -1450,16 +1450,16 @@ sms_schedule (void)
if (profile_info && flag_branch_probabilities)
{
fprintf (dump_file, "SMS loop-count ");
fprintf (dump_file, HOST_WIDEST_INT_PRINT_DEC,
(HOST_WIDEST_INT) bb->count);
fprintf (dump_file, "%"PRId64,
(int64_t) bb->count);
fprintf (dump_file, "\n");
fprintf (dump_file, "SMS trip-count ");
fprintf (dump_file, HOST_WIDEST_INT_PRINT_DEC,
(HOST_WIDEST_INT) trip_count);
fprintf (dump_file, "%"PRId64,
(int64_t) trip_count);
fprintf (dump_file, "\n");
fprintf (dump_file, "SMS profile-sum-max ");
fprintf (dump_file, HOST_WIDEST_INT_PRINT_DEC,
(HOST_WIDEST_INT) profile_info->sum_max);
fprintf (dump_file, "%"PRId64,
(int64_t) profile_info->sum_max);
fprintf (dump_file, "\n");
}
}
@ -1540,7 +1540,7 @@ sms_schedule (void)
rtx head, tail;
rtx count_reg, count_init;
int mii, rec_mii, stage_count, min_cycle;
HOST_WIDEST_INT loop_count = 0;
int64_t loop_count = 0;
bool opt_sc_p;
if (! (g = g_arr[loop->num]))
@ -1571,12 +1571,12 @@ sms_schedule (void)
if (profile_info && flag_branch_probabilities)
{
fprintf (dump_file, "SMS loop-count ");
fprintf (dump_file, HOST_WIDEST_INT_PRINT_DEC,
(HOST_WIDEST_INT) bb->count);
fprintf (dump_file, "%"PRId64,
(int64_t) bb->count);
fprintf (dump_file, "\n");
fprintf (dump_file, "SMS profile-sum-max ");
fprintf (dump_file, HOST_WIDEST_INT_PRINT_DEC,
(HOST_WIDEST_INT) profile_info->sum_max);
fprintf (dump_file, "%"PRId64,
(int64_t) profile_info->sum_max);
fprintf (dump_file, "\n");
}
fprintf (dump_file, "SMS doloop\n");
@ -1602,7 +1602,7 @@ sms_schedule (void)
if (dump_file && count_init)
{
fprintf (dump_file, "SMS const-doloop ");
fprintf (dump_file, HOST_WIDEST_INT_PRINT_DEC,
fprintf (dump_file, "%"PRId64,
loop_count);
fprintf (dump_file, "\n");
}
@ -1663,9 +1663,9 @@ sms_schedule (void)
fprintf (dump_file, "SMS failed... \n");
fprintf (dump_file, "SMS sched-failed (stage-count=%d,"
" loop-count=", stage_count);
fprintf (dump_file, HOST_WIDEST_INT_PRINT_DEC, loop_count);
fprintf (dump_file, "%"PRId64, loop_count);
fprintf (dump_file, ", trip-count=");
fprintf (dump_file, HOST_WIDEST_INT_PRINT_DEC, trip_count);
fprintf (dump_file, "%"PRId64, trip_count);
fprintf (dump_file, ")\n");
}
break;

View File

@ -739,12 +739,10 @@ dump_prediction (FILE *file, enum br_predictor predictor, int probability,
if (bb->count)
{
fprintf (file, " exec ");
fprintf (file, HOST_WIDEST_INT_PRINT_DEC, bb->count);
fprintf (file, " exec %"PRId64, bb->count);
if (e)
{
fprintf (file, " hit ");
fprintf (file, HOST_WIDEST_INT_PRINT_DEC, e->count);
fprintf (file, " hit %"PRId64, e->count);
fprintf (file, " (%.1f%%)", e->count * 100.0 / bb->count);
}
}

View File

@ -271,8 +271,6 @@ pp_get_prefix (const pretty_printer *pp) { return pp->prefix; }
while (0)
#define pp_wide_integer(PP, I) \
pp_scalar (PP, HOST_WIDE_INT_PRINT_DEC, (HOST_WIDE_INT) I)
#define pp_widest_integer(PP, I) \
pp_scalar (PP, HOST_WIDEST_INT_PRINT_DEC, (HOST_WIDEST_INT) I)
#define pp_pointer(PP, P) pp_scalar (PP, "%p", P)
#define pp_identifier(PP, ID) pp_string (PP, (pp_translate_identifiers (PP) \

View File

@ -237,10 +237,10 @@ get_working_sets (void)
ws_info = &gcov_working_sets[ws_ix];
/* Print out the percentage using int arithmatic to avoid float. */
fprintf (dump_file, "\t\t%u.%02u%%: num counts=%u, min counter="
HOST_WIDEST_INT_PRINT_DEC "\n",
"%"PRId64 "\n",
pct / 100, pct - (pct / 100 * 100),
ws_info->num_counters,
(HOST_WIDEST_INT)ws_info->min_counter);
(int64_t)ws_info->min_counter);
}
}
}
@ -318,7 +318,7 @@ is_edge_inconsistent (vec<edge, va_gc> *edges)
if (dump_file)
{
fprintf (dump_file,
"Edge %i->%i is inconsistent, count"HOST_WIDEST_INT_PRINT_DEC,
"Edge %i->%i is inconsistent, count%"PRId64,
e->src->index, e->dest->index, e->count);
dump_bb (dump_file, e->src, 0, TDF_DETAILS);
dump_bb (dump_file, e->dest, 0, TDF_DETAILS);
@ -367,7 +367,7 @@ is_inconsistent (void)
if (dump_file)
{
fprintf (dump_file, "BB %i count is negative "
HOST_WIDEST_INT_PRINT_DEC,
"%"PRId64,
bb->index,
bb->count);
dump_bb (dump_file, bb, 0, TDF_DETAILS);
@ -379,7 +379,7 @@ is_inconsistent (void)
if (dump_file)
{
fprintf (dump_file, "BB %i count does not match sum of incoming edges "
HOST_WIDEST_INT_PRINT_DEC" should be " HOST_WIDEST_INT_PRINT_DEC,
"%"PRId64" should be %"PRId64,
bb->index,
bb->count,
sum_edge_counts (bb->preds));
@ -394,7 +394,7 @@ is_inconsistent (void)
if (dump_file)
{
fprintf (dump_file, "BB %i count does not match sum of outgoing edges "
HOST_WIDEST_INT_PRINT_DEC" should be " HOST_WIDEST_INT_PRINT_DEC,
"%"PRId64" should be %"PRId64,
bb->index,
bb->count,
sum_edge_counts (bb->succs));
@ -471,8 +471,8 @@ read_profile_edge_counts (gcov_type *exec_counts)
{
fprintf (dump_file, "\nRead edge from %i to %i, count:",
bb->index, e->dest->index);
fprintf (dump_file, HOST_WIDEST_INT_PRINT_DEC,
(HOST_WIDEST_INT) e->count);
fprintf (dump_file, "%"PRId64,
(int64_t) e->count);
}
}
}

View File

@ -491,6 +491,7 @@ extern void *realloc (void *, size_t);
#endif
#ifdef HAVE_INTTYPES_H
#define __STDC_FORMAT_MACROS
#include <inttypes.h>
#endif
@ -1070,7 +1071,7 @@ helper_const_non_const_cast (const char *p)
#define DEBUG_VARIABLE
#endif
/* Get definitions of HOST_WIDE_INT and HOST_WIDEST_INT. */
/* Get definitions of HOST_WIDE_INT. */
#include "hwint.h"
#endif /* ! GCC_SYSTEM_H */

View File

@ -3487,12 +3487,6 @@ pp_double_int (pretty_printer *pp, double_int d, bool uns)
pp_wide_integer (pp, d.low);
else if (d.fits_uhwi ())
pp_unsigned_wide_integer (pp, d.low);
else if (HOST_BITS_PER_DOUBLE_INT == HOST_BITS_PER_WIDEST_INT)
pp_scalar (pp,
uns
? HOST_WIDEST_INT_PRINT_UNSIGNED : HOST_WIDEST_INT_PRINT_DEC,
(HOST_WIDEST_INT) ((((unsigned HOST_WIDEST_INT) d.high << 1)
<< (HOST_BITS_PER_WIDE_INT - 1)) | d.low));
else
{
unsigned HOST_WIDE_INT low = d.low;

View File

@ -1620,7 +1620,7 @@ make_pass_cse_sincos (gcc::context *ctxt)
still have a size of 2 but this time a range of 1. */
struct symbolic_number {
unsigned HOST_WIDEST_INT n;
uint64_t n;
int size;
tree base_addr;
tree offset;
@ -1633,14 +1633,14 @@ struct symbolic_number {
/* The number which the find_bswap_or_nop_1 result should match in
order to have a nop. The number is masked according to the size of
the symbolic number before using it. */
#define CMPNOP (sizeof (HOST_WIDEST_INT) < 8 ? 0 : \
(unsigned HOST_WIDEST_INT)0x08070605 << 32 | 0x04030201)
#define CMPNOP (sizeof (int64_t) < 8 ? 0 : \
(uint64_t)0x08070605 << 32 | 0x04030201)
/* The number which the find_bswap_or_nop_1 result should match in
order to have a byte swap. The number is masked according to the
size of the symbolic number before using it. */
#define CMPXCHG (sizeof (HOST_WIDEST_INT) < 8 ? 0 : \
(unsigned HOST_WIDEST_INT)0x01020304 << 32 | 0x05060708)
#define CMPXCHG (sizeof (int64_t) < 8 ? 0 : \
(uint64_t)0x01020304 << 32 | 0x05060708)
/* Perform a SHIFT or ROTATE operation by COUNT bits on symbolic
number N. Return false if the requested operation is not permitted
@ -1656,8 +1656,8 @@ do_shift_rotate (enum tree_code code,
/* Zero out the extra bits of N in order to avoid them being shifted
into the significant bits. */
if (n->size < (int)sizeof (HOST_WIDEST_INT))
n->n &= ((unsigned HOST_WIDEST_INT)1 << (n->size * BITS_PER_UNIT)) - 1;
if (n->size < (int)sizeof (int64_t))
n->n &= ((uint64_t)1 << (n->size * BITS_PER_UNIT)) - 1;
switch (code)
{
@ -1677,8 +1677,8 @@ do_shift_rotate (enum tree_code code,
return false;
}
/* Zero unused bits for size. */
if (n->size < (int)sizeof (HOST_WIDEST_INT))
n->n &= ((unsigned HOST_WIDEST_INT)1 << (n->size * BITS_PER_UNIT)) - 1;
if (n->size < (int)sizeof (int64_t))
n->n &= ((uint64_t)1 << (n->size * BITS_PER_UNIT)) - 1;
return true;
}
@ -1829,8 +1829,8 @@ find_bswap_or_nop_1 (gimple stmt, struct symbolic_number *n, int limit)
n->range = n->size;
n->n = CMPNOP;
if (n->size < (int)sizeof (HOST_WIDEST_INT))
n->n &= ((unsigned HOST_WIDEST_INT)1 <<
if (n->size < (int)sizeof (int64_t))
n->n &= ((uint64_t)1 <<
(n->size * BITS_PER_UNIT)) - 1;
if (!source_expr1)
@ -1845,8 +1845,8 @@ find_bswap_or_nop_1 (gimple stmt, struct symbolic_number *n, int limit)
case BIT_AND_EXPR:
{
int i;
unsigned HOST_WIDEST_INT val = widest_int_cst_value (rhs2);
unsigned HOST_WIDEST_INT tmp = val;
uint64_t val = int_cst_value (rhs2);
uint64_t tmp = val;
/* Only constants masking full bytes are allowed. */
for (i = 0; i < n->size; i++, tmp >>= BITS_PER_UNIT)
@ -1871,11 +1871,11 @@ find_bswap_or_nop_1 (gimple stmt, struct symbolic_number *n, int limit)
if (type_size % BITS_PER_UNIT != 0)
return NULL_TREE;
if (type_size / BITS_PER_UNIT < (int)(sizeof (HOST_WIDEST_INT)))
if (type_size / BITS_PER_UNIT < (int)(sizeof (int64_t)))
{
/* If STMT casts to a smaller type mask out the bits not
belonging to the target type. */
n->n &= ((unsigned HOST_WIDEST_INT)1 << type_size) - 1;
n->n &= ((uint64_t)1 << type_size) - 1;
}
n->size = type_size / BITS_PER_UNIT;
if (!n->base_addr)
@ -1894,7 +1894,7 @@ find_bswap_or_nop_1 (gimple stmt, struct symbolic_number *n, int limit)
{
int i;
struct symbolic_number n1, n2;
unsigned HOST_WIDEST_INT mask;
uint64_t mask;
tree source_expr2;
if (code != BIT_IOR_EXPR)
@ -1924,7 +1924,7 @@ find_bswap_or_nop_1 (gimple stmt, struct symbolic_number *n, int limit)
if (source_expr1 != source_expr2)
{
HOST_WIDEST_INT inc, mask;
int64_t inc, mask;
unsigned i;
HOST_WIDE_INT off_sub;
struct symbolic_number *n_ptr;
@ -1950,7 +1950,7 @@ find_bswap_or_nop_1 (gimple stmt, struct symbolic_number *n, int limit)
off_sub = n2.bytepos - n1.bytepos;
/* Check that the range of memory covered < biggest int size. */
if (off_sub + n2.range > (int) sizeof (HOST_WIDEST_INT))
if (off_sub + n2.range > (int) sizeof (int64_t))
return NULL_TREE;
n->range = n2.range + off_sub;
@ -1962,7 +1962,7 @@ find_bswap_or_nop_1 (gimple stmt, struct symbolic_number *n, int limit)
n_ptr = &n1;
else
n_ptr = &n2;
for (i = 0; i < sizeof (HOST_WIDEST_INT); i++, inc <<= 8,
for (i = 0; i < sizeof (int64_t); i++, inc <<= 8,
mask <<= 8)
{
if (n_ptr->n & mask)
@ -1984,7 +1984,7 @@ find_bswap_or_nop_1 (gimple stmt, struct symbolic_number *n, int limit)
n->size = n1.size;
for (i = 0, mask = 0xff; i < n->size; i++, mask <<= BITS_PER_UNIT)
{
unsigned HOST_WIDEST_INT masked1, masked2;
uint64_t masked1, masked2;
masked1 = n1.n & mask;
masked2 = n2.n & mask;
@ -2018,8 +2018,8 @@ find_bswap_or_nop (gimple stmt, struct symbolic_number *n, bool *bswap)
/* The number which the find_bswap_or_nop_1 result should match in order
to have a full byte swap. The number is shifted to the right
according to the size of the symbolic number before using it. */
unsigned HOST_WIDEST_INT cmpxchg = CMPXCHG;
unsigned HOST_WIDEST_INT cmpnop = CMPNOP;
uint64_t cmpxchg = CMPXCHG;
uint64_t cmpnop = CMPNOP;
tree source_expr;
int limit;
@ -2040,19 +2040,19 @@ find_bswap_or_nop (gimple stmt, struct symbolic_number *n, bool *bswap)
if (n->base_addr)
{
int rsize;
unsigned HOST_WIDEST_INT tmpn;
uint64_t tmpn;
for (tmpn = n->n, rsize = 0; tmpn; tmpn >>= BITS_PER_UNIT, rsize++);
n->range = rsize;
}
/* Zero out the extra bits of N and CMP*. */
if (n->range < (int)sizeof (HOST_WIDEST_INT))
if (n->range < (int)sizeof (int64_t))
{
unsigned HOST_WIDEST_INT mask;
uint64_t mask;
mask = ((unsigned HOST_WIDEST_INT)1 << (n->range * BITS_PER_UNIT)) - 1;
cmpxchg >>= (sizeof (HOST_WIDEST_INT) - n->range) * BITS_PER_UNIT;
mask = ((uint64_t)1 << (n->range * BITS_PER_UNIT)) - 1;
cmpxchg >>= (sizeof (int64_t) - n->range) * BITS_PER_UNIT;
cmpnop &= mask;
}
@ -2268,9 +2268,6 @@ pass_optimize_bswap::execute (function *fun)
if (BITS_PER_UNIT != 8)
return 0;
if (sizeof (HOST_WIDEST_INT) < 8)
return 0;
bswap16_p = (builtin_decl_explicit_p (BUILT_IN_BSWAP16)
&& optab_handler (bswap_optab, HImode) != CODE_FOR_nothing);
bswap32_p = (builtin_decl_explicit_p (BUILT_IN_BSWAP32)

View File

@ -568,7 +568,7 @@ streamer_alloc_tree (struct lto_input_block *ib, struct data_in *data_in,
enum tree_code code;
tree result;
#ifdef LTO_STREAMER_DEBUG
HOST_WIDEST_INT orig_address_in_writer;
HOST_WIDE_INT orig_address_in_writer;
#endif
result = NULL_TREE;

View File

@ -990,8 +990,8 @@ streamer_write_tree_header (struct output_block *ob, tree expr)
and the writer do not agree on a streamed node, the pointer
value for EXPR can be used to track down the differences in
the debugger. */
gcc_assert ((HOST_WIDEST_INT) (intptr_t) expr == (intptr_t) expr);
streamer_write_hwi (ob, (HOST_WIDEST_INT) (intptr_t) expr);
gcc_assert ((HOST_WIDE_INT) (intptr_t) expr == (intptr_t) expr);
streamer_write_hwi (ob, (HOST_WIDE_INT) (intptr_t) expr);
#endif
/* The text in strings and identifiers are completely emitted in

View File

@ -10481,40 +10481,6 @@ int_cst_value (const_tree x)
return val;
}
/* Return value of a constant X and sign-extend it. */
HOST_WIDEST_INT
widest_int_cst_value (const_tree x)
{
unsigned bits = TYPE_PRECISION (TREE_TYPE (x));
unsigned HOST_WIDEST_INT val = TREE_INT_CST_LOW (x);
#if HOST_BITS_PER_WIDEST_INT > HOST_BITS_PER_WIDE_INT
gcc_assert (HOST_BITS_PER_WIDEST_INT >= HOST_BITS_PER_DOUBLE_INT);
gcc_assert (TREE_INT_CST_NUNITS (x) == 2);
if (TREE_INT_CST_NUNITS (x) == 1)
val = HOST_WIDE_INT (val);
else
val |= (((unsigned HOST_WIDEST_INT) TREE_INT_CST_ELT (x, 1))
<< HOST_BITS_PER_WIDE_INT);
#else
/* Make sure the sign-extended value will fit in a HOST_WIDE_INT. */
gcc_assert (TREE_INT_CST_NUNITS (x) == 1);
#endif
if (bits < HOST_BITS_PER_WIDEST_INT)
{
bool negative = ((val >> (bits - 1)) & 1) != 0;
if (negative)
val |= (~(unsigned HOST_WIDEST_INT) 0) << (bits - 1) << 1;
else
val &= ~((~(unsigned HOST_WIDEST_INT) 0) << (bits - 1) << 1);
}
return val;
}
/* If TYPE is an integral or pointer type, return an integer type with
the same precision which is unsigned iff UNSIGNEDP is true, or itself
if TYPE is already an integer type of signedness UNSIGNEDP. */

View File

@ -4270,7 +4270,6 @@ extern tree build_range_type (tree, tree, tree);
extern tree build_nonshared_range_type (tree, tree, tree);
extern bool subrange_type_for_debug_p (const_tree, tree *, tree *);
extern HOST_WIDE_INT int_cst_value (const_tree);
extern HOST_WIDEST_INT widest_int_cst_value (const_tree);
extern tree tree_block (tree);
extern void tree_set_block (tree, tree);
extern location_t *block_nonartificial_location (tree);

View File

@ -266,11 +266,11 @@ dump_histogram_value (FILE *dump_file, histogram_value hist)
unsigned int i;
fprintf (dump_file, " [");
for (i = 0; i < hist->hdata.intvl.steps; i++)
fprintf (dump_file, " %d:"HOST_WIDEST_INT_PRINT_DEC,
fprintf (dump_file, " %d:%"PRId64,
hist->hdata.intvl.int_start + i,
(HOST_WIDEST_INT) hist->hvalue.counters[i]);
fprintf (dump_file, " ] outside range:"HOST_WIDEST_INT_PRINT_DEC,
(HOST_WIDEST_INT) hist->hvalue.counters[i]);
(int64_t) hist->hvalue.counters[i]);
fprintf (dump_file, " ] outside range:%"PRId64,
(int64_t) hist->hvalue.counters[i]);
}
fprintf (dump_file, ".\n");
break;
@ -279,10 +279,10 @@ dump_histogram_value (FILE *dump_file, histogram_value hist)
fprintf (dump_file, "Pow2 counter ");
if (hist->hvalue.counters)
{
fprintf (dump_file, "pow2:"HOST_WIDEST_INT_PRINT_DEC
" nonpow2:"HOST_WIDEST_INT_PRINT_DEC,
(HOST_WIDEST_INT) hist->hvalue.counters[0],
(HOST_WIDEST_INT) hist->hvalue.counters[1]);
fprintf (dump_file, "pow2:%"PRId64
" nonpow2:%"PRId64,
(int64_t) hist->hvalue.counters[0],
(int64_t) hist->hvalue.counters[1]);
}
fprintf (dump_file, ".\n");
break;
@ -291,12 +291,12 @@ dump_histogram_value (FILE *dump_file, histogram_value hist)
fprintf (dump_file, "Single value ");
if (hist->hvalue.counters)
{
fprintf (dump_file, "value:"HOST_WIDEST_INT_PRINT_DEC
" match:"HOST_WIDEST_INT_PRINT_DEC
" wrong:"HOST_WIDEST_INT_PRINT_DEC,
(HOST_WIDEST_INT) hist->hvalue.counters[0],
(HOST_WIDEST_INT) hist->hvalue.counters[1],
(HOST_WIDEST_INT) hist->hvalue.counters[2]);
fprintf (dump_file, "value:%"PRId64
" match:%"PRId64
" wrong:%"PRId64,
(int64_t) hist->hvalue.counters[0],
(int64_t) hist->hvalue.counters[1],
(int64_t) hist->hvalue.counters[2]);
}
fprintf (dump_file, ".\n");
break;
@ -305,10 +305,10 @@ dump_histogram_value (FILE *dump_file, histogram_value hist)
fprintf (dump_file, "Average value ");
if (hist->hvalue.counters)
{
fprintf (dump_file, "sum:"HOST_WIDEST_INT_PRINT_DEC
" times:"HOST_WIDEST_INT_PRINT_DEC,
(HOST_WIDEST_INT) hist->hvalue.counters[0],
(HOST_WIDEST_INT) hist->hvalue.counters[1]);
fprintf (dump_file, "sum:%"PRId64
" times:%"PRId64,
(int64_t) hist->hvalue.counters[0],
(int64_t) hist->hvalue.counters[1]);
}
fprintf (dump_file, ".\n");
break;
@ -317,8 +317,8 @@ dump_histogram_value (FILE *dump_file, histogram_value hist)
fprintf (dump_file, "IOR value ");
if (hist->hvalue.counters)
{
fprintf (dump_file, "ior:"HOST_WIDEST_INT_PRINT_DEC,
(HOST_WIDEST_INT) hist->hvalue.counters[0]);
fprintf (dump_file, "ior:%"PRId64,
(int64_t) hist->hvalue.counters[0]);
}
fprintf (dump_file, ".\n");
break;
@ -327,12 +327,12 @@ dump_histogram_value (FILE *dump_file, histogram_value hist)
fprintf (dump_file, "Constant delta ");
if (hist->hvalue.counters)
{
fprintf (dump_file, "value:"HOST_WIDEST_INT_PRINT_DEC
" match:"HOST_WIDEST_INT_PRINT_DEC
" wrong:"HOST_WIDEST_INT_PRINT_DEC,
(HOST_WIDEST_INT) hist->hvalue.counters[0],
(HOST_WIDEST_INT) hist->hvalue.counters[1],
(HOST_WIDEST_INT) hist->hvalue.counters[2]);
fprintf (dump_file, "value:%"PRId64
" match:%"PRId64
" wrong:%"PRId64,
(int64_t) hist->hvalue.counters[0],
(int64_t) hist->hvalue.counters[1],
(int64_t) hist->hvalue.counters[2]);
}
fprintf (dump_file, ".\n");
break;
@ -340,12 +340,12 @@ dump_histogram_value (FILE *dump_file, histogram_value hist)
fprintf (dump_file, "Indirect call ");
if (hist->hvalue.counters)
{
fprintf (dump_file, "value:"HOST_WIDEST_INT_PRINT_DEC
" match:"HOST_WIDEST_INT_PRINT_DEC
" all:"HOST_WIDEST_INT_PRINT_DEC,
(HOST_WIDEST_INT) hist->hvalue.counters[0],
(HOST_WIDEST_INT) hist->hvalue.counters[1],
(HOST_WIDEST_INT) hist->hvalue.counters[2]);
fprintf (dump_file, "value:%"PRId64
" match:%"PRId64
" all:%"PRId64,
(int64_t) hist->hvalue.counters[0],
(int64_t) hist->hvalue.counters[1],
(int64_t) hist->hvalue.counters[2]);
}
fprintf (dump_file, ".\n");
break;
@ -353,8 +353,8 @@ dump_histogram_value (FILE *dump_file, histogram_value hist)
fprintf (dump_file, "Time profile ");
if (hist->hvalue.counters)
{
fprintf (dump_file, "time:"HOST_WIDEST_INT_PRINT_DEC,
(HOST_WIDEST_INT) hist->hvalue.counters[0]);
fprintf (dump_file, "time:%"PRId64,
(int64_t) hist->hvalue.counters[0]);
}
fprintf (dump_file, ".\n");
break;
@ -1541,8 +1541,8 @@ gimple_ic_transform (gimple_stmt_iterator *gsi)
print_generic_expr (dump_file, direct_call->decl, TDF_SLIM);
fprintf (dump_file, " transformation on insn postponned to ipa-profile");
print_gimple_stmt (dump_file, stmt, 0, TDF_SLIM);
fprintf (dump_file, "hist->count "HOST_WIDEST_INT_PRINT_DEC
" hist->all "HOST_WIDEST_INT_PRINT_DEC"\n", count, all);
fprintf (dump_file, "hist->count %"PRId64
" hist->all %"PRId64"\n", count, all);
}
return true;