aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
Diffstat (limited to 'hw')
-rw-r--r--hw/alpha_palcode.c15
-rw-r--r--hw/mips_timer.c4
-rw-r--r--hw/ppc.c10
-rw-r--r--hw/ppc4xx_devs.c5
-rw-r--r--hw/ppc_prep.c9
5 files changed, 11 insertions, 32 deletions
diff --git a/hw/alpha_palcode.c b/hw/alpha_palcode.c
index 151f3c2ab5..bfffb5d29c 100644
--- a/hw/alpha_palcode.c
+++ b/hw/alpha_palcode.c
@@ -1061,13 +1061,11 @@ void call_pal (CPUState *env, int palcode)
{
target_long ret;
- if (logfile != NULL)
- fprintf(logfile, "%s: palcode %02x\n", __func__, palcode);
+ qemu_log("%s: palcode %02x\n", __func__, palcode);
switch (palcode) {
case 0x83:
/* CALLSYS */
- if (logfile != NULL)
- fprintf(logfile, "CALLSYS n " TARGET_FMT_ld "\n", env->ir[0]);
+ qemu_log("CALLSYS n " TARGET_FMT_ld "\n", env->ir[0]);
ret = do_syscall(env, env->ir[IR_V0], env->ir[IR_A0], env->ir[IR_A1],
env->ir[IR_A2], env->ir[IR_A3], env->ir[IR_A4],
env->ir[IR_A5]);
@@ -1082,18 +1080,15 @@ void call_pal (CPUState *env, int palcode)
case 0x9E:
/* RDUNIQUE */
env->ir[IR_V0] = env->unique;
- if (logfile != NULL)
- fprintf(logfile, "RDUNIQUE: " TARGET_FMT_lx "\n", env->unique);
+ qemu_log("RDUNIQUE: " TARGET_FMT_lx "\n", env->unique);
break;
case 0x9F:
/* WRUNIQUE */
env->unique = env->ir[IR_A0];
- if (logfile != NULL)
- fprintf(logfile, "WRUNIQUE: " TARGET_FMT_lx "\n", env->unique);
+ qemu_log("WRUNIQUE: " TARGET_FMT_lx "\n", env->unique);
break;
default:
- if (logfile != NULL)
- fprintf(logfile, "%s: unhandled palcode %02x\n",
+ qemu_log("%s: unhandled palcode %02x\n",
__func__, palcode);
exit(1);
}
diff --git a/hw/mips_timer.c b/hw/mips_timer.c
index 67b873511c..d341e51657 100644
--- a/hw/mips_timer.c
+++ b/hw/mips_timer.c
@@ -84,9 +84,7 @@ static void mips_timer_cb (void *opaque)
env = opaque;
#if 0
- if (logfile) {
- fprintf(logfile, "%s\n", __func__);
- }
+ qemu_log("%s\n", __func__);
#endif
if (env->CP0_Cause & (1 << CP0Ca_DC))
diff --git a/hw/ppc.c b/hw/ppc.c
index d2821fee6b..05e787f040 100644
--- a/hw/ppc.c
+++ b/hw/ppc.c
@@ -32,20 +32,14 @@
//#define PPC_DEBUG_TB
#ifdef PPC_DEBUG_IRQ
-# define LOG_IRQ(...) do { \
- if (loglevel & CPU_LOG_INT) \
- fprintf(logfile, ## __VA_ARGS__); \
- } while (0)
+# define LOG_IRQ(...) qemu_log_mask(CPU_LOG_INT, ## __VA_ARGS__)
#else
# define LOG_IRQ(...) do { } while (0)
#endif
#ifdef PPC_DEBUG_TB
-# define LOG_TB(...) do { \
- if (loglevel) \
- fprintf(logfile, ## __VA_ARGS__); \
- } while (0)
+# define LOG_TB(...) qemu_log(__VA_ARGS__)
#else
# define LOG_TB(...) do { } while (0)
#endif
diff --git a/hw/ppc4xx_devs.c b/hw/ppc4xx_devs.c
index 4605159c79..aec0602ced 100644
--- a/hw/ppc4xx_devs.c
+++ b/hw/ppc4xx_devs.c
@@ -33,10 +33,7 @@
#ifdef DEBUG_UIC
-# define LOG_UIC(...) do { \
- if (loglevel & CPU_LOG_INT) \
- fprintf(logfile, ## __VA_ARGS__); \
- } while (0)
+# define LOG_UIC(...) qemu_log_mask(CPU_LOG_INT, ## __VA_ARGS__)
#else
# define LOG_UIC(...) do { } while (0)
#endif
diff --git a/hw/ppc_prep.c b/hw/ppc_prep.c
index 6c0d8fe7cf..506391c8e4 100644
--- a/hw/ppc_prep.c
+++ b/hw/ppc_prep.c
@@ -53,18 +53,13 @@
#define PPC_IO_DPRINTF(fmt, args...) \
do { \
if (loglevel & CPU_LOG_IOPORT) { \
- fprintf(logfile, "%s: " fmt, __func__ , ##args); \
+ qemu_log("%s: " fmt, __func__ , ##args); \
} else { \
printf("%s : " fmt, __func__ , ##args); \
} \
} while (0)
#elif defined (DEBUG_PPC_IO)
-#define PPC_IO_DPRINTF(fmt, args...) \
-do { \
- if (loglevel & CPU_LOG_IOPORT) { \
- fprintf(logfile, "%s: " fmt, __func__ , ##args); \
- } \
-} while (0)
+#define PPC_IO_DPRINTF(fmt, args...) qemu_log_mask(CPU_LOG_IOPORT, ## __VA_ARGS__)
#else
#define PPC_IO_DPRINTF(fmt, args...) do { } while (0)
#endif