Message ID | 20250301052845.1012069-29-brian.cain@oss.qualcomm.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | hexagon system emu, part 2/3 | expand |
> -----Original Message----- > From: Brian Cain <brian.cain@oss.qualcomm.com> > Sent: Friday, February 28, 2025 11:29 PM > To: qemu-devel@nongnu.org > Cc: brian.cain@oss.qualcomm.com; richard.henderson@linaro.org; > philmd@linaro.org; quic_mathbern@quicinc.com; ale@rev.ng; anjo@rev.ng; > quic_mliebel@quicinc.com; ltaylorsimpson@gmail.com; > alex.bennee@linaro.org; quic_mburton@quicinc.com; > sidneym@quicinc.com; Brian Cain <bcain@quicinc.com> > Subject: [PATCH 28/39] target/hexagon: Implement modify_ssr, resched, > pending_interrupt > > From: Brian Cain <bcain@quicinc.com> > > Signed-off-by: Brian Cain <brian.cain@oss.qualcomm.com> Reviewed-by: Taylor Simpson <ltaylorsimpson@gmail.com>
diff --git a/target/hexagon/helper.h b/target/hexagon/helper.h index 730eaf8b9a..3df663baeb 100644 --- a/target/hexagon/helper.h +++ b/target/hexagon/helper.h @@ -129,4 +129,7 @@ DEF_HELPER_1(stop, void, env) DEF_HELPER_2(wait, void, env, i32) DEF_HELPER_2(resume, void, env, i32) DEF_HELPER_2(nmi, void, env, i32) +DEF_HELPER_1(resched, void, env) +DEF_HELPER_3(modify_ssr, void, env, i32, i32) +DEF_HELPER_1(pending_interrupt, void, env) #endif diff --git a/target/hexagon/op_helper.c b/target/hexagon/op_helper.c index f3ffac81b6..702c3dd3c6 100644 --- a/target/hexagon/op_helper.c +++ b/target/hexagon/op_helper.c @@ -1178,6 +1178,15 @@ float64 HELPER(dfmpyhh)(CPUHexagonState *env, float64 RxxV, return RxxV; } +#ifndef CONFIG_USER_ONLY +void HELPER(modify_ssr)(CPUHexagonState *env, uint32_t new, uint32_t old) +{ + BQL_LOCK_GUARD(); + hexagon_modify_ssr(env, new, old); +} +#endif + + /* Histogram instructions */ void HELPER(vhist)(CPUHexagonState *env) @@ -1516,6 +1525,11 @@ static inline QEMU_ALWAYS_INLINE void resched(CPUHexagonState *env) } } +void HELPER(resched)(CPUHexagonState *env) +{ + resched(env); +} + void HELPER(wait)(CPUHexagonState *env, target_ulong PC) { BQL_LOCK_GUARD(); @@ -1793,6 +1807,12 @@ void HELPER(nmi)(CPUHexagonState *env, uint32_t thread_mask) { g_assert_not_reached(); } + +void HELPER(pending_interrupt)(CPUHexagonState *env) +{ + BQL_LOCK_GUARD(); + hex_interrupt_update(env); +} #endif