]> Git Repo - qemu.git/commitdiff
cpu-exec: Change cpu_loop_exit() argument to CPUState
authorAndreas Färber <[email protected]>
Tue, 27 Aug 2013 15:52:12 +0000 (17:52 +0200)
committerAndreas Färber <[email protected]>
Thu, 13 Mar 2014 18:20:47 +0000 (19:20 +0100)
Signed-off-by: Andreas Färber <[email protected]>
28 files changed:
cpu-exec.c
exec.c
include/exec/exec-all.h
target-alpha/helper.c
target-alpha/mem_helper.c
target-arm/op_helper.c
target-cris/op_helper.c
target-i386/excp_helper.c
target-i386/misc_helper.c
target-i386/seg_helper.c
target-i386/svm_helper.c
target-lm32/op_helper.c
target-m68k/op_helper.c
target-microblaze/op_helper.c
target-mips/op_helper.c
target-moxie/helper.c
target-openrisc/exception.c
target-openrisc/mmu_helper.c
target-ppc/excp_helper.c
target-s390x/cc_helper.c
target-s390x/mem_helper.c
target-s390x/misc_helper.c
target-sh4/op_helper.c
target-sparc/helper.c
target-sparc/ldst_helper.c
target-unicore32/op_helper.c
target-xtensa/op_helper.c
user-exec.c

index d7c21d35e50e466f76a0b0be8961ab659ab32c33..192620f37b50a6821e802e6b5c0f73c7f9412ef5 100644 (file)
 #include "qemu/atomic.h"
 #include "sysemu/qtest.h"
 
-void cpu_loop_exit(CPUArchState *env)
+void cpu_loop_exit(CPUState *cpu)
 {
-    CPUState *cpu = ENV_GET_CPU(env);
-
     cpu->current_tb = NULL;
     siglongjmp(cpu->jmp_env, 1);
 }
@@ -325,7 +323,7 @@ int cpu_exec(CPUArchState *env)
                     if (interrupt_request & CPU_INTERRUPT_DEBUG) {
                         cpu->interrupt_request &= ~CPU_INTERRUPT_DEBUG;
                         cpu->exception_index = EXCP_DEBUG;
-                        cpu_loop_exit(env);
+                        cpu_loop_exit(cpu);
                     }
 #if defined(TARGET_ARM) || defined(TARGET_SPARC) || defined(TARGET_MIPS) || \
     defined(TARGET_PPC) || defined(TARGET_ALPHA) || defined(TARGET_CRIS) || \
@@ -334,7 +332,7 @@ int cpu_exec(CPUArchState *env)
                         cpu->interrupt_request &= ~CPU_INTERRUPT_HALT;
                         cpu->halted = 1;
                         cpu->exception_index = EXCP_HLT;
-                        cpu_loop_exit(env);
+                        cpu_loop_exit(cpu);
                     }
 #endif
 #if defined(TARGET_I386)
@@ -349,7 +347,7 @@ int cpu_exec(CPUArchState *env)
                                                           0);
                             do_cpu_init(x86_cpu);
                             cpu->exception_index = EXCP_HALTED;
-                            cpu_loop_exit(env);
+                            cpu_loop_exit(cpu);
                     } else if (interrupt_request & CPU_INTERRUPT_SIPI) {
                             do_cpu_sipi(x86_cpu);
                     } else if (env->hflags2 & HF2_GIF_MASK) {
@@ -601,7 +599,7 @@ int cpu_exec(CPUArchState *env)
                 if (unlikely(cpu->exit_request)) {
                     cpu->exit_request = 0;
                     cpu->exception_index = EXCP_INTERRUPT;
-                    cpu_loop_exit(env);
+                    cpu_loop_exit(cpu);
                 }
                 spin_lock(&tcg_ctx.tb_ctx.tb_lock);
                 tb = tb_find_fast(env);
@@ -672,7 +670,7 @@ int cpu_exec(CPUArchState *env)
                             }
                             cpu->exception_index = EXCP_INTERRUPT;
                             next_tb = 0;
-                            cpu_loop_exit(env);
+                            cpu_loop_exit(cpu);
                         }
                         break;
                     }
