target-mips: Use EXCP_SC rather than a magic number
author陳韋任 (Wei-Ren Chen) <chenwj@iis.sinica.edu.tw>
Mon, 10 Dec 2012 16:15:55 +0000 (00:15 +0800)
committerAurelien Jarno <aurelien@aurel32.net>
Tue, 1 Jan 2013 11:02:24 +0000 (12:02 +0100)
  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 <chenwj@iis.sinica.edu.tw>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
target-mips/op_helper.c

index e3ab05cbb0ccee12caf6aeb586d83f90fc07847e..d833d78b4f0af1cdd3b6b14cb7ebca9a87983966 100644 (file)
@@ -38,10 +38,9 @@ static inline void QEMU_NORETURN do_raise_exception_err(CPUMIPSState *env,
                                                         int error_code,
                                                         uintptr_t pc)
 {
-#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;