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
ee7c64ef
Commit
ee7c64ef
authored
Jan 07, 2010
by
Russ Cox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
8c: only refer to extern register variables in MOVL instructions
R=ken2
https://golang.org/cl/183136
parent
616394b1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
1 deletion
+8
-1
cgen.c
src/cmd/8c/cgen.c
+6
-0
sgen.c
src/cmd/8c/sgen.c
+2
-1
No files found.
src/cmd/8c/cgen.c
View file @
ee7c64ef
...
...
@@ -55,6 +55,12 @@ cgen(Node *n, Node *nn)
l
=
n
->
left
;
r
=
n
->
right
;
o
=
n
->
op
;
if
(
n
->
op
==
OEXREG
||
(
nn
!=
Z
&&
nn
->
op
==
OEXREG
))
{
gmove
(
n
,
nn
);
return
;
}
if
(
n
->
addable
>=
INDEXED
)
{
if
(
nn
==
Z
)
{
switch
(
o
)
{
...
...
src/cmd/8c/sgen.c
View file @
ee7c64ef
...
...
@@ -98,6 +98,7 @@ indexshift(Node *n)
* (20) * (X) ==> 7 multiplier in indexing
* (X,7) + (13,1) ==> 8 adder in indexing (addresses)
* (8) ==> &9(OINDEX) index, almost addressable
* 100 extern register
*
* calculate complexity (number of registers)
*/
...
...
@@ -125,7 +126,7 @@ xcom(Node *n)
break
;
case
OEXREG
:
n
->
addable
=
1
0
;
n
->
addable
=
0
;
break
;
case
OREGISTER
:
...
...
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