mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-02-25 08:56:57 +00:00
qom/cpu: move cpu_model null check to cpu_class_by_name()
and clean every implementation. Backports commit 8301ea444abb49f7b7fb939b09c1e23b22977f30 from qemu
This commit is contained in:
parent
059f238f11
commit
0cb01a52bd
|
@ -203,7 +203,12 @@ static bool cpu_common_debug_check_watchpoint(CPUState *cpu, CPUWatchpoint *wp)
|
|||
|
||||
ObjectClass *cpu_class_by_name(struct uc_struct *uc, const char *typename, const char *cpu_model)
|
||||
{
|
||||
CPUClass *cc = CPU_CLASS(uc, object_class_by_name(uc, typename));
|
||||
CPUClass *cc;
|
||||
|
||||
if (!cpu_model) {
|
||||
return NULL;
|
||||
}
|
||||
cc = CPU_CLASS(uc, object_class_by_name(uc, typename));
|
||||
|
||||
return cc->class_by_name(uc, cpu_model);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue