ps. what is strange, its why we still references to them in os4 sdk (pretty a lot should to say
You'll notice they are *not* in the autodocs, nor are they mentioned in any os4 pecific include files, they are only reference in the ggc inlne files (as opposed to inline4) they are 68k only
It could be there a 68k stubs for them but not PPC or they may just be depreicated (but still present for backwards com patabilty with 68k software using them()
#define UDivMod32(x,y)( (ULONG) x % (ULONG) y ) // UDivMod32() replacement (so on os3 it still be used as it) #define SDivMod32(x,y) ( (LONG) x % (LONG) y ) // SDivMod32() replacement (so on os3 it still be used) #define UMult32(x,y) ( (ULONG) x * (ULONG) y ) // UMult32() replacement (so on os3 it still be used)
Then it should be
#define UDivMod32(x,y)( (ULONG) x / (ULONG) y ) // UDivMod32() replacement (so on os3 it still be used as it) #define SDivMod32(x,y) ( (LONG) x / (LONG) y ) // SDivMod32() replacement (so on os3 it still be used) #define UMult32(x,y) ( (ULONG) x * (ULONG) y ) // UMult32() replacement (so on os3 it still be used)
(NutsAboutAmiga)
Basilisk II for AmigaOS4 AmigaInputAnywhere Excalibur and other tools and apps.
@Andy i think about rewrite right at begining and do not use them at all in code, but maybe on os3 those asm functions will be faster in compare with gcc rewrite / optimize. besides i use gcc2.9.x for os3, so maybe gcc optimisation there will be even worse
#define UDivMod32(x,y)( (ULONG) x / (ULONG) y ) // UDivMod32() replacement (so on os3 it still be used as it) #define SDivMod32(x,y) ( (LONG) x / (LONG) y ) // SDivMod32() replacement (so on os3 it still be used) #define UMult32(x,y) ( (ULONG) x * (ULONG) y ) // UMult32() replacement (so on os3 it still be used)
Didn't solve problem. I.e. once i replace it like this, cursor and mouse x/y fucked up :( So i have recheck again, and (ULONG) x / (ULONG) y is not the same as ((ULONG) x) / ((ULONG) y) of course :)
Without the parenthesis if you do something like: result = UMult32(5+3,4); it will be expanded to: 5+3*4 = 17 instead of what was intended: (5+3)*(4) = 32