qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 22/23] tcg/tci: Implement 64-bit division


From: Richard Henderson
Subject: Re: [PATCH 22/23] tcg/tci: Implement 64-bit division
Date: Thu, 28 Jan 2021 07:56:57 -1000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0

On 1/28/21 12:04 AM, Stefan Weil wrote:
> Am 28.01.21 um 09:23 schrieb Richard Henderson:
> 
>> Trivially implemented like other arithmetic.
>> Tested via check-tcg and the ppc64 target.
>>
>> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
>> ---
>>   tcg/tci/tcg-target.h     |  4 ++--
>>   tcg/tci.c                | 28 ++++++++++++++++++++++------
>>   tcg/tci/tcg-target.c.inc | 12 ++++--------
>>   3 files changed, 28 insertions(+), 16 deletions(-)
>>
>> diff --git a/tcg/tci/tcg-target.h b/tcg/tci/tcg-target.h
>> index bb784e018e..7fc349a3de 100644
>> --- a/tcg/tci/tcg-target.h
>> +++ b/tcg/tci/tcg-target.h
>> @@ -100,8 +100,8 @@
>>   #define TCG_TARGET_HAS_extract_i64      0
>>   #define TCG_TARGET_HAS_sextract_i64     0
>>   #define TCG_TARGET_HAS_extract2_i64     0
>> -#define TCG_TARGET_HAS_div_i64          0
>> -#define TCG_TARGET_HAS_rem_i64          0
>> +#define TCG_TARGET_HAS_div_i64          1
>> +#define TCG_TARGET_HAS_rem_i64          1
>>   #define TCG_TARGET_HAS_ext8s_i64        1
>>   #define TCG_TARGET_HAS_ext16s_i64       1
>>   #define TCG_TARGET_HAS_ext32s_i64       1
>> diff --git a/tcg/tci.c b/tcg/tci.c
>> index 32931ea611..0065c854a4 100644
>> --- a/tcg/tci.c
>> +++ b/tcg/tci.c
>> @@ -889,14 +889,30 @@ uintptr_t QEMU_DISABLE_CFI
>> tcg_qemu_tb_exec(CPUArchState *env,
>>               t2 = tci_read_ri64(regs, &tb_ptr);
>>               tci_write_reg(regs, t0, t1 * t2);
>>               break;
>> -#if TCG_TARGET_HAS_div_i64
> 
> 
> I suggest to keep this and other identical #if TCG_TARGET_HAS_div_i64 and the
> matching #endif in the code.

As before, no ifdefs required.


r~



reply via email to

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