Daily bump.
[gcc.git] / libgcc / libgcc2.c
index 5d3c69f16aae12980eb591fe3465b1c784c2c48e..e0a9fd712e70c816113ddb6d061ce979657878fc 100644 (file)
@@ -1,6 +1,6 @@
 /* More subroutines needed by GCC output code on some machines.  */
 /* Compile this one with gcc.  */
-/* Copyright (C) 1989-2017 Free Software Foundation, Inc.
+/* Copyright (C) 1989-2020 Free Software Foundation, Inc.
 
 This file is part of GCC.
 
@@ -375,7 +375,8 @@ __mulvDI3 (DWtype u, DWtype v)
                }
              else
                {
-                 if (uu.s.high == (Wtype) -1 && vv.s.high == (Wtype) - 1)
+                 if ((uu.s.high & vv.s.high) == (Wtype) -1
+                     && (uu.s.low | vv.s.low) != 0)
                    {
                      DWunion ww = {.ll = (UDWtype) (UWtype) uu.s.low
                                    * (UDWtype) (UWtype) vv.s.low};
@@ -1683,7 +1684,7 @@ FUNC (DWtype u)
 
   /* No leading bits means u == minimum.  */
   if (count == 0)
-    return -(Wtype_MAXp1_F * (Wtype_MAXp1_F / 2));
+    return Wtype_MAXp1_F * (FSTYPE) (hi | ((UWtype) u != 0));
 
   shift = 1 + W_TYPE_SIZE - count;
 
@@ -1938,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
@@ -2167,11 +2162,14 @@ __eprintf (const char *string, const char *expression,
 /* Clear part of an instruction cache.  */
 
 void
-__clear_cache (char *beg __attribute__((__unused__)),
-              char *end __attribute__((__unused__)))
+__clear_cache (void *beg __attribute__((__unused__)),
+              void *end __attribute__((__unused__)))
 {
 #ifdef CLEAR_INSN_CACHE
-  CLEAR_INSN_CACHE (beg, end);
+  /* Cast the void* pointers to char* as some implementations
+     of the macro assume the pointers can be subtracted from
+     one another.  */
+  CLEAR_INSN_CACHE ((char *) beg, (char *) end);
 #endif /* CLEAR_INSN_CACHE */
 }