2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
5 Desc: signed 32 bit division/modulus functions for Amiga/m68k
11 .globl AROS_SLIB_ENTRY(SDivMod32,Utility)
12 .globl AROS_SLIB_ENTRY(SDivMod32_020,Utility)
14 /* Needed for SDivMod32 */
15 .globl AROS_SLIB_ENTRY(UDivMod32,Utility)
17 .type AROS_SLIB_ENTRY(SDivMod32,Utility),@function
18 .type AROS_SLIB_ENTRY(SDivMod32_020,Utility),@function
21 AROS_SLIB_ENTRY
(SDivMod32_020
,Utility
):
25 /* All we do is remember the sign and get UDivMod32 to do all the work,
26 this is actually a bit harder than just changing both, doing the
27 division and then changing the other...
29 If both are positive, do nothing,
30 if one is negative, change both,
31 if both are negative, change remainder
35 AROS_SLIB_ENTRY
(SDivMod32
,Utility
):
42 bsr.s AROS_SLIB_ENTRY
(UDivMod32
,Utility
)
46 bsr.s AROS_SLIB_ENTRY
(UDivMod32
,Utility
)
52 bpl.s AROS_SLIB_ENTRY
(UDivMod32
,Utility
)
54 bsr.s AROS_SLIB_ENTRY
(UDivMod32
,Utility
)