diff options
author | Sandra Loosemore <sandra@codesourcery.com> | 2007-01-19 08:34:59 -0500 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2007-01-19 13:34:59 +0000 |
commit | 7a6525d680adecf48a0302cb13cc9dcc93fe78d3 (patch) | |
tree | 2d282a29fb31bb7a9465bb7f14d848ea31f9af9c /gcc/longlong.h | |
parent | f233b84c1759b8b3f5392c1b195a7866418a8590 (diff) | |
download | gcc-7a6525d680adecf48a0302cb13cc9dcc93fe78d3.tar.gz |
200x-xx-xx Sandra Loosemore <sandra@codesourcery.com>
gcc/
200x-xx-xx Sandra Loosemore <sandra@codesourcery.com>
* 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
Diffstat (limited to 'gcc/longlong.h')
-rw-r--r-- | gcc/longlong.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/longlong.h b/gcc/longlong.h index 1325b31f0c9..8b512d2f284 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 */ |