Received: from eggs.gnu.org ([2001:4830:134:3::10]:49827) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VH92B-0004Wd-2W for qemu-devel@nongnu.org; Wed, 04 Sep 2013 05:06:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VH922-0007x5-LN for qemu-devel@nongnu.org; Wed, 04 Sep 2013 05:05:54 -0400 Received: from cantor2.suse.de ([195.135.220.15]:45453 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VH922-0007wR-5G for qemu-devel@nongnu.org; Wed, 04 Sep 2013 05:05:46 -0400 Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id BB768A538E for ; Wed, 4 Sep 2013 11:05:45 +0200 (CEST) From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Wed, 4 Sep 2013 11:05:01 +0200 Message-Id: <1378285521-3230-22-git-send-email-afaerber@suse.de> In-Reply-To: <1378285521-3230-1-git-send-email-afaerber@suse.de> References: <1378285521-3230-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] [RFC qom-cpu 21/41] translate-all: Change cpu_restore_state_from_tb() argument to CPUState List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Andreas=20F=C3=A4rber?= And normalize the argument order. Signed-off-by: Andreas F=C3=A4rber --- translate-all.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/translate-all.c b/translate-all.c index 5673420..0dd6a60 100644 --- a/translate-all.c +++ b/translate-all.c @@ -193,10 +193,10 @@ int cpu_gen_code(CPUArchState *env, TranslationBloc= k *tb, int *gen_code_size_ptr =20 /* The cpu state corresponding to 'searched_pc' is restored. */ -static int cpu_restore_state_from_tb(TranslationBlock *tb, CPUArchState = *env, +static int cpu_restore_state_from_tb(CPUState *cpu, TranslationBlock *tb= , uintptr_t searched_pc) { - CPUState *cpu =3D ENV_GET_CPU(env); + CPUArchState *env =3D cpu->env_ptr; TCGContext *s =3D &tcg_ctx; int j; uintptr_t tc_ptr; @@ -251,12 +251,11 @@ static int cpu_restore_state_from_tb(TranslationBlo= ck *tb, CPUArchState *env, =20 bool cpu_restore_state(CPUState *cpu, uintptr_t retaddr) { - CPUArchState *env =3D cpu->env_ptr; TranslationBlock *tb; =20 tb =3D tb_find_pc(retaddr); if (tb) { - cpu_restore_state_from_tb(tb, env, retaddr); + cpu_restore_state_from_tb(cpu, tb, retaddr); return true; } return false; @@ -1074,7 +1073,7 @@ void tb_invalidate_phys_page_range(tb_page_addr_t s= tart, tb_page_addr_t end, restore the CPU state */ =20 current_tb_modified =3D 1; - cpu_restore_state_from_tb(current_tb, env, cpu->mem_io_p= c); + cpu_restore_state_from_tb(cpu, current_tb, cpu->mem_io_p= c); cc->get_tb_cpu_state(cpu, ¤t_pc, ¤t_cs_base, ¤t_flags); } @@ -1195,7 +1194,7 @@ static void tb_invalidate_phys_page(tb_page_addr_t = addr, restore the CPU state */ =20 current_tb_modified =3D 1; - cpu_restore_state_from_tb(current_tb, env, pc); + cpu_restore_state_from_tb(cpu, current_tb, pc); cc->get_tb_cpu_state(cpu, ¤t_pc, ¤t_cs_base, ¤t_flags); } @@ -1395,7 +1394,7 @@ void tb_check_watchpoint(CPUArchState *env) cpu_abort(env, "check_watchpoint: could not find TB for pc=3D%p"= , (void *)cpu->mem_io_pc); } - cpu_restore_state_from_tb(tb, env, cpu->mem_io_pc); + cpu_restore_state_from_tb(cpu, tb, cpu->mem_io_pc); tb_phys_invalidate(tb, -1); } =20 @@ -1447,7 +1446,7 @@ void cpu_io_recompile(CPUArchState *env, uintptr_t = retaddr) (void *)retaddr); } n =3D cpu->icount_decr.u16.low + tb->icount; - cpu_restore_state_from_tb(tb, env, retaddr); + cpu_restore_state_from_tb(cpu, tb, retaddr); /* Calculate how many instructions had been executed before the faul= t occurred. */ n =3D n - cpu->icount_decr.u16.low; --=20 1.8.1.4