From patchwork Thu Dec 10 20:54:04 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 40934 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 4FBE3B70BA for ; Sat, 12 Dec 2009 12:24:21 +1100 (EST) Received: from localhost ([127.0.0.1]:47306 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NJGiY-0007rO-Lf for incoming@patchwork.ozlabs.org; Fri, 11 Dec 2009 20:24:18 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NJGhp-0007mb-P4 for qemu-devel@nongnu.org; Fri, 11 Dec 2009 20:23:33 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NJGho-0007kk-3N for qemu-devel@nongnu.org; Fri, 11 Dec 2009 20:23:32 -0500 Received: from [199.232.76.173] (port=54740 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NJGhn-0007kQ-IN for qemu-devel@nongnu.org; Fri, 11 Dec 2009 20:23:31 -0500 Received: from are.twiddle.net ([75.149.56.221]:43434) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NJGhm-00035f-Va for qemu-devel@nongnu.org; Fri, 11 Dec 2009 20:23:31 -0500 Received: by are.twiddle.net (Postfix, from userid 5000) id 673D7700; Fri, 11 Dec 2009 17:23:30 -0800 (PST) Message-Id: <9c6c0c9072a3e4132fd1ca3a2f73762d4f1c4cc8.1260580414.git.rth@twiddle.net> In-Reply-To: References: From: Richard Henderson Date: Thu, 10 Dec 2009 12:54:04 -0800 To: qemu-devel@nongnu.org MIME-Version: 1.0 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Subject: [Qemu-devel] [PATCH 02/13] alpha: Fix -d in_asm X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Generic disassembly was incorrectly keyed on ALPHA_DEBUG_DISAS rather than the generic DEBUG_DISAS. Use qemu_log_mask for additional LOG_DISAS output. Delete some random insn_count logging noise from gen_intermediate_code_internal. Signed-off-by: Richard Henderson --- target-alpha/translate.c | 19 ++++--------------- 1 files changed, 4 insertions(+), 15 deletions(-) diff --git a/target-alpha/translate.c b/target-alpha/translate.c index 851eb50..4f923bb 100644 --- a/target-alpha/translate.c +++ b/target-alpha/translate.c @@ -35,7 +35,7 @@ #undef ALPHA_DEBUG_DISAS #ifdef ALPHA_DEBUG_DISAS -# define LOG_DISAS(...) qemu_log(__VA_ARGS__) +# define LOG_DISAS(...) qemu_log_mask(CPU_LOG_TB_IN_ASM, ## __VA_ARGS__) #else # define LOG_DISAS(...) do { } while (0) #endif @@ -696,8 +696,9 @@ static inline int translate_one(DisasContext *ctx, uint32_t insn) fn7 = (insn >> 5) & 0x0000007F; fn2 = (insn >> 5) & 0x00000003; ret = 0; - LOG_DISAS("opc %02x ra %d rb %d rc %d disp16 %04x\n", + LOG_DISAS("opc %02x ra %2d rb %2d rc %2d disp16 %6d\n", opc, ra, rb, rc, disp16); + switch (opc) { case 0x00: /* CALL_PAL */ @@ -2353,9 +2354,6 @@ static inline void gen_intermediate_code_internal(CPUState *env, TranslationBlock *tb, int search_pc) { -#if defined ALPHA_DEBUG_DISAS - static int insn_count; -#endif DisasContext ctx, *ctxp = &ctx; target_ulong pc_start; uint32_t insn; @@ -2405,16 +2403,7 @@ static inline void gen_intermediate_code_internal(CPUState *env, } if (num_insns + 1 == max_insns && (tb->cflags & CF_LAST_IO)) gen_io_start(); -#if defined ALPHA_DEBUG_DISAS - insn_count++; - LOG_DISAS("pc " TARGET_FMT_lx " mem_idx %d\n", - ctx.pc, ctx.mem_idx); -#endif insn = ldl_code(ctx.pc); -#if defined ALPHA_DEBUG_DISAS - insn_count++; - LOG_DISAS("opcode %08x %d\n", insn, insn_count); -#endif num_insns++; ctx.pc += 4; ret = translate_one(ctxp, insn); @@ -2459,7 +2448,7 @@ static inline void gen_intermediate_code_internal(CPUState *env, tb->size = ctx.pc - pc_start; tb->icount = num_insns; } -#if defined ALPHA_DEBUG_DISAS +#ifdef DEBUG_DISAS log_cpu_state_mask(CPU_LOG_TB_CPU, env, 0); if (qemu_loglevel_mask(CPU_LOG_TB_IN_ASM)) { qemu_log("IN: %s\n", lookup_symbol(pc_start));