qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PULL 12/22] cpu: Add wrapper for the set_pc() hook


From: Andreas Färber
Subject: [Qemu-devel] [PULL 12/22] cpu: Add wrapper for the set_pc() hook
Date: Tue, 7 Jul 2015 01:13:55 +0200

From: Peter Crosthwaite <address@hidden>

Add a wrapper around the CPUClass::set_pc() hook.

Signed-off-by: Peter Crosthwaite <address@hidden>
Signed-off-by: Andreas Färber <address@hidden>
---
 include/qom/cpu.h | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/include/qom/cpu.h b/include/qom/cpu.h
index 7db310e..5db1ea3 100644
--- a/include/qom/cpu.h
+++ b/include/qom/cpu.h
@@ -600,6 +600,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.
-- 
2.1.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]