OSDN Git Service

target/arm: Implement M-profile trapping on division by zero
authorPeter Maydell <peter.maydell@linaro.org>
Fri, 30 Jul 2021 15:16:36 +0000 (16:16 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Wed, 25 Aug 2021 09:48:50 +0000 (10:48 +0100)
commite5346292966f5348cd36668f2451ca0e44d820b2
tree8edd319248d5af1846e528cc6c98f0342a00cdf3
parentfc7a5038a6b70a3e474e58a5ed9845e4f5eed6dd
target/arm: Implement M-profile trapping on division by zero

Unlike A-profile, for M-profile the UDIV and SDIV insns can be
configured to raise an exception on division by zero, using the CCR
DIV_0_TRP bit.

Implement support for setting this bit by making the helper functions
raise the appropriate exception.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20210730151636.17254-3-peter.maydell@linaro.org
target/arm/cpu.h
target/arm/helper.c
target/arm/helper.h
target/arm/m_helper.c
target/arm/translate.c