[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: |
Alex Bennée |
Subject: |
Re: [PATCH v2 13/36] tcg: Use tcg_constant_{i32,i64} with tcg int expanders |
Date: |
Wed, 22 Apr 2020 17:18:54 +0100 |
User-agent: |
mu4e 1.4.1; emacs 28.0.50 |
Richard Henderson <address@hidden> writes:
> Signed-off-by: Richard Henderson <address@hidden>
> ---
> include/tcg/tcg-op.h | 13 +--
> tcg/tcg-op.c | 216 ++++++++++++++++++++-----------------------
> 2 files changed, 100 insertions(+), 129 deletions(-)
>
> diff --git a/include/tcg/tcg-op.h b/include/tcg/tcg-op.h
> index 230db6e022..11ed9192f7 100644
> --- a/include/tcg/tcg-op.h
> +++ b/include/tcg/tcg-op.h
<snip>
> @@ -1468,12 +1441,17 @@ void tcg_gen_brcond_i64(TCGCond cond, TCGv_i64 arg1,
> TCGv_i64 arg2, TCGLabel *l)
>
> 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?
> + 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));
> }
> }
<snip>
otherwise lgtm:
Reviewed-by: Alex Bennée <address@hidden>
--
Alex Bennée
- [PATCH v2 12/36] tcg: Use tcg_constant_i32 with icount expander, (continued)
- [PATCH v2 12/36] tcg: Use tcg_constant_i32 with icount expander, Richard Henderson, 2020/04/21
- [PATCH v2 11/36] tcg: Introduce TYPE_CONST temporaries, Richard Henderson, 2020/04/21
- [PATCH v2 14/36] tcg: Use tcg_constant_{i32, vec} with tcg vec expanders, Richard Henderson, 2020/04/21
- [PATCH v2 16/36] tcg: Rename struct tcg_temp_info to TempOptInfo, Richard Henderson, 2020/04/21
- [PATCH v2 13/36] tcg: Use tcg_constant_{i32, i64} with tcg int expanders, Richard Henderson, 2020/04/21
- Re: [PATCH v2 13/36] tcg: Use tcg_constant_{i32,i64} with tcg int expanders,
Alex Bennée <=
- Re: [PATCH v2 13/36] tcg: Use tcg_constant_{i32,i64} with tcg int expanders, Alex Bennée, 2020/04/22
[PATCH v2 17/36] tcg/optimize: Adjust TempOptInfo allocation, Richard Henderson, 2020/04/21
[PATCH v2 18/36] tcg/optimize: Use tcg_constant_internal with constant folding, Richard Henderson, 2020/04/21