Debug output is already enabled and thus compile-testable, but align
with other targets.

Signed-off-by: Andreas Färber <afaer...@suse.de>
---
 target-openrisc/translate.c |   14 ++++++++++++--
 1 Datei geändert, 12 Zeilen hinzugefügt(+), 2 Zeilen entfernt(-)

diff --git a/target-openrisc/translate.c b/target-openrisc/translate.c
index 1e1b30c..2b6f19c 100644
--- a/target-openrisc/translate.c
+++ b/target-openrisc/translate.c
@@ -34,11 +34,21 @@
 #define OPENRISC_DISAS
 
 #ifdef OPENRISC_DISAS
-#  define LOG_DIS(...) qemu_log_mask(CPU_LOG_TB_IN_ASM, ## __VA_ARGS__)
+static const bool debug_disas = true;
 #else
-#  define LOG_DIS(...) do { } while (0)
+static const bool debug_disas;
 #endif
 
+static void GCC_FMT_ATTR(1, 2) LOG_DIS(const char *fmt, ...)
+{
+    if (debug_disas) {
+        va_list ap;
+        va_start(ap, fmt);
+        qemu_log_mask_vprintf(CPU_LOG_TB_IN_ASM, fmt, ap);
+        va_end(ap);
+    }
+}
+
 typedef struct DisasContext {
     TranslationBlock *tb;
     target_ulong pc, ppc, npc;
-- 
1.7.10.4


Reply via email to