diff options
Diffstat (limited to 'libcpu/ia32/__umodsi3.c')
| -rw-r--r-- | libcpu/ia32/__umodsi3.c | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/libcpu/ia32/__umodsi3.c b/libcpu/ia32/__umodsi3.c index 226a2c0800..101db9debd 100644 --- a/libcpu/ia32/__umodsi3.c +++ b/libcpu/ia32/__umodsi3.c @@ -16,31 +16,31 @@ uint32_t __umodsi3(uint32_t num, uint32_t den) { - register uint32_t quot = 0, qbit = 1; + register uint32_t quot = 0, qbit = 1; - if (den == 0) - { - asm volatile ("int $0"); - return 0; /* if trap returns... */ - } + if (den == 0) + { + asm volatile ("int $0"); + return 0; /* if trap returns... */ + } - /* left-justify denominator and count shift */ - while ((int32_t) den >= 0) - { - den <<= 1; - qbit <<= 1; - } + /* left-justify denominator and count shift */ + while ((int32_t) den >= 0) + { + den <<= 1; + qbit <<= 1; + } - while (qbit) - { - if (den <= num) - { - num -= den; - quot += qbit; - } - den >>= 1; - qbit >>= 1; - } + while (qbit) + { + if (den <= num) + { + num -= den; + quot += qbit; + } + den >>= 1; + qbit >>= 1; + } - return num; + return num; } |
