qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [RFC 13/19] target-lm32: Refactor debug output macros


From: Andreas Färber
Subject: [Qemu-devel] [RFC 13/19] target-lm32: Refactor debug output macros
Date: Sun, 27 Jan 2013 14:32:11 +0100

Already enabled and thus compile-tested, but align with other targets.

Signed-off-by: Andreas Färber <address@hidden>
---
 target-lm32/translate.c |   10 +++++-----
 1 Datei geändert, 5 Zeilen hinzugefügt(+), 5 Zeilen entfernt(-)

diff --git a/target-lm32/translate.c b/target-lm32/translate.c
index 6b87340..01ef79a 100644
--- a/target-lm32/translate.c
+++ b/target-lm32/translate.c
@@ -28,11 +28,11 @@
 #include "helper.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 LOG_DIS(...) G_STMT_START \
+    if (DISAS_LM32) { \
+        qemu_log_mask(CPU_LOG_TB_IN_ASM, ## __VA_ARGS__); \
+    } \
+    G_STMT_END
 
 #define EXTRACT_FIELD(src, start, end) \
             (((src) >> start) & ((1 << (end - start + 1)) - 1))
-- 
1.7.10.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]