[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 02/24] tcg/tci: Remove TCG_TARGET_HAS_* ifdefs
From: |
Richard Henderson |
Subject: |
Re: [PATCH v3 02/24] tcg/tci: Remove TCG_TARGET_HAS_* ifdefs |
Date: |
Fri, 29 Jan 2021 20:47:53 -1000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 |
On 1/29/21 1:16 PM, Peter Maydell wrote:
> On Fri, 29 Jan 2021 at 20:13, Richard Henderson
> <richard.henderson@linaro.org> wrote:
>>
>> The opcodes always exist, regardless of whether or not they
>> are enabled. Remove the unnecessary ifdefs.
>>
>> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
>> ---
>> tcg/tci/tcg-target.c.inc | 82 ----------------------------------------
>> 1 file changed, 82 deletions(-)
>>
>> diff --git a/tcg/tci/tcg-target.c.inc b/tcg/tci/tcg-target.c.inc
>> index 9c45f5f88f..b62e14d5ce 100644
>> --- a/tcg/tci/tcg-target.c.inc
>> +++ b/tcg/tci/tcg-target.c.inc
>> @@ -71,70 +71,42 @@ static const TCGTargetOpDef tcg_target_op_defs[] = {
>> { INDEX_op_add_i32, { R, RI, RI } },
>> { INDEX_op_sub_i32, { R, RI, RI } },
>> { INDEX_op_mul_i32, { R, RI, RI } },
>> -#if TCG_TARGET_HAS_div_i32
>> { INDEX_op_div_i32, { R, R, R } },
>> { INDEX_op_divu_i32, { R, R, R } },
>> { INDEX_op_rem_i32, { R, R, R } },
>> { INDEX_op_remu_i32, { R, R, R } },
>> -#elif TCG_TARGET_HAS_div2_i32
>> - { INDEX_op_div2_i32, { R, R, "0", "1", R } },
>> - { INDEX_op_divu2_i32, { R, R, "0", "1", R } },
>> -#endif
>
>> -#if TCG_TARGET_HAS_div_i64
>> { INDEX_op_div_i64, { R, R, R } },
>> { INDEX_op_divu_i64, { R, R, R } },
>> { INDEX_op_rem_i64, { R, R, R } },
>> { INDEX_op_remu_i64, { R, R, R } },
>> -#elif TCG_TARGET_HAS_div2_i64
>> - { INDEX_op_div2_i64, { R, R, "0", "1", R } },
>> - { INDEX_op_divu2_i64, { R, R, "0", "1", R } },
>> -#endif
>
> Why are div2/divu2 special cases such that their entries
> get deleted rather than unconditionally included ?
Because div/div2 are mutually exclusive.
r~
[PATCH v3 03/24] tcg/i386: Move constraint type check to tcg_target_const_match, Richard Henderson, 2021/01/29
[PATCH v3 06/24] tcg/arm: Split out target constraints to tcg-target-con-str.h, Richard Henderson, 2021/01/29
[PATCH v3 04/24] tcg/i386: Tidy register constraint definitions, Richard Henderson, 2021/01/29
[PATCH v3 05/24] tcg/i386: Split out target constraints to tcg-target-con-str.h, Richard Henderson, 2021/01/29