aboutsummaryrefslogtreecommitdiff
path: root/target-arm
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2011-01-14 20:39:19 +0100
committerAurelien Jarno <aurelien@aurel32.net>2011-01-14 20:39:19 +0100
commit61f74d6a290d606504e4fbd6a94cbee3ce277533 (patch)
treebb768b5c36be62fcf2aa9c214e7d27ef1fabf023 /target-arm
parent05ed9a991987fd2f117914f9b0f7157553837d1b (diff)
target-arm: Translate with user-state from TB flags, not CPUState
When translating, get the user/priv state from the TB flags, not the CPUState. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Aurelien Jarno <aurelien@aurel32.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Diffstat (limited to 'target-arm')
-rw-r--r--target-arm/translate.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/target-arm/translate.c b/target-arm/translate.c
index 0e28ffd290..10bd54522d 100644
--- a/target-arm/translate.c
+++ b/target-arm/translate.c
@@ -9099,11 +9099,7 @@ static inline void gen_intermediate_code_internal(CPUState *env,
dc->condexec_mask = (ARM_TBFLAG_CONDEXEC(tb->flags) & 0xf) << 1;
dc->condexec_cond = ARM_TBFLAG_CONDEXEC(tb->flags) >> 4;
#if !defined(CONFIG_USER_ONLY)
- if (IS_M(env)) {
- dc->user = ((env->v7m.exception == 0) && (env->v7m.control & 1));
- } else {
- dc->user = (env->uncached_cpsr & 0x1f) == ARM_CPU_MODE_USR;
- }
+ dc->user = (ARM_TBFLAG_PRIV(tb->flags) == 0);
#endif
dc->vfp_enabled = ARM_TBFLAG_VFPEN(tb->flags);
dc->vec_len = ARM_TBFLAG_VECLEN(tb->flags);