@@ -774,6 +774,19 @@ uint32_t HELPER(ror_cc)(CPUARMState *env,
uint32_t x, uint32_t i)
}
}
+void HELPER(wfi)(CPUARMState *env)
+{
+ env->exception_index = EXCP_HLT;
+ env->halted = 1;
+ cpu_loop_exit(env);
+}
+
+void HELPER(exception)(CPUARMState *env, uint32_t excp)
+{
+ env->exception_index = excp;
+ cpu_loop_exit(env);
+}
+
#if defined(CONFIG_USER_ONLY)
void do_interrupt (CPUARMState *env)
@@ -50,8 +50,8 @@ DEF_HELPER_2(usad8, i32, i32, i32)
DEF_HELPER_1(logicq_cc, i32, i64)
DEF_HELPER_3(sel_flags, i32, i32, i32, i32)
-DEF_HELPER_1(exception, void, i32)
-DEF_HELPER_0(wfi, void)
+DEF_HELPER_2(exception, void, env, i32)
+DEF_HELPER_1(wfi, void, env)
DEF_HELPER_3(cpsr_write, void, env, i32, i32)
DEF_HELPER_1(cpsr_read, i32, env)
@@ -21,14 +21,6 @@
#include "helper.h"
#if !defined(CONFIG_USER_ONLY)
-static void raise_exception(int tt)
-{
- env->exception_index = tt;
- cpu_loop_exit(env);
-}
-#endif
-
-#if !defined(CONFIG_USER_ONLY)
#include "softmmu_exec.h"
@@ -72,21 +64,8 @@ void tlb_fill(CPUARMState *env1, target_ulong addr,
int is_write, int mmu_idx,
cpu_restore_state(tb, env, pc);
}
}
- raise_exception(env->exception_index);
+ helper_exception(env, env->exception_index);
}
env = saved_env;
}
#endif
-
-void HELPER(wfi)(void)
-{
- env->exception_index = EXCP_HLT;
- env->halted = 1;
- cpu_loop_exit(env);
-}
-
-void HELPER(exception)(uint32_t excp)
-{
- env->exception_index = excp;
- cpu_loop_exit(env);
-}
@@ -208,7 +208,7 @@ static void gen_exception(int excp)
{
TCGv tmp = tcg_temp_new_i32();
tcg_gen_movi_i32(tmp, excp);
- gen_helper_exception(tmp);
+ gen_helper_exception(cpu_env, tmp);
tcg_temp_free_i32(tmp);
}
@@ -10083,7 +10083,7 @@ static inline void
gen_intermediate_code_internal(CPUARMState *env,
/* nothing more to generate */
break;
case DISAS_WFI:
- gen_helper_wfi();
+ gen_helper_wfi(cpu_env);
break;
case DISAS_SWI: