newlib-cygwin/newlib/libc/machine/w65/mulsi3.c

18 lines
174 B
C
Raw Normal View History

2000-02-18 03:39:52 +08:00
long
__mulsi3(unsigned long a, unsigned long b)
{
long res = 0;
while (a)
{
if (a & 1)
{
res += b;
}
b <<= 1;
a >>=1;
}
return res;
}