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
eead5e88
Commit
eead5e88
authored
Jan 19, 2011
by
Ken Thompson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
arm register allocation/tempname allocation bug
R=r CC=golang-dev
https://golang.org/cl/4008044
parent
9b6d8b3c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
+10
-4
cgen.c
src/cmd/5g/cgen.c
+10
-4
No files found.
src/cmd/5g/cgen.c
View file @
eead5e88
...
@@ -567,7 +567,8 @@ agen(Node *n, Node *res)
...
@@ -567,7 +567,8 @@ agen(Node *n, Node *res)
regalloc
(
&
n1
,
tmp
.
type
,
N
);
regalloc
(
&
n1
,
tmp
.
type
,
N
);
gmove
(
&
tmp
,
&
n1
);
gmove
(
&
tmp
,
&
n1
);
}
}
}
else
if
(
nl
->
addable
)
{
}
else
if
(
nl
->
addable
)
{
if
(
!
isconst
(
nr
,
CTINT
))
{
if
(
!
isconst
(
nr
,
CTINT
))
{
tempname
(
&
tmp
,
types
[
TINT32
]);
tempname
(
&
tmp
,
types
[
TINT32
]);
p2
=
cgenindex
(
nr
,
&
tmp
);
p2
=
cgenindex
(
nr
,
&
tmp
);
...
@@ -1092,11 +1093,17 @@ bgen(Node *n, int true, Prog *to)
...
@@ -1092,11 +1093,17 @@ bgen(Node *n, int true, Prog *to)
break
;
break
;
}
}
tempname
(
&
n3
,
nl
->
type
);
cgen
(
nl
,
&
n3
);
tempname
(
&
tmp
,
nr
->
type
);
cgen
(
nr
,
&
tmp
);
regalloc
(
&
n1
,
nl
->
type
,
N
);
regalloc
(
&
n1
,
nl
->
type
,
N
);
cgen
(
nl
,
&
n1
);
gmove
(
&
n3
,
&
n1
);
regalloc
(
&
n2
,
nr
->
type
,
N
);
regalloc
(
&
n2
,
nr
->
type
,
N
);
cgen
(
nr
,
&
n2
);
gmove
(
&
tmp
,
&
n2
);
gcmp
(
optoas
(
OCMP
,
nr
->
type
),
&
n1
,
&
n2
);
gcmp
(
optoas
(
OCMP
,
nr
->
type
),
&
n1
,
&
n2
);
if
(
isfloat
[
nl
->
type
->
etype
])
{
if
(
isfloat
[
nl
->
type
->
etype
])
{
...
@@ -1109,7 +1116,6 @@ bgen(Node *n, int true, Prog *to)
...
@@ -1109,7 +1116,6 @@ bgen(Node *n, int true, Prog *to)
}
else
{
}
else
{
patch
(
gbranch
(
a
,
nr
->
type
),
to
);
patch
(
gbranch
(
a
,
nr
->
type
),
to
);
}
}
regfree
(
&
n1
);
regfree
(
&
n1
);
regfree
(
&
n2
);
regfree
(
&
n2
);
break
;
break
;
...
...
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