From patchwork Wed Oct 12 22:35:06 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Walle X-Patchwork-Id: 9373889 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 9BDA560772 for ; Wed, 12 Oct 2016 22:40:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 81B7529662 for ; Wed, 12 Oct 2016 22:40:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 765D829720; Wed, 12 Oct 2016 22:40:50 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id ED33E29662 for ; Wed, 12 Oct 2016 22:40:49 +0000 (UTC) Received: from localhost ([::1]:36241 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1buSCf-0006Vu-4w for patchwork-qemu-devel@patchwork.kernel.org; Wed, 12 Oct 2016 18:40:49 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56842) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1buS7e-0002cD-73 for qemu-devel@nongnu.org; Wed, 12 Oct 2016 18:35:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1buS7b-0002aZ-0L for qemu-devel@nongnu.org; Wed, 12 Oct 2016 18:35:36 -0400 Received: from ssl.serverraum.org ([2a01:4f8:130:84d6::1:2]:46590) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1buS7a-0002Zx-Qh for qemu-devel@nongnu.org; Wed, 12 Oct 2016 18:35:34 -0400 Received: from apollo.fritz.box (ip5f585ef2.dynamic.kabel-deutschland.de [95.88.94.242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) by ssl.serverraum.org (Postfix) with ESMTPSA id 9E22A22279; Thu, 13 Oct 2016 00:35:32 +0200 (CEST) Authentication-Results: ssl.serverraum.org; dmarc=none header.from=walle.cc DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2016061301; t=1476311732; bh=0AHXUpy6NX0Znum98+Q9VxGMAMuem+HHQz1N6UzeTos=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uAl7L/wwQYIx7OAH/EXCZ3fmB9MzzofjZR14kW6VXiiZIwXEwP6DzdNd1G5cT5c3S c5wVB4Cuekmwev5dJ2kvugOu4+ImZqOMphVre0qNaS7vnC2rVxFlArPJc5IvkQ6ORq rP4S10lDhaAX0RWA/QPBJSQxFg4Nyu+VoQ1PTXdg= From: Michael Walle To: qemu-devel@nongnu.org Date: Thu, 13 Oct 2016 00:35:06 +0200 Message-Id: <1476311708-14792-2-git-send-email-michael@walle.cc> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1476311708-14792-1-git-send-email-michael@walle.cc> References: <1476311708-14792-1-git-send-email-michael@walle.cc> X-Virus-Scanned: clamav-milter 0.99.2 at web X-Virus-Status: Clean X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a01:4f8:130:84d6::1:2 Subject: [Qemu-devel] [PATCH 2/4] target-lm32: disable asm logging via LOG_DIS() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-trivial@nongnu.org, Peter Maydell , Michael Walle Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP The lm32 target already has a disassembler which logs the assembly instructions with "-d in_asm". Therefore, turn of the LOG_DIS() macro to prevent logging the assembly instructions twice. Also turn the macro in a one which is always compiled to catch any errors while the macro is turned off. Signed-off-by: Michael Walle Reviewed-by: Peter Maydell --- target-lm32/translate.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/target-lm32/translate.c b/target-lm32/translate.c index fa8416a..792637f 100644 --- a/target-lm32/translate.c +++ b/target-lm32/translate.c @@ -33,12 +33,14 @@ #include "exec/log.h" -#define DISAS_LM32 1 -#if DISAS_LM32 -# define LOG_DIS(...) qemu_log_mask(CPU_LOG_TB_IN_ASM, ## __VA_ARGS__) -#else -# define LOG_DIS(...) do { } while (0) -#endif +#define DISAS_LM32 0 + +#define LOG_DIS(...) \ + do { \ + if (DISAS_LM32) { \ + qemu_log_mask(CPU_LOG_TB_IN_ASM, ## __VA_ARGS__); \ + } \ + } while (0) #define EXTRACT_FIELD(src, start, end) \ (((src) >> start) & ((1 << (end - start + 1)) - 1))