X86: Actual change that fixes div. How did that happen?
This commit is contained in:
parent
776e8d5c8e
commit
cc76842f83
1 changed files with 6 additions and 2 deletions
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue