summaryrefslogtreecommitdiff
path: root/longlong.h
diff options
context:
space:
mode:
authorKevin Ryde <user42@zip.com.au>2004-02-11 00:55:01 +0100
committerKevin Ryde <user42@zip.com.au>2004-02-11 00:55:01 +0100
commit6c5e94c5f449cf40d73f78fe93d89a18f6f41f69 (patch)
treec702a7ef918cd44a577cb15364f4862750736584 /longlong.h
parent1b6484c411835cf38df8c1eff04fa14eb242ee36 (diff)
downloadgmp-6c5e94c5f449cf40d73f78fe93d89a18f6f41f69.tar.gz
* longlong.h (power, powerpc): Use HAVE_HOST_CPU_FAMILY_power and
HAVE_HOST_CPU_FAMILY_powerpc rather than various cpp defines.
Diffstat (limited to 'longlong.h')
-rw-r--r--longlong.h22
1 files changed, 8 insertions, 14 deletions
diff --git a/longlong.h b/longlong.h
index 8d00c85ab..b5627659f 100644
--- a/longlong.h
+++ b/longlong.h
@@ -971,16 +971,9 @@ extern UWtype __MPN(udiv_qrnnd) _PROTO ((UWtype *, UWtype, UWtype, UWtype));
#endif /* __ns32000__ */
/* FIXME: We should test _IBMR2 here when we add assembly support for the
- system vendor compilers.
- FIXME: What's needed for gcc PowerPC VxWorks? __vxworks__ is not good
- enough, since that hits ARM and m68k too. */
-#if (defined (_ARCH_PPC) /* AIX */ \
- || defined (_ARCH_PWR) /* AIX */ \
- || defined (__powerpc__) /* gcc */ \
- || defined (__POWERPC__) /* BEOS */ \
- || defined (__ppc__) /* Darwin */ \
- || defined (PPC) /* GNU/Linux, SysV */ \
- ) && W_TYPE_SIZE == 32
+ system vendor compilers. */
+#if (HAVE_HOST_CPU_FAMILY_power || HAVE_HOST_CPU_FAMILY_powerpc) \
+ && W_TYPE_SIZE == 32
#define add_ssaaaa(sh, sl, ah, al, bh, bl) \
do { \
if (__builtin_constant_p (bh) && (bh) == 0) \
@@ -1016,8 +1009,7 @@ extern UWtype __MPN(udiv_qrnnd) _PROTO ((UWtype *, UWtype, UWtype, UWtype));
#define count_leading_zeros(count, x) \
__asm__ ("{cntlz|cntlzw} %0,%1" : "=r" (count) : "r" (x))
#define COUNT_LEADING_ZEROS_0 32
-#if defined (_ARCH_PPC) || defined (__powerpc__) || defined (__POWERPC__) \
- || defined (__ppc__) || defined (PPC)
+#if HAVE_HOST_CPU_FAMILY_powerpc
#define umul_ppmm(ph, pl, m0, m1) \
do { \
USItype __m0 = (m0), __m1 = (m1); \
@@ -1046,8 +1038,10 @@ extern UWtype __MPN(udiv_qrnnd) _PROTO ((UWtype *, UWtype, UWtype, UWtype));
/* We should test _IBMR2 here when we add assembly support for the system
vendor compilers. */
-#if (defined (_ARCH_PPC) || defined (__powerpc__)) && W_TYPE_SIZE == 64
-#if !defined (_LONG_LONG_LIMB) /* <- assume cpu in 32-bit mode */
+#if HAVE_HOST_CPU_FAMILY_powerpc && W_TYPE_SIZE == 64
+#if !defined (_LONG_LONG_LIMB)
+/* _LONG_LONG_LIMB is ABI=mode32 where adde operates on 32-bit values. So
+ use adde etc only when not _LONG_LONG_LIMB. */
#define add_ssaaaa(sh, sl, ah, al, bh, bl) \
do { \
if (__builtin_constant_p (bh) && (bh) == 0) \