diff --git a/exec.c b/exec.c
index 6d9e13a0a6b4abedca98580d24323e3daff93e5c..5f7c47244fadfae9df574675e558b68ff2a29540 100644 (file)
--- a/exec.c
+++ b/exec.c
@@ -1608,7 +1608,7 @@ static void check_watchpoint(int offset, int len_mask, int flags)
                 tb_check_watchpoint(env);
                 if (wp->flags & BP_STOP_BEFORE_ACCESS) {
                     cpu->exception_index = EXCP_DEBUG;
-                    cpu_loop_exit(env);
+                    cpu_loop_exit(cpu);
                 } else {
                     cpu_get_tb_cpu_state(env, &pc, &cs_base, &cpu_flags);
                     tb_gen_code(env, pc, cs_base, cpu_flags, 1);
index c8c3a1198bd026d638a5b84de214996ddb002496..80277eac32daca3decd5a2e7ca99dc2e277e8b6d 100644 (file)
@@ -89,7 +89,7 @@ TranslationBlock *tb_gen_code(CPUArchState *env,
                               target_ulong pc, target_ulong cs_base, int flags,
                               int cflags);
 void cpu_exec_init(CPUArchState *env);
-void QEMU_NORETURN cpu_loop_exit(CPUArchState *env1);
+void QEMU_NORETURN cpu_loop_exit(CPUState *cpu);
 int page_unprotect(target_ulong address, uintptr_t pc, void *puc);
 void tb_invalidate_phys_page_range(tb_page_addr_t start, tb_page_addr_t end,
                                    int is_cpu_write_access);
index 14f59a27a8c595136beb3156011280175e95b682..45f73e0ea21e5ceb9f6f751b6be95073aa6db9a9 100644 (file)
@@ -513,7 +513,7 @@ void QEMU_NORETURN helper_excp(CPUAlphaState *env, int excp, int error)
 
     cs->exception_index = excp;
     env->error_code = error;
-    cpu_loop_exit(env);
+    cpu_loop_exit(cs);
 }
 
 /* This may be called from any of the helpers to set up EXCEPTION_INDEX.  */
@@ -528,7 +528,7 @@ void QEMU_NORETURN dynamic_excp(CPUAlphaState *env, uintptr_t retaddr,
     if (retaddr) {
         cpu_restore_state(env, retaddr);
     }
-    cpu_loop_exit(env);
+    cpu_loop_exit(cs);
 }
 
 void QEMU_NORETURN arith_excp(CPUAlphaState *env, uintptr_t retaddr,
index 3447f828ed627422bd10e73b569d5432d2255e6c..1957c566b9046c30991ef360e78d2d5bfae4018b 100644 (file)
@@ -116,7 +116,7 @@ static void do_unaligned_access(CPUAlphaState *env, target_ulong addr,
     env->trap_arg2 = (insn >> 21) & 31;         /* dest regno */
     cs->exception_index = EXCP_UNALIGN;
     env->error_code = 0;
-    cpu_loop_exit(env);
+    cpu_loop_exit(cs);
 }
 
 void alpha_cpu_unassigned_access(CPUState *cs, hwaddr addr,
@@ -166,7 +166,7 @@ void tlb_fill(CPUState *cs, target_ulong addr, int is_write,
             cpu_restore_state(env, retaddr);
         }
         /* Exception index and error code are already set */
-        cpu_loop_exit(env);
+        cpu_loop_exit(cs);
     }
 }
 #endif /* CONFIG_USER_ONLY */
index 932f5e218d61d4e71be4f60d5a5c48403759a1b6..f8e535e8ced0ceaa0761a927c1167bfdd4b91bfc 100644 (file)
@@ -28,7 +28,7 @@ static void raise_exception(CPUARMState *env, int tt)
     CPUState *cs = CPU(cpu);
 
     cs->exception_index = tt;
-    cpu_loop_exit(env);
+    cpu_loop_exit(cs);
 }
 
 uint32_t HELPER(neon_tbl)(CPUARMState *env, uint32_t ireg, uint32_t def,
@@ -229,7 +229,7 @@ void HELPER(wfi)(CPUARMState *env)
 
     cs->exception_index = EXCP_HLT;
     cs->halted = 1;
-    cpu_loop_exit(env);
+    cpu_loop_exit(cs);
 }
 
 void HELPER(wfe)(CPUARMState *env)
@@ -240,7 +240,7 @@ void HELPER(wfe)(CPUARMState *env)
      * level loop
      */
     cs->exception_index = EXCP_YIELD;
