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

22 lines
153 B
C

short
__mulhi3(short a, short b)
{
int r;
r = 0;
while (a)
{
if (a & 1)
{
r += b;
a>>=1;
b<<=1;
}
}
return r;
}