All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: qemu-arm@nongnu.org, qemu-devel@nongnu.org
Cc: Richard Henderson <richard.henderson@linaro.org>
Subject: [PATCH 0/3] target/arm: Decode Neon fp sizes in decodetree
Date: Thu,  3 Sep 2020 14:32:06 +0100	[thread overview]
Message-ID: <20200903133209.5141-1-peter.maydell@linaro.org> (raw)

This patchset fixes something that Richard pointed out during
review of my fp16 patchset.

In the Neon instruction set, integer operations always have a 2-bit
size field with an encoding corresponding to QEMU's MO_{8,16,32,64}
constants: 0 for 8 bit, 1 for 16 bit, 2 for 32 bit and 3 for 64-bit.
However for the floating point instructions, since only 16-bit
and 32-bit floats are supported some instructions use one of the
size bits as part of decode, leaving only a 1-bit size field,
which might be encoded either as 0 for 16-bit float and 1 for
32-bit float, or the other way around as 0 for 32-bit float and
1 for 16-bit float.

Currently we simply pass the raw size field values through from
decodetree to the trans_ functions, which means that when reading
or writing the code for a trans_ function you need to know the
encoding of the size field for that insn. This patchset moves
the handling of the different possible encodings into the decodetree
file, so that the trans_ function is always passed a MO_* value
for the size.

thanks
-- PMM

Peter Maydell (3):
  target/arm: Convert Neon 3-same-fp size field to MO_* in decode
  target/arm: Convert Neon VCVT fp size field to MO_* in decode
  target/arm: Convert VCMLA, VCADD size field to MO_* in decode

 target/arm/neon-dp.decode       | 18 ++++++++------
 target/arm/neon-shared.decode   | 18 +++++++++-----
 target/arm/translate-neon.c.inc | 42 ++++++++++++++++++++-------------
 3 files changed, 48 insertions(+), 30 deletions(-)

-- 
2.20.1



             reply	other threads:[~2020-09-03 13:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-03 13:32 Peter Maydell [this message]
2020-09-03 13:32 ` [PATCH 1/3] target/arm: Convert Neon 3-same-fp size field to MO_* in decode Peter Maydell
2020-09-03 16:25   ` Richard Henderson
2020-09-03 18:14     ` Peter Maydell
2020-09-03 13:32 ` [PATCH 2/3] target/arm: Convert Neon VCVT fp " Peter Maydell
2020-09-03 16:27   ` Richard Henderson
2020-09-03 13:32 ` [PATCH 3/3] target/arm: Convert VCMLA, VCADD " Peter Maydell
2020-09-03 16:32   ` Richard Henderson

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=20200903133209.5141-1-peter.maydell@linaro.org \
    --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 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.