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:
Peter Crosthwaite
2015-07-09 15:20:40 +02:00
committed by Andreas Färber
parent ea3e984740
commit 2991b89047
+14
View File
@@ -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.