
Currently we're hacking libs-y to include libgcc.a, but this has unforeseen consequences since the userspace libgcc is linked with fpregs enabled. We need the kernel to stop using fpregs in an uncontrolled manner to implement lazy fpu state saves. Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
22 lines
383 B
C
22 lines
383 B
C
#include "libgcc.h"
|
|
|
|
union DWunion {
|
|
struct {
|
|
s32 high;
|
|
s32 low;
|
|
} s;
|
|
s64 ll;
|
|
};
|
|
|
|
s64 __muldi3(s64 u, s64 v)
|
|
{
|
|
const union DWunion uu = { .ll = u };
|
|
const union DWunion vv = { .ll = v };
|
|
union DWunion w = { .ll = __umulsidi3(uu.s.low, vv.s.low) };
|
|
|
|
w.s.high += ((u32)uu.s.low * (u32)vv.s.high
|
|
+ (u32)uu.s.high * (u32)vv.s.low);
|
|
|
|
return w.ll;
|
|
}
|
|
EXPORT_SYMBOL(__muldi3);
|