diff mbox series

[v3,26/27] target/ppc: reuse the error-aware NIP exception path

Message ID 20261002175037.1747-27-luoyonggang@gmail.com
State New
Headers show
Series accel/tcg: share raise_excp across TCG targets | expand

Commit Message

Yonggang Luo Oct. 2, 2026, 5:50 p.m. UTC
Route gen_exception_nip() through gen_exception_err_nip() with a zero
error code, reusing its NIP update and exception-generation path.

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
---
 target/ppc/translate.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
diff mbox series

Patch

diff --git a/target/ppc/translate.c b/target/ppc/translate.c
index 467b8f3d4ec..f1a7039a325 100644
--- a/target/ppc/translate.c
+++ b/target/ppc/translate.c
@@ -330,12 +330,7 @@  static inline void gen_exception_err(DisasContext *ctx, uint32_t excp,
 static void gen_exception_nip(DisasContext *ctx, uint32_t excp,
                               target_ulong nip)
 {
-    TCGv_i32 t0;
-
-    gen_update_nip(ctx, nip);
-    t0 = tcg_constant_i32(excp);
-    gen_helper_raise_exception(tcg_env, t0);
-    ctx->base.is_jmp = DISAS_NORETURN;
+    gen_exception_err_nip(ctx, excp, 0, nip);
 }
 
 static inline void gen_exception(DisasContext *ctx, uint32_t excp)