mirror of
https://github.com/FEX-Emu/linux.git
synced 2025-02-14 00:13:53 +00:00
![Kyle McMartin](/assets/img/avatar_default.png)
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
269 B
C
24 lines
269 B
C
#include "libgcc.h"
|
|
|
|
s64 __divdi3(s64 num, s64 den)
|
|
{
|
|
int minus = 0;
|
|
s64 v;
|
|
|
|
if (num < 0) {
|
|
num = -num;
|
|
minus = 1;
|
|
}
|
|
if (den < 0) {
|
|
den = -den;
|
|
minus ^= 1;
|
|
}
|
|
|
|
v = __udivmoddi4(num, den, NULL);
|
|
if (minus)
|
|
v = -v;
|
|
|
|
return v;
|
|
}
|
|
EXPORT_SYMBOL(__divdi3);
|