target/ppc: Add gen_exception_err_nip() function
commitd54b82a481df62f0146ea20ea9244af810820b0e
authorBALATON Zoltan <balaton@eik.bme.hu>
Tue, 27 Feb 2024 15:08:03 +0000 (27 16:08 +0100)
committerNicholas Piggin <npiggin@gmail.com>
Tue, 12 Mar 2024 16:47:04 +0000 (13 02:47 +1000)
treea4ff8d294f8bc2ac929e8562d510a6ea5fcf1704
parentab452503932a8a5841ba394abc797715089c2f11
target/ppc: Add gen_exception_err_nip() function

Add gen_exception_err_nip() that does the same as gen_exception_err()
but takes the nip as a parameter to allow specifying it instead of
using the current instruction address then change gen_exception_err()
to use it.

The gen_exception() and gen_exception_nip() functions are similar so
remove code duplication from those too while at it.

Suggested-by: Nicholas Piggin <npiggin@gmail.com>
Reviewed-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
target/ppc/translate.c