qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH] target-mips: Use EXCP_SC rather than a magic number


From: Wei-Ren Chen
Subject: [Qemu-devel] [PATCH] target-mips: Use EXCP_SC rather than a magic number
Date: Tue, 11 Dec 2012 00:15:55 +0800
User-agent: Mutt/1.5.21 (2010-09-15)

  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 <address@hidden>
---
 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;
 
-- 
1.7.3.4



reply via email to

[Prev in Thread] Current Thread [Next in Thread]