aboutsummaryrefslogtreecommitdiff
path: root/libgcc
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2018-10-05 20:11:24 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2018-10-05 20:11:24 +0000
commit504cafd97cd40223dac4beb4a28cb85368cff5b9 (patch)
tree153fa1d9d2a0ab481ba54a9f2f4ed6e311e2a5bf /libgcc
parent5055f108385c076346b3b279788dc0129549b11f (diff)
parent0d48e8779c6a9ac88f5efd1b4a2d40f43ef75faf (diff)
downloadgcc-504cafd97cd40223dac4beb4a28cb85368cff5b9.zip
gcc-504cafd97cd40223dac4beb4a28cb85368cff5b9.tar.gz
gcc-504cafd97cd40223dac4beb4a28cb85368cff5b9.tar.bz2
Merge from trunk revision 264887.
From-SVN: r264890
Diffstat (limited to 'libgcc')
-rw-r--r--libgcc/ChangeLog34
-rw-r--r--libgcc/config/i386/crtprec.c2
-rw-r--r--libgcc/libgcc2.c12
-rw-r--r--libgcc/libgcov-profiler.c25
-rw-r--r--libgcc/libgcov.h9
5 files changed, 49 insertions, 33 deletions
diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog
index 928b5a8..7987129 100644
--- a/libgcc/ChangeLog
+++ b/libgcc/ChangeLog
@@ -1,3 +1,25 @@
+2018-10-04 Martin Liska <mliska@suse.cz>
+
+ PR gcov-profile/84107
+ * libgcov-profiler.c (__gcov_indirect_call):
+ Change type to indirect_call_tuple.
+ (struct indirect_call_tuple): New struct.
+ (__gcov_indirect_call_topn_profiler): Change type.
+ (__gcov_indirect_call_profiler_v2): Use the new
+ variables.
+ * libgcov.h (struct indirect_call_tuple): New struct
+ definition.
+
+2018-10-03 Uros Bizjak <ubizjak@gmail.com>
+
+ * libgcc2.c (isnan): Use __builtin_isnan.
+ (isfinite): Use __builtin_isfinite.
+ (isinf): Use __builtin_isinf.
+
+2018-09-26 Uros Bizjak <ubizjak@gmail.com>
+
+ * config/i386/crtprec.c (set_precision): Use fnstcw instead of fstcw.
+
2018-09-21 Alexandre Oliva <oliva@adacore.com>
* config/vxcache.c: New file. Provide __clear_cache, based on
@@ -101,7 +123,7 @@
unordered store to release lock.
(__sync_lock_release_8): Likewise.
(SYNC_LOCK_RELEASE_2): Remove define.
-
+
2018-08-02 Nicolas Pitre <nico@fluxnic.net>
PR libgcc/86512
@@ -412,7 +434,7 @@
* config/pa/fptr.c (_dl_read_access_allowed): New.
(__canonicalize_funcptr_for_compare): Use it.
-
+
2018-02-28 Jakub Jelinek <jakub@redhat.com>
PR debug/83917
@@ -509,21 +531,21 @@
* config/rl78/t-rl78: Added smindi3.S to LIB2ADD.
2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
-
+
* config/rl78/smaxdi3.S: New assembly file.
* config/rl78/t-rl78: Added smaxdi3.S to LIB2ADD.
2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
-
+
* config/rl78/umaxdi3.S: New assembly file.
* config/rl78/t-rl78: Added umaxdi3.S to LIB2ADD.
-
+
2018-01-21 John David Anglin <danglin@gcc.gnu.org>
PR lto/83452
* config/pa/stublib.c (L_gnu_lto_v1): New stub definition.
* config/pa/t-stublib (gnu_lto_v1-stub.o): Add make fragment.
-
+
2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
* config/aarch64/value-unwind.h (aarch64_vg): New function.
diff --git a/libgcc/config/i386/crtprec.c b/libgcc/config/i386/crtprec.c
index a397799..241e355 100644
--- a/libgcc/config/i386/crtprec.c
+++ b/libgcc/config/i386/crtprec.c
@@ -39,7 +39,7 @@ set_precision (void)
{
unsigned short int cwd;
- asm volatile ("fstcw\t%0" : "=m" (cwd));
+ asm volatile ("fnstcw\t%0" : "=m" (cwd));
cwd &= ~X87CW_PCMASK;
cwd |= X87CW;
diff --git a/libgcc/libgcc2.c b/libgcc/libgcc2.c
index f418f3a..8ac2025 100644
--- a/libgcc/libgcc2.c
+++ b/libgcc/libgcc2.c
@@ -1939,15 +1939,9 @@ NAME (TYPE x, int m)
#define CONCAT2(A,B) _CONCAT2(A,B)
#define _CONCAT2(A,B) A##B
-/* All of these would be present in a full C99 implementation of <math.h>
- and <complex.h>. Our problem is that only a few systems have such full
- implementations. Further, libgcc_s.so isn't currently linked against
- libm.so, and even for systems that do provide full C99, the extra overhead
- of all programs using libgcc having to link against libm. So avoid it. */
-
-#define isnan(x) __builtin_expect ((x) != (x), 0)
-#define isfinite(x) __builtin_expect (!isnan((x) - (x)), 1)
-#define isinf(x) __builtin_expect (!isnan(x) & !isfinite(x), 0)
+#define isnan(x) __builtin_isnan (x)
+#define isfinite(x) __builtin_isfinite (x)
+#define isinf(x) __builtin_isinf (x)
#define INFINITY CONCAT2(__builtin_huge_val, CEXT) ()
#define I 1i
diff --git a/libgcc/libgcov-profiler.c b/libgcc/libgcov-profiler.c
index 7e208d7..7a5e500 100644
--- a/libgcc/libgcov-profiler.c
+++ b/libgcc/libgcov-profiler.c
@@ -271,12 +271,7 @@ __gcov_topn_value_profiler_body (gcov_type *counters, gcov_type value)
#if defined(HAVE_CC_TLS) && !defined (USE_EMUTLS)
__thread
#endif
-gcov_type *__gcov_indirect_call_topn_counters ATTRIBUTE_HIDDEN;
-
-#if defined(HAVE_CC_TLS) && !defined (USE_EMUTLS)
-__thread
-#endif
-void *__gcov_indirect_call_topn_callee ATTRIBUTE_HIDDEN;
+struct indirect_call_tuple __gcov_indirect_call_topn;
#ifdef TARGET_VTABLE_USES_DESCRIPTORS
#define VTABLE_USES_DESCRIPTORS 1
@@ -290,14 +285,14 @@ void *__gcov_indirect_call_topn_callee ATTRIBUTE_HIDDEN;
void
__gcov_indirect_call_topn_profiler (gcov_type value, void* cur_func)
{
- void *callee_func = __gcov_indirect_call_topn_callee;
+ void *callee_func = __gcov_indirect_call_topn.callee;
/* If the C++ virtual tables contain function descriptors then one
function may have multiple descriptors and we need to dereference
the descriptors to see if they point to the same function. */
if (cur_func == callee_func
|| (VTABLE_USES_DESCRIPTORS && callee_func
&& *(void **) cur_func == *(void **) callee_func))
- __gcov_topn_value_profiler_body (__gcov_indirect_call_topn_counters, value);
+ __gcov_topn_value_profiler_body (__gcov_indirect_call_topn.counters, value);
}
#endif
@@ -311,11 +306,7 @@ __gcov_indirect_call_topn_profiler (gcov_type value, void* cur_func)
#if defined(HAVE_CC_TLS) && !defined (USE_EMUTLS)
__thread
#endif
-void * __gcov_indirect_call_callee;
-#if defined(HAVE_CC_TLS) && !defined (USE_EMUTLS)
-__thread
-#endif
-gcov_type * __gcov_indirect_call_counters;
+struct indirect_call_tuple __gcov_indirect_call;
/* By default, the C++ compiler will use function addresses in the
vtable entries. Setting TARGET_VTABLE_USES_DESCRIPTORS to nonzero
@@ -332,12 +323,12 @@ __gcov_indirect_call_profiler_v2 (gcov_type value, void* cur_func)
/* If the C++ virtual tables contain function descriptors then one
function may have multiple descriptors and we need to dereference
the descriptors to see if they point to the same function. */
- if (cur_func == __gcov_indirect_call_callee
+ if (cur_func == __gcov_indirect_call.callee
|| (__LIBGCC_VTABLE_USES_DESCRIPTORS__
- && *(void **) cur_func == *(void **) __gcov_indirect_call_callee))
- __gcov_one_value_profiler_body (__gcov_indirect_call_counters, value, 0);
+ && *(void **) cur_func == *(void **) __gcov_indirect_call.callee))
+ __gcov_one_value_profiler_body (__gcov_indirect_call.counters, value, 0);
- __gcov_indirect_call_callee = NULL;
+ __gcov_indirect_call.callee = NULL;
}
#endif
diff --git a/libgcc/libgcov.h b/libgcc/libgcov.h
index 2142287..ee05a68 100644
--- a/libgcc/libgcov.h
+++ b/libgcc/libgcov.h
@@ -226,6 +226,15 @@ struct gcov_master
gcov_unsigned_t version;
struct gcov_root *root;
};
+
+struct indirect_call_tuple
+{
+ /* Callee function. */
+ void *callee;
+
+ /* Pointer to counters. */
+ gcov_type *counters;
+};
/* Exactly one of these will be active in the process. */
extern struct gcov_master __gcov_master;