aboutsummaryrefslogtreecommitdiff
path: root/gcc/longlong.h
diff options
context:
space:
mode:
authorJesper Nilsson <jesper.nilsson@axis.com>2007-09-03 00:47:30 +0000
committerHans-Peter Nilsson <hp@gcc.gnu.org>2007-09-03 00:47:30 +0000
commite636e5082715d2ff61685725187c2bbc2e9860cc (patch)
treecbd027da307f29492e94fa168a16a2f7e28648bd /gcc/longlong.h
parentf568cd7be88adee8585a0ae4f741a9937210a8a2 (diff)
downloadgcc-e636e5082715d2ff61685725187c2bbc2e9860cc.zip
gcc-e636e5082715d2ff61685725187c2bbc2e9860cc.tar.gz
gcc-e636e5082715d2ff61685725187c2bbc2e9860cc.tar.bz2
cris.h (TARGET_HAS_LZ, [...]): Defined to describe availability and behavior of CLZ.
* config/cris/cris.h (TARGET_HAS_LZ, CLZ_DEFINED_VALUE_AT_ZERO): Defined to describe availability and behavior of CLZ. * config/cris/cris.md (clzsi2): Implement using lz instruction. * config/cris/cris.opt: Tweak comment for "-metrax4". * config/cris/arit.c (LZ): When defined, define as __builtin_clz. * longlong.h [__CRIS__ && __CRIS_arch_version >= 3] (count_leading_zeros): Define. Co-Authored-By: Hans-Peter Nilsson <hp@axis.com> From-SVN: r128034
Diffstat (limited to 'gcc/longlong.h')
-rw-r--r--gcc/longlong.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/longlong.h b/gcc/longlong.h
index 0d8e01d..edb9bfd 100644
--- a/gcc/longlong.h
+++ b/gcc/longlong.h
@@ -226,6 +226,10 @@ UDItype __umulsidi3 (USItype, USItype);
#define UDIV_TIME 100
#endif /* __arm__ */
+#if defined (__CRIS__) && __CRIS_arch_version >= 3
+#define count_leading_zeros(COUNT, X) ((COUNT) = __builtin_clz (X))
+#endif /* __CRIS__ */
+
#if defined (__hppa) && W_TYPE_SIZE == 32
#define add_ssaaaa(sh, sl, ah, al, bh, bl) \
__asm__ ("add %4,%5,%1\n\taddc %2,%3,%0" \