diff options
Diffstat (limited to 'arch/powerpc64')
-rw-r--r-- | arch/powerpc64/atomic_arch.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/powerpc64/atomic_arch.h b/arch/powerpc64/atomic_arch.h index 269d79c6..17cababd 100644 --- a/arch/powerpc64/atomic_arch.h +++ b/arch/powerpc64/atomic_arch.h @@ -61,3 +61,10 @@ static inline void a_crash() { __asm__ __volatile__ (".long 0"); } + +#define a_clz_64 a_clz_64 +static inline int a_clz_64(uint64_t x) +{ + __asm__ ("cntlzd %0, %1" : "=r"(x) : "r"(x)); + return x; +} |