summaryrefslogtreecommitdiffstats
path: root/include/exec/gen-icount.h
diff options
context:
space:
mode:
authorAndreas Färber <afaerber@suse.de>2013-08-26 05:51:49 +0200
committerAndreas Färber <afaerber@suse.de>2014-03-13 19:20:46 +0100
commit28ecfd7a62fafe8f4f0b35a157005f4d13913043 (patch)
tree55fdec3773eae0d778f100667f467d837f18a124 /include/exec/gen-icount.h
parentefee734004c42ba185098086e5185d8a85ed02af (diff)
downloadhqemu-28ecfd7a62fafe8f4f0b35a157005f4d13913043.zip
hqemu-28ecfd7a62fafe8f4f0b35a157005f4d13913043.tar.gz
cpu: Move icount_decr field from CPU_COMMON to CPUState
Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'include/exec/gen-icount.h')
-rw-r--r--include/exec/gen-icount.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/exec/gen-icount.h b/include/exec/gen-icount.h
index f0dace3..da53395 100644
--- a/include/exec/gen-icount.h
+++ b/include/exec/gen-icount.h
@@ -26,13 +26,15 @@ static inline void gen_tb_start(void)
icount_label = gen_new_label();
count = tcg_temp_local_new_i32();
- tcg_gen_ld_i32(count, cpu_env, offsetof(CPUArchState, icount_decr.u32));
+ tcg_gen_ld_i32(count, cpu_env,
+ -ENV_OFFSET + offsetof(CPUState, icount_decr.u32));
/* This is a horrid hack to allow fixing up the value later. */
icount_arg = tcg_ctx.gen_opparam_ptr + 1;
tcg_gen_subi_i32(count, count, 0xdeadbeef);
tcg_gen_brcondi_i32(TCG_COND_LT, count, 0, icount_label);
- tcg_gen_st16_i32(count, cpu_env, offsetof(CPUArchState, icount_decr.u16.low));
+ tcg_gen_st16_i32(count, cpu_env,
+ -ENV_OFFSET + offsetof(CPUState, icount_decr.u16.low));
tcg_temp_free_i32(count);
}
OpenPOWER on IntegriCloud