repo.or.cz
/
openbios.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Switch dir over to use the new static filesystem dir methods.
[openbios.git]
/
libgcc
/
__divti3.c
blob
501c14f67a7e9545d0ea7ed0386ac9860c9cb89a
1
/*
2
* arch/i386/libgcc/__divti3.c
3
*/
4
5
#include
"libgcc.h"
6
7
__int128_t
__divti3
(
__int128_t num
,
__int128_t den
)
8
{
9
int
minus
=
0
;
10
__int128_t v
;
11
12
if
(
num
<
0
) {
13
num
= -
num
;
14
minus
=
1
;
15
}
16
if
(
den
<
0
) {
17
den
= -
den
;
18
minus
^=
1
;
19
}
20
21
v
=
__udivmodti4
(
num
,
den
,
NULL
);
22
if
(
minus
)
23
v
= -
v
;
24
25
return
v
;
26
}