Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
go
Commits
6b8bd355
Commit
6b8bd355
authored
Jun 06, 2008
by
Ken Thompson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nonaddressable = functioncall
code gen error SVN=121541
parent
e92b7538
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
2 deletions
+26
-2
src/cmd/6g/cgen.c
src/cmd/6g/cgen.c
+15
-0
src/cmd/6g/gen.c
src/cmd/6g/gen.c
+11
-2
No files found.
src/cmd/6g/cgen.c
View file @
6b8bd355
...
...
@@ -22,6 +22,13 @@ cgen(Node *n, Node *res)
if
(
res
==
N
||
res
->
type
==
T
)
fatal
(
"cgen: res nil"
);
if
(
n
->
ullman
>=
UINF
)
{
if
(
n
->
op
==
OINDREG
)
fatal
(
"cgen: this is going to misscompile"
);
if
(
res
->
ullman
>=
UINF
)
fatal
(
"cgen: fun both sides"
);
}
lno
=
dynlineno
;
if
(
n
->
op
!=
ONAME
)
dynlineno
=
n
->
lineno
;
// for diagnostics
...
...
@@ -32,6 +39,14 @@ cgen(Node *n, Node *res)
}
if
(
!
res
->
addable
)
{
if
(
n
->
ullman
>
res
->
ullman
)
{
regalloc
(
&
n1
,
nr
->
type
,
res
);
cgen
(
n
,
&
n1
);
cgen
(
&
n1
,
res
);
regfree
(
&
n1
);
return
;
}
igen
(
res
,
&
n1
,
N
);
cgen
(
n
,
&
n1
);
regfree
(
&
n1
);
...
...
src/cmd/6g/gen.c
View file @
6b8bd355
...
...
@@ -688,10 +688,15 @@ cgen_asop(Node *nl, Node *nr, int op)
Node
n1
,
n2
;
int
a
;
// botch compare ullman numbers
// and use temp for functions
if
(
nr
->
ullman
>=
UINF
&&
nl
->
ullman
>=
UINF
)
{
fatal
(
"cgen_asop both sides call"
);
}
a
=
optoas
(
op
,
nl
->
type
);
if
(
nr
->
ullman
>
nl
->
ullman
)
{
fatal
(
"gcgen_asopen"
);
}
regalloc
(
&
n1
,
nl
->
type
,
N
);
if
(
nl
->
addable
)
{
cgen
(
nr
,
&
n1
);
...
...
@@ -815,5 +820,9 @@ cgen_as(Node *nl, Node *nr, int op)
nr
->
addable
=
1
;
ullmancalc
(
nr
);
}
if
(
nr
->
ullman
>=
UINF
&&
nl
->
ullman
>=
UINF
)
{
fatal
(
"cgen_as both sides call"
);
}
cgen
(
nr
,
nl
);
}
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