3 * - By John Hodge (thePowersGang)
6 * - Misc helper functions for the arch code
8 #ifndef _ARCH_HELPERS_H_
9 #define _ARCH_HELPERS_H_
12 // - Find what power of two times Den is > Num
13 // - Iterate down in bit significance
14 // > If the `N` value is greater than `D`, we can set this bit
15 #define DEF_DIVMOD(s) Uint##s __divmod##s(Uint##s N, Uint##s D, Uint##s*Rem){\
17 while(N>=D&&add) {D<<=1;add<<=1;}\
20 if(N>=D){ret+=add;N-=D;}\