mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2024-10-19 23:28:24 +02: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
@ -537,6 +537,20 @@ static inline void cpu_unaligned_access(CPUState *cpu, vaddr addr,
|
|||||||
}
|
}
|
||||||
#endif
|
#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_reset_interrupt:
|
||||||
* @cpu: The CPU to clear the interrupt on.
|
* @cpu: The CPU to clear the interrupt on.
|
||||||
|
Loading…
Reference in New Issue
Block a user