From: Peter Maydell <peter.maydell@linaro.org>
To: Richard Henderson <richard.henderson@linaro.org>
Cc: qemu-arm <qemu-arm@nongnu.org>, QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [PATCH 23/36] target/arm: Convert Neon 64-bit element 3-reg-same insns
Date: Fri, 1 May 2020 16:54:30 +0100 [thread overview]
Message-ID: <CAFEAcA9kb2fpMcd-eLvdTD8dVjk=Ed9nKv2iHr_u_tpbBCa5HA@mail.gmail.com> (raw)
In-Reply-To: <366a2e79-d963-bfdc-fcc6-2a63026fa1db@linaro.org>
On Thu, 30 Apr 2020 at 21:54, Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> On 4/30/20 11:09 AM, Peter Maydell wrote:
> > +
> > + rn = tcg_temp_new_i64();
> > + rm = tcg_temp_new_i64();
> > + rd = tcg_temp_new_i64();
> > +
> > + for (pass = 0; pass < (a->q ? 2 : 1); pass++) {
> > + neon_load_reg64(rn, a->vn + pass);
> > + neon_load_reg64(rm, a->vm + pass);
> > + fn(rd, rm, rn);
> > + neon_store_reg64(rd, a->vd + pass);
> > + }
> > +
> > + tcg_temp_free_i64(rn);
> > + tcg_temp_free_i64(rm);
> > + tcg_temp_free_i64(rd);
> > +
> > + return true;
> > +}
> > +
> > +#define DO_3SAME_64(INSN, FUNC) \
> > + static bool trans_##INSN##_3s(DisasContext *s, arg_3same *a) \
> > + { \
> > + return do_3same_64(s, a, FUNC); \
> > + }
>
> You can morph this into the gvec interface like so:
>
> #define DO_3SAME_64(INSN, FUNC) \
> static void gen_##INSN##_3s(unsigned vece, uint32_t rd_ofs,
> uint32_t rn_ofs, uint32_t rm_ofs,
> uint32_t oprsz, uint32_t maxsz)
> {
> static const GVecGen3 op = { .fni8 = FUNC };
> tcg_gen_gvec_3(rd_ofs, rn_ofs, rm_ofs,
> oprsz, maxsz, &op);
> }
> DO_3SAME(INSN, gen_##INSN##_3s)
>
> The .fni8 function tells gvec that we have a helper that processes the
> operation in 8 byte chunks. It will handle the pass loop for you.
This doesn't quite work, because these are shift ops and
so the operands are passed to the helper in the order
rd, rm, rn. Reshuffling the order of arguments to
tcg_gen_gvec_3() fixes this, though.
I guess I should call the macro DO_3SAME_SHIFT64, I hadn't
noticed it was shift specific because the only thing we do
with it is shifts.
thanks
-- PMM
next prev parent reply other threads:[~2020-05-01 15:57 UTC|newest]
Thread overview: 85+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-30 18:09 [PATCH 00/36] target/arm: Convert Neon to decodetree (part 1) Peter Maydell
2020-04-30 18:09 ` [PATCH 01/36] target/arm/translate-vfp.inc.c: Remove duplicate simd_r32 check Peter Maydell
2020-04-30 18:21 ` Richard Henderson
2020-05-01 16:55 ` Philippe Mathieu-Daudé
2020-04-30 18:09 ` [PATCH 02/36] target/arm: Don't allow Thumb Neon insns without FEATURE_NEON Peter Maydell
2020-04-30 18:22 ` Richard Henderson
2020-05-01 16:56 ` Philippe Mathieu-Daudé
2020-04-30 18:09 ` [PATCH 03/36] target/arm: Add stubs for AArch32 Neon decodetree Peter Maydell
2020-04-30 18:30 ` Richard Henderson
2020-04-30 18:09 ` [PATCH 04/36] target/arm: Convert VCMLA (vector) to decodetree Peter Maydell
2020-04-30 18:34 ` Richard Henderson
2020-04-30 18:09 ` [PATCH 05/36] target/arm: Convert VCADD " Peter Maydell
2020-04-30 18:35 ` Richard Henderson
2020-04-30 18:09 ` [PATCH 06/36] target/arm: Convert V[US]DOT " Peter Maydell
2020-04-30 18:36 ` Richard Henderson
2020-04-30 18:09 ` [PATCH 07/36] target/arm: Convert VFM[AS]L " Peter Maydell
2020-04-30 18:43 ` Richard Henderson
2020-04-30 18:09 ` [PATCH 08/36] target/arm: Convert VCMLA (scalar) " Peter Maydell
2020-04-30 19:00 ` Richard Henderson
2020-04-30 18:09 ` [PATCH 09/36] target/arm: Convert V[US]DOT " Peter Maydell
2020-04-30 19:01 ` Richard Henderson
2020-04-30 18:09 ` [PATCH 10/36] target/arm: Convert VFM[AS]L " Peter Maydell
2020-04-30 19:06 ` Richard Henderson
2020-04-30 18:09 ` [PATCH 11/36] target/arm: Convert Neon load/store multiple structures " Peter Maydell
2020-04-30 19:09 ` Richard Henderson
2020-04-30 18:09 ` [PATCH 12/36] target/arm: Convert Neon 'load single structure to all lanes' " Peter Maydell
2020-04-30 19:17 ` Richard Henderson
2020-04-30 18:09 ` [PATCH 13/36] target/arm: Convert Neon 'load/store single structure' " Peter Maydell
2020-04-30 19:32 ` Richard Henderson
2020-04-30 18:09 ` [PATCH 14/36] target/arm: Convert Neon 3-reg-same VADD/VSUB " Peter Maydell
2020-04-30 19:36 ` Richard Henderson
2020-04-30 18:09 ` [PATCH 15/36] target/arm: Convert Neon 3-reg-same logic ops " Peter Maydell
2020-04-30 19:39 ` Richard Henderson
2020-04-30 18:09 ` [PATCH 16/36] target/arm: Convert Neon 3-reg-same VMAX/VMIN " Peter Maydell
2020-04-30 19:45 ` Richard Henderson
2020-04-30 18:09 ` [PATCH 17/36] target/arm: Convert Neon 3-reg-same comparisons " Peter Maydell
2020-04-30 19:48 ` Richard Henderson
2020-04-30 18:09 ` [PATCH 18/36] target/arm: Convert Neon 3-reg-same VQADD/VQSUB " Peter Maydell
2020-04-30 19:50 ` Richard Henderson
2020-04-30 18:09 ` [PATCH 19/36] target/arm: Convert Neon 3-reg-same VMUL, VMLA, VMLS, VSHL " Peter Maydell
2020-04-30 19:58 ` Richard Henderson
2020-04-30 18:09 ` [PATCH 20/36] target/arm: Convert Neon 3-reg-same VQRDMLAH/VQRDMLSH " Peter Maydell
2020-04-30 20:03 ` Richard Henderson
2020-04-30 20:28 ` Richard Henderson
2020-05-01 14:23 ` Peter Maydell
2020-04-30 18:09 ` [PATCH 21/36] target/arm: Convert Neon 3-reg-same SHA " Peter Maydell
2020-04-30 20:30 ` Richard Henderson
2020-04-30 18:09 ` [PATCH 22/36] target/arm: Move gen_ function typedefs to translate.h Peter Maydell
2020-04-30 20:32 ` Richard Henderson
2020-04-30 18:09 ` [PATCH 23/36] target/arm: Convert Neon 64-bit element 3-reg-same insns Peter Maydell
2020-04-30 20:54 ` Richard Henderson
2020-05-01 15:36 ` Peter Maydell
2020-05-01 15:50 ` Richard Henderson
2020-05-01 15:57 ` Peter Maydell
2020-05-01 16:12 ` Richard Henderson
2020-05-01 15:54 ` Peter Maydell [this message]
2020-05-01 16:13 ` Richard Henderson
2020-04-30 18:09 ` [PATCH 24/36] target/arm: Convert Neon VHADD " Peter Maydell
2020-04-30 20:59 ` Richard Henderson
2020-04-30 18:09 ` [PATCH 25/36] target/arm: Convert Neon VRHADD, VHSUB, VABD 3-reg-same insns to decodetree Peter Maydell
2020-04-30 18:09 ` [PATCH 26/36] target/arm: Convert Neon VQSHL, VRSHL, VQRSHL " Peter Maydell
2020-05-01 1:55 ` Richard Henderson
2020-05-01 18:10 ` Peter Maydell
2020-04-30 18:09 ` [PATCH 27/36] target/arm: Convert Neon VABA 3-reg-same " Peter Maydell
2020-05-01 2:29 ` Richard Henderson
2020-04-30 18:09 ` [PATCH 28/36] target/arm: Convert Neon VPMAX/VPMIN 3-reg-same insns " Peter Maydell
2020-05-01 3:36 ` Richard Henderson
2020-04-30 18:09 ` [PATCH 29/36] target/arm: Convert Neon VPADD " Peter Maydell
2020-05-01 3:39 ` Richard Henderson
2020-04-30 18:09 ` [PATCH 30/36] target/arm: Convert Neon VQDMULH/VQRDMULH 3-reg-same " Peter Maydell
2020-05-01 3:47 ` Richard Henderson
2020-04-30 18:09 ` [PATCH 31/36] target/arm: Convert Neon VADD, VSUB, VABD 3-reg-same insns " Peter Maydell
2020-05-01 3:57 ` Richard Henderson
2020-04-30 18:09 ` [PATCH 32/36] target/arm: Convert Neon VPMIN/VPMAX/VPADD float " Peter Maydell
2020-05-01 3:59 ` Richard Henderson
2020-04-30 18:10 ` [PATCH 33/36] target/arm: Convert Neon fp VMUL, VMLA, VMLS " Peter Maydell
2020-05-01 4:07 ` Richard Henderson
2020-04-30 18:10 ` [PATCH 34/36] target/arm: Convert Neon 3-reg-same compare " Peter Maydell
2020-05-01 4:09 ` Richard Henderson
2020-04-30 18:10 ` [PATCH 35/36] target/arm: Convert Neon fp VMAX/VMIN/VMAXNM/VMINNM/VRECPS/VRSQRTS " Peter Maydell
2020-05-01 4:13 ` Richard Henderson
2020-04-30 18:10 ` [PATCH 36/36] target/arm: Convert NEON VFMA, VFMS 3-reg-same insns " Peter Maydell
2020-05-01 4:14 ` Richard Henderson
2020-05-01 7:32 ` [PATCH 00/36] target/arm: Convert Neon to decodetree (part 1) no-reply
2020-05-04 12:04 ` 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='CAFEAcA9kb2fpMcd-eLvdTD8dVjk=Ed9nKv2iHr_u_tpbBCa5HA@mail.gmail.com' \
--to=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).