diff options
author | Martin Liska <mliska@suse.cz> | 2016-08-17 08:55:35 +0200 |
---|---|---|
committer | Martin Liska <marxin@gcc.gnu.org> | 2016-08-17 06:55:35 +0000 |
commit | 892a653cc93da08467301e5cc18ddec7c85462f2 (patch) | |
tree | 545e63bc058dff22a56b9140f59123a5cb32f834 /gcc/tree-profile.c | |
parent | b0c67c7678bebd72eed9c0a0226777f5e3fc4cf4 (diff) | |
download | gcc-892a653cc93da08467301e5cc18ddec7c85462f2.zip gcc-892a653cc93da08467301e5cc18ddec7c85462f2.tar.gz gcc-892a653cc93da08467301e5cc18ddec7c85462f2.tar.bz2 |
Do not use LONG_LONG_TYPE_SIZE in #if macro condition
* coverage.c (get_gcov_type): Replace GCOV_TYPE_SIZE with
a LONG_LONG_TYPE_SIZE comparison.
* gcov-io.h: Remove macro definitions.
* tree-profile.c (gimple_gen_edge_profiler): Replace usage
of GCOV_TYPE_ATOMIC_FETCH_ADD with a LONG_LONG_TYPE_SIZE
comparison.
From-SVN: r239522
Diffstat (limited to 'gcc/tree-profile.c')
-rw-r--r-- | gcc/tree-profile.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/gcc/tree-profile.c b/gcc/tree-profile.c index fdf0201..622869e 100644 --- a/gcc/tree-profile.c +++ b/gcc/tree-profile.c @@ -259,11 +259,12 @@ gimple_gen_edge_profiler (int edgeno, edge e) { /* __atomic_fetch_add (&counter, 1, MEMMODEL_RELAXED); */ tree addr = tree_coverage_counter_addr (GCOV_COUNTER_ARCS, edgeno); - gcall *stmt - = gimple_build_call (builtin_decl_explicit (GCOV_TYPE_ATOMIC_FETCH_ADD), - 3, addr, one, - build_int_cst (integer_type_node, - MEMMODEL_RELAXED)); + tree f = builtin_decl_explicit (LONG_LONG_TYPE_SIZE > 32 + ? BUILT_IN_ATOMIC_FETCH_ADD_8: + BUILT_IN_ATOMIC_FETCH_ADD_4); + gcall *stmt = gimple_build_call (f, 3, addr, one, + build_int_cst (integer_type_node, + MEMMODEL_RELAXED)); gsi_insert_on_edge (e, stmt); } else |