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