[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 09/12] target/arm: Optimize MVE VSHL, VSHR immediate forms
From: |
Peter Maydell |
Subject: |
Re: [PATCH v2 09/12] target/arm: Optimize MVE VSHL, VSHR immediate forms |
Date: |
Thu, 16 Sep 2021 11:01:12 +0100 |
On Mon, 13 Sept 2021 at 16:53, Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> On 9/13/21 7:21 AM, Peter Maydell wrote:
> > On Mon, 13 Sept 2021 at 14:56, Richard Henderson
> > <richard.henderson@linaro.org> wrote:
> >>
> >> On 9/13/21 2:54 AM, Peter Maydell wrote:
> >>> +static void do_gvec_shri_s(unsigned vece, uint32_t dofs, uint32_t aofs,
> >>> + int64_t shift, uint32_t oprsz, uint32_t maxsz)
> >>> +{
> >>> + /*
> >>> + * We get here with a negated shift count, and we must handle
> >>> + * shifts by the element size, which tcg_gen_gvec_sari() does not do.
> >>> + */
> >>> + shift = -shift;
> >>
> >> You've already performed the negation in do_2shift_vec.
> >
> > Here we are undoing the negation we did there, so as to get a
> > "positive means shift right" shift count back again, which is what
> > the instruction encoding has and what tcg_gen_gvic_shri() wants.
>
> Ah, I misinterpreted.
>
> >> Perhaps worth placing these functions somewhere we can share code with
> >> NEON? Tactical
> >> error, perhaps, open-coding these tests in trans_VSHR_S_2sh and
> >> trans_VSHR_U_2sh.
> >
> > I'm not convinced the resemblance is close enough to be worth the
> > effort...
>
> Yeah, not with the negation bit above.
Could I get a reviewed-by for this patch, then, please ?
thanks
-- PMM
- [PATCH v2 04/12] target/arm: Optimize MVE logic ops, (continued)
- [PATCH v2 04/12] target/arm: Optimize MVE logic ops, Peter Maydell, 2021/09/13
- [PATCH v2 07/12] target/arm: Optimize MVE VDUP, Peter Maydell, 2021/09/13
- [PATCH v2 08/12] target/arm: Optimize MVE VMVN, Peter Maydell, 2021/09/13
- [PATCH v2 05/12] target/arm: Optimize MVE arithmetic ops, Peter Maydell, 2021/09/13
- [PATCH v2 09/12] target/arm: Optimize MVE VSHL, VSHR immediate forms, Peter Maydell, 2021/09/13
- Re: [PATCH v2 09/12] target/arm: Optimize MVE VSHL, VSHR immediate forms, Richard Henderson, 2021/09/13
- Re: [PATCH v2 09/12] target/arm: Optimize MVE VSHL, VSHR immediate forms, Peter Maydell, 2021/09/13
- Re: [PATCH v2 09/12] target/arm: Optimize MVE VSHL, VSHR immediate forms, Richard Henderson, 2021/09/13
- Re: [PATCH v2 09/12] target/arm: Optimize MVE VSHL, VSHR immediate forms,
Peter Maydell <=
- Re: [PATCH v2 09/12] target/arm: Optimize MVE VSHL, VSHR immediate forms, Richard Henderson, 2021/09/16
[PATCH v2 11/12] target/arm: Optimize MVE VSLI and VSRI, Peter Maydell, 2021/09/13
[PATCH v2 12/12] target/arm: Optimize MVE 1op-immediate insns, Peter Maydell, 2021/09/13
[PATCH v2 10/12] target/arm: Optimize MVE VSHLL and VMOVL, Peter Maydell, 2021/09/13