summaryrefslogtreecommitdiff
path: root/cpus.c
diff options
context:
space:
mode:
authorPeter Crosthwaite <crosthwaitepeter@gmail.com>2015-06-18 10:24:55 -0700
committerAndreas Färber <afaerber@suse.de>2015-07-09 15:20:40 +0200
commitea3e9847408131abc840240bd61e892d28459452 (patch)
treec0406bdfc85a826a63430162127841fcd38373e7 /cpus.c
parent4bad9e392e788a218967167a38ce2ae7a32a6231 (diff)
cpu-exec: Purge all uses of ENV_GET_CPU()
Remove un-needed usages of ENV_GET_CPU() by converting the APIs to use CPUState pointers and retrieving the env_ptr as minimally needed. Scripted conversion for target-* change: for I in target-*/cpu.h; do sed -i \ 's/\(^int cpu_[^_]*_exec(\)[^ ][^ ]* \*s);$/\1CPUState *cpu);/' \ $I; done Signed-off-by: Peter Crosthwaite <crosthwaite.peter@gmail.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'cpus.c')
-rw-r--r--cpus.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/cpus.c b/cpus.c
index 24cac2eebf..b00a42379b 100644
--- a/cpus.c
+++ b/cpus.c
@@ -1359,7 +1359,6 @@ int vm_stop_force_state(RunState state)
static int tcg_cpu_exec(CPUState *cpu)
{
- CPUArchState *env = cpu->env_ptr;
int ret;
#ifdef CONFIG_PROFILER
int64_t ti;
@@ -1394,7 +1393,7 @@ static int tcg_cpu_exec(CPUState *cpu)
cpu->icount_decr.u16.low = decr;
cpu->icount_extra = count;
}
- ret = cpu_exec(env);
+ ret = cpu_exec(cpu);
#ifdef CONFIG_PROFILER
tcg_time += profile_getclock() - ti;
#endif