From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50420) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZCFai-0005Fr-P8 for qemu-devel@nongnu.org; Mon, 06 Jul 2015 19:14:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZCFah-0007nG-FZ for qemu-devel@nongnu.org; Mon, 06 Jul 2015 19:14:24 -0400 Received: from cantor2.suse.de ([195.135.220.15]:44113 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZCFah-0007mF-8q for qemu-devel@nongnu.org; Mon, 06 Jul 2015 19:14:23 -0400 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Tue, 7 Jul 2015 01:13:55 +0200 Message-Id: <1436224445-19449-13-git-send-email-afaerber@suse.de> In-Reply-To: <1436224445-19449-1-git-send-email-afaerber@suse.de> References: <1436224445-19449-1-git-send-email-afaerber@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PULL 12/22] cpu: Add wrapper for the set_pc() hook List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Peter Crosthwaite , =?UTF-8?q?Andreas=20F=C3=A4rber?= , Peter Crosthwaite From: Peter Crosthwaite Add a wrapper around the CPUClass::set_pc() hook. Signed-off-by: Peter Crosthwaite Signed-off-by: Andreas F=C3=A4rber --- 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 *cp= u, vaddr addr, #endif =20 /** + * 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 =3D 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. --=20 2.1.4