efb80e7e09
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>
20 lines
292 B
C
20 lines
292 B
C
#include "libgcc.h"
|
|
|
|
u64 __lshrdi3(u64 v, int cnt)
|
|
{
|
|
int c = cnt & 31;
|
|
u32 vl = (u32) v;
|
|
u32 vh = (u32) (v >> 32);
|
|
|
|
if (cnt & 32) {
|
|
vl = (vh >> c);
|
|
vh = 0;
|
|
} else {
|
|
vl = (vl >> c) + (vh << (32 - c));
|
|
vh = (vh >> c);
|
|
}
|
|
|
|
return ((u64) vh << 32) + vl;
|
|
}
|
|
EXPORT_SYMBOL(__lshrdi3);
|