mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 17:23:56 -06:00
accel/tcg: Avoid load of icount_decr if unused
With CF_NOIRQ and without !CF_USE_ICOUNT, the load isn't used. Avoid emitting it. Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
36e9aab3c5
commit
f47a90dacc
1 changed files with 7 additions and 4 deletions
|
@ -49,12 +49,15 @@ bool translator_io_start(DisasContextBase *db)
|
||||||
|
|
||||||
static TCGOp *gen_tb_start(uint32_t cflags)
|
static TCGOp *gen_tb_start(uint32_t cflags)
|
||||||
{
|
{
|
||||||
TCGv_i32 count = tcg_temp_new_i32();
|
TCGv_i32 count = NULL;
|
||||||
TCGOp *icount_start_insn = NULL;
|
TCGOp *icount_start_insn = NULL;
|
||||||
|
|
||||||
tcg_gen_ld_i32(count, cpu_env,
|
if ((cflags & CF_USE_ICOUNT) || !(cflags & CF_NOIRQ)) {
|
||||||
offsetof(ArchCPU, neg.icount_decr.u32) -
|
count = tcg_temp_new_i32();
|
||||||
offsetof(ArchCPU, env));
|
tcg_gen_ld_i32(count, cpu_env,
|
||||||
|
offsetof(ArchCPU, neg.icount_decr.u32) -
|
||||||
|
offsetof(ArchCPU, env));
|
||||||
|
}
|
||||||
|
|
||||||
if (cflags & CF_USE_ICOUNT) {
|
if (cflags & CF_USE_ICOUNT) {
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue