* [Qemu-devel] [patch] use bsr and bsf on x86_64
[not found] <8B966610-6ECA-40B6-8919-F93506F0C356@hotmail.com>
@ 2008-09-15 16:09 ` C.W. Betts
2008-10-01 21:48 ` Aurelien Jarno
1 sibling, 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
* Re: [Qemu-devel] [patch] use bsr and bsf on x86_64
[not found] <8B966610-6ECA-40B6-8919-F93506F0C356@hotmail.com>
2008-09-15 16:09 ` [Qemu-devel] [patch] use bsr and bsf on x86_64 C.W. Betts
@ 2008-10-01 21:48 ` Aurelien Jarno
1 sibling, 0 replies; 2+ messages in thread
From: Aurelien Jarno @ 2008-10-01 21:48 UTC (permalink / raw)
To: qemu-devel
On Mon, Sep 15, 2008 at 10:09:37AM -0600, C.W. Betts wrote:
> This patch makes apic.c use asm code bsr and bsf on X86_64 processors. I
> haven't had any problems with this code…
Applied, thanks.
> 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
>
>
>
>
>
>
--
.''`. Aurelien Jarno | GPG: 1024D/F1BCDB73
: :' : Debian developer | Electrical Engineer
`. `' aurel32@debian.org | aurelien@aurel32.net
`- people.debian.org/~aurel32 | www.aurel32.net
^ 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 --
[not found] <8B966610-6ECA-40B6-8919-F93506F0C356@hotmail.com>
2008-09-15 16:09 ` [Qemu-devel] [patch] use bsr and bsf on x86_64 C.W. Betts
2008-10-01 21:48 ` Aurelien Jarno
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).