The return value is used nowhere.
Signed-off-by: Paolo Bonzini <[email protected]>
---
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