qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 17/18] tcg-i386: Adjust tcg_out_tlb_load for x32


From: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH 17/18] tcg-i386: Adjust tcg_out_tlb_load for x32
Date: Thu, 29 Aug 2013 13:52:44 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130805 Thunderbird/17.0.8

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~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]