From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38999) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VF9D8-0004Mn-69 for qemu-devel@nongnu.org; Thu, 29 Aug 2013 16:53:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VF9Cz-0004JU-OJ for qemu-devel@nongnu.org; Thu, 29 Aug 2013 16:52:58 -0400 Received: from mail-vc0-x22d.google.com ([2607:f8b0:400c:c03::22d]:45252) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VF9Cz-0004JI-KD for qemu-devel@nongnu.org; Thu, 29 Aug 2013 16:52:49 -0400 Received: by mail-vc0-f173.google.com with SMTP id id13so727912vcb.32 for ; Thu, 29 Aug 2013 13:52:49 -0700 (PDT) Sender: Richard Henderson Message-ID: <521FB49C.6070403@twiddle.net> Date: Thu, 29 Aug 2013 13:52:44 -0700 From: Richard Henderson MIME-Version: 1.0 References: <1377190729-14008-1-git-send-email-rth@twiddle.net> <1377190729-14008-18-git-send-email-rth@twiddle.net> <20130829164511.GA22155@ohm.aurel32.net> In-Reply-To: <20130829164511.GA22155@ohm.aurel32.net> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 17/18] tcg-i386: Adjust tcg_out_tlb_load for x32 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Aurelien Jarno Cc: qemu-devel@nongnu.org On 08/29/2013 09:45 AM, Aurelien Jarno wrote: >> > - tcg_out_mov(s, type, r1, addrlo); >> > + tcg_out_mov(s, ttype, r1, addrlo); > This one is not fully correct. It should be ttype for the slow path (the > value is used as an argument to the helper function), but htype for the > fast path (the value is used as a host pointer). > > Using ttype currently ensures the type is safe, but it might worth > adding a comment in case ttype or htype is changed. I'll add the following comment: + /* Prepare for both the fast path add of the tlb addend, and the slow + path function argument setup. There are two cases worth note: + For 32-bit guest and x86_64 host, MOVL zero-extends the guest address + before the fastpath ADDQ below. For 64-bit guest and x32 host, MOVQ + copies the entire guest address for the slow path, while truncation + for the 32-bit host happens with the fastpath ADDL below. */ tcg_out_mov(s, ttype, r1, addrlo); r~