aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.4.0/gcc/config/iq2000/lib2extra-funcs.c
blob: e092babdd1117baec9117adb41b78cba65b15d09 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
typedef unsigned int USItype		__attribute__ ((mode (SI)));

USItype
__mulsi3 (USItype a, USItype b)
{
  USItype c = 0;

  while (a != 0)
    {
      if (a & 1)
	c += b;
      a >>= 1;
      b <<= 1;
    }

  return c;
}