From 44f9fcef63f933908fd11e3beb4dc5298d678191 Mon Sep 17 00:00:00 2001 From: Sandra Loosemore Date: Thu, 2 Aug 2007 07:40:57 -0400 Subject: [PATCH] longlong.h [__mips__] (count_leading_zeros, [...]): Define for MIPS32 and MIPS64. 2007-08-02 Sandra Loosemore Nigel Stephens gcc/ * longlong.h [__mips__] (count_leading_zeros, COUNT_LEADING_ZEROS_0): Define for MIPS32 and MIPS64. Co-Authored-By: Nigel Stephens From-SVN: r127159 --- gcc/ChangeLog | 6 ++++++ gcc/longlong.h | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 508b27d2ce1a..c79f2e717022 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2007-08-02 Sandra Loosemore + Nigel Stephens + + * longlong.h [__mips__] (count_leading_zeros, COUNT_LEADING_ZEROS_0): + Define for MIPS32 and MIPS64. + 2007-08-02 Nick Clifton * config/host-hpux.c: Change copyright header to refer to version diff --git a/gcc/longlong.h b/gcc/longlong.h index 87021d0ebb9f..0d8e01d3bf2b 100644 --- a/gcc/longlong.h +++ b/gcc/longlong.h @@ -624,6 +624,11 @@ UDItype __umulsidi3 (USItype, USItype); "d" ((USItype) (v))) #define UMUL_TIME 10 #define UDIV_TIME 100 + +#if (__mips == 32 || __mips == 64) && ! __mips16 +#define count_leading_zeros(COUNT,X) ((COUNT) = __builtin_clz (X)) +#define COUNT_LEADING_ZEROS_0 32 +#endif #endif /* __mips__ */ #if defined (__ns32000__) && W_TYPE_SIZE == 32 -- 2.47.2