qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v2 13/36] tcg: Use tcg_constant_{i32,i64} with tcg int expand


From: Richard Henderson
Subject: Re: [PATCH v2 13/36] tcg: Use tcg_constant_{i32,i64} with tcg int expanders
Date: Wed, 22 Apr 2020 10:02:40 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0

On 4/22/20 9:18 AM, Alex Bennée wrote:
>>  void tcg_gen_brcondi_i64(TCGCond cond, TCGv_i64 arg1, int64_t arg2, 
>> TCGLabel *l)
>>  {
>> -    if (cond == TCG_COND_ALWAYS) {
>> +    if (TCG_TARGET_REG_BITS == 64) {
>> +        tcg_gen_brcond_i64(cond, arg1, tcg_constant_i64(arg2), l);
>> +    } else if (cond == TCG_COND_ALWAYS) {
>>          tcg_gen_br(l);
>>      } else if (cond != TCG_COND_NEVER) {
>> -        TCGv_i64 t0 = tcg_const_i64(arg2);
>> -        tcg_gen_brcond_i64(cond, arg1, t0, l);
>> -        tcg_temp_free_i64(t0);
>> +        l->refs++;
> 
> Hmm is this a separate fix?

No, it's expanding what tcg_gen_brcond_i64 would do for TCG_TARGET_REG_BITS == 
32.

>> +        tcg_gen_op6ii_i32(INDEX_op_brcond2_i32,
>> +                          TCGV_LOW(arg1), TCGV_HIGH(arg1),
>> +                          tcg_constant_i32(arg2),
>> +                          tcg_constant_i32(arg2 >> 32),
>> +                          cond, label_arg(l));

Because we have two separate TCGv_i32, from tcg_constant_i32(), which cannot be
packaged up with TCGV_HIGH/LOW.


r~



reply via email to

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