[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v6 1/8] tcg/sparc: Use tcg_out_movi_imm13 in tcg_out_addsub2_
From: |
Peter Maydell |
Subject: |
Re: [PATCH v6 1/8] tcg/sparc: Use tcg_out_movi_imm13 in tcg_out_addsub2_i64 |
Date: |
Tue, 8 Feb 2022 11:16:24 +0000 |
On Tue, 8 Feb 2022 at 11:09, Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> On 2/8/22 21:40, Peter Maydell wrote:
> > On Tue, 8 Feb 2022 at 07:17, Richard Henderson
> > <richard.henderson@linaro.org> wrote:
> >>
> >> When BH is constant, it is constrained to 10 bits for use in MOVCC.
> >
> > Where does this happen? I assumed it was going to be done
> > by the constraint encodings, but tcg_out_addsub2_i64()
> > is called for the add2_i64 and sub2_i64 ops, which get
> >
> > return C_O2_I4(r, r, rZ, rZ, rJ, rJ);
> > and constraint J is
> > CONST('J', TCG_CT_CONST_S13).
> > (and indeed there is no "constrain to 10 bits" letter).
>
> Typo/thinko with 10 bit vs 11 bit:
>
> CONST('I', TCG_CT_CONST_S11)
>
> But there are different constraints for add2_i32 and add2_i64:
>
> case INDEX_op_add2_i32:
> case INDEX_op_sub2_i32:
> return C_O2_I4(r, r, rZ, rZ, rJ, rJ);
> ...
> case INDEX_op_add2_i64:
> case INDEX_op_sub2_i64:
> return C_O2_I4(R, R, RZ, RZ, RJ, RI);
Yes, I must have been looking at the _i32 lines by mistake.
If you fix the 10s and 11s to 11s and 12s:
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
thanks
-- PMM
- [PATCH v6 0/8] tcg/sparc: Unaligned access for user-only, Richard Henderson, 2022/02/08
- [PATCH v6 2/8] tcg/sparc: Split out tcg_out_movi_imm32, Richard Henderson, 2022/02/08
- [PATCH v6 3/8] tcg/sparc: Add scratch argument to tcg_out_movi_int, Richard Henderson, 2022/02/08
- [PATCH v6 4/8] tcg/sparc: Improve code gen for shifted 32-bit constants, Richard Henderson, 2022/02/08
- [PATCH v6 5/8] tcg/sparc: Convert patch_reloc to return bool, Richard Henderson, 2022/02/08
- [PATCH v6 7/8] tcg/sparc: Add tcg_out_jmpl_const for better tail calls, Richard Henderson, 2022/02/08
- [PATCH v6 6/8] tcg/sparc: Use the constant pool for 64-bit constants, Richard Henderson, 2022/02/08
- [PATCH v6 8/8] tcg/sparc: Support unaligned access for user-only, Richard Henderson, 2022/02/08