From 5b7ada46e5eca0fa9c94def7d5fa548590fac826 Mon Sep 17 00:00:00 2001 From: aurel32 Date: Sun, 12 Oct 2008 11:44:36 +0000 Subject: Only use __builtin_* with GCC >= 3.4 Fix gcc 3.3 builds, broken in revision 5465. Signed-off-by: Aurelien Jarno git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5466 c046a42c-6fe2-441c-8c8c-71466251a162 --- hw/apic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'hw') diff --git a/hw/apic.c b/hw/apic.c index 46daf8a..4292086 100644 --- a/hw/apic.c +++ b/hw/apic.c @@ -107,7 +107,7 @@ static void apic_update_irq(APICState *s); /* Find first bit starting from msb */ static int fls_bit(uint32_t value) { -#if defined(__GNUC__) +#if defined(__GNUC__) && ((__GNUC__ > 3) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) return 31 - __builtin_clz(value); #else unsigned int ret = 0; @@ -127,7 +127,7 @@ static int fls_bit(uint32_t value) /* Find first bit starting from lsb */ static int ffs_bit(uint32_t value) { -#if defined(__GNUC__) +#if defined(__GNUC__) && ((__GNUC__ > 3) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) return __builtin_ffs(value) - 1; #else unsigned int ret = 0; -- cgit v1.1