aboutsummaryrefslogtreecommitdiff
path: root/target-lm32/translate.c
diff options
context:
space:
mode:
authorMichael Walle <michael@walle.cc>2016-10-13 00:35:06 +0200
committerMichael Tokarev <mjt@tls.msk.ru>2016-10-28 18:17:23 +0300
commit19f846b19f4bb5ef187da057d40f0507e3842625 (patch)
tree98587de168a35dd0e73ca327b4032047989e5e80 /target-lm32/translate.c
parent49285e11d8ce90d2fd76d8bf16b330731e220495 (diff)
target-lm32: disable asm logging via LOG_DIS()
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 <michael@walle.cc> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Diffstat (limited to 'target-lm32/translate.c')
-rw-r--r--target-lm32/translate.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/target-lm32/translate.c b/target-lm32/translate.c
index fa8416a81b..792637f523 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))