From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N7Bzv-00027w-WF for qemu-devel@nongnu.org; Sun, 08 Nov 2009 12:56:20 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N7Bzu-00026l-4P for qemu-devel@nongnu.org; Sun, 08 Nov 2009 12:56:18 -0500 Received: from [199.232.76.173] (port=57076 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N7Bzt-00026T-Vm for qemu-devel@nongnu.org; Sun, 08 Nov 2009 12:56:18 -0500 Received: from fg-out-1718.google.com ([72.14.220.157]:11666) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1N7Bzt-0007GL-Ia for qemu-devel@nongnu.org; Sun, 08 Nov 2009 12:56:17 -0500 Received: by fg-out-1718.google.com with SMTP id d23so1288938fga.10 for ; Sun, 08 Nov 2009 09:56:15 -0800 (PST) MIME-Version: 1.0 In-Reply-To: References: Date: Sun, 8 Nov 2009 18:56:15 +0100 Message-ID: <761ea48b0911080956xebc2320yeecc96d1b439c0ed@mail.gmail.com> Subject: Re: [Qemu-devel] Performance bug in tcg/i386 output: From: Laurent Desnogues Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Chad Cc: qemu-devel@nongnu.org On Sun, Nov 8, 2009 at 6:47 PM, Chad wrote: > Running qemu[-i386] with -d out_asm and looking at qemu.out shows this > test/j**/jmp pattern repeatedly: > > 0xb1aa40f6:=A0 test=A0=A0 %ecx,%ecx > 0xb1aa40f8:=A0 jne=A0=A0=A0 0xb1aa4115 > 0xb1aa40fe:=A0 jmp=A0=A0=A0 0xb1aa4103 > 0xb1aa4103:=A0 mov=A0=A0=A0 $0xc0bf,%eax > > Therefore there's a bug in the tcg generator creating many unnecessary > jmps.=A0 It might get optimized out by the CPU, but it might not and it b= loats > the asm output in any case... Some of these jumps are patched later when the target block is translated (block chaining). If you want to see the real output, you'll have to disassemble after execution. Laurent