newlib-cygwin/newlib/libc/machine/h8500/mulhi3.c

22 lines
153 B
C
Raw Normal View History

2000-02-18 03:39:52 +08:00
short
__mulhi3(short a, short b)
{
int r;
r = 0;
while (a)
{
if (a & 1)
{
r += b;
a>>=1;
b<<=1;
}
}
return r;
}