mirror of
https://github.com/yuzu-mirror/unicorn.git
synced 2026-04-21 06:13:54 +00:00
cpu: Add wrapper for the set_pc() hook
Add a wrapper around the CPUClass::set_pc() hook. Backports commit 2991b8904730d663f12ad42e35798ecc22fe151c from qemu
This commit is contained in:
parent
e51f8c9f6f
commit
6279dfc113
1 changed files with 14 additions and 0 deletions
|
|
@ -537,6 +537,20 @@ static inline void cpu_unaligned_access(CPUState *cpu, vaddr addr,
|
|||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* cpu_set_pc:
|
||||
* @cpu: The CPU to set the program counter for.
|
||||
* @addr: Program counter value.
|
||||
*
|
||||
* Sets the program counter for a CPU.
|
||||
*/
|
||||
static inline void cpu_set_pc(CPUState *cpu, vaddr addr)
|
||||
{
|
||||
CPUClass *cc = CPU_GET_CLASS(cpu->uc, cpu);
|
||||
|
||||
cc->set_pc(cpu, addr);
|
||||
}
|
||||
|
||||
/**
|
||||
* cpu_reset_interrupt:
|
||||
* @cpu: The CPU to clear the interrupt on.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue