All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [patch] use bsr and bsf on x86_64
@ 2008-09-15 16:09 ` C.W. Betts
  0 siblings, 0 replies; 2+ messages in thread
From: C.W. Betts @ 2008-09-15 16:09 UTC (permalink / raw)
  To: qemu-devel

This patch makes apic.c use asm code bsr and bsf on X86_64  
processors.  I haven't had any problems with this code…

Index: hw/apic.c
===================================================================
--- hw/apic.c	(revision 5229)
+++ hw/apic.c	(working copy)
@@ -109,7 +109,7 @@
  {
      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 @@
  {
      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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-10-01 21:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-15 16:09 [Qemu-devel] [patch] use bsr and bsf on x86_64 C.W. Betts
2008-09-15 16:09 ` C.W. Betts
2008-10-01 21:48 ` Aurelien Jarno

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.