diff options
author | Laurent Vivier <laurent@vivier.eu> | 2016-10-28 20:42:23 +0200 |
---|---|---|
committer | Laurent Vivier <laurent@vivier.eu> | 2016-12-27 18:16:42 +0100 |
commit | 0ccb9c1d8128a020720d5c6abf99a470742a1b94 (patch) | |
tree | 912612d600490ef4a0e22d9f365ce2f6b784d0a6 /target/m68k/helper.h | |
parent | 8be95defd6ab10d2c9f986879a0afa82417cb8e5 (diff) |
target-m68k: add 680x0 divu/divs variants
Update helper to set the throwing location in case of div-by-0.
Cleanup divX.w and add quad word variants of divX.l.
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Reviewed-by: Richard Henderson <rth@twidle.net>
[laurent: modified to clear Z on overflow, as found with risu]
Diffstat (limited to 'target/m68k/helper.h')
-rw-r--r-- | target/m68k/helper.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/target/m68k/helper.h b/target/m68k/helper.h index 2697e32d0b..6180dc5643 100644 --- a/target/m68k/helper.h +++ b/target/m68k/helper.h @@ -1,8 +1,12 @@ DEF_HELPER_1(bitrev, i32, i32) DEF_HELPER_1(ff1, i32, i32) DEF_HELPER_FLAGS_2(sats, TCG_CALL_NO_RWG_SE, i32, i32, i32) -DEF_HELPER_2(divu, void, env, i32) -DEF_HELPER_2(divs, void, env, i32) +DEF_HELPER_3(divuw, void, env, int, i32) +DEF_HELPER_3(divsw, void, env, int, s32) +DEF_HELPER_4(divul, void, env, int, int, i32) +DEF_HELPER_4(divsl, void, env, int, int, s32) +DEF_HELPER_4(divull, void, env, int, int, i32) +DEF_HELPER_4(divsll, void, env, int, int, s32) DEF_HELPER_3(shl_cc, i32, env, i32, i32) DEF_HELPER_3(shr_cc, i32, env, i32, i32) DEF_HELPER_3(sar_cc, i32, env, i32, i32) |