From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NLzQG-0002xx-HP for qemu-devel@nongnu.org; Sat, 19 Dec 2009 08:32:40 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NLzQF-0002wk-FX for qemu-devel@nongnu.org; Sat, 19 Dec 2009 08:32:39 -0500 Received: from [199.232.76.173] (port=40090 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NLzQF-0002wZ-8v for qemu-devel@nongnu.org; Sat, 19 Dec 2009 08:32:39 -0500 Received: from hall.aurel32.net ([88.191.82.174]:43818) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NLzQE-0007Qe-MJ for qemu-devel@nongnu.org; Sat, 19 Dec 2009 08:32:38 -0500 Date: Sat, 19 Dec 2009 14:32:36 +0100 From: Aurelien Jarno Subject: Re: [Qemu-devel] tcg conditional set/move, round 3 Message-ID: <20091219133236.GP24729@hall.aurel32.net> References: <761ea48b0912170620l534dcb02m8ea6b59524d76dbe@mail.gmail.com> <761ea48b0912180337k627350b7ma7ab54cd248815eb@mail.gmail.com> <4B2BF650.80902@twiddle.net> <20091219130346.GN24729@hall.aurel32.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <20091219130346.GN24729@hall.aurel32.net> Sender: Aurelien Jarno List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Richard Henderson Cc: Laurent Desnogues , qemu-devel@nongnu.org On Sat, Dec 19, 2009 at 02:03:46PM +0100, Aurelien Jarno wrote: > On Fri, Dec 18, 2009 at 01:38:24PM -0800, Richard Henderson wrote: > > On 12/18/2009 03:37 AM, Laurent Desnogues wrote: > >>> tcg: Generic support for conditional set and conditional move. > >> > >> Needs cosmetics changes. > > > > Fixed, attachment 1. > > > >>> tcg-x86_64: Implement setcond and movcond. > >> > >> Some cosmetics and comments, but overall good. > > > > Fixed, attachment 2. > > > >>> tcg-i386: Implement small forward branches. > >> > >> I think this contains a bug. > > > > Fixed, attachment 3. I've added an abort to patch_reloc to verify that > > the relocation is in range. I've propagated the "small" flag to all of > > the branch functions so that... > > > >>> tcg-i386: Simplify brcond2. > >> > >> I don't like the rewrite of brcond2. > > > > ... this patch is dropped. > > > >>> tcg-i386: Implement setcond, movcond, setcond2. > >> > >> Not yet reviewed. > > > > Fixed, attachment 4. Similar changes to the amd64 patch. > > > > > Could you please send the patches inline instead. It makes them easier > to comment. > > Please find my comments here: > - I am fine with the setcond instruction > - For the movcond instruction, is there a real use for vtrue and vfalse > values? Most CPU actually implement a version with one value. > Implementing it with two values moves complexity within the arch > specific tcg code. > - Do we really want to make movcond mandatory? It can be easily > implemented using setcond, and, or instructions. > - The cmov instruction is not supported on all i386 CPU. While it is > unlikely that someone runs qemu-system on such a CPU, it is not > improbable that someone runs qemu-user on such a CPU. We should > probably provide an alternative code and a check in configure (e.g. > trying to compile asm inline code containing a cmov instruction). Forget about that, I read the i386 patch to quickly. -- Aurelien Jarno GPG: 1024D/F1BCDB73 aurelien@aurel32.net http://www.aurel32.net