diff options
author | Kyle McMartin <kyle@mcmartin.ca> | 2007-10-18 00:06:26 -0700 |
---|---|---|
committer | Kyle McMartin <kyle@shortfin.cabal.ca> | 2007-10-18 00:58:49 -0700 |
commit | efb80e7e097d0888e59fbbe4ded2ac5a256f556d (patch) | |
tree | 98a0f2f1514501aeebb1877bfcb5b528491e5ad5 /arch/parisc/lib/libgcc/__lshrdi3.c | |
parent | 6f7d998e94ec7b7f08bd0c72fc05343435d7fa93 (diff) |
[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 <kyle@mcmartin.ca>
Diffstat (limited to 'arch/parisc/lib/libgcc/__lshrdi3.c')
-rw-r--r-- | arch/parisc/lib/libgcc/__lshrdi3.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/arch/parisc/lib/libgcc/__lshrdi3.c b/arch/parisc/lib/libgcc/__lshrdi3.c new file mode 100644 index 00000000000..4a820708ec5 --- /dev/null +++ b/arch/parisc/lib/libgcc/__lshrdi3.c @@ -0,0 +1,19 @@ +#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); |