]> oss.titaniummirror.com Git - msp430-gcc.git/blobdiff - gcc/config/iq2000/lib2extra-funcs.c
Imported gcc-4.4.3
[msp430-gcc.git] / gcc / config / iq2000 / lib2extra-funcs.c
diff --git a/gcc/config/iq2000/lib2extra-funcs.c b/gcc/config/iq2000/lib2extra-funcs.c
new file mode 100644 (file)
index 0000000..e092bab
--- /dev/null
@@ -0,0 +1,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;
+}