From patchwork Thu Jul 9 13:24:02 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andreas_F=C3=A4rber?= X-Patchwork-Id: 493428 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 83AC71402B2 for ; Thu, 9 Jul 2015 23:32:05 +1000 (AEST) Received: from localhost ([::1]:39859 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZDBvn-0000fu-NW for incoming@patchwork.ozlabs.org; Thu, 09 Jul 2015 09:32:03 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45450) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZDBoV-0006P6-1p for qemu-devel@nongnu.org; Thu, 09 Jul 2015 09:24:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZDBoS-0002Br-H6 for qemu-devel@nongnu.org; Thu, 09 Jul 2015 09:24:30 -0400 Received: from cantor2.suse.de ([195.135.220.15]:45832 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZDBoS-0002An-B8 for qemu-devel@nongnu.org; Thu, 09 Jul 2015 09:24:28 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id CD22DAC9C; Thu, 9 Jul 2015 13:24:27 +0000 (UTC) From: =?UTF-8?q?Andreas=20F=C3=A4rber?= To: qemu-devel@nongnu.org Date: Thu, 9 Jul 2015 15:24:02 +0200 Message-Id: <1436448252-1916-13-git-send-email-afaerber@suse.de> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1436448252-1916-1-git-send-email-afaerber@suse.de> References: <1436448252-1916-1-git-send-email-afaerber@suse.de> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] X-Received-From: 195.135.220.15 Cc: Peter Crosthwaite , =?UTF-8?q?Andreas=20F=C3=A4rber?= , Peter Crosthwaite Subject: [Qemu-devel] [PULL v3 12/22] cpu: Add wrapper for the set_pc() hook X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Peter Crosthwaite Add a wrapper around the CPUClass::set_pc() hook. Signed-off-by: Peter Crosthwaite Signed-off-by: Andreas Färber --- include/qom/cpu.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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.