Re: [PATCH] libgcc: Fix up bitint division [PR114397]

2024-03-21 Thread Richard Biener
On Thu, 21 Mar 2024, Jakub Jelinek wrote: > Hi! > > The Knuth's division algorithm relies on the number of dividend limbs > to be greater ore equal to number of divisor limbs, which is why > I've added a special case for un < vn at the start of __divmodbitint4. > Unfortunately, my assumption

[PATCH] libgcc: Fix up bitint division [PR114397]

2024-03-21 Thread Jakub Jelinek
Hi! The Knuth's division algorithm relies on the number of dividend limbs to be greater ore equal to number of divisor limbs, which is why I've added a special case for un < vn at the start of __divmodbitint4. Unfortunately, my assumption that it then implies abs(v) > abs(u) and so quotient must