mirror of https://github.com/xemu-project/xemu.git
cpu: Add wrapper for the set_pc() hook
Add a wrapper around the CPUClass::set_pc() hook. Signed-off-by: Peter Crosthwaite <crosthwaite.peter@gmail.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
This commit is contained in:
parent
ea3e984740
commit
2991b89047
|
@ -601,6 +601,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);
|
||||
|
||||
cc->set_pc(cpu, addr);
|
||||
}
|
||||
|
||||
/**
|
||||
* cpu_reset_interrupt:
|
||||
* @cpu: The CPU to clear the interrupt on.
|
||||
|
|
Loading…
Reference in New Issue