target/arm/translate-a64: Don't underdecode PRFM

The PRFM prefetch insn in the load/store with imm9 encodings
requires idx field 0b00; we were underdecoding this by
only checking !is_unpriv (which is equivalent to idx != 2).
Correctly UNDEF the unallocated encodings where idx == 0b01
and 0b11 as well as 0b10.

Backports commit a80c4256543987ca88407349ee012a673a10a2ae from qemu
This commit is contained in:
Peter Maydell 2019-02-03 17:35:07 -05:00 committed by Lioncash
parent 147269ed81
commit 80248fecb6
No known key found for this signature in database
GPG key ID: 4E3C3CC1031BA9C7

View file

@ -2871,7 +2871,7 @@ static void disas_ldst_reg_imm9(DisasContext *s, uint32_t insn,
} else { } else {
if (size == 3 && opc == 2) { if (size == 3 && opc == 2) {
/* PRFM - prefetch */ /* PRFM - prefetch */
if (is_unpriv) { if (idx != 0) {
unallocated_encoding(s); unallocated_encoding(s);
return; return;
} }