-    cpu_loop_exit(env);
+    cpu_loop_exit(cs);
 }
 
 void HELPER(exception)(CPUARMState *env, uint32_t excp)
@@ -248,7 +248,7 @@ void HELPER(exception)(CPUARMState *env, uint32_t excp)
     CPUState *cs = CPU(arm_env_get_cpu(env));
 
     cs->exception_index = excp;
-    cpu_loop_exit(env);
+    cpu_loop_exit(cs);
 }
 
 uint32_t HELPER(cpsr_read)(CPUARMState *env)
index 68a5caa2a7988dbe544a54edcf0380b29ee52e4e..d80b6c966dad6b208857db9915321d22c055cea0 100644 (file)
@@ -72,7 +72,7 @@ void tlb_fill(CPUState *cs, target_ulong addr, int is_write, int mmu_idx,
                 helper_top_evaluate_flags(env);
             }
         }
-        cpu_loop_exit(env);
+        cpu_loop_exit(cs);
     }
 }
 
@@ -83,7 +83,7 @@ void helper_raise_exception(CPUCRISState *env, uint32_t index)
     CPUState *cs = CPU(cris_env_get_cpu(env));
 
     cs->exception_index = index;
-    cpu_loop_exit(env);
+    cpu_loop_exit(cs);
 }
 
 void helper_tlb_flush_pid(CPUCRISState *env, uint32_t pid)
index ec76eba760d173eb672681f610da9e8260a3b8f6..f337fd20fb6340f3a3bd9a6c9e697518d4c36c97 100644 (file)
@@ -108,7 +108,7 @@ static void QEMU_NORETURN raise_interrupt2(CPUX86State *env, int intno,
     env->error_code = error_code;
     env->exception_is_int = is_int;
     env->exception_next_eip = env->eip + next_eip_addend;
-    cpu_loop_exit(env);
+    cpu_loop_exit(cs);
 }
 
 /* shortcuts to generate exceptions */
index 582ad34ffe1f424eba1ef1a1604a668c109251e1..8c6b9bfce28ddf56fa87b5d5b3a41453d6603c19 100644 (file)
@@ -569,11 +569,10 @@ void helper_rdmsr(CPUX86State *env)
 static void do_pause(X86CPU *cpu)
 {
     CPUState *cs = CPU(cpu);
-    CPUX86State *env = &cpu->env;
 
     /* Just let another CPU run.  */
     cs->exception_index = EXCP_INTERRUPT;
-    cpu_loop_exit(env);
+    cpu_loop_exit(cs);
 }
 
 static void do_hlt(X86CPU *cpu)
@@ -584,7 +583,7 @@ static void do_hlt(X86CPU *cpu)
     env->hflags &= ~HF_INHIBIT_IRQ_MASK; /* needed if sti is just before */
     cs->halted = 1;
     cs->exception_index = EXCP_HLT;
-    cpu_loop_exit(env);
+    cpu_loop_exit(cs);
 }
 
 void helper_hlt(CPUX86State *env, int next_eip_addend)
@@ -642,5 +641,5 @@ void helper_debug(CPUX86State *env)
     CPUState *cs = CPU(x86_env_get_cpu(env));
 
     cs->exception_index = EXCP_DEBUG;
-    cpu_loop_exit(env);
+    cpu_loop_exit(cs);
 }
index c8fd572d99d02bd74b395fdf200a91c60e78f0c7..4e134e4338b54612423db1ab783fefafda4763f4 100644 (file)
@@ -939,7 +939,7 @@ void helper_syscall(CPUX86State *env, int next_eip_addend)
 
     cs->exception_index = EXCP_SYSCALL;
     env->exception_next_eip = env->eip + next_eip_addend;
-    cpu_loop_exit(env);
+    cpu_loop_exit(cs);
 }
 #else
 void helper_syscall(CPUX86State *env, int next_eip_addend)
index 5e0504d7f0fae30b54fcc70234f124c963ceacd3..de2c2eebe0b396684861c0361b5fc347448144e5 100644 (file)
@@ -334,7 +334,7 @@ void helper_vmrun(CPUX86State *env, int aflag, int next_eip_addend)
             env->exception_is_int = 0;
             env->exception_next_eip = env->eip;
             qemu_log_mask(CPU_LOG_TB_IN_ASM, "NMI");
