qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 2/3] target/arm: Introduce store_cpu_field_constant() helper


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH 2/3] target/arm: Introduce store_cpu_field_constant() helper
Date: Sun, 3 Oct 2021 17:52:06 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.1.0

On 10/3/21 17:35, Richard Henderson wrote:
> On 10/3/21 10:39 AM, Philippe Mathieu-Daudé wrote:
>> -static inline void store_cpu_offset(TCGv_i32 var, int offset)
>> +static inline void store_cpu_offset(TCGv_i32 var, int offset, bool
>> is_temp)
>>   {
>>       tcg_gen_st_i32(var, cpu_env, offset);
>> -    tcg_temp_free_i32(var);
>> +    if (is_temp) {
>> +        tcg_temp_free_i32(var);
>> +    }
>>   }
>>     #define store_cpu_field(var, name) \
>> -    store_cpu_offset(var, offsetof(CPUARMState, name))
>> +    store_cpu_offset(var, offsetof(CPUARMState, name), true)
>> +
>> +#define store_cpu_field_constant(val, name) \
>> +    store_cpu_offset(tcg_const_i32(val), offsetof(CPUARMState, name),
>> false)
>>   
> 
> You missed out on using tcg_constant_i32 in the end.

Oops... thanks :)



reply via email to

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