diff options
Diffstat (limited to 'target/moxie')
-rw-r--r-- | target/moxie/cpu.h | 3 | ||||
-rw-r--r-- | target/moxie/helper.c | 2 | ||||
-rw-r--r-- | target/moxie/translate.c | 22 |
3 files changed, 13 insertions, 14 deletions
diff --git a/target/moxie/cpu.h b/target/moxie/cpu.h index 080df4ee6f..f3b6d83ae7 100644 --- a/target/moxie/cpu.h +++ b/target/moxie/cpu.h @@ -112,8 +112,7 @@ static inline MoxieCPU *moxie_env_get_cpu(CPUMoxieState *env) #define ENV_OFFSET offsetof(MoxieCPU, env) void moxie_cpu_do_interrupt(CPUState *cs); -void moxie_cpu_dump_state(CPUState *cpu, FILE *f, - fprintf_function cpu_fprintf, int flags); +void moxie_cpu_dump_state(CPUState *cpu, FILE *f, int flags); hwaddr moxie_cpu_get_phys_page_debug(CPUState *cpu, vaddr addr); void moxie_translate_init(void); int cpu_moxie_signal_handler(int host_signum, void *pinfo, diff --git a/target/moxie/helper.c b/target/moxie/helper.c index f3d8ee7d6b..287a45232c 100644 --- a/target/moxie/helper.c +++ b/target/moxie/helper.c @@ -101,7 +101,7 @@ int moxie_cpu_handle_mmu_fault(CPUState *cs, vaddr address, int size, cs->exception_index = 0xaa; cpu->env.debug1 = address; - cpu_dump_state(cs, stderr, fprintf, 0); + cpu_dump_state(cs, stderr, 0); return 1; } diff --git a/target/moxie/translate.c b/target/moxie/translate.c index 68ca223e22..dd055c4ca5 100644 --- a/target/moxie/translate.c +++ b/target/moxie/translate.c @@ -28,6 +28,7 @@ #include "disas/disas.h" #include "tcg-op.h" #include "exec/cpu_ldst.h" +#include "qemu/qemu-print.h" #include "exec/helper-proto.h" #include "exec/helper-gen.h" @@ -69,24 +70,23 @@ static int extract_branch_offset(int opcode) return (((signed short)((opcode & ((1 << 10) - 1)) << 6)) >> 6) << 1; } -void moxie_cpu_dump_state(CPUState *cs, FILE *f, fprintf_function cpu_fprintf, - int flags) +void moxie_cpu_dump_state(CPUState *cs, FILE *f, int flags) { MoxieCPU *cpu = MOXIE_CPU(cs); CPUMoxieState *env = &cpu->env; int i; - cpu_fprintf(f, "pc=0x%08x\n", env->pc); - cpu_fprintf(f, "$fp=0x%08x $sp=0x%08x $r0=0x%08x $r1=0x%08x\n", - env->gregs[0], env->gregs[1], env->gregs[2], env->gregs[3]); + qemu_fprintf(f, "pc=0x%08x\n", env->pc); + qemu_fprintf(f, "$fp=0x%08x $sp=0x%08x $r0=0x%08x $r1=0x%08x\n", + env->gregs[0], env->gregs[1], env->gregs[2], env->gregs[3]); for (i = 4; i < 16; i += 4) { - cpu_fprintf(f, "$r%d=0x%08x $r%d=0x%08x $r%d=0x%08x $r%d=0x%08x\n", - i-2, env->gregs[i], i-1, env->gregs[i + 1], - i, env->gregs[i + 2], i+1, env->gregs[i + 3]); + qemu_fprintf(f, "$r%d=0x%08x $r%d=0x%08x $r%d=0x%08x $r%d=0x%08x\n", + i - 2, env->gregs[i], i - 1, env->gregs[i + 1], + i, env->gregs[i + 2], i + 1, env->gregs[i + 3]); } for (i = 4; i < 16; i += 4) { - cpu_fprintf(f, "sr%d=0x%08x sr%d=0x%08x sr%d=0x%08x sr%d=0x%08x\n", - i-2, env->sregs[i], i-1, env->sregs[i + 1], - i, env->sregs[i + 2], i+1, env->sregs[i + 3]); + qemu_fprintf(f, "sr%d=0x%08x sr%d=0x%08x sr%d=0x%08x sr%d=0x%08x\n", + i - 2, env->sregs[i], i - 1, env->sregs[i + 1], + i, env->sregs[i + 2], i + 1, env->sregs[i + 3]); } } |