From patchwork Wed Jan 23 02:57:02 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petar Jovanovic X-Patchwork-Id: 214717 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id D20A72C0080 for ; Wed, 23 Jan 2013 13:56:02 +1100 (EST) Received: from localhost ([::1]:41880 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TxqVM-0006rN-6z for incoming@patchwork.ozlabs.org; Tue, 22 Jan 2013 21:56:00 -0500 Received: from eggs.gnu.org ([208.118.235.92]:54805) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TxqVF-0006r7-Cy for qemu-devel@nongnu.org; Tue, 22 Jan 2013 21:55:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TxqVE-0006Zr-1u for qemu-devel@nongnu.org; Tue, 22 Jan 2013 21:55:53 -0500 Received: from mail.rt-rk.ftn.uns.ac.rs ([147.91.177.140]:60797 helo=mail.rt-rk.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TxqVD-0006Zd-R1 for qemu-devel@nongnu.org; Tue, 22 Jan 2013 21:55:51 -0500 Received: from mail.rt-rk.com (mail.localdomain [127.0.0.1]) by mail.rt-rk.com (Postfix) with SMTP id 6F0B525BA3B for ; Wed, 23 Jan 2013 03:55:46 +0100 (CET) X-Virus-Scanned: amavisd-new at rt-rk.com From: Petar Jovanovic To: qemu-devel@nongnu.org Date: Wed, 23 Jan 2013 03:57:02 +0100 Message-Id: <1358909822-32336-1-git-send-email-petar.jovanovic@rt-rk.com> X-Mailer: git-send-email 1.7.5.4 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 147.91.177.140 Cc: petarj@mips.com, aurelien@aurel32.net Subject: [Qemu-devel] [PATCH] target-mips: enable access to DSP ASE if implemented X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Petar Jovanovic compute_hflags() will reset DSP h-flags, so MX bit should be initially set for usermode in cpu_state_reset() if DSP ASE is implemented. This change will bring back user-mode support for DSP ASE, since one of the recent changes broke it. Signed-off-by: Petar Jovanovic --- target-mips/translate.c | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-) diff --git a/target-mips/translate.c b/target-mips/translate.c index 206ba83..0443704 100644 --- a/target-mips/translate.c +++ b/target-mips/translate.c @@ -15933,10 +15933,8 @@ void cpu_state_reset(CPUMIPSState *env) if (env->CP0_Config1 & (1 << CP0C1_FP)) { env->CP0_Status |= (1 << CP0St_CU1); } - if (env->cpu_model->insn_flags & ASE_DSPR2) { - env->hflags |= MIPS_HFLAG_DSP | MIPS_HFLAG_DSPR2; - } else if (env->cpu_model->insn_flags & ASE_DSP) { - env->hflags |= MIPS_HFLAG_DSP; + if (env->CP0_Config3 & (1 << CP0C3_DSPP)) { + env->CP0_Status |= (1 << CP0St_MX); } #else if (env->hflags & MIPS_HFLAG_BMASK) {