Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
golang
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
golang
Commits
250ec166
Commit
250ec166
authored
Nov 03, 2008
by
Ken Thompson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
unsigned divide by fn()
R=r OCL=18351 CL=18351
parent
6b055185
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
gen.c
src/cmd/6g/gen.c
+10
-10
No files found.
src/cmd/6g/gen.c
View file @
250ec166
...
...
@@ -907,7 +907,7 @@ void
dodiv
(
int
op
,
Node
*
nl
,
Node
*
nr
,
Node
*
res
,
Node
*
ax
,
Node
*
dx
)
{
int
a
;
Node
n3
;
Node
n3
,
n4
;
Type
*
t
;
t
=
nl
->
type
;
...
...
@@ -919,25 +919,25 @@ dodiv(int op, Node *nl, Node *nr, Node *res, Node *ax, Node *dx)
}
a
=
optoas
(
op
,
t
);
if
(
!
issigned
[
t
->
etype
])
{
nodconst
(
&
n3
,
t
,
0
);
gmove
(
&
n3
,
dx
);
}
regalloc
(
&
n3
,
nr
->
type
,
N
);
if
(
nl
->
ullman
>=
nr
->
ullman
)
{
cgen
(
nl
,
ax
);
if
(
issigned
[
t
->
etype
])
if
(
!
issigned
[
t
->
etype
])
{
nodconst
(
&
n4
,
t
,
0
);
gmove
(
&
n4
,
dx
);
}
else
gins
(
optoas
(
OFOR
,
t
),
N
,
N
);
cgen
(
nr
,
&
n3
);
gins
(
a
,
&
n3
,
N
);
}
else
{
cgen
(
nr
,
&
n3
);
cgen
(
nl
,
ax
);
if
(
issigned
[
t
->
etype
])
if
(
!
issigned
[
t
->
etype
])
{
nodconst
(
&
n4
,
t
,
0
);
gmove
(
&
n4
,
dx
);
}
else
gins
(
optoas
(
OFOR
,
t
),
N
,
N
);
gins
(
a
,
&
n3
,
N
);
}
gins
(
a
,
&
n3
,
N
);
regfree
(
&
n3
);
if
(
op
==
ODIV
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment