summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorsandra <sandra@138bc75d-0d04-0410-961f-82ee72b054a4>2007-08-02 11:40:57 +0000
committersandra <sandra@138bc75d-0d04-0410-961f-82ee72b054a4>2007-08-02 11:40:57 +0000
commitb43927bc3ad30496108222b85cb7c312f8a79d02 (patch)
treea6146e5260844c570c9f5d1033dd33dfc08e3d24 /gcc
parentb899a96b185a7ce475ef5c5d653faeae0a60b424 (diff)
downloadgcc-b43927bc3ad30496108222b85cb7c312f8a79d02.tar.gz
2007-08-02 Sandra Loosemore <sandra@codesourcery.com>
Nigel Stephens <nigel@mips.com> gcc/ * longlong.h [__mips__] (count_leading_zeros, COUNT_LEADING_ZEROS_0): Define for MIPS32 and MIPS64. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@127159 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/longlong.h5
2 files changed, 11 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 508b27d2ce1..c79f2e71702 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2007-08-02 Sandra Loosemore <sandra@codesourcery.com>
+ Nigel Stephens <nigel@mips.com>
+
+ * longlong.h [__mips__] (count_leading_zeros, COUNT_LEADING_ZEROS_0):
+ Define for MIPS32 and MIPS64.
+
2007-08-02 Nick Clifton <nickc@redhat.com>
* config/host-hpux.c: Change copyright header to refer to version
diff --git a/gcc/longlong.h b/gcc/longlong.h
index 87021d0ebb9..0d8e01d3bf2 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