@@ -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;
Debug output is already enabled and thus compile-testable, but align with other targets. Signed-off-by: Andreas Färber <afaerber@suse.de> --- target-openrisc/translate.c | 14 ++++++++++++-- 1 Datei geändert, 12 Zeilen hinzugefügt(+), 2 Zeilen entfernt(-)