From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50940) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VHbJY-0002hA-86 for qemu-devel@nongnu.org; Thu, 05 Sep 2013 11:17:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VHbJS-0004gX-Ek for qemu-devel@nongnu.org; Thu, 05 Sep 2013 11:17:44 -0400 Sender: Richard Henderson Message-ID: <5228A08C.5040106@twiddle.net> Date: Thu, 05 Sep 2013 08:17:32 -0700 From: Richard Henderson MIME-Version: 1.0 References: <1378369329-2187-1-git-send-email-pbonzini@redhat.com> <1378369329-2187-3-git-send-email-pbonzini@redhat.com> In-Reply-To: <1378369329-2187-3-git-send-email-pbonzini@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 2/2] tcg-ppc: use new return-argument ld/st helpers List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org, aurelien@aurel32.net On 09/05/2013 01:22 AM, Paolo Bonzini wrote: > These use a 32-bit load-of-immediate to save a mflr+addi+mtlr sequence. > Tested with a Windows 98 guest (pretty much the most recent thing I > could run on my PPC machine) and kvm-unit-tests's sieve.flat. The > speed up for sieve.flat is as high as 10% for qemu-system-i386, 25% > (no kidding) for qemu-system-x86_64 on my PowerBook G4. See also the series beginning at http://lists.nongnu.org/archive/html/qemu-devel/2013-09/msg00025.html The major difference is that I use a conditional call out of the fast path, which lets me later just use one mflr to pass the parameter. I also, perhaps foolishly, got rid of the trampolines. E.g. 0xf57a1838: rlwinm r3,r15,24,20,27 0xf57a183c: rlwinm r0,r15,0,30,19 0xf57a1840: add r3,r3,r27 0xf57a1844: lwz r4,6436(r3) 0xf57a1848: cmpw cr7,r0,r4 0xf57a184c: lwz r3,6444(r3) 0xf57a1850: bnel- cr7,0xf57a1910 0xf57a1854: stwx r16,r3,r15 ... 0xf57a1910: mr r3,r27 0xf57a1914: mr r4,r15 0xf57a1918: mr r5,r16 0xf57a191c: li r6,1 0xf57a1920: mflr r7 0xf57a1924: lis r0,4120 0xf57a1928: ori r0,r0,45040 0xf57a192c: mtctr r0 0xf57a1930: bctrl 0xf57a1934: b 0xf57a1858 I don't see anything technically wrong with your patch. But I'd be interested to compare vs mine. r~