X-Git-Url: https://oss.titaniummirror.com/gitweb/?a=blobdiff_plain;f=gcc%2Fconfig%2Fiq2000%2Flib2extra-funcs.c;fp=gcc%2Fconfig%2Fiq2000%2Flib2extra-funcs.c;h=e092babdd1117baec9117adb41b78cba65b15d09;hb=6fed43773c9b0ce596dca5686f37ac3fc0fa11c0;hp=0000000000000000000000000000000000000000;hpb=27b11d56b743098deb193d510b337ba22dc52e5c;p=msp430-gcc.git diff --git a/gcc/config/iq2000/lib2extra-funcs.c b/gcc/config/iq2000/lib2extra-funcs.c new file mode 100644 index 00000000..e092babd --- /dev/null +++ b/gcc/config/iq2000/lib2extra-funcs.c @@ -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; +}