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
b89c5384
Commit
b89c5384
authored
Aug 10, 2008
by
Ken Thompson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed unary ^ opcode (bug082)
R=r DELTA=11 (10 added, 1 deleted, 0 changed) OCL=14047 CL=14047
parent
091047f3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
cgen.c
src/cmd/6g/cgen.c
+10
-1
No files found.
src/cmd/6g/cgen.c
View file @
b89c5384
...
...
@@ -101,8 +101,17 @@ cgen(Node *n, Node *res)
goto
ret
;
// unary
case
OMINUS
:
case
OCOM
:
a
=
optoas
(
OXOR
,
nl
->
type
);
regalloc
(
&
n1
,
nl
->
type
,
N
);
cgen
(
nl
,
&
n1
);
nodconst
(
&
n2
,
nl
->
type
,
-
1
);
gins
(
a
,
&
n2
,
&
n1
);
gmove
(
&
n1
,
res
);
regfree
(
&
n1
);
goto
ret
;
case
OMINUS
:
a
=
optoas
(
n
->
op
,
nl
->
type
);
goto
uop
;
...
...
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