-            cpu_loop_exit(env);
+            cpu_loop_exit(cs);
             break;
         case SVM_EVTINJ_TYPE_EXEPT:
             cs->exception_index = vector;
@@ -342,7 +342,7 @@ void helper_vmrun(CPUX86State *env, int aflag, int next_eip_addend)
             env->exception_is_int = 0;
             env->exception_next_eip = -1;
             qemu_log_mask(CPU_LOG_TB_IN_ASM, "EXEPT");
-            cpu_loop_exit(env);
+            cpu_loop_exit(cs);
             break;
         case SVM_EVTINJ_TYPE_SOFT:
             cs->exception_index = vector;
@@ -350,7 +350,7 @@ void helper_vmrun(CPUX86State *env, int aflag, int next_eip_addend)
             env->exception_is_int = 1;
             env->exception_next_eip = env->eip;
             qemu_log_mask(CPU_LOG_TB_IN_ASM, "SOFT");
-            cpu_loop_exit(env);
+            cpu_loop_exit(cs);
             break;
         }
         qemu_log_mask(CPU_LOG_TB_IN_ASM, " %#x %#x\n", cs->exception_index,
@@ -772,7 +772,7 @@ void helper_vmexit(CPUX86State *env, uint32_t exit_code, uint64_t exit_info_1)
     env->error_code = 0;
     env->old_exception = -1;
 
-    cpu_loop_exit(env);
+    cpu_loop_exit(cs);
 }
 
 void cpu_vmexit(CPUX86State *env, uint32_t exit_code, uint64_t exit_info_1)
index 7fc9191e19f16f08b8b84d2cc39695c67db6ce4e..f0859aab6dedba278b01d06e0a2d1231f671d6a6 100644 (file)
@@ -28,7 +28,7 @@ void raise_exception(CPULM32State *env, int index)
     CPUState *cs = CPU(lm32_env_get_cpu(env));
 
     cs->exception_index = index;
-    cpu_loop_exit(env);
+    cpu_loop_exit(cs);
 }
 
 void HELPER(raise_exception)(CPULM32State *env, uint32_t index)
@@ -42,7 +42,7 @@ void HELPER(hlt)(CPULM32State *env)
 
     cs->halted = 1;
     cs->exception_index = EXCP_HLT;
-    cpu_loop_exit(env);
+    cpu_loop_exit(cs);
 }
 
 void HELPER(ill)(CPULM32State *env)
@@ -167,7 +167,7 @@ void tlb_fill(CPUState *cs, target_ulong addr, int is_write, int mmu_idx,
             /* now we have a real cpu fault */
             cpu_restore_state(env, retaddr);
         }
-        cpu_loop_exit(env);
+        cpu_loop_exit(cs);
     }
 }
 #endif
index b1745b8796e5433980bd20d1a0d7db30f6496a24..d6268cd6b9ef9ff7902e9d5d0e1ae8f91e4ba8e2 100644 (file)
@@ -67,7 +67,7 @@ void tlb_fill(CPUState *cs, target_ulong addr, int is_write, int mmu_idx,
             /* now we have a real cpu fault */
             cpu_restore_state(env, retaddr);
         }
-        cpu_loop_exit(env);
+        cpu_loop_exit(cs);
     }
 }
 
@@ -114,7 +114,7 @@ static void do_interrupt_all(CPUM68KState *env, int is_hw)
             }
             cs->halted = 1;
             cs->exception_index = EXCP_HLT;
-            cpu_loop_exit(env);
+            cpu_loop_exit(cs);
             return;
         }
         if (cs->exception_index >= EXCP_TRAP0
@@ -170,7 +170,7 @@ static void raise_exception(CPUM68KState *env, int tt)
     CPUState *cs = CPU(m68k_env_get_cpu(env));
 
     cs->exception_index = tt;
-    cpu_loop_exit(env);
+    cpu_loop_exit(cs);
 }
 
 void HELPER(raise_exception)(CPUM68KState *env, uint32_t tt)
index 9e394114c8a9c084a2955e2b02c8b302be741fa0..f47613241d77c76f075e8eb58271c89df88b77ce 100644 (file)
@@ -56,7 +56,7 @@ void tlb_fill(CPUState *cs, target_ulong addr, int is_write, int mmu_idx,
             /* now we have a real cpu fault */
             cpu_restore_state(env, retaddr);
         }
