mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 02:03:56 -06:00
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
This commit is contained in:
parent
fc7a5038a6
commit
e534629296
5 changed files with 26 additions and 6 deletions
|
@ -6,8 +6,8 @@ DEF_HELPER_3(add_saturate, i32, env, i32, i32)
|
|||
DEF_HELPER_3(sub_saturate, i32, env, i32, i32)
|
||||
DEF_HELPER_3(add_usaturate, i32, env, i32, i32)
|
||||
DEF_HELPER_3(sub_usaturate, i32, env, i32, i32)
|
||||
DEF_HELPER_FLAGS_2(sdiv, TCG_CALL_NO_RWG_SE, s32, s32, s32)
|
||||
DEF_HELPER_FLAGS_2(udiv, TCG_CALL_NO_RWG_SE, i32, i32, i32)
|
||||
DEF_HELPER_FLAGS_3(sdiv, TCG_CALL_NO_RWG, s32, env, s32, s32)
|
||||
DEF_HELPER_FLAGS_3(udiv, TCG_CALL_NO_RWG, i32, env, i32, i32)
|
||||
DEF_HELPER_FLAGS_1(rbit, TCG_CALL_NO_RWG_SE, i32, i32)
|
||||
|
||||
#define PAS_OP(pfx) \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue