> -----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?

> +}


Reply via email to