From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35309) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VE5Mj-0004UD-B5 for qemu-devel@nongnu.org; Mon, 26 Aug 2013 18:34:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VE5Ma-0005p7-KF for qemu-devel@nongnu.org; Mon, 26 Aug 2013 18:34:29 -0400 Received: from mail-ye0-x231.google.com ([2607:f8b0:4002:c04::231]:43858) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VE5Ma-0005on-FW for qemu-devel@nongnu.org; Mon, 26 Aug 2013 18:34:20 -0400 Received: by mail-ye0-f177.google.com with SMTP id r13so1023194yen.36 for ; Mon, 26 Aug 2013 15:34:20 -0700 (PDT) Sender: Richard Henderson Message-ID: <521BD7E7.9090107@twiddle.net> Date: Mon, 26 Aug 2013 15:34:15 -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> In-Reply-To: <521BD62A.50203@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 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: Paolo Bonzini Cc: aurelien@aurel32.net, qemu-devel@nongnu.org, anthony@codemonkey.ws On 08/26/2013 03:26 PM, Paolo Bonzini wrote: > Something that can be done on top of this patch: what about moving the > "-1" to helper_ret_*? It is common to pretty much all the targets > (except ARM has -2), and it would allow some simplifications. I suppose so, yes. > li rN, retaddr > mtlr rN > b st_trampoline[i] > > sequence instead of one of > > li rN, retaddr > mtlr rN > bl st_trampoline[i] > b retaddr This sort of thing is very difficult to evaluate, because of the cpu's return address prediction stack. I have so far avoided it. The only cpus that I believe can make good use of tail calls into the memory helpers are those with predicated stores and calls, i.e. arm and ia64. r~