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

Submitted by Andreas Färber on Jan. 27, 2013, 1:32 p.m.

Details

Message ID 1359293537-8251-14-git-send-email-afaerber@suse.de
State New
Headers show

Commit Message

Andreas Färber Jan. 27, 2013, 1:32 p.m.
Already enabled and thus compile-tested, but align with other targets.

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

Patch hide | download patch | download mbox

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))