From 7a6525d680adecf48a0302cb13cc9dcc93fe78d3 Mon Sep 17 00:00:00 2001 From: Sandra Loosemore Date: Fri, 19 Jan 2007 08:34:59 -0500 Subject: 200x-xx-xx Sandra Loosemore gcc/ 200x-xx-xx Sandra Loosemore * longlong.h (count_leading_zeros, COUNT_LEADING_ZEROS_0): Add ColdFire alternatives. * config/m68k/m68k.h (CLZ_DEFINED_VALUE_AT_ZERO): New macro. * config/m68k/m68k.md (clzsi2): Define for ColdFire architectures that support ff1 instruction. From-SVN: r120959 --- gcc/longlong.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'gcc/longlong.h') diff --git a/gcc/longlong.h b/gcc/longlong.h index 1325b31..8b512d2 100644 --- a/gcc/longlong.h +++ b/gcc/longlong.h @@ -521,6 +521,11 @@ UDItype __umulsidi3 (USItype, USItype); __asm__ ("bfffo %1{%b2:%b2},%0" \ : "=d" ((USItype) (count)) \ : "od" ((USItype) (x)), "n" (0)) +/* Some ColdFire architectures have a ff1 instruction supported via + __builtin_clz. */ +#elif defined (__mcfisaaplus__) || defined (__mcfisac__) +#define count_leading_zeros(count,x) ((count) = __builtin_clz (x)) +#define COUNT_LEADING_ZEROS_0 32 #endif #endif /* mc68000 */ -- cgit v1.1