Revision fb7729e2 target-mips/translate.c

b/target-mips/translate.c
28 28
#define GEN_HELPER 1
29 29
#include "helper.h"
30 30

  
31
//#define MIPS_DEBUG_DISAS
31
#define MIPS_DEBUG_DISAS 0
32 32
//#define MIPS_DEBUG_SIGN_EXTENSIONS
33 33

  
34 34
/* MIPS major opcodes */
......
566 566
      "f16", "f17", "f18", "f19", "f20", "f21", "f22", "f23",
567 567
      "f24", "f25", "f26", "f27", "f28", "f29", "f30", "f31", };
568 568

  
569
#ifdef MIPS_DEBUG_DISAS
570
#define MIPS_DEBUG(fmt, ...)                         \
571
        qemu_log_mask(CPU_LOG_TB_IN_ASM,                \
572
                       TARGET_FMT_lx ": %08x " fmt "\n", \
573
                       ctx->pc, ctx->opcode , ## __VA_ARGS__)
574
#define LOG_DISAS(...) qemu_log_mask(CPU_LOG_TB_IN_ASM, ## __VA_ARGS__)
575
#else
576
#define MIPS_DEBUG(fmt, ...) do { } while(0)
577
#define LOG_DISAS(...) do { } while (0)
578
#endif
569
#define MIPS_DEBUG(fmt, ...)                                                  \
570
    do {                                                                      \
571
        if (MIPS_DEBUG_DISAS) {                                               \
572
            qemu_log_mask(CPU_LOG_TB_IN_ASM,                                  \
573
                          TARGET_FMT_lx ": %08x " fmt "\n",                   \
574
                          ctx->pc, ctx->opcode , ## __VA_ARGS__);             \
575
        }                                                                     \
576
    } while (0)
577

  
578
#define LOG_DISAS(...)                                                        \
579
    do {                                                                      \
580
        if (MIPS_DEBUG_DISAS) {                                               \
581
            qemu_log_mask(CPU_LOG_TB_IN_ASM, ## __VA_ARGS__);                 \
582
        }                                                                     \
583
    } while (0)
579 584

  
580 585
#define MIPS_INVAL(op)                                                        \
581
do {                                                                          \
582 586
    MIPS_DEBUG("Invalid %s %03x %03x %03x", op, ctx->opcode >> 26,            \
583
               ctx->opcode & 0x3F, ((ctx->opcode >> 16) & 0x1F));             \
584
} while (0)
587
               ctx->opcode & 0x3F, ((ctx->opcode >> 16) & 0x1F))
585 588

  
586 589
/* General purpose registers moves. */
587 590
static inline void gen_load_gpr (TCGv t, int reg)

Also available in: Unified diff