From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LATkc-00018N-Ix for qemu-devel@nongnu.org; Wed, 10 Dec 2008 13:25:35 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LATka-00016g-Cj for qemu-devel@nongnu.org; Wed, 10 Dec 2008 13:25:33 -0500 Received: from [199.232.76.173] (port=42924 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LATka-00016R-0J for qemu-devel@nongnu.org; Wed, 10 Dec 2008 13:25:32 -0500 Received: from mx2.redhat.com ([66.187.237.31]:52936) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LATkY-0004Vc-4d for qemu-devel@nongnu.org; Wed, 10 Dec 2008 13:25:31 -0500 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id mBAIPPwa024300 for ; Wed, 10 Dec 2008 13:25:25 -0500 From: Eduardo Habkost Date: Wed, 10 Dec 2008 16:24:23 -0200 Message-Id: <1228933464-7670-13-git-send-email-ehabkost@redhat.com> In-Reply-To: <1228933464-7670-1-git-send-email-ehabkost@redhat.com> References: <1228933464-7670-1-git-send-email-ehabkost@redhat.com> Subject: [Qemu-devel] [PATCH 12/13] 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 | 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