qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH 12/13] target-i386/op_helper.c: use LOG_PCALL instea


From: Eduardo Habkost
Subject: [Qemu-devel] [PATCH 12/13] target-i386/op_helper.c: use LOG_PCALL instead of #ifdefs
Date: Wed, 10 Dec 2008 16:24:23 -0200

Signed-off-by: Eduardo Habkost <address@hidden>
---
 target-i386/op_helper.c |   16 +++-------------
 1 files changed, 3 insertions(+), 13 deletions(-)

diff --git a/target-i386/op_helper.c b/target-i386/op_helper.c
index 13f65e1..b0cd632 100644
--- a/target-i386/op_helper.c
+++ b/target-i386/op_helper.c
@@ -287,10 +287,7 @@ static void switch_tss(int tss_selector,
     target_ulong ptr;
 
     type = (e2 >> DESC_TYPE_SHIFT) & 0xf;
-#ifdef DEBUG_PCALL
-    if (loglevel & CPU_LOG_PCALL)
-        fprintf(logfile, "switch_tss: sel=0x%04x type=%d src=%d\n", 
tss_selector, type, source);
-#endif
+    LOG_PCALL("switch_tss: sel=0x%04x type=%d src=%d\n", tss_selector, type, 
source);
 
     /* if task gate, we read the TSS segment and we load it */
     if (type == 5) {
@@ -2408,11 +2405,8 @@ void helper_lcall_protected(int new_cs, target_ulong 
new_eip,
         if (!(e2 & DESC_C_MASK) && dpl < cpl) {
             /* to inner privilege */
             get_ss_esp_from_tss(&ss, &sp, dpl);
-#ifdef DEBUG_PCALL
-            if (loglevel & CPU_LOG_PCALL)
-                fprintf(logfile, "new ss:esp=%04x:%08x param_count=%d ESP=" 
TARGET_FMT_lx "\n",
+            LOG_PCALL("new ss:esp=%04x:%08x param_count=%d ESP=" TARGET_FMT_lx 
"\n",
                         ss, sp, param_count, ESP);
-#endif
             if ((ss & 0xfffc) == 0)
                 raise_exception_err(EXCP0A_TSS, ss & 0xfffc);
             if ((ss & 3) != dpl)
@@ -2655,12 +2649,8 @@ static inline void helper_ret_protected(int shift, int 
is_iret, int addend)
             POPW(ssp, sp, sp_mask, new_esp);
             POPW(ssp, sp, sp_mask, new_ss);
         }
-#ifdef DEBUG_PCALL
-        if (loglevel & CPU_LOG_PCALL) {
-            fprintf(logfile, "new ss:esp=%04x:" TARGET_FMT_lx "\n",
+        LOG_PCALL("new ss:esp=%04x:" TARGET_FMT_lx "\n",
                     new_ss, new_esp);
-        }
-#endif
         if ((new_ss & 0xfffc) == 0) {
 #ifdef TARGET_X86_64
             /* NULL ss is allowed in long mode if cpl != 3*/
-- 
1.5.5.GIT





reply via email to

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