[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] target-arm: tcg temp variable usage cleanup
From: |
Laurent Desnogues |
Subject: |
Re: [Qemu-devel] [PATCH] target-arm: tcg temp variable usage cleanup |
Date: |
Thu, 29 Oct 2009 19:32:56 +0100 |
On Thu, Oct 29, 2009 at 7:22 PM, Stuart Brady <address@hidden> wrote:
> On Thu, Oct 29, 2009 at 04:01:15PM +0200, address@hidden 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
>
>
>