Sync longlong.h with GCC
authorH.J. Lu <hjl.tools@gmail.com>
Tue, 14 Jul 2015 16:17:41 +0000 (09:17 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Tue, 14 Jul 2015 16:18:16 +0000 (09:18 -0700)
Sync with GCC
2014-10-28  Richard Henderson  <rth@redhat.com>

* longlong.h [__alpha] (umul_ppmm): Disable for c++.

include/ChangeLog
include/longlong.h

index 8cacfa85655dc71ad358c1e391d4aeb7888b4512..9fc5469176f0db0a945a2440e586548b0d10f503 100644 (file)
@@ -1,3 +1,10 @@
+2015-07-14  H.J. Lu  <hongjiu.lu@intel.com>
+
+       Sync with GCC
+       2014-10-28  Richard Henderson  <rth@redhat.com>
+
+       * longlong.h [__alpha] (umul_ppmm): Disable for c++.
+
 2015-07-14  H.J. Lu  <hongjiu.lu@intel.com>
 
        Sync with GCC
index 4f2c4f5dfcc0e110451734c0cede8de7158b026b..a0b2ce1f7f2f214ea0634363bc85e612e339cb11 100644 (file)
@@ -139,6 +139,9 @@ extern const UQItype __clz_tab[256] attribute_hidden;
 #endif /* __aarch64__ */
 
 #if defined (__alpha) && W_TYPE_SIZE == 64
+/* There is a bug in g++ before version 5 that
+   errors on __builtin_alpha_umulh.  */
+#if !defined(__cplusplus) || __GNUC__ >= 5
 #define umul_ppmm(ph, pl, m0, m1) \
   do {                                                                 \
     UDItype __m0 = (m0), __m1 = (m1);                                  \
@@ -146,6 +149,7 @@ extern const UQItype __clz_tab[256] attribute_hidden;
     (pl) = __m0 * __m1;                                                        \
   } while (0)
 #define UMUL_TIME 46
+#endif /* !c++ */
 #ifndef LONGLONG_STANDALONE
 #define udiv_qrnnd(q, r, n1, n0, d) \
   do { UDItype __r;                                                    \