diff options
Diffstat (limited to 'target/alpha')
| -rw-r--r-- | target/alpha/cpu.c | 15 | ||||
| -rw-r--r-- | target/alpha/cpu.h | 5 | ||||
| -rw-r--r-- | target/alpha/helper.c | 24 | ||||
| -rw-r--r-- | target/alpha/translate.c | 4 |
4 files changed, 21 insertions, 27 deletions
diff --git a/target/alpha/cpu.c b/target/alpha/cpu.c index 1fd95d6c0f..ad3588a44a 100644 --- a/target/alpha/cpu.c +++ b/target/alpha/cpu.c @@ -21,6 +21,7 @@ #include "qemu/osdep.h" #include "qapi/error.h" +#include "qemu/qemu-print.h" #include "cpu.h" #include "qemu-common.h" #include "exec/exec-all.h" @@ -74,23 +75,17 @@ static void alpha_cpu_realizefn(DeviceState *dev, Error **errp) static void alpha_cpu_list_entry(gpointer data, gpointer user_data) { ObjectClass *oc = data; - CPUListState *s = user_data; - (*s->cpu_fprintf)(s->file, " %s\n", - object_class_get_name(oc)); + qemu_printf(" %s\n", object_class_get_name(oc)); } -void alpha_cpu_list(FILE *f, fprintf_function cpu_fprintf) +void alpha_cpu_list(void) { - CPUListState s = { - .file = f, - .cpu_fprintf = cpu_fprintf, - }; GSList *list; list = object_class_get_list_sorted(TYPE_ALPHA_CPU, false); - (*cpu_fprintf)(f, "Available CPUs:\n"); - g_slist_foreach(list, alpha_cpu_list_entry, &s); + qemu_printf("Available CPUs:\n"); + g_slist_foreach(list, alpha_cpu_list_entry, NULL); g_slist_free(list); } diff --git a/target/alpha/cpu.h b/target/alpha/cpu.h index 7b50be785d..63bf3618ff 100644 --- a/target/alpha/cpu.h +++ b/target/alpha/cpu.h @@ -311,8 +311,7 @@ extern const struct VMStateDescription vmstate_alpha_cpu; void alpha_cpu_do_interrupt(CPUState *cpu); bool alpha_cpu_exec_interrupt(CPUState *cpu, int int_req); -void alpha_cpu_dump_state(CPUState *cs, FILE *f, fprintf_function cpu_fprintf, - int flags); +void alpha_cpu_dump_state(CPUState *cs, FILE *f, int flags); hwaddr alpha_cpu_get_phys_page_debug(CPUState *cpu, vaddr addr); int alpha_cpu_gdb_read_register(CPUState *cpu, uint8_t *buf, int reg); int alpha_cpu_gdb_write_register(CPUState *cpu, uint8_t *buf, int reg); @@ -470,7 +469,7 @@ void alpha_translate_init(void); #define ALPHA_CPU_TYPE_NAME(model) model ALPHA_CPU_TYPE_SUFFIX #define CPU_RESOLVING_TYPE TYPE_ALPHA_CPU -void alpha_cpu_list(FILE *f, fprintf_function cpu_fprintf); +void alpha_cpu_list(void); /* you can call this signal handler from your SIGBUS and SIGSEGV signal handlers to inform the virtual CPU of exceptions. non zero is returned if the signal was handled by the virtual CPU. */ diff --git a/target/alpha/helper.c b/target/alpha/helper.c index 57e2c212b3..7201576aae 100644 --- a/target/alpha/helper.c +++ b/target/alpha/helper.c @@ -23,6 +23,7 @@ #include "exec/exec-all.h" #include "fpu/softfloat.h" #include "exec/helper-proto.h" +#include "qemu/qemu-print.h" #define CONVERT_BIT(X, SRC, DST) \ @@ -426,8 +427,7 @@ bool alpha_cpu_exec_interrupt(CPUState *cs, int interrupt_request) return false; } -void alpha_cpu_dump_state(CPUState *cs, FILE *f, fprintf_function cpu_fprintf, - int flags) +void alpha_cpu_dump_state(CPUState *cs, FILE *f, int flags) { static const char *linux_reg_names[] = { "v0 ", "t0 ", "t1 ", "t2 ", "t3 ", "t4 ", "t5 ", "t6 ", @@ -439,24 +439,24 @@ void alpha_cpu_dump_state(CPUState *cs, FILE *f, fprintf_function cpu_fprintf, CPUAlphaState *env = &cpu->env; int i; - cpu_fprintf(f, " PC " TARGET_FMT_lx " PS %02x\n", - env->pc, extract32(env->flags, ENV_FLAG_PS_SHIFT, 8)); + qemu_fprintf(f, " PC " TARGET_FMT_lx " PS %02x\n", + env->pc, extract32(env->flags, ENV_FLAG_PS_SHIFT, 8)); for (i = 0; i < 31; i++) { - cpu_fprintf(f, "IR%02d %s " TARGET_FMT_lx "%c", i, - linux_reg_names[i], cpu_alpha_load_gr(env, i), - (i % 3) == 2 ? '\n' : ' '); + qemu_fprintf(f, "IR%02d %s " TARGET_FMT_lx "%c", i, + linux_reg_names[i], cpu_alpha_load_gr(env, i), + (i % 3) == 2 ? '\n' : ' '); } - cpu_fprintf(f, "lock_a " TARGET_FMT_lx " lock_v " TARGET_FMT_lx "\n", - env->lock_addr, env->lock_value); + qemu_fprintf(f, "lock_a " TARGET_FMT_lx " lock_v " TARGET_FMT_lx "\n", + env->lock_addr, env->lock_value); if (flags & CPU_DUMP_FPU) { for (i = 0; i < 31; i++) { - cpu_fprintf(f, "FIR%02d %016" PRIx64 "%c", i, env->fir[i], - (i % 3) == 2 ? '\n' : ' '); + qemu_fprintf(f, "FIR%02d %016" PRIx64 "%c", i, env->fir[i], + (i % 3) == 2 ? '\n' : ' '); } } - cpu_fprintf(f, "\n"); + qemu_fprintf(f, "\n"); } /* This should only be called from translate, via gen_excp. diff --git a/target/alpha/translate.c b/target/alpha/translate.c index 9d8f9b3eea..2c9cccf6c1 100644 --- a/target/alpha/translate.c +++ b/target/alpha/translate.c @@ -3049,10 +3049,10 @@ static const TranslatorOps alpha_tr_ops = { .disas_log = alpha_tr_disas_log, }; -void gen_intermediate_code(CPUState *cpu, TranslationBlock *tb) +void gen_intermediate_code(CPUState *cpu, TranslationBlock *tb, int max_insns) { DisasContext dc; - translator_loop(&alpha_tr_ops, &dc.base, cpu, tb); + translator_loop(&alpha_tr_ops, &dc.base, cpu, tb, max_insns); } void restore_state_to_opc(CPUAlphaState *env, TranslationBlock *tb, |