qemu-patch-raspberry4/accel/tcg
Peter Maydell c8cf47a946 accel/tcg: Remove unnecessary check on icount_extra in cpu_loop_exec_tb()
In cpu_loop_exec_tb(), we decide whether to look for a TB with
exactly insns_left instructions in it using the condition
 (!cpu->icount_extra && insns_left > 0 && insns_left < tb->icount)

The check for icount_extra == 0 is unnecessary, because we just set
  insns_left = MIN(0xffff, cpu->icount_budget);
  icount_extra = icount_budget - insns_left;
and so icount_extra can only be non-zero if icount_budget > 0xffff
and insns_left == 0xffff. But in that case insns_left >= tb->icount
because 0xffff is much larger than TCG_MAX_INSNS, so the condition
will be false anyway.

Remove the unnecessary check, and instead assert:
 * that we are only going to execute a partial TB here if the
   icount budget has run out (ie icount_extra == 0)
 * that the number of insns we're going to execute does fit into
   the CF_COUNT_MASK

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20210725174405.24568-3-peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2021-07-26 06:56:03 -10:00
..
atomic_common.c.inc accel/tcg: Push trace info building into atomic_common.c.inc 2021-07-21 07:45:38 -10:00
atomic_template.h accel/tcg: Push trace info building into atomic_common.c.inc 2021-07-21 07:45:38 -10:00
cpu-exec-common.c Do not include cpu.h if it's not really necessary 2021-05-02 17:24:51 +02:00
cpu-exec.c accel/tcg: Remove unnecessary check on icount_extra in cpu_loop_exec_tb() 2021-07-26 06:56:03 -10:00
cputlb.c accel/tcg: Expand ATOMIC_MMU_LOOKUP_* 2021-07-21 07:45:38 -10:00
hmp.c monitor/tcg: move tcg hmp commands to accel/tcg, register them dynamically 2021-07-09 18:21:33 +02:00
internal.h accel/tcg: Merge tcg_exec_init into tcg_init_machine 2021-06-11 09:26:28 -07:00
meson.build monitor/tcg: move tcg hmp commands to accel/tcg, register them dynamically 2021-07-09 18:21:33 +02:00
plugin-gen.c plugins: Drop tcg_flags from struct qemu_plugin_dyn_cb 2021-06-19 08:51:11 -07:00
plugin-helpers.h accel/tcg: Add tcg call flags to plugins helpers 2021-06-19 08:51:11 -07:00
tb-context.h tcg: Move tb_phys_invalidate_count to tb_ctx 2021-07-09 09:38:33 -07:00
tb-hash.h accel/tcg: Keep TranslationBlock headers local to TCG 2021-05-26 15:33:59 -07:00
tcg-accel-ops-icount.c Do not include hw/boards.h if it's not really necessary 2021-05-02 17:24:51 +02:00
tcg-accel-ops-icount.h accel: replace struct CpusAccel with AccelOpsClass 2021-02-05 10:24:15 -10:00
tcg-accel-ops-mttcg.c accel/tcg: Precompute curr_cflags into cpu->tcg_cflags 2021-03-06 11:53:57 -08:00
tcg-accel-ops-mttcg.h accel: replace struct CpusAccel with AccelOpsClass 2021-02-05 10:24:15 -10:00
tcg-accel-ops-rr.c Do not include hw/boards.h if it's not really necessary 2021-05-02 17:24:51 +02:00
tcg-accel-ops-rr.h accel: replace struct CpusAccel with AccelOpsClass 2021-02-05 10:24:15 -10:00
tcg-accel-ops.c accel: add tcg module annotations 2021-07-09 18:21:33 +02:00
tcg-accel-ops.h accel/tcg: Precompute curr_cflags into cpu->tcg_cflags 2021-03-06 11:53:57 -08:00
tcg-all.c accel: add tcg module annotations 2021-07-09 18:21:33 +02:00
tcg-runtime-gvec.c accel/tcg: Use add/sub overflow routines in tcg-runtime-gvec.c 2021-05-16 07:13:51 -05:00
tcg-runtime.c accel/tcg: Move helper_lookup_tb_ptr to cpu-exec.c 2021-07-09 20:23:06 -07:00
tcg-runtime.h accel/tcg: Standardize atomic helpers on softmmu api 2021-07-21 07:45:38 -10:00
trace-events docs: fix references to docs/devel/tracing.rst 2021-06-02 06:51:09 +02:00
trace.h trace: switch position of headers to what Meson requires 2020-08-21 06:18:24 -04:00
translate-all.c accel/tcg: Record singlestep_enabled in tb->cflags 2021-07-21 07:47:05 -10:00
translator.c accel/tcg: Record singlestep_enabled in tb->cflags 2021-07-21 07:47:05 -10:00
user-exec-stub.c Do not include sysemu/sysemu.h if it's not really necessary 2021-05-02 17:24:50 +02:00
user-exec.c accel/tcg: Expand ATOMIC_MMU_LOOKUP_* 2021-07-21 07:45:38 -10:00