All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: Richard Henderson <richard.henderson@linaro.org>
Cc: QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [PATCH v3 02/16] target/arm: Create gen_gvec_{u,s}{rshr,rsra}
Date: Tue, 12 May 2020 14:51:38 +0100	[thread overview]
Message-ID: <CAFEAcA-JOwTRz1ZHEBrH5iLG3Qwf-7FvWUFvWvhP769aK-iEiQ@mail.gmail.com> (raw)
In-Reply-To: <20200508152200.6547-3-richard.henderson@linaro.org>

On Fri, 8 May 2020 at 16:22, Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> Create vectorized versions of handle_shri_with_rndacc
> for shift+round and shift+round+accumulate.  Add out-of-line
> helpers in preparation for longer vector lengths from SVE.
>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>


> +    /* tszimm encoding produces immediates in the range [1..esize] */
> +    tcg_debug_assert(shift > 0);
> +    tcg_debug_assert(shift <= (8 << vece));
> +
> +    if (shift == (8 << vece)) {
> +        /*
> +         * Shifts larger than the element size are architecturally valid.
> +         * Signed results in all sign bits.  With rounding, this produces
> +         *   (-1 + 1) >> 1 == 0, or (0 + 1) >> 1 == 0.
> +         * I.e. always zero.
> +         */
> +        tcg_gen_gvec_dup_imm(vece, rd_ofs, opr_sz, max_sz, 0);

Knew I'd forgotten a review comment -- should this "dup_imm to clear
to zeroes" be using a fixed element size rather than 'vece' to avoid
the "dup_imm doesn't handle 128 bits" issue? (Similarly elsewhere.)

> +    } else {
> +        tcg_gen_gvec_2i(rd_ofs, rm_ofs, opr_sz, max_sz, shift, &ops[vece]);
> +    }
> +}

thanks
-- PMM


  parent reply	other threads:[~2020-05-12 13:54 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-08 15:21 [PATCH v3 00/16] target/arm: partial vector cleanup Richard Henderson
2020-05-08 15:21 ` [PATCH v3 01/16] target/arm: Create gen_gvec_[us]sra Richard Henderson
2020-05-12 13:20   ` Peter Maydell
2020-05-08 15:21 ` [PATCH v3 02/16] target/arm: Create gen_gvec_{u,s}{rshr,rsra} Richard Henderson
2020-05-12 13:09   ` Peter Maydell
2020-05-12 13:46     ` Peter Maydell
2020-05-13  2:04       ` Richard Henderson
2020-05-12 13:51   ` Peter Maydell [this message]
2020-05-13  2:06     ` Richard Henderson
2020-05-08 15:21 ` [PATCH v3 03/16] target/arm: Create gen_gvec_{sri,sli} Richard Henderson
2020-05-12 13:52   ` Peter Maydell
2020-05-08 15:21 ` [PATCH v3 04/16] target/arm: Remove unnecessary range check for VSHL Richard Henderson
2020-05-12 13:53   ` Peter Maydell
2020-05-08 15:21 ` [PATCH v3 05/16] target/arm: Tidy handle_vec_simd_shri Richard Henderson
2020-05-12 13:56   ` Peter Maydell
2020-05-08 15:21 ` [PATCH v3 06/16] target/arm: Create gen_gvec_{ceq,clt,cle,cgt,cge}0 Richard Henderson
2020-05-12 14:10   ` [PATCH v3 06/16] target/arm: Create gen_gvec_{ceq, clt, cle, cgt, cge}0 Peter Maydell
2020-05-08 15:21 ` [PATCH v3 07/16] target/arm: Create gen_gvec_{mla,mls} Richard Henderson
2020-05-12 14:11   ` Peter Maydell
2020-05-08 15:21 ` [PATCH v3 08/16] target/arm: Swap argument order for VSHL during decode Richard Henderson
2020-05-12 14:14   ` Peter Maydell
2020-05-08 15:21 ` [PATCH v3 09/16] target/arm: Create gen_gvec_{cmtst,ushl,sshl} Richard Henderson
2020-05-12 14:16   ` Peter Maydell
2020-05-08 15:21 ` [PATCH v3 10/16] target/arm: Create gen_gvec_{uqadd, sqadd, uqsub, sqsub} Richard Henderson
2020-05-12 14:18   ` Peter Maydell
2020-05-08 15:21 ` [PATCH v3 11/16] target/arm: Remove fp_status from helper_{recpe, rsqrte}_u32 Richard Henderson
2020-05-12 14:19   ` Peter Maydell
2020-05-08 15:21 ` [PATCH v3 12/16] target/arm: Create gen_gvec_{qrdmla,qrdmls} Richard Henderson
2020-05-12 14:20   ` Peter Maydell
2020-05-08 15:21 ` [PATCH v3 13/16] target/arm: Pass pointer to qc to qrdmla/qrdmls Richard Henderson
2020-05-12 14:28   ` Peter Maydell
2020-05-08 15:21 ` [PATCH v3 14/16] target/arm: Clear tail in gvec_fmul_idx_*, gvec_fmla_idx_* Richard Henderson
2020-05-12 14:29   ` Peter Maydell
2020-05-08 15:21 ` [PATCH v3 15/16] target/arm: Vectorize SABD/UABD Richard Henderson
2020-05-12 14:40   ` Peter Maydell
2020-05-08 15:22 ` [PATCH v3 16/16] target/arm: Vectorize SABA/UABA Richard Henderson
2020-05-12 14:41   ` Peter Maydell
2020-05-12 12:55 ` [PATCH v3 00/16] target/arm: partial vector cleanup Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAFEAcA-JOwTRz1ZHEBrH5iLG3Qwf-7FvWUFvWvhP769aK-iEiQ@mail.gmail.com \
    --to=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.