From: Sandra Loosemore Date: Thu, 2 Aug 2007 11:40:57 +0000 (-0400) Subject: longlong.h [__mips__] (count_leading_zeros, [...]): Define for MIPS32 and MIPS64. X-Git-Tag: releases/gcc-4.3.0~3581 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=44f9fcef63f933908fd11e3beb4dc5298d678191;p=thirdparty%2Fgcc.git 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 --- 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