Retro68/gcc/newlib/libc/machine/w65/mulsi3.c
Wolfgang Thaller d464252791 re-add newlib
2017-04-11 23:13:36 +02:00

18 lines
174 B
C

long
__mulsi3(unsigned long a, unsigned long b)
{
long res = 0;
while (a)
{
if (a & 1)
{
res += b;
}
b <<= 1;
a >>=1;
}
return res;
}