aboutsummaryrefslogtreecommitdiff
path: root/target/nios2
diff options
context:
space:
mode:
Diffstat (limited to 'target/nios2')
-rw-r--r--target/nios2/cpu.h3
-rw-r--r--target/nios2/helper.c2
-rw-r--r--target/nios2/translate.c24
3 files changed, 14 insertions, 15 deletions
diff --git a/target/nios2/cpu.h b/target/nios2/cpu.h
index 6fa993bb0d..4e8eb7d2ca 100644
--- a/target/nios2/cpu.h
+++ b/target/nios2/cpu.h
@@ -213,8 +213,7 @@ void nios2_tcg_init(void);
void nios2_cpu_do_interrupt(CPUState *cs);
int cpu_nios2_signal_handler(int host_signum, void *pinfo, void *puc);
void dump_mmu(CPUNios2State *env);
-void nios2_cpu_dump_state(CPUState *cpu, FILE *f, fprintf_function cpu_fprintf,
- int flags);
+void nios2_cpu_dump_state(CPUState *cpu, FILE *f, int flags);
hwaddr nios2_cpu_get_phys_page_debug(CPUState *cpu, vaddr addr);
void nios2_cpu_do_unaligned_access(CPUState *cpu, vaddr addr,
MMUAccessType access_type,
diff --git a/target/nios2/helper.c b/target/nios2/helper.c
index a8b8ec662a..a633fa03ee 100644
--- a/target/nios2/helper.c
+++ b/target/nios2/helper.c
@@ -42,7 +42,7 @@ int nios2_cpu_handle_mmu_fault(CPUState *cs, vaddr address, int size,
cs->exception_index = 0xaa;
/* Page 0x1000 is kuser helper */
if (address < 0x1000 || address >= 0x2000) {
- cpu_dump_state(cs, stderr, fprintf, 0);
+ cpu_dump_state(cs, stderr, 0);
}
return 1;
}
diff --git a/target/nios2/translate.c b/target/nios2/translate.c
index 7fa03ed05a..f0bbf78a32 100644
--- a/target/nios2/translate.c
+++ b/target/nios2/translate.c
@@ -31,6 +31,7 @@
#include "exec/log.h"
#include "exec/cpu_ldst.h"
#include "exec/translator.h"
+#include "qemu/qemu-print.h"
/* is_jmp field values */
#define DISAS_JUMP DISAS_TARGET_0 /* only pc was modified dynamically */
@@ -914,33 +915,32 @@ void gen_intermediate_code(CPUState *cs, TranslationBlock *tb)
#endif
}
-void nios2_cpu_dump_state(CPUState *cs, FILE *f, fprintf_function cpu_fprintf,
- int flags)
+void nios2_cpu_dump_state(CPUState *cs, FILE *f, int flags)
{
Nios2CPU *cpu = NIOS2_CPU(cs);
CPUNios2State *env = &cpu->env;
int i;
- if (!env || !f) {
+ if (!env) {
return;
}
- cpu_fprintf(f, "IN: PC=%x %s\n",
- env->regs[R_PC], lookup_symbol(env->regs[R_PC]));
+ qemu_fprintf(f, "IN: PC=%x %s\n",
+ env->regs[R_PC], lookup_symbol(env->regs[R_PC]));
for (i = 0; i < NUM_CORE_REGS; i++) {
- cpu_fprintf(f, "%9s=%8.8x ", regnames[i], env->regs[i]);
+ qemu_fprintf(f, "%9s=%8.8x ", regnames[i], env->regs[i]);
if ((i + 1) % 4 == 0) {
- cpu_fprintf(f, "\n");
+ qemu_fprintf(f, "\n");
}
}
#if !defined(CONFIG_USER_ONLY)
- cpu_fprintf(f, " mmu write: VPN=%05X PID %02X TLBACC %08X\n",
- env->mmu.pteaddr_wr & CR_PTEADDR_VPN_MASK,
- (env->mmu.tlbmisc_wr & CR_TLBMISC_PID_MASK) >> 4,
- env->mmu.tlbacc_wr);
+ qemu_fprintf(f, " mmu write: VPN=%05X PID %02X TLBACC %08X\n",
+ env->mmu.pteaddr_wr & CR_PTEADDR_VPN_MASK,
+ (env->mmu.tlbmisc_wr & CR_TLBMISC_PID_MASK) >> 4,
+ env->mmu.tlbacc_wr);
#endif
- cpu_fprintf(f, "\n\n");
+ qemu_fprintf(f, "\n\n");
}
void nios2_tcg_init(void)