From c8ed9db1fa7100b296c017b24369cc5d94e5c16f Mon Sep 17 00:00:00 2001 From: Andrew Cooper Date: Tue, 13 Aug 2013 14:17:19 +0100 Subject: tools: Cull more ia64 and ppc code Signed-off-by: Andrew Cooper Acked-by: Ian Campbell --- tools/libfsimage/common/fsimage_grub.c | 46 ---------------------------------- 1 file changed, 46 deletions(-) (limited to 'tools/libfsimage') diff --git a/tools/libfsimage/common/fsimage_grub.c b/tools/libfsimage/common/fsimage_grub.c index c58790d523..ef71d6cceb 100644 --- a/tools/libfsimage/common/fsimage_grub.c +++ b/tools/libfsimage/common/fsimage_grub.c @@ -138,52 +138,6 @@ fsig_log2 (unsigned long word) return word; } -#elif defined(__ia64__) - -#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) -# define ia64_popcnt(x) __builtin_popcountl(x) -#else -# define ia64_popcnt(x) \ - ({ \ - uint64_t ia64_intri_res; \ - asm ("popcnt %0=%1" : "=r" (ia64_intri_res) : "r" (x)); \ - ia64_intri_res; \ - }) -#endif - -unsigned long -fsig_log2 (unsigned long word) -{ - unsigned long result; - - result = ia64_popcnt((word - 1) & ~word); - return result; -} - -#elif defined(__powerpc__) - -#ifdef __powerpc64__ -#define PPC_CNTLZL "cntlzd" -#else -#define PPC_CNTLZL "cntlzw" -#endif -#define BITS_PER_LONG (sizeof(long) * 8) - -static int -__ilog2(unsigned long x) -{ - int lz; - - asm (PPC_CNTLZL " %0,%1" : "=r" (lz) : "r" (x)); - return BITS_PER_LONG - 1 - lz; -} - -unsigned long -fsig_log2 (unsigned long word) -{ - return __ilog2(word & -word); -} - #else /* Unoptimized */ unsigned long -- cgit v1.2.3