[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 21/22] tcg/tci: Split out constraint sets to tcg-target-co
From: |
Peter Maydell |
Subject: |
Re: [PATCH v2 21/22] tcg/tci: Split out constraint sets to tcg-target-con-set.h |
Date: |
Tue, 19 Jan 2021 16:09:35 +0000 |
On Fri, 15 Jan 2021 at 21:23, Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> This requires finishing the conversion to tcg_target_op_def.
> Remove quite a lot of ifdefs, since we can reference opcodes
> even if they are not implemented.
>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This one's a lot more painful to review than the native targets :-(
> ---
> -/* TODO: documentation. */
> -static const TCGTargetOpDef tcg_target_op_defs[] = {
> - { INDEX_op_exit_tb, { NULL } },
> - { INDEX_op_goto_tb, { NULL } },
> - { INDEX_op_br, { NULL } },
I don't see any cases in the new code for these ops,
or for INDEX_op_mb which has {}. Is the function in fact
never called for those ops ?
> + case INDEX_op_div_i32:
> + case INDEX_op_div_i64:
> + case INDEX_op_divu_i32:
> + case INDEX_op_divu_i64:
> + case INDEX_op_rem_i32:
> + case INDEX_op_rem_i64:
> + case INDEX_op_remu_i32:
> + case INDEX_op_remu_i64:
> + return C_O1_I2(r, r, r);
>
> - { 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
Why don't we need all the ifdeffery the old code has ? Is
it because we know the ifdefs are always true (or always false) ?
If so, can we do the "drop ifdefs" in a separate patch beforehand?
I think that might help make the patch a bit easier to review.
thanks
-- PMM
- Re: [PATCH v2 18/22] tcg/riscv: Split out constraint sets to tcg-target-con-set.h, (continued)
- [PATCH v2 17/22] tcg/ppc: Split out constraint sets to tcg-target-con-set.h, Richard Henderson, 2021/01/15
- [PATCH v2 20/22] tcg/sparc: Split out constraint sets to tcg-target-con-set.h, Richard Henderson, 2021/01/15
- [PATCH v2 19/22] tcg/s390: Split out constraint sets to tcg-target-con-set.h, Richard Henderson, 2021/01/15
- [PATCH v2 22/22] tcg: Remove TCG_TARGET_CON_SET_H, Richard Henderson, 2021/01/15
- [PATCH v2 21/22] tcg/tci: Split out constraint sets to tcg-target-con-set.h, Richard Henderson, 2021/01/15
- Re: [PATCH v2 21/22] tcg/tci: Split out constraint sets to tcg-target-con-set.h,
Peter Maydell <=
- Re: [PATCH v2 00/22] tcg: backend constraints cleanup, no-reply, 2021/01/15