global s/loglevel & X/qemu_loglevel_mask(X)/ (Eduardo Habkost)
authoraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>
Thu, 15 Jan 2009 22:36:53 +0000 (22:36 +0000)
committeraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>
Thu, 15 Jan 2009 22:36:53 +0000 (22:36 +0000)
These are references to 'loglevel' that aren't on a simple 'if (loglevel &
X) qemu_log()' statement.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6340 c046a42c-6fe2-441c-8c8c-71466251a162

17 files changed:
cpu-exec.c
hw/ppc_prep.c
target-alpha/translate.c
target-arm/translate.c
target-cris/translate.c
target-i386/op_helper.c
target-i386/translate.c
target-m68k/translate.c
target-mips/op_helper.c
target-mips/translate.c
target-ppc/translate.c
target-sh4/helper.c
target-sh4/translate.c
target-sparc/op_helper.c
target-sparc/translate.c
tcg/tcg.c
translate-all.c

index 77516257b36694209d1031cbde93ea5b4ab9f9f4..f7be38df5042de7602c9a7e7177107c8968974cc 100644 (file)
@@ -532,7 +532,7 @@ int cpu_exec(CPUState *env1)
                     }
                 }
 #ifdef DEBUG_EXEC
-                if ((loglevel & CPU_LOG_TB_CPU)) {
+                if (qemu_loglevel_mask(CPU_LOG_TB_CPU)) {
                     /* restore flags in standard format */
                     regs_to_env();
 #if defined(TARGET_I386)
index 506391c8e467471940f5839928d54474edd01396..1d61cc9ce8a24d269f5208e11e9e6d42a4db6c8e 100644 (file)
@@ -52,7 +52,7 @@
 #if defined (HARD_DEBUG_PPC_IO)
 #define PPC_IO_DPRINTF(fmt, args...)                     \
 do {                                                     \
-    if (loglevel & CPU_LOG_IOPORT) {                     \
+    if (qemu_loglevel_mask(CPU_LOG_IOPORT)) {            \
         qemu_log("%s: " fmt, __func__ , ##args); \
     } else {                                             \
         printf("%s : " fmt, __func__ , ##args);          \
index 9fa3ea01ee41d4b9f401c1a5cdc15cc951f2401d..3affb219836160125c50b83e9013927803abe0b1 100644 (file)
@@ -2442,7 +2442,7 @@ static always_inline void gen_intermediate_code_internal (CPUState *env,
     }
 #if defined ALPHA_DEBUG_DISAS
     log_cpu_state_mask(CPU_LOG_TB_CPU, env, 0);
-    if (loglevel & CPU_LOG_TB_IN_ASM) {
+    if (qemu_loglevel_mask(CPU_LOG_TB_IN_ASM)) {
         qemu_log("IN: %s\n", lookup_symbol(pc_start));
         log_target_disas(pc_start, ctx.pc - pc_start, 1);
         qemu_log("\n");
index a0e7282d0025055aa270fb0b0e408e2e812d1640..3cef02115574f4c6ac0f4cf0c6c9d2a82b7d8472 100644 (file)
@@ -8870,7 +8870,7 @@ done_generating:
     *gen_opc_ptr = INDEX_op_end;
 
 #ifdef DEBUG_DISAS
-    if (loglevel & CPU_LOG_TB_IN_ASM) {
+    if (qemu_loglevel_mask(CPU_LOG_TB_IN_ASM)) {
         qemu_log("----------------\n");
         qemu_log("IN: %s\n", lookup_symbol(pc_start));
         log_target_disas(pc_start, dc->pc - pc_start, env->thumb);
index 8bd2136677f6598f20cf98957ea4348a62659965..2ff6fe2d325cf2f1604dfa7f0c1c09b33172a409 100644 (file)
@@ -3035,7 +3035,7 @@ cris_decoder(DisasContext *dc)
        unsigned int insn_len = 2;
        int i;
 
-       if (unlikely(loglevel & CPU_LOG_TB_OP))
+       if (unlikely(qemu_loglevel_mask(CPU_LOG_TB_OP)))
                tcg_gen_debug_insn_start(dc->pc);
 
        /* Load a halfword onto the instruction register.  */
@@ -3179,7 +3179,7 @@ gen_intermediate_code_internal(CPUState *env, TranslationBlock *tb,
 
        dc->cpustate_changed = 0;
 
-       if (loglevel & CPU_LOG_TB_IN_ASM) {
+       if (qemu_loglevel_mask(CPU_LOG_TB_IN_ASM)) {
                qemu_log(
                        "srch=%d pc=%x %x flg=%llx bt=%x ds=%u ccs=%x\n"
                        "pid=%x usp=%x\n"
@@ -3331,7 +3331,7 @@ gen_intermediate_code_internal(CPUState *env, TranslationBlock *tb,
 
 #ifdef DEBUG_DISAS
 #if !DISAS_CRIS
-       if (loglevel & CPU_LOG_TB_IN_ASM) {
+       if (qemu_loglevel_mask(CPU_LOG_TB_IN_ASM)) {
                log_target_disas(pc_start, dc->pc - pc_start, 0);
                qemu_log("\nisize=%d osize=%zd\n",
                        dc->pc - pc_start, gen_opc_ptr - gen_opc_buf);
index 8ebc63b08582705cdb8d97ca448b6ff092de153b..dcbc361a0207e4888170bfbbea1e8446647e5e5d 100644 (file)
@@ -1206,7 +1206,7 @@ void do_interrupt_user(int intno, int is_int, int error_code,
 void do_interrupt(int intno, int is_int, int error_code,
                   target_ulong next_eip, int is_hw)
 {
-    if (loglevel & CPU_LOG_INT) {
+    if (qemu_loglevel_mask(CPU_LOG_INT)) {
         if ((env->cr[0] & CR0_PE_MASK)) {
             static int count;
             qemu_log("%6d: v=%02x e=%04x i=%d cpl=%d IP=%04x:" TARGET_FMT_lx " pc=" TARGET_FMT_lx " SP=%04x:" TARGET_FMT_lx,
index d7f97dc2078393f4e4e4f978dcade77ced34cfdd..4b894fd70883156b43f0bcdc71380a80af8e1cfe 100644 (file)
@@ -3961,7 +3961,7 @@ static target_ulong disas_insn(DisasContext *s, target_ulong pc_start)
     target_ulong next_eip, tval;
     int rex_w, rex_r;
 
-    if (unlikely(loglevel & CPU_LOG_TB_OP))
+    if (unlikely(qemu_loglevel_mask(CPU_LOG_TB_OP)))
         tcg_gen_debug_insn_start(pc_start);
     s->pc = pc_start;
     prefixes = 0;
@@ -7676,7 +7676,7 @@ static inline void gen_intermediate_code_internal(CPUState *env,
 
 #ifdef DEBUG_DISAS
     log_cpu_state_mask(CPU_LOG_TB_CPU, env, X86_DUMP_CCOP);
-    if (loglevel & CPU_LOG_TB_IN_ASM) {
+    if (qemu_loglevel_mask(CPU_LOG_TB_IN_ASM)) {
         int disas_flags;
         qemu_log("----------------\n");
         qemu_log("IN: %s\n", lookup_symbol(pc_start));
@@ -7712,7 +7712,7 @@ void gen_pc_load(CPUState *env, TranslationBlock *tb,
 {
     int cc_op;
 #ifdef DEBUG_DISAS
-    if (loglevel & CPU_LOG_TB_OP) {
+    if (qemu_loglevel_mask(CPU_LOG_TB_OP)) {
         int i;
         qemu_log("RESTORE:\n");
         for(i = 0;i <= pc_pos; i++) {
index 6f379fa9bc224d37a8b355f94e9581bfd06baa86..ef976cf5637512be7d758c0d824f43c92689fa28 100644 (file)
@@ -3063,7 +3063,7 @@ gen_intermediate_code_internal(CPUState *env, TranslationBlock *tb,
     *gen_opc_ptr = INDEX_op_end;
 
 #ifdef DEBUG_DISAS
-    if (loglevel & CPU_LOG_TB_IN_ASM) {
+    if (qemu_loglevel_mask(CPU_LOG_TB_IN_ASM)) {
         qemu_log("----------------\n");
         qemu_log("IN: %s\n", lookup_symbol(pc_start));
         log_target_disas(pc_start, dc->pc - pc_start, 0);
index 6b0600a33b6c05fed91acf2570dc087c5cc2a325..50f5e671a9332d3c769f09a95d5eb9b7fb3e6e8b 100644 (file)
@@ -1194,7 +1194,7 @@ void do_mtc0_status (target_ulong t0)
     old = env->CP0_Status;
     env->CP0_Status = (env->CP0_Status & ~mask) | val;
     compute_hflags(env);
-    if (loglevel & CPU_LOG_EXEC)
+    if (qemu_loglevel_mask(CPU_LOG_EXEC))
         do_mtc0_status_debug(old, val);
     cpu_mips_update_irq(env);
 }
@@ -1705,7 +1705,7 @@ target_ulong do_ei (void)
 
 static void debug_pre_eret (void)
 {
-    if (loglevel & CPU_LOG_EXEC) {
+    if (qemu_loglevel_mask(CPU_LOG_EXEC)) {
         qemu_log("ERET: PC " TARGET_FMT_lx " EPC " TARGET_FMT_lx,
                 env->active_tc.PC, env->CP0_EPC);
         if (env->CP0_Status & (1 << CP0St_ERL))
@@ -1718,7 +1718,7 @@ static void debug_pre_eret (void)
 
 static void debug_post_eret (void)
 {
-    if (loglevel & CPU_LOG_EXEC) {
+    if (qemu_loglevel_mask(CPU_LOG_EXEC)) {
         qemu_log("  =>  PC " TARGET_FMT_lx " EPC " TARGET_FMT_lx,
                 env->active_tc.PC, env->CP0_EPC);
         if (env->CP0_Status & (1 << CP0St_ERL))
index a3bbd742bc3d1fdbab0ec3c8e76666ee698e9775..692ea6dc0714f322a55d7dec3be089dd4ebfdb70 100644 (file)
@@ -8289,7 +8289,7 @@ done_generating:
     }
 #ifdef DEBUG_DISAS
     LOG_DISAS("\n");
-    if (loglevel & CPU_LOG_TB_IN_ASM) {
+    if (qemu_loglevel_mask(CPU_LOG_TB_IN_ASM)) {
         qemu_log("IN: %s\n", lookup_symbol(pc_start));
         log_target_disas(pc_start, ctx.pc - pc_start, 0);
         qemu_log("\n");
index be3954c1893a5fe1cfdd085cff189441f9741f6e..1bbe7f5afd1f440030b80980d82f3aaf8b526d0f 100644 (file)
@@ -8334,7 +8334,7 @@ static always_inline void gen_intermediate_code_internal (CPUState *env,
 #if defined(DEBUG_DISAS)
     qemu_log_mask(CPU_LOG_TB_CPU, "---------------- excp: %04x\n", ctx.exception);
     log_cpu_state_mask(CPU_LOG_TB_CPU, env, 0);
-    if (loglevel & CPU_LOG_TB_IN_ASM) {
+    if (qemu_loglevel_mask(CPU_LOG_TB_IN_ASM)) {
         int flags;
         flags = env->bfd_mach;
         flags |= ctx.le_mode << 16;
index d4e0a842a8cc83c8e7a5c3f1402f9d52a6719590..7f5430abcb8cc7669618bd42c3cdcbef401b8971 100644 (file)
@@ -105,7 +105,7 @@ void do_interrupt(CPUState * env)
        }
     }
 
-    if (loglevel & CPU_LOG_INT) {
+    if (qemu_loglevel_mask(CPU_LOG_INT)) {
        const char *expname;
        switch (env->exception_index) {
        case 0x0e0:
index 0f48bf130f27cde4bd2cf5f6b5a095bcdd585b19..9137e3801462a8ede7f069004bf1a15098aaf022 100644 (file)
@@ -1937,7 +1937,7 @@ gen_intermediate_code_internal(CPUState * env, TranslationBlock * tb,
 #ifdef SH4_DEBUG_DISAS
     qemu_log_mask(CPU_LOG_TB_IN_ASM, "\n");
 #endif
-    if (loglevel & CPU_LOG_TB_IN_ASM) {
+    if (qemu_loglevel_mask(CPU_LOG_TB_IN_ASM)) {
        qemu_log("IN:\n");      /* , lookup_symbol(pc_start)); */
        log_target_disas(pc_start, ctx.pc - pc_start, 0);
        qemu_log("\n");
index 0ba4caec536bfced95ecc75b4eb619c8e6f2c6d8..2f88f4c1e39f88abd21b5e95f9a46c08cfd3077a 100644 (file)
@@ -2811,7 +2811,7 @@ void do_interrupt(CPUState *env)
     int intno = env->exception_index;
 
 #ifdef DEBUG_PCALL
-    if (loglevel & CPU_LOG_INT) {
+    if (qemu_loglevel_mask(CPU_LOG_INT)) {
         static int count;
         const char *name;
 
@@ -2942,7 +2942,7 @@ void do_interrupt(CPUState *env)
     int cwp, intno = env->exception_index;
 
 #ifdef DEBUG_PCALL
-    if (loglevel & CPU_LOG_INT) {
+    if (qemu_loglevel_mask(CPU_LOG_INT)) {
         static int count;
         const char *name;
 
index 8b380e8299a39af7c7475d6abc8aa7df72266b75..53997ae9366a5c28ddfa6a973fc1e8c81d40bafd 100644 (file)
@@ -1933,7 +1933,7 @@ static void disas_sparc_insn(DisasContext * dc)
 {
     unsigned int insn, opc, rs1, rs2, rd;
 
-    if (unlikely(loglevel & CPU_LOG_TB_OP))
+    if (unlikely(qemu_loglevel_mask(CPU_LOG_TB_OP)))
         tcg_gen_debug_insn_start(dc->pc);
     insn = ldl_code(dc->pc);
     opc = GET_FIELD(insn, 0, 1);
@@ -4905,7 +4905,7 @@ static inline void gen_intermediate_code_internal(TranslationBlock * tb,
         tb->icount = num_insns;
     }
 #ifdef DEBUG_DISAS
-    if (loglevel & CPU_LOG_TB_IN_ASM) {
+    if (qemu_loglevel_mask(CPU_LOG_TB_IN_ASM)) {
         qemu_log("--------------\n");
         qemu_log("IN: %s\n", lookup_symbol(pc_start));
         log_target_disas(pc_start, last_pc + 4 - pc_start, 0);
index 39254a6d4533b9351a9dcdbbf2a9bac4db112f4a..8fe3658099aab16f60060952f2de73ec4dbf73f6 100644 (file)
--- a/tcg/tcg.c
+++ b/tcg/tcg.c
@@ -1878,7 +1878,7 @@ static inline int tcg_gen_code_common(TCGContext *s, uint8_t *gen_code_buf,
     const TCGArg *args;
 
 #ifdef DEBUG_DISAS
-    if (unlikely(loglevel & CPU_LOG_TB_OP)) {
+    if (unlikely(qemu_loglevel_mask(CPU_LOG_TB_OP))) {
         qemu_log("OP:\n");
         tcg_dump_ops(s, logfile);
         qemu_log("\n");
@@ -1894,7 +1894,7 @@ static inline int tcg_gen_code_common(TCGContext *s, uint8_t *gen_code_buf,
 #endif
 
 #ifdef DEBUG_DISAS
-    if (unlikely(loglevel & CPU_LOG_TB_OP_OPT)) {
+    if (unlikely(qemu_loglevel_mask(CPU_LOG_TB_OP_OPT))) {
         qemu_log("OP after la:\n");
         tcg_dump_ops(s, logfile);
         qemu_log("\n");
index 454ea7aeacf40eaf6da9c06cbdc0f945e11da378..4bdf2c99d7b6fdeff120dc22a5a8eeb275e2000a 100644 (file)
@@ -127,7 +127,7 @@ int cpu_gen_code(CPUState *env, TranslationBlock *tb, int *gen_code_size_ptr)
 #endif
 
 #ifdef DEBUG_DISAS
-    if (loglevel & CPU_LOG_TB_OUT_ASM) {
+    if (qemu_loglevel_mask(CPU_LOG_TB_OUT_ASM)) {
         qemu_log("OUT: [size=%d]\n", *gen_code_size_ptr);
         log_disas(tb->tc_ptr, *gen_code_size_ptr);
         qemu_log("\n");