From: Peter Crosthwaite Date: Wed, 24 Jun 2015 03:19:20 +0000 (-0700) Subject: cpu: Add wrapper for the set_pc() hook X-Git-Tag: qemu-xen-4.7.0-rc1~178^2~10 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=2991b8904730d663f12ad42e35798ecc22fe151c;p=qemu-xen.git cpu: Add wrapper for the set_pc() hook Add a wrapper around the CPUClass::set_pc() hook. Signed-off-by: Peter Crosthwaite Signed-off-by: Andreas Färber --- diff --git a/include/qom/cpu.h b/include/qom/cpu.h index 3993042667..b120574df0 100644 --- a/include/qom/cpu.h +++ b/include/qom/cpu.h @@ -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.