From efb80e7e097d0888e59fbbe4ded2ac5a256f556d Mon Sep 17 00:00:00 2001 From: Kyle McMartin Date: Thu, 18 Oct 2007 00:06:26 -0700 Subject: [PARISC] import necessary bits of libgcc.a 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 --- arch/parisc/lib/libgcc/__ashrdi3.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 arch/parisc/lib/libgcc/__ashrdi3.c (limited to 'arch/parisc/lib/libgcc/__ashrdi3.c') diff --git a/arch/parisc/lib/libgcc/__ashrdi3.c b/arch/parisc/lib/libgcc/__ashrdi3.c new file mode 100644 index 000000000000..8636a5aa4f77 --- /dev/null +++ b/arch/parisc/lib/libgcc/__ashrdi3.c @@ -0,0 +1,19 @@ +#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); -- cgit v1.2.3-55-g7522