target/arm/translate-a64: Don't underdecode FP insns
commitc1e20801f5ee53472dbf2757df605543f3f4ce0b
authorPeter Maydell <peter.maydell@linaro.org>
Fri, 1 Feb 2019 14:55:45 +0000 (1 14:55 +0000)
committerPeter Maydell <peter.maydell@linaro.org>
Fri, 1 Feb 2019 14:55:45 +0000 (1 14:55 +0000)
tree1835aee6069a97f2a3c53c87692b7540f2f52276
parent4f61106614410945b1d1c93081544ad5b13044fc
target/arm/translate-a64: Don't underdecode FP insns

In the encoding groups
 * floating-point data-processing (1 source)
 * floating-point data-processing (2 source)
 * floating-point data-processing (3 source)
 * floating-point immediate
 * floating-point compare
 * floating-ponit conditional compare
 * floating-point conditional select

bit 31 is M and bit 29 is S (and bit 30 is 0, already checked at
this point in the decode). None of these groups allocate any
encoding for M=1 or S=1. We checked this in disas_fp_compare(),
disas_fp_ccomp() and disas_fp_csel(), but missed it in disas_fp_1src(),
disas_fp_2src(), disas_fp_3src() and disas_fp_imm().

We also missed that in the fp immediate encoding the imm5 field
must be all zeroes.

Correctly UNDEF the unallocated encodings here.

Reported-by: Laurent Desnogues <laurent.desnogues@gmail.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Laurent Desnogues <laurent.desnogues@gmail.com>
Message-id: 20190125182626.9221-7-peter.maydell@linaro.org
target/arm/translate-a64.c