From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LB9ev-0007nH-PJ for qemu-devel@nongnu.org; Fri, 12 Dec 2008 10:10:30 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LB9eo-0007cw-NA for qemu-devel@nongnu.org; Fri, 12 Dec 2008 10:10:23 -0500 Received: from [199.232.76.173] (port=50387 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LB9en-0007c7-OQ for qemu-devel@nongnu.org; Fri, 12 Dec 2008 10:10:21 -0500 Received: from mx2.redhat.com ([66.187.237.31]:32988) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LB9en-0001eY-8l for qemu-devel@nongnu.org; Fri, 12 Dec 2008 10:10:21 -0500 From: Eduardo Habkost Date: Fri, 12 Dec 2008 13:08:53 -0200 Message-Id: <1229094550-2022-15-git-send-email-ehabkost@redhat.com> In-Reply-To: <1229094550-2022-1-git-send-email-ehabkost@redhat.com> References: <1229094550-2022-1-git-send-email-ehabkost@redhat.com> Subject: [Qemu-devel] [PATCH 14/31] target-i386/op_helper.c: use LOG_PCALL instead of #ifdefs Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Eduardo Habkost Signed-off-by: Eduardo Habkost --- target-i386/op_helper.c | 22 ++++------------------ 1 files changed, 4 insertions(+), 18 deletions(-) diff --git a/target-i386/op_helper.c b/target-i386/op_helper.c index 5c4287c..6c78d2e 100644 --- a/target-i386/op_helper.c +++ b/target-i386/op_helper.c @@ -292,10 +292,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) { @@ -2305,11 +2302,7 @@ void helper_lcall_protected(int new_cs, target_ulong new_eip, if (load_segment(&e1, &e2, new_cs) != 0) raise_exception_err(EXCP0D_GPF, new_cs & 0xfffc); cpl = env->hflags & HF_CPL_MASK; -#ifdef DEBUG_PCALL - if (loglevel & CPU_LOG_PCALL) { - fprintf(logfile, "desc=%08x:%08x\n", e1, e2); - } -#endif + LOG_PCALL("desc=%08x:%08x\n", e1, e2); if (e2 & DESC_S_MASK) { if (!(e2 & DESC_CS_MASK)) raise_exception_err(EXCP0D_GPF, new_cs & 0xfffc); @@ -2413,11 +2406,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) @@ -2660,12 +2650,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