OSDN Git Service

target/nios2: Fix BRET instruction
authorRichard Henderson <richard.henderson@linaro.org>
Thu, 21 Apr 2022 15:16:49 +0000 (08:16 -0700)
committerRichard Henderson <richard.henderson@linaro.org>
Tue, 26 Apr 2022 15:16:41 +0000 (08:16 -0700)
commit48da43b258d9038d1f093cfd0d2a4d01d3183be9
tree6585b8ddc2a67dc402256d1f4e6f8fbb052a00a9
parent8d855c89d1030ddf3d9093d6775fbc338a0b89cb
target/nios2: Fix BRET instruction

We had failed to copy BSTATUS back to STATUS, and diagnose
supervisor-only.  The spec is light on the specifics of the
implementation of bret, but it is an easy assumption that
the restore into STATUS should work the same as eret.

Therefore, reuse the existing helper_eret.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reported-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220421151735.31996-19-richard.henderson@linaro.org>
target/nios2/translate.c