@@ -9078,11 +9078,7 @@ static inline void gen_intermediate_code_internal(CPUState *env,
dc->condexec_mask = (tb->flags & 0xf00) >> 7;
dc->condexec_cond = (tb->flags & 0xf000) >> 12;
#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 = ((tb->flags & (1 << 6)) == 0);
#endif
dc->vfp_enabled = ((tb->flags & (1 << 7)) != 0);
dc->vec_len = (tb->flags >> 1) & 7;
When translating, get the user/priv state from the TB flags, not the CPUState. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> --- target-arm/translate.c | 6 +----- 1 files changed, 1 insertions(+), 5 deletions(-)