From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Msfh1-000877-Vi for qemu-devel@nongnu.org; Tue, 29 Sep 2009 12:36:48 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Msfgw-00082A-KW for qemu-devel@nongnu.org; Tue, 29 Sep 2009 12:36:47 -0400 Received: from [199.232.76.173] (port=56229 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Msfgw-00081Q-8E for qemu-devel@nongnu.org; Tue, 29 Sep 2009 12:36:42 -0400 Received: from mx20.gnu.org ([199.232.41.8]:35428) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MsfFV-00085E-Jf for qemu-devel@nongnu.org; Tue, 29 Sep 2009 12:08:22 -0400 Received: from mail-ew0-f221.google.com ([209.85.219.221]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Msf0p-0005Kf-Sz for qemu-devel@nongnu.org; Tue, 29 Sep 2009 11:53:12 -0400 Received: by ewy21 with SMTP id 21so5346722ewy.8 for ; Tue, 29 Sep 2009 08:51:09 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <761ea48b0909280121r13c14861y4a0a2683ffb79d2b@mail.gmail.com> References: <200909271613.n8RGDCLo020606@d01av04.pok.ibm.com> <4AC06AF0.7010300@redhat.com> <761ea48b0909280121r13c14861y4a0a2683ffb79d2b@mail.gmail.com> Date: Tue, 29 Sep 2009 17:51:09 +0200 Message-ID: <5b31733c0909290851h30e05edauf5c31a3d18fbfbf9@mail.gmail.com> Subject: Re: [Qemu-devel] Re: [Qemu-commits] [COMMIT a4b18c6] tcg/x86_64: generated dec/inc instead of sub/addwhen possible From: Filip Navara 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: Laurent Desnogues Cc: Avi Kivity , Aurelien Jarno , "qemu-devel@nongnu.org" On Mon, Sep 28, 2009 at 10:21 AM, Laurent Desnogues wrote: > On Mon, Sep 28, 2009 at 9:51 AM, Avi Kivity wrote: >> On 09/27/2009 06:13 PM, Anthony Liguori wrote: >>> >>> From: Aurelien Jarno >>> >> >> Intel recommends not using inc/dec. =A0Since these instructions don't up= date >> all of the flags, they cannot be issued in parallel to previous instruct= ions >> that do. > > That's true, but I think Icache misses will cost you more than > the false dependencies; =A0due to code size expansion in the > translation process, optimizing rules should not be obeyed > blindly. =A0I guess this should be measured. I vaguely remember measuring it and the results were different on Pentium IV-based and Pentium M-based processors. On one of them inc/dec was faster, while on the other it was add/sub. I can't remember which one had which results though. Best regards, Filip Navara