On 4/27/21 10:16 AM, Luis Pires wrote:
-static inline void gen_stop_exception(DisasContext *ctx)
+static inline void gen_end_tb_exception(DisasContext *ctx, uint32_t excp)
{
- gen_update_nip(ctx, ctx->base.pc_next);
- ctx->exception = POWERPC_EXCP_STOP;
+ /* No need to update nip for SYNC/BRANCH, as execution flow will change */
+ if ((excp != POWERPC_EXCP_SYNC) &&
+ (excp != POWERPC_EXCP_BRANCH))
+ {
+ gen_update_nip(ctx, ctx->base.pc_next);
+ }
+ ctx->exception = excp;
+ ctx->base.is_jmp = DISAS_NORETURN;
}
Hmm. You didn't actually raise the exception, so you can't set DISAS_NORETURN
that way. It looks like you should be using gen_exception_nip().
And as side notes: (1) no need for extra parentheses, (2) brace is misplaced.
r~