2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
5 Desc: signed 32 bit division/modulus functions for m68k
13 .globl AROS_SLIB_ENTRY(SDivMod32,Utility)
14 .globl AROS_SLIB_ENTRY(SDivMod32_020,Utility)
16 /* Needed for SDivMod32 */
17 .globl AROS_SLIB_ENTRY(UDivMod32,Utility)
19 .type AROS_SLIB_ENTRY(SDivMod32,Utility),@function
20 .type AROS_SLIB_ENTRY(SDivMod32_020,Utility),@function
22 AROS_SLIB_ENTRY
(SDivMod32_020
,Utility
):
26 /* All we do is remember the sign and get UDivMod32 to do all the work,
27 this is actually a bit harder than just changing both, doing the
28 division and then changing the other...
30 If both are positive, do nothing,
31 if one is negative, change both,
32 if both are negative, change remainder
34 AROS_SLIB_ENTRY
(SDivMod32
,Utility
):
41 jbsr AROS_SLIB_ENTRY
(UDivMod32
,Utility
)
45 jbsr AROS_SLIB_ENTRY
(UDivMod32
,Utility
)
51 jbpl AROS_SLIB_ENTRY
(UDivMod32
,Utility
)
53 jbsr AROS_SLIB_ENTRY
(UDivMod32
,Utility
)