repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Merge reload-branch up to revision 101000
[official-gcc.git]
/
gcc
/
config
/
divmod.c
blob
6faa09102b57623dc78c07a1f39d2be8125fa826
1
long
udivmodsi4
();
2
3
long
4
__divsi3
(
long
a
,
long
b
)
5
{
6
int
neg
=
0
;
7
long
res
;
8
9
if
(
a
<
0
)
10
{
11
a
= -
a
;
12
neg
= !
neg
;
13
}
14
15
if
(
b
<
0
)
16
{
17
b
= -
b
;
18
neg
= !
neg
;
19
}
20
21
res
=
udivmodsi4
(
a
,
b
,
0
);
22
23
if
(
neg
)
24
res
= -
res
;
25
26
return
res
;
27
}
28
29
long
30
__modsi3
(
long
a
,
long
b
)
31
{
32
int
neg
=
0
;
33
long
res
;
34
35
if
(
a
<
0
)
36
{
37
a
= -
a
;
38
neg
=
1
;
39
}
40
41
if
(
b
<
0
)
42
b
= -
b
;
43
44
res
=
udivmodsi4
(
a
,
b
,
1
);
45
46
if
(
neg
)
47
res
= -
res
;
48
49
return
res
;
50
}