From: "Jan Beulich" Subject: Re: Ping: [PATCH 0/4] HVM: produce better binary code Date: Thu, 05 Sep 2013 08:52:14 +0100 Message-ID: <5228544E02000078000F0AC6@nat28.tlf.novell.com> References: <521786A002000078000EE064@nat28.tlf.novell.com> <5227223902000078000F048E@nat28.tlf.novell.com> <52275CEC.7000308@citrix.com> <20130904163044.GB48901@ocelot.phlegethon.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1VHUML-0007ck-Au for xen-devel@lists.xenproject.org; Thu, 05 Sep 2013 07:52:09 +0000 In-Reply-To: <20130904163044.GB48901@ocelot.phlegethon.org> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Andrew Cooper , Tim Deegan Cc: suravee.suthikulpanit@amd.com, Jacob Shin , Eddie Dong , Jun Nakajima , xen-devel , Boris Ostrovsky List-Id: xen-devel@lists.xenproject.org >>> On 04.09.13 at 18:30, Tim Deegan wrote: > I'm not certain, on a modern CPU, whether it's better to issue a series > of PUSHes or a series of %rsp-relative MOVs and a SUB. When I did the push/pop -> mov conversion for the non-HVM code I did some measurements, with the result that the sequence of moves was never slower but sometimes (usually on older CPUs) faster. And the obvious benefit of moves is that interleaving them with other code is less of a risk (in terms of breaking CPU-internal bypasses/optimizations) than with pushes and pops. Jan