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
9686ab2d
Commit
9686ab2d
authored
Aug 27, 2010
by
Russ Cox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
8g: use FCHS, not FMUL, for minus float
Fixes #1052. R=ken2 CC=golang-dev
https://golang.org/cl/2055041
parent
1a0b62a1
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
9 deletions
+7
-9
src/cmd/8g/cgen.c
src/cmd/8g/cgen.c
+2
-9
src/cmd/8g/gsubr.c
src/cmd/8g/gsubr.c
+5
-0
No files found.
src/cmd/8g/cgen.c
View file @
9686ab2d
...
...
@@ -392,23 +392,16 @@ uop: // unary
gmove
(
&
n1
,
res
);
return
;
flt:
// floating-point. 387 (not SSE2) to interoperate with
6
c
flt:
// floating-point. 387 (not SSE2) to interoperate with
8
c
nodreg
(
&
f0
,
nl
->
type
,
D_F0
);
nodreg
(
&
f1
,
n
->
type
,
D_F0
+
1
);
if
(
nr
!=
N
)
goto
flt2
;
if
(
n
->
op
==
OMINUS
)
{
nr
=
nodintconst
(
-
1
);
convlit
(
&
nr
,
n
->
type
);
n
->
op
=
OMUL
;
goto
flt2
;
}
// unary
cgen
(
nl
,
&
f0
);
if
(
n
->
op
!=
OCONV
&&
n
->
op
!=
OPLUS
)
gins
(
foptoas
(
n
->
op
,
n
->
type
,
0
),
&
f0
,
&
f0
);
gins
(
foptoas
(
n
->
op
,
n
->
type
,
0
),
N
,
N
);
gmove
(
&
f0
,
res
);
return
;
...
...
src/cmd/8g/gsubr.c
View file @
9686ab2d
...
...
@@ -661,6 +661,11 @@ foptoas(int op, Type *t, int flg)
return
AFCOMDP
;
case
FCASE
(
OCMP
,
TFLOAT64
,
Fpop2
):
return
AFCOMDPP
;
case
FCASE
(
OMINUS
,
TFLOAT32
,
0
):
return
AFCHS
;
case
FCASE
(
OMINUS
,
TFLOAT64
,
0
):
return
AFCHS
;
}
fatal
(
"foptoas %O %T %#x"
,
op
,
t
,
flg
);
...
...
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