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
79f5697b
Commit
79f5697b
authored
Nov 08, 2008
by
Ken Thompson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
byte multiply
R=r OCL=18830 CL=18830
parent
dc78c64f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
10 deletions
+22
-10
gen.c
src/cmd/6g/gen.c
+22
-10
No files found.
src/cmd/6g/gen.c
View file @
79f5697b
...
...
@@ -1098,30 +1098,42 @@ ret:
void
cgen_bmul
(
int
op
,
Node
*
nl
,
Node
*
nr
,
Node
*
res
)
{
Node
n1
,
n2
;
Node
n1
,
n2
,
n3
;
Type
*
t
;
int
a
;
t
=
types
[
TUINT16
];
if
(
issigned
[
nl
->
type
->
etype
])
t
=
types
[
TINT16
];
if
(
nl
->
ullman
>=
nr
->
ullman
)
{
regalloc
(
&
n1
,
t
,
nl
);
regalloc
(
&
n1
,
nl
->
type
,
res
);
cgen
(
nl
,
&
n1
);
regalloc
(
&
n2
,
t
,
nr
);
regalloc
(
&
n2
,
nr
->
type
,
N
);
cgen
(
nr
,
&
n2
);
}
else
{
regalloc
(
&
n2
,
t
,
nr
);
regalloc
(
&
n2
,
nr
->
type
,
N
);
cgen
(
nr
,
&
n2
);
regalloc
(
&
n1
,
t
,
nl
);
regalloc
(
&
n1
,
nl
->
type
,
res
);
cgen
(
nl
,
&
n1
);
}
// copy to short registers
t
=
types
[
TUINT16
];
if
(
issigned
[
nl
->
type
->
etype
])
t
=
types
[
TINT16
];
regalloc
(
&
n3
,
t
,
&
n2
);
cgen
(
&
n2
,
&
n3
);
regfree
(
&
n3
);
regalloc
(
&
n3
,
t
,
&
n1
);
cgen
(
&
n1
,
&
n3
);
a
=
optoas
(
op
,
t
);
gins
(
a
,
&
n2
,
&
n1
);
gmove
(
&
n1
,
res
);
cgen
(
&
n3
,
&
n1
);
cgen
(
&
n1
,
res
);
regfree
(
&
n1
);
regfree
(
&
n2
);
regfree
(
&
n3
);
}
void
...
...
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