Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
16d62226
Commit
16d62226
authored
Feb 10, 2012
by
Ian Lance Taylor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
runtime: Use __builtin_{inf,nan} rather than INFINITY/NAN.
From-SVN: r184080
parent
9e4f308e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
libgo/runtime/go-matherr.c
+6
-6
No files found.
libgo/runtime/go-matherr.c
View file @
16d62226
...
...
@@ -35,7 +35,7 @@ matherr (struct exception* e)
n
=
e
->
name
;
if
(
__builtin_strcmp
(
n
,
"acos"
)
==
0
||
__builtin_strcmp
(
n
,
"asin"
)
==
0
)
e
->
retval
=
NAN
;
e
->
retval
=
__builtin_nan
(
""
)
;
else
if
(
__builtin_strcmp
(
n
,
"atan2"
)
==
0
)
{
if
(
e
->
arg1
==
0
&&
e
->
arg2
==
0
)
...
...
@@ -53,11 +53,11 @@ matherr (struct exception* e)
}
else
if
(
__builtin_strcmp
(
n
,
"log"
)
==
0
||
__builtin_strcmp
(
n
,
"log10"
)
==
0
)
e
->
retval
=
NAN
;
e
->
retval
=
__builtin_nan
(
""
)
;
else
if
(
__builtin_strcmp
(
n
,
"pow"
)
==
0
)
{
if
(
e
->
arg1
<
0
)
e
->
retval
=
NAN
;
e
->
retval
=
__builtin_nan
(
""
)
;
else
if
(
e
->
arg1
==
0
&&
e
->
arg2
==
0
)
e
->
retval
=
1
.
0
;
else
if
(
e
->
arg1
==
0
&&
e
->
arg2
<
0
)
...
...
@@ -65,9 +65,9 @@ matherr (struct exception* e)
double
i
;
if
(
modf
(
e
->
arg2
,
&
i
)
==
0
&&
((
int64_t
)
i
&
1
)
==
1
)
e
->
retval
=
copysign
(
INFINITY
,
e
->
arg1
);
e
->
retval
=
copysign
(
__builtin_inf
()
,
e
->
arg1
);
else
e
->
retval
=
INFINITY
;
e
->
retval
=
__builtin_inf
()
;
}
else
return
0
;
...
...
@@ -75,7 +75,7 @@ matherr (struct exception* e)
else
if
(
__builtin_strcmp
(
n
,
"sqrt"
)
==
0
)
{
if
(
e
->
arg1
<
0
)
e
->
retval
=
NAN
;
e
->
retval
=
__builtin_nan
(
""
)
;
else
return
0
;
}
...
...
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