Gitiles
Code Review
Sign In
LeafOS
/
LeafOS-Devices
/
android_kernel_samsung_gta4xl
/
09b56adc98e0f8a21644fcb4d20ad367c3fceb55
/
.
/
arch
/
parisc
/
lib
/
libgcc
/
__divdi3.c
blob: f23c6fe2838b2db94d1a7e25c705de5cc40501bb [
file
] [
log
] [
blame
]
#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
);