mirror of
https://github.com/thunderbrewhq/squall.git
synced 2025-12-12 10:32:29 +00:00
fix(big): calculate shift from divisor in Div
This commit is contained in:
parent
955a0bbba7
commit
2d2ae3276a
1 changed files with 1 additions and 1 deletions
|
|
@ -76,7 +76,7 @@ void Div(BigBuffer& a, BigBuffer& b, const BigBuffer& c, const BigBuffer& d, Big
|
||||||
auto& dd = stack.Alloc(&allocCount);
|
auto& dd = stack.Alloc(&allocCount);
|
||||||
auto& work = stack.Alloc(&allocCount);
|
auto& work = stack.Alloc(&allocCount);
|
||||||
|
|
||||||
uint32_t shift = 0x1F - (HighBitPos(work) & 0x1F);
|
uint32_t shift = 0x1F - (HighBitPos(d) & 0x1F);
|
||||||
Shl(cc, c, shift);
|
Shl(cc, c, shift);
|
||||||
Shl(dd, d, shift);
|
Shl(dd, d, shift);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue