summaryrefslogtreecommitdiff
path: root/longlong.h
diff options
context:
space:
mode:
authorKevin Ryde <user42@zip.com.au>2003-08-19 01:59:30 +0200
committerKevin Ryde <user42@zip.com.au>2003-08-19 01:59:30 +0200
commit399a0443f82ba01d4265ad0aefe81cbb69b3e158 (patch)
treeaee50c072a66041c39298f95cc9637d0107b179b /longlong.h
parent1b9274691d8bf98028496754e684fc70b8285e63 (diff)
downloadgmp-399a0443f82ba01d4265ad0aefe81cbb69b3e158.tar.gz
* longlong.h (count_leading_zeros) [__mcpu32__]: Check __mcpu32__ to
avoid bfffo on GCC 3.4 in CPU32 mode. Reported by Bernardo Innocenti.
Diffstat (limited to 'longlong.h')
-rw-r--r--longlong.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/longlong.h b/longlong.h
index 7764e0d8d..af18697a6 100644
--- a/longlong.h
+++ b/longlong.h
@@ -839,12 +839,15 @@ extern UWtype __MPN(udiv_qrnnd) _PROTO ((UWtype *, UWtype, UWtype, UWtype));
#define UMUL_TIME 100
#define UDIV_TIME 400
#endif /* not mc68020 */
-/* The '020, '030, '040 and '060 have bitfield insns. */
-#if defined (__mc68020__) || defined (mc68020) \
+/* The '020, '030, '040 and '060 have bitfield insns.
+ GCC 3.4 defines __mc68020__ when in CPU32 mode, check for __mcpu32__ to
+ exclude bfffo on that chip (bitfield insns not available). */
+#if (defined (__mc68020__) || defined (mc68020) \
|| defined (__mc68030__) || defined (mc68030) \
|| defined (__mc68040__) || defined (mc68040) \
|| defined (__mc68060__) || defined (mc68060) \
- || defined (__NeXT__)
+ || defined (__NeXT__)) \
+ && ! defined (__mcpu32__)
#define count_leading_zeros(count, x) \
__asm__ ("bfffo %1{%b2:%b2},%0" \
: "=d" ((USItype) (count)) \