From mboxrd@z Thu Jan 1 00:00:00 1970 From: Glauber Costa Subject: [PATCH 10/10] remove arch-specific ifdefs from translate-all.c Date: Fri, 25 Apr 2008 00:23:10 -0300 Message-ID: <12090938253763-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> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel@lists.sourceforge.net, avi@qumranet.com To: qemu-devel@nongnu.org Return-path: In-Reply-To: <1209093821535-git-send-email-gcosta@redhat.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces@lists.sourceforge.net Errors-To: kvm-devel-bounces@lists.sourceforge.net List-Id: kvm.vger.kernel.org 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 ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone