On 10 February 2015 at 06:34, Michael Tokarev <m...@tls.msk.ru> wrote: > From: Paolo Bonzini <pbonz...@redhat.com> > > All uses of TB inside cpu_exec are dominated by "tb = tb_find_fast(env)", > and there are no uses after the switch statement. So the assignment > is dead, as reported by Coverity. > > Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> > Signed-off-by: Michael Tokarev <m...@tls.msk.ru> > --- > cpu-exec.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/cpu-exec.c b/cpu-exec.c > index fa506e6..4ff1b23 100644 > --- a/cpu-exec.c > +++ b/cpu-exec.c > @@ -494,7 +494,6 @@ int cpu_exec(CPUArchState *env) > * interrupt_request) which we will handle > * next time around the loop. > */ > - tb = (TranslationBlock *)(next_tb & ~TB_EXIT_MASK); > next_tb = 0; > break; > case TB_EXIT_ICOUNT_EXPIRED:
True, I guess, but presumably this means we're doing unnecessary work in the next time round the loop re-finding the tb which we already had... (Also, why do we have a variable 'next_tb' which holds the address of the *previous* TB? :-) I think the documentation of the return value of tcg_qemu_tb_exec() is wrong too. Or I've misunderstood the code.) -- PMM