RISC-V Proxy Kernel
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

22 lines
248 B

#include <stdint.h>
long softint_mul( long x, long y )
{
int i;
long result = 0;
for (i = 0; i < (sizeof(long) << 3); i++) {
if ((x & 0x1) == 1)
result = result + y;
x = x >> 1;
y = y << 1;
}
return result;
}