mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2024-12-23 09:55:33 +00:00
target/arm/translate-a64: Don't underdecode SIMD ld/st multiple
In the AdvSIMD load/store multiple structures encodings, the non-post-indexed case should have zeroes in [20:16] (which is the Rm field for the post-indexed case). Correctly UNDEF the currently unallocated encodings which have non-zeroes in those bits. Backports commit e1f220811dbd5d85fb02ff286358f9ee6188938f from qemu
This commit is contained in:
parent
80248fecb6
commit
60ccaf56ac
|
@ -3322,6 +3322,7 @@ static void disas_ldst_multiple_struct(DisasContext *s, uint32_t insn)
|
|||
TCGContext *tcg_ctx = s->uc->tcg_ctx;
|
||||
int rt = extract32(insn, 0, 5);
|
||||
int rn = extract32(insn, 5, 5);
|
||||
int rm = extract32(insn, 16, 5);
|
||||
int size = extract32(insn, 10, 2);
|
||||
int opcode = extract32(insn, 12, 4);
|
||||
bool is_store = !extract32(insn, 22, 1);
|
||||
|
@ -3341,6 +3342,11 @@ static void disas_ldst_multiple_struct(DisasContext *s, uint32_t insn)
|
|||
return;
|
||||
}
|
||||
|
||||
if (!is_postidx && rm != 0) {
|
||||
unallocated_encoding(s);
|
||||
return;
|
||||
}
|
||||
|
||||
/* From the shared decode logic */
|
||||
switch (opcode) {
|
||||
case 0x0:
|
||||
|
@ -3440,7 +3446,6 @@ static void disas_ldst_multiple_struct(DisasContext *s, uint32_t insn)
|
|||
}
|
||||
|
||||
if (is_postidx) {
|
||||
int rm = extract32(insn, 16, 5);
|
||||
if (rm == 31) {
|
||||
tcg_gen_mov_i64(tcg_ctx, tcg_rn, tcg_addr);
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue