From patchwork Sat Feb 20 18:19:09 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Froyd X-Patchwork-Id: 45927 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 C7454B7CB9 for ; Sun, 21 Feb 2010 05:21:49 +1100 (EST) Received: from localhost ([127.0.0.1]:45849 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NitwS-0002q5-TQ for incoming@patchwork.ozlabs.org; Sat, 20 Feb 2010 13:20:36 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Nitv9-0002oE-GV for qemu-devel@nongnu.org; Sat, 20 Feb 2010 13:19:15 -0500 Received: from [199.232.76.173] (port=38989 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nitv8-0002nV-PU for qemu-devel@nongnu.org; Sat, 20 Feb 2010 13:19:14 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1Nitv8-0005MJ-51 for qemu-devel@nongnu.org; Sat, 20 Feb 2010 13:19:14 -0500 Received: from mx20.gnu.org ([199.232.41.8]:58165) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Nitv7-0005Lx-RI for qemu-devel@nongnu.org; Sat, 20 Feb 2010 13:19:13 -0500 Received: from mail.codesourcery.com ([38.113.113.100]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Nitv6-0001Qv-19 for qemu-devel@nongnu.org; Sat, 20 Feb 2010 13:19:12 -0500 Received: (qmail 28559 invoked from network); 20 Feb 2010 18:19:09 -0000 Received: from unknown (HELO localhost) (froydnj@127.0.0.2) by mail.codesourcery.com with ESMTPA; 20 Feb 2010 18:19:09 -0000 From: Nathan Froyd To: qemu-devel@nongnu.org Date: Sat, 20 Feb 2010 10:19:09 -0800 Message-Id: <1266689949-13585-1-git-send-email-froydnj@codesourcery.com> X-Mailer: git-send-email 1.6.3.2 X-detected-operating-system: by mx20.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) Cc: aurelien@aurel32.net Subject: [Qemu-devel] [PATCH] target-mips: fix CpU exception for coprocessor 0 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 we signal a CpU exception for coprocessor 0, we should indicate that it's for coprocessor 0 instead of coprocessor 1. Signed-off-by: Nathan Froyd --- target-mips/translate.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/target-mips/translate.c b/target-mips/translate.c index dfea6f6..f3522f5 100644 --- a/target-mips/translate.c +++ b/target-mips/translate.c @@ -830,7 +830,7 @@ static inline void gen_op_addr_add (DisasContext *ctx, TCGv ret, TCGv arg0, TCGv static inline void check_cp0_enabled(DisasContext *ctx) { if (unlikely(!(ctx->hflags & MIPS_HFLAG_CP0))) - generate_exception_err(ctx, EXCP_CpU, 1); + generate_exception_err(ctx, EXCP_CpU, 0); } static inline void check_cp1_enabled(DisasContext *ctx)