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

login
register
mail settings
Submitter Andreas Färber
Date Jan. 27, 2013, 1:32 p.m.
Message ID <1359293537-8251-14-git-send-email-afaerber@suse.de>
Download mbox | patch
Permalink /patch/215991/
State New
Headers show

Comments

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

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