]> git.proxmox.com Git - mirror_qemu.git/commit - target/arm/helper.c
target/arm: Convert A32 coprocessor insns to decodetree
authorPeter Maydell <peter.maydell@linaro.org>
Mon, 3 Aug 2020 11:18:45 +0000 (12:18 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Mon, 24 Aug 2020 09:02:07 +0000 (10:02 +0100)
commitcd8be50e58f63413c033531d3273c0e44851684f
treee538b44473cccb742ec629438e88c4fbd5cb2607
parent19c23a9baafc91dd3881a7a4e9bf454e42d24e4e
target/arm: Convert A32 coprocessor insns to decodetree

Convert the A32 coprocessor instructions to decodetree.

Note that this corrects an underdecoding: for the 64-bit access case
(MRRC/MCRR) we did not check that bits [24:21] were 0b0010, so we
would incorrectly treat LDC/STC as MRRC/MCRR rather than UNDEFing
them.

The decodetree versions of these insns assume the coprocessor
is in the range 0..7 or 14..15. This is architecturally sensible
(as per the comments) and OK in practice for QEMU because the only
uses of the ARMCPRegInfo infrastructure we have that aren't
for coprocessors 14 or 15 are the pxa2xx use of coprocessor 6.
We add an assertion to the define_one_arm_cp_reg_with_opaque()
function to catch any accidental future attempts to use it to
define coprocessor registers for invalid coprocessors.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20200803111849.13368-4-peter.maydell@linaro.org
target/arm/a32.decode
target/arm/helper.c
target/arm/translate.c