From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55288) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZPZ5Y-0001hu-EW for qemu-devel@nongnu.org; Wed, 12 Aug 2015 12:41:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZPZ5X-0008AG-J5 for qemu-devel@nongnu.org; Wed, 12 Aug 2015 12:41:16 -0400 Received: from mail-wi0-x235.google.com ([2a00:1450:400c:c05::235]:38581) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZPZ5X-00089v-Ch for qemu-devel@nongnu.org; Wed, 12 Aug 2015 12:41:15 -0400 Received: by wicja10 with SMTP id ja10so34692768wic.1 for ; Wed, 12 Aug 2015 09:41:14 -0700 (PDT) Sender: Paolo Bonzini From: Paolo Bonzini Date: Wed, 12 Aug 2015 18:40:57 +0200 Message-Id: <1439397664-70734-6-git-send-email-pbonzini@redhat.com> In-Reply-To: <1439397664-70734-1-git-send-email-pbonzini@redhat.com> References: <1439397664-70734-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PATCH 05/10] cpu-exec: elide more icount code if CONFIG_USER_ONLY List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: mttcg@greensocs.com, fred.konrad@greensocs.com Signed-off-by: Paolo Bonzini --- cpu-exec.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cpu-exec.c b/cpu-exec.c index 599e64d..bde5fd1 100644 --- a/cpu-exec.c +++ b/cpu-exec.c @@ -228,6 +228,7 @@ static inline tcg_target_ulong cpu_tb_exec(CPUState *cpu, uint8_t *tb_ptr) return next_tb; } +#if defined(CONFIG_SOFTMMU) /* Execute the code without caching the generated code. An interpreter could be used if available. */ static void cpu_exec_nocache(CPUState *cpu, int max_cycles, @@ -251,6 +252,7 @@ static void cpu_exec_nocache(CPUState *cpu, int max_cycles, tb_phys_invalidate(tb, -1); tb_free(tb); } +#endif static TranslationBlock *tb_find_slow(CPUState *cpu, target_ulong pc, @@ -523,6 +525,9 @@ int cpu_exec(CPUState *cpu) case TB_EXIT_ICOUNT_EXPIRED: { /* Instruction counter expired. */ +#ifdef CONFIG_USER_ONLY + abort(); +#else int insns_left = cpu->icount_decr.u32; if (cpu->icount_extra && insns_left >= 0) { /* Refill decrementer and continue execution. */ @@ -542,6 +547,7 @@ int cpu_exec(CPUState *cpu) cpu_loop_exit(cpu); } break; +#endif } default: break; -- 1.8.3.1