From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:42517) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tpzde-0005q4-FY for qemu-devel@nongnu.org; Tue, 01 Jan 2013 06:04:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TpzdY-0001IX-K6 for qemu-devel@nongnu.org; Tue, 01 Jan 2013 06:04:06 -0500 Received: from hall.aurel32.net ([2001:470:1f15:c4f::1]:52734) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TpzdY-0001IA-DV for qemu-devel@nongnu.org; Tue, 01 Jan 2013 06:04:00 -0500 Date: Tue, 1 Jan 2013 12:03:58 +0100 From: Aurelien Jarno Message-ID: <20130101110358.GE16659@ohm.aurel32.net> References: <20121210161555.GA44699@cs.nctu.edu.tw> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20121210161555.GA44699@cs.nctu.edu.tw> Subject: Re: [Qemu-devel] [PATCH] target-mips: Use EXCP_SC rather than a magic number List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?utf-8?B?6Zmz6Z+L5Lu7IChXZWktUmVuIENoZW4p?= Cc: qemu-devel@nongnu.org, "Johnson, Eric" On Tue, Dec 11, 2012 at 12:15:55AM +0800, 陳韋任 (Wei-Ren Chen) wrote: > 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; > Thanks, applied. -- Aurelien Jarno GPG: 1024D/F1BCDB73 aurelien@aurel32.net http://www.aurel32.net