summaryrefslogtreecommitdiffstats
path: root/include/qom
diff options
context:
space:
mode:
authorPeter Crosthwaite <crosthwaitepeter@gmail.com>2015-06-23 20:19:20 -0700
committerAndreas Färber <afaerber@suse.de>2015-07-09 15:20:40 +0200
commit2991b8904730d663f12ad42e35798ecc22fe151c (patch)
tree3ef6d8f2536f4bdb35b1a8d5b9123b94f8ee03aa /include/qom
parentea3e9847408131abc840240bd61e892d28459452 (diff)
downloadhqemu-2991b8904730d663f12ad42e35798ecc22fe151c.zip
hqemu-2991b8904730d663f12ad42e35798ecc22fe151c.tar.gz
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>
Diffstat (limited to 'include/qom')
-rw-r--r--include/qom/cpu.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/qom/cpu.h b/include/qom/cpu.h
index 3993042..b120574 100644
--- a/include/qom/cpu.h
+++ b/include/qom/cpu.h
@@ -602,6 +602,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.
* @mask: The interrupt mask to clear.
OpenPOWER on IntegriCloud