From ea3e9847408131abc840240bd61e892d28459452 Mon Sep 17 00:00:00 2001 From: Peter Crosthwaite Date: Thu, 18 Jun 2015 10:24:55 -0700 Subject: cpu-exec: Purge all uses of ENV_GET_CPU() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Andreas Färber --- linux-user/main.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'linux-user') diff --git a/linux-user/main.c b/linux-user/main.c index 2b4b276356..05914b11e4 100644 --- a/linux-user/main.c +++ b/linux-user/main.c @@ -280,7 +280,7 @@ void cpu_loop(CPUX86State *env) for(;;) { cpu_exec_start(cs); - trapnr = cpu_x86_exec(env); + trapnr = cpu_x86_exec(cs); cpu_exec_end(cs); switch(trapnr) { case 0x80: @@ -674,7 +674,7 @@ void cpu_loop(CPUARMState *env) for(;;) { cpu_exec_start(cs); - trapnr = cpu_arm_exec(env); + trapnr = cpu_arm_exec(cs); cpu_exec_end(cs); switch(trapnr) { case EXCP_UDEF: @@ -1005,7 +1005,7 @@ void cpu_loop(CPUARMState *env) for (;;) { cpu_exec_start(cs); - trapnr = cpu_arm_exec(env); + trapnr = cpu_arm_exec(cs); cpu_exec_end(cs); switch (trapnr) { @@ -1084,7 +1084,7 @@ void cpu_loop(CPUUniCore32State *env) for (;;) { cpu_exec_start(cs); - trapnr = uc32_cpu_exec(env); + trapnr = uc32_cpu_exec(cs); cpu_exec_end(cs); switch (trapnr) { case UC32_EXCP_PRIV: @@ -1285,7 +1285,7 @@ void cpu_loop (CPUSPARCState *env) while (1) { cpu_exec_start(cs); - trapnr = cpu_sparc_exec (env); + trapnr = cpu_sparc_exec(cs); cpu_exec_end(cs); /* Compute PSR before exposing state. */ @@ -1565,7 +1565,7 @@ void cpu_loop(CPUPPCState *env) for(;;) { cpu_exec_start(cs); - trapnr = cpu_ppc_exec(env); + trapnr = cpu_ppc_exec(cs); cpu_exec_end(cs); switch(trapnr) { case POWERPC_EXCP_NONE: @@ -2417,7 +2417,7 @@ void cpu_loop(CPUMIPSState *env) for(;;) { cpu_exec_start(cs); - trapnr = cpu_mips_exec(env); + trapnr = cpu_mips_exec(cs); cpu_exec_end(cs); switch(trapnr) { case EXCP_SYSCALL: @@ -2654,7 +2654,7 @@ void cpu_loop(CPUOpenRISCState *env) for (;;) { cpu_exec_start(cs); - trapnr = cpu_exec(env); + trapnr = cpu_openrisc_exec(cs); cpu_exec_end(cs); gdbsig = 0; @@ -2744,7 +2744,7 @@ void cpu_loop(CPUSH4State *env) while (1) { cpu_exec_start(cs); - trapnr = cpu_sh4_exec (env); + trapnr = cpu_sh4_exec(cs); cpu_exec_end(cs); switch (trapnr) { @@ -2806,7 +2806,7 @@ void cpu_loop(CPUCRISState *env) while (1) { cpu_exec_start(cs); - trapnr = cpu_cris_exec (env); + trapnr = cpu_cris_exec(cs); cpu_exec_end(cs); switch (trapnr) { case 0xaa: @@ -2867,7 +2867,7 @@ void cpu_loop(CPUMBState *env) while (1) { cpu_exec_start(cs); - trapnr = cpu_mb_exec (env); + trapnr = cpu_mb_exec(cs); cpu_exec_end(cs); switch (trapnr) { case 0xaa: @@ -2972,7 +2972,7 @@ void cpu_loop(CPUM68KState *env) for(;;) { cpu_exec_start(cs); - trapnr = cpu_m68k_exec(env); + trapnr = cpu_m68k_exec(cs); cpu_exec_end(cs); switch(trapnr) { case EXCP_ILLEGAL: @@ -3111,7 +3111,7 @@ void cpu_loop(CPUAlphaState *env) while (1) { cpu_exec_start(cs); - trapnr = cpu_alpha_exec (env); + trapnr = cpu_alpha_exec(cs); cpu_exec_end(cs); /* All of the traps imply a transition through PALcode, which @@ -3299,7 +3299,7 @@ void cpu_loop(CPUS390XState *env) while (1) { cpu_exec_start(cs); - trapnr = cpu_s390x_exec(env); + trapnr = cpu_s390x_exec(cs); cpu_exec_end(cs); switch (trapnr) { case EXCP_INTERRUPT: -- cgit v1.2.3