X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;ds=sidebyside;f=gcc%2Flibgcov.c;h=04fc3b2a0d8bf1ff9b3d2e7f18ed112da6ea5138;hb=079a182e02a0720f9ac230c212fd202df3e6bd9e;hp=880686eba04c9d41d1ea98af4d1f917bb2cdfebb;hpb=2472200d9c53250482c75443611251490b23e5f2;p=gcc.git diff --git a/gcc/libgcov.c b/gcc/libgcov.c index 880686eba04..04fc3b2a0d8 100644 --- a/gcc/libgcov.c +++ b/gcc/libgcov.c @@ -614,6 +614,18 @@ __gcov_merge_add (gcov_type *counters, unsigned n_counters) } #endif /* L_gcov_merge_add */ +#ifdef L_gcov_merge_ior +/* The profile merging function that just adds the counters. It is given + an array COUNTERS of N_COUNTERS old counters and it reads the same number + of counters from the gcov file. */ +void +__gcov_merge_ior (gcov_type *counters, unsigned n_counters) +{ + for (; n_counters; counters++, n_counters--) + *counters |= gcov_read_counter (); +} +#endif + #ifdef L_gcov_merge_single /* The profile merging function for choosing the most common value. It is given an array COUNTERS of N_COUNTERS old counters and it @@ -770,6 +782,30 @@ __gcov_indirect_call_profiler (gcov_type* counter, gcov_type value, } #endif + +#ifdef L_gcov_average_profiler +/* Increase corresponding COUNTER by VALUE. FIXME: Perhaps we want + to saturate up. */ + +void +__gcov_average_profiler (gcov_type *counters, gcov_type value) +{ + counters[0] += value; + counters[1] ++; +} +#endif + +#ifdef L_gcov_ior_profiler +/* Increase corresponding COUNTER by VALUE. FIXME: Perhaps we want + to saturate up. */ + +void +__gcov_ior_profiler (gcov_type *counters, gcov_type value) +{ + *counters |= value; +} +#endif + #ifdef L_gcov_fork /* A wrapper for the fork function. Flushes the accumulated profiling data, so that they are not counted twice. */