qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 2/4] tcg/i386: Add shortcuts for registers used


From: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH 2/4] tcg/i386: Add shortcuts for registers used in L constraint
Date: Thu, 13 Sep 2012 14:30:36 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120828 Thunderbird/15.0

On 09/13/2012 02:21 PM, Aurelien Jarno wrote:
>> >  #if TCG_TARGET_REG_BITS == 32
>> >      tcg_out_ld(s, TCG_TYPE_PTR, TCG_AREG0, TCG_REG_ESP,
>> >                 (ARRAY_SIZE(tcg_target_callee_save_regs) + 1) * 4);
>> > -    tcg_out_ld(s, TCG_TYPE_PTR, tcg_target_call_iarg_regs[1], TCG_REG_ESP,
>> > +    tcg_out_ld(s, TCG_TYPE_PTR, TCG_REG_L1, TCG_REG_ESP,
>> >                 (ARRAY_SIZE(tcg_target_callee_save_regs) + 2) * 4);
>> >  #else
>> > -    tcg_out_mov(s, TCG_TYPE_PTR, TCG_AREG0, tcg_target_call_iarg_regs[0]);
>> > +    tcg_out_mov(s, TCG_TYPE_PTR, TCG_AREG0, TCG_REG_L0);
>> >  #endif
>> >      tcg_out_addi(s, TCG_REG_ESP, -stack_addend);
>> >  
>> >      /* jmp *tb.  */
>> > -    tcg_out_modrm(s, OPC_GRP5, EXT5_JMPN_Ev, 
>> > tcg_target_call_iarg_regs[1]);
>> > +    tcg_out_modrm(s, OPC_GRP5, EXT5_JMPN_Ev, TCG_REG_L1);
> I don't think this is correct here. This has nothing to do with the L
> constraint, it's really refers to the first and seconds argument passed
> to the prologue.
> 

In the 32-bit case, our use of TCG_REG_L1 really is just a temporary.
We loaded it from the stack just above there.

For the 64-bit case you're right.  But that's exactly how we set up
the Ln macros, so I think that's ok.


r~



reply via email to

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