[PARISC] import necessary bits of libgcc.a
[linux-2.6/lfs.git] / arch / parisc / lib / libgcc / __muldi3.c
blob3308abdd5580f5ff2f6675abcede517ed156946f
1 #include "libgcc.h"
3 union DWunion {
4 struct {
5 s32 high;
6 s32 low;
7 } s;
8 s64 ll;
9 };
11 s64 __muldi3(s64 u, s64 v)
13 const union DWunion uu = { .ll = u };
14 const union DWunion vv = { .ll = v };
15 union DWunion w = { .ll = __umulsidi3(uu.s.low, vv.s.low) };
17 w.s.high += ((u32)uu.s.low * (u32)vv.s.high
18 + (u32)uu.s.high * (u32)vv.s.low);
20 return w.ll;
22 EXPORT_SYMBOL(__muldi3);