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/__modsi3.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/__modsi3.c')
-rw-r--r-- | arch/parisc/lib/libgcc/__modsi3.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/arch/parisc/lib/libgcc/__modsi3.c b/arch/parisc/lib/libgcc/__modsi3.c new file mode 100644 index 00000000000..62f773efaee --- /dev/null +++ b/arch/parisc/lib/libgcc/__modsi3.c @@ -0,0 +1,23 @@ +#include "libgcc.h" + +s32 __modsi3(s32 num, s32 den) +{ + int minus = 0; + s32 v; + + if (num < 0) { + num = -num; + minus = 1; + } + if (den < 0) { + den = -den; + minus ^= 1; + } + + (void)__udivmodsi4(num, den, (u32 *) & v); + if (minus) + v = -v; + + return v; +} +EXPORT_SYMBOL(__modsi3); |