No more hard-coded cpu models

This commit is contained in:
mio
2021-12-30 01:05:10 +01:00
parent cddc9cf2ed
commit 085ee07c73
7 changed files with 16 additions and 16 deletions

View File

@@ -164,14 +164,14 @@ MIPSCPU *cpu_mips_init(struct uc_struct *uc)
#ifdef TARGET_MIPS64
if (uc->cpu_model == INT_MAX) {
uc->cpu_model = 17; // R4000
uc->cpu_model = UC_CPU_MIPS64_R4000; // R4000
} else if (uc->cpu_model + UC_CPU_MIPS32_I7200 + 1 >= mips_defs_number ) {
free(cpu);
return NULL;
}
#else
if (uc->cpu_model == INT_MAX) {
uc->cpu_model = 10; // 74kf
uc->cpu_model = UC_CPU_MIPS32_74KF; // 74kf
} else if (uc->cpu_model >= mips_defs_number) {
free(cpu);
return NULL;