mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 07:13:54 -06:00
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>
This commit is contained in:
parent
4bad9e392e
commit
ea3e984740
21 changed files with 49 additions and 49 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue