[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 02/16] target/arm: Create gen_gvec_{u,s}{rshr,rsra}
From: |
Richard Henderson |
Subject: |
Re: [PATCH v3 02/16] target/arm: Create gen_gvec_{u,s}{rshr,rsra} |
Date: |
Tue, 12 May 2020 19:04:59 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 |
On 5/12/20 6:46 AM, Peter Maydell wrote:
> +void gen_gvec_srshr(unsigned vece, uint32_t rd_ofs, uint32_t rm_ofs,
> + int64_t shift, uint32_t opr_sz, uint32_t max_sz)
> +{
> + static const TCGOpcode vecop_list[] = {
> + INDEX_op_shri_vec, INDEX_op_sari_vec, INDEX_op_add_vec, 0
> + };
>
> Is there documentation somewhere of which vector operations don't
> need to be listed in the vecop list? Here gen_srshr_vec() also
> uses 'dupi_vec' and 'and_vec', which aren't listed, presumably
> because we guarantee them to be implemented? (Hopefully we don't
> encounter a future host vector architecture which breaks that
> assumption :-))
Yes, though perhaps not perfectly easy to find: it's at the top of tcg-op-vec.c.
Correct, that the logicals and mov/dupi etc are mandatory and should not be
listed. Moreover, I assert that they are *not* listed, so we get a
CONFIG_DEBUG_TCG check of this list both positive and negative.
I'm going to hope that no future architecture is so irregular as to not
implement logicals. ;-) Or even be as irregular as Intel.
>> I think the VRSRA case needs the same "shift = -shift" as VRSHR.
>
> With this bug fixed,
> Reviewed-by: Peter Maydell <address@hidden>
Thanks, fixed.
r~
- [PATCH v3 00/16] target/arm: partial vector cleanup, Richard Henderson, 2020/05/08
- [PATCH v3 01/16] target/arm: Create gen_gvec_[us]sra, Richard Henderson, 2020/05/08
- [PATCH v3 02/16] target/arm: Create gen_gvec_{u,s}{rshr,rsra}, Richard Henderson, 2020/05/08
- Re: [PATCH v3 02/16] target/arm: Create gen_gvec_{u,s}{rshr,rsra}, Peter Maydell, 2020/05/12
- [PATCH v3 03/16] target/arm: Create gen_gvec_{sri,sli}, Richard Henderson, 2020/05/08
- [PATCH v3 04/16] target/arm: Remove unnecessary range check for VSHL, Richard Henderson, 2020/05/08
- [PATCH v3 05/16] target/arm: Tidy handle_vec_simd_shri, Richard Henderson, 2020/05/08
- [PATCH v3 08/16] target/arm: Swap argument order for VSHL during decode, Richard Henderson, 2020/05/08