X86: Actual change that fixes div. How did that happen?

This commit is contained in:
Gabe Black 2010-05-12 00:49:12 -07:00
parent 776e8d5c8e
commit cc76842f83

View file

@ -620,14 +620,18 @@ let {{
remaining--;
}
if (dividend & (ULL(1) << 63)) {
bool highBit = false;
if (dividend < divisor && remaining) {
highBit = true;
dividend = (dividend << 1) |
bits(SrcReg1, remaining - 1);
quotient <<= 1;
remaining--;
}
quotient++;
dividend -= divisor;
if (highBit || divisor <= dividend) {
quotient++;
dividend -= divisor;
}
}
remainder = dividend;
} else {