From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:50187) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TDdl7-0003P2-Pq for qemu-devel@nongnu.org; Mon, 17 Sep 2012 12:01:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TDdl3-0000Q1-1V for qemu-devel@nongnu.org; Mon, 17 Sep 2012 12:01:17 -0400 Received: from mail-pb0-f45.google.com ([209.85.160.45]:54240) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TDdl2-0000Hr-SU for qemu-devel@nongnu.org; Mon, 17 Sep 2012 12:01:12 -0400 Received: by mail-pb0-f45.google.com with SMTP id rp12so9799681pbb.4 for ; Mon, 17 Sep 2012 09:01:12 -0700 (PDT) Sender: Paolo Bonzini From: Paolo Bonzini Date: Mon, 17 Sep 2012 18:00:43 +0200 Message-Id: <1347897649-23236-5-git-send-email-pbonzini@redhat.com> In-Reply-To: <1347897649-23236-1-git-send-email-pbonzini@redhat.com> References: <1347897649-23236-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [RFC PATCH 04/10] tcg: change cpu_restore_state to return void List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org The return value is used nowhere. Signed-off-by: Paolo Bonzini --- exec-all.h | 4 ++-- translate-all.c | 9 ++++----- 2 file modificati, 6 inserzioni(+), 7 rimozioni(-) diff --git a/exec-all.h b/exec-all.h index dba9609..cecafa1 100644 --- a/exec-all.h +++ b/exec-all.h @@ -84,8 +84,8 @@ void restore_state_to_opc(CPUArchState *env, struct TranslationBlock *tb, void cpu_gen_init(void); int cpu_gen_code(CPUArchState *env, struct TranslationBlock *tb, int *gen_code_size_ptr); -int cpu_restore_state(struct TranslationBlock *tb, - CPUArchState *env, uintptr_t searched_pc); +void cpu_restore_state(struct TranslationBlock *tb, + CPUArchState *env, uintptr_t searched_pc); void QEMU_NORETURN cpu_resume_from_signal(CPUArchState *env1, void *puc); void QEMU_NORETURN cpu_io_recompile(CPUArchState *env, uintptr_t retaddr); TranslationBlock *tb_gen_code(CPUArchState *env, diff --git a/translate-all.c b/translate-all.c index 5bd2d37..f2f9036 100644 --- a/translate-all.c +++ b/translate-all.c @@ -108,8 +108,8 @@ int cpu_gen_code(CPUArchState *env, TranslationBlock *tb, int *gen_code_size_ptr /* The cpu state corresponding to 'searched_pc' is restored. */ -int cpu_restore_state(TranslationBlock *tb, - CPUArchState *env, uintptr_t searched_pc) +void cpu_restore_state(TranslationBlock *tb, + CPUArchState *env, uintptr_t searched_pc) { TCGContext *s = &tcg_ctx; int j; @@ -135,7 +135,7 @@ int cpu_restore_state(TranslationBlock *tb, /* find opc index corresponding to search_pc */ tc_ptr = (uintptr_t)tb->tc_ptr; if (searched_pc < tc_ptr) - return -1; + return; s->tb_next_offset = tb->tb_next_offset; #ifdef USE_DIRECT_JUMP @@ -147,7 +147,7 @@ int cpu_restore_state(TranslationBlock *tb, #endif j = tcg_gen_code_search_pc(s, (uint8_t *)tc_ptr, searched_pc - tc_ptr); if (j < 0) - return -1; + return; /* now find start of instruction before */ while (gen_opc_instr_start[j] == 0) j--; @@ -159,5 +159,4 @@ int cpu_restore_state(TranslationBlock *tb, s->restore_time += profile_getclock() - ti; s->restore_count++; #endif - return 0; } -- 1.7.12