mirror of
https://github.com/yuzu-mirror/unicorn.git
synced 2026-04-18 12:53:50 +00:00
pc: Don't use QEMUMachine anymore
Now that we have a DEFINE_PC_MACHINE helper macro that just requires an initialization function, it is trivial to convert them to register a QOM machine class directly, instead of using QEMUMachine. Backports commit 865906f7fdadd2732441ab158787f81f6a212bfe from qemu
This commit is contained in:
parent
b65a3ece3b
commit
12acb995fa
3 changed files with 36 additions and 23 deletions
|
|
@ -1336,8 +1336,6 @@ static bool x86_stop_interrupt(int intno)
|
|||
}
|
||||
}
|
||||
|
||||
void pc_machine_init(struct uc_struct *uc);
|
||||
|
||||
static bool x86_insn_hook_validate(uint32_t insn_enum)
|
||||
{
|
||||
//for x86 we can only hook IN, OUT, and SYSCALL
|
||||
|
|
@ -1349,6 +1347,8 @@ static bool x86_insn_hook_validate(uint32_t insn_enum)
|
|||
return true;
|
||||
}
|
||||
|
||||
void pc_machine_init_v2_2(struct uc_struct *uc);
|
||||
|
||||
DEFAULT_VISIBILITY
|
||||
void x86_uc_init(struct uc_struct* uc)
|
||||
{
|
||||
|
|
@ -1357,7 +1357,7 @@ void x86_uc_init(struct uc_struct* uc)
|
|||
register_accel_types(uc);
|
||||
pc_machine_register_types(uc);
|
||||
x86_cpu_register_types(uc);
|
||||
pc_machine_init(uc); // pc_piix
|
||||
pc_machine_init_v2_2(uc); // pc_piix
|
||||
uc->reg_read = x86_reg_read;
|
||||
uc->reg_write = x86_reg_write;
|
||||
uc->reg_reset = x86_reg_reset;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue