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
1d0b65d3
Commit
1d0b65d3
authored
Oct 30, 2009
by
Kai Backman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added missing sgen reverse character copy code.
R=rsc
http://go/go-review/1018006
parent
770b8727
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
1 deletion
+24
-1
cgen.c
src/cmd/5g/cgen.c
+24
-1
No files found.
src/cmd/5g/cgen.c
View file @
1d0b65d3
...
...
@@ -1084,7 +1084,7 @@ sgen(Node *n, Node *res, int32 w)
regalloc
(
&
dst
,
types
[
tptr
],
res
);
if
(
n
->
ullman
>=
res
->
ullman
)
{
agen
(
n
,
&
dst
);
agen
(
n
,
&
dst
);
// temporarily use dst
regalloc
(
&
src
,
types
[
tptr
],
N
);
gins
(
AMOVW
,
&
dst
,
&
src
);
agen
(
res
,
&
dst
);
...
...
@@ -1137,6 +1137,29 @@ sgen(Node *n, Node *res, int32 w)
patch
(
gbranch
(
ABNE
,
T
),
ploop
);
regfree
(
&
nend
);
}
else
{
// move src and dest to the end of block
p
=
gins
(
AMOVW
,
&
src
,
&
src
);
p
->
from
.
type
=
D_CONST
;
p
->
from
.
offset
=
(
q
-
1
)
*
4
;
p
=
gins
(
AMOVW
,
&
dst
,
&
dst
);
p
->
from
.
type
=
D_CONST
;
p
->
from
.
offset
=
(
q
-
1
)
*
4
;
while
(
q
>
0
)
{
p
=
gins
(
AMOVW
,
&
src
,
&
tmp
);
p
->
from
.
type
=
D_OREG
;
p
->
from
.
offset
=
-
4
;
p
->
scond
|=
C_PBIT
;
p
=
gins
(
AMOVW
,
&
tmp
,
&
dst
);
p
->
to
.
type
=
D_OREG
;
p
->
to
.
offset
=
-
4
;
p
->
scond
|=
C_PBIT
;
q
--
;
}
}
}
else
{
// normal direction
...
...
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