From patchwork Mon Dec 10 16:15:55 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?6Zmz6Z+L5Lu7?= X-Patchwork-Id: 204965 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 6F1AE2C021D for ; Tue, 11 Dec 2012 03:16:23 +1100 (EST) Received: from localhost ([::1]:41593 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ti61l-0002Jb-Gg for incoming@patchwork.ozlabs.org; Mon, 10 Dec 2012 11:16:21 -0500 Received: from eggs.gnu.org ([208.118.235.92]:33659) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ti61c-0002IE-RV for qemu-devel@nongnu.org; Mon, 10 Dec 2012 11:16:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ti61R-0007Th-TA for qemu-devel@nongnu.org; Mon, 10 Dec 2012 11:16:12 -0500 Received: from csmailer.cs.nctu.edu.tw ([140.113.235.130]:63146) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ti61R-0007T0-Cr for qemu-devel@nongnu.org; Mon, 10 Dec 2012 11:16:01 -0500 Received: from csmailer.cs.nctu.edu.tw (localhost [127.0.0.1]) by csmailer.cs.nctu.edu.tw (Postfix) with ESMTP id 860CB9AB; Tue, 11 Dec 2012 00:15:56 +0800 (CST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=cs.nctu.edu.tw; h=date :from:to:cc:subject:message-id:mime-version:content-type; s= rsa1024; bh=wiLnKRJKv3O/SRa6zGgcpY43sf0=; b=cTNv+tOIubpFH85Q5zBl 2WlGgxmp6FWrBnMfN5g6CdGpwqy9+gIXSz9KKeLuJXcOBy+/YzmDCyyRY0X0ADb3 RyfhmVydNDgtXBz2S8liyiGda/yDetEM1649hyttpC6tW/whSKrg0I3d8USp9Mmy IE+7FAKuODZDs4cpypJQhwU= Received: from alumni.cs.nctu.edu.tw (alumni.cs.nctu.edu.tw [140.113.235.116]) by csmailer.cs.nctu.edu.tw (Postfix) with ESMTP id 712BA9AA; Tue, 11 Dec 2012 00:15:56 +0800 (CST) Received: (from chenwj@localhost) by alumni.cs.nctu.edu.tw (8.14.5/8.14.5/Submit) id qBAGFtGs044773; Tue, 11 Dec 2012 00:15:55 +0800 (CST) (envelope-from chenwj) Date: Tue, 11 Dec 2012 00:15:55 +0800 From: =?utf-8?B?6Zmz6Z+L5Lu7IChXZWktUmVuIENoZW4p?= To: qemu-devel@nongnu.org Message-ID: <20121210161555.GA44699@cs.nctu.edu.tw> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-detected-operating-system: by eggs.gnu.org: FreeBSD 8.x X-Received-From: 140.113.235.130 Cc: "Johnson, Eric" , Aurelien Jarno Subject: [Qemu-devel] [PATCH] target-mips: Use EXCP_SC rather than a magic number 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 the discussion on the ML [1], the exception limit defined by magic number 0x100 is actually EXCP_SC defined in cpu.h. Replace the magic number with EXCP_SC. Remove "#if 1 .. #endif" as well. [1] http://lists.gnu.org/archive/html/qemu-devel/2012-11/msg03080.html Signed-off-by: Chen Wei-Ren --- target-mips/op_helper.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/target-mips/op_helper.c b/target-mips/op_helper.c index f45d494..98a445c 100644 --- a/target-mips/op_helper.c +++ b/target-mips/op_helper.c @@ -39,10 +39,10 @@ static inline void QEMU_NORETURN do_raise_exception_err(CPUMIPSState *env, uintptr_t pc) { TranslationBlock *tb; -#if 1 - if (exception < 0x100) + if (exception < EXCP_SC) { qemu_log("%s: %d %d\n", __func__, exception, error_code); -#endif + } + env->exception_index = exception; env->error_code = error_code;