From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JpEcc-0006po-14 for qemu-devel@nongnu.org; Thu, 24 Apr 2008 23:29:14 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JpEca-0006nn-EP for qemu-devel@nongnu.org; Thu, 24 Apr 2008 23:29:13 -0400 Received: from [199.232.76.173] (port=42096 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JpEca-0006nc-9I for qemu-devel@nongnu.org; Thu, 24 Apr 2008 23:29:12 -0400 Received: from mx1.redhat.com ([66.187.233.31]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JpEcZ-0000u4-UH for qemu-devel@nongnu.org; Thu, 24 Apr 2008 23:29:12 -0400 From: Glauber Costa Date: Fri, 25 Apr 2008 00:23:10 -0300 Message-Id: <12090938253763-git-send-email-gcosta@redhat.com> In-Reply-To: <1209093821535-git-send-email-gcosta@redhat.com> References: <12090937903925-git-send-email-gcosta@redhat.com> <12090937962588-git-send-email-gcosta@redhat.com> <12090937991633-git-send-email-gcosta@redhat.com> <12090938023558-git-send-email-gcosta@redhat.com> <12090938052239-git-send-email-gcosta@redhat.com> <12090938091281-git-send-email-gcosta@redhat.com> <12090938123024-git-send-email-gcosta@redhat.com> <12090938153388-git-send-email-gcosta@redhat.com> <12090938183381-git-send-email-gcosta@redhat.com> <1209093821535-git-send-email-gcosta@redhat.com> Subject: [Qemu-devel] [PATCH 10/10] remove arch-specific ifdefs from translate-all.c Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kvm-devel@lists.sourceforge.net As the current state of matters, all architectures call a function with the same name and signature for updating the pc. Remove the ifdefs, leading to a cleaner code --- translate-all.c | 19 +------------------ 1 files changed, 1 insertions(+), 18 deletions(-) diff --git a/translate-all.c b/translate-all.c index 3afb656..83056d5 100644 --- a/translate-all.c +++ b/translate-all.c @@ -193,25 +193,8 @@ int cpu_restore_state(TranslationBlock *tb, /* now find start of instruction before */ while (gen_opc_instr_start[j] == 0) j--; -#if defined(TARGET_I386) + gen_pc_load(env, tb, searched_pc, j, puc); -#elif defined(TARGET_ARM) - gen_pc_load(env, tb, searched_pc, j, puc); -#elif defined(TARGET_SPARC) - gen_pc_load(env, tb, searched_pc, j, puc); -#elif defined(TARGET_PPC) - gen_pc_load(env, tb, searched_pc, j, puc); -#elif defined(TARGET_M68K) - gen_pc_load(env, tb, searched_pc, j, puc); -#elif defined(TARGET_MIPS) - gen_pc_load(env, tb, searched_pc, j, puc); -#elif defined(TARGET_ALPHA) - gen_pc_load(env, tb, searched_pc, j, puc); -#elif defined(TARGET_SH4) - gen_pc_load(env, tb, searched_pc, j, puc); -#elif defined(TARGET_CRIS) - gen_pc_load(env, tb, searched_pc, j, puc); -#endif #ifdef CONFIG_PROFILER dyngen_restore_time += profile_getclock() - ti; -- 1.5.0.6