search for: quot_digit

Displaying 1 result from an estimated 1 matches for "quot_digit".

Did you mean: quot_digits
2004 Jun 23
4
CRIS port of klibc
...+static __inline__ struct quot_rem +do_31div (unsigned long a, unsigned long b) + __attribute__ ((__const__, __always_inline__)); + +static __inline__ struct quot_rem +do_31div (unsigned long a, unsigned long b) +{ + /* Adjust operands and result if a is 31 bits. */ + long extra = 0; + int quot_digits = 0; + + if (b == 0) + { + struct quot_rem ret; + ret.quot = 0xffffffff; + ret.rem = 0xffffffff; + return ret; + } + + if (a < b) + return (struct quot_rem) { 0, a }; + + if (b <= a) + { + quot_digits = LZ (b) - LZ (a); + quot_digits += (a >= (...