> -----Original Message----- > From: Brian Cain <brian.c...@oss.qualcomm.com> > Sent: Friday, February 28, 2025 11:26 PM > To: qemu-devel@nongnu.org > Cc: brian.c...@oss.qualcomm.com; richard.hender...@linaro.org; > phi...@linaro.org; quic_mathb...@quicinc.com; a...@rev.ng; a...@rev.ng; > quic_mlie...@quicinc.com; ltaylorsimp...@gmail.com; > alex.ben...@linaro.org; quic_mbur...@quicinc.com; > sidn...@quicinc.com; Brian Cain <bc...@quicinc.com> > Subject: [PATCH 20/38] target/hexagon: Implement do_raise_exception() > > From: Brian Cain <bc...@quicinc.com> > > Signed-off-by: Brian Cain <brian.c...@oss.qualcomm.com> > a/target/hexagon/op_helper.c b/target/hexagon/op_helper.c index > ccd806836c..1aa5b32b1f 100644 > --- a/target/hexagon/op_helper.c > +++ b/target/hexagon/op_helper.c > @@ -37,6 +37,26 @@ > #define SF_MANTBITS 23 > > /* Exceptions processing helpers */ > +G_NORETURN > +void do_raise_exception(CPUHexagonState *env, uint32_t exception, > + target_ulong PC, uintptr_t retaddr) { > + CPUState *cs = env_cpu(env); > +#ifdef CONFIG_USER_ONLY > + qemu_log_mask(CPU_LOG_INT, "%s: 0x%08x\n", __func__, exception); > +#else > + qemu_log_mask(CPU_LOG_INT, "%s: 0x%08x, @ %08" PRIx32 "\n", > + __func__, exception, PC); > + > + ASSERT_DIRECT_TO_GUEST_UNSET(env, exception); #endif > + > + env->gpr[HEX_REG_PC] = PC; > + cs->exception_index = exception; > + cpu_loop_exit_restore(cs, retaddr); > + cs->halted = false; Shouldn't cs->halted be set before cpu_loop_exit_restore? > +}
- [PATCH 17/38] target/hexagon: Add vmstate representation Brian Cain
- RE: [PATCH 17/38] target/hexagon: Add vmstate represen... ltaylorsimpson
- [PATCH 25/38] target/hexagon: Add TCG overrides for thread ... Brian Cain
- RE: [PATCH 25/38] target/hexagon: Add TCG overrides fo... ltaylorsimpson
- [PATCH 04/38] target/hexagon: Make gen_exception_end_tb non... Brian Cain
- RE: [PATCH 04/38] target/hexagon: Make gen_exception_e... ltaylorsimpson
- [PATCH 07/38] target/hexagon: Add a placeholder fp exceptio... Brian Cain
- RE: [PATCH 07/38] target/hexagon: Add a placeholder fp... ltaylorsimpson
- [PATCH 30/38] target/hexagon: Add a TLB count property Brian Cain
- [PATCH 20/38] target/hexagon: Implement do_raise_exception(... Brian Cain
- RE: [PATCH 20/38] target/hexagon: Implement do_raise_e... ltaylorsimpson
- [PATCH 32/38] target/hexagon: Add stubs for modify_ssr/get_... Brian Cain
- [PATCH 05/38] target/hexagon: Switch to tag_ignore(), gener... Brian Cain via
- RE: [PATCH 05/38] target/hexagon: Switch to tag_ignore... ltaylorsimpson
- [PATCH 29/38] target/hexagon: Add locks, id, next_PC to sta... Brian Cain
- [PATCH 27/38] target/hexagon: Add sreg_{read,write} helpers Brian Cain
- [PATCH 11/38] target/hexagon: Add guest/sys reg writes to D... Brian Cain
- RE: [PATCH 11/38] target/hexagon: Add guest/sys reg wr... ltaylorsimpson
- [PATCH 36/38] target/hexagon: Add clear_wait_mode() definit... Brian Cain
- [PATCH 15/38] target/hexagon: Add handlers for guest/sysreg... Brian Cain
- RE: [PATCH 15/38] target/hexagon: Add handlers for gue... ltaylorsimpson