diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2022-04-21 08:17:12 -0700 |
---|---|---|
committer | Richard Henderson <richard.henderson@linaro.org> | 2022-04-26 08:16:41 -0700 |
commit | 345b7a8757e89a8f70a1fa09c6d51310650ef8be (patch) | |
tree | 57adcb4bfe3cb0e3d115c846475b5113989d388e /target/nios2/helper.c | |
parent | e8d12542ee5646843c5557db3c78a6c29dc6bf29 (diff) |
target/nios2: Support division error exception
Division may (optionally) raise a division exception.
Since the linux kernel has been prepared for this for
some time, enable it by default.
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220421151735.31996-42-richard.henderson@linaro.org>
Diffstat (limited to 'target/nios2/helper.c')
-rw-r--r-- | target/nios2/helper.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/target/nios2/helper.c b/target/nios2/helper.c index 4d9085f22f..c5a2dd65b1 100644 --- a/target/nios2/helper.c +++ b/target/nios2/helper.c @@ -119,6 +119,9 @@ void nios2_cpu_do_interrupt(CPUState *cs) case EXCP_UNALIGND: name = "Misaligned (destination)"; break; + case EXCP_DIV: + name = "DIV error"; + break; case EXCP_TRAP: name = "TRAP insn"; break; @@ -187,6 +190,7 @@ void nios2_cpu_do_interrupt(CPUState *cs) case EXCP_SUPERI: case EXCP_ILLEGAL: + case EXCP_DIV: case EXCP_TRAP: do_exception(cpu, cpu->exception_addr, 0, false); break; |