sparc: allow CASA with ASI 0xa from user space

LEON3 allows the CASA instruction to be used from user space
if the ASI is set to 0xa (user data).

Backports commit bd4e097a8e30bb63ed7f46553b13f60809c30ac3 from qemu
This commit is contained in:
Peter Maydell 2018-02-17 19:23:12 -05:00 committed by Lioncash
parent 03dffc1e9c
commit 3664e1ab8a
No known key found for this signature in database
GPG key ID: 4E3C3CC1031BA9C7

View file

@ -5248,7 +5248,8 @@ static void disas_sparc_insn(DisasContext * dc, unsigned int insn, bool hook_ins
if (IS_IMM) { if (IS_IMM) {
goto illegal_insn; goto illegal_insn;
} }
if (!supervisor(dc)) { /* LEON3 allows CASA from user space with ASI 0xa */
if ((GET_FIELD(insn, 19, 26) != 0xa) && !supervisor(dc)) {
goto priv_insn; goto priv_insn;
} }
#endif #endif