-        cpu_loop_exit(env);
+        cpu_loop_exit(cs);
     }
 }
 #endif
@@ -101,7 +101,7 @@ void helper_raise_exception(CPUMBState *env, uint32_t index)
     CPUState *cs = CPU(mb_env_get_cpu(env));
 
     cs->exception_index = index;
-    cpu_loop_exit(env);
+    cpu_loop_exit(cs);
 }
 
 void helper_debug(CPUMBState *env)
index 8c050fc2471e0d4c187654f017c4897803eaf4e6..c65350187f66e99403cdf5f2477fcce43e37ee0e 100644 (file)
@@ -51,7 +51,7 @@ static inline void QEMU_NORETURN do_raise_exception_err(CPUMIPSState *env,
         cpu_restore_state(env, pc);
     }
 
-    cpu_loop_exit(env);
+    cpu_loop_exit(cs);
 }
 
 static inline void QEMU_NORETURN do_raise_exception(CPUMIPSState *env,
@@ -280,7 +280,7 @@ static inline hwaddr do_translate_address(CPUMIPSState *env,
     lladdr = cpu_mips_translate_address(env, address, rw);
 
     if (lladdr == -1LL) {
-        cpu_loop_exit(env);
+        cpu_loop_exit(CPU(mips_env_get_cpu(env)));
     } else {
         return lladdr;
     }
index 06a4c728ee2125d21ee0915b55cbd77be185277b..3994c0910d22136f61697842f5fab6493ee1631c 100644 (file)
@@ -59,7 +59,7 @@ void tlb_fill(CPUState *cs, target_ulong addr, int is_write, int mmu_idx,
             cpu_restore_state(env, retaddr);
         }
     }
-    cpu_loop_exit(env);
+    cpu_loop_exit(cs);
 }
 
 void helper_raise_exception(CPUMoxieState *env, int ex)
@@ -74,7 +74,7 @@ void helper_raise_exception(CPUMoxieState *env, int ex)
     env->sregs[5] = env->pc;
     /* Jump the the exception handline routine.  */
     env->pc = env->sregs[1];
-    cpu_loop_exit(env);
+    cpu_loop_exit(cs);
 }
 
 uint32_t helper_div(CPUMoxieState *env, uint32_t a, uint32_t b)
@@ -104,7 +104,7 @@ void helper_debug(CPUMoxieState *env)
     CPUState *cs = CPU(moxie_env_get_cpu(env));
 
     cs->exception_index = EXCP_DEBUG;
-    cpu_loop_exit(env);
+    cpu_loop_exit(cs);
 }
 
 #if defined(CONFIG_USER_ONLY)
index b96f3f89630761e5caefaad04ea3c564776a3524..74652a58f6920609e71e90b70a81caf6009d6c2d 100644 (file)
@@ -25,5 +25,5 @@ void QEMU_NORETURN raise_exception(OpenRISCCPU *cpu, uint32_t excp)
     CPUState *cs = CPU(cpu);
 
     cs->exception_index = excp;
-    cpu_loop_exit(&cpu->env);
+    cpu_loop_exit(cs);
 }
index e3fe6c71274e9055383e2649693d09493a7acaca..5f7f6f5ac463a4f24166620058c76bb7b7c108c9 100644 (file)
@@ -52,7 +52,7 @@ void tlb_fill(CPUState *cs, target_ulong addr, int is_write,
             cpu_restore_state(env, retaddr);
         }
         /* Raise Exception.  */
-        cpu_loop_exit(env);
+        cpu_loop_exit(cs);
     }
 }
 #endif
index a58655b5c7564ddb3c2e90b94a295aba030d6451..4a587303a864a79e8685e1c55c561ac26c5a8e4e 100644 (file)
@@ -823,7 +823,7 @@ void helper_raise_exception_err(CPUPPCState *env, uint32_t exception,
 #endif
     cs->exception_index = exception;
     env->error_code = error_code;
-    cpu_loop_exit(env);
+    cpu_loop_exit(cs);
 }
 
 void helper_raise_exception(CPUPPCState *env, uint32_t exception)
