From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40512) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VEKeo-0005AN-63 for qemu-devel@nongnu.org; Tue, 27 Aug 2013 10:54:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VEKef-0008Rv-Pg for qemu-devel@nongnu.org; Tue, 27 Aug 2013 10:54:10 -0400 Received: from mail-pa0-x22d.google.com ([2607:f8b0:400e:c03::22d]:39198) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VEKef-0008Rp-Hw for qemu-devel@nongnu.org; Tue, 27 Aug 2013 10:54:01 -0400 Received: by mail-pa0-f45.google.com with SMTP id bg4so4912638pad.4 for ; Tue, 27 Aug 2013 07:54:00 -0700 (PDT) Sender: Richard Henderson Message-ID: <521CBD84.1040508@twiddle.net> Date: Tue, 27 Aug 2013 07:53:56 -0700 From: Richard Henderson MIME-Version: 1.0 References: <1377550812-908-1-git-send-email-rth@twiddle.net> <1377550812-908-6-git-send-email-rth@twiddle.net> <521BD62A.50203@redhat.com> <521BD7E7.9090107@twiddle.net> <20130827104647.GA5908@ohm.aurel32.net> In-Reply-To: <20130827104647.GA5908@ohm.aurel32.net> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PULL 5/7] tcg: Add mmu helpers that take a return address argument List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Aurelien Jarno Cc: Paolo Bonzini , qemu-devel@nongnu.org, anthony@codemonkey.ws On 08/27/2013 03:46 AM, Aurelien Jarno wrote: > On the other hand calling the helper is the exception more than the > rule (that's why they have been moved at the end of the TB), so we > should not look to much at generating fast code, but rather small code > in order to use the caches (both TB and CPU caches) more efficiently. > > Therefore even on x86, if we move the -1 at the helper level, it should > be possible to use a tail call for the stores, something like: > > mov %r14,%rdi > mov %ebx,%edx > xor %ecx,%ecx > lea -0x10f(%rip),%r8 # 0x7f2541a6f69a > pushq %r8 > jmpq 0x7f25526757a0 > > Instead of: > > mov %r14,%rdi > mov %ebx,%edx > xor %ecx,%ecx > lea -0x10f(%rip),%r8 # 0x7f2541a6f69a > callq 0x7f25526757a0 > jmpq 0x7f2541a6f69b Fair enough. I'll have a go at some follow-ups then. r~