Commit 009a4356a7e912d911649ce5229ccffb1bc9e6b6
Committed by
Paul Brook
1 parent
39b6efc8
Add m68k_cpu_list()
This patch adds to m68k target the missing m68k_cpu_list(): $ ./m68k-softmmu/qemu-system-m68k -cpu ? m5206 m5208 cfv4e any Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Showing
2 changed files
with
12 additions
and
0 deletions
target-m68k/cpu.h
@@ -199,6 +199,8 @@ static inline int m68k_feature(CPUM68KState *env, int feature) | @@ -199,6 +199,8 @@ static inline int m68k_feature(CPUM68KState *env, int feature) | ||
199 | return (env->features & (1u << feature)) != 0; | 199 | return (env->features & (1u << feature)) != 0; |
200 | } | 200 | } |
201 | 201 | ||
202 | +void m68k_cpu_list(FILE *f, int (*cpu_fprintf)(FILE *f, const char *fmt, ...)); | ||
203 | + | ||
202 | void register_m68k_insns (CPUM68KState *env); | 204 | void register_m68k_insns (CPUM68KState *env); |
203 | 205 | ||
204 | #ifdef CONFIG_USER_ONLY | 206 | #ifdef CONFIG_USER_ONLY |
@@ -213,6 +215,7 @@ void register_m68k_insns (CPUM68KState *env); | @@ -213,6 +215,7 @@ void register_m68k_insns (CPUM68KState *env); | ||
213 | #define cpu_exec cpu_m68k_exec | 215 | #define cpu_exec cpu_m68k_exec |
214 | #define cpu_gen_code cpu_m68k_gen_code | 216 | #define cpu_gen_code cpu_m68k_gen_code |
215 | #define cpu_signal_handler cpu_m68k_signal_handler | 217 | #define cpu_signal_handler cpu_m68k_signal_handler |
218 | +#define cpu_list m68k_cpu_list | ||
216 | 219 | ||
217 | /* MMU modes definitions */ | 220 | /* MMU modes definitions */ |
218 | #define MMU_MODE0_SUFFIX _kernel | 221 | #define MMU_MODE0_SUFFIX _kernel |
target-m68k/helper.c
@@ -54,6 +54,15 @@ static m68k_def_t m68k_cpu_defs[] = { | @@ -54,6 +54,15 @@ static m68k_def_t m68k_cpu_defs[] = { | ||
54 | {NULL, 0}, | 54 | {NULL, 0}, |
55 | }; | 55 | }; |
56 | 56 | ||
57 | +void m68k_cpu_list(FILE *f, int (*cpu_fprintf)(FILE *f, const char *fmt, ...)) | ||
58 | +{ | ||
59 | + unsigned int i; | ||
60 | + | ||
61 | + for (i = 0; m68k_cpu_defs[i].name; i++) { | ||
62 | + (*cpu_fprintf)(f, "%s\n", m68k_cpu_defs[i].name); | ||
63 | + } | ||
64 | +} | ||
65 | + | ||
57 | static int fpu_gdb_get_reg(CPUState *env, uint8_t *mem_buf, int n) | 66 | static int fpu_gdb_get_reg(CPUState *env, uint8_t *mem_buf, int n) |
58 | { | 67 | { |
59 | if (n < 8) { | 68 | if (n < 8) { |