index a6d60bf8851c22ab9a693f64930f4d36e630467c..d845f20de582ecf566d671f825b59cd08e54c1b2 100644 (file)
@@ -548,7 +548,7 @@ uint32_t HELPER(calc_cc)(CPUS390XState *env, uint32_t cc_op, uint64_t src,
 void HELPER(load_psw)(CPUS390XState *env, uint64_t mask, uint64_t addr)
 {
     load_psw(env, mask, addr);
-    cpu_loop_exit(env);
+    cpu_loop_exit(CPU(s390_env_get_cpu(env)));
 }
 
 void HELPER(sacf)(CPUS390XState *env, uint64_t a1)
index 1e74e4d7e49858c3c1c87c916b4748667c9165e7..e89fcac4e2c93b67590879cdae2f590b663d7628 100644 (file)
@@ -58,7 +58,7 @@ void tlb_fill(CPUState *cs, target_ulong addr, int is_write, int mmu_idx,
             /* now we have a real cpu fault */
             cpu_restore_state(env, retaddr);
         }
-        cpu_loop_exit(env);
+        cpu_loop_exit(cs);
     }
 }
 
@@ -971,12 +971,12 @@ static uint32_t mvc_asc(CPUS390XState *env, int64_t l, uint64_t a1,
     }
 
     if (mmu_translate(env, a1 & TARGET_PAGE_MASK, 1, mode1, &dest, &flags)) {
-        cpu_loop_exit(env);
+        cpu_loop_exit(CPU(s390_env_get_cpu(env)));
     }
     dest |= a1 & ~TARGET_PAGE_MASK;
 
     if (mmu_translate(env, a2 & TARGET_PAGE_MASK, 0, mode2, &src, &flags)) {
-        cpu_loop_exit(env);
+        cpu_loop_exit(CPU(s390_env_get_cpu(env)));
     }
     src |= a2 & ~TARGET_PAGE_MASK;
 
index 69da9e56a9a430610ad8130e2161d71b96835086..2beec61a2b159cb53a428e9569a6fb0b9c49e6de 100644 (file)
@@ -61,7 +61,7 @@ void QEMU_NORETURN runtime_exception(CPUS390XState *env, int excp,
     env->int_pgm_ilen = t = get_ilen(t);
     env->psw.addr += 2 * t;
 
-    cpu_loop_exit(env);
+    cpu_loop_exit(cs);
 }
 
 /* Raise an exception statically from a TB.  */
@@ -71,7 +71,7 @@ void HELPER(exception)(CPUS390XState *env, uint32_t excp)
 
     HELPER_LOG("%s: exception %d\n", __func__, excp);
     cs->exception_index = excp;
-    cpu_loop_exit(env);
+    cpu_loop_exit(cs);
 }
 
 #ifndef CONFIG_USER_ONLY
@@ -93,7 +93,7 @@ void program_interrupt(CPUS390XState *env, uint32_t code, int ilen)
         env->int_pgm_code = code;
         env->int_pgm_ilen = ilen;
         cs->exception_index = EXCP_PGM;
-        cpu_loop_exit(env);
+        cpu_loop_exit(cs);
     }
 }
 
@@ -456,11 +456,11 @@ uint32_t HELPER(sigp)(CPUS390XState *env, uint64_t order_code, uint32_t r1,
 #if !defined(CONFIG_USER_ONLY)
     case SIGP_RESTART:
         qemu_system_reset_request();
-        cpu_loop_exit(env);
+        cpu_loop_exit(CPU(s390_env_get_cpu(env)));
         break;
     case SIGP_STOP:
         qemu_system_shutdown_request();
-        cpu_loop_exit(env);
+        cpu_loop_exit(CPU(s390_env_get_cpu(env)));
         break;
 #endif
     default:
index 6e527cfcf3905cde33ec1b61fa5e7c67c5a01c32..271401f6999e9ff5aa5deab376f220242ee41c42 100644 (file)
@@ -52,7 +52,7 @@ void tlb_fill(CPUState *cs, target_ulong addr, int is_write, int mmu_idx,
         if (retaddr) {
             cpu_restore_state(env, retaddr);
         }
-        cpu_loop_exit(env);
+        cpu_loop_exit(cs);
     }
 }
 
@@ -77,7 +77,7 @@ static inline void QEMU_NORETURN raise_exception(CPUSH4State *env, int index,
     if (retaddr) {
         cpu_restore_state(env, retaddr);
     }
-    cpu_loop_exit(env);
+    cpu_loop_exit(cs);
 }
 
 void helper_raise_illegal_instruction(CPUSH4State *env)
index a393ef0a481632139095f1f7c8141c12f1d28ebc..fb5f6ecd38f0b86656cfafacdc6aa8d979ca228d 100644 (file)
@@ -27,7 +27,7 @@ void helper_raise_exception(CPUSPARCState *env, int tt)
     CPUState *cs = CPU(sparc_env_get_cpu(env));
 
     cs->exception_index = tt;
-    cpu_loop_exit(env);
+    cpu_loop_exit(cs);
 }
 
 void helper_debug(CPUSPARCState *env)
@@ -35,7 +35,7 @@ void helper_debug(CPUSPARCState *env)
     CPUState *cs = CPU(sparc_env_get_cpu(env));
 
     cs->exception_index = EXCP_DEBUG;
-    cpu_loop_exit(env);
+    cpu_loop_exit(cs);
 }
 
 #ifdef TARGET_SPARC64
@@ -239,6 +239,6 @@ void helper_power_down(CPUSPARCState *env)
     cs->exception_index = EXCP_HLT;
     env->pc = env->npc;
     env->npc = env->pc + 4;
-    cpu_loop_exit(env);
+    cpu_loop_exit(cs);
 }
 #endif
index 32d0bfda18d2596e0e68ac867d09ad3a7e93ab51..8302bb14c2f6f5302de22222d3b804d0eec533e3 100644 (file)
@@ -2451,7 +2451,7 @@ void tlb_fill(CPUState *cs, target_ulong addr, int is_write, int mmu_idx,
         if (retaddr) {
             cpu_restore_state(env, retaddr);
         }
-        cpu_loop_exit(env);
+        cpu_loop_exit(cs);
     }
 }
 #endif
index 3efc6a80a4c59cb1ca160151d14356258cafcca1..c2bf834c27919b475dd584a1d154e4c3761f3301 100644 (file)
@@ -19,7 +19,7 @@ void HELPER(exception)(CPUUniCore32State *env, uint32_t excp)
     CPUState *cs = CPU(uc32_env_get_cpu(env));
 
     cs->exception_index = excp;
-    cpu_loop_exit(env);
+    cpu_loop_exit(cs);
 }
 
 static target_ulong asr_read(CPUUniCore32State *env)
@@ -271,7 +271,7 @@ void tlb_fill(CPUState *cs, target_ulong addr, int is_write,
             /* now we have a real cpu fault */
             cpu_restore_state(env, retaddr);
         }
-        cpu_loop_exit(env);
+        cpu_loop_exit(cs);
     }
 }
 #endif
index 1c80e310abbab7a328b141ad6e46ec014b640443..42653784cd870eeeaa3ae5aec38b1a11ab493971 100644 (file)
@@ -105,7 +105,7 @@ void HELPER(exception)(CPUXtensaState *env, uint32_t excp)
     if (excp == EXCP_DEBUG) {
         env->exception_taken = 0;
     }
-    cpu_loop_exit(env);
+    cpu_loop_exit(cs);
 }
 
 void HELPER(exception_cause)(CPUXtensaState *env, uint32_t pc, uint32_t cause)
@@ -391,7 +391,7 @@ void HELPER(waiti)(CPUXtensaState *env, uint32_t pc, uint32_t intlevel)
         (intlevel << PS_INTLEVEL_SHIFT);
     check_interrupts(env);
     if (env->pending_irq_level) {
-        cpu_loop_exit(env);
+        cpu_loop_exit(CPU(xtensa_env_get_cpu(env)));
         return;
     }
 
index dbb9c8d0a7fb62a41b734e496f7ce77dbf744208..e149c9732fad6d3f52fb9ad6d06ac70495f8c967 100644 (file)
 
 static void exception_action(CPUArchState *env1)
 {
-#if defined(TARGET_I386)
     CPUState *cpu = ENV_GET_CPU(env1);
 
+#if defined(TARGET_I386)
     raise_exception_err(env1, cpu->exception_index, env1->error_code);
 #else
-    cpu_loop_exit(env1);
+    cpu_loop_exit(cpu);
 #endif
 }
 
This page took 0.076701 seconds and 4 git commands to generate.