blob: 3a0b9036528c5cc66922073ce8e0b3ce8931c508 [file] [log] [blame]
// See LICENSE for license details.
// *************************************************************************
// multiply function (c version)
// -------------------------------------------------------------------------
int multiply( int x, int y )
{
int i;
int result = 0;
for (i = 0; i < 32; i++) {
if ((x & 0x1) == 1)
result = result + y;
x = x >> 1;
y = y << 1;
}
return result;
}