mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-01-03 17:25:30 +00:00
hw/mips/mips_r4k: Fix initialization of MIPS target CPUs
MIPS emulation is now possible after this basic fix. Still a few kinks to work out, but at least we hit the translation loop.
This commit is contained in:
parent
fa8f566635
commit
48d98a76e7
|
@ -22,17 +22,10 @@
|
||||||
#include "hw/boards.h"
|
#include "hw/boards.h"
|
||||||
#include "exec/address-spaces.h"
|
#include "exec/address-spaces.h"
|
||||||
|
|
||||||
|
|
||||||
static int mips_r4k_init(struct uc_struct *uc, MachineState *machine)
|
static int mips_r4k_init(struct uc_struct *uc, MachineState *machine)
|
||||||
{
|
{
|
||||||
#ifdef TARGET_MIPS64
|
uc->cpu = cpu_create(uc, machine->cpu_type);
|
||||||
const char *cpu_model = MIPS_CPU_TYPE_NAME("R4000");
|
|
||||||
#else
|
|
||||||
const char *cpu_model = MIPS_CPU_TYPE_NAME("24Kf");
|
|
||||||
#endif
|
|
||||||
const char *cpu_type = parse_cpu_model(uc, cpu_model);
|
|
||||||
|
|
||||||
uc->cpu = cpu_create(uc, cpu_type);
|
|
||||||
if (uc->cpu == NULL) {
|
if (uc->cpu == NULL) {
|
||||||
fprintf(stderr, "Unable to find CPU definition\n");
|
fprintf(stderr, "Unable to find CPU definition\n");
|
||||||
return -1;
|
return -1;
|
||||||
|
|
Loading…
Reference in a new issue