newlib-nano-1.0
newlib-nano-1.0 copied to clipboard
wrong implementation of __mulhi3
This is current implementation in code base:
if a is an even integer or any integer with 0s at lower significant followed by 1s. then it will end up in an infinite loop.
Correct code should be
while(a)
{
if (a & 1) r += b;
b <<= 1;
a >>= 1;
}