summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authoraurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162>2008-10-01 21:45:59 +0000
committeraurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162>2008-10-01 21:45:59 +0000
commit5a964d93dce5ee2059d960afd3a5748f5b94456e (patch)
tree467485e557f840631389be021c8872cda7f672a4 /hw
parente90f009bd2c47dc6379633bd6688ebc0fbf30172 (diff)
downloadqemu-5a964d93dce5ee2059d960afd3a5748f5b94456e.zip
hw/apic.c: use bsr and bsf on x86_64
(C.W. Betts) git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5382 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw')
-rw-r--r--hw/apic.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/apic.c b/hw/apic.c
index 64e75ad0f0..74e3a71615 100644
--- a/hw/apic.c
+++ b/hw/apic.c
@@ -109,7 +109,7 @@ static int fls_bit(uint32_t value)
{
unsigned int ret = 0;
-#if defined(HOST_I386)
+#if defined(HOST_I386) || defined(HOST_X86_64)
__asm__ __volatile__ ("bsr %1, %0\n" : "+r" (ret) : "rm" (value));
return ret;
#else
@@ -130,7 +130,7 @@ static int ffs_bit(uint32_t value)
{
unsigned int ret = 0;
-#if defined(HOST_I386)
+#if defined(HOST_I386) || defined(HOST_X86_64)
__asm__ __volatile__ ("bsf %1, %0\n" : "+r" (ret) : "rm" (value));
return ret;
#else