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