aboutsummaryrefslogtreecommitdiff
path: root/target/xtensa/translate.c
diff options
context:
space:
mode:
authorMax Filippov <jcmvbkbc@gmail.com>2019-11-04 00:01:27 -0800
committerMax Filippov <jcmvbkbc@gmail.com>2020-01-06 11:46:16 -0800
commit6c438056c2910b14e6bc0d5b5272dd87fbc65495 (patch)
treebeaf226c3ef2fa1780da8c0d2d62a6d36e2aef28 /target/xtensa/translate.c
parentf4d8cf148e43d942ef1202071e0cd66ce40322e0 (diff)
target/xtensa: fix ps.ring use in MPU configs
Allow ps.ring modification by wsr.ps/xsr.ps and use ps.ring value in xtensa_get_[c]ring on configurations with MPU. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Diffstat (limited to 'target/xtensa/translate.c')
-rw-r--r--target/xtensa/translate.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/target/xtensa/translate.c b/target/xtensa/translate.c
index a99f5296e2..e6d910786c 100644
--- a/target/xtensa/translate.c
+++ b/target/xtensa/translate.c
@@ -2713,7 +2713,8 @@ static void translate_wsr_ps(DisasContext *dc, const OpcodeArg arg[],
uint32_t mask = PS_WOE | PS_CALLINC | PS_OWB |
PS_UM | PS_EXCM | PS_INTLEVEL;
- if (option_enabled(dc, XTENSA_OPTION_MMU)) {
+ if (option_enabled(dc, XTENSA_OPTION_MMU) ||
+ option_enabled(dc, XTENSA_OPTION_MPU)) {
mask |= PS_RING;
}
tcg_gen_andi_i32(cpu_SR[par[0]], arg[0].in, mask);