From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Kl9YS-0008TZ-Lw for qemu-devel@nongnu.org; Wed, 01 Oct 2008 17:48:20 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Kl9YR-0008TM-7f for qemu-devel@nongnu.org; Wed, 01 Oct 2008 17:48:19 -0400 Received: from [199.232.76.173] (port=47861 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kl9YR-0008TJ-02 for qemu-devel@nongnu.org; Wed, 01 Oct 2008 17:48:19 -0400 Received: from hall.aurel32.net ([88.191.82.174]:56277) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Kl9YQ-0003Up-Jo for qemu-devel@nongnu.org; Wed, 01 Oct 2008 17:48:18 -0400 Received: from volta.aurel32.net ([2002:52e8:2fb:1:21e:8cff:feb0:693b]) by hall.aurel32.net with esmtpsa (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1Kl9YP-0002o4-AU for qemu-devel@nongnu.org; Wed, 01 Oct 2008 23:48:17 +0200 Received: from aurel32 by volta.aurel32.net with local (Exim 4.69) (envelope-from ) id 1Kl9YK-0001Ic-Lp for qemu-devel@nongnu.org; Wed, 01 Oct 2008 23:48:12 +0200 Date: Wed, 1 Oct 2008 23:48:12 +0200 From: Aurelien Jarno Subject: Re: [Qemu-devel] [patch] use bsr and bsf on x86_64 Message-ID: <20081001214812.GD31270@volta.aurel32.net> References: <8B966610-6ECA-40B6-8919-F93506F0C356@hotmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <8B966610-6ECA-40B6-8919-F93506F0C356@hotmail.com> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org 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