@@ -1,5 +1,3 @@
-DEF_HELPER_2(excp, noreturn, env, int)
-
DEF_HELPER_FLAGS_3(stby_b, TCG_CALL_NO_WG, void, env, tl, tl)
DEF_HELPER_FLAGS_3(stby_b_parallel, TCG_CALL_NO_WG, void, env, tl, tl)
DEF_HELPER_FLAGS_3(stby_e, TCG_CALL_NO_WG, void, env, tl, tl)
@@ -30,14 +30,6 @@
#include "user/page-protection.h"
#endif
-G_NORETURN void HELPER(excp)(CPUHPPAState *env, int excp)
-{
- CPUState *cs = env_cpu(env);
-
- cs->exception_index = excp;
- cpu_loop_exit(cs);
-}
-
G_NORETURN void hppa_dynamic_excp(CPUHPPAState *env, int excp, uintptr_t ra)
{
CPUState *cs = env_cpu(env);
@@ -341,7 +333,7 @@ target_ulong HELPER(probe)(CPUHPPAState *env, target_ulong addr,
if (excp == EXCP_DTLB_MISS) {
excp = EXCP_NA_DTLB_MISS;
}
- helper_excp(env, excp);
+ cpu_raise_excp(env_cpu(env), excp);
}
return (want & prot) != 0;
#endif
@@ -21,6 +21,7 @@
#include "qemu/log.h"
#include "cpu.h"
#include "exec/helper-proto.h"
+#include "accel/tcg/cpu-loop.h"
#include "qemu/timer.h"
#include "system/runstate.h"
#include "system/system.h"
@@ -51,13 +52,13 @@ void HELPER(write_interval_timer)(CPUHPPAState *env, target_ulong val)
void HELPER(halt)(CPUHPPAState *env)
{
qemu_system_shutdown_request(SHUTDOWN_CAUSE_GUEST_SHUTDOWN);
- helper_excp(env, EXCP_HLT);
+ cpu_raise_excp(env_cpu(env), EXCP_HLT);
}
void HELPER(reset)(CPUHPPAState *env)
{
qemu_system_reset_request(SHUTDOWN_CAUSE_GUEST_RESET);
- helper_excp(env, EXCP_HLT);
+ cpu_raise_excp(env_cpu(env), EXCP_HLT);
}
target_ulong HELPER(swap_system_mask)(CPUHPPAState *env, target_ulong nsm)
@@ -726,7 +726,7 @@ static void install_link(DisasContext *ctx, unsigned link, bool with_sr0)
static void gen_excp_1(int exception)
{
- gen_helper_excp(tcg_env, tcg_constant_i32(exception));
+ gen_helper_raise_excp(tcg_env, tcg_constant_i32(exception));
}
static void gen_excp(DisasContext *ctx, int exception)
Use the common raise_excp helper for translated exceptions and route the remaining C callers through cpu_raise_excp(). Signed-off-by: Yonggang Luo <luoyonggang@gmail.com> --- target/hppa/helper.h | 2 -- target/hppa/op_helper.c | 10 +--------- target/hppa/sys_helper.c | 5 +++-- target/hppa/translate.c | 2 +- 4 files changed, 5 insertions(+), 14 deletions(-)