On Thu, Oct 29, 2009 at 7:22 PM, Stuart Brady <sdbr...@ntlworld.com> wrote:
> On Thu, Oct 29, 2009 at 04:01:15PM +0200, juha.riihim...@nokia.com wrote:
>>
>> -static inline TCGv gen_ld8s(TCGv addr, int index)
>> +static inline void gen_ld8s(TCGv ret, TCGv addr, int index)
>>  {
>> -    TCGv tmp = new_tmp();
>> -    tcg_gen_qemu_ld8s(tmp, addr, index);
>> -    return tmp;
>> +    tcg_gen_qemu_ld8s(ret, addr, index);
>>  }
> [...]
>>  static inline void gen_st8(TCGv val, TCGv addr, int index)
>>  {
>>      tcg_gen_qemu_st8(val, addr, index);
>> -    dead_tmp(val);
>>  }
>>  static inline void gen_st16(TCGv val, TCGv addr, int index)
>>  {
>>      tcg_gen_qemu_st16(val, addr, index);
>> -    dead_tmp(val);
>>  }
> [...]
>
> Why not remove these functions entirely, replacing them with calls to
> tcg_gen_qemu_ld/st()?

It eases adding calls to a memory tracer for instance.


Laurent

> I presume there's a reason, given this:
>
>> @@ -1001,25 +955,24 @@ VFP_GEN_FIX(ulto)
>>  static inline void gen_vfp_ld(DisasContext *s, int dp, TCGv addr)
>>  {
>>      if (dp)
>> -        tcg_gen_qemu_ld64(cpu_F0d, addr, IS_USER(s));
>> +        gen_ld64(cpu_F0d, addr, IS_USER(s));
>>      else
>> -        tcg_gen_qemu_ld32u(cpu_F0s, addr, IS_USER(s));
>> +        gen_ld32(cpu_F0s, addr, IS_USER(s));
>>  }
>
> Cheers,
> --
> Stuart Brady
>
>
>


Reply via email to