qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] target-mips: Use EXCP_SC rather than a magic number
@ 2012-12-10 16:15 陳韋任 (Wei-Ren Chen)
  2012-12-20  1:23 ` 陳韋任 (Wei-Ren Chen)
  2013-01-01 11:03 ` Aurelien Jarno
  0 siblings, 2 replies; 6+ messages in thread
From: 陳韋任 (Wei-Ren Chen) @ 2012-12-10 16:15 UTC (permalink / raw)
  To: qemu-devel; +Cc: Johnson, Eric, Aurelien Jarno

  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>
---
 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

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-01-01 11:07 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-10 16:15 [Qemu-devel] [PATCH] target-mips: Use EXCP_SC rather than a magic number 陳韋任 (Wei-Ren Chen)
2012-12-20  1:23 ` 陳韋任 (Wei-Ren Chen)
2012-12-20  1:59   ` li guang
2012-12-20  2:14     ` 陳韋任 (Wei-Ren Chen)
2013-01-01 11:07       ` Aurelien Jarno
2013-01-01 11:03 ` Aurelien Jarno

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).