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 From: Michael Walle Date: Thu, 13 Oct 2016 00:35:06 +0200 Message-Id: <1476311708-14792-2-git-send-email-michael@walle.cc> In-Reply-To: <1476311708-14792-1-git-send-email-michael@walle.cc> References: <1476311708-14792-1-git-send-email-michael@walle.cc> Subject: [Qemu-devel] [PATCH 2/4] target-lm32: disable asm logging via LOG_DIS() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: qemu-trivial@nongnu.org, Peter Maydell , Michael Walle 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 --- 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)) -- 2.1.4