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
0e2cce70
Commit
0e2cce70
authored
Jul 14, 2009
by
Kai Backman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tiny naming cleanup
R=rsc APPROVED=rsc DELTA=17 (0 added, 0 deleted, 17 changed) OCL=31503 CL=31579
parent
7258bac6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
17 deletions
+17
-17
cgen.c
src/cmd/5g/cgen.c
+17
-17
No files found.
src/cmd/5g/cgen.c
View file @
0e2cce70
...
...
@@ -820,7 +820,7 @@ stkof(Node *n)
void
sgen
(
Node
*
n
,
Node
*
res
,
int32
w
)
{
Node
nodl
,
nodr
,
ndat
,
nend
;
Node
dst
,
src
,
tmp
,
nend
;
int32
c
,
q
,
odst
,
osrc
;
Prog
*
p
;
...
...
@@ -842,16 +842,16 @@ sgen(Node *n, Node *res, int32 w)
osrc
=
stkof
(
n
);
odst
=
stkof
(
res
);
regalloc
(
&
nodl
,
types
[
tptr
],
N
);
regalloc
(
&
nodr
,
types
[
tptr
],
N
);
regalloc
(
&
ndat
,
types
[
TUINT32
],
N
);
regalloc
(
&
dst
,
types
[
tptr
],
N
);
regalloc
(
&
src
,
types
[
tptr
],
N
);
regalloc
(
&
tmp
,
types
[
TUINT32
],
N
);
if
(
n
->
ullman
>=
res
->
ullman
)
{
agen
(
n
,
&
nodr
);
agen
(
res
,
&
nodl
);
agen
(
n
,
&
src
);
agen
(
res
,
&
dst
);
}
else
{
agen
(
res
,
&
nodl
);
agen
(
n
,
&
nodr
);
agen
(
res
,
&
dst
);
agen
(
n
,
&
src
);
}
c
=
w
%
4
;
// bytes
...
...
@@ -890,33 +890,33 @@ sgen(Node *n, Node *res, int32 w)
// normal direction
if
(
q
>=
4
)
{
regalloc
(
&
nend
,
types
[
TUINT32
],
N
);
p
=
gins
(
AMOVW
,
&
nodr
,
&
nend
);
p
=
gins
(
AMOVW
,
&
src
,
&
nend
);
p
->
from
.
type
=
D_CONST
;
p
->
from
.
offset
=
q
;
p
=
gins
(
AMOVW
,
&
nodr
,
&
ndat
);
p
=
gins
(
AMOVW
,
&
src
,
&
tmp
);
p
->
from
.
type
=
D_OREG
;
p
->
from
.
offset
=
4
;
p
->
scond
|=
C_PBIT
;
p
=
gins
(
AMOVW
,
&
ndat
,
&
nodl
);
p
=
gins
(
AMOVW
,
&
tmp
,
&
dst
);
p
->
to
.
type
=
D_OREG
;
p
->
to
.
offset
=
4
;
p
->
scond
|=
C_PBIT
;
gins
(
ACMP
,
&
nodr
,
&
nend
);
gins
(
ACMP
,
&
src
,
&
nend
);
fatal
(
"sgen loop not implemented"
);
p
=
gins
(
ABNE
,
N
,
N
);
// TODO(PC offset)
regfree
(
&
nend
);
}
else
while
(
q
>
0
)
{
p
=
gins
(
AMOVW
,
&
nodr
,
&
ndat
);
p
=
gins
(
AMOVW
,
&
src
,
&
tmp
);
p
->
from
.
type
=
D_OREG
;
p
->
from
.
offset
=
4
;
p
->
scond
|=
C_PBIT
;
p
=
gins
(
AMOVW
,
&
ndat
,
&
nodl
);
p
=
gins
(
AMOVW
,
&
tmp
,
&
dst
);
p
->
to
.
type
=
D_OREG
;
p
->
to
.
offset
=
4
;
p
->
scond
|=
C_PBIT
;
...
...
@@ -936,7 +936,7 @@ sgen(Node *n, Node *res, int32 w)
// c--;
// }
}
regfree
(
&
nodl
);
regfree
(
&
nodr
);
regfree
(
&
ndat
);
regfree
(
&
dst
);
regfree
(
&
src
);
regfree
(
&
tmp
);
}
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