aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Zuepke <azu@sysgo.de>2015-12-04 16:01:02 +0100
committerPeter Maydell <peter.maydell@linaro.org>2015-12-10 11:19:18 +0000
commitbd4e097a8e30bb63ed7f46553b13f60809c30ac3 (patch)
tree46dc816f983f1d7f6f554a79dd8411aa71b5505e
parenta3154ccabcb21ac4e42877c965df60976832dbc5 (diff)
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). Signed-off-by: Alex Zuepke <azu@sysgo.de> Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rw-r--r--target-sparc/translate.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/target-sparc/translate.c b/target-sparc/translate.c
index 41a33193d8..63440dd792 100644
--- a/target-sparc/translate.c
+++ b/target-sparc/translate.c
@@ -5097,7 +5097,8 @@ static void disas_sparc_insn(DisasContext * dc, unsigned int insn)
if (IS_IMM) {
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;
}
#endif