Skip to content

target/arm: Decode Neon fp sizes in decodetree

Peter Maydell qemu-arm qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3target/arm: Convert Neon 3-same-fp size field to MO_* in decodetarget/arm/neon-dp.decode target/arm/translate-neon.c.inc+21 -102 replies
2/3target/arm: Convert Neon VCVT fp size field to MO_* in decodetarget/arm/neon-dp.decode target/arm/translate-neon.c.inc+3 -41 reply
3/3target/arm: Convert VCMLA, VCADD size field to MO_* in decodetarget/arm/neon-shared.decode target/arm/translate-neon.c.inc+24 -161 reply

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchRichard Henderson
1/3R-b
2/3R-b
3/3R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/3] target/arm: Decode Neon fp sizes in decodetree

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(-)
Signature · 1 line
2.20.1