target/nios2: Advance pc when raising exceptions
commite84f1768449330a5b4c62a8aaa68f102ba6ec573
authorRichard Henderson <richard.henderson@linaro.org>
Thu, 21 Apr 2022 15:17:28 +0000 (21 08:17 -0700)
committerRichard Henderson <richard.henderson@linaro.org>
Tue, 26 Apr 2022 15:17:05 +0000 (26 08:17 -0700)
treeaf6ca0b49c5612a35ac77da507974dba9ee71713
parenta25c4eff32ba6192cff648ccaf0316bd829c80af
target/nios2: Advance pc when raising exceptions

The exception return address for nios2 is the instruction
after the one that was executing at the time of the exception.

We have so far implemented this by advancing the pc during the
process of raising the exception.  It is perhaps a little less
confusing to do this advance in the translator (and helpers)
when raising the exception in the first place, so that we may
more closely match kernel sources.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20220421151735.31996-58-richard.henderson@linaro.org>
linux-user/nios2/cpu_loop.c
target/nios2/cpu.h
target/nios2/helper.c
target/nios2/op_helper.c
target/nios2/translate.c