mirror of
https://kernel.googlesource.com/pub/scm/linux/kernel/git/stable/linux-stable.git
synced 2025-09-14 11:19:08 +10:00
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>
24 lines
278 B
C
24 lines
278 B
C
#include "libgcc.h"
|
|
|
|
s64 __moddi3(s64 num, s64 den)
|
|
{
|
|
int minus = 0;
|
|
s64 v;
|
|
|
|
if (num < 0) {
|
|
num = -num;
|
|
minus = 1;
|
|
}
|
|
if (den < 0) {
|
|
den = -den;
|
|
minus ^= 1;
|
|
}
|
|
|
|
(void)__udivmoddi4(num, den, (u64 *) & v);
|
|
if (minus)
|
|
v = -v;
|
|
|
|
return v;
|
|
}
|
|
EXPORT_SYMBOL(__moddi3);
|