From patchwork Fri Jan 7 15:06:34 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 77883 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 4E9D9B7142 for ; Sat, 8 Jan 2011 02:11:40 +1100 (EST) Received: from localhost ([127.0.0.1]:59509 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PbDyZ-0004IR-70 for incoming@patchwork.ozlabs.org; Fri, 07 Jan 2011 10:11:35 -0500 Received: from [140.186.70.92] (port=60594 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PbDtu-0001Mt-DS for qemu-devel@nongnu.org; Fri, 07 Jan 2011 10:06:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PbDtr-0003kw-Gb for qemu-devel@nongnu.org; Fri, 07 Jan 2011 10:06:46 -0500 Received: from mnementh.archaic.org.uk ([81.2.115.146]:44803) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PbDtr-0003jc-7Y for qemu-devel@nongnu.org; Fri, 07 Jan 2011 10:06:43 -0500 Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.69) (envelope-from ) id 1PbDti-0006f7-Ji for qemu-devel@nongnu.org; Fri, 07 Jan 2011 15:06:34 +0000 From: Peter Maydell To: qemu-devel@nongnu.org Date: Fri, 7 Jan 2011 15:06:34 +0000 Message-Id: <1294412794-25573-8-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1294412794-25573-1-git-send-email-peter.maydell@linaro.org> References: <1294412794-25573-1-git-send-email-peter.maydell@linaro.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) Subject: [Qemu-devel] [PATCH 7/7] target-arm: Translate with user-state from TB flags, not CPUState X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org When translating, get the user/priv state from the TB flags, not the CPUState. Signed-off-by: Peter Maydell --- target-arm/translate.c | 6 +----- 1 files changed, 1 insertions(+), 5 deletions(-) diff --git a/target-arm/translate.c b/target-arm/translate.c index 7d042ee..289501d 100644 --- a/target-arm/translate.c +++ b/target-arm/translate.c @@ -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;