mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-02-02 09:51:07 +00:00
target/arm: Diagnose writeback register in list for LDM for v7
Prior to v7, for the A32 encoding, this operation wrote an UNKNOWN value back to the base register. Starting in v7 this is UNPREDICTABLE. Backports commit 3949f4675d13c587078f8f423845a3a537a22595 from qemu
This commit is contained in:
parent
a501800ba6
commit
fc81b12631
|
@ -10331,6 +10331,15 @@ static bool do_ldm(DisasContext *s, arg_ldst_block *a)
|
||||||
|
|
||||||
static bool trans_LDM_a32(DisasContext *s, arg_ldst_block *a)
|
static bool trans_LDM_a32(DisasContext *s, arg_ldst_block *a)
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
|
* Writeback register in register list is UNPREDICTABLE
|
||||||
|
* for ArchVersion() >= 7. Prior to v7, A32 would write
|
||||||
|
* an UNKNOWN value to the base register.
|
||||||
|
*/
|
||||||
|
if (ENABLE_ARCH_7 && a->w && (a->list & (1 << a->rn))) {
|
||||||
|
unallocated_encoding(s);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
return do_ldm(s, a);
|
return do_ldm(s, a);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue