|
| From: | Richard Henderson |
| Subject: | Re: [PATCH v2 04/15] target/ppc: Move DISAS_NORETURN setting into gen_exception* |
| Date: | Wed, 28 Apr 2021 08:05:34 -0700 |
| User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 |
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~
| [Prev in Thread] | Current Thread | [Next in